lizaui 7.0.0 → 7.0.2
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/dist/components/phone-input/phone-input.d.ts.map +1 -1
- package/dist/modal/index.cjs.js +1 -1
- package/dist/modal/index.cjs.js.map +1 -1
- package/dist/modal/index.es.js +5 -5
- package/dist/modal/index.es.js.map +1 -1
- package/dist/phone-input/index.cjs.js +13 -13
- package/dist/phone-input/index.cjs.js.map +1 -1
- package/dist/phone-input/index.es.js +303 -298
- package/dist/phone-input/index.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as c } from "../chunks/jsx-runtime-Cl_4eDuT.js";
|
|
2
|
-
import { useState as w, useRef as
|
|
3
|
-
import { twMerge as
|
|
2
|
+
import { useState as w, useRef as gt, useId as tr, useEffect as dt } from "react";
|
|
3
|
+
import { twMerge as G } from "../chunks/bundle-mjs-BcJXDvon.js";
|
|
4
4
|
import { c as er } from "../chunks/utils-BFAOD39w.js";
|
|
5
5
|
import "../chunks/textarea-9E0vAKDj.js";
|
|
6
6
|
import { L as rr } from "../chunks/label-error-Vg0P1jJJ.js";
|
|
@@ -29,15 +29,15 @@ var sr = {}.constructor;
|
|
|
29
29
|
function _(t) {
|
|
30
30
|
return t != null && t.constructor === sr;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function D(t) {
|
|
33
33
|
"@babel/helpers - typeof";
|
|
34
|
-
return
|
|
34
|
+
return D = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
35
35
|
return typeof e;
|
|
36
36
|
} : function(e) {
|
|
37
37
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
38
|
-
},
|
|
38
|
+
}, D(t);
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function $t(t, e) {
|
|
41
41
|
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
42
42
|
}
|
|
43
43
|
function fr(t, e) {
|
|
@@ -46,28 +46,28 @@ function fr(t, e) {
|
|
|
46
46
|
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, cr(n.key), n);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function lt(t, e, r) {
|
|
50
50
|
return e && fr(t.prototype, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
|
|
51
51
|
}
|
|
52
52
|
function cr(t) {
|
|
53
53
|
var e = hr(t, "string");
|
|
54
|
-
return
|
|
54
|
+
return D(e) == "symbol" ? e : e + "";
|
|
55
55
|
}
|
|
56
56
|
function hr(t, e) {
|
|
57
|
-
if (
|
|
57
|
+
if (D(t) != "object" || !t) return t;
|
|
58
58
|
var r = t[Symbol.toPrimitive];
|
|
59
59
|
if (r !== void 0) {
|
|
60
60
|
var n = r.call(t, e);
|
|
61
|
-
if (
|
|
61
|
+
if (D(n) != "object") return n;
|
|
62
62
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
63
63
|
}
|
|
64
64
|
return String(t);
|
|
65
65
|
}
|
|
66
|
-
var mr = "1.2.0", gr = "1.7.35", Wt = " ext. ", yr = /^\d+$/,
|
|
66
|
+
var mr = "1.2.0", gr = "1.7.35", Wt = " ext. ", yr = /^\d+$/, v = /* @__PURE__ */ (function() {
|
|
67
67
|
function t(e) {
|
|
68
|
-
|
|
68
|
+
$t(this, t), _e(e), this.metadata = e, Ae.call(this, e);
|
|
69
69
|
}
|
|
70
|
-
return
|
|
70
|
+
return lt(t, [{
|
|
71
71
|
key: "getCountries",
|
|
72
72
|
value: function() {
|
|
73
73
|
return Object.keys(this.metadata.countries).filter(function(r) {
|
|
@@ -251,9 +251,9 @@ var mr = "1.2.0", gr = "1.7.35", Wt = " ext. ", yr = /^\d+$/, g = /* @__PURE__ *
|
|
|
251
251
|
}]);
|
|
252
252
|
})(), Vt = /* @__PURE__ */ (function() {
|
|
253
253
|
function t(e, r) {
|
|
254
|
-
|
|
254
|
+
$t(this, t), this.globalMetadataObject = r, this.metadata = e, Ae.call(this, r.metadata);
|
|
255
255
|
}
|
|
256
|
-
return
|
|
256
|
+
return lt(t, [{
|
|
257
257
|
key: "callingCode",
|
|
258
258
|
value: function() {
|
|
259
259
|
return this.metadata[0];
|
|
@@ -387,9 +387,9 @@ var mr = "1.2.0", gr = "1.7.35", Wt = " ext. ", yr = /^\d+$/, g = /* @__PURE__ *
|
|
|
387
387
|
}]);
|
|
388
388
|
})(), pr = /* @__PURE__ */ (function() {
|
|
389
389
|
function t(e, r) {
|
|
390
|
-
|
|
390
|
+
$t(this, t), this._format = e, this.metadata = r;
|
|
391
391
|
}
|
|
392
|
-
return
|
|
392
|
+
return lt(t, [{
|
|
393
393
|
key: "pattern",
|
|
394
394
|
value: function() {
|
|
395
395
|
return this._format[0];
|
|
@@ -434,9 +434,9 @@ var mr = "1.2.0", gr = "1.7.35", Wt = " ext. ", yr = /^\d+$/, g = /* @__PURE__ *
|
|
|
434
434
|
}]);
|
|
435
435
|
})(), vr = /^\(?\$1\)?$/, br = /* @__PURE__ */ (function() {
|
|
436
436
|
function t(e, r) {
|
|
437
|
-
|
|
437
|
+
$t(this, t), this.type = e, this.metadata = r;
|
|
438
438
|
}
|
|
439
|
-
return
|
|
439
|
+
return lt(t, [{
|
|
440
440
|
key: "pattern",
|
|
441
441
|
value: function() {
|
|
442
442
|
return this.metadata.v1 ? this.type : this.type[0];
|
|
@@ -480,10 +480,10 @@ function _e(t) {
|
|
|
480
480
|
throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(_(t) ? "an object of shape: { " + Object.keys(t).join(", ") + " }" : "a " + Nr(t) + ": " + t, "."));
|
|
481
481
|
}
|
|
482
482
|
var Nr = function(e) {
|
|
483
|
-
return
|
|
483
|
+
return D(e);
|
|
484
484
|
};
|
|
485
|
-
function
|
|
486
|
-
if (e = new
|
|
485
|
+
function st(t, e) {
|
|
486
|
+
if (e = new v(e), e.hasCountry(t))
|
|
487
487
|
return e.country(t).countryCallingCode();
|
|
488
488
|
throw new Error("Unknown country: ".concat(t));
|
|
489
489
|
}
|
|
@@ -494,7 +494,7 @@ function Ae(t) {
|
|
|
494
494
|
var e = t.version;
|
|
495
495
|
typeof e == "number" ? (this.v1 = e === 1, this.v2 = e === 2, this.v3 = e === 3, this.v4 = e === 4) : e ? Ht(e, mr) === -1 ? this.v2 = !0 : Ht(e, gr) === -1 ? this.v3 = !0 : this.v4 = !0 : this.v1 = !0;
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function ft(t, e) {
|
|
498
498
|
return Pr(t, void 0, e);
|
|
499
499
|
}
|
|
500
500
|
function Pr(t, e, r) {
|
|
@@ -505,7 +505,7 @@ function Pr(t, e, r) {
|
|
|
505
505
|
return a === i ? "IS_POSSIBLE" : a > i ? "TOO_SHORT" : d[d.length - 1] < i ? "TOO_LONG" : d.indexOf(i, 1) >= 0 ? "IS_POSSIBLE" : "INVALID_LENGTH";
|
|
506
506
|
}
|
|
507
507
|
function Sr(t, e, r) {
|
|
508
|
-
if (e === void 0 && (e = {}), r = new
|
|
508
|
+
if (e === void 0 && (e = {}), r = new v(r), e.v2) {
|
|
509
509
|
if (!t.countryCallingCode)
|
|
510
510
|
throw new Error("Invalid phone number object passed");
|
|
511
511
|
r.selectNumberingPlan(t.countryCallingCode);
|
|
@@ -529,7 +529,7 @@ function Sr(t, e, r) {
|
|
|
529
529
|
throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.');
|
|
530
530
|
}
|
|
531
531
|
function Fe(t, e) {
|
|
532
|
-
switch (
|
|
532
|
+
switch (ft(t, e)) {
|
|
533
533
|
case "IS_POSSIBLE":
|
|
534
534
|
return !0;
|
|
535
535
|
// This library ignores "local-only" phone numbers (for simplicity).
|
|
@@ -569,44 +569,44 @@ function Xt(t, e) {
|
|
|
569
569
|
return n;
|
|
570
570
|
}
|
|
571
571
|
var wr = ["MOBILE", "PREMIUM_RATE", "TOLL_FREE", "SHARED_COST", "VOIP", "PERSONAL_NUMBER", "PAGER", "UAN", "VOICEMAIL"];
|
|
572
|
-
function
|
|
572
|
+
function Ft(t, e, r) {
|
|
573
573
|
if (e = e || {}, !(!t.country && !t.countryCallingCode)) {
|
|
574
|
-
r = new
|
|
574
|
+
r = new v(r), r.selectNumberingPlan(t.country, t.countryCallingCode);
|
|
575
575
|
var n = e.v2 ? t.nationalNumber : t.phone;
|
|
576
576
|
if (E(n, r.nationalNumberPattern())) {
|
|
577
|
-
if (
|
|
578
|
-
return r.type("MOBILE") && r.type("MOBILE").pattern() === "" || !r.type("MOBILE") ||
|
|
577
|
+
if (yt(n, "FIXED_LINE", r))
|
|
578
|
+
return r.type("MOBILE") && r.type("MOBILE").pattern() === "" || !r.type("MOBILE") || yt(n, "MOBILE", r) ? "FIXED_LINE_OR_MOBILE" : "FIXED_LINE";
|
|
579
579
|
for (var d = xr(wr), i; !(i = d()).done; ) {
|
|
580
580
|
var a = i.value;
|
|
581
|
-
if (
|
|
581
|
+
if (yt(n, a, r))
|
|
582
582
|
return a;
|
|
583
583
|
}
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function yt(t, e, r) {
|
|
588
588
|
return e = r.type(e), !e || !e.pattern() || e.possibleLengths() && e.possibleLengths().indexOf(t.length) < 0 ? !1 : E(t, e.pattern());
|
|
589
589
|
}
|
|
590
590
|
function _r(t, e, r) {
|
|
591
|
-
if (e = e || {}, r = new
|
|
592
|
-
return
|
|
591
|
+
if (e = e || {}, r = new v(r), r.selectNumberingPlan(t.country, t.countryCallingCode), r.hasTypes())
|
|
592
|
+
return Ft(t, e, r.metadata) !== void 0;
|
|
593
593
|
var n = e.v2 ? t.nationalNumber : t.phone;
|
|
594
594
|
return E(n, r.nationalNumberPattern());
|
|
595
595
|
}
|
|
596
596
|
function Ar(t, e, r) {
|
|
597
|
-
var n = new
|
|
597
|
+
var n = new v(r), d = n.getCountryCodesForCallingCode(t);
|
|
598
598
|
return d ? d.filter(function(i) {
|
|
599
599
|
return Fr(e, i, r);
|
|
600
600
|
}) : [];
|
|
601
601
|
}
|
|
602
602
|
function Fr(t, e, r) {
|
|
603
|
-
var n = new
|
|
603
|
+
var n = new v(r);
|
|
604
604
|
return n.selectNumberingPlan(e), n.numberingPlan.possibleLengths().indexOf(t.length) >= 0;
|
|
605
605
|
}
|
|
606
|
-
var
|
|
606
|
+
var It = 2, Ir = 17, Or = 3, N = "0-90-9٠-٩۰-۹", Tr = "-‐-―−ー-", Rr = "//", Dr = "..", Lr = " ", Mr = "()()[]\\[\\]", jr = "~⁓∼~", S = "".concat(Tr).concat(Rr).concat(Dr).concat(Lr).concat(Mr).concat(jr), ct = "++", kr = new RegExp("([" + N + "])");
|
|
607
607
|
function Ie(t, e, r, n) {
|
|
608
608
|
if (e) {
|
|
609
|
-
var d = new
|
|
609
|
+
var d = new v(n);
|
|
610
610
|
d.selectNumberingPlan(e, r);
|
|
611
611
|
var i = new RegExp(d.IDDPrefix());
|
|
612
612
|
if (t.search(i) === 0) {
|
|
@@ -617,7 +617,7 @@ function Ie(t, e, r, n) {
|
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function Ct(t, e) {
|
|
621
621
|
if (t && e.numberingPlan.nationalPrefixForParsing()) {
|
|
622
622
|
var r = new RegExp("^(?:" + e.numberingPlan.nationalPrefixForParsing() + ")"), n = r.exec(t);
|
|
623
623
|
if (n) {
|
|
@@ -645,8 +645,8 @@ function Nt(t, e) {
|
|
|
645
645
|
nationalNumber: t
|
|
646
646
|
};
|
|
647
647
|
}
|
|
648
|
-
function
|
|
649
|
-
var r =
|
|
648
|
+
function Pt(t, e) {
|
|
649
|
+
var r = Ct(t, e), n = r.carrierCode, d = r.nationalNumber;
|
|
650
650
|
if (d !== t) {
|
|
651
651
|
if (!Gr(t, d, e))
|
|
652
652
|
return {
|
|
@@ -666,7 +666,7 @@ function Gr(t, e, r) {
|
|
|
666
666
|
return !(E(t, r.nationalNumberPattern()) && !E(e, r.nationalNumberPattern()));
|
|
667
667
|
}
|
|
668
668
|
function Br(t, e) {
|
|
669
|
-
switch (
|
|
669
|
+
switch (ft(t, e)) {
|
|
670
670
|
case "TOO_SHORT":
|
|
671
671
|
case "INVALID_LENGTH":
|
|
672
672
|
return !1;
|
|
@@ -675,11 +675,11 @@ function Br(t, e) {
|
|
|
675
675
|
}
|
|
676
676
|
}
|
|
677
677
|
function Oe(t, e, r, n) {
|
|
678
|
-
var d = e ?
|
|
678
|
+
var d = e ? st(e, n) : r;
|
|
679
679
|
if (t.indexOf(d) === 0) {
|
|
680
|
-
n = new
|
|
681
|
-
var i = t.slice(d.length), a =
|
|
682
|
-
if (!E($, n.nationalNumberPattern()) && E(o, n.nationalNumberPattern()) ||
|
|
680
|
+
n = new v(n), n.selectNumberingPlan(e, r);
|
|
681
|
+
var i = t.slice(d.length), a = Pt(i, n), o = a.nationalNumber, u = Pt(t, n), $ = u.nationalNumber;
|
|
682
|
+
if (!E($, n.nationalNumberPattern()) && E(o, n.nationalNumberPattern()) || ft($, n) === "TOO_LONG")
|
|
683
683
|
return {
|
|
684
684
|
countryCallingCode: d,
|
|
685
685
|
number: i
|
|
@@ -689,7 +689,7 @@ function Oe(t, e, r, n) {
|
|
|
689
689
|
number: t
|
|
690
690
|
};
|
|
691
691
|
}
|
|
692
|
-
function
|
|
692
|
+
function Ot(t, e, r, n) {
|
|
693
693
|
if (!t)
|
|
694
694
|
return {};
|
|
695
695
|
var d;
|
|
@@ -716,7 +716,7 @@ function It(t, e, r, n) {
|
|
|
716
716
|
}
|
|
717
717
|
if (t[1] === "0")
|
|
718
718
|
return {};
|
|
719
|
-
n = new
|
|
719
|
+
n = new v(n);
|
|
720
720
|
for (var $ = 2; $ - 1 <= Or && $ <= t.length; ) {
|
|
721
721
|
var l = t.slice(1, $);
|
|
722
722
|
if (n.hasCallingCode(l))
|
|
@@ -756,27 +756,27 @@ function De(t, e, r) {
|
|
|
756
756
|
}
|
|
757
757
|
var Ur = /^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;
|
|
758
758
|
function Hr(t, e, r) {
|
|
759
|
-
var n = new
|
|
759
|
+
var n = new v(r);
|
|
760
760
|
if (n.selectNumberingPlan(t, e), n.defaultIDDPrefix())
|
|
761
761
|
return n.defaultIDDPrefix();
|
|
762
762
|
if (Ur.test(n.IDDPrefix()))
|
|
763
763
|
return n.IDDPrefix();
|
|
764
764
|
}
|
|
765
|
-
var Wr = ";ext=",
|
|
766
|
-
return "([".concat(
|
|
765
|
+
var Wr = ";ext=", T = function(e) {
|
|
766
|
+
return "([".concat(N, "]{1,").concat(e, "})");
|
|
767
767
|
};
|
|
768
768
|
function Le(t) {
|
|
769
|
-
var e = "20", r = "15", n = "9", d = "6", i = "[ \\t,]*", a = "[:\\..]?[ \\t,-]*", o = "#?", u = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)", $ = "(?:[xx##~~]|int|int)", l = "[- ]+", h = "[ \\t]*", f = "(?:,{2}|;)",
|
|
770
|
-
return
|
|
769
|
+
var e = "20", r = "15", n = "9", d = "6", i = "[ \\t,]*", a = "[:\\..]?[ \\t,-]*", o = "#?", u = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)", $ = "(?:[xx##~~]|int|int)", l = "[- ]+", h = "[ \\t]*", f = "(?:,{2}|;)", y = Wr + T(e), b = i + u + a + T(e) + o, p = i + $ + a + T(n) + o, C = l + T(d) + "#", A = h + f + a + T(r) + o, L = h + "(?:,)+" + a + T(n) + o;
|
|
770
|
+
return y + "|" + b + "|" + p + "|" + C + "|" + A + "|" + L;
|
|
771
771
|
}
|
|
772
|
-
var Vr = "[" +
|
|
772
|
+
var Vr = "[" + N + "]{" + It + "}", Kr = "[" + ct + "]{0,1}(?:[" + S + "]*[" + N + "]){3,}[" + S + N + "]*", Xr = new RegExp("^[" + ct + "]{0,1}(?:[" + S + "]*[" + N + "]){1,2}$", "i"), Yr = Kr + // Phone number extensions
|
|
773
773
|
"(?:" + Le() + ")?", Zr = new RegExp(
|
|
774
774
|
// Either a short two-digit-only phone number
|
|
775
775
|
"^" + Vr + "$|^" + Yr + "$",
|
|
776
776
|
"i"
|
|
777
777
|
);
|
|
778
778
|
function Jr(t) {
|
|
779
|
-
return t.length >=
|
|
779
|
+
return t.length >= It && Zr.test(t);
|
|
780
780
|
}
|
|
781
781
|
function Qr(t) {
|
|
782
782
|
return Xr.test(t);
|
|
@@ -789,13 +789,13 @@ function qr(t) {
|
|
|
789
789
|
throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');
|
|
790
790
|
return "tel:".concat(e).concat(r ? ";ext=" + r : "");
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function B(t) {
|
|
793
793
|
"@babel/helpers - typeof";
|
|
794
|
-
return
|
|
794
|
+
return B = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
795
795
|
return typeof e;
|
|
796
796
|
} : function(e) {
|
|
797
797
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
798
|
-
},
|
|
798
|
+
}, B(t);
|
|
799
799
|
}
|
|
800
800
|
function zr(t, e) {
|
|
801
801
|
var r = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
|
|
@@ -848,14 +848,14 @@ function en(t, e, r) {
|
|
|
848
848
|
}
|
|
849
849
|
function rn(t) {
|
|
850
850
|
var e = nn(t, "string");
|
|
851
|
-
return
|
|
851
|
+
return B(e) == "symbol" ? e : e + "";
|
|
852
852
|
}
|
|
853
853
|
function nn(t, e) {
|
|
854
|
-
if (
|
|
854
|
+
if (B(t) != "object" || !t) return t;
|
|
855
855
|
var r = t[Symbol.toPrimitive];
|
|
856
856
|
if (r !== void 0) {
|
|
857
857
|
var n = r.call(t, e);
|
|
858
|
-
if (
|
|
858
|
+
if (B(n) != "object") return n;
|
|
859
859
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
860
860
|
}
|
|
861
861
|
return (e === "string" ? String : Number)(t);
|
|
@@ -866,7 +866,7 @@ var Qt = {
|
|
|
866
866
|
}
|
|
867
867
|
};
|
|
868
868
|
function dn(t, e, r, n) {
|
|
869
|
-
if (r ? r = Jt(Jt({}, Qt), r) : r = Qt, n = new
|
|
869
|
+
if (r ? r = Jt(Jt({}, Qt), r) : r = Qt, n = new v(n), t.country && t.country !== "001") {
|
|
870
870
|
if (!n.hasCountry(t.country))
|
|
871
871
|
throw new Error("Unknown country: ".concat(t.country));
|
|
872
872
|
n.country(t.country);
|
|
@@ -876,9 +876,9 @@ function dn(t, e, r, n) {
|
|
|
876
876
|
var d = n.countryCallingCode(), i = r.v2 ? t.nationalNumber : t.phone, a;
|
|
877
877
|
switch (e) {
|
|
878
878
|
case "NATIONAL":
|
|
879
|
-
return i ? (a =
|
|
879
|
+
return i ? (a = ot(i, t.carrierCode, "NATIONAL", n, r), pt(a, t.ext, n, r.formatExtension)) : "";
|
|
880
880
|
case "INTERNATIONAL":
|
|
881
|
-
return i ? (a =
|
|
881
|
+
return i ? (a = ot(i, null, "INTERNATIONAL", n, r), a = "+".concat(d, " ").concat(a), pt(a, t.ext, n, r.formatExtension)) : "+".concat(d);
|
|
882
882
|
case "E.164":
|
|
883
883
|
return "+".concat(d).concat(i);
|
|
884
884
|
case "RFC3966":
|
|
@@ -894,12 +894,12 @@ function dn(t, e, r, n) {
|
|
|
894
894
|
if (!r.fromCountry)
|
|
895
895
|
return;
|
|
896
896
|
var o = on(i, t.carrierCode, d, r.fromCountry, n);
|
|
897
|
-
return
|
|
897
|
+
return pt(o, t.ext, n, r.formatExtension);
|
|
898
898
|
default:
|
|
899
899
|
throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(e, '"'));
|
|
900
900
|
}
|
|
901
901
|
}
|
|
902
|
-
function
|
|
902
|
+
function ot(t, e, r, n, d) {
|
|
903
903
|
var i = an(n.formats(), t);
|
|
904
904
|
return i ? De(t, i, {
|
|
905
905
|
useInternationalFormat: r === "INTERNATIONAL",
|
|
@@ -920,26 +920,26 @@ function an(t, e) {
|
|
|
920
920
|
return d;
|
|
921
921
|
}
|
|
922
922
|
}
|
|
923
|
-
function
|
|
923
|
+
function pt(t, e, r, n) {
|
|
924
924
|
return e ? n(t, e, r) : t;
|
|
925
925
|
}
|
|
926
926
|
function on(t, e, r, n, d) {
|
|
927
|
-
var i =
|
|
927
|
+
var i = st(n, d.metadata);
|
|
928
928
|
if (i === r) {
|
|
929
|
-
var a =
|
|
929
|
+
var a = ot(t, e, "NATIONAL", d);
|
|
930
930
|
return r === "1" ? r + " " + a : a;
|
|
931
931
|
}
|
|
932
932
|
var o = Hr(n, void 0, d.metadata);
|
|
933
933
|
if (o)
|
|
934
|
-
return "".concat(o, " ").concat(r, " ").concat(
|
|
934
|
+
return "".concat(o, " ").concat(r, " ").concat(ot(t, null, "INTERNATIONAL", d));
|
|
935
935
|
}
|
|
936
|
-
function
|
|
936
|
+
function U(t) {
|
|
937
937
|
"@babel/helpers - typeof";
|
|
938
|
-
return
|
|
938
|
+
return U = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
939
939
|
return typeof e;
|
|
940
940
|
} : function(e) {
|
|
941
941
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
942
|
-
},
|
|
942
|
+
}, U(t);
|
|
943
943
|
}
|
|
944
944
|
function qt(t, e) {
|
|
945
945
|
var r = Object.keys(t);
|
|
@@ -979,14 +979,14 @@ function sn(t, e, r) {
|
|
|
979
979
|
}
|
|
980
980
|
function Me(t) {
|
|
981
981
|
var e = fn(t, "string");
|
|
982
|
-
return
|
|
982
|
+
return U(e) == "symbol" ? e : e + "";
|
|
983
983
|
}
|
|
984
984
|
function fn(t, e) {
|
|
985
|
-
if (
|
|
985
|
+
if (U(t) != "object" || !t) return t;
|
|
986
986
|
var r = t[Symbol.toPrimitive];
|
|
987
987
|
if (r !== void 0) {
|
|
988
988
|
var n = r.call(t, e);
|
|
989
|
-
if (
|
|
989
|
+
if (U(n) != "object") return n;
|
|
990
990
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
991
991
|
}
|
|
992
992
|
return String(t);
|
|
@@ -1004,7 +1004,7 @@ var je = /* @__PURE__ */ (function() {
|
|
|
1004
1004
|
var d = e;
|
|
1005
1005
|
if (!mn.test(d))
|
|
1006
1006
|
throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');
|
|
1007
|
-
var i =
|
|
1007
|
+
var i = Ot(d, void 0, void 0, n), a = i.countryCallingCode, o = i.number;
|
|
1008
1008
|
if (r = o, e = a, !r)
|
|
1009
1009
|
throw new Error("Invalid `number` argument passed: too short");
|
|
1010
1010
|
}
|
|
@@ -1045,7 +1045,7 @@ var je = /* @__PURE__ */ (function() {
|
|
|
1045
1045
|
}, {
|
|
1046
1046
|
key: "isNonGeographic",
|
|
1047
1047
|
value: function() {
|
|
1048
|
-
var r = new
|
|
1048
|
+
var r = new v(this.getMetadata());
|
|
1049
1049
|
return r.isNonGeographicCallingCode(this.countryCallingCode);
|
|
1050
1050
|
}
|
|
1051
1051
|
}, {
|
|
@@ -1070,7 +1070,7 @@ var je = /* @__PURE__ */ (function() {
|
|
|
1070
1070
|
}, {
|
|
1071
1071
|
key: "getType",
|
|
1072
1072
|
value: function() {
|
|
1073
|
-
return
|
|
1073
|
+
return Ft(this, {
|
|
1074
1074
|
v2: !0
|
|
1075
1075
|
}, this.getMetadata());
|
|
1076
1076
|
}
|
|
@@ -1103,20 +1103,20 @@ var je = /* @__PURE__ */ (function() {
|
|
|
1103
1103
|
return /^[A-Z]{2}$/.test(e);
|
|
1104
1104
|
};
|
|
1105
1105
|
function hn(t, e) {
|
|
1106
|
-
var r, n, d = new
|
|
1106
|
+
var r, n, d = new v(e);
|
|
1107
1107
|
return cn(t) ? (r = t, d.selectNumberingPlan(r), n = d.countryCallingCode()) : n = t, {
|
|
1108
1108
|
country: r,
|
|
1109
1109
|
countryCallingCode: n
|
|
1110
1110
|
};
|
|
1111
1111
|
}
|
|
1112
1112
|
var mn = /^\+\d+$/;
|
|
1113
|
-
function
|
|
1113
|
+
function St(t) {
|
|
1114
1114
|
"@babel/helpers - typeof";
|
|
1115
|
-
return
|
|
1115
|
+
return St = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1116
1116
|
return typeof e;
|
|
1117
1117
|
} : function(e) {
|
|
1118
1118
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1119
|
-
},
|
|
1119
|
+
}, St(t);
|
|
1120
1120
|
}
|
|
1121
1121
|
function gn(t, e, r) {
|
|
1122
1122
|
return Object.defineProperty(t, "prototype", { writable: !1 }), t;
|
|
@@ -1125,10 +1125,10 @@ function yn(t, e) {
|
|
|
1125
1125
|
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
1126
1126
|
}
|
|
1127
1127
|
function pn(t, e, r) {
|
|
1128
|
-
return e =
|
|
1128
|
+
return e = W(e), vn(t, Tt() ? Reflect.construct(e, r || [], W(t).constructor) : e.apply(t, r));
|
|
1129
1129
|
}
|
|
1130
1130
|
function vn(t, e) {
|
|
1131
|
-
if (e && (
|
|
1131
|
+
if (e && (St(e) == "object" || typeof e == "function")) return e;
|
|
1132
1132
|
if (e !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
1133
1133
|
return bn(t);
|
|
1134
1134
|
}
|
|
@@ -1138,11 +1138,11 @@ function bn(t) {
|
|
|
1138
1138
|
}
|
|
1139
1139
|
function Nn(t, e) {
|
|
1140
1140
|
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
1141
|
-
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e &&
|
|
1141
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && H(t, e);
|
|
1142
1142
|
}
|
|
1143
|
-
function
|
|
1143
|
+
function xt(t) {
|
|
1144
1144
|
var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
1145
|
-
return
|
|
1145
|
+
return xt = function(n) {
|
|
1146
1146
|
if (n === null || !Pn(n)) return n;
|
|
1147
1147
|
if (typeof n != "function") throw new TypeError("Super expression must either be null or a function");
|
|
1148
1148
|
if (e !== void 0) {
|
|
@@ -1150,25 +1150,25 @@ function St(t) {
|
|
|
1150
1150
|
e.set(n, d);
|
|
1151
1151
|
}
|
|
1152
1152
|
function d() {
|
|
1153
|
-
return Cn(n, arguments,
|
|
1153
|
+
return Cn(n, arguments, W(this).constructor);
|
|
1154
1154
|
}
|
|
1155
|
-
return d.prototype = Object.create(n.prototype, { constructor: { value: d, enumerable: !1, writable: !0, configurable: !0 } }),
|
|
1156
|
-
},
|
|
1155
|
+
return d.prototype = Object.create(n.prototype, { constructor: { value: d, enumerable: !1, writable: !0, configurable: !0 } }), H(d, n);
|
|
1156
|
+
}, xt(t);
|
|
1157
1157
|
}
|
|
1158
1158
|
function Cn(t, e, r) {
|
|
1159
|
-
if (
|
|
1159
|
+
if (Tt()) return Reflect.construct.apply(null, arguments);
|
|
1160
1160
|
var n = [null];
|
|
1161
1161
|
n.push.apply(n, e);
|
|
1162
1162
|
var d = new (t.bind.apply(t, n))();
|
|
1163
|
-
return r &&
|
|
1163
|
+
return r && H(d, r.prototype), d;
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1165
|
+
function Tt() {
|
|
1166
1166
|
try {
|
|
1167
1167
|
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1168
1168
|
}));
|
|
1169
1169
|
} catch {
|
|
1170
1170
|
}
|
|
1171
|
-
return (
|
|
1171
|
+
return (Tt = function() {
|
|
1172
1172
|
return !!t;
|
|
1173
1173
|
})();
|
|
1174
1174
|
}
|
|
@@ -1179,15 +1179,15 @@ function Pn(t) {
|
|
|
1179
1179
|
return typeof t == "function";
|
|
1180
1180
|
}
|
|
1181
1181
|
}
|
|
1182
|
-
function
|
|
1183
|
-
return
|
|
1182
|
+
function H(t, e) {
|
|
1183
|
+
return H = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, n) {
|
|
1184
1184
|
return r.__proto__ = n, r;
|
|
1185
|
-
},
|
|
1185
|
+
}, H(t, e);
|
|
1186
1186
|
}
|
|
1187
|
-
function
|
|
1188
|
-
return
|
|
1187
|
+
function W(t) {
|
|
1188
|
+
return W = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
1189
1189
|
return e.__proto__ || Object.getPrototypeOf(e);
|
|
1190
|
-
},
|
|
1190
|
+
}, W(t);
|
|
1191
1191
|
}
|
|
1192
1192
|
var x = /* @__PURE__ */ (function(t) {
|
|
1193
1193
|
function e(r) {
|
|
@@ -1195,7 +1195,7 @@ var x = /* @__PURE__ */ (function(t) {
|
|
|
1195
1195
|
return yn(this, e), n = pn(this, e, [r]), Object.setPrototypeOf(n, e.prototype), n.name = n.constructor.name, n;
|
|
1196
1196
|
}
|
|
1197
1197
|
return Nn(e, t), gn(e);
|
|
1198
|
-
})(/* @__PURE__ */
|
|
1198
|
+
})(/* @__PURE__ */ xt(Error)), te = new RegExp("(?:" + Le() + ")$", "i");
|
|
1199
1199
|
function Sn(t) {
|
|
1200
1200
|
var e = t.search(te);
|
|
1201
1201
|
if (e < 0)
|
|
@@ -1309,7 +1309,7 @@ var wn = {
|
|
|
1309
1309
|
function ke(t) {
|
|
1310
1310
|
return wn[t];
|
|
1311
1311
|
}
|
|
1312
|
-
function
|
|
1312
|
+
function ut(t) {
|
|
1313
1313
|
for (var e = "", r = xn(t.split("")), n; !(n = r()).done; ) {
|
|
1314
1314
|
var d = n.value, i = ke(d);
|
|
1315
1315
|
i && (e += i);
|
|
@@ -1380,13 +1380,13 @@ function Ge(t, e) {
|
|
|
1380
1380
|
var r = e.countries;
|
|
1381
1381
|
e.defaultCountry;
|
|
1382
1382
|
var n = e.metadata;
|
|
1383
|
-
n = new
|
|
1383
|
+
n = new v(n);
|
|
1384
1384
|
for (var d = In(r), i; !(i = d()).done; ) {
|
|
1385
1385
|
var a = i.value;
|
|
1386
1386
|
if (n.country(a), n.leadingDigits()) {
|
|
1387
1387
|
if (t && t.search(n.leadingDigits()) === 0)
|
|
1388
1388
|
return a;
|
|
1389
|
-
} else if (
|
|
1389
|
+
} else if (Ft({
|
|
1390
1390
|
phone: t,
|
|
1391
1391
|
country: a
|
|
1392
1392
|
}, void 0, n.metadata))
|
|
@@ -1402,12 +1402,12 @@ function Be(t, e) {
|
|
|
1402
1402
|
metadata: d.metadata
|
|
1403
1403
|
});
|
|
1404
1404
|
}
|
|
1405
|
-
var Ue = "+", Tn = "[\\-\\.\\(\\)]?", ie = "([" +
|
|
1405
|
+
var Ue = "+", Tn = "[\\-\\.\\(\\)]?", ie = "([" + N + "]|" + Tn + ")", Rn = "^\\" + Ue + ie + "*[" + N + "]" + ie + "*$", Dn = new RegExp(Rn, "g"), Et = N, Ln = "[" + Et + "]+((\\-)*[" + Et + "])*", Mn = "a-zA-Z", jn = "[" + Mn + "]+((\\-)*[" + Et + "])*", kn = "^(" + Ln + "\\.)*" + jn + "\\.?$", Gn = new RegExp(kn, "g"), ae = "tel:", wt = ";phone-context=", Bn = ";isub=";
|
|
1406
1406
|
function Un(t) {
|
|
1407
|
-
var e = t.indexOf(
|
|
1407
|
+
var e = t.indexOf(wt);
|
|
1408
1408
|
if (e < 0)
|
|
1409
1409
|
return null;
|
|
1410
|
-
var r = e +
|
|
1410
|
+
var r = e + wt.length;
|
|
1411
1411
|
if (r >= t.length)
|
|
1412
1412
|
return "";
|
|
1413
1413
|
var n = t.indexOf(";", r);
|
|
@@ -1427,16 +1427,16 @@ function Wn(t, e) {
|
|
|
1427
1427
|
d = "", n.charAt(0) === Ue && (d += n);
|
|
1428
1428
|
var i = t.indexOf(ae), a;
|
|
1429
1429
|
i >= 0 ? a = i + ae.length : a = 0;
|
|
1430
|
-
var o = t.indexOf(
|
|
1430
|
+
var o = t.indexOf(wt);
|
|
1431
1431
|
d += t.substring(a, o);
|
|
1432
1432
|
}
|
|
1433
1433
|
var u = d.indexOf(Bn);
|
|
1434
1434
|
if (u > 0 && (d = d.substring(0, u)), d !== "")
|
|
1435
1435
|
return d;
|
|
1436
1436
|
}
|
|
1437
|
-
var Vn = 250, Kn = new RegExp("[" +
|
|
1437
|
+
var Vn = 250, Kn = new RegExp("[" + ct + N + "]"), Xn = new RegExp("[^" + N + "#]+$");
|
|
1438
1438
|
function Yn(t, e, r) {
|
|
1439
|
-
if (e = e || {}, r = new
|
|
1439
|
+
if (e = e || {}, r = new v(r), e.defaultCountry && !r.hasCountry(e.defaultCountry))
|
|
1440
1440
|
throw e.v2 ? new x("INVALID_COUNTRY") : new Error("Unknown country: ".concat(e.defaultCountry));
|
|
1441
1441
|
var n = Jn(t, e.v2, e.extract), d = n.number, i = n.ext, a = n.error;
|
|
1442
1442
|
if (!d) {
|
|
@@ -1450,7 +1450,7 @@ function Yn(t, e, r) {
|
|
|
1450
1450
|
throw new x("INVALID_COUNTRY");
|
|
1451
1451
|
return {};
|
|
1452
1452
|
}
|
|
1453
|
-
if (!$ || $.length <
|
|
1453
|
+
if (!$ || $.length < It) {
|
|
1454
1454
|
if (e.v2)
|
|
1455
1455
|
throw new x("TOO_SHORT");
|
|
1456
1456
|
return {};
|
|
@@ -1461,19 +1461,19 @@ function Yn(t, e, r) {
|
|
|
1461
1461
|
return {};
|
|
1462
1462
|
}
|
|
1463
1463
|
if (e.v2) {
|
|
1464
|
-
var
|
|
1465
|
-
return u && (
|
|
1464
|
+
var y = new je(l, $, r.metadata);
|
|
1465
|
+
return u && (y.country = u), f && (y.carrierCode = f), i && (y.ext = i), y.__countryCallingCodeSource = h, y;
|
|
1466
1466
|
}
|
|
1467
|
-
var
|
|
1467
|
+
var b = (e.extended ? r.hasSelectedNumberingPlan() : u) ? E($, r.nationalNumberPattern()) : !1;
|
|
1468
1468
|
return e.extended ? {
|
|
1469
1469
|
country: u,
|
|
1470
1470
|
countryCallingCode: l,
|
|
1471
1471
|
carrierCode: f,
|
|
1472
|
-
valid:
|
|
1473
|
-
possible:
|
|
1472
|
+
valid: b,
|
|
1473
|
+
possible: b ? !0 : !!(e.extended === !0 && r.possibleLengths() && Fe($, r)),
|
|
1474
1474
|
phone: $,
|
|
1475
1475
|
ext: i
|
|
1476
|
-
} :
|
|
1476
|
+
} : b ? Qn(u, $, i) : {};
|
|
1477
1477
|
}
|
|
1478
1478
|
function Zn(t, e, r) {
|
|
1479
1479
|
if (t) {
|
|
@@ -1514,18 +1514,18 @@ function Qn(t, e, r) {
|
|
|
1514
1514
|
return r && (n.ext = r), n;
|
|
1515
1515
|
}
|
|
1516
1516
|
function qn(t, e, r, n) {
|
|
1517
|
-
var d =
|
|
1517
|
+
var d = Ot(ne(t), e, r, n.metadata), i = d.countryCallingCodeSource, a = d.countryCallingCode, o = d.number, u;
|
|
1518
1518
|
if (a)
|
|
1519
1519
|
n.selectNumberingPlan(a);
|
|
1520
1520
|
else if (o && (e || r))
|
|
1521
|
-
n.selectNumberingPlan(e, r), e && (u = e), a = r ||
|
|
1521
|
+
n.selectNumberingPlan(e, r), e && (u = e), a = r || st(e, n.metadata);
|
|
1522
1522
|
else return {};
|
|
1523
1523
|
if (!o)
|
|
1524
1524
|
return {
|
|
1525
1525
|
countryCallingCodeSource: i,
|
|
1526
1526
|
countryCallingCode: a
|
|
1527
1527
|
};
|
|
1528
|
-
var $ =
|
|
1528
|
+
var $ = Pt(ne(o), n), l = $.nationalNumber, h = $.carrierCode, f = Be(a, {
|
|
1529
1529
|
nationalNumber: l,
|
|
1530
1530
|
defaultCountry: e,
|
|
1531
1531
|
metadata: n
|
|
@@ -1538,13 +1538,13 @@ function qn(t, e, r, n) {
|
|
|
1538
1538
|
carrierCode: h
|
|
1539
1539
|
};
|
|
1540
1540
|
}
|
|
1541
|
-
function
|
|
1541
|
+
function V(t) {
|
|
1542
1542
|
"@babel/helpers - typeof";
|
|
1543
|
-
return
|
|
1543
|
+
return V = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1544
1544
|
return typeof e;
|
|
1545
1545
|
} : function(e) {
|
|
1546
1546
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1547
|
-
},
|
|
1547
|
+
}, V(t);
|
|
1548
1548
|
}
|
|
1549
1549
|
function oe(t, e) {
|
|
1550
1550
|
var r = Object.keys(t);
|
|
@@ -1572,14 +1572,14 @@ function zn(t, e, r) {
|
|
|
1572
1572
|
}
|
|
1573
1573
|
function td(t) {
|
|
1574
1574
|
var e = ed(t, "string");
|
|
1575
|
-
return
|
|
1575
|
+
return V(e) == "symbol" ? e : e + "";
|
|
1576
1576
|
}
|
|
1577
1577
|
function ed(t, e) {
|
|
1578
|
-
if (
|
|
1578
|
+
if (V(t) != "object" || !t) return t;
|
|
1579
1579
|
var r = t[Symbol.toPrimitive];
|
|
1580
1580
|
if (r !== void 0) {
|
|
1581
1581
|
var n = r.call(t, e);
|
|
1582
|
-
if (
|
|
1582
|
+
if (V(n) != "object") return n;
|
|
1583
1583
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1584
1584
|
}
|
|
1585
1585
|
return (e === "string" ? String : Number)(t);
|
|
@@ -1589,13 +1589,13 @@ function rd(t, e, r) {
|
|
|
1589
1589
|
v2: !0
|
|
1590
1590
|
}), r);
|
|
1591
1591
|
}
|
|
1592
|
-
function
|
|
1592
|
+
function K(t) {
|
|
1593
1593
|
"@babel/helpers - typeof";
|
|
1594
|
-
return
|
|
1594
|
+
return K = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1595
1595
|
return typeof e;
|
|
1596
1596
|
} : function(e) {
|
|
1597
1597
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1598
|
-
},
|
|
1598
|
+
}, K(t);
|
|
1599
1599
|
}
|
|
1600
1600
|
function $e(t, e) {
|
|
1601
1601
|
var r = Object.keys(t);
|
|
@@ -1623,14 +1623,14 @@ function dd(t, e, r) {
|
|
|
1623
1623
|
}
|
|
1624
1624
|
function id(t) {
|
|
1625
1625
|
var e = ad(t, "string");
|
|
1626
|
-
return
|
|
1626
|
+
return K(e) == "symbol" ? e : e + "";
|
|
1627
1627
|
}
|
|
1628
1628
|
function ad(t, e) {
|
|
1629
|
-
if (
|
|
1629
|
+
if (K(t) != "object" || !t) return t;
|
|
1630
1630
|
var r = t[Symbol.toPrimitive];
|
|
1631
1631
|
if (r !== void 0) {
|
|
1632
1632
|
var n = r.call(t, e);
|
|
1633
|
-
if (
|
|
1633
|
+
if (K(n) != "object") return n;
|
|
1634
1634
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1635
1635
|
}
|
|
1636
1636
|
return (e === "string" ? String : Number)(t);
|
|
@@ -1693,13 +1693,13 @@ function fd(t) {
|
|
|
1693
1693
|
metadata: $
|
|
1694
1694
|
};
|
|
1695
1695
|
}
|
|
1696
|
-
function
|
|
1696
|
+
function X(t) {
|
|
1697
1697
|
"@babel/helpers - typeof";
|
|
1698
|
-
return
|
|
1698
|
+
return X = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1699
1699
|
return typeof e;
|
|
1700
1700
|
} : function(e) {
|
|
1701
1701
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1702
|
-
},
|
|
1702
|
+
}, X(t);
|
|
1703
1703
|
}
|
|
1704
1704
|
function se(t, e) {
|
|
1705
1705
|
var r = Object.keys(t);
|
|
@@ -1727,14 +1727,14 @@ function cd(t, e, r) {
|
|
|
1727
1727
|
}
|
|
1728
1728
|
function hd(t) {
|
|
1729
1729
|
var e = md(t, "string");
|
|
1730
|
-
return
|
|
1730
|
+
return X(e) == "symbol" ? e : e + "";
|
|
1731
1731
|
}
|
|
1732
1732
|
function md(t, e) {
|
|
1733
|
-
if (
|
|
1733
|
+
if (X(t) != "object" || !t) return t;
|
|
1734
1734
|
var r = t[Symbol.toPrimitive];
|
|
1735
1735
|
if (r !== void 0) {
|
|
1736
1736
|
var n = r.call(t, e);
|
|
1737
|
-
if (
|
|
1737
|
+
if (X(n) != "object") return n;
|
|
1738
1738
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1739
1739
|
}
|
|
1740
1740
|
return (e === "string" ? String : Number)(t);
|
|
@@ -1749,13 +1749,13 @@ function gd(t, e, r) {
|
|
|
1749
1749
|
if (!(n instanceof x)) throw n;
|
|
1750
1750
|
}
|
|
1751
1751
|
}
|
|
1752
|
-
function
|
|
1752
|
+
function Y(t) {
|
|
1753
1753
|
"@babel/helpers - typeof";
|
|
1754
|
-
return
|
|
1754
|
+
return Y = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1755
1755
|
return typeof e;
|
|
1756
1756
|
} : function(e) {
|
|
1757
1757
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1758
|
-
},
|
|
1758
|
+
}, Y(t);
|
|
1759
1759
|
}
|
|
1760
1760
|
function ce(t, e) {
|
|
1761
1761
|
var r = Object.keys(t);
|
|
@@ -1783,14 +1783,14 @@ function yd(t, e, r) {
|
|
|
1783
1783
|
}
|
|
1784
1784
|
function pd(t) {
|
|
1785
1785
|
var e = vd(t, "string");
|
|
1786
|
-
return
|
|
1786
|
+
return Y(e) == "symbol" ? e : e + "";
|
|
1787
1787
|
}
|
|
1788
1788
|
function vd(t, e) {
|
|
1789
|
-
if (
|
|
1789
|
+
if (Y(t) != "object" || !t) return t;
|
|
1790
1790
|
var r = t[Symbol.toPrimitive];
|
|
1791
1791
|
if (r !== void 0) {
|
|
1792
1792
|
var n = r.call(t, e);
|
|
1793
|
-
if (
|
|
1793
|
+
if (Y(n) != "object") return n;
|
|
1794
1794
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1795
1795
|
}
|
|
1796
1796
|
return (e === "string" ? String : Number)(t);
|
|
@@ -1803,13 +1803,13 @@ function bd() {
|
|
|
1803
1803
|
var d = gd(e, r, n);
|
|
1804
1804
|
return d && d.isValid() || !1;
|
|
1805
1805
|
}
|
|
1806
|
-
function
|
|
1806
|
+
function Z(t) {
|
|
1807
1807
|
"@babel/helpers - typeof";
|
|
1808
|
-
return
|
|
1808
|
+
return Z = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1809
1809
|
return typeof e;
|
|
1810
1810
|
} : function(e) {
|
|
1811
1811
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1812
|
-
},
|
|
1812
|
+
}, Z(t);
|
|
1813
1813
|
}
|
|
1814
1814
|
function Nd(t, e) {
|
|
1815
1815
|
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
@@ -1825,14 +1825,14 @@ function Pd(t, e, r) {
|
|
|
1825
1825
|
}
|
|
1826
1826
|
function Sd(t) {
|
|
1827
1827
|
var e = xd(t, "string");
|
|
1828
|
-
return
|
|
1828
|
+
return Z(e) == "symbol" ? e : e + "";
|
|
1829
1829
|
}
|
|
1830
1830
|
function xd(t, e) {
|
|
1831
|
-
if (
|
|
1831
|
+
if (Z(t) != "object" || !t) return t;
|
|
1832
1832
|
var r = t[Symbol.toPrimitive];
|
|
1833
1833
|
if (r !== void 0) {
|
|
1834
1834
|
var n = r.call(t, e);
|
|
1835
|
-
if (
|
|
1835
|
+
if (Z(n) != "object") return n;
|
|
1836
1836
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1837
1837
|
}
|
|
1838
1838
|
return String(t);
|
|
@@ -1935,8 +1935,8 @@ function me(t, e) {
|
|
|
1935
1935
|
for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
|
|
1936
1936
|
return n;
|
|
1937
1937
|
}
|
|
1938
|
-
var P = "x",
|
|
1939
|
-
function
|
|
1938
|
+
var P = "x", vt = new RegExp(P);
|
|
1939
|
+
function at(t, e) {
|
|
1940
1940
|
if (e < 1)
|
|
1941
1941
|
return "";
|
|
1942
1942
|
for (var r = ""; e > 1; )
|
|
@@ -1960,9 +1960,9 @@ function Ad(t) {
|
|
|
1960
1960
|
function Fd(t, e, r) {
|
|
1961
1961
|
for (var n = wd(r.split("")), d; !(d = n()).done; ) {
|
|
1962
1962
|
var i = d.value;
|
|
1963
|
-
if (t.slice(e + 1).search(
|
|
1963
|
+
if (t.slice(e + 1).search(vt) < 0)
|
|
1964
1964
|
return;
|
|
1965
|
-
e = t.search(
|
|
1965
|
+
e = t.search(vt), t = t.replace(vt, i);
|
|
1966
1966
|
}
|
|
1967
1967
|
return [t, e];
|
|
1968
1968
|
}
|
|
@@ -1976,7 +1976,7 @@ function Id(t, e, r) {
|
|
|
1976
1976
|
});
|
|
1977
1977
|
}
|
|
1978
1978
|
function Od(t, e) {
|
|
1979
|
-
return
|
|
1979
|
+
return ft(t, e) === "IS_POSSIBLE";
|
|
1980
1980
|
}
|
|
1981
1981
|
function Td(t, e, r) {
|
|
1982
1982
|
var n = r.metadata, d = r.shouldTryNationalPrefixFormattingRule, i = r.getSeparatorAfterNationalPrefix;
|
|
@@ -2006,15 +2006,15 @@ function ye(t, e, r) {
|
|
|
2006
2006
|
return a;
|
|
2007
2007
|
}
|
|
2008
2008
|
function Rd(t, e) {
|
|
2009
|
-
return
|
|
2009
|
+
return ut(t) === e.getNationalDigits();
|
|
2010
2010
|
}
|
|
2011
|
-
function
|
|
2011
|
+
function J(t) {
|
|
2012
2012
|
"@babel/helpers - typeof";
|
|
2013
|
-
return
|
|
2013
|
+
return J = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2014
2014
|
return typeof e;
|
|
2015
2015
|
} : function(e) {
|
|
2016
2016
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2017
|
-
},
|
|
2017
|
+
}, J(t);
|
|
2018
2018
|
}
|
|
2019
2019
|
function Dd(t, e) {
|
|
2020
2020
|
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
@@ -2030,14 +2030,14 @@ function Md(t, e, r) {
|
|
|
2030
2030
|
}
|
|
2031
2031
|
function jd(t) {
|
|
2032
2032
|
var e = kd(t, "string");
|
|
2033
|
-
return
|
|
2033
|
+
return J(e) == "symbol" ? e : e + "";
|
|
2034
2034
|
}
|
|
2035
2035
|
function kd(t, e) {
|
|
2036
|
-
if (
|
|
2036
|
+
if (J(t) != "object" || !t) return t;
|
|
2037
2037
|
var r = t[Symbol.toPrimitive];
|
|
2038
2038
|
if (r !== void 0) {
|
|
2039
2039
|
var n = r.call(t, e);
|
|
2040
|
-
if (
|
|
2040
|
+
if (J(n) != "object") return n;
|
|
2041
2041
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2042
2042
|
}
|
|
2043
2043
|
return String(t);
|
|
@@ -2058,7 +2058,7 @@ var Gd = /* @__PURE__ */ (function() {
|
|
|
2058
2058
|
if (d)
|
|
2059
2059
|
return {
|
|
2060
2060
|
op: "|",
|
|
2061
|
-
args: d.concat([
|
|
2061
|
+
args: d.concat([bt(i)])
|
|
2062
2062
|
};
|
|
2063
2063
|
if (i.length === 0)
|
|
2064
2064
|
throw new Error("Pattern is required");
|
|
@@ -2106,7 +2106,7 @@ var Gd = /* @__PURE__ */ (function() {
|
|
|
2106
2106
|
if (i && this.parsePattern(i), this.getContext().instructions.length === 0)
|
|
2107
2107
|
throw new Error('No instructions found after "|" operator in an "or" group');
|
|
2108
2108
|
var o = this.getContext(), u = o.branches;
|
|
2109
|
-
u.push(
|
|
2109
|
+
u.push(bt(this.getContext().instructions)), this.endContext(), this.getContext().instructions.push({
|
|
2110
2110
|
op: "|",
|
|
2111
2111
|
args: u
|
|
2112
2112
|
});
|
|
@@ -2119,7 +2119,7 @@ var Gd = /* @__PURE__ */ (function() {
|
|
|
2119
2119
|
this.getContext().branches = [];
|
|
2120
2120
|
else
|
|
2121
2121
|
throw new Error('"branches" not found in an "or" group context');
|
|
2122
|
-
this.getContext().branches.push(
|
|
2122
|
+
this.getContext().branches.push(bt(this.getContext().instructions)), this.getContext().instructions = [];
|
|
2123
2123
|
break;
|
|
2124
2124
|
case "[":
|
|
2125
2125
|
i && this.parsePattern(i), this.startContext({
|
|
@@ -2159,7 +2159,7 @@ var Ud = /[\(\)\[\]\?\:\|]/, Hd = new RegExp(
|
|
|
2159
2159
|
// any of:
|
|
2160
2160
|
"(\\||\\(\\?\\:|\\)|\\[|\\])"
|
|
2161
2161
|
);
|
|
2162
|
-
function
|
|
2162
|
+
function bt(t) {
|
|
2163
2163
|
return t.length === 1 ? t[0] : t;
|
|
2164
2164
|
}
|
|
2165
2165
|
function pe(t, e) {
|
|
@@ -2187,13 +2187,13 @@ function ve(t, e) {
|
|
|
2187
2187
|
for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
|
|
2188
2188
|
return n;
|
|
2189
2189
|
}
|
|
2190
|
-
function
|
|
2190
|
+
function Q(t) {
|
|
2191
2191
|
"@babel/helpers - typeof";
|
|
2192
|
-
return
|
|
2192
|
+
return Q = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2193
2193
|
return typeof e;
|
|
2194
2194
|
} : function(e) {
|
|
2195
2195
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2196
|
-
},
|
|
2196
|
+
}, Q(t);
|
|
2197
2197
|
}
|
|
2198
2198
|
function Vd(t, e) {
|
|
2199
2199
|
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
@@ -2209,14 +2209,14 @@ function Xd(t, e, r) {
|
|
|
2209
2209
|
}
|
|
2210
2210
|
function Yd(t) {
|
|
2211
2211
|
var e = Zd(t, "string");
|
|
2212
|
-
return
|
|
2212
|
+
return Q(e) == "symbol" ? e : e + "";
|
|
2213
2213
|
}
|
|
2214
2214
|
function Zd(t, e) {
|
|
2215
|
-
if (
|
|
2215
|
+
if (Q(t) != "object" || !t) return t;
|
|
2216
2216
|
var r = t[Symbol.toPrimitive];
|
|
2217
2217
|
if (r !== void 0) {
|
|
2218
2218
|
var n = r.call(t, e);
|
|
2219
|
-
if (
|
|
2219
|
+
if (Q(n) != "object") return n;
|
|
2220
2220
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2221
2221
|
}
|
|
2222
2222
|
return String(t);
|
|
@@ -2231,13 +2231,13 @@ var Jd = /* @__PURE__ */ (function() {
|
|
|
2231
2231
|
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, d = n.allowOverflow;
|
|
2232
2232
|
if (!r)
|
|
2233
2233
|
throw new Error("String is required");
|
|
2234
|
-
var i =
|
|
2234
|
+
var i = _t(r.split(""), this.matchTree, !0);
|
|
2235
2235
|
if (i && i.match && delete i.matchedChars, !(i && i.overflow && !d))
|
|
2236
2236
|
return i;
|
|
2237
2237
|
}
|
|
2238
2238
|
}]);
|
|
2239
2239
|
})();
|
|
2240
|
-
function
|
|
2240
|
+
function _t(t, e, r) {
|
|
2241
2241
|
if (typeof e == "string") {
|
|
2242
2242
|
var n = t.join("");
|
|
2243
2243
|
return e.indexOf(n) === 0 ? t.length === e.length ? {
|
|
@@ -2255,7 +2255,7 @@ function wt(t, e, r) {
|
|
|
2255
2255
|
}
|
|
2256
2256
|
if (Array.isArray(e)) {
|
|
2257
2257
|
for (var d = t.slice(), i = 0; i < e.length; ) {
|
|
2258
|
-
var a = e[i], o =
|
|
2258
|
+
var a = e[i], o = _t(d, a, r && i === e.length - 1);
|
|
2259
2259
|
if (o) {
|
|
2260
2260
|
if (o.overflow)
|
|
2261
2261
|
return o;
|
|
@@ -2290,7 +2290,7 @@ function wt(t, e, r) {
|
|
|
2290
2290
|
switch (e.op) {
|
|
2291
2291
|
case "|":
|
|
2292
2292
|
for (var u, $ = pe(e.args), l; !(l = $()).done; ) {
|
|
2293
|
-
var h = l.value, f =
|
|
2293
|
+
var h = l.value, f = _t(t, h, r);
|
|
2294
2294
|
if (f) {
|
|
2295
2295
|
if (f.overflow)
|
|
2296
2296
|
return f;
|
|
@@ -2311,9 +2311,9 @@ function wt(t, e, r) {
|
|
|
2311
2311
|
// matchedChars: ...
|
|
2312
2312
|
} : void 0;
|
|
2313
2313
|
case "[]":
|
|
2314
|
-
for (var
|
|
2315
|
-
var
|
|
2316
|
-
if (t[0] ===
|
|
2314
|
+
for (var y = pe(e.args), b; !(b = y()).done; ) {
|
|
2315
|
+
var p = b.value;
|
|
2316
|
+
if (t[0] === p)
|
|
2317
2317
|
return t.length === 1 ? {
|
|
2318
2318
|
match: !0,
|
|
2319
2319
|
matchedChars: t
|
|
@@ -2321,7 +2321,7 @@ function wt(t, e, r) {
|
|
|
2321
2321
|
overflow: !0
|
|
2322
2322
|
} : {
|
|
2323
2323
|
match: !0,
|
|
2324
|
-
matchedChars: [
|
|
2324
|
+
matchedChars: [p]
|
|
2325
2325
|
};
|
|
2326
2326
|
}
|
|
2327
2327
|
return;
|
|
@@ -2330,13 +2330,13 @@ function wt(t, e, r) {
|
|
|
2330
2330
|
throw new Error("Unsupported instruction tree: ".concat(e));
|
|
2331
2331
|
}
|
|
2332
2332
|
}
|
|
2333
|
-
function
|
|
2333
|
+
function q(t) {
|
|
2334
2334
|
"@babel/helpers - typeof";
|
|
2335
|
-
return
|
|
2335
|
+
return q = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2336
2336
|
return typeof e;
|
|
2337
2337
|
} : function(e) {
|
|
2338
2338
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2339
|
-
},
|
|
2339
|
+
}, q(t);
|
|
2340
2340
|
}
|
|
2341
2341
|
function be(t, e) {
|
|
2342
2342
|
var r = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
|
|
@@ -2377,19 +2377,19 @@ function ti(t, e, r) {
|
|
|
2377
2377
|
}
|
|
2378
2378
|
function ei(t) {
|
|
2379
2379
|
var e = ri(t, "string");
|
|
2380
|
-
return
|
|
2380
|
+
return q(e) == "symbol" ? e : e + "";
|
|
2381
2381
|
}
|
|
2382
2382
|
function ri(t, e) {
|
|
2383
|
-
if (
|
|
2383
|
+
if (q(t) != "object" || !t) return t;
|
|
2384
2384
|
var r = t[Symbol.toPrimitive];
|
|
2385
2385
|
if (r !== void 0) {
|
|
2386
2386
|
var n = r.call(t, e);
|
|
2387
|
-
if (
|
|
2387
|
+
if (q(n) != "object") return n;
|
|
2388
2388
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2389
2389
|
}
|
|
2390
2390
|
return String(t);
|
|
2391
2391
|
}
|
|
2392
|
-
var
|
|
2392
|
+
var At = "9", ni = 15, di = at(At, ni), ii = /[- ]/, ai = function() {
|
|
2393
2393
|
return /\[([^\[\]])*\]/g;
|
|
2394
2394
|
}, oi = function() {
|
|
2395
2395
|
return /\d(?=[^,}][^,}])/g;
|
|
@@ -2529,7 +2529,7 @@ var _t = "9", ni = 15, di = nt(_t, ni), ii = /[- ]/, ai = function() {
|
|
|
2529
2529
|
}, {
|
|
2530
2530
|
key: "setNationalNumberTemplate",
|
|
2531
2531
|
value: function(r, n) {
|
|
2532
|
-
this.nationalNumberTemplate = r, this.populatedNationalNumberTemplate = r, this.populatedNationalNumberTemplatePosition = -1, n.international ? this.template = this.getInternationalPrefixBeforeCountryCallingCode(n).replace(/[\d\+]/g, P) +
|
|
2532
|
+
this.nationalNumberTemplate = r, this.populatedNationalNumberTemplate = r, this.populatedNationalNumberTemplatePosition = -1, n.international ? this.template = this.getInternationalPrefixBeforeCountryCallingCode(n).replace(/[\d\+]/g, P) + at(P, n.callingCode.length) + " " + r : this.template = r;
|
|
2533
2533
|
}
|
|
2534
2534
|
/**
|
|
2535
2535
|
* Generates formatting template for a national phone number,
|
|
@@ -2545,20 +2545,20 @@ var _t = "9", ni = 15, di = nt(_t, ni), ii = /[- ]/, ai = function() {
|
|
|
2545
2545
|
u = u.replace(ai(), "\\d").replace(oi(), "\\d");
|
|
2546
2546
|
var $ = di.match(u)[0];
|
|
2547
2547
|
if (!(d.length > $.length)) {
|
|
2548
|
-
var l = new RegExp("^" + u + "$"), h = d.replace(/\d/g,
|
|
2548
|
+
var l = new RegExp("^" + u + "$"), h = d.replace(/\d/g, At);
|
|
2549
2549
|
l.test(h) && ($ = h);
|
|
2550
|
-
var f = this.getFormatFormat(r, i),
|
|
2550
|
+
var f = this.getFormatFormat(r, i), y;
|
|
2551
2551
|
if (this.shouldTryNationalPrefixFormattingRule(r, {
|
|
2552
2552
|
international: i,
|
|
2553
2553
|
nationalPrefix: a
|
|
2554
2554
|
})) {
|
|
2555
|
-
var
|
|
2556
|
-
if (
|
|
2557
|
-
for (var
|
|
2558
|
-
f = f.replace(/\d/, P),
|
|
2555
|
+
var b = f.replace(Re, r.nationalPrefixFormattingRule());
|
|
2556
|
+
if (ut(r.nationalPrefixFormattingRule()) === (a || "") + ut("$1") && (f = b, y = !0, a))
|
|
2557
|
+
for (var p = a.length; p > 0; )
|
|
2558
|
+
f = f.replace(/\d/, P), p--;
|
|
2559
2559
|
}
|
|
2560
|
-
var C = $.replace(new RegExp(u), f).replace(new RegExp(
|
|
2561
|
-
return
|
|
2560
|
+
var C = $.replace(new RegExp(u), f).replace(new RegExp(At, "g"), P);
|
|
2561
|
+
return y || (o ? C = at(P, o.length) + " " + C : a && (C = at(P, a.length) + this.getSeparatorAfterNationalPrefix(r) + C)), i && (C = Te(C)), C;
|
|
2562
2562
|
}
|
|
2563
2563
|
}
|
|
2564
2564
|
}, {
|
|
@@ -2583,13 +2583,13 @@ var _t = "9", ni = 15, di = nt(_t, ni), ii = /[- ]/, ai = function() {
|
|
|
2583
2583
|
}
|
|
2584
2584
|
}]);
|
|
2585
2585
|
})();
|
|
2586
|
-
function
|
|
2586
|
+
function z(t) {
|
|
2587
2587
|
"@babel/helpers - typeof";
|
|
2588
|
-
return
|
|
2588
|
+
return z = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2589
2589
|
return typeof e;
|
|
2590
2590
|
} : function(e) {
|
|
2591
2591
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2592
|
-
},
|
|
2592
|
+
}, z(t);
|
|
2593
2593
|
}
|
|
2594
2594
|
function He(t, e) {
|
|
2595
2595
|
return ci(t) || fi(t, e) || si(t, e) || li();
|
|
@@ -2645,19 +2645,19 @@ function gi(t, e, r) {
|
|
|
2645
2645
|
}
|
|
2646
2646
|
function yi(t) {
|
|
2647
2647
|
var e = pi(t, "string");
|
|
2648
|
-
return
|
|
2648
|
+
return z(e) == "symbol" ? e : e + "";
|
|
2649
2649
|
}
|
|
2650
2650
|
function pi(t, e) {
|
|
2651
|
-
if (
|
|
2651
|
+
if (z(t) != "object" || !t) return t;
|
|
2652
2652
|
var r = t[Symbol.toPrimitive];
|
|
2653
2653
|
if (r !== void 0) {
|
|
2654
2654
|
var n = r.call(t, e);
|
|
2655
|
-
if (
|
|
2655
|
+
if (z(n) != "object") return n;
|
|
2656
2656
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2657
2657
|
}
|
|
2658
2658
|
return String(t);
|
|
2659
2659
|
}
|
|
2660
|
-
var vi = "[" + S +
|
|
2660
|
+
var vi = "[" + S + N + "]+", bi = new RegExp("^" + vi + "$", "i"), Ni = "(?:[" + ct + "][" + S + N + "]*|[" + S + N + "]+)", Ci = new RegExp("[^" + S + N + "]+.*$"), Pi = /[^\d\[\]]/, Si = /* @__PURE__ */ (function() {
|
|
2661
2661
|
function t(e) {
|
|
2662
2662
|
var r = e.defaultCountry, n = e.defaultCallingCode, d = e.metadata, i = e.onNationalSignificantNumberChange;
|
|
2663
2663
|
hi(this, t), this.defaultCountry = r, this.defaultCallingCode = n, this.metadata = d, this.onNationalSignificantNumberChange = i;
|
|
@@ -2665,7 +2665,7 @@ var vi = "[" + S + b + "]+", bi = new RegExp("^" + vi + "$", "i"), Ni = "(?:[" +
|
|
|
2665
2665
|
return gi(t, [{
|
|
2666
2666
|
key: "input",
|
|
2667
2667
|
value: function(r, n) {
|
|
2668
|
-
var d = wi(r), i = He(d, 2), a = i[0], o = i[1], u =
|
|
2668
|
+
var d = wi(r), i = He(d, 2), a = i[0], o = i[1], u = ut(a), $;
|
|
2669
2669
|
return o && (n.digits || (n.startInternationalNumber(), u || ($ = !0))), u && this.inputDigits(u, n), {
|
|
2670
2670
|
digits: u,
|
|
2671
2671
|
justLeadingPlus: $
|
|
@@ -2700,7 +2700,7 @@ var vi = "[" + S + b + "]+", bi = new RegExp("^" + vi + "$", "i"), Ni = "(?:[" +
|
|
|
2700
2700
|
}, {
|
|
2701
2701
|
key: "extractCountryCallingCode",
|
|
2702
2702
|
value: function(r) {
|
|
2703
|
-
var n =
|
|
2703
|
+
var n = Ot("+" + r.getDigitsWithoutInternationalPrefix(), this.defaultCountry, this.defaultCallingCode, this.metadata.metadata), d = n.countryCallingCode, i = n.number;
|
|
2704
2704
|
if (d)
|
|
2705
2705
|
return r.setCallingCode(d), r.update({
|
|
2706
2706
|
nationalSignificantNumber: i
|
|
@@ -2727,7 +2727,7 @@ var vi = "[" + S + b + "]+", bi = new RegExp("^" + vi + "$", "i"), Ni = "(?:[" +
|
|
|
2727
2727
|
key: "extractNationalSignificantNumber",
|
|
2728
2728
|
value: function(r, n) {
|
|
2729
2729
|
if (this.hasSelectedNumberingPlan) {
|
|
2730
|
-
var d =
|
|
2730
|
+
var d = Ct(r, this.metadata), i = d.nationalPrefix, a = d.nationalNumber, o = d.carrierCode;
|
|
2731
2731
|
if (a !== r)
|
|
2732
2732
|
return this.onExtractedNationalNumber(i, o, a, r, n), !0;
|
|
2733
2733
|
}
|
|
@@ -2743,7 +2743,7 @@ var vi = "[" + S + b + "]+", bi = new RegExp("^" + vi + "$", "i"), Ni = "(?:[" +
|
|
|
2743
2743
|
if (!this.hasExtractedNationalSignificantNumber)
|
|
2744
2744
|
return this.extractNationalSignificantNumber(r, d);
|
|
2745
2745
|
if (this.couldPossiblyExtractAnotherNationalSignificantNumber) {
|
|
2746
|
-
var i =
|
|
2746
|
+
var i = Ct(r, this.metadata), a = i.nationalPrefix, o = i.nationalNumber, u = i.carrierCode;
|
|
2747
2747
|
if (o !== n)
|
|
2748
2748
|
return this.onExtractedNationalNumber(a, u, o, r, d), !0;
|
|
2749
2749
|
}
|
|
@@ -2837,13 +2837,13 @@ function wi(t) {
|
|
|
2837
2837
|
var e = Ei(t), r = He(e, 2), n = r[0], d = r[1];
|
|
2838
2838
|
return bi.test(n) || (n = ""), [n, d];
|
|
2839
2839
|
}
|
|
2840
|
-
function
|
|
2840
|
+
function tt(t) {
|
|
2841
2841
|
"@babel/helpers - typeof";
|
|
2842
|
-
return
|
|
2842
|
+
return tt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2843
2843
|
return typeof e;
|
|
2844
2844
|
} : function(e) {
|
|
2845
2845
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2846
|
-
},
|
|
2846
|
+
}, tt(t);
|
|
2847
2847
|
}
|
|
2848
2848
|
function _i(t, e) {
|
|
2849
2849
|
return Oi(t) || Ii(t, e) || Fi(t, e) || Ai();
|
|
@@ -2899,21 +2899,21 @@ function Di(t, e, r) {
|
|
|
2899
2899
|
}
|
|
2900
2900
|
function Li(t) {
|
|
2901
2901
|
var e = Mi(t, "string");
|
|
2902
|
-
return
|
|
2902
|
+
return tt(e) == "symbol" ? e : e + "";
|
|
2903
2903
|
}
|
|
2904
2904
|
function Mi(t, e) {
|
|
2905
|
-
if (
|
|
2905
|
+
if (tt(t) != "object" || !t) return t;
|
|
2906
2906
|
var r = t[Symbol.toPrimitive];
|
|
2907
2907
|
if (r !== void 0) {
|
|
2908
2908
|
var n = r.call(t, e);
|
|
2909
|
-
if (
|
|
2909
|
+
if (tt(n) != "object") return n;
|
|
2910
2910
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2911
2911
|
}
|
|
2912
2912
|
return String(t);
|
|
2913
2913
|
}
|
|
2914
2914
|
var We = /* @__PURE__ */ (function() {
|
|
2915
2915
|
function t(e, r) {
|
|
2916
|
-
Ti(this, t), this.metadata = new
|
|
2916
|
+
Ti(this, t), this.metadata = new v(r);
|
|
2917
2917
|
var n = this.getCountryAndCallingCode(e), d = _i(n, 2), i = d[0], a = d[1];
|
|
2918
2918
|
this.defaultCountry = i, this.defaultCallingCode = a, this.reset();
|
|
2919
2919
|
}
|
|
@@ -3125,7 +3125,7 @@ var We = /* @__PURE__ */ (function() {
|
|
|
3125
3125
|
var r = this.state, n = r.nationalSignificantNumber, d = r.carrierCode, i = r.callingCode, a = this._getCountry();
|
|
3126
3126
|
if (n && !(!a && !i)) {
|
|
3127
3127
|
if (a && a === this.defaultCountry) {
|
|
3128
|
-
var o = new
|
|
3128
|
+
var o = new v(this.metadata.metadata);
|
|
3129
3129
|
o.selectNumberingPlan(a);
|
|
3130
3130
|
var u = o.numberingPlan.callingCode(), $ = this.metadata.getCountryCodesForCallingCode(u);
|
|
3131
3131
|
if ($.length > 1) {
|
|
@@ -3193,18 +3193,18 @@ var We = /* @__PURE__ */ (function() {
|
|
|
3193
3193
|
}
|
|
3194
3194
|
}]);
|
|
3195
3195
|
})();
|
|
3196
|
-
function
|
|
3196
|
+
function Nt() {
|
|
3197
3197
|
return we(bd, arguments);
|
|
3198
3198
|
}
|
|
3199
|
-
function
|
|
3199
|
+
function R(t) {
|
|
3200
3200
|
return We.call(this, t, Ee);
|
|
3201
3201
|
}
|
|
3202
|
-
|
|
3203
|
-
|
|
3202
|
+
R.prototype = Object.create(We.prototype, {});
|
|
3203
|
+
R.prototype.constructor = R;
|
|
3204
3204
|
function xe() {
|
|
3205
|
-
return we(
|
|
3205
|
+
return we(st, arguments);
|
|
3206
3206
|
}
|
|
3207
|
-
const
|
|
3207
|
+
const it = {
|
|
3208
3208
|
PE: { name: "Perú", flag: "🇵🇪" },
|
|
3209
3209
|
US: { name: "Estados Unidos", flag: "🇺🇸" },
|
|
3210
3210
|
MX: { name: "México", flag: "🇲🇽" },
|
|
@@ -3228,84 +3228,89 @@ const rt = {
|
|
|
3228
3228
|
onBlur: l,
|
|
3229
3229
|
error: h,
|
|
3230
3230
|
value: f,
|
|
3231
|
-
defaultCountry:
|
|
3232
|
-
disabled:
|
|
3231
|
+
defaultCountry: y = "PE",
|
|
3232
|
+
disabled: b = !1
|
|
3233
3233
|
}) => {
|
|
3234
|
-
const [
|
|
3235
|
-
code:
|
|
3236
|
-
name:
|
|
3237
|
-
flag:
|
|
3238
|
-
callingCode: `+${xe(
|
|
3239
|
-
}), [A,
|
|
3240
|
-
|
|
3241
|
-
const s = Object.keys(
|
|
3242
|
-
const
|
|
3234
|
+
const [p, C] = w({
|
|
3235
|
+
code: y,
|
|
3236
|
+
name: it[y].name,
|
|
3237
|
+
flag: it[y].flag,
|
|
3238
|
+
callingCode: `+${xe(y)}`
|
|
3239
|
+
}), [A, L] = w(!1), [et, M] = w(""), [Ve, F] = w(""), [Ke, j] = w(!1), [I, Xe] = w([]), [k, Rt] = w(""), [Ye, ht] = w([]), mt = gt(null), Dt = gt(null), Lt = gt(null), Ze = tr(), Mt = t || Ze, jt = f !== void 0;
|
|
3240
|
+
dt(() => {
|
|
3241
|
+
const s = Object.keys(it).map((g) => {
|
|
3242
|
+
const m = it[g];
|
|
3243
3243
|
return {
|
|
3244
|
-
code:
|
|
3245
|
-
name:
|
|
3246
|
-
flag:
|
|
3247
|
-
callingCode: `+${xe(
|
|
3244
|
+
code: g,
|
|
3245
|
+
name: m.name,
|
|
3246
|
+
flag: m.flag,
|
|
3247
|
+
callingCode: `+${xe(g)}`
|
|
3248
3248
|
};
|
|
3249
3249
|
});
|
|
3250
|
-
Xe(s),
|
|
3251
|
-
}, []),
|
|
3252
|
-
const s = (
|
|
3253
|
-
|
|
3250
|
+
Xe(s), ht(s);
|
|
3251
|
+
}, []), dt(() => {
|
|
3252
|
+
const s = (g) => {
|
|
3253
|
+
mt.current && !mt.current.contains(g.target) && L(!1);
|
|
3254
3254
|
};
|
|
3255
3255
|
return document.addEventListener("mousedown", s), () => document.removeEventListener("mousedown", s);
|
|
3256
|
-
}, []),
|
|
3257
|
-
if (
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
const y = f.replace(s.callingCode, "").replace(/[^\d]/g, "");
|
|
3262
|
-
st(y);
|
|
3263
|
-
const M = new T(s.code).input(y);
|
|
3264
|
-
tt(M);
|
|
3265
|
-
const I = bt(f);
|
|
3266
|
-
ft(I);
|
|
3267
|
-
}
|
|
3256
|
+
}, []), dt(() => {
|
|
3257
|
+
if (!jt || I.length === 0) return;
|
|
3258
|
+
if (f === "" || f == null) {
|
|
3259
|
+
M(""), F(""), j(!1);
|
|
3260
|
+
return;
|
|
3268
3261
|
}
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3262
|
+
const s = String(f);
|
|
3263
|
+
let g = I.find((m) => s.startsWith(m.callingCode));
|
|
3264
|
+
if (g || (g = p), g) {
|
|
3265
|
+
p.code !== g.code && C(g);
|
|
3266
|
+
const m = s.replace(g.callingCode, "").replace(/[^\d]/g, "");
|
|
3267
|
+
M(m);
|
|
3268
|
+
const O = new R(g.code).input(m);
|
|
3269
|
+
F(O);
|
|
3270
|
+
const nt = Nt(s);
|
|
3271
|
+
j(nt);
|
|
3272
|
+
} else
|
|
3273
|
+
M(""), F(""), j(!1);
|
|
3274
|
+
}, [f, I, jt, p]);
|
|
3275
|
+
const Je = (s, g) => {
|
|
3276
|
+
const m = s.replace(/[^\d]/g, "");
|
|
3277
|
+
if (g?.nativeEvent instanceof InputEvent && g.nativeEvent.inputType === "deleteContentBackward" && m.length < 4) {
|
|
3278
|
+
M(m), F(m);
|
|
3274
3279
|
return;
|
|
3275
3280
|
}
|
|
3276
|
-
const
|
|
3277
|
-
|
|
3278
|
-
const
|
|
3279
|
-
|
|
3281
|
+
const O = new R(p.code).input(m);
|
|
3282
|
+
M(m), F(O);
|
|
3283
|
+
const nt = p.callingCode + m, Ut = Nt(nt);
|
|
3284
|
+
j(Ut), u?.(nt, Ut);
|
|
3280
3285
|
}, Qe = (s) => {
|
|
3281
|
-
if (C(s),
|
|
3282
|
-
const
|
|
3283
|
-
|
|
3284
|
-
const
|
|
3285
|
-
|
|
3286
|
+
if (C(s), L(!1), Rt(""), et) {
|
|
3287
|
+
const m = new R(s.code).input(et);
|
|
3288
|
+
F(m);
|
|
3289
|
+
const rt = s.callingCode + et, O = Nt(rt);
|
|
3290
|
+
j(O), u?.(rt, O);
|
|
3286
3291
|
}
|
|
3287
|
-
o?.(s), setTimeout(() =>
|
|
3292
|
+
o?.(s), setTimeout(() => Dt.current?.focus(), 100);
|
|
3288
3293
|
}, qe = () => {
|
|
3289
|
-
|
|
3294
|
+
L(!A), A || setTimeout(() => Lt.current?.focus(), 100);
|
|
3290
3295
|
};
|
|
3291
|
-
|
|
3292
|
-
if (!
|
|
3293
|
-
|
|
3296
|
+
dt(() => {
|
|
3297
|
+
if (!k.trim())
|
|
3298
|
+
ht(I);
|
|
3294
3299
|
else {
|
|
3295
|
-
const s =
|
|
3296
|
-
(
|
|
3300
|
+
const s = k.toLowerCase(), g = I.filter(
|
|
3301
|
+
(m) => m.name.toLowerCase().includes(s) || m.callingCode.includes(k) || m.code.toLowerCase().includes(s)
|
|
3297
3302
|
);
|
|
3298
|
-
|
|
3303
|
+
ht(g);
|
|
3299
3304
|
}
|
|
3300
|
-
}, [
|
|
3301
|
-
const ze = $,
|
|
3302
|
-
return /* @__PURE__ */ c.jsxs("div", { className:
|
|
3305
|
+
}, [k, I]);
|
|
3306
|
+
const ze = $, kt = h, Gt = ze && kt, Bt = !b && !!h && $;
|
|
3307
|
+
return /* @__PURE__ */ c.jsxs("div", { className: G("w-full relative flex flex-col", a), children: [
|
|
3303
3308
|
r && /* @__PURE__ */ c.jsxs(
|
|
3304
3309
|
"label",
|
|
3305
3310
|
{
|
|
3306
|
-
htmlFor:
|
|
3311
|
+
htmlFor: Mt,
|
|
3307
3312
|
className: er("form-control-label block font-normal text-sm text-foreground mb-1", {
|
|
3308
|
-
"text-danger":
|
|
3313
|
+
"text-danger": Gt
|
|
3309
3314
|
}),
|
|
3310
3315
|
children: [
|
|
3311
3316
|
r,
|
|
@@ -3317,28 +3322,28 @@ const rt = {
|
|
|
3317
3322
|
/* @__PURE__ */ c.jsxs(
|
|
3318
3323
|
"div",
|
|
3319
3324
|
{
|
|
3320
|
-
className:
|
|
3325
|
+
className: G(
|
|
3321
3326
|
"flex w-full min-w-0 transition-[color,box-shadow] outline-none rounded-md h-input-default",
|
|
3322
3327
|
"bg-white border border-input",
|
|
3323
3328
|
"disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
3324
|
-
|
|
3329
|
+
Gt ? "border-danger aria-invalid:ring-danger/20" : "focus-within:border-primary focus-within:ring-primary/20",
|
|
3325
3330
|
"focus-within:ring-[3px]"
|
|
3326
3331
|
),
|
|
3327
|
-
"aria-invalid":
|
|
3332
|
+
"aria-invalid": Bt ? "true" : "false",
|
|
3328
3333
|
children: [
|
|
3329
|
-
/* @__PURE__ */ c.jsxs("div", { className: "relative", ref:
|
|
3334
|
+
/* @__PURE__ */ c.jsxs("div", { className: "relative", ref: mt, children: [
|
|
3330
3335
|
/* @__PURE__ */ c.jsxs(
|
|
3331
3336
|
"button",
|
|
3332
3337
|
{
|
|
3333
3338
|
type: "button",
|
|
3334
3339
|
onClick: qe,
|
|
3335
|
-
className:
|
|
3340
|
+
className: G(
|
|
3336
3341
|
"flex items-center gap-2 px-3 border-r border-input h-input-default",
|
|
3337
3342
|
"hover:bg-muted/20 focus:outline-none rounded-l-md"
|
|
3338
3343
|
),
|
|
3339
3344
|
children: [
|
|
3340
|
-
/* @__PURE__ */ c.jsx("span", { className: "text-lg", children:
|
|
3341
|
-
/* @__PURE__ */ c.jsx("span", { className: "text-sm font-medium text-foreground", children:
|
|
3345
|
+
/* @__PURE__ */ c.jsx("span", { className: "text-lg", children: p.flag }),
|
|
3346
|
+
/* @__PURE__ */ c.jsx("span", { className: "text-sm font-medium text-foreground", children: p.callingCode }),
|
|
3342
3347
|
/* @__PURE__ */ c.jsx(ir, { className: `w-4 h-4 text-muted-foreground transition-transform ${A ? "rotate-180" : ""}` })
|
|
3343
3348
|
]
|
|
3344
3349
|
}
|
|
@@ -3357,10 +3362,10 @@ const rt = {
|
|
|
3357
3362
|
/* @__PURE__ */ c.jsx(
|
|
3358
3363
|
"input",
|
|
3359
3364
|
{
|
|
3360
|
-
ref:
|
|
3365
|
+
ref: Lt,
|
|
3361
3366
|
type: "text",
|
|
3362
|
-
value:
|
|
3363
|
-
onChange: (s) =>
|
|
3367
|
+
value: k,
|
|
3368
|
+
onChange: (s) => Rt(s.target.value),
|
|
3364
3369
|
placeholder: "Buscar país o código",
|
|
3365
3370
|
className: "w-full pl-10 pr-3 py-2 h-9 border border-input rounded-md text-sm focus:outline-none focus:border-primary focus:ring-[3px] focus:ring-primary/20"
|
|
3366
3371
|
}
|
|
@@ -3371,15 +3376,15 @@ const rt = {
|
|
|
3371
3376
|
{
|
|
3372
3377
|
type: "button",
|
|
3373
3378
|
onClick: () => Qe(s),
|
|
3374
|
-
className:
|
|
3379
|
+
className: G(
|
|
3375
3380
|
"w-full flex items-center gap-3 px-3 py-1 text-sm transition",
|
|
3376
|
-
|
|
3381
|
+
p.code === s.code ? "bg-primary/5 border-l-2 border-primary" : "hover:bg-muted/20"
|
|
3377
3382
|
),
|
|
3378
3383
|
children: [
|
|
3379
3384
|
/* @__PURE__ */ c.jsx("span", { className: "text-lg", children: s.flag }),
|
|
3380
3385
|
/* @__PURE__ */ c.jsx("span", { className: "flex-1 text-left", children: s.name }),
|
|
3381
3386
|
/* @__PURE__ */ c.jsx("span", { className: "text-muted-foreground", children: s.callingCode }),
|
|
3382
|
-
|
|
3387
|
+
p.code === s.code && /* @__PURE__ */ c.jsx(ar, { className: "w-4 h-4 text-primary" })
|
|
3383
3388
|
]
|
|
3384
3389
|
},
|
|
3385
3390
|
s.code
|
|
@@ -3392,17 +3397,17 @@ const rt = {
|
|
|
3392
3397
|
/* @__PURE__ */ c.jsx(
|
|
3393
3398
|
"input",
|
|
3394
3399
|
{
|
|
3395
|
-
ref:
|
|
3396
|
-
id:
|
|
3400
|
+
ref: Dt,
|
|
3401
|
+
id: Mt,
|
|
3397
3402
|
type: "tel",
|
|
3398
3403
|
name: e,
|
|
3399
3404
|
value: Ve,
|
|
3400
3405
|
onChange: (s) => Je(s.target.value, s),
|
|
3401
3406
|
onBlur: l,
|
|
3402
3407
|
placeholder: n,
|
|
3403
|
-
disabled:
|
|
3404
|
-
...
|
|
3405
|
-
className:
|
|
3408
|
+
disabled: b,
|
|
3409
|
+
...b ? {} : { "aria-invalid": Bt },
|
|
3410
|
+
className: G(
|
|
3406
3411
|
"flex-1 px-3 py-1 h-input-default border-0 rounded-r-md bg-transparent focus:outline-none text-foreground text-sm",
|
|
3407
3412
|
i
|
|
3408
3413
|
),
|
|
@@ -3412,7 +3417,7 @@ const rt = {
|
|
|
3412
3417
|
]
|
|
3413
3418
|
}
|
|
3414
3419
|
),
|
|
3415
|
-
!
|
|
3420
|
+
!b && h && $ && /* @__PURE__ */ c.jsx(rr, { text: h || kt || "" })
|
|
3416
3421
|
] });
|
|
3417
3422
|
};
|
|
3418
3423
|
export {
|