libphonenumber-js 1.10.4 → 1.10.7

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.
Files changed (129) hide show
  1. package/README.md +35 -9
  2. package/build/AsYouType.test.js +26 -8
  3. package/build/AsYouType.test.js.map +1 -1
  4. package/build/AsYouTypeFormatter.PatternMatcher.js +36 -224
  5. package/build/AsYouTypeFormatter.PatternMatcher.js.map +1 -1
  6. package/build/AsYouTypeFormatter.PatternMatcher.test.js +9 -0
  7. package/build/AsYouTypeFormatter.PatternMatcher.test.js.map +1 -1
  8. package/build/AsYouTypeFormatter.PatternParser.js +241 -0
  9. package/build/AsYouTypeFormatter.PatternParser.js.map +1 -0
  10. package/build/AsYouTypeFormatter.PatternParser.test.js +49 -0
  11. package/build/AsYouTypeFormatter.PatternParser.test.js.map +1 -0
  12. package/build/AsYouTypeFormatter.js.map +1 -1
  13. package/build/package.json +5 -1
  14. package/bundle/libphonenumber-js.min.js +1 -1
  15. package/bundle/libphonenumber-js.min.js.map +1 -1
  16. package/bundle/libphonenumber-max.js +1 -1
  17. package/bundle/libphonenumber-max.js.map +1 -1
  18. package/bundle/libphonenumber-min.js +1 -1
  19. package/bundle/libphonenumber-min.js.map +1 -1
  20. package/bundle/libphonenumber-mobile.js +1 -1
  21. package/bundle/libphonenumber-mobile.js.map +1 -1
  22. package/core/package.json +1 -2
  23. package/es6/AsYouType.test.js +26 -8
  24. package/es6/AsYouType.test.js.map +1 -1
  25. package/es6/AsYouTypeFormatter.PatternMatcher.js +33 -223
  26. package/es6/AsYouTypeFormatter.PatternMatcher.js.map +1 -1
  27. package/es6/AsYouTypeFormatter.PatternMatcher.test.js +9 -0
  28. package/es6/AsYouTypeFormatter.PatternMatcher.test.js.map +1 -1
  29. package/es6/AsYouTypeFormatter.PatternParser.js +234 -0
  30. package/es6/AsYouTypeFormatter.PatternParser.js.map +1 -0
  31. package/es6/AsYouTypeFormatter.PatternParser.test.js +44 -0
  32. package/es6/AsYouTypeFormatter.PatternParser.test.js.map +1 -0
  33. package/es6/AsYouTypeFormatter.js.map +1 -1
  34. package/index.cjs +9 -9
  35. package/index.cjs.js +9 -9
  36. package/index.es6.exports/PhoneNumberSearch.js +3 -1
  37. package/index.es6.exports/findPhoneNumbers.js +2 -2
  38. package/index.es6.exports/format.js +2 -2
  39. package/index.es6.exports/getNumberType.js +2 -2
  40. package/index.es6.exports/isPossibleNumber.js +2 -2
  41. package/index.es6.exports/isValidNumber.js +2 -2
  42. package/index.es6.exports/isValidNumberForRegion.js +2 -2
  43. package/index.es6.exports/parse.js +2 -2
  44. package/index.es6.exports/searchPhoneNumbers.js +2 -2
  45. package/max/exports/AsYouType.js +4 -1
  46. package/max/exports/Metadata.js +4 -1
  47. package/max/exports/PhoneNumberMatcher.js +4 -1
  48. package/max/exports/findNumbers.js +2 -2
  49. package/max/exports/findPhoneNumbersInText.js +2 -2
  50. package/max/exports/formatIncompletePhoneNumber.js +2 -2
  51. package/max/exports/getCountries.js +2 -2
  52. package/max/exports/getCountryCallingCode.js +2 -2
  53. package/max/exports/getExampleNumber.js +2 -2
  54. package/max/exports/getExtPrefix.js +2 -2
  55. package/max/exports/isPossiblePhoneNumber.js +2 -2
  56. package/max/exports/isSupportedCountry.js +2 -2
  57. package/max/exports/isValidPhoneNumber.js +2 -2
  58. package/max/exports/parsePhoneNumberFromString.js +2 -2
  59. package/max/exports/parsePhoneNumberWithError.js +2 -2
  60. package/max/exports/searchNumbers.js +2 -2
  61. package/max/exports/searchPhoneNumbersInText.js +2 -2
  62. package/max/exports/validatePhoneNumberLength.js +2 -2
  63. package/max/exports/withMetadataArgument.js +9 -0
  64. package/max/metadata/package.json +16 -0
  65. package/max/package.json +1 -2
  66. package/metadata.full.json +1 -1
  67. package/metadata.full.json.js +1 -1
  68. package/metadata.max.json +1 -1
  69. package/metadata.max.json.js +1 -1
  70. package/metadata.min.json +1 -1
  71. package/metadata.min.json.js +1 -1
  72. package/metadata.mobile.json +1 -1
  73. package/metadata.mobile.json.js +1 -1
  74. package/min/exports/AsYouType.js +4 -1
  75. package/min/exports/Metadata.js +4 -1
  76. package/min/exports/PhoneNumberMatcher.js +4 -1
  77. package/min/exports/findNumbers.js +2 -2
  78. package/min/exports/findPhoneNumbersInText.js +2 -2
  79. package/min/exports/formatIncompletePhoneNumber.js +2 -2
  80. package/min/exports/getCountries.js +2 -2
  81. package/min/exports/getCountryCallingCode.js +2 -2
  82. package/min/exports/getExampleNumber.js +2 -2
  83. package/min/exports/getExtPrefix.js +2 -2
  84. package/min/exports/isPossiblePhoneNumber.js +2 -2
  85. package/min/exports/isSupportedCountry.js +2 -2
  86. package/min/exports/isValidPhoneNumber.js +2 -2
  87. package/min/exports/parsePhoneNumberFromString.js +2 -2
  88. package/min/exports/parsePhoneNumberWithError.js +2 -2
  89. package/min/exports/searchNumbers.js +2 -2
  90. package/min/exports/searchPhoneNumbersInText.js +2 -2
  91. package/min/exports/validatePhoneNumberLength.js +2 -2
  92. package/min/exports/withMetadataArgument.js +9 -0
  93. package/min/metadata/package.json +16 -0
  94. package/min/package.json +1 -2
  95. package/mobile/examples/package.json +16 -0
  96. package/mobile/exports/AsYouType.js +4 -1
  97. package/mobile/exports/Metadata.js +4 -1
  98. package/mobile/exports/PhoneNumberMatcher.js +4 -1
  99. package/mobile/exports/findNumbers.js +2 -2
  100. package/mobile/exports/findPhoneNumbersInText.js +2 -2
  101. package/mobile/exports/formatIncompletePhoneNumber.js +2 -2
  102. package/mobile/exports/getCountries.js +2 -2
  103. package/mobile/exports/getCountryCallingCode.js +2 -2
  104. package/mobile/exports/getExampleNumber.js +2 -2
  105. package/mobile/exports/getExtPrefix.js +2 -2
  106. package/mobile/exports/isPossiblePhoneNumber.js +2 -2
  107. package/mobile/exports/isSupportedCountry.js +2 -2
  108. package/mobile/exports/isValidPhoneNumber.js +2 -2
  109. package/mobile/exports/parsePhoneNumberFromString.js +2 -2
  110. package/mobile/exports/parsePhoneNumberWithError.js +2 -2
  111. package/mobile/exports/searchNumbers.js +2 -2
  112. package/mobile/exports/searchPhoneNumbersInText.js +2 -2
  113. package/mobile/exports/validatePhoneNumberLength.js +2 -2
  114. package/mobile/exports/withMetadataArgument.js +9 -0
  115. package/mobile/metadata/package.json +16 -0
  116. package/mobile/package.json +1 -2
  117. package/package.json +22 -2
  118. package/runnable/create-commonjs-package-json.js +1 -1
  119. package/source/AsYouType.test.js +25 -6
  120. package/source/AsYouTypeFormatter.PatternMatcher.d.ts +66 -0
  121. package/source/AsYouTypeFormatter.PatternMatcher.js +30 -206
  122. package/source/AsYouTypeFormatter.PatternMatcher.test.js +8 -0
  123. package/source/AsYouTypeFormatter.PatternParser.d.ts +58 -0
  124. package/source/AsYouTypeFormatter.PatternParser.js +214 -0
  125. package/source/AsYouTypeFormatter.PatternParser.test.js +67 -0
  126. package/source/AsYouTypeFormatter.js +2 -0
  127. package/max/metadata.js +0 -11
  128. package/min/metadata.js +0 -11
  129. package/mobile/metadata.js +0 -11
@@ -5,6 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
 
