@quidgest/ui 0.19.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 +10 -0
- package/dist/json/api.json +1109 -3
- package/dist/manifest/components.json +1 -0
- package/dist/ui.css +1181 -5
- package/dist/ui.esm.js +1444 -843
- package/dist/ui.js +1405 -804
- package/dist/ui.min.css +2 -1
- package/dist/ui.min.js +1405 -804
- package/dist/ui.scss +373 -7
- package/esm/components/QField/QField.d.ts.map +1 -1
- package/esm/components/QField/QField.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/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/index.d.ts +1 -0
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +36 -34
- 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 +1 -0
- 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 +3 -1
|
@@ -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 };
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { VALID_PUNCTUATION as e } from "./constants.js";
|
|
2
|
+
import t from "./helpers/parseDigits.js";
|
|
3
|
+
import n from "./helpers/applyInternationalSeparatorStyle.js";
|
|
4
|
+
import { FIRST_GROUP_PATTERN as r } from "./helpers/formatNationalNumberUsingFormat.js";
|
|
5
|
+
import { cutAndStripNonPairedParens as i, populateTemplateWithDigits as a, repeat as o } from "./AsYouTypeFormatter.util.js";
|
|
6
|
+
import s, { canFormatCompleteNumber as c } from "./AsYouTypeFormatter.complete.js";
|
|
7
|
+
import l from "./AsYouTypeFormatter.PatternMatcher.js";
|
|
8
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.js
|
|
9
|
+
function u(e) {
|
|
10
|
+
"@babel/helpers - typeof";
|
|
11
|
+
return u = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
12
|
+
return typeof e;
|
|
13
|
+
} : function(e) {
|
|
14
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
15
|
+
}, u(e);
|
|
16
|
+
}
|
|
17
|
+
function d(e, t) {
|
|
18
|
+
var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
19
|
+
if (n) return (n = n.call(e)).next.bind(n);
|
|
20
|
+
if (Array.isArray(e) || (n = f(e)) || t && e && typeof e.length == "number") {
|
|
21
|
+
n && (e = n);
|
|
22
|
+
var r = 0;
|
|
23
|
+
return function() {
|
|
24
|
+
return r >= e.length ? { done: !0 } : {
|
|
25
|
+
done: !1,
|
|
26
|
+
value: e[r++]
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
31
|
+
}
|
|
32
|
+
function f(e, t) {
|
|
33
|
+
if (e) {
|
|
34
|
+
if (typeof e == "string") return p(e, t);
|
|
35
|
+
var n = {}.toString.call(e).slice(8, -1);
|
|
36
|
+
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;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function p(e, t) {
|
|
40
|
+
(t == null || t > e.length) && (t = e.length);
|
|
41
|
+
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
42
|
+
return r;
|
|
43
|
+
}
|
|
44
|
+
function m(e, t) {
|
|
45
|
+
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
46
|
+
}
|
|
47
|
+
function h(e, t) {
|
|
48
|
+
for (var n = 0; n < t.length; n++) {
|
|
49
|
+
var r = t[n];
|
|
50
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, _(r.key), r);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function g(e, t, n) {
|
|
54
|
+
return t && h(e.prototype, t), n && h(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
55
|
+
}
|
|
56
|
+
function _(e) {
|
|
57
|
+
var t = v(e, "string");
|
|
58
|
+
return u(t) == "symbol" ? t : t + "";
|
|
59
|
+
}
|
|
60
|
+
function v(e, t) {
|
|
61
|
+
if (u(e) != "object" || !e) return e;
|
|
62
|
+
var n = e[Symbol.toPrimitive];
|
|
63
|
+
if (n !== void 0) {
|
|
64
|
+
var r = n.call(e, t || "default");
|
|
65
|
+
if (u(r) != "object") return r;
|
|
66
|
+
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
67
|
+
}
|
|
68
|
+
return (t === "string" ? String : Number)(e);
|
|
69
|
+
}
|
|
70
|
+
var y = "9", b = o(y, 15), x = /[- ]/, S = !0, C = S && function() {
|
|
71
|
+
return /\[([^\[\]])*\]/g;
|
|
72
|
+
}, w = S && function() {
|
|
73
|
+
return /\d(?=[^,}][^,}])/g;
|
|
74
|
+
}, T = RegExp("[" + e + "]*\\$1[" + e + "]*(\\$\\d[" + e + "]*)*$"), E = 3, D = /*#__PURE__*/ function() {
|
|
75
|
+
function e(t) {
|
|
76
|
+
t.state;
|
|
77
|
+
var n = t.metadata;
|
|
78
|
+
m(this, e), this.metadata = n, this.resetFormat();
|
|
79
|
+
}
|
|
80
|
+
return g(e, [
|
|
81
|
+
{
|
|
82
|
+
key: "resetFormat",
|
|
83
|
+
value: function() {
|
|
84
|
+
this.chosenFormat = void 0, this.template = void 0, this.nationalNumberTemplate = void 0, this.populatedNationalNumberTemplate = void 0, this.populatedNationalNumberTemplatePosition = -1;
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
key: "reset",
|
|
89
|
+
value: function(e, t) {
|
|
90
|
+
this.resetFormat(), e ? (this.isNANP = e.callingCode() === "1", this.matchingFormats = e.formats(), t.nationalSignificantNumber && this.narrowDownMatchingFormats(t)) : (this.isNANP = void 0, this.matchingFormats = []);
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
key: "format",
|
|
95
|
+
value: function(e, t) {
|
|
96
|
+
var n = this;
|
|
97
|
+
if (c(t.nationalSignificantNumber, this.metadata)) for (var r = d(this.matchingFormats), i; !(i = r()).done;) {
|
|
98
|
+
var a = i.value, o = s(t, a, {
|
|
99
|
+
metadata: this.metadata,
|
|
100
|
+
shouldTryNationalPrefixFormattingRule: function(e) {
|
|
101
|
+
return n.shouldTryNationalPrefixFormattingRule(e, {
|
|
102
|
+
international: t.international,
|
|
103
|
+
nationalPrefix: t.nationalPrefix
|
|
104
|
+
});
|
|
105
|
+
},
|
|
106
|
+
getSeparatorAfterNationalPrefix: function(e) {
|
|
107
|
+
return n.getSeparatorAfterNationalPrefix(e);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
if (o) return this.resetFormat(), this.chosenFormat = a, this.setNationalNumberTemplate(o.replace(/\d/g, "x"), t), this.populatedNationalNumberTemplate = o, this.populatedNationalNumberTemplatePosition = this.template.lastIndexOf("x"), o;
|
|
111
|
+
}
|
|
112
|
+
return this.formatNationalNumberWithNextDigits(e, t);
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
key: "formatNationalNumberWithNextDigits",
|
|
117
|
+
value: function(e, t) {
|
|
118
|
+
var n = this.chosenFormat, r = this.chooseFormat(t);
|
|
119
|
+
if (r) return r === n ? this.formatNextNationalNumberDigits(e) : this.formatNextNationalNumberDigits(t.getNationalDigits());
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
key: "narrowDownMatchingFormats",
|
|
124
|
+
value: function(e) {
|
|
125
|
+
var t = this, n = e.nationalSignificantNumber, r = e.nationalPrefix, i = e.international, a = n, o = a.length - E;
|
|
126
|
+
o < 0 && (o = 0), this.matchingFormats = this.matchingFormats.filter(function(e) {
|
|
127
|
+
return t.formatSuits(e, i, r) && t.formatMatches(e, a, o);
|
|
128
|
+
}), this.chosenFormat && this.matchingFormats.indexOf(this.chosenFormat) === -1 && this.resetFormat();
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
key: "formatSuits",
|
|
133
|
+
value: function(e, t, n) {
|
|
134
|
+
return !(n && !e.usesNationalPrefix() && !e.nationalPrefixIsOptionalWhenFormattingInNationalFormat() || !t && !n && e.nationalPrefixIsMandatoryWhenFormattingInNationalFormat());
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
key: "formatMatches",
|
|
139
|
+
value: function(e, t, n) {
|
|
140
|
+
var r = e.leadingDigitsPatterns().length;
|
|
141
|
+
if (r === 0) return !0;
|
|
142
|
+
n = Math.min(n, r - 1);
|
|
143
|
+
var i = e.leadingDigitsPatterns()[n];
|
|
144
|
+
if (t.length < E) try {
|
|
145
|
+
return new l(i).match(t, { allowOverflow: !0 }) !== void 0;
|
|
146
|
+
} catch (e) /* istanbul ignore next */ {
|
|
147
|
+
return console.error(e), !0;
|
|
148
|
+
}
|
|
149
|
+
return RegExp(`^(${i})`).test(t);
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
key: "getFormatFormat",
|
|
154
|
+
value: function(e, t) {
|
|
155
|
+
return t ? e.internationalFormat() : e.format();
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
key: "chooseFormat",
|
|
160
|
+
value: function(e) {
|
|
161
|
+
/* istanbul ignore next */
|
|
162
|
+
for (var t = this, n = function() {
|
|
163
|
+
var n = a.value;
|
|
164
|
+
return t.chosenFormat === n ? 0 :
|
|
165
|
+
/* istanbul ignore if */
|
|
166
|
+
T.test(t.getFormatFormat(n, e.international)) ? t.createTemplateForFormat(n, e) ? (t.chosenFormat = n, 0) : (t.matchingFormats = t.matchingFormats.filter(function(e) {
|
|
167
|
+
return e !== n;
|
|
168
|
+
}), 1) : 1;
|
|
169
|
+
}, r, i = d(this.matchingFormats.slice()), a; !(a = i()).done && (r = n(), r !== 0););
|
|
170
|
+
return this.chosenFormat || this.resetFormat(), this.chosenFormat;
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
key: "createTemplateForFormat",
|
|
175
|
+
value: function(e, t) {
|
|
176
|
+
if (!(S && e.pattern().indexOf("|") >= 0)) {
|
|
177
|
+
var n = this.getTemplateForFormat(e, t);
|
|
178
|
+
if (n) return this.setNationalNumberTemplate(n, t), !0;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
key: "getSeparatorAfterNationalPrefix",
|
|
184
|
+
value: function(e) {
|
|
185
|
+
return this.isNANP || e && e.nationalPrefixFormattingRule() && x.test(e.nationalPrefixFormattingRule()) ? " " : "";
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
key: "getInternationalPrefixBeforeCountryCallingCode",
|
|
190
|
+
value: function(e, t) {
|
|
191
|
+
var n = e.IDDPrefix, r = e.missingPlus;
|
|
192
|
+
return n ? t && t.spacing === !1 ? n : n + " " : r ? "" : "+";
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
key: "getTemplate",
|
|
197
|
+
value: function(e) {
|
|
198
|
+
if (this.template) {
|
|
199
|
+
for (var t = -1, n = 0, r = e.international ? this.getInternationalPrefixBeforeCountryCallingCode(e, { spacing: !1 }) : ""; n < r.length + e.getDigitsWithoutInternationalPrefix().length;) t = this.template.indexOf("x", t + 1), n++;
|
|
200
|
+
return i(this.template, t + 1);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
key: "setNationalNumberTemplate",
|
|
206
|
+
value: function(e, t) {
|
|
207
|
+
this.nationalNumberTemplate = e, this.populatedNationalNumberTemplate = e, this.populatedNationalNumberTemplatePosition = -1, t.international ? this.template = this.getInternationalPrefixBeforeCountryCallingCode(t).replace(/[\d\+]/g, "x") + o("x", t.callingCode.length) + " " + e : this.template = e;
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
key: "getTemplateForFormat",
|
|
212
|
+
value: function(e, i) {
|
|
213
|
+
var a = i.nationalSignificantNumber, s = i.international, c = i.nationalPrefix, l = i.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix, u = e.pattern();
|
|
214
|
+
/* istanbul ignore else */
|
|
215
|
+
S && (u = u.replace(C(), "\\d").replace(w(), "\\d"));
|
|
216
|
+
var d = b.match(u)[0];
|
|
217
|
+
if (!(a.length > d.length)) {
|
|
218
|
+
var f = RegExp("^" + u + "$"), p = a.replace(/\d/g, y);
|
|
219
|
+
f.test(p) && (d = p);
|
|
220
|
+
var m = this.getFormatFormat(e, s), h;
|
|
221
|
+
if (this.shouldTryNationalPrefixFormattingRule(e, {
|
|
222
|
+
international: s,
|
|
223
|
+
nationalPrefix: c
|
|
224
|
+
})) {
|
|
225
|
+
var g = m.replace(r, e.nationalPrefixFormattingRule());
|
|
226
|
+
/* istanbul ignore else */
|
|
227
|
+
if (t(e.nationalPrefixFormattingRule()) === (c || "") + t("$1") && (m = g, h = !0, c)) for (var _ = c.length; _ > 0;) m = m.replace(/\d/, "x"), _--;
|
|
228
|
+
}
|
|
229
|
+
var v = d.replace(new RegExp(u), m).replace(new RegExp(y, "g"), "x");
|
|
230
|
+
return h || (l ? v = o("x", l.length) + " " + v : c && (v = o("x", c.length) + this.getSeparatorAfterNationalPrefix(e) + v)), s && (v = n(v)), v;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
key: "formatNextNationalNumberDigits",
|
|
236
|
+
value: function(e) {
|
|
237
|
+
var t = a(this.populatedNationalNumberTemplate, this.populatedNationalNumberTemplatePosition, e);
|
|
238
|
+
if (!t) {
|
|
239
|
+
this.resetFormat();
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
return this.populatedNationalNumberTemplate = t[0], this.populatedNationalNumberTemplatePosition = t[1], i(this.populatedNationalNumberTemplate, this.populatedNationalNumberTemplatePosition + 1);
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
key: "shouldTryNationalPrefixFormattingRule",
|
|
247
|
+
value: function(e, t) {
|
|
248
|
+
var n = t.international, r = t.nationalPrefix;
|
|
249
|
+
if (e.nationalPrefixFormattingRule()) {
|
|
250
|
+
var i = e.usesNationalPrefix();
|
|
251
|
+
if (i && r || !i && !n) return !0;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
]);
|
|
256
|
+
}();
|
|
257
|
+
//#endregion
|
|
258
|
+
export { D as default };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.util.js
|
|
2
|
+
function e(e, n) {
|
|
3
|
+
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
4
|
+
if (r) return (r = r.call(e)).next.bind(r);
|
|
5
|
+
if (Array.isArray(e) || (r = t(e)) || n && e && typeof e.length == "number") {
|
|
6
|
+
r && (e = r);
|
|
7
|
+
var i = 0;
|
|
8
|
+
return function() {
|
|
9
|
+
return i >= e.length ? { done: !0 } : {
|
|
10
|
+
done: !1,
|
|
11
|
+
value: e[i++]
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
16
|
+
}
|
|
17
|
+
function t(e, t) {
|
|
18
|
+
if (e) {
|
|
19
|
+
if (typeof e == "string") return n(e, t);
|
|
20
|
+
var r = {}.toString.call(e).slice(8, -1);
|
|
21
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? n(e, t) : void 0;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function n(e, t) {
|
|
25
|
+
(t == null || t > e.length) && (t = e.length);
|
|
26
|
+
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
27
|
+
return r;
|
|
28
|
+
}
|
|
29
|
+
var r = /* @__PURE__ */ RegExp("x");
|
|
30
|
+
function i(e, t) {
|
|
31
|
+
if (t < 1) return "";
|
|
32
|
+
for (var n = ""; t > 1;) t & 1 && (n += e), t >>= 1, e += e;
|
|
33
|
+
return n + e;
|
|
34
|
+
}
|
|
35
|
+
function a(e, t) {
|
|
36
|
+
return e[t] === ")" && t++, o(e.slice(0, t));
|
|
37
|
+
}
|
|
38
|
+
function o(e) {
|
|
39
|
+
for (var t = [], n = 0; n < e.length;) e[n] === "(" ? t.push(n) : e[n] === ")" && t.pop(), n++;
|
|
40
|
+
var r = 0, i = "";
|
|
41
|
+
t.push(e.length);
|
|
42
|
+
for (var a = 0, o = t; a < o.length; a++) {
|
|
43
|
+
var s = o[a];
|
|
44
|
+
i += e.slice(r, s), r = s + 1;
|
|
45
|
+
}
|
|
46
|
+
return i;
|
|
47
|
+
}
|
|
48
|
+
function s(t, n, i) {
|
|
49
|
+
for (var a = e(i.split("")), o; !(o = a()).done;) {
|
|
50
|
+
var s = o.value;
|
|
51
|
+
if (t.slice(n + 1).search(r) < 0) return;
|
|
52
|
+
n = t.search(r), t = t.replace(r, s);
|
|
53
|
+
}
|
|
54
|
+
return [t, n];
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
export { a as cutAndStripNonPairedParens, s as populateTemplateWithDigits, i as repeat, o as stripNonPairedParens };
|