intl-tel-input 25.10.7 → 25.10.9

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.
Files changed (35) hide show
  1. package/README.md +5 -5
  2. package/angular/README.md +1 -1
  3. package/angular/build/IntlTelInput.js +386 -320
  4. package/angular/build/IntlTelInputWithUtils.js +437 -342
  5. package/angular/build/types/intl-tel-input/angular.d.ts +2 -1
  6. package/angular/build/types/intl-tel-input/angularWithUtils.d.ts +2 -1
  7. package/angular/build/types/intl-tel-input/data.d.ts +3 -1
  8. package/angular/build/types/intl-tel-input/i18n/types.d.ts +2 -245
  9. package/angular/build/types/intl-tel-input.d.ts +16 -87
  10. package/angular/build/types/modules/core/options.d.ts +3 -0
  11. package/angular/build/types/modules/data/country-data.d.ts +12 -0
  12. package/angular/build/types/modules/data/nanp-regionless.d.ts +2 -0
  13. package/angular/build/types/modules/format/caret.d.ts +1 -0
  14. package/angular/build/types/modules/format/formatting.d.ts +3 -0
  15. package/angular/build/types/modules/types/public-api.d.ts +79 -0
  16. package/angular/build/types/modules/utils/dom.d.ts +1 -0
  17. package/angular/build/types/modules/utils/string.d.ts +2 -0
  18. package/build/js/data.js +3 -2
  19. package/build/js/data.min.js +2 -2
  20. package/build/js/intlTelInput.d.ts +99 -292
  21. package/build/js/intlTelInput.js +432 -361
  22. package/build/js/intlTelInput.min.js +13 -13
  23. package/build/js/intlTelInputWithUtils.js +483 -383
  24. package/build/js/intlTelInputWithUtils.min.js +13 -13
  25. package/build/js/utils.js +18 -15
  26. package/package.json +1 -1
  27. package/react/README.md +1 -1
  28. package/react/build/IntlTelInput.cjs +431 -360
  29. package/react/build/IntlTelInput.d.ts +103 -294
  30. package/react/build/IntlTelInput.js +431 -360
  31. package/react/build/IntlTelInputWithUtils.cjs +482 -382
  32. package/react/build/IntlTelInputWithUtils.js +482 -382
  33. package/vue/README.md +1 -1
  34. package/vue/build/IntlTelInput.mjs +483 -443
  35. package/vue/build/IntlTelInputWithUtils.mjs +1128 -1059
@@ -1,5 +1,5 @@
1
- import { mergeModels as a2, useModel as D2, ref as S1, 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 = [
1
+ import { mergeModels as r2, useModel as P2, ref as I1, onMounted as x2, watch as B2, onUnmounted as R2, withDirectives as k2, createElementBlock as O2, openBlock as G2, mergeProps as U2, vModelText as F2 } from "vue";
2
+ const K2 = [
3
3
  [
4
4
  "af",
5
5
  // Afghanistan
@@ -1322,18 +1322,18 @@ const U2 = [
1322
1322
  // Zimbabwe
1323
1323
  "263"
1324
1324
  ]
1325
- ], q = [];
1326
- for (const y of U2)
1327
- q.push({
1325
+ ], Z = [];
1326
+ for (const f of K2)
1327
+ Z.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: f[0],
1331
+ dialCode: f[1],
1332
+ priority: f[2] || 0,
1333
+ areaCodes: f[3] || null,
1334
1334
  nodeById: {},
1335
1335
  // populated by the plugin
1336
- nationalPrefix: y[4] || null
1336
+ nationalPrefix: f[4] || null
1337
1337
  });
1338
1338
  const V2 = {
1339
1339
  ad: "Andorra",
@@ -1578,7 +1578,7 @@ const V2 = {
1578
1578
  za: "South Africa",
1579
1579
  zm: "Zambia",
1580
1580
  zw: "Zimbabwe"
1581
- }, K2 = {
1581
+ }, H2 = {
1582
1582
  selectedCountryAriaLabel: "Change country, selected ${countryName} (${dialCode})",
1583
1583
  noCountrySelected: "Select country",
1584
1584
  countryListAriaLabel: "List of countries",
@@ -1590,17 +1590,13 @@ const V2 = {
1590
1590
  // additional countries (not supported by country-list library)
1591
1591
  ac: "Ascension Island",
1592
1592
  xk: "Kosovo"
1593
- }, h2 = { ...V2, ...K2 };
1594
- for (const y of q)
1595
- y.name = h2[y.iso2];
1596
- let H2 = 0;
1597
- const b1 = (y) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(y).matches, j2 = () => {
1593
+ }, a2 = { ...V2, ...H2 }, v1 = (f) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(f).matches, j2 = () => {
1598
1594
  if (typeof navigator < "u" && typeof window < "u") {
1599
- const y = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), e = b1("(max-width: 500px)"), i = b1("(max-height: 600px)"), n = b1("(pointer: coarse)");
1600
- return y || e || n && i;
1595
+ const f = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), e = v1("(max-width: 500px)"), $ = v1("(max-height: 600px)"), i = v1("(pointer: coarse)");
1596
+ return f || e || i && $;
1601
1597
  }
1602
1598
  return !1;
1603
- }, c2 = {
1599
+ }, u2 = {
1604
1600
  // Allow alphanumeric "phonewords" (e.g. +1 800 FLOWERS) as valid numbers
1605
1601
  allowPhonewords: !1,
1606
1602
  //* Whether or not to allow the dropdown.
@@ -1651,7 +1647,103 @@ const b1 = (y) => typeof window < "u" && typeof window.matchMedia == "function"
1651
1647
  useFullscreenPopup: j2(),
1652
1648
  //* The number type to enforce during validation.
1653
1649
  validationNumberTypes: ["MOBILE"]
1654
- }, W2 = [
1650
+ };
1651
+ function W2(f) {
1652
+ f.useFullscreenPopup && (f.fixDropdownWidth = !1), f.onlyCountries.length === 1 && (f.initialCountry = f.onlyCountries[0]), f.separateDialCode && (f.nationalMode = !1), f.allowDropdown && !f.showFlags && !f.separateDialCode && (f.nationalMode = !1), f.useFullscreenPopup && !f.dropdownContainer && (f.dropdownContainer = document.body), f.i18n = { ...a2, ...f.i18n };
1653
+ }
1654
+ const h1 = (f) => f.replace(/\D/g, ""), l2 = (f = "") => f.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), L = (f, e, $) => {
1655
+ const i = document.createElement(f);
1656
+ return e && Object.entries(e).forEach(([s, u]) => i.setAttribute(s, u)), $ && $.appendChild(i), i;
1657
+ };
1658
+ function z2(f) {
1659
+ const { onlyCountries: e, excludeCountries: $ } = f;
1660
+ if (e.length) {
1661
+ const i = e.map((s) => s.toLowerCase());
1662
+ return Z.filter((s) => i.includes(s.iso2));
1663
+ } else if ($.length) {
1664
+ const i = $.map((s) => s.toLowerCase());
1665
+ return Z.filter((s) => !i.includes(s.iso2));
1666
+ }
1667
+ return Z;
1668
+ }
1669
+ function Z2(f, e) {
1670
+ for (const $ of f) {
1671
+ const i = $.iso2.toLowerCase();
1672
+ e.i18n[i] && ($.name = e.i18n[i]);
1673
+ }
1674
+ }
1675
+ function Y2(f, e) {
1676
+ const $ = /* @__PURE__ */ new Set();
1677
+ let i = 0;
1678
+ const s = {}, u = (h, c, C) => {
1679
+ if (!h || !c)
1680
+ return;
1681
+ c.length > i && (i = c.length), s.hasOwnProperty(c) || (s[c] = []);
1682
+ const g = s[c];
1683
+ if (g.includes(h))
1684
+ return;
1685
+ const I = C !== void 0 ? C : g.length;
1686
+ g[I] = h;
1687
+ };
1688
+ for (const h of f)
1689
+ $.has(h.dialCode) || $.add(h.dialCode), u(h.iso2, h.dialCode, h.priority);
1690
+ (e.onlyCountries.length || e.excludeCountries.length) && $.forEach((h) => {
1691
+ s[h] = s[h].filter(Boolean);
1692
+ });
1693
+ for (const h of f)
1694
+ if (h.areaCodes) {
1695
+ const c = s[h.dialCode][0];
1696
+ for (const C of h.areaCodes) {
1697
+ for (let g = 1; g < C.length; g++) {
1698
+ const I = C.substring(0, g), S = h.dialCode + I;
1699
+ u(c, S), u(h.iso2, S);
1700
+ }
1701
+ u(h.iso2, h.dialCode + C);
1702
+ }
1703
+ }
1704
+ return { dialCodes: $, dialCodeMaxLen: i, dialCodeToIso2Map: s };
1705
+ }
1706
+ function J2(f, e) {
1707
+ e.countryOrder && (e.countryOrder = e.countryOrder.map(($) => $.toLowerCase())), f.sort(($, i) => {
1708
+ const { countryOrder: s } = e;
1709
+ if (s) {
1710
+ const u = s.indexOf($.iso2), h = s.indexOf(i.iso2), c = u > -1, C = h > -1;
1711
+ if (c || C)
1712
+ return c && C ? u - h : c ? -1 : 1;
1713
+ }
1714
+ return $.name.localeCompare(i.name);
1715
+ });
1716
+ }
1717
+ function q2(f) {
1718
+ for (const e of f)
1719
+ e.normalisedName = l2(e.name), e.initials = e.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map(($) => $[0]).join("").toLowerCase(), e.dialCodePlus = `+${e.dialCode}`;
1720
+ }
1721
+ function X2(f, e, $, i) {
1722
+ let s = f;
1723
+ if ($ && e) {
1724
+ e = `+${i.dialCode}`;
1725
+ const u = s[e.length] === " " || s[e.length] === "-" ? e.length + 1 : e.length;
1726
+ s = s.substring(u);
1727
+ }
1728
+ return s;
1729
+ }
1730
+ function Q2(f, e, $, i, s) {
1731
+ const u = $ ? $.formatNumberAsYouType(f, i.iso2) : f, { dialCode: h } = i;
1732
+ return s && e.charAt(0) !== "+" && u.includes(`+${h}`) ? (u.split(`+${h}`)[1] || "").trim() : u;
1733
+ }
1734
+ function d0(f, e, $, i) {
1735
+ if ($ === 0 && !i)
1736
+ return 0;
1737
+ let s = 0;
1738
+ for (let u = 0; u < e.length; u++) {
1739
+ if (/[+0-9]/.test(e[u]) && s++, s === f && !i)
1740
+ return u + 1;
1741
+ if (i && s === f + 1)
1742
+ return u;
1743
+ }
1744
+ return e.length;
1745
+ }
1746
+ const t0 = [
1655
1747
  "800",
1656
1748
  "822",
1657
1749
  "833",
@@ -1669,165 +1761,96 @@ const b1 = (y) => typeof window < "u" && typeof window.matchMedia == "function"
1669
1761
  "887",
1670
1762
  "888",
1671
1763
  "889"
1672
- ], p1 = (y) => y.replace(/\D/g, ""), u2 = (y = "") => y.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), l2 = (y) => {
1673
- const e = p1(y);
1764
+ ], o2 = (f) => {
1765
+ const e = h1(f);
1674
1766
  if (e.charAt(0) === "1") {
1675
- const i = e.substring(1, 4);
1676
- return W2.includes(i);
1767
+ const $ = e.substring(1, 4);
1768
+ return t0.includes($);
1677
1769
  }
1678
1770
  return !1;
1679
- }, z2 = (y, e, i, n) => {
1680
- if (i === 0 && !n)
1681
- return 0;
1682
- let o = 0;
1683
- for (let l = 0; l < e.length; l++) {
1684
- if (/[+0-9]/.test(e[l]) && o++, o === y && !n)
1685
- return l + 1;
1686
- if (n && o === y + 1)
1687
- return l;
1688
- }
1689
- return e.length;
1690
- }, T = (y, e, i) => {
1691
- const n = document.createElement(y);
1692
- return e && Object.entries(e).forEach(([o, l]) => n.setAttribute(o, l)), i && i.appendChild(n), n;
1693
- }, i1 = (y, ...e) => {
1694
- const { instances: i } = m;
1695
- Object.values(i).forEach((n) => n[y](...e));
1696
1771
  };
