intl-tel-input 24.5.2 → 24.6.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.
@@ -1,5 +1,5 @@
1
- import { mergeModels as n2, useModel as A2, ref as I1, onMounted as L2, watch as T2, onUnmounted as E2, withDirectives as D2, openBlock as M2, createElementBlock as x2, mergeProps as P2, vModelText as R2 } from "vue";
2
- const i2 = [
1
+ import { mergeModels as i2, useModel as T2, ref as I1, onMounted as N2, watch as A2, onUnmounted as E2, withDirectives as D2, openBlock as M2, createElementBlock as P2, mergeProps as x2, vModelText as R2 } from "vue";
2
+ const n2 = [
3
3
  [
4
4
  "af",
5
5
  // Afghanistan
@@ -1306,8 +1306,8 @@ const i2 = [
1306
1306
  "263"
1307
1307
  ]
1308
1308
  ], H = [];
1309
- for (let y = 0; y < i2.length; y++) {
1310
- const e = i2[y];
1309
+ for (let y = 0; y < n2.length; y++) {
1310
+ const e = n2[y];
1311
1311
  H[y] = {
1312
1312
  name: "",
1313
1313
  // this is now populated in the plugin
@@ -1607,6 +1607,8 @@ const u2 = {
1607
1607
  i18n: {},
1608
1608
  //* Initial country.
1609
1609
  initialCountry: "",
1610
+ //* Specify the path to the libphonenumber script to enable validation/formatting.
1611
+ loadUtilsOnInit: "",
1610
1612
  //* National vs international formatting for numbers e.g. placeholders and displaying existing numbers.
1611
1613
  nationalMode: !0,
1612
1614
  //* Display only these countries.
@@ -1627,7 +1629,7 @@ const u2 = {
1627
1629
  navigator.userAgent
1628
1630
  ) || window.innerWidth <= 500
1629
1631
  ) : !1,
1630
- //* Specify the path to the libphonenumber script to enable validation/formatting.
1632
+ //* Deprecated! Use `loadUtilsOnInit` instead.
1631
1633
  utilsScript: "",
1632
1634
  //* The number type to enforce during validation.
1633
1635
  validationNumberType: "MOBILE"
@@ -1652,43 +1654,43 @@ const u2 = {
1652
1654
  ], f1 = (y) => y.replace(/\D/g, ""), r2 = (y = "") => y.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), s2 = (y) => {
1653
1655
  const e = f1(y);
1654
1656
  if (e.charAt(0) === "1") {
1655
- const n = e.substr(1, 3);
1656
- return G2.indexOf(n) !== -1;
1657
+ const i = e.substr(1, 3);
1658
+ return G2.indexOf(i) !== -1;
1657
1659
  }
1658
1660
  return !1;
1659
- }, F2 = (y, e, n, r) => {
1660
- if (n === 0 && !r)
1661
+ }, U2 = (y, e, i, n) => {
1662
+ if (i === 0 && !n)
1661
1663
  return 0;
1662
1664
  let o = 0;
1663
1665
  for (let a = 0; a < e.length; a++) {
1664
- if (/[+0-9]/.test(e[a]) && o++, o === y && !r)
1666
+ if (/[+0-9]/.test(e[a]) && o++, o === y && !n)
1665
1667
  return a + 1;
1666
- if (r && o === y + 1)
1668
+ if (n && o === y + 1)
1667
1669
  return a;
1668
1670
  }
1669
1671
  return e.length;
1670
- }, T = (y, e, n) => {
1671
- const r = document.createElement(y);
1672
- return e && Object.entries(e).forEach(([o, a]) => r.setAttribute(o, a)), n && n.appendChild(r), r;
1673
- }, $1 = (y) => {
1674
- const { instances: e } = C;
1675
- Object.values(e).forEach((n) => n[y]());
1672
+ }, A = (y, e, i) => {
1673
+ const n = document.createElement(y);
1674
+ return e && Object.entries(e).forEach(([o, a]) => n.setAttribute(o, a)), i && i.appendChild(n), n;
1675
+ }, $1 = (y, ...e) => {
1676
+ const { instances: i } = m;
1677
+ Object.values(i).forEach((n) => n[y](...e));
1676
1678
  };
1677
- class U2 {
1678
- constructor(e, n = {}) {
1679
- this.id = O2++, this.telInput = e, this.highlightedItem = null, this.options = Object.assign({}, u2, n), this.hadInitialPlaceholder = !!e.getAttribute("placeholder");
1679
+ class F2 {
1680
+ constructor(e, i = {}) {
1681
+ this.id = O2++, this.telInput = e, this.highlightedItem = null, this.options = Object.assign({}, u2, i), this.hadInitialPlaceholder = !!e.getAttribute("placeholder");
1680
1682
  }
1681
1683
  //* Can't be private as it's called from intlTelInput convenience wrapper.
1682
1684
  _init() {
1683
1685
  this.options.useFullscreenPopup && (this.options.fixDropdownWidth = !1), this.options.onlyCountries.length === 1 && (this.options.initialCountry = this.options.onlyCountries[0]), this.options.separateDialCode && (this.options.nationalMode = !1), this.options.allowDropdown && !this.options.showFlags && !this.options.separateDialCode && (this.options.nationalMode = !1), this.options.useFullscreenPopup && !this.options.dropdownContainer && (this.options.dropdownContainer = document.body), this.isAndroid = typeof navigator < "u" ? /Android/i.test(navigator.userAgent) : !1, this.isRTL = !!this.telInput.closest("[dir=rtl]");
1684
1686
  const e = this.options.allowDropdown || this.options.separateDialCode;
1685
1687
  this.showSelectedCountryOnLeft = this.isRTL ? !e : e, this.options.separateDialCode && (this.isRTL ? this.originalPaddingRight = this.telInput.style.paddingRight : this.originalPaddingLeft = this.telInput.style.paddingLeft), this.options.i18n = { ...o2, ...this.options.i18n };
1686
- const n = new Promise((o, a) => {
1688
+ const i = new Promise((o, a) => {
1687
1689
  this.resolveAutoCountryPromise = o, this.rejectAutoCountryPromise = a;
1688
- }), r = new Promise((o, a) => {
1690
+ }), n = new Promise((o, a) => {
1689
1691
  this.resolveUtilsScriptPromise = o, this.rejectUtilsScriptPromise = a;
1690
1692
  });
1691
- this.promise = Promise.all([n, r]), this.selectedCountryData = {}, this._processCountryData(), this._generateMarkup(), this._setInitialState(), this._initListeners(), this._initRequests();
1693
+ this.promise = Promise.all([i, n]), this.selectedCountryData = {}, this._processCountryData(), this._generateMarkup(), this._setInitialState(), this._initListeners(), this._initRequests();
1692
1694
  }
1693
1695
  //********************
1694
1696
  //* PRIVATE METHODS
@@ -1699,41 +1701,41 @@ class U2 {
1699
1701
  }
1700
1702
  //* Sort countries by countryOrder option (if present), then name.
1701
1703
  _sortCountries() {
1702
- this.options.countryOrder && (this.options.countryOrder = this.options.countryOrder.map((e) => e.toLowerCase())), this.countries.sort((e, n) => {
1703
- const { countryOrder: r } = this.options;
1704
- if (r) {
1705
- const o = r.indexOf(e.iso2), a = r.indexOf(n.iso2), c = o > -1, g = a > -1;
1704
+ this.options.countryOrder && (this.options.countryOrder = this.options.countryOrder.map((e) => e.toLowerCase())), this.countries.sort((e, i) => {
1705
+ const { countryOrder: n } = this.options;
1706
+ if (n) {
1707
+ const o = n.indexOf(e.iso2), a = n.indexOf(i.iso2), c = o > -1, g = a > -1;
1706
1708
  if (c || g)
1707
1709
  return c && g ? o - a : c ? -1 : 1;
1708
1710
  }
1709
- return e.name.localeCompare(n.name);
1711
+ return e.name.localeCompare(i.name);
1710
1712
  });
1711
1713
  }
1712
1714
  //* Add a dial code to this.dialCodeToIso2Map.
1713
- _addToDialCodeMap(e, n, r) {
1714
- n.length > this.dialCodeMaxLen && (this.dialCodeMaxLen = n.length), this.dialCodeToIso2Map.hasOwnProperty(n) || (this.dialCodeToIso2Map[n] = []);
1715
- for (let a = 0; a < this.dialCodeToIso2Map[n].length; a++)
1716
- if (this.dialCodeToIso2Map[n][a] === e)
1715
+ _addToDialCodeMap(e, i, n) {
1716
+ i.length > this.dialCodeMaxLen && (this.dialCodeMaxLen = i.length), this.dialCodeToIso2Map.hasOwnProperty(i) || (this.dialCodeToIso2Map[i] = []);
1717
+ for (let a = 0; a < this.dialCodeToIso2Map[i].length; a++)
1718
+ if (this.dialCodeToIso2Map[i][a] === e)
1717
1719
  return;
1718
- const o = r !== void 0 ? r : this.dialCodeToIso2Map[n].length;
1719
- this.dialCodeToIso2Map[n][o] = e;
1720
+ const o = n !== void 0 ? n : this.dialCodeToIso2Map[i].length;
1721
+ this.dialCodeToIso2Map[i][o] = e;
1720
1722
  }
1721
1723
  //* Process onlyCountries or excludeCountries array if present.
1722
1724
  _processAllCountries() {
1723
- const { onlyCountries: e, excludeCountries: n } = this.options;
1725
+ const { onlyCountries: e, excludeCountries: i } = this.options;
1724
1726
  if (e.length) {
1725
- const r = e.map(
1727
+ const n = e.map(
1726
1728
  (o) => o.toLowerCase()
1727
1729
  );
1728
1730
  this.countries = H.filter(
1729
- (o) => r.indexOf(o.iso2) > -1
1731
+ (o) => n.indexOf(o.iso2) > -1
1730
1732
  );
1731
- } else if (n.length) {
1732
- const r = n.map(
1733
+ } else if (i.length) {
1734
+ const n = i.map(
1733
1735
  (o) => o.toLowerCase()
1734
1736
  );
1735
1737
  this.countries = H.filter(
1736
- (o) => r.indexOf(o.iso2) === -1
1738
+ (o) => n.indexOf(o.iso2) === -1
1737
1739
  );
1738
1740
  } else
1739
1741
  this.countries = H;
@@ -1741,28 +1743,28 @@ class U2 {
1741
1743
  //* Translate Countries by object literal provided on config.
1742
1744
  _translateCountryNames() {
1743
1745
  for (let e = 0; e < this.countries.length; e++) {
1744
- const n = this.countries[e].iso2.toLowerCase();
1745
- this.options.i18n.hasOwnProperty(n) && (this.countries[e].name = this.options.i18n[n]);
1746
+ const i = this.countries[e].iso2.toLowerCase();
1747
+ this.options.i18n.hasOwnProperty(i) && (this.countries[e].name = this.options.i18n[i]);
1746
1748
  }
1747
1749
  }
1748
1750
  //* Generate this.dialCodes and this.dialCodeToIso2Map.
1749
1751
  _processDialCodes() {
1750
1752
  this.dialCodes = {}, this.dialCodeMaxLen = 0, this.dialCodeToIso2Map = {};
1751
1753
  for (let e = 0; e < this.countries.length; e++) {
1752
- const n = this.countries[e];
1753
- this.dialCodes[n.dialCode] || (this.dialCodes[n.dialCode] = !0), this._addToDialCodeMap(n.iso2, n.dialCode, n.priority);
1754
+ const i = this.countries[e];
1755
+ this.dialCodes[i.dialCode] || (this.dialCodes[i.dialCode] = !0), this._addToDialCodeMap(i.iso2, i.dialCode, i.priority);
1754
1756
  }
1755
1757
  for (let e = 0; e < this.countries.length; e++) {
1756
- const n = this.countries[e];
1757
- if (n.areaCodes) {
1758
- const r = this.dialCodeToIso2Map[n.dialCode][0];
1759
- for (let o = 0; o < n.areaCodes.length; o++) {
1760
- const a = n.areaCodes[o];
1758
+ const i = this.countries[e];
1759
+ if (i.areaCodes) {
1760
+ const n = this.dialCodeToIso2Map[i.dialCode][0];
1761
+ for (let o = 0; o < i.areaCodes.length; o++) {
1762
+ const a = i.areaCodes[o];
1761
1763
  for (let c = 1; c < a.length; c++) {
1762
- const g = n.dialCode + a.substr(0, c);
1763
- this._addToDialCodeMap(r, g), this._addToDialCodeMap(n.iso2, g);
1764
+ const g = i.dialCode + a.substr(0, c);
1765
+ this._addToDialCodeMap(n, g), this._addToDialCodeMap(i.iso2, g);
1764
1766
  }
1765
- this._addToDialCodeMap(n.iso2, n.dialCode + a);
1767
+ this._addToDialCodeMap(i.iso2, i.dialCode + a);
1766
1768
  }
1767
1769
  }
1768
1770
  }
@@ -1773,8 +1775,8 @@ class U2 {
1773
1775
  this.telInput.classList.add("iti__tel-input"), !this.telInput.hasAttribute("autocomplete") && !(this.telInput.form && this.telInput.form.hasAttribute("autocomplete")) && this.telInput.setAttribute("autocomplete", "off");
1774
1776
  const {
1775
1777
  allowDropdown: e,
1776
- separateDialCode: n,
1777
- showFlags: r,
1778
+ separateDialCode: i,
1779
+ showFlags: n,
1778
1780
  containerClass: o,
1779
1781
  hiddenInput: a,
1780
1782
  dropdownContainer: c,
@@ -1784,14 +1786,14 @@ class U2 {
1784
1786
  i18n: _
1785
1787
  } = this.options;
1786
1788
  let I = "iti";
1787
- e && (I += " iti--allow-dropdown"), r && (I += " iti--show-flags"), o && (I += ` ${o}`), f || (I += " iti--inline-dropdown");
1788
- const N = T("div", { class: I });
1789
- if ((v = this.telInput.parentNode) == null || v.insertBefore(N, this.telInput), e || r || n) {
1790
- this.countryContainer = T(
1789
+ e && (I += " iti--allow-dropdown"), n && (I += " iti--show-flags"), o && (I += ` ${o}`), f || (I += " iti--inline-dropdown");
1790
+ const L = A("div", { class: I });
1791
+ if ((v = this.telInput.parentNode) == null || v.insertBefore(L, this.telInput), e || n || i) {
1792
+ this.countryContainer = A(
1791
1793
  "div",
1792
1794
  { class: "iti__country-container" },
1793
- N
1794
- ), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", e ? (this.selectedCountry = T(
1795
+ L
1796
+ ), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", e ? (this.selectedCountry = A(
1795
1797
  "button",
1796
1798
  {
1797
1799
  type: "button",
@@ -1803,30 +1805,30 @@ class U2 {
1803
1805
  role: "combobox"
1804
1806
  },
1805
1807
  this.countryContainer
1806
- ), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = T(
1808
+ ), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = A(
1807
1809
  "div",
1808
1810
  { class: "iti__selected-country" },
1809
1811
  this.countryContainer
1810
1812
  );
1811
- const A = T("div", { class: "iti__selected-country-primary" }, this.selectedCountry);
1812
- if (this.selectedCountryInner = T("div", { class: "iti__flag" }, A), this.selectedCountryA11yText = T(
1813
+ const T = A("div", { class: "iti__selected-country-primary" }, this.selectedCountry);
1814
+ if (this.selectedCountryInner = A("div", { class: "iti__flag" }, T), this.selectedCountryA11yText = A(
1813
1815
  "span",
1814
1816
  { class: "iti__a11y-text" },
1815
1817
  this.selectedCountryInner
1816
- ), e && (this.dropdownArrow = T(
1818
+ ), e && (this.dropdownArrow = A(
1817
1819
  "div",
1818
1820
  { class: "iti__arrow", "aria-hidden": "true" },
1819
- A
1820
- )), n && (this.selectedDialCode = T(
1821
+ T
1822
+ )), i && (this.selectedDialCode = A(
1821
1823
  "div",
1822
1824
  { class: "iti__selected-dial-code" },
1823
1825
  this.selectedCountry
1824
1826
  )), e) {
1825
1827
  const M = g ? "" : "iti--flexible-dropdown-width";
1826
- if (this.dropdownContent = T("div", {
1828
+ if (this.dropdownContent = A("div", {
1827
1829
  id: `iti-${this.id}__dropdown-content`,
1828
1830
  class: `iti__dropdown-content iti__hide ${M}`
1829
- }), b && (this.searchInput = T(
1831
+ }), b && (this.searchInput = A(
1830
1832
  "input",
1831
1833
  {
1832
1834
  type: "text",
@@ -1840,11 +1842,11 @@ class U2 {
1840
1842
  autocomplete: "off"
1841
1843
  },
1842
1844
  this.dropdownContent
1843
- ), this.searchResultsA11yText = T(
1845
+ ), this.searchResultsA11yText = A(
1844
1846
  "span",
1845
1847
  { class: "iti__a11y-text" },
1846
1848
  this.dropdownContent
1847
- )), this.countryList = T(
1849
+ )), this.countryList = A(
1848
1850
  "ul",
1849
1851
  {
1850
1852
  class: "iti__country-list",
@@ -1855,48 +1857,48 @@ class U2 {
1855
1857
  this.dropdownContent
1856
1858
  ), this._appendListItems(), b && this._updateSearchResultsText(), c) {
1857
1859
  let O = "iti iti--container";
1858
- f ? O += " iti--fullscreen-popup" : O += " iti--inline-dropdown", this.dropdown = T("div", { class: O }), this.dropdown.appendChild(this.dropdownContent);
1860
+ f ? O += " iti--fullscreen-popup" : O += " iti--inline-dropdown", this.dropdown = A("div", { class: O }), this.dropdown.appendChild(this.dropdownContent);
1859
1861
  } else
1860
1862
  this.countryContainer.appendChild(this.dropdownContent);
1861
1863
  }
1862
1864
  }
1863
- if (N.appendChild(this.telInput), this._updateInputPadding(), a) {
1864
- const A = this.telInput.getAttribute("name") || "", M = a(A);
1865
- M.phone && (this.hiddenInput = T("input", {
1865
+ if (L.appendChild(this.telInput), this._updateInputPadding(), a) {
1866
+ const T = this.telInput.getAttribute("name") || "", M = a(T);
1867
+ M.phone && (this.hiddenInput = A("input", {
1866
1868
  type: "hidden",
1867
1869
  name: M.phone
1868
- }), N.appendChild(this.hiddenInput)), M.country && (this.hiddenInputCountry = T("input", {
1870
+ }), L.appendChild(this.hiddenInput)), M.country && (this.hiddenInputCountry = A("input", {
1869
1871
  type: "hidden",
1870
1872
  name: M.country
1871
- }), N.appendChild(this.hiddenInputCountry));
1873
+ }), L.appendChild(this.hiddenInputCountry));
1872
1874
  }
1873
1875
  }
1874
1876
  //* For each country: add a country list item <li> to the countryList <ul> container.
1875
1877
  _appendListItems() {
1876
1878
  for (let e = 0; e < this.countries.length; e++) {
1877
- const n = this.countries[e], r = e === 0 ? "iti__highlight" : "", o = T(
1879
+ const i = this.countries[e], n = e === 0 ? "iti__highlight" : "", o = A(
1878
1880
  "li",
1879
1881
  {
1880
- id: `iti-${this.id}__item-${n.iso2}`,
1881
- class: `iti__country ${r}`,
1882
+ id: `iti-${this.id}__item-${i.iso2}`,
1883
+ class: `iti__country ${n}`,
1882
1884
  tabindex: "-1",
1883
1885
  role: "option",
1884
- "data-dial-code": n.dialCode,
1885
- "data-country-code": n.iso2,
1886
+ "data-dial-code": i.dialCode,
1887
+ "data-country-code": i.iso2,
1886
1888
  "aria-selected": "false"
1887
1889
  },
1888
1890
  this.countryList
1889
1891
  );
1890
- n.nodeById[this.id] = o;
1892
+ i.nodeById[this.id] = o;
1891
1893
  let a = "";
1892
- this.options.showFlags && (a += `<div class='iti__flag iti__${n.iso2}'></div>`), a += `<span class='iti__country-name'>${n.name}</span>`, a += `<span class='iti__dial-code'>+${n.dialCode}</span>`, o.insertAdjacentHTML("beforeend", a);
1894
+ this.options.showFlags && (a += `<div class='iti__flag iti__${i.iso2}'></div>`), a += `<span class='iti__country-name'>${i.name}</span>`, a += `<span class='iti__dial-code'>+${i.dialCode}</span>`, o.insertAdjacentHTML("beforeend", a);
1893
1895
  }
1894
1896
  }
1895
1897
  //* Set the initial state of the input value and the selected country by:
1896
1898
  //* 1. Extracting a dial code from the given number
1897
1899
  //* 2. Using explicit initialCountry
1898
1900
  _setInitialState(e = !1) {
1899
- const n = this.telInput.getAttribute("value"), r = this.telInput.value, a = n && n.charAt(0) === "+" && (!r || r.charAt(0) !== "+") ? n : r, c = this._getDialCode(a), g = s2(a), { initialCountry: f, geoIpLookup: b } = this.options, _ = f === "auto" && b;
1901
+ const i = this.telInput.getAttribute("value"), n = this.telInput.value, a = i && i.charAt(0) === "+" && (!n || n.charAt(0) !== "+") ? i : n, c = this._getDialCode(a), g = s2(a), { initialCountry: f, geoIpLookup: b } = this.options, _ = f === "auto" && b;
1900
1902
  if (c && !g)
1901
1903
  this._updateCountryFromNumber(a);
1902
1904
  else if (!_ || e) {
@@ -1921,14 +1923,14 @@ class U2 {
1921
1923
  }
1922
1924
  //* initialise the dropdown listeners.
1923
1925
  _initDropdownListeners() {
1924
- this._handleLabelClick = (n) => {
1925
- this.dropdownContent.classList.contains("iti__hide") ? this.telInput.focus() : n.preventDefault();
1926
+ this._handleLabelClick = (i) => {
1927
+ this.dropdownContent.classList.contains("iti__hide") ? this.telInput.focus() : i.preventDefault();
1926
1928
  };
1927
1929
  const e = this.telInput.closest("label");
1928
1930
  e && e.addEventListener("click", this._handleLabelClick), this._handleClickSelectedCountry = () => {
1929
1931
  this.dropdownContent.classList.contains("iti__hide") && !this.telInput.disabled && !this.telInput.readOnly && this._openDropdown();
1930
- }, this.selectedCountry.addEventListener("click", this._handleClickSelectedCountry), this._handleCountryContainerKeydown = (n) => {
1931
- this.dropdownContent.classList.contains("iti__hide") && ["ArrowUp", "ArrowDown", " ", "Enter"].includes(n.key) && (n.preventDefault(), n.stopPropagation(), this._openDropdown()), n.key === "Tab" && this._closeDropdown();
1932
+ }, this.selectedCountry.addEventListener("click", this._handleClickSelectedCountry), this._handleCountryContainerKeydown = (i) => {
1933
+ this.dropdownContent.classList.contains("iti__hide") && ["ArrowUp", "ArrowDown", " ", "Enter"].includes(i.key) && (i.preventDefault(), i.stopPropagation(), this._openDropdown()), i.key === "Tab" && this._closeDropdown();
1932
1934
  }, this.countryContainer.addEventListener(
1933
1935
  "keydown",
1934
1936
  this._handleCountryContainerKeydown
@@ -1936,17 +1938,19 @@ class U2 {
1936
1938
  }
1937
1939
  //* Init many requests: utils script / geo ip lookup.
1938
1940
  _initRequests() {
1939
- const { utilsScript: e, initialCountry: n, geoIpLookup: r } = this.options;
1940
- e && !C.utils ? C.documentReady() ? C.loadUtils(e) : window.addEventListener("load", () => {
1941
- C.loadUtils(e);
1942
- }) : this.resolveUtilsScriptPromise(), n === "auto" && r && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
1941
+ let { loadUtilsOnInit: e, utilsScript: i, initialCountry: n, geoIpLookup: o } = this.options;
1942
+ !e && i && (console.warn("intl-tel-input: The `utilsScript` option is deprecated and will be removed in a future release! Please use the `loadUtilsOnInit` option instead."), e = i), e && !m.utils ? (this._handlePageLoad = () => {
1943
+ var c;
1944
+ window.removeEventListener("load", this._handlePageLoad), (c = m.loadUtils(e)) == null || c.catch(() => {
1945
+ });
1946
+ }, m.documentReady() ? this._handlePageLoad() : window.addEventListener("load", this._handlePageLoad)) : this.resolveUtilsScriptPromise(), n === "auto" && o && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
1943
1947
  }
1944
1948
  //* Perform the geo ip lookup.
1945
1949
  _loadAutoCountry() {
1946
- C.autoCountry ? this.handleAutoCountry() : C.startedLoadingAutoCountry || (C.startedLoadingAutoCountry = !0, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(
1950
+ m.autoCountry ? this.handleAutoCountry() : m.startedLoadingAutoCountry || (m.startedLoadingAutoCountry = !0, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(
1947
1951
  (e = "") => {
1948
- const n = e.toLowerCase();
1949
- n && this._getCountryData(n, !0) ? (C.autoCountry = n, setTimeout(() => $1("handleAutoCountry"))) : (this._setInitialState(!0), $1("rejectAutoCountryPromise"));
1952
+ const i = e.toLowerCase();
1953
+ i && this._getCountryData(i, !0) ? (m.autoCountry = i, setTimeout(() => $1("handleAutoCountry"))) : (this._setInitialState(!0), $1("rejectAutoCountryPromise"));
1950
1954
  },
1951
1955
  () => {
1952
1956
  this._setInitialState(!0), $1("rejectAutoCountryPromise");
@@ -1958,68 +1962,68 @@ class U2 {
1958
1962
  }
1959
1963
  //* Initialize the tel input listeners.
1960
1964
  _initTelInputListeners() {
1961
- const { strictMode: e, formatAsYouType: n, separateDialCode: r, formatOnDisplay: o, allowDropdown: a, countrySearch: c } = this.options;
1965
+ const { strictMode: e, formatAsYouType: i, separateDialCode: n, formatOnDisplay: o, allowDropdown: a, countrySearch: c } = this.options;
1962
1966
  let g = !1;
1963
1967
  new RegExp("\\p{L}", "u").test(this.telInput.value) && (g = !0), this._handleInputEvent = (f) => {
1964
- if (this.isAndroid && (f == null ? void 0 : f.data) === "+" && r && a && c) {
1965
- const N = this.telInput.selectionStart || 0, v = this.telInput.value.substring(0, N - 1), A = this.telInput.value.substring(N);
1966
- this.telInput.value = v + A, this._openDropdownWithPlus();
1968
+ if (this.isAndroid && (f == null ? void 0 : f.data) === "+" && n && a && c) {
1969
+ const L = this.telInput.selectionStart || 0, v = this.telInput.value.substring(0, L - 1), T = this.telInput.value.substring(L);
1970
+ this.telInput.value = v + T, this._openDropdownWithPlus();
1967
1971
  return;
1968
1972
  }
1969
1973
  this._updateCountryFromNumber(this.telInput.value) && this._triggerCountryChange();
1970
1974
  const b = (f == null ? void 0 : f.data) && /[^+0-9]/.test(f.data), _ = (f == null ? void 0 : f.inputType) === "insertFromPaste" && this.telInput.value;
1971
1975
  b || _ && !e ? g = !0 : /[^+0-9]/.test(this.telInput.value) || (g = !1);
1972
1976
  const I = (f == null ? void 0 : f.detail) && f.detail.isSetNumber && !o;
1973
- if (n && !g && !I) {
1974
- const N = this.telInput.selectionStart || 0, A = this.telInput.value.substring(0, N).replace(/[^+0-9]/g, "").length, M = (f == null ? void 0 : f.inputType) === "deleteContentForward", O = this._formatNumberAsYouType(), Z = F2(A, O, N, M);
1977
+ if (i && !g && !I) {
1978
+ const L = this.telInput.selectionStart || 0, T = this.telInput.value.substring(0, L).replace(/[^+0-9]/g, "").length, M = (f == null ? void 0 : f.inputType) === "deleteContentForward", O = this._formatNumberAsYouType(), Z = U2(T, O, L, M);
1975
1979
  this.telInput.value = O, this.telInput.setSelectionRange(Z, Z);
1976
1980
  }
1977
- }, this.telInput.addEventListener("input", this._handleInputEvent), (e || r) && (this._handleKeydownEvent = (f) => {
1981
+ }, this.telInput.addEventListener("input", this._handleInputEvent), (e || n) && (this._handleKeydownEvent = (f) => {
1978
1982
  if (f.key && f.key.length === 1 && !f.altKey && !f.ctrlKey && !f.metaKey) {
1979
- if (r && a && c && f.key === "+") {
1983
+ if (n && a && c && f.key === "+") {
1980
1984
  f.preventDefault(), this._openDropdownWithPlus();
1981
1985
  return;
1982
1986
  }
1983
1987
  if (e) {
1984
- const b = this.telInput.value, _ = b.charAt(0) === "+", I = !_ && this.telInput.selectionStart === 0 && f.key === "+", N = /^[0-9]$/.test(f.key), v = r ? N : I || N, A = b.slice(0, this.telInput.selectionStart) + f.key + b.slice(this.telInput.selectionEnd), M = this._getFullNumber(A), O = C.utils.getCoreNumber(M, this.selectedCountryData.iso2), Z = this.maxCoreNumberLength && O.length > this.maxCoreNumberLength;
1985
- let n1 = !1;
1988
+ const b = this.telInput.value, _ = b.charAt(0) === "+", I = !_ && this.telInput.selectionStart === 0 && f.key === "+", L = /^[0-9]$/.test(f.key), v = n ? L : I || L, T = b.slice(0, this.telInput.selectionStart) + f.key + b.slice(this.telInput.selectionEnd), M = this._getFullNumber(T), O = m.utils.getCoreNumber(M, this.selectedCountryData.iso2), Z = this.maxCoreNumberLength && O.length > this.maxCoreNumberLength;
1989
+ let i1 = !1;
1986
1990
  if (_) {
1987
1991
  const p1 = this.selectedCountryData.iso2;
1988
- n1 = this._getCountryFromNumber(M) !== p1;
1992
+ i1 = this._getCountryFromNumber(M) !== p1;
1989
1993
  }
1990
- (!v || Z && !n1 && !I) && f.preventDefault();
1994
+ (!v || Z && !i1 && !I) && f.preventDefault();
1991
1995
  }
1992
1996
  }
1993
1997
  }, this.telInput.addEventListener("keydown", this._handleKeydownEvent));
1994
1998
  }
1995
1999
  //* Adhere to the input's maxlength attr.
1996
2000
  _cap(e) {
1997
- const n = parseInt(this.telInput.getAttribute("maxlength") || "", 10);
1998
- return n && e.length > n ? e.substr(0, n) : e;
2001
+ const i = parseInt(this.telInput.getAttribute("maxlength") || "", 10);
2002
+ return i && e.length > i ? e.substr(0, i) : e;
1999
2003
  }
2000
2004
  //* Trigger a custom event on the input.
2001
- _trigger(e, n = {}) {
2002
- const r = new CustomEvent(e, {
2005
+ _trigger(e, i = {}) {
2006
+ const n = new CustomEvent(e, {
2003
2007
  bubbles: !0,
2004
2008
  cancelable: !0,
2005
- detail: n
2009
+ detail: i
2006
2010
  });
2007
- this.telInput.dispatchEvent(r);
2011
+ this.telInput.dispatchEvent(n);
2008
2012
  }
2009
2013
  //* Open the dropdown.
2010
2014
  _openDropdown() {
2011
- const { fixDropdownWidth: e, countrySearch: n } = this.options;
2012
- if (e && (this.dropdownContent.style.width = `${this.telInput.offsetWidth}px`), this.dropdownContent.classList.remove("iti__hide"), this.selectedCountry.setAttribute("aria-expanded", "true"), this._setDropdownPosition(), n) {
2013
- const r = this.countryList.firstElementChild;
2014
- r && (this._highlightListItem(r, !1), this.countryList.scrollTop = 0), this.searchInput.focus();
2015
+ const { fixDropdownWidth: e, countrySearch: i } = this.options;
2016
+ if (e && (this.dropdownContent.style.width = `${this.telInput.offsetWidth}px`), this.dropdownContent.classList.remove("iti__hide"), this.selectedCountry.setAttribute("aria-expanded", "true"), this._setDropdownPosition(), i) {
2017
+ const n = this.countryList.firstElementChild;
2018
+ n && (this._highlightListItem(n, !1), this.countryList.scrollTop = 0), this.searchInput.focus();
2015
2019
  }
2016
2020
  this._bindDropdownListeners(), this.dropdownArrow.classList.add("iti__arrow--up"), this._trigger("open:countrydropdown");
2017
2021
  }
2018
2022
  //* Set the dropdown position
2019
2023
  _setDropdownPosition() {
2020
2024
  if (this.options.dropdownContainer && this.options.dropdownContainer.appendChild(this.dropdown), !this.options.useFullscreenPopup) {
2021
- const e = this.telInput.getBoundingClientRect(), n = this.telInput.offsetHeight;
2022
- this.options.dropdownContainer && (this.dropdown.style.top = `${e.top + n}px`, this.dropdown.style.left = `${e.left}px`, this._handleWindowScroll = () => this._closeDropdown(), window.addEventListener("scroll", this._handleWindowScroll));
2025
+ const e = this.telInput.getBoundingClientRect(), i = this.telInput.offsetHeight;
2026
+ this.options.dropdownContainer && (this.dropdown.style.top = `${e.top + i}px`, this.dropdown.style.left = `${e.left}px`, this._handleWindowScroll = () => this._closeDropdown(), window.addEventListener("scroll", this._handleWindowScroll));
2023
2027
  }
2024
2028
  }
2025
2029
  //* We only bind dropdown listeners when the dropdown is open.
@@ -2043,10 +2047,10 @@ class U2 {
2043
2047
  "click",
2044
2048
  this._handleClickOffToClose
2045
2049
  );
2046
- let n = "", r = null;
2050
+ let i = "", n = null;
2047
2051
  if (this._handleKeydownOnDropdown = (o) => {
2048
- ["ArrowUp", "ArrowDown", "Enter", "Escape"].includes(o.key) && (o.preventDefault(), o.stopPropagation(), o.key === "ArrowUp" || o.key === "ArrowDown" ? this._handleUpDownKey(o.key) : o.key === "Enter" ? this._handleEnterKey() : o.key === "Escape" && this._closeDropdown()), !this.options.countrySearch && /^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(o.key) && (o.stopPropagation(), r && clearTimeout(r), n += o.key.toLowerCase(), this._searchForCountry(n), r = setTimeout(() => {
2049
- n = "";
2052
+ ["ArrowUp", "ArrowDown", "Enter", "Escape"].includes(o.key) && (o.preventDefault(), o.stopPropagation(), o.key === "ArrowUp" || o.key === "ArrowDown" ? this._handleUpDownKey(o.key) : o.key === "Enter" ? this._handleEnterKey() : o.key === "Escape" && this._closeDropdown()), !this.options.countrySearch && /^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(o.key) && (o.stopPropagation(), n && clearTimeout(n), i += o.key.toLowerCase(), this._searchForCountry(i), n = setTimeout(() => {
2053
+ i = "";
2050
2054
  }, 1e3));
2051
2055
  }, document.addEventListener("keydown", this._handleKeydownOnDropdown), this.options.countrySearch) {
2052
2056
  const o = () => {
@@ -2063,40 +2067,40 @@ class U2 {
2063
2067
  }
2064
2068
  //* Hidden search (countrySearch disabled): Find the first list item whose name starts with the query string.
2065
2069
  _searchForCountry(e) {
2066
- for (let n = 0; n < this.countries.length; n++) {
2067
- const r = this.countries[n];
2068
- if (r.name.substr(0, e.length).toLowerCase() === e) {
2069
- const a = r.nodeById[this.id];
2070
+ for (let i = 0; i < this.countries.length; i++) {
2071
+ const n = this.countries[i];
2072
+ if (n.name.substr(0, e.length).toLowerCase() === e) {
2073
+ const a = n.nodeById[this.id];
2070
2074
  this._highlightListItem(a, !1), this._scrollTo(a);
2071
2075
  break;
2072
2076
  }
2073
2077
  }
2074
2078
  }
2075
2079
  //* Country search enabled: Filter the countries according to the search query.
2076
- _filterCountries(e, n = !1) {
2077
- let r = !0;
2080
+ _filterCountries(e, i = !1) {
2081
+ let n = !0;
2078
2082
  this.countryList.innerHTML = "";
2079
2083
  const o = r2(e);
2080
2084
  for (let a = 0; a < this.countries.length; a++) {
2081
2085
  const c = this.countries[a], g = r2(c.name), f = c.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((_) => _[0]).join("").toLowerCase(), b = `+${c.dialCode}`;
2082
- if (n || g.includes(o) || b.includes(o) || c.iso2.includes(o) || f.includes(o)) {
2086
+ if (i || g.includes(o) || b.includes(o) || c.iso2.includes(o) || f.includes(o)) {
2083
2087
  const _ = c.nodeById[this.id];
2084
- _ && this.countryList.appendChild(_), r && (this._highlightListItem(_, !1), r = !1);
2088
+ _ && this.countryList.appendChild(_), n && (this._highlightListItem(_, !1), n = !1);
2085
2089
  }
2086
2090
  }
2087
- r && this._highlightListItem(null, !1), this.countryList.scrollTop = 0, this._updateSearchResultsText();
2091
+ n && this._highlightListItem(null, !1), this.countryList.scrollTop = 0, this._updateSearchResultsText();
2088
2092
  }
2089
2093
  //* Update search results text (for a11y).
2090
2094
  _updateSearchResultsText() {
2091
- const { i18n: e } = this.options, n = this.countryList.childElementCount;
2092
- let r;
2093
- n === 0 ? r = e.zeroSearchResults : n === 1 ? r = e.oneSearchResult : r = e.multipleSearchResults.replace("${count}", n.toString()), this.searchResultsA11yText.textContent = r;
2095
+ const { i18n: e } = this.options, i = this.countryList.childElementCount;
2096
+ let n;
2097
+ i === 0 ? n = e.zeroSearchResults : i === 1 ? n = e.oneSearchResult : n = e.multipleSearchResults.replace("${count}", i.toString()), this.searchResultsA11yText.textContent = n;
2094
2098
  }
2095
2099
  //* Highlight the next/prev item in the list (and ensure it is visible).
2096
2100
  _handleUpDownKey(e) {
2097
- var r, o;
2098
- let n = e === "ArrowUp" ? (r = this.highlightedItem) == null ? void 0 : r.previousElementSibling : (o = this.highlightedItem) == null ? void 0 : o.nextElementSibling;
2099
- !n && this.countryList.childElementCount > 1 && (n = e === "ArrowUp" ? this.countryList.lastElementChild : this.countryList.firstElementChild), n && (this._scrollTo(n), this._highlightListItem(n, !1));
2101
+ var n, o;
2102
+ let i = e === "ArrowUp" ? (n = this.highlightedItem) == null ? void 0 : n.previousElementSibling : (o = this.highlightedItem) == null ? void 0 : o.nextElementSibling;
2103
+ !i && this.countryList.childElementCount > 1 && (i = e === "ArrowUp" ? this.countryList.lastElementChild : this.countryList.firstElementChild), i && (this._scrollTo(i), this._highlightListItem(i, !1));
2100
2104
  }
2101
2105
  //* Select the currently highlighted item.
2102
2106
  _handleEnterKey() {
@@ -2105,29 +2109,29 @@ class U2 {
2105
2109
  //* Update the input's value to the given val (format first if possible)
2106
2110
  //* NOTE: this is called from _setInitialState, handleUtils and setNumber.
2107
2111
  _updateValFromNumber(e) {
2108
- let n = e;
2109
- if (this.options.formatOnDisplay && C.utils && this.selectedCountryData) {
2110
- const r = this.options.nationalMode || n.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: o, INTERNATIONAL: a } = C.utils.numberFormat, c = r ? o : a;
2111
- n = C.utils.formatNumber(
2112
- n,
2112
+ let i = e;
2113
+ if (this.options.formatOnDisplay && m.utils && this.selectedCountryData) {
2114
+ const n = this.options.nationalMode || i.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: o, INTERNATIONAL: a } = m.utils.numberFormat, c = n ? o : a;
2115
+ i = m.utils.formatNumber(
2116
+ i,
2113
2117
  this.selectedCountryData.iso2,
2114
2118
  c
2115
2119
  );
2116
2120
  }
2117
- n = this._beforeSetNumber(n), this.telInput.value = n;
2121
+ i = this._beforeSetNumber(i), this.telInput.value = i;
2118
2122
  }
2119
2123
  //* Check if need to select a new country based on the given number
2120
2124
  //* Note: called from _setInitialState, keyup handler, setNumber.
2121
2125
  _updateCountryFromNumber(e) {
2122
- const n = this._getCountryFromNumber(e);
2123
- return n !== null ? this._setCountry(n) : !1;
2126
+ const i = this._getCountryFromNumber(e);
2127
+ return i !== null ? this._setCountry(i) : !1;
2124
2128
  }
2125
2129
  _getCountryFromNumber(e) {
2126
- const n = e.indexOf("+");
2127
- let r = n ? e.substring(n) : e;
2130
+ const i = e.indexOf("+");
2131
+ let n = i ? e.substring(i) : e;
2128
2132
  const o = this.selectedCountryData.dialCode;
2129
- r && o === "1" && r.charAt(0) !== "+" && (r.charAt(0) !== "1" && (r = `1${r}`), r = `+${r}`), this.options.separateDialCode && o && r.charAt(0) !== "+" && (r = `+${o}${r}`);
2130
- const c = this._getDialCode(r, !0), g = f1(r);
2133
+ n && o === "1" && n.charAt(0) !== "+" && (n.charAt(0) !== "1" && (n = `1${n}`), n = `+${n}`), this.options.separateDialCode && o && n.charAt(0) !== "+" && (n = `+${o}${n}`);
2134
+ const c = this._getDialCode(n, !0), g = f1(n);
2131
2135
  if (c) {
2132
2136
  const f = this.dialCodeToIso2Map[f1(c)], b = f.indexOf(this.selectedCountryData.iso2) !== -1 && g.length <= c.length - 1;
2133
2137
  if (!(o === "1" && s2(g)) && !b) {
@@ -2136,42 +2140,42 @@ class U2 {
2136
2140
  return f[I];
2137
2141
  }
2138
2142
  } else {
2139
- if (r.charAt(0) === "+" && g.length)
2143
+ if (n.charAt(0) === "+" && g.length)
2140
2144
  return "";
2141
- if ((!r || r === "+") && !this.selectedCountryData.iso2)
2145
+ if ((!n || n === "+") && !this.selectedCountryData.iso2)
2142
2146
  return this.defaultCountry;
2143
2147
  }
2144
2148
  return null;
2145
2149
  }
2146
2150
  //* Remove highlighting from other list items and highlight the given item.
2147
- _highlightListItem(e, n) {
2148
- const r = this.highlightedItem;
2149
- if (r && (r.classList.remove("iti__highlight"), r.setAttribute("aria-selected", "false")), this.highlightedItem = e, this.highlightedItem) {
2151
+ _highlightListItem(e, i) {
2152
+ const n = this.highlightedItem;
2153
+ if (n && (n.classList.remove("iti__highlight"), n.setAttribute("aria-selected", "false")), this.highlightedItem = e, this.highlightedItem) {
2150
2154
  this.highlightedItem.classList.add("iti__highlight"), this.highlightedItem.setAttribute("aria-selected", "true");
2151
2155
  const o = this.highlightedItem.getAttribute("id") || "";
2152
2156
  this.selectedCountry.setAttribute("aria-activedescendant", o), this.options.countrySearch && this.searchInput.setAttribute("aria-activedescendant", o);
2153
2157
  }
2154
- n && this.highlightedItem.focus();
2158
+ i && this.highlightedItem.focus();
2155
2159
  }
2156
2160
  //* Find the country data for the given iso2 code
2157
2161
  //* the ignoreOnlyCountriesOption is only used during init() while parsing the onlyCountries array
2158
- _getCountryData(e, n) {
2159
- for (let r = 0; r < this.countries.length; r++)
2160
- if (this.countries[r].iso2 === e)
2161
- return this.countries[r];
2162
- if (n)
2162
+ _getCountryData(e, i) {
2163
+ for (let n = 0; n < this.countries.length; n++)
2164
+ if (this.countries[n].iso2 === e)
2165
+ return this.countries[n];
2166
+ if (i)
2163
2167
  return null;
2164
2168
  throw new Error(`No country data for '${e}'`);
2165
2169
  }
2166
2170
  //* Update the selected country, dial code (if separateDialCode), placeholder, title, and active list item.
2167
2171
  //* Note: called from _setInitialState, _updateCountryFromNumber, _selectListItem, setCountry.
2168
2172
  _setCountry(e) {
2169
- const { separateDialCode: n, showFlags: r, i18n: o } = this.options, a = this.selectedCountryData.iso2 ? this.selectedCountryData : {};
2173
+ const { separateDialCode: i, showFlags: n, i18n: o } = this.options, a = this.selectedCountryData.iso2 ? this.selectedCountryData : {};
2170
2174
  if (this.selectedCountryData = e ? this._getCountryData(e, !1) || {} : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountryInner) {
2171
2175
  let c = "", g = "";
2172
- e && r ? (c = `iti__flag iti__${e}`, g = `${this.selectedCountryData.name} +${this.selectedCountryData.dialCode}`) : (c = "iti__flag iti__globe", g = o.noCountrySelected), this.selectedCountryInner.className = c, this.selectedCountryA11yText.textContent = g;
2176
+ e && n ? (c = `iti__flag iti__${e}`, g = `${this.selectedCountryData.name} +${this.selectedCountryData.dialCode}`) : (c = "iti__flag iti__globe", g = o.noCountrySelected), this.selectedCountryInner.className = c, this.selectedCountryA11yText.textContent = g;
2173
2177
  }
2174
- if (this._setSelectedCountryTitleAttribute(e, n), n) {
2178
+ if (this._setSelectedCountryTitleAttribute(e, i), i) {
2175
2179
  const c = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
2176
2180
  this.selectedDialCode.innerHTML = c, this._updateInputPadding();
2177
2181
  }
@@ -2180,34 +2184,34 @@ class U2 {
2180
2184
  //* Update the input padding to make space for the selected country/dial code.
2181
2185
  _updateInputPadding() {
2182
2186
  if (this.selectedCountry) {
2183
- const n = (this.selectedCountry.offsetWidth || this._getHiddenSelectedCountryWidth()) + 6;
2184
- this.showSelectedCountryOnLeft ? this.telInput.style.paddingLeft = `${n}px` : this.telInput.style.paddingRight = `${n}px`;
2187
+ const i = (this.selectedCountry.offsetWidth || this._getHiddenSelectedCountryWidth()) + 6;
2188
+ this.showSelectedCountryOnLeft ? this.telInput.style.paddingLeft = `${i}px` : this.telInput.style.paddingRight = `${i}px`;
2185
2189
  }
2186
2190
  }
2187
2191
  //* Update the maximum valid number length for the currently selected country.
2188
2192
  _updateMaxLength() {
2189
- const { strictMode: e, placeholderNumberType: n, validationNumberType: r } = this.options, { iso2: o } = this.selectedCountryData;
2190
- if (e && C.utils)
2193
+ const { strictMode: e, placeholderNumberType: i, validationNumberType: n } = this.options, { iso2: o } = this.selectedCountryData;
2194
+ if (e && m.utils)
2191
2195
  if (o) {
2192
- const a = C.utils.numberType[n];
2193
- let c = C.utils.getExampleNumber(
2196
+ const a = m.utils.numberType[i];
2197
+ let c = m.utils.getExampleNumber(
2194
2198
  o,
2195
2199
  !1,
2196
2200
  a,
2197
2201
  !0
2198
2202
  ), g = c;
2199
- for (; C.utils.isPossibleNumber(c, o, r); )
2203
+ for (; m.utils.isPossibleNumber(c, o, n); )
2200
2204
  g = c, c += "0";
2201
- const f = C.utils.getCoreNumber(g, o);
2205
+ const f = m.utils.getCoreNumber(g, o);
2202
2206
  this.maxCoreNumberLength = f.length, o === "by" && (this.maxCoreNumberLength = f.length + 1);
2203
2207
  } else
2204
2208
  this.maxCoreNumberLength = null;
2205
2209
  }
2206
- _setSelectedCountryTitleAttribute(e = null, n) {
2210
+ _setSelectedCountryTitleAttribute(e = null, i) {
2207
2211
  if (!this.selectedCountry)
2208
2212
  return;
2209
- let r;
2210
- e && !n ? r = `${this.selectedCountryData.name}: +${this.selectedCountryData.dialCode}` : e ? r = this.selectedCountryData.name : r = "Unknown", this.selectedCountry.setAttribute("title", r);
2213
+ let n;
2214
+ e && !i ? n = `${this.selectedCountryData.name}: +${this.selectedCountryData.dialCode}` : e ? n = this.selectedCountryData.name : n = "Unknown", this.selectedCountry.setAttribute("title", n);
2211
2215
  }
2212
2216
  //* When the input is in a hidden container during initialisation, we must inject some markup
2213
2217
  //* into the end of the DOM to calculate the correct offsetWidth.
@@ -2217,11 +2221,11 @@ class U2 {
2217
2221
  if (this.telInput.parentNode) {
2218
2222
  const e = this.telInput.parentNode.cloneNode(!1);
2219
2223
  e.style.visibility = "hidden", document.body.appendChild(e);
2220
- const n = this.countryContainer.cloneNode();
2221
- e.appendChild(n);
2222
- const r = this.selectedCountry.cloneNode(!0);
2223
- n.appendChild(r);
2224
- const o = r.offsetWidth;
2224
+ const i = this.countryContainer.cloneNode();
2225
+ e.appendChild(i);
2226
+ const n = this.selectedCountry.cloneNode(!0);
2227
+ i.appendChild(n);
2228
+ const o = n.offsetWidth;
2225
2229
  return document.body.removeChild(e), o;
2226
2230
  }
2227
2231
  return 0;
@@ -2230,15 +2234,15 @@ class U2 {
2230
2234
  _updatePlaceholder() {
2231
2235
  const {
2232
2236
  autoPlaceholder: e,
2233
- placeholderNumberType: n,
2234
- nationalMode: r,
2237
+ placeholderNumberType: i,
2238
+ nationalMode: n,
2235
2239
  customPlaceholder: o
2236
2240
  } = this.options, a = e === "aggressive" || !this.hadInitialPlaceholder && e === "polite";
2237
- if (C.utils && a) {
2238
- const c = C.utils.numberType[n];
2239
- let g = this.selectedCountryData.iso2 ? C.utils.getExampleNumber(
2241
+ if (m.utils && a) {
2242
+ const c = m.utils.numberType[i];
2243
+ let g = this.selectedCountryData.iso2 ? m.utils.getExampleNumber(
2240
2244
  this.selectedCountryData.iso2,
2241
- r,
2245
+ n,
2242
2246
  c
2243
2247
  ) : "";
2244
2248
  g = this._beforeSetNumber(g), typeof o == "function" && (g = o(g, this.selectedCountryData)), this.telInput.setAttribute("placeholder", g);
@@ -2246,10 +2250,10 @@ class U2 {
2246
2250
  }
2247
2251
  //* Called when the user selects a list item from the dropdown.
2248
2252
  _selectListItem(e) {
2249
- const n = this._setCountry(
2253
+ const i = this._setCountry(
2250
2254
  e.getAttribute("data-country-code")
2251
2255
  );
2252
- this._closeDropdown(), this._updateDialCode(e.getAttribute("data-dial-code")), this.telInput.focus(), n && this._triggerCountryChange();
2256
+ this._closeDropdown(), this._updateDialCode(e.getAttribute("data-dial-code")), this.telInput.focus(), i && this._triggerCountryChange();
2253
2257
  }
2254
2258
  //* Close the dropdown and unbind any listeners.
2255
2259
  _closeDropdown() {
@@ -2259,41 +2263,41 @@ class U2 {
2259
2263
  ), this.countryList.removeEventListener(
2260
2264
  "mouseover",
2261
2265
  this._handleMouseoverCountryList
2262
- ), this.countryList.removeEventListener("click", this._handleClickCountryList), this.options.dropdownContainer && (this.options.useFullscreenPopup || window.removeEventListener("scroll", this._handleWindowScroll), this.dropdown.parentNode && this.dropdown.parentNode.removeChild(this.dropdown)), this._trigger("close:countrydropdown");
2266
+ ), this.countryList.removeEventListener("click", this._handleClickCountryList), this.options.dropdownContainer && (this.options.useFullscreenPopup || window.removeEventListener("scroll", this._handleWindowScroll), this.dropdown.parentNode && this.dropdown.parentNode.removeChild(this.dropdown)), this._handlePageLoad && window.removeEventListener("load", this._handlePageLoad), this._trigger("close:countrydropdown");
2263
2267
  }
2264
2268
  //* Check if an element is visible within it's container, else scroll until it is.
2265
2269
  _scrollTo(e) {
2266
- const n = this.countryList, r = document.documentElement.scrollTop, o = n.offsetHeight, a = n.getBoundingClientRect().top + r, c = a + o, g = e.offsetHeight, f = e.getBoundingClientRect().top + r, b = f + g, _ = f - a + n.scrollTop;
2270
+ const i = this.countryList, n = document.documentElement.scrollTop, o = i.offsetHeight, a = i.getBoundingClientRect().top + n, c = a + o, g = e.offsetHeight, f = e.getBoundingClientRect().top + n, b = f + g, _ = f - a + i.scrollTop;
2267
2271
  if (f < a)
2268
- n.scrollTop = _;
2272
+ i.scrollTop = _;
2269
2273
  else if (b > c) {
2270
2274
  const I = o - g;
2271
- n.scrollTop = _ - I;
2275
+ i.scrollTop = _ - I;
2272
2276
  }
2273
2277
  }
2274
2278
  //* Replace any existing dial code with the new one
2275
2279
  //* Note: called from _selectListItem and setCountry
2276
2280
  _updateDialCode(e) {
2277
- const n = this.telInput.value, r = `+${e}`;
2281
+ const i = this.telInput.value, n = `+${e}`;
2278
2282
  let o;
2279
- if (n.charAt(0) === "+") {
2280
- const a = this._getDialCode(n);
2281
- a ? o = n.replace(a, r) : o = r, this.telInput.value = o;
2283
+ if (i.charAt(0) === "+") {
2284
+ const a = this._getDialCode(i);
2285
+ a ? o = i.replace(a, n) : o = n, this.telInput.value = o;
2282
2286
  }
2283
2287
  }
2284
2288
  //* Try and extract a valid international dial code from a full telephone number.
2285
2289
  //* Note: returns the raw string inc plus character and any whitespace/dots etc.
2286
- _getDialCode(e, n) {
2287
- let r = "";
2290
+ _getDialCode(e, i) {
2291
+ let n = "";
2288
2292
  if (e.charAt(0) === "+") {
2289
2293
  let o = "";
2290
2294
  for (let a = 0; a < e.length; a++) {
2291
2295
  const c = e.charAt(a);
2292
2296
  if (!isNaN(parseInt(c, 10))) {
2293
- if (o += c, n)
2294
- this.dialCodeToIso2Map[o] && (r = e.substr(0, a + 1));
2297
+ if (o += c, i)
2298
+ this.dialCodeToIso2Map[o] && (n = e.substr(0, a + 1));
2295
2299
  else if (this.dialCodes[o]) {
2296
- r = e.substr(0, a + 1);
2300
+ n = e.substr(0, a + 1);
2297
2301
  break;
2298
2302
  }
2299
2303
  if (o.length === this.dialCodeMaxLen)
@@ -2301,27 +2305,27 @@ class U2 {
2301
2305
  }
2302
2306
  }
2303
2307
  }
2304
- return r;
2308
+ return n;
2305
2309
  }
2306
2310
  //* Get the input val, adding the dial code if separateDialCode is enabled.
2307
2311
  _getFullNumber(e) {
2308
- const n = e || this.telInput.value.trim(), { dialCode: r } = this.selectedCountryData;
2312
+ const i = e || this.telInput.value.trim(), { dialCode: n } = this.selectedCountryData;
2309
2313
  let o;
2310
- const a = f1(n);
2311
- return this.options.separateDialCode && n.charAt(0) !== "+" && r && a ? o = `+${r}` : o = "", o + n;
2314
+ const a = f1(i);
2315
+ return this.options.separateDialCode && i.charAt(0) !== "+" && n && a ? o = `+${n}` : o = "", o + i;
2312
2316
  }
2313
2317
  //* Remove the dial code if separateDialCode is enabled also cap the length if the input has a maxlength attribute
2314
2318
  _beforeSetNumber(e) {
2315
- let n = e;
2319
+ let i = e;
2316
2320
  if (this.options.separateDialCode) {
2317
- let r = this._getDialCode(n);
2318
- if (r) {
2319
- r = `+${this.selectedCountryData.dialCode}`;
2320
- const o = n[r.length] === " " || n[r.length] === "-" ? r.length + 1 : r.length;
2321
- n = n.substr(o);
2321
+ let n = this._getDialCode(i);
2322
+ if (n) {
2323
+ n = `+${this.selectedCountryData.dialCode}`;
2324
+ const o = i[n.length] === " " || i[n.length] === "-" ? n.length + 1 : n.length;
2325
+ i = i.substr(o);
2322
2326
  }
2323
2327
  }
2324
- return this._cap(n);
2328
+ return this._cap(i);
2325
2329
  }
2326
2330
  //* Trigger the 'countrychange' event.
2327
2331
  _triggerCountryChange() {
@@ -2329,19 +2333,19 @@ class U2 {
2329
2333
  }
2330
2334
  //* Format the number as the user types.
2331
2335
  _formatNumberAsYouType() {
2332
- const e = this._getFullNumber(), n = C.utils ? C.utils.formatNumberAsYouType(e, this.selectedCountryData.iso2) : e, { dialCode: r } = this.selectedCountryData;
2333
- return this.options.separateDialCode && this.telInput.value.charAt(0) !== "+" && n.includes(`+${r}`) ? (n.split(`+${r}`)[1] || "").trim() : n;
2336
+ const e = this._getFullNumber(), i = m.utils ? m.utils.formatNumberAsYouType(e, this.selectedCountryData.iso2) : e, { dialCode: n } = this.selectedCountryData;
2337
+ return this.options.separateDialCode && this.telInput.value.charAt(0) !== "+" && i.includes(`+${n}`) ? (i.split(`+${n}`)[1] || "").trim() : i;
2334
2338
  }
2335
2339
  //**************************
2336
2340
  //* SECRET PUBLIC METHODS
2337
2341
  //**************************
2338
2342
  //* This is called when the geoip call returns.
2339
2343
  handleAutoCountry() {
2340
- this.options.initialCountry === "auto" && C.autoCountry && (this.defaultCountry = C.autoCountry, this.selectedCountryData.iso2 || this.selectedCountryInner.classList.contains("iti__globe") || this.setCountry(this.defaultCountry), this.resolveAutoCountryPromise());
2344
+ this.options.initialCountry === "auto" && m.autoCountry && (this.defaultCountry = m.autoCountry, this.selectedCountryData.iso2 || this.selectedCountryInner.classList.contains("iti__globe") || this.setCountry(this.defaultCountry), this.resolveAutoCountryPromise());
2341
2345
  }
2342
2346
  //* This is called when the utils request completes.
2343
2347
  handleUtils() {
2344
- C.utils && (this.telInput.value && this._updateValFromNumber(this.telInput.value), this.selectedCountryData.iso2 && (this._updatePlaceholder(), this._updateMaxLength())), this.resolveUtilsScriptPromise();
2348
+ m.utils && (this.telInput.value && this._updateValFromNumber(this.telInput.value), this.selectedCountryData.iso2 && (this._updatePlaceholder(), this._updateMaxLength())), this.resolveUtilsScriptPromise();
2345
2349
  }
2346
2350
  //********************
2347
2351
  //* PUBLIC METHODS
@@ -2349,7 +2353,7 @@ class U2 {
2349
2353
  //* Remove plugin.
2350
2354
  destroy() {
2351
2355
  var a, c;
2352
- const { allowDropdown: e, separateDialCode: n } = this.options;
2356
+ const { allowDropdown: e, separateDialCode: i } = this.options;
2353
2357
  if (e) {
2354
2358
  this._closeDropdown(), this.selectedCountry.removeEventListener(
2355
2359
  "click",
@@ -2361,25 +2365,25 @@ class U2 {
2361
2365
  const g = this.telInput.closest("label");
2362
2366
  g && g.removeEventListener("click", this._handleLabelClick);
2363
2367
  }
2364
- const { form: r } = this.telInput;
2365
- this._handleHiddenInputSubmit && r && r.removeEventListener("submit", this._handleHiddenInputSubmit), this.telInput.removeEventListener("input", this._handleInputEvent), this._handleKeydownEvent && this.telInput.removeEventListener("keydown", this._handleKeydownEvent), this.telInput.removeAttribute("data-intl-tel-input-id"), n && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft);
2368
+ const { form: n } = this.telInput;
2369
+ this._handleHiddenInputSubmit && n && n.removeEventListener("submit", this._handleHiddenInputSubmit), this.telInput.removeEventListener("input", this._handleInputEvent), this._handleKeydownEvent && this.telInput.removeEventListener("keydown", this._handleKeydownEvent), this.telInput.removeAttribute("data-intl-tel-input-id"), i && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft);
2366
2370
  const o = this.telInput.parentNode;
2367
- (a = o == null ? void 0 : o.parentNode) == null || a.insertBefore(this.telInput, o), (c = o == null ? void 0 : o.parentNode) == null || c.removeChild(o), delete C.instances[this.id];
2371
+ (a = o == null ? void 0 : o.parentNode) == null || a.insertBefore(this.telInput, o), (c = o == null ? void 0 : o.parentNode) == null || c.removeChild(o), delete m.instances[this.id];
2368
2372
  }
2369
2373
  //* Get the extension from the current number.
2370
2374
  getExtension() {
2371
- return C.utils ? C.utils.getExtension(
2375
+ return m.utils ? m.utils.getExtension(
2372
2376
  this._getFullNumber(),
2373
2377
  this.selectedCountryData.iso2
2374
2378
  ) : "";
2375
2379
  }
2376
2380
  //* Format the number to the given format.
2377
2381
  getNumber(e) {
2378
- if (C.utils) {
2379
- const { iso2: n } = this.selectedCountryData;
2380
- return C.utils.formatNumber(
2382
+ if (m.utils) {
2383
+ const { iso2: i } = this.selectedCountryData;
2384
+ return m.utils.formatNumber(
2381
2385
  this._getFullNumber(),
2382
- n,
2386
+ i,
2383
2387
  e
2384
2388
  );
2385
2389
  }
@@ -2387,7 +2391,7 @@ class U2 {
2387
2391
  }
2388
2392
  //* Get the type of the entered number e.g. landline/mobile.
2389
2393
  getNumberType() {
2390
- return C.utils ? C.utils.getNumberType(
2394
+ return m.utils ? m.utils.getNumberType(
2391
2395
  this._getFullNumber(),
2392
2396
  this.selectedCountryData.iso2
2393
2397
  ) : -99;
@@ -2398,9 +2402,9 @@ class U2 {
2398
2402
  }
2399
2403
  //* Get the validation error.
2400
2404
  getValidationError() {
2401
- if (C.utils) {
2405
+ if (m.utils) {
2402
2406
  const { iso2: e } = this.selectedCountryData;
2403
- return C.utils.getValidationError(this._getFullNumber(), e);
2407
+ return m.utils.getValidationError(this._getFullNumber(), e);
2404
2408
  }
2405
2409
  return -99;
2406
2410
  }
@@ -2408,39 +2412,39 @@ class U2 {
2408
2412
  isValidNumber() {
2409
2413
  if (!this.selectedCountryData.iso2)
2410
2414
  return !1;
2411
- const e = this._getFullNumber(), n = e.search(new RegExp("\\p{L}", "u"));
2412
- if (n > -1) {
2413
- const r = e.substring(0, n), o = this._utilsIsPossibleNumber(r), a = this._utilsIsPossibleNumber(e);
2415
+ const e = this._getFullNumber(), i = e.search(new RegExp("\\p{L}", "u"));
2416
+ if (i > -1) {
2417
+ const n = e.substring(0, i), o = this._utilsIsPossibleNumber(n), a = this._utilsIsPossibleNumber(e);
2414
2418
  return o && a;
2415
2419
  }
2416
2420
  return this._utilsIsPossibleNumber(e);
2417
2421
  }
2418
2422
  _utilsIsPossibleNumber(e) {
2419
- return C.utils ? C.utils.isPossibleNumber(e, this.selectedCountryData.iso2, this.options.validationNumberType) : null;
2423
+ return m.utils ? m.utils.isPossibleNumber(e, this.selectedCountryData.iso2, this.options.validationNumberType) : null;
2420
2424
  }
2421
2425
  //* Validate the input val (precise)
2422
2426
  isValidNumberPrecise() {
2423
2427
  if (!this.selectedCountryData.iso2)
2424
2428
  return !1;
2425
- const e = this._getFullNumber(), n = e.search(new RegExp("\\p{L}", "u"));
2426
- if (n > -1) {
2427
- const r = e.substring(0, n), o = this._utilsIsValidNumber(r), a = this._utilsIsValidNumber(e);
2429
+ const e = this._getFullNumber(), i = e.search(new RegExp("\\p{L}", "u"));
2430
+ if (i > -1) {
2431
+ const n = e.substring(0, i), o = this._utilsIsValidNumber(n), a = this._utilsIsValidNumber(e);
2428
2432
  return o && a;
2429
2433
  }
2430
2434
  return this._utilsIsValidNumber(e);
2431
2435
  }
2432
2436
  _utilsIsValidNumber(e) {
2433
- return C.utils ? C.utils.isValidNumber(e, this.selectedCountryData.iso2) : null;
2437
+ return m.utils ? m.utils.isValidNumber(e, this.selectedCountryData.iso2) : null;
2434
2438
  }
2435
2439
  //* Update the selected country, and update the input val accordingly.
2436
2440
  setCountry(e) {
2437
- const n = e == null ? void 0 : e.toLowerCase(), r = this.selectedCountryData.iso2;
2438
- (e && n !== r || !e && r) && (this._setCountry(n), this._updateDialCode(this.selectedCountryData.dialCode), this._triggerCountryChange());
2441
+ const i = e == null ? void 0 : e.toLowerCase(), n = this.selectedCountryData.iso2;
2442
+ (e && i !== n || !e && n) && (this._setCountry(i), this._updateDialCode(this.selectedCountryData.dialCode), this._triggerCountryChange());
2439
2443
  }
2440
2444
  //* Set the input value and update the country.
2441
2445
  setNumber(e) {
2442
- const n = this._updateCountryFromNumber(e);
2443
- this._updateValFromNumber(e), n && this._triggerCountryChange(), this._trigger("input", { isSetNumber: !0 });
2446
+ const i = this._updateCountryFromNumber(e);
2447
+ this._updateValFromNumber(e), i && this._triggerCountryChange(), this._trigger("input", { isSetNumber: !0 });
2444
2448
  }
2445
2449
  //* Set the placeholder number typ
2446
2450
  setPlaceholderNumberType(e) {
@@ -2450,20 +2454,34 @@ class U2 {
2450
2454
  this.telInput.disabled = e, e ? this.selectedCountry.setAttribute("disabled", "true") : this.selectedCountry.removeAttribute("disabled");
2451
2455
  }
2452
2456
  }
2453
- const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUtilsScript = !0, new Promise((e, n) => {
2454
- import_INTENTIONALLY_BROKEN(
2455
- /* webpackIgnore: true */
2456
- /* @vite-ignore */
2457
- y
2458
- ).then(({ default: r }) => {
2459
- C.utils = r, $1("handleUtils"), e(!0);
2460
- }).catch(() => {
2461
- $1("rejectUtilsScriptPromise"), n();
2462
- });
2463
- })) : null, C = Object.assign(
2457
+ const V2 = (y) => {
2458
+ if (!m.utils && !m.startedLoadingUtilsScript) {
2459
+ let e;
2460
+ if (typeof y == "string")
2461
+ e = Promise.reject(new Error("INTENTIONALLY BROKEN: this build of intl-tel-input includes the utilities module inline, but it has incorrectly attempted to load the utilities separately. If you are seeing this message, something is broken!"));
2462
+ else if (typeof y == "function")
2463
+ try {
2464
+ if (e = y(), !(e instanceof Promise))
2465
+ throw new TypeError(`The function passed to loadUtils must return a promise for the utilities module, not ${typeof e}`);
2466
+ } catch (i) {
2467
+ return Promise.reject(i);
2468
+ }
2469
+ else
2470
+ return Promise.reject(new TypeError(`The argument passed to loadUtils must be a URL string or a function that returns a promise for the utilities module, not ${typeof y}`));
2471
+ return m.startedLoadingUtilsScript = !0, e.then((i) => {
2472
+ const n = i == null ? void 0 : i.default;
2473
+ if (!n || typeof n != "object")
2474
+ throw typeof y == "string" ? new TypeError(`The module loaded from ${y} did not set utils as its default export.`) : new TypeError("The loader function passed to loadUtils did not resolve to a module object with utils as its default export.");
2475
+ return m.utils = n, $1("handleUtils"), !0;
2476
+ }).catch((i) => {
2477
+ throw $1("rejectUtilsScriptPromise", i), i;
2478
+ });
2479
+ }
2480
+ return null;
2481
+ }, m = Object.assign(
2464
2482
  (y, e) => {
2465
- const n = new U2(y, e);
2466
- return n._init(), y.setAttribute("data-intl-tel-input-id", n.id.toString()), C.instances[n.id] = n, n;
2483
+ const i = new F2(y, e);
2484
+ return i._init(), y.setAttribute("data-intl-tel-input-id", i.id.toString()), m.instances[i.id] = i, i;
2467
2485
  },
2468
2486
  {
2469
2487
  defaults: u2,
@@ -2474,12 +2492,14 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2474
2492
  //* A getter for the plugin instance.
2475
2493
  getInstance: (y) => {
2476
2494
  const e = y.getAttribute("data-intl-tel-input-id");
2477
- return e ? C.instances[e] : null;
2495
+ return e ? m.instances[e] : null;
2478
2496
  },
2479
2497
  //* A map from instance ID to instance object.
2480
2498
  instances: {},
2481
2499
  loadUtils: V2,
2482
- version: "24.5.2"
2500
+ startedLoadingUtilsScript: !1,
2501
+ startedLoadingAutoCountry: !1,
2502
+ version: "24.6.0"
2483
2503
  }
2484
2504
  );
2485
2505
  (function() {
@@ -2488,20 +2508,20 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2488
2508
  d = d.split(".");
2489
2509
  var $ = y;
2490
2510
  d[0] in $ || typeof $.execScript > "u" || $.execScript("var " + d[0]);
2491
- for (var i; d.length && (i = d.shift()); ) d.length || t === void 0 ? $[i] && $[i] !== Object.prototype[i] ? $ = $[i] : $ = $[i] = {} : $[i] = t;
2511
+ for (var r; d.length && (r = d.shift()); ) d.length || t === void 0 ? $[r] && $[r] !== Object.prototype[r] ? $ = $[r] : $ = $[r] = {} : $[r] = t;
2492
2512
  }
2493
- function n(d, t) {
2513
+ function i(d, t) {
2494
2514
  function $() {
2495
2515
  }
2496
- $.prototype = t.prototype, d.ma = t.prototype, d.prototype = new $(), d.prototype.constructor = d, d.sa = function(i, s, u) {
2516
+ $.prototype = t.prototype, d.ma = t.prototype, d.prototype = new $(), d.prototype.constructor = d, d.sa = function(r, s, u) {
2497
2517
  for (var l = Array(arguments.length - 2), h = 2; h < arguments.length; h++) l[h - 2] = arguments[h];
2498
- return t.prototype[s].apply(i, l);
2518
+ return t.prototype[s].apply(r, l);
2499
2519
  };
2500
2520
  }
2501
- function r(d) {
2521
+ function n(d) {
2502
2522
  const t = [];
2503
2523
  let $ = 0;
2504
- for (const i in d) t[$++] = d[i];
2524
+ for (const r in d) t[$++] = d[r];
2505
2525
  return t;
2506
2526
  }
2507
2527
  var o = class {
@@ -2546,20 +2566,20 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2546
2566
  }
2547
2567
  }
2548
2568
  new I();
2549
- function N(d, t) {
2569
+ function L(d, t) {
2550
2570
  switch (this.g = d, this.l = !!t.aa, this.h = t.i, this.s = t.type, this.o = !1, this.h) {
2551
2571
  case M:
2552
2572
  case O:
2553
2573
  case Z:
2554
- case n1:
2574
+ case i1:
2555
2575
  case p1:
2556
- case A:
2576
+ case T:
2557
2577
  case v:
2558
2578
  this.o = !0;
2559
2579
  }
2560
2580
  this.j = t.defaultValue;
2561
2581
  }
2562
- var v = 1, A = 2, M = 3, O = 4, Z = 6, n1 = 16, p1 = 18;
2582
+ var v = 1, T = 2, M = 3, O = 4, Z = 6, i1 = 16, p1 = 18;
2563
2583
  function v1(d, t) {
2564
2584
  for (this.h = d, this.g = {}, d = 0; d < t.length; d++) {
2565
2585
  var $ = t[d];
@@ -2567,52 +2587,52 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2567
2587
  }
2568
2588
  }
2569
2589
  function l2(d) {
2570
- return d = r(d.g), d.sort(function(t, $) {
2590
+ return d = n(d.g), d.sort(function(t, $) {
2571
2591
  return t.g - $.g;
2572
2592
  }), d;
2573
2593
  }
2574
- function P() {
2594
+ function x() {
2575
2595
  this.h = {}, this.j = this.m().g, this.g = this.l = null;
2576
2596
  }
2577
- P.prototype.has = function(d) {
2597
+ x.prototype.has = function(d) {
2578
2598
  return R(this, d.g);
2579
- }, P.prototype.get = function(d, t) {
2599
+ }, x.prototype.get = function(d, t) {
2580
2600
  return p(this, d.g, t);
2581
- }, P.prototype.set = function(d, t) {
2601
+ }, x.prototype.set = function(d, t) {
2582
2602
  E(this, d.g, t);
2583
- }, P.prototype.add = function(d, t) {
2603
+ }, x.prototype.add = function(d, t) {
2584
2604
  w1(this, d.g, t);
2585
2605
  };
2586
2606
  function S1(d, t) {
2587
- for (var $ = l2(d.m()), i = 0; i < $.length; i++) {
2588
- var s = $[i], u = s.g;
2607
+ for (var $ = l2(d.m()), r = 0; r < $.length; r++) {
2608
+ var s = $[r], u = s.g;
2589
2609
  if (R(t, u)) {
2590
2610
  d.g && delete d.g[s.g];
2591
2611
  var l = s.h == 11 || s.h == 10;
2592
2612
  if (s.l) {
2593
- s = x(t, u);
2613
+ s = P(t, u);
2594
2614
  for (var h = 0; h < s.length; h++) w1(d, u, l ? s[h].clone() : s[h]);
2595
- } else s = i1(t, u), l ? (l = i1(d, u)) ? S1(l, s) : E(d, u, s.clone()) : E(d, u, s);
2615
+ } else s = n1(t, u), l ? (l = n1(d, u)) ? S1(l, s) : E(d, u, s.clone()) : E(d, u, s);
2596
2616
  }
2597
2617
  }
2598
2618
  }
2599
- P.prototype.clone = function() {
2619
+ x.prototype.clone = function() {
2600
2620
  var d = new this.constructor();
2601
2621
  return d != this && (d.h = {}, d.g && (d.g = {}), S1(d, this)), d;
2602
2622
  };
2603
2623
  function R(d, t) {
2604
2624
  return d.h[t] != null;
2605
2625
  }
2606
- function i1(d, t) {
2626
+ function n1(d, t) {
2607
2627
  var $ = d.h[t];
2608
2628
  if ($ == null) return null;
2609
2629
  if (d.l) {
2610
2630
  if (!(t in d.g)) {
2611
- var i = d.l, s = d.j[t];
2631
+ var r = d.l, s = d.j[t];
2612
2632
  if ($ != null) if (s.l) {
2613
- for (var u = [], l = 0; l < $.length; l++) u[l] = i.h(s, $[l]);
2633
+ for (var u = [], l = 0; l < $.length; l++) u[l] = r.h(s, $[l]);
2614
2634
  $ = u;
2615
- } else $ = i.h(s, $);
2635
+ } else $ = r.h(s, $);
2616
2636
  return d.g[t] = $;
2617
2637
  }
2618
2638
  return d.g[t];
@@ -2620,8 +2640,8 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2620
2640
  return $;
2621
2641
  }
2622
2642
  function p(d, t, $) {
2623
- var i = i1(d, t);
2624
- return d.j[t].l ? i[$ || 0] : i;
2643
+ var r = n1(d, t);
2644
+ return d.j[t].l ? r[$ || 0] : r;
2625
2645
  }
2626
2646
  function S(d, t) {
2627
2647
  if (R(d, t)) d = p(d, t);
@@ -2637,10 +2657,10 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2637
2657
  }
2638
2658
  return d;
2639
2659
  }
2640
- function x(d, t) {
2641
- return i1(d, t) || [];
2660
+ function P(d, t) {
2661
+ return n1(d, t) || [];
2642
2662
  }
2643
- function U(d, t) {
2663
+ function F(d, t) {
2644
2664
  return d.j[t].l ? R(d, t) ? d.h[t].length : 0 : R(d, t) ? 1 : 0;
2645
2665
  }
2646
2666
  function E(d, t, $) {
@@ -2650,8 +2670,8 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2650
2670
  d.h[t] || (d.h[t] = []), d.h[t].push($), d.g && delete d.g[t];
2651
2671
  }
2652
2672
  function r1(d, t) {
2653
- var $ = [], i;
2654
- for (i in t) i != 0 && $.push(new N(i, t[i]));
2673
+ var $ = [], r;
2674
+ for (r in t) r != 0 && $.push(new L(r, t[r]));
2655
2675
  return new v1(d, $);
2656
2676
  }
2657
2677
  function s1() {
@@ -2659,7 +2679,7 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2659
2679
  s1.prototype.g = function(d) {
2660
2680
  throw new d.h(), Error("Unimplemented");
2661
2681
  }, s1.prototype.h = function(d, t) {
2662
- if (d.h == 11 || d.h == 10) return t instanceof P ? t : this.g(d.s.prototype.m(), t);
2682
+ if (d.h == 11 || d.h == 10) return t instanceof x ? t : this.g(d.s.prototype.m(), t);
2663
2683
  if (d.h == 14) return typeof t == "string" && b1.test(t) && (d = Number(t), 0 < d) ? d : t;
2664
2684
  if (!d.o) return t;
2665
2685
  if (d = d.s, d === String) {
@@ -2670,55 +2690,55 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2670
2690
  var b1 = /^-?[0-9]+$/;
2671
2691
  function g1() {
2672
2692
  }
2673
- n(g1, s1), g1.prototype.g = function(d, t) {
2693
+ i(g1, s1), g1.prototype.g = function(d, t) {
2674
2694
  return d = new d.h(), d.l = this, d.h = t, d.g = {}, d;
2675
2695
  };
2676
2696
  function q() {
2677
2697
  }
2678
- n(q, g1), q.prototype.h = function(d, t) {
2698
+ i(q, g1), q.prototype.h = function(d, t) {
2679
2699
  return d.h == 8 ? !!t : s1.prototype.h.apply(this, arguments);
2680
2700
  }, q.prototype.g = function(d, t) {
2681
2701
  return q.ma.g.call(this, d, t);
2682
2702
  };
2683
- function L(d, t) {
2703
+ function N(d, t) {
2684
2704
  d != null && this.g.apply(this, arguments);
2685
2705
  }
2686
- L.prototype.h = "", L.prototype.set = function(d) {
2706
+ N.prototype.h = "", N.prototype.set = function(d) {
2687
2707
  this.h = "" + d;
2688
- }, L.prototype.g = function(d, t, $) {
2689
- if (this.h += String(d), t != null) for (let i = 1; i < arguments.length; i++) this.h += arguments[i];
2708
+ }, N.prototype.g = function(d, t, $) {
2709
+ if (this.h += String(d), t != null) for (let r = 1; r < arguments.length; r++) this.h += arguments[r];
2690
2710
  return this;
2691
2711
  };
2692
2712
  function B(d) {
2693
2713
  d.h = "";
2694
2714
  }
2695
- L.prototype.toString = function() {
2715
+ N.prototype.toString = function() {
2696
2716
  return this.h;
2697
2717
  };
2698
2718
  function j() {
2699
- P.call(this);
2719
+ x.call(this);
2700
2720
  }
2701
- n(j, P);
2702
- var N1 = null;
2721
+ i(j, x);
2722
+ var L1 = null;
2703
2723
  function w() {
2704
- P.call(this);
2724
+ x.call(this);
2705
2725
  }
2706
- n(w, P);
2707
- var A1 = null;
2726
+ i(w, x);
2727
+ var T1 = null;
2708
2728
  function W() {
2709
- P.call(this);
2729
+ x.call(this);
2710
2730
  }
2711
- n(W, P);
2712
- var L1 = null;
2731
+ i(W, x);
2732
+ var N1 = null;
2713
2733
  j.prototype.m = function() {
2714
- var d = N1;
2715
- return d || (N1 = d = r1(j, { 0: { name: "NumberFormat", ia: "i18n.phonenumbers.NumberFormat" }, 1: { name: "pattern", required: !0, i: 9, type: String }, 2: { name: "format", required: !0, i: 9, type: String }, 3: { name: "leading_digits_pattern", aa: !0, i: 9, type: String }, 4: { name: "national_prefix_formatting_rule", i: 9, type: String }, 6: { name: "national_prefix_optional_when_formatting", i: 8, defaultValue: !1, type: Boolean }, 5: { name: "domestic_carrier_code_formatting_rule", i: 9, type: String } })), d;
2734
+ var d = L1;
2735
+ return d || (L1 = d = r1(j, { 0: { name: "NumberFormat", ia: "i18n.phonenumbers.NumberFormat" }, 1: { name: "pattern", required: !0, i: 9, type: String }, 2: { name: "format", required: !0, i: 9, type: String }, 3: { name: "leading_digits_pattern", aa: !0, i: 9, type: String }, 4: { name: "national_prefix_formatting_rule", i: 9, type: String }, 6: { name: "national_prefix_optional_when_formatting", i: 8, defaultValue: !1, type: Boolean }, 5: { name: "domestic_carrier_code_formatting_rule", i: 9, type: String } })), d;
2716
2736
  }, j.m = j.prototype.m, w.prototype.m = function() {
2717
- var d = A1;
2718
- return d || (A1 = d = r1(w, { 0: { name: "PhoneNumberDesc", ia: "i18n.phonenumbers.PhoneNumberDesc" }, 2: { name: "national_number_pattern", i: 9, type: String }, 9: { name: "possible_length", aa: !0, i: 5, type: Number }, 10: { name: "possible_length_local_only", aa: !0, i: 5, type: Number }, 6: { name: "example_number", i: 9, type: String } })), d;
2737
+ var d = T1;
2738
+ return d || (T1 = d = r1(w, { 0: { name: "PhoneNumberDesc", ia: "i18n.phonenumbers.PhoneNumberDesc" }, 2: { name: "national_number_pattern", i: 9, type: String }, 9: { name: "possible_length", aa: !0, i: 5, type: Number }, 10: { name: "possible_length_local_only", aa: !0, i: 5, type: Number }, 6: { name: "example_number", i: 9, type: String } })), d;
2719
2739
  }, w.m = w.prototype.m, W.prototype.m = function() {
2720
- var d = L1;
2721
- return d || (L1 = d = r1(W, {
2740
+ var d = N1;
2741
+ return d || (N1 = d = r1(W, {
2722
2742
  0: { name: "PhoneMetadata", ia: "i18n.phonenumbers.PhoneMetadata" },
2723
2743
  1: { name: "general_desc", i: 11, type: w },
2724
2744
  2: { name: "fixed_line", i: 11, type: w },
@@ -2757,13 +2777,13 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2757
2777
  })), d;
2758
2778
  }, W.m = W.prototype.m;
2759
2779
  function V() {
2760
- P.call(this);
2780
+ x.call(this);
2761
2781
  }
2762
- n(V, P);
2763
- var T1 = null, a2 = { ra: 0, qa: 1, pa: 5, oa: 10, na: 20 };
2782
+ i(V, x);
2783
+ var A1 = null, a2 = { ra: 0, qa: 1, pa: 5, oa: 10, na: 20 };
2764
2784
  V.prototype.m = function() {
2765
- var d = T1;
2766
- return d || (T1 = d = r1(V, { 0: { name: "PhoneNumber", ia: "i18n.phonenumbers.PhoneNumber" }, 1: { name: "country_code", required: !0, i: 5, type: Number }, 2: { name: "national_number", required: !0, i: 4, type: Number }, 3: { name: "extension", i: 9, type: String }, 4: { name: "italian_leading_zero", i: 8, type: Boolean }, 8: { name: "number_of_leading_zeros", i: 5, defaultValue: 1, type: Number }, 5: { name: "raw_input", i: 9, type: String }, 6: { name: "country_code_source", i: 14, defaultValue: 0, type: a2 }, 7: {
2785
+ var d = A1;
2786
+ return d || (A1 = d = r1(V, { 0: { name: "PhoneNumber", ia: "i18n.phonenumbers.PhoneNumber" }, 1: { name: "country_code", required: !0, i: 5, type: Number }, 2: { name: "national_number", required: !0, i: 4, type: Number }, 3: { name: "extension", i: 9, type: String }, 4: { name: "italian_leading_zero", i: 8, type: Boolean }, 8: { name: "number_of_leading_zeros", i: 5, defaultValue: 1, type: Number }, 5: { name: "raw_input", i: 9, type: String }, 6: { name: "country_code_source", i: 14, defaultValue: 0, type: a2 }, 7: {
2767
2787
  name: "preferred_domestic_carrier_code",
2768
2788
  i: 9,
2769
2789
  type: String
@@ -8015,8 +8035,8 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8015
8035
  function M1() {
8016
8036
  return ";ext=" + Y("20") + "|[  \\t,]*(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)[:\\..]?[  \\t,-]*" + (Y("20") + "#?|[  \\t,]*(?:[xx##~~]|int|int)[:\\..]?[  \\t,-]*") + (Y("9") + "#?|[- ]+") + (Y("6") + "#|[  \\t]*(?:,{2}|;)[:\\..]?[  \\t,-]*") + (Y("15") + "#?|[  \\t]*(?:,)+[:\\..]?[  \\t,-]*") + (Y("9") + "#?");
8017
8037
  }
8018
- var x1 = new RegExp("(?:" + M1() + ")$", "i"), I2 = new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^[++]*(?:[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~*]*[0-90-9٠-٩۰-۹]){3,}[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~*A-Za-z0-90-9٠-٩۰-۹]*(?:" + M1() + ")?$", "i"), v2 = /(\$\d)/, S2 = /^\(?\$1\)?$/;
8019
- function P1(d) {
8038
+ var P1 = new RegExp("(?:" + M1() + ")$", "i"), I2 = new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^[++]*(?:[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~*]*[0-90-9٠-٩۰-۹]){3,}[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~*A-Za-z0-90-9٠-٩۰-۹]*(?:" + M1() + ")?$", "i"), v2 = /(\$\d)/, S2 = /^\(?\$1\)?$/;
8039
+ function x1(d) {
8020
8040
  return 2 > d.length ? !1 : G(I2, d);
8021
8041
  }
8022
8042
  function R1(d) {
@@ -8027,10 +8047,10 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8027
8047
  B(d), d.g(t);
8028
8048
  }
8029
8049
  function k1(d) {
8030
- return d != null && (U(d, 9) != 1 || x(d, 9)[0] != -1);
8050
+ return d != null && (F(d, 9) != 1 || P(d, 9)[0] != -1);
8031
8051
  }
8032
8052
  function o1(d, t) {
8033
- for (var $ = new L(), i, s = d.length, u = 0; u < s; ++u) i = d.charAt(u), i = t[i.toUpperCase()], i != null && $.g(i);
8053
+ for (var $ = new N(), r, s = d.length, u = 0; u < s; ++u) r = d.charAt(u), r = t[r.toUpperCase()], r != null && $.g(r);
8034
8054
  return $.toString();
8035
8055
  }
8036
8056
  function O1(d) {
@@ -8045,17 +8065,17 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8045
8065
  if (0 < $.length) return $;
8046
8066
  }
8047
8067
  $ = S(d, 1);
8048
- var i = t1(d);
8049
- if (t == 0) return G1($, 0, i, "");
8050
- if (!($ in X)) return i;
8068
+ var r = t1(d);
8069
+ if (t == 0) return G1($, 0, r, "");
8070
+ if (!($ in X)) return r;
8051
8071
  var s = d1(this, $, e1($));
8052
8072
  d = R(d, 3) && p(d, 3).length != 0 ? t == 3 ? ";ext=" + p(d, 3) : R(s, 13) ? p(s, 13) + S(d, 3) : " ext. " + S(d, 3) : "";
8053
8073
  d: {
8054
- s = x(s, 20).length == 0 || t == 2 ? x(s, 19) : x(s, 20);
8074
+ s = P(s, 20).length == 0 || t == 2 ? P(s, 19) : P(s, 20);
8055
8075
  for (var u, l = s.length, h = 0; h < l; ++h) {
8056
8076
  u = s[h];
8057
- var m = U(u, 3);
8058
- if ((m == 0 || i.search(p(u, 3, m - 1)) == 0) && (m = new RegExp(p(u, 1)), G(m, i))) {
8077
+ var C = F(u, 3);
8078
+ if ((C == 0 || r.search(p(u, 3, C - 1)) == 0) && (C = new RegExp(p(u, 1)), G(C, r))) {
8059
8079
  s = u;
8060
8080
  break d;
8061
8081
  }
@@ -8065,7 +8085,7 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8065
8085
  return s != null && (l = s, s = S(l, 2), u = new RegExp(p(l, 1)), S(
8066
8086
  l,
8067
8087
  5
8068
- ), l = S(l, 4), i = t == 2 && l != null && 0 < l.length ? i.replace(u, s.replace(v2, l)) : i.replace(u, s), t == 3 && (i = i.replace(RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+"), ""), i = i.replace(RegExp("[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))), G1($, t, i, d);
8088
+ ), l = S(l, 4), r = t == 2 && l != null && 0 < l.length ? r.replace(u, s.replace(v2, l)) : r.replace(u, s), t == 3 && (r = r.replace(RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+"), ""), r = r.replace(RegExp("[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))), G1($, t, r, d);
8069
8089
  };
8070
8090
  function d1(d, t, $) {
8071
8091
  return $ == "001" ? K(d, "" + t) : K(d, $);
@@ -8075,16 +8095,16 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8075
8095
  var t = "" + p(d, 2);
8076
8096
  return R(d, 4) && p(d, 4) && 0 < S(d, 8) ? Array(S(d, 8) + 1).join("0") + t : t;
8077
8097
  }
8078
- function G1(d, t, $, i) {
8098
+ function G1(d, t, $, r) {
8079
8099
  switch (t) {
8080
8100
  case 0:
8081
- return "+" + d + $ + i;
8101
+ return "+" + d + $ + r;
8082
8102
  case 1:
8083
- return "+" + d + " " + $ + i;
8103
+ return "+" + d + " " + $ + r;
8084
8104
  case 3:
8085
- return "tel:+" + d + "-" + $ + i;
8105
+ return "tel:+" + d + "-" + $ + r;
8086
8106
  default:
8087
- return $ + i;
8107
+ return $ + r;
8088
8108
  }
8089
8109
  }
8090
8110
  function l1(d, t) {
@@ -8129,25 +8149,25 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8129
8149
  }
8130
8150
  function k(d, t) {
8131
8151
  var $ = d.length;
8132
- return 0 < U(t, 9) && x(t, 9).indexOf($) == -1 ? !1 : G(S(t, 2), d);
8152
+ return 0 < F(t, 9) && P(t, 9).indexOf($) == -1 ? !1 : G(S(t, 2), d);
8133
8153
  }
8134
- function F1(d, t) {
8154
+ function U1(d, t) {
8135
8155
  if (t == null) return null;
8136
8156
  var $ = S(t, 1);
8137
8157
  if ($ = X[$], $ == null) d = null;
8138
8158
  else if ($.length == 1) d = $[0];
8139
8159
  else d: {
8140
8160
  t = t1(t);
8141
- for (var i, s = $.length, u = 0; u < s; u++) {
8142
- i = $[u];
8143
- var l = K(d, i);
8161
+ for (var r, s = $.length, u = 0; u < s; u++) {
8162
+ r = $[u];
8163
+ var l = K(d, r);
8144
8164
  if (R(l, 23)) {
8145
8165
  if (t.search(p(l, 23)) == 0) {
8146
- d = i;
8166
+ d = r;
8147
8167
  break d;
8148
8168
  }
8149
8169
  } else if (m1(t, l) != -1) {
8150
- d = i;
8170
+ d = r;
8151
8171
  break d;
8152
8172
  }
8153
8173
  }
@@ -8158,28 +8178,28 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8158
8178
  function e1(d) {
8159
8179
  return d = X[d], d == null ? "ZZ" : d[0];
8160
8180
  }
8161
- function U1(d, t) {
8181
+ function F1(d, t) {
8162
8182
  if (d = K(d, t), d == null) throw Error("Invalid region code: " + t);
8163
8183
  return S(d, 10);
8164
8184
  }
8165
- function a1(d, t, $, i) {
8166
- var s = l1($, i), u = U(s, 9) == 0 ? x(p($, 1), 9) : x(s, 9);
8167
- if (s = x(s, 10), i == 2) if (k1(l1($, 0))) d = l1($, 1), k1(d) && (u = u.concat(U(d, 9) == 0 ? x(p($, 1), 9) : x(d, 9)), u.sort(), s.length == 0 ? s = x(d, 10) : (s = s.concat(x(d, 10)), s.sort()));
8185
+ function a1(d, t, $, r) {
8186
+ var s = l1($, r), u = F(s, 9) == 0 ? P(p($, 1), 9) : P(s, 9);
8187
+ if (s = P(s, 10), r == 2) if (k1(l1($, 0))) d = l1($, 1), k1(d) && (u = u.concat(F(d, 9) == 0 ? P(p($, 1), 9) : P(d, 9)), u.sort(), s.length == 0 ? s = P(d, 10) : (s = s.concat(P(d, 10)), s.sort()));
8168
8188
  else return a1(d, t, $, 1);
8169
8189
  return u[0] == -1 ? 5 : (t = t.length, -1 < s.indexOf(t) ? 4 : ($ = u[0], $ == t ? 0 : $ > t ? 2 : u[u.length - 1] < t ? 3 : -1 < u.indexOf(t, 1) ? 0 : 5));
8170
8190
  }
8171
8191
  function J(d, t, $) {
8172
- var i = t1(t);
8173
- return t = S(t, 1), t in X ? (t = d1(d, t, e1(t)), a1(d, i, t, $)) : 1;
8192
+ var r = t1(t);
8193
+ return t = S(t, 1), t in X ? (t = d1(d, t, e1(t)), a1(d, r, t, $)) : 1;
8174
8194
  }
8175
8195
  function V1(d, t) {
8176
8196
  if (d = d.toString(), d.length == 0 || d.charAt(0) == "0") return 0;
8177
- for (var $, i = d.length, s = 1; 3 >= s && s <= i; ++s) if ($ = parseInt(d.substring(0, s), 10), $ in X) return t.g(d.substring(s)), $;
8197
+ for (var $, r = d.length, s = 1; 3 >= s && s <= r; ++s) if ($ = parseInt(d.substring(0, s), 10), $ in X) return t.g(d.substring(s)), $;
8178
8198
  return 0;
8179
8199
  }
8180
- function K1(d, t, $, i, s, u) {
8200
+ function K1(d, t, $, r, s, u) {
8181
8201
  if (t.length == 0) return 0;
8182
- t = new L(t);
8202
+ t = new N(t);
8183
8203
  var l;
8184
8204
  $ != null && (l = p($, 11)), l == null && (l = "NonMatch");
8185
8205
  var h = t.toString();
@@ -8188,26 +8208,26 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8188
8208
  else {
8189
8209
  if (h = new RegExp(l), B1(t), l = t.toString(), l.search(h) == 0) {
8190
8210
  h = l.match(h)[0].length;
8191
- var m = l.substring(h).match(D1);
8192
- m && m[1] != null && 0 < m[1].length && o1(m[1], C1) == "0" ? l = !1 : (B(t), t.g(l.substring(h)), l = !0);
8211
+ var C = l.substring(h).match(D1);
8212
+ C && C[1] != null && 0 < C[1].length && o1(C[1], C1) == "0" ? l = !1 : (B(t), t.g(l.substring(h)), l = !0);
8193
8213
  } else l = !1;
8194
8214
  l = l ? 5 : 20;
8195
8215
  }
8196
8216
  if (s && E(u, 6, l), l != 20) {
8197
8217
  if (2 >= t.h.length) throw Error("Phone number too short after IDD");
8198
- if (d = V1(t, i), d != 0) return E(u, 1, d), d;
8218
+ if (d = V1(t, r), d != 0) return E(u, 1, d), d;
8199
8219
  throw Error("Invalid country calling code");
8200
8220
  }
8201
- return $ != null && (l = S($, 10), h = "" + l, m = t.toString(), m.lastIndexOf(h, 0) == 0 && (h = new L(m.substring(h.length)), m = p($, 1), m = new RegExp(S(m, 2)), H1(h, $, null), h = h.toString(), !G(m, t.toString()) && G(m, h) || a1(d, t.toString(), $, -1) == 3)) ? (i.g(h), s && E(u, 6, 10), E(u, 1, l), l) : (E(u, 1, 0), 0);
8221
+ return $ != null && (l = S($, 10), h = "" + l, C = t.toString(), C.lastIndexOf(h, 0) == 0 && (h = new N(C.substring(h.length)), C = p($, 1), C = new RegExp(S(C, 2)), H1(h, $, null), h = h.toString(), !G(C, t.toString()) && G(C, h) || a1(d, t.toString(), $, -1) == 3)) ? (r.g(h), s && E(u, 6, 10), E(u, 1, l), l) : (E(u, 1, 0), 0);
8202
8222
  }
8203
8223
  function H1(d, t, $) {
8204
- var i = d.toString(), s = i.length, u = p(t, 15);
8224
+ var r = d.toString(), s = r.length, u = p(t, 15);
8205
8225
  if (s != 0 && u != null && u.length != 0) {
8206
8226
  var l = new RegExp("^(?:" + u + ")");
8207
- if (s = l.exec(i)) {
8227
+ if (s = l.exec(r)) {
8208
8228
  u = new RegExp(S(p(t, 1), 2));
8209
- var h = G(u, i), m = s.length - 1;
8210
- t = p(t, 16), t == null || t.length == 0 || s[m] == null || s[m].length == 0 ? (!h || G(u, i.substring(s[0].length))) && ($ != null && 0 < m && s[m] != null && $.g(s[1]), d.set(i.substring(s[0].length))) : (i = i.replace(l, t), (!h || G(u, i)) && ($ != null && 0 < m && $.g(s[1]), d.set(i)));
8229
+ var h = G(u, r), C = s.length - 1;
8230
+ t = p(t, 16), t == null || t.length == 0 || s[C] == null || s[C].length == 0 ? (!h || G(u, r.substring(s[0].length))) && ($ != null && 0 < C && s[C] != null && $.g(s[1]), d.set(r.substring(s[0].length))) : (r = r.replace(l, t), (!h || G(u, r)) && ($ != null && 0 < C && $.g(s[1]), d.set(r)));
8211
8231
  }
8212
8232
  }
8213
8233
  }
@@ -8215,10 +8235,10 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8215
8235
  if (!u1($) && 0 < t.length && t.charAt(0) != "+") throw Error("Invalid country calling code");
8216
8236
  return j1(d, t, $, !0);
8217
8237
  }
8218
- function j1(d, t, $, i) {
8238
+ function j1(d, t, $, r) {
8219
8239
  if (t == null) throw Error("The string supplied did not seem to be a phone number");
8220
8240
  if (250 < t.length) throw Error("The string supplied is too long to be a phone number");
8221
- var s = new L(), u = t.indexOf(";phone-context=");
8241
+ var s = new N(), u = t.indexOf(";phone-context=");
8222
8242
  if (u === -1) u = null;
8223
8243
  else if (u += 15, u >= t.length) u = "";
8224
8244
  else {
@@ -8226,73 +8246,73 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8226
8246
  u = l !== -1 ? t.substring(u, l) : t.substring(u);
8227
8247
  }
8228
8248
  var h = u;
8229
- if (h == null ? l = !0 : h.length === 0 ? l = !1 : (l = y2.exec(h), h = _2.exec(h), l = l !== null || h !== null), !l || (u != null ? (u.charAt(0) === "+" && s.g(u), u = t.indexOf("tel:"), s.g(t.substring(0 <= u ? u + 4 : 0, t.indexOf(";phone-context=")))) : (u = s.g, l = t ?? "", h = l.search(p2), 0 <= h ? (l = l.substring(h), l = l.replace(C2, ""), h = l.search(g2), 0 <= h && (l = l.substring(0, h))) : l = "", u.call(s, l)), u = s.toString(), l = u.indexOf(";isub="), 0 < l && (B(s), s.g(u.substring(0, l))), !P1(s.toString()))) throw Error("The string supplied did not seem to be a phone number");
8249
+ if (h == null ? l = !0 : h.length === 0 ? l = !1 : (l = y2.exec(h), h = _2.exec(h), l = l !== null || h !== null), !l || (u != null ? (u.charAt(0) === "+" && s.g(u), u = t.indexOf("tel:"), s.g(t.substring(0 <= u ? u + 4 : 0, t.indexOf(";phone-context=")))) : (u = s.g, l = t ?? "", h = l.search(p2), 0 <= h ? (l = l.substring(h), l = l.replace(C2, ""), h = l.search(g2), 0 <= h && (l = l.substring(0, h))) : l = "", u.call(s, l)), u = s.toString(), l = u.indexOf(";isub="), 0 < l && (B(s), s.g(u.substring(0, l))), !x1(s.toString()))) throw Error("The string supplied did not seem to be a phone number");
8230
8250
  if (u = s.toString(), !(u1($) || u != null && 0 < u.length && Q.test(u))) throw Error("Invalid country calling code");
8231
- u = new V(), i && E(u, 5, t);
8251
+ u = new V(), r && E(u, 5, t);
8232
8252
  d: {
8233
- if (t = s.toString(), l = t.search(x1), 0 <= l && P1(t.substring(0, l))) {
8234
- h = t.match(x1);
8235
- for (var m = h.length, F = 1; F < m; ++F) if (h[F] != null && 0 < h[F].length) {
8236
- B(s), s.g(t.substring(0, l)), t = h[F];
8253
+ if (t = s.toString(), l = t.search(P1), 0 <= l && x1(t.substring(0, l))) {
8254
+ h = t.match(P1);
8255
+ for (var C = h.length, U = 1; U < C; ++U) if (h[U] != null && 0 < h[U].length) {
8256
+ B(s), s.g(t.substring(0, l)), t = h[U];
8237
8257
  break d;
8238
8258
  }
8239
8259
  }
8240
8260
  t = "";
8241
8261
  }
8242
- 0 < t.length && E(u, 3, t), l = K(d, $), t = new L(), h = 0, m = s.toString();
8262
+ 0 < t.length && E(u, 3, t), l = K(d, $), t = new N(), h = 0, C = s.toString();
8243
8263
  try {
8244
- h = K1(d, m, l, t, i, u);
8264
+ h = K1(d, C, l, t, r, u);
8245
8265
  } catch (_1) {
8246
- if (_1.message == "Invalid country calling code" && Q.test(m)) {
8247
- if (m = m.replace(Q, ""), h = K1(d, m, l, t, i, u), h == 0) throw _1;
8266
+ if (_1.message == "Invalid country calling code" && Q.test(C)) {
8267
+ if (C = C.replace(Q, ""), h = K1(d, C, l, t, r, u), h == 0) throw _1;
8248
8268
  } else throw _1;
8249
8269
  }
8250
8270
  if (h != 0 ? (s = e1(h), s != $ && (l = d1(d, h, s))) : (B1(s), t.g(s.toString()), $ != null ? (h = S(l, 10), E(
8251
8271
  u,
8252
8272
  1,
8253
8273
  h
8254
- )) : i && (delete u.h[6], u.g && delete u.g[6])), 2 > t.h.length || (l != null && ($ = new L(), s = new L(t.toString()), H1(s, l, $), d = a1(d, s.toString(), l, -1), d != 2 && d != 4 && d != 5 && (t = s, i && 0 < $.toString().length && E(u, 7, $.toString()))), i = t.toString(), d = i.length, 2 > d)) throw Error("The string supplied is too short to be a phone number");
8274
+ )) : r && (delete u.h[6], u.g && delete u.g[6])), 2 > t.h.length || (l != null && ($ = new N(), s = new N(t.toString()), H1(s, l, $), d = a1(d, s.toString(), l, -1), d != 2 && d != 4 && d != 5 && (t = s, r && 0 < $.toString().length && E(u, 7, $.toString()))), r = t.toString(), d = r.length, 2 > d)) throw Error("The string supplied is too short to be a phone number");
8255
8275
  if (17 < d) throw Error("The string supplied is too long to be a phone number");
8256
- if (1 < i.length && i.charAt(0) == "0") {
8257
- for (E(u, 4, !0), d = 1; d < i.length - 1 && i.charAt(d) == "0"; ) d++;
8276
+ if (1 < r.length && r.charAt(0) == "0") {
8277
+ for (E(u, 4, !0), d = 1; d < r.length - 1 && r.charAt(d) == "0"; ) d++;
8258
8278
  d != 1 && E(u, 8, d);
8259
8279
  }
8260
- return E(u, 2, parseInt(i, 10)), u;
8280
+ return E(u, 2, parseInt(r, 10)), u;
8261
8281
  }
8262
8282
  function G(d, t) {
8263
8283
  return !!((d = typeof d == "string" ? t.match("^(?:" + d + ")$") : t.match(d)) && d[0].length == t.length);
8264
8284
  }
8265
8285
  function w2(d) {
8266
- this.fa = RegExp(" "), this.ja = "", this.v = new L(), this.da = "", this.s = new L(), this.ba = new L(), this.u = !0, this.ea = this.ca = this.la = !1, this.ga = D.g(), this.$ = 0, this.h = new L(), this.ha = !1, this.o = "", this.g = new L(), this.j = [], this.ka = d, this.l = Z1(this, this.ka);
8286
+ this.fa = RegExp(" "), this.ja = "", this.v = new N(), this.da = "", this.s = new N(), this.ba = new N(), this.u = !0, this.ea = this.ca = this.la = !1, this.ga = D.g(), this.$ = 0, this.h = new N(), this.ha = !1, this.o = "", this.g = new N(), this.j = [], this.ka = d, this.l = Z1(this, this.ka);
8267
8287
  }
8268
8288
  var W1 = new W();
8269
8289
  E(W1, 11, "NA");
8270
8290
  var b2 = RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*)*$"), z1 = /[- ]/;
8271
8291
  function Z1(d, t) {
8272
8292
  var $ = d.ga;
8273
- return t = u1(t) ? U1($, t) : 0, d = K(d.ga, e1(t)), d ?? W1;
8293
+ return t = u1(t) ? F1($, t) : 0, d = K(d.ga, e1(t)), d ?? W1;
8274
8294
  }
8275
8295
  function Y1(d) {
8276
8296
  for (var t = d.j.length, $ = 0; $ < t; ++$) {
8277
- var i = d.j[$], s = S(i, 1);
8297
+ var r = d.j[$], s = S(r, 1);
8278
8298
  if (d.da == s) return !1;
8279
- var u = d, l = i, h = S(l, 1);
8299
+ var u = d, l = r, h = S(l, 1);
8280
8300
  B(u.v);
8281
- var m = u;
8301
+ var C = u;
8282
8302
  l = S(l, 2);
8283
- var F = "999999999999999".match(h)[0];
8284
- if (F.length < m.g.h.length ? m = "" : (m = F.replace(new RegExp(h, "g"), l), m = m.replace(RegExp("9", "g"), " ")), 0 < m.length ? (u.v.g(m), u = !0) : u = !1, u) return d.da = s, d.ha = z1.test(p(i, 4)), d.$ = 0, !0;
8303
+ var U = "999999999999999".match(h)[0];
8304
+ if (U.length < C.g.h.length ? C = "" : (C = U.replace(new RegExp(h, "g"), l), C = C.replace(RegExp("9", "g"), " ")), 0 < C.length ? (u.v.g(C), u = !0) : u = !1, u) return d.da = s, d.ha = z1.test(p(r, 4)), d.$ = 0, !0;
8285
8305
  }
8286
8306
  return d.u = !1;
8287
8307
  }
8288
8308
  function J1(d, t) {
8289
- for (var $ = [], i = t.length - 3, s = d.j.length, u = 0; u < s; ++u) {
8309
+ for (var $ = [], r = t.length - 3, s = d.j.length, u = 0; u < s; ++u) {
8290
8310
  var l = d.j[u];
8291
- U(l, 3) == 0 ? $.push(d.j[u]) : (l = p(l, 3, Math.min(i, U(l, 3) - 1)), t.search(l) == 0 && $.push(d.j[u]));
8311
+ F(l, 3) == 0 ? $.push(d.j[u]) : (l = p(l, 3, Math.min(r, F(l, 3) - 1)), t.search(l) == 0 && $.push(d.j[u]));
8292
8312
  }
8293
8313
  d.j = $;
8294
8314
  }
8295
- function N2(d, t) {
8315
+ function L2(d, t) {
8296
8316
  d.s.g(t);
8297
8317
  var $ = t;
8298
8318
  if (D1.test($) || d.s.h.length == 1 && f2.test($) ? (t == "+" ? ($ = t, d.ba.g(t)) : ($ = C1[t], d.ba.g($), d.g.g($)), t = $) : (d.u = !1, d.la = !0), !d.u) {
@@ -8319,8 +8339,8 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8319
8339
  return d.u = !0, d.ea = !1, d.j = [], d.$ = 0, B(d.v), d.da = "", y1(d);
8320
8340
  }
8321
8341
  function X1(d) {
8322
- for (var t = d.g.toString(), $ = d.j.length, i = 0; i < $; ++i) {
8323
- var s = d.j[i], u = S(s, 1);
8342
+ for (var t = d.g.toString(), $ = d.j.length, r = 0; r < $; ++r) {
8343
+ var s = d.j[r], u = S(s, 1);
8324
8344
  if (new RegExp("^(?:" + u + ")$").test(t) && (d.ha = z1.test(p(s, 4)), s = t.replace(new RegExp(u, "g"), p(s, 2)), s = h1(d, s), o1(s, h2) == d.ba)) return s;
8325
8345
  }
8326
8346
  return "";
@@ -8332,7 +8352,7 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8332
8352
  function y1(d) {
8333
8353
  var t = d.g.toString();
8334
8354
  if (3 <= t.length) {
8335
- for (var $ = d.ca && d.o.length == 0 && 0 < U(d.l, 20) ? x(d.l, 20) : x(d.l, 19), i = $.length, s = 0; s < i; ++s) {
8355
+ for (var $ = d.ca && d.o.length == 0 && 0 < F(d.l, 20) ? P(d.l, 20) : P(d.l, 19), r = $.length, s = 0; s < r; ++s) {
8336
8356
  var u = $[s];
8337
8357
  0 < d.o.length && O1(S(u, 4)) && !p(u, 6) && !R(u, 5) || (d.o.length != 0 || d.ca || O1(S(u, 4)) || p(u, 6)) && b2.test(S(u, 2)) && d.j.push(u);
8338
8358
  }
@@ -8343,16 +8363,16 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8343
8363
  function Q1(d) {
8344
8364
  var t = d.g.toString(), $ = t.length;
8345
8365
  if (0 < $) {
8346
- for (var i = "", s = 0; s < $; s++) i = $2(d, t.charAt(s));
8347
- return d.u ? h1(d, i) : d.s.toString();
8366
+ for (var r = "", s = 0; s < $; s++) r = $2(d, t.charAt(s));
8367
+ return d.u ? h1(d, r) : d.s.toString();
8348
8368
  }
8349
8369
  return d.h.toString();
8350
8370
  }
8351
8371
  function d2(d) {
8352
8372
  var t = d.g.toString(), $ = 0;
8353
- if (p(d.l, 10) != 1) var i = !1;
8354
- else i = d.g.toString(), i = i.charAt(0) == "1" && i.charAt(1) != "0" && i.charAt(1) != "1";
8355
- return i ? ($ = 1, d.h.g("1").g(" "), d.ca = !0) : R(d.l, 15) && (i = new RegExp("^(?:" + p(d.l, 15) + ")"), i = t.match(i), i != null && i[0] != null && 0 < i[0].length && (d.ca = !0, $ = i[0].length, d.h.g(t.substring(0, $)))), B(d.g), d.g.g(t.substring($)), t.substring(0, $);
8373
+ if (p(d.l, 10) != 1) var r = !1;
8374
+ else r = d.g.toString(), r = r.charAt(0) == "1" && r.charAt(1) != "0" && r.charAt(1) != "1";
8375
+ return r ? ($ = 1, d.h.g("1").g(" "), d.ca = !0) : R(d.l, 15) && (r = new RegExp("^(?:" + p(d.l, 15) + ")"), r = t.match(r), r != null && r[0] != null && 0 < r[0].length && (d.ca = !0, $ = r[0].length, d.h.g(t.substring(0, $)))), B(d.g), d.g.g(t.substring($)), t.substring(0, $);
8356
8376
  }
8357
8377
  function t2(d) {
8358
8378
  var t = d.ba.toString(), $ = new RegExp("^(?:\\+|" + p(d.l, 11) + ")");
@@ -8360,23 +8380,23 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8360
8380
  }
8361
8381
  function e2(d) {
8362
8382
  if (d.g.h.length == 0) return !1;
8363
- var t = new L(), $ = V1(d.g, t);
8383
+ var t = new N(), $ = V1(d.g, t);
8364
8384
  return $ == 0 ? !1 : (B(d.g), d.g.g(t.toString()), t = e1($), t == "001" ? d.l = K(d.ga, "" + $) : t != d.ka && (d.l = Z1(d, t)), d.h.g("" + $).g(" "), d.o = "", !0);
8365
8385
  }
8366
8386
  function $2(d, t) {
8367
8387
  var $ = d.v.toString();
8368
8388
  if (0 <= $.substring(d.$).search(d.fa)) {
8369
- var i = $.search(d.fa);
8370
- return t = $.replace(d.fa, t), B(d.v), d.v.g(t), d.$ = i, t.substring(0, d.$ + 1);
8389
+ var r = $.search(d.fa);
8390
+ return t = $.replace(d.fa, t), B(d.v), d.v.g(t), d.$ = r, t.substring(0, d.$ + 1);
8371
8391
  }
8372
8392
  return d.j.length == 1 && (d.u = !1), d.da = "", d.s.toString();
8373
8393
  }
8374
8394
  const c1 = { FIXED_LINE: 0, MOBILE: 1, FIXED_LINE_OR_MOBILE: 2, TOLL_FREE: 3, PREMIUM_RATE: 4, SHARED_COST: 5, VOIP: 6, PERSONAL_NUMBER: 7, PAGER: 8, UAN: 9, VOICEMAIL: 10, UNKNOWN: -1 };
8375
8395
  e("intlTelInputUtilsTemp", {}), e("intlTelInputUtilsTemp.formatNumberAsYouType", (d, t) => {
8376
8396
  try {
8377
- const $ = d.replace(/[^+0-9]/g, ""), i = new w2(t);
8397
+ const $ = d.replace(/[^+0-9]/g, ""), r = new w2(t);
8378
8398
  t = "";
8379
- for (let s = 0; s < $.length; s++) i.ja = N2(i, $.charAt(s)), t = i.ja;
8399
+ for (let s = 0; s < $.length; s++) r.ja = L2(r, $.charAt(s)), t = r.ja;
8380
8400
  return t;
8381
8401
  } catch {
8382
8402
  return d;
@@ -8384,16 +8404,16 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8384
8404
  }), e("intlTelInputUtilsTemp.formatNumber", (d, t, $) => {
8385
8405
  try {
8386
8406
  const s = D.g(), u = z(s, d, t);
8387
- var i = J(s, u, -1);
8388
- return i == 0 || i == 4 ? s.format(u, typeof $ > "u" ? 0 : $) : d;
8407
+ var r = J(s, u, -1);
8408
+ return r == 0 || r == 4 ? s.format(u, typeof $ > "u" ? 0 : $) : d;
8389
8409
  } catch {
8390
8410
  return d;
8391
8411
  }
8392
- }), e("intlTelInputUtilsTemp.getExampleNumber", (d, t, $, i) => {
8412
+ }), e("intlTelInputUtilsTemp.getExampleNumber", (d, t, $, r) => {
8393
8413
  try {
8394
- const m = D.g();
8414
+ const C = D.g();
8395
8415
  d: {
8396
- var s = m;
8416
+ var s = C;
8397
8417
  if (u1(d)) {
8398
8418
  var u = l1(K(s, d), $);
8399
8419
  try {
@@ -8406,7 +8426,7 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8406
8426
  }
8407
8427
  h = null;
8408
8428
  }
8409
- return m.format(h, i ? 0 : t ? 2 : 1);
8429
+ return C.format(h, r ? 0 : t ? 2 : 1);
8410
8430
  } catch {
8411
8431
  return "";
8412
8432
  }
@@ -8419,11 +8439,11 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8419
8439
  }), e("intlTelInputUtilsTemp.getNumberType", (d, t) => {
8420
8440
  try {
8421
8441
  const l = D.g(), h = z(l, d, t);
8422
- var $ = F1(l, h), i = d1(l, S(h, 1), $);
8423
- if (i == null) var s = -1;
8442
+ var $ = U1(l, h), r = d1(l, S(h, 1), $);
8443
+ if (r == null) var s = -1;
8424
8444
  else {
8425
8445
  var u = t1(h);
8426
- s = m1(u, i);
8446
+ s = m1(u, r);
8427
8447
  }
8428
8448
  return s;
8429
8449
  } catch {
@@ -8432,18 +8452,18 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8432
8452
  }), e("intlTelInputUtilsTemp.getValidationError", (d, t) => {
8433
8453
  if (!t) return 1;
8434
8454
  try {
8435
- const $ = D.g(), i = z($, d, t);
8436
- return J($, i, -1);
8455
+ const $ = D.g(), r = z($, d, t);
8456
+ return J($, r, -1);
8437
8457
  } catch ($) {
8438
8458
  return $.message === "Invalid country calling code" ? 1 : 3 >= d.length || $.message === "Phone number too short after IDD" || $.message === "The string supplied is too short to be a phone number" ? 2 : $.message === "The string supplied is too long to be a phone number" ? 3 : -99;
8439
8459
  }
8440
8460
  }), e("intlTelInputUtilsTemp.isValidNumber", (d, t) => {
8441
8461
  try {
8442
- const m = D.g();
8443
- var $ = z(m, d, t), i = F1(m, $);
8444
- d = m;
8445
- var s = S($, 1), u = d1(d, s, i);
8446
- if (u == null || i != "001" && s != U1(d, i)) var l = !1;
8462
+ const C = D.g();
8463
+ var $ = z(C, d, t), r = U1(C, $);
8464
+ d = C;
8465
+ var s = S($, 1), u = d1(d, s, r);
8466
+ if (u == null || r != "001" && s != F1(d, r)) var l = !1;
8447
8467
  else {
8448
8468
  var h = t1($);
8449
8469
  l = m1(h, u) != -1;
@@ -8454,16 +8474,16 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8454
8474
  }
8455
8475
  }), e("intlTelInputUtilsTemp.isPossibleNumber", (d, t, $) => {
8456
8476
  try {
8457
- const i = D.g(), s = z(i, d, t);
8477
+ const r = D.g(), s = z(r, d, t);
8458
8478
  if ($) {
8459
- const u = J(i, s, c1[$]) === 0;
8479
+ const u = J(r, s, c1[$]) === 0;
8460
8480
  if ($ === "FIXED_LINE_OR_MOBILE") {
8461
- const l = J(i, s, c1.MOBILE) === 0, h = J(i, s, c1.FIXED_LINE) === 0;
8481
+ const l = J(r, s, c1.MOBILE) === 0, h = J(r, s, c1.FIXED_LINE) === 0;
8462
8482
  return l || h || u;
8463
8483
  }
8464
8484
  return u;
8465
8485
  }
8466
- return J(i, s, -1) === 0;
8486
+ return J(r, s, -1) === 0;
8467
8487
  } catch {
8468
8488
  return !1;
8469
8489
  }
@@ -8477,10 +8497,10 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8477
8497
  })();
8478
8498
  const K2 = window.intlTelInputUtilsTemp;
8479
8499
  delete window.intlTelInputUtilsTemp;
8480
- C.utils = K2;
8500
+ m.utils = K2;
8481
8501
  const j2 = {
8482
8502
  __name: "IntlTelInputWithUtils",
8483
- props: /* @__PURE__ */ n2({
8503
+ props: /* @__PURE__ */ i2({
8484
8504
  disabled: {
8485
8505
  type: Boolean,
8486
8506
  default: !1
@@ -8504,14 +8524,14 @@ const j2 = {
8504
8524
  },
8505
8525
  modelModifiers: {}
8506
8526
  }),
8507
- emits: /* @__PURE__ */ n2([
8527
+ emits: /* @__PURE__ */ i2([
8508
8528
  "changeNumber",
8509
8529
  "changeCountry",
8510
8530
  "changeValidity",
8511
8531
  "changeErrorCode"
8512
8532
  ], ["update:modelValue"]),
8513
- setup(y, { expose: e, emit: n }) {
8514
- const r = A2(y, "modelValue"), o = y, a = n, c = I1(), g = I1(), f = I1(!1), b = () => g.value ? o.options.strictMode ? g.value.isValidNumberPrecise() : g.value.isValidNumber() : null, _ = () => {
8533
+ setup(y, { expose: e, emit: i }) {
8534
+ const n = T2(y, "modelValue"), o = y, a = i, c = I1(), g = I1(), f = I1(!1), b = () => g.value ? o.options.strictMode ? g.value.isValidNumberPrecise() : g.value.isValidNumber() : null, _ = () => {
8515
8535
  let v = b();
8516
8536
  f.value !== v && (f.value = v, a("changeValidity", !!v), a(
8517
8537
  "changeErrorCode",
@@ -8520,30 +8540,30 @@ const j2 = {
8520
8540
  }, I = () => {
8521
8541
  var v;
8522
8542
  a("changeNumber", ((v = g.value) == null ? void 0 : v.getNumber()) ?? ""), _();
8523
- }, N = () => {
8543
+ }, L = () => {
8524
8544
  var v;
8525
8545
  a("changeCountry", ((v = g.value) == null ? void 0 : v.getSelectedCountryData().iso2) ?? ""), I(), _();
8526
8546
  };
8527
- return L2(() => {
8528
- c.value && (g.value = C(c.value, o.options), o.value && g.value.setNumber(o.value), o.disabled && g.value.setDisabled(o.disabled));
8529
- }), T2(
8547
+ return N2(() => {
8548
+ c.value && (g.value = m(c.value, o.options), o.value && g.value.setNumber(o.value), o.disabled && g.value.setDisabled(o.disabled));
8549
+ }), A2(
8530
8550
  () => o.disabled,
8531
8551
  (v) => {
8532
- var A;
8533
- return (A = g.value) == null ? void 0 : A.setDisabled(v);
8552
+ var T;
8553
+ return (T = g.value) == null ? void 0 : T.setDisabled(v);
8534
8554
  }
8535
8555
  ), E2(() => {
8536
8556
  var v;
8537
8557
  return (v = g.value) == null ? void 0 : v.destroy();
8538
- }), e({ instance: g, input: c }), (v, A) => D2((M2(), x2("input", P2({
8558
+ }), e({ instance: g, input: c }), (v, T) => D2((M2(), P2("input", x2({
8539
8559
  ref_key: "input",
8540
8560
  ref: c,
8541
- "onUpdate:modelValue": A[0] || (A[0] = (M) => r.value = M),
8561
+ "onUpdate:modelValue": T[0] || (T[0] = (M) => n.value = M),
8542
8562
  type: "tel",
8543
- onCountrychange: N,
8563
+ onCountrychange: L,
8544
8564
  onInput: I
8545
8565
  }, y.inputProps), null, 16)), [
8546
- [R2, r.value]
8566
+ [R2, n.value]
8547
8567
  ]);
8548
8568
  }
8549
8569
  };