playlight-sdk 0.0.7 → 0.0.9

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.
@@ -4,9 +4,9 @@ var __typeError = (msg) => {
4
4
  var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
5
5
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
6
6
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
7
- var _PlayLightAPI_instances, e_fn, _a;
7
+ var _a, _PlayLightAPI_instances, e_fn, _b, _PlaylightSDK_instances, t_fn, _c;
8
8
  const e = false;
9
- var t = Array.isArray, n = Array.prototype.indexOf, i = Array.from, o = Object.defineProperty, s = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyDescriptors, l = Object.prototype, c = Array.prototype, u = Object.getPrototypeOf;
9
+ var t = Array.isArray, n = Array.prototype.indexOf, o = Array.from, i = Object.defineProperty, s = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyDescriptors, l = Object.prototype, c = Array.prototype, u = Object.getPrototypeOf;
10
10
  function is_function(e2) {
11
11
  return "function" == typeof e2;
12
12
  }
@@ -18,7 +18,7 @@ function run(e2) {
18
18
  function run_all(e2) {
19
19
  for (var t2 = 0; t2 < e2.length; t2++) e2[t2]();
20
20
  }
21
- const d = 32, f = 128, p = 256, _ = 512, v = 1024, g = 2048, h = 4096, m = 8192, b = 16384, y = 65536, $ = 1 << 20, w = Symbol("$state"), x = Symbol("legacy props"), k = Symbol("");
21
+ const f = 32, d = 64, p = 128, _ = 256, v = 512, g = 1024, h = 2048, m = 4096, b = 8192, y = 16384, $ = 65536, w = 1 << 20, x = Symbol("$state"), k = Symbol("legacy props"), C = Symbol("");
22
22
  function equals(e2) {
23
23
  return e2 === this.v;
24
24
  }
@@ -28,25 +28,25 @@ function safe_not_equal(e2, t2) {
28
28
  function safe_equals(e2) {
29
29
  return !safe_not_equal(e2, this.v);
30
30
  }
31
- let C = false;
32
- const M = Symbol(), q = "http://www.w3.org/2000/svg";
31
+ let S = false;
32
+ const M = Symbol();
33
33
  function lifecycle_outside_component(e2) {
34
34
  throw new Error("https://svelte.dev/e/lifecycle_outside_component");
35
35
  }
36
- let I = null;
36
+ let q = null;
37
37
  function set_component_context(e2) {
38
- I = e2;
38
+ q = e2;
39
39
  }
40
40
  function push(e2, t2 = false, n2) {
41
- I = {
42
- p: I,
41
+ q = {
42
+ p: q,
43
43
  c: null,
44
44
  e: null,
45
45
  m: false,
46
46
  s: e2,
47
47
  x: null,
48
48
  l: null
49
- }, C && !t2 && (I.l = {
49
+ }, S && !t2 && (q.l = {
50
50
  s: null,
51
51
  u: null,
52
52
  r1: [],
@@ -54,27 +54,27 @@ function push(e2, t2 = false, n2) {
54
54
  });
55
55
  }
56
56
  function pop(e2) {
57
- const t2 = I;
57
+ const t2 = q;
58
58
  if (null !== t2) {
59
59
  const e3 = t2.e;
60
60
  if (null !== e3) {
61
- var n2 = H, i2 = F;
61
+ var n2 = H, o2 = F;
62
62
  t2.e = null;
63
63
  try {
64
- for (var o2 = 0; o2 < e3.length; o2++) {
65
- var s2 = e3[o2];
64
+ for (var i2 = 0; i2 < e3.length; i2++) {
65
+ var s2 = e3[i2];
66
66
  set_active_effect(s2.effect), set_active_reaction(s2.reaction), effect(s2.fn);
67
67
  }
68
68
  } finally {
69
- set_active_effect(n2), set_active_reaction(i2);
69
+ set_active_effect(n2), set_active_reaction(o2);
70
70
  }
71
71
  }
72
- I = t2.p, t2.m = true;
72
+ q = t2.p, t2.m = true;
73
73
  }
74
74
  return {};
75
75
  }
76
76
  function is_runes() {
77
- return !C || null !== I && null === I.l;
77
+ return !S || null !== q && null === q.l;
78
78
  }
79
79
  function source(e2, t2) {
80
80
  return {
@@ -96,7 +96,7 @@ function mutable_source(e2, t2 = false) {
96
96
  const n2 = source(e2);
97
97
  return t2 || (n2.equals = safe_equals), // bind the signal to the component context, in case we need to
98
98
  // track updates to trigger beforeUpdate/afterUpdate callbacks
99
- C && null !== I && null !== I.l && ((_a2 = I.l).s ?? (_a2.s = [])).push(n2), n2;
99
+ S && null !== q && null !== q.l && ((_a2 = q.l).s ?? (_a2.s = [])).push(n2), n2;
100
100
  }
101
101
  function mutable_state(e2, t2 = false) {
102
102
  return /* @__PURE__ */ push_derived_source(/* @__PURE__ */ mutable_source(e2, t2));
@@ -124,11 +124,11 @@ function set(e2, t2) {
124
124
  }(), internal_set(e2, t2);
125
125
  }
126
126
  function internal_set(e2, t2) {
127
- return e2.equals(t2) || (e2.v, e2.v = t2, e2.wv = increment_write_version(), mark_reactions(e2, g), // It's possible that the current reaction might not have up-to-date dependencies
127
+ return e2.equals(t2) || (e2.v, e2.v = t2, e2.wv = increment_write_version(), mark_reactions(e2, h), // It's possible that the current reaction might not have up-to-date dependencies
128
128
  // whilst it's actively running. So in the case of ensuring it registers the reaction
129
129
  // properly for itself, we need to ensure the current effect actually gets
130
130
  // scheduled. i.e: `$effect(() => x++)`
131
- is_runes() && null !== H && H.f & v && !(96 & H.f) && (null === U ? (
131
+ is_runes() && null !== H && H.f & g && !(96 & H.f) && (null === U ? (
132
132
  /** @param {null | Source[]} value */
133
133
  function set_untracked_writes(e3) {
134
134
  U = e3;
@@ -136,33 +136,33 @@ function internal_set(e2, t2) {
136
136
  ) : U.push(e2))), t2;
137
137
  }
138
138
  function update(e2, t2 = 1) {
139
- var n2 = get$1(e2), i2 = 1 === t2 ? n2++ : n2--;
140
- return set(e2, n2), i2;
139
+ var n2 = get$1(e2), o2 = 1 === t2 ? n2++ : n2--;
140
+ return set(e2, n2), o2;
141
141
  }
142
142
  function mark_reactions(e2, t2) {
143
143
  var n2 = e2.reactions;
144
- if (null !== n2) for (var i2 = is_runes(), o2 = n2.length, s2 = 0; s2 < o2; s2++) {
144
+ if (null !== n2) for (var o2 = is_runes(), i2 = n2.length, s2 = 0; s2 < i2; s2++) {
145
145
  var a2 = n2[s2], l2 = a2.f;
146
- l2 & g || // In legacy mode, skip the current effect to prevent infinite loops
147
- (i2 || a2 !== H) && (set_signal_status(a2, t2), // If the signal a) was previously clean or b) is an unowned derived, then mark it
146
+ l2 & h || // In legacy mode, skip the current effect to prevent infinite loops
147
+ (o2 || a2 !== H) && (set_signal_status(a2, t2), // If the signal a) was previously clean or b) is an unowned derived, then mark it
148
148
  1280 & l2 && (2 & l2 ? mark_reactions(
149
149
  /** @type {Derived} */
150
150
  a2,
151
- h
151
+ m
152
152
  ) : schedule_effect(
153
153
  /** @type {Effect} */
154
154
  a2
155
155
  )));
156
156
  }
157
157
  }
158
- function proxy(e2, n2 = null, i2) {
159
- if ("object" != typeof e2 || null === e2 || w in e2) return e2;
160
- const o2 = u(e2);
161
- if (o2 !== l && o2 !== c) return e2;
162
- var a2, d2 = /* @__PURE__ */ new Map(), f2 = t(e2), p2 = source(0);
163
- return f2 && // We need to create the length source eagerly to ensure that
158
+ function proxy(e2, n2 = null, o2) {
159
+ if ("object" != typeof e2 || null === e2 || x in e2) return e2;
160
+ const i2 = u(e2);
161
+ if (i2 !== l && i2 !== c) return e2;
162
+ var a2, f2 = /* @__PURE__ */ new Map(), d2 = t(e2), p2 = source(0);
163
+ return d2 && // We need to create the length source eagerly to ensure that
164
164
  // mutations to the array are properly synced with our proxy
165
- d2.set("length", source(
165
+ f2.set("length", source(
166
166
  /** @type {any[]} */
167
167
  e2.length
168
168
  )), new Proxy(
@@ -181,45 +181,45 @@ function proxy(e2, n2 = null, i2) {
181
181
  function state_descriptors_fixed() {
182
182
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
183
183
  }();
184
- var i3 = d2.get(t2);
185
- return void 0 === i3 ? (i3 = source(n3.value), d2.set(t2, i3)) : set(i3, proxy(n3.value, a2)), true;
184
+ var o3 = f2.get(t2);
185
+ return void 0 === o3 ? (o3 = source(n3.value), f2.set(t2, o3)) : set(o3, proxy(n3.value, a2)), true;
186
186
  },
187
187
  deleteProperty(e3, t2) {
188
- var n3 = d2.get(t2);
189
- if (void 0 === n3) t2 in e3 && d2.set(t2, source(M));
188
+ var n3 = f2.get(t2);
189
+ if (void 0 === n3) t2 in e3 && f2.set(t2, source(M));
190
190
  else {
191
- if (f2 && "string" == typeof t2) {
192
- var i3 = (
191
+ if (d2 && "string" == typeof t2) {
192
+ var o3 = (
193
193
  /** @type {Source<number>} */
194
- d2.get("length")
195
- ), o3 = Number(t2);
196
- Number.isInteger(o3) && o3 < i3.v && set(i3, o3);
194
+ f2.get("length")
195
+ ), i3 = Number(t2);
196
+ Number.isInteger(i3) && i3 < o3.v && set(o3, i3);
197
197
  }
198
198
  set(n3, M), update_version(p2);
199
199
  }
200
200
  return true;
201
201
  },
202
- get(t2, n3, i3) {
202
+ get(t2, n3, o3) {
203
203
  var _a2;
204
- if (n3 === w) return e2;
205
- var o3 = d2.get(n3), l2 = n3 in t2;
204
+ if (n3 === x) return e2;
205
+ var i3 = f2.get(n3), l2 = n3 in t2;
206
206
  if (
207
207
  // create a source, but only if it's an own property and not a prototype property
208
- void 0 !== o3 || l2 && !((_a2 = s(t2, n3)) == null ? void 0 : _a2.writable) || (o3 = source(proxy(l2 ? t2[n3] : M, a2)), d2.set(n3, o3)), void 0 !== o3
208
+ void 0 !== i3 || l2 && !((_a2 = s(t2, n3)) == null ? void 0 : _a2.writable) || (i3 = source(proxy(l2 ? t2[n3] : M, a2)), f2.set(n3, i3)), void 0 !== i3
209
209
  ) {
210
- var c2 = get$1(o3);
210
+ var c2 = get$1(i3);
211
211
  return c2 === M ? void 0 : c2;
212
212
  }
213
- return Reflect.get(t2, n3, i3);
213
+ return Reflect.get(t2, n3, o3);
214
214
  },
215
215
  getOwnPropertyDescriptor(e3, t2) {
216
216
  var n3 = Reflect.getOwnPropertyDescriptor(e3, t2);
217
217
  if (n3 && "value" in n3) {
218
- var i3 = d2.get(t2);
219
- i3 && (n3.value = get$1(i3));
218
+ var o3 = f2.get(t2);
219
+ o3 && (n3.value = get$1(o3));
220
220
  } else if (void 0 === n3) {
221
- var o3 = d2.get(t2), s2 = o3 == null ? void 0 : o3.v;
222
- if (void 0 !== o3 && s2 !== M) return {
221
+ var i3 = f2.get(t2), s2 = i3 == null ? void 0 : i3.v;
222
+ if (void 0 !== i3 && s2 !== M) return {
223
223
  enumerable: true,
224
224
  configurable: true,
225
225
  value: s2,
@@ -230,29 +230,29 @@ function proxy(e2, n2 = null, i2) {
230
230
  },
231
231
  has(e3, t2) {
232
232
  var _a2;
233
- if (t2 === w) return true;
234
- var n3 = d2.get(t2), i3 = void 0 !== n3 && n3.v !== M || Reflect.has(e3, t2);
235
- if ((void 0 !== n3 || null !== H && (!i3 || ((_a2 = s(e3, t2)) == null ? void 0 : _a2.writable))) && (void 0 === n3 && (n3 = source(i3 ? proxy(e3[t2], a2) : M), d2.set(t2, n3)), get$1(n3) === M)) return false;
236
- return i3;
233
+ if (t2 === x) return true;
234
+ var n3 = f2.get(t2), o3 = void 0 !== n3 && n3.v !== M || Reflect.has(e3, t2);
235
+ if ((void 0 !== n3 || null !== H && (!o3 || ((_a2 = s(e3, t2)) == null ? void 0 : _a2.writable))) && (void 0 === n3 && (n3 = source(o3 ? proxy(e3[t2], a2) : M), f2.set(t2, n3)), get$1(n3) === M)) return false;
236
+ return o3;
237
237
  },
238
- set(e3, t2, n3, i3) {
238
+ set(e3, t2, n3, o3) {
239
239
  var _a2;
240
- var o3 = d2.get(t2), l2 = t2 in e3;
241
- if (f2 && "length" === t2) for (var c2 = n3; c2 < /** @type {Source<number>} */
242
- o3.v; c2 += 1) {
243
- var u2 = d2.get(c2 + "");
240
+ var i3 = f2.get(t2), l2 = t2 in e3;
241
+ if (d2 && "length" === t2) for (var c2 = n3; c2 < /** @type {Source<number>} */
242
+ i3.v; c2 += 1) {
243
+ var u2 = f2.get(c2 + "");
244
244
  void 0 !== u2 ? set(u2, M) : c2 in e3 && // If the item exists in the original, we need to create a uninitialized source,
245
245
  // else a later read of the property would result in a source being created with
246
246
  // the value of the original item at that index.
247
- (u2 = source(M), d2.set(c2 + "", u2));
247
+ (u2 = source(M), f2.set(c2 + "", u2));
248
248
  }
249
- void 0 === o3 ? l2 && !((_a2 = s(e3, t2)) == null ? void 0 : _a2.writable) || (set(o3 = source(void 0), proxy(n3, a2)), d2.set(t2, o3)) : (l2 = o3.v !== M, set(o3, proxy(n3, a2)));
249
+ void 0 === i3 ? l2 && !((_a2 = s(e3, t2)) == null ? void 0 : _a2.writable) || (set(i3 = source(void 0), proxy(n3, a2)), f2.set(t2, i3)) : (l2 = i3.v !== M, set(i3, proxy(n3, a2)));
250
250
  var _2 = Reflect.getOwnPropertyDescriptor(e3, t2);
251
- if ((_2 == null ? void 0 : _2.set) && _2.set.call(i3, n3), !l2) {
252
- if (f2 && "string" == typeof t2) {
251
+ if ((_2 == null ? void 0 : _2.set) && _2.set.call(o3, n3), !l2) {
252
+ if (d2 && "string" == typeof t2) {
253
253
  var v2 = (
254
254
  /** @type {Source<number>} */
255
- d2.get("length")
255
+ f2.get("length")
256
256
  ), g2 = Number(t2);
257
257
  Number.isInteger(g2) && g2 >= v2.v && set(v2, g2 + 1);
258
258
  }
@@ -263,10 +263,10 @@ function proxy(e2, n2 = null, i2) {
263
263
  ownKeys(e3) {
264
264
  get$1(p2);
265
265
  var t2 = Reflect.ownKeys(e3).filter((e4) => {
266
- var t3 = d2.get(e4);
266
+ var t3 = f2.get(e4);
267
267
  return void 0 === t3 || t3.v !== M;
268
268
  });
269
- for (var [n3, i3] of d2) i3.v === M || n3 in e3 || t2.push(n3);
269
+ for (var [n3, o3] of f2) o3.v === M || n3 in e3 || t2.push(n3);
270
270
  return t2;
271
271
  },
272
272
  setPrototypeOf() {
@@ -280,7 +280,7 @@ function proxy(e2, n2 = null, i2) {
280
280
  function update_version(e2, t2 = 1) {
281
281
  set(e2, e2.v + t2);
282
282
  }
283
- var S, T, P, O, E;
283
+ var I, P, T, O, E;
284
284
  function create_text(e2 = "") {
285
285
  return document.createTextNode(e2);
286
286
  }
@@ -306,10 +306,10 @@ function first_child(e2, t2) {
306
306
  return n2 instanceof Comment && "" === n2.data ? /* @__PURE__ */ get_next_sibling(n2) : n2;
307
307
  }
308
308
  function sibling(e2, t2 = 1, n2 = false) {
309
- let i2 = e2;
310
- for (; t2--; ) i2 = /** @type {TemplateNode} */
311
- /* @__PURE__ */ get_next_sibling(i2);
312
- return i2;
309
+ let o2 = e2;
310
+ for (; t2--; ) o2 = /** @type {TemplateNode} */
311
+ /* @__PURE__ */ get_next_sibling(o2);
312
+ return o2;
313
313
  }
314
314
  // @__NO_SIDE_EFFECTS__
315
315
  function derived(e2) {
@@ -317,13 +317,13 @@ function derived(e2) {
317
317
  /** @type {Derived} */
318
318
  F
319
319
  ) : null;
320
- null === H || null !== n2 && n2.f & p ? t2 |= p : (
320
+ null === H || null !== n2 && n2.f & _ ? t2 |= _ : (
321
321
  // Since deriveds are evaluated lazily, any effects created inside them are
322
322
  // created too late to ensure that the parent effect is added to the tree
323
- H.f |= $
323
+ H.f |= w
324
324
  );
325
325
  return {
326
- ctx: I,
326
+ ctx: q,
327
327
  deps: null,
328
328
  effects: null,
329
329
  equals,
@@ -379,7 +379,7 @@ function update_derived(e2) {
379
379
  return t3;
380
380
  }(e2)
381
381
  );
382
- set_signal_status(e2, (J || e2.f & p) && null !== e2.deps ? h : v), e2.equals(t2) || (e2.v = t2, e2.wv = increment_write_version());
382
+ set_signal_status(e2, (J || e2.f & _) && null !== e2.deps ? m : g), e2.equals(t2) || (e2.v = t2, e2.wv = increment_write_version());
383
383
  }
384
384
  function validate_effect(e2) {
385
385
  null === H && null === F && /**
@@ -389,60 +389,60 @@ function validate_effect(e2) {
389
389
  */
390
390
  function effect_orphan(e3) {
391
391
  throw new Error("https://svelte.dev/e/effect_orphan");
392
- }(), null !== F && F.f & p && null === H && /**
392
+ }(), null !== F && F.f & _ && null === H && /**
393
393
  * Effect cannot be created inside a `$derived` value that was not itself created inside an effect
394
394
  * @returns {never}
395
395
  */
396
396
  function effect_in_unowned_derived() {
397
397
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
398
- }(), A && function effect_in_teardown(e3) {
398
+ }(), W && function effect_in_teardown(e3) {
399
399
  throw new Error("https://svelte.dev/e/effect_in_teardown");
400
400
  }();
401
401
  }
402
- function create_effect(e2, t2, n2, i2 = true) {
403
- var o2 = !!(64 & e2), s2 = H, a2 = {
404
- ctx: I,
402
+ function create_effect(e2, t2, n2, o2 = true) {
403
+ var i2 = H, s2 = {
404
+ ctx: q,
405
405
  deps: null,
406
406
  nodes_start: null,
407
407
  nodes_end: null,
408
- f: e2 | g,
408
+ f: e2 | h,
409
409
  first: null,
410
410
  fn: t2,
411
411
  last: null,
412
412
  next: null,
413
- parent: o2 ? null : s2,
413
+ parent: i2,
414
414
  prev: null,
415
415
  teardown: null,
416
416
  transitions: null,
417
417
  wv: 0
418
418
  };
419
419
  if (n2) try {
420
- update_effect(a2), a2.f |= 32768;
420
+ update_effect(s2), s2.f |= 32768;
421
421
  } catch (e3) {
422
- throw destroy_effect(a2), e3;
422
+ throw destroy_effect(s2), e3;
423
423
  }
424
- else null !== t2 && schedule_effect(a2);
425
- if (!(n2 && null === a2.deps && null === a2.first && null === a2.nodes_start && null === a2.teardown && !(1048704 & a2.f)) && !o2 && i2 && (null !== s2 && function push_effect(e3, t3) {
424
+ else null !== t2 && schedule_effect(s2);
425
+ if (!(n2 && null === s2.deps && null === s2.first && null === s2.nodes_start && null === s2.teardown && !(1048704 & s2.f)) && o2 && (null !== i2 && function push_effect(e3, t3) {
426
426
  var n3 = t3.last;
427
427
  null === n3 ? t3.last = t3.first = e3 : (n3.next = e3, e3.prev = n3, t3.last = e3);
428
- }(a2, s2), null !== F && 2 & F.f)) {
429
- var l2 = (
428
+ }(s2, i2), null !== F && 2 & F.f)) {
429
+ var a2 = (
430
430
  /** @type {Derived} */
431
431
  F
432
432
  );
433
- (l2.effects ?? (l2.effects = [])).push(a2);
433
+ (a2.effects ?? (a2.effects = [])).push(s2);
434
434
  }
435
- return a2;
435
+ return s2;
436
436
  }
437
437
  function teardown(e2) {
438
438
  const t2 = create_effect(8, null, false);
439
- return set_signal_status(t2, v), t2.teardown = e2, t2;
439
+ return set_signal_status(t2, g), t2.teardown = e2, t2;
440
440
  }
441
441
  function user_effect(e2) {
442
- if (validate_effect(), !(null !== H && !!(H.f & d) && null !== I && !I.m)) return effect(e2);
442
+ if (validate_effect(), !(null !== H && !!(H.f & f) && null !== q && !q.m)) return effect(e2);
443
443
  var t2 = (
444
444
  /** @type {ComponentContext} */
445
- I
445
+ q
446
446
  );
447
447
  (t2.e ?? (t2.e = [])).push({
448
448
  fn: e2,
@@ -456,27 +456,27 @@ function effect(e2) {
456
456
  function legacy_pre_effect(e2, t2) {
457
457
  var n2 = (
458
458
  /** @type {ComponentContextLegacy} */
459
- I
460
- ), i2 = {
459
+ q
460
+ ), o2 = {
461
461
  effect: null,
462
462
  ran: false
463
463
  };
464
- n2.l.r1.push(i2), i2.effect = render_effect(() => {
464
+ n2.l.r1.push(o2), o2.effect = render_effect(() => {
465
465
  e2(), // If this legacy pre effect has already run before the end of the reset, then
466
466
  // bail out to emulate the same behavior.
467
- i2.ran || (i2.ran = true, set(n2.l.r2, true), untrack(t2));
467
+ o2.ran || (o2.ran = true, set(n2.l.r2, true), untrack(t2));
468
468
  });
469
469
  }
470
470
  function legacy_pre_effect_reset() {
471
471
  var e2 = (
472
472
  /** @type {ComponentContextLegacy} */
473
- I
473
+ q
474
474
  );
475
475
  render_effect(() => {
476
476
  if (get$1(e2.l.r2)) {
477
477
  for (var t2 of e2.l.r1) {
478
478
  var n2 = t2.effect;
479
- n2.f & v && set_signal_status(n2, h), check_dirtiness(n2) && update_effect(n2), t2.ran = false;
479
+ n2.f & g && set_signal_status(n2, m), check_dirtiness(n2) && update_effect(n2), t2.ran = false;
480
480
  }
481
481
  e2.l.r2.v = false;
482
482
  }
@@ -486,8 +486,8 @@ function render_effect(e2) {
486
486
  return create_effect(8, e2, true);
487
487
  }
488
488
  function template_effect(e2, t2 = [], n2 = derived) {
489
- const i2 = t2.map(n2);
490
- return block(() => e2(...i2.map(get$1)));
489
+ const o2 = t2.map(n2);
490
+ return block(() => e2(...o2.map(get$1)));
491
491
  }
492
492
  function block(e2, t2 = 0) {
493
493
  return create_effect(24 | t2, e2, true);
@@ -498,7 +498,7 @@ function branch(e2, t2 = true) {
498
498
  function execute_effect_teardown(e2) {
499
499
  var t2 = e2.teardown;
500
500
  if (null !== t2) {
501
- const e3 = A, n2 = F;
501
+ const e3 = W, n2 = F;
502
502
  set_is_destroying_effect(true), set_active_reaction(null);
503
503
  try {
504
504
  t2.call(null);
@@ -510,23 +510,26 @@ function execute_effect_teardown(e2) {
510
510
  function destroy_effect_children(e2, t2 = false) {
511
511
  var n2 = e2.first;
512
512
  for (e2.first = e2.last = null; null !== n2; ) {
513
- var i2 = n2.next;
514
- destroy_effect(n2, t2), n2 = i2;
513
+ var o2 = n2.next;
514
+ n2.f & d ? (
515
+ // this is now an independent root
516
+ n2.parent = null
517
+ ) : destroy_effect(n2, t2), n2 = o2;
515
518
  }
516
519
  }
517
520
  function destroy_effect(e2, t2 = true) {
518
521
  var n2 = false;
519
522
  if ((t2 || 524288 & e2.f) && null !== e2.nodes_start) {
520
- for (var i2 = e2.nodes_start, o2 = e2.nodes_end; null !== i2; ) {
521
- var s2 = i2 === o2 ? null : (
523
+ for (var o2 = e2.nodes_start, i2 = e2.nodes_end; null !== o2; ) {
524
+ var s2 = o2 === i2 ? null : (
522
525
  /** @type {TemplateNode} */
523
- /* @__PURE__ */ get_next_sibling(i2)
526
+ /* @__PURE__ */ get_next_sibling(o2)
524
527
  );
525
- i2.remove(), i2 = s2;
528
+ o2.remove(), o2 = s2;
526
529
  }
527
530
  n2 = true;
528
531
  }
529
- destroy_effect_children(e2, t2 && !n2), remove_reactions(e2, 0), set_signal_status(e2, b);
532
+ destroy_effect_children(e2, t2 && !n2), remove_reactions(e2, 0), set_signal_status(e2, y);
530
533
  var a2 = e2.transitions;
531
534
  if (null !== a2) for (const e3 of a2) e3.stop();
532
535
  execute_effect_teardown(e2);
@@ -536,8 +539,8 @@ function destroy_effect(e2, t2 = true) {
536
539
  e2.next = e2.prev = e2.teardown = e2.ctx = e2.deps = e2.fn = e2.nodes_start = e2.nodes_end = null;
537
540
  }
538
541
  function unlink_effect(e2) {
539
- var t2 = e2.parent, n2 = e2.prev, i2 = e2.next;
540
- null !== n2 && (n2.next = i2), null !== i2 && (i2.prev = n2), null !== t2 && (t2.first === e2 && (t2.first = i2), t2.last === e2 && (t2.last = n2));
542
+ var t2 = e2.parent, n2 = e2.prev, o2 = e2.next;
543
+ null !== n2 && (n2.next = o2), null !== o2 && (o2.prev = n2), null !== t2 && (t2.first === e2 && (t2.first = o2), t2.last === e2 && (t2.last = n2));
541
544
  }
542
545
  function pause_effect(e2, t2) {
543
546
  var n2 = [];
@@ -549,15 +552,15 @@ function run_out_transitions(e2, t2) {
549
552
  var n2 = e2.length;
550
553
  if (n2 > 0) {
551
554
  var check = () => --n2 || t2();
552
- for (var i2 of e2) i2.out(check);
555
+ for (var o2 of e2) o2.out(check);
553
556
  } else t2();
554
557
  }
555
558
  function pause_children(e2, t2, n2) {
556
- if (!(e2.f & m)) {
557
- if (e2.f ^= m, null !== e2.transitions) for (const i3 of e2.transitions) (i3.is_global || n2) && t2.push(i3);
558
- for (var i2 = e2.first; null !== i2; ) {
559
- var o2 = i2.next;
560
- pause_children(i2, t2, !!(!!(i2.f & y) || !!(i2.f & d)) && n2), i2 = o2;
559
+ if (!(e2.f & b)) {
560
+ if (e2.f ^= b, null !== e2.transitions) for (const o3 of e2.transitions) (o3.is_global || n2) && t2.push(o3);
561
+ for (var o2 = e2.first; null !== o2; ) {
562
+ var i2 = o2.next;
563
+ pause_children(o2, t2, !!(!!(o2.f & $) || !!(o2.f & f)) && n2), o2 = i2;
561
564
  }
562
565
  }
563
566
  }
@@ -565,15 +568,15 @@ function resume_effect(e2) {
565
568
  resume_children(e2, true);
566
569
  }
567
570
  function resume_children(e2, t2) {
568
- if (e2.f & m) {
569
- e2.f ^= m, // Ensure the effect is marked as clean again so that any dirty child
571
+ if (e2.f & b) {
572
+ e2.f ^= b, // Ensure the effect is marked as clean again so that any dirty child
570
573
  // effects can schedule themselves for execution
571
- e2.f & v || (e2.f ^= v), // If a dependency of this effect changed while it was paused,
574
+ e2.f & g || (e2.f ^= g), // If a dependency of this effect changed while it was paused,
572
575
  // schedule the effect to update
573
- check_dirtiness(e2) && (set_signal_status(e2, g), schedule_effect(e2));
576
+ check_dirtiness(e2) && (set_signal_status(e2, h), schedule_effect(e2));
574
577
  for (var n2 = e2.first; null !== n2; ) {
575
- var i2 = n2.next;
576
- resume_children(n2, !!(!!(n2.f & y) || !!(n2.f & d)) && t2), n2 = i2;
578
+ var o2 = n2.next;
579
+ resume_children(n2, !!(!!(n2.f & $) || !!(n2.f & f)) && t2), n2 = o2;
577
580
  }
578
581
  if (null !== e2.transitions) for (const n3 of e2.transitions) (n3.is_global || t2) && n3.in();
579
582
  }
@@ -592,9 +595,9 @@ function flush_tasks() {
592
595
  N = [], run_all(e2);
593
596
  }();
594
597
  }
595
- let B = false, D = false, W = null, z = false, A = false;
598
+ let B = false, A = false, D = null, z = false, W = false;
596
599
  function set_is_destroying_effect(e2) {
597
- A = e2;
600
+ W = e2;
598
601
  }
599
602
  let L = [], F = null, G = false;
600
603
  function set_active_reaction(e2) {
@@ -613,48 +616,48 @@ function increment_write_version() {
613
616
  function check_dirtiness(e2) {
614
617
  var _a2;
615
618
  var t2 = e2.f;
616
- if (t2 & g) return true;
617
- if (t2 & h) {
618
- var n2 = e2.deps, i2 = !!(t2 & p);
619
+ if (t2 & h) return true;
620
+ if (t2 & m) {
621
+ var n2 = e2.deps, o2 = !!(t2 & _);
619
622
  if (null !== n2) {
620
- var o2, s2, a2 = !!(t2 & _), l2 = i2 && null !== H && !J, c2 = n2.length;
623
+ var i2, s2, a2 = !!(t2 & v), l2 = o2 && null !== H && !J, c2 = n2.length;
621
624
  if (a2 || l2) {
622
625
  var u2 = (
623
626
  /** @type {Derived} */
624
627
  e2
625
- ), d2 = u2.parent;
626
- for (o2 = 0; o2 < c2; o2++) s2 = n2[o2], // We always re-add all reactions (even duplicates) if the derived was
628
+ ), f2 = u2.parent;
629
+ for (i2 = 0; i2 < c2; i2++) s2 = n2[i2], // We always re-add all reactions (even duplicates) if the derived was
627
630
  // previously disconnected, however we don't if it was unowned as we
628
631
  // de-duplicate dependencies in that case
629
632
  !a2 && ((_a2 = s2 == null ? void 0 : s2.reactions) == null ? void 0 : _a2.includes(u2)) || (s2.reactions ?? (s2.reactions = [])).push(u2);
630
- a2 && (u2.f ^= _), // If the unowned derived is now fully connected to the graph again (it's unowned and reconnected, has a parent
633
+ a2 && (u2.f ^= v), // If the unowned derived is now fully connected to the graph again (it's unowned and reconnected, has a parent
631
634
  // and the parent is not unowned), then we can mark it as connected again, removing the need for the unowned
632
635
  // flag
633
- !l2 || null === d2 || d2.f & p || (u2.f ^= p);
636
+ !l2 || null === f2 || f2.f & _ || (u2.f ^= _);
634
637
  }
635
- for (o2 = 0; o2 < c2; o2++) if (check_dirtiness(s2 = n2[o2]) && update_derived(
638
+ for (i2 = 0; i2 < c2; i2++) if (check_dirtiness(s2 = n2[i2]) && update_derived(
636
639
  /** @type {Derived} */
637
640
  s2
638
641
  ), s2.wv > e2.wv) return true;
639
642
  }
640
- i2 && (null === H || J) || set_signal_status(e2, v);
643
+ o2 && (null === H || J) || set_signal_status(e2, g);
641
644
  }
642
645
  return false;
643
646
  }
644
- function handle_error(e2, t2, n2, i2) {
647
+ function handle_error(e2, t2, n2, o2) {
645
648
  if (B) {
646
649
  if (null === n2 && (B = false), /**
647
650
  * @param {Effect} effect
648
651
  */
649
652
  function should_rethrow_error(e3) {
650
- return !(e3.f & b || null !== e3.parent && e3.parent.f & f);
653
+ return !(e3.f & y || null !== e3.parent && e3.parent.f & p);
651
654
  }(t2)) throw e2;
652
655
  } else null !== n2 && (B = true), function propagate_error(e3, t3) {
653
656
  for (var n3 = t3; null !== n3; ) {
654
- if (n3.f & f) try {
657
+ if (n3.f & p) try {
655
658
  return void n3.fn(e3);
656
659
  } catch {
657
- n3.f ^= f;
660
+ n3.f ^= p;
658
661
  }
659
662
  n3 = n3.parent;
660
663
  }
@@ -662,15 +665,15 @@ function handle_error(e2, t2, n2, i2) {
662
665
  }(e2, t2);
663
666
  }
664
667
  function schedule_possible_effect_self_invalidation(e2, t2, n2 = true) {
665
- var i2 = e2.reactions;
666
- if (null !== i2) for (var o2 = 0; o2 < i2.length; o2++) {
667
- var s2 = i2[o2];
668
+ var o2 = e2.reactions;
669
+ if (null !== o2) for (var i2 = 0; i2 < o2.length; i2++) {
670
+ var s2 = o2[i2];
668
671
  2 & s2.f ? schedule_possible_effect_self_invalidation(
669
672
  /** @type {Derived} */
670
673
  s2,
671
674
  t2,
672
675
  false
673
- ) : t2 === s2 && (n2 ? set_signal_status(s2, g) : s2.f & v && set_signal_status(s2, h), schedule_effect(
676
+ ) : t2 === s2 && (n2 ? set_signal_status(s2, h) : s2.f & g && set_signal_status(s2, m), schedule_effect(
674
677
  /** @type {Effect} */
675
678
  s2
676
679
  ));
@@ -678,50 +681,50 @@ function schedule_possible_effect_self_invalidation(e2, t2, n2 = true) {
678
681
  }
679
682
  function update_reaction(e2) {
680
683
  var _a2;
681
- var t2 = V, n2 = K, i2 = U, o2 = F, s2 = J, a2 = R, l2 = I, c2 = G, u2 = e2.f;
684
+ var t2 = V, n2 = K, o2 = U, i2 = F, s2 = J, a2 = R, l2 = q, c2 = G, u2 = e2.f;
682
685
  V = /** @type {null | Value[]} */
683
- null, K = 0, U = null, J = !!(u2 & p) && (G || !z || null === F), F = 96 & u2 ? null : e2, R = null, set_component_context(e2.ctx), G = false, Y++;
686
+ null, K = 0, U = null, J = !!(u2 & _) && (G || !z || null === F), F = 96 & u2 ? null : e2, R = null, set_component_context(e2.ctx), G = false, Y++;
684
687
  try {
685
- var d2 = (
688
+ var f2 = (
686
689
  /** @type {Function} */
687
690
  /** @type {Function} */
688
691
  (0, e2.fn)()
689
- ), f2 = e2.deps;
692
+ ), d2 = e2.deps;
690
693
  if (null !== V) {
691
- var _2;
692
- if (remove_reactions(e2, K), null !== f2 && K > 0) for (f2.length = K + V.length, _2 = 0; _2 < V.length; _2++) f2[K + _2] = V[_2];
693
- else e2.deps = f2 = V;
694
- if (!J) for (_2 = K; _2 < f2.length; _2++) ((_a2 = f2[_2]).reactions ?? (_a2.reactions = [])).push(e2);
695
- } else null !== f2 && K < f2.length && (remove_reactions(e2, K), f2.length = K);
696
- if (is_runes() && null !== U && !G && null !== f2 && !(6146 & e2.f)) for (_2 = 0; _2 < /** @type {Source[]} */
697
- U.length; _2++) schedule_possible_effect_self_invalidation(
698
- U[_2],
694
+ var p2;
695
+ if (remove_reactions(e2, K), null !== d2 && K > 0) for (d2.length = K + V.length, p2 = 0; p2 < V.length; p2++) d2[K + p2] = V[p2];
696
+ else e2.deps = d2 = V;
697
+ if (!J) for (p2 = K; p2 < d2.length; p2++) ((_a2 = d2[p2]).reactions ?? (_a2.reactions = [])).push(e2);
698
+ } else null !== d2 && K < d2.length && (remove_reactions(e2, K), d2.length = K);
699
+ if (is_runes() && null !== U && !G && null !== d2 && !(6146 & e2.f)) for (p2 = 0; p2 < /** @type {Source[]} */
700
+ U.length; p2++) schedule_possible_effect_self_invalidation(
701
+ U[p2],
699
702
  /** @type {Effect} */
700
703
  e2
701
704
  );
702
- return null !== o2 && Y++, d2;
705
+ return null !== i2 && Y++, f2;
703
706
  } finally {
704
- V = t2, K = n2, U = i2, F = o2, J = s2, R = a2, set_component_context(l2), G = c2;
707
+ V = t2, K = n2, U = o2, F = i2, J = s2, R = a2, set_component_context(l2), G = c2;
705
708
  }
706
709
  }
707
710
  function remove_reaction(e2, t2) {
708
- let i2 = t2.reactions;
709
- if (null !== i2) {
710
- var o2 = n.call(i2, e2);
711
- if (-1 !== o2) {
712
- var s2 = i2.length - 1;
713
- 0 === s2 ? i2 = t2.reactions = null : (
711
+ let o2 = t2.reactions;
712
+ if (null !== o2) {
713
+ var i2 = n.call(o2, e2);
714
+ if (-1 !== i2) {
715
+ var s2 = o2.length - 1;
716
+ 0 === s2 ? o2 = t2.reactions = null : (
714
717
  // Swap with last element and then remove.
715
- (i2[o2] = i2[s2], i2.pop())
718
+ (o2[i2] = o2[s2], o2.pop())
716
719
  );
717
720
  }
718
721
  }
719
- null === i2 && 2 & t2.f && // Destroying a child effect while updating a parent effect can cause a dependency to appear
722
+ null === o2 && 2 & t2.f && // Destroying a child effect while updating a parent effect can cause a dependency to appear
720
723
  // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
721
724
  // allows us to skip the expensive work of disconnecting and immediately reconnecting it
722
- (null === V || !V.includes(t2)) && (set_signal_status(t2, h), // If we are working with a derived that is owned by an effect, then mark it as being
725
+ (null === V || !V.includes(t2)) && (set_signal_status(t2, m), // If we are working with a derived that is owned by an effect, then mark it as being
723
726
  // disconnected.
724
- 768 & t2.f || (t2.f ^= _), // Disconnect any reactions owned by this reaction
727
+ 768 & t2.f || (t2.f ^= v), // Disconnect any reactions owned by this reaction
725
728
  destroy_derived_effects(
726
729
  /** @type {Derived} **/
727
730
  t2
@@ -733,19 +736,19 @@ function remove_reaction(e2, t2) {
733
736
  }
734
737
  function remove_reactions(e2, t2) {
735
738
  var n2 = e2.deps;
736
- if (null !== n2) for (var i2 = t2; i2 < n2.length; i2++) remove_reaction(e2, n2[i2]);
739
+ if (null !== n2) for (var o2 = t2; o2 < n2.length; o2++) remove_reaction(e2, n2[o2]);
737
740
  }
738
741
  function update_effect(t2) {
739
742
  var n2 = t2.f;
740
- if (!(n2 & b)) {
741
- set_signal_status(t2, v);
742
- var i2 = H, o2 = I, s2 = z;
743
+ if (!(n2 & y)) {
744
+ set_signal_status(t2, g);
745
+ var o2 = H, i2 = q, s2 = z;
743
746
  H = t2, z = true;
744
747
  try {
745
748
  16 & n2 ? function destroy_block_effect_children(e2) {
746
749
  for (var t3 = e2.first; null !== t3; ) {
747
750
  var n3 = t3.next;
748
- t3.f & d || destroy_effect(t3), t3 = n3;
751
+ t3.f & f || destroy_effect(t3), t3 = n3;
749
752
  }
750
753
  }(t2) : destroy_effect_children(t2), execute_effect_teardown(t2);
751
754
  var a2 = update_reaction(t2);
@@ -753,9 +756,9 @@ function update_effect(t2) {
753
756
  t2.deps;
754
757
  e;
755
758
  } catch (e2) {
756
- handle_error(e2, t2, i2, o2 || t2.ctx);
759
+ handle_error(e2, t2, o2, i2 || t2.ctx);
757
760
  } finally {
758
- z = s2, H = i2;
761
+ z = s2, H = o2;
759
762
  }
760
763
  }
761
764
  }
@@ -765,64 +768,65 @@ function infinite_loop_guard() {
765
768
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
766
769
  }();
767
770
  } catch (e2) {
768
- if (null === W) throw e2;
769
- handle_error(e2, W, null);
771
+ if (null === D) throw e2;
772
+ handle_error(e2, D, null);
770
773
  }
771
774
  }
772
775
  function flush_queued_root_effects() {
776
+ var e2 = z;
773
777
  try {
774
- for (var e2 = 0; L.length > 0; ) {
775
- e2++ > 1e3 && infinite_loop_guard();
776
- var t2 = L, n2 = t2.length;
778
+ var t2 = 0;
779
+ for (z = true; L.length > 0; ) {
780
+ t2++ > 1e3 && infinite_loop_guard();
781
+ var n2 = L, o2 = n2.length;
777
782
  L = [];
778
- for (var i2 = 0; i2 < n2; i2++) {
779
- var o2 = t2[i2];
780
- o2.f & v || (o2.f ^= v), flush_queued_effects(process_effects(o2));
783
+ for (var i2 = 0; i2 < o2; i2++) {
784
+ flush_queued_effects(process_effects(n2[i2]));
781
785
  }
782
786
  }
783
787
  } finally {
784
- D = false, W = null;
788
+ A = false, z = e2, D = null;
785
789
  }
786
790
  }
787
791
  function flush_queued_effects(e2) {
788
792
  var t2 = e2.length;
789
793
  if (0 !== t2) for (var n2 = 0; n2 < t2; n2++) {
790
- var i2 = e2[n2];
791
- if (!(24576 & i2.f)) try {
792
- check_dirtiness(i2) && (update_effect(i2), // Effects with no dependencies or teardown do not get added to the effect tree.
794
+ var o2 = e2[n2];
795
+ if (!(24576 & o2.f)) try {
796
+ check_dirtiness(o2) && (update_effect(o2), // Effects with no dependencies or teardown do not get added to the effect tree.
793
797
  // Deferred effects (e.g. `$effect(...)`) _are_ added to the tree because we
794
798
  // don't know if we need to keep them until they are executed. Doing the check
795
799
  // here (rather than in `update_effect`) allows us to skip the work for
796
800
  // immediate effects.
797
- null === i2.deps && null === i2.first && null === i2.nodes_start && (null === i2.teardown ? (
801
+ null === o2.deps && null === o2.first && null === o2.nodes_start && (null === o2.teardown ? (
798
802
  // remove this effect from the graph
799
- unlink_effect(i2)
803
+ unlink_effect(o2)
800
804
  ) : (
801
805
  // keep the effect in the graph, but free up some memory
802
- i2.fn = null
806
+ o2.fn = null
803
807
  )));
804
808
  } catch (e3) {
805
- handle_error(e3, i2, null, i2.ctx);
809
+ handle_error(e3, o2, null, o2.ctx);
806
810
  }
807
811
  }
808
812
  }
809
813
  function schedule_effect(e2) {
810
- D || (D = true, queueMicrotask(flush_queued_root_effects));
811
- for (var t2 = W = e2; null !== t2.parent; ) {
814
+ A || (A = true, queueMicrotask(flush_queued_root_effects));
815
+ for (var t2 = D = e2; null !== t2.parent; ) {
812
816
  var n2 = (t2 = t2.parent).f;
813
817
  if (96 & n2) {
814
- if (!(n2 & v)) return;
815
- t2.f ^= v;
818
+ if (!(n2 & g)) return;
819
+ t2.f ^= g;
816
820
  }
817
821
  }
818
822
  L.push(t2);
819
823
  }
820
824
  function process_effects(e2) {
821
- for (var t2 = [], n2 = e2.first; null !== n2; ) {
822
- var i2 = n2.f, o2 = !!(i2 & d);
823
- if (!(o2 && !!(i2 & v) || i2 & m)) {
824
- if (4 & i2) t2.push(n2);
825
- else if (o2) n2.f ^= v;
825
+ for (var t2 = [], n2 = e2; null !== n2; ) {
826
+ var o2 = n2.f, i2 = !!(96 & o2);
827
+ if (!(i2 && !!(o2 & g) || o2 & b)) {
828
+ if (4 & o2) t2.push(n2);
829
+ else if (i2) n2.f ^= g;
826
830
  else {
827
831
  var s2 = F;
828
832
  try {
@@ -848,7 +852,7 @@ async function tick() {
848
852
  await Promise.resolve(), // By calling flushSync we guarantee that any pending state changes are applied after one tick.
849
853
  // TODO look into whether we can make flushing subsequent updates synchronously in the future.
850
854
  function flushSync(e2) {
851
- for (flush_tasks(); L.length > 0; ) D = true, flush_queued_root_effects(), flush_tasks();
855
+ for (flush_tasks(); L.length > 0; ) A = true, flush_queued_root_effects(), flush_tasks();
852
856
  }();
853
857
  }
854
858
  function get$1(e2) {
@@ -860,21 +864,21 @@ function get$1(e2) {
860
864
  var n2 = (
861
865
  /** @type {Derived} */
862
866
  e2
863
- ), i2 = n2.parent;
864
- null === i2 || i2.f & p || // If the derived is owned by another derived then mark it as unowned
867
+ ), o2 = n2.parent;
868
+ null === o2 || o2.f & _ || // If the derived is owned by another derived then mark it as unowned
865
869
  // as the derived value might have been referenced in a different context
866
870
  // since and thus its parent might not be its true owner anymore
867
- (n2.f ^= p);
871
+ (n2.f ^= _);
868
872
  }
869
873
  } else {
870
874
  null !== R && R.includes(e2) && function state_unsafe_local_read() {
871
875
  throw new Error("https://svelte.dev/e/state_unsafe_local_read");
872
876
  }();
873
- var o2 = F.deps;
877
+ var i2 = F.deps;
874
878
  e2.rv < Y && (e2.rv = Y, // If the signal is accessing the same dependencies in the same
875
879
  // order as it did last time, increment `skipped_deps`
876
880
  // rather than updating `new_deps`, which creates GC cost
877
- null === V && null !== o2 && o2[K] === e2 ? K++ : null === V ? V = [e2] : J && V.includes(e2) || // Normally we can push duplicated dependencies to `new_deps`, but if we're inside
881
+ null === V && null !== i2 && i2[K] === e2 ? K++ : null === V ? V = [e2] : J && V.includes(e2) || // Normally we can push duplicated dependencies to `new_deps`, but if we're inside
878
882
  // an unowned derived because skip_reaction is true, then we need to ensure that
879
883
  // we don't have duplicates
880
884
  V.push(e2));
@@ -896,10 +900,10 @@ function set_signal_status(e2, t2) {
896
900
  }
897
901
  function deep_read_state(e2) {
898
902
  if ("object" == typeof e2 && e2 && !(e2 instanceof EventTarget)) {
899
- if (w in e2) deep_read(e2);
903
+ if (x in e2) deep_read(e2);
900
904
  else if (!Array.isArray(e2)) for (let t2 in e2) {
901
905
  const n2 = e2[t2];
902
- "object" == typeof n2 && n2 && w in n2 && deep_read(n2);
906
+ "object" == typeof n2 && n2 && x in n2 && deep_read(n2);
903
907
  }
904
908
  }
905
909
  }
@@ -916,9 +920,9 @@ function deep_read(e2, t2 = /* @__PURE__ */ new Set()) {
916
920
  if (n2 !== Object.prototype && n2 !== Array.prototype && n2 !== Map.prototype && n2 !== Set.prototype && n2 !== Date.prototype) {
917
921
  const t3 = a(n2);
918
922
  for (let n3 in t3) {
919
- const i2 = t3[n3].get;
920
- if (i2) try {
921
- i2.call(e2);
923
+ const o2 = t3[n3].get;
924
+ if (o2) try {
925
+ o2.call(e2);
922
926
  } catch (e3) {
923
927
  }
924
928
  }
@@ -972,12 +976,12 @@ function without_reactive_context(e2) {
972
976
  set_active_reaction(t2), set_active_effect(n2);
973
977
  }
974
978
  }
975
- function listen_to_event_and_reset_event(e2, t2, n2, i2 = n2) {
979
+ function listen_to_event_and_reset_event(e2, t2, n2, o2 = n2) {
976
980
  e2.addEventListener(t2, () => without_reactive_context(n2));
977
- const o2 = e2.__on_r;
978
- e2.__on_r = o2 ? () => {
979
- o2(), i2(true);
980
- } : () => i2(true), function add_form_reset_listener() {
981
+ const i2 = e2.__on_r;
982
+ e2.__on_r = i2 ? () => {
983
+ i2(), o2(true);
984
+ } : () => o2(true), function add_form_reset_listener() {
981
985
  re || (re = true, document.addEventListener(
982
986
  "reset",
983
987
  (e3) => {
@@ -998,32 +1002,32 @@ function listen_to_event_and_reset_event(e2, t2, n2, i2 = n2) {
998
1002
  ));
999
1003
  }();
1000
1004
  }
1001
- const ie = /* @__PURE__ */ new Set(), oe = /* @__PURE__ */ new Set();
1002
- function create_event(e2, t2, n2, i2 = {}) {
1005
+ const oe = /* @__PURE__ */ new Set(), ie = /* @__PURE__ */ new Set();
1006
+ function create_event(e2, t2, n2, o2 = {}) {
1003
1007
  function target_handler(e3) {
1004
- if (i2.capture || // Only call in the bubble phase, else delegated events would be called before the capturing events
1008
+ if (o2.capture || // Only call in the bubble phase, else delegated events would be called before the capturing events
1005
1009
  handle_event_propagation.call(t2, e3), !e3.cancelBubble) return without_reactive_context(() => n2 == null ? void 0 : n2.call(this, e3));
1006
1010
  }
1007
1011
  return e2.startsWith("pointer") || e2.startsWith("touch") || "wheel" === e2 ? queue_micro_task(() => {
1008
- t2.addEventListener(e2, target_handler, i2);
1009
- }) : t2.addEventListener(e2, target_handler, i2), target_handler;
1012
+ t2.addEventListener(e2, target_handler, o2);
1013
+ }) : t2.addEventListener(e2, target_handler, o2), target_handler;
1010
1014
  }
1011
- function event(e2, t2, n2, i2, o2) {
1015
+ function event(e2, t2, n2, o2, i2) {
1012
1016
  var s2 = {
1013
- capture: i2,
1014
- passive: o2
1017
+ capture: o2,
1018
+ passive: i2
1015
1019
  }, a2 = create_event(e2, t2, n2, s2);
1016
1020
  t2 !== document.body && t2 !== window && t2 !== document || teardown(() => {
1017
1021
  t2.removeEventListener(e2, a2, s2);
1018
1022
  });
1019
1023
  }
1020
1024
  function delegate(e2) {
1021
- for (var t2 = 0; t2 < e2.length; t2++) ie.add(e2[t2]);
1022
- for (var n2 of oe) n2(e2);
1025
+ for (var t2 = 0; t2 < e2.length; t2++) oe.add(e2[t2]);
1026
+ for (var n2 of ie) n2(e2);
1023
1027
  }
1024
1028
  function handle_event_propagation(e2) {
1025
1029
  var _a2;
1026
- var n2 = this, i2 = (
1030
+ var n2 = this, o2 = (
1027
1031
  /** @type {Node} */
1028
1032
  n2.ownerDocument
1029
1033
  ), s2 = e2.type, a2 = ((_a2 = e2.composedPath) == null ? void 0 : _a2.call(e2)) || [], l2 = (
@@ -1031,20 +1035,20 @@ function handle_event_propagation(e2) {
1031
1035
  a2[0] || e2.target
1032
1036
  ), c2 = 0, u2 = e2.__root;
1033
1037
  if (u2) {
1034
- var d2 = a2.indexOf(u2);
1035
- if (-1 !== d2 && (n2 === document || n2 === /** @type {any} */
1038
+ var f2 = a2.indexOf(u2);
1039
+ if (-1 !== f2 && (n2 === document || n2 === /** @type {any} */
1036
1040
  window))
1037
1041
  return void (e2.__root = n2);
1038
- var f2 = a2.indexOf(n2);
1039
- if (-1 === f2)
1042
+ var d2 = a2.indexOf(n2);
1043
+ if (-1 === d2)
1040
1044
  return;
1041
- d2 <= f2 && (c2 = d2);
1045
+ f2 <= d2 && (c2 = f2);
1042
1046
  }
1043
1047
  if ((l2 = /** @type {Element} */
1044
1048
  a2[c2] || e2.target) !== n2) {
1045
- o(e2, "currentTarget", {
1049
+ i(e2, "currentTarget", {
1046
1050
  configurable: true,
1047
- get: () => l2 || i2
1051
+ get: () => l2 || o2
1048
1052
  });
1049
1053
  var p2 = F, _2 = H;
1050
1054
  set_active_reaction(null), set_active_effect(null);
@@ -1054,7 +1058,7 @@ function handle_event_propagation(e2) {
1054
1058
  l2.host || null;
1055
1059
  try {
1056
1060
  var m2 = l2["__" + s2];
1057
- if (void 0 !== m2 && (!/** @type {any} */
1061
+ if (null != m2 && (!/** @type {any} */
1058
1062
  l2.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
1059
1063
  // -> the target could not have been disabled because it emits the event in the first place
1060
1064
  e2.target === l2)) if (t(m2)) {
@@ -1093,15 +1097,15 @@ function assign_nodes(e2, t2) {
1093
1097
  }
1094
1098
  // @__NO_SIDE_EFFECTS__
1095
1099
  function template(e2, t2) {
1096
- var n2, i2 = !!(1 & t2), o2 = !!(2 & t2), s2 = !e2.startsWith("<!>");
1100
+ var n2, o2 = !!(1 & t2), i2 = !!(2 & t2), s2 = !e2.startsWith("<!>");
1097
1101
  return () => {
1098
- void 0 === n2 && (n2 = create_fragment_from_html(s2 ? e2 : "<!>" + e2), i2 || (n2 = /** @type {Node} */
1102
+ void 0 === n2 && (n2 = create_fragment_from_html(s2 ? e2 : "<!>" + e2), o2 || (n2 = /** @type {Node} */
1099
1103
  /* @__PURE__ */ get_first_child(n2)));
1100
1104
  var t3 = (
1101
1105
  /** @type {TemplateNode} */
1102
- o2 || P ? document.importNode(n2, true) : n2.cloneNode(true)
1106
+ i2 || T ? document.importNode(n2, true) : n2.cloneNode(true)
1103
1107
  );
1104
- i2 ? assign_nodes(
1108
+ o2 ? assign_nodes(
1105
1109
  /** @type {TemplateNode} */
1106
1110
  /* @__PURE__ */ get_first_child(t3),
1107
1111
  /** @type {TemplateNode} */
@@ -1112,22 +1116,22 @@ function template(e2, t2) {
1112
1116
  }
1113
1117
  // @__NO_SIDE_EFFECTS__
1114
1118
  function ns_template(e2, t2, n2 = "svg") {
1115
- var i2, o2 = `<${n2}>${!e2.startsWith("<!>") ? e2 : "<!>" + e2}</${n2}>`;
1119
+ var o2, i2 = `<${n2}>${!e2.startsWith("<!>") ? e2 : "<!>" + e2}</${n2}>`;
1116
1120
  return () => {
1117
- if (!i2) {
1121
+ if (!o2) {
1118
1122
  var e3 = (
1119
1123
  /** @type {Element} */
1120
1124
  /* @__PURE__ */ get_first_child(
1121
1125
  /** @type {DocumentFragment} */
1122
- create_fragment_from_html(o2)
1126
+ create_fragment_from_html(i2)
1123
1127
  )
1124
1128
  );
1125
- i2 = /** @type {Element} */
1129
+ o2 = /** @type {Element} */
1126
1130
  /* @__PURE__ */ get_first_child(e3);
1127
1131
  }
1128
1132
  var t3 = (
1129
1133
  /** @type {TemplateNode} */
1130
- i2.cloneNode(true)
1134
+ o2.cloneNode(true)
1131
1135
  );
1132
1136
  return assign_nodes(t3, t3), t3;
1133
1137
  };
@@ -1156,14 +1160,14 @@ function set_text(e2, t2) {
1156
1160
  (e2.__t = n2, e2.nodeValue = n2 + "");
1157
1161
  }
1158
1162
  function mount(e2, t2) {
1159
- return function _mount(e3, { target: t3, anchor: n2, props: o2 = {}, events: a2, context: l2, intro: c2 = true }) {
1163
+ return function _mount(e3, { target: t3, anchor: n2, props: i2 = {}, events: a2, context: l2, intro: c2 = true }) {
1160
1164
  !/**
1161
1165
  * Initialize these lazily to avoid issues when using the runtime in a server context
1162
1166
  * where these globals are not available while avoiding a separate server entry point
1163
1167
  */
1164
1168
  function init_operations() {
1165
- if (void 0 === S) {
1166
- S = window, T = document, P = /Firefox/.test(navigator.userAgent);
1169
+ if (void 0 === I) {
1170
+ I = window, P = document, T = /Firefox/.test(navigator.userAgent);
1167
1171
  var e4 = Element.prototype, t4 = Node.prototype;
1168
1172
  O = s(t4, "firstChild").get, // @ts-ignore
1169
1173
  E = s(t4, "nextSibling").get, // the following assignments improve perf of lookups on DOM nodes
@@ -1171,87 +1175,87 @@ function mount(e2, t2) {
1171
1175
  e4.__click = void 0, // @ts-expect-error
1172
1176
  e4.__className = void 0, // @ts-expect-error
1173
1177
  e4.__attributes = null, // @ts-expect-error
1174
- e4.__styles = null, // @ts-expect-error
1178
+ e4.__style = void 0, // @ts-expect-error
1175
1179
  e4.__e = void 0, // @ts-expect-error
1176
1180
  Text.prototype.__t = void 0;
1177
1181
  }
1178
1182
  }();
1179
1183
  var u2 = /* @__PURE__ */ new Set(), event_handle = (e4) => {
1180
1184
  for (var n3 = 0; n3 < e4.length; n3++) {
1181
- var i2 = e4[n3];
1182
- if (!u2.has(i2)) {
1183
- u2.add(i2);
1184
- var o3 = is_passive_event(i2);
1185
- t3.addEventListener(i2, handle_event_propagation, {
1186
- passive: o3
1185
+ var o2 = e4[n3];
1186
+ if (!u2.has(o2)) {
1187
+ u2.add(o2);
1188
+ var i3 = is_passive_event(o2);
1189
+ t3.addEventListener(o2, handle_event_propagation, {
1190
+ passive: i3
1187
1191
  });
1188
- var s2 = ae.get(i2);
1192
+ var s2 = ae.get(o2);
1189
1193
  void 0 === s2 ? (
1190
1194
  // The document listener ensures we catch events that originate from elements that were
1191
1195
  // manually moved outside of the container (e.g. via manual portals).
1192
- (document.addEventListener(i2, handle_event_propagation, {
1193
- passive: o3
1194
- }), ae.set(i2, 1))
1195
- ) : ae.set(i2, s2 + 1);
1196
+ (document.addEventListener(o2, handle_event_propagation, {
1197
+ passive: i3
1198
+ }), ae.set(o2, 1))
1199
+ ) : ae.set(o2, s2 + 1);
1196
1200
  }
1197
1201
  }
1198
1202
  };
1199
- event_handle(i(ie)), oe.add(event_handle);
1200
- var d2 = void 0, f2 = (
1203
+ event_handle(o(oe)), ie.add(event_handle);
1204
+ var f2 = void 0, p2 = (
1201
1205
  /**
1202
1206
  * An effect root whose children can transition out
1203
1207
  * @param {() => void} fn
1204
1208
  * @returns {(options?: { outro?: boolean }) => Promise<void>}
1205
1209
  */
1206
1210
  function component_root(e4) {
1207
- const t4 = create_effect(64, e4, true);
1211
+ const t4 = create_effect(d, e4, true);
1208
1212
  return (e5 = {}) => new Promise((n3) => {
1209
1213
  e5.outro ? pause_effect(t4, () => {
1210
1214
  destroy_effect(t4), n3(void 0);
1211
1215
  }) : (destroy_effect(t4), n3(void 0));
1212
1216
  });
1213
1217
  }(() => {
1214
- var i2 = n2 ?? t3.appendChild(create_text());
1218
+ var o2 = n2 ?? t3.appendChild(create_text());
1215
1219
  return branch(() => {
1216
1220
  l2 && (push({}), /** @type {ComponentContext} */
1217
- I.c = l2);
1221
+ q.c = l2);
1218
1222
  a2 && // We can't spread the object or else we'd lose the state proxy stuff, if it is one
1219
1223
  /** @type {any} */
1220
- (o2.$$events = a2), se = c2, // @ts-expect-error the public typings are not what the actual function looks like
1221
- d2 = e3(i2, o2) || {}, se = true, l2 && pop();
1224
+ (i2.$$events = a2), se = c2, // @ts-expect-error the public typings are not what the actual function looks like
1225
+ f2 = e3(o2, i2) || {}, se = true, l2 && pop();
1222
1226
  }), () => {
1223
1227
  var _a2;
1224
1228
  for (var e4 of u2) {
1225
1229
  t3.removeEventListener(e4, handle_event_propagation);
1226
- var o3 = (
1230
+ var i3 = (
1227
1231
  /** @type {number} */
1228
1232
  ae.get(e4)
1229
1233
  );
1230
- 0 == --o3 ? (document.removeEventListener(e4, handle_event_propagation), ae.delete(e4)) : ae.set(e4, o3);
1234
+ 0 == --i3 ? (document.removeEventListener(e4, handle_event_propagation), ae.delete(e4)) : ae.set(e4, i3);
1231
1235
  }
1232
- oe.delete(event_handle), i2 !== n2 && ((_a2 = i2.parentNode) == null ? void 0 : _a2.removeChild(i2));
1236
+ ie.delete(event_handle), o2 !== n2 && ((_a2 = o2.parentNode) == null ? void 0 : _a2.removeChild(o2));
1233
1237
  };
1234
1238
  })
1235
1239
  );
1236
- return le.set(d2, f2), d2;
1240
+ return le.set(f2, p2), f2;
1237
1241
  }(e2, t2);
1238
1242
  }
1239
1243
  const ae = /* @__PURE__ */ new Map();
1240
1244
  let le = /* @__PURE__ */ new WeakMap();
1241
- function if_block(e2, t2, n2 = false) {
1242
- var i2 = e2, o2 = null, s2 = null, a2 = M, l2 = false;
1245
+ function if_block(e2, t2, [n2, o2] = [0, 0]) {
1246
+ var i2 = e2, s2 = null, a2 = null, l2 = M, c2 = false;
1243
1247
  const set_branch = (e3, t3 = true) => {
1244
- l2 = true, update_branch(t3, e3);
1248
+ c2 = true, update_branch(t3, e3);
1245
1249
  }, update_branch = (e3, t3) => {
1246
- a2 !== (a2 = e3) && (a2 ? (o2 ? resume_effect(o2) : t3 && (o2 = branch(() => t3(i2))), s2 && pause_effect(s2, () => {
1250
+ l2 !== (l2 = e3) && (l2 ? (s2 ? resume_effect(s2) : t3 && (s2 = branch(() => t3(i2))), a2 && pause_effect(a2, () => {
1251
+ a2 = null;
1252
+ })) : (a2 ? resume_effect(a2) : t3 && (a2 = branch(() => t3(i2, [n2 + 1, o2]))), s2 && pause_effect(s2, () => {
1247
1253
  s2 = null;
1248
- })) : (s2 ? resume_effect(s2) : t3 && (s2 = branch(() => t3(i2))), o2 && pause_effect(o2, () => {
1249
- o2 = null;
1250
1254
  })));
1251
1255
  };
1252
1256
  block(() => {
1253
- l2 = false, t2(set_branch), l2 || update_branch(null, null);
1254
- }, n2 ? y : 0);
1257
+ c2 = false, t2(set_branch), c2 || update_branch(null, null);
1258
+ }, n2 > 0 ? $ : 0);
1255
1259
  }
1256
1260
  let ce = null;
1257
1261
  function set_current_each_item(e2) {
@@ -1260,7 +1264,7 @@ function set_current_each_item(e2) {
1260
1264
  function index(e2, t2) {
1261
1265
  return t2;
1262
1266
  }
1263
- function each(e2, n2, o2, s2, a2, l2 = null) {
1267
+ function each(e2, n2, i2, s2, a2, l2 = null) {
1264
1268
  var c2 = e2, u2 = {
1265
1269
  flags: n2,
1266
1270
  items: /* @__PURE__ */ new Map(),
@@ -1268,13 +1272,13 @@ function each(e2, n2, o2, s2, a2, l2 = null) {
1268
1272
  };
1269
1273
  !(4 & n2) || (c2 = /** @type {Element} */
1270
1274
  e2.appendChild(create_text()));
1271
- var d2 = null, f2 = false, p2 = /* @__PURE__ */ derived_safe_equal(() => {
1272
- var e3 = o2();
1273
- return t(e3) ? e3 : null == e3 ? [] : i(e3);
1275
+ var f2 = null, d2 = false, p2 = /* @__PURE__ */ derived_safe_equal(() => {
1276
+ var e3 = i2();
1277
+ return t(e3) ? e3 : null == e3 ? [] : o(e3);
1274
1278
  });
1275
1279
  block(() => {
1276
1280
  var e3 = get$1(p2), t2 = e3.length;
1277
- f2 && 0 === t2 || (f2 = 0 === t2, /**
1281
+ d2 && 0 === t2 || (d2 = 0 === t2, /**
1278
1282
  * Add, remove, or reorder items output by an each block as its input changes
1279
1283
  * @template V
1280
1284
  * @param {Array<V>} array
@@ -1286,26 +1290,26 @@ function each(e2, n2, o2, s2, a2, l2 = null) {
1286
1290
  * @param {() => V[]} get_collection
1287
1291
  * @returns {void}
1288
1292
  */
1289
- function reconcile(e4, t3, n3, o3, s3, a3, l3) {
1290
- var _a2, _b, _c, _d;
1291
- var c3, u3, d3, f3, p3, _2, v2 = !!(8 & s3), g2 = !!(3 & s3), h2 = e4.length, b2 = t3.items, y2 = t3.first, $2 = y2, w2 = null, x2 = [], k2 = [];
1292
- if (v2) for (_2 = 0; _2 < h2; _2 += 1) f3 = a3(d3 = e4[_2], _2), void 0 !== (p3 = b2.get(f3)) && ((_a2 = p3.a) == null ? void 0 : _a2.measure(), (u3 ?? (u3 = /* @__PURE__ */ new Set())).add(p3));
1293
- for (_2 = 0; _2 < h2; _2 += 1) if (f3 = a3(d3 = e4[_2], _2), void 0 !== (p3 = b2.get(f3))) {
1294
- if (g2 && update_item(p3, d3, _2, s3), p3.e.f & m && (resume_effect(p3.e), v2 && ((_b = p3.a) == null ? void 0 : _b.unfix(), (u3 ?? (u3 = /* @__PURE__ */ new Set())).delete(p3))), p3 !== $2) {
1293
+ function reconcile(e4, t3, n3, i3, s3, a3, l3) {
1294
+ var _a2, _b2, _c2, _d;
1295
+ var c3, u3, f3, d3, p3, _2, v2 = !!(8 & s3), g2 = !!(3 & s3), h2 = e4.length, m2 = t3.items, y2 = t3.first, $2 = y2, w2 = null, x2 = [], k2 = [];
1296
+ if (v2) for (_2 = 0; _2 < h2; _2 += 1) d3 = a3(f3 = e4[_2], _2), void 0 !== (p3 = m2.get(d3)) && ((_a2 = p3.a) == null ? void 0 : _a2.measure(), (u3 ?? (u3 = /* @__PURE__ */ new Set())).add(p3));
1297
+ for (_2 = 0; _2 < h2; _2 += 1) if (d3 = a3(f3 = e4[_2], _2), void 0 !== (p3 = m2.get(d3))) {
1298
+ if (g2 && update_item(p3, f3, _2, s3), p3.e.f & b && (resume_effect(p3.e), v2 && ((_b2 = p3.a) == null ? void 0 : _b2.unfix(), (u3 ?? (u3 = /* @__PURE__ */ new Set())).delete(p3))), p3 !== $2) {
1295
1299
  if (void 0 !== c3 && c3.has(p3)) {
1296
1300
  if (x2.length < k2.length) {
1297
- var C2, M2 = k2[0];
1298
- w2 = M2.prev;
1299
- var q2 = x2[0], I2 = x2[x2.length - 1];
1300
- for (C2 = 0; C2 < x2.length; C2 += 1) move(x2[C2], M2, n3);
1301
+ var C2, S2 = k2[0];
1302
+ w2 = S2.prev;
1303
+ var M2 = x2[0], q2 = x2[x2.length - 1];
1304
+ for (C2 = 0; C2 < x2.length; C2 += 1) move(x2[C2], S2, n3);
1301
1305
  for (C2 = 0; C2 < k2.length; C2 += 1) c3.delete(k2[C2]);
1302
- link(t3, q2.prev, I2.next), link(t3, w2, q2), link(t3, I2, M2), $2 = M2, w2 = I2, _2 -= 1, x2 = [], k2 = [];
1306
+ link(t3, M2.prev, q2.next), link(t3, w2, M2), link(t3, q2, S2), $2 = S2, w2 = q2, _2 -= 1, x2 = [], k2 = [];
1303
1307
  } else
1304
1308
  c3.delete(p3), move(p3, $2, n3), link(t3, p3.prev, p3.next), link(t3, p3, null === w2 ? t3.first : w2.next), link(t3, w2, p3), w2 = p3;
1305
1309
  continue;
1306
1310
  }
1307
- for (x2 = [], k2 = []; null !== $2 && $2.k !== f3; )
1308
- $2.e.f & m || (c3 ?? (c3 = /* @__PURE__ */ new Set())).add($2), k2.push($2), $2 = $2.next;
1311
+ for (x2 = [], k2 = []; null !== $2 && $2.k !== d3; )
1312
+ $2.e.f & b || (c3 ?? (c3 = /* @__PURE__ */ new Set())).add($2), k2.push($2), $2 = $2.next;
1309
1313
  if (null === $2) continue;
1310
1314
  p3 = $2;
1311
1315
  }
@@ -1314,21 +1318,21 @@ function each(e2, n2, o2, s2, a2, l2 = null) {
1314
1318
  w2 = create_item($2 ? (
1315
1319
  /** @type {TemplateNode} */
1316
1320
  $2.e.nodes_start
1317
- ) : n3, t3, w2, null === w2 ? t3.first : w2.next, d3, f3, _2, o3, s3, l3), b2.set(f3, w2), x2 = [], k2 = [], $2 = w2.next;
1321
+ ) : n3, t3, w2, null === w2 ? t3.first : w2.next, f3, d3, _2, i3, s3, l3), m2.set(d3, w2), x2 = [], k2 = [], $2 = w2.next;
1318
1322
  }
1319
1323
  if (null !== $2 || void 0 !== c3) {
1320
- for (var S2 = void 0 === c3 ? [] : i(c3); null !== $2; )
1321
- $2.e.f & m || S2.push($2), $2 = $2.next;
1322
- var T2 = S2.length;
1323
- if (T2 > 0) {
1324
- var P2 = 4 & s3 && 0 === h2 ? n3 : null;
1324
+ for (var I2 = void 0 === c3 ? [] : o(c3); null !== $2; )
1325
+ $2.e.f & b || I2.push($2), $2 = $2.next;
1326
+ var P2 = I2.length;
1327
+ if (P2 > 0) {
1328
+ var T2 = 4 & s3 && 0 === h2 ? n3 : null;
1325
1329
  if (v2) {
1326
- for (_2 = 0; _2 < T2; _2 += 1) (_c = S2[_2].a) == null ? void 0 : _c.measure();
1327
- for (_2 = 0; _2 < T2; _2 += 1) (_d = S2[_2].a) == null ? void 0 : _d.fix();
1330
+ for (_2 = 0; _2 < P2; _2 += 1) (_c2 = I2[_2].a) == null ? void 0 : _c2.measure();
1331
+ for (_2 = 0; _2 < P2; _2 += 1) (_d = I2[_2].a) == null ? void 0 : _d.fix();
1328
1332
  }
1329
- !function pause_effects(e5, t4, n4, i2) {
1330
- for (var o4 = [], s4 = t4.length, a4 = 0; a4 < s4; a4++) pause_children(t4[a4].e, o4, true);
1331
- var l4 = s4 > 0 && 0 === o4.length && null !== n4;
1333
+ !function pause_effects(e5, t4, n4, o2) {
1334
+ for (var i4 = [], s4 = t4.length, a4 = 0; a4 < s4; a4++) pause_children(t4[a4].e, i4, true);
1335
+ var l4 = s4 > 0 && 0 === i4.length && null !== n4;
1332
1336
  if (l4) {
1333
1337
  var c4 = (
1334
1338
  /** @type {Element} */
@@ -1340,15 +1344,15 @@ function each(e2, n2, o2, s2, a2, l2 = null) {
1340
1344
  }(c4), c4.append(
1341
1345
  /** @type {Element} */
1342
1346
  n4
1343
- ), i2.clear(), link(e5, t4[0].prev, t4[s4 - 1].next);
1347
+ ), o2.clear(), link(e5, t4[0].prev, t4[s4 - 1].next);
1344
1348
  }
1345
- run_out_transitions(o4, () => {
1349
+ run_out_transitions(i4, () => {
1346
1350
  for (var n5 = 0; n5 < s4; n5++) {
1347
- var o5 = t4[n5];
1348
- l4 || (i2.delete(o5.k), link(e5, o5.prev, o5.next)), destroy_effect(o5.e, !l4);
1351
+ var i5 = t4[n5];
1352
+ l4 || (o2.delete(i5.k), link(e5, i5.prev, i5.next)), destroy_effect(i5.e, !l4);
1349
1353
  }
1350
1354
  });
1351
- }(t3, S2, P2, b2);
1355
+ }(t3, I2, T2, m2);
1352
1356
  }
1353
1357
  }
1354
1358
  v2 && queue_micro_task(() => {
@@ -1357,8 +1361,8 @@ function each(e2, n2, o2, s2, a2, l2 = null) {
1357
1361
  });
1358
1362
  H.first = t3.first && t3.first.e, /** @type {Effect} */
1359
1363
  H.last = w2 && w2.e;
1360
- }(e3, u2, c2, a2, n2, s2, o2), null !== l2 && (0 === t2 ? d2 ? resume_effect(d2) : d2 = branch(() => l2(c2)) : null !== d2 && pause_effect(d2, () => {
1361
- d2 = null;
1364
+ }(e3, u2, c2, a2, n2, s2, i2), null !== l2 && (0 === t2 ? f2 ? resume_effect(f2) : f2 = branch(() => l2(c2)) : null !== f2 && pause_effect(f2, () => {
1365
+ f2 = null;
1362
1366
  })), // When we mount the each block for the first time, the collection won't be
1363
1367
  // connected to this effect as the effect hasn't finished running yet and its deps
1364
1368
  // won't be assigned. However, it's possible that when reconciling the each block
@@ -1368,101 +1372,152 @@ function each(e2, n2, o2, s2, a2, l2 = null) {
1368
1372
  get$1(p2));
1369
1373
  });
1370
1374
  }
1371
- function update_item(e2, t2, n2, i2) {
1372
- 1 & i2 && internal_set(e2.v, t2), 2 & i2 ? internal_set(
1375
+ function update_item(e2, t2, n2, o2) {
1376
+ 1 & o2 && internal_set(e2.v, t2), 2 & o2 ? internal_set(
1373
1377
  /** @type {Value<number>} */
1374
1378
  e2.i,
1375
1379
  n2
1376
1380
  ) : e2.i = n2;
1377
1381
  }
1378
- function create_item(e2, t2, n2, i2, o2, s2, a2, l2, c2, u2) {
1379
- var d2 = ce, f2 = !!(1 & c2) ? !(16 & c2) ? /* @__PURE__ */ mutable_source(o2) : source(o2) : o2, p2 = 2 & c2 ? source(a2) : a2, _2 = {
1382
+ function create_item(e2, t2, n2, o2, i2, s2, a2, l2, c2, u2) {
1383
+ var f2 = ce, d2 = !!(1 & c2) ? !(16 & c2) ? /* @__PURE__ */ mutable_source(i2) : source(i2) : i2, p2 = 2 & c2 ? source(a2) : a2, _2 = {
1380
1384
  i: p2,
1381
- v: f2,
1385
+ v: d2,
1382
1386
  k: s2,
1383
1387
  a: null,
1384
1388
  // @ts-expect-error
1385
1389
  e: null,
1386
1390
  prev: n2,
1387
- next: i2
1391
+ next: o2
1388
1392
  };
1389
1393
  ce = _2;
1390
1394
  try {
1391
- return _2.e = branch(() => l2(e2, f2, p2, u2), false), _2.e.prev = n2 && n2.e, _2.e.next = i2 && i2.e, null === n2 ? t2.first = _2 : (n2.next = _2, n2.e.next = _2.e), null !== i2 && (i2.prev = _2, i2.e.prev = _2.e), _2;
1395
+ return _2.e = branch(() => l2(e2, d2, p2, u2), false), _2.e.prev = n2 && n2.e, _2.e.next = o2 && o2.e, null === n2 ? t2.first = _2 : (n2.next = _2, n2.e.next = _2.e), null !== o2 && (o2.prev = _2, o2.e.prev = _2.e), _2;
1392
1396
  } finally {
1393
- ce = d2;
1397
+ ce = f2;
1394
1398
  }
1395
1399
  }
1396
1400
  function move(e2, t2, n2) {
1397
- for (var i2 = e2.next ? (
1401
+ for (var o2 = e2.next ? (
1398
1402
  /** @type {TemplateNode} */
1399
1403
  e2.next.e.nodes_start
1400
- ) : n2, o2 = t2 ? (
1404
+ ) : n2, i2 = t2 ? (
1401
1405
  /** @type {TemplateNode} */
1402
1406
  t2.e.nodes_start
1403
1407
  ) : n2, s2 = (
1404
1408
  /** @type {TemplateNode} */
1405
1409
  e2.e.nodes_start
1406
- ); s2 !== i2; ) {
1410
+ ); s2 !== o2; ) {
1407
1411
  var a2 = (
1408
1412
  /** @type {TemplateNode} */
1409
1413
  /* @__PURE__ */ get_next_sibling(s2)
1410
1414
  );
1411
- o2.before(s2), s2 = a2;
1415
+ i2.before(s2), s2 = a2;
1412
1416
  }
1413
1417
  }
1414
1418
  function link(e2, t2, n2) {
1415
1419
  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);
1416
1420
  }
1417
- function slot(e2, t2, n2, i2, o2) {
1421
+ function slot(e2, t2, n2, o2, i2) {
1418
1422
  var _a2;
1419
1423
  var s2 = (_a2 = t2.$$slots) == null ? void 0 : _a2[n2], a2 = false;
1420
- true === s2 && (s2 = t2["default" === n2 ? "children" : n2], a2 = true), void 0 === s2 ? null !== o2 && o2(e2) : s2(e2, a2 ? () => i2 : i2);
1424
+ true === s2 && (s2 = t2["default" === n2 ? "children" : n2], a2 = true), void 0 === s2 ? null !== i2 && i2(e2) : s2(e2, a2 ? () => o2 : o2);
1421
1425
  }
1422
1426
  function component(e2, t2, n2) {
1423
- var i2, o2, s2 = e2;
1427
+ var o2, i2, s2 = e2;
1424
1428
  block(() => {
1425
- i2 !== (i2 = t2()) && (o2 && (pause_effect(o2), o2 = null), i2 && (o2 = branch(() => n2(s2, i2))));
1426
- }, y);
1429
+ o2 !== (o2 = t2()) && (i2 && (pause_effect(i2), i2 = null), o2 && (i2 = branch(() => n2(s2, o2))));
1430
+ }, $);
1427
1431
  }
1428
1432
  function r(e2) {
1429
- var t2, n2, i2 = "";
1430
- if ("string" == typeof e2 || "number" == typeof e2) i2 += e2;
1433
+ var t2, n2, o2 = "";
1434
+ if ("string" == typeof e2 || "number" == typeof e2) o2 += e2;
1431
1435
  else if ("object" == typeof e2) if (Array.isArray(e2)) {
1432
- var o2 = e2.length;
1433
- for (t2 = 0; t2 < o2; t2++) e2[t2] && (n2 = r(e2[t2])) && (i2 && (i2 += " "), i2 += n2);
1434
- } else for (n2 in e2) e2[n2] && (i2 && (i2 += " "), i2 += n2);
1435
- return i2;
1436
+ var i2 = e2.length;
1437
+ for (t2 = 0; t2 < i2; t2++) e2[t2] && (n2 = r(e2[t2])) && (o2 && (o2 += " "), o2 += n2);
1438
+ } else for (n2 in e2) e2[n2] && (o2 && (o2 += " "), o2 += n2);
1439
+ return o2;
1436
1440
  }
1437
1441
  function clsx(e2) {
1438
1442
  return "object" == typeof e2 ? function clsx$1() {
1439
- for (var e3, t2, n2 = 0, i2 = "", o2 = arguments.length; n2 < o2; n2++) (e3 = arguments[n2]) && (t2 = r(e3)) && (i2 && (i2 += " "), i2 += t2);
1440
- return i2;
1443
+ for (var e3, t2, n2 = 0, o2 = "", i2 = arguments.length; n2 < i2; n2++) (e3 = arguments[n2]) && (t2 = r(e3)) && (o2 && (o2 += " "), o2 += t2);
1444
+ return o2;
1441
1445
  }(e2) : e2 ?? "";
1442
1446
  }
1443
1447
  const ue = [..." \n\r\f \v\uFEFF"];
1444
- function set_class(e2, t2, n2, i2, o2, s2) {
1448
+ function append_styles(e2, t2 = false) {
1449
+ var n2 = t2 ? " !important;" : ";", o2 = "";
1450
+ for (var i2 in e2) {
1451
+ var s2 = e2[i2];
1452
+ null != s2 && "" !== s2 && (o2 += " " + i2 + ": " + s2 + n2);
1453
+ }
1454
+ return o2;
1455
+ }
1456
+ function to_css_name(e2) {
1457
+ return "-" !== e2[0] || "-" !== e2[1] ? e2.toLowerCase() : e2;
1458
+ }
1459
+ function set_class(e2, t2, n2, o2, i2, s2) {
1445
1460
  if (e2.__className !== n2) {
1446
1461
  var a2 = function to_class(e3, t3, n3) {
1447
- var i3 = null == e3 ? "" : "" + e3;
1448
- if (t3 && (i3 = i3 ? i3 + " " + t3 : t3), n3) {
1449
- for (var o3 in n3) if (n3[o3]) i3 = i3 ? i3 + " " + o3 : o3;
1450
- else if (i3.length) for (var s3 = o3.length, a3 = 0; (a3 = i3.indexOf(o3, a3)) >= 0; ) {
1462
+ var o3 = null == e3 ? "" : "" + e3;
1463
+ if (t3 && (o3 = o3 ? o3 + " " + t3 : t3), n3) {
1464
+ for (var i3 in n3) if (n3[i3]) o3 = o3 ? o3 + " " + i3 : i3;
1465
+ else if (o3.length) for (var s3 = i3.length, a3 = 0; (a3 = o3.indexOf(i3, a3)) >= 0; ) {
1451
1466
  var l3 = a3 + s3;
1452
- 0 !== a3 && !ue.includes(i3[a3 - 1]) || l3 !== i3.length && !ue.includes(i3[l3]) ? a3 = l3 : i3 = (0 === a3 ? "" : i3.substring(0, a3)) + i3.substring(l3 + 1);
1467
+ 0 !== a3 && !ue.includes(o3[a3 - 1]) || l3 !== o3.length && !ue.includes(o3[l3]) ? a3 = l3 : o3 = (0 === a3 ? "" : o3.substring(0, a3)) + o3.substring(l3 + 1);
1453
1468
  }
1454
1469
  }
1455
- return "" === i3 ? null : i3;
1456
- }(n2, i2, s2);
1470
+ return "" === o3 ? null : o3;
1471
+ }(n2, o2, s2);
1457
1472
  null == a2 ? e2.removeAttribute("class") : t2 ? e2.className = a2 : e2.setAttribute("class", a2), // @ts-expect-error need to add __className to patched prototype
1458
1473
  e2.__className = n2;
1459
- } else if (s2) for (var l2 in s2) {
1474
+ } else if (s2 && i2 !== s2) for (var l2 in s2) {
1460
1475
  var c2 = !!s2[l2];
1461
- null != o2 && c2 === !!o2[l2] || e2.classList.toggle(l2, c2);
1476
+ null != i2 && c2 === !!i2[l2] || e2.classList.toggle(l2, c2);
1462
1477
  }
1463
1478
  return s2;
1464
1479
  }
1465
- const de = Symbol("class");
1480
+ function update_styles(e2, t2 = {}, n2, o2) {
1481
+ for (var i2 in n2) {
1482
+ var s2 = n2[i2];
1483
+ t2[i2] !== s2 && (null == n2[i2] ? e2.style.removeProperty(i2) : e2.style.setProperty(i2, s2, o2));
1484
+ }
1485
+ }
1486
+ function set_style(e2, t2, n2, o2) {
1487
+ if (e2.__style !== t2) {
1488
+ var i2 = function to_style(e3, t3) {
1489
+ if (t3) {
1490
+ var n3, o3, i3 = "";
1491
+ if (Array.isArray(t3) ? (n3 = t3[0], o3 = t3[1]) : n3 = t3, e3) {
1492
+ e3 = String(e3).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
1493
+ var s2 = false, a2 = 0, l2 = false, c2 = [];
1494
+ n3 && c2.push(...Object.keys(n3).map(to_css_name)), o3 && c2.push(...Object.keys(o3).map(to_css_name));
1495
+ var u2 = 0, f2 = -1;
1496
+ const t4 = e3.length;
1497
+ for (var d2 = 0; d2 < t4; d2++) {
1498
+ var p2 = e3[d2];
1499
+ if (l2 ? "/" === p2 && "*" === e3[d2 - 1] && (l2 = false) : s2 ? s2 === p2 && (s2 = false) : "/" === p2 && "*" === e3[d2 + 1] ? l2 = true : '"' === p2 || "'" === p2 ? s2 = p2 : "(" === p2 ? a2++ : ")" === p2 && a2--, !l2 && false === s2 && 0 === a2) {
1500
+ if (":" === p2 && -1 === f2) f2 = d2;
1501
+ else if (";" === p2 || d2 === t4 - 1) {
1502
+ if (-1 !== f2) {
1503
+ var _2 = to_css_name(e3.substring(u2, f2).trim());
1504
+ c2.includes(_2) || (";" !== p2 && d2++, i3 += " " + e3.substring(u2, d2).trim() + ";");
1505
+ }
1506
+ u2 = d2 + 1, f2 = -1;
1507
+ }
1508
+ }
1509
+ }
1510
+ }
1511
+ return n3 && (i3 += append_styles(n3)), o3 && (i3 += append_styles(o3, true)), "" === (i3 = i3.trim()) ? null : i3;
1512
+ }
1513
+ return null == e3 ? null : String(e3);
1514
+ }(t2, o2);
1515
+ null == i2 ? e2.removeAttribute("style") : e2.style.cssText = i2, // @ts-expect-error
1516
+ e2.__style = t2;
1517
+ } else o2 && (Array.isArray(o2) ? (update_styles(e2, n2 == null ? void 0 : n2[0], o2[0]), update_styles(e2, n2 == null ? void 0 : n2[1], o2[1], "important")) : update_styles(e2, n2, o2));
1518
+ return o2;
1519
+ }
1520
+ const fe = Symbol("class"), de = Symbol("style"), pe = Symbol("is custom element"), _e = Symbol("is html");
1466
1521
  function set_selected(e2, t2) {
1467
1522
  t2 ? (
1468
1523
  // The selected option could've changed via user selection, and
@@ -1470,114 +1525,108 @@ function set_selected(e2, t2) {
1470
1525
  e2.hasAttribute("selected") || e2.setAttribute("selected", "")
1471
1526
  ) : e2.removeAttribute("selected");
1472
1527
  }
1473
- function set_attribute(e2, t2, n2, i2) {
1474
- var o2 = e2.__attributes ?? (e2.__attributes = {});
1475
- o2[t2] !== (o2[t2] = n2) && ("style" === t2 && "__styles" in e2 && // reset styles to force style: directive to update
1476
- (e2.__styles = {}), "loading" === t2 && // @ts-expect-error
1477
- (e2[k] = n2), null == n2 ? e2.removeAttribute(t2) : "string" != typeof n2 && get_setters(e2).includes(t2) ? (
1528
+ function set_attribute(e2, t2, n2, o2) {
1529
+ var i2 = get_attributes(e2);
1530
+ i2[t2] !== (i2[t2] = n2) && ("loading" === t2 && // @ts-expect-error
1531
+ (e2[C] = n2), null == n2 ? e2.removeAttribute(t2) : "string" != typeof n2 && get_setters(e2).includes(t2) ? (
1478
1532
  // @ts-ignore
1479
1533
  e2[t2] = n2
1480
1534
  ) : e2.setAttribute(t2, n2));
1481
1535
  }
1482
- function set_attributes(e2, t2, n2, i2, o2 = false, s2 = false, a2 = false) {
1483
- var l2 = t2 || {}, c2 = "OPTION" === e2.tagName;
1484
- for (var u2 in t2) u2 in n2 || (n2[u2] = null);
1485
- n2.class ? n2.class = clsx(n2.class) : (i2 || n2[de]) && (n2.class = null);
1486
- var d2 = get_setters(e2), f2 = (
1487
- /** @type {Record<string, unknown>} **/
1488
- e2.__attributes ?? (e2.__attributes = {})
1489
- );
1536
+ function set_attributes(e2, t2, n2, o2, i2 = false) {
1537
+ var s2 = get_attributes(e2), a2 = s2[pe], l2 = !s2[_e], c2 = t2 || {}, u2 = "OPTION" === e2.tagName;
1538
+ for (var f2 in t2) f2 in n2 || (n2[f2] = null);
1539
+ n2.class ? n2.class = clsx(n2.class) : (o2 || n2[fe]) && (n2.class = null), n2[de] && (n2.style ?? (n2.style = null));
1540
+ var d2 = get_setters(e2);
1490
1541
  for (const m2 in n2) {
1491
1542
  let b2 = n2[m2];
1492
- if (c2 && "value" === m2 && null == b2)
1493
- e2.value = e2.__value = "", l2[m2] = b2;
1494
- else if ("class" !== m2) {
1495
- var p2 = l2[m2];
1543
+ if (u2 && "value" === m2 && null == b2)
1544
+ e2.value = e2.__value = "", c2[m2] = b2;
1545
+ else if ("class" !== m2) if ("style" !== m2) {
1546
+ var p2 = c2[m2];
1496
1547
  if (b2 !== p2) {
1497
- l2[m2] = b2;
1548
+ c2[m2] = b2;
1498
1549
  var _2 = m2[0] + m2[1];
1499
- if ("$$" !== _2) {
1500
- if ("on" === _2) {
1501
- const y2 = {}, $2 = "$$" + m2;
1502
- let w2 = m2.slice(2);
1503
- var v2 = is_delegated(w2);
1504
- if (is_capture_event(w2) && (w2 = w2.slice(0, -7), y2.capture = true), !v2 && p2) {
1505
- if (null != b2) continue;
1506
- e2.removeEventListener(w2, l2[$2], y2), l2[$2] = null;
1507
- }
1508
- if (null != b2) if (v2)
1509
- e2[`__${w2}`] = b2, delegate([w2]);
1510
- else {
1511
- let handle = function(e3) {
1512
- l2[m2].call(this, e3);
1513
- };
1514
- l2[$2] = create_event(w2, e2, handle, y2);
1515
- }
1516
- else v2 && // @ts-ignore
1517
- (e2[`__${w2}`] = void 0);
1518
- } else if ("style" === m2 && null != b2) e2.style.cssText = b2 + "";
1519
- else if ("autofocus" === m2) autofocus(
1520
- /** @type {HTMLElement} */
1521
- e2,
1522
- Boolean(b2)
1523
- );
1524
- else if (s2 || "__value" !== m2 && ("value" !== m2 || null == b2)) if ("selected" === m2 && c2) set_selected(
1525
- /** @type {HTMLOptionElement} */
1526
- e2,
1527
- b2
1528
- );
1550
+ if ("$$" !== _2) if ("on" === _2) {
1551
+ const y2 = {}, $2 = "$$" + m2;
1552
+ let w2 = m2.slice(2);
1553
+ var v2 = is_delegated(w2);
1554
+ if (is_capture_event(w2) && (w2 = w2.slice(0, -7), y2.capture = true), !v2 && p2) {
1555
+ if (null != b2) continue;
1556
+ e2.removeEventListener(w2, c2[$2], y2), c2[$2] = null;
1557
+ }
1558
+ if (null != b2) if (v2)
1559
+ e2[`__${w2}`] = b2, delegate([w2]);
1529
1560
  else {
1530
- var g2 = m2;
1531
- o2 || (g2 = normalize_attribute(g2));
1532
- var h2 = "defaultValue" === g2 || "defaultChecked" === g2;
1533
- if (null != b2 || s2 || h2) h2 || d2.includes(g2) && (s2 || "string" != typeof b2) ? (
1534
- // @ts-ignore
1535
- e2[g2] = b2
1536
- ) : "function" != typeof b2 && set_attribute(e2, g2, b2);
1537
- else if (f2[m2] = null, "value" === g2 || "checked" === g2) {
1538
- let x2 = (
1539
- /** @type {HTMLInputElement} */
1540
- e2
1541
- );
1542
- const k2 = void 0 === t2;
1543
- if ("value" === g2) {
1544
- let C2 = x2.defaultValue;
1545
- x2.removeAttribute(g2), x2.defaultValue = C2, // @ts-ignore
1546
- x2.value = x2.__value = k2 ? C2 : null;
1547
- } else {
1548
- let M2 = x2.defaultChecked;
1549
- x2.removeAttribute(g2), x2.defaultChecked = M2, x2.checked = !!k2 && M2;
1550
- }
1551
- } else e2.removeAttribute(m2);
1561
+ let handle = function(e3) {
1562
+ c2[m2].call(this, e3);
1563
+ };
1564
+ c2[$2] = create_event(w2, e2, handle, y2);
1552
1565
  }
1553
- else
1554
- e2.value = e2.__value = b2;
1555
- "style" === m2 && "__styles" in e2 && // reset styles to force style: directive to update
1556
- (e2.__styles = {});
1566
+ else v2 && // @ts-ignore
1567
+ (e2[`__${w2}`] = void 0);
1568
+ } else if ("style" === m2)
1569
+ set_attribute(e2, m2, b2);
1570
+ else if ("autofocus" === m2) autofocus(
1571
+ /** @type {HTMLElement} */
1572
+ e2,
1573
+ Boolean(b2)
1574
+ );
1575
+ else if (a2 || "__value" !== m2 && ("value" !== m2 || null == b2)) if ("selected" === m2 && u2) set_selected(
1576
+ /** @type {HTMLOptionElement} */
1577
+ e2,
1578
+ b2
1579
+ );
1580
+ else {
1581
+ var g2 = m2;
1582
+ l2 || (g2 = normalize_attribute(g2));
1583
+ var h2 = "defaultValue" === g2 || "defaultChecked" === g2;
1584
+ if (null != b2 || a2 || h2) h2 || d2.includes(g2) && (a2 || "string" != typeof b2) ? (
1585
+ // @ts-ignore
1586
+ e2[g2] = b2
1587
+ ) : "function" != typeof b2 && set_attribute(e2, g2, b2);
1588
+ else if (s2[m2] = null, "value" === g2 || "checked" === g2) {
1589
+ let x2 = (
1590
+ /** @type {HTMLInputElement} */
1591
+ e2
1592
+ );
1593
+ const k2 = void 0 === t2;
1594
+ if ("value" === g2) {
1595
+ let C2 = x2.defaultValue;
1596
+ x2.removeAttribute(g2), x2.defaultValue = C2, // @ts-ignore
1597
+ x2.value = x2.__value = k2 ? C2 : null;
1598
+ } else {
1599
+ let S2 = x2.defaultChecked;
1600
+ x2.removeAttribute(g2), x2.defaultChecked = S2, x2.checked = !!k2 && S2;
1601
+ }
1602
+ } else e2.removeAttribute(m2);
1557
1603
  }
1604
+ else
1605
+ e2.value = e2.__value = b2;
1558
1606
  }
1559
- } else {
1560
- set_class(e2, "http://www.w3.org/1999/xhtml" === e2.namespaceURI, b2, i2, t2 == null ? void 0 : t2[de], n2[de]), l2[m2] = b2, l2[de] = n2[de];
1561
- }
1607
+ } else set_style(e2, b2, t2 == null ? void 0 : t2[de], n2[de]), c2[m2] = b2, c2[de] = n2[de];
1608
+ else set_class(e2, "http://www.w3.org/1999/xhtml" === e2.namespaceURI, b2, o2, t2 == null ? void 0 : t2[fe], n2[fe]), c2[m2] = b2, c2[fe] = n2[fe];
1562
1609
  }
1563
- return l2;
1610
+ return c2;
1564
1611
  }
1565
- var fe = /* @__PURE__ */ new Map();
1612
+ function get_attributes(e2) {
1613
+ return e2.__attributes ?? (e2.__attributes = {
1614
+ [pe]: e2.nodeName.includes("-"),
1615
+ [_e]: "http://www.w3.org/1999/xhtml" === e2.namespaceURI
1616
+ });
1617
+ }
1618
+ var ve = /* @__PURE__ */ new Map();
1566
1619
  function get_setters(e2) {
1567
- var t2, n2 = fe.get(e2.nodeName);
1620
+ var t2, n2 = ve.get(e2.nodeName);
1568
1621
  if (n2) return n2;
1569
- fe.set(e2.nodeName, n2 = []);
1570
- for (var i2 = e2, o2 = Element.prototype; o2 !== i2; ) {
1571
- for (var s2 in t2 = a(i2)) t2[s2].set && n2.push(s2);
1572
- i2 = u(i2);
1622
+ ve.set(e2.nodeName, n2 = []);
1623
+ for (var o2 = e2, i2 = Element.prototype; i2 !== o2; ) {
1624
+ for (var s2 in t2 = a(o2)) t2[s2].set && n2.push(s2);
1625
+ o2 = u(o2);
1573
1626
  }
1574
1627
  return n2;
1575
1628
  }
1576
- function set_style(e2, t2, n2, i2) {
1577
- var o2 = e2.__styles ?? (e2.__styles = {});
1578
- o2[t2] !== n2 && (o2[t2] = n2, null == n2 ? e2.style.removeProperty(t2) : e2.style.setProperty(t2, n2, ""));
1579
- }
1580
- const pe = {
1629
+ const ge = {
1581
1630
  // don't access requestAnimationFrame eagerly outside method
1582
1631
  // this allows basic testing of user code without JSDOM
1583
1632
  // bunder will eval and remove ternary when the user's app is built
@@ -1589,10 +1638,10 @@ const pe = {
1589
1638
  tasks: /* @__PURE__ */ new Set()
1590
1639
  };
1591
1640
  function run_tasks() {
1592
- const e2 = pe.now();
1593
- pe.tasks.forEach((t2) => {
1594
- t2.c(e2) || (pe.tasks.delete(t2), t2.f());
1595
- }), 0 !== pe.tasks.size && pe.tick(run_tasks);
1641
+ const e2 = ge.now();
1642
+ ge.tasks.forEach((t2) => {
1643
+ t2.c(e2) || (ge.tasks.delete(t2), t2.f());
1644
+ }), 0 !== ge.tasks.size && ge.tick(run_tasks);
1596
1645
  }
1597
1646
  function dispatch_event(e2, t2) {
1598
1647
  without_reactive_context(() => {
@@ -1612,20 +1661,20 @@ function css_property_to_camelcase(e2) {
1612
1661
  function css_to_keyframe(e2) {
1613
1662
  const t2 = {}, n2 = e2.split(";");
1614
1663
  for (const e3 of n2) {
1615
- const [n3, i2] = e3.split(":");
1616
- if (!n3 || void 0 === i2) break;
1617
- t2[css_property_to_camelcase(n3.trim())] = i2.trim();
1664
+ const [n3, o2] = e3.split(":");
1665
+ if (!n3 || void 0 === o2) break;
1666
+ t2[css_property_to_camelcase(n3.trim())] = o2.trim();
1618
1667
  }
1619
1668
  return t2;
1620
1669
  }
1621
1670
  const linear = (e2) => e2;
1622
- function transition(e2, t2, n2, i2) {
1623
- var o2, s2, a2, l2 = !!(4 & e2), c2 = t2.inert, u2 = t2.style.overflow;
1671
+ function transition(e2, t2, n2, o2) {
1672
+ var i2, s2, a2, l2 = !!(4 & e2), c2 = t2.inert, u2 = t2.style.overflow;
1624
1673
  function get_options() {
1625
1674
  var e3 = F, s3 = H;
1626
1675
  set_active_reaction(null), set_active_effect(null);
1627
1676
  try {
1628
- return o2 ?? (o2 = n2()(t2, (i2 == null ? void 0 : i2()) ?? /** @type {P} */
1677
+ return i2 ?? (i2 = n2()(t2, (o2 == null ? void 0 : o2()) ?? /** @type {P} */
1629
1678
  {}, {
1630
1679
  direction: "both"
1631
1680
  }));
@@ -1633,12 +1682,12 @@ function transition(e2, t2, n2, i2) {
1633
1682
  set_active_reaction(e3), set_active_effect(s3);
1634
1683
  }
1635
1684
  }
1636
- var d2 = {
1685
+ var f2 = {
1637
1686
  is_global: l2,
1638
1687
  in() {
1639
1688
  t2.inert = c2, dispatch_event(t2, "introstart"), s2 = animate(t2, get_options(), a2, 1, () => {
1640
1689
  dispatch_event(t2, "introend"), // Ensure we cancel the animation to prevent leaking
1641
- s2 == null ? void 0 : s2.abort(), s2 = o2 = void 0, t2.style.overflow = u2;
1690
+ s2 == null ? void 0 : s2.abort(), s2 = i2 = void 0, t2.style.overflow = u2;
1642
1691
  });
1643
1692
  },
1644
1693
  out(e3) {
@@ -1649,26 +1698,26 @@ function transition(e2, t2, n2, i2) {
1649
1698
  stop: () => {
1650
1699
  s2 == null ? void 0 : s2.abort(), a2 == null ? void 0 : a2.abort();
1651
1700
  }
1652
- }, f2 = (
1701
+ }, d2 = (
1653
1702
  /** @type {Effect} */
1654
1703
  H
1655
1704
  );
1656
- if ((f2.transitions ?? (f2.transitions = [])).push(d2), se) {
1705
+ if ((d2.transitions ?? (d2.transitions = [])).push(f2), se) {
1657
1706
  var p2 = l2;
1658
1707
  if (!p2) {
1659
1708
  for (var _2 = (
1660
1709
  /** @type {Effect | null} */
1661
- f2.parent
1662
- ); _2 && _2.f & y; ) for (; (_2 = _2.parent) && !(16 & _2.f); ) ;
1710
+ d2.parent
1711
+ ); _2 && _2.f & $; ) for (; (_2 = _2.parent) && !(16 & _2.f); ) ;
1663
1712
  p2 = !_2 || !!(32768 & _2.f);
1664
1713
  }
1665
1714
  p2 && effect(() => {
1666
- untrack(() => d2.in());
1715
+ untrack(() => f2.in());
1667
1716
  });
1668
1717
  }
1669
1718
  }
1670
- function animate(e2, t2, n2, i2, o2) {
1671
- var s2 = 1 === i2;
1719
+ function animate(e2, t2, n2, o2, i2) {
1720
+ var s2 = 1 === o2;
1672
1721
  if (is_function(t2)) {
1673
1722
  var a2, l2 = false;
1674
1723
  return queue_micro_task(() => {
@@ -1676,7 +1725,7 @@ function animate(e2, t2, n2, i2, o2) {
1676
1725
  var c3 = t2({
1677
1726
  direction: s2 ? "in" : "out"
1678
1727
  });
1679
- a2 = animate(e2, c3, n2, i2, o2);
1728
+ a2 = animate(e2, c3, n2, o2, i2);
1680
1729
  }
1681
1730
  }), {
1682
1731
  abort: () => {
@@ -1687,25 +1736,25 @@ function animate(e2, t2, n2, i2, o2) {
1687
1736
  t: () => a2.t()
1688
1737
  };
1689
1738
  }
1690
- if (n2 == null ? void 0 : n2.deactivate(), !(t2 == null ? void 0 : t2.duration)) return o2(), {
1739
+ if (n2 == null ? void 0 : n2.deactivate(), !(t2 == null ? void 0 : t2.duration)) return i2(), {
1691
1740
  abort: noop,
1692
1741
  deactivate: noop,
1693
1742
  reset: noop,
1694
- t: () => i2
1743
+ t: () => o2
1695
1744
  };
1696
- const { delay: c2 = 0, css: u2, tick: d2, easing: f2 = linear } = t2;
1745
+ const { delay: c2 = 0, css: u2, tick: f2, easing: d2 = linear } = t2;
1697
1746
  var p2 = [];
1698
- if (s2 && void 0 === n2 && (d2 && d2(0, 1), u2)) {
1747
+ if (s2 && void 0 === n2 && (f2 && f2(0, 1), u2)) {
1699
1748
  var _2 = css_to_keyframe(u2(0, 1));
1700
1749
  p2.push(_2, _2);
1701
1750
  }
1702
- var get_t = () => 1 - i2, v2 = e2.animate(p2, {
1751
+ var get_t = () => 1 - o2, v2 = e2.animate(p2, {
1703
1752
  duration: c2
1704
1753
  });
1705
1754
  return v2.onfinish = () => {
1706
- var s3 = (n2 == null ? void 0 : n2.t()) ?? 1 - i2;
1755
+ var s3 = (n2 == null ? void 0 : n2.t()) ?? 1 - o2;
1707
1756
  n2 == null ? void 0 : n2.abort();
1708
- var a3 = i2 - s3, l3 = (
1757
+ var a3 = o2 - s3, l3 = (
1709
1758
  /** @type {number} */
1710
1759
  t2.duration * Math.abs(a3)
1711
1760
  ), c3 = [];
@@ -1713,7 +1762,7 @@ function animate(e2, t2, n2, i2, o2) {
1713
1762
  var p3 = false;
1714
1763
  if (u2)
1715
1764
  for (var _3 = Math.ceil(l3 / (1e3 / 60)), g2 = 0; g2 <= _3; g2 += 1) {
1716
- var h2 = s3 + a3 * f2(g2 / _3), m2 = css_to_keyframe(u2(h2, 1 - h2));
1765
+ var h2 = s3 + a3 * d2(g2 / _3), m2 = css_to_keyframe(u2(h2, 1 - h2));
1717
1766
  c3.push(m2), p3 || (p3 = "hidden" === m2.overflow);
1718
1767
  }
1719
1768
  p3 && /** @type {HTMLElement} */
@@ -1723,31 +1772,31 @@ function animate(e2, t2, n2, i2, o2) {
1723
1772
  /** @type {globalThis.Animation} */
1724
1773
  v2.currentTime
1725
1774
  );
1726
- return s3 + a3 * f2(e3 / l3);
1727
- }, d2 && function loop(e3) {
1775
+ return s3 + a3 * d2(e3 / l3);
1776
+ }, f2 && function loop(e3) {
1728
1777
  let t3;
1729
- return 0 === pe.tasks.size && pe.tick(run_tasks), {
1778
+ return 0 === ge.tasks.size && ge.tick(run_tasks), {
1730
1779
  promise: new Promise((n3) => {
1731
- pe.tasks.add(t3 = {
1780
+ ge.tasks.add(t3 = {
1732
1781
  c: e3,
1733
1782
  f: n3
1734
1783
  });
1735
1784
  }),
1736
1785
  abort() {
1737
- pe.tasks.delete(t3);
1786
+ ge.tasks.delete(t3);
1738
1787
  }
1739
1788
  };
1740
1789
  }(() => {
1741
1790
  if ("running" !== v2.playState) return false;
1742
1791
  var e3 = get_t();
1743
- return d2(e3, 1 - e3), true;
1792
+ return f2(e3, 1 - e3), true;
1744
1793
  });
1745
1794
  }
1746
1795
  (v2 = e2.animate(c3, {
1747
1796
  duration: l3,
1748
1797
  fill: "forwards"
1749
1798
  })).onfinish = () => {
1750
- get_t = () => i2, d2 == null ? void 0 : d2(i2, 1 - i2), o2();
1799
+ get_t = () => o2, f2 == null ? void 0 : f2(o2, 1 - o2), i2();
1751
1800
  };
1752
1801
  }, {
1753
1802
  abort: () => {
@@ -1758,10 +1807,10 @@ function animate(e2, t2, n2, i2, o2) {
1758
1807
  v2.onfinish = noop);
1759
1808
  },
1760
1809
  deactivate: () => {
1761
- o2 = noop;
1810
+ i2 = noop;
1762
1811
  },
1763
1812
  reset: () => {
1764
- 0 === i2 && (d2 == null ? void 0 : d2(1, 0));
1813
+ 0 === o2 && (f2 == null ? void 0 : f2(1, 0));
1765
1814
  },
1766
1815
  t: () => get_t()
1767
1816
  };
@@ -1774,21 +1823,21 @@ function to_number(e2) {
1774
1823
  return "" === e2 ? null : +e2;
1775
1824
  }
1776
1825
  function is_bound_this(e2, t2) {
1777
- return e2 === t2 || (e2 == null ? void 0 : e2[w]) === t2;
1826
+ return e2 === t2 || (e2 == null ? void 0 : e2[x]) === t2;
1778
1827
  }
1779
- function bind_this(e2 = {}, t2, n2, i2) {
1828
+ function bind_this(e2 = {}, t2, n2, o2) {
1780
1829
  return effect(() => {
1781
- var i3, o2;
1830
+ var o3, i2;
1782
1831
  return render_effect(() => {
1783
- i3 = o2, // We only track changes to the parts, not the value itself to avoid unnecessary reruns.
1784
- o2 = [], untrack(() => {
1785
- e2 !== n2(...o2) && (t2(e2, ...o2), // If this is an effect rerun (cause: each block context changes), then nullfiy the binding at
1832
+ o3 = i2, // We only track changes to the parts, not the value itself to avoid unnecessary reruns.
1833
+ i2 = [], untrack(() => {
1834
+ e2 !== n2(...i2) && (t2(e2, ...i2), // If this is an effect rerun (cause: each block context changes), then nullfiy the binding at
1786
1835
  // the previous position if it isn't already taken over by a different effect.
1787
- i3 && is_bound_this(n2(...i3), e2) && t2(null, ...i3));
1836
+ o3 && is_bound_this(n2(...o3), e2) && t2(null, ...o3));
1788
1837
  });
1789
1838
  }), () => {
1790
1839
  queue_micro_task(() => {
1791
- o2 && is_bound_this(n2(...o2), e2) && t2(null, ...o2);
1840
+ i2 && is_bound_this(n2(...i2), e2) && t2(null, ...i2);
1792
1841
  });
1793
1842
  };
1794
1843
  }), e2;
@@ -1796,7 +1845,7 @@ function bind_this(e2 = {}, t2, n2, i2) {
1796
1845
  function init(e2 = false) {
1797
1846
  const t2 = (
1798
1847
  /** @type {ComponentContextLegacy} */
1799
- I
1848
+ q
1800
1849
  ), n2 = t2.l.u;
1801
1850
  if (!n2) return;
1802
1851
  let props = () => deep_read_state(t2.s);
@@ -1805,13 +1854,13 @@ function init(e2 = false) {
1805
1854
  /** @type {Record<string, any>} */
1806
1855
  {}
1807
1856
  );
1808
- const i2 = /* @__PURE__ */ derived(() => {
1809
- let i3 = false;
1810
- const o2 = t2.s;
1811
- for (const e4 in o2) o2[e4] !== n3[e4] && (n3[e4] = o2[e4], i3 = true);
1812
- return i3 && e3++, e3;
1857
+ const o2 = /* @__PURE__ */ derived(() => {
1858
+ let o3 = false;
1859
+ const i2 = t2.s;
1860
+ for (const e4 in i2) i2[e4] !== n3[e4] && (n3[e4] = i2[e4], o3 = true);
1861
+ return o3 && e3++, e3;
1813
1862
  });
1814
- props = () => get$1(i2);
1863
+ props = () => get$1(o2);
1815
1864
  }
1816
1865
  n2.b.length && function user_pre_effect(e3) {
1817
1866
  return validate_effect(), render_effect(e3);
@@ -1835,24 +1884,24 @@ function observe_all(e2, t2) {
1835
1884
  function subscribe_to_store(e2, t2, n2) {
1836
1885
  if (null == e2)
1837
1886
  return t2(void 0), noop;
1838
- const i2 = untrack(() => e2.subscribe(
1887
+ const o2 = untrack(() => e2.subscribe(
1839
1888
  t2,
1840
1889
  // @ts-expect-error
1841
1890
  n2
1842
1891
  ));
1843
- return i2.unsubscribe ? () => i2.unsubscribe() : i2;
1892
+ return o2.unsubscribe ? () => o2.unsubscribe() : o2;
1844
1893
  }
1845
- const _e = [];
1894
+ const he = [];
1846
1895
  function writable(e2, t2 = noop) {
1847
1896
  let n2 = null;
1848
- const i2 = /* @__PURE__ */ new Set();
1897
+ const o2 = /* @__PURE__ */ new Set();
1849
1898
  function set2(t3) {
1850
1899
  if (safe_not_equal(e2, t3) && (e2 = t3, n2)) {
1851
- const t4 = !_e.length;
1852
- for (const t5 of i2) t5[1](), _e.push(t5, e2);
1900
+ const t4 = !he.length;
1901
+ for (const t5 of o2) t5[1](), he.push(t5, e2);
1853
1902
  if (t4) {
1854
- for (let e3 = 0; e3 < _e.length; e3 += 2) _e[e3][0](_e[e3 + 1]);
1855
- _e.length = 0;
1903
+ for (let e3 = 0; e3 < he.length; e3 += 2) he[e3][0](he[e3 + 1]);
1904
+ he.length = 0;
1856
1905
  }
1857
1906
  }
1858
1907
  }
@@ -1865,13 +1914,13 @@ function writable(e2, t2 = noop) {
1865
1914
  return {
1866
1915
  set: set2,
1867
1916
  update: update2,
1868
- subscribe: function subscribe(o2, s2 = noop) {
1869
- const a2 = [o2, s2];
1870
- return i2.add(a2), 1 === i2.size && (n2 = t2(set2, update2) || noop), o2(
1917
+ subscribe: function subscribe(i2, s2 = noop) {
1918
+ const a2 = [i2, s2];
1919
+ return o2.add(a2), 1 === o2.size && (n2 = t2(set2, update2) || noop), i2(
1871
1920
  /** @type {T} */
1872
1921
  e2
1873
1922
  ), () => {
1874
- i2.delete(a2), 0 === i2.size && n2 && (n2(), n2 = null);
1923
+ o2.delete(a2), 0 === o2.size && n2 && (n2(), n2 = null);
1875
1924
  };
1876
1925
  }
1877
1926
  };
@@ -1880,26 +1929,26 @@ function get(e2) {
1880
1929
  let t2;
1881
1930
  return subscribe_to_store(e2, (e3) => t2 = e3)(), t2;
1882
1931
  }
1883
- let ve = false, ge = Symbol();
1932
+ let me = false, be = Symbol();
1884
1933
  function store_get(e2, t2, n2) {
1885
- const i2 = n2[t2] ?? (n2[t2] = {
1934
+ const o2 = n2[t2] ?? (n2[t2] = {
1886
1935
  store: null,
1887
1936
  source: /* @__PURE__ */ mutable_source(void 0),
1888
1937
  unsubscribe: noop
1889
1938
  });
1890
- if (i2.store !== e2 && !(ge in n2)) if (i2.unsubscribe(), i2.store = e2 ?? null, null == e2) i2.source.v = void 0, // see synchronous callback comment below
1891
- i2.unsubscribe = noop;
1939
+ if (o2.store !== e2 && !(be in n2)) if (o2.unsubscribe(), o2.store = e2 ?? null, null == e2) o2.source.v = void 0, // see synchronous callback comment below
1940
+ o2.unsubscribe = noop;
1892
1941
  else {
1893
- var o2 = true;
1894
- i2.unsubscribe = subscribe_to_store(e2, (e3) => {
1895
- o2 ? (
1942
+ var i2 = true;
1943
+ o2.unsubscribe = subscribe_to_store(e2, (e3) => {
1944
+ i2 ? (
1896
1945
  // If the first updates to the store value (possibly multiple of them) are synchronously
1897
1946
  // inside a derived, we will hit the `state_unsafe_mutation` error if we `set` the value
1898
- i2.source.v = e3
1899
- ) : set(i2.source, e3);
1900
- }), o2 = false;
1947
+ o2.source.v = e3
1948
+ ) : set(o2.source, e3);
1949
+ }), i2 = false;
1901
1950
  }
1902
- return e2 && ge in n2 ? get(e2) : get$1(i2.source);
1951
+ return e2 && be in n2 ? get(e2) : get$1(o2.source);
1903
1952
  }
1904
1953
  function store_set(e2, t2) {
1905
1954
  return e2.set(t2), t2;
@@ -1911,14 +1960,14 @@ function setup_stores() {
1911
1960
  for (var t2 in e2) {
1912
1961
  e2[t2].unsubscribe();
1913
1962
  }
1914
- o(e2, ge, {
1963
+ i(e2, be, {
1915
1964
  enumerable: false,
1916
1965
  value: true
1917
1966
  });
1918
1967
  });
1919
1968
  }];
1920
1969
  }
1921
- const he = {
1970
+ const ye = {
1922
1971
  get(e2, t2) {
1923
1972
  if (!e2.exclude.includes(t2)) return get$1(e2.version), t2 in e2.special ? e2.special[t2]() : e2.props[t2];
1924
1973
  },
@@ -1954,22 +2003,22 @@ function legacy_rest_props(e2, t2) {
1954
2003
  exclude: t2,
1955
2004
  special: {},
1956
2005
  version: source(0)
1957
- }, he);
2006
+ }, ye);
1958
2007
  }
1959
- const me = {
2008
+ const $e = {
1960
2009
  get(e2, t2) {
1961
2010
  let n2 = e2.props.length;
1962
2011
  for (; n2--; ) {
1963
- let i2 = e2.props[n2];
1964
- if (is_function(i2) && (i2 = i2()), "object" == typeof i2 && null !== i2 && t2 in i2) return i2[t2];
2012
+ let o2 = e2.props[n2];
2013
+ if (is_function(o2) && (o2 = o2()), "object" == typeof o2 && null !== o2 && t2 in o2) return o2[t2];
1965
2014
  }
1966
2015
  },
1967
2016
  set(e2, t2, n2) {
1968
- let i2 = e2.props.length;
1969
- for (; i2--; ) {
1970
- let o2 = e2.props[i2];
1971
- is_function(o2) && (o2 = o2());
1972
- const a2 = s(o2, t2);
2017
+ let o2 = e2.props.length;
2018
+ for (; o2--; ) {
2019
+ let i2 = e2.props[o2];
2020
+ is_function(i2) && (i2 = i2());
2021
+ const a2 = s(i2, t2);
1973
2022
  if (a2 && a2.set) return a2.set(n2), true;
1974
2023
  }
1975
2024
  return false;
@@ -1977,9 +2026,9 @@ const me = {
1977
2026
  getOwnPropertyDescriptor(e2, t2) {
1978
2027
  let n2 = e2.props.length;
1979
2028
  for (; n2--; ) {
1980
- let i2 = e2.props[n2];
1981
- if (is_function(i2) && (i2 = i2()), "object" == typeof i2 && null !== i2 && t2 in i2) {
1982
- const e3 = s(i2, t2);
2029
+ let o2 = e2.props[n2];
2030
+ if (is_function(o2) && (o2 = o2()), "object" == typeof o2 && null !== o2 && t2 in o2) {
2031
+ const e3 = s(o2, t2);
1983
2032
  return e3 && !e3.configurable && // Prevent a "Non-configurability Report Error": The target is an array, it does
1984
2033
  // not actually contain this property. If it is now described as non-configurable,
1985
2034
  // the proxy throws a validation error. Setting it to true avoids that.
@@ -1988,7 +2037,7 @@ const me = {
1988
2037
  }
1989
2038
  },
1990
2039
  has(e2, t2) {
1991
- if (t2 === w || t2 === x) return false;
2040
+ if (t2 === x || t2 === k) return false;
1992
2041
  for (let n2 of e2.props) if (is_function(n2) && (n2 = n2()), null != n2 && t2 in n2) return true;
1993
2042
  return false;
1994
2043
  },
@@ -2004,36 +2053,36 @@ const me = {
2004
2053
  function spread_props(...e2) {
2005
2054
  return new Proxy({
2006
2055
  props: e2
2007
- }, me);
2056
+ }, $e);
2008
2057
  }
2009
- function prop(e2, t2, n2, i2) {
2058
+ function prop(e2, t2, n2, o2) {
2010
2059
  var _a2;
2011
- var o2, a2 = !!(1 & n2), l2 = !C || !!(2 & n2), c2 = !!(8 & n2), u2 = !!(16 & n2), d2 = false;
2012
- c2 ? [o2, d2] = function capture_store_binding(e3) {
2013
- var t3 = ve;
2060
+ var i2, a2 = !!(1 & n2), l2 = !S || !!(2 & n2), c2 = !!(8 & n2), u2 = !!(16 & n2), f2 = false;
2061
+ c2 ? [i2, f2] = function capture_store_binding(e3) {
2062
+ var t3 = me;
2014
2063
  try {
2015
- return ve = false, [e3(), ve];
2064
+ return me = false, [e3(), me];
2016
2065
  } finally {
2017
- ve = t3;
2066
+ me = t3;
2018
2067
  }
2019
2068
  }(() => (
2020
2069
  /** @type {V} */
2021
2070
  e2[t2]
2022
- )) : o2 = /** @type {V} */
2071
+ )) : i2 = /** @type {V} */
2023
2072
  e2[t2];
2024
- var f2, p2 = w in e2 || x in e2, _2 = c2 && (((_a2 = s(e2, t2)) == null ? void 0 : _a2.set) ?? (p2 && t2 in e2 && ((n3) => e2[t2] = n3))) || void 0, v2 = (
2073
+ var d2, p2 = x in e2 || k in e2, _2 = c2 && (((_a2 = s(e2, t2)) == null ? void 0 : _a2.set) ?? (p2 && t2 in e2 && ((n3) => e2[t2] = n3))) || void 0, v2 = (
2025
2074
  /** @type {V} */
2026
- i2
2075
+ o2
2027
2076
  ), g2 = true, h2 = false, get_fallback = () => (h2 = true, g2 && (g2 = false, v2 = u2 ? untrack(
2028
2077
  /** @type {() => V} */
2029
- i2
2078
+ o2
2030
2079
  ) : (
2031
2080
  /** @type {V} */
2032
- i2
2081
+ o2
2033
2082
  )), v2);
2034
- if (void 0 === o2 && void 0 !== i2 && (_2 && l2 && function props_invalid_value(e3) {
2083
+ if (void 0 === i2 && void 0 !== o2 && (_2 && l2 && function props_invalid_value(e3) {
2035
2084
  throw new Error("https://svelte.dev/e/props_invalid_value");
2036
- }(), o2 = get_fallback(), _2 && _2(o2)), l2) f2 = () => {
2085
+ }(), i2 = get_fallback(), _2 && _2(i2)), l2) d2 = () => {
2037
2086
  var n3 = (
2038
2087
  /** @type {V} */
2039
2088
  e2[t2]
@@ -2045,13 +2094,13 @@ function prop(e2, t2, n2, i2) {
2045
2094
  /** @type {V} */
2046
2095
  e2[t2]
2047
2096
  ));
2048
- m2.f |= 131072, f2 = () => {
2097
+ m2.f |= 131072, d2 = () => {
2049
2098
  var e3 = get$1(m2);
2050
2099
  return void 0 !== e3 && (v2 = /** @type {V} */
2051
2100
  void 0), void 0 === e3 ? v2 : e3;
2052
2101
  };
2053
2102
  }
2054
- if (!(4 & n2)) return f2;
2103
+ if (!(4 & n2)) return d2;
2055
2104
  if (_2) {
2056
2105
  var b2 = e2.$$legacy;
2057
2106
  return function(e3, t3) {
@@ -2060,27 +2109,27 @@ function prop(e2, t2, n2, i2) {
2060
2109
  // In that case the state proxy (if it exists) should take care of the notification.
2061
2110
  // If the parent is not in runes mode, we need to notify on mutation, too, that the prop
2062
2111
  // has changed because the parent will not be able to detect the change otherwise.
2063
- (l2 && t3 && !b2 && !d2 || /** @type {Function} */
2064
- _2(t3 ? f2() : e3), e3)
2065
- ) : f2();
2112
+ (l2 && t3 && !b2 && !f2 || /** @type {Function} */
2113
+ _2(t3 ? d2() : e3), e3)
2114
+ ) : d2();
2066
2115
  };
2067
2116
  }
2068
- var y2 = false, $2 = /* @__PURE__ */ mutable_source(o2), k2 = /* @__PURE__ */ derived(() => {
2069
- var e3 = f2(), t3 = get$1($2);
2117
+ var y2 = false, $2 = /* @__PURE__ */ mutable_source(i2), w2 = /* @__PURE__ */ derived(() => {
2118
+ var e3 = d2(), t3 = get$1($2);
2070
2119
  return y2 ? (y2 = false, t3) : $2.v = e3;
2071
2120
  });
2072
- return a2 || (k2.equals = safe_equals), function(e3, t3) {
2121
+ return a2 || (w2.equals = safe_equals), function(e3, t3) {
2073
2122
  if (arguments.length > 0) {
2074
- const n3 = t3 ? get$1(k2) : l2 && c2 ? proxy(e3) : e3;
2075
- return k2.equals(n3) || (y2 = true, set($2, n3), // To ensure the fallback value is consistent when used with proxies, we
2123
+ const n3 = t3 ? get$1(w2) : l2 && c2 ? proxy(e3) : e3;
2124
+ return w2.equals(n3) || (y2 = true, set($2, n3), // To ensure the fallback value is consistent when used with proxies, we
2076
2125
  // update the local fallback_value, but only if the fallback is actively used
2077
- h2 && void 0 !== v2 && (v2 = n3), untrack(() => get$1(k2))), e3;
2126
+ h2 && void 0 !== v2 && (v2 = n3), untrack(() => get$1(w2))), e3;
2078
2127
  }
2079
- return get$1(k2);
2128
+ return get$1(w2);
2080
2129
  };
2081
2130
  }
2082
2131
  function onMount(e2) {
2083
- null === I && lifecycle_outside_component(), C && null !== I.l ? (
2132
+ null === q && lifecycle_outside_component(), S && null !== q.l ? (
2084
2133
  /**
2085
2134
  * Legacy-mode: Init callbacks object for onMount/beforeUpdate/afterUpdate
2086
2135
  * @param {ComponentContext} context
@@ -2095,17 +2144,15 @@ function onMount(e2) {
2095
2144
  b: [],
2096
2145
  m: []
2097
2146
  });
2098
- }(I).m.push(e2)
2147
+ }(q).m.push(e2)
2099
2148
  ) : user_effect(() => {
2100
2149
  const t2 = untrack(e2);
2101
2150
  if ("function" == typeof t2) return t2;
2102
2151
  });
2103
2152
  }
2104
- "undefined" != typeof window && // @ts-ignore
2105
- (window.__svelte || (window.__svelte = {
2106
- v: /* @__PURE__ */ new Set()
2107
- })).v.add("5"), function enable_legacy_mode_flag() {
2108
- C = true;
2153
+ "undefined" != typeof window && // @ts-expect-error
2154
+ ((_a = window.__svelte ?? (window.__svelte = {})).v ?? (_a.v = /* @__PURE__ */ new Set())).add("5"), function enable_legacy_mode_flag() {
2155
+ S = true;
2109
2156
  }();
2110
2157
  /**
2111
2158
  * @license lucide-svelte v0.476.0 - ISC
@@ -2127,7 +2174,7 @@ function onMount(e2) {
2127
2174
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2128
2175
  *
2129
2176
  */
2130
- const be = {
2177
+ const we = {
2131
2178
  xmlns: "http://www.w3.org/2000/svg",
2132
2179
  width: 24,
2133
2180
  height: 24,
@@ -2138,28 +2185,27 @@ const be = {
2138
2185
  "stroke-linecap": "round",
2139
2186
  "stroke-linejoin": "round"
2140
2187
  };
2141
- var ye = /* @__PURE__ */ ns_template("<svg><!><!></svg>");
2188
+ var xe = /* @__PURE__ */ ns_template("<svg><!><!></svg>");
2142
2189
  function Icon$1(e2, t2) {
2143
- const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]), i2 = legacy_rest_props(n2, ["name", "color", "size", "strokeWidth", "absoluteStrokeWidth", "iconNode"]);
2190
+ const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]), o2 = legacy_rest_props(n2, ["name", "color", "size", "strokeWidth", "absoluteStrokeWidth", "iconNode"]);
2144
2191
  push(t2, false);
2145
- let o2 = prop(t2, "name", 8, void 0), s2 = prop(t2, "color", 8, "currentColor"), a2 = prop(t2, "size", 8, 24), l2 = prop(t2, "strokeWidth", 8, 2), c2 = prop(t2, "absoluteStrokeWidth", 8, false), u2 = prop(t2, "iconNode", 24, () => []);
2192
+ let i2 = prop(t2, "name", 8, void 0), s2 = prop(t2, "color", 8, "currentColor"), a2 = prop(t2, "size", 8, 24), l2 = prop(t2, "strokeWidth", 8, 2), c2 = prop(t2, "absoluteStrokeWidth", 8, false), u2 = prop(t2, "iconNode", 24, () => []);
2146
2193
  init();
2147
- var d2 = ye();
2148
- let f2;
2149
- var p2 = child(d2);
2194
+ var f2 = xe();
2195
+ let d2;
2196
+ var p2 = child(f2);
2150
2197
  each(p2, 1, u2, index, (e3, t3) => {
2151
2198
  var n3 = comment();
2152
- !function element(e4, t4, n4, i3, o3, s3) {
2153
- var a3, l3, c3, u3 = null, d3 = (
2199
+ !function element(e4, t4, n4, o3, i3, s3) {
2200
+ var a3, l3, c3, u3 = null, f3 = (
2154
2201
  /** @type {TemplateNode} */
2155
2202
  e4
2156
- ), f3 = ce;
2203
+ ), d3 = ce;
2157
2204
  block(() => {
2158
2205
  const e5 = t4() || null;
2159
- var n5 = q;
2160
2206
  if (e5 !== a3) {
2161
- var o4 = ce;
2162
- set_current_each_item(f3), c3 && (null === e5 ? (
2207
+ var n5 = ce;
2208
+ set_current_each_item(d3), c3 && (null === e5 ? (
2163
2209
  // start outro
2164
2210
  pause_effect(c3, () => {
2165
2211
  c3 = null, l3 = null;
@@ -2171,32 +2217,32 @@ function Icon$1(e2, t2) {
2171
2217
  // tag is changing — destroy immediately, render contents without intro transitions
2172
2218
  (destroy_effect(c3), set_should_intro(false))
2173
2219
  )), e5 && e5 !== l3 && (c3 = branch(() => {
2174
- if (assign_nodes(u3 = document.createElementNS(n5, e5), u3), i3) {
2220
+ if (assign_nodes(u3 = document.createElementNS("http://www.w3.org/2000/svg", e5), u3), o3) {
2175
2221
  var t5 = (
2176
2222
  /** @type {TemplateNode} */
2177
2223
  u3.appendChild(create_text())
2178
2224
  );
2179
- i3(u3, t5);
2225
+ o3(u3, t5);
2180
2226
  }
2181
- H.nodes_end = u3, d3.before(u3);
2182
- })), (a3 = e5) && (l3 = a3), set_should_intro(true), set_current_each_item(o4);
2227
+ H.nodes_end = u3, f3.before(u3);
2228
+ })), (a3 = e5) && (l3 = a3), set_should_intro(true), set_current_each_item(n5);
2183
2229
  }
2184
- }, y);
2230
+ }, $);
2185
2231
  }(first_child(n3), () => get$1(t3)[0], 0, (e4, n4) => {
2186
- let i3;
2187
- template_effect(() => i3 = set_attributes(e4, i3, {
2232
+ let o3;
2233
+ template_effect(() => o3 = set_attributes(e4, o3, {
2188
2234
  ...get$1(t3)[1]
2189
- }, void 0, e4.namespaceURI === q, e4.nodeName.includes("-")));
2235
+ }));
2190
2236
  }), append(e3, n3);
2191
- }), slot(sibling(p2), t2, "default", {}, null), template_effect((e3, t3) => f2 = set_attributes(d2, f2, {
2192
- ...be,
2193
- ...i2,
2237
+ }), slot(sibling(p2), t2, "default", {}, null), template_effect((e3, t3) => d2 = set_attributes(f2, d2, {
2238
+ ...we,
2239
+ ...o2,
2194
2240
  width: a2(),
2195
2241
  height: a2(),
2196
2242
  stroke: s2(),
2197
2243
  "stroke-width": e3,
2198
2244
  class: t3
2199
- }, void 0, true), [() => c2() ? 24 * Number(l2()) / Number(a2()) : l2(), () => ((...e3) => e3.filter((e4, t3, n3) => Boolean(e4) && n3.indexOf(e4) === t3).join(" "))("lucide-icon", "lucide", o2() ? `lucide-${o2()}` : "", n2.class)], derived_safe_equal), append(e2, d2), pop();
2245
+ }), [() => c2() ? 24 * Number(l2()) / Number(a2()) : l2(), () => ((...e3) => e3.filter((e4, t3, n3) => Boolean(e4) && n3.indexOf(e4) === t3).join(" "))("lucide-icon", "lucide", i2() ? `lucide-${i2()}` : "", n2.class)], derived_safe_equal), append(e2, f2), pop();
2200
2246
  }
2201
2247
  function Loader_circle(e2, t2) {
2202
2248
  const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]);
@@ -2207,8 +2253,8 @@ function Loader_circle(e2, t2) {
2207
2253
  d: "M21 12a9 9 0 1 1-6.219-8.56"
2208
2254
  }]],
2209
2255
  children: (e3, n3) => {
2210
- var i2 = comment();
2211
- slot(first_child(i2), t2, "default", {}, null), append(e3, i2);
2256
+ var o2 = comment();
2257
+ slot(first_child(o2), t2, "default", {}, null), append(e3, o2);
2212
2258
  },
2213
2259
  $$slots: {
2214
2260
  default: true
@@ -2218,14 +2264,14 @@ function Loader_circle(e2, t2) {
2218
2264
  var on_click$2 = (e2, t2) => {
2219
2265
  var _a2;
2220
2266
  (_a2 = t2.onClick) == null ? void 0 : _a2.call(t2);
2221
- }, $e = /* @__PURE__ */ template('<button id="floating playlight button" aria-label="Open Playlight Discovery"><p class="z-2 flex items-center overflow-hidden svelte-1j97rta"><!> <span class="mr-0.25 inline-block font-bold svelte-1j97rta">More Games</span></p> <div class="absolute bottom-0 left-0 h-full w-0 bg-black transition-all duration-300 group-hover:w-full svelte-1j97rta"></div></button>');
2267
+ }, ke = /* @__PURE__ */ template('<button id="floating playlight button" aria-label="Open Playlight Discovery"><p class="z-2 flex items-center overflow-hidden svelte-1j97rta"><!> <span class="mr-0.25 inline-block font-bold svelte-1j97rta">More Games</span></p> <div class="absolute bottom-0 left-0 h-full w-0 bg-black transition-all duration-300 group-hover:w-full svelte-1j97rta"></div></button>');
2222
2268
  function FloatingButton(e2, t2) {
2223
2269
  push(t2, true);
2224
- let n2 = prop(t2, "position", 3, "bottom-right"), i2 = prop(t2, "visible", 3, true);
2225
- var o2 = comment(), s2 = first_child(o2), consequent = (e3) => {
2226
- var i3 = $e();
2227
- i3.__click = [on_click$2, t2];
2228
- var o3 = child(i3);
2270
+ let n2 = prop(t2, "position", 3, "bottom-right"), o2 = prop(t2, "visible", 3, true);
2271
+ var i2 = comment(), s2 = first_child(i2), consequent = (e3) => {
2272
+ var o3 = ke();
2273
+ o3.__click = [on_click$2, t2];
2274
+ var i3 = child(o3);
2229
2275
  !function Gamepad(e4, t3) {
2230
2276
  const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
2231
2277
  Icon$1(e4, spread_props({
@@ -2259,22 +2305,22 @@ function FloatingButton(e2, t2) {
2259
2305
  rx: "2"
2260
2306
  }]],
2261
2307
  children: (e5, n4) => {
2262
- var i4 = comment();
2263
- slot(first_child(i4), t3, "default", {}, null), append(e5, i4);
2308
+ var o4 = comment();
2309
+ slot(first_child(o4), t3, "default", {}, null), append(e5, o4);
2264
2310
  },
2265
2311
  $$slots: {
2266
2312
  default: true
2267
2313
  }
2268
2314
  }));
2269
- }(child(o3), {
2315
+ }(child(i3), {
2270
2316
  size: 26,
2271
2317
  strokeWidth: 1.75,
2272
2318
  class: "z-2 mr-2 transform transition-all duration-300 group-hover:rotate-12"
2273
- }), template_effect(() => set_class(i3, 1, `fixed ${("bottom-left" == n2() ? "bottom-4 left-4" : "bottom-right" == n2() ? "right-4 bottom-4" : "") ?? ""} group children-text-white z-99990 flex cursor-pointer gap-2 rounded-md bg-white p-3 font-bold text-black uppercase shadow-lg transition-all hover:scale-105`, "svelte-1j97rta")), append(e3, i3);
2319
+ }), template_effect(() => set_class(o3, 1, `fixed ${("bottom-left" == n2() ? "bottom-4 left-4" : "bottom-right" == n2() ? "right-4 bottom-4" : "") ?? ""} group children-text-white z-99990 flex cursor-pointer gap-2 rounded-md bg-white p-3 font-bold text-black uppercase shadow-lg transition-all hover:scale-105`, "svelte-1j97rta")), append(e3, o3);
2274
2320
  };
2275
2321
  if_block(s2, (e3) => {
2276
- i2() && e3(consequent);
2277
- }), append(e2, o2), pop();
2322
+ o2() && e3(consequent);
2323
+ }), append(e2, i2), pop();
2278
2324
  }
2279
2325
  function cubic_out(e2) {
2280
2326
  const t2 = e2 - 1;
@@ -2291,123 +2337,123 @@ function split_css_unit(e2) {
2291
2337
  "px"
2292
2338
  ];
2293
2339
  }
2294
- function blur(e2, { delay: t2 = 0, duration: n2 = 400, easing: i2 = cubic_in_out, amount: o2 = 5, opacity: s2 = 0 } = {}) {
2295
- const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.filter ? "" : a2.filter, u2 = l2 * (1 - s2), [d2, f2] = split_css_unit(o2);
2340
+ function blur(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_in_out, amount: i2 = 5, opacity: s2 = 0 } = {}) {
2341
+ const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.filter ? "" : a2.filter, u2 = l2 * (1 - s2), [f2, d2] = split_css_unit(i2);
2296
2342
  return {
2297
2343
  delay: t2,
2298
2344
  duration: n2,
2299
- easing: i2,
2300
- css: (e3, t3) => `opacity: ${l2 - u2 * t3}; filter: ${c2} blur(${t3 * d2}${f2});`
2345
+ easing: o2,
2346
+ css: (e3, t3) => `opacity: ${l2 - u2 * t3}; filter: ${c2} blur(${t3 * f2}${d2});`
2301
2347
  };
2302
2348
  }
2303
- function fly(e2, { delay: t2 = 0, duration: n2 = 400, easing: i2 = cubic_out, x: o2 = 0, y: s2 = 0, opacity: a2 = 0 } = {}) {
2304
- const l2 = getComputedStyle(e2), c2 = +l2.opacity, u2 = "none" === l2.transform ? "" : l2.transform, d2 = c2 * (1 - a2), [f2, p2] = split_css_unit(o2), [_2, v2] = split_css_unit(s2);
2349
+ function fly(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_out, x: i2 = 0, y: s2 = 0, opacity: a2 = 0 } = {}) {
2350
+ const l2 = getComputedStyle(e2), c2 = +l2.opacity, u2 = "none" === l2.transform ? "" : l2.transform, f2 = c2 * (1 - a2), [d2, p2] = split_css_unit(i2), [_2, v2] = split_css_unit(s2);
2305
2351
  return {
2306
2352
  delay: t2,
2307
2353
  duration: n2,
2308
- easing: i2,
2354
+ easing: o2,
2309
2355
  css: (e3, t3) => `
2310
- transform: ${u2} translate(${(1 - e3) * f2}${p2}, ${(1 - e3) * _2}${v2});
2311
- opacity: ${c2 - d2 * t3}`
2356
+ transform: ${u2} translate(${(1 - e3) * d2}${p2}, ${(1 - e3) * _2}${v2});
2357
+ opacity: ${c2 - f2 * t3}`
2312
2358
  };
2313
2359
  }
2314
- function slide(e2, { delay: t2 = 0, duration: n2 = 400, easing: i2 = cubic_out, axis: o2 = "y" } = {}) {
2315
- const s2 = getComputedStyle(e2), a2 = +s2.opacity, l2 = "y" === o2 ? "height" : "width", c2 = parseFloat(s2[l2]), u2 = "y" === o2 ? ["top", "bottom"] : ["left", "right"], d2 = u2.map((e3) => (
2360
+ function slide(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_out, axis: i2 = "y" } = {}) {
2361
+ const s2 = getComputedStyle(e2), a2 = +s2.opacity, l2 = "y" === i2 ? "height" : "width", c2 = parseFloat(s2[l2]), u2 = "y" === i2 ? ["top", "bottom"] : ["left", "right"], f2 = u2.map((e3) => (
2316
2362
  /** @type {'Left' | 'Right' | 'Top' | 'Bottom'} */
2317
2363
  `${e3[0].toUpperCase()}${e3.slice(1)}`
2318
- )), f2 = parseFloat(s2[`padding${d2[0]}`]), p2 = parseFloat(s2[`padding${d2[1]}`]), _2 = parseFloat(s2[`margin${d2[0]}`]), v2 = parseFloat(s2[`margin${d2[1]}`]), g2 = parseFloat(s2[`border${d2[0]}Width`]), h2 = parseFloat(s2[`border${d2[1]}Width`]);
2364
+ )), d2 = parseFloat(s2[`padding${f2[0]}`]), p2 = parseFloat(s2[`padding${f2[1]}`]), _2 = parseFloat(s2[`margin${f2[0]}`]), v2 = parseFloat(s2[`margin${f2[1]}`]), g2 = parseFloat(s2[`border${f2[0]}Width`]), h2 = parseFloat(s2[`border${f2[1]}Width`]);
2319
2365
  return {
2320
2366
  delay: t2,
2321
2367
  duration: n2,
2322
- easing: i2,
2323
- css: (e3) => `overflow: hidden;opacity: ${Math.min(20 * e3, 1) * a2};${l2}: ${e3 * c2}px;padding-${u2[0]}: ${e3 * f2}px;padding-${u2[1]}: ${e3 * p2}px;margin-${u2[0]}: ${e3 * _2}px;margin-${u2[1]}: ${e3 * v2}px;border-${u2[0]}-width: ${e3 * g2}px;border-${u2[1]}-width: ${e3 * h2}px;min-${l2}: 0`
2368
+ easing: o2,
2369
+ css: (e3) => `overflow: hidden;opacity: ${Math.min(20 * e3, 1) * a2};${l2}: ${e3 * c2}px;padding-${u2[0]}: ${e3 * d2}px;padding-${u2[1]}: ${e3 * p2}px;margin-${u2[0]}: ${e3 * _2}px;margin-${u2[1]}: ${e3 * v2}px;border-${u2[0]}-width: ${e3 * g2}px;border-${u2[1]}-width: ${e3 * h2}px;min-${l2}: 0`
2324
2370
  };
2325
2371
  }
2326
- function scale(e2, { delay: t2 = 0, duration: n2 = 400, easing: i2 = cubic_out, start: o2 = 0, opacity: s2 = 0 } = {}) {
2327
- const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.transform ? "" : a2.transform, u2 = 1 - o2, d2 = l2 * (1 - s2);
2372
+ function scale(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_out, start: i2 = 0, opacity: s2 = 0 } = {}) {
2373
+ const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.transform ? "" : a2.transform, u2 = 1 - i2, f2 = l2 * (1 - s2);
2328
2374
  return {
2329
2375
  delay: t2,
2330
2376
  duration: n2,
2331
- easing: i2,
2377
+ easing: o2,
2332
2378
  css: (e3, t3) => `
2333
2379
  transform: ${c2} scale(${1 - u2 * t3});
2334
- opacity: ${l2 - d2 * t3}
2380
+ opacity: ${l2 - f2 * t3}
2335
2381
  `
2336
2382
  };
2337
2383
  }
2338
2384
  delegate(["click"]);
2339
- var we = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>'), xe = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>'), ke = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>'), Ce = /* @__PURE__ */ ns_template('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');
2385
+ var Ce = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>'), Se = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>'), Me = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>'), qe = /* @__PURE__ */ ns_template('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');
2340
2386
  function Icon(e2, t2) {
2341
2387
  let n2 = prop(t2, "type", 8, "success");
2342
- var i2 = comment(), o2 = first_child(i2), consequent = (e3) => {
2343
- append(e3, we());
2344
- }, alternate_3 = (e3) => {
2345
- var t3 = comment(), i3 = first_child(t3), consequent_1 = (e4) => {
2346
- append(e4, xe());
2347
- }, alternate_2 = (e4) => {
2348
- var t4 = comment(), i4 = first_child(t4), consequent_2 = (e5) => {
2349
- append(e5, ke());
2350
- }, alternate_1 = (e5) => {
2351
- var t5 = comment(), i5 = first_child(t5), consequent_3 = (e6) => {
2352
- append(e6, Ce());
2353
- }, alternate = (e6) => {
2388
+ var o2 = comment(), i2 = first_child(o2), consequent = (e3) => {
2389
+ append(e3, Ce());
2390
+ }, alternate = (e3, t3) => {
2391
+ var consequent_1 = (e4) => {
2392
+ append(e4, Se());
2393
+ }, alternate_1 = (e4, t4) => {
2394
+ var consequent_2 = (e5) => {
2395
+ append(e5, Me());
2396
+ }, alternate_2 = (e5, t5) => {
2397
+ var consequent_3 = (e6) => {
2398
+ append(e6, qe());
2399
+ }, alternate_3 = (e6) => {
2354
2400
  };
2355
- if_block(i5, (e6) => {
2356
- "warning" === n2() ? e6(consequent_3) : e6(alternate, false);
2357
- }, true), append(e5, t5);
2401
+ if_block(e5, (e6) => {
2402
+ "warning" === n2() ? e6(consequent_3) : e6(alternate_3, false);
2403
+ }, t5);
2358
2404
  };
2359
- if_block(i4, (e5) => {
2360
- "info" === n2() ? e5(consequent_2) : e5(alternate_1, false);
2361
- }, true), append(e4, t4);
2405
+ if_block(e4, (e5) => {
2406
+ "info" === n2() ? e5(consequent_2) : e5(alternate_2, false);
2407
+ }, t4);
2362
2408
  };
2363
- if_block(i3, (e4) => {
2364
- "error" === n2() ? e4(consequent_1) : e4(alternate_2, false);
2365
- }, true), append(e3, t3);
2409
+ if_block(e3, (e4) => {
2410
+ "error" === n2() ? e4(consequent_1) : e4(alternate_1, false);
2411
+ }, t3);
2366
2412
  };
2367
- if_block(o2, (e3) => {
2368
- "success" === n2() ? e3(consequent) : e3(alternate_3, false);
2369
- }), append(e2, i2);
2413
+ if_block(i2, (e3) => {
2414
+ "success" === n2() ? e3(consequent) : e3(alternate, false);
2415
+ }), append(e2, o2);
2370
2416
  }
2371
- var Me = /* @__PURE__ */ template('<div class="sonner-loading-bar"></div>'), qe = /* @__PURE__ */ template('<div class="sonner-loading-wrapper"><div class="sonner-spinner"></div></div>');
2417
+ var Ie = /* @__PURE__ */ template('<div class="sonner-loading-bar"></div>'), Pe = /* @__PURE__ */ template('<div class="sonner-loading-wrapper"><div class="sonner-spinner"></div></div>');
2372
2418
  function Loader(e2, t2) {
2373
2419
  push(t2, false);
2374
2420
  let n2 = prop(t2, "visible", 8);
2375
- const i2 = Array(12).fill(0);
2421
+ const o2 = Array(12).fill(0);
2376
2422
  init();
2377
- var o2 = qe();
2378
- each(child(o2), 5, () => i2, index, (e3, t3) => {
2379
- append(e3, Me());
2380
- }), template_effect(() => set_attribute(o2, "data-visible", n2())), append(e2, o2), pop();
2423
+ var i2 = Pe();
2424
+ each(child(i2), 5, () => o2, index, (e3, t3) => {
2425
+ append(e3, Ie());
2426
+ }), template_effect(() => set_attribute(i2, "data-visible", n2())), append(e2, i2), pop();
2381
2427
  }
2382
2428
  function cn(...e2) {
2383
2429
  return e2.filter(Boolean).join(" ");
2384
2430
  }
2385
- const Ie = "undefined" != typeof document;
2431
+ const Te = "undefined" != typeof document;
2386
2432
  function clientWritable(e2) {
2387
2433
  const t2 = writable(e2);
2388
2434
  return {
2389
2435
  subscribe: t2.subscribe,
2390
2436
  set: function set2(e3) {
2391
- Ie && t2.set(e3);
2437
+ Te && t2.set(e3);
2392
2438
  },
2393
2439
  update: function update2(e3) {
2394
- Ie && t2.update(e3);
2440
+ Te && t2.update(e3);
2395
2441
  }
2396
2442
  };
2397
2443
  }
2398
- let Se = 0;
2399
- const Te = function createToastState() {
2444
+ let Oe = 0;
2445
+ const Ee = function createToastState() {
2400
2446
  const e2 = clientWritable([]), t2 = clientWritable([]);
2401
2447
  function addToast(t3) {
2402
2448
  e2.update((e3) => [t3, ...e3]);
2403
2449
  }
2404
2450
  function create(t3) {
2405
2451
  var _a2;
2406
- const { message: n2, ...i2 } = t3, o2 = "number" == typeof (t3 == null ? void 0 : t3.id) || t3.id && ((_a2 = t3.id) == null ? void 0 : _a2.length) > 0 ? t3.id : Se++, s2 = void 0 === t3.dismissable || t3.dismissable, a2 = void 0 === t3.type ? "default" : t3.type, l2 = get(e2).find((e3) => e3.id === o2);
2407
- return l2 ? e2.update((e3) => e3.map((e4) => e4.id === o2 ? {
2452
+ const { message: n2, ...o2 } = t3, i2 = "number" == typeof (t3 == null ? void 0 : t3.id) || t3.id && ((_a2 = t3.id) == null ? void 0 : _a2.length) > 0 ? t3.id : Oe++, s2 = void 0 === t3.dismissable || t3.dismissable, a2 = void 0 === t3.type ? "default" : t3.type, l2 = get(e2).find((e3) => e3.id === i2);
2453
+ return l2 ? e2.update((e3) => e3.map((e4) => e4.id === i2 ? {
2408
2454
  ...e4,
2409
2455
  ...t3,
2410
- id: o2,
2456
+ id: i2,
2411
2457
  title: n2,
2412
2458
  dismissable: s2,
2413
2459
  type: a2,
@@ -2416,12 +2462,12 @@ const Te = function createToastState() {
2416
2462
  ...e4,
2417
2463
  updated: false
2418
2464
  })) : addToast({
2419
- ...i2,
2420
- id: o2,
2465
+ ...o2,
2466
+ id: i2,
2421
2467
  title: n2,
2422
2468
  dismissable: s2,
2423
2469
  type: a2
2424
- }), o2;
2470
+ }), i2;
2425
2471
  }
2426
2472
  function dismiss(t3) {
2427
2473
  if (void 0 !== t3) return e2.update((e3) => e3.map((e4) => e4.id === t3 ? {
@@ -2494,53 +2540,53 @@ const Te = function createToastState() {
2494
2540
  type: "loading",
2495
2541
  message: t3.loading
2496
2542
  }));
2497
- const i2 = e3 instanceof Promise ? e3 : e3();
2498
- let o2 = void 0 !== n2;
2499
- return i2.then((e4) => {
2543
+ const o2 = e3 instanceof Promise ? e3 : e3();
2544
+ let i2 = void 0 !== n2;
2545
+ return o2.then((e4) => {
2500
2546
  if (e4 && "boolean" == typeof e4.ok && !e4.ok) {
2501
- o2 = false;
2502
- const i3 = "function" == typeof t3.error ? (
2547
+ i2 = false;
2548
+ const o3 = "function" == typeof t3.error ? (
2503
2549
  // @ts-expect-error: Incorrect response type
2504
2550
  t3.error(`HTTP error! status: ${e4.status}`)
2505
2551
  ) : t3.error;
2506
2552
  create({
2507
2553
  id: n2,
2508
2554
  type: "error",
2509
- message: i3
2555
+ message: o3
2510
2556
  });
2511
2557
  } else if (void 0 !== t3.success) {
2512
- o2 = false;
2513
- const i3 = (
2558
+ i2 = false;
2559
+ const o3 = (
2514
2560
  // @ts-expect-error: TODO: Better function checking
2515
2561
  "function" == typeof t3.success ? t3.success(e4) : t3.success
2516
2562
  );
2517
2563
  create({
2518
2564
  id: n2,
2519
2565
  type: "success",
2520
- message: i3
2566
+ message: o3
2521
2567
  });
2522
2568
  }
2523
2569
  }).catch((e4) => {
2524
2570
  if (void 0 !== t3.error) {
2525
- o2 = false;
2526
- const i3 = (
2571
+ i2 = false;
2572
+ const o3 = (
2527
2573
  // @ts-expect-error: TODO: Better function checking
2528
2574
  "function" == typeof t3.error ? t3.error(e4) : t3.error
2529
2575
  );
2530
2576
  create({
2531
2577
  id: n2,
2532
2578
  type: "error",
2533
- message: i3
2579
+ message: o3
2534
2580
  });
2535
2581
  }
2536
2582
  }).finally(() => {
2537
2583
  var _a2;
2538
- o2 && // Toast is still in load state (and will be indefinitely — dismiss it)
2584
+ i2 && // Toast is still in load state (and will be indefinitely — dismiss it)
2539
2585
  (dismiss(n2), n2 = void 0), (_a2 = t3.finally) == null ? void 0 : _a2.call(t3);
2540
2586
  }), n2;
2541
2587
  },
2542
2588
  custom: function custom(e3, t3) {
2543
- const n2 = (t3 == null ? void 0 : t3.id) || Se++;
2589
+ const n2 = (t3 == null ? void 0 : t3.id) || Oe++;
2544
2590
  return create({
2545
2591
  component: e3,
2546
2592
  id: n2,
@@ -2561,27 +2607,27 @@ const Te = function createToastState() {
2561
2607
  heights: t2
2562
2608
  };
2563
2609
  }();
2564
- const Pe = function toastFunction(e2, t2) {
2565
- return Te.create({
2610
+ const je = function toastFunction(e2, t2) {
2611
+ return Ee.create({
2566
2612
  message: e2,
2567
2613
  ...t2
2568
2614
  });
2569
- }, Oe = Object.assign(Pe, {
2570
- success: Te.success,
2571
- info: Te.info,
2572
- warning: Te.warning,
2573
- error: Te.error,
2574
- custom: Te.custom,
2575
- message: Te.message,
2576
- promise: Te.promise,
2577
- dismiss: Te.dismiss,
2578
- loading: Te.loading
2615
+ }, Ne = Object.assign(je, {
2616
+ success: Ee.success,
2617
+ info: Ee.info,
2618
+ warning: Ee.warning,
2619
+ error: Ee.error,
2620
+ custom: Ee.custom,
2621
+ message: Ee.message,
2622
+ promise: Ee.promise,
2623
+ dismiss: Ee.dismiss,
2624
+ loading: Ee.loading
2579
2625
  });
2580
- var Ee = /* @__PURE__ */ template('<button aria-label="Close toast" data-close-button=""><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button>'), je = /* @__PURE__ */ template('<div data-icon=""><!> <!></div>'), Ne = /* @__PURE__ */ template('<div data-title=""><!></div>'), Be = /* @__PURE__ */ template('<div data-description=""><!></div>'), De = /* @__PURE__ */ template('<button data-button="" data-cancel=""> </button>'), We = /* @__PURE__ */ template('<button data-button=""> </button>'), ze = /* @__PURE__ */ template('<!> <div data-content=""><!> <!></div> <!> <!>', 1), Ae = /* @__PURE__ */ template('<li aria-atomic="true" role="status" data-sonner-toast=""><!> <!></li>');
2626
+ var Be = /* @__PURE__ */ template('<button aria-label="Close toast" data-close-button=""><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button>'), Ae = /* @__PURE__ */ template('<div data-icon=""><!> <!></div>'), De = /* @__PURE__ */ template('<div data-title=""><!></div>'), ze = /* @__PURE__ */ template('<div data-description=""><!></div>'), We = /* @__PURE__ */ template('<button data-button="" data-cancel=""> </button>'), Le = /* @__PURE__ */ template('<button data-button=""> </button>'), Fe = /* @__PURE__ */ template('<!> <div data-content=""><!> <!></div> <!> <!>', 1), Ge = /* @__PURE__ */ template('<li aria-atomic="true" role="status" data-sonner-toast=""><!> <!></li>');
2581
2627
  function Toast(e2, t2) {
2582
2628
  const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]);
2583
2629
  push(t2, false);
2584
- const [i2, o2] = setup_stores(), $heights = () => store_get(y2, "$heights", i2), $effect = () => store_get(get$1(Q2), "$effect", i2), s2 = mutable_state(void 0, true), a2 = mutable_state(void 0, true), l2 = mutable_state(void 0, true), c2 = mutable_state(void 0, true), u2 = mutable_state(void 0, true), d2 = mutable_state(void 0, true), f2 = mutable_state(void 0, true), p2 = mutable_state(void 0, true), _2 = mutable_state(void 0, true), v2 = mutable_state(void 0, true), g2 = mutable_state(void 0, true), h2 = mutable_state(void 0, true), m2 = {
2630
+ const [o2, i2] = setup_stores(), $heights = () => store_get(y2, "$heights", o2), $effect = () => store_get(get$1(Q2), "$effect", o2), s2 = mutable_state(void 0, true), a2 = mutable_state(void 0, true), l2 = mutable_state(void 0, true), c2 = mutable_state(void 0, true), u2 = mutable_state(void 0, true), f2 = mutable_state(void 0, true), d2 = mutable_state(void 0, true), p2 = mutable_state(void 0, true), _2 = mutable_state(void 0, true), v2 = mutable_state(void 0, true), g2 = mutable_state(void 0, true), h2 = mutable_state(void 0, true), m2 = {
2585
2631
  toast: "",
2586
2632
  title: "",
2587
2633
  description: "",
@@ -2596,10 +2642,10 @@ function Toast(e2, t2) {
2596
2642
  default: "",
2597
2643
  info: "",
2598
2644
  loading: ""
2599
- }, { toasts: b2, heights: y2, removeHeight: $2, setHeight: w2, remove: x2 } = Te;
2600
- let k2 = prop(t2, "toast", 9), C2 = prop(t2, "index", 9), M2 = prop(t2, "expanded", 9), q2 = prop(t2, "invert", 13), I2 = prop(t2, "position", 9), S2 = prop(t2, "visibleToasts", 9), T2 = prop(t2, "expandByDefault", 9), P2 = prop(t2, "closeButton", 9), O2 = prop(t2, "interacting", 9), E2 = prop(t2, "cancelButtonStyle", 9, ""), j2 = prop(t2, "actionButtonStyle", 9, ""), N2 = prop(t2, "duration", 9, 4e3), B2 = prop(t2, "descriptionClass", 9, ""), D2 = prop(t2, "classes", 29, () => ({})), W2 = prop(t2, "unstyled", 9, false), z2 = mutable_state(false, true), A2 = mutable_state(false, true), L2 = mutable_state(false, true), F2 = mutable_state(false, true), G2 = mutable_state(0, true), H2 = mutable_state(0, true), R2 = mutable_state(void 0, true), V2 = mutable_state(0, true), K2 = 0, U2 = 0, Z2 = null;
2645
+ }, { toasts: b2, heights: y2, removeHeight: $2, setHeight: w2, remove: x2 } = Ee;
2646
+ let k2 = prop(t2, "toast", 9), C2 = prop(t2, "index", 9), S2 = prop(t2, "expanded", 9), M2 = prop(t2, "invert", 13), q2 = prop(t2, "position", 9), I2 = prop(t2, "visibleToasts", 9), P2 = prop(t2, "expandByDefault", 9), T2 = prop(t2, "closeButton", 9), O2 = prop(t2, "interacting", 9), E2 = prop(t2, "cancelButtonStyle", 9, ""), j2 = prop(t2, "actionButtonStyle", 9, ""), N2 = prop(t2, "duration", 9, 4e3), B2 = prop(t2, "descriptionClass", 9, ""), A2 = prop(t2, "classes", 29, () => ({})), D2 = prop(t2, "unstyled", 9, false), z2 = mutable_state(false, true), W2 = mutable_state(false, true), L2 = mutable_state(false, true), F2 = mutable_state(false, true), G2 = mutable_state(0, true), H2 = mutable_state(0, true), R2 = mutable_state(void 0, true), V2 = mutable_state(0, true), K2 = 0, U2 = 0, Z2 = null;
2601
2647
  function deleteToast() {
2602
- set(A2, true), // Save the offset for the exit swipe animation
2648
+ set(W2, true), // Save the offset for the exit swipe animation
2603
2649
  set(G2, get$1(V2)), $2(k2().id), setTimeout(() => {
2604
2650
  x2(k2().id);
2605
2651
  }, 200);
@@ -2608,8 +2654,8 @@ function Toast(e2, t2) {
2608
2654
  function startTimer() {
2609
2655
  K2 = (/* @__PURE__ */ new Date()).getTime(), // Let the toast know it has started
2610
2656
  set(Y2, setTimeout(() => {
2611
- var _a2, _b;
2612
- (_b = (_a2 = k2()).onAutoClose) == null ? void 0 : _b.call(_a2, k2()), deleteToast();
2657
+ var _a2, _b2;
2658
+ (_b2 = (_a2 = k2()).onAutoClose) == null ? void 0 : _b2.call(_a2, k2()), deleteToast();
2613
2659
  }, get$1(J2)));
2614
2660
  }
2615
2661
  let Q2 = mutable_state(void 0, true);
@@ -2620,15 +2666,15 @@ function Toast(e2, t2) {
2620
2666
  toastId: k2().id,
2621
2667
  height: e3
2622
2668
  }), () => $2(k2().id);
2623
- }), legacy_pre_effect(() => deep_read_state(D2()), () => {
2624
- D2({
2669
+ }), legacy_pre_effect(() => deep_read_state(A2()), () => {
2670
+ A2({
2625
2671
  ...m2,
2626
- ...D2()
2672
+ ...A2()
2627
2673
  });
2628
2674
  }), legacy_pre_effect(() => deep_read_state(C2()), () => {
2629
2675
  set(s2, 0 === C2());
2630
- }), legacy_pre_effect(() => (deep_read_state(C2()), deep_read_state(S2())), () => {
2631
- set(a2, C2() + 1 <= S2());
2676
+ }), legacy_pre_effect(() => (deep_read_state(C2()), deep_read_state(I2())), () => {
2677
+ set(a2, C2() + 1 <= I2());
2632
2678
  }), legacy_pre_effect(() => deep_read_state(k2()), () => {
2633
2679
  set(l2, k2().title);
2634
2680
  }), legacy_pre_effect(() => deep_read_state(k2()), () => {
@@ -2636,20 +2682,20 @@ function Toast(e2, t2) {
2636
2682
  }), legacy_pre_effect(() => deep_read_state(k2()), () => {
2637
2683
  set(u2, k2().type);
2638
2684
  }), legacy_pre_effect(() => deep_read_state(k2()), () => {
2639
- set(d2, k2().class || "");
2685
+ set(f2, k2().class || "");
2640
2686
  }), legacy_pre_effect(() => deep_read_state(k2()), () => {
2641
- set(f2, k2().descriptionClass || "");
2687
+ set(d2, k2().descriptionClass || "");
2642
2688
  }), legacy_pre_effect(() => ($heights(), deep_read_state(k2())), () => {
2643
2689
  set(p2, $heights().findIndex((e3) => e3.toastId === k2().id) || 0);
2644
- }), legacy_pre_effect(() => deep_read_state(I2()), () => {
2645
- set(_2, I2().split("-"));
2690
+ }), legacy_pre_effect(() => deep_read_state(q2()), () => {
2691
+ set(_2, q2().split("-"));
2646
2692
  }), legacy_pre_effect(() => ($heights(), get$1(p2)), () => {
2647
2693
  set(v2, $heights().reduce((e3, t3, n3) => (
2648
2694
  // Calculate offset up untill current toast
2649
2695
  n3 >= get$1(p2) ? e3 : e3 + t3.height
2650
2696
  ), 0));
2651
- }), legacy_pre_effect(() => (deep_read_state(q2()), deep_read_state(k2())), () => {
2652
- q2(k2().invert || q2());
2697
+ }), legacy_pre_effect(() => (deep_read_state(M2()), deep_read_state(k2())), () => {
2698
+ M2(k2().invert || M2());
2653
2699
  }), legacy_pre_effect(() => get$1(u2), () => {
2654
2700
  set(g2, "loading" === get$1(u2));
2655
2701
  }), legacy_pre_effect(() => (get$1(p2), get$1(v2)), () => {
@@ -2659,13 +2705,13 @@ function Toast(e2, t2) {
2659
2705
  async function updateHeights() {
2660
2706
  if (!get$1(z2)) return;
2661
2707
  let e3;
2662
- await tick(), e3 = M2() || T2() ? 1 : 1 - 0.05 * C2(), get$1(R2).style.setProperty("height", "auto");
2663
- const t3 = get$1(R2).offsetHeight, n3 = get$1(R2).getBoundingClientRect().height, i3 = Math.round(100 * (n3 / e3 + Number.EPSILON)) / 100;
2664
- let o3;
2708
+ await tick(), e3 = S2() || P2() ? 1 : 1 - 0.05 * C2(), get$1(R2).style.setProperty("height", "auto");
2709
+ const t3 = get$1(R2).offsetHeight, n3 = get$1(R2).getBoundingClientRect().height, o3 = Math.round(100 * (n3 / e3 + Number.EPSILON)) / 100;
2710
+ let i3;
2665
2711
  get$1(R2).style.removeProperty("height"), // Use scaledRectHeight as it's more precise
2666
- o3 = Math.abs(i3 - t3) < 1 ? i3 : t3, set(H2, o3), w2({
2712
+ i3 = Math.abs(o3 - t3) < 1 ? o3 : t3, set(H2, i3), w2({
2667
2713
  toastId: k2().id,
2668
- height: o3
2714
+ height: i3
2669
2715
  });
2670
2716
  }();
2671
2717
  }), legacy_pre_effect(() => (deep_read_state(k2()), get$1(Y2), deep_read_state(N2())), () => {
@@ -2675,13 +2721,13 @@ function Toast(e2, t2) {
2675
2721
  (clearTimeout(get$1(Y2)), set(J2, k2().duration || N2() || 4e3), startTimer());
2676
2722
  }), legacy_pre_effect(() => (deep_read_state(k2()), get$1(u2)), () => {
2677
2723
  set(h2, k2().promise && "loading" === get$1(u2) || k2().duration === Number.POSITIVE_INFINITY);
2678
- }), legacy_pre_effect(() => (get$1(h2), deep_read_state(M2()), deep_read_state(O2()), get$1(Y2)), () => {
2724
+ }), legacy_pre_effect(() => (get$1(h2), deep_read_state(S2()), deep_read_state(O2()), get$1(Y2)), () => {
2679
2725
  var e3;
2680
2726
  !function store_unsub(e4, t3, n3) {
2681
- let i3 = n3[t3];
2682
- return i3 && i3.store !== e4 && // Don't reset store yet, so that store_get above can resubscribe to new store if necessary
2683
- (i3.unsubscribe(), i3.unsubscribe = noop), e4;
2684
- }(set(Q2, (e3 = () => (get$1(h2) || (M2() || O2() ? (
2727
+ let o3 = n3[t3];
2728
+ return o3 && o3.store !== e4 && // Don't reset store yet, so that store_get above can resubscribe to new store if necessary
2729
+ (o3.unsubscribe(), o3.unsubscribe = noop), e4;
2730
+ }(set(Q2, (e3 = () => (get$1(h2) || (S2() || O2() ? (
2685
2731
  // If toast's duration changes, it will be out of sync with the
2686
2732
  // remainingAtTimeout, so we know we need to restart the timer
2687
2733
  // with the new duration
@@ -2695,33 +2741,34 @@ function Toast(e2, t2) {
2695
2741
  }()
2696
2742
  ) : startTimer()), () => clearTimeout(get$1(Y2))), {
2697
2743
  subscribe: e3
2698
- })), "$effect", i2);
2744
+ })), "$effect", o2);
2699
2745
  }), legacy_pre_effect(() => $effect(), () => {
2700
2746
  $effect();
2701
2747
  }), legacy_pre_effect(() => deep_read_state(k2()), () => {
2702
2748
  k2().delete && deleteToast();
2703
2749
  }), legacy_pre_effect_reset(), init(true);
2704
- var ee2 = Ae();
2750
+ var ee2 = Ge();
2751
+ let te2;
2705
2752
  set_attribute(ee2, "tabindex", 0);
2706
- var te2 = child(ee2), consequent = (e3) => {
2707
- var t3 = Ee();
2753
+ var ne2 = child(ee2), consequent = (e3) => {
2754
+ var t3 = Be();
2708
2755
  template_effect((e4) => {
2709
- set_attribute(t3, "data-disabled", get$1(g2)), set_class(t3, 1, clsx(e4));
2756
+ set_attribute(t3, "data-disabled", get$1(g2)), set_class(t3, 1, e4);
2710
2757
  }, [() => {
2711
- var _a2, _b, _c;
2712
- return cn((_a2 = D2()) == null ? void 0 : _a2.closeButton, (_c = (_b = k2()) == null ? void 0 : _b.classes) == null ? void 0 : _c.closeButton);
2758
+ var _a2, _b2, _c2;
2759
+ return clsx(cn((_a2 = A2()) == null ? void 0 : _a2.closeButton, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.closeButton));
2713
2760
  }], derived_safe_equal), event("click", t3, function(...e4) {
2714
2761
  var _a2;
2715
2762
  (_a2 = get$1(g2) ? void 0 : () => {
2716
- var _a3, _b;
2717
- deleteToast(), (_b = (_a3 = k2()).onDismiss) == null ? void 0 : _b.call(_a3, k2());
2763
+ var _a3, _b2;
2764
+ deleteToast(), (_b2 = (_a3 = k2()).onDismiss) == null ? void 0 : _b2.call(_a3, k2());
2718
2765
  }) == null ? void 0 : _a2.apply(this, e4);
2719
2766
  }), append(e3, t3);
2720
2767
  };
2721
- if_block(te2, (e3) => {
2722
- P2() && !k2().component && e3(consequent);
2768
+ if_block(ne2, (e3) => {
2769
+ T2() && !k2().component && e3(consequent);
2723
2770
  });
2724
- var ne2 = sibling(te2, 2), consequent_1 = (e3) => {
2771
+ var re2 = sibling(ne2, 2), consequent_1 = (e3) => {
2725
2772
  var t3 = comment();
2726
2773
  component(first_child(t3), () => k2().component, (e4, t4) => {
2727
2774
  t4(e4, spread_props(() => k2().componentProps, {
@@ -2730,107 +2777,107 @@ function Toast(e2, t2) {
2730
2777
  }
2731
2778
  }));
2732
2779
  }), append(e3, t3);
2733
- }, alternate_6 = (e3) => {
2734
- var n3 = ze(), i3 = first_child(n3), consequent_8 = (e4) => {
2735
- var n4 = je(), i4 = child(n4), consequent_2 = (e5) => {
2780
+ }, alternate = (e3) => {
2781
+ var n3 = Fe(), o3 = first_child(n3), consequent_8 = (e4) => {
2782
+ var n4 = Ae(), o4 = child(n4), consequent_2 = (e5) => {
2736
2783
  var n5 = comment();
2737
2784
  slot(first_child(n5), t2, "loading-icon", {}, null), append(e5, n5);
2738
2785
  };
2739
- if_block(i4, (e5) => {
2786
+ if_block(o4, (e5) => {
2740
2787
  !k2().promise && "loading" !== get$1(u2) || k2().icon || e5(consequent_2);
2741
2788
  });
2742
- var o4 = sibling(i4, 2), consequent_3 = (e5) => {
2789
+ var i4 = sibling(o4, 2), consequent_3 = (e5) => {
2743
2790
  var t3 = comment();
2744
2791
  component(first_child(t3), () => k2().icon, (e6, t4) => {
2745
2792
  t4(e6, {});
2746
2793
  }), append(e5, t3);
2747
- }, alternate_3 = (e5) => {
2748
- var n5 = comment(), i5 = first_child(n5), consequent_4 = (e6) => {
2794
+ }, alternate_1 = (e5, n5) => {
2795
+ var consequent_4 = (e6) => {
2749
2796
  var n6 = comment();
2750
2797
  slot(first_child(n6), t2, "success-icon", {}, null), append(e6, n6);
2751
- }, alternate_2 = (e6) => {
2752
- var n6 = comment(), i6 = first_child(n6), consequent_5 = (e7) => {
2798
+ }, alternate_2 = (e6, n6) => {
2799
+ var consequent_5 = (e7) => {
2753
2800
  var n7 = comment();
2754
2801
  slot(first_child(n7), t2, "error-icon", {}, null), append(e7, n7);
2755
- }, alternate_1 = (e7) => {
2756
- var n7 = comment(), i7 = first_child(n7), consequent_6 = (e8) => {
2802
+ }, alternate_3 = (e7, n7) => {
2803
+ var consequent_6 = (e8) => {
2757
2804
  var n8 = comment();
2758
2805
  slot(first_child(n8), t2, "warning-icon", {}, null), append(e8, n8);
2759
- }, alternate = (e8) => {
2760
- var n8 = comment(), i8 = first_child(n8), consequent_7 = (e9) => {
2806
+ }, alternate_4 = (e8, n8) => {
2807
+ var consequent_7 = (e9) => {
2761
2808
  var n9 = comment();
2762
2809
  slot(first_child(n9), t2, "info-icon", {}, null), append(e9, n9);
2763
2810
  };
2764
- if_block(i8, (e9) => {
2811
+ if_block(e8, (e9) => {
2765
2812
  "info" === get$1(u2) && e9(consequent_7);
2766
- }, true), append(e8, n8);
2813
+ }, n8);
2767
2814
  };
2768
- if_block(i7, (e8) => {
2769
- "warning" === get$1(u2) ? e8(consequent_6) : e8(alternate, false);
2770
- }, true), append(e7, n7);
2815
+ if_block(e7, (e8) => {
2816
+ "warning" === get$1(u2) ? e8(consequent_6) : e8(alternate_4, false);
2817
+ }, n7);
2771
2818
  };
2772
- if_block(i6, (e7) => {
2773
- "error" === get$1(u2) ? e7(consequent_5) : e7(alternate_1, false);
2774
- }, true), append(e6, n6);
2819
+ if_block(e6, (e7) => {
2820
+ "error" === get$1(u2) ? e7(consequent_5) : e7(alternate_3, false);
2821
+ }, n6);
2775
2822
  };
2776
- if_block(i5, (e6) => {
2823
+ if_block(e5, (e6) => {
2777
2824
  "success" === get$1(u2) ? e6(consequent_4) : e6(alternate_2, false);
2778
- }, true), append(e5, n5);
2825
+ }, n5);
2779
2826
  };
2780
- if_block(o4, (e5) => {
2781
- k2().icon ? e5(consequent_3) : e5(alternate_3, false);
2827
+ if_block(i4, (e5) => {
2828
+ k2().icon ? e5(consequent_3) : e5(alternate_1, false);
2782
2829
  }), append(e4, n4);
2783
2830
  };
2784
- if_block(i3, (e4) => {
2831
+ if_block(o3, (e4) => {
2785
2832
  ("default" !== get$1(u2) || k2().icon || k2().promise) && e4(consequent_8);
2786
2833
  });
2787
- var o3 = sibling(i3, 2), s3 = child(o3), consequent_10 = (e4) => {
2788
- var t3 = Ne(), n4 = child(t3), consequent_9 = (e5) => {
2834
+ var i3 = sibling(o3, 2), s3 = child(i3), consequent_10 = (e4) => {
2835
+ var t3 = De(), n4 = child(t3), consequent_9 = (e5) => {
2789
2836
  var t4 = comment();
2790
2837
  component(first_child(t4), () => k2().title, (e6, t5) => {
2791
2838
  t5(e6, spread_props(() => k2().componentProps));
2792
2839
  }), append(e5, t4);
2793
- }, alternate_4 = (e5) => {
2840
+ }, alternate_5 = (e5) => {
2794
2841
  var t4 = text();
2795
2842
  template_effect(() => set_text(t4, k2().title)), append(e5, t4);
2796
2843
  };
2797
2844
  if_block(n4, (e5) => {
2798
- "string" != typeof k2().title ? e5(consequent_9) : e5(alternate_4, false);
2799
- }), template_effect((e5) => set_class(t3, 1, clsx(e5)), [() => {
2800
- var _a2, _b, _c;
2801
- return cn((_a2 = D2()) == null ? void 0 : _a2.title, (_c = (_b = k2()) == null ? void 0 : _b.classes) == null ? void 0 : _c.title);
2845
+ "string" != typeof k2().title ? e5(consequent_9) : e5(alternate_5, false);
2846
+ }), template_effect((e5) => set_class(t3, 1, e5), [() => {
2847
+ var _a2, _b2, _c2;
2848
+ return clsx(cn((_a2 = A2()) == null ? void 0 : _a2.title, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.title));
2802
2849
  }], derived_safe_equal), append(e4, t3);
2803
2850
  };
2804
2851
  if_block(s3, (e4) => {
2805
2852
  k2().title && e4(consequent_10);
2806
2853
  });
2807
2854
  var a3 = sibling(s3, 2), consequent_12 = (e4) => {
2808
- var t3 = Be(), n4 = child(t3), consequent_11 = (e5) => {
2855
+ var t3 = ze(), n4 = child(t3), consequent_11 = (e5) => {
2809
2856
  var t4 = comment();
2810
2857
  component(first_child(t4), () => k2().description, (e6, t5) => {
2811
2858
  t5(e6, spread_props(() => k2().componentProps));
2812
2859
  }), append(e5, t4);
2813
- }, alternate_5 = (e5) => {
2860
+ }, alternate_6 = (e5) => {
2814
2861
  var t4 = text();
2815
2862
  template_effect(() => set_text(t4, k2().description)), append(e5, t4);
2816
2863
  };
2817
2864
  if_block(n4, (e5) => {
2818
- "string" != typeof k2().description ? e5(consequent_11) : e5(alternate_5, false);
2819
- }), template_effect((e5) => set_class(t3, 1, clsx(e5)), [() => {
2820
- var _a2, _b;
2821
- return cn(B2(), get$1(f2), (_a2 = D2()) == null ? void 0 : _a2.description, (_b = k2().classes) == null ? void 0 : _b.description);
2865
+ "string" != typeof k2().description ? e5(consequent_11) : e5(alternate_6, false);
2866
+ }), template_effect((e5) => set_class(t3, 1, e5), [() => {
2867
+ var _a2, _b2;
2868
+ return clsx(cn(B2(), get$1(d2), (_a2 = A2()) == null ? void 0 : _a2.description, (_b2 = k2().classes) == null ? void 0 : _b2.description));
2822
2869
  }], derived_safe_equal), append(e4, t3);
2823
2870
  };
2824
2871
  if_block(a3, (e4) => {
2825
2872
  k2().description && e4(consequent_12);
2826
2873
  });
2827
- var l3 = sibling(o3, 2), consequent_13 = (e4) => {
2828
- var t3 = De(), n4 = child(t3);
2874
+ var l3 = sibling(i3, 2), consequent_13 = (e4) => {
2875
+ var t3 = We(), n4 = child(t3);
2829
2876
  template_effect((e5) => {
2830
- set_attribute(t3, "style", E2()), set_class(t3, 1, clsx(e5)), set_text(n4, k2().cancel.label);
2877
+ set_style(t3, E2()), set_class(t3, 1, e5), set_text(n4, k2().cancel.label);
2831
2878
  }, [() => {
2832
- var _a2, _b, _c;
2833
- return cn((_a2 = D2()) == null ? void 0 : _a2.cancelButton, (_c = (_b = k2()) == null ? void 0 : _b.classes) == null ? void 0 : _c.cancelButton);
2879
+ var _a2, _b2, _c2;
2880
+ return clsx(cn((_a2 = A2()) == null ? void 0 : _a2.cancelButton, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.cancelButton));
2834
2881
  }], derived_safe_equal), event("click", t3, () => {
2835
2882
  var _a2;
2836
2883
  deleteToast(), ((_a2 = k2().cancel) == null ? void 0 : _a2.onClick) && k2().cancel.onClick();
@@ -2840,12 +2887,12 @@ function Toast(e2, t2) {
2840
2887
  k2().cancel && e4(consequent_13);
2841
2888
  });
2842
2889
  var c3 = sibling(l3, 2), consequent_14 = (e4) => {
2843
- var t3 = We(), n4 = child(t3);
2890
+ var t3 = Le(), n4 = child(t3);
2844
2891
  template_effect((e5) => {
2845
- set_attribute(t3, "style", j2()), set_class(t3, 1, clsx(e5)), set_text(n4, k2().action.label);
2892
+ set_style(t3, j2()), set_class(t3, 1, e5), set_text(n4, k2().action.label);
2846
2893
  }, [() => {
2847
- var _a2, _b, _c;
2848
- return cn((_a2 = D2()) == null ? void 0 : _a2.actionButton, (_c = (_b = k2()) == null ? void 0 : _b.classes) == null ? void 0 : _c.actionButton);
2894
+ var _a2, _b2, _c2;
2895
+ return clsx(cn((_a2 = A2()) == null ? void 0 : _a2.actionButton, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.actionButton));
2849
2896
  }], derived_safe_equal), event("click", t3, (e5) => {
2850
2897
  var _a2;
2851
2898
  (_a2 = k2().action) == null ? void 0 : _a2.onClick(e5), e5.defaultPrevented || deleteToast();
@@ -2855,15 +2902,21 @@ function Toast(e2, t2) {
2855
2902
  k2().action && e4(consequent_14);
2856
2903
  }), append(e3, n3);
2857
2904
  };
2858
- if_block(ne2, (e3) => {
2859
- k2().component ? e3(consequent_1) : e3(alternate_6, false);
2860
- }), bind_this(ee2, (e3) => set(R2, e3), () => get$1(R2)), template_effect((e3, t3, o3) => {
2905
+ if_block(re2, (e3) => {
2906
+ k2().component ? e3(consequent_1) : e3(alternate, false);
2907
+ }), bind_this(ee2, (e3) => set(R2, e3), () => get$1(R2)), template_effect((e3, t3, i3) => {
2861
2908
  var _a2;
2862
- set_attribute(ee2, "aria-live", k2().important ? "assertive" : "polite"), set_class(ee2, 1, clsx(e3)), set_attribute(ee2, "data-styled", !(k2().component || ((_a2 = k2()) == null ? void 0 : _a2.unstyled) || W2())), set_attribute(ee2, "data-mounted", get$1(z2)), set_attribute(ee2, "data-promise", t3), set_attribute(ee2, "data-removed", get$1(A2)), set_attribute(ee2, "data-visible", get$1(a2)), set_attribute(ee2, "data-y-position", get$1(_2)[0]), set_attribute(ee2, "data-x-position", get$1(_2)[1]), set_attribute(ee2, "data-index", C2()), set_attribute(ee2, "data-front", get$1(s2)), set_attribute(ee2, "data-swiping", get$1(L2)), set_attribute(ee2, "data-type", get$1(u2)), set_attribute(ee2, "data-invert", q2()), set_attribute(ee2, "data-swipe-out", get$1(F2)), set_attribute(ee2, "data-expanded", o3), set_attribute(ee2, "style", `${n2.style} ${k2().style}`), set_style(ee2, "--index", C2()), set_style(ee2, "--toasts-before", C2()), set_style(ee2, "--z-index", store_get(b2, "$toasts", i2).length - C2()), set_style(ee2, "--offset", `${get$1(A2) ? get$1(G2) : get$1(V2)}px`), set_style(ee2, "--initial-height", `${get$1(H2)}px`);
2909
+ set_attribute(ee2, "aria-live", k2().important ? "assertive" : "polite"), set_class(ee2, 1, e3), set_attribute(ee2, "data-styled", !(k2().component || ((_a2 = k2()) == null ? void 0 : _a2.unstyled) || D2())), set_attribute(ee2, "data-mounted", get$1(z2)), set_attribute(ee2, "data-promise", t3), set_attribute(ee2, "data-removed", get$1(W2)), set_attribute(ee2, "data-visible", get$1(a2)), set_attribute(ee2, "data-y-position", get$1(_2)[0]), set_attribute(ee2, "data-x-position", get$1(_2)[1]), set_attribute(ee2, "data-index", C2()), set_attribute(ee2, "data-front", get$1(s2)), set_attribute(ee2, "data-swiping", get$1(L2)), set_attribute(ee2, "data-type", get$1(u2)), set_attribute(ee2, "data-invert", M2()), set_attribute(ee2, "data-swipe-out", get$1(F2)), set_attribute(ee2, "data-expanded", i3), te2 = set_style(ee2, `${n2.style} ${k2().style}`, te2, {
2910
+ "--index": C2(),
2911
+ "--toasts-before": C2(),
2912
+ "--z-index": store_get(b2, "$toasts", o2).length - C2(),
2913
+ "--offset": `${get$1(W2) ? get$1(G2) : get$1(V2)}px`,
2914
+ "--initial-height": `${get$1(H2)}px`
2915
+ });
2863
2916
  }, [() => {
2864
- var _a2, _b, _c, _d, _e2, _f;
2865
- return cn(n2.class, get$1(d2), (_a2 = D2()) == null ? void 0 : _a2.toast, (_c = (_b = k2()) == null ? void 0 : _b.classes) == null ? void 0 : _c.toast, (_d = D2()) == null ? void 0 : _d[get$1(u2)], (_f = (_e2 = k2()) == null ? void 0 : _e2.classes) == null ? void 0 : _f[get$1(u2)]);
2866
- }, () => Boolean(k2().promise), () => Boolean(M2() || T2() && get$1(z2))], derived_safe_equal), event("pointerdown", ee2, function onPointerDown(e3) {
2917
+ var _a2, _b2, _c2, _d, _e2, _f;
2918
+ return clsx(cn(n2.class, get$1(f2), (_a2 = A2()) == null ? void 0 : _a2.toast, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.toast, (_d = A2()) == null ? void 0 : _d[get$1(u2)], (_f = (_e2 = k2()) == null ? void 0 : _e2.classes) == null ? void 0 : _f[get$1(u2)]));
2919
+ }, () => Boolean(k2().promise), () => Boolean(S2() || P2() && get$1(z2))], derived_safe_equal), event("pointerdown", ee2, function onPointerDown(e3) {
2867
2920
  if (get$1(g2)) return;
2868
2921
  set(G2, get$1(V2));
2869
2922
  const t3 = e3.target;
@@ -2872,36 +2925,36 @@ function Toast(e2, t2) {
2872
2925
  y: e3.clientY
2873
2926
  });
2874
2927
  }), event("pointerup", ee2, function onPointerUp() {
2875
- var _a2, _b, _c;
2928
+ var _a2, _b2, _c2;
2876
2929
  if (get$1(F2)) return;
2877
2930
  Z2 = null;
2878
2931
  const e3 = Number(((_a2 = get$1(R2)) == null ? void 0 : _a2.style.getPropertyValue("--swipe-amount").replace("px", "")) || 0);
2879
- if (Math.abs(e3) >= 20) return set(G2, get$1(V2)), (_c = (_b = k2()).onDismiss) == null ? void 0 : _c.call(_b, k2()), deleteToast(), void set(F2, true);
2932
+ if (Math.abs(e3) >= 20) return set(G2, get$1(V2)), (_c2 = (_b2 = k2()).onDismiss) == null ? void 0 : _c2.call(_b2, k2()), deleteToast(), void set(F2, true);
2880
2933
  get$1(R2).style.setProperty("--swipe-amount", "0px"), set(L2, false);
2881
2934
  }), event("pointermove", ee2, function onPointerMove(e3) {
2882
2935
  if (!Z2) return;
2883
- const t3 = e3.clientY - Z2.y, n3 = e3.clientX - Z2.x, i3 = ("top" === get$1(_2)[0] ? Math.min : Math.max)(0, t3), o3 = "touch" === e3.pointerType ? 10 : 2;
2884
- Math.abs(i3) > o3 ? get$1(R2).style.setProperty("--swipe-amount", `${t3}px`) : Math.abs(n3) > o3 && // User is swiping in wrong direction so we disable swipe gesture
2936
+ const t3 = e3.clientY - Z2.y, n3 = e3.clientX - Z2.x, o3 = ("top" === get$1(_2)[0] ? Math.min : Math.max)(0, t3), i3 = "touch" === e3.pointerType ? 10 : 2;
2937
+ Math.abs(o3) > i3 ? get$1(R2).style.setProperty("--swipe-amount", `${t3}px`) : Math.abs(n3) > i3 && // User is swiping in wrong direction so we disable swipe gesture
2885
2938
  // for the current pointer down interaction
2886
2939
  (Z2 = null);
2887
- }), append(e2, ee2), pop(), o2();
2940
+ }), append(e2, ee2), pop(), i2();
2888
2941
  }
2889
- var Le = /* @__PURE__ */ template("<ol></ol>"), Fe = /* @__PURE__ */ template('<section class="svelte-1fo5d1m"></section>');
2942
+ var He = /* @__PURE__ */ template("<ol></ol>"), Re = /* @__PURE__ */ template('<section class="svelte-1fo5d1m"></section>');
2890
2943
  function Toaster(e2, t2) {
2891
- const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]), i2 = legacy_rest_props(n2, ["invert", "theme", "position", "hotkey", "containerAriaLabel", "richColors", "expand", "duration", "visibleToasts", "closeButton", "toastOptions", "offset", "dir"]);
2944
+ const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]), o2 = legacy_rest_props(n2, ["invert", "theme", "position", "hotkey", "containerAriaLabel", "richColors", "expand", "duration", "visibleToasts", "closeButton", "toastOptions", "offset", "dir"]);
2892
2945
  push(t2, false);
2893
- const [o2, s2] = setup_stores(), $toasts = () => store_get(k2, "$toasts", o2), a2 = mutable_state(), l2 = mutable_state(), c2 = "dark", u2 = "light";
2946
+ const [i2, s2] = setup_stores(), $toasts = () => store_get(k2, "$toasts", i2), a2 = mutable_state(), l2 = mutable_state(), c2 = "dark", u2 = "light";
2894
2947
  function getDocumentDirection() {
2895
2948
  if ("undefined" == typeof window) return "ltr";
2896
2949
  if ("undefined" == typeof document) return "ltr";
2897
2950
  const e3 = document.documentElement.getAttribute("dir");
2898
2951
  return "auto" !== e3 && e3 ? e3 : window.getComputedStyle(document.documentElement).direction;
2899
2952
  }
2900
- let d2 = prop(t2, "invert", 8, false), f2 = prop(t2, "theme", 8, "light"), p2 = prop(t2, "position", 8, "bottom-right"), _2 = prop(t2, "hotkey", 24, () => ["altKey", "KeyT"]), v2 = prop(t2, "containerAriaLabel", 8, "Notifications"), g2 = prop(t2, "richColors", 8, false), h2 = prop(t2, "expand", 8, false), m2 = prop(t2, "duration", 8, 4e3), b2 = prop(t2, "visibleToasts", 8, 3), y2 = prop(t2, "closeButton", 8, false), $2 = prop(t2, "toastOptions", 24, () => ({})), w2 = prop(t2, "offset", 8, null), x2 = prop(t2, "dir", 24, getDocumentDirection);
2901
- const { toasts: k2, heights: C2, reset: M2 } = Te;
2902
- let q2 = mutable_state(false), S2 = mutable_state(false), T2 = mutable_state(function getInitialTheme(e3) {
2953
+ let f2 = prop(t2, "invert", 8, false), d2 = prop(t2, "theme", 8, "light"), p2 = prop(t2, "position", 8, "bottom-right"), _2 = prop(t2, "hotkey", 24, () => ["altKey", "KeyT"]), v2 = prop(t2, "containerAriaLabel", 8, "Notifications"), g2 = prop(t2, "richColors", 8, false), h2 = prop(t2, "expand", 8, false), m2 = prop(t2, "duration", 8, 4e3), b2 = prop(t2, "visibleToasts", 8, 3), y2 = prop(t2, "closeButton", 8, false), $2 = prop(t2, "toastOptions", 24, () => ({})), w2 = prop(t2, "offset", 8, null), x2 = prop(t2, "dir", 24, getDocumentDirection);
2954
+ const { toasts: k2, heights: C2, reset: S2 } = Ee;
2955
+ let M2 = mutable_state(false), I2 = mutable_state(false), P2 = mutable_state(function getInitialTheme(e3) {
2903
2956
  return "system" !== e3 ? e3 : "undefined" != typeof window && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? c2 : u2;
2904
- }(f2())), P2 = mutable_state(), O2 = null, E2 = false;
2957
+ }(d2())), T2 = mutable_state(), O2 = null, E2 = false;
2905
2958
  function handleBlur(e3) {
2906
2959
  E2 && !e3.currentTarget.contains(e3.relatedTarget) && (E2 = false, O2 && (O2.focus({
2907
2960
  preventScroll: true
@@ -2911,19 +2964,19 @@ function Toaster(e2, t2) {
2911
2964
  E2 || (E2 = true, O2 = e3.relatedTarget);
2912
2965
  }
2913
2966
  !function onDestroy(e3) {
2914
- null === I && lifecycle_outside_component(), onMount(() => () => untrack(e3));
2967
+ null === q && lifecycle_outside_component(), onMount(() => () => untrack(e3));
2915
2968
  }(() => {
2916
- get$1(P2) && O2 && (O2.focus({
2969
+ get$1(T2) && O2 && (O2.focus({
2917
2970
  preventScroll: true
2918
2971
  }), O2 = null, E2 = false);
2919
2972
  }), onMount(() => {
2920
- M2();
2973
+ S2();
2921
2974
  const handleKeydown = (e3) => {
2922
- var _a2, _b;
2975
+ var _a2, _b2;
2923
2976
  _2().every((t3) => (
2924
2977
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2925
2978
  e3[t3] || e3.code === t3
2926
- )) && (set(q2, true), (_a2 = get$1(P2)) == null ? void 0 : _a2.focus()), "Escape" !== e3.code || document.activeElement !== get$1(P2) && !((_b = get$1(P2)) == null ? void 0 : _b.contains(document.activeElement)) || set(q2, false);
2979
+ )) && (set(M2, true), (_a2 = get$1(T2)) == null ? void 0 : _a2.focus()), "Escape" !== e3.code || document.activeElement !== get$1(T2) && !((_b2 = get$1(T2)) == null ? void 0 : _b2.contains(document.activeElement)) || set(M2, false);
2927
2980
  };
2928
2981
  return document.addEventListener("keydown", handleKeydown), () => {
2929
2982
  document.removeEventListener("keydown", handleKeydown);
@@ -2933,7 +2986,7 @@ function Toaster(e2, t2) {
2933
2986
  }), legacy_pre_effect(() => deep_read_state(_2()), () => {
2934
2987
  set(l2, _2().join("+").replace(/Key/g, "").replace(/Digit/g, ""));
2935
2988
  }), legacy_pre_effect(() => $toasts(), () => {
2936
- $toasts().length <= 1 && set(q2, false);
2989
+ $toasts().length <= 1 && set(M2, false);
2937
2990
  }), legacy_pre_effect(() => $toasts(), () => {
2938
2991
  const e3 = $toasts().filter((e4) => e4.dismiss && !e4.delete);
2939
2992
  if (e3.length > 0) {
@@ -2943,18 +2996,18 @@ function Toaster(e2, t2) {
2943
2996
  } : t4);
2944
2997
  k2.set(t3);
2945
2998
  }
2946
- }), legacy_pre_effect(() => deep_read_state(f2()), () => {
2947
- if ("system" !== f2() && set(T2, f2()), "undefined" != typeof window) {
2948
- "system" === f2() && // check if current preference is dark
2999
+ }), legacy_pre_effect(() => deep_read_state(d2()), () => {
3000
+ if ("system" !== d2() && set(P2, d2()), "undefined" != typeof window) {
3001
+ "system" === d2() && // check if current preference is dark
2949
3002
  (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? (
2950
3003
  // it's currently dark
2951
- set(T2, c2)
3004
+ set(P2, c2)
2952
3005
  ) : (
2953
3006
  // it's not dark
2954
- set(T2, u2)
3007
+ set(P2, u2)
2955
3008
  ));
2956
3009
  const e3 = window.matchMedia("(prefers-color-scheme: dark)"), changeHandler = ({ matches: e4 }) => {
2957
- set(T2, e4 ? c2 : u2);
3010
+ set(P2, e4 ? c2 : u2);
2958
3011
  };
2959
3012
  "addEventListener" in e3 ? e3.addEventListener("change", changeHandler) : (
2960
3013
  // @ts-expect-error deprecated API
@@ -2963,11 +3016,11 @@ function Toaster(e2, t2) {
2963
3016
  }
2964
3017
  }), legacy_pre_effect_reset(), init();
2965
3018
  var j2 = comment(), N2 = first_child(j2), consequent = (e3) => {
2966
- var s3 = Fe();
3019
+ var s3 = Re();
2967
3020
  set_attribute(s3, "tabindex", -1), each(s3, 5, () => get$1(a2), index, (e4, s4, a3, l3) => {
2968
- var c3 = Le();
3021
+ var c3 = He();
2969
3022
  let u3;
2970
- each(c3, 7, () => $toasts().filter((e5) => !e5.position && 0 === a3 || e5.position === get$1(s4)), (e5) => e5.id, (e5, n3, i3, o3) => {
3023
+ each(c3, 7, () => $toasts().filter((e5) => !e5.position && 0 === a3 || e5.position === get$1(s4)), (e5) => e5.id, (e5, n3, o3, i3) => {
2971
3024
  const a4 = /* @__PURE__ */ derived_safe_equal(() => {
2972
3025
  var _a2;
2973
3026
  return ((_a2 = $2()) == null ? void 0 : _a2.actionButtonStyle) || "";
@@ -2980,19 +3033,19 @@ function Toaster(e2, t2) {
2980
3033
  }), u4 = /* @__PURE__ */ derived_safe_equal(() => {
2981
3034
  var _a2;
2982
3035
  return ((_a2 = $2()) == null ? void 0 : _a2.descriptionClass) || "";
2983
- }), f3 = /* @__PURE__ */ derived_safe_equal(() => $2().classes || {}), p3 = /* @__PURE__ */ derived_safe_equal(() => {
3036
+ }), d3 = /* @__PURE__ */ derived_safe_equal(() => $2().classes || {}), p3 = /* @__PURE__ */ derived_safe_equal(() => {
2984
3037
  var _a2;
2985
3038
  return ((_a2 = $2()) == null ? void 0 : _a2.duration) ?? m2();
2986
3039
  }), _3 = /* @__PURE__ */ derived_safe_equal(() => $2().unstyled || false);
2987
3040
  Toast(e5, {
2988
3041
  get index() {
2989
- return get$1(i3);
3042
+ return get$1(o3);
2990
3043
  },
2991
3044
  get toast() {
2992
3045
  return get$1(n3);
2993
3046
  },
2994
3047
  get invert() {
2995
- return d2();
3048
+ return f2();
2996
3049
  },
2997
3050
  get visibleToasts() {
2998
3051
  return b2();
@@ -3001,7 +3054,7 @@ function Toaster(e2, t2) {
3001
3054
  return y2();
3002
3055
  },
3003
3056
  get interacting() {
3004
- return get$1(S2);
3057
+ return get$1(I2);
3005
3058
  },
3006
3059
  get position() {
3007
3060
  return get$1(s4);
@@ -3010,7 +3063,7 @@ function Toaster(e2, t2) {
3010
3063
  return h2();
3011
3064
  },
3012
3065
  get expanded() {
3013
- return get$1(q2);
3066
+ return get$1(M2);
3014
3067
  },
3015
3068
  get actionButtonStyle() {
3016
3069
  return get$1(a4);
@@ -3025,7 +3078,7 @@ function Toaster(e2, t2) {
3025
3078
  return get$1(u4);
3026
3079
  },
3027
3080
  get classes() {
3028
- return get$1(f3);
3081
+ return get$1(d3);
3029
3082
  },
3030
3083
  get duration() {
3031
3084
  return get$1(p3);
@@ -3034,75 +3087,81 @@ function Toaster(e2, t2) {
3034
3087
  return get$1(_3);
3035
3088
  },
3036
3089
  $$slots: {
3037
- "loading-icon": (e6, i4) => {
3038
- var o4 = comment();
3039
- slot(first_child(o4), t2, "loading-icon", {}, (e7) => {
3090
+ "loading-icon": (e6, o4) => {
3091
+ var i4 = comment();
3092
+ slot(first_child(i4), t2, "loading-icon", {}, (e7) => {
3040
3093
  const t3 = /* @__PURE__ */ derived_safe_equal(() => "loading" === get$1(n3).type);
3041
3094
  Loader(e7, {
3042
3095
  get visible() {
3043
3096
  return get$1(t3);
3044
3097
  }
3045
3098
  });
3046
- }), append(e6, o4);
3099
+ }), append(e6, i4);
3047
3100
  },
3048
3101
  "success-icon": (e6, n4) => {
3049
- var i4 = comment();
3050
- slot(first_child(i4), t2, "success-icon", {}, (e7) => {
3102
+ var o4 = comment();
3103
+ slot(first_child(o4), t2, "success-icon", {}, (e7) => {
3051
3104
  Icon(e7, {
3052
3105
  type: "success"
3053
3106
  });
3054
- }), append(e6, i4);
3107
+ }), append(e6, o4);
3055
3108
  },
3056
3109
  "error-icon": (e6, n4) => {
3057
- var i4 = comment();
3058
- slot(first_child(i4), t2, "error-icon", {}, (e7) => {
3110
+ var o4 = comment();
3111
+ slot(first_child(o4), t2, "error-icon", {}, (e7) => {
3059
3112
  Icon(e7, {
3060
3113
  type: "error"
3061
3114
  });
3062
- }), append(e6, i4);
3115
+ }), append(e6, o4);
3063
3116
  },
3064
3117
  "warning-icon": (e6, n4) => {
3065
- var i4 = comment();
3066
- slot(first_child(i4), t2, "warning-icon", {}, (e7) => {
3118
+ var o4 = comment();
3119
+ slot(first_child(o4), t2, "warning-icon", {}, (e7) => {
3067
3120
  Icon(e7, {
3068
3121
  type: "warning"
3069
3122
  });
3070
- }), append(e6, i4);
3123
+ }), append(e6, o4);
3071
3124
  },
3072
3125
  "info-icon": (e6, n4) => {
3073
- var i4 = comment();
3074
- slot(first_child(i4), t2, "info-icon", {}, (e7) => {
3126
+ var o4 = comment();
3127
+ slot(first_child(o4), t2, "info-icon", {}, (e7) => {
3075
3128
  Icon(e7, {
3076
3129
  type: "info"
3077
3130
  });
3078
- }), append(e6, i4);
3131
+ }), append(e6, o4);
3079
3132
  }
3080
3133
  }
3081
3134
  });
3082
- }), bind_this(c3, (e5) => set(P2, e5), () => get$1(P2)), template_effect((e5, t3, s5) => {
3135
+ }), bind_this(c3, (e5) => set(T2, e5), () => get$1(T2)), template_effect((e5, t3, s5) => {
3083
3136
  var _a2;
3084
3137
  u3 = set_attributes(c3, u3, {
3085
3138
  tabIndex: -1,
3086
3139
  class: n2.class,
3087
3140
  "data-sonner-toaster": true,
3088
- "data-theme": get$1(T2),
3141
+ "data-theme": get$1(P2),
3089
3142
  "data-rich-colors": g2(),
3090
3143
  dir: e5,
3091
3144
  "data-y-position": t3,
3092
3145
  "data-x-position": s5,
3093
3146
  style: n2.style,
3094
- ...i2
3095
- }, "svelte-1fo5d1m"), set_style(c3, "--front-toast-height", `${(_a2 = store_get(C2, "$heights", o2)[0]) == null ? void 0 : _a2.height}px`), set_style(c3, "--offset", "number" == typeof w2() ? `${w2()}px` : w2() || "32px"), set_style(c3, "--width", "356px"), set_style(c3, "--gap", "14px"), c3.dir = c3.dir;
3096
- }, [() => "auto" === x2() ? getDocumentDirection() : x2(), () => get$1(s4).split("-")[0], () => get$1(s4).split("-")[1]], derived_safe_equal), event("blur", c3, handleBlur), event("focus", c3, handleFocus), event("mouseenter", c3, () => set(q2, true)), event("mousemove", c3, () => set(q2, true)), event("mouseleave", c3, () => {
3097
- get$1(S2) || set(q2, false);
3098
- }), event("pointerdown", c3, () => set(S2, true)), event("pointerup", c3, () => set(S2, false)), append(e4, c3);
3147
+ ...o2,
3148
+ [de]: {
3149
+ "--front-toast-height": `${(_a2 = store_get(C2, "$heights", i2)[0]) == null ? void 0 : _a2.height}px`,
3150
+ "--offset": "number" == typeof w2() ? `${w2()}px` : w2() || "32px",
3151
+ "--width": "356px",
3152
+ "--gap": "14px"
3153
+ }
3154
+ }, "svelte-1fo5d1m"), c3.dir = c3.dir;
3155
+ }, [() => "auto" === x2() ? getDocumentDirection() : x2(), () => get$1(s4).split("-")[0], () => get$1(s4).split("-")[1]], derived_safe_equal), event("blur", c3, handleBlur), event("focus", c3, handleFocus), event("mouseenter", c3, () => set(M2, true)), event("mousemove", c3, () => set(M2, true)), event("mouseleave", c3, () => {
3156
+ get$1(I2) || set(M2, false);
3157
+ }), event("pointerdown", c3, () => set(I2, true)), event("pointerup", c3, () => set(I2, false)), append(e4, c3);
3099
3158
  }), template_effect(() => set_attribute(s3, "aria-label", `${v2()} ${get$1(l2)}`)), append(e3, s3);
3100
3159
  };
3101
3160
  if_block(N2, (e3) => {
3102
3161
  $toasts().length > 0 && e3(consequent);
3103
3162
  }), append(e2, j2), pop(), s2();
3104
3163
  }
3105
- const Ge = writable(false), He = writable("https://sdk.playlight.dev");
3164
+ const Ve = writable(false), Ke = writable("https://sdk.playlight.dev");
3106
3165
  function handleClick(e2, t2, n2) {
3107
3166
  var _a2;
3108
3167
  get$1(t2) ? e2.preventDefault() : ((_a2 = n2.onClick) == null ? void 0 : _a2.call(n2, n2.game.id), window.open("https://" + n2.game.domain, "_blank", "noopener"));
@@ -3111,37 +3170,37 @@ function playGame(e2, t2) {
3111
3170
  var _a2;
3112
3171
  e2.stopPropagation(), e2.preventDefault(), (_a2 = t2.onClick) == null ? void 0 : _a2.call(t2, t2.game.id), window.open("https://" + t2.game.domain, "_blank", "noopener");
3113
3172
  }
3114
- var Re = /* @__PURE__ */ template('<div><p class="text-primary font-bold uppercase">New</p></div>'), Ve = /* @__PURE__ */ template('<video playsinline="" loop preload="auto"></video>', 2), Ke = /* @__PURE__ */ template("<button>Play</button>"), Ue = /* @__PURE__ */ template('<div class="bg-background/75 text-foreground absolute right-0 bottom-0 left-0 z-11 flex max-h-1/3 flex-col overflow-hidden backdrop-blur-xl"><div class="hide-scrollbar h-full w-full overflow-y-auto p-3 svelte-rulnq9"><h3 class="mb-2 truncate text-center text-lg font-bold"> </h3> <p class="text-muted-foreground mb-4 text-center text-sm text-balance"> </p></div> <div class="fade-mask bg-background/75 pointer-events-none absolute right-0 bottom-0 left-0 h-8 svelte-rulnq9"></div></div>'), Ze = /* @__PURE__ */ template('<div role="button" tabindex="0"><!> <!> <img alt="cover" loading="eager"> <!> <!> <img alt="game logo" loading="eager"></div>');
3173
+ var Ue = /* @__PURE__ */ template('<div><p class="text-primary font-bold uppercase">New</p></div>'), Ze = /* @__PURE__ */ template('<video playsinline="" loop preload="auto"></video>', 2), Ye = /* @__PURE__ */ template("<button>Play</button>"), Je = /* @__PURE__ */ template('<div class="bg-background/75 text-foreground absolute right-0 bottom-0 left-0 z-11 flex max-h-1/3 flex-col overflow-hidden backdrop-blur-xl"><div class="hide-scrollbar h-full w-full overflow-y-auto p-3 svelte-rulnq9"><h3 class="mb-2 truncate text-center text-lg font-bold"> </h3> <p class="text-muted-foreground mb-4 text-center text-sm text-balance"> </p></div> <div class="fade-mask bg-background/75 pointer-events-none absolute right-0 bottom-0 left-0 h-8 svelte-rulnq9"></div></div>'), Xe = /* @__PURE__ */ template('<div role="button" tabindex="0"><!> <!> <img alt="cover" loading="eager"> <!> <!> <img alt="game logo" loading="eager"></div>');
3115
3174
  function GameCard(e2, t2) {
3116
3175
  push(t2, true);
3117
- const [n2, i2] = setup_stores();
3118
- let o2 = state(false), s2 = state(void 0), a2 = state(false), l2 = state(false), c2 = state(false), u2 = state(false), d2 = state(void 0);
3176
+ const [n2, o2] = setup_stores();
3177
+ let i2 = state(false), s2 = state(void 0), a2 = state(false), l2 = state(false), c2 = state(false), u2 = state(false), f2 = state(void 0);
3119
3178
  function handleMouseEnter() {
3120
- get$1(o2) || get$1(u2) || function playSound(e3, t3 = 1) {
3179
+ get$1(i2) || get$1(u2) || function playSound(e3, t3 = 1) {
3121
3180
  try {
3122
3181
  const n3 = new Audio(e3);
3123
3182
  n3.volume = t3, n3.play();
3124
3183
  } catch (e4) {
3125
3184
  console.error("Error playing sound:", e4);
3126
3185
  }
3127
- }(store_get(He, "$projectUrl", n2) + "/static/sounds/hover-selection.ogg", 0.25), set(o2, true), get$1(s2) && t2.game.cover_video_url && get$1(s2).play().catch((e3) => console.error("Video play error:", e3));
3186
+ }(store_get(Ke, "$projectUrl", n2) + "/static/sounds/hover-selection.ogg", 0.25), set(i2, true), get$1(s2) && t2.game.cover_video_url && get$1(s2).play().catch((e3) => console.error("Video play error:", e3));
3128
3187
  }
3129
3188
  function handleMouseLeave() {
3130
- get$1(u2) || (set(o2, false), get$1(s2) && get$1(a2) && get$1(s2).pause());
3189
+ get$1(u2) || (set(i2, false), get$1(s2) && get$1(a2) && get$1(s2).pause());
3131
3190
  }
3132
3191
  user_effect(() => {
3133
3192
  set(u2, "ontouchstart" in window);
3134
3193
  });
3135
- var f2 = Ze();
3136
- event("touchstart", S, () => set(u2, true), void 0, true), event("touchstart", T, function handleDocumentTouch(e3) {
3137
- get$1(d2) && !get$1(d2).contains(e3.target) && set(o2, false);
3138
- }, void 0, true), f2.__touchstart = handleMouseEnter, f2.__click = [handleClick, u2, t2];
3139
- var p2 = child(f2), consequent = (e3) => {
3140
- var t3 = Re();
3194
+ var d2 = Xe();
3195
+ event("touchstart", I, () => set(u2, true), void 0, true), event("touchstart", P, function handleDocumentTouch(e3) {
3196
+ get$1(f2) && !get$1(f2).contains(e3.target) && set(i2, false);
3197
+ }, void 0, true), d2.__touchstart = handleMouseEnter, d2.__click = [handleClick, u2, t2];
3198
+ var p2 = child(d2), consequent = (e3) => {
3199
+ var t3 = Ue();
3141
3200
  let n3;
3142
- template_effect(() => n3 = set_class(t3, 1, "bg-background absolute top-4 right-4 z-13 px-2 py-0.5 transition-opacity", null, n3, {
3143
- "opacity-0": get$1(o2)
3144
- })), append(e3, t3);
3201
+ template_effect((e4) => n3 = set_class(t3, 1, "bg-background absolute top-4 right-4 z-13 px-2 py-0.5 transition-opacity", null, n3, e4), [() => ({
3202
+ "opacity-0": get$1(i2)
3203
+ })]), append(e3, t3);
3145
3204
  };
3146
3205
  if_block(p2, (e3) => {
3147
3206
  var _a2;
@@ -3151,13 +3210,13 @@ function GameCard(e2, t2) {
3151
3210
  })((_a2 = t2.game) == null ? void 0 : _a2.created_at) && e3(consequent);
3152
3211
  });
3153
3212
  var _2 = sibling(p2, 2), consequent_1 = (e3) => {
3154
- var n3 = Ve();
3155
- let i3;
3156
- n3.muted = true, bind_this(n3, (e4) => set(s2, e4), () => get$1(s2)), template_effect(() => {
3157
- set_attribute(n3, "src", t2.game.cover_video_url), i3 = set_class(n3, 1, "absolute top-0 left-0 z-5 h-full w-full object-cover opacity-0", null, i3, {
3158
- "opacity-100": get$1(o2) && get$1(a2) && t2.game.cover_video_url
3159
- });
3160
- }), event("loadeddata", n3, () => {
3213
+ var n3 = Ze();
3214
+ let o3;
3215
+ n3.muted = true, bind_this(n3, (e4) => set(s2, e4), () => get$1(s2)), template_effect((e4) => {
3216
+ set_attribute(n3, "src", t2.game.cover_video_url), o3 = set_class(n3, 1, "absolute top-0 left-0 z-5 h-full w-full object-cover opacity-0", null, o3, e4);
3217
+ }, [() => ({
3218
+ "opacity-100": get$1(i2) && get$1(a2) && t2.game.cover_video_url
3219
+ })]), event("loadeddata", n3, () => {
3161
3220
  set(a2, true);
3162
3221
  }), append(e3, n3);
3163
3222
  };
@@ -3167,66 +3226,66 @@ function GameCard(e2, t2) {
3167
3226
  var v2 = sibling(_2, 2);
3168
3227
  let g2;
3169
3228
  var h2 = sibling(v2, 2), consequent_2 = (e3) => {
3170
- var n3 = Ke();
3171
- let i3;
3172
- n3.__click = [playGame, t2], template_effect(() => i3 = set_class(n3, 1, "bg-foreground text-background hover:bg-foreground/90 absolute right-4 bottom-4 z-15 flex items-center justify-center rounded-sm px-3 py-1 font-bold uppercase transition-all", null, i3, {
3173
- "opacity-0": get$1(o2)
3174
- })), append(e3, n3);
3229
+ var n3 = Ye();
3230
+ let o3;
3231
+ n3.__click = [playGame, t2], template_effect((e4) => o3 = set_class(n3, 1, "bg-foreground text-background hover:bg-foreground/90 absolute right-4 bottom-4 z-15 flex items-center justify-center rounded-sm px-3 py-1 font-bold uppercase transition-all", null, o3, e4), [() => ({
3232
+ "opacity-0": get$1(i2)
3233
+ })]), append(e3, n3);
3175
3234
  };
3176
3235
  if_block(h2, (e3) => {
3177
3236
  get$1(u2) && e3(consequent_2);
3178
3237
  });
3179
3238
  var m2 = sibling(h2, 2), consequent_3 = (e3) => {
3180
- var n3 = Ue(), i3 = child(n3), o3 = child(i3), s3 = child(o3), a3 = child(sibling(o3, 2));
3239
+ var n3 = Je(), o3 = child(n3), i3 = child(o3), s3 = child(i3), a3 = child(sibling(i3, 2));
3181
3240
  template_effect(() => {
3182
3241
  set_text(s3, t2.game.name), set_text(a3, t2.game.description || "No description.");
3183
3242
  }), transition(3, n3, () => slide), append(e3, n3);
3184
3243
  };
3185
3244
  if_block(m2, (e3) => {
3186
- get$1(o2) && e3(consequent_3);
3245
+ get$1(i2) && e3(consequent_3);
3187
3246
  });
3188
3247
  var b2 = sibling(m2, 2);
3189
3248
  let y2;
3190
- bind_this(f2, (e3) => set(d2, e3), () => get$1(d2)), template_effect(() => {
3191
- set_class(f2, 1, `bg-background highlight-border group relative mt-5 mb-[calc(3dvh+1.5vw)] flex aspect-[2/3] h-1/2 max-h-[75vh] min-h-92 cursor-pointer flex-col shadow-xl transition hover:outline-2 hover:brightness-105 lg:h-3/7 ${(get$1(l2) ? "" : "animate-pulse") ?? ""}`, "svelte-rulnq9"), set_attribute(v2, "src", t2.game.cover_image_url), g2 = set_class(v2, 1, "prevent-image-select absolute top-0 left-0 z-10 h-full w-full object-cover opacity-0 transition svelte-rulnq9", null, g2, {
3192
- "opacity-100": get$1(l2) && (!get$1(o2) || !get$1(a2) || !t2.game.cover_video_url)
3193
- }), set_attribute(b2, "src", t2.game.logo_url), y2 = set_class(b2, 1, "absolute right-0 -bottom-[18%] left-0 z-12 mx-auto aspect-square w-1/5 rounded-full object-center opacity-0 transition group-hover:outline-2 prevent-image-select svelte-rulnq9", null, y2, {
3194
- "opacity-100": get$1(c2)
3195
- });
3196
- }), event("mouseenter", f2, handleMouseEnter), event("focus", f2, handleMouseEnter), event("mouseleave", f2, handleMouseLeave), event("blur", f2, handleMouseLeave), event("load", v2, () => {
3249
+ bind_this(d2, (e3) => set(f2, e3), () => get$1(f2)), template_effect((e3, n3) => {
3250
+ set_class(d2, 1, `bg-background highlight-border group relative mt-5 mb-[calc(3dvh+1.5vw)] flex aspect-[2/3] h-1/2 max-h-[75vh] min-h-92 cursor-pointer flex-col shadow-xl transition hover:outline-2 hover:brightness-105 lg:h-3/7 ${(get$1(l2) ? "" : "animate-pulse") ?? ""}`, "svelte-rulnq9"), set_attribute(v2, "src", t2.game.cover_image_url), g2 = set_class(v2, 1, "prevent-image-select absolute top-0 left-0 z-10 h-full w-full object-cover opacity-0 transition svelte-rulnq9", null, g2, e3), set_attribute(b2, "src", t2.game.logo_url), y2 = set_class(b2, 1, "absolute right-0 -bottom-[18%] left-0 z-12 mx-auto aspect-square w-1/5 rounded-full object-center opacity-0 transition group-hover:outline-2 prevent-image-select svelte-rulnq9", null, y2, n3);
3251
+ }, [() => ({
3252
+ "opacity-100": get$1(l2) && (!get$1(i2) || !get$1(a2) || !t2.game.cover_video_url)
3253
+ }), () => ({
3254
+ "opacity-100": get$1(c2)
3255
+ })]), event("mouseenter", d2, handleMouseEnter), event("focus", d2, handleMouseEnter), event("mouseleave", d2, handleMouseLeave), event("blur", d2, handleMouseLeave), event("load", v2, () => {
3197
3256
  set(l2, true);
3198
3257
  }), event("load", b2, () => {
3199
3258
  set(c2, true);
3200
- }), append(e2, f2), pop(), i2();
3259
+ }), append(e2, d2), pop(), o2();
3201
3260
  }
3202
3261
  delegate(["touchstart", "click"]);
3203
- const Ye = new (_a = class {
3262
+ const Qe = new (_b = class {
3204
3263
  constructor() {
3205
3264
  __privateAdd(this, _PlayLightAPI_instances);
3206
3265
  this.baseUrl = "https://api.playlight.dev/platform", this.cachedCategories = null, this.currentGame = null;
3207
3266
  }
3208
3267
  async request(e2, t2 = {}) {
3209
3268
  try {
3210
- const n2 = `${this.baseUrl}${e2}`, i2 = await fetch(n2, {
3269
+ const n2 = `${this.baseUrl}${e2}`, o2 = await fetch(n2, {
3211
3270
  ...t2,
3212
3271
  headers: {
3213
3272
  "Content-Type": "application/json",
3214
3273
  ...t2.headers
3215
3274
  }
3216
3275
  });
3217
- if (!i2.ok) {
3276
+ if (!o2.ok) {
3218
3277
  let e3;
3219
3278
  try {
3220
- e3 = await i2.json();
3279
+ e3 = await o2.json();
3221
3280
  } catch {
3222
3281
  } finally {
3223
- if (429 !== i2.status && 404 !== i2.status) throw new Error(`API request failed: ${(e3 == null ? void 0 : e3.error) || (e3 == null ? void 0 : e3.message) || i2.status}`);
3224
- return 429 === i2.status ? console.warn("Playlight request didn't go through due to rate limiting.") : console.warn("Playlight game not found. This is normal in a test / local environment, but should not appear in production.");
3282
+ if (429 !== o2.status && 404 !== o2.status) throw new Error(`API request failed: ${(e3 == null ? void 0 : e3.error) || (e3 == null ? void 0 : e3.message) || o2.status}`);
3283
+ return 429 === o2.status ? console.warn("Playlight request didn't go through due to rate limiting.") : console.warn("Playlight game not found. This is normal in a test / local environment, but should not appear in production.");
3225
3284
  }
3226
3285
  }
3227
- return await i2.json();
3286
+ return await o2.json();
3228
3287
  } catch (e3) {
3229
- Oe.error("Error: " + e3), console.error("Playlight API error:", e3);
3288
+ Ne.error("Error: " + e3), console.error("Playlight API error:", e3);
3230
3289
  }
3231
3290
  }
3232
3291
  // Get all categories
@@ -3272,7 +3331,7 @@ const Ye = new (_a = class {
3272
3331
  }, _PlayLightAPI_instances = new WeakSet(), e_fn = function() {
3273
3332
  const e2 = window.location.hostname;
3274
3333
  return e2.startsWith("www.") ? e2.substring(4) : e2;
3275
- }, _a)();
3334
+ }, _b)();
3276
3335
  function cubicOut(e2) {
3277
3336
  const t2 = e2 - 1;
3278
3337
  return t2 * t2 * t2 + 1;
@@ -3280,10 +3339,10 @@ function cubicOut(e2) {
3280
3339
  function elasticOut(e2) {
3281
3340
  return Math.sin(-13 * (e2 + 1) * Math.PI / 2) * Math.pow(2, -10 * e2) + 1;
3282
3341
  }
3283
- function flip(e2, { from: t2, to: n2 }, i2 = {}) {
3284
- var { delay: o2 = 0, duration: s2 = (e3) => 120 * Math.sqrt(e3), easing: a2 = cubicOut } = i2, l2 = getComputedStyle(e2), c2 = "none" === l2.transform ? "" : l2.transform, [u2, d2] = l2.transformOrigin.split(" ").map(parseFloat);
3285
- u2 /= e2.clientWidth, d2 /= e2.clientHeight;
3286
- var f2 = (
3342
+ function flip(e2, { from: t2, to: n2 }, o2 = {}) {
3343
+ var { delay: i2 = 0, duration: s2 = (e3) => 120 * Math.sqrt(e3), easing: a2 = cubicOut } = o2, l2 = getComputedStyle(e2), c2 = "none" === l2.transform ? "" : l2.transform, [u2, f2] = l2.transformOrigin.split(" ").map(parseFloat);
3344
+ u2 /= e2.clientWidth, f2 /= e2.clientHeight;
3345
+ var d2 = (
3287
3346
  /**
3288
3347
  * @param {Element} element
3289
3348
  */
@@ -3295,9 +3354,9 @@ function flip(e2, { from: t2, to: n2 }, i2 = {}) {
3295
3354
  t3.parentElement;
3296
3355
  return n3;
3297
3356
  }(e2)
3298
- ), p2 = e2.clientWidth / n2.width / f2, _2 = e2.clientHeight / n2.height / f2, v2 = t2.left + t2.width * u2, g2 = t2.top + t2.height * d2, h2 = n2.left + n2.width * u2, m2 = n2.top + n2.height * d2, b2 = (v2 - h2) * p2, y2 = (g2 - m2) * _2, $2 = t2.width / n2.width, w2 = t2.height / n2.height;
3357
+ ), p2 = e2.clientWidth / n2.width / d2, _2 = e2.clientHeight / n2.height / d2, v2 = t2.left + t2.width * u2, g2 = t2.top + t2.height * f2, h2 = n2.left + n2.width * u2, m2 = n2.top + n2.height * f2, b2 = (v2 - h2) * p2, y2 = (g2 - m2) * _2, $2 = t2.width / n2.width, w2 = t2.height / n2.height;
3299
3358
  return {
3300
- delay: o2,
3359
+ delay: i2,
3301
3360
  duration: "function" == typeof s2 ? s2(Math.sqrt(b2 * b2 + y2 * y2)) : s2,
3302
3361
  easing: a2,
3303
3362
  css: (e3, t3) => `transform: ${c2} translate(${t3 * b2}px, ${t3 * y2}px) scale(${e3 + t3 * $2}, ${e3 + t3 * w2});`
@@ -3305,21 +3364,21 @@ function flip(e2, { from: t2, to: n2 }, i2 = {}) {
3305
3364
  }
3306
3365
  var on_click$1 = (e2, t2, n2) => {
3307
3366
  set(t2, ""), set(n2, !get$1(n2));
3308
- }, Je = /* @__PURE__ */ template('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'), Xe = /* @__PURE__ */ template('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'), on_click_1$1 = (e2, t2, n2, i2) => {
3309
- t2(n2), set(i2, false);
3310
- }, Qe = /* @__PURE__ */ template("<button> </button>"), et = /* @__PURE__ */ template('<div class="space-y-1 p-1"></div>'), tt = /* @__PURE__ */ template('<div class="bg-background/85 fixed left-1/2 z-50 mt-24 w-30 w-full max-w-xs -translate-x-1/2 transform border shadow-lg backdrop-blur"><div class="border-b p-3"><div class="relative"><div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-1"><!></div> <input type="text" placeholder="Search categories..." class="w-full border-0 p-1 pl-10 text-white focus:ring-0 focus:outline-none"></div></div> <div class="max-h-60 overflow-y-auto"><!></div></div>'), nt = /* @__PURE__ */ template('<div class="flex w-full flex-col py-2"><h1 class="mb-0! py-2 text-center text-2xl font-bold text-white drop-shadow-xl lg:text-4xl"><span> </span> <button class="group mx-1 inline-flex cursor-pointer items-center bg-white px-3 py-1 text-black transition hover:rotate-5"><span class="truncate max-w-[40vw] text-2xl font-bold text-black lg:text-4xl"> </span> <!></button> <span>games?</span></h1> <!></div>');
3367
+ }, et = /* @__PURE__ */ template('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'), tt = /* @__PURE__ */ template('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'), on_click_1$1 = (e2, t2, n2, o2) => {
3368
+ t2(n2), set(o2, false);
3369
+ }, nt = /* @__PURE__ */ template("<button> </button>"), rt = /* @__PURE__ */ template('<div class="space-y-1 p-1"></div>'), ot = /* @__PURE__ */ template('<div class="bg-background/85 fixed left-1/2 z-50 mt-24 w-30 w-full max-w-xs -translate-x-1/2 transform border shadow-lg backdrop-blur"><div class="border-b p-3"><div class="relative"><div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-1"><!></div> <input type="text" placeholder="Search categories..." class="w-full border-0 p-1 pl-10 text-white focus:ring-0 focus:outline-none"></div></div> <div class="max-h-60 overflow-y-auto"><!></div></div>'), it = /* @__PURE__ */ template('<div class="flex w-full flex-col py-2"><h1 class="mb-0! py-2 text-center text-2xl font-bold text-white drop-shadow-xl lg:text-4xl"><span> </span> <button class="group mx-1 inline-flex cursor-pointer items-center bg-white px-3 py-1 text-black transition hover:rotate-5"><span class="truncate max-w-[40vw] text-2xl font-bold text-black lg:text-4xl"> </span> <!></button> <span>games?</span></h1> <!></div>');
3311
3370
  function Navigation(e2, t2) {
3312
3371
  push(t2, true);
3313
- let n2, i2 = prop(t2, "categories", 19, () => []), o2 = prop(t2, "selectedCategory", 15), s2 = state(false), a2 = /* @__PURE__ */ derived(() => o2() || (i2().length > 0 ? i2()[0] : "...")), l2 = state(""), c2 = state(void 0), u2 = /* @__PURE__ */ derived(() => get$1(l2) ? i2().filter((e3) => e3.toLowerCase().includes(get$1(l2).toLowerCase())) : i2());
3314
- const d2 = ["Looking for", "Interested in", "Searching for", "Fancy some", "What about these"];
3315
- let f2, p2 = state(proxy(d2[0]));
3372
+ let n2, o2 = prop(t2, "categories", 19, () => []), i2 = prop(t2, "selectedCategory", 15), s2 = state(false), a2 = /* @__PURE__ */ derived(() => i2() || (o2().length > 0 ? o2()[0] : "...")), l2 = state(""), c2 = state(void 0), u2 = /* @__PURE__ */ derived(() => get$1(l2) ? o2().filter((e3) => e3.toLowerCase().includes(get$1(l2).toLowerCase())) : o2());
3373
+ const f2 = ["Looking for", "Interested in", "Searching for", "Fancy some", "What about these"];
3374
+ let d2, p2 = state(proxy(f2[0]));
3316
3375
  onMount(function updateRandomPhrase() {
3317
3376
  let e3;
3318
- for (e3 = Math.floor(Math.random() * (d2 == null ? void 0 : d2.length)); e3 == f2; ) e3 = Math.floor(Math.random() * (d2 == null ? void 0 : d2.length));
3319
- set(p2, proxy(d2[e3])), f2 = e3;
3377
+ for (e3 = Math.floor(Math.random() * (f2 == null ? void 0 : f2.length)); e3 == d2; ) e3 = Math.floor(Math.random() * (f2 == null ? void 0 : f2.length));
3378
+ set(p2, proxy(f2[e3])), d2 = e3;
3320
3379
  });
3321
- var _2 = nt();
3322
- event("click", T, function handleClickOutside(e3) {
3380
+ var _2 = it();
3381
+ event("click", P, function handleClickOutside(e3) {
3323
3382
  get$1(c2) && !get$1(c2).contains(e3.target) && n2 && !n2.contains(e3.target) && set(s2, false);
3324
3383
  });
3325
3384
  var v2 = child(_2), g2 = child(v2), h2 = child(g2), m2 = sibling(g2, 2);
@@ -3335,8 +3394,8 @@ function Navigation(e2, t2) {
3335
3394
  d: "m6 9 6 6 6-6"
3336
3395
  }]],
3337
3396
  children: (e4, n4) => {
3338
- var i3 = comment();
3339
- slot(first_child(i3), t3, "default", {}, null), append(e4, i3);
3397
+ var o3 = comment();
3398
+ slot(first_child(o3), t3, "default", {}, null), append(e4, o3);
3340
3399
  },
3341
3400
  $$slots: {
3342
3401
  default: true
@@ -3350,7 +3409,7 @@ function Navigation(e2, t2) {
3350
3409
  }
3351
3410
  }), bind_this(m2, (e3) => n2 = e3, () => n2);
3352
3411
  var x2 = sibling(v2, 2), consequent_2 = (e3) => {
3353
- var t3 = tt(), n3 = child(t3), a3 = child(n3), d3 = child(a3);
3412
+ var t3 = ot(), n3 = child(t3), a3 = child(n3), f3 = child(a3);
3354
3413
  !function Search(e4, t4) {
3355
3414
  const n4 = legacy_rest_props(t4, ["children", "$$slots", "$$events", "$$legacy"]);
3356
3415
  Icon$1(e4, spread_props({
@@ -3364,46 +3423,46 @@ function Navigation(e2, t2) {
3364
3423
  d: "m21 21-4.3-4.3"
3365
3424
  }]],
3366
3425
  children: (e5, n5) => {
3367
- var i3 = comment();
3368
- slot(first_child(i3), t4, "default", {}, null), append(e5, i3);
3426
+ var o3 = comment();
3427
+ slot(first_child(o3), t4, "default", {}, null), append(e5, o3);
3369
3428
  },
3370
3429
  $$slots: {
3371
3430
  default: true
3372
3431
  }
3373
3432
  }));
3374
- }(child(d3), {
3433
+ }(child(f3), {
3375
3434
  size: 18,
3376
3435
  class: "text-muted-foreground"
3377
3436
  });
3378
- var f3 = sibling(d3, 2), p3 = child(sibling(n3, 2)), consequent = (e4) => {
3379
- append(e4, Je());
3380
- }, alternate_1 = (e4) => {
3381
- var t4 = comment(), n4 = first_child(t4), consequent_1 = (e5) => {
3382
- append(e5, Xe());
3383
- }, alternate = (e5) => {
3384
- var t5 = et();
3437
+ var d3 = sibling(f3, 2), p3 = child(sibling(n3, 2)), consequent = (e4) => {
3438
+ append(e4, et());
3439
+ }, alternate = (e4, t4) => {
3440
+ var consequent_1 = (e5) => {
3441
+ append(e5, tt());
3442
+ }, alternate_1 = (e5) => {
3443
+ var t5 = rt();
3385
3444
  each(t5, 28, () => get$1(u2), (e6) => e6, (e6, t6) => {
3386
- var n5 = Qe();
3387
- n5.__click = [on_click_1$1, o2, t6, s2];
3388
- var i3 = child(n5);
3445
+ var n4 = nt();
3446
+ n4.__click = [on_click_1$1, i2, t6, s2];
3447
+ var o3 = child(n4);
3389
3448
  template_effect(() => {
3390
- set_class(n5, 1, `w-full cursor-pointer px-4 py-2 text-left transition-colors ${(o2() != t6 ? "hover:bg-muted-foreground/20" : "") ?? ""} ${(o2() == t6 ? "bg-white text-black" : "text-white") ?? ""}`), set_text(i3, t6);
3391
- }), function animation(e7, t7, n6) {
3392
- var i4, o3, s3, a4 = (
3449
+ set_class(n4, 1, `w-full cursor-pointer px-4 py-2 text-left transition-colors ${(i2() != t6 ? "hover:bg-muted-foreground/20" : "") ?? ""} ${(i2() == t6 ? "bg-white text-black" : "text-white") ?? ""}`), set_text(o3, t6);
3450
+ }), function animation(e7, t7, n5) {
3451
+ var o4, i3, s3, a4 = (
3393
3452
  /** @type {EachItem} */
3394
3453
  ce
3395
3454
  ), l3 = null;
3396
3455
  a4.a ?? (a4.a = {
3397
3456
  element: e7,
3398
3457
  measure() {
3399
- i4 = this.element.getBoundingClientRect();
3458
+ o4 = this.element.getBoundingClientRect();
3400
3459
  },
3401
3460
  apply() {
3402
- if (s3 == null ? void 0 : s3.abort(), o3 = this.element.getBoundingClientRect(), i4.left !== o3.left || i4.right !== o3.right || i4.top !== o3.top || i4.bottom !== o3.bottom) {
3461
+ if (s3 == null ? void 0 : s3.abort(), i3 = this.element.getBoundingClientRect(), o4.left !== i3.left || o4.right !== i3.right || o4.top !== i3.top || o4.bottom !== i3.bottom) {
3403
3462
  const e8 = t7()(this.element, {
3404
- from: i4,
3405
- to: o3
3406
- }, n6 == null ? void 0 : n6());
3463
+ from: o4,
3464
+ to: i3
3465
+ }, n5 == null ? void 0 : n5());
3407
3466
  s3 = animate(this.element, e8, void 0, 1, () => {
3408
3467
  s3 == null ? void 0 : s3.abort(), s3 = void 0;
3409
3468
  });
@@ -3411,7 +3470,7 @@ function Navigation(e2, t2) {
3411
3470
  },
3412
3471
  fix() {
3413
3472
  if (!e7.getAnimations().length) {
3414
- var { position: t8, width: n7, height: o4 } = getComputedStyle(e7);
3473
+ var { position: t8, width: n6, height: i4 } = getComputedStyle(e7);
3415
3474
  if ("absolute" !== t8 && "fixed" !== t8) {
3416
3475
  var s4 = (
3417
3476
  /** @type {HTMLElement | SVGElement} */
@@ -3422,10 +3481,10 @@ function Navigation(e2, t2) {
3422
3481
  width: s4.width,
3423
3482
  height: s4.height,
3424
3483
  transform: s4.transform
3425
- }, s4.position = "absolute", s4.width = n7, s4.height = o4;
3484
+ }, s4.position = "absolute", s4.width = n6, s4.height = i4;
3426
3485
  var a5 = e7.getBoundingClientRect();
3427
- if (i4.left !== a5.left || i4.top !== a5.top) {
3428
- var c3 = `translate(${i4.left - a5.left}px, ${i4.top - a5.top}px)`;
3486
+ if (o4.left !== a5.left || o4.top !== a5.top) {
3487
+ var c3 = `translate(${o4.left - a5.left}px, ${o4.top - a5.top}px)`;
3429
3488
  s4.transform = s4.transform ? `${s4.transform} ${c3}` : c3;
3430
3489
  }
3431
3490
  }
@@ -3445,22 +3504,22 @@ function Navigation(e2, t2) {
3445
3504
  // swap out the element rather than creating a new manager, in case it happened at the same
3446
3505
  // moment as a reconciliation
3447
3506
  a4.a.element = e7;
3448
- }(n5, () => flip, () => ({
3507
+ }(n4, () => flip, () => ({
3449
3508
  duration: 150
3450
- })), append(e6, n5);
3509
+ })), append(e6, n4);
3451
3510
  }), append(e5, t5);
3452
3511
  };
3453
- if_block(n4, (e5) => {
3454
- 0 === get$1(u2).length ? e5(consequent_1) : e5(alternate, false);
3455
- }, true), append(e4, t4);
3512
+ if_block(e4, (e5) => {
3513
+ 0 === get$1(u2).length ? e5(consequent_1) : e5(alternate_1, false);
3514
+ }, t4);
3456
3515
  };
3457
3516
  if_block(p3, (e4) => {
3458
- 0 === i2().length ? e4(consequent) : e4(alternate_1, false);
3517
+ 0 === o2().length ? e4(consequent) : e4(alternate, false);
3459
3518
  }), bind_this(t3, (e4) => set(c2, e4), () => get$1(c2)), function bind_value(e4, t4, n4 = t4) {
3460
- var i3 = is_runes();
3461
- listen_to_event_and_reset_event(e4, "input", (o3) => {
3462
- var s3 = o3 ? e4.defaultValue : e4.value;
3463
- if (s3 = is_numberlike_input(e4) ? to_number(s3) : s3, n4(s3), i3 && s3 !== (s3 = t4())) {
3519
+ var o3 = is_runes();
3520
+ listen_to_event_and_reset_event(e4, "input", (i3) => {
3521
+ var s3 = i3 ? e4.defaultValue : e4.value;
3522
+ if (s3 = is_numberlike_input(e4) ? to_number(s3) : s3, n4(s3), o3 && s3 !== (s3 = t4())) {
3464
3523
  var a4 = e4.selectionStart, l3 = e4.selectionEnd;
3465
3524
  e4.value = s3 ?? "", // Restore selection
3466
3525
  null !== l3 && (e4.selectionStart = a4, e4.selectionEnd = Math.min(l3, e4.value.length));
@@ -3474,7 +3533,7 @@ function Navigation(e2, t2) {
3474
3533
  is_numberlike_input(e4) && n5 === to_number(e4.value) || ("date" !== e4.type || n5 || e4.value) && n5 !== e4.value && // @ts-expect-error the value is coerced on assignment
3475
3534
  (e4.value = n5 ?? "");
3476
3535
  });
3477
- }(f3, () => get$1(l2), (e4) => set(l2, e4)), transition(3, t3, () => fly, () => ({
3536
+ }(d3, () => get$1(l2), (e4) => set(l2, e4)), transition(3, t3, () => fly, () => ({
3478
3537
  y: -5,
3479
3538
  duration: 250
3480
3539
  })), append(e3, t3);
@@ -3493,21 +3552,21 @@ function Navigation(e2, t2) {
3493
3552
  delegate(["click"]);
3494
3553
  var on_click = (e2, t2) => {
3495
3554
  localStorage.getItem("playlight_exit_intent_disabled_by_user") ? localStorage.removeItem("playlight_exit_intent_disabled_by_user") : localStorage.setItem("playlight_exit_intent_disabled_by_user", true), set(t2, !get$1(t2));
3496
- }, rt = /* @__PURE__ */ template('<button class="cursor-pointer truncate text-sm text-nowrap opacity-50 transition hover:opacity-25 max-md:hidden"><p class="bg-background/50 text-primary p-1 px-2 text-sm"> </p></button>'), on_click_1 = (e2, t2) => store_set(Ge, false), it = /* @__PURE__ */ template('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'), ot = /* @__PURE__ */ template('<div class="text-muted-foreground flex h-4/5 items-center justify-center gap-4"><p>No games found that match the filter.</p></div>'), st = /* @__PURE__ */ template('<div class="mx-auto flex h-full flex-wrap content-start justify-center gap-10 lg:max-w-4/5"><!> <div class="flex h-10 w-full justify-center"><!></div></div>'), at = /* @__PURE__ */ template('<div class="bg-background/75 fixed inset-0 top-0 right-0 bottom-0 left-0 z-99999 flex flex-col justify-center text-white backdrop-blur-md"><div class="ml-2 flex items-center justify-between p-4"><a href="https://playlight.dev" target="_blank"><img alt="logo" class="w-50"></a> <div class="mt-4 mr-2 flex items-center justify-evenly gap-8 overflow-hidden md:mr-4"><!> <button class="cursor-pointer text-white transition hover:opacity-50" aria-label="Close"><!></button></div></div> <div class="mx-auto p-2 px-5"><!></div> <div class="mask-fade no-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-12skmk8"><!></div> <div class="fixed right-0 bottom-0 flex items-center justify-between p-4"><a href="https://playlight.dev" target="_blank" class="text-muted-foreground flex items-center gap-1 text-sm transition hover:text-white">Game Developer? Join Playlight <!></a></div></div>');
3555
+ }, st = /* @__PURE__ */ template('<button class="cursor-pointer truncate text-sm text-nowrap opacity-50 transition hover:opacity-25 max-md:hidden"><p class="bg-background/50 text-primary p-1 px-2 text-sm"> </p></button>'), on_click_1 = (e2, t2) => store_set(Ve, false), at = /* @__PURE__ */ template('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'), lt = /* @__PURE__ */ template('<div class="text-muted-foreground flex h-4/5 items-center justify-center gap-4"><p>No games found that match the filter.</p></div>'), ct = /* @__PURE__ */ template('<div class="mx-auto flex h-full flex-wrap content-start justify-center gap-10 lg:max-w-4/5"><!> <div class="flex h-10 w-full justify-center"><!></div></div>'), ut = /* @__PURE__ */ template('<div class="bg-background/75 fixed inset-0 top-0 right-0 bottom-0 left-0 z-99999 flex flex-col justify-center text-white backdrop-blur-md"><div class="ml-2 flex items-center justify-between p-4"><a href="https://playlight.dev" target="_blank"><img alt="logo" class="w-50"></a> <div class="mt-4 mr-2 flex items-center justify-evenly gap-8 overflow-hidden md:mr-4"><!> <button class="cursor-pointer text-white transition hover:opacity-50" aria-label="Close"><!></button></div></div> <div class="mx-auto p-2 px-5"><!></div> <div class="mask-fade no-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-12skmk8"><!></div> <div class="fixed right-0 bottom-0 flex items-center justify-between p-4"><a href="https://playlight.dev" target="_blank" class="text-muted-foreground flex items-center gap-1 text-sm transition hover:text-white">Game Developer? Join Playlight <!></a></div></div>');
3497
3556
  function DiscoveryOverlay(e2, t2) {
3498
3557
  push(t2, true);
3499
- const [n2, i2] = setup_stores();
3500
- let o2, s2 = prop(t2, "showIntentToggle", 3, true), a2 = state(void 0), l2 = state(true), c2 = state(false), u2 = state(void 0), d2 = state(proxy([])), f2 = state(proxy([])), p2 = state(true), _2 = state(1), v2 = state(true), g2 = state(void 0), h2 = state(false);
3558
+ const [n2, o2] = setup_stores();
3559
+ let i2, s2 = prop(t2, "showIntentToggle", 3, true), a2 = state(void 0), l2 = state(true), c2 = state(false), u2 = state(void 0), f2 = state(proxy([])), d2 = state(proxy([])), p2 = state(true), _2 = state(1), v2 = state(true), g2 = state(void 0), h2 = state(false);
3501
3560
  async function fetchGames() {
3502
3561
  if (!(get$1(l2) && get$1(_2) > 1 || get$1(c2))) try {
3503
3562
  1 === get$1(_2) ? set(l2, true) : set(c2, true);
3504
- const e3 = get$1(h2) ? null : get$1(a2), t3 = await Ye.getSuggestions(e3, get$1(_2)), n3 = (t3 == null ? void 0 : t3.games) || [], i3 = n3.filter((e4) => !get$1(d2).some((t4) => t4.id === e4.id));
3505
- set(d2, proxy([...get$1(d2), ...i3])), n3.length < 10 ? !get$1(h2) && get$1(a2) ? (
3563
+ const e3 = get$1(h2) ? null : get$1(a2), t3 = await Qe.getSuggestions(e3, get$1(_2)), n3 = (t3 == null ? void 0 : t3.games) || [], o3 = n3.filter((e4) => !get$1(f2).some((t4) => t4.id === e4.id));
3564
+ set(f2, proxy([...get$1(f2), ...o3])), n3.length < 10 ? !get$1(h2) && get$1(a2) ? (
3506
3565
  // Try with all games
3507
3566
  (set(h2, true), set(_2, 1), setTimeout(() => fetchGames(), 100))
3508
3567
  ) : set(v2, false) : set(_2, get$1(_2) + 1);
3509
3568
  } catch (e3) {
3510
- console.error(e3), Oe.error("Failed to load games: " + e3);
3569
+ console.error(e3), Ne.error("Failed to load games: " + e3);
3511
3570
  } finally {
3512
3571
  set(l2, false), set(c2, false), // For Chrome: manually check if element is still in view and should trigger another load
3513
3572
  get$1(v2) && get$1(g2) && setTimeout(() => {
@@ -3519,39 +3578,39 @@ function DiscoveryOverlay(e2, t2) {
3519
3578
  }
3520
3579
  }
3521
3580
  onMount(() => (set(p2, !Boolean(localStorage.getItem("playlight_exit_intent_disabled_by_user"))), // Setup scroll observer
3522
- o2 = new IntersectionObserver((e3) => {
3581
+ i2 = new IntersectionObserver((e3) => {
3523
3582
  e3[0].isIntersecting && get$1(v2) && !get$1(l2) && !get$1(c2) && fetchGames();
3524
3583
  }, {
3525
3584
  rootMargin: "200px"
3526
- }), () => o2 == null ? void 0 : o2.disconnect())), onMount(async () => {
3527
- const e3 = await Ye.getCurrentGameInfo();
3585
+ }), () => i2 == null ? void 0 : i2.disconnect())), onMount(async () => {
3586
+ const e3 = await Qe.getCurrentGameInfo();
3528
3587
  set(u2, proxy(e3 == null ? void 0 : e3.category)), await async function fetchCategories() {
3529
- var _a2, _b, _c, _d;
3530
- set(f2, proxy(await Ye.getCategories())), !get$1(a2) && ((_a2 = get$1(f2)) == null ? void 0 : _a2.length) > 0 && set(a2, proxy(get$1(u2) && ((_b = get$1(f2)) == null ? void 0 : _b.includes(get$1(u2))) ? get$1(u2) : (_d = get$1(f2)) == null ? void 0 : _d[((_c = get$1(f2)) == null ? void 0 : _c.length) - 1]));
3588
+ var _a2, _b2, _c2, _d;
3589
+ set(d2, proxy(await Qe.getCategories())), !get$1(a2) && ((_a2 = get$1(d2)) == null ? void 0 : _a2.length) > 0 && set(a2, proxy(get$1(u2) && ((_b2 = get$1(d2)) == null ? void 0 : _b2.includes(get$1(u2))) ? get$1(u2) : (_d = get$1(d2)) == null ? void 0 : _d[((_c2 = get$1(d2)) == null ? void 0 : _c2.length) - 1]));
3531
3590
  }();
3532
3591
  }), user_effect(() => {
3533
- get$1(a2) && (set(d2, proxy([])), set(_2, 1), set(v2, true), set(h2, false), set(l2, true), // Delay fetch to prevent rapid requests
3592
+ get$1(a2) && (set(f2, proxy([])), set(_2, 1), set(v2, true), set(h2, false), set(l2, true), // Delay fetch to prevent rapid requests
3534
3593
  setTimeout(async () => {
3535
- await fetchGames(), get$1(d2).length < 10 && await fetchGames();
3594
+ await fetchGames(), get$1(f2).length < 10 && await fetchGames();
3536
3595
  }, 100));
3537
3596
  }), user_effect(() => {
3538
- get$1(g2) && o2 && o2.observe(get$1(g2));
3597
+ get$1(g2) && i2 && i2.observe(get$1(g2));
3539
3598
  });
3540
- var m2 = at();
3541
- event("keydown", T, (e3) => {
3542
- "Escape" == e3.key && store_set(Ge, false);
3599
+ var m2 = ut();
3600
+ event("keydown", P, (e3) => {
3601
+ "Escape" == e3.key && store_set(Ve, false);
3543
3602
  });
3544
3603
  var b2 = child(m2), y2 = child(b2), $2 = child(y2), w2 = child(sibling(y2, 2)), consequent = (e3) => {
3545
- var t3 = rt();
3604
+ var t3 = st();
3546
3605
  t3.__click = [on_click, p2];
3547
- var n3 = child(t3), i3 = child(n3);
3548
- template_effect(() => set_text(i3, get$1(p2) ? "Ignore exit intent" : "Trigger on exit intent")), append(e3, t3);
3606
+ var n3 = child(t3), o3 = child(n3);
3607
+ template_effect(() => set_text(o3, get$1(p2) ? "Ignore exit intent" : "Trigger on exit intent")), append(e3, t3);
3549
3608
  };
3550
3609
  if_block(w2, (e3) => {
3551
3610
  s2() && e3(consequent);
3552
3611
  });
3553
3612
  var x2 = sibling(w2, 2);
3554
- x2.__click = [on_click_1, () => store_get(Ge, "$discoveryOpen", n2)], function X(e3, t3) {
3613
+ x2.__click = [on_click_1, () => store_get(Ve, "$discoveryOpen", n2)], function X(e3, t3) {
3555
3614
  const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
3556
3615
  Icon$1(e3, spread_props({
3557
3616
  name: "x"
@@ -3562,8 +3621,8 @@ function DiscoveryOverlay(e2, t2) {
3562
3621
  d: "m6 6 12 12"
3563
3622
  }]],
3564
3623
  children: (e4, n4) => {
3565
- var i3 = comment();
3566
- slot(first_child(i3), t3, "default", {}, null), append(e4, i3);
3624
+ var o3 = comment();
3625
+ slot(first_child(o3), t3, "default", {}, null), append(e4, o3);
3567
3626
  },
3568
3627
  $$slots: {
3569
3628
  default: true
@@ -3575,7 +3634,7 @@ function DiscoveryOverlay(e2, t2) {
3575
3634
  var k2 = sibling(b2, 2);
3576
3635
  Navigation(child(k2), {
3577
3636
  get categories() {
3578
- return get$1(f2);
3637
+ return get$1(d2);
3579
3638
  },
3580
3639
  get selectedCategory() {
3581
3640
  return get$1(a2);
@@ -3584,45 +3643,45 @@ function DiscoveryOverlay(e2, t2) {
3584
3643
  set(a2, proxy(e3));
3585
3644
  }
3586
3645
  });
3587
- var C2 = sibling(k2, 2), M2 = child(C2), consequent_1 = (e3) => {
3588
- var t3 = it();
3646
+ var C2 = sibling(k2, 2), S2 = child(C2), consequent_1 = (e3) => {
3647
+ var t3 = at();
3589
3648
  Loader_circle(child(t3), {
3590
3649
  class: "animate-spin opacity-75",
3591
3650
  size: 50,
3592
3651
  strokeWidth: 2.5
3593
3652
  }), append(e3, t3);
3594
- }, alternate_1 = (e3) => {
3595
- var t3 = comment(), n3 = first_child(t3), consequent_2 = (e4) => {
3596
- append(e4, ot());
3597
- }, alternate = (e4) => {
3598
- var t4 = st(), n4 = child(t4);
3599
- each(n4, 17, () => get$1(d2), index, (e5, t5) => {
3653
+ }, alternate = (e3, t3) => {
3654
+ var consequent_2 = (e4) => {
3655
+ append(e4, lt());
3656
+ }, alternate_1 = (e4) => {
3657
+ var t4 = ct(), n3 = child(t4);
3658
+ each(n3, 17, () => get$1(f2), index, (e5, t5) => {
3600
3659
  GameCard(e5, {
3601
3660
  get game() {
3602
3661
  return get$1(t5);
3603
3662
  },
3604
- onClick: () => Ye.trackClick(get$1(t5).id)
3663
+ onClick: () => Qe.trackClick(get$1(t5).id)
3605
3664
  });
3606
3665
  });
3607
- var i3 = sibling(n4, 2), o3 = child(i3), consequent_3 = (e5) => {
3666
+ var o3 = sibling(n3, 2), i3 = child(o3), consequent_3 = (e5) => {
3608
3667
  Loader_circle(e5, {
3609
3668
  class: "animate-spin opacity-75",
3610
3669
  size: 30,
3611
3670
  strokeWidth: 2.5
3612
3671
  });
3613
3672
  };
3614
- if_block(o3, (e5) => {
3673
+ if_block(i3, (e5) => {
3615
3674
  get$1(c2) && e5(consequent_3);
3616
- }), bind_this(i3, (e5) => set(g2, e5), () => get$1(g2)), append(e4, t4);
3675
+ }), bind_this(o3, (e5) => set(g2, e5), () => get$1(g2)), append(e4, t4);
3617
3676
  };
3618
- if_block(n3, (e4) => {
3619
- 0 !== get$1(d2).length || get$1(l2) ? e4(alternate, false) : e4(consequent_2);
3620
- }, true), append(e3, t3);
3677
+ if_block(e3, (e4) => {
3678
+ 0 !== get$1(f2).length || get$1(l2) ? e4(alternate_1, false) : e4(consequent_2);
3679
+ }, t3);
3621
3680
  };
3622
- if_block(M2, (e3) => {
3623
- get$1(l2) && 0 === get$1(d2).length ? e3(consequent_1) : e3(alternate_1, false);
3681
+ if_block(S2, (e3) => {
3682
+ get$1(l2) && 0 === get$1(f2).length ? e3(consequent_1) : e3(alternate, false);
3624
3683
  });
3625
- var q2 = child(sibling(C2, 2));
3684
+ var M2 = child(sibling(C2, 2));
3626
3685
  !function External_link(e3, t3) {
3627
3686
  const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
3628
3687
  Icon$1(e3, spread_props({
@@ -3636,36 +3695,36 @@ function DiscoveryOverlay(e2, t2) {
3636
3695
  d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"
3637
3696
  }]],
3638
3697
  children: (e4, n4) => {
3639
- var i3 = comment();
3640
- slot(first_child(i3), t3, "default", {}, null), append(e4, i3);
3698
+ var o3 = comment();
3699
+ slot(first_child(o3), t3, "default", {}, null), append(e4, o3);
3641
3700
  },
3642
3701
  $$slots: {
3643
3702
  default: true
3644
3703
  }
3645
3704
  }));
3646
- }(sibling(child(q2)), {
3705
+ }(sibling(child(M2)), {
3647
3706
  size: 14,
3648
3707
  style: "margin-top: 1px;"
3649
- }), template_effect(() => set_attribute($2, "src", store_get(He, "$projectUrl", n2) + "/static/images/logo-white-small.png")), transition(3, m2, () => blur, () => ({
3708
+ }), template_effect(() => set_attribute($2, "src", store_get(Ke, "$projectUrl", n2) + "/static/images/logo-white-small.png")), transition(3, m2, () => blur, () => ({
3650
3709
  duration: 250
3651
- })), append(e2, m2), pop(), i2();
3710
+ })), append(e2, m2), pop(), o2();
3652
3711
  }
3653
3712
  delegate(["click"]);
3654
- var lt = /* @__PURE__ */ template('<div class="fixed top-0 left-0 right-0 h-2 z-99990"></div>');
3713
+ var ft = /* @__PURE__ */ template('<div class="fixed top-0 left-0 right-0 h-2 z-99990"></div>');
3655
3714
  delegate(["mouseover"]);
3656
- var ct = /* @__PURE__ */ template("<!> <!> <!> <!>", 1);
3715
+ var dt = /* @__PURE__ */ template("<!> <!> <!> <!>", 1);
3657
3716
  function App(e2, t2) {
3658
- var _a2, _b, _c, _d;
3717
+ var _a2, _b2, _c2, _d;
3659
3718
  push(t2, true);
3660
- const [n2, i2] = setup_stores(), $discoveryOpen = () => store_get(Ge, "$discoveryOpen", n2);
3661
- let o2 = proxy((_b = (_a2 = t2.config) == null ? void 0 : _a2.button) == null ? void 0 : _b.position), s2 = proxy((_d = (_c = t2.config) == null ? void 0 : _c.button) == null ? void 0 : _d.visible);
3719
+ const [n2, o2] = setup_stores(), $discoveryOpen = () => store_get(Ve, "$discoveryOpen", n2);
3720
+ let i2 = proxy((_b2 = (_a2 = t2.config) == null ? void 0 : _a2.button) == null ? void 0 : _b2.position), s2 = proxy((_d = (_c2 = t2.config) == null ? void 0 : _c2.button) == null ? void 0 : _d.visible);
3662
3721
  function openDiscovery() {
3663
- store_set(Ge, true), Ye.trackOpen();
3722
+ store_set(Ve, true), Qe.trackOpen();
3664
3723
  }
3665
- var a2 = ct(), l2 = first_child(a2);
3724
+ var a2 = dt(), l2 = first_child(a2);
3666
3725
  FloatingButton(l2, {
3667
3726
  get position() {
3668
- return o2;
3727
+ return i2;
3669
3728
  },
3670
3729
  get visible() {
3671
3730
  return s2;
@@ -3674,8 +3733,8 @@ function App(e2, t2) {
3674
3733
  });
3675
3734
  var c2 = sibling(l2, 2), consequent = (e3) => {
3676
3735
  const n3 = /* @__PURE__ */ derived(() => {
3677
- var _a3, _b2;
3678
- return (_b2 = (_a3 = t2.config) == null ? void 0 : _a3.exitIntent) == null ? void 0 : _b2.enabled;
3736
+ var _a3, _b3;
3737
+ return (_b3 = (_a3 = t2.config) == null ? void 0 : _a3.exitIntent) == null ? void 0 : _b3.enabled;
3679
3738
  });
3680
3739
  DiscoveryOverlay(e3, {
3681
3740
  get showIntentToggle() {
@@ -3687,39 +3746,39 @@ function App(e2, t2) {
3687
3746
  $discoveryOpen() && e3(consequent);
3688
3747
  });
3689
3748
  var u2 = sibling(c2, 2);
3690
- const d2 = /* @__PURE__ */ derived(() => {
3691
- var _a3, _b2;
3692
- return (_b2 = (_a3 = t2.config) == null ? void 0 : _a3.exitIntent) == null ? void 0 : _b2.enabled;
3749
+ const f2 = /* @__PURE__ */ derived(() => {
3750
+ var _a3, _b3;
3751
+ return (_b3 = (_a3 = t2.config) == null ? void 0 : _a3.exitIntent) == null ? void 0 : _b3.enabled;
3693
3752
  });
3694
3753
  !function ExitIntentDetector(e3, t3) {
3695
3754
  push(t3, true);
3696
- let n3, i3 = prop(t3, "enabled", 3, true), o3 = false;
3755
+ let n3, o3 = prop(t3, "enabled", 3, true), i3 = false;
3697
3756
  onMount(() => {
3698
3757
  "undefined" != typeof window && (n3 = window.innerHeight);
3699
3758
  });
3700
- var s3 = lt();
3701
- event("mouseleave", T, () => {
3702
- o3 = false;
3703
- }), event("mousemove", T, (e4) => {
3759
+ var s3 = ft();
3760
+ event("mouseleave", P, () => {
3761
+ i3 = false;
3762
+ }), event("mousemove", P, (e4) => {
3704
3763
  const t4 = e4.clientY;
3705
- if (!o3) return o3 = true, void (n3 = t4);
3764
+ if (!i3) return i3 = true, void (n3 = t4);
3706
3765
  n3 = t4;
3707
3766
  }), s3.__mouseover = (e4) => {
3708
3767
  var _a3;
3709
3768
  const s4 = e4.clientY;
3710
- s4 < n3 && o3 && i3() && !localStorage.getItem("playlight_exit_intent_disabled_by_user") && ((_a3 = t3.onIntent) == null ? void 0 : _a3.call(t3)), // Update lastMouseY after checking
3769
+ s4 < n3 && i3 && o3() && !localStorage.getItem("playlight_exit_intent_disabled_by_user") && ((_a3 = t3.onIntent) == null ? void 0 : _a3.call(t3)), // Update lastMouseY after checking
3711
3770
  n3 = s4;
3712
3771
  }, append(e3, s3), pop();
3713
3772
  }(u2, {
3714
3773
  get enabled() {
3715
- return get$1(d2);
3774
+ return get$1(f2);
3716
3775
  },
3717
3776
  onIntent: () => {
3718
3777
  $discoveryOpen() || openDiscovery();
3719
3778
  }
3720
- }), Toaster(sibling(u2, 2), {}), append(e2, a2), pop(), i2();
3779
+ }), Toaster(sibling(u2, 2), {}), append(e2, a2), pop(), o2();
3721
3780
  }
3722
- const ut = {
3781
+ const pt = {
3723
3782
  button: {
3724
3783
  position: "bottom-right",
3725
3784
  visible: true
@@ -3728,52 +3787,66 @@ const ut = {
3728
3787
  enabled: true
3729
3788
  }
3730
3789
  };
3731
- let dt = {
3732
- ...ut
3790
+ let _t = {
3791
+ ...pt
3733
3792
  };
3734
3793
  function initializeConfig(e2 = {}) {
3735
- return dt = deepMerge(ut, e2), dt;
3794
+ return _t = deepMerge(pt, e2), _t;
3736
3795
  }
3737
3796
  function deepMerge(e2, t2) {
3738
3797
  const n2 = {
3739
3798
  ...e2
3740
3799
  };
3741
- return isObject(e2) && isObject(t2) && Object.keys(t2).forEach((i2) => {
3742
- isObject(t2[i2]) ? i2 in e2 ? n2[i2] = deepMerge(e2[i2], t2[i2]) : Object.assign(n2, {
3743
- [i2]: t2[i2]
3800
+ return isObject(e2) && isObject(t2) && Object.keys(t2).forEach((o2) => {
3801
+ isObject(t2[o2]) ? o2 in e2 ? n2[o2] = deepMerge(e2[o2], t2[o2]) : Object.assign(n2, {
3802
+ [o2]: t2[o2]
3744
3803
  }) : Object.assign(n2, {
3745
- [i2]: t2[i2]
3804
+ [o2]: t2[o2]
3746
3805
  });
3747
3806
  }), n2;
3748
3807
  }
3749
3808
  function isObject(e2) {
3750
3809
  return e2 && "object" == typeof e2 && !Array.isArray(e2);
3751
3810
  }
3752
- const ft = new class PlaylightSDK {
3811
+ const vt = new (_c = class {
3753
3812
  constructor() {
3754
- this.container = null, this.app = null, this.isInitialized = false, this.config = null, this.api = Ye;
3813
+ __privateAdd(this, _PlaylightSDK_instances);
3814
+ this.container = null, this.app = null, this.isInitialized = false, this.config = null, this.api = Qe;
3755
3815
  }
3816
+ /**
3817
+ * Initialize Playlight
3818
+ * @param {Object} [userConfig] - The playlight configuration object
3819
+ */
3756
3820
  async init(e2 = {}) {
3757
- if (!this.isInitialized) return "undefined" == typeof window ? console.error("Playlight cannot run on the server, as it depends browser APIs.") : (
3821
+ return "undefined" == typeof window ? console.error("Playlight cannot run on the server, as it depends on browser APIs.") : this.isInitialized ? (console.warn("Playlight SDK already initialized!"), void (document.getElementById("playlight-sdk-container") || __privateMethod(this, _PlaylightSDK_instances, t_fn).call(this))) : (
3758
3822
  // Initialize configuration with defaults and user overrides
3759
- (this.config = initializeConfig(e2), // Create container for Svelte app
3760
- this.container = document.createElement("div"), this.container.id = "playlight-sdk-container", this.container.className = "playlight-sdk-container", document.body.appendChild(this.container), // Use mount function (client-side equivalent of render)
3761
- this.app = mount(App, {
3762
- target: this.container,
3763
- props: {
3764
- config: this.config
3765
- }
3766
- }), // Fetch current game info to cache it
3767
- await this.api.getCurrentGameInfo(), this.isInitialized = true, this)
3823
+ (this.config = initializeConfig(e2), __privateMethod(this, _PlaylightSDK_instances, t_fn).call(this), // Create container and mount
3824
+ // Fetch current game info to cache it
3825
+ await this.api.getCurrentGameInfo(), void (this.isInitialized = true))
3768
3826
  );
3769
3827
  }
3770
- // Public methods
3828
+ /**
3829
+ * Show or hide the discovery
3830
+ * @param {boolean} value - Whether to show the discovery
3831
+ */
3771
3832
  setDiscovery(e2) {
3772
- this.isInitialized && (Ge.set(e2), get(Ge) && Ye.trackOpen());
3833
+ this.isInitialized && (Ve.set(e2), get(Ve) && Qe.trackOpen());
3773
3834
  }
3774
- }();
3775
- "undefined" != typeof window && (window.playlightSDK = ft);
3835
+ }, _PlaylightSDK_instances = new WeakSet(), /**
3836
+ * Mount the Svelte app to the playlight container
3837
+ * @private
3838
+ */
3839
+ t_fn = function() {
3840
+ this.container = document.createElement("div"), this.container.id = "playlight-sdk-container", this.container.className = "playlight-sdk-container", document.body.appendChild(this.container), // Mount (client-side alternative to render)
3841
+ this.app = mount(App, {
3842
+ target: this.container,
3843
+ props: {
3844
+ config: this.config
3845
+ }
3846
+ });
3847
+ }, _c)();
3848
+ "undefined" != typeof window && (window.playlightSDK = vt);
3776
3849
  export {
3777
- ft as default
3850
+ vt as default
3778
3851
  };
3779
3852
  //# sourceMappingURL=playlight-sdk.es.js.map