@quidgest/ui 0.18.0 → 0.20.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/CHANGELOG.md +89 -0
- package/dist/json/api.json +1328 -215
- package/dist/manifest/components.json +3 -1
- package/dist/ui.css +1448 -185
- package/dist/ui.esm.js +1448 -825
- package/dist/ui.js +1411 -788
- package/dist/ui.min.css +2 -1
- package/dist/ui.min.js +1411 -788
- package/dist/ui.scss +597 -157
- package/esm/components/QField/QField.d.ts.map +1 -1
- package/esm/components/QField/QField.vue.js +1 -1
- package/esm/components/QGrid/QCol.vue.js +1 -1
- package/esm/components/QInputGroup/QInputGroup.d.ts +147 -3
- package/esm/components/QInputGroup/QInputGroup.d.ts.map +1 -1
- package/esm/components/QInputGroup/QInputGroup.vue.js +32 -23
- package/esm/components/QInputGroup/index.d.ts +81 -4
- package/esm/components/QInputGroup/index.d.ts.map +1 -1
- package/esm/components/QList/QList.d.ts.map +1 -1
- package/esm/components/QList/QList.vue.js +3 -1
- package/esm/components/QList/QListItem.d.ts.map +1 -1
- package/esm/components/QList/QListItem.vue.js +24 -28
- package/esm/components/QList/types.d.ts +1 -1
- package/esm/components/QOverlay/types.d.ts +3 -1
- package/esm/components/QOverlay/types.d.ts.map +1 -1
- package/esm/components/QPhoneField/QPhoneField.d.ts +2263 -0
- package/esm/components/QPhoneField/QPhoneField.d.ts.map +1 -0
- package/esm/components/QPhoneField/QPhoneField.vue.js +478 -0
- package/esm/components/QPhoneField/QPhoneField2.vue.js +5 -0
- package/esm/components/QPhoneField/constants.d.ts +11 -0
- package/esm/components/QPhoneField/constants.d.ts.map +1 -0
- package/esm/components/QPhoneField/constants.js +14 -0
- package/esm/components/QPhoneField/index.d.ts +1253 -0
- package/esm/components/QPhoneField/index.d.ts.map +1 -0
- package/esm/components/QPhoneField/index.js +6 -0
- package/esm/components/QPhoneField/types.d.ts +108 -0
- package/esm/components/QPhoneField/types.d.ts.map +1 -0
- package/esm/components/{QGroupBox/QGroupBox.d.ts → QSection/QSection.d.ts} +4 -4
- package/esm/components/QSection/QSection.d.ts.map +1 -0
- package/esm/components/{QGroupBox/QGroupBox.vue.js → QSection/QSection.vue.js} +8 -8
- package/esm/components/QSection/QSection2.vue.js +5 -0
- package/esm/components/{QGroupBox → QSection}/index.d.ts +8 -8
- package/esm/components/QSection/index.d.ts.map +1 -0
- package/esm/components/QSection/index.js +6 -0
- package/esm/components/QSection/types.d.ts +32 -0
- package/esm/components/QSection/types.d.ts.map +1 -0
- package/esm/components/QSelect/QSelect.d.ts +16 -1
- package/esm/components/QSelect/QSelect.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.vue.js +158 -129
- package/esm/components/QSelect/index.d.ts +31 -3
- package/esm/components/QSelect/index.d.ts.map +1 -1
- package/esm/components/QSelect/types.d.ts +13 -0
- package/esm/components/QSelect/types.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebar.d.ts +53 -6
- package/esm/components/QSidebar/QSidebar.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebar.vue.js +76 -106
- package/esm/components/QSidebar/QSidebarAnchor.d.ts +24 -210
- package/esm/components/QSidebar/QSidebarAnchor.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebarAnchor.vue.js +47 -59
- package/esm/components/QSidebar/QSidebarItem.d.ts +213 -0
- package/esm/components/QSidebar/QSidebarItem.d.ts.map +1 -0
- package/esm/components/QSidebar/QSidebarItem.vue.js +130 -0
- package/esm/components/QSidebar/QSidebarItem2.vue.js +5 -0
- package/esm/components/QSidebar/QSidebarPanel.d.ts +1 -7
- package/esm/components/QSidebar/QSidebarPanel.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebarPanel.vue.js +4 -10
- package/esm/components/QSidebar/context.d.ts +108 -0
- package/esm/components/QSidebar/context.d.ts.map +1 -0
- package/esm/components/QSidebar/context.js +4 -0
- package/esm/components/QSidebar/index.d.ts +166 -8
- package/esm/components/QSidebar/index.d.ts.map +1 -1
- package/esm/components/QSidebar/index.js +3 -2
- package/esm/components/QSidebar/types.d.ts +77 -42
- package/esm/components/QSidebar/types.d.ts.map +1 -1
- package/esm/components/QTabs/QTab.d.ts +1 -0
- package/esm/components/QTabs/QTab.d.ts.map +1 -1
- package/esm/components/QTabs/QTab.vue.js +2 -1
- package/esm/components/QTabs/QTabs.d.ts +2 -0
- package/esm/components/QTabs/QTabs.d.ts.map +1 -1
- package/esm/components/QTabs/QTabs.vue.js +125 -46
- package/esm/components/QTabs/context.d.ts +10 -3
- package/esm/components/QTabs/context.d.ts.map +1 -1
- package/esm/components/QTabs/index.d.ts +2 -0
- package/esm/components/QTabs/index.d.ts.map +1 -1
- package/esm/components/QTabs/types.d.ts +3 -1
- package/esm/components/QTabs/types.d.ts.map +1 -1
- package/esm/components/index.d.ts +2 -1
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +48 -45
- package/esm/composables/useDialog/index.d.ts +2 -88
- package/esm/composables/useDialog/index.d.ts.map +1 -1
- package/esm/composables/useDialog/index.js +6 -6
- package/esm/composables/useDialog/types.d.ts +14 -4
- package/esm/composables/useDialog/types.d.ts.map +1 -1
- package/esm/index.d.ts +3 -1
- package/esm/vendors/country-flag-icons/modules/countries.json.js +4 -0
- package/esm/vendors/country-flag-icons/modules/hasFlag.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouType.js +312 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.js +142 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.PatternParser.js +145 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.complete.js +45 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.js +258 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.util.js +57 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeParser.js +242 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeState.js +115 -0
- package/esm/vendors/libphonenumber-js/es6/ParseError.js +116 -0
- package/esm/vendors/libphonenumber-js/es6/PhoneNumber.js +164 -0
- package/esm/vendors/libphonenumber-js/es6/constants.js +4 -0
- package/esm/vendors/libphonenumber-js/es6/format.js +77 -0
- package/esm/vendors/libphonenumber-js/es6/formatIncompletePhoneNumber.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/getCountries.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/getExampleNumber.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/RFC3966.js +9 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/checkNumberLength.js +21 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js +11 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extension/extractExtension.js +16 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +36 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +21 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +18 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extractNationalNumber.js +27 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +27 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extractPhoneContext.js +15 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +11 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/getCountryAndCallingCodeFromOneOfThem.js +13 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +12 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +43 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/getIddPrefix.js +10 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/getNumberType.js +61 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js +14 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/isCallingCode.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/isCountryCode.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/isObject.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/isViablePhoneNumber.js +12 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/matchesEntirely.js +6 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/mergeArrays.js +39 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/parseDigits.js +82 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/stripIddPrefix.js +18 -0
- package/esm/vendors/libphonenumber-js/es6/isPossible.js +32 -0
- package/esm/vendors/libphonenumber-js/es6/isValid.js +11 -0
- package/esm/vendors/libphonenumber-js/es6/metadata.js +474 -0
- package/esm/vendors/libphonenumber-js/es6/normalizeArguments.js +110 -0
- package/esm/vendors/libphonenumber-js/es6/parse.js +103 -0
- package/esm/vendors/libphonenumber-js/es6/parseIncompletePhoneNumber.js +48 -0
- package/esm/vendors/libphonenumber-js/es6/parsePhoneNumber.js +9 -0
- package/esm/vendors/libphonenumber-js/es6/parsePhoneNumberWithError_.js +58 -0
- package/esm/vendors/libphonenumber-js/es6/parsePhoneNumber_.js +66 -0
- package/esm/vendors/libphonenumber-js/es6/tools/semver-compare.js +14 -0
- package/esm/vendors/libphonenumber-js/examples.mobile.json.js +250 -0
- package/esm/vendors/libphonenumber-js/max/exports/AsYouType.js +9 -0
- package/esm/vendors/libphonenumber-js/max/exports/formatIncompletePhoneNumber.js +8 -0
- package/esm/vendors/libphonenumber-js/max/exports/getCountries.js +8 -0
- package/esm/vendors/libphonenumber-js/max/exports/getCountryCallingCode.js +8 -0
- package/esm/vendors/libphonenumber-js/max/exports/getExampleNumber.js +8 -0
- package/esm/vendors/libphonenumber-js/max/exports/isSupportedCountry.js +8 -0
- package/esm/vendors/libphonenumber-js/max/exports/parsePhoneNumber.js +8 -0
- package/esm/vendors/libphonenumber-js/max/exports/withMetadataArgument.js +8 -0
- package/esm/vendors/libphonenumber-js/metadata.max.json.js +10489 -0
- package/package.json +9 -6
- package/esm/components/QGroupBox/QGroupBox.d.ts.map +0 -1
- package/esm/components/QGroupBox/QGroupBox2.vue.js +0 -5
- package/esm/components/QGroupBox/index.d.ts.map +0 -1
- package/esm/components/QGroupBox/index.js +0 -6
- package/esm/components/QGroupBox/types.d.ts +0 -32
- package/esm/components/QGroupBox/types.d.ts.map +0 -1
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import e from "./helpers/isObject.js";
|
|
2
|
+
import t from "./metadata.js";
|
|
3
|
+
import n from "./helpers/checkNumberLength.js";
|
|
4
|
+
import r from "./helpers/getCountryByNationalNumber.js";
|
|
5
|
+
import i from "./helpers/getCountryByCallingCode.js";
|
|
6
|
+
import a from "./PhoneNumber.js";
|
|
7
|
+
import o from "./AsYouTypeState.js";
|
|
8
|
+
import s from "./AsYouTypeFormatter.js";
|
|
9
|
+
import c from "./AsYouTypeParser.js";
|
|
10
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/AsYouType.js
|
|
11
|
+
function l(e) {
|
|
12
|
+
"@babel/helpers - typeof";
|
|
13
|
+
return l = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
14
|
+
return typeof e;
|
|
15
|
+
} : function(e) {
|
|
16
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
17
|
+
}, l(e);
|
|
18
|
+
}
|
|
19
|
+
function u(e, t) {
|
|
20
|
+
return h(e) || m(e, t) || f(e, t) || d();
|
|
21
|
+
}
|
|
22
|
+
function d() {
|
|
23
|
+
throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
24
|
+
}
|
|
25
|
+
function f(e, t) {
|
|
26
|
+
if (e) {
|
|
27
|
+
if (typeof e == "string") return p(e, t);
|
|
28
|
+
var n = {}.toString.call(e).slice(8, -1);
|
|
29
|
+
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? p(e, t) : void 0;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function p(e, t) {
|
|
33
|
+
(t == null || t > e.length) && (t = e.length);
|
|
34
|
+
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
35
|
+
return r;
|
|
36
|
+
}
|
|
37
|
+
function m(e, t) {
|
|
38
|
+
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
39
|
+
if (n != null) {
|
|
40
|
+
var r, i, a, o, s = [], c = !0, l = !1;
|
|
41
|
+
try {
|
|
42
|
+
if (a = (n = n.call(e)).next, t === 0) {
|
|
43
|
+
if (Object(n) !== n) return;
|
|
44
|
+
c = !1;
|
|
45
|
+
} else for (; !(c = (r = a.call(n)).done) && (s.push(r.value), s.length !== t); c = !0);
|
|
46
|
+
} catch (e) {
|
|
47
|
+
l = !0, i = e;
|
|
48
|
+
} finally {
|
|
49
|
+
try {
|
|
50
|
+
if (!c && n.return != null && (o = n.return(), Object(o) !== o)) return;
|
|
51
|
+
} finally {
|
|
52
|
+
if (l) throw i;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return s;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function h(e) {
|
|
59
|
+
if (Array.isArray(e)) return e;
|
|
60
|
+
}
|
|
61
|
+
function g(e, t) {
|
|
62
|
+
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
63
|
+
}
|
|
64
|
+
function _(e, t) {
|
|
65
|
+
for (var n = 0; n < t.length; n++) {
|
|
66
|
+
var r = t[n];
|
|
67
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, y(r.key), r);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function v(e, t, n) {
|
|
71
|
+
return t && _(e.prototype, t), n && _(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
72
|
+
}
|
|
73
|
+
function y(e) {
|
|
74
|
+
var t = b(e, "string");
|
|
75
|
+
return l(t) == "symbol" ? t : t + "";
|
|
76
|
+
}
|
|
77
|
+
function b(e, t) {
|
|
78
|
+
if (l(e) != "object" || !e) return e;
|
|
79
|
+
var n = e[Symbol.toPrimitive];
|
|
80
|
+
if (n !== void 0) {
|
|
81
|
+
var r = n.call(e, t || "default");
|
|
82
|
+
if (l(r) != "object") return r;
|
|
83
|
+
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
84
|
+
}
|
|
85
|
+
return (t === "string" ? String : Number)(e);
|
|
86
|
+
}
|
|
87
|
+
var x = !1, S = /*#__PURE__*/ function() {
|
|
88
|
+
function r(e, n) {
|
|
89
|
+
g(this, r), this.metadata = new t(n);
|
|
90
|
+
var i = u(this.getCountryAndCallingCode(e), 2), a = i[0], o = i[1];
|
|
91
|
+
this.defaultCountry = a, this.defaultCallingCode = o, this.reset();
|
|
92
|
+
}
|
|
93
|
+
return v(r, [
|
|
94
|
+
{
|
|
95
|
+
key: "getCountryAndCallingCode",
|
|
96
|
+
value: function(t) {
|
|
97
|
+
var n, r;
|
|
98
|
+
return t && (e(t) ? (n = t.defaultCountry, r = t.defaultCallingCode) : n = t), n && !this.metadata.hasCountry(n) && (n = void 0), r && x && this.metadata.isNonGeographicCallingCode(r) && (n = "001"), [n, r];
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
key: "input",
|
|
103
|
+
value: function(e) {
|
|
104
|
+
var t = this.parser.input(e, this.state), n = t.digits;
|
|
105
|
+
if (t.justLeadingPlus) this.formattedOutput = "+";
|
|
106
|
+
else if (n) {
|
|
107
|
+
this.determineTheCountryIfNeeded(), this.state.nationalSignificantNumber && this.formatter.narrowDownMatchingFormats(this.state);
|
|
108
|
+
var r;
|
|
109
|
+
if (this.metadata.hasSelectedNumberingPlan() && (r = this.formatter.format(n, this.state)), r === void 0 && this.parser.reExtractNationalSignificantNumber(this.state)) {
|
|
110
|
+
this.determineTheCountryIfNeeded();
|
|
111
|
+
var i = this.state.getNationalDigits();
|
|
112
|
+
i && (r = this.formatter.format(i, this.state));
|
|
113
|
+
}
|
|
114
|
+
this.formattedOutput = r ? this.getFullNumber(r) : this.getNonFormattedNumber();
|
|
115
|
+
}
|
|
116
|
+
return this.formattedOutput;
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
key: "reset",
|
|
121
|
+
value: function() {
|
|
122
|
+
var e = this;
|
|
123
|
+
return this.state = new o({
|
|
124
|
+
onCountryChange: function(t) {
|
|
125
|
+
e.country = t;
|
|
126
|
+
},
|
|
127
|
+
onCallingCodeChange: function(t, n) {
|
|
128
|
+
e.metadata.selectNumberingPlan(n || t), e.formatter.reset(e.metadata.numberingPlan, e.state), e.parser.reset(e.metadata.numberingPlan);
|
|
129
|
+
}
|
|
130
|
+
}), this.formatter = new s({
|
|
131
|
+
state: this.state,
|
|
132
|
+
metadata: this.metadata
|
|
133
|
+
}), this.parser = new c({
|
|
134
|
+
defaultCountry: this.defaultCountry,
|
|
135
|
+
defaultCallingCode: this.defaultCallingCode,
|
|
136
|
+
metadata: this.metadata,
|
|
137
|
+
state: this.state,
|
|
138
|
+
onNationalSignificantNumberChange: function() {
|
|
139
|
+
e.determineTheCountryIfNeeded(), e.formatter.reset(e.metadata.numberingPlan, e.state);
|
|
140
|
+
}
|
|
141
|
+
}), this.state.reset({
|
|
142
|
+
country: this.defaultCountry,
|
|
143
|
+
callingCode: this.defaultCallingCode
|
|
144
|
+
}), this.formattedOutput = "", this;
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
key: "isInternational",
|
|
149
|
+
value: function() {
|
|
150
|
+
return this.state.international;
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
key: "getCallingCode",
|
|
155
|
+
value: function() {
|
|
156
|
+
if (this.isInternational()) return this.state.callingCode;
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
key: "getCountryCallingCode",
|
|
161
|
+
value: function() {
|
|
162
|
+
return this.getCallingCode();
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
key: "getCountry",
|
|
167
|
+
value: function() {
|
|
168
|
+
if (this.state.digits) return this._getCountry();
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
key: "_getCountry",
|
|
173
|
+
value: function() {
|
|
174
|
+
var e = this.state.country;
|
|
175
|
+
if (!(x && e === "001")) return e;
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
key: "determineTheCountryIfNeeded",
|
|
180
|
+
value: function() {
|
|
181
|
+
(!this.state.country || this.isCountryCallingCodeAmbiguous()) && this.determineTheCountry();
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
key: "getFullNumber",
|
|
186
|
+
value: function(e) {
|
|
187
|
+
var t = this;
|
|
188
|
+
if (this.isInternational()) {
|
|
189
|
+
var n = function(e) {
|
|
190
|
+
return t.formatter.getInternationalPrefixBeforeCountryCallingCode(t.state, { spacing: !!e }) + e;
|
|
191
|
+
}, r = this.state.callingCode;
|
|
192
|
+
return n(r ? e ? `${r} ${e}` : r : `${this.state.getDigitsWithoutInternationalPrefix()}`);
|
|
193
|
+
}
|
|
194
|
+
return e;
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
key: "getNonFormattedNationalNumberWithPrefix",
|
|
199
|
+
value: function() {
|
|
200
|
+
var e = this.state, t = e.nationalSignificantNumber, n = e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix, r = e.nationalPrefix, i = t, a = n || r;
|
|
201
|
+
return a && (i = a + i), i;
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
key: "getNonFormattedNumber",
|
|
206
|
+
value: function() {
|
|
207
|
+
var e = this.state.nationalSignificantNumberIsModified;
|
|
208
|
+
return this.getFullNumber(e ? this.state.getNationalDigits() : this.getNonFormattedNationalNumberWithPrefix());
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
key: "getNonFormattedTemplate",
|
|
213
|
+
value: function() {
|
|
214
|
+
var e = this.getNonFormattedNumber();
|
|
215
|
+
if (e) return e.replace(/[\+\d]/g, "x");
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
key: "isCountryCallingCodeAmbiguous",
|
|
220
|
+
value: function() {
|
|
221
|
+
var e = this.state.callingCode, t = this.metadata.getCountryCodesForCallingCode(e);
|
|
222
|
+
return t && t.length > 1;
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
key: "determineTheCountry",
|
|
227
|
+
value: function() {
|
|
228
|
+
var e = i(this.isInternational() ? this.state.callingCode : this.defaultCallingCode, {
|
|
229
|
+
nationalNumber: this.state.nationalSignificantNumber,
|
|
230
|
+
metadata: this.metadata
|
|
231
|
+
});
|
|
232
|
+
e !== this.state.country && (this.state.setCountry(e), e && this.metadata.selectNumberingPlan(e));
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
key: "getNumberValue",
|
|
237
|
+
value: function() {
|
|
238
|
+
var e = this.state, t = e.digits, n = e.callingCode, r = e.country, i = e.nationalSignificantNumber;
|
|
239
|
+
if (t) {
|
|
240
|
+
if (this.isInternational()) return n ? "+" + n + i : "+" + t;
|
|
241
|
+
if (r || n) return "+" + (r ? this.metadata.countryCallingCode() : n) + i;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
key: "getNumber",
|
|
247
|
+
value: function() {
|
|
248
|
+
var e = this.state, t = e.nationalSignificantNumber, n = e.carrierCode, r = e.callingCode;
|
|
249
|
+
if (t) {
|
|
250
|
+
var i = this._getCountry();
|
|
251
|
+
if (!(!i && !r)) {
|
|
252
|
+
if (i && i === this.defaultCountry) {
|
|
253
|
+
var o = C(this.metadata.numberingPlan.callingCode(), t, this.metadata);
|
|
254
|
+
o && (i = o);
|
|
255
|
+
}
|
|
256
|
+
var s = new a(i || r, t, this.metadata.metadata);
|
|
257
|
+
return n && (s.carrierCode = n), s;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
key: "isPossible",
|
|
264
|
+
value: function() {
|
|
265
|
+
var e = this.getNumber();
|
|
266
|
+
return e ? e.isPossible() : !1;
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
key: "isValid",
|
|
271
|
+
value: function() {
|
|
272
|
+
var e = this.getNumber();
|
|
273
|
+
return e ? e.isValid() : !1;
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
key: "validateLength",
|
|
278
|
+
value: function() {
|
|
279
|
+
var e = this.state, t = e.digits, r = e.nationalSignificantNumber;
|
|
280
|
+
if (!t) return "NOT_A_NUMBER";
|
|
281
|
+
if (!this.metadata.numberingPlan) return "INVALID_COUNTRY";
|
|
282
|
+
if (!r) return "TOO_SHORT";
|
|
283
|
+
var i = n(r, void 0, this.metadata);
|
|
284
|
+
if (i !== "IS_POSSIBLE") return i;
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
key: "getNationalNumber",
|
|
289
|
+
value: function() {
|
|
290
|
+
return this.state.nationalSignificantNumber;
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
key: "getChars",
|
|
295
|
+
value: function() {
|
|
296
|
+
return (this.state.international ? "+" : "") + this.state.digits;
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
key: "getTemplate",
|
|
301
|
+
value: function() {
|
|
302
|
+
return this.formatter.getTemplate(this.state) || this.getNonFormattedTemplate() || "";
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
]);
|
|
306
|
+
}();
|
|
307
|
+
function C(e, t, n) {
|
|
308
|
+
var i = n.getCountryCodesForCallingCode(e);
|
|
309
|
+
if (i.length > 1) return r(t, i, n.metadata);
|
|
310
|
+
}
|
|
311
|
+
//#endregion
|
|
312
|
+
export { S as default };
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import e from "./AsYouTypeFormatter.PatternParser.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.js
|
|
3
|
+
function t(e, t) {
|
|
4
|
+
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
5
|
+
if (r) return (r = r.call(e)).next.bind(r);
|
|
6
|
+
if (Array.isArray(e) || (r = n(e)) || t && e && typeof e.length == "number") {
|
|
7
|
+
r && (e = r);
|
|
8
|
+
var i = 0;
|
|
9
|
+
return function() {
|
|
10
|
+
return i >= e.length ? { done: !0 } : {
|
|
11
|
+
done: !1,
|
|
12
|
+
value: e[i++]
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
17
|
+
}
|
|
18
|
+
function n(e, t) {
|
|
19
|
+
if (e) {
|
|
20
|
+
if (typeof e == "string") return r(e, t);
|
|
21
|
+
var n = {}.toString.call(e).slice(8, -1);
|
|
22
|
+
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? r(e, t) : void 0;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function r(e, t) {
|
|
26
|
+
(t == null || t > e.length) && (t = e.length);
|
|
27
|
+
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
28
|
+
return r;
|
|
29
|
+
}
|
|
30
|
+
function i(e) {
|
|
31
|
+
"@babel/helpers - typeof";
|
|
32
|
+
return i = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
33
|
+
return typeof e;
|
|
34
|
+
} : function(e) {
|
|
35
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
36
|
+
}, i(e);
|
|
37
|
+
}
|
|
38
|
+
function a(e, t) {
|
|
39
|
+
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
40
|
+
}
|
|
41
|
+
function o(e, t) {
|
|
42
|
+
for (var n = 0; n < t.length; n++) {
|
|
43
|
+
var r = t[n];
|
|
44
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, c(r.key), r);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function s(e, t, n) {
|
|
48
|
+
return t && o(e.prototype, t), n && o(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
49
|
+
}
|
|
50
|
+
function c(e) {
|
|
51
|
+
var t = l(e, "string");
|
|
52
|
+
return i(t) == "symbol" ? t : t + "";
|
|
53
|
+
}
|
|
54
|
+
function l(e, t) {
|
|
55
|
+
if (i(e) != "object" || !e) return e;
|
|
56
|
+
var n = e[Symbol.toPrimitive];
|
|
57
|
+
if (n !== void 0) {
|
|
58
|
+
var r = n.call(e, t || "default");
|
|
59
|
+
if (i(r) != "object") return r;
|
|
60
|
+
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
61
|
+
}
|
|
62
|
+
return (t === "string" ? String : Number)(e);
|
|
63
|
+
}
|
|
64
|
+
var u = /*#__PURE__*/ function() {
|
|
65
|
+
function t(n) {
|
|
66
|
+
a(this, t), this.matchTree = new e().parse(n);
|
|
67
|
+
}
|
|
68
|
+
return s(t, [{
|
|
69
|
+
key: "match",
|
|
70
|
+
value: function(e) {
|
|
71
|
+
var t = (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}).allowOverflow;
|
|
72
|
+
if (!e) throw Error("String is required");
|
|
73
|
+
var n = d(e.split(""), this.matchTree, !0);
|
|
74
|
+
if (n && n.match && delete n.matchedChars, !(n && n.overflow && !t)) return n;
|
|
75
|
+
}
|
|
76
|
+
}]);
|
|
77
|
+
}();
|
|
78
|
+
function d(e, n, r) {
|
|
79
|
+
if (typeof n == "string") {
|
|
80
|
+
var i = e.join("");
|
|
81
|
+
return n.indexOf(i) === 0 ? e.length === n.length ? {
|
|
82
|
+
match: !0,
|
|
83
|
+
matchedChars: e
|
|
84
|
+
} : { partialMatch: !0 } : i.indexOf(n) === 0 ? r && e.length > n.length ? { overflow: !0 } : {
|
|
85
|
+
match: !0,
|
|
86
|
+
matchedChars: e.slice(0, n.length)
|
|
87
|
+
} : void 0;
|
|
88
|
+
}
|
|
89
|
+
if (Array.isArray(n)) {
|
|
90
|
+
for (var a = e.slice(), o = 0; o < n.length;) {
|
|
91
|
+
var s = n[o], c = d(a, s, r && o === n.length - 1);
|
|
92
|
+
if (!c) return;
|
|
93
|
+
if (c.overflow) return c;
|
|
94
|
+
if (c.match) {
|
|
95
|
+
if (a = a.slice(c.matchedChars.length), a.length === 0) return o === n.length - 1 ? {
|
|
96
|
+
match: !0,
|
|
97
|
+
matchedChars: e
|
|
98
|
+
} : { partialMatch: !0 };
|
|
99
|
+
} else if (c.partialMatch) return { partialMatch: !0 };
|
|
100
|
+
else throw Error(`Unsupported match result:
|
|
101
|
+
${JSON.stringify(c, null, 2)}`);
|
|
102
|
+
o++;
|
|
103
|
+
}
|
|
104
|
+
return r ? { overflow: !0 } : {
|
|
105
|
+
match: !0,
|
|
106
|
+
matchedChars: e.slice(0, e.length - a.length)
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
switch (n.op) {
|
|
110
|
+
case "|":
|
|
111
|
+
for (var l, u = t(n.args), f; !(f = u()).done;) {
|
|
112
|
+
var p = f.value, m = d(e, p, r);
|
|
113
|
+
if (m) {
|
|
114
|
+
if (m.overflow) return m;
|
|
115
|
+
if (m.match) return {
|
|
116
|
+
match: !0,
|
|
117
|
+
matchedChars: m.matchedChars
|
|
118
|
+
};
|
|
119
|
+
if (m.partialMatch) l = !0;
|
|
120
|
+
else throw Error(`Unsupported match result:
|
|
121
|
+
${JSON.stringify(m, null, 2)}`);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return l ? { partialMatch: !0 } : void 0;
|
|
125
|
+
case "[]":
|
|
126
|
+
for (var h = t(n.args), g; !(g = h()).done;) {
|
|
127
|
+
var _ = g.value;
|
|
128
|
+
if (e[0] === _) return e.length === 1 ? {
|
|
129
|
+
match: !0,
|
|
130
|
+
matchedChars: e
|
|
131
|
+
} : r ? { overflow: !0 } : {
|
|
132
|
+
match: !0,
|
|
133
|
+
matchedChars: [_]
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
return;
|
|
137
|
+
/* istanbul ignore next */
|
|
138
|
+
default: throw Error(`Unsupported instruction tree: ${n}`);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
//#endregion
|
|
142
|
+
export { u as default };
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternParser.js
|
|
2
|
+
function e(t) {
|
|
3
|
+
"@babel/helpers - typeof";
|
|
4
|
+
return e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
5
|
+
return typeof e;
|
|
6
|
+
} : function(e) {
|
|
7
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
8
|
+
}, e(t);
|
|
9
|
+
}
|
|
10
|
+
function t(e, t) {
|
|
11
|
+
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
12
|
+
}
|
|
13
|
+
function n(e, t) {
|
|
14
|
+
for (var n = 0; n < t.length; n++) {
|
|
15
|
+
var r = t[n];
|
|
16
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, i(r.key), r);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function r(e, t, r) {
|
|
20
|
+
return t && n(e.prototype, t), r && n(e, r), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
21
|
+
}
|
|
22
|
+
function i(t) {
|
|
23
|
+
var n = a(t, "string");
|
|
24
|
+
return e(n) == "symbol" ? n : n + "";
|
|
25
|
+
}
|
|
26
|
+
function a(t, n) {
|
|
27
|
+
if (e(t) != "object" || !t) return t;
|
|
28
|
+
var r = t[Symbol.toPrimitive];
|
|
29
|
+
if (r !== void 0) {
|
|
30
|
+
var i = r.call(t, n || "default");
|
|
31
|
+
if (e(i) != "object") return i;
|
|
32
|
+
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
33
|
+
}
|
|
34
|
+
return (n === "string" ? String : Number)(t);
|
|
35
|
+
}
|
|
36
|
+
var o = /*#__PURE__*/ function() {
|
|
37
|
+
function e() {
|
|
38
|
+
t(this, e);
|
|
39
|
+
}
|
|
40
|
+
return r(e, [
|
|
41
|
+
{
|
|
42
|
+
key: "parse",
|
|
43
|
+
value: function(e) {
|
|
44
|
+
if (this.context = [{
|
|
45
|
+
or: !0,
|
|
46
|
+
instructions: []
|
|
47
|
+
}], this.parsePattern(e), this.context.length !== 1) throw Error("Non-finalized contexts left when pattern parse ended");
|
|
48
|
+
var t = this.context[0], n = t.branches, r = t.instructions;
|
|
49
|
+
if (n) return {
|
|
50
|
+
op: "|",
|
|
51
|
+
args: n.concat([u(r)])
|
|
52
|
+
};
|
|
53
|
+
/* istanbul ignore if */
|
|
54
|
+
if (r.length === 0) throw Error("Pattern is required");
|
|
55
|
+
return r.length === 1 ? r[0] : r;
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
key: "startContext",
|
|
60
|
+
value: function(e) {
|
|
61
|
+
this.context.push(e);
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
key: "endContext",
|
|
66
|
+
value: function() {
|
|
67
|
+
this.context.pop();
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
key: "getContext",
|
|
72
|
+
value: function() {
|
|
73
|
+
return this.context[this.context.length - 1];
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
key: "parsePattern",
|
|
78
|
+
value: function(e) {
|
|
79
|
+
if (!e) throw Error("Pattern is required");
|
|
80
|
+
var t = e.match(l);
|
|
81
|
+
if (!t) {
|
|
82
|
+
if (c.test(e)) throw Error(`Illegal characters found in a pattern: ${e}`);
|
|
83
|
+
this.getContext().instructions = this.getContext().instructions.concat(e.split(""));
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
var n = t[1], r = e.slice(0, t.index), i = e.slice(t.index + n.length);
|
|
87
|
+
switch (n) {
|
|
88
|
+
case "(?:":
|
|
89
|
+
r && this.parsePattern(r), this.startContext({
|
|
90
|
+
or: !0,
|
|
91
|
+
instructions: [],
|
|
92
|
+
branches: []
|
|
93
|
+
});
|
|
94
|
+
break;
|
|
95
|
+
case ")":
|
|
96
|
+
if (!this.getContext().or) throw Error("\")\" operator must be preceded by \"(?:\" operator");
|
|
97
|
+
if (r && this.parsePattern(r), this.getContext().instructions.length === 0) throw Error("No instructions found after \"|\" operator in an \"or\" group");
|
|
98
|
+
var a = this.getContext().branches;
|
|
99
|
+
a.push(u(this.getContext().instructions)), this.endContext(), this.getContext().instructions.push({
|
|
100
|
+
op: "|",
|
|
101
|
+
args: a
|
|
102
|
+
});
|
|
103
|
+
break;
|
|
104
|
+
case "|":
|
|
105
|
+
if (!this.getContext().or) throw Error("\"|\" operator can only be used inside \"or\" groups");
|
|
106
|
+
if (r && this.parsePattern(r), !this.getContext().branches)
|
|
107
|
+
/* istanbul ignore else */
|
|
108
|
+
if (this.context.length === 1) this.getContext().branches = [];
|
|
109
|
+
else throw Error("\"branches\" not found in an \"or\" group context");
|
|
110
|
+
this.getContext().branches.push(u(this.getContext().instructions)), this.getContext().instructions = [];
|
|
111
|
+
break;
|
|
112
|
+
case "[":
|
|
113
|
+
r && this.parsePattern(r), this.startContext({ oneOfSet: !0 });
|
|
114
|
+
break;
|
|
115
|
+
case "]":
|
|
116
|
+
if (!this.getContext().oneOfSet) throw Error("\"]\" operator must be preceded by \"[\" operator");
|
|
117
|
+
this.endContext(), this.getContext().instructions.push({
|
|
118
|
+
op: "[]",
|
|
119
|
+
args: s(r)
|
|
120
|
+
});
|
|
121
|
+
break;
|
|
122
|
+
/* istanbul ignore next */
|
|
123
|
+
default: throw Error(`Unknown operator: ${n}`);
|
|
124
|
+
}
|
|
125
|
+
i && this.parsePattern(i);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
]);
|
|
129
|
+
}();
|
|
130
|
+
function s(e) {
|
|
131
|
+
for (var t = [], n = 0; n < e.length;) {
|
|
132
|
+
if (e[n] === "-") {
|
|
133
|
+
if (n === 0 || n === e.length - 1) throw Error(`Couldn't parse a one-of set pattern: ${e}`);
|
|
134
|
+
for (var r = e[n - 1].charCodeAt(0) + 1, i = e[n + 1].charCodeAt(0) - 1, a = r; a <= i;) t.push(String.fromCharCode(a)), a++;
|
|
135
|
+
} else t.push(e[n]);
|
|
136
|
+
n++;
|
|
137
|
+
}
|
|
138
|
+
return t;
|
|
139
|
+
}
|
|
140
|
+
var c = /[\(\)\[\]\?\:\|]/, l = /* @__PURE__ */ RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])");
|
|
141
|
+
function u(e) {
|
|
142
|
+
return e.length === 1 ? e[0] : e;
|
|
143
|
+
}
|
|
144
|
+
//#endregion
|
|
145
|
+
export { o as default };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import e from "./helpers/parseDigits.js";
|
|
2
|
+
import t from "./helpers/checkNumberLength.js";
|
|
3
|
+
import n from "./helpers/formatNationalNumberUsingFormat.js";
|
|
4
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.complete.js
|
|
5
|
+
function r(e, t, n) {
|
|
6
|
+
var r = n.metadata, i = n.shouldTryNationalPrefixFormattingRule, o = n.getSeparatorAfterNationalPrefix;
|
|
7
|
+
if (RegExp(`^(?:${t.pattern()})\$`).test(e.nationalSignificantNumber)) return a(e, t, {
|
|
8
|
+
metadata: r,
|
|
9
|
+
shouldTryNationalPrefixFormattingRule: i,
|
|
10
|
+
getSeparatorAfterNationalPrefix: o
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function i(e, n) {
|
|
14
|
+
return t(e, void 0, n) === "IS_POSSIBLE";
|
|
15
|
+
}
|
|
16
|
+
function a(e, t, n) {
|
|
17
|
+
var r = n.metadata, i = n.shouldTryNationalPrefixFormattingRule, a = n.getSeparatorAfterNationalPrefix;
|
|
18
|
+
if (e.nationalSignificantNumber, e.international, e.nationalPrefix, e.carrierCode, i(t)) {
|
|
19
|
+
var s = o(e, t, {
|
|
20
|
+
useNationalPrefixFormattingRule: !0,
|
|
21
|
+
getSeparatorAfterNationalPrefix: a,
|
|
22
|
+
metadata: r
|
|
23
|
+
});
|
|
24
|
+
if (s) return s;
|
|
25
|
+
}
|
|
26
|
+
return o(e, t, {
|
|
27
|
+
useNationalPrefixFormattingRule: !1,
|
|
28
|
+
getSeparatorAfterNationalPrefix: a,
|
|
29
|
+
metadata: r
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function o(e, t, r) {
|
|
33
|
+
var i = r.metadata, a = r.useNationalPrefixFormattingRule, o = r.getSeparatorAfterNationalPrefix, c = n(e.nationalSignificantNumber, t, {
|
|
34
|
+
carrierCode: e.carrierCode,
|
|
35
|
+
useInternationalFormat: e.international,
|
|
36
|
+
withNationalPrefix: a,
|
|
37
|
+
metadata: i
|
|
38
|
+
});
|
|
39
|
+
if (a || (e.nationalPrefix ? c = e.nationalPrefix + o(t) + c : e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix && (c = e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix + " " + c)), s(c, e)) return c;
|
|
40
|
+
}
|
|
41
|
+
function s(t, n) {
|
|
42
|
+
return e(t) === n.getNationalDigits();
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { i as canFormatCompleteNumber, r as default };
|