@arenarium/maps 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.es.js CHANGED
@@ -1,59 +1,59 @@
1
- var ln = Array.isArray, ur = Array.prototype.indexOf, fr = Array.from, vt = Object.defineProperty, Oe = Object.getOwnPropertyDescriptor, cr = Object.prototype, hr = Array.prototype, pr = Object.getPrototypeOf, Gt = Object.isExtensible;
2
- function dr(t) {
1
+ var br = Array.isArray, kn = Array.prototype.indexOf, Mn = Array.from, Mt = Object.defineProperty, Ue = Object.getOwnPropertyDescriptor, xn = Object.prototype, Pn = Array.prototype, Sn = Object.getPrototypeOf, sr = Object.isExtensible;
2
+ function An(t) {
3
3
  for (var e = 0; e < t.length; e++)
4
4
  t[e]();
5
5
  }
6
- function vr() {
7
- var t, e, n = new Promise((r, i) => {
8
- t = r, e = i;
6
+ function Dn() {
7
+ var t, e, r = new Promise((n, i) => {
8
+ t = n, e = i;
9
9
  });
10
- return { promise: n, resolve: t, reject: e };
10
+ return { promise: r, resolve: t, reject: e };
11
11
  }
12
- const O = 2, Pt = 4, un = 8, De = 16, ae = 32, me = 64, St = 128, U = 256, tt = 512, T = 1024, J = 2048, le = 4096, xe = 8192, Ce = 16384, At = 32768, fn = 65536, Kt = 1 << 17, mr = 1 << 18, Te = 1 << 19, yr = 1 << 20, mt = 1 << 21, Dt = 1 << 22, pe = 1 << 23, Qe = Symbol("$state"), Ct = new class extends Error {
12
+ const R = 2, It = 4, Er = 8, Le = 16, fe = 32, ge = 64, Ft = 128, q = 256, st = 512, L = 1024, re = 2048, ce = 4096, Ae = 8192, Ie = 16384, Ot = 32768, kr = 65536, or = 1 << 17, Cn = 1 << 18, Fe = 1 << 19, Tn = 1 << 20, xt = 1 << 21, Rt = 1 << 22, ve = 1 << 23, rt = Symbol("$state"), Nt = new class extends Error {
13
13
  name = "StaleReactionError";
14
14
  message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
15
15
  }();
16
- function gr() {
16
+ function Ln() {
17
17
  throw new Error("https://svelte.dev/e/async_derived_orphan");
18
18
  }
19
- function _r(t) {
19
+ function In(t) {
20
20
  throw new Error("https://svelte.dev/e/effect_in_teardown");
21
21
  }
22
- function wr() {
22
+ function Fn() {
23
23
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
24
24
  }
25
- function Er(t) {
25
+ function On(t) {
26
26
  throw new Error("https://svelte.dev/e/effect_orphan");
27
27
  }
28
- function br() {
28
+ function Rn() {
29
29
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
30
30
  }
31
- function kr() {
31
+ function Nn() {
32
32
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
33
33
  }
34
- function Mr() {
34
+ function jn() {
35
35
  throw new Error("https://svelte.dev/e/state_prototype_fixed");
36
36
  }
37
- function xr() {
37
+ function zn() {
38
38
  throw new Error("https://svelte.dev/e/state_unsafe_mutation");
39
39
  }
40
- function Pr() {
40
+ function Bn() {
41
41
  throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
42
42
  }
43
- const Sr = 2, M = Symbol();
44
- function Ar() {
43
+ const Un = 2, x = Symbol();
44
+ function Zn() {
45
45
  console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
46
46
  }
47
- function cn(t) {
47
+ function Mr(t) {
48
48
  return t === this.v;
49
49
  }
50
- let q = null;
51
- function Pe(t) {
52
- q = t;
50
+ let Y = null;
51
+ function De(t) {
52
+ Y = t;
53
53
  }
54
- function Tt(t, e = !1, n) {
55
- q = {
56
- p: q,
54
+ function jt(t, e = !1, r) {
55
+ Y = {
56
+ p: Y,
57
57
  c: null,
58
58
  e: null,
59
59
  s: t,
@@ -61,72 +61,72 @@ function Tt(t, e = !1, n) {
61
61
  l: null
62
62
  };
63
63
  }
64
- function Lt(t) {
64
+ function zt(t) {
65
65
  var e = (
66
66
  /** @type {ComponentContext} */
67
- q
68
- ), n = e.e;
69
- if (n !== null) {
67
+ Y
68
+ ), r = e.e;
69
+ if (r !== null) {
70
70
  e.e = null;
71
- for (var r of n)
72
- Mn(r);
71
+ for (var n of r)
72
+ Nr(n);
73
73
  }
74
- return t !== void 0 && (e.x = t), q = e.p, t ?? /** @type {T} */
74
+ return t !== void 0 && (e.x = t), Y = e.p, t ?? /** @type {T} */
75
75
  {};
76
76
  }
77
- function hn() {
77
+ function xr() {
78
78
  return !0;
79
79
  }
80
- let we = [];
81
- function Dr() {
82
- var t = we;
83
- we = [], dr(t);
80
+ let Me = [];
81
+ function qn() {
82
+ var t = Me;
83
+ Me = [], An(t);
84
84
  }
85
- function ot(t) {
86
- if (we.length === 0) {
87
- var e = we;
85
+ function ut(t) {
86
+ if (Me.length === 0) {
87
+ var e = Me;
88
88
  queueMicrotask(() => {
89
- e === we && Dr();
89
+ e === Me && qn();
90
90
  });
91
91
  }
92
- we.push(t);
92
+ Me.push(t);
93
93
  }
94
- const Cr = /* @__PURE__ */ new WeakMap();
95
- function pn(t) {
94
+ const Hn = /* @__PURE__ */ new WeakMap();
95
+ function Pr(t) {
96
96
  var e = m;
97
97
  if (e === null)
98
- return v.f |= pe, t;
99
- if ((e.f & At) === 0) {
100
- if ((e.f & St) === 0)
101
- throw !e.parent && t instanceof Error && dn(t), t;
98
+ return v.f |= ve, t;
99
+ if ((e.f & Ot) === 0) {
100
+ if ((e.f & Ft) === 0)
101
+ throw !e.parent && t instanceof Error && Sr(t), t;
102
102
  e.b.error(t);
103
103
  } else
104
- Se(t, e);
104
+ Ce(t, e);
105
105
  }
106
- function Se(t, e) {
106
+ function Ce(t, e) {
107
107
  for (; e !== null; ) {
108
- if ((e.f & St) !== 0)
108
+ if ((e.f & Ft) !== 0)
109
109
  try {
110
110
  e.b.error(t);
111
111
  return;
112
- } catch (n) {
113
- t = n;
112
+ } catch (r) {
113
+ t = r;
114
114
  }
115
115
  e = e.parent;
116
116
  }
117
- throw t instanceof Error && dn(t), t;
117
+ throw t instanceof Error && Sr(t), t;
118
118
  }
119
- function dn(t) {
120
- const e = Cr.get(t);
121
- e && (vt(t, "message", {
119
+ function Sr(t) {
120
+ const e = Hn.get(t);
121
+ e && (Mt(t, "message", {
122
122
  value: e.message
123
- }), vt(t, "stack", {
123
+ }), Mt(t, "stack", {
124
124
  value: e.stack
125
125
  }));
126
126
  }
127
- const ht = /* @__PURE__ */ new Set();
128
- let S = null, yt = /* @__PURE__ */ new Set(), Ue = [], It = null, gt = !1;
129
- class ee {
127
+ const wt = /* @__PURE__ */ new Set();
128
+ let A = null, Pt = /* @__PURE__ */ new Set(), Xe = [], Bt = null, St = !1;
129
+ class ie {
130
130
  /**
131
131
  * The current values of any sources that are updated in this batch
132
132
  * They keys of this map are identical to `this.#previous`
@@ -154,7 +154,7 @@ class ee {
154
154
  * TODO replace with Promise.withResolvers once supported widely enough
155
155
  * @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
156
156
  */
157
- #r = null;
157
+ #n = null;
158
158
  /**
159
159
  * True if an async effect inside this batch resolved and
160
160
  * its parent branch was already deleted
@@ -178,7 +178,7 @@ class ee {
178
178
  * a batch is committed
179
179
  * @type {Effect[]}
180
180
  */
181
- #n = [];
181
+ #r = [];
182
182
  /**
183
183
  * The same as `#render_effects`, but for `$effect` (which runs after)
184
184
  * @type {Effect[]}
@@ -211,19 +211,19 @@ class ee {
211
211
  * @param {Effect[]} root_effects
212
212
  */
213
213
  process(e) {
214
- Ue = [];
214
+ Xe = [];
215
215
  for (const i of e)
216
216
  this.#p(i);
217
217
  if (this.#o.length === 0 && this.#a === 0) {
218
218
  this.#d();
219
- var n = this.#n, r = this.#s;
220
- this.#n = [], this.#s = [], this.#l = [], S = null, Jt(n), Jt(r), S === null ? S = this : ht.delete(this), this.#r?.resolve();
219
+ var r = this.#r, n = this.#s;
220
+ this.#r = [], this.#s = [], this.#l = [], A = null, ar(r), ar(n), A === null ? A = this : wt.delete(this), this.#n?.resolve();
221
221
  } else
222
- this.#u(this.#n), this.#u(this.#s), this.#u(this.#l);
222
+ this.#u(this.#r), this.#u(this.#s), this.#u(this.#l);
223
223
  for (const i of this.#o)
224
- Me(i);
224
+ Se(i);
225
225
  for (const i of this.#i)
226
- Me(i);
226
+ Se(i);
227
227
  this.#o = [], this.#i = [];
228
228
  }
229
229
  /**
@@ -232,36 +232,36 @@ class ee {
232
232
  * @param {Effect} root
233
233
  */
234
234
  #p(e) {
235
- e.f ^= T;
236
- for (var n = e.first; n !== null; ) {
237
- var r = n.f, i = (r & (ae | me)) !== 0, s = i && (r & T) !== 0, o = s || (r & xe) !== 0 || this.skipped_effects.has(n);
238
- if (!o && n.fn !== null) {
235
+ e.f ^= L;
236
+ for (var r = e.first; r !== null; ) {
237
+ var n = r.f, i = (n & (fe | ge)) !== 0, s = i && (n & L) !== 0, o = s || (n & Ae) !== 0 || this.skipped_effects.has(r);
238
+ if (!o && r.fn !== null) {
239
239
  if (i)
240
- n.f ^= T;
241
- else if ((r & Pt) !== 0)
242
- this.#s.push(n);
243
- else if ((r & T) === 0)
244
- if ((r & Dt) !== 0) {
245
- var a = n.b?.is_pending() ? this.#i : this.#o;
246
- a.push(n);
247
- } else lt(n) && ((n.f & De) !== 0 && this.#l.push(n), Me(n));
248
- var l = n.first;
249
- if (l !== null) {
250
- n = l;
240
+ r.f ^= L;
241
+ else if ((n & It) !== 0)
242
+ this.#s.push(r);
243
+ else if ((n & L) === 0)
244
+ if ((n & Rt) !== 0) {
245
+ var l = r.b?.is_pending() ? this.#i : this.#o;
246
+ l.push(r);
247
+ } else ct(r) && ((r.f & Le) !== 0 && this.#l.push(r), Se(r));
248
+ var a = r.first;
249
+ if (a !== null) {
250
+ r = a;
251
251
  continue;
252
252
  }
253
253
  }
254
- var u = n.parent;
255
- for (n = n.next; n === null && u !== null; )
256
- n = u.next, u = u.parent;
254
+ var u = r.parent;
255
+ for (r = r.next; r === null && u !== null; )
256
+ r = u.next, u = u.parent;
257
257
  }
258
258
  }
259
259
  /**
260
260
  * @param {Effect[]} effects
261
261
  */
262
262
  #u(e) {
263
- for (const n of e)
264
- ((n.f & J) !== 0 ? this.#h : this.#f).push(n), Z(n, T);
263
+ for (const r of e)
264
+ ((r.f & re) !== 0 ? this.#h : this.#f).push(r), H(r, L);
265
265
  e.length = 0;
266
266
  }
267
267
  /**
@@ -270,23 +270,23 @@ class ee {
270
270
  * @param {Source} source
271
271
  * @param {any} value
272
272
  */
273
- capture(e, n) {
274
- this.#e.has(e) || this.#e.set(e, n), this.current.set(e, e.v);
273
+ capture(e, r) {
274
+ this.#e.has(e) || this.#e.set(e, r), this.current.set(e, e.v);
275
275
  }
276
276
  activate() {
277
- S = this;
277
+ A = this;
278
278
  }
279
279
  deactivate() {
280
- S = null;
281
- for (const e of yt)
282
- if (yt.delete(e), e(), S !== null)
280
+ A = null;
281
+ for (const e of Pt)
282
+ if (Pt.delete(e), e(), A !== null)
283
283
  break;
284
284
  }
285
285
  neuter() {
286
286
  this.#c = !0;
287
287
  }
288
288
  flush() {
289
- Ue.length > 0 ? Tr() : this.#d(), S === this && (this.#a === 0 && ht.delete(this), this.deactivate());
289
+ Xe.length > 0 ? Yn() : this.#d(), A === this && (this.#a === 0 && wt.delete(this), this.deactivate());
290
290
  }
291
291
  /**
292
292
  * Append and remove branches to/from the DOM
@@ -303,10 +303,10 @@ class ee {
303
303
  decrement() {
304
304
  if (this.#a -= 1, this.#a === 0) {
305
305
  for (const e of this.#h)
306
- Z(e, J), Ze(e);
306
+ H(e, re), We(e);
307
307
  for (const e of this.#f)
308
- Z(e, le), Ze(e);
309
- this.#n = [], this.#s = [], this.flush();
308
+ H(e, ce), We(e);
309
+ this.#r = [], this.#s = [], this.flush();
310
310
  } else
311
311
  this.deactivate();
312
312
  }
@@ -315,90 +315,90 @@ class ee {
315
315
  this.#t.add(e);
316
316
  }
317
317
  settled() {
318
- return (this.#r ??= vr()).promise;
318
+ return (this.#n ??= Dn()).promise;
319
319
  }
320
320
  static ensure() {
321
- if (S === null) {
322
- const e = S = new ee();
323
- ht.add(S), ee.enqueue(() => {
324
- S === e && e.flush();
321
+ if (A === null) {
322
+ const e = A = new ie();
323
+ wt.add(A), ie.enqueue(() => {
324
+ A === e && e.flush();
325
325
  });
326
326
  }
327
- return S;
327
+ return A;
328
328
  }
329
329
  /** @param {() => void} task */
330
330
  static enqueue(e) {
331
- ot(e);
331
+ ut(e);
332
332
  }
333
333
  }
334
- function Tr() {
335
- var t = ke;
336
- gt = !0;
334
+ function Yn() {
335
+ var t = Pe;
336
+ St = !0;
337
337
  try {
338
338
  var e = 0;
339
- for ($t(!0); Ue.length > 0; ) {
340
- var n = ee.ensure();
339
+ for (fr(!0); Xe.length > 0; ) {
340
+ var r = ie.ensure();
341
341
  if (e++ > 1e3) {
342
- var r, i;
343
- Lr();
342
+ var n, i;
343
+ Vn();
344
344
  }
345
- n.process(Ue), oe.clear();
345
+ r.process(Xe), ue.clear();
346
346
  }
347
347
  } finally {
348
- gt = !1, $t(t), It = null;
348
+ St = !1, fr(t), Bt = null;
349
349
  }
350
350
  }
351
- function Lr() {
351
+ function Vn() {
352
352
  try {
353
- br();
353
+ Rn();
354
354
  } catch (t) {
355
- Se(t, It);
355
+ Ce(t, Bt);
356
356
  }
357
357
  }
358
- let he = null;
359
- function Jt(t) {
358
+ let de = null;
359
+ function ar(t) {
360
360
  var e = t.length;
361
361
  if (e !== 0) {
362
- for (var n = 0; n < e; ) {
363
- var r = t[n++];
364
- if ((r.f & (Ce | xe)) === 0 && lt(r) && (he = [], Me(r), r.deps === null && r.first === null && r.nodes_start === null && (r.teardown === null && r.ac === null ? An(r) : r.fn = null), he?.length > 0)) {
365
- oe.clear();
366
- for (const i of he)
367
- Me(i);
368
- he = [];
362
+ for (var r = 0; r < e; ) {
363
+ var n = t[r++];
364
+ if ((n.f & (Ie | Ae)) === 0 && ct(n) && (de = [], Se(n), n.deps === null && n.first === null && n.nodes_start === null && (n.teardown === null && n.ac === null ? Ur(n) : n.fn = null), de?.length > 0)) {
365
+ ue.clear();
366
+ for (const i of de)
367
+ Se(i);
368
+ de = [];
369
369
  }
370
370
  }
371
- he = null;
371
+ de = null;
372
372
  }
373
373
  }
374
- function Ze(t) {
375
- for (var e = It = t; e.parent !== null; ) {
374
+ function We(t) {
375
+ for (var e = Bt = t; e.parent !== null; ) {
376
376
  e = e.parent;
377
- var n = e.f;
378
- if (gt && e === m && (n & De) !== 0)
377
+ var r = e.f;
378
+ if (St && e === m && (r & Le) !== 0)
379
379
  return;
380
- if ((n & (me | ae)) !== 0) {
381
- if ((n & T) === 0) return;
382
- e.f ^= T;
380
+ if ((r & (ge | fe)) !== 0) {
381
+ if ((r & L) === 0) return;
382
+ e.f ^= L;
383
383
  }
384
384
  }
385
- Ue.push(e);
385
+ Xe.push(e);
386
386
  }
387
- function Ir(t) {
388
- let e = 0, n = at(0), r;
387
+ function Xn(t) {
388
+ let e = 0, r = ft(0), n;
389
389
  return () => {
390
- Wr() && (_(n), Rt(() => (e === 0 && (r = On(() => t(() => Re(n)))), e += 1, () => {
391
- ot(() => {
392
- e -= 1, e === 0 && (r?.(), r = void 0, Re(n));
390
+ li() && (g(r), qt(() => (e === 0 && (n = Wr(() => t(() => Ze(r)))), e += 1, () => {
391
+ ut(() => {
392
+ e -= 1, e === 0 && (n?.(), n = void 0, Ze(r));
393
393
  });
394
394
  })));
395
395
  };
396
396
  }
397
- var Fr = fn | Te | St;
398
- function Or(t, e, n) {
399
- new Rr(t, e, n);
397
+ var Wn = kr | Fe | Ft;
398
+ function Gn(t, e, r) {
399
+ new Kn(t, e, r);
400
400
  }
401
- class Rr {
401
+ class Kn {
402
402
  /** @type {Boundary | null} */
403
403
  parent;
404
404
  #e = !1;
@@ -407,7 +407,7 @@ class Rr {
407
407
  /** @type {TemplateNode | null} */
408
408
  #a = null;
409
409
  /** @type {BoundaryProps} */
410
- #r;
410
+ #n;
411
411
  /** @type {((anchor: Node) => void)} */
412
412
  #c;
413
413
  /** @type {Effect} */
@@ -415,7 +415,7 @@ class Rr {
415
415
  /** @type {Effect | null} */
416
416
  #i = null;
417
417
  /** @type {Effect | null} */
418
- #n = null;
418
+ #r = null;
419
419
  /** @type {Effect | null} */
420
420
  #s = null;
421
421
  /** @type {DocumentFragment | null} */
@@ -432,9 +432,9 @@ class Rr {
432
432
  */
433
433
  #u = null;
434
434
  #d = () => {
435
- this.#u && nt(this.#u, this.#h);
435
+ this.#u && ot(this.#u, this.#h);
436
436
  };
437
- #g = Ir(() => (this.#u = at(this.#h), () => {
437
+ #g = Xn(() => (this.#u = ft(this.#h), () => {
438
438
  this.#u = null;
439
439
  }));
440
440
  /**
@@ -442,36 +442,36 @@ class Rr {
442
442
  * @param {BoundaryProps} props
443
443
  * @param {((anchor: Node) => void)} children
444
444
  */
445
- constructor(e, n, r) {
446
- this.#t = e, this.#r = n, this.#c = r, this.parent = /** @type {Effect} */
447
- m.b, this.#e = !!this.#r.pending, this.#o = Qr(() => {
445
+ constructor(e, r, n) {
446
+ this.#t = e, this.#n = r, this.#c = n, this.parent = /** @type {Effect} */
447
+ m.b, this.#e = !!this.#n.pending, this.#o = hi(() => {
448
448
  m.b = this;
449
449
  {
450
450
  try {
451
- this.#i = ce(() => r(this.#t));
451
+ this.#i = pe(() => n(this.#t));
452
452
  } catch (i) {
453
453
  this.error(i);
454
454
  }
455
455
  this.#f > 0 ? this.#m() : this.#e = !1;
456
456
  }
457
- }, Fr);
457
+ }, Wn);
458
458
  }
459
459
  #_() {
460
460
  try {
461
- this.#i = ce(() => this.#c(this.#t));
461
+ this.#i = pe(() => this.#c(this.#t));
462
462
  } catch (e) {
463
463
  this.error(e);
464
464
  }
465
465
  this.#e = !1;
466
466
  }
467
467
  #w() {
468
- const e = this.#r.pending;
469
- e && (this.#n = ce(() => e(this.#t)), ee.enqueue(() => {
470
- this.#i = this.#v(() => (ee.ensure(), ce(() => this.#c(this.#t)))), this.#f > 0 ? this.#m() : ($e(
468
+ const e = this.#n.pending;
469
+ e && (this.#r = pe(() => e(this.#t)), ie.enqueue(() => {
470
+ this.#i = this.#v(() => (ie.ensure(), pe(() => this.#c(this.#t)))), this.#f > 0 ? this.#m() : (nt(
471
471
  /** @type {Effect} */
472
- this.#n,
472
+ this.#r,
473
473
  () => {
474
- this.#n = null;
474
+ this.#r = null;
475
475
  }
476
476
  ), this.#e = !1);
477
477
  }));
@@ -484,28 +484,28 @@ class Rr {
484
484
  return this.#e || !!this.parent && this.parent.is_pending();
485
485
  }
486
486
  has_pending_snippet() {
487
- return !!this.#r.pending;
487
+ return !!this.#n.pending;
488
488
  }
489
489
  /**
490
490
  * @param {() => Effect | null} fn
491
491
  */
492
492
  #v(e) {
493
- var n = m, r = v, i = q;
494
- Q(this.#o), L(this.#o), Pe(this.#o.ctx);
493
+ var r = m, n = v, i = Y;
494
+ ne(this.#o), I(this.#o), De(this.#o.ctx);
495
495
  try {
496
496
  return e();
497
497
  } catch (s) {
498
- return pn(s), null;
498
+ return Pr(s), null;
499
499
  } finally {
500
- Q(n), L(r), Pe(i);
500
+ ne(r), I(n), De(i);
501
501
  }
502
502
  }
503
503
  #m() {
504
504
  const e = (
505
505
  /** @type {(anchor: Node) => void} */
506
- this.#r.pending
506
+ this.#n.pending
507
507
  );
508
- this.#i !== null && (this.#l = document.createDocumentFragment(), Nr(this.#i, this.#l)), this.#n === null && (this.#n = ce(() => e(this.#t)));
508
+ this.#i !== null && (this.#l = document.createDocumentFragment(), Jn(this.#i, this.#l)), this.#r === null && (this.#r = pe(() => e(this.#t)));
509
509
  }
510
510
  /**
511
511
  * Updates the pending count associated with the currently visible pending snippet,
@@ -517,8 +517,8 @@ class Rr {
517
517
  this.parent && this.parent.#y(e);
518
518
  return;
519
519
  }
520
- this.#f += e, this.#f === 0 && (this.#e = !1, this.#n && $e(this.#n, () => {
521
- this.#n = null;
520
+ this.#f += e, this.#f === 0 && (this.#e = !1, this.#r && nt(this.#r, () => {
521
+ this.#r = null;
522
522
  }), this.#l && (this.#t.before(this.#l), this.#l = null));
523
523
  }
524
524
  /**
@@ -528,53 +528,53 @@ class Rr {
528
528
  * @param {1 | -1} d
529
529
  */
530
530
  update_pending_count(e) {
531
- this.#y(e), this.#h += e, yt.add(this.#d);
531
+ this.#y(e), this.#h += e, Pt.add(this.#d);
532
532
  }
533
533
  get_effect_pending() {
534
- return this.#g(), _(
534
+ return this.#g(), g(
535
535
  /** @type {Source<number>} */
536
536
  this.#u
537
537
  );
538
538
  }
539
539
  /** @param {unknown} error */
540
540
  error(e) {
541
- var n = this.#r.onerror;
542
- let r = this.#r.failed;
543
- if (this.#p || !n && !r)
541
+ var r = this.#n.onerror;
542
+ let n = this.#n.failed;
543
+ if (this.#p || !r && !n)
544
544
  throw e;
545
- this.#i && (K(this.#i), this.#i = null), this.#n && (K(this.#n), this.#n = null), this.#s && (K(this.#s), this.#s = null);
545
+ this.#i && (ee(this.#i), this.#i = null), this.#r && (ee(this.#r), this.#r = null), this.#s && (ee(this.#s), this.#s = null);
546
546
  var i = !1, s = !1;
547
547
  const o = () => {
548
548
  if (i) {
549
- Ar();
549
+ Zn();
550
550
  return;
551
551
  }
552
- i = !0, s && Pr(), ee.ensure(), this.#h = 0, this.#s !== null && $e(this.#s, () => {
552
+ i = !0, s && Bn(), ie.ensure(), this.#h = 0, this.#s !== null && nt(this.#s, () => {
553
553
  this.#s = null;
554
- }), this.#e = this.has_pending_snippet(), this.#i = this.#v(() => (this.#p = !1, ce(() => this.#c(this.#t)))), this.#f > 0 ? this.#m() : this.#e = !1;
554
+ }), this.#e = this.has_pending_snippet(), this.#i = this.#v(() => (this.#p = !1, pe(() => this.#c(this.#t)))), this.#f > 0 ? this.#m() : this.#e = !1;
555
555
  };
556
- var a = v;
556
+ var l = v;
557
557
  try {
558
- L(null), s = !0, n?.(e, o), s = !1;
559
- } catch (l) {
560
- Se(l, this.#o && this.#o.parent);
558
+ I(null), s = !0, r?.(e, o), s = !1;
559
+ } catch (a) {
560
+ Ce(a, this.#o && this.#o.parent);
561
561
  } finally {
562
- L(a);
562
+ I(l);
563
563
  }
564
- r && ot(() => {
564
+ n && ut(() => {
565
565
  this.#s = this.#v(() => {
566
566
  this.#p = !0;
567
567
  try {
568
- return ce(() => {
569
- r(
568
+ return pe(() => {
569
+ n(
570
570
  this.#t,
571
571
  () => e,
572
572
  () => o
573
573
  );
574
574
  });
575
- } catch (l) {
576
- return Se(
577
- l,
575
+ } catch (a) {
576
+ return Ce(
577
+ a,
578
578
  /** @type {Effect} */
579
579
  this.#o.parent
580
580
  ), null;
@@ -585,134 +585,134 @@ class Rr {
585
585
  });
586
586
  }
587
587
  }
588
- function Nr(t, e) {
589
- for (var n = t.nodes_start, r = t.nodes_end; n !== null; ) {
590
- var i = n === r ? null : (
588
+ function Jn(t, e) {
589
+ for (var r = t.nodes_start, n = t.nodes_end; r !== null; ) {
590
+ var i = r === n ? null : (
591
591
  /** @type {TemplateNode} */
592
- /* @__PURE__ */ Ot(n)
592
+ /* @__PURE__ */ Zt(r)
593
593
  );
594
- e.append(n), n = i;
594
+ e.append(r), r = i;
595
595
  }
596
596
  }
597
- function zr(t, e, n) {
598
- const r = Br;
597
+ function Qn(t, e, r) {
598
+ const n = ei;
599
599
  if (e.length === 0) {
600
- n(t.map(r));
600
+ r(t.map(n));
601
601
  return;
602
602
  }
603
- var i = S, s = (
603
+ var i = A, s = (
604
604
  /** @type {Effect} */
605
605
  m
606
- ), o = jr();
607
- Promise.all(e.map((a) => /* @__PURE__ */ Ur(a))).then((a) => {
606
+ ), o = $n();
607
+ Promise.all(e.map((l) => /* @__PURE__ */ ti(l))).then((l) => {
608
608
  i?.activate(), o();
609
609
  try {
610
- n([...t.map(r), ...a]);
611
- } catch (l) {
612
- (s.f & Ce) === 0 && Se(l, s);
610
+ r([...t.map(n), ...l]);
611
+ } catch (a) {
612
+ (s.f & Ie) === 0 && Ce(a, s);
613
613
  }
614
- i?.deactivate(), vn();
615
- }).catch((a) => {
616
- Se(a, s);
614
+ i?.deactivate(), Ar();
615
+ }).catch((l) => {
616
+ Ce(l, s);
617
617
  });
618
618
  }
619
- function jr() {
620
- var t = m, e = v, n = q, r = S;
619
+ function $n() {
620
+ var t = m, e = v, r = Y, n = A;
621
621
  return function() {
622
- Q(t), L(e), Pe(n), r?.activate();
622
+ ne(t), I(e), De(r), n?.activate();
623
623
  };
624
624
  }
625
- function vn() {
626
- Q(null), L(null), Pe(null);
625
+ function Ar() {
626
+ ne(null), I(null), De(null);
627
627
  }
628
628
  // @__NO_SIDE_EFFECTS__
629
- function Br(t) {
630
- var e = O | J, n = v !== null && (v.f & O) !== 0 ? (
629
+ function ei(t) {
630
+ var e = R | re, r = v !== null && (v.f & R) !== 0 ? (
631
631
  /** @type {Derived} */
632
632
  v
633
633
  ) : null;
634
- return m === null || n !== null && (n.f & U) !== 0 ? e |= U : m.f |= Te, {
635
- ctx: q,
634
+ return m === null || r !== null && (r.f & q) !== 0 ? e |= q : m.f |= Fe, {
635
+ ctx: Y,
636
636
  deps: null,
637
637
  effects: null,
638
- equals: cn,
638
+ equals: Mr,
639
639
  f: e,
640
640
  fn: t,
641
641
  reactions: null,
642
642
  rv: 0,
643
643
  v: (
644
644
  /** @type {V} */
645
- M
645
+ x
646
646
  ),
647
647
  wv: 0,
648
- parent: n ?? m,
648
+ parent: r ?? m,
649
649
  ac: null
650
650
  };
651
651
  }
652
652
  // @__NO_SIDE_EFFECTS__
653
- function Ur(t, e) {
654
- let n = (
653
+ function ti(t, e) {
654
+ let r = (
655
655
  /** @type {Effect | null} */
656
656
  m
657
657
  );
658
- n === null && gr();
659
- var r = (
658
+ r === null && Ln();
659
+ var n = (
660
660
  /** @type {Boundary} */
661
- n.b
661
+ r.b
662
662
  ), i = (
663
663
  /** @type {Promise<V>} */
664
664
  /** @type {unknown} */
665
665
  void 0
666
- ), s = at(
666
+ ), s = ft(
667
667
  /** @type {V} */
668
- M
669
- ), o = null, a = !v;
670
- return Jr(() => {
668
+ x
669
+ ), o = null, l = !v;
670
+ return ci(() => {
671
671
  try {
672
- var l = t();
673
- o && Promise.resolve(l).catch(() => {
672
+ var a = t();
673
+ o && Promise.resolve(a).catch(() => {
674
674
  });
675
675
  } catch (c) {
676
- l = Promise.reject(c);
676
+ a = Promise.reject(c);
677
677
  }
678
- var u = () => l;
679
- i = o?.then(u, u) ?? Promise.resolve(l), o = i;
678
+ var u = () => a;
679
+ i = o?.then(u, u) ?? Promise.resolve(a), o = i;
680
680
  var f = (
681
681
  /** @type {Batch} */
682
- S
683
- ), h = r.is_pending();
684
- a && (r.update_pending_count(1), h || f.increment());
685
- const p = (c, d = void 0) => {
686
- o = null, h || f.activate(), d ? d !== Ct && (s.f |= pe, nt(s, d)) : ((s.f & pe) !== 0 && (s.f ^= pe), nt(s, c)), a && (r.update_pending_count(-1), h || f.decrement()), vn();
682
+ A
683
+ ), p = n.is_pending();
684
+ l && (n.update_pending_count(1), p || f.increment());
685
+ const h = (c, d = void 0) => {
686
+ o = null, p || f.activate(), d ? d !== Nt && (s.f |= ve, ot(s, d)) : ((s.f & ve) !== 0 && (s.f ^= ve), ot(s, c)), l && (n.update_pending_count(-1), p || f.decrement()), Ar();
687
687
  };
688
- if (i.then(p, (c) => p(null, c || "unknown")), f)
688
+ if (i.then(h, (c) => h(null, c || "unknown")), f)
689
689
  return () => {
690
690
  queueMicrotask(() => f.neuter());
691
691
  };
692
- }), new Promise((l) => {
692
+ }), new Promise((a) => {
693
693
  function u(f) {
694
- function h() {
695
- f === i ? l(s) : u(i);
694
+ function p() {
695
+ f === i ? a(s) : u(i);
696
696
  }
697
- f.then(h, h);
697
+ f.then(p, p);
698
698
  }
699
699
  u(i);
700
700
  });
701
701
  }
702
- function mn(t) {
702
+ function Dr(t) {
703
703
  var e = t.effects;
704
704
  if (e !== null) {
705
705
  t.effects = null;
706
- for (var n = 0; n < e.length; n += 1)
707
- K(
706
+ for (var r = 0; r < e.length; r += 1)
707
+ ee(
708
708
  /** @type {Effect} */
709
- e[n]
709
+ e[r]
710
710
  );
711
711
  }
712
712
  }
713
- function Zr(t) {
713
+ function ri(t) {
714
714
  for (var e = t.parent; e !== null; ) {
715
- if ((e.f & O) === 0)
715
+ if ((e.f & R) === 0)
716
716
  return (
717
717
  /** @type {Effect} */
718
718
  e
@@ -721,264 +721,264 @@ function Zr(t) {
721
721
  }
722
722
  return null;
723
723
  }
724
- function Ft(t) {
725
- var e, n = m;
726
- Q(Zr(t));
724
+ function Ut(t) {
725
+ var e, r = m;
726
+ ne(ri(t));
727
727
  try {
728
- mn(t), e = In(t);
728
+ Dr(t), e = Vr(t);
729
729
  } finally {
730
- Q(n);
730
+ ne(r);
731
731
  }
732
732
  return e;
733
733
  }
734
- function yn(t) {
735
- var e = Ft(t);
736
- if (t.equals(e) || (t.v = e, t.wv = Tn()), !Le) {
737
- var n = (se || (t.f & U) !== 0) && t.deps !== null ? le : T;
738
- Z(t, n);
734
+ function Cr(t) {
735
+ var e = Ut(t);
736
+ if (t.equals(e) || (t.v = e, t.wv = Hr()), !Oe) {
737
+ var r = (le || (t.f & q) !== 0) && t.deps !== null ? ce : L;
738
+ H(t, r);
739
739
  }
740
740
  }
741
- const oe = /* @__PURE__ */ new Map();
742
- function at(t, e) {
743
- var n = {
741
+ const ue = /* @__PURE__ */ new Map();
742
+ function ft(t, e) {
743
+ var r = {
744
744
  f: 0,
745
745
  // TODO ideally we could skip this altogether, but it causes type errors
746
746
  v: t,
747
747
  reactions: null,
748
- equals: cn,
748
+ equals: Mr,
749
749
  rv: 0,
750
750
  wv: 0
751
751
  };
752
- return n;
752
+ return r;
753
753
  }
754
754
  // @__NO_SIDE_EFFECTS__
755
- function A(t, e) {
756
- const n = at(t);
757
- return ni(n), n;
755
+ function D(t, e) {
756
+ const r = ft(t);
757
+ return mi(r), r;
758
758
  }
759
- function x(t, e, n = !1) {
759
+ function P(t, e, r = !1) {
760
760
  v !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
761
761
  // to ensure we error if state is set inside an inspect effect
762
- (!Y || (v.f & Kt) !== 0) && hn() && (v.f & (O | De | Dt | Kt)) !== 0 && !te?.includes(t) && xr();
763
- let r = n ? Fe(e) : e;
764
- return nt(t, r);
762
+ (!G || (v.f & or) !== 0) && xr() && (v.f & (R | Le | Rt | or)) !== 0 && !se?.includes(t) && zn();
763
+ let n = r ? je(e) : e;
764
+ return ot(t, n);
765
765
  }
766
- function nt(t, e) {
766
+ function ot(t, e) {
767
767
  if (!t.equals(e)) {
768
- var n = t.v;
769
- Le ? oe.set(t, e) : oe.set(t, n), t.v = e;
770
- var r = ee.ensure();
771
- r.capture(t, n), (t.f & O) !== 0 && ((t.f & J) !== 0 && Ft(
768
+ var r = t.v;
769
+ Oe ? ue.set(t, e) : ue.set(t, r), t.v = e;
770
+ var n = ie.ensure();
771
+ n.capture(t, r), (t.f & R) !== 0 && ((t.f & re) !== 0 && Ut(
772
772
  /** @type {Derived} */
773
773
  t
774
- ), Z(t, (t.f & U) === 0 ? T : le)), t.wv = Tn(), gn(t, J), m !== null && (m.f & T) !== 0 && (m.f & (ae | me)) === 0 && (N === null ? ri([t]) : N.push(t));
774
+ ), H(t, (t.f & q) === 0 ? L : ce)), t.wv = Hr(), Tr(t, re), m !== null && (m.f & L) !== 0 && (m.f & (fe | ge)) === 0 && (j === null ? yi([t]) : j.push(t));
775
775
  }
776
776
  return e;
777
777
  }
778
- function Re(t) {
779
- x(t, t.v + 1);
778
+ function Ze(t) {
779
+ P(t, t.v + 1);
780
780
  }
781
- function gn(t, e) {
782
- var n = t.reactions;
783
- if (n !== null)
784
- for (var r = n.length, i = 0; i < r; i++) {
785
- var s = n[i], o = s.f, a = (o & J) === 0;
786
- a && Z(s, e), (o & O) !== 0 ? gn(
781
+ function Tr(t, e) {
782
+ var r = t.reactions;
783
+ if (r !== null)
784
+ for (var n = r.length, i = 0; i < n; i++) {
785
+ var s = r[i], o = s.f, l = (o & re) === 0;
786
+ l && H(s, e), (o & R) !== 0 ? Tr(
787
787
  /** @type {Derived} */
788
788
  s,
789
- le
790
- ) : a && ((o & De) !== 0 && he !== null && he.push(
789
+ ce
790
+ ) : l && ((o & Le) !== 0 && de !== null && de.push(
791
791
  /** @type {Effect} */
792
792
  s
793
- ), Ze(
793
+ ), We(
794
794
  /** @type {Effect} */
795
795
  s
796
796
  ));
797
797
  }
798
798
  }
799
- function Fe(t) {
800
- if (typeof t != "object" || t === null || Qe in t)
799
+ function je(t) {
800
+ if (typeof t != "object" || t === null || rt in t)
801
801
  return t;
802
- const e = pr(t);
803
- if (e !== cr && e !== hr)
802
+ const e = Sn(t);
803
+ if (e !== xn && e !== Pn)
804
804
  return t;
805
- var n = /* @__PURE__ */ new Map(), r = ln(t), i = /* @__PURE__ */ A(0), s = de, o = (a) => {
806
- if (de === s)
807
- return a();
808
- var l = v, u = de;
809
- L(null), tn(s);
810
- var f = a();
811
- return L(l), tn(u), f;
805
+ var r = /* @__PURE__ */ new Map(), n = br(t), i = /* @__PURE__ */ D(0), s = me, o = (l) => {
806
+ if (me === s)
807
+ return l();
808
+ var a = v, u = me;
809
+ I(null), hr(s);
810
+ var f = l();
811
+ return I(a), hr(u), f;
812
812
  };
813
- return r && n.set("length", /* @__PURE__ */ A(
813
+ return n && r.set("length", /* @__PURE__ */ D(
814
814
  /** @type {any[]} */
815
815
  t.length
816
816
  )), new Proxy(
817
817
  /** @type {any} */
818
818
  t,
819
819
  {
820
- defineProperty(a, l, u) {
821
- (!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) && kr();
822
- var f = n.get(l);
820
+ defineProperty(l, a, u) {
821
+ (!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) && Nn();
822
+ var f = r.get(a);
823
823
  return f === void 0 ? f = o(() => {
824
- var h = /* @__PURE__ */ A(u.value);
825
- return n.set(l, h), h;
826
- }) : x(f, u.value, !0), !0;
824
+ var p = /* @__PURE__ */ D(u.value);
825
+ return r.set(a, p), p;
826
+ }) : P(f, u.value, !0), !0;
827
827
  },
828
- deleteProperty(a, l) {
829
- var u = n.get(l);
828
+ deleteProperty(l, a) {
829
+ var u = r.get(a);
830
830
  if (u === void 0) {
831
- if (l in a) {
832
- const f = o(() => /* @__PURE__ */ A(M));
833
- n.set(l, f), Re(i);
831
+ if (a in l) {
832
+ const f = o(() => /* @__PURE__ */ D(x));
833
+ r.set(a, f), Ze(i);
834
834
  }
835
835
  } else
836
- x(u, M), Re(i);
836
+ P(u, x), Ze(i);
837
837
  return !0;
838
838
  },
839
- get(a, l, u) {
840
- if (l === Qe)
839
+ get(l, a, u) {
840
+ if (a === rt)
841
841
  return t;
842
- var f = n.get(l), h = l in a;
843
- if (f === void 0 && (!h || Oe(a, l)?.writable) && (f = o(() => {
844
- var c = Fe(h ? a[l] : M), d = /* @__PURE__ */ A(c);
842
+ var f = r.get(a), p = a in l;
843
+ if (f === void 0 && (!p || Ue(l, a)?.writable) && (f = o(() => {
844
+ var c = je(p ? l[a] : x), d = /* @__PURE__ */ D(c);
845
845
  return d;
846
- }), n.set(l, f)), f !== void 0) {
847
- var p = _(f);
848
- return p === M ? void 0 : p;
846
+ }), r.set(a, f)), f !== void 0) {
847
+ var h = g(f);
848
+ return h === x ? void 0 : h;
849
849
  }
850
- return Reflect.get(a, l, u);
850
+ return Reflect.get(l, a, u);
851
851
  },
852
- getOwnPropertyDescriptor(a, l) {
853
- var u = Reflect.getOwnPropertyDescriptor(a, l);
852
+ getOwnPropertyDescriptor(l, a) {
853
+ var u = Reflect.getOwnPropertyDescriptor(l, a);
854
854
  if (u && "value" in u) {
855
- var f = n.get(l);
856
- f && (u.value = _(f));
855
+ var f = r.get(a);
856
+ f && (u.value = g(f));
857
857
  } else if (u === void 0) {
858
- var h = n.get(l), p = h?.v;
859
- if (h !== void 0 && p !== M)
858
+ var p = r.get(a), h = p?.v;
859
+ if (p !== void 0 && h !== x)
860
860
  return {
861
861
  enumerable: !0,
862
862
  configurable: !0,
863
- value: p,
863
+ value: h,
864
864
  writable: !0
865
865
  };
866
866
  }
867
867
  return u;
868
868
  },
869
- has(a, l) {
870
- if (l === Qe)
869
+ has(l, a) {
870
+ if (a === rt)
871
871
  return !0;
872
- var u = n.get(l), f = u !== void 0 && u.v !== M || Reflect.has(a, l);
873
- if (u !== void 0 || m !== null && (!f || Oe(a, l)?.writable)) {
872
+ var u = r.get(a), f = u !== void 0 && u.v !== x || Reflect.has(l, a);
873
+ if (u !== void 0 || m !== null && (!f || Ue(l, a)?.writable)) {
874
874
  u === void 0 && (u = o(() => {
875
- var p = f ? Fe(a[l]) : M, c = /* @__PURE__ */ A(p);
875
+ var h = f ? je(l[a]) : x, c = /* @__PURE__ */ D(h);
876
876
  return c;
877
- }), n.set(l, u));
878
- var h = _(u);
879
- if (h === M)
877
+ }), r.set(a, u));
878
+ var p = g(u);
879
+ if (p === x)
880
880
  return !1;
881
881
  }
882
882
  return f;
883
883
  },
884
- set(a, l, u, f) {
885
- var h = n.get(l), p = l in a;
886
- if (r && l === "length")
884
+ set(l, a, u, f) {
885
+ var p = r.get(a), h = a in l;
886
+ if (n && a === "length")
887
887
  for (var c = u; c < /** @type {Source<number>} */
888
- h.v; c += 1) {
889
- var d = n.get(c + "");
890
- d !== void 0 ? x(d, M) : c in a && (d = o(() => /* @__PURE__ */ A(M)), n.set(c + "", d));
888
+ p.v; c += 1) {
889
+ var d = r.get(c + "");
890
+ d !== void 0 ? P(d, x) : c in l && (d = o(() => /* @__PURE__ */ D(x)), r.set(c + "", d));
891
891
  }
892
- if (h === void 0)
893
- (!p || Oe(a, l)?.writable) && (h = o(() => /* @__PURE__ */ A(void 0)), x(h, Fe(u)), n.set(l, h));
892
+ if (p === void 0)
893
+ (!h || Ue(l, a)?.writable) && (p = o(() => /* @__PURE__ */ D(void 0)), P(p, je(u)), r.set(a, p));
894
894
  else {
895
- p = h.v !== M;
896
- var k = o(() => Fe(u));
897
- x(h, k);
895
+ h = p.v !== x;
896
+ var w = o(() => je(u));
897
+ P(p, w);
898
898
  }
899
- var I = Reflect.getOwnPropertyDescriptor(a, l);
900
- if (I?.set && I.set.call(f, u), !p) {
901
- if (r && typeof l == "string") {
902
- var V = (
899
+ var F = Reflect.getOwnPropertyDescriptor(l, a);
900
+ if (F?.set && F.set.call(f, u), !h) {
901
+ if (n && typeof a == "string") {
902
+ var K = (
903
903
  /** @type {Source<number>} */
904
- n.get("length")
905
- ), w = Number(l);
906
- Number.isInteger(w) && w >= V.v && x(V, w + 1);
904
+ r.get("length")
905
+ ), k = Number(a);
906
+ Number.isInteger(k) && k >= K.v && P(K, k + 1);
907
907
  }
908
- Re(i);
908
+ Ze(i);
909
909
  }
910
910
  return !0;
911
911
  },
912
- ownKeys(a) {
913
- _(i);
914
- var l = Reflect.ownKeys(a).filter((h) => {
915
- var p = n.get(h);
916
- return p === void 0 || p.v !== M;
912
+ ownKeys(l) {
913
+ g(i);
914
+ var a = Reflect.ownKeys(l).filter((p) => {
915
+ var h = r.get(p);
916
+ return h === void 0 || h.v !== x;
917
917
  });
918
- for (var [u, f] of n)
919
- f.v !== M && !(u in a) && l.push(u);
920
- return l;
918
+ for (var [u, f] of r)
919
+ f.v !== x && !(u in l) && a.push(u);
920
+ return a;
921
921
  },
922
922
  setPrototypeOf() {
923
- Mr();
923
+ jn();
924
924
  }
925
925
  }
926
926
  );
927
927
  }
928
- var Qt, _n, wn, En;
929
- function qr() {
930
- if (Qt === void 0) {
931
- Qt = window, _n = /Firefox/.test(navigator.userAgent);
932
- var t = Element.prototype, e = Node.prototype, n = Text.prototype;
933
- wn = Oe(e, "firstChild").get, En = Oe(e, "nextSibling").get, Gt(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), Gt(n) && (n.__t = void 0);
928
+ var lr, Lr, Ir, Fr;
929
+ function ni() {
930
+ if (lr === void 0) {
931
+ lr = window, Lr = /Firefox/.test(navigator.userAgent);
932
+ var t = Element.prototype, e = Node.prototype, r = Text.prototype;
933
+ Ir = Ue(e, "firstChild").get, Fr = Ue(e, "nextSibling").get, sr(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), sr(r) && (r.__t = void 0);
934
934
  }
935
935
  }
936
- function Hr(t = "") {
936
+ function ii(t = "") {
937
937
  return document.createTextNode(t);
938
938
  }
939
939
  // @__NO_SIDE_EFFECTS__
940
- function bn(t) {
941
- return wn.call(t);
940
+ function Or(t) {
941
+ return Ir.call(t);
942
942
  }
943
943
  // @__NO_SIDE_EFFECTS__
944
- function Ot(t) {
945
- return En.call(t);
944
+ function Zt(t) {
945
+ return Fr.call(t);
946
946
  }
947
- function _t(t, e) {
948
- return /* @__PURE__ */ bn(t);
947
+ function ur(t, e) {
948
+ return /* @__PURE__ */ Or(t);
949
949
  }
950
- function Yr(t, e = 1, n = !1) {
951
- let r = t;
950
+ function si(t, e = 1, r = !1) {
951
+ let n = t;
952
952
  for (; e--; )
953
- r = /** @type {TemplateNode} */
954
- /* @__PURE__ */ Ot(r);
955
- return r;
953
+ n = /** @type {TemplateNode} */
954
+ /* @__PURE__ */ Zt(n);
955
+ return n;
956
956
  }
957
- function kn(t) {
958
- var e = v, n = m;
959
- L(null), Q(null);
957
+ function Rr(t) {
958
+ var e = v, r = m;
959
+ I(null), ne(null);
960
960
  try {
961
961
  return t();
962
962
  } finally {
963
- L(e), Q(n);
963
+ I(e), ne(r);
964
964
  }
965
965
  }
966
- function Vr(t) {
967
- m === null && v === null && Er(), v !== null && (v.f & U) !== 0 && m === null && wr(), Le && _r();
966
+ function oi(t) {
967
+ m === null && v === null && On(), v !== null && (v.f & q) !== 0 && m === null && Fn(), Oe && In();
968
968
  }
969
- function Xr(t, e) {
970
- var n = e.last;
971
- n === null ? e.last = e.first = t : (n.next = t, t.prev = n, e.last = t);
969
+ function ai(t, e) {
970
+ var r = e.last;
971
+ r === null ? e.last = e.first = t : (r.next = t, t.prev = r, e.last = t);
972
972
  }
973
- function ue(t, e, n, r = !0) {
973
+ function he(t, e, r, n = !0) {
974
974
  var i = m;
975
- i !== null && (i.f & xe) !== 0 && (t |= xe);
975
+ i !== null && (i.f & Ae) !== 0 && (t |= Ae);
976
976
  var s = {
977
- ctx: q,
977
+ ctx: Y,
978
978
  deps: null,
979
979
  nodes_start: null,
980
980
  nodes_end: null,
981
- f: t | J,
981
+ f: t | re,
982
982
  first: null,
983
983
  fn: e,
984
984
  last: null,
@@ -991,403 +991,403 @@ function ue(t, e, n, r = !0) {
991
991
  wv: 0,
992
992
  ac: null
993
993
  };
994
- if (n)
994
+ if (r)
995
995
  try {
996
- Me(s), s.f |= At;
997
- } catch (l) {
998
- throw K(s), l;
996
+ Se(s), s.f |= Ot;
997
+ } catch (a) {
998
+ throw ee(s), a;
999
999
  }
1000
- else e !== null && Ze(s);
1001
- if (r) {
1000
+ else e !== null && We(s);
1001
+ if (n) {
1002
1002
  var o = s;
1003
- if (n && o.deps === null && o.teardown === null && o.nodes_start === null && o.first === o.last && // either `null`, or a singular child
1004
- (o.f & Te) === 0 && (o = o.first), o !== null && (o.parent = i, i !== null && Xr(o, i), v !== null && (v.f & O) !== 0 && (t & me) === 0)) {
1005
- var a = (
1003
+ if (r && o.deps === null && o.teardown === null && o.nodes_start === null && o.first === o.last && // either `null`, or a singular child
1004
+ (o.f & Fe) === 0 && (o = o.first), o !== null && (o.parent = i, i !== null && ai(o, i), v !== null && (v.f & R) !== 0 && (t & ge) === 0)) {
1005
+ var l = (
1006
1006
  /** @type {Derived} */
1007
1007
  v
1008
1008
  );
1009
- (a.effects ??= []).push(o);
1009
+ (l.effects ??= []).push(o);
1010
1010
  }
1011
1011
  }
1012
1012
  return s;
1013
1013
  }
1014
- function Wr() {
1015
- return v !== null && !Y;
1014
+ function li() {
1015
+ return v !== null && !G;
1016
1016
  }
1017
- function X(t) {
1018
- Vr();
1017
+ function J(t) {
1018
+ oi();
1019
1019
  var e = (
1020
1020
  /** @type {Effect} */
1021
1021
  m.f
1022
- ), n = !v && (e & ae) !== 0 && (e & At) === 0;
1023
- if (n) {
1024
- var r = (
1022
+ ), r = !v && (e & fe) !== 0 && (e & Ot) === 0;
1023
+ if (r) {
1024
+ var n = (
1025
1025
  /** @type {ComponentContext} */
1026
- q
1026
+ Y
1027
1027
  );
1028
- (r.e ??= []).push(t);
1028
+ (n.e ??= []).push(t);
1029
1029
  } else
1030
- return Mn(t);
1031
- }
1032
- function Mn(t) {
1033
- return ue(Pt | yr, t, !1);
1034
- }
1035
- function Gr(t) {
1036
- ee.ensure();
1037
- const e = ue(me | Te, t, !0);
1038
- return (n = {}) => new Promise((r) => {
1039
- n.outro ? $e(e, () => {
1040
- K(e), r(void 0);
1041
- }) : (K(e), r(void 0));
1030
+ return Nr(t);
1031
+ }
1032
+ function Nr(t) {
1033
+ return he(It | Tn, t, !1);
1034
+ }
1035
+ function ui(t) {
1036
+ ie.ensure();
1037
+ const e = he(ge | Fe, t, !0);
1038
+ return (r = {}) => new Promise((n) => {
1039
+ r.outro ? nt(e, () => {
1040
+ ee(e), n(void 0);
1041
+ }) : (ee(e), n(void 0));
1042
1042
  });
1043
1043
  }
1044
- function Kr(t) {
1045
- return ue(Pt, t, !1);
1044
+ function fi(t) {
1045
+ return he(It, t, !1);
1046
1046
  }
1047
- function Jr(t) {
1048
- return ue(Dt | Te, t, !0);
1047
+ function ci(t) {
1048
+ return he(Rt | Fe, t, !0);
1049
1049
  }
1050
- function Rt(t, e = 0) {
1051
- return ue(un | e, t, !0);
1050
+ function qt(t, e = 0) {
1051
+ return he(Er | e, t, !0);
1052
1052
  }
1053
- function xn(t, e = [], n = []) {
1054
- zr(e, n, (r) => {
1055
- ue(un, () => t(...r.map(_)), !0);
1053
+ function jr(t, e = [], r = []) {
1054
+ Qn(e, r, (n) => {
1055
+ he(Er, () => t(...n.map(g)), !0);
1056
1056
  });
1057
1057
  }
1058
- function Qr(t, e = 0) {
1059
- var n = ue(De | e, t, !0);
1060
- return n;
1058
+ function hi(t, e = 0) {
1059
+ var r = he(Le | e, t, !0);
1060
+ return r;
1061
1061
  }
1062
- function ce(t, e = !0) {
1063
- return ue(ae | Te, t, !0, e);
1062
+ function pe(t, e = !0) {
1063
+ return he(fe | Fe, t, !0, e);
1064
1064
  }
1065
- function Pn(t) {
1065
+ function zr(t) {
1066
1066
  var e = t.teardown;
1067
1067
  if (e !== null) {
1068
- const n = Le, r = v;
1069
- en(!0), L(null);
1068
+ const r = Oe, n = v;
1069
+ cr(!0), I(null);
1070
1070
  try {
1071
1071
  e.call(null);
1072
1072
  } finally {
1073
- en(n), L(r);
1073
+ cr(r), I(n);
1074
1074
  }
1075
1075
  }
1076
1076
  }
1077
- function Sn(t, e = !1) {
1078
- var n = t.first;
1079
- for (t.first = t.last = null; n !== null; ) {
1080
- const i = n.ac;
1081
- i !== null && kn(() => {
1082
- i.abort(Ct);
1077
+ function Br(t, e = !1) {
1078
+ var r = t.first;
1079
+ for (t.first = t.last = null; r !== null; ) {
1080
+ const i = r.ac;
1081
+ i !== null && Rr(() => {
1082
+ i.abort(Nt);
1083
1083
  });
1084
- var r = n.next;
1085
- (n.f & me) !== 0 ? n.parent = null : K(n, e), n = r;
1084
+ var n = r.next;
1085
+ (r.f & ge) !== 0 ? r.parent = null : ee(r, e), r = n;
1086
1086
  }
1087
1087
  }
1088
- function $r(t) {
1088
+ function pi(t) {
1089
1089
  for (var e = t.first; e !== null; ) {
1090
- var n = e.next;
1091
- (e.f & ae) === 0 && K(e), e = n;
1090
+ var r = e.next;
1091
+ (e.f & fe) === 0 && ee(e), e = r;
1092
1092
  }
1093
1093
  }
1094
- function K(t, e = !0) {
1095
- var n = !1;
1096
- (e || (t.f & mr) !== 0) && t.nodes_start !== null && t.nodes_end !== null && (ei(
1094
+ function ee(t, e = !0) {
1095
+ var r = !1;
1096
+ (e || (t.f & Cn) !== 0) && t.nodes_start !== null && t.nodes_end !== null && (di(
1097
1097
  t.nodes_start,
1098
1098
  /** @type {TemplateNode} */
1099
1099
  t.nodes_end
1100
- ), n = !0), Sn(t, e && !n), rt(t, 0), Z(t, Ce);
1101
- var r = t.transitions;
1102
- if (r !== null)
1103
- for (const s of r)
1100
+ ), r = !0), Br(t, e && !r), at(t, 0), H(t, Ie);
1101
+ var n = t.transitions;
1102
+ if (n !== null)
1103
+ for (const s of n)
1104
1104
  s.stop();
1105
- Pn(t);
1105
+ zr(t);
1106
1106
  var i = t.parent;
1107
- i !== null && i.first !== null && An(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes_start = t.nodes_end = t.ac = null;
1107
+ i !== null && i.first !== null && Ur(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes_start = t.nodes_end = t.ac = null;
1108
1108
  }
1109
- function ei(t, e) {
1109
+ function di(t, e) {
1110
1110
  for (; t !== null; ) {
1111
- var n = t === e ? null : (
1111
+ var r = t === e ? null : (
1112
1112
  /** @type {TemplateNode} */
1113
- /* @__PURE__ */ Ot(t)
1113
+ /* @__PURE__ */ Zt(t)
1114
1114
  );
1115
- t.remove(), t = n;
1115
+ t.remove(), t = r;
1116
1116
  }
1117
1117
  }
1118
- function An(t) {
1119
- var e = t.parent, n = t.prev, r = t.next;
1120
- n !== null && (n.next = r), r !== null && (r.prev = n), e !== null && (e.first === t && (e.first = r), e.last === t && (e.last = n));
1118
+ function Ur(t) {
1119
+ var e = t.parent, r = t.prev, n = t.next;
1120
+ r !== null && (r.next = n), n !== null && (n.prev = r), e !== null && (e.first === t && (e.first = n), e.last === t && (e.last = r));
1121
1121
  }
1122
- function $e(t, e) {
1123
- var n = [];
1124
- Dn(t, n, !0), ti(n, () => {
1125
- K(t), e && e();
1122
+ function nt(t, e) {
1123
+ var r = [];
1124
+ Zr(t, r, !0), vi(r, () => {
1125
+ ee(t), e && e();
1126
1126
  });
1127
1127
  }
1128
- function ti(t, e) {
1129
- var n = t.length;
1130
- if (n > 0) {
1131
- var r = () => --n || e();
1128
+ function vi(t, e) {
1129
+ var r = t.length;
1130
+ if (r > 0) {
1131
+ var n = () => --r || e();
1132
1132
  for (var i of t)
1133
- i.out(r);
1133
+ i.out(n);
1134
1134
  } else
1135
1135
  e();
1136
1136
  }
1137
- function Dn(t, e, n) {
1138
- if ((t.f & xe) === 0) {
1139
- if (t.f ^= xe, t.transitions !== null)
1137
+ function Zr(t, e, r) {
1138
+ if ((t.f & Ae) === 0) {
1139
+ if (t.f ^= Ae, t.transitions !== null)
1140
1140
  for (const o of t.transitions)
1141
- (o.is_global || n) && e.push(o);
1142
- for (var r = t.first; r !== null; ) {
1143
- var i = r.next, s = (r.f & fn) !== 0 || (r.f & ae) !== 0;
1144
- Dn(r, e, s ? n : !1), r = i;
1141
+ (o.is_global || r) && e.push(o);
1142
+ for (var n = t.first; n !== null; ) {
1143
+ var i = n.next, s = (n.f & kr) !== 0 || (n.f & fe) !== 0;
1144
+ Zr(n, e, s ? r : !1), n = i;
1145
1145
  }
1146
1146
  }
1147
1147
  }
1148
- let ke = !1;
1149
- function $t(t) {
1150
- ke = t;
1148
+ let Pe = !1;
1149
+ function fr(t) {
1150
+ Pe = t;
1151
1151
  }
1152
- let Le = !1;
1153
- function en(t) {
1154
- Le = t;
1152
+ let Oe = !1;
1153
+ function cr(t) {
1154
+ Oe = t;
1155
1155
  }
1156
- let v = null, Y = !1;
1157
- function L(t) {
1156
+ let v = null, G = !1;
1157
+ function I(t) {
1158
1158
  v = t;
1159
1159
  }
1160
1160
  let m = null;
1161
- function Q(t) {
1161
+ function ne(t) {
1162
1162
  m = t;
1163
1163
  }
1164
- let te = null;
1165
- function ni(t) {
1166
- v !== null && (te === null ? te = [t] : te.push(t));
1164
+ let se = null;
1165
+ function mi(t) {
1166
+ v !== null && (se === null ? se = [t] : se.push(t));
1167
1167
  }
1168
- let D = null, F = 0, N = null;
1169
- function ri(t) {
1170
- N = t;
1168
+ let C = null, O = 0, j = null;
1169
+ function yi(t) {
1170
+ j = t;
1171
1171
  }
1172
- let Cn = 1, qe = 0, de = qe;
1173
- function tn(t) {
1174
- de = t;
1172
+ let qr = 1, Ge = 0, me = Ge;
1173
+ function hr(t) {
1174
+ me = t;
1175
1175
  }
1176
- let se = !1;
1177
- function Tn() {
1178
- return ++Cn;
1176
+ let le = !1;
1177
+ function Hr() {
1178
+ return ++qr;
1179
1179
  }
1180
- function lt(t) {
1180
+ function ct(t) {
1181
1181
  var e = t.f;
1182
- if ((e & J) !== 0)
1182
+ if ((e & re) !== 0)
1183
1183
  return !0;
1184
- if ((e & le) !== 0) {
1185
- var n = t.deps, r = (e & U) !== 0;
1186
- if (n !== null) {
1187
- var i, s, o = (e & tt) !== 0, a = r && m !== null && !se, l = n.length;
1188
- if ((o || a) && (m === null || (m.f & Ce) === 0)) {
1184
+ if ((e & ce) !== 0) {
1185
+ var r = t.deps, n = (e & q) !== 0;
1186
+ if (r !== null) {
1187
+ var i, s, o = (e & st) !== 0, l = n && m !== null && !le, a = r.length;
1188
+ if ((o || l) && (m === null || (m.f & Ie) === 0)) {
1189
1189
  var u = (
1190
1190
  /** @type {Derived} */
1191
1191
  t
1192
1192
  ), f = u.parent;
1193
- for (i = 0; i < l; i++)
1194
- s = n[i], (o || !s?.reactions?.includes(u)) && (s.reactions ??= []).push(u);
1195
- o && (u.f ^= tt), a && f !== null && (f.f & U) === 0 && (u.f ^= U);
1193
+ for (i = 0; i < a; i++)
1194
+ s = r[i], (o || !s?.reactions?.includes(u)) && (s.reactions ??= []).push(u);
1195
+ o && (u.f ^= st), l && f !== null && (f.f & q) === 0 && (u.f ^= q);
1196
1196
  }
1197
- for (i = 0; i < l; i++)
1198
- if (s = n[i], lt(
1197
+ for (i = 0; i < a; i++)
1198
+ if (s = r[i], ct(
1199
1199
  /** @type {Derived} */
1200
1200
  s
1201
- ) && yn(
1201
+ ) && Cr(
1202
1202
  /** @type {Derived} */
1203
1203
  s
1204
1204
  ), s.wv > t.wv)
1205
1205
  return !0;
1206
1206
  }
1207
- (!r || m !== null && !se) && Z(t, T);
1207
+ (!n || m !== null && !le) && H(t, L);
1208
1208
  }
1209
1209
  return !1;
1210
1210
  }
1211
- function Ln(t, e, n = !0) {
1212
- var r = t.reactions;
1213
- if (r !== null && !te?.includes(t))
1214
- for (var i = 0; i < r.length; i++) {
1215
- var s = r[i];
1216
- (s.f & O) !== 0 ? Ln(
1211
+ function Yr(t, e, r = !0) {
1212
+ var n = t.reactions;
1213
+ if (n !== null && !se?.includes(t))
1214
+ for (var i = 0; i < n.length; i++) {
1215
+ var s = n[i];
1216
+ (s.f & R) !== 0 ? Yr(
1217
1217
  /** @type {Derived} */
1218
1218
  s,
1219
1219
  e,
1220
1220
  !1
1221
- ) : e === s && (n ? Z(s, J) : (s.f & T) !== 0 && Z(s, le), Ze(
1221
+ ) : e === s && (r ? H(s, re) : (s.f & L) !== 0 && H(s, ce), We(
1222
1222
  /** @type {Effect} */
1223
1223
  s
1224
1224
  ));
1225
1225
  }
1226
1226
  }
1227
- function In(t) {
1228
- var e = D, n = F, r = N, i = v, s = se, o = te, a = q, l = Y, u = de, f = t.f;
1229
- D = /** @type {null | Value[]} */
1230
- null, F = 0, N = null, se = (f & U) !== 0 && (Y || !ke || v === null), v = (f & (ae | me)) === 0 ? t : null, te = null, Pe(t.ctx), Y = !1, de = ++qe, t.ac !== null && (kn(() => {
1231
- t.ac.abort(Ct);
1227
+ function Vr(t) {
1228
+ var e = C, r = O, n = j, i = v, s = le, o = se, l = Y, a = G, u = me, f = t.f;
1229
+ C = /** @type {null | Value[]} */
1230
+ null, O = 0, j = null, le = (f & q) !== 0 && (G || !Pe || v === null), v = (f & (fe | ge)) === 0 ? t : null, se = null, De(t.ctx), G = !1, me = ++Ge, t.ac !== null && (Rr(() => {
1231
+ t.ac.abort(Nt);
1232
1232
  }), t.ac = null);
1233
1233
  try {
1234
- t.f |= mt;
1235
- var h = (
1234
+ t.f |= xt;
1235
+ var p = (
1236
1236
  /** @type {Function} */
1237
1237
  t.fn
1238
- ), p = h(), c = t.deps;
1239
- if (D !== null) {
1238
+ ), h = p(), c = t.deps;
1239
+ if (C !== null) {
1240
1240
  var d;
1241
- if (rt(t, F), c !== null && F > 0)
1242
- for (c.length = F + D.length, d = 0; d < D.length; d++)
1243
- c[F + d] = D[d];
1241
+ if (at(t, O), c !== null && O > 0)
1242
+ for (c.length = O + C.length, d = 0; d < C.length; d++)
1243
+ c[O + d] = C[d];
1244
1244
  else
1245
- t.deps = c = D;
1246
- if (!se || // Deriveds that already have reactions can cleanup, so we still add them as reactions
1247
- (f & O) !== 0 && /** @type {import('#client').Derived} */
1245
+ t.deps = c = C;
1246
+ if (!le || // Deriveds that already have reactions can cleanup, so we still add them as reactions
1247
+ (f & R) !== 0 && /** @type {import('#client').Derived} */
1248
1248
  t.reactions !== null)
1249
- for (d = F; d < c.length; d++)
1249
+ for (d = O; d < c.length; d++)
1250
1250
  (c[d].reactions ??= []).push(t);
1251
- } else c !== null && F < c.length && (rt(t, F), c.length = F);
1252
- if (hn() && N !== null && !Y && c !== null && (t.f & (O | le | J)) === 0)
1251
+ } else c !== null && O < c.length && (at(t, O), c.length = O);
1252
+ if (xr() && j !== null && !G && c !== null && (t.f & (R | ce | re)) === 0)
1253
1253
  for (d = 0; d < /** @type {Source[]} */
1254
- N.length; d++)
1255
- Ln(
1256
- N[d],
1254
+ j.length; d++)
1255
+ Yr(
1256
+ j[d],
1257
1257
  /** @type {Effect} */
1258
1258
  t
1259
1259
  );
1260
- return i !== null && i !== t && (qe++, N !== null && (r === null ? r = N : r.push(.../** @type {Source[]} */
1261
- N))), (t.f & pe) !== 0 && (t.f ^= pe), p;
1262
- } catch (k) {
1263
- return pn(k);
1260
+ return i !== null && i !== t && (Ge++, j !== null && (n === null ? n = j : n.push(.../** @type {Source[]} */
1261
+ j))), (t.f & ve) !== 0 && (t.f ^= ve), h;
1262
+ } catch (w) {
1263
+ return Pr(w);
1264
1264
  } finally {
1265
- t.f ^= mt, D = e, F = n, N = r, v = i, se = s, te = o, Pe(a), Y = l, de = u;
1265
+ t.f ^= xt, C = e, O = r, j = n, v = i, le = s, se = o, De(l), G = a, me = u;
1266
1266
  }
1267
1267
  }
1268
- function ii(t, e) {
1269
- let n = e.reactions;
1270
- if (n !== null) {
1271
- var r = ur.call(n, t);
1272
- if (r !== -1) {
1273
- var i = n.length - 1;
1274
- i === 0 ? n = e.reactions = null : (n[r] = n[i], n.pop());
1268
+ function gi(t, e) {
1269
+ let r = e.reactions;
1270
+ if (r !== null) {
1271
+ var n = kn.call(r, t);
1272
+ if (n !== -1) {
1273
+ var i = r.length - 1;
1274
+ i === 0 ? r = e.reactions = null : (r[n] = r[i], r.pop());
1275
1275
  }
1276
1276
  }
1277
- n === null && (e.f & O) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
1277
+ r === null && (e.f & R) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
1278
1278
  // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
1279
1279
  // allows us to skip the expensive work of disconnecting and immediately reconnecting it
1280
- (D === null || !D.includes(e)) && (Z(e, le), (e.f & (U | tt)) === 0 && (e.f ^= tt), mn(
1280
+ (C === null || !C.includes(e)) && (H(e, ce), (e.f & (q | st)) === 0 && (e.f ^= st), Dr(
1281
1281
  /** @type {Derived} **/
1282
1282
  e
1283
- ), rt(
1283
+ ), at(
1284
1284
  /** @type {Derived} **/
1285
1285
  e,
1286
1286
  0
1287
1287
  ));
1288
1288
  }
1289
- function rt(t, e) {
1290
- var n = t.deps;
1291
- if (n !== null)
1292
- for (var r = e; r < n.length; r++)
1293
- ii(t, n[r]);
1289
+ function at(t, e) {
1290
+ var r = t.deps;
1291
+ if (r !== null)
1292
+ for (var n = e; n < r.length; n++)
1293
+ gi(t, r[n]);
1294
1294
  }
1295
- function Me(t) {
1295
+ function Se(t) {
1296
1296
  var e = t.f;
1297
- if ((e & Ce) === 0) {
1298
- Z(t, T);
1299
- var n = m, r = ke;
1300
- m = t, ke = !0;
1297
+ if ((e & Ie) === 0) {
1298
+ H(t, L);
1299
+ var r = m, n = Pe;
1300
+ m = t, Pe = !0;
1301
1301
  try {
1302
- (e & De) !== 0 ? $r(t) : Sn(t), Pn(t);
1303
- var i = In(t);
1304
- t.teardown = typeof i == "function" ? i : null, t.wv = Cn;
1302
+ (e & Le) !== 0 ? pi(t) : Br(t), zr(t);
1303
+ var i = Vr(t);
1304
+ t.teardown = typeof i == "function" ? i : null, t.wv = qr;
1305
1305
  var s;
1306
1306
  } finally {
1307
- ke = r, m = n;
1307
+ Pe = n, m = r;
1308
1308
  }
1309
1309
  }
1310
1310
  }
1311
- function _(t) {
1312
- var e = t.f, n = (e & O) !== 0;
1313
- if (v !== null && !Y) {
1314
- var r = m !== null && (m.f & Ce) !== 0;
1315
- if (!r && !te?.includes(t)) {
1311
+ function g(t) {
1312
+ var e = t.f, r = (e & R) !== 0;
1313
+ if (v !== null && !G) {
1314
+ var n = m !== null && (m.f & Ie) !== 0;
1315
+ if (!n && !se?.includes(t)) {
1316
1316
  var i = v.deps;
1317
- if ((v.f & mt) !== 0)
1318
- t.rv < qe && (t.rv = qe, D === null && i !== null && i[F] === t ? F++ : D === null ? D = [t] : (!se || !D.includes(t)) && D.push(t));
1317
+ if ((v.f & xt) !== 0)
1318
+ t.rv < Ge && (t.rv = Ge, C === null && i !== null && i[O] === t ? O++ : C === null ? C = [t] : (!le || !C.includes(t)) && C.push(t));
1319
1319
  else {
1320
1320
  (v.deps ??= []).push(t);
1321
1321
  var s = t.reactions;
1322
1322
  s === null ? t.reactions = [v] : s.includes(v) || s.push(v);
1323
1323
  }
1324
1324
  }
1325
- } else if (n && /** @type {Derived} */
1325
+ } else if (r && /** @type {Derived} */
1326
1326
  t.deps === null && /** @type {Derived} */
1327
1327
  t.effects === null) {
1328
1328
  var o = (
1329
1329
  /** @type {Derived} */
1330
1330
  t
1331
- ), a = o.parent;
1332
- a !== null && (a.f & U) === 0 && (o.f ^= U);
1331
+ ), l = o.parent;
1332
+ l !== null && (l.f & q) === 0 && (o.f ^= q);
1333
1333
  }
1334
- if (Le) {
1335
- if (oe.has(t))
1336
- return oe.get(t);
1337
- if (n) {
1334
+ if (Oe) {
1335
+ if (ue.has(t))
1336
+ return ue.get(t);
1337
+ if (r) {
1338
1338
  o = /** @type {Derived} */
1339
1339
  t;
1340
- var l = o.v;
1341
- return ((o.f & T) === 0 && o.reactions !== null || Fn(o)) && (l = Ft(o)), oe.set(o, l), l;
1340
+ var a = o.v;
1341
+ return ((o.f & L) === 0 && o.reactions !== null || Xr(o)) && (a = Ut(o)), ue.set(o, a), a;
1342
1342
  }
1343
- } else n && (o = /** @type {Derived} */
1344
- t, lt(o) && yn(o));
1345
- if ((t.f & pe) !== 0)
1343
+ } else r && (o = /** @type {Derived} */
1344
+ t, ct(o) && Cr(o));
1345
+ if ((t.f & ve) !== 0)
1346
1346
  throw t.v;
1347
1347
  return t.v;
1348
1348
  }
1349
- function Fn(t) {
1350
- if (t.v === M) return !0;
1349
+ function Xr(t) {
1350
+ if (t.v === x) return !0;
1351
1351
  if (t.deps === null) return !1;
1352
1352
  for (const e of t.deps)
1353
- if (oe.has(e) || (e.f & O) !== 0 && Fn(
1353
+ if (ue.has(e) || (e.f & R) !== 0 && Xr(
1354
1354
  /** @type {Derived} */
1355
1355
  e
1356
1356
  ))
1357
1357
  return !0;
1358
1358
  return !1;
1359
1359
  }
1360
- function On(t) {
1361
- var e = Y;
1360
+ function Wr(t) {
1361
+ var e = G;
1362
1362
  try {
1363
- return Y = !0, t();
1363
+ return G = !0, t();
1364
1364
  } finally {
1365
- Y = e;
1365
+ G = e;
1366
1366
  }
1367
1367
  }
1368
- const si = -7169;
1369
- function Z(t, e) {
1370
- t.f = t.f & si | e;
1368
+ const _i = -7169;
1369
+ function H(t, e) {
1370
+ t.f = t.f & _i | e;
1371
1371
  }
1372
- const oi = ["touchstart", "touchmove"];
1373
- function ai(t) {
1374
- return oi.includes(t);
1372
+ const wi = ["touchstart", "touchmove"];
1373
+ function bi(t) {
1374
+ return wi.includes(t);
1375
1375
  }
1376
- const li = /* @__PURE__ */ new Set(), nn = /* @__PURE__ */ new Set();
1377
- let rn = null;
1378
- function Ke(t) {
1379
- var e = this, n = (
1376
+ const Ei = /* @__PURE__ */ new Set(), pr = /* @__PURE__ */ new Set();
1377
+ let dr = null;
1378
+ function et(t) {
1379
+ var e = this, r = (
1380
1380
  /** @type {Node} */
1381
1381
  e.ownerDocument
1382
- ), r = t.type, i = t.composedPath?.() || [], s = (
1382
+ ), n = t.type, i = t.composedPath?.() || [], s = (
1383
1383
  /** @type {null | Element} */
1384
1384
  i[0] || t.target
1385
1385
  );
1386
- rn = t;
1387
- var o = 0, a = rn === t && t.__root;
1388
- if (a) {
1389
- var l = i.indexOf(a);
1390
- if (l !== -1 && (e === document || e === /** @type {any} */
1386
+ dr = t;
1387
+ var o = 0, l = dr === t && t.__root;
1388
+ if (l) {
1389
+ var a = i.indexOf(l);
1390
+ if (a !== -1 && (e === document || e === /** @type {any} */
1391
1391
  window)) {
1392
1392
  t.__root = e;
1393
1393
  return;
@@ -1395,176 +1395,194 @@ function Ke(t) {
1395
1395
  var u = i.indexOf(e);
1396
1396
  if (u === -1)
1397
1397
  return;
1398
- l <= u && (o = l);
1398
+ a <= u && (o = a);
1399
1399
  }
1400
1400
  if (s = /** @type {Element} */
1401
1401
  i[o] || t.target, s !== e) {
1402
- vt(t, "currentTarget", {
1402
+ Mt(t, "currentTarget", {
1403
1403
  configurable: !0,
1404
1404
  get() {
1405
- return s || n;
1405
+ return s || r;
1406
1406
  }
1407
1407
  });
1408
- var f = v, h = m;
1409
- L(null), Q(null);
1408
+ var f = v, p = m;
1409
+ I(null), ne(null);
1410
1410
  try {
1411
- for (var p, c = []; s !== null; ) {
1411
+ for (var h, c = []; s !== null; ) {
1412
1412
  var d = s.assignedSlot || s.parentNode || /** @type {any} */
1413
1413
  s.host || null;
1414
1414
  try {
1415
- var k = s["__" + r];
1416
- if (k != null && (!/** @type {any} */
1415
+ var w = s["__" + n];
1416
+ if (w != null && (!/** @type {any} */
1417
1417
  s.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
1418
1418
  // -> the target could not have been disabled because it emits the event in the first place
1419
1419
  t.target === s))
1420
- if (ln(k)) {
1421
- var [I, ...V] = k;
1422
- I.apply(s, [t, ...V]);
1420
+ if (br(w)) {
1421
+ var [F, ...K] = w;
1422
+ F.apply(s, [t, ...K]);
1423
1423
  } else
1424
- k.call(s, t);
1425
- } catch (w) {
1426
- p ? c.push(w) : p = w;
1424
+ w.call(s, t);
1425
+ } catch (k) {
1426
+ h ? c.push(k) : h = k;
1427
1427
  }
1428
1428
  if (t.cancelBubble || d === e || d === null)
1429
1429
  break;
1430
1430
  s = d;
1431
1431
  }
1432
- if (p) {
1433
- for (let w of c)
1432
+ if (h) {
1433
+ for (let k of c)
1434
1434
  queueMicrotask(() => {
1435
- throw w;
1435
+ throw k;
1436
1436
  });
1437
- throw p;
1437
+ throw h;
1438
1438
  }
1439
1439
  } finally {
1440
- t.__root = e, delete t.currentTarget, L(f), Q(h);
1440
+ t.__root = e, delete t.currentTarget, I(f), ne(p);
1441
1441
  }
1442
1442
  }
1443
1443
  }
1444
- function ui(t) {
1444
+ function ki(t) {
1445
1445
  var e = document.createElement("template");
1446
1446
  return e.innerHTML = t.replaceAll("<!>", "<!---->"), e.content;
1447
1447
  }
1448
- function fi(t, e) {
1449
- var n = (
1448
+ function Mi(t, e) {
1449
+ var r = (
1450
1450
  /** @type {Effect} */
1451
1451
  m
1452
1452
  );
1453
- n.nodes_start === null && (n.nodes_start = t, n.nodes_end = e);
1453
+ r.nodes_start === null && (r.nodes_start = t, r.nodes_end = e);
1454
1454
  }
1455
1455
  // @__NO_SIDE_EFFECTS__
1456
- function Rn(t, e) {
1457
- var n = (e & Sr) !== 0, r, i = !t.startsWith("<!>");
1456
+ function Gr(t, e) {
1457
+ var r = (e & Un) !== 0, n, i = !t.startsWith("<!>");
1458
1458
  return () => {
1459
- r === void 0 && (r = ui(i ? t : "<!>" + t), r = /** @type {Node} */
1460
- /* @__PURE__ */ bn(r));
1459
+ n === void 0 && (n = ki(i ? t : "<!>" + t), n = /** @type {Node} */
1460
+ /* @__PURE__ */ Or(n));
1461
1461
  var s = (
1462
1462
  /** @type {TemplateNode} */
1463
- n || _n ? document.importNode(r, !0) : r.cloneNode(!0)
1463
+ r || Lr ? document.importNode(n, !0) : n.cloneNode(!0)
1464
1464
  );
1465
- return fi(s, s), s;
1465
+ return Mi(s, s), s;
1466
1466
  };
1467
1467
  }
1468
- function Nn(t, e) {
1468
+ function Kr(t, e) {
1469
1469
  t !== null && t.before(
1470
1470
  /** @type {Node} */
1471
1471
  e
1472
1472
  );
1473
1473
  }
1474
- function Nt(t, e) {
1475
- return ci(t, e);
1476
- }
1477
- const _e = /* @__PURE__ */ new Map();
1478
- function ci(t, { target: e, anchor: n, props: r = {}, events: i, context: s, intro: o = !0 }) {
1479
- qr();
1480
- var a = /* @__PURE__ */ new Set(), l = (h) => {
1481
- for (var p = 0; p < h.length; p++) {
1482
- var c = h[p];
1483
- if (!a.has(c)) {
1484
- a.add(c);
1485
- var d = ai(c);
1486
- e.addEventListener(c, Ke, { passive: d });
1487
- var k = _e.get(c);
1488
- k === void 0 ? (document.addEventListener(c, Ke, { passive: d }), _e.set(c, 1)) : _e.set(c, k + 1);
1474
+ function Ht(t, e) {
1475
+ return xi(t, e);
1476
+ }
1477
+ const ke = /* @__PURE__ */ new Map();
1478
+ function xi(t, { target: e, anchor: r, props: n = {}, events: i, context: s, intro: o = !0 }) {
1479
+ ni();
1480
+ var l = /* @__PURE__ */ new Set(), a = (p) => {
1481
+ for (var h = 0; h < p.length; h++) {
1482
+ var c = p[h];
1483
+ if (!l.has(c)) {
1484
+ l.add(c);
1485
+ var d = bi(c);
1486
+ e.addEventListener(c, et, { passive: d });
1487
+ var w = ke.get(c);
1488
+ w === void 0 ? (document.addEventListener(c, et, { passive: d }), ke.set(c, 1)) : ke.set(c, w + 1);
1489
1489
  }
1490
1490
  }
1491
1491
  };
1492
- l(fr(li)), nn.add(l);
1493
- var u = void 0, f = Gr(() => {
1494
- var h = n ?? e.appendChild(Hr());
1495
- return Or(
1492
+ a(Mn(Ei)), pr.add(a);
1493
+ var u = void 0, f = ui(() => {
1494
+ var p = r ?? e.appendChild(ii());
1495
+ return Gn(
1496
1496
  /** @type {TemplateNode} */
1497
- h,
1497
+ p,
1498
1498
  {
1499
1499
  pending: () => {
1500
1500
  }
1501
1501
  },
1502
- (p) => {
1502
+ (h) => {
1503
1503
  if (s) {
1504
- Tt({});
1504
+ jt({});
1505
1505
  var c = (
1506
1506
  /** @type {ComponentContext} */
1507
- q
1507
+ Y
1508
1508
  );
1509
1509
  c.c = s;
1510
1510
  }
1511
- i && (r.$$events = i), u = t(p, r) || {}, s && Lt();
1511
+ i && (n.$$events = i), u = t(h, n) || {}, s && zt();
1512
1512
  }
1513
1513
  ), () => {
1514
- for (var p of a) {
1515
- e.removeEventListener(p, Ke);
1514
+ for (var h of l) {
1515
+ e.removeEventListener(h, et);
1516
1516
  var c = (
1517
1517
  /** @type {number} */
1518
- _e.get(p)
1518
+ ke.get(h)
1519
1519
  );
1520
- --c === 0 ? (document.removeEventListener(p, Ke), _e.delete(p)) : _e.set(p, c);
1520
+ --c === 0 ? (document.removeEventListener(h, et), ke.delete(h)) : ke.set(h, c);
1521
1521
  }
1522
- nn.delete(l), h !== n && h.parentNode?.removeChild(h);
1522
+ pr.delete(a), p !== r && p.parentNode?.removeChild(p);
1523
1523
  };
1524
1524
  });
1525
- return hi.set(u, f), u;
1525
+ return Pi.set(u, f), u;
1526
1526
  }
1527
- let hi = /* @__PURE__ */ new WeakMap();
1528
- function zn(t) {
1529
- var e, n, r = "";
1530
- if (typeof t == "string" || typeof t == "number") r += t;
1527
+ let Pi = /* @__PURE__ */ new WeakMap();
1528
+ function Jr(t) {
1529
+ var e, r, n = "";
1530
+ if (typeof t == "string" || typeof t == "number") n += t;
1531
1531
  else if (typeof t == "object") if (Array.isArray(t)) {
1532
1532
  var i = t.length;
1533
- for (e = 0; e < i; e++) t[e] && (n = zn(t[e])) && (r && (r += " "), r += n);
1534
- } else for (n in t) t[n] && (r && (r += " "), r += n);
1535
- return r;
1533
+ for (e = 0; e < i; e++) t[e] && (r = Jr(t[e])) && (n && (n += " "), n += r);
1534
+ } else for (r in t) t[r] && (n && (n += " "), n += r);
1535
+ return n;
1536
1536
  }
1537
- function pi() {
1538
- for (var t, e, n = 0, r = "", i = arguments.length; n < i; n++) (t = arguments[n]) && (e = zn(t)) && (r && (r += " "), r += e);
1539
- return r;
1537
+ function Si() {
1538
+ for (var t, e, r = 0, n = "", i = arguments.length; r < i; r++) (t = arguments[r]) && (e = Jr(t)) && (n && (n += " "), n += e);
1539
+ return n;
1540
1540
  }
1541
- function jn(t) {
1542
- return typeof t == "object" ? pi(t) : t ?? "";
1541
+ function Qr(t) {
1542
+ return typeof t == "object" ? Si(t) : t ?? "";
1543
1543
  }
1544
- function di(t, e, n) {
1545
- var r = t == null ? "" : "" + t;
1546
- return e && (r = r ? r + " " + e : e), r === "" ? null : r;
1544
+ function Ai(t, e, r) {
1545
+ var n = t == null ? "" : "" + t;
1546
+ return e && (n = n ? n + " " + e : e), n === "" ? null : n;
1547
1547
  }
1548
- function vi(t, e) {
1549
- return t == null ? null : String(t);
1548
+ function vr(t, e = !1) {
1549
+ var r = e ? " !important;" : ";", n = "";
1550
+ for (var i in t) {
1551
+ var s = t[i];
1552
+ s != null && s !== "" && (n += " " + i + ": " + s + r);
1553
+ }
1554
+ return n;
1550
1555
  }
1551
- function Bn(t, e, n, r, i, s) {
1556
+ function Di(t, e) {
1557
+ if (e) {
1558
+ var r = "", n, i;
1559
+ return Array.isArray(e) ? (n = e[0], i = e[1]) : n = e, n && (r += vr(n)), i && (r += vr(i, !0)), r = r.trim(), r === "" ? null : r;
1560
+ }
1561
+ return String(t);
1562
+ }
1563
+ function $r(t, e, r, n, i, s) {
1552
1564
  var o = t.__className;
1553
- if (o !== n || o === void 0) {
1554
- var a = di(n, r);
1555
- a == null ? t.removeAttribute("class") : t.className = a, t.__className = n;
1565
+ if (o !== r || o === void 0) {
1566
+ var l = Ai(r, n);
1567
+ l == null ? t.removeAttribute("class") : t.className = l, t.__className = r;
1556
1568
  }
1557
1569
  return s;
1558
1570
  }
1559
- function it(t, e, n, r) {
1571
+ function bt(t, e = {}, r, n) {
1572
+ for (var i in r) {
1573
+ var s = r[i];
1574
+ e[i] !== s && (r[i] == null ? t.style.removeProperty(i) : t.style.setProperty(i, s, n));
1575
+ }
1576
+ }
1577
+ function ze(t, e, r, n) {
1560
1578
  var i = t.__style;
1561
1579
  if (i !== e) {
1562
- var s = vi(e);
1580
+ var s = Di(e, n);
1563
1581
  s == null ? t.removeAttribute("style") : t.style.cssText = s, t.__style = e;
1564
- }
1565
- return r;
1582
+ } else n && (Array.isArray(n) ? (bt(t, r?.[0], n[0]), bt(t, r?.[1], n[1], "important")) : bt(t, r, n));
1583
+ return n;
1566
1584
  }
1567
- const mi = () => performance.now(), W = {
1585
+ const Ci = () => performance.now(), Q = {
1568
1586
  // don't access requestAnimationFrame eagerly outside method
1569
1587
  // this allows basic testing of user code without JSDOM
1570
1588
  // bunder will eval and remove ternary when the user's app is built
@@ -1572,63 +1590,63 @@ const mi = () => performance.now(), W = {
1572
1590
  /** @param {any} _ */
1573
1591
  (t) => requestAnimationFrame(t)
1574
1592
  ),
1575
- now: () => mi(),
1593
+ now: () => Ci(),
1576
1594
  tasks: /* @__PURE__ */ new Set()
1577
1595
  };
1578
- function Un() {
1579
- const t = W.now();
1580
- W.tasks.forEach((e) => {
1581
- e.c(t) || (W.tasks.delete(e), e.f());
1582
- }), W.tasks.size !== 0 && W.tick(Un);
1596
+ function en() {
1597
+ const t = Q.now();
1598
+ Q.tasks.forEach((e) => {
1599
+ e.c(t) || (Q.tasks.delete(e), e.f());
1600
+ }), Q.tasks.size !== 0 && Q.tick(en);
1583
1601
  }
1584
- function yi(t) {
1602
+ function Ti(t) {
1585
1603
  let e;
1586
- return W.tasks.size === 0 && W.tick(Un), {
1587
- promise: new Promise((n) => {
1588
- W.tasks.add(e = { c: t, f: n });
1604
+ return Q.tasks.size === 0 && Q.tick(en), {
1605
+ promise: new Promise((r) => {
1606
+ Q.tasks.add(e = { c: t, f: r });
1589
1607
  }),
1590
1608
  abort() {
1591
- W.tasks.delete(e);
1609
+ Q.tasks.delete(e);
1592
1610
  }
1593
1611
  };
1594
1612
  }
1595
- function sn(t, e) {
1596
- return t === e || t?.[Qe] === e;
1613
+ function mr(t, e) {
1614
+ return t === e || t?.[rt] === e;
1597
1615
  }
1598
- function Ee(t = {}, e, n, r) {
1599
- return Kr(() => {
1616
+ function Be(t = {}, e, r, n) {
1617
+ return fi(() => {
1600
1618
  var i, s;
1601
- return Rt(() => {
1602
- i = s, s = [], On(() => {
1603
- t !== n(...s) && (e(t, ...s), i && sn(n(...i), t) && e(null, ...i));
1619
+ return qt(() => {
1620
+ i = s, s = [], Wr(() => {
1621
+ t !== r(...s) && (e(t, ...s), i && mr(r(...i), t) && e(null, ...i));
1604
1622
  });
1605
1623
  }), () => {
1606
- ot(() => {
1607
- s && sn(n(...s), t) && e(null, ...s);
1624
+ ut(() => {
1625
+ s && mr(r(...s), t) && e(null, ...s);
1608
1626
  });
1609
1627
  };
1610
1628
  }), t;
1611
1629
  }
1612
- const gi = "5";
1613
- typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(gi);
1614
- function _i(t) {
1630
+ const Li = "5";
1631
+ typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(Li);
1632
+ function Ii(t) {
1615
1633
  return t;
1616
1634
  }
1617
- function wt(t) {
1635
+ function At(t) {
1618
1636
  return -0.5 * (Math.cos(Math.PI * t) - 1);
1619
1637
  }
1620
- function wi(t) {
1638
+ function Fi(t) {
1621
1639
  const e = Math.cos(t * Math.PI * 0.5);
1622
1640
  return Math.abs(e) < 1e-14 ? 1 : 1 - e;
1623
1641
  }
1624
- function Ei(t) {
1642
+ function Oi(t) {
1625
1643
  return Math.sin(t * Math.PI / 2);
1626
1644
  }
1627
- const bi = 128, ki = 0, Mi = 1, xi = 2;
1628
- class Pi {
1645
+ const Ri = 128, Ni = 0, ji = 1, zi = 2;
1646
+ class Bi {
1629
1647
  animationsStarted = !1;
1630
1648
  animationsCount = 0;
1631
- animationsLimit = bi;
1649
+ animationsLimit = Ri;
1632
1650
  layers = new Array();
1633
1651
  start() {
1634
1652
  window.requestAnimationFrame(this.tick.bind(this));
@@ -1637,12 +1655,12 @@ class Pi {
1637
1655
  try {
1638
1656
  this.animationsCount = 0;
1639
1657
  for (let e = 0; e < this.layers.length; e++) {
1640
- const n = this.layers[e];
1641
- if (n == null) continue;
1642
- const r = n.animations;
1643
- if (r != null)
1644
- for (let i = 0; i < r.length; i++) {
1645
- const s = r[i];
1658
+ const r = this.layers[e];
1659
+ if (r == null) continue;
1660
+ const n = r.animations;
1661
+ if (n != null)
1662
+ for (let i = 0; i < n.length; i++) {
1663
+ const s = n[i];
1646
1664
  if (s != null) {
1647
1665
  for (const o of s.values())
1648
1666
  if (!o.executed && (o.executed = !0, o.function(), this.animationsCount++, this.animationsCount == this.animationsLimit))
@@ -1655,23 +1673,23 @@ class Pi {
1655
1673
  window.requestAnimationFrame(this.tick.bind(this));
1656
1674
  }
1657
1675
  }
1658
- equeue(e, n, r, i) {
1676
+ equeue(e, r, n, i) {
1659
1677
  let s = this.layers[e];
1660
1678
  s == null && (s = this.layers[e] = { animations: new Array() });
1661
- let o = s.animations[n];
1662
- o == null && (o = s.animations[n] = /* @__PURE__ */ new Map());
1663
- let a = { id: r, priority: n, executed: !1, function: i };
1664
- o.set(r, a), this.animationsStarted == !1 && (this.animationsStarted = !0, this.start());
1665
- }
1666
- clear(e, n) {
1667
- for (let r = 0; r < this.layers.length; r++) {
1668
- let i = this.layers[r];
1679
+ let o = s.animations[r];
1680
+ o == null && (o = s.animations[r] = /* @__PURE__ */ new Map());
1681
+ let l = { id: n, priority: r, executed: !1, function: i };
1682
+ o.set(n, l), this.animationsStarted == !1 && (this.animationsStarted = !0, this.start());
1683
+ }
1684
+ clear(e, r) {
1685
+ for (let n = 0; n < this.layers.length; n++) {
1686
+ let i = this.layers[n];
1669
1687
  if (i == null) continue;
1670
1688
  let s = i.animations[e];
1671
1689
  if (s == null) return;
1672
- let o = s.get(n);
1690
+ let o = s.get(r);
1673
1691
  if (o == null || o.executed == !1) return;
1674
- s.delete(n);
1692
+ s.delete(r);
1675
1693
  }
1676
1694
  }
1677
1695
  speed() {
@@ -1684,66 +1702,66 @@ class Pi {
1684
1702
  this.animationsLimit = e;
1685
1703
  }
1686
1704
  }
1687
- const ie = new Pi();
1688
- function on(t) {
1705
+ const ae = new Bi();
1706
+ function yr(t) {
1689
1707
  return Object.prototype.toString.call(t) === "[object Date]";
1690
1708
  }
1691
- function Et(t, e) {
1709
+ function Dt(t, e) {
1692
1710
  if (t === e || t !== t) return () => t;
1693
- const n = typeof t;
1694
- if (n !== typeof e || Array.isArray(t) !== Array.isArray(e))
1711
+ const r = typeof t;
1712
+ if (r !== typeof e || Array.isArray(t) !== Array.isArray(e))
1695
1713
  throw new Error("Cannot interpolate values of different type");
1696
1714
  if (Array.isArray(t)) {
1697
- const r = (
1715
+ const n = (
1698
1716
  /** @type {Array<any>} */
1699
- e.map((i, s) => Et(
1717
+ e.map((i, s) => Dt(
1700
1718
  /** @type {Array<any>} */
1701
1719
  t[s],
1702
1720
  i
1703
1721
  ))
1704
1722
  );
1705
- return (i) => r.map((s) => s(i));
1723
+ return (i) => n.map((s) => s(i));
1706
1724
  }
1707
- if (n === "object") {
1725
+ if (r === "object") {
1708
1726
  if (!t || !e)
1709
1727
  throw new Error("Object cannot be null");
1710
- if (on(t) && on(e)) {
1711
- const s = t.getTime(), a = e.getTime() - s;
1712
- return (l) => new Date(s + l * a);
1728
+ if (yr(t) && yr(e)) {
1729
+ const s = t.getTime(), l = e.getTime() - s;
1730
+ return (a) => new Date(s + a * l);
1713
1731
  }
1714
- const r = Object.keys(e), i = {};
1715
- return r.forEach((s) => {
1716
- i[s] = Et(t[s], e[s]);
1732
+ const n = Object.keys(e), i = {};
1733
+ return n.forEach((s) => {
1734
+ i[s] = Dt(t[s], e[s]);
1717
1735
  }), (s) => {
1718
1736
  const o = {};
1719
- return r.forEach((a) => {
1720
- o[a] = i[a](s);
1737
+ return n.forEach((l) => {
1738
+ o[l] = i[l](s);
1721
1739
  }), o;
1722
1740
  };
1723
1741
  }
1724
- if (n === "number") {
1725
- const r = (
1742
+ if (r === "number") {
1743
+ const n = (
1726
1744
  /** @type {number} */
1727
1745
  e - /** @type {number} */
1728
1746
  t
1729
1747
  );
1730
- return (i) => t + i * r;
1748
+ return (i) => t + i * n;
1731
1749
  }
1732
1750
  return () => e;
1733
1751
  }
1734
- class zt {
1752
+ class Yt {
1735
1753
  #e;
1736
1754
  #t;
1737
1755
  /** @type {TweenedOptions<T>} */
1738
1756
  #a;
1739
1757
  /** @type {import('../internal/client/types').Task | null} */
1740
- #r = null;
1758
+ #n = null;
1741
1759
  /**
1742
1760
  * @param {T} value
1743
1761
  * @param {TweenedOptions<T>} options
1744
1762
  */
1745
- constructor(e, n = {}) {
1746
- this.#e = /* @__PURE__ */ A(e), this.#t = /* @__PURE__ */ A(e), this.#a = n;
1763
+ constructor(e, r = {}) {
1764
+ this.#e = /* @__PURE__ */ D(e), this.#t = /* @__PURE__ */ D(e), this.#a = r;
1747
1765
  }
1748
1766
  /**
1749
1767
  * Create a tween whose value is bound to the return value of `fn`. This must be called
@@ -1762,11 +1780,11 @@ class zt {
1762
1780
  * @param {() => U} fn
1763
1781
  * @param {TweenedOptions<U>} [options]
1764
1782
  */
1765
- static of(e, n) {
1766
- const r = new zt(e(), n);
1767
- return Rt(() => {
1768
- r.set(e());
1769
- }), r;
1783
+ static of(e, r) {
1784
+ const n = new Yt(e(), r);
1785
+ return qt(() => {
1786
+ n.set(e());
1787
+ }), n;
1770
1788
  }
1771
1789
  /**
1772
1790
  * Sets `tween.target` to `value` and returns a `Promise` that resolves if and when `tween.current` catches up to it.
@@ -1776,50 +1794,50 @@ class zt {
1776
1794
  * @param {TweenedOptions<T>} [options]
1777
1795
  * @returns
1778
1796
  */
1779
- set(e, n) {
1780
- x(this.#t, e);
1797
+ set(e, r) {
1798
+ P(this.#t, e);
1781
1799
  let {
1782
- delay: r = 0,
1800
+ delay: n = 0,
1783
1801
  duration: i = 400,
1784
- easing: s = _i,
1785
- interpolate: o = Et
1786
- } = { ...this.#a, ...n };
1802
+ easing: s = Ii,
1803
+ interpolate: o = Dt
1804
+ } = { ...this.#a, ...r };
1787
1805
  if (i === 0)
1788
- return this.#r?.abort(), x(this.#e, e), Promise.resolve();
1789
- const a = W.now() + r;
1790
- let l, u = !1, f = this.#r;
1791
- return this.#r = yi((h) => {
1792
- if (h < a)
1806
+ return this.#n?.abort(), P(this.#e, e), Promise.resolve();
1807
+ const l = Q.now() + n;
1808
+ let a, u = !1, f = this.#n;
1809
+ return this.#n = Ti((p) => {
1810
+ if (p < l)
1793
1811
  return !0;
1794
1812
  if (!u) {
1795
1813
  u = !0;
1796
1814
  const c = this.#e.v;
1797
- l = o(c, e), typeof i == "function" && (i = i(c, e)), f?.abort();
1815
+ a = o(c, e), typeof i == "function" && (i = i(c, e)), f?.abort();
1798
1816
  }
1799
- const p = h - a;
1800
- return p > /** @type {number} */
1801
- i ? (x(this.#e, e), !1) : (x(this.#e, l(s(p / /** @type {number} */
1817
+ const h = p - l;
1818
+ return h > /** @type {number} */
1819
+ i ? (P(this.#e, e), !1) : (P(this.#e, a(s(h / /** @type {number} */
1802
1820
  i))), !0);
1803
- }), this.#r.promise;
1821
+ }), this.#n.promise;
1804
1822
  }
1805
1823
  get current() {
1806
- return _(this.#e);
1824
+ return g(this.#e);
1807
1825
  }
1808
1826
  get target() {
1809
- return _(this.#t);
1827
+ return g(this.#t);
1810
1828
  }
1811
1829
  set target(e) {
1812
1830
  this.set(e);
1813
1831
  }
1814
1832
  }
1815
- class et {
1833
+ class it {
1816
1834
  value;
1817
1835
  motion;
1818
- constructor(e, n) {
1819
- this.value = e, this.motion = new zt(e, n);
1836
+ constructor(e, r) {
1837
+ this.value = e, this.motion = new Yt(e, r);
1820
1838
  }
1821
- set(e, n) {
1822
- this.value = e, this.motion.set(e, n);
1839
+ set(e, r) {
1840
+ this.value = e, this.motion.set(e, r);
1823
1841
  }
1824
1842
  update(e) {
1825
1843
  this.motion.set(this.value, e);
@@ -1828,196 +1846,228 @@ class et {
1828
1846
  this.motion.set(this.value, { duration: 0 });
1829
1847
  }
1830
1848
  }
1831
- var Si = /* @__PURE__ */ Rn('<div><div class="body svelte-zz3jrb"></div></div>');
1832
- function Ai(t, e) {
1833
- Tt(e, !0);
1834
- let n, r;
1835
- function i() {
1836
- return r;
1849
+ var Ui = /* @__PURE__ */ Gr("<div></div>");
1850
+ function Zi(t, e) {
1851
+ jt(e, !0);
1852
+ let r = e.style.width, n = e.style.height, i = e.style.radius, s = e.colors?.background ?? "darkgreen", o = e.colors?.border ?? "white", l = e.colors?.shadow ?? "0px 2px 2px rgba(0, 0, 0, 0.5)", a;
1853
+ function u() {
1854
+ return a;
1837
1855
  }
1838
- let s = /* @__PURE__ */ A(!1);
1839
- function o(b) {
1840
- x(s, b, !0);
1856
+ let f = /* @__PURE__ */ D(!1);
1857
+ function p(b) {
1858
+ P(f, b, !0);
1841
1859
  }
1842
- function a() {
1843
- return _(s);
1844
- }
1845
- let l = /* @__PURE__ */ A(!0), u = 0, f = 150;
1846
- function h(b) {
1847
- b != _(l) && (x(l, b, !0), u = performance.now());
1848
- }
1849
- function p() {
1850
- return performance.now() - u < f ? d.motion.current == 0 : d.value == 0;
1851
- }
1852
- let c = 0, d = new et(0, { easing: wt });
1853
- X(() => {
1854
- _(s) == !1 && (d.snap(), ie.clear(e.priority, e.id));
1855
- }), X(() => {
1856
- d.set(_(l) ? 0 : c, { duration: 75 });
1857
- }), X(() => {
1858
- k(d.motion.current);
1860
+ function h() {
1861
+ return g(f);
1862
+ }
1863
+ let c = /* @__PURE__ */ D(!0), d = 0, w = 150;
1864
+ function F(b) {
1865
+ b != g(c) && (P(c, b, !0), d = performance.now());
1866
+ }
1867
+ function K() {
1868
+ return performance.now() - d < w ? V.motion.current == 0 : V.value == 0;
1869
+ }
1870
+ let k = 0, V = new it(0, { easing: At });
1871
+ J(() => {
1872
+ g(f) == !1 && (V.snap(), ae.clear(e.priority, e.id));
1873
+ }), J(() => {
1874
+ V.set(g(c) ? 0 : k, { duration: 75 });
1875
+ }), J(() => {
1876
+ Je(V.motion.current);
1859
1877
  });
1860
- function k(b) {
1861
- n && ie.equeue(e.layer, e.priority, e.id, () => {
1862
- n.style.scale = b.toString(), n.style.filter = `brightness(${0.25 + 0.75 * b})`, r.style.opacity = b.toString();
1878
+ function Je(b) {
1879
+ a && ae.equeue(e.layer, e.priority, e.id, () => {
1880
+ a.style.scale = b.toString(), a.style.filter = `brightness(${0.25 + 0.75 * b})`;
1863
1881
  });
1864
1882
  }
1865
- function I(b) {
1866
- b != c && (c = b, d.set(b, { duration: 75 }));
1867
- }
1868
- function V() {
1869
- return d.value;
1870
- }
1871
- var w = {
1872
- getBody: i,
1873
- setDisplayed: o,
1874
- getDisplayed: a,
1875
- setCollapsed: h,
1876
- getCollapsed: p,
1877
- setScale: I,
1878
- getScale: V
1879
- }, fe = Si(), ne = _t(fe);
1880
- return Ee(
1881
- ne,
1883
+ function pt(b) {
1884
+ b != k && (k = b, V.set(b, { duration: 75 }));
1885
+ }
1886
+ function dt() {
1887
+ return V.value;
1888
+ }
1889
+ var vt = {
1890
+ getBody: u,
1891
+ setDisplayed: p,
1892
+ getDisplayed: h,
1893
+ setCollapsed: F,
1894
+ getCollapsed: K,
1895
+ setScale: pt,
1896
+ getScale: dt
1897
+ }, M = Ui();
1898
+ let Qe;
1899
+ return Be(
1900
+ M,
1882
1901
  (b) => (
1883
1902
  //#endregion
1884
- r = b
1903
+ a = b
1885
1904
  ),
1886
- () => r
1887
- ), Ee(fe, (b) => n = b, () => n), xn(() => {
1888
- Bn(fe, 1, jn(["pin", _(s) && "displayed"]), "svelte-zz3jrb"), it(fe, `width: ${e.width}px; height: ${e.height}px; border-radius: ${e.radius}px`), it(ne, `width: ${e.width - 4}px; height: ${e.height - 4}px; border-radius: ${e.radius - 2}px`);
1889
- }), Nn(t, fe), Lt(w);
1890
- }
1891
- var Ne;
1905
+ () => a
1906
+ ), jr(
1907
+ (b) => {
1908
+ $r(M, 1, Qr(["pin", g(f) && "displayed"]), "svelte-zz3jrb"), Qe = ze(M, "", Qe, b);
1909
+ },
1910
+ [
1911
+ () => ({
1912
+ width: `${r}px`,
1913
+ height: `${n}px`,
1914
+ "border-radius": `${i}px`,
1915
+ "border-color": o,
1916
+ "background-color": s,
1917
+ "box-shadow": l
1918
+ })
1919
+ ]
1920
+ ), Kr(t, M), zt(vt);
1921
+ }
1922
+ var qe;
1892
1923
  ((t) => {
1893
- function e(n, r, i) {
1894
- const s = n / 2, o = r / 2, a = Math.sqrt(s * s + o * o), l = Math.atan(o / s) * (180 / Math.PI), u = i * (Math.PI / 180);
1895
- return i < 180 ? i < 90 ? i < l ? {
1924
+ function e(r, n, i) {
1925
+ const s = r / 2, o = n / 2, l = Math.sqrt(s * s + o * o), a = Math.atan(o / s) * (180 / Math.PI), u = i * (Math.PI / 180);
1926
+ return i < 180 ? i < 90 ? i < a ? {
1896
1927
  x: 0,
1897
- y: a * Math.sin(u) - o
1928
+ y: l * Math.sin(u) - o
1898
1929
  } : {
1899
- x: a * Math.cos(u) - s,
1930
+ x: l * Math.cos(u) - s,
1900
1931
  y: 0
1901
- } : i < 180 - l ? {
1902
- x: a * Math.cos(u) - s,
1932
+ } : i < 180 - a ? {
1933
+ x: l * Math.cos(u) - s,
1903
1934
  y: 0
1904
1935
  } : {
1905
- x: -n,
1906
- y: a * Math.sin(u) - o
1907
- } : i < 270 ? i < 180 + l ? {
1908
- x: -n,
1909
- y: a * Math.sin(u) - o
1936
+ x: -r,
1937
+ y: l * Math.sin(u) - o
1938
+ } : i < 270 ? i < 180 + a ? {
1939
+ x: -r,
1940
+ y: l * Math.sin(u) - o
1910
1941
  } : {
1911
- x: a * Math.cos(u) - s,
1912
- y: -r
1913
- } : i < 360 - l ? {
1914
- x: a * Math.cos(u) - s,
1915
- y: -r
1942
+ x: l * Math.cos(u) - s,
1943
+ y: -n
1944
+ } : i < 360 - a ? {
1945
+ x: l * Math.cos(u) - s,
1946
+ y: -n
1916
1947
  } : {
1917
1948
  x: 0,
1918
- y: a * Math.sin(u) - o
1949
+ y: l * Math.sin(u) - o
1919
1950
  };
1920
1951
  }
1921
1952
  t.getOffsets = e;
1922
- })(Ne || (Ne = {}));
1923
- var Di = /* @__PURE__ */ Rn('<div><div class="pointer svelte-11extwn"></div> <div class="bubble svelte-11extwn"><div class="body svelte-11extwn"></div></div></div>');
1924
- function Zn(t, e) {
1925
- Tt(e, !0);
1926
- let n, r, i, s;
1927
- const o = e.width + 2 * e.margin, a = e.height + 2 * e.margin, l = () => s;
1928
- X(() => {
1929
- i.style.width = `${e.margin * 4}px`, i.style.height = `${e.margin * 4}px`;
1953
+ })(qe || (qe = {}));
1954
+ var qi = /* @__PURE__ */ Gr('<div><div class="pointer svelte-11extwn"></div> <div class="bubble svelte-11extwn"><div class="body svelte-11extwn"></div></div></div>');
1955
+ function tn(t, e) {
1956
+ jt(e, !0);
1957
+ let r = e.style.width, n = e.style.height, i = e.style.margin, s = e.style.radius, o = e.colors?.background ?? "white", l = e.colors?.shadow ?? "0px 2px 2px rgba(0, 0, 0, 0.5)", a, u, f, p;
1958
+ const h = r + 2 * i, c = n + 2 * i, d = () => p;
1959
+ J(() => {
1960
+ f.style.width = `${i * 4}px`, f.style.height = `${i * 4}px`;
1930
1961
  });
1931
- let u = /* @__PURE__ */ A(!0);
1932
- function f(y) {
1933
- x(u, y, !0);
1934
- }
1935
- function h() {
1936
- return _(u);
1937
- }
1938
- let p = /* @__PURE__ */ A(!0), c = 0, d = 300;
1939
- function k(y) {
1940
- y != _(p) && (x(p, y, !0), c = performance.now());
1941
- }
1942
- function I() {
1943
- return performance.now() - c < d ? w.motion.current == 0 : w.value == 0;
1944
- }
1945
- function V() {
1946
- return performance.now() - c < d ? w.motion.current == 1 : w.value == 1;
1947
- }
1948
- let w = new et(0);
1949
- X(() => {
1950
- _(u) == !1 && (w.snap(), ie.clear(e.priority, e.id + "_scale"));
1951
- }), X(() => {
1952
- _(p) == !0 && w.value != 0 && (ie.stacked() ? w.set(0, { duration: 0 }) : w.set(0, { duration: 150, easing: wi })), _(p) == !1 && w.value != 1 && w.set(1, { duration: 150, easing: Ei });
1953
- }), X(() => {
1954
- fe(w.motion.current);
1962
+ let w = /* @__PURE__ */ D(!0);
1963
+ function F(y) {
1964
+ P(w, y, !0);
1965
+ }
1966
+ function K() {
1967
+ return g(w);
1968
+ }
1969
+ let k = /* @__PURE__ */ D(!0), V = 0, Je = 300;
1970
+ function pt(y) {
1971
+ y != g(k) && (P(k, y, !0), V = performance.now());
1972
+ }
1973
+ function dt() {
1974
+ return performance.now() - V < Je ? M.motion.current == 0 : M.value == 0;
1975
+ }
1976
+ function vt() {
1977
+ return performance.now() - V < Je ? M.motion.current == 1 : M.value == 1;
1978
+ }
1979
+ let M = new it(0);
1980
+ J(() => {
1981
+ g(w) == !1 && (M.snap(), ae.clear(e.priority, e.id + "_scale"));
1982
+ }), J(() => {
1983
+ g(k) == !0 && M.value != 0 && (ae.stacked() ? M.set(0, { duration: 0 }) : M.set(0, { duration: 150, easing: Fi })), g(k) == !1 && M.value != 1 && M.set(1, { duration: 150, easing: Oi });
1984
+ }), J(() => {
1985
+ Qe(M.motion.current);
1955
1986
  });
1956
- function fe(y) {
1957
- !n || !r || !i || ie.equeue(_(p) ? 0 : e.layer, e.priority, e.id + "_scale", () => {
1958
- n.style.opacity = `${y}`, r.style.scale = `${y}`, i.style.scale = `${y}`;
1987
+ function Qe(y) {
1988
+ !a || !u || !f || ae.equeue(g(k) ? 0 : e.layer, e.priority, e.id + "_scale", () => {
1989
+ a.style.opacity = `${y}`, u.style.scale = `${y}`, f.style.scale = `${y}`;
1959
1990
  });
1960
1991
  }
1961
- let ne = NaN, b = /* @__PURE__ */ A(!1), re = new et(-o / 2, { easing: wt }), Ve = new et(-a / 2, { easing: wt });
1962
- X(() => {
1963
- _(u) == !1 && (re.snap(), re.snap(), ie.clear(e.priority, e.id + "_angle"));
1964
- }), X(() => {
1965
- _(p) == !0 && _(b) && (re.update({ duration: 75 }), re.update({ duration: 75 }));
1966
- }), X(() => {
1967
- Ht(re.motion.current, Ve.motion.current);
1992
+ let b = NaN, mt = /* @__PURE__ */ D(!1), oe = new it(-h / 2, { easing: At }), $e = new it(-c / 2, { easing: At });
1993
+ J(() => {
1994
+ g(w) == !1 && (oe.snap(), oe.snap(), ae.clear(e.priority, e.id + "_angle"));
1995
+ }), J(() => {
1996
+ g(k) == !0 && g(mt) && (oe.update({ duration: 75 }), oe.update({ duration: 75 }));
1997
+ }), J(() => {
1998
+ Jt(oe.motion.current, $e.motion.current);
1968
1999
  });
1969
- function Ht(y, We) {
1970
- if (!n || !r || !i) return;
1971
- const $ = y + o / 2, Ge = We + a / 2, ye = a < o ? $ * a / o : $, ge = a > o ? Ge * o / a : Ge, ir = Math.atan2(ge, ye) / Math.PI * 180 - 45, Xt = 0, sr = 30, ct = Math.sqrt(ye * ye + ge * ge), Ie = Math.min(o, a) / 2, or = Ie * Math.SQRT2, ar = (ct - Ie) / (or - Ie), Wt = Xt + ar * (sr - Xt), lr = ct < Ie ? ct / Ie : 1;
1972
- ie.equeue(e.layer, e.priority, e.id + "_angle", () => {
1973
- r.style.transform = `translate(${Math.round(y)}px, ${Math.round(We)}px)`, i.style.transform = `scale(${lr}) rotate(${ir}deg) skew(${Wt}deg, ${Wt}deg)`;
2000
+ function Jt(y, _e) {
2001
+ if (!a || !u || !f) return;
2002
+ const X = y + h / 2, we = _e + c / 2, be = c < h ? X * c / h : X, Ee = c > h ? we * h / c : we, gn = Math.atan2(Ee, be) / Math.PI * 180 - 45, nr = 0, _n = 30, _t = Math.sqrt(be * be + Ee * Ee), Ne = Math.min(h, c) / 2, wn = Ne * Math.SQRT2, bn = (_t - Ne) / (wn - Ne), ir = nr + bn * (_n - nr), En = _t < Ne ? _t / Ne : 1;
2003
+ ae.equeue(e.layer, e.priority, e.id + "_angle", () => {
2004
+ u.style.transform = `translate(${Math.round(y)}px, ${Math.round(_e)}px)`, f.style.transform = `scale(${En}) rotate(${gn}deg) skew(${ir}deg, ${ir}deg)`;
1974
2005
  });
1975
2006
  }
1976
- function tr(y, We) {
1977
- if (_(b) == !1 || We == !0) {
1978
- let $ = Ne.getOffsets(o, a, y);
1979
- re.set(Math.round($.x), { duration: 0 }), Ve.set(Math.round($.y), { duration: 0 }), Ht(re.value, Ve.value), ne = y, x(b, !0);
1980
- } else if (y != ne) {
1981
- let $ = Math.abs(y - ne), Ge = $ < 180 ? $ : 360 - $, ye = Math.log(Ge) * 75, ge = Ne.getOffsets(o, a, y);
1982
- re.set(Math.round(ge.x), { duration: ye }), Ve.set(Math.round(ge.y), { duration: ye }), ne = y;
2007
+ function vn(y, _e) {
2008
+ if (g(mt) == !1 || _e == !0) {
2009
+ let X = qe.getOffsets(h, c, y);
2010
+ oe.set(Math.round(X.x), { duration: 0 }), $e.set(Math.round(X.y), { duration: 0 }), Jt(oe.value, $e.value), b = y, P(mt, !0);
2011
+ } else if (y != b) {
2012
+ let X = Math.abs(y - b), we = X < 180 ? X : 360 - X, be = Math.log(we) * 75, Ee = qe.getOffsets(h, c, y);
2013
+ oe.set(Math.round(Ee.x), { duration: be }), $e.set(Math.round(Ee.y), { duration: be }), b = y;
1983
2014
  }
1984
2015
  }
1985
- function nr() {
1986
- return Ne.getOffsets(o, a, ne);
1987
- }
1988
- var rr = {
1989
- getBody: l,
1990
- setDisplayed: f,
1991
- getDisplayed: h,
1992
- setCollapsed: k,
1993
- getCollapsed: I,
1994
- getExpanded: V,
1995
- setAngle: tr,
1996
- getOffsets: nr
1997
- }, Xe = Di(), Yt = _t(Xe);
1998
- Ee(
1999
- Yt,
2016
+ function mn() {
2017
+ return qe.getOffsets(h, c, b);
2018
+ }
2019
+ var yn = {
2020
+ getBody: d,
2021
+ setDisplayed: F,
2022
+ getDisplayed: K,
2023
+ setCollapsed: pt,
2024
+ getCollapsed: dt,
2025
+ getExpanded: vt,
2026
+ setAngle: vn,
2027
+ getOffsets: mn
2028
+ }, Re = qi();
2029
+ let Qt;
2030
+ var yt = ur(Re);
2031
+ let $t;
2032
+ Be(
2033
+ yt,
2000
2034
  (y) => (
2001
2035
  //#endregion
2002
- i = y
2036
+ f = y
2003
2037
  ),
2004
- () => i
2038
+ () => f
2005
2039
  );
2006
- var ft = Yr(Yt, 2), Vt = _t(ft);
2007
- return Ee(Vt, (y) => s = y, () => s), Ee(ft, (y) => r = y, () => r), Ee(Xe, (y) => n = y, () => n), xn(() => {
2008
- Bn(Xe, 1, jn(["anchor", _(u) && "displayed"]), "svelte-11extwn"), it(ft, `margin: ${e.margin}px;`), it(Vt, `width: ${e.width}px; height: ${e.height}px; border-radius: ${e.radius}px;`);
2009
- }), Nn(t, Xe), Lt(rr);
2010
- }
2011
- var ze;
2040
+ var gt = si(yt, 2);
2041
+ let er;
2042
+ var tr = ur(gt);
2043
+ let rr;
2044
+ return Be(tr, (y) => p = y, () => p), Be(gt, (y) => u = y, () => u), Be(Re, (y) => a = y, () => a), jr(
2045
+ (y, _e, X, we) => {
2046
+ $r(Re, 1, Qr(["anchor", g(w) && "displayed"]), "svelte-11extwn"), Qt = ze(Re, "", Qt, y), $t = ze(yt, "", $t, _e), er = ze(gt, "", er, X), rr = ze(tr, "", rr, we);
2047
+ },
2048
+ [
2049
+ () => ({ filter: `drop-shadow(${l})` }),
2050
+ () => ({ "background-color": o }),
2051
+ () => ({ margin: `${i}px;` }),
2052
+ () => ({
2053
+ width: `${r}px`,
2054
+ height: `${n}px`,
2055
+ "border-radius": `${s}px;`,
2056
+ "background-color": o
2057
+ })
2058
+ ]
2059
+ ), Kr(t, Re), zt(yn);
2060
+ }
2061
+ var He;
2012
2062
  ((t) => {
2013
- async function e(r, i) {
2014
- const s = await fetch(r, i);
2063
+ async function e(n, i) {
2064
+ const s = await fetch(n, i);
2015
2065
  if (!s.ok) throw new Error(s.statusText);
2016
2066
  return s.json();
2017
2067
  }
2018
2068
  t.get = e;
2019
- async function n(r, i, s) {
2020
- const o = await fetch(r, {
2069
+ async function r(n, i, s) {
2070
+ const o = await fetch(n, {
2021
2071
  method: "POST",
2022
2072
  body: JSON.stringify(i),
2023
2073
  headers: {
@@ -2029,38 +2079,38 @@ var ze;
2029
2079
  if (!o.ok) throw new Error(o.statusText);
2030
2080
  return o.json();
2031
2081
  }
2032
- t.post = n;
2033
- })(ze || (ze = {}));
2034
- var be;
2082
+ t.post = r;
2083
+ })(He || (He = {}));
2084
+ var xe;
2035
2085
  ((t) => {
2036
- function e(a, l, u) {
2086
+ function e(l, a, u) {
2037
2087
  return {
2038
- x: r(l) * u,
2039
- y: i(a) * u
2088
+ x: n(a) * u,
2089
+ y: i(l) * u
2040
2090
  };
2041
2091
  }
2042
2092
  t.project = e;
2043
- function n(a, l, u) {
2093
+ function r(l, a, u) {
2044
2094
  return {
2045
- lat: o(l / u),
2046
- lng: s(a / u)
2095
+ lat: o(a / u),
2096
+ lng: s(l / u)
2047
2097
  };
2048
2098
  }
2049
- t.unproject = n;
2050
- function r(a) {
2051
- return (180 + a) / 360;
2099
+ t.unproject = r;
2100
+ function n(l) {
2101
+ return (180 + l) / 360;
2052
2102
  }
2053
- function i(a) {
2054
- return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + a * Math.PI / 360))) / 360;
2103
+ function i(l) {
2104
+ return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + l * Math.PI / 360))) / 360;
2055
2105
  }
2056
- function s(a) {
2057
- return a * 360 - 180;
2106
+ function s(l) {
2107
+ return l * 360 - 180;
2058
2108
  }
2059
- function o(a) {
2060
- return 360 / Math.PI * Math.atan(Math.exp((180 - a * 360) * Math.PI / 180)) - 90;
2109
+ function o(l) {
2110
+ return 360 / Math.PI * Math.atan(Math.exp((180 - l * 360) * Math.PI / 180)) - 90;
2061
2111
  }
2062
- })(be || (be = {}));
2063
- class qn {
2112
+ })(xe || (xe = {}));
2113
+ class rn {
2064
2114
  swLat;
2065
2115
  swLng;
2066
2116
  neLat;
@@ -2072,75 +2122,75 @@ class qn {
2072
2122
  * @param offsetX - The x offset of the map in pixels at zoom level n.
2073
2123
  * @param offsetY - The y offset of the map in pixels at zoom level n.
2074
2124
  */
2075
- constructor(e, n, r, i, s) {
2076
- const o = r * Math.pow(2, n), a = be.project(e.sw.lat, e.sw.lng, o), l = be.project(e.ne.lat, e.ne.lng, o), u = a.x - i, f = a.y + s, h = l.x + i, p = l.y - s, c = be.unproject(u, f, o), d = be.unproject(h, p, o);
2125
+ constructor(e, r, n, i, s) {
2126
+ const o = n * Math.pow(2, r), l = xe.project(e.sw.lat, e.sw.lng, o), a = xe.project(e.ne.lat, e.ne.lng, o), u = l.x - i, f = l.y + s, p = a.x + i, h = a.y - s, c = xe.unproject(u, f, o), d = xe.unproject(p, h, o);
2077
2127
  this.swLat = c.lat, this.swLng = c.lng, this.neLat = d.lat, this.neLng = d.lng;
2078
2128
  }
2079
- contains(e, n) {
2080
- return this.swLat <= e && e <= this.neLat ? this.swLng < this.neLng ? this.swLng <= n && n <= this.neLng : n <= this.neLng || this.swLng <= n : !1;
2129
+ contains(e, r) {
2130
+ return this.swLat <= e && e <= this.neLat ? this.swLng < this.neLng ? this.swLng <= r && r <= this.neLng : r <= this.neLng || this.swLng <= r : !1;
2081
2131
  }
2082
2132
  }
2083
- var pt;
2133
+ var Et;
2084
2134
  // @__NO_SIDE_EFFECTS__
2085
- function Hn(t) {
2135
+ function nn(t) {
2086
2136
  return {
2087
- lang: t?.lang ?? pt?.lang,
2137
+ lang: t?.lang ?? Et?.lang,
2088
2138
  message: t?.message,
2089
- abortEarly: t?.abortEarly ?? pt?.abortEarly,
2090
- abortPipeEarly: t?.abortPipeEarly ?? pt?.abortPipeEarly
2139
+ abortEarly: t?.abortEarly ?? Et?.abortEarly,
2140
+ abortPipeEarly: t?.abortPipeEarly ?? Et?.abortPipeEarly
2091
2141
  };
2092
2142
  }
2093
- var Ci;
2143
+ var Hi;
2094
2144
  // @__NO_SIDE_EFFECTS__
2095
- function Ti(t) {
2096
- return Ci?.get(t);
2145
+ function Yi(t) {
2146
+ return Hi?.get(t);
2097
2147
  }
2098
- var Li;
2148
+ var Vi;
2099
2149
  // @__NO_SIDE_EFFECTS__
2100
- function Ii(t) {
2101
- return Li?.get(t);
2150
+ function Xi(t) {
2151
+ return Vi?.get(t);
2102
2152
  }
2103
- var Fi;
2153
+ var Wi;
2104
2154
  // @__NO_SIDE_EFFECTS__
2105
- function Oi(t, e) {
2106
- return Fi?.get(t)?.get(e);
2155
+ function Gi(t, e) {
2156
+ return Wi?.get(t)?.get(e);
2107
2157
  }
2108
2158
  // @__NO_SIDE_EFFECTS__
2109
- function He(t) {
2159
+ function Ke(t) {
2110
2160
  const e = typeof t;
2111
2161
  return e === "string" ? `"${t}"` : e === "number" || e === "bigint" || e === "boolean" ? `${t}` : e === "object" || e === "function" ? (t && Object.getPrototypeOf(t)?.constructor?.name) ?? "null" : e;
2112
2162
  }
2113
- function P(t, e, n, r, i) {
2114
- const s = i && "input" in i ? i.input : n.value, o = i?.expected ?? t.expects ?? null, a = i?.received ?? /* @__PURE__ */ He(s), l = {
2163
+ function S(t, e, r, n, i) {
2164
+ const s = i && "input" in i ? i.input : r.value, o = i?.expected ?? t.expects ?? null, l = i?.received ?? /* @__PURE__ */ Ke(s), a = {
2115
2165
  kind: t.kind,
2116
2166
  type: t.type,
2117
2167
  input: s,
2118
2168
  expected: o,
2119
- received: a,
2120
- message: `Invalid ${e}: ${o ? `Expected ${o} but r` : "R"}eceived ${a}`,
2169
+ received: l,
2170
+ message: `Invalid ${e}: ${o ? `Expected ${o} but r` : "R"}eceived ${l}`,
2121
2171
  requirement: t.requirement,
2122
2172
  path: i?.path,
2123
2173
  issues: i?.issues,
2124
- lang: r.lang,
2125
- abortEarly: r.abortEarly,
2126
- abortPipeEarly: r.abortPipeEarly
2127
- }, u = t.kind === "schema", f = i?.message ?? t.message ?? /* @__PURE__ */ Oi(t.reference, l.lang) ?? (u ? /* @__PURE__ */ Ii(l.lang) : null) ?? r.message ?? /* @__PURE__ */ Ti(l.lang);
2128
- f !== void 0 && (l.message = typeof f == "function" ? (
2174
+ lang: n.lang,
2175
+ abortEarly: n.abortEarly,
2176
+ abortPipeEarly: n.abortPipeEarly
2177
+ }, u = t.kind === "schema", f = i?.message ?? t.message ?? /* @__PURE__ */ Gi(t.reference, a.lang) ?? (u ? /* @__PURE__ */ Xi(a.lang) : null) ?? n.message ?? /* @__PURE__ */ Yi(a.lang);
2178
+ f !== void 0 && (a.message = typeof f == "function" ? (
2129
2179
  // @ts-expect-error
2130
- f(l)
2131
- ) : f), u && (n.typed = !1), n.issues ? n.issues.push(l) : n.issues = [l];
2180
+ f(a)
2181
+ ) : f), u && (r.typed = !1), r.issues ? r.issues.push(a) : r.issues = [a];
2132
2182
  }
2133
2183
  // @__NO_SIDE_EFFECTS__
2134
- function R(t) {
2184
+ function N(t) {
2135
2185
  return {
2136
2186
  version: 1,
2137
2187
  vendor: "valibot",
2138
2188
  validate(e) {
2139
- return t["~run"]({ value: e }, /* @__PURE__ */ Hn());
2189
+ return t["~run"]({ value: e }, /* @__PURE__ */ nn());
2140
2190
  }
2141
2191
  };
2142
2192
  }
2143
- var ut = class extends Error {
2193
+ var ht = class extends Error {
2144
2194
  /**
2145
2195
  * Creates a Valibot error with useful information.
2146
2196
  *
@@ -2158,23 +2208,23 @@ function z(t) {
2158
2208
  reference: z,
2159
2209
  async: !1,
2160
2210
  schema: t,
2161
- "~run"(e, n) {
2162
- const r = e.value;
2211
+ "~run"(e, r) {
2212
+ const n = e.value;
2163
2213
  return e.value = (...i) => {
2164
- const s = this.schema["~run"]({ value: i }, n);
2214
+ const s = this.schema["~run"]({ value: i }, r);
2165
2215
  if (s.issues)
2166
- throw new ut(s.issues);
2167
- return r(...s.value);
2216
+ throw new ht(s.issues);
2217
+ return n(...s.value);
2168
2218
  }, e;
2169
2219
  }
2170
2220
  };
2171
2221
  }
2172
2222
  // @__NO_SIDE_EFFECTS__
2173
- function Yn() {
2223
+ function sn() {
2174
2224
  return {
2175
2225
  kind: "transformation",
2176
2226
  type: "await",
2177
- reference: Yn,
2227
+ reference: sn,
2178
2228
  async: !0,
2179
2229
  async "~run"(t) {
2180
2230
  return t.value = await t.value, t;
@@ -2182,307 +2232,307 @@ function Yn() {
2182
2232
  };
2183
2233
  }
2184
2234
  // @__NO_SIDE_EFFECTS__
2185
- function Vn(t, e) {
2235
+ function on(t, e) {
2186
2236
  return {
2187
2237
  kind: "validation",
2188
2238
  type: "check",
2189
- reference: Vn,
2239
+ reference: on,
2190
2240
  async: !1,
2191
2241
  expects: null,
2192
2242
  requirement: t,
2193
2243
  message: e,
2194
- "~run"(n, r) {
2195
- return n.typed && !this.requirement(n.value) && P(this, "input", n, r), n;
2244
+ "~run"(r, n) {
2245
+ return r.typed && !this.requirement(r.value) && S(this, "input", r, n), r;
2196
2246
  }
2197
2247
  };
2198
2248
  }
2199
2249
  // @__NO_SIDE_EFFECTS__
2200
- function Xn(t, e) {
2250
+ function an(t, e) {
2201
2251
  return {
2202
2252
  kind: "validation",
2203
2253
  type: "length",
2204
- reference: Xn,
2254
+ reference: an,
2205
2255
  async: !1,
2206
2256
  expects: `${t}`,
2207
2257
  requirement: t,
2208
2258
  message: e,
2209
- "~run"(n, r) {
2210
- return n.typed && n.value.length !== this.requirement && P(this, "length", n, r, {
2211
- received: `${n.value.length}`
2212
- }), n;
2259
+ "~run"(r, n) {
2260
+ return r.typed && r.value.length !== this.requirement && S(this, "length", r, n, {
2261
+ received: `${r.value.length}`
2262
+ }), r;
2213
2263
  }
2214
2264
  };
2215
2265
  }
2216
2266
  // @__NO_SIDE_EFFECTS__
2217
- function Ae(t, e) {
2267
+ function Te(t, e) {
2218
2268
  return {
2219
2269
  kind: "validation",
2220
2270
  type: "max_value",
2221
- reference: Ae,
2271
+ reference: Te,
2222
2272
  async: !1,
2223
- expects: `<=${t instanceof Date ? t.toJSON() : /* @__PURE__ */ He(t)}`,
2273
+ expects: `<=${t instanceof Date ? t.toJSON() : /* @__PURE__ */ Ke(t)}`,
2224
2274
  requirement: t,
2225
2275
  message: e,
2226
- "~run"(n, r) {
2227
- return n.typed && !(n.value <= this.requirement) && P(this, "value", n, r, {
2228
- received: n.value instanceof Date ? n.value.toJSON() : /* @__PURE__ */ He(n.value)
2229
- }), n;
2276
+ "~run"(r, n) {
2277
+ return r.typed && !(r.value <= this.requirement) && S(this, "value", r, n, {
2278
+ received: r.value instanceof Date ? r.value.toJSON() : /* @__PURE__ */ Ke(r.value)
2279
+ }), r;
2230
2280
  }
2231
2281
  };
2232
2282
  }
2233
2283
  // @__NO_SIDE_EFFECTS__
2234
- function jt(t, e) {
2284
+ function Vt(t, e) {
2235
2285
  return {
2236
2286
  kind: "validation",
2237
2287
  type: "min_length",
2238
- reference: jt,
2288
+ reference: Vt,
2239
2289
  async: !1,
2240
2290
  expects: `>=${t}`,
2241
2291
  requirement: t,
2242
2292
  message: e,
2243
- "~run"(n, r) {
2244
- return n.typed && n.value.length < this.requirement && P(this, "length", n, r, {
2245
- received: `${n.value.length}`
2246
- }), n;
2293
+ "~run"(r, n) {
2294
+ return r.typed && r.value.length < this.requirement && S(this, "length", r, n, {
2295
+ received: `${r.value.length}`
2296
+ }), r;
2247
2297
  }
2248
2298
  };
2249
2299
  }
2250
2300
  // @__NO_SIDE_EFFECTS__
2251
- function G(t, e) {
2301
+ function $(t, e) {
2252
2302
  return {
2253
2303
  kind: "validation",
2254
2304
  type: "min_value",
2255
- reference: G,
2305
+ reference: $,
2256
2306
  async: !1,
2257
- expects: `>=${t instanceof Date ? t.toJSON() : /* @__PURE__ */ He(t)}`,
2307
+ expects: `>=${t instanceof Date ? t.toJSON() : /* @__PURE__ */ Ke(t)}`,
2258
2308
  requirement: t,
2259
2309
  message: e,
2260
- "~run"(n, r) {
2261
- return n.typed && !(n.value >= this.requirement) && P(this, "value", n, r, {
2262
- received: n.value instanceof Date ? n.value.toJSON() : /* @__PURE__ */ He(n.value)
2263
- }), n;
2310
+ "~run"(r, n) {
2311
+ return r.typed && !(r.value >= this.requirement) && S(this, "value", r, n, {
2312
+ received: r.value instanceof Date ? r.value.toJSON() : /* @__PURE__ */ Ke(r.value)
2313
+ }), r;
2264
2314
  }
2265
2315
  };
2266
2316
  }
2267
2317
  // @__NO_SIDE_EFFECTS__
2268
- function H(t) {
2318
+ function W(t) {
2269
2319
  return {
2270
2320
  kind: "transformation",
2271
2321
  type: "returns",
2272
- reference: H,
2322
+ reference: W,
2273
2323
  async: !1,
2274
2324
  schema: t,
2275
- "~run"(e, n) {
2276
- const r = e.value;
2325
+ "~run"(e, r) {
2326
+ const n = e.value;
2277
2327
  return e.value = (...i) => {
2278
2328
  const s = this.schema["~run"](
2279
- { value: r(...i) },
2280
- n
2329
+ { value: n(...i) },
2330
+ r
2281
2331
  );
2282
2332
  if (s.issues)
2283
- throw new ut(s.issues);
2333
+ throw new ht(s.issues);
2284
2334
  return s.value;
2285
2335
  }, e;
2286
2336
  }
2287
2337
  };
2288
2338
  }
2289
2339
  // @__NO_SIDE_EFFECTS__
2290
- function Wn(t) {
2340
+ function ln(t) {
2291
2341
  return {
2292
2342
  kind: "transformation",
2293
2343
  type: "returns",
2294
- reference: Wn,
2344
+ reference: ln,
2295
2345
  async: !1,
2296
2346
  schema: t,
2297
- "~run"(e, n) {
2298
- const r = e.value;
2347
+ "~run"(e, r) {
2348
+ const n = e.value;
2299
2349
  return e.value = async (...i) => {
2300
2350
  const s = await this.schema["~run"](
2301
- { value: await r(...i) },
2302
- n
2351
+ { value: await n(...i) },
2352
+ r
2303
2353
  );
2304
2354
  if (s.issues)
2305
- throw new ut(s.issues);
2355
+ throw new ht(s.issues);
2306
2356
  return s.value;
2307
2357
  }, e;
2308
2358
  }
2309
2359
  };
2310
2360
  }
2311
2361
  // @__NO_SIDE_EFFECTS__
2312
- function Ri(t, e, n) {
2362
+ function Ki(t, e, r) {
2313
2363
  return typeof t.fallback == "function" ? (
2314
2364
  // @ts-expect-error
2315
- t.fallback(e, n)
2365
+ t.fallback(e, r)
2316
2366
  ) : (
2317
2367
  // @ts-expect-error
2318
2368
  t.fallback
2319
2369
  );
2320
2370
  }
2321
2371
  // @__NO_SIDE_EFFECTS__
2322
- function Gn(t, e, n) {
2372
+ function un(t, e, r) {
2323
2373
  return typeof t.default == "function" ? (
2324
2374
  // @ts-expect-error
2325
- t.default(e, n)
2375
+ t.default(e, r)
2326
2376
  ) : (
2327
2377
  // @ts-expect-error
2328
2378
  t.default
2329
2379
  );
2330
2380
  }
2331
2381
  // @__NO_SIDE_EFFECTS__
2332
- function Kn(t, e) {
2382
+ function fn(t, e) {
2333
2383
  return {
2334
2384
  kind: "schema",
2335
2385
  type: "array",
2336
- reference: Kn,
2386
+ reference: fn,
2337
2387
  expects: "Array",
2338
2388
  async: !1,
2339
2389
  item: t,
2340
2390
  message: e,
2341
2391
  get "~standard"() {
2342
- return /* @__PURE__ */ R(this);
2392
+ return /* @__PURE__ */ N(this);
2343
2393
  },
2344
- "~run"(n, r) {
2345
- const i = n.value;
2394
+ "~run"(r, n) {
2395
+ const i = r.value;
2346
2396
  if (Array.isArray(i)) {
2347
- n.typed = !0, n.value = [];
2397
+ r.typed = !0, r.value = [];
2348
2398
  for (let s = 0; s < i.length; s++) {
2349
- const o = i[s], a = this.item["~run"]({ value: o }, r);
2350
- if (a.issues) {
2351
- const l = {
2399
+ const o = i[s], l = this.item["~run"]({ value: o }, n);
2400
+ if (l.issues) {
2401
+ const a = {
2352
2402
  type: "array",
2353
2403
  origin: "value",
2354
2404
  input: i,
2355
2405
  key: s,
2356
2406
  value: o
2357
2407
  };
2358
- for (const u of a.issues)
2359
- u.path ? u.path.unshift(l) : u.path = [l], n.issues?.push(u);
2360
- if (n.issues || (n.issues = a.issues), r.abortEarly) {
2361
- n.typed = !1;
2408
+ for (const u of l.issues)
2409
+ u.path ? u.path.unshift(a) : u.path = [a], r.issues?.push(u);
2410
+ if (r.issues || (r.issues = l.issues), n.abortEarly) {
2411
+ r.typed = !1;
2362
2412
  break;
2363
2413
  }
2364
2414
  }
2365
- a.typed || (n.typed = !1), n.value.push(a.value);
2415
+ l.typed || (r.typed = !1), r.value.push(l.value);
2366
2416
  }
2367
2417
  } else
2368
- P(this, "type", n, r);
2369
- return n;
2418
+ S(this, "type", r, n);
2419
+ return r;
2370
2420
  }
2371
2421
  };
2372
2422
  }
2373
2423
  // @__NO_SIDE_EFFECTS__
2374
- function Jn(t) {
2424
+ function cn(t) {
2375
2425
  return {
2376
2426
  kind: "schema",
2377
2427
  type: "boolean",
2378
- reference: Jn,
2428
+ reference: cn,
2379
2429
  expects: "boolean",
2380
2430
  async: !1,
2381
2431
  message: t,
2382
2432
  get "~standard"() {
2383
- return /* @__PURE__ */ R(this);
2433
+ return /* @__PURE__ */ N(this);
2384
2434
  },
2385
- "~run"(e, n) {
2386
- return typeof e.value == "boolean" ? e.typed = !0 : P(this, "type", e, n), e;
2435
+ "~run"(e, r) {
2436
+ return typeof e.value == "boolean" ? e.typed = !0 : S(this, "type", e, r), e;
2387
2437
  }
2388
2438
  };
2389
2439
  }
2390
2440
  // @__NO_SIDE_EFFECTS__
2391
- function Qn(t, e) {
2441
+ function hn(t, e) {
2392
2442
  return {
2393
2443
  kind: "schema",
2394
2444
  type: "custom",
2395
- reference: Qn,
2445
+ reference: hn,
2396
2446
  expects: "unknown",
2397
2447
  async: !1,
2398
2448
  check: t,
2399
2449
  message: e,
2400
2450
  get "~standard"() {
2401
- return /* @__PURE__ */ R(this);
2451
+ return /* @__PURE__ */ N(this);
2402
2452
  },
2403
- "~run"(n, r) {
2404
- return this.check(n.value) ? n.typed = !0 : P(this, "type", n, r), n;
2453
+ "~run"(r, n) {
2454
+ return this.check(r.value) ? r.typed = !0 : S(this, "type", r, n), r;
2405
2455
  }
2406
2456
  };
2407
2457
  }
2408
2458
  // @__NO_SIDE_EFFECTS__
2409
- function j(t) {
2459
+ function B(t) {
2410
2460
  return {
2411
2461
  kind: "schema",
2412
2462
  type: "function",
2413
- reference: j,
2463
+ reference: B,
2414
2464
  expects: "Function",
2415
2465
  async: !1,
2416
2466
  message: t,
2417
2467
  get "~standard"() {
2418
- return /* @__PURE__ */ R(this);
2468
+ return /* @__PURE__ */ N(this);
2419
2469
  },
2420
- "~run"(e, n) {
2421
- return typeof e.value == "function" ? e.typed = !0 : P(this, "type", e, n), e;
2470
+ "~run"(e, r) {
2471
+ return typeof e.value == "function" ? e.typed = !0 : S(this, "type", e, r), e;
2422
2472
  }
2423
2473
  };
2424
2474
  }
2425
2475
  // @__NO_SIDE_EFFECTS__
2426
- function g(t) {
2476
+ function E(t) {
2427
2477
  return {
2428
2478
  kind: "schema",
2429
2479
  type: "number",
2430
- reference: g,
2480
+ reference: E,
2431
2481
  expects: "number",
2432
2482
  async: !1,
2433
2483
  message: t,
2434
2484
  get "~standard"() {
2435
- return /* @__PURE__ */ R(this);
2485
+ return /* @__PURE__ */ N(this);
2436
2486
  },
2437
- "~run"(e, n) {
2438
- return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : P(this, "type", e, n), e;
2487
+ "~run"(e, r) {
2488
+ return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : S(this, "type", e, r), e;
2439
2489
  }
2440
2490
  };
2441
2491
  }
2442
2492
  // @__NO_SIDE_EFFECTS__
2443
- function C(t, e) {
2493
+ function T(t, e) {
2444
2494
  return {
2445
2495
  kind: "schema",
2446
2496
  type: "object",
2447
- reference: C,
2497
+ reference: T,
2448
2498
  expects: "Object",
2449
2499
  async: !1,
2450
2500
  entries: t,
2451
2501
  message: e,
2452
2502
  get "~standard"() {
2453
- return /* @__PURE__ */ R(this);
2503
+ return /* @__PURE__ */ N(this);
2454
2504
  },
2455
- "~run"(n, r) {
2456
- const i = n.value;
2505
+ "~run"(r, n) {
2506
+ const i = r.value;
2457
2507
  if (i && typeof i == "object") {
2458
- n.typed = !0, n.value = {};
2508
+ r.typed = !0, r.value = {};
2459
2509
  for (const s in this.entries) {
2460
2510
  const o = this.entries[s];
2461
2511
  if (s in i || (o.type === "exact_optional" || o.type === "optional" || o.type === "nullish") && // @ts-expect-error
2462
2512
  o.default !== void 0) {
2463
- const a = s in i ? (
2513
+ const l = s in i ? (
2464
2514
  // @ts-expect-error
2465
2515
  i[s]
2466
- ) : /* @__PURE__ */ Gn(o), l = o["~run"]({ value: a }, r);
2467
- if (l.issues) {
2516
+ ) : /* @__PURE__ */ un(o), a = o["~run"]({ value: l }, n);
2517
+ if (a.issues) {
2468
2518
  const u = {
2469
2519
  type: "object",
2470
2520
  origin: "value",
2471
2521
  input: i,
2472
2522
  key: s,
2473
- value: a
2523
+ value: l
2474
2524
  };
2475
- for (const f of l.issues)
2476
- f.path ? f.path.unshift(u) : f.path = [u], n.issues?.push(f);
2477
- if (n.issues || (n.issues = l.issues), r.abortEarly) {
2478
- n.typed = !1;
2525
+ for (const f of a.issues)
2526
+ f.path ? f.path.unshift(u) : f.path = [u], r.issues?.push(f);
2527
+ if (r.issues || (r.issues = a.issues), n.abortEarly) {
2528
+ r.typed = !1;
2479
2529
  break;
2480
2530
  }
2481
2531
  }
2482
- l.typed || (n.typed = !1), n.value[s] = l.value;
2532
+ a.typed || (r.typed = !1), r.value[s] = a.value;
2483
2533
  } else if (o.fallback !== void 0)
2484
- n.value[s] = /* @__PURE__ */ Ri(o);
2485
- else if (o.type !== "exact_optional" && o.type !== "optional" && o.type !== "nullish" && (P(this, "key", n, r, {
2534
+ r.value[s] = /* @__PURE__ */ Ki(o);
2535
+ else if (o.type !== "exact_optional" && o.type !== "optional" && o.type !== "nullish" && (S(this, "key", r, n, {
2486
2536
  input: void 0,
2487
2537
  expected: `"${s}"`,
2488
2538
  path: [
@@ -2495,251 +2545,256 @@ function C(t, e) {
2495
2545
  value: i[s]
2496
2546
  }
2497
2547
  ]
2498
- }), r.abortEarly))
2548
+ }), n.abortEarly))
2499
2549
  break;
2500
2550
  }
2501
2551
  } else
2502
- P(this, "type", n, r);
2503
- return n;
2552
+ S(this, "type", r, n);
2553
+ return r;
2504
2554
  }
2505
2555
  };
2506
2556
  }
2507
2557
  // @__NO_SIDE_EFFECTS__
2508
- function bt(t, e) {
2558
+ function U(t, e) {
2509
2559
  return {
2510
2560
  kind: "schema",
2511
2561
  type: "optional",
2512
- reference: bt,
2562
+ reference: U,
2513
2563
  expects: `(${t.expects} | undefined)`,
2514
2564
  async: !1,
2515
2565
  wrapped: t,
2516
2566
  default: e,
2517
2567
  get "~standard"() {
2518
- return /* @__PURE__ */ R(this);
2568
+ return /* @__PURE__ */ N(this);
2519
2569
  },
2520
- "~run"(n, r) {
2521
- return n.value === void 0 && (this.default !== void 0 && (n.value = /* @__PURE__ */ Gn(this, n, r)), n.value === void 0) ? (n.typed = !0, n) : this.wrapped["~run"](n, r);
2570
+ "~run"(r, n) {
2571
+ return r.value === void 0 && (this.default !== void 0 && (r.value = /* @__PURE__ */ un(this, r, n)), r.value === void 0) ? (r.typed = !0, r) : this.wrapped["~run"](r, n);
2522
2572
  }
2523
2573
  };
2524
2574
  }
2525
2575
  // @__NO_SIDE_EFFECTS__
2526
- function $n(t) {
2576
+ function pn(t) {
2527
2577
  return {
2528
2578
  kind: "schema",
2529
2579
  type: "promise",
2530
- reference: $n,
2580
+ reference: pn,
2531
2581
  expects: "Promise",
2532
2582
  async: !1,
2533
2583
  message: t,
2534
2584
  get "~standard"() {
2535
- return /* @__PURE__ */ R(this);
2585
+ return /* @__PURE__ */ N(this);
2536
2586
  },
2537
- "~run"(e, n) {
2538
- return e.value instanceof Promise ? e.typed = !0 : P(this, "type", e, n), e;
2587
+ "~run"(e, r) {
2588
+ return e.value instanceof Promise ? e.typed = !0 : S(this, "type", e, r), e;
2539
2589
  }
2540
2590
  };
2541
2591
  }
2542
2592
  // @__NO_SIDE_EFFECTS__
2543
- function Ye(t) {
2593
+ function te(t) {
2544
2594
  return {
2545
2595
  kind: "schema",
2546
2596
  type: "string",
2547
- reference: Ye,
2597
+ reference: te,
2548
2598
  expects: "string",
2549
2599
  async: !1,
2550
2600
  message: t,
2551
2601
  get "~standard"() {
2552
- return /* @__PURE__ */ R(this);
2602
+ return /* @__PURE__ */ N(this);
2553
2603
  },
2554
- "~run"(e, n) {
2555
- return typeof e.value == "string" ? e.typed = !0 : P(this, "type", e, n), e;
2604
+ "~run"(e, r) {
2605
+ return typeof e.value == "string" ? e.typed = !0 : S(this, "type", e, r), e;
2556
2606
  }
2557
2607
  };
2558
2608
  }
2559
2609
  // @__NO_SIDE_EFFECTS__
2560
- function B(t, e) {
2610
+ function Z(t, e) {
2561
2611
  return {
2562
2612
  kind: "schema",
2563
2613
  type: "tuple",
2564
- reference: B,
2614
+ reference: Z,
2565
2615
  expects: "Array",
2566
2616
  async: !1,
2567
2617
  items: t,
2568
2618
  message: e,
2569
2619
  get "~standard"() {
2570
- return /* @__PURE__ */ R(this);
2620
+ return /* @__PURE__ */ N(this);
2571
2621
  },
2572
- "~run"(n, r) {
2573
- const i = n.value;
2622
+ "~run"(r, n) {
2623
+ const i = r.value;
2574
2624
  if (Array.isArray(i)) {
2575
- n.typed = !0, n.value = [];
2625
+ r.typed = !0, r.value = [];
2576
2626
  for (let s = 0; s < this.items.length; s++) {
2577
- const o = i[s], a = this.items[s]["~run"]({ value: o }, r);
2578
- if (a.issues) {
2579
- const l = {
2627
+ const o = i[s], l = this.items[s]["~run"]({ value: o }, n);
2628
+ if (l.issues) {
2629
+ const a = {
2580
2630
  type: "array",
2581
2631
  origin: "value",
2582
2632
  input: i,
2583
2633
  key: s,
2584
2634
  value: o
2585
2635
  };
2586
- for (const u of a.issues)
2587
- u.path ? u.path.unshift(l) : u.path = [l], n.issues?.push(u);
2588
- if (n.issues || (n.issues = a.issues), r.abortEarly) {
2589
- n.typed = !1;
2636
+ for (const u of l.issues)
2637
+ u.path ? u.path.unshift(a) : u.path = [a], r.issues?.push(u);
2638
+ if (r.issues || (r.issues = l.issues), n.abortEarly) {
2639
+ r.typed = !1;
2590
2640
  break;
2591
2641
  }
2592
2642
  }
2593
- a.typed || (n.typed = !1), n.value.push(a.value);
2643
+ l.typed || (r.typed = !1), r.value.push(l.value);
2594
2644
  }
2595
2645
  } else
2596
- P(this, "type", n, r);
2597
- return n;
2646
+ S(this, "type", r, n);
2647
+ return r;
2598
2648
  }
2599
2649
  };
2600
2650
  }
2601
2651
  // @__NO_SIDE_EFFECTS__
2602
- function je(t) {
2652
+ function Ye(t) {
2603
2653
  return {
2604
2654
  kind: "schema",
2605
2655
  type: "void",
2606
- reference: je,
2656
+ reference: Ye,
2607
2657
  expects: "void",
2608
2658
  async: !1,
2609
2659
  message: t,
2610
2660
  get "~standard"() {
2611
- return /* @__PURE__ */ R(this);
2661
+ return /* @__PURE__ */ N(this);
2612
2662
  },
2613
- "~run"(e, n) {
2614
- return e.value === void 0 ? e.typed = !0 : P(this, "type", e, n), e;
2663
+ "~run"(e, r) {
2664
+ return e.value === void 0 ? e.typed = !0 : S(this, "type", e, r), e;
2615
2665
  }
2616
2666
  };
2617
2667
  }
2618
- function Je(t, e, n) {
2619
- const r = t["~run"]({ value: e }, /* @__PURE__ */ Hn(n));
2620
- if (r.issues)
2621
- throw new ut(r.issues);
2622
- return r.value;
2668
+ function tt(t, e, r) {
2669
+ const n = t["~run"]({ value: e }, /* @__PURE__ */ nn(r));
2670
+ if (n.issues)
2671
+ throw new ht(n.issues);
2672
+ return n.value;
2623
2673
  }
2624
2674
  // @__NO_SIDE_EFFECTS__
2625
- function E(...t) {
2675
+ function _(...t) {
2626
2676
  return {
2627
2677
  ...t[0],
2628
2678
  pipe: t,
2629
2679
  get "~standard"() {
2630
- return /* @__PURE__ */ R(this);
2680
+ return /* @__PURE__ */ N(this);
2631
2681
  },
2632
- "~run"(e, n) {
2633
- for (const r of t)
2634
- if (r.kind !== "metadata") {
2635
- if (e.issues && (r.kind === "schema" || r.kind === "transformation")) {
2682
+ "~run"(e, r) {
2683
+ for (const n of t)
2684
+ if (n.kind !== "metadata") {
2685
+ if (e.issues && (n.kind === "schema" || n.kind === "transformation")) {
2636
2686
  e.typed = !1;
2637
2687
  break;
2638
2688
  }
2639
- (!e.issues || !n.abortEarly && !n.abortPipeEarly) && (e = r["~run"](e, n));
2689
+ (!e.issues || !r.abortEarly && !r.abortPipeEarly) && (e = n["~run"](e, r));
2640
2690
  }
2641
2691
  return e;
2642
2692
  }
2643
2693
  };
2644
2694
  }
2645
2695
  // @__NO_SIDE_EFFECTS__
2646
- function Ni(...t) {
2696
+ function Ji(...t) {
2647
2697
  return {
2648
2698
  ...t[0],
2649
2699
  pipe: t,
2650
2700
  async: !0,
2651
2701
  get "~standard"() {
2652
- return /* @__PURE__ */ R(this);
2702
+ return /* @__PURE__ */ N(this);
2653
2703
  },
2654
- async "~run"(e, n) {
2655
- for (const r of t)
2656
- if (r.kind !== "metadata") {
2657
- if (e.issues && (r.kind === "schema" || r.kind === "transformation")) {
2704
+ async "~run"(e, r) {
2705
+ for (const n of t)
2706
+ if (n.kind !== "metadata") {
2707
+ if (e.issues && (n.kind === "schema" || n.kind === "transformation")) {
2658
2708
  e.typed = !1;
2659
2709
  break;
2660
2710
  }
2661
- (!e.issues || !n.abortEarly && !n.abortPipeEarly) && (e = await r["~run"](e, n));
2711
+ (!e.issues || !r.abortEarly && !r.abortPipeEarly) && (e = await n["~run"](e, r));
2662
2712
  }
2663
2713
  return e;
2664
2714
  }
2665
2715
  };
2666
2716
  }
2667
- const kt = /* @__PURE__ */ E(/* @__PURE__ */ g(), /* @__PURE__ */ G(-90), /* @__PURE__ */ Ae(90)), Mt = /* @__PURE__ */ E(/* @__PURE__ */ g(), /* @__PURE__ */ G(-180), /* @__PURE__ */ Ae(180)), zi = /* @__PURE__ */ C({
2668
- sw: /* @__PURE__ */ C({ lat: kt, lng: Mt }),
2669
- ne: /* @__PURE__ */ C({ lat: kt, lng: Mt })
2670
- }), xt = /* @__PURE__ */ Qn((t) => t instanceof HTMLElement, "Must be an HTMLElement"), ji = /* @__PURE__ */ C({
2671
- mapSize: /* @__PURE__ */ E(/* @__PURE__ */ g(), /* @__PURE__ */ G(1)),
2672
- zoomMin: /* @__PURE__ */ E(/* @__PURE__ */ g(), /* @__PURE__ */ G(0)),
2673
- zoomMax: /* @__PURE__ */ E(/* @__PURE__ */ g(), /* @__PURE__ */ G(0)),
2674
- zoomScale: /* @__PURE__ */ E(/* @__PURE__ */ g(), /* @__PURE__ */ G(1), /* @__PURE__ */ Ae(10))
2675
- }), Bi = /* @__PURE__ */ C({
2676
- inserted: /* @__PURE__ */ E(/* @__PURE__ */ j(), /* @__PURE__ */ z(/* @__PURE__ */ B([])), /* @__PURE__ */ H(/* @__PURE__ */ Jn())),
2677
- insert: /* @__PURE__ */ E(/* @__PURE__ */ j(), /* @__PURE__ */ z(/* @__PURE__ */ B([])), /* @__PURE__ */ H(/* @__PURE__ */ je())),
2678
- remove: /* @__PURE__ */ E(/* @__PURE__ */ j(), /* @__PURE__ */ z(/* @__PURE__ */ B([])), /* @__PURE__ */ H(/* @__PURE__ */ je())),
2679
- update: /* @__PURE__ */ E(/* @__PURE__ */ j(), /* @__PURE__ */ z(/* @__PURE__ */ B([/* @__PURE__ */ g()])), /* @__PURE__ */ H(/* @__PURE__ */ je()))
2680
- }), Ui = /* @__PURE__ */ C({
2681
- getParameters: /* @__PURE__ */ E(/* @__PURE__ */ j(), /* @__PURE__ */ z(/* @__PURE__ */ B([])), /* @__PURE__ */ H(ji)),
2682
- getContainer: /* @__PURE__ */ E(/* @__PURE__ */ j(), /* @__PURE__ */ z(/* @__PURE__ */ B([])), /* @__PURE__ */ H(xt)),
2683
- getZoom: /* @__PURE__ */ E(/* @__PURE__ */ j(), /* @__PURE__ */ z(/* @__PURE__ */ B([])), /* @__PURE__ */ H(/* @__PURE__ */ g())),
2684
- getBounds: /* @__PURE__ */ E(/* @__PURE__ */ j(), /* @__PURE__ */ z(/* @__PURE__ */ B([])), /* @__PURE__ */ H(zi)),
2685
- panBy: /* @__PURE__ */ E(/* @__PURE__ */ j(), /* @__PURE__ */ z(/* @__PURE__ */ B([/* @__PURE__ */ g(), /* @__PURE__ */ g()])), /* @__PURE__ */ H(/* @__PURE__ */ je())),
2686
- createMarker: /* @__PURE__ */ E(
2687
- /* @__PURE__ */ j(),
2688
- /* @__PURE__ */ z(/* @__PURE__ */ B([xt, kt, Mt, /* @__PURE__ */ g()])),
2689
- /* @__PURE__ */ H(Bi)
2717
+ const Ct = /* @__PURE__ */ _(/* @__PURE__ */ E(), /* @__PURE__ */ $(-90), /* @__PURE__ */ Te(90)), Tt = /* @__PURE__ */ _(/* @__PURE__ */ E(), /* @__PURE__ */ $(-180), /* @__PURE__ */ Te(180)), Qi = /* @__PURE__ */ T({
2718
+ sw: /* @__PURE__ */ T({ lat: Ct, lng: Tt }),
2719
+ ne: /* @__PURE__ */ T({ lat: Ct, lng: Tt })
2720
+ }), Lt = /* @__PURE__ */ hn((t) => t instanceof HTMLElement, "Must be an HTMLElement"), $i = /* @__PURE__ */ T({
2721
+ mapSize: /* @__PURE__ */ _(/* @__PURE__ */ E(), /* @__PURE__ */ $(1)),
2722
+ zoomMin: /* @__PURE__ */ _(/* @__PURE__ */ E(), /* @__PURE__ */ $(0)),
2723
+ zoomMax: /* @__PURE__ */ _(/* @__PURE__ */ E(), /* @__PURE__ */ $(0)),
2724
+ zoomScale: /* @__PURE__ */ _(/* @__PURE__ */ E(), /* @__PURE__ */ $(1), /* @__PURE__ */ Te(10))
2725
+ }), es = /* @__PURE__ */ T({
2726
+ inserted: /* @__PURE__ */ _(/* @__PURE__ */ B(), /* @__PURE__ */ z(/* @__PURE__ */ Z([])), /* @__PURE__ */ W(/* @__PURE__ */ cn())),
2727
+ insert: /* @__PURE__ */ _(/* @__PURE__ */ B(), /* @__PURE__ */ z(/* @__PURE__ */ Z([])), /* @__PURE__ */ W(/* @__PURE__ */ Ye())),
2728
+ remove: /* @__PURE__ */ _(/* @__PURE__ */ B(), /* @__PURE__ */ z(/* @__PURE__ */ Z([])), /* @__PURE__ */ W(/* @__PURE__ */ Ye())),
2729
+ update: /* @__PURE__ */ _(/* @__PURE__ */ B(), /* @__PURE__ */ z(/* @__PURE__ */ Z([/* @__PURE__ */ E()])), /* @__PURE__ */ W(/* @__PURE__ */ Ye()))
2730
+ }), ts = /* @__PURE__ */ T({
2731
+ getParameters: /* @__PURE__ */ _(/* @__PURE__ */ B(), /* @__PURE__ */ z(/* @__PURE__ */ Z([])), /* @__PURE__ */ W($i)),
2732
+ getContainer: /* @__PURE__ */ _(/* @__PURE__ */ B(), /* @__PURE__ */ z(/* @__PURE__ */ Z([])), /* @__PURE__ */ W(Lt)),
2733
+ getZoom: /* @__PURE__ */ _(/* @__PURE__ */ B(), /* @__PURE__ */ z(/* @__PURE__ */ Z([])), /* @__PURE__ */ W(/* @__PURE__ */ E())),
2734
+ getBounds: /* @__PURE__ */ _(/* @__PURE__ */ B(), /* @__PURE__ */ z(/* @__PURE__ */ Z([])), /* @__PURE__ */ W(Qi)),
2735
+ panBy: /* @__PURE__ */ _(/* @__PURE__ */ B(), /* @__PURE__ */ z(/* @__PURE__ */ Z([/* @__PURE__ */ E(), /* @__PURE__ */ E()])), /* @__PURE__ */ W(/* @__PURE__ */ Ye())),
2736
+ createMarker: /* @__PURE__ */ _(
2737
+ /* @__PURE__ */ B(),
2738
+ /* @__PURE__ */ z(/* @__PURE__ */ Z([Lt, Ct, Tt, /* @__PURE__ */ E()])),
2739
+ /* @__PURE__ */ W(es)
2690
2740
  )
2691
- }), dt = /* @__PURE__ */ E(
2692
- /* @__PURE__ */ j(),
2693
- /* @__PURE__ */ z(/* @__PURE__ */ B([/* @__PURE__ */ Ye()])),
2694
- /* @__PURE__ */ Wn(/* @__PURE__ */ Ni(/* @__PURE__ */ $n(), /* @__PURE__ */ Yn(), xt))
2695
- ), Zi = /* @__PURE__ */ C({
2696
- id: /* @__PURE__ */ E(/* @__PURE__ */ Ye(), /* @__PURE__ */ jt(1)),
2697
- rank: /* @__PURE__ */ E(/* @__PURE__ */ g(), /* @__PURE__ */ G(0)),
2698
- lat: /* @__PURE__ */ E(/* @__PURE__ */ g(), /* @__PURE__ */ G(-90), /* @__PURE__ */ Ae(90)),
2699
- lng: /* @__PURE__ */ E(/* @__PURE__ */ g(), /* @__PURE__ */ G(-180), /* @__PURE__ */ Ae(180)),
2700
- tooltip: /* @__PURE__ */ C({
2701
- style: /* @__PURE__ */ E(
2702
- /* @__PURE__ */ C({
2703
- width: /* @__PURE__ */ g(),
2704
- height: /* @__PURE__ */ g(),
2705
- margin: /* @__PURE__ */ g(),
2706
- radius: /* @__PURE__ */ g()
2707
- }),
2708
- /* @__PURE__ */ Vn(
2709
- (t) => Math.min(t.width, t.height) / t.margin >= 6,
2710
- "Tooltip: minimum of width or height must be greater than or equal to 6 * margin"
2711
- )
2712
- ),
2713
- body: dt
2741
+ }), kt = /* @__PURE__ */ _(
2742
+ /* @__PURE__ */ B(),
2743
+ /* @__PURE__ */ z(/* @__PURE__ */ Z([/* @__PURE__ */ te()])),
2744
+ /* @__PURE__ */ ln(/* @__PURE__ */ Ji(/* @__PURE__ */ pn(), /* @__PURE__ */ sn(), Lt))
2745
+ ), rs = /* @__PURE__ */ T({
2746
+ background: /* @__PURE__ */ U(/* @__PURE__ */ te()),
2747
+ border: /* @__PURE__ */ U(/* @__PURE__ */ te()),
2748
+ shadow: /* @__PURE__ */ U(/* @__PURE__ */ te())
2749
+ }), ns = /* @__PURE__ */ T({
2750
+ width: /* @__PURE__ */ E(),
2751
+ height: /* @__PURE__ */ E(),
2752
+ radius: /* @__PURE__ */ E()
2753
+ }), gr = /* @__PURE__ */ T({
2754
+ background: /* @__PURE__ */ U(/* @__PURE__ */ te()),
2755
+ shadow: /* @__PURE__ */ U(/* @__PURE__ */ te())
2756
+ }), _r = /* @__PURE__ */ _(
2757
+ /* @__PURE__ */ T({
2758
+ width: /* @__PURE__ */ E(),
2759
+ height: /* @__PURE__ */ E(),
2760
+ margin: /* @__PURE__ */ E(),
2761
+ radius: /* @__PURE__ */ E()
2762
+ }),
2763
+ /* @__PURE__ */ on(
2764
+ (t) => Math.min(t.width, t.height) / t.margin >= 6,
2765
+ "Tooltip: minimum of width or height must be greater than or equal to 6 * margin"
2766
+ )
2767
+ ), is = /* @__PURE__ */ T({
2768
+ id: /* @__PURE__ */ _(/* @__PURE__ */ te(), /* @__PURE__ */ Vt(1)),
2769
+ rank: /* @__PURE__ */ _(/* @__PURE__ */ E(), /* @__PURE__ */ $(0)),
2770
+ lat: /* @__PURE__ */ _(/* @__PURE__ */ E(), /* @__PURE__ */ $(-90), /* @__PURE__ */ Te(90)),
2771
+ lng: /* @__PURE__ */ _(/* @__PURE__ */ E(), /* @__PURE__ */ $(-180), /* @__PURE__ */ Te(180)),
2772
+ tooltip: /* @__PURE__ */ T({
2773
+ body: kt,
2774
+ style: _r,
2775
+ colors: /* @__PURE__ */ U(gr)
2714
2776
  }),
2715
- pin: /* @__PURE__ */ bt(
2716
- /* @__PURE__ */ C({
2717
- style: /* @__PURE__ */ C({
2718
- width: /* @__PURE__ */ g(),
2719
- height: /* @__PURE__ */ g(),
2720
- radius: /* @__PURE__ */ g()
2721
- }),
2722
- body: dt
2777
+ pin: /* @__PURE__ */ U(
2778
+ /* @__PURE__ */ T({
2779
+ body: kt,
2780
+ style: /* @__PURE__ */ U(ns),
2781
+ colors: /* @__PURE__ */ U(rs)
2723
2782
  })
2724
2783
  ),
2725
- popup: /* @__PURE__ */ bt(
2726
- /* @__PURE__ */ C({
2727
- style: /* @__PURE__ */ C({
2728
- width: /* @__PURE__ */ g(),
2729
- height: /* @__PURE__ */ g(),
2730
- radius: /* @__PURE__ */ g(),
2731
- margin: /* @__PURE__ */ g()
2732
- }),
2733
- body: dt
2784
+ popup: /* @__PURE__ */ U(
2785
+ /* @__PURE__ */ T({
2786
+ body: kt,
2787
+ style: _r,
2788
+ colors: /* @__PURE__ */ U(gr)
2734
2789
  })
2735
2790
  )
2736
- }), qi = /* @__PURE__ */ Kn(Zi);
2737
- var ve;
2791
+ }), ss = /* @__PURE__ */ fn(is);
2792
+ var ye;
2738
2793
  ((t) => {
2739
2794
  t.COUNT = 12, t.DEGREES = [0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330], t.DEGREES_DEFAULT = 270;
2740
- })(ve || (ve = {}));
2741
- const Hi = /* @__PURE__ */ E(/* @__PURE__ */ Ye(), /* @__PURE__ */ Xn(32)), Yi = /* @__PURE__ */ E(/* @__PURE__ */ Ye(), /* @__PURE__ */ jt(1)), an = "1.1.4", Bt = "https://maps.api.arenarium.dev", Vi = `${Bt}/auth`, Xi = `${Bt}/states`, Wi = `${Bt}/log`;
2742
- class er {
2795
+ })(ye || (ye = {}));
2796
+ const os = /* @__PURE__ */ _(/* @__PURE__ */ te(), /* @__PURE__ */ an(32)), as = /* @__PURE__ */ _(/* @__PURE__ */ te(), /* @__PURE__ */ Vt(1)), wr = "1.2.0", Xt = "https://maps.api.arenarium.dev", ls = `${Xt}/auth`, us = `${Xt}/states`, fs = `${Xt}/log`;
2797
+ class dn {
2743
2798
  apiKey;
2744
2799
  apiToken;
2745
2800
  apiDevEnvironment;
@@ -2750,24 +2805,24 @@ class er {
2750
2805
  markerPinProcessor;
2751
2806
  markerTooltipProcessor;
2752
2807
  markerPopupProcessor;
2753
- constructor(e, n, r, i) {
2754
- Je(Hi, e), Je(Yi, n), Je(Ui, r), this.apiKey = e, this.apiToken = n, this.apiDevEnvironment = window?.location.host.startsWith("localhost") || window?.location.host.startsWith("127.0.0.1"), this.mapProvider = r, this.markerPinProcessor = new st(r), this.markerTooltipProcessor = new Ki(r), this.markerPopupProcessor = new Ji(r), this.setConfiguration(i);
2808
+ constructor(e, r, n, i) {
2809
+ tt(os, e), tt(as, r), tt(ts, n), this.apiKey = e, this.apiToken = r, this.apiDevEnvironment = window?.location.host.startsWith("localhost") || window?.location.host.startsWith("127.0.0.1"), this.mapProvider = n, this.markerPinProcessor = new lt(n), this.markerTooltipProcessor = new hs(n), this.markerPopupProcessor = new ps(n), this.setConfiguration(i);
2755
2810
  }
2756
- static async create(e, n, r) {
2757
- const i = { key: e, version: an };
2758
- let o = (await ze.post(Vi, i)).token;
2811
+ static async create(e, r, n) {
2812
+ const i = { key: e, version: wr };
2813
+ let o = (await He.post(ls, i)).token;
2759
2814
  if (!o) throw new Error("Failed to get api token");
2760
- return new er(e, o, n, r);
2815
+ return new dn(e, o, r, n);
2761
2816
  }
2762
2817
  setConfiguration(e) {
2763
- ie.setLimit(e?.animation?.queue?.limit ?? 8 * navigator.hardwareConcurrency), this.markerPinProcessor.setConfiguration(e);
2818
+ ae.setLimit(e?.animation?.queue?.limit ?? 8 * navigator.hardwareConcurrency), this.markerPinProcessor.setConfiguration(e);
2764
2819
  }
2765
2820
  async updateMarkers(e) {
2766
- Je(qi, e);
2821
+ tt(ss, e);
2767
2822
  try {
2768
2823
  await this.updateMarkerData(e), this.processMarkerDataCallback();
2769
- } catch (n) {
2770
- throw console.error(n), this.removeMarkerData(), n instanceof Error && this.log("error", "Failed to update markers", n), n;
2824
+ } catch (r) {
2825
+ throw console.error(r), this.removeMarkerData(), r instanceof Error && this.log("error", "Failed to update markers", r), r;
2771
2826
  }
2772
2827
  }
2773
2828
  removeMarkers() {
@@ -2779,56 +2834,56 @@ class er {
2779
2834
  }
2780
2835
  showPopup(e) {
2781
2836
  try {
2782
- for (const n of this.markerDataArray)
2783
- n.marker.id == e ? this.markerPopupProcessor.show(n) : this.markerPopupProcessor.hide(n);
2784
- } catch (n) {
2785
- console.error(n);
2786
2837
  for (const r of this.markerDataArray)
2787
- this.markerPopupProcessor.hide(r);
2788
- throw n instanceof Error && this.log("error", "Failed to show popup", n), n;
2838
+ r.marker.id == e ? this.markerPopupProcessor.show(r) : this.markerPopupProcessor.hide(r);
2839
+ } catch (r) {
2840
+ console.error(r);
2841
+ for (const n of this.markerDataArray)
2842
+ this.markerPopupProcessor.hide(n);
2843
+ throw r instanceof Error && this.log("error", "Failed to show popup", r), r;
2789
2844
  }
2790
2845
  }
2791
2846
  hidePopup(e) {
2792
2847
  try {
2793
2848
  if (e) {
2794
- const n = this.markerDataMap.get(e);
2795
- if (n == null) return;
2796
- this.markerPopupProcessor.hide(n);
2797
- } else
2798
- for (const n of this.markerDataArray)
2799
- this.markerPopupProcessor.hide(n);
2800
- } catch (n) {
2801
- console.error(n);
2802
- for (const r of this.markerDataArray)
2849
+ const r = this.markerDataMap.get(e);
2850
+ if (r == null) return;
2803
2851
  this.markerPopupProcessor.hide(r);
2804
- throw n instanceof Error && this.log("error", "Failed to hide popup", n), n;
2852
+ } else
2853
+ for (const r of this.markerDataArray)
2854
+ this.markerPopupProcessor.hide(r);
2855
+ } catch (r) {
2856
+ console.error(r);
2857
+ for (const n of this.markerDataArray)
2858
+ this.markerPopupProcessor.hide(n);
2859
+ throw r instanceof Error && this.log("error", "Failed to hide popup", r), r;
2805
2860
  }
2806
2861
  }
2807
2862
  async updateMarkerData(e) {
2808
2863
  try {
2809
- let n = this.markerDataArray.map((i) => i.marker);
2864
+ let r = this.markerDataArray.map((i) => i.marker);
2810
2865
  for (let i = 0; i < e.length; i++) {
2811
2866
  const s = e[i];
2812
- this.markerDataMap.get(s.id) || n.push(s);
2867
+ this.markerDataMap.get(s.id) || r.push(s);
2813
2868
  }
2814
- const r = await this.getMarkerStates(n);
2869
+ const n = await this.getMarkerStates(r);
2815
2870
  try {
2816
2871
  this.markerDataUpdating = !0;
2817
- for (let i = 0; i < n.length; i++) {
2818
- const s = n[i], o = r[i], a = this.markerDataMap.get(s.id);
2819
- if (a)
2820
- a.update(o);
2872
+ for (let i = 0; i < r.length; i++) {
2873
+ const s = r[i], o = n[i], l = this.markerDataMap.get(s.id);
2874
+ if (l)
2875
+ l.update(o);
2821
2876
  else {
2822
- const l = new Gi(this.mapProvider, s, o);
2823
- l.create(), this.markerDataMap.set(s.id, l), this.markerDataArray.push(l);
2877
+ const a = new cs(this.mapProvider, s, o);
2878
+ a.create(), this.markerDataMap.set(s.id, a), this.markerDataArray.push(a);
2824
2879
  }
2825
2880
  }
2826
2881
  this.markerDataArray.sort((i, s) => i.zoom - s.zoom), this.markerPinProcessor.updateElements(this.markerDataArray.map((i) => i.pin)), this.markerTooltipProcessor.updateElements(this.markerDataArray.map((i) => i.tooltip)), this.markerPopupProcessor.updateElements(this.markerDataArray.map((i) => i.popup).filter((i) => i != null));
2827
2882
  } finally {
2828
2883
  this.markerDataUpdating = !1;
2829
2884
  }
2830
- } catch (n) {
2831
- throw console.error(n), this.markerDataArray.forEach((r) => r.remove()), this.markerDataArray.length = 0, this.markerDataMap.clear(), n instanceof Error && this.log("error", "Failed to update marker data", n), n;
2885
+ } catch (r) {
2886
+ throw console.error(r), this.markerDataArray.forEach((n) => n.remove()), this.markerDataArray.length = 0, this.markerDataMap.clear(), r instanceof Error && this.log("error", "Failed to update marker data", r), r;
2832
2887
  } finally {
2833
2888
  this.markerDataUpdating = !1;
2834
2889
  }
@@ -2844,8 +2899,8 @@ class er {
2844
2899
  }
2845
2900
  async getMarkerStates(e) {
2846
2901
  if (e.length == 0) return [];
2847
- if (e.length == 1) return [[0, [[0, ve.DEGREES.indexOf(ve.DEGREES_DEFAULT)]]]];
2848
- const n = e.map((s) => ({
2902
+ if (e.length == 1) return [[0, [[0, ye.DEGREES.indexOf(ye.DEGREES_DEFAULT)]]]];
2903
+ const r = e.map((s) => ({
2849
2904
  id: s.id,
2850
2905
  rank: s.rank,
2851
2906
  lat: s.lat,
@@ -2853,12 +2908,12 @@ class er {
2853
2908
  width: s.tooltip.style.width,
2854
2909
  height: s.tooltip.style.height,
2855
2910
  margin: s.tooltip.style.margin
2856
- })), r = {
2911
+ })), n = {
2857
2912
  key: this.apiKey,
2858
2913
  token: this.apiToken,
2859
2914
  parameters: this.mapProvider.getParameters(),
2860
- input: n
2861
- }, i = await ze.post(Xi, r, {
2915
+ input: r
2916
+ }, i = await He.post(us, n, {
2862
2917
  headers: { "Cache-Control": this.apiDevEnvironment ? "no-cache" : "" }
2863
2918
  });
2864
2919
  return i.token && (this.apiToken = i.token), i.states;
@@ -2873,35 +2928,35 @@ class er {
2873
2928
  }
2874
2929
  processMarkerData() {
2875
2930
  if (this.markerDataUpdating) return;
2876
- const e = this.mapProvider.getBounds(), n = this.mapProvider.getZoom();
2877
- this.markerPopupProcessor.process(), this.markerTooltipProcessor.process(e, n), this.markerPinProcessor.process(e, n);
2931
+ const e = this.mapProvider.getBounds(), r = this.mapProvider.getZoom();
2932
+ this.markerPopupProcessor.process(), this.markerTooltipProcessor.process(e, r), this.markerPinProcessor.process(e, r);
2878
2933
  }
2879
- async log(e, n, r) {
2934
+ async log(e, r, n) {
2880
2935
  if (!this.apiDevEnvironment)
2881
2936
  try {
2882
2937
  const i = {
2883
2938
  key: this.apiKey,
2884
- title: n,
2939
+ title: r,
2885
2940
  level: e,
2886
2941
  content: {
2887
- version: an,
2888
- ...r
2942
+ version: wr,
2943
+ ...n
2889
2944
  }
2890
2945
  };
2891
- await ze.post(Wi, i);
2946
+ await He.post(fs, i);
2892
2947
  } catch (i) {
2893
2948
  console.error(i);
2894
2949
  }
2895
2950
  }
2896
2951
  }
2897
- class Gi {
2952
+ class cs {
2898
2953
  marker;
2899
2954
  zoom;
2900
2955
  pin;
2901
2956
  tooltip;
2902
2957
  popup;
2903
- constructor(e, n, r) {
2904
- this.marker = n, this.zoom = r[0], this.pin = new Be(e, n, r), this.tooltip = new Zt(e, n, r), n.popup && (this.popup = new qt(e, n));
2958
+ constructor(e, r, n) {
2959
+ this.marker = r, this.zoom = n[0], this.pin = new Ve(e, r, n), this.tooltip = new Gt(e, r, n), r.popup && (this.popup = new Kt(e, r));
2905
2960
  }
2906
2961
  create() {
2907
2962
  this.pin.create(), this.tooltip.create(), this.popup?.create();
@@ -2913,7 +2968,7 @@ class Gi {
2913
2968
  this.pin.remove(), this.tooltip.remove(), this.popup?.remove();
2914
2969
  }
2915
2970
  }
2916
- class Ut {
2971
+ class Wt {
2917
2972
  provider;
2918
2973
  id;
2919
2974
  lat;
@@ -2922,8 +2977,8 @@ class Ut {
2922
2977
  element;
2923
2978
  component;
2924
2979
  marker;
2925
- constructor(e, n) {
2926
- this.provider = e, this.id = n.id, this.lat = n.lat, this.lng = n.lng, this.shown = !0;
2980
+ constructor(e, r) {
2981
+ this.provider = e, this.id = r.id, this.lat = r.lat, this.lng = r.lng, this.shown = !0;
2927
2982
  }
2928
2983
  create() {
2929
2984
  this.createElement(), this.createMarker(), this.updateZIndex();
@@ -2941,9 +2996,9 @@ class Ut {
2941
2996
  this.marker.update(this.getZindex());
2942
2997
  }
2943
2998
  updateMap(e) {
2944
- const n = this.marker, r = this.component;
2945
- if (n == null || r == null) throw new Error("Failed to update provider marker map");
2946
- e ? n.inserted() == !1 && n.insert() : n.inserted() == !0 && n.remove();
2999
+ const r = this.marker, n = this.component;
3000
+ if (r == null || n == null) throw new Error("Failed to update provider marker map");
3001
+ e ? r.inserted() == !1 && r.insert() : r.inserted() == !0 && r.remove();
2947
3002
  }
2948
3003
  getZindex() {
2949
3004
  throw new Error("Get z-index not implemented");
@@ -2952,28 +3007,26 @@ class Ut {
2952
3007
  this.marker?.remove();
2953
3008
  }
2954
3009
  }
2955
- class Be extends Ut {
3010
+ class Ve extends Wt {
2956
3011
  static DEFAULT_SIZE = 16;
2957
- width;
2958
- height;
2959
- radius;
3012
+ style;
3013
+ colors;
2960
3014
  zoom;
2961
3015
  bodyLoading = !1;
2962
3016
  bodyLoaded = !1;
2963
3017
  bodyCallback;
2964
- constructor(e, n, r) {
2965
- super(e, n), this.width = n.pin?.style.width ?? Be.DEFAULT_SIZE, this.height = n.pin?.style.height ?? Be.DEFAULT_SIZE, this.radius = n.pin?.style.radius ?? Be.DEFAULT_SIZE, this.zoom = r[0], this.bodyCallback = n.pin?.body;
3018
+ constructor(e, r, n) {
3019
+ super(e, r), this.style = r.pin?.style ?? { width: Ve.DEFAULT_SIZE, height: Ve.DEFAULT_SIZE, radius: Ve.DEFAULT_SIZE }, this.colors = r.pin?.colors, this.zoom = n[0], this.bodyCallback = r.pin?.body;
2966
3020
  }
2967
3021
  createElement() {
2968
- this.element = document.createElement("div"), this.element.classList.add("pin"), this.component = Nt(Ai, {
3022
+ this.element = document.createElement("div"), this.element.classList.add("pin"), this.component = Ht(Zi, {
2969
3023
  target: this.element,
2970
3024
  props: {
2971
3025
  id: this.id + "_pin",
2972
- layer: xi,
3026
+ layer: zi,
2973
3027
  priority: this.zoom * this.provider.getParameters().zoomScale,
2974
- width: this.width,
2975
- height: this.height,
2976
- radius: this.radius
3028
+ style: this.style,
3029
+ colors: this.colors
2977
3030
  }
2978
3031
  });
2979
3032
  }
@@ -2986,9 +3039,9 @@ class Be extends Ut {
2986
3039
  updateBody() {
2987
3040
  if (this.bodyCallback == null || this.bodyLoaded || this.bodyLoading) return;
2988
3041
  const e = this.component?.getBody();
2989
- e != null && (this.bodyLoading = !0, this.bodyCallback(this.id).then((n) => {
2990
- n instanceof HTMLElement ? e.appendChild(n) : console.error("Failed to load pin body");
2991
- }).catch((n) => console.error(n)).finally(() => {
3042
+ e != null && (this.bodyLoading = !0, this.bodyCallback(this.id).then((r) => {
3043
+ r instanceof HTMLElement ? e.appendChild(r) : console.error("Failed to load pin body");
3044
+ }).catch((r) => console.error(r)).finally(() => {
2992
3045
  this.bodyLoaded = !0, this.bodyLoading = !1;
2993
3046
  }));
2994
3047
  }
@@ -3014,7 +3067,7 @@ class Be extends Ut {
3014
3067
  return this.bodyCallback == null || this.bodyLoaded;
3015
3068
  }
3016
3069
  }
3017
- class st {
3070
+ class lt {
3018
3071
  static MAP_PINS_MAX_ZOOM = 2;
3019
3072
  static MAP_PINS_MAX_COUNT = 128;
3020
3073
  provider;
@@ -3030,52 +3083,48 @@ class st {
3030
3083
  this.provider = e;
3031
3084
  }
3032
3085
  setConfiguration(e) {
3033
- this.pinFade = e?.pin?.fade ?? !0, this.pinMaxCount = e?.pin?.maxCount ?? Math.max(st.MAP_PINS_MAX_COUNT, 8 * navigator.hardwareConcurrency), this.pinMaxZoomDelta = e?.pin?.maxZoom ?? st.MAP_PINS_MAX_ZOOM;
3086
+ this.pinFade = e?.pin?.fade ?? !0, this.pinMaxCount = e?.pin?.maxCount ?? Math.max(lt.MAP_PINS_MAX_COUNT, 8 * navigator.hardwareConcurrency), this.pinMaxZoomDelta = e?.pin?.maxZoom ?? lt.MAP_PINS_MAX_ZOOM;
3034
3087
  }
3035
3088
  updateElements(e) {
3036
- this.pinElements = e, this.pinMaxWidth = e.reduce((n, r) => Math.max(n, r.width), 0), this.pinMaxHeight = e.reduce((n, r) => Math.max(n, r.height), 0);
3089
+ this.pinElements = e, this.pinMaxWidth = e.reduce((r, n) => Math.max(r, n.style.width), 0), this.pinMaxHeight = e.reduce((r, n) => Math.max(r, n.style.height), 0);
3037
3090
  }
3038
3091
  removeElements() {
3039
3092
  this.pinElements.forEach((e) => e.remove()), this.pinElements.length = 0;
3040
3093
  }
3041
- process(e, n) {
3042
- const r = this.provider.getParameters().mapSize, i = new qn(e, n, r, this.pinMaxWidth * 2, this.pinMaxHeight * 2);
3094
+ process(e, r) {
3095
+ const n = this.provider.getParameters().mapSize, i = new rn(e, r, n, this.pinMaxWidth * 2, this.pinMaxHeight * 2);
3043
3096
  let s = 0;
3044
3097
  for (const o of this.pinElements)
3045
- i.contains(o.lat, o.lng) ? o.shown && n < o.zoom && o.zoom < n + this.pinMaxZoomDelta ? (s < this.pinMaxCount && (o.setCollapsed(!1), o.setScale(this.pinFade ? o.getScaleFromZoomDistance(n) : 1), o.updateMap(!0), o.isBodyLoaded() == !1 && o.updateBody()), s++) : (o.setCollapsed(!0), o.isCollapsed() && o.updateMap(!1)) : o.updateMap(!1);
3098
+ i.contains(o.lat, o.lng) ? o.shown && r < o.zoom && o.zoom < r + this.pinMaxZoomDelta ? (s < this.pinMaxCount && (o.setCollapsed(!1), o.setScale(this.pinFade ? o.getScaleFromZoomDistance(r) : 1), o.updateMap(!0), o.isBodyLoaded() == !1 && o.updateBody()), s++) : (o.setCollapsed(!0), o.isCollapsed() && o.updateMap(!1)) : o.updateMap(!1);
3046
3099
  }
3047
3100
  }
3048
- class Zt extends Ut {
3101
+ class Gt extends Wt {
3049
3102
  static Z_INDEX_OFFSET = 1e6;
3050
- width;
3051
- height;
3052
- margin;
3053
- radius;
3103
+ style;
3104
+ colors;
3054
3105
  zoom;
3055
3106
  angle;
3056
3107
  states;
3057
3108
  bodyLoading = !1;
3058
3109
  bodyLoaded = !1;
3059
3110
  bodyCallback;
3060
- constructor(e, n, r) {
3061
- super(e, n), this.width = n.tooltip.style.width, this.height = n.tooltip.style.height, this.margin = n.tooltip.style.margin, this.radius = n.tooltip.style.radius, this.zoom = r[0], this.angle = ve.DEGREES_DEFAULT, this.states = r[1].map((i) => [i[0], ve.DEGREES[i[1]]]), this.bodyCallback = n.tooltip.body;
3111
+ constructor(e, r, n) {
3112
+ super(e, r), this.style = r.tooltip.style, this.colors = r.tooltip.colors, this.zoom = n[0], this.angle = ye.DEGREES_DEFAULT, this.states = n[1].map((i) => [i[0], ye.DEGREES[i[1]]]), this.bodyCallback = r.tooltip.body;
3062
3113
  }
3063
3114
  createElement() {
3064
- this.element = document.createElement("div"), this.element.classList.add("tooltip"), this.component = Nt(Zn, {
3115
+ this.element = document.createElement("div"), this.element.classList.add("tooltip"), this.component = Ht(tn, {
3065
3116
  target: this.element,
3066
3117
  props: {
3067
3118
  id: this.id + "_tooltip",
3068
- layer: Mi,
3119
+ layer: ji,
3069
3120
  priority: this.zoom * this.provider.getParameters().zoomScale,
3070
- width: this.width,
3071
- height: this.height,
3072
- margin: this.margin,
3073
- radius: this.radius
3121
+ style: this.style,
3122
+ colors: this.colors
3074
3123
  }
3075
3124
  });
3076
3125
  }
3077
3126
  update(e) {
3078
- this.zoom = e[0], this.states = e[1].map((n) => [n[0], ve.DEGREES[n[1]]]), this.updateZIndex();
3127
+ this.zoom = e[0], this.states = e[1].map((r) => [r[0], ye.DEGREES[r[1]]]), this.updateZIndex();
3079
3128
  }
3080
3129
  updateMap(e) {
3081
3130
  super.updateMap(e), this.component?.setDisplayed(e);
@@ -3087,20 +3136,20 @@ class Zt extends Ut {
3087
3136
  updateBody() {
3088
3137
  if (this.bodyLoaded || this.bodyLoading) return;
3089
3138
  const e = this.component?.getBody();
3090
- e != null && (this.bodyLoading = !0, this.bodyCallback(this.id).then((n) => {
3091
- n instanceof HTMLElement ? e.appendChild(n) : console.error("Failed to load tooltip body");
3092
- }).catch((n) => console.error(n)).finally(() => {
3139
+ e != null && (this.bodyLoading = !0, this.bodyCallback(this.id).then((r) => {
3140
+ r instanceof HTMLElement ? e.appendChild(r) : console.error("Failed to load tooltip body");
3141
+ }).catch((r) => console.error(r)).finally(() => {
3093
3142
  this.bodyLoaded = !0, this.bodyLoading = !1;
3094
3143
  }));
3095
3144
  }
3096
3145
  getAngle(e) {
3097
- const n = this.states.findLast((r) => r[0] <= e);
3098
- if (!n) throw new Error("Angle not found");
3099
- return n[1];
3146
+ const r = this.states.findLast((n) => n[0] <= e);
3147
+ if (!r) throw new Error("Angle not found");
3148
+ return r[1];
3100
3149
  }
3101
3150
  getZindex() {
3102
3151
  const e = this.provider.getParameters();
3103
- return Math.round((e.zoomMax - this.zoom) * e.zoomScale) + Zt.Z_INDEX_OFFSET;
3152
+ return Math.round((e.zoomMax - this.zoom) * e.zoomScale) + Gt.Z_INDEX_OFFSET;
3104
3153
  }
3105
3154
  setCollapsed(e) {
3106
3155
  if (this.component == null) throw new Error("Failed to set tooltip collapsed");
@@ -3116,7 +3165,7 @@ class Zt extends Ut {
3116
3165
  return this.bodyLoaded;
3117
3166
  }
3118
3167
  }
3119
- class Ki {
3168
+ class hs {
3120
3169
  provider;
3121
3170
  // Data
3122
3171
  tooltipElements = new Array();
@@ -3127,41 +3176,37 @@ class Ki {
3127
3176
  this.provider = e;
3128
3177
  }
3129
3178
  updateElements(e) {
3130
- this.tooltipElements = e, this.tooltipMaxWidth = this.tooltipElements.reduce((n, r) => Math.max(n, r.width), 0), this.tooltipMaxHeight = this.tooltipElements.reduce((n, r) => Math.max(n, r.height), 0);
3179
+ this.tooltipElements = e, this.tooltipMaxWidth = this.tooltipElements.reduce((r, n) => Math.max(r, n.style.width), 0), this.tooltipMaxHeight = this.tooltipElements.reduce((r, n) => Math.max(r, n.style.height), 0);
3131
3180
  }
3132
3181
  removeElements() {
3133
3182
  this.tooltipElements.forEach((e) => e.remove()), this.tooltipElements.length = 0;
3134
3183
  }
3135
- process(e, n) {
3136
- const r = this.provider.getParameters().mapSize, i = new qn(e, n, r, this.tooltipMaxWidth * 2, this.tooltipMaxHeight * 2);
3184
+ process(e, r) {
3185
+ const n = this.provider.getParameters().mapSize, i = new rn(e, r, n, this.tooltipMaxWidth * 2, this.tooltipMaxHeight * 2);
3137
3186
  for (const s of this.tooltipElements)
3138
- i.contains(s.lat, s.lng) ? s.shown && s.zoom <= n ? (s.updateState(n), s.setCollapsed(!1), s.updateMap(!0), s.isCollapsed() == !1 && s.isBodyLoaded() == !1 && s.updateBody()) : (s.setCollapsed(!0), s.isCollapsed() && s.updateMap(!1)) : s.updateMap(!1);
3187
+ i.contains(s.lat, s.lng) ? s.shown && s.zoom <= r ? (s.updateState(r), s.setCollapsed(!1), s.updateMap(!0), s.isCollapsed() == !1 && s.isBodyLoaded() == !1 && s.updateBody()) : (s.setCollapsed(!0), s.isCollapsed() && s.updateMap(!1)) : s.updateMap(!1);
3139
3188
  }
3140
3189
  }
3141
- class qt extends Ut {
3190
+ class Kt extends Wt {
3142
3191
  static Z_INDEX_OFFSET = 2e6;
3143
- width;
3144
- height;
3145
- margin;
3146
- radius;
3192
+ style;
3193
+ colors;
3147
3194
  bodyLoading = !1;
3148
3195
  bodyLoaded = !1;
3149
3196
  bodyCallback;
3150
- constructor(e, n) {
3151
- if (n.popup == null) throw new Error("Failed to create popup");
3152
- super(e, n), this.shown = !1, this.width = n.popup.style.width, this.height = n.popup.style.height, this.margin = n.popup.style.margin, this.radius = n.popup.style.radius, this.bodyCallback = n.popup.body;
3197
+ constructor(e, r) {
3198
+ if (r.popup == null) throw new Error("Failed to create popup");
3199
+ super(e, r), this.shown = !1, this.style = r.popup.style, this.colors = r.popup.colors, this.bodyCallback = r.popup.body;
3153
3200
  }
3154
3201
  createElement() {
3155
- this.element = document.createElement("div"), this.element.classList.add("popup"), this.component = Nt(Zn, {
3202
+ this.element = document.createElement("div"), this.element.classList.add("popup"), this.component = Ht(tn, {
3156
3203
  target: this.element,
3157
3204
  props: {
3158
3205
  id: this.id + "_popup",
3159
- layer: ki,
3206
+ layer: Ni,
3160
3207
  priority: 0,
3161
- width: this.width,
3162
- height: this.height,
3163
- margin: this.margin,
3164
- radius: this.radius
3208
+ style: this.style,
3209
+ colors: this.colors
3165
3210
  }
3166
3211
  });
3167
3212
  }
@@ -3171,14 +3216,14 @@ class qt extends Ut {
3171
3216
  updateBody() {
3172
3217
  if (this.bodyLoaded || this.bodyLoading) return;
3173
3218
  const e = this.component?.getBody();
3174
- e != null && (this.bodyLoading = !0, this.bodyCallback(this.id).then((n) => {
3175
- n instanceof HTMLElement ? e.appendChild(n) : console.error("Failed to load popup body");
3176
- }).catch((n) => console.error(n)).finally(() => {
3219
+ e != null && (this.bodyLoading = !0, this.bodyCallback(this.id).then((r) => {
3220
+ r instanceof HTMLElement ? e.appendChild(r) : console.error("Failed to load popup body");
3221
+ }).catch((r) => console.error(r)).finally(() => {
3177
3222
  this.bodyLoaded = !0, this.bodyLoading = !1;
3178
3223
  }));
3179
3224
  }
3180
3225
  getZindex() {
3181
- return qt.Z_INDEX_OFFSET;
3226
+ return Kt.Z_INDEX_OFFSET;
3182
3227
  }
3183
3228
  setCollapsed(e) {
3184
3229
  if (this.component == null) throw new Error("Failed to set popup collapsed");
@@ -3198,7 +3243,7 @@ class qt extends Ut {
3198
3243
  return this.bodyLoaded;
3199
3244
  }
3200
3245
  }
3201
- class Ji {
3246
+ class ps {
3202
3247
  provider;
3203
3248
  // Data
3204
3249
  popupElements = new Array();
@@ -3213,7 +3258,7 @@ class Ji {
3213
3258
  e.popup && (e.pin.shown = !0, e.tooltip.shown = !0, e.popup.shown = !1);
3214
3259
  }
3215
3260
  updateElements(e) {
3216
- this.popupElements = e, this.popupPositioned = new Map(e.map((n) => [n.id, !1]));
3261
+ this.popupElements = e, this.popupPositioned = new Map(e.map((r) => [r.id, !1]));
3217
3262
  }
3218
3263
  removeElements() {
3219
3264
  this.popupElements.forEach((e) => e.remove()), this.popupElements.length = 0, this.popupPositioned.clear();
@@ -3222,22 +3267,22 @@ class Ji {
3222
3267
  for (const e of this.popupElements)
3223
3268
  if (e.shown) {
3224
3269
  if (e.setCollapsed(!1), e.updateMap(!0), e.isExpanded() && e.isBodyLoaded() == !1 && e.updateBody(), e.isCollapsed() == !1 && this.popupPositioned.get(e.id) == !1) {
3225
- const n = e.component?.getBody();
3226
- if (n == null) continue;
3227
- const r = e.component?.getOffsets();
3270
+ const r = e.component?.getBody();
3228
3271
  if (r == null) continue;
3229
- const i = n.getBoundingClientRect();
3272
+ const n = e.component?.getOffsets();
3273
+ if (n == null) continue;
3274
+ const i = r.getBoundingClientRect();
3230
3275
  if (i.x == 0 && i.y == 0 && i.width == 0 && i.height == 0) continue;
3231
- const s = i.x + i.width / 2, o = i.y + i.height / 2, a = s + r.x, l = o + r.y, u = a + e.width, f = l + e.height, h = this.provider.getContainer().getBoundingClientRect(), p = a - h.left, c = h.right - u, d = l - h.top, k = h.bottom - f, I = Math.min(e.width, e.height) / 4, V = p < 0 ? p - I : c < 0 ? -c + I : 0, w = d < 0 ? d - I : k < 0 ? -k + I : 0;
3232
- this.provider.panBy(V, w), this.popupPositioned.set(e.id, !0);
3276
+ const s = i.x + i.width / 2, o = i.y + i.height / 2, l = s + n.x, a = o + n.y, u = l + e.style.width, f = a + e.style.height, p = this.provider.getContainer().getBoundingClientRect(), h = l - p.left, c = p.right - u, d = a - p.top, w = p.bottom - f, F = Math.min(e.style.width, e.style.height) / 4, K = h < 0 ? h - F : c < 0 ? -c + F : 0, k = d < 0 ? d - F : w < 0 ? -w + F : 0;
3277
+ this.provider.panBy(K, k), this.popupPositioned.set(e.id, !0);
3233
3278
  }
3234
3279
  } else
3235
3280
  e.setCollapsed(!0), e.isCollapsed() && e.updateMap(!1);
3236
3281
  }
3237
3282
  }
3238
- const Qi = () => '<img src="https://arenarium.dev/favicon.svg" alt="Arenarium Maps" style="height: 1.25em; vertical-align: middle;" />', ts = () => `<a href="https://arenarium.dev" target="_blank" style="color: inherit;">${Qi()}<span>&nbsp;@arenarium/maps</span></a>`;
3283
+ const ds = () => '<img src="https://arenarium.dev/favicon.svg" alt="Arenarium Maps" style="height: 1.25em; vertical-align: middle;" />', ys = () => `<a href="https://arenarium.dev" target="_blank" style="color: inherit;">${ds()}<span>&nbsp;@arenarium/maps</span></a>`;
3239
3284
  export {
3240
- er as MapManager,
3241
- ts as getAttributionHtml,
3242
- Qi as getImageHtml
3285
+ dn as MapManager,
3286
+ ys as getAttributionHtml,
3287
+ ds as getImageHtml
3243
3288
  };