intl-tel-input 25.8.2 → 25.8.4

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 r2, useModel as D2, ref as v1, onMounted as P2, watch as x2, onUnmounted as R2, withDirectives as B2, createElementBlock as k2, openBlock as O2, mergeProps as G2, vModelText as U2 } from "vue";
2
- const F2 = [
1
+ import { mergeModels as r2, useModel as D2, ref as v1, onMounted as P2, watch as x2, onUnmounted as R2, withDirectives as B2, createElementBlock as k2, openBlock as O2, mergeProps as G2, vModelText as F2 } from "vue";
2
+ const U2 = [
3
3
  [
4
4
  "af",
5
5
  // Afghanistan
@@ -1322,18 +1322,18 @@ const F2 = [
1322
1322
  // Zimbabwe
1323
1323
  "263"
1324
1324
  ]
1325
- ], q = [];
1326
- for (const y of F2)
1327
- q.push({
1325
+ ], J = [];
1326
+ for (const m of U2)
1327
+ J.push({
1328
1328
  name: "",
1329
1329
  // populated in the plugin
1330
- iso2: y[0],
1331
- dialCode: y[1],
1332
- priority: y[2] || 0,
1333
- areaCodes: y[3] || null,
1330
+ iso2: m[0],
1331
+ dialCode: m[1],
1332
+ priority: m[2] || 0,
1333
+ areaCodes: m[3] || null,
1334
1334
  nodeById: {},
1335
1335
  // populated by the plugin
1336
- nationalPrefix: y[4] || null
1336
+ nationalPrefix: m[4] || null
1337
1337
  });
1338
1338
  const V2 = {
1339
1339
  ad: "Andorra",
@@ -1591,13 +1591,13 @@ const V2 = {
1591
1591
  ac: "Ascension Island",
1592
1592
  xk: "Kosovo"
1593
1593
  }, a2 = { ...V2, ...K2 };
1594
- for (const y of q)
1595
- y.name = a2[y.iso2];
1594
+ for (const m of J)
1595
+ m.name = a2[m.iso2];
1596
1596
  let H2 = 0;
1597
- const S1 = (y) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(y).matches, j2 = () => {
1597
+ const S1 = (m) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(m).matches, j2 = () => {
1598
1598
  if (typeof navigator < "u" && typeof window < "u") {
1599
- const y = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), e = S1("(max-width: 500px)"), i = S1("(max-height: 600px)"), n = S1("(pointer: coarse)");
1600
- return y || e || n && i;
1599
+ const m = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), e = S1("(max-width: 500px)"), i = S1("(max-height: 600px)"), n = S1("(pointer: coarse)");
1600
+ return m || e || n && i;
1601
1601
  }
1602
1602
  return !1;
1603
1603
  }, l2 = {
@@ -1667,30 +1667,30 @@ const S1 = (y) => typeof window < "u" && typeof window.matchMedia == "function"
1667
1667
  "887",
1668
1668
  "888",
1669
1669
  "889"
1670
- ], f1 = (y) => y.replace(/\D/g, ""), o2 = (y = "") => y.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), u2 = (y) => {
1671
- const e = f1(y);
1670
+ ], f1 = (m) => m.replace(/\D/g, ""), o2 = (m = "") => m.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), u2 = (m) => {
1671
+ const e = f1(m);
1672
1672
  if (e.charAt(0) === "1") {
1673
1673
  const i = e.substring(1, 4);
1674
1674
  return W2.includes(i);
1675
1675
  }
1676
1676
  return !1;
1677
- }, z2 = (y, e, i, n) => {
1677
+ }, z2 = (m, e, i, n) => {
1678
1678
  if (i === 0 && !n)
1679
1679
  return 0;
1680
1680
  let o = 0;
1681
1681
  for (let l = 0; l < e.length; l++) {
1682
- if (/[+0-9]/.test(e[l]) && o++, o === y && !n)
1682
+ if (/[+0-9]/.test(e[l]) && o++, o === m && !n)
1683
1683
  return l + 1;
1684
- if (n && o === y + 1)
1684
+ if (n && o === m + 1)
1685
1685
  return l;
1686
1686
  }
1687
1687
  return e.length;
1688
- }, T = (y, e, i) => {
1689
- const n = document.createElement(y);
1688
+ }, N = (m, e, i) => {
1689
+ const n = document.createElement(m);
1690
1690
  return e && Object.entries(e).forEach(([o, l]) => n.setAttribute(o, l)), i && i.appendChild(n), n;
1691
- }, i1 = (y, ...e) => {
1692
- const { instances: i } = m;
1693
- Object.values(i).forEach((n) => n[y](...e));
1691
+ }, $1 = (m, ...e) => {
1692
+ const { instances: i } = C;
1693
+ Object.values(i).forEach((n) => n[m](...e));
1694
1694
  };
1695
1695
  class p1 {
1696
1696
  /**
@@ -1732,9 +1732,9 @@ class p1 {
1732
1732
  this.options.countryOrder && (this.options.countryOrder = this.options.countryOrder.map((e) => e.toLowerCase())), this.countries.sort((e, i) => {
1733
1733
  const { countryOrder: n } = this.options;
1734
1734
  if (n) {
1735
- const o = n.indexOf(e.iso2), l = n.indexOf(i.iso2), g = o > -1, C = l > -1;
1736
- if (g || C)
1737
- return g && C ? o - l : g ? -1 : 1;
1735
+ const o = n.indexOf(e.iso2), l = n.indexOf(i.iso2), g = o > -1, h = l > -1;
1736
+ if (g || h)
1737
+ return g && h ? o - l : g ? -1 : 1;
1738
1738
  }
1739
1739
  return e.name.localeCompare(i.name);
1740
1740
  });
@@ -1755,18 +1755,18 @@ class p1 {
1755
1755
  const n = e.map(
1756
1756
  (o) => o.toLowerCase()
1757
1757
  );
1758
- this.countries = q.filter(
1758
+ this.countries = J.filter(
1759
1759
  (o) => n.includes(o.iso2)
1760
1760
  );
1761
1761
  } else if (i.length) {
1762
1762
  const n = i.map(
1763
1763
  (o) => o.toLowerCase()
1764
1764
  );
1765
- this.countries = q.filter(
1765
+ this.countries = J.filter(
1766
1766
  (o) => !n.includes(o.iso2)
1767
1767
  );
1768
1768
  } else
1769
- this.countries = q;
1769
+ this.countries = J;
1770
1770
  }
1771
1771
  //* Translate Countries by object literal provided on config.
1772
1772
  _translateCountryNames() {
@@ -1794,7 +1794,7 @@ class p1 {
1794
1794
  }
1795
1795
  //* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
1796
1796
  _generateMarkup() {
1797
- var f, I, G;
1797
+ var f, I, O;
1798
1798
  this.telInput.classList.add("iti__tel-input"), !this.telInput.hasAttribute("autocomplete") && !(this.telInput.form && this.telInput.form.hasAttribute("autocomplete")) && this.telInput.setAttribute("autocomplete", "off");
1799
1799
  const {
1800
1800
  allowDropdown: e,
@@ -1803,23 +1803,23 @@ class p1 {
1803
1803
  containerClass: o,
1804
1804
  hiddenInput: l,
1805
1805
  dropdownContainer: g,
1806
- fixDropdownWidth: C,
1807
- useFullscreenPopup: c,
1808
- countrySearch: S,
1809
- i18n: w
1810
- } = this.options, b = p1._buildClassNames({
1806
+ fixDropdownWidth: h,
1807
+ useFullscreenPopup: _,
1808
+ countrySearch: L,
1809
+ i18n: v
1810
+ } = this.options, S = p1._buildClassNames({
1811
1811
  iti: !0,
1812
1812
  "iti--allow-dropdown": e,
1813
1813
  "iti--show-flags": n,
1814
- "iti--inline-dropdown": !c,
1814
+ "iti--inline-dropdown": !_,
1815
1815
  [o]: !!o
1816
- }), L = T("div", { class: b });
1817
- if ((f = this.telInput.parentNode) == null || f.insertBefore(L, this.telInput), e || n || i) {
1818
- this.countryContainer = T(
1816
+ }), T = N("div", { class: S });
1817
+ if ((f = this.telInput.parentNode) == null || f.insertBefore(T, this.telInput), e || n || i) {
1818
+ this.countryContainer = N(
1819
1819
  "div",
1820
1820
  { class: "iti__country-container" },
1821
- L
1822
- ), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", e ? (this.selectedCountry = T(
1821
+ T
1822
+ ), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", e ? (this.selectedCountry = N(
1823
1823
  "button",
1824
1824
  {
1825
1825
  type: "button",
@@ -1830,92 +1830,92 @@ class p1 {
1830
1830
  "aria-controls": `iti-${this.id}__dropdown-content`
1831
1831
  },
1832
1832
  this.countryContainer
1833
- ), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = T(
1833
+ ), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = N(
1834
1834
  "div",
1835
1835
  { class: "iti__selected-country" },
1836
1836
  this.countryContainer
1837
1837
  );
1838
- const U = T(
1838
+ const G = N(
1839
1839
  "div",
1840
1840
  { class: "iti__selected-country-primary" },
1841
1841
  this.selectedCountry
1842
1842
  );
1843
- if (this.selectedCountryInner = T(
1843
+ if (this.selectedCountryInner = N(
1844
1844
  "div",
1845
1845
  { class: "iti__flag" },
1846
- U
1847
- ), e && (this.dropdownArrow = T(
1846
+ G
1847
+ ), e && (this.dropdownArrow = N(
1848
1848
  "div",
1849
1849
  { class: "iti__arrow", "aria-hidden": "true" },
1850
- U
1851
- )), i && (this.selectedDialCode = T(
1850
+ G
1851
+ )), i && (this.selectedDialCode = N(
1852
1852
  "div",
1853
- { class: "iti__selected-dial-code", "aria-hidden": "true", dir: "ltr" },
1853
+ { class: "iti__selected-dial-code", dir: "ltr" },
1854
1854
  this.selectedCountry
1855
1855
  )), e) {
1856
- const D = C ? "" : "iti--flexible-dropdown-width";
1857
- if (this.dropdownContent = T("div", {
1856
+ const F = h ? "" : "iti--flexible-dropdown-width";
1857
+ if (this.dropdownContent = N("div", {
1858
1858
  id: `iti-${this.id}__dropdown-content`,
1859
- class: `iti__dropdown-content iti__hide ${D}`,
1859
+ class: `iti__dropdown-content iti__hide ${F}`,
1860
1860
  role: "dialog",
1861
1861
  "aria-modal": "true"
1862
- }), S) {
1863
- const x = T(
1862
+ }), L) {
1863
+ const D = N(
1864
1864
  "div",
1865
1865
  { class: "iti__search-input-wrapper" },
1866
1866
  this.dropdownContent
1867
1867
  );
1868
- this.searchIcon = T(
1868
+ this.searchIcon = N(
1869
1869
  "span",
1870
1870
  {
1871
1871
  class: "iti__search-icon",
1872
1872
  "aria-hidden": "true"
1873
1873
  },
1874
- x
1874
+ D
1875
1875
  ), this.searchIcon.innerHTML = `
1876
1876
  <svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" aria-hidden="true">
1877
1877
  <circle cx="11" cy="11" r="7" />
1878
1878
  <line x1="21" y1="21" x2="16.65" y2="16.65" />
1879
- </svg>`, this.searchInput = T(
1879
+ </svg>`, this.searchInput = N(
1880
1880
  "input",
1881
1881
  {
1882
1882
  id: `iti-${this.id}__search-input`,
1883
1883
  // Chrome says inputs need either a name or an id
1884
1884
  type: "search",
1885
1885
  class: "iti__search-input",
1886
- placeholder: w.searchPlaceholder,
1886
+ placeholder: v.searchPlaceholder,
1887
1887
  // role=combobox + aria-autocomplete=list + aria-activedescendant allows maintaining focus on the search input while allowing users to navigate search results with up/down keyboard keys
1888
1888
  role: "combobox",
1889
1889
  "aria-expanded": "true",
1890
- "aria-label": w.searchPlaceholder,
1890
+ "aria-label": v.searchPlaceholder,
1891
1891
  "aria-controls": `iti-${this.id}__country-listbox`,
1892
1892
  "aria-autocomplete": "list",
1893
1893
  autocomplete: "off"
1894
1894
  },
1895
- x
1896
- ), this.searchClearButton = T(
1895
+ D
1896
+ ), this.searchClearButton = N(
1897
1897
  "button",
1898
1898
  {
1899
1899
  type: "button",
1900
1900
  class: "iti__search-clear iti__hide",
1901
- "aria-label": w.clearSearchAriaLabel,
1901
+ "aria-label": v.clearSearchAriaLabel,
1902
1902
  tabindex: "-1"
1903
1903
  },
1904
- x
1904
+ D
1905
1905
  );
1906
- const Y = `iti-${this.id}-clear-mask`;
1906
+ const i1 = `iti-${this.id}-clear-mask`;
1907
1907
  this.searchClearButton.innerHTML = `
1908
1908
  <svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" aria-hidden="true" focusable="false">
1909
- <mask id="${Y}" maskUnits="userSpaceOnUse">
1909
+ <mask id="${i1}" maskUnits="userSpaceOnUse">
1910
1910
  <rect width="16" height="16" fill="white" />
1911
1911
  <path d="M5.2 5.2 L10.8 10.8 M10.8 5.2 L5.2 10.8" stroke="black" stroke-linecap="round" class="iti__search-clear-x" />
1912
1912
  </mask>
1913
- <circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${Y})" />
1914
- </svg>`, this.searchResultsA11yText = T(
1913
+ <circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${i1})" />
1914
+ </svg>`, this.searchResultsA11yText = N(
1915
1915
  "span",
1916
1916
  { class: "iti__a11y-text" },
1917
1917
  this.dropdownContent
1918
- ), this.searchNoResults = T(
1918
+ ), this.searchNoResults = N(
1919
1919
  "div",
1920
1920
  {
1921
1921
  class: "iti__no-results iti__hide",
@@ -1923,52 +1923,52 @@ class p1 {
1923
1923
  // all a11y messaging happens in this.searchResultsA11yText
1924
1924
  },
1925
1925
  this.dropdownContent
1926
- ), this.searchNoResults.textContent = w.zeroSearchResults;
1926
+ ), this.searchNoResults.textContent = v.zeroSearchResults;
1927
1927
  }
1928
- if (this.countryList = T(
1928
+ if (this.countryList = N(
1929
1929
  "ul",
1930
1930
  {
1931
1931
  class: "iti__country-list",
1932
1932
  id: `iti-${this.id}__country-listbox`,
1933
1933
  role: "listbox",
1934
- "aria-label": w.countryListAriaLabel
1934
+ "aria-label": v.countryListAriaLabel
1935
1935
  },
1936
1936
  this.dropdownContent
1937
- ), this._appendListItems(), S && this._updateSearchResultsA11yText(), g) {
1938
- const x = p1._buildClassNames({
1937
+ ), this._appendListItems(), L && this._updateSearchResultsA11yText(), g) {
1938
+ const D = p1._buildClassNames({
1939
1939
  iti: !0,
1940
1940
  "iti--container": !0,
1941
- "iti--fullscreen-popup": c,
1942
- "iti--inline-dropdown": !c,
1941
+ "iti--fullscreen-popup": _,
1942
+ "iti--inline-dropdown": !_,
1943
1943
  [o]: !!o
1944
1944
  });
1945
- this.dropdown = T("div", { class: x }), this.dropdown.appendChild(this.dropdownContent);
1945
+ this.dropdown = N("div", { class: D }), this.dropdown.appendChild(this.dropdownContent);
1946
1946
  } else
1947
1947
  this.countryContainer.appendChild(this.dropdownContent);
1948
1948
  }
1949
1949
  }
1950
- if (L.appendChild(this.telInput), this._updateInputPadding(), l) {
1951
- const U = this.telInput.getAttribute("name") || "", D = l(U);
1952
- if (D.phone) {
1953
- const x = (I = this.telInput.form) == null ? void 0 : I.querySelector(`input[name="${D.phone}"]`);
1954
- x ? this.hiddenInput = x : (this.hiddenInput = T("input", {
1950
+ if (T.appendChild(this.telInput), this._updateInputPadding(), l) {
1951
+ const G = this.telInput.getAttribute("name") || "", F = l(G);
1952
+ if (F.phone) {
1953
+ const D = (I = this.telInput.form) == null ? void 0 : I.querySelector(`input[name="${F.phone}"]`);
1954
+ D ? this.hiddenInput = D : (this.hiddenInput = N("input", {
1955
1955
  type: "hidden",
1956
- name: D.phone
1957
- }), L.appendChild(this.hiddenInput));
1956
+ name: F.phone
1957
+ }), T.appendChild(this.hiddenInput));
1958
1958
  }
1959
- if (D.country) {
1960
- const x = (G = this.telInput.form) == null ? void 0 : G.querySelector(`input[name="${D.country}"]`);
1961
- x ? this.hiddenInputCountry = x : (this.hiddenInputCountry = T("input", {
1959
+ if (F.country) {
1960
+ const D = (O = this.telInput.form) == null ? void 0 : O.querySelector(`input[name="${F.country}"]`);
1961
+ D ? this.hiddenInputCountry = D : (this.hiddenInputCountry = N("input", {
1962
1962
  type: "hidden",
1963
- name: D.country
1964
- }), L.appendChild(this.hiddenInputCountry));
1963
+ name: F.country
1964
+ }), T.appendChild(this.hiddenInputCountry));
1965
1965
  }
1966
1966
  }
1967
1967
  }
1968
1968
  //* For each country: add a country list item <li> to the countryList <ul> container.
1969
1969
  _appendListItems() {
1970
1970
  for (let e = 0; e < this.countries.length; e++) {
1971
- const i = this.countries[e], n = e === 0 ? "iti__highlight" : "", o = T(
1971
+ const i = this.countries[e], n = e === 0 ? "iti__highlight" : "", o = N(
1972
1972
  "li",
1973
1973
  {
1974
1974
  id: `iti-${this.id}__item-${i.iso2}`,
@@ -1990,12 +1990,12 @@ class p1 {
1990
1990
  //* 1. Extracting a dial code from the given number
1991
1991
  //* 2. Using explicit initialCountry
1992
1992
  _setInitialState(e = !1) {
1993
- const i = this.telInput.getAttribute("value"), n = this.telInput.value, l = i && i.charAt(0) === "+" && (!n || n.charAt(0) !== "+") ? i : n, g = this._getDialCode(l), C = u2(l), { initialCountry: c, geoIpLookup: S } = this.options, w = c === "auto" && S;
1994
- if (g && !C)
1993
+ const i = this.telInput.getAttribute("value"), n = this.telInput.value, l = i && i.charAt(0) === "+" && (!n || n.charAt(0) !== "+") ? i : n, g = this._getDialCode(l), h = u2(l), { initialCountry: _, geoIpLookup: L } = this.options, v = _ === "auto" && L;
1994
+ if (g && !h)
1995
1995
  this._updateCountryFromNumber(l);
1996
- else if (!w || e) {
1997
- const b = c ? c.toLowerCase() : "";
1998
- b && this._getCountryData(b, !0) ? this._setCountry(b) : g && C ? this._setCountry("us") : this._setCountry();
1996
+ else if (!v || e) {
1997
+ const S = _ ? _.toLowerCase() : "";
1998
+ S && this._getCountryData(S, !0) ? this._setCountry(S) : g && h ? this._setCountry("us") : this._setCountry();
1999
1999
  }
2000
2000
  l && this._updateValFromNumber(l);
2001
2001
  }
@@ -2031,21 +2031,21 @@ class p1 {
2031
2031
  //* Init many requests: utils script / geo ip lookup.
2032
2032
  _initRequests() {
2033
2033
  let { loadUtils: e, initialCountry: i, geoIpLookup: n } = this.options;
2034
- e && !m.utils ? (this._handlePageLoad = () => {
2034
+ e && !C.utils ? (this._handlePageLoad = () => {
2035
2035
  var l;
2036
- window.removeEventListener("load", this._handlePageLoad), (l = m.attachUtils(e)) == null || l.catch(() => {
2036
+ window.removeEventListener("load", this._handlePageLoad), (l = C.attachUtils(e)) == null || l.catch(() => {
2037
2037
  });
2038
- }, m.documentReady() ? this._handlePageLoad() : window.addEventListener("load", this._handlePageLoad)) : this.resolveUtilsScriptPromise(), i === "auto" && n && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
2038
+ }, C.documentReady() ? this._handlePageLoad() : window.addEventListener("load", this._handlePageLoad)) : this.resolveUtilsScriptPromise(), i === "auto" && n && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
2039
2039
  }
2040
2040
  //* Perform the geo ip lookup.
2041
2041
  _loadAutoCountry() {
2042
- m.autoCountry ? this.handleAutoCountry() : m.startedLoadingAutoCountry || (m.startedLoadingAutoCountry = !0, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(
2042
+ C.autoCountry ? this.handleAutoCountry() : C.startedLoadingAutoCountry || (C.startedLoadingAutoCountry = !0, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(
2043
2043
  (e = "") => {
2044
2044
  const i = e.toLowerCase();
2045
- i && this._getCountryData(i, !0) ? (m.autoCountry = i, setTimeout(() => i1("handleAutoCountry"))) : (this._setInitialState(!0), i1("rejectAutoCountryPromise"));
2045
+ i && this._getCountryData(i, !0) ? (C.autoCountry = i, setTimeout(() => $1("handleAutoCountry"))) : (this._setInitialState(!0), $1("rejectAutoCountryPromise"));
2046
2046
  },
2047
2047
  () => {
2048
- this._setInitialState(!0), i1("rejectAutoCountryPromise");
2048
+ this._setInitialState(!0), $1("rejectAutoCountryPromise");
2049
2049
  }
2050
2050
  ));
2051
2051
  }
@@ -2054,31 +2054,31 @@ class p1 {
2054
2054
  }
2055
2055
  //* Initialize the tel input listeners.
2056
2056
  _initTelInputListeners() {
2057
- const { strictMode: e, formatAsYouType: i, separateDialCode: n, formatOnDisplay: o, allowDropdown: l, countrySearch: g } = this.options;
2058
- let C = !1;
2059
- new RegExp("\\p{L}", "u").test(this.telInput.value) && (C = !0), this._handleInputEvent = (c) => {
2060
- if (this.isAndroid && (c == null ? void 0 : c.data) === "+" && n && l && g) {
2061
- const L = this.telInput.selectionStart || 0, f = this.telInput.value.substring(0, L - 1), I = this.telInput.value.substring(L);
2062
- this.telInput.value = f + I, this._openDropdownWithPlus();
2057
+ const { strictMode: e, formatAsYouType: i, separateDialCode: n, allowDropdown: o, countrySearch: l } = this.options;
2058
+ let g = !1;
2059
+ new RegExp("\\p{L}", "u").test(this.telInput.value) && (g = !0), this._handleInputEvent = (h) => {
2060
+ if (this.isAndroid && (h == null ? void 0 : h.data) === "+" && n && o && l) {
2061
+ const S = this.telInput.selectionStart || 0, T = this.telInput.value.substring(0, S - 1), f = this.telInput.value.substring(S);
2062
+ this.telInput.value = T + f, this._openDropdownWithPlus();
2063
2063
  return;
2064
2064
  }
2065
2065
  this._updateCountryFromNumber(this.telInput.value) && this._triggerCountryChange();
2066
- const S = (c == null ? void 0 : c.data) && /[^+0-9]/.test(c.data), w = (c == null ? void 0 : c.inputType) === "insertFromPaste" && this.telInput.value;
2067
- S || w && !e ? C = !0 : /[^+0-9]/.test(this.telInput.value) || (C = !1);
2068
- const b = (c == null ? void 0 : c.detail) && c.detail.isSetNumber && !o;
2069
- if (i && !C && !b) {
2070
- const L = this.telInput.selectionStart || 0, I = this.telInput.value.substring(0, L).replace(/[^+0-9]/g, "").length, G = (c == null ? void 0 : c.inputType) === "deleteContentForward", U = this._formatNumberAsYouType(), D = z2(I, U, L, G);
2071
- this.telInput.value = U, this.telInput.setSelectionRange(D, D);
2066
+ const _ = (h == null ? void 0 : h.data) && /[^+0-9]/.test(h.data), L = (h == null ? void 0 : h.inputType) === "insertFromPaste" && this.telInput.value;
2067
+ _ || L && !e ? g = !0 : /[^+0-9]/.test(this.telInput.value) || (g = !1);
2068
+ const v = (h == null ? void 0 : h.detail) && h.detail.isSetNumber;
2069
+ if (i && !g && !v) {
2070
+ const S = this.telInput.selectionStart || 0, f = this.telInput.value.substring(0, S).replace(/[^+0-9]/g, "").length, I = (h == null ? void 0 : h.inputType) === "deleteContentForward", O = this._formatNumberAsYouType(), G = z2(f, O, S, I);
2071
+ this.telInput.value = O, this.telInput.setSelectionRange(G, G);
2072
2072
  }
2073
- }, this.telInput.addEventListener("input", this._handleInputEvent), (e || n) && (this._handleKeydownEvent = (c) => {
2074
- if (c.key && c.key.length === 1 && !c.altKey && !c.ctrlKey && !c.metaKey) {
2075
- if (n && l && g && c.key === "+") {
2076
- c.preventDefault(), this._openDropdownWithPlus();
2073
+ }, this.telInput.addEventListener("input", this._handleInputEvent), (e || n) && (this._handleKeydownEvent = (h) => {
2074
+ if (h.key && h.key.length === 1 && !h.altKey && !h.ctrlKey && !h.metaKey) {
2075
+ if (n && o && l && h.key === "+") {
2076
+ h.preventDefault(), this._openDropdownWithPlus();
2077
2077
  return;
2078
2078
  }
2079
2079
  if (e) {
2080
- const S = this.telInput.value, b = !(S.charAt(0) === "+") && this.telInput.selectionStart === 0 && c.key === "+", L = /^[0-9]$/.test(c.key), f = n ? L : b || L, I = S.slice(0, this.telInput.selectionStart) + c.key + S.slice(this.telInput.selectionEnd), G = this._getFullNumber(I), U = m.utils.getCoreNumber(G, this.selectedCountryData.iso2), D = this.maxCoreNumberLength && U.length > this.maxCoreNumberLength, Y = this._getNewCountryFromNumber(G) !== null;
2081
- (!f || D && !Y && !b) && c.preventDefault();
2080
+ const _ = this.telInput.value, v = !(_.charAt(0) === "+") && this.telInput.selectionStart === 0 && h.key === "+", S = /^[0-9]$/.test(h.key), T = n ? S : v || S, f = _.slice(0, this.telInput.selectionStart) + h.key + _.slice(this.telInput.selectionEnd), I = this._getFullNumber(f), O = C.utils.getCoreNumber(I, this.selectedCountryData.iso2), G = this.maxCoreNumberLength && O.length > this.maxCoreNumberLength, D = this._getNewCountryFromNumber(I) !== null;
2081
+ (!T || G && !D && !v) && h.preventDefault();
2082
2082
  }
2083
2083
  }
2084
2084
  }, this.telInput.addEventListener("keydown", this._handleKeydownEvent));
@@ -2167,18 +2167,18 @@ class p1 {
2167
2167
  _filterCountries(e, i = !1) {
2168
2168
  let n = !0;
2169
2169
  this.countryList.innerHTML = "";
2170
- const o = o2(e), l = o.length, g = [], C = [], c = [], S = [], w = [], b = [];
2170
+ const o = o2(e), l = o.length, g = [], h = [], _ = [], L = [], v = [], S = [];
2171
2171
  for (const f of this.countries)
2172
- i || l === 0 ? c.push(f) : f.iso2 === o ? g.push(f) : f.normalisedName.startsWith(o) ? C.push(f) : f.normalisedName.includes(o) ? c.push(f) : o === f.dialCode || o === f.dialCodePlus ? S.push(f) : f.dialCodePlus.includes(o) ? w.push(f) : f.initials.includes(o) && b.push(f);
2173
- const L = [
2172
+ i || l === 0 ? _.push(f) : f.iso2 === o ? g.push(f) : f.normalisedName.startsWith(o) ? h.push(f) : f.normalisedName.includes(o) ? _.push(f) : o === f.dialCode || o === f.dialCodePlus ? L.push(f) : f.dialCodePlus.includes(o) ? v.push(f) : f.initials.includes(o) && S.push(f);
2173
+ const T = [
2174
2174
  ...g.sort((f, I) => f.priority - I.priority),
2175
- ...C.sort((f, I) => f.priority - I.priority),
2176
- ...c.sort((f, I) => f.priority - I.priority),
2177
- ...S.sort((f, I) => f.priority - I.priority),
2178
- ...w.sort((f, I) => f.priority - I.priority),
2179
- ...b.sort((f, I) => f.priority - I.priority)
2175
+ ...h.sort((f, I) => f.priority - I.priority),
2176
+ ..._.sort((f, I) => f.priority - I.priority),
2177
+ ...L.sort((f, I) => f.priority - I.priority),
2178
+ ...v.sort((f, I) => f.priority - I.priority),
2179
+ ...S.sort((f, I) => f.priority - I.priority)
2180
2180
  ];
2181
- for (const f of L) {
2181
+ for (const f of T) {
2182
2182
  const I = f.nodeById[this.id];
2183
2183
  I && (this.countryList.appendChild(I), n && (this._highlightListItem(I, !1), n = !1));
2184
2184
  }
@@ -2204,9 +2204,9 @@ class p1 {
2204
2204
  //* NOTE: this is called from _setInitialState, handleUtils and setNumber.
2205
2205
  _updateValFromNumber(e) {
2206
2206
  let i = e;
2207
- if (this.options.formatOnDisplay && m.utils && this.selectedCountryData) {
2208
- const n = this.options.nationalMode || i.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: o, INTERNATIONAL: l } = m.utils.numberFormat, g = n ? o : l;
2209
- i = m.utils.formatNumber(
2207
+ if (this.options.formatOnDisplay && C.utils && this.selectedCountryData) {
2208
+ const n = this.options.nationalMode || i.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: o, INTERNATIONAL: l } = C.utils.numberFormat, g = n ? o : l;
2209
+ i = C.utils.formatNumber(
2210
2210
  i,
2211
2211
  this.selectedCountryData.iso2,
2212
2212
  g
@@ -2235,19 +2235,19 @@ class p1 {
2235
2235
  let n = i ? e.substring(i) : e;
2236
2236
  const o = this.selectedCountryData.iso2, l = this.selectedCountryData.dialCode;
2237
2237
  n = this._ensureHasDialCode(n);
2238
- const g = this._getDialCode(n, !0), C = f1(n);
2238
+ const g = this._getDialCode(n, !0), h = f1(n);
2239
2239
  if (g) {
2240
- const c = f1(g), S = this.dialCodeToIso2Map[c];
2241
- if (!o && this.defaultCountry && S.includes(this.defaultCountry))
2240
+ const _ = f1(g), L = this.dialCodeToIso2Map[_];
2241
+ if (!o && this.defaultCountry && L.includes(this.defaultCountry))
2242
2242
  return this.defaultCountry;
2243
- const w = this.selectedCountryData.areaCodes && C.length > c.length, b = o && S.includes(o) && !w;
2244
- if (!(l === "1" && u2(C)) && !b) {
2245
- for (const f of S)
2243
+ const v = this.selectedCountryData.areaCodes && h.length > _.length, S = o && L.includes(o) && !v;
2244
+ if (!(l === "1" && u2(h)) && !S) {
2245
+ for (const f of L)
2246
2246
  if (f)
2247
2247
  return f;
2248
2248
  }
2249
2249
  } else {
2250
- if (n.charAt(0) === "+" && C.length)
2250
+ if (n.charAt(0) === "+" && h.length)
2251
2251
  return "";
2252
2252
  if ((!n || n === "+") && !this.selectedCountryData.iso2)
2253
2253
  return this.defaultCountry;
@@ -2277,11 +2277,12 @@ class p1 {
2277
2277
  //* Note: called from _setInitialState, _updateCountryFromNumber, _selectListItem, setCountry.
2278
2278
  _setCountry(e) {
2279
2279
  const { separateDialCode: i, showFlags: n, i18n: o } = this.options, l = this.selectedCountryData.iso2 ? this.selectedCountryData : {};
2280
- if (this.selectedCountryData = e ? this._getCountryData(e, !1) || {} : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountryInner) {
2281
- let g = "", C = "";
2282
- e && n ? (g = `iti__flag iti__${e}`, C = o.selectedCountryAriaLabel.replace("${country}", this.selectedCountryData.name)) : (g = "iti__flag iti__globe", C = o.noCountrySelected), this.selectedCountryInner.className = g, this.selectedCountry.setAttribute("aria-label", C);
2280
+ if (this.selectedCountryData = e ? this._getCountryData(e, !1) || {} : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountry) {
2281
+ const g = e && n ? `iti__flag iti__${e}` : "iti__flag iti__globe";
2282
+ let h, _;
2283
+ e ? (_ = this.selectedCountryData.name, h = o.selectedCountryAriaLabel.replace("${country}", this.selectedCountryData.name)) : (_ = o.noCountrySelected, h = o.noCountrySelected), this.selectedCountryInner.className = g, this.selectedCountry.setAttribute("title", _), this.selectedCountry.setAttribute("aria-label", h);
2283
2284
  }
2284
- if (this._setSelectedCountryTitleAttribute(e, i), i) {
2285
+ if (i) {
2285
2286
  const g = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
2286
2287
  this.selectedDialCode.innerHTML = g, this._updateInputPadding();
2287
2288
  }
@@ -2297,28 +2298,22 @@ class p1 {
2297
2298
  //* Update the maximum valid number length for the currently selected country.
2298
2299
  _updateMaxLength() {
2299
2300
  const { strictMode: e, placeholderNumberType: i, validationNumberTypes: n } = this.options, { iso2: o } = this.selectedCountryData;
2300
- if (e && m.utils)
2301
+ if (e && C.utils)
2301
2302
  if (o) {
2302
- const l = m.utils.numberType[i];
2303
- let g = m.utils.getExampleNumber(
2303
+ const l = C.utils.numberType[i];
2304
+ let g = C.utils.getExampleNumber(
2304
2305
  o,
2305
2306
  !1,
2306
2307
  l,
2307
2308
  !0
2308
- ), C = g;
2309
- for (; m.utils.isPossibleNumber(g, o, n); )
2310
- C = g, g += "0";
2311
- const c = m.utils.getCoreNumber(C, o);
2312
- this.maxCoreNumberLength = c.length, o === "by" && (this.maxCoreNumberLength = c.length + 1);
2309
+ ), h = g;
2310
+ for (; C.utils.isPossibleNumber(g, o, n); )
2311
+ h = g, g += "0";
2312
+ const _ = C.utils.getCoreNumber(h, o);
2313
+ this.maxCoreNumberLength = _.length, o === "by" && (this.maxCoreNumberLength = _.length + 1);
2313
2314
  } else
2314
2315
  this.maxCoreNumberLength = null;
2315
2316
  }
2316
- _setSelectedCountryTitleAttribute(e = null, i) {
2317
- if (!this.selectedCountry)
2318
- return;
2319
- let n;
2320
- e && !i ? n = `${this.selectedCountryData.name}: +${this.selectedCountryData.dialCode}` : e ? n = this.selectedCountryData.name : n = this.options.i18n.noCountrySelected, this.selectedCountry.setAttribute("title", n);
2321
- }
2322
2317
  //* When the input is in a hidden container during initialisation, we must inject some markup
2323
2318
  //* into the end of the DOM to calculate the correct offsetWidth.
2324
2319
  //* NOTE: this is only used when separateDialCode is enabled, so countryContainer and selectedCountry
@@ -2344,14 +2339,14 @@ class p1 {
2344
2339
  nationalMode: n,
2345
2340
  customPlaceholder: o
2346
2341
  } = this.options, l = e === "aggressive" || !this.hadInitialPlaceholder && e === "polite";
2347
- if (m.utils && l) {
2348
- const g = m.utils.numberType[i];
2349
- let C = this.selectedCountryData.iso2 ? m.utils.getExampleNumber(
2342
+ if (C.utils && l) {
2343
+ const g = C.utils.numberType[i];
2344
+ let h = this.selectedCountryData.iso2 ? C.utils.getExampleNumber(
2350
2345
  this.selectedCountryData.iso2,
2351
2346
  n,
2352
2347
  g
2353
2348
  ) : "";
2354
- C = this._beforeSetNumber(C), typeof o == "function" && (C = o(C, this.selectedCountryData)), this.telInput.setAttribute("placeholder", C);
2349
+ h = this._beforeSetNumber(h), typeof o == "function" && (h = o(h, this.selectedCountryData)), this.telInput.setAttribute("placeholder", h);
2355
2350
  }
2356
2351
  }
2357
2352
  //* Called when the user selects a list item from the dropdown.
@@ -2359,7 +2354,7 @@ class p1 {
2359
2354
  const i = this._setCountry(
2360
2355
  e.getAttribute("data-country-code")
2361
2356
  );
2362
- this._closeDropdown(), this._updateDialCode(e.getAttribute("data-dial-code")), this.telInput.focus(), i && this._triggerCountryChange();
2357
+ this._closeDropdown(), this._updateDialCode(e.getAttribute("data-dial-code")), this.options.formatOnDisplay && this._updateValFromNumber(this.telInput.value), this.telInput.focus(), i && this._triggerCountryChange();
2363
2358
  }
2364
2359
  //* Close the dropdown and unbind any listeners.
2365
2360
  _closeDropdown() {
@@ -2373,12 +2368,12 @@ class p1 {
2373
2368
  }
2374
2369
  //* Check if an element is visible within it's container, else scroll until it is.
2375
2370
  _scrollTo(e) {
2376
- const i = this.countryList, n = document.documentElement.scrollTop, o = i.offsetHeight, l = i.getBoundingClientRect().top + n, g = l + o, C = e.offsetHeight, c = e.getBoundingClientRect().top + n, S = c + C, w = c - l + i.scrollTop;
2377
- if (c < l)
2378
- i.scrollTop = w;
2379
- else if (S > g) {
2380
- const b = o - C;
2381
- i.scrollTop = w - b;
2371
+ const i = this.countryList, n = document.documentElement.scrollTop, o = i.offsetHeight, l = i.getBoundingClientRect().top + n, g = l + o, h = e.offsetHeight, _ = e.getBoundingClientRect().top + n, L = _ + h, v = _ - l + i.scrollTop;
2372
+ if (_ < l)
2373
+ i.scrollTop = v;
2374
+ else if (L > g) {
2375
+ const S = o - h;
2376
+ i.scrollTop = v - S;
2382
2377
  }
2383
2378
  }
2384
2379
  //* Replace any existing dial code with the new one
@@ -2439,7 +2434,7 @@ class p1 {
2439
2434
  }
2440
2435
  //* Format the number as the user types.
2441
2436
  _formatNumberAsYouType() {
2442
- const e = this._getFullNumber(), i = m.utils ? m.utils.formatNumberAsYouType(e, this.selectedCountryData.iso2) : e, { dialCode: n } = this.selectedCountryData;
2437
+ const e = this._getFullNumber(), i = C.utils ? C.utils.formatNumberAsYouType(e, this.selectedCountryData.iso2) : e, { dialCode: n } = this.selectedCountryData;
2443
2438
  return this.options.separateDialCode && this.telInput.value.charAt(0) !== "+" && i.includes(`+${n}`) ? (i.split(`+${n}`)[1] || "").trim() : i;
2444
2439
  }
2445
2440
  //**************************
@@ -2447,11 +2442,11 @@ class p1 {
2447
2442
  //**************************
2448
2443
  //* This is called when the geoip call returns.
2449
2444
  handleAutoCountry() {
2450
- 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());
2445
+ 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());
2451
2446
  }
2452
2447
  //* This is called when the utils request completes.
2453
2448
  handleUtils() {
2454
- m.utils && (this.telInput.value && this._updateValFromNumber(this.telInput.value), this.selectedCountryData.iso2 && (this._updatePlaceholder(), this._updateMaxLength())), this.resolveUtilsScriptPromise();
2449
+ C.utils && (this.telInput.value && this._updateValFromNumber(this.telInput.value), this.selectedCountryData.iso2 && (this._updatePlaceholder(), this._updateMaxLength())), this.resolveUtilsScriptPromise();
2455
2450
  }
2456
2451
  //********************
2457
2452
  //* PUBLIC METHODS
@@ -2469,26 +2464,26 @@ class p1 {
2469
2464
  "keydown",
2470
2465
  this._handleCountryContainerKeydown
2471
2466
  );
2472
- const C = this.telInput.closest("label");
2473
- C && C.removeEventListener("click", this._handleLabelClick);
2467
+ const h = this.telInput.closest("label");
2468
+ h && h.removeEventListener("click", this._handleLabelClick);
2474
2469
  }
2475
2470
  const { form: n } = this.telInput;
2476
2471
  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);
2477
2472
  const o = this.telInput.parentNode;
2478
- (l = o == null ? void 0 : o.parentNode) == null || l.insertBefore(this.telInput, o), (g = o == null ? void 0 : o.parentNode) == null || g.removeChild(o), delete m.instances[this.id];
2473
+ (l = o == null ? void 0 : o.parentNode) == null || l.insertBefore(this.telInput, o), (g = o == null ? void 0 : o.parentNode) == null || g.removeChild(o), delete C.instances[this.id];
2479
2474
  }
2480
2475
  //* Get the extension from the current number.
2481
2476
  getExtension() {
2482
- return m.utils ? m.utils.getExtension(
2477
+ return C.utils ? C.utils.getExtension(
2483
2478
  this._getFullNumber(),
2484
2479
  this.selectedCountryData.iso2
2485
2480
  ) : "";
2486
2481
  }
2487
2482
  //* Format the number to the given format.
2488
2483
  getNumber(e) {
2489
- if (m.utils) {
2484
+ if (C.utils) {
2490
2485
  const { iso2: i } = this.selectedCountryData;
2491
- return m.utils.formatNumber(
2486
+ return C.utils.formatNumber(
2492
2487
  this._getFullNumber(),
2493
2488
  i,
2494
2489
  e
@@ -2498,7 +2493,7 @@ class p1 {
2498
2493
  }
2499
2494
  //* Get the type of the entered number e.g. landline/mobile.
2500
2495
  getNumberType() {
2501
- return m.utils ? m.utils.getNumberType(
2496
+ return C.utils ? C.utils.getNumberType(
2502
2497
  this._getFullNumber(),
2503
2498
  this.selectedCountryData.iso2
2504
2499
  ) : -99;
@@ -2509,9 +2504,9 @@ class p1 {
2509
2504
  }
2510
2505
  //* Get the validation error.
2511
2506
  getValidationError() {
2512
- if (m.utils) {
2507
+ if (C.utils) {
2513
2508
  const { iso2: e } = this.selectedCountryData;
2514
- return m.utils.getValidationError(this._getFullNumber(), e);
2509
+ return C.utils.getValidationError(this._getFullNumber(), e);
2515
2510
  }
2516
2511
  return -99;
2517
2512
  }
@@ -2524,7 +2519,7 @@ class p1 {
2524
2519
  return this._validateNumber(!0);
2525
2520
  }
2526
2521
  _utilsIsPossibleNumber(e) {
2527
- return m.utils ? m.utils.isPossibleNumber(e, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2522
+ return C.utils ? C.utils.isPossibleNumber(e, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2528
2523
  }
2529
2524
  //* Shared internal validation logic to handle alpha character extension rules.
2530
2525
  _validateNumber(e) {
@@ -2532,18 +2527,18 @@ class p1 {
2532
2527
  return !1;
2533
2528
  const i = this._getFullNumber(), n = i.search(new RegExp("\\p{L}", "u")), o = (l) => e ? this._utilsIsValidNumber(l) : this._utilsIsPossibleNumber(l);
2534
2529
  if (n > -1) {
2535
- const l = i.substring(0, n), g = o(l), C = o(i);
2536
- return g && C;
2530
+ const l = i.substring(0, n), g = o(l), h = o(i);
2531
+ return g && h;
2537
2532
  }
2538
2533
  return o(i);
2539
2534
  }
2540
2535
  _utilsIsValidNumber(e) {
2541
- return m.utils ? m.utils.isValidNumber(e, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2536
+ return C.utils ? C.utils.isValidNumber(e, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2542
2537
  }
2543
2538
  //* Update the selected country, and update the input val accordingly.
2544
2539
  setCountry(e) {
2545
2540
  const i = e == null ? void 0 : e.toLowerCase(), n = this.selectedCountryData.iso2;
2546
- (e && i !== n || !e && n) && (this._setCountry(i), this._updateDialCode(this.selectedCountryData.dialCode), this._triggerCountryChange());
2541
+ (e && i !== n || !e && n) && (this._setCountry(i), this._updateDialCode(this.selectedCountryData.dialCode), this.options.formatOnDisplay && this._updateValFromNumber(this.telInput.value), this._triggerCountryChange());
2547
2542
  }
2548
2543
  //* Set the input value and update the country.
2549
2544
  setNumber(e) {
@@ -2558,56 +2553,56 @@ class p1 {
2558
2553
  this.telInput.disabled = e, e ? this.selectedCountry.setAttribute("disabled", "true") : this.selectedCountry.removeAttribute("disabled");
2559
2554
  }
2560
2555
  }
2561
- const Z2 = (y) => {
2562
- if (!m.utils && !m.startedLoadingUtilsScript) {
2556
+ const Z2 = (m) => {
2557
+ if (!C.utils && !C.startedLoadingUtilsScript) {
2563
2558
  let e;
2564
- if (typeof y == "function")
2559
+ if (typeof m == "function")
2565
2560
  try {
2566
- e = Promise.resolve(y());
2561
+ e = Promise.resolve(m());
2567
2562
  } catch (i) {
2568
2563
  return Promise.reject(i);
2569
2564
  }
2570
2565
  else
2571
- return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof y}`));
2572
- return m.startedLoadingUtilsScript = !0, e.then((i) => {
2566
+ return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof m}`));
2567
+ return C.startedLoadingUtilsScript = !0, e.then((i) => {
2573
2568
  const n = i == null ? void 0 : i.default;
2574
2569
  if (!n || typeof n != "object")
2575
2570
  throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");
2576
- return m.utils = n, i1("handleUtils"), !0;
2571
+ return C.utils = n, $1("handleUtils"), !0;
2577
2572
  }).catch((i) => {
2578
- throw i1("rejectUtilsScriptPromise", i), i;
2573
+ throw $1("rejectUtilsScriptPromise", i), i;
2579
2574
  });
2580
2575
  }
2581
2576
  return null;
2582
- }, m = Object.assign(
2583
- (y, e) => {
2584
- const i = new p1(y, e);
2585
- return i._init(), y.setAttribute("data-intl-tel-input-id", i.id.toString()), m.instances[i.id] = i, y.iti = i, i;
2577
+ }, C = Object.assign(
2578
+ (m, e) => {
2579
+ const i = new p1(m, e);
2580
+ return i._init(), m.setAttribute("data-intl-tel-input-id", i.id.toString()), C.instances[i.id] = i, m.iti = i, i;
2586
2581
  },
2587
2582
  {
2588
2583
  defaults: l2,
2589
2584
  //* Using a static var like this allows us to mock it in the tests.
2590
2585
  documentReady: () => document.readyState === "complete",
2591
2586
  //* Get the country data object.
2592
- getCountryData: () => q,
2587
+ getCountryData: () => J,
2593
2588
  //* A getter for the plugin instance.
2594
- getInstance: (y) => {
2595
- const e = y.getAttribute("data-intl-tel-input-id");
2596
- return e ? m.instances[e] : null;
2589
+ getInstance: (m) => {
2590
+ const e = m.getAttribute("data-intl-tel-input-id");
2591
+ return e ? C.instances[e] : null;
2597
2592
  },
2598
2593
  //* A map from instance ID to instance object.
2599
2594
  instances: {},
2600
2595
  attachUtils: Z2,
2601
2596
  startedLoadingUtilsScript: !1,
2602
2597
  startedLoadingAutoCountry: !1,
2603
- version: "25.8.2"
2598
+ version: "25.8.4"
2604
2599
  }
2605
2600
  );
2606
2601
  (function() {
2607
- var y = this || self;
2602
+ var m = this || self;
2608
2603
  function e(d, t) {
2609
2604
  d = d.split(".");
2610
- var $ = y;
2605
+ var $ = m;
2611
2606
  d[0] in $ || typeof $.execScript > "u" || $.execScript("var " + d[0]);
2612
2607
  for (var s; d.length && (s = d.shift()); ) d.length || t === void 0 ? $[s] && $[s] !== Object.prototype[s] ? $ = $[s] : $ = $[s] = {} : $[s] = t;
2613
2608
  }
@@ -2615,7 +2610,7 @@ const Z2 = (y) => {
2615
2610
  function $() {
2616
2611
  }
2617
2612
  $.prototype = t.prototype, d.ma = t.prototype, d.prototype = new $(), d.prototype.constructor = d, d.sa = function(s, r, u) {
2618
- for (var a = Array(arguments.length - 2), h = 2; h < arguments.length; h++) a[h - 2] = arguments[h];
2613
+ for (var a = Array(arguments.length - 2), c = 2; c < arguments.length; c++) a[c - 2] = arguments[c];
2619
2614
  return t.prototype[r].apply(s, a);
2620
2615
  };
2621
2616
  }
@@ -2636,7 +2631,7 @@ const Z2 = (y) => {
2636
2631
  }, l = {};
2637
2632
  new o("about:invalid#zClosurez"), new o("about:blank");
2638
2633
  const g = {};
2639
- class C {
2634
+ class h {
2640
2635
  constructor() {
2641
2636
  if (g !== g) throw Error("SafeStyle is not meant to be built directly");
2642
2637
  }
@@ -2644,43 +2639,43 @@ const Z2 = (y) => {
2644
2639
  return "";
2645
2640
  }
2646
2641
  }
2647
- new C();
2648
- const c = {};
2649
- class S {
2642
+ new h();
2643
+ const _ = {};
2644
+ class L {
2650
2645
  constructor() {
2651
- if (c !== c) throw Error("SafeStyleSheet is not meant to be built directly");
2646
+ if (_ !== _) throw Error("SafeStyleSheet is not meant to be built directly");
2652
2647
  }
2653
2648
  toString() {
2654
2649
  return "";
2655
2650
  }
2656
2651
  }
2657
- new S();
2658
- const w = {};
2659
- class b {
2652
+ new L();
2653
+ const v = {};
2654
+ class S {
2660
2655
  constructor() {
2661
- var t = y.trustedTypes && y.trustedTypes.emptyHTML || "";
2662
- if (w !== w) throw Error("SafeHtml is not meant to be built directly");
2656
+ var t = m.trustedTypes && m.trustedTypes.emptyHTML || "";
2657
+ if (v !== v) throw Error("SafeHtml is not meant to be built directly");
2663
2658
  this.g = t;
2664
2659
  }
2665
2660
  toString() {
2666
2661
  return this.g.toString();
2667
2662
  }
2668
2663
  }
2669
- new b();
2670
- function L(d, t) {
2664
+ new S();
2665
+ function T(d, t) {
2671
2666
  switch (this.g = d, this.l = !!t.aa, this.h = t.i, this.s = t.type, this.o = !1, this.h) {
2667
+ case O:
2672
2668
  case G:
2673
- case U:
2669
+ case F:
2674
2670
  case D:
2675
- case x:
2676
- case Y:
2671
+ case i1:
2677
2672
  case I:
2678
2673
  case f:
2679
2674
  this.o = !0;
2680
2675
  }
2681
2676
  this.j = t.defaultValue;
2682
2677
  }
2683
- var f = 1, I = 2, G = 3, U = 4, D = 6, x = 16, Y = 18;
2678
+ var f = 1, I = 2, O = 3, G = 4, F = 6, D = 16, i1 = 18;
2684
2679
  function c2(d, t) {
2685
2680
  for (this.h = d, this.g = {}, d = 0; d < t.length; d++) {
2686
2681
  var $ = t[d];
@@ -2692,36 +2687,36 @@ const Z2 = (y) => {
2692
2687
  return t.g - $.g;
2693
2688
  }), d;
2694
2689
  }
2695
- function R() {
2690
+ function x() {
2696
2691
  this.h = {}, this.j = this.m().g, this.g = this.l = null;
2697
2692
  }
2698
- R.prototype.has = function(d) {
2699
- return B(this, d.g);
2700
- }, R.prototype.get = function(d, t) {
2693
+ x.prototype.has = function(d) {
2694
+ return R(this, d.g);
2695
+ }, x.prototype.get = function(d, t) {
2701
2696
  return p(this, d.g, t);
2702
- }, R.prototype.set = function(d, t) {
2697
+ }, x.prototype.set = function(d, t) {
2703
2698
  E(this, d.g, t);
2704
- }, R.prototype.add = function(d, t) {
2699
+ }, x.prototype.add = function(d, t) {
2705
2700
  b1(this, d.g, t);
2706
2701
  };
2707
2702
  function w1(d, t) {
2708
2703
  for (var $ = f2(d.m()), s = 0; s < $.length; s++) {
2709
2704
  var r = $[s], u = r.g;
2710
- if (B(t, u)) {
2705
+ if (R(t, u)) {
2711
2706
  d.g && delete d.g[r.g];
2712
2707
  var a = r.h == 11 || r.h == 10;
2713
2708
  if (r.l) {
2714
2709
  r = P(t, u);
2715
- for (var h = 0; h < r.length; h++) b1(d, u, a ? r[h].clone() : r[h]);
2710
+ for (var c = 0; c < r.length; c++) b1(d, u, a ? r[c].clone() : r[c]);
2716
2711
  } else r = n1(t, u), a ? (a = n1(d, u)) ? w1(a, r) : E(d, u, r.clone()) : E(d, u, r);
2717
2712
  }
2718
2713
  }
2719
2714
  }
2720
- R.prototype.clone = function() {
2715
+ x.prototype.clone = function() {
2721
2716
  var d = new this.constructor();
2722
2717
  return d != this && (d.h = {}, d.g && (d.g = {}), w1(d, this)), d;
2723
2718
  };
2724
- function B(d, t) {
2719
+ function R(d, t) {
2725
2720
  return d.h[t] != null;
2726
2721
  }
2727
2722
  function n1(d, t) {
@@ -2744,8 +2739,8 @@ const Z2 = (y) => {
2744
2739
  var s = n1(d, t);
2745
2740
  return d.j[t].l ? s[$ || 0] : s;
2746
2741
  }
2747
- function v(d, t) {
2748
- if (B(d, t)) d = p(d, t);
2742
+ function w(d, t) {
2743
+ if (R(d, t)) d = p(d, t);
2749
2744
  else d: {
2750
2745
  if (d = d.j[t], d.j === void 0) if (t = d.s, t === Boolean) d.j = !1;
2751
2746
  else if (t === Number) d.j = 0;
@@ -2762,7 +2757,7 @@ const Z2 = (y) => {
2762
2757
  return n1(d, t) || [];
2763
2758
  }
2764
2759
  function K(d, t) {
2765
- return d.j[t].l ? B(d, t) ? d.h[t].length : 0 : B(d, t) ? 1 : 0;
2760
+ return d.j[t].l ? R(d, t) ? d.h[t].length : 0 : R(d, t) ? 1 : 0;
2766
2761
  }
2767
2762
  function E(d, t, $) {
2768
2763
  d.h[t] = $, d.g && (d.g[t] = $);
@@ -2772,7 +2767,7 @@ const Z2 = (y) => {
2772
2767
  }
2773
2768
  function s1(d, t) {
2774
2769
  var $ = [], s;
2775
- for (s in t) s != 0 && $.push(new L(s, t[s]));
2770
+ for (s in t) s != 0 && $.push(new T(s, t[s]));
2776
2771
  return new c2(d, $);
2777
2772
  }
2778
2773
  function r1() {
@@ -2780,7 +2775,7 @@ const Z2 = (y) => {
2780
2775
  r1.prototype.g = function(d) {
2781
2776
  throw new d.h(), Error("Unimplemented");
2782
2777
  }, r1.prototype.h = function(d, t) {
2783
- if (d.h == 11 || d.h == 10) return t instanceof R ? t : this.g(d.s.prototype.m(), t);
2778
+ if (d.h == 11 || d.h == 10) return t instanceof x ? t : this.g(d.s.prototype.m(), t);
2784
2779
  if (d.h == 14) return typeof t == "string" && L1.test(t) && (d = Number(t), 0 < d) ? d : t;
2785
2780
  if (!d.o) return t;
2786
2781
  if (d = d.s, d === String) {
@@ -2794,12 +2789,12 @@ const Z2 = (y) => {
2794
2789
  i(g1, r1), g1.prototype.g = function(d, t) {
2795
2790
  return d = new d.h(), d.l = this, d.h = t, d.g = {}, d;
2796
2791
  };
2797
- function X() {
2792
+ function q() {
2798
2793
  }
2799
- i(X, g1), X.prototype.h = function(d, t) {
2794
+ i(q, g1), q.prototype.h = function(d, t) {
2800
2795
  return d.h == 8 ? !!t : r1.prototype.h.apply(this, arguments);
2801
- }, X.prototype.g = function(d, t) {
2802
- return X.ma.g.call(this, d, t);
2796
+ }, q.prototype.g = function(d, t) {
2797
+ return q.ma.g.call(this, d, t);
2803
2798
  };
2804
2799
  function A(d, t) {
2805
2800
  d != null && this.g.apply(this, arguments);
@@ -2810,54 +2805,54 @@ const Z2 = (y) => {
2810
2805
  if (this.h += String(d), t != null) for (let s = 1; s < arguments.length; s++) this.h += arguments[s];
2811
2806
  return this;
2812
2807
  };
2813
- function k(d) {
2808
+ function B(d) {
2814
2809
  d.h = "";
2815
2810
  }
2816
2811
  A.prototype.toString = function() {
2817
2812
  return this.h;
2818
2813
  };
2819
2814
  function W() {
2820
- R.call(this);
2815
+ x.call(this);
2821
2816
  }
2822
- i(W, R);
2817
+ i(W, x);
2823
2818
  var N1 = null;
2824
- function N() {
2825
- R.call(this);
2819
+ function b() {
2820
+ x.call(this);
2826
2821
  }
2827
- i(N, R);
2822
+ i(b, x);
2828
2823
  var T1 = null;
2829
2824
  function z() {
2830
- R.call(this);
2825
+ x.call(this);
2831
2826
  }
2832
- i(z, R);
2827
+ i(z, x);
2833
2828
  var A1 = null;
2834
2829
  W.prototype.m = function() {
2835
2830
  var d = N1;
2836
2831
  return d || (N1 = d = s1(W, { 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;
2837
- }, W.m = W.prototype.m, N.prototype.m = function() {
2832
+ }, W.m = W.prototype.m, b.prototype.m = function() {
2838
2833
  var d = T1;
2839
- return d || (T1 = d = s1(N, { 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;
2840
- }, N.m = N.prototype.m, z.prototype.m = function() {
2834
+ return d || (T1 = d = s1(b, { 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;
2835
+ }, b.m = b.prototype.m, z.prototype.m = function() {
2841
2836
  var d = A1;
2842
2837
  return d || (A1 = d = s1(z, {
2843
2838
  0: { name: "PhoneMetadata", ia: "i18n.phonenumbers.PhoneMetadata" },
2844
- 1: { name: "general_desc", i: 11, type: N },
2845
- 2: { name: "fixed_line", i: 11, type: N },
2846
- 3: { name: "mobile", i: 11, type: N },
2847
- 4: { name: "toll_free", i: 11, type: N },
2848
- 5: { name: "premium_rate", i: 11, type: N },
2849
- 6: { name: "shared_cost", i: 11, type: N },
2850
- 7: { name: "personal_number", i: 11, type: N },
2851
- 8: { name: "voip", i: 11, type: N },
2852
- 21: { name: "pager", i: 11, type: N },
2853
- 25: { name: "uan", i: 11, type: N },
2854
- 27: { name: "emergency", i: 11, type: N },
2855
- 28: { name: "voicemail", i: 11, type: N },
2856
- 29: { name: "short_code", i: 11, type: N },
2857
- 30: { name: "standard_rate", i: 11, type: N },
2858
- 31: { name: "carrier_specific", i: 11, type: N },
2859
- 33: { name: "sms_services", i: 11, type: N },
2860
- 24: { name: "no_international_dialling", i: 11, type: N },
2839
+ 1: { name: "general_desc", i: 11, type: b },
2840
+ 2: { name: "fixed_line", i: 11, type: b },
2841
+ 3: { name: "mobile", i: 11, type: b },
2842
+ 4: { name: "toll_free", i: 11, type: b },
2843
+ 5: { name: "premium_rate", i: 11, type: b },
2844
+ 6: { name: "shared_cost", i: 11, type: b },
2845
+ 7: { name: "personal_number", i: 11, type: b },
2846
+ 8: { name: "voip", i: 11, type: b },
2847
+ 21: { name: "pager", i: 11, type: b },
2848
+ 25: { name: "uan", i: 11, type: b },
2849
+ 27: { name: "emergency", i: 11, type: b },
2850
+ 28: { name: "voicemail", i: 11, type: b },
2851
+ 29: { name: "short_code", i: 11, type: b },
2852
+ 30: { name: "standard_rate", i: 11, type: b },
2853
+ 31: { name: "carrier_specific", i: 11, type: b },
2854
+ 33: { name: "sms_services", i: 11, type: b },
2855
+ 24: { name: "no_international_dialling", i: 11, type: b },
2861
2856
  9: { name: "id", required: !0, i: 9, type: String },
2862
2857
  10: { name: "country_code", i: 5, type: Number },
2863
2858
  11: { name: "international_prefix", i: 9, type: String },
@@ -2878,9 +2873,9 @@ const Z2 = (y) => {
2878
2873
  })), d;
2879
2874
  }, z.m = z.prototype.m;
2880
2875
  function H() {
2881
- R.call(this);
2876
+ x.call(this);
2882
2877
  }
2883
- i(H, R);
2878
+ i(H, x);
2884
2879
  var E1 = null, p2 = { ra: 0, qa: 1, pa: 5, oa: 10, na: 20 };
2885
2880
  H.prototype.m = function() {
2886
2881
  var d = E1;
@@ -2890,7 +2885,7 @@ const Z2 = (y) => {
2890
2885
  type: String
2891
2886
  } })), d;
2892
2887
  }, H.ctor = H, H.ctor.m = H.prototype.m;
2893
- var Q = {
2888
+ var X = {
2894
2889
  1: "US AG AI AS BB BM BS CA DM DO GD GU JM KN KY LC MP MS PR SX TC TT VC VG VI".split(" "),
2895
2890
  7: ["RU", "KZ"],
2896
2891
  20: ["EG"],
@@ -8298,23 +8293,23 @@ const Z2 = (y) => {
8298
8293
  X: "9",
8299
8294
  Y: "9",
8300
8295
  Z: "9"
8301
- }, m2 = RegExp("[++]+"), d1 = RegExp("^[++]+"), D1 = RegExp("([0-90-9٠-٩۰-۹])"), y2 = RegExp("[++0-90-9٠-٩۰-۹]"), _2 = /[\\\/] *x/, I2 = RegExp("[^0-90-9٠-٩۰-۹A-Za-z#]+$"), v2 = /(?:.*?[A-Za-z]){3}.*/, S2 = RegExp("^\\+([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*[0-90-9٠-٩۰-۹]([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*$"), w2 = RegExp("^([A-Za-z0-90-9٠-٩۰-۹]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.)*[A-Za-z]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.?$");
8302
- function J(d) {
8296
+ }, m2 = RegExp("[++]+"), Q = RegExp("^[++]+"), D1 = RegExp("([0-90-9٠-٩۰-۹])"), y2 = RegExp("[++0-90-9٠-٩۰-۹]"), _2 = /[\\\/] *x/, I2 = RegExp("[^0-90-9٠-٩۰-۹A-Za-z#]+$"), v2 = /(?:.*?[A-Za-z]){3}.*/, S2 = RegExp("^\\+([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*[0-90-9٠-٩۰-۹]([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*$"), w2 = RegExp("^([A-Za-z0-90-9٠-٩۰-۹]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.)*[A-Za-z]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.?$");
8297
+ function Y(d) {
8303
8298
  return "([0-90-9٠-٩۰-۹]{1," + d + "})";
8304
8299
  }
8305
8300
  function P1() {
8306
- return ";ext=" + J("20") + "|[  \\t,]*(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)[:\\..]?[  \\t,-]*" + (J("20") + "#?|[  \\t,]*(?:[xx##~~]|int|int)[:\\..]?[  \\t,-]*") + (J("9") + "#?|[- ]+") + (J("6") + "#|[  \\t]*(?:,{2}|;)[:\\..]?[  \\t,-]*") + (J("15") + "#?|[  \\t]*(?:,)+[:\\..]?[  \\t,-]*") + (J("9") + "#?");
8301
+ 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") + "#?");
8307
8302
  }
8308
8303
  var x1 = new RegExp("(?:" + P1() + ")$", "i"), b2 = new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^[++]*(?:[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~*]*[0-90-9٠-٩۰-۹]){3,}[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~*A-Za-z0-90-9٠-٩۰-۹]*(?:" + P1() + ")?$", "i"), L2 = /(\$\d)/, N2 = /^\(?\$1\)?$/;
8309
8304
  function R1(d) {
8310
- return 2 > d.length ? !1 : F(b2, d);
8305
+ return 2 > d.length ? !1 : U(b2, d);
8311
8306
  }
8312
8307
  function B1(d) {
8313
- return F(v2, d) ? o1(d, C2) : o1(d, C1);
8308
+ return U(v2, d) ? o1(d, C2) : o1(d, C1);
8314
8309
  }
8315
8310
  function k1(d) {
8316
8311
  var t = B1(d.toString());
8317
- k(d), d.g(t);
8312
+ B(d), d.g(t);
8318
8313
  }
8319
8314
  function O1(d) {
8320
8315
  return d != null && (K(d, 9) != 1 || P(d, 9)[0] != -1);
@@ -8330,42 +8325,42 @@ const Z2 = (y) => {
8330
8325
  return d != null && isNaN(d) && d.toUpperCase() in M1;
8331
8326
  }
8332
8327
  M.prototype.format = function(d, t) {
8333
- if (p(d, 2) == 0 && B(d, 5)) {
8334
- var $ = v(d, 5);
8328
+ if (p(d, 2) == 0 && R(d, 5)) {
8329
+ var $ = w(d, 5);
8335
8330
  if (0 < $.length) return $;
8336
8331
  }
8337
- $ = v(d, 1);
8338
- var s = e1(d);
8339
- if (t == 0) return U1($, 0, s, "");
8340
- if (!($ in Q)) return s;
8341
- var r = t1(this, $, $1($));
8342
- d = B(d, 3) && p(d, 3).length != 0 ? t == 3 ? ";ext=" + p(d, 3) : B(r, 13) ? p(r, 13) + v(d, 3) : " ext. " + v(d, 3) : "";
8332
+ $ = w(d, 1);
8333
+ var s = t1(d);
8334
+ if (t == 0) return F1($, 0, s, "");
8335
+ if (!($ in X)) return s;
8336
+ var r = d1(this, $, e1($));
8337
+ d = R(d, 3) && p(d, 3).length != 0 ? t == 3 ? ";ext=" + p(d, 3) : R(r, 13) ? p(r, 13) + w(d, 3) : " ext. " + w(d, 3) : "";
8343
8338
  d: {
8344
8339
  r = P(r, 20).length == 0 || t == 2 ? P(r, 19) : P(r, 20);
8345
- for (var u, a = r.length, h = 0; h < a; ++h) {
8346
- u = r[h];
8347
- var _ = K(u, 3);
8348
- if ((_ == 0 || s.search(p(u, 3, _ - 1)) == 0) && (_ = new RegExp(p(u, 1)), F(_, s))) {
8340
+ for (var u, a = r.length, c = 0; c < a; ++c) {
8341
+ u = r[c];
8342
+ var y = K(u, 3);
8343
+ if ((y == 0 || s.search(p(u, 3, y - 1)) == 0) && (y = new RegExp(p(u, 1)), U(y, s))) {
8349
8344
  r = u;
8350
8345
  break d;
8351
8346
  }
8352
8347
  }
8353
8348
  r = null;
8354
8349
  }
8355
- return r != null && (a = r, r = v(a, 2), u = new RegExp(p(a, 1)), v(
8350
+ return r != null && (a = r, r = w(a, 2), u = new RegExp(p(a, 1)), w(
8356
8351
  a,
8357
8352
  5
8358
- ), a = v(a, 4), s = t == 2 && a != null && 0 < a.length ? s.replace(u, r.replace(L2, a)) : s.replace(u, r), t == 3 && (s = s.replace(RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+"), ""), s = s.replace(RegExp("[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))), U1($, t, s, d);
8353
+ ), a = w(a, 4), s = t == 2 && a != null && 0 < a.length ? s.replace(u, r.replace(L2, a)) : s.replace(u, r), t == 3 && (s = s.replace(RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+"), ""), s = s.replace(RegExp("[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))), F1($, t, s, d);
8359
8354
  };
8360
- function t1(d, t, $) {
8355
+ function d1(d, t, $) {
8361
8356
  return $ == "001" ? j(d, "" + t) : j(d, $);
8362
8357
  }
8363
- function e1(d) {
8364
- if (!B(d, 2)) return "";
8358
+ function t1(d) {
8359
+ if (!R(d, 2)) return "";
8365
8360
  var t = "" + p(d, 2);
8366
- return B(d, 4) && p(d, 4) && 0 < v(d, 8) ? Array(v(d, 8) + 1).join("0") + t : t;
8361
+ return R(d, 4) && p(d, 4) && 0 < w(d, 8) ? Array(w(d, 8) + 1).join("0") + t : t;
8367
8362
  }
8368
- function U1(d, t, $, s) {
8363
+ function F1(d, t, $, s) {
8369
8364
  switch (t) {
8370
8365
  case 0:
8371
8366
  return "+" + d + $ + s;
@@ -8404,12 +8399,12 @@ const Z2 = (y) => {
8404
8399
  return p(d, 1);
8405
8400
  }
8406
8401
  }
8407
- function F1(d, t) {
8402
+ function U1(d, t) {
8408
8403
  var $ = V1(d, t);
8409
- return d = t1(d, v(t, 1), $), d == null ? -1 : (t = e1(t), m1(t, d));
8404
+ return d = d1(d, w(t, 1), $), d == null ? -1 : (t = t1(t), m1(t, d));
8410
8405
  }
8411
8406
  function m1(d, t) {
8412
- return O(d, p(t, 1)) ? O(d, p(t, 5)) ? 4 : O(d, p(t, 4)) ? 3 : O(d, p(t, 6)) ? 5 : O(d, p(t, 8)) ? 6 : O(d, p(t, 7)) ? 7 : O(d, p(t, 21)) ? 8 : O(d, p(t, 25)) ? 9 : O(d, p(t, 28)) ? 10 : O(d, p(t, 2)) ? p(t, 18) || O(d, p(t, 3)) ? 2 : 0 : !p(t, 18) && O(d, p(t, 3)) ? 1 : -1 : -1;
8407
+ return k(d, p(t, 1)) ? k(d, p(t, 5)) ? 4 : k(d, p(t, 4)) ? 3 : k(d, p(t, 6)) ? 5 : k(d, p(t, 8)) ? 6 : k(d, p(t, 7)) ? 7 : k(d, p(t, 21)) ? 8 : k(d, p(t, 25)) ? 9 : k(d, p(t, 28)) ? 10 : k(d, p(t, 2)) ? p(t, 18) || k(d, p(t, 3)) ? 2 : 0 : !p(t, 18) && k(d, p(t, 3)) ? 1 : -1 : -1;
8413
8408
  }
8414
8409
  function j(d, t) {
8415
8410
  if (t == null) return null;
@@ -8417,29 +8412,29 @@ const Z2 = (y) => {
8417
8412
  var $ = d.g[t];
8418
8413
  if ($ == null) {
8419
8414
  if ($ = M1[t], $ == null) return null;
8420
- $ = new X().g(z.m(), $), d.g[t] = $;
8415
+ $ = new q().g(z.m(), $), d.g[t] = $;
8421
8416
  }
8422
8417
  return $;
8423
8418
  }
8424
- function O(d, t) {
8419
+ function k(d, t) {
8425
8420
  var $ = d.length;
8426
- return 0 < K(t, 9) && P(t, 9).indexOf($) == -1 ? !1 : F(v(t, 2), d);
8421
+ return 0 < K(t, 9) && P(t, 9).indexOf($) == -1 ? !1 : U(w(t, 2), d);
8427
8422
  }
8428
8423
  function T2(d, t) {
8429
- var $ = V1(d, t), s = v(t, 1), r = t1(d, s, $);
8430
- return r == null || $ != "001" && s != K1(d, $) ? r = !1 : (d = e1(t), r = m1(d, r) != -1), r;
8424
+ var $ = V1(d, t), s = w(t, 1), r = d1(d, s, $);
8425
+ return r == null || $ != "001" && s != K1(d, $) ? r = !1 : (d = t1(t), r = m1(d, r) != -1), r;
8431
8426
  }
8432
8427
  function V1(d, t) {
8433
8428
  if (t == null) return null;
8434
- var $ = v(t, 1);
8435
- if ($ = Q[$], $ == null) d = null;
8429
+ var $ = w(t, 1);
8430
+ if ($ = X[$], $ == null) d = null;
8436
8431
  else if ($.length == 1) d = $[0];
8437
8432
  else d: {
8438
- t = e1(t);
8433
+ t = t1(t);
8439
8434
  for (var s, r = $.length, u = 0; u < r; u++) {
8440
8435
  s = $[u];
8441
8436
  var a = j(d, s);
8442
- if (B(a, 23)) {
8437
+ if (R(a, 23)) {
8443
8438
  if (t.search(p(a, 23)) == 0) {
8444
8439
  d = s;
8445
8440
  break d;
@@ -8453,12 +8448,12 @@ const Z2 = (y) => {
8453
8448
  }
8454
8449
  return d;
8455
8450
  }
8456
- function $1(d) {
8457
- return d = Q[d], d == null ? "ZZ" : d[0];
8451
+ function e1(d) {
8452
+ return d = X[d], d == null ? "ZZ" : d[0];
8458
8453
  }
8459
8454
  function K1(d, t) {
8460
8455
  if (d = j(d, t), d == null) throw Error("Invalid region code: " + t);
8461
- return v(d, 10);
8456
+ return w(d, 10);
8462
8457
  }
8463
8458
  function l1(d, t, $, s) {
8464
8459
  var r = a1($, s), u = K(r, 9) == 0 ? P(p($, 1), 9) : P(r, 9);
@@ -8467,12 +8462,12 @@ const Z2 = (y) => {
8467
8462
  return u[0] == -1 ? 5 : (t = t.length, -1 < r.indexOf(t) ? 4 : ($ = u[0], $ == t ? 0 : $ > t ? 2 : u[u.length - 1] < t ? 3 : -1 < u.indexOf(t, 1) ? 0 : 5));
8468
8463
  }
8469
8464
  function h1(d, t, $) {
8470
- var s = e1(t);
8471
- return t = v(t, 1), t in Q ? (t = t1(d, t, $1(t)), l1(d, s, t, $)) : 1;
8465
+ var s = t1(t);
8466
+ return t = w(t, 1), t in X ? (t = d1(d, t, e1(t)), l1(d, s, t, $)) : 1;
8472
8467
  }
8473
8468
  function H1(d, t) {
8474
8469
  if (d = d.toString(), d.length == 0 || d.charAt(0) == "0") return 0;
8475
- for (var $, s = d.length, r = 1; 3 >= r && r <= s; ++r) if ($ = parseInt(d.substring(0, r), 10), $ in Q) return t.g(d.substring(r)), $;
8470
+ for (var $, s = d.length, r = 1; 3 >= r && r <= s; ++r) if ($ = parseInt(d.substring(0, r), 10), $ in X) return t.g(d.substring(r)), $;
8476
8471
  return 0;
8477
8472
  }
8478
8473
  function j1(d, t, $, s, r, u) {
@@ -8480,14 +8475,14 @@ const Z2 = (y) => {
8480
8475
  t = new A(t);
8481
8476
  var a;
8482
8477
  $ != null && (a = p($, 11)), a == null && (a = "NonMatch");
8483
- var h = t.toString();
8484
- if (h.length == 0) a = 20;
8485
- else if (d1.test(h)) h = h.replace(d1, ""), k(t), t.g(B1(h)), a = 1;
8478
+ var c = t.toString();
8479
+ if (c.length == 0) a = 20;
8480
+ else if (Q.test(c)) c = c.replace(Q, ""), B(t), t.g(B1(c)), a = 1;
8486
8481
  else {
8487
- if (h = new RegExp(a), k1(t), a = t.toString(), a.search(h) == 0) {
8488
- h = a.match(h)[0].length;
8489
- var _ = a.substring(h).match(D1);
8490
- _ && _[1] != null && 0 < _[1].length && o1(_[1], C1) == "0" ? a = !1 : (k(t), t.g(a.substring(h)), a = !0);
8482
+ if (c = new RegExp(a), k1(t), a = t.toString(), a.search(c) == 0) {
8483
+ c = a.match(c)[0].length;
8484
+ var y = a.substring(c).match(D1);
8485
+ y && y[1] != null && 0 < y[1].length && o1(y[1], C1) == "0" ? a = !1 : (B(t), t.g(a.substring(c)), a = !0);
8491
8486
  } else a = !1;
8492
8487
  a = a ? 5 : 20;
8493
8488
  }
@@ -8496,16 +8491,16 @@ const Z2 = (y) => {
8496
8491
  if (d = H1(t, s), d != 0) return E(u, 1, d), d;
8497
8492
  throw Error("Invalid country calling code");
8498
8493
  }
8499
- return $ != null && (a = v($, 10), h = "" + a, _ = t.toString(), _.lastIndexOf(h, 0) == 0 && (h = new A(_.substring(h.length)), _ = p($, 1), _ = new RegExp(v(_, 2)), W1(h, $, null), h = h.toString(), !F(_, t.toString()) && F(_, h) || l1(d, t.toString(), $, -1) == 3)) ? (s.g(h), r && E(u, 6, 10), E(u, 1, a), a) : (E(u, 1, 0), 0);
8494
+ return $ != null && (a = w($, 10), c = "" + a, y = t.toString(), y.lastIndexOf(c, 0) == 0 && (c = new A(y.substring(c.length)), y = p($, 1), y = new RegExp(w(y, 2)), W1(c, $, null), c = c.toString(), !U(y, t.toString()) && U(y, c) || l1(d, t.toString(), $, -1) == 3)) ? (s.g(c), r && E(u, 6, 10), E(u, 1, a), a) : (E(u, 1, 0), 0);
8500
8495
  }
8501
8496
  function W1(d, t, $) {
8502
8497
  var s = d.toString(), r = s.length, u = p(t, 15);
8503
8498
  if (r != 0 && u != null && u.length != 0) {
8504
8499
  var a = new RegExp("^(?:" + u + ")");
8505
8500
  if (r = a.exec(s)) {
8506
- u = new RegExp(v(p(t, 1), 2));
8507
- var h = F(u, s), _ = r.length - 1;
8508
- t = p(t, 16), t == null || t.length == 0 || r[_] == null || r[_].length == 0 ? (!h || F(u, s.substring(r[0].length))) && ($ != null && 0 < _ && r[_] != null && $.g(r[1]), d.set(s.substring(r[0].length))) : (s = s.replace(a, t), (!h || F(u, s)) && ($ != null && 0 < _ && $.g(r[1]), d.set(s)));
8501
+ u = new RegExp(w(p(t, 1), 2));
8502
+ var c = U(u, s), y = r.length - 1;
8503
+ t = p(t, 16), t == null || t.length == 0 || r[y] == null || r[y].length == 0 ? (!c || U(u, s.substring(r[0].length))) && ($ != null && 0 < y && r[y] != null && $.g(r[1]), d.set(s.substring(r[0].length))) : (s = s.replace(a, t), (!c || U(u, s)) && ($ != null && 0 < y && $.g(r[1]), d.set(s)));
8509
8504
  }
8510
8505
  }
8511
8506
  }
@@ -8523,32 +8518,32 @@ const Z2 = (y) => {
8523
8518
  var a = t.indexOf(";", u);
8524
8519
  u = a !== -1 ? t.substring(u, a) : t.substring(u);
8525
8520
  }
8526
- var h = u;
8527
- if (h == null ? a = !0 : h.length === 0 ? a = !1 : (a = S2.exec(h), h = w2.exec(h), a = a !== null || h !== null), !a || (u != null ? (u.charAt(0) === "+" && r.g(u), u = t.indexOf("tel:"), r.g(t.substring(0 <= u ? u + 4 : 0, t.indexOf(";phone-context=")))) : (u = r.g, a = t ?? "", h = a.search(y2), 0 <= h ? (a = a.substring(h), a = a.replace(I2, ""), h = a.search(_2), 0 <= h && (a = a.substring(0, h))) : a = "", u.call(r, a)), u = r.toString(), a = u.indexOf(";isub="), 0 < a && (k(r), r.g(u.substring(0, a))), !R1(r.toString()))) throw Error("The string supplied did not seem to be a phone number");
8528
- if (u = r.toString(), !(u1($) || u != null && 0 < u.length && d1.test(u))) throw Error("Invalid country calling code");
8521
+ var c = u;
8522
+ if (c == null ? a = !0 : c.length === 0 ? a = !1 : (a = S2.exec(c), c = w2.exec(c), a = a !== null || c !== null), !a || (u != null ? (u.charAt(0) === "+" && r.g(u), u = t.indexOf("tel:"), r.g(t.substring(0 <= u ? u + 4 : 0, t.indexOf(";phone-context=")))) : (u = r.g, a = t ?? "", c = a.search(y2), 0 <= c ? (a = a.substring(c), a = a.replace(I2, ""), c = a.search(_2), 0 <= c && (a = a.substring(0, c))) : a = "", u.call(r, a)), u = r.toString(), a = u.indexOf(";isub="), 0 < a && (B(r), r.g(u.substring(0, a))), !R1(r.toString()))) throw Error("The string supplied did not seem to be a phone number");
8523
+ if (u = r.toString(), !(u1($) || u != null && 0 < u.length && Q.test(u))) throw Error("Invalid country calling code");
8529
8524
  u = new H(), s && E(u, 5, t);
8530
8525
  d: {
8531
8526
  if (t = r.toString(), a = t.search(x1), 0 <= a && R1(t.substring(0, a))) {
8532
- h = t.match(x1);
8533
- for (var _ = h.length, V = 1; V < _; ++V) if (h[V] != null && 0 < h[V].length) {
8534
- k(r), r.g(t.substring(0, a)), t = h[V];
8527
+ c = t.match(x1);
8528
+ for (var y = c.length, V = 1; V < y; ++V) if (c[V] != null && 0 < c[V].length) {
8529
+ B(r), r.g(t.substring(0, a)), t = c[V];
8535
8530
  break d;
8536
8531
  }
8537
8532
  }
8538
8533
  t = "";
8539
8534
  }
8540
- 0 < t.length && E(u, 3, t), a = j(d, $), t = new A(), h = 0, _ = r.toString();
8535
+ 0 < t.length && E(u, 3, t), a = j(d, $), t = new A(), c = 0, y = r.toString();
8541
8536
  try {
8542
- h = j1(d, _, a, t, s, u);
8537
+ c = j1(d, y, a, t, s, u);
8543
8538
  } catch (I1) {
8544
- if (I1.message == "Invalid country calling code" && d1.test(_)) {
8545
- if (_ = _.replace(d1, ""), h = j1(d, _, a, t, s, u), h == 0) throw I1;
8539
+ if (I1.message == "Invalid country calling code" && Q.test(y)) {
8540
+ if (y = y.replace(Q, ""), c = j1(d, y, a, t, s, u), c == 0) throw I1;
8546
8541
  } else throw I1;
8547
8542
  }
8548
- if (h != 0 ? (r = $1(h), r != $ && (a = t1(d, h, r))) : (k1(r), t.g(r.toString()), $ != null ? (h = v(a, 10), E(
8543
+ if (c != 0 ? (r = e1(c), r != $ && (a = d1(d, c, r))) : (k1(r), t.g(r.toString()), $ != null ? (c = w(a, 10), E(
8549
8544
  u,
8550
8545
  1,
8551
- h
8546
+ c
8552
8547
  )) : s && (delete u.h[6], u.g && delete u.g[6])), 2 > t.h.length || (a != null && ($ = new A(), r = new A(t.toString()), W1(r, a, $), d = l1(d, r.toString(), a, -1), d != 2 && d != 4 && d != 5 && (t = r, s && 0 < $.toString().length && E(u, 7, $.toString()))), s = t.toString(), d = s.length, 2 > d)) throw Error("The string supplied is too short to be a phone number");
8553
8548
  if (17 < d) throw Error("The string supplied is too long to be a phone number");
8554
8549
  if (1 < s.length && s.charAt(0) == "0") {
@@ -8557,7 +8552,7 @@ const Z2 = (y) => {
8557
8552
  }
8558
8553
  return E(u, 2, parseInt(s, 10)), u;
8559
8554
  }
8560
- function F(d, t) {
8555
+ function U(d, t) {
8561
8556
  return !!((d = t.match(new RegExp("^(?:" + (typeof d == "string" ? d : d.source) + ")$", "i"))) && d[0].length == t.length);
8562
8557
  }
8563
8558
  function A2(d) {
@@ -8568,18 +8563,18 @@ const Z2 = (y) => {
8568
8563
  var E2 = RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*)*$"), Y1 = /[- ]/;
8569
8564
  function J1(d, t) {
8570
8565
  var $ = d.ga;
8571
- return t = u1(t) ? K1($, t) : 0, d = j(d.ga, $1(t)), d ?? Z1;
8566
+ return t = u1(t) ? K1($, t) : 0, d = j(d.ga, e1(t)), d ?? Z1;
8572
8567
  }
8573
8568
  function q1(d) {
8574
8569
  for (var t = d.j.length, $ = 0; $ < t; ++$) {
8575
- var s = d.j[$], r = v(s, 1);
8570
+ var s = d.j[$], r = w(s, 1);
8576
8571
  if (d.da == r) return !1;
8577
- var u = d, a = s, h = v(a, 1);
8578
- k(u.v);
8579
- var _ = u;
8580
- a = v(a, 2);
8581
- var V = "999999999999999".match(h)[0];
8582
- if (V.length < _.g.h.length ? _ = "" : (_ = V.replace(new RegExp(h, "g"), a), _ = _.replace(RegExp("9", "g"), " ")), 0 < _.length ? (u.v.g(_), u = !0) : u = !1, u) return d.da = r, d.ha = Y1.test(p(s, 4)), d.$ = 0, !0;
8572
+ var u = d, a = s, c = w(a, 1);
8573
+ B(u.v);
8574
+ var y = u;
8575
+ a = w(a, 2);
8576
+ var V = "999999999999999".match(c)[0];
8577
+ if (V.length < y.g.h.length ? y = "" : (y = V.replace(new RegExp(c, "g"), a), y = y.replace(RegExp("9", "g"), " ")), 0 < y.length ? (u.v.g(y), u = !0) : u = !1, u) return d.da = r, d.ha = Y1.test(p(s, 4)), d.$ = 0, !0;
8583
8578
  }
8584
8579
  return d.u = !1;
8585
8580
  }
@@ -8597,7 +8592,7 @@ const Z2 = (y) => {
8597
8592
  if (!d.la) {
8598
8593
  if ($2(d)) {
8599
8594
  if (i2(d)) return Q1(d);
8600
- } else if (0 < d.o.length && (t = d.g.toString(), k(d.g), d.g.g(d.o), d.g.g(t), t = d.h.toString(), $ = t.lastIndexOf(d.o), k(d.h), d.h.g(t.substring(0, $))), d.o != e2(d)) return d.h.g(" "), Q1(d);
8595
+ } else if (0 < d.o.length && (t = d.g.toString(), B(d.g), d.g.g(d.o), d.g.g(t), t = d.h.toString(), $ = t.lastIndexOf(d.o), B(d.h), d.h.g(t.substring(0, $))), d.o != e2(d)) return d.h.g(" "), Q1(d);
8601
8596
  }
8602
8597
  return d.s.toString();
8603
8598
  }
@@ -8614,11 +8609,11 @@ const Z2 = (y) => {
8614
8609
  }
8615
8610
  }
8616
8611
  function Q1(d) {
8617
- return d.u = !0, d.ea = !1, d.j = [], d.$ = 0, k(d.v), d.da = "", y1(d);
8612
+ return d.u = !0, d.ea = !1, d.j = [], d.$ = 0, B(d.v), d.da = "", y1(d);
8618
8613
  }
8619
8614
  function d2(d) {
8620
8615
  for (var t = d.g.toString(), $ = d.j.length, s = 0; s < $; ++s) {
8621
- var r = d.j[s], u = v(r, 1);
8616
+ var r = d.j[s], u = w(r, 1);
8622
8617
  if (new RegExp("^(?:" + u + ")$").test(t) && (d.ha = Y1.test(p(r, 4)), r = t.replace(new RegExp(u, "g"), p(r, 2)), r = c1(d, r), o1(r, g2) == d.ba)) return r;
8623
8618
  }
8624
8619
  return "";
@@ -8632,7 +8627,7 @@ const Z2 = (y) => {
8632
8627
  if (3 <= t.length) {
8633
8628
  for (var $ = d.ca && d.o.length == 0 && 0 < K(d.l, 20) ? P(d.l, 20) : P(d.l, 19), s = $.length, r = 0; r < s; ++r) {
8634
8629
  var u = $[r];
8635
- 0 < d.o.length && G1(v(u, 4)) && !p(u, 6) && !B(u, 5) || (d.o.length != 0 || d.ca || G1(v(u, 4)) || p(u, 6)) && E2.test(v(u, 2)) && d.j.push(u);
8630
+ 0 < d.o.length && G1(w(u, 4)) && !p(u, 6) && !R(u, 5) || (d.o.length != 0 || d.ca || G1(w(u, 4)) || p(u, 6)) && E2.test(w(u, 2)) && d.j.push(u);
8636
8631
  }
8637
8632
  return X1(d, t), t = d2(d), 0 < t.length ? t : q1(d) ? t2(d) : d.s.toString();
8638
8633
  }
@@ -8650,22 +8645,22 @@ const Z2 = (y) => {
8650
8645
  var t = d.g.toString(), $ = 0;
8651
8646
  if (p(d.l, 10) != 1) var s = !1;
8652
8647
  else s = d.g.toString(), s = s.charAt(0) == "1" && s.charAt(1) != "0" && s.charAt(1) != "1";
8653
- return s ? ($ = 1, d.h.g("1").g(" "), d.ca = !0) : B(d.l, 15) && (s = new RegExp("^(?:" + p(d.l, 15) + ")"), s = t.match(s), s != null && s[0] != null && 0 < s[0].length && (d.ca = !0, $ = s[0].length, d.h.g(t.substring(0, $)))), k(d.g), d.g.g(t.substring($)), t.substring(0, $);
8648
+ return s ? ($ = 1, d.h.g("1").g(" "), d.ca = !0) : R(d.l, 15) && (s = new RegExp("^(?:" + p(d.l, 15) + ")"), s = t.match(s), s != null && s[0] != null && 0 < s[0].length && (d.ca = !0, $ = s[0].length, d.h.g(t.substring(0, $)))), B(d.g), d.g.g(t.substring($)), t.substring(0, $);
8654
8649
  }
8655
8650
  function $2(d) {
8656
8651
  var t = d.ba.toString(), $ = new RegExp("^(?:\\+|" + p(d.l, 11) + ")");
8657
- return $ = t.match($), $ != null && $[0] != null && 0 < $[0].length ? (d.ca = !0, $ = $[0].length, k(d.g), d.g.g(t.substring($)), k(d.h), d.h.g(t.substring(0, $)), t.charAt(0) != "+" && d.h.g(" "), !0) : !1;
8652
+ return $ = t.match($), $ != null && $[0] != null && 0 < $[0].length ? (d.ca = !0, $ = $[0].length, B(d.g), d.g.g(t.substring($)), B(d.h), d.h.g(t.substring(0, $)), t.charAt(0) != "+" && d.h.g(" "), !0) : !1;
8658
8653
  }
8659
8654
  function i2(d) {
8660
8655
  if (d.g.h.length == 0) return !1;
8661
8656
  var t = new A(), $ = H1(d.g, t);
8662
- return $ == 0 ? !1 : (k(d.g), d.g.g(t.toString()), t = $1($), t == "001" ? d.l = j(d.ga, "" + $) : t != d.ka && (d.l = J1(d, t)), d.h.g("" + $).g(" "), d.o = "", !0);
8657
+ return $ == 0 ? !1 : (B(d.g), d.g.g(t.toString()), t = e1($), t == "001" ? d.l = j(d.ga, "" + $) : t != d.ka && (d.l = J1(d, t)), d.h.g("" + $).g(" "), d.o = "", !0);
8663
8658
  }
8664
8659
  function n2(d, t) {
8665
8660
  var $ = d.v.toString();
8666
8661
  if (0 <= $.substring(d.$).search(d.fa)) {
8667
8662
  var s = $.search(d.fa);
8668
- return t = $.replace(d.fa, t), k(d.v), d.v.g(t), d.$ = s, t.substring(0, d.$ + 1);
8663
+ return t = $.replace(d.fa, t), B(d.v), d.v.g(t), d.$ = s, t.substring(0, d.$ + 1);
8669
8664
  }
8670
8665
  return d.j.length == 1 && (d.u = !1), d.da = "", d.s.toString();
8671
8666
  }
@@ -8692,22 +8687,22 @@ const Z2 = (y) => {
8692
8687
  }
8693
8688
  }), e("intlTelInputUtilsTemp.getExampleNumber", (d, t, $, s) => {
8694
8689
  try {
8695
- const _ = M.g();
8690
+ const y = M.g();
8696
8691
  d: {
8697
- var r = _;
8692
+ var r = y;
8698
8693
  if (u1(d)) {
8699
8694
  var u = a1(j(r, d), $);
8700
8695
  try {
8701
- if (B(u, 6)) {
8702
- var a = p(u, 6), h = z1(r, a, d, !1);
8696
+ if (R(u, 6)) {
8697
+ var a = p(u, 6), c = z1(r, a, d, !1);
8703
8698
  break d;
8704
8699
  }
8705
8700
  } catch {
8706
8701
  }
8707
8702
  }
8708
- h = null;
8703
+ c = null;
8709
8704
  }
8710
- return _.format(h, s ? 0 : t ? 2 : 1);
8705
+ return y.format(c, s ? 0 : t ? 2 : 1);
8711
8706
  } catch {
8712
8707
  return "";
8713
8708
  }
@@ -8720,7 +8715,7 @@ const Z2 = (y) => {
8720
8715
  }), e("intlTelInputUtilsTemp.getNumberType", (d, t) => {
8721
8716
  try {
8722
8717
  const $ = M.g(), s = Z($, d, t);
8723
- return F1($, s);
8718
+ return U1($, s);
8724
8719
  } catch {
8725
8720
  return -99;
8726
8721
  }
@@ -8736,8 +8731,8 @@ const Z2 = (y) => {
8736
8731
  try {
8737
8732
  const s = M.g(), r = Z(s, d, t), u = T2(s, r);
8738
8733
  if ($) {
8739
- const a = s2($).map((h) => _1[h]);
8740
- return u && a.includes(F1(s, r));
8734
+ const a = s2($).map((c) => _1[c]);
8735
+ return u && a.includes(U1(s, r));
8741
8736
  }
8742
8737
  return u;
8743
8738
  } catch {
@@ -8765,7 +8760,7 @@ const Z2 = (y) => {
8765
8760
  })();
8766
8761
  const h2 = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : void 0, Y2 = h2.intlTelInputUtilsTemp;
8767
8762
  delete h2.intlTelInputUtilsTemp;
8768
- m.utils = Y2;
8763
+ C.utils = Y2;
8769
8764
  const q2 = {
8770
8765
  __name: "IntlTelInputWithUtils",
8771
8766
  props: /* @__PURE__ */ r2({
@@ -8798,41 +8793,41 @@ const q2 = {
8798
8793
  "changeValidity",
8799
8794
  "changeErrorCode"
8800
8795
  ], ["update:modelValue"]),
8801
- setup(y, { expose: e, emit: i }) {
8802
- const n = D2(y, "modelValue"), o = y, l = i, g = v1(), C = v1(), c = v1(!1), S = () => C.value ? o.options.strictMode ? C.value.isValidNumberPrecise() : C.value.isValidNumber() : null, w = () => {
8803
- let f = S();
8804
- c.value !== f && (c.value = f, l("changeValidity", !!f), l(
8796
+ setup(m, { expose: e, emit: i }) {
8797
+ const n = D2(m, "modelValue"), o = m, l = i, g = v1(), h = v1(), _ = v1(!1), L = () => h.value ? o.options.strictMode ? h.value.isValidNumberPrecise() : h.value.isValidNumber() : null, v = () => {
8798
+ let f = L();
8799
+ _.value !== f && (_.value = f, l("changeValidity", !!f), l(
8805
8800
  "changeErrorCode",
8806
- f ? null : C.value.getValidationError()
8801
+ f ? null : h.value.getValidationError()
8807
8802
  ));
8808
- }, b = () => {
8803
+ }, S = () => {
8809
8804
  var f;
8810
- l("changeNumber", ((f = C.value) == null ? void 0 : f.getNumber()) ?? ""), w();
8811
- }, L = () => {
8805
+ l("changeNumber", ((f = h.value) == null ? void 0 : f.getNumber()) ?? ""), v();
8806
+ }, T = () => {
8812
8807
  var f;
8813
- l("changeCountry", ((f = C.value) == null ? void 0 : f.getSelectedCountryData().iso2) ?? ""), b(), w();
8808
+ l("changeCountry", ((f = h.value) == null ? void 0 : f.getSelectedCountryData().iso2) ?? ""), S(), v();
8814
8809
  };
8815
8810
  return P2(() => {
8816
- g.value && (C.value = m(g.value, o.options), o.value && C.value.setNumber(o.value), o.disabled && C.value.setDisabled(o.disabled), c.value = S());
8811
+ g.value && (h.value = C(g.value, o.options), o.value && h.value.setNumber(o.value), o.disabled && h.value.setDisabled(o.disabled), _.value = L());
8817
8812
  }), x2(
8818
8813
  () => o.disabled,
8819
8814
  (f) => {
8820
8815
  var I;
8821
- return (I = C.value) == null ? void 0 : I.setDisabled(f);
8816
+ return (I = h.value) == null ? void 0 : I.setDisabled(f);
8822
8817
  }
8823
8818
  ), R2(() => {
8824
8819
  var f;
8825
- return (f = C.value) == null ? void 0 : f.destroy();
8826
- }), e({ instance: C, input: g }), (f, I) => B2((O2(), k2("input", G2({
8820
+ return (f = h.value) == null ? void 0 : f.destroy();
8821
+ }), e({ instance: h, input: g }), (f, I) => B2((O2(), k2("input", G2({
8827
8822
  ref_key: "input",
8828
8823
  ref: g,
8829
- "onUpdate:modelValue": I[0] || (I[0] = (G) => n.value = G),
8824
+ "onUpdate:modelValue": I[0] || (I[0] = (O) => n.value = O),
8830
8825
  type: "tel",
8831
- onCountrychange: L,
8832
- onInput: b
8833
- }, y.inputProps), null, 16)), [
8826
+ onCountrychange: T,
8827
+ onInput: S
8828
+ }, m.inputProps), null, 16)), [
8834
8829
  [
8835
- U2,
8830
+ F2,
8836
8831
  n.value,
8837
8832
  void 0,
8838
8833
  { lazy: !0 }