@retoo/borda 0.0.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.
@@ -0,0 +1,4620 @@
1
+ (function(e, t) {
2
+ "object" == typeof exports && "undefined" != typeof module ? t(exports) : "function" == typeof define && define.amd ? define(["exports"], t) : t((e = "undefined" != typeof globalThis ? globalThis : e || self).borda = {});
3
+ })(this, function(e) {
4
+ Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), "undefined" != typeof window && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add("5");
5
+ var t = {}, n = Symbol("uninitialized"), r = Array.isArray, o = Array.prototype.indexOf, i = Array.prototype.includes, s = Array.from, l = Object.defineProperty, u = Object.getOwnPropertyDescriptor, c = Object.getOwnPropertyDescriptors, f = Object.prototype, d = Array.prototype, p = Object.getPrototypeOf, h = Object.isExtensible;
6
+ function v(e) {
7
+ return "function" == typeof e;
8
+ }
9
+ var g = () => {};
10
+ function m() {
11
+ var e, t;
12
+ return {
13
+ promise: new Promise((n, r) => {
14
+ e = n, t = r;
15
+ }),
16
+ resolve: e,
17
+ reject: t
18
+ };
19
+ }
20
+ var _ = 1024, b = 2048, y = 4096, T = 8192, w = 32768, E = 1 << 25, S = 65536, O = 1 << 19, C = 1 << 25, N = 65536, k = 1 << 21, A = 1 << 23, P = Symbol("$state"), x = Symbol("legacy props"), D = Symbol(""), L = Symbol("attributes"), R = Symbol("class"), M = Symbol("style"), I = Symbol("text"), B = Symbol("form reset"), $ = new class extends Error {
21
+ name = "StaleReactionError";
22
+ message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
23
+ }(), H = !!globalThis.document?.contentType && globalThis.document.contentType.includes("xml");
24
+ function j(e) {
25
+ throw new Error("https://svelte.dev/e/lifecycle_outside_component");
26
+ }
27
+ function F(e, t, n) {
28
+ throw new Error("https://svelte.dev/e/each_key_duplicate");
29
+ }
30
+ function z(e) {
31
+ console.warn("https://svelte.dev/e/hydration_mismatch");
32
+ }
33
+ var U, V = !1;
34
+ function q(e) {
35
+ V = e;
36
+ }
37
+ function K(e) {
38
+ if (null === e) throw z(), t;
39
+ return U = e;
40
+ }
41
+ function G() {
42
+ return K(bt(U));
43
+ }
44
+ function X(e) {
45
+ if (V) {
46
+ if (null !== bt(U)) throw z(), t;
47
+ U = e;
48
+ }
49
+ }
50
+ function W(e = 1) {
51
+ if (V) {
52
+ for (var t = e, n = U; t--;) n = bt(n);
53
+ U = n;
54
+ }
55
+ }
56
+ function Y(e = !0) {
57
+ for (var t = 0, n = U;;) {
58
+ if (8 === n.nodeType) {
59
+ var r = n.data;
60
+ if ("]" === r) {
61
+ if (0 === t) return n;
62
+ t -= 1;
63
+ } else ("[" === r || "[!" === r || "[" === r[0] && !isNaN(Number(r.slice(1)))) && (t += 1);
64
+ }
65
+ var o = bt(n);
66
+ e && n.remove(), n = o;
67
+ }
68
+ }
69
+ function Z(e) {
70
+ if (!e || 8 !== e.nodeType) throw z(), t;
71
+ return e.data;
72
+ }
73
+ function J(e) {
74
+ return e === this.v;
75
+ }
76
+ function Q(e) {
77
+ return t = e, n = this.v, !(t != t ? n == n : t !== n || null !== t && "object" == typeof t || "function" == typeof t);
78
+ var t, n;
79
+ }
80
+ var ee = !1;
81
+ var te = null;
82
+ function ne(e) {
83
+ te = e;
84
+ }
85
+ function re(e, t = !1, n) {
86
+ te = {
87
+ p: te,
88
+ i: !1,
89
+ c: null,
90
+ e: null,
91
+ s: e,
92
+ x: null,
93
+ r: on,
94
+ l: ee && !t ? {
95
+ s: null,
96
+ u: null,
97
+ $: []
98
+ } : null
99
+ };
100
+ }
101
+ function oe(e) {
102
+ var t = te, n = t.e;
103
+ if (null !== n) for (var r of (t.e = null, n)) Rt(r);
104
+ return void 0 !== e && (t.x = e), t.i = !0, te = t.p, e ?? {};
105
+ }
106
+ function ie() {
107
+ return !ee || null !== te && null === te.l;
108
+ }
109
+ function se(e) {
110
+ return null === te && j(), te.c ??= new Map(function(e) {
111
+ let t = e.p;
112
+ for (; null !== t;) {
113
+ const e = t.c;
114
+ if (null !== e) return e;
115
+ t = t.p;
116
+ }
117
+ return null;
118
+ }(te) || void 0);
119
+ }
120
+ var ae = [];
121
+ function le() {
122
+ var e = ae;
123
+ ae = [], function(e) {
124
+ for (var t = 0; t < e.length; t++) e[t]();
125
+ }(e);
126
+ }
127
+ function ue(e) {
128
+ if (0 === ae.length && !$e) {
129
+ var t = ae;
130
+ queueMicrotask(() => {
131
+ t === ae && le();
132
+ });
133
+ }
134
+ ae.push(e);
135
+ }
136
+ function fe(e) {
137
+ var t = on;
138
+ if (null === t) return tn.f |= A, e;
139
+ if (!(32768 & t.f || 4 & t.f)) throw e;
140
+ de(e, t);
141
+ }
142
+ function de(e, t) {
143
+ if (!(null !== t && 16384 & t.f)) {
144
+ for (; null !== t;) {
145
+ if (128 & t.f) {
146
+ if (!(32768 & t.f)) throw e;
147
+ try {
148
+ t.b.error(e);
149
+ return;
150
+ } catch (t) {
151
+ e = t;
152
+ }
153
+ }
154
+ t = t.parent;
155
+ }
156
+ throw e;
157
+ }
158
+ }
159
+ var pe = -7169;
160
+ function he(e, t) {
161
+ e.f = e.f & pe | t;
162
+ }
163
+ function ve(e) {
164
+ 512 & e.f || null === e.deps ? he(e, _) : he(e, y);
165
+ }
166
+ function ge(e) {
167
+ if (null !== e) for (const t of e) 2 & t.f && 65536 & t.f && (t.f ^= N, ge(t.deps));
168
+ }
169
+ function me(e, t, n) {
170
+ 2048 & e.f ? t.add(e) : 4096 & e.f && n.add(e), ge(e.deps), he(e, _);
171
+ }
172
+ var _e = !1;
173
+ var be = class {
174
+ parent;
175
+ is_pending = !1;
176
+ transform_error;
177
+ #e;
178
+ #t = V ? U : null;
179
+ #n;
180
+ #r;
181
+ #o;
182
+ #i = null;
183
+ #s = null;
184
+ #a = null;
185
+ #l = null;
186
+ #u = 0;
187
+ #c = 0;
188
+ #f = !1;
189
+ #d = /* @__PURE__ */ new Set();
190
+ #p = /* @__PURE__ */ new Set();
191
+ #h = null;
192
+ #v = function(e) {
193
+ let t, n = 0, r = tt(0);
194
+ return () => {
195
+ xt() && (En(r), It(() => (0 === n && (t = Cn(() => e(() => at(r)))), n += 1, () => {
196
+ ue(() => {
197
+ n -= 1, 0 === n && (t?.(), t = void 0, at(r));
198
+ });
199
+ })));
200
+ };
201
+ }(() => (this.#h = tt(this.#u), () => {
202
+ this.#h = null;
203
+ }));
204
+ constructor(e, t, n, r) {
205
+ this.#e = e, this.#n = t, this.#r = (e) => {
206
+ var t = on;
207
+ t.b = this, t.f |= 128, n(e);
208
+ }, this.parent = on.b, this.transform_error = r ?? this.parent?.transform_error ?? ((e) => e), this.#o = $t(() => {
209
+ if (V) {
210
+ const e = this.#t;
211
+ G();
212
+ const t = "[!" === e.data;
213
+ if (e.data.startsWith("[?")) {
214
+ const t = JSON.parse(e.data.slice(2));
215
+ this.#g(t);
216
+ } else t ? this.#m() : this.#_();
217
+ } else this.#b();
218
+ }, 589824), V && (this.#e = U);
219
+ }
220
+ #_() {
221
+ try {
222
+ this.#i = jt(() => this.#r(this.#e));
223
+ } catch (e) {
224
+ this.error(e);
225
+ }
226
+ }
227
+ #g(e) {
228
+ const t = this.#n.failed;
229
+ t && (this.#a = jt(() => {
230
+ t(this.#e, () => e, () => () => {});
231
+ }));
232
+ }
233
+ #m() {
234
+ const e = this.#n.pending;
235
+ e && (this.is_pending = !0, this.#s = jt(() => e(this.#e)), ue(() => {
236
+ var e = this.#l = document.createDocumentFragment(), t = mt();
237
+ e.append(t), this.#i = this.#y(() => jt(() => this.#r(t))), 0 === this.#c && (this.#e.before(e), this.#l = null, Kt(this.#s, () => {
238
+ this.#s = null;
239
+ }), this.#T(Re));
240
+ }));
241
+ }
242
+ #b() {
243
+ try {
244
+ if (this.is_pending = this.has_pending_snippet(), this.#c = 0, this.#u = 0, this.#i = jt(() => {
245
+ this.#r(this.#e);
246
+ }), this.#c > 0) {
247
+ var e = this.#l = document.createDocumentFragment();
248
+ Yt(this.#i, e);
249
+ const t = this.#n.pending;
250
+ this.#s = jt(() => t(this.#e));
251
+ } else this.#T(Re);
252
+ } catch (e) {
253
+ this.error(e);
254
+ }
255
+ }
256
+ #T(e) {
257
+ this.is_pending = !1, e.transfer_effects(this.#d, this.#p);
258
+ }
259
+ defer_effect(e) {
260
+ me(e, this.#d, this.#p);
261
+ }
262
+ is_rendered() {
263
+ return !this.is_pending && (!this.parent || this.parent.is_rendered());
264
+ }
265
+ has_pending_snippet() {
266
+ return !!this.#n.pending;
267
+ }
268
+ #y(e) {
269
+ var t = on, n = tn, r = te;
270
+ sn(this.#o), rn(this.#o), ne(this.#o.ctx);
271
+ try {
272
+ return Ve.ensure(), e();
273
+ } catch (e) {
274
+ return fe(e), null;
275
+ } finally {
276
+ sn(t), rn(n), ne(r);
277
+ }
278
+ }
279
+ #w(e, t) {
280
+ this.has_pending_snippet() ? (this.#c += e, 0 === this.#c && (this.#T(t), this.#s && Kt(this.#s, () => {
281
+ this.#s = null;
282
+ }), this.#l && (this.#e.before(this.#l), this.#l = null))) : this.parent && this.parent.#w(e, t);
283
+ }
284
+ update_pending_count(e, t) {
285
+ this.#w(e, t), this.#u += e, this.#h && !this.#f && (this.#f = !0, ue(() => {
286
+ this.#f = !1, this.#h && it(this.#h, this.#u);
287
+ }));
288
+ }
289
+ get_effect_pending() {
290
+ return this.#v(), En(this.#h);
291
+ }
292
+ error(e) {
293
+ if (!this.#n.onerror && !this.#n.failed) throw e;
294
+ Re?.is_fork ? (this.#i && Re.skip_effect(this.#i), this.#s && Re.skip_effect(this.#s), this.#a && Re.skip_effect(this.#a), Re.oncommit(() => {
295
+ this.#E(e);
296
+ })) : this.#E(e);
297
+ }
298
+ #E(e) {
299
+ this.#i && (Ut(this.#i), this.#i = null), this.#s && (Ut(this.#s), this.#s = null), this.#a && (Ut(this.#a), this.#a = null), V && (K(this.#t), W(), K(Y()));
300
+ var t = this.#n.onerror;
301
+ let n = this.#n.failed;
302
+ var r = !1, o = !1;
303
+ const i = () => {
304
+ r ? console.warn("https://svelte.dev/e/svelte_boundary_reset_noop") : (r = !0, o && function() {
305
+ throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
306
+ }(), null !== this.#a && Kt(this.#a, () => {
307
+ this.#a = null;
308
+ }), this.#y(() => {
309
+ this.#b();
310
+ }));
311
+ }, s = (e) => {
312
+ try {
313
+ o = !0, t?.(e, i), o = !1;
314
+ } catch (e) {
315
+ de(e, this.#o && this.#o.parent);
316
+ }
317
+ n && (this.#a = this.#y(() => {
318
+ try {
319
+ return jt(() => {
320
+ var t = on;
321
+ t.b = this, t.f |= 128, n(this.#e, () => e, () => i);
322
+ });
323
+ } catch (e) {
324
+ return de(e, this.#o.parent), null;
325
+ }
326
+ }));
327
+ };
328
+ ue(() => {
329
+ var t;
330
+ try {
331
+ t = this.transform_error(e);
332
+ } catch (e) {
333
+ de(e, this.#o && this.#o.parent);
334
+ return;
335
+ }
336
+ null !== t && "object" == typeof t && "function" == typeof t.then ? t.then(s, (e) => de(e, this.#o && this.#o.parent)) : s(t);
337
+ });
338
+ }
339
+ };
340
+ function ye(e, t, n, r) {
341
+ const o = ie() ? Ee : Ne;
342
+ var i = e.filter((e) => !e.settled), s = t.map(o);
343
+ if (0 !== n.length || 0 !== i.length) {
344
+ var a = on, l = function() {
345
+ var e = on, t = tn, n = te, r = Re;
346
+ return function(o = !0) {
347
+ sn(e), rn(t), ne(n), !o || 16384 & e.f || (r?.activate(), r?.apply());
348
+ };
349
+ }(), u = 1 === i.length ? i[0].promise : i.length > 1 ? Promise.all(i.map((e) => e.promise)) : null, c = we();
350
+ 0 !== n.length ? u ? u.then(() => {
351
+ l(), d(), Te();
352
+ }) : d() : u.then(() => f([])).finally(c);
353
+ } else r(s);
354
+ function f(e) {
355
+ if (!(16384 & a.f)) {
356
+ l();
357
+ try {
358
+ r([...s, ...e]);
359
+ } catch (e) {
360
+ de(e, a);
361
+ }
362
+ Te();
363
+ }
364
+ }
365
+ function d() {
366
+ Promise.all(n.map((e) => Oe(e))).then(f).catch((e) => de(e, a)).finally(c);
367
+ }
368
+ }
369
+ function Te(e = !0) {
370
+ sn(null), rn(null), ne(null), e && Re?.deactivate();
371
+ }
372
+ function we() {
373
+ var e = on, t = e.b, n = Re, r = !!t?.is_rendered();
374
+ return t?.update_pending_count(1, n), n.increment(r, e), () => {
375
+ t?.update_pending_count(-1, n), n.decrement(r, e);
376
+ };
377
+ }
378
+ function Ee(e) {
379
+ null !== on && (on.f |= O);
380
+ return {
381
+ ctx: te,
382
+ deps: null,
383
+ effects: null,
384
+ equals: J,
385
+ f: 2050,
386
+ fn: e,
387
+ reactions: null,
388
+ rv: 0,
389
+ v: n,
390
+ wv: 0,
391
+ parent: on,
392
+ ac: null
393
+ };
394
+ }
395
+ var Se = Symbol("obsolete");
396
+ function Oe(e, t, r) {
397
+ let o = on;
398
+ null === o && function() {
399
+ throw new Error("https://svelte.dev/e/async_derived_orphan");
400
+ }();
401
+ var i = void 0, s = tt(n);
402
+ var a = !tn, l = /* @__PURE__ */ new Set();
403
+ return function(e) {
404
+ Pt(4718592, e);
405
+ }(() => {
406
+ var t = on;
407
+ var n = m();
408
+ i = n.promise;
409
+ try {
410
+ Promise.resolve(e()).then(n.resolve, (e) => {
411
+ e !== $ && n.reject(e);
412
+ }).finally(Te);
413
+ } catch (e) {
414
+ n.reject(e), Te();
415
+ }
416
+ var r = Re;
417
+ if (a) {
418
+ if (32768 & t.f) var u = we();
419
+ if (o.b?.is_rendered()) r.async_deriveds.get(t)?.reject(Se);
420
+ else for (const e of l.values()) e.reject(Se);
421
+ l.add(n), r.async_deriveds.set(t, n);
422
+ }
423
+ const c = (e, t = void 0) => {
424
+ u?.(), l.delete(n), t !== Se && (r.activate(), t ? (s.f |= A, it(s, t)) : (8388608 & s.f && (s.f ^= A), it(s, e)), r.deactivate());
425
+ };
426
+ n.promise.then(c, (e) => c(null, e || "unknown"));
427
+ }), Dt(() => {
428
+ for (const e of l) e.reject(Se);
429
+ }), new Promise((e) => {
430
+ (function t(n) {
431
+ function r() {
432
+ n === i ? e(s) : t(i);
433
+ }
434
+ n.then(r, r);
435
+ })(i);
436
+ });
437
+ }
438
+ function Ce(e) {
439
+ const t = Ee(e);
440
+ return ln(t), t;
441
+ }
442
+ function Ne(e) {
443
+ const t = Ee(e);
444
+ return t.equals = Q, t;
445
+ }
446
+ function ke(e) {
447
+ var t = e.effects;
448
+ if (null !== t) {
449
+ e.effects = null;
450
+ for (var n = 0; n < t.length; n += 1) Ut(t[n]);
451
+ }
452
+ }
453
+ function Ae(e) {
454
+ var t, r = on, o = e.parent;
455
+ if (!Qt && null !== o && e.v !== n && 24576 & o.f) return console.warn("https://svelte.dev/e/derived_inert"), e.v;
456
+ sn(o);
457
+ try {
458
+ e.f &= -65537, ke(e), t = bn(e);
459
+ } finally {
460
+ sn(r);
461
+ }
462
+ return t;
463
+ }
464
+ function Pe(e) {
465
+ var t = Ae(e);
466
+ e.equals(t) || (e.wv = gn(), Re?.is_fork && null !== e.deps || (null !== Re ? (Re.capture(e, t, !0), Me?.capture(e, t, !0)) : e.v = t, null !== e.deps)) ? Qt || (null !== Ie ? (xt() || Re?.is_fork) && Ie.set(e, t) : ve(e)) : he(e, _);
467
+ }
468
+ function xe(e) {
469
+ if (null !== e.effects) for (const t of e.effects) t.teardown && null !== t.fn && wn(t);
470
+ }
471
+ var De = null, Le = null, Re = null, Me = null, Ie = null, Be = null, $e = !1, He = !1, je = null, Fe = null, ze = 0, Ue = 1, Ve = class e {
472
+ id = Ue++;
473
+ #S = !1;
474
+ linked = !0;
475
+ #O = null;
476
+ #C = null;
477
+ async_deriveds = /* @__PURE__ */ new Map();
478
+ current = /* @__PURE__ */ new Map();
479
+ previous = /* @__PURE__ */ new Map();
480
+ #N = /* @__PURE__ */ new Set();
481
+ #k = /* @__PURE__ */ new Set();
482
+ #A = 0;
483
+ #P = /* @__PURE__ */ new Map();
484
+ #x = null;
485
+ #D = [];
486
+ #L = [];
487
+ #d = /* @__PURE__ */ new Set();
488
+ #p = /* @__PURE__ */ new Set();
489
+ #R = /* @__PURE__ */ new Map();
490
+ #M = /* @__PURE__ */ new Set();
491
+ is_fork = !1;
492
+ #I = !1;
493
+ constructor() {
494
+ null === Le ? De = Le = this : (Le.#C = this, this.#O = Le), Le = this;
495
+ }
496
+ #B() {
497
+ if (this.is_fork) return !0;
498
+ for (const n of this.#P.keys()) {
499
+ for (var e = n, t = !1; null !== e.parent;) {
500
+ if (this.#R.has(e)) {
501
+ t = !0;
502
+ break;
503
+ }
504
+ e = e.parent;
505
+ }
506
+ if (!t) return !0;
507
+ }
508
+ return !1;
509
+ }
510
+ skip_effect(e) {
511
+ this.#R.has(e) || this.#R.set(e, {
512
+ d: [],
513
+ m: []
514
+ }), this.#M.delete(e);
515
+ }
516
+ unskip_effect(e, t = (e) => this.schedule(e)) {
517
+ var n = this.#R.get(e);
518
+ if (n) {
519
+ for (var r of (this.#R.delete(e), n.d)) he(r, b), t(r);
520
+ for (r of n.m) he(r, y), t(r);
521
+ }
522
+ this.#M.add(e);
523
+ }
524
+ #$() {
525
+ this.#S = !0, ze++ > 1e3 && (this.#H(), function() {
526
+ try {
527
+ (function() {
528
+ throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
529
+ })();
530
+ } catch (e) {
531
+ de(e, Be);
532
+ }
533
+ }());
534
+ for (const e of this.#d) this.#p.delete(e), he(e, b), this.schedule(e);
535
+ for (const e of this.#p) he(e, y), this.schedule(e);
536
+ const t = this.#D;
537
+ this.#D = [], this.apply();
538
+ var n = je = [], r = [], o = Fe = [];
539
+ for (const e of t) try {
540
+ this.#j(e, n, r);
541
+ } catch (t) {
542
+ throw Ze(e), this.#B() || this.discard(), t;
543
+ }
544
+ if (Re = null, o.length > 0) {
545
+ var i = e.ensure();
546
+ for (const e of o) i.schedule(e);
547
+ }
548
+ if (je = null, Fe = null, this.#B()) {
549
+ this.#F(r), this.#F(n);
550
+ for (const [e, t] of this.#R) Ye(e, t);
551
+ o.length > 0 && Re.#$();
552
+ return;
553
+ }
554
+ const s = this.#z();
555
+ if (s) return this.#F(r), this.#F(n), void s.#U(this);
556
+ this.#d.clear(), this.#p.clear();
557
+ for (const e of this.#N) e(this);
558
+ this.#N.clear(), Me = this, Ke(r), Ke(n), Me = null, this.#x?.resolve();
559
+ var a = Re;
560
+ if (0 !== this.#A || 0 !== this.#D.length && null === a || this.#H(), this.#D.length > 0) if (null !== a) {
561
+ const e = a;
562
+ e.#D.push(...this.#D.filter((t) => !e.#D.includes(t)));
563
+ } else a = this;
564
+ null !== a && a.#$();
565
+ }
566
+ #j(e, t, n) {
567
+ e.f ^= _;
568
+ for (var r = e.first; null !== r;) {
569
+ var o = r.f, i = !!(96 & o);
570
+ if (!(i && 1024 & o || 8192 & o || this.#R.has(r)) && null !== r.fn) {
571
+ i ? r.f ^= _ : 4 & o ? t.push(r) : mn(r) && (16 & o && this.#p.add(r), wn(r));
572
+ var s = r.first;
573
+ if (null !== s) {
574
+ r = s;
575
+ continue;
576
+ }
577
+ }
578
+ for (; null !== r;) {
579
+ var a = r.next;
580
+ if (null !== a) {
581
+ r = a;
582
+ break;
583
+ }
584
+ r = r.parent;
585
+ }
586
+ }
587
+ }
588
+ #z() {
589
+ for (var e = this.#O; null !== e;) {
590
+ if (!e.is_fork) {
591
+ for (const [t, [, n]] of this.current) if (e.current.has(t) && !n) return e;
592
+ }
593
+ e = e.#O;
594
+ }
595
+ return null;
596
+ }
597
+ #U(e) {
598
+ for (const [t, n] of e.current) !this.previous.has(t) && e.previous.has(t) && this.previous.set(t, e.previous.get(t)), this.current.set(t, n);
599
+ for (const [t, n] of e.async_deriveds) {
600
+ const e = this.async_deriveds.get(t);
601
+ e && n.promise.then(e.resolve).catch(e.reject);
602
+ }
603
+ e.async_deriveds.clear(), this.transfer_effects(e.#d, e.#p);
604
+ const t = (e) => {
605
+ var n = e.reactions;
606
+ if (null !== n) for (const e of n) {
607
+ var r = e.f;
608
+ if (2 & r) t(e);
609
+ else {
610
+ var o = e;
611
+ 4194320 & r && !this.async_deriveds.has(o) && (this.#p.delete(o), he(o, b), this.schedule(o));
612
+ }
613
+ }
614
+ };
615
+ for (const e of this.current.keys()) t(e);
616
+ this.oncommit(() => e.discard()), e.#H(), Re = this, this.#$();
617
+ }
618
+ #F(e) {
619
+ for (var t = 0; t < e.length; t += 1) me(e[t], this.#d, this.#p);
620
+ }
621
+ capture(e, t, r = !1) {
622
+ e.v === n || this.previous.has(e) || this.previous.set(e, e.v), 8388608 & e.f || (this.current.set(e, [t, r]), Ie?.set(e, t)), this.is_fork || (e.v = t);
623
+ }
624
+ activate() {
625
+ Re = this;
626
+ }
627
+ deactivate() {
628
+ Re = null, Ie = null;
629
+ }
630
+ flush() {
631
+ try {
632
+ He = !0, Re = this, this.#$();
633
+ } finally {
634
+ ze = 0, Be = null, je = null, Fe = null, He = !1, Re = null, Ie = null, Qe.clear();
635
+ }
636
+ }
637
+ discard() {
638
+ for (const e of this.#k) e(this);
639
+ this.#k.clear();
640
+ for (const e of this.async_deriveds.values()) e.reject(Se);
641
+ this.#H(), this.#x?.resolve();
642
+ }
643
+ register_created_effect(e) {
644
+ this.#L.push(e);
645
+ }
646
+ #V() {
647
+ for (let c = De; null !== c; c = c.#C) {
648
+ var e = c.id < this.id, t = [];
649
+ for (const [r, [o, i]] of this.current) {
650
+ if (c.current.has(r)) {
651
+ var n = c.current.get(r)[0];
652
+ if (!e || o === n) continue;
653
+ c.current.set(r, [o, i]);
654
+ }
655
+ t.push(r);
656
+ }
657
+ if (e) for (const [e, t] of this.async_deriveds) {
658
+ const n = c.async_deriveds.get(e);
659
+ n && t.promise.then(n.resolve).catch(n.reject);
660
+ }
661
+ var r = [...c.current.keys()].filter((e) => !c.current.get(e)[1]);
662
+ if (c.#S && 0 !== r.length) {
663
+ var o = r.filter((e) => !this.current.has(e));
664
+ if (0 === o.length) e && c.discard();
665
+ else if (t.length > 0) {
666
+ if (e) for (const e of this.#M) c.unskip_effect(e, (e) => {
667
+ 4194320 & e.f ? c.schedule(e) : c.#F([e]);
668
+ });
669
+ c.activate();
670
+ var i = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Map();
671
+ for (var a of t) Ge(a, o, i, s);
672
+ s = /* @__PURE__ */ new Map();
673
+ var l = [...c.current].filter(([e, t]) => {
674
+ const n = this.current.get(e);
675
+ return !n || n[0] !== t[0] || n[1] !== t[1];
676
+ }).map(([e]) => e);
677
+ if (l.length > 0) for (const e of this.#L) 155648 & e.f || !Xe(e, l, s) || (4194320 & e.f ? (he(e, b), c.schedule(e)) : c.#d.add(e));
678
+ if (c.#D.length > 0 && !c.#I) {
679
+ for (var u of (c.apply(), c.#D)) c.#j(u, [], []);
680
+ c.#D = [];
681
+ }
682
+ c.deactivate();
683
+ }
684
+ }
685
+ }
686
+ }
687
+ increment(e, t) {
688
+ if (this.#A += 1, e) {
689
+ let e = this.#P.get(t) ?? 0;
690
+ this.#P.set(t, e + 1);
691
+ }
692
+ }
693
+ decrement(e, t) {
694
+ if (this.#A -= 1, e) {
695
+ let e = this.#P.get(t) ?? 0;
696
+ 1 === e ? this.#P.delete(t) : this.#P.set(t, e - 1);
697
+ }
698
+ this.#I || (this.#I = !0, ue(() => {
699
+ this.#I = !1, this.linked && this.flush();
700
+ }));
701
+ }
702
+ transfer_effects(e, t) {
703
+ for (const t of e) this.#d.add(t);
704
+ for (const e of t) this.#p.add(e);
705
+ e.clear(), t.clear();
706
+ }
707
+ oncommit(e) {
708
+ this.#N.add(e);
709
+ }
710
+ ondiscard(e) {
711
+ this.#k.add(e);
712
+ }
713
+ settled() {
714
+ return (this.#x ??= m()).promise;
715
+ }
716
+ static ensure() {
717
+ if (null === Re) {
718
+ const t = Re = new e();
719
+ He || $e || ue(() => {
720
+ t.#S || t.flush();
721
+ });
722
+ }
723
+ return Re;
724
+ }
725
+ apply() {
726
+ Ie = null;
727
+ }
728
+ schedule(e) {
729
+ if (Be = e, !(e.b?.is_pending && 16777228 & e.f) || 32768 & e.f) {
730
+ for (var t = e; null !== t.parent;) {
731
+ var n = (t = t.parent).f;
732
+ if (!(null === je || t !== on || null !== tn && 2 & tn.f)) return;
733
+ if (96 & n) {
734
+ if (!(1024 & n)) return;
735
+ t.f ^= _;
736
+ }
737
+ }
738
+ this.#D.push(t);
739
+ } else e.b.defer_effect(e);
740
+ }
741
+ #H() {
742
+ if (this.linked) {
743
+ var e = this.#O, t = this.#C;
744
+ null === e ? De = t : e.#C = t, null === t ? Le = e : t.#O = e, this.linked = !1;
745
+ }
746
+ }
747
+ };
748
+ var qe = null;
749
+ function Ke(e) {
750
+ var t = e.length;
751
+ if (0 !== t) {
752
+ for (var n = 0; n < t;) {
753
+ var r = e[n++];
754
+ if (!(24576 & r.f) && mn(r) && (qe = /* @__PURE__ */ new Set(), wn(r), null === r.deps && null === r.first && null === r.nodes && null === r.teardown && null === r.ac && qt(r), qe?.size > 0)) {
755
+ Qe.clear();
756
+ for (const e of qe) {
757
+ if (24576 & e.f) continue;
758
+ const t = [e];
759
+ let n = e.parent;
760
+ for (; null !== n;) qe.has(n) && (qe.delete(n), t.push(n)), n = n.parent;
761
+ for (let e = t.length - 1; e >= 0; e--) {
762
+ const n = t[e];
763
+ 24576 & n.f || wn(n);
764
+ }
765
+ }
766
+ qe.clear();
767
+ }
768
+ }
769
+ qe = null;
770
+ }
771
+ }
772
+ function Ge(e, t, n, r) {
773
+ if (!n.has(e) && (n.add(e), null !== e.reactions)) for (const o of e.reactions) {
774
+ const e = o.f;
775
+ 2 & e ? Ge(o, t, n, r) : 4194320 & e && !(2048 & e) && Xe(o, t, r) && (he(o, b), We(o));
776
+ }
777
+ }
778
+ function Xe(e, t, n) {
779
+ const r = n.get(e);
780
+ if (void 0 !== r) return r;
781
+ if (null !== e.deps) for (const r of e.deps) {
782
+ if (i.call(t, r)) return !0;
783
+ if (2 & r.f && Xe(r, t, n)) return n.set(r, !0), !0;
784
+ }
785
+ return n.set(e, !1), !1;
786
+ }
787
+ function We(e) {
788
+ Re.schedule(e);
789
+ }
790
+ function Ye(e, t) {
791
+ if (!(32 & e.f && 1024 & e.f)) {
792
+ 2048 & e.f ? t.d.push(e) : 4096 & e.f && t.m.push(e), he(e, _);
793
+ for (var n = e.first; null !== n;) Ye(n, t), n = n.next;
794
+ }
795
+ }
796
+ function Ze(e) {
797
+ he(e, _);
798
+ for (var t = e.first; null !== t;) Ze(t), t = t.next;
799
+ }
800
+ var Je = /* @__PURE__ */ new Set(), Qe = /* @__PURE__ */ new Map();
801
+ var et = !1;
802
+ function tt(e, t) {
803
+ return {
804
+ f: 0,
805
+ v: e,
806
+ reactions: null,
807
+ equals: J,
808
+ rv: 0,
809
+ wv: 0
810
+ };
811
+ }
812
+ function nt(e, t) {
813
+ const n = tt(e);
814
+ return ln(n), n;
815
+ }
816
+ function rt(e, t = !1, n = !0) {
817
+ const r = tt(e);
818
+ return t || (r.equals = Q), ee && n && null !== te && null !== te.l && (te.l.s ??= []).push(r), r;
819
+ }
820
+ function ot(e, t, n = !1) {
821
+ null !== tn && (!nn || 131072 & tn.f) && ie() && 4325394 & tn.f && (null === an || !an.has(e)) && function() {
822
+ throw new Error("https://svelte.dev/e/state_unsafe_mutation");
823
+ }();
824
+ return it(e, n ? ut(t) : t, Fe);
825
+ }
826
+ function it(e, t, n = null) {
827
+ if (!e.equals(t)) {
828
+ Qe.set(e, Qt ? t : e.v);
829
+ var r = Ve.ensure();
830
+ if (r.capture(e, t), 2 & e.f) {
831
+ const t = e;
832
+ 2048 & e.f && Ae(t), null === Ie && ve(t);
833
+ }
834
+ e.wv = gn(), lt(e, b, n), ie() && null !== on && 1024 & on.f && !(96 & on.f) && (null === fn ? function(e) {
835
+ fn = e;
836
+ }([e]) : fn.push(e)), !r.is_fork && Je.size > 0 && !et && st();
837
+ }
838
+ return t;
839
+ }
840
+ function st() {
841
+ et = !1;
842
+ for (const e of Je) {
843
+ let t;
844
+ 1024 & e.f && he(e, y);
845
+ try {
846
+ t = mn(e);
847
+ } catch {
848
+ t = !0;
849
+ }
850
+ t && wn(e);
851
+ }
852
+ Je.clear();
853
+ }
854
+ function at(e) {
855
+ ot(e, e.v + 1);
856
+ }
857
+ function lt(e, t, n) {
858
+ var r = e.reactions;
859
+ if (null !== r) for (var o = ie(), i = r.length, s = 0; s < i; s++) {
860
+ var a = r[s], l = a.f;
861
+ if (o || a !== on) {
862
+ var u = 0 === (l & b);
863
+ if (u && he(a, t), 131072 & l) Je.add(a);
864
+ else if (2 & l) {
865
+ var c = a;
866
+ Ie?.delete(c), 65536 & l || (!(512 & l) || null !== on && 2097152 & on.f || (a.f |= N), lt(c, y, n));
867
+ } else if (u) {
868
+ var f = a;
869
+ 16 & l && null !== qe && qe.add(f), null !== n ? n.push(f) : We(f);
870
+ }
871
+ }
872
+ }
873
+ }
874
+ function ut(e) {
875
+ if ("object" != typeof e || null === e || P in e) return e;
876
+ const t = p(e);
877
+ if (t !== f && t !== d) return e;
878
+ var o = /* @__PURE__ */ new Map(), i = r(e), s = nt(0), a = hn, l = (e) => {
879
+ if (hn === a) return e();
880
+ var t = tn, n = hn;
881
+ rn(null), vn(a);
882
+ var r = e();
883
+ return rn(t), vn(n), r;
884
+ };
885
+ i && o.set("length", nt(e.length));
886
+ return new Proxy(e, {
887
+ defineProperty(e, t, n) {
888
+ "value" in n && !1 !== n.configurable && !1 !== n.enumerable && !1 !== n.writable || function() {
889
+ throw new Error("https://svelte.dev/e/state_descriptors_fixed");
890
+ }();
891
+ var r = o.get(t);
892
+ return void 0 === r ? l(() => {
893
+ var e = nt(n.value);
894
+ return o.set(t, e), e;
895
+ }) : ot(r, n.value, !0), !0;
896
+ },
897
+ deleteProperty(e, t) {
898
+ var r = o.get(t);
899
+ if (void 0 === r) {
900
+ if (t in e) {
901
+ const e = l(() => nt(n));
902
+ o.set(t, e), at(s);
903
+ }
904
+ } else ot(r, n), at(s);
905
+ return !0;
906
+ },
907
+ get(t, r, i) {
908
+ if (r === P) return e;
909
+ var s = o.get(r), a = r in t;
910
+ if (void 0 !== s || a && !u(t, r)?.writable || (s = l(() => {
911
+ return nt(ut(a ? t[r] : n));
912
+ }), o.set(r, s)), void 0 !== s) {
913
+ var c = En(s);
914
+ return c === n ? void 0 : c;
915
+ }
916
+ return Reflect.get(t, r, i);
917
+ },
918
+ getOwnPropertyDescriptor(e, t) {
919
+ var r = Reflect.getOwnPropertyDescriptor(e, t);
920
+ if (r && "value" in r) {
921
+ var i = o.get(t);
922
+ i && (r.value = En(i));
923
+ } else if (void 0 === r) {
924
+ var s = o.get(t), a = s?.v;
925
+ if (void 0 !== s && a !== n) return {
926
+ enumerable: !0,
927
+ configurable: !0,
928
+ value: a,
929
+ writable: !0
930
+ };
931
+ }
932
+ return r;
933
+ },
934
+ has(e, t) {
935
+ if (t === P) return !0;
936
+ var r = o.get(t), i = void 0 !== r && r.v !== n || Reflect.has(e, t);
937
+ return !((void 0 !== r || null !== on && (!i || u(e, t)?.writable)) && (void 0 === r && (r = l(() => {
938
+ return nt(i ? ut(e[t]) : n);
939
+ }), o.set(t, r)), En(r) === n)) && i;
940
+ },
941
+ set(e, t, r, a) {
942
+ var c = o.get(t), f = t in e;
943
+ if (i && "length" === t) for (var d = r; d < c.v; d += 1) {
944
+ var p = o.get(d + "");
945
+ void 0 !== p ? ot(p, n) : d in e && (p = l(() => nt(n)), o.set(d + "", p));
946
+ }
947
+ void 0 === c ? f && !u(e, t)?.writable || (ot(c = l(() => nt(void 0)), ut(r)), o.set(t, c)) : (f = c.v !== n, ot(c, l(() => ut(r))));
948
+ var h = Reflect.getOwnPropertyDescriptor(e, t);
949
+ if (h?.set && h.set.call(a, r), !f) {
950
+ if (i && "string" == typeof t) {
951
+ var v = o.get("length"), g = Number(t);
952
+ Number.isInteger(g) && g >= v.v && ot(v, g + 1);
953
+ }
954
+ at(s);
955
+ }
956
+ return !0;
957
+ },
958
+ ownKeys(e) {
959
+ En(s);
960
+ var t = Reflect.ownKeys(e).filter((e) => {
961
+ var t = o.get(e);
962
+ return void 0 === t || t.v !== n;
963
+ });
964
+ for (var [r, i] of o) i.v === n || r in e || t.push(r);
965
+ return t;
966
+ },
967
+ setPrototypeOf() {
968
+ (function() {
969
+ throw new Error("https://svelte.dev/e/state_prototype_fixed");
970
+ })();
971
+ }
972
+ });
973
+ }
974
+ function ct(e) {
975
+ try {
976
+ if (null !== e && "object" == typeof e && P in e) return e[P];
977
+ } catch {}
978
+ return e;
979
+ }
980
+ function ft(e, t) {
981
+ return Object.is(ct(e), ct(t));
982
+ }
983
+ var dt, pt, ht, vt;
984
+ new Set([
985
+ "copyWithin",
986
+ "fill",
987
+ "pop",
988
+ "push",
989
+ "reverse",
990
+ "shift",
991
+ "sort",
992
+ "splice",
993
+ "unshift"
994
+ ]);
995
+ function gt() {
996
+ if (void 0 === dt) {
997
+ dt = window, pt = /Firefox/.test(navigator.userAgent);
998
+ var e = Element.prototype, t = Node.prototype, n = Text.prototype;
999
+ ht = u(t, "firstChild").get, vt = u(t, "nextSibling").get, h(e) && (e[R] = void 0, e[L] = null, e[M] = void 0, e.__e = void 0), h(n) && (n[I] = void 0);
1000
+ }
1001
+ }
1002
+ function mt(e = "") {
1003
+ return document.createTextNode(e);
1004
+ }
1005
+ function _t(e) {
1006
+ return ht.call(e);
1007
+ }
1008
+ function bt(e) {
1009
+ return vt.call(e);
1010
+ }
1011
+ function yt(e, t) {
1012
+ if (!V) return _t(e);
1013
+ var n = _t(U);
1014
+ if (null === n) n = U.appendChild(mt());
1015
+ else if (t && 3 !== n.nodeType) {
1016
+ var r = mt();
1017
+ return n?.before(r), K(r), r;
1018
+ }
1019
+ return t && Ot(n), K(n), n;
1020
+ }
1021
+ function Tt(e, t = !1) {
1022
+ if (!V) {
1023
+ var n = _t(e);
1024
+ return n instanceof Comment && "" === n.data ? bt(n) : n;
1025
+ }
1026
+ if (t) {
1027
+ if (3 !== U?.nodeType) {
1028
+ var r = mt();
1029
+ return U?.before(r), K(r), r;
1030
+ }
1031
+ Ot(U);
1032
+ }
1033
+ return U;
1034
+ }
1035
+ function wt(e, t = 1, n = !1) {
1036
+ let r = V ? U : e;
1037
+ for (var o; t--;) o = r, r = bt(r);
1038
+ if (!V) return r;
1039
+ if (n) {
1040
+ if (3 !== r?.nodeType) {
1041
+ var i = mt();
1042
+ return null === r ? o?.after(i) : r.before(i), K(i), i;
1043
+ }
1044
+ Ot(r);
1045
+ }
1046
+ return K(r), r;
1047
+ }
1048
+ function Et(e) {
1049
+ e.textContent = "";
1050
+ }
1051
+ function St(e, t, n) {
1052
+ return null == t || "http://www.w3.org/1999/xhtml" === t ? n ? document.createElement(e, { is: n }) : document.createElement(e) : n ? document.createElementNS(t, e, { is: n }) : document.createElementNS(t, e);
1053
+ }
1054
+ function Ot(e) {
1055
+ if (e.nodeValue.length < 65536) return;
1056
+ let t = e.nextSibling;
1057
+ for (; null !== t && 3 === t.nodeType;) t.remove(), e.nodeValue += t.nodeValue, t = e.nextSibling;
1058
+ }
1059
+ function Ct(e, t) {
1060
+ if (t) {
1061
+ const t = document.body;
1062
+ e.autofocus = !0, ue(() => {
1063
+ document.activeElement === t && e.focus();
1064
+ });
1065
+ }
1066
+ }
1067
+ var Nt = !1;
1068
+ function kt(e) {
1069
+ var t = tn, n = on;
1070
+ rn(null), sn(null);
1071
+ try {
1072
+ return e();
1073
+ } finally {
1074
+ rn(t), sn(n);
1075
+ }
1076
+ }
1077
+ function At(e) {
1078
+ null === on && (null === tn && function() {
1079
+ throw new Error("https://svelte.dev/e/effect_orphan");
1080
+ }(), function() {
1081
+ throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
1082
+ }()), Qt && function() {
1083
+ throw new Error("https://svelte.dev/e/effect_in_teardown");
1084
+ }();
1085
+ }
1086
+ function Pt(e, t) {
1087
+ var n = on;
1088
+ null !== n && 8192 & n.f && (e |= T);
1089
+ var r = {
1090
+ ctx: te,
1091
+ deps: null,
1092
+ nodes: null,
1093
+ f: e | b | 512,
1094
+ first: null,
1095
+ fn: t,
1096
+ last: null,
1097
+ next: null,
1098
+ parent: n,
1099
+ b: n && n.b,
1100
+ prev: null,
1101
+ teardown: null,
1102
+ wv: 0,
1103
+ ac: null
1104
+ };
1105
+ Re?.register_created_effect(r);
1106
+ var o = r;
1107
+ if (4 & e) null !== je ? je.push(r) : Ve.ensure().schedule(r);
1108
+ else if (null !== t) {
1109
+ try {
1110
+ wn(r);
1111
+ } catch (o) {
1112
+ throw Ut(r), o;
1113
+ }
1114
+ null !== o.deps || null !== o.teardown || null !== o.nodes || o.first !== o.last || 524288 & o.f || (o = o.first, 16 & e && 65536 & e && null !== o && (o.f |= S));
1115
+ }
1116
+ if (null !== o && (o.parent = n, null !== n && function(e, t) {
1117
+ var n = t.last;
1118
+ null === n ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
1119
+ }(o, n), null !== tn && 2 & tn.f && !(64 & e))) {
1120
+ var i = tn;
1121
+ (i.effects ??= []).push(o);
1122
+ }
1123
+ return r;
1124
+ }
1125
+ function xt() {
1126
+ return null !== tn && !nn;
1127
+ }
1128
+ function Dt(e) {
1129
+ const t = Pt(8, null);
1130
+ return he(t, _), t.teardown = e, t;
1131
+ }
1132
+ function Lt(e) {
1133
+ At();
1134
+ var t = on.f;
1135
+ if (tn || !(32 & t) || null === te || te.i) return Rt(e);
1136
+ var n = te;
1137
+ (n.e ??= []).push(e);
1138
+ }
1139
+ function Rt(e) {
1140
+ return Pt(1048580, e);
1141
+ }
1142
+ function Mt(e) {
1143
+ return Pt(4, e);
1144
+ }
1145
+ function It(e, t = 0) {
1146
+ return Pt(8 | t, e);
1147
+ }
1148
+ function Bt(e, t = [], n = [], r = []) {
1149
+ ye(r, t, n, (t) => {
1150
+ Pt(8, () => {
1151
+ e(...t.map(En));
1152
+ });
1153
+ });
1154
+ }
1155
+ function $t(e, t = 0) {
1156
+ return Pt(16 | t, e);
1157
+ }
1158
+ function Ht(e, t = 0) {
1159
+ return Pt(16777216 | t, e);
1160
+ }
1161
+ function jt(e) {
1162
+ return Pt(524320, e);
1163
+ }
1164
+ function Ft(e) {
1165
+ var t = e.teardown;
1166
+ if (null !== t) {
1167
+ const e = Qt, n = tn;
1168
+ en(!0), rn(null);
1169
+ try {
1170
+ t.call(null);
1171
+ } finally {
1172
+ en(e), rn(n);
1173
+ }
1174
+ }
1175
+ }
1176
+ function zt(e, t = !1) {
1177
+ var n = e.first;
1178
+ for (e.first = e.last = null; null !== n;) {
1179
+ const e = n.ac;
1180
+ null !== e && kt(() => {
1181
+ e.abort($);
1182
+ });
1183
+ var r = n.next;
1184
+ 64 & n.f ? n.parent = null : Ut(n, t), n = r;
1185
+ }
1186
+ }
1187
+ function Ut(e, t = !0) {
1188
+ var n = !1;
1189
+ (t || 262144 & e.f) && null !== e.nodes && null !== e.nodes.end && (Vt(e.nodes.start, e.nodes.end), n = !0), e.f |= E, zt(e, t && !n), Tn(e, 0);
1190
+ var r = e.nodes && e.nodes.t;
1191
+ if (null !== r) for (const e of r) e.stop();
1192
+ Ft(e), e.f ^= E, e.f |= 16384;
1193
+ var o = e.parent;
1194
+ null !== o && null !== o.first && qt(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
1195
+ }
1196
+ function Vt(e, t) {
1197
+ for (; null !== e;) {
1198
+ var n = e === t ? null : bt(e);
1199
+ e.remove(), e = n;
1200
+ }
1201
+ }
1202
+ function qt(e) {
1203
+ var t = e.parent, n = e.prev, r = e.next;
1204
+ null !== n && (n.next = r), null !== r && (r.prev = n), null !== t && (t.first === e && (t.first = r), t.last === e && (t.last = n));
1205
+ }
1206
+ function Kt(e, t, n = !0) {
1207
+ var r = [];
1208
+ Gt(e, r, !0);
1209
+ var o = () => {
1210
+ n && Ut(e), t && t();
1211
+ }, i = r.length;
1212
+ if (i > 0) {
1213
+ var s = () => --i || o();
1214
+ for (var a of r) a.out(s);
1215
+ } else o();
1216
+ }
1217
+ function Gt(e, t, n) {
1218
+ if (!(8192 & e.f)) {
1219
+ e.f ^= T;
1220
+ var r = e.nodes && e.nodes.t;
1221
+ if (null !== r) for (const e of r) (e.is_global || n) && t.push(e);
1222
+ for (var o = e.first; null !== o;) {
1223
+ var i = o.next;
1224
+ if (!(64 & o.f)) Gt(o, t, !!(!!(65536 & o.f) || !!(32 & o.f) && !!(16 & e.f)) && n);
1225
+ o = i;
1226
+ }
1227
+ }
1228
+ }
1229
+ function Xt(e) {
1230
+ Wt(e, !0);
1231
+ }
1232
+ function Wt(e, t) {
1233
+ if (8192 & e.f) {
1234
+ e.f ^= T, 1024 & e.f || (he(e, b), Ve.ensure().schedule(e));
1235
+ for (var n = e.first; null !== n;) {
1236
+ var r = n.next;
1237
+ Wt(n, !!(!!(65536 & n.f) || !!(32 & n.f)) && t), n = r;
1238
+ }
1239
+ var o = e.nodes && e.nodes.t;
1240
+ if (null !== o) for (const e of o) (e.is_global || t) && e.in();
1241
+ }
1242
+ }
1243
+ function Yt(e, t) {
1244
+ if (e.nodes) for (var n = e.nodes.start, r = e.nodes.end; null !== n;) {
1245
+ var o = n === r ? null : bt(n);
1246
+ t.append(n), n = o;
1247
+ }
1248
+ }
1249
+ var Zt = null, Jt = !1, Qt = !1;
1250
+ function en(e) {
1251
+ Qt = e;
1252
+ }
1253
+ var tn = null, nn = !1;
1254
+ function rn(e) {
1255
+ tn = e;
1256
+ }
1257
+ var on = null;
1258
+ function sn(e) {
1259
+ on = e;
1260
+ }
1261
+ var an = null;
1262
+ function ln(e) {
1263
+ null !== tn && (an ??= /* @__PURE__ */ new Set()).add(e);
1264
+ }
1265
+ var un = null, cn = 0, fn = null;
1266
+ var dn = 1, pn = 0, hn = pn;
1267
+ function vn(e) {
1268
+ hn = e;
1269
+ }
1270
+ function gn() {
1271
+ return ++dn;
1272
+ }
1273
+ function mn(e) {
1274
+ var t = e.f;
1275
+ if (2048 & t) return !0;
1276
+ if (2 & t && (e.f &= -65537), 4096 & t) {
1277
+ for (var n = e.deps, r = n.length, o = 0; o < r; o++) {
1278
+ var i = n[o];
1279
+ if (mn(i) && Pe(i), i.wv > e.wv) return !0;
1280
+ }
1281
+ 512 & t && null === Ie && he(e, _);
1282
+ }
1283
+ return !1;
1284
+ }
1285
+ function _n(e, t, n = !0) {
1286
+ var r = e.reactions;
1287
+ if (null !== r && (null === an || !an.has(e))) for (var o = 0; o < r.length; o++) {
1288
+ var i = r[o];
1289
+ 2 & i.f ? _n(i, t, !1) : t === i && (n ? he(i, b) : 1024 & i.f && he(i, y), We(i));
1290
+ }
1291
+ }
1292
+ function bn(e) {
1293
+ var t = un, n = cn, r = fn, o = tn, i = an, s = te, a = nn, l = hn, u = e.f;
1294
+ un = null, cn = 0, fn = null, tn = 96 & u ? null : e, an = null, ne(e.ctx), nn = !1, hn = ++pn, null !== e.ac && (kt(() => {
1295
+ e.ac.abort($);
1296
+ }), e.ac = null);
1297
+ try {
1298
+ e.f |= k;
1299
+ var c = (0, e.fn)();
1300
+ e.f |= w;
1301
+ var f = e.deps, d = Re?.is_fork;
1302
+ if (null !== un) {
1303
+ var p;
1304
+ if (d || Tn(e, cn), null !== f && cn > 0) for (f.length = cn + un.length, p = 0; p < un.length; p++) f[cn + p] = un[p];
1305
+ else e.deps = f = un;
1306
+ if (xt() && 512 & e.f) for (p = cn; p < f.length; p++) (f[p].reactions ??= []).push(e);
1307
+ } else !d && null !== f && cn < f.length && (Tn(e, cn), f.length = cn);
1308
+ if (ie() && null !== fn && !nn && null !== f && !(6146 & e.f)) for (p = 0; p < fn.length; p++) _n(fn[p], e);
1309
+ if (null !== o && o !== e) {
1310
+ if (pn++, null !== o.deps) for (let e = 0; e < n; e += 1) o.deps[e].rv = pn;
1311
+ if (null !== t) for (const e of t) e.rv = pn;
1312
+ null !== fn && (null === r ? r = fn : r.push(...fn));
1313
+ }
1314
+ return 8388608 & e.f && (e.f ^= A), c;
1315
+ } catch (e) {
1316
+ return fe(e);
1317
+ } finally {
1318
+ e.f ^= k, un = t, cn = n, fn = r, tn = o, an = i, ne(s), nn = a, hn = l;
1319
+ }
1320
+ }
1321
+ function yn(e, t) {
1322
+ let r = t.reactions;
1323
+ if (null !== r) {
1324
+ var s = o.call(r, e);
1325
+ if (-1 !== s) {
1326
+ var a = r.length - 1;
1327
+ 0 === a ? r = t.reactions = null : (r[s] = r[a], r.pop());
1328
+ }
1329
+ }
1330
+ if (null === r && 2 & t.f && (null === un || !i.call(un, t))) {
1331
+ var l = t;
1332
+ 512 & l.f && (l.f ^= 512, l.f &= -65537), l.v !== n && ve(l), function(e) {
1333
+ if (null !== e.effects) for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort($), null !== t.fn && (t.teardown = g), t.ac = null, Tn(t, 0), zt(t));
1334
+ }(l), Tn(l, 0);
1335
+ }
1336
+ }
1337
+ function Tn(e, t) {
1338
+ var n = e.deps;
1339
+ if (null !== n) for (var r = t; r < n.length; r++) yn(e, n[r]);
1340
+ }
1341
+ function wn(e) {
1342
+ var t = e.f;
1343
+ if (!(16384 & t)) {
1344
+ he(e, _);
1345
+ var n = on, r = Jt;
1346
+ on = e, Jt = !0;
1347
+ try {
1348
+ 16777232 & t ? function(e) {
1349
+ for (var t = e.first; null !== t;) {
1350
+ var n = t.next;
1351
+ 32 & t.f || Ut(t), t = n;
1352
+ }
1353
+ }(e) : zt(e), Ft(e);
1354
+ var o = bn(e);
1355
+ e.teardown = "function" == typeof o ? o : null, e.wv = dn;
1356
+ } finally {
1357
+ Jt = r, on = n;
1358
+ }
1359
+ }
1360
+ }
1361
+ function En(e) {
1362
+ var t = !!(2 & e.f);
1363
+ if (Zt?.add(e), null !== tn && !nn && !(null !== on && 16384 & on.f || null !== an && an.has(e))) {
1364
+ var n = tn.deps;
1365
+ if (2097152 & tn.f) e.rv < pn && (e.rv = pn, null === un && null !== n && n[cn] === e ? cn++ : null === un ? un = [e] : un.push(e));
1366
+ else {
1367
+ tn.deps ??= [], i.call(tn.deps, e) || tn.deps.push(e);
1368
+ var r = e.reactions;
1369
+ null === r ? e.reactions = [tn] : i.call(r, tn) || r.push(tn);
1370
+ }
1371
+ }
1372
+ if (Qt && Qe.has(e)) return Qe.get(e);
1373
+ if (t) {
1374
+ var o = e;
1375
+ if (Qt) {
1376
+ var s = o.v;
1377
+ return (1024 & o.f || null === o.reactions) && !On(o) || (s = Ae(o)), Qe.set(o, s), s;
1378
+ }
1379
+ var a = !(512 & o.f) && !nn && null !== tn && (Jt || !!(512 & tn.f)), l = 0 === (o.f & w);
1380
+ mn(o) && (a && (o.f |= 512), Pe(o)), a && !l && (xe(o), Sn(o));
1381
+ }
1382
+ if (Ie?.has(e)) return Ie.get(e);
1383
+ if (8388608 & e.f) throw e.v;
1384
+ return e.v;
1385
+ }
1386
+ function Sn(e) {
1387
+ if (e.f |= 512, null !== e.deps) for (const t of e.deps) (t.reactions ??= []).push(e), 2 & t.f && !(512 & t.f) && (xe(t), Sn(t));
1388
+ }
1389
+ function On(e) {
1390
+ if (e.v === n) return !0;
1391
+ if (null === e.deps) return !1;
1392
+ for (const t of e.deps) {
1393
+ if (Qe.has(t)) return !0;
1394
+ if (2 & t.f && On(t)) return !0;
1395
+ }
1396
+ return !1;
1397
+ }
1398
+ function Cn(e) {
1399
+ var t = nn;
1400
+ try {
1401
+ return nn = !0, e();
1402
+ } finally {
1403
+ nn = t;
1404
+ }
1405
+ }
1406
+ var Nn = Symbol("events"), kn = /* @__PURE__ */ new Set(), An = /* @__PURE__ */ new Set();
1407
+ function Pn(e, t, n, r = {}) {
1408
+ function o(e) {
1409
+ if (r.capture || Ln.call(t, e), !e.cancelBubble) return kt(() => n?.call(this, e));
1410
+ }
1411
+ return e.startsWith("pointer") || e.startsWith("touch") || "wheel" === e ? ue(() => {
1412
+ t.addEventListener(e, o, r);
1413
+ }) : t.addEventListener(e, o, r), o;
1414
+ }
1415
+ function xn(e, t, n) {
1416
+ (t[Nn] ??= {})[e] = n;
1417
+ }
1418
+ function Dn(e) {
1419
+ for (var t = 0; t < e.length; t++) kn.add(e[t]);
1420
+ for (var n of An) n(e);
1421
+ }
1422
+ function Ln(e) {
1423
+ var t = this, n = t.ownerDocument, r = e.type, o = e.composedPath?.() || [], i = o[0] || e.target, s = 0, a = e === e && e[Nn];
1424
+ if (a) {
1425
+ var u = o.indexOf(a);
1426
+ if (-1 !== u && (t === document || t === window)) return void (e[Nn] = t);
1427
+ var c = o.indexOf(t);
1428
+ if (-1 === c) return;
1429
+ u <= c && (s = u);
1430
+ }
1431
+ if ((i = o[s] || e.target) !== t) {
1432
+ l(e, "currentTarget", {
1433
+ configurable: !0,
1434
+ get: () => i || n
1435
+ });
1436
+ var f = tn, d = on;
1437
+ rn(null), sn(null);
1438
+ try {
1439
+ for (var p, h = []; null !== i && i !== t;) {
1440
+ try {
1441
+ var v = i[Nn]?.[r];
1442
+ null == v || i.disabled && e.target !== i || v.call(i, e);
1443
+ } catch (e) {
1444
+ p ? h.push(e) : p = e;
1445
+ }
1446
+ if (e.cancelBubble) break;
1447
+ s++, i = s < o.length ? o[s] : null;
1448
+ }
1449
+ if (p) {
1450
+ for (let e of h) queueMicrotask(() => {
1451
+ throw e;
1452
+ });
1453
+ throw p;
1454
+ }
1455
+ } finally {
1456
+ e[Nn] = t, delete e.currentTarget, rn(f), sn(d);
1457
+ }
1458
+ }
1459
+ }
1460
+ var Rn = globalThis?.window?.trustedTypes && globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1461
+ function Mn(e) {
1462
+ var t = St("template");
1463
+ return t.innerHTML = function(e) {
1464
+ return Rn?.createHTML(e) ?? e;
1465
+ }(e.replaceAll("<!>", "<!---->")), t.content;
1466
+ }
1467
+ function In(e, t) {
1468
+ var n = on;
1469
+ null === n.nodes && (n.nodes = {
1470
+ start: e,
1471
+ end: t,
1472
+ a: null,
1473
+ t: null
1474
+ });
1475
+ }
1476
+ function Bn(e, t) {
1477
+ var n, r = !!(1 & t), o = !!(2 & t), i = !e.startsWith("<!>");
1478
+ return () => {
1479
+ if (V) return In(U, null), U;
1480
+ void 0 === n && (n = Mn(i ? e : "<!>" + e), r || (n = _t(n)));
1481
+ var t = o || pt ? document.importNode(n, !0) : n.cloneNode(!0);
1482
+ r ? In(_t(t), t.lastChild) : In(t, t);
1483
+ return t;
1484
+ };
1485
+ }
1486
+ function $n(e, t, n = "svg") {
1487
+ var r, o = !e.startsWith("<!>"), i = !!(1 & t), s = `<${n}>${o ? e : "<!>" + e}</${n}>`;
1488
+ return () => {
1489
+ if (V) return In(U, null), U;
1490
+ if (!r) {
1491
+ var e = _t(Mn(s));
1492
+ if (i) for (r = document.createDocumentFragment(); _t(e);) r.appendChild(_t(e));
1493
+ else r = _t(e);
1494
+ }
1495
+ var t = r.cloneNode(!0);
1496
+ i ? In(_t(t), t.lastChild) : In(t, t);
1497
+ return t;
1498
+ };
1499
+ }
1500
+ function Hn(e, t) {
1501
+ return $n(e, t, "svg");
1502
+ }
1503
+ function jn(e = "") {
1504
+ if (!V) {
1505
+ var t = mt(e + "");
1506
+ return In(t, t), t;
1507
+ }
1508
+ var n = U;
1509
+ return 3 !== n.nodeType ? (n.before(n = mt()), K(n)) : Ot(n), In(n, n), n;
1510
+ }
1511
+ function Fn() {
1512
+ if (V) return In(U, null), U;
1513
+ var e = document.createDocumentFragment(), t = document.createComment(""), n = mt();
1514
+ return e.append(t, n), In(t, n), e;
1515
+ }
1516
+ function zn(e, t) {
1517
+ if (V) {
1518
+ var n = on;
1519
+ 32768 & n.f && null !== n.nodes.end || (n.nodes.end = U), G();
1520
+ return;
1521
+ }
1522
+ null !== e && e.before(t);
1523
+ }
1524
+ function Un(e) {
1525
+ return e.endsWith("capture") && "gotpointercapture" !== e && "lostpointercapture" !== e;
1526
+ }
1527
+ var Vn = [
1528
+ "beforeinput",
1529
+ "click",
1530
+ "change",
1531
+ "dblclick",
1532
+ "contextmenu",
1533
+ "focusin",
1534
+ "focusout",
1535
+ "input",
1536
+ "keydown",
1537
+ "keyup",
1538
+ "mousedown",
1539
+ "mousemove",
1540
+ "mouseout",
1541
+ "mouseover",
1542
+ "mouseup",
1543
+ "pointerdown",
1544
+ "pointermove",
1545
+ "pointerout",
1546
+ "pointerover",
1547
+ "pointerup",
1548
+ "touchend",
1549
+ "touchmove",
1550
+ "touchstart"
1551
+ ];
1552
+ function qn(e) {
1553
+ return Vn.includes(e);
1554
+ }
1555
+ var Kn = {
1556
+ formnovalidate: "formNoValidate",
1557
+ ismap: "isMap",
1558
+ nomodule: "noModule",
1559
+ playsinline: "playsInline",
1560
+ readonly: "readOnly",
1561
+ defaultvalue: "defaultValue",
1562
+ defaultchecked: "defaultChecked",
1563
+ srcobject: "srcObject",
1564
+ novalidate: "noValidate",
1565
+ allowfullscreen: "allowFullscreen",
1566
+ disablepictureinpicture: "disablePictureInPicture",
1567
+ disableremoteplayback: "disableRemotePlayback"
1568
+ };
1569
+ function Gn(e) {
1570
+ return e = e.toLowerCase(), Kn[e] ?? e;
1571
+ }
1572
+ var Xn = ["touchstart", "touchmove"];
1573
+ function Wn(e) {
1574
+ return Xn.includes(e);
1575
+ }
1576
+ function Yn(e, t) {
1577
+ var n = null == t ? "" : "object" == typeof t ? `${t}` : t;
1578
+ n !== (e[I] ??= e.nodeValue) && (e[I] = n, e.nodeValue = `${n}`);
1579
+ }
1580
+ function Zn(e, t) {
1581
+ return er(e, t);
1582
+ }
1583
+ var Qn = /* @__PURE__ */ new Map();
1584
+ function er(e, { target: n, anchor: r, props: o = {}, events: i, context: a, intro: l = !0, transformError: u }) {
1585
+ gt();
1586
+ var c = void 0, f = function(e) {
1587
+ Ve.ensure();
1588
+ const t = Pt(524352, e);
1589
+ return (e = {}) => new Promise((n) => {
1590
+ e.outro ? Kt(t, () => {
1591
+ Ut(t), n(void 0);
1592
+ }) : (Ut(t), n(void 0));
1593
+ });
1594
+ }(() => {
1595
+ var l = r ?? n.appendChild(mt());
1596
+ (function(e, t, n, r) {
1597
+ new be(e, t, n, r);
1598
+ })(l, { pending: () => {} }, (n) => {
1599
+ if (re({}), a && (te.c = a), i && (o.$$events = i), V && In(n, null), c = e(n, o) || {}, V && (on.nodes.end = U, null === U || 8 !== U.nodeType || "]" !== U.data)) throw z(), t;
1600
+ oe();
1601
+ }, u);
1602
+ var f = /* @__PURE__ */ new Set(), d = (e) => {
1603
+ for (var t = 0; t < e.length; t++) {
1604
+ var r = e[t];
1605
+ if (!f.has(r)) {
1606
+ f.add(r);
1607
+ var o = Wn(r);
1608
+ for (const e of [n, document]) {
1609
+ var i = Qn.get(e);
1610
+ void 0 === i && (i = /* @__PURE__ */ new Map(), Qn.set(e, i));
1611
+ var s = i.get(r);
1612
+ void 0 === s ? (e.addEventListener(r, Ln, { passive: o }), i.set(r, 1)) : i.set(r, s + 1);
1613
+ }
1614
+ }
1615
+ }
1616
+ };
1617
+ return d(s(kn)), An.add(d), () => {
1618
+ for (var e of f) for (const r of [n, document]) {
1619
+ var t = Qn.get(r), o = t.get(e);
1620
+ 0 == --o ? (r.removeEventListener(e, Ln), t.delete(e), 0 === t.size && Qn.delete(r)) : t.set(e, o);
1621
+ }
1622
+ An.delete(d), l !== r && l.parentNode?.removeChild(l);
1623
+ };
1624
+ });
1625
+ return tr.set(c, f), c;
1626
+ }
1627
+ var tr = /* @__PURE__ */ new WeakMap();
1628
+ function nr(e, t) {
1629
+ const n = tr.get(e);
1630
+ return n ? (tr.delete(e), n(t)) : Promise.resolve();
1631
+ }
1632
+ var rr, or = class {
1633
+ anchor;
1634
+ #q = /* @__PURE__ */ new Map();
1635
+ #K = /* @__PURE__ */ new Map();
1636
+ #G = /* @__PURE__ */ new Map();
1637
+ #X = /* @__PURE__ */ new Set();
1638
+ #W = !0;
1639
+ constructor(e, t = !0) {
1640
+ this.anchor = e, this.#W = t;
1641
+ }
1642
+ #V = (e) => {
1643
+ if (this.#q.has(e)) {
1644
+ var t = this.#q.get(e), n = this.#K.get(t);
1645
+ if (n) Xt(n), this.#X.delete(t);
1646
+ else {
1647
+ var r = this.#G.get(t);
1648
+ r && (Xt(r.effect), this.#K.set(t, r.effect), this.#G.delete(t), r.fragment.lastChild.remove(), this.anchor.before(r.fragment), n = r.effect);
1649
+ }
1650
+ for (const [t, n] of this.#q) {
1651
+ if (this.#q.delete(t), t === e) break;
1652
+ const r = this.#G.get(n);
1653
+ r && (Ut(r.effect), this.#G.delete(n));
1654
+ }
1655
+ for (const [e, r] of this.#K) {
1656
+ if (e === t || this.#X.has(e)) continue;
1657
+ const o = () => {
1658
+ if (Array.from(this.#q.values()).includes(e)) {
1659
+ var t = document.createDocumentFragment();
1660
+ Yt(r, t), t.append(mt()), this.#G.set(e, {
1661
+ effect: r,
1662
+ fragment: t
1663
+ });
1664
+ } else Ut(r);
1665
+ this.#X.delete(e), this.#K.delete(e);
1666
+ };
1667
+ this.#W || !n ? (this.#X.add(e), Kt(r, o, !1)) : o();
1668
+ }
1669
+ }
1670
+ };
1671
+ #Y = (e) => {
1672
+ this.#q.delete(e);
1673
+ const t = Array.from(this.#q.values());
1674
+ for (const [e, n] of this.#G) t.includes(e) || (Ut(n.effect), this.#G.delete(e));
1675
+ };
1676
+ ensure(e, t) {
1677
+ var n = Re;
1678
+ !t || this.#K.has(e) || this.#G.has(e) || this.#K.set(e, jt(() => t(this.anchor)));
1679
+ this.#q.set(n, e), V && (this.anchor = U), this.#V(n);
1680
+ }
1681
+ };
1682
+ function ir(e, t, ...n) {
1683
+ var r = new or(e);
1684
+ $t(() => {
1685
+ const e = t() ?? null;
1686
+ r.ensure(e, e && ((t) => e(t, ...n)));
1687
+ }, S);
1688
+ }
1689
+ function sr(e) {
1690
+ var t, n;
1691
+ null === te && j(), ee && null !== te.l ? (t = te, n = t.l, n.u ??= {
1692
+ a: [],
1693
+ b: [],
1694
+ m: []
1695
+ }).m.push(e) : Lt(() => {
1696
+ const t = Cn(e);
1697
+ if ("function" == typeof t) return t;
1698
+ });
1699
+ }
1700
+ function ar(e, t, n = !1) {
1701
+ var r;
1702
+ V && (r = U, G());
1703
+ var o = new or(e);
1704
+ function i(e, t) {
1705
+ if (V) {
1706
+ var n = Z(r);
1707
+ if (e !== parseInt(n.substring(1))) {
1708
+ var i = Y();
1709
+ K(i), o.anchor = i, q(!1), o.ensure(e, t), q(!0);
1710
+ return;
1711
+ }
1712
+ }
1713
+ o.ensure(e, t);
1714
+ }
1715
+ $t(() => {
1716
+ var e = !1;
1717
+ t((t, n = 0) => {
1718
+ e = !0, i(n, t);
1719
+ }), e || i(-1, null);
1720
+ }, n ? S : 0);
1721
+ }
1722
+ function lr(e, t, n = !0) {
1723
+ var r;
1724
+ if (e.pending.size > 0) {
1725
+ r = /* @__PURE__ */ new Set();
1726
+ for (const t of e.pending.values()) for (const n of t) r.add(e.items.get(n).e);
1727
+ }
1728
+ for (var o = 0; o < t.length; o++) {
1729
+ var i = t[o];
1730
+ r?.has(i) ? (i.f |= C, Yt(i, document.createDocumentFragment())) : Ut(t[o], n);
1731
+ }
1732
+ }
1733
+ function ur(e, t, n, o, i, a = null) {
1734
+ var l = e, u = /* @__PURE__ */ new Map();
1735
+ if (4 & t) {
1736
+ var c = e;
1737
+ l = V ? K(_t(c)) : c.appendChild(mt());
1738
+ }
1739
+ V && G();
1740
+ var f, d = null, p = Ne(() => {
1741
+ var e = n();
1742
+ return r(e) ? e : null == e ? [] : s(e);
1743
+ });
1744
+ var h = /* @__PURE__ */ new Map(), v = !0;
1745
+ function g(e) {
1746
+ 16384 & m.effect.f || (m.pending.delete(e), m.fallback = d, function(e, t, n, r, o) {
1747
+ var i, a, l, u, c, f = !!(8 & r), d = t.length, p = e.items, h = cr(e.effect.first), v = null, g = [], m = [];
1748
+ if (f) for (c = 0; c < d; c += 1) l = o(t[c], c), 33554432 & (u = p.get(l).e).f || (u.nodes?.a?.measure(), (a ??= /* @__PURE__ */ new Set()).add(u));
1749
+ for (c = 0; c < d; c += 1) {
1750
+ if (l = o(t[c], c), u = p.get(l).e, null !== e.outrogroups) for (const t of e.outrogroups) t.pending.delete(u), t.done.delete(u);
1751
+ if (8192 & u.f && (Xt(u), f && (u.nodes?.a?.unfix(), (a ??= /* @__PURE__ */ new Set()).delete(u))), 33554432 & u.f) {
1752
+ if (u.f ^= C, u !== h) {
1753
+ var _ = v ? v.next : h;
1754
+ u === e.effect.last && (e.effect.last = u.prev), u.prev && (u.prev.next = u.next), u.next && (u.next.prev = u.prev), pr(e, v, u), pr(e, u, _), dr(u, _, n), g = [], m = [], h = cr((v = u).next);
1755
+ continue;
1756
+ }
1757
+ dr(u, null, n);
1758
+ }
1759
+ if (u !== h) {
1760
+ if (void 0 !== i && i.has(u)) {
1761
+ if (g.length < m.length) {
1762
+ var b, y = m[0];
1763
+ v = y.prev;
1764
+ var T = g[0], w = g[g.length - 1];
1765
+ for (b = 0; b < g.length; b += 1) dr(g[b], y, n);
1766
+ for (b = 0; b < m.length; b += 1) i.delete(m[b]);
1767
+ pr(e, T.prev, w.next), pr(e, v, T), pr(e, w, y), h = y, v = w, c -= 1, g = [], m = [];
1768
+ } else i.delete(u), dr(u, h, n), pr(e, u.prev, u.next), pr(e, u, null === v ? e.effect.first : v.next), pr(e, v, u), v = u;
1769
+ continue;
1770
+ }
1771
+ for (g = [], m = []; null !== h && h !== u;) (i ??= /* @__PURE__ */ new Set()).add(h), m.push(h), h = cr(h.next);
1772
+ if (null === h) continue;
1773
+ }
1774
+ 33554432 & u.f || g.push(u), v = u, h = cr(u.next);
1775
+ }
1776
+ if (null !== e.outrogroups) {
1777
+ for (const t of e.outrogroups) 0 === t.pending.size && (lr(e, s(t.done)), e.outrogroups?.delete(t));
1778
+ 0 === e.outrogroups.size && (e.outrogroups = null);
1779
+ }
1780
+ if (null !== h || void 0 !== i) {
1781
+ var E = [];
1782
+ if (void 0 !== i) for (u of i) 8192 & u.f || E.push(u);
1783
+ for (; null !== h;) 8192 & h.f || h === e.fallback || E.push(h), h = cr(h.next);
1784
+ var S = E.length;
1785
+ if (S > 0) {
1786
+ var O = 4 & r && 0 === d ? n : null;
1787
+ if (f) {
1788
+ for (c = 0; c < S; c += 1) E[c].nodes?.a?.measure();
1789
+ for (c = 0; c < S; c += 1) E[c].nodes?.a?.fix();
1790
+ }
1791
+ (function(e, t, n) {
1792
+ for (var r, o = t.length, i = t.length, a = 0; a < o; a++) {
1793
+ let n = t[a];
1794
+ Kt(n, () => {
1795
+ if (r) {
1796
+ if (r.pending.delete(n), r.done.add(n), 0 === r.pending.size) {
1797
+ var t = e.outrogroups;
1798
+ lr(e, s(r.done)), t.delete(r), 0 === t.size && (e.outrogroups = null);
1799
+ }
1800
+ } else i -= 1;
1801
+ }, !1);
1802
+ }
1803
+ if (0 === i) {
1804
+ var l = null !== n;
1805
+ if (l) {
1806
+ var u = n, c = u.parentNode;
1807
+ Et(c), c.append(u), e.items.clear();
1808
+ }
1809
+ lr(e, t, !l);
1810
+ } else r = {
1811
+ pending: new Set(t),
1812
+ done: /* @__PURE__ */ new Set()
1813
+ }, (e.outrogroups ??= /* @__PURE__ */ new Set()).add(r);
1814
+ })(e, E, O);
1815
+ }
1816
+ }
1817
+ f && ue(() => {
1818
+ if (void 0 !== a) for (u of a) u.nodes?.a?.apply();
1819
+ });
1820
+ }(m, f, l, t, o), null !== d && (0 === f.length ? 33554432 & d.f ? (d.f ^= C, dr(d, null, l)) : Xt(d) : Kt(d, () => {
1821
+ d = null;
1822
+ })));
1823
+ }
1824
+ var m = {
1825
+ effect: $t(() => {
1826
+ var e = (f = En(p)).length;
1827
+ let r = !1;
1828
+ V && "[!" === Z(l) != (0 === e) && (K(l = Y()), q(!1), r = !0);
1829
+ for (var s = /* @__PURE__ */ new Set(), c = Re, m = 0; m < e; m += 1) {
1830
+ V && 8 === U.nodeType && "]" === U.data && (l = U, r = !0, q(!1));
1831
+ var _ = f[m], b = o(_, m), y = v ? null : u.get(b);
1832
+ y ? (y.v && it(y.v, _), y.i && it(y.i, m)) : (y = fr(u, v ? l : rr ??= mt(), _, b, m, i, t, n), v || (y.e.f |= C), u.set(b, y)), s.add(b);
1833
+ }
1834
+ 0 === e && a && !d && (v ? d = jt(() => a(l)) : (d = jt(() => a(rr ??= mt()))).f |= C), e > s.size && F(), V && e > 0 && K(Y()), v || (h.set(c, s), g(c)), r && q(!0), En(p);
1835
+ }),
1836
+ flags: t,
1837
+ items: u,
1838
+ pending: h,
1839
+ outrogroups: null,
1840
+ fallback: d
1841
+ };
1842
+ v = !1, V && (l = U);
1843
+ }
1844
+ function cr(e) {
1845
+ for (; null !== e && !(32 & e.f);) e = e.next;
1846
+ return e;
1847
+ }
1848
+ function fr(e, t, n, r, o, i, s, a) {
1849
+ var l = 1 & s ? 16 & s ? tt(n) : rt(n, !1, !1) : null, u = 2 & s ? tt(o) : null;
1850
+ return {
1851
+ v: l,
1852
+ i: u,
1853
+ e: jt(() => (i(t, l ?? n, u ?? o, a), () => {
1854
+ e.delete(r);
1855
+ }))
1856
+ };
1857
+ }
1858
+ function dr(e, t, n) {
1859
+ if (e.nodes) for (var r = e.nodes.start, o = e.nodes.end, i = !t || 33554432 & t.f ? n : t.nodes.start; null !== r;) {
1860
+ var s = bt(r);
1861
+ if (i.before(r), r === o) return;
1862
+ r = s;
1863
+ }
1864
+ }
1865
+ function pr(e, t, n) {
1866
+ null === t ? e.effect.first = n : t.next = n, null === n ? e.effect.last = t : n.prev = t;
1867
+ }
1868
+ function hr(e, n, r = !1, o = !1, i = !1, s = !1) {
1869
+ var a = e, l = "";
1870
+ if (r) {
1871
+ var u = e;
1872
+ V && (a = K(_t(u)));
1873
+ }
1874
+ Bt(() => {
1875
+ var e = on;
1876
+ if (l !== (l = n() ?? "")) {
1877
+ if (r && !V) return e.nodes = null, u.innerHTML = l, void ("" !== l && In(_t(u), u.lastChild));
1878
+ if (null !== e.nodes && (Vt(e.nodes.start, e.nodes.end), e.nodes = null), "" !== l) {
1879
+ if (V) {
1880
+ U.data;
1881
+ for (var s = G(), c = s; null !== s && (8 !== s.nodeType || "" !== s.data);) c = s, s = bt(s);
1882
+ if (null === s) throw z(), t;
1883
+ In(U, c), a = K(s);
1884
+ return;
1885
+ }
1886
+ var f = St(o ? "svg" : i ? "math" : "template", o ? "http://www.w3.org/2000/svg" : i ? "http://www.w3.org/1998/Math/MathML" : void 0);
1887
+ f.innerHTML = l;
1888
+ var d = o || i ? f : f.content;
1889
+ if (In(_t(d), d.lastChild), o || i) for (; _t(d);) a.before(_t(d));
1890
+ else a.before(d);
1891
+ }
1892
+ } else V && G();
1893
+ });
1894
+ }
1895
+ function vr(e, t) {
1896
+ var n, r = void 0;
1897
+ Ht(() => {
1898
+ r !== (r = t()) && (n && (Ut(n), n = null), r && (n = jt(() => {
1899
+ Mt(() => r(e));
1900
+ })));
1901
+ });
1902
+ }
1903
+ function gr(e) {
1904
+ var t, n, r = "";
1905
+ if ("string" == typeof e || "number" == typeof e) r += e;
1906
+ else if ("object" == typeof e) if (Array.isArray(e)) {
1907
+ var o = e.length;
1908
+ for (t = 0; t < o; t++) e[t] && (n = gr(e[t])) && (r && (r += " "), r += n);
1909
+ } else for (n in e) e[n] && (r && (r += " "), r += n);
1910
+ return r;
1911
+ }
1912
+ function mr(e) {
1913
+ return "object" == typeof e ? function() {
1914
+ for (var e, t, n = 0, r = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t = gr(e)) && (r && (r += " "), r += t);
1915
+ return r;
1916
+ }(e) : e ?? "";
1917
+ }
1918
+ var _r = [..." \n\r\f\xA0\v"];
1919
+ function br(e, t = !1) {
1920
+ var n = t ? " !important;" : ";", r = "";
1921
+ for (var o of Object.keys(e)) {
1922
+ var i = e[o];
1923
+ null != i && "" !== i && (r += " " + o + ": " + i + n);
1924
+ }
1925
+ return r;
1926
+ }
1927
+ function yr(e) {
1928
+ return "-" !== e[0] || "-" !== e[1] ? e.toLowerCase() : e;
1929
+ }
1930
+ function Tr(e, t, n, r, o, i) {
1931
+ var s = e[R];
1932
+ if (V || s !== n || void 0 === s) {
1933
+ var a = function(e, t, n) {
1934
+ var r = null == e ? "" : "" + e;
1935
+ if (t && (r = r ? r + " " + t : t), n) {
1936
+ for (var o of Object.keys(n)) if (n[o]) r = r ? r + " " + o : o;
1937
+ else if (r.length) for (var i = o.length, s = 0; (s = r.indexOf(o, s)) >= 0;) {
1938
+ var a = s + i;
1939
+ 0 !== s && !_r.includes(r[s - 1]) || a !== r.length && !_r.includes(r[a]) ? s = a : r = (0 === s ? "" : r.substring(0, s)) + r.substring(a + 1);
1940
+ }
1941
+ }
1942
+ return "" === r ? null : r;
1943
+ }(n, r, i);
1944
+ V && a === e.getAttribute("class") || (null == a ? e.removeAttribute("class") : t ? e.className = a : e.setAttribute("class", a)), e[R] = n;
1945
+ } else if (i && o !== i) for (var l in i) {
1946
+ var u = !!i[l];
1947
+ null != o && u === !!o[l] || e.classList.toggle(l, u);
1948
+ }
1949
+ return i;
1950
+ }
1951
+ function wr(e, t = {}, n, r) {
1952
+ for (var o in n) {
1953
+ var i = n[o];
1954
+ t[o] !== i && (null == n[o] ? e.style.removeProperty(o) : e.style.setProperty(o, i, r));
1955
+ }
1956
+ }
1957
+ function Er(e, t, n, r) {
1958
+ var o = e[M];
1959
+ if (V || o !== t) {
1960
+ var i = function(e, t) {
1961
+ if (t) {
1962
+ var n, r, o = "";
1963
+ if (Array.isArray(t) ? (n = t[0], r = t[1]) : n = t, e) {
1964
+ e = String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
1965
+ var i = !1, s = 0, a = !1, l = [];
1966
+ n && l.push(...Object.keys(n).map(yr)), r && l.push(...Object.keys(r).map(yr));
1967
+ var u = 0, c = -1;
1968
+ const t = e.length;
1969
+ for (var f = 0; f < t; f++) {
1970
+ var d = e[f];
1971
+ if (a ? "/" === d && "*" === e[f - 1] && (a = !1) : i ? i === d && (i = !1) : "/" === d && "*" === e[f + 1] ? a = !0 : "\"" === d || "'" === d ? i = d : "(" === d ? s++ : ")" === d && s--, !a && !1 === i && 0 === s) {
1972
+ if (":" === d && -1 === c) c = f;
1973
+ else if (";" === d || f === t - 1) {
1974
+ if (-1 !== c) {
1975
+ var p = yr(e.substring(u, c).trim());
1976
+ l.includes(p) || (";" !== d && f++, o += " " + e.substring(u, f).trim() + ";");
1977
+ }
1978
+ u = f + 1, c = -1;
1979
+ }
1980
+ }
1981
+ }
1982
+ }
1983
+ return n && (o += br(n)), r && (o += br(r, !0)), "" === (o = o.trim()) ? null : o;
1984
+ }
1985
+ return null == e ? null : String(e);
1986
+ }(t, r);
1987
+ V && i === e.getAttribute("style") || (null == i ? e.removeAttribute("style") : e.style.cssText = i), e[M] = t;
1988
+ } else r && (Array.isArray(r) ? (wr(e, n?.[0], r[0]), wr(e, n?.[1], r[1], "important")) : wr(e, n, r));
1989
+ return r;
1990
+ }
1991
+ function Sr(e, t, n = !1) {
1992
+ if (e.multiple) {
1993
+ if (null == t) return;
1994
+ if (!r(t)) return void console.warn("https://svelte.dev/e/select_multiple_invalid_value");
1995
+ for (var o of e.options) o.selected = t.includes(Or(o));
1996
+ } else {
1997
+ for (o of e.options) if (ft(Or(o), t)) return void (o.selected = !0);
1998
+ n && void 0 === t || (e.selectedIndex = -1);
1999
+ }
2000
+ }
2001
+ function Or(e) {
2002
+ return "__value" in e ? e.__value : e.value;
2003
+ }
2004
+ var Cr = Symbol("class"), Nr = Symbol("style"), kr = Symbol("is custom element"), Ar = Symbol("is html"), Pr = H ? "link" : "LINK", xr = H ? "input" : "INPUT", Dr = H ? "option" : "OPTION", Lr = H ? "select" : "SELECT";
2005
+ function Rr(e) {
2006
+ if (V) {
2007
+ var t = !1, n = () => {
2008
+ if (!t) {
2009
+ if (t = !0, e.hasAttribute("value")) {
2010
+ var n = e.value;
2011
+ Ir(e, "value", null), e.value = n;
2012
+ }
2013
+ if (e.hasAttribute("checked")) {
2014
+ var r = e.checked;
2015
+ Ir(e, "checked", null), e.checked = r;
2016
+ }
2017
+ }
2018
+ };
2019
+ e[B] = n, ue(n), Nt || (Nt = !0, document.addEventListener("reset", (e) => {
2020
+ Promise.resolve().then(() => {
2021
+ if (!e.defaultPrevented) for (const t of e.target.elements) t[B]?.();
2022
+ });
2023
+ }, { capture: !0 }));
2024
+ }
2025
+ }
2026
+ function Mr(e, t) {
2027
+ t ? e.hasAttribute("selected") || e.setAttribute("selected", "") : e.removeAttribute("selected");
2028
+ }
2029
+ function Ir(e, t, n, r) {
2030
+ var o = $r(e);
2031
+ V && (o[t] = e.getAttribute(t), "src" === t || "srcset" === t || "href" === t && e.nodeName === Pr) || o[t] !== (o[t] = n) && ("loading" === t && (e[D] = n), null == n ? e.removeAttribute(t) : "string" != typeof n && jr(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
2032
+ }
2033
+ function Br(e, t, r = [], o = [], i = [], s, a = !1, l = !1) {
2034
+ ye(i, r, o, (r) => {
2035
+ var o = void 0, i = {}, u = e.nodeName === Lr, c = !1;
2036
+ if (Ht(() => {
2037
+ var f = t(...r.map(En)), d = function(e, t, r, o, i = !1) {
2038
+ if (V && i && e.nodeName === xr) {
2039
+ var s = e;
2040
+ ("checkbox" === s.type ? "defaultChecked" : "defaultValue") in r || Rr(s);
2041
+ }
2042
+ var a = $r(e), l = a[kr], u = !a[Ar];
2043
+ let c = V && l;
2044
+ c && q(!1);
2045
+ var f = t || {}, d = e.nodeName === Dr;
2046
+ for (var p in t) p in r || (r[p] = null);
2047
+ r.class ? r.class = mr(r.class) : (o || r[Cr]) && (r.class = null), r[Nr] && (r.style ??= null);
2048
+ var h = jr(e);
2049
+ if (e.nodeName === xr && "type" in r && ("value" in r || "__value" in r)) {
2050
+ var v = r.type;
2051
+ (v !== f.type || void 0 === v && e.hasAttribute("type")) && (f.type = v, Ir(e, "type", v));
2052
+ }
2053
+ for (const w in r) {
2054
+ let E = r[w];
2055
+ if (d && "value" === w && null == E) e.value = e.__value = "", f[w] = E;
2056
+ else if ("class" !== w) if ("style" !== w) {
2057
+ var g = f[w];
2058
+ if (E !== g || void 0 === E && e.hasAttribute(w)) {
2059
+ f[w] = E;
2060
+ var m = w[0] + w[1];
2061
+ if ("$$" !== m) if ("on" === m) {
2062
+ const S = {}, O = "$$" + w;
2063
+ let C = w.slice(2);
2064
+ var _ = qn(C);
2065
+ if (Un(C) && (C = C.slice(0, -7), S.capture = !0), !_ && g) {
2066
+ if (null != E) continue;
2067
+ e.removeEventListener(C, f[O], S), f[O] = null;
2068
+ }
2069
+ if (_) xn(C, e, E), Dn([C]);
2070
+ else if (null != E) {
2071
+ function b(e) {
2072
+ f[w].call(this, e);
2073
+ }
2074
+ f[O] = Pn(C, e, b, S);
2075
+ }
2076
+ } else if ("style" === w) Ir(e, w, E);
2077
+ else if ("autofocus" === w) Ct(e, Boolean(E));
2078
+ else if (l || "__value" !== w && ("value" !== w || null == E)) if ("selected" === w && d) Mr(e, E);
2079
+ else {
2080
+ var y = w;
2081
+ u || (y = Gn(y));
2082
+ var T = "defaultValue" === y || "defaultChecked" === y;
2083
+ if (null != E || l || T) T || h.includes(y) && (l || "string" != typeof E) ? (e[y] = E, y in a && (a[y] = n)) : "function" != typeof E && Ir(e, y, E);
2084
+ else if (a[w] = null, "value" === y || "checked" === y) {
2085
+ let N = e;
2086
+ const k = void 0 === t;
2087
+ if ("value" === y) {
2088
+ let A = N.defaultValue;
2089
+ N.removeAttribute(y), N.defaultValue = A, N.value = N.__value = k ? A : null;
2090
+ } else {
2091
+ let P = N.defaultChecked;
2092
+ N.removeAttribute(y), N.defaultChecked = P, N.checked = !!k && P;
2093
+ }
2094
+ } else e.removeAttribute(w);
2095
+ }
2096
+ else e.value = e.__value = E;
2097
+ }
2098
+ } else Er(e, E, t?.[Nr], r[Nr]), f[w] = E, f[Nr] = r[Nr];
2099
+ else Tr(e, "http://www.w3.org/1999/xhtml" === e.namespaceURI, E, o, t?.[Cr], r[Cr]), f[w] = E, f[Cr] = r[Cr];
2100
+ }
2101
+ return c && q(!0), f;
2102
+ }(e, o, f, s, a, l);
2103
+ c && u && "value" in f && Sr(e, f.value);
2104
+ for (let e of Object.getOwnPropertySymbols(i)) f[e] || Ut(i[e]);
2105
+ for (let t of Object.getOwnPropertySymbols(f)) {
2106
+ var p = f[t];
2107
+ "@attach" !== t.description || o && p === o[t] || (i[t] && Ut(i[t]), i[t] = jt(() => vr(e, () => p))), d[t] = p;
2108
+ }
2109
+ o = d;
2110
+ }), u) {
2111
+ var f = e;
2112
+ Mt(() => {
2113
+ Sr(f, o.value, !0), function(e) {
2114
+ var t = new MutationObserver(() => {
2115
+ Sr(e, e.__value);
2116
+ });
2117
+ t.observe(e, {
2118
+ childList: !0,
2119
+ subtree: !0,
2120
+ attributes: !0,
2121
+ attributeFilter: ["value"]
2122
+ }), Dt(() => {
2123
+ t.disconnect();
2124
+ });
2125
+ }(f);
2126
+ });
2127
+ }
2128
+ c = !0;
2129
+ });
2130
+ }
2131
+ function $r(e) {
2132
+ return e[L] ??= {
2133
+ [kr]: e.nodeName.includes("-"),
2134
+ [Ar]: "http://www.w3.org/1999/xhtml" === e.namespaceURI
2135
+ };
2136
+ }
2137
+ var Hr = /* @__PURE__ */ new Map();
2138
+ function jr(e) {
2139
+ var t, n = e.getAttribute("is") || e.nodeName, r = Hr.get(n);
2140
+ if (r) return r;
2141
+ Hr.set(n, r = []);
2142
+ for (var o = e, i = Element.prototype; i !== o;) {
2143
+ for (var s in t = c(o)) t[s].set && "innerHTML" !== s && "textContent" !== s && "innerText" !== s && r.push(s);
2144
+ o = p(o);
2145
+ }
2146
+ return r;
2147
+ }
2148
+ function Fr(e, t) {
2149
+ return e === t || e?.[P] === t;
2150
+ }
2151
+ function zr(e = {}, t, n, r) {
2152
+ var o = te.r, i = on;
2153
+ return Mt(() => {
2154
+ var s, a;
2155
+ return It(() => {
2156
+ s = a, a = r?.() || [], Cn(() => {
2157
+ Fr(n(...a), e) || (t(e, ...a), s && Fr(n(...s), e) && t(null, ...s));
2158
+ });
2159
+ }), () => {
2160
+ let r = i;
2161
+ for (; r !== o && null !== r.parent && 33554432 & r.parent.f;) r = r.parent;
2162
+ const s = r.teardown;
2163
+ r.teardown = () => {
2164
+ a && Fr(n(...a), e) && t(null, ...a), s?.();
2165
+ };
2166
+ };
2167
+ }), e;
2168
+ }
2169
+ var Ur = {
2170
+ get(e, t) {
2171
+ if (!e.exclude.has(t)) return e.props[t];
2172
+ },
2173
+ set: (e, t) => !1,
2174
+ getOwnPropertyDescriptor(e, t) {
2175
+ if (!e.exclude.has(t)) return t in e.props ? {
2176
+ enumerable: !0,
2177
+ configurable: !0,
2178
+ value: e.props[t]
2179
+ } : void 0;
2180
+ },
2181
+ has: (e, t) => !e.exclude.has(t) && t in e.props,
2182
+ ownKeys: (e) => Reflect.ownKeys(e.props).filter((t) => !e.exclude.has(t))
2183
+ };
2184
+ var Vr = {
2185
+ get(e, t) {
2186
+ let n = e.props.length;
2187
+ for (; n--;) {
2188
+ let r = e.props[n];
2189
+ if (v(r) && (r = r()), "object" == typeof r && null !== r && t in r) return r[t];
2190
+ }
2191
+ },
2192
+ set(e, t, n) {
2193
+ let r = e.props.length;
2194
+ for (; r--;) {
2195
+ let o = e.props[r];
2196
+ v(o) && (o = o());
2197
+ const i = u(o, t);
2198
+ if (i && i.set) return i.set(n), !0;
2199
+ }
2200
+ return !1;
2201
+ },
2202
+ getOwnPropertyDescriptor(e, t) {
2203
+ let n = e.props.length;
2204
+ for (; n--;) {
2205
+ let r = e.props[n];
2206
+ if (v(r) && (r = r()), "object" == typeof r && null !== r && t in r) {
2207
+ const e = u(r, t);
2208
+ return e && !e.configurable && (e.configurable = !0), e;
2209
+ }
2210
+ }
2211
+ },
2212
+ has(e, t) {
2213
+ if (t === P || t === x) return !1;
2214
+ for (let n of e.props) if (v(n) && (n = n()), null != n && t in n) return !0;
2215
+ return !1;
2216
+ },
2217
+ ownKeys(e) {
2218
+ const t = [];
2219
+ for (let n of e.props) if (v(n) && (n = n()), n) {
2220
+ for (const e in n) t.includes(e) || t.push(e);
2221
+ for (const e of Object.getOwnPropertySymbols(n)) t.includes(e) || t.push(e);
2222
+ }
2223
+ return t;
2224
+ }
2225
+ };
2226
+ function qr(...e) {
2227
+ return new Proxy({ props: e }, Vr);
2228
+ }
2229
+ function Kr(e, t, n, r) {
2230
+ var o = !ee || !!(2 & n), i = !!(8 & n), s = !!(16 & n), a = r, l = !0, c = void 0, f = () => s && o ? (c ??= Ee(r), En(c)) : (l && (l = !1, a = s ? Cn(r) : r), a);
2231
+ let d;
2232
+ if (i) {
2233
+ var p = P in e || x in e;
2234
+ d = u(e, t)?.set ?? (p && t in e ? (n) => e[t] = n : void 0);
2235
+ }
2236
+ var h, v, g = !1;
2237
+ if (i ? [h, g] = function(e) {
2238
+ var t = _e;
2239
+ try {
2240
+ return _e = !1, [e(), _e];
2241
+ } finally {
2242
+ _e = t;
2243
+ }
2244
+ }(() => e[t]) : h = e[t], void 0 === h && void 0 !== r && (h = f(), d && (o && function() {
2245
+ throw new Error("https://svelte.dev/e/props_invalid_value");
2246
+ }(), d(h))), v = o ? () => {
2247
+ var n = e[t];
2248
+ return void 0 === n ? f() : (l = !0, n);
2249
+ } : () => {
2250
+ var n = e[t];
2251
+ return void 0 !== n && (a = void 0), void 0 === n ? a : n;
2252
+ }, o && !(4 & n)) return v;
2253
+ if (d) {
2254
+ var m = e.$$legacy;
2255
+ return function(e, t) {
2256
+ return arguments.length > 0 ? (o && t && !m && !g || d(t ? v() : e), e) : v();
2257
+ };
2258
+ }
2259
+ var _ = !1, b = (1 & n ? Ee : Ne)(() => (_ = !1, v()));
2260
+ i && En(b);
2261
+ var y = on;
2262
+ return function(e, t) {
2263
+ if (arguments.length > 0) {
2264
+ const n = t ? En(b) : o && i ? ut(e) : e;
2265
+ return ot(b, n), _ = !0, void 0 !== a && (a = n), e;
2266
+ }
2267
+ return Qt && _ || 16384 & y.f ? b.v : En(b);
2268
+ };
2269
+ }
2270
+ var [Wr, Yr] = function() {
2271
+ const e = {};
2272
+ return [() => (function(e) {
2273
+ return se("hasContext").has(e);
2274
+ }(e) || function() {
2275
+ throw new Error("https://svelte.dev/e/missing_context");
2276
+ }(), function(e) {
2277
+ return se("getContext").get(e);
2278
+ }(e)), (t) => function(e, t) {
2279
+ return se("setContext").set(e, t), t;
2280
+ }(e, t)];
2281
+ }(), Zr = function(e) {
2282
+ return e.ON_BORDA_DESTROY = "borda:on-destroy", e.ON_CLOSE_CLICK = "close:click", e.ON_OVERLAY_CLICK = "overlay:click", e.ON_TOUR_START = "tour:start", e.ON_TOUR_FINISH = "tour:finish", e.ON_TOUR_CLOSE = "tour:close", e.ON_TOUR_NEXT = "tour:next", e.ON_TOUR_PREV = "tour:prev", e.ON_KEYBOARD_NEXT = "keyboard:next", e.ON_KEYBOARD_PREV = "keyboard:prev", e.ON_TOUR_STEP_CHANGE = "tour:step-change", e.ON_SKIP_CHANGE = "skip:change", e.ON_SKIP_CLEAR = "skip:clear", e.ON_VISIBILITY_SHOW = "visibility:show", e.ON_VISIBILITY_HIDE = "visibility:hide", e;
2283
+ }({});
2284
+ function Jr() {
2285
+ const e = /* @__PURE__ */ new Map();
2286
+ function t(t, n) {
2287
+ e.has(t) || e.set(t, /* @__PURE__ */ new Set()), e.get(t)?.add(n);
2288
+ }
2289
+ function n(t, n) {
2290
+ const r = e.get(t);
2291
+ r && r.delete(n);
2292
+ }
2293
+ return {
2294
+ on: t,
2295
+ once: function(e, r) {
2296
+ const o = (t) => {
2297
+ n(e, o), r(t);
2298
+ };
2299
+ t(e, o);
2300
+ },
2301
+ off: n,
2302
+ emit: function(t, n) {
2303
+ const r = e.get(t);
2304
+ r && r.forEach((e) => e(n));
2305
+ },
2306
+ remove: function(t) {
2307
+ e.get(t)?.clear();
2308
+ },
2309
+ clear: function() {
2310
+ e.clear();
2311
+ }
2312
+ };
2313
+ }
2314
+ function Qr({ getIsHidden: e, getIsAnimated: t, classNames: n }) {
2315
+ let r = nt(!1), o = nt(!1);
2316
+ const i = Ce(t), s = Ce(e), a = Ce(() => En(i) && !En(s) && En(o)), l = Ce(() => En(i) && En(s) && En(r)), u = Ce(function() {
2317
+ return [
2318
+ En(s) && !En(l) && n.hidden,
2319
+ En(a) && n.in,
2320
+ En(l) && n.out
2321
+ ];
2322
+ });
2323
+ var c;
2324
+ return c = () => {
2325
+ En(s) ? ot(o, !0) : ot(r, !0);
2326
+ }, At(), Pt(1048584, c), {
2327
+ get isHidden() {
2328
+ return En(s);
2329
+ },
2330
+ get hasShownAnimation() {
2331
+ return En(a);
2332
+ },
2333
+ get hasHiddenAnimation() {
2334
+ return En(l);
2335
+ },
2336
+ get classes() {
2337
+ return En(u);
2338
+ }
2339
+ };
2340
+ }
2341
+ var eo = [
2342
+ "a[href]",
2343
+ "button",
2344
+ "input",
2345
+ "select",
2346
+ "textarea",
2347
+ "[tabindex]"
2348
+ ].join(",");
2349
+ function to({ getContainer: e }) {
2350
+ let t = null;
2351
+ function n(e) {
2352
+ return Array.from(e.querySelectorAll(eo)).filter((e) => !e.hasAttribute("disabled") && -1 !== e.tabIndex && function(e) {
2353
+ return e.offsetWidth > 0 || e.offsetHeight > 0 || e.getClientRects().length > 0;
2354
+ }(e));
2355
+ }
2356
+ let r = !1;
2357
+ function o(t) {
2358
+ if ("Tab" !== t.key) return;
2359
+ const r = e();
2360
+ if (!r) return;
2361
+ const o = n(r);
2362
+ if (0 === o.length) return t.preventDefault(), void r.focus({ preventScroll: !0 });
2363
+ (function(e, t) {
2364
+ const n = t[0], r = e.shiftKey && document.activeElement === n, o = t[t.length - 1], i = !e.shiftKey && document.activeElement === o;
2365
+ r && (e.preventDefault(), o.focus({ preventScroll: !0 })), i && (e.preventDefault(), n.focus({ preventScroll: !0 }));
2366
+ })(t, o);
2367
+ }
2368
+ function i(t) {
2369
+ if (r) return;
2370
+ const o = e();
2371
+ if (!o) return;
2372
+ const i = t.target;
2373
+ i && o.contains(i) || function(e) {
2374
+ const t = n(e);
2375
+ r = !0, (t[0] ?? e)?.focus({ preventScroll: !0 }), r = !1;
2376
+ }(o);
2377
+ }
2378
+ Lt(() => {
2379
+ const n = e();
2380
+ if (!n) return;
2381
+ t = document.activeElement;
2382
+ const r = n.hasAttribute("tabindex");
2383
+ return r || (n.tabIndex = -1), n.focus({ preventScroll: !0 }), document.addEventListener("keydown", o, !0), document.addEventListener("focusin", i, !0), () => {
2384
+ document.removeEventListener("keydown", o, !0), document.removeEventListener("focusin", i, !0), r || n.removeAttribute("tabindex"), t?.focus({ preventScroll: !0 }), t = null;
2385
+ };
2386
+ });
2387
+ }
2388
+ function no({ getTrigger: e, getDuration: t }) {
2389
+ let n = nt(!1), r = null, o = !1;
2390
+ function i() {
2391
+ var e;
2392
+ null !== r && (clearTimeout(r), r = null), ot(n, !0), e = t(), r = setTimeout(() => {
2393
+ ot(n, !1), r = null;
2394
+ }, e);
2395
+ }
2396
+ return Lt(() => {
2397
+ e(), o ? i() : o = !0;
2398
+ }), { get isActive() {
2399
+ return En(n);
2400
+ } };
2401
+ }
2402
+ var ro = (e) => {
2403
+ if (e) return "string" == typeof e ? e : Object.entries(e).map(([e, t]) => {
2404
+ return `${n = e, n.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`)}: ${t}`;
2405
+ var n;
2406
+ }).join("; ") + ";";
2407
+ }, oo = (e) => e?.getElements() ?? null, io = function(e) {
2408
+ return e.XS = "xs", e.SM = "sm", e.MD = "md", e.LG = "lg", e.XL = "xl", e.XXL = "xxl", e;
2409
+ }({}), so = function(e) {
2410
+ return e.TOP_START = "top-start", e.TOP_CENTER = "top-center", e.TOP_END = "top-end", e.MIDDLE_START = "middle-start", e.MIDDLE_CENTER = "middle-center", e.MIDDLE_END = "middle-end", e.BOTTOM_START = "bottom-start", e.BOTTOM_CENTER = "bottom-center", e.BOTTOM_END = "bottom-end", e;
2411
+ }({}), ao = function(e) {
2412
+ return e.CIRCLE = "circle", e.LANDSCAPE = "landscape", e.PORTRAIT = "portrait", e.SQUARE = "square", e;
2413
+ }({}), lo = function(e) {
2414
+ return e.MIXED = "mixed", e;
2415
+ }({}), uo = function(e) {
2416
+ return e.MENU = "menu", e.TREE = "tree", e.GRID = "grid", e.DIALOG = "dialog", e.LISTBOX = "listbox", e;
2417
+ }({}), co = function(e) {
2418
+ return e.NONE = "none", e.FADE = "fade", e.SCALE = "scale", e.SLIDE = "slide", e;
2419
+ }({}), fo = function(e) {
2420
+ return e.RESPONSIVE = "responsive", e.STEP = "step", e;
2421
+ }({}), po = new Set(Object.values(so)), ho = "undefined" != typeof window && "undefined" != typeof document, vo = class extends Error {
2422
+ name = "BordaError";
2423
+ constructor(e) {
2424
+ super(e);
2425
+ }
2426
+ };
2427
+ var go = (e) => {
2428
+ if ("object" != typeof e || null === e || Array.isArray(e)) return !1;
2429
+ const t = Object.getPrototypeOf(e);
2430
+ return t === Object.prototype || null === t;
2431
+ }, mo = (e) => {
2432
+ if (e instanceof Date) return new Date(e.getTime());
2433
+ if (e instanceof RegExp) return new RegExp(e.source, e.flags);
2434
+ if (e instanceof Map) return new Map([...e].map(([e, t]) => [mo(e), mo(t)]));
2435
+ if (e instanceof Set) return new Set([...e].map(mo));
2436
+ if (!go(e)) return e;
2437
+ const t = {};
2438
+ for (const n of Object.keys(e)) {
2439
+ const r = e[n];
2440
+ Array.isArray(r) ? t[n] = r.map((e) => mo(e)) : t[n] = mo(r);
2441
+ }
2442
+ return t;
2443
+ };
2444
+ function _o(e, t) {
2445
+ if (null == t) return e;
2446
+ if (null == e) return t;
2447
+ const n = { ...e };
2448
+ for (const r of Object.keys(t)) {
2449
+ const o = t[r], i = e[r];
2450
+ go(o) && go(i) ? n[r] = _o(i, o) : n[r] = o;
2451
+ }
2452
+ return n;
2453
+ }
2454
+ var bo = Bn("<div><!></div>");
2455
+ function yo() {
2456
+ let e = nt(ut(ho ? window.scrollX : 0)), t = nt(ut(ho ? window.scrollY : 0));
2457
+ return Lt(() => {
2458
+ if (!ho) return;
2459
+ let n = null;
2460
+ function r() {
2461
+ null === n && (n = window.requestAnimationFrame(() => {
2462
+ n = null, ot(e, window.scrollX, !0), ot(t, window.scrollY, !0);
2463
+ }));
2464
+ }
2465
+ return window.addEventListener("scroll", r, { passive: !0 }), () => {
2466
+ null !== n && window.cancelAnimationFrame(n), window.removeEventListener("scroll", r);
2467
+ };
2468
+ }), {
2469
+ get x() {
2470
+ return En(e);
2471
+ },
2472
+ get y() {
2473
+ return En(t);
2474
+ }
2475
+ };
2476
+ }
2477
+ function To() {
2478
+ let e = nt(ut(ho ? window.innerWidth : 0)), t = nt(ut(ho ? window.innerHeight : 0));
2479
+ function n() {
2480
+ ot(e, window.innerWidth, !0), ot(t, window.innerHeight, !0);
2481
+ }
2482
+ return Lt(() => {
2483
+ if (!ho) return;
2484
+ const e = new ResizeObserver(n);
2485
+ return e.observe(document.documentElement), () => e.disconnect();
2486
+ }), {
2487
+ get width() {
2488
+ return En(e);
2489
+ },
2490
+ get height() {
2491
+ return En(t);
2492
+ }
2493
+ };
2494
+ }
2495
+ function wo({ getTargetElement: e, getBorderRadius: t, getPadding: n, getIsAnimated: r }) {
2496
+ let o = nt(0), i = nt(0), s = nt(0), a = nt(0), l = nt(0), u = nt(0), c = nt(!1), f = !1, d = null, p = null;
2497
+ const h = To(), v = yo();
2498
+ function g() {
2499
+ ot(o, window.innerWidth, !0), ot(i, window.innerHeight, !0), function() {
2500
+ const t = e();
2501
+ if (!t) return;
2502
+ const r = n(), o = t.getBoundingClientRect();
2503
+ ot(s, o.left - r), ot(a, o.top - r), ot(l, o.width + 2 * r), ot(u, o.height + 2 * r);
2504
+ }();
2505
+ }
2506
+ Lt(() => {
2507
+ const t = e();
2508
+ f && t !== d && r() && (null !== p && window.clearTimeout(p), ot(c, !0), p = window.setTimeout(() => {
2509
+ ot(c, !1), p = null;
2510
+ }, 350)), g(), f = !0, d = t;
2511
+ const n = t ? new ResizeObserver(g) : null;
2512
+ return t && n?.observe(t), () => {
2513
+ n?.disconnect();
2514
+ };
2515
+ }), Lt(() => {
2516
+ h.width, h.height, v.x, v.y, g();
2517
+ });
2518
+ const m = Ce(() => e() ? `M 0 0 H ${En(o)} V ${En(i)} H 0 Z ${function(e, t, n, r, o) {
2519
+ const i = Math.min(o, n / 2, r / 2);
2520
+ return [
2521
+ `M ${e + i} ${t}`,
2522
+ "H " + (e + n - i),
2523
+ `A ${i} ${i} 0 0 1 ${e + n} ${t + i}`,
2524
+ "V " + (t + r - i),
2525
+ `A ${i} ${i} 0 0 1 ${e + n - i} ${t + r}`,
2526
+ `H ${e + i}`,
2527
+ `A ${i} ${i} 0 0 1 ${e} ${t + r - i}`,
2528
+ `V ${t + i}`,
2529
+ `A ${i} ${i} 0 0 1 ${e + i} ${t}`,
2530
+ "Z"
2531
+ ].join(" ");
2532
+ }(En(s), En(a), En(l), En(u), t())}` : `M 0 0 H ${En(o)} V ${En(i)} H 0 Z`);
2533
+ return {
2534
+ get backdropPath() {
2535
+ return En(m);
2536
+ },
2537
+ get isTransitioning() {
2538
+ return En(c);
2539
+ },
2540
+ get width() {
2541
+ return En(o);
2542
+ },
2543
+ get height() {
2544
+ return En(i);
2545
+ }
2546
+ };
2547
+ }
2548
+ var Eo = Hn("<svg xmlns=\"http://www.w3.org/2000/svg\" preserveAspectRatio=\"none\" role=\"button\" tabindex=\"0\"><path fill-rule=\"evenodd\"></path></svg>");
2549
+ var So = function(e) {
2550
+ return e.DURING_SCROLL = "during-scroll", e.AFTER_SCROLL = "after-scroll", e;
2551
+ }({}), Oo = function(e) {
2552
+ return e.FADE = "fade", e.GLIDE = "glide", e;
2553
+ }({}), Co = {
2554
+ enter: co.FADE,
2555
+ exit: co.FADE,
2556
+ enterDuration: 200,
2557
+ exitDuration: 150,
2558
+ easing: "ease-out",
2559
+ appearance: So.AFTER_SCROLL,
2560
+ transition: Oo.FADE
2561
+ }, No = {
2562
+ transitionDuration: 350,
2563
+ easing: "ease-in-out"
2564
+ };
2565
+ function ko(e) {
2566
+ const t = Ce(() => e.getConfig().animation), n = Ce(() => En(t) ? En(t) : {}), r = Ce(() => !1 !== En(t) && !1 !== En(n).isEnabled), o = Ce(() => ({
2567
+ ...Co,
2568
+ ...En(n).tooltip ?? {}
2569
+ })), i = Ce(() => ({
2570
+ ...No,
2571
+ ...En(n).overlay ?? {}
2572
+ }));
2573
+ return {
2574
+ apply: function() {
2575
+ !1 !== En(t) && e.mergeConfig({ animation: {
2576
+ isEnabled: En(n).isEnabled ?? !0,
2577
+ tooltip: En(o),
2578
+ overlay: En(i)
2579
+ } });
2580
+ },
2581
+ get api() {
2582
+ return {
2583
+ get isEnabled() {
2584
+ return En(r);
2585
+ },
2586
+ get tooltip() {
2587
+ return En(o);
2588
+ },
2589
+ get overlay() {
2590
+ return En(i);
2591
+ }
2592
+ };
2593
+ }
2594
+ };
2595
+ }
2596
+ function Ao(e) {
2597
+ if (!e) return null;
2598
+ if (e instanceof HTMLElement) return e;
2599
+ if ("string" == typeof e) return document.querySelector(e);
2600
+ const t = function(e) {
2601
+ const t = [];
2602
+ if (e.id && t.push(`#${CSS.escape(e.id)}`), e.class && t.push(`.${CSS.escape(e.class)}`), e.data) {
2603
+ const { name: n, value: r } = e.data;
2604
+ void 0 === r ? t.push(`[data-${n}]`) : t.push(`[data-${n}="${CSS.escape(r)}"]`);
2605
+ }
2606
+ return t.join("");
2607
+ }(e);
2608
+ return t ? document.querySelector(t) : null;
2609
+ }
2610
+ function Po(e, t) {
2611
+ let n = nt(0), r = nt(!1), o = null, i = null;
2612
+ const s = Ce(() => e.current.steps ?? []), a = Ce(() => En(s).length), l = Ce(() => En(s)[En(n)]), u = Ce(() => En(n) + 1), c = Ce(() => Ao(En(l)?.target)), f = Ce(() => En(n) >= En(a) - 1), d = Ce(() => En(a) > 0), p = Ce(() => !En(f)), h = Ce(() => En(n) > 0), v = Ce(() => e.getConfig().tour);
2613
+ async function g(e) {
2614
+ if (e < 0 || e >= En(a)) return;
2615
+ const r = En(s)[En(n)], o = En(s)[e];
2616
+ r?.onDeselected?.(), await o?.prepareElement?.(), o?.onBeforeHighlighted?.(), ot(n, e, !0), o?.onHighlighted?.(), t.emit(Zr.ON_TOUR_STEP_CHANGE, En(u));
2617
+ }
2618
+ function m() {
2619
+ return new Promise((e, t) => {
2620
+ o = e, i = t;
2621
+ });
2622
+ }
2623
+ function _() {
2624
+ t.emit(Zr.ON_TOUR_FINISH);
2625
+ }
2626
+ return {
2627
+ apply: function() {
2628
+ ot(n, En(v)?.startStep ?? 0, !0), En(v)?.onStart?.(), t.emit(Zr.ON_TOUR_START);
2629
+ },
2630
+ api: {
2631
+ get isActivated() {
2632
+ return En(d);
2633
+ },
2634
+ get hasNextStep() {
2635
+ return En(p);
2636
+ },
2637
+ get hasPrevStep() {
2638
+ return En(h);
2639
+ },
2640
+ get currentStep() {
2641
+ return En(u);
2642
+ },
2643
+ get currentStepIndex() {
2644
+ return En(n);
2645
+ },
2646
+ get totalSteps() {
2647
+ return En(a);
2648
+ },
2649
+ get currentTarget() {
2650
+ return En(c);
2651
+ },
2652
+ get step() {
2653
+ return En(l);
2654
+ },
2655
+ get isMovePrevented() {
2656
+ return En(r);
2657
+ },
2658
+ preventMove: function() {
2659
+ ot(r, !0);
2660
+ },
2661
+ continue: function() {
2662
+ ot(r, !1), o?.(), o = null, i = null;
2663
+ },
2664
+ clearMovePrevented: function() {
2665
+ ot(r, !1), i?.(), o = null, i = null;
2666
+ },
2667
+ changeStep: g,
2668
+ prev: async function() {
2669
+ if (En(h)) {
2670
+ if (En(l)?.onPrev?.(), En(v)?.onPrev?.(), t.emit(Zr.ON_TOUR_PREV), En(r)) try {
2671
+ await m();
2672
+ } catch {
2673
+ return;
2674
+ }
2675
+ await g(En(n) - 1);
2676
+ }
2677
+ },
2678
+ next: async function() {
2679
+ if (En(f)) _();
2680
+ else {
2681
+ if (En(l)?.onNext?.(), En(v)?.onNext?.(), t.emit(Zr.ON_TOUR_NEXT), En(r)) try {
2682
+ await m();
2683
+ } catch {
2684
+ return;
2685
+ }
2686
+ await g(En(n) + 1);
2687
+ }
2688
+ },
2689
+ finish: _
2690
+ }
2691
+ };
2692
+ }
2693
+ function xo(e) {
2694
+ return { highlight: function(t, n, r) {
2695
+ return e({
2696
+ ...n,
2697
+ steps: [t]
2698
+ }, r);
2699
+ } };
2700
+ }
2701
+ var Do = new Set([
2702
+ "INPUT",
2703
+ "TEXTAREA",
2704
+ "SELECT"
2705
+ ]);
2706
+ function Lo(e, t) {
2707
+ const n = Ce(() => e.getConfig().tour);
2708
+ function r(e) {
2709
+ if (!Do.has(e.target?.tagName)) switch (e.key) {
2710
+ case "ArrowRight":
2711
+ e.preventDefault(), t.emit(Zr.ON_KEYBOARD_NEXT);
2712
+ break;
2713
+ case "ArrowLeft":
2714
+ e.preventDefault(), t.emit(Zr.ON_KEYBOARD_PREV);
2715
+ break;
2716
+ case "Escape": t.emit(Zr.ON_TOUR_CLOSE);
2717
+ }
2718
+ }
2719
+ return {
2720
+ apply: function() {
2721
+ !1 !== En(n)?.hasKeyboardControl && document.addEventListener("keydown", r);
2722
+ },
2723
+ destroy: function() {
2724
+ document.removeEventListener("keydown", r);
2725
+ }
2726
+ };
2727
+ }
2728
+ var Ro = [fo.RESPONSIVE, fo.STEP];
2729
+ function Mo(e) {
2730
+ const t = ut({});
2731
+ function n(e, n) {
2732
+ null === n ? delete t[e] : t[e] = n;
2733
+ }
2734
+ function r() {
2735
+ let n = e.current;
2736
+ for (const e of Ro) {
2737
+ const r = t[e];
2738
+ r && (n = _o(n, r()));
2739
+ }
2740
+ return n;
2741
+ }
2742
+ const o = Ce(r);
2743
+ return {
2744
+ get resolved() {
2745
+ return En(o);
2746
+ },
2747
+ resolve: r,
2748
+ set: n,
2749
+ applyStep: function(e) {
2750
+ if (!e) return void n(fo.STEP, null);
2751
+ const { tourOverlay: t, tourTooltip: r, tourImage: o, tourButtons: i, tourProgress: s, closeButton: a, tourSkip: l } = e, u = [
2752
+ t,
2753
+ r,
2754
+ o,
2755
+ i,
2756
+ s,
2757
+ a,
2758
+ l
2759
+ ].some((e) => void 0 !== e);
2760
+ n(fo.STEP, u ? () => ({
2761
+ tourOverlay: t,
2762
+ tourTooltip: r,
2763
+ tourImage: o,
2764
+ tourButtons: i,
2765
+ tourProgress: s,
2766
+ closeButton: a,
2767
+ tourSkip: l
2768
+ }) : null);
2769
+ }
2770
+ };
2771
+ }
2772
+ function Io(e, t) {
2773
+ let n = nt(null), r = [];
2774
+ function o(e, r) {
2775
+ const o = function(e, t) {
2776
+ for (const n of t) if (e <= n) return n;
2777
+ return null;
2778
+ }(window.innerWidth, e);
2779
+ o !== En(n) && (ot(n, o, !0), null !== o ? t.set(fo.RESPONSIVE, () => r[o]) : t.set(fo.RESPONSIVE, null));
2780
+ }
2781
+ return {
2782
+ apply: function() {
2783
+ const t = e.getConfig().responsive;
2784
+ if (!t) return;
2785
+ const n = Object.keys(t).map(Number).sort((e, t) => e - t);
2786
+ if (0 !== n.length && ho) {
2787
+ for (const e of n) {
2788
+ const i = window.matchMedia(`(max-width: ${e}px)`), s = () => o(n, t);
2789
+ i.addEventListener("change", s), r.push(() => {
2790
+ i.removeEventListener("change", s);
2791
+ });
2792
+ }
2793
+ o(n, t);
2794
+ }
2795
+ },
2796
+ destroy: function() {
2797
+ ot(n, null);
2798
+ for (const e of r) e();
2799
+ r = [], t.set(fo.RESPONSIVE, null);
2800
+ },
2801
+ get api() {
2802
+ return { get activeBreakpoint() {
2803
+ return En(n);
2804
+ } };
2805
+ }
2806
+ };
2807
+ }
2808
+ var Bo = function(e) {
2809
+ return e.LINEAR = "linear", e.EASE = "ease", e.EASE_IN = "ease-in", e.EASE_OUT = "ease-out", e.EASE_IN_OUT = "ease-in-out", e;
2810
+ }({}), $o = {
2811
+ [Bo.LINEAR]: (e) => e,
2812
+ [Bo.EASE]: (e) => e * e * (3 - 2 * e),
2813
+ [Bo.EASE_IN]: (e) => e * e,
2814
+ [Bo.EASE_OUT]: (e) => 1 - (1 - e) * (1 - e),
2815
+ [Bo.EASE_IN_OUT]: (e) => e < .5 ? 2 * e * e : 1 - Math.pow(-2 * e + 2, 2) / 2
2816
+ }, Ho = Bo.EASE_IN_OUT;
2817
+ function jo({ getEasing: e }) {
2818
+ const t = Ce(e), n = Ce(() => function(e) {
2819
+ return "function" == typeof e ? e : e ? $o[e] : $o[Ho];
2820
+ }(En(t)));
2821
+ return { get easingFunction() {
2822
+ return En(n);
2823
+ } };
2824
+ }
2825
+ var Fo = {
2826
+ block: "center",
2827
+ inline: "nearest",
2828
+ duration: 400,
2829
+ easing: Bo.EASE_IN_OUT,
2830
+ offset: {
2831
+ x: 0,
2832
+ y: 0
2833
+ },
2834
+ isLocked: !0
2835
+ };
2836
+ function zo(e) {
2837
+ let t = nt(!1), n = null;
2838
+ const r = Ce(() => e.getConfig().scroll), o = Ce(() => !1 !== En(r)), i = Ce(() => En(r) || {}), s = Ce(() => {
2839
+ return e = En(i), {
2840
+ ...Fo,
2841
+ ...e,
2842
+ offset: {
2843
+ ...Fo.offset,
2844
+ ...e.offset ?? {}
2845
+ }
2846
+ };
2847
+ var e;
2848
+ }), a = jo({ getEasing: () => En(s).easing }), l = Ce(() => e.getConfig().animation), u = Ce(() => !1 !== En(l) && !1 !== En(l)?.isEnabled), c = Ce(() => En(u) ? En(s).duration : 0), f = { resolve: function(e, t, n, r, o) {
2849
+ return e + function(e, t, n, r) {
2850
+ const o = t + n;
2851
+ switch (r) {
2852
+ case "start": return t;
2853
+ case "end": return o - e;
2854
+ case "center": return t + n / 2 - e / 2;
2855
+ default: return t >= 0 && o <= e ? 0 : t < 0 ? t : o - e;
2856
+ }
2857
+ }(t, n, r, o);
2858
+ } }, d = { isFullyVisible: function(e) {
2859
+ if (!ho) return !1;
2860
+ const t = e.getBoundingClientRect();
2861
+ return t.top >= 0 && t.bottom <= window.innerHeight && t.left >= 0 && t.right <= window.innerWidth;
2862
+ } }, p = Ce(() => En(o) && En(s).isLocked);
2863
+ function h() {
2864
+ n?.cancel(), n = null;
2865
+ }
2866
+ function v(e) {
2867
+ e.preventDefault();
2868
+ }
2869
+ return {
2870
+ apply: function() {
2871
+ En(o) && (e.mergeConfig({ scroll: En(s) }), En(p) && ho && (window.addEventListener("wheel", v, { passive: !1 }), window.addEventListener("touchmove", v, { passive: !1 })));
2872
+ },
2873
+ destroy: function() {
2874
+ ho && (window.removeEventListener("wheel", v), window.removeEventListener("touchmove", v));
2875
+ },
2876
+ api: {
2877
+ get isScrolling() {
2878
+ return En(t);
2879
+ },
2880
+ get isLocked() {
2881
+ return En(p);
2882
+ },
2883
+ scrollTo: async function(e) {
2884
+ if (!ho || !En(o) || !e) return;
2885
+ if (d.isFullyVisible(e)) return h(), void ot(t, !1);
2886
+ const { targetX: r, targetY: i } = function(e) {
2887
+ const t = e.getBoundingClientRect();
2888
+ return {
2889
+ targetX: f.resolve(window.scrollX, window.innerWidth, t.left, t.width, En(s).inline) + (En(s).offset.x ?? 0),
2890
+ targetY: f.resolve(window.scrollY, window.innerHeight, t.top, t.height, En(s).block) + (En(s).offset.y ?? 0)
2891
+ };
2892
+ }(e);
2893
+ h(), ot(t, !0), await function(e, t) {
2894
+ return new Promise((r) => {
2895
+ const o = window.scrollX, i = window.scrollY, s = e - o, l = t - i;
2896
+ if (0 === s && 0 === l) return void r();
2897
+ if (En(c) <= 0) return window.scrollTo(e, t), void r();
2898
+ const u = a.easingFunction, f = performance.now();
2899
+ let d = null, p = !1;
2900
+ n = { cancel() {
2901
+ p = !0, null !== d && window.cancelAnimationFrame(d), r();
2902
+ } };
2903
+ const h = (e) => {
2904
+ if (p) return;
2905
+ const t = Math.min((e - f) / En(c), 1), a = u(t);
2906
+ window.scrollTo(o + s * a, i + l * a), t < 1 ? d = window.requestAnimationFrame(h) : (d = null, n = null, r());
2907
+ };
2908
+ d = window.requestAnimationFrame(h);
2909
+ });
2910
+ }(r, i), ot(t, !1);
2911
+ }
2912
+ }
2913
+ };
2914
+ }
2915
+ function Uo(e, t) {
2916
+ let n = nt(!1);
2917
+ const r = Ce(() => e.getConfig().skip), o = Ce(() => !1 === En(r)), i = Ce(() => "object" == typeof En(r) && En(r)?.storageKey ? En(r).storageKey : "borda-tour-skipped");
2918
+ function s(e, t) {
2919
+ try {
2920
+ t ? globalThis.localStorage?.setItem(e, "true") : globalThis.localStorage?.removeItem(e);
2921
+ } catch (e) {
2922
+ if (!(e instanceof DOMException)) throw e;
2923
+ }
2924
+ }
2925
+ function a(e) {
2926
+ En(o) || (ot(n, e, !0), s(En(i), En(n)), t.emit(Zr.ON_SKIP_CHANGE, e));
2927
+ }
2928
+ function l() {
2929
+ ot(n, !1), s(En(i), En(n)), t.emit(Zr.ON_SKIP_CLEAR);
2930
+ }
2931
+ return {
2932
+ apply: function() {
2933
+ En(o) || ot(n, function(e) {
2934
+ try {
2935
+ return "true" === globalThis.localStorage?.getItem(e);
2936
+ } catch (e) {
2937
+ if (e instanceof DOMException && "SecurityError" === e.name) return !1;
2938
+ throw e;
2939
+ }
2940
+ }(En(i)), !0);
2941
+ },
2942
+ get api() {
2943
+ return {
2944
+ get isSkipped() {
2945
+ return En(n);
2946
+ },
2947
+ get storageKey() {
2948
+ return En(i);
2949
+ },
2950
+ set: a,
2951
+ clear: l
2952
+ };
2953
+ }
2954
+ };
2955
+ }
2956
+ function Vo(e, t) {
2957
+ function n() {
2958
+ e.mergeConfig({ visibility: { isHidden: !1 } }), t.emit(Zr.ON_VISIBILITY_SHOW);
2959
+ }
2960
+ function r() {
2961
+ e.mergeConfig({ visibility: { isHidden: !0 } }), t.emit(Zr.ON_VISIBILITY_HIDE);
2962
+ }
2963
+ return {
2964
+ apply: function() {
2965
+ const t = e.getConfig().visibility, n = t?.isAnimated ?? !0, r = t?.isHidden ?? !1;
2966
+ e.mergeConfig({ visibility: {
2967
+ isAnimated: n,
2968
+ isHidden: r
2969
+ } });
2970
+ },
2971
+ get api() {
2972
+ return {
2973
+ get isHidden() {
2974
+ return !!e.getConfig().visibility?.isHidden;
2975
+ },
2976
+ show: n,
2977
+ hide: r
2978
+ };
2979
+ }
2980
+ };
2981
+ }
2982
+ ee = !0;
2983
+ var qo = Hn("<path d=\"M4.45416 4.45404L11.3625 11.3624Z\" fill=\"currentColor\"></path><path d=\"M4.45416 11.3624L11.3625 4.45404Z\" fill=\"currentColor\"></path><path d=\"M4.45416 4.45404L11.3625 11.3624M4.45416 11.3624L11.3625 4.45404\" stroke=\"currentColor\" stroke-width=\"1.25\" stroke-linecap=\"round\" stroke-linejoin=\"bevel\"></path>", 1);
2984
+ var Ko = function(e) {
2985
+ return e.RECTANGLE = "rectangle", e.CIRCLE = "circle", e.SQUARE = "square", e;
2986
+ }({}), Go = function(e) {
2987
+ return e.FILLED = "filled", e.OUTLINED = "outlined", e.GHOST = "ghost", e.TEXT = "text", e;
2988
+ }({}), Xo = function(e) {
2989
+ return e.BUTTON = "button", e.SUBMIT = "submit", e.RESET = "reset", e;
2990
+ }({}), Wo = new Set([
2991
+ "$$slots",
2992
+ "$$events",
2993
+ "$$legacy",
2994
+ "id",
2995
+ "disabled",
2996
+ "autosize",
2997
+ "size",
2998
+ "shape",
2999
+ "variant",
3000
+ "type",
3001
+ "aria",
3002
+ "customClasses",
3003
+ "customStyles",
3004
+ "children"
3005
+ ]), Yo = Bn("<button><!></button>");
3006
+ function Zo(e, t) {
3007
+ re(t, !0);
3008
+ let n = Kr(t, "size", 19, () => io.MD), r = Kr(t, "shape", 19, () => Ko.RECTANGLE), o = Kr(t, "variant", 19, () => Go.FILLED), i = Kr(t, "type", 19, () => Xo.BUTTON), s = new Proxy({
3009
+ props: t,
3010
+ exclude: Wo
3011
+ }, Ur);
3012
+ const a = Ce(() => [
3013
+ "rb-button",
3014
+ `rb-button--${r()}`,
3015
+ `rb-button--${o()}`,
3016
+ t.autosize ? "rb-button--autosize" : `rb-button--${n()}`,
3017
+ t.customClasses?.root
3018
+ ]);
3019
+ let l = nt(null);
3020
+ const u = Ce(() => ro(t.customStyles?.root));
3021
+ var c = { getElements: function() {
3022
+ return { root: En(l) };
3023
+ } }, f = Yo();
3024
+ Br(f, () => ({
3025
+ id: t.id,
3026
+ type: i(),
3027
+ disabled: t.disabled,
3028
+ class: En(a),
3029
+ style: En(u),
3030
+ "aria-label": t.aria?.ariaLabel,
3031
+ "aria-labelledby": t.aria?.ariaLabelledby,
3032
+ "aria-describedby": t.aria?.ariaDescribedby,
3033
+ "aria-disabled": t.aria?.ariaDisabled,
3034
+ "aria-expanded": t.aria?.ariaExpanded,
3035
+ "aria-controls": t.aria?.ariaControls,
3036
+ "aria-haspopup": t.aria?.ariaHaspopup,
3037
+ "aria-pressed": t.aria?.ariaPressed,
3038
+ ...s
3039
+ }));
3040
+ var d = yt(f), p = (e) => {
3041
+ var n = Fn();
3042
+ ir(Tt(n), () => t.children), zn(e, n);
3043
+ };
3044
+ return ar(d, (e) => {
3045
+ t.children && e(p);
3046
+ }), X(f), zr(f, (e) => ot(l, e), () => En(l)), zn(e, f), oe(c);
3047
+ }
3048
+ var Jo = Hn("<svg fill=\"none\" focusable=\"false\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\"><!></svg>");
3049
+ var Qo = Bn("<div><!></div>");
3050
+ function ei(e, t) {
3051
+ re(t, !0);
3052
+ let n = Kr(t, "size", 19, () => io.MD), r = Kr(t, "shape", 19, () => ao.CIRCLE), o = Kr(t, "aria", 19, () => ({ ariaLabel: "Close" }));
3053
+ const { eventEmitter: i, close: s } = Wr();
3054
+ let a = nt(null), l = nt(null), u = nt(null);
3055
+ const c = Ce(() => [
3056
+ "rb-close-button",
3057
+ `rb-close-button--${n()}`,
3058
+ `rb-close-button--${r()}`,
3059
+ t.customClasses?.root
3060
+ ]), f = Ce(() => ro(t.customStyles?.root));
3061
+ function d(e) {
3062
+ i.emit(Zr.ON_CLOSE_CLICK, e), t.onClose ? t.onClose(e) : s();
3063
+ }
3064
+ var p = { getElements: function() {
3065
+ return {
3066
+ root: En(a),
3067
+ button: oo(En(l)),
3068
+ cross: oo(En(u))
3069
+ };
3070
+ } }, h = Qo(), v = yt(h), m = (e) => {
3071
+ var n = Fn();
3072
+ hr(Tt(n), () => t.customHtml.button), zn(e, n);
3073
+ }, _ = (e) => {
3074
+ {
3075
+ let r = Ce(() => ({ root: t.customClasses?.button })), i = Ce(() => ({ root: t.customStyles?.button }));
3076
+ zr(Zo(e, {
3077
+ get aria() {
3078
+ return o();
3079
+ },
3080
+ autosize: !0,
3081
+ get shape() {
3082
+ return Ko.CIRCLE;
3083
+ },
3084
+ get variant() {
3085
+ return Go.FILLED;
3086
+ },
3087
+ get customClasses() {
3088
+ return En(r);
3089
+ },
3090
+ get customStyles() {
3091
+ return En(i);
3092
+ },
3093
+ onclick: d,
3094
+ children: (e, r) => {
3095
+ {
3096
+ let r = Ce(() => ({ root: t.customClasses?.cross })), o = Ce(() => ({ root: t.customStyles?.cross }));
3097
+ zr(function(e, t) {
3098
+ re(t, !0);
3099
+ let n = Kr(t, "viewBox", 3, "0 0 16 16"), r = Kr(t, "size", 19, () => io.MD), o = nt(null);
3100
+ const i = Ce(() => [
3101
+ "rb-icon",
3102
+ `rb-icon--${r()}`,
3103
+ t.customClasses?.root
3104
+ ]), s = Ce(() => ro(t.customStyles?.root));
3105
+ var a = { getElements: function() {
3106
+ return { root: En(o) };
3107
+ } }, l = Jo();
3108
+ return ir(yt(l), () => t.children ?? g), X(l), zr(l, (e) => ot(o, e), () => En(o)), Bt(() => {
3109
+ Ir(l, "id", t.id), Tr(l, 0, mr(En(i))), Er(l, En(s)), Ir(l, "viewBox", n());
3110
+ }), zn(e, l), oe(a);
3111
+ }(e, {
3112
+ get size() {
3113
+ return n();
3114
+ },
3115
+ get customClasses() {
3116
+ return En(r);
3117
+ },
3118
+ get customStyles() {
3119
+ return En(o);
3120
+ },
3121
+ children: (e, t) => {
3122
+ (function(e) {
3123
+ var t = qo();
3124
+ W(2), zn(e, t);
3125
+ })(e);
3126
+ },
3127
+ $$slots: { default: !0 }
3128
+ }), (e) => ot(u, e, !0), () => En(u));
3129
+ }
3130
+ },
3131
+ $$slots: { default: !0 }
3132
+ }), (e) => ot(l, e, !0), () => En(l));
3133
+ }
3134
+ };
3135
+ return ar(v, (e) => {
3136
+ t.customHtml?.button ? e(m) : e(_, -1);
3137
+ }), X(h), zr(h, (e) => ot(a, e), () => En(a)), Bt(() => {
3138
+ Ir(h, "id", t.id), Tr(h, 1, mr(En(c))), Er(h, En(f));
3139
+ }), zn(e, h), oe(p);
3140
+ }
3141
+ var ti = {
3142
+ label: "Back",
3143
+ type: Xo.BUTTON,
3144
+ variant: Go.OUTLINED,
3145
+ shape: Ko.RECTANGLE
3146
+ }, ni = {
3147
+ label: "Next",
3148
+ type: Xo.BUTTON,
3149
+ variant: Go.FILLED,
3150
+ shape: Ko.RECTANGLE
3151
+ }, ri = {
3152
+ label: "Finish",
3153
+ type: Xo.BUTTON,
3154
+ variant: Go.FILLED,
3155
+ shape: Ko.RECTANGLE
3156
+ }, oi = {
3157
+ label: "Skip",
3158
+ type: Xo.BUTTON,
3159
+ variant: Go.TEXT,
3160
+ shape: Ko.RECTANGLE
3161
+ }, ii = Bn("<div><!> <div class=\"rb-tour-buttons__center\"><!></div> <!> <!></div>");
3162
+ var si = Bn("<img/>");
3163
+ var ai = function(e) {
3164
+ return e.DEFAULT = "default", e.BLEED = "bleed", e;
3165
+ }({});
3166
+ function li(e, t) {
3167
+ re(t, !0);
3168
+ let n = Kr(t, "src", 3, ""), r = Kr(t, "alt", 3, ""), o = Kr(t, "variant", 19, () => ai.DEFAULT), i = nt(null);
3169
+ const s = Ce(() => [
3170
+ "rb-tour-image",
3171
+ `rb-tour-image--${o()}`,
3172
+ t.customClasses?.root
3173
+ ]);
3174
+ var a = { getElements: function() {
3175
+ return { root: En(i)?.getElements()?.root ?? null };
3176
+ } };
3177
+ {
3178
+ let o = Ce(() => ({ root: En(s) }));
3179
+ zr(function(e, t) {
3180
+ re(t, !0);
3181
+ let n = Kr(t, "src", 3, ""), r = Kr(t, "alt", 3, ""), o = nt(null);
3182
+ const i = Ce(() => ["rb-image", t.customClasses?.root]), s = Ce(() => ro(t.customStyles?.root));
3183
+ var a = { getElements: function() {
3184
+ return { root: En(o) };
3185
+ } }, l = Fn(), u = Tt(l), c = (e) => {
3186
+ var n = Fn();
3187
+ hr(Tt(n), () => t.customHtml.root), zn(e, n);
3188
+ }, f = (e) => {
3189
+ var a = si();
3190
+ zr(a, (e) => ot(o, e), () => En(o)), Bt(() => {
3191
+ Ir(a, "id", t.id), Tr(a, 1, mr(En(i))), Er(a, En(s)), Ir(a, "src", n()), Ir(a, "alt", r()), Ir(a, "aria-label", t.aria?.ariaLabel), Ir(a, "aria-labelledby", t.aria?.ariaLabelledby), Ir(a, "aria-describedby", t.aria?.ariaDescribedby);
3192
+ }), zn(e, a);
3193
+ };
3194
+ return ar(u, (e) => {
3195
+ t.customHtml?.root ? e(c) : e(f, -1);
3196
+ }), zn(e, l), oe(a);
3197
+ }(e, {
3198
+ get id() {
3199
+ return t.id;
3200
+ },
3201
+ get src() {
3202
+ return n();
3203
+ },
3204
+ get alt() {
3205
+ return r();
3206
+ },
3207
+ get aria() {
3208
+ return t.aria;
3209
+ },
3210
+ get customClasses() {
3211
+ return En(o);
3212
+ },
3213
+ get customStyles() {
3214
+ return t.customStyles;
3215
+ },
3216
+ get customHtml() {
3217
+ return t.customHtml;
3218
+ }
3219
+ }), (e) => ot(i, e, !0), () => En(i));
3220
+ }
3221
+ return oe(a);
3222
+ }
3223
+ var ui = Bn("<div></div>"), ci = Bn("<div role=\"progressbar\"></div>");
3224
+ var fi = Bn("<div role=\"progressbar\"><div><div></div></div></div>");
3225
+ var di = Bn("<div role=\"progressbar\"><span> </span></div>");
3226
+ var pi = function(e) {
3227
+ return e.DOTS = "dots", e.TEXT = "text", e.LINE = "line", e;
3228
+ }({}), hi = Bn("<div><!></div>");
3229
+ function vi(e, t) {
3230
+ re(t, !0);
3231
+ let n = Kr(t, "currentStep", 3, 1), r = Kr(t, "totalSteps", 3, 1), o = Kr(t, "variant", 19, () => pi.DOTS), i = nt(null);
3232
+ const s = Ce(() => [
3233
+ "rb-tour-progress",
3234
+ `rb-tour-progress--${o()}`,
3235
+ t.customClasses?.root
3236
+ ]), a = Ce(() => ro(t.customStyles?.root));
3237
+ var l = { getElements: function() {
3238
+ return { root: En(i) };
3239
+ } }, u = hi(), c = yt(u), f = (e) => {
3240
+ var n = Fn();
3241
+ hr(Tt(n), () => t.customHtml.progress), zn(e, n);
3242
+ }, d = (e) => {
3243
+ (function(e, t) {
3244
+ re(t, !0);
3245
+ let n = Kr(t, "current", 3, 1), r = Kr(t, "total", 3, 1), o = Kr(t, "aria", 19, () => ({ ariaLabel: "Progress" }));
3246
+ const i = Ce(() => [
3247
+ "rb-progress",
3248
+ "rb-progress--dots",
3249
+ t.customClasses?.root
3250
+ ]), s = Ce(() => ro(t.customStyles?.root)), a = Ce(() => ["rb-progress__item", t.customClasses?.item]), l = Ce(() => ro(t.customStyles?.item));
3251
+ var u = ci();
3252
+ Ir(u, "aria-valuemin", 1), ur(u, 20, () => Array.from({ length: r() }, (e, t) => t), (e) => e, (e, t) => {
3253
+ var r = ui();
3254
+ Bt((e) => {
3255
+ Tr(r, 1, e), Er(r, En(l));
3256
+ }, [() => mr([...En(a), t + 1 === n() && "rb-progress__item--active"])]), zn(e, r);
3257
+ }), X(u), Bt(() => {
3258
+ Ir(u, "id", t.id), Tr(u, 1, mr(En(i))), Er(u, En(s)), Ir(u, "aria-label", o()?.ariaLabel), Ir(u, "aria-labelledby", o()?.ariaLabelledby), Ir(u, "aria-describedby", o()?.ariaDescribedby), Ir(u, "aria-controls", o()?.ariaControls), Ir(u, "aria-valuenow", n()), Ir(u, "aria-valuemax", r()), Ir(u, "aria-valuetext", `${n() ?? ""} / ${r() ?? ""}`);
3259
+ }), zn(e, u), oe();
3260
+ })(e, {
3261
+ get current() {
3262
+ return n();
3263
+ },
3264
+ get total() {
3265
+ return r();
3266
+ },
3267
+ get customClasses() {
3268
+ return t.customClasses;
3269
+ },
3270
+ get customStyles() {
3271
+ return t.customStyles;
3272
+ }
3273
+ });
3274
+ }, p = (e) => {
3275
+ (function(e, t) {
3276
+ re(t, !0);
3277
+ let n = Kr(t, "current", 3, 1), r = Kr(t, "total", 3, 1), o = Kr(t, "aria", 19, () => ({ ariaLabel: "Progress" }));
3278
+ const i = Ce(() => [
3279
+ "rb-progress",
3280
+ "rb-progress--text",
3281
+ t.customClasses?.root
3282
+ ]), s = Ce(() => ro(t.customStyles?.root)), a = Ce(() => ["rb-progress__item", t.customClasses?.item]), l = Ce(() => ro(t.customStyles?.item));
3283
+ var u = di();
3284
+ Ir(u, "aria-valuemin", 1);
3285
+ var c = yt(u), f = yt(c);
3286
+ X(c), X(u), Bt(() => {
3287
+ Ir(u, "id", t.id), Tr(u, 1, mr(En(i))), Er(u, En(s)), Ir(u, "aria-label", o()?.ariaLabel), Ir(u, "aria-labelledby", o()?.ariaLabelledby), Ir(u, "aria-describedby", o()?.ariaDescribedby), Ir(u, "aria-controls", o()?.ariaControls), Ir(u, "aria-valuenow", n()), Ir(u, "aria-valuemax", r()), Ir(u, "aria-valuetext", `${n() ?? ""} / ${r() ?? ""}`), Tr(c, 1, mr(En(a))), Er(c, En(l)), Yn(f, `${n() ?? ""} / ${r() ?? ""}`);
3288
+ }), zn(e, u), oe();
3289
+ })(e, {
3290
+ get current() {
3291
+ return n();
3292
+ },
3293
+ get total() {
3294
+ return r();
3295
+ },
3296
+ get customClasses() {
3297
+ return t.customClasses;
3298
+ },
3299
+ get customStyles() {
3300
+ return t.customStyles;
3301
+ }
3302
+ });
3303
+ }, h = (e) => {
3304
+ (function(e, t) {
3305
+ re(t, !0);
3306
+ let n = Kr(t, "current", 3, 1), r = Kr(t, "total", 3, 1), o = Kr(t, "aria", 19, () => ({ ariaLabel: "Progress" }));
3307
+ const i = Ce(() => r() > 0 ? n() / r() : 0), s = Ce(() => [
3308
+ "rb-progress",
3309
+ "rb-progress--line",
3310
+ t.customClasses?.root
3311
+ ]), a = Ce(() => ro(t.customStyles?.root)), l = Ce(() => ["rb-progress__track", t.customClasses?.track]), u = Ce(() => ro(t.customStyles?.track)), c = Ce(() => ["rb-progress__progress", t.customClasses?.progress]), f = Ce(() => ro(t.customStyles?.progress));
3312
+ var d = fi();
3313
+ Ir(d, "aria-valuemin", 1);
3314
+ var p = yt(d), h = yt(p);
3315
+ let v;
3316
+ X(p), X(d), Bt(() => {
3317
+ Ir(d, "id", t.id), Tr(d, 1, mr(En(s))), Er(d, En(a)), Ir(d, "aria-label", o()?.ariaLabel), Ir(d, "aria-labelledby", o()?.ariaLabelledby), Ir(d, "aria-describedby", o()?.ariaDescribedby), Ir(d, "aria-controls", o()?.ariaControls), Ir(d, "aria-valuenow", n()), Ir(d, "aria-valuemax", r()), Ir(d, "aria-valuetext", `${n() ?? ""} / ${r() ?? ""}`), Tr(p, 1, mr(En(l))), Er(p, En(u)), Tr(h, 1, mr(En(c))), v = Er(h, En(f), v, { width: 100 * En(i) + "%" });
3318
+ }), zn(e, d), oe();
3319
+ })(e, {
3320
+ get current() {
3321
+ return n();
3322
+ },
3323
+ get total() {
3324
+ return r();
3325
+ },
3326
+ get customClasses() {
3327
+ return t.customClasses;
3328
+ },
3329
+ get customStyles() {
3330
+ return t.customStyles;
3331
+ }
3332
+ });
3333
+ };
3334
+ return ar(c, (e) => {
3335
+ t.customHtml?.progress ? e(f) : o() === pi.DOTS ? e(d, 1) : o() === pi.TEXT ? e(p, 2) : o() === pi.LINE && e(h, 3);
3336
+ }), X(u), zr(u, (e) => ot(i, e), () => En(i)), Bt(() => {
3337
+ Ir(u, "id", t.id), Tr(u, 1, mr(En(s))), Er(u, En(a)), Ir(u, "aria-label", t.aria?.ariaLabel), Ir(u, "aria-labelledby", t.aria?.ariaLabelledby), Ir(u, "aria-describedby", t.aria?.ariaDescribedby), Ir(u, "aria-disabled", t.aria?.ariaDisabled), Ir(u, "aria-expanded", t.aria?.ariaExpanded), Ir(u, "aria-controls", t.aria?.ariaControls), Ir(u, "aria-haspopup", t.aria?.ariaHaspopup), Ir(u, "aria-pressed", t.aria?.ariaPressed);
3338
+ }), zn(e, u), oe(l);
3339
+ }
3340
+ var gi = Bn("<input type=\"checkbox\"/>"), mi = Bn("<span></span>"), _i = Bn("<span> </span>"), bi = Bn("<label><!> <!></label>");
3341
+ function yi(e, t) {
3342
+ re(t, !0);
3343
+ let n = Kr(t, "checked", 3, !1), r = Kr(t, "label", 3, "Don't show again"), o = Kr(t, "disabled", 3, !1), i = nt(null), s = nt(null);
3344
+ const a = Ce(() => ["rb-tour-skip", t.customClasses?.root]), l = Ce(() => ro(t.customStyles?.root)), u = Ce(() => ["rb-tour-skip__input", t.customClasses?.input]), c = Ce(() => ro(t.customStyles?.input)), f = Ce(() => ["rb-tour-skip__label", t.customClasses?.label]), d = Ce(() => ro(t.customStyles?.label));
3345
+ function p(e) {
3346
+ const n = e.target;
3347
+ t.onSkipChange?.(n.checked);
3348
+ }
3349
+ var h = { getElements: function() {
3350
+ return {
3351
+ root: En(i),
3352
+ input: En(s)
3353
+ };
3354
+ } }, v = bi(), g = yt(v), m = (e) => {
3355
+ var n = Fn();
3356
+ hr(Tt(n), () => t.customHtml.input), zn(e, n);
3357
+ }, _ = (e) => {
3358
+ var t = gi();
3359
+ Rr(t), zr(t, (e) => ot(s, e), () => En(s)), Bt(() => {
3360
+ Tr(t, 1, mr(En(u))), Er(t, En(c)), function(e, t) {
3361
+ var n = $r(e);
3362
+ n.checked !== (n.checked = t ?? void 0) && (e.checked = t);
3363
+ }(t, n()), t.disabled = o();
3364
+ }), xn("change", t, p), zn(e, t);
3365
+ };
3366
+ ar(g, (e) => {
3367
+ t.customHtml?.input ? e(m) : e(_, -1);
3368
+ });
3369
+ var b = wt(g, 2), y = (e) => {
3370
+ var n = mi();
3371
+ hr(n, () => t.customHtml.label, !0), X(n), Bt(() => {
3372
+ Tr(n, 1, mr(En(f))), Er(n, En(d));
3373
+ }), zn(e, n);
3374
+ }, T = (e) => {
3375
+ var t = _i(), n = yt(t, !0);
3376
+ X(t), Bt(() => {
3377
+ Tr(t, 1, mr(En(f))), Er(t, En(d)), Yn(n, r());
3378
+ }), zn(e, t);
3379
+ };
3380
+ return ar(b, (e) => {
3381
+ t.customHtml?.label ? e(y) : e(T, -1);
3382
+ }), X(v), zr(v, (e) => ot(i, e), () => En(i)), Bt(() => {
3383
+ Ir(v, "id", t.id), Tr(v, 1, mr(En(a))), Er(v, En(l)), Ir(v, "aria-label", t.aria?.ariaLabel), Ir(v, "aria-labelledby", t.aria?.ariaLabelledby), Ir(v, "aria-describedby", t.aria?.ariaDescribedby), Ir(v, "aria-disabled", t.aria?.ariaDisabled), Ir(v, "aria-expanded", t.aria?.ariaExpanded), Ir(v, "aria-controls", t.aria?.ariaControls), Ir(v, "aria-haspopup", t.aria?.ariaHaspopup), Ir(v, "aria-pressed", t.aria?.ariaPressed);
3384
+ }), zn(e, v), oe(h);
3385
+ }
3386
+ Dn(["change"]);
3387
+ var Ti = function(e) {
3388
+ return e.TOP = "top", e.BOTTOM = "bottom", e.LEFT = "left", e.RIGHT = "right", e;
3389
+ }({});
3390
+ function wi({ getArrow: e, getPlacement: t }) {
3391
+ const n = Ce(e), r = Ce(t), o = Ce(() => !1 === En(n) ? null : function(e) {
3392
+ switch (e) {
3393
+ case so.BOTTOM_START:
3394
+ case so.BOTTOM_CENTER:
3395
+ case so.BOTTOM_END: return Ti.TOP;
3396
+ case so.TOP_START:
3397
+ case so.TOP_CENTER:
3398
+ case so.TOP_END: return Ti.BOTTOM;
3399
+ case so.MIDDLE_END: return Ti.LEFT;
3400
+ case so.MIDDLE_START: return Ti.RIGHT;
3401
+ default: return null;
3402
+ }
3403
+ }(En(n) ? En(n).placement : En(r))), i = Ce(() => En(o) ? function(e) {
3404
+ return ["rb-tour-tooltip__arrow", `rb-tour-tooltip__arrow--${e}`];
3405
+ }(En(o)) : null);
3406
+ return {
3407
+ get side() {
3408
+ return En(o);
3409
+ },
3410
+ get classes() {
3411
+ return En(i);
3412
+ }
3413
+ };
3414
+ }
3415
+ function Ei({ target: e, tooltip: t, placement: n, offset: r, margin: o, padding: i, autoPlacement: s, arrowSide: a, viewport: l }) {
3416
+ function u(e, t, n, r) {
3417
+ switch (n) {
3418
+ case so.TOP_START: return {
3419
+ top: e.top - t.height - r,
3420
+ left: e.left
3421
+ };
3422
+ case so.TOP_CENTER: return {
3423
+ top: e.top - t.height - r,
3424
+ left: e.left + (e.width - t.width) / 2
3425
+ };
3426
+ case so.TOP_END: return {
3427
+ top: e.top - t.height - r,
3428
+ left: e.right - t.width
3429
+ };
3430
+ case so.BOTTOM_START: return {
3431
+ top: e.bottom + r,
3432
+ left: e.left
3433
+ };
3434
+ case so.BOTTOM_CENTER: return {
3435
+ top: e.bottom + r,
3436
+ left: e.left + (e.width - t.width) / 2
3437
+ };
3438
+ case so.BOTTOM_END: return {
3439
+ top: e.bottom + r,
3440
+ left: e.right - t.width
3441
+ };
3442
+ case so.MIDDLE_START: return {
3443
+ top: e.top + (e.height - t.height) / 2,
3444
+ left: e.left - t.width - r
3445
+ };
3446
+ case so.MIDDLE_END: return {
3447
+ top: e.top + (e.height - t.height) / 2,
3448
+ left: e.right + r
3449
+ };
3450
+ case so.MIDDLE_CENTER: return {
3451
+ top: e.top + (e.height - t.height) / 2,
3452
+ left: e.left + (e.width - t.width) / 2
3453
+ };
3454
+ default: return {
3455
+ top: e.bottom + r,
3456
+ left: e.left
3457
+ };
3458
+ }
3459
+ }
3460
+ function c(e, t, n) {
3461
+ return {
3462
+ minTop: t,
3463
+ maxTop: n.height - e.height - t,
3464
+ minLeft: t,
3465
+ maxLeft: n.width - e.width - t
3466
+ };
3467
+ }
3468
+ function f(e, t, n, r) {
3469
+ const o = c(t, n, r);
3470
+ return {
3471
+ top: o.minTop - e.top,
3472
+ bottom: e.top - o.maxTop,
3473
+ left: o.minLeft - e.left,
3474
+ right: e.left - o.maxLeft
3475
+ };
3476
+ }
3477
+ function d(e) {
3478
+ return Math.max(0, e.top) + Math.max(0, e.right) + Math.max(0, e.bottom) + Math.max(0, e.left);
3479
+ }
3480
+ function p(e, t, n, r) {
3481
+ const o = f(e, t, n, r);
3482
+ return o.top <= 0 && o.right <= 0 && o.bottom <= 0 && o.left <= 0;
3483
+ }
3484
+ function h(e, t, n, r, o) {
3485
+ const i = Math.max(r, t), s = Math.min(o, n);
3486
+ return i <= s ? Math.max(i, Math.min(e, s)) : Math.max(t, Math.min(e, n));
3487
+ }
3488
+ function v(e, t, n, r, o) {
3489
+ return Math.max(r, Math.min(Math.max(t, Math.min(e, n)), o));
3490
+ }
3491
+ const g = r + o, m = [n, ...function(e, t) {
3492
+ switch (e) {
3493
+ case !1: return [];
3494
+ case !0: return function(e) {
3495
+ switch (e) {
3496
+ case so.TOP_START: return [
3497
+ so.BOTTOM_START,
3498
+ so.TOP_END,
3499
+ so.BOTTOM_END,
3500
+ so.MIDDLE_END,
3501
+ so.MIDDLE_START,
3502
+ so.TOP_CENTER,
3503
+ so.BOTTOM_CENTER
3504
+ ];
3505
+ case so.TOP_CENTER: return [
3506
+ so.BOTTOM_CENTER,
3507
+ so.TOP_START,
3508
+ so.BOTTOM_START,
3509
+ so.TOP_END,
3510
+ so.BOTTOM_END,
3511
+ so.MIDDLE_END,
3512
+ so.MIDDLE_START
3513
+ ];
3514
+ case so.TOP_END: return [
3515
+ so.BOTTOM_END,
3516
+ so.TOP_START,
3517
+ so.BOTTOM_START,
3518
+ so.MIDDLE_START,
3519
+ so.MIDDLE_END,
3520
+ so.TOP_CENTER,
3521
+ so.BOTTOM_CENTER
3522
+ ];
3523
+ case so.BOTTOM_START: return [
3524
+ so.TOP_START,
3525
+ so.BOTTOM_END,
3526
+ so.TOP_END,
3527
+ so.MIDDLE_END,
3528
+ so.MIDDLE_START,
3529
+ so.BOTTOM_CENTER,
3530
+ so.TOP_CENTER
3531
+ ];
3532
+ case so.BOTTOM_CENTER: return [
3533
+ so.TOP_CENTER,
3534
+ so.BOTTOM_START,
3535
+ so.TOP_START,
3536
+ so.BOTTOM_END,
3537
+ so.TOP_END,
3538
+ so.MIDDLE_END,
3539
+ so.MIDDLE_START
3540
+ ];
3541
+ case so.BOTTOM_END: return [
3542
+ so.TOP_END,
3543
+ so.BOTTOM_START,
3544
+ so.TOP_START,
3545
+ so.MIDDLE_START,
3546
+ so.MIDDLE_END,
3547
+ so.BOTTOM_CENTER,
3548
+ so.TOP_CENTER
3549
+ ];
3550
+ case so.MIDDLE_START: return [
3551
+ so.MIDDLE_END,
3552
+ so.BOTTOM_START,
3553
+ so.TOP_START,
3554
+ so.BOTTOM_CENTER,
3555
+ so.TOP_CENTER,
3556
+ so.BOTTOM_END,
3557
+ so.TOP_END
3558
+ ];
3559
+ case so.MIDDLE_END: return [
3560
+ so.MIDDLE_START,
3561
+ so.BOTTOM_END,
3562
+ so.TOP_END,
3563
+ so.BOTTOM_CENTER,
3564
+ so.TOP_CENTER,
3565
+ so.BOTTOM_START,
3566
+ so.TOP_START
3567
+ ];
3568
+ default: return [];
3569
+ }
3570
+ }(t);
3571
+ default: return e.fallback;
3572
+ }
3573
+ }(s, n)], _ = function(e, t) {
3574
+ return {
3575
+ top: e.top - t,
3576
+ right: e.right + t,
3577
+ bottom: e.bottom + t,
3578
+ left: e.left - t,
3579
+ width: e.width + 2 * t,
3580
+ height: e.height + 2 * t
3581
+ };
3582
+ }(function(e) {
3583
+ const t = e.getBoundingClientRect();
3584
+ return {
3585
+ top: t.top,
3586
+ right: t.right,
3587
+ bottom: t.bottom,
3588
+ left: t.left,
3589
+ width: t.width,
3590
+ height: t.height
3591
+ };
3592
+ }(e), i), b = function(e) {
3593
+ return {
3594
+ width: e.offsetWidth,
3595
+ height: e.offsetHeight
3596
+ };
3597
+ }(t), y = function(e, t, n, r, o, i) {
3598
+ for (const s of e) {
3599
+ const e = u(t, n, s, r);
3600
+ if (p(e, n, o, i)) return {
3601
+ placement: s,
3602
+ position: e
3603
+ };
3604
+ }
3605
+ return null;
3606
+ }(m, _, b, r, g, l) ?? function(e, t, n, r, o, i) {
3607
+ let s = {
3608
+ placement: e[0],
3609
+ position: u(t, n, e[0], r)
3610
+ }, a = d(f(s.position, n, o, i));
3611
+ for (let l = 1; l < e.length; l++) {
3612
+ const c = e[l], p = u(t, n, c, r), h = d(f(p, n, o, i));
3613
+ h < a && (a = h, s = {
3614
+ placement: c,
3615
+ position: p
3616
+ });
3617
+ }
3618
+ return s;
3619
+ }(m, _, b, r, g, l), T = function(e, t, n, o, i, s) {
3620
+ const a = o === so.MIDDLE_START || o === so.MIDDLE_END || o === so.MIDDLE_CENTER, l = c(t, i, s);
3621
+ return a ? {
3622
+ top: h(e.top, n.top - t.height + 1, n.bottom - 1, l.minTop, l.maxTop),
3623
+ left: v(e.left, l.minLeft, l.maxLeft, n.left - t.width - r, n.right + r)
3624
+ } : {
3625
+ top: v(e.top, l.minTop, l.maxTop, n.top - t.height - r, n.bottom + r),
3626
+ left: h(e.left, n.left - t.width + 1, n.right - 1, l.minLeft, l.maxLeft)
3627
+ };
3628
+ }(y.position, b, _, y.placement, g, l);
3629
+ return {
3630
+ position: T,
3631
+ placement: y.placement,
3632
+ arrowOffset: function(e, t, n) {
3633
+ if (null === n) return 0;
3634
+ const r = e.getBoundingClientRect();
3635
+ return n === Ti.TOP || n === Ti.BOTTOM ? r.left + r.width / 2 - t.left : r.top + r.height / 2 - t.top;
3636
+ }(e, T, a)
3637
+ };
3638
+ }
3639
+ function Si({ getTargetElement: e, getTooltipElement: t, getPlacement: n, getPadding: r, getOffset: o, getMargin: i, getAutoPlacement: s, getArrowSide: a }) {
3640
+ let l = nt(0), u = nt(0), c = nt(ut(so.BOTTOM_START)), f = nt(0);
3641
+ const d = To(), p = yo(), h = Ce(e), v = Ce(t), g = Ce(() => {
3642
+ return e = n(), po.has(e) ? e : so.BOTTOM_START;
3643
+ var e;
3644
+ }), m = Ce(o), _ = Ce(i), b = Ce(r), y = Ce(s), T = Ce(a);
3645
+ return Lt(() => {
3646
+ if (!En(h) || !En(v)) return;
3647
+ p.x, p.y;
3648
+ const e = Ei({
3649
+ target: En(h),
3650
+ tooltip: En(v),
3651
+ placement: En(g),
3652
+ offset: En(m),
3653
+ margin: En(_),
3654
+ padding: En(b),
3655
+ autoPlacement: En(y),
3656
+ arrowSide: En(T),
3657
+ viewport: {
3658
+ width: d.width,
3659
+ height: d.height
3660
+ }
3661
+ });
3662
+ ot(l, e.position.top, !0), ot(u, e.position.left, !0), ot(c, e.placement, !0), ot(f, e.arrowOffset, !0);
3663
+ }), {
3664
+ get top() {
3665
+ return En(l);
3666
+ },
3667
+ get left() {
3668
+ return En(u);
3669
+ },
3670
+ get effectivePlacement() {
3671
+ return En(c);
3672
+ },
3673
+ get arrowOffset() {
3674
+ return En(f);
3675
+ }
3676
+ };
3677
+ }
3678
+ var Oi = Bn("<div></div>"), Ci = Bn("<p> </p>"), Ni = Bn("<div><!> <!></div>"), ki = Bn("<div><!> <!> <!> <!> <!> <!> <!></div>");
3679
+ function Ai(e, t) {
3680
+ re(t, !0);
3681
+ let n = Kr(t, "step", 19, () => ({
3682
+ target: "",
3683
+ title: "",
3684
+ description: "",
3685
+ placement: so.BOTTOM_START
3686
+ })), r = Kr(t, "currentTarget", 3, null), o = Kr(t, "currentStep", 3, 1), i = Kr(t, "totalSteps", 3, 1), s = Kr(t, "size", 19, () => io.MD), a = Kr(t, "shape", 19, () => ao.CIRCLE), l = Kr(t, "isSkipChecked", 3, !1), u = Kr(t, "isHidden", 3, !1), c = Kr(t, "hasGlide", 3, !1), f = Kr(t, "tourTooltipAnimation", 3, !1), d = nt(null), p = nt(null), h = nt(null), v = nt(null), g = nt(null);
3687
+ const m = Ce(() => ({
3688
+ title: n().title,
3689
+ description: n().description,
3690
+ placement: n().placement,
3691
+ targetElement: r()
3692
+ })), _ = Ce(() => n().image ? "string" == typeof n().image ? {
3693
+ src: n().image,
3694
+ alt: ""
3695
+ } : {
3696
+ src: n().image.src,
3697
+ alt: n().image.alt ?? ""
3698
+ } : null), b = Ce(() => t.tourProgressProps ? t.tourProgressProps.variant : void 0);
3699
+ var y = { getComponents: function() {
3700
+ return {
3701
+ tourTooltip: En(d),
3702
+ tourImage: En(p),
3703
+ tourButtons: En(h),
3704
+ closeButton: En(g),
3705
+ tourSkip: En(v)
3706
+ };
3707
+ } };
3708
+ {
3709
+ const n = (e) => {
3710
+ var n = Fn(), r = Tt(n), o = (e) => {
3711
+ zr(li(e, qr(() => t.tourImageProps, {
3712
+ get src() {
3713
+ return En(_).src;
3714
+ },
3715
+ get alt() {
3716
+ return En(_).alt;
3717
+ }
3718
+ })), (e) => ot(p, e, !0), () => En(p));
3719
+ };
3720
+ ar(r, (e) => {
3721
+ !1 !== t.tourImageProps && En(_) && e(o);
3722
+ }), zn(e, n);
3723
+ }, r = (e) => {
3724
+ var n = Fn(), r = Tt(n), o = (e) => {
3725
+ zr(ei(e, qr({
3726
+ get size() {
3727
+ return s();
3728
+ },
3729
+ get shape() {
3730
+ return a();
3731
+ }
3732
+ }, () => t.closeButtonProps)), (e) => ot(g, e, !0), () => En(g));
3733
+ };
3734
+ ar(r, (e) => {
3735
+ !1 !== t.closeButtonProps && e(o);
3736
+ }), zn(e, n);
3737
+ }, y = (e) => {
3738
+ var n = Fn(), r = Tt(n), o = (e) => {
3739
+ zr(yi(e, qr(() => t.tourSkipProps, {
3740
+ get checked() {
3741
+ return l();
3742
+ },
3743
+ get onSkipChange() {
3744
+ return t.onSkipChange;
3745
+ }
3746
+ })), (e) => ot(v, e, !0), () => En(v));
3747
+ };
3748
+ ar(r, (e) => {
3749
+ !1 !== t.tourSkipProps && e(o);
3750
+ }), zn(e, n);
3751
+ }, T = (e) => {
3752
+ var n = Fn(), r = Tt(n), s = (e) => {
3753
+ {
3754
+ let n = Ce(() => t.tourProgressProps?.customClasses), r = Ce(() => t.tourProgressProps?.customStyles);
3755
+ vi(e, {
3756
+ get variant() {
3757
+ return pi.LINE;
3758
+ },
3759
+ get currentStep() {
3760
+ return o();
3761
+ },
3762
+ get totalSteps() {
3763
+ return i();
3764
+ },
3765
+ get customClasses() {
3766
+ return En(n);
3767
+ },
3768
+ get customStyles() {
3769
+ return En(r);
3770
+ }
3771
+ });
3772
+ }
3773
+ };
3774
+ ar(r, (e) => {
3775
+ !1 !== t.tourProgressProps && En(b) === pi.LINE && e(s);
3776
+ }), zn(e, n);
3777
+ }, w = (e) => {
3778
+ var n = Fn(), r = Tt(n), a = (e) => {
3779
+ {
3780
+ const n = (e) => {
3781
+ var n = Fn(), r = Tt(n), s = (e) => {
3782
+ {
3783
+ let n = Ce(() => t.tourProgressProps?.customClasses), r = Ce(() => t.tourProgressProps?.customStyles);
3784
+ vi(e, {
3785
+ get variant() {
3786
+ return En(b);
3787
+ },
3788
+ get currentStep() {
3789
+ return o();
3790
+ },
3791
+ get totalSteps() {
3792
+ return i();
3793
+ },
3794
+ get customClasses() {
3795
+ return En(n);
3796
+ },
3797
+ get customStyles() {
3798
+ return En(r);
3799
+ }
3800
+ });
3801
+ }
3802
+ };
3803
+ ar(r, (e) => {
3804
+ !1 === t.tourProgressProps || En(b) !== pi.DOTS && En(b) !== pi.TEXT || e(s);
3805
+ }), zn(e, n);
3806
+ };
3807
+ zr(function(e, t) {
3808
+ re(t, !0);
3809
+ let n = Kr(t, "currentStep", 3, 1), r = Kr(t, "totalSteps", 3, 1), o = Kr(t, "size", 19, () => io.MD), i = Kr(t, "prev", 19, () => ({})), s = Kr(t, "next", 19, () => ({})), a = Kr(t, "finish", 19, () => ({})), l = Kr(t, "skip", 3, !1), u = nt(null);
3810
+ const c = Ce(() => 1 === n()), f = Ce(() => n() === r()), d = Ce(() => ["rb-tour-buttons", t.customClasses?.root]), p = Ce(() => ro(t.customStyles?.root));
3811
+ function h(...e) {
3812
+ return e.map(ro).filter(Boolean).join(" ") || void 0;
3813
+ }
3814
+ function v(e, n, r) {
3815
+ if (!1 === e) return null;
3816
+ const o = _o(n, e);
3817
+ return {
3818
+ ...o,
3819
+ classes: [
3820
+ `rb-tour-buttons__${r}`,
3821
+ o.customClasses?.root,
3822
+ t.customClasses?.[r]
3823
+ ],
3824
+ styles: h(o.customStyles?.root, t.customStyles?.[r])
3825
+ };
3826
+ }
3827
+ const g = Ce(() => v(i(), ti, "prev")), m = Ce(() => v(s(), ni, "next")), _ = Ce(() => v(l(), oi, "skip")), b = Ce(() => v(a(), ri, "finish"));
3828
+ var y = { getElements: function() {
3829
+ return { root: En(u) };
3830
+ } }, T = ii(), w = yt(T), E = (e) => {
3831
+ var n = Fn(), r = Tt(n), i = (e) => {
3832
+ var n = Fn();
3833
+ hr(Tt(n), () => t.customHtml.prev), zn(e, n);
3834
+ }, s = (e) => {
3835
+ {
3836
+ let n = Ce(() => En(g).size ?? o()), r = Ce(() => ({ root: En(g).classes })), i = Ce(() => ({ root: En(g).styles }));
3837
+ Zo(e, {
3838
+ get type() {
3839
+ return En(g).type;
3840
+ },
3841
+ get variant() {
3842
+ return En(g).variant;
3843
+ },
3844
+ get size() {
3845
+ return En(n);
3846
+ },
3847
+ get shape() {
3848
+ return En(g).shape;
3849
+ },
3850
+ get aria() {
3851
+ return En(g).aria;
3852
+ },
3853
+ get autosize() {
3854
+ return En(g).autosize;
3855
+ },
3856
+ get disabled() {
3857
+ return En(c);
3858
+ },
3859
+ get customClasses() {
3860
+ return En(r);
3861
+ },
3862
+ get customStyles() {
3863
+ return En(i);
3864
+ },
3865
+ get onclick() {
3866
+ return t.onPrev;
3867
+ },
3868
+ children: (e, t) => {
3869
+ W();
3870
+ var n = jn();
3871
+ Bt(() => Yn(n, En(g).label)), zn(e, n);
3872
+ },
3873
+ $$slots: { default: !0 }
3874
+ });
3875
+ }
3876
+ };
3877
+ ar(r, (e) => {
3878
+ t.customHtml?.prev ? e(i) : e(s, -1);
3879
+ }), zn(e, n);
3880
+ };
3881
+ ar(w, (e) => {
3882
+ null !== En(g) && e(E);
3883
+ });
3884
+ var S = wt(w, 2), O = yt(S), C = (e) => {
3885
+ var n = Fn();
3886
+ ir(Tt(n), () => t.center), zn(e, n);
3887
+ };
3888
+ ar(O, (e) => {
3889
+ t.center && e(C);
3890
+ }), X(S);
3891
+ var N = wt(S, 2), k = (e) => {
3892
+ var n = Fn(), r = Tt(n), i = (e) => {
3893
+ var n = Fn();
3894
+ hr(Tt(n), () => t.customHtml.skip), zn(e, n);
3895
+ }, s = (e) => {
3896
+ {
3897
+ let n = Ce(() => En(_).size ?? o()), r = Ce(() => ({ root: En(_).classes })), i = Ce(() => ({ root: En(_).styles }));
3898
+ Zo(e, {
3899
+ get type() {
3900
+ return En(_).type;
3901
+ },
3902
+ get variant() {
3903
+ return En(_).variant;
3904
+ },
3905
+ get size() {
3906
+ return En(n);
3907
+ },
3908
+ get shape() {
3909
+ return En(_).shape;
3910
+ },
3911
+ get aria() {
3912
+ return En(_).aria;
3913
+ },
3914
+ get autosize() {
3915
+ return En(_).autosize;
3916
+ },
3917
+ get customClasses() {
3918
+ return En(r);
3919
+ },
3920
+ get customStyles() {
3921
+ return En(i);
3922
+ },
3923
+ get onclick() {
3924
+ return t.onSkip;
3925
+ },
3926
+ children: (e, t) => {
3927
+ W();
3928
+ var n = jn();
3929
+ Bt(() => Yn(n, En(_).label)), zn(e, n);
3930
+ },
3931
+ $$slots: { default: !0 }
3932
+ });
3933
+ }
3934
+ };
3935
+ ar(r, (e) => {
3936
+ t.customHtml?.skip ? e(i) : e(s, -1);
3937
+ }), zn(e, n);
3938
+ };
3939
+ ar(N, (e) => {
3940
+ null !== En(_) && e(k);
3941
+ });
3942
+ var A = wt(N, 2), P = (e) => {
3943
+ var n = Fn(), r = Tt(n), i = (e) => {
3944
+ var n = Fn(), r = Tt(n), i = (e) => {
3945
+ var n = Fn();
3946
+ hr(Tt(n), () => t.customHtml.finish), zn(e, n);
3947
+ }, s = (e) => {
3948
+ {
3949
+ let n = Ce(() => En(b).size ?? o()), r = Ce(() => ({ root: En(b).classes })), i = Ce(() => ({ root: En(b).styles }));
3950
+ Zo(e, {
3951
+ get type() {
3952
+ return En(b).type;
3953
+ },
3954
+ get variant() {
3955
+ return En(b).variant;
3956
+ },
3957
+ get size() {
3958
+ return En(n);
3959
+ },
3960
+ get shape() {
3961
+ return En(b).shape;
3962
+ },
3963
+ get aria() {
3964
+ return En(b).aria;
3965
+ },
3966
+ get autosize() {
3967
+ return En(b).autosize;
3968
+ },
3969
+ get customClasses() {
3970
+ return En(r);
3971
+ },
3972
+ get customStyles() {
3973
+ return En(i);
3974
+ },
3975
+ get onclick() {
3976
+ return t.onFinish;
3977
+ },
3978
+ children: (e, t) => {
3979
+ W();
3980
+ var n = jn();
3981
+ Bt(() => Yn(n, En(b).label)), zn(e, n);
3982
+ },
3983
+ $$slots: { default: !0 }
3984
+ });
3985
+ }
3986
+ };
3987
+ ar(r, (e) => {
3988
+ t.customHtml?.finish ? e(i) : e(s, -1);
3989
+ }), zn(e, n);
3990
+ };
3991
+ ar(r, (e) => {
3992
+ null !== En(b) && e(i);
3993
+ }), zn(e, n);
3994
+ }, x = (e) => {
3995
+ var n = Fn(), r = Tt(n), i = (e) => {
3996
+ var n = Fn();
3997
+ hr(Tt(n), () => t.customHtml.next), zn(e, n);
3998
+ }, s = (e) => {
3999
+ {
4000
+ let n = Ce(() => En(m).size ?? o()), r = Ce(() => ({ root: En(m).classes })), i = Ce(() => ({ root: En(m).styles }));
4001
+ Zo(e, {
4002
+ get type() {
4003
+ return En(m).type;
4004
+ },
4005
+ get variant() {
4006
+ return En(m).variant;
4007
+ },
4008
+ get size() {
4009
+ return En(n);
4010
+ },
4011
+ get shape() {
4012
+ return En(m).shape;
4013
+ },
4014
+ get aria() {
4015
+ return En(m).aria;
4016
+ },
4017
+ get autosize() {
4018
+ return En(m).autosize;
4019
+ },
4020
+ get customClasses() {
4021
+ return En(r);
4022
+ },
4023
+ get customStyles() {
4024
+ return En(i);
4025
+ },
4026
+ get onclick() {
4027
+ return t.onNext;
4028
+ },
4029
+ children: (e, t) => {
4030
+ W();
4031
+ var n = jn();
4032
+ Bt(() => Yn(n, En(m).label)), zn(e, n);
4033
+ },
4034
+ $$slots: { default: !0 }
4035
+ });
4036
+ }
4037
+ };
4038
+ ar(r, (e) => {
4039
+ t.customHtml?.next ? e(i) : e(s, -1);
4040
+ }), zn(e, n);
4041
+ };
4042
+ return ar(A, (e) => {
4043
+ En(f) ? e(P) : null !== En(m) && e(x, 1);
4044
+ }), X(T), zr(T, (e) => ot(u, e), () => En(u)), Bt(() => {
4045
+ Ir(T, "id", t.id), Tr(T, 1, mr(En(d))), Er(T, En(p)), Ir(T, "aria-label", t.aria?.ariaLabel), Ir(T, "aria-labelledby", t.aria?.ariaLabelledby), Ir(T, "aria-describedby", t.aria?.ariaDescribedby), Ir(T, "aria-disabled", t.aria?.ariaDisabled), Ir(T, "aria-expanded", t.aria?.ariaExpanded), Ir(T, "aria-controls", t.aria?.ariaControls), Ir(T, "aria-haspopup", t.aria?.ariaHaspopup), Ir(T, "aria-pressed", t.aria?.ariaPressed);
4046
+ }), zn(e, T), oe(y);
4047
+ }(e, qr({ get size() {
4048
+ return s();
4049
+ } }, () => t.tourButtonsProps, {
4050
+ get currentStep() {
4051
+ return o();
4052
+ },
4053
+ get totalSteps() {
4054
+ return i();
4055
+ },
4056
+ get onNext() {
4057
+ return t.onNext;
4058
+ },
4059
+ get onPrev() {
4060
+ return t.onPrev;
4061
+ },
4062
+ get onFinish() {
4063
+ return t.onFinish;
4064
+ },
4065
+ get onSkip() {
4066
+ return t.onSkip;
4067
+ },
4068
+ center: n,
4069
+ $$slots: { center: !0 }
4070
+ })), (e) => ot(h, e, !0), () => En(h));
4071
+ }
4072
+ };
4073
+ ar(r, (e) => {
4074
+ !1 !== t.tourButtonsProps && e(a);
4075
+ }), zn(e, n);
4076
+ };
4077
+ zr(function(e, t) {
4078
+ re(t, !0);
4079
+ let n = Kr(t, "title", 3, ""), r = Kr(t, "description", 3, ""), o = Kr(t, "size", 19, () => io.MD), i = Kr(t, "placement", 19, () => so.BOTTOM_START), s = Kr(t, "targetElement", 3, null), a = Kr(t, "offset", 3, 12), l = Kr(t, "margin", 3, 8), u = Kr(t, "padding", 3, 12), c = Kr(t, "autoPlacement", 3, !0), f = Kr(t, "isHidden", 3, !1), d = Kr(t, "hasGlide", 3, !1), p = Kr(t, "animation", 3, !1), h = nt(null), v = nt(!1);
4080
+ const g = wi({
4081
+ getArrow: () => t.arrow,
4082
+ getPlacement: () => m.effectivePlacement
4083
+ }), m = Si({
4084
+ getTargetElement: () => s(),
4085
+ getTooltipElement: () => En(h),
4086
+ getPlacement: () => i(),
4087
+ getOffset: () => a(),
4088
+ getMargin: () => l(),
4089
+ getPadding: () => u(),
4090
+ getAutoPlacement: () => c(),
4091
+ getArrowSide: () => g.side
4092
+ });
4093
+ Lt(() => {
4094
+ const e = requestAnimationFrame(() => {
4095
+ ot(v, !0);
4096
+ });
4097
+ return () => cancelAnimationFrame(e);
4098
+ });
4099
+ const _ = Ce(() => !1 !== p()), b = Qr({
4100
+ getIsAnimated: () => En(_),
4101
+ getIsHidden: () => f(),
4102
+ classNames: {
4103
+ hidden: "rb-tour-tooltip--hidden",
4104
+ in: "rb-tour-tooltip--anim-in",
4105
+ out: "rb-tour-tooltip--anim-out"
4106
+ }
4107
+ }), y = Ce(() => p() ? {
4108
+ effect: b.hasHiddenAnimation ? p().exit : p().enter,
4109
+ duration: b.hasHiddenAnimation ? p().exitDuration : p().enterDuration,
4110
+ className: `rb-tour-tooltip--anim-${b.hasHiddenAnimation ? p().exit : p().enter}`,
4111
+ easing: p().easing
4112
+ } : {
4113
+ effect: co.NONE,
4114
+ duration: 0,
4115
+ className: null,
4116
+ easing: "ease-out"
4117
+ }), T = Ce(() => [
4118
+ "rb-tour-tooltip",
4119
+ `rb-tour-tooltip--${o()}`,
4120
+ En(v) && d() && "rb-tour-tooltip--glide",
4121
+ b.classes,
4122
+ En(y).className,
4123
+ t.customClasses?.root
4124
+ ]), w = Ce(() => ro(t.customStyles?.root)), E = Ce(() => ["rb-tour-tooltip__header", t.customClasses?.header]), S = Ce(() => ro(t.customStyles?.header)), O = Ce(() => ["rb-tour-tooltip__title", t.customClasses?.title]), C = Ce(() => ro(t.customStyles?.title)), N = Ce(() => ["rb-tour-tooltip__description", t.customClasses?.description]), k = Ce(() => ro(t.customStyles?.description));
4125
+ var A = { getElements: function() {
4126
+ return { root: En(h) };
4127
+ } }, P = ki();
4128
+ let x;
4129
+ var D = yt(P), L = (e) => {
4130
+ var t = Oi();
4131
+ let n;
4132
+ Bt(() => {
4133
+ Tr(t, 1, mr(g.classes)), n = Er(t, "", n, { "--rb-tour-tooltip-arrow-offset": `${m.arrowOffset ?? ""}px` });
4134
+ }), zn(e, t);
4135
+ };
4136
+ ar(D, (e) => {
4137
+ g.classes && e(L);
4138
+ });
4139
+ var R = wt(D, 2), M = (e) => {
4140
+ var n = Fn();
4141
+ ir(Tt(n), () => t.image), zn(e, n);
4142
+ };
4143
+ ar(R, (e) => {
4144
+ t.image && e(M);
4145
+ });
4146
+ var I = wt(R, 2), B = (e) => {
4147
+ var r = Ni(), o = yt(r), i = (e) => {
4148
+ var n = Fn();
4149
+ hr(Tt(n), () => t.customHtml.title), zn(e, n);
4150
+ }, s = (e) => {
4151
+ var t = Ci(), r = yt(t, !0);
4152
+ X(t), Bt(() => {
4153
+ Tr(t, 1, mr(En(O))), Er(t, En(C)), Yn(r, n());
4154
+ }), zn(e, t);
4155
+ };
4156
+ ar(o, (e) => {
4157
+ t.customHtml?.title ? e(i) : n() && e(s, 1);
4158
+ });
4159
+ var a = wt(o, 2), l = (e) => {
4160
+ var n = Fn();
4161
+ ir(Tt(n), () => t.close), zn(e, n);
4162
+ };
4163
+ ar(a, (e) => {
4164
+ t.close && e(l);
4165
+ }), X(r), Bt(() => {
4166
+ Tr(r, 1, mr(En(E))), Er(r, En(S));
4167
+ }), zn(e, r);
4168
+ };
4169
+ ar(I, (e) => {
4170
+ (n() || t.customHtml?.title || t.close) && e(B);
4171
+ });
4172
+ var $ = wt(I, 2), H = (e) => {
4173
+ var n = Fn();
4174
+ hr(Tt(n), () => t.customHtml.description), zn(e, n);
4175
+ }, j = (e) => {
4176
+ var t = Ci(), n = yt(t, !0);
4177
+ X(t), Bt(() => {
4178
+ Tr(t, 1, mr(En(N))), Er(t, En(k)), Yn(n, r());
4179
+ }), zn(e, t);
4180
+ };
4181
+ ar($, (e) => {
4182
+ t.customHtml?.description ? e(H) : r() && e(j, 1);
4183
+ });
4184
+ var F = wt($, 2), z = (e) => {
4185
+ var n = Fn();
4186
+ ir(Tt(n), () => t.skip), zn(e, n);
4187
+ };
4188
+ ar(F, (e) => {
4189
+ t.skip && e(z);
4190
+ });
4191
+ var U = wt(F, 2), V = (e) => {
4192
+ var n = Fn();
4193
+ ir(Tt(n), () => t.progress), zn(e, n);
4194
+ };
4195
+ ar(U, (e) => {
4196
+ t.progress && e(V);
4197
+ });
4198
+ var q = wt(U, 2), K = (e) => {
4199
+ var n = Fn();
4200
+ ir(Tt(n), () => t.footer), zn(e, n);
4201
+ };
4202
+ return ar(q, (e) => {
4203
+ t.footer && e(K);
4204
+ }), X(P), zr(P, (e) => ot(h, e), () => En(h)), Bt(() => {
4205
+ Ir(P, "id", t.id), Tr(P, 1, mr(En(T))), x = Er(P, En(w), x, {
4206
+ top: `${m.top ?? ""}px`,
4207
+ left: `${m.left ?? ""}px`,
4208
+ "--rb-tt-duration": `${En(y).duration ?? ""}ms`,
4209
+ "--rb-tt-easing": En(y).easing
4210
+ }), Ir(P, "aria-label", t.aria?.ariaLabel), Ir(P, "aria-labelledby", t.aria?.ariaLabelledby), Ir(P, "aria-describedby", t.aria?.ariaDescribedby), Ir(P, "aria-disabled", t.aria?.ariaDisabled), Ir(P, "aria-expanded", t.aria?.ariaExpanded), Ir(P, "aria-controls", t.aria?.ariaControls), Ir(P, "aria-haspopup", t.aria?.ariaHaspopup), Ir(P, "aria-pressed", t.aria?.ariaPressed);
4211
+ }), zn(e, P), oe(A);
4212
+ }(e, qr({ get size() {
4213
+ return s();
4214
+ } }, () => t.tourTooltipProps, () => En(m), {
4215
+ get isHidden() {
4216
+ return u();
4217
+ },
4218
+ get hasGlide() {
4219
+ return c();
4220
+ },
4221
+ get animation() {
4222
+ return f();
4223
+ },
4224
+ image: n,
4225
+ close: r,
4226
+ skip: y,
4227
+ progress: T,
4228
+ footer: w,
4229
+ $$slots: {
4230
+ image: !0,
4231
+ close: !0,
4232
+ skip: !0,
4233
+ progress: !0,
4234
+ footer: !0
4235
+ }
4236
+ })), (e) => ot(d, e, !0), () => En(d));
4237
+ }
4238
+ return oe(y);
4239
+ }
4240
+ var Pi = Bn("<!> <!>", 1), xi = Bn("<div><!></div>");
4241
+ function Di(e, t) {
4242
+ re(t, !0);
4243
+ let n = nt(null), r = nt(null), o = nt(null);
4244
+ Yr({
4245
+ get eventEmitter() {
4246
+ return t.eventEmitter;
4247
+ },
4248
+ mount: () => t.mount(),
4249
+ unmount: () => t.unmount(),
4250
+ close: () => t.close()
4251
+ });
4252
+ const i = Qr({
4253
+ getIsAnimated: () => t.config.visibility?.isAnimated ?? !0,
4254
+ getIsHidden: () => t.config.visibility?.isHidden ?? !1,
4255
+ classNames: {
4256
+ hidden: "rb-container--hidden",
4257
+ in: "rb-fade-in",
4258
+ out: "rb-fade-out"
4259
+ }
4260
+ }), s = no({
4261
+ getTrigger: () => t.controller.currentStep,
4262
+ getDuration: () => t.animation.overlay.transitionDuration
4263
+ });
4264
+ to({ getContainer: () => En(n)?.getElements()?.root ?? null });
4265
+ const a = Ce(() => t.config.size), l = Ce(() => t.config.shape), u = Ce(() => ["rb"]), c = Ce(() => ({
4266
+ ...t.config.container,
4267
+ customClasses: {
4268
+ ...t.config.container?.customClasses,
4269
+ root: [t.config.container?.customClasses?.root, i.classes]
4270
+ }
4271
+ })), f = Ce(() => t.config.tourOverlay), d = Ce(() => t.config.tourTooltip), p = Ce(() => t.config.tourImage), h = Ce(() => t.config.tourButtons), v = Ce(() => t.config.tourProgress), g = Ce(() => t.config.tourSkip), m = Ce(() => t.config.closeButton), _ = Ce(() => !!t.animation.isEnabled && t.animation.tooltip), b = Ce(() => t.animation.isEnabled), y = Ce(() => t.animation.tooltip.transition === Oo.GLIDE), T = Ce(() => t.animation.tooltip.appearance === So.DURING_SCROLL), w = Ce(() => t.scroll.isScrolling || s.isActive), E = Ce(() => !En(y) && En(b) && En(w) && !En(T)), S = Ce(() => t.controller.step), O = Ce(() => {
4272
+ const e = En(o)?.getComponents();
4273
+ return {
4274
+ tourTooltip: e?.tourTooltip ?? null,
4275
+ tourImage: e?.tourImage ?? null,
4276
+ tourButtons: e?.tourButtons ?? null,
4277
+ closeButton: e?.closeButton ?? null,
4278
+ tourSkip: e?.tourSkip ?? null
4279
+ };
4280
+ }), C = {
4281
+ get controller() {
4282
+ return t.controller;
4283
+ },
4284
+ get components() {
4285
+ return {
4286
+ container: En(n),
4287
+ tourOverlay: En(r),
4288
+ ...En(O)
4289
+ };
4290
+ },
4291
+ get events() {
4292
+ return t.eventEmitter;
4293
+ }
4294
+ };
4295
+ var N;
4296
+ Lt(() => {
4297
+ t.config.visibility?.isHidden || t.scroll.scrollTo(t.controller.currentTarget);
4298
+ }), sr(() => {
4299
+ t.mount();
4300
+ }), N = () => {
4301
+ t.eventEmitter.emit(Zr.ON_BORDA_DESTROY), t.eventEmitter.clear();
4302
+ }, null === te && j(), sr(() => () => Cn(N));
4303
+ var k = { api: C }, A = xi();
4304
+ return zr(function(e, t) {
4305
+ re(t, !0);
4306
+ let n = nt(null);
4307
+ const r = Ce(() => ["rb-container", t.customClasses?.root]), o = Ce(() => ro(t.customStyles?.root));
4308
+ var i = { getElements: function() {
4309
+ return { root: En(n) };
4310
+ } }, s = bo(), a = yt(s), l = (e) => {
4311
+ var n = Fn();
4312
+ ir(Tt(n), () => t.children), zn(e, n);
4313
+ };
4314
+ return ar(a, (e) => {
4315
+ t.children && e(l);
4316
+ }), X(s), zr(s, (e) => ot(n, e), () => En(n)), Bt(() => {
4317
+ Ir(s, "id", t.id), Tr(s, 1, mr(En(r))), Er(s, En(o));
4318
+ }), zn(e, s), oe(i);
4319
+ }(yt(A), qr(() => En(c), {
4320
+ children: (e, n) => {
4321
+ var i = Fn(), s = Tt(i), u = (e) => {
4322
+ var n = Pi(), i = Tt(n), s = (e) => {
4323
+ zr(function(e, t) {
4324
+ re(t, !0);
4325
+ let n = Kr(t, "targetElement", 3, null), r = Kr(t, "borderRadius", 3, 8), o = Kr(t, "padding", 3, 12), i = Kr(t, "isAnimated", 3, !0), s = Kr(t, "hasCloseOnBackdropClick", 3, !1), a = Kr(t, "aria", 19, () => ({ ariaLabel: "Close" }));
4326
+ const { eventEmitter: l, close: u } = Wr();
4327
+ let c = nt(null), f = nt(null);
4328
+ const d = wo({
4329
+ getTargetElement: () => n(),
4330
+ getBorderRadius: () => r(),
4331
+ getPadding: () => o(),
4332
+ getIsAnimated: () => i()
4333
+ }), p = Ce(() => ["rb-tour-overlay", t.customClasses?.root]), h = Ce(() => ro(t.customStyles?.root)), v = Ce(() => [
4334
+ "rb-tour-overlay__backdrop",
4335
+ d.isTransitioning && "rb-tour-overlay__backdrop--transitioning",
4336
+ t.customClasses?.backdrop
4337
+ ]), g = Ce(() => ro(t.customStyles?.backdrop));
4338
+ function m(e) {
4339
+ " " === e.key && _(e);
4340
+ }
4341
+ function _(e) {
4342
+ l.emit(Zr.ON_OVERLAY_CLICK, e), t.onClose ? t.onClose(e) : s() && u();
4343
+ }
4344
+ sr(() => (En(c)?.addEventListener("click", _), En(c)?.addEventListener("keydown", m), () => {
4345
+ En(c)?.removeEventListener("click", _), En(c)?.removeEventListener("keydown", m);
4346
+ }));
4347
+ var b = { getElements: function() {
4348
+ return {
4349
+ root: En(c),
4350
+ backdrop: En(f)
4351
+ };
4352
+ } }, y = Eo();
4353
+ let T;
4354
+ var w = yt(y);
4355
+ return zr(w, (e) => ot(f, e), () => En(f)), X(y), zr(y, (e) => ot(c, e), () => En(c)), Bt(() => {
4356
+ Ir(y, "id", t.id), Tr(y, 0, mr(En(p))), T = Er(y, En(h), T, {
4357
+ width: `${d.width ?? ""}px`,
4358
+ height: `${d.height ?? ""}px`
4359
+ }), Ir(y, "aria-label", a()?.ariaLabel), Ir(y, "aria-labelledby", a()?.ariaLabelledby), Ir(y, "aria-describedby", a()?.ariaDescribedby), Ir(y, "aria-disabled", a()?.ariaDisabled), Ir(y, "aria-expanded", a()?.ariaExpanded), Ir(y, "aria-controls", a()?.ariaControls), Ir(y, "aria-haspopup", a()?.ariaHaspopup), Ir(y, "aria-pressed", a()?.ariaPressed), Tr(w, 0, mr(En(v))), Er(w, En(g)), Ir(w, "d", d.backdropPath);
4360
+ }), zn(e, y), oe(b);
4361
+ }(e, qr({
4362
+ get targetElement() {
4363
+ return t.controller.currentTarget;
4364
+ },
4365
+ get isAnimated() {
4366
+ return En(b);
4367
+ }
4368
+ }, () => En(f))), (e) => ot(r, e, !0), () => En(r));
4369
+ };
4370
+ ar(i, (e) => {
4371
+ !1 !== En(f) && e(s);
4372
+ });
4373
+ var u = wt(i, 2), c = (e) => {
4374
+ zr(Ai(e, {
4375
+ get step() {
4376
+ return En(S);
4377
+ },
4378
+ get currentTarget() {
4379
+ return t.controller.currentTarget;
4380
+ },
4381
+ get currentStep() {
4382
+ return t.controller.currentStep;
4383
+ },
4384
+ get totalSteps() {
4385
+ return t.controller.totalSteps;
4386
+ },
4387
+ get isSkipChecked() {
4388
+ return t.skip.isSkipped;
4389
+ },
4390
+ get isHidden() {
4391
+ return En(E);
4392
+ },
4393
+ get hasGlide() {
4394
+ return En(y);
4395
+ },
4396
+ get tourTooltipAnimation() {
4397
+ return En(_);
4398
+ },
4399
+ get size() {
4400
+ return En(a);
4401
+ },
4402
+ get shape() {
4403
+ return En(l);
4404
+ },
4405
+ get tourTooltipProps() {
4406
+ return En(d);
4407
+ },
4408
+ get tourImageProps() {
4409
+ return En(p);
4410
+ },
4411
+ get tourButtonsProps() {
4412
+ return En(h);
4413
+ },
4414
+ get tourProgressProps() {
4415
+ return En(v);
4416
+ },
4417
+ get closeButtonProps() {
4418
+ return En(m);
4419
+ },
4420
+ get tourSkipProps() {
4421
+ return En(g);
4422
+ },
4423
+ get onNext() {
4424
+ return t.controller.next;
4425
+ },
4426
+ get onPrev() {
4427
+ return t.controller.prev;
4428
+ },
4429
+ get onFinish() {
4430
+ return t.controller.finish;
4431
+ },
4432
+ get onSkip() {
4433
+ return t.close;
4434
+ },
4435
+ get onSkipChange() {
4436
+ return t.skip.set;
4437
+ }
4438
+ }), (e) => ot(o, e, !0), () => En(o));
4439
+ };
4440
+ ar(u, (e) => {
4441
+ !1 !== En(d) && e(c);
4442
+ }), zn(e, n);
4443
+ };
4444
+ ar(s, (e) => {
4445
+ t.controller.currentTarget && En(S) && e(u);
4446
+ }), zn(e, i);
4447
+ },
4448
+ $$slots: { default: !0 }
4449
+ })), (e) => ot(n, e, !0), () => En(n)), X(A), Bt(() => Tr(A, 1, mr(En(u)))), zn(e, A), oe(k);
4450
+ }
4451
+ function Li() {
4452
+ const e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakSet();
4453
+ function n(t, n) {
4454
+ (function(e) {
4455
+ if (!ho) throw new vo(`${e}() requires a browser environment`);
4456
+ })("mount");
4457
+ const o = n ?? document.body;
4458
+ return new Promise((n) => {
4459
+ let i = null;
4460
+ const s = Jr(), a = Ri(t), l = Mo(a), u = Po(a, s);
4461
+ u.apply(), l.applyStep(u.api.step ?? null);
4462
+ const c = Uo(a, s);
4463
+ c.apply(), c.api.isSkipped && a.mergeConfig({ visibility: { isHidden: !0 } });
4464
+ const f = Lo(a, s);
4465
+ f.apply();
4466
+ const d = zo(a);
4467
+ d.apply();
4468
+ const p = ko(a);
4469
+ p.apply();
4470
+ const h = Io(a, l);
4471
+ h.apply();
4472
+ const v = Vo(a, s);
4473
+ v.apply();
4474
+ const g = Zn(Di, {
4475
+ target: o,
4476
+ props: {
4477
+ get config() {
4478
+ return l.resolved;
4479
+ },
4480
+ get controller() {
4481
+ return u.api;
4482
+ },
4483
+ get skip() {
4484
+ return c.api;
4485
+ },
4486
+ get scroll() {
4487
+ return d.api;
4488
+ },
4489
+ get animation() {
4490
+ return p.api;
4491
+ },
4492
+ mount: () => {
4493
+ const t = {
4494
+ api: g.api,
4495
+ config: a,
4496
+ component: g,
4497
+ skip: c.api,
4498
+ scroll: d.api,
4499
+ animation: p.api,
4500
+ responsive: h.api,
4501
+ visibility: v.api
4502
+ };
4503
+ i = t, s.on(Zr.ON_TOUR_STEP_CHANGE, () => {
4504
+ l.applyStep(u.api.step ?? null);
4505
+ }), s.on(Zr.ON_KEYBOARD_NEXT, () => {
4506
+ u.api.next();
4507
+ }), s.on(Zr.ON_KEYBOARD_PREV, () => {
4508
+ u.api.prev();
4509
+ }), e.set(t, () => {
4510
+ f.destroy(), h.destroy(), d.destroy();
4511
+ }), s.once(Zr.ON_TOUR_FINISH, async () => {
4512
+ a.getConfig().tour?.onFinish?.(), await r(t);
4513
+ }), s.once(Zr.ON_TOUR_CLOSE, async () => {
4514
+ a.getConfig().tour?.onClose?.(), await r(t);
4515
+ }), n(t);
4516
+ },
4517
+ unmount: () => {
4518
+ i && r(i);
4519
+ },
4520
+ close: () => {
4521
+ s.emit(Zr.ON_TOUR_CLOSE);
4522
+ },
4523
+ eventEmitter: s
4524
+ }
4525
+ });
4526
+ });
4527
+ }
4528
+ async function r(n) {
4529
+ if (t.has(n)) return;
4530
+ t.add(n);
4531
+ const r = n.api.components.container?.getElements()?.root, o = n.config.getConfig().visibility, i = o?.isAnimated ?? !0;
4532
+ !o?.isHidden && i && r && (n.visibility.hide(), await async function(e) {
4533
+ await new Promise(requestAnimationFrame);
4534
+ const t = e.getAnimations({ subtree: !0 });
4535
+ await Promise.allSettled(t.map((e) => e.finished));
4536
+ }(r)), e.get(n)?.(), e.delete(n), await nr(n.component);
4537
+ }
4538
+ return {
4539
+ NAME: "@retoo/borda",
4540
+ VERSION: "0.0.1",
4541
+ mount: n,
4542
+ unmount: r,
4543
+ highlight: xo(n).highlight
4544
+ };
4545
+ }
4546
+ function Ri(e) {
4547
+ let t = nt(ut(mo(e)));
4548
+ function n(e) {
4549
+ ot(t, mo(e), !0);
4550
+ }
4551
+ return {
4552
+ get current() {
4553
+ return En(t);
4554
+ },
4555
+ getConfig: function() {
4556
+ return En(t);
4557
+ },
4558
+ setConfig: n,
4559
+ mergeConfig: function(e) {
4560
+ n(_o(En(t), e));
4561
+ }
4562
+ };
4563
+ }
4564
+ var Mi = "borda-tour-widget", Ii = "undefined" != typeof HTMLElement ? HTMLElement : class {}, Bi = class extends Ii {
4565
+ static tagName = Mi;
4566
+ _instance = null;
4567
+ _borda = null;
4568
+ _connected = !1;
4569
+ _mountPending = null;
4570
+ _unmountPending = null;
4571
+ get borda() {
4572
+ return this._borda;
4573
+ }
4574
+ get instance() {
4575
+ return this._instance;
4576
+ }
4577
+ connectedCallback() {
4578
+ this._connected = !0;
4579
+ }
4580
+ disconnectedCallback() {
4581
+ this._connected = !1, this.unmount().catch((e) => {
4582
+ console.error("[borda] unmount failed on disconnect:", e);
4583
+ });
4584
+ }
4585
+ mount(e) {
4586
+ return this._mountPending || (this._mountPending = this._mount(e).finally(() => {
4587
+ this._mountPending = null;
4588
+ })), this._mountPending;
4589
+ }
4590
+ async _mount(e) {
4591
+ if (this._unmountPending && await this._unmountPending, this._instance) return this._instance.config.setConfig(e), this._instance;
4592
+ const t = Li(), n = await t.mount(e);
4593
+ return this._borda = t, this._instance = n, this.dispatchEvent(new CustomEvent("borda:mount", {
4594
+ detail: n,
4595
+ bubbles: !0,
4596
+ composed: !0
4597
+ })), n;
4598
+ }
4599
+ unmount() {
4600
+ return this._unmountPending ? this._unmountPending : this._borda && this._instance ? (this._unmountPending = this._unmount().finally(() => {
4601
+ this._unmountPending = null;
4602
+ }), this._unmountPending) : Promise.resolve();
4603
+ }
4604
+ async _unmount() {
4605
+ if (this._mountPending && await this._mountPending, !this._borda || !this._instance) return;
4606
+ const e = this._borda, t = this._instance;
4607
+ this._borda = null, this._instance = null, await e.unmount(t), this.dispatchEvent(new CustomEvent("borda:unmount", {
4608
+ bubbles: !0,
4609
+ composed: !0
4610
+ }));
4611
+ }
4612
+ };
4613
+ function $i() {
4614
+ return customElements.get(Bi.tagName);
4615
+ }
4616
+ function Hi() {
4617
+ $i() || customElements.define(Bi.tagName, Bi);
4618
+ }
4619
+ ho && (window.bordaWidget = Li, window.defineBordaElement = Hi), e.AnimationEffect = co, e.BordaButtonShape = Ko, e.BordaButtonType = Xo, e.BordaButtonVariant = Go, e.BordaEvent = Zr, e.BordaScrollAppearance = So, e.BordaTooltipArrowSide = Ti, e.BordaTooltipTransition = Oo, e.BordaTourImageVariant = ai, e.BordaTourProgressVariant = pi, e.ComponentAriaHaspopup = uo, e.ComponentAriaPressed = lo, e.ComponentPlacement = so, e.ComponentShape = ao, e.ComponentSize = io, e.OverrideLayer = fo, e.SAFE_HTML_ELEMENT = Ii, e.TAG_NAME = Mi, e.bordaTourFinishButtonDefault = ri, e.bordaTourNextButtonDefault = ni, e.bordaTourPrevButtonDefault = ti, e.bordaTourSkipButtonDefault = oi, e.defineBordaElement = Hi, e.getBordaContext = Wr, e.getBordaElement = $i, e.setBordaContext = Yr, e.useBorda = Li, e.useBordaAnimation = ko, e.useBordaConfig = Ri, e.useBordaController = Po, e.useBordaHighlight = xo, e.useBordaKeyboard = Lo, e.useBordaOverrides = Mo, e.useBordaResponsive = Io, e.useBordaScroll = zo, e.useBordaSkip = Uo, e.useBordaVisibility = Vo, e.useEventEmitter = Jr, e.useOverlay = wo, e.useTooltipArrow = wi, e.useTooltipPosition = Si;
4620
+ });