@webority/ui-elements 0.14.0 → 0.16.0

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.
@@ -542,7 +542,154 @@ var g = Symbol("wui.trustedHtml"), _ = (e) => String(e ?? "").replace(/&/g, "&am
542
542
  disconnectedCallback() {
543
543
  this._teardown();
544
544
  }
545
- }, C = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), w = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), T = {
545
+ }, C = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), w = (e) => String(e ?? "").replace(/<[^>]*>/g, "");
546
+ //#endregion
547
+ //#region src/textMatch.js
548
+ function T(e, t) {
549
+ let n = String(e ?? ""), r = String(t ?? "").trim();
550
+ if (!r || !n) return [{
551
+ text: n,
552
+ match: !1
553
+ }];
554
+ let i = n.toLowerCase(), a = r.toLowerCase();
555
+ if (i.length !== n.length) return [{
556
+ text: n,
557
+ match: !1
558
+ }];
559
+ let o = [], s = 0, c = i.indexOf(a, s);
560
+ for (; c !== -1;) c > s && o.push({
561
+ text: n.slice(s, c),
562
+ match: !1
563
+ }), o.push({
564
+ text: n.slice(c, c + a.length),
565
+ match: !0
566
+ }), s = c + a.length, c = i.indexOf(a, s);
567
+ return s < n.length && o.push({
568
+ text: n.slice(s),
569
+ match: !1
570
+ }), o;
571
+ }
572
+ //#endregion
573
+ //#region src/WuiCommandPalette.js
574
+ var E = "[role=\"option\"]", D = "No results", ee = class extends e {
575
+ static get observedAttributes() {
576
+ return [
577
+ "filter",
578
+ "highlight",
579
+ "empty-text"
580
+ ];
581
+ }
582
+ constructor() {
583
+ super(), this._activeId = null, this._lastQuery = null, this._onKeyDown = (e) => this._handleKeyDown(e), this._onClick = (e) => {
584
+ let t = this._optionFrom(e.target);
585
+ t && this._select(t);
586
+ }, this._onMouseDown = (e) => {
587
+ this._optionFrom(e.target) && e.preventDefault();
588
+ }, this._onMouseMove = (e) => {
589
+ let t = this._optionFrom(e.target);
590
+ t && t.id !== this._activeId && this._setActive(t, !1);
591
+ }, this._onInput = (e) => {
592
+ !this.hasAttribute("filter") || e.target !== this._input() || (this._applyFilter(), this.refresh());
593
+ };
594
+ }
595
+ connectedCallback() {
596
+ this._teardown(), this.addEventListener("keydown", this._onKeyDown), this.addEventListener("click", this._onClick), this.addEventListener("mousedown", this._onMouseDown), this.addEventListener("mousemove", this._onMouseMove), this.addEventListener("input", this._onInput), this.hasAttribute("filter") && this._applyFilter(), this.refresh();
597
+ }
598
+ disconnectedCallback() {
599
+ this._teardown();
600
+ }
601
+ attributeChangedCallback() {
602
+ this.isConnected && (this.hasAttribute("filter") && this._applyFilter(), this.refresh());
603
+ }
604
+ get filter() {
605
+ return this.hasAttribute("filter");
606
+ }
607
+ set filter(e) {
608
+ this.toggleAttribute("filter", !!e);
609
+ }
610
+ get highlight() {
611
+ return this.getAttribute("highlight") !== "false";
612
+ }
613
+ set highlight(e) {
614
+ this.setAttribute("highlight", e ? "true" : "false");
615
+ }
616
+ get emptyText() {
617
+ return this.getAttribute("empty-text") ?? D;
618
+ }
619
+ set emptyText(e) {
620
+ this.setAttribute("empty-text", String(e ?? ""));
621
+ }
622
+ refresh() {
623
+ let e = this._input(), t = e ? e.value : "", n = t !== this._lastQuery;
624
+ this._lastQuery = t;
625
+ let r = this._visibleOptions(), i = n ? null : r.find((e) => e.id === this._activeId);
626
+ this._setActive(i ?? r[0] ?? null, n);
627
+ }
628
+ _input() {
629
+ return this.querySelector("[role=\"combobox\"]");
630
+ }
631
+ _optionFrom(e) {
632
+ let t = e?.closest?.(E);
633
+ return t && this.contains(t) && !this._isHidden(t) ? t : null;
634
+ }
635
+ _isHidden(e) {
636
+ return e.hidden || !!e.closest("[role=\"group\"]")?.hidden;
637
+ }
638
+ _visibleOptions() {
639
+ return [...this.querySelectorAll(E)].filter((e) => !this._isHidden(e));
640
+ }
641
+ _setActive(e, t) {
642
+ this._activeId = e ? e.id : null;
643
+ for (let t of this.querySelectorAll(E)) t.setAttribute("aria-selected", t === e ? "true" : "false");
644
+ let n = this._input();
645
+ n && (e ? n.setAttribute("aria-activedescendant", e.id) : n.removeAttribute("aria-activedescendant")), e && t && e.scrollIntoView({ block: "nearest" });
646
+ }
647
+ _move(e) {
648
+ let t = this._visibleOptions();
649
+ if (!t.length) return;
650
+ let n = t.findIndex((e) => e.id === this._activeId), r = n < 0 ? e > 0 ? 0 : t.length - 1 : (n + e + t.length) % t.length;
651
+ this._setActive(t[r], !0);
652
+ }
653
+ _handleKeyDown(e) {
654
+ if (e.target === this._input()) {
655
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") e.preventDefault(), this._move(e.key === "ArrowDown" ? 1 : -1);
656
+ else if (e.key === "Enter" && !e.isComposing) {
657
+ let t = this._visibleOptions().find((e) => e.id === this._activeId);
658
+ if (!t) return;
659
+ e.preventDefault(), this._select(t);
660
+ }
661
+ }
662
+ }
663
+ _select(e) {
664
+ this.dispatchEvent(new CustomEvent("wui-command-palette:select", {
665
+ bubbles: !0,
666
+ cancelable: !0,
667
+ detail: {
668
+ key: e.dataset.key ?? null,
669
+ groupKey: e.dataset.groupKey ?? null,
670
+ id: e.id
671
+ }
672
+ })) && e.dataset.href && this._navigate(e.dataset.href);
673
+ }
674
+ _navigate(e) {
675
+ window.location.assign(e);
676
+ }
677
+ _applyFilter() {
678
+ let e = this._input(), t = (e ? e.value : "").trim(), n = t.toLowerCase(), r = this.highlight, i = 0;
679
+ for (let e of this.querySelectorAll(E)) {
680
+ let a = e.querySelector(".wui-cmd-item-label"), o = e.dataset.label ?? a?.textContent ?? "", s = !n || o.toLowerCase().includes(n);
681
+ e.hidden = !s, s && i++, a && (a.innerHTML = T(o, r ? t : "").map((e) => e.match ? `<mark class="wui-cmd-mark">${_(e.text)}</mark>` : _(e.text)).join(""));
682
+ }
683
+ for (let e of this.querySelectorAll("[role=\"group\"]")) e.hidden = ![...e.querySelectorAll(E)].some((e) => !e.hidden);
684
+ let a = this.querySelector("[role=\"listbox\"]");
685
+ a && (a.hidden = i === 0);
686
+ let o = this.querySelector(".wui-cmd-empty");
687
+ o && (o.textContent = n && i === 0 ? this.emptyText : "");
688
+ }
689
+ _teardown() {
690
+ this.removeEventListener("keydown", this._onKeyDown), this.removeEventListener("click", this._onClick), this.removeEventListener("mousedown", this._onMouseDown), this.removeEventListener("mousemove", this._onMouseMove), this.removeEventListener("input", this._onInput);
691
+ }
692
+ }, te = {
546
693
  "--color-primary": "#4F46E5",
547
694
  "--color-primary-hover": "#4338CA",
548
695
  "--color-text": "#071437",
@@ -552,21 +699,21 @@ var g = Symbol("wui.trustedHtml"), _ = (e) => String(e ?? "").replace(/&/g, "&am
552
699
  "--wui-radius-lg": "14px",
553
700
  "--wui-shadow-overlay-lg": "0 24px 60px -16px rgba(7, 20, 55, 0.28)",
554
701
  "--wui-z-fixed": "1030"
555
- }, E = (e) => `var(${e}, ${T[e]})`, D = `
702
+ }, O = (e) => `var(${e}, ${te[e]})`, ne = `
556
703
  :host {
557
704
  all: initial;
558
705
  position: fixed;
559
706
  bottom: 20px;
560
707
  left: 20px;
561
708
  right: auto;
562
- z-index: ${E("--wui-z-fixed")};
709
+ z-index: ${O("--wui-z-fixed")};
563
710
  display: block;
564
711
  width: 420px;
565
712
  max-width: calc(100vw - 40px);
566
713
  font-family: inherit;
567
714
  font-size: 16px;
568
715
  line-height: 1.5;
569
- color: ${E("--color-text")};
716
+ color: ${O("--color-text")};
570
717
  }
571
718
  :host([position="bottom-right"]) {
572
719
  right: 20px;
@@ -584,10 +731,10 @@ var g = Symbol("wui.trustedHtml"), _ = (e) => String(e ?? "").replace(/&/g, "&am
584
731
 
585
732
  .wui-consent-banner-panel {
586
733
  padding: 20px;
587
- background: ${E("--color-surface")};
588
- border: 1px solid ${E("--color-border")};
589
- border-radius: ${E("--wui-radius-lg")};
590
- box-shadow: ${E("--wui-shadow-overlay-lg")};
734
+ background: ${O("--color-surface")};
735
+ border: 1px solid ${O("--color-border")};
736
+ border-radius: ${O("--wui-radius-lg")};
737
+ box-shadow: ${O("--wui-shadow-overlay-lg")};
591
738
  text-align: start;
592
739
  pointer-events: auto;
593
740
  }
@@ -596,16 +743,16 @@ var g = Symbol("wui.trustedHtml"), _ = (e) => String(e ?? "").replace(/&/g, "&am
596
743
  font-size: 18px;
597
744
  font-weight: 600;
598
745
  line-height: 1.3;
599
- color: ${E("--color-text")};
746
+ color: ${O("--color-text")};
600
747
  }
601
748
  .wui-consent-banner-description {
602
749
  margin: 0 0 16px;
603
750
  font-size: 14px;
604
751
  line-height: 1.5;
605
- color: ${E("--color-text-muted")};
752
+ color: ${O("--color-text-muted")};
606
753
  }
607
754
  .wui-consent-banner-policy {
608
- color: ${E("--color-primary")};
755
+ color: ${O("--color-primary")};
609
756
  font-weight: 500;
610
757
  }
611
758
 
@@ -616,15 +763,15 @@ var g = Symbol("wui.trustedHtml"), _ = (e) => String(e ?? "").replace(/&/g, "&am
616
763
  margin: 0 0 16px;
617
764
  padding: 12px 0;
618
765
  overflow-y: auto;
619
- border-top: 1px solid ${E("--color-border")};
620
- border-bottom: 1px solid ${E("--color-border")};
766
+ border-top: 1px solid ${O("--color-border")};
767
+ border-bottom: 1px solid ${O("--color-border")};
621
768
  }
622
769
  .wui-consent-banner-category-description {
623
770
  margin: 2px 0 0;
624
771
  padding-inline-start: 2.5em;
625
772
  font-size: 12px;
626
773
  line-height: 1.4;
627
- color: ${E("--color-text-muted")};
774
+ color: ${O("--color-text-muted")};
628
775
  }
629
776
 
630
777
  .form-check {
@@ -642,20 +789,20 @@ var g = Symbol("wui.trustedHtml"), _ = (e) => String(e ?? "").replace(/&/g, "&am
642
789
  margin: 0;
643
790
  border: 1px solid rgba(0, 0, 0, 0.25);
644
791
  border-radius: 2em;
645
- background: ${E("--color-surface")} radial-gradient(circle, rgba(0, 0, 0, 0.25) 0.35em, transparent 0.4em) left / 1em 1em no-repeat;
792
+ background: ${O("--color-surface")} radial-gradient(circle, rgba(0, 0, 0, 0.25) 0.35em, transparent 0.4em) left / 1em 1em no-repeat;
646
793
  cursor: pointer;
647
794
  transition: background-position 0.15s ease-in-out;
648
795
  }
649
796
  .form-check-input:checked {
650
- border-color: ${E("--color-primary")};
651
- background: ${E("--color-primary")} radial-gradient(circle, #fff 0.35em, transparent 0.4em) right / 1em 1em no-repeat;
797
+ border-color: ${O("--color-primary")};
798
+ background: ${O("--color-primary")} radial-gradient(circle, #fff 0.35em, transparent 0.4em) right / 1em 1em no-repeat;
652
799
  }
653
800
  .form-check-input:disabled {
654
801
  opacity: 0.5;
655
802
  cursor: default;
656
803
  }
657
804
  .form-check-input:focus-visible {
658
- outline: 2px solid ${E("--color-primary")};
805
+ outline: 2px solid ${O("--color-primary")};
659
806
  outline-offset: 2px;
660
807
  }
661
808
  .form-check-label {
@@ -684,33 +831,33 @@ var g = Symbol("wui.trustedHtml"), _ = (e) => String(e ?? "").replace(/&/g, "&am
684
831
  cursor: pointer;
685
832
  }
686
833
  .btn:focus-visible {
687
- outline: 2px solid ${E("--color-primary")};
834
+ outline: 2px solid ${O("--color-primary")};
688
835
  outline-offset: 2px;
689
836
  }
690
837
  .btn-primary {
691
- background: ${E("--color-primary")};
692
- border-color: ${E("--color-primary")};
838
+ background: ${O("--color-primary")};
839
+ border-color: ${O("--color-primary")};
693
840
  color: #fff;
694
841
  }
695
842
  .btn-primary:hover {
696
- background: ${E("--color-primary-hover")};
697
- border-color: ${E("--color-primary-hover")};
843
+ background: ${O("--color-primary-hover")};
844
+ border-color: ${O("--color-primary-hover")};
698
845
  }
699
846
  .btn-outline-secondary {
700
- border-color: ${E("--color-text-muted")};
701
- color: ${E("--color-text-muted")};
847
+ border-color: ${O("--color-text-muted")};
848
+ color: ${O("--color-text-muted")};
702
849
  }
703
850
  .btn-outline-secondary:hover {
704
- background: ${E("--color-text-muted")};
851
+ background: ${O("--color-text-muted")};
705
852
  color: #fff;
706
853
  }
707
854
  .btn-link {
708
855
  font-weight: 400;
709
- color: ${E("--color-primary")};
856
+ color: ${O("--color-primary")};
710
857
  text-decoration: underline;
711
858
  }
712
859
  .btn-link:hover {
713
- color: ${E("--color-primary-hover")};
860
+ color: ${O("--color-primary-hover")};
714
861
  }
715
862
  .wui-consent-banner-settings-toggle {
716
863
  margin-inline-end: auto;
@@ -730,7 +877,7 @@ var g = Symbol("wui.trustedHtml"), _ = (e) => String(e ?? "").replace(/&/g, "&am
730
877
  max-width: none;
731
878
  }
732
879
  }
733
- `, ee = "wui-consent-save", te = "[data-consent-settings]", O = {
880
+ `, re = "wui-consent-save", ie = "[data-consent-settings]", k = {
734
881
  heading: "Cookies on this site",
735
882
  description: "We use cookies to understand how the site is used and to measure our campaigns. You can change your choice at any time.",
736
883
  policyLabel: "Cookie policy",
@@ -746,11 +893,11 @@ var g = Symbol("wui.trustedHtml"), _ = (e) => String(e ?? "").replace(/&/g, "&am
746
893
  rejectLabel: "Reject all",
747
894
  acceptLabel: "Accept all",
748
895
  saveLabel: "Save preferences"
749
- }, ne = [
896
+ }, ae = [
750
897
  "analytics",
751
898
  "functional",
752
899
  "marketing"
753
- ], re = 0, ie = class extends e {
900
+ ], oe = 0, se = class extends e {
754
901
  static get observedAttributes() {
755
902
  return [
756
903
  "heading",
@@ -763,12 +910,12 @@ var g = Symbol("wui.trustedHtml"), _ = (e) => String(e ?? "").replace(/&/g, "&am
763
910
  ];
764
911
  }
765
912
  constructor() {
766
- super(), re += 1, this._uid = `wui-consent-${re}`, this._preferences = {
913
+ super(), oe += 1, this._uid = `wui-consent-${oe}`, this._preferences = {
767
914
  analytics: !1,
768
915
  functional: !1,
769
916
  marketing: !1
770
917
  }, this._settings = !1, this._onDocumentClick = (e) => {
771
- e.target instanceof Element && e.target.closest(te) && (e.preventDefault(), this.open({
918
+ e.target instanceof Element && e.target.closest(ie) && (e.preventDefault(), this.open({
772
919
  settings: !0,
773
920
  focus: !0
774
921
  }));
@@ -787,13 +934,13 @@ var g = Symbol("wui.trustedHtml"), _ = (e) => String(e ?? "").replace(/&/g, "&am
787
934
  this.toggleAttribute("standalone", e === !0 || e === "" || e === "true");
788
935
  }
789
936
  get heading() {
790
- return this.getAttribute("heading") || O.heading;
937
+ return this.getAttribute("heading") || k.heading;
791
938
  }
792
939
  set heading(e) {
793
940
  this.setAttribute("heading", String(e ?? ""));
794
941
  }
795
942
  get description() {
796
- return this.getAttribute("description") || O.description;
943
+ return this.getAttribute("description") || k.description;
797
944
  }
798
945
  set description(e) {
799
946
  this.setAttribute("description", String(e ?? ""));
@@ -805,25 +952,25 @@ var g = Symbol("wui.trustedHtml"), _ = (e) => String(e ?? "").replace(/&/g, "&am
805
952
  this.setAttribute("policy-href", String(e ?? ""));
806
953
  }
807
954
  get policyLabel() {
808
- return this.getAttribute("policy-label") || O.policyLabel;
955
+ return this.getAttribute("policy-label") || k.policyLabel;
809
956
  }
810
957
  set policyLabel(e) {
811
958
  this.setAttribute("policy-label", String(e ?? ""));
812
959
  }
813
960
  get analyticsDescription() {
814
- return this.getAttribute("analytics-description") || O.analyticsDescription;
961
+ return this.getAttribute("analytics-description") || k.analyticsDescription;
815
962
  }
816
963
  set analyticsDescription(e) {
817
964
  this.setAttribute("analytics-description", String(e ?? ""));
818
965
  }
819
966
  get functionalDescription() {
820
- return this.getAttribute("functional-description") || O.functionalDescription;
967
+ return this.getAttribute("functional-description") || k.functionalDescription;
821
968
  }
822
969
  set functionalDescription(e) {
823
970
  this.setAttribute("functional-description", String(e ?? ""));
824
971
  }
825
972
  get marketingDescription() {
826
- return this.getAttribute("marketing-description") || O.marketingDescription;
973
+ return this.getAttribute("marketing-description") || k.marketingDescription;
827
974
  }
828
975
  set marketingDescription(e) {
829
976
  this.setAttribute("marketing-description", String(e ?? ""));
@@ -851,22 +998,22 @@ var g = Symbol("wui.trustedHtml"), _ = (e) => String(e ?? "").replace(/&/g, "&am
851
998
  this._rendered && this.render();
852
999
  }
853
1000
  render() {
854
- let e = this.isOpen, t = this._uid, n = this.policyHref ? ` <a class="wui-consent-banner-policy" href="${ae(this.policyHref)}">${A(this.policyLabel)}</a>` : "", r = this._root();
855
- r.innerHTML = `${r === this ? "" : `<style>${D}</style>`}
1001
+ let e = this.isOpen, t = this._uid, n = this.policyHref ? ` <a class="wui-consent-banner-policy" href="${ce(this.policyHref)}">${j(this.policyLabel)}</a>` : "", r = this._root();
1002
+ r.innerHTML = `${r === this ? "" : `<style>${ne}</style>`}
856
1003
  <div class="wui-consent-banner-panel" role="dialog" aria-labelledby="${t}-heading" aria-describedby="${t}-description" hidden>
857
- <h2 class="wui-consent-banner-heading" id="${t}-heading">${A(this.heading)}</h2>
858
- <p class="wui-consent-banner-description" id="${t}-description">${A(this.description)}${n}</p>
1004
+ <h2 class="wui-consent-banner-heading" id="${t}-heading">${j(this.heading)}</h2>
1005
+ <p class="wui-consent-banner-description" id="${t}-description">${j(this.description)}${n}</p>
859
1006
  <div class="wui-consent-banner-settings" hidden>
860
- ${k(t, "essential", O.essentialLabel, O.essentialDescription, !0)}
861
- ${k(t, "analytics", O.analyticsLabel, this.analyticsDescription, !1)}
862
- ${k(t, "functional", O.functionalLabel, this.functionalDescription, !1)}
863
- ${k(t, "marketing", O.marketingLabel, this.marketingDescription, !1)}
1007
+ ${A(t, "essential", k.essentialLabel, k.essentialDescription, !0)}
1008
+ ${A(t, "analytics", k.analyticsLabel, this.analyticsDescription, !1)}
1009
+ ${A(t, "functional", k.functionalLabel, this.functionalDescription, !1)}
1010
+ ${A(t, "marketing", k.marketingLabel, this.marketingDescription, !1)}
864
1011
  </div>
865
1012
  <div class="wui-consent-banner-actions">
866
- <button type="button" class="btn btn-sm btn-link wui-consent-banner-settings-toggle" aria-expanded="false">${O.settingsLabel}</button>
867
- <button type="button" class="btn btn-sm btn-outline-secondary wui-consent-banner-reject">${O.rejectLabel}</button>
868
- <button type="button" class="btn btn-sm btn-primary wui-consent-banner-accept">${O.acceptLabel}</button>
869
- <button type="button" class="btn btn-sm btn-primary wui-consent-banner-save" hidden>${O.saveLabel}</button>
1013
+ <button type="button" class="btn btn-sm btn-link wui-consent-banner-settings-toggle" aria-expanded="false">${k.settingsLabel}</button>
1014
+ <button type="button" class="btn btn-sm btn-outline-secondary wui-consent-banner-reject">${k.rejectLabel}</button>
1015
+ <button type="button" class="btn btn-sm btn-primary wui-consent-banner-accept">${k.acceptLabel}</button>
1016
+ <button type="button" class="btn btn-sm btn-primary wui-consent-banner-save" hidden>${k.saveLabel}</button>
870
1017
  </div>
871
1018
  </div>`, this._rendered = !0, this._wire(), this._applyPreferences(), this._showSettings(this._settings), e && (this._panel().hidden = !1);
872
1019
  }
@@ -896,7 +1043,7 @@ var g = Symbol("wui.trustedHtml"), _ = (e) => String(e ?? "").replace(/&/g, "&am
896
1043
  })), e.querySelector(".wui-consent-banner-save")?.addEventListener("click", () => this._save(this._switchValues())), e.querySelector(".wui-consent-banner-settings-toggle")?.addEventListener("click", () => this._showSettings(!this._settings));
897
1044
  }
898
1045
  _save(e) {
899
- this._preferences = { ...e }, this.dispatchEvent(new CustomEvent(ee, {
1046
+ this._preferences = { ...e }, this.dispatchEvent(new CustomEvent(re, {
900
1047
  bubbles: !0,
901
1048
  composed: !0,
902
1049
  detail: { ...e }
@@ -904,11 +1051,11 @@ var g = Symbol("wui.trustedHtml"), _ = (e) => String(e ?? "").replace(/&/g, "&am
904
1051
  }
905
1052
  _switchValues() {
906
1053
  let e = {};
907
- for (let t of ne) e[t] = this._root().querySelector(`input[data-category="${t}"]`)?.checked === !0;
1054
+ for (let t of ae) e[t] = this._root().querySelector(`input[data-category="${t}"]`)?.checked === !0;
908
1055
  return e;
909
1056
  }
910
1057
  _applyPreferences() {
911
- for (let e of ne) {
1058
+ for (let e of ae) {
912
1059
  let t = this._root().querySelector(`input[data-category="${e}"]`);
913
1060
  t && (t.checked = this._preferences[e]);
914
1061
  }
@@ -926,17 +1073,17 @@ var g = Symbol("wui.trustedHtml"), _ = (e) => String(e ?? "").replace(/&/g, "&am
926
1073
  }
927
1074
  }
928
1075
  };
929
- function k(e, t, n, r, i) {
1076
+ function A(e, t, n, r, i) {
930
1077
  let a = `${e}-${t}`;
931
1078
  return `<div class="wui-consent-banner-category">
932
1079
  <div class="form-check form-switch">
933
1080
  <input class="form-check-input" type="checkbox" role="switch" id="${a}" data-category="${t}"${i ? " checked disabled" : ""} />
934
- <label class="form-check-label" for="${a}">${A(n)}</label>
1081
+ <label class="form-check-label" for="${a}">${j(n)}</label>
935
1082
  </div>
936
- <p class="wui-consent-banner-category-description">${A(r)}</p>
1083
+ <p class="wui-consent-banner-category-description">${j(r)}</p>
937
1084
  </div>`;
938
1085
  }
939
- var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), ae = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), j = [
1086
+ var j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), ce = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), M = [
940
1087
  [
941
1088
  "AF",
942
1089
  "Afghanistan",
@@ -2162,11 +2309,11 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2162
2309
  "Zimbabwe",
2163
2310
  "263"
2164
2311
  ]
2165
- ], M = (e) => (j.find((t) => t[0] === e) || [
2312
+ ], N = (e) => (M.find((t) => t[0] === e) || [
2166
2313
  "",
2167
2314
  "",
2168
2315
  ""
2169
- ])[2], N = class extends e {
2316
+ ])[2], P = class extends e {
2170
2317
  static formAssociated = !0;
2171
2318
  static get observedAttributes() {
2172
2319
  return [
@@ -2255,19 +2402,19 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2255
2402
  this._listboxId = u;
2256
2403
  let d = e.map((e, t) => {
2257
2404
  let n = String(e.value) === String(this._value);
2258
- return `<button type="button" role="option" id="${P(`${u}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${P(e.value)}" aria-selected="${n}">${x(e)}</button>`;
2405
+ return `<button type="button" role="option" id="${F(`${u}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${F(e.value)}" aria-selected="${n}">${x(e)}</button>`;
2259
2406
  }).join("");
2260
2407
  this.innerHTML = `
2261
2408
  <div class="search-select${this.hasAttribute("compact") ? " search-select-compact" : ""}${i}">
2262
- <button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-controls="${P(u)}" aria-label="${P(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""}>
2409
+ <button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-controls="${F(u)}" aria-label="${F(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""}>
2263
2410
  ${a ? m(a, { className: "search-select-icon" }) : ""}
2264
2411
  ${o ? `<span class="search-select-prefix">${_(o)}</span>` : ""}
2265
2412
  <span class="${l ? "" : "search-select-placeholder"}" data-label>${l ? x(l) : _(s)}</span>
2266
2413
  ${n ? `<span class="search-select-reset" role="button" aria-label="Clear selection" hidden>${m("x")}</span>` : ""}
2267
2414
  ${m("chevron-down", { className: "search-select-caret" })}
2268
2415
  </button>
2269
- <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${P(u)}" tabindex="-1" hidden>
2270
- ${t ? `<div class="search-select-search">${m("search")}<input class="search-select-input" placeholder="${P(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${m("x")}</button></div>` : ""}
2416
+ <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${F(u)}" tabindex="-1" hidden>
2417
+ ${t ? `<div class="search-select-search">${m("search")}<input class="search-select-input" placeholder="${F(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${m("x")}</button></div>` : ""}
2271
2418
  <div class="search-select-options">${d}<div class="search-select-empty" hidden>No matches</div></div>
2272
2419
  </div>
2273
2420
  </div>`, this._rendered = !0, f(this, this._value), this._wire(), this._syncReset();
@@ -2372,29 +2519,29 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2372
2519
  disconnectedCallback() {
2373
2520
  this._teardown();
2374
2521
  }
2375
- }, P = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), oe = (e) => {
2522
+ }, F = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), le = (e) => {
2376
2523
  if (e == null) return null;
2377
2524
  let t = String(e).split(",").map((e) => e.trim().toUpperCase()).filter(Boolean);
2378
2525
  return t.length ? new Set(t) : null;
2379
- }, se = (e) => {
2380
- let t = oe(e);
2381
- return j.filter(([e]) => !t || t.has(e)).map(([e, t]) => ({
2526
+ }, ue = (e) => {
2527
+ let t = le(e);
2528
+ return M.filter(([e]) => !t || t.has(e)).map(([e, t]) => ({
2382
2529
  value: e,
2383
2530
  label: t,
2384
2531
  flag: e
2385
2532
  }));
2386
- }, ce = class extends N {
2533
+ }, de = class extends P {
2387
2534
  static get observedAttributes() {
2388
- return [...N.observedAttributes, "countries"];
2535
+ return [...P.observedAttributes, "countries"];
2389
2536
  }
2390
2537
  _readOptions() {
2391
2538
  let e = this.getAttribute("countries");
2392
2539
  return this._countryCache?.attr !== e && (this._countryCache = {
2393
2540
  attr: e,
2394
- options: se(e)
2541
+ options: ue(e)
2395
2542
  }), this._countryCache.options;
2396
2543
  }
2397
- }, F = [
2544
+ }, I = [
2398
2545
  "January",
2399
2546
  "February",
2400
2547
  "March",
@@ -2407,7 +2554,7 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2407
2554
  "October",
2408
2555
  "November",
2409
2556
  "December"
2410
- ], I = [
2557
+ ], L = [
2411
2558
  "Su",
2412
2559
  "Mo",
2413
2560
  "Tu",
@@ -2415,24 +2562,24 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2415
2562
  "Th",
2416
2563
  "Fr",
2417
2564
  "Sa"
2418
- ], L = (e) => String(e).padStart(2, "0"), R = (e, t, n) => `${e}-${L(t + 1)}-${L(n)}`, z = (e) => {
2565
+ ], R = (e) => String(e).padStart(2, "0"), z = (e, t, n) => `${e}-${R(t + 1)}-${R(n)}`, B = (e) => {
2419
2566
  let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
2420
2567
  return t ? {
2421
2568
  y: +t[1],
2422
2569
  m: t[2] - 1,
2423
2570
  d: +t[3]
2424
2571
  } : null;
2425
- }, B = (e) => {
2426
- let t = z(e);
2427
- return t ? `${L(t.d)} ${F[t.m].slice(0, 3)} ${t.y}` : "";
2428
- }, V = (e, t) => new Date(e, t + 1, 0).getDate(), H = (e, t) => {
2572
+ }, V = (e) => {
2573
+ let t = B(e);
2574
+ return t ? `${R(t.d)} ${I[t.m].slice(0, 3)} ${t.y}` : "";
2575
+ }, H = (e, t) => new Date(e, t + 1, 0).getDate(), U = (e, t) => {
2429
2576
  for (; t < 0;) t += 12, --e;
2430
2577
  for (; t > 11;) t -= 12, e += 1;
2431
2578
  return {
2432
2579
  y: e,
2433
2580
  m: t
2434
2581
  };
2435
- }, le = class extends e {
2582
+ }, fe = class extends e {
2436
2583
  static formAssociated = !0;
2437
2584
  static get observedAttributes() {
2438
2585
  return [
@@ -2492,13 +2639,13 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2492
2639
  }
2493
2640
  render() {
2494
2641
  this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || "", this._value = this._defaultValue || this._value);
2495
- let e = this.getAttribute("placeholder") || "Enter Date", t = z(this._value);
2642
+ let e = this.getAttribute("placeholder") || "Enter Date", t = B(this._value);
2496
2643
  t && (this._viewY = t.y, this._viewM = t.m);
2497
2644
  let n = this.getAttribute("size"), r = n === "sm" ? " input-sm" : n === "lg" ? " input-lg" : "", i = this.getAttribute("aria-label"), a = this.getAttribute("aria-describedby");
2498
2645
  this.innerHTML = `
2499
2646
  <div class="datepicker">
2500
2647
  <button type="button" class="input datepicker-trigger${r}${t ? " has-value" : ""}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""}${i ? ` aria-label="${_(i)}"` : ""}${a ? ` aria-describedby="${_(a)}"` : ""}>
2501
- <span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? B(this._value) : _(e)}</span>
2648
+ <span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? V(this._value) : _(e)}</span>
2502
2649
  ${m("calendar-dots")}
2503
2650
  </button>
2504
2651
  <div class="datepicker-pop" role="dialog" aria-modal="false" hidden></div>
@@ -2510,11 +2657,11 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2510
2657
  _syncTrigger() {
2511
2658
  let e = this.querySelector(".datepicker-trigger"), t = this.querySelector("[data-trigger-label]");
2512
2659
  if (!t) return;
2513
- let n = z(this._value);
2514
- t.textContent = n ? B(this._value) : this.getAttribute("placeholder") || "Enter Date", t.classList.toggle("search-select-placeholder", !n), e?.classList.toggle("has-value", !!n);
2660
+ let n = B(this._value);
2661
+ t.textContent = n ? V(this._value) : this.getAttribute("placeholder") || "Enter Date", t.classList.toggle("search-select-placeholder", !n), e?.classList.toggle("has-value", !!n);
2515
2662
  }
2516
2663
  _limits() {
2517
- let e = z(this.getAttribute("min")), t = z(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
2664
+ let e = B(this.getAttribute("min")), t = B(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
2518
2665
  return {
2519
2666
  dayDisabled: (e, t, i) => {
2520
2667
  let a = new Date(e, t, i).getTime();
@@ -2522,7 +2669,7 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2522
2669
  },
2523
2670
  monthDisabled: (e, t) => {
2524
2671
  let i = new Date(e, t, 1).getTime();
2525
- return new Date(e, t, V(e, t)).getTime() < n || i > r;
2672
+ return new Date(e, t, H(e, t)).getTime() < n || i > r;
2526
2673
  },
2527
2674
  yearDisabled: (e) => {
2528
2675
  let t = new Date(e, 0, 1).getTime();
@@ -2535,28 +2682,28 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2535
2682
  e && (this._mode === "months" ? e.innerHTML = this._monthsHtml() : this._mode === "years" ? e.innerHTML = this._yearsHtml() : e.innerHTML = this._daysHtml(), this._focusActive());
2536
2683
  }
2537
2684
  _daysHtml() {
2538
- let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n = V(this._viewY, this._viewM), r = z(this._value), i = /* @__PURE__ */ new Date(), { dayDisabled: a } = this._limits(), o = this._focus || r || {
2685
+ let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n = H(this._viewY, this._viewM), r = B(this._value), i = /* @__PURE__ */ new Date(), { dayDisabled: a } = this._limits(), o = this._focus || r || {
2539
2686
  y: this._viewY,
2540
2687
  m: this._viewM,
2541
2688
  d: 1
2542
2689
  }, s = (e, t, n, s) => {
2543
- let c = R(e, t, n), l = r && r.y === e && r.m === t && r.d === n, u = i.getFullYear() === e && i.getMonth() === t && i.getDate() === n, d = o.y === e && o.m === t && o.d === n, f = a(e, t, n);
2690
+ let c = z(e, t, n), l = r && r.y === e && r.m === t && r.d === n, u = i.getFullYear() === e && i.getMonth() === t && i.getDate() === n, d = o.y === e && o.m === t && o.d === n, f = a(e, t, n);
2544
2691
  return `<button type="button" class="${[
2545
2692
  "datepicker-day",
2546
2693
  s ? "is-outside" : "",
2547
2694
  u ? "is-today" : "",
2548
2695
  l ? "is-selected" : ""
2549
2696
  ].filter(Boolean).join(" ")}" data-iso="${c}" role="gridcell" tabindex="${d && !f ? "0" : "-1"}"${l ? " aria-selected=\"true\"" : ""}${f ? " disabled aria-disabled=\"true\"" : ""}>${n}</button>`;
2550
- }, c = "", l = H(this._viewY, this._viewM - 1), u = V(l.y, l.m);
2697
+ }, c = "", l = U(this._viewY, this._viewM - 1), u = H(l.y, l.m);
2551
2698
  for (let e = t - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
2552
2699
  for (let e = 1; e <= n; e++) c += s(this._viewY, this._viewM, e, !1);
2553
- let d = H(this._viewY, this._viewM + 1), f = (7 - (t + n) % 7) % 7;
2700
+ let d = U(this._viewY, this._viewM + 1), f = (7 - (t + n) % 7) % 7;
2554
2701
  for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
2555
- let p = a(i.getFullYear(), i.getMonth(), i.getDate()), h = I.map((t, n) => I[(n + e) % 7]).map((e) => `<span>${e}</span>`).join("");
2702
+ let p = a(i.getFullYear(), i.getMonth(), i.getDate()), h = L.map((t, n) => L[(n + e) % 7]).map((e) => `<span>${e}</span>`).join("");
2556
2703
  return `
2557
2704
  <div class="datepicker-head">
2558
2705
  <button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${m("chevron-left")}</button>
2559
- <button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${F[this._viewM]} ${this._viewY}</button>
2706
+ <button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${I[this._viewM]} ${this._viewY}</button>
2560
2707
  <button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month">${m("chevron-right")}</button>
2561
2708
  </div>
2562
2709
  <div class="datepicker-weekdays">${h}</div>
@@ -2567,14 +2714,14 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2567
2714
  </div>`;
2568
2715
  }
2569
2716
  _monthsHtml() {
2570
- let e = z(this._value), t = /* @__PURE__ */ new Date(), { monthDisabled: n } = this._limits(), r = "";
2717
+ let e = B(this._value), t = /* @__PURE__ */ new Date(), { monthDisabled: n } = this._limits(), r = "";
2571
2718
  for (let i = 0; i < 12; i++) {
2572
2719
  let a = e && e.y === this._viewY && e.m === i, o = t.getFullYear() === this._viewY && t.getMonth() === i, s = n(this._viewY, i), c = [
2573
2720
  "datepicker-cell",
2574
2721
  o ? "is-today" : "",
2575
2722
  a ? "is-selected" : ""
2576
2723
  ].filter(Boolean).join(" ");
2577
- r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${F[i].slice(0, 3)}</button>`;
2724
+ r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${I[i].slice(0, 3)}</button>`;
2578
2725
  }
2579
2726
  return `
2580
2727
  <div class="datepicker-head">
@@ -2585,7 +2732,7 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2585
2732
  <div class="datepicker-cells">${r}</div>`;
2586
2733
  }
2587
2734
  _yearsHtml() {
2588
- let e = z(this._value), t = (/* @__PURE__ */ new Date()).getFullYear(), { yearDisabled: n } = this._limits(), r = this._viewY - (this._viewY % 10 + 10) % 10 - 1, i = "";
2735
+ let e = B(this._value), t = (/* @__PURE__ */ new Date()).getFullYear(), { yearDisabled: n } = this._limits(), r = this._viewY - (this._viewY % 10 + 10) % 10 - 1, i = "";
2589
2736
  for (let a = 0; a < 12; a++) {
2590
2737
  let o = r + a, s = e && e.y === o, c = t === o, l = n(o), u = [
2591
2738
  "datepicker-cell",
@@ -2610,21 +2757,21 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2610
2757
  c(e, t, { clampHeight: !0 });
2611
2758
  }
2612
2759
  _setFocus(e, t, n, r) {
2613
- let { y: i, m: a } = H(e, t);
2760
+ let { y: i, m: a } = U(e, t);
2614
2761
  this._focus = {
2615
2762
  y: i,
2616
2763
  m: a,
2617
2764
  d: n
2618
2765
  };
2619
2766
  let o = i !== this._viewY || a !== this._viewM;
2620
- this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${R(i, a, n)}"]`)?.focus();
2767
+ this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${z(i, a, n)}"]`)?.focus();
2621
2768
  }
2622
2769
  _onKey(e) {
2623
2770
  if (this._mode !== "days") {
2624
2771
  e.key === "Escape" && this._close();
2625
2772
  return;
2626
2773
  }
2627
- let t = this._focus || z(this._value) || {
2774
+ let t = this._focus || B(this._value) || {
2628
2775
  y: this._viewY,
2629
2776
  m: this._viewM,
2630
2777
  d: 1
@@ -2642,17 +2789,17 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2642
2789
  case "End": return n(6 - (new Date(t.y, t.m, t.d).getDay() - this._firstDay() + 7) % 7, "slide-next");
2643
2790
  case "PageUp": {
2644
2791
  e.preventDefault();
2645
- let n = H(t.y, t.m - (e.shiftKey ? 12 : 1));
2646
- return this._setFocus(n.y, n.m, Math.min(t.d, V(n.y, n.m)), "slide-prev");
2792
+ let n = U(t.y, t.m - (e.shiftKey ? 12 : 1));
2793
+ return this._setFocus(n.y, n.m, Math.min(t.d, H(n.y, n.m)), "slide-prev");
2647
2794
  }
2648
2795
  case "PageDown": {
2649
2796
  e.preventDefault();
2650
- let n = H(t.y, t.m + (e.shiftKey ? 12 : 1));
2651
- return this._setFocus(n.y, n.m, Math.min(t.d, V(n.y, n.m)), "slide-next");
2797
+ let n = U(t.y, t.m + (e.shiftKey ? 12 : 1));
2798
+ return this._setFocus(n.y, n.m, Math.min(t.d, H(n.y, n.m)), "slide-next");
2652
2799
  }
2653
2800
  case "Enter":
2654
2801
  case " ":
2655
- e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value = R(t.y, t.m, t.d), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close());
2802
+ e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value = z(t.y, t.m, t.d), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close());
2656
2803
  return;
2657
2804
  case "Escape": return this._close();
2658
2805
  default:
@@ -2664,7 +2811,7 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2664
2811
  if (!e || !t) return;
2665
2812
  let r = () => !t.hidden;
2666
2813
  this._open = () => {
2667
- let r = /* @__PURE__ */ new Date(), i = z(this._value);
2814
+ let r = /* @__PURE__ */ new Date(), i = B(this._value);
2668
2815
  (i || !this._viewNavigated) && (this._viewY = r.getFullYear(), this._viewM = r.getMonth()), this._mode = "days";
2669
2816
  let a = r.getFullYear() === this._viewY && r.getMonth() === this._viewM, o = i && i.y === this._viewY && i.m === this._viewM;
2670
2817
  this._focus = o ? i : {
@@ -2679,7 +2826,7 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2679
2826
  let t = e.target.closest("[data-nav]");
2680
2827
  if (t) {
2681
2828
  this._viewNavigated = !0, this._slide = Number(t.dataset.nav) < 0 ? "slide-prev" : "slide-next";
2682
- let e = H(this._viewY, this._viewM + Number(t.dataset.nav));
2829
+ let e = U(this._viewY, this._viewM + Number(t.dataset.nav));
2683
2830
  this._viewY = e.y, this._viewM = e.m, this._focus = {
2684
2831
  y: e.y,
2685
2832
  m: e.m,
@@ -2719,7 +2866,7 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2719
2866
  if (e.target.closest("[data-today]")) {
2720
2867
  let e = /* @__PURE__ */ new Date();
2721
2868
  if (this._limits().dayDisabled(e.getFullYear(), e.getMonth(), e.getDate())) return;
2722
- this.value = R(e.getFullYear(), e.getMonth(), e.getDate()), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close();
2869
+ this.value = z(e.getFullYear(), e.getMonth(), e.getDate()), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close();
2723
2870
  return;
2724
2871
  }
2725
2872
  if (e.target.closest("[data-clear]")) {
@@ -2747,7 +2894,7 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2747
2894
  disconnectedCallback() {
2748
2895
  this._teardown();
2749
2896
  }
2750
- }, ue = class extends e {
2897
+ }, pe = class extends e {
2751
2898
  static formAssociated = !0;
2752
2899
  static get observedAttributes() {
2753
2900
  return [
@@ -2815,13 +2962,13 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2815
2962
  text: e,
2816
2963
  empty: !0
2817
2964
  } : {
2818
- text: `${B(this._start) || "Start"} – ${B(this._end) || "End"}`,
2965
+ text: `${V(this._start) || "Start"} – ${V(this._end) || "End"}`,
2819
2966
  empty: !1
2820
2967
  };
2821
2968
  }
2822
2969
  render() {
2823
2970
  this._defaultStart === void 0 && (this._defaultStart = this.getAttribute("start") || "", this._defaultEnd = this.getAttribute("end") || "", this._start = this._defaultStart || this._start, this._end = this._defaultEnd || this._end);
2824
- let e = z(this._start);
2971
+ let e = B(this._start);
2825
2972
  e && (this._viewY = e.y, this._viewM = e.m);
2826
2973
  let t = this.getAttribute("size"), n = t === "sm" ? " input-sm" : t === "lg" ? " input-lg" : "", { text: r, empty: i } = this._label(), a = this.getAttribute("aria-label"), o = this.getAttribute("aria-describedby");
2827
2974
  this.innerHTML = `
@@ -2855,24 +3002,24 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2855
3002
  r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute("data-range-mirror", e), this.appendChild(r)), r.name = t, r.value = n || "", r.disabled = this.hasAttribute("disabled");
2856
3003
  }
2857
3004
  _limits() {
2858
- let e = z(this.getAttribute("min")), t = z(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
3005
+ let e = B(this.getAttribute("min")), t = B(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
2859
3006
  return (e, t, i) => {
2860
3007
  let a = new Date(e, t, i).getTime();
2861
3008
  return a < n || a > r;
2862
3009
  };
2863
3010
  }
2864
3011
  _monthHtml(e, t) {
2865
- let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i = V(e, t), a = this._limits(), o = I.map((e, t) => I[(t + n) % 7]).map((e) => `<span>${e}</span>`).join(""), s = (e, t, n, r) => {
2866
- let i = R(e, t, n), o = a(e, t, n);
3012
+ let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i = H(e, t), a = this._limits(), o = L.map((e, t) => L[(t + n) % 7]).map((e) => `<span>${e}</span>`).join(""), s = (e, t, n, r) => {
3013
+ let i = z(e, t, n), o = a(e, t, n);
2867
3014
  return `<button type="button" class="${["datepicker-day", r ? "is-outside" : ""].filter(Boolean).join(" ")}" data-iso="${i}"${o ? " disabled" : ""}>${n}</button>`;
2868
- }, c = "", l = H(e, t - 1), u = V(l.y, l.m);
3015
+ }, c = "", l = U(e, t - 1), u = H(l.y, l.m);
2869
3016
  for (let e = r - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
2870
3017
  for (let n = 1; n <= i; n++) c += s(e, t, n, !1);
2871
- let d = H(e, t + 1), f = (7 - (r + i) % 7) % 7;
3018
+ let d = U(e, t + 1), f = (7 - (r + i) % 7) % 7;
2872
3019
  for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
2873
3020
  return `
2874
3021
  <div class="daterange-cal">
2875
- <div class="datepicker-month-label">${F[t]} ${e}</div>
3022
+ <div class="datepicker-month-label">${I[t]} ${e}</div>
2876
3023
  <div class="datepicker-weekdays">${o}</div>
2877
3024
  <div class="datepicker-grid" role="grid">${c}</div>
2878
3025
  </div>`;
@@ -2880,7 +3027,7 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2880
3027
  _renderView() {
2881
3028
  let e = this.querySelector(".daterange-pop");
2882
3029
  if (!e) return;
2883
- let t = H(this._viewY, this._viewM + 1);
3030
+ let t = U(this._viewY, this._viewM + 1);
2884
3031
  e.innerHTML = `
2885
3032
  <div class="daterange-head">
2886
3033
  <button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${m("chevron-left")}</button>
@@ -2906,7 +3053,7 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2906
3053
  n.classList.toggle("is-range-start", i), n.classList.toggle("is-range-end", a), n.classList.toggle("in-range", o);
2907
3054
  }
2908
3055
  let i = e.querySelector("[data-range-hint]");
2909
- i && (i.textContent = this._start ? this._end ? `${B(this._start)} – ${B(this._end)}` : "Pick an end date" : "Pick a start date");
3056
+ i && (i.textContent = this._start ? this._end ? `${V(this._start)} – ${V(this._end)}` : "Pick an end date" : "Pick a start date");
2910
3057
  }
2911
3058
  _position(e, t) {
2912
3059
  c(e, t, { clampHeight: !0 });
@@ -2928,7 +3075,7 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2928
3075
  if (!e || !t) return;
2929
3076
  let r = () => !t.hidden;
2930
3077
  this._open = () => {
2931
- let r = z(this._start);
3078
+ let r = B(this._start);
2932
3079
  if (r) this._viewY = r.y, this._viewM = r.m;
2933
3080
  else {
2934
3081
  let e = /* @__PURE__ */ new Date();
@@ -2941,7 +3088,7 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2941
3088
  this._popClick = !0;
2942
3089
  let t = e.target.closest("[data-nav]");
2943
3090
  if (t) {
2944
- let e = H(this._viewY, this._viewM + Number(t.dataset.nav));
3091
+ let e = U(this._viewY, this._viewM + Number(t.dataset.nav));
2945
3092
  this._viewY = e.y, this._viewM = e.m, this._renderView();
2946
3093
  return;
2947
3094
  }
@@ -2971,7 +3118,7 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2971
3118
  disconnectedCallback() {
2972
3119
  this._teardown();
2973
3120
  }
2974
- }, de = class extends e {
3121
+ }, me = class extends e {
2975
3122
  static get observedAttributes() {
2976
3123
  return [
2977
3124
  "static",
@@ -2992,10 +3139,10 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
2992
3139
  e === "static" && this.isConnected && this._wire();
2993
3140
  }
2994
3141
  _maxScale() {
2995
- return fe(this.getAttribute("max-scale"), 1.6);
3142
+ return he(this.getAttribute("max-scale"), 1.6);
2996
3143
  }
2997
3144
  _radius() {
2998
- return fe(this.getAttribute("radius"), 100);
3145
+ return he(this.getAttribute("radius"), 100);
2999
3146
  }
3000
3147
  _magnifyEnabled() {
3001
3148
  return !(this.hasAttribute("static") || typeof matchMedia == "function" && (matchMedia("(pointer: coarse)").matches || matchMedia("(prefers-reduced-motion: reduce)").matches));
@@ -3020,26 +3167,26 @@ var A = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").repl
3020
3167
  _teardown() {
3021
3168
  this._pointerMoveListener &&= (this.removeEventListener("pointermove", this._pointerMoveListener), null), this._pointerLeaveListener &&= (this.removeEventListener("pointerleave", this._pointerLeaveListener), null), this._resetMagnification();
3022
3169
  }
3023
- }, fe = (e, t) => {
3170
+ }, he = (e, t) => {
3024
3171
  let n = Number.parseFloat(e);
3025
3172
  return Number.isFinite(n) ? n : t;
3026
- }, pe = {
3173
+ }, ge = {
3027
3174
  enter: "Enter",
3028
3175
  comma: ",",
3029
3176
  space: " ",
3030
3177
  tab: "Tab"
3031
- }, me = {
3178
+ }, _e = {
3032
3179
  enter: "\n",
3033
3180
  comma: ",",
3034
3181
  space: " ",
3035
3182
  tab: " "
3036
- }, he = (e) => pe[e], ge = (e) => me[e];
3037
- function _e(e, t) {
3183
+ }, ve = (e) => ge[e], ye = (e) => _e[e];
3184
+ function be(e, t) {
3038
3185
  let n = [String(e ?? "")];
3039
3186
  for (let e of t) n = n.flatMap((t) => t.split(e));
3040
3187
  return n.map((e) => e.trim()).filter(Boolean);
3041
3188
  }
3042
- var U = (e, t) => t.some((t) => String(e ?? "").includes(t)), ve = class extends e {
3189
+ var xe = (e, t) => t.some((t) => String(e ?? "").includes(t)), Se = class extends e {
3043
3190
  static formAssociated = !0;
3044
3191
  _accessibleName() {
3045
3192
  return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
@@ -3139,7 +3286,7 @@ var U = (e, t) => t.some((t) => String(e ?? "").includes(t)), ve = class extends
3139
3286
  [g]: !0,
3140
3287
  selected: e.hasAttribute("selected")
3141
3288
  };
3142
- for (let [n, r] of be) {
3289
+ for (let [n, r] of we) {
3143
3290
  let i = e.getAttribute(n);
3144
3291
  i && (t[r] = i);
3145
3292
  }
@@ -3196,7 +3343,7 @@ var U = (e, t) => t.some((t) => String(e ?? "").includes(t)), ve = class extends
3196
3343
  _renderControl() {
3197
3344
  let e = this.querySelector("[data-chips]");
3198
3345
  if (!e) return;
3199
- let t = this.getAttribute("placeholder") || "Select…", n = this._allowCustom ? e.querySelector("[data-input]") : null, r = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${W(e)}" aria-label="Remove ${W(De(this._labelFor(e)))}">${m("x")}</button></span>`).join("");
3346
+ let t = this.getAttribute("placeholder") || "Select…", n = this._allowCustom ? e.querySelector("[data-input]") : null, r = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${W(e)}" aria-label="Remove ${W(je(this._labelFor(e)))}">${m("x")}</button></span>`).join("");
3200
3347
  if (n) {
3201
3348
  for (let t of [...e.querySelectorAll(":scope > .chip")]) t.remove();
3202
3349
  n.insertAdjacentHTML("beforebegin", r), n.placeholder = this._values.length ? "" : t, this._collapseChips();
@@ -3227,11 +3374,11 @@ var U = (e, t) => t.some((t) => String(e ?? "").includes(t)), ve = class extends
3227
3374
  i.textContent = `+${t.length - o}`;
3228
3375
  }
3229
3376
  _matches(e, t) {
3230
- return De(e.label).toLowerCase().includes(t) || String(e.description ?? "").toLowerCase().includes(t);
3377
+ return je(e.label).toLowerCase().includes(t) || String(e.description ?? "").toLowerCase().includes(t);
3231
3378
  }
3232
3379
  _optionNamed(e) {
3233
3380
  let t = e.trim().toLowerCase();
3234
- return this._readOptions().find((e) => String(e.value ?? "").toLowerCase() === t || De(e.label).trim().toLowerCase() === t);
3381
+ return this._readOptions().find((e) => String(e.value ?? "").toLowerCase() === t || je(e.label).trim().toLowerCase() === t);
3235
3382
  }
3236
3383
  _renderOptions(e) {
3237
3384
  let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
@@ -3240,7 +3387,7 @@ var U = (e, t) => t.some((t) => String(e ?? "").includes(t)), ve = class extends
3240
3387
  i && (a = a.filter((e) => this._matches(e, i)));
3241
3388
  let o = this._listboxId || `${this.id || "wui-multiselect"}-listbox`, s = this._allowCustom && r && !this._optionNamed(r), c = a.map((e, t) => {
3242
3389
  let n = this._values.includes(String(e.value)), r = `${o}-opt-${t}`;
3243
- return xe(e) ? we(e, r, n) : `<button type="button" role="option" id="${W(r)}" class="search-select-option${n ? " selected" : ""}" data-value="${W(e.value)}" aria-selected="${n}"><span class="ms-opt-label">${x(e)}</span><span class="ms-check">${m("check")}</span></button>`;
3390
+ return Te(e) ? Oe(e, r, n) : `<button type="button" role="option" id="${W(r)}" class="search-select-option${n ? " selected" : ""}" data-value="${W(e.value)}" aria-selected="${n}"><span class="ms-opt-label">${x(e)}</span><span class="ms-check">${m("check")}</span></button>`;
3244
3391
  });
3245
3392
  s && c.push(`<button type="button" role="option" id="${W(`${o}-opt-${a.length}`)}" class="search-select-option search-select-option-custom" data-value="${W(r)}" data-custom="true" aria-selected="false">Add “${_(r)}”</button>`), t.innerHTML = c.join(""), n && (n.hidden = a.length > 0), this._active = -1, this._combobox()?.removeAttribute("aria-activedescendant"), this._allowCustom && this._syncCustomMenu?.(), this._reanchor?.();
3246
3393
  }
@@ -3255,7 +3402,7 @@ var U = (e, t) => t.some((t) => String(e ?? "").includes(t)), ve = class extends
3255
3402
  _customRefusal(e) {
3256
3403
  let t = this.getAttribute("custom-invalid-message") || "Enter a valid value.", n = this.getAttribute("custom-pattern");
3257
3404
  if (n) {
3258
- let r = Ee(n);
3405
+ let r = Ae(n);
3259
3406
  if (r && !r.test(e)) return t;
3260
3407
  }
3261
3408
  let r = this._validateCustom;
@@ -3315,7 +3462,7 @@ var U = (e, t) => t.some((t) => String(e ?? "").includes(t)), ve = class extends
3315
3462
  }, w = (e) => {
3316
3463
  this._values = this._values.filter((t) => t !== String(e)), this._renderControl(), this._renderOptions(this._query()), S();
3317
3464
  }, T = (e, { quiet: t = !1 } = {}) => {
3318
- let n = this._values.length, r = U(e, ye) ? _e(e, ye) : [e], i = [], a = "";
3465
+ let n = this._values.length, r = xe(e, Ce) ? be(e, Ce) : [e], i = [], a = "";
3319
3466
  for (let e of r) {
3320
3467
  let t = this._commitTyped(e);
3321
3468
  t && (i.push(e.trim()), a ||= t);
@@ -3393,7 +3540,7 @@ var U = (e, t) => t.some((t) => String(e ?? "").includes(t)), ve = class extends
3393
3540
  (e.key === "ArrowDown" || e.key === "ArrowUp") && !v() && b(), D(e);
3394
3541
  }), o.addEventListener("paste", (e) => {
3395
3542
  let t = e.clipboardData?.getData("text/plain") ?? "";
3396
- U(t, ye) && (e.preventDefault(), T(`${o.value}${t}`));
3543
+ xe(t, Ce) && (e.preventDefault(), T(`${o.value}${t}`));
3397
3544
  }), o.addEventListener("blur", (e) => {
3398
3545
  e.relatedTarget && this.contains(e.relatedTarget) || (o.value.trim() && T(o.value, { quiet: !0 }), x());
3399
3546
  });
@@ -3418,35 +3565,35 @@ var U = (e, t) => t.some((t) => String(e ?? "").includes(t)), ve = class extends
3418
3565
  disconnectedCallback() {
3419
3566
  this._teardown(), this._ro?.disconnect(), this._ro = null;
3420
3567
  }
3421
- }, ye = [
3568
+ }, Ce = [
3422
3569
  ",",
3423
3570
  ";",
3424
3571
  "\n",
3425
3572
  " "
3426
- ], be = [
3573
+ ], we = [
3427
3574
  ["description", "description"],
3428
3575
  ["avatar", "avatar"],
3429
3576
  ["initials", "initials"],
3430
3577
  ["disabled-hint", "disabledHint"]
3431
- ], xe = (e) => !!(e.description || e.avatar || e.initials || e.disabled || e.disabledHint), Se = (e) => {
3578
+ ], Te = (e) => !!(e.description || e.avatar || e.initials || e.disabled || e.disabledHint), Ee = (e) => {
3432
3579
  let t = String(e ?? "").trim();
3433
3580
  return /^(https?:)?\/\//i.test(t) || /^\/(?!\/)/.test(t) || /^data:image\/(png|jpe?g|gif|webp|avif);/i.test(t) ? t : "";
3434
- }, Ce = (e) => {
3435
- let t = Se(e.avatar);
3581
+ }, De = (e) => {
3582
+ let t = Ee(e.avatar);
3436
3583
  return !t && !e.initials ? "" : `<span class="avatar wui-opt-avatar" aria-hidden="true"><span class="avatar-face">${_(e.initials ?? "")}</span>${t ? `<img class="avatar-img" src="${W(t)}" alt="" />` : ""}</span>`;
3437
- }, we = (e, t, n) => {
3584
+ }, Oe = (e, t, n) => {
3438
3585
  let r = !!e.disabled, i = e.description ? `<span class="wui-opt-desc">${_(e.description)}</span>` : "", a = e.disabledHint && r ? `<span class="wui-opt-hint">${_(e.disabledHint)}</span>` : "";
3439
- return `<button type="button" role="option" id="${W(t)}" class="search-select-option wui-opt-rich${n ? " selected" : ""}" data-value="${W(e.value)}" aria-selected="${n}"${r ? " aria-disabled=\"true\"" : ""}><span class="ms-opt-label"><span class="wui-opt-name">${x(e)}</span>${i}</span>${a}${Ce(e)}<span class="ms-check">${m("check")}</span></button>`;
3440
- }, Te = /* @__PURE__ */ new Map(), Ee = (e) => {
3441
- if (Te.has(e)) return Te.get(e);
3586
+ return `<button type="button" role="option" id="${W(t)}" class="search-select-option wui-opt-rich${n ? " selected" : ""}" data-value="${W(e.value)}" aria-selected="${n}"${r ? " aria-disabled=\"true\"" : ""}><span class="ms-opt-label"><span class="wui-opt-name">${x(e)}</span>${i}</span>${a}${De(e)}<span class="ms-check">${m("check")}</span></button>`;
3587
+ }, ke = /* @__PURE__ */ new Map(), Ae = (e) => {
3588
+ if (ke.has(e)) return ke.get(e);
3442
3589
  let t = null;
3443
3590
  try {
3444
3591
  t = RegExp(`^(?:${e})$`, "u");
3445
3592
  } catch {
3446
3593
  console.warn(`<wui-multiselect> custom-pattern is not a valid regular expression and is ignored: ${e}`);
3447
3594
  }
3448
- return Te.set(e, t), t;
3449
- }, W = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), De = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), Oe = /[^0-9]/g, ke = /[^0-9a-zA-Z]/g, Ae = class extends e {
3595
+ return ke.set(e, t), t;
3596
+ }, W = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), je = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), Me = /[^0-9]/g, Ne = /[^0-9a-zA-Z]/g, Pe = class extends e {
3450
3597
  static formAssociated = !0;
3451
3598
  static get observedAttributes() {
3452
3599
  return [
@@ -3477,7 +3624,7 @@ var U = (e, t) => t.some((t) => String(e ?? "").includes(t)), ve = class extends
3477
3624
  this._value = this._clean(e), f(this, this._value), this._paint();
3478
3625
  }
3479
3626
  _clean(e) {
3480
- return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? ke : Oe, "").slice(0, this.length);
3627
+ return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? Ne : Me, "").slice(0, this.length);
3481
3628
  }
3482
3629
  constructor() {
3483
3630
  super();
@@ -3568,7 +3715,7 @@ var U = (e, t) => t.some((t) => String(e ?? "").includes(t)), ve = class extends
3568
3715
  disconnectedCallback() {
3569
3716
  this._onSelectionChange && document.removeEventListener("selectionchange", this._onSelectionChange);
3570
3717
  }
3571
- }, je = {
3718
+ }, Fe = {
3572
3719
  AD: ["Europe/Andorra"],
3573
3720
  AE: ["Asia/Dubai"],
3574
3721
  AF: ["Asia/Kabul"],
@@ -3970,13 +4117,13 @@ var U = (e, t) => t.some((t) => String(e ?? "").includes(t)), ve = class extends
3970
4117
  ZA: ["Africa/Johannesburg"],
3971
4118
  ZM: ["Africa/Lusaka"],
3972
4119
  ZW: ["Africa/Harare"]
3973
- }, Me = new Set(j.map(([e]) => e)), Ne = /* @__PURE__ */ new Map();
3974
- for (let [e, t] of Object.entries(je)) for (let n of t) Ne.set(n, e);
3975
- function Pe(e) {
3976
- let t = Ne.get(e);
3977
- return t && Me.has(t) ? t : null;
4120
+ }, Ie = new Set(M.map(([e]) => e)), Le = /* @__PURE__ */ new Map();
4121
+ for (let [e, t] of Object.entries(Fe)) for (let n of t) Le.set(n, e);
4122
+ function Re(e) {
4123
+ let t = Le.get(e);
4124
+ return t && Ie.has(t) ? t : null;
3978
4125
  }
3979
- function Fe(e) {
4126
+ function ze(e) {
3980
4127
  if (!e) return null;
3981
4128
  let t;
3982
4129
  try {
@@ -3984,9 +4131,9 @@ function Fe(e) {
3984
4131
  } catch {
3985
4132
  return null;
3986
4133
  }
3987
- return t && Me.has(t) ? t : null;
4134
+ return t && Ie.has(t) ? t : null;
3988
4135
  }
3989
- function Ie() {
4136
+ function Be() {
3990
4137
  let e;
3991
4138
  try {
3992
4139
  e = Intl.DateTimeFormat().resolvedOptions().timeZone;
@@ -3994,33 +4141,33 @@ function Ie() {
3994
4141
  e = void 0;
3995
4142
  }
3996
4143
  let t = typeof navigator > "u" ? void 0 : navigator.language;
3997
- return Pe(e) || Fe(t) || "IN";
4144
+ return Re(e) || ze(t) || "IN";
3998
4145
  }
3999
4146
  //#endregion
4000
4147
  //#region src/WuiPhone.js
4001
- var Le = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, G = null, Re = null;
4002
- function ze() {
4003
- return G ? Promise.resolve(G) : (Re ||= Promise.all([import("./max-BDKx469G.js"), import("./examples.mobile.json-BMXTGiGC.js")]).then(([e, t]) => (G = {
4148
+ var Ve = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, G = null, He = null;
4149
+ function Ue() {
4150
+ return G ? Promise.resolve(G) : (He ||= Promise.all([import("./max-BDKx469G.js"), import("./examples.mobile.json-BMXTGiGC.js")]).then(([e, t]) => (G = {
4004
4151
  AsYouType: e.AsYouType,
4005
4152
  getExampleNumber: e.getExampleNumber,
4006
4153
  isValidPhoneNumber: e.isValidPhoneNumber,
4007
4154
  parsePhoneNumber: e.parsePhoneNumber,
4008
4155
  examples: t.default || t
4009
- }, G)).catch(() => null), Re);
4156
+ }, G)).catch(() => null), He);
4010
4157
  }
4011
- function Be(e, t) {
4012
- let n = `+${M(e)}`;
4158
+ function We(e, t) {
4159
+ let n = `+${N(e)}`;
4013
4160
  return t?.startsWith(n) ? t.slice(n.length).trimStart() : null;
4014
4161
  }
4015
4162
  function K(e, t) {
4016
4163
  if (!G || !t) return t;
4017
4164
  try {
4018
- return Be(e, new G.AsYouType(e).input(`+${M(e)}${t}`)) || t;
4165
+ return We(e, new G.AsYouType(e).input(`+${N(e)}${t}`)) || t;
4019
4166
  } catch {
4020
4167
  return t;
4021
4168
  }
4022
4169
  }
4023
- function Ve(e, t) {
4170
+ function Ge(e, t) {
4024
4171
  if (t <= 0) return 0;
4025
4172
  let n = 0;
4026
4173
  for (let r = 0; r < e.length; r++) if (/[0-9]/.test(e[r]) && (n += 1, n === t)) return r + 1;
@@ -4029,12 +4176,12 @@ function Ve(e, t) {
4029
4176
  function q(e) {
4030
4177
  if (!G) return null;
4031
4178
  try {
4032
- return Be(e, G.getExampleNumber(e, G.examples)?.formatInternational()) || null;
4179
+ return We(e, G.getExampleNumber(e, G.examples)?.formatInternational()) || null;
4033
4180
  } catch {
4034
4181
  return null;
4035
4182
  }
4036
4183
  }
4037
- function He(e) {
4184
+ function Ke(e) {
4038
4185
  if (!G || !e) return null;
4039
4186
  try {
4040
4187
  if (!G.isValidPhoneNumber(e)) return !1;
@@ -4044,7 +4191,7 @@ function He(e) {
4044
4191
  return null;
4045
4192
  }
4046
4193
  }
4047
- function Ue(e) {
4194
+ function qe(e) {
4048
4195
  if (!G) return null;
4049
4196
  try {
4050
4197
  let t = G.getExampleNumber(e, G.examples);
@@ -4053,7 +4200,7 @@ function Ue(e) {
4053
4200
  return null;
4054
4201
  }
4055
4202
  }
4056
- function We(e, t, n) {
4203
+ function Je(e, t, n) {
4057
4204
  try {
4058
4205
  let r = G.parsePhoneNumber(t, e), i = r?.nationalNumber;
4059
4206
  return !i || r.country !== e || i.length > n || !t.endsWith(i) ? null : i;
@@ -4061,7 +4208,7 @@ function We(e, t, n) {
4061
4208
  return null;
4062
4209
  }
4063
4210
  }
4064
- function Ge(e) {
4211
+ function Ye(e) {
4065
4212
  if (!G || !e?.trim().startsWith("+")) return null;
4066
4213
  try {
4067
4214
  let t = new G.AsYouType();
@@ -4075,7 +4222,7 @@ function Ge(e) {
4075
4222
  return null;
4076
4223
  }
4077
4224
  }
4078
- var Ke = class extends e {
4225
+ var Xe = class extends e {
4079
4226
  static formAssociated = !0;
4080
4227
  static get observedAttributes() {
4081
4228
  return [
@@ -4095,7 +4242,7 @@ var Ke = class extends e {
4095
4242
  } catch {
4096
4243
  this._internals = null;
4097
4244
  }
4098
- this._defaultCountry = Ie(), this._country = this._defaultCountry, this._national = "", this._active = -1, this._committedValue = "";
4245
+ this._defaultCountry = Be(), this._country = this._defaultCountry, this._national = "", this._active = -1, this._committedValue = "";
4099
4246
  }
4100
4247
  connectedCallback() {
4101
4248
  if (!this._rendered) {
@@ -4122,13 +4269,13 @@ var Ke = class extends e {
4122
4269
  this.value = this._defaultValue || "";
4123
4270
  }
4124
4271
  get value() {
4125
- return this._national ? `+${M(this._country)}${this._national}` : "";
4272
+ return this._national ? `+${N(this._country)}${this._national}` : "";
4126
4273
  }
4127
4274
  set value(e) {
4128
- let t = String(e ?? "").trim(), n = Ge(t);
4275
+ let t = String(e ?? "").trim(), n = Ye(t);
4129
4276
  if (n) this._country = n.country, this._national = n.national.replace(/[^0-9]/g, "");
4130
4277
  else if (t.startsWith("+")) {
4131
- let e = t.replace(/[^0-9]/g, ""), n = String(M(this._country));
4278
+ let e = t.replace(/[^0-9]/g, ""), n = String(N(this._country));
4132
4279
  n && e.startsWith(n) && (e = e.slice(n.length)), this._national = e;
4133
4280
  } else this._national = t.replace(/[^0-9]/g, "");
4134
4281
  n && this.getAttribute("country") !== this._country ? this.setAttribute("country", this._country) : this._rendered && this.render(), this._committedValue = this.value, this._syncMirror();
@@ -4148,14 +4295,14 @@ var Ke = class extends e {
4148
4295
  this.id ||= `wui-phone-${Math.random().toString(36).slice(2, 9)}`;
4149
4296
  let t = `${this.id}-listbox`;
4150
4297
  this._listboxId = t;
4151
- let n = j.map(([e, n, r], i) => `<button type="button" role="option" id="${J(`${t}-opt-${i}`)}" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}" aria-selected="${e === this._country}"><span class="${Le(e)}" aria-hidden="true"></span><span class="country-name-text">${n}<span class="country-code-text">+${r}</span></span></button>`).join("");
4298
+ let n = M.map(([e, n, r], i) => `<button type="button" role="option" id="${J(`${t}-opt-${i}`)}" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}" aria-selected="${e === this._country}"><span class="${Ve(e)}" aria-hidden="true"></span><span class="country-name-text">${n}<span class="country-code-text">+${r}</span></span></button>`).join("");
4152
4299
  this.innerHTML = `
4153
4300
  <div class="phone-input-wrap">
4154
4301
  <div class="phone-country-adornment">
4155
4302
  <button type="button" class="country-toggle" aria-label="Choose country" aria-haspopup="listbox" aria-expanded="false" aria-controls="${J(t)}"${this.hasAttribute("disabled") ? " disabled" : ""}>
4156
- <span class="${Le(this._country)}" data-flag aria-hidden="true"></span>
4303
+ <span class="${Ve(this._country)}" data-flag aria-hidden="true"></span>
4157
4304
  ${m("chevron-down", { className: "phone-chevron" })}
4158
- <span class="phone-dial" data-dial>+${M(this._country)}</span>
4305
+ <span class="phone-dial" data-dial>+${N(this._country)}</span>
4159
4306
  </button>
4160
4307
  <div class="country-dropdown-menu" role="listbox" id="${J(t)}" tabindex="-1" hidden>
4161
4308
  <div class="dropdown-search-wrapper"><span class="dropdown-search-icon">${m("search")}</span><input type="text" class="dropdown-search-input" placeholder="Search country or code" aria-label="Search countries" aria-controls="${J(t)}" aria-autocomplete="list" /></div>
@@ -4193,7 +4340,7 @@ var Ke = class extends e {
4193
4340
  }
4194
4341
  a && (a.hidden = n > 0);
4195
4342
  }, v = (e) => {
4196
- this._country = e, this.getAttribute("country") !== e && (this._suppressCountryRender = !0, this.setAttribute("country", e), this._suppressCountryRender = !1), s && (s.className = Le(e)), d && (d.textContent = `+${M(e)}`);
4343
+ this._country = e, this.getAttribute("country") !== e && (this._suppressCountryRender = !0, this.setAttribute("country", e), this._suppressCountryRender = !1), s && (s.className = Ve(e)), d && (d.textContent = `+${N(e)}`);
4197
4344
  for (let t of this._itemEls()) {
4198
4345
  let n = t.dataset.iso === e;
4199
4346
  t.classList.toggle("selected", n), t.setAttribute("aria-selected", String(n));
@@ -4240,23 +4387,23 @@ var Ke = class extends e {
4240
4387
  };
4241
4388
  o.addEventListener("input", (e) => {
4242
4389
  e.stopPropagation();
4243
- let t = o.selectionStart ?? o.value.length, n = o.value.slice(0, t).replace(/[^0-9]/g, "").length, r = o.value.replace(/[^0-9]/g, ""), i = Ue(this._country);
4390
+ let t = o.selectionStart ?? o.value.length, n = o.value.slice(0, t).replace(/[^0-9]/g, "").length, r = o.value.replace(/[^0-9]/g, ""), i = qe(this._country);
4244
4391
  if (i && r.length > i) {
4245
- let e = We(this._country, r, i);
4392
+ let e = Je(this._country, r, i);
4246
4393
  e ? (n = Math.max(0, n - (r.length - e.length)), r = e) : r = r.slice(0, i);
4247
4394
  }
4248
4395
  this._national = r;
4249
4396
  let a = K(this._country, this._national);
4250
4397
  if (o.value !== a) {
4251
4398
  o.value = a;
4252
- let e = Ve(a, Math.min(n, r.length));
4399
+ let e = Ge(a, Math.min(n, r.length));
4253
4400
  o.setSelectionRange(e, e);
4254
4401
  }
4255
- this._syncMirror(), this._emitInput(), o.classList.contains("is-invalid") && (!this._national || He(this.value) === !0) && x(!1);
4402
+ this._syncMirror(), this._emitInput(), o.classList.contains("is-invalid") && (!this._national || Ke(this.value) === !0) && x(!1);
4256
4403
  }), o.addEventListener("change", (e) => e.stopPropagation()), o.addEventListener("blur", () => {
4257
- x(this._national.length > 0 && He(this.value) === !1), this.value !== this._committedValue && this._emitChange();
4404
+ x(this._national.length > 0 && Ke(this.value) === !1), this.value !== this._committedValue && this._emitChange();
4258
4405
  }), o.addEventListener("paste", (e) => {
4259
- let t = Ge(e.clipboardData?.getData("text"));
4406
+ let t = Ye(e.clipboardData?.getData("text"));
4260
4407
  t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value = K(this._country, this._national) : this.setAttribute("country", t.country), this._syncMirror(), this._emitInput(), this._emitChange(), this.querySelector("input[type=tel]")?.focus());
4261
4408
  }), this._bindGlobal = () => {
4262
4409
  this._teardownGlobals?.(), this._onDocClick = (e) => {
@@ -4266,7 +4413,7 @@ var Ke = class extends e {
4266
4413
  });
4267
4414
  }, this._teardownGlobals = () => {
4268
4415
  this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), u(this);
4269
- }, this._bindGlobal(), ze().then((e) => {
4416
+ }, this._bindGlobal(), Ue().then((e) => {
4270
4417
  if (!(!e || !o.isConnected) && (this._national && (o.value = K(this._country, this._national)), !this.getAttribute("placeholder"))) {
4271
4418
  let e = q(this._country);
4272
4419
  e && (o.placeholder = e);
@@ -4279,7 +4426,7 @@ var Ke = class extends e {
4279
4426
  disconnectedCallback() {
4280
4427
  this._teardown();
4281
4428
  }
4282
- }, J = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), qe = class extends e {
4429
+ }, J = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Ze = class extends e {
4283
4430
  static formAssociated = !0;
4284
4431
  static get observedAttributes() {
4285
4432
  return [
@@ -4424,7 +4571,7 @@ var Ke = class extends e {
4424
4571
  aria-valuenow="${this._value}"
4425
4572
  aria-valuetext="${this._formatValue(this._value)}"
4426
4573
  ${a ? "disabled" : ""}
4427
- aria-label="${Je(this.getAttribute("aria-label") || "Value")}"
4574
+ aria-label="${Qe(this.getAttribute("aria-label") || "Value")}"
4428
4575
  ></button>
4429
4576
  `}
4430
4577
  ${this.hasAttribute("show-value") ? n ? `<span class="slider-value">${this._formatValue(this._start)} – ${this._formatValue(this._end)}</span>` : `<span class="slider-value">${this._formatValue(this._value)}</span>` : ""}
@@ -4529,7 +4676,7 @@ var Ke = class extends e {
4529
4676
  }, Y = (e, t) => {
4530
4677
  let n = Number.parseFloat(e);
4531
4678
  return Number.isFinite(n) ? n : t;
4532
- }, Je = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Ye = class extends e {
4679
+ }, Qe = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), $e = class extends e {
4533
4680
  static formAssociated = !0;
4534
4681
  _accessibleName() {
4535
4682
  return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Add tags";
@@ -4614,14 +4761,14 @@ var Ke = class extends e {
4614
4761
  e.innerHTML = "";
4615
4762
  return;
4616
4763
  }
4617
- e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${Xe(e)}</span><button type="button" class="chip-remove" data-remove="${X(e)}" aria-label="Remove ${X(e)}">${m("x")}</button></span>`).join("");
4764
+ e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${et(e)}</span><button type="button" class="chip-remove" data-remove="${X(e)}" aria-label="Remove ${X(e)}">${m("x")}</button></span>`).join("");
4618
4765
  }
4619
4766
  }
4620
4767
  _wire() {
4621
4768
  this._teardown();
4622
4769
  let e = this.querySelector(".search-select-control"), t = this.querySelector("[data-input]");
4623
4770
  if (!e || !t) return;
4624
- let n = () => this.hasAttribute("disabled"), r = (this.getAttribute("separators") || "enter,comma").split(",").map((e) => e.trim()), i = this.getAttribute("max-tags"), a = this.hasAttribute("allow-duplicates"), o = new Set(r.map(he).filter(Boolean)), s = () => {
4771
+ let n = () => this.hasAttribute("disabled"), r = (this.getAttribute("separators") || "enter,comma").split(",").map((e) => e.trim()), i = this.getAttribute("max-tags"), a = this.hasAttribute("allow-duplicates"), o = new Set(r.map(ve).filter(Boolean)), s = () => {
4625
4772
  f(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
4626
4773
  }, c = (e) => {
4627
4774
  let t = e.trim();
@@ -4653,9 +4800,9 @@ var Ke = class extends e {
4653
4800
  e.preventDefault();
4654
4801
  let n = e.clipboardData.getData("text/plain"), a = [];
4655
4802
  for (let e of r) {
4656
- let t = ge(e) ?? e;
4657
- if (U(n, [t])) {
4658
- a.push(..._e(n, [t]));
4803
+ let t = ye(e) ?? e;
4804
+ if (xe(n, [t])) {
4805
+ a.push(...be(n, [t]));
4659
4806
  break;
4660
4807
  }
4661
4808
  }
@@ -4683,18 +4830,18 @@ var Ke = class extends e {
4683
4830
  disconnectedCallback() {
4684
4831
  this._teardown();
4685
4832
  }
4686
- }, Xe = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), X = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Ze = (e) => String(e).padStart(2, "0"), Qe = (e, t) => `${Ze(e)}:${Ze(t)}`, Z = (e) => {
4833
+ }, et = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), X = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), tt = (e) => String(e).padStart(2, "0"), nt = (e, t) => `${tt(e)}:${tt(t)}`, Z = (e) => {
4687
4834
  let t = /^(\d{2}):(\d{2})$/.exec(e || "");
4688
4835
  return t ? {
4689
4836
  h: +t[1],
4690
4837
  m: +t[2]
4691
4838
  } : null;
4692
- }, $e = (e, t = "24") => {
4839
+ }, rt = (e, t = "24") => {
4693
4840
  if (!e) return "";
4694
- if (t === "24") return Qe(e.h, e.m);
4841
+ if (t === "24") return nt(e.h, e.m);
4695
4842
  let n = e.h % 12 || 12, r = e.h >= 12 ? "PM" : "AM";
4696
- return `${n}:${Ze(e.m)} ${r}`;
4697
- }, et = class extends e {
4843
+ return `${n}:${tt(e.m)} ${r}`;
4844
+ }, it = class extends e {
4698
4845
  static formAssociated = !0;
4699
4846
  static get observedAttributes() {
4700
4847
  return [
@@ -4754,7 +4901,7 @@ var Ke = class extends e {
4754
4901
  this.innerHTML = `
4755
4902
  <div class="timepicker">
4756
4903
  <button type="button" class="input timepicker-trigger${i}${t ? " has-value" : ""}" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""}${a ? ` aria-label="${_(a)}"` : ""}${o ? ` aria-describedby="${_(o)}"` : ""}>
4757
- <span data-trigger-label class="${t ? "" : "timepicker-placeholder"}">${t ? $e(t, n) : _(e)}</span>
4904
+ <span data-trigger-label class="${t ? "" : "timepicker-placeholder"}">${t ? rt(t, n) : _(e)}</span>
4758
4905
  ${m("clock")}
4759
4906
  </button>
4760
4907
  <div class="timepicker-pop" role="listbox" tabindex="-1" hidden></div>
@@ -4767,7 +4914,7 @@ var Ke = class extends e {
4767
4914
  let e = this.querySelector(".timepicker-trigger"), t = this.querySelector("[data-trigger-label]");
4768
4915
  if (!t) return;
4769
4916
  let n = Z(this._value), r = this.getAttribute("format") || "24";
4770
- t.textContent = n ? $e(n, r) : this.getAttribute("placeholder") || "Select time", t.classList.toggle("timepicker-placeholder", !n), e?.classList.toggle("has-value", !!n);
4917
+ t.textContent = n ? rt(n, r) : this.getAttribute("placeholder") || "Select time", t.classList.toggle("timepicker-placeholder", !n), e?.classList.toggle("has-value", !!n);
4771
4918
  }
4772
4919
  _buildTimes() {
4773
4920
  let e = Math.max(1, parseInt(this.getAttribute("step") || "30", 10)), t = this.getAttribute("min") || "00:00", n = this.getAttribute("max") || "23:59", r = Z(t) || {
@@ -4788,8 +4935,8 @@ var Ke = class extends e {
4788
4935
  if (!e) return;
4789
4936
  let t = this.getAttribute("format") || "24", n = this._buildTimes(), r = Z(this._value), i = this._focus, a = "";
4790
4937
  for (let e = 0; e < n.length; e++) {
4791
- let o = n[e], s = Qe(o.h, o.m), c = r && r.h === o.h && r.m === o.m;
4792
- a += `<button type="button" class="timepicker-option${c ? " is-selected" : ""}" data-hm="${s}" role="option" tabindex="${i === e ? "0" : "-1"}"${c ? " aria-selected=\"true\"" : ""}>${$e(o, t)}</button>`;
4938
+ let o = n[e], s = nt(o.h, o.m), c = r && r.h === o.h && r.m === o.m;
4939
+ a += `<button type="button" class="timepicker-option${c ? " is-selected" : ""}" data-hm="${s}" role="option" tabindex="${i === e ? "0" : "-1"}"${c ? " aria-selected=\"true\"" : ""}>${rt(o, t)}</button>`;
4793
4940
  }
4794
4941
  e.innerHTML = a, this._focusActive();
4795
4942
  }
@@ -4887,7 +5034,7 @@ var Ke = class extends e {
4887
5034
  disconnectedCallback() {
4888
5035
  this._teardown();
4889
5036
  }
4890
- }, tt = "wui-wizard-step", nt = class extends e {
5037
+ }, at = "wui-wizard-step", ot = class extends e {
4891
5038
  static get observedAttributes() {
4892
5039
  return [
4893
5040
  "active",
@@ -4921,7 +5068,7 @@ var Ke = class extends e {
4921
5068
  this._beforeNext = typeof e == "function" ? e : null;
4922
5069
  }
4923
5070
  get _steps() {
4924
- return [...this.querySelectorAll(`:scope > ${tt}`)];
5071
+ return [...this.querySelectorAll(`:scope > ${at}`)];
4925
5072
  }
4926
5073
  refresh() {
4927
5074
  this._rendered && this._renderChrome();
@@ -4960,7 +5107,7 @@ var Ke = class extends e {
4960
5107
  }
4961
5108
  _reconcileSteps() {
4962
5109
  let e = this._steps, t = this._known;
4963
- if (this._known = e, rt(e, t)) return e;
5110
+ if (this._known = e, st(e, t)) return e;
4964
5111
  let n = (n) => new Set([...n].map((n) => e.indexOf(t[n])).filter((e) => e >= 0));
4965
5112
  this._skipped = n(this._skipped), this._invalid = n(this._invalid);
4966
5113
  let r = t[this._active];
@@ -4980,7 +5127,7 @@ var Ke = class extends e {
4980
5127
  _onStepsMutated() {
4981
5128
  if (!this._rendered) return;
4982
5129
  let e = this._steps;
4983
- (!e.length || this._header.nextElementSibling === e[0] && this._footer.previousElementSibling === e[e.length - 1]) && rt(e, this._known) || (this._renderChrome(), this._observer?.takeRecords());
5130
+ (!e.length || this._header.nextElementSibling === e[0] && this._footer.previousElementSibling === e[e.length - 1]) && st(e, this._known) || (this._renderChrome(), this._observer?.takeRecords());
4984
5131
  }
4985
5132
  _syncPanels(e) {
4986
5133
  e.forEach((e, t) => {
@@ -5084,7 +5231,7 @@ var Ke = class extends e {
5084
5231
  _reflectActive(e) {
5085
5232
  this._reflecting = !0, this.setAttribute("active", String(e)), this._reflecting = !1;
5086
5233
  }
5087
- }, rt = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), Q = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), it = class extends e {
5234
+ }, st = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), Q = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), ct = class extends e {
5088
5235
  static get observedAttributes() {
5089
5236
  return [
5090
5237
  "label",
@@ -5098,8 +5245,8 @@ var Ke = class extends e {
5098
5245
  let e = this.closest("wui-wizard");
5099
5246
  e && typeof e.refresh == "function" && e.refresh();
5100
5247
  }
5101
- }, at = 2e3;
5102
- async function ot(e) {
5248
+ }, lt = 2e3;
5249
+ async function ut(e) {
5103
5250
  try {
5104
5251
  if (navigator.clipboard?.writeText) return await navigator.clipboard.writeText(e), !0;
5105
5252
  } catch {}
@@ -5114,14 +5261,14 @@ async function ot(e) {
5114
5261
  }
5115
5262
  //#endregion
5116
5263
  //#region src/fileValidation.js
5117
- var st = "image/png,image/jpeg,image/webp", ct = 5, lt = {
5264
+ var dt = "image/png,image/jpeg,image/webp", ft = 5, pt = {
5118
5265
  "image/png": [".png"],
5119
5266
  "image/jpeg": [".jpg", ".jpeg"],
5120
5267
  "image/webp": [".webp"],
5121
5268
  "image/gif": [".gif"],
5122
5269
  "image/svg+xml": [".svg"],
5123
5270
  "application/pdf": [".pdf"]
5124
- }, ut = {
5271
+ }, mt = {
5125
5272
  "image/png": "PNG",
5126
5273
  "image/jpeg": "JPG",
5127
5274
  "image/webp": "WEBP",
@@ -5135,7 +5282,7 @@ var st = "image/png,image/jpeg,image/webp", ct = 5, lt = {
5135
5282
  ".gif": "GIF",
5136
5283
  ".svg": "SVG",
5137
5284
  ".pdf": "PDF"
5138
- }, dt = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), ft = [
5285
+ }, ht = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), gt = [
5139
5286
  ".png",
5140
5287
  ".jpg",
5141
5288
  ".jpeg",
@@ -5146,54 +5293,54 @@ var st = "image/png,image/jpeg,image/webp", ct = 5, lt = {
5146
5293
  ".avif",
5147
5294
  ".heic"
5148
5295
  ];
5149
- function pt(e) {
5296
+ function _t(e) {
5150
5297
  if (!e) return !1;
5151
5298
  let t = typeof e == "object" && e.type ? String(e.type).toLowerCase() : "";
5152
5299
  if (t) return t.startsWith("image/");
5153
5300
  let n = typeof e == "string" ? e : e.name || e.url || "", r = String(n).toLowerCase();
5154
- return ft.some((e) => r.endsWith(e));
5301
+ return gt.some((e) => r.endsWith(e));
5155
5302
  }
5156
- function mt(e) {
5157
- let t = dt(e);
5158
- return t.length ? t.every((e) => e.startsWith(".") ? ft.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
5303
+ function vt(e) {
5304
+ let t = ht(e);
5305
+ return t.length ? t.every((e) => e.startsWith(".") ? gt.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
5159
5306
  }
5160
- function ht(e) {
5307
+ function yt(e) {
5161
5308
  let t = [];
5162
- for (let n of dt(e)) {
5163
- let e = ut[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
5309
+ for (let n of ht(e)) {
5310
+ let e = mt[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
5164
5311
  t.includes(e) || t.push(e);
5165
5312
  }
5166
5313
  return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
5167
5314
  }
5168
- function gt(e, t) {
5169
- let n = dt(t);
5315
+ function bt(e, t) {
5316
+ let n = ht(t);
5170
5317
  if (!n.length) return !0;
5171
5318
  let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
5172
- return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (lt[e] || []).some((e) => i.endsWith(e)));
5319
+ return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (pt[e] || []).some((e) => i.endsWith(e)));
5173
5320
  }
5174
- function _t(e, t = {}) {
5321
+ function xt(e, t = {}) {
5175
5322
  if (!e) return null;
5176
- let n = t.accept === void 0 ? st : t.accept, r = t.maxSizeMb === void 0 ? 5 : t.maxSizeMb;
5177
- return gt(e, n) ? r > 0 && e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${ht(n)} file.`;
5323
+ let n = t.accept === void 0 ? dt : t.accept, r = t.maxSizeMb === void 0 ? 5 : t.maxSizeMb;
5324
+ return bt(e, n) ? r > 0 && e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${yt(n)} file.`;
5178
5325
  }
5179
5326
  //#endregion
5180
5327
  //#region src/passwordRules.js
5181
- var vt = {
5328
+ var St = {
5182
5329
  minLength: 8,
5183
5330
  uppercase: !0,
5184
5331
  lowercase: !0,
5185
5332
  digit: !0,
5186
5333
  special: !0,
5187
5334
  uniqueChars: 0
5188
- }, yt = "Password Requirements";
5189
- function bt(e) {
5190
- return e === !0 || e == null ? { ...vt } : {
5191
- ...vt,
5335
+ }, Ct = "Password Requirements";
5336
+ function wt(e) {
5337
+ return e === !0 || e == null ? { ...St } : {
5338
+ ...St,
5192
5339
  ...e
5193
5340
  };
5194
5341
  }
5195
- function xt(e) {
5196
- let t = bt(e), n = [];
5342
+ function Tt(e) {
5343
+ let t = wt(e), n = [];
5197
5344
  if (t.minLength > 0 && n.push({
5198
5345
  key: "length",
5199
5346
  label: `At least ${t.minLength} characters long`,
@@ -5224,25 +5371,25 @@ function xt(e) {
5224
5371
  }
5225
5372
  return n;
5226
5373
  }
5227
- function St(e, t) {
5374
+ function Et(e, t) {
5228
5375
  let n = e == null ? "" : String(e);
5229
- return xt(t).map((e) => ({
5376
+ return Tt(t).map((e) => ({
5230
5377
  key: e.key,
5231
5378
  label: e.label,
5232
5379
  met: e.test(n)
5233
5380
  }));
5234
5381
  }
5235
- function Ct(e, t) {
5236
- return St(e, t).every((e) => e.met);
5382
+ function Dt(e, t) {
5383
+ return Et(e, t).every((e) => e.met);
5237
5384
  }
5238
5385
  //#endregion
5239
5386
  //#region src/index.js
5240
5387
  var $ = (e, t) => {
5241
5388
  typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
5242
5389
  };
5243
- function wt() {
5244
- $("wui-select", N), $("wui-country-select", ce), $("wui-phone", Ke), $("wui-datepicker", le), $("wui-date-range", ue), $("wui-dock", de), $("wui-consent-banner", ie), $("wui-slider", qe), $("wui-timepicker", et), $("wui-autocomplete", S), $("wui-multiselect", ve), $("wui-taginput", Ye), $("wui-otp", Ae), $("wui-status-icon", i), $("wui-wizard-step", it), $("wui-wizard", nt);
5390
+ function Ot() {
5391
+ $("wui-select", P), $("wui-country-select", de), $("wui-phone", Xe), $("wui-datepicker", fe), $("wui-date-range", pe), $("wui-dock", me), $("wui-consent-banner", se), $("wui-slider", Ze), $("wui-timepicker", it), $("wui-autocomplete", S), $("wui-command-palette", ee), $("wui-multiselect", Se), $("wui-taginput", $e), $("wui-otp", Pe), $("wui-status-icon", i), $("wui-wizard-step", ct), $("wui-wizard", ot);
5245
5392
  }
5246
- wt();
5393
+ Ot();
5247
5394
  //#endregion
5248
- export { at as COPY_FEEDBACK_MS, st as DEFAULT_IMAGE_ACCEPT, ct as DEFAULT_MAX_SIZE_MB, vt as DEFAULT_PASSWORD_RULES, yt as DEFAULT_REQUIREMENTS_TITLE, r as STATUS_TONES, S as WuiAutocomplete, ie as WuiConsentBanner, ce as WuiCountrySelect, le as WuiDatePicker, ue as WuiDateRange, de as WuiDock, ve as WuiMultiSelect, Ae as WuiOtp, Ke as WuiPhone, N as WuiSelect, qe as WuiSlider, i as WuiStatusIcon, Ye as WuiTagInput, et as WuiTimePicker, nt as WuiWizard, it as WuiWizardStep, ht as acceptLabel, xt as buildPasswordRules, ot as copyTextToClipboard, wt as defineWeborityElements, St as evaluatePassword, m as glyphSvg, pt as isImageFile, mt as isImageOnlyAccept, gt as matchesAccept, Ct as passwordSatisfies, _t as validateFile };
5395
+ export { lt as COPY_FEEDBACK_MS, dt as DEFAULT_IMAGE_ACCEPT, ft as DEFAULT_MAX_SIZE_MB, St as DEFAULT_PASSWORD_RULES, Ct as DEFAULT_REQUIREMENTS_TITLE, r as STATUS_TONES, S as WuiAutocomplete, ee as WuiCommandPalette, se as WuiConsentBanner, de as WuiCountrySelect, fe as WuiDatePicker, pe as WuiDateRange, me as WuiDock, Se as WuiMultiSelect, Pe as WuiOtp, Xe as WuiPhone, P as WuiSelect, Ze as WuiSlider, i as WuiStatusIcon, $e as WuiTagInput, it as WuiTimePicker, ot as WuiWizard, ct as WuiWizardStep, yt as acceptLabel, Tt as buildPasswordRules, ut as copyTextToClipboard, Ot as defineWeborityElements, Et as evaluatePassword, m as glyphSvg, _t as isImageFile, vt as isImageOnlyAccept, T as matchSegments, bt as matchesAccept, Dt as passwordSatisfies, xt as validateFile };