intl-tel-input 25.8.6 → 25.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -6
- package/angular/README.md +1 -1
- package/angular/build/IntlTelInput.js +6 -3
- package/angular/build/IntlTelInputWithUtils.js +6 -3
- package/angular/build/types/intl-tel-input.d.ts +1 -0
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/intlTelInput.d.ts +1 -0
- package/build/js/intlTelInput.js +7 -4
- package/build/js/intlTelInput.min.js +4 -4
- package/build/js/intlTelInputWithUtils.js +7 -4
- package/build/js/intlTelInputWithUtils.min.js +3 -3
- package/package.json +10 -10
- package/react/README.md +1 -1
- package/react/build/IntlTelInput.cjs +6 -3
- package/react/build/IntlTelInput.d.ts +1 -0
- package/react/build/IntlTelInput.js +6 -3
- package/react/build/IntlTelInputWithUtils.cjs +6 -3
- package/react/build/IntlTelInputWithUtils.js +6 -3
- package/vue/README.md +1 -1
- package/vue/build/IntlTelInput.mjs +14 -12
- package/vue/build/IntlTelInputWithUtils.mjs +166 -164
- package/angular/build/types/countryDataManager.d.ts +0 -25
- package/angular/build/types/dropdown.d.ts +0 -56
- package/angular/build/types/types.d.ts +0 -53
|
@@ -1594,13 +1594,15 @@ const V2 = {
|
|
|
1594
1594
|
for (const m of J)
|
|
1595
1595
|
m.name = u2[m.iso2];
|
|
1596
1596
|
let H2 = 0;
|
|
1597
|
-
const
|
|
1597
|
+
const w1 = (m) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(m).matches, j2 = () => {
|
|
1598
1598
|
if (typeof navigator < "u" && typeof window < "u") {
|
|
1599
|
-
const m = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), e =
|
|
1599
|
+
const m = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), e = w1("(max-width: 500px)"), i = w1("(max-height: 600px)"), n = w1("(pointer: coarse)");
|
|
1600
1600
|
return m || e || n && i;
|
|
1601
1601
|
}
|
|
1602
1602
|
return !1;
|
|
1603
1603
|
}, l2 = {
|
|
1604
|
+
// Allow alphanumeric "phonewords" (e.g. +1 800 FLOWERS) as valid numbers
|
|
1605
|
+
allowPhonewords: !1,
|
|
1604
1606
|
//* Whether or not to allow the dropdown.
|
|
1605
1607
|
allowDropdown: !0,
|
|
1606
1608
|
//* Add a placeholder in the input with an example number for the selected country.
|
|
@@ -1732,9 +1734,9 @@ class p1 {
|
|
|
1732
1734
|
this.options.countryOrder && (this.options.countryOrder = this.options.countryOrder.map((e) => e.toLowerCase())), this.countries.sort((e, i) => {
|
|
1733
1735
|
const { countryOrder: n } = this.options;
|
|
1734
1736
|
if (n) {
|
|
1735
|
-
const o = n.indexOf(e.iso2), l = n.indexOf(i.iso2),
|
|
1736
|
-
if (
|
|
1737
|
-
return
|
|
1737
|
+
const o = n.indexOf(e.iso2), l = n.indexOf(i.iso2), p = o > -1, h = l > -1;
|
|
1738
|
+
if (p || h)
|
|
1739
|
+
return p && h ? o - l : p ? -1 : 1;
|
|
1738
1740
|
}
|
|
1739
1741
|
return e.name.localeCompare(i.name);
|
|
1740
1742
|
});
|
|
@@ -1785,8 +1787,8 @@ class p1 {
|
|
|
1785
1787
|
const i = this.dialCodeToIso2Map[e.dialCode][0];
|
|
1786
1788
|
for (const n of e.areaCodes) {
|
|
1787
1789
|
for (let o = 1; o < n.length; o++) {
|
|
1788
|
-
const l = n.substring(0, o),
|
|
1789
|
-
this._addToDialCodeMap(i,
|
|
1790
|
+
const l = n.substring(0, o), p = e.dialCode + l;
|
|
1791
|
+
this._addToDialCodeMap(i, p), this._addToDialCodeMap(e.iso2, p);
|
|
1790
1792
|
}
|
|
1791
1793
|
this._addToDialCodeMap(e.iso2, e.dialCode + n);
|
|
1792
1794
|
}
|
|
@@ -1802,23 +1804,23 @@ class p1 {
|
|
|
1802
1804
|
showFlags: n,
|
|
1803
1805
|
containerClass: o,
|
|
1804
1806
|
hiddenInput: l,
|
|
1805
|
-
dropdownContainer:
|
|
1807
|
+
dropdownContainer: p,
|
|
1806
1808
|
fixDropdownWidth: h,
|
|
1807
1809
|
useFullscreenPopup: _,
|
|
1808
1810
|
countrySearch: b,
|
|
1809
1811
|
i18n: v
|
|
1810
|
-
} = this.options,
|
|
1812
|
+
} = this.options, w = p1._buildClassNames({
|
|
1811
1813
|
iti: !0,
|
|
1812
1814
|
"iti--allow-dropdown": e,
|
|
1813
1815
|
"iti--show-flags": n,
|
|
1814
1816
|
"iti--inline-dropdown": !_,
|
|
1815
1817
|
[o]: !!o
|
|
1816
|
-
}),
|
|
1817
|
-
if ((f = this.telInput.parentNode) == null || f.insertBefore(
|
|
1818
|
+
}), A = N("div", { class: w });
|
|
1819
|
+
if ((f = this.telInput.parentNode) == null || f.insertBefore(A, this.telInput), e || n || i) {
|
|
1818
1820
|
this.countryContainer = N(
|
|
1819
1821
|
"div",
|
|
1820
1822
|
{ class: "iti__country-container" },
|
|
1821
|
-
|
|
1823
|
+
A
|
|
1822
1824
|
), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", e ? (this.selectedCountry = N(
|
|
1823
1825
|
"button",
|
|
1824
1826
|
{
|
|
@@ -1934,7 +1936,7 @@ class p1 {
|
|
|
1934
1936
|
"aria-label": v.countryListAriaLabel
|
|
1935
1937
|
},
|
|
1936
1938
|
this.dropdownContent
|
|
1937
|
-
), this._appendListItems(), b && this._updateSearchResultsA11yText(),
|
|
1939
|
+
), this._appendListItems(), b && this._updateSearchResultsA11yText(), p) {
|
|
1938
1940
|
const D = p1._buildClassNames({
|
|
1939
1941
|
iti: !0,
|
|
1940
1942
|
"iti--container": !0,
|
|
@@ -1947,21 +1949,21 @@ class p1 {
|
|
|
1947
1949
|
this.countryContainer.appendChild(this.dropdownContent);
|
|
1948
1950
|
}
|
|
1949
1951
|
}
|
|
1950
|
-
if (
|
|
1952
|
+
if (A.appendChild(this.telInput), this._updateInputPadding(), l) {
|
|
1951
1953
|
const G = this.telInput.getAttribute("name") || "", F = l(G);
|
|
1952
1954
|
if (F.phone) {
|
|
1953
1955
|
const D = (I = this.telInput.form) == null ? void 0 : I.querySelector(`input[name="${F.phone}"]`);
|
|
1954
1956
|
D ? this.hiddenInput = D : (this.hiddenInput = N("input", {
|
|
1955
1957
|
type: "hidden",
|
|
1956
1958
|
name: F.phone
|
|
1957
|
-
}),
|
|
1959
|
+
}), A.appendChild(this.hiddenInput));
|
|
1958
1960
|
}
|
|
1959
1961
|
if (F.country) {
|
|
1960
1962
|
const D = (O = this.telInput.form) == null ? void 0 : O.querySelector(`input[name="${F.country}"]`);
|
|
1961
1963
|
D ? this.hiddenInputCountry = D : (this.hiddenInputCountry = N("input", {
|
|
1962
1964
|
type: "hidden",
|
|
1963
1965
|
name: F.country
|
|
1964
|
-
}),
|
|
1966
|
+
}), A.appendChild(this.hiddenInputCountry));
|
|
1965
1967
|
}
|
|
1966
1968
|
}
|
|
1967
1969
|
}
|
|
@@ -1990,12 +1992,12 @@ class p1 {
|
|
|
1990
1992
|
//* 1. Extracting a dial code from the given number
|
|
1991
1993
|
//* 2. Using explicit initialCountry
|
|
1992
1994
|
_setInitialState(e = !1) {
|
|
1993
|
-
const i = this.telInput.getAttribute("value"), n = this.telInput.value, l = i && i.charAt(0) === "+" && (!n || n.charAt(0) !== "+") ? i : n,
|
|
1994
|
-
if (
|
|
1995
|
+
const i = this.telInput.getAttribute("value"), n = this.telInput.value, l = i && i.charAt(0) === "+" && (!n || n.charAt(0) !== "+") ? i : n, p = this._getDialCode(l), h = a2(l), { initialCountry: _, geoIpLookup: b } = this.options, v = _ === "auto" && b;
|
|
1996
|
+
if (p && !h)
|
|
1995
1997
|
this._updateCountryFromNumber(l);
|
|
1996
1998
|
else if (!v || e) {
|
|
1997
|
-
const
|
|
1998
|
-
|
|
1999
|
+
const w = _ ? _.toLowerCase() : "";
|
|
2000
|
+
w && this._getCountryData(w, !0) ? this._setCountry(w) : p && h ? this._setCountry("us") : this._setCountry();
|
|
1999
2001
|
}
|
|
2000
2002
|
l && this._updateValFromNumber(l);
|
|
2001
2003
|
}
|
|
@@ -2055,19 +2057,19 @@ class p1 {
|
|
|
2055
2057
|
//* Initialize the tel input listeners.
|
|
2056
2058
|
_initTelInputListeners() {
|
|
2057
2059
|
const { strictMode: e, formatAsYouType: i, separateDialCode: n, allowDropdown: o, countrySearch: l } = this.options;
|
|
2058
|
-
let
|
|
2059
|
-
new RegExp("\\p{L}", "u").test(this.telInput.value) && (
|
|
2060
|
+
let p = !1;
|
|
2061
|
+
new RegExp("\\p{L}", "u").test(this.telInput.value) && (p = !0), this._handleInputEvent = (h) => {
|
|
2060
2062
|
if (this.isAndroid && (h == null ? void 0 : h.data) === "+" && n && o && l) {
|
|
2061
|
-
const
|
|
2062
|
-
this.telInput.value =
|
|
2063
|
+
const w = this.telInput.selectionStart || 0, A = this.telInput.value.substring(0, w - 1), f = this.telInput.value.substring(w);
|
|
2064
|
+
this.telInput.value = A + f, this._openDropdownWithPlus();
|
|
2063
2065
|
return;
|
|
2064
2066
|
}
|
|
2065
2067
|
this._updateCountryFromNumber(this.telInput.value) && this._triggerCountryChange();
|
|
2066
2068
|
const _ = (h == null ? void 0 : h.data) && /[^+0-9]/.test(h.data), b = (h == null ? void 0 : h.inputType) === "insertFromPaste" && this.telInput.value;
|
|
2067
|
-
_ || b && !e ?
|
|
2069
|
+
_ || b && !e ? p = !0 : /[^+0-9]/.test(this.telInput.value) || (p = !1);
|
|
2068
2070
|
const v = (h == null ? void 0 : h.detail) && h.detail.isSetNumber;
|
|
2069
|
-
if (i && !
|
|
2070
|
-
const
|
|
2071
|
+
if (i && !p && !v) {
|
|
2072
|
+
const w = this.telInput.selectionStart || 0, f = this.telInput.value.substring(0, w).replace(/[^+0-9]/g, "").length, I = (h == null ? void 0 : h.inputType) === "deleteContentForward", O = this._formatNumberAsYouType(), G = z2(f, O, w, I);
|
|
2071
2073
|
this.telInput.value = O, this.telInput.setSelectionRange(G, G);
|
|
2072
2074
|
}
|
|
2073
2075
|
}, this.telInput.addEventListener("input", this._handleInputEvent), (e || n) && (this._handleKeydownEvent = (h) => {
|
|
@@ -2077,8 +2079,8 @@ class p1 {
|
|
|
2077
2079
|
return;
|
|
2078
2080
|
}
|
|
2079
2081
|
if (e) {
|
|
2080
|
-
const _ = this.telInput.value, v = !(_.charAt(0) === "+") && this.telInput.selectionStart === 0 && h.key === "+",
|
|
2081
|
-
(!
|
|
2082
|
+
const _ = this.telInput.value, v = !(_.charAt(0) === "+") && this.telInput.selectionStart === 0 && h.key === "+", w = /^[0-9]$/.test(h.key), A = n ? w : v || w, f = _.slice(0, this.telInput.selectionStart) + h.key + _.slice(this.telInput.selectionEnd), I = this._getFullNumber(f), O = C.utils.getCoreNumber(I, this.selectedCountryData.iso2), G = this.maxCoreNumberLength && O.length > this.maxCoreNumberLength, D = this._getNewCountryFromNumber(I) !== null;
|
|
2083
|
+
(!A || G && !D && !v) && h.preventDefault();
|
|
2082
2084
|
}
|
|
2083
2085
|
}
|
|
2084
2086
|
}, this.telInput.addEventListener("keydown", this._handleKeydownEvent));
|
|
@@ -2167,18 +2169,18 @@ class p1 {
|
|
|
2167
2169
|
_filterCountries(e, i = !1) {
|
|
2168
2170
|
let n = !0;
|
|
2169
2171
|
this.countryList.innerHTML = "";
|
|
2170
|
-
const o = o2(e), l = o.length,
|
|
2172
|
+
const o = o2(e), l = o.length, p = [], h = [], _ = [], b = [], v = [], w = [];
|
|
2171
2173
|
for (const f of this.countries)
|
|
2172
|
-
i || l === 0 ? _.push(f) : f.iso2 === o ?
|
|
2173
|
-
const
|
|
2174
|
-
...
|
|
2174
|
+
i || l === 0 ? _.push(f) : f.iso2 === o ? p.push(f) : f.normalisedName.startsWith(o) ? h.push(f) : f.normalisedName.includes(o) ? _.push(f) : o === f.dialCode || o === f.dialCodePlus ? b.push(f) : f.dialCodePlus.includes(o) ? v.push(f) : f.initials.includes(o) && w.push(f);
|
|
2175
|
+
const A = [
|
|
2176
|
+
...p.sort((f, I) => f.priority - I.priority),
|
|
2175
2177
|
...h.sort((f, I) => f.priority - I.priority),
|
|
2176
2178
|
..._.sort((f, I) => f.priority - I.priority),
|
|
2177
2179
|
...b.sort((f, I) => f.priority - I.priority),
|
|
2178
2180
|
...v.sort((f, I) => f.priority - I.priority),
|
|
2179
|
-
...
|
|
2181
|
+
...w.sort((f, I) => f.priority - I.priority)
|
|
2180
2182
|
];
|
|
2181
|
-
for (const f of
|
|
2183
|
+
for (const f of A) {
|
|
2182
2184
|
const I = f.nodeById[this.id];
|
|
2183
2185
|
I && (this.countryList.appendChild(I), n && (this._highlightListItem(I, !1), n = !1));
|
|
2184
2186
|
}
|
|
@@ -2205,11 +2207,11 @@ class p1 {
|
|
|
2205
2207
|
_updateValFromNumber(e) {
|
|
2206
2208
|
let i = e;
|
|
2207
2209
|
if (this.options.formatOnDisplay && C.utils && this.selectedCountryData) {
|
|
2208
|
-
const n = this.options.nationalMode || i.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: o, INTERNATIONAL: l } = C.utils.numberFormat,
|
|
2210
|
+
const n = this.options.nationalMode || i.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: o, INTERNATIONAL: l } = C.utils.numberFormat, p = n ? o : l;
|
|
2209
2211
|
i = C.utils.formatNumber(
|
|
2210
2212
|
i,
|
|
2211
2213
|
this.selectedCountryData.iso2,
|
|
2212
|
-
|
|
2214
|
+
p
|
|
2213
2215
|
);
|
|
2214
2216
|
}
|
|
2215
2217
|
i = this._beforeSetNumber(i), this.telInput.value = i;
|
|
@@ -2224,8 +2226,8 @@ class p1 {
|
|
|
2224
2226
|
const { dialCode: i, nationalPrefix: n } = this.selectedCountryData;
|
|
2225
2227
|
if (e.charAt(0) === "+" || !i)
|
|
2226
2228
|
return e;
|
|
2227
|
-
const
|
|
2228
|
-
return `+${i}${
|
|
2229
|
+
const p = n && e.charAt(0) === n && !this.options.separateDialCode ? e.substring(1) : e;
|
|
2230
|
+
return `+${i}${p}`;
|
|
2229
2231
|
}
|
|
2230
2232
|
// Get the country ISO2 code from the given number
|
|
2231
2233
|
// BUT ONLY IF ITS CHANGED FROM THE CURRENTLY SELECTED COUNTRY
|
|
@@ -2235,13 +2237,13 @@ class p1 {
|
|
|
2235
2237
|
let n = i ? e.substring(i) : e;
|
|
2236
2238
|
const o = this.selectedCountryData.iso2, l = this.selectedCountryData.dialCode;
|
|
2237
2239
|
n = this._ensureHasDialCode(n);
|
|
2238
|
-
const
|
|
2239
|
-
if (
|
|
2240
|
-
const _ = f1(
|
|
2240
|
+
const p = this._getDialCode(n, !0), h = f1(n);
|
|
2241
|
+
if (p) {
|
|
2242
|
+
const _ = f1(p), b = this.dialCodeToIso2Map[_];
|
|
2241
2243
|
if (!o && this.defaultCountry && b.includes(this.defaultCountry))
|
|
2242
2244
|
return this.defaultCountry;
|
|
2243
|
-
const v = this.selectedCountryData.areaCodes && h.length > _.length,
|
|
2244
|
-
if (!(l === "1" && a2(h)) && !
|
|
2245
|
+
const v = this.selectedCountryData.areaCodes && h.length > _.length, w = o && b.includes(o) && !v;
|
|
2246
|
+
if (!(l === "1" && a2(h)) && !w) {
|
|
2245
2247
|
for (const f of b)
|
|
2246
2248
|
if (f)
|
|
2247
2249
|
return f;
|
|
@@ -2278,18 +2280,18 @@ class p1 {
|
|
|
2278
2280
|
_setCountry(e) {
|
|
2279
2281
|
const { separateDialCode: i, showFlags: n, i18n: o } = this.options, l = this.selectedCountryData.iso2 || "";
|
|
2280
2282
|
if (this.selectedCountryData = e ? this._getCountryData(e, !1) || {} : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountry) {
|
|
2281
|
-
const
|
|
2283
|
+
const p = e && n ? `iti__flag iti__${e}` : "iti__flag iti__globe";
|
|
2282
2284
|
let h, _;
|
|
2283
2285
|
if (e) {
|
|
2284
2286
|
const { name: b, dialCode: v } = this.selectedCountryData;
|
|
2285
2287
|
_ = b, h = o.selectedCountryAriaLabel.replace("${countryName}", b).replace("${dialCode}", `+${v}`);
|
|
2286
2288
|
} else
|
|
2287
2289
|
_ = o.noCountrySelected, h = o.noCountrySelected;
|
|
2288
|
-
this.selectedCountryInner.className =
|
|
2290
|
+
this.selectedCountryInner.className = p, this.selectedCountry.setAttribute("title", _), this.selectedCountry.setAttribute("aria-label", h);
|
|
2289
2291
|
}
|
|
2290
2292
|
if (i) {
|
|
2291
|
-
const
|
|
2292
|
-
this.selectedDialCode.innerHTML =
|
|
2293
|
+
const p = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
|
|
2294
|
+
this.selectedDialCode.innerHTML = p, this._updateInputPadding();
|
|
2293
2295
|
}
|
|
2294
2296
|
return this._updatePlaceholder(), this._updateMaxLength(), l !== e;
|
|
2295
2297
|
}
|
|
@@ -2306,14 +2308,14 @@ class p1 {
|
|
|
2306
2308
|
if (e && C.utils)
|
|
2307
2309
|
if (o) {
|
|
2308
2310
|
const l = C.utils.numberType[i];
|
|
2309
|
-
let
|
|
2311
|
+
let p = C.utils.getExampleNumber(
|
|
2310
2312
|
o,
|
|
2311
2313
|
!1,
|
|
2312
2314
|
l,
|
|
2313
2315
|
!0
|
|
2314
|
-
), h =
|
|
2315
|
-
for (; C.utils.isPossibleNumber(
|
|
2316
|
-
h =
|
|
2316
|
+
), h = p;
|
|
2317
|
+
for (; C.utils.isPossibleNumber(p, o, n); )
|
|
2318
|
+
h = p, p += "0";
|
|
2317
2319
|
const _ = C.utils.getCoreNumber(h, o);
|
|
2318
2320
|
this.maxCoreNumberLength = _.length, o === "by" && (this.maxCoreNumberLength = _.length + 1);
|
|
2319
2321
|
} else
|
|
@@ -2345,11 +2347,11 @@ class p1 {
|
|
|
2345
2347
|
customPlaceholder: o
|
|
2346
2348
|
} = this.options, l = e === "aggressive" || !this.hadInitialPlaceholder && e === "polite";
|
|
2347
2349
|
if (C.utils && l) {
|
|
2348
|
-
const
|
|
2350
|
+
const p = C.utils.numberType[i];
|
|
2349
2351
|
let h = this.selectedCountryData.iso2 ? C.utils.getExampleNumber(
|
|
2350
2352
|
this.selectedCountryData.iso2,
|
|
2351
2353
|
n,
|
|
2352
|
-
|
|
2354
|
+
p
|
|
2353
2355
|
) : "";
|
|
2354
2356
|
h = this._beforeSetNumber(h), typeof o == "function" && (h = o(h, this.selectedCountryData)), this.telInput.setAttribute("placeholder", h);
|
|
2355
2357
|
}
|
|
@@ -2373,12 +2375,12 @@ class p1 {
|
|
|
2373
2375
|
}
|
|
2374
2376
|
//* Check if an element is visible within it's container, else scroll until it is.
|
|
2375
2377
|
_scrollTo(e) {
|
|
2376
|
-
const i = this.countryList, n = document.documentElement.scrollTop, o = i.offsetHeight, l = i.getBoundingClientRect().top + n,
|
|
2378
|
+
const i = this.countryList, n = document.documentElement.scrollTop, o = i.offsetHeight, l = i.getBoundingClientRect().top + n, p = l + o, h = e.offsetHeight, _ = e.getBoundingClientRect().top + n, b = _ + h, v = _ - l + i.scrollTop;
|
|
2377
2379
|
if (_ < l)
|
|
2378
2380
|
i.scrollTop = v;
|
|
2379
|
-
else if (b >
|
|
2380
|
-
const
|
|
2381
|
-
i.scrollTop = v -
|
|
2381
|
+
else if (b > p) {
|
|
2382
|
+
const w = o - h;
|
|
2383
|
+
i.scrollTop = v - w;
|
|
2382
2384
|
}
|
|
2383
2385
|
}
|
|
2384
2386
|
//* Replace any existing dial code with the new one
|
|
@@ -2398,9 +2400,9 @@ class p1 {
|
|
|
2398
2400
|
if (e.charAt(0) === "+") {
|
|
2399
2401
|
let o = "";
|
|
2400
2402
|
for (let l = 0; l < e.length; l++) {
|
|
2401
|
-
const
|
|
2402
|
-
if (!isNaN(parseInt(
|
|
2403
|
-
if (o +=
|
|
2403
|
+
const p = e.charAt(l);
|
|
2404
|
+
if (!isNaN(parseInt(p, 10))) {
|
|
2405
|
+
if (o += p, i)
|
|
2404
2406
|
this.dialCodeToIso2Map[o] && (n = e.substring(0, l + 1));
|
|
2405
2407
|
else if (this.dialCodes.has(o)) {
|
|
2406
2408
|
n = e.substring(0, l + 1);
|
|
@@ -2458,7 +2460,7 @@ class p1 {
|
|
|
2458
2460
|
//********************
|
|
2459
2461
|
//* Remove plugin.
|
|
2460
2462
|
destroy() {
|
|
2461
|
-
var l,
|
|
2463
|
+
var l, p;
|
|
2462
2464
|
this.telInput.iti = void 0;
|
|
2463
2465
|
const { allowDropdown: e, separateDialCode: i } = this.options;
|
|
2464
2466
|
if (e) {
|
|
@@ -2475,7 +2477,7 @@ class p1 {
|
|
|
2475
2477
|
const { form: n } = this.telInput;
|
|
2476
2478
|
this._handleHiddenInputSubmit && n && n.removeEventListener("submit", this._handleHiddenInputSubmit), this.telInput.removeEventListener("input", this._handleInputEvent), this._handleKeydownEvent && this.telInput.removeEventListener("keydown", this._handleKeydownEvent), this.telInput.removeAttribute("data-intl-tel-input-id"), i && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft);
|
|
2477
2479
|
const o = this.telInput.parentNode;
|
|
2478
|
-
(l = o == null ? void 0 : o.parentNode) == null || l.insertBefore(this.telInput, o), (
|
|
2480
|
+
(l = o == null ? void 0 : o.parentNode) == null || l.insertBefore(this.telInput, o), (p = o == null ? void 0 : o.parentNode) == null || p.removeChild(o), delete C.instances[this.id];
|
|
2479
2481
|
}
|
|
2480
2482
|
//* Get the extension from the current number.
|
|
2481
2483
|
getExtension() {
|
|
@@ -2530,12 +2532,12 @@ class p1 {
|
|
|
2530
2532
|
_validateNumber(e) {
|
|
2531
2533
|
if (!this.selectedCountryData.iso2)
|
|
2532
2534
|
return !1;
|
|
2533
|
-
const i = this.
|
|
2534
|
-
if (
|
|
2535
|
-
const
|
|
2536
|
-
return
|
|
2535
|
+
const i = (p) => e ? this._utilsIsValidNumber(p) : this._utilsIsPossibleNumber(p), n = this._getFullNumber(), o = n.search(new RegExp("\\p{L}", "u"));
|
|
2536
|
+
if (o > -1 && !this.options.allowPhonewords) {
|
|
2537
|
+
const p = n.substring(0, o), h = i(p), _ = i(n);
|
|
2538
|
+
return h && _;
|
|
2537
2539
|
}
|
|
2538
|
-
return
|
|
2540
|
+
return i(n);
|
|
2539
2541
|
}
|
|
2540
2542
|
_utilsIsValidNumber(e) {
|
|
2541
2543
|
return C.utils ? C.utils.isValidNumber(e, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
|
|
@@ -2600,7 +2602,7 @@ const Z2 = (m) => {
|
|
|
2600
2602
|
attachUtils: Z2,
|
|
2601
2603
|
startedLoadingUtilsScript: !1,
|
|
2602
2604
|
startedLoadingAutoCountry: !1,
|
|
2603
|
-
version: "25.
|
|
2605
|
+
version: "25.10.0"
|
|
2604
2606
|
}
|
|
2605
2607
|
);
|
|
2606
2608
|
(function() {
|
|
@@ -2635,10 +2637,10 @@ const Z2 = (m) => {
|
|
|
2635
2637
|
}
|
|
2636
2638
|
}, l = {};
|
|
2637
2639
|
new o("about:invalid#zClosurez"), new o("about:blank");
|
|
2638
|
-
const
|
|
2640
|
+
const p = {};
|
|
2639
2641
|
class h {
|
|
2640
2642
|
constructor() {
|
|
2641
|
-
if (
|
|
2643
|
+
if (p !== p) throw Error("SafeStyle is not meant to be built directly");
|
|
2642
2644
|
}
|
|
2643
2645
|
toString() {
|
|
2644
2646
|
return "";
|
|
@@ -2656,7 +2658,7 @@ const Z2 = (m) => {
|
|
|
2656
2658
|
}
|
|
2657
2659
|
new b();
|
|
2658
2660
|
const v = {};
|
|
2659
|
-
class
|
|
2661
|
+
class w {
|
|
2660
2662
|
constructor() {
|
|
2661
2663
|
var t = m.trustedTypes && m.trustedTypes.emptyHTML || "";
|
|
2662
2664
|
if (v !== v) throw Error("SafeHtml is not meant to be built directly");
|
|
@@ -2666,8 +2668,8 @@ const Z2 = (m) => {
|
|
|
2666
2668
|
return this.g.toString();
|
|
2667
2669
|
}
|
|
2668
2670
|
}
|
|
2669
|
-
new
|
|
2670
|
-
function
|
|
2671
|
+
new w();
|
|
2672
|
+
function A(d, t) {
|
|
2671
2673
|
switch (this.g = d, this.l = !!t.aa, this.h = t.i, this.s = t.type, this.o = !1, this.h) {
|
|
2672
2674
|
case O:
|
|
2673
2675
|
case G:
|
|
@@ -2698,13 +2700,13 @@ const Z2 = (m) => {
|
|
|
2698
2700
|
x.prototype.has = function(d) {
|
|
2699
2701
|
return R(this, d.g);
|
|
2700
2702
|
}, x.prototype.get = function(d, t) {
|
|
2701
|
-
return
|
|
2703
|
+
return g(this, d.g, t);
|
|
2702
2704
|
}, x.prototype.set = function(d, t) {
|
|
2703
2705
|
E(this, d.g, t);
|
|
2704
2706
|
}, x.prototype.add = function(d, t) {
|
|
2705
2707
|
b1(this, d.g, t);
|
|
2706
2708
|
};
|
|
2707
|
-
function
|
|
2709
|
+
function S1(d, t) {
|
|
2708
2710
|
for (var $ = f2(d.m()), s = 0; s < $.length; s++) {
|
|
2709
2711
|
var r = $[s], a = r.g;
|
|
2710
2712
|
if (R(t, a)) {
|
|
@@ -2713,13 +2715,13 @@ const Z2 = (m) => {
|
|
|
2713
2715
|
if (r.l) {
|
|
2714
2716
|
r = P(t, a);
|
|
2715
2717
|
for (var c = 0; c < r.length; c++) b1(d, a, u ? r[c].clone() : r[c]);
|
|
2716
|
-
} else r = n1(t, a), u ? (u = n1(d, a)) ?
|
|
2718
|
+
} else r = n1(t, a), u ? (u = n1(d, a)) ? S1(u, r) : E(d, a, r.clone()) : E(d, a, r);
|
|
2717
2719
|
}
|
|
2718
2720
|
}
|
|
2719
2721
|
}
|
|
2720
2722
|
x.prototype.clone = function() {
|
|
2721
2723
|
var d = new this.constructor();
|
|
2722
|
-
return d != this && (d.h = {}, d.g && (d.g = {}),
|
|
2724
|
+
return d != this && (d.h = {}, d.g && (d.g = {}), S1(d, this)), d;
|
|
2723
2725
|
};
|
|
2724
2726
|
function R(d, t) {
|
|
2725
2727
|
return d.h[t] != null;
|
|
@@ -2740,12 +2742,12 @@ const Z2 = (m) => {
|
|
|
2740
2742
|
}
|
|
2741
2743
|
return $;
|
|
2742
2744
|
}
|
|
2743
|
-
function
|
|
2745
|
+
function g(d, t, $) {
|
|
2744
2746
|
var s = n1(d, t);
|
|
2745
2747
|
return d.j[t].l ? s[$ || 0] : s;
|
|
2746
2748
|
}
|
|
2747
|
-
function
|
|
2748
|
-
if (R(d, t)) d =
|
|
2749
|
+
function S(d, t) {
|
|
2750
|
+
if (R(d, t)) d = g(d, t);
|
|
2749
2751
|
else d: {
|
|
2750
2752
|
if (d = d.j[t], d.j === void 0) if (t = d.s, t === Boolean) d.j = !1;
|
|
2751
2753
|
else if (t === Number) d.j = 0;
|
|
@@ -2772,7 +2774,7 @@ const Z2 = (m) => {
|
|
|
2772
2774
|
}
|
|
2773
2775
|
function s1(d, t) {
|
|
2774
2776
|
var $ = [], s;
|
|
2775
|
-
for (s in t) s != 0 && $.push(new
|
|
2777
|
+
for (s in t) s != 0 && $.push(new A(s, t[s]));
|
|
2776
2778
|
return new c2(d, $);
|
|
2777
2779
|
}
|
|
2778
2780
|
function r1() {
|
|
@@ -2801,19 +2803,19 @@ const Z2 = (m) => {
|
|
|
2801
2803
|
}, q.prototype.g = function(d, t) {
|
|
2802
2804
|
return q.ma.g.call(this, d, t);
|
|
2803
2805
|
};
|
|
2804
|
-
function
|
|
2806
|
+
function T(d, t) {
|
|
2805
2807
|
d != null && this.g.apply(this, arguments);
|
|
2806
2808
|
}
|
|
2807
|
-
|
|
2809
|
+
T.prototype.h = "", T.prototype.set = function(d) {
|
|
2808
2810
|
this.h = "" + d;
|
|
2809
|
-
},
|
|
2811
|
+
}, T.prototype.g = function(d, t, $) {
|
|
2810
2812
|
if (this.h += String(d), t != null) for (let s = 1; s < arguments.length; s++) this.h += arguments[s];
|
|
2811
2813
|
return this;
|
|
2812
2814
|
};
|
|
2813
2815
|
function B(d) {
|
|
2814
2816
|
d.h = "";
|
|
2815
2817
|
}
|
|
2816
|
-
|
|
2818
|
+
T.prototype.toString = function() {
|
|
2817
2819
|
return this.h;
|
|
2818
2820
|
};
|
|
2819
2821
|
function W() {
|
|
@@ -2825,21 +2827,21 @@ const Z2 = (m) => {
|
|
|
2825
2827
|
x.call(this);
|
|
2826
2828
|
}
|
|
2827
2829
|
i(L, x);
|
|
2828
|
-
var
|
|
2830
|
+
var A1 = null;
|
|
2829
2831
|
function z() {
|
|
2830
2832
|
x.call(this);
|
|
2831
2833
|
}
|
|
2832
2834
|
i(z, x);
|
|
2833
|
-
var
|
|
2835
|
+
var T1 = null;
|
|
2834
2836
|
W.prototype.m = function() {
|
|
2835
2837
|
var d = N1;
|
|
2836
2838
|
return d || (N1 = d = s1(W, { 0: { name: "NumberFormat", ia: "i18n.phonenumbers.NumberFormat" }, 1: { name: "pattern", required: !0, i: 9, type: String }, 2: { name: "format", required: !0, i: 9, type: String }, 3: { name: "leading_digits_pattern", aa: !0, i: 9, type: String }, 4: { name: "national_prefix_formatting_rule", i: 9, type: String }, 6: { name: "national_prefix_optional_when_formatting", i: 8, defaultValue: !1, type: Boolean }, 5: { name: "domestic_carrier_code_formatting_rule", i: 9, type: String } })), d;
|
|
2837
2839
|
}, W.m = W.prototype.m, L.prototype.m = function() {
|
|
2838
|
-
var d = T1;
|
|
2839
|
-
return d || (T1 = d = s1(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;
|
|
2840
|
-
}, L.m = L.prototype.m, z.prototype.m = function() {
|
|
2841
2840
|
var d = A1;
|
|
2842
|
-
return d || (A1 = d = s1(
|
|
2841
|
+
return d || (A1 = d = s1(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;
|
|
2842
|
+
}, L.m = L.prototype.m, z.prototype.m = function() {
|
|
2843
|
+
var d = T1;
|
|
2844
|
+
return d || (T1 = d = s1(z, {
|
|
2843
2845
|
0: { name: "PhoneMetadata", ia: "i18n.phonenumbers.PhoneMetadata" },
|
|
2844
2846
|
1: { name: "general_desc", i: 11, type: L },
|
|
2845
2847
|
2: { name: "fixed_line", i: 11, type: L },
|
|
@@ -8298,7 +8300,7 @@ const Z2 = (m) => {
|
|
|
8298
8300
|
X: "9",
|
|
8299
8301
|
Y: "9",
|
|
8300
8302
|
Z: "9"
|
|
8301
|
-
}, m2 = RegExp("[++]+"), Q = RegExp("^[++]+"), D1 = RegExp("([0-90-9٠-٩۰-۹])"), y2 = RegExp("[++0-90-9٠-٩۰-۹]"), _2 = /[\\\/] *x/, I2 = RegExp("[^0-90-9٠-٩۰-۹A-Za-z#]+$"), v2 = /(?:.*?[A-Za-z]){3}.*/,
|
|
8303
|
+
}, m2 = RegExp("[++]+"), Q = RegExp("^[++]+"), D1 = RegExp("([0-90-9٠-٩۰-۹])"), y2 = RegExp("[++0-90-9٠-٩۰-۹]"), _2 = /[\\\/] *x/, I2 = RegExp("[^0-90-9٠-٩۰-۹A-Za-z#]+$"), v2 = /(?:.*?[A-Za-z]){3}.*/, 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٠-٩۰-۹])*\\.?$");
|
|
8302
8304
|
function Y(d) {
|
|
8303
8305
|
return "([0-90-9٠-٩۰-۹]{1," + d + "})";
|
|
8304
8306
|
}
|
|
@@ -8320,7 +8322,7 @@ const Z2 = (m) => {
|
|
|
8320
8322
|
return d != null && (K(d, 9) != 1 || P(d, 9)[0] != -1);
|
|
8321
8323
|
}
|
|
8322
8324
|
function o1(d, t) {
|
|
8323
|
-
for (var $ = new
|
|
8325
|
+
for (var $ = new T(), s, r = d.length, a = 0; a < r; ++a) s = d.charAt(a), s = t[s.toUpperCase()], s != null && $.g(s);
|
|
8324
8326
|
return $.toString();
|
|
8325
8327
|
}
|
|
8326
8328
|
function G1(d) {
|
|
@@ -8330,40 +8332,40 @@ const Z2 = (m) => {
|
|
|
8330
8332
|
return d != null && isNaN(d) && d.toUpperCase() in M1;
|
|
8331
8333
|
}
|
|
8332
8334
|
M.prototype.format = function(d, t) {
|
|
8333
|
-
if (
|
|
8334
|
-
var $ =
|
|
8335
|
+
if (g(d, 2) == 0 && R(d, 5)) {
|
|
8336
|
+
var $ = S(d, 5);
|
|
8335
8337
|
if (0 < $.length) return $;
|
|
8336
8338
|
}
|
|
8337
|
-
$ =
|
|
8339
|
+
$ = S(d, 1);
|
|
8338
8340
|
var s = t1(d);
|
|
8339
8341
|
if (t == 0) return F1($, 0, s, "");
|
|
8340
8342
|
if (!($ in X)) return s;
|
|
8341
8343
|
var r = d1(this, $, e1($));
|
|
8342
|
-
d = R(d, 3) &&
|
|
8344
|
+
d = R(d, 3) && g(d, 3).length != 0 ? t == 3 ? ";ext=" + g(d, 3) : R(r, 13) ? g(r, 13) + S(d, 3) : " ext. " + S(d, 3) : "";
|
|
8343
8345
|
d: {
|
|
8344
8346
|
r = P(r, 20).length == 0 || t == 2 ? P(r, 19) : P(r, 20);
|
|
8345
8347
|
for (var a, u = r.length, c = 0; c < u; ++c) {
|
|
8346
8348
|
a = r[c];
|
|
8347
8349
|
var y = K(a, 3);
|
|
8348
|
-
if ((y == 0 || s.search(
|
|
8350
|
+
if ((y == 0 || s.search(g(a, 3, y - 1)) == 0) && (y = new RegExp(g(a, 1)), U(y, s))) {
|
|
8349
8351
|
r = a;
|
|
8350
8352
|
break d;
|
|
8351
8353
|
}
|
|
8352
8354
|
}
|
|
8353
8355
|
r = null;
|
|
8354
8356
|
}
|
|
8355
|
-
return r != null && (u = r, r =
|
|
8357
|
+
return r != null && (u = r, r = S(u, 2), a = new RegExp(g(u, 1)), S(
|
|
8356
8358
|
u,
|
|
8357
8359
|
5
|
|
8358
|
-
), u =
|
|
8360
|
+
), u = S(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"), "-"))), F1($, t, s, d);
|
|
8359
8361
|
};
|
|
8360
8362
|
function d1(d, t, $) {
|
|
8361
8363
|
return $ == "001" ? j(d, "" + t) : j(d, $);
|
|
8362
8364
|
}
|
|
8363
8365
|
function t1(d) {
|
|
8364
8366
|
if (!R(d, 2)) return "";
|
|
8365
|
-
var t = "" +
|
|
8366
|
-
return R(d, 4) &&
|
|
8367
|
+
var t = "" + g(d, 2);
|
|
8368
|
+
return R(d, 4) && g(d, 4) && 0 < S(d, 8) ? Array(S(d, 8) + 1).join("0") + t : t;
|
|
8367
8369
|
}
|
|
8368
8370
|
function F1(d, t, $, s) {
|
|
8369
8371
|
switch (t) {
|
|
@@ -8380,36 +8382,36 @@ const Z2 = (m) => {
|
|
|
8380
8382
|
function u1(d, t) {
|
|
8381
8383
|
switch (t) {
|
|
8382
8384
|
case 4:
|
|
8383
|
-
return
|
|
8385
|
+
return g(d, 5);
|
|
8384
8386
|
case 3:
|
|
8385
|
-
return
|
|
8387
|
+
return g(d, 4);
|
|
8386
8388
|
case 1:
|
|
8387
|
-
return
|
|
8389
|
+
return g(d, 3);
|
|
8388
8390
|
case 0:
|
|
8389
8391
|
case 2:
|
|
8390
|
-
return
|
|
8392
|
+
return g(d, 2);
|
|
8391
8393
|
case 5:
|
|
8392
|
-
return
|
|
8394
|
+
return g(d, 6);
|
|
8393
8395
|
case 6:
|
|
8394
|
-
return
|
|
8396
|
+
return g(d, 8);
|
|
8395
8397
|
case 7:
|
|
8396
|
-
return
|
|
8398
|
+
return g(d, 7);
|
|
8397
8399
|
case 8:
|
|
8398
|
-
return
|
|
8400
|
+
return g(d, 21);
|
|
8399
8401
|
case 9:
|
|
8400
|
-
return
|
|
8402
|
+
return g(d, 25);
|
|
8401
8403
|
case 10:
|
|
8402
|
-
return
|
|
8404
|
+
return g(d, 28);
|
|
8403
8405
|
default:
|
|
8404
|
-
return
|
|
8406
|
+
return g(d, 1);
|
|
8405
8407
|
}
|
|
8406
8408
|
}
|
|
8407
8409
|
function U1(d, t) {
|
|
8408
8410
|
var $ = V1(d, t);
|
|
8409
|
-
return d = d1(d,
|
|
8411
|
+
return d = d1(d, S(t, 1), $), d == null ? -1 : (t = t1(t), m1(t, d));
|
|
8410
8412
|
}
|
|
8411
8413
|
function m1(d, t) {
|
|
8412
|
-
return k(d,
|
|
8414
|
+
return k(d, g(t, 1)) ? k(d, g(t, 5)) ? 4 : k(d, g(t, 4)) ? 3 : k(d, g(t, 6)) ? 5 : k(d, g(t, 8)) ? 6 : k(d, g(t, 7)) ? 7 : k(d, g(t, 21)) ? 8 : k(d, g(t, 25)) ? 9 : k(d, g(t, 28)) ? 10 : k(d, g(t, 2)) ? g(t, 18) || k(d, g(t, 3)) ? 2 : 0 : !g(t, 18) && k(d, g(t, 3)) ? 1 : -1 : -1;
|
|
8413
8415
|
}
|
|
8414
8416
|
function j(d, t) {
|
|
8415
8417
|
if (t == null) return null;
|
|
@@ -8423,15 +8425,15 @@ const Z2 = (m) => {
|
|
|
8423
8425
|
}
|
|
8424
8426
|
function k(d, t) {
|
|
8425
8427
|
var $ = d.length;
|
|
8426
|
-
return 0 < K(t, 9) && P(t, 9).indexOf($) == -1 ? !1 : U(
|
|
8428
|
+
return 0 < K(t, 9) && P(t, 9).indexOf($) == -1 ? !1 : U(S(t, 2), d);
|
|
8427
8429
|
}
|
|
8428
|
-
function
|
|
8429
|
-
var $ = V1(d, t), s =
|
|
8430
|
+
function A2(d, t) {
|
|
8431
|
+
var $ = V1(d, t), s = S(t, 1), r = d1(d, s, $);
|
|
8430
8432
|
return r == null || $ != "001" && s != K1(d, $) ? r = !1 : (d = t1(t), r = m1(d, r) != -1), r;
|
|
8431
8433
|
}
|
|
8432
8434
|
function V1(d, t) {
|
|
8433
8435
|
if (t == null) return null;
|
|
8434
|
-
var $ =
|
|
8436
|
+
var $ = S(t, 1);
|
|
8435
8437
|
if ($ = X[$], $ == null) d = null;
|
|
8436
8438
|
else if ($.length == 1) d = $[0];
|
|
8437
8439
|
else d: {
|
|
@@ -8440,7 +8442,7 @@ const Z2 = (m) => {
|
|
|
8440
8442
|
s = $[a];
|
|
8441
8443
|
var u = j(d, s);
|
|
8442
8444
|
if (R(u, 23)) {
|
|
8443
|
-
if (t.search(
|
|
8445
|
+
if (t.search(g(u, 23)) == 0) {
|
|
8444
8446
|
d = s;
|
|
8445
8447
|
break d;
|
|
8446
8448
|
}
|
|
@@ -8458,17 +8460,17 @@ const Z2 = (m) => {
|
|
|
8458
8460
|
}
|
|
8459
8461
|
function K1(d, t) {
|
|
8460
8462
|
if (d = j(d, t), d == null) throw Error("Invalid region code: " + t);
|
|
8461
|
-
return
|
|
8463
|
+
return S(d, 10);
|
|
8462
8464
|
}
|
|
8463
8465
|
function l1(d, t, $, s) {
|
|
8464
|
-
var r = u1($, s), a = K(r, 9) == 0 ? P(
|
|
8465
|
-
if (r = P(r, 10), s == 2) if (O1(u1($, 0))) d = u1($, 1), O1(d) && (a = a.concat(K(d, 9) == 0 ? P(
|
|
8466
|
+
var r = u1($, s), a = K(r, 9) == 0 ? P(g($, 1), 9) : P(r, 9);
|
|
8467
|
+
if (r = P(r, 10), s == 2) if (O1(u1($, 0))) d = u1($, 1), O1(d) && (a = a.concat(K(d, 9) == 0 ? P(g($, 1), 9) : P(d, 9)), a.sort(), r.length == 0 ? r = P(d, 10) : (r = r.concat(P(d, 10)), r.sort()));
|
|
8466
8468
|
else return l1(d, t, $, 1);
|
|
8467
8469
|
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));
|
|
8468
8470
|
}
|
|
8469
8471
|
function h1(d, t, $) {
|
|
8470
8472
|
var s = t1(t);
|
|
8471
|
-
return t =
|
|
8473
|
+
return t = S(t, 1), t in X ? (t = d1(d, t, e1(t)), l1(d, s, t, $)) : 1;
|
|
8472
8474
|
}
|
|
8473
8475
|
function H1(d, t) {
|
|
8474
8476
|
if (d = d.toString(), d.length == 0 || d.charAt(0) == "0") return 0;
|
|
@@ -8477,9 +8479,9 @@ const Z2 = (m) => {
|
|
|
8477
8479
|
}
|
|
8478
8480
|
function j1(d, t, $, s, r, a) {
|
|
8479
8481
|
if (t.length == 0) return 0;
|
|
8480
|
-
t = new
|
|
8482
|
+
t = new T(t);
|
|
8481
8483
|
var u;
|
|
8482
|
-
$ != null && (u =
|
|
8484
|
+
$ != null && (u = g($, 11)), u == null && (u = "NonMatch");
|
|
8483
8485
|
var c = t.toString();
|
|
8484
8486
|
if (c.length == 0) u = 20;
|
|
8485
8487
|
else if (Q.test(c)) c = c.replace(Q, ""), B(t), t.g(B1(c)), u = 1;
|
|
@@ -8496,16 +8498,16 @@ const Z2 = (m) => {
|
|
|
8496
8498
|
if (d = H1(t, s), d != 0) return E(a, 1, d), d;
|
|
8497
8499
|
throw Error("Invalid country calling code");
|
|
8498
8500
|
}
|
|
8499
|
-
return $ != null && (u =
|
|
8501
|
+
return $ != null && (u = S($, 10), c = "" + u, y = t.toString(), y.lastIndexOf(c, 0) == 0 && (c = new T(y.substring(c.length)), y = g($, 1), y = new RegExp(S(y, 2)), W1(c, $, null), c = c.toString(), !U(y, t.toString()) && U(y, c) || l1(d, t.toString(), $, -1) == 3)) ? (s.g(c), r && E(a, 6, 10), E(a, 1, u), u) : (E(a, 1, 0), 0);
|
|
8500
8502
|
}
|
|
8501
8503
|
function W1(d, t, $) {
|
|
8502
|
-
var s = d.toString(), r = s.length, a =
|
|
8504
|
+
var s = d.toString(), r = s.length, a = g(t, 15);
|
|
8503
8505
|
if (r != 0 && a != null && a.length != 0) {
|
|
8504
8506
|
var u = new RegExp("^(?:" + a + ")");
|
|
8505
8507
|
if (r = u.exec(s)) {
|
|
8506
|
-
a = new RegExp(
|
|
8508
|
+
a = new RegExp(S(g(t, 1), 2));
|
|
8507
8509
|
var c = U(a, s), y = r.length - 1;
|
|
8508
|
-
t =
|
|
8510
|
+
t = g(t, 16), t == null || t.length == 0 || r[y] == null || r[y].length == 0 ? (!c || U(a, s.substring(r[0].length))) && ($ != null && 0 < y && r[y] != null && $.g(r[1]), d.set(s.substring(r[0].length))) : (s = s.replace(u, t), (!c || U(a, s)) && ($ != null && 0 < y && $.g(r[1]), d.set(s)));
|
|
8509
8511
|
}
|
|
8510
8512
|
}
|
|
8511
8513
|
}
|
|
@@ -8516,7 +8518,7 @@ const Z2 = (m) => {
|
|
|
8516
8518
|
function z1(d, t, $, s) {
|
|
8517
8519
|
if (t == null) throw Error("The string supplied did not seem to be a phone number");
|
|
8518
8520
|
if (250 < t.length) throw Error("The string supplied is too long to be a phone number");
|
|
8519
|
-
var r = new
|
|
8521
|
+
var r = new T(), a = t.indexOf(";phone-context=");
|
|
8520
8522
|
if (a === -1) a = null;
|
|
8521
8523
|
else if (a += 15, a >= t.length) a = "";
|
|
8522
8524
|
else {
|
|
@@ -8524,7 +8526,7 @@ const Z2 = (m) => {
|
|
|
8524
8526
|
a = u !== -1 ? t.substring(a, u) : t.substring(a);
|
|
8525
8527
|
}
|
|
8526
8528
|
var c = a;
|
|
8527
|
-
if (c == null ? u = !0 : c.length === 0 ? u = !1 : (u =
|
|
8529
|
+
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 && (B(r), r.g(a.substring(0, u))), !R1(r.toString()))) throw Error("The string supplied did not seem to be a phone number");
|
|
8528
8530
|
if (a = r.toString(), !(a1($) || a != null && 0 < a.length && Q.test(a))) throw Error("Invalid country calling code");
|
|
8529
8531
|
a = new H(), s && E(a, 5, t);
|
|
8530
8532
|
d: {
|
|
@@ -8537,7 +8539,7 @@ const Z2 = (m) => {
|
|
|
8537
8539
|
}
|
|
8538
8540
|
t = "";
|
|
8539
8541
|
}
|
|
8540
|
-
0 < t.length && E(a, 3, t), u = j(d, $), t = new
|
|
8542
|
+
0 < t.length && E(a, 3, t), u = j(d, $), t = new T(), c = 0, y = r.toString();
|
|
8541
8543
|
try {
|
|
8542
8544
|
c = j1(d, y, u, t, s, a);
|
|
8543
8545
|
} catch (I1) {
|
|
@@ -8545,11 +8547,11 @@ const Z2 = (m) => {
|
|
|
8545
8547
|
if (y = y.replace(Q, ""), c = j1(d, y, u, t, s, a), c == 0) throw I1;
|
|
8546
8548
|
} else throw I1;
|
|
8547
8549
|
}
|
|
8548
|
-
if (c != 0 ? (r = e1(c), r != $ && (u = d1(d, c, r))) : (k1(r), t.g(r.toString()), $ != null ? (c =
|
|
8550
|
+
if (c != 0 ? (r = e1(c), r != $ && (u = d1(d, c, r))) : (k1(r), t.g(r.toString()), $ != null ? (c = S(u, 10), E(
|
|
8549
8551
|
a,
|
|
8550
8552
|
1,
|
|
8551
8553
|
c
|
|
8552
|
-
)) : s && (delete a.h[6], a.g && delete a.g[6])), 2 > t.h.length || (u != null && ($ = new
|
|
8554
|
+
)) : s && (delete a.h[6], a.g && delete a.g[6])), 2 > t.h.length || (u != null && ($ = new T(), r = new T(t.toString()), W1(r, u, $), d = l1(d, r.toString(), u, -1), d != 2 && d != 4 && d != 5 && (t = r, s && 0 < $.toString().length && E(a, 7, $.toString()))), s = t.toString(), d = s.length, 2 > d)) throw Error("The string supplied is too short to be a phone number");
|
|
8553
8555
|
if (17 < d) throw Error("The string supplied is too long to be a phone number");
|
|
8554
8556
|
if (1 < s.length && s.charAt(0) == "0") {
|
|
8555
8557
|
for (E(a, 4, !0), d = 1; d < s.length - 1 && s.charAt(d) == "0"; ) d++;
|
|
@@ -8560,8 +8562,8 @@ const Z2 = (m) => {
|
|
|
8560
8562
|
function U(d, t) {
|
|
8561
8563
|
return !!((d = t.match(new RegExp("^(?:" + (typeof d == "string" ? d : d.source) + ")$", "i"))) && d[0].length == t.length);
|
|
8562
8564
|
}
|
|
8563
|
-
function
|
|
8564
|
-
this.fa = RegExp(" "), this.ja = "", this.v = new
|
|
8565
|
+
function T2(d) {
|
|
8566
|
+
this.fa = RegExp(" "), this.ja = "", this.v = new T(), this.da = "", this.s = new T(), this.ba = new T(), this.u = !0, this.ea = this.ca = this.la = !1, this.ga = M.g(), this.$ = 0, this.h = new T(), this.ha = !1, this.o = "", this.g = new T(), this.j = [], this.ka = d, this.l = J1(this, this.ka);
|
|
8565
8567
|
}
|
|
8566
8568
|
var Z1 = new z();
|
|
8567
8569
|
E(Z1, 11, "NA");
|
|
@@ -8572,21 +8574,21 @@ const Z2 = (m) => {
|
|
|
8572
8574
|
}
|
|
8573
8575
|
function q1(d) {
|
|
8574
8576
|
for (var t = d.j.length, $ = 0; $ < t; ++$) {
|
|
8575
|
-
var s = d.j[$], r =
|
|
8577
|
+
var s = d.j[$], r = S(s, 1);
|
|
8576
8578
|
if (d.da == r) return !1;
|
|
8577
|
-
var a = d, u = s, c =
|
|
8579
|
+
var a = d, u = s, c = S(u, 1);
|
|
8578
8580
|
B(a.v);
|
|
8579
8581
|
var y = a;
|
|
8580
|
-
u =
|
|
8582
|
+
u = S(u, 2);
|
|
8581
8583
|
var V = "999999999999999".match(c)[0];
|
|
8582
|
-
if (V.length < y.g.h.length ? y = "" : (y = V.replace(new RegExp(c, "g"), u), y = y.replace(RegExp("9", "g"), " ")), 0 < y.length ? (a.v.g(y), a = !0) : a = !1, a) return d.da = r, d.ha = Y1.test(
|
|
8584
|
+
if (V.length < y.g.h.length ? y = "" : (y = V.replace(new RegExp(c, "g"), u), y = y.replace(RegExp("9", "g"), " ")), 0 < y.length ? (a.v.g(y), a = !0) : a = !1, a) return d.da = r, d.ha = Y1.test(g(s, 4)), d.$ = 0, !0;
|
|
8583
8585
|
}
|
|
8584
8586
|
return d.u = !1;
|
|
8585
8587
|
}
|
|
8586
8588
|
function X1(d, t) {
|
|
8587
8589
|
for (var $ = [], s = t.length - 3, r = d.j.length, a = 0; a < r; ++a) {
|
|
8588
8590
|
var u = d.j[a];
|
|
8589
|
-
K(u, 3) == 0 ? $.push(d.j[a]) : (u =
|
|
8591
|
+
K(u, 3) == 0 ? $.push(d.j[a]) : (u = g(u, 3, Math.min(s, K(u, 3) - 1)), t.search(u) == 0 && $.push(d.j[a]));
|
|
8590
8592
|
}
|
|
8591
8593
|
d.j = $;
|
|
8592
8594
|
}
|
|
@@ -8618,8 +8620,8 @@ const Z2 = (m) => {
|
|
|
8618
8620
|
}
|
|
8619
8621
|
function d2(d) {
|
|
8620
8622
|
for (var t = d.g.toString(), $ = d.j.length, s = 0; s < $; ++s) {
|
|
8621
|
-
var r = d.j[s], a =
|
|
8622
|
-
if (new RegExp("^(?:" + a + ")$").test(t) && (d.ha = Y1.test(
|
|
8623
|
+
var r = d.j[s], a = S(r, 1);
|
|
8624
|
+
if (new RegExp("^(?:" + a + ")$").test(t) && (d.ha = Y1.test(g(r, 4)), r = t.replace(new RegExp(a, "g"), g(r, 2)), r = c1(d, r), o1(r, g2) == d.ba)) return r;
|
|
8623
8625
|
}
|
|
8624
8626
|
return "";
|
|
8625
8627
|
}
|
|
@@ -8632,7 +8634,7 @@ const Z2 = (m) => {
|
|
|
8632
8634
|
if (3 <= t.length) {
|
|
8633
8635
|
for (var $ = d.ca && d.o.length == 0 && 0 < K(d.l, 20) ? P(d.l, 20) : P(d.l, 19), s = $.length, r = 0; r < s; ++r) {
|
|
8634
8636
|
var a = $[r];
|
|
8635
|
-
0 < d.o.length && G1(
|
|
8637
|
+
0 < d.o.length && G1(S(a, 4)) && !g(a, 6) && !R(a, 5) || (d.o.length != 0 || d.ca || G1(S(a, 4)) || g(a, 6)) && E2.test(S(a, 2)) && d.j.push(a);
|
|
8636
8638
|
}
|
|
8637
8639
|
return X1(d, t), t = d2(d), 0 < t.length ? t : q1(d) ? t2(d) : d.s.toString();
|
|
8638
8640
|
}
|
|
@@ -8648,17 +8650,17 @@ const Z2 = (m) => {
|
|
|
8648
8650
|
}
|
|
8649
8651
|
function e2(d) {
|
|
8650
8652
|
var t = d.g.toString(), $ = 0;
|
|
8651
|
-
if (
|
|
8653
|
+
if (g(d.l, 10) != 1) var s = !1;
|
|
8652
8654
|
else s = d.g.toString(), s = s.charAt(0) == "1" && s.charAt(1) != "0" && s.charAt(1) != "1";
|
|
8653
|
-
return s ? ($ = 1, d.h.g("1").g(" "), d.ca = !0) : R(d.l, 15) && (s = new RegExp("^(?:" +
|
|
8655
|
+
return s ? ($ = 1, d.h.g("1").g(" "), d.ca = !0) : R(d.l, 15) && (s = new RegExp("^(?:" + g(d.l, 15) + ")"), s = t.match(s), s != null && s[0] != null && 0 < s[0].length && (d.ca = !0, $ = s[0].length, d.h.g(t.substring(0, $)))), B(d.g), d.g.g(t.substring($)), t.substring(0, $);
|
|
8654
8656
|
}
|
|
8655
8657
|
function $2(d) {
|
|
8656
|
-
var t = d.ba.toString(), $ = new RegExp("^(?:\\+|" +
|
|
8658
|
+
var t = d.ba.toString(), $ = new RegExp("^(?:\\+|" + g(d.l, 11) + ")");
|
|
8657
8659
|
return $ = t.match($), $ != null && $[0] != null && 0 < $[0].length ? (d.ca = !0, $ = $[0].length, B(d.g), d.g.g(t.substring($)), B(d.h), d.h.g(t.substring(0, $)), t.charAt(0) != "+" && d.h.g(" "), !0) : !1;
|
|
8658
8660
|
}
|
|
8659
8661
|
function i2(d) {
|
|
8660
8662
|
if (d.g.h.length == 0) return !1;
|
|
8661
|
-
var t = new
|
|
8663
|
+
var t = new T(), $ = H1(d.g, t);
|
|
8662
8664
|
return $ == 0 ? !1 : (B(d.g), d.g.g(t.toString()), t = e1($), t == "001" ? d.l = j(d.ga, "" + $) : t != d.ka && (d.l = J1(d, t)), d.h.g("" + $).g(" "), d.o = "", !0);
|
|
8663
8665
|
}
|
|
8664
8666
|
function n2(d, t) {
|
|
@@ -8675,7 +8677,7 @@ const Z2 = (m) => {
|
|
|
8675
8677
|
}, _1 = { 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 };
|
|
8676
8678
|
e("intlTelInputUtilsTemp", {}), e("intlTelInputUtilsTemp.formatNumberAsYouType", (d, t) => {
|
|
8677
8679
|
try {
|
|
8678
|
-
const $ = d.replace(/[^+0-9]/g, ""), s = new
|
|
8680
|
+
const $ = d.replace(/[^+0-9]/g, ""), s = new T2(t);
|
|
8679
8681
|
t = "";
|
|
8680
8682
|
for (let r = 0; r < $.length; r++) s.ja = M2(s, $.charAt(r)), t = s.ja;
|
|
8681
8683
|
return t;
|
|
@@ -8699,7 +8701,7 @@ const Z2 = (m) => {
|
|
|
8699
8701
|
var a = u1(j(r, d), $);
|
|
8700
8702
|
try {
|
|
8701
8703
|
if (R(a, 6)) {
|
|
8702
|
-
var u =
|
|
8704
|
+
var u = g(a, 6), c = z1(r, u, d, !1);
|
|
8703
8705
|
break d;
|
|
8704
8706
|
}
|
|
8705
8707
|
} catch {
|
|
@@ -8713,7 +8715,7 @@ const Z2 = (m) => {
|
|
|
8713
8715
|
}
|
|
8714
8716
|
}), e("intlTelInputUtilsTemp.getExtension", (d, t) => {
|
|
8715
8717
|
try {
|
|
8716
|
-
return
|
|
8718
|
+
return g(Z(M.g(), d, t), 3);
|
|
8717
8719
|
} catch {
|
|
8718
8720
|
return "";
|
|
8719
8721
|
}
|
|
@@ -8734,7 +8736,7 @@ const Z2 = (m) => {
|
|
|
8734
8736
|
}
|
|
8735
8737
|
}), e("intlTelInputUtilsTemp.isValidNumber", (d, t, $) => {
|
|
8736
8738
|
try {
|
|
8737
|
-
const s = M.g(), r = Z(s, d, t), a =
|
|
8739
|
+
const s = M.g(), r = Z(s, d, t), a = A2(s, r);
|
|
8738
8740
|
if ($) {
|
|
8739
8741
|
const u = s2($).map((c) => _1[c]);
|
|
8740
8742
|
return a && u.includes(U1(s, r));
|
|
@@ -8757,7 +8759,7 @@ const Z2 = (m) => {
|
|
|
8757
8759
|
}
|
|
8758
8760
|
}), e("intlTelInputUtilsTemp.getCoreNumber", (d, t) => {
|
|
8759
8761
|
try {
|
|
8760
|
-
return
|
|
8762
|
+
return g(Z(M.g(), d, t), 2).toString();
|
|
8761
8763
|
} catch {
|
|
8762
8764
|
return "";
|
|
8763
8765
|
}
|
|
@@ -8799,21 +8801,21 @@ const q2 = {
|
|
|
8799
8801
|
"changeErrorCode"
|
|
8800
8802
|
], ["update:modelValue"]),
|
|
8801
8803
|
setup(m, { expose: e, emit: i }) {
|
|
8802
|
-
const n = D2(m, "modelValue"), o = m, l = i,
|
|
8804
|
+
const n = D2(m, "modelValue"), o = m, l = i, p = v1(), h = v1(), _ = v1(!1), b = () => h.value ? o.options.strictMode ? h.value.isValidNumberPrecise() : h.value.isValidNumber() : null, v = () => {
|
|
8803
8805
|
let f = b();
|
|
8804
8806
|
_.value !== f && (_.value = f, l("changeValidity", !!f), l(
|
|
8805
8807
|
"changeErrorCode",
|
|
8806
8808
|
f ? null : h.value.getValidationError()
|
|
8807
8809
|
));
|
|
8808
|
-
},
|
|
8810
|
+
}, w = () => {
|
|
8809
8811
|
var f;
|
|
8810
8812
|
l("changeNumber", ((f = h.value) == null ? void 0 : f.getNumber()) ?? ""), v();
|
|
8811
|
-
},
|
|
8813
|
+
}, A = () => {
|
|
8812
8814
|
var f;
|
|
8813
|
-
l("changeCountry", ((f = h.value) == null ? void 0 : f.getSelectedCountryData().iso2) ?? ""),
|
|
8815
|
+
l("changeCountry", ((f = h.value) == null ? void 0 : f.getSelectedCountryData().iso2) ?? ""), w(), v();
|
|
8814
8816
|
};
|
|
8815
8817
|
return P2(() => {
|
|
8816
|
-
|
|
8818
|
+
p.value && (h.value = C(p.value, o.options), o.value && h.value.setNumber(o.value), o.disabled && h.value.setDisabled(o.disabled), _.value = b());
|
|
8817
8819
|
}), x2(
|
|
8818
8820
|
() => o.disabled,
|
|
8819
8821
|
(f) => {
|
|
@@ -8823,13 +8825,13 @@ const q2 = {
|
|
|
8823
8825
|
), R2(() => {
|
|
8824
8826
|
var f;
|
|
8825
8827
|
return (f = h.value) == null ? void 0 : f.destroy();
|
|
8826
|
-
}), e({ instance: h, input:
|
|
8828
|
+
}), e({ instance: h, input: p }), (f, I) => B2((O2(), k2("input", G2({
|
|
8827
8829
|
ref_key: "input",
|
|
8828
|
-
ref:
|
|
8830
|
+
ref: p,
|
|
8829
8831
|
"onUpdate:modelValue": I[0] || (I[0] = (O) => n.value = O),
|
|
8830
8832
|
type: "tel",
|
|
8831
|
-
onCountrychange:
|
|
8832
|
-
onInput:
|
|
8833
|
+
onCountrychange: A,
|
|
8834
|
+
onInput: w
|
|
8833
8835
|
}, m.inputProps), null, 16)), [
|
|
8834
8836
|
[
|
|
8835
8837
|
F2,
|