intl-tel-input 25.0.0 → 25.0.1
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.
- package/README.md +5 -5
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/intlTelInput.js +22 -12
- package/build/js/intlTelInput.min.js +2 -2
- package/build/js/intlTelInputWithUtils.js +22 -12
- package/build/js/intlTelInputWithUtils.min.js +2 -2
- package/package.json +1 -1
- package/react/README.md +1 -1
- package/react/build/IntlTelInput.cjs +21 -11
- package/react/build/IntlTelInput.js +21 -11
- package/react/build/IntlTelInputWithUtils.cjs +21 -11
- package/react/build/IntlTelInputWithUtils.js +21 -11
- package/vue/README.md +1 -1
- package/vue/build/IntlTelInput.mjs +47 -40
- package/vue/build/IntlTelInputWithUtils.mjs +193 -186
|
@@ -1305,10 +1305,10 @@ const r2 = [
|
|
|
1305
1305
|
// Zimbabwe
|
|
1306
1306
|
"263"
|
|
1307
1307
|
]
|
|
1308
|
-
],
|
|
1308
|
+
], W = [];
|
|
1309
1309
|
for (let y = 0; y < r2.length; y++) {
|
|
1310
1310
|
const $ = r2[y];
|
|
1311
|
-
|
|
1311
|
+
W[y] = {
|
|
1312
1312
|
name: "",
|
|
1313
1313
|
// this is now populated in the plugin
|
|
1314
1314
|
iso2: $[0],
|
|
@@ -1573,8 +1573,8 @@ const O2 = {
|
|
|
1573
1573
|
ac: "Ascension Island",
|
|
1574
1574
|
xk: "Kosovo"
|
|
1575
1575
|
}, u2 = { ...O2, ...G2 };
|
|
1576
|
-
for (let y = 0; y <
|
|
1577
|
-
|
|
1576
|
+
for (let y = 0; y < W.length; y++)
|
|
1577
|
+
W[y].name = u2[W[y].iso2];
|
|
1578
1578
|
let F2 = 0;
|
|
1579
1579
|
const l2 = {
|
|
1580
1580
|
//* Whether or not to allow the dropdown.
|
|
@@ -1667,10 +1667,10 @@ const l2 = {
|
|
|
1667
1667
|
return a;
|
|
1668
1668
|
}
|
|
1669
1669
|
return $.length;
|
|
1670
|
-
},
|
|
1670
|
+
}, T = (y, $, n) => {
|
|
1671
1671
|
const i = document.createElement(y);
|
|
1672
1672
|
return $ && Object.entries($).forEach(([o, a]) => i.setAttribute(o, a)), n && n.appendChild(i), i;
|
|
1673
|
-
},
|
|
1673
|
+
}, $1 = (y, ...$) => {
|
|
1674
1674
|
const { instances: n } = C;
|
|
1675
1675
|
Object.values(n).forEach((i) => i[y](...$));
|
|
1676
1676
|
};
|
|
@@ -1725,18 +1725,18 @@ class K2 {
|
|
|
1725
1725
|
const i = $.map(
|
|
1726
1726
|
(o) => o.toLowerCase()
|
|
1727
1727
|
);
|
|
1728
|
-
this.countries =
|
|
1728
|
+
this.countries = W.filter(
|
|
1729
1729
|
(o) => i.indexOf(o.iso2) > -1
|
|
1730
1730
|
);
|
|
1731
1731
|
} else if (n.length) {
|
|
1732
1732
|
const i = n.map(
|
|
1733
1733
|
(o) => o.toLowerCase()
|
|
1734
1734
|
);
|
|
1735
|
-
this.countries =
|
|
1735
|
+
this.countries = W.filter(
|
|
1736
1736
|
(o) => i.indexOf(o.iso2) === -1
|
|
1737
1737
|
);
|
|
1738
1738
|
} else
|
|
1739
|
-
this.countries =
|
|
1739
|
+
this.countries = W;
|
|
1740
1740
|
}
|
|
1741
1741
|
//* Translate Countries by object literal provided on config.
|
|
1742
1742
|
_translateCountryNames() {
|
|
@@ -1769,7 +1769,7 @@ class K2 {
|
|
|
1769
1769
|
}
|
|
1770
1770
|
//* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
|
|
1771
1771
|
_generateMarkup() {
|
|
1772
|
-
var v;
|
|
1772
|
+
var v, A, G;
|
|
1773
1773
|
this.telInput.classList.add("iti__tel-input"), !this.telInput.hasAttribute("autocomplete") && !(this.telInput.form && this.telInput.form.hasAttribute("autocomplete")) && this.telInput.setAttribute("autocomplete", "off");
|
|
1774
1774
|
const {
|
|
1775
1775
|
allowDropdown: $,
|
|
@@ -1785,13 +1785,13 @@ class K2 {
|
|
|
1785
1785
|
} = this.options;
|
|
1786
1786
|
let I = "iti";
|
|
1787
1787
|
$ && (I += " iti--allow-dropdown"), i && (I += " iti--show-flags"), o && (I += ` ${o}`), f || (I += " iti--inline-dropdown");
|
|
1788
|
-
const L =
|
|
1788
|
+
const L = T("div", { class: I });
|
|
1789
1789
|
if ((v = this.telInput.parentNode) == null || v.insertBefore(L, this.telInput), $ || i || n) {
|
|
1790
|
-
this.countryContainer =
|
|
1790
|
+
this.countryContainer = T(
|
|
1791
1791
|
"div",
|
|
1792
1792
|
{ class: "iti__country-container" },
|
|
1793
1793
|
L
|
|
1794
|
-
), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", $ ? (this.selectedCountry =
|
|
1794
|
+
), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", $ ? (this.selectedCountry = T(
|
|
1795
1795
|
"button",
|
|
1796
1796
|
{
|
|
1797
1797
|
type: "button",
|
|
@@ -1803,30 +1803,30 @@ class K2 {
|
|
|
1803
1803
|
role: "combobox"
|
|
1804
1804
|
},
|
|
1805
1805
|
this.countryContainer
|
|
1806
|
-
), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry =
|
|
1806
|
+
), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = T(
|
|
1807
1807
|
"div",
|
|
1808
1808
|
{ class: "iti__selected-country" },
|
|
1809
1809
|
this.countryContainer
|
|
1810
1810
|
);
|
|
1811
|
-
const
|
|
1812
|
-
if (this.selectedCountryInner =
|
|
1811
|
+
const F = T("div", { class: "iti__selected-country-primary" }, this.selectedCountry);
|
|
1812
|
+
if (this.selectedCountryInner = T("div", { class: "iti__flag" }, F), this.selectedCountryA11yText = T(
|
|
1813
1813
|
"span",
|
|
1814
1814
|
{ class: "iti__a11y-text" },
|
|
1815
1815
|
this.selectedCountryInner
|
|
1816
|
-
), $ && (this.dropdownArrow =
|
|
1816
|
+
), $ && (this.dropdownArrow = T(
|
|
1817
1817
|
"div",
|
|
1818
1818
|
{ class: "iti__arrow", "aria-hidden": "true" },
|
|
1819
|
-
|
|
1820
|
-
)), n && (this.selectedDialCode =
|
|
1819
|
+
F
|
|
1820
|
+
)), n && (this.selectedDialCode = T(
|
|
1821
1821
|
"div",
|
|
1822
1822
|
{ class: "iti__selected-dial-code" },
|
|
1823
1823
|
this.selectedCountry
|
|
1824
1824
|
)), $) {
|
|
1825
1825
|
const M = g ? "" : "iti--flexible-dropdown-width";
|
|
1826
|
-
if (this.dropdownContent =
|
|
1826
|
+
if (this.dropdownContent = T("div", {
|
|
1827
1827
|
id: `iti-${this.id}__dropdown-content`,
|
|
1828
1828
|
class: `iti__dropdown-content iti__hide ${M}`
|
|
1829
|
-
}), b && (this.searchInput =
|
|
1829
|
+
}), b && (this.searchInput = T(
|
|
1830
1830
|
"input",
|
|
1831
1831
|
{
|
|
1832
1832
|
type: "text",
|
|
@@ -1840,11 +1840,11 @@ class K2 {
|
|
|
1840
1840
|
autocomplete: "off"
|
|
1841
1841
|
},
|
|
1842
1842
|
this.dropdownContent
|
|
1843
|
-
), this.searchResultsA11yText =
|
|
1843
|
+
), this.searchResultsA11yText = T(
|
|
1844
1844
|
"span",
|
|
1845
1845
|
{ class: "iti__a11y-text" },
|
|
1846
1846
|
this.dropdownContent
|
|
1847
|
-
)), this.countryList =
|
|
1847
|
+
)), this.countryList = T(
|
|
1848
1848
|
"ul",
|
|
1849
1849
|
{
|
|
1850
1850
|
class: "iti__country-list",
|
|
@@ -1854,27 +1854,34 @@ class K2 {
|
|
|
1854
1854
|
},
|
|
1855
1855
|
this.dropdownContent
|
|
1856
1856
|
), this._appendListItems(), b && this._updateSearchResultsText(), c) {
|
|
1857
|
-
let
|
|
1858
|
-
f ?
|
|
1857
|
+
let x = "iti iti--container";
|
|
1858
|
+
f ? x += " iti--fullscreen-popup" : x += " iti--inline-dropdown", this.dropdown = T("div", { class: x }), this.dropdown.appendChild(this.dropdownContent);
|
|
1859
1859
|
} else
|
|
1860
1860
|
this.countryContainer.appendChild(this.dropdownContent);
|
|
1861
1861
|
}
|
|
1862
1862
|
}
|
|
1863
1863
|
if (L.appendChild(this.telInput), this._updateInputPadding(), a) {
|
|
1864
|
-
const
|
|
1865
|
-
M.phone
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
}
|
|
1864
|
+
const F = this.telInput.getAttribute("name") || "", M = a(F);
|
|
1865
|
+
if (M.phone) {
|
|
1866
|
+
const x = (A = this.telInput.form) == null ? void 0 : A.querySelector(`input[name="${M.phone}"]`);
|
|
1867
|
+
x ? this.hiddenInput = x : (this.hiddenInput = T("input", {
|
|
1868
|
+
type: "hidden",
|
|
1869
|
+
name: M.phone
|
|
1870
|
+
}), L.appendChild(this.hiddenInput));
|
|
1871
|
+
}
|
|
1872
|
+
if (M.country) {
|
|
1873
|
+
const x = (G = this.telInput.form) == null ? void 0 : G.querySelector(`input[name="${M.country}"]`);
|
|
1874
|
+
x ? this.hiddenInputCountry = x : (this.hiddenInputCountry = T("input", {
|
|
1875
|
+
type: "hidden",
|
|
1876
|
+
name: M.country
|
|
1877
|
+
}), L.appendChild(this.hiddenInputCountry));
|
|
1878
|
+
}
|
|
1872
1879
|
}
|
|
1873
1880
|
}
|
|
1874
1881
|
//* For each country: add a country list item <li> to the countryList <ul> container.
|
|
1875
1882
|
_appendListItems() {
|
|
1876
1883
|
for (let $ = 0; $ < this.countries.length; $++) {
|
|
1877
|
-
const n = this.countries[$], i = $ === 0 ? "iti__highlight" : "", o =
|
|
1884
|
+
const n = this.countries[$], i = $ === 0 ? "iti__highlight" : "", o = T(
|
|
1878
1885
|
"li",
|
|
1879
1886
|
{
|
|
1880
1887
|
id: `iti-${this.id}__item-${n.iso2}`,
|
|
@@ -1948,10 +1955,10 @@ class K2 {
|
|
|
1948
1955
|
C.autoCountry ? this.handleAutoCountry() : C.startedLoadingAutoCountry || (C.startedLoadingAutoCountry = !0, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(
|
|
1949
1956
|
($ = "") => {
|
|
1950
1957
|
const n = $.toLowerCase();
|
|
1951
|
-
n && this._getCountryData(n, !0) ? (C.autoCountry = n, setTimeout(() =>
|
|
1958
|
+
n && this._getCountryData(n, !0) ? (C.autoCountry = n, setTimeout(() => $1("handleAutoCountry"))) : (this._setInitialState(!0), $1("rejectAutoCountryPromise"));
|
|
1952
1959
|
},
|
|
1953
1960
|
() => {
|
|
1954
|
-
this._setInitialState(!0),
|
|
1961
|
+
this._setInitialState(!0), $1("rejectAutoCountryPromise");
|
|
1955
1962
|
}
|
|
1956
1963
|
));
|
|
1957
1964
|
}
|
|
@@ -1964,8 +1971,8 @@ class K2 {
|
|
|
1964
1971
|
let g = !1;
|
|
1965
1972
|
new RegExp("\\p{L}", "u").test(this.telInput.value) && (g = !0), this._handleInputEvent = (f) => {
|
|
1966
1973
|
if (this.isAndroid && (f == null ? void 0 : f.data) === "+" && i && a && c) {
|
|
1967
|
-
const L = this.telInput.selectionStart || 0, v = this.telInput.value.substring(0, L - 1),
|
|
1968
|
-
this.telInput.value = v +
|
|
1974
|
+
const L = this.telInput.selectionStart || 0, v = this.telInput.value.substring(0, L - 1), A = this.telInput.value.substring(L);
|
|
1975
|
+
this.telInput.value = v + A, this._openDropdownWithPlus();
|
|
1969
1976
|
return;
|
|
1970
1977
|
}
|
|
1971
1978
|
this._updateCountryFromNumber(this.telInput.value) && this._triggerCountryChange();
|
|
@@ -1973,8 +1980,8 @@ class K2 {
|
|
|
1973
1980
|
b || _ && !$ ? g = !0 : /[^+0-9]/.test(this.telInput.value) || (g = !1);
|
|
1974
1981
|
const I = (f == null ? void 0 : f.detail) && f.detail.isSetNumber && !o;
|
|
1975
1982
|
if (n && !g && !I) {
|
|
1976
|
-
const L = this.telInput.selectionStart || 0,
|
|
1977
|
-
this.telInput.value =
|
|
1983
|
+
const L = this.telInput.selectionStart || 0, A = this.telInput.value.substring(0, L).replace(/[^+0-9]/g, "").length, G = (f == null ? void 0 : f.inputType) === "deleteContentForward", F = this._formatNumberAsYouType(), M = V2(A, F, L, G);
|
|
1984
|
+
this.telInput.value = F, this.telInput.setSelectionRange(M, M);
|
|
1978
1985
|
}
|
|
1979
1986
|
}, this.telInput.addEventListener("input", this._handleInputEvent), ($ || i) && (this._handleKeydownEvent = (f) => {
|
|
1980
1987
|
if (f.key && f.key.length === 1 && !f.altKey && !f.ctrlKey && !f.metaKey) {
|
|
@@ -1983,13 +1990,13 @@ class K2 {
|
|
|
1983
1990
|
return;
|
|
1984
1991
|
}
|
|
1985
1992
|
if ($) {
|
|
1986
|
-
const b = this.telInput.value, _ = b.charAt(0) === "+", I = !_ && this.telInput.selectionStart === 0 && f.key === "+", L = /^[0-9]$/.test(f.key), v = i ? L : I || L,
|
|
1987
|
-
let
|
|
1993
|
+
const b = this.telInput.value, _ = b.charAt(0) === "+", I = !_ && this.telInput.selectionStart === 0 && f.key === "+", L = /^[0-9]$/.test(f.key), v = i ? L : I || L, A = b.slice(0, this.telInput.selectionStart) + f.key + b.slice(this.telInput.selectionEnd), G = this._getFullNumber(A), F = C.utils.getCoreNumber(G, this.selectedCountryData.iso2), M = this.maxCoreNumberLength && F.length > this.maxCoreNumberLength;
|
|
1994
|
+
let x = !1;
|
|
1988
1995
|
if (_) {
|
|
1989
1996
|
const f1 = this.selectedCountryData.iso2;
|
|
1990
|
-
|
|
1997
|
+
x = this._getCountryFromNumber(G) !== f1;
|
|
1991
1998
|
}
|
|
1992
|
-
(!v ||
|
|
1999
|
+
(!v || M && !x && !I) && f.preventDefault();
|
|
1993
2000
|
}
|
|
1994
2001
|
}
|
|
1995
2002
|
}, this.telInput.addEventListener("keydown", this._handleKeydownEvent));
|
|
@@ -2467,9 +2474,9 @@ const H2 = (y) => {
|
|
|
2467
2474
|
const i = n == null ? void 0 : n.default;
|
|
2468
2475
|
if (!i || typeof i != "object")
|
|
2469
2476
|
throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");
|
|
2470
|
-
return C.utils = i,
|
|
2477
|
+
return C.utils = i, $1("handleUtils"), !0;
|
|
2471
2478
|
}).catch((n) => {
|
|
2472
|
-
throw
|
|
2479
|
+
throw $1("rejectUtilsScriptPromise", n), n;
|
|
2473
2480
|
});
|
|
2474
2481
|
}
|
|
2475
2482
|
return null;
|
|
@@ -2483,7 +2490,7 @@ const H2 = (y) => {
|
|
|
2483
2490
|
//* Using a static var like this allows us to mock it in the tests.
|
|
2484
2491
|
documentReady: () => document.readyState === "complete",
|
|
2485
2492
|
//* Get the country data object.
|
|
2486
|
-
getCountryData: () =>
|
|
2493
|
+
getCountryData: () => W,
|
|
2487
2494
|
//* A getter for the plugin instance.
|
|
2488
2495
|
getInstance: (y) => {
|
|
2489
2496
|
const $ = y.getAttribute("data-intl-tel-input-id");
|
|
@@ -2494,7 +2501,7 @@ const H2 = (y) => {
|
|
|
2494
2501
|
attachUtils: H2,
|
|
2495
2502
|
startedLoadingUtilsScript: !1,
|
|
2496
2503
|
startedLoadingAutoCountry: !1,
|
|
2497
|
-
version: "25.0.
|
|
2504
|
+
version: "25.0.1"
|
|
2498
2505
|
}
|
|
2499
2506
|
);
|
|
2500
2507
|
(function() {
|
|
@@ -2563,18 +2570,18 @@ const H2 = (y) => {
|
|
|
2563
2570
|
new I();
|
|
2564
2571
|
function L(d, t) {
|
|
2565
2572
|
switch (this.g = d, this.l = !!t.aa, this.h = t.i, this.s = t.type, this.o = !1, this.h) {
|
|
2573
|
+
case G:
|
|
2574
|
+
case F:
|
|
2566
2575
|
case M:
|
|
2567
|
-
case
|
|
2568
|
-
case Z:
|
|
2569
|
-
case $1:
|
|
2576
|
+
case x:
|
|
2570
2577
|
case f1:
|
|
2571
|
-
case
|
|
2578
|
+
case A:
|
|
2572
2579
|
case v:
|
|
2573
2580
|
this.o = !0;
|
|
2574
2581
|
}
|
|
2575
2582
|
this.j = t.defaultValue;
|
|
2576
2583
|
}
|
|
2577
|
-
var v = 1,
|
|
2584
|
+
var v = 1, A = 2, G = 3, F = 4, M = 6, x = 16, f1 = 18;
|
|
2578
2585
|
function v1(d, t) {
|
|
2579
2586
|
for (this.h = d, this.g = {}, d = 0; d < t.length; d++) {
|
|
2580
2587
|
var e = t[d];
|
|
@@ -2586,22 +2593,22 @@ const H2 = (y) => {
|
|
|
2586
2593
|
return t.g - e.g;
|
|
2587
2594
|
}), d;
|
|
2588
2595
|
}
|
|
2589
|
-
function
|
|
2596
|
+
function R() {
|
|
2590
2597
|
this.h = {}, this.j = this.m().g, this.g = this.l = null;
|
|
2591
2598
|
}
|
|
2592
|
-
|
|
2593
|
-
return
|
|
2594
|
-
},
|
|
2599
|
+
R.prototype.has = function(d) {
|
|
2600
|
+
return B(this, d.g);
|
|
2601
|
+
}, R.prototype.get = function(d, t) {
|
|
2595
2602
|
return p(this, d.g, t);
|
|
2596
|
-
},
|
|
2603
|
+
}, R.prototype.set = function(d, t) {
|
|
2597
2604
|
E(this, d.g, t);
|
|
2598
|
-
},
|
|
2605
|
+
}, R.prototype.add = function(d, t) {
|
|
2599
2606
|
w1(this, d.g, t);
|
|
2600
2607
|
};
|
|
2601
2608
|
function S1(d, t) {
|
|
2602
2609
|
for (var e = a2(d.m()), r = 0; r < e.length; r++) {
|
|
2603
2610
|
var s = e[r], u = s.g;
|
|
2604
|
-
if (
|
|
2611
|
+
if (B(t, u)) {
|
|
2605
2612
|
d.g && delete d.g[s.g];
|
|
2606
2613
|
var l = s.h == 11 || s.h == 10;
|
|
2607
2614
|
if (s.l) {
|
|
@@ -2611,11 +2618,11 @@ const H2 = (y) => {
|
|
|
2611
2618
|
}
|
|
2612
2619
|
}
|
|
2613
2620
|
}
|
|
2614
|
-
|
|
2621
|
+
R.prototype.clone = function() {
|
|
2615
2622
|
var d = new this.constructor();
|
|
2616
2623
|
return d != this && (d.h = {}, d.g && (d.g = {}), S1(d, this)), d;
|
|
2617
2624
|
};
|
|
2618
|
-
function
|
|
2625
|
+
function B(d, t) {
|
|
2619
2626
|
return d.h[t] != null;
|
|
2620
2627
|
}
|
|
2621
2628
|
function n1(d, t) {
|
|
@@ -2639,7 +2646,7 @@ const H2 = (y) => {
|
|
|
2639
2646
|
return d.j[t].l ? r[e || 0] : r;
|
|
2640
2647
|
}
|
|
2641
2648
|
function S(d, t) {
|
|
2642
|
-
if (
|
|
2649
|
+
if (B(d, t)) d = p(d, t);
|
|
2643
2650
|
else d: {
|
|
2644
2651
|
if (d = d.j[t], d.j === void 0) if (t = d.s, t === Boolean) d.j = !1;
|
|
2645
2652
|
else if (t === Number) d.j = 0;
|
|
@@ -2655,8 +2662,8 @@ const H2 = (y) => {
|
|
|
2655
2662
|
function P(d, t) {
|
|
2656
2663
|
return n1(d, t) || [];
|
|
2657
2664
|
}
|
|
2658
|
-
function
|
|
2659
|
-
return d.j[t].l ?
|
|
2665
|
+
function K(d, t) {
|
|
2666
|
+
return d.j[t].l ? B(d, t) ? d.h[t].length : 0 : B(d, t) ? 1 : 0;
|
|
2660
2667
|
}
|
|
2661
2668
|
function E(d, t, e) {
|
|
2662
2669
|
d.h[t] = e, d.g && (d.g[t] = e);
|
|
@@ -2674,7 +2681,7 @@ const H2 = (y) => {
|
|
|
2674
2681
|
r1.prototype.g = function(d) {
|
|
2675
2682
|
throw new d.h(), Error("Unimplemented");
|
|
2676
2683
|
}, r1.prototype.h = function(d, t) {
|
|
2677
|
-
if (d.h == 11 || d.h == 10) return t instanceof
|
|
2684
|
+
if (d.h == 11 || d.h == 10) return t instanceof R ? t : this.g(d.s.prototype.m(), t);
|
|
2678
2685
|
if (d.h == 14) return typeof t == "string" && b1.test(t) && (d = Number(t), 0 < d) ? d : t;
|
|
2679
2686
|
if (!d.o) return t;
|
|
2680
2687
|
if (d = d.s, d === String) {
|
|
@@ -2688,52 +2695,52 @@ const H2 = (y) => {
|
|
|
2688
2695
|
n(p1, r1), p1.prototype.g = function(d, t) {
|
|
2689
2696
|
return d = new d.h(), d.l = this, d.h = t, d.g = {}, d;
|
|
2690
2697
|
};
|
|
2691
|
-
function
|
|
2698
|
+
function q() {
|
|
2692
2699
|
}
|
|
2693
|
-
n(
|
|
2700
|
+
n(q, p1), q.prototype.h = function(d, t) {
|
|
2694
2701
|
return d.h == 8 ? !!t : r1.prototype.h.apply(this, arguments);
|
|
2695
|
-
},
|
|
2696
|
-
return
|
|
2702
|
+
}, q.prototype.g = function(d, t) {
|
|
2703
|
+
return q.ma.g.call(this, d, t);
|
|
2697
2704
|
};
|
|
2698
|
-
function
|
|
2705
|
+
function N(d, t) {
|
|
2699
2706
|
d != null && this.g.apply(this, arguments);
|
|
2700
2707
|
}
|
|
2701
|
-
|
|
2708
|
+
N.prototype.h = "", N.prototype.set = function(d) {
|
|
2702
2709
|
this.h = "" + d;
|
|
2703
|
-
},
|
|
2710
|
+
}, N.prototype.g = function(d, t, e) {
|
|
2704
2711
|
if (this.h += String(d), t != null) for (let r = 1; r < arguments.length; r++) this.h += arguments[r];
|
|
2705
2712
|
return this;
|
|
2706
2713
|
};
|
|
2707
|
-
function
|
|
2714
|
+
function k(d) {
|
|
2708
2715
|
d.h = "";
|
|
2709
2716
|
}
|
|
2710
|
-
|
|
2717
|
+
N.prototype.toString = function() {
|
|
2711
2718
|
return this.h;
|
|
2712
2719
|
};
|
|
2713
|
-
function
|
|
2714
|
-
|
|
2720
|
+
function z() {
|
|
2721
|
+
R.call(this);
|
|
2715
2722
|
}
|
|
2716
|
-
n(
|
|
2723
|
+
n(z, R);
|
|
2717
2724
|
var L1 = null;
|
|
2718
2725
|
function w() {
|
|
2719
|
-
|
|
2726
|
+
R.call(this);
|
|
2720
2727
|
}
|
|
2721
|
-
n(w,
|
|
2728
|
+
n(w, R);
|
|
2722
2729
|
var N1 = null;
|
|
2723
|
-
function
|
|
2724
|
-
|
|
2730
|
+
function Z() {
|
|
2731
|
+
R.call(this);
|
|
2725
2732
|
}
|
|
2726
|
-
n(
|
|
2733
|
+
n(Z, R);
|
|
2727
2734
|
var T1 = null;
|
|
2728
|
-
|
|
2735
|
+
z.prototype.m = function() {
|
|
2729
2736
|
var d = L1;
|
|
2730
|
-
return d || (L1 = d = i1(
|
|
2731
|
-
},
|
|
2737
|
+
return d || (L1 = d = i1(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;
|
|
2738
|
+
}, z.m = z.prototype.m, w.prototype.m = function() {
|
|
2732
2739
|
var d = N1;
|
|
2733
2740
|
return d || (N1 = d = i1(w, { 0: { name: "PhoneNumberDesc", ia: "i18n.phonenumbers.PhoneNumberDesc" }, 2: { name: "national_number_pattern", i: 9, type: String }, 9: { name: "possible_length", aa: !0, i: 5, type: Number }, 10: { name: "possible_length_local_only", aa: !0, i: 5, type: Number }, 6: { name: "example_number", i: 9, type: String } })), d;
|
|
2734
|
-
}, w.m = w.prototype.m,
|
|
2741
|
+
}, w.m = w.prototype.m, Z.prototype.m = function() {
|
|
2735
2742
|
var d = T1;
|
|
2736
|
-
return d || (T1 = d = i1(
|
|
2743
|
+
return d || (T1 = d = i1(Z, {
|
|
2737
2744
|
0: { name: "PhoneMetadata", ia: "i18n.phonenumbers.PhoneMetadata" },
|
|
2738
2745
|
1: { name: "general_desc", i: 11, type: w },
|
|
2739
2746
|
2: { name: "fixed_line", i: 11, type: w },
|
|
@@ -2765,26 +2772,26 @@ const H2 = (y) => {
|
|
|
2765
2772
|
},
|
|
2766
2773
|
16: { name: "national_prefix_transform_rule", i: 9, type: String },
|
|
2767
2774
|
18: { name: "same_mobile_and_fixed_line_pattern", i: 8, defaultValue: !1, type: Boolean },
|
|
2768
|
-
19: { name: "number_format", aa: !0, i: 11, type:
|
|
2769
|
-
20: { name: "intl_number_format", aa: !0, i: 11, type:
|
|
2775
|
+
19: { name: "number_format", aa: !0, i: 11, type: z },
|
|
2776
|
+
20: { name: "intl_number_format", aa: !0, i: 11, type: z },
|
|
2770
2777
|
22: { name: "main_country_for_code", i: 8, defaultValue: !1, type: Boolean },
|
|
2771
2778
|
23: { name: "leading_digits", i: 9, type: String }
|
|
2772
2779
|
})), d;
|
|
2773
|
-
},
|
|
2774
|
-
function
|
|
2775
|
-
|
|
2780
|
+
}, Z.m = Z.prototype.m;
|
|
2781
|
+
function H() {
|
|
2782
|
+
R.call(this);
|
|
2776
2783
|
}
|
|
2777
|
-
n(
|
|
2784
|
+
n(H, R);
|
|
2778
2785
|
var A1 = null, h2 = { ra: 0, qa: 1, pa: 5, oa: 10, na: 20 };
|
|
2779
|
-
|
|
2786
|
+
H.prototype.m = function() {
|
|
2780
2787
|
var d = A1;
|
|
2781
|
-
return d || (A1 = d = i1(
|
|
2788
|
+
return d || (A1 = d = i1(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: h2 }, 7: {
|
|
2782
2789
|
name: "preferred_domestic_carrier_code",
|
|
2783
2790
|
i: 9,
|
|
2784
2791
|
type: String
|
|
2785
2792
|
} })), d;
|
|
2786
|
-
},
|
|
2787
|
-
var
|
|
2793
|
+
}, H.ctor = H, H.ctor.m = H.prototype.m;
|
|
2794
|
+
var X = {
|
|
2788
2795
|
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(" "),
|
|
2789
2796
|
7: ["RU", "KZ"],
|
|
2790
2797
|
20: ["EG"],
|
|
@@ -7952,29 +7959,29 @@ const H2 = (y) => {
|
|
|
7952
7959
|
X: "9",
|
|
7953
7960
|
Y: "9",
|
|
7954
7961
|
Z: "9"
|
|
7955
|
-
}, p2 = RegExp("[++]+"),
|
|
7956
|
-
function
|
|
7962
|
+
}, p2 = RegExp("[++]+"), Q = RegExp("^[++]+"), D1 = RegExp("([0-90-9٠-٩۰-۹])"), g2 = RegExp("[++0-90-9٠-٩۰-۹]"), C2 = /[\\\/] *x/, m2 = RegExp("[^0-90-9٠-٩۰-۹A-Za-z#]+$"), y2 = /(?:.*?[A-Za-z]){3}.*/, _2 = RegExp("^\\+([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*[0-90-9٠-٩۰-۹]([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*$"), I2 = RegExp("^([A-Za-z0-90-9٠-٩۰-۹]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.)*[A-Za-z]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.?$");
|
|
7963
|
+
function J(d) {
|
|
7957
7964
|
return "([0-90-9٠-٩۰-۹]{1," + d + "})";
|
|
7958
7965
|
}
|
|
7959
7966
|
function M1() {
|
|
7960
|
-
return ";ext=" +
|
|
7967
|
+
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") + "#?");
|
|
7961
7968
|
}
|
|
7962
7969
|
var P1 = new RegExp("(?:" + M1() + ")$", "i"), v2 = new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^[++]*(?:[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~*]*[0-90-9٠-٩۰-۹]){3,}[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~*A-Za-z0-90-9٠-٩۰-۹]*(?:" + M1() + ")?$", "i"), S2 = /(\$\d)/, w2 = /^\(?\$1\)?$/;
|
|
7963
7970
|
function x1(d) {
|
|
7964
|
-
return 2 > d.length ? !1 :
|
|
7971
|
+
return 2 > d.length ? !1 : U(v2, d);
|
|
7965
7972
|
}
|
|
7966
7973
|
function R1(d) {
|
|
7967
|
-
return
|
|
7974
|
+
return U(y2, d) ? s1(d, f2) : s1(d, g1);
|
|
7968
7975
|
}
|
|
7969
7976
|
function B1(d) {
|
|
7970
7977
|
var t = R1(d.toString());
|
|
7971
|
-
|
|
7978
|
+
k(d), d.g(t);
|
|
7972
7979
|
}
|
|
7973
7980
|
function k1(d) {
|
|
7974
|
-
return d != null && (
|
|
7981
|
+
return d != null && (K(d, 9) != 1 || P(d, 9)[0] != -1);
|
|
7975
7982
|
}
|
|
7976
7983
|
function s1(d, t) {
|
|
7977
|
-
for (var e = new
|
|
7984
|
+
for (var e = new N(), r, s = d.length, u = 0; u < s; ++u) r = d.charAt(u), r = t[r.toUpperCase()], r != null && e.g(r);
|
|
7978
7985
|
return e.toString();
|
|
7979
7986
|
}
|
|
7980
7987
|
function O1(d) {
|
|
@@ -7984,22 +7991,22 @@ const H2 = (y) => {
|
|
|
7984
7991
|
return d != null && isNaN(d) && d.toUpperCase() in E1;
|
|
7985
7992
|
}
|
|
7986
7993
|
D.prototype.format = function(d, t) {
|
|
7987
|
-
if (p(d, 2) == 0 &&
|
|
7994
|
+
if (p(d, 2) == 0 && B(d, 5)) {
|
|
7988
7995
|
var e = S(d, 5);
|
|
7989
7996
|
if (0 < e.length) return e;
|
|
7990
7997
|
}
|
|
7991
7998
|
e = S(d, 1);
|
|
7992
|
-
var r =
|
|
7999
|
+
var r = t1(d);
|
|
7993
8000
|
if (t == 0) return G1(e, 0, r, "");
|
|
7994
|
-
if (!(e in
|
|
7995
|
-
var s =
|
|
7996
|
-
d =
|
|
8001
|
+
if (!(e in X)) return r;
|
|
8002
|
+
var s = d1(this, e, e1(e));
|
|
8003
|
+
d = B(d, 3) && p(d, 3).length != 0 ? t == 3 ? ";ext=" + p(d, 3) : B(s, 13) ? p(s, 13) + S(d, 3) : " ext. " + S(d, 3) : "";
|
|
7997
8004
|
d: {
|
|
7998
8005
|
s = P(s, 20).length == 0 || t == 2 ? P(s, 19) : P(s, 20);
|
|
7999
8006
|
for (var u, l = s.length, h = 0; h < l; ++h) {
|
|
8000
8007
|
u = s[h];
|
|
8001
|
-
var m =
|
|
8002
|
-
if ((m == 0 || r.search(p(u, 3, m - 1)) == 0) && (m = new RegExp(p(u, 1)),
|
|
8008
|
+
var m = K(u, 3);
|
|
8009
|
+
if ((m == 0 || r.search(p(u, 3, m - 1)) == 0) && (m = new RegExp(p(u, 1)), U(m, r))) {
|
|
8003
8010
|
s = u;
|
|
8004
8011
|
break d;
|
|
8005
8012
|
}
|
|
@@ -8011,13 +8018,13 @@ const H2 = (y) => {
|
|
|
8011
8018
|
5
|
|
8012
8019
|
), l = S(l, 4), r = t == 2 && l != null && 0 < l.length ? r.replace(u, s.replace(S2, l)) : r.replace(u, s), t == 3 && (r = r.replace(RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]+"), ""), r = r.replace(RegExp("[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))), G1(e, t, r, d);
|
|
8013
8020
|
};
|
|
8014
|
-
function
|
|
8015
|
-
return e == "001" ?
|
|
8021
|
+
function d1(d, t, e) {
|
|
8022
|
+
return e == "001" ? j(d, "" + t) : j(d, e);
|
|
8016
8023
|
}
|
|
8017
|
-
function
|
|
8018
|
-
if (!
|
|
8024
|
+
function t1(d) {
|
|
8025
|
+
if (!B(d, 2)) return "";
|
|
8019
8026
|
var t = "" + p(d, 2);
|
|
8020
|
-
return
|
|
8027
|
+
return B(d, 4) && p(d, 4) && 0 < S(d, 8) ? Array(S(d, 8) + 1).join("0") + t : t;
|
|
8021
8028
|
}
|
|
8022
8029
|
function G1(d, t, e, r) {
|
|
8023
8030
|
switch (t) {
|
|
@@ -8060,40 +8067,40 @@ const H2 = (y) => {
|
|
|
8060
8067
|
}
|
|
8061
8068
|
function F1(d, t) {
|
|
8062
8069
|
var e = U1(d, t);
|
|
8063
|
-
return d =
|
|
8070
|
+
return d = d1(d, S(t, 1), e), d == null ? -1 : (t = t1(t), C1(t, d));
|
|
8064
8071
|
}
|
|
8065
8072
|
function C1(d, t) {
|
|
8066
|
-
return
|
|
8073
|
+
return O(d, p(t, 1)) ? O(d, p(t, 5)) ? 4 : O(d, p(t, 4)) ? 3 : O(d, p(t, 6)) ? 5 : O(d, p(t, 8)) ? 6 : O(d, p(t, 7)) ? 7 : O(d, p(t, 21)) ? 8 : O(d, p(t, 25)) ? 9 : O(d, p(t, 28)) ? 10 : O(d, p(t, 2)) ? p(t, 18) || O(d, p(t, 3)) ? 2 : 0 : !p(t, 18) && O(d, p(t, 3)) ? 1 : -1 : -1;
|
|
8067
8074
|
}
|
|
8068
|
-
function
|
|
8075
|
+
function j(d, t) {
|
|
8069
8076
|
if (t == null) return null;
|
|
8070
8077
|
t = t.toUpperCase();
|
|
8071
8078
|
var e = d.g[t];
|
|
8072
8079
|
if (e == null) {
|
|
8073
8080
|
if (e = E1[t], e == null) return null;
|
|
8074
|
-
e = new
|
|
8081
|
+
e = new q().g(Z.m(), e), d.g[t] = e;
|
|
8075
8082
|
}
|
|
8076
8083
|
return e;
|
|
8077
8084
|
}
|
|
8078
|
-
function
|
|
8085
|
+
function O(d, t) {
|
|
8079
8086
|
var e = d.length;
|
|
8080
|
-
return 0 <
|
|
8087
|
+
return 0 < K(t, 9) && P(t, 9).indexOf(e) == -1 ? !1 : U(S(t, 2), d);
|
|
8081
8088
|
}
|
|
8082
8089
|
function b2(d, t) {
|
|
8083
|
-
var e = U1(d, t), r = S(t, 1), s =
|
|
8084
|
-
return s == null || e != "001" && r != V1(d, e) ? s = !1 : (d =
|
|
8090
|
+
var e = U1(d, t), r = S(t, 1), s = d1(d, r, e);
|
|
8091
|
+
return s == null || e != "001" && r != V1(d, e) ? s = !1 : (d = t1(t), s = C1(d, s) != -1), s;
|
|
8085
8092
|
}
|
|
8086
8093
|
function U1(d, t) {
|
|
8087
8094
|
if (t == null) return null;
|
|
8088
8095
|
var e = S(t, 1);
|
|
8089
|
-
if (e =
|
|
8096
|
+
if (e = X[e], e == null) d = null;
|
|
8090
8097
|
else if (e.length == 1) d = e[0];
|
|
8091
8098
|
else d: {
|
|
8092
|
-
t =
|
|
8099
|
+
t = t1(t);
|
|
8093
8100
|
for (var r, s = e.length, u = 0; u < s; u++) {
|
|
8094
8101
|
r = e[u];
|
|
8095
|
-
var l =
|
|
8096
|
-
if (
|
|
8102
|
+
var l = j(d, r);
|
|
8103
|
+
if (B(l, 23)) {
|
|
8097
8104
|
if (t.search(p(l, 23)) == 0) {
|
|
8098
8105
|
d = r;
|
|
8099
8106
|
break d;
|
|
@@ -8107,41 +8114,41 @@ const H2 = (y) => {
|
|
|
8107
8114
|
}
|
|
8108
8115
|
return d;
|
|
8109
8116
|
}
|
|
8110
|
-
function
|
|
8111
|
-
return d =
|
|
8117
|
+
function e1(d) {
|
|
8118
|
+
return d = X[d], d == null ? "ZZ" : d[0];
|
|
8112
8119
|
}
|
|
8113
8120
|
function V1(d, t) {
|
|
8114
|
-
if (d =
|
|
8121
|
+
if (d = j(d, t), d == null) throw Error("Invalid region code: " + t);
|
|
8115
8122
|
return S(d, 10);
|
|
8116
8123
|
}
|
|
8117
8124
|
function l1(d, t, e, r) {
|
|
8118
|
-
var s = u1(e, r), u =
|
|
8119
|
-
if (s = P(s, 10), r == 2) if (k1(u1(e, 0))) d = u1(e, 1), k1(d) && (u = u.concat(
|
|
8125
|
+
var s = u1(e, r), u = K(s, 9) == 0 ? P(p(e, 1), 9) : P(s, 9);
|
|
8126
|
+
if (s = P(s, 10), r == 2) if (k1(u1(e, 0))) d = u1(e, 1), k1(d) && (u = u.concat(K(d, 9) == 0 ? P(p(e, 1), 9) : P(d, 9)), u.sort(), s.length == 0 ? s = P(d, 10) : (s = s.concat(P(d, 10)), s.sort()));
|
|
8120
8127
|
else return l1(d, t, e, 1);
|
|
8121
8128
|
return u[0] == -1 ? 5 : (t = t.length, -1 < s.indexOf(t) ? 4 : (e = u[0], e == t ? 0 : e > t ? 2 : u[u.length - 1] < t ? 3 : -1 < u.indexOf(t, 1) ? 0 : 5));
|
|
8122
8129
|
}
|
|
8123
8130
|
function a1(d, t, e) {
|
|
8124
|
-
var r =
|
|
8125
|
-
return t = S(t, 1), t in
|
|
8131
|
+
var r = t1(t);
|
|
8132
|
+
return t = S(t, 1), t in X ? (t = d1(d, t, e1(t)), l1(d, r, t, e)) : 1;
|
|
8126
8133
|
}
|
|
8127
8134
|
function K1(d, t) {
|
|
8128
8135
|
if (d = d.toString(), d.length == 0 || d.charAt(0) == "0") return 0;
|
|
8129
|
-
for (var e, r = d.length, s = 1; 3 >= s && s <= r; ++s) if (e = parseInt(d.substring(0, s), 10), e in
|
|
8136
|
+
for (var e, r = d.length, s = 1; 3 >= s && s <= r; ++s) if (e = parseInt(d.substring(0, s), 10), e in X) return t.g(d.substring(s)), e;
|
|
8130
8137
|
return 0;
|
|
8131
8138
|
}
|
|
8132
8139
|
function H1(d, t, e, r, s, u) {
|
|
8133
8140
|
if (t.length == 0) return 0;
|
|
8134
|
-
t = new
|
|
8141
|
+
t = new N(t);
|
|
8135
8142
|
var l;
|
|
8136
8143
|
e != null && (l = p(e, 11)), l == null && (l = "NonMatch");
|
|
8137
8144
|
var h = t.toString();
|
|
8138
8145
|
if (h.length == 0) l = 20;
|
|
8139
|
-
else if (
|
|
8146
|
+
else if (Q.test(h)) h = h.replace(Q, ""), k(t), t.g(R1(h)), l = 1;
|
|
8140
8147
|
else {
|
|
8141
8148
|
if (h = new RegExp(l), B1(t), l = t.toString(), l.search(h) == 0) {
|
|
8142
8149
|
h = l.match(h)[0].length;
|
|
8143
8150
|
var m = l.substring(h).match(D1);
|
|
8144
|
-
m && m[1] != null && 0 < m[1].length && s1(m[1], g1) == "0" ? l = !1 : (
|
|
8151
|
+
m && m[1] != null && 0 < m[1].length && s1(m[1], g1) == "0" ? l = !1 : (k(t), t.g(l.substring(h)), l = !0);
|
|
8145
8152
|
} else l = !1;
|
|
8146
8153
|
l = l ? 5 : 20;
|
|
8147
8154
|
}
|
|
@@ -8150,7 +8157,7 @@ const H2 = (y) => {
|
|
|
8150
8157
|
if (d = K1(t, r), d != 0) return E(u, 1, d), d;
|
|
8151
8158
|
throw Error("Invalid country calling code");
|
|
8152
8159
|
}
|
|
8153
|
-
return e != null && (l = S(e, 10), h = "" + l, m = t.toString(), m.lastIndexOf(h, 0) == 0 && (h = new
|
|
8160
|
+
return e != null && (l = S(e, 10), h = "" + l, m = t.toString(), m.lastIndexOf(h, 0) == 0 && (h = new N(m.substring(h.length)), m = p(e, 1), m = new RegExp(S(m, 2)), j1(h, e, null), h = h.toString(), !U(m, t.toString()) && U(m, h) || l1(d, t.toString(), e, -1) == 3)) ? (r.g(h), s && E(u, 6, 10), E(u, 1, l), l) : (E(u, 1, 0), 0);
|
|
8154
8161
|
}
|
|
8155
8162
|
function j1(d, t, e) {
|
|
8156
8163
|
var r = d.toString(), s = r.length, u = p(t, 15);
|
|
@@ -8158,19 +8165,19 @@ const H2 = (y) => {
|
|
|
8158
8165
|
var l = new RegExp("^(?:" + u + ")");
|
|
8159
8166
|
if (s = l.exec(r)) {
|
|
8160
8167
|
u = new RegExp(S(p(t, 1), 2));
|
|
8161
|
-
var h =
|
|
8162
|
-
t = p(t, 16), t == null || t.length == 0 || s[m] == null || s[m].length == 0 ? (!h ||
|
|
8168
|
+
var h = U(u, r), m = s.length - 1;
|
|
8169
|
+
t = p(t, 16), t == null || t.length == 0 || s[m] == null || s[m].length == 0 ? (!h || U(u, r.substring(s[0].length))) && (e != null && 0 < m && s[m] != null && e.g(s[1]), d.set(r.substring(s[0].length))) : (r = r.replace(l, t), (!h || U(u, r)) && (e != null && 0 < m && e.g(s[1]), d.set(r)));
|
|
8163
8170
|
}
|
|
8164
8171
|
}
|
|
8165
8172
|
}
|
|
8166
|
-
function
|
|
8173
|
+
function Y(d, t, e) {
|
|
8167
8174
|
if (!o1(e) && 0 < t.length && t.charAt(0) != "+") throw Error("Invalid country calling code");
|
|
8168
8175
|
return W1(d, t, e, !0);
|
|
8169
8176
|
}
|
|
8170
8177
|
function W1(d, t, e, r) {
|
|
8171
8178
|
if (t == null) throw Error("The string supplied did not seem to be a phone number");
|
|
8172
8179
|
if (250 < t.length) throw Error("The string supplied is too long to be a phone number");
|
|
8173
|
-
var s = new
|
|
8180
|
+
var s = new N(), u = t.indexOf(";phone-context=");
|
|
8174
8181
|
if (u === -1) u = null;
|
|
8175
8182
|
else if (u += 15, u >= t.length) u = "";
|
|
8176
8183
|
else {
|
|
@@ -8178,32 +8185,32 @@ const H2 = (y) => {
|
|
|
8178
8185
|
u = l !== -1 ? t.substring(u, l) : t.substring(u);
|
|
8179
8186
|
}
|
|
8180
8187
|
var h = u;
|
|
8181
|
-
if (h == null ? l = !0 : h.length === 0 ? l = !1 : (l = _2.exec(h), h = I2.exec(h), l = l !== null || h !== null), !l || (u != null ? (u.charAt(0) === "+" && s.g(u), u = t.indexOf("tel:"), s.g(t.substring(0 <= u ? u + 4 : 0, t.indexOf(";phone-context=")))) : (u = s.g, l = t ?? "", h = l.search(g2), 0 <= h ? (l = l.substring(h), l = l.replace(m2, ""), h = l.search(C2), 0 <= h && (l = l.substring(0, h))) : l = "", u.call(s, l)), u = s.toString(), l = u.indexOf(";isub="), 0 < l && (
|
|
8182
|
-
if (u = s.toString(), !(o1(e) || u != null && 0 < u.length &&
|
|
8183
|
-
u = new
|
|
8188
|
+
if (h == null ? l = !0 : h.length === 0 ? l = !1 : (l = _2.exec(h), h = I2.exec(h), l = l !== null || h !== null), !l || (u != null ? (u.charAt(0) === "+" && s.g(u), u = t.indexOf("tel:"), s.g(t.substring(0 <= u ? u + 4 : 0, t.indexOf(";phone-context=")))) : (u = s.g, l = t ?? "", h = l.search(g2), 0 <= h ? (l = l.substring(h), l = l.replace(m2, ""), h = l.search(C2), 0 <= h && (l = l.substring(0, h))) : l = "", u.call(s, l)), u = s.toString(), l = u.indexOf(";isub="), 0 < l && (k(s), s.g(u.substring(0, l))), !x1(s.toString()))) throw Error("The string supplied did not seem to be a phone number");
|
|
8189
|
+
if (u = s.toString(), !(o1(e) || u != null && 0 < u.length && Q.test(u))) throw Error("Invalid country calling code");
|
|
8190
|
+
u = new H(), r && E(u, 5, t);
|
|
8184
8191
|
d: {
|
|
8185
8192
|
if (t = s.toString(), l = t.search(P1), 0 <= l && x1(t.substring(0, l))) {
|
|
8186
8193
|
h = t.match(P1);
|
|
8187
|
-
for (var m = h.length,
|
|
8188
|
-
|
|
8194
|
+
for (var m = h.length, V = 1; V < m; ++V) if (h[V] != null && 0 < h[V].length) {
|
|
8195
|
+
k(s), s.g(t.substring(0, l)), t = h[V];
|
|
8189
8196
|
break d;
|
|
8190
8197
|
}
|
|
8191
8198
|
}
|
|
8192
8199
|
t = "";
|
|
8193
8200
|
}
|
|
8194
|
-
0 < t.length && E(u, 3, t), l =
|
|
8201
|
+
0 < t.length && E(u, 3, t), l = j(d, e), t = new N(), h = 0, m = s.toString();
|
|
8195
8202
|
try {
|
|
8196
8203
|
h = H1(d, m, l, t, r, u);
|
|
8197
8204
|
} catch (_1) {
|
|
8198
|
-
if (_1.message == "Invalid country calling code" &&
|
|
8199
|
-
if (m = m.replace(
|
|
8205
|
+
if (_1.message == "Invalid country calling code" && Q.test(m)) {
|
|
8206
|
+
if (m = m.replace(Q, ""), h = H1(d, m, l, t, r, u), h == 0) throw _1;
|
|
8200
8207
|
} else throw _1;
|
|
8201
8208
|
}
|
|
8202
|
-
if (h != 0 ? (s =
|
|
8209
|
+
if (h != 0 ? (s = e1(h), s != e && (l = d1(d, h, s))) : (B1(s), t.g(s.toString()), e != null ? (h = S(l, 10), E(
|
|
8203
8210
|
u,
|
|
8204
8211
|
1,
|
|
8205
8212
|
h
|
|
8206
|
-
)) : r && (delete u.h[6], u.g && delete u.g[6])), 2 > t.h.length || (l != null && (e = new
|
|
8213
|
+
)) : r && (delete u.h[6], u.g && delete u.g[6])), 2 > t.h.length || (l != null && (e = new N(), s = new N(t.toString()), j1(s, l, e), d = l1(d, s.toString(), l, -1), d != 2 && d != 4 && d != 5 && (t = s, r && 0 < e.toString().length && E(u, 7, e.toString()))), r = t.toString(), d = r.length, 2 > d)) throw Error("The string supplied is too short to be a phone number");
|
|
8207
8214
|
if (17 < d) throw Error("The string supplied is too long to be a phone number");
|
|
8208
8215
|
if (1 < r.length && r.charAt(0) == "0") {
|
|
8209
8216
|
for (E(u, 4, !0), d = 1; d < r.length - 1 && r.charAt(d) == "0"; ) d++;
|
|
@@ -8211,36 +8218,36 @@ const H2 = (y) => {
|
|
|
8211
8218
|
}
|
|
8212
8219
|
return E(u, 2, parseInt(r, 10)), u;
|
|
8213
8220
|
}
|
|
8214
|
-
function
|
|
8221
|
+
function U(d, t) {
|
|
8215
8222
|
return !!((d = typeof d == "string" ? t.match("^(?:" + d + ")$") : t.match(d)) && d[0].length == t.length);
|
|
8216
8223
|
}
|
|
8217
8224
|
function L2(d) {
|
|
8218
|
-
this.fa = RegExp(" "), this.ja = "", this.v = new
|
|
8225
|
+
this.fa = RegExp(" "), this.ja = "", this.v = new N(), this.da = "", this.s = new N(), this.ba = new N(), this.u = !0, this.ea = this.ca = this.la = !1, this.ga = D.g(), this.$ = 0, this.h = new N(), this.ha = !1, this.o = "", this.g = new N(), this.j = [], this.ka = d, this.l = Y1(this, this.ka);
|
|
8219
8226
|
}
|
|
8220
|
-
var z1 = new
|
|
8227
|
+
var z1 = new Z();
|
|
8221
8228
|
E(z1, 11, "NA");
|
|
8222
8229
|
var N2 = RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*)*$"), Z1 = /[- ]/;
|
|
8223
8230
|
function Y1(d, t) {
|
|
8224
8231
|
var e = d.ga;
|
|
8225
|
-
return t = o1(t) ? V1(e, t) : 0, d =
|
|
8232
|
+
return t = o1(t) ? V1(e, t) : 0, d = j(d.ga, e1(t)), d ?? z1;
|
|
8226
8233
|
}
|
|
8227
8234
|
function J1(d) {
|
|
8228
8235
|
for (var t = d.j.length, e = 0; e < t; ++e) {
|
|
8229
8236
|
var r = d.j[e], s = S(r, 1);
|
|
8230
8237
|
if (d.da == s) return !1;
|
|
8231
8238
|
var u = d, l = r, h = S(l, 1);
|
|
8232
|
-
|
|
8239
|
+
k(u.v);
|
|
8233
8240
|
var m = u;
|
|
8234
8241
|
l = S(l, 2);
|
|
8235
|
-
var
|
|
8236
|
-
if (
|
|
8242
|
+
var V = "999999999999999".match(h)[0];
|
|
8243
|
+
if (V.length < m.g.h.length ? m = "" : (m = V.replace(new RegExp(h, "g"), l), m = m.replace(RegExp("9", "g"), " ")), 0 < m.length ? (u.v.g(m), u = !0) : u = !1, u) return d.da = s, d.ha = Z1.test(p(r, 4)), d.$ = 0, !0;
|
|
8237
8244
|
}
|
|
8238
8245
|
return d.u = !1;
|
|
8239
8246
|
}
|
|
8240
8247
|
function q1(d, t) {
|
|
8241
8248
|
for (var e = [], r = t.length - 3, s = d.j.length, u = 0; u < s; ++u) {
|
|
8242
8249
|
var l = d.j[u];
|
|
8243
|
-
|
|
8250
|
+
K(l, 3) == 0 ? e.push(d.j[u]) : (l = p(l, 3, Math.min(r, K(l, 3) - 1)), t.search(l) == 0 && e.push(d.j[u]));
|
|
8244
8251
|
}
|
|
8245
8252
|
d.j = e;
|
|
8246
8253
|
}
|
|
@@ -8251,7 +8258,7 @@ const H2 = (y) => {
|
|
|
8251
8258
|
if (!d.la) {
|
|
8252
8259
|
if (e2(d)) {
|
|
8253
8260
|
if ($2(d)) return X1(d);
|
|
8254
|
-
} else if (0 < d.o.length && (t = d.g.toString(),
|
|
8261
|
+
} else if (0 < d.o.length && (t = d.g.toString(), k(d.g), d.g.g(d.o), d.g.g(t), t = d.h.toString(), e = t.lastIndexOf(d.o), k(d.h), d.h.g(t.substring(0, e))), d.o != t2(d)) return d.h.g(" "), X1(d);
|
|
8255
8262
|
}
|
|
8256
8263
|
return d.s.toString();
|
|
8257
8264
|
}
|
|
@@ -8268,7 +8275,7 @@ const H2 = (y) => {
|
|
|
8268
8275
|
}
|
|
8269
8276
|
}
|
|
8270
8277
|
function X1(d) {
|
|
8271
|
-
return d.u = !0, d.ea = !1, d.j = [], d.$ = 0,
|
|
8278
|
+
return d.u = !0, d.ea = !1, d.j = [], d.$ = 0, k(d.v), d.da = "", m1(d);
|
|
8272
8279
|
}
|
|
8273
8280
|
function Q1(d) {
|
|
8274
8281
|
for (var t = d.g.toString(), e = d.j.length, r = 0; r < e; ++r) {
|
|
@@ -8284,9 +8291,9 @@ const H2 = (y) => {
|
|
|
8284
8291
|
function m1(d) {
|
|
8285
8292
|
var t = d.g.toString();
|
|
8286
8293
|
if (3 <= t.length) {
|
|
8287
|
-
for (var e = d.ca && d.o.length == 0 && 0 <
|
|
8294
|
+
for (var e = d.ca && d.o.length == 0 && 0 < K(d.l, 20) ? P(d.l, 20) : P(d.l, 19), r = e.length, s = 0; s < r; ++s) {
|
|
8288
8295
|
var u = e[s];
|
|
8289
|
-
0 < d.o.length && O1(S(u, 4)) && !p(u, 6) && !
|
|
8296
|
+
0 < d.o.length && O1(S(u, 4)) && !p(u, 6) && !B(u, 5) || (d.o.length != 0 || d.ca || O1(S(u, 4)) || p(u, 6)) && N2.test(S(u, 2)) && d.j.push(u);
|
|
8290
8297
|
}
|
|
8291
8298
|
return q1(d, t), t = Q1(d), 0 < t.length ? t : J1(d) ? d2(d) : d.s.toString();
|
|
8292
8299
|
}
|
|
@@ -8304,22 +8311,22 @@ const H2 = (y) => {
|
|
|
8304
8311
|
var t = d.g.toString(), e = 0;
|
|
8305
8312
|
if (p(d.l, 10) != 1) var r = !1;
|
|
8306
8313
|
else r = d.g.toString(), r = r.charAt(0) == "1" && r.charAt(1) != "0" && r.charAt(1) != "1";
|
|
8307
|
-
return r ? (e = 1, d.h.g("1").g(" "), d.ca = !0) :
|
|
8314
|
+
return r ? (e = 1, d.h.g("1").g(" "), d.ca = !0) : B(d.l, 15) && (r = new RegExp("^(?:" + p(d.l, 15) + ")"), r = t.match(r), r != null && r[0] != null && 0 < r[0].length && (d.ca = !0, e = r[0].length, d.h.g(t.substring(0, e)))), k(d.g), d.g.g(t.substring(e)), t.substring(0, e);
|
|
8308
8315
|
}
|
|
8309
8316
|
function e2(d) {
|
|
8310
8317
|
var t = d.ba.toString(), e = new RegExp("^(?:\\+|" + p(d.l, 11) + ")");
|
|
8311
|
-
return e = t.match(e), e != null && e[0] != null && 0 < e[0].length ? (d.ca = !0, e = e[0].length,
|
|
8318
|
+
return e = t.match(e), e != null && e[0] != null && 0 < e[0].length ? (d.ca = !0, e = e[0].length, k(d.g), d.g.g(t.substring(e)), k(d.h), d.h.g(t.substring(0, e)), t.charAt(0) != "+" && d.h.g(" "), !0) : !1;
|
|
8312
8319
|
}
|
|
8313
8320
|
function $2(d) {
|
|
8314
8321
|
if (d.g.h.length == 0) return !1;
|
|
8315
|
-
var t = new
|
|
8316
|
-
return e == 0 ? !1 : (
|
|
8322
|
+
var t = new N(), e = K1(d.g, t);
|
|
8323
|
+
return e == 0 ? !1 : (k(d.g), d.g.g(t.toString()), t = e1(e), t == "001" ? d.l = j(d.ga, "" + e) : t != d.ka && (d.l = Y1(d, t)), d.h.g("" + e).g(" "), d.o = "", !0);
|
|
8317
8324
|
}
|
|
8318
8325
|
function n2(d, t) {
|
|
8319
8326
|
var e = d.v.toString();
|
|
8320
8327
|
if (0 <= e.substring(d.$).search(d.fa)) {
|
|
8321
8328
|
var r = e.search(d.fa);
|
|
8322
|
-
return t = e.replace(d.fa, t),
|
|
8329
|
+
return t = e.replace(d.fa, t), k(d.v), d.v.g(t), d.$ = r, t.substring(0, d.$ + 1);
|
|
8323
8330
|
}
|
|
8324
8331
|
return d.j.length == 1 && (d.u = !1), d.da = "", d.s.toString();
|
|
8325
8332
|
}
|
|
@@ -8335,7 +8342,7 @@ const H2 = (y) => {
|
|
|
8335
8342
|
}
|
|
8336
8343
|
}), $("intlTelInputUtilsTemp.formatNumber", (d, t, e) => {
|
|
8337
8344
|
try {
|
|
8338
|
-
const s = D.g(), u =
|
|
8345
|
+
const s = D.g(), u = Y(s, d, t);
|
|
8339
8346
|
var r = a1(s, u, -1);
|
|
8340
8347
|
return r == 0 || r == 4 ? s.format(u, typeof e > "u" ? 0 : e) : d;
|
|
8341
8348
|
} catch {
|
|
@@ -8347,9 +8354,9 @@ const H2 = (y) => {
|
|
|
8347
8354
|
d: {
|
|
8348
8355
|
var s = m;
|
|
8349
8356
|
if (o1(d)) {
|
|
8350
|
-
var u = u1(
|
|
8357
|
+
var u = u1(j(s, d), e);
|
|
8351
8358
|
try {
|
|
8352
|
-
if (
|
|
8359
|
+
if (B(u, 6)) {
|
|
8353
8360
|
var l = p(u, 6), h = W1(s, l, d, !1);
|
|
8354
8361
|
break d;
|
|
8355
8362
|
}
|
|
@@ -8364,13 +8371,13 @@ const H2 = (y) => {
|
|
|
8364
8371
|
}
|
|
8365
8372
|
}), $("intlTelInputUtilsTemp.getExtension", (d, t) => {
|
|
8366
8373
|
try {
|
|
8367
|
-
return p(
|
|
8374
|
+
return p(Y(D.g(), d, t), 3);
|
|
8368
8375
|
} catch {
|
|
8369
8376
|
return "";
|
|
8370
8377
|
}
|
|
8371
8378
|
}), $("intlTelInputUtilsTemp.getNumberType", (d, t) => {
|
|
8372
8379
|
try {
|
|
8373
|
-
const e = D.g(), r =
|
|
8380
|
+
const e = D.g(), r = Y(e, d, t);
|
|
8374
8381
|
return F1(e, r);
|
|
8375
8382
|
} catch {
|
|
8376
8383
|
return -99;
|
|
@@ -8378,14 +8385,14 @@ const H2 = (y) => {
|
|
|
8378
8385
|
}), $("intlTelInputUtilsTemp.getValidationError", (d, t) => {
|
|
8379
8386
|
if (!t) return 1;
|
|
8380
8387
|
try {
|
|
8381
|
-
const e = D.g(), r =
|
|
8388
|
+
const e = D.g(), r = Y(e, d, t);
|
|
8382
8389
|
return a1(e, r, -1);
|
|
8383
8390
|
} catch (e) {
|
|
8384
8391
|
return e.message === "Invalid country calling code" ? 1 : 3 >= d.length || e.message === "Phone number too short after IDD" || e.message === "The string supplied is too short to be a phone number" ? 2 : e.message === "The string supplied is too long to be a phone number" ? 3 : -99;
|
|
8385
8392
|
}
|
|
8386
8393
|
}), $("intlTelInputUtilsTemp.isValidNumber", (d, t, e) => {
|
|
8387
8394
|
try {
|
|
8388
|
-
const r = D.g(), s =
|
|
8395
|
+
const r = D.g(), s = Y(r, d, t), u = b2(r, s);
|
|
8389
8396
|
if (e) {
|
|
8390
8397
|
const l = e.map((h) => y1[h]);
|
|
8391
8398
|
return u && l.includes(F1(r, s));
|
|
@@ -8396,7 +8403,7 @@ const H2 = (y) => {
|
|
|
8396
8403
|
}
|
|
8397
8404
|
}), $("intlTelInputUtilsTemp.isPossibleNumber", (d, t, e) => {
|
|
8398
8405
|
try {
|
|
8399
|
-
const r = D.g(), s =
|
|
8406
|
+
const r = D.g(), s = Y(r, d, t);
|
|
8400
8407
|
if (e) {
|
|
8401
8408
|
e.includes("FIXED_LINE_OR_MOBILE") && (e.includes("MOBILE") || e.push("MOBILE"), e.includes("FIXED_LINE") || e.push("FIXED_LINE"));
|
|
8402
8409
|
for (let u of e) if (a1(r, s, y1[u]) === 0) return !0;
|
|
@@ -8408,7 +8415,7 @@ const H2 = (y) => {
|
|
|
8408
8415
|
}
|
|
8409
8416
|
}), $("intlTelInputUtilsTemp.getCoreNumber", (d, t) => {
|
|
8410
8417
|
try {
|
|
8411
|
-
return p(
|
|
8418
|
+
return p(Y(D.g(), d, t), 2).toString();
|
|
8412
8419
|
} catch {
|
|
8413
8420
|
return "";
|
|
8414
8421
|
}
|
|
@@ -8468,16 +8475,16 @@ const z2 = {
|
|
|
8468
8475
|
}), D2(
|
|
8469
8476
|
() => o.disabled,
|
|
8470
8477
|
(v) => {
|
|
8471
|
-
var
|
|
8472
|
-
return (
|
|
8478
|
+
var A;
|
|
8479
|
+
return (A = g.value) == null ? void 0 : A.setDisabled(v);
|
|
8473
8480
|
}
|
|
8474
8481
|
), M2(() => {
|
|
8475
8482
|
var v;
|
|
8476
8483
|
return (v = g.value) == null ? void 0 : v.destroy();
|
|
8477
|
-
}), $({ instance: g, input: c }), (v,
|
|
8484
|
+
}), $({ instance: g, input: c }), (v, A) => P2((x2(), R2("input", B2({
|
|
8478
8485
|
ref_key: "input",
|
|
8479
8486
|
ref: c,
|
|
8480
|
-
"onUpdate:modelValue":
|
|
8487
|
+
"onUpdate:modelValue": A[0] || (A[0] = (G) => i.value = G),
|
|
8481
8488
|
type: "tel",
|
|
8482
8489
|
onCountrychange: L,
|
|
8483
8490
|
onInput: I
|