8
+ var _AsYouTypeFormatterPatternParser = _interopRequireDefault(require("./AsYouTypeFormatter.PatternParser.js"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+
8
12
  function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
13
 
10
14
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -21,7 +25,7 @@ var PatternMatcher = /*#__PURE__*/function () {
21
25
  function PatternMatcher(pattern) {
22
26
  _classCallCheck(this, PatternMatcher);
23
27
 
24
- this.matchTree = new PatternParser().parse(pattern);
28
+ this.matchTree = new _AsYouTypeFormatterPatternParser["default"]().parse(pattern);
25
29
  }
26
30
 
27
31
  _createClass(PatternMatcher, [{
@@ -52,20 +56,25 @@ var PatternMatcher = /*#__PURE__*/function () {
52
56
 
53
57
  return PatternMatcher;
54
58
  }();
59
+ /**
60
+ * Matches `characters` against a pattern compiled into a `tree`.
61
+ * @param {string[]} characters
62
+ * @param {Tree} tree — A pattern compiled into a `tree`. See the `*.d.ts` file for the description of the `tree` structure.
63
+ * @param {boolean} last — Whether it's the last (rightmost) subtree on its level of the match tree.
64
+ * @return {object} See the `*.d.ts` file for the description of the result object.
65
+ */
66
+
55
67
 
56
68
  exports["default"] = PatternMatcher;
57
69
 
58
70
  function _match(characters, tree, last) {
71
+ // If `tree` is a string, then `tree` is a single character.
72
+ // That's because when a pattern is parsed, multi-character-string parts
73
+ // of a pattern are compiled into arrays of single characters.
74
+ // I still wrote this piece of code for a "general" hypothetical case
75
+ // when `tree` could be a string of several characters, even though
76
+ // such case is not possible with the current implementation.
59
77
  if (typeof tree === 'string') {
60
- if (last) {
61
- // `tree` is always a single character.
62
- if (characters.length > tree.length) {
63
- return {
64
- overflow: true
65
- };
66
- }
67
- }
68
-
69
78
  var characterString = characters.join('');
70
79
 
71
80
  if (tree.indexOf(characterString) === 0) {
@@ -93,6 +102,23 @@ function _match(characters, tree, last) {
93
102
  }
94
103
 
95
104
  if (characterString.indexOf(tree) === 0) {
105
+ if (last) {
106
+ // The `else` path is not possible because `tree` is always a single character.
107
+ // The `else` case for `characters.length > tree.length` would be
108
+ // `characters.length <= tree.length` which means `characters.length <= 1`.
109
+ // `characters` array can't be empty, so that means `characters === [tree]`,
110
+ // which would also mean `tree.indexOf(characterString) === 0` and that'd mean
111
+ // that the `if (tree.indexOf(characterString) === 0)` condition before this
112
+ // `if` condition would be entered, and returned from there, not reaching this code.
113
+
114
+ /* istanbul ignore else */
115
+ if (characters.length > tree.length) {
116
+ return {
117
+ overflow: true
118
+ };
119
+ }
120
+ }
121
+
96
122
  return {
97
123
  match: true,
98
124
  matchedChars: characters.slice(0, tree.length)
@@ -235,218 +261,4 @@ function _match(characters, tree, last) {
235
261
  throw new Error("Unsupported instruction tree: ".concat(tree));
236
262
  }
237
263
  }
238
-
239
- var OPERATOR = new RegExp( // any of:
240
- '(' + // or operator
241
- '\\|' + // or
242
- '|' + // or group start
243
- '\\(\\?\\:' + // or
244
- '|' + // or group end
245
- '\\)' + // or
246
- '|' + // one-of set start
247
- '\\[' + // or
248
- '|' + // one-of set end
249
- '\\]' + ')');
250
- var ILLEGAL_CHARACTER_REGEXP = /[\(\)\[\]\?\:\|]/;
251
-
252
- var PatternParser = /*#__PURE__*/function () {
253
- function PatternParser() {
254
- _classCallCheck(this, PatternParser);
255
- }
256
-
257
- _createClass(PatternParser, [{
258
- key: "parse",
259
- value: function parse(pattern) {
260
- this.context = [{
261
- or: true,
262
- instructions: []
263
- }];
264
- this.parsePattern(pattern);
265
-
266
- if (this.context.length !== 1) {
267
- throw new Error('Non-finalized contexts left when pattern parse ended');
268
- }
269
-
270
- var _this$context$ = this.context[0],
271
- branches = _this$context$.branches,
272
- instructions = _this$context$.instructions;
273
-
274
- if (branches) {
275
- return [{
276
- op: '|',
277
- args: branches.concat([instructions])
278
- }];
279
- }
280
- /* istanbul ignore if */
281
-
282
-
283
- if (instructions.length === 0) {
284
- throw new Error('Pattern is required');
285
- }
286
-
287
- return instructions;
288
- }
289
- }, {
290
- key: "startContext",
291
- value: function startContext(context) {
292
- this.context.push(context);
293
- }
294
- }, {
295
- key: "endContext",
296
- value: function endContext() {
297
- this.context.pop();
298
- }
299
- }, {
300
- key: "getContext",
301
- value: function getContext() {
302
- return this.context[this.context.length - 1];
303
- }
304
- }, {
305
- key: "parsePattern",
306
- value: function parsePattern(pattern) {
307
- if (!pattern) {
308
- throw new Error('Pattern is required');
309
- }
310
-
311
- var match = pattern.match(OPERATOR);
312
-
313
- if (!match) {
314
- if (ILLEGAL_CHARACTER_REGEXP.test(pattern)) {
315
- throw new Error("Illegal characters found in a pattern: ".concat(pattern));
316
- }
317
-
318
- this.getContext().instructions = this.getContext().instructions.concat(pattern.split(''));
319
- return;
320
- }
321
-
322
- var operator = match[1];
323
- var before = pattern.slice(0, match.index);
324
- var rightPart = pattern.slice(match.index + operator.length);
325
-
326
- switch (operator) {
327
- case '(?:':
328
- if (before) {
329
- this.parsePattern(before);
330
- }
331
-
332
- this.startContext({
333
- or: true,
334
- instructions: [],
335
- branches: []
336
- });
337
- break;
338
-
339
- case ')':
340
- if (!this.getContext().or) {
341
- throw new Error('")" operator must be preceded by "(?:" operator');
342
- }
343
-
344
- if (before) {
345
- this.parsePattern(before);
346
- }
347
-
348
- if (this.getContext().instructions.length === 0) {
349
- throw new Error('No instructions found after "|" operator in an "or" group');
350
- }
351
-
352
- var _this$getContext = this.getContext(),
353
- branches = _this$getContext.branches;
354
-
355
- branches.push(this.getContext().instructions);
356
- this.endContext();
357
- this.getContext().instructions.push({
358
- op: '|',
359
- args: branches
360
- });
361
- break;
362
-
363
- case '|':
364
- if (!this.getContext().or) {
365
- throw new Error('"|" operator can only be used inside "or" groups');
366
- }
367
-
368
- if (before) {
369
- this.parsePattern(before);
370
- } // The top-level is an implicit "or" group, if required.
371
-
372
-
373
- if (!this.getContext().branches) {
374
- // `branches` are not defined only for the root implicit "or" operator.
375
-
376
- /* istanbul ignore else */
377
- if (this.context.length === 1) {
378
- this.getContext().branches = [];
379
- } else {
380
- throw new Error('"branches" not found in an "or" group context');
381
- }
382
- }
383
-
384
- this.getContext().branches.push(this.getContext().instructions);
385
- this.getContext().instructions = [];
386
- break;
387
-
388
- case '[':
389
- if (before) {
390
- this.parsePattern(before);
391
- }
392
-
393
- this.startContext({
394
- oneOfSet: true
395
- });
396
- break;
397
-
398
- case ']':
399
- if (!this.getContext().oneOfSet) {
400
- throw new Error('"]" operator must be preceded by "[" operator');
401
- }
402
-
403
- this.endContext();
404
- this.getContext().instructions.push({
405
- op: '[]',
406
- args: parseOneOfSet(before)
407
- });
408
- break;
409
-
410
- /* istanbul ignore next */
411
-
412
- default:
413
- throw new Error("Unknown operator: ".concat(operator));
414
- }
415
-
416
- if (rightPart) {
417
- this.parsePattern(rightPart);
418
- }
419
- }
420
- }]);
421
-
422
- return PatternParser;
423
- }();
424
-
425
- function parseOneOfSet(pattern) {
426
- var values = [];
427
- var i = 0;
428
-
429
- while (i < pattern.length) {
430
- if (pattern[i] === '-') {
431
- if (i === 0 || i === pattern.length - 1) {
432
- throw new Error("Couldn't parse a one-of set pattern: ".concat(pattern));
433
- }
434
-
435
- var prevValue = pattern[i - 1].charCodeAt(0) + 1;
436
- var nextValue = pattern[i + 1].charCodeAt(0) - 1;
437
- var value = prevValue;
438
-
439
- while (value <= nextValue) {
440
- values.push(String.fromCharCode(value));
441
- value++;
442
- }
443
- } else {
444
- values.push(pattern[i]);
445
- }
446
-
447
- i++;
448
- }
449
-
450
- return values;
451
- }
452
264
  //# sourceMappingURL=AsYouTypeFormatter.PatternMatcher.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AsYouTypeFormatter.PatternMatcher.js","names":["PatternMatcher","pattern","matchTree","PatternParser","parse","string","allowOverflow","Error","result","match","split","matchedChars","overflow","characters","tree","last","length","characterString","join","indexOf","partialMatch","slice","Array","isArray","restCharacters","i","subtree","JSON","stringify","op","args","branch","char","OPERATOR","RegExp","ILLEGAL_CHARACTER_REGEXP","context","or","instructions","parsePattern","branches","concat","push","pop","test","getContext","operator","before","index","rightPart","startContext","endContext","oneOfSet","parseOneOfSet","values","prevValue","charCodeAt","nextValue","value","String","fromCharCode"],"sources":["../source/AsYouTypeFormatter.PatternMatcher.js"],"sourcesContent":["export default class PatternMatcher {\r\n\tconstructor(pattern) {\r\n\t\tthis.matchTree = new PatternParser().parse(pattern)\r\n\t}\r\n\r\n\tmatch(string, { allowOverflow } = {}) {\r\n\t\tif (!string) {\r\n\t\t\tthrow new Error('String is required')\r\n\t\t}\r\n\t\tconst result = match(string.split(''), this.matchTree, true)\r\n\t\tif (result && result.match) {\r\n\t\t\tdelete result.matchedChars\r\n\t\t}\r\n\t\tif (result && result.overflow) {\r\n\t\t\tif (!allowOverflow) {\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result\r\n\t}\r\n}\r\n\r\nfunction match(characters, tree, last) {\r\n\tif (typeof tree === 'string') {\r\n\t\tif (last) {\r\n\t\t\t// `tree` is always a single character.\r\n\t\t\tif (characters.length > tree.length) {\r\n\t\t\t\treturn {\r\n\t\t\t\t\toverflow: true\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tconst characterString = characters.join('')\r\n\t\tif (tree.indexOf(characterString) === 0) {\r\n\t\t\t// `tree` is always a single character.\r\n\t\t\t// If `tree.indexOf(characterString) === 0`\r\n\t\t\t// then `characters.length === tree.length`.\r\n\t\t\t/* istanbul ignore else */\r\n\t\t\tif (characters.length === tree.length) {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tmatch: true,\r\n\t\t\t\t\tmatchedChars: characters\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// `tree` is always a single character.\r\n\t\t\t// If `tree.indexOf(characterString) === 0`\r\n\t\t\t// then `characters.length === tree.length`.\r\n\t\t\t/* istanbul ignore next */\r\n\t\t\treturn {\r\n\t\t\t\tpartialMatch: true,\r\n\t\t\t\t// matchedChars: characters\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (characterString.indexOf(tree) === 0) {\r\n\t\t\treturn {\r\n\t\t\t\tmatch: true,\r\n\t\t\t\tmatchedChars: characters.slice(0, tree.length)\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn\r\n\t}\r\n\r\n\tif (Array.isArray(tree)) {\r\n\t\tlet restCharacters = characters.slice()\r\n\t\tlet i = 0\r\n\t\twhile (i < tree.length) {\r\n\t\t\tconst subtree = tree[i]\r\n\t\t\tconst result = match(restCharacters, subtree, last && (i === tree.length - 1))\r\n\t\t\tif (!result) {\r\n\t\t\t\treturn\r\n\t\t\t} else if (result.overflow) {\r\n\t\t\t\treturn result\r\n\t\t\t} else if (result.match) {\r\n\t\t\t\t// Continue with the next subtree with the rest of the characters.\r\n\t\t\t\trestCharacters = restCharacters.slice(result.matchedChars.length)\r\n\t\t\t\tif (restCharacters.length === 0) {\r\n\t\t\t\t\tif (i === tree.length - 1) {\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\tmatch: true,\r\n\t\t\t\t\t\t\tmatchedChars: characters\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\tpartialMatch: true,\r\n\t\t\t\t\t\t\t// matchedChars: characters\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t/* istanbul ignore else */\r\n\t\t\t\tif (result.partialMatch) {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tpartialMatch: true,\r\n\t\t\t\t\t\t// matchedChars: characters\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new Error(`Unsupported match result:\\n${JSON.stringify(result, null, 2)}`)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ti++\r\n\t\t}\r\n\t\t// If `last` then overflow has already been checked\r\n\t\t// by the last element of the `tree` array.\r\n\t\t/* istanbul ignore if */\r\n\t\tif (last) {\r\n\t\t\treturn {\r\n\t\t\t\toverflow: true\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tmatch: true,\r\n\t\t\tmatchedChars: characters.slice(0, characters.length - restCharacters.length)\r\n\t\t}\r\n\t}\r\n\r\n\tswitch (tree.op) {\r\n\t\tcase '|':\r\n\t\t\tlet partialMatch\r\n\t\t\tfor (const branch of tree.args) {\r\n\t\t\t\tconst result = match(characters, branch, last)\r\n\t\t\t\tif (result) {\r\n\t\t\t\t\tif (result.overflow) {\r\n\t\t\t\t\t\treturn result\r\n\t\t\t\t\t} else if (result.match) {\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\tmatch: true,\r\n\t\t\t\t\t\t\tmatchedChars: result.matchedChars\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t/* istanbul ignore else */\r\n\t\t\t\t\t\tif (result.partialMatch) {\r\n\t\t\t\t\t\t\tpartialMatch = true\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tthrow new Error(`Unsupported match result:\\n${JSON.stringify(result, null, 2)}`)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (partialMatch) {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tpartialMatch: true,\r\n\t\t\t\t\t// matchedChars: ...\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Not even a partial match.\r\n\t\t\treturn\r\n\r\n\t\tcase '[]':\r\n\t\t\tfor (const char of tree.args) {\r\n\t\t\t\tif (characters[0] === char) {\r\n\t\t\t\t\tif (characters.length === 1) {\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\tmatch: true,\r\n\t\t\t\t\t\t\tmatchedChars: characters\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (last) {\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\toverflow: true\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tmatch: true,\r\n\t\t\t\t\t\tmatchedChars: [char]\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// No character matches.\r\n\t\t\treturn\r\n\r\n\t\t/* istanbul ignore next */\r\n\t\tdefault:\r\n\t\t\tthrow new Error(`Unsupported instruction tree: ${tree}`)\r\n\t}\r\n}\r\n\r\nconst OPERATOR = new RegExp(\r\n\t// any of:\r\n\t'(' +\r\n\t\t// or operator\r\n\t\t'\\\\|' +\r\n\t\t// or\r\n\t\t'|' +\r\n\t\t// or group start\r\n\t\t'\\\\(\\\\?\\\\:' +\r\n\t\t// or\r\n\t\t'|' +\r\n\t\t// or group end\r\n\t\t'\\\\)' +\r\n\t\t// or\r\n\t\t'|' +\r\n\t\t// one-of set start\r\n\t\t'\\\\[' +\r\n\t\t// or\r\n\t\t'|' +\r\n\t\t// one-of set end\r\n\t\t'\\\\]' +\r\n\t')'\r\n)\r\n\r\nconst ILLEGAL_CHARACTER_REGEXP = /[\\(\\)\\[\\]\\?\\:\\|]/\r\n\r\nclass PatternParser {\r\n\tparse(pattern) {\r\n\t\tthis.context = [{\r\n\t\t\tor: true,\r\n\t\t\tinstructions: []\r\n\t\t}]\r\n\r\n\t\tthis.parsePattern(pattern)\r\n\r\n\t\tif (this.context.length !== 1) {\r\n\t\t\tthrow new Error('Non-finalized contexts left when pattern parse ended')\r\n\t\t}\r\n\r\n\t\tconst { branches, instructions } = this.context[0]\r\n\r\n\t\tif (branches) {\r\n\t\t\treturn [{\r\n\t\t\t\top: '|',\r\n\t\t\t\targs: branches.concat([instructions])\r\n\t\t\t}]\r\n\t\t}\r\n\r\n\t\t/* istanbul ignore if */\r\n\t\tif (instructions.length === 0) {\r\n\t\t\tthrow new Error('Pattern is required')\r\n\t\t}\r\n\r\n\t\treturn instructions\r\n\t}\r\n\r\n\tstartContext(context) {\r\n\t\tthis.context.push(context)\r\n\t}\r\n\r\n\tendContext() {\r\n\t\tthis.context.pop()\r\n\t}\r\n\r\n\tgetContext() {\r\n\t\treturn this.context[this.context.length - 1]\r\n\t}\r\n\r\n\tparsePattern(pattern) {\r\n\t\tif (!pattern) {\r\n\t\t\tthrow new Error('Pattern is required')\r\n\t\t}\r\n\r\n\t\tconst match = pattern.match(OPERATOR)\r\n\t\tif (!match) {\r\n\t\t\tif (ILLEGAL_CHARACTER_REGEXP.test(pattern)) {\r\n\t\t\t\tthrow new Error(`Illegal characters found in a pattern: ${pattern}`)\r\n\t\t\t}\r\n\t\t\tthis.getContext().instructions = this.getContext().instructions.concat(\r\n\t\t\t\tpattern.split('')\r\n\t\t\t)\r\n\t\t\treturn\r\n\t\t}\r\n\r\n\t\tconst operator = match[1]\r\n\t\tconst before = pattern.slice(0, match.index)\r\n\t\tconst rightPart = pattern.slice(match.index + operator.length)\r\n\r\n\t\tswitch (operator) {\r\n\t\t\tcase '(?:':\r\n\t\t\t\tif (before) {\r\n\t\t\t\t\tthis.parsePattern(before)\r\n\t\t\t\t}\r\n\t\t\t\tthis.startContext({\r\n\t\t\t\t\tor: true,\r\n\t\t\t\t\tinstructions: [],\r\n\t\t\t\t\tbranches: []\r\n\t\t\t\t})\r\n\t\t\t\tbreak\r\n\r\n\t\t\tcase ')':\r\n\t\t\t\tif (!this.getContext().or) {\r\n\t\t\t\t\tthrow new Error('\")\" operator must be preceded by \"(?:\" operator')\r\n\t\t\t\t}\r\n\t\t\t\tif (before) {\r\n\t\t\t\t\tthis.parsePattern(before)\r\n\t\t\t\t}\r\n\t\t\t\tif (this.getContext().instructions.length === 0) {\r\n\t\t\t\t\tthrow new Error('No instructions found after \"|\" operator in an \"or\" group')\r\n\t\t\t\t}\r\n\t\t\t\tconst { branches } = this.getContext()\r\n\t\t\t\tbranches.push(\r\n\t\t\t\t\tthis.getContext().instructions\r\n\t\t\t\t)\r\n\t\t\t\tthis.endContext()\r\n\t\t\t\tthis.getContext().instructions.push({\r\n\t\t\t\t\top: '|',\r\n\t\t\t\t\targs: branches\r\n\t\t\t\t})\r\n\t\t\t\tbreak\r\n\r\n\t\t\tcase '|':\r\n\t\t\t\tif (!this.getContext().or) {\r\n\t\t\t\t\tthrow new Error('\"|\" operator can only be used inside \"or\" groups')\r\n\t\t\t\t}\r\n\t\t\t\tif (before) {\r\n\t\t\t\t\tthis.parsePattern(before)\r\n\t\t\t\t}\r\n\t\t\t\t// The top-level is an implicit \"or\" group, if required.\r\n\t\t\t\tif (!this.getContext().branches) {\r\n\t\t\t\t\t// `branches` are not defined only for the root implicit \"or\" operator.\r\n\t\t\t\t\t/* istanbul ignore else */\r\n\t\t\t\t\tif (this.context.length === 1) {\r\n\t\t\t\t\t\tthis.getContext().branches = []\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthrow new Error('\"branches\" not found in an \"or\" group context')\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tthis.getContext().branches.push(\r\n\t\t\t\t\tthis.getContext().instructions\r\n\t\t\t\t)\r\n\t\t\t\tthis.getContext().instructions = []\r\n\t\t\t\tbreak\r\n\r\n\t\t\tcase '[':\r\n\t\t\t\tif (before) {\r\n\t\t\t\t\tthis.parsePattern(before)\r\n\t\t\t\t}\r\n\t\t\t\tthis.startContext({\r\n\t\t\t\t\toneOfSet: true\r\n\t\t\t\t})\r\n\t\t\t\tbreak\r\n\r\n\t\t\tcase ']':\r\n\t\t\t\tif (!this.getContext().oneOfSet) {\r\n\t\t\t\t\tthrow new Error('\"]\" operator must be preceded by \"[\" operator')\r\n\t\t\t\t}\r\n\t\t\t\tthis.endContext()\r\n\t\t\t\tthis.getContext().instructions.push({\r\n\t\t\t\t\top: '[]',\r\n\t\t\t\t\targs: parseOneOfSet(before)\r\n\t\t\t\t})\r\n\t\t\t\tbreak\r\n\r\n\t\t\t/* istanbul ignore next */\r\n\t\t\tdefault:\r\n\t\t\t\tthrow new Error(`Unknown operator: ${operator}`)\r\n\t\t}\r\n\r\n\t\tif (rightPart) {\r\n\t\t\tthis.parsePattern(rightPart)\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction parseOneOfSet(pattern) {\r\n\tconst values = []\r\n\tlet i = 0\r\n\twhile (i < pattern.length) {\r\n\t\tif (pattern[i] === '-') {\r\n\t\t\tif (i === 0 || i === pattern.length - 1) {\r\n\t\t\t\tthrow new Error(`Couldn't parse a one-of set pattern: ${pattern}`)\r\n\t\t\t}\r\n\t\t\tconst prevValue = pattern[i - 1].charCodeAt(0) + 1\r\n\t\t\tconst nextValue = pattern[i + 1].charCodeAt(0) - 1\r\n\t\t\tlet value = prevValue\r\n\t\t\twhile (value <= nextValue) {\r\n\t\t\t\tvalues.push(String.fromCharCode(value))\r\n\t\t\t\tvalue++\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvalues.push(pattern[i])\r\n\t\t}\r\n\t\ti++\r\n\t}\r\n\treturn values\r\n}"],"mappings":";;;;;;;;;;;;;;;;;;;IAAqBA,c;EACpB,wBAAYC,OAAZ,EAAqB;IAAA;;IACpB,KAAKC,SAAL,GAAiB,IAAIC,aAAJ,GAAoBC,KAApB,CAA0BH,OAA1B,CAAjB;EACA;;;;WAED,eAAMI,MAAN,EAAsC;MAAA,+EAAJ,EAAI;MAAA,IAAtBC,aAAsB,QAAtBA,aAAsB;;MACrC,IAAI,CAACD,MAAL,EAAa;QACZ,MAAM,IAAIE,KAAJ,CAAU,oBAAV,CAAN;MACA;;MACD,IAAMC,MAAM,GAAGC,MAAK,CAACJ,MAAM,CAACK,KAAP,CAAa,EAAb,CAAD,EAAmB,KAAKR,SAAxB,EAAmC,IAAnC,CAApB;;MACA,IAAIM,MAAM,IAAIA,MAAM,CAACC,KAArB,EAA4B;QAC3B,OAAOD,MAAM,CAACG,YAAd;MACA;;MACD,IAAIH,MAAM,IAAIA,MAAM,CAACI,QAArB,EAA+B;QAC9B,IAAI,CAACN,aAAL,EAAoB;UACnB;QACA;MACD;;MACD,OAAOE,MAAP;IACA;;;;;;;;AAGF,SAASC,MAAT,CAAeI,UAAf,EAA2BC,IAA3B,EAAiCC,IA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AAIG,SAAJ,EAAe;QACd,KAAKV,YAAL,CAAkBU,SAAlB;MACA;IACD;;;;;;AAGF,SAASI,aAAT,CAAuBpD,OAAvB,EAAgC;EAC/B,IAAMqD,MAAM,GAAG,EAAf;EACA,IAAI7B,CAAC,GAAG,CAAR;;EACA,OAAOA,CAAC,GAAGxB,OAAO,CAACe,MAAnB,EAA2B;IAC1B,IAAIf,OAAO,CAACwB,CAAD,CAAP,KAAe,GAAnB,EAAwB;MACvB,IAAIA,CAAC,KAAK,CAAN,IAAWA,CAAC,KAAKxB,OAAO,CAACe,MAAR,GAAiB,CAAtC,EAAyC;QACxC,MAAM,IAAIT,KAAJ,gDAAkDN,OAAlD,EAAN;MACA;;MACD,IAAMsD,SAAS,GAAGtD,OAAO,CAACwB,CAAC,GAAG,CAAL,CAAP,CAAe+B,UAAf,CAA0B,CAA1B,IAA+B,CAAjD;MACA,IAAMC,SAAS,GAAGxD,OAAO,CAACwB,CAAC,GAAG,CAAL,CAAP,CAAe+B,UAAf,CAA0B,CAA1B,IAA+B,CAAjD;MACA,IAAIE,KAAK,GAAGH,SAAZ;;MACA,OAAOG,KAAK,IAAID,SAAhB,EAA2B;QAC1BH,MAAM,CAACZ,IAAP,CAAYiB,MAAM,CAACC,YAAP,CAAoBF,KAApB,CAAZ;QACAA,KAAK;MACL;IACD,CAXD,MAWO;MACNJ,MAAM,CAACZ,IAAP,CAAYzC,OAAO,CAACwB,CAAD,CAAnB;IACA;;IACDA,CAAC;EACD;;EACD,OAAO6B,MAAP;AACA"}
1
+ {"version":3,"file":"AsYouTypeFormatter.PatternMatcher.js","names":["PatternMatcher","pattern","matchTree","PatternParser","parse","string","allowOverflow","Error","result","match","split","matchedChars","overflow","characters","tree","last","characterString","join","indexOf","length","partialMatch","slice","Array","isArray","restCharacters","i","subtree","JSON","stringify","op","args","branch","char"],"sources":["../source/AsYouTypeFormatter.PatternMatcher.js"],"sourcesContent":["import PatternParser from './AsYouTypeFormatter.PatternParser.js'\r\n\r\nexport default class PatternMatcher {\r\n\tconstructor(pattern) {\r\n\t\tthis.matchTree = new PatternParser().parse(pattern)\r\n\t}\r\n\r\n\tmatch(string, { allowOverflow } = {}) {\r\n\t\tif (!string) {\r\n\t\t\tthrow new Error('String is required')\r\n\t\t}\r\n\t\tconst result = match(string.split(''), this.matchTree, true)\r\n\t\tif (result && result.match) {\r\n\t\t\tdelete result.matchedChars\r\n\t\t}\r\n\t\tif (result && result.overflow) {\r\n\t\t\tif (!allowOverflow) {\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result\r\n\t}\r\n}\r\n\r\n/**\r\n * Matches `characters` against a pattern compiled into a `tree`.\r\n * @param {string[]} characters\r\n * @param {Tree} tree — A pattern compiled into a `tree`. See the `*.d.ts` file for the description of the `tree` structure.\r\n * @param {boolean} last — Whether it's the last (rightmost) subtree on its level of the match tree.\r\n * @return {object} See the `*.d.ts` file for the description of the result object.\r\n */\r\nfunction match(characters, tree, last) {\r\n\t// If `tree` is a string, then `tree` is a single character.\r\n\t// That's because when a pattern is parsed, multi-character-string parts\r\n\t// of a pattern are compiled into arrays of single characters.\r\n\t// I still wrote this piece of code for a \"general\" hypothetical case\r\n\t// when `tree` could be a string of several characters, even though\r\n\t// such case is not possible with the current implementation.\r\n\tif (typeof tree === 'string') {\r\n\t\tconst characterString = characters.join('')\r\n\t\tif (tree.indexOf(characterString) === 0) {\r\n\t\t\t// `tree` is always a single character.\r\n\t\t\t// If `tree.indexOf(characterString) === 0`\r\n\t\t\t// then `characters.length === tree.length`.\r\n\t\t\t/* istanbul ignore else */\r\n\t\t\tif (characters.length === tree.length) {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tmatch: true,\r\n\t\t\t\t\tmatchedChars: characters\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// `tree` is always a single character.\r\n\t\t\t// If `tree.indexOf(characterString) === 0`\r\n\t\t\t// then `characters.length === tree.length`.\r\n\t\t\t/* istanbul ignore next */\r\n\t\t\treturn {\r\n\t\t\t\tpartialMatch: true,\r\n\t\t\t\t// matchedChars: characters\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (characterString.indexOf(tree) === 0) {\r\n\t\t\tif (last) {\r\n\t\t\t\t// The `else` path is not possible because `tree` is always a single character.\r\n\t\t\t\t// The `else` case for `characters.length > tree.length` would be\r\n\t\t\t\t// `characters.length <= tree.length` which means `characters.length <= 1`.\r\n\t\t\t\t// `characters` array can't be empty, so that means `characters === [tree]`,\r\n\t\t\t\t// which would also mean `tree.indexOf(characterString) === 0` and that'd mean\r\n\t\t\t\t// that the `if (tree.indexOf(characterString) === 0)` condition before this\r\n\t\t\t\t// `if` condition would be entered, and returned from there, not reaching this code.\r\n\t\t\t\t/* istanbul ignore else */\r\n\t\t\t\tif (characters.length > tree.length) {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\toverflow: true\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn {\r\n\t\t\t\tmatch: true,\r\n\t\t\t\tmatchedChars: characters.slice(0, tree.length)\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn\r\n\t}\r\n\r\n\tif (Array.isArray(tree)) {\r\n\t\tlet restCharacters = characters.slice()\r\n\t\tlet i = 0\r\n\t\twhile (i < tree.length) {\r\n\t\t\tconst subtree = tree[i]\r\n\t\t\tconst result = match(restCharacters, subtree, last && (i === tree.length - 1))\r\n\t\t\tif (!result) {\r\n\t\t\t\treturn\r\n\t\t\t} else if (result.overflow) {\r\n\t\t\t\treturn result\r\n\t\t\t} else if (result.match) {\r\n\t\t\t\t// Continue with the next subtree with the rest of the characters.\r\n\t\t\t\trestCharacters = restCharacters.slice(result.matchedChars.length)\r\n\t\t\t\tif (restCharacters.length === 0) {\r\n\t\t\t\t\tif (i === tree.length - 1) {\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\tmatch: true,\r\n\t\t\t\t\t\t\tmatchedChars: characters\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\tpartialMatch: true,\r\n\t\t\t\t\t\t\t// matchedChars: characters\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t/* istanbul ignore else */\r\n\t\t\t\tif (result.partialMatch) {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tpartialMatch: true,\r\n\t\t\t\t\t\t// matchedChars: characters\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new Error(`Unsupported match result:\\n${JSON.stringify(result, null, 2)}`)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ti++\r\n\t\t}\r\n\t\t// If `last` then overflow has already been checked\r\n\t\t// by the last element of the `tree` array.\r\n\t\t/* istanbul ignore if */\r\n\t\tif (last) {\r\n\t\t\treturn {\r\n\t\t\t\toverflow: true\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tmatch: true,\r\n\t\t\tmatchedChars: characters.slice(0, characters.length - restCharacters.length)\r\n\t\t}\r\n\t}\r\n\r\n\tswitch (tree.op) {\r\n\t\tcase '|':\r\n\t\t\tlet partialMatch\r\n\t\t\tfor (const branch of tree.args) {\r\n\t\t\t\tconst result = match(characters, branch, last)\r\n\t\t\t\tif (result) {\r\n\t\t\t\t\tif (result.overflow) {\r\n\t\t\t\t\t\treturn result\r\n\t\t\t\t\t} else if (result.match) {\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\tmatch: true,\r\n\t\t\t\t\t\t\tmatchedChars: result.matchedChars\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t/* istanbul ignore else */\r\n\t\t\t\t\t\tif (result.partialMatch) {\r\n\t\t\t\t\t\t\tpartialMatch = true\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tthrow new Error(`Unsupported match result:\\n${JSON.stringify(result, null, 2)}`)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (partialMatch) {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tpartialMatch: true,\r\n\t\t\t\t\t// matchedChars: ...\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Not even a partial match.\r\n\t\t\treturn\r\n\r\n\t\tcase '[]':\r\n\t\t\tfor (const char of tree.args) {\r\n\t\t\t\tif (characters[0] === char) {\r\n\t\t\t\t\tif (characters.length === 1) {\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\tmatch: true,\r\n\t\t\t\t\t\t\tmatchedChars: characters\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (last) {\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\toverflow: true\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tmatch: true,\r\n\t\t\t\t\t\tmatchedChars: [char]\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// No character matches.\r\n\t\t\treturn\r\n\r\n\t\t/* istanbul ignore next */\r\n\t\tdefault:\r\n\t\t\tthrow new Error(`Unsupported instruction tree: ${tree}`)\r\n\t}\r\n}"],"mappings":";;;;;;;AAAA;;;;;;;;;;;;;;;;IAEqBA,c;EACpB,wBAAYC,OAAZ,EAAqB;IAAA;;IACpB,KAAKC,SAAL,GAAiB,IAAIC,2CAAJ,GAAoBC,KAApB,CAA0BH,OAA1B,CAAjB;EACA;;;;WAED,eAAMI,MAAN,EAAsC;MAAA,+EAAJ,EAAI;MAAA,IAAtBC,aAAsB,QAAtBA,aAAsB;;MACrC,IAAI,CAACD,MAAL,EAAa;QACZ,MAAM,IAAIE,KAAJ,CAAU,oBAAV,CAAN;MACA;;MACD,IAAMC,MAAM,GAAGC,MAAK,CAACJ,MAAM,C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AAY,EAAEE;YAFR,CAAP;UAIA;;UACD,IAAIE,IAAJ,EAAU;YACT,OAAO;cACNH,QAAQ,EAAE;YADJ,CAAP;UAGA;;UACD,OAAO;YACNH,KAAK,EAAE,IADD;YAENE,YAAY,EAAE,CAACqB,KAAD;UAFR,CAAP;QAIA;MACD,CAnBF,CAoBC;;;MACA;;IAED;;IACA;MACC,MAAM,IAAIzB,KAAJ,yCAA2CO,IAA3C,EAAN;EAzDF;AA2DA"}
@@ -489,5 +489,14 @@ describe('AsYouTypeFormatter.PatternMatcher', function () {
489
489
  match: true
490
490
  });
491
491
  });
492
+ it('shouldn\'t match things that shouldn\'t match', function () {
493
+ // There was a bug: "leading digits" `"2"` matched "leading digits pattern" `"90"`.
494
+ // The incorrect `.match()` function result was `{ oveflow: true }`
495
+ // while it should've been `undefined`.
496
+ // https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/66
497
+ expect(new _AsYouTypeFormatterPatternMatcher["default"]('2').match('90', {
498
+ allowOverflow: true
499
+ })).to.be.undefined;
500
+ });
492
501
  });
493
502
  //# sourceMappingURL=AsYouTypeFormatter.PatternMatcher.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AsYouTypeFormatter.PatternMatcher.test.js","names":["describe","it","expect","PatternMatcher","to","matcher","match","be","undefined","should","deep","equal","allowOverflow","overflow","partialMatch"],"sources":["../source/AsYouTypeFormatter.PatternMatcher.test.js"],"sourcesContent":["import PatternMatcher from './AsYouTypeFormatter.PatternMatcher.js'\r\n\r\ndescribe('AsYouTypeFormatter.PatternMatcher', function() {\r\n\tit('should throw when no pattern is passed', function() {\r\n\t\texpect(() => new PatternMatcher()).to.throw('Pattern is required')\r\n\t})\r\n\r\n\tit('should throw when no string is passed', function() {\r\n\t\tconst matcher = new PatternMatcher('1')\r\n\t\texpect(() => matcher.match()).to.throw('String is required')\r\n\t})\r\n\r\n\tit('should throw on illegal characters', function() {\r\n\t\texpect(() => new PatternMatcher('4(5|6)7')).to.throw('Illegal characters')\r\n\t})\r\n\r\n\tit('should throw on an illegal ] operator', function() {\r\n\t\texpect(() => new PatternMatcher('4]7')).to.throw('\"]\" operator must be preceded by \"[\" operator')\r\n\t})\r\n\r\n\tit('should throw on an illegal - operator in a one-of set', function() {\r\n\t\texpect(() => new PatternMatcher('[-5]')).to.throw('Couldn\\'t parse a one-of set pattern: -5')\r\n\t})\r\n\r\n\tit('should throw on a non-finalized context', function() {\r\n\t\texpect(() => new PatternMatcher('4(?:5|7')).to.throw('Non-finalized contexts left when pattern parse ended')\r\n\t})\r\n\r\n\tit('should throw on an illegal (|) operator', function() {\r\n\t\texpect(() => new PatternMatcher('4(?:5|)7')).to.throw('No instructions found after \"|\" operator in an \"or\" group')\r\n\t})\r\n\r\n\tit('should throw on an illegal ) operator', function() {\r\n\t\texpect(() => new PatternMatcher('4[56)]7')).to.throw('\")\" operator must be preceded by \"(?:\" operator')\r\n\t})\r\n\r\n\tit('should throw on an illegal | operator', function() {\r\n\t\texpect(() => new PatternMatcher('4[5|6]7')).to.throw('operator can only be used inside \"or\" groups')\r\n\t})\r\n\r\n\tit('should match a one-digit pattern', function() {\r\n\t\tconst matcher = new PatternMatcher('4')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\tmatcher.match('4').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('44')).to.be.undefined\r\n\r\n\t\tmatcher.match('44', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match a two-digit pattern', function() {\r\n\t\tconst matcher = new PatternMatcher('44')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\tmatcher.match('4').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('44').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('444')).to.be.undefined\r\n\r\n\t\tmatcher.match('444', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('55')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match a one-digit one-of set (single digit)', function() {\r\n\t\tconst matcher = new PatternMatcher('[4]')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\tmatcher.match('4').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('44')).to.be.undefined\r\n\r\n\t\tmatcher.match('44', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match a one-digit one-of set (multiple digits)', function() {\r\n\t\tconst matcher = new PatternMatcher('[479]')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\tmatcher.match('4').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('44')).to.be.undefined\r\n\r\n\t\tmatcher.match('44', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match a one-digit one-of set using a dash notation (not inclusive)', function() {\r\n\t\tconst matcher = new PatternMatcher('[2-5]')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\tmatcher.match('4').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('44')).to.be.undefined\r\n\r\n\t\tmatcher.match('44', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match a one-digit one-of set using a dash notation (inclusive)', function() {\r\n\t\tconst matcher = new PatternMatcher('[3-4]')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\tmatcher.match('4').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('44')).to.be.undefined\r\n\r\n\t\tmatcher.match('44', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match a one-digit one-of set including a dash notation', function() {\r\n\t\tconst matcher = new PatternMatcher('[124-68]')\r\n\r\n\t\texpect(matcher.match('0')).to.be.undefined\r\n\r\n\t\tmatcher.match('1').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('2').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('3')).to.be.undefined\r\n\r\n\t\tmatcher.match('4').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('5').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('6').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('7')).to.be.undefined\r\n\r\n\t\tmatcher.match('8').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('9')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('88')).to.be.undefined\r\n\r\n\t\tmatcher.match('88', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match a two-digit one-of set', function() {\r\n\t\tconst matcher = new PatternMatcher('[479][45]')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\tmatcher.match('4').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('5')).to.be.undefined\r\n\t\texpect(matcher.match('55')).to.be.undefined\r\n\r\n\t\tmatcher.match('44').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('444')).to.be.undefined\r\n\r\n\t\tmatcher.match('444', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match a two-digit one-of set (regular digit and a one-of set)', function() {\r\n\t\tconst matcher = new PatternMatcher('1[45]')\r\n\r\n\t\texpect(matcher.match('0')).to.be.undefined\r\n\r\n\t\tmatcher.match('1').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('15').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('16')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match a pattern with an or group', function() {\r\n\t\tconst matcher = new PatternMatcher('7(?:1[0-68]|2[1-9])')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\tmatcher.match('7').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('71').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('73')).to.be.undefined\r\n\r\n\t\tmatcher.match('711').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('717')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('720')).to.be.undefined\r\n\r\n\t\tmatcher.match('722').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('7222')).to.be.undefined\r\n\r\n\t\tmatcher.match('7222', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match an or pattern containing or groups', function() {\r\n\t\tconst matcher = new PatternMatcher('2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\tmatcher.match('2').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('3').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('4')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('21')).to.be.undefined\r\n\r\n\t\tmatcher.match('22').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('221')).to.be.undefined\r\n\r\n\t\tmatcher.match('222').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('2222')).to.be.undefined\r\n\r\n\t\tmatcher.match('2222', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('3').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('33').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('332').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('333')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match an or pattern', function() {\r\n\t\tconst matcher = new PatternMatcher('6|8')\r\n\r\n\t\texpect(matcher.match('5')).to.be.undefined\r\n\r\n\t\tmatcher.match('6').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('7')).to.be.undefined\r\n\r\n\t\tmatcher.match('8').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match an or pattern (one-of sets)', function() {\r\n\t\tconst matcher = new PatternMatcher('[123]|[5-8]')\r\n\r\n\t\texpect(matcher.match('0')).to.be.undefined\r\n\r\n\t\tmatcher.match('1').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('2').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('3').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('4')).to.be.undefined\r\n\r\n\t\tmatcher.match('5').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('6').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('7').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('8').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('9')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('18')).to.be.undefined\r\n\r\n\t\tmatcher.match('18', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match an or pattern (different lengths)', function() {\r\n\t\tconst matcher = new PatternMatcher('60|8')\r\n\r\n\t\texpect(matcher.match('5')).to.be.undefined\r\n\r\n\t\tmatcher.match('6').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('60').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('61')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('7')).to.be.undefined\r\n\r\n\t\tmatcher.match('8').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('68')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match an or pattern (one-of sets) (different lengths)', function() {\r\n\t\tconst matcher = new PatternMatcher('[123]|[5-8][2-8]')\r\n\r\n\t\texpect(matcher.match('0')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match an or pattern (one-of sets and regular digits) (different lengths)', function() {\r\n\t\tconst matcher = new PatternMatcher('[2358][2-5]|4')\r\n\r\n\t\texpect(matcher.match('0')).to.be.undefined\r\n\r\n\t\tmatcher.match('2').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('21')).to.be.undefined\r\n\r\n\t\tmatcher.match('22').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('25').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('26')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('222')).to.be.undefined\r\n\r\n\t\tmatcher.match('222', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('3').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('4').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('6')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match an or pattern (one-of sets and regular digits mixed) (different lengths)', function() {\r\n\t\tconst matcher = new PatternMatcher('[2358]2|4')\r\n\r\n\t\texpect(matcher.match('0')).to.be.undefined\r\n\r\n\t\tmatcher.match('2').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('21')).to.be.undefined\r\n\r\n\t\tmatcher.match('22').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('222')).to.be.undefined\r\n\r\n\t\tmatcher.match('222', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('3').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('4').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('6')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match an or pattern (one-of sets groups and regular digits mixed) (different lengths)', function() {\r\n\t\tconst matcher = new PatternMatcher('1(?:11|[2-9])')\r\n\r\n\t\tmatcher.match('1').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('10')).to.be.undefined\r\n\r\n\t\tmatcher.match('11').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('111').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('1111')).to.be.undefined\r\n\r\n\t\tmatcher.match('1111', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('12').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('122')).to.be.undefined\r\n\r\n\t\tmatcher.match('19').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('5')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match nested or groups', function() {\r\n\t\tconst matcher = new PatternMatcher('1(?:2(?:3(?:4|5)|6)|7(?:8|9))0')\r\n\r\n\t\tmatcher.match('1').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('2')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('11')).to.be.undefined\r\n\r\n\t\tmatcher.match('12').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('121')).to.be.undefined\r\n\r\n\t\tmatcher.match('123').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('1231')).to.be.undefined\r\n\r\n\t\tmatcher.match('1234').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('12340').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('123401')).to.be.undefined\r\n\r\n\t\tmatcher.match('123401', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('12350').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('12360')).to.be.undefined\r\n\r\n\t\tmatcher.match('1260').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('1270')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('1770')).to.be.undefined\r\n\r\n\t\tmatcher.match('1780').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('1790').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('18')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match complex patterns', function() {\r\n\t\tconst matcher = new PatternMatcher('(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]')\r\n\r\n\t\texpect(matcher.match('0')).to.be.undefined\r\n\r\n\t\tmatcher.match('3').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('31').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('32')).to.be.undefined\r\n\r\n\t\tmatcher.match('316').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('315')).to.be.undefined\r\n\r\n\t\tmatcher.match('4').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('46').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('47')).to.be.undefined\r\n\r\n\t\tmatcher.match('5').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('50')).to.be.undefined\r\n\r\n\t\tmatcher.match('51').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('6').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('64')).to.be.undefined\r\n\r\n\t\tmatcher.match('65').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('650').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('654')).to.be.undefined\r\n\r\n\t\tmatcher.match('69').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('8').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('9').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\t})\r\n})"],"mappings":";;AAAA;;;;AAEAA,QAAQ,CAAC,mCAAD,EAAsC,YAAW;EACxDC,EAAE,CAAC,wCAAD,EAA2C,YAAW;IACvDC,MAAM,CAAC;MAAA,OAAM,IAAIC,4CAAJ,EAAN;IAAA,CAAD,CAAN,CAAmCC,EAAnC,UAA4C,qBAA5C;EACA,CAFC,CAAF;EAIAH,EAAE,CAAC,uCAAD,EAA0C,YAAW;IACtD,IAAMI,OAAO,GAAG,IAAIF,4CAAJ,CAAmB,GAAnB,CAAhB;IACAD,MAAM,CAAC;MAAA,OAAMG,OAAO,CAACC,KAAR,EAAN;IAAA,CAAD,CAAN,CAA8BF,EAA9B,UAAuC,oBAAvC;EACA,CAHC,CAAF;EAKAH,EAAE,CAAC,oCAAD,EAAuC,YAAW;IACnDC,MAAM,CAAC;MAAA,OAAM,IAAIC,4CAAJ,CAAmB,SAAnB,CAAN;IAAA,CAAD,CAAN,CAA4CC,EAA5C,UAAqD,oBAArD;EACA,CAFC,CAAF;EAIAH,EAAE,CAAC,uCAAD,EAA0C,YAAW;IACtDC,MAAM,CAAC;MAAA,OAAM,IAAIC,4CAAJ,CAAmB,KAAnB,CAAN;IAAA,CAAD,CAAN,CAAwCC,EAAxC,UAAiD,+CAAjD;EACA,CAFC,CAAF;EAIAH,EAAE,CAAC,uDAAD,EAA0D,YAAW;IACtEC,MAAM,CAAC;MAAA,OAAM,IAAIC,4CAAJ,CAAmB,MAAnB,CAAN;IAAA,CAAD,CAAN,CAAy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IAA3B,CAAgCC,KAAhC,CAAsC;MACrCL,KAAK,EAAE;IAD8B,CAAtC;IAIAD,OAAO,CAACC,KAAR,CAAc,GAAd,EAAmBG,MAAnB,CAA0BC,IAA1B,CAA+BC,KAA/B,CAAqC;MACpCG,YAAY,EAAE;IADsB,CAArC;IAIAZ,MAAM,CAACG,OAAO,CAACC,KAAR,CAAc,IAAd,CAAD,CAAN,CAA4BF,EAA5B,CAA+BG,EAA/B,CAAkCC,SAAlC;IAEAH,OAAO,CAACC,KAAR,CAAc,IAAd,EAAoBG,MAApB,CAA2BC,IAA3B,CAAgCC,KAAhC,CAAsC;MACrCG,YAAY,EAAE;IADuB,CAAtC;IAIAT,OAAO,CAACC,KAAR,CAAc,KAAd,EAAqBG,MAArB,CAA4BC,IAA5B,CAAiCC,KAAjC,CAAuC;MACtCL,KAAK,EAAE;IAD+B,CAAvC;IAIAJ,MAAM,CAACG,OAAO,CAACC,KAAR,CAAc,KAAd,CAAD,CAAN,CAA6BF,EAA7B,CAAgCG,EAAhC,CAAmCC,SAAnC;IAEAH,OAAO,CAACC,KAAR,CAAc,IAAd,EAAoBG,MAApB,CAA2BC,IAA3B,CAAgCC,KAAhC,CAAsC;MACrCL,KAAK,EAAE;IAD8B,CAAtC;IAIAD,OAAO,CAACC,KAAR,CAAc,GAAd,EAAmBG,MAAnB,CAA0BC,IAA1B,CAA+BC,KAA/B,CAAqC;MACpCL,KAAK,EAAE;IAD6B,CAArC;IAIAD,OAAO,CAACC,KAAR,CAAc,GAAd,EAAmBG,MAAnB,CAA0BC,IAA1B,CAA+BC,KAA/B,CAAqC;MACpCL,KAAK,EAAE;IAD6B,CAArC;EAGA,CApEC,CAAF;AAqEA,CAtnBO,CAAR"}
1
+ {"version":3,"file":"AsYouTypeFormatter.PatternMatcher.test.js","names":["describe","it","expect","PatternMatcher","to","matcher","match","be","undefined","should","deep","equal","allowOverflow","overflow","partialMatch"],"sources":["../source/AsYouTypeFormatter.PatternMatcher.test.js"],"sourcesContent":["import PatternMatcher from './AsYouTypeFormatter.PatternMatcher.js'\r\n\r\ndescribe('AsYouTypeFormatter.PatternMatcher', function() {\r\n\tit('should throw when no pattern is passed', function() {\r\n\t\texpect(() => new PatternMatcher()).to.throw('Pattern is required')\r\n\t})\r\n\r\n\tit('should throw when no string is passed', function() {\r\n\t\tconst matcher = new PatternMatcher('1')\r\n\t\texpect(() => matcher.match()).to.throw('String is required')\r\n\t})\r\n\r\n\tit('should throw on illegal characters', function() {\r\n\t\texpect(() => new PatternMatcher('4(5|6)7')).to.throw('Illegal characters')\r\n\t})\r\n\r\n\tit('should throw on an illegal ] operator', function() {\r\n\t\texpect(() => new PatternMatcher('4]7')).to.throw('\"]\" operator must be preceded by \"[\" operator')\r\n\t})\r\n\r\n\tit('should throw on an illegal - operator in a one-of set', function() {\r\n\t\texpect(() => new PatternMatcher('[-5]')).to.throw('Couldn\\'t parse a one-of set pattern: -5')\r\n\t})\r\n\r\n\tit('should throw on a non-finalized context', function() {\r\n\t\texpect(() => new PatternMatcher('4(?:5|7')).to.throw('Non-finalized contexts left when pattern parse ended')\r\n\t})\r\n\r\n\tit('should throw on an illegal (|) operator', function() {\r\n\t\texpect(() => new PatternMatcher('4(?:5|)7')).to.throw('No instructions found after \"|\" operator in an \"or\" group')\r\n\t})\r\n\r\n\tit('should throw on an illegal ) operator', function() {\r\n\t\texpect(() => new PatternMatcher('4[56)]7')).to.throw('\")\" operator must be preceded by \"(?:\" operator')\r\n\t})\r\n\r\n\tit('should throw on an illegal | operator', function() {\r\n\t\texpect(() => new PatternMatcher('4[5|6]7')).to.throw('operator can only be used inside \"or\" groups')\r\n\t})\r\n\r\n\tit('should match a one-digit pattern', function() {\r\n\t\tconst matcher = new PatternMatcher('4')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\tmatcher.match('4').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('44')).to.be.undefined\r\n\r\n\t\tmatcher.match('44', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match a two-digit pattern', function() {\r\n\t\tconst matcher = new PatternMatcher('44')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\tmatcher.match('4').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('44').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('444')).to.be.undefined\r\n\r\n\t\tmatcher.match('444', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('55')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match a one-digit one-of set (single digit)', function() {\r\n\t\tconst matcher = new PatternMatcher('[4]')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\tmatcher.match('4').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('44')).to.be.undefined\r\n\r\n\t\tmatcher.match('44', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match a one-digit one-of set (multiple digits)', function() {\r\n\t\tconst matcher = new PatternMatcher('[479]')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\tmatcher.match('4').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('44')).to.be.undefined\r\n\r\n\t\tmatcher.match('44', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match a one-digit one-of set using a dash notation (not inclusive)', function() {\r\n\t\tconst matcher = new PatternMatcher('[2-5]')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\tmatcher.match('4').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('44')).to.be.undefined\r\n\r\n\t\tmatcher.match('44', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match a one-digit one-of set using a dash notation (inclusive)', function() {\r\n\t\tconst matcher = new PatternMatcher('[3-4]')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\tmatcher.match('4').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('44')).to.be.undefined\r\n\r\n\t\tmatcher.match('44', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match a one-digit one-of set including a dash notation', function() {\r\n\t\tconst matcher = new PatternMatcher('[124-68]')\r\n\r\n\t\texpect(matcher.match('0')).to.be.undefined\r\n\r\n\t\tmatcher.match('1').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('2').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('3')).to.be.undefined\r\n\r\n\t\tmatcher.match('4').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('5').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('6').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('7')).to.be.undefined\r\n\r\n\t\tmatcher.match('8').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('9')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('88')).to.be.undefined\r\n\r\n\t\tmatcher.match('88', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match a two-digit one-of set', function() {\r\n\t\tconst matcher = new PatternMatcher('[479][45]')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\tmatcher.match('4').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('5')).to.be.undefined\r\n\t\texpect(matcher.match('55')).to.be.undefined\r\n\r\n\t\tmatcher.match('44').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('444')).to.be.undefined\r\n\r\n\t\tmatcher.match('444', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match a two-digit one-of set (regular digit and a one-of set)', function() {\r\n\t\tconst matcher = new PatternMatcher('1[45]')\r\n\r\n\t\texpect(matcher.match('0')).to.be.undefined\r\n\r\n\t\tmatcher.match('1').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('15').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('16')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match a pattern with an or group', function() {\r\n\t\tconst matcher = new PatternMatcher('7(?:1[0-68]|2[1-9])')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\tmatcher.match('7').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('71').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('73')).to.be.undefined\r\n\r\n\t\tmatcher.match('711').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('717')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('720')).to.be.undefined\r\n\r\n\t\tmatcher.match('722').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('7222')).to.be.undefined\r\n\r\n\t\tmatcher.match('7222', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match an or pattern containing or groups', function() {\r\n\t\tconst matcher = new PatternMatcher('2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\tmatcher.match('2').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('3').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('4')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('21')).to.be.undefined\r\n\r\n\t\tmatcher.match('22').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('221')).to.be.undefined\r\n\r\n\t\tmatcher.match('222').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('2222')).to.be.undefined\r\n\r\n\t\tmatcher.match('2222', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('3').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('33').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('332').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('333')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match an or pattern', function() {\r\n\t\tconst matcher = new PatternMatcher('6|8')\r\n\r\n\t\texpect(matcher.match('5')).to.be.undefined\r\n\r\n\t\tmatcher.match('6').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('7')).to.be.undefined\r\n\r\n\t\tmatcher.match('8').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match an or pattern (one-of sets)', function() {\r\n\t\tconst matcher = new PatternMatcher('[123]|[5-8]')\r\n\r\n\t\texpect(matcher.match('0')).to.be.undefined\r\n\r\n\t\tmatcher.match('1').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('2').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('3').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('4')).to.be.undefined\r\n\r\n\t\tmatcher.match('5').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('6').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('7').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('8').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('9')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('18')).to.be.undefined\r\n\r\n\t\tmatcher.match('18', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match an or pattern (different lengths)', function() {\r\n\t\tconst matcher = new PatternMatcher('60|8')\r\n\r\n\t\texpect(matcher.match('5')).to.be.undefined\r\n\r\n\t\tmatcher.match('6').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('60').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('61')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('7')).to.be.undefined\r\n\r\n\t\tmatcher.match('8').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('68')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match an or pattern (one-of sets) (different lengths)', function() {\r\n\t\tconst matcher = new PatternMatcher('[123]|[5-8][2-8]')\r\n\r\n\t\texpect(matcher.match('0')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match an or pattern (one-of sets and regular digits) (different lengths)', function() {\r\n\t\tconst matcher = new PatternMatcher('[2358][2-5]|4')\r\n\r\n\t\texpect(matcher.match('0')).to.be.undefined\r\n\r\n\t\tmatcher.match('2').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('21')).to.be.undefined\r\n\r\n\t\tmatcher.match('22').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('25').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('26')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('222')).to.be.undefined\r\n\r\n\t\tmatcher.match('222', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('3').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('4').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('6')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match an or pattern (one-of sets and regular digits mixed) (different lengths)', function() {\r\n\t\tconst matcher = new PatternMatcher('[2358]2|4')\r\n\r\n\t\texpect(matcher.match('0')).to.be.undefined\r\n\r\n\t\tmatcher.match('2').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('21')).to.be.undefined\r\n\r\n\t\tmatcher.match('22').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('222')).to.be.undefined\r\n\r\n\t\tmatcher.match('222', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('3').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('4').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('6')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match an or pattern (one-of sets groups and regular digits mixed) (different lengths)', function() {\r\n\t\tconst matcher = new PatternMatcher('1(?:11|[2-9])')\r\n\r\n\t\tmatcher.match('1').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('10')).to.be.undefined\r\n\r\n\t\tmatcher.match('11').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('111').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('1111')).to.be.undefined\r\n\r\n\t\tmatcher.match('1111', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('12').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('122')).to.be.undefined\r\n\r\n\t\tmatcher.match('19').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('5')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match nested or groups', function() {\r\n\t\tconst matcher = new PatternMatcher('1(?:2(?:3(?:4|5)|6)|7(?:8|9))0')\r\n\r\n\t\tmatcher.match('1').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('2')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('11')).to.be.undefined\r\n\r\n\t\tmatcher.match('12').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('121')).to.be.undefined\r\n\r\n\t\tmatcher.match('123').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('1231')).to.be.undefined\r\n\r\n\t\tmatcher.match('1234').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('12340').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('123401')).to.be.undefined\r\n\r\n\t\tmatcher.match('123401', { allowOverflow: true }).should.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('12350').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('12360')).to.be.undefined\r\n\r\n\t\tmatcher.match('1260').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('1270')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('1770')).to.be.undefined\r\n\r\n\t\tmatcher.match('1780').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('1790').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('18')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match complex patterns', function() {\r\n\t\tconst matcher = new PatternMatcher('(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]')\r\n\r\n\t\texpect(matcher.match('0')).to.be.undefined\r\n\r\n\t\tmatcher.match('3').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('31').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('32')).to.be.undefined\r\n\r\n\t\tmatcher.match('316').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('315')).to.be.undefined\r\n\r\n\t\tmatcher.match('4').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('46').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('47')).to.be.undefined\r\n\r\n\t\tmatcher.match('5').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('50')).to.be.undefined\r\n\r\n\t\tmatcher.match('51').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('6').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('64')).to.be.undefined\r\n\r\n\t\tmatcher.match('65').should.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('650').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('654')).to.be.undefined\r\n\r\n\t\tmatcher.match('69').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('8').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\tmatcher.match('9').should.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('shouldn\\'t match things that shouldn\\'t match', function() {\r\n\t\t// There was a bug: \"leading digits\" `\"2\"` matched \"leading digits pattern\" `\"90\"`.\r\n\t\t// The incorrect `.match()` function result was `{ oveflow: true }`\r\n\t\t// while it should've been `undefined`.\r\n\t\t// https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/66\r\n\t\texpect(new PatternMatcher('2').match('90', { allowOverflow: true })).to.be.undefined\r\n\t})\r\n})"],"mappings":";;AAAA;;;;AAEAA,QAAQ,CAAC,mCAAD,EAAsC,YAAW;EACxDC,EAAE,CAAC,wCAAD,EAA2C,YAAW;IACvDC,MAAM,CAAC;MAAA,OAAM,IAAIC,4CAAJ,EAAN;IAAA,CAAD,CAAN,CAAmCC,EAAnC,UAA4C,qBAA5C;EACA,CAFC,CAAF;EAIAH,EAAE,CAAC,uCAAD,EAA0C,YAAW;IACtD,IAAMI,OAAO,GAAG,IAAIF,4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