@citrusworx/juiceui 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -7
- package/dist/index.css +1383 -114
- package/dist/index.d.ts +16 -0
- package/dist/index.js +2174 -913
- package/dist/js/juice.d.ts +16 -0
- package/dist/js/src/disclosure/disclosure-runtime.d.ts +51 -0
- package/dist/js/src/drawer/drawer-runtime.d.ts +6 -0
- package/dist/js/src/field/field-runtime.d.ts +53 -0
- package/dist/js/src/input/input-runtime.d.ts +55 -0
- package/dist/js/src/modal/modal-runtime.d.ts +6 -0
- package/dist/js/src/pagination/pagination-runtime.d.ts +79 -0
- package/dist/js/src/popover/popover-runtime.d.ts +5 -0
- package/dist/js/src/select/select-runtime.d.ts +52 -0
- package/dist/js/src/shared/motion.d.ts +48 -0
- package/dist/js/src/spinner/spinner-runtime.d.ts +51 -0
- package/dist/js/src/textarea/textarea-runtime.d.ts +51 -0
- package/dist/js/src/toast/toast-runtime.d.ts +5 -0
- package/dist/themes/aquaflux.css +411 -0
- package/dist/themes/citrusmint.css +404 -0
- package/dist/themes/kiwipress.css +410 -0
- package/dist/themes/retro-afterburn.css +2019 -0
- package/dist/themes/retro-arcade-glow.css +2019 -0
- package/dist/themes/retro-boardwalk.css +2082 -0
- package/dist/themes/retro-denim-dial.css +1871 -0
- package/dist/themes/retro-forest-radio.css +1871 -0
- package/dist/themes/retro-orchard-club.css +1871 -0
- package/dist/themes/retro-poolside-pop.css +1871 -0
- package/dist/themes/retro-signal-garden.css +1871 -0
- package/dist/themes/retro-sunset-motel.css +1871 -0
- package/dist/themes/retro-violet-parlor.css +1871 -0
- package/dist/themes/tide.css +403 -0
- package/package.json +92 -2
package/dist/index.js
CHANGED
|
@@ -354,17 +354,123 @@ var A = () => {
|
|
|
354
354
|
if (typeof document > "u") return null;
|
|
355
355
|
let r = document.getElementById(e);
|
|
356
356
|
return r instanceof HTMLElement ? r : null;
|
|
357
|
-
}, F = {
|
|
357
|
+
}, F = "(prefers-reduced-motion: reduce)", I = (e) => e === "enter" ? "entered" : "exited", L = (e) => e === "enter" ? "entering" : "exiting", R = () => {
|
|
358
|
+
if (typeof window > "u" || typeof window.matchMedia != "function") return null;
|
|
359
|
+
try {
|
|
360
|
+
return window.matchMedia(F);
|
|
361
|
+
} catch {
|
|
362
|
+
return null;
|
|
363
|
+
}
|
|
364
|
+
}, z = () => R()?.matches ?? !1, B = (e) => {
|
|
365
|
+
let t = R();
|
|
366
|
+
if (!t) return () => {};
|
|
367
|
+
let n = () => e(t.matches);
|
|
368
|
+
if (typeof t.addEventListener == "function") return t.addEventListener("change", n), () => t.removeEventListener("change", n);
|
|
369
|
+
let r = t;
|
|
370
|
+
return typeof r.addListener == "function" ? (r.addListener(n), () => r.removeListener?.(n)) : () => {};
|
|
371
|
+
}, V = () => {
|
|
372
|
+
let e = !1;
|
|
373
|
+
return {
|
|
374
|
+
get cancelled() {
|
|
375
|
+
return e;
|
|
376
|
+
},
|
|
377
|
+
cancel() {
|
|
378
|
+
e = !0;
|
|
379
|
+
}
|
|
380
|
+
};
|
|
381
|
+
}, H = (e) => {
|
|
382
|
+
let t = e.trim(), n = /^(-?\d*\.?\d+)(ms|s)$/.exec(t);
|
|
383
|
+
if (!n) return 0;
|
|
384
|
+
let r = Number.parseFloat(n[1] ?? "");
|
|
385
|
+
return !Number.isFinite(r) || r <= 0 ? 0 : n[2] === "ms" ? r : r * 1e3;
|
|
386
|
+
}, U = (e) => e.split(",").map((e) => H(e)).filter((e) => Number.isFinite(e)), ee = (e, t) => {
|
|
387
|
+
let n = 0;
|
|
388
|
+
return e.forEach((e, r) => {
|
|
389
|
+
let i = t[r] ?? t[0] ?? 0;
|
|
390
|
+
n = Math.max(n, e + i);
|
|
391
|
+
}), n;
|
|
392
|
+
}, te = (e) => {
|
|
393
|
+
if (typeof window > "u" || typeof window.getComputedStyle != "function") return 0;
|
|
394
|
+
let t;
|
|
395
|
+
try {
|
|
396
|
+
t = window.getComputedStyle(e);
|
|
397
|
+
} catch {
|
|
398
|
+
return 0;
|
|
399
|
+
}
|
|
400
|
+
let n = ee(U(t.transitionDuration || ""), U(t.transitionDelay || "")), r = ee(U(t.animationDuration || ""), U(t.animationDelay || ""));
|
|
401
|
+
return Math.max(n, r);
|
|
402
|
+
}, ne = (e, t, n = V()) => {
|
|
403
|
+
let r = !1, i = 0, a = () => {}, o = () => {}, s = new Promise((e) => {
|
|
404
|
+
o = e;
|
|
405
|
+
}), c = () => {
|
|
406
|
+
e.removeEventListener("transitionend", u), e.removeEventListener("animationend", u), i &&= (window.clearTimeout(i), 0), a(), a = () => {};
|
|
407
|
+
}, l = (i) => {
|
|
408
|
+
r || !i && !n.cancelled || (r = !0, c(), i && !n.cancelled && e.setAttribute("data-motion-state", I(t)), o({ completed: i && !n.cancelled }));
|
|
409
|
+
}, u = (t) => {
|
|
410
|
+
t.target === e && l(!0);
|
|
411
|
+
}, d = n.cancel.bind(n);
|
|
412
|
+
if (n.cancel = () => {
|
|
413
|
+
n.cancelled || (d(), l(!1));
|
|
414
|
+
}, n.cancelled) return o({ completed: !1 }), {
|
|
415
|
+
immediate: !0,
|
|
416
|
+
finished: s
|
|
417
|
+
};
|
|
418
|
+
if (e.setAttribute("data-motion-state", L(t)), z() || te(e) <= 0) return l(!0), {
|
|
419
|
+
immediate: !0,
|
|
420
|
+
finished: s
|
|
421
|
+
};
|
|
422
|
+
let f = te(e);
|
|
423
|
+
return e.addEventListener("transitionend", u), e.addEventListener("animationend", u), i = window.setTimeout(() => l(!0), Math.ceil(f)), a = B((e) => {
|
|
424
|
+
e && l(!0);
|
|
425
|
+
}), {
|
|
426
|
+
immediate: !1,
|
|
427
|
+
finished: s
|
|
428
|
+
};
|
|
429
|
+
}, re = () => {
|
|
430
|
+
let e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new Set(), n = (n, r, i, a) => {
|
|
431
|
+
e.get(n)?.cancel();
|
|
432
|
+
let o = V();
|
|
433
|
+
e.set(n, o), t.add(n);
|
|
434
|
+
let s = ne(n, r, o);
|
|
435
|
+
a?.();
|
|
436
|
+
let c = () => {
|
|
437
|
+
o.cancelled || (t.delete(n), i?.());
|
|
438
|
+
};
|
|
439
|
+
if (s.immediate) {
|
|
440
|
+
c();
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
443
|
+
s.finished.then((e) => {
|
|
444
|
+
!e.completed || o.cancelled || c();
|
|
445
|
+
});
|
|
446
|
+
};
|
|
447
|
+
return {
|
|
448
|
+
enter: (e, t, r) => n(e, "enter", t, r),
|
|
449
|
+
exit: (e, t, r) => n(e, "exit", t, r),
|
|
450
|
+
cancel: (n) => {
|
|
451
|
+
e.get(n)?.cancel(), t.delete(n);
|
|
452
|
+
},
|
|
453
|
+
destroy: () => {
|
|
454
|
+
t.forEach((t) => e.get(t)?.cancel()), t.clear();
|
|
455
|
+
}
|
|
456
|
+
};
|
|
457
|
+
}, ie = {
|
|
358
458
|
root: typeof document < "u" ? document : {},
|
|
359
459
|
accordionSelector: "[accordion]",
|
|
360
460
|
triggerSelector: "[accordion-item]"
|
|
361
|
-
},
|
|
461
|
+
}, ae = (e) => Array.from(e), oe = "juice-accordion-trigger", se = "juice-accordion-panel", ce = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, le = A(), ue = (e) => e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "accordion", de = (e) => e.getAttribute("motion") === "accordion", fe = (e, t) => {
|
|
462
|
+
if (t && de(t)) {
|
|
463
|
+
let e = t.getAttribute("data-motion-state");
|
|
464
|
+
if (e === "exiting") return !1;
|
|
465
|
+
if (e === "entering" || e === "entered") return !0;
|
|
466
|
+
}
|
|
467
|
+
return t ? !t.hasAttribute("hidden") : e.getAttribute("aria-expanded") === "true";
|
|
468
|
+
}, pe = (e, t, n) => {
|
|
362
469
|
let r = String(n);
|
|
363
470
|
if (e.getAttribute("aria-expanded") !== r && e.setAttribute("aria-expanded", r), !t) return;
|
|
364
|
-
t.hidden !== !n && (t.hidden = !n);
|
|
365
471
|
let i = String(!n);
|
|
366
472
|
t.getAttribute("aria-hidden") !== i && t.setAttribute("aria-hidden", i);
|
|
367
|
-
},
|
|
473
|
+
}, me = (e = {}) => {
|
|
368
474
|
if (typeof window > "u" || typeof document > "u") return {
|
|
369
475
|
destroy: () => {},
|
|
370
476
|
sync: () => {},
|
|
@@ -373,14 +479,47 @@ var A = () => {
|
|
|
373
479
|
toggle: () => {}
|
|
374
480
|
};
|
|
375
481
|
let t = {
|
|
376
|
-
...
|
|
482
|
+
...ie,
|
|
377
483
|
...e
|
|
378
|
-
}, n = t.root ?? document, r = n, i = ()
|
|
484
|
+
}, n = t.root ?? document, r = n, i = re(), a = (e, t) => {
|
|
485
|
+
i.cancel(e), e.hidden !== !t && (e.hidden = !t), e.style.removeProperty("height"), (de(e) || e.hasAttribute("data-motion-state")) && e.setAttribute("data-motion-state", t ? "entered" : "exited");
|
|
486
|
+
}, o = (e) => {
|
|
487
|
+
let t = e.getAttribute("data-motion-state");
|
|
488
|
+
if (t === "entering") return;
|
|
489
|
+
if (!e.hidden && t !== "exiting" && t !== "exited") {
|
|
490
|
+
t !== "entered" && e.setAttribute("data-motion-state", "entered");
|
|
491
|
+
return;
|
|
492
|
+
}
|
|
493
|
+
let n = t === "exiting";
|
|
494
|
+
e.hidden = !1;
|
|
495
|
+
let r = n ? e.getBoundingClientRect().height : 0, a = e.scrollHeight;
|
|
496
|
+
e.style.height = `${r}px`, i.enter(e, () => {
|
|
497
|
+
e.style.removeProperty("height");
|
|
498
|
+
}, () => {
|
|
499
|
+
e.style.height = `${a}px`;
|
|
500
|
+
});
|
|
501
|
+
}, s = (e) => {
|
|
502
|
+
if (e.hidden || e.getAttribute("data-motion-state") === "exiting") return;
|
|
503
|
+
let t = e.scrollHeight;
|
|
504
|
+
e.style.height = `${t}px`, i.exit(e, () => {
|
|
505
|
+
e.hidden = !0, e.style.removeProperty("height");
|
|
506
|
+
}, () => {
|
|
507
|
+
e.style.height = "0px";
|
|
508
|
+
});
|
|
509
|
+
}, c = (e, t, n) => {
|
|
510
|
+
if (pe(e, t, n), t) {
|
|
511
|
+
if (!de(t) || z()) {
|
|
512
|
+
a(t, n);
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
n ? o(t) : s(t);
|
|
516
|
+
}
|
|
517
|
+
}, l = () => ae(n.querySelectorAll(t.accordionSelector)), u = (e) => ae(e.querySelectorAll(t.triggerSelector)).filter((n) => n.closest(t.accordionSelector) === e), d = () => l().flatMap((e) => u(e)), f = 0, p = null, m = (e) => (f += 1, `${e}-${f}`), h = (e) => {
|
|
379
518
|
if (!e) return null;
|
|
380
519
|
let n = e.closest(t.accordionSelector);
|
|
381
520
|
return n instanceof HTMLElement ? n : null;
|
|
382
|
-
},
|
|
383
|
-
let n =
|
|
521
|
+
}, g = (e) => {
|
|
522
|
+
let n = h(e);
|
|
384
523
|
if (!n) return null;
|
|
385
524
|
let r = e.getAttribute("aria-controls");
|
|
386
525
|
if (r) {
|
|
@@ -393,78 +532,78 @@ var A = () => {
|
|
|
393
532
|
i = i.nextElementSibling;
|
|
394
533
|
}
|
|
395
534
|
return null;
|
|
396
|
-
},
|
|
535
|
+
}, _ = (e) => {
|
|
397
536
|
if (e) {
|
|
398
|
-
if (e.matches(t.triggerSelector) &&
|
|
537
|
+
if (e.matches(t.triggerSelector) && h(e)) return e;
|
|
399
538
|
let n = e.closest(t.triggerSelector);
|
|
400
|
-
if (n instanceof HTMLElement &&
|
|
539
|
+
if (n instanceof HTMLElement && h(n)) return n;
|
|
401
540
|
}
|
|
402
|
-
return
|
|
403
|
-
},
|
|
541
|
+
return d()[0] ?? null;
|
|
542
|
+
}, v = (e) => {
|
|
404
543
|
let t = e.getAttribute("name");
|
|
405
|
-
return t ?
|
|
406
|
-
},
|
|
407
|
-
let n =
|
|
544
|
+
return t ? ue(t) : null;
|
|
545
|
+
}, y = (e, t) => {
|
|
546
|
+
let n = h(e);
|
|
408
547
|
if (!n) return;
|
|
409
|
-
let r =
|
|
410
|
-
e.id ||=
|
|
411
|
-
},
|
|
412
|
-
let t =
|
|
548
|
+
let r = u(n), i = Math.max(0, r.indexOf(e)), a = v(n), o = r.length > 1 ? `-${i + 1}` : "";
|
|
549
|
+
e.id ||= a ? `${a}-trigger${o}` : m(oe), ce(e) || (e.setAttribute("role", "button"), e.hasAttribute("tabindex") || e.setAttribute("tabindex", "0")), t && (t.id ||= a ? `${a}-panel${o}` : m(se), e.getAttribute("aria-controls") !== t.id && e.setAttribute("aria-controls", t.id), t.getAttribute("role") !== "region" && t.setAttribute("role", "region"), t.getAttribute("aria-labelledby") !== e.id && t.setAttribute("aria-labelledby", e.id));
|
|
550
|
+
}, b = (e) => {
|
|
551
|
+
let t = _(e);
|
|
413
552
|
if (!t) return;
|
|
414
|
-
let n =
|
|
415
|
-
|
|
416
|
-
},
|
|
417
|
-
let t =
|
|
553
|
+
let n = g(t);
|
|
554
|
+
y(t, n), c(t, n, !0), p = t;
|
|
555
|
+
}, x = (e) => {
|
|
556
|
+
let t = _(e);
|
|
418
557
|
if (!t) return;
|
|
419
|
-
let n =
|
|
420
|
-
|
|
421
|
-
},
|
|
422
|
-
let t =
|
|
558
|
+
let n = g(t);
|
|
559
|
+
y(t, n), c(t, n, !1), t === p && (p = d().find((e) => e !== t && fe(e, g(e))) ?? null);
|
|
560
|
+
}, S = (e) => {
|
|
561
|
+
let t = _(e);
|
|
423
562
|
if (t) {
|
|
424
|
-
if (
|
|
425
|
-
|
|
563
|
+
if (fe(t, g(t))) {
|
|
564
|
+
x(t);
|
|
426
565
|
return;
|
|
427
566
|
}
|
|
428
|
-
|
|
567
|
+
b(t);
|
|
429
568
|
}
|
|
430
|
-
},
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
let t =
|
|
434
|
-
if (
|
|
435
|
-
|
|
569
|
+
}, C = () => {
|
|
570
|
+
l().forEach((e) => {
|
|
571
|
+
u(e).forEach((e) => {
|
|
572
|
+
let t = g(e);
|
|
573
|
+
if (y(e, t), t) {
|
|
574
|
+
c(e, t, fe(e, t));
|
|
436
575
|
return;
|
|
437
576
|
}
|
|
438
577
|
e.hasAttribute("aria-expanded") || e.setAttribute("aria-expanded", "false");
|
|
439
578
|
});
|
|
440
579
|
});
|
|
441
|
-
},
|
|
580
|
+
}, w = (e) => {
|
|
442
581
|
let n = e.target;
|
|
443
582
|
if (!(n instanceof Element)) return;
|
|
444
583
|
let r = n.closest(t.triggerSelector);
|
|
445
|
-
!(r instanceof HTMLElement) || !
|
|
446
|
-
},
|
|
584
|
+
!(r instanceof HTMLElement) || !h(r) || le(e) && S(r);
|
|
585
|
+
}, T = (e) => {
|
|
447
586
|
let n = e.closest(t.triggerSelector);
|
|
448
|
-
return n instanceof HTMLElement &&
|
|
449
|
-
},
|
|
587
|
+
return n instanceof HTMLElement && h(n) && fe(n, g(n)) ? n : d().filter((e) => fe(e, g(e))).find((t) => g(t)?.contains(e)) || (p && h(p) && fe(p, g(p)) ? p : null);
|
|
588
|
+
}, E = (e) => {
|
|
450
589
|
if (!(e instanceof KeyboardEvent)) return;
|
|
451
590
|
let n = e.target;
|
|
452
591
|
if (!(n instanceof Element)) return;
|
|
453
592
|
if (e.key === "Escape") {
|
|
454
|
-
let t =
|
|
455
|
-
if (!t || !
|
|
456
|
-
e.preventDefault(),
|
|
593
|
+
let t = T(n);
|
|
594
|
+
if (!t || !le(e)) return;
|
|
595
|
+
e.preventDefault(), x(t), t.focus();
|
|
457
596
|
return;
|
|
458
597
|
}
|
|
459
598
|
if (e.key !== "Enter" && e.key !== " ") return;
|
|
460
599
|
let r = n.closest(t.triggerSelector);
|
|
461
|
-
!(r instanceof HTMLElement) || !
|
|
462
|
-
},
|
|
463
|
-
|
|
464
|
-
|
|
600
|
+
!(r instanceof HTMLElement) || !h(r) || ce(r) || le(e) && (e.preventDefault(), S(r));
|
|
601
|
+
}, D = !1, O = () => {
|
|
602
|
+
D || (D = !0, requestAnimationFrame(() => {
|
|
603
|
+
D = !1, C();
|
|
465
604
|
}));
|
|
466
|
-
},
|
|
467
|
-
return r.addEventListener("click",
|
|
605
|
+
}, k = typeof MutationObserver < "u" ? new MutationObserver(() => O()) : null;
|
|
606
|
+
return r.addEventListener("click", w), r.addEventListener("keydown", E), k && n instanceof Node && k.observe(n, {
|
|
468
607
|
childList: !0,
|
|
469
608
|
subtree: !0,
|
|
470
609
|
attributes: !0,
|
|
@@ -475,41 +614,41 @@ var A = () => {
|
|
|
475
614
|
"accordion",
|
|
476
615
|
"accordion-item"
|
|
477
616
|
]
|
|
478
|
-
}),
|
|
617
|
+
}), C(), {
|
|
479
618
|
destroy: () => {
|
|
480
|
-
r.removeEventListener("click",
|
|
619
|
+
r.removeEventListener("click", w), r.removeEventListener("keydown", E), k?.disconnect(), i.destroy();
|
|
481
620
|
},
|
|
482
|
-
sync:
|
|
483
|
-
expand:
|
|
484
|
-
collapse:
|
|
485
|
-
toggle:
|
|
621
|
+
sync: C,
|
|
622
|
+
expand: b,
|
|
623
|
+
collapse: x,
|
|
624
|
+
toggle: S
|
|
486
625
|
};
|
|
487
|
-
},
|
|
488
|
-
|
|
489
|
-
},
|
|
490
|
-
|
|
626
|
+
}, he = (e = {}) => me(e), ge = null, _e = !1, ve = null, ye = () => {
|
|
627
|
+
ve &&= (document.removeEventListener("DOMContentLoaded", ve), null);
|
|
628
|
+
}, be = () => typeof window > "u" || typeof document > "u" ? null : (_e = !1, ye(), ge ? (ge.sync(), ge) : (ge = me(), ge)), xe = () => {
|
|
629
|
+
_e = !0, ye(), ge?.destroy(), ge = null;
|
|
491
630
|
};
|
|
492
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
493
|
-
|
|
494
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
631
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (ve = () => {
|
|
632
|
+
ve = null, _e || be();
|
|
633
|
+
}, document.addEventListener("DOMContentLoaded", ve)) : be());
|
|
495
634
|
//#endregion
|
|
496
635
|
//#region src/js/src/tabs/tabs-runtime.ts
|
|
497
|
-
var
|
|
636
|
+
var Se = {
|
|
498
637
|
root: typeof document < "u" ? document : {},
|
|
499
638
|
tabsSelector: "[tabs]",
|
|
500
639
|
listSelector: "[tabs-list]",
|
|
501
640
|
triggerSelector: "[tab]",
|
|
502
641
|
panelSelector: "[tab-panel]"
|
|
503
|
-
},
|
|
642
|
+
}, Ce = (e) => Array.from(e), we = "juice-tabs-trigger", Te = "juice-tabs-panel", Ee = A(), De = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, Oe = (e) => e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "tabs", ke = (e) => e instanceof HTMLElement ? e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement ? !0 : e.isContentEditable : !1, Ae = (e = {}) => {
|
|
504
643
|
if (typeof window > "u" || typeof document > "u") return {
|
|
505
644
|
destroy: () => {},
|
|
506
645
|
sync: () => {},
|
|
507
646
|
select: () => {}
|
|
508
647
|
};
|
|
509
648
|
let t = {
|
|
510
|
-
...
|
|
649
|
+
...Se,
|
|
511
650
|
...e
|
|
512
|
-
}, n = t.root ?? document, r = n, i = () =>
|
|
651
|
+
}, n = t.root ?? document, r = n, i = () => Ce(n.querySelectorAll(t.tabsSelector)), a = (e) => {
|
|
513
652
|
let n = e.querySelector(`:scope > ${t.listSelector}`);
|
|
514
653
|
return n instanceof HTMLElement ? n : null;
|
|
515
654
|
}, o = (e) => {
|
|
@@ -529,11 +668,11 @@ var ce = {
|
|
|
529
668
|
let n = a(e) ?? e, r = /* @__PURE__ */ new Set(), i = [], o = (t) => {
|
|
530
669
|
t instanceof HTMLElement && (!c(t, e) || r.has(t) || (r.add(t), i.push(t)));
|
|
531
670
|
};
|
|
532
|
-
return
|
|
671
|
+
return Ce(n.children).forEach(o), Ce(n.querySelectorAll(t.triggerSelector)).forEach(o), Ce(n.querySelectorAll("[role=\"tab\"]")).forEach(o), i.sort((e, t) => {
|
|
533
672
|
let n = e.compareDocumentPosition(t);
|
|
534
673
|
return n & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
535
674
|
});
|
|
536
|
-
}, u = (e) =>
|
|
675
|
+
}, u = (e) => Ce(e.querySelectorAll(t.panelSelector)).filter((t) => o(t) === e), d = () => i().flatMap((e) => l(e)), f = 0, p = (e) => (f += 1, `${e}-${f}`), m = (e) => {
|
|
537
676
|
let n = o(e);
|
|
538
677
|
if (!n) return null;
|
|
539
678
|
let r = e.getAttribute("aria-controls");
|
|
@@ -563,7 +702,7 @@ var ce = {
|
|
|
563
702
|
return d()[0] ?? null;
|
|
564
703
|
}, g = (e) => {
|
|
565
704
|
let t = e.getAttribute("name");
|
|
566
|
-
return t ?
|
|
705
|
+
return t ? Oe(t) : null;
|
|
567
706
|
}, _ = (e) => {
|
|
568
707
|
let t = a(e), n = u(e), r = t ?? (n.length === 0 ? e : null);
|
|
569
708
|
if (!r) return;
|
|
@@ -575,7 +714,7 @@ var ce = {
|
|
|
575
714
|
if (!n) return;
|
|
576
715
|
_(n);
|
|
577
716
|
let r = l(n), i = Math.max(0, r.indexOf(e)), a = g(n), s = r.length > 1 ? `-${i + 1}` : "";
|
|
578
|
-
e.id ||= a ? `${a}-tab${s}` : p(
|
|
717
|
+
e.id ||= a ? `${a}-tab${s}` : p(we), e.getAttribute("role") !== "tab" && e.setAttribute("role", "tab"), !De(e) && !e.hasAttribute("tabindex") && e.setAttribute("tabindex", "-1"), t && (t.id ||= a ? `${a}-panel${s}` : p(Te), e.getAttribute("aria-controls") !== t.id && e.setAttribute("aria-controls", t.id), t.getAttribute("role") !== "tabpanel" && t.setAttribute("role", "tabpanel"), t.getAttribute("aria-labelledby") !== e.id && t.setAttribute("aria-labelledby", e.id));
|
|
579
718
|
}, y = (e) => e.hasAttribute("active") || e.getAttribute("aria-selected") === "true", b = (e, t, n) => {
|
|
580
719
|
n ? e.hasAttribute("active") || e.setAttribute("active", "") : e.hasAttribute("active") && e.removeAttribute("active");
|
|
581
720
|
let r = String(n);
|
|
@@ -621,7 +760,7 @@ var ce = {
|
|
|
621
760
|
let t = e.target;
|
|
622
761
|
if (!(t instanceof Element)) return;
|
|
623
762
|
let n = T(t);
|
|
624
|
-
n &&
|
|
763
|
+
n && Ee(e) && S(n);
|
|
625
764
|
}, D = (e, t) => {
|
|
626
765
|
let n = o(e);
|
|
627
766
|
if (!n) return;
|
|
@@ -632,30 +771,30 @@ var ce = {
|
|
|
632
771
|
}, O = (e) => {
|
|
633
772
|
if (!(e instanceof KeyboardEvent)) return;
|
|
634
773
|
let t = e.target;
|
|
635
|
-
if (!(t instanceof Element) ||
|
|
774
|
+
if (!(t instanceof Element) || ke(t)) return;
|
|
636
775
|
let n = T(t);
|
|
637
776
|
if (n && !(e.key === "Escape" || e.key === "ArrowUp" || e.key === "ArrowDown")) {
|
|
638
777
|
if (e.key === "ArrowRight") {
|
|
639
|
-
if (!
|
|
778
|
+
if (!Ee(e)) return;
|
|
640
779
|
e.preventDefault(), D(n, (e, t) => (e + 1) % t);
|
|
641
780
|
return;
|
|
642
781
|
}
|
|
643
782
|
if (e.key === "ArrowLeft") {
|
|
644
|
-
if (!
|
|
783
|
+
if (!Ee(e)) return;
|
|
645
784
|
e.preventDefault(), D(n, (e, t) => (e - 1 + t) % t);
|
|
646
785
|
return;
|
|
647
786
|
}
|
|
648
787
|
if (e.key === "Home") {
|
|
649
|
-
if (!
|
|
788
|
+
if (!Ee(e)) return;
|
|
650
789
|
e.preventDefault(), D(n, () => 0);
|
|
651
790
|
return;
|
|
652
791
|
}
|
|
653
792
|
if (e.key === "End") {
|
|
654
|
-
if (!
|
|
793
|
+
if (!Ee(e)) return;
|
|
655
794
|
e.preventDefault(), D(n, (e, t) => t - 1);
|
|
656
795
|
return;
|
|
657
796
|
}
|
|
658
|
-
e.key !== "Enter" && e.key !== " " ||
|
|
797
|
+
e.key !== "Enter" && e.key !== " " || De(n) || Ee(e) && (e.preventDefault(), S(n));
|
|
659
798
|
}
|
|
660
799
|
}, k = !1, A = () => {
|
|
661
800
|
k || (k = !0, requestAnimationFrame(() => {
|
|
@@ -683,39 +822,39 @@ var ce = {
|
|
|
683
822
|
sync: w,
|
|
684
823
|
select: S
|
|
685
824
|
};
|
|
686
|
-
},
|
|
687
|
-
|
|
688
|
-
},
|
|
689
|
-
|
|
825
|
+
}, je = (e = {}) => Ae(e), Me = null, Ne = !1, Pe = null, Fe = () => {
|
|
826
|
+
Pe &&= (document.removeEventListener("DOMContentLoaded", Pe), null);
|
|
827
|
+
}, Ie = () => typeof window > "u" || typeof document > "u" ? null : (Ne = !1, Fe(), Me ? (Me.sync(), Me) : (Me = Ae(), Me)), Le = () => {
|
|
828
|
+
Ne = !0, Fe(), Me?.destroy(), Me = null;
|
|
690
829
|
};
|
|
691
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
692
|
-
|
|
693
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
830
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (Pe = () => {
|
|
831
|
+
Pe = null, Ne || Ie();
|
|
832
|
+
}, document.addEventListener("DOMContentLoaded", Pe)) : Ie());
|
|
694
833
|
//#endregion
|
|
695
834
|
//#region src/js/src/shared/focus.ts
|
|
696
|
-
var
|
|
835
|
+
var Re = [
|
|
697
836
|
"a[href]",
|
|
698
837
|
"button:not([disabled])",
|
|
699
838
|
"textarea:not([disabled])",
|
|
700
839
|
"input:not([disabled]):not([type=\"hidden\"])",
|
|
701
840
|
"select:not([disabled])",
|
|
702
841
|
"[tabindex]:not([tabindex=\"-1\"])"
|
|
703
|
-
].join(","),
|
|
704
|
-
let t = e.querySelector("[autofocus]"), n =
|
|
842
|
+
].join(","), ze = (e) => !(e.closest("[hidden]") || e.getAttribute("aria-hidden") === "true" || e instanceof HTMLButtonElement && e.disabled || e instanceof HTMLInputElement && e.disabled), Be = (e) => Array.from(e.querySelectorAll(Re)).filter(ze), Ve = (e) => {
|
|
843
|
+
let t = e.querySelector("[autofocus]"), n = Be(e), r = (t && ze(t) ? t : null) ?? n[0] ?? e;
|
|
705
844
|
r === e && !e.hasAttribute("tabindex") && e.setAttribute("tabindex", "-1"), r.focus();
|
|
706
|
-
},
|
|
845
|
+
}, He = (e, t) => {
|
|
707
846
|
if (e.key !== "Tab") return !1;
|
|
708
|
-
let n =
|
|
847
|
+
let n = Be(t), r = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
709
848
|
if (n.length === 0) return e.preventDefault(), t.hasAttribute("tabindex") || t.setAttribute("tabindex", "-1"), t.focus(), !0;
|
|
710
849
|
let i = n[0], a = n[n.length - 1];
|
|
711
850
|
return e.shiftKey ? !r || r === i || !t.contains(r) ? (e.preventDefault(), a.focus(), !0) : !0 : !r || r === a || !t.contains(r) ? (e.preventDefault(), i.focus(), !0) : !0;
|
|
712
|
-
},
|
|
851
|
+
}, Ue = {
|
|
713
852
|
root: typeof document < "u" ? document : {},
|
|
714
853
|
overlaySelector: "[modal-overlay]",
|
|
715
854
|
dialogSelector: "[modal]",
|
|
716
855
|
closeSelector: "[modal-close]",
|
|
717
856
|
closeOnBackdrop: !0
|
|
718
|
-
},
|
|
857
|
+
}, We = (e) => Array.from(e), Ge = "juice-modal-overlay", Ke = "juice-modal-dialog", qe = "juice-modal-title", Je = A(), Ye = /* @__PURE__ */ new WeakMap(), Xe = (e) => e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "modal", Ze = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, W = (e) => !e.hasAttribute("hidden"), Qe = (e) => e.getAttribute("data-motion-state") === "exiting", $e = (e = {}) => {
|
|
719
858
|
if (typeof window > "u" || typeof document > "u") return {
|
|
720
859
|
destroy: () => {},
|
|
721
860
|
sync: () => {},
|
|
@@ -724,158 +863,160 @@ var we = [
|
|
|
724
863
|
toggle: () => {}
|
|
725
864
|
};
|
|
726
865
|
let t = {
|
|
727
|
-
...
|
|
866
|
+
...Ue,
|
|
728
867
|
...e
|
|
729
|
-
}, n = t.root ?? document, r = n, i =
|
|
868
|
+
}, n = t.root ?? document, r = n, i = re(), a = 0, o = (e) => (a += 1, `${e}-${a}`), s = () => We(n.querySelectorAll(t.overlaySelector)), c = (e) => {
|
|
730
869
|
if (!e) return null;
|
|
731
870
|
let n = e.closest(t.overlaySelector);
|
|
732
871
|
return n instanceof HTMLElement ? n : null;
|
|
733
|
-
},
|
|
734
|
-
if (
|
|
872
|
+
}, l = (e) => P(e, n), u = (e) => e?.matches(t.overlaySelector) ? n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : s().includes(e) : !1, d = (e) => We(e.querySelectorAll(t.dialogSelector)).find((t) => c(t) === e) || We(e.querySelectorAll("[role=\"dialog\"]")).find((t) => c(t) === e) || (We(e.children).find((e) => e instanceof HTMLElement) ?? e), f = (e) => {
|
|
873
|
+
if (c(e)) return null;
|
|
735
874
|
for (let t of N(e)) {
|
|
736
|
-
let e =
|
|
737
|
-
if (e &&
|
|
875
|
+
let e = l(t);
|
|
876
|
+
if (e && u(e)) return e;
|
|
738
877
|
}
|
|
739
878
|
return null;
|
|
740
|
-
},
|
|
879
|
+
}, p = (e) => {
|
|
741
880
|
if (e) {
|
|
742
|
-
if (
|
|
743
|
-
let n =
|
|
744
|
-
if (n &&
|
|
881
|
+
if (u(e)) return e;
|
|
882
|
+
let n = c(e);
|
|
883
|
+
if (n && u(n)) return n;
|
|
745
884
|
if (e.matches(t.closeSelector)) {
|
|
746
|
-
let t =
|
|
747
|
-
if (t &&
|
|
885
|
+
let t = c(e);
|
|
886
|
+
if (t && u(t)) return t;
|
|
748
887
|
}
|
|
749
|
-
let r =
|
|
888
|
+
let r = f(e);
|
|
750
889
|
if (r) return r;
|
|
751
890
|
let i = e.closest("[aria-controls]");
|
|
752
891
|
if (i instanceof HTMLElement) {
|
|
753
|
-
let e =
|
|
892
|
+
let e = f(i);
|
|
754
893
|
if (e) return e;
|
|
755
894
|
}
|
|
756
895
|
}
|
|
757
|
-
return
|
|
758
|
-
},
|
|
896
|
+
return s().find(W) ?? s()[0] ?? null;
|
|
897
|
+
}, m = (e) => {
|
|
759
898
|
let t = e.getAttribute("name");
|
|
760
|
-
return t ?
|
|
761
|
-
},
|
|
899
|
+
return t ? Xe(t) : e.id ? Xe(e.id) : null;
|
|
900
|
+
}, h = (e) => e.id ? We(document.querySelectorAll("[aria-controls]")).filter((t) => c(t) ? !1 : N(t).includes(e.id)) : [], g = (e, t) => {
|
|
762
901
|
let n = String(t);
|
|
763
|
-
|
|
902
|
+
h(e).forEach((e) => {
|
|
764
903
|
e.getAttribute("aria-expanded") !== n && e.setAttribute("aria-expanded", n), e.hasAttribute("aria-haspopup") || e.setAttribute("aria-haspopup", "dialog");
|
|
765
904
|
});
|
|
766
|
-
},
|
|
767
|
-
let n =
|
|
768
|
-
if (e.id ||= r ? `${r}-overlay` :
|
|
905
|
+
}, _ = (e) => {
|
|
906
|
+
let n = d(e), r = m(e);
|
|
907
|
+
if (e.id ||= r ? `${r}-overlay` : o(Ge), n.id ||= r ? `${r}-dialog` : o(Ke), n.getAttribute("role") !== "dialog" && n.setAttribute("role", "dialog"), n.getAttribute("aria-modal") !== "true" && n.setAttribute("aria-modal", "true"), !n.hasAttribute("aria-labelledby") && !n.hasAttribute("aria-label")) {
|
|
769
908
|
let e = n.querySelector("[modal-header] :is(h1,h2,h3,h4,h5,h6), :is(h1,h2,h3,h4,h5,h6)");
|
|
770
|
-
e && (e.id ||= r ? `${r}-title` :
|
|
909
|
+
e && (e.id ||= r ? `${r}-title` : o(qe), n.setAttribute("aria-labelledby", e.id));
|
|
771
910
|
}
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
}),
|
|
775
|
-
|
|
911
|
+
We(e.querySelectorAll(t.closeSelector)).filter((t) => c(t) === e).forEach((e) => {
|
|
912
|
+
Ze(e) || (e.setAttribute("role", "button"), e.hasAttribute("tabindex") || e.setAttribute("tabindex", "0")), !e.hasAttribute("aria-label") && !e.hasAttribute("aria-labelledby") && !e.textContent?.trim() && e.setAttribute("aria-label", "Close");
|
|
913
|
+
}), h(e).forEach((t) => {
|
|
914
|
+
Ze(t) || (t.setAttribute("role", "button"), t.hasAttribute("tabindex") || t.setAttribute("tabindex", "0")), t.hasAttribute("aria-haspopup") || t.setAttribute("aria-haspopup", "dialog"), t.hasAttribute("aria-expanded") || t.setAttribute("aria-expanded", String(W(e)));
|
|
776
915
|
});
|
|
777
|
-
},
|
|
916
|
+
}, v = (e, t) => {
|
|
778
917
|
let n = document.activeElement instanceof HTMLElement ? document.activeElement : null, r = t && !e.contains(t) ? t : n && !e.contains(n) ? n : null;
|
|
779
|
-
r &&
|
|
780
|
-
}, v = (e) => {
|
|
781
|
-
let t = Pe.get(e);
|
|
782
|
-
Pe.delete(e), t?.isConnected && t.focus();
|
|
918
|
+
r && Ye.set(e, r);
|
|
783
919
|
}, y = (e) => {
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
920
|
+
let t = Ye.get(e);
|
|
921
|
+
Ye.delete(e), t?.isConnected && t.focus();
|
|
922
|
+
}, b = (e) => {
|
|
923
|
+
Ve(d(e));
|
|
787
924
|
}, x = (e, t) => {
|
|
788
|
-
|
|
789
|
-
}, S = (e,
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
})
|
|
793
|
-
}, C = (e) => {
|
|
794
|
-
|
|
925
|
+
e.hidden !== !t && (e.hidden = !t);
|
|
926
|
+
}, S = (e, t) => {
|
|
927
|
+
!W(e) || Qe(e) || (_(e), i.exit(e, () => {
|
|
928
|
+
x(e, !1), g(e, !1), t ? y(e) : Ye.delete(e);
|
|
929
|
+
}));
|
|
930
|
+
}, C = (e, n) => {
|
|
931
|
+
s().concat(We(document.querySelectorAll(t.overlaySelector))).forEach((t) => {
|
|
932
|
+
t === e || !W(t) || Qe(t) || S(t, !1);
|
|
933
|
+
}), v(e, n), _(e), x(e, !0), g(e, !0), b(e), i.enter(e);
|
|
934
|
+
}, w = (e) => {
|
|
935
|
+
let t = p(e);
|
|
795
936
|
if (t) {
|
|
796
|
-
if (
|
|
797
|
-
|
|
937
|
+
if (W(t) && !Qe(t)) {
|
|
938
|
+
_(t), g(t, !0);
|
|
798
939
|
return;
|
|
799
940
|
}
|
|
800
|
-
|
|
941
|
+
C(t, e && f(e) === t ? e : e?.closest("[aria-controls]") instanceof HTMLElement && f(e.closest("[aria-controls]")) === t ? e.closest("[aria-controls]") : null);
|
|
801
942
|
}
|
|
802
|
-
}, w = (e) => {
|
|
803
|
-
let t = f(e);
|
|
804
|
-
!t || !G(t) || x(t, !0);
|
|
805
943
|
}, T = (e) => {
|
|
806
|
-
let t =
|
|
944
|
+
let t = p(e);
|
|
945
|
+
!t || !W(t) || Qe(t) || S(t, !0);
|
|
946
|
+
}, E = (e) => {
|
|
947
|
+
let t = p(e);
|
|
807
948
|
if (t) {
|
|
808
|
-
if (
|
|
809
|
-
|
|
949
|
+
if (W(t) && !Qe(t)) {
|
|
950
|
+
T(t);
|
|
810
951
|
return;
|
|
811
952
|
}
|
|
812
|
-
|
|
953
|
+
w(e ?? t);
|
|
813
954
|
}
|
|
814
|
-
},
|
|
815
|
-
|
|
816
|
-
|
|
955
|
+
}, D = () => {
|
|
956
|
+
s().forEach((e) => {
|
|
957
|
+
_(e), g(e, W(e));
|
|
817
958
|
});
|
|
818
|
-
},
|
|
819
|
-
if (!(e instanceof HTMLElement) ||
|
|
820
|
-
if (
|
|
959
|
+
}, O = (e) => t.closeOnBackdrop ? e.getAttribute("modal-overlay") !== "static" : !1, k = (e) => {
|
|
960
|
+
if (!(e instanceof HTMLElement) || c(e)) return null;
|
|
961
|
+
if (f(e)) return e;
|
|
821
962
|
let t = e.closest("[aria-controls]");
|
|
822
|
-
return t instanceof HTMLElement &&
|
|
823
|
-
},
|
|
963
|
+
return t instanceof HTMLElement && f(t) ? t : null;
|
|
964
|
+
}, A = (e) => {
|
|
824
965
|
let n = e.target;
|
|
825
966
|
if (!(n instanceof Element)) return;
|
|
826
|
-
let r =
|
|
827
|
-
if (r &&
|
|
967
|
+
let r = c(n instanceof HTMLElement ? n : n.parentElement);
|
|
968
|
+
if (r && u(r)) {
|
|
828
969
|
let i = n.closest(t.closeSelector) instanceof HTMLElement ? n.closest(t.closeSelector) : null;
|
|
829
|
-
if (i &&
|
|
830
|
-
if (!
|
|
831
|
-
|
|
970
|
+
if (i && c(i) === r) {
|
|
971
|
+
if (!Je(e)) return;
|
|
972
|
+
T(r);
|
|
832
973
|
return;
|
|
833
974
|
}
|
|
834
|
-
if (n === r &&
|
|
835
|
-
if (!
|
|
836
|
-
|
|
975
|
+
if (n === r && O(r)) {
|
|
976
|
+
if (!Je(e)) return;
|
|
977
|
+
T(r);
|
|
837
978
|
}
|
|
838
979
|
return;
|
|
839
980
|
}
|
|
840
|
-
let i =
|
|
841
|
-
i &&
|
|
842
|
-
},
|
|
981
|
+
let i = k(n);
|
|
982
|
+
i && Je(e) && E(i);
|
|
983
|
+
}, j = () => s().find((e) => W(e) && !Qe(e)) ?? s().find(W) ?? null, M = (e, t) => He(e, d(t)), F = (e) => {
|
|
843
984
|
if (!(e instanceof KeyboardEvent)) return;
|
|
844
985
|
let n = e.target;
|
|
845
986
|
if (!(n instanceof Element)) return;
|
|
846
|
-
let r =
|
|
987
|
+
let r = j();
|
|
847
988
|
if (r && e.key === "Escape") {
|
|
848
|
-
if (!
|
|
849
|
-
e.preventDefault(), e.stopPropagation(),
|
|
989
|
+
if (!Je(e)) return;
|
|
990
|
+
e.preventDefault(), e.stopPropagation(), T(r);
|
|
850
991
|
return;
|
|
851
992
|
}
|
|
852
993
|
if (r && e.key === "Tab") {
|
|
853
|
-
if (!
|
|
854
|
-
|
|
994
|
+
if (!Je(e)) return;
|
|
995
|
+
M(e, r);
|
|
855
996
|
return;
|
|
856
997
|
}
|
|
857
998
|
if (e.key !== "Enter" && e.key !== " ") return;
|
|
858
999
|
let i = n.closest(t.closeSelector);
|
|
859
|
-
if (i instanceof HTMLElement &&
|
|
860
|
-
if (!
|
|
861
|
-
e.preventDefault(),
|
|
1000
|
+
if (i instanceof HTMLElement && c(i) && !Ze(i)) {
|
|
1001
|
+
if (!Je(e)) return;
|
|
1002
|
+
e.preventDefault(), T(i);
|
|
862
1003
|
return;
|
|
863
1004
|
}
|
|
864
|
-
let a =
|
|
865
|
-
!a ||
|
|
866
|
-
},
|
|
867
|
-
let t =
|
|
1005
|
+
let a = k(n);
|
|
1006
|
+
!a || Ze(a) || Je(e) && (e.preventDefault(), E(a));
|
|
1007
|
+
}, I = (e) => {
|
|
1008
|
+
let t = j();
|
|
868
1009
|
if (!t) return;
|
|
869
1010
|
let n = e.target;
|
|
870
|
-
if (!(n instanceof Node) || t.contains(n) || !
|
|
871
|
-
let r =
|
|
872
|
-
(
|
|
873
|
-
},
|
|
874
|
-
|
|
875
|
-
|
|
1011
|
+
if (!(n instanceof Node) || t.contains(n) || !Je(e)) return;
|
|
1012
|
+
let r = d(t);
|
|
1013
|
+
(Be(r)[0] ?? r).focus();
|
|
1014
|
+
}, L = !1, R = () => {
|
|
1015
|
+
L || (L = !0, requestAnimationFrame(() => {
|
|
1016
|
+
L = !1, D();
|
|
876
1017
|
}));
|
|
877
|
-
},
|
|
878
|
-
return r.addEventListener("click",
|
|
1018
|
+
}, z = typeof MutationObserver < "u" ? new MutationObserver(() => R()) : null;
|
|
1019
|
+
return r.addEventListener("click", A), r.addEventListener("keydown", F, !0), r.addEventListener("focusin", I, !0), z && n instanceof Node && z.observe(n, {
|
|
879
1020
|
childList: !0,
|
|
880
1021
|
subtree: !0,
|
|
881
1022
|
attributes: !0,
|
|
@@ -888,32 +1029,32 @@ var we = [
|
|
|
888
1029
|
"modal",
|
|
889
1030
|
"modal-close"
|
|
890
1031
|
]
|
|
891
|
-
}),
|
|
1032
|
+
}), D(), {
|
|
892
1033
|
destroy: () => {
|
|
893
|
-
r.removeEventListener("click",
|
|
1034
|
+
r.removeEventListener("click", A), r.removeEventListener("keydown", F, !0), r.removeEventListener("focusin", I, !0), z?.disconnect(), i.destroy();
|
|
894
1035
|
},
|
|
895
|
-
sync:
|
|
896
|
-
open:
|
|
897
|
-
close:
|
|
898
|
-
toggle:
|
|
1036
|
+
sync: D,
|
|
1037
|
+
open: w,
|
|
1038
|
+
close: T,
|
|
1039
|
+
toggle: E
|
|
899
1040
|
};
|
|
900
|
-
},
|
|
901
|
-
|
|
902
|
-
},
|
|
903
|
-
|
|
1041
|
+
}, et = (e = {}) => $e(e), tt = null, nt = !1, rt = null, it = () => {
|
|
1042
|
+
rt &&= (document.removeEventListener("DOMContentLoaded", rt), null);
|
|
1043
|
+
}, at = () => typeof window > "u" || typeof document > "u" ? null : (nt = !1, it(), tt ? (tt.sync(), tt) : (tt = $e(), tt)), ot = () => {
|
|
1044
|
+
nt = !0, it(), tt?.destroy(), tt = null;
|
|
904
1045
|
};
|
|
905
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
906
|
-
|
|
907
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
1046
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (rt = () => {
|
|
1047
|
+
rt = null, nt || at();
|
|
1048
|
+
}, document.addEventListener("DOMContentLoaded", rt)) : at());
|
|
908
1049
|
//#endregion
|
|
909
1050
|
//#region src/js/src/drawer/drawer-runtime.ts
|
|
910
|
-
var
|
|
1051
|
+
var st = {
|
|
911
1052
|
root: typeof document < "u" ? document : {},
|
|
912
1053
|
overlaySelector: "[drawer-overlay]",
|
|
913
1054
|
dialogSelector: "[drawer]",
|
|
914
1055
|
closeSelector: "[drawer-close]",
|
|
915
1056
|
closeOnBackdrop: !0
|
|
916
|
-
},
|
|
1057
|
+
}, ct = (e) => Array.from(e), lt = "juice-drawer-overlay", ut = "juice-drawer-dialog", dt = "juice-drawer-title", G = A(), ft = /* @__PURE__ */ new WeakMap(), pt = (e) => e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "drawer", mt = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, K = (e) => !e.hasAttribute("hidden"), ht = (e) => e.getAttribute("data-motion-state") === "exiting", gt = (e = {}) => {
|
|
917
1058
|
if (typeof window > "u" || typeof document > "u") return {
|
|
918
1059
|
destroy: () => {},
|
|
919
1060
|
sync: () => {},
|
|
@@ -922,158 +1063,160 @@ var Ge = {
|
|
|
922
1063
|
toggle: () => {}
|
|
923
1064
|
};
|
|
924
1065
|
let t = {
|
|
925
|
-
...
|
|
1066
|
+
...st,
|
|
926
1067
|
...e
|
|
927
|
-
}, n = t.root ?? document, r = n, i =
|
|
1068
|
+
}, n = t.root ?? document, r = n, i = re(), a = 0, o = (e) => (a += 1, `${e}-${a}`), s = () => ct(n.querySelectorAll(t.overlaySelector)), c = (e) => {
|
|
928
1069
|
if (!e) return null;
|
|
929
1070
|
let n = e.closest(t.overlaySelector);
|
|
930
1071
|
return n instanceof HTMLElement ? n : null;
|
|
931
|
-
},
|
|
932
|
-
if (
|
|
1072
|
+
}, l = (e) => P(e, n), u = (e) => e?.matches(t.overlaySelector) ? n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : s().includes(e) : !1, d = (e) => ct(e.querySelectorAll(t.dialogSelector)).find((t) => c(t) === e) || ct(e.querySelectorAll("[role=\"dialog\"]")).find((t) => c(t) === e) || (ct(e.children).find((e) => e instanceof HTMLElement) ?? e), f = (e) => {
|
|
1073
|
+
if (c(e)) return null;
|
|
933
1074
|
for (let t of N(e)) {
|
|
934
|
-
let e =
|
|
935
|
-
if (e &&
|
|
1075
|
+
let e = l(t);
|
|
1076
|
+
if (e && u(e)) return e;
|
|
936
1077
|
}
|
|
937
1078
|
return null;
|
|
938
|
-
},
|
|
1079
|
+
}, p = (e) => {
|
|
939
1080
|
if (e) {
|
|
940
|
-
if (
|
|
941
|
-
let n =
|
|
942
|
-
if (n &&
|
|
1081
|
+
if (u(e)) return e;
|
|
1082
|
+
let n = c(e);
|
|
1083
|
+
if (n && u(n)) return n;
|
|
943
1084
|
if (e.matches(t.closeSelector)) {
|
|
944
|
-
let t =
|
|
945
|
-
if (t &&
|
|
1085
|
+
let t = c(e);
|
|
1086
|
+
if (t && u(t)) return t;
|
|
946
1087
|
}
|
|
947
|
-
let r =
|
|
1088
|
+
let r = f(e);
|
|
948
1089
|
if (r) return r;
|
|
949
1090
|
let i = e.closest("[aria-controls]");
|
|
950
1091
|
if (i instanceof HTMLElement) {
|
|
951
|
-
let e =
|
|
1092
|
+
let e = f(i);
|
|
952
1093
|
if (e) return e;
|
|
953
1094
|
}
|
|
954
1095
|
}
|
|
955
|
-
return
|
|
956
|
-
},
|
|
1096
|
+
return s().find(K) ?? s()[0] ?? null;
|
|
1097
|
+
}, m = (e) => {
|
|
957
1098
|
let t = e.getAttribute("name");
|
|
958
|
-
return t ?
|
|
959
|
-
},
|
|
1099
|
+
return t ? pt(t) : e.id ? pt(e.id) : null;
|
|
1100
|
+
}, h = (e) => e.id ? ct(document.querySelectorAll("[aria-controls]")).filter((t) => c(t) ? !1 : N(t).includes(e.id)) : [], g = (e, t) => {
|
|
960
1101
|
let n = String(t);
|
|
961
|
-
|
|
1102
|
+
h(e).forEach((e) => {
|
|
962
1103
|
e.getAttribute("aria-expanded") !== n && e.setAttribute("aria-expanded", n), e.hasAttribute("aria-haspopup") || e.setAttribute("aria-haspopup", "dialog");
|
|
963
1104
|
});
|
|
964
|
-
},
|
|
965
|
-
let n =
|
|
966
|
-
if (e.id ||= r ? `${r}-overlay` :
|
|
1105
|
+
}, _ = (e) => {
|
|
1106
|
+
let n = d(e), r = m(e);
|
|
1107
|
+
if (e.id ||= r ? `${r}-overlay` : o(lt), n.id ||= r ? `${r}-dialog` : o(ut), n.getAttribute("role") !== "dialog" && n.setAttribute("role", "dialog"), n.getAttribute("aria-modal") !== "true" && n.setAttribute("aria-modal", "true"), !n.hasAttribute("aria-labelledby") && !n.hasAttribute("aria-label")) {
|
|
967
1108
|
let e = n.querySelector("[drawer-header] :is(h1,h2,h3,h4,h5,h6), :is(h1,h2,h3,h4,h5,h6)");
|
|
968
|
-
e && (e.id ||= r ? `${r}-title` :
|
|
1109
|
+
e && (e.id ||= r ? `${r}-title` : o(dt), n.setAttribute("aria-labelledby", e.id));
|
|
969
1110
|
}
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
}),
|
|
973
|
-
|
|
1111
|
+
ct(e.querySelectorAll(t.closeSelector)).filter((t) => c(t) === e).forEach((e) => {
|
|
1112
|
+
mt(e) || (e.setAttribute("role", "button"), e.hasAttribute("tabindex") || e.setAttribute("tabindex", "0")), !e.hasAttribute("aria-label") && !e.hasAttribute("aria-labelledby") && !e.textContent?.trim() && e.setAttribute("aria-label", "Close");
|
|
1113
|
+
}), h(e).forEach((t) => {
|
|
1114
|
+
mt(t) || (t.setAttribute("role", "button"), t.hasAttribute("tabindex") || t.setAttribute("tabindex", "0")), t.hasAttribute("aria-haspopup") || t.setAttribute("aria-haspopup", "dialog"), t.hasAttribute("aria-expanded") || t.setAttribute("aria-expanded", String(K(e)));
|
|
974
1115
|
});
|
|
975
|
-
},
|
|
1116
|
+
}, v = (e, t) => {
|
|
976
1117
|
let n = document.activeElement instanceof HTMLElement ? document.activeElement : null, r = t && !e.contains(t) ? t : n && !e.contains(n) ? n : null;
|
|
977
|
-
r &&
|
|
978
|
-
}, v = (e) => {
|
|
979
|
-
let t = Xe.get(e);
|
|
980
|
-
Xe.delete(e), t?.isConnected && t.focus();
|
|
1118
|
+
r && ft.set(e, r);
|
|
981
1119
|
}, y = (e) => {
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
1120
|
+
let t = ft.get(e);
|
|
1121
|
+
ft.delete(e), t?.isConnected && t.focus();
|
|
1122
|
+
}, b = (e) => {
|
|
1123
|
+
Ve(d(e));
|
|
985
1124
|
}, x = (e, t) => {
|
|
986
|
-
|
|
987
|
-
}, S = (e,
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
})
|
|
991
|
-
}, C = (e) => {
|
|
992
|
-
|
|
1125
|
+
e.hidden !== !t && (e.hidden = !t);
|
|
1126
|
+
}, S = (e, t) => {
|
|
1127
|
+
!K(e) || ht(e) || (_(e), i.exit(e, () => {
|
|
1128
|
+
x(e, !1), g(e, !1), t ? y(e) : ft.delete(e);
|
|
1129
|
+
}));
|
|
1130
|
+
}, C = (e, n) => {
|
|
1131
|
+
s().concat(ct(document.querySelectorAll(t.overlaySelector))).forEach((t) => {
|
|
1132
|
+
t === e || !K(t) || ht(t) || S(t, !1);
|
|
1133
|
+
}), v(e, n), _(e), x(e, !0), g(e, !0), b(e), i.enter(e);
|
|
1134
|
+
}, w = (e) => {
|
|
1135
|
+
let t = p(e);
|
|
993
1136
|
if (t) {
|
|
994
|
-
if (
|
|
995
|
-
|
|
1137
|
+
if (K(t) && !ht(t)) {
|
|
1138
|
+
_(t), g(t, !0);
|
|
996
1139
|
return;
|
|
997
1140
|
}
|
|
998
|
-
|
|
1141
|
+
C(t, e && f(e) === t ? e : e?.closest("[aria-controls]") instanceof HTMLElement && f(e.closest("[aria-controls]")) === t ? e.closest("[aria-controls]") : null);
|
|
999
1142
|
}
|
|
1000
|
-
}, w = (e) => {
|
|
1001
|
-
let t = f(e);
|
|
1002
|
-
!t || !q(t) || x(t, !0);
|
|
1003
1143
|
}, T = (e) => {
|
|
1004
|
-
let t =
|
|
1144
|
+
let t = p(e);
|
|
1145
|
+
!t || !K(t) || ht(t) || S(t, !0);
|
|
1146
|
+
}, E = (e) => {
|
|
1147
|
+
let t = p(e);
|
|
1005
1148
|
if (t) {
|
|
1006
|
-
if (
|
|
1007
|
-
|
|
1149
|
+
if (K(t) && !ht(t)) {
|
|
1150
|
+
T(t);
|
|
1008
1151
|
return;
|
|
1009
1152
|
}
|
|
1010
|
-
|
|
1153
|
+
w(e ?? t);
|
|
1011
1154
|
}
|
|
1012
|
-
},
|
|
1013
|
-
|
|
1014
|
-
|
|
1155
|
+
}, D = () => {
|
|
1156
|
+
s().forEach((e) => {
|
|
1157
|
+
_(e), g(e, K(e));
|
|
1015
1158
|
});
|
|
1016
|
-
},
|
|
1017
|
-
if (!(e instanceof HTMLElement) ||
|
|
1018
|
-
if (
|
|
1159
|
+
}, O = (e) => t.closeOnBackdrop ? e.getAttribute("drawer-overlay") !== "static" : !1, k = (e) => {
|
|
1160
|
+
if (!(e instanceof HTMLElement) || c(e)) return null;
|
|
1161
|
+
if (f(e)) return e;
|
|
1019
1162
|
let t = e.closest("[aria-controls]");
|
|
1020
|
-
return t instanceof HTMLElement &&
|
|
1021
|
-
},
|
|
1163
|
+
return t instanceof HTMLElement && f(t) ? t : null;
|
|
1164
|
+
}, A = (e) => {
|
|
1022
1165
|
let n = e.target;
|
|
1023
1166
|
if (!(n instanceof Element)) return;
|
|
1024
|
-
let r =
|
|
1025
|
-
if (r &&
|
|
1167
|
+
let r = c(n instanceof HTMLElement ? n : n.parentElement);
|
|
1168
|
+
if (r && u(r)) {
|
|
1026
1169
|
let i = n.closest(t.closeSelector) instanceof HTMLElement ? n.closest(t.closeSelector) : null;
|
|
1027
|
-
if (i &&
|
|
1028
|
-
if (!
|
|
1029
|
-
|
|
1170
|
+
if (i && c(i) === r) {
|
|
1171
|
+
if (!G(e)) return;
|
|
1172
|
+
T(r);
|
|
1030
1173
|
return;
|
|
1031
1174
|
}
|
|
1032
|
-
if (n === r &&
|
|
1033
|
-
if (!
|
|
1034
|
-
|
|
1175
|
+
if (n === r && O(r)) {
|
|
1176
|
+
if (!G(e)) return;
|
|
1177
|
+
T(r);
|
|
1035
1178
|
}
|
|
1036
1179
|
return;
|
|
1037
1180
|
}
|
|
1038
|
-
let i =
|
|
1039
|
-
i &&
|
|
1040
|
-
},
|
|
1181
|
+
let i = k(n);
|
|
1182
|
+
i && G(e) && E(i);
|
|
1183
|
+
}, j = () => s().find((e) => K(e) && !ht(e)) ?? s().find(K) ?? null, M = (e, t) => He(e, d(t)), F = (e) => {
|
|
1041
1184
|
if (!(e instanceof KeyboardEvent)) return;
|
|
1042
1185
|
let n = e.target;
|
|
1043
1186
|
if (!(n instanceof Element)) return;
|
|
1044
|
-
let r =
|
|
1187
|
+
let r = j();
|
|
1045
1188
|
if (r && e.key === "Escape") {
|
|
1046
|
-
if (!
|
|
1047
|
-
e.preventDefault(), e.stopPropagation(),
|
|
1189
|
+
if (!G(e)) return;
|
|
1190
|
+
e.preventDefault(), e.stopPropagation(), T(r);
|
|
1048
1191
|
return;
|
|
1049
1192
|
}
|
|
1050
1193
|
if (r && e.key === "Tab") {
|
|
1051
|
-
if (!
|
|
1052
|
-
|
|
1194
|
+
if (!G(e)) return;
|
|
1195
|
+
M(e, r);
|
|
1053
1196
|
return;
|
|
1054
1197
|
}
|
|
1055
1198
|
if (e.key !== "Enter" && e.key !== " ") return;
|
|
1056
1199
|
let i = n.closest(t.closeSelector);
|
|
1057
|
-
if (i instanceof HTMLElement &&
|
|
1058
|
-
if (!
|
|
1059
|
-
e.preventDefault(),
|
|
1200
|
+
if (i instanceof HTMLElement && c(i) && !mt(i)) {
|
|
1201
|
+
if (!G(e)) return;
|
|
1202
|
+
e.preventDefault(), T(i);
|
|
1060
1203
|
return;
|
|
1061
1204
|
}
|
|
1062
|
-
let a =
|
|
1063
|
-
!a ||
|
|
1064
|
-
},
|
|
1065
|
-
let t =
|
|
1205
|
+
let a = k(n);
|
|
1206
|
+
!a || mt(a) || G(e) && (e.preventDefault(), E(a));
|
|
1207
|
+
}, I = (e) => {
|
|
1208
|
+
let t = j();
|
|
1066
1209
|
if (!t) return;
|
|
1067
1210
|
let n = e.target;
|
|
1068
|
-
if (!(n instanceof Node) || t.contains(n) || !
|
|
1069
|
-
let r =
|
|
1070
|
-
(
|
|
1071
|
-
},
|
|
1072
|
-
|
|
1073
|
-
|
|
1211
|
+
if (!(n instanceof Node) || t.contains(n) || !G(e)) return;
|
|
1212
|
+
let r = d(t);
|
|
1213
|
+
(Be(r)[0] ?? r).focus();
|
|
1214
|
+
}, L = !1, R = () => {
|
|
1215
|
+
L || (L = !0, requestAnimationFrame(() => {
|
|
1216
|
+
L = !1, D();
|
|
1074
1217
|
}));
|
|
1075
|
-
},
|
|
1076
|
-
return r.addEventListener("click",
|
|
1218
|
+
}, z = typeof MutationObserver < "u" ? new MutationObserver(() => R()) : null;
|
|
1219
|
+
return r.addEventListener("click", A), r.addEventListener("keydown", F, !0), r.addEventListener("focusin", I, !0), z && n instanceof Node && z.observe(n, {
|
|
1077
1220
|
childList: !0,
|
|
1078
1221
|
subtree: !0,
|
|
1079
1222
|
attributes: !0,
|
|
@@ -1086,39 +1229,39 @@ var Ge = {
|
|
|
1086
1229
|
"drawer",
|
|
1087
1230
|
"drawer-close"
|
|
1088
1231
|
]
|
|
1089
|
-
}),
|
|
1232
|
+
}), D(), {
|
|
1090
1233
|
destroy: () => {
|
|
1091
|
-
r.removeEventListener("click",
|
|
1234
|
+
r.removeEventListener("click", A), r.removeEventListener("keydown", F, !0), r.removeEventListener("focusin", I, !0), z?.disconnect(), i.destroy();
|
|
1092
1235
|
},
|
|
1093
|
-
sync:
|
|
1094
|
-
open:
|
|
1095
|
-
close:
|
|
1096
|
-
toggle:
|
|
1236
|
+
sync: D,
|
|
1237
|
+
open: w,
|
|
1238
|
+
close: T,
|
|
1239
|
+
toggle: E
|
|
1097
1240
|
};
|
|
1098
|
-
},
|
|
1099
|
-
|
|
1100
|
-
},
|
|
1101
|
-
|
|
1241
|
+
}, _t = (e = {}) => gt(e), vt = null, yt = !1, bt = null, xt = () => {
|
|
1242
|
+
bt &&= (document.removeEventListener("DOMContentLoaded", bt), null);
|
|
1243
|
+
}, St = () => typeof window > "u" || typeof document > "u" ? null : (yt = !1, xt(), vt ? (vt.sync(), vt) : (vt = gt(), vt)), Ct = () => {
|
|
1244
|
+
yt = !0, xt(), vt?.destroy(), vt = null;
|
|
1102
1245
|
};
|
|
1103
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
1104
|
-
|
|
1105
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
1246
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (bt = () => {
|
|
1247
|
+
bt = null, yt || St();
|
|
1248
|
+
}, document.addEventListener("DOMContentLoaded", bt)) : St());
|
|
1106
1249
|
//#endregion
|
|
1107
1250
|
//#region src/js/src/shared/overlays.ts
|
|
1108
|
-
var
|
|
1251
|
+
var wt = (e) => typeof document > "u" ? !1 : !!document.querySelector(e), Tt = () => wt("[modal-overlay]:not([hidden]), [drawer-overlay]:not([hidden])"), Et = () => wt("[popover-root]:not([hidden])"), Dt = () => wt("[menu-root] [menu]:not([hidden])"), Ot = () => wt("[combobox-list]:not([hidden])"), kt = () => wt("[tooltip-root]:not([hidden])"), At = {
|
|
1109
1252
|
root: typeof document < "u" ? document : {},
|
|
1110
1253
|
regionSelector: "[toast-region]",
|
|
1111
1254
|
toastSelector: "[toast]",
|
|
1112
1255
|
closeSelector: "[toast-close]",
|
|
1113
1256
|
defaultDuration: 5e3
|
|
1114
|
-
},
|
|
1257
|
+
}, jt = (e) => Array.from(e), Mt = A(), Nt = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, q = (e) => !e.hasAttribute("hidden"), Pt = (e) => e.getAttribute("data-motion-state") === "exiting", Ft = (e) => !Number.isFinite(e) || e <= 0, It = (e, t) => {
|
|
1115
1258
|
if (e == null) return t;
|
|
1116
1259
|
let n = e.trim();
|
|
1117
1260
|
if (!n) return t;
|
|
1118
1261
|
if (n.toLowerCase() === "infinity") return 0;
|
|
1119
1262
|
let r = Number(n);
|
|
1120
1263
|
return Number.isNaN(r) ? t : r;
|
|
1121
|
-
},
|
|
1264
|
+
}, Lt = () => Tt() || Et() || Dt() || Ot() || kt(), Rt = (e = {}) => {
|
|
1122
1265
|
if (typeof window > "u" || typeof document > "u") return {
|
|
1123
1266
|
destroy: () => {},
|
|
1124
1267
|
sync: () => {},
|
|
@@ -1126,59 +1269,59 @@ var st = (e) => typeof document > "u" ? !1 : !!document.querySelector(e), ct = (
|
|
|
1126
1269
|
dismiss: () => {}
|
|
1127
1270
|
};
|
|
1128
1271
|
let t = {
|
|
1129
|
-
...
|
|
1272
|
+
...At,
|
|
1130
1273
|
...e
|
|
1131
|
-
}, n = t.root ?? document, r = n, i = typeof e.defaultDuration == "number" ? e.defaultDuration :
|
|
1274
|
+
}, n = t.root ?? document, r = n, i = re(), a = typeof e.defaultDuration == "number" ? e.defaultDuration : At.defaultDuration, o = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new Set(), c = [], l = () => jt(n.querySelectorAll(t.regionSelector)), u = (e) => {
|
|
1132
1275
|
if (!e) return null;
|
|
1133
1276
|
let n = e.closest(t.regionSelector);
|
|
1134
1277
|
return n instanceof HTMLElement ? n : null;
|
|
1135
|
-
},
|
|
1278
|
+
}, d = (e) => {
|
|
1136
1279
|
if (!e) return null;
|
|
1137
1280
|
let n = e.closest(t.toastSelector);
|
|
1138
|
-
return !(n instanceof HTMLElement) || !
|
|
1139
|
-
},
|
|
1140
|
-
let n =
|
|
1281
|
+
return !(n instanceof HTMLElement) || !u(n) ? null : n;
|
|
1282
|
+
}, f = (e) => jt((e ?? n).querySelectorAll(t.toastSelector)).filter((e) => u(e)), p = (e) => !e?.matches(t.toastSelector) || !u(e) ? !1 : n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : f().includes(e), m = (e) => It(e.getAttribute("toast-duration"), a), h = (e, t) => e.getAttribute("aria-live") === "assertive" || e.getAttribute("toast-live") === "assertive" || t.getAttribute("aria-live") === "assertive" || t.getAttribute("toast-live") === "assertive", g = (e, t = !0) => {
|
|
1283
|
+
let n = c.indexOf(e);
|
|
1141
1284
|
if (n >= 0) {
|
|
1142
1285
|
if (!t) return;
|
|
1143
|
-
|
|
1286
|
+
c.splice(n, 1);
|
|
1144
1287
|
}
|
|
1145
|
-
|
|
1146
|
-
},
|
|
1147
|
-
let t =
|
|
1148
|
-
t >= 0 &&
|
|
1149
|
-
},
|
|
1150
|
-
for (let e =
|
|
1151
|
-
let t =
|
|
1152
|
-
if (t.isConnected &&
|
|
1288
|
+
c.push(e);
|
|
1289
|
+
}, _ = (e) => {
|
|
1290
|
+
let t = c.indexOf(e);
|
|
1291
|
+
t >= 0 && c.splice(t, 1);
|
|
1292
|
+
}, v = () => {
|
|
1293
|
+
for (let e = c.length - 1; e >= 0; --e) {
|
|
1294
|
+
let t = c[e];
|
|
1295
|
+
if (t.isConnected && p(t) && q(t)) return t;
|
|
1153
1296
|
}
|
|
1154
|
-
let e =
|
|
1297
|
+
let e = f().filter(q);
|
|
1155
1298
|
return e[e.length - 1] ?? null;
|
|
1156
|
-
},
|
|
1299
|
+
}, y = (e) => {
|
|
1157
1300
|
if (e) {
|
|
1158
|
-
if (
|
|
1159
|
-
let t =
|
|
1160
|
-
if (t &&
|
|
1301
|
+
if (p(e)) return e;
|
|
1302
|
+
let t = d(e);
|
|
1303
|
+
if (t && p(t)) return t;
|
|
1161
1304
|
}
|
|
1162
|
-
return
|
|
1163
|
-
},
|
|
1164
|
-
let t =
|
|
1165
|
-
t?.timeoutId != null && clearTimeout(t.timeoutId),
|
|
1166
|
-
},
|
|
1167
|
-
|
|
1168
|
-
let t =
|
|
1169
|
-
t?.timeoutId != null && clearTimeout(t.timeoutId),
|
|
1170
|
-
}),
|
|
1171
|
-
},
|
|
1172
|
-
if (!
|
|
1173
|
-
|
|
1305
|
+
return v() ?? f()[0] ?? null;
|
|
1306
|
+
}, b = (e) => {
|
|
1307
|
+
let t = o.get(e);
|
|
1308
|
+
t?.timeoutId != null && clearTimeout(t.timeoutId), o.delete(e), s.delete(e);
|
|
1309
|
+
}, x = () => {
|
|
1310
|
+
s.forEach((e) => {
|
|
1311
|
+
let t = o.get(e);
|
|
1312
|
+
t?.timeoutId != null && clearTimeout(t.timeoutId), o.delete(e);
|
|
1313
|
+
}), s.clear();
|
|
1314
|
+
}, S = (e) => {
|
|
1315
|
+
if (!q(e)) {
|
|
1316
|
+
b(e);
|
|
1174
1317
|
return;
|
|
1175
1318
|
}
|
|
1176
|
-
let t =
|
|
1177
|
-
if (
|
|
1178
|
-
|
|
1319
|
+
let t = m(e);
|
|
1320
|
+
if (Ft(t)) {
|
|
1321
|
+
b(e);
|
|
1179
1322
|
return;
|
|
1180
1323
|
}
|
|
1181
|
-
let n =
|
|
1324
|
+
let n = o.get(e);
|
|
1182
1325
|
if (n && (n.timeoutId != null || n.paused)) return;
|
|
1183
1326
|
let r = {
|
|
1184
1327
|
timeoutId: null,
|
|
@@ -1186,115 +1329,119 @@ var st = (e) => typeof document > "u" ? !1 : !!document.querySelector(e), ct = (
|
|
|
1186
1329
|
startedAt: Date.now(),
|
|
1187
1330
|
paused: !1
|
|
1188
1331
|
};
|
|
1189
|
-
r.timeoutId = setTimeout(() =>
|
|
1190
|
-
}, S = (e) => {
|
|
1191
|
-
let t = a.get(e);
|
|
1192
|
-
!t || t.paused || (t.timeoutId != null && (clearTimeout(t.timeoutId), t.timeoutId = null, t.remaining = Math.max(0, t.remaining - (Date.now() - t.startedAt))), t.paused = !0);
|
|
1332
|
+
r.timeoutId = setTimeout(() => A(e), t), o.set(e, r), s.add(e);
|
|
1193
1333
|
}, C = (e) => {
|
|
1194
|
-
let t =
|
|
1334
|
+
let t = o.get(e);
|
|
1335
|
+
!t || t.paused || (t.timeoutId != null && (clearTimeout(t.timeoutId), t.timeoutId = null, t.remaining = Math.max(0, t.remaining - (Date.now() - t.startedAt))), t.paused = !0);
|
|
1336
|
+
}, w = (e) => {
|
|
1337
|
+
let t = o.get(e);
|
|
1195
1338
|
if (!(!t || !t.paused)) {
|
|
1196
1339
|
if (t.paused = !1, t.remaining <= 0) {
|
|
1197
|
-
|
|
1340
|
+
A(e);
|
|
1198
1341
|
return;
|
|
1199
1342
|
}
|
|
1200
|
-
t.startedAt = Date.now(), t.timeoutId = setTimeout(() =>
|
|
1343
|
+
t.startedAt = Date.now(), t.timeoutId = setTimeout(() => A(e), t.remaining);
|
|
1201
1344
|
}
|
|
1202
|
-
}, w = (e) => {
|
|
1203
|
-
mt(e.querySelectorAll(t.closeSelector)).filter((t) => u(t) === e).forEach((e) => {
|
|
1204
|
-
gt(e) || (e.setAttribute("role", "button"), e.hasAttribute("tabindex") || e.setAttribute("tabindex", "0")), !e.hasAttribute("aria-label") && !e.hasAttribute("aria-labelledby") && !e.textContent?.trim() && e.setAttribute("aria-label", "Dismiss");
|
|
1205
|
-
});
|
|
1206
1345
|
}, T = (e) => {
|
|
1346
|
+
jt(e.querySelectorAll(t.closeSelector)).filter((t) => d(t) === e).forEach((e) => {
|
|
1347
|
+
Nt(e) || (e.setAttribute("role", "button"), e.hasAttribute("tabindex") || e.setAttribute("tabindex", "0")), !e.hasAttribute("aria-label") && !e.hasAttribute("aria-labelledby") && !e.textContent?.trim() && e.setAttribute("aria-label", "Dismiss");
|
|
1348
|
+
});
|
|
1349
|
+
}, E = (e) => {
|
|
1207
1350
|
if (!e.hasAttribute("aria-live")) {
|
|
1208
1351
|
let t = e.getAttribute("toast-live") === "assertive" ? "assertive" : "polite";
|
|
1209
1352
|
e.setAttribute("aria-live", t);
|
|
1210
1353
|
}
|
|
1211
1354
|
e.hasAttribute("aria-relevant") || e.setAttribute("aria-relevant", "additions");
|
|
1212
|
-
}, E = (e, t) => {
|
|
1213
|
-
let n = t.getAttribute("toast") === "error" || m(e, t) ? "alert" : "status";
|
|
1214
|
-
t.getAttribute("role") !== n && t.setAttribute("role", n), w(t);
|
|
1215
1355
|
}, D = (e, t) => {
|
|
1356
|
+
let n = t.getAttribute("toast") === "error" || h(e, t) ? "alert" : "status";
|
|
1357
|
+
t.getAttribute("role") !== n && t.setAttribute("role", n), T(t);
|
|
1358
|
+
}, O = (e, t) => {
|
|
1216
1359
|
e.hidden !== !t && (e.hidden = !t);
|
|
1217
|
-
},
|
|
1218
|
-
let t =
|
|
1360
|
+
}, k = (e) => {
|
|
1361
|
+
let t = y(e);
|
|
1219
1362
|
if (!t) return;
|
|
1220
|
-
let n =
|
|
1363
|
+
let n = u(t);
|
|
1221
1364
|
if (n) {
|
|
1222
|
-
if (
|
|
1223
|
-
|
|
1365
|
+
if (E(n), D(n, t), q(t) && !Pt(t)) {
|
|
1366
|
+
g(t), S(t);
|
|
1224
1367
|
return;
|
|
1225
1368
|
}
|
|
1226
|
-
|
|
1369
|
+
O(t, !0), g(t), b(t), i.enter(t), S(t);
|
|
1227
1370
|
}
|
|
1228
|
-
},
|
|
1229
|
-
let t =
|
|
1230
|
-
!t || !
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1371
|
+
}, A = (e) => {
|
|
1372
|
+
let t = y(e);
|
|
1373
|
+
!t || !q(t) || Pt(t) || (b(t), _(t), i.exit(t, () => {
|
|
1374
|
+
O(t, !1);
|
|
1375
|
+
}));
|
|
1376
|
+
}, j = () => {
|
|
1377
|
+
l().forEach((e) => {
|
|
1378
|
+
E(e), f(e).forEach((t) => {
|
|
1379
|
+
if (D(e, t), !Pt(t)) {
|
|
1380
|
+
if (q(t)) {
|
|
1381
|
+
g(t, !1), S(t);
|
|
1382
|
+
return;
|
|
1383
|
+
}
|
|
1384
|
+
b(t), _(t);
|
|
1237
1385
|
}
|
|
1238
|
-
y(t), g(t);
|
|
1239
1386
|
});
|
|
1240
|
-
}),
|
|
1241
|
-
(!e.isConnected || !
|
|
1387
|
+
}), s.forEach((e) => {
|
|
1388
|
+
(!e.isConnected || !p(e) || !q(e)) && b(e);
|
|
1242
1389
|
});
|
|
1243
|
-
},
|
|
1390
|
+
}, M = (e) => {
|
|
1244
1391
|
let n = e.target;
|
|
1245
1392
|
if (!(n instanceof Element)) return;
|
|
1246
1393
|
let r = n.closest(t.closeSelector);
|
|
1247
1394
|
if (!(r instanceof HTMLElement)) return;
|
|
1248
|
-
let i =
|
|
1249
|
-
!i || !
|
|
1250
|
-
},
|
|
1395
|
+
let i = d(r);
|
|
1396
|
+
!i || !p(i) || Mt(e) && A(i);
|
|
1397
|
+
}, N = (e, t) => {
|
|
1251
1398
|
let n = e.relatedTarget;
|
|
1252
1399
|
return !(n instanceof Node && t.contains(n));
|
|
1253
|
-
}, N = (e) => {
|
|
1254
|
-
let t = e.target;
|
|
1255
|
-
if (!(t instanceof Element)) return;
|
|
1256
|
-
let n = u(t instanceof HTMLElement ? t : t.parentElement);
|
|
1257
|
-
!n || !f(n) || !J(n) || S(n);
|
|
1258
1400
|
}, P = (e) => {
|
|
1259
|
-
if (!(e instanceof MouseEvent)) return;
|
|
1260
1401
|
let t = e.target;
|
|
1261
1402
|
if (!(t instanceof Element)) return;
|
|
1262
|
-
let n =
|
|
1263
|
-
!n || !
|
|
1403
|
+
let n = d(t instanceof HTMLElement ? t : t.parentElement);
|
|
1404
|
+
!n || !p(n) || !q(n) || C(n);
|
|
1264
1405
|
}, F = (e) => {
|
|
1406
|
+
if (!(e instanceof MouseEvent)) return;
|
|
1265
1407
|
let t = e.target;
|
|
1266
1408
|
if (!(t instanceof Element)) return;
|
|
1267
|
-
let n =
|
|
1268
|
-
!n || !
|
|
1409
|
+
let n = d(t instanceof HTMLElement ? t : t.parentElement);
|
|
1410
|
+
!n || !p(n) || !q(n) || N(e, n) && w(n);
|
|
1269
1411
|
}, I = (e) => {
|
|
1270
|
-
if (!(e instanceof FocusEvent)) return;
|
|
1271
1412
|
let t = e.target;
|
|
1272
1413
|
if (!(t instanceof Element)) return;
|
|
1273
|
-
let n =
|
|
1274
|
-
!n || !
|
|
1414
|
+
let n = d(t instanceof HTMLElement ? t : t.parentElement);
|
|
1415
|
+
!n || !p(n) || !q(n) || C(n);
|
|
1275
1416
|
}, L = (e) => {
|
|
1417
|
+
if (!(e instanceof FocusEvent)) return;
|
|
1418
|
+
let t = e.target;
|
|
1419
|
+
if (!(t instanceof Element)) return;
|
|
1420
|
+
let n = d(t instanceof HTMLElement ? t : t.parentElement);
|
|
1421
|
+
!n || !p(n) || !q(n) || N(e, n) && w(n);
|
|
1422
|
+
}, R = (e) => {
|
|
1276
1423
|
if (!(e instanceof KeyboardEvent)) return;
|
|
1277
1424
|
let n = e.target;
|
|
1278
1425
|
if (!(n instanceof Element)) return;
|
|
1279
1426
|
if (e.key === "Escape") {
|
|
1280
|
-
if (
|
|
1281
|
-
let t =
|
|
1282
|
-
if (!t || !
|
|
1283
|
-
e.preventDefault(), e.stopPropagation(),
|
|
1427
|
+
if (Lt() || e.defaultPrevented) return;
|
|
1428
|
+
let t = v();
|
|
1429
|
+
if (!t || !Mt(e)) return;
|
|
1430
|
+
e.preventDefault(), e.stopPropagation(), A(t);
|
|
1284
1431
|
return;
|
|
1285
1432
|
}
|
|
1286
1433
|
if (e.key !== "Enter" && e.key !== " ") return;
|
|
1287
1434
|
let r = n.closest(t.closeSelector);
|
|
1288
|
-
if (r instanceof HTMLElement &&
|
|
1289
|
-
if (!
|
|
1290
|
-
e.preventDefault(),
|
|
1435
|
+
if (r instanceof HTMLElement && d(r) && !Nt(r)) {
|
|
1436
|
+
if (!Mt(e)) return;
|
|
1437
|
+
e.preventDefault(), A(r);
|
|
1291
1438
|
}
|
|
1292
|
-
},
|
|
1293
|
-
|
|
1294
|
-
|
|
1439
|
+
}, z = !1, B = () => {
|
|
1440
|
+
z || (z = !0, requestAnimationFrame(() => {
|
|
1441
|
+
z = !1, j();
|
|
1295
1442
|
}));
|
|
1296
|
-
},
|
|
1297
|
-
return r.addEventListener("click",
|
|
1443
|
+
}, V = typeof MutationObserver < "u" ? new MutationObserver(() => B()) : null;
|
|
1444
|
+
return r.addEventListener("click", M), r.addEventListener("keydown", R), r.addEventListener("mouseover", P), r.addEventListener("mouseout", F), r.addEventListener("focusin", I), r.addEventListener("focusout", L), V && n instanceof Node && V.observe(n, {
|
|
1298
1445
|
childList: !0,
|
|
1299
1446
|
subtree: !0,
|
|
1300
1447
|
attributes: !0,
|
|
@@ -1308,46 +1455,46 @@ var st = (e) => typeof document > "u" ? !1 : !!document.querySelector(e), ct = (
|
|
|
1308
1455
|
"aria-live",
|
|
1309
1456
|
"aria-relevant"
|
|
1310
1457
|
]
|
|
1311
|
-
}),
|
|
1458
|
+
}), j(), {
|
|
1312
1459
|
destroy: () => {
|
|
1313
|
-
r.removeEventListener("click",
|
|
1460
|
+
r.removeEventListener("click", M), r.removeEventListener("keydown", R), r.removeEventListener("mouseover", P), r.removeEventListener("mouseout", F), r.removeEventListener("focusin", I), r.removeEventListener("focusout", L), V?.disconnect(), i.destroy(), x();
|
|
1314
1461
|
},
|
|
1315
|
-
sync:
|
|
1316
|
-
show:
|
|
1317
|
-
dismiss:
|
|
1462
|
+
sync: j,
|
|
1463
|
+
show: k,
|
|
1464
|
+
dismiss: A
|
|
1318
1465
|
};
|
|
1319
|
-
},
|
|
1320
|
-
|
|
1321
|
-
},
|
|
1322
|
-
|
|
1466
|
+
}, zt = (e = {}) => Rt(e), Bt = null, Vt = !1, Ht = null, Ut = () => {
|
|
1467
|
+
Ht &&= (document.removeEventListener("DOMContentLoaded", Ht), null);
|
|
1468
|
+
}, Wt = () => typeof window > "u" || typeof document > "u" ? null : (Vt = !1, Ut(), Bt ? (Bt.sync(), Bt) : (Bt = Rt(), Bt)), Gt = () => {
|
|
1469
|
+
Vt = !0, Ut(), Bt?.destroy(), Bt = null;
|
|
1323
1470
|
};
|
|
1324
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
1325
|
-
|
|
1326
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
1471
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (Ht = () => {
|
|
1472
|
+
Ht = null, Vt || Wt();
|
|
1473
|
+
}, document.addEventListener("DOMContentLoaded", Ht)) : Wt());
|
|
1327
1474
|
//#endregion
|
|
1328
1475
|
//#region src/js/src/popover/popover-runtime.ts
|
|
1329
|
-
var
|
|
1476
|
+
var Kt = {
|
|
1330
1477
|
root: typeof document < "u" ? document : {},
|
|
1331
1478
|
rootSelector: "[popover-root]",
|
|
1332
1479
|
panelSelector: "[popover-panel]",
|
|
1333
1480
|
closeSelector: "[popover-close]",
|
|
1334
1481
|
gap: 8
|
|
1335
|
-
},
|
|
1482
|
+
}, qt = new Set([
|
|
1336
1483
|
"top",
|
|
1337
1484
|
"bottom",
|
|
1338
1485
|
"left",
|
|
1339
1486
|
"right"
|
|
1340
|
-
]),
|
|
1487
|
+
]), Jt = (e) => Array.from(e), Yt = "juice-popover-root", Xt = "juice-popover-panel", Zt = "juice-popover-title", Qt = A(), $t = /* @__PURE__ */ new WeakMap(), en = /* @__PURE__ */ new WeakMap(), tn = (e) => e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "popover", nn = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, J = (e) => !e.hasAttribute("hidden"), rn = (e) => e.getAttribute("data-motion-state") === "exiting", an = (e) => {
|
|
1341
1488
|
let t = e.getAttribute("popover-root");
|
|
1342
|
-
return t &&
|
|
1343
|
-
},
|
|
1489
|
+
return t && qt.has(t) ? t : "bottom";
|
|
1490
|
+
}, on = (e) => {
|
|
1344
1491
|
switch (e) {
|
|
1345
1492
|
case "top": return "bottom";
|
|
1346
1493
|
case "bottom": return "top";
|
|
1347
1494
|
case "left": return "right";
|
|
1348
1495
|
case "right": return "left";
|
|
1349
1496
|
}
|
|
1350
|
-
},
|
|
1497
|
+
}, sn = (e, t, n, r, i) => {
|
|
1351
1498
|
switch (e) {
|
|
1352
1499
|
case "bottom": return {
|
|
1353
1500
|
top: t.bottom + i,
|
|
@@ -1366,7 +1513,7 @@ var Ot = {
|
|
|
1366
1513
|
left: t.left - n - i
|
|
1367
1514
|
};
|
|
1368
1515
|
}
|
|
1369
|
-
},
|
|
1516
|
+
}, cn = (e, t, n, r, i) => {
|
|
1370
1517
|
let a = window.innerWidth, o = window.innerHeight;
|
|
1371
1518
|
switch (e) {
|
|
1372
1519
|
case "bottom": return t + i > o;
|
|
@@ -1374,31 +1521,31 @@ var Ot = {
|
|
|
1374
1521
|
case "right": return n + r > a;
|
|
1375
1522
|
case "left": return n < 0;
|
|
1376
1523
|
}
|
|
1377
|
-
},
|
|
1524
|
+
}, ln = (e) => (e ?? "").split(/[,\s]+/).map((e) => e.trim()).filter(Boolean), un = (e) => {
|
|
1378
1525
|
if (!(e instanceof HTMLElement) || e === document.documentElement || e === document.body) return !1;
|
|
1379
1526
|
let t = window.getComputedStyle(e);
|
|
1380
1527
|
if (t.transform !== "none" || t.perspective !== "none" || t.filter !== "none") return !0;
|
|
1381
1528
|
let n = t.getPropertyValue("backdrop-filter");
|
|
1382
|
-
return n && n !== "none" ||
|
|
1529
|
+
return n && n !== "none" || ln(t.willChange).some((e) => [
|
|
1383
1530
|
"transform",
|
|
1384
1531
|
"perspective",
|
|
1385
1532
|
"filter",
|
|
1386
1533
|
"backdrop-filter"
|
|
1387
|
-
].includes(e)) ? !0 :
|
|
1534
|
+
].includes(e)) ? !0 : ln(t.contain).some((e) => [
|
|
1388
1535
|
"paint",
|
|
1389
1536
|
"layout",
|
|
1390
1537
|
"strict",
|
|
1391
1538
|
"content"
|
|
1392
1539
|
].includes(e));
|
|
1393
|
-
},
|
|
1540
|
+
}, dn = (e) => {
|
|
1394
1541
|
let t = e.parentElement;
|
|
1395
1542
|
for (; t && t !== document.documentElement;) {
|
|
1396
|
-
if (
|
|
1543
|
+
if (un(t)) return t;
|
|
1397
1544
|
t = t.parentElement;
|
|
1398
1545
|
}
|
|
1399
1546
|
return null;
|
|
1400
|
-
},
|
|
1401
|
-
let r =
|
|
1547
|
+
}, fn = (e, t, n) => {
|
|
1548
|
+
let r = dn(e);
|
|
1402
1549
|
if (!r) return {
|
|
1403
1550
|
top: t,
|
|
1404
1551
|
left: n
|
|
@@ -1408,7 +1555,7 @@ var Ot = {
|
|
|
1408
1555
|
top: t - i.top,
|
|
1409
1556
|
left: n - i.left
|
|
1410
1557
|
};
|
|
1411
|
-
},
|
|
1558
|
+
}, pn = (e = {}) => {
|
|
1412
1559
|
if (typeof window > "u" || typeof document > "u") return {
|
|
1413
1560
|
destroy: () => {},
|
|
1414
1561
|
sync: () => {},
|
|
@@ -1417,171 +1564,173 @@ var Ot = {
|
|
|
1417
1564
|
toggle: () => {}
|
|
1418
1565
|
};
|
|
1419
1566
|
let t = {
|
|
1420
|
-
...
|
|
1567
|
+
...Kt,
|
|
1421
1568
|
...e
|
|
1422
|
-
}, n = t.root ?? document, r = typeof e.gap == "number" && Number.isFinite(e.gap) ? e.gap :
|
|
1569
|
+
}, n = t.root ?? document, r = re(), i = typeof e.gap == "number" && Number.isFinite(e.gap) ? e.gap : Kt.gap, a = 0, o = (e) => (a += 1, `${e}-${a}`), s = () => Jt(n.querySelectorAll(t.rootSelector)), c = (e) => {
|
|
1423
1570
|
if (!e) return null;
|
|
1424
1571
|
let n = e.closest(t.rootSelector);
|
|
1425
1572
|
return n instanceof HTMLElement ? n : null;
|
|
1426
|
-
},
|
|
1427
|
-
if (
|
|
1573
|
+
}, l = (e) => P(e, n), u = (e) => e?.matches(t.rootSelector) ? n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : s().includes(e) : !1, d = (e) => Jt(e.querySelectorAll(t.panelSelector)).find((t) => c(t) === e) || Jt(e.querySelectorAll("[role=\"dialog\"]")).find((t) => c(t) === e) || (Jt(e.children).find((e) => e instanceof HTMLElement) ?? e), f = (e) => {
|
|
1574
|
+
if (c(e)) return null;
|
|
1428
1575
|
for (let t of N(e)) {
|
|
1429
|
-
let e =
|
|
1430
|
-
if (e &&
|
|
1576
|
+
let e = l(t);
|
|
1577
|
+
if (e && u(e)) return e;
|
|
1431
1578
|
}
|
|
1432
1579
|
return null;
|
|
1433
|
-
},
|
|
1580
|
+
}, p = (e) => {
|
|
1434
1581
|
if (e) {
|
|
1435
|
-
if (
|
|
1436
|
-
let n =
|
|
1437
|
-
if (n &&
|
|
1582
|
+
if (u(e)) return e;
|
|
1583
|
+
let n = c(e);
|
|
1584
|
+
if (n && u(n)) return n;
|
|
1438
1585
|
if (e.matches(t.closeSelector)) {
|
|
1439
|
-
let t =
|
|
1440
|
-
if (t &&
|
|
1586
|
+
let t = c(e);
|
|
1587
|
+
if (t && u(t)) return t;
|
|
1441
1588
|
}
|
|
1442
|
-
let r =
|
|
1589
|
+
let r = f(e);
|
|
1443
1590
|
if (r) return r;
|
|
1444
1591
|
let i = e.closest("[aria-controls]");
|
|
1445
1592
|
if (i instanceof HTMLElement) {
|
|
1446
|
-
let e =
|
|
1593
|
+
let e = f(i);
|
|
1447
1594
|
if (e) return e;
|
|
1448
1595
|
}
|
|
1449
1596
|
}
|
|
1450
|
-
return
|
|
1451
|
-
},
|
|
1597
|
+
return s().find(J) ?? s()[0] ?? null;
|
|
1598
|
+
}, m = (e) => {
|
|
1452
1599
|
let t = e.getAttribute("name");
|
|
1453
|
-
return t ?
|
|
1454
|
-
},
|
|
1600
|
+
return t ? tn(t) : e.id ? tn(e.id) : null;
|
|
1601
|
+
}, h = (e) => e.id ? Jt(document.querySelectorAll("[aria-controls]")).filter((t) => c(t) ? !1 : N(t).includes(e.id)) : [], g = (e, t) => {
|
|
1455
1602
|
let n = String(t);
|
|
1456
|
-
|
|
1603
|
+
h(e).forEach((e) => {
|
|
1457
1604
|
e.getAttribute("aria-expanded") !== n && e.setAttribute("aria-expanded", n), e.hasAttribute("aria-haspopup") || e.setAttribute("aria-haspopup", "dialog");
|
|
1458
1605
|
});
|
|
1459
|
-
},
|
|
1460
|
-
let n =
|
|
1461
|
-
if (e.id ||= r ? `${r}-root` :
|
|
1606
|
+
}, _ = (e) => {
|
|
1607
|
+
let n = d(e), r = m(e);
|
|
1608
|
+
if (e.id ||= r ? `${r}-root` : o(Yt), n.id ||= r ? `${r}-panel` : o(Xt), n.getAttribute("role") !== "dialog" && n.setAttribute("role", "dialog"), !n.hasAttribute("aria-labelledby") && !n.hasAttribute("aria-label")) {
|
|
1462
1609
|
let e = n.querySelector("[popover-header] :is(h1,h2,h3,h4,h5,h6), :is(h1,h2,h3,h4,h5,h6)");
|
|
1463
|
-
e && (e.id ||= r ? `${r}-title` :
|
|
1610
|
+
e && (e.id ||= r ? `${r}-title` : o(Zt), n.setAttribute("aria-labelledby", e.id));
|
|
1464
1611
|
}
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
}),
|
|
1468
|
-
|
|
1612
|
+
Jt(e.querySelectorAll(t.closeSelector)).filter((t) => c(t) === e).forEach((e) => {
|
|
1613
|
+
nn(e) || (e.setAttribute("role", "button"), e.hasAttribute("tabindex") || e.setAttribute("tabindex", "0")), !e.hasAttribute("aria-label") && !e.hasAttribute("aria-labelledby") && !e.textContent?.trim() && e.setAttribute("aria-label", "Close");
|
|
1614
|
+
}), h(e).forEach((t) => {
|
|
1615
|
+
nn(t) || (t.setAttribute("role", "button"), t.hasAttribute("tabindex") || t.setAttribute("tabindex", "0")), t.hasAttribute("aria-haspopup") || t.setAttribute("aria-haspopup", "dialog"), t.hasAttribute("aria-expanded") || t.setAttribute("aria-expanded", String(J(e)));
|
|
1469
1616
|
});
|
|
1470
|
-
},
|
|
1617
|
+
}, v = (e, t) => {
|
|
1471
1618
|
let n = document.activeElement instanceof HTMLElement ? document.activeElement : null, r = t && !e.contains(t) ? t : n && !e.contains(n) ? n : null;
|
|
1472
|
-
r &&
|
|
1473
|
-
}, v = (e) => {
|
|
1474
|
-
let t = Ft.get(e);
|
|
1475
|
-
Ft.delete(e), t?.isConnected && t.focus();
|
|
1619
|
+
r && $t.set(e, r), t && !e.contains(t) && en.set(e, t);
|
|
1476
1620
|
}, y = (e) => {
|
|
1477
|
-
|
|
1621
|
+
let t = $t.get(e);
|
|
1622
|
+
$t.delete(e), t?.isConnected && t.focus();
|
|
1478
1623
|
}, b = (e) => {
|
|
1624
|
+
Ve(d(e));
|
|
1625
|
+
}, x = (e) => {
|
|
1479
1626
|
e.style.removeProperty("position"), e.style.removeProperty("top"), e.style.removeProperty("left"), e.style.removeProperty("right"), e.style.removeProperty("bottom"), e.style.removeProperty("margin");
|
|
1480
|
-
let t =
|
|
1627
|
+
let t = d(e);
|
|
1481
1628
|
t !== e && t.style.removeProperty("margin");
|
|
1482
|
-
}, x = (e, t) => {
|
|
1483
|
-
let n = t ?? It.get(e) ?? m(e)[0] ?? null;
|
|
1484
|
-
if (!n) return;
|
|
1485
|
-
let i = u(e);
|
|
1486
|
-
e.style.position = "fixed", e.style.right = "auto", e.style.bottom = "auto", e.style.margin = "0", i !== e && (i.style.margin = "0");
|
|
1487
|
-
let a = zt(e), o = n.getBoundingClientRect(), s = e.getBoundingClientRect(), c = s.width || e.offsetWidth, l = s.height || e.offsetHeight, d = a, { top: f, left: p } = Vt(d, o, c, l, r);
|
|
1488
|
-
Ht(d, f, p, c, l) && (d = Bt(d), {top: f, left: p} = Vt(d, o, c, l, r)), {top: f, left: p} = Kt(e, f, p), e.style.top = `${f}px`, e.style.left = `${p}px`;
|
|
1489
1629
|
}, S = (e, t) => {
|
|
1490
|
-
|
|
1630
|
+
let n = t ?? en.get(e) ?? h(e)[0] ?? null;
|
|
1631
|
+
if (!n) return;
|
|
1632
|
+
let r = d(e);
|
|
1633
|
+
e.style.position = "fixed", e.style.right = "auto", e.style.bottom = "auto", e.style.margin = "0", r !== e && (r.style.margin = "0");
|
|
1634
|
+
let a = an(e), o = n.getBoundingClientRect(), s = e.getBoundingClientRect(), c = s.width || e.offsetWidth, l = s.height || e.offsetHeight, u = a, { top: f, left: p } = sn(u, o, c, l, i);
|
|
1635
|
+
cn(u, f, p, c, l) && (u = on(u), {top: f, left: p} = sn(u, o, c, l, i)), {top: f, left: p} = fn(e, f, p), e.style.top = `${f}px`, e.style.left = `${p}px`;
|
|
1491
1636
|
}, C = (e, t) => {
|
|
1492
|
-
|
|
1493
|
-
}, w = (e,
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
})
|
|
1497
|
-
}, T = (e) => {
|
|
1498
|
-
|
|
1637
|
+
e.hidden !== !t && (e.hidden = !t);
|
|
1638
|
+
}, w = (e, t) => {
|
|
1639
|
+
!J(e) || rn(e) || (_(e), r.exit(e, () => {
|
|
1640
|
+
C(e, !1), g(e, !1), x(e), t ? y(e) : $t.delete(e);
|
|
1641
|
+
}));
|
|
1642
|
+
}, T = (e, n) => {
|
|
1643
|
+
s().concat(Jt(document.querySelectorAll(t.rootSelector))).forEach((t) => {
|
|
1644
|
+
t === e || !J(t) || rn(t) || w(t, !1);
|
|
1645
|
+
}), v(e, n), _(e), C(e, !0), g(e, !0), S(e, n), b(e), r.enter(e);
|
|
1646
|
+
}, E = (e) => {
|
|
1647
|
+
let t = p(e);
|
|
1499
1648
|
if (t) {
|
|
1500
|
-
if (
|
|
1501
|
-
|
|
1649
|
+
if (J(t) && !rn(t)) {
|
|
1650
|
+
_(t), g(t, !0), S(t);
|
|
1502
1651
|
return;
|
|
1503
1652
|
}
|
|
1504
|
-
|
|
1653
|
+
T(t, e && f(e) === t ? e : e?.closest("[aria-controls]") instanceof HTMLElement && f(e.closest("[aria-controls]")) === t ? e.closest("[aria-controls]") : null);
|
|
1505
1654
|
}
|
|
1506
|
-
},
|
|
1507
|
-
let n =
|
|
1508
|
-
!n || !
|
|
1509
|
-
},
|
|
1510
|
-
let t =
|
|
1655
|
+
}, D = (e, t = !0) => {
|
|
1656
|
+
let n = p(e);
|
|
1657
|
+
!n || !J(n) || rn(n) || w(n, t);
|
|
1658
|
+
}, O = (e) => {
|
|
1659
|
+
let t = p(e);
|
|
1511
1660
|
if (t) {
|
|
1512
|
-
if (
|
|
1513
|
-
|
|
1661
|
+
if (J(t) && !rn(t)) {
|
|
1662
|
+
D(t);
|
|
1514
1663
|
return;
|
|
1515
1664
|
}
|
|
1516
|
-
|
|
1665
|
+
E(e ?? t);
|
|
1517
1666
|
}
|
|
1518
|
-
}, O = () => {
|
|
1519
|
-
o().forEach((e) => {
|
|
1520
|
-
Y(e) && x(e);
|
|
1521
|
-
});
|
|
1522
1667
|
}, k = () => {
|
|
1523
|
-
|
|
1524
|
-
|
|
1668
|
+
s().forEach((e) => {
|
|
1669
|
+
J(e) && S(e);
|
|
1525
1670
|
});
|
|
1526
|
-
}, A = (
|
|
1671
|
+
}, A = () => {
|
|
1672
|
+
s().forEach((e) => {
|
|
1673
|
+
_(e), g(e, J(e)), J(e) && S(e);
|
|
1674
|
+
});
|
|
1675
|
+
}, j = (e) => {
|
|
1527
1676
|
let t = e instanceof HTMLElement ? e : e.closest("[aria-controls]");
|
|
1528
|
-
if (!(t instanceof HTMLElement) ||
|
|
1529
|
-
if (
|
|
1677
|
+
if (!(t instanceof HTMLElement) || c(t)) return null;
|
|
1678
|
+
if (f(t)) return t;
|
|
1530
1679
|
let n = t.closest("[aria-controls]");
|
|
1531
|
-
return n instanceof HTMLElement &&
|
|
1532
|
-
},
|
|
1680
|
+
return n instanceof HTMLElement && f(n) ? n : null;
|
|
1681
|
+
}, M = () => s().find((e) => J(e) && !rn(e)) ?? s().find(J) ?? null, F = (e) => {
|
|
1533
1682
|
let n = e.target;
|
|
1534
1683
|
if (!(n instanceof Element)) return;
|
|
1535
|
-
let r =
|
|
1536
|
-
if (r &&
|
|
1684
|
+
let r = c(n);
|
|
1685
|
+
if (r && u(r)) {
|
|
1537
1686
|
let i = n.closest(t.closeSelector) instanceof HTMLElement ? n.closest(t.closeSelector) : null;
|
|
1538
|
-
if (i &&
|
|
1539
|
-
if (!
|
|
1540
|
-
|
|
1687
|
+
if (i && c(i) === r) {
|
|
1688
|
+
if (!Qt(e)) return;
|
|
1689
|
+
D(r);
|
|
1541
1690
|
}
|
|
1542
1691
|
return;
|
|
1543
1692
|
}
|
|
1544
|
-
let i =
|
|
1693
|
+
let i = j(n);
|
|
1545
1694
|
if (i) {
|
|
1546
|
-
if (!
|
|
1547
|
-
|
|
1695
|
+
if (!Qt(e)) return;
|
|
1696
|
+
O(i);
|
|
1548
1697
|
return;
|
|
1549
1698
|
}
|
|
1550
|
-
let a =
|
|
1551
|
-
a &&
|
|
1552
|
-
},
|
|
1699
|
+
let a = M();
|
|
1700
|
+
a && Qt(e) && D(a, !1);
|
|
1701
|
+
}, I = (e, t) => He(e, d(t)), L = (e) => {
|
|
1553
1702
|
if (!(e instanceof KeyboardEvent)) return;
|
|
1554
1703
|
let n = e.target;
|
|
1555
1704
|
if (!(n instanceof Element)) return;
|
|
1556
|
-
let r =
|
|
1705
|
+
let r = M();
|
|
1557
1706
|
if (r && e.key === "Tab") {
|
|
1558
|
-
if (!
|
|
1559
|
-
|
|
1707
|
+
if (!Qt(e)) return;
|
|
1708
|
+
I(e, r);
|
|
1560
1709
|
return;
|
|
1561
1710
|
}
|
|
1562
1711
|
if (e.key !== "Enter" && e.key !== " ") return;
|
|
1563
1712
|
let i = n.closest(t.closeSelector);
|
|
1564
|
-
if (i instanceof HTMLElement &&
|
|
1565
|
-
if (!
|
|
1566
|
-
e.preventDefault(),
|
|
1713
|
+
if (i instanceof HTMLElement && c(i) && !nn(i)) {
|
|
1714
|
+
if (!Qt(e)) return;
|
|
1715
|
+
e.preventDefault(), D(i);
|
|
1567
1716
|
return;
|
|
1568
1717
|
}
|
|
1569
|
-
let a =
|
|
1570
|
-
!a ||
|
|
1571
|
-
},
|
|
1572
|
-
if (!(e instanceof KeyboardEvent) || e.key !== "Escape" ||
|
|
1573
|
-
let t =
|
|
1574
|
-
t &&
|
|
1575
|
-
},
|
|
1576
|
-
|
|
1577
|
-
|
|
1718
|
+
let a = j(n);
|
|
1719
|
+
!a || nn(a) || Qt(e) && (e.preventDefault(), O(a));
|
|
1720
|
+
}, R = (e) => {
|
|
1721
|
+
if (!(e instanceof KeyboardEvent) || e.key !== "Escape" || Tt() || e.defaultPrevented) return;
|
|
1722
|
+
let t = M();
|
|
1723
|
+
t && Qt(e) && (e.preventDefault(), e.stopPropagation(), D(t));
|
|
1724
|
+
}, z = !1, B = () => {
|
|
1725
|
+
z || (z = !0, requestAnimationFrame(() => {
|
|
1726
|
+
z = !1, A();
|
|
1578
1727
|
}));
|
|
1579
|
-
},
|
|
1580
|
-
|
|
1581
|
-
|
|
1728
|
+
}, V = !1, H = () => {
|
|
1729
|
+
V || (V = !0, requestAnimationFrame(() => {
|
|
1730
|
+
V = !1, k();
|
|
1582
1731
|
}));
|
|
1583
|
-
},
|
|
1584
|
-
return document.addEventListener("click",
|
|
1732
|
+
}, U = typeof MutationObserver < "u" ? new MutationObserver(() => B()) : null;
|
|
1733
|
+
return document.addEventListener("click", F), document.addEventListener("keydown", L, !0), document.addEventListener("keydown", R), window.addEventListener("resize", H), window.addEventListener("scroll", H, !0), U && n instanceof Node && U.observe(n, {
|
|
1585
1734
|
childList: !0,
|
|
1586
1735
|
subtree: !0,
|
|
1587
1736
|
attributes: !0,
|
|
@@ -1594,50 +1743,50 @@ var Ot = {
|
|
|
1594
1743
|
"popover-close",
|
|
1595
1744
|
"popover-header"
|
|
1596
1745
|
]
|
|
1597
|
-
}),
|
|
1746
|
+
}), A(), {
|
|
1598
1747
|
destroy: () => {
|
|
1599
|
-
document.removeEventListener("click",
|
|
1748
|
+
document.removeEventListener("click", F), document.removeEventListener("keydown", L, !0), document.removeEventListener("keydown", R), window.removeEventListener("resize", H), window.removeEventListener("scroll", H, !0), U?.disconnect(), r.destroy();
|
|
1600
1749
|
},
|
|
1601
|
-
sync:
|
|
1602
|
-
open:
|
|
1603
|
-
close:
|
|
1604
|
-
toggle:
|
|
1750
|
+
sync: A,
|
|
1751
|
+
open: E,
|
|
1752
|
+
close: D,
|
|
1753
|
+
toggle: O
|
|
1605
1754
|
};
|
|
1606
|
-
},
|
|
1607
|
-
|
|
1608
|
-
},
|
|
1609
|
-
|
|
1755
|
+
}, mn = (e = {}) => pn(e), hn = null, gn = !1, _n = null, vn = () => {
|
|
1756
|
+
_n &&= (document.removeEventListener("DOMContentLoaded", _n), null);
|
|
1757
|
+
}, yn = () => typeof window > "u" || typeof document > "u" ? null : (gn = !1, vn(), hn ? (hn.sync(), hn) : (hn = pn(), hn)), bn = () => {
|
|
1758
|
+
gn = !0, vn(), hn?.destroy(), hn = null;
|
|
1610
1759
|
};
|
|
1611
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
1612
|
-
|
|
1613
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
1760
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (_n = () => {
|
|
1761
|
+
_n = null, gn || yn();
|
|
1762
|
+
}, document.addEventListener("DOMContentLoaded", _n)) : yn());
|
|
1614
1763
|
//#endregion
|
|
1615
1764
|
//#region src/js/src/tooltip/tooltip-runtime.ts
|
|
1616
|
-
var
|
|
1765
|
+
var xn = {
|
|
1617
1766
|
root: typeof document < "u" ? document : {},
|
|
1618
1767
|
rootSelector: "[tooltip-root]",
|
|
1619
1768
|
panelSelector: "[tooltip-panel]",
|
|
1620
1769
|
gap: 8,
|
|
1621
1770
|
hideDelay: 150
|
|
1622
|
-
},
|
|
1771
|
+
}, Sn = new Set([
|
|
1623
1772
|
"top",
|
|
1624
1773
|
"bottom",
|
|
1625
1774
|
"left",
|
|
1626
1775
|
"right"
|
|
1627
|
-
]),
|
|
1776
|
+
]), Cn = (e) => Array.from(e), wn = "juice-tooltip-root", Tn = A(), En = /* @__PURE__ */ new WeakMap(), Dn = (e) => e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "tooltip", On = (e) => M(e.getAttribute("aria-describedby")), kn = (e, t) => {
|
|
1628
1777
|
let n = M(e);
|
|
1629
1778
|
return n.includes(t) ? n.join(" ") : [...n, t].join(" ");
|
|
1630
|
-
},
|
|
1779
|
+
}, Y = (e) => !e.hasAttribute("hidden"), An = () => Tt() || Et() || Dt() || Ot(), jn = (e) => {
|
|
1631
1780
|
let t = e.getAttribute("tooltip-root");
|
|
1632
|
-
return t &&
|
|
1633
|
-
},
|
|
1781
|
+
return t && Sn.has(t) ? t : "top";
|
|
1782
|
+
}, Mn = (e) => {
|
|
1634
1783
|
switch (e) {
|
|
1635
1784
|
case "top": return "bottom";
|
|
1636
1785
|
case "bottom": return "top";
|
|
1637
1786
|
case "left": return "right";
|
|
1638
1787
|
case "right": return "left";
|
|
1639
1788
|
}
|
|
1640
|
-
},
|
|
1789
|
+
}, Nn = (e, t, n, r, i) => {
|
|
1641
1790
|
switch (e) {
|
|
1642
1791
|
case "bottom": return {
|
|
1643
1792
|
top: t.bottom + i,
|
|
@@ -1656,7 +1805,7 @@ var tn = {
|
|
|
1656
1805
|
left: t.left - n - i
|
|
1657
1806
|
};
|
|
1658
1807
|
}
|
|
1659
|
-
},
|
|
1808
|
+
}, Pn = (e, t, n, r, i) => {
|
|
1660
1809
|
let a = window.innerWidth, o = window.innerHeight;
|
|
1661
1810
|
switch (e) {
|
|
1662
1811
|
case "bottom": return t + i > o;
|
|
@@ -1664,31 +1813,31 @@ var tn = {
|
|
|
1664
1813
|
case "right": return n + r > a;
|
|
1665
1814
|
case "left": return n < 0;
|
|
1666
1815
|
}
|
|
1667
|
-
},
|
|
1816
|
+
}, Fn = (e) => (e ?? "").split(/[,\s]+/).map((e) => e.trim()).filter(Boolean), In = (e) => {
|
|
1668
1817
|
if (!(e instanceof HTMLElement) || e === document.documentElement || e === document.body) return !1;
|
|
1669
1818
|
let t = window.getComputedStyle(e);
|
|
1670
1819
|
if (t.transform !== "none" || t.perspective !== "none" || t.filter !== "none") return !0;
|
|
1671
1820
|
let n = t.getPropertyValue("backdrop-filter");
|
|
1672
|
-
return n && n !== "none" ||
|
|
1821
|
+
return n && n !== "none" || Fn(t.willChange).some((e) => [
|
|
1673
1822
|
"transform",
|
|
1674
1823
|
"perspective",
|
|
1675
1824
|
"filter",
|
|
1676
1825
|
"backdrop-filter"
|
|
1677
|
-
].includes(e)) ? !0 :
|
|
1826
|
+
].includes(e)) ? !0 : Fn(t.contain).some((e) => [
|
|
1678
1827
|
"paint",
|
|
1679
1828
|
"layout",
|
|
1680
1829
|
"strict",
|
|
1681
1830
|
"content"
|
|
1682
1831
|
].includes(e));
|
|
1683
|
-
},
|
|
1832
|
+
}, Ln = (e) => {
|
|
1684
1833
|
let t = e.parentElement;
|
|
1685
1834
|
for (; t && t !== document.documentElement;) {
|
|
1686
|
-
if (
|
|
1835
|
+
if (In(t)) return t;
|
|
1687
1836
|
t = t.parentElement;
|
|
1688
1837
|
}
|
|
1689
1838
|
return null;
|
|
1690
|
-
},
|
|
1691
|
-
let r =
|
|
1839
|
+
}, Rn = (e, t, n) => {
|
|
1840
|
+
let r = Ln(e);
|
|
1692
1841
|
if (!r) return {
|
|
1693
1842
|
top: t,
|
|
1694
1843
|
left: n
|
|
@@ -1698,7 +1847,7 @@ var tn = {
|
|
|
1698
1847
|
top: t - i.top,
|
|
1699
1848
|
left: n - i.left
|
|
1700
1849
|
};
|
|
1701
|
-
},
|
|
1850
|
+
}, zn = (e = {}) => {
|
|
1702
1851
|
if (typeof window > "u" || typeof document > "u") return {
|
|
1703
1852
|
destroy: () => {},
|
|
1704
1853
|
sync: () => {},
|
|
@@ -1706,15 +1855,15 @@ var tn = {
|
|
|
1706
1855
|
hide: () => {}
|
|
1707
1856
|
};
|
|
1708
1857
|
let t = {
|
|
1709
|
-
...
|
|
1858
|
+
...xn,
|
|
1710
1859
|
...e
|
|
1711
|
-
}, n = t.root ?? document, r = typeof e.gap == "number" && Number.isFinite(e.gap) ? e.gap :
|
|
1860
|
+
}, n = t.root ?? document, r = typeof e.gap == "number" && Number.isFinite(e.gap) ? e.gap : xn.gap, i = typeof e.hideDelay == "number" && Number.isFinite(e.hideDelay) ? Math.max(0, e.hideDelay) : xn.hideDelay, a = 0, o = null, s = null, c = null, l = (e) => (a += 1, `${e}-${a}`), u = () => Cn(n.querySelectorAll(t.rootSelector)), d = (e) => {
|
|
1712
1861
|
if (!e) return null;
|
|
1713
1862
|
let n = e.closest(t.rootSelector);
|
|
1714
1863
|
return n instanceof HTMLElement ? n : null;
|
|
1715
|
-
}, f = (e) => P(e, n), p = (e) => e?.matches(t.rootSelector) ? n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : u().includes(e) : !1, m = (e) =>
|
|
1864
|
+
}, f = (e) => P(e, n), p = (e) => e?.matches(t.rootSelector) ? n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : u().includes(e) : !1, m = (e) => Cn(e.querySelectorAll(t.panelSelector)).find((t) => d(t) === e) || Cn(e.querySelectorAll("[role=\"tooltip\"]")).find((t) => d(t) === e) || (Cn(e.children).find((e) => e instanceof HTMLElement) ?? e), h = (e) => {
|
|
1716
1865
|
if (d(e)) return null;
|
|
1717
|
-
for (let t of
|
|
1866
|
+
for (let t of On(e)) {
|
|
1718
1867
|
let e = f(t);
|
|
1719
1868
|
if (e && p(e)) return e;
|
|
1720
1869
|
}
|
|
@@ -1730,7 +1879,7 @@ var tn = {
|
|
|
1730
1879
|
if (n instanceof HTMLElement && h(n)) return n;
|
|
1731
1880
|
let r = t.closest("[aria-controls]");
|
|
1732
1881
|
return r instanceof HTMLElement && h(r) ? r : t instanceof HTMLElement && h(t) ? t : null;
|
|
1733
|
-
}, _ = () => u().find(
|
|
1882
|
+
}, _ = () => u().find(Y) ?? null, v = (e) => {
|
|
1734
1883
|
if (e) {
|
|
1735
1884
|
if (p(e)) return e;
|
|
1736
1885
|
let t = d(e);
|
|
@@ -1742,35 +1891,35 @@ var tn = {
|
|
|
1742
1891
|
return _() ?? u()[0] ?? null;
|
|
1743
1892
|
}, y = (e) => {
|
|
1744
1893
|
let t = e.getAttribute("name");
|
|
1745
|
-
return t ?
|
|
1894
|
+
return t ? Dn(t) : e.id ? Dn(e.id) : null;
|
|
1746
1895
|
}, b = (e) => {
|
|
1747
1896
|
if (!e.id) return [];
|
|
1748
1897
|
let t = /* @__PURE__ */ new Set(), n = [];
|
|
1749
|
-
return
|
|
1898
|
+
return Cn(document.querySelectorAll("[aria-describedby], [aria-controls]")).forEach((r) => {
|
|
1750
1899
|
t.has(r) || d(r) || h(r) === e && (t.add(r), n.push(r));
|
|
1751
1900
|
}), n;
|
|
1752
1901
|
}, x = (e, t) => {
|
|
1753
1902
|
if (!t.id) return;
|
|
1754
|
-
let n =
|
|
1903
|
+
let n = kn(e.getAttribute("aria-describedby"), t.id);
|
|
1755
1904
|
e.getAttribute("aria-describedby") !== n && e.setAttribute("aria-describedby", n);
|
|
1756
1905
|
}, S = (e) => {
|
|
1757
1906
|
let t = m(e), n = y(e);
|
|
1758
|
-
e.id ||= n ? `${n}-root` : l(
|
|
1907
|
+
e.id ||= n ? `${n}-root` : l(wn), t.getAttribute("role") !== "tooltip" && t.setAttribute("role", "tooltip"), b(e).forEach((t) => {
|
|
1759
1908
|
x(t, e);
|
|
1760
1909
|
});
|
|
1761
1910
|
}, C = (e, t) => {
|
|
1762
|
-
t && !e.contains(t) &&
|
|
1911
|
+
t && !e.contains(t) && En.set(e, t);
|
|
1763
1912
|
}, w = (e) => {
|
|
1764
1913
|
e.style.removeProperty("position"), e.style.removeProperty("top"), e.style.removeProperty("left"), e.style.removeProperty("right"), e.style.removeProperty("bottom"), e.style.removeProperty("margin");
|
|
1765
1914
|
let t = m(e);
|
|
1766
1915
|
t !== e && t.style.removeProperty("margin");
|
|
1767
1916
|
}, T = (e, t) => {
|
|
1768
|
-
let n = t ??
|
|
1917
|
+
let n = t ?? En.get(e) ?? b(e)[0] ?? null;
|
|
1769
1918
|
if (!n) return;
|
|
1770
1919
|
let i = m(e);
|
|
1771
1920
|
e.style.position = "fixed", e.style.right = "auto", e.style.bottom = "auto", e.style.margin = "0", i !== e && (i.style.margin = "0");
|
|
1772
|
-
let a =
|
|
1773
|
-
|
|
1921
|
+
let a = jn(e), o = n.getBoundingClientRect(), s = e.getBoundingClientRect(), c = s.width || e.offsetWidth, l = s.height || e.offsetHeight, u = a, { top: d, left: f } = Nn(u, o, c, l, r);
|
|
1922
|
+
Pn(u, d, f, c, l) && (u = Mn(u), {top: d, left: f} = Nn(u, o, c, l, r)), {top: d, left: f} = Rn(e, d, f), e.style.top = `${d}px`, e.style.left = `${f}px`;
|
|
1774
1923
|
}, E = (e, t) => {
|
|
1775
1924
|
e.hidden !== !t && (e.hidden = !t);
|
|
1776
1925
|
}, D = () => {
|
|
@@ -1778,21 +1927,21 @@ var tn = {
|
|
|
1778
1927
|
}, O = (e) => {
|
|
1779
1928
|
D(), S(e), E(e, !1), w(e);
|
|
1780
1929
|
}, k = (e, n) => {
|
|
1781
|
-
D(), u().concat(
|
|
1782
|
-
t === e || !
|
|
1930
|
+
D(), u().concat(Cn(document.querySelectorAll(t.rootSelector))).forEach((t) => {
|
|
1931
|
+
t === e || !Y(t) || O(t);
|
|
1783
1932
|
}), C(e, n), S(e), n && x(n, e), E(e, !0), T(e, n);
|
|
1784
1933
|
}, A = (e) => {
|
|
1785
1934
|
let t = v(e);
|
|
1786
1935
|
if (!t) return;
|
|
1787
1936
|
let n = e && h(e) === t ? e : g(e ?? t);
|
|
1788
|
-
if (
|
|
1937
|
+
if (Y(t)) {
|
|
1789
1938
|
S(t), n && x(n, t), T(t, n);
|
|
1790
1939
|
return;
|
|
1791
1940
|
}
|
|
1792
1941
|
k(t, n);
|
|
1793
1942
|
}, j = (e) => {
|
|
1794
1943
|
let t = v(e);
|
|
1795
|
-
!t || !
|
|
1944
|
+
!t || !Y(t) || O(t);
|
|
1796
1945
|
}, M = (e) => {
|
|
1797
1946
|
if (D(), i <= 0) {
|
|
1798
1947
|
O(e);
|
|
@@ -1803,18 +1952,18 @@ var tn = {
|
|
|
1803
1952
|
}, i);
|
|
1804
1953
|
}, F = () => {
|
|
1805
1954
|
u().forEach((e) => {
|
|
1806
|
-
|
|
1955
|
+
Y(e) && T(e);
|
|
1807
1956
|
});
|
|
1808
1957
|
}, I = () => {
|
|
1809
1958
|
u().forEach((e) => {
|
|
1810
|
-
S(e),
|
|
1959
|
+
S(e), Y(e) && T(e);
|
|
1811
1960
|
});
|
|
1812
1961
|
}, L = (e) => {
|
|
1813
1962
|
if (!(e instanceof MouseEvent)) return;
|
|
1814
1963
|
let t = e.target;
|
|
1815
1964
|
if (!(t instanceof Element)) return;
|
|
1816
1965
|
let n = g(t);
|
|
1817
|
-
n &&
|
|
1966
|
+
n && Tn(e) && (s = n, D(), A(n));
|
|
1818
1967
|
}, R = (e) => {
|
|
1819
1968
|
if (!(e instanceof MouseEvent)) return;
|
|
1820
1969
|
let t = e.target;
|
|
@@ -1822,15 +1971,15 @@ var tn = {
|
|
|
1822
1971
|
let n = g(t);
|
|
1823
1972
|
if (!n) return;
|
|
1824
1973
|
let r = e.relatedTarget;
|
|
1825
|
-
if (r instanceof Node && n.contains(r) || !
|
|
1974
|
+
if (r instanceof Node && n.contains(r) || !Tn(e)) return;
|
|
1826
1975
|
s === n && (s = null);
|
|
1827
1976
|
let i = h(n);
|
|
1828
|
-
!i || !
|
|
1977
|
+
!i || !Y(i) || c && h(c) === i || M(i);
|
|
1829
1978
|
}, z = (e) => {
|
|
1830
1979
|
let t = e.target;
|
|
1831
1980
|
if (!(t instanceof Element)) return;
|
|
1832
1981
|
let n = g(t);
|
|
1833
|
-
n &&
|
|
1982
|
+
n && Tn(e) && (c = n, D(), A(n));
|
|
1834
1983
|
}, B = (e) => {
|
|
1835
1984
|
if (!(e instanceof FocusEvent)) return;
|
|
1836
1985
|
let t = e.target;
|
|
@@ -1838,24 +1987,24 @@ var tn = {
|
|
|
1838
1987
|
let n = g(t);
|
|
1839
1988
|
if (!n) return;
|
|
1840
1989
|
let r = e.relatedTarget;
|
|
1841
|
-
if (r instanceof Node && n.contains(r) || !
|
|
1990
|
+
if (r instanceof Node && n.contains(r) || !Tn(e)) return;
|
|
1842
1991
|
c === n && (c = null);
|
|
1843
1992
|
let i = h(n);
|
|
1844
|
-
!i || !
|
|
1993
|
+
!i || !Y(i) || s && h(s) === i || M(i);
|
|
1845
1994
|
}, V = (e) => {
|
|
1846
|
-
if (!(e instanceof KeyboardEvent) || e.key !== "Escape" ||
|
|
1995
|
+
if (!(e instanceof KeyboardEvent) || e.key !== "Escape" || An() || e.defaultPrevented) return;
|
|
1847
1996
|
let t = _();
|
|
1848
|
-
t &&
|
|
1849
|
-
}, H = !1,
|
|
1997
|
+
t && Tn(e) && (e.preventDefault(), e.stopPropagation(), O(t));
|
|
1998
|
+
}, H = !1, U = () => {
|
|
1850
1999
|
H || (H = !0, requestAnimationFrame(() => {
|
|
1851
2000
|
H = !1, I();
|
|
1852
2001
|
}));
|
|
1853
|
-
},
|
|
1854
|
-
|
|
1855
|
-
|
|
2002
|
+
}, ee = !1, te = () => {
|
|
2003
|
+
ee || (ee = !0, requestAnimationFrame(() => {
|
|
2004
|
+
ee = !1, F();
|
|
1856
2005
|
}));
|
|
1857
|
-
},
|
|
1858
|
-
return document.addEventListener("mouseover", L), document.addEventListener("mouseout", R), document.addEventListener("focusin", z), document.addEventListener("focusout", B), document.addEventListener("keydown", V), window.addEventListener("resize",
|
|
2006
|
+
}, ne = typeof MutationObserver < "u" ? new MutationObserver(() => U()) : null;
|
|
2007
|
+
return document.addEventListener("mouseover", L), document.addEventListener("mouseout", R), document.addEventListener("focusin", z), document.addEventListener("focusout", B), document.addEventListener("keydown", V), window.addEventListener("resize", te), window.addEventListener("scroll", te, !0), ne && n instanceof Node && ne.observe(n, {
|
|
1859
2008
|
childList: !0,
|
|
1860
2009
|
subtree: !0,
|
|
1861
2010
|
attributes: !0,
|
|
@@ -1868,23 +2017,23 @@ var tn = {
|
|
|
1868
2017
|
]
|
|
1869
2018
|
}), I(), {
|
|
1870
2019
|
destroy: () => {
|
|
1871
|
-
D(), s = null, c = null, document.removeEventListener("mouseover", L), document.removeEventListener("mouseout", R), document.removeEventListener("focusin", z), document.removeEventListener("focusout", B), document.removeEventListener("keydown", V), window.removeEventListener("resize",
|
|
2020
|
+
D(), s = null, c = null, document.removeEventListener("mouseover", L), document.removeEventListener("mouseout", R), document.removeEventListener("focusin", z), document.removeEventListener("focusout", B), document.removeEventListener("keydown", V), window.removeEventListener("resize", te), window.removeEventListener("scroll", te, !0), ne?.disconnect();
|
|
1872
2021
|
},
|
|
1873
2022
|
sync: I,
|
|
1874
2023
|
show: A,
|
|
1875
2024
|
hide: j
|
|
1876
2025
|
};
|
|
1877
|
-
},
|
|
1878
|
-
|
|
1879
|
-
},
|
|
1880
|
-
|
|
2026
|
+
}, Bn = (e = {}) => zn(e), Vn = null, Hn = !1, Un = null, Wn = () => {
|
|
2027
|
+
Un &&= (document.removeEventListener("DOMContentLoaded", Un), null);
|
|
2028
|
+
}, Gn = () => typeof window > "u" || typeof document > "u" ? null : (Hn = !1, Wn(), Vn ? (Vn.sync(), Vn) : (Vn = zn(), Vn)), Kn = () => {
|
|
2029
|
+
Hn = !0, Wn(), Vn?.destroy(), Vn = null;
|
|
1881
2030
|
};
|
|
1882
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
1883
|
-
|
|
1884
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
2031
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (Un = () => {
|
|
2032
|
+
Un = null, Hn || Gn();
|
|
2033
|
+
}, document.addEventListener("DOMContentLoaded", Un)) : Gn());
|
|
1885
2034
|
//#endregion
|
|
1886
2035
|
//#region src/js/src/wizard/wizard-runtime.ts
|
|
1887
|
-
var
|
|
2036
|
+
var qn = {
|
|
1888
2037
|
root: typeof document < "u" ? document : {},
|
|
1889
2038
|
shellSelector: "[wizard-shell]",
|
|
1890
2039
|
trackerSelector: "[step-tracker]",
|
|
@@ -1895,20 +2044,20 @@ var kn = {
|
|
|
1895
2044
|
nextSelector: "[wizard-next]",
|
|
1896
2045
|
prevSelector: "[wizard-prev]",
|
|
1897
2046
|
completeSelector: "[wizard-complete]"
|
|
1898
|
-
},
|
|
2047
|
+
}, Jn = (e) => Array.from(e), Yn = "juice-wizard-step", Xn = "juice-wizard-page", Zn = A(), Qn = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLInputElement ? e.type === "button" || e.type === "submit" : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, $n = (e) => e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "wizard", er = (e, t) => {
|
|
1899
2048
|
let n = e.compareDocumentPosition(t);
|
|
1900
2049
|
return n & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
1901
|
-
},
|
|
2050
|
+
}, tr = (e) => {
|
|
1902
2051
|
let t = (e.getAttribute("wizard-shell") || "").trim().toLowerCase();
|
|
1903
2052
|
return t === "linear" ? "linear" : t === "free" ? "free" : "default";
|
|
1904
|
-
},
|
|
2053
|
+
}, nr = (e) => e.getAttribute("data-step") || e.getAttribute("name") || e.getAttribute("step-page") || (e.id ? e.id : null), rr = (e) => {
|
|
1905
2054
|
let t = /* @__PURE__ */ new Set(), n = e.getAttribute("data-step");
|
|
1906
2055
|
n && t.add(n);
|
|
1907
2056
|
let r = e.getAttribute("name");
|
|
1908
2057
|
r && t.add(r);
|
|
1909
2058
|
let i = e.getAttribute("step-page");
|
|
1910
2059
|
return i && t.add(i), e.id && t.add(e.id), t;
|
|
1911
|
-
},
|
|
2060
|
+
}, ir = (e, t, n) => t === n ? !0 : e === "linear" ? !1 : e === "free" ? !0 : t < n, ar = (e) => (e instanceof HTMLButtonElement || e instanceof HTMLInputElement) && e.disabled ? !0 : e.getAttribute("aria-disabled") === "true", or = (e = {}) => {
|
|
1912
2061
|
if (typeof window > "u" || typeof document > "u") return {
|
|
1913
2062
|
destroy: () => {},
|
|
1914
2063
|
sync: () => {},
|
|
@@ -1918,22 +2067,22 @@ var kn = {
|
|
|
1918
2067
|
current: () => 0
|
|
1919
2068
|
};
|
|
1920
2069
|
let t = {
|
|
1921
|
-
...
|
|
2070
|
+
...qn,
|
|
1922
2071
|
...e
|
|
1923
|
-
}, n = t.root ?? document, r = n, i = () =>
|
|
2072
|
+
}, n = t.root ?? document, r = n, i = () => Jn(n.querySelectorAll(t.shellSelector)), a = (e) => {
|
|
1924
2073
|
if (!e) return null;
|
|
1925
2074
|
let n = e.closest(t.shellSelector);
|
|
1926
2075
|
return n instanceof HTMLElement ? n : null;
|
|
1927
2076
|
}, o = (e, t) => a(e) === t, s = (e) => {
|
|
1928
2077
|
let n = e.querySelector(t.stepsSelector), r = e.querySelector(t.trackerSelector), i = n ?? r ?? e, a = /* @__PURE__ */ new Set(), s = [];
|
|
1929
|
-
return
|
|
2078
|
+
return Jn(i.querySelectorAll(t.stepSelector)).forEach((n) => {
|
|
1930
2079
|
n instanceof HTMLElement && n.matches(t.stepSelector) && (!o(n, e) || a.has(n) || n.closest(t.pageSelector) || (a.add(n), s.push(n)));
|
|
1931
|
-
}), s.sort(
|
|
1932
|
-
}, c = (e) =>
|
|
2080
|
+
}), s.sort(er);
|
|
2081
|
+
}, c = (e) => Jn(e.querySelectorAll(t.pageSelector)).filter((t) => o(t, e)).sort(er), l = (e) => Jn(e.querySelectorAll(t.navSelector)).filter((t) => o(t, e)), u = (e, t) => Jn(e.querySelectorAll(t)).filter((t) => o(t, e)), d = (e) => {
|
|
1933
2082
|
let n = /* @__PURE__ */ new Set(), r = [], i = (t) => {
|
|
1934
2083
|
t instanceof HTMLElement && (n.has(t) || !e.contains(t) || !o(t, a(e) ?? e) || (n.add(t), r.push(t)));
|
|
1935
2084
|
};
|
|
1936
|
-
return
|
|
2085
|
+
return Jn(e.querySelectorAll("button")).forEach(i), Jn(e.querySelectorAll(`${t.prevSelector}, ${t.nextSelector}`)).forEach(i), r.sort(er);
|
|
1937
2086
|
}, f = (e) => {
|
|
1938
2087
|
let n = u(e, t.prevSelector);
|
|
1939
2088
|
if (n.length > 0) return n;
|
|
@@ -1956,9 +2105,9 @@ var kn = {
|
|
|
1956
2105
|
let n = e.querySelector(`#${j(a)}`);
|
|
1957
2106
|
if (n && n.matches(t.pageSelector) && o(n, e)) return n;
|
|
1958
2107
|
}
|
|
1959
|
-
let l =
|
|
2108
|
+
let l = nr(n);
|
|
1960
2109
|
if (l) {
|
|
1961
|
-
let e = r.find((e) =>
|
|
2110
|
+
let e = r.find((e) => rr(e).has(l));
|
|
1962
2111
|
if (e) return e;
|
|
1963
2112
|
}
|
|
1964
2113
|
let u = i.indexOf(n);
|
|
@@ -1969,9 +2118,9 @@ var kn = {
|
|
|
1969
2118
|
let a = r.indexOf(t);
|
|
1970
2119
|
return a >= 0 ? n[a] ?? null : null;
|
|
1971
2120
|
}, _ = (e, t) => {
|
|
1972
|
-
let n = s(e), r = c(e), i = n.findIndex((e) => e.id === t ? !0 :
|
|
2121
|
+
let n = s(e), r = c(e), i = n.findIndex((e) => e.id === t ? !0 : rr(e).has(t));
|
|
1973
2122
|
if (i >= 0) return i;
|
|
1974
|
-
let a = r.findIndex((e) => e.id === t ? !0 :
|
|
2123
|
+
let a = r.findIndex((e) => e.id === t ? !0 : rr(e).has(t));
|
|
1975
2124
|
if (a >= 0) {
|
|
1976
2125
|
let t = g(e, r[a]), i = t ? n.indexOf(t) : a;
|
|
1977
2126
|
return i >= 0 ? i : a;
|
|
@@ -1996,13 +2145,13 @@ var kn = {
|
|
|
1996
2145
|
return 0;
|
|
1997
2146
|
}, b = 0, x = (e) => (b += 1, `${e}-${b}`), S = (e) => {
|
|
1998
2147
|
let t = e.getAttribute("name");
|
|
1999
|
-
return t ?
|
|
2148
|
+
return t ? $n(t) : null;
|
|
2000
2149
|
}, C = (e) => {
|
|
2001
2150
|
let n = e.querySelector(t.stepsSelector);
|
|
2002
2151
|
!n || !o(n, e) || n.tagName === "UL" || n.tagName === "OL" || n.getAttribute("role") || n.setAttribute("role", "list");
|
|
2003
2152
|
}, w = (e, t, n, r, i) => {
|
|
2004
2153
|
let a = s(e), o = S(e), l = a.length > 1 || c(e).length > 1 ? `-${r + 1}` : "";
|
|
2005
|
-
t.id ||= o ? `${o}-step${l}` : x(
|
|
2154
|
+
t.id ||= o ? `${o}-step${l}` : x(Yn), Qn(t) || (i && t.getAttribute("tabindex") !== "0" && t.setAttribute("tabindex", "0"), !i && t.getAttribute("tabindex") === "0" && t.removeAttribute("tabindex")), n && (n.id ||= o ? `${o}-page${l}` : x(Xn), t.getAttribute("aria-controls") !== n.id && t.setAttribute("aria-controls", n.id), n.getAttribute("role") || n.setAttribute("role", "region"), !n.hasAttribute("aria-label") && !n.hasAttribute("aria-labelledby") && n.setAttribute("aria-labelledby", t.id));
|
|
2006
2155
|
}, T = (e, t) => {
|
|
2007
2156
|
(e instanceof HTMLButtonElement || e instanceof HTMLInputElement) && e.disabled !== t && (e.disabled = t);
|
|
2008
2157
|
let n = String(t);
|
|
@@ -2014,11 +2163,11 @@ var kn = {
|
|
|
2014
2163
|
}, D = (e, t) => {
|
|
2015
2164
|
let n = s(e), r = c(e);
|
|
2016
2165
|
if (n.length === 0 && r.length === 0) return;
|
|
2017
|
-
let i = Math.min(Math.max(0, t), v(e)), a =
|
|
2166
|
+
let i = Math.min(Math.max(0, t), v(e)), a = tr(e);
|
|
2018
2167
|
C(e), n.forEach((t, n) => {
|
|
2019
2168
|
let r = n < i ? "completed" : n === i ? "active" : "pending";
|
|
2020
2169
|
t.getAttribute("step") !== r && t.setAttribute("step", r), n === i ? t.getAttribute("aria-current") !== "step" && t.setAttribute("aria-current", "step") : t.hasAttribute("aria-current") && t.removeAttribute("aria-current");
|
|
2021
|
-
let o =
|
|
2170
|
+
let o = ir(a, n, i);
|
|
2022
2171
|
w(e, t, h(e, t), n, o), o ? t.getAttribute("aria-disabled") === "true" && t.removeAttribute("aria-disabled") : t.getAttribute("aria-disabled") !== "true" && t.setAttribute("aria-disabled", "true");
|
|
2023
2172
|
});
|
|
2024
2173
|
let o = n[i] ?? null, l = o ? h(e, o) : r[i] ?? null;
|
|
@@ -2026,7 +2175,7 @@ var kn = {
|
|
|
2026
2175
|
let a = g(e, t);
|
|
2027
2176
|
E(t, (a ? n.indexOf(a) : r.indexOf(t)) === i), t.getAttribute("role") || t.setAttribute("role", "region");
|
|
2028
2177
|
});
|
|
2029
|
-
let u = e.querySelector("[wizard-content]"), d = l &&
|
|
2178
|
+
let u = e.querySelector("[wizard-content]"), d = l && nr(l) || o && nr(o);
|
|
2030
2179
|
u && d && u.getAttribute("data-step") !== d && u.setAttribute("data-step", d);
|
|
2031
2180
|
let _ = i <= 0, y = i >= v(e);
|
|
2032
2181
|
f(e).forEach((e) => T(e, _)), p(e).forEach((e) => T(e, y)), m(e).forEach((e) => T(e, !y));
|
|
@@ -2078,28 +2227,28 @@ var kn = {
|
|
|
2078
2227
|
let t = a(e);
|
|
2079
2228
|
if (!t) return;
|
|
2080
2229
|
let n = s(t).indexOf(e);
|
|
2081
|
-
n < 0 ||
|
|
2230
|
+
n < 0 || ir(tr(t), n, y(t)) && D(t, n);
|
|
2082
2231
|
}, R = (e) => {
|
|
2083
2232
|
let n = e.target;
|
|
2084
2233
|
if (!(n instanceof Element)) return;
|
|
2085
2234
|
let r = I(n), i = n instanceof HTMLElement ? n.closest(`${t.nextSelector}, ${t.prevSelector}, ${t.completeSelector}, button`) : null;
|
|
2086
|
-
if (i instanceof HTMLElement &&
|
|
2235
|
+
if (i instanceof HTMLElement && ar(i) && (r === "next" || r === "prev" || r === "complete")) return;
|
|
2087
2236
|
if (r === "complete") {
|
|
2088
|
-
|
|
2237
|
+
Zn(e);
|
|
2089
2238
|
return;
|
|
2090
2239
|
}
|
|
2091
2240
|
if (r === "next") {
|
|
2092
|
-
if (!
|
|
2241
|
+
if (!Zn(e)) return;
|
|
2093
2242
|
M(n);
|
|
2094
2243
|
return;
|
|
2095
2244
|
}
|
|
2096
2245
|
if (r === "prev") {
|
|
2097
|
-
if (!
|
|
2246
|
+
if (!Zn(e)) return;
|
|
2098
2247
|
N(n);
|
|
2099
2248
|
return;
|
|
2100
2249
|
}
|
|
2101
2250
|
let a = F(n);
|
|
2102
|
-
a &&
|
|
2251
|
+
a && Zn(e) && L(a);
|
|
2103
2252
|
}, z = (e) => {
|
|
2104
2253
|
if (!(e instanceof KeyboardEvent) || e.key !== "Enter" && e.key !== " ") return;
|
|
2105
2254
|
let t = e.target;
|
|
@@ -2107,12 +2256,12 @@ var kn = {
|
|
|
2107
2256
|
let n = I(t);
|
|
2108
2257
|
if (n === "next" || n === "prev") {
|
|
2109
2258
|
let r = t.closest("button, [wizard-next], [wizard-prev]");
|
|
2110
|
-
if (r instanceof HTMLElement &&
|
|
2259
|
+
if (r instanceof HTMLElement && Qn(r) || !Zn(e)) return;
|
|
2111
2260
|
e.preventDefault(), n === "next" ? M(t) : N(t);
|
|
2112
2261
|
return;
|
|
2113
2262
|
}
|
|
2114
2263
|
let r = F(t);
|
|
2115
|
-
!r ||
|
|
2264
|
+
!r || Qn(r) || Zn(e) && (e.preventDefault(), L(r));
|
|
2116
2265
|
}, B = !1, V = () => {
|
|
2117
2266
|
B || (B = !0, requestAnimationFrame(() => {
|
|
2118
2267
|
B = !1, P();
|
|
@@ -2143,52 +2292,52 @@ var kn = {
|
|
|
2143
2292
|
goTo: A,
|
|
2144
2293
|
current: k
|
|
2145
2294
|
};
|
|
2146
|
-
},
|
|
2147
|
-
|
|
2148
|
-
},
|
|
2149
|
-
|
|
2295
|
+
}, sr = (e = {}) => or(e), cr = null, lr = !1, ur = null, dr = () => {
|
|
2296
|
+
ur &&= (document.removeEventListener("DOMContentLoaded", ur), null);
|
|
2297
|
+
}, fr = () => typeof window > "u" || typeof document > "u" ? null : (lr = !1, dr(), cr ? (cr.sync(), cr) : (cr = or(), cr)), pr = () => {
|
|
2298
|
+
lr = !0, dr(), cr?.destroy(), cr = null;
|
|
2150
2299
|
};
|
|
2151
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
2152
|
-
|
|
2153
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
2300
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (ur = () => {
|
|
2301
|
+
ur = null, lr || fr();
|
|
2302
|
+
}, document.addEventListener("DOMContentLoaded", ur)) : fr());
|
|
2154
2303
|
//#endregion
|
|
2155
2304
|
//#region src/js/src/combobox/combobox-runtime.ts
|
|
2156
|
-
var
|
|
2305
|
+
var mr = {
|
|
2157
2306
|
root: typeof document < "u" ? document : {},
|
|
2158
2307
|
rootSelector: "[combobox]",
|
|
2159
2308
|
inputSelector: "[combobox-input]",
|
|
2160
2309
|
triggerSelector: "[combobox-trigger]",
|
|
2161
2310
|
listSelector: "[combobox-list]",
|
|
2162
2311
|
optionSelector: "[combobox-option]"
|
|
2163
|
-
},
|
|
2312
|
+
}, hr = (e) => Array.from(e), gr = "juice-combobox-list", _r = "juice-combobox-option", vr = 0, yr = (e) => {
|
|
2164
2313
|
let t = "";
|
|
2165
2314
|
do
|
|
2166
|
-
|
|
2315
|
+
vr += 1, t = `${e}-${vr}`;
|
|
2167
2316
|
while (typeof document < "u" && document.getElementById(t));
|
|
2168
2317
|
return t;
|
|
2169
|
-
},
|
|
2170
|
-
if (
|
|
2318
|
+
}, br = (e, t, n) => e.id ? e.id : t && !document.getElementById(t) ? (e.id = t, t) : (e.id = yr(n), e.id), X = A(), xr = (e) => e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "combobox", Sr = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, Cr = (e) => e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement, wr = (e) => Cr(e) ? e.value : e.textContent ?? "", Tr = (e, t) => {
|
|
2319
|
+
if (Cr(e)) {
|
|
2171
2320
|
e.value = t;
|
|
2172
2321
|
return;
|
|
2173
2322
|
}
|
|
2174
2323
|
e.textContent = t;
|
|
2175
|
-
},
|
|
2324
|
+
}, Er = (e) => e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement ? e.disabled : e.getAttribute("aria-disabled") === "true", Dr = (e) => e.isComposing || e.keyCode === 229, Or = () => Tt() || Et() || Dt(), kr = () => ({
|
|
2176
2325
|
destroy: () => {},
|
|
2177
2326
|
sync: () => {},
|
|
2178
2327
|
open: () => {},
|
|
2179
2328
|
close: () => {},
|
|
2180
2329
|
toggle: () => {},
|
|
2181
2330
|
select: () => {}
|
|
2182
|
-
}),
|
|
2183
|
-
if (typeof window > "u" || typeof document > "u") return
|
|
2331
|
+
}), Ar = (e = {}) => {
|
|
2332
|
+
if (typeof window > "u" || typeof document > "u") return kr();
|
|
2184
2333
|
let t = {
|
|
2185
|
-
...
|
|
2334
|
+
...mr,
|
|
2186
2335
|
...e
|
|
2187
|
-
}, n = t.root ?? document, r = () =>
|
|
2336
|
+
}, n = t.root ?? document, r = () => hr(n.querySelectorAll(t.rootSelector)), i = (e) => {
|
|
2188
2337
|
if (!e) return null;
|
|
2189
2338
|
let n = e.closest(t.rootSelector);
|
|
2190
2339
|
return n instanceof HTMLElement ? n : null;
|
|
2191
|
-
}, a = (e) => e?.matches(t.rootSelector) ? n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : r().includes(e) : !1, o = (e) =>
|
|
2340
|
+
}, a = (e) => e?.matches(t.rootSelector) ? n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : r().includes(e) : !1, o = (e) => hr(e.querySelectorAll(t.inputSelector)).find((t) => i(t) === e) ?? null, s = (e) => hr(e.querySelectorAll(t.listSelector)).find((t) => i(t) === e) ?? null, c = (e) => hr(e.querySelectorAll(t.triggerSelector)).find((t) => i(t) === e) ?? null, l = (e) => hr((s(e) ?? e).querySelectorAll(t.optionSelector)).filter((t) => i(t) === e), u = (e) => {
|
|
2192
2341
|
let t = s(e);
|
|
2193
2342
|
return !!(t && !t.hasAttribute("hidden"));
|
|
2194
2343
|
}, d = (e) => l(e).filter((e) => !e.hasAttribute("hidden")), f = (e) => d(e).find((e) => e.getAttribute("combobox-option") === "active") ?? null, p = (e) => {
|
|
@@ -2200,13 +2349,13 @@ var Xn = {
|
|
|
2200
2349
|
return r().find(u) ?? r()[0] ?? null;
|
|
2201
2350
|
}, m = (e) => {
|
|
2202
2351
|
let t = e.getAttribute("name");
|
|
2203
|
-
return t ?
|
|
2352
|
+
return t ? xr(t) : e.id ? xr(e.id) : null;
|
|
2204
2353
|
}, h = (e, t) => {
|
|
2205
2354
|
if (!t || (e.textContent ?? "").trim().toLowerCase().includes(t)) return !0;
|
|
2206
2355
|
let n = e.getAttribute("data-value");
|
|
2207
2356
|
return n != null && n.toLowerCase().includes(t);
|
|
2208
2357
|
}, g = (e) => {
|
|
2209
|
-
let t = o(e), n = t ?
|
|
2358
|
+
let t = o(e), n = t ? wr(t).trim().toLowerCase() : "";
|
|
2210
2359
|
if (l(e).forEach((e) => {
|
|
2211
2360
|
let t = h(e, n);
|
|
2212
2361
|
e.hidden !== !t && (e.hidden = !t);
|
|
@@ -2248,20 +2397,20 @@ var Xn = {
|
|
|
2248
2397
|
let t = o(e), n = s(e), r = c(e), i = l(e);
|
|
2249
2398
|
if (!t || !n) return;
|
|
2250
2399
|
let a = m(e);
|
|
2251
|
-
t.getAttribute("role") !== "combobox" && t.setAttribute("role", "combobox"), t.getAttribute("aria-autocomplete") !== "list" && t.setAttribute("aria-autocomplete", "list"),
|
|
2252
|
-
|
|
2253
|
-
}), r && (
|
|
2400
|
+
t.getAttribute("role") !== "combobox" && t.setAttribute("role", "combobox"), t.getAttribute("aria-autocomplete") !== "list" && t.setAttribute("aria-autocomplete", "list"), br(n, a ? `${a}-list` : null, gr), n.getAttribute("role") !== "listbox" && n.setAttribute("role", "listbox"), t.getAttribute("aria-controls") !== n.id && t.setAttribute("aria-controls", n.id), i.forEach((e, t) => {
|
|
2401
|
+
br(e, a ? `${a}-option-${t + 1}` : null, _r), e.getAttribute("role") !== "option" && e.setAttribute("role", "option");
|
|
2402
|
+
}), r && (Sr(r) || (r.setAttribute("role", "button"), r.hasAttribute("tabindex") || r.setAttribute("tabindex", "0")), r.getAttribute("aria-controls") !== n.id && r.setAttribute("aria-controls", n.id), r.hasAttribute("aria-haspopup") || r.setAttribute("aria-haspopup", "listbox")), v(e, u(e));
|
|
2254
2403
|
}, S = (e) => {
|
|
2255
2404
|
x(e), y(e, !1), v(e, !1), b(e, null), _(e);
|
|
2256
2405
|
}, C = (e) => {
|
|
2257
|
-
r().concat(
|
|
2406
|
+
r().concat(hr(document.querySelectorAll(t.rootSelector))).forEach((t) => {
|
|
2258
2407
|
t === e || !u(t) || S(t);
|
|
2259
2408
|
}), x(e), g(e), y(e, !0), v(e, !0);
|
|
2260
2409
|
}, w = (e) => {
|
|
2261
2410
|
let t = p(e);
|
|
2262
2411
|
if (!t) return;
|
|
2263
2412
|
let n = o(t);
|
|
2264
|
-
if (!(!n ||
|
|
2413
|
+
if (!(!n || Er(n))) {
|
|
2265
2414
|
if (u(t)) {
|
|
2266
2415
|
x(t), g(t), v(t, !0);
|
|
2267
2416
|
return;
|
|
@@ -2284,7 +2433,7 @@ var Xn = {
|
|
|
2284
2433
|
let t = i(e);
|
|
2285
2434
|
if (!t || !a(t)) return;
|
|
2286
2435
|
let n = o(t);
|
|
2287
|
-
!n ||
|
|
2436
|
+
!n || Er(n) || (x(t), Tr(n, e.hasAttribute("data-value") ? e.getAttribute("data-value") ?? "" : (e.textContent ?? "").trim()), l(t).forEach((t) => {
|
|
2288
2437
|
let n = String(t === e);
|
|
2289
2438
|
t.getAttribute("aria-selected") !== n && t.setAttribute("aria-selected", n);
|
|
2290
2439
|
}), b(t, e), S(t));
|
|
@@ -2359,7 +2508,7 @@ var Xn = {
|
|
|
2359
2508
|
let n = i(t);
|
|
2360
2509
|
if (!n || !a(n)) return;
|
|
2361
2510
|
let r = N(t, n);
|
|
2362
|
-
!r ||
|
|
2511
|
+
!r || Er(r) || X(e) && w(n);
|
|
2363
2512
|
}, L = (e) => {
|
|
2364
2513
|
if (!(e instanceof FocusEvent)) return;
|
|
2365
2514
|
let t = e.target;
|
|
@@ -2374,17 +2523,17 @@ var Xn = {
|
|
|
2374
2523
|
let n = i(t);
|
|
2375
2524
|
if (!n || !a(n)) return;
|
|
2376
2525
|
let r = N(t, n);
|
|
2377
|
-
!r ||
|
|
2526
|
+
!r || Er(r) || X(e) && w(n);
|
|
2378
2527
|
}, z = (e) => {
|
|
2379
|
-
if (!(e instanceof KeyboardEvent) ||
|
|
2528
|
+
if (!(e instanceof KeyboardEvent) || Dr(e)) return;
|
|
2380
2529
|
let t = e.target;
|
|
2381
2530
|
if (!(t instanceof Element)) return;
|
|
2382
2531
|
let n = i(t);
|
|
2383
2532
|
if (!n || !a(n)) return;
|
|
2384
2533
|
let r = N(t, n), s = M(t, n);
|
|
2385
|
-
if (!r && !s || r &&
|
|
2534
|
+
if (!r && !s || r && Er(r)) return;
|
|
2386
2535
|
if (e.key === "Escape") {
|
|
2387
|
-
if (!u(n) ||
|
|
2536
|
+
if (!u(n) || Or() || e.defaultPrevented || !X(e)) return;
|
|
2388
2537
|
e.preventDefault(), e.stopPropagation(), T(n);
|
|
2389
2538
|
return;
|
|
2390
2539
|
}
|
|
@@ -2403,7 +2552,7 @@ var Xn = {
|
|
|
2403
2552
|
e.preventDefault(), u(n) || w(n), s && !r && o(n)?.focus(), k(n, (e, t) => e < 0 ? t - 1 : e - 1);
|
|
2404
2553
|
return;
|
|
2405
2554
|
}
|
|
2406
|
-
if (s && !r && !
|
|
2555
|
+
if (s && !r && !Sr(s) && (e.key === "Enter" || e.key === " ")) {
|
|
2407
2556
|
if (!X(e)) return;
|
|
2408
2557
|
e.preventDefault(), E(n);
|
|
2409
2558
|
let t = o(n);
|
|
@@ -2455,24 +2604,24 @@ var Xn = {
|
|
|
2455
2604
|
toggle: E,
|
|
2456
2605
|
select: O
|
|
2457
2606
|
};
|
|
2458
|
-
},
|
|
2459
|
-
|
|
2460
|
-
},
|
|
2461
|
-
|
|
2607
|
+
}, jr = (e = {}) => Ar(e), Mr = null, Nr = !1, Pr = null, Fr = () => {
|
|
2608
|
+
Pr &&= (document.removeEventListener("DOMContentLoaded", Pr), null);
|
|
2609
|
+
}, Ir = () => typeof window > "u" || typeof document > "u" ? null : (Nr = !1, Fr(), Mr ? (Mr.sync(), Mr) : (Mr = Ar(), Mr)), Lr = () => {
|
|
2610
|
+
Nr = !0, Fr(), Mr?.destroy(), Mr = null;
|
|
2462
2611
|
};
|
|
2463
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
2464
|
-
|
|
2465
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
2612
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (Pr = () => {
|
|
2613
|
+
Pr = null, Nr || Ir();
|
|
2614
|
+
}, document.addEventListener("DOMContentLoaded", Pr)) : Ir());
|
|
2466
2615
|
//#endregion
|
|
2467
2616
|
//#region src/js/src/banner/banner-runtime.ts
|
|
2468
|
-
var
|
|
2617
|
+
var Rr = {
|
|
2469
2618
|
root: typeof document < "u" ? document : {},
|
|
2470
2619
|
bannerSelector: "[banner]",
|
|
2471
2620
|
closeSelector: "[banner-close]"
|
|
2472
|
-
},
|
|
2621
|
+
}, zr = "juice-banner:", Br = (e) => Array.from(e), Vr = A(), Hr = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, Ur = (e) => !e.hasAttribute("hidden"), Wr = (e) => {
|
|
2473
2622
|
let t = e.getAttribute("banner-tone");
|
|
2474
2623
|
return t === "error" || t === "warning";
|
|
2475
|
-
},
|
|
2624
|
+
}, Gr = (e) => {
|
|
2476
2625
|
let t = e.getAttribute("banner-persist");
|
|
2477
2626
|
if (t !== "session" && t !== "local") return null;
|
|
2478
2627
|
let n = e.getAttribute("name")?.trim(), r = e.id?.trim(), i = n || r;
|
|
@@ -2480,18 +2629,18 @@ var br = {
|
|
|
2480
2629
|
let a = t === "local" ? typeof localStorage > "u" ? null : localStorage : typeof sessionStorage > "u" ? null : sessionStorage;
|
|
2481
2630
|
return a ? {
|
|
2482
2631
|
storage: a,
|
|
2483
|
-
key: `${
|
|
2632
|
+
key: `${zr}${i}`
|
|
2484
2633
|
} : null;
|
|
2485
|
-
},
|
|
2486
|
-
let t =
|
|
2634
|
+
}, Kr = (e) => {
|
|
2635
|
+
let t = Gr(e);
|
|
2487
2636
|
if (!t) return !1;
|
|
2488
2637
|
try {
|
|
2489
2638
|
return t.storage.getItem(t.key) === "1";
|
|
2490
2639
|
} catch {
|
|
2491
2640
|
return !1;
|
|
2492
2641
|
}
|
|
2493
|
-
},
|
|
2494
|
-
let n =
|
|
2642
|
+
}, qr = (e, t) => {
|
|
2643
|
+
let n = Gr(e);
|
|
2495
2644
|
if (n) try {
|
|
2496
2645
|
if (t) {
|
|
2497
2646
|
n.storage.setItem(n.key, "1");
|
|
@@ -2499,7 +2648,7 @@ var br = {
|
|
|
2499
2648
|
}
|
|
2500
2649
|
n.storage.removeItem(n.key);
|
|
2501
2650
|
} catch {}
|
|
2502
|
-
},
|
|
2651
|
+
}, Jr = (e = {}) => {
|
|
2503
2652
|
if (typeof window > "u" || typeof document > "u") return {
|
|
2504
2653
|
destroy: () => {},
|
|
2505
2654
|
sync: () => {},
|
|
@@ -2507,9 +2656,9 @@ var br = {
|
|
|
2507
2656
|
dismiss: () => {}
|
|
2508
2657
|
};
|
|
2509
2658
|
let t = {
|
|
2510
|
-
...
|
|
2659
|
+
...Rr,
|
|
2511
2660
|
...e
|
|
2512
|
-
}, n = t.root ?? document, r = n, i = () =>
|
|
2661
|
+
}, n = t.root ?? document, r = n, i = () => Br(n.querySelectorAll(t.bannerSelector)), a = (e) => {
|
|
2513
2662
|
if (!e) return null;
|
|
2514
2663
|
let n = e.closest(t.bannerSelector);
|
|
2515
2664
|
return n instanceof HTMLElement ? n : null;
|
|
@@ -2520,25 +2669,25 @@ var br = {
|
|
|
2520
2669
|
if (t && o(t)) return t;
|
|
2521
2670
|
}
|
|
2522
2671
|
let t = i().filter(o);
|
|
2523
|
-
return t.find(
|
|
2672
|
+
return t.find(Ur) ?? t[0] ?? null;
|
|
2524
2673
|
}, c = (e) => {
|
|
2525
|
-
|
|
2526
|
-
|
|
2674
|
+
Br(e.querySelectorAll(t.closeSelector)).filter((t) => a(t) === e).forEach((e) => {
|
|
2675
|
+
Hr(e) || (e.setAttribute("role", "button"), e.hasAttribute("tabindex") || e.setAttribute("tabindex", "0")), !e.hasAttribute("aria-label") && !e.hasAttribute("aria-labelledby") && !e.textContent?.trim() && e.setAttribute("aria-label", "Dismiss");
|
|
2527
2676
|
});
|
|
2528
2677
|
}, l = (e) => {
|
|
2529
|
-
let t =
|
|
2678
|
+
let t = Wr(e) ? "alert" : "status";
|
|
2530
2679
|
e.getAttribute("role") !== t && e.setAttribute("role", t), c(e);
|
|
2531
2680
|
}, u = (e, t) => {
|
|
2532
2681
|
e.hidden !== !t && (e.hidden = !t);
|
|
2533
2682
|
}, d = (e) => {
|
|
2534
2683
|
let t = s(e);
|
|
2535
|
-
t && (
|
|
2684
|
+
t && (qr(t, !1), l(t), !Ur(t) && u(t, !0));
|
|
2536
2685
|
}, f = (e) => {
|
|
2537
2686
|
let t = s(e);
|
|
2538
|
-
!t || !
|
|
2687
|
+
!t || !Ur(t) || (qr(t, !0), u(t, !1));
|
|
2539
2688
|
}, p = () => {
|
|
2540
2689
|
i().forEach((e) => {
|
|
2541
|
-
o(e) && (
|
|
2690
|
+
o(e) && (Kr(e) && Ur(e) && u(e, !1), l(e));
|
|
2542
2691
|
});
|
|
2543
2692
|
}, m = (e) => {
|
|
2544
2693
|
let n = e.target;
|
|
@@ -2546,14 +2695,14 @@ var br = {
|
|
|
2546
2695
|
let r = n.closest(t.closeSelector);
|
|
2547
2696
|
if (!(r instanceof HTMLElement)) return;
|
|
2548
2697
|
let i = a(r);
|
|
2549
|
-
!i || !o(i) ||
|
|
2698
|
+
!i || !o(i) || Vr(e) && f(i);
|
|
2550
2699
|
}, h = (e) => {
|
|
2551
2700
|
if (!(e instanceof KeyboardEvent) || e.key !== "Enter" && e.key !== " ") return;
|
|
2552
2701
|
let n = e.target;
|
|
2553
2702
|
if (!(n instanceof Element)) return;
|
|
2554
2703
|
let r = n.closest(t.closeSelector);
|
|
2555
|
-
if (r instanceof HTMLElement && a(r) && !
|
|
2556
|
-
if (!
|
|
2704
|
+
if (r instanceof HTMLElement && a(r) && !Hr(r)) {
|
|
2705
|
+
if (!Vr(e)) return;
|
|
2557
2706
|
e.preventDefault(), f(r);
|
|
2558
2707
|
}
|
|
2559
2708
|
}, g = !1, _ = () => {
|
|
@@ -2584,17 +2733,17 @@ var br = {
|
|
|
2584
2733
|
show: d,
|
|
2585
2734
|
dismiss: f
|
|
2586
2735
|
};
|
|
2587
|
-
},
|
|
2588
|
-
|
|
2589
|
-
},
|
|
2590
|
-
|
|
2736
|
+
}, Yr = (e = {}) => Jr(e), Xr = null, Zr = !1, Qr = null, $r = () => {
|
|
2737
|
+
Qr &&= (document.removeEventListener("DOMContentLoaded", Qr), null);
|
|
2738
|
+
}, ei = () => typeof window > "u" || typeof document > "u" ? null : (Zr = !1, $r(), Xr ? (Xr.sync(), Xr) : (Xr = Jr(), Xr)), ti = () => {
|
|
2739
|
+
Zr = !0, $r(), Xr?.destroy(), Xr = null;
|
|
2591
2740
|
};
|
|
2592
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
2593
|
-
|
|
2594
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
2741
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (Qr = () => {
|
|
2742
|
+
Qr = null, Zr || ei();
|
|
2743
|
+
}, document.addEventListener("DOMContentLoaded", Qr)) : ei());
|
|
2595
2744
|
//#endregion
|
|
2596
2745
|
//#region src/js/src/menu/menu-runtime.ts
|
|
2597
|
-
var
|
|
2746
|
+
var ni = {
|
|
2598
2747
|
root: typeof document < "u" ? document : {},
|
|
2599
2748
|
rootSelector: "[menu-root]",
|
|
2600
2749
|
buttonSelector: "[menu-button]",
|
|
@@ -2602,23 +2751,23 @@ var Rr = {
|
|
|
2602
2751
|
itemSelector: "[menuitem]",
|
|
2603
2752
|
separatorSelector: "[menu-separator]",
|
|
2604
2753
|
labelSelector: "[menu-label]"
|
|
2605
|
-
}, Z = (e) => Array.from(e),
|
|
2754
|
+
}, Z = (e) => Array.from(e), ri = "juice-menu", ii = "juice-menuitem", ai = 0, oi = (e) => {
|
|
2606
2755
|
let t = "";
|
|
2607
2756
|
do
|
|
2608
|
-
|
|
2757
|
+
ai += 1, t = `${e}-${ai}`;
|
|
2609
2758
|
while (typeof document < "u" && document.getElementById(t));
|
|
2610
2759
|
return t;
|
|
2611
|
-
},
|
|
2760
|
+
}, si = (e, t, n) => e.id ? e.id : t && !document.getElementById(t) ? (e.id = t, t) : (e.id = oi(n), e.id), Q = A(), ci = /* @__PURE__ */ new WeakMap(), li = /* @__PURE__ */ new WeakMap(), ui = (e) => e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "menu", di = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, fi = (e) => !!(e.getAttribute("aria-disabled") === "true" || e instanceof HTMLButtonElement && e.disabled || e instanceof HTMLInputElement && e.disabled), pi = () => ({
|
|
2612
2761
|
destroy: () => {},
|
|
2613
2762
|
sync: () => {},
|
|
2614
2763
|
open: () => {},
|
|
2615
2764
|
close: () => {},
|
|
2616
2765
|
toggle: () => {},
|
|
2617
2766
|
select: () => {}
|
|
2618
|
-
}),
|
|
2619
|
-
if (typeof window > "u" || typeof document > "u") return
|
|
2767
|
+
}), mi = (e = {}) => {
|
|
2768
|
+
if (typeof window > "u" || typeof document > "u") return pi();
|
|
2620
2769
|
let t = {
|
|
2621
|
-
...
|
|
2770
|
+
...ni,
|
|
2622
2771
|
...e
|
|
2623
2772
|
}, n = t.root ?? document, r = () => Z(n.querySelectorAll(t.rootSelector)), i = (e) => {
|
|
2624
2773
|
if (!e) return null;
|
|
@@ -2630,7 +2779,7 @@ var Rr = {
|
|
|
2630
2779
|
}, c = (e) => {
|
|
2631
2780
|
let n = o(e);
|
|
2632
2781
|
return n ? Z(n.querySelectorAll(t.itemSelector)).filter((t) => i(t) === e) : [];
|
|
2633
|
-
}, l = (e) => c(e).filter((e) => !e.hasAttribute("hidden") && !
|
|
2782
|
+
}, l = (e) => c(e).filter((e) => !e.hasAttribute("hidden") && !fi(e)), u = (e) => {
|
|
2634
2783
|
let n = o(e);
|
|
2635
2784
|
return n ? Z(n.querySelectorAll(t.separatorSelector)).filter((t) => i(t) === e) : [];
|
|
2636
2785
|
}, d = (e) => {
|
|
@@ -2656,10 +2805,10 @@ var Rr = {
|
|
|
2656
2805
|
return r().find(f) ?? r()[0] ?? null;
|
|
2657
2806
|
}, h = (e) => {
|
|
2658
2807
|
let t = e.getAttribute("name");
|
|
2659
|
-
if (t) return
|
|
2660
|
-
if (e.id) return
|
|
2808
|
+
if (t) return ui(t);
|
|
2809
|
+
if (e.id) return ui(e.id);
|
|
2661
2810
|
let n = o(e);
|
|
2662
|
-
return n?.id ?
|
|
2811
|
+
return n?.id ? ui(n.id) : null;
|
|
2663
2812
|
}, g = (e, t) => {
|
|
2664
2813
|
let n = d(e);
|
|
2665
2814
|
if (!n) return;
|
|
@@ -2671,8 +2820,8 @@ var Rr = {
|
|
|
2671
2820
|
}, v = (e, t) => {
|
|
2672
2821
|
let n = f(e);
|
|
2673
2822
|
c(e).forEach((r) => {
|
|
2674
|
-
if (r === t && n && !
|
|
2675
|
-
r.getAttribute("menuitem") !== "active" && r.setAttribute("menuitem", "active"), r.getAttribute("tabindex") !== "0" && r.setAttribute("tabindex", "0"),
|
|
2823
|
+
if (r === t && n && !fi(r)) {
|
|
2824
|
+
r.getAttribute("menuitem") !== "active" && r.setAttribute("menuitem", "active"), r.getAttribute("tabindex") !== "0" && r.setAttribute("tabindex", "0"), ci.set(e, r);
|
|
2676
2825
|
return;
|
|
2677
2826
|
}
|
|
2678
2827
|
r.getAttribute("menuitem") === "active" && r.setAttribute("menuitem", ""), r.getAttribute("tabindex") !== "-1" && r.setAttribute("tabindex", "-1");
|
|
@@ -2684,25 +2833,25 @@ var Rr = {
|
|
|
2684
2833
|
if (n.length === 0) return null;
|
|
2685
2834
|
if (t === "last") return n[n.length - 1] ?? null;
|
|
2686
2835
|
if (t === "first") return n[0] ?? null;
|
|
2687
|
-
let r =
|
|
2836
|
+
let r = ci.get(e);
|
|
2688
2837
|
return r && n.includes(r) ? r : n.find((e) => e.getAttribute("menuitem") === "active") ?? n[0] ?? null;
|
|
2689
2838
|
}, x = (e) => {
|
|
2690
2839
|
let t = o(e);
|
|
2691
2840
|
if (!t) return;
|
|
2692
2841
|
let n = d(e), r = c(e), i = h(e);
|
|
2693
|
-
|
|
2694
|
-
|
|
2842
|
+
si(t, i ? `${i}-menu` : null, ri), t.getAttribute("role") !== "menu" && t.setAttribute("role", "menu"), r.forEach((e, t) => {
|
|
2843
|
+
si(e, i ? `${i}-item-${t + 1}` : null, ii), e.getAttribute("role") !== "menuitem" && e.setAttribute("role", "menuitem");
|
|
2695
2844
|
}), u(e).forEach((e) => {
|
|
2696
2845
|
e.getAttribute("role") !== "separator" && e.setAttribute("role", "separator");
|
|
2697
|
-
}), n && (
|
|
2846
|
+
}), n && (di(n) || (n.setAttribute("role", "button"), n.hasAttribute("tabindex") || n.setAttribute("tabindex", "0")), n.getAttribute("aria-haspopup") !== "menu" && n.setAttribute("aria-haspopup", "menu"), n.getAttribute("aria-controls") !== t.id && n.setAttribute("aria-controls", t.id)), g(e, f(e)), v(e, f(e) ? b(e) : null);
|
|
2698
2847
|
}, S = (e, t) => {
|
|
2699
2848
|
let n = document.activeElement instanceof HTMLElement ? document.activeElement : null, r = t && !s(t, e) ? t : n && !s(n, e) ? n : d(e);
|
|
2700
|
-
r &&
|
|
2849
|
+
r && li.set(e, r);
|
|
2701
2850
|
}, C = (e) => {
|
|
2702
|
-
let t =
|
|
2703
|
-
|
|
2851
|
+
let t = li.get(e) ?? d(e);
|
|
2852
|
+
li.delete(e), t?.isConnected && typeof t.focus == "function" && t.focus();
|
|
2704
2853
|
}, w = (e, t) => {
|
|
2705
|
-
x(e), _(e, !1), g(e, !1), v(e, null), t ? C(e) :
|
|
2854
|
+
x(e), _(e, !1), g(e, !1), v(e, null), t ? C(e) : li.delete(e);
|
|
2706
2855
|
}, T = (e, n, i = "previous") => {
|
|
2707
2856
|
r().concat(Z(document.querySelectorAll(t.rootSelector))).forEach((t) => {
|
|
2708
2857
|
t === e || !f(t) || w(t, !1);
|
|
@@ -2735,7 +2884,7 @@ var Rr = {
|
|
|
2735
2884
|
}
|
|
2736
2885
|
}, k = (e) => {
|
|
2737
2886
|
let t = i(e);
|
|
2738
|
-
!t || !a(t) ||
|
|
2887
|
+
!t || !a(t) || fi(e) || e.click();
|
|
2739
2888
|
}, A = (e) => {
|
|
2740
2889
|
if (e) {
|
|
2741
2890
|
if (e.matches(t.itemSelector)) {
|
|
@@ -2773,7 +2922,7 @@ var Rr = {
|
|
|
2773
2922
|
let n = i(t);
|
|
2774
2923
|
if (!n || !a(n)) return;
|
|
2775
2924
|
let r = P(t, n);
|
|
2776
|
-
!r || !
|
|
2925
|
+
!r || !fi(r) || Q(e) && (e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation());
|
|
2777
2926
|
}, R = (e) => {
|
|
2778
2927
|
let t = e.target;
|
|
2779
2928
|
if (!(t instanceof Element)) return;
|
|
@@ -2781,8 +2930,8 @@ var Rr = {
|
|
|
2781
2930
|
if (n && a(n)) {
|
|
2782
2931
|
let r = P(t, n);
|
|
2783
2932
|
if (r) {
|
|
2784
|
-
if (
|
|
2785
|
-
|
|
2933
|
+
if (fi(r) || !Q(e)) return;
|
|
2934
|
+
ci.set(n, r), w(n, !0);
|
|
2786
2935
|
return;
|
|
2787
2936
|
}
|
|
2788
2937
|
if (F(t, n)) {
|
|
@@ -2804,7 +2953,7 @@ var Rr = {
|
|
|
2804
2953
|
if (!(t instanceof Element)) return;
|
|
2805
2954
|
let n = i(t), r = I();
|
|
2806
2955
|
if (e.key === "Escape") {
|
|
2807
|
-
if (!r ||
|
|
2956
|
+
if (!r || Tt() || e.defaultPrevented || !Q(e)) return;
|
|
2808
2957
|
e.preventDefault(), e.stopPropagation(), D(r);
|
|
2809
2958
|
return;
|
|
2810
2959
|
}
|
|
@@ -2836,7 +2985,7 @@ var Rr = {
|
|
|
2836
2985
|
return;
|
|
2837
2986
|
}
|
|
2838
2987
|
if (!f(n)) {
|
|
2839
|
-
if (s && o(n) && !
|
|
2988
|
+
if (s && o(n) && !di(s) && (e.key === "Enter" || e.key === " ")) {
|
|
2840
2989
|
if (!Q(e)) return;
|
|
2841
2990
|
e.preventDefault(), O(n);
|
|
2842
2991
|
}
|
|
@@ -2853,12 +3002,12 @@ var Rr = {
|
|
|
2853
3002
|
return;
|
|
2854
3003
|
}
|
|
2855
3004
|
if (!(e.key !== "Enter" && e.key !== " ")) {
|
|
2856
|
-
if (c && !
|
|
3005
|
+
if (c && !fi(c)) {
|
|
2857
3006
|
if (!Q(e)) return;
|
|
2858
3007
|
e.preventDefault(), c.click();
|
|
2859
3008
|
return;
|
|
2860
3009
|
}
|
|
2861
|
-
if (s && !
|
|
3010
|
+
if (s && !di(s) && (e.key === "Enter" || e.key === " ")) {
|
|
2862
3011
|
if (!Q(e)) return;
|
|
2863
3012
|
e.preventDefault(), O(n);
|
|
2864
3013
|
}
|
|
@@ -2896,23 +3045,23 @@ var Rr = {
|
|
|
2896
3045
|
toggle: O,
|
|
2897
3046
|
select: A
|
|
2898
3047
|
};
|
|
2899
|
-
},
|
|
2900
|
-
|
|
2901
|
-
},
|
|
2902
|
-
|
|
3048
|
+
}, hi = (e = {}) => mi(e), gi = null, _i = !1, vi = null, yi = () => {
|
|
3049
|
+
vi &&= (document.removeEventListener("DOMContentLoaded", vi), null);
|
|
3050
|
+
}, bi = () => typeof window > "u" || typeof document > "u" ? null : (_i = !1, yi(), gi ? (gi.sync(), gi) : (gi = mi(), gi)), xi = () => {
|
|
3051
|
+
_i = !0, yi(), gi?.destroy(), gi = null;
|
|
2903
3052
|
};
|
|
2904
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
2905
|
-
|
|
2906
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
3053
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (vi = () => {
|
|
3054
|
+
vi = null, _i || bi();
|
|
3055
|
+
}, document.addEventListener("DOMContentLoaded", vi)) : bi());
|
|
2907
3056
|
//#endregion
|
|
2908
3057
|
//#region src/js/src/switch/switch-runtime.ts
|
|
2909
|
-
var
|
|
3058
|
+
var Si = {
|
|
2910
3059
|
root: typeof document < "u" ? document : {},
|
|
2911
3060
|
switchSelector: "[switch]"
|
|
2912
|
-
},
|
|
3061
|
+
}, Ci = (e) => Array.from(e), wi = A(), Ti = (e) => e instanceof HTMLInputElement && e.type === "checkbox", Ei = (e) => e instanceof HTMLButtonElement, Di = (e) => Ei(e) || Ti(e), Oi = (e) => e.getAttribute("aria-disabled") === "true" || e instanceof HTMLButtonElement && e.disabled || e instanceof HTMLInputElement && e.disabled ? !0 : e.hasAttribute("disabled"), ki = (e) => Ti(e) && e.checked ? !0 : e.getAttribute("aria-checked") === "true", Ai = (e, t) => {
|
|
2913
3062
|
let n = t ? "true" : "false";
|
|
2914
|
-
e.getAttribute("aria-checked") !== n && e.setAttribute("aria-checked", n),
|
|
2915
|
-
},
|
|
3063
|
+
e.getAttribute("aria-checked") !== n && e.setAttribute("aria-checked", n), Ti(e) && e.checked !== t && (e.checked = t);
|
|
3064
|
+
}, ji = () => ({
|
|
2916
3065
|
destroy: () => {},
|
|
2917
3066
|
sync: () => {},
|
|
2918
3067
|
toggle: () => {},
|
|
@@ -2920,12 +3069,12 @@ var ii = {
|
|
|
2920
3069
|
uncheck: () => {},
|
|
2921
3070
|
setChecked: () => {},
|
|
2922
3071
|
isChecked: () => !1
|
|
2923
|
-
}),
|
|
2924
|
-
if (typeof window > "u" || typeof document > "u") return
|
|
3072
|
+
}), Mi = (e = {}) => {
|
|
3073
|
+
if (typeof window > "u" || typeof document > "u") return ji();
|
|
2925
3074
|
let t = {
|
|
2926
|
-
...
|
|
3075
|
+
...Si,
|
|
2927
3076
|
...e
|
|
2928
|
-
}, n = t.root ?? document, r = n, i = () =>
|
|
3077
|
+
}, n = t.root ?? document, r = n, i = () => Ci(n.querySelectorAll(t.switchSelector)).filter(Di), a = (e) => !e?.matches(t.switchSelector) || !Di(e) ? !1 : n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : i().includes(e), o = (e) => {
|
|
2929
3078
|
if (!e) return null;
|
|
2930
3079
|
let n = e.closest(t.switchSelector);
|
|
2931
3080
|
return !(n instanceof HTMLElement) || !a(n) ? null : n;
|
|
@@ -2937,13 +3086,13 @@ var ii = {
|
|
|
2937
3086
|
}
|
|
2938
3087
|
return i().find(a) ?? null;
|
|
2939
3088
|
}, c = (e) => {
|
|
2940
|
-
e.getAttribute("role") !== "switch" && e.setAttribute("role", "switch"),
|
|
3089
|
+
e.getAttribute("role") !== "switch" && e.setAttribute("role", "switch"), Ei(e) && !e.hasAttribute("type") && (e.type = "button"), Ai(e, ki(e));
|
|
2941
3090
|
}, l = (e, t) => {
|
|
2942
3091
|
let n = s(e);
|
|
2943
|
-
!n ||
|
|
3092
|
+
!n || Oi(n) || (c(n), Ai(n, t));
|
|
2944
3093
|
}, u = (e) => {
|
|
2945
3094
|
let t = s(e);
|
|
2946
|
-
!t ||
|
|
3095
|
+
!t || Oi(t) || l(t, !ki(t));
|
|
2947
3096
|
}, d = (e) => {
|
|
2948
3097
|
l(e, !0);
|
|
2949
3098
|
}, f = (e) => {
|
|
@@ -2952,7 +3101,7 @@ var ii = {
|
|
|
2952
3101
|
l(t, e);
|
|
2953
3102
|
}, m = (e) => {
|
|
2954
3103
|
let t = s(e);
|
|
2955
|
-
return t ?
|
|
3104
|
+
return t ? ki(t) : !1;
|
|
2956
3105
|
}, h = () => {
|
|
2957
3106
|
i().forEach((e) => {
|
|
2958
3107
|
a(e) && c(e);
|
|
@@ -2961,16 +3110,16 @@ var ii = {
|
|
|
2961
3110
|
let t = e.target;
|
|
2962
3111
|
if (!(t instanceof Element)) return;
|
|
2963
3112
|
let n = o(t instanceof HTMLElement ? t : t.parentElement);
|
|
2964
|
-
!n ||
|
|
3113
|
+
!n || Oi(n) || !Ei(n) || wi(e) && (e.preventDefault(), u(n));
|
|
2965
3114
|
}, _ = (e) => {
|
|
2966
3115
|
let t = e.target;
|
|
2967
|
-
!(t instanceof HTMLElement) || !
|
|
3116
|
+
!(t instanceof HTMLElement) || !Ti(t) || !a(t) || Oi(t) || wi(e) && Ai(t, t.checked);
|
|
2968
3117
|
}, v = (e) => {
|
|
2969
3118
|
if (!(e instanceof KeyboardEvent) || e.key !== "Enter" && e.key !== " ") return;
|
|
2970
3119
|
let t = e.target;
|
|
2971
3120
|
if (!(t instanceof Element)) return;
|
|
2972
3121
|
let n = o(t instanceof HTMLElement ? t : t.parentElement);
|
|
2973
|
-
!n ||
|
|
3122
|
+
!n || Oi(n) || wi(e) && (e.preventDefault(), u(n));
|
|
2974
3123
|
}, y = !1, b = () => {
|
|
2975
3124
|
y || (y = !0, requestAnimationFrame(() => {
|
|
2976
3125
|
y = !1, h();
|
|
@@ -3000,79 +3149,79 @@ var ii = {
|
|
|
3000
3149
|
setChecked: p,
|
|
3001
3150
|
isChecked: m
|
|
3002
3151
|
};
|
|
3003
|
-
},
|
|
3004
|
-
|
|
3005
|
-
},
|
|
3006
|
-
|
|
3152
|
+
}, Ni = (e = {}) => Mi(e), Pi = null, Fi = !1, Ii = null, Li = () => {
|
|
3153
|
+
Ii &&= (document.removeEventListener("DOMContentLoaded", Ii), null);
|
|
3154
|
+
}, Ri = () => typeof window > "u" || typeof document > "u" ? null : (Fi = !1, Li(), Pi ? (Pi.sync(), Pi) : (Pi = Mi(), Pi)), zi = () => {
|
|
3155
|
+
Fi = !0, Li(), Pi?.destroy(), Pi = null;
|
|
3007
3156
|
};
|
|
3008
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
3009
|
-
|
|
3010
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
3157
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (Ii = () => {
|
|
3158
|
+
Ii = null, Fi || Ri();
|
|
3159
|
+
}, document.addEventListener("DOMContentLoaded", Ii)) : Ri());
|
|
3011
3160
|
//#endregion
|
|
3012
3161
|
//#region src/js/src/slider/slider-runtime.ts
|
|
3013
|
-
var
|
|
3162
|
+
var Bi = 1, Vi = 10, Hi = {
|
|
3014
3163
|
root: typeof document < "u" ? document : {},
|
|
3015
3164
|
sliderSelector: "[slider]:not([slider=\"vertical\"])"
|
|
3016
|
-
},
|
|
3165
|
+
}, Ui = (e) => Array.from(e), Wi = A(), Gi = (e, t, n) => Math.min(n, Math.max(t, e)), Ki = (e) => {
|
|
3017
3166
|
if (!Number.isFinite(e) || Object.is(e, -0)) return "0";
|
|
3018
3167
|
let t = Math.round(e * 1e6) / 1e6;
|
|
3019
3168
|
return String(t);
|
|
3020
|
-
},
|
|
3169
|
+
}, qi = (e, t) => {
|
|
3021
3170
|
let n = e.getAttribute(t);
|
|
3022
3171
|
if (n == null) return null;
|
|
3023
3172
|
let r = n.trim();
|
|
3024
3173
|
if (r === "") return null;
|
|
3025
3174
|
let i = Number(r);
|
|
3026
3175
|
return Number.isFinite(i) ? i : null;
|
|
3027
|
-
},
|
|
3176
|
+
}, Ji = (e) => {
|
|
3028
3177
|
let t = e.closest("[slider]");
|
|
3029
3178
|
return t instanceof HTMLElement ? t : null;
|
|
3030
3179
|
}, $ = (e) => {
|
|
3031
3180
|
let t = e.querySelectorAll("[slider-thumb]");
|
|
3032
|
-
for (let n of t) if (
|
|
3181
|
+
for (let n of t) if (Ji(n) === e) return n;
|
|
3033
3182
|
return null;
|
|
3034
|
-
},
|
|
3035
|
-
let n =
|
|
3183
|
+
}, Yi = (e) => !!(e instanceof HTMLButtonElement || e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLAnchorElement && e.hasAttribute("href")), Xi = (e) => e.getAttribute("aria-disabled") === "true" || (e instanceof HTMLButtonElement || e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLFieldSetElement || e instanceof HTMLOptGroupElement || e instanceof HTMLOptionElement) && e.disabled ? !0 : e.hasAttribute("disabled"), Zi = (e, t) => Xi(e) || Xi(t), Qi = (e, t) => {
|
|
3184
|
+
let n = qi(t, "aria-valuemin") ?? qi(e, "aria-valuemin") ?? 0, r = qi(t, "aria-valuemax") ?? qi(e, "aria-valuemax") ?? 100, i = r < n ? n : r;
|
|
3036
3185
|
return {
|
|
3037
3186
|
min: n,
|
|
3038
3187
|
max: i,
|
|
3039
|
-
value:
|
|
3188
|
+
value: Gi(qi(t, "aria-valuenow") ?? qi(e, "aria-valuenow") ?? n, n, i)
|
|
3040
3189
|
};
|
|
3041
|
-
},
|
|
3190
|
+
}, $i = (e, t, n) => n === t ? 0 : Gi((e - t) / (n - t), 0, 1), ea = (e, t) => t + Math.round((e - t) / Bi) * Bi, ta = (e, t, n, r, i) => {
|
|
3042
3191
|
let a = e.getBoundingClientRect().width;
|
|
3043
3192
|
if (!(a > 0) || i === r) return r;
|
|
3044
3193
|
let o = t.getBoundingClientRect().width, s = o > 0 && o < a ? o / 2 : 0, c = a - s * 2;
|
|
3045
|
-
return c > 0 ?
|
|
3046
|
-
},
|
|
3194
|
+
return c > 0 ? Gi(ea(r + Gi((n - e.getBoundingClientRect().left - s) / c, 0, 1) * (i - r), r), r, i) : r;
|
|
3195
|
+
}, na = (e, t) => {
|
|
3047
3196
|
if (typeof e.setPointerCapture == "function") try {
|
|
3048
3197
|
e.setPointerCapture(t);
|
|
3049
3198
|
} catch {}
|
|
3050
|
-
},
|
|
3199
|
+
}, ra = (e, t) => {
|
|
3051
3200
|
if (typeof e.releasePointerCapture == "function") try {
|
|
3052
3201
|
if (typeof e.hasPointerCapture == "function" && !e.hasPointerCapture(t)) return;
|
|
3053
3202
|
e.releasePointerCapture(t);
|
|
3054
3203
|
} catch {}
|
|
3055
|
-
},
|
|
3204
|
+
}, ia = (e) => {
|
|
3056
3205
|
if (typeof e.focus == "function") try {
|
|
3057
3206
|
e.focus({ preventScroll: !0 });
|
|
3058
3207
|
} catch {
|
|
3059
3208
|
e.focus();
|
|
3060
3209
|
}
|
|
3061
|
-
},
|
|
3210
|
+
}, aa = () => ({
|
|
3062
3211
|
destroy: () => {},
|
|
3063
3212
|
sync: () => {},
|
|
3064
3213
|
setValue: () => {},
|
|
3065
3214
|
getValue: () => 0,
|
|
3066
3215
|
increment: () => {},
|
|
3067
3216
|
decrement: () => {}
|
|
3068
|
-
}),
|
|
3069
|
-
if (typeof window > "u" || typeof document > "u") return
|
|
3217
|
+
}), oa = (e = {}) => {
|
|
3218
|
+
if (typeof window > "u" || typeof document > "u") return aa();
|
|
3070
3219
|
let t = {
|
|
3071
|
-
...
|
|
3220
|
+
...Hi,
|
|
3072
3221
|
...e
|
|
3073
|
-
}, n = t.root ?? document, r = n, i = !1, a = null, o = () =>
|
|
3222
|
+
}, n = t.root ?? document, r = n, i = !1, a = null, o = () => Ui(n.querySelectorAll(t.sliderSelector)).filter((e) => $(e) !== null), s = (e) => !e?.matches(t.sliderSelector) || !$(e) ? !1 : n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : o().includes(e), c = (e) => {
|
|
3074
3223
|
if (!e) return null;
|
|
3075
|
-
let t =
|
|
3224
|
+
let t = Ji(e);
|
|
3076
3225
|
return !t || !s(t) ? null : t;
|
|
3077
3226
|
}, l = (e) => {
|
|
3078
3227
|
if (e) {
|
|
@@ -3082,22 +3231,22 @@ var Si = 1, Ci = 10, wi = {
|
|
|
3082
3231
|
}
|
|
3083
3232
|
return o().find((e) => s(e)) ?? null;
|
|
3084
3233
|
}, u = (e, t, n, r, i) => {
|
|
3085
|
-
e.getAttribute("role") === "slider" && e.removeAttribute("role"), t.getAttribute("role") !== "slider" && t.setAttribute("role", "slider"), !
|
|
3086
|
-
let a =
|
|
3234
|
+
e.getAttribute("role") === "slider" && e.removeAttribute("role"), t.getAttribute("role") !== "slider" && t.setAttribute("role", "slider"), !Yi(t) && !t.hasAttribute("tabindex") && t.setAttribute("tabindex", "0"), t instanceof HTMLButtonElement && !t.hasAttribute("type") && (t.type = "button");
|
|
3235
|
+
let a = Ki(n), o = Ki(r), s = Ki(i);
|
|
3087
3236
|
t.getAttribute("aria-valuemin") !== a && t.setAttribute("aria-valuemin", a), t.getAttribute("aria-valuemax") !== o && t.setAttribute("aria-valuemax", o), t.getAttribute("aria-valuenow") !== s && t.setAttribute("aria-valuenow", s), t.getAttribute("aria-orientation") !== "horizontal" && t.setAttribute("aria-orientation", "horizontal");
|
|
3088
|
-
let c =
|
|
3237
|
+
let c = Ki($i(i, n, r));
|
|
3089
3238
|
e.style.getPropertyValue("--juice-slider-ratio").trim() !== c && e.style.setProperty("--juice-slider-ratio", c);
|
|
3090
3239
|
}, d = (e, t, n) => {
|
|
3091
3240
|
let r = $(e);
|
|
3092
|
-
if (!r ||
|
|
3093
|
-
let i =
|
|
3241
|
+
if (!r || Zi(e, r)) return;
|
|
3242
|
+
let i = Qi(e, r), a = Gi(n ? ea(t, i.min) : t, i.min, i.max);
|
|
3094
3243
|
u(e, r, i.min, i.max, a);
|
|
3095
3244
|
}, f = () => {
|
|
3096
3245
|
i || o().forEach((e) => {
|
|
3097
3246
|
if (!s(e)) return;
|
|
3098
3247
|
let t = $(e);
|
|
3099
3248
|
if (!t) return;
|
|
3100
|
-
let n =
|
|
3249
|
+
let n = Qi(e, t);
|
|
3101
3250
|
u(e, t, n.min, n.max, n.value);
|
|
3102
3251
|
});
|
|
3103
3252
|
}, p = (e, t) => {
|
|
@@ -3108,24 +3257,24 @@ var Si = 1, Ci = 10, wi = {
|
|
|
3108
3257
|
let t = l(e);
|
|
3109
3258
|
if (!t) return 0;
|
|
3110
3259
|
let n = $(t);
|
|
3111
|
-
return n ?
|
|
3260
|
+
return n ? Qi(t, n).value : 0;
|
|
3112
3261
|
}, h = (e, t) => {
|
|
3113
3262
|
let n = l(e);
|
|
3114
3263
|
if (!n) return;
|
|
3115
3264
|
let r = $(n);
|
|
3116
|
-
!r ||
|
|
3265
|
+
!r || Zi(n, r) || d(n, Qi(n, r).value + t, !1);
|
|
3117
3266
|
}, g = (e, t) => {
|
|
3118
3267
|
let n = l(e);
|
|
3119
3268
|
if (!n) return;
|
|
3120
3269
|
let r = $(n);
|
|
3121
|
-
if (!r ||
|
|
3122
|
-
let i =
|
|
3270
|
+
if (!r || Zi(n, r)) return;
|
|
3271
|
+
let i = Qi(n, r);
|
|
3123
3272
|
d(n, t === "min" ? i.min : i.max, !1);
|
|
3124
3273
|
}, _ = () => {
|
|
3125
|
-
a &&= (
|
|
3274
|
+
a &&= (ra(a.thumb, a.pointerId), null);
|
|
3126
3275
|
}, v = (e, t, n) => {
|
|
3127
|
-
if (
|
|
3128
|
-
let r =
|
|
3276
|
+
if (Zi(e, t)) return;
|
|
3277
|
+
let r = Qi(e, t), i = ta(e, t, n, r.min, r.max);
|
|
3129
3278
|
u(e, t, r.min, r.max, i);
|
|
3130
3279
|
}, y = (e) => {
|
|
3131
3280
|
if (!(e instanceof PointerEvent) || e.button !== 0) return;
|
|
@@ -3134,21 +3283,21 @@ var Si = 1, Ci = 10, wi = {
|
|
|
3134
3283
|
let n = c(t instanceof HTMLElement ? t : t.parentElement);
|
|
3135
3284
|
if (!n) return;
|
|
3136
3285
|
let r = $(n);
|
|
3137
|
-
!r ||
|
|
3286
|
+
!r || Zi(n, r) || a || Wi(e) && (e.preventDefault(), ia(r), v(n, r, e.clientX), a = {
|
|
3138
3287
|
host: n,
|
|
3139
3288
|
thumb: r,
|
|
3140
3289
|
pointerId: e.pointerId
|
|
3141
|
-
},
|
|
3290
|
+
}, na(r, e.pointerId));
|
|
3142
3291
|
}, b = (e) => {
|
|
3143
3292
|
if (!(!(e instanceof PointerEvent) || !a) && e.pointerId === a.pointerId) {
|
|
3144
3293
|
if (!s(a.host)) {
|
|
3145
3294
|
_();
|
|
3146
3295
|
return;
|
|
3147
3296
|
}
|
|
3148
|
-
|
|
3297
|
+
Wi(e) && (e.preventDefault(), v(a.host, a.thumb, e.clientX));
|
|
3149
3298
|
}
|
|
3150
3299
|
}, x = (e) => {
|
|
3151
|
-
!(e instanceof PointerEvent) || !a || e.pointerId === a.pointerId && (
|
|
3300
|
+
!(e instanceof PointerEvent) || !a || e.pointerId === a.pointerId && (Wi(e), _());
|
|
3152
3301
|
}, S = (e) => {
|
|
3153
3302
|
if (!(e instanceof KeyboardEvent) || e.altKey || e.ctrlKey || e.metaKey || e.isComposing) return;
|
|
3154
3303
|
let t = e.target;
|
|
@@ -3156,22 +3305,22 @@ var Si = 1, Ci = 10, wi = {
|
|
|
3156
3305
|
let n = t instanceof HTMLElement ? t : t.parentElement, r = c(n);
|
|
3157
3306
|
if (!r) return;
|
|
3158
3307
|
let i = $(r);
|
|
3159
|
-
if (!i || !n || n !== i && !i.contains(n) ||
|
|
3308
|
+
if (!i || !n || n !== i && !i.contains(n) || Zi(r, i)) return;
|
|
3160
3309
|
let a = null, o = null;
|
|
3161
3310
|
switch (e.key) {
|
|
3162
3311
|
case "ArrowLeft":
|
|
3163
3312
|
case "ArrowDown":
|
|
3164
|
-
a = -
|
|
3313
|
+
a = -Bi;
|
|
3165
3314
|
break;
|
|
3166
3315
|
case "ArrowRight":
|
|
3167
3316
|
case "ArrowUp":
|
|
3168
|
-
a =
|
|
3317
|
+
a = Bi;
|
|
3169
3318
|
break;
|
|
3170
3319
|
case "PageDown":
|
|
3171
|
-
a = -
|
|
3320
|
+
a = -Vi;
|
|
3172
3321
|
break;
|
|
3173
3322
|
case "PageUp":
|
|
3174
|
-
a =
|
|
3323
|
+
a = Vi;
|
|
3175
3324
|
break;
|
|
3176
3325
|
case "Home":
|
|
3177
3326
|
o = "min";
|
|
@@ -3181,7 +3330,7 @@ var Si = 1, Ci = 10, wi = {
|
|
|
3181
3330
|
break;
|
|
3182
3331
|
default: return;
|
|
3183
3332
|
}
|
|
3184
|
-
if (
|
|
3333
|
+
if (Wi(e)) {
|
|
3185
3334
|
if (e.preventDefault(), o) {
|
|
3186
3335
|
g(i, o);
|
|
3187
3336
|
return;
|
|
@@ -3218,26 +3367,26 @@ var Si = 1, Ci = 10, wi = {
|
|
|
3218
3367
|
sync: f,
|
|
3219
3368
|
setValue: p,
|
|
3220
3369
|
getValue: m,
|
|
3221
|
-
increment: (e) => h(e,
|
|
3222
|
-
decrement: (e) => h(e, -
|
|
3370
|
+
increment: (e) => h(e, Bi),
|
|
3371
|
+
decrement: (e) => h(e, -Bi)
|
|
3223
3372
|
};
|
|
3224
|
-
},
|
|
3225
|
-
!
|
|
3226
|
-
},
|
|
3227
|
-
|
|
3373
|
+
}, sa = (e = {}) => oa(e), ca = null, la = !1, ua = null, da = () => {
|
|
3374
|
+
!ua || typeof document > "u" || (document.removeEventListener("DOMContentLoaded", ua), ua = null);
|
|
3375
|
+
}, fa = () => typeof window > "u" || typeof document > "u" ? null : (la = !1, da(), ca ? (ca.sync(), ca) : (ca = oa(), ca)), pa = () => {
|
|
3376
|
+
la = !0, da(), ca?.destroy(), ca = null;
|
|
3228
3377
|
};
|
|
3229
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
3230
|
-
|
|
3231
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
3378
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (ua = () => {
|
|
3379
|
+
ua = null, la || fa();
|
|
3380
|
+
}, document.addEventListener("DOMContentLoaded", ua)) : fa());
|
|
3232
3381
|
//#endregion
|
|
3233
3382
|
//#region src/js/src/checkbox/checkbox-runtime.ts
|
|
3234
|
-
var
|
|
3383
|
+
var ma = {
|
|
3235
3384
|
root: typeof document < "u" ? document : {},
|
|
3236
3385
|
checkboxSelector: "[checkbox]"
|
|
3237
|
-
},
|
|
3386
|
+
}, ha = (e) => Array.from(e), ga = A(), _a = (e) => e instanceof HTMLInputElement && e.type === "checkbox", va = (e) => e instanceof HTMLButtonElement, ya = (e) => va(e) || _a(e), ba = (e) => e.getAttribute("aria-disabled") === "true" || e instanceof HTMLButtonElement && e.disabled || e instanceof HTMLInputElement && e.disabled ? !0 : e.hasAttribute("disabled"), xa = (e) => _a(e) && e.checked ? !0 : e.getAttribute("aria-checked") === "true", Sa = (e, t) => {
|
|
3238
3387
|
let n = t ? "true" : "false";
|
|
3239
|
-
e.getAttribute("aria-checked") !== n && e.setAttribute("aria-checked", n),
|
|
3240
|
-
},
|
|
3388
|
+
e.getAttribute("aria-checked") !== n && e.setAttribute("aria-checked", n), _a(e) && e.checked !== t && (e.checked = t);
|
|
3389
|
+
}, Ca = () => ({
|
|
3241
3390
|
destroy: () => {},
|
|
3242
3391
|
sync: () => {},
|
|
3243
3392
|
toggle: () => {},
|
|
@@ -3245,12 +3394,12 @@ var Xi = {
|
|
|
3245
3394
|
uncheck: () => {},
|
|
3246
3395
|
setChecked: () => {},
|
|
3247
3396
|
isChecked: () => !1
|
|
3248
|
-
}),
|
|
3249
|
-
if (typeof window > "u" || typeof document > "u") return
|
|
3397
|
+
}), wa = (e = {}) => {
|
|
3398
|
+
if (typeof window > "u" || typeof document > "u") return Ca();
|
|
3250
3399
|
let t = {
|
|
3251
|
-
...
|
|
3400
|
+
...ma,
|
|
3252
3401
|
...e
|
|
3253
|
-
}, n = t.root ?? document, r = n, i = () =>
|
|
3402
|
+
}, n = t.root ?? document, r = n, i = () => ha(n.querySelectorAll(t.checkboxSelector)).filter(ya), a = (e) => !e?.matches(t.checkboxSelector) || !ya(e) ? !1 : n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : i().includes(e), o = (e) => {
|
|
3254
3403
|
if (!e) return null;
|
|
3255
3404
|
let n = e.closest(t.checkboxSelector);
|
|
3256
3405
|
return !(n instanceof HTMLElement) || !a(n) ? null : n;
|
|
@@ -3262,13 +3411,13 @@ var Xi = {
|
|
|
3262
3411
|
}
|
|
3263
3412
|
return i().find(a) ?? null;
|
|
3264
3413
|
}, c = (e) => {
|
|
3265
|
-
e.getAttribute("role") !== "checkbox" && e.setAttribute("role", "checkbox"),
|
|
3414
|
+
e.getAttribute("role") !== "checkbox" && e.setAttribute("role", "checkbox"), va(e) && !e.hasAttribute("type") && (e.type = "button"), Sa(e, xa(e));
|
|
3266
3415
|
}, l = (e, t) => {
|
|
3267
3416
|
let n = s(e);
|
|
3268
|
-
!n ||
|
|
3417
|
+
!n || ba(n) || (c(n), Sa(n, t));
|
|
3269
3418
|
}, u = (e) => {
|
|
3270
3419
|
let t = s(e);
|
|
3271
|
-
!t ||
|
|
3420
|
+
!t || ba(t) || l(t, !xa(t));
|
|
3272
3421
|
}, d = (e) => {
|
|
3273
3422
|
l(e, !0);
|
|
3274
3423
|
}, f = (e) => {
|
|
@@ -3277,7 +3426,7 @@ var Xi = {
|
|
|
3277
3426
|
l(t, e);
|
|
3278
3427
|
}, m = (e) => {
|
|
3279
3428
|
let t = s(e);
|
|
3280
|
-
return t ?
|
|
3429
|
+
return t ? xa(t) : !1;
|
|
3281
3430
|
}, h = () => {
|
|
3282
3431
|
i().forEach((e) => {
|
|
3283
3432
|
a(e) && c(e);
|
|
@@ -3286,16 +3435,16 @@ var Xi = {
|
|
|
3286
3435
|
let t = e.target;
|
|
3287
3436
|
if (!(t instanceof Element)) return;
|
|
3288
3437
|
let n = o(t instanceof HTMLElement ? t : t.parentElement);
|
|
3289
|
-
!n ||
|
|
3438
|
+
!n || ba(n) || !va(n) || ga(e) && (e.preventDefault(), u(n));
|
|
3290
3439
|
}, _ = (e) => {
|
|
3291
3440
|
let t = e.target;
|
|
3292
|
-
!(t instanceof HTMLElement) ||
|
|
3441
|
+
!(t instanceof HTMLElement) || !_a(t) || !a(t) || ba(t) || ga(e) && Sa(t, t.checked);
|
|
3293
3442
|
}, v = (e) => {
|
|
3294
3443
|
if (!(e instanceof KeyboardEvent) || e.key !== "Enter" && e.key !== " ") return;
|
|
3295
3444
|
let t = e.target;
|
|
3296
3445
|
if (!(t instanceof Element)) return;
|
|
3297
3446
|
let n = o(t instanceof HTMLElement ? t : t.parentElement);
|
|
3298
|
-
!n ||
|
|
3447
|
+
!n || ba(n) || ga(e) && (e.preventDefault(), u(n));
|
|
3299
3448
|
}, y = !1, b = () => {
|
|
3300
3449
|
y || (y = !0, requestAnimationFrame(() => {
|
|
3301
3450
|
y = !1, h();
|
|
@@ -3325,39 +3474,39 @@ var Xi = {
|
|
|
3325
3474
|
setChecked: p,
|
|
3326
3475
|
isChecked: m
|
|
3327
3476
|
};
|
|
3328
|
-
},
|
|
3329
|
-
|
|
3330
|
-
},
|
|
3331
|
-
|
|
3477
|
+
}, Ta = (e = {}) => wa(e), Ea = null, Da = !1, Oa = null, ka = () => {
|
|
3478
|
+
Oa &&= (document.removeEventListener("DOMContentLoaded", Oa), null);
|
|
3479
|
+
}, Aa = () => typeof window > "u" || typeof document > "u" ? null : (Da = !1, ka(), Ea ? (Ea.sync(), Ea) : (Ea = wa(), Ea)), ja = () => {
|
|
3480
|
+
Da = !0, ka(), Ea?.destroy(), Ea = null;
|
|
3332
3481
|
};
|
|
3333
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
3334
|
-
|
|
3335
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
3482
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (Oa = () => {
|
|
3483
|
+
Oa = null, Da || Aa();
|
|
3484
|
+
}, document.addEventListener("DOMContentLoaded", Oa)) : Aa());
|
|
3336
3485
|
//#endregion
|
|
3337
3486
|
//#region src/js/src/radio/radio-runtime.ts
|
|
3338
|
-
var
|
|
3487
|
+
var Ma = {
|
|
3339
3488
|
root: typeof document < "u" ? document : {},
|
|
3340
3489
|
radiogroupSelector: "[radiogroup]",
|
|
3341
3490
|
radioSelector: "[radio]"
|
|
3342
|
-
},
|
|
3491
|
+
}, Na = new Set(["ArrowRight", "ArrowDown"]), Pa = new Set(["ArrowLeft", "ArrowUp"]), Fa = (e) => Array.from(e), Ia = A(), La = (e) => e instanceof HTMLInputElement && e.type === "radio", Ra = (e) => e instanceof HTMLButtonElement, za = (e) => Ra(e) || La(e), Ba = (e) => e.getAttribute("aria-disabled") === "true" || e instanceof HTMLButtonElement && e.disabled || e instanceof HTMLInputElement && e.disabled ? !0 : e.hasAttribute("disabled"), Va = (e) => La(e) && e.checked ? !0 : e.getAttribute("aria-checked") === "true", Ha = (e, t) => {
|
|
3343
3492
|
let n = t ? "true" : "false";
|
|
3344
|
-
e.getAttribute("aria-checked") !== n && e.setAttribute("aria-checked", n),
|
|
3345
|
-
},
|
|
3493
|
+
e.getAttribute("aria-checked") !== n && e.setAttribute("aria-checked", n), La(e) && e.checked !== t && (e.checked = t);
|
|
3494
|
+
}, Ua = () => ({
|
|
3346
3495
|
destroy: () => {},
|
|
3347
3496
|
sync: () => {},
|
|
3348
3497
|
select: () => {},
|
|
3349
3498
|
getChecked: () => null
|
|
3350
|
-
}),
|
|
3351
|
-
if (typeof window > "u" || typeof document > "u") return
|
|
3499
|
+
}), Wa = (e = {}) => {
|
|
3500
|
+
if (typeof window > "u" || typeof document > "u") return Ua();
|
|
3352
3501
|
let t = {
|
|
3353
|
-
...
|
|
3502
|
+
...Ma,
|
|
3354
3503
|
...e
|
|
3355
|
-
}, n = t.root ?? document, r = n, i = !1, a = () =>
|
|
3504
|
+
}, n = t.root ?? document, r = n, i = !1, a = () => Fa(n.querySelectorAll(t.radiogroupSelector)), o = (e) => e?.matches(t.radiogroupSelector) ? n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : a().includes(e) : !1, s = (e) => {
|
|
3356
3505
|
if (!e) return null;
|
|
3357
3506
|
let n = e.closest(t.radiogroupSelector);
|
|
3358
3507
|
return !(n instanceof HTMLElement) || !o(n) ? null : n;
|
|
3359
|
-
}, c = (e) =>
|
|
3360
|
-
if (!e?.matches(t.radioSelector) || !
|
|
3508
|
+
}, c = (e) => Fa(e.querySelectorAll(t.radioSelector)).filter((n) => za(n) ? n.closest(t.radiogroupSelector) === e : !1), l = (e) => {
|
|
3509
|
+
if (!e?.matches(t.radioSelector) || !za(e)) return !1;
|
|
3361
3510
|
let n = e.closest(t.radiogroupSelector);
|
|
3362
3511
|
return !(n instanceof HTMLElement) || n === e ? !1 : o(n);
|
|
3363
3512
|
}, u = (e) => {
|
|
@@ -3366,9 +3515,9 @@ var ma = {
|
|
|
3366
3515
|
let n = e.closest(t.radioSelector);
|
|
3367
3516
|
return !(n instanceof HTMLElement) || !l(n) ? null : n;
|
|
3368
3517
|
}, d = (e) => u(e instanceof HTMLElement ? e : e.parentElement), f = (e) => {
|
|
3369
|
-
e.getAttribute("role") !== "radio" && e.setAttribute("role", "radio"),
|
|
3518
|
+
e.getAttribute("role") !== "radio" && e.setAttribute("role", "radio"), Ra(e) && !e.hasAttribute("type") && (e.type = "button");
|
|
3370
3519
|
}, p = (e, t) => {
|
|
3371
|
-
let n = t && !
|
|
3520
|
+
let n = t && !Ba(t) ? t : e.find((e) => !Ba(e)) ?? null;
|
|
3372
3521
|
e.forEach((e) => {
|
|
3373
3522
|
let t = e === n ? "0" : "-1";
|
|
3374
3523
|
e.getAttribute("tabindex") !== t && e.setAttribute("tabindex", t);
|
|
@@ -3379,21 +3528,21 @@ var ma = {
|
|
|
3379
3528
|
i = !0;
|
|
3380
3529
|
try {
|
|
3381
3530
|
n.forEach((e) => {
|
|
3382
|
-
f(e),
|
|
3531
|
+
f(e), Ha(e, e === t);
|
|
3383
3532
|
}), p(n, t);
|
|
3384
3533
|
} finally {
|
|
3385
3534
|
i = !1;
|
|
3386
3535
|
}
|
|
3387
3536
|
}, h = (e) => {
|
|
3388
|
-
m(e, c(e).find((e) =>
|
|
3537
|
+
m(e, c(e).find((e) => Va(e)) ?? null);
|
|
3389
3538
|
}, g = (e) => {
|
|
3390
3539
|
let t = u(e);
|
|
3391
|
-
if (!t ||
|
|
3540
|
+
if (!t || Ba(t)) return;
|
|
3392
3541
|
let n = s(t);
|
|
3393
3542
|
n && m(n, t);
|
|
3394
3543
|
}, _ = (e) => {
|
|
3395
3544
|
let t = null;
|
|
3396
|
-
return t = e ? o(e) ? e : s(e) : a().find((e) => o(e)) ?? null, t ? c(t).find((e) =>
|
|
3545
|
+
return t = e ? o(e) ? e : s(e) : a().find((e) => o(e)) ?? null, t ? c(t).find((e) => Va(e)) ?? null : null;
|
|
3397
3546
|
}, v = () => {
|
|
3398
3547
|
a().forEach((e) => {
|
|
3399
3548
|
o(e) && h(e);
|
|
@@ -3402,14 +3551,14 @@ var ma = {
|
|
|
3402
3551
|
let t = e.target;
|
|
3403
3552
|
if (!(t instanceof Element)) return;
|
|
3404
3553
|
let n = d(t);
|
|
3405
|
-
!n ||
|
|
3554
|
+
!n || Ba(n) || !Ra(n) || Ia(e) && (e.preventDefault(), g(n));
|
|
3406
3555
|
}, b = (e) => {
|
|
3407
3556
|
let t = e.target;
|
|
3408
|
-
!(t instanceof HTMLElement) || !
|
|
3557
|
+
!(t instanceof HTMLElement) || !La(t) || !l(t) || Ba(t) || i || t.checked && Ia(e) && g(t);
|
|
3409
3558
|
}, x = (e, t) => {
|
|
3410
3559
|
let n = s(e);
|
|
3411
3560
|
if (!n) return;
|
|
3412
|
-
let r = c(n).filter((e) => !
|
|
3561
|
+
let r = c(n).filter((e) => !Ba(e));
|
|
3413
3562
|
if (r.length === 0) return;
|
|
3414
3563
|
let i = r.indexOf(e), a = r[((i < 0 ? t > 0 ? -1 : 0 : i) + t + r.length) % r.length];
|
|
3415
3564
|
a && (g(a), a.focus());
|
|
@@ -3418,13 +3567,13 @@ var ma = {
|
|
|
3418
3567
|
let t = e.target;
|
|
3419
3568
|
if (!(t instanceof Element)) return;
|
|
3420
3569
|
let n = d(t);
|
|
3421
|
-
if (!(!n ||
|
|
3422
|
-
if (
|
|
3423
|
-
if (!
|
|
3424
|
-
e.preventDefault(), x(n,
|
|
3570
|
+
if (!(!n || Ba(n))) {
|
|
3571
|
+
if (Na.has(e.key) || Pa.has(e.key)) {
|
|
3572
|
+
if (!Ia(e)) return;
|
|
3573
|
+
e.preventDefault(), x(n, Na.has(e.key) ? 1 : -1);
|
|
3425
3574
|
return;
|
|
3426
3575
|
}
|
|
3427
|
-
e.key !== "Enter" && e.key !== " " ||
|
|
3576
|
+
e.key !== "Enter" && e.key !== " " || Ia(e) && (e.preventDefault(), g(n));
|
|
3428
3577
|
}
|
|
3429
3578
|
}, C = !1, w = () => {
|
|
3430
3579
|
C || (C = !0, requestAnimationFrame(() => {
|
|
@@ -3454,54 +3603,54 @@ var ma = {
|
|
|
3454
3603
|
select: g,
|
|
3455
3604
|
getChecked: _
|
|
3456
3605
|
};
|
|
3457
|
-
},
|
|
3458
|
-
|
|
3459
|
-
},
|
|
3460
|
-
|
|
3606
|
+
}, Ga = (e = {}) => Wa(e), Ka = null, qa = !1, Ja = null, Ya = () => {
|
|
3607
|
+
Ja &&= (document.removeEventListener("DOMContentLoaded", Ja), null);
|
|
3608
|
+
}, Xa = () => typeof window > "u" || typeof document > "u" ? null : (qa = !1, Ya(), Ka ? (Ka.sync(), Ka) : (Ka = Wa(), Ka)), Za = () => {
|
|
3609
|
+
qa = !0, Ya(), Ka?.destroy(), Ka = null;
|
|
3461
3610
|
};
|
|
3462
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
3463
|
-
|
|
3464
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
3611
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (Ja = () => {
|
|
3612
|
+
Ja = null, qa || Xa();
|
|
3613
|
+
}, document.addEventListener("DOMContentLoaded", Ja)) : Xa());
|
|
3465
3614
|
//#endregion
|
|
3466
3615
|
//#region src/js/src/breadcrumb/breadcrumb-runtime.ts
|
|
3467
|
-
var
|
|
3616
|
+
var Qa = {
|
|
3468
3617
|
root: typeof document < "u" ? document : {},
|
|
3469
3618
|
breadcrumbSelector: "[breadcrumb]",
|
|
3470
3619
|
itemSelector: "[breadcrumb-item]"
|
|
3471
|
-
},
|
|
3620
|
+
}, $a = "a, [breadcrumb-link]", eo = new Set([
|
|
3472
3621
|
"OL",
|
|
3473
3622
|
"UL",
|
|
3474
3623
|
"MENU"
|
|
3475
|
-
]),
|
|
3624
|
+
]), to = (e) => Array.from(e), no = (e) => {
|
|
3476
3625
|
let t = e.getAttribute("aria-label");
|
|
3477
3626
|
if (t !== null && t.trim() !== "") return !0;
|
|
3478
3627
|
let n = e.getAttribute("aria-labelledby");
|
|
3479
3628
|
if (n !== null && n.trim() !== "") return !0;
|
|
3480
3629
|
let r = e.getAttribute("title");
|
|
3481
3630
|
return r !== null && r.trim() !== "";
|
|
3482
|
-
},
|
|
3631
|
+
}, ro = (e) => {
|
|
3483
3632
|
let t = e.getAttribute("role");
|
|
3484
3633
|
return t ? t === "navigation" : e.tagName === "NAV";
|
|
3485
|
-
},
|
|
3634
|
+
}, io = () => ({
|
|
3486
3635
|
destroy: () => {},
|
|
3487
3636
|
sync: () => {},
|
|
3488
3637
|
setCurrent: () => {}
|
|
3489
|
-
}),
|
|
3490
|
-
if (typeof window > "u" || typeof document > "u") return
|
|
3638
|
+
}), ao = (e = {}) => {
|
|
3639
|
+
if (typeof window > "u" || typeof document > "u") return io();
|
|
3491
3640
|
let t = {
|
|
3492
|
-
...
|
|
3641
|
+
...Qa,
|
|
3493
3642
|
...e
|
|
3494
3643
|
}, n = t.root ?? document, r = (e) => e?.matches(t.breadcrumbSelector) ? n instanceof Document ? !0 : n instanceof Node ? n === e || n.contains(e) : !1 : !1, i = () => {
|
|
3495
|
-
let e =
|
|
3644
|
+
let e = to(n.querySelectorAll(t.breadcrumbSelector)).filter(r);
|
|
3496
3645
|
return n instanceof HTMLElement && r(n) ? [n, ...e] : e;
|
|
3497
3646
|
}, a = (e, n) => n.closest(t.breadcrumbSelector) === e, o = (e) => {
|
|
3498
|
-
let n =
|
|
3499
|
-
return n.length ? n :
|
|
3647
|
+
let n = to(e.querySelectorAll(t.itemSelector)).filter((t) => a(e, t));
|
|
3648
|
+
return n.length ? n : to(e.children).filter((e) => e instanceof HTMLElement && e.matches($a));
|
|
3500
3649
|
}, s = (e) => {
|
|
3501
|
-
let t =
|
|
3650
|
+
let t = to(e.querySelectorAll("[aria-current=\"page\"]")).filter((t) => a(e, t));
|
|
3502
3651
|
return e.getAttribute("aria-current") === "page" ? [e, ...t] : t;
|
|
3503
|
-
}, c = (e) => e.matches(t.itemSelector) ?
|
|
3504
|
-
if (e.matches(
|
|
3652
|
+
}, c = (e) => e.matches(t.itemSelector) ? to(e.querySelectorAll($a)).filter((n) => n.closest(t.itemSelector) === e) : [], l = (e) => {
|
|
3653
|
+
if (e.matches($a)) return e;
|
|
3505
3654
|
let t = c(e);
|
|
3506
3655
|
return t[t.length - 1] ?? e;
|
|
3507
3656
|
}, u = (e) => {
|
|
@@ -3511,8 +3660,8 @@ var Pa = {
|
|
|
3511
3660
|
e !== t && e.removeAttribute("aria-current");
|
|
3512
3661
|
});
|
|
3513
3662
|
}, f = (e) => {
|
|
3514
|
-
let t = e.getAttribute("role"), n =
|
|
3515
|
-
!t && !n && e.tagName !== "NAV" && e.setAttribute("role", "navigation"),
|
|
3663
|
+
let t = e.getAttribute("role"), n = eo.has(e.tagName);
|
|
3664
|
+
!t && !n && e.tagName !== "NAV" && e.setAttribute("role", "navigation"), ro(e) && !no(e) && e.setAttribute("aria-label", "Breadcrumb");
|
|
3516
3665
|
}, p = (e) => {
|
|
3517
3666
|
if (e) {
|
|
3518
3667
|
if (r(e)) return e;
|
|
@@ -3538,7 +3687,7 @@ var Pa = {
|
|
|
3538
3687
|
if (!r) return;
|
|
3539
3688
|
let i = typeof e == "number" ? o(r)[e] ?? null : m(r, e);
|
|
3540
3689
|
if (!i || !r.contains(i)) return;
|
|
3541
|
-
let a = n && n !== i && i.contains(n) && n.matches(
|
|
3690
|
+
let a = n && n !== i && i.contains(n) && n.matches($a) ? n : l(i);
|
|
3542
3691
|
d(r, a), u(a);
|
|
3543
3692
|
}, v = !1, y = 0, b = () => {
|
|
3544
3693
|
v || (v = !0, y = requestAnimationFrame(() => {
|
|
@@ -3566,63 +3715,63 @@ var Pa = {
|
|
|
3566
3715
|
sync: g,
|
|
3567
3716
|
setCurrent: _
|
|
3568
3717
|
};
|
|
3569
|
-
},
|
|
3570
|
-
!
|
|
3571
|
-
},
|
|
3572
|
-
|
|
3718
|
+
}, oo = (e = {}) => ao(e), so = null, co = !1, lo = null, uo = () => {
|
|
3719
|
+
!lo || typeof document > "u" || (document.removeEventListener("DOMContentLoaded", lo), lo = null);
|
|
3720
|
+
}, fo = () => typeof window > "u" || typeof document > "u" ? null : (co = !1, uo(), so ? (so.sync(), so) : (so = ao(), so)), po = () => {
|
|
3721
|
+
co = !0, uo(), so?.destroy(), so = null;
|
|
3573
3722
|
};
|
|
3574
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
3575
|
-
|
|
3576
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
3723
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (lo = () => {
|
|
3724
|
+
lo = null, co || fo();
|
|
3725
|
+
}, document.addEventListener("DOMContentLoaded", lo)) : fo());
|
|
3577
3726
|
//#endregion
|
|
3578
3727
|
//#region src/js/src/progress/progress-runtime.ts
|
|
3579
|
-
var
|
|
3728
|
+
var mo = {
|
|
3580
3729
|
root: typeof document < "u" ? document : {},
|
|
3581
3730
|
progressSelector: "[progress]"
|
|
3582
|
-
},
|
|
3731
|
+
}, ho = (e) => Array.from(e), go = (e, t, n) => Math.min(n, Math.max(t, e)), _o = (e) => {
|
|
3583
3732
|
if (!Number.isFinite(e) || Object.is(e, -0)) return "0";
|
|
3584
3733
|
let t = Math.round(e * 1e6) / 1e6;
|
|
3585
3734
|
return String(t);
|
|
3586
|
-
},
|
|
3735
|
+
}, vo = (e, t) => {
|
|
3587
3736
|
let n = e.getAttribute(t);
|
|
3588
3737
|
if (n == null) return null;
|
|
3589
3738
|
let r = n.trim();
|
|
3590
3739
|
if (r === "") return null;
|
|
3591
3740
|
let i = Number(r);
|
|
3592
3741
|
return Number.isFinite(i) ? i : null;
|
|
3593
|
-
},
|
|
3594
|
-
let t =
|
|
3742
|
+
}, yo = (e, t, n) => n === t ? 0 : go((e - t) / (n - t), 0, 1), bo = /* @__PURE__ */ new WeakMap(), xo = (e) => {
|
|
3743
|
+
let t = bo.get(e);
|
|
3595
3744
|
return t || (t = {
|
|
3596
3745
|
value: null,
|
|
3597
3746
|
hidValueNow: !1
|
|
3598
|
-
},
|
|
3599
|
-
},
|
|
3600
|
-
let t =
|
|
3747
|
+
}, bo.set(e, t)), t;
|
|
3748
|
+
}, So = (e) => {
|
|
3749
|
+
let t = vo(e, "aria-valuemin") ?? 0, n = vo(e, "aria-valuemax") ?? 100;
|
|
3601
3750
|
return {
|
|
3602
3751
|
min: t,
|
|
3603
3752
|
max: n < t ? t : n
|
|
3604
3753
|
};
|
|
3605
|
-
},
|
|
3606
|
-
let { min: n, max: r } =
|
|
3607
|
-
return o = t != null && Number.isFinite(t) ?
|
|
3754
|
+
}, Co = (e) => e.getAttribute("progress") === "indeterminate", wo = (e, t) => {
|
|
3755
|
+
let { min: n, max: r } = So(e), i = xo(e), a = vo(e, "aria-valuenow"), o;
|
|
3756
|
+
return o = t != null && Number.isFinite(t) ? go(t, n, r) : a == null ? i.hidValueNow && i.value != null ? go(i.value, n, r) : n : go(a, n, r), {
|
|
3608
3757
|
min: n,
|
|
3609
3758
|
max: r,
|
|
3610
3759
|
value: o
|
|
3611
3760
|
};
|
|
3612
|
-
},
|
|
3761
|
+
}, To = () => ({
|
|
3613
3762
|
destroy: () => {},
|
|
3614
3763
|
sync: () => {},
|
|
3615
3764
|
setValue: () => {},
|
|
3616
3765
|
getValue: () => 0,
|
|
3617
3766
|
setIndeterminate: () => {},
|
|
3618
3767
|
isIndeterminate: () => !1
|
|
3619
|
-
}),
|
|
3620
|
-
if (typeof window > "u" || typeof document > "u") return
|
|
3768
|
+
}), Eo = (e = {}) => {
|
|
3769
|
+
if (typeof window > "u" || typeof document > "u") return To();
|
|
3621
3770
|
let t = {
|
|
3622
|
-
...
|
|
3771
|
+
...mo,
|
|
3623
3772
|
...e
|
|
3624
3773
|
}, n = t.root ?? document, r = !1, i = (e) => e?.matches(t.progressSelector) ? n instanceof Document ? !0 : n instanceof Node ? n === e || n.contains(e) : !1 : !1, a = () => {
|
|
3625
|
-
let e =
|
|
3774
|
+
let e = ho(n.querySelectorAll(t.progressSelector)).filter(i);
|
|
3626
3775
|
return n instanceof HTMLElement && i(n) ? [n, ...e.filter((e) => e !== n)] : e;
|
|
3627
3776
|
}, o = (e) => {
|
|
3628
3777
|
if (!e) return null;
|
|
@@ -3636,11 +3785,11 @@ var Ya = {
|
|
|
3636
3785
|
}
|
|
3637
3786
|
return a().find((e) => i(e)) ?? null;
|
|
3638
3787
|
}, c = (e, t) => {
|
|
3639
|
-
let n =
|
|
3788
|
+
let n = Co(e), { min: r, max: i, value: a } = wo(e, t), o = xo(e);
|
|
3640
3789
|
o.value = a, o.hidValueNow = n, e.getAttribute("role") !== "progressbar" && e.setAttribute("role", "progressbar");
|
|
3641
|
-
let s =
|
|
3790
|
+
let s = _o(r), c = _o(i), l = _o(a);
|
|
3642
3791
|
e.getAttribute("aria-valuemin") !== s && e.setAttribute("aria-valuemin", s), e.getAttribute("aria-valuemax") !== c && e.setAttribute("aria-valuemax", c), n ? e.hasAttribute("aria-valuenow") && e.removeAttribute("aria-valuenow") : e.getAttribute("aria-valuenow") !== l && e.setAttribute("aria-valuenow", l);
|
|
3643
|
-
let u =
|
|
3792
|
+
let u = _o(yo(a, r, i));
|
|
3644
3793
|
e.style.getPropertyValue("--juice-progress-ratio").trim() !== u && e.style.setProperty("--juice-progress-ratio", u);
|
|
3645
3794
|
}, l = () => {
|
|
3646
3795
|
r || a().forEach((e) => {
|
|
@@ -3652,13 +3801,13 @@ var Ya = {
|
|
|
3652
3801
|
n && c(n, e);
|
|
3653
3802
|
}, d = (e) => {
|
|
3654
3803
|
let t = s(e);
|
|
3655
|
-
return t ?
|
|
3804
|
+
return t ? wo(t).value : 0;
|
|
3656
3805
|
}, f = (e, t) => {
|
|
3657
3806
|
let n = s(t);
|
|
3658
3807
|
n && (e ? n.getAttribute("progress") !== "indeterminate" && n.setAttribute("progress", "indeterminate") : n.getAttribute("progress") !== "" && n.setAttribute("progress", ""), c(n));
|
|
3659
3808
|
}, p = (e) => {
|
|
3660
3809
|
let t = s(e);
|
|
3661
|
-
return t ?
|
|
3810
|
+
return t ? Co(t) : !1;
|
|
3662
3811
|
}, m = !1, h = 0, g = () => {
|
|
3663
3812
|
m || r || (m = !0, h = requestAnimationFrame(() => {
|
|
3664
3813
|
m = !1, l();
|
|
@@ -3686,17 +3835,1129 @@ var Ya = {
|
|
|
3686
3835
|
setIndeterminate: f,
|
|
3687
3836
|
isIndeterminate: p
|
|
3688
3837
|
};
|
|
3689
|
-
},
|
|
3690
|
-
!
|
|
3691
|
-
},
|
|
3692
|
-
|
|
3838
|
+
}, Do = (e = {}) => Eo(e), Oo = null, ko = !1, Ao = null, jo = () => {
|
|
3839
|
+
!Ao || typeof document > "u" || (document.removeEventListener("DOMContentLoaded", Ao), Ao = null);
|
|
3840
|
+
}, Mo = () => typeof window > "u" || typeof document > "u" ? null : (ko = !1, jo(), Oo ? (Oo.sync(), Oo) : (Oo = Eo(), Oo)), No = () => {
|
|
3841
|
+
ko = !0, jo(), Oo?.destroy(), Oo = null;
|
|
3842
|
+
};
|
|
3843
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (Ao = () => {
|
|
3844
|
+
Ao = null, ko || Mo();
|
|
3845
|
+
}, document.addEventListener("DOMContentLoaded", Ao)) : Mo());
|
|
3846
|
+
//#endregion
|
|
3847
|
+
//#region src/js/src/pagination/pagination-runtime.ts
|
|
3848
|
+
var Po = {
|
|
3849
|
+
root: typeof document < "u" ? document : {},
|
|
3850
|
+
paginationSelector: "[pagination]",
|
|
3851
|
+
itemSelector: "[pagination-item]"
|
|
3852
|
+
}, Fo = new Set([
|
|
3853
|
+
"OL",
|
|
3854
|
+
"UL",
|
|
3855
|
+
"MENU"
|
|
3856
|
+
]), Io = new Set(["ArrowRight", "ArrowDown"]), Lo = new Set(["ArrowLeft", "ArrowUp"]), Ro = "a, button, [pagination-link]", zo = (e) => Array.from(e), Bo = A(), Vo = /* @__PURE__ */ new WeakSet(), Ho = /* @__PURE__ */ new WeakSet(), Uo = (e) => {
|
|
3857
|
+
let t = e.getAttribute("aria-label");
|
|
3858
|
+
if (t !== null && t.trim() !== "") return !0;
|
|
3859
|
+
let n = e.getAttribute("aria-labelledby");
|
|
3860
|
+
if (n !== null && n.trim() !== "") return !0;
|
|
3861
|
+
let r = e.getAttribute("title");
|
|
3862
|
+
return r !== null && r.trim() !== "";
|
|
3863
|
+
}, Wo = (e) => {
|
|
3864
|
+
let t = e.getAttribute("role");
|
|
3865
|
+
return t ? t === "navigation" : e.tagName === "NAV";
|
|
3866
|
+
}, Go = (e) => e instanceof HTMLElement ? e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement ? !0 : e.isContentEditable : !1, Ko = (e) => e.getAttribute("aria-disabled") === "true" || e instanceof HTMLButtonElement && e.disabled || e instanceof HTMLInputElement && e.disabled ? !0 : e.hasAttribute("disabled"), qo = (e) => {
|
|
3867
|
+
let t = [e.textContent, e.getAttribute("aria-label")];
|
|
3868
|
+
for (let e of t) {
|
|
3869
|
+
let t = e?.trim() ?? "";
|
|
3870
|
+
if (/^\d+$/.test(t)) return Number(t);
|
|
3871
|
+
}
|
|
3872
|
+
return null;
|
|
3873
|
+
}, Jo = () => ({
|
|
3874
|
+
destroy: () => {},
|
|
3875
|
+
sync: () => {},
|
|
3876
|
+
setCurrent: () => {}
|
|
3877
|
+
}), Yo = (e = {}) => {
|
|
3878
|
+
if (typeof window > "u" || typeof document > "u") return Jo();
|
|
3879
|
+
let t = {
|
|
3880
|
+
...Po,
|
|
3881
|
+
...e
|
|
3882
|
+
}, n = t.root ?? document, r = n, i = [
|
|
3883
|
+
t.itemSelector,
|
|
3884
|
+
"[pagination-prev]",
|
|
3885
|
+
"[pagination-next]",
|
|
3886
|
+
"[pagination-ellipsis]",
|
|
3887
|
+
"[pagination-status]",
|
|
3888
|
+
"[pagination-link]",
|
|
3889
|
+
"a",
|
|
3890
|
+
"button"
|
|
3891
|
+
].join(", "), a = (e) => e?.matches(t.paginationSelector) ? n instanceof Document ? !0 : n instanceof Node ? n === e || n.contains(e) : !1 : !1, o = () => {
|
|
3892
|
+
let e = zo(n.querySelectorAll(t.paginationSelector)).filter(a);
|
|
3893
|
+
return n instanceof HTMLElement && a(n) ? [n, ...e] : e;
|
|
3894
|
+
}, s = (e, n) => n.closest(t.paginationSelector) === e, c = (e, t, n) => {
|
|
3895
|
+
if (t.matches(n)) return !0;
|
|
3896
|
+
let r = t.querySelector(n);
|
|
3897
|
+
return !!(r && s(e, r));
|
|
3898
|
+
}, l = (e, t) => c(e, t, "[pagination-ellipsis]") ? "ellipsis" : c(e, t, "[pagination-status]") ? "status" : c(e, t, "[pagination-prev]") ? "prev" : c(e, t, "[pagination-next]") ? "next" : "page", u = (e, t) => t.matches(Ro) && !t.matches("[pagination-ellipsis], [pagination-status]") ? t : zo(t.querySelectorAll(Ro)).find((t) => s(e, t) && !t.closest("[pagination-ellipsis], [pagination-status]")) ?? t, d = (e) => {
|
|
3899
|
+
let t = zo(e.querySelectorAll(i)).filter((t) => s(e, t)), n = [];
|
|
3900
|
+
return t.forEach((t) => {
|
|
3901
|
+
n.some((e) => e.element.contains(t)) || n.push({
|
|
3902
|
+
element: t,
|
|
3903
|
+
kind: l(e, t),
|
|
3904
|
+
target: u(e, t)
|
|
3905
|
+
});
|
|
3906
|
+
}), n;
|
|
3907
|
+
}, f = (e) => {
|
|
3908
|
+
let t = zo(e.querySelectorAll("[aria-current=\"page\"]")).filter((t) => s(e, t));
|
|
3909
|
+
return e.getAttribute("aria-current") === "page" ? [e, ...t] : t;
|
|
3910
|
+
}, p = (e) => {
|
|
3911
|
+
e.getAttribute("aria-current") !== "page" && e.setAttribute("aria-current", "page");
|
|
3912
|
+
}, m = (e, t) => {
|
|
3913
|
+
f(e).forEach((e) => {
|
|
3914
|
+
e !== t && e.removeAttribute("aria-current");
|
|
3915
|
+
});
|
|
3916
|
+
}, h = (e) => {
|
|
3917
|
+
let t = e.getAttribute("role"), n = Fo.has(e.tagName);
|
|
3918
|
+
!t && !n && e.tagName !== "NAV" && e.setAttribute("role", "navigation"), Wo(e) && !Uo(e) && e.setAttribute("aria-label", "Pagination");
|
|
3919
|
+
}, g = (e) => Ko(e.target) || e.element !== e.target && Ko(e.element), _ = (e) => {
|
|
3920
|
+
let t = e.target;
|
|
3921
|
+
if (!Vo.has(t)) {
|
|
3922
|
+
if (Ho.has(t)) {
|
|
3923
|
+
g(e) || Ho.delete(t);
|
|
3924
|
+
return;
|
|
3925
|
+
}
|
|
3926
|
+
g(e) && Ho.add(t);
|
|
3927
|
+
}
|
|
3928
|
+
}, v = (e, t) => {
|
|
3929
|
+
if (!Ho.has(e)) {
|
|
3930
|
+
if (t) {
|
|
3931
|
+
Vo.add(e), e.getAttribute("aria-disabled") !== "true" && e.setAttribute("aria-disabled", "true"), e instanceof HTMLButtonElement && !e.disabled && (e.disabled = !0);
|
|
3932
|
+
return;
|
|
3933
|
+
}
|
|
3934
|
+
Vo.has(e) && (Vo.delete(e), e.getAttribute("aria-disabled") === "true" && e.removeAttribute("aria-disabled"), e instanceof HTMLButtonElement && e.disabled && (e.disabled = !1));
|
|
3935
|
+
}
|
|
3936
|
+
}, y = (e, t) => {
|
|
3937
|
+
let n = f(e);
|
|
3938
|
+
if (n.length > 0) {
|
|
3939
|
+
m(e, n[0]);
|
|
3940
|
+
return;
|
|
3941
|
+
}
|
|
3942
|
+
let r = t.find((e) => e.kind === "page");
|
|
3943
|
+
r && p(r.target);
|
|
3944
|
+
}, b = (e, t) => {
|
|
3945
|
+
let n = t.filter((e) => e.kind === "page"), r = f(e)[0] ?? null, i = r ? n.find((e) => e.element === r || e.target === r || e.element.contains(r)) ?? null : null, a = !1, o = !1;
|
|
3946
|
+
if (i) {
|
|
3947
|
+
let e = t.indexOf(i), r = t.some((t, n) => t.kind === "ellipsis" && n < e), s = t.some((t, n) => t.kind === "ellipsis" && n > e);
|
|
3948
|
+
a = i === n[0] && !r, o = i === n[n.length - 1] && !s, (qo(i.target) === 1 || qo(i.element) === 1) && (a = !0);
|
|
3949
|
+
}
|
|
3950
|
+
let s = !!i;
|
|
3951
|
+
t.forEach((e) => {
|
|
3952
|
+
if (e.kind !== "prev" && e.kind !== "next") return;
|
|
3953
|
+
_(e);
|
|
3954
|
+
let t = s && (e.kind === "prev" ? a : o);
|
|
3955
|
+
v(e.target, t);
|
|
3956
|
+
});
|
|
3957
|
+
}, x = (e) => {
|
|
3958
|
+
if (!a(e)) return;
|
|
3959
|
+
h(e);
|
|
3960
|
+
let t = d(e);
|
|
3961
|
+
y(e, t), b(e, t);
|
|
3962
|
+
}, S = () => {
|
|
3963
|
+
o().forEach((e) => {
|
|
3964
|
+
x(e);
|
|
3965
|
+
});
|
|
3966
|
+
}, C = (e) => {
|
|
3967
|
+
if (e) {
|
|
3968
|
+
if (a(e)) return e;
|
|
3969
|
+
let n = e.closest(t.paginationSelector);
|
|
3970
|
+
return n instanceof HTMLElement && a(n) ? n : null;
|
|
3971
|
+
}
|
|
3972
|
+
return o()[0] ?? null;
|
|
3973
|
+
}, w = (e, t) => {
|
|
3974
|
+
let n = e instanceof HTMLElement ? e : null, r = C(t ?? n);
|
|
3975
|
+
if (!r) return;
|
|
3976
|
+
let i = d(r).filter((e) => e.kind === "page"), a = typeof e == "number" ? Number.isInteger(e) ? i[e] ?? null : null : i.find((t) => t.element === e || t.target === e || t.element.contains(e)) ?? null;
|
|
3977
|
+
if (!a || !r.contains(a.element)) return;
|
|
3978
|
+
let o = n && n !== a.element && a.element.contains(n) && n.matches(Ro) ? n : a.target;
|
|
3979
|
+
m(r, o), p(o), x(r);
|
|
3980
|
+
}, T = (e) => {
|
|
3981
|
+
let t = /* @__PURE__ */ new Set();
|
|
3982
|
+
return d(e).filter((e) => e.kind !== "page" && e.kind !== "prev" && e.kind !== "next" || t.has(e.target) ? !1 : (t.add(e.target), !0));
|
|
3983
|
+
}, E = (e) => {
|
|
3984
|
+
let t = e.closest(Ro);
|
|
3985
|
+
return !(t instanceof HTMLElement) || t.matches("[pagination-ellipsis], [pagination-status]") || t.closest("[pagination-ellipsis], [pagination-status]") ? null : t;
|
|
3986
|
+
}, D = (e) => {
|
|
3987
|
+
let n = e.target;
|
|
3988
|
+
if (!(n instanceof Element)) return;
|
|
3989
|
+
let r = E(n);
|
|
3990
|
+
if (!r) return;
|
|
3991
|
+
let i = r.closest(t.paginationSelector);
|
|
3992
|
+
if (!(i instanceof HTMLElement) || !a(i)) return;
|
|
3993
|
+
let o = d(i).find((e) => e.target === r);
|
|
3994
|
+
(Ko(r) || o && g(o)) && Bo(e) && e.preventDefault();
|
|
3995
|
+
}, O = (e) => {
|
|
3996
|
+
if (!(e instanceof KeyboardEvent) || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || e.defaultPrevented) return;
|
|
3997
|
+
let n = e.target;
|
|
3998
|
+
if (!(n instanceof Element) || Go(n)) return;
|
|
3999
|
+
let r = E(n);
|
|
4000
|
+
if (!r) return;
|
|
4001
|
+
let i = r.closest(t.paginationSelector);
|
|
4002
|
+
if (!(i instanceof HTMLElement) || !a(i)) return;
|
|
4003
|
+
let o = T(i), s = o.findIndex((e) => e.target === r);
|
|
4004
|
+
if (s < 0) return;
|
|
4005
|
+
let c = (e) => !g(e), l;
|
|
4006
|
+
if (e.key === "Home") l = o.find(c);
|
|
4007
|
+
else if (e.key === "End") l = [...o].reverse().find(c);
|
|
4008
|
+
else if (Io.has(e.key)) l = o.slice(s + 1).find(c);
|
|
4009
|
+
else if (Lo.has(e.key)) l = o.slice(0, s).reverse().find(c);
|
|
4010
|
+
else return;
|
|
4011
|
+
Bo(e) && (e.preventDefault(), l && l.target !== r && l.target.focus());
|
|
4012
|
+
}, k = !1, A = !1, j = 0, M = () => {
|
|
4013
|
+
k || A || (A = !0, j = requestAnimationFrame(() => {
|
|
4014
|
+
A = !1, k || S();
|
|
4015
|
+
}));
|
|
4016
|
+
}, N = typeof MutationObserver < "u" ? new MutationObserver(() => M()) : null;
|
|
4017
|
+
return r.addEventListener("click", D), r.addEventListener("keydown", O), N && n instanceof Node && N.observe(n, {
|
|
4018
|
+
childList: !0,
|
|
4019
|
+
subtree: !0,
|
|
4020
|
+
attributes: !0,
|
|
4021
|
+
attributeFilter: [
|
|
4022
|
+
"pagination",
|
|
4023
|
+
"pagination-item",
|
|
4024
|
+
"pagination-link",
|
|
4025
|
+
"pagination-prev",
|
|
4026
|
+
"pagination-next",
|
|
4027
|
+
"pagination-ellipsis",
|
|
4028
|
+
"pagination-status",
|
|
4029
|
+
"aria-current",
|
|
4030
|
+
"aria-label",
|
|
4031
|
+
"aria-labelledby",
|
|
4032
|
+
"aria-disabled",
|
|
4033
|
+
"disabled",
|
|
4034
|
+
"role",
|
|
4035
|
+
"title"
|
|
4036
|
+
]
|
|
4037
|
+
}), S(), {
|
|
4038
|
+
destroy: () => {
|
|
4039
|
+
k = !0, A &&= (cancelAnimationFrame(j), !1), N?.disconnect(), r.removeEventListener("click", D), r.removeEventListener("keydown", O);
|
|
4040
|
+
},
|
|
4041
|
+
sync: S,
|
|
4042
|
+
setCurrent: w
|
|
4043
|
+
};
|
|
4044
|
+
}, Xo = (e = {}) => Yo(e), Zo = null, Qo = !1, $o = null, es = () => {
|
|
4045
|
+
!$o || typeof document > "u" || (document.removeEventListener("DOMContentLoaded", $o), $o = null);
|
|
4046
|
+
}, ts = () => typeof window > "u" || typeof document > "u" ? null : (Qo = !1, es(), Zo ? (Zo.sync(), Zo) : (Zo = Yo(), Zo)), ns = () => {
|
|
4047
|
+
Qo = !0, es(), Zo?.destroy(), Zo = null;
|
|
4048
|
+
};
|
|
4049
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? ($o = () => {
|
|
4050
|
+
$o = null, Qo || ts();
|
|
4051
|
+
}, document.addEventListener("DOMContentLoaded", $o)) : ts());
|
|
4052
|
+
//#endregion
|
|
4053
|
+
//#region src/js/src/disclosure/disclosure-runtime.ts
|
|
4054
|
+
var rs = {
|
|
4055
|
+
root: typeof document < "u" ? document : {},
|
|
4056
|
+
disclosureSelector: "[disclosure]",
|
|
4057
|
+
triggerSelector: "[disclosure-trigger]"
|
|
4058
|
+
}, is = (e) => Array.from(e), as = "juice-disclosure-trigger", os = "juice-disclosure-panel", ss = "[disclosure-panel]", cs = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, ls = A(), us = (e) => e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "disclosure", ds = (e) => e.getAttribute("motion") === "accordion", fs = (e, t) => {
|
|
4059
|
+
if (t && ds(t)) {
|
|
4060
|
+
let e = t.getAttribute("data-motion-state");
|
|
4061
|
+
if (e === "exiting") return !1;
|
|
4062
|
+
if (e === "entering" || e === "entered") return !0;
|
|
4063
|
+
}
|
|
4064
|
+
return t ? !t.hasAttribute("hidden") : e.getAttribute("aria-expanded") === "true";
|
|
4065
|
+
}, ps = (e, t, n) => {
|
|
4066
|
+
let r = String(n);
|
|
4067
|
+
if (e.getAttribute("aria-expanded") !== r && e.setAttribute("aria-expanded", r), !t) return;
|
|
4068
|
+
let i = String(!n);
|
|
4069
|
+
t.getAttribute("aria-hidden") !== i && t.setAttribute("aria-hidden", i);
|
|
4070
|
+
}, ms = (e) => e.defaultPrevented || Tt() || Et(), hs = (e = {}) => {
|
|
4071
|
+
if (typeof window > "u" || typeof document > "u") return {
|
|
4072
|
+
destroy: () => {},
|
|
4073
|
+
sync: () => {},
|
|
4074
|
+
expand: () => {},
|
|
4075
|
+
collapse: () => {},
|
|
4076
|
+
toggle: () => {}
|
|
4077
|
+
};
|
|
4078
|
+
let t = {
|
|
4079
|
+
...rs,
|
|
4080
|
+
...e
|
|
4081
|
+
}, n = t.root ?? document, r = n, i = re(), a = (e, t) => {
|
|
4082
|
+
i.cancel(e), e.hidden !== !t && (e.hidden = !t), e.style.removeProperty("height"), (ds(e) || e.hasAttribute("data-motion-state")) && e.setAttribute("data-motion-state", t ? "entered" : "exited");
|
|
4083
|
+
}, o = (e) => {
|
|
4084
|
+
let t = e.getAttribute("data-motion-state");
|
|
4085
|
+
if (t === "entering") return;
|
|
4086
|
+
if (!e.hidden && t !== "exiting" && t !== "exited") {
|
|
4087
|
+
t !== "entered" && e.setAttribute("data-motion-state", "entered");
|
|
4088
|
+
return;
|
|
4089
|
+
}
|
|
4090
|
+
let n = t === "exiting";
|
|
4091
|
+
e.hidden = !1;
|
|
4092
|
+
let r = n ? e.getBoundingClientRect().height : 0, a = e.scrollHeight;
|
|
4093
|
+
e.style.height = `${r}px`, i.enter(e, () => {
|
|
4094
|
+
e.style.removeProperty("height");
|
|
4095
|
+
}, () => {
|
|
4096
|
+
e.style.height = `${a}px`;
|
|
4097
|
+
});
|
|
4098
|
+
}, s = (e) => {
|
|
4099
|
+
if (e.hidden || e.getAttribute("data-motion-state") === "exiting") return;
|
|
4100
|
+
let t = e.scrollHeight;
|
|
4101
|
+
e.style.height = `${t}px`, i.exit(e, () => {
|
|
4102
|
+
e.hidden = !0, e.style.removeProperty("height");
|
|
4103
|
+
}, () => {
|
|
4104
|
+
e.style.height = "0px";
|
|
4105
|
+
});
|
|
4106
|
+
}, c = (e, t, n) => {
|
|
4107
|
+
if (ps(e, t, n), t) {
|
|
4108
|
+
if (!ds(t) || z()) {
|
|
4109
|
+
a(t, n);
|
|
4110
|
+
return;
|
|
4111
|
+
}
|
|
4112
|
+
n ? o(t) : s(t);
|
|
4113
|
+
}
|
|
4114
|
+
}, l = () => is(n.querySelectorAll(t.disclosureSelector)), u = (e) => is(e.querySelectorAll(t.triggerSelector)).filter((n) => n.closest(t.disclosureSelector) === e), d = () => l().flatMap((e) => u(e)), f = 0, p = null, m = (e) => (f += 1, `${e}-${f}`), h = (e) => {
|
|
4115
|
+
if (!e) return null;
|
|
4116
|
+
let n = e.closest(t.disclosureSelector);
|
|
4117
|
+
return n instanceof HTMLElement ? n : null;
|
|
4118
|
+
}, g = (e) => {
|
|
4119
|
+
let n = h(e);
|
|
4120
|
+
if (!n) return null;
|
|
4121
|
+
let r = e.getAttribute("aria-controls");
|
|
4122
|
+
if (r) {
|
|
4123
|
+
let t = n.querySelector(`#${j(r)}`);
|
|
4124
|
+
if (t && t !== e) return t;
|
|
4125
|
+
}
|
|
4126
|
+
let i = e.nextElementSibling;
|
|
4127
|
+
for (; i;) {
|
|
4128
|
+
if (i instanceof HTMLElement && (i.matches(ss) || !i.matches(t.triggerSelector) && !i.matches(t.disclosureSelector))) return i;
|
|
4129
|
+
i = i.nextElementSibling;
|
|
4130
|
+
}
|
|
4131
|
+
return null;
|
|
4132
|
+
}, _ = (e) => {
|
|
4133
|
+
if (e) {
|
|
4134
|
+
if (e.matches(t.triggerSelector) && h(e)) return e;
|
|
4135
|
+
let n = e.closest(t.triggerSelector);
|
|
4136
|
+
if (n instanceof HTMLElement && h(n)) return n;
|
|
4137
|
+
}
|
|
4138
|
+
return d()[0] ?? null;
|
|
4139
|
+
}, v = (e) => {
|
|
4140
|
+
let t = e.getAttribute("name");
|
|
4141
|
+
return t ? us(t) : null;
|
|
4142
|
+
}, y = (e, t) => {
|
|
4143
|
+
let n = h(e);
|
|
4144
|
+
if (!n) return;
|
|
4145
|
+
let r = u(n), i = Math.max(0, r.indexOf(e)), a = v(n), o = r.length > 1 ? `-${i + 1}` : "";
|
|
4146
|
+
e.id ||= a ? `${a}-trigger${o}` : m(as), cs(e) || (e.setAttribute("role", "button"), e.hasAttribute("tabindex") || e.setAttribute("tabindex", "0")), t && (t.id ||= a ? `${a}-panel${o}` : m(os), e.getAttribute("aria-controls") !== t.id && e.setAttribute("aria-controls", t.id), t.getAttribute("role") !== "region" && t.setAttribute("role", "region"), t.getAttribute("aria-labelledby") !== e.id && t.setAttribute("aria-labelledby", e.id));
|
|
4147
|
+
}, b = (e) => {
|
|
4148
|
+
let t = _(e);
|
|
4149
|
+
if (!t) return;
|
|
4150
|
+
let n = g(t);
|
|
4151
|
+
y(t, n), c(t, n, !0), p = t;
|
|
4152
|
+
}, x = (e) => {
|
|
4153
|
+
let t = _(e);
|
|
4154
|
+
if (!t) return;
|
|
4155
|
+
let n = g(t);
|
|
4156
|
+
y(t, n), c(t, n, !1), t === p && (p = d().find((e) => e !== t && fs(e, g(e))) ?? null);
|
|
4157
|
+
}, S = (e) => {
|
|
4158
|
+
let t = _(e);
|
|
4159
|
+
if (t) {
|
|
4160
|
+
if (fs(t, g(t))) {
|
|
4161
|
+
x(t);
|
|
4162
|
+
return;
|
|
4163
|
+
}
|
|
4164
|
+
b(t);
|
|
4165
|
+
}
|
|
4166
|
+
}, C = () => {
|
|
4167
|
+
l().forEach((e) => {
|
|
4168
|
+
u(e).forEach((e) => {
|
|
4169
|
+
let t = g(e);
|
|
4170
|
+
if (y(e, t), t) {
|
|
4171
|
+
c(e, t, fs(e, t));
|
|
4172
|
+
return;
|
|
4173
|
+
}
|
|
4174
|
+
e.hasAttribute("aria-expanded") || e.setAttribute("aria-expanded", "false");
|
|
4175
|
+
});
|
|
4176
|
+
});
|
|
4177
|
+
}, w = (e) => {
|
|
4178
|
+
let n = e.target;
|
|
4179
|
+
if (!(n instanceof Element)) return;
|
|
4180
|
+
let r = n.closest(t.triggerSelector);
|
|
4181
|
+
!(r instanceof HTMLElement) || !h(r) || ls(e) && S(r);
|
|
4182
|
+
}, T = (e) => {
|
|
4183
|
+
let n = e.closest(t.triggerSelector);
|
|
4184
|
+
return n instanceof HTMLElement && h(n) && fs(n, g(n)) ? n : d().filter((e) => fs(e, g(e))).find((t) => g(t)?.contains(e)) || (p && h(p) && fs(p, g(p)) ? p : null);
|
|
4185
|
+
}, E = (e) => {
|
|
4186
|
+
if (!(e instanceof KeyboardEvent)) return;
|
|
4187
|
+
let n = e.target;
|
|
4188
|
+
if (!(n instanceof Element)) return;
|
|
4189
|
+
if (e.key === "Escape") {
|
|
4190
|
+
if (ms(e)) return;
|
|
4191
|
+
let t = T(n);
|
|
4192
|
+
if (!t || !ls(e)) return;
|
|
4193
|
+
e.preventDefault(), x(t), t.focus();
|
|
4194
|
+
return;
|
|
4195
|
+
}
|
|
4196
|
+
if (e.key !== "Enter" && e.key !== " ") return;
|
|
4197
|
+
let r = n.closest(t.triggerSelector);
|
|
4198
|
+
!(r instanceof HTMLElement) || !h(r) || cs(r) || ls(e) && (e.preventDefault(), S(r));
|
|
4199
|
+
}, D = !1, O = () => {
|
|
4200
|
+
D || (D = !0, requestAnimationFrame(() => {
|
|
4201
|
+
D = !1, C();
|
|
4202
|
+
}));
|
|
4203
|
+
}, k = typeof MutationObserver < "u" ? new MutationObserver(() => O()) : null;
|
|
4204
|
+
return r.addEventListener("click", w), r.addEventListener("keydown", E), k && n instanceof Node && k.observe(n, {
|
|
4205
|
+
childList: !0,
|
|
4206
|
+
subtree: !0,
|
|
4207
|
+
attributes: !0,
|
|
4208
|
+
attributeFilter: [
|
|
4209
|
+
"hidden",
|
|
4210
|
+
"aria-expanded",
|
|
4211
|
+
"aria-controls",
|
|
4212
|
+
"disclosure",
|
|
4213
|
+
"disclosure-trigger",
|
|
4214
|
+
"disclosure-panel"
|
|
4215
|
+
]
|
|
4216
|
+
}), C(), {
|
|
4217
|
+
destroy: () => {
|
|
4218
|
+
r.removeEventListener("click", w), r.removeEventListener("keydown", E), k?.disconnect(), i.destroy();
|
|
4219
|
+
},
|
|
4220
|
+
sync: C,
|
|
4221
|
+
expand: b,
|
|
4222
|
+
collapse: x,
|
|
4223
|
+
toggle: S
|
|
4224
|
+
};
|
|
4225
|
+
}, gs = (e = {}) => hs(e), _s = null, vs = !1, ys = null, bs = () => {
|
|
4226
|
+
!ys || typeof document > "u" || (document.removeEventListener("DOMContentLoaded", ys), ys = null);
|
|
4227
|
+
}, xs = () => typeof window > "u" || typeof document > "u" ? null : (vs = !1, bs(), _s ? (_s.sync(), _s) : (_s = hs(), _s)), Ss = () => {
|
|
4228
|
+
vs = !0, bs(), _s?.destroy(), _s = null;
|
|
4229
|
+
};
|
|
4230
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (ys = () => {
|
|
4231
|
+
ys = null, vs || xs();
|
|
4232
|
+
}, document.addEventListener("DOMContentLoaded", ys)) : xs());
|
|
4233
|
+
//#endregion
|
|
4234
|
+
//#region src/js/src/spinner/spinner-runtime.ts
|
|
4235
|
+
var Cs = {
|
|
4236
|
+
root: typeof document < "u" ? document : {},
|
|
4237
|
+
spinnerSelector: "[spinner]"
|
|
4238
|
+
}, ws = (e) => Array.from(e), Ts = (e) => !e.hasAttribute("hidden"), Es = () => ({
|
|
4239
|
+
destroy: () => {},
|
|
4240
|
+
sync: () => {},
|
|
4241
|
+
show: () => {},
|
|
4242
|
+
hide: () => {},
|
|
4243
|
+
isShown: () => !1
|
|
4244
|
+
}), Ds = (e = {}) => {
|
|
4245
|
+
if (typeof window > "u" || typeof document > "u") return Es();
|
|
4246
|
+
let t = {
|
|
4247
|
+
...Cs,
|
|
4248
|
+
...e
|
|
4249
|
+
}, n = t.root ?? document, r = !1, i = (e) => e?.matches(t.spinnerSelector) ? n instanceof Document ? !0 : n instanceof Node ? n === e || n.contains(e) : !1 : !1, a = () => {
|
|
4250
|
+
let e = ws(n.querySelectorAll(t.spinnerSelector)).filter(i);
|
|
4251
|
+
return n instanceof HTMLElement && i(n) ? [n, ...e.filter((e) => e !== n)] : e;
|
|
4252
|
+
}, o = (e) => {
|
|
4253
|
+
if (!e) return null;
|
|
4254
|
+
let n = e.closest(t.spinnerSelector);
|
|
4255
|
+
return !(n instanceof HTMLElement) || !i(n) ? null : n;
|
|
4256
|
+
}, s = (e) => {
|
|
4257
|
+
if (e) {
|
|
4258
|
+
if (i(e)) return e;
|
|
4259
|
+
let t = o(e);
|
|
4260
|
+
if (t) return t;
|
|
4261
|
+
}
|
|
4262
|
+
return a().find((e) => i(e)) ?? null;
|
|
4263
|
+
}, c = (e) => {
|
|
4264
|
+
if (Ts(e)) {
|
|
4265
|
+
e.getAttribute("role") !== "status" && e.setAttribute("role", "status"), e.getAttribute("aria-busy") !== "true" && e.setAttribute("aria-busy", "true");
|
|
4266
|
+
return;
|
|
4267
|
+
}
|
|
4268
|
+
e.getAttribute("role") === "status" && e.removeAttribute("role"), e.hasAttribute("aria-busy") && e.removeAttribute("aria-busy");
|
|
4269
|
+
}, l = () => {
|
|
4270
|
+
r || a().forEach((e) => {
|
|
4271
|
+
i(e) && c(e);
|
|
4272
|
+
});
|
|
4273
|
+
}, u = (e) => {
|
|
4274
|
+
let t = s(e);
|
|
4275
|
+
t && (t.hidden &&= !1, c(t));
|
|
4276
|
+
}, d = (e) => {
|
|
4277
|
+
let t = s(e);
|
|
4278
|
+
t && (t.getAttribute("role") === "status" && t.removeAttribute("role"), t.hasAttribute("aria-busy") && t.removeAttribute("aria-busy"), t.hidden ||= !0);
|
|
4279
|
+
}, f = (e) => {
|
|
4280
|
+
let t = s(e);
|
|
4281
|
+
return t ? Ts(t) : !1;
|
|
4282
|
+
}, p = !1, m = 0, h = () => {
|
|
4283
|
+
p || r || (p = !0, m = requestAnimationFrame(() => {
|
|
4284
|
+
p = !1, l();
|
|
4285
|
+
}));
|
|
4286
|
+
}, g = typeof MutationObserver < "u" ? new MutationObserver(() => h()) : null;
|
|
4287
|
+
return g && n instanceof Node && g.observe(n, {
|
|
4288
|
+
childList: !0,
|
|
4289
|
+
subtree: !0,
|
|
4290
|
+
attributes: !0,
|
|
4291
|
+
attributeFilter: [
|
|
4292
|
+
"spinner",
|
|
4293
|
+
"hidden",
|
|
4294
|
+
"role",
|
|
4295
|
+
"aria-busy",
|
|
4296
|
+
"aria-label",
|
|
4297
|
+
"aria-labelledby"
|
|
4298
|
+
]
|
|
4299
|
+
}), l(), {
|
|
4300
|
+
destroy: () => {
|
|
4301
|
+
r = !0, p &&= (cancelAnimationFrame(m), !1), g?.disconnect();
|
|
4302
|
+
},
|
|
4303
|
+
sync: l,
|
|
4304
|
+
show: u,
|
|
4305
|
+
hide: d,
|
|
4306
|
+
isShown: f
|
|
4307
|
+
};
|
|
4308
|
+
}, Os = (e = {}) => Ds(e), ks = null, As = !1, js = null, Ms = () => {
|
|
4309
|
+
!js || typeof document > "u" || (document.removeEventListener("DOMContentLoaded", js), js = null);
|
|
4310
|
+
}, Ns = () => typeof window > "u" || typeof document > "u" ? null : (As = !1, Ms(), ks ? (ks.sync(), ks) : (ks = Ds(), ks)), Ps = () => {
|
|
4311
|
+
As = !0, Ms(), ks?.destroy(), ks = null;
|
|
4312
|
+
};
|
|
4313
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (js = () => {
|
|
4314
|
+
js = null, As || Ns();
|
|
4315
|
+
}, document.addEventListener("DOMContentLoaded", js)) : Ns());
|
|
4316
|
+
//#endregion
|
|
4317
|
+
//#region src/js/src/select/select-runtime.ts
|
|
4318
|
+
var Fs = {
|
|
4319
|
+
root: typeof document < "u" ? document : {},
|
|
4320
|
+
selectSelector: "select[select]"
|
|
4321
|
+
}, Is = (e) => Array.from(e), Ls = () => ({
|
|
4322
|
+
destroy: () => {},
|
|
4323
|
+
sync: () => {}
|
|
4324
|
+
}), Rs = (e) => {
|
|
4325
|
+
let t = e;
|
|
4326
|
+
for (; t;) {
|
|
4327
|
+
if (t.hidden || t.getAttribute("aria-hidden") === "true") return !1;
|
|
4328
|
+
t = t.parentElement;
|
|
4329
|
+
}
|
|
4330
|
+
return !0;
|
|
4331
|
+
}, zs = (e) => {
|
|
4332
|
+
let t = [], n = (r) => {
|
|
4333
|
+
if (!(r !== e && (r instanceof HTMLSelectElement || r instanceof HTMLElement && (r.hidden || r.getAttribute("aria-hidden") === "true")))) {
|
|
4334
|
+
if (r.nodeType === Node.TEXT_NODE) {
|
|
4335
|
+
r.textContent && t.push(r.textContent);
|
|
4336
|
+
return;
|
|
4337
|
+
}
|
|
4338
|
+
r.childNodes.forEach((e) => n(e));
|
|
4339
|
+
}
|
|
4340
|
+
};
|
|
4341
|
+
return n(e), t.join("").replace(/\s+/g, " ").trim();
|
|
4342
|
+
}, Bs = (e = {}) => {
|
|
4343
|
+
if (typeof window > "u" || typeof document > "u") return Ls();
|
|
4344
|
+
let t = {
|
|
4345
|
+
...Fs,
|
|
4346
|
+
...e
|
|
4347
|
+
}, n = t.root ?? document, r = /* @__PURE__ */ new WeakMap(), i = !1, a = 0, o = (e) => !(e instanceof HTMLSelectElement) || !e.matches(t.selectSelector) || e.closest("[combobox]") ? !1 : n instanceof Document ? !0 : n instanceof Node ? n === e || n.contains(e) : !1, s = () => {
|
|
4348
|
+
let e = Is(n.querySelectorAll(t.selectSelector)).filter(o);
|
|
4349
|
+
return n instanceof HTMLSelectElement && o(n) ? [n, ...e.filter((e) => e !== n)] : e;
|
|
4350
|
+
}, c = (e) => {
|
|
4351
|
+
let t = /* @__PURE__ */ new Set(), r = (n) => {
|
|
4352
|
+
(n instanceof Document || n instanceof Element) && n.querySelectorAll(e).forEach((e) => {
|
|
4353
|
+
t.add(e);
|
|
4354
|
+
});
|
|
4355
|
+
};
|
|
4356
|
+
return r(n), typeof document < "u" && n !== document && r(document), Array.from(t);
|
|
4357
|
+
}, l = (e, t) => !e || e === t || t.contains(e) || !Rs(e) || !zs(e) ? null : e, u = (e) => {
|
|
4358
|
+
if (!e.id) return [];
|
|
4359
|
+
let t = c(`label[for="${j(e.id)}"]`).filter((t) => t instanceof HTMLLabelElement && t.htmlFor === e.id);
|
|
4360
|
+
return e.labels && Array.from(e.labels).forEach((n) => {
|
|
4361
|
+
n.htmlFor === e.id && !t.includes(n) && t.push(n);
|
|
4362
|
+
}), t;
|
|
4363
|
+
}, d = (e) => {
|
|
4364
|
+
let t = e.closest("label");
|
|
4365
|
+
return !(t instanceof HTMLLabelElement) || t.htmlFor && t.htmlFor !== e.id ? null : t;
|
|
4366
|
+
}, f = (e) => e.id ? l(c(`[select-label][for="${j(e.id)}"]`).find((t) => t.getAttribute("for") === e.id), e) : null, p = (e) => {
|
|
4367
|
+
let n = e.parentElement?.closest("[select-label]");
|
|
4368
|
+
return !n || n.querySelectorAll(t.selectSelector).length !== 1 ? null : l(n, e);
|
|
4369
|
+
}, m = (e) => {
|
|
4370
|
+
let t = e.previousElementSibling;
|
|
4371
|
+
for (; t;) {
|
|
4372
|
+
if (t instanceof HTMLSelectElement) return null;
|
|
4373
|
+
if (t instanceof HTMLElement) {
|
|
4374
|
+
if (t.matches("[select-label]")) return l(t, e);
|
|
4375
|
+
if (!t.querySelector("select")) {
|
|
4376
|
+
let n = l(t.querySelector("[select-label]"), e);
|
|
4377
|
+
if (n) return n;
|
|
4378
|
+
}
|
|
4379
|
+
}
|
|
4380
|
+
t = t.previousElementSibling;
|
|
4381
|
+
}
|
|
4382
|
+
return null;
|
|
4383
|
+
}, h = (e) => {
|
|
4384
|
+
for (let t of u(e)) {
|
|
4385
|
+
let n = l(t, e);
|
|
4386
|
+
if (n) return n;
|
|
4387
|
+
}
|
|
4388
|
+
return l(d(e), e) || (f(e) ?? p(e) ?? m(e));
|
|
4389
|
+
}, g = (e, t) => {
|
|
4390
|
+
let n = r.get(e);
|
|
4391
|
+
return n?.attribute === t && e.getAttribute(t) === n.value;
|
|
4392
|
+
}, _ = (e) => {
|
|
4393
|
+
let t = e.getAttribute("aria-label");
|
|
4394
|
+
if (t !== null && t.trim() !== "" && !g(e, "aria-label")) return !0;
|
|
4395
|
+
let n = e.getAttribute("aria-labelledby");
|
|
4396
|
+
return n !== null && n.trim() !== "" && !g(e, "aria-labelledby");
|
|
4397
|
+
}, v = (e) => {
|
|
4398
|
+
let t = r.get(e);
|
|
4399
|
+
t && (e.getAttribute(t.attribute) === t.value && e.removeAttribute(t.attribute), r.delete(e));
|
|
4400
|
+
}, y = (e) => {
|
|
4401
|
+
let t = r.get(e);
|
|
4402
|
+
if (!t) return;
|
|
4403
|
+
let n = e.getAttribute("aria-label"), i = e.getAttribute("aria-labelledby"), a = n !== null && n.trim() !== "" && !g(e, "aria-label"), o = i !== null && i.trim() !== "" && !g(e, "aria-labelledby");
|
|
4404
|
+
t.attribute === "aria-labelledby" && a && e.getAttribute("aria-labelledby") === t.value && e.removeAttribute("aria-labelledby"), t.attribute === "aria-label" && o && e.getAttribute("aria-label") === t.value && e.removeAttribute("aria-label"), r.delete(e);
|
|
4405
|
+
}, b = (e) => {
|
|
4406
|
+
if (e.id.trim()) return e.id;
|
|
4407
|
+
let t = "";
|
|
4408
|
+
do
|
|
4409
|
+
a += 1, t = `juice-select-label-${a}`;
|
|
4410
|
+
while (document.getElementById(t));
|
|
4411
|
+
return e.id = t, t;
|
|
4412
|
+
}, x = (e, t, n) => {
|
|
4413
|
+
let i = t === "aria-label" ? "aria-labelledby" : "aria-label", a = r.get(e);
|
|
4414
|
+
a?.attribute === i && e.getAttribute(i) === a.value && e.removeAttribute(i), e.getAttribute(t) !== n && e.setAttribute(t, n), r.set(e, {
|
|
4415
|
+
attribute: t,
|
|
4416
|
+
value: n
|
|
4417
|
+
});
|
|
4418
|
+
}, S = (e) => {
|
|
4419
|
+
if (!o(e)) return;
|
|
4420
|
+
if (_(e)) {
|
|
4421
|
+
y(e);
|
|
4422
|
+
return;
|
|
4423
|
+
}
|
|
4424
|
+
let t = h(e), n = t ? zs(t) : "";
|
|
4425
|
+
if (!t || !n) {
|
|
4426
|
+
v(e);
|
|
4427
|
+
return;
|
|
4428
|
+
}
|
|
4429
|
+
if (t.contains(e)) {
|
|
4430
|
+
x(e, "aria-label", n);
|
|
4431
|
+
return;
|
|
4432
|
+
}
|
|
4433
|
+
x(e, "aria-labelledby", b(t));
|
|
4434
|
+
}, C = () => {
|
|
4435
|
+
i || s().forEach((e) => S(e));
|
|
4436
|
+
}, w = !1, T = 0, E = () => {
|
|
4437
|
+
w || i || (w = !0, T = requestAnimationFrame(() => {
|
|
4438
|
+
w = !1, C();
|
|
4439
|
+
}));
|
|
4440
|
+
}, D = typeof MutationObserver < "u" ? new MutationObserver(() => E()) : null;
|
|
4441
|
+
return D && n instanceof Node && D.observe(n, {
|
|
4442
|
+
childList: !0,
|
|
4443
|
+
subtree: !0,
|
|
4444
|
+
characterData: !0,
|
|
4445
|
+
attributes: !0,
|
|
4446
|
+
attributeFilter: [
|
|
4447
|
+
"select",
|
|
4448
|
+
"select-label",
|
|
4449
|
+
"for",
|
|
4450
|
+
"id",
|
|
4451
|
+
"hidden",
|
|
4452
|
+
"aria-hidden",
|
|
4453
|
+
"aria-label",
|
|
4454
|
+
"aria-labelledby",
|
|
4455
|
+
"multiple",
|
|
4456
|
+
"size"
|
|
4457
|
+
]
|
|
4458
|
+
}), C(), {
|
|
4459
|
+
destroy: () => {
|
|
4460
|
+
i = !0, w &&= (cancelAnimationFrame(T), !1), D?.disconnect();
|
|
4461
|
+
},
|
|
4462
|
+
sync: C
|
|
4463
|
+
};
|
|
4464
|
+
}, Vs = (e = {}) => Bs(e), Hs = null, Us = !1, Ws = null, Gs = () => {
|
|
4465
|
+
!Ws || typeof document > "u" || (document.removeEventListener("DOMContentLoaded", Ws), Ws = null);
|
|
4466
|
+
}, Ks = () => typeof window > "u" || typeof document > "u" ? null : (Us = !1, Gs(), Hs ? (Hs.sync(), Hs) : (Hs = Bs(), Hs)), qs = () => {
|
|
4467
|
+
Us = !0, Gs(), Hs?.destroy(), Hs = null;
|
|
4468
|
+
};
|
|
4469
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (Ws = () => {
|
|
4470
|
+
Ws = null, Us || Ks();
|
|
4471
|
+
}, document.addEventListener("DOMContentLoaded", Ws)) : Ks());
|
|
4472
|
+
//#endregion
|
|
4473
|
+
//#region src/js/src/input/input-runtime.ts
|
|
4474
|
+
var Js = new Set([
|
|
4475
|
+
"text",
|
|
4476
|
+
"email",
|
|
4477
|
+
"password",
|
|
4478
|
+
"search",
|
|
4479
|
+
"tel",
|
|
4480
|
+
"url",
|
|
4481
|
+
"number"
|
|
4482
|
+
]), Ys = {
|
|
4483
|
+
root: typeof document < "u" ? document : {},
|
|
4484
|
+
inputSelector: "input[input]"
|
|
4485
|
+
}, Xs = (e) => Array.from(e), Zs = () => ({
|
|
4486
|
+
destroy: () => {},
|
|
4487
|
+
sync: () => {}
|
|
4488
|
+
}), Qs = (e) => {
|
|
4489
|
+
if (!e.hasAttribute("type")) return !0;
|
|
4490
|
+
let t = e.getAttribute("type") ?? "";
|
|
4491
|
+
return t === "" ? !0 : Js.has(t.toLowerCase());
|
|
4492
|
+
}, $s = (e) => {
|
|
4493
|
+
let t = e;
|
|
4494
|
+
for (; t;) {
|
|
4495
|
+
if (t.hidden || t.getAttribute("aria-hidden") === "true") return !1;
|
|
4496
|
+
t = t.parentElement;
|
|
4497
|
+
}
|
|
4498
|
+
return !0;
|
|
4499
|
+
}, ec = (e) => {
|
|
4500
|
+
let t = [], n = (r) => {
|
|
4501
|
+
if (!(r !== e && (r instanceof HTMLInputElement || r instanceof HTMLElement && (r.hidden || r.getAttribute("aria-hidden") === "true")))) {
|
|
4502
|
+
if (r.nodeType === Node.TEXT_NODE) {
|
|
4503
|
+
r.textContent && t.push(r.textContent);
|
|
4504
|
+
return;
|
|
4505
|
+
}
|
|
4506
|
+
r.childNodes.forEach((e) => n(e));
|
|
4507
|
+
}
|
|
4508
|
+
};
|
|
4509
|
+
return n(e), t.join("").replace(/\s+/g, " ").trim();
|
|
4510
|
+
}, tc = (e = {}) => {
|
|
4511
|
+
if (typeof window > "u" || typeof document > "u") return Zs();
|
|
4512
|
+
let t = {
|
|
4513
|
+
...Ys,
|
|
4514
|
+
...e
|
|
4515
|
+
}, n = t.root ?? document, r = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new Set(), a = !1, o = 0, s = (e) => !(e instanceof HTMLInputElement) || !e.matches(t.inputSelector) || !Qs(e) || e.closest("[combobox]") || e.hasAttribute("combobox-input") ? !1 : n instanceof Document ? !0 : n instanceof Node ? n === e || n.contains(e) : !1, c = () => {
|
|
4516
|
+
let e = Xs(n.querySelectorAll(t.inputSelector)).filter(s);
|
|
4517
|
+
return n instanceof HTMLInputElement && s(n) ? [n, ...e.filter((e) => e !== n)] : e;
|
|
4518
|
+
}, l = (e) => {
|
|
4519
|
+
let t = /* @__PURE__ */ new Set(), r = (n) => {
|
|
4520
|
+
(n instanceof Document || n instanceof Element) && n.querySelectorAll(e).forEach((e) => {
|
|
4521
|
+
t.add(e);
|
|
4522
|
+
});
|
|
4523
|
+
};
|
|
4524
|
+
return r(n), typeof document < "u" && n !== document && r(document), Array.from(t);
|
|
4525
|
+
}, u = (e, t) => !e || e === t || t.contains(e) || !$s(e) || !ec(e) ? null : e, d = (e) => {
|
|
4526
|
+
if (!e.id) return [];
|
|
4527
|
+
let t = l(`label[for="${j(e.id)}"]`).filter((t) => t instanceof HTMLLabelElement && t.htmlFor === e.id);
|
|
4528
|
+
return e.labels && Array.from(e.labels).forEach((n) => {
|
|
4529
|
+
n.htmlFor === e.id && !t.includes(n) && t.push(n);
|
|
4530
|
+
}), t;
|
|
4531
|
+
}, f = (e) => {
|
|
4532
|
+
let t = e.closest("label");
|
|
4533
|
+
return !(t instanceof HTMLLabelElement) || t.htmlFor && t.htmlFor !== e.id ? null : t;
|
|
4534
|
+
}, p = (e) => e.id ? u(l(`[input-label][for="${j(e.id)}"]`).find((t) => t.getAttribute("for") === e.id), e) : null, m = (e) => e instanceof Document || e instanceof Element ? Xs(e.querySelectorAll(t.inputSelector)).filter((e) => e instanceof HTMLInputElement && Qs(e) && !e.closest("[combobox]") && !e.hasAttribute("combobox-input")) : [], h = (e) => {
|
|
4535
|
+
let t = e.parentElement?.closest("[input-label]");
|
|
4536
|
+
return !t || m(t).length !== 1 ? null : u(t, e);
|
|
4537
|
+
}, g = (e) => {
|
|
4538
|
+
let t = e.previousElementSibling;
|
|
4539
|
+
for (; t;) {
|
|
4540
|
+
if (t instanceof HTMLInputElement) return null;
|
|
4541
|
+
if (t instanceof HTMLElement) {
|
|
4542
|
+
if (t.matches("[input-label]")) return u(t, e);
|
|
4543
|
+
if (!t.querySelector("input")) {
|
|
4544
|
+
let n = u(t.querySelector("[input-label]"), e);
|
|
4545
|
+
if (n) return n;
|
|
4546
|
+
}
|
|
4547
|
+
}
|
|
4548
|
+
t = t.previousElementSibling;
|
|
4549
|
+
}
|
|
4550
|
+
return null;
|
|
4551
|
+
}, _ = (e) => {
|
|
4552
|
+
for (let t of d(e)) {
|
|
4553
|
+
let n = u(t, e);
|
|
4554
|
+
if (n) return n;
|
|
4555
|
+
}
|
|
4556
|
+
return u(f(e), e) || (p(e) ?? h(e) ?? g(e));
|
|
4557
|
+
}, v = (e, t) => {
|
|
4558
|
+
let n = r.get(e);
|
|
4559
|
+
return n?.attribute === t && e.getAttribute(t) === n.value;
|
|
4560
|
+
}, y = (e) => {
|
|
4561
|
+
let t = e.getAttribute("aria-label");
|
|
4562
|
+
if (t !== null && t.trim() !== "" && !v(e, "aria-label")) return !0;
|
|
4563
|
+
let n = e.getAttribute("aria-labelledby");
|
|
4564
|
+
return n !== null && n.trim() !== "" && !v(e, "aria-labelledby");
|
|
4565
|
+
}, b = (e) => {
|
|
4566
|
+
let t = r.get(e);
|
|
4567
|
+
t && (e.getAttribute(t.attribute) === t.value && e.removeAttribute(t.attribute), r.delete(e));
|
|
4568
|
+
}, x = (e) => {
|
|
4569
|
+
let t = r.get(e);
|
|
4570
|
+
if (!t) return;
|
|
4571
|
+
let n = e.getAttribute("aria-label"), i = e.getAttribute("aria-labelledby"), a = n !== null && n.trim() !== "" && !v(e, "aria-label"), o = i !== null && i.trim() !== "" && !v(e, "aria-labelledby");
|
|
4572
|
+
t.attribute === "aria-labelledby" && a && e.getAttribute("aria-labelledby") === t.value && e.removeAttribute("aria-labelledby"), t.attribute === "aria-label" && o && e.getAttribute("aria-label") === t.value && e.removeAttribute("aria-label"), r.delete(e);
|
|
4573
|
+
}, S = (e) => {
|
|
4574
|
+
if (e.id.trim()) return e.id;
|
|
4575
|
+
let t = "";
|
|
4576
|
+
do
|
|
4577
|
+
o += 1, t = `juice-input-label-${o}`;
|
|
4578
|
+
while (document.getElementById(t));
|
|
4579
|
+
return e.id = t, t;
|
|
4580
|
+
}, C = (e, t, n) => {
|
|
4581
|
+
let i = t === "aria-label" ? "aria-labelledby" : "aria-label", a = r.get(e);
|
|
4582
|
+
a?.attribute === i && e.getAttribute(i) === a.value && e.removeAttribute(i), e.getAttribute(t) !== n && e.setAttribute(t, n), r.set(e, {
|
|
4583
|
+
attribute: t,
|
|
4584
|
+
value: n
|
|
4585
|
+
});
|
|
4586
|
+
}, w = (e) => {
|
|
4587
|
+
if (!s(e)) return;
|
|
4588
|
+
if (y(e)) {
|
|
4589
|
+
x(e);
|
|
4590
|
+
return;
|
|
4591
|
+
}
|
|
4592
|
+
let t = _(e), n = t ? ec(t) : "";
|
|
4593
|
+
if (!t || !n) {
|
|
4594
|
+
b(e);
|
|
4595
|
+
return;
|
|
4596
|
+
}
|
|
4597
|
+
if (t.contains(e)) {
|
|
4598
|
+
C(e, "aria-label", n);
|
|
4599
|
+
return;
|
|
4600
|
+
}
|
|
4601
|
+
C(e, "aria-labelledby", S(t));
|
|
4602
|
+
}, T = () => {
|
|
4603
|
+
if (a) return;
|
|
4604
|
+
let e = c(), t = new Set(e);
|
|
4605
|
+
i.forEach((e) => {
|
|
4606
|
+
t.has(e) || (b(e), i.delete(e));
|
|
4607
|
+
}), e.forEach((e) => {
|
|
4608
|
+
i.add(e), w(e);
|
|
4609
|
+
});
|
|
4610
|
+
}, E = !1, D = 0, O = () => {
|
|
4611
|
+
E || a || (E = !0, D = requestAnimationFrame(() => {
|
|
4612
|
+
E = !1, T();
|
|
4613
|
+
}));
|
|
4614
|
+
}, k = typeof MutationObserver < "u" ? new MutationObserver(() => O()) : null;
|
|
4615
|
+
return k && n instanceof Node && k.observe(n, {
|
|
4616
|
+
childList: !0,
|
|
4617
|
+
subtree: !0,
|
|
4618
|
+
characterData: !0,
|
|
4619
|
+
attributes: !0,
|
|
4620
|
+
attributeFilter: [
|
|
4621
|
+
"input",
|
|
4622
|
+
"input-label",
|
|
4623
|
+
"type",
|
|
4624
|
+
"for",
|
|
4625
|
+
"id",
|
|
4626
|
+
"hidden",
|
|
4627
|
+
"aria-hidden",
|
|
4628
|
+
"aria-label",
|
|
4629
|
+
"aria-labelledby",
|
|
4630
|
+
"combobox",
|
|
4631
|
+
"combobox-input"
|
|
4632
|
+
]
|
|
4633
|
+
}), T(), {
|
|
4634
|
+
destroy: () => {
|
|
4635
|
+
a = !0, E &&= (cancelAnimationFrame(D), !1), k?.disconnect();
|
|
4636
|
+
},
|
|
4637
|
+
sync: T
|
|
4638
|
+
};
|
|
4639
|
+
}, nc = tc, rc = null, ic = !1, ac = null, oc = () => {
|
|
4640
|
+
!ac || typeof document > "u" || (document.removeEventListener("DOMContentLoaded", ac), ac = null);
|
|
4641
|
+
}, sc = () => typeof window > "u" || typeof document > "u" ? null : (ic = !1, oc(), rc ? (rc.sync(), rc) : (rc = tc(), rc)), cc = () => {
|
|
4642
|
+
ic = !0, oc(), rc?.destroy(), rc = null;
|
|
4643
|
+
};
|
|
4644
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (ac = () => {
|
|
4645
|
+
ac = null, ic || sc();
|
|
4646
|
+
}, document.addEventListener("DOMContentLoaded", ac)) : sc());
|
|
4647
|
+
//#endregion
|
|
4648
|
+
//#region src/js/src/textarea/textarea-runtime.ts
|
|
4649
|
+
var lc = {
|
|
4650
|
+
root: typeof document < "u" ? document : {},
|
|
4651
|
+
textareaSelector: "textarea[textarea]"
|
|
4652
|
+
}, uc = (e) => Array.from(e), dc = () => ({
|
|
4653
|
+
destroy: () => {},
|
|
4654
|
+
sync: () => {}
|
|
4655
|
+
}), fc = (e) => {
|
|
4656
|
+
let t = e;
|
|
4657
|
+
for (; t;) {
|
|
4658
|
+
if (t.hidden || t.getAttribute("aria-hidden") === "true") return !1;
|
|
4659
|
+
t = t.parentElement;
|
|
4660
|
+
}
|
|
4661
|
+
return !0;
|
|
4662
|
+
}, pc = (e) => {
|
|
4663
|
+
let t = [], n = (r) => {
|
|
4664
|
+
if (!(r !== e && (r instanceof HTMLTextAreaElement || r instanceof HTMLElement && (r.hidden || r.getAttribute("aria-hidden") === "true")))) {
|
|
4665
|
+
if (r.nodeType === Node.TEXT_NODE) {
|
|
4666
|
+
r.textContent && t.push(r.textContent);
|
|
4667
|
+
return;
|
|
4668
|
+
}
|
|
4669
|
+
r.childNodes.forEach((e) => n(e));
|
|
4670
|
+
}
|
|
4671
|
+
};
|
|
4672
|
+
return n(e), t.join("").replace(/\s+/g, " ").trim();
|
|
4673
|
+
}, mc = (e = {}) => {
|
|
4674
|
+
if (typeof window > "u" || typeof document > "u") return dc();
|
|
4675
|
+
let t = {
|
|
4676
|
+
...lc,
|
|
4677
|
+
...e
|
|
4678
|
+
}, n = t.root ?? document, r = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new Set(), a = !1, o = 0, s = (e) => !(e instanceof HTMLTextAreaElement) || !e.matches(t.textareaSelector) || e.closest("[combobox]") || e.hasAttribute("combobox-input") ? !1 : n instanceof Document ? !0 : n instanceof Node ? n === e || n.contains(e) : !1, c = () => {
|
|
4679
|
+
let e = uc(n.querySelectorAll(t.textareaSelector)).filter(s);
|
|
4680
|
+
return n instanceof HTMLTextAreaElement && s(n) ? [n, ...e.filter((e) => e !== n)] : e;
|
|
4681
|
+
}, l = (e) => {
|
|
4682
|
+
let t = /* @__PURE__ */ new Set(), r = (n) => {
|
|
4683
|
+
(n instanceof Document || n instanceof Element) && n.querySelectorAll(e).forEach((e) => {
|
|
4684
|
+
t.add(e);
|
|
4685
|
+
});
|
|
4686
|
+
};
|
|
4687
|
+
return r(n), typeof document < "u" && n !== document && r(document), Array.from(t);
|
|
4688
|
+
}, u = (e, t) => !e || e === t || t.contains(e) || !fc(e) || !pc(e) ? null : e, d = (e) => {
|
|
4689
|
+
if (!e.id) return [];
|
|
4690
|
+
let t = l(`label[for="${j(e.id)}"]`).filter((t) => t instanceof HTMLLabelElement && t.htmlFor === e.id);
|
|
4691
|
+
return e.labels && Array.from(e.labels).forEach((n) => {
|
|
4692
|
+
n.htmlFor === e.id && !t.includes(n) && t.push(n);
|
|
4693
|
+
}), t;
|
|
4694
|
+
}, f = (e) => {
|
|
4695
|
+
let t = e.closest("label");
|
|
4696
|
+
return !(t instanceof HTMLLabelElement) || t.htmlFor && t.htmlFor !== e.id ? null : t;
|
|
4697
|
+
}, p = (e) => e.id ? u(l(`[textarea-label][for="${j(e.id)}"]`).find((t) => t.getAttribute("for") === e.id), e) : null, m = (e) => e instanceof Document || e instanceof Element ? uc(e.querySelectorAll(t.textareaSelector)).filter((e) => e instanceof HTMLTextAreaElement && !e.closest("[combobox]") && !e.hasAttribute("combobox-input")) : [], h = (e) => {
|
|
4698
|
+
let t = e.parentElement?.closest("[textarea-label]");
|
|
4699
|
+
return !t || m(t).length !== 1 ? null : u(t, e);
|
|
4700
|
+
}, g = (e) => {
|
|
4701
|
+
let t = e.previousElementSibling;
|
|
4702
|
+
for (; t;) {
|
|
4703
|
+
if (t instanceof HTMLTextAreaElement) return null;
|
|
4704
|
+
if (t instanceof HTMLElement) {
|
|
4705
|
+
if (t.matches("[textarea-label]")) return u(t, e);
|
|
4706
|
+
if (!t.querySelector("textarea")) {
|
|
4707
|
+
let n = u(t.querySelector("[textarea-label]"), e);
|
|
4708
|
+
if (n) return n;
|
|
4709
|
+
}
|
|
4710
|
+
}
|
|
4711
|
+
t = t.previousElementSibling;
|
|
4712
|
+
}
|
|
4713
|
+
return null;
|
|
4714
|
+
}, _ = (e) => {
|
|
4715
|
+
for (let t of d(e)) {
|
|
4716
|
+
let n = u(t, e);
|
|
4717
|
+
if (n) return n;
|
|
4718
|
+
}
|
|
4719
|
+
return u(f(e), e) || (p(e) ?? h(e) ?? g(e));
|
|
4720
|
+
}, v = (e, t) => {
|
|
4721
|
+
let n = r.get(e);
|
|
4722
|
+
return n?.attribute === t && e.getAttribute(t) === n.value;
|
|
4723
|
+
}, y = (e) => {
|
|
4724
|
+
let t = e.getAttribute("aria-label");
|
|
4725
|
+
if (t !== null && t.trim() !== "" && !v(e, "aria-label")) return !0;
|
|
4726
|
+
let n = e.getAttribute("aria-labelledby");
|
|
4727
|
+
return n !== null && n.trim() !== "" && !v(e, "aria-labelledby");
|
|
4728
|
+
}, b = (e) => {
|
|
4729
|
+
let t = r.get(e);
|
|
4730
|
+
t && (e.getAttribute(t.attribute) === t.value && e.removeAttribute(t.attribute), r.delete(e));
|
|
4731
|
+
}, x = (e) => {
|
|
4732
|
+
let t = r.get(e);
|
|
4733
|
+
if (!t) return;
|
|
4734
|
+
let n = e.getAttribute("aria-label"), i = e.getAttribute("aria-labelledby"), a = n !== null && n.trim() !== "" && !v(e, "aria-label"), o = i !== null && i.trim() !== "" && !v(e, "aria-labelledby");
|
|
4735
|
+
t.attribute === "aria-labelledby" && a && e.getAttribute("aria-labelledby") === t.value && e.removeAttribute("aria-labelledby"), t.attribute === "aria-label" && o && e.getAttribute("aria-label") === t.value && e.removeAttribute("aria-label"), r.delete(e);
|
|
4736
|
+
}, S = (e) => {
|
|
4737
|
+
if (e.id.trim()) return e.id;
|
|
4738
|
+
let t = "";
|
|
4739
|
+
do
|
|
4740
|
+
o += 1, t = `juice-textarea-label-${o}`;
|
|
4741
|
+
while (document.getElementById(t));
|
|
4742
|
+
return e.id = t, t;
|
|
4743
|
+
}, C = (e, t, n) => {
|
|
4744
|
+
let i = t === "aria-label" ? "aria-labelledby" : "aria-label", a = r.get(e);
|
|
4745
|
+
a?.attribute === i && e.getAttribute(i) === a.value && e.removeAttribute(i), e.getAttribute(t) !== n && e.setAttribute(t, n), r.set(e, {
|
|
4746
|
+
attribute: t,
|
|
4747
|
+
value: n
|
|
4748
|
+
});
|
|
4749
|
+
}, w = (e) => {
|
|
4750
|
+
if (!s(e)) return;
|
|
4751
|
+
if (y(e)) {
|
|
4752
|
+
x(e);
|
|
4753
|
+
return;
|
|
4754
|
+
}
|
|
4755
|
+
let t = _(e), n = t ? pc(t) : "";
|
|
4756
|
+
if (!t || !n) {
|
|
4757
|
+
b(e);
|
|
4758
|
+
return;
|
|
4759
|
+
}
|
|
4760
|
+
if (t.contains(e)) {
|
|
4761
|
+
C(e, "aria-label", n);
|
|
4762
|
+
return;
|
|
4763
|
+
}
|
|
4764
|
+
C(e, "aria-labelledby", S(t));
|
|
4765
|
+
}, T = () => {
|
|
4766
|
+
if (a) return;
|
|
4767
|
+
let e = c(), t = new Set(e);
|
|
4768
|
+
i.forEach((e) => {
|
|
4769
|
+
t.has(e) || (b(e), i.delete(e));
|
|
4770
|
+
}), e.forEach((e) => {
|
|
4771
|
+
i.add(e), w(e);
|
|
4772
|
+
});
|
|
4773
|
+
}, E = !1, D = 0, O = () => {
|
|
4774
|
+
E || a || (E = !0, D = requestAnimationFrame(() => {
|
|
4775
|
+
E = !1, T();
|
|
4776
|
+
}));
|
|
4777
|
+
}, k = typeof MutationObserver < "u" ? new MutationObserver(() => O()) : null;
|
|
4778
|
+
return k && n instanceof Node && k.observe(n, {
|
|
4779
|
+
childList: !0,
|
|
4780
|
+
subtree: !0,
|
|
4781
|
+
characterData: !0,
|
|
4782
|
+
attributes: !0,
|
|
4783
|
+
attributeFilter: [
|
|
4784
|
+
"textarea",
|
|
4785
|
+
"textarea-label",
|
|
4786
|
+
"for",
|
|
4787
|
+
"id",
|
|
4788
|
+
"hidden",
|
|
4789
|
+
"aria-hidden",
|
|
4790
|
+
"aria-label",
|
|
4791
|
+
"aria-labelledby",
|
|
4792
|
+
"combobox",
|
|
4793
|
+
"combobox-input"
|
|
4794
|
+
]
|
|
4795
|
+
}), T(), {
|
|
4796
|
+
destroy: () => {
|
|
4797
|
+
a = !0, E &&= (cancelAnimationFrame(D), !1), k?.disconnect();
|
|
4798
|
+
},
|
|
4799
|
+
sync: T
|
|
4800
|
+
};
|
|
4801
|
+
}, hc = mc, gc = null, _c = !1, vc = null, yc = () => {
|
|
4802
|
+
!vc || typeof document > "u" || (document.removeEventListener("DOMContentLoaded", vc), vc = null);
|
|
4803
|
+
}, bc = () => typeof window > "u" || typeof document > "u" ? null : (_c = !1, yc(), gc ? (gc.sync(), gc) : (gc = mc(), gc)), xc = () => {
|
|
4804
|
+
_c = !0, yc(), gc?.destroy(), gc = null;
|
|
4805
|
+
};
|
|
4806
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (vc = () => {
|
|
4807
|
+
vc = null, _c || bc();
|
|
4808
|
+
}, document.addEventListener("DOMContentLoaded", vc)) : bc());
|
|
4809
|
+
//#endregion
|
|
4810
|
+
//#region src/js/src/field/field-runtime.ts
|
|
4811
|
+
var Sc = "input, textarea, select", Cc = "[field-help], [field-error]", wc = {
|
|
4812
|
+
root: typeof document < "u" ? document : {},
|
|
4813
|
+
fieldSelector: "[field]"
|
|
4814
|
+
}, Tc = (e) => Array.from(e), Ec = () => ({
|
|
4815
|
+
destroy: () => {},
|
|
4816
|
+
sync: () => {}
|
|
4817
|
+
}), Dc = (e) => e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement, Oc = (e) => {
|
|
4818
|
+
let t = e;
|
|
4819
|
+
for (; t;) {
|
|
4820
|
+
if (t.hidden || t.getAttribute("aria-hidden") === "true") return !1;
|
|
4821
|
+
t = t.parentElement;
|
|
4822
|
+
}
|
|
4823
|
+
return !0;
|
|
4824
|
+
}, kc = (e) => {
|
|
4825
|
+
let t = [], n = (r) => {
|
|
4826
|
+
if (!(r !== e && r instanceof HTMLElement && (r.hidden || r.getAttribute("aria-hidden") === "true"))) {
|
|
4827
|
+
if (r.nodeType === Node.TEXT_NODE) {
|
|
4828
|
+
r.textContent && t.push(r.textContent);
|
|
4829
|
+
return;
|
|
4830
|
+
}
|
|
4831
|
+
r.childNodes.forEach((e) => n(e));
|
|
4832
|
+
}
|
|
4833
|
+
};
|
|
4834
|
+
return n(e), t.join("").replace(/\s+/g, " ").trim();
|
|
4835
|
+
}, Ac = (e) => (e ?? "").trim().split(/\s+/).filter(Boolean), jc = (e = {}) => {
|
|
4836
|
+
if (typeof window > "u" || typeof document > "u") return Ec();
|
|
4837
|
+
let t = {
|
|
4838
|
+
...wc,
|
|
4839
|
+
...e
|
|
4840
|
+
}, n = t.root ?? document, r = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakSet(), a = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), d = !1, f = 0, p = (e) => !(e instanceof HTMLElement) || !e.matches(t.fieldSelector) ? !1 : n instanceof Document ? !0 : n instanceof Node ? n === e || n.contains(e) : !1, m = () => {
|
|
4841
|
+
let e = Tc(n.querySelectorAll(t.fieldSelector)).filter(p);
|
|
4842
|
+
return n instanceof HTMLElement && p(n) ? [n, ...e.filter((e) => e !== n)] : e;
|
|
4843
|
+
}, h = (e) => e.parentElement?.closest(t.fieldSelector) ?? null, g = (e) => {
|
|
4844
|
+
let t = e.querySelectorAll(Sc);
|
|
4845
|
+
for (let n of t) if (Dc(n) && h(n) === e) return n;
|
|
4846
|
+
return null;
|
|
4847
|
+
}, _ = (e, t) => {
|
|
4848
|
+
let n = [];
|
|
4849
|
+
return e.querySelectorAll(Cc).forEach((r) => {
|
|
4850
|
+
h(r) === e && (r === t || r.contains(t) || t.contains(r) || Oc(r) && kc(r) && n.push(r));
|
|
4851
|
+
}), n;
|
|
4852
|
+
}, v = (e) => {
|
|
4853
|
+
let t = r.get(e);
|
|
4854
|
+
return t !== void 0 && e.getAttribute("aria-describedby") === t;
|
|
4855
|
+
}, y = (e) => {
|
|
4856
|
+
let t = e.getAttribute("aria-describedby");
|
|
4857
|
+
return t === null || t.trim() === "" ? !1 : !v(e);
|
|
4858
|
+
}, b = (e) => {
|
|
4859
|
+
let t = e.getAttribute("aria-invalid");
|
|
4860
|
+
return t === null || t.trim() === "" ? !1 : !(i.has(e) && t === "true");
|
|
4861
|
+
}, x = (e) => {
|
|
4862
|
+
let t = r.get(e);
|
|
4863
|
+
t !== void 0 && (e.getAttribute("aria-describedby") === t && e.removeAttribute("aria-describedby"), r.delete(e));
|
|
4864
|
+
}, S = (e) => {
|
|
4865
|
+
i.has(e) && (e.getAttribute("aria-invalid") === "true" && e.removeAttribute("aria-invalid"), i.delete(e));
|
|
4866
|
+
}, C = (e, t) => {
|
|
4867
|
+
s.get(t) === e && (x(t), S(t), s.delete(t));
|
|
4868
|
+
}, w = (e) => {
|
|
4869
|
+
let t = c.get(e);
|
|
4870
|
+
c.delete(e), t?.control && C(e, t.control);
|
|
4871
|
+
}, T = (e) => {
|
|
4872
|
+
let t = e.id.trim();
|
|
4873
|
+
if (t) {
|
|
4874
|
+
let n = a.get(e);
|
|
4875
|
+
return n && n !== t && (a.delete(e), o.delete(e)), t;
|
|
4876
|
+
}
|
|
4877
|
+
let n = "";
|
|
4878
|
+
do
|
|
4879
|
+
f += 1, n = `juice-field-desc-${f}`;
|
|
4880
|
+
while (document.getElementById(n));
|
|
4881
|
+
return e.id = n, a.set(e, n), o.add(e), n;
|
|
4882
|
+
}, E = (e) => {
|
|
4883
|
+
let t = document.querySelectorAll("[aria-describedby]");
|
|
4884
|
+
for (let n of t) if (Ac(n.getAttribute("aria-describedby")).includes(e)) return !0;
|
|
4885
|
+
return !1;
|
|
4886
|
+
}, D = () => {
|
|
4887
|
+
for (let e of [...o]) {
|
|
4888
|
+
if (u.has(e)) continue;
|
|
4889
|
+
let t = a.get(e);
|
|
4890
|
+
a.delete(e), o.delete(e), !(!t || e.id !== t) && (e.isConnected && E(t) || e.removeAttribute("id"));
|
|
4891
|
+
}
|
|
4892
|
+
}, O = (e) => {
|
|
4893
|
+
let t = g(e), n = c.get(e);
|
|
4894
|
+
if (n?.control && n.control !== t && C(e, n.control), !t) {
|
|
4895
|
+
c.set(e, { control: null });
|
|
4896
|
+
return;
|
|
4897
|
+
}
|
|
4898
|
+
if (s.set(t, e), y(t)) r.delete(t);
|
|
4899
|
+
else {
|
|
4900
|
+
let n = [];
|
|
4901
|
+
for (let r of _(e, t)) {
|
|
4902
|
+
let e = T(r);
|
|
4903
|
+
u.add(r), n.includes(e) || n.push(e);
|
|
4904
|
+
}
|
|
4905
|
+
if (n.length) {
|
|
4906
|
+
let e = n.join(" ");
|
|
4907
|
+
t.getAttribute("aria-describedby") !== e && t.setAttribute("aria-describedby", e), r.set(t, e);
|
|
4908
|
+
} else x(t);
|
|
4909
|
+
}
|
|
4910
|
+
e.hasAttribute("invalid") ? b(t) ? i.has(t) && t.getAttribute("aria-invalid") !== "true" && i.delete(t) : (t.getAttribute("aria-invalid") !== "true" && t.setAttribute("aria-invalid", "true"), i.add(t)) : S(t), c.set(e, { control: t });
|
|
4911
|
+
}, k = () => {
|
|
4912
|
+
if (d) return;
|
|
4913
|
+
let e = m(), t = new Set(e);
|
|
4914
|
+
u = /* @__PURE__ */ new Set(), l.forEach((e) => {
|
|
4915
|
+
t.has(e) || (w(e), l.delete(e));
|
|
4916
|
+
}), e.forEach((e) => {
|
|
4917
|
+
l.add(e), O(e);
|
|
4918
|
+
}), D();
|
|
4919
|
+
}, A = !1, j = 0, M = () => {
|
|
4920
|
+
A || d || (A = !0, j = requestAnimationFrame(() => {
|
|
4921
|
+
A = !1, k();
|
|
4922
|
+
}));
|
|
4923
|
+
}, N = typeof MutationObserver < "u" ? new MutationObserver(() => M()) : null;
|
|
4924
|
+
return N && n instanceof Node && N.observe(n, {
|
|
4925
|
+
childList: !0,
|
|
4926
|
+
subtree: !0,
|
|
4927
|
+
characterData: !0,
|
|
4928
|
+
attributes: !0,
|
|
4929
|
+
attributeFilter: [
|
|
4930
|
+
"field",
|
|
4931
|
+
"field-help",
|
|
4932
|
+
"field-error",
|
|
4933
|
+
"invalid",
|
|
4934
|
+
"hidden",
|
|
4935
|
+
"aria-hidden",
|
|
4936
|
+
"aria-describedby",
|
|
4937
|
+
"aria-invalid",
|
|
4938
|
+
"id"
|
|
4939
|
+
]
|
|
4940
|
+
}), k(), {
|
|
4941
|
+
destroy: () => {
|
|
4942
|
+
if (!d) {
|
|
4943
|
+
d = !0, A &&= (cancelAnimationFrame(j), !1), N?.disconnect();
|
|
4944
|
+
for (let e of [...l]) w(e);
|
|
4945
|
+
l.clear(), u = /* @__PURE__ */ new Set(), D();
|
|
4946
|
+
}
|
|
4947
|
+
},
|
|
4948
|
+
sync: k
|
|
4949
|
+
};
|
|
4950
|
+
}, Mc = jc, Nc = null, Pc = !1, Fc = null, Ic = () => {
|
|
4951
|
+
!Fc || typeof document > "u" || (document.removeEventListener("DOMContentLoaded", Fc), Fc = null);
|
|
4952
|
+
}, Lc = () => typeof window > "u" || typeof document > "u" ? null : (Pc = !1, Ic(), Nc ? (Nc.sync(), Nc) : (Nc = jc(), Nc)), Rc = () => {
|
|
4953
|
+
Pc = !0, Ic(), Nc?.destroy(), Nc = null;
|
|
3693
4954
|
};
|
|
3694
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
3695
|
-
|
|
3696
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
4955
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (Fc = () => {
|
|
4956
|
+
Fc = null, Pc || Lc();
|
|
4957
|
+
}, document.addEventListener("DOMContentLoaded", Fc)) : Lc());
|
|
3697
4958
|
//#endregion
|
|
3698
4959
|
//#region src/tokens/index.ts
|
|
3699
|
-
var
|
|
4960
|
+
var zc = {
|
|
3700
4961
|
colors: {
|
|
3701
4962
|
families: [
|
|
3702
4963
|
"black",
|
|
@@ -3864,4 +5125,4 @@ var go = {
|
|
|
3864
5125
|
themes: {}
|
|
3865
5126
|
};
|
|
3866
5127
|
//#endregion
|
|
3867
|
-
export { v as Accordion,
|
|
5128
|
+
export { v as Accordion, me as createAccordion, Jr as createBanner, ao as createBreadcrumb, wa as createCheckbox, Ar as createCombobox, hs as createDisclosure, gt as createDrawer, re as createElementMotion, jc as createField, tc as createInput, mi as createMenu, $e as createModal, V as createMotionCancelToken, T as createNavigation, Yo as createPagination, pn as createPopover, Eo as createProgress, Wa as createRadio, Bs as createSelect, oa as createSlider, Ds as createSpinner, Mi as createSwitch, Ae as createTabs, mc as createTextarea, Rt as createToast, zn as createTooltip, or as createWizard, he as initAccordion, Yr as initBanner, oo as initBreadcrumb, Ta as initCheckbox, jr as initCombobox, gs as initDisclosure, _t as initDrawer, Mc as initField, nc as initInput, hi as initMenu, et as initModal, E as initNavigation, Xo as initPagination, mn as initPopover, Do as initProgress, Ga as initRadio, Vs as initSelect, sa as initSlider, Os as initSpinner, Ni as initSwitch, je as initTabs, hc as initTextarea, zt as initToast, Bn as initTooltip, sr as initWizard, z as prefersReducedMotion, ne as runMotion, be as startAccordionRuntime, ei as startBannerRuntime, fo as startBreadcrumbRuntime, Aa as startCheckboxRuntime, Ir as startComboboxRuntime, xs as startDisclosureRuntime, St as startDrawerRuntime, Lc as startFieldRuntime, sc as startInputRuntime, bi as startMenuRuntime, at as startModalRuntime, O as startNavigationRuntime, ts as startPaginationRuntime, yn as startPopoverRuntime, Mo as startProgressRuntime, Xa as startRadioRuntime, Ks as startSelectRuntime, fa as startSliderRuntime, Ns as startSpinnerRuntime, Ri as startSwitchRuntime, Ie as startTabsRuntime, bc as startTextareaRuntime, Wt as startToastRuntime, Gn as startTooltipRuntime, fr as startWizardRuntime, xe as stopAccordionRuntime, ti as stopBannerRuntime, po as stopBreadcrumbRuntime, ja as stopCheckboxRuntime, Lr as stopComboboxRuntime, Ss as stopDisclosureRuntime, Ct as stopDrawerRuntime, Rc as stopFieldRuntime, cc as stopInputRuntime, xi as stopMenuRuntime, ot as stopModalRuntime, k as stopNavigationRuntime, ns as stopPaginationRuntime, bn as stopPopoverRuntime, No as stopProgressRuntime, Za as stopRadioRuntime, qs as stopSelectRuntime, pa as stopSliderRuntime, Ps as stopSpinnerRuntime, zi as stopSwitchRuntime, Le as stopTabsRuntime, xc as stopTextareaRuntime, Gt as stopToastRuntime, Kn as stopTooltipRuntime, pr as stopWizardRuntime, B as subscribeReducedMotion, zc as tokens };
|