1697
- class g1 {
1772
+ for (const f of Z)
1773
+ f.name = a2[f.iso2];
1774
+ let e0 = 0;
1775
+ const $0 = new Set(Z.map((f) => f.iso2)), w1 = (f) => $0.has(f), e1 = (f, ...e) => {
1776
+ const { instances: $ } = y;
1777
+ Object.values($).forEach((i) => i[f](...e));
1778
+ };
1779
+ class c1 {
1698
1780
  /**
1699
1781
  * Build a space-delimited class string from an object map of className -> truthy/falsey.
1700
1782
  * Only keys with truthy values are included.
1701
1783
  */
1702
1784
  static _buildClassNames(e) {
1703
- return Object.keys(e).filter((i) => !!e[i]).join(" ");
1785
+ return Object.keys(e).filter(($) => !!e[$]).join(" ");
1704
1786
  }
1705
- constructor(e, i = {}) {
1706
- this.id = H2++, this.telInput = e, this.highlightedItem = null, this.options = Object.assign({}, c2, i), this.hadInitialPlaceholder = !!e.getAttribute("placeholder");
1787
+ constructor(e, $ = {}) {
1788
+ this.id = e0++, this.telInput = e, this.highlightedItem = null, this.options = Object.assign({}, u2, $), this.hadInitialPlaceholder = !!e.getAttribute("placeholder");
1707
1789
  }
1708
- //* Can't be private as it's called from intlTelInput convenience wrapper.
1709
- _init() {
1710
- this.options.useFullscreenPopup && (this.options.fixDropdownWidth = !1), this.options.onlyCountries.length === 1 && (this.options.initialCountry = this.options.onlyCountries[0]), this.options.separateDialCode && (this.options.nationalMode = !1), this.options.allowDropdown && !this.options.showFlags && !this.options.separateDialCode && (this.options.nationalMode = !1), this.options.useFullscreenPopup && !this.options.dropdownContainer && (this.options.dropdownContainer = document.body), this.isAndroid = typeof navigator < "u" ? /Android/i.test(navigator.userAgent) : !1, this.isRTL = !!this.telInput.closest("[dir=rtl]"), this.telInput.dir = "ltr";
1790
+ _detectEnvironmentAndLayout() {
1791
+ this.isAndroid = typeof navigator < "u" ? /Android/i.test(navigator.userAgent) : !1, this.isRTL = !!this.telInput.closest("[dir=rtl]"), this.telInput.dir = "ltr";
1711
1792
  const e = this.options.allowDropdown || this.options.separateDialCode;
1712
- this.showSelectedCountryOnLeft = this.isRTL ? !e : e, this.options.separateDialCode && (this.isRTL ? this.originalPaddingRight = this.telInput.style.paddingRight : this.originalPaddingLeft = this.telInput.style.paddingLeft), this.options.i18n = { ...h2, ...this.options.i18n };
1713
- const i = new Promise((o, l) => {
1714
- this.resolveAutoCountryPromise = o, this.rejectAutoCountryPromise = l;
1715
- }), n = new Promise((o, l) => {
1716
- this.resolveUtilsScriptPromise = o, this.rejectUtilsScriptPromise = l;
1793
+ this.showSelectedCountryOnLeft = this.isRTL ? !e : e, this.options.separateDialCode && (this.isRTL ? this.originalPaddingRight = this.telInput.style.paddingRight : this.originalPaddingLeft = this.telInput.style.paddingLeft);
1794
+ }
1795
+ _createInitPromises() {
1796
+ const e = new Promise((i, s) => {
1797
+ this.resolveAutoCountryPromise = i, this.rejectAutoCountryPromise = s;
1798
+ }), $ = new Promise((i, s) => {
1799
+ this.resolveUtilsScriptPromise = i, this.rejectUtilsScriptPromise = s;
1717
1800
  });
1718
- this.promise = Promise.all([i, n]), this.selectedCountryData = {}, this._processCountryData(), this._generateMarkup(), this._setInitialState(), this._initListeners(), this._initRequests();
1801
+ this.promise = Promise.all([e, $]);
1802
+ }
1803
+ //* Can't be private as it's called from intlTelInput convenience wrapper.
1804
+ _init() {
1805
+ W2(this.options), this._detectEnvironmentAndLayout(), this._createInitPromises(), this.selectedCountryData = {}, this._processCountryData(), this._generateMarkup(), this._setInitialState(), this._initListeners(), this._initRequests();
1719
1806
  }
1720
1807
  //********************
1721
1808
  //* PRIVATE METHODS
1722
1809
  //********************
1723
1810
  //* Prepare all of the country data, including onlyCountries, excludeCountries, countryOrder options.
1724
1811
  _processCountryData() {
1725
- this._processAllCountries(), this._processDialCodes(), this._translateCountryNames(), this._sortCountries(), this.countryByIso2 = new Map(this.countries.map((e) => [e.iso2, e])), this._cacheSearchTokens();
1726
- }
1727
- //* Precompute and cache country search tokens to speed up filtering
1728
- _cacheSearchTokens() {
1729
- for (const e of this.countries)
1730
- e.normalisedName = u2(e.name), e.initials = e.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((i) => i[0]).join("").toLowerCase(), e.dialCodePlus = `+${e.dialCode}`;
1731
- }
1732
- //* Sort countries by countryOrder option (if present), then name.
1733
- _sortCountries() {
1734
- this.options.countryOrder && (this.options.countryOrder = this.options.countryOrder.map((e) => e.toLowerCase())), this.countries.sort((e, i) => {
1735
- const { countryOrder: n } = this.options;
1736
- if (n) {
1737
- const o = n.indexOf(e.iso2), l = n.indexOf(i.iso2), f = o > -1, h = l > -1;
1738
- if (f || h)
1739
- return f && h ? o - l : f ? -1 : 1;
1740
- }
1741
- return e.name.localeCompare(i.name);
1742
- });
1743
- }
1744
- //* Add a dial code to this.dialCodeToIso2Map.
1745
- _addToDialCodeMap(e, i, n) {
1746
- if (!e || !i)
1747
- return;
1748
- i.length > this.dialCodeMaxLen && (this.dialCodeMaxLen = i.length), this.dialCodeToIso2Map.hasOwnProperty(i) || (this.dialCodeToIso2Map[i] = []);
1749
- const o = this.dialCodeToIso2Map[i];
1750
- if (o.includes(e))
1751
- return;
1752
- const l = n !== void 0 ? n : o.length;
1753
- o[l] = e;
1754
- }
1755
- //* Process onlyCountries or excludeCountries array if present.
1756
- _processAllCountries() {
1757
- const { onlyCountries: e, excludeCountries: i } = this.options;
1758
- if (e.length) {
1759
- const n = e.map(
1760
- (o) => o.toLowerCase()
1761
- );
1762
- this.countries = q.filter(
1763
- (o) => n.includes(o.iso2)
1764
- );
1765
- } else if (i.length) {
1766
- const n = i.map(
1767
- (o) => o.toLowerCase()
1768
- );
1769
- this.countries = q.filter(
1770
- (o) => !n.includes(o.iso2)
1771
- );
1772
- } else
1773
- this.countries = q;
1774
- }
1775
- //* Translate Countries by object literal provided on config.
1776
- _translateCountryNames() {
1777
- for (const e of this.countries) {
1778
- const i = e.iso2.toLowerCase();
1779
- this.options.i18n.hasOwnProperty(i) && (e.name = this.options.i18n[i]);
1780
- }
1781
- }
1782
- //* Generate this.dialCodes and this.dialCodeToIso2Map.
1783
- _processDialCodes() {
1784
- this.dialCodes = /* @__PURE__ */ new Set(), this.dialCodeMaxLen = 0, this.dialCodeToIso2Map = {};
1785
- for (const e of this.countries)
1786
- this.dialCodes.has(e.dialCode) || this.dialCodes.add(e.dialCode), this._addToDialCodeMap(e.iso2, e.dialCode, e.priority);
1787
- (this.options.onlyCountries.length || this.options.excludeCountries.length) && this.dialCodes.forEach((e) => {
1788
- this.dialCodeToIso2Map[e] = this.dialCodeToIso2Map[e].filter(Boolean);
1789
- });
1790
- for (const e of this.countries)
1791
- if (e.areaCodes) {
1792
- const i = this.dialCodeToIso2Map[e.dialCode][0];
1793
- for (const n of e.areaCodes) {
1794
- for (let o = 1; o < n.length; o++) {
1795
- const l = n.substring(0, o), f = e.dialCode + l;
1796
- this._addToDialCodeMap(i, f), this._addToDialCodeMap(e.iso2, f);
1797
- }
1798
- this._addToDialCodeMap(e.iso2, e.dialCode + n);
1799
- }
1800
- }
1812
+ this.countries = z2(this.options);
1813
+ const e = Y2(this.countries, this.options);
1814
+ this.dialCodes = e.dialCodes, this.dialCodeMaxLen = e.dialCodeMaxLen, this.dialCodeToIso2Map = e.dialCodeToIso2Map, Z2(this.countries, this.options), J2(this.countries, this.options), this.countryByIso2 = new Map(this.countries.map(($) => [$.iso2, $])), q2(this.countries);
1801
1815
  }
1802
1816
  //* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
1803
1817
  _generateMarkup() {
1804
- var S, A, G;
1818
+ this._prepareTelInput();
1819
+ const e = this._createWrapperAndInsert();
1820
+ this._maybeBuildCountryContainer(e), e.appendChild(this.telInput), this._maybeUpdateInputPaddingAndReveal(), this._maybeBuildHiddenInputs(e);
1821
+ }
1822
+ _prepareTelInput() {
1805
1823
  this.telInput.classList.add("iti__tel-input"), !this.telInput.hasAttribute("autocomplete") && !(this.telInput.form && this.telInput.form.hasAttribute("autocomplete")) && this.telInput.setAttribute("autocomplete", "off");
1824
+ }
1825
+ _createWrapperAndInsert() {
1826
+ var c;
1806
1827
  const {
1807
1828
  allowDropdown: e,
1808
- separateDialCode: i,
1809
- showFlags: n,
1810
- containerClass: o,
1811
- hiddenInput: l,
1812
- dropdownContainer: f,
1813
- fixDropdownWidth: h,
1814
- useFullscreenPopup: C,
1815
- countrySearch: I,
1816
- i18n: v
1817
- } = this.options, g = g1._buildClassNames({
1829
+ showFlags: $,
1830
+ containerClass: i,
1831
+ useFullscreenPopup: s
1832
+ } = this.options, u = c1._buildClassNames({
1818
1833
  iti: !0,
1819
1834
  "iti--allow-dropdown": e,
1820
- "iti--show-flags": n,
1821
- "iti--inline-dropdown": !C,
1822
- [o]: !!o
1823
- }), w = T("div", { class: g });
1824
- if ((S = this.telInput.parentNode) == null || S.insertBefore(w, this.telInput), e || n || i) {
1825
- this.countryContainer = T(
1835
+ "iti--show-flags": $,
1836
+ "iti--inline-dropdown": !s,
1837
+ [i]: !!i
1838
+ }), h = L("div", { class: u });
1839
+ return (c = this.telInput.parentNode) == null || c.insertBefore(h, this.telInput), h;
1840
+ }
1841
+ _maybeBuildCountryContainer(e) {
1842
+ const {
1843
+ allowDropdown: $,
1844
+ separateDialCode: i,
1845
+ showFlags: s
1846
+ } = this.options;
1847
+ if ($ || s || i) {
1848
+ this.countryContainer = L(
1826
1849
  "div",
1827
1850
  // visibly hidden until we measure it's width to set the input padding correctly
1828
1851
  { class: "iti__country-container iti__v-hide" },
1829
- w
1830
- ), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", e ? (this.selectedCountry = T(
1852
+ e
1853
+ ), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", $ ? (this.selectedCountry = L(
1831
1854
  "button",
1832
1855
  {
1833
1856
  type: "button",
@@ -1838,174 +1861,189 @@ class g1 {
1838
1861
  "aria-controls": `iti-${this.id}__dropdown-content`
1839
1862
  },
1840
1863
  this.countryContainer
1841
- ), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = T(
1864
+ ), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = L(
1842
1865
  "div",
1843
1866
  { class: "iti__selected-country" },
1844
1867
  this.countryContainer
1845
1868
  );
1846
- const x = T(
1869
+ const u = L(
1847
1870
  "div",
1848
1871
  { class: "iti__selected-country-primary" },
1849
1872
  this.selectedCountry
1850
1873
  );
1851
- if (this.selectedCountryInner = T(
1874
+ this.selectedCountryInner = L(
1852
1875
  "div",
1853
1876
  { class: "iti__flag" },
1854
- x
1855
- ), e && (this.dropdownArrow = T(
1877
+ u
1878
+ ), $ && (this.dropdownArrow = L(
1856
1879
  "div",
1857
1880
  { class: "iti__arrow", "aria-hidden": "true" },
1858
- x
1859
- )), i && (this.selectedDialCode = T(
1881
+ u
1882
+ )), i && (this.selectedDialCode = L(
1860
1883
  "div",
1861
1884
  { class: "iti__selected-dial-code", dir: "ltr" },
1862
1885
  this.selectedCountry
1863
- )), e) {
1864
- const R = h ? "" : "iti--flexible-dropdown-width";
1865
- if (this.dropdownContent = T("div", {
1866
- id: `iti-${this.id}__dropdown-content`,
1867
- class: `iti__dropdown-content iti__hide ${R}`,
1868
- role: "dialog",
1869
- "aria-modal": "true"
1870
- }), I) {
1871
- const N = T(
1872
- "div",
1873
- { class: "iti__search-input-wrapper" },
1874
- this.dropdownContent
1875
- );
1876
- this.searchIcon = T(
1877
- "span",
1878
- {
1879
- class: "iti__search-icon",
1880
- "aria-hidden": "true"
1881
- },
1882
- N
1883
- ), this.searchIcon.innerHTML = `
1884
- <svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" aria-hidden="true">
1885
- <circle cx="11" cy="11" r="7" />
1886
- <line x1="21" y1="21" x2="16.65" y2="16.65" />
1887
- </svg>`, this.searchInput = T(
1888
- "input",
1889
- {
1890
- id: `iti-${this.id}__search-input`,
1891
- // Chrome says inputs need either a name or an id
1892
- type: "search",
1893
- class: "iti__search-input",
1894
- placeholder: v.searchPlaceholder,
1895
- // 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
1896
- role: "combobox",
1897
- "aria-expanded": "true",
1898
- "aria-label": v.searchPlaceholder,
1899
- "aria-controls": `iti-${this.id}__country-listbox`,
1900
- "aria-autocomplete": "list",
1901
- autocomplete: "off"
1902
- },
1903
- N
1904
- ), this.searchClearButton = T(
1905
- "button",
1906
- {
1907
- type: "button",
1908
- class: "iti__search-clear iti__hide",
1909
- "aria-label": v.clearSearchAriaLabel,
1910
- tabindex: "-1"
1911
- },
1912
- N
1913
- );
1914
- const W = `iti-${this.id}-clear-mask`;
1915
- this.searchClearButton.innerHTML = `
1916
- <svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" aria-hidden="true" focusable="false">
1917
- <mask id="${W}" maskUnits="userSpaceOnUse">
1918
- <rect width="16" height="16" fill="white" />
1919
- <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" />
1920
- </mask>
1921
- <circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${W})" />
1922
- </svg>`, this.searchResultsA11yText = T(
1923
- "span",
1924
- { class: "iti__a11y-text" },
1925
- this.dropdownContent
1926
- ), this.searchNoResults = T(
1927
- "div",
1928
- {
1929
- class: "iti__no-results iti__hide",
1930
- "aria-hidden": "true"
1931
- // all a11y messaging happens in this.searchResultsA11yText
1932
- },
1933
- this.dropdownContent
1934
- ), this.searchNoResults.textContent = v.zeroSearchResults;
1935
- }
1936
- if (this.countryList = T(
1937
- "ul",
1938
- {
1939
- class: "iti__country-list",
1940
- id: `iti-${this.id}__country-listbox`,
1941
- role: "listbox",
1942
- "aria-label": v.countryListAriaLabel
1943
- },
1944
- this.dropdownContent
1945
- ), this._appendListItems(), I && this._updateSearchResultsA11yText(), f) {
1946
- const N = g1._buildClassNames({
1947
- iti: !0,
1948
- "iti--container": !0,
1949
- "iti--fullscreen-popup": C,
1950
- "iti--inline-dropdown": !C,
1951
- [o]: !!o
1952
- });
1953
- this.dropdown = T("div", { class: N }), this.dropdown.appendChild(this.dropdownContent);
1954
- } else
1955
- this.countryContainer.appendChild(this.dropdownContent);
1956
- }
1886
+ )), $ && this._buildDropdownContent();
1957
1887
  }
1958
- if (w.appendChild(this.telInput), this.countryContainer && (this._updateInputPadding(), this.countryContainer.classList.remove("iti__v-hide")), l) {
1959
- const x = this.telInput.getAttribute("name") || "", R = l(x);
1960
- if (R.phone) {
1961
- const N = (A = this.telInput.form) == null ? void 0 : A.querySelector(`input[name="${R.phone}"]`);
1962
- N ? this.hiddenInput = N : (this.hiddenInput = T("input", {
1888
+ }
1889
+ _buildDropdownContent() {
1890
+ const {
1891
+ fixDropdownWidth: e,
1892
+ useFullscreenPopup: $,
1893
+ countrySearch: i,
1894
+ i18n: s,
1895
+ dropdownContainer: u,
1896
+ containerClass: h
1897
+ } = this.options, c = e ? "" : "iti--flexible-dropdown-width";
1898
+ if (this.dropdownContent = L("div", {
1899
+ id: `iti-${this.id}__dropdown-content`,
1900
+ class: `iti__dropdown-content iti__hide ${c}`,
1901
+ role: "dialog",
1902
+ "aria-modal": "true"
1903
+ }), i && this._buildSearchUI(), this.countryList = L(
1904
+ "ul",
1905
+ {
1906
+ class: "iti__country-list",
1907
+ id: `iti-${this.id}__country-listbox`,
1908
+ role: "listbox",
1909
+ "aria-label": s.countryListAriaLabel
1910
+ },
1911
+ this.dropdownContent
1912
+ ), this._appendListItems(), i && this._updateSearchResultsA11yText(), u) {
1913
+ const C = c1._buildClassNames({
1914
+ iti: !0,
1915
+ "iti--container": !0,
1916
+ "iti--fullscreen-popup": $,
1917
+ "iti--inline-dropdown": !$,
1918
+ [h]: !!h
1919
+ });
1920
+ this.dropdown = L("div", { class: C }), this.dropdown.appendChild(this.dropdownContent);
1921
+ } else
1922
+ this.countryContainer.appendChild(this.dropdownContent);
1923
+ }
1924
+ _buildSearchUI() {
1925
+ const { i18n: e } = this.options, $ = L(
1926
+ "div",
1927
+ { class: "iti__search-input-wrapper" },
1928
+ this.dropdownContent
1929
+ );
1930
+ this.searchIcon = L(
1931
+ "span",
1932
+ {
1933
+ class: "iti__search-icon",
1934
+ "aria-hidden": "true"
1935
+ },
1936
+ $
1937
+ ), this.searchIcon.innerHTML = `
1938
+ <svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" aria-hidden="true">
1939
+ <circle cx="11" cy="11" r="7" />
1940
+ <line x1="21" y1="21" x2="16.65" y2="16.65" />
1941
+ </svg>`, this.searchInput = L(
1942
+ "input",
1943
+ {
1944
+ id: `iti-${this.id}__search-input`,
1945
+ // Chrome says inputs need either a name or an id
1946
+ type: "search",
1947
+ class: "iti__search-input",
1948
+ placeholder: e.searchPlaceholder,
1949
+ // 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
1950
+ role: "combobox",
1951
+ "aria-expanded": "true",
1952
+ "aria-label": e.searchPlaceholder,
1953
+ "aria-controls": `iti-${this.id}__country-listbox`,
1954
+ "aria-autocomplete": "list",
1955
+ autocomplete: "off"
1956
+ },
1957
+ $
1958
+ ), this.searchClearButton = L(
1959
+ "button",
1960
+ {
1961
+ type: "button",
1962
+ class: "iti__search-clear iti__hide",
1963
+ "aria-label": e.clearSearchAriaLabel,
1964
+ tabindex: "-1"
1965
+ },
1966
+ $
1967
+ );
1968
+ const i = `iti-${this.id}-clear-mask`;
1969
+ this.searchClearButton.innerHTML = `
1970
+ <svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" aria-hidden="true" focusable="false">
1971
+ <mask id="${i}" maskUnits="userSpaceOnUse">
1972
+ <rect width="16" height="16" fill="white" />
1973
+ <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" />
1974
+ </mask>
1975
+ <circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${i})" />
1976
+ </svg>`, this.searchResultsA11yText = L(
1977
+ "span",
1978
+ { class: "iti__a11y-text" },
1979
+ this.dropdownContent
1980
+ ), this.searchNoResults = L(
1981
+ "div",
1982
+ {
1983
+ class: "iti__no-results iti__hide",
1984
+ "aria-hidden": "true"
1985
+ // all a11y messaging happens in this.searchResultsA11yText
1986
+ },
1987
+ this.dropdownContent
1988
+ ), this.searchNoResults.textContent = e.zeroSearchResults;
1989
+ }
1990
+ _maybeUpdateInputPaddingAndReveal() {
1991
+ this.countryContainer && (this._updateInputPadding(), this.countryContainer.classList.remove("iti__v-hide"));
1992
+ }
1993
+ _maybeBuildHiddenInputs(e) {
1994
+ var i, s;
1995
+ const { hiddenInput: $ } = this.options;
1996
+ if ($) {
1997
+ const u = this.telInput.getAttribute("name") || "", h = $(u);
1998
+ if (h.phone) {
1999
+ const c = (i = this.telInput.form) == null ? void 0 : i.querySelector(`input[name="${h.phone}"]`);
2000
+ c ? this.hiddenInput = c : (this.hiddenInput = L("input", {
1963
2001
  type: "hidden",
1964
- name: R.phone
1965
- }), w.appendChild(this.hiddenInput));
2002
+ name: h.phone
2003
+ }), e.appendChild(this.hiddenInput));
1966
2004
  }
1967
- if (R.country) {
1968
- const N = (G = this.telInput.form) == null ? void 0 : G.querySelector(`input[name="${R.country}"]`);
1969
- N ? this.hiddenInputCountry = N : (this.hiddenInputCountry = T("input", {
2005
+ if (h.country) {
2006
+ const c = (s = this.telInput.form) == null ? void 0 : s.querySelector(`input[name="${h.country}"]`);
2007
+ c ? this.hiddenInputCountry = c : (this.hiddenInputCountry = L("input", {
1970
2008
  type: "hidden",
1971
- name: R.country
1972
- }), w.appendChild(this.hiddenInputCountry));
2009
+ name: h.country
2010
+ }), e.appendChild(this.hiddenInputCountry));
1973
2011
  }
1974
2012
  }
1975
2013
  }
1976
2014
  //* For each country: add a country list item <li> to the countryList <ul> container.
1977
2015
  _appendListItems() {
1978
2016
  for (let e = 0; e < this.countries.length; e++) {
1979
- const i = this.countries[e], n = e === 0 ? "iti__highlight" : "", o = T(
2017
+ const $ = this.countries[e], i = e === 0 ? "iti__highlight" : "", s = L(
1980
2018
  "li",
1981
2019
  {
1982
- id: `iti-${this.id}__item-${i.iso2}`,
1983
- class: `iti__country ${n}`,
2020
+ id: `iti-${this.id}__item-${$.iso2}`,
2021
+ class: `iti__country ${i}`,
1984
2022
  tabindex: "-1",
1985
2023
  role: "option",
1986
- "data-dial-code": i.dialCode,
1987
- "data-country-code": i.iso2,
2024
+ "data-dial-code": $.dialCode,
2025
+ "data-country-code": $.iso2,
1988
2026
  "aria-selected": "false"
1989
2027
  },
1990
2028
  this.countryList
1991
2029
  );
1992
- i.nodeById[this.id] = o;
1993
- let l = "";
1994
- this.options.showFlags && (l += `<div class='iti__flag iti__${i.iso2}'></div>`), l += `<span class='iti__country-name'>${i.name}</span>`, l += `<span class='iti__dial-code' dir='ltr'>+${i.dialCode}</span>`, o.insertAdjacentHTML("beforeend", l);
2030
+ $.nodeById[this.id] = s;
2031
+ let u = "";
2032
+ this.options.showFlags && (u += `<div class='iti__flag iti__${$.iso2}'></div>`), u += `<span class='iti__country-name'>${$.name}</span>`, u += `<span class='iti__dial-code' dir='ltr'>+${$.dialCode}</span>`, s.insertAdjacentHTML("beforeend", u);
1995
2033
  }
1996
2034
  }
1997
2035
  //* Set the initial state of the input value and the selected country by:
1998
2036
  //* 1. Extracting a dial code from the given number
1999
2037
  //* 2. Using explicit initialCountry
2000
2038
  _setInitialState(e = !1) {
2001
- const i = this.telInput.getAttribute("value"), n = this.telInput.value, l = i && i.charAt(0) === "+" && (!n || n.charAt(0) !== "+") ? i : n, f = this._getDialCode(l), h = l2(l), { initialCountry: C, geoIpLookup: I } = this.options, v = C === "auto" && I;
2002
- if (f && !h)
2003
- this._updateCountryFromNumber(l);
2004
- else if (!v || e) {
2005
- const g = C ? C.toLowerCase() : "";
2006
- g && this._getCountryData(g, !0) ? this._setCountry(g) : f && h ? this._setCountry("us") : this._setCountry();
2039
+ const $ = this.telInput.getAttribute("value"), i = this.telInput.value, u = $ && $.charAt(0) === "+" && (!i || i.charAt(0) !== "+") ? $ : i, h = this._getDialCode(u), c = o2(u), { initialCountry: C, geoIpLookup: g } = this.options, I = C === "auto" && g;
2040
+ if (h && !c)
2041
+ this._updateCountryFromNumber(u);
2042
+ else if (!I || e) {
2043
+ const S = C ? C.toLowerCase() : "";
2044
+ w1(S) ? this._setCountry(S) : h && c ? this._setCountry("us") : this._setCountry("");
2007
2045
  }
2008
- l && this._updateValFromNumber(l);
2046
+ u && this._updateValFromNumber(u);
2009
2047
  }
2010
2048
  //* Initialise the main event listeners: input keyup, and click selected country.
2011
2049
  _initListeners() {
@@ -2023,14 +2061,14 @@ class g1 {
2023
2061
  }
2024
2062
  //* initialise the dropdown listeners.
2025
2063
  _initDropdownListeners() {
2026
- this._handleLabelClick = (i) => {
2027
- this.dropdownContent.classList.contains("iti__hide") ? this.telInput.focus() : i.preventDefault();
2064
+ this._handleLabelClick = ($) => {
2065
+ this.dropdownContent.classList.contains("iti__hide") ? this.telInput.focus() : $.preventDefault();
2028
2066
  };
2029
2067
  const e = this.telInput.closest("label");
2030
2068
  e && e.addEventListener("click", this._handleLabelClick), this._handleClickSelectedCountry = () => {
2031
2069
  this.dropdownContent.classList.contains("iti__hide") && !this.telInput.disabled && !this.telInput.readOnly && this._openDropdown();
2032
- }, this.selectedCountry.addEventListener("click", this._handleClickSelectedCountry), this._handleCountryContainerKeydown = (i) => {
2033
- this.dropdownContent.classList.contains("iti__hide") && ["ArrowUp", "ArrowDown", " ", "Enter"].includes(i.key) && (i.preventDefault(), i.stopPropagation(), this._openDropdown()), i.key === "Tab" && this._closeDropdown();
2070
+ }, this.selectedCountry.addEventListener("click", this._handleClickSelectedCountry), this._handleCountryContainerKeydown = ($) => {
2071
+ this.dropdownContent.classList.contains("iti__hide") && ["ArrowUp", "ArrowDown", " ", "Enter"].includes($.key) && ($.preventDefault(), $.stopPropagation(), this._openDropdown()), $.key === "Tab" && this._closeDropdown();
2034
2072
  }, this.countryContainer.addEventListener(
2035
2073
  "keydown",
2036
2074
  this._handleCountryContainerKeydown
@@ -2038,22 +2076,22 @@ class g1 {
2038
2076
  }
2039
2077
  //* Init many requests: utils script / geo ip lookup.
2040
2078
  _initRequests() {
2041
- let { loadUtils: e, initialCountry: i, geoIpLookup: n } = this.options;
2042
- e && !m.utils ? (this._handlePageLoad = () => {
2043
- var l;
2044
- window.removeEventListener("load", this._handlePageLoad), (l = m.attachUtils(e)) == null || l.catch(() => {
2079
+ let { loadUtils: e, initialCountry: $, geoIpLookup: i } = this.options;
2080
+ e && !y.utils ? (this._handlePageLoad = () => {
2081
+ var u;
2082
+ window.removeEventListener("load", this._handlePageLoad), (u = y.attachUtils(e)) == null || u.catch(() => {
2045
2083
  });
2046
- }, m.documentReady() ? this._handlePageLoad() : window.addEventListener("load", this._handlePageLoad)) : this.resolveUtilsScriptPromise(), i === "auto" && n && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
2084
+ }, y.documentReady() ? this._handlePageLoad() : window.addEventListener("load", this._handlePageLoad)) : this.resolveUtilsScriptPromise(), $ === "auto" && i && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
2047
2085
  }
2048
2086
  //* Perform the geo ip lookup.
2049
2087
  _loadAutoCountry() {
2050
- m.autoCountry ? this.handleAutoCountry() : m.startedLoadingAutoCountry || (m.startedLoadingAutoCountry = !0, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(
2088
+ y.autoCountry ? this.handleAutoCountry() : y.startedLoadingAutoCountry || (y.startedLoadingAutoCountry = !0, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(
2051
2089
  (e = "") => {
2052
- const i = e.toLowerCase();
2053
- i && this._getCountryData(i, !0) ? (m.autoCountry = i, setTimeout(() => i1("handleAutoCountry"))) : (this._setInitialState(!0), i1("rejectAutoCountryPromise"));
2090
+ const $ = e.toLowerCase();
2091
+ w1($) ? (y.autoCountry = $, setTimeout(() => e1("handleAutoCountry"))) : (this._setInitialState(!0), e1("rejectAutoCountryPromise"));
2054
2092
  },
2055
2093
  () => {
2056
- this._setInitialState(!0), i1("rejectAutoCountryPromise");
2094
+ this._setInitialState(!0), e1("rejectAutoCountryPromise");
2057
2095
  }
2058
2096
  ));
2059
2097
  }
@@ -2062,167 +2100,184 @@ class g1 {
2062
2100
  }
2063
2101
  //* Initialize the tel input listeners.
2064
2102
  _initTelInputListeners() {
2065
- const { strictMode: e, formatAsYouType: i, separateDialCode: n, allowDropdown: o, countrySearch: l } = this.options;
2066
- let f = !1;
2067
- new RegExp("\\p{L}", "u").test(this.telInput.value) && (f = !0), this._handleInputEvent = (h) => {
2068
- if (this.isAndroid && (h == null ? void 0 : h.data) === "+" && n && o && l) {
2069
- const g = this.telInput.selectionStart || 0, w = this.telInput.value.substring(0, g - 1), S = this.telInput.value.substring(g);
2070
- this.telInput.value = w + S, this._openDropdownWithPlus();
2103
+ this._bindInputListener(), this._maybeBindKeydownListener(), this._maybeBindPasteListener();
2104
+ }
2105
+ _bindInputListener() {
2106
+ const { strictMode: e, formatAsYouType: $, separateDialCode: i, allowDropdown: s, countrySearch: u } = this.options;
2107
+ let h = !1;
2108
+ new RegExp("\\p{L}", "u").test(this.telInput.value) && (h = !0), this._handleInputEvent = (c) => {
2109
+ if (this.isAndroid && (c == null ? void 0 : c.data) === "+" && i && s && u) {
2110
+ const S = this.telInput.selectionStart || 0, R = this.telInput.value.substring(0, S - 1), v = this.telInput.value.substring(S);
2111
+ this.telInput.value = R + v, this._openDropdownWithPlus();
2071
2112
  return;
2072
2113
  }
2073
2114
  this._updateCountryFromNumber(this.telInput.value) && this._triggerCountryChange();
2074
- const C = (h == null ? void 0 : h.data) && /[^+0-9]/.test(h.data), I = (h == null ? void 0 : h.inputType) === "insertFromPaste" && this.telInput.value;
2075
- C || I && !e ? f = !0 : /[^+0-9]/.test(this.telInput.value) || (f = !1);
2076
- const v = (h == null ? void 0 : h.detail) && h.detail.isSetNumber;
2077
- if (i && !f && !v) {
2078
- const g = this.telInput.selectionStart || 0, S = this.telInput.value.substring(0, g).replace(/[^+0-9]/g, "").length, A = (h == null ? void 0 : h.inputType) === "deleteContentForward", G = this._formatNumberAsYouType(), x = z2(S, G, g, A);
2079
- this.telInput.value = G, this.telInput.setSelectionRange(x, x);
2115
+ const C = (c == null ? void 0 : c.data) && /[^+0-9]/.test(c.data), g = (c == null ? void 0 : c.inputType) === "insertFromPaste" && this.telInput.value;
2116
+ C || g && !e ? h = !0 : /[^+0-9]/.test(this.telInput.value) || (h = !1);
2117
+ const I = (c == null ? void 0 : c.detail) && c.detail.isSetNumber;
2118
+ if ($ && !h && !I) {
2119
+ const S = this.telInput.selectionStart || 0, v = this.telInput.value.substring(0, S).replace(/[^+0-9]/g, "").length, D = (c == null ? void 0 : c.inputType) === "deleteContentForward", A = this._getFullNumber(), k = Q2(
2120
+ A,
2121
+ this.telInput.value,
2122
+ y.utils,
2123
+ this.selectedCountryData,
2124
+ this.options.separateDialCode
2125
+ ), H = d0(v, k, S, D);
2126
+ this.telInput.value = k, this.telInput.setSelectionRange(H, H);
2080
2127
  }
2081
- }, this.telInput.addEventListener("input", this._handleInputEvent), (e || n) && (this._handleKeydownEvent = (h) => {
2082
- if (h.key && h.key.length === 1 && !h.altKey && !h.ctrlKey && !h.metaKey) {
2083
- if (n && o && l && h.key === "+") {
2084
- h.preventDefault(), this._openDropdownWithPlus();
2128
+ }, this.telInput.addEventListener("input", this._handleInputEvent);
2129
+ }
2130
+ _maybeBindKeydownListener() {
2131
+ const { strictMode: e, separateDialCode: $, allowDropdown: i, countrySearch: s } = this.options;
2132
+ (e || $) && (this._handleKeydownEvent = (u) => {
2133
+ if (u.key && u.key.length === 1 && !u.altKey && !u.ctrlKey && !u.metaKey) {
2134
+ if ($ && i && s && u.key === "+") {
2135
+ u.preventDefault(), this._openDropdownWithPlus();
2085
2136
  return;
2086
2137
  }
2087
2138
  if (e) {
2088
- const C = this.telInput.value, v = !(C.charAt(0) === "+") && this.telInput.selectionStart === 0 && h.key === "+", g = /^[0-9]$/.test(h.key), w = n ? g : v || g, S = C.slice(0, this.telInput.selectionStart) + h.key + C.slice(this.telInput.selectionEnd), A = this._getFullNumber(S), G = m.utils.getCoreNumber(A, this.selectedCountryData.iso2), x = this.maxCoreNumberLength && G.length > this.maxCoreNumberLength, N = this._getNewCountryFromNumber(A) !== null;
2089
- (!w || x && !N && !v) && h.preventDefault();
2139
+ const h = this.telInput.value, C = !(h.charAt(0) === "+") && this.telInput.selectionStart === 0 && u.key === "+", g = /^[0-9]$/.test(u.key), I = $ ? g : C || g, S = h.slice(0, this.telInput.selectionStart) + u.key + h.slice(this.telInput.selectionEnd), R = this._getFullNumber(S), v = y.utils.getCoreNumber(R, this.selectedCountryData.iso2), D = this.maxCoreNumberLength && v.length > this.maxCoreNumberLength, k = this._getNewCountryFromNumber(R) !== null;
2140
+ (!I || D && !k && !C) && u.preventDefault();
2090
2141
  }
2091
2142
  }
2092
- }, this.telInput.addEventListener("keydown", this._handleKeydownEvent)), e && (this._handlePasteEvent = (h) => {
2093
- h.preventDefault();
2094
- const C = this.telInput, I = C.selectionStart, v = C.selectionEnd, g = h.clipboardData.getData("text"), w = I === 0 && v > 0, S = !C.value.startsWith("+") || w, A = g.replace(/[^0-9+]/g, ""), G = A.startsWith("+"), x = A.replace(/\+/g, ""), R = G && S ? `+${x}` : x;
2095
- let N = C.value.slice(0, I) + R + C.value.slice(v);
2096
- const W = m.utils.getCoreNumber(N, this.selectedCountryData.iso2);
2097
- if (this.maxCoreNumberLength && W.length > this.maxCoreNumberLength)
2098
- if (C.selectionEnd === C.value.length) {
2099
- const C1 = W.length - this.maxCoreNumberLength;
2100
- N = N.slice(0, N.length - C1);
2143
+ }, this.telInput.addEventListener("keydown", this._handleKeydownEvent));
2144
+ }
2145
+ _maybeBindPasteListener() {
2146
+ this.options.strictMode && (this._handlePasteEvent = (e) => {
2147
+ e.preventDefault();
2148
+ const $ = this.telInput, i = $.selectionStart, s = $.selectionEnd, u = $.value.slice(0, i), h = $.value.slice(s), c = this.selectedCountryData.iso2, C = e.clipboardData.getData("text"), g = i === 0 && s > 0, I = !$.value.startsWith("+") || g, S = C.replace(/[^0-9+]/g, ""), R = S.startsWith("+"), v = S.replace(/\+/g, ""), D = R && I ? `+${v}` : v;
2149
+ let A = u + D + h, k = y.utils.getCoreNumber(A, c);
2150
+ for (; k.length === 0 && A.length > 0; )
2151
+ A = A.slice(0, -1), k = y.utils.getCoreNumber(A, c);
2152
+ if (!k)
2153
+ return;
2154
+ if (this.maxCoreNumberLength && k.length > this.maxCoreNumberLength)
2155
+ if ($.selectionEnd === $.value.length) {
2156
+ const f1 = k.length - this.maxCoreNumberLength;
2157
+ A = A.slice(0, A.length - f1);
2101
2158
  } else
2102
2159
  return;
2103
- C.value = N;
2104
- const n1 = I + R.length;
2105
- C.setSelectionRange(n1, n1), C.dispatchEvent(new InputEvent("input", { bubbles: !0 }));
2160
+ $.value = A;
2161
+ const H = i + D.length;
2162
+ $.setSelectionRange(H, H), $.dispatchEvent(new InputEvent("input", { bubbles: !0 }));
2106
2163
  }, this.telInput.addEventListener("paste", this._handlePasteEvent));
2107
2164
  }
2108
2165
  //* Adhere to the input's maxlength attr.
2109
2166
  _cap(e) {
2110
- const i = parseInt(this.telInput.getAttribute("maxlength") || "", 10);
2111
- return i && e.length > i ? e.substring(0, i) : e;
2167
+ const $ = parseInt(this.telInput.getAttribute("maxlength") || "", 10);
2168
+ return $ && e.length > $ ? e.substring(0, $) : e;
2112
2169
  }
2113
2170
  //* Trigger a custom event on the input.
2114
- _trigger(e, i = {}) {
2115
- const n = new CustomEvent(e, {
2171
+ _trigger(e, $ = {}) {
2172
+ const i = new CustomEvent(e, {
2116
2173
  bubbles: !0,
2117
2174
  cancelable: !0,
2118
- detail: i
2175
+ detail: $
2119
2176
  });
2120
- this.telInput.dispatchEvent(n);
2177
+ this.telInput.dispatchEvent(i);
2121
2178
  }
2122
2179
  //* Open the dropdown.
2123
2180
  _openDropdown() {
2124
- const { fixDropdownWidth: e, countrySearch: i } = this.options;
2125
- if (e && (this.dropdownContent.style.width = `${this.telInput.offsetWidth}px`), this.dropdownContent.classList.remove("iti__hide"), this.selectedCountry.setAttribute("aria-expanded", "true"), this._setDropdownPosition(), i) {
2126
- const n = this.countryList.firstElementChild;
2127
- n && (this._highlightListItem(n, !1), this.countryList.scrollTop = 0), this.searchInput.focus();
2181
+ const { fixDropdownWidth: e, countrySearch: $ } = this.options;
2182
+ if (e && (this.dropdownContent.style.width = `${this.telInput.offsetWidth}px`), this.dropdownContent.classList.remove("iti__hide"), this.selectedCountry.setAttribute("aria-expanded", "true"), this._setDropdownPosition(), $) {
2183
+ const i = this.countryList.firstElementChild;
2184
+ i && (this._highlightListItem(i, !1), this.countryList.scrollTop = 0), this.searchInput.focus();
2128
2185
  }
2129
2186
  this._bindDropdownListeners(), this.dropdownArrow.classList.add("iti__arrow--up"), this._trigger("open:countrydropdown");
2130
2187
  }
2131
2188
  //* Set the dropdown position
2132
2189
  _setDropdownPosition() {
2133
2190
  if (this.options.dropdownContainer && this.options.dropdownContainer.appendChild(this.dropdown), !this.options.useFullscreenPopup) {
2134
- const e = this.telInput.getBoundingClientRect(), i = this.telInput.offsetHeight;
2135
- this.options.dropdownContainer && (this.dropdown.style.top = `${e.top + i}px`, this.dropdown.style.left = `${e.left}px`, this._handleWindowScroll = () => this._closeDropdown(), window.addEventListener("scroll", this._handleWindowScroll));
2191
+ const e = this.telInput.getBoundingClientRect(), $ = this.telInput.offsetHeight;
2192
+ this.options.dropdownContainer && (this.dropdown.style.top = `${e.top + $}px`, this.dropdown.style.left = `${e.left}px`, this._handleWindowScroll = () => this._closeDropdown(), window.addEventListener("scroll", this._handleWindowScroll));
2136
2193
  }
2137
2194
  }
2138
2195
  //* We only bind dropdown listeners when the dropdown is open.
2139
2196
  _bindDropdownListeners() {
2140
- this._handleMouseoverCountryList = (n) => {
2141
- var l;
2142
- const o = (l = n.target) == null ? void 0 : l.closest(".iti__country");
2143
- o && this._highlightListItem(o, !1);
2197
+ this._handleMouseoverCountryList = (i) => {
2198
+ var u;
2199
+ const s = (u = i.target) == null ? void 0 : u.closest(".iti__country");
2200
+ s && this._highlightListItem(s, !1);
2144
2201
  }, this.countryList.addEventListener(
2145
2202
  "mouseover",
2146
2203
  this._handleMouseoverCountryList
2147
- ), this._handleClickCountryList = (n) => {
2148
- var l;
2149
- const o = (l = n.target) == null ? void 0 : l.closest(".iti__country");
2150
- o && this._selectListItem(o);
2151
- }, this.countryList.addEventListener("click", this._handleClickCountryList), this._handleClickOffToClose = (n) => {
2152
- !!n.target.closest(`#iti-${this.id}__dropdown-content`) || this._closeDropdown();
2204
+ ), this._handleClickCountryList = (i) => {
2205
+ var u;
2206
+ const s = (u = i.target) == null ? void 0 : u.closest(".iti__country");
2207
+ s && this._selectListItem(s);
2208
+ }, this.countryList.addEventListener("click", this._handleClickCountryList), this._handleClickOffToClose = (i) => {
2209
+ !!i.target.closest(`#iti-${this.id}__dropdown-content`) || this._closeDropdown();
2153
2210
  }, setTimeout(() => {
2154
2211
  document.documentElement.addEventListener(
2155
2212
  "click",
2156
2213
  this._handleClickOffToClose
2157
2214
  );
2158
2215
  }, 0);
2159
- let e = "", i = null;
2160
- if (this._handleKeydownOnDropdown = (n) => {
2161
- ["ArrowUp", "ArrowDown", "Enter", "Escape"].includes(n.key) && (n.preventDefault(), n.stopPropagation(), n.key === "ArrowUp" || n.key === "ArrowDown" ? this._handleUpDownKey(n.key) : n.key === "Enter" ? this._handleEnterKey() : n.key === "Escape" && this._closeDropdown()), !this.options.countrySearch && /^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(n.key) && (n.stopPropagation(), i && clearTimeout(i), e += n.key.toLowerCase(), this._searchForCountry(e), i = setTimeout(() => {
2216
+ let e = "", $ = null;
2217
+ if (this._handleKeydownOnDropdown = (i) => {
2218
+ ["ArrowUp", "ArrowDown", "Enter", "Escape"].includes(i.key) && (i.preventDefault(), i.stopPropagation(), i.key === "ArrowUp" || i.key === "ArrowDown" ? this._handleUpDownKey(i.key) : i.key === "Enter" ? this._handleEnterKey() : i.key === "Escape" && this._closeDropdown()), !this.options.countrySearch && /^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(i.key) && (i.stopPropagation(), $ && clearTimeout($), e += i.key.toLowerCase(), this._searchForCountry(e), $ = setTimeout(() => {
2162
2219
  e = "";
2163
2220
  }, 1e3));
2164
2221
  }, document.addEventListener("keydown", this._handleKeydownOnDropdown), this.options.countrySearch) {
2165
- const n = () => {
2166
- const l = this.searchInput.value.trim();
2167
- this._filterCountries(l), this.searchInput.value ? this.searchClearButton.classList.remove("iti__hide") : this.searchClearButton.classList.add("iti__hide");
2222
+ const i = () => {
2223
+ const u = this.searchInput.value.trim();
2224
+ this._filterCountries(u), this.searchInput.value ? this.searchClearButton.classList.remove("iti__hide") : this.searchClearButton.classList.add("iti__hide");
2168
2225
  };
2169
- let o = null;
2226
+ let s = null;
2170
2227
  this._handleSearchChange = () => {
2171
- o && clearTimeout(o), o = setTimeout(() => {
2172
- n(), o = null;
2228
+ s && clearTimeout(s), s = setTimeout(() => {
2229
+ i(), s = null;
2173
2230
  }, 100);
2174
2231
  }, this.searchInput.addEventListener("input", this._handleSearchChange), this._handleSearchClear = () => {
2175
- this.searchInput.value = "", this.searchInput.focus(), n();
2232
+ this.searchInput.value = "", this.searchInput.focus(), i();
2176
2233
  }, this.searchClearButton.addEventListener("click", this._handleSearchClear);
2177
2234
  }
2178
2235
  }
2179
2236
  //* Hidden search (countrySearch disabled): Find the first list item whose name starts with the query string.
2180
2237
  _searchForCountry(e) {
2181
- for (const i of this.countries)
2182
- if (i.name.substring(0, e.length).toLowerCase() === e) {
2183
- const o = i.nodeById[this.id];
2184
- this._highlightListItem(o, !1), this._scrollTo(o);
2238
+ for (const $ of this.countries)
2239
+ if ($.name.substring(0, e.length).toLowerCase() === e) {
2240
+ const s = $.nodeById[this.id];
2241
+ this._highlightListItem(s, !1), this._scrollTo(s);
2185
2242
  break;
2186
2243
  }
2187
2244
  }
2188
2245
  //* Country search enabled: Filter the countries according to the search query.
2189
2246
  _filterCountries(e) {
2190
- let i = !0;
2191
2247
  this.countryList.innerHTML = "";
2192
- const n = u2(e);
2193
- let o;
2194
- if (e === "")
2195
- o = this.countries;
2196
- else {
2197
- const l = [], f = [], h = [], C = [], I = [], v = [];
2198
- for (const g of this.countries)
2199
- g.iso2 === n ? l.push(g) : g.normalisedName.startsWith(n) ? f.push(g) : g.normalisedName.includes(n) ? h.push(g) : n === g.dialCode || n === g.dialCodePlus ? C.push(g) : g.dialCodePlus.includes(n) ? I.push(g) : g.initials.includes(n) && v.push(g);
2200
- o = [
2201
- ...l.sort((g, w) => g.priority - w.priority),
2202
- ...f.sort((g, w) => g.priority - w.priority),
2203
- ...h.sort((g, w) => g.priority - w.priority),
2204
- ...C.sort((g, w) => g.priority - w.priority),
2205
- ...I.sort((g, w) => g.priority - w.priority),
2206
- ...v.sort((g, w) => g.priority - w.priority)
2207
- ];
2208
- }
2209
- for (const l of o) {
2210
- const f = l.nodeById[this.id];
2211
- f && (this.countryList.appendChild(f), i && (this._highlightListItem(f, !1), i = !1));
2248
+ let $;
2249
+ e === "" ? $ = this.countries : $ = this._getMatchedCountries(e);
2250
+ let i = !0;
2251
+ for (const s of $) {
2252
+ const u = s.nodeById[this.id];
2253
+ u && (this.countryList.appendChild(u), i && (this._highlightListItem(u, !1), i = !1));
2212
2254
  }
2213
2255
  i ? (this._highlightListItem(null, !1), this.searchNoResults && this.searchNoResults.classList.remove("iti__hide")) : this.searchNoResults && this.searchNoResults.classList.add("iti__hide"), this.countryList.scrollTop = 0, this._updateSearchResultsA11yText();
2214
2256
  }
2257
+ _getMatchedCountries(e) {
2258
+ const $ = l2(e), i = [], s = [], u = [], h = [], c = [], C = [];
2259
+ for (const g of this.countries)
2260
+ g.iso2 === $ ? i.push(g) : g.normalisedName.startsWith($) ? s.push(g) : g.normalisedName.includes($) ? u.push(g) : $ === g.dialCode || $ === g.dialCodePlus ? h.push(g) : g.dialCodePlus.includes($) ? c.push(g) : g.initials.includes($) && C.push(g);
2261
+ return [
2262
+ ...i.sort((g, I) => g.priority - I.priority),
2263
+ ...s.sort((g, I) => g.priority - I.priority),
2264
+ ...u.sort((g, I) => g.priority - I.priority),
2265
+ ...h.sort((g, I) => g.priority - I.priority),
2266
+ ...c.sort((g, I) => g.priority - I.priority),
2267
+ ...C.sort((g, I) => g.priority - I.priority)
2268
+ ];
2269
+ }
2215
2270
  //* Update search results text (for a11y).
2216
2271
  _updateSearchResultsA11yText() {
2217
- const { i18n: e } = this.options, i = this.countryList.childElementCount;
2218
- let n;
2219
- i === 0 ? n = e.zeroSearchResults : e.searchResultsText ? n = e.searchResultsText(i) : i === 1 ? n = e.oneSearchResult : n = e.multipleSearchResults.replace("${count}", i.toString()), this.searchResultsA11yText.textContent = n;
2272
+ const { i18n: e } = this.options, $ = this.countryList.childElementCount;
2273
+ let i;
2274
+ $ === 0 ? i = e.zeroSearchResults : e.searchResultsText ? i = e.searchResultsText($) : $ === 1 ? i = e.oneSearchResult : i = e.multipleSearchResults.replace("${count}", $.toString()), this.searchResultsA11yText.textContent = i;
2220
2275
  }
2221
2276
  //* Highlight the next/prev item in the list (and ensure it is visible).
2222
2277
  _handleUpDownKey(e) {
2223
- var n, o;
2224
- let i = e === "ArrowUp" ? (n = this.highlightedItem) == null ? void 0 : n.previousElementSibling : (o = this.highlightedItem) == null ? void 0 : o.nextElementSibling;
2225
- !i && this.countryList.childElementCount > 1 && (i = e === "ArrowUp" ? this.countryList.lastElementChild : this.countryList.firstElementChild), i && (this._scrollTo(i), this._highlightListItem(i, !1));
2278
+ var i, s;
2279
+ let $ = e === "ArrowUp" ? (i = this.highlightedItem) == null ? void 0 : i.previousElementSibling : (s = this.highlightedItem) == null ? void 0 : s.nextElementSibling;
2280
+ !$ && this.countryList.childElementCount > 1 && ($ = e === "ArrowUp" ? this.countryList.lastElementChild : this.countryList.firstElementChild), $ && (this._scrollTo($), this._highlightListItem($, !1));
2226
2281
  }
2227
2282
  //* Select the currently highlighted item.
2228
2283
  _handleEnterKey() {
@@ -2231,120 +2286,110 @@ class g1 {
2231
2286
  //* Update the input's value to the given val (format first if possible)
2232
2287
  //* NOTE: this is called from _setInitialState, handleUtils and setNumber.
2233
2288
  _updateValFromNumber(e) {
2234
- let i = e;
2235
- if (this.options.formatOnDisplay && m.utils && this.selectedCountryData) {
2236
- const n = this.options.nationalMode || i.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: o, INTERNATIONAL: l } = m.utils.numberFormat, f = n ? o : l;
2237
- i = m.utils.formatNumber(
2238
- i,
2289
+ let $ = e;
2290
+ if (this.options.formatOnDisplay && y.utils && this.selectedCountryData) {
2291
+ const i = this.options.nationalMode || $.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: s, INTERNATIONAL: u } = y.utils.numberFormat, h = i ? s : u;
2292
+ $ = y.utils.formatNumber(
2293
+ $,
2239
2294
  this.selectedCountryData.iso2,
2240
- f
2295
+ h
2241
2296
  );
2242
2297
  }
2243
- i = this._beforeSetNumber(i), this.telInput.value = i;
2298
+ $ = this._beforeSetNumber($), this.telInput.value = $;
2244
2299
  }
2245
2300
  //* Check if need to select a new country based on the given number
2246
2301
  //* Note: called from _setInitialState, keyup handler, setNumber.
2247
2302
  _updateCountryFromNumber(e) {
2248
- const i = this._getNewCountryFromNumber(e);
2249
- return i !== null ? this._setCountry(i) : !1;
2303
+ const $ = this._getNewCountryFromNumber(e);
2304
+ return $ !== null ? this._setCountry($) : !1;
2250
2305
  }
2251
2306
  _ensureHasDialCode(e) {
2252
- const { dialCode: i, nationalPrefix: n } = this.selectedCountryData;
2253
- if (e.charAt(0) === "+" || !i)
2307
+ const { dialCode: $, nationalPrefix: i } = this.selectedCountryData;
2308
+ if (e.charAt(0) === "+" || !$)
2254
2309
  return e;
2255
- const f = n && e.charAt(0) === n && !this.options.separateDialCode ? e.substring(1) : e;
2256
- return `+${i}${f}`;
2310
+ const h = i && e.charAt(0) === i && !this.options.separateDialCode ? e.substring(1) : e;
2311
+ return `+${$}${h}`;
2257
2312
  }
2258
2313
  // Get the country ISO2 code from the given number
2259
2314
  // BUT ONLY IF ITS CHANGED FROM THE CURRENTLY SELECTED COUNTRY
2260
2315
  // NOTE: consider refactoring this to be more clear
2261
2316
  _getNewCountryFromNumber(e) {
2262
- const i = e.indexOf("+");
2263
- let n = i ? e.substring(i) : e;
2264
- const o = this.selectedCountryData.iso2, l = this.selectedCountryData.dialCode;
2265
- n = this._ensureHasDialCode(n);
2266
- const f = this._getDialCode(n, !0), h = p1(n);
2267
- if (f) {
2268
- const C = p1(f), I = this.dialCodeToIso2Map[C];
2269
- if (I.length === 1)
2270
- return I[0] === o ? null : I[0];
2271
- if (!o && this.defaultCountry && I.includes(this.defaultCountry))
2317
+ const $ = e.indexOf("+");
2318
+ let i = $ ? e.substring($) : e;
2319
+ const s = this.selectedCountryData.iso2, u = this.selectedCountryData.dialCode;
2320
+ i = this._ensureHasDialCode(i);
2321
+ const h = this._getDialCode(i, !0), c = h1(i);
2322
+ if (h) {
2323
+ const C = h1(h), g = this.dialCodeToIso2Map[C];
2324
+ if (g.length === 1)
2325
+ return g[0] === s ? null : g[0];
2326
+ if (!s && this.defaultCountry && g.includes(this.defaultCountry))
2272
2327
  return this.defaultCountry;
2273
- if (l === "1" && l2(h))
2328
+ if (u === "1" && o2(c))
2274
2329
  return null;
2275
- const g = this.selectedCountryData.areaCodes && h.length > C.length;
2276
- if (!(o && I.includes(o) && !g))
2277
- return I[0];
2330
+ const S = this.selectedCountryData.areaCodes && c.length > C.length;
2331
+ if (!(s && g.includes(s) && !S))
2332
+ return g[0];
2278
2333
  } else {
2279
- if (n.charAt(0) === "+" && h.length)
2334
+ if (i.charAt(0) === "+" && c.length)
2280
2335
  return "";
2281
- if ((!n || n === "+") && !o)
2336
+ if ((!i || i === "+") && !s)
2282
2337
  return this.defaultCountry;
2283
2338
  }
2284
2339
  return null;
2285
2340
  }
2286
2341
  //* Remove highlighting from other list items and highlight the given item.
2287
- _highlightListItem(e, i) {
2288
- const n = this.highlightedItem;
2289
- if (n && (n.classList.remove("iti__highlight"), n.setAttribute("aria-selected", "false")), this.highlightedItem = e, this.highlightedItem && (this.highlightedItem.classList.add("iti__highlight"), this.highlightedItem.setAttribute("aria-selected", "true"), this.options.countrySearch)) {
2290
- const o = this.highlightedItem.getAttribute("id") || "";
2291
- this.searchInput.setAttribute("aria-activedescendant", o);
2342
+ _highlightListItem(e, $) {
2343
+ const i = this.highlightedItem;
2344
+ if (i && (i.classList.remove("iti__highlight"), i.setAttribute("aria-selected", "false")), this.highlightedItem = e, this.highlightedItem && (this.highlightedItem.classList.add("iti__highlight"), this.highlightedItem.setAttribute("aria-selected", "true"), this.options.countrySearch)) {
2345
+ const s = this.highlightedItem.getAttribute("id") || "";
2346
+ this.searchInput.setAttribute("aria-activedescendant", s);
2292
2347
  }
2293
- i && this.highlightedItem.focus();
2294
- }
2295
- //* Find the country data for the given iso2 code
2296
- //* the allowFail option is only used during init() for the initialCountry option, and for the iso2 returned from geoIpLookup - in these 2 cases we don't want to error out
2297
- _getCountryData(e, i) {
2298
- const n = this.countryByIso2.get(e);
2299
- if (n)
2300
- return n;
2301
- if (i)
2302
- return null;
2303
- throw new Error(`No country data for '${e}'`);
2348
+ $ && this.highlightedItem.focus();
2304
2349
  }
2305
2350
  //* Update the selected country, dial code (if separateDialCode), placeholder, title, and active list item.
2306
2351
  //* Note: called from _setInitialState, _updateCountryFromNumber, _selectListItem, setCountry.
2307
2352
  _setCountry(e) {
2308
- const { separateDialCode: i, showFlags: n, i18n: o } = this.options, l = this.selectedCountryData.iso2 || "";
2309
- if (this.selectedCountryData = e ? this._getCountryData(e, !1) || {} : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountry) {
2310
- const f = e && n ? `iti__flag iti__${e}` : "iti__flag iti__globe";
2311
- let h, C;
2353
+ const { separateDialCode: $, showFlags: i, i18n: s } = this.options, u = this.selectedCountryData.iso2 || "";
2354
+ if (this.selectedCountryData = e ? this.countryByIso2.get(e) : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountry) {
2355
+ const h = e && i ? `iti__flag iti__${e}` : "iti__flag iti__globe";
2356
+ let c, C;
2312
2357
  if (e) {
2313
- const { name: I, dialCode: v } = this.selectedCountryData;
2314
- C = I, h = o.selectedCountryAriaLabel.replace("${countryName}", I).replace("${dialCode}", `+${v}`);
2358
+ const { name: g, dialCode: I } = this.selectedCountryData;
2359
+ C = g, c = s.selectedCountryAriaLabel.replace("${countryName}", g).replace("${dialCode}", `+${I}`);
2315
2360
  } else
2316
- C = o.noCountrySelected, h = o.noCountrySelected;
2317
- this.selectedCountryInner.className = f, this.selectedCountry.setAttribute("title", C), this.selectedCountry.setAttribute("aria-label", h);
2361
+ C = s.noCountrySelected, c = s.noCountrySelected;
2362
+ this.selectedCountryInner.className = h, this.selectedCountry.setAttribute("title", C), this.selectedCountry.setAttribute("aria-label", c);
2318
2363
  }
2319
- if (i) {
2320
- const f = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
2321
- this.selectedDialCode.innerHTML = f, this._updateInputPadding();
2364
+ if ($) {
2365
+ const h = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
2366
+ this.selectedDialCode.innerHTML = h, this._updateInputPadding();
2322
2367
  }
2323
- return this._updatePlaceholder(), this._updateMaxLength(), l !== e;
2368
+ return this._updatePlaceholder(), this._updateMaxLength(), u !== e;
2324
2369
  }
2325
2370
  //* Update the input padding to make space for the selected country/dial code.
2326
2371
  _updateInputPadding() {
2327
2372
  if (this.selectedCountry) {
2328
- const e = this.options.separateDialCode ? 78 : 42, n = (this.selectedCountry.offsetWidth || this._getHiddenSelectedCountryWidth() || e) + 6;
2329
- this.showSelectedCountryOnLeft ? this.telInput.style.paddingLeft = `${n}px` : this.telInput.style.paddingRight = `${n}px`;
2373
+ const e = this.options.separateDialCode ? 78 : 42, i = (this.selectedCountry.offsetWidth || this._getHiddenSelectedCountryWidth() || e) + 6;
2374
+ this.showSelectedCountryOnLeft ? this.telInput.style.paddingLeft = `${i}px` : this.telInput.style.paddingRight = `${i}px`;
2330
2375
  }
2331
2376
  }
2332
2377
  //* Update the maximum valid number length for the currently selected country.
2333
2378
  _updateMaxLength() {
2334
- const { strictMode: e, placeholderNumberType: i, validationNumberTypes: n } = this.options, { iso2: o } = this.selectedCountryData;
2335
- if (e && m.utils)
2336
- if (o) {
2337
- const l = m.utils.numberType[i];
2338
- let f = m.utils.getExampleNumber(
2339
- o,
2379
+ const { strictMode: e, placeholderNumberType: $, validationNumberTypes: i } = this.options, { iso2: s } = this.selectedCountryData;
2380
+ if (e && y.utils)
2381
+ if (s) {
2382
+ const u = y.utils.numberType[$];
2383
+ let h = y.utils.getExampleNumber(
2384
+ s,
2340
2385
  !1,
2341
- l,
2386
+ u,
2342
2387
  !0
2343
- ), h = f;
2344
- for (; m.utils.isPossibleNumber(f, o, n); )
2345
- h = f, f += "0";
2346
- const C = m.utils.getCoreNumber(h, o);
2347
- this.maxCoreNumberLength = C.length, o === "by" && (this.maxCoreNumberLength = C.length + 1);
2388
+ ), c = h;
2389
+ for (; y.utils.isPossibleNumber(h, s, i); )
2390
+ c = h, h += "0";
2391
+ const C = y.utils.getCoreNumber(c, s);
2392
+ this.maxCoreNumberLength = C.length, s === "by" && (this.maxCoreNumberLength = C.length + 1);
2348
2393
  } else
2349
2394
  this.maxCoreNumberLength = null;
2350
2395
  }
@@ -2360,14 +2405,14 @@ class g1 {
2360
2405
  } catch {
2361
2406
  e = document.body;
2362
2407
  }
2363
- const i = this.telInput.parentNode.cloneNode(!1);
2364
- i.style.visibility = "hidden", e.appendChild(i);
2365
- const n = this.countryContainer.cloneNode();
2366
- i.appendChild(n);
2367
- const o = this.selectedCountry.cloneNode(!0);
2368
- n.appendChild(o);
2369
- const l = o.offsetWidth;
2370
- return e.removeChild(i), l;
2408
+ const $ = this.telInput.parentNode.cloneNode(!1);
2409
+ $.style.visibility = "hidden", e.appendChild($);
2410
+ const i = this.countryContainer.cloneNode();
2411
+ $.appendChild(i);
2412
+ const s = this.selectedCountry.cloneNode(!0);
2413
+ i.appendChild(s);
2414
+ const u = s.offsetWidth;
2415
+ return e.removeChild($), u;
2371
2416
  }
2372
2417
  return 0;
2373
2418
  }
@@ -2375,26 +2420,26 @@ class g1 {
2375
2420
  _updatePlaceholder() {
2376
2421
  const {
2377
2422
  autoPlaceholder: e,
2378
- placeholderNumberType: i,
2379
- nationalMode: n,
2380
- customPlaceholder: o
2381
- } = this.options, l = e === "aggressive" || !this.hadInitialPlaceholder && e === "polite";
2382
- if (m.utils && l) {
2383
- const f = m.utils.numberType[i];
2384
- let h = this.selectedCountryData.iso2 ? m.utils.getExampleNumber(
2423
+ placeholderNumberType: $,
2424
+ nationalMode: i,
2425
+ customPlaceholder: s
2426
+ } = this.options, u = e === "aggressive" || !this.hadInitialPlaceholder && e === "polite";
2427
+ if (y.utils && u) {
2428
+ const h = y.utils.numberType[$];
2429
+ let c = this.selectedCountryData.iso2 ? y.utils.getExampleNumber(
2385
2430
  this.selectedCountryData.iso2,
2386
- n,
2387
- f
2431
+ i,
2432
+ h
2388
2433
  ) : "";
2389
- h = this._beforeSetNumber(h), typeof o == "function" && (h = o(h, this.selectedCountryData)), this.telInput.setAttribute("placeholder", h);
2434
+ c = this._beforeSetNumber(c), typeof s == "function" && (c = s(c, this.selectedCountryData)), this.telInput.setAttribute("placeholder", c);
2390
2435
  }
2391
2436
  }
2392
2437
  //* Called when the user selects a list item from the dropdown.
2393
2438
  _selectListItem(e) {
2394
- const i = this._setCountry(
2395
- e.getAttribute("data-country-code")
2396
- );
2397
- this._closeDropdown(), this._updateDialCode(e.getAttribute("data-dial-code")), this.options.formatOnDisplay && this._updateValFromNumber(this.telInput.value), this.telInput.focus(), i && this._triggerCountryChange();
2439
+ const $ = e.getAttribute("data-country-code"), i = this._setCountry($);
2440
+ this._closeDropdown();
2441
+ const s = e.getAttribute("data-dial-code");
2442
+ this._updateDialCode(s), this.options.formatOnDisplay && this._updateValFromNumber(this.telInput.value), this.telInput.focus(), i && this._triggerCountryChange();
2398
2443
  }
2399
2444
  //* Close the dropdown and unbind any listeners.
2400
2445
  _closeDropdown() {
@@ -2408,94 +2453,86 @@ class g1 {
2408
2453
  }
2409
2454
  //* Check if an element is visible within it's container, else scroll until it is.
2410
2455
  _scrollTo(e) {
2411
- const i = this.countryList, n = document.documentElement.scrollTop, o = i.offsetHeight, l = i.getBoundingClientRect().top + n, f = l + o, h = e.offsetHeight, C = e.getBoundingClientRect().top + n, I = C + h, v = C - l + i.scrollTop;
2412
- if (C < l)
2413
- i.scrollTop = v;
2414
- else if (I > f) {
2415
- const g = o - h;
2416
- i.scrollTop = v - g;
2456
+ const $ = this.countryList, i = document.documentElement.scrollTop, s = $.offsetHeight, u = $.getBoundingClientRect().top + i, h = u + s, c = e.offsetHeight, C = e.getBoundingClientRect().top + i, g = C + c, I = C - u + $.scrollTop;
2457
+ if (C < u)
2458
+ $.scrollTop = I;
2459
+ else if (g > h) {
2460
+ const S = s - c;
2461
+ $.scrollTop = I - S;
2417
2462
  }
2418
2463
  }
2419
2464
  //* Replace any existing dial code with the new one
2420
2465
  //* Note: called from _selectListItem and setCountry
2421
2466
  _updateDialCode(e) {
2422
- const i = this.telInput.value, n = `+${e}`;
2423
- let o;
2424
- if (i.charAt(0) === "+") {
2425
- const l = this._getDialCode(i);
2426
- l ? o = i.replace(l, n) : o = n, this.telInput.value = o;
2467
+ const $ = this.telInput.value, i = `+${e}`;
2468
+ let s;
2469
+ if ($.charAt(0) === "+") {
2470
+ const u = this._getDialCode($);
2471
+ u ? s = $.replace(u, i) : s = i, this.telInput.value = s;
2427
2472
  }
2428
2473
  }
2429
2474
  //* Try and extract a valid international dial code from a full telephone number.
2430
2475
  //* Note: returns the raw string inc plus character and any whitespace/dots etc.
2431
- _getDialCode(e, i) {
2432
- let n = "";
2476
+ _getDialCode(e, $) {
2477
+ let i = "";
2433
2478
  if (e.charAt(0) === "+") {
2434
- let o = "";
2435
- for (let l = 0; l < e.length; l++) {
2436
- const f = e.charAt(l);
2437
- if (!isNaN(parseInt(f, 10))) {
2438
- if (o += f, i)
2439
- this.dialCodeToIso2Map[o] && (n = e.substring(0, l + 1));
2440
- else if (this.dialCodes.has(o)) {
2441
- n = e.substring(0, l + 1);
2479
+ let s = "";
2480
+ for (let u = 0; u < e.length; u++) {
2481
+ const h = e.charAt(u);
2482
+ if (/[0-9]/.test(h)) {
2483
+ if (s += h, $)
2484
+ this.dialCodeToIso2Map[s] && (i = e.substring(0, u + 1));
2485
+ else if (this.dialCodes.has(s)) {
2486
+ i = e.substring(0, u + 1);
2442
2487
  break;
2443
2488
  }
2444
- if (o.length === this.dialCodeMaxLen)
2489
+ if (s.length === this.dialCodeMaxLen)
2445
2490
  break;
2446
2491
  }
2447
2492
  }
2448
2493
  }
2449
- return n;
2494
+ return i;
2450
2495
  }
2451
2496
  //* Get the input val, adding the dial code if separateDialCode is enabled.
2452
2497
  _getFullNumber(e) {
2453
- const i = e || this.telInput.value.trim(), { dialCode: n } = this.selectedCountryData;
2454
- let o;
2455
- const l = p1(i);
2456
- return this.options.separateDialCode && i.charAt(0) !== "+" && n && l ? o = `+${n}` : o = "", o + i;
2498
+ const $ = e || this.telInput.value.trim(), { dialCode: i } = this.selectedCountryData;
2499
+ let s;
2500
+ const u = h1($);
2501
+ return this.options.separateDialCode && $.charAt(0) !== "+" && i && u ? s = `+${i}` : s = "", s + $;
2457
2502
  }
2458
2503
  //* Remove the dial code if separateDialCode is enabled also cap the length if the input has a maxlength attribute
2459
2504
  _beforeSetNumber(e) {
2460
- let i = e;
2461
- if (this.options.separateDialCode) {
2462
- let n = this._getDialCode(i);
2463
- if (n) {
2464
- n = `+${this.selectedCountryData.dialCode}`;
2465
- const o = i[n.length] === " " || i[n.length] === "-" ? n.length + 1 : n.length;
2466
- i = i.substring(o);
2467
- }
2468
- }
2505
+ const $ = this._getDialCode(e), i = X2(
2506
+ e,
2507
+ $,
2508
+ this.options.separateDialCode,
2509
+ this.selectedCountryData
2510
+ );
2469
2511
  return this._cap(i);
2470
2512
  }
2471
2513
  //* Trigger the 'countrychange' event.
2472
2514
  _triggerCountryChange() {
2473
2515
  this._trigger("countrychange");
2474
2516
  }
2475
- //* Format the number as the user types.
2476
- _formatNumberAsYouType() {
2477
- const e = this._getFullNumber(), i = m.utils ? m.utils.formatNumberAsYouType(e, this.selectedCountryData.iso2) : e, { dialCode: n } = this.selectedCountryData;
2478
- return this.options.separateDialCode && this.telInput.value.charAt(0) !== "+" && i.includes(`+${n}`) ? (i.split(`+${n}`)[1] || "").trim() : i;
2479
- }
2480
2517
  //**************************
2481
2518
  //* SECRET PUBLIC METHODS
2482
2519
  //**************************
2483
2520
  //* This is called when the geoip call returns.
2484
2521
  handleAutoCountry() {
2485
- 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());
2522
+ this.options.initialCountry === "auto" && y.autoCountry && (this.defaultCountry = y.autoCountry, this.selectedCountryData.iso2 || this.selectedCountryInner.classList.contains("iti__globe") || this.setCountry(this.defaultCountry), this.resolveAutoCountryPromise());
2486
2523
  }
2487
2524
  //* This is called when the utils request completes.
2488
2525
  handleUtils() {
2489
- m.utils && (this.telInput.value && this._updateValFromNumber(this.telInput.value), this.selectedCountryData.iso2 && (this._updatePlaceholder(), this._updateMaxLength())), this.resolveUtilsScriptPromise();
2526
+ y.utils && (this.telInput.value && this._updateValFromNumber(this.telInput.value), this.selectedCountryData.iso2 && (this._updatePlaceholder(), this._updateMaxLength())), this.resolveUtilsScriptPromise();
2490
2527
  }
2491
2528
  //********************
2492
2529
  //* PUBLIC METHODS
2493
2530
  //********************
2494
2531
  //* Remove plugin.
2495
2532
  destroy() {
2496
- var l, f;
2533
+ var u, h;
2497
2534
  this.telInput.iti = void 0;
2498
- const { allowDropdown: e, separateDialCode: i } = this.options;
2535
+ const { allowDropdown: e, separateDialCode: $ } = this.options;
2499
2536
  if (e) {
2500
2537
  this._closeDropdown(), this.selectedCountry.removeEventListener(
2501
2538
  "click",
@@ -2504,28 +2541,28 @@ class g1 {
2504
2541
  "keydown",
2505
2542
  this._handleCountryContainerKeydown
2506
2543
  );
2507
- const h = this.telInput.closest("label");
2508
- h && h.removeEventListener("click", this._handleLabelClick);
2544
+ const c = this.telInput.closest("label");
2545
+ c && c.removeEventListener("click", this._handleLabelClick);
2509
2546
  }
2510
- const { form: n } = this.telInput;
2511
- this._handleHiddenInputSubmit && n && n.removeEventListener("submit", this._handleHiddenInputSubmit), this.telInput.removeEventListener("input", this._handleInputEvent), this._handleKeydownEvent && this.telInput.removeEventListener("keydown", this._handleKeydownEvent), this._handlePasteEvent && this.telInput.removeEventListener("paste", this._handlePasteEvent), this.telInput.removeAttribute("data-intl-tel-input-id"), i && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft);
2512
- const o = this.telInput.parentNode;
2513
- (l = o == null ? void 0 : o.parentNode) == null || l.insertBefore(this.telInput, o), (f = o == null ? void 0 : o.parentNode) == null || f.removeChild(o), delete m.instances[this.id];
2547
+ const { form: i } = this.telInput;
2548
+ this._handleHiddenInputSubmit && i && i.removeEventListener("submit", this._handleHiddenInputSubmit), this.telInput.removeEventListener("input", this._handleInputEvent), this._handleKeydownEvent && this.telInput.removeEventListener("keydown", this._handleKeydownEvent), this._handlePasteEvent && this.telInput.removeEventListener("paste", this._handlePasteEvent), this.telInput.removeAttribute("data-intl-tel-input-id"), $ && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft);
2549
+ const s = this.telInput.parentNode;
2550
+ (u = s == null ? void 0 : s.parentNode) == null || u.insertBefore(this.telInput, s), (h = s == null ? void 0 : s.parentNode) == null || h.removeChild(s), delete y.instances[this.id];
2514
2551
  }
2515
2552
  //* Get the extension from the current number.
2516
2553
  getExtension() {
2517
- return m.utils ? m.utils.getExtension(
2554
+ return y.utils ? y.utils.getExtension(
2518
2555
  this._getFullNumber(),
2519
2556
  this.selectedCountryData.iso2
2520
2557
  ) : "";
2521
2558
  }
2522
2559
  //* Format the number to the given format.
2523
2560
  getNumber(e) {
2524
- if (m.utils) {
2525
- const { iso2: i } = this.selectedCountryData;
2526
- return m.utils.formatNumber(
2561
+ if (y.utils) {
2562
+ const { iso2: $ } = this.selectedCountryData;
2563
+ return y.utils.formatNumber(
2527
2564
  this._getFullNumber(),
2528
- i,
2565
+ $,
2529
2566
  e
2530
2567
  );
2531
2568
  }
@@ -2533,7 +2570,7 @@ class g1 {
2533
2570
  }
2534
2571
  //* Get the type of the entered number e.g. landline/mobile.
2535
2572
  getNumberType() {
2536
- return m.utils ? m.utils.getNumberType(
2573
+ return y.utils ? y.utils.getNumberType(
2537
2574
  this._getFullNumber(),
2538
2575
  this.selectedCountryData.iso2
2539
2576
  ) : -99;
@@ -2544,9 +2581,9 @@ class g1 {
2544
2581
  }
2545
2582
  //* Get the validation error.
2546
2583
  getValidationError() {
2547
- if (m.utils) {
2584
+ if (y.utils) {
2548
2585
  const { iso2: e } = this.selectedCountryData;
2549
- return m.utils.getValidationError(this._getFullNumber(), e);
2586
+ return y.utils.getValidationError(this._getFullNumber(), e);
2550
2587
  }
2551
2588
  return -99;
2552
2589
  }
@@ -2559,31 +2596,34 @@ class g1 {
2559
2596
  return this._validateNumber(!0);
2560
2597
  }
2561
2598
  _utilsIsPossibleNumber(e) {
2562
- return m.utils ? m.utils.isPossibleNumber(e, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2599
+ return y.utils ? y.utils.isPossibleNumber(e, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2563
2600
  }
2564
2601
  //* Shared internal validation logic to handle alpha character extension rules.
2565
2602
  _validateNumber(e) {
2566
2603
  if (!this.selectedCountryData.iso2)
2567
2604
  return !1;
2568
- const i = (f) => e ? this._utilsIsValidNumber(f) : this._utilsIsPossibleNumber(f), n = this._getFullNumber(), o = n.search(new RegExp("\\p{L}", "u"));
2569
- if (o > -1 && !this.options.allowPhonewords) {
2570
- const f = n.substring(0, o), h = i(f), C = i(n);
2571
- return h && C;
2605
+ const $ = (h) => e ? this._utilsIsValidNumber(h) : this._utilsIsPossibleNumber(h), i = this._getFullNumber(), s = i.search(new RegExp("\\p{L}", "u"));
2606
+ if (s > -1 && !this.options.allowPhonewords) {
2607
+ const h = i.substring(0, s), c = $(h), C = $(i);
2608
+ return c && C;
2572
2609
  }
2573
- return i(n);
2610
+ return $(i);
2574
2611
  }
2575
2612
  _utilsIsValidNumber(e) {
2576
- return m.utils ? m.utils.isValidNumber(e, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2613
+ return y.utils ? y.utils.isValidNumber(e, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2577
2614
  }
2578
2615
  //* Update the selected country, and update the input val accordingly.
2579
2616
  setCountry(e) {
2580
- const i = e == null ? void 0 : e.toLowerCase(), n = this.selectedCountryData.iso2;
2581
- (e && i !== n || !e && n) && (this._setCountry(i), this._updateDialCode(this.selectedCountryData.dialCode), this.options.formatOnDisplay && this._updateValFromNumber(this.telInput.value), this._triggerCountryChange());
2617
+ const $ = e == null ? void 0 : e.toLowerCase();
2618
+ if (!w1($))
2619
+ throw new Error(`Invalid country code: '${$}'`);
2620
+ const i = this.selectedCountryData.iso2;
2621
+ (e && $ !== i || !e && i) && (this._setCountry($), this._updateDialCode(this.selectedCountryData.dialCode), this.options.formatOnDisplay && this._updateValFromNumber(this.telInput.value), this._triggerCountryChange());
2582
2622
  }
2583
2623
  //* Set the input value and update the country.
2584
2624
  setNumber(e) {
2585
- const i = this._updateCountryFromNumber(e);
2586
- this._updateValFromNumber(e), i && this._triggerCountryChange(), this._trigger("input", { isSetNumber: !0 });
2625
+ const $ = this._updateCountryFromNumber(e);
2626
+ this._updateValFromNumber(e), $ && this._triggerCountryChange(), this._trigger("input", { isSetNumber: !0 });
2587
2627
  }
2588
2628
  //* Set the placeholder number typ
2589
2629
  setPlaceholderNumberType(e) {
@@ -2593,95 +2633,95 @@ class g1 {
2593
2633
  this.telInput.disabled = e, e ? this.selectedCountry.setAttribute("disabled", "true") : this.selectedCountry.removeAttribute("disabled");
2594
2634
  }
2595
2635
  }
2596
- const Z2 = (y) => {
2597
- if (!m.utils && !m.startedLoadingUtilsScript) {
2636
+ const n0 = (f) => {
2637
+ if (!y.utils && !y.startedLoadingUtilsScript) {
2598
2638
  let e;
2599
- if (typeof y == "function")
2639
+ if (typeof f == "function")
2600
2640
  try {
2601
- e = Promise.resolve(y());
2602
- } catch (i) {
2603
- return Promise.reject(i);
2641
+ e = Promise.resolve(f());
2642
+ } catch ($) {
2643
+ return Promise.reject($);
2604
2644
  }
2605
2645
  else
2606
- 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}`));
2607
- return m.startedLoadingUtilsScript = !0, e.then((i) => {
2608
- const n = i == null ? void 0 : i.default;
2609
- if (!n || typeof n != "object")
2646
+ return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof f}`));
2647
+ return y.startedLoadingUtilsScript = !0, e.then(($) => {
2648
+ const i = $ == null ? void 0 : $.default;
2649
+ if (!i || typeof i != "object")
2610
2650
  throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");
2611
- return m.utils = n, i1("handleUtils"), !0;
2612
- }).catch((i) => {
2613
- throw i1("rejectUtilsScriptPromise", i), i;
2651
+ return y.utils = i, e1("handleUtils"), !0;
2652
+ }).catch(($) => {
2653
+ throw e1("rejectUtilsScriptPromise", $), $;
2614
2654
  });
2615
2655
  }
2616
2656
  return null;
2617
- }, m = Object.assign(
2618
- (y, e) => {
2619
- const i = new g1(y, e);
2620
- return i._init(), y.setAttribute("data-intl-tel-input-id", i.id.toString()), m.instances[i.id] = i, y.iti = i, i;
2657
+ }, y = Object.assign(
2658
+ (f, e) => {
2659
+ const $ = new c1(f, e);
2660
+ return $._init(), f.setAttribute("data-intl-tel-input-id", $.id.toString()), y.instances[$.id] = $, f.iti = $, $;
2621
2661
  },
2622
2662
  {
2623
- defaults: c2,
2663
+ defaults: u2,
2624
2664
  //* Using a static var like this allows us to mock it in the tests.
2625
2665
  documentReady: () => document.readyState === "complete",
2626
2666
  //* Get the country data object.
2627
- getCountryData: () => q,
2667
+ getCountryData: () => Z,
2628
2668
  //* A getter for the plugin instance.
2629
- getInstance: (y) => {
2630
- const e = y.getAttribute("data-intl-tel-input-id");
2631
- return e ? m.instances[e] : null;
2669
+ getInstance: (f) => {
2670
+ const e = f.getAttribute("data-intl-tel-input-id");
2671
+ return e ? y.instances[e] : null;
2632
2672
  },
2633
2673
  //* A map from instance ID to instance object.
2634
2674
  instances: {},
2635
- attachUtils: Z2,
2675
+ attachUtils: n0,
2636
2676
  startedLoadingUtilsScript: !1,
2637
2677
  startedLoadingAutoCountry: !1,
2638
- version: "25.10.7"
2678
+ version: "25.10.9"
2639
2679
  }
2640
2680
  );
2641
2681
  (function() {
2642
- var y = this || self;
2682
+ var f = this || self;
2643
2683
  function e(d, t) {
2644
2684
  d = d.split(".");
2645
- var $ = y;
2646
- d[0] in $ || typeof $.execScript > "u" || $.execScript("var " + d[0]);
2647
- for (var s; d.length && (s = d.shift()); ) d.length || t === void 0 ? $[s] && $[s] !== Object.prototype[s] ? $ = $[s] : $ = $[s] = {} : $[s] = t;
2685
+ var n = f;
2686
+ d[0] in n || typeof n.execScript > "u" || n.execScript("var " + d[0]);
2687
+ for (var r; d.length && (r = d.shift()); ) d.length || t === void 0 ? n[r] && n[r] !== Object.prototype[r] ? n = n[r] : n = n[r] = {} : n[r] = t;
2648
2688
  }
2649
- function i(d, t) {
2650
- function $() {
2689
+ function $(d, t) {
2690
+ function n() {
2651
2691
  }
2652
- $.prototype = t.prototype, d.ma = t.prototype, d.prototype = new $(), d.prototype.constructor = d, d.sa = function(s, r, a) {
2653
- for (var u = Array(arguments.length - 2), c = 2; c < arguments.length; c++) u[c - 2] = arguments[c];
2654
- return t.prototype[r].apply(s, u);
2692
+ n.prototype = t.prototype, d.ma = t.prototype, d.prototype = new n(), d.prototype.constructor = d, d.sa = function(r, o, a) {
2693
+ for (var l = Array(arguments.length - 2), p = 2; p < arguments.length; p++) l[p - 2] = arguments[p];
2694
+ return t.prototype[o].apply(r, l);
2655
2695
  };
2656
2696
  }
2657
- function n(d) {
2697
+ function i(d) {
2658
2698
  const t = [];
2659
- let $ = 0;
2660
- for (const s in d) t[$++] = d[s];
2699
+ let n = 0;
2700
+ for (const r in d) t[n++] = d[r];
2661
2701
  return t;
2662
2702
  }
2663
- var o = class {
2703
+ var s = class {
2664
2704
  constructor(d) {
2665
- if (l !== l) throw Error("SafeUrl is not meant to be built directly");
2705
+ if (u !== u) throw Error("SafeUrl is not meant to be built directly");
2666
2706
  this.g = d;
2667
2707
  }
2668
2708
  toString() {
2669
2709
  return this.g.toString();
2670
2710
  }
2671
- }, l = {};
2672
- new o("about:invalid#zClosurez"), new o("about:blank");
2673
- const f = {};
2674
- class h {
2711
+ }, u = {};
2712
+ new s("about:invalid#zClosurez"), new s("about:blank");
2713
+ const h = {};
2714
+ class c {
2675
2715
  constructor() {
2676
- if (f !== f) throw Error("SafeStyle is not meant to be built directly");
2716
+ if (h !== h) throw Error("SafeStyle is not meant to be built directly");
2677
2717
  }
2678
2718
  toString() {
2679
2719
  return "";
2680
2720
  }
2681
2721
  }
2682
- new h();
2722
+ new c();
2683
2723
  const C = {};
2684
- class I {
2724
+ class g {
2685
2725
  constructor() {
2686
2726
  if (C !== C) throw Error("SafeStyleSheet is not meant to be built directly");
2687
2727
  }
@@ -2689,98 +2729,98 @@ const Z2 = (y) => {
2689
2729
  return "";
2690
2730
  }
2691
2731
  }
2692
- new I();
2693
- const v = {};
2694
- class g {
2732
+ new g();
2733
+ const I = {};
2734
+ class S {
2695
2735
  constructor() {
2696
- var t = y.trustedTypes && y.trustedTypes.emptyHTML || "";
2697
- if (v !== v) throw Error("SafeHtml is not meant to be built directly");
2736
+ var t = f.trustedTypes && f.trustedTypes.emptyHTML || "";
2737
+ if (I !== I) throw Error("SafeHtml is not meant to be built directly");
2698
2738
  this.g = t;
2699
2739
  }
2700
2740
  toString() {
2701
2741
  return this.g.toString();
2702
2742
  }
2703
2743
  }
2704
- new g();
2705
- function w(d, t) {
2744
+ new S();
2745
+ function R(d, t) {
2706
2746
  switch (this.g = d, this.l = !!t.aa, this.h = t.i, this.s = t.type, this.o = !1, this.h) {
2707
- case G:
2708
- case x:
2709
- case R:
2710
- case N:
2711
- case W:
2712
2747
  case A:
2713
- case S:
2748
+ case k:
2749
+ case H:
2750
+ case f1:
2751
+ case c2:
2752
+ case D:
2753
+ case v:
2714
2754
  this.o = !0;
2715
2755
  }
2716
2756
  this.j = t.defaultValue;
2717
2757
  }
2718
- var S = 1, A = 2, G = 3, x = 4, R = 6, N = 16, W = 18;
2719
- function n1(d, t) {
2758
+ var v = 1, D = 2, A = 3, k = 4, H = 6, f1 = 16, c2 = 18;
2759
+ function f2(d, t) {
2720
2760
  for (this.h = d, this.g = {}, d = 0; d < t.length; d++) {
2721
- var $ = t[d];
2722
- this.g[$.g] = $;
2761
+ var n = t[d];
2762
+ this.g[n.g] = n;
2723
2763
  }
2724
2764
  }
2725
- function C1(d) {
2726
- return d = n(d.g), d.sort(function(t, $) {
2727
- return t.g - $.g;
2765
+ function p2(d) {
2766
+ return d = i(d.g), d.sort(function(t, n) {
2767
+ return t.g - n.g;
2728
2768
  }), d;
2729
2769
  }
2730
- function B() {
2770
+ function P() {
2731
2771
  this.h = {}, this.j = this.m().g, this.g = this.l = null;
2732
2772
  }
2733
- B.prototype.has = function(d) {
2734
- return k(this, d.g);
2735
- }, B.prototype.get = function(d, t) {
2736
- return p(this, d.g, t);
2737
- }, B.prototype.set = function(d, t) {
2738
- M(this, d.g, t);
2739
- }, B.prototype.add = function(d, t) {
2740
- N1(this, d.g, t);
2773
+ P.prototype.has = function(d) {
2774
+ return x(this, d.g);
2775
+ }, P.prototype.get = function(d, t) {
2776
+ return m(this, d.g, t);
2777
+ }, P.prototype.set = function(d, t) {
2778
+ E(this, d.g, t);
2779
+ }, P.prototype.add = function(d, t) {
2780
+ b1(this, d.g, t);
2741
2781
  };
2742
- function L1(d, t) {
2743
- for (var $ = C1(d.m()), s = 0; s < $.length; s++) {
2744
- var r = $[s], a = r.g;
2745
- if (k(t, a)) {
2746
- d.g && delete d.g[r.g];
2747
- var u = r.h == 11 || r.h == 10;
2748
- if (r.l) {
2749
- r = P(t, a);
2750
- for (var c = 0; c < r.length; c++) N1(d, a, u ? r[c].clone() : r[c]);
2751
- } else r = s1(t, a), u ? (u = s1(d, a)) ? L1(u, r) : M(d, a, r.clone()) : M(d, a, r);
2782
+ function S1(d, t) {
2783
+ for (var n = p2(d.m()), r = 0; r < n.length; r++) {
2784
+ var o = n[r], a = o.g;
2785
+ if (x(t, a)) {
2786
+ d.g && delete d.g[o.g];
2787
+ var l = o.h == 11 || o.h == 10;
2788
+ if (o.l) {
2789
+ o = M(t, a);
2790
+ for (var p = 0; p < o.length; p++) b1(d, a, l ? o[p].clone() : o[p]);
2791
+ } else o = $1(t, a), l ? (l = $1(d, a)) ? S1(l, o) : E(d, a, o.clone()) : E(d, a, o);
2752
2792
  }
2753
2793
  }
2754
2794
  }
2755
- B.prototype.clone = function() {
2795
+ P.prototype.clone = function() {
2756
2796
  var d = new this.constructor();
2757
- return d != this && (d.h = {}, d.g && (d.g = {}), L1(d, this)), d;
2797
+ return d != this && (d.h = {}, d.g && (d.g = {}), S1(d, this)), d;
2758
2798
  };
2759
- function k(d, t) {
2799
+ function x(d, t) {
2760
2800
  return d.h[t] != null;
2761
2801
  }
2762
- function s1(d, t) {
2763
- var $ = d.h[t];
2764
- if ($ == null) return null;
2802
+ function $1(d, t) {
2803
+ var n = d.h[t];
2804
+ if (n == null) return null;
2765
2805
  if (d.l) {
2766
2806
  if (!(t in d.g)) {
2767
- var s = d.l, r = d.j[t];
2768
- if ($ != null) if (r.l) {
2769
- for (var a = [], u = 0; u < $.length; u++) a[u] = s.h(r, $[u]);
2770
- $ = a;
2771
- } else $ = s.h(r, $);
2772
- return d.g[t] = $;
2807
+ var r = d.l, o = d.j[t];
2808
+ if (n != null) if (o.l) {
2809
+ for (var a = [], l = 0; l < n.length; l++) a[l] = r.h(o, n[l]);
2810
+ n = a;
2811
+ } else n = r.h(o, n);
2812
+ return d.g[t] = n;
2773
2813
  }
2774
2814
  return d.g[t];
2775
2815
  }
2776
- return $;
2816
+ return n;
2777
2817
  }
2778
- function p(d, t, $) {
2779
- var s = s1(d, t);
2780
- return d.j[t].l ? s[$ || 0] : s;
2818
+ function m(d, t, n) {
2819
+ var r = $1(d, t);
2820
+ return d.j[t].l ? r[n || 0] : r;
2781
2821
  }
2782
- function b(d, t) {
2783
- if (k(d, t)) d = p(d, t);
2822
+ function w(d, t) {
2823
+ if (x(d, t)) d = m(d, t);
2784
2824
  else d: {
2785
2825
  if (d = d.j[t], d.j === void 0) if (t = d.s, t === Boolean) d.j = !1;
2786
2826
  else if (t === Number) d.j = 0;
@@ -2793,106 +2833,106 @@ const Z2 = (y) => {
2793
2833
  }
2794
2834
  return d;
2795
2835
  }
2796
- function P(d, t) {
2797
- return s1(d, t) || [];
2836
+ function M(d, t) {
2837
+ return $1(d, t) || [];
2798
2838
  }
2799
- function K(d, t) {
2800
- return d.j[t].l ? k(d, t) ? d.h[t].length : 0 : k(d, t) ? 1 : 0;
2839
+ function F(d, t) {
2840
+ return d.j[t].l ? x(d, t) ? d.h[t].length : 0 : x(d, t) ? 1 : 0;
2801
2841
  }
2802
- function M(d, t, $) {
2803
- d.h[t] = $, d.g && (d.g[t] = $);
2842
+ function E(d, t, n) {
2843
+ d.h[t] = n, d.g && (d.g[t] = n);
2804
2844
  }
2805
- function N1(d, t, $) {
2806
- d.h[t] || (d.h[t] = []), d.h[t].push($), d.g && delete d.g[t];
2845
+ function b1(d, t, n) {
2846
+ d.h[t] || (d.h[t] = []), d.h[t].push(n), d.g && delete d.g[t];
2807
2847
  }
2808
- function r1(d, t) {
2809
- var $ = [], s;
2810
- for (s in t) s != 0 && $.push(new w(s, t[s]));
2811
- return new n1(d, $);
2848
+ function n1(d, t) {
2849
+ var n = [], r;
2850
+ for (r in t) r != 0 && n.push(new R(r, t[r]));
2851
+ return new f2(d, n);
2812
2852
  }
2813
- function o1() {
2853
+ function i1() {
2814
2854
  }
2815
- o1.prototype.g = function(d) {
2855
+ i1.prototype.g = function(d) {
2816
2856
  throw new d.h(), Error("Unimplemented");
2817
- }, o1.prototype.h = function(d, t) {
2818
- if (d.h == 11 || d.h == 10) return t instanceof B ? t : this.g(d.s.prototype.m(), t);
2819
- if (d.h == 14) return typeof t == "string" && T1.test(t) && (d = Number(t), 0 < d) ? d : t;
2857
+ }, i1.prototype.h = function(d, t) {
2858
+ if (d.h == 11 || d.h == 10) return t instanceof P ? t : this.g(d.s.prototype.m(), t);
2859
+ if (d.h == 14) return typeof t == "string" && L1.test(t) && (d = Number(t), 0 < d) ? d : t;
2820
2860
  if (!d.o) return t;
2821
2861
  if (d = d.s, d === String) {
2822
2862
  if (typeof t == "number") return String(t);
2823
- } else if (d === Number && typeof t == "string" && (t === "Infinity" || t === "-Infinity" || t === "NaN" || T1.test(t))) return Number(t);
2863
+ } else if (d === Number && typeof t == "string" && (t === "Infinity" || t === "-Infinity" || t === "NaN" || L1.test(t))) return Number(t);
2824
2864
  return t;
2825
2865
  };
2826
- var T1 = /^-?[0-9]+$/;
2827
- function m1() {
2866
+ var L1 = /^-?[0-9]+$/;
2867
+ function p1() {
2828
2868
  }
2829
- i(m1, o1), m1.prototype.g = function(d, t) {
2869
+ $(p1, i1), p1.prototype.g = function(d, t) {
2830
2870
  return d = new d.h(), d.l = this, d.h = t, d.g = {}, d;
2831
2871
  };
2832
- function X() {
2872
+ function J() {
2833
2873
  }
2834
- i(X, m1), X.prototype.h = function(d, t) {
2835
- return d.h == 8 ? !!t : o1.prototype.h.apply(this, arguments);
2836
- }, X.prototype.g = function(d, t) {
2837
- return X.ma.g.call(this, d, t);
2874
+ $(J, p1), J.prototype.h = function(d, t) {
2875
+ return d.h == 8 ? !!t : i1.prototype.h.apply(this, arguments);
2876
+ }, J.prototype.g = function(d, t) {
2877
+ return J.ma.g.call(this, d, t);
2838
2878
  };
2839
- function E(d, t) {
2879
+ function N(d, t) {
2840
2880
  d != null && this.g.apply(this, arguments);
2841
2881
  }
2842
- E.prototype.h = "", E.prototype.set = function(d) {
2882
+ N.prototype.h = "", N.prototype.set = function(d) {
2843
2883
  this.h = "" + d;
2844
- }, E.prototype.g = function(d, t, $) {
2845
- if (this.h += String(d), t != null) for (let s = 1; s < arguments.length; s++) this.h += arguments[s];
2884
+ }, N.prototype.g = function(d, t, n) {
2885
+ if (this.h += String(d), t != null) for (let r = 1; r < arguments.length; r++) this.h += arguments[r];
2846
2886
  return this;
2847
2887
  };
2848
- function O(d) {
2888
+ function B(d) {
2849
2889
  d.h = "";
2850
2890
  }
2851
- E.prototype.toString = function() {
2891
+ N.prototype.toString = function() {
2852
2892
  return this.h;
2853
2893
  };
2854
- function z() {
2855
- B.call(this);
2894
+ function j() {
2895
+ P.call(this);
2896
+ }
2897
+ $(j, P);
2898
+ var N1 = null;
2899
+ function b() {
2900
+ P.call(this);
2856
2901
  }
2857
- i(z, B);
2902
+ $(b, P);
2858
2903
  var A1 = null;
2859
- function L() {
2860
- B.call(this);
2904
+ function W() {
2905
+ P.call(this);
2861
2906
  }
2862
- i(L, B);
2907
+ $(W, P);
2863
2908
  var E1 = null;
2864
- function Z() {
2865
- B.call(this);
2866
- }
2867
- i(Z, B);
2868
- var M1 = null;
2869
- z.prototype.m = function() {
2909
+ j.prototype.m = function() {
2910
+ var d = N1;
2911
+ return d || (N1 = d = n1(j, { 0: { name: "NumberFormat", ia: "i18n.phonenumbers.NumberFormat" }, 1: { name: "pattern", required: !0, i: 9, type: String }, 2: { name: "format", required: !0, i: 9, type: String }, 3: { name: "leading_digits_pattern", aa: !0, i: 9, type: String }, 4: { name: "national_prefix_formatting_rule", i: 9, type: String }, 6: { name: "national_prefix_optional_when_formatting", i: 8, defaultValue: !1, type: Boolean }, 5: { name: "domestic_carrier_code_formatting_rule", i: 9, type: String } })), d;
2912
+ }, j.m = j.prototype.m, b.prototype.m = function() {
2870
2913
  var d = A1;
2871
- return d || (A1 = d = r1(z, { 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;
2872
- }, z.m = z.prototype.m, L.prototype.m = function() {
2914
+ return d || (A1 = d = n1(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;
2915
+ }, b.m = b.prototype.m, W.prototype.m = function() {
2873
2916
  var d = E1;
2874
- return d || (E1 = d = r1(L, { 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;
2875
- }, L.m = L.prototype.m, Z.prototype.m = function() {
2876
- var d = M1;
2877
- return d || (M1 = d = r1(Z, {
2917
+ return d || (E1 = d = n1(W, {
2878
2918
  0: { name: "PhoneMetadata", ia: "i18n.phonenumbers.PhoneMetadata" },
2879
- 1: { name: "general_desc", i: 11, type: L },
2880
- 2: { name: "fixed_line", i: 11, type: L },
2881
- 3: { name: "mobile", i: 11, type: L },
2882
- 4: { name: "toll_free", i: 11, type: L },
2883
- 5: { name: "premium_rate", i: 11, type: L },
2884
- 6: { name: "shared_cost", i: 11, type: L },
2885
- 7: { name: "personal_number", i: 11, type: L },
2886
- 8: { name: "voip", i: 11, type: L },
2887
- 21: { name: "pager", i: 11, type: L },
2888
- 25: { name: "uan", i: 11, type: L },
2889
- 27: { name: "emergency", i: 11, type: L },
2890
- 28: { name: "voicemail", i: 11, type: L },
2891
- 29: { name: "short_code", i: 11, type: L },
2892
- 30: { name: "standard_rate", i: 11, type: L },
2893
- 31: { name: "carrier_specific", i: 11, type: L },
2894
- 33: { name: "sms_services", i: 11, type: L },
2895
- 24: { name: "no_international_dialling", i: 11, type: L },
2919
+ 1: { name: "general_desc", i: 11, type: b },
2920
+ 2: { name: "fixed_line", i: 11, type: b },
2921
+ 3: { name: "mobile", i: 11, type: b },
2922
+ 4: { name: "toll_free", i: 11, type: b },
2923
+ 5: { name: "premium_rate", i: 11, type: b },
2924
+ 6: { name: "shared_cost", i: 11, type: b },
2925
+ 7: { name: "personal_number", i: 11, type: b },
2926
+ 8: { name: "voip", i: 11, type: b },
2927
+ 21: { name: "pager", i: 11, type: b },
2928
+ 25: { name: "uan", i: 11, type: b },
2929
+ 27: { name: "emergency", i: 11, type: b },
2930
+ 28: { name: "voicemail", i: 11, type: b },
2931
+ 29: { name: "short_code", i: 11, type: b },
2932
+ 30: { name: "standard_rate", i: 11, type: b },
2933
+ 31: { name: "carrier_specific", i: 11, type: b },
2934
+ 33: { name: "sms_services", i: 11, type: b },
2935
+ 24: { name: "no_international_dialling", i: 11, type: b },
2896
2936
  9: { name: "id", required: !0, i: 9, type: String },
2897
2937
  10: { name: "country_code", i: 5, type: Number },
2898
2938
  11: { name: "international_prefix", i: 9, type: String },
@@ -2906,26 +2946,26 @@ const Z2 = (y) => {
2906
2946
  },
2907
2947
  16: { name: "national_prefix_transform_rule", i: 9, type: String },
2908
2948
  18: { name: "same_mobile_and_fixed_line_pattern", i: 8, defaultValue: !1, type: Boolean },
2909
- 19: { name: "number_format", aa: !0, i: 11, type: z },
2910
- 20: { name: "intl_number_format", aa: !0, i: 11, type: z },
2949
+ 19: { name: "number_format", aa: !0, i: 11, type: j },
2950
+ 20: { name: "intl_number_format", aa: !0, i: 11, type: j },
2911
2951
  22: { name: "main_country_for_code", i: 8, defaultValue: !1, type: Boolean },
2912
2952
  23: { name: "leading_digits", i: 9, type: String }
2913
2953
  })), d;
2914
- }, Z.m = Z.prototype.m;
2915
- function H() {
2916
- B.call(this);
2917
- }
2918
- i(H, B);
2919
- var D1 = null, p2 = { ra: 0, qa: 1, pa: 5, oa: 10, na: 20 };
2920
- H.prototype.m = function() {
2921
- var d = D1;
2922
- return d || (D1 = d = r1(H, { 0: { name: "PhoneNumber", ia: "i18n.phonenumbers.PhoneNumber" }, 1: { name: "country_code", required: !0, i: 5, type: Number }, 2: { name: "national_number", required: !0, i: 4, type: Number }, 3: { name: "extension", i: 9, type: String }, 4: { name: "italian_leading_zero", i: 8, type: Boolean }, 8: { name: "number_of_leading_zeros", i: 5, defaultValue: 1, type: Number }, 5: { name: "raw_input", i: 9, type: String }, 6: { name: "country_code_source", i: 14, defaultValue: 0, type: p2 }, 7: {
2954
+ }, W.m = W.prototype.m;
2955
+ function K() {
2956
+ P.call(this);
2957
+ }
2958
+ $(K, P);
2959
+ var T1 = null, g2 = { ra: 0, qa: 1, pa: 5, oa: 10, na: 20 };
2960
+ K.prototype.m = function() {
2961
+ var d = T1;
2962
+ return d || (T1 = d = n1(K, { 0: { name: "PhoneNumber", ia: "i18n.phonenumbers.PhoneNumber" }, 1: { name: "country_code", required: !0, i: 5, type: Number }, 2: { name: "national_number", required: !0, i: 4, type: Number }, 3: { name: "extension", i: 9, type: String }, 4: { name: "italian_leading_zero", i: 8, type: Boolean }, 8: { name: "number_of_leading_zeros", i: 5, defaultValue: 1, type: Number }, 5: { name: "raw_input", i: 9, type: String }, 6: { name: "country_code_source", i: 14, defaultValue: 0, type: g2 }, 7: {
2923
2963
  name: "preferred_domestic_carrier_code",
2924
2964
  i: 9,
2925
2965
  type: String
2926
2966
  } })), d;
2927
- }, H.ctor = H, H.ctor.m = H.prototype.m;
2928
- var Q = {
2967
+ }, K.ctor = K, K.ctor.m = K.prototype.m;
2968
+ var q = {
2929
2969
  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(" "),
2930
2970
  7: ["RU", "KZ"],
2931
2971
  20: ["EG"],
@@ -3141,7 +3181,7 @@ const Z2 = (y) => {
3141
3181
  995: ["GE"],
3142
3182
  996: ["KG"],
3143
3183
  998: ["UZ"]
3144
- }, P1 = {
3184
+ }, M1 = {
3145
3185
  AC: [, [
3146
3186
  ,
3147
3187
  ,
@@ -4329,12 +4369,12 @@ const Z2 = (y) => {
4329
4369
  ,
4330
4370
  ,
4331
4371
  [9]
4332
- ], [, , "(?:60[1-8]\\d|7(?:0(?:[2-5]\\d|60)|19[0-4]|[2379]\\d\\d))\\d{5}", , , , "601123456", , , [9]], [, , "800\\d{6}", , , , "800123456", , , [9]], [, , "9(?:0[05689]|76)\\d{6}", , , , "900123456", , , [9]], [, , "8[134]\\d{7}", , , , "811234567", , , [9]], [, , "70[01]\\d{6}", , , , "700123456", , , [9]], [, , "9[17]0\\d{6}", , , , "910123456", , , [9]], "CZ", 420, "00", , , , , , , , [
4333
- [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-8]|9[015-7]"]],
4334
- [, "(\\d{2})(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["96"]],
4335
- [, "(\\d{2})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]],
4336
- [, "(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]]
4337
- ], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , "9(?:5\\d|7[2-4])\\d{6}", , , , "972123456", , , [9]], , , [, , "9(?:3\\d{9}|6\\d{7,10})", , , , "93123456789"]],
4372
+ ], [, , "7(?:060\\d|19(?:[0-4]\\d|50))\\d{4}|(?:60[1-8]|7(?:0[2-5]|[2379]\\d))\\d{6}", , , , "601123456", , , [9]], [, , "800\\d{6}", , , , "800123456", , , [9]], [, , "9(?:0[05689]|76)\\d{6}", , , , "900123456", , , [9]], [, , "8[134]\\d{7}", , , , "811234567", , , [9]], [, , "70[01]\\d{6}", , , , "700123456", , , [9]], [, , "9[17]0\\d{6}", , , , "910123456", , , [9]], "CZ", 420, "00", , , , , , , , [[, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-8]|9[015-7]"]], [, "(\\d{2})(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["96"]], [
4373
+ ,
4374
+ "(\\d{2})(\\d{3})(\\d{3})(\\d{3})",
4375
+ "$1 $2 $3 $4",
4376
+ ["9"]
4377
+ ], [, "(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , "9(?:5\\d|7[2-4])\\d{6}", , , , "972123456", , , [9]], , , [, , "9(?:3\\d{9}|6\\d{7,10})", , , , "93123456789"]],
4338
4378
  DE: [, [, , "[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}", , , , , , , [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], [2, 3]], [
4339
4379
  ,
4340
4380
  ,
@@ -4355,6 +4395,7 @@ const Z2 = (y) => {
4355
4395
  ["3[02]|40|[68]9"],
4356
4396
  "0$1"
4357
4397
  ],
4398
+ [, "(\\d{6})", "$1", ["227", "2277"]],
4358
4399
  [, "(\\d{3})(\\d{3,12})", "$1 $2", ["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1", "2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"], "0$1"],
4359
4400
  [
4360
4401
  ,
@@ -4378,7 +4419,38 @@ const Z2 = (y) => {
4378
4419
  [, "(\\d{3})(\\d{2})(\\d{7,8})", "$1 $2 $3", ["1(?:6[023]|7)"], "0$1"],
4379
4420
  [, "(\\d{4})(\\d{2})(\\d{7})", "$1 $2 $3", ["15[279]"], "0$1"],
4380
4421
  [, "(\\d{3})(\\d{2})(\\d{8})", "$1 $2 $3", ["15"], "0$1"]
4381
- ], , [, , "16(?:4\\d{1,10}|[89]\\d{1,11})", , , , "16412345", , , [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]], , , [, , , , , , , , , [-1]], [, , "18(?:1\\d{5,11}|[2-9]\\d{8})", , , , "18500123456", , , [8, 9, 10, 11, 12, 13, 14]], , , [
4422
+ ], [
4423
+ [, "(\\d{2})(\\d{3,13})", "$1 $2", ["3[02]|40|[68]9"], "0$1"],
4424
+ [
4425
+ ,
4426
+ "(\\d{3})(\\d{3,12})",
4427
+ "$1 $2",
4428
+ ["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1", "2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],
4429
+ "0$1"
4430
+ ],
4431
+ [
4432
+ ,
4433
+ "(\\d{4})(\\d{2,11})",
4434
+ "$1 $2",
4435
+ ["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]", "[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],
4436
+ "0$1"
4437
+ ],
4438
+ [, "(\\d{3})(\\d{4})", "$1 $2", ["138"], "0$1"],
4439
+ [, "(\\d{5})(\\d{2,10})", "$1 $2", ["3"], "0$1"],
4440
+ [, "(\\d{3})(\\d{5,11})", "$1 $2", ["181"], "0$1"],
4441
+ [, "(\\d{3})(\\d)(\\d{4,10})", "$1 $2 $3", ["1(?:3|80)|9"], "0$1"],
4442
+ [, "(\\d{3})(\\d{7,8})", "$1 $2", ["1[67]"], "0$1"],
4443
+ [, "(\\d{3})(\\d{7,12})", "$1 $2", ["8"], "0$1"],
4444
+ [, "(\\d{5})(\\d{6})", "$1 $2", ["185", "1850", "18500"], "0$1"],
4445
+ [, "(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["7"], "0$1"],
4446
+ [, "(\\d{4})(\\d{7})", "$1 $2", ["18[68]"], "0$1"],
4447
+ [, "(\\d{4})(\\d{7})", "$1 $2", ["15[1279]"], "0$1"],
4448
+ [, "(\\d{5})(\\d{6})", "$1 $2", ["15[03568]", "15(?:[0568]|3[13])"], "0$1"],
4449
+ [, "(\\d{3})(\\d{8})", "$1 $2", ["18"], "0$1"],
4450
+ [, "(\\d{3})(\\d{2})(\\d{7,8})", "$1 $2 $3", ["1(?:6[023]|7)"], "0$1"],
4451
+ [, "(\\d{4})(\\d{2})(\\d{7})", "$1 $2 $3", ["15[279]"], "0$1"],
4452
+ [, "(\\d{3})(\\d{2})(\\d{8})", "$1 $2 $3", ["15"], "0$1"]
4453
+ ], [, , "16(?:4\\d{1,10}|[89]\\d{1,11})", , , , "16412345", , , [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]], , , [, , , , , , , , , [-1]], [, , "18(?:1\\d{5,11}|[2-9]\\d{8})", , , , "18500123456", , , [8, 9, 10, 11, 12, 13, 14]], , , [
4382
4454
  ,
4383
4455
  ,
4384
4456
  "1(?:6(?:013|255|399)|7(?:(?:[015]1|[69]3)3|[2-4]55|[78]99))\\d{7,8}|15(?:(?:[03-68]00|113)\\d|2\\d55|7\\d99|9\\d33)\\d{7}",
@@ -5476,17 +5548,14 @@ const Z2 = (y) => {
5476
5548
  ,
5477
5549
  [7]
5478
5550
  ], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "49[0-24-79]\\d{4}", , , , "4921234", , , [7]], "IS", 354, "00|1(?:0(?:01|[12]0)|100)", , , , , , "00", , [[, "(\\d{3})(\\d{4})", "$1 $2", ["[4-9]"]], [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["3"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , "809\\d{4}", , , , "8091234", , , [7]], , , [, , "(?:689|8(?:7[18]|80)|95[48])\\d{4}", , , , "6891234", , , [7]]],
5479
- IT: [, [, , "0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?", , , , , , , [6, 7, 8, 9, 10, 11, 12]], [
5480
- ,
5551
+ IT: [, [, , "0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?", , , , , , , [6, 7, 8, 9, 10, 11, 12]], [
5481
5552
  ,
5482
- "0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}",
5483
5553
  ,
5554
+ "0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}",
5484
5555
  ,
5485
5556
  ,
5486
- "0212345678",
5487
5557
  ,
5488
- ,
5489
- [6, 7, 8, 9, 10, 11]
5558
+ "0212345678"
5490
5559
  ], [, , "3[2-9]\\d{7,8}|(?:31|43)\\d{8}", , , , "3123456789", , , [9, 10]], [, , "80(?:0\\d{3}|3)\\d{3}", , , , "800123456", , , [6, 9]], [, , "(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}", , , , "899123456", , , [6, 8, 9, 10]], [, , "84(?:[08]\\d{3}|[17])\\d{3}", , , , "848123456", , , [6, 9]], [, , "1(?:78\\d|99)\\d{6}", , , , "1781234567", , , [9, 10]], [, , "55\\d{8}", , , , "5512345678", , , [10]], "IT", 39, "00", , , , , , , , [
5491
5560
  [, "(\\d{4,5})", "$1", ["1(?:0|9[246])", "1(?:0|9(?:2[2-9]|[46]))"]],
5492
5561
  [, "(\\d{6})", "$1", ["1(?:1|92)"]],
@@ -5499,13 +5568,13 @@ const Z2 = (y) => {
5499
5568
  [, "(\\d{3})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0[13-57-9][0159]|14"]],
5500
5569
  [, "(\\d{2})(\\d{4})(\\d{5})", "$1 $2 $3", ["0[26]"]],
5501
5570
  [, "(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["0"]],
5502
- [, "(\\d{3})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["3"]]
5571
+ [, "(\\d{3})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["[03]"]]
5503
5572
  ], [[, "(\\d{2})(\\d{4,6})", "$1 $2", ["0[26]"]], [, "(\\d{3})(\\d{3,6})", "$1 $2", ["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])", "0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]], [, "(\\d{4})(\\d{2,6})", "$1 $2", ["0(?:[13-579][2-46-8]|8[236-8])"]], [, "(\\d{4})(\\d{4})", "$1 $2", ["894"]], [, "(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0[26]|5"]], [
5504
5573
  ,
5505
5574
  "(\\d{3})(\\d{3})(\\d{3,4})",
5506
5575
  "$1 $2 $3",
5507
5576
  ["1(?:44|[679])|[378]|43"]
5508
- ], [, "(\\d{3})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0[13-57-9][0159]|14"]], [, "(\\d{2})(\\d{4})(\\d{5})", "$1 $2 $3", ["0[26]"]], [, "(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["0"]], [, "(\\d{3})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["3"]]], [, , , , , , , , , [-1]], 1, , [, , "848\\d{6}", , , , , , , [9]], [, , , , , , , , , [-1]], , , [, , "3[2-8]\\d{9,10}", , , , "33101234501", , , [11, 12]]],
5577
+ ], [, "(\\d{3})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0[13-57-9][0159]|14"]], [, "(\\d{2})(\\d{4})(\\d{5})", "$1 $2 $3", ["0[26]"]], [, "(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["0"]], [, "(\\d{3})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["[03]"]]], [, , , , , , , , , [-1]], 1, , [, , "848\\d{6}", , , , , , , [9]], [, , , , , , , , , [-1]], , , [, , "3[2-8]\\d{9,10}", , , , "33101234501", , , [11, 12]]],
5509
5578
  JE: [, [, , "1534\\d{6}|(?:[3578]\\d|90)\\d{8}", , , , , , , [10], [6]], [, , "1534[0-24-8]\\d{5}", , , , "1534456789", , , , [6]], [
5510
5579
  ,
5511
5580
  ,
@@ -5888,7 +5957,7 @@ const Z2 = (y) => {
5888
5957
  ,
5889
5958
  "5002345678"
5890
5959
  ], [, , , , , , , , , [-1]], "LC", 1, "011", "1", , , "([2-8]\\d{6})$|1", "758$1", , , , , [, , , , , , , , , [-1]], , "758", [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
5891
- LI: [, [, , "[68]\\d{8}|(?:[2378]\\d|90)\\d{5}", , , , , , , [7, 9]], [, , "(?:2(?:01|1[27]|2[024]|3\\d|6[02-578]|96)|3(?:[24]0|33|7[0135-7]|8[048]|9[0269]))\\d{4}", , , , "2345678", , , [7]], [, , "(?:6(?:(?:4[5-9]|5[0-46-9])\\d|6(?:[024-6]\\d|[17]0|3[7-9]))\\d|7(?:[37-9]\\d|42|56))\\d{4}", , , , "660234567"], [, , "8002[28]\\d\\d|80(?:05\\d|9)\\d{4}", , , , "8002222"], [
5960
+ LI: [, [, , "[68]\\d{8}|(?:[2378]\\d|90)\\d{5}", , , , , , , [7, 9]], [, , "(?:2(?:01|1[27]|2[024]|3\\d|6[02-578]|96)|3(?:[24]0|33|7[0135-7]|8[048]|9[0269]))\\d{4}", , , , "2345678", , , [7]], [, , "(?:6(?:(?:4[5-9]|5\\d)\\d|6(?:[024-6]\\d|[17]0|3[7-9]))\\d|7(?:[37-9]\\d|42|56))\\d{4}", , , , "660234567"], [, , "8002[28]\\d\\d|80(?:05\\d|9)\\d{4}", , , , "8002222"], [
5892
5961
  ,
5893
5962
  ,
5894
5963
  "90(?:02[258]|1(?:23|3[14])|66[136])\\d\\d",
@@ -5997,7 +6066,7 @@ const Z2 = (y) => {
5997
6066
  ,
5998
6067
  "$CC $1"
5999
6068
  ], [, "(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["20"], , "$CC $1"], [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"], , "$CC $1"], [, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})", "$1 $2 $3 $4 $5", ["2(?:[0367]|4[3-8])"], , "$CC $1"], [, "(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})", "$1 $2 $3 $4", ["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"], , "$CC $1"]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
6000
- LV: [, [, , "(?:[268]\\d|90)\\d{6}", , , , , , , [8]], [
6069
+ LV: [, [, , "(?:[268]\\d|78|90)\\d{6}", , , , , , , [8]], [
6001
6070
  ,
6002
6071
  ,
6003
6072
  "6\\d{7}",
@@ -6005,7 +6074,7 @@ const Z2 = (y) => {
6005
6074
  ,
6006
6075
  ,
6007
6076
  "63123456"
6008
- ], [, , "2333[0-8]\\d{3}|2(?:[0-24-9]\\d\\d|3(?:0[07]|[14-9]\\d|2[02-9]|3[0-24-9]))\\d{4}", , , , "21234567"], [, , "80\\d{6}", , , , "80123456"], [, , "90\\d{6}", , , , "90123456"], [, , "81\\d{6}", , , , "81123456"], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "LV", 371, "00", , , , , , , , [[, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[269]|8[01]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
6077
+ ], [, , "2333[0-8]\\d{3}|2(?:[0-24-9]\\d\\d|3(?:0[07]|[14-9]\\d|2[02-9]|3[0-24-9]))\\d{4}", , , , "21234567"], [, , "80\\d{6}", , , , "80123456"], [, , "90\\d{6}", , , , "90123456"], [, , "81\\d{6}", , , , "81123456"], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "LV", 371, "00", , , , , , , , [[, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2679]|8[01]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
6009
6078
  LY: [, [, , "[2-9]\\d{8}", , , , , , , [9], [7]], [
6010
6079
  ,
6011
6080
  ,
@@ -6067,7 +6136,7 @@ const Z2 = (y) => {
6067
6136
  ,
6068
6137
  [8],
6069
6138
  [6]
6070
- ], [, , "6(?:[07-9]\\d|3[024]|6[0-25])\\d{5}", , , , "67622901", , , [8]], [, , "80(?:[0-2578]|9\\d)\\d{5}", , , , "80080002"], [, , "9(?:4[1568]|5[178])\\d{5}", , , , "94515151", , , [8]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "78[1-49]\\d{5}", , , , "78108780", , , [8]], "ME", 382, "00", "0", , , "0", , , , [[, "(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-9]"], "0$1"]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , "77[1-9]\\d{5}", , , , "77273012", , , [8]], , , [, , , , , , , , , [-1]]],
6139
+ ], [, , "6(?:[07-9]\\d|3[024]|6[0-25])\\d{5}", , , , "60123456", , , [8]], [, , "80(?:[0-2578]|9\\d)\\d{5}", , , , "80080002"], [, , "9(?:4[1568]|5[178])\\d{5}", , , , "94515151", , , [8]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "78[1-49]\\d{5}", , , , "78108780", , , [8]], "ME", 382, "00", "0", , , "0", , , , [[, "(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-9]"], "0$1"]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , "77[1-9]\\d{5}", , , , "77273012", , , [8]], , , [, , , , , , , , , [-1]]],
6071
6140
  MF: [
6072
6141
  ,
6073
6142
  [, , "(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}", , , , , , , [9]],
@@ -7155,7 +7224,7 @@ const Z2 = (y) => {
7155
7224
  ,
7156
7225
  ,
7157
7226
  [8]
7158
- ], [, , "8980\\d{4}|(?:8(?:0[1-9]|[1-8]\\d|9[0-7])|9[0-8]\\d)\\d{5}", , , , "81234567", , , [8]], [, , "(?:18|8)00\\d{7}", , , , "18001234567", , , [10, 11]], [, , "1900\\d{7}", , , , "19001234567", , , [11]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "(?:3[12]\\d|666)\\d{5}", , , , "31234567", , , [8]], "SG", 65, "0[0-3]\\d", , , , , , , , [[, "(\\d{4,5})", "$1", ["1[013-9]|77", "1(?:[013-8]|9(?:0[1-9]|[1-9]))|77"]], [, "(\\d{4})(\\d{4})", "$1 $2", ["[369]|8(?:0[1-9]|[1-9])"]], [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]], [
7227
+ ], [, , "898[02-8]\\d{4}|(?:8(?:0[1-9]|[1-8]\\d|9[0-7])|9[0-8]\\d)\\d{5}", , , , "81234567", , , [8]], [, , "(?:18|8)00\\d{7}", , , , "18001234567", , , [10, 11]], [, , "1900\\d{7}", , , , "19001234567", , , [11]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "(?:3[12]\\d|666)\\d{5}", , , , "31234567", , , [8]], "SG", 65, "0[0-3]\\d", , , , , , , , [[, "(\\d{4,5})", "$1", ["1[013-9]|77", "1(?:[013-8]|9(?:0[1-9]|[1-9]))|77"]], [, "(\\d{4})(\\d{4})", "$1 $2", ["[369]|8(?:0[1-9]|[1-9])"]], [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]], [
7159
7228
  ,
7160
7229
  "(\\d{4})(\\d{4})(\\d{3})",
7161
7230
  "$1 $2 $3",
@@ -7733,7 +7802,7 @@ const Z2 = (y) => {
7733
7802
  ], [
7734
7803
  ,
7735
7804
  ,
7736
- "(?:3052(?:0[0-8]|[1-9]\\d)|5056(?:[0-35-9]\\d|4[0-68]))\\d{4}|(?:2742|305[3-9]|(?:472|983)[2-47-9]|505[2-57-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[0135-79]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}",
7805
+ "(?:3052(?:0[0-8]|[1-9]\\d)|5056(?:[0-35-9]\\d|4[0-68]))\\d{4}|(?:2742|305[3-9]|(?:472|983)[2-47-9]|505[2-57-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[0135-79]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}",
7737
7806
  ,
7738
7807
  ,
7739
7808
  ,
@@ -7745,7 +7814,7 @@ const Z2 = (y) => {
7745
7814
  ], [
7746
7815
  ,
7747
7816
  ,
7748
- "(?:3052(?:0[0-8]|[1-9]\\d)|5056(?:[0-35-9]\\d|4[0-68]))\\d{4}|(?:2742|305[3-9]|(?:472|983)[2-47-9]|505[2-57-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[0135-79]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}",
7817
+ "(?:3052(?:0[0-8]|[1-9]\\d)|5056(?:[0-35-9]\\d|4[0-68]))\\d{4}|(?:2742|305[3-9]|(?:472|983)[2-47-9]|505[2-57-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[0135-79]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}",
7749
7818
  ,
7750
7819
  ,
7751
7820
  ,
@@ -8246,13 +8315,13 @@ const Z2 = (y) => {
8246
8315
  ], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "001", 888, , , , , , , , 1, [[, "(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3"]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , "\\d{11}", , , , "12345678901"], , , [, , , , , , , , , [-1]]],
8247
8316
  979: [, [, , "[1359]\\d{8}", , , , , , , [9], [8]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "[1359]\\d{8}", , , , "123456789", , , , [8]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "001", 979, , , , , , , , 1, [[, "(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[1359]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]]
8248
8317
  };
8249
- function D() {
8318
+ function T() {
8250
8319
  this.g = {};
8251
8320
  }
8252
- D.h = void 0, D.g = function() {
8253
- return D.h ? D.h : D.h = new D();
8321
+ T.h = void 0, T.g = function() {
8322
+ return T.h ? T.h : T.h = new T();
8254
8323
  };
8255
- var y1 = { 0: "0", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", "0": "0", "1": "1", "2": "2", "3": "3", "4": "4", "5": "5", "6": "6", "7": "7", "8": "8", "9": "9", "٠": "0", "١": "1", "٢": "2", "٣": "3", "٤": "4", "٥": "5", "٦": "6", "٧": "7", "٨": "8", "٩": "9", "۰": "0", "۱": "1", "۲": "2", "۳": "3", "۴": "4", "۵": "5", "۶": "6", "۷": "7", "۸": "8", "۹": "9" }, g2 = {
8324
+ var g1 = { 0: "0", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", "0": "0", "1": "1", "2": "2", "3": "3", "4": "4", "5": "5", "6": "6", "7": "7", "8": "8", "9": "9", "٠": "0", "١": "1", "٢": "2", "٣": "3", "٤": "4", "٥": "5", "٦": "6", "٧": "7", "٨": "8", "٩": "9", "۰": "0", "۱": "1", "۲": "2", "۳": "3", "۴": "4", "۵": "5", "۶": "6", "۷": "7", "۸": "8", "۹": "9" }, m2 = {
8256
8325
  0: "0",
8257
8326
  1: "1",
8258
8327
  2: "2",
@@ -8333,154 +8402,154 @@ const Z2 = (y) => {
8333
8402
  X: "9",
8334
8403
  Y: "9",
8335
8404
  Z: "9"
8336
- }, m2 = RegExp("[++]+"), d1 = RegExp("^[++]+"), x1 = RegExp("([0-90-9٠-٩۰-۹])"), y2 = RegExp("[++0-90-9٠-٩۰-۹]"), _2 = /[\\\/] *x/, I2 = RegExp("[^0-90-9٠-٩۰-۹A-Za-z#]+$"), v2 = /(?:.*?[A-Za-z]){3}.*/, w2 = RegExp("^\\+([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*[0-90-9٠-٩۰-۹]([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*$"), S2 = RegExp("^([A-Za-z0-90-9٠-٩۰-۹]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.)*[A-Za-z]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.?$");
8337
- function J(d) {
8405
+ }, y2 = RegExp("[++]+"), X = RegExp("^[++]+"), D1 = RegExp("([0-90-9٠-٩۰-۹])"), _2 = RegExp("[++0-90-9٠-٩۰-۹]"), I2 = /[\\\/] *x/, v2 = RegExp("[^0-90-9٠-٩۰-۹A-Za-z#]+$"), w2 = /(?:.*?[A-Za-z]){3}.*/, S2 = RegExp("^\\+([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*[0-90-9٠-٩۰-۹]([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*$"), b2 = RegExp("^([A-Za-z0-90-9٠-٩۰-۹]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.)*[A-Za-z]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.?$");
8406
+ function Y(d) {
8338
8407
  return "([0-90-9٠-٩۰-۹]{1," + d + "})";
8339
8408
  }
8340
- function R1() {
8341
- 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") + "#?");
8409
+ function P1() {
8410
+ 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") + "#?");
8342
8411
  }
8343
- var B1 = new RegExp("(?:" + R1() + ")$", "i"), b2 = new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^[++]*(?:[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~*]*[0-90-9٠-٩۰-۹]){3,}[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~*A-Za-z0-90-9٠-٩۰-۹]*(?:" + R1() + ")?$", "i"), L2 = /(\$\d)/, N2 = /^\(?\$1\)?$/;
8344
- function k1(d) {
8345
- return 2 > d.length ? !1 : U(b2, d);
8412
+ var x1 = new RegExp("(?:" + P1() + ")$", "i"), L2 = new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^[++]*(?:[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~*]*[0-90-9٠-٩۰-۹]){3,}[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~*A-Za-z0-90-9٠-٩۰-۹]*(?:" + P1() + ")?$", "i"), N2 = /(\$\d)/, A2 = /^\(?\$1\)?$/;
8413
+ function B1(d) {
8414
+ return 2 > d.length ? !1 : G(L2, d);
8346
8415
  }
8347
- function O1(d) {
8348
- return U(v2, d) ? a1(d, C2) : a1(d, y1);
8416
+ function R1(d) {
8417
+ return G(w2, d) ? s1(d, C2) : s1(d, g1);
8349
8418
  }
8350
- function G1(d) {
8351
- var t = O1(d.toString());
8352
- O(d), d.g(t);
8419
+ function k1(d) {
8420
+ var t = R1(d.toString());
8421
+ B(d), d.g(t);
8353
8422
  }
8354
- function F1(d) {
8355
- return d != null && (K(d, 9) != 1 || P(d, 9)[0] != -1);
8423
+ function O1(d) {
8424
+ return d != null && (F(d, 9) != 1 || M(d, 9)[0] != -1);
8356
8425
  }
8357
- function a1(d, t) {
8358
- for (var $ = new E(), s, r = d.length, a = 0; a < r; ++a) s = d.charAt(a), s = t[s.toUpperCase()], s != null && $.g(s);
8359
- return $.toString();
8426
+ function s1(d, t) {
8427
+ for (var n = new N(), r, o = d.length, a = 0; a < o; ++a) r = d.charAt(a), r = t[r.toUpperCase()], r != null && n.g(r);
8428
+ return n.toString();
8360
8429
  }
8361
- function U1(d) {
8362
- return d.length == 0 || N2.test(d);
8430
+ function G1(d) {
8431
+ return d.length == 0 || A2.test(d);
8363
8432
  }
8364
- function u1(d) {
8365
- return d != null && isNaN(d) && d.toUpperCase() in P1;
8433
+ function r1(d) {
8434
+ return d != null && isNaN(d) && d.toUpperCase() in M1;
8366
8435
  }
8367
- D.prototype.format = function(d, t) {
8368
- if (p(d, 2) == 0 && k(d, 5)) {
8369
- var $ = b(d, 5);
8370
- if (0 < $.length) return $;
8436
+ T.prototype.format = function(d, t) {
8437
+ if (m(d, 2) == 0 && x(d, 5)) {
8438
+ var n = w(d, 5);
8439
+ if (0 < n.length) return n;
8371
8440
  }
8372
- $ = b(d, 1);
8373
- var s = e1(d);
8374
- if (t == 0) return V1($, 0, s, "");
8375
- if (!($ in Q)) return s;
8376
- var r = t1(this, $, $1($));
8377
- d = k(d, 3) && p(d, 3).length != 0 ? t == 3 ? ";ext=" + p(d, 3) : k(r, 13) ? p(r, 13) + b(d, 3) : " ext. " + b(d, 3) : "";
8441
+ n = w(d, 1);
8442
+ var r = d1(d);
8443
+ if (t == 0) return U1(n, 0, r, "");
8444
+ if (!(n in q)) return r;
8445
+ var o = Q(this, n, t1(n));
8446
+ d = x(d, 3) && m(d, 3).length != 0 ? t == 3 ? ";ext=" + m(d, 3) : x(o, 13) ? m(o, 13) + w(d, 3) : " ext. " + w(d, 3) : "";
8378
8447
  d: {
8379
- r = P(r, 20).length == 0 || t == 2 ? P(r, 19) : P(r, 20);
8380
- for (var a, u = r.length, c = 0; c < u; ++c) {
8381
- a = r[c];
8382
- var _ = K(a, 3);
8383
- if ((_ == 0 || s.search(p(a, 3, _ - 1)) == 0) && (_ = new RegExp(p(a, 1)), U(_, s))) {
8384
- r = a;
8448
+ o = M(o, 20).length == 0 || t == 2 ? M(o, 19) : M(o, 20);
8449
+ for (var a, l = o.length, p = 0; p < l; ++p) {
8450
+ a = o[p];
8451
+ var _ = F(a, 3);
8452
+ if ((_ == 0 || r.search(m(a, 3, _ - 1)) == 0) && (_ = new RegExp(m(a, 1)), G(_, r))) {
8453
+ o = a;
8385
8454
  break d;
8386
8455
  }
8387
8456
  }
8388
- r = null;
8457
+ o = null;
8389
8458
  }
8390
- return r != null && (u = r, r = b(u, 2), a = new RegExp(p(u, 1)), b(
8391
- u,
8459
+ return o != null && (l = o, o = w(l, 2), a = new RegExp(m(l, 1)), w(
8460
+ l,
8392
8461
  5
8393
- ), u = b(u, 4), s = t == 2 && u != null && 0 < u.length ? s.replace(a, r.replace(L2, u)) : s.replace(a, r), t == 3 && (s = s.replace(RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+"), ""), s = s.replace(RegExp("[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))), V1($, t, s, d);
8462
+ ), l = w(l, 4), r = t == 2 && l != null && 0 < l.length ? r.replace(a, o.replace(N2, l)) : r.replace(a, o), t == 3 && (r = r.replace(RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+"), ""), r = r.replace(RegExp("[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))), U1(n, t, r, d);
8394
8463
  };
8395
- function t1(d, t, $) {
8396
- return $ == "001" ? j(d, "" + t) : j(d, $);
8464
+ function Q(d, t, n) {
8465
+ return n == "001" ? V(d, "" + t) : V(d, n);
8397
8466
  }
8398
- function e1(d) {
8399
- if (!k(d, 2)) return "";
8400
- var t = "" + p(d, 2);
8401
- return k(d, 4) && p(d, 4) && 0 < b(d, 8) ? Array(b(d, 8) + 1).join("0") + t : t;
8467
+ function d1(d) {
8468
+ if (!x(d, 2)) return "";
8469
+ var t = "" + m(d, 2);
8470
+ return x(d, 4) && m(d, 4) && 0 < w(d, 8) ? Array(w(d, 8) + 1).join("0") + t : t;
8402
8471
  }
8403
- function V1(d, t, $, s) {
8472
+ function U1(d, t, n, r) {
8404
8473
  switch (t) {
8405
8474
  case 0:
8406
- return "+" + d + $ + s;
8475
+ return "+" + d + n + r;
8407
8476
  case 1:
8408
- return "+" + d + " " + $ + s;
8477
+ return "+" + d + " " + n + r;
8409
8478
  case 3:
8410
- return "tel:+" + d + "-" + $ + s;
8479
+ return "tel:+" + d + "-" + n + r;
8411
8480
  default:
8412
- return $ + s;
8481
+ return n + r;
8413
8482
  }
8414
8483
  }
8415
- function l1(d, t) {
8484
+ function o1(d, t) {
8416
8485
  switch (t) {
8417
8486
  case 4:
8418
- return p(d, 5);
8487
+ return m(d, 5);
8419
8488
  case 3:
8420
- return p(d, 4);
8489
+ return m(d, 4);
8421
8490
  case 1:
8422
- return p(d, 3);
8491
+ return m(d, 3);
8423
8492
  case 0:
8424
8493
  case 2:
8425
- return p(d, 2);
8494
+ return m(d, 2);
8426
8495
  case 5:
8427
- return p(d, 6);
8496
+ return m(d, 6);
8428
8497
  case 6:
8429
- return p(d, 8);
8498
+ return m(d, 8);
8430
8499
  case 7:
8431
- return p(d, 7);
8500
+ return m(d, 7);
8432
8501
  case 8:
8433
- return p(d, 21);
8502
+ return m(d, 21);
8434
8503
  case 9:
8435
- return p(d, 25);
8504
+ return m(d, 25);
8436
8505
  case 10:
8437
- return p(d, 28);
8506
+ return m(d, 28);
8438
8507
  default:
8439
- return p(d, 1);
8508
+ return m(d, 1);
8440
8509
  }
8441
8510
  }
8442
- function K1(d, t) {
8443
- var $ = H1(d, t);
8444
- return d = t1(d, b(t, 1), $), d == null ? -1 : (t = e1(t), _1(t, d));
8511
+ function F1(d, t) {
8512
+ var n = K1(d, t);
8513
+ return d = Q(d, w(t, 1), n), d == null ? -1 : (t = d1(t), m1(t, d));
8445
8514
  }
8446
- function _1(d, t) {
8447
- return F(d, p(t, 1)) ? F(d, p(t, 5)) ? 4 : F(d, p(t, 4)) ? 3 : F(d, p(t, 6)) ? 5 : F(d, p(t, 8)) ? 6 : F(d, p(t, 7)) ? 7 : F(d, p(t, 21)) ? 8 : F(d, p(t, 25)) ? 9 : F(d, p(t, 28)) ? 10 : F(d, p(t, 2)) ? p(t, 18) || F(d, p(t, 3)) ? 2 : 0 : !p(t, 18) && F(d, p(t, 3)) ? 1 : -1 : -1;
8515
+ function m1(d, t) {
8516
+ return O(d, m(t, 1)) ? O(d, m(t, 5)) ? 4 : O(d, m(t, 4)) ? 3 : O(d, m(t, 6)) ? 5 : O(d, m(t, 8)) ? 6 : O(d, m(t, 7)) ? 7 : O(d, m(t, 21)) ? 8 : O(d, m(t, 25)) ? 9 : O(d, m(t, 28)) ? 10 : O(d, m(t, 2)) ? m(t, 18) || O(d, m(t, 3)) ? 2 : 0 : !m(t, 18) && O(d, m(t, 3)) ? 1 : -1 : -1;
8448
8517
  }
8449
- function j(d, t) {
8518
+ function V(d, t) {
8450
8519
  if (t == null) return null;
8451
8520
  t = t.toUpperCase();
8452
- var $ = d.g[t];
8453
- if ($ == null) {
8454
- if ($ = P1[t], $ == null) return null;
8455
- $ = new X().g(Z.m(), $), d.g[t] = $;
8521
+ var n = d.g[t];
8522
+ if (n == null) {
8523
+ if (n = M1[t], n == null) return null;
8524
+ n = new J().g(W.m(), n), d.g[t] = n;
8456
8525
  }
8457
- return $;
8526
+ return n;
8458
8527
  }
8459
- function F(d, t) {
8460
- var $ = d.length;
8461
- return 0 < K(t, 9) && P(t, 9).indexOf($) == -1 ? !1 : U(b(t, 2), d);
8528
+ function O(d, t) {
8529
+ var n = d.length;
8530
+ return 0 < F(t, 9) && M(t, 9).indexOf(n) == -1 ? !1 : G(w(t, 2), d);
8462
8531
  }
8463
- function T2(d, t) {
8464
- var $ = H1(d, t), s = b(t, 1), r = t1(d, s, $);
8465
- return r == null || $ != "001" && s != j1(d, $) ? r = !1 : (d = e1(t), r = _1(d, r) != -1), r;
8532
+ function E2(d, t) {
8533
+ var n = K1(d, t), r = w(t, 1), o = Q(d, r, n);
8534
+ return o == null || n != "001" && r != V1(d, n) ? o = !1 : (d = d1(t), o = m1(d, o) != -1), o;
8466
8535
  }
8467
- function H1(d, t) {
8536
+ function K1(d, t) {
8468
8537
  if (t == null) return null;
8469
- var $ = b(t, 1);
8470
- if ($ = Q[$], $ == null) d = null;
8471
- else if ($.length == 1) d = $[0];
8538
+ var n = w(t, 1);
8539
+ if (n = q[n], n == null) d = null;
8540
+ else if (n.length == 1) d = n[0];
8472
8541
  else d: {
8473
- t = e1(t);
8474
- for (var s, r = $.length, a = 0; a < r; a++) {
8475
- s = $[a];
8476
- var u = j(d, s);
8477
- if (k(u, 23)) {
8478
- if (t.search(p(u, 23)) == 0) {
8479
- d = s;
8542
+ t = d1(t);
8543
+ for (var r, o = n.length, a = 0; a < o; a++) {
8544
+ r = n[a];
8545
+ var l = V(d, r);
8546
+ if (x(l, 23)) {
8547
+ if (t.search(m(l, 23)) == 0) {
8548
+ d = r;
8480
8549
  break d;
8481
8550
  }
8482
- } else if (_1(t, u) != -1) {
8483
- d = s;
8551
+ } else if (m1(t, l) != -1) {
8552
+ d = r;
8484
8553
  break d;
8485
8554
  }
8486
8555
  }
@@ -8488,151 +8557,151 @@ const Z2 = (y) => {
8488
8557
  }
8489
8558
  return d;
8490
8559
  }
8491
- function $1(d) {
8492
- return d = Q[d], d == null ? "ZZ" : d[0];
8560
+ function t1(d) {
8561
+ return d = q[d], d == null ? "ZZ" : d[0];
8493
8562
  }
8494
- function j1(d, t) {
8495
- if (d = j(d, t), d == null) throw Error("Invalid region code: " + t);
8496
- return b(d, 10);
8563
+ function V1(d, t) {
8564
+ if (d = V(d, t), d == null) throw Error("Invalid region code: " + t);
8565
+ return w(d, 10);
8497
8566
  }
8498
- function h1(d, t, $, s) {
8499
- var r = l1($, s), a = K(r, 9) == 0 ? P(p($, 1), 9) : P(r, 9);
8500
- if (r = P(r, 10), s == 2) if (F1(l1($, 0))) d = l1($, 1), F1(d) && (a = a.concat(K(d, 9) == 0 ? P(p($, 1), 9) : P(d, 9)), a.sort(), r.length == 0 ? r = P(d, 10) : (r = r.concat(P(d, 10)), r.sort()));
8501
- else return h1(d, t, $, 1);
8502
- return a[0] == -1 ? 5 : (t = t.length, -1 < r.indexOf(t) ? 4 : ($ = a[0], $ == t ? 0 : $ > t ? 2 : a[a.length - 1] < t ? 3 : -1 < a.indexOf(t, 1) ? 0 : 5));
8567
+ function a1(d, t, n, r) {
8568
+ var o = o1(n, r), a = F(o, 9) == 0 ? M(m(n, 1), 9) : M(o, 9);
8569
+ if (o = M(o, 10), r == 2) if (O1(o1(n, 0))) d = o1(n, 1), O1(d) && (a = a.concat(F(d, 9) == 0 ? M(m(n, 1), 9) : M(d, 9)), a.sort(), o.length == 0 ? o = M(d, 10) : (o = o.concat(M(d, 10)), o.sort()));
8570
+ else return a1(d, t, n, 1);
8571
+ return a[0] == -1 ? 5 : (t = t.length, -1 < o.indexOf(t) ? 4 : (n = a[0], n == t ? 0 : n > t ? 2 : a[a.length - 1] < t ? 3 : -1 < a.indexOf(t, 1) ? 0 : 5));
8503
8572
  }
8504
- function c1(d, t, $) {
8505
- var s = e1(t);
8506
- return t = b(t, 1), t in Q ? (t = t1(d, t, $1(t)), h1(d, s, t, $)) : 1;
8573
+ function u1(d, t, n) {
8574
+ var r = d1(t);
8575
+ return t = w(t, 1), t in q ? (t = Q(d, t, t1(t)), a1(d, r, t, n)) : 1;
8507
8576
  }
8508
- function W1(d, t) {
8577
+ function H1(d, t) {
8509
8578
  if (d = d.toString(), d.length == 0 || d.charAt(0) == "0") return 0;
8510
- 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)), $;
8579
+ for (var n, r = d.length, o = 1; 3 >= o && o <= r; ++o) if (n = parseInt(d.substring(0, o), 10), n in q) return t.g(d.substring(o)), n;
8511
8580
  return 0;
8512
8581
  }
8513
- function z1(d, t, $, s, r, a) {
8582
+ function j1(d, t, n, r, o, a) {
8514
8583
  if (t.length == 0) return 0;
8515
- t = new E(t);
8516
- var u;
8517
- $ != null && (u = p($, 11)), u == null && (u = "NonMatch");
8518
- var c = t.toString();
8519
- if (c.length == 0) u = 20;
8520
- else if (d1.test(c)) c = c.replace(d1, ""), O(t), t.g(O1(c)), u = 1;
8584
+ t = new N(t);
8585
+ var l;
8586
+ n != null && (l = m(n, 11)), l == null && (l = "NonMatch");
8587
+ var p = t.toString();
8588
+ if (p.length == 0) l = 20;
8589
+ else if (X.test(p)) p = p.replace(X, ""), B(t), t.g(R1(p)), l = 1;
8521
8590
  else {
8522
- if (c = new RegExp(u), G1(t), u = t.toString(), u.search(c) == 0) {
8523
- c = u.match(c)[0].length;
8524
- var _ = u.substring(c).match(x1);
8525
- _ && _[1] != null && 0 < _[1].length && a1(_[1], y1) == "0" ? u = !1 : (O(t), t.g(u.substring(c)), u = !0);
8526
- } else u = !1;
8527
- u = u ? 5 : 20;
8591
+ if (p = new RegExp(l), k1(t), l = t.toString(), l.search(p) == 0) {
8592
+ p = l.match(p)[0].length;
8593
+ var _ = l.substring(p).match(D1);
8594
+ _ && _[1] != null && 0 < _[1].length && s1(_[1], g1) == "0" ? l = !1 : (B(t), t.g(l.substring(p)), l = !0);
8595
+ } else l = !1;
8596
+ l = l ? 5 : 20;
8528
8597
  }
8529
- if (r && M(a, 6, u), u != 20) {
8598
+ if (o && E(a, 6, l), l != 20) {
8530
8599
  if (2 >= t.h.length) throw Error("Phone number too short after IDD");
8531
- if (d = W1(t, s), d != 0) return M(a, 1, d), d;
8600
+ if (d = H1(t, r), d != 0) return E(a, 1, d), d;
8532
8601
  throw Error("Invalid country calling code");
8533
8602
  }
8534
- return $ != null && (u = b($, 10), c = "" + u, _ = t.toString(), _.lastIndexOf(c, 0) == 0 && (c = new E(_.substring(c.length)), _ = p($, 1), _ = new RegExp(b(_, 2)), Z1(c, $, null), c = c.toString(), !U(_, t.toString()) && U(_, c) || h1(d, t.toString(), $, -1) == 3)) ? (s.g(c), r && M(a, 6, 10), M(a, 1, u), u) : (M(a, 1, 0), 0);
8535
- }
8536
- function Z1(d, t, $) {
8537
- var s = d.toString(), r = s.length, a = p(t, 15);
8538
- if (r != 0 && a != null && a.length != 0) {
8539
- var u = new RegExp("^(?:" + a + ")");
8540
- if (r = u.exec(s)) {
8541
- a = new RegExp(b(p(t, 1), 2));
8542
- var c = U(a, s), _ = r.length - 1;
8543
- t = p(t, 16), t == null || t.length == 0 || r[_] == null || r[_].length == 0 ? (!c || U(a, s.substring(r[0].length))) && ($ != null && 0 < _ && r[_] != null && $.g(r[1]), d.set(s.substring(r[0].length))) : (s = s.replace(u, t), (!c || U(a, s)) && ($ != null && 0 < _ && $.g(r[1]), d.set(s)));
8603
+ return n != null && (l = w(n, 10), p = "" + l, _ = t.toString(), _.lastIndexOf(p, 0) == 0 && (p = new N(_.substring(p.length)), _ = m(n, 1), _ = new RegExp(w(_, 2)), W1(p, n, null), p = p.toString(), !G(_, t.toString()) && G(_, p) || a1(d, t.toString(), n, -1) == 3)) ? (r.g(p), o && E(a, 6, 10), E(a, 1, l), l) : (E(a, 1, 0), 0);
8604
+ }
8605
+ function W1(d, t, n) {
8606
+ var r = d.toString(), o = r.length, a = m(t, 15);
8607
+ if (o != 0 && a != null && a.length != 0) {
8608
+ var l = new RegExp("^(?:" + a + ")");
8609
+ if (o = l.exec(r)) {
8610
+ a = new RegExp(w(m(t, 1), 2));
8611
+ var p = G(a, r), _ = o.length - 1;
8612
+ t = m(t, 16), t == null || t.length == 0 || o[_] == null || o[_].length == 0 ? (!p || G(a, r.substring(o[0].length))) && (n != null && 0 < _ && o[_] != null && n.g(o[1]), d.set(r.substring(o[0].length))) : (r = r.replace(l, t), (!p || G(a, r)) && (n != null && 0 < _ && n.g(o[1]), d.set(r)));
8544
8613
  }
8545
8614
  }
8546
8615
  }
8547
- function Y(d, t, $) {
8548
- if (!u1($) && 0 < t.length && t.charAt(0) != "+") throw Error("Invalid country calling code");
8549
- return Y1(d, t, $, !0);
8616
+ function z(d, t, n) {
8617
+ if (!r1(n) && 0 < t.length && t.charAt(0) != "+") throw Error("Invalid country calling code");
8618
+ return z1(d, t, n, !0);
8550
8619
  }
8551
- function Y1(d, t, $, s) {
8620
+ function z1(d, t, n, r) {
8552
8621
  if (t == null) throw Error("The string supplied did not seem to be a phone number");
8553
8622
  if (250 < t.length) throw Error("The string supplied is too long to be a phone number");
8554
- var r = new E(), a = t.indexOf(";phone-context=");
8623
+ var o = new N(), a = t.indexOf(";phone-context=");
8555
8624
  if (a === -1) a = null;
8556
8625
  else if (a += 15, a >= t.length) a = "";
8557
8626
  else {
8558
- var u = t.indexOf(";", a);
8559
- a = u !== -1 ? t.substring(a, u) : t.substring(a);
8627
+ var l = t.indexOf(";", a);
8628
+ a = l !== -1 ? t.substring(a, l) : t.substring(a);
8560
8629
  }
8561
- var c = a;
8562
- if (c == null ? u = !0 : c.length === 0 ? u = !1 : (u = w2.exec(c), c = S2.exec(c), u = u !== null || c !== null), !u || (a != null ? (a.charAt(0) === "+" && r.g(a), a = t.indexOf("tel:"), r.g(t.substring(0 <= a ? a + 4 : 0, t.indexOf(";phone-context=")))) : (a = r.g, u = t ?? "", c = u.search(y2), 0 <= c ? (u = u.substring(c), u = u.replace(I2, ""), c = u.search(_2), 0 <= c && (u = u.substring(0, c))) : u = "", a.call(r, u)), a = r.toString(), u = a.indexOf(";isub="), 0 < u && (O(r), r.g(a.substring(0, u))), !k1(r.toString()))) throw Error("The string supplied did not seem to be a phone number");
8563
- if (a = r.toString(), !(u1($) || a != null && 0 < a.length && d1.test(a))) throw Error("Invalid country calling code");
8564
- a = new H(), s && M(a, 5, t);
8630
+ var p = a;
8631
+ if (p == null ? l = !0 : p.length === 0 ? l = !1 : (l = S2.exec(p), p = b2.exec(p), l = l !== null || p !== null), !l || (a != null ? (a.charAt(0) === "+" && o.g(a), a = t.indexOf("tel:"), o.g(t.substring(0 <= a ? a + 4 : 0, t.indexOf(";phone-context=")))) : (a = o.g, l = t ?? "", p = l.search(_2), 0 <= p ? (l = l.substring(p), l = l.replace(v2, ""), p = l.search(I2), 0 <= p && (l = l.substring(0, p))) : l = "", a.call(o, l)), a = o.toString(), l = a.indexOf(";isub="), 0 < l && (B(o), o.g(a.substring(0, l))), !B1(o.toString()))) throw Error("The string supplied did not seem to be a phone number");
8632
+ if (a = o.toString(), !(r1(n) || a != null && 0 < a.length && X.test(a))) throw Error("Invalid country calling code");
8633
+ a = new K(), r && E(a, 5, t);
8565
8634
  d: {
8566
- if (t = r.toString(), u = t.search(B1), 0 <= u && k1(t.substring(0, u))) {
8567
- c = t.match(B1);
8568
- for (var _ = c.length, V = 1; V < _; ++V) if (c[V] != null && 0 < c[V].length) {
8569
- O(r), r.g(t.substring(0, u)), t = c[V];
8635
+ if (t = o.toString(), l = t.search(x1), 0 <= l && B1(t.substring(0, l))) {
8636
+ p = t.match(x1);
8637
+ for (var _ = p.length, U = 1; U < _; ++U) if (p[U] != null && 0 < p[U].length) {
8638
+ B(o), o.g(t.substring(0, l)), t = p[U];
8570
8639
  break d;
8571
8640
  }
8572
8641
  }
8573
8642
  t = "";
8574
8643
  }
8575
- 0 < t.length && M(a, 3, t), u = j(d, $), t = new E(), c = 0, _ = r.toString();
8644
+ 0 < t.length && E(a, 3, t), l = V(d, n), t = new N(), p = 0, _ = o.toString();
8576
8645
  try {
8577
- c = z1(d, _, u, t, s, a);
8578
- } catch (w1) {
8579
- if (w1.message == "Invalid country calling code" && d1.test(_)) {
8580
- if (_ = _.replace(d1, ""), c = z1(d, _, u, t, s, a), c == 0) throw w1;
8581
- } else throw w1;
8646
+ p = j1(d, _, l, t, r, a);
8647
+ } catch (_1) {
8648
+ if (_1.message == "Invalid country calling code" && X.test(_)) {
8649
+ if (_ = _.replace(X, ""), p = j1(d, _, l, t, r, a), p == 0) throw _1;
8650
+ } else throw _1;
8582
8651
  }
8583
- if (c != 0 ? (r = $1(c), r != $ && (u = t1(d, c, r))) : (G1(r), t.g(r.toString()), $ != null ? (c = b(u, 10), M(
8652
+ if (p != 0 ? (o = t1(p), o != n && (l = Q(d, p, o))) : (k1(o), t.g(o.toString()), n != null ? (p = w(l, 10), E(
8584
8653
  a,
8585
8654
  1,
8586
- c
8587
- )) : s && (delete a.h[6], a.g && delete a.g[6])), 2 > t.h.length || (u != null && ($ = new E(), r = new E(t.toString()), Z1(r, u, $), d = h1(d, r.toString(), u, -1), d != 2 && d != 4 && d != 5 && (t = r, s && 0 < $.toString().length && M(a, 7, $.toString()))), s = t.toString(), d = s.length, 2 > d)) throw Error("The string supplied is too short to be a phone number");
8655
+ p
8656
+ )) : r && (delete a.h[6], a.g && delete a.g[6])), 2 > t.h.length || (l != null && (n = new N(), o = new N(t.toString()), W1(o, l, n), d = a1(d, o.toString(), l, -1), d != 2 && d != 4 && d != 5 && (t = o, r && 0 < n.toString().length && E(a, 7, n.toString()))), r = t.toString(), d = r.length, 2 > d)) throw Error("The string supplied is too short to be a phone number");
8588
8657
  if (17 < d) throw Error("The string supplied is too long to be a phone number");
8589
- if (1 < s.length && s.charAt(0) == "0") {
8590
- for (M(a, 4, !0), d = 1; d < s.length - 1 && s.charAt(d) == "0"; ) d++;
8591
- d != 1 && M(a, 8, d);
8658
+ if (1 < r.length && r.charAt(0) == "0") {
8659
+ for (E(a, 4, !0), d = 1; d < r.length - 1 && r.charAt(d) == "0"; ) d++;
8660
+ d != 1 && E(a, 8, d);
8592
8661
  }
8593
- return M(a, 2, parseInt(s, 10)), a;
8662
+ return E(a, 2, parseInt(r, 10)), a;
8594
8663
  }
8595
- function U(d, t) {
8664
+ function G(d, t) {
8596
8665
  return !!((d = t.match(new RegExp("^(?:" + (typeof d == "string" ? d : d.source) + ")$", "i"))) && d[0].length == t.length);
8597
8666
  }
8598
- function A2(d) {
8599
- this.fa = RegExp(" "), this.ja = "", this.v = new E(), this.da = "", this.s = new E(), this.ba = new E(), this.u = !0, this.ea = this.ca = this.la = !1, this.ga = D.g(), this.$ = 0, this.h = new E(), this.ha = !1, this.o = "", this.g = new E(), this.j = [], this.ka = d, this.l = X1(this, this.ka);
8600
- }
8601
- var J1 = new Z();
8602
- M(J1, 11, "NA");
8603
- var E2 = RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*)*$"), q1 = /[- ]/;
8604
- function X1(d, t) {
8605
- var $ = d.ga;
8606
- return t = u1(t) ? j1($, t) : 0, d = j(d.ga, $1(t)), d ?? J1;
8607
- }
8608
- function Q1(d) {
8609
- for (var t = d.j.length, $ = 0; $ < t; ++$) {
8610
- var s = d.j[$], r = b(s, 1);
8611
- if (d.da == r) return !1;
8612
- var a = d, u = s, c = b(u, 1);
8613
- O(a.v);
8667
+ function T2(d) {
8668
+ this.fa = RegExp(" "), this.ja = "", this.v = new N(), this.da = "", this.s = new N(), this.ba = new N(), this.u = !0, this.ea = this.ca = this.la = !1, this.ga = T.g(), this.$ = 0, this.h = new N(), this.ha = !1, this.o = "", this.g = new N(), this.j = [], this.ka = d, this.l = J1(this, this.ka);
8669
+ }
8670
+ var Z1 = new W();
8671
+ E(Z1, 11, "NA");
8672
+ var M2 = RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*)*$"), Y1 = /[- ]/;
8673
+ function J1(d, t) {
8674
+ var n = d.ga;
8675
+ return t = r1(t) ? V1(n, t) : 0, d = V(d.ga, t1(t)), d ?? Z1;
8676
+ }
8677
+ function q1(d) {
8678
+ for (var t = d.j.length, n = 0; n < t; ++n) {
8679
+ var r = d.j[n], o = w(r, 1);
8680
+ if (d.da == o) return !1;
8681
+ var a = d, l = r, p = w(l, 1);
8682
+ B(a.v);
8614
8683
  var _ = a;
8615
- u = b(u, 2);
8616
- var V = "999999999999999".match(c)[0];
8617
- if (V.length < _.g.h.length ? _ = "" : (_ = V.replace(new RegExp(c, "g"), u), _ = _.replace(RegExp("9", "g"), " ")), 0 < _.length ? (a.v.g(_), a = !0) : a = !1, a) return d.da = r, d.ha = q1.test(p(s, 4)), d.$ = 0, !0;
8684
+ l = w(l, 2);
8685
+ var U = "999999999999999".match(p)[0];
8686
+ if (U.length < _.g.h.length ? _ = "" : (_ = U.replace(new RegExp(p, "g"), l), _ = _.replace(RegExp("9", "g"), " ")), 0 < _.length ? (a.v.g(_), a = !0) : a = !1, a) return d.da = o, d.ha = Y1.test(m(r, 4)), d.$ = 0, !0;
8618
8687
  }
8619
8688
  return d.u = !1;
8620
8689
  }
8621
- function d2(d, t) {
8622
- for (var $ = [], s = t.length - 3, r = d.j.length, a = 0; a < r; ++a) {
8623
- var u = d.j[a];
8624
- K(u, 3) == 0 ? $.push(d.j[a]) : (u = p(u, 3, Math.min(s, K(u, 3) - 1)), t.search(u) == 0 && $.push(d.j[a]));
8690
+ function X1(d, t) {
8691
+ for (var n = [], r = t.length - 3, o = d.j.length, a = 0; a < o; ++a) {
8692
+ var l = d.j[a];
8693
+ F(l, 3) == 0 ? n.push(d.j[a]) : (l = m(l, 3, Math.min(r, F(l, 3) - 1)), t.search(l) == 0 && n.push(d.j[a]));
8625
8694
  }
8626
- d.j = $;
8695
+ d.j = n;
8627
8696
  }
8628
- function M2(d, t) {
8697
+ function D2(d, t) {
8629
8698
  d.s.g(t);
8630
- var $ = t;
8631
- if (x1.test($) || d.s.h.length == 1 && m2.test($) ? (t == "+" ? ($ = t, d.ba.g(t)) : ($ = y1[t], d.ba.g($), d.g.g($)), t = $) : (d.u = !1, d.la = !0), !d.u) {
8699
+ var n = t;
8700
+ if (D1.test(n) || d.s.h.length == 1 && y2.test(n) ? (t == "+" ? (n = t, d.ba.g(t)) : (n = g1[t], d.ba.g(n), d.g.g(n)), t = n) : (d.u = !1, d.la = !0), !d.u) {
8632
8701
  if (!d.la) {
8633
- if (n2(d)) {
8634
- if (s2(d)) return t2(d);
8635
- } else if (0 < d.o.length && (t = d.g.toString(), O(d.g), d.g.g(d.o), d.g.g(t), t = d.h.toString(), $ = t.lastIndexOf(d.o), O(d.h), d.h.g(t.substring(0, $))), d.o != i2(d)) return d.h.g(" "), t2(d);
8702
+ if ($2(d)) {
8703
+ if (n2(d)) return Q1(d);
8704
+ } 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(), n = t.lastIndexOf(d.o), B(d.h), d.h.g(t.substring(0, n))), d.o != e2(d)) return d.h.g(" "), Q1(d);
8636
8705
  }
8637
8706
  return d.s.toString();
8638
8707
  }
@@ -8642,168 +8711,168 @@ const Z2 = (y) => {
8642
8711
  case 2:
8643
8712
  return d.s.toString();
8644
8713
  case 3:
8645
- if (n2(d)) d.ea = !0;
8646
- else return d.o = i2(d), I1(d);
8714
+ if ($2(d)) d.ea = !0;
8715
+ else return d.o = e2(d), C1(d);
8647
8716
  default:
8648
- return d.ea ? (s2(d) && (d.ea = !1), d.h.toString() + d.g.toString()) : 0 < d.j.length ? (t = r2(d, t), $ = e2(d), 0 < $.length ? $ : (d2(d, d.g.toString()), Q1(d) ? $2(d) : d.u ? f1(d, t) : d.s.toString())) : I1(d);
8717
+ return d.ea ? (n2(d) && (d.ea = !1), d.h.toString() + d.g.toString()) : 0 < d.j.length ? (t = i2(d, t), n = d2(d), 0 < n.length ? n : (X1(d, d.g.toString()), q1(d) ? t2(d) : d.u ? l1(d, t) : d.s.toString())) : C1(d);
8649
8718
  }
8650
8719
  }
8651
- function t2(d) {
8652
- return d.u = !0, d.ea = !1, d.j = [], d.$ = 0, O(d.v), d.da = "", I1(d);
8720
+ function Q1(d) {
8721
+ return d.u = !0, d.ea = !1, d.j = [], d.$ = 0, B(d.v), d.da = "", C1(d);
8653
8722
  }
8654
- function e2(d) {
8655
- for (var t = d.g.toString(), $ = d.j.length, s = 0; s < $; ++s) {
8656
- var r = d.j[s], a = b(r, 1);
8657
- if (new RegExp("^(?:" + a + ")$").test(t) && (d.ha = q1.test(p(r, 4)), r = t.replace(new RegExp(a, "g"), p(r, 2)), r = f1(d, r), a1(r, g2) == d.ba)) return r;
8723
+ function d2(d) {
8724
+ for (var t = d.g.toString(), n = d.j.length, r = 0; r < n; ++r) {
8725
+ var o = d.j[r], a = w(o, 1);
8726
+ if (new RegExp("^(?:" + a + ")$").test(t) && (d.ha = Y1.test(m(o, 4)), o = t.replace(new RegExp(a, "g"), m(o, 2)), o = l1(d, o), s1(o, m2) == d.ba)) return o;
8658
8727
  }
8659
8728
  return "";
8660
8729
  }
8661
- function f1(d, t) {
8662
- var $ = d.h.h.length;
8663
- return d.ha && 0 < $ && d.h.toString().charAt($ - 1) != " " ? d.h + " " + t : d.h + t;
8730
+ function l1(d, t) {
8731
+ var n = d.h.h.length;
8732
+ return d.ha && 0 < n && d.h.toString().charAt(n - 1) != " " ? d.h + " " + t : d.h + t;
8664
8733
  }
8665
- function I1(d) {
8734
+ function C1(d) {
8666
8735
  var t = d.g.toString();
8667
8736
  if (3 <= t.length) {
8668
- 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) {
8669
- var a = $[r];
8670
- 0 < d.o.length && U1(b(a, 4)) && !p(a, 6) && !k(a, 5) || (d.o.length != 0 || d.ca || U1(b(a, 4)) || p(a, 6)) && E2.test(b(a, 2)) && d.j.push(a);
8737
+ for (var n = d.ca && d.o.length == 0 && 0 < F(d.l, 20) ? M(d.l, 20) : M(d.l, 19), r = n.length, o = 0; o < r; ++o) {
8738
+ var a = n[o];
8739
+ 0 < d.o.length && G1(w(a, 4)) && !m(a, 6) && !x(a, 5) || (d.o.length != 0 || d.ca || G1(w(a, 4)) || m(a, 6)) && M2.test(w(a, 2)) && d.j.push(a);
8671
8740
  }
8672
- return d2(d, t), t = e2(d), 0 < t.length ? t : Q1(d) ? $2(d) : d.s.toString();
8741
+ return X1(d, t), t = d2(d), 0 < t.length ? t : q1(d) ? t2(d) : d.s.toString();
8673
8742
  }
8674
- return f1(d, t);
8743
+ return l1(d, t);
8675
8744
  }
8676
- function $2(d) {
8677
- var t = d.g.toString(), $ = t.length;
8678
- if (0 < $) {
8679
- for (var s = "", r = 0; r < $; r++) s = r2(d, t.charAt(r));
8680
- return d.u ? f1(d, s) : d.s.toString();
8745
+ function t2(d) {
8746
+ var t = d.g.toString(), n = t.length;
8747
+ if (0 < n) {
8748
+ for (var r = "", o = 0; o < n; o++) r = i2(d, t.charAt(o));
8749
+ return d.u ? l1(d, r) : d.s.toString();
8681
8750
  }
8682
8751
  return d.h.toString();
8683
8752
  }
8684
- function i2(d) {
8685
- var t = d.g.toString(), $ = 0;
8686
- if (p(d.l, 10) != 1) var s = !1;
8687
- else s = d.g.toString(), s = s.charAt(0) == "1" && s.charAt(1) != "0" && s.charAt(1) != "1";
8688
- return s ? ($ = 1, d.h.g("1").g(" "), d.ca = !0) : k(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, $)))), O(d.g), d.g.g(t.substring($)), t.substring(0, $);
8753
+ function e2(d) {
8754
+ var t = d.g.toString(), n = 0;
8755
+ if (m(d.l, 10) != 1) var r = !1;
8756
+ else r = d.g.toString(), r = r.charAt(0) == "1" && r.charAt(1) != "0" && r.charAt(1) != "1";
8757
+ return r ? (n = 1, d.h.g("1").g(" "), d.ca = !0) : x(d.l, 15) && (r = new RegExp("^(?:" + m(d.l, 15) + ")"), r = t.match(r), r != null && r[0] != null && 0 < r[0].length && (d.ca = !0, n = r[0].length, d.h.g(t.substring(0, n)))), B(d.g), d.g.g(t.substring(n)), t.substring(0, n);
8758
+ }
8759
+ function $2(d) {
8760
+ var t = d.ba.toString(), n = new RegExp("^(?:\\+|" + m(d.l, 11) + ")");
8761
+ return n = t.match(n), n != null && n[0] != null && 0 < n[0].length ? (d.ca = !0, n = n[0].length, B(d.g), d.g.g(t.substring(n)), B(d.h), d.h.g(t.substring(0, n)), t.charAt(0) != "+" && d.h.g(" "), !0) : !1;
8689
8762
  }
8690
8763
  function n2(d) {
8691
- var t = d.ba.toString(), $ = new RegExp("^(?:\\+|" + p(d.l, 11) + ")");
8692
- return $ = t.match($), $ != null && $[0] != null && 0 < $[0].length ? (d.ca = !0, $ = $[0].length, O(d.g), d.g.g(t.substring($)), O(d.h), d.h.g(t.substring(0, $)), t.charAt(0) != "+" && d.h.g(" "), !0) : !1;
8693
- }
8694
- function s2(d) {
8695
8764
  if (d.g.h.length == 0) return !1;
8696
- var t = new E(), $ = W1(d.g, t);
8697
- return $ == 0 ? !1 : (O(d.g), d.g.g(t.toString()), t = $1($), t == "001" ? d.l = j(d.ga, "" + $) : t != d.ka && (d.l = X1(d, t)), d.h.g("" + $).g(" "), d.o = "", !0);
8698
- }
8699
- function r2(d, t) {
8700
- var $ = d.v.toString();
8701
- if (0 <= $.substring(d.$).search(d.fa)) {
8702
- var s = $.search(d.fa);
8703
- return t = $.replace(d.fa, t), O(d.v), d.v.g(t), d.$ = s, t.substring(0, d.$ + 1);
8765
+ var t = new N(), n = H1(d.g, t);
8766
+ return n == 0 ? !1 : (B(d.g), d.g.g(t.toString()), t = t1(n), t == "001" ? d.l = V(d.ga, "" + n) : t != d.ka && (d.l = J1(d, t)), d.h.g("" + n).g(" "), d.o = "", !0);
8767
+ }
8768
+ function i2(d, t) {
8769
+ var n = d.v.toString();
8770
+ if (0 <= n.substring(d.$).search(d.fa)) {
8771
+ var r = n.search(d.fa);
8772
+ return t = n.replace(d.fa, t), B(d.v), d.v.g(t), d.$ = r, t.substring(0, d.$ + 1);
8704
8773
  }
8705
8774
  return d.j.length == 1 && (d.u = !1), d.da = "", d.s.toString();
8706
8775
  }
8707
- const o2 = (d) => {
8776
+ const s2 = (d) => {
8708
8777
  const t = [];
8709
8778
  return d.includes("FIXED_LINE_OR_MOBILE") ? (d.includes("MOBILE") || t.push("MOBILE"), d.includes("FIXED_LINE") || t.push("FIXED_LINE")) : (d.includes("MOBILE") || d.includes("FIXED_LINE")) && t.push("FIXED_LINE_OR_MOBILE"), d.concat(t);
8710
- }, v1 = { FIXED_LINE: 0, MOBILE: 1, FIXED_LINE_OR_MOBILE: 2, TOLL_FREE: 3, PREMIUM_RATE: 4, SHARED_COST: 5, VOIP: 6, PERSONAL_NUMBER: 7, PAGER: 8, UAN: 9, VOICEMAIL: 10, UNKNOWN: -1 };
8779
+ }, y1 = { FIXED_LINE: 0, MOBILE: 1, FIXED_LINE_OR_MOBILE: 2, TOLL_FREE: 3, PREMIUM_RATE: 4, SHARED_COST: 5, VOIP: 6, PERSONAL_NUMBER: 7, PAGER: 8, UAN: 9, VOICEMAIL: 10, UNKNOWN: -1 };
8711
8780
  e("intlTelInputUtilsTemp", {}), e("intlTelInputUtilsTemp.formatNumberAsYouType", (d, t) => {
8712
8781
  try {
8713
- const $ = d.replace(/[^+0-9]/g, ""), s = new A2(t);
8782
+ const n = d.replace(/[^+0-9]/g, ""), r = new T2(t);
8714
8783
  t = "";
8715
- for (let r = 0; r < $.length; r++) s.ja = M2(s, $.charAt(r)), t = s.ja;
8784
+ for (let o = 0; o < n.length; o++) r.ja = D2(r, n.charAt(o)), t = r.ja;
8716
8785
  return t;
8717
8786
  } catch {
8718
8787
  return d;
8719
8788
  }
8720
- }), e("intlTelInputUtilsTemp.formatNumber", (d, t, $) => {
8789
+ }), e("intlTelInputUtilsTemp.formatNumber", (d, t, n) => {
8721
8790
  try {
8722
- const r = D.g(), a = Y(r, d, t);
8723
- var s = c1(r, a, -1);
8724
- return s == 0 || s == 4 ? r.format(a, typeof $ > "u" ? 0 : $) : d;
8791
+ const o = T.g(), a = z(o, d, t);
8792
+ var r = u1(o, a, -1);
8793
+ return r == 0 || r == 4 ? o.format(a, typeof n > "u" ? 0 : n) : d;
8725
8794
  } catch {
8726
8795
  return d;
8727
8796
  }
8728
- }), e("intlTelInputUtilsTemp.getExampleNumber", (d, t, $, s) => {
8797
+ }), e("intlTelInputUtilsTemp.getExampleNumber", (d, t, n, r) => {
8729
8798
  try {
8730
- const _ = D.g();
8799
+ const _ = T.g();
8731
8800
  d: {
8732
- var r = _;
8733
- if (u1(d)) {
8734
- var a = l1(j(r, d), $);
8801
+ var o = _;
8802
+ if (r1(d)) {
8803
+ var a = o1(V(o, d), n);
8735
8804
  try {
8736
- if (k(a, 6)) {
8737
- var u = p(a, 6), c = Y1(r, u, d, !1);
8805
+ if (x(a, 6)) {
8806
+ var l = m(a, 6), p = z1(o, l, d, !1);
8738
8807
  break d;
8739
8808
  }
8740
8809
  } catch {
8741
8810
  }
8742
8811
  }
8743
- c = null;
8812
+ p = null;
8744
8813
  }
8745
- return _.format(c, s ? 0 : t ? 2 : 1);
8814
+ return _.format(p, r ? 0 : t ? 2 : 1);
8746
8815
  } catch {
8747
8816
  return "";
8748
8817
  }
8749
8818
  }), e("intlTelInputUtilsTemp.getExtension", (d, t) => {
8750
8819
  try {
8751
- return p(Y(D.g(), d, t), 3);
8820
+ return m(z(T.g(), d, t), 3);
8752
8821
  } catch {
8753
8822
  return "";
8754
8823
  }
8755
8824
  }), e("intlTelInputUtilsTemp.getNumberType", (d, t) => {
8756
8825
  try {
8757
- const $ = D.g(), s = Y($, d, t);
8758
- return K1($, s);
8826
+ const n = T.g(), r = z(n, d, t);
8827
+ return F1(n, r);
8759
8828
  } catch {
8760
8829
  return -99;
8761
8830
  }
8762
8831
  }), e("intlTelInputUtilsTemp.getValidationError", (d, t) => {
8763
8832
  if (!t) return 1;
8764
8833
  try {
8765
- const $ = D.g(), s = Y($, d, t);
8766
- return c1($, s, -1);
8767
- } catch ($) {
8768
- return $.message === "Invalid country calling code" ? 1 : 3 >= d.length || $.message === "Phone number too short after IDD" || $.message === "The string supplied is too short to be a phone number" ? 2 : $.message === "The string supplied is too long to be a phone number" ? 3 : -99;
8834
+ const n = T.g(), r = z(n, d, t);
8835
+ return u1(n, r, -1);
8836
+ } catch (n) {
8837
+ return n.message === "Invalid country calling code" ? 1 : 3 >= d.length || n.message === "Phone number too short after IDD" || n.message === "The string supplied is too short to be a phone number" ? 2 : n.message === "The string supplied is too long to be a phone number" ? 3 : -99;
8769
8838
  }
8770
- }), e("intlTelInputUtilsTemp.isValidNumber", (d, t, $) => {
8839
+ }), e("intlTelInputUtilsTemp.isValidNumber", (d, t, n) => {
8771
8840
  try {
8772
- const s = D.g(), r = Y(s, d, t), a = T2(s, r);
8773
- if ($) {
8774
- const u = o2($).map((c) => v1[c]);
8775
- return a && u.includes(K1(s, r));
8841
+ const r = T.g(), o = z(r, d, t), a = E2(r, o);
8842
+ if (n) {
8843
+ const l = s2(n).map((p) => y1[p]);
8844
+ return a && l.includes(F1(r, o));
8776
8845
  }
8777
8846
  return a;
8778
8847
  } catch {
8779
8848
  return !1;
8780
8849
  }
8781
- }), e("intlTelInputUtilsTemp.isPossibleNumber", (d, t, $) => {
8850
+ }), e("intlTelInputUtilsTemp.isPossibleNumber", (d, t, n) => {
8782
8851
  try {
8783
- const s = D.g(), r = Y(s, d, t);
8784
- if ($) {
8785
- const a = o2($);
8786
- for (let u of a) if (c1(s, r, v1[u]) === 0) return !0;
8852
+ const r = T.g(), o = z(r, d, t);
8853
+ if (n) {
8854
+ const a = s2(n);
8855
+ for (let l of a) if (u1(r, o, y1[l]) === 0) return !0;
8787
8856
  return !1;
8788
8857
  }
8789
- return c1(s, r, -1) === 0;
8858
+ return u1(r, o, -1) === 0;
8790
8859
  } catch {
8791
8860
  return !1;
8792
8861
  }
8793
8862
  }), e("intlTelInputUtilsTemp.getCoreNumber", (d, t) => {
8794
8863
  try {
8795
- return p(Y(D.g(), d, t), 2).toString();
8864
+ return m(z(T.g(), d, t), 2).toString();
8796
8865
  } catch {
8797
8866
  return "";
8798
8867
  }
8799
- }), e("intlTelInputUtilsTemp.numberFormat", { E164: 0, INTERNATIONAL: 1, NATIONAL: 2, RFC3966: 3 }), e("intlTelInputUtilsTemp.numberType", v1), e("intlTelInputUtilsTemp.validationError", { IS_POSSIBLE: 0, INVALID_COUNTRY_CODE: 1, TOO_SHORT: 2, TOO_LONG: 3, IS_POSSIBLE_LOCAL_ONLY: 4, INVALID_LENGTH: 5 });
8868
+ }), e("intlTelInputUtilsTemp.numberFormat", { E164: 0, INTERNATIONAL: 1, NATIONAL: 2, RFC3966: 3 }), e("intlTelInputUtilsTemp.numberType", y1), e("intlTelInputUtilsTemp.validationError", { IS_POSSIBLE: 0, INVALID_COUNTRY_CODE: 1, TOO_SHORT: 2, TOO_LONG: 3, IS_POSSIBLE_LOCAL_ONLY: 4, INVALID_LENGTH: 5 });
8800
8869
  })();
8801
- const f2 = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : void 0, Y2 = f2.intlTelInputUtilsTemp;
8802
- delete f2.intlTelInputUtilsTemp;
8803
- m.utils = Y2;
8804
- const q2 = {
8870
+ const h2 = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : void 0, i0 = h2.intlTelInputUtilsTemp;
8871
+ delete h2.intlTelInputUtilsTemp;
8872
+ y.utils = i0;
8873
+ const r0 = {
8805
8874
  __name: "IntlTelInputWithUtils",
8806
- props: /* @__PURE__ */ a2({
8875
+ props: /* @__PURE__ */ r2({
8807
8876
  disabled: {
8808
8877
  type: Boolean,
8809
8878
  default: !1
@@ -8827,48 +8896,48 @@ const q2 = {
8827
8896
  },
8828
8897
  modelModifiers: {}
8829
8898
  }),
8830
- emits: /* @__PURE__ */ a2([
8899
+ emits: /* @__PURE__ */ r2([
8831
8900
  "changeNumber",
8832
8901
  "changeCountry",
8833
8902
  "changeValidity",
8834
8903
  "changeErrorCode"
8835
8904
  ], ["update:modelValue"]),
8836
- setup(y, { expose: e, emit: i }) {
8837
- const n = D2(y, "modelValue"), o = y, l = i, f = S1(), h = S1(), C = S1(!1), I = () => h.value ? o.options.strictMode ? h.value.isValidNumberPrecise() : h.value.isValidNumber() : null, v = () => {
8838
- let S = I();
8839
- C.value !== S && (C.value = S, l("changeValidity", !!S), l(
8905
+ setup(f, { expose: e, emit: $ }) {
8906
+ const i = P2(f, "modelValue"), s = f, u = $, h = I1(), c = I1(), C = I1(!1), g = () => c.value ? s.options.strictMode ? c.value.isValidNumberPrecise() : c.value.isValidNumber() : null, I = () => {
8907
+ let v = g();
8908
+ C.value !== v && (C.value = v, u("changeValidity", !!v), u(
8840
8909
  "changeErrorCode",
8841
- S ? null : h.value.getValidationError()
8910
+ v ? null : c.value.getValidationError()
8842
8911
  ));
8843
- }, g = () => {
8844
- var S;
8845
- l("changeNumber", ((S = h.value) == null ? void 0 : S.getNumber()) ?? ""), v();
8846
- }, w = () => {
8847
- var S;
8848
- l("changeCountry", ((S = h.value) == null ? void 0 : S.getSelectedCountryData().iso2) ?? ""), g(), v();
8912
+ }, S = () => {
8913
+ var v;
8914
+ u("changeNumber", ((v = c.value) == null ? void 0 : v.getNumber()) ?? ""), I();
8915
+ }, R = () => {
8916
+ var v;
8917
+ u("changeCountry", ((v = c.value) == null ? void 0 : v.getSelectedCountryData().iso2) ?? ""), S(), I();
8849
8918
  };
8850
- return P2(() => {
8851
- f.value && (h.value = m(f.value, o.options), o.value && h.value.setNumber(o.value), o.disabled && h.value.setDisabled(o.disabled), C.value = I());
8852
- }), x2(
8853
- () => o.disabled,
8854
- (S) => {
8855
- var A;
8856
- return (A = h.value) == null ? void 0 : A.setDisabled(S);
8919
+ return x2(() => {
8920
+ h.value && (c.value = y(h.value, s.options), s.value && c.value.setNumber(s.value), s.disabled && c.value.setDisabled(s.disabled), C.value = g());
8921
+ }), B2(
8922
+ () => s.disabled,
8923
+ (v) => {
8924
+ var D;
8925
+ return (D = c.value) == null ? void 0 : D.setDisabled(v);
8857
8926
  }
8858
8927
  ), R2(() => {
8859
- var S;
8860
- return (S = h.value) == null ? void 0 : S.destroy();
8861
- }), e({ instance: h, input: f }), (S, A) => B2((O2(), k2("input", G2({
8928
+ var v;
8929
+ return (v = c.value) == null ? void 0 : v.destroy();
8930
+ }), e({ instance: c, input: h }), (v, D) => k2((G2(), O2("input", U2({
8862
8931
  ref_key: "input",
8863
- ref: f,
8864
- "onUpdate:modelValue": A[0] || (A[0] = (G) => n.value = G),
8932
+ ref: h,
8933
+ "onUpdate:modelValue": D[0] || (D[0] = (A) => i.value = A),
8865
8934
  type: "tel",
8866
- onCountrychange: w,
8867
- onInput: g
8868
- }, y.inputProps), null, 16)), [
8935
+ onCountrychange: R,
8936
+ onInput: S
8937
+ }, f.inputProps), null, 16)), [
8869
8938
  [
8870
8939
  F2,
8871
- n.value,
8940
+ i.value,
8872
8941
  void 0,
8873
8942
  { lazy: !0 }
8874
8943
  ]
@@ -8876,5 +8945,5 @@ const q2 = {
8876
8945
  }
8877
8946
  };
8878
8947
  export {
8879
- q2 as default
8948
+ r0 as default
8880
8949
  };