intl-tel-input 25.8.2 → 25.8.3
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/angular/README.md +1 -1
- package/angular/build/IntlTelInput.js +9 -23
- package/angular/build/IntlTelInputWithUtils.js +9 -23
- package/angular/build/types/intl-tel-input.d.ts +0 -1
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/intlTelInput.d.ts +0 -1
- package/build/js/intlTelInput.js +10 -24
- package/build/js/intlTelInput.min.js +4 -4
- package/build/js/intlTelInputWithUtils.js +10 -24
- package/build/js/intlTelInputWithUtils.min.js +3 -3
- package/package.json +1 -1
- package/react/README.md +1 -1
- package/react/build/IntlTelInput.cjs +9 -23
- package/react/build/IntlTelInput.d.ts +0 -1
- package/react/build/IntlTelInput.js +9 -23
- package/react/build/IntlTelInputWithUtils.cjs +9 -23
- package/react/build/IntlTelInputWithUtils.js +9 -23
- package/vue/README.md +1 -1
- package/vue/build/IntlTelInput.mjs +70 -75
- package/vue/build/IntlTelInputWithUtils.mjs +75 -80
|
@@ -1732,9 +1732,9 @@ class p1 {
|
|
|
1732
1732
|
this.options.countryOrder && (this.options.countryOrder = this.options.countryOrder.map((e) => e.toLowerCase())), this.countries.sort((e, i) => {
|
|
1733
1733
|
const { countryOrder: n } = this.options;
|
|
1734
1734
|
if (n) {
|
|
1735
|
-
const o = n.indexOf(e.iso2), l = n.indexOf(i.iso2),
|
|
1736
|
-
if (
|
|
1737
|
-
return
|
|
1735
|
+
const o = n.indexOf(e.iso2), l = n.indexOf(i.iso2), C = o > -1, g = l > -1;
|
|
1736
|
+
if (C || g)
|
|
1737
|
+
return C && g ? o - l : C ? -1 : 1;
|
|
1738
1738
|
}
|
|
1739
1739
|
return e.name.localeCompare(i.name);
|
|
1740
1740
|
});
|
|
@@ -1785,8 +1785,8 @@ class p1 {
|
|
|
1785
1785
|
const i = this.dialCodeToIso2Map[e.dialCode][0];
|
|
1786
1786
|
for (const n of e.areaCodes) {
|
|
1787
1787
|
for (let o = 1; o < n.length; o++) {
|
|
1788
|
-
const l = n.substring(0, o),
|
|
1789
|
-
this._addToDialCodeMap(i,
|
|
1788
|
+
const l = n.substring(0, o), C = e.dialCode + l;
|
|
1789
|
+
this._addToDialCodeMap(i, C), this._addToDialCodeMap(e.iso2, C);
|
|
1790
1790
|
}
|
|
1791
1791
|
this._addToDialCodeMap(e.iso2, e.dialCode + n);
|
|
1792
1792
|
}
|
|
@@ -1802,8 +1802,8 @@ class p1 {
|
|
|
1802
1802
|
showFlags: n,
|
|
1803
1803
|
containerClass: o,
|
|
1804
1804
|
hiddenInput: l,
|
|
1805
|
-
dropdownContainer:
|
|
1806
|
-
fixDropdownWidth:
|
|
1805
|
+
dropdownContainer: C,
|
|
1806
|
+
fixDropdownWidth: g,
|
|
1807
1807
|
useFullscreenPopup: c,
|
|
1808
1808
|
countrySearch: S,
|
|
1809
1809
|
i18n: w
|
|
@@ -1850,10 +1850,10 @@ class p1 {
|
|
|
1850
1850
|
U
|
|
1851
1851
|
)), i && (this.selectedDialCode = T(
|
|
1852
1852
|
"div",
|
|
1853
|
-
{ class: "iti__selected-dial-code",
|
|
1853
|
+
{ class: "iti__selected-dial-code", dir: "ltr" },
|
|
1854
1854
|
this.selectedCountry
|
|
1855
1855
|
)), e) {
|
|
1856
|
-
const D =
|
|
1856
|
+
const D = g ? "" : "iti--flexible-dropdown-width";
|
|
1857
1857
|
if (this.dropdownContent = T("div", {
|
|
1858
1858
|
id: `iti-${this.id}__dropdown-content`,
|
|
1859
1859
|
class: `iti__dropdown-content iti__hide ${D}`,
|
|
@@ -1934,7 +1934,7 @@ class p1 {
|
|
|
1934
1934
|
"aria-label": w.countryListAriaLabel
|
|
1935
1935
|
},
|
|
1936
1936
|
this.dropdownContent
|
|
1937
|
-
), this._appendListItems(), S && this._updateSearchResultsA11yText(),
|
|
1937
|
+
), this._appendListItems(), S && this._updateSearchResultsA11yText(), C) {
|
|
1938
1938
|
const x = p1._buildClassNames({
|
|
1939
1939
|
iti: !0,
|
|
1940
1940
|
"iti--container": !0,
|
|
@@ -1990,12 +1990,12 @@ class p1 {
|
|
|
1990
1990
|
//* 1. Extracting a dial code from the given number
|
|
1991
1991
|
//* 2. Using explicit initialCountry
|
|
1992
1992
|
_setInitialState(e = !1) {
|
|
1993
|
-
const i = this.telInput.getAttribute("value"), n = this.telInput.value, l = i && i.charAt(0) === "+" && (!n || n.charAt(0) !== "+") ? i : n,
|
|
1994
|
-
if (
|
|
1993
|
+
const i = this.telInput.getAttribute("value"), n = this.telInput.value, l = i && i.charAt(0) === "+" && (!n || n.charAt(0) !== "+") ? i : n, C = this._getDialCode(l), g = u2(l), { initialCountry: c, geoIpLookup: S } = this.options, w = c === "auto" && S;
|
|
1994
|
+
if (C && !g)
|
|
1995
1995
|
this._updateCountryFromNumber(l);
|
|
1996
1996
|
else if (!w || e) {
|
|
1997
1997
|
const b = c ? c.toLowerCase() : "";
|
|
1998
|
-
b && this._getCountryData(b, !0) ? this._setCountry(b) :
|
|
1998
|
+
b && this._getCountryData(b, !0) ? this._setCountry(b) : C && g ? this._setCountry("us") : this._setCountry();
|
|
1999
1999
|
}
|
|
2000
2000
|
l && this._updateValFromNumber(l);
|
|
2001
2001
|
}
|
|
@@ -2054,25 +2054,25 @@ class p1 {
|
|
|
2054
2054
|
}
|
|
2055
2055
|
//* Initialize the tel input listeners.
|
|
2056
2056
|
_initTelInputListeners() {
|
|
2057
|
-
const { strictMode: e, formatAsYouType: i, separateDialCode: n, formatOnDisplay: o, allowDropdown: l, countrySearch:
|
|
2058
|
-
let
|
|
2059
|
-
new RegExp("\\p{L}", "u").test(this.telInput.value) && (
|
|
2060
|
-
if (this.isAndroid && (c == null ? void 0 : c.data) === "+" && n && l &&
|
|
2057
|
+
const { strictMode: e, formatAsYouType: i, separateDialCode: n, formatOnDisplay: o, allowDropdown: l, countrySearch: C } = this.options;
|
|
2058
|
+
let g = !1;
|
|
2059
|
+
new RegExp("\\p{L}", "u").test(this.telInput.value) && (g = !0), this._handleInputEvent = (c) => {
|
|
2060
|
+
if (this.isAndroid && (c == null ? void 0 : c.data) === "+" && n && l && C) {
|
|
2061
2061
|
const L = this.telInput.selectionStart || 0, f = this.telInput.value.substring(0, L - 1), I = this.telInput.value.substring(L);
|
|
2062
2062
|
this.telInput.value = f + I, this._openDropdownWithPlus();
|
|
2063
2063
|
return;
|
|
2064
2064
|
}
|
|
2065
2065
|
this._updateCountryFromNumber(this.telInput.value) && this._triggerCountryChange();
|
|
2066
2066
|
const S = (c == null ? void 0 : c.data) && /[^+0-9]/.test(c.data), w = (c == null ? void 0 : c.inputType) === "insertFromPaste" && this.telInput.value;
|
|
2067
|
-
S || w && !e ?
|
|
2067
|
+
S || w && !e ? g = !0 : /[^+0-9]/.test(this.telInput.value) || (g = !1);
|
|
2068
2068
|
const b = (c == null ? void 0 : c.detail) && c.detail.isSetNumber && !o;
|
|
2069
|
-
if (i && !
|
|
2069
|
+
if (i && !g && !b) {
|
|
2070
2070
|
const L = this.telInput.selectionStart || 0, I = this.telInput.value.substring(0, L).replace(/[^+0-9]/g, "").length, G = (c == null ? void 0 : c.inputType) === "deleteContentForward", U = this._formatNumberAsYouType(), D = z2(I, U, L, G);
|
|
2071
2071
|
this.telInput.value = U, this.telInput.setSelectionRange(D, D);
|
|
2072
2072
|
}
|
|
2073
2073
|
}, this.telInput.addEventListener("input", this._handleInputEvent), (e || n) && (this._handleKeydownEvent = (c) => {
|
|
2074
2074
|
if (c.key && c.key.length === 1 && !c.altKey && !c.ctrlKey && !c.metaKey) {
|
|
2075
|
-
if (n && l &&
|
|
2075
|
+
if (n && l && C && c.key === "+") {
|
|
2076
2076
|
c.preventDefault(), this._openDropdownWithPlus();
|
|
2077
2077
|
return;
|
|
2078
2078
|
}
|
|
@@ -2167,12 +2167,12 @@ class p1 {
|
|
|
2167
2167
|
_filterCountries(e, i = !1) {
|
|
2168
2168
|
let n = !0;
|
|
2169
2169
|
this.countryList.innerHTML = "";
|
|
2170
|
-
const o = o2(e), l = o.length,
|
|
2170
|
+
const o = o2(e), l = o.length, C = [], g = [], c = [], S = [], w = [], b = [];
|
|
2171
2171
|
for (const f of this.countries)
|
|
2172
|
-
i || l === 0 ? c.push(f) : f.iso2 === o ?
|
|
2172
|
+
i || l === 0 ? c.push(f) : f.iso2 === o ? C.push(f) : f.normalisedName.startsWith(o) ? g.push(f) : f.normalisedName.includes(o) ? c.push(f) : o === f.dialCode || o === f.dialCodePlus ? S.push(f) : f.dialCodePlus.includes(o) ? w.push(f) : f.initials.includes(o) && b.push(f);
|
|
2173
2173
|
const L = [
|
|
2174
|
-
...g.sort((f, I) => f.priority - I.priority),
|
|
2175
2174
|
...C.sort((f, I) => f.priority - I.priority),
|
|
2175
|
+
...g.sort((f, I) => f.priority - I.priority),
|
|
2176
2176
|
...c.sort((f, I) => f.priority - I.priority),
|
|
2177
2177
|
...S.sort((f, I) => f.priority - I.priority),
|
|
2178
2178
|
...w.sort((f, I) => f.priority - I.priority),
|
|
@@ -2205,11 +2205,11 @@ class p1 {
|
|
|
2205
2205
|
_updateValFromNumber(e) {
|
|
2206
2206
|
let i = e;
|
|
2207
2207
|
if (this.options.formatOnDisplay && m.utils && this.selectedCountryData) {
|
|
2208
|
-
const n = this.options.nationalMode || i.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: o, INTERNATIONAL: l } = m.utils.numberFormat,
|
|
2208
|
+
const n = this.options.nationalMode || i.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: o, INTERNATIONAL: l } = m.utils.numberFormat, C = n ? o : l;
|
|
2209
2209
|
i = m.utils.formatNumber(
|
|
2210
2210
|
i,
|
|
2211
2211
|
this.selectedCountryData.iso2,
|
|
2212
|
-
|
|
2212
|
+
C
|
|
2213
2213
|
);
|
|
2214
2214
|
}
|
|
2215
2215
|
i = this._beforeSetNumber(i), this.telInput.value = i;
|
|
@@ -2224,8 +2224,8 @@ class p1 {
|
|
|
2224
2224
|
const { dialCode: i, nationalPrefix: n } = this.selectedCountryData;
|
|
2225
2225
|
if (e.charAt(0) === "+" || !i)
|
|
2226
2226
|
return e;
|
|
2227
|
-
const
|
|
2228
|
-
return `+${i}${
|
|
2227
|
+
const C = n && e.charAt(0) === n && !this.options.separateDialCode ? e.substring(1) : e;
|
|
2228
|
+
return `+${i}${C}`;
|
|
2229
2229
|
}
|
|
2230
2230
|
// Get the country ISO2 code from the given number
|
|
2231
2231
|
// BUT ONLY IF ITS CHANGED FROM THE CURRENTLY SELECTED COUNTRY
|
|
@@ -2235,19 +2235,19 @@ class p1 {
|
|
|
2235
2235
|
let n = i ? e.substring(i) : e;
|
|
2236
2236
|
const o = this.selectedCountryData.iso2, l = this.selectedCountryData.dialCode;
|
|
2237
2237
|
n = this._ensureHasDialCode(n);
|
|
2238
|
-
const
|
|
2239
|
-
if (
|
|
2240
|
-
const c = f1(
|
|
2238
|
+
const C = this._getDialCode(n, !0), g = f1(n);
|
|
2239
|
+
if (C) {
|
|
2240
|
+
const c = f1(C), S = this.dialCodeToIso2Map[c];
|
|
2241
2241
|
if (!o && this.defaultCountry && S.includes(this.defaultCountry))
|
|
2242
2242
|
return this.defaultCountry;
|
|
2243
|
-
const w = this.selectedCountryData.areaCodes &&
|
|
2244
|
-
if (!(l === "1" && u2(
|
|
2243
|
+
const w = this.selectedCountryData.areaCodes && g.length > c.length, b = o && S.includes(o) && !w;
|
|
2244
|
+
if (!(l === "1" && u2(g)) && !b) {
|
|
2245
2245
|
for (const f of S)
|
|
2246
2246
|
if (f)
|
|
2247
2247
|
return f;
|
|
2248
2248
|
}
|
|
2249
2249
|
} else {
|
|
2250
|
-
if (n.charAt(0) === "+" &&
|
|
2250
|
+
if (n.charAt(0) === "+" && g.length)
|
|
2251
2251
|
return "";
|
|
2252
2252
|
if ((!n || n === "+") && !this.selectedCountryData.iso2)
|
|
2253
2253
|
return this.defaultCountry;
|
|
@@ -2277,13 +2277,14 @@ class p1 {
|
|
|
2277
2277
|
//* Note: called from _setInitialState, _updateCountryFromNumber, _selectListItem, setCountry.
|
|
2278
2278
|
_setCountry(e) {
|
|
2279
2279
|
const { separateDialCode: i, showFlags: n, i18n: o } = this.options, l = this.selectedCountryData.iso2 ? this.selectedCountryData : {};
|
|
2280
|
-
if (this.selectedCountryData = e ? this._getCountryData(e, !1) || {} : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.
|
|
2281
|
-
|
|
2282
|
-
|
|
2280
|
+
if (this.selectedCountryData = e ? this._getCountryData(e, !1) || {} : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountry) {
|
|
2281
|
+
const C = e && n ? `iti__flag iti__${e}` : "iti__flag iti__globe";
|
|
2282
|
+
let g, c;
|
|
2283
|
+
e ? (c = this.selectedCountryData.name, g = o.selectedCountryAriaLabel.replace("${country}", this.selectedCountryData.name)) : (c = o.noCountrySelected, g = o.noCountrySelected), this.selectedCountryInner.className = C, this.selectedCountry.setAttribute("title", c), this.selectedCountry.setAttribute("aria-label", g);
|
|
2283
2284
|
}
|
|
2284
|
-
if (
|
|
2285
|
-
const
|
|
2286
|
-
this.selectedDialCode.innerHTML =
|
|
2285
|
+
if (i) {
|
|
2286
|
+
const C = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
|
|
2287
|
+
this.selectedDialCode.innerHTML = C, this._updateInputPadding();
|
|
2287
2288
|
}
|
|
2288
2289
|
return this._updatePlaceholder(), this._updateMaxLength(), l.iso2 !== e;
|
|
2289
2290
|
}
|
|
@@ -2300,25 +2301,19 @@ class p1 {
|
|
|
2300
2301
|
if (e && m.utils)
|
|
2301
2302
|
if (o) {
|
|
2302
2303
|
const l = m.utils.numberType[i];
|
|
2303
|
-
let
|
|
2304
|
+
let C = m.utils.getExampleNumber(
|
|
2304
2305
|
o,
|
|
2305
2306
|
!1,
|
|
2306
2307
|
l,
|
|
2307
2308
|
!0
|
|
2308
|
-
),
|
|
2309
|
-
for (; m.utils.isPossibleNumber(
|
|
2310
|
-
|
|
2311
|
-
const c = m.utils.getCoreNumber(
|
|
2309
|
+
), g = C;
|
|
2310
|
+
for (; m.utils.isPossibleNumber(C, o, n); )
|
|
2311
|
+
g = C, C += "0";
|
|
2312
|
+
const c = m.utils.getCoreNumber(g, o);
|
|
2312
2313
|
this.maxCoreNumberLength = c.length, o === "by" && (this.maxCoreNumberLength = c.length + 1);
|
|
2313
2314
|
} else
|
|
2314
2315
|
this.maxCoreNumberLength = null;
|
|
2315
2316
|
}
|
|
2316
|
-
_setSelectedCountryTitleAttribute(e = null, i) {
|
|
2317
|
-
if (!this.selectedCountry)
|
|
2318
|
-
return;
|
|
2319
|
-
let n;
|
|
2320
|
-
e && !i ? n = `${this.selectedCountryData.name}: +${this.selectedCountryData.dialCode}` : e ? n = this.selectedCountryData.name : n = this.options.i18n.noCountrySelected, this.selectedCountry.setAttribute("title", n);
|
|
2321
|
-
}
|
|
2322
2317
|
//* When the input is in a hidden container during initialisation, we must inject some markup
|
|
2323
2318
|
//* into the end of the DOM to calculate the correct offsetWidth.
|
|
2324
2319
|
//* NOTE: this is only used when separateDialCode is enabled, so countryContainer and selectedCountry
|
|
@@ -2345,13 +2340,13 @@ class p1 {
|
|
|
2345
2340
|
customPlaceholder: o
|
|
2346
2341
|
} = this.options, l = e === "aggressive" || !this.hadInitialPlaceholder && e === "polite";
|
|
2347
2342
|
if (m.utils && l) {
|
|
2348
|
-
const
|
|
2349
|
-
let
|
|
2343
|
+
const C = m.utils.numberType[i];
|
|
2344
|
+
let g = this.selectedCountryData.iso2 ? m.utils.getExampleNumber(
|
|
2350
2345
|
this.selectedCountryData.iso2,
|
|
2351
2346
|
n,
|
|
2352
|
-
|
|
2347
|
+
C
|
|
2353
2348
|
) : "";
|
|
2354
|
-
|
|
2349
|
+
g = this._beforeSetNumber(g), typeof o == "function" && (g = o(g, this.selectedCountryData)), this.telInput.setAttribute("placeholder", g);
|
|
2355
2350
|
}
|
|
2356
2351
|
}
|
|
2357
2352
|
//* Called when the user selects a list item from the dropdown.
|
|
@@ -2373,11 +2368,11 @@ class p1 {
|
|
|
2373
2368
|
}
|
|
2374
2369
|
//* Check if an element is visible within it's container, else scroll until it is.
|
|
2375
2370
|
_scrollTo(e) {
|
|
2376
|
-
const i = this.countryList, n = document.documentElement.scrollTop, o = i.offsetHeight, l = i.getBoundingClientRect().top + n,
|
|
2371
|
+
const i = this.countryList, n = document.documentElement.scrollTop, o = i.offsetHeight, l = i.getBoundingClientRect().top + n, C = l + o, g = e.offsetHeight, c = e.getBoundingClientRect().top + n, S = c + g, w = c - l + i.scrollTop;
|
|
2377
2372
|
if (c < l)
|
|
2378
2373
|
i.scrollTop = w;
|
|
2379
|
-
else if (S >
|
|
2380
|
-
const b = o -
|
|
2374
|
+
else if (S > C) {
|
|
2375
|
+
const b = o - g;
|
|
2381
2376
|
i.scrollTop = w - b;
|
|
2382
2377
|
}
|
|
2383
2378
|
}
|
|
@@ -2398,9 +2393,9 @@ class p1 {
|
|
|
2398
2393
|
if (e.charAt(0) === "+") {
|
|
2399
2394
|
let o = "";
|
|
2400
2395
|
for (let l = 0; l < e.length; l++) {
|
|
2401
|
-
const
|
|
2402
|
-
if (!isNaN(parseInt(
|
|
2403
|
-
if (o +=
|
|
2396
|
+
const C = e.charAt(l);
|
|
2397
|
+
if (!isNaN(parseInt(C, 10))) {
|
|
2398
|
+
if (o += C, i)
|
|
2404
2399
|
this.dialCodeToIso2Map[o] && (n = e.substring(0, l + 1));
|
|
2405
2400
|
else if (this.dialCodes.has(o)) {
|
|
2406
2401
|
n = e.substring(0, l + 1);
|
|
@@ -2458,7 +2453,7 @@ class p1 {
|
|
|
2458
2453
|
//********************
|
|
2459
2454
|
//* Remove plugin.
|
|
2460
2455
|
destroy() {
|
|
2461
|
-
var l,
|
|
2456
|
+
var l, C;
|
|
2462
2457
|
this.telInput.iti = void 0;
|
|
2463
2458
|
const { allowDropdown: e, separateDialCode: i } = this.options;
|
|
2464
2459
|
if (e) {
|
|
@@ -2469,13 +2464,13 @@ class p1 {
|
|
|
2469
2464
|
"keydown",
|
|
2470
2465
|
this._handleCountryContainerKeydown
|
|
2471
2466
|
);
|
|
2472
|
-
const
|
|
2473
|
-
|
|
2467
|
+
const g = this.telInput.closest("label");
|
|
2468
|
+
g && g.removeEventListener("click", this._handleLabelClick);
|
|
2474
2469
|
}
|
|
2475
2470
|
const { form: n } = this.telInput;
|
|
2476
2471
|
this._handleHiddenInputSubmit && n && n.removeEventListener("submit", this._handleHiddenInputSubmit), this.telInput.removeEventListener("input", this._handleInputEvent), this._handleKeydownEvent && this.telInput.removeEventListener("keydown", this._handleKeydownEvent), this.telInput.removeAttribute("data-intl-tel-input-id"), i && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft);
|
|
2477
2472
|
const o = this.telInput.parentNode;
|
|
2478
|
-
(l = o == null ? void 0 : o.parentNode) == null || l.insertBefore(this.telInput, o), (
|
|
2473
|
+
(l = o == null ? void 0 : o.parentNode) == null || l.insertBefore(this.telInput, o), (C = o == null ? void 0 : o.parentNode) == null || C.removeChild(o), delete m.instances[this.id];
|
|
2479
2474
|
}
|
|
2480
2475
|
//* Get the extension from the current number.
|
|
2481
2476
|
getExtension() {
|
|
@@ -2532,8 +2527,8 @@ class p1 {
|
|
|
2532
2527
|
return !1;
|
|
2533
2528
|
const i = this._getFullNumber(), n = i.search(new RegExp("\\p{L}", "u")), o = (l) => e ? this._utilsIsValidNumber(l) : this._utilsIsPossibleNumber(l);
|
|
2534
2529
|
if (n > -1) {
|
|
2535
|
-
const l = i.substring(0, n),
|
|
2536
|
-
return
|
|
2530
|
+
const l = i.substring(0, n), C = o(l), g = o(i);
|
|
2531
|
+
return C && g;
|
|
2537
2532
|
}
|
|
2538
2533
|
return o(i);
|
|
2539
2534
|
}
|
|
@@ -2600,7 +2595,7 @@ const Z2 = (y) => {
|
|
|
2600
2595
|
attachUtils: Z2,
|
|
2601
2596
|
startedLoadingUtilsScript: !1,
|
|
2602
2597
|
startedLoadingAutoCountry: !1,
|
|
2603
|
-
version: "25.8.
|
|
2598
|
+
version: "25.8.3"
|
|
2604
2599
|
}
|
|
2605
2600
|
);
|
|
2606
2601
|
(function() {
|
|
@@ -2635,16 +2630,16 @@ const Z2 = (y) => {
|
|
|
2635
2630
|
}
|
|
2636
2631
|
}, l = {};
|
|
2637
2632
|
new o("about:invalid#zClosurez"), new o("about:blank");
|
|
2638
|
-
const
|
|
2639
|
-
class
|
|
2633
|
+
const C = {};
|
|
2634
|
+
class g {
|
|
2640
2635
|
constructor() {
|
|
2641
|
-
if (
|
|
2636
|
+
if (C !== C) throw Error("SafeStyle is not meant to be built directly");
|
|
2642
2637
|
}
|
|
2643
2638
|
toString() {
|
|
2644
2639
|
return "";
|
|
2645
2640
|
}
|
|
2646
2641
|
}
|
|
2647
|
-
new
|
|
2642
|
+
new g();
|
|
2648
2643
|
const c = {};
|
|
2649
2644
|
class S {
|
|
2650
2645
|
constructor() {
|
|
@@ -8799,33 +8794,33 @@ const q2 = {
|
|
|
8799
8794
|
"changeErrorCode"
|
|
8800
8795
|
], ["update:modelValue"]),
|
|
8801
8796
|
setup(y, { expose: e, emit: i }) {
|
|
8802
|
-
const n = D2(y, "modelValue"), o = y, l = i,
|
|
8797
|
+
const n = D2(y, "modelValue"), o = y, l = i, C = v1(), g = v1(), c = v1(!1), S = () => g.value ? o.options.strictMode ? g.value.isValidNumberPrecise() : g.value.isValidNumber() : null, w = () => {
|
|
8803
8798
|
let f = S();
|
|
8804
8799
|
c.value !== f && (c.value = f, l("changeValidity", !!f), l(
|
|
8805
8800
|
"changeErrorCode",
|
|
8806
|
-
f ? null :
|
|
8801
|
+
f ? null : g.value.getValidationError()
|
|
8807
8802
|
));
|
|
8808
8803
|
}, b = () => {
|
|
8809
8804
|
var f;
|
|
8810
|
-
l("changeNumber", ((f =
|
|
8805
|
+
l("changeNumber", ((f = g.value) == null ? void 0 : f.getNumber()) ?? ""), w();
|
|
8811
8806
|
}, L = () => {
|
|
8812
8807
|
var f;
|
|
8813
|
-
l("changeCountry", ((f =
|
|
8808
|
+
l("changeCountry", ((f = g.value) == null ? void 0 : f.getSelectedCountryData().iso2) ?? ""), b(), w();
|
|
8814
8809
|
};
|
|
8815
8810
|
return P2(() => {
|
|
8816
|
-
|
|
8811
|
+
C.value && (g.value = m(C.value, o.options), o.value && g.value.setNumber(o.value), o.disabled && g.value.setDisabled(o.disabled), c.value = S());
|
|
8817
8812
|
}), x2(
|
|
8818
8813
|
() => o.disabled,
|
|
8819
8814
|
(f) => {
|
|
8820
8815
|
var I;
|
|
8821
|
-
return (I =
|
|
8816
|
+
return (I = g.value) == null ? void 0 : I.setDisabled(f);
|
|
8822
8817
|
}
|
|
8823
8818
|
), R2(() => {
|
|
8824
8819
|
var f;
|
|
8825
|
-
return (f =
|
|
8826
|
-
}), e({ instance:
|
|
8820
|
+
return (f = g.value) == null ? void 0 : f.destroy();
|
|
8821
|
+
}), e({ instance: g, input: C }), (f, I) => B2((O2(), k2("input", G2({
|
|
8827
8822
|
ref_key: "input",
|
|
8828
|
-
ref:
|
|
8823
|
+
ref: C,
|
|
8829
8824
|
"onUpdate:modelValue": I[0] || (I[0] = (G) => n.value = G),
|
|
8830
8825
|
type: "tel",
|
|
8831
8826
|
onCountrychange: L,
|