intl-tel-input 25.8.3 → 25.8.5

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,4 +1,4 @@
1
- import { mergeModels as k, useModel as M, ref as N, onMounted as E, watch as B, onUnmounted as R, withDirectives as F, createElementBlock as z, openBlock as V, mergeProps as O, vModelText as j } from "vue";
1
+ import { mergeModels as k, useModel as M, ref as D, onMounted as E, watch as B, onUnmounted as R, withDirectives as F, createElementBlock as V, openBlock as z, mergeProps as O, vModelText as j } from "vue";
2
2
  const $ = [
3
3
  [
4
4
  "af",
@@ -1323,17 +1323,17 @@ const $ = [
1323
1323
  "263"
1324
1324
  ]
1325
1325
  ], w = [];
1326
- for (const d of $)
1326
+ for (const u of $)
1327
1327
  w.push({
1328
1328
  name: "",
1329
1329
  // populated in the plugin
1330
- iso2: d[0],
1331
- dialCode: d[1],
1332
- priority: d[2] || 0,
1333
- areaCodes: d[3] || null,
1330
+ iso2: u[0],
1331
+ dialCode: u[1],
1332
+ priority: u[2] || 0,
1333
+ areaCodes: u[3] || null,
1334
1334
  nodeById: {},
1335
1335
  // populated by the plugin
1336
- nationalPrefix: d[4] || null
1336
+ nationalPrefix: u[4] || null
1337
1337
  });
1338
1338
  const U = {
1339
1339
  ad: "Andorra",
@@ -1591,13 +1591,13 @@ const U = {
1591
1591
  ac: "Ascension Island",
1592
1592
  xk: "Kosovo"
1593
1593
  }, T = { ...U, ...H };
1594
- for (const d of w)
1595
- d.name = T[d.iso2];
1594
+ for (const u of w)
1595
+ u.name = T[u.iso2];
1596
1596
  let K = 0;
1597
- const S = (d) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(d).matches, W = () => {
1597
+ const N = (u) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(u).matches, W = () => {
1598
1598
  if (typeof navigator < "u" && typeof window < "u") {
1599
- const d = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), t = S("(max-width: 500px)"), e = S("(max-height: 600px)"), i = S("(pointer: coarse)");
1600
- return d || t || i && e;
1599
+ const u = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), t = N("(max-width: 500px)"), e = N("(max-height: 600px)"), i = N("(pointer: coarse)");
1600
+ return u || t || i && e;
1601
1601
  }
1602
1602
  return !1;
1603
1603
  }, x = {
@@ -1667,32 +1667,32 @@ const S = (d) => typeof window < "u" && typeof window.matchMedia == "function" &
1667
1667
  "887",
1668
1668
  "888",
1669
1669
  "889"
1670
- ], L = (d) => d.replace(/\D/g, ""), A = (d = "") => d.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), P = (d) => {
1671
- const t = L(d);
1670
+ ], v = (u) => u.replace(/\D/g, ""), A = (u = "") => u.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), P = (u) => {
1671
+ const t = v(u);
1672
1672
  if (t.charAt(0) === "1") {
1673
1673
  const e = t.substring(1, 4);
1674
1674
  return q.includes(e);
1675
1675
  }
1676
1676
  return !1;
1677
- }, G = (d, t, e, i) => {
1677
+ }, G = (u, t, e, i) => {
1678
1678
  if (e === 0 && !i)
1679
1679
  return 0;
1680
1680
  let s = 0;
1681
1681
  for (let n = 0; n < t.length; n++) {
1682
- if (/[+0-9]/.test(t[n]) && s++, s === d && !i)
1682
+ if (/[+0-9]/.test(t[n]) && s++, s === u && !i)
1683
1683
  return n + 1;
1684
- if (i && s === d + 1)
1684
+ if (i && s === u + 1)
1685
1685
  return n;
1686
1686
  }
1687
1687
  return t.length;
1688
- }, m = (d, t, e) => {
1689
- const i = document.createElement(d);
1688
+ }, C = (u, t, e) => {
1689
+ const i = document.createElement(u);
1690
1690
  return t && Object.entries(t).forEach(([s, n]) => i.setAttribute(s, n)), e && e.appendChild(i), i;
1691
- }, I = (d, ...t) => {
1692
- const { instances: e } = u;
1693
- Object.values(e).forEach((i) => i[d](...t));
1691
+ }, I = (u, ...t) => {
1692
+ const { instances: e } = l;
1693
+ Object.values(e).forEach((i) => i[u](...t));
1694
1694
  };
1695
- class D {
1695
+ class L {
1696
1696
  /**
1697
1697
  * Build a space-delimited class string from an object map of className -> truthy/falsey.
1698
1698
  * Only keys with truthy values are included.
@@ -1732,9 +1732,9 @@ class D {
1732
1732
  this.options.countryOrder && (this.options.countryOrder = this.options.countryOrder.map((t) => t.toLowerCase())), this.countries.sort((t, e) => {
1733
1733
  const { countryOrder: i } = this.options;
1734
1734
  if (i) {
1735
- const s = i.indexOf(t.iso2), n = i.indexOf(e.iso2), l = s > -1, r = n > -1;
1736
- if (l || r)
1737
- return l && r ? s - n : l ? -1 : 1;
1735
+ const s = i.indexOf(t.iso2), n = i.indexOf(e.iso2), r = s > -1, o = n > -1;
1736
+ if (r || o)
1737
+ return r && o ? s - n : r ? -1 : 1;
1738
1738
  }
1739
1739
  return t.name.localeCompare(e.name);
1740
1740
  });
@@ -1785,8 +1785,8 @@ class D {
1785
1785
  const e = this.dialCodeToIso2Map[t.dialCode][0];
1786
1786
  for (const i of t.areaCodes) {
1787
1787
  for (let s = 1; s < i.length; s++) {
1788
- const n = i.substring(0, s), l = t.dialCode + n;
1789
- this._addToDialCodeMap(e, l), this._addToDialCodeMap(t.iso2, l);
1788
+ const n = i.substring(0, s), r = t.dialCode + n;
1789
+ this._addToDialCodeMap(e, r), this._addToDialCodeMap(t.iso2, r);
1790
1790
  }
1791
1791
  this._addToDialCodeMap(t.iso2, t.dialCode + i);
1792
1792
  }
@@ -1794,7 +1794,7 @@ class D {
1794
1794
  }
1795
1795
  //* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
1796
1796
  _generateMarkup() {
1797
- var a, h, _;
1797
+ var a, h, g;
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: t,
@@ -1802,24 +1802,24 @@ class D {
1802
1802
  showFlags: i,
1803
1803
  containerClass: s,
1804
1804
  hiddenInput: n,
1805
- dropdownContainer: l,
1806
- fixDropdownWidth: r,
1807
- useFullscreenPopup: o,
1808
- countrySearch: c,
1805
+ dropdownContainer: r,
1806
+ fixDropdownWidth: o,
1807
+ useFullscreenPopup: d,
1808
+ countrySearch: y,
1809
1809
  i18n: p
1810
- } = this.options, C = D._buildClassNames({
1810
+ } = this.options, c = L._buildClassNames({
1811
1811
  iti: !0,
1812
1812
  "iti--allow-dropdown": t,
1813
1813
  "iti--show-flags": i,
1814
- "iti--inline-dropdown": !o,
1814
+ "iti--inline-dropdown": !d,
1815
1815
  [s]: !!s
1816
- }), y = m("div", { class: C });
1817
- if ((a = this.telInput.parentNode) == null || a.insertBefore(y, this.telInput), t || i || e) {
1818
- this.countryContainer = m(
1816
+ }), m = C("div", { class: c });
1817
+ if ((a = this.telInput.parentNode) == null || a.insertBefore(m, this.telInput), t || i || e) {
1818
+ this.countryContainer = C(
1819
1819
  "div",
1820
1820
  { class: "iti__country-container" },
1821
- y
1822
- ), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", t ? (this.selectedCountry = m(
1821
+ m
1822
+ ), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", t ? (this.selectedCountry = C(
1823
1823
  "button",
1824
1824
  {
1825
1825
  type: "button",
@@ -1830,53 +1830,53 @@ class D {
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 = m(
1833
+ ), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = C(
1834
1834
  "div",
1835
1835
  { class: "iti__selected-country" },
1836
1836
  this.countryContainer
1837
1837
  );
1838
- const b = m(
1838
+ const _ = C(
1839
1839
  "div",
1840
1840
  { class: "iti__selected-country-primary" },
1841
1841
  this.selectedCountry
1842
1842
  );
1843
- if (this.selectedCountryInner = m(
1843
+ if (this.selectedCountryInner = C(
1844
1844
  "div",
1845
1845
  { class: "iti__flag" },
1846
- b
1847
- ), t && (this.dropdownArrow = m(
1846
+ _
1847
+ ), t && (this.dropdownArrow = C(
1848
1848
  "div",
1849
1849
  { class: "iti__arrow", "aria-hidden": "true" },
1850
- b
1851
- )), e && (this.selectedDialCode = m(
1850
+ _
1851
+ )), e && (this.selectedDialCode = C(
1852
1852
  "div",
1853
1853
  { class: "iti__selected-dial-code", dir: "ltr" },
1854
1854
  this.selectedCountry
1855
1855
  )), t) {
1856
- const f = r ? "" : "iti--flexible-dropdown-width";
1857
- if (this.dropdownContent = m("div", {
1856
+ const b = o ? "" : "iti--flexible-dropdown-width";
1857
+ if (this.dropdownContent = C("div", {
1858
1858
  id: `iti-${this.id}__dropdown-content`,
1859
- class: `iti__dropdown-content iti__hide ${f}`,
1859
+ class: `iti__dropdown-content iti__hide ${b}`,
1860
1860
  role: "dialog",
1861
1861
  "aria-modal": "true"
1862
- }), c) {
1863
- const g = m(
1862
+ }), y) {
1863
+ const f = C(
1864
1864
  "div",
1865
1865
  { class: "iti__search-input-wrapper" },
1866
1866
  this.dropdownContent
1867
1867
  );
1868
- this.searchIcon = m(
1868
+ this.searchIcon = C(
1869
1869
  "span",
1870
1870
  {
1871
1871
  class: "iti__search-icon",
1872
1872
  "aria-hidden": "true"
1873
1873
  },
1874
- g
1874
+ f
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 = m(
1879
+ </svg>`, this.searchInput = C(
1880
1880
  "input",
1881
1881
  {
1882
1882
  id: `iti-${this.id}__search-input`,
@@ -1892,8 +1892,8 @@ class D {
1892
1892
  "aria-autocomplete": "list",
1893
1893
  autocomplete: "off"
1894
1894
  },
1895
- g
1896
- ), this.searchClearButton = m(
1895
+ f
1896
+ ), this.searchClearButton = C(
1897
1897
  "button",
1898
1898
  {
1899
1899
  type: "button",
@@ -1901,21 +1901,21 @@ class D {
1901
1901
  "aria-label": p.clearSearchAriaLabel,
1902
1902
  tabindex: "-1"
1903
1903
  },
1904
- g
1904
+ f
1905
1905
  );
1906
- const v = `iti-${this.id}-clear-mask`;
1906
+ const S = `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="${v}" maskUnits="userSpaceOnUse">
1909
+ <mask id="${S}" 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(#${v})" />
1914
- </svg>`, this.searchResultsA11yText = m(
1913
+ <circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${S})" />
1914
+ </svg>`, this.searchResultsA11yText = C(
1915
1915
  "span",
1916
1916
  { class: "iti__a11y-text" },
1917
1917
  this.dropdownContent
1918
- ), this.searchNoResults = m(
1918
+ ), this.searchNoResults = C(
1919
1919
  "div",
1920
1920
  {
1921
1921
  class: "iti__no-results iti__hide",
@@ -1925,7 +1925,7 @@ class D {
1925
1925
  this.dropdownContent
1926
1926
  ), this.searchNoResults.textContent = p.zeroSearchResults;
1927
1927
  }
1928
- if (this.countryList = m(
1928
+ if (this.countryList = C(
1929
1929
  "ul",
1930
1930
  {
1931
1931
  class: "iti__country-list",
@@ -1934,41 +1934,41 @@ class D {
1934
1934
  "aria-label": p.countryListAriaLabel
1935
1935
  },
1936
1936
  this.dropdownContent
1937
- ), this._appendListItems(), c && this._updateSearchResultsA11yText(), l) {
1938
- const g = D._buildClassNames({
1937
+ ), this._appendListItems(), y && this._updateSearchResultsA11yText(), r) {
1938
+ const f = L._buildClassNames({
1939
1939
  iti: !0,
1940
1940
  "iti--container": !0,
1941
- "iti--fullscreen-popup": o,
1942
- "iti--inline-dropdown": !o,
1941
+ "iti--fullscreen-popup": d,
1942
+ "iti--inline-dropdown": !d,
1943
1943
  [s]: !!s
1944
1944
  });
1945
- this.dropdown = m("div", { class: g }), this.dropdown.appendChild(this.dropdownContent);
1945
+ this.dropdown = C("div", { class: f }), this.dropdown.appendChild(this.dropdownContent);
1946
1946
  } else
1947
1947
  this.countryContainer.appendChild(this.dropdownContent);
1948
1948
  }
1949
1949
  }
1950
- if (y.appendChild(this.telInput), this._updateInputPadding(), n) {
1951
- const b = this.telInput.getAttribute("name") || "", f = n(b);
1952
- if (f.phone) {
1953
- const g = (h = this.telInput.form) == null ? void 0 : h.querySelector(`input[name="${f.phone}"]`);
1954
- g ? this.hiddenInput = g : (this.hiddenInput = m("input", {
1950
+ if (m.appendChild(this.telInput), this._updateInputPadding(), n) {
1951
+ const _ = this.telInput.getAttribute("name") || "", b = n(_);
1952
+ if (b.phone) {
1953
+ const f = (h = this.telInput.form) == null ? void 0 : h.querySelector(`input[name="${b.phone}"]`);
1954
+ f ? this.hiddenInput = f : (this.hiddenInput = C("input", {
1955
1955
  type: "hidden",
1956
- name: f.phone
1957
- }), y.appendChild(this.hiddenInput));
1956
+ name: b.phone
1957
+ }), m.appendChild(this.hiddenInput));
1958
1958
  }
1959
- if (f.country) {
1960
- const g = (_ = this.telInput.form) == null ? void 0 : _.querySelector(`input[name="${f.country}"]`);
1961
- g ? this.hiddenInputCountry = g : (this.hiddenInputCountry = m("input", {
1959
+ if (b.country) {
1960
+ const f = (g = this.telInput.form) == null ? void 0 : g.querySelector(`input[name="${b.country}"]`);
1961
+ f ? this.hiddenInputCountry = f : (this.hiddenInputCountry = C("input", {
1962
1962
  type: "hidden",
1963
- name: f.country
1964
- }), y.appendChild(this.hiddenInputCountry));
1963
+ name: b.country
1964
+ }), m.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 t = 0; t < this.countries.length; t++) {
1971
- const e = this.countries[t], i = t === 0 ? "iti__highlight" : "", s = m(
1971
+ const e = this.countries[t], i = t === 0 ? "iti__highlight" : "", s = C(
1972
1972
  "li",
1973
1973
  {
1974
1974
  id: `iti-${this.id}__item-${e.iso2}`,
@@ -1990,12 +1990,12 @@ class D {
1990
1990
  //* 1. Extracting a dial code from the given number
1991
1991
  //* 2. Using explicit initialCountry
1992
1992
  _setInitialState(t = !1) {
1993
- const e = this.telInput.getAttribute("value"), i = this.telInput.value, n = e && e.charAt(0) === "+" && (!i || i.charAt(0) !== "+") ? e : i, l = this._getDialCode(n), r = P(n), { initialCountry: o, geoIpLookup: c } = this.options, p = o === "auto" && c;
1994
- if (l && !r)
1993
+ const e = this.telInput.getAttribute("value"), i = this.telInput.value, n = e && e.charAt(0) === "+" && (!i || i.charAt(0) !== "+") ? e : i, r = this._getDialCode(n), o = P(n), { initialCountry: d, geoIpLookup: y } = this.options, p = d === "auto" && y;
1994
+ if (r && !o)
1995
1995
  this._updateCountryFromNumber(n);
1996
1996
  else if (!p || t) {
1997
- const C = o ? o.toLowerCase() : "";
1998
- C && this._getCountryData(C, !0) ? this._setCountry(C) : l && r ? this._setCountry("us") : this._setCountry();
1997
+ const c = d ? d.toLowerCase() : "";
1998
+ c && this._getCountryData(c, !0) ? this._setCountry(c) : r && o ? this._setCountry("us") : this._setCountry();
1999
1999
  }
2000
2000
  n && this._updateValFromNumber(n);
2001
2001
  }
@@ -2031,18 +2031,18 @@ class D {
2031
2031
  //* Init many requests: utils script / geo ip lookup.
2032
2032
  _initRequests() {
2033
2033
  let { loadUtils: t, initialCountry: e, geoIpLookup: i } = this.options;
2034
- t && !u.utils ? (this._handlePageLoad = () => {
2034
+ t && !l.utils ? (this._handlePageLoad = () => {
2035
2035
  var n;
2036
- window.removeEventListener("load", this._handlePageLoad), (n = u.attachUtils(t)) == null || n.catch(() => {
2036
+ window.removeEventListener("load", this._handlePageLoad), (n = l.attachUtils(t)) == null || n.catch(() => {
2037
2037
  });
2038
- }, u.documentReady() ? this._handlePageLoad() : window.addEventListener("load", this._handlePageLoad)) : this.resolveUtilsScriptPromise(), e === "auto" && i && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
2038
+ }, l.documentReady() ? this._handlePageLoad() : window.addEventListener("load", this._handlePageLoad)) : this.resolveUtilsScriptPromise(), e === "auto" && i && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
2039
2039
  }
2040
2040
  //* Perform the geo ip lookup.
2041
2041
  _loadAutoCountry() {
2042
- u.autoCountry ? this.handleAutoCountry() : u.startedLoadingAutoCountry || (u.startedLoadingAutoCountry = !0, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(
2042
+ l.autoCountry ? this.handleAutoCountry() : l.startedLoadingAutoCountry || (l.startedLoadingAutoCountry = !0, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(
2043
2043
  (t = "") => {
2044
2044
  const e = t.toLowerCase();
2045
- e && this._getCountryData(e, !0) ? (u.autoCountry = e, setTimeout(() => I("handleAutoCountry"))) : (this._setInitialState(!0), I("rejectAutoCountryPromise"));
2045
+ e && this._getCountryData(e, !0) ? (l.autoCountry = e, setTimeout(() => I("handleAutoCountry"))) : (this._setInitialState(!0), I("rejectAutoCountryPromise"));
2046
2046
  },
2047
2047
  () => {
2048
2048
  this._setInitialState(!0), I("rejectAutoCountryPromise");
@@ -2054,31 +2054,31 @@ class D {
2054
2054
  }
2055
2055
  //* Initialize the tel input listeners.
2056
2056
  _initTelInputListeners() {
2057
- const { strictMode: t, formatAsYouType: e, separateDialCode: i, formatOnDisplay: s, allowDropdown: n, countrySearch: l } = this.options;
2057
+ const { strictMode: t, formatAsYouType: e, separateDialCode: i, allowDropdown: s, countrySearch: n } = this.options;
2058
2058
  let r = !1;
2059
2059
  new RegExp("\\p{L}", "u").test(this.telInput.value) && (r = !0), this._handleInputEvent = (o) => {
2060
- if (this.isAndroid && (o == null ? void 0 : o.data) === "+" && i && n && l) {
2061
- const y = this.telInput.selectionStart || 0, a = this.telInput.value.substring(0, y - 1), h = this.telInput.value.substring(y);
2062
- this.telInput.value = a + h, this._openDropdownWithPlus();
2060
+ if (this.isAndroid && (o == null ? void 0 : o.data) === "+" && i && s && n) {
2061
+ const c = this.telInput.selectionStart || 0, m = this.telInput.value.substring(0, c - 1), a = this.telInput.value.substring(c);
2062
+ this.telInput.value = m + a, this._openDropdownWithPlus();
2063
2063
  return;
2064
2064
  }
2065
2065
  this._updateCountryFromNumber(this.telInput.value) && this._triggerCountryChange();
2066
- const c = (o == null ? void 0 : o.data) && /[^+0-9]/.test(o.data), p = (o == null ? void 0 : o.inputType) === "insertFromPaste" && this.telInput.value;
2067
- c || p && !t ? r = !0 : /[^+0-9]/.test(this.telInput.value) || (r = !1);
2068
- const C = (o == null ? void 0 : o.detail) && o.detail.isSetNumber && !s;
2069
- if (e && !r && !C) {
2070
- const y = this.telInput.selectionStart || 0, h = this.telInput.value.substring(0, y).replace(/[^+0-9]/g, "").length, _ = (o == null ? void 0 : o.inputType) === "deleteContentForward", b = this._formatNumberAsYouType(), f = G(h, b, y, _);
2071
- this.telInput.value = b, this.telInput.setSelectionRange(f, f);
2066
+ const d = (o == null ? void 0 : o.data) && /[^+0-9]/.test(o.data), y = (o == null ? void 0 : o.inputType) === "insertFromPaste" && this.telInput.value;
2067
+ d || y && !t ? r = !0 : /[^+0-9]/.test(this.telInput.value) || (r = !1);
2068
+ const p = (o == null ? void 0 : o.detail) && o.detail.isSetNumber;
2069
+ if (e && !r && !p) {
2070
+ const c = this.telInput.selectionStart || 0, a = this.telInput.value.substring(0, c).replace(/[^+0-9]/g, "").length, h = (o == null ? void 0 : o.inputType) === "deleteContentForward", g = this._formatNumberAsYouType(), _ = G(a, g, c, h);
2071
+ this.telInput.value = g, this.telInput.setSelectionRange(_, _);
2072
2072
  }
2073
2073
  }, this.telInput.addEventListener("input", this._handleInputEvent), (t || i) && (this._handleKeydownEvent = (o) => {
2074
2074
  if (o.key && o.key.length === 1 && !o.altKey && !o.ctrlKey && !o.metaKey) {
2075
- if (i && n && l && o.key === "+") {
2075
+ if (i && s && n && o.key === "+") {
2076
2076
  o.preventDefault(), this._openDropdownWithPlus();
2077
2077
  return;
2078
2078
  }
2079
2079
  if (t) {
2080
- const c = this.telInput.value, C = !(c.charAt(0) === "+") && this.telInput.selectionStart === 0 && o.key === "+", y = /^[0-9]$/.test(o.key), a = i ? y : C || y, h = c.slice(0, this.telInput.selectionStart) + o.key + c.slice(this.telInput.selectionEnd), _ = this._getFullNumber(h), b = u.utils.getCoreNumber(_, this.selectedCountryData.iso2), f = this.maxCoreNumberLength && b.length > this.maxCoreNumberLength, v = this._getNewCountryFromNumber(_) !== null;
2081
- (!a || f && !v && !C) && o.preventDefault();
2080
+ const d = this.telInput.value, p = !(d.charAt(0) === "+") && this.telInput.selectionStart === 0 && o.key === "+", c = /^[0-9]$/.test(o.key), m = i ? c : p || c, a = d.slice(0, this.telInput.selectionStart) + o.key + d.slice(this.telInput.selectionEnd), h = this._getFullNumber(a), g = l.utils.getCoreNumber(h, this.selectedCountryData.iso2), _ = this.maxCoreNumberLength && g.length > this.maxCoreNumberLength, f = this._getNewCountryFromNumber(h) !== null;
2081
+ (!m || _ && !f && !p) && o.preventDefault();
2082
2082
  }
2083
2083
  }
2084
2084
  }, this.telInput.addEventListener("keydown", this._handleKeydownEvent));
@@ -2167,18 +2167,18 @@ class D {
2167
2167
  _filterCountries(t, e = !1) {
2168
2168
  let i = !0;
2169
2169
  this.countryList.innerHTML = "";
2170
- const s = A(t), n = s.length, l = [], r = [], o = [], c = [], p = [], C = [];
2170
+ const s = A(t), n = s.length, r = [], o = [], d = [], y = [], p = [], c = [];
2171
2171
  for (const a of this.countries)
2172
- e || n === 0 ? o.push(a) : a.iso2 === s ? l.push(a) : a.normalisedName.startsWith(s) ? r.push(a) : a.normalisedName.includes(s) ? o.push(a) : s === a.dialCode || s === a.dialCodePlus ? c.push(a) : a.dialCodePlus.includes(s) ? p.push(a) : a.initials.includes(s) && C.push(a);
2173
- const y = [
2174
- ...l.sort((a, h) => a.priority - h.priority),
2172
+ e || n === 0 ? d.push(a) : a.iso2 === s ? r.push(a) : a.normalisedName.startsWith(s) ? o.push(a) : a.normalisedName.includes(s) ? d.push(a) : s === a.dialCode || s === a.dialCodePlus ? y.push(a) : a.dialCodePlus.includes(s) ? p.push(a) : a.initials.includes(s) && c.push(a);
2173
+ const m = [
2175
2174
  ...r.sort((a, h) => a.priority - h.priority),
2176
2175
  ...o.sort((a, h) => a.priority - h.priority),
2177
- ...c.sort((a, h) => a.priority - h.priority),
2176
+ ...d.sort((a, h) => a.priority - h.priority),
2177
+ ...y.sort((a, h) => a.priority - h.priority),
2178
2178
  ...p.sort((a, h) => a.priority - h.priority),
2179
- ...C.sort((a, h) => a.priority - h.priority)
2179
+ ...c.sort((a, h) => a.priority - h.priority)
2180
2180
  ];
2181
- for (const a of y) {
2181
+ for (const a of m) {
2182
2182
  const h = a.nodeById[this.id];
2183
2183
  h && (this.countryList.appendChild(h), i && (this._highlightListItem(h, !1), i = !1));
2184
2184
  }
@@ -2204,12 +2204,12 @@ class D {
2204
2204
  //* NOTE: this is called from _setInitialState, handleUtils and setNumber.
2205
2205
  _updateValFromNumber(t) {
2206
2206
  let e = t;
2207
- if (this.options.formatOnDisplay && u.utils && this.selectedCountryData) {
2208
- const i = this.options.nationalMode || e.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: s, INTERNATIONAL: n } = u.utils.numberFormat, l = i ? s : n;
2209
- e = u.utils.formatNumber(
2207
+ if (this.options.formatOnDisplay && l.utils && this.selectedCountryData) {
2208
+ const i = this.options.nationalMode || e.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: s, INTERNATIONAL: n } = l.utils.numberFormat, r = i ? s : n;
2209
+ e = l.utils.formatNumber(
2210
2210
  e,
2211
2211
  this.selectedCountryData.iso2,
2212
- l
2212
+ r
2213
2213
  );
2214
2214
  }
2215
2215
  e = this._beforeSetNumber(e), this.telInput.value = e;
@@ -2224,8 +2224,8 @@ class D {
2224
2224
  const { dialCode: e, nationalPrefix: i } = this.selectedCountryData;
2225
2225
  if (t.charAt(0) === "+" || !e)
2226
2226
  return t;
2227
- const l = i && t.charAt(0) === i && !this.options.separateDialCode ? t.substring(1) : t;
2228
- return `+${e}${l}`;
2227
+ const r = i && t.charAt(0) === i && !this.options.separateDialCode ? t.substring(1) : t;
2228
+ return `+${e}${r}`;
2229
2229
  }
2230
2230
  // Get the country ISO2 code from the given number
2231
2231
  // BUT ONLY IF ITS CHANGED FROM THE CURRENTLY SELECTED COUNTRY
@@ -2235,19 +2235,19 @@ class D {
2235
2235
  let i = e ? t.substring(e) : t;
2236
2236
  const s = this.selectedCountryData.iso2, n = this.selectedCountryData.dialCode;
2237
2237
  i = this._ensureHasDialCode(i);
2238
- const l = this._getDialCode(i, !0), r = L(i);
2239
- if (l) {
2240
- const o = L(l), c = this.dialCodeToIso2Map[o];
2241
- if (!s && this.defaultCountry && c.includes(this.defaultCountry))
2238
+ const r = this._getDialCode(i, !0), o = v(i);
2239
+ if (r) {
2240
+ const d = v(r), y = this.dialCodeToIso2Map[d];
2241
+ if (!s && this.defaultCountry && y.includes(this.defaultCountry))
2242
2242
  return this.defaultCountry;
2243
- const p = this.selectedCountryData.areaCodes && r.length > o.length, C = s && c.includes(s) && !p;
2244
- if (!(n === "1" && P(r)) && !C) {
2245
- for (const a of c)
2243
+ const p = this.selectedCountryData.areaCodes && o.length > d.length, c = s && y.includes(s) && !p;
2244
+ if (!(n === "1" && P(o)) && !c) {
2245
+ for (const a of y)
2246
2246
  if (a)
2247
2247
  return a;
2248
2248
  }
2249
2249
  } else {
2250
- if (i.charAt(0) === "+" && r.length)
2250
+ if (i.charAt(0) === "+" && o.length)
2251
2251
  return "";
2252
2252
  if ((!i || i === "+") && !this.selectedCountryData.iso2)
2253
2253
  return this.defaultCountry;
@@ -2278,13 +2278,13 @@ class D {
2278
2278
  _setCountry(t) {
2279
2279
  const { separateDialCode: e, showFlags: i, i18n: s } = this.options, n = this.selectedCountryData.iso2 ? this.selectedCountryData : {};
2280
2280
  if (this.selectedCountryData = t ? this._getCountryData(t, !1) || {} : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountry) {
2281
- const l = t && i ? `iti__flag iti__${t}` : "iti__flag iti__globe";
2282
- let r, o;
2283
- t ? (o = this.selectedCountryData.name, r = s.selectedCountryAriaLabel.replace("${country}", this.selectedCountryData.name)) : (o = s.noCountrySelected, r = s.noCountrySelected), this.selectedCountryInner.className = l, this.selectedCountry.setAttribute("title", o), this.selectedCountry.setAttribute("aria-label", r);
2281
+ const r = t && i ? `iti__flag iti__${t}` : "iti__flag iti__globe";
2282
+ let o, d;
2283
+ t ? (d = this.selectedCountryData.name, o = s.selectedCountryAriaLabel.replace("${country}", this.selectedCountryData.name)) : (d = s.noCountrySelected, o = s.noCountrySelected), this.selectedCountryInner.className = r, this.selectedCountry.setAttribute("title", d), this.selectedCountry.setAttribute("aria-label", o);
2284
2284
  }
2285
2285
  if (e) {
2286
- const l = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
2287
- this.selectedDialCode.innerHTML = l, this._updateInputPadding();
2286
+ const r = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
2287
+ this.selectedDialCode.innerHTML = r, this._updateInputPadding();
2288
2288
  }
2289
2289
  return this._updatePlaceholder(), this._updateMaxLength(), n.iso2 !== t;
2290
2290
  }
@@ -2298,19 +2298,19 @@ class D {
2298
2298
  //* Update the maximum valid number length for the currently selected country.
2299
2299
  _updateMaxLength() {
2300
2300
  const { strictMode: t, placeholderNumberType: e, validationNumberTypes: i } = this.options, { iso2: s } = this.selectedCountryData;
2301
- if (t && u.utils)
2301
+ if (t && l.utils)
2302
2302
  if (s) {
2303
- const n = u.utils.numberType[e];
2304
- let l = u.utils.getExampleNumber(
2303
+ const n = l.utils.numberType[e];
2304
+ let r = l.utils.getExampleNumber(
2305
2305
  s,
2306
2306
  !1,
2307
2307
  n,
2308
2308
  !0
2309
- ), r = l;
2310
- for (; u.utils.isPossibleNumber(l, s, i); )
2311
- r = l, l += "0";
2312
- const o = u.utils.getCoreNumber(r, s);
2313
- this.maxCoreNumberLength = o.length, s === "by" && (this.maxCoreNumberLength = o.length + 1);
2309
+ ), o = r;
2310
+ for (; l.utils.isPossibleNumber(r, s, i); )
2311
+ o = r, r += "0";
2312
+ const d = l.utils.getCoreNumber(o, s);
2313
+ this.maxCoreNumberLength = d.length, s === "by" && (this.maxCoreNumberLength = d.length + 1);
2314
2314
  } else
2315
2315
  this.maxCoreNumberLength = null;
2316
2316
  }
@@ -2339,14 +2339,14 @@ class D {
2339
2339
  nationalMode: i,
2340
2340
  customPlaceholder: s
2341
2341
  } = this.options, n = t === "aggressive" || !this.hadInitialPlaceholder && t === "polite";
2342
- if (u.utils && n) {
2343
- const l = u.utils.numberType[e];
2344
- let r = this.selectedCountryData.iso2 ? u.utils.getExampleNumber(
2342
+ if (l.utils && n) {
2343
+ const r = l.utils.numberType[e];
2344
+ let o = this.selectedCountryData.iso2 ? l.utils.getExampleNumber(
2345
2345
  this.selectedCountryData.iso2,
2346
2346
  i,
2347
- l
2347
+ r
2348
2348
  ) : "";
2349
- r = this._beforeSetNumber(r), typeof s == "function" && (r = s(r, this.selectedCountryData)), this.telInput.setAttribute("placeholder", r);
2349
+ o = this._beforeSetNumber(o), typeof s == "function" && (o = s(o, this.selectedCountryData)), this.telInput.setAttribute("placeholder", o);
2350
2350
  }
2351
2351
  }
2352
2352
  //* Called when the user selects a list item from the dropdown.
@@ -2354,7 +2354,7 @@ class D {
2354
2354
  const e = this._setCountry(
2355
2355
  t.getAttribute("data-country-code")
2356
2356
  );
2357
- this._closeDropdown(), this._updateDialCode(t.getAttribute("data-dial-code")), this.telInput.focus(), e && this._triggerCountryChange();
2357
+ this._closeDropdown(), this._updateDialCode(t.getAttribute("data-dial-code")), this.options.formatOnDisplay && this._updateValFromNumber(this.telInput.value), this.telInput.focus(), e && this._triggerCountryChange();
2358
2358
  }
2359
2359
  //* Close the dropdown and unbind any listeners.
2360
2360
  _closeDropdown() {
@@ -2368,12 +2368,12 @@ class D {
2368
2368
  }
2369
2369
  //* Check if an element is visible within it's container, else scroll until it is.
2370
2370
  _scrollTo(t) {
2371
- const e = this.countryList, i = document.documentElement.scrollTop, s = e.offsetHeight, n = e.getBoundingClientRect().top + i, l = n + s, r = t.offsetHeight, o = t.getBoundingClientRect().top + i, c = o + r, p = o - n + e.scrollTop;
2372
- if (o < n)
2371
+ const e = this.countryList, i = document.documentElement.scrollTop, s = e.offsetHeight, n = e.getBoundingClientRect().top + i, r = n + s, o = t.offsetHeight, d = t.getBoundingClientRect().top + i, y = d + o, p = d - n + e.scrollTop;
2372
+ if (d < n)
2373
2373
  e.scrollTop = p;
2374
- else if (c > l) {
2375
- const C = s - r;
2376
- e.scrollTop = p - C;
2374
+ else if (y > r) {
2375
+ const c = s - o;
2376
+ e.scrollTop = p - c;
2377
2377
  }
2378
2378
  }
2379
2379
  //* Replace any existing dial code with the new one
@@ -2393,9 +2393,9 @@ class D {
2393
2393
  if (t.charAt(0) === "+") {
2394
2394
  let s = "";
2395
2395
  for (let n = 0; n < t.length; n++) {
2396
- const l = t.charAt(n);
2397
- if (!isNaN(parseInt(l, 10))) {
2398
- if (s += l, e)
2396
+ const r = t.charAt(n);
2397
+ if (!isNaN(parseInt(r, 10))) {
2398
+ if (s += r, e)
2399
2399
  this.dialCodeToIso2Map[s] && (i = t.substring(0, n + 1));
2400
2400
  else if (this.dialCodes.has(s)) {
2401
2401
  i = t.substring(0, n + 1);
@@ -2412,7 +2412,7 @@ class D {
2412
2412
  _getFullNumber(t) {
2413
2413
  const e = t || this.telInput.value.trim(), { dialCode: i } = this.selectedCountryData;
2414
2414
  let s;
2415
- const n = L(e);
2415
+ const n = v(e);
2416
2416
  return this.options.separateDialCode && e.charAt(0) !== "+" && i && n ? s = `+${i}` : s = "", s + e;
2417
2417
  }
2418
2418
  //* Remove the dial code if separateDialCode is enabled also cap the length if the input has a maxlength attribute
@@ -2434,7 +2434,7 @@ class D {
2434
2434
  }
2435
2435
  //* Format the number as the user types.
2436
2436
  _formatNumberAsYouType() {
2437
- const t = this._getFullNumber(), e = u.utils ? u.utils.formatNumberAsYouType(t, this.selectedCountryData.iso2) : t, { dialCode: i } = this.selectedCountryData;
2437
+ const t = this._getFullNumber(), e = l.utils ? l.utils.formatNumberAsYouType(t, this.selectedCountryData.iso2) : t, { dialCode: i } = this.selectedCountryData;
2438
2438
  return this.options.separateDialCode && this.telInput.value.charAt(0) !== "+" && e.includes(`+${i}`) ? (e.split(`+${i}`)[1] || "").trim() : e;
2439
2439
  }
2440
2440
  //**************************
@@ -2442,18 +2442,18 @@ class D {
2442
2442
  //**************************
2443
2443
  //* This is called when the geoip call returns.
2444
2444
  handleAutoCountry() {
2445
- this.options.initialCountry === "auto" && u.autoCountry && (this.defaultCountry = u.autoCountry, this.selectedCountryData.iso2 || this.selectedCountryInner.classList.contains("iti__globe") || this.setCountry(this.defaultCountry), this.resolveAutoCountryPromise());
2445
+ this.options.initialCountry === "auto" && l.autoCountry && (this.defaultCountry = l.autoCountry, this.selectedCountryData.iso2 || this.selectedCountryInner.classList.contains("iti__globe") || this.setCountry(this.defaultCountry), this.resolveAutoCountryPromise());
2446
2446
  }
2447
2447
  //* This is called when the utils request completes.
2448
2448
  handleUtils() {
2449
- u.utils && (this.telInput.value && this._updateValFromNumber(this.telInput.value), this.selectedCountryData.iso2 && (this._updatePlaceholder(), this._updateMaxLength())), this.resolveUtilsScriptPromise();
2449
+ l.utils && (this.telInput.value && this._updateValFromNumber(this.telInput.value), this.selectedCountryData.iso2 && (this._updatePlaceholder(), this._updateMaxLength())), this.resolveUtilsScriptPromise();
2450
2450
  }
2451
2451
  //********************
2452
2452
  //* PUBLIC METHODS
2453
2453
  //********************
2454
2454
  //* Remove plugin.
2455
2455
  destroy() {
2456
- var n, l;
2456
+ var n, r;
2457
2457
  this.telInput.iti = void 0;
2458
2458
  const { allowDropdown: t, separateDialCode: e } = this.options;
2459
2459
  if (t) {
@@ -2464,26 +2464,26 @@ class D {
2464
2464
  "keydown",
2465
2465
  this._handleCountryContainerKeydown
2466
2466
  );
2467
- const r = this.telInput.closest("label");
2468
- r && r.removeEventListener("click", this._handleLabelClick);
2467
+ const o = this.telInput.closest("label");
2468
+ o && o.removeEventListener("click", this._handleLabelClick);
2469
2469
  }
2470
2470
  const { form: i } = this.telInput;
2471
2471
  this._handleHiddenInputSubmit && i && i.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"), e && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft);
2472
2472
  const s = this.telInput.parentNode;
2473
- (n = s == null ? void 0 : s.parentNode) == null || n.insertBefore(this.telInput, s), (l = s == null ? void 0 : s.parentNode) == null || l.removeChild(s), delete u.instances[this.id];
2473
+ (n = s == null ? void 0 : s.parentNode) == null || n.insertBefore(this.telInput, s), (r = s == null ? void 0 : s.parentNode) == null || r.removeChild(s), delete l.instances[this.id];
2474
2474
  }
2475
2475
  //* Get the extension from the current number.
2476
2476
  getExtension() {
2477
- return u.utils ? u.utils.getExtension(
2477
+ return l.utils ? l.utils.getExtension(
2478
2478
  this._getFullNumber(),
2479
2479
  this.selectedCountryData.iso2
2480
2480
  ) : "";
2481
2481
  }
2482
2482
  //* Format the number to the given format.
2483
2483
  getNumber(t) {
2484
- if (u.utils) {
2484
+ if (l.utils) {
2485
2485
  const { iso2: e } = this.selectedCountryData;
2486
- return u.utils.formatNumber(
2486
+ return l.utils.formatNumber(
2487
2487
  this._getFullNumber(),
2488
2488
  e,
2489
2489
  t
@@ -2493,7 +2493,7 @@ class D {
2493
2493
  }
2494
2494
  //* Get the type of the entered number e.g. landline/mobile.
2495
2495
  getNumberType() {
2496
- return u.utils ? u.utils.getNumberType(
2496
+ return l.utils ? l.utils.getNumberType(
2497
2497
  this._getFullNumber(),
2498
2498
  this.selectedCountryData.iso2
2499
2499
  ) : -99;
@@ -2504,9 +2504,9 @@ class D {
2504
2504
  }
2505
2505
  //* Get the validation error.
2506
2506
  getValidationError() {
2507
- if (u.utils) {
2507
+ if (l.utils) {
2508
2508
  const { iso2: t } = this.selectedCountryData;
2509
- return u.utils.getValidationError(this._getFullNumber(), t);
2509
+ return l.utils.getValidationError(this._getFullNumber(), t);
2510
2510
  }
2511
2511
  return -99;
2512
2512
  }
@@ -2519,7 +2519,7 @@ class D {
2519
2519
  return this._validateNumber(!0);
2520
2520
  }
2521
2521
  _utilsIsPossibleNumber(t) {
2522
- return u.utils ? u.utils.isPossibleNumber(t, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2522
+ return l.utils ? l.utils.isPossibleNumber(t, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2523
2523
  }
2524
2524
  //* Shared internal validation logic to handle alpha character extension rules.
2525
2525
  _validateNumber(t) {
@@ -2527,18 +2527,18 @@ class D {
2527
2527
  return !1;
2528
2528
  const e = this._getFullNumber(), i = e.search(new RegExp("\\p{L}", "u")), s = (n) => t ? this._utilsIsValidNumber(n) : this._utilsIsPossibleNumber(n);
2529
2529
  if (i > -1) {
2530
- const n = e.substring(0, i), l = s(n), r = s(e);
2531
- return l && r;
2530
+ const n = e.substring(0, i), r = s(n), o = s(e);
2531
+ return r && o;
2532
2532
  }
2533
2533
  return s(e);
2534
2534
  }
2535
2535
  _utilsIsValidNumber(t) {
2536
- return u.utils ? u.utils.isValidNumber(t, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2536
+ return l.utils ? l.utils.isValidNumber(t, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2537
2537
  }
2538
2538
  //* Update the selected country, and update the input val accordingly.
2539
2539
  setCountry(t) {
2540
2540
  const e = t == null ? void 0 : t.toLowerCase(), i = this.selectedCountryData.iso2;
2541
- (t && e !== i || !t && i) && (this._setCountry(e), this._updateDialCode(this.selectedCountryData.dialCode), this._triggerCountryChange());
2541
+ (t && e !== i || !t && i) && (this._setCountry(e), this._updateDialCode(this.selectedCountryData.dialCode), this.options.formatOnDisplay && this._updateValFromNumber(this.telInput.value), this._triggerCountryChange());
2542
2542
  }
2543
2543
  //* Set the input value and update the country.
2544
2544
  setNumber(t) {
@@ -2553,31 +2553,31 @@ class D {
2553
2553
  this.telInput.disabled = t, t ? this.selectedCountry.setAttribute("disabled", "true") : this.selectedCountry.removeAttribute("disabled");
2554
2554
  }
2555
2555
  }
2556
- const Y = (d) => {
2557
- if (!u.utils && !u.startedLoadingUtilsScript) {
2556
+ const Y = (u) => {
2557
+ if (!l.utils && !l.startedLoadingUtilsScript) {
2558
2558
  let t;
2559
- if (typeof d == "function")
2559
+ if (typeof u == "function")
2560
2560
  try {
2561
- t = Promise.resolve(d());
2561
+ t = Promise.resolve(u());
2562
2562
  } catch (e) {
2563
2563
  return Promise.reject(e);
2564
2564
  }
2565
2565
  else
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 d}`));
2567
- return u.startedLoadingUtilsScript = !0, t.then((e) => {
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 u}`));
2567
+ return l.startedLoadingUtilsScript = !0, t.then((e) => {
2568
2568
  const i = e == null ? void 0 : e.default;
2569
2569
  if (!i || typeof i != "object")
2570
2570
  throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");
2571
- return u.utils = i, I("handleUtils"), !0;
2571
+ return l.utils = i, I("handleUtils"), !0;
2572
2572
  }).catch((e) => {
2573
2573
  throw I("rejectUtilsScriptPromise", e), e;
2574
2574
  });
2575
2575
  }
2576
2576
  return null;
2577
- }, u = Object.assign(
2578
- (d, t) => {
2579
- const e = new D(d, t);
2580
- return e._init(), d.setAttribute("data-intl-tel-input-id", e.id.toString()), u.instances[e.id] = e, d.iti = e, e;
2577
+ }, l = Object.assign(
2578
+ (u, t) => {
2579
+ const e = new L(u, t);
2580
+ return e._init(), u.setAttribute("data-intl-tel-input-id", e.id.toString()), l.instances[e.id] = e, u.iti = e, e;
2581
2581
  },
2582
2582
  {
2583
2583
  defaults: x,
@@ -2586,16 +2586,16 @@ const Y = (d) => {
2586
2586
  //* Get the country data object.
2587
2587
  getCountryData: () => w,
2588
2588
  //* A getter for the plugin instance.
2589
- getInstance: (d) => {
2590
- const t = d.getAttribute("data-intl-tel-input-id");
2591
- return t ? u.instances[t] : null;
2589
+ getInstance: (u) => {
2590
+ const t = u.getAttribute("data-intl-tel-input-id");
2591
+ return t ? l.instances[t] : null;
2592
2592
  },
2593
2593
  //* A map from instance ID to instance object.
2594
2594
  instances: {},
2595
2595
  attachUtils: Y,
2596
2596
  startedLoadingUtilsScript: !1,
2597
2597
  startedLoadingAutoCountry: !1,
2598
- version: "25.8.3"
2598
+ version: "25.8.5"
2599
2599
  }
2600
2600
  ), Z = {
2601
2601
  __name: "IntlTelInput",
@@ -2629,39 +2629,39 @@ const Y = (d) => {
2629
2629
  "changeValidity",
2630
2630
  "changeErrorCode"
2631
2631
  ], ["update:modelValue"]),
2632
- setup(d, { expose: t, emit: e }) {
2633
- const i = M(d, "modelValue"), s = d, n = e, l = N(), r = N(), o = N(!1), c = () => r.value ? s.options.strictMode ? r.value.isValidNumberPrecise() : r.value.isValidNumber() : null, p = () => {
2634
- let a = c();
2635
- o.value !== a && (o.value = a, n("changeValidity", !!a), n(
2632
+ setup(u, { expose: t, emit: e }) {
2633
+ const i = M(u, "modelValue"), s = u, n = e, r = D(), o = D(), d = D(!1), y = () => o.value ? s.options.strictMode ? o.value.isValidNumberPrecise() : o.value.isValidNumber() : null, p = () => {
2634
+ let a = y();
2635
+ d.value !== a && (d.value = a, n("changeValidity", !!a), n(
2636
2636
  "changeErrorCode",
2637
- a ? null : r.value.getValidationError()
2637
+ a ? null : o.value.getValidationError()
2638
2638
  ));
2639
- }, C = () => {
2639
+ }, c = () => {
2640
2640
  var a;
2641
- n("changeNumber", ((a = r.value) == null ? void 0 : a.getNumber()) ?? ""), p();
2642
- }, y = () => {
2641
+ n("changeNumber", ((a = o.value) == null ? void 0 : a.getNumber()) ?? ""), p();
2642
+ }, m = () => {
2643
2643
  var a;
2644
- n("changeCountry", ((a = r.value) == null ? void 0 : a.getSelectedCountryData().iso2) ?? ""), C(), p();
2644
+ n("changeCountry", ((a = o.value) == null ? void 0 : a.getSelectedCountryData().iso2) ?? ""), c(), p();
2645
2645
  };
2646
2646
  return E(() => {
2647
- l.value && (r.value = u(l.value, s.options), s.value && r.value.setNumber(s.value), s.disabled && r.value.setDisabled(s.disabled), o.value = c());
2647
+ r.value && (o.value = l(r.value, s.options), s.value && o.value.setNumber(s.value), s.disabled && o.value.setDisabled(s.disabled), d.value = y());
2648
2648
  }), B(
2649
2649
  () => s.disabled,
2650
2650
  (a) => {
2651
2651
  var h;
2652
- return (h = r.value) == null ? void 0 : h.setDisabled(a);
2652
+ return (h = o.value) == null ? void 0 : h.setDisabled(a);
2653
2653
  }
2654
2654
  ), R(() => {
2655
2655
  var a;
2656
- return (a = r.value) == null ? void 0 : a.destroy();
2657
- }), t({ instance: r, input: l }), (a, h) => F((V(), z("input", O({
2656
+ return (a = o.value) == null ? void 0 : a.destroy();
2657
+ }), t({ instance: o, input: r }), (a, h) => F((z(), V("input", O({
2658
2658
  ref_key: "input",
2659
- ref: l,
2660
- "onUpdate:modelValue": h[0] || (h[0] = (_) => i.value = _),
2659
+ ref: r,
2660
+ "onUpdate:modelValue": h[0] || (h[0] = (g) => i.value = g),
2661
2661
  type: "tel",
2662
- onCountrychange: y,
2663
- onInput: C
2664
- }, d.inputProps), null, 16)), [
2662
+ onCountrychange: m,
2663
+ onInput: c
2664
+ }, u.inputProps), null, 16)), [
2665
2665
  [
2666
2666
  j,
2667
2667
  i.value,