playlight-sdk 0.3.1 → 0.3.3
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.
- package/dist/playlight-sdk.es.js +841 -550
- package/dist/playlight-sdk.es.js.map +1 -1
- package/package.json +7 -5
- package/dist/assets/fonts/geist-variable-weight.woff2 +0 -0
- package/dist/assets/images/icon-white-small.png +0 -0
- package/dist/assets/images/logo-white-small.png +0 -0
- package/dist/assets/sounds/hover-selection.ogg +0 -0
- package/dist/playlight-sdk.iife.js +0 -282
- package/dist/playlight-sdk.iife.js.map +0 -1
package/dist/playlight-sdk.es.js
CHANGED
|
@@ -9,7 +9,7 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
|
|
|
9
9
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10
10
|
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
11
11
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
12
|
-
var _e3, _t2, _n2, _r, _s, _i, _o, _Batch_instances, a_fn, c_fn, l_fn, u_fn, _n3, _d2, _f, _p, _h, _g, __, _v, _m, _b2, _y, _w, _$, _x, _k, _S, _C, _Boundary_instances,
|
|
12
|
+
var _e3, _t2, _n2, _r, _s, _i, _o, _Batch_instances, a_fn, c_fn, l_fn, u_fn, _n3, _d2, _f, _p, _h, _g, __, _v, _m, _b2, _y, _w, _$, _x, _k, _S, _C, _Boundary_instances, I_fn, O_fn, M_fn, T_fn, E_fn, P_fn, _L, _j, _A, _D, _u, _W, _B, _N, _ResizeObserverSingleton_instances, q_fn, _a, _z, _R, _b, _G, _F, _c, _H, _Y, _V, _d, _U, _PlayLightAPI_instances, K_fn, _e2;
|
|
13
13
|
const e = {
|
|
14
14
|
exitIntent: {
|
|
15
15
|
enabled: true,
|
|
@@ -68,7 +68,7 @@ function to_array(e2, t2) {
|
|
|
68
68
|
for (const s2 of e2) if (n2.push(s2), n2.length === t2) break;
|
|
69
69
|
return n2;
|
|
70
70
|
}
|
|
71
|
-
const p = 16, h = 32, g = 64, _ = 128, v = 1024, m = 2048, b = 4096, y = 8192, w = 16384, $ = 32768, x = 65536, k = 1 << 17, S = 1 << 19, C = 256,
|
|
71
|
+
const p = 16, h = 32, g = 64, _ = 128, v = 1024, m = 2048, b = 4096, y = 8192, w = 16384, $ = 32768, x = 65536, k = 1 << 17, S = 1 << 19, C = 256, M = 512, E = 32768, I = 1 << 21, O = 1 << 23, T = Symbol("$state"), P = Symbol("legacy props"), L = Symbol(""), j = new class StaleReactionError extends Error {
|
|
72
72
|
constructor() {
|
|
73
73
|
super(...arguments);
|
|
74
74
|
__publicField(this, "name", "StaleReactionError");
|
|
@@ -327,7 +327,7 @@ const G = /* @__PURE__ */ new WeakMap();
|
|
|
327
327
|
function handle_error(e2) {
|
|
328
328
|
var t2 = ae;
|
|
329
329
|
if (null === t2)
|
|
330
|
-
return ie.f |=
|
|
330
|
+
return ie.f |= O, e2;
|
|
331
331
|
if (0 === (t2.f & $)) {
|
|
332
332
|
if (0 === (t2.f & _)) throw !t2.parent && e2 instanceof Error && apply_adjustments(e2), e2;
|
|
333
333
|
t2.b.error(e2);
|
|
@@ -354,7 +354,7 @@ function apply_adjustments(e2) {
|
|
|
354
354
|
}));
|
|
355
355
|
}
|
|
356
356
|
const F = /* @__PURE__ */ new Set();
|
|
357
|
-
let H = null, Y = null,
|
|
357
|
+
let H = null, Y = null, V = null, U = /* @__PURE__ */ new Set(), K = [], Z = null, J = false, Q = false;
|
|
358
358
|
const _Batch = class _Batch {
|
|
359
359
|
constructor() {
|
|
360
360
|
__privateAdd(this, _Batch_instances);
|
|
@@ -427,7 +427,7 @@ const _Batch = class _Batch {
|
|
|
427
427
|
// If sources are written to, then work needs to happen in a separate batch, else prior sources would be mixed with
|
|
428
428
|
// newly updated sources, which could lead to infinite loops when effects run over and over again.
|
|
429
429
|
(Y = this, H = null, flush_queued_effects(t2.render_effects), flush_queued_effects(t2.effects), Y = null)
|
|
430
|
-
),
|
|
430
|
+
), V = null;
|
|
431
431
|
}
|
|
432
432
|
/**
|
|
433
433
|
* Associate a change to a given source with the current
|
|
@@ -436,13 +436,13 @@ const _Batch = class _Batch {
|
|
|
436
436
|
* @param {any} value
|
|
437
437
|
*/
|
|
438
438
|
capture(e2, t2) {
|
|
439
|
-
__privateGet(this, _e3).has(e2) || __privateGet(this, _e3).set(e2, t2), this.current.set(e2, e2.v),
|
|
439
|
+
__privateGet(this, _e3).has(e2) || __privateGet(this, _e3).set(e2, t2), this.current.set(e2, e2.v), V == null ? void 0 : V.set(e2, e2.v);
|
|
440
440
|
}
|
|
441
441
|
activate() {
|
|
442
442
|
H = this;
|
|
443
443
|
}
|
|
444
444
|
deactivate() {
|
|
445
|
-
H = null,
|
|
445
|
+
H = null, V = null;
|
|
446
446
|
}
|
|
447
447
|
flush() {
|
|
448
448
|
if (K.length > 0) {
|
|
@@ -450,7 +450,7 @@ const _Batch = class _Batch {
|
|
|
450
450
|
return;
|
|
451
451
|
} else __privateMethod(this, _Batch_instances, l_fn).call(this);
|
|
452
452
|
this.deactivate();
|
|
453
|
-
for (const e2 of
|
|
453
|
+
for (const e2 of U) if (U.delete(e2), e2(), null !== H)
|
|
454
454
|
break;
|
|
455
455
|
}
|
|
456
456
|
/**
|
|
@@ -554,7 +554,7 @@ u_fn = function() {
|
|
|
554
554
|
var _a2, _b3;
|
|
555
555
|
if (F.size > 1) {
|
|
556
556
|
__privateGet(this, _e3).clear();
|
|
557
|
-
var e2 =
|
|
557
|
+
var e2 = V, t2 = true, n2 = {
|
|
558
558
|
parent: null,
|
|
559
559
|
effect: null,
|
|
560
560
|
effects: [],
|
|
@@ -587,7 +587,7 @@ u_fn = function() {
|
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
|
-
H = null,
|
|
590
|
+
H = null, V = e2;
|
|
591
591
|
}
|
|
592
592
|
this.committed = true, F.delete(this), (_b3 = __privateGet(this, _s)) == null ? void 0 : _b3.resolve();
|
|
593
593
|
};
|
|
@@ -771,13 +771,13 @@ class Boundary {
|
|
|
771
771
|
__privateSet(this, _d2, e2), __privateSet(this, _p, t2), __privateSet(this, _h, n2), this.parent = /** @type {Effect} */
|
|
772
772
|
ae.b, __privateSet(this, _n3, !!__privateGet(this, _p).pending), __privateSet(this, _g, block(() => {
|
|
773
773
|
ae.b = this;
|
|
774
|
-
var e3 = __privateMethod(this, _Boundary_instances,
|
|
774
|
+
var e3 = __privateMethod(this, _Boundary_instances, M_fn).call(this);
|
|
775
775
|
try {
|
|
776
776
|
__privateSet(this, __, branch(() => n2(e3)));
|
|
777
777
|
} catch (e4) {
|
|
778
778
|
this.error(e4);
|
|
779
779
|
}
|
|
780
|
-
return __privateGet(this, _$) > 0 ? __privateMethod(this, _Boundary_instances,
|
|
780
|
+
return __privateGet(this, _$) > 0 ? __privateMethod(this, _Boundary_instances, E_fn).call(this) : __privateSet(this, _n3, false), () => {
|
|
781
781
|
var _a2;
|
|
782
782
|
(_a2 = __privateGet(this, _y)) == null ? void 0 : _a2.remove();
|
|
783
783
|
};
|
|
@@ -800,7 +800,7 @@ class Boundary {
|
|
|
800
800
|
* @param {1 | -1} d
|
|
801
801
|
*/
|
|
802
802
|
update_pending_count(e2) {
|
|
803
|
-
__privateMethod(this, _Boundary_instances, P_fn).call(this, e2), __privateSet(this, _w, __privateGet(this, _w) + e2),
|
|
803
|
+
__privateMethod(this, _Boundary_instances, P_fn).call(this, e2), __privateSet(this, _w, __privateGet(this, _w) + e2), U.add(__privateGet(this, _S));
|
|
804
804
|
}
|
|
805
805
|
get_effect_pending() {
|
|
806
806
|
return __privateGet(this, _C).call(this), get$1(
|
|
@@ -834,7 +834,7 @@ class Boundary {
|
|
|
834
834
|
__privateSet(this, _m, null);
|
|
835
835
|
}), // we intentionally do not try to find the nearest pending boundary. If this boundary has one, we'll render it on reset
|
|
836
836
|
// but it would be really weird to show the parent's boundary on a child reset.
|
|
837
|
-
__privateSet(this, _n3, this.has_pending_snippet()), __privateSet(this, __, __privateMethod(this, _Boundary_instances, T_fn).call(this, () => (__privateSet(this, _x, false), branch(() => __privateGet(this, _h).call(this, __privateGet(this, _d2)))))), __privateGet(this, _$) > 0 ? __privateMethod(this, _Boundary_instances,
|
|
837
|
+
__privateSet(this, _n3, this.has_pending_snippet()), __privateSet(this, __, __privateMethod(this, _Boundary_instances, T_fn).call(this, () => (__privateSet(this, _x, false), branch(() => __privateGet(this, _h).call(this, __privateGet(this, _d2)))))), __privateGet(this, _$) > 0 ? __privateMethod(this, _Boundary_instances, E_fn).call(this) : __privateSet(this, _n3, false));
|
|
838
838
|
};
|
|
839
839
|
var o2 = ie;
|
|
840
840
|
try {
|
|
@@ -882,7 +882,7 @@ _k = new WeakMap();
|
|
|
882
882
|
_S = new WeakMap();
|
|
883
883
|
_C = new WeakMap();
|
|
884
884
|
_Boundary_instances = new WeakSet();
|
|
885
|
-
|
|
885
|
+
I_fn = function() {
|
|
886
886
|
try {
|
|
887
887
|
__privateSet(this, __, branch(() => __privateGet(this, _h).call(this, __privateGet(this, _d2))));
|
|
888
888
|
} catch (e2) {
|
|
@@ -890,11 +890,11 @@ E_fn = function() {
|
|
|
890
890
|
}
|
|
891
891
|
__privateSet(this, _n3, false);
|
|
892
892
|
};
|
|
893
|
-
|
|
893
|
+
O_fn = function() {
|
|
894
894
|
const e2 = __privateGet(this, _p).pending;
|
|
895
895
|
e2 && (__privateSet(this, _v, branch(() => e2(__privateGet(this, _d2)))), Batch.enqueue(() => {
|
|
896
|
-
var e3 = __privateMethod(this, _Boundary_instances,
|
|
897
|
-
__privateSet(this, __, __privateMethod(this, _Boundary_instances, T_fn).call(this, () => (Batch.ensure(), branch(() => __privateGet(this, _h).call(this, e3))))), __privateGet(this, _$) > 0 ? __privateMethod(this, _Boundary_instances,
|
|
896
|
+
var e3 = __privateMethod(this, _Boundary_instances, M_fn).call(this);
|
|
897
|
+
__privateSet(this, __, __privateMethod(this, _Boundary_instances, T_fn).call(this, () => (Batch.ensure(), branch(() => __privateGet(this, _h).call(this, e3))))), __privateGet(this, _$) > 0 ? __privateMethod(this, _Boundary_instances, E_fn).call(this) : (pause_effect(
|
|
898
898
|
/** @type {Effect} */
|
|
899
899
|
__privateGet(this, _v),
|
|
900
900
|
() => {
|
|
@@ -903,7 +903,7 @@ I_fn = function() {
|
|
|
903
903
|
), __privateSet(this, _n3, false));
|
|
904
904
|
}));
|
|
905
905
|
};
|
|
906
|
-
|
|
906
|
+
M_fn = function() {
|
|
907
907
|
var e2 = __privateGet(this, _d2);
|
|
908
908
|
return __privateGet(this, _n3) && (__privateSet(this, _y, create_text()), __privateGet(this, _d2).before(__privateGet(this, _y)), e2 = __privateGet(this, _y)), e2;
|
|
909
909
|
};
|
|
@@ -921,7 +921,7 @@ T_fn = function(e2) {
|
|
|
921
921
|
set_active_effect(t2), set_active_reaction(n2), set_component_context(s2);
|
|
922
922
|
}
|
|
923
923
|
};
|
|
924
|
-
|
|
924
|
+
E_fn = function() {
|
|
925
925
|
const e2 = (
|
|
926
926
|
/** @type {(anchor: Node) => void} */
|
|
927
927
|
__privateGet(this, _p).pending
|
|
@@ -1012,10 +1012,10 @@ function flatten(e2, t2, n2) {
|
|
|
1012
1012
|
l2.set(n4, t4);
|
|
1013
1013
|
}
|
|
1014
1014
|
const handler = (e5, t5 = void 0) => {
|
|
1015
|
-
if (n4.activate(), t5) t5 !== j && (o3.f |=
|
|
1015
|
+
if (n4.activate(), t5) t5 !== j && (o3.f |= O, // @ts-expect-error the error is the wrong type, but we don't care
|
|
1016
1016
|
internal_set(o3, t5));
|
|
1017
1017
|
else {
|
|
1018
|
-
0 !== (o3.f &
|
|
1018
|
+
0 !== (o3.f & O) && (o3.f ^= O), internal_set(o3, e5);
|
|
1019
1019
|
for (const [e6, t6] of l2) {
|
|
1020
1020
|
if (l2.delete(e6), e6 === n4) break;
|
|
1021
1021
|
t6.reject(j);
|
|
@@ -1125,7 +1125,7 @@ function update_derived(e2) {
|
|
|
1125
1125
|
var t2 = execute_derived(e2);
|
|
1126
1126
|
(e2.equals(t2) || // TODO can we avoid setting `derived.v` when `batch_values !== null`,
|
|
1127
1127
|
// without causing the value to be stale later?
|
|
1128
|
-
(e2.v = t2, e2.wv = increment_write_version()), se) || (null !==
|
|
1128
|
+
(e2.v = t2, e2.wv = increment_write_version()), se) || (null !== V ? V.set(e2, e2.v) : set_signal_status(e2, !ge && 0 === (e2.f & C) || null === e2.deps ? v : b));
|
|
1129
1129
|
}
|
|
1130
1130
|
const te = /* @__PURE__ */ new Map();
|
|
1131
1131
|
function source(e2, t2) {
|
|
@@ -1179,10 +1179,6 @@ function internal_set(e2, t2) {
|
|
|
1179
1179
|
}
|
|
1180
1180
|
return t2;
|
|
1181
1181
|
}
|
|
1182
|
-
function update(e2, t2 = 1) {
|
|
1183
|
-
var n2 = get$1(e2), s2 = 1 === t2 ? n2++ : n2--;
|
|
1184
|
-
return set(e2, n2), s2;
|
|
1185
|
-
}
|
|
1186
1182
|
function increment(e2) {
|
|
1187
1183
|
set(e2, e2.v + 1);
|
|
1188
1184
|
}
|
|
@@ -1192,7 +1188,7 @@ function mark_reactions(e2, t2) {
|
|
|
1192
1188
|
var a2 = n2[o2], l2 = a2.f;
|
|
1193
1189
|
if (s2 || a2 !== ae) {
|
|
1194
1190
|
var c2 = 0 === (l2 & m);
|
|
1195
|
-
c2 && set_signal_status(a2, t2), 2 & l2 ? 0 === (l2 &
|
|
1191
|
+
c2 && set_signal_status(a2, t2), 2 & l2 ? 0 === (l2 & E) && (a2.f |= E, mark_reactions(
|
|
1196
1192
|
/** @type {Derived} */
|
|
1197
1193
|
a2,
|
|
1198
1194
|
b
|
|
@@ -1286,7 +1282,7 @@ function is_dirty(e2) {
|
|
|
1286
1282
|
if (0 !== (t2 & b)) {
|
|
1287
1283
|
var n2 = e2.deps, s2 = 0 !== (t2 & C);
|
|
1288
1284
|
if (2 & t2 && (e2.f &= -32769), null !== n2) {
|
|
1289
|
-
var i2, o2, a2 = 0 !== (t2 &
|
|
1285
|
+
var i2, o2, a2 = 0 !== (t2 & M), l2 = s2 && null !== ae && !ge, c2 = n2.length;
|
|
1290
1286
|
if ((a2 || l2) && (null === ae || 0 === (ae.f & w))) {
|
|
1291
1287
|
var u2 = (
|
|
1292
1288
|
/** @type {Derived} */
|
|
@@ -1296,7 +1292,7 @@ function is_dirty(e2) {
|
|
|
1296
1292
|
// previously disconnected, however we don't if it was unowned as we
|
|
1297
1293
|
// de-duplicate dependencies in that case
|
|
1298
1294
|
!a2 && ((_a2 = o2 == null ? void 0 : o2.reactions) == null ? void 0 : _a2.includes(u2)) || (o2.reactions ?? (o2.reactions = [])).push(u2);
|
|
1299
|
-
a2 && (u2.f ^=
|
|
1295
|
+
a2 && (u2.f ^= M), // If the unowned derived is now fully connected to the graph again (it's unowned and reconnected, has a parent
|
|
1300
1296
|
// and the parent is not unowned), then we can mark it as connected again, removing the need for the unowned
|
|
1301
1297
|
// flag
|
|
1302
1298
|
l2 && null !== d2 && 0 === (d2.f & C) && (u2.f ^= C);
|
|
@@ -1333,7 +1329,7 @@ function update_reaction(e2) {
|
|
|
1333
1329
|
e2.ac.abort(j);
|
|
1334
1330
|
}), e2.ac = null);
|
|
1335
1331
|
try {
|
|
1336
|
-
e2.f |=
|
|
1332
|
+
e2.f |= I;
|
|
1337
1333
|
var f2 = (0, /** @type {Function} */
|
|
1338
1334
|
e2.fn)(), p2 = e2.deps;
|
|
1339
1335
|
if (null !== ce) {
|
|
@@ -1351,11 +1347,11 @@ function update_reaction(e2) {
|
|
|
1351
1347
|
e2
|
|
1352
1348
|
);
|
|
1353
1349
|
return null !== i2 && i2 !== e2 && (pe++, null !== de && (null === s2 ? s2 = de : s2.push(.../** @type {Source[]} */
|
|
1354
|
-
de))), 0 !== (e2.f &
|
|
1350
|
+
de))), 0 !== (e2.f & O) && (e2.f ^= O), f2;
|
|
1355
1351
|
} catch (e3) {
|
|
1356
1352
|
return handle_error(e3);
|
|
1357
1353
|
} finally {
|
|
1358
|
-
e2.f ^=
|
|
1354
|
+
e2.f ^= I, ce = t2, ue = n2, de = s2, ie = i2, ge = o2, le = a2, set_component_context(l2), oe = c2, he = u2;
|
|
1359
1355
|
}
|
|
1360
1356
|
}
|
|
1361
1357
|
function remove_reaction(e2, t2) {
|
|
@@ -1375,7 +1371,7 @@ function remove_reaction(e2, t2) {
|
|
|
1375
1371
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1376
1372
|
(null === ce || !ce.includes(t2)) && (set_signal_status(t2, b), // If we are working with a derived that is owned by an effect, then mark it as being
|
|
1377
1373
|
// disconnected.
|
|
1378
|
-
768 & t2.f || (t2.f ^=
|
|
1374
|
+
768 & t2.f || (t2.f ^= M), // Disconnect any reactions owned by this reaction
|
|
1379
1375
|
destroy_derived_effects(
|
|
1380
1376
|
/** @type {Derived} **/
|
|
1381
1377
|
t2
|
|
@@ -1450,7 +1446,7 @@ function get$1(e2) {
|
|
|
1450
1446
|
}
|
|
1451
1447
|
} else if (!(null !== ae && 0 !== (ae.f & w)) && !(le == null ? void 0 : le.includes(e2))) {
|
|
1452
1448
|
var i2 = ie.deps;
|
|
1453
|
-
if (0 !== (ie.f &
|
|
1449
|
+
if (0 !== (ie.f & I))
|
|
1454
1450
|
e2.rv < pe && (e2.rv = pe, // If the signal is accessing the same dependencies in the same
|
|
1455
1451
|
// order as it did last time, increment `skipped_deps`
|
|
1456
1452
|
// rather than updating `new_deps`, which creates GC cost
|
|
@@ -1473,11 +1469,11 @@ function get$1(e2) {
|
|
|
1473
1469
|
}
|
|
1474
1470
|
} else if (t2) {
|
|
1475
1471
|
if (n2 = /** @type {Derived} */
|
|
1476
|
-
e2,
|
|
1472
|
+
e2, V == null ? void 0 : V.has(n2)) return V.get(n2);
|
|
1477
1473
|
is_dirty(n2) && update_derived(n2);
|
|
1478
1474
|
}
|
|
1479
|
-
if (
|
|
1480
|
-
if (0 !== (e2.f &
|
|
1475
|
+
if (V == null ? void 0 : V.has(e2)) return V.get(e2);
|
|
1476
|
+
if (0 !== (e2.f & O)) throw e2.v;
|
|
1481
1477
|
return e2.v;
|
|
1482
1478
|
}
|
|
1483
1479
|
function depends_on_old_values(e2) {
|
|
@@ -1504,15 +1500,6 @@ const _e = -7169;
|
|
|
1504
1500
|
function set_signal_status(e2, t2) {
|
|
1505
1501
|
e2.f = e2.f & _e | t2;
|
|
1506
1502
|
}
|
|
1507
|
-
function deep_read_state(e2) {
|
|
1508
|
-
if ("object" == typeof e2 && e2 && !(e2 instanceof EventTarget)) {
|
|
1509
|
-
if (T in e2) deep_read(e2);
|
|
1510
|
-
else if (!Array.isArray(e2)) for (let t2 in e2) {
|
|
1511
|
-
const n2 = e2[t2];
|
|
1512
|
-
"object" == typeof n2 && n2 && T in n2 && deep_read(n2);
|
|
1513
|
-
}
|
|
1514
|
-
}
|
|
1515
|
-
}
|
|
1516
1503
|
function deep_read(e2, t2 = /* @__PURE__ */ new Set()) {
|
|
1517
1504
|
if (!("object" != typeof e2 || null === e2 || e2 instanceof EventTarget || t2.has(e2))) {
|
|
1518
1505
|
t2.add(e2), // When working with a possible SvelteDate, this
|
|
@@ -2175,12 +2162,12 @@ function each(e2, t2, s2, o2, a2, l2 = null) {
|
|
|
2175
2162
|
if (m2 && update_item(g3, p3, _3, l3), 0 !== (g3.e.f & y) && (resume_effect(g3.e), v2 && ((_b3 = g3.a) == null ? void 0 : _b3.unfix(), (f3 ?? (f3 = /* @__PURE__ */ new Set())).delete(g3))), g3 !== x2) {
|
|
2176
2163
|
if (void 0 !== d3 && d3.has(g3)) {
|
|
2177
2164
|
if (S2.length < C2.length) {
|
|
2178
|
-
var
|
|
2179
|
-
k2 =
|
|
2180
|
-
var
|
|
2181
|
-
for (
|
|
2182
|
-
for (
|
|
2183
|
-
link(n2,
|
|
2165
|
+
var M2, E2 = C2[0];
|
|
2166
|
+
k2 = E2.prev;
|
|
2167
|
+
var I2 = S2[0], O2 = S2[S2.length - 1];
|
|
2168
|
+
for (M2 = 0; M2 < S2.length; M2 += 1) move(S2[M2], E2, o3);
|
|
2169
|
+
for (M2 = 0; M2 < C2.length; M2 += 1) d3.delete(C2[M2]);
|
|
2170
|
+
link(n2, I2.prev, O2.next), link(n2, k2, I2), link(n2, O2, E2), x2 = E2, k2 = O2, _3 -= 1, S2 = [], C2 = [];
|
|
2184
2171
|
} else
|
|
2185
2172
|
d3.delete(g3), move(g3, x2, o3), link(n2, g3.prev, g3.next), link(n2, g3, null === k2 ? n2.first : k2.next), link(n2, k2, g3), k2 = g3;
|
|
2186
2173
|
continue;
|
|
@@ -2317,11 +2304,6 @@ function move(e2, t2, n2) {
|
|
|
2317
2304
|
function link(e2, t2, n2) {
|
|
2318
2305
|
null === t2 ? e2.first = n2 : (t2.next = n2, t2.e.next = n2 && n2.e), null !== n2 && (n2.prev = t2, n2.e.prev = t2 && t2.e);
|
|
2319
2306
|
}
|
|
2320
|
-
function slot(e2, t2, n2, s2, i2) {
|
|
2321
|
-
var _a2;
|
|
2322
|
-
var o2 = (_a2 = t2.$$slots) == null ? void 0 : _a2[n2], a2 = false;
|
|
2323
|
-
true === o2 && (o2 = t2.children, a2 = true), void 0 === o2 || o2(e2, a2 ? () => s2 : s2);
|
|
2324
|
-
}
|
|
2325
2307
|
function snippet(e2, t2, ...n2) {
|
|
2326
2308
|
var s2 = new BranchManager(e2);
|
|
2327
2309
|
block(() => {
|
|
@@ -2362,7 +2344,7 @@ function clsx(e2) {
|
|
|
2362
2344
|
return s2;
|
|
2363
2345
|
})(e2) : e2 ?? "";
|
|
2364
2346
|
}
|
|
2365
|
-
const
|
|
2347
|
+
const Me = [..." \n\r\f \v\uFEFF"];
|
|
2366
2348
|
function append_styles(e2, t2 = false) {
|
|
2367
2349
|
var n2 = t2 ? " !important;" : ";", s2 = "";
|
|
2368
2350
|
for (var i2 in e2) {
|
|
@@ -2383,7 +2365,7 @@ function set_class(e2, t2, n2, s2, i2, o2) {
|
|
|
2383
2365
|
for (var i3 in n3) if (n3[i3]) s3 = s3 ? s3 + " " + i3 : i3;
|
|
2384
2366
|
else if (s3.length) for (var o3 = i3.length, a3 = 0; (a3 = s3.indexOf(i3, a3)) >= 0; ) {
|
|
2385
2367
|
var l3 = a3 + o3;
|
|
2386
|
-
0 !== a3 && !
|
|
2368
|
+
0 !== a3 && !Me.includes(s3[a3 - 1]) || l3 !== s3.length && !Me.includes(s3[l3]) ? a3 = l3 : s3 = (0 === a3 ? "" : s3.substring(0, a3)) + s3.substring(l3 + 1);
|
|
2387
2369
|
}
|
|
2388
2370
|
}
|
|
2389
2371
|
return "" === s3 ? null : s3;
|
|
@@ -2453,7 +2435,7 @@ function select_option(e2, t2, s2 = false) {
|
|
|
2453
2435
|
function get_option_value(e2) {
|
|
2454
2436
|
return "__value" in e2 ? e2.__value : e2.value;
|
|
2455
2437
|
}
|
|
2456
|
-
const
|
|
2438
|
+
const Ee = Symbol("class"), Ie = Symbol("style"), Oe = Symbol("is custom element"), Te = Symbol("is html");
|
|
2457
2439
|
function set_selected(e2, t2) {
|
|
2458
2440
|
t2 ? (
|
|
2459
2441
|
// The selected option could've changed via user selection, and
|
|
@@ -2474,9 +2456,9 @@ function attribute_effect(e2, t2, n2 = [], s2 = [], i2, o2 = false, a2 = false)
|
|
|
2474
2456
|
var s3 = void 0, l2 = {}, c2 = "SELECT" === e2.nodeName, u2 = false;
|
|
2475
2457
|
if (block(() => {
|
|
2476
2458
|
var d3 = t2(...n3.map(get$1)), f2 = (function set_attributes(e3, t3, n4, s4, i3 = false, o3 = false) {
|
|
2477
|
-
var a3 = get_attributes(e3), l3 = a3[
|
|
2459
|
+
var a3 = get_attributes(e3), l3 = a3[Oe], c3 = !a3[Te], u3 = t3 || {}, d4 = "OPTION" === e3.tagName;
|
|
2478
2460
|
for (var f3 in t3) f3 in n4 || (n4[f3] = null);
|
|
2479
|
-
n4.class ? n4.class = clsx(n4.class) : (s4 || n4[
|
|
2461
|
+
n4.class ? n4.class = clsx(n4.class) : (s4 || n4[Ee]) && (n4.class = null), n4[Ie] && (n4.style ?? (n4.style = null));
|
|
2480
2462
|
var p3 = get_setters(e3);
|
|
2481
2463
|
for (const b2 in n4) {
|
|
2482
2464
|
let y2 = n4[b2];
|
|
@@ -2537,16 +2519,16 @@ function attribute_effect(e2, t2, n2 = [], s2 = [], i2, o2 = false, a2 = false)
|
|
|
2537
2519
|
k2.removeAttribute(v2), k2.defaultValue = C2, // @ts-ignore
|
|
2538
2520
|
k2.value = k2.__value = S2 ? C2 : null;
|
|
2539
2521
|
} else {
|
|
2540
|
-
let
|
|
2541
|
-
k2.removeAttribute(v2), k2.defaultChecked =
|
|
2522
|
+
let M2 = k2.defaultChecked;
|
|
2523
|
+
k2.removeAttribute(v2), k2.defaultChecked = M2, k2.checked = !!S2 && M2;
|
|
2542
2524
|
}
|
|
2543
2525
|
} else e3.removeAttribute(b2);
|
|
2544
2526
|
}
|
|
2545
2527
|
else
|
|
2546
2528
|
e3.value = e3.__value = y2;
|
|
2547
2529
|
}
|
|
2548
|
-
} else set_style(e3, y2, t3 == null ? void 0 : t3[
|
|
2549
|
-
else set_class(e3, "http://www.w3.org/1999/xhtml" === e3.namespaceURI, y2, s4, t3 == null ? void 0 : t3[
|
|
2530
|
+
} else set_style(e3, y2, t3 == null ? void 0 : t3[Ie], n4[Ie]), u3[b2] = y2, u3[Ie] = n4[Ie];
|
|
2531
|
+
else set_class(e3, "http://www.w3.org/1999/xhtml" === e3.namespaceURI, y2, s4, t3 == null ? void 0 : t3[Ee], n4[Ee]), u3[b2] = y2, u3[Ee] = n4[Ee];
|
|
2550
2532
|
}
|
|
2551
2533
|
return u3;
|
|
2552
2534
|
})(e2, s3, d3, i2, o2, a2);
|
|
@@ -2597,7 +2579,7 @@ function attribute_effect(e2, t2, n2 = [], s2 = [], i2, o2 = false, a2 = false)
|
|
|
2597
2579
|
}
|
|
2598
2580
|
function get_attributes(e2) {
|
|
2599
2581
|
return e2.__attributes ?? (e2.__attributes = {
|
|
2600
|
-
[
|
|
2582
|
+
[Oe]: e2.nodeName.includes("-"),
|
|
2601
2583
|
[Te]: "http://www.w3.org/1999/xhtml" === e2.namespaceURI
|
|
2602
2584
|
});
|
|
2603
2585
|
}
|
|
@@ -2878,7 +2860,15 @@ function init(e2 = false) {
|
|
|
2878
2860
|
W
|
|
2879
2861
|
), n2 = t2.l.u;
|
|
2880
2862
|
if (!n2) return;
|
|
2881
|
-
let props = () => deep_read_state(
|
|
2863
|
+
let props = () => (function deep_read_state(e3) {
|
|
2864
|
+
if ("object" == typeof e3 && e3 && !(e3 instanceof EventTarget)) {
|
|
2865
|
+
if (T in e3) deep_read(e3);
|
|
2866
|
+
else if (!Array.isArray(e3)) for (let t3 in e3) {
|
|
2867
|
+
const n3 = e3[t3];
|
|
2868
|
+
"object" == typeof n3 && n3 && T in n3 && deep_read(n3);
|
|
2869
|
+
}
|
|
2870
|
+
}
|
|
2871
|
+
})(t2.s);
|
|
2882
2872
|
if (e2) {
|
|
2883
2873
|
let e3 = 0, n3 = (
|
|
2884
2874
|
/** @type {Record<string, any>} */
|
|
@@ -2962,62 +2952,14 @@ const We = {
|
|
|
2962
2952
|
has: (e2, t2) => !e2.exclude.includes(t2) && t2 in e2.props,
|
|
2963
2953
|
ownKeys: (e2) => Reflect.ownKeys(e2.props).filter((t2) => !e2.exclude.includes(t2))
|
|
2964
2954
|
};
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
if (!e2.exclude.includes(t2)) return get$1(e2.version), t2 in e2.special ? e2.special[t2]() : e2.props[t2];
|
|
2968
|
-
},
|
|
2969
|
-
set(e2, t2, n2) {
|
|
2970
|
-
if (!(t2 in e2.special)) {
|
|
2971
|
-
var s2 = ae;
|
|
2972
|
-
try {
|
|
2973
|
-
set_active_effect(e2.parent_effect), // Handle props that can temporarily get out of sync with the parent
|
|
2974
|
-
/** @type {Record<string, (v?: unknown) => unknown>} */
|
|
2975
|
-
e2.special[t2] = prop(
|
|
2976
|
-
{
|
|
2977
|
-
get [t2]() {
|
|
2978
|
-
return e2.props[t2];
|
|
2979
|
-
}
|
|
2980
|
-
},
|
|
2981
|
-
/** @type {string} */
|
|
2982
|
-
t2,
|
|
2983
|
-
4
|
|
2984
|
-
);
|
|
2985
|
-
} finally {
|
|
2986
|
-
set_active_effect(s2);
|
|
2987
|
-
}
|
|
2988
|
-
}
|
|
2989
|
-
return e2.special[t2](n2), update(e2.version), true;
|
|
2990
|
-
},
|
|
2991
|
-
getOwnPropertyDescriptor(e2, t2) {
|
|
2992
|
-
if (!e2.exclude.includes(t2)) return t2 in e2.props ? {
|
|
2993
|
-
enumerable: true,
|
|
2994
|
-
configurable: true,
|
|
2995
|
-
value: e2.props[t2]
|
|
2996
|
-
} : void 0;
|
|
2997
|
-
},
|
|
2998
|
-
deleteProperty: (e2, t2) => (
|
|
2999
|
-
// Svelte 4 allowed for deletions on $$restProps
|
|
3000
|
-
(e2.exclude.includes(t2) || (e2.exclude.push(t2), update(e2.version)), true)
|
|
3001
|
-
),
|
|
3002
|
-
has: (e2, t2) => !e2.exclude.includes(t2) && t2 in e2.props,
|
|
3003
|
-
ownKeys: (e2) => Reflect.ownKeys(e2.props).filter((t2) => !e2.exclude.includes(t2))
|
|
3004
|
-
};
|
|
3005
|
-
function legacy_rest_props(e2, t2) {
|
|
2955
|
+
// @__NO_SIDE_EFFECTS__
|
|
2956
|
+
function rest_props(e2, t2, n2) {
|
|
3006
2957
|
return new Proxy({
|
|
3007
2958
|
props: e2,
|
|
3008
|
-
exclude: t2
|
|
3009
|
-
|
|
3010
|
-
version: source(0),
|
|
3011
|
-
// TODO this is only necessary because we need to track component
|
|
3012
|
-
// destruction inside `prop`, because of `bind:this`, but it
|
|
3013
|
-
// seems likely that we can simplify `bind:this` instead
|
|
3014
|
-
parent_effect: (
|
|
3015
|
-
/** @type {Effect} */
|
|
3016
|
-
ae
|
|
3017
|
-
)
|
|
3018
|
-
}, Be);
|
|
2959
|
+
exclude: t2
|
|
2960
|
+
}, We);
|
|
3019
2961
|
}
|
|
3020
|
-
const
|
|
2962
|
+
const Be = {
|
|
3021
2963
|
get(e2, t2) {
|
|
3022
2964
|
let n2 = e2.props.length;
|
|
3023
2965
|
for (; n2--; ) {
|
|
@@ -3065,7 +3007,7 @@ const Ne = {
|
|
|
3065
3007
|
function spread_props(...e2) {
|
|
3066
3008
|
return new Proxy({
|
|
3067
3009
|
props: e2
|
|
3068
|
-
},
|
|
3010
|
+
}, Be);
|
|
3069
3011
|
}
|
|
3070
3012
|
function prop(e2, t2, n2, s2) {
|
|
3071
3013
|
var _a2;
|
|
@@ -3174,21 +3116,21 @@ function subscribe_to_store(e2, t2, n2) {
|
|
|
3174
3116
|
));
|
|
3175
3117
|
return s2.unsubscribe ? () => s2.unsubscribe() : s2;
|
|
3176
3118
|
}
|
|
3177
|
-
const
|
|
3119
|
+
const Ne = [];
|
|
3178
3120
|
function writable(e2, t2 = noop) {
|
|
3179
3121
|
let n2 = null;
|
|
3180
3122
|
const s2 = /* @__PURE__ */ new Set();
|
|
3181
3123
|
function set2(t3) {
|
|
3182
3124
|
if (safe_not_equal(e2, t3) && (e2 = t3, n2)) {
|
|
3183
|
-
const t4 = !
|
|
3184
|
-
for (const t5 of s2) t5[1](),
|
|
3125
|
+
const t4 = !Ne.length;
|
|
3126
|
+
for (const t5 of s2) t5[1](), Ne.push(t5, e2);
|
|
3185
3127
|
if (t4) {
|
|
3186
|
-
for (let e3 = 0; e3 <
|
|
3187
|
-
|
|
3128
|
+
for (let e3 = 0; e3 < Ne.length; e3 += 2) Ne[e3][0](Ne[e3 + 1]);
|
|
3129
|
+
Ne.length = 0;
|
|
3188
3130
|
}
|
|
3189
3131
|
}
|
|
3190
3132
|
}
|
|
3191
|
-
function
|
|
3133
|
+
function update(t3) {
|
|
3192
3134
|
set2(t3(
|
|
3193
3135
|
/** @type {T} */
|
|
3194
3136
|
e2
|
|
@@ -3196,10 +3138,10 @@ function writable(e2, t2 = noop) {
|
|
|
3196
3138
|
}
|
|
3197
3139
|
return {
|
|
3198
3140
|
set: set2,
|
|
3199
|
-
update
|
|
3141
|
+
update,
|
|
3200
3142
|
subscribe: function subscribe(i2, o2 = noop) {
|
|
3201
3143
|
const a2 = [i2, o2];
|
|
3202
|
-
return s2.add(a2), 1 === s2.size && (n2 = t2(set2,
|
|
3144
|
+
return s2.add(a2), 1 === s2.size && (n2 = t2(set2, update) || noop), i2(
|
|
3203
3145
|
/** @type {T} */
|
|
3204
3146
|
e2
|
|
3205
3147
|
), () => {
|
|
@@ -3214,18 +3156,18 @@ function get(e2) {
|
|
|
3214
3156
|
}
|
|
3215
3157
|
"undefined" != typeof window && // @ts-expect-error
|
|
3216
3158
|
((_a = window.__svelte ?? (window.__svelte = {})).v ?? (_a.v = /* @__PURE__ */ new Set())).add("5");
|
|
3217
|
-
const
|
|
3218
|
-
var
|
|
3159
|
+
const qe = Array(12).fill(0);
|
|
3160
|
+
var ze = /* @__PURE__ */ from_html('<div class="sonner-loading-bar"></div>'), Re = /* @__PURE__ */ from_html('<div><div class="sonner-spinner"></div></div>');
|
|
3219
3161
|
function cn(...e2) {
|
|
3220
3162
|
return e2.filter(Boolean).join(" ");
|
|
3221
3163
|
}
|
|
3222
|
-
const
|
|
3164
|
+
const Ge = "undefined" != typeof document, Fe = "undefined" != typeof window ? window : void 0;
|
|
3223
3165
|
new /* active-element.svelte.js generated by Svelte v5.41.4 */
|
|
3224
3166
|
(_b = class {
|
|
3225
3167
|
constructor(e2 = {}) {
|
|
3226
3168
|
__privateAdd(this, _z);
|
|
3227
3169
|
__privateAdd(this, _R);
|
|
3228
|
-
const { window: t2 =
|
|
3170
|
+
const { window: t2 = Fe, document: n2 = t2 == null ? void 0 : t2.document } = e2;
|
|
3229
3171
|
void 0 !== t2 && (__privateSet(this, _z, n2), __privateSet(this, _R, createSubscriber((e3) => {
|
|
3230
3172
|
const n3 = on(t2, "focusin", e3), s2 = on(t2, "focusout", e3);
|
|
3231
3173
|
return () => {
|
|
@@ -3257,7 +3199,7 @@ new /* active-element.svelte.js generated by Svelte v5.41.4 */
|
|
|
3257
3199
|
) : null;
|
|
3258
3200
|
}
|
|
3259
3201
|
}, _z = new WeakMap(), _R = new WeakMap(), _b)();
|
|
3260
|
-
const
|
|
3202
|
+
const He = new (_c = class {
|
|
3261
3203
|
/**
|
|
3262
3204
|
* @param name The name of the context.
|
|
3263
3205
|
* This is used for generating the context key and error messages.
|
|
@@ -3319,17 +3261,17 @@ const Ye = new (_c = class {
|
|
|
3319
3261
|
})(__privateGet(this, _F), e2);
|
|
3320
3262
|
}
|
|
3321
3263
|
}, _G = new WeakMap(), _F = new WeakMap(), _c)("<Toaster/>");
|
|
3322
|
-
let
|
|
3264
|
+
let Ye = 0;
|
|
3323
3265
|
const Ve = new (_d = class {
|
|
3324
3266
|
constructor() {
|
|
3325
3267
|
__privateAdd(this, _H, /* @__PURE__ */ state(proxy([])));
|
|
3326
3268
|
__privateAdd(this, _Y, /* @__PURE__ */ state(proxy([])));
|
|
3327
|
-
__privateAdd(this,
|
|
3269
|
+
__privateAdd(this, _V, (e2) => {
|
|
3328
3270
|
const t2 = this.toasts.findIndex((t3) => t3.id === e2);
|
|
3329
3271
|
return -1 === t2 ? null : t2;
|
|
3330
3272
|
});
|
|
3331
3273
|
__publicField(this, "addToast", (e2) => {
|
|
3332
|
-
|
|
3274
|
+
Ge && this.toasts.unshift(e2);
|
|
3333
3275
|
});
|
|
3334
3276
|
__publicField(this, "updateToast", ({ id: e2, data: t2, type: n2, message: s2 }) => {
|
|
3335
3277
|
const i2 = this.toasts.findIndex((t3) => t3.id === e2), o2 = this.toasts[i2];
|
|
@@ -3344,7 +3286,7 @@ const Ve = new (_d = class {
|
|
|
3344
3286
|
});
|
|
3345
3287
|
__publicField(this, "create", (e2) => {
|
|
3346
3288
|
var _a2;
|
|
3347
|
-
const { message: t2, ...n2 } = e2, s2 = "number" == typeof (e2 == null ? void 0 : e2.id) || e2.id && ((_a2 = e2.id) == null ? void 0 : _a2.length) > 0 ? e2.id :
|
|
3289
|
+
const { message: t2, ...n2 } = e2, s2 = "number" == typeof (e2 == null ? void 0 : e2.id) || e2.id && ((_a2 = e2.id) == null ? void 0 : _a2.length) > 0 ? e2.id : Ye++, i2 = void 0 === e2.dismissable || e2.dismissable, o2 = void 0 === e2.type ? "default" : e2.type;
|
|
3348
3290
|
return untrack(() => {
|
|
3349
3291
|
const a2 = this.toasts.find((e3) => e3.id === s2);
|
|
3350
3292
|
a2 ? this.updateToast({
|
|
@@ -3377,7 +3319,7 @@ const Ve = new (_d = class {
|
|
|
3377
3319
|
__publicField(this, "remove", (e2) => {
|
|
3378
3320
|
if (void 0 === e2)
|
|
3379
3321
|
return void (this.toasts = []);
|
|
3380
|
-
const t2 = __privateGet(this,
|
|
3322
|
+
const t2 = __privateGet(this, _V).call(this, e2);
|
|
3381
3323
|
return null !== t2 ? (this.toasts.splice(t2, 1), e2) : void 0;
|
|
3382
3324
|
});
|
|
3383
3325
|
__publicField(this, "message", (e2, t2) => this.create({
|
|
@@ -3460,7 +3402,7 @@ const Ve = new (_d = class {
|
|
|
3460
3402
|
}), n2;
|
|
3461
3403
|
});
|
|
3462
3404
|
__publicField(this, "custom", (e2, t2) => {
|
|
3463
|
-
const n2 = (t2 == null ? void 0 : t2.id) ||
|
|
3405
|
+
const n2 = (t2 == null ? void 0 : t2.id) || Ye++;
|
|
3464
3406
|
return this.create({
|
|
3465
3407
|
component: e2,
|
|
3466
3408
|
id: n2,
|
|
@@ -3471,7 +3413,7 @@ const Ve = new (_d = class {
|
|
|
3471
3413
|
this.heights = this.heights.filter((t2) => t2.toastId !== e2);
|
|
3472
3414
|
});
|
|
3473
3415
|
__publicField(this, "setHeight", (e2) => {
|
|
3474
|
-
const t2 = __privateGet(this,
|
|
3416
|
+
const t2 = __privateGet(this, _V).call(this, e2.toastId);
|
|
3475
3417
|
null !== t2 ? this.heights[t2] = e2 : this.heights.push(e2);
|
|
3476
3418
|
});
|
|
3477
3419
|
__publicField(this, "reset", () => {
|
|
@@ -3490,25 +3432,25 @@ const Ve = new (_d = class {
|
|
|
3490
3432
|
set heights(e2) {
|
|
3491
3433
|
set(__privateGet(this, _Y), e2, true);
|
|
3492
3434
|
}
|
|
3493
|
-
}, _H = new WeakMap(), _Y = new WeakMap(),
|
|
3435
|
+
}, _H = new WeakMap(), _Y = new WeakMap(), _V = new WeakMap(), _d)();
|
|
3494
3436
|
class SonnerState {
|
|
3495
3437
|
constructor() {
|
|
3496
3438
|
/**
|
|
3497
3439
|
* A derived state of the toasts that are not dismissed.
|
|
3498
3440
|
*/
|
|
3499
|
-
__privateAdd(this,
|
|
3441
|
+
__privateAdd(this, _U, user_derived(() => Ve.toasts.filter((e2) => !e2.dismiss)));
|
|
3500
3442
|
}
|
|
3501
3443
|
get toasts() {
|
|
3502
|
-
return get$1(__privateGet(this,
|
|
3444
|
+
return get$1(__privateGet(this, _U));
|
|
3503
3445
|
}
|
|
3504
3446
|
}
|
|
3505
|
-
|
|
3506
|
-
const
|
|
3447
|
+
_U = new WeakMap();
|
|
3448
|
+
const Ue = function toastFunction(e2, t2) {
|
|
3507
3449
|
return Ve.create({
|
|
3508
3450
|
message: e2,
|
|
3509
3451
|
...t2
|
|
3510
3452
|
});
|
|
3511
|
-
},
|
|
3453
|
+
}, Ke = Object.assign(Ue, {
|
|
3512
3454
|
success: Ve.success,
|
|
3513
3455
|
info: Ve.info,
|
|
3514
3456
|
warning: Ve.warning,
|
|
@@ -3523,7 +3465,7 @@ const Ke = function toastFunction(e2, t2) {
|
|
|
3523
3465
|
function isAction(e2) {
|
|
3524
3466
|
return void 0 !== e2.label;
|
|
3525
3467
|
}
|
|
3526
|
-
const
|
|
3468
|
+
const Xe = {
|
|
3527
3469
|
toast: "",
|
|
3528
3470
|
title: "",
|
|
3529
3471
|
description: "",
|
|
@@ -3542,7 +3484,7 @@ const Ze = {
|
|
|
3542
3484
|
function getDampening(e2) {
|
|
3543
3485
|
return 1 / (1.5 + Math.abs(e2) / 20);
|
|
3544
3486
|
}
|
|
3545
|
-
var
|
|
3487
|
+
var Ze = /* @__PURE__ */ from_html("<div><!></div>"), on_click$4 = (
|
|
3546
3488
|
// height index is used to calculate the offset as it gets updated before the toast array, which means we can calculate the new layout faster.
|
|
3547
3489
|
// use scaledRectHeight as it's more precise
|
|
3548
3490
|
// toast was transitioning its scale, so scaledRectHeight isn't accurate
|
|
@@ -3568,18 +3510,18 @@ var Je = /* @__PURE__ */ from_html("<div><!></div>"), on_click$4 = (
|
|
|
3568
3510
|
var _a2, _b3;
|
|
3569
3511
|
!get$1(t2) && get$1(n2) && (s2(), (_b3 = (_a2 = i2.toast).onDismiss) == null ? void 0 : _b3.call(_a2, i2.toast));
|
|
3570
3512
|
}
|
|
3571
|
-
),
|
|
3513
|
+
), Je = /* @__PURE__ */ from_html('<button data-close-button=""><!></button>'), Qe = /* @__PURE__ */ from_html('<div data-icon=""><!> <!></div>'), et = /* @__PURE__ */ from_html('<div data-description=""><!></div>'), on_click_1$2 = (e2, t2, n2, s2) => {
|
|
3572
3514
|
var _a2, _b3;
|
|
3573
3515
|
isAction(t2.toast.cancel) && get$1(n2) && ((_b3 = (_a2 = t2.toast.cancel) == null ? void 0 : _a2.onClick) == null ? void 0 : _b3.call(_a2, e2), s2());
|
|
3574
|
-
},
|
|
3516
|
+
}, tt = /* @__PURE__ */ from_html('<button data-button="" data-cancel=""> </button>'), on_click_2 = (e2, t2, n2) => {
|
|
3575
3517
|
var _a2;
|
|
3576
3518
|
isAction(t2.toast.action) && ((_a2 = t2.toast.action) == null ? void 0 : _a2.onClick(e2), e2.defaultPrevented || n2());
|
|
3577
|
-
},
|
|
3519
|
+
}, nt = /* @__PURE__ */ from_html('<button data-button=""> </button>'), rt = /* @__PURE__ */ from_html('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>', 1), st = /* @__PURE__ */ from_html('<li data-sonner-toast=""><!> <!></li>');
|
|
3578
3520
|
function Toast(e2, t2) {
|
|
3579
3521
|
push(t2, true);
|
|
3580
3522
|
const LoadingIcon = (e3) => {
|
|
3581
3523
|
var n3 = comment(), s3 = first_child(n3), consequent = (e4) => {
|
|
3582
|
-
var n4 =
|
|
3524
|
+
var n4 = Ze();
|
|
3583
3525
|
snippet(child(n4), () => t2.loadingIcon), template_effect((e5) => {
|
|
3584
3526
|
set_class(n4, 1, e5), set_attribute(n4, "data-visible", "loading" === get$1($2));
|
|
3585
3527
|
}, [() => {
|
|
@@ -3594,9 +3536,9 @@ function Toast(e2, t2) {
|
|
|
3594
3536
|
}), s4 = user_derived(() => "loading" === get$1($2));
|
|
3595
3537
|
!(function Loader(e5, t3) {
|
|
3596
3538
|
push(t3, true);
|
|
3597
|
-
var n5 =
|
|
3598
|
-
each(child(n5), 23, () =>
|
|
3599
|
-
append(e6,
|
|
3539
|
+
var n5 = Re();
|
|
3540
|
+
each(child(n5), 23, () => qe, (e6, t4) => `spinner-bar-${t4}`, (e6, t4) => {
|
|
3541
|
+
append(e6, ze());
|
|
3600
3542
|
}), template_effect((e6) => {
|
|
3601
3543
|
set_class(n5, 1, e6), set_attribute(n5, "data-visible", t3.visible);
|
|
3602
3544
|
}, [() => clsx(["sonner-loading-wrapper", t3.class].filter(Boolean).join(" "))]), append(e5, n5), pop();
|
|
@@ -3616,12 +3558,12 @@ function Toast(e2, t2) {
|
|
|
3616
3558
|
};
|
|
3617
3559
|
let n2 = prop(t2, "cancelButtonStyle", 3, ""), s2 = prop(t2, "actionButtonStyle", 3, ""), i2 = prop(t2, "descriptionClass", 3, ""), o2 = prop(t2, "unstyled", 3, false), a2 = prop(t2, "defaultRichColors", 3, false);
|
|
3618
3560
|
const l2 = {
|
|
3619
|
-
...
|
|
3561
|
+
...Xe
|
|
3620
3562
|
};
|
|
3621
3563
|
let c2 = /* @__PURE__ */ state(false), u2 = /* @__PURE__ */ state(false), d2 = /* @__PURE__ */ state(false), f2 = /* @__PURE__ */ state(false), p2 = /* @__PURE__ */ state(false), h2 = /* @__PURE__ */ state(0), g2 = /* @__PURE__ */ state(0), _2 = t2.toast.duration || t2.duration || 4e3, v2 = /* @__PURE__ */ state(void 0), m2 = /* @__PURE__ */ state(null), b2 = /* @__PURE__ */ state(null);
|
|
3622
|
-
const y2 = user_derived(() => 0 === t2.index), w2 = user_derived(() => t2.index + 1 <= t2.visibleToasts), $2 = user_derived(() => t2.toast.type), x2 = user_derived(() => false !== t2.toast.dismissable), k2 = user_derived(() => t2.toast.class || ""), S2 = user_derived(() => t2.toast.descriptionClass || ""), C2 = user_derived(() => Ve.heights.findIndex((e3) => e3.toastId === t2.toast.id) || 0),
|
|
3623
|
-
let
|
|
3624
|
-
const
|
|
3564
|
+
const y2 = user_derived(() => 0 === t2.index), w2 = user_derived(() => t2.index + 1 <= t2.visibleToasts), $2 = user_derived(() => t2.toast.type), x2 = user_derived(() => false !== t2.toast.dismissable), k2 = user_derived(() => t2.toast.class || ""), S2 = user_derived(() => t2.toast.descriptionClass || ""), C2 = user_derived(() => Ve.heights.findIndex((e3) => e3.toastId === t2.toast.id) || 0), M2 = user_derived(() => t2.toast.closeButton ?? t2.closeButton), E2 = user_derived(() => t2.toast.duration ?? t2.duration ?? 4e3);
|
|
3565
|
+
let I2 = null;
|
|
3566
|
+
const O2 = user_derived(() => t2.position.split("-")), T2 = user_derived(() => Ve.heights.reduce((e3, t3, n3) => n3 >= get$1(C2) ? e3 : e3 + t3.height, 0)), P2 = (function useDocumentHidden() {
|
|
3625
3567
|
let e3 = /* @__PURE__ */ state(proxy("undefined" != typeof document && document.hidden));
|
|
3626
3568
|
return user_effect(() => on(document, "visibilitychange", () => {
|
|
3627
3569
|
set(e3, document.hidden, true);
|
|
@@ -3674,7 +3616,7 @@ function Toast(e2, t2) {
|
|
|
3674
3616
|
t2.toast.updated && // if the toast has been updated after the initial render,
|
|
3675
3617
|
// we want to reset the timer and set the remaining time to the
|
|
3676
3618
|
// new duration
|
|
3677
|
-
(clearTimeout(z2), _2 = get$1(
|
|
3619
|
+
(clearTimeout(z2), _2 = get$1(E2), startTimer());
|
|
3678
3620
|
}), user_effect(() => (get$1(R2) || (t2.expanded || t2.interacting || P2.current ? (function pauseTimer() {
|
|
3679
3621
|
if (get$1(N2) < get$1(B2)) {
|
|
3680
3622
|
const e3 = (/* @__PURE__ */ new Date()).getTime() - get$1(B2);
|
|
@@ -3698,13 +3640,13 @@ function Toast(e2, t2) {
|
|
|
3698
3640
|
});
|
|
3699
3641
|
});
|
|
3700
3642
|
const G2 = user_derived(() => t2.toast.icon ? t2.toast.icon : "success" === get$1($2) ? t2.successIcon : "error" === get$1($2) ? t2.errorIcon : "warning" === get$1($2) ? t2.warningIcon : "info" === get$1($2) ? t2.infoIcon : "loading" === get$1($2) ? t2.loadingIcon : null);
|
|
3701
|
-
var F2 =
|
|
3643
|
+
var F2 = st();
|
|
3702
3644
|
let H2;
|
|
3703
3645
|
set_attribute(F2, "tabindex", 0), F2.__pointermove = (e3) => {
|
|
3704
3646
|
var _a2, _b3, _c2;
|
|
3705
|
-
if (!
|
|
3647
|
+
if (!I2 || !get$1(x2)) return;
|
|
3706
3648
|
if ((((_a2 = window.getSelection()) == null ? void 0 : _a2.toString().length) ?? -1) > 0) return;
|
|
3707
|
-
const n3 = e3.clientY -
|
|
3649
|
+
const n3 = e3.clientY - I2.y, s3 = e3.clientX - I2.x, i3 = t2.swipeDirections ?? (function getDefaultSwipeDirections(e4) {
|
|
3708
3650
|
const [t3, n4] = e4.split("-"), s4 = [];
|
|
3709
3651
|
return t3 && s4.push(t3), n4 && s4.push(n4), s4;
|
|
3710
3652
|
})(t2.position);
|
|
@@ -3728,7 +3670,7 @@ function Toast(e2, t2) {
|
|
|
3728
3670
|
}, F2.__pointerup = () => {
|
|
3729
3671
|
var _a2, _b3, _c2, _d3, _e4, _f2;
|
|
3730
3672
|
if (get$1(f2) || !get$1(x2)) return;
|
|
3731
|
-
|
|
3673
|
+
I2 = null;
|
|
3732
3674
|
const e3 = Number(((_a2 = get$1(v2)) == null ? void 0 : _a2.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), n3 = Number(((_b3 = get$1(v2)) == null ? void 0 : _b3.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), s3 = (/* @__PURE__ */ new Date()).getTime() - 0, i3 = "x" === get$1(m2) ? e3 : n3, o3 = Math.abs(i3) / s3;
|
|
3733
3675
|
if (Math.abs(i3) >= 45 || o3 > 0.11) return set(h2, get$1(q2), true), (_d3 = (_c2 = t2.toast).onDismiss) == null ? void 0 : _d3.call(_c2, t2.toast), "x" === get$1(m2) ? set(b2, e3 > 0 ? "right" : "left", true) : set(b2, n3 > 0 ? "down" : "up", true), deleteToast(), void set(f2, true);
|
|
3734
3676
|
(_e4 = get$1(v2)) == null ? void 0 : _e4.style.setProperty("--swipe-amount-x", "0px"), (_f2 = get$1(v2)) == null ? void 0 : _f2.style.setProperty("--swipe-amount-y", "0px"), set(p2, false), set(d2, false), set(m2, null);
|
|
@@ -3736,13 +3678,13 @@ function Toast(e2, t2) {
|
|
|
3736
3678
|
if (get$1(j2)) return;
|
|
3737
3679
|
set(h2, get$1(q2), true);
|
|
3738
3680
|
const t3 = e3.target;
|
|
3739
|
-
t3.setPointerCapture(e3.pointerId), "BUTTON" !== t3.tagName && (set(d2, true),
|
|
3681
|
+
t3.setPointerCapture(e3.pointerId), "BUTTON" !== t3.tagName && (set(d2, true), I2 = {
|
|
3740
3682
|
x: e3.clientX,
|
|
3741
3683
|
y: e3.clientY
|
|
3742
3684
|
});
|
|
3743
3685
|
};
|
|
3744
3686
|
var Y2 = child(F2), consequent_1 = (e3) => {
|
|
3745
|
-
var n3 =
|
|
3687
|
+
var n3 = Je();
|
|
3746
3688
|
n3.__click = [on_click$4, j2, x2, deleteToast, t2], snippet(child(n3), () => t2.closeIcon ?? noop), template_effect((e4) => {
|
|
3747
3689
|
set_attribute(n3, "aria-label", t2.closeButtonAriaLabel), set_attribute(n3, "data-disabled", get$1(j2)), set_class(n3, 1, e4);
|
|
3748
3690
|
}, [() => {
|
|
@@ -3751,9 +3693,9 @@ function Toast(e2, t2) {
|
|
|
3751
3693
|
}]), append(e3, n3);
|
|
3752
3694
|
};
|
|
3753
3695
|
if_block(Y2, (e3) => {
|
|
3754
|
-
get$1(
|
|
3696
|
+
get$1(M2) && !t2.toast.component && "loading" !== get$1($2) && null !== t2.closeIcon && e3(consequent_1);
|
|
3755
3697
|
});
|
|
3756
|
-
var
|
|
3698
|
+
var V2 = sibling(Y2, 2), consequent_2 = (e3) => {
|
|
3757
3699
|
const n3 = user_derived(() => t2.toast.component);
|
|
3758
3700
|
var s3 = comment();
|
|
3759
3701
|
component(first_child(s3), () => get$1(n3), (e4, n4) => {
|
|
@@ -3762,8 +3704,8 @@ function Toast(e2, t2) {
|
|
|
3762
3704
|
}));
|
|
3763
3705
|
}), append(e3, s3);
|
|
3764
3706
|
}, alternate_10 = (e3) => {
|
|
3765
|
-
var o3 =
|
|
3766
|
-
var n3 =
|
|
3707
|
+
var o3 = rt(), a3 = first_child(o3), consequent_11 = (e4) => {
|
|
3708
|
+
var n3 = Qe(), s3 = child(n3), consequent_4 = (e5) => {
|
|
3767
3709
|
var n4 = comment(), s4 = first_child(n4), consequent_3 = (e6) => {
|
|
3768
3710
|
var n5 = comment();
|
|
3769
3711
|
component(first_child(n5), () => t2.toast.icon, (e7, t3) => {
|
|
@@ -3851,7 +3793,7 @@ function Toast(e2, t2) {
|
|
|
3851
3793
|
t2.toast.title && e4(consequent_13);
|
|
3852
3794
|
});
|
|
3853
3795
|
var d3 = sibling(c3, 2), consequent_15 = (e4) => {
|
|
3854
|
-
var n3 =
|
|
3796
|
+
var n3 = et(), s3 = child(n3), consequent_14 = (e5) => {
|
|
3855
3797
|
const n4 = user_derived(() => t2.toast.description);
|
|
3856
3798
|
var s4 = comment();
|
|
3857
3799
|
component(first_child(s4), () => get$1(n4), (e6, n5) => {
|
|
@@ -3879,7 +3821,7 @@ function Toast(e2, t2) {
|
|
|
3879
3821
|
}), append(e5, n3);
|
|
3880
3822
|
}, alternate_8 = (e5) => {
|
|
3881
3823
|
var s4 = comment(), i4 = first_child(s4), consequent_17 = (e6) => {
|
|
3882
|
-
var s5 =
|
|
3824
|
+
var s5 = tt();
|
|
3883
3825
|
s5.__click = [on_click_1$2, t2, x2, deleteToast];
|
|
3884
3826
|
var i5 = child(s5);
|
|
3885
3827
|
template_effect((e7) => {
|
|
@@ -3908,7 +3850,7 @@ function Toast(e2, t2) {
|
|
|
3908
3850
|
}), append(e5, n4);
|
|
3909
3851
|
}, alternate_9 = (e5) => {
|
|
3910
3852
|
var n4 = comment(), i4 = first_child(n4), consequent_20 = (e6) => {
|
|
3911
|
-
var n5 =
|
|
3853
|
+
var n5 = nt();
|
|
3912
3854
|
n5.__click = [on_click_2, t2, deleteToast];
|
|
3913
3855
|
var i5 = child(n5);
|
|
3914
3856
|
template_effect((e7) => {
|
|
@@ -3933,10 +3875,10 @@ function Toast(e2, t2) {
|
|
|
3933
3875
|
return clsx(cn((_a2 = get$1(A2)) == null ? void 0 : _a2.title, (_c2 = (_b3 = t2.toast) == null ? void 0 : _b3.classes) == null ? void 0 : _c2.title));
|
|
3934
3876
|
}]), append(e3, o3);
|
|
3935
3877
|
};
|
|
3936
|
-
if_block(
|
|
3878
|
+
if_block(V2, (e3) => {
|
|
3937
3879
|
t2.toast.component ? e3(consequent_2) : e3(alternate_10, false);
|
|
3938
3880
|
}), bind_this(F2, (e3) => set(v2, e3), () => get$1(v2)), template_effect((e3, n3, s3, i3) => {
|
|
3939
|
-
set_class(F2, 1, e3), set_attribute(F2, "data-rich-colors", t2.toast.richColors ?? a2()), set_attribute(F2, "data-styled", !(t2.toast.component || t2.toast.unstyled || o2())), set_attribute(F2, "data-mounted", get$1(c2)), set_attribute(F2, "data-promise", n3), set_attribute(F2, "data-swiped", get$1(p2)), set_attribute(F2, "data-removed", get$1(u2)), set_attribute(F2, "data-visible", get$1(w2)), set_attribute(F2, "data-y-position", get$1(
|
|
3881
|
+
set_class(F2, 1, e3), set_attribute(F2, "data-rich-colors", t2.toast.richColors ?? a2()), set_attribute(F2, "data-styled", !(t2.toast.component || t2.toast.unstyled || o2())), set_attribute(F2, "data-mounted", get$1(c2)), set_attribute(F2, "data-promise", n3), set_attribute(F2, "data-swiped", get$1(p2)), set_attribute(F2, "data-removed", get$1(u2)), set_attribute(F2, "data-visible", get$1(w2)), set_attribute(F2, "data-y-position", get$1(O2)[0]), set_attribute(F2, "data-x-position", get$1(O2)[1]), set_attribute(F2, "data-index", t2.index), set_attribute(F2, "data-front", get$1(y2)), set_attribute(F2, "data-swiping", get$1(d2)), set_attribute(F2, "data-dismissable", get$1(x2)), set_attribute(F2, "data-type", get$1($2)), set_attribute(F2, "data-invert", get$1(L2)), set_attribute(F2, "data-swipe-out", get$1(f2)), set_attribute(F2, "data-swipe-direction", get$1(b2)), set_attribute(F2, "data-expanded", s3), H2 = set_style(F2, `${t2.style} ${t2.toast.style}`, H2, i3);
|
|
3940
3882
|
}, [() => {
|
|
3941
3883
|
var _a2, _b3, _c2, _d3, _e4, _f2;
|
|
3942
3884
|
return clsx(cn(t2.class, get$1(k2), (_a2 = get$1(A2)) == null ? void 0 : _a2.toast, (_c2 = (_b3 = t2.toast) == null ? void 0 : _b3.classes) == null ? void 0 : _c2.toast, (_d3 = get$1(A2)) == null ? void 0 : _d3[get$1($2)], (_f2 = (_e4 = t2.toast) == null ? void 0 : _e4.classes) == null ? void 0 : _f2[get$1($2)]));
|
|
@@ -3947,27 +3889,22 @@ function Toast(e2, t2) {
|
|
|
3947
3889
|
"--offset": `${get$1(u2) ? get$1(h2) : get$1(q2)}px`,
|
|
3948
3890
|
"--initial-height": t2.expandByDefault ? "auto" : `${get$1(g2)}px`
|
|
3949
3891
|
})]), event("dragend", F2, () => {
|
|
3950
|
-
set(d2, false), set(m2, null),
|
|
3892
|
+
set(d2, false), set(m2, null), I2 = null;
|
|
3951
3893
|
}), append(e2, F2), pop();
|
|
3952
3894
|
}
|
|
3953
3895
|
delegate(["pointermove", "pointerup", "pointerdown", "click"]), (function enable_legacy_mode_flag() {
|
|
3954
3896
|
A = true;
|
|
3955
3897
|
})();
|
|
3956
|
-
var
|
|
3957
|
-
var
|
|
3958
|
-
var
|
|
3959
|
-
var
|
|
3960
|
-
var
|
|
3961
|
-
const
|
|
3962
|
-
var
|
|
3898
|
+
var it = /* @__PURE__ */ from_svg('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-success-icon=""><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>');
|
|
3899
|
+
var ot = /* @__PURE__ */ from_svg('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-error-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>');
|
|
3900
|
+
var at = /* @__PURE__ */ from_svg('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" data-sonner-warning-icon="" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');
|
|
3901
|
+
var lt = /* @__PURE__ */ from_svg('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-info-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>');
|
|
3902
|
+
var ct = /* @__PURE__ */ from_svg('<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" data-sonner-close-icon=""><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>');
|
|
3903
|
+
const ut = "24px", dt = "16px", ft = "dark", pt = "light";
|
|
3904
|
+
var ht = /* @__PURE__ */ from_html("<ol></ol>"), gt = /* @__PURE__ */ from_html('<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-nbs0zk"><!></section>');
|
|
3963
3905
|
function Toaster(e2, t2) {
|
|
3964
3906
|
push(t2, true);
|
|
3965
|
-
let n2 = prop(t2, "invert", 3, false), s2 = prop(t2, "position", 3, "bottom-right"), i2 = prop(t2, "hotkey", 19, () => ["altKey", "KeyT"]), o2 = prop(t2, "expand", 3, false), a2 = prop(t2, "closeButton", 3, false), l2 = prop(t2, "offset", 3,
|
|
3966
|
-
return new Proxy({
|
|
3967
|
-
props: e3,
|
|
3968
|
-
exclude: t3
|
|
3969
|
-
}, We);
|
|
3970
|
-
})(t2, ["$$slots", "$$events", "$$legacy", "invert", "position", "hotkey", "expand", "closeButton", "offset", "mobileOffset", "theme", "richColors", "duration", "visibleToasts", "toastOptions", "dir", "gap", "loadingIcon", "successIcon", "errorIcon", "warningIcon", "closeIcon", "infoIcon", "containerAriaLabel", "class", "closeButtonAriaLabel", "onblur", "onfocus", "onmouseenter", "onmousemove", "onmouseleave", "ondragend", "onpointerdown", "onpointerup"]);
|
|
3907
|
+
let n2 = prop(t2, "invert", 3, false), s2 = prop(t2, "position", 3, "bottom-right"), i2 = prop(t2, "hotkey", 19, () => ["altKey", "KeyT"]), o2 = prop(t2, "expand", 3, false), a2 = prop(t2, "closeButton", 3, false), l2 = prop(t2, "offset", 3, ut), c2 = prop(t2, "mobileOffset", 3, dt), u2 = prop(t2, "theme", 3, "light"), d2 = prop(t2, "richColors", 3, false), f2 = prop(t2, "duration", 3, 4e3), p2 = prop(t2, "visibleToasts", 3, 3), h2 = prop(t2, "toastOptions", 19, () => ({})), g2 = prop(t2, "dir", 7, "auto"), _2 = prop(t2, "gap", 3, 14), v2 = prop(t2, "containerAriaLabel", 3, "Notifications"), m2 = prop(t2, "closeButtonAriaLabel", 3, "Close toast"), b2 = /* @__PURE__ */ rest_props(t2, ["$$slots", "$$events", "$$legacy", "invert", "position", "hotkey", "expand", "closeButton", "offset", "mobileOffset", "theme", "richColors", "duration", "visibleToasts", "toastOptions", "dir", "gap", "loadingIcon", "successIcon", "errorIcon", "warningIcon", "closeIcon", "infoIcon", "containerAriaLabel", "class", "closeButtonAriaLabel", "onblur", "onfocus", "onmouseenter", "onmousemove", "onmouseleave", "ondragend", "onpointerdown", "onpointerup"]);
|
|
3971
3908
|
function getDocumentDirection() {
|
|
3972
3909
|
if ("auto" !== g2()) return g2();
|
|
3973
3910
|
if ("undefined" == typeof window) return "ltr";
|
|
@@ -3984,10 +3921,10 @@ function Toaster(e2, t2) {
|
|
|
3984
3921
|
// Default toast width
|
|
3985
3922
|
// Default gap between toasts
|
|
3986
3923
|
(function getInitialTheme(e3) {
|
|
3987
|
-
return "system" !== e3 ? e3 : "undefined" != typeof window && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ?
|
|
3924
|
+
return "system" !== e3 ? e3 : "undefined" != typeof window && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? ft : pt;
|
|
3988
3925
|
})(u2())
|
|
3989
3926
|
)), k2 = /* @__PURE__ */ state(void 0), S2 = /* @__PURE__ */ state(null), C2 = /* @__PURE__ */ state(false);
|
|
3990
|
-
const
|
|
3927
|
+
const M2 = user_derived(() => i2().join("+").replace(/Key/g, "").replace(/Digit/g, ""));
|
|
3991
3928
|
user_effect(() => {
|
|
3992
3929
|
Ve.toasts.length <= 1 && set(w2, false);
|
|
3993
3930
|
}), // Check for dismissed toasts and remove them. We need to do this to have dismiss animation.
|
|
@@ -4012,9 +3949,9 @@ function Toaster(e2, t2) {
|
|
|
4012
3949
|
});
|
|
4013
3950
|
}), user_effect(() => {
|
|
4014
3951
|
if ("system" !== u2() && set(x2, u2()), "undefined" != typeof window) {
|
|
4015
|
-
"system" === u2() && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? set(x2,
|
|
3952
|
+
"system" === u2() && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? set(x2, ft) : set(x2, pt));
|
|
4016
3953
|
const e3 = window.matchMedia("(prefers-color-scheme: dark)"), changeHandler = ({ matches: e4 }) => {
|
|
4017
|
-
set(x2, e4 ?
|
|
3954
|
+
set(x2, e4 ? ft : pt, true);
|
|
4018
3955
|
};
|
|
4019
3956
|
"addEventListener" in e3 ? e3.addEventListener("change", changeHandler) : (
|
|
4020
3957
|
// @ts-expect-error deprecated API
|
|
@@ -4051,10 +3988,10 @@ function Toaster(e2, t2) {
|
|
|
4051
3988
|
var _a2;
|
|
4052
3989
|
(_a2 = t2.onpointerup) == null ? void 0 : _a2.call(t2, e3), set($2, false);
|
|
4053
3990
|
};
|
|
4054
|
-
|
|
4055
|
-
var
|
|
4056
|
-
set_attribute(
|
|
4057
|
-
var
|
|
3991
|
+
He.set(new SonnerState());
|
|
3992
|
+
var E2 = gt();
|
|
3993
|
+
set_attribute(E2, "tabindex", -1);
|
|
3994
|
+
var I2 = child(E2), consequent_10 = (e3) => {
|
|
4058
3995
|
var s3 = comment();
|
|
4059
3996
|
each(first_child(s3), 18, () => get$1(y2), (e4) => e4, (e4, s4, i3, u3) => {
|
|
4060
3997
|
const g3 = user_derived(() => {
|
|
@@ -4066,7 +4003,7 @@ function Toaster(e2, t2) {
|
|
|
4066
4003
|
}), v3 = user_derived(() => (function getOffsetObject(e5, t3) {
|
|
4067
4004
|
const n3 = {};
|
|
4068
4005
|
return [e5, t3].forEach((e6, t4) => {
|
|
4069
|
-
const s5 = 1 === t4, i4 = s5 ? "--mobile-offset" : "--offset", o3 = s5 ?
|
|
4006
|
+
const s5 = 1 === t4, i4 = s5 ? "--mobile-offset" : "--offset", o3 = s5 ? dt : ut;
|
|
4070
4007
|
function assignAll(e7) {
|
|
4071
4008
|
["top", "right", "bottom", "left"].forEach((t5) => {
|
|
4072
4009
|
n3[`${i4}-${t5}`] = "number" == typeof e7 ? `${e7}px` : e7;
|
|
@@ -4078,7 +4015,7 @@ function Toaster(e2, t2) {
|
|
|
4078
4015
|
}) : assignAll(o3);
|
|
4079
4016
|
}), n3;
|
|
4080
4017
|
})(l2(), c2()));
|
|
4081
|
-
var y3 =
|
|
4018
|
+
var y3 = ht();
|
|
4082
4019
|
attribute_effect(y3, (e5, n3) => ({
|
|
4083
4020
|
tabindex: -1,
|
|
4084
4021
|
dir: e5,
|
|
@@ -4097,7 +4034,7 @@ function Toaster(e2, t2) {
|
|
|
4097
4034
|
onpointerdown: handlePointerDown,
|
|
4098
4035
|
onpointerup: handlePointerUp,
|
|
4099
4036
|
...b2,
|
|
4100
|
-
[
|
|
4037
|
+
[Ie]: n3
|
|
4101
4038
|
}), [getDocumentDirection, () => {
|
|
4102
4039
|
var _a2;
|
|
4103
4040
|
return {
|
|
@@ -4122,7 +4059,7 @@ function Toaster(e2, t2) {
|
|
|
4122
4059
|
}, alternate = (e7) => {
|
|
4123
4060
|
var n4 = comment(), s6 = first_child(n4), consequent_1 = (e8) => {
|
|
4124
4061
|
!(function SuccessIcon(e9) {
|
|
4125
|
-
append(e9,
|
|
4062
|
+
append(e9, it());
|
|
4126
4063
|
})(e8);
|
|
4127
4064
|
};
|
|
4128
4065
|
if_block(s6, (e8) => {
|
|
@@ -4139,7 +4076,7 @@ function Toaster(e2, t2) {
|
|
|
4139
4076
|
}, alternate_1 = (e7) => {
|
|
4140
4077
|
var n4 = comment(), s6 = first_child(n4), consequent_3 = (e8) => {
|
|
4141
4078
|
!(function ErrorIcon(e9) {
|
|
4142
|
-
append(e9,
|
|
4079
|
+
append(e9, ot());
|
|
4143
4080
|
})(e8);
|
|
4144
4081
|
};
|
|
4145
4082
|
if_block(s6, (e8) => {
|
|
@@ -4156,7 +4093,7 @@ function Toaster(e2, t2) {
|
|
|
4156
4093
|
}, alternate_2 = (e7) => {
|
|
4157
4094
|
var n4 = comment(), s6 = first_child(n4), consequent_5 = (e8) => {
|
|
4158
4095
|
!(function WarningIcon(e9) {
|
|
4159
|
-
append(e9,
|
|
4096
|
+
append(e9, at());
|
|
4160
4097
|
})(e8);
|
|
4161
4098
|
};
|
|
4162
4099
|
if_block(s6, (e8) => {
|
|
@@ -4173,7 +4110,7 @@ function Toaster(e2, t2) {
|
|
|
4173
4110
|
}, alternate_3 = (e7) => {
|
|
4174
4111
|
var n4 = comment(), s6 = first_child(n4), consequent_7 = (e8) => {
|
|
4175
4112
|
!(function InfoIcon(e9) {
|
|
4176
|
-
append(e9,
|
|
4113
|
+
append(e9, lt());
|
|
4177
4114
|
})(e8);
|
|
4178
4115
|
};
|
|
4179
4116
|
if_block(s6, (e8) => {
|
|
@@ -4190,7 +4127,7 @@ function Toaster(e2, t2) {
|
|
|
4190
4127
|
}, alternate_4 = (e7) => {
|
|
4191
4128
|
var n4 = comment(), s6 = first_child(n4), consequent_9 = (e8) => {
|
|
4192
4129
|
!(function CloseIcon(e9) {
|
|
4193
|
-
append(e9,
|
|
4130
|
+
append(e9, ct());
|
|
4194
4131
|
})(e8);
|
|
4195
4132
|
};
|
|
4196
4133
|
if_block(s6, (e8) => {
|
|
@@ -4301,11 +4238,11 @@ function Toaster(e2, t2) {
|
|
|
4301
4238
|
}), bind_this(y3, (e5) => set(k2, e5), () => get$1(k2)), template_effect(() => y3.dir = y3.dir), append(e4, y3);
|
|
4302
4239
|
}), append(e3, s3);
|
|
4303
4240
|
};
|
|
4304
|
-
if_block(
|
|
4241
|
+
if_block(I2, (e3) => {
|
|
4305
4242
|
Ve.toasts.length > 0 && e3(consequent_10);
|
|
4306
|
-
}), template_effect(() => set_attribute(
|
|
4243
|
+
}), template_effect(() => set_attribute(E2, "aria-label", `${v2() ?? ""} ${get$1(M2) ?? ""}`)), append(e2, E2), pop();
|
|
4307
4244
|
}
|
|
4308
|
-
const
|
|
4245
|
+
const _t = new (_e2 = class {
|
|
4309
4246
|
constructor() {
|
|
4310
4247
|
__privateAdd(this, _PlayLightAPI_instances);
|
|
4311
4248
|
this.baseUrl = "https://api.playlight.dev/platform", this.cachedRequests = /* @__PURE__ */ new Map(), this.pendingCacheRequests = /* @__PURE__ */ new Map();
|
|
@@ -4339,7 +4276,7 @@ const vt = new (_e2 = class {
|
|
|
4339
4276
|
}
|
|
4340
4277
|
return await n3.json();
|
|
4341
4278
|
} catch (e3) {
|
|
4342
|
-
|
|
4279
|
+
Ke.error("Request failed: " + e3.message), console.error("Playlight API request error:", e3);
|
|
4343
4280
|
}
|
|
4344
4281
|
};
|
|
4345
4282
|
if (n2) {
|
|
@@ -4406,9 +4343,9 @@ const vt = new (_e2 = class {
|
|
|
4406
4343
|
}, _PlayLightAPI_instances = new WeakSet(), K_fn = function() {
|
|
4407
4344
|
const e2 = window.location.hostname;
|
|
4408
4345
|
return e2.startsWith("www.") ? e2.substring(4) : e2;
|
|
4409
|
-
}, _e2)(),
|
|
4346
|
+
}, _e2)(), vt = /* @__PURE__ */ new Map();
|
|
4410
4347
|
async function triggerEvent(e2, ...t2) {
|
|
4411
|
-
const n2 =
|
|
4348
|
+
const n2 = vt.get(e2);
|
|
4412
4349
|
if (n2) for (const s2 of n2) try {
|
|
4413
4350
|
await s2(...t2);
|
|
4414
4351
|
} catch (t3) {
|
|
@@ -4485,11 +4422,11 @@ function scale(e2, { delay: t2 = 0, duration: n2 = 400, easing: s2 = cubic_out,
|
|
|
4485
4422
|
};
|
|
4486
4423
|
}
|
|
4487
4424
|
/**
|
|
4488
|
-
* @license lucide
|
|
4425
|
+
* @license @lucide/svelte v0.554.0 - ISC
|
|
4489
4426
|
*
|
|
4490
4427
|
* ISC License
|
|
4491
4428
|
*
|
|
4492
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-
|
|
4429
|
+
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
|
|
4493
4430
|
*
|
|
4494
4431
|
* Permission to use, copy, modify, and/or distribute this software for any
|
|
4495
4432
|
* purpose with or without fee is hereby granted, provided that the above
|
|
@@ -4503,8 +4440,32 @@ function scale(e2, { delay: t2 = 0, duration: n2 = 400, easing: s2 = cubic_out,
|
|
|
4503
4440
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
4504
4441
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
4505
4442
|
*
|
|
4443
|
+
* ---
|
|
4444
|
+
*
|
|
4445
|
+
* The MIT License (MIT) (for portions derived from Feather)
|
|
4446
|
+
*
|
|
4447
|
+
* Copyright (c) 2013-2023 Cole Bemis
|
|
4448
|
+
*
|
|
4449
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4450
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
4451
|
+
* in the Software without restriction, including without limitation the rights
|
|
4452
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
4453
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
4454
|
+
* furnished to do so, subject to the following conditions:
|
|
4455
|
+
*
|
|
4456
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
4457
|
+
* copies or substantial portions of the Software.
|
|
4458
|
+
*
|
|
4459
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
4460
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
4461
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
4462
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
4463
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
4464
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
4465
|
+
* SOFTWARE.
|
|
4466
|
+
*
|
|
4506
4467
|
*/
|
|
4507
|
-
const
|
|
4468
|
+
const mt = {
|
|
4508
4469
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4509
4470
|
width: 24,
|
|
4510
4471
|
height: 24,
|
|
@@ -4515,24 +4476,22 @@ const bt = {
|
|
|
4515
4476
|
"stroke-linecap": "round",
|
|
4516
4477
|
"stroke-linejoin": "round"
|
|
4517
4478
|
};
|
|
4518
|
-
var
|
|
4479
|
+
var bt = /* @__PURE__ */ from_svg("<svg><!><!></svg>");
|
|
4519
4480
|
function Icon(e2, t2) {
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
height: a2(),
|
|
4530
|
-
stroke: o2(),
|
|
4481
|
+
push(t2, true);
|
|
4482
|
+
const n2 = prop(t2, "color", 3, "currentColor"), s2 = prop(t2, "size", 3, 24), i2 = prop(t2, "strokeWidth", 3, 2), o2 = prop(t2, "absoluteStrokeWidth", 3, false), a2 = prop(t2, "iconNode", 19, () => []), l2 = /* @__PURE__ */ rest_props(t2, ["$$slots", "$$events", "$$legacy", "name", "color", "size", "strokeWidth", "absoluteStrokeWidth", "iconNode", "children"]);
|
|
4483
|
+
var c2 = bt();
|
|
4484
|
+
attribute_effect(c2, (e3) => ({
|
|
4485
|
+
...mt,
|
|
4486
|
+
...l2,
|
|
4487
|
+
width: s2(),
|
|
4488
|
+
height: s2(),
|
|
4489
|
+
stroke: n2(),
|
|
4531
4490
|
"stroke-width": e3,
|
|
4532
|
-
class:
|
|
4533
|
-
}), [() => (
|
|
4534
|
-
var
|
|
4535
|
-
each(
|
|
4491
|
+
class: ["lucide-icon lucide", t2.name && `lucide-${t2.name}`, t2.class]
|
|
4492
|
+
}), [() => o2() ? 24 * Number(i2()) / Number(s2()) : i2()]);
|
|
4493
|
+
var u2 = child(c2);
|
|
4494
|
+
each(u2, 17, a2, index, (e3, t3) => {
|
|
4536
4495
|
var n3 = user_derived(() => to_array(get$1(t3), 2));
|
|
4537
4496
|
var s3 = comment();
|
|
4538
4497
|
!(function element(e4, t4, n4, s4, i3, o3) {
|
|
@@ -4570,18 +4529,16 @@ function Icon(e2, t2) {
|
|
|
4570
4529
|
...get$1(n3)[1]
|
|
4571
4530
|
}));
|
|
4572
4531
|
}), append(e3, s3);
|
|
4573
|
-
}),
|
|
4532
|
+
}), snippet(sibling(u2), () => t2.children ?? noop), append(e2, c2), pop();
|
|
4574
4533
|
}
|
|
4575
4534
|
function Loader_circle(e2, t2) {
|
|
4576
|
-
|
|
4577
|
-
d: "M21 12a9 9 0 1 1-6.219-8.56"
|
|
4578
|
-
}]];
|
|
4535
|
+
push(t2, true);
|
|
4579
4536
|
/**
|
|
4580
|
-
* @license lucide
|
|
4537
|
+
* @license @lucide/svelte v0.554.0 - ISC
|
|
4581
4538
|
*
|
|
4582
4539
|
* ISC License
|
|
4583
4540
|
*
|
|
4584
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-
|
|
4541
|
+
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
|
|
4585
4542
|
*
|
|
4586
4543
|
* Permission to use, copy, modify, and/or distribute this software for any
|
|
4587
4544
|
* purpose with or without fee is hereby granted, provided that the above
|
|
@@ -4595,7 +4552,35 @@ function Loader_circle(e2, t2) {
|
|
|
4595
4552
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
4596
4553
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
4597
4554
|
*
|
|
4555
|
+
* ---
|
|
4556
|
+
*
|
|
4557
|
+
* The MIT License (MIT) (for portions derived from Feather)
|
|
4558
|
+
*
|
|
4559
|
+
* Copyright (c) 2013-2023 Cole Bemis
|
|
4560
|
+
*
|
|
4561
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4562
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
4563
|
+
* in the Software without restriction, including without limitation the rights
|
|
4564
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
4565
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
4566
|
+
* furnished to do so, subject to the following conditions:
|
|
4567
|
+
*
|
|
4568
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
4569
|
+
* copies or substantial portions of the Software.
|
|
4570
|
+
*
|
|
4571
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
4572
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
4573
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
4574
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
4575
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
4576
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
4577
|
+
* SOFTWARE.
|
|
4578
|
+
*
|
|
4598
4579
|
*/
|
|
4580
|
+
let n2 = /* @__PURE__ */ rest_props(t2, ["$$slots", "$$events", "$$legacy"]);
|
|
4581
|
+
const s2 = [["path", {
|
|
4582
|
+
d: "M21 12a9 9 0 1 1-6.219-8.56"
|
|
4583
|
+
}]];
|
|
4599
4584
|
Icon(e2, spread_props({
|
|
4600
4585
|
name: "loader-circle"
|
|
4601
4586
|
}, () => n2, {
|
|
@@ -4604,19 +4589,19 @@ function Loader_circle(e2, t2) {
|
|
|
4604
4589
|
},
|
|
4605
4590
|
children: (e3, n3) => {
|
|
4606
4591
|
var s3 = comment();
|
|
4607
|
-
|
|
4592
|
+
snippet(first_child(s3), () => t2.children ?? noop), append(e3, s3);
|
|
4608
4593
|
},
|
|
4609
4594
|
$$slots: {
|
|
4610
4595
|
default: true
|
|
4611
4596
|
}
|
|
4612
|
-
}));
|
|
4597
|
+
})), pop();
|
|
4613
4598
|
}
|
|
4614
4599
|
function openGame(e2, t2) {
|
|
4615
4600
|
if (!e2 || null == t2) return console.error("Domain or Game ID are not provided!");
|
|
4616
|
-
|
|
4601
|
+
_t.trackClick(t2), window.open("https://" + e2 + "?utm_source=playlight", "_blank", "noopener");
|
|
4617
4602
|
}
|
|
4618
4603
|
const gameBadge = (e2, t2 = noop, n2 = noop) => {
|
|
4619
|
-
var s2 =
|
|
4604
|
+
var s2 = yt();
|
|
4620
4605
|
let i2;
|
|
4621
4606
|
var o2 = child(s2), a2 = child(o2);
|
|
4622
4607
|
template_effect((e3) => {
|
|
@@ -4625,9 +4610,9 @@ const gameBadge = (e2, t2 = noop, n2 = noop) => {
|
|
|
4625
4610
|
"opacity-0": t2()
|
|
4626
4611
|
})]), append(e2, s2);
|
|
4627
4612
|
};
|
|
4628
|
-
var
|
|
4613
|
+
var yt = /* @__PURE__ */ from_html('<div><p class="font-bold text-white uppercase"> </p></div>'), on_click$3 = (e2, t2, n2, s2, i2, o2) => {
|
|
4629
4614
|
!get$1(t2) || get$1(n2) || s2() ? openGame(o2.game.domain, o2.game.id) : i2();
|
|
4630
|
-
},
|
|
4615
|
+
}, wt = /* @__PURE__ */ from_html('<video playsinline="" loop fetchpriority="low"></video>', 2), $t = /* @__PURE__ */ from_html('<div class="bg-background/25 text-muted-foreground flex items-center justify-center gap-1 border-t p-1 px-2 text-sm"><!> <p class="text-muted-foreground text-sm">Tap again to open</p></div>'), xt = /* @__PURE__ */ from_html('<div class="bg-background/75 absolute right-0 bottom-0 left-0 flex max-h-1/3 z-2 flex-col overflow-hidden text-white backdrop-blur-xl"><div class="h-full w-full overflow-y-auto p-3"><h3 class="mb-2 truncate text-center text-lg font-bold"> </h3> <p class="text-muted-foreground mb-4 text-center text-sm text-balance"> </p></div> <!> <div></div></div>'), kt = /* @__PURE__ */ from_html('<div class="prevent-image-select bg-background absolute right-0 -bottom-[18%] left-0 mx-auto aspect-square w-1/5 animate-pulse rounded-full shadow-xl svelte-n3ft5o"></div> <img alt="game logo" fetchpriority="high"/>', 1), St = /* @__PURE__ */ from_html('<div role="button" tabindex="0"><!> <!> <img alt="cover" fetchpriority="high"/> <!> <!></div>');
|
|
4631
4616
|
function GameCard(e2, t2) {
|
|
4632
4617
|
push(t2, true);
|
|
4633
4618
|
const [n2, s2] = setup_stores();
|
|
@@ -4640,12 +4625,12 @@ function GameCard(e2, t2) {
|
|
|
4640
4625
|
} catch (e4) {
|
|
4641
4626
|
console.error("Error playing sound:", e4);
|
|
4642
4627
|
}
|
|
4643
|
-
})(store_get(
|
|
4628
|
+
})(store_get(Fn, "$projectUrl", n2) + "/assets/sounds/hover-selection.ogg", 0.25), set(l2, true), clearTimeout(i2), i2 = setTimeout(() => set(c2, true), 300), get$1(p2) && t2.game.cover_video_url && get$1(p2).play().catch((e3) => console.error("Video error:", e3));
|
|
4644
4629
|
}
|
|
4645
4630
|
function handleUnhover() {
|
|
4646
4631
|
get$1(p2) && get$1(h2) && get$1(p2).pause(), set(l2, false), clearTimeout(i2), set(c2, false);
|
|
4647
4632
|
}
|
|
4648
|
-
var _2 =
|
|
4633
|
+
var _2 = St();
|
|
4649
4634
|
event("touchstart", N, (e3) => {
|
|
4650
4635
|
get$1(g2) && !get$1(g2).contains(e3.target) && handleUnhover();
|
|
4651
4636
|
}, void 0, true), event("pointerdown", N, (e3) => set(u2, "touch" === e3.pointerType)), event("pointermove", N, (e3) => set(u2, "touch" === e3.pointerType)), _2.__click = [on_click$3, u2, c2, a2, handleHover, t2];
|
|
@@ -4668,7 +4653,7 @@ function GameCard(e2, t2) {
|
|
|
4668
4653
|
((_a2 = t2.game) == null ? void 0 : _a2.featured) ? e3(consequent) : e3(alternate, false);
|
|
4669
4654
|
});
|
|
4670
4655
|
var m2 = sibling(v2, 2), consequent_2 = (e3) => {
|
|
4671
|
-
var n3 =
|
|
4656
|
+
var n3 = wt();
|
|
4672
4657
|
let s3;
|
|
4673
4658
|
n3.muted = true, bind_this(n3, (e4) => set(p2, e4), () => get$1(p2)), template_effect((e4) => {
|
|
4674
4659
|
set_attribute(n3, "src", t2.game.cover_video_url), s3 = set_class(n3, 1, "absolute top-0 left-0 aspect-[2/3] w-full object-cover opacity-0 z-1", null, s3, e4);
|
|
@@ -4684,24 +4669,16 @@ function GameCard(e2, t2) {
|
|
|
4684
4669
|
var b2 = sibling(m2, 2);
|
|
4685
4670
|
let y2;
|
|
4686
4671
|
var w2 = sibling(b2, 2), consequent_4 = (e3) => {
|
|
4687
|
-
var n3 =
|
|
4688
|
-
var t3 =
|
|
4672
|
+
var n3 = xt(), s3 = child(n3), i3 = child(s3), o3 = child(i3), a3 = child(sibling(i3, 2)), l3 = sibling(s3, 2), consequent_3 = (e4) => {
|
|
4673
|
+
var t3 = $t();
|
|
4689
4674
|
!(function Info(e5, t4) {
|
|
4690
|
-
|
|
4691
|
-
cx: "12",
|
|
4692
|
-
cy: "12",
|
|
4693
|
-
r: "10"
|
|
4694
|
-
}], ["path", {
|
|
4695
|
-
d: "M12 16v-4"
|
|
4696
|
-
}], ["path", {
|
|
4697
|
-
d: "M12 8h.01"
|
|
4698
|
-
}]];
|
|
4675
|
+
push(t4, true);
|
|
4699
4676
|
/**
|
|
4700
|
-
* @license lucide
|
|
4677
|
+
* @license @lucide/svelte v0.554.0 - ISC
|
|
4701
4678
|
*
|
|
4702
4679
|
* ISC License
|
|
4703
4680
|
*
|
|
4704
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-
|
|
4681
|
+
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
|
|
4705
4682
|
*
|
|
4706
4683
|
* Permission to use, copy, modify, and/or distribute this software for any
|
|
4707
4684
|
* purpose with or without fee is hereby granted, provided that the above
|
|
@@ -4715,7 +4692,41 @@ function GameCard(e2, t2) {
|
|
|
4715
4692
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
4716
4693
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
4717
4694
|
*
|
|
4695
|
+
* ---
|
|
4696
|
+
*
|
|
4697
|
+
* The MIT License (MIT) (for portions derived from Feather)
|
|
4698
|
+
*
|
|
4699
|
+
* Copyright (c) 2013-2023 Cole Bemis
|
|
4700
|
+
*
|
|
4701
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4702
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
4703
|
+
* in the Software without restriction, including without limitation the rights
|
|
4704
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
4705
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
4706
|
+
* furnished to do so, subject to the following conditions:
|
|
4707
|
+
*
|
|
4708
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
4709
|
+
* copies or substantial portions of the Software.
|
|
4710
|
+
*
|
|
4711
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
4712
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
4713
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
4714
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
4715
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
4716
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
4717
|
+
* SOFTWARE.
|
|
4718
|
+
*
|
|
4718
4719
|
*/
|
|
4720
|
+
let n4 = /* @__PURE__ */ rest_props(t4, ["$$slots", "$$events", "$$legacy"]);
|
|
4721
|
+
const s4 = [["circle", {
|
|
4722
|
+
cx: "12",
|
|
4723
|
+
cy: "12",
|
|
4724
|
+
r: "10"
|
|
4725
|
+
}], ["path", {
|
|
4726
|
+
d: "M12 16v-4"
|
|
4727
|
+
}], ["path", {
|
|
4728
|
+
d: "M12 8h.01"
|
|
4729
|
+
}]];
|
|
4719
4730
|
Icon(e5, spread_props({
|
|
4720
4731
|
name: "info"
|
|
4721
4732
|
}, () => n4, {
|
|
@@ -4724,12 +4735,12 @@ function GameCard(e2, t2) {
|
|
|
4724
4735
|
},
|
|
4725
4736
|
children: (e6, n5) => {
|
|
4726
4737
|
var s5 = comment();
|
|
4727
|
-
|
|
4738
|
+
snippet(first_child(s5), () => t4.children ?? noop), append(e6, s5);
|
|
4728
4739
|
},
|
|
4729
4740
|
$$slots: {
|
|
4730
4741
|
default: true
|
|
4731
4742
|
}
|
|
4732
|
-
}));
|
|
4743
|
+
})), pop();
|
|
4733
4744
|
})(child(t3), {
|
|
4734
4745
|
size: 15
|
|
4735
4746
|
}), append(e4, t3);
|
|
@@ -4746,7 +4757,7 @@ function GameCard(e2, t2) {
|
|
|
4746
4757
|
get$1(l2) && !a2() && e3(consequent_4);
|
|
4747
4758
|
});
|
|
4748
4759
|
var $2 = sibling(w2, 2), consequent_5 = (e3) => {
|
|
4749
|
-
var n3 =
|
|
4760
|
+
var n3 = kt(), s3 = sibling(first_child(n3), 2);
|
|
4750
4761
|
let i3;
|
|
4751
4762
|
template_effect((e4) => {
|
|
4752
4763
|
set_attribute(s3, "src", t2.game.logo_url), i3 = set_class(s3, 1, "prevent-image-select absolute right-0 -bottom-[18%] left-0 mx-auto aspect-square w-1/5 overflow-hidden rounded-full object-center opacity-0 transition group-hover:outline-2 svelte-n3ft5o", null, i3, e4);
|
|
@@ -4807,10 +4818,10 @@ function flip(e2, { from: t2, to: n2 }, s2 = {}) {
|
|
|
4807
4818
|
delegate(["click"]);
|
|
4808
4819
|
var on_click$2 = (e2, t2, n2) => {
|
|
4809
4820
|
set(t2, ""), set(n2, !get$1(n2));
|
|
4810
|
-
},
|
|
4821
|
+
}, Ct = /* @__PURE__ */ from_html('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'), Mt = /* @__PURE__ */ from_html('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'), on_click_1$1 = (e2, t2, n2, s2, i2) => {
|
|
4811
4822
|
var _a2;
|
|
4812
4823
|
t2(n2), set(s2, false), (_a2 = i2.onCategoryChange) == null ? void 0 : _a2.call(i2);
|
|
4813
|
-
}, Et = /* @__PURE__ */ from_html("<button> </button>"), It = /* @__PURE__ */ from_html('<div class="space-y-1 p-1"></div>'),
|
|
4824
|
+
}, Et = /* @__PURE__ */ from_html("<button> </button>"), It = /* @__PURE__ */ from_html('<div class="space-y-1 p-1"></div>'), Ot = /* @__PURE__ */ from_html('<div class="bg-background/85 fixed left-1/2 z-50 mt-22 w-30 w-full max-w-xs -translate-x-1/2 transform border shadow-lg backdrop-blur-xl"><div class="border-b p-3"><div class="relative"><div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-1"><!></div> <input type="text" placeholder="Search categories..." class="w-full border-0 p-1 pl-10 text-white focus:ring-0 focus:outline-none"/></div></div> <div class="max-h-60 overflow-y-auto"><!></div></div>'), Tt = /* @__PURE__ */ from_html('<div class="flex w-full flex-col"><h1 class="mb-0! text-center text-2xl font-bold text-white drop-shadow-xl sm:text-4xl"><span> </span> <button class="group mx-1 inline-flex cursor-pointer items-center bg-white px-3 py-1 text-black transition hover:rotate-5"><span class="max-w-[40vw] truncate text-2xl font-bold text-black sm:text-4xl"> </span> <!></button> <span>games?</span></h1> <!></div>');
|
|
4814
4825
|
function Navigation(e2, t2) {
|
|
4815
4826
|
push(t2, true);
|
|
4816
4827
|
let n2, s2 = prop(t2, "categories", 19, () => []), i2 = prop(t2, "selectedCategory", 15), o2 = /* @__PURE__ */ state(false), a2 = user_derived(() => i2() || (s2().length > 0 ? s2()[0] : "...")), l2 = /* @__PURE__ */ state(""), c2 = /* @__PURE__ */ state(void 0), u2 = user_derived(() => get$1(l2) ? s2().filter((e3) => e3.toLowerCase().includes(get$1(l2).toLowerCase())) : s2());
|
|
@@ -4824,7 +4835,7 @@ function Navigation(e2, t2) {
|
|
|
4824
4835
|
true
|
|
4825
4836
|
);
|
|
4826
4837
|
});
|
|
4827
|
-
var p2 =
|
|
4838
|
+
var p2 = Tt();
|
|
4828
4839
|
event("click", N, (e3) => {
|
|
4829
4840
|
var _a2;
|
|
4830
4841
|
!get$1(c2) || ((_a2 = get$1(c2)) == null ? void 0 : _a2.contains(e3.target)) || (n2 == null ? void 0 : n2.contains(e3.target)) || set(o2, false);
|
|
@@ -4835,15 +4846,13 @@ function Navigation(e2, t2) {
|
|
|
4835
4846
|
{
|
|
4836
4847
|
let e3 = user_derived(() => get$1(o2) ? "rotate-180 transform" : "");
|
|
4837
4848
|
!(function Chevron_down(e4, t3) {
|
|
4838
|
-
|
|
4839
|
-
d: "m6 9 6 6 6-6"
|
|
4840
|
-
}]];
|
|
4849
|
+
push(t3, true);
|
|
4841
4850
|
/**
|
|
4842
|
-
* @license lucide
|
|
4851
|
+
* @license @lucide/svelte v0.554.0 - ISC
|
|
4843
4852
|
*
|
|
4844
4853
|
* ISC License
|
|
4845
4854
|
*
|
|
4846
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-
|
|
4855
|
+
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
|
|
4847
4856
|
*
|
|
4848
4857
|
* Permission to use, copy, modify, and/or distribute this software for any
|
|
4849
4858
|
* purpose with or without fee is hereby granted, provided that the above
|
|
@@ -4857,7 +4866,35 @@ function Navigation(e2, t2) {
|
|
|
4857
4866
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
4858
4867
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
4859
4868
|
*
|
|
4869
|
+
* ---
|
|
4870
|
+
*
|
|
4871
|
+
* The MIT License (MIT) (for portions derived from Feather)
|
|
4872
|
+
*
|
|
4873
|
+
* Copyright (c) 2013-2023 Cole Bemis
|
|
4874
|
+
*
|
|
4875
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4876
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
4877
|
+
* in the Software without restriction, including without limitation the rights
|
|
4878
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
4879
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
4880
|
+
* furnished to do so, subject to the following conditions:
|
|
4881
|
+
*
|
|
4882
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
4883
|
+
* copies or substantial portions of the Software.
|
|
4884
|
+
*
|
|
4885
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
4886
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
4887
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
4888
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
4889
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
4890
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
4891
|
+
* SOFTWARE.
|
|
4892
|
+
*
|
|
4860
4893
|
*/
|
|
4894
|
+
let n3 = /* @__PURE__ */ rest_props(t3, ["$$slots", "$$events", "$$legacy"]);
|
|
4895
|
+
const s3 = [["path", {
|
|
4896
|
+
d: "m6 9 6 6 6-6"
|
|
4897
|
+
}]];
|
|
4861
4898
|
Icon(e4, spread_props({
|
|
4862
4899
|
name: "chevron-down"
|
|
4863
4900
|
}, () => n3, {
|
|
@@ -4866,12 +4903,12 @@ function Navigation(e2, t2) {
|
|
|
4866
4903
|
},
|
|
4867
4904
|
children: (e5, n4) => {
|
|
4868
4905
|
var s4 = comment();
|
|
4869
|
-
|
|
4906
|
+
snippet(first_child(s4), () => t3.children ?? noop), append(e5, s4);
|
|
4870
4907
|
},
|
|
4871
4908
|
$$slots: {
|
|
4872
4909
|
default: true
|
|
4873
4910
|
}
|
|
4874
|
-
}));
|
|
4911
|
+
})), pop();
|
|
4875
4912
|
})(y2, {
|
|
4876
4913
|
size: 25,
|
|
4877
4914
|
strokeWidth: 3,
|
|
@@ -4882,21 +4919,15 @@ function Navigation(e2, t2) {
|
|
|
4882
4919
|
}
|
|
4883
4920
|
bind_this(v2, (e3) => n2 = e3, () => n2);
|
|
4884
4921
|
var w2 = sibling(h2, 2), consequent_2 = (e3) => {
|
|
4885
|
-
var n3 =
|
|
4922
|
+
var n3 = Ot(), a3 = child(n3), d3 = child(a3), f3 = child(d3);
|
|
4886
4923
|
!(function Search(e4, t3) {
|
|
4887
|
-
|
|
4888
|
-
cx: "11",
|
|
4889
|
-
cy: "11",
|
|
4890
|
-
r: "8"
|
|
4891
|
-
}], ["path", {
|
|
4892
|
-
d: "m21 21-4.3-4.3"
|
|
4893
|
-
}]];
|
|
4924
|
+
push(t3, true);
|
|
4894
4925
|
/**
|
|
4895
|
-
* @license lucide
|
|
4926
|
+
* @license @lucide/svelte v0.554.0 - ISC
|
|
4896
4927
|
*
|
|
4897
4928
|
* ISC License
|
|
4898
4929
|
*
|
|
4899
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-
|
|
4930
|
+
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
|
|
4900
4931
|
*
|
|
4901
4932
|
* Permission to use, copy, modify, and/or distribute this software for any
|
|
4902
4933
|
* purpose with or without fee is hereby granted, provided that the above
|
|
@@ -4910,7 +4941,39 @@ function Navigation(e2, t2) {
|
|
|
4910
4941
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
4911
4942
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
4912
4943
|
*
|
|
4944
|
+
* ---
|
|
4945
|
+
*
|
|
4946
|
+
* The MIT License (MIT) (for portions derived from Feather)
|
|
4947
|
+
*
|
|
4948
|
+
* Copyright (c) 2013-2023 Cole Bemis
|
|
4949
|
+
*
|
|
4950
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4951
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
4952
|
+
* in the Software without restriction, including without limitation the rights
|
|
4953
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
4954
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
4955
|
+
* furnished to do so, subject to the following conditions:
|
|
4956
|
+
*
|
|
4957
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
4958
|
+
* copies or substantial portions of the Software.
|
|
4959
|
+
*
|
|
4960
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
4961
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
4962
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
4963
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
4964
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
4965
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
4966
|
+
* SOFTWARE.
|
|
4967
|
+
*
|
|
4913
4968
|
*/
|
|
4969
|
+
let n4 = /* @__PURE__ */ rest_props(t3, ["$$slots", "$$events", "$$legacy"]);
|
|
4970
|
+
const s3 = [["path", {
|
|
4971
|
+
d: "m21 21-4.34-4.34"
|
|
4972
|
+
}], ["circle", {
|
|
4973
|
+
cx: "11",
|
|
4974
|
+
cy: "11",
|
|
4975
|
+
r: "8"
|
|
4976
|
+
}]];
|
|
4914
4977
|
Icon(e4, spread_props({
|
|
4915
4978
|
name: "search"
|
|
4916
4979
|
}, () => n4, {
|
|
@@ -4919,19 +4982,19 @@ function Navigation(e2, t2) {
|
|
|
4919
4982
|
},
|
|
4920
4983
|
children: (e5, n5) => {
|
|
4921
4984
|
var s4 = comment();
|
|
4922
|
-
|
|
4985
|
+
snippet(first_child(s4), () => t3.children ?? noop), append(e5, s4);
|
|
4923
4986
|
},
|
|
4924
4987
|
$$slots: {
|
|
4925
4988
|
default: true
|
|
4926
4989
|
}
|
|
4927
|
-
}));
|
|
4990
|
+
})), pop();
|
|
4928
4991
|
})(child(f3), {
|
|
4929
4992
|
size: 18,
|
|
4930
4993
|
strokeWidth: 2.5,
|
|
4931
4994
|
class: "text-muted-foreground"
|
|
4932
4995
|
});
|
|
4933
4996
|
var p3 = sibling(f3, 2), h3 = child(sibling(a3, 2)), consequent = (e4) => {
|
|
4934
|
-
append(e4,
|
|
4997
|
+
append(e4, Ct());
|
|
4935
4998
|
}, alternate_1 = (e4) => {
|
|
4936
4999
|
var n4 = comment(), s3 = first_child(n4), consequent_1 = (e5) => {
|
|
4937
5000
|
append(e5, Mt());
|
|
@@ -5064,22 +5127,22 @@ function Navigation(e2, t2) {
|
|
|
5064
5127
|
async function toggleLike(e2, t2, n2, s2) {
|
|
5065
5128
|
var _a2;
|
|
5066
5129
|
if (!((_a2 = t2.currentGame) == null ? void 0 : _a2.id)) return;
|
|
5067
|
-
store_set(
|
|
5130
|
+
store_set(qn, !n2()), store_set(zn, s2() + (n2() ? 1 : -1)), // Save to localStorage
|
|
5068
5131
|
n2() ? localStorage.setItem(`playlight_${t2.currentGame.id}_liked`, "true") : localStorage.removeItem(`playlight_${t2.currentGame.id}_liked`);
|
|
5069
|
-
await
|
|
5132
|
+
await _t.toggleLike(t2.currentGame.id, n2()) || store_set(zn, s2() + (n2() ? -1 : 1));
|
|
5070
5133
|
}
|
|
5071
5134
|
delegate(["click"]);
|
|
5072
|
-
var
|
|
5135
|
+
var Pt = /* @__PURE__ */ from_html('<img alt="logo"/>'), Lt = /* @__PURE__ */ from_html('<div class="bg-muted size-5"></div>'), jt = /* @__PURE__ */ from_html('<div class="flex flex-wrap gap-1 text-start"><div class="w-full"><p class="text-muted-foreground text-sm text-nowrap select-none">Currently playing</p></div> <div class="flex w-full items-center gap-2"><!> <p> </p> <div class="mt-0.5 ml-auto flex items-center gap-2"><p class="text-muted-foreground text-sm"> </p> <button class="text-muted-foreground cursor-pointer transition hover:text-white"><!></button></div></div></div>');
|
|
5073
5136
|
function CurrentGameDisplay(e2, t2) {
|
|
5074
5137
|
push(t2, true);
|
|
5075
|
-
const $currentGameIsLiked = () => store_get(
|
|
5138
|
+
const $currentGameIsLiked = () => store_get(qn, "$currentGameIsLiked", n2), $currentGameLikeCount = () => store_get(zn, "$currentGameLikeCount", n2), [n2, s2] = setup_stores();
|
|
5076
5139
|
let i2 = /* @__PURE__ */ state(false);
|
|
5077
5140
|
user_effect(() => {
|
|
5078
5141
|
var _a2, _b3;
|
|
5079
|
-
null != ((_a2 = t2.currentGame) == null ? void 0 : _a2.id) && (store_set(
|
|
5142
|
+
null != ((_a2 = t2.currentGame) == null ? void 0 : _a2.id) && (store_set(qn, null !== localStorage.getItem(`playlight_${t2.currentGame.id}_liked`)), store_set(zn, ((_b3 = t2.currentGame) == null ? void 0 : _b3.likes) || 0));
|
|
5080
5143
|
});
|
|
5081
|
-
var o2 =
|
|
5082
|
-
var n3 =
|
|
5144
|
+
var o2 = jt(), a2 = sibling(child(o2), 2), l2 = child(a2), consequent = (e3) => {
|
|
5145
|
+
var n3 = Pt();
|
|
5083
5146
|
let s3;
|
|
5084
5147
|
template_effect((e4) => {
|
|
5085
5148
|
var _a2;
|
|
@@ -5090,7 +5153,7 @@ function CurrentGameDisplay(e2, t2) {
|
|
|
5090
5153
|
set(i2, true);
|
|
5091
5154
|
}), append(e3, n3);
|
|
5092
5155
|
}, alternate = (e3) => {
|
|
5093
|
-
append(e3,
|
|
5156
|
+
append(e3, Lt());
|
|
5094
5157
|
};
|
|
5095
5158
|
if_block(l2, (e3) => {
|
|
5096
5159
|
var _a2;
|
|
@@ -5104,17 +5167,13 @@ function CurrentGameDisplay(e2, t2) {
|
|
|
5104
5167
|
{
|
|
5105
5168
|
let e3 = user_derived(() => $currentGameIsLiked() ? "currentColor" : "none");
|
|
5106
5169
|
!(function Thumbs_up(e4, t3) {
|
|
5107
|
-
|
|
5108
|
-
d: "M7 10v12"
|
|
5109
|
-
}], ["path", {
|
|
5110
|
-
d: "M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z"
|
|
5111
|
-
}]];
|
|
5170
|
+
push(t3, true);
|
|
5112
5171
|
/**
|
|
5113
|
-
* @license lucide
|
|
5172
|
+
* @license @lucide/svelte v0.554.0 - ISC
|
|
5114
5173
|
*
|
|
5115
5174
|
* ISC License
|
|
5116
5175
|
*
|
|
5117
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-
|
|
5176
|
+
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
|
|
5118
5177
|
*
|
|
5119
5178
|
* Permission to use, copy, modify, and/or distribute this software for any
|
|
5120
5179
|
* purpose with or without fee is hereby granted, provided that the above
|
|
@@ -5128,7 +5187,37 @@ function CurrentGameDisplay(e2, t2) {
|
|
|
5128
5187
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
5129
5188
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
5130
5189
|
*
|
|
5190
|
+
* ---
|
|
5191
|
+
*
|
|
5192
|
+
* The MIT License (MIT) (for portions derived from Feather)
|
|
5193
|
+
*
|
|
5194
|
+
* Copyright (c) 2013-2023 Cole Bemis
|
|
5195
|
+
*
|
|
5196
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5197
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
5198
|
+
* in the Software without restriction, including without limitation the rights
|
|
5199
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
5200
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
5201
|
+
* furnished to do so, subject to the following conditions:
|
|
5202
|
+
*
|
|
5203
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
5204
|
+
* copies or substantial portions of the Software.
|
|
5205
|
+
*
|
|
5206
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
5207
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
5208
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
5209
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
5210
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
5211
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
5212
|
+
* SOFTWARE.
|
|
5213
|
+
*
|
|
5131
5214
|
*/
|
|
5215
|
+
let n3 = /* @__PURE__ */ rest_props(t3, ["$$slots", "$$events", "$$legacy"]);
|
|
5216
|
+
const s3 = [["path", {
|
|
5217
|
+
d: "M7 10v12"
|
|
5218
|
+
}], ["path", {
|
|
5219
|
+
d: "M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z"
|
|
5220
|
+
}]];
|
|
5132
5221
|
Icon(e4, spread_props({
|
|
5133
5222
|
name: "thumbs-up"
|
|
5134
5223
|
}, () => n3, {
|
|
@@ -5137,12 +5226,12 @@ function CurrentGameDisplay(e2, t2) {
|
|
|
5137
5226
|
},
|
|
5138
5227
|
children: (e5, n4) => {
|
|
5139
5228
|
var s4 = comment();
|
|
5140
|
-
|
|
5229
|
+
snippet(first_child(s4), () => t3.children ?? noop), append(e5, s4);
|
|
5141
5230
|
},
|
|
5142
5231
|
$$slots: {
|
|
5143
5232
|
default: true
|
|
5144
5233
|
}
|
|
5145
|
-
}));
|
|
5234
|
+
})), pop();
|
|
5146
5235
|
})(g2, {
|
|
5147
5236
|
size: 18,
|
|
5148
5237
|
strokeWidth: 2.5,
|
|
@@ -5168,7 +5257,7 @@ function restore(e2, t2, n2, s2, i2) {
|
|
|
5168
5257
|
});
|
|
5169
5258
|
}
|
|
5170
5259
|
delegate(["click"]);
|
|
5171
|
-
var
|
|
5260
|
+
var At = /* @__PURE__ */ from_html('<div class="bg-background/85 fixed bottom-4 left-4 z-2 touch-none border-1 p-4 shadow-lg backdrop-blur-xl max-sm:right-4 sm:w-72" role="button" tabindex="0"><!></div>'), Dt = /* @__PURE__ */ from_html('<div class="fixed bottom-0 z-3 shadow-xl max-sm:right-4 max-sm:left-4 sm:left-4 sm:w-72"><button class="bg-background/85 hover:bg-background/95 w-full rounded-t-md border px-4 py-1.5 backdrop-blur-sm transition" aria-label="Show game display"><div class="bg-muted-foreground mx-auto h-px w-16"></div></button></div>'), Wt = /* @__PURE__ */ from_html("<!> <!>", 1);
|
|
5172
5261
|
function DiscoveryDrawer(e2, t2) {
|
|
5173
5262
|
push(t2, true);
|
|
5174
5263
|
let n2 = /* @__PURE__ */ state(false), s2 = /* @__PURE__ */ state(0), i2 = /* @__PURE__ */ state(1), o2 = /* @__PURE__ */ state(false), a2 = 0;
|
|
@@ -5202,8 +5291,8 @@ function DiscoveryDrawer(e2, t2) {
|
|
|
5202
5291
|
}
|
|
5203
5292
|
}
|
|
5204
5293
|
onMount(() => animate2(250, (e3) => set(i2, e3, true)));
|
|
5205
|
-
var l2 =
|
|
5206
|
-
var n3 =
|
|
5294
|
+
var l2 = Wt(), c2 = first_child(l2), consequent = (e3) => {
|
|
5295
|
+
var n3 = At();
|
|
5207
5296
|
n3.__mousedown = startDrag, n3.__mousemove = drag, n3.__mouseup = endDrag, n3.__touchstart = startDrag, n3.__touchmove = drag, n3.__touchend = endDrag, CurrentGameDisplay(child(n3), {
|
|
5208
5297
|
get currentGame() {
|
|
5209
5298
|
return t2.currentGame;
|
|
@@ -5214,7 +5303,7 @@ function DiscoveryDrawer(e2, t2) {
|
|
|
5214
5303
|
t2.currentGame && !get$1(n2) && e3(consequent);
|
|
5215
5304
|
});
|
|
5216
5305
|
var u2 = sibling(c2, 2), consequent_1 = (e3) => {
|
|
5217
|
-
var t3 =
|
|
5306
|
+
var t3 = Dt(), o3 = child(t3);
|
|
5218
5307
|
o3.__mousedown = [restore, n2, s2, i2, animate2], o3.__touchstart = [restore, n2, s2, i2, animate2], transition(3, o3, () => fly, () => ({
|
|
5219
5308
|
delay: 150,
|
|
5220
5309
|
y: 30
|
|
@@ -5226,12 +5315,12 @@ function DiscoveryDrawer(e2, t2) {
|
|
|
5226
5315
|
}
|
|
5227
5316
|
delegate(["mousedown", "mousemove", "mouseup", "touchstart", "touchmove", "touchend"]);
|
|
5228
5317
|
function closeDiscoveryOnEmptyClick(e2, t2) {
|
|
5229
|
-
e2.target === e2.currentTarget && "touch" !== e2.pointerType && store_set(
|
|
5318
|
+
e2.target === e2.currentTarget && "touch" !== e2.pointerType && store_set(Nn, false);
|
|
5230
5319
|
}
|
|
5231
|
-
var
|
|
5320
|
+
var Bt = /* @__PURE__ */ from_html('<div class="-mx-10 mt-5 flex h-92 w-10 flex-col"><div class="flex h-full items-center justify-center"><div class="flex h-full w-full flex-col items-center justify-between"><div class="bg-muted-foreground h-1/5 w-px opacity-60 min-[1920px]:h-1/4"></div> <div class="text-muted-foreground origin-center -rotate-90 transform text-sm whitespace-nowrap select-none">From other categories</div> <div class="bg-muted-foreground h-1/5 w-px opacity-60 min-[1920px]:h-1/4"></div></div></div></div>'), on_click$1 = (e2, t2) => store_set(Nn, false), Nt = /* @__PURE__ */ from_html('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'), qt = /* @__PURE__ */ from_html('<div class="pointer-events-none flex h-4/5 items-center justify-center gap-4"><p class="text-white">No games found that match the filter.</p></div>'), zt = /* @__PURE__ */ from_html("<!> <!>", 1), Rt = /* @__PURE__ */ from_html('<div class="flex h-30 items-center"><!></div>'), Gt = /* @__PURE__ */ from_html('<div class="pointer-events-none mx-auto flex h-fit flex-wrap content-start justify-center gap-10 lg:max-w-4/5"><!> <div class="pointer-events-none flex min-h-10 w-full justify-center"><!></div></div>'), Ft = /* @__PURE__ */ from_html('<div class="bg-background/75 fixed inset-0 top-0 right-0 bottom-0 left-0 flex flex-col justify-center text-white backdrop-blur-md" id="playlight-discovery"><div class="pointer-events-none flex items-center justify-between p-4"><img alt="logo" class="pointer-events-none ml-3 w-50 select-none max-sm:w-40"/> <div class="mt-3.5 mr-4 flex items-center justify-evenly gap-8 overflow-hidden max-sm:mt-3"><button class="cursor-pointer text-white transition hover:opacity-50"><!></button></div></div> <div class="mx-auto px-6 max-sm:py-1 sm:pt-2 sm:pb-6"><!></div> <!> <div class="mask-fade show-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-1so2hji"><!></div> <a href="https://playlight.dev" target="_blank" class="text-muted-foreground fixed right-4 bottom-4 flex items-center gap-1 text-sm transition hover:text-white">Game dev? Join Playlight <!></a></div>');
|
|
5232
5321
|
function Discovery(e2, t2) {
|
|
5233
5322
|
push(t2, true);
|
|
5234
|
-
const $discoveryOpen = () => store_get(
|
|
5323
|
+
const $discoveryOpen = () => store_get(Nn, "$discoveryOpen", n2), [n2, s2] = setup_stores();
|
|
5235
5324
|
let i2, o2 = /* @__PURE__ */ state(true), a2 = /* @__PURE__ */ state(false), l2 = /* @__PURE__ */ state(void 0), c2 = /* @__PURE__ */ state(proxy([])), u2 = /* @__PURE__ */ state(void 0), d2 = /* @__PURE__ */ state(proxy([])), f2 = /* @__PURE__ */ state(1), p2 = /* @__PURE__ */ state(true), h2 = /* @__PURE__ */ state(false), g2 = /* @__PURE__ */ state(void 0), _2 = /* @__PURE__ */ state(void 0);
|
|
5236
5325
|
async function loadNewFeed() {
|
|
5237
5326
|
var _a2, _b3;
|
|
@@ -5243,7 +5332,7 @@ function Discovery(e2, t2) {
|
|
|
5243
5332
|
async function fetchGames() {
|
|
5244
5333
|
if (get$1(o2) || get$1(a2)) return;
|
|
5245
5334
|
1 === get$1(f2) ? set(o2, true) : set(a2, true);
|
|
5246
|
-
const e3 = get$1(h2) ? null : get$1(u2), t3 = await
|
|
5335
|
+
const e3 = get$1(h2) ? null : get$1(u2), t3 = await _t.getSuggestions(e3, get$1(f2)), n3 = (t3 == null ? void 0 : t3.games) || [], s3 = (t3 == null ? void 0 : t3.pageSize) || 15, i3 = n3.filter((e4) => !get$1(d2).some((t4) => t4.id === e4.id));
|
|
5247
5336
|
if (set(d2, [...get$1(d2), ...i3], true), n3.length < s3 ? !get$1(h2) && get$1(u2) ? (set(h2, true), set(f2, 1)) : set(p2, false) : set(f2, get$1(f2) + 1), // Disable loading state
|
|
5248
5337
|
set(o2, false), set(a2, false), get$1(p2) && get$1(g2)) {
|
|
5249
5338
|
get$1(g2).getBoundingClientRect().bottom <= window.innerHeight + 300 && fetchGames();
|
|
@@ -5262,25 +5351,21 @@ function Discovery(e2, t2) {
|
|
|
5262
5351
|
await (async (e3) => {
|
|
5263
5352
|
var t3 = to_array(e3, 2);
|
|
5264
5353
|
set(l2, t3[0], true), set(c2, t3[1], true);
|
|
5265
|
-
})(await Promise.all([
|
|
5354
|
+
})(await Promise.all([_t.getCurrentGameInfo(), _t.getCategories()])), set(u2, ((_a2 = get$1(l2)) == null ? void 0 : _a2.category) || ((_c2 = get$1(c2)) == null ? void 0 : _c2[((_b3 = get$1(c2)) == null ? void 0 : _b3.length) - 1]), true), set(o2, false), await loadNewFeed();
|
|
5266
5355
|
});
|
|
5267
|
-
var v2 =
|
|
5356
|
+
var v2 = Ft();
|
|
5268
5357
|
event("keydown", N, (e3) => {
|
|
5269
|
-
"Escape" == e3.key && store_set(
|
|
5358
|
+
"Escape" == e3.key && store_set(Nn, false);
|
|
5270
5359
|
}), v2.__pointerup = [closeDiscoveryOnEmptyClick, $discoveryOpen];
|
|
5271
5360
|
var m2 = child(v2), b2 = child(m2), y2 = child(sibling(b2, 2));
|
|
5272
5361
|
y2.__click = [on_click$1, $discoveryOpen], (function X(e3, t3) {
|
|
5273
|
-
|
|
5274
|
-
d: "M18 6 6 18"
|
|
5275
|
-
}], ["path", {
|
|
5276
|
-
d: "m6 6 12 12"
|
|
5277
|
-
}]];
|
|
5362
|
+
push(t3, true);
|
|
5278
5363
|
/**
|
|
5279
|
-
* @license lucide
|
|
5364
|
+
* @license @lucide/svelte v0.554.0 - ISC
|
|
5280
5365
|
*
|
|
5281
5366
|
* ISC License
|
|
5282
5367
|
*
|
|
5283
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-
|
|
5368
|
+
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
|
|
5284
5369
|
*
|
|
5285
5370
|
* Permission to use, copy, modify, and/or distribute this software for any
|
|
5286
5371
|
* purpose with or without fee is hereby granted, provided that the above
|
|
@@ -5294,7 +5379,37 @@ function Discovery(e2, t2) {
|
|
|
5294
5379
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
5295
5380
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
5296
5381
|
*
|
|
5382
|
+
* ---
|
|
5383
|
+
*
|
|
5384
|
+
* The MIT License (MIT) (for portions derived from Feather)
|
|
5385
|
+
*
|
|
5386
|
+
* Copyright (c) 2013-2023 Cole Bemis
|
|
5387
|
+
*
|
|
5388
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5389
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
5390
|
+
* in the Software without restriction, including without limitation the rights
|
|
5391
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
5392
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
5393
|
+
* furnished to do so, subject to the following conditions:
|
|
5394
|
+
*
|
|
5395
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
5396
|
+
* copies or substantial portions of the Software.
|
|
5397
|
+
*
|
|
5398
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
5399
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
5400
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
5401
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
5402
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
5403
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
5404
|
+
* SOFTWARE.
|
|
5405
|
+
*
|
|
5297
5406
|
*/
|
|
5407
|
+
let n3 = /* @__PURE__ */ rest_props(t3, ["$$slots", "$$events", "$$legacy"]);
|
|
5408
|
+
const s3 = [["path", {
|
|
5409
|
+
d: "M18 6 6 18"
|
|
5410
|
+
}], ["path", {
|
|
5411
|
+
d: "m6 6 12 12"
|
|
5412
|
+
}]];
|
|
5298
5413
|
Icon(e3, spread_props({
|
|
5299
5414
|
name: "x"
|
|
5300
5415
|
}, () => n3, {
|
|
@@ -5303,12 +5418,12 @@ function Discovery(e2, t2) {
|
|
|
5303
5418
|
},
|
|
5304
5419
|
children: (e4, n4) => {
|
|
5305
5420
|
var s4 = comment();
|
|
5306
|
-
|
|
5421
|
+
snippet(first_child(s4), () => t3.children ?? noop), append(e4, s4);
|
|
5307
5422
|
},
|
|
5308
5423
|
$$slots: {
|
|
5309
5424
|
default: true
|
|
5310
5425
|
}
|
|
5311
|
-
}));
|
|
5426
|
+
})), pop();
|
|
5312
5427
|
})(child(y2), {
|
|
5313
5428
|
size: 24,
|
|
5314
5429
|
strokeWidth: 2.5
|
|
@@ -5334,12 +5449,12 @@ function Discovery(e2, t2) {
|
|
|
5334
5449
|
});
|
|
5335
5450
|
};
|
|
5336
5451
|
if_block($2, (e3) => {
|
|
5337
|
-
store_get(
|
|
5452
|
+
store_get(Rn, "$sidebarEnabled", n2) && !store_get(Gn, "$sidebarCollapsed", n2) || e3(consequent);
|
|
5338
5453
|
});
|
|
5339
5454
|
var x2 = sibling($2, 2);
|
|
5340
5455
|
x2.__pointerup = [closeDiscoveryOnEmptyClick, $discoveryOpen];
|
|
5341
5456
|
var k2 = child(x2), consequent_1 = (e3) => {
|
|
5342
|
-
var t3 =
|
|
5457
|
+
var t3 = Nt();
|
|
5343
5458
|
Loader_circle(child(t3), {
|
|
5344
5459
|
class: "animate-spin opacity-75",
|
|
5345
5460
|
size: 50,
|
|
@@ -5347,14 +5462,14 @@ function Discovery(e2, t2) {
|
|
|
5347
5462
|
}), append(e3, t3);
|
|
5348
5463
|
}, alternate_1 = (e3) => {
|
|
5349
5464
|
var t3 = comment(), n3 = first_child(t3), consequent_2 = (e4) => {
|
|
5350
|
-
append(e4,
|
|
5465
|
+
append(e4, qt());
|
|
5351
5466
|
}, alternate = (e4) => {
|
|
5352
|
-
var t4 =
|
|
5467
|
+
var t4 = Gt(), n4 = child(t4);
|
|
5353
5468
|
each(n4, 17, () => get$1(d2), index, (e5, t5, n5) => {
|
|
5354
5469
|
const s4 = user_derived(() => get$1(d2).findIndex((e6) => e6.category !== get$1(u2) && !e6.featured));
|
|
5355
|
-
var i4 =
|
|
5470
|
+
var i4 = zt(), o3 = first_child(i4), consequent_3 = (e6) => {
|
|
5356
5471
|
((e7) => {
|
|
5357
|
-
append(e7,
|
|
5472
|
+
append(e7, Bt());
|
|
5358
5473
|
})(e6);
|
|
5359
5474
|
};
|
|
5360
5475
|
if_block(o3, (e6) => {
|
|
@@ -5366,7 +5481,7 @@ function Discovery(e2, t2) {
|
|
|
5366
5481
|
}), append(e5, i4);
|
|
5367
5482
|
});
|
|
5368
5483
|
var s3 = sibling(n4, 2), i3 = child(s3), consequent_4 = (e5) => {
|
|
5369
|
-
var t5 =
|
|
5484
|
+
var t5 = Rt();
|
|
5370
5485
|
Loader_circle(child(t5), {
|
|
5371
5486
|
class: "animate-spin opacity-75",
|
|
5372
5487
|
size: 40,
|
|
@@ -5386,19 +5501,13 @@ function Discovery(e2, t2) {
|
|
|
5386
5501
|
}), bind_this(x2, (e3) => set(_2, e3), () => get$1(_2));
|
|
5387
5502
|
var S2 = sibling(x2, 2);
|
|
5388
5503
|
!(function External_link(e3, t3) {
|
|
5389
|
-
|
|
5390
|
-
d: "M15 3h6v6"
|
|
5391
|
-
}], ["path", {
|
|
5392
|
-
d: "M10 14 21 3"
|
|
5393
|
-
}], ["path", {
|
|
5394
|
-
d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"
|
|
5395
|
-
}]];
|
|
5504
|
+
push(t3, true);
|
|
5396
5505
|
/**
|
|
5397
|
-
* @license lucide
|
|
5506
|
+
* @license @lucide/svelte v0.554.0 - ISC
|
|
5398
5507
|
*
|
|
5399
5508
|
* ISC License
|
|
5400
5509
|
*
|
|
5401
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-
|
|
5510
|
+
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
|
|
5402
5511
|
*
|
|
5403
5512
|
* Permission to use, copy, modify, and/or distribute this software for any
|
|
5404
5513
|
* purpose with or without fee is hereby granted, provided that the above
|
|
@@ -5412,7 +5521,39 @@ function Discovery(e2, t2) {
|
|
|
5412
5521
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
5413
5522
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
5414
5523
|
*
|
|
5524
|
+
* ---
|
|
5525
|
+
*
|
|
5526
|
+
* The MIT License (MIT) (for portions derived from Feather)
|
|
5527
|
+
*
|
|
5528
|
+
* Copyright (c) 2013-2023 Cole Bemis
|
|
5529
|
+
*
|
|
5530
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5531
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
5532
|
+
* in the Software without restriction, including without limitation the rights
|
|
5533
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
5534
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
5535
|
+
* furnished to do so, subject to the following conditions:
|
|
5536
|
+
*
|
|
5537
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
5538
|
+
* copies or substantial portions of the Software.
|
|
5539
|
+
*
|
|
5540
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
5541
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
5542
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
5543
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
5544
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
5545
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
5546
|
+
* SOFTWARE.
|
|
5547
|
+
*
|
|
5415
5548
|
*/
|
|
5549
|
+
let n3 = /* @__PURE__ */ rest_props(t3, ["$$slots", "$$events", "$$legacy"]);
|
|
5550
|
+
const s3 = [["path", {
|
|
5551
|
+
d: "M15 3h6v6"
|
|
5552
|
+
}], ["path", {
|
|
5553
|
+
d: "M10 14 21 3"
|
|
5554
|
+
}], ["path", {
|
|
5555
|
+
d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"
|
|
5556
|
+
}]];
|
|
5416
5557
|
Icon(e3, spread_props({
|
|
5417
5558
|
name: "external-link"
|
|
5418
5559
|
}, () => n3, {
|
|
@@ -5421,23 +5562,23 @@ function Discovery(e2, t2) {
|
|
|
5421
5562
|
},
|
|
5422
5563
|
children: (e4, n4) => {
|
|
5423
5564
|
var s4 = comment();
|
|
5424
|
-
|
|
5565
|
+
snippet(first_child(s4), () => t3.children ?? noop), append(e4, s4);
|
|
5425
5566
|
},
|
|
5426
5567
|
$$slots: {
|
|
5427
5568
|
default: true
|
|
5428
5569
|
}
|
|
5429
|
-
}));
|
|
5570
|
+
})), pop();
|
|
5430
5571
|
})(sibling(child(S2)), {
|
|
5431
5572
|
size: 14
|
|
5432
|
-
}), template_effect(() => set_attribute(b2, "src", store_get(
|
|
5573
|
+
}), template_effect(() => set_attribute(b2, "src", store_get(Fn, "$projectUrl", n2) + "/assets/images/logo-white-small.png")), transition(3, v2, () => blur, () => ({
|
|
5433
5574
|
duration: 250
|
|
5434
5575
|
})), append(e2, v2), pop(), s2();
|
|
5435
5576
|
}
|
|
5436
5577
|
delegate(["pointerup", "click"]);
|
|
5437
|
-
var
|
|
5578
|
+
var Ht = /* @__PURE__ */ from_html("<button><!></button>");
|
|
5438
5579
|
function Button(e2, t2) {
|
|
5439
5580
|
let n2 = prop(t2, "disabled", 3, false), s2 = prop(t2, "variant", 3, "primary");
|
|
5440
|
-
var i2 =
|
|
5581
|
+
var i2 = Ht();
|
|
5441
5582
|
i2.__click = function(...e3) {
|
|
5442
5583
|
var _a2;
|
|
5443
5584
|
(_a2 = t2.onclick) == null ? void 0 : _a2.apply(this, e3);
|
|
@@ -5446,11 +5587,11 @@ function Button(e2, t2) {
|
|
|
5446
5587
|
}), append(e2, i2);
|
|
5447
5588
|
}
|
|
5448
5589
|
async function fetchQuickSuggestions(e2 = 10, t2 = false) {
|
|
5449
|
-
const [n2, s2] = await Promise.all([
|
|
5590
|
+
const [n2, s2] = await Promise.all([_t.getCategories(), _t.getCurrentGameInfo()]), i2 = (s2 == null ? void 0 : s2.category) || (n2 == null ? void 0 : n2[(n2 == null ? void 0 : n2.length) - 1]), o2 = await _t.getSuggestions(i2, 1);
|
|
5450
5591
|
(o2 == null ? void 0 : o2.pageSize) < e2 && console.error("Threshold must be <= than page size to avoid always triggering a re-fetch!");
|
|
5451
5592
|
let a2 = (o2 == null ? void 0 : o2.games) || [];
|
|
5452
5593
|
if (t2 && (a2 = a2.slice(0, Math.ceil(e2 / 2))), a2.length < e2 || t2) {
|
|
5453
|
-
const e3 = await
|
|
5594
|
+
const e3 = await _t.getSuggestions(null, 1), t3 = ((e3 == null ? void 0 : e3.games) || []).filter((e4) => !a2.some((t4) => t4.id === e4.id));
|
|
5454
5595
|
a2 = [...a2, ...t3];
|
|
5455
5596
|
}
|
|
5456
5597
|
return a2.slice(0, e2);
|
|
@@ -5458,14 +5599,14 @@ async function fetchQuickSuggestions(e2 = 10, t2 = false) {
|
|
|
5458
5599
|
delegate(["click"]);
|
|
5459
5600
|
var on_pointerover = (e2, t2) => {
|
|
5460
5601
|
"touch" !== e2.pointerType && t2();
|
|
5461
|
-
},
|
|
5602
|
+
}, Yt = /* @__PURE__ */ from_html('<div class="fixed top-0 right-0 left-0 h-4 max-lg:hidden"></div>'), Vt = /* @__PURE__ */ from_html('<div class="relative"><img alt="" class="group-hover:outline-background relative h-7 w-7 bg-stone-200 outline outline-4 outline-white transition-colors select-none"/></div>'), Ut = /* @__PURE__ */ from_html('<div class="ml-3 flex items-center -space-x-2"></div>'), Kt = /* @__PURE__ */ from_html("More games <!>", 1), Xt = /* @__PURE__ */ from_html('<div role="menu" tabindex="0" class="bg-background/85 fixed top-4 right-4 left-4 mx-auto flex w-fit max-w-[calc(100%-2rem)] flex-wrap items-center gap-4 overflow-hidden border-1 p-4 shadow-lg backdrop-blur-xl"><p class="truncate text-lg font-semibold text-nowrap text-white"> </p> <!></div>'), Zt = /* @__PURE__ */ from_html("<!> <!>", 1);
|
|
5462
5603
|
delegate(["pointerover"]);
|
|
5463
|
-
var
|
|
5604
|
+
var Jt = /* @__PURE__ */ from_html("<!> <!> <!>", 1);
|
|
5464
5605
|
function App(e2, t2) {
|
|
5465
5606
|
push(t2, false);
|
|
5466
|
-
const $discoveryOpen = () => store_get(
|
|
5607
|
+
const $discoveryOpen = () => store_get(Nn, "$discoveryOpen", n2), $config = () => store_get(Wn, "$config", n2), [n2, s2] = setup_stores();
|
|
5467
5608
|
init();
|
|
5468
|
-
var i2 =
|
|
5609
|
+
var i2 = Jt(), o2 = first_child(i2), consequent = (e3) => {
|
|
5469
5610
|
Discovery(e3, {});
|
|
5470
5611
|
};
|
|
5471
5612
|
if_block(o2, (e3) => {
|
|
@@ -5490,20 +5631,20 @@ function App(e2, t2) {
|
|
|
5490
5631
|
}, 150);
|
|
5491
5632
|
}
|
|
5492
5633
|
let d2 = ["The cure for boredom.", "Ready for what’s next?", "Why stop the fun now?", "Games don’t play themselves.", "A new adventure awaits.", "There’s always time for one more."];
|
|
5493
|
-
var f2 =
|
|
5634
|
+
var f2 = Zt();
|
|
5494
5635
|
event("mousemove", N, function trackMouse(e5) {
|
|
5495
5636
|
var _a2, _b3;
|
|
5496
5637
|
!s3() || ((_a2 = get$1(o3)) == null ? void 0 : _a2.contains(e5.target)) || ((_b3 = get$1(a3)) == null ? void 0 : _b3.contains(e5.target)) || (!get$1(u2) && get$1(c2) && set(u2, setTimeout(() => set(c2, false), 1500), true), n3 = Date.now());
|
|
5497
5638
|
});
|
|
5498
5639
|
var p2 = first_child(f2), consequent2 = (e5) => {
|
|
5499
|
-
var t5 =
|
|
5640
|
+
var t5 = Yt();
|
|
5500
5641
|
t5.__pointerover = [on_pointerover, handleBarTrigger], bind_this(t5, (e6) => set(o3, e6), () => get$1(o3)), append(e5, t5);
|
|
5501
5642
|
};
|
|
5502
5643
|
if_block(p2, (e5) => {
|
|
5503
5644
|
s3() && e5(consequent2);
|
|
5504
5645
|
});
|
|
5505
5646
|
var h2 = sibling(p2, 2), consequent_2 = (e5) => {
|
|
5506
|
-
var n4 =
|
|
5647
|
+
var n4 = Xt(), s4 = child(n4), i4 = child(s4);
|
|
5507
5648
|
Button(sibling(s4, 2), {
|
|
5508
5649
|
class: "group",
|
|
5509
5650
|
onclick: () => {
|
|
@@ -5511,8 +5652,8 @@ function App(e2, t2) {
|
|
|
5511
5652
|
(_a2 = t4.onIntent) == null ? void 0 : _a2.call(t4), setTimeout(() => set(c2, false), 150);
|
|
5512
5653
|
},
|
|
5513
5654
|
children: (e6, t5) => {
|
|
5514
|
-
var n5 =
|
|
5515
|
-
var t6 =
|
|
5655
|
+
var n5 = Kt(), s5 = sibling(first_child(n5)), consequent_12 = (e7) => {
|
|
5656
|
+
var t6 = Ut();
|
|
5516
5657
|
each(t6, 21, () => get$1(l3), index, (e8, t7, n6) => {
|
|
5517
5658
|
var s6 = Vt();
|
|
5518
5659
|
let i5;
|
|
@@ -5554,7 +5695,7 @@ function App(e2, t2) {
|
|
|
5554
5695
|
return get$1(t3);
|
|
5555
5696
|
},
|
|
5556
5697
|
onIntent: () => {
|
|
5557
|
-
$discoveryOpen() || store_set(
|
|
5698
|
+
$discoveryOpen() || store_set(Nn, true);
|
|
5558
5699
|
}
|
|
5559
5700
|
});
|
|
5560
5701
|
}
|
|
@@ -5562,13 +5703,13 @@ function App(e2, t2) {
|
|
|
5562
5703
|
Toaster(e3, {});
|
|
5563
5704
|
};
|
|
5564
5705
|
if_block(l2, (e3) => {
|
|
5565
|
-
($discoveryOpen() || store_get(
|
|
5706
|
+
($discoveryOpen() || store_get(Rn, "$sidebarEnabled", n2)) && e3(consequent_1);
|
|
5566
5707
|
}), append(e2, i2), pop(), s2();
|
|
5567
5708
|
}
|
|
5568
|
-
var
|
|
5709
|
+
var Qt = /* @__PURE__ */ from_html('<div class="flex h-full w-full items-center justify-center svelte-129hoe0"><!></div>'), en = /* @__PURE__ */ from_html('<div class="scroll-container grid grid-cols-2 gap-6 svelte-129hoe0"><div class="flex flex-col gap-6 svelte-129hoe0"><div class="animate-scroll-column flex flex-col gap-6 svelte-129hoe0"></div></div> <div class="mt-15 flex flex-col gap-6 svelte-129hoe0"><div class="animate-scroll-column-offset flex flex-col gap-6 svelte-129hoe0"></div></div></div>'), tn = /* @__PURE__ */ from_html('<div class="flex h-full w-full items-center justify-center svelte-129hoe0"><p class="text-muted-foreground svelte-129hoe0">Error – See console</p></div>'), nn = /* @__PURE__ */ from_html("View all games <!>", 1), rn = /* @__PURE__ */ from_html("Random game <!>", 1), on_mousedown = (e2, t2) => t2(e2.clientY), on_touchstart = (e2, t2) => t2(e2.touches[0].clientY), sn = /* @__PURE__ */ from_html('<img alt="icon" class="pointer-events-none aspect-square w-8 svelte-129hoe0"/>'), an = /* @__PURE__ */ from_html('<div role="button" tabindex="0"><!> <!></div>'), ln = /* @__PURE__ */ from_html('<div><img alt="logo" class="pointer-events-none mx-auto mt-4 -mb-1 w-50 select-none svelte-129hoe0"/> <div class="grow-1 overflow-hidden mask-y-from-90% mask-y-to-100% p-6 py-12 transition-opacity not-hover:opacity-75 svelte-129hoe0"><!></div> <div class="flex w-full flex-col items-center gap-4 px-4 svelte-129hoe0"><!> <!></div> <div class="w-full svelte-129hoe0"><div class="mt-auto border-y p-6 py-4 svelte-129hoe0"><!></div> <div class="flex justify-end p-0 svelte-129hoe0"><!></div></div></div> <!>', 1);
|
|
5569
5710
|
function Sidebar(e2, t2) {
|
|
5570
5711
|
push(t2, true);
|
|
5571
|
-
const $sidebarCollapsed = () => store_get(
|
|
5712
|
+
const $sidebarCollapsed = () => store_get(Gn, "$sidebarCollapsed", n2), $projectUrl = () => store_get(Fn, "$projectUrl", n2), $discoveryOpen = () => store_get(Nn, "$discoveryOpen", n2), [n2, s2] = setup_stores();
|
|
5572
5713
|
let i2 = /* @__PURE__ */ state(false), o2 = /* @__PURE__ */ state(void 0), a2 = /* @__PURE__ */ state(0), l2 = /* @__PURE__ */ state(null), c2 = /* @__PURE__ */ state(proxy([])), u2 = user_derived(() => {
|
|
5573
5714
|
var _a2;
|
|
5574
5715
|
return ((_a2 = get$1(c2)) == null ? void 0 : _a2.filter((e3, t3) => t3 % 2 == 0)) || [];
|
|
@@ -5591,11 +5732,11 @@ function Sidebar(e2, t2) {
|
|
|
5591
5732
|
user_pre_effect(() => {
|
|
5592
5733
|
var _a2;
|
|
5593
5734
|
const e3 = document.documentElement.clientWidth <= 768;
|
|
5594
|
-
store_set(
|
|
5735
|
+
store_set(Gn, e3 || Boolean((_a2 = getSidebarState()) == null ? void 0 : _a2.collapsed));
|
|
5595
5736
|
}), onMount(async () => {
|
|
5596
5737
|
var _a2;
|
|
5597
5738
|
return set(p2, ((_a2 = getSidebarState()) == null ? void 0 : _a2.buttonY) ?? get$1(p2), true), // Fetch data
|
|
5598
|
-
set(i2, true), set(c2, await fetchQuickSuggestions(14, true), true), set(o2, await
|
|
5739
|
+
set(i2, true), set(c2, await fetchQuickSuggestions(14, true), true), set(o2, await _t.getCurrentGameInfo(), true), set(i2, false), on(window, "touchmove", handleTouchMove, {
|
|
5599
5740
|
passive: false
|
|
5600
5741
|
});
|
|
5601
5742
|
});
|
|
@@ -5623,14 +5764,14 @@ function Sidebar(e2, t2) {
|
|
|
5623
5764
|
set(a2, (get$1(a2) % e4 + e4) % e4);
|
|
5624
5765
|
}
|
|
5625
5766
|
}
|
|
5626
|
-
var m2 =
|
|
5767
|
+
var m2 = ln();
|
|
5627
5768
|
event("mousemove", N, function handleMouseMove(e3) {
|
|
5628
5769
|
get$1(h2) && handleDragMove(e3.clientY);
|
|
5629
5770
|
}), event("mouseup", N, () => set(h2, false)), event("touchend", N, () => set(h2, false)), event("resize", N, () => {
|
|
5630
|
-
document.documentElement.clientWidth <= 768 && store_set(
|
|
5771
|
+
document.documentElement.clientWidth <= 768 && store_set(Gn, true);
|
|
5631
5772
|
});
|
|
5632
5773
|
var b2 = first_child(m2), y2 = child(b2), w2 = sibling(y2, 2), $2 = child(w2), consequent = (e3) => {
|
|
5633
|
-
var t3 =
|
|
5774
|
+
var t3 = Qt();
|
|
5634
5775
|
Loader_circle(child(t3), {
|
|
5635
5776
|
class: "animate-spin opacity-75",
|
|
5636
5777
|
size: 30,
|
|
@@ -5638,7 +5779,7 @@ function Sidebar(e2, t2) {
|
|
|
5638
5779
|
}), append(e3, t3);
|
|
5639
5780
|
}, alternate_1 = (e3) => {
|
|
5640
5781
|
var t3 = comment(), n3 = first_child(t3), consequent_1 = (e4) => {
|
|
5641
|
-
var t4 =
|
|
5782
|
+
var t4 = en(), n4 = child(t4), s3 = child(n4);
|
|
5642
5783
|
let i3;
|
|
5643
5784
|
each(s3, 21, () => [...get$1(u2), ...get$1(u2), ...get$1(u2)], index, (e5, t5) => {
|
|
5644
5785
|
GameCard(e5, {
|
|
@@ -5665,7 +5806,7 @@ function Sidebar(e2, t2) {
|
|
|
5665
5806
|
transform: `translateY(calc(-33.333% + ${get$1(a2) ?? ""}px))`
|
|
5666
5807
|
})]), event("wheel", t4, handleWheel), append(e4, t4);
|
|
5667
5808
|
}, alternate = (e4) => {
|
|
5668
|
-
append(e4,
|
|
5809
|
+
append(e4, tn());
|
|
5669
5810
|
};
|
|
5670
5811
|
if_block(n3, (e4) => {
|
|
5671
5812
|
var _a2;
|
|
@@ -5678,14 +5819,60 @@ function Sidebar(e2, t2) {
|
|
|
5678
5819
|
var x2 = sibling(w2, 2), k2 = child(x2);
|
|
5679
5820
|
Button(k2, {
|
|
5680
5821
|
class: "w-full",
|
|
5681
|
-
onclick: () => store_set(
|
|
5822
|
+
onclick: () => store_set(Nn, true),
|
|
5682
5823
|
get disabled() {
|
|
5683
5824
|
return $discoveryOpen();
|
|
5684
5825
|
},
|
|
5685
5826
|
children: (e3, t3) => {
|
|
5686
|
-
var n3 =
|
|
5827
|
+
var n3 = nn();
|
|
5687
5828
|
!(function Gamepad_2(e4, t4) {
|
|
5688
|
-
|
|
5829
|
+
push(t4, true);
|
|
5830
|
+
/**
|
|
5831
|
+
* @license @lucide/svelte v0.554.0 - ISC
|
|
5832
|
+
*
|
|
5833
|
+
* ISC License
|
|
5834
|
+
*
|
|
5835
|
+
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
|
|
5836
|
+
*
|
|
5837
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
5838
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
5839
|
+
* copyright notice and this permission notice appear in all copies.
|
|
5840
|
+
*
|
|
5841
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
5842
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
5843
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
5844
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
5845
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
5846
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
5847
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
5848
|
+
*
|
|
5849
|
+
* ---
|
|
5850
|
+
*
|
|
5851
|
+
* The MIT License (MIT) (for portions derived from Feather)
|
|
5852
|
+
*
|
|
5853
|
+
* Copyright (c) 2013-2023 Cole Bemis
|
|
5854
|
+
*
|
|
5855
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5856
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
5857
|
+
* in the Software without restriction, including without limitation the rights
|
|
5858
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
5859
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
5860
|
+
* furnished to do so, subject to the following conditions:
|
|
5861
|
+
*
|
|
5862
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
5863
|
+
* copies or substantial portions of the Software.
|
|
5864
|
+
*
|
|
5865
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
5866
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
5867
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
5868
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
5869
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
5870
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
5871
|
+
* SOFTWARE.
|
|
5872
|
+
*
|
|
5873
|
+
*/
|
|
5874
|
+
let n4 = /* @__PURE__ */ rest_props(t4, ["$$slots", "$$events", "$$legacy"]);
|
|
5875
|
+
const s3 = [["line", {
|
|
5689
5876
|
x1: "6",
|
|
5690
5877
|
x2: "10",
|
|
5691
5878
|
y1: "11",
|
|
@@ -5708,26 +5895,6 @@ function Sidebar(e2, t2) {
|
|
|
5708
5895
|
}], ["path", {
|
|
5709
5896
|
d: "M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z"
|
|
5710
5897
|
}]];
|
|
5711
|
-
/**
|
|
5712
|
-
* @license lucide-svelte v0.476.0 - ISC
|
|
5713
|
-
*
|
|
5714
|
-
* ISC License
|
|
5715
|
-
*
|
|
5716
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
|
5717
|
-
*
|
|
5718
|
-
* Permission to use, copy, modify, and/or distribute this software for any
|
|
5719
|
-
* purpose with or without fee is hereby granted, provided that the above
|
|
5720
|
-
* copyright notice and this permission notice appear in all copies.
|
|
5721
|
-
*
|
|
5722
|
-
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
5723
|
-
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
5724
|
-
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
5725
|
-
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
5726
|
-
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
5727
|
-
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
5728
|
-
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
5729
|
-
*
|
|
5730
|
-
*/
|
|
5731
5898
|
Icon(e4, spread_props({
|
|
5732
5899
|
name: "gamepad-2"
|
|
5733
5900
|
}, () => n4, {
|
|
@@ -5736,12 +5903,12 @@ function Sidebar(e2, t2) {
|
|
|
5736
5903
|
},
|
|
5737
5904
|
children: (e5, n5) => {
|
|
5738
5905
|
var s4 = comment();
|
|
5739
|
-
|
|
5906
|
+
snippet(first_child(s4), () => t4.children ?? noop), append(e5, s4);
|
|
5740
5907
|
},
|
|
5741
5908
|
$$slots: {
|
|
5742
5909
|
default: true
|
|
5743
5910
|
}
|
|
5744
|
-
}));
|
|
5911
|
+
})), pop();
|
|
5745
5912
|
})(sibling(first_child(n3)), {
|
|
5746
5913
|
style: "margin-top: -1px;"
|
|
5747
5914
|
}), append(e3, n3);
|
|
@@ -5758,32 +5925,15 @@ function Sidebar(e2, t2) {
|
|
|
5758
5925
|
openGame(t3 == null ? void 0 : t3.domain, t3 == null ? void 0 : t3.id);
|
|
5759
5926
|
},
|
|
5760
5927
|
children: (e3, t3) => {
|
|
5761
|
-
var n3 =
|
|
5928
|
+
var n3 = rn();
|
|
5762
5929
|
!(function Dices(e4, t4) {
|
|
5763
|
-
|
|
5764
|
-
width: "12",
|
|
5765
|
-
height: "12",
|
|
5766
|
-
x: "2",
|
|
5767
|
-
y: "10",
|
|
5768
|
-
rx: "2",
|
|
5769
|
-
ry: "2"
|
|
5770
|
-
}], ["path", {
|
|
5771
|
-
d: "m17.92 14 3.5-3.5a2.24 2.24 0 0 0 0-3l-5-4.92a2.24 2.24 0 0 0-3 0L10 6"
|
|
5772
|
-
}], ["path", {
|
|
5773
|
-
d: "M6 18h.01"
|
|
5774
|
-
}], ["path", {
|
|
5775
|
-
d: "M10 14h.01"
|
|
5776
|
-
}], ["path", {
|
|
5777
|
-
d: "M15 6h.01"
|
|
5778
|
-
}], ["path", {
|
|
5779
|
-
d: "M18 9h.01"
|
|
5780
|
-
}]];
|
|
5930
|
+
push(t4, true);
|
|
5781
5931
|
/**
|
|
5782
|
-
* @license lucide
|
|
5932
|
+
* @license @lucide/svelte v0.554.0 - ISC
|
|
5783
5933
|
*
|
|
5784
5934
|
* ISC License
|
|
5785
5935
|
*
|
|
5786
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-
|
|
5936
|
+
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
|
|
5787
5937
|
*
|
|
5788
5938
|
* Permission to use, copy, modify, and/or distribute this software for any
|
|
5789
5939
|
* purpose with or without fee is hereby granted, provided that the above
|
|
@@ -5797,7 +5947,50 @@ function Sidebar(e2, t2) {
|
|
|
5797
5947
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
5798
5948
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
5799
5949
|
*
|
|
5950
|
+
* ---
|
|
5951
|
+
*
|
|
5952
|
+
* The MIT License (MIT) (for portions derived from Feather)
|
|
5953
|
+
*
|
|
5954
|
+
* Copyright (c) 2013-2023 Cole Bemis
|
|
5955
|
+
*
|
|
5956
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5957
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
5958
|
+
* in the Software without restriction, including without limitation the rights
|
|
5959
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
5960
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
5961
|
+
* furnished to do so, subject to the following conditions:
|
|
5962
|
+
*
|
|
5963
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
5964
|
+
* copies or substantial portions of the Software.
|
|
5965
|
+
*
|
|
5966
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
5967
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
5968
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
5969
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
5970
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
5971
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
5972
|
+
* SOFTWARE.
|
|
5973
|
+
*
|
|
5800
5974
|
*/
|
|
5975
|
+
let n4 = /* @__PURE__ */ rest_props(t4, ["$$slots", "$$events", "$$legacy"]);
|
|
5976
|
+
const s3 = [["rect", {
|
|
5977
|
+
width: "12",
|
|
5978
|
+
height: "12",
|
|
5979
|
+
x: "2",
|
|
5980
|
+
y: "10",
|
|
5981
|
+
rx: "2",
|
|
5982
|
+
ry: "2"
|
|
5983
|
+
}], ["path", {
|
|
5984
|
+
d: "m17.92 14 3.5-3.5a2.24 2.24 0 0 0 0-3l-5-4.92a2.24 2.24 0 0 0-3 0L10 6"
|
|
5985
|
+
}], ["path", {
|
|
5986
|
+
d: "M6 18h.01"
|
|
5987
|
+
}], ["path", {
|
|
5988
|
+
d: "M10 14h.01"
|
|
5989
|
+
}], ["path", {
|
|
5990
|
+
d: "M15 6h.01"
|
|
5991
|
+
}], ["path", {
|
|
5992
|
+
d: "M18 9h.01"
|
|
5993
|
+
}]];
|
|
5801
5994
|
Icon(e4, spread_props({
|
|
5802
5995
|
name: "dices"
|
|
5803
5996
|
}, () => n4, {
|
|
@@ -5806,12 +5999,12 @@ function Sidebar(e2, t2) {
|
|
|
5806
5999
|
},
|
|
5807
6000
|
children: (e5, n5) => {
|
|
5808
6001
|
var s4 = comment();
|
|
5809
|
-
|
|
6002
|
+
snippet(first_child(s4), () => t4.children ?? noop), append(e5, s4);
|
|
5810
6003
|
},
|
|
5811
6004
|
$$slots: {
|
|
5812
6005
|
default: true
|
|
5813
6006
|
}
|
|
5814
|
-
}));
|
|
6007
|
+
})), pop();
|
|
5815
6008
|
})(sibling(first_child(n3)), {
|
|
5816
6009
|
style: "margin-top: -2px;"
|
|
5817
6010
|
}), append(e3, n3);
|
|
@@ -5829,21 +6022,17 @@ function Sidebar(e2, t2) {
|
|
|
5829
6022
|
variant: "secondary",
|
|
5830
6023
|
class: "text-muted-foreground border-l outline-none!",
|
|
5831
6024
|
onclick: () => {
|
|
5832
|
-
store_set(
|
|
6025
|
+
store_set(Gn, true), saveSidebarState();
|
|
5833
6026
|
},
|
|
5834
6027
|
children: (e3, t3) => {
|
|
5835
6028
|
!(function Chevrons_right(e4, t4) {
|
|
5836
|
-
|
|
5837
|
-
d: "m6 17 5-5-5-5"
|
|
5838
|
-
}], ["path", {
|
|
5839
|
-
d: "m13 17 5-5-5-5"
|
|
5840
|
-
}]];
|
|
6029
|
+
push(t4, true);
|
|
5841
6030
|
/**
|
|
5842
|
-
* @license lucide
|
|
6031
|
+
* @license @lucide/svelte v0.554.0 - ISC
|
|
5843
6032
|
*
|
|
5844
6033
|
* ISC License
|
|
5845
6034
|
*
|
|
5846
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-
|
|
6035
|
+
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
|
|
5847
6036
|
*
|
|
5848
6037
|
* Permission to use, copy, modify, and/or distribute this software for any
|
|
5849
6038
|
* purpose with or without fee is hereby granted, provided that the above
|
|
@@ -5857,7 +6046,37 @@ function Sidebar(e2, t2) {
|
|
|
5857
6046
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
5858
6047
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
5859
6048
|
*
|
|
6049
|
+
* ---
|
|
6050
|
+
*
|
|
6051
|
+
* The MIT License (MIT) (for portions derived from Feather)
|
|
6052
|
+
*
|
|
6053
|
+
* Copyright (c) 2013-2023 Cole Bemis
|
|
6054
|
+
*
|
|
6055
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6056
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
6057
|
+
* in the Software without restriction, including without limitation the rights
|
|
6058
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
6059
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
6060
|
+
* furnished to do so, subject to the following conditions:
|
|
6061
|
+
*
|
|
6062
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
6063
|
+
* copies or substantial portions of the Software.
|
|
6064
|
+
*
|
|
6065
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
6066
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
6067
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
6068
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
6069
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
6070
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
6071
|
+
* SOFTWARE.
|
|
6072
|
+
*
|
|
5860
6073
|
*/
|
|
6074
|
+
let n3 = /* @__PURE__ */ rest_props(t4, ["$$slots", "$$events", "$$legacy"]);
|
|
6075
|
+
const s3 = [["path", {
|
|
6076
|
+
d: "m6 17 5-5-5-5"
|
|
6077
|
+
}], ["path", {
|
|
6078
|
+
d: "m13 17 5-5-5-5"
|
|
6079
|
+
}]];
|
|
5861
6080
|
Icon(e4, spread_props({
|
|
5862
6081
|
name: "chevrons-right"
|
|
5863
6082
|
}, () => n3, {
|
|
@@ -5866,12 +6085,12 @@ function Sidebar(e2, t2) {
|
|
|
5866
6085
|
},
|
|
5867
6086
|
children: (e5, n4) => {
|
|
5868
6087
|
var s4 = comment();
|
|
5869
|
-
|
|
6088
|
+
snippet(first_child(s4), () => t4.children ?? noop), append(e5, s4);
|
|
5870
6089
|
},
|
|
5871
6090
|
$$slots: {
|
|
5872
6091
|
default: true
|
|
5873
6092
|
}
|
|
5874
|
-
}));
|
|
6093
|
+
})), pop();
|
|
5875
6094
|
})(e3, {});
|
|
5876
6095
|
},
|
|
5877
6096
|
$$slots: {
|
|
@@ -5879,12 +6098,58 @@ function Sidebar(e2, t2) {
|
|
|
5879
6098
|
}
|
|
5880
6099
|
});
|
|
5881
6100
|
var C2 = sibling(b2, 2), consequent_2 = (e3) => {
|
|
5882
|
-
var t3 =
|
|
6101
|
+
var t3 = an();
|
|
5883
6102
|
let n3;
|
|
5884
6103
|
t3.__mousedown = [on_mousedown, handleDragStart], t3.__touchstart = [on_touchstart, handleDragStart];
|
|
5885
6104
|
var s3 = child(t3);
|
|
5886
6105
|
!(function Grip_vertical(e4, t4) {
|
|
5887
|
-
|
|
6106
|
+
push(t4, true);
|
|
6107
|
+
/**
|
|
6108
|
+
* @license @lucide/svelte v0.554.0 - ISC
|
|
6109
|
+
*
|
|
6110
|
+
* ISC License
|
|
6111
|
+
*
|
|
6112
|
+
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
|
|
6113
|
+
*
|
|
6114
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
6115
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
6116
|
+
* copyright notice and this permission notice appear in all copies.
|
|
6117
|
+
*
|
|
6118
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
6119
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
6120
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
6121
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
6122
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
6123
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
6124
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
6125
|
+
*
|
|
6126
|
+
* ---
|
|
6127
|
+
*
|
|
6128
|
+
* The MIT License (MIT) (for portions derived from Feather)
|
|
6129
|
+
*
|
|
6130
|
+
* Copyright (c) 2013-2023 Cole Bemis
|
|
6131
|
+
*
|
|
6132
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6133
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
6134
|
+
* in the Software without restriction, including without limitation the rights
|
|
6135
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
6136
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
6137
|
+
* furnished to do so, subject to the following conditions:
|
|
6138
|
+
*
|
|
6139
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
6140
|
+
* copies or substantial portions of the Software.
|
|
6141
|
+
*
|
|
6142
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
6143
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
6144
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
6145
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
6146
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
6147
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
6148
|
+
* SOFTWARE.
|
|
6149
|
+
*
|
|
6150
|
+
*/
|
|
6151
|
+
let n4 = /* @__PURE__ */ rest_props(t4, ["$$slots", "$$events", "$$legacy"]);
|
|
6152
|
+
const s4 = [["circle", {
|
|
5888
6153
|
cx: "9",
|
|
5889
6154
|
cy: "12",
|
|
5890
6155
|
r: "1"
|
|
@@ -5909,26 +6174,6 @@ function Sidebar(e2, t2) {
|
|
|
5909
6174
|
cy: "19",
|
|
5910
6175
|
r: "1"
|
|
5911
6176
|
}]];
|
|
5912
|
-
/**
|
|
5913
|
-
* @license lucide-svelte v0.476.0 - ISC
|
|
5914
|
-
*
|
|
5915
|
-
* ISC License
|
|
5916
|
-
*
|
|
5917
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
|
5918
|
-
*
|
|
5919
|
-
* Permission to use, copy, modify, and/or distribute this software for any
|
|
5920
|
-
* purpose with or without fee is hereby granted, provided that the above
|
|
5921
|
-
* copyright notice and this permission notice appear in all copies.
|
|
5922
|
-
*
|
|
5923
|
-
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
5924
|
-
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
5925
|
-
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
5926
|
-
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
5927
|
-
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
5928
|
-
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
5929
|
-
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
5930
|
-
*
|
|
5931
|
-
*/
|
|
5932
6177
|
Icon(e4, spread_props({
|
|
5933
6178
|
name: "grip-vertical"
|
|
5934
6179
|
}, () => n4, {
|
|
@@ -5937,21 +6182,21 @@ function Sidebar(e2, t2) {
|
|
|
5937
6182
|
},
|
|
5938
6183
|
children: (e5, n5) => {
|
|
5939
6184
|
var s5 = comment();
|
|
5940
|
-
|
|
6185
|
+
snippet(first_child(s5), () => t4.children ?? noop), append(e5, s5);
|
|
5941
6186
|
},
|
|
5942
6187
|
$$slots: {
|
|
5943
6188
|
default: true
|
|
5944
6189
|
}
|
|
5945
|
-
}));
|
|
6190
|
+
})), pop();
|
|
5946
6191
|
})(s3, {
|
|
5947
6192
|
class: "text-muted-foreground aspect-square"
|
|
5948
6193
|
}), Button(sibling(s3, 2), {
|
|
5949
6194
|
variant: "ghost",
|
|
5950
6195
|
onclick: () => {
|
|
5951
|
-
document.documentElement.clientWidth > 768 ? (store_set(
|
|
6196
|
+
document.documentElement.clientWidth > 768 ? (store_set(Gn, false), saveSidebarState()) : store_set(Nn, true);
|
|
5952
6197
|
},
|
|
5953
6198
|
children: (e4, t4) => {
|
|
5954
|
-
var n4 =
|
|
6199
|
+
var n4 = sn();
|
|
5955
6200
|
template_effect(() => set_attribute(n4, "src", $projectUrl() + "/assets/images/icon-white-small.png")), append(e4, n4);
|
|
5956
6201
|
},
|
|
5957
6202
|
$$slots: {
|
|
@@ -5970,27 +6215,27 @@ function Sidebar(e2, t2) {
|
|
|
5970
6215
|
}), append(e2, m2), pop(), s2();
|
|
5971
6216
|
}
|
|
5972
6217
|
delegate(["mousedown", "touchstart"]);
|
|
5973
|
-
let
|
|
6218
|
+
let un = null, dn = null, fn = false, pn = null, hn = /* @__PURE__ */ new Map(), gn = null;
|
|
5974
6219
|
function activateCSSViewportOverride(e2) {
|
|
5975
|
-
const
|
|
6220
|
+
const update = () => {
|
|
5976
6221
|
const t2 = e2.clientWidth, n2 = document.documentElement.clientWidth - t2;
|
|
5977
6222
|
Array.from(document.styleSheets).forEach((e3) => (function replaceStylesheet(e4, t3, n3, s2) {
|
|
5978
6223
|
var _a2;
|
|
5979
6224
|
const i2 = e4.ownerNode;
|
|
5980
6225
|
if (!i2 || e4.href && /playlight/i.test(e4.href)) return;
|
|
5981
6226
|
try {
|
|
5982
|
-
if (
|
|
5983
|
-
transformStylesheet(i2,
|
|
6227
|
+
if (hn.has(i2))
|
|
6228
|
+
transformStylesheet(i2, hn.get(i2).originalCSS, t3, n3, s2);
|
|
5984
6229
|
else {
|
|
5985
6230
|
if (!((_a2 = e4.cssRules) == null ? void 0 : _a2.length)) return;
|
|
5986
6231
|
const o2 = Array.from(e4.cssRules).map((e5) => e5.cssText).join("\n");
|
|
5987
6232
|
if ("LINK" === i2.tagName) {
|
|
5988
6233
|
const e5 = document.createElement("style");
|
|
5989
|
-
e5.setAttribute("data-playlight-original-href", i2.href),
|
|
6234
|
+
e5.setAttribute("data-playlight-original-href", i2.href), hn.set(e5, {
|
|
5990
6235
|
originalCSS: o2,
|
|
5991
6236
|
originalElement: i2
|
|
5992
6237
|
}), i2.replaceWith(e5), transformStylesheet(e5, o2, t3, n3, s2);
|
|
5993
|
-
} else
|
|
6238
|
+
} else hn.set(i2, {
|
|
5994
6239
|
originalCSS: o2,
|
|
5995
6240
|
originalElement: null
|
|
5996
6241
|
}), transformStylesheet(i2, o2, t3, n3, s2);
|
|
@@ -6000,15 +6245,15 @@ function activateCSSViewportOverride(e2) {
|
|
|
6000
6245
|
}
|
|
6001
6246
|
})(e3, t2, window.innerHeight, n2));
|
|
6002
6247
|
}, scheduleUpdate = () => {
|
|
6003
|
-
|
|
6004
|
-
|
|
6248
|
+
fn || (fn = true, requestAnimationFrame(() => {
|
|
6249
|
+
fn = false, update();
|
|
6005
6250
|
}));
|
|
6006
6251
|
};
|
|
6007
|
-
|
|
6252
|
+
un = new ResizeObserver(() => {
|
|
6008
6253
|
const t2 = document.documentElement.clientWidth - e2.clientWidth;
|
|
6009
|
-
|
|
6010
|
-
clearTimeout(
|
|
6011
|
-
}),
|
|
6254
|
+
gn !== t2 && (gn = t2, window.dispatchEvent(new Event("resize")), // For game engines to adjust the canvas
|
|
6255
|
+
clearTimeout(pn), pn = setTimeout(scheduleUpdate, 50));
|
|
6256
|
+
}), un.observe(e2), dn = new MutationObserver((e3) => {
|
|
6012
6257
|
for (const t2 of e3) {
|
|
6013
6258
|
for (const e4 of t2.addedNodes) "STYLE" === e4.nodeName ? scheduleUpdate() : "LINK" === e4.nodeName && "stylesheet" === e4.rel && (e4.sheet ? scheduleUpdate() : e4.addEventListener("load", scheduleUpdate, {
|
|
6014
6259
|
once: true
|
|
@@ -6020,11 +6265,11 @@ function activateCSSViewportOverride(e2) {
|
|
|
6020
6265
|
}));
|
|
6021
6266
|
}
|
|
6022
6267
|
}
|
|
6023
|
-
}),
|
|
6268
|
+
}), dn.observe(document.head, {
|
|
6024
6269
|
childList: true,
|
|
6025
6270
|
attributes: true,
|
|
6026
6271
|
attributeFilter: ["rel"]
|
|
6027
|
-
}),
|
|
6272
|
+
}), update();
|
|
6028
6273
|
}
|
|
6029
6274
|
function transformStylesheet(e2, t2, n2, s2, i2) {
|
|
6030
6275
|
const o2 = e2.getAttribute("data-playlight-original-href");
|
|
@@ -6054,8 +6299,8 @@ function applyCSSOverrides(e2, t2, n2, s2) {
|
|
|
6054
6299
|
(e2 = // Handle double-sided range: (value < width < value)
|
|
6055
6300
|
(e2 = e2.replace(/\(([\d.]+[a-z]+)\s*([<>=]+)\s*width\s*([<>=]+)\s*([\d.]+[a-z]+)\)/gi, (e3, t3, n3, i3, o3) => `(calc(${t3} + ${s2}px) ${n3} width ${i3} calc(${o3} + ${s2}px))`)).replace(/\(width\s*([<>=]+)\s*([\d.]+[a-z]+)\)/gi, (e3, t3, n3) => `(width ${t3} calc(${n3} + ${s2}px))`)).replace(/\(([\d.]+[a-z]+)\s*([<>=]+)\s*width\)/gi, (e3, t3, n3) => `(calc(${t3} + ${s2}px) ${n3} width)`)).replace(/\(\s*orientation:\s*portrait\s*\)/gi, `(max-width: ${o2}px)`)).replace(/\(\s*orientation:\s*landscape\s*\)/gi, `(min-width: ${o2 + 1}px)`)).replace(/\bbody\s*\{([^}]*)\}/gi, (e3, t3) => `.playlight-sdk-inner-wrapper {${t3.replace(/\s*!important\s*/gi, "")}}`);
|
|
6056
6301
|
}
|
|
6057
|
-
let vn, mn = null, bn = null, yn = null, wn = null, $n = null, xn = null, kn = null, Sn = null, Cn = null,
|
|
6058
|
-
let En = null, In = null,
|
|
6302
|
+
let _n, vn = null, mn = null, bn = null, yn = null, wn = null, $n = null, xn = null, kn = null, Sn = null, Cn = null, Mn = /* @__PURE__ */ new Map();
|
|
6303
|
+
let En = null, In = null, On = null, Tn = false, Pn = false, Ln = [], jn = null, An = null, Dn = null;
|
|
6059
6304
|
function mountPlaylight() {
|
|
6060
6305
|
try {
|
|
6061
6306
|
const e2 = document.createElement("div");
|
|
@@ -6063,7 +6308,7 @@ function mountPlaylight() {
|
|
|
6063
6308
|
const t2 = mount(App, {
|
|
6064
6309
|
target: e2
|
|
6065
6310
|
}), n2 = new MutationObserver(() => {
|
|
6066
|
-
document.body.contains(e2) || (clearTimeout(
|
|
6311
|
+
document.body.contains(e2) || (clearTimeout(Dn), Dn = setTimeout(() => {
|
|
6067
6312
|
document.body.contains(e2) || (console.warn("Re-mounting Playlight's main container as it was removed!"), n2.disconnect(), unmount(t2), mountPlaylight());
|
|
6068
6313
|
}, 0));
|
|
6069
6314
|
});
|
|
@@ -6076,7 +6321,7 @@ function mountPlaylight() {
|
|
|
6076
6321
|
}
|
|
6077
6322
|
function setupSidebarLayout() {
|
|
6078
6323
|
var _a2, _b3, _c2, _d3;
|
|
6079
|
-
if (!
|
|
6324
|
+
if (!Tn) try {
|
|
6080
6325
|
const e2 = document.body, t2 = document.documentElement, n2 = ["DIV", "MAIN", "ARTICLE", "SECTION", "HEADER", "FOOTER", "NAV", "ASIDE", "FORM"], s2 = Array.from(e2.children).filter((e3) => {
|
|
6081
6326
|
var _a3;
|
|
6082
6327
|
return n2.includes(e3.tagName) && !((_a3 = e3.id) == null ? void 0 : _a3.includes("playlight")) && e3.children.length > 0;
|
|
@@ -6085,14 +6330,14 @@ function setupSidebarLayout() {
|
|
|
6085
6330
|
return t3.id = "playlight-sdk-inner-wrapper", Array.from(e2.children).filter((e3) => {
|
|
6086
6331
|
var _a3;
|
|
6087
6332
|
return !["SCRIPT", "STYLE"].includes(e3.tagName) && !((_a3 = e3.id) == null ? void 0 : _a3.includes("playlight"));
|
|
6088
|
-
}).forEach((e3) => t3.appendChild(e3)), e2.appendChild(t3),
|
|
6333
|
+
}).forEach((e3) => t3.appendChild(e3)), e2.appendChild(t3), Pn = true, t3;
|
|
6089
6334
|
};
|
|
6090
|
-
if (false !== ((_b3 = (_a2 = get(
|
|
6335
|
+
if (false !== ((_b3 = (_a2 = get(Wn)) == null ? void 0 : _a2.sidebar) == null ? void 0 : _b3.hasFrameworkRoot) && s2.length > 0) {
|
|
6091
6336
|
if (1 === s2.length)
|
|
6092
|
-
In = s2[0],
|
|
6093
|
-
else if (true === ((_d3 = (_c2 = get(
|
|
6337
|
+
In = s2[0], Pn = false;
|
|
6338
|
+
else if (true === ((_d3 = (_c2 = get(Wn)) == null ? void 0 : _c2.sidebar) == null ? void 0 : _d3.hasFrameworkRoot)) {
|
|
6094
6339
|
const e3 = s2.map((e4) => e4.querySelectorAll("*").length), t3 = Math.max(...e3);
|
|
6095
|
-
In = s2[e3.indexOf(t3)],
|
|
6340
|
+
In = s2[e3.indexOf(t3)], Pn = false;
|
|
6096
6341
|
}
|
|
6097
6342
|
}
|
|
6098
6343
|
In || (In = createWrapper()), // Apply structure classes
|
|
@@ -6100,33 +6345,33 @@ function setupSidebarLayout() {
|
|
|
6100
6345
|
// Polyfill window.innerWidth, window.matchMedia, and scroll properties to account for sidebar
|
|
6101
6346
|
(function setupWindowPolyfills(e3, t3) {
|
|
6102
6347
|
try {
|
|
6103
|
-
|
|
6348
|
+
vn = Object.getOwnPropertyDescriptor(window, "innerWidth"), Object.defineProperty(window, "innerWidth", {
|
|
6104
6349
|
get: () => e3.clientWidth,
|
|
6105
6350
|
configurable: true
|
|
6106
6351
|
}), // Window.scrollY
|
|
6107
|
-
|
|
6352
|
+
bn = Object.getOwnPropertyDescriptor(window, "scrollY") || Object.getOwnPropertyDescriptor(Window.prototype, "scrollY"), Object.defineProperty(window, "scrollY", {
|
|
6108
6353
|
get: () => t3.scrollTop,
|
|
6109
6354
|
configurable: true
|
|
6110
6355
|
}), // Window.pageYOffset (alias for scrollY)
|
|
6111
|
-
|
|
6356
|
+
yn = Object.getOwnPropertyDescriptor(window, "pageYOffset") || Object.getOwnPropertyDescriptor(Window.prototype, "pageYOffset"), Object.defineProperty(window, "pageYOffset", {
|
|
6112
6357
|
get: () => t3.scrollTop,
|
|
6113
6358
|
configurable: true
|
|
6114
6359
|
}), // Window.scrollX
|
|
6115
|
-
|
|
6360
|
+
wn = Object.getOwnPropertyDescriptor(window, "scrollX") || Object.getOwnPropertyDescriptor(Window.prototype, "scrollX"), Object.defineProperty(window, "scrollX", {
|
|
6116
6361
|
get: () => t3.scrollLeft,
|
|
6117
6362
|
configurable: true
|
|
6118
6363
|
}), // Window.pageXOffset (alias for scrollX)
|
|
6119
|
-
|
|
6364
|
+
$n = Object.getOwnPropertyDescriptor(window, "pageXOffset") || Object.getOwnPropertyDescriptor(Window.prototype, "pageXOffset"), Object.defineProperty(window, "pageXOffset", {
|
|
6120
6365
|
get: () => t3.scrollLeft,
|
|
6121
6366
|
configurable: true
|
|
6122
6367
|
}), // Scroll methods
|
|
6123
|
-
|
|
6124
|
-
|
|
6368
|
+
xn = window.scrollTo, kn = window.scroll, Sn = window.scrollBy, window.scrollTo = (...e4) => t3.scrollTo(...e4), window.scroll = (...e4) => t3.scrollTo(...e4), window.scrollBy = (...e4) => t3.scrollBy(...e4), // Redirect scroll events from innerWrapper to window
|
|
6369
|
+
Cn = () => {
|
|
6125
6370
|
window.dispatchEvent(new Event("scroll"));
|
|
6126
|
-
}, t3.addEventListener("scroll",
|
|
6127
|
-
|
|
6371
|
+
}, t3.addEventListener("scroll", Cn), // Window.matchMedia & window.matchMedia.addEventListener/removeEventListener
|
|
6372
|
+
mn = window.matchMedia, window.matchMedia = function(t4) {
|
|
6128
6373
|
const getAdjustedMQL = () => {
|
|
6129
|
-
const n4 =
|
|
6374
|
+
const n4 = mn || window.matchMedia, s4 = e3.clientWidth, i3 = document.documentElement.clientWidth - s4, o2 = applyCSSOverrides(t4, s4, window.innerHeight, i3);
|
|
6130
6375
|
return n4.call(window, o2);
|
|
6131
6376
|
}, n3 = getAdjustedMQL();
|
|
6132
6377
|
Mn.has(t4) || Mn.set(t4, {
|
|
@@ -6150,7 +6395,7 @@ function setupSidebarLayout() {
|
|
|
6150
6395
|
});
|
|
6151
6396
|
}, // Trigger on resize (we dispatch resize events for sidebar resize in a different file)
|
|
6152
6397
|
// Only maintain one listenter that persists when the sidebar gets unmounted to preserve functionality!
|
|
6153
|
-
|
|
6398
|
+
_n || (_n = window.addEventListener("resize", () => {
|
|
6154
6399
|
for (const [e4, { listeners: t4, lastMatches: n3 }] of Mn.entries()) {
|
|
6155
6400
|
const s3 = window.matchMedia(e4);
|
|
6156
6401
|
if (s3.matches !== n3) {
|
|
@@ -6167,89 +6412,83 @@ function setupSidebarLayout() {
|
|
|
6167
6412
|
console.warn("Could not polyfill window properties:", e4);
|
|
6168
6413
|
}
|
|
6169
6414
|
})(e2, In), activateCSSViewportOverride(e2), // Transfer body classes to inner wrapper (except SDK classes)
|
|
6170
|
-
|
|
6415
|
+
Ln = Array.from(e2.classList).filter((e3) => !e3.startsWith("playlight")), Ln.forEach((t3) => {
|
|
6171
6416
|
In.classList.add(t3), e2.classList.remove(t3);
|
|
6172
6417
|
});
|
|
6173
6418
|
const i2 = window.getComputedStyle(In);
|
|
6174
6419
|
"contents" === i2.display && In.style.setProperty("display", "block", "important"), "visible" === i2.overflow && In.style.setProperty("overflow", "auto", "important"), // Mount sidebar as child of <html>
|
|
6175
|
-
En = document.createElement("div"), En.className = "playlight-sdk playlight-sdk-container-sidebar", t2.appendChild(En),
|
|
6420
|
+
En = document.createElement("div"), En.className = "playlight-sdk playlight-sdk-container-sidebar", t2.appendChild(En), On = mount(Sidebar, {
|
|
6176
6421
|
target: En
|
|
6177
6422
|
}), // Monitor the sidebar structure and remount when needed
|
|
6178
6423
|
(function watchSidebarStructure() {
|
|
6179
|
-
|
|
6424
|
+
jn = new MutationObserver(() => {
|
|
6180
6425
|
const e3 = !document.documentElement.classList.contains("playlight-sdk-html"), t3 = !document.body.classList.contains("playlight-sdk-body"), n3 = In && !document.body.contains(In), s3 = En && !document.documentElement.contains(En);
|
|
6181
|
-
(e3 || t3 || n3 || s3) && (clearTimeout(
|
|
6426
|
+
(e3 || t3 || n3 || s3) && (clearTimeout(An), An = setTimeout(() => {
|
|
6182
6427
|
console.warn("Re-mounting Playlight's sidebar container as it was removed!"), removeSidebarLayout(), setupSidebarLayout();
|
|
6183
6428
|
}, 0));
|
|
6184
|
-
}),
|
|
6429
|
+
}), jn.observe(document.documentElement, {
|
|
6185
6430
|
attributes: true,
|
|
6186
6431
|
attributeFilter: ["class"]
|
|
6187
|
-
}),
|
|
6432
|
+
}), jn.observe(document.body, {
|
|
6188
6433
|
childList: true
|
|
6189
6434
|
});
|
|
6190
|
-
})(),
|
|
6435
|
+
})(), Tn = true;
|
|
6191
6436
|
} catch (e2) {
|
|
6192
6437
|
console.error("Error during sidebar setup:", e2);
|
|
6193
6438
|
}
|
|
6194
6439
|
}
|
|
6195
6440
|
function removeSidebarLayout() {
|
|
6196
|
-
if (
|
|
6441
|
+
if (Tn) try {
|
|
6197
6442
|
const e2 = document.body, t2 = document.documentElement;
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
|
|
6443
|
+
jn == null ? void 0 : jn.disconnect(), clearTimeout(An), // Unmount sidebar
|
|
6444
|
+
On && unmount(On), (En == null ? void 0 : En.parentNode) && t2.removeChild(En), // Unwrap inner wrapper if created
|
|
6445
|
+
Pn ? (In.parentNode === e2 && Array.from(In.children).forEach((t3) => {
|
|
6201
6446
|
t3.parentNode === In && e2.insertBefore(t3, In);
|
|
6202
6447
|
}), In.remove()) : In.classList.remove("playlight-sdk-inner-wrapper"), // Remove classes
|
|
6203
6448
|
t2.classList.remove("playlight-sdk-html"), e2.classList.remove("playlight-sdk-body"), // Restore body classes
|
|
6204
|
-
|
|
6449
|
+
Ln.forEach((t3) => {
|
|
6205
6450
|
e2.classList.add(t3), In.classList.remove(t3);
|
|
6206
6451
|
}), // Restore polyfills and clean up (has to happen after the unmount)
|
|
6207
6452
|
(function restoreWindowPolyfills(e3) {
|
|
6208
6453
|
try {
|
|
6209
|
-
Object.defineProperty(window, "innerWidth",
|
|
6454
|
+
Object.defineProperty(window, "innerWidth", vn), Object.defineProperty(window, "scrollY", bn), Object.defineProperty(window, "pageYOffset", yn), Object.defineProperty(window, "scrollX", wn), Object.defineProperty(window, "pageXOffset", $n), window.scrollTo = xn, window.scroll = kn, window.scrollBy = Sn, e3.removeEventListener("scroll", Cn), window.matchMedia = mn, vn = null, bn = null, yn = null, wn = null, $n = null, xn = null, kn = null, Sn = null, Cn = null, mn = null;
|
|
6210
6455
|
} catch (e4) {
|
|
6211
6456
|
console.warn("Could not restore window polyfills:", e4);
|
|
6212
6457
|
}
|
|
6213
6458
|
})(In), (function deactivateCSSViewportOverride() {
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
for (const [e3, { originalCSS: t3, originalElement: n2 }] of
|
|
6217
|
-
|
|
6459
|
+
un == null ? void 0 : un.disconnect(), window.dispatchEvent(new Event("resize")), // Dispatch one last time since sidebar got removed
|
|
6460
|
+
dn == null ? void 0 : dn.disconnect(), clearTimeout(pn), un = dn = pn = gn = null;
|
|
6461
|
+
for (const [e3, { originalCSS: t3, originalElement: n2 }] of hn.entries()) n2 ? e3.replaceWith(n2) : (e3.textContent = t3, e3.removeAttribute("data-playlight-modified"));
|
|
6462
|
+
hn.clear();
|
|
6218
6463
|
})(), // Reset state
|
|
6219
|
-
|
|
6464
|
+
jn = null, An = null, En = null, On = null, In = null, Ln = [], Pn = false, Tn = false;
|
|
6220
6465
|
} catch (e2) {
|
|
6221
6466
|
console.error("Error during sidebar removal:", e2);
|
|
6222
6467
|
}
|
|
6223
6468
|
}
|
|
6224
|
-
const Bn = "sdk.playlight.dev";
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
if (e2.includes(Bn) || e2.startsWith("file://")) return "https://" + Bn;
|
|
6228
|
-
const t2 = new URL(e2);
|
|
6229
|
-
return t2.origin + t2.pathname.substring(0, t2.pathname.lastIndexOf("/"));
|
|
6230
|
-
})());
|
|
6231
|
-
let Un;
|
|
6232
|
-
zn.subscribe((e2) => {
|
|
6469
|
+
const Wn = writable(null), Bn = writable(false), Nn = writable(false), qn = writable(false), zn = writable(0), Rn = writable(false), Gn = writable(false), Fn = writable("https://sdk.playlight.dev");
|
|
6470
|
+
let Hn;
|
|
6471
|
+
Nn.subscribe((e2) => {
|
|
6233
6472
|
try {
|
|
6234
|
-
e2 ? (
|
|
6473
|
+
e2 ? (_t.trackOpen(), triggerEvent("discoveryOpen"), Hn = document.body.style.overflow, document.body.style.setProperty("overflow", "hidden", "important")) : (triggerEvent("discoveryClose"), document.body.style.overflow = Hn);
|
|
6235
6474
|
} catch (e3) {
|
|
6236
6475
|
console.error("Error in discoveryOpen store subscription:", e3);
|
|
6237
6476
|
}
|
|
6238
|
-
}),
|
|
6477
|
+
}), Wn.subscribe((e2) => {
|
|
6239
6478
|
var _a2;
|
|
6240
|
-
((_a2 = e2 == null ? void 0 : e2.sidebar) == null ? void 0 : _a2.forceVisible) || get(
|
|
6241
|
-
}),
|
|
6242
|
-
e2 &&
|
|
6243
|
-
}),
|
|
6479
|
+
((_a2 = e2 == null ? void 0 : e2.sidebar) == null ? void 0 : _a2.forceVisible) || get(Bn) ? Rn.set(true) : Rn.set(false);
|
|
6480
|
+
}), Bn.subscribe((e2) => {
|
|
6481
|
+
e2 && Rn.set(true);
|
|
6482
|
+
}), Rn.subscribe((e2) => {
|
|
6244
6483
|
e2 ? (setupSidebarLayout(), triggerEvent("sidebarEnable")) : (removeSidebarLayout(), triggerEvent("sidebarDisable"));
|
|
6245
6484
|
});
|
|
6246
|
-
var
|
|
6485
|
+
var Yn = /* @__PURE__ */ from_html('<div class="flex h-62 w-full items-center justify-center"><!></div>'), Vn = /* @__PURE__ */ from_html('<div class="snap-center px-2"><!></div>'), Un = /* @__PURE__ */ from_html('<!> <div class="bg-background/85 my-auto mr-3 mb-30 ml-2 flex min-w-40 snap-center flex-wrap items-center justify-center gap-4 p-4 pb-6 shadow-lg backdrop-blur-xl"><p class="w-full text-center text-lg font-semibold text-white">Fancy more?</p> <!></div>', 1), on_click = (e2, t2, n2) => get$1(t2).scrollBy({
|
|
6247
6486
|
left: 2 * -get$1(n2),
|
|
6248
6487
|
behavior: "smooth"
|
|
6249
|
-
}),
|
|
6488
|
+
}), Kn = /* @__PURE__ */ from_html('<button class="bg-background/85 absolute top-4/9 left-2 z-20 -translate-y-1/2 transform border p-1 py-4 text-white shadow-lg backdrop-blur-xl transition hover:bg-white hover:text-black max-sm:hidden"><!></button>'), on_click_1 = (e2, t2, n2) => get$1(t2).scrollBy({
|
|
6250
6489
|
left: 2 * get$1(n2),
|
|
6251
6490
|
behavior: "smooth"
|
|
6252
|
-
}),
|
|
6491
|
+
}), Xn = /* @__PURE__ */ from_html('<button class="bg-background/85 absolute top-4/9 right-2 z-20 -translate-y-1/2 transform border p-1 py-4 text-white shadow-lg backdrop-blur-xl transition hover:bg-white hover:text-black max-sm:hidden"><!></button>'), Zn = /* @__PURE__ */ from_html("<!> <!>", 1), Jn = /* @__PURE__ */ from_html('<div class="playlight-sdk playlight-sdk-widget"><div class="relative flex h-full w-full snap-x gap-2 overflow-x-auto"><!></div> <!></div>');
|
|
6253
6492
|
function WidgetCarousel(e2, t2) {
|
|
6254
6493
|
push(t2, true);
|
|
6255
6494
|
const [n2, s2] = setup_stores();
|
|
@@ -6283,17 +6522,17 @@ function WidgetCarousel(e2, t2) {
|
|
|
6283
6522
|
}
|
|
6284
6523
|
});
|
|
6285
6524
|
});
|
|
6286
|
-
var f2 =
|
|
6287
|
-
var t3 =
|
|
6525
|
+
var f2 = Jn(), p2 = child(f2), h2 = child(p2), consequent = (e3) => {
|
|
6526
|
+
var t3 = Yn();
|
|
6288
6527
|
Loader_circle(child(t3), {
|
|
6289
6528
|
class: "animate-spin opacity-75",
|
|
6290
6529
|
size: 30,
|
|
6291
6530
|
strokeWidth: 2.5
|
|
6292
6531
|
}), append(e3, t3);
|
|
6293
6532
|
}, alternate = (e3) => {
|
|
6294
|
-
var t3 =
|
|
6533
|
+
var t3 = Un(), n3 = first_child(t3);
|
|
6295
6534
|
each(n3, 17, () => get$1(o2), index, (e4, t4) => {
|
|
6296
|
-
var n4 =
|
|
6535
|
+
var n4 = Vn();
|
|
6297
6536
|
GameCard(child(n4), {
|
|
6298
6537
|
get game() {
|
|
6299
6538
|
return get$1(t4);
|
|
@@ -6309,7 +6548,7 @@ function WidgetCarousel(e2, t2) {
|
|
|
6309
6548
|
});
|
|
6310
6549
|
var s3 = sibling(n3, 2);
|
|
6311
6550
|
Button(sibling(child(s3), 2), {
|
|
6312
|
-
onclick: () => store_set(
|
|
6551
|
+
onclick: () => store_set(Nn, true),
|
|
6313
6552
|
children: (e4, t4) => {
|
|
6314
6553
|
append(e4, text("See all"));
|
|
6315
6554
|
},
|
|
@@ -6322,18 +6561,16 @@ function WidgetCarousel(e2, t2) {
|
|
|
6322
6561
|
get$1(i2) ? e3(consequent) : e3(alternate, false);
|
|
6323
6562
|
}), bind_this(p2, (e3) => set(a2, e3), () => get$1(a2));
|
|
6324
6563
|
var g2 = sibling(p2, 2), consequent_3 = (e3) => {
|
|
6325
|
-
var t3 =
|
|
6326
|
-
var t4 =
|
|
6564
|
+
var t3 = Zn(), n3 = first_child(t3), consequent_1 = (e4) => {
|
|
6565
|
+
var t4 = Kn();
|
|
6327
6566
|
t4.__click = [on_click, a2, l2], (function Chevron_left(e5, t5) {
|
|
6328
|
-
|
|
6329
|
-
d: "m15 18-6-6 6-6"
|
|
6330
|
-
}]];
|
|
6567
|
+
push(t5, true);
|
|
6331
6568
|
/**
|
|
6332
|
-
* @license lucide
|
|
6569
|
+
* @license @lucide/svelte v0.554.0 - ISC
|
|
6333
6570
|
*
|
|
6334
6571
|
* ISC License
|
|
6335
6572
|
*
|
|
6336
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-
|
|
6573
|
+
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
|
|
6337
6574
|
*
|
|
6338
6575
|
* Permission to use, copy, modify, and/or distribute this software for any
|
|
6339
6576
|
* purpose with or without fee is hereby granted, provided that the above
|
|
@@ -6347,7 +6584,35 @@ function WidgetCarousel(e2, t2) {
|
|
|
6347
6584
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
6348
6585
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
6349
6586
|
*
|
|
6587
|
+
* ---
|
|
6588
|
+
*
|
|
6589
|
+
* The MIT License (MIT) (for portions derived from Feather)
|
|
6590
|
+
*
|
|
6591
|
+
* Copyright (c) 2013-2023 Cole Bemis
|
|
6592
|
+
*
|
|
6593
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6594
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
6595
|
+
* in the Software without restriction, including without limitation the rights
|
|
6596
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
6597
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
6598
|
+
* furnished to do so, subject to the following conditions:
|
|
6599
|
+
*
|
|
6600
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
6601
|
+
* copies or substantial portions of the Software.
|
|
6602
|
+
*
|
|
6603
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
6604
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
6605
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
6606
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
6607
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
6608
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
6609
|
+
* SOFTWARE.
|
|
6610
|
+
*
|
|
6350
6611
|
*/
|
|
6612
|
+
let n4 = /* @__PURE__ */ rest_props(t5, ["$$slots", "$$events", "$$legacy"]);
|
|
6613
|
+
const s4 = [["path", {
|
|
6614
|
+
d: "m15 18-6-6 6-6"
|
|
6615
|
+
}]];
|
|
6351
6616
|
Icon(e5, spread_props({
|
|
6352
6617
|
name: "chevron-left"
|
|
6353
6618
|
}, () => n4, {
|
|
@@ -6356,12 +6621,12 @@ function WidgetCarousel(e2, t2) {
|
|
|
6356
6621
|
},
|
|
6357
6622
|
children: (e6, n5) => {
|
|
6358
6623
|
var s5 = comment();
|
|
6359
|
-
|
|
6624
|
+
snippet(first_child(s5), () => t5.children ?? noop), append(e6, s5);
|
|
6360
6625
|
},
|
|
6361
6626
|
$$slots: {
|
|
6362
6627
|
default: true
|
|
6363
6628
|
}
|
|
6364
|
-
}));
|
|
6629
|
+
})), pop();
|
|
6365
6630
|
})(child(t4), {
|
|
6366
6631
|
size: 22,
|
|
6367
6632
|
strokeWidth: 2.75
|
|
@@ -6371,17 +6636,15 @@ function WidgetCarousel(e2, t2) {
|
|
|
6371
6636
|
get$1(c2) && e4(consequent_1);
|
|
6372
6637
|
});
|
|
6373
6638
|
var s3 = sibling(n3, 2), consequent_2 = (e4) => {
|
|
6374
|
-
var t4 =
|
|
6639
|
+
var t4 = Xn();
|
|
6375
6640
|
t4.__click = [on_click_1, a2, l2], (function Chevron_right(e5, t5) {
|
|
6376
|
-
|
|
6377
|
-
d: "m9 18 6-6-6-6"
|
|
6378
|
-
}]];
|
|
6641
|
+
push(t5, true);
|
|
6379
6642
|
/**
|
|
6380
|
-
* @license lucide
|
|
6643
|
+
* @license @lucide/svelte v0.554.0 - ISC
|
|
6381
6644
|
*
|
|
6382
6645
|
* ISC License
|
|
6383
6646
|
*
|
|
6384
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-
|
|
6647
|
+
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
|
|
6385
6648
|
*
|
|
6386
6649
|
* Permission to use, copy, modify, and/or distribute this software for any
|
|
6387
6650
|
* purpose with or without fee is hereby granted, provided that the above
|
|
@@ -6395,7 +6658,35 @@ function WidgetCarousel(e2, t2) {
|
|
|
6395
6658
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
6396
6659
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
6397
6660
|
*
|
|
6661
|
+
* ---
|
|
6662
|
+
*
|
|
6663
|
+
* The MIT License (MIT) (for portions derived from Feather)
|
|
6664
|
+
*
|
|
6665
|
+
* Copyright (c) 2013-2023 Cole Bemis
|
|
6666
|
+
*
|
|
6667
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6668
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
6669
|
+
* in the Software without restriction, including without limitation the rights
|
|
6670
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
6671
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
6672
|
+
* furnished to do so, subject to the following conditions:
|
|
6673
|
+
*
|
|
6674
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
6675
|
+
* copies or substantial portions of the Software.
|
|
6676
|
+
*
|
|
6677
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
6678
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
6679
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
6680
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
6681
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
6682
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
6683
|
+
* SOFTWARE.
|
|
6684
|
+
*
|
|
6398
6685
|
*/
|
|
6686
|
+
let n4 = /* @__PURE__ */ rest_props(t5, ["$$slots", "$$events", "$$legacy"]);
|
|
6687
|
+
const s4 = [["path", {
|
|
6688
|
+
d: "m9 18 6-6-6-6"
|
|
6689
|
+
}]];
|
|
6399
6690
|
Icon(e5, spread_props({
|
|
6400
6691
|
name: "chevron-right"
|
|
6401
6692
|
}, () => n4, {
|
|
@@ -6404,12 +6695,12 @@ function WidgetCarousel(e2, t2) {
|
|
|
6404
6695
|
},
|
|
6405
6696
|
children: (e6, n5) => {
|
|
6406
6697
|
var s5 = comment();
|
|
6407
|
-
|
|
6698
|
+
snippet(first_child(s5), () => t5.children ?? noop), append(e6, s5);
|
|
6408
6699
|
},
|
|
6409
6700
|
$$slots: {
|
|
6410
6701
|
default: true
|
|
6411
6702
|
}
|
|
6412
|
-
}));
|
|
6703
|
+
})), pop();
|
|
6413
6704
|
})(child(t4), {
|
|
6414
6705
|
size: 22,
|
|
6415
6706
|
strokeWidth: 2.75
|
|
@@ -6440,7 +6731,7 @@ function initWidgets() {
|
|
|
6440
6731
|
}
|
|
6441
6732
|
}
|
|
6442
6733
|
delegate(["click"]);
|
|
6443
|
-
const
|
|
6734
|
+
const Qn = new /**
|
|
6444
6735
|
* The PlaylightSDK class
|
|
6445
6736
|
*/
|
|
6446
6737
|
class PlaylightSDK {
|
|
@@ -6467,7 +6758,7 @@ class PlaylightSDK {
|
|
|
6467
6758
|
})();
|
|
6468
6759
|
const t2 = "true" === sessionStorage.getItem("fromPlaylight"), n2 = "playlight" === new URLSearchParams(window.location.search).get("utm_source");
|
|
6469
6760
|
n2 && sessionStorage.setItem("fromPlaylight", "true"), // Save in session storage to persist on MPAs
|
|
6470
|
-
|
|
6761
|
+
Bn.set(t2 || n2), // Set initialized
|
|
6471
6762
|
window.playlightInitialized = true;
|
|
6472
6763
|
}
|
|
6473
6764
|
/**
|
|
@@ -6475,7 +6766,7 @@ class PlaylightSDK {
|
|
|
6475
6766
|
* @param {boolean} [value=true] - Whether to show the discovery
|
|
6476
6767
|
*/
|
|
6477
6768
|
setDiscovery(e2 = true) {
|
|
6478
|
-
|
|
6769
|
+
Nn.set(e2);
|
|
6479
6770
|
}
|
|
6480
6771
|
/**
|
|
6481
6772
|
* Register an event callback
|
|
@@ -6484,18 +6775,18 @@ class PlaylightSDK {
|
|
|
6484
6775
|
*/
|
|
6485
6776
|
onEvent(e2, t2) {
|
|
6486
6777
|
if (!["discoveryOpen", "discoveryClose", "exitIntent", "sidebarEnable", "sidebarDisable"].includes(e2)) return console.warn(`Invalid event type "${e2}!"`);
|
|
6487
|
-
|
|
6778
|
+
vt.has(e2) || vt.set(e2, []), vt.get(e2).push(t2);
|
|
6488
6779
|
}
|
|
6489
6780
|
/**
|
|
6490
6781
|
* Update the configuration
|
|
6491
6782
|
* @param {object} [configParam] - Playlight configuration object
|
|
6492
6783
|
*/
|
|
6493
6784
|
setConfig(e2 = {}) {
|
|
6494
|
-
|
|
6785
|
+
Wn.set(createConfig(e2));
|
|
6495
6786
|
}
|
|
6496
6787
|
}();
|
|
6497
|
-
"undefined" != typeof window && (window.playlightSDK =
|
|
6788
|
+
"undefined" != typeof window && (window.playlightSDK = Qn);
|
|
6498
6789
|
export {
|
|
6499
|
-
|
|
6790
|
+
Qn as default
|
|
6500
6791
|
};
|
|
6501
6792
|
//# sourceMappingURL=playlight-sdk.es.js.map
|