adp-web-components 0.1.80 → 0.1.83

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 (234) hide show
  1. package/dist/cjs/dead-stock-lookup_3.cjs.entry.js +8 -50
  2. package/dist/cjs/flexible-container.cjs.entry.js +1 -1
  3. package/dist/cjs/form-checkbox.cjs.entry.js +2 -2
  4. package/dist/cjs/form-dialog_13.cjs.entry.js +18 -5
  5. package/dist/cjs/{form-input-DH-U4kEM.js → form-input-CfVsbpFP.js} +1 -1
  6. package/dist/cjs/form-input_4.cjs.entry.js +4 -3
  7. package/dist/cjs/form-switch.cjs.entry.js +2 -2
  8. package/dist/cjs/general-form.cjs.entry.js +5 -5
  9. package/dist/cjs/general-inquiry-form.cjs.entry.js +5 -5
  10. package/dist/cjs/{get-language-from-url-D5rCyA1u.js → get-language-from-url-DoohcPbK.js} +3 -2
  11. package/dist/cjs/{get-local-language-D02WksZl.js → get-local-language-BqsQehIb.js} +1 -1
  12. package/dist/cjs/get-mock-files-C2Z4_Unw.js +53 -0
  13. package/dist/cjs/information-table.cjs.entry.js +1 -1
  14. package/dist/cjs/loader.cjs.js +1 -1
  15. package/dist/cjs/loading-spinner.cjs.entry.js +1 -1
  16. package/dist/cjs/manufacturer-part-lookup.cjs.entry.js +3 -3
  17. package/dist/cjs/part-lookup.cjs.entry.js +2 -2
  18. package/dist/cjs/{phone-validator-D6nzYTs8.js → phone-validator-CxBpDoPc.js} +300 -1184
  19. package/dist/cjs/service-booking-form.cjs.entry.js +5 -5
  20. package/dist/cjs/shift-checkbox.cjs.entry.js +1 -1
  21. package/dist/cjs/shift-components.cjs.js +1 -1
  22. package/dist/cjs/shift-switch.cjs.entry.js +1 -1
  23. package/dist/cjs/shift-tab-content.cjs.entry.js +1 -1
  24. package/dist/cjs/shift-tabs_2.cjs.entry.js +2 -2
  25. package/dist/cjs/ssc-lookup-form.cjs.entry.js +5 -5
  26. package/dist/cjs/{state-object-B2D8PkT8.js → state-object-Cemo_BvB.js} +23 -1
  27. package/dist/cjs/test-drive-form.cjs.entry.js +5 -5
  28. package/dist/cjs/{validation-N-XMdEIM.js → validation-BAHdEc4w.js} +6 -0
  29. package/dist/cjs/vehicle-accessories_7.cjs.entry.js +8 -8
  30. package/dist/cjs/vehicle-lookup.cjs.entry.js +20 -2
  31. package/dist/cjs/vehicle-quotation-form.cjs.entry.js +3 -3
  32. package/dist/collection/components/components/empty.css +1 -1
  33. package/dist/collection/components/components/flexible-container.css +1 -1
  34. package/dist/collection/components/components/information-table.css +1 -1
  35. package/dist/collection/components/components/loading-spinner.css +1 -1
  36. package/dist/collection/components/components/shift-tab-content.css +1 -1
  37. package/dist/collection/components/components/shift-tabs.css +1 -1
  38. package/dist/collection/components/form-elements/form-input-preview.js +15 -2
  39. package/dist/collection/components/form-elements/form-select.js +22 -1
  40. package/dist/collection/components/forms/defaults/mappers.js +22 -0
  41. package/dist/collection/components/forms/defaults/validation.js +6 -0
  42. package/dist/collection/components/part-lookup/dead-stock-lookup.css +1 -1
  43. package/dist/collection/components/part-lookup/distributor-lookup.css +1 -1
  44. package/dist/collection/components/part-lookup/manufacturer-lookup.css +1 -1
  45. package/dist/collection/components/part-lookup/manufacturer-part-lookup.css +1 -1
  46. package/dist/collection/components/part-lookup/part-lookup.css +1 -1
  47. package/dist/collection/components/vehicle-lookup/vehicle-accessories.css +1 -1
  48. package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.css +1 -1
  49. package/dist/collection/components/vehicle-lookup/vehicle-item-claim-form.css +1 -1
  50. package/dist/collection/components/vehicle-lookup/vehicle-lookup.css +1 -1
  51. package/dist/collection/components/vehicle-lookup/vehicle-lookup.js +40 -0
  52. package/dist/collection/components/vehicle-lookup/vehicle-paint-thickness.css +1 -1
  53. package/dist/collection/components/vehicle-lookup/vehicle-sale-information.css +1 -1
  54. package/dist/collection/components/vehicle-lookup/vehicle-service-history.css +1 -1
  55. package/dist/collection/components/vehicle-lookup/vehicle-specification.css +1 -1
  56. package/dist/collection/components/vehicle-lookup/vehicle-warranty-details.css +1 -1
  57. package/dist/collection/features/form-hook/form-hook.js +3 -2
  58. package/dist/collection/features/form-hook/functions.js +1 -3
  59. package/dist/collection/features/mocks/types.js +2 -2
  60. package/dist/collection/templates/vehicle-lookup/mock-loader.js +26 -0
  61. package/dist/components/dead-stock-lookup.js +1 -1
  62. package/dist/components/distributor-lookup.js +1 -1
  63. package/dist/components/flexible-container.js +1 -1
  64. package/dist/components/form-checkbox.js +1 -1
  65. package/dist/components/form-file.js +1 -1
  66. package/dist/components/form-input-preview.js +1 -1
  67. package/dist/components/form-input.js +1 -1
  68. package/dist/components/form-phone-number.js +1 -1
  69. package/dist/components/form-picker-input.js +1 -1
  70. package/dist/components/form-select.js +1 -1
  71. package/dist/components/form-structure-error.js +1 -1
  72. package/dist/components/form-structure.js +1 -1
  73. package/dist/components/form-switch.js +1 -1
  74. package/dist/components/form-text-area.js +1 -1
  75. package/dist/components/form-vin-input.js +1 -1
  76. package/dist/components/general-form.js +1 -1
  77. package/dist/components/general-inquiry-form.js +1 -1
  78. package/dist/components/information-table.js +1 -1
  79. package/dist/components/loading-spinner.js +1 -1
  80. package/dist/components/manufacturer-lookup.js +1 -1
  81. package/dist/components/manufacturer-part-lookup.js +1 -1
  82. package/dist/components/p-2M80mQ92.js +5 -0
  83. package/dist/components/{p-BiRjebkj.js → p-B7266ldU.js} +1 -1
  84. package/dist/components/p-BAn6k5iz.js +5 -0
  85. package/dist/components/{p-DY9gBU2J.js → p-BDvrnHcY.js} +1 -1
  86. package/dist/components/{p-DwyZCgYl.js → p-BUfelosa.js} +1 -1
  87. package/dist/components/{p-B14TvlWp.js → p-B_3K7xd3.js} +1 -1
  88. package/dist/components/p-Bcsn5xTx.js +5 -0
  89. package/dist/components/p-Buh0GWQA.js +5 -0
  90. package/dist/components/{p-BN3IFAWI.js → p-BwhGGY5t.js} +1 -1
  91. package/dist/components/{p-BFaCcwNv.js → p-C2FTnHaq.js} +1 -1
  92. package/dist/components/p-CAVJT1jj.js +5 -0
  93. package/dist/components/{p-DtCTkfsR.js → p-CCNDnApR.js} +1 -1
  94. package/dist/components/{p-CvoSPdhp.js → p-CFEn7Z9i.js} +1 -1
  95. package/dist/components/p-CHHtVaQS.js +5 -0
  96. package/dist/components/{p-DhQjm81u.js → p-CJDU6RVS.js} +1 -1
  97. package/dist/components/{p-CXoG03EM.js → p-COPzLsOv.js} +1 -1
  98. package/dist/components/{p-COS-bXsj.js → p-CRhdQvF0.js} +1 -1
  99. package/dist/components/{p-dM4PJkDk.js → p-C_A19Fb6.js} +1 -1
  100. package/dist/components/p-CfQGsxXq.js +5 -0
  101. package/dist/components/{p-D0oHH_yi.js → p-DGTzlRjc.js} +1 -1
  102. package/dist/components/{p-MJwr71KB.js → p-DJaWpqrV.js} +1 -1
  103. package/dist/components/p-DUL5kvyB.js +5 -0
  104. package/dist/components/p-DecFn5UV.js +5 -0
  105. package/dist/components/p-DesHNFME.js +5 -0
  106. package/dist/components/{p-8IdtkeX1.js → p-Dlt99ZuK.js} +1 -1
  107. package/dist/components/{p-B807sG0U.js → p-DqPjMHKd.js} +1 -1
  108. package/dist/components/{p-CeUdMJED.js → p-Dwo9gLGh.js} +1 -1
  109. package/dist/components/{p-CqTxdwgo.js → p-Dzxpac8N.js} +1 -1
  110. package/dist/components/p-DzzFOOEI.js +5 -0
  111. package/dist/components/{p-QsYqPaPW.js → p-HrmJ9PLe.js} +1 -1
  112. package/dist/components/{p-Dj3_tuTX.js → p-RMnat5PD.js} +1 -1
  113. package/dist/components/p-RvrrVwVv.js +5 -0
  114. package/dist/components/p-YHkues1M.js +5 -0
  115. package/dist/components/p-d53FlScY.js +5 -0
  116. package/dist/components/{p-CjZxWPIE.js → p-pjW67FwP.js} +1 -1
  117. package/dist/components/p-ri6ceTKZ.js +5 -0
  118. package/dist/components/part-lookup.js +1 -1
  119. package/dist/components/service-booking-form.js +1 -1
  120. package/dist/components/shift-accordion.js +1 -1
  121. package/dist/components/shift-checkbox.js +1 -1
  122. package/dist/components/shift-slider.js +1 -1
  123. package/dist/components/shift-switch.js +1 -1
  124. package/dist/components/shift-tab-content.js +1 -1
  125. package/dist/components/shift-tabs.js +1 -1
  126. package/dist/components/ssc-lookup-form.js +1 -1
  127. package/dist/components/test-drive-form.js +1 -1
  128. package/dist/components/vehicle-accessories.js +1 -1
  129. package/dist/components/vehicle-claimable-items.js +1 -1
  130. package/dist/components/vehicle-item-claim-form.js +1 -1
  131. package/dist/components/vehicle-lookup.js +1 -1
  132. package/dist/components/vehicle-paint-thickness.js +1 -1
  133. package/dist/components/vehicle-quotation-form.js +1 -1
  134. package/dist/components/vehicle-sale-information.js +1 -1
  135. package/dist/components/vehicle-service-history.js +1 -1
  136. package/dist/components/vehicle-specification.js +1 -1
  137. package/dist/components/vehicle-warranty-details.js +1 -1
  138. package/dist/esm/dead-stock-lookup_3.entry.js +5 -47
  139. package/dist/esm/flexible-container.entry.js +1 -1
  140. package/dist/esm/form-checkbox.entry.js +2 -2
  141. package/dist/esm/form-dialog_13.entry.js +18 -5
  142. package/dist/esm/{form-input-DKjuSVBS.js → form-input-BZhw7_xV.js} +1 -1
  143. package/dist/esm/form-input_4.entry.js +4 -3
  144. package/dist/esm/form-switch.entry.js +2 -2
  145. package/dist/esm/general-form.entry.js +5 -5
  146. package/dist/esm/general-inquiry-form.entry.js +5 -5
  147. package/dist/esm/{get-language-from-url-fGWv4JfI.js → get-language-from-url-X9X1Ax8Z.js} +3 -2
  148. package/dist/esm/{get-local-language-DtdpsfQH.js → get-local-language-DdBv5ynw.js} +1 -1
  149. package/dist/esm/get-mock-files-Crv0Pee_.js +51 -0
  150. package/dist/esm/information-table.entry.js +1 -1
  151. package/dist/esm/loader.js +1 -1
  152. package/dist/esm/loading-spinner.entry.js +1 -1
  153. package/dist/esm/manufacturer-part-lookup.entry.js +3 -3
  154. package/dist/esm/part-lookup.entry.js +2 -2
  155. package/dist/esm/{phone-validator-CW0vHN1w.js → phone-validator-B48RfgJW.js} +300 -1184
  156. package/dist/esm/service-booking-form.entry.js +5 -5
  157. package/dist/esm/shift-checkbox.entry.js +1 -1
  158. package/dist/esm/shift-components.js +1 -1
  159. package/dist/esm/shift-switch.entry.js +1 -1
  160. package/dist/esm/shift-tab-content.entry.js +1 -1
  161. package/dist/esm/shift-tabs_2.entry.js +2 -2
  162. package/dist/esm/ssc-lookup-form.entry.js +5 -5
  163. package/dist/esm/{state-object-D__N3A52.js → state-object-DkkyIaIc.js} +23 -1
  164. package/dist/esm/test-drive-form.entry.js +5 -5
  165. package/dist/esm/{validation-CjIBF497.js → validation-DI1MnYKr.js} +6 -0
  166. package/dist/esm/vehicle-accessories_7.entry.js +8 -8
  167. package/dist/esm/vehicle-lookup.entry.js +20 -2
  168. package/dist/esm/vehicle-quotation-form.entry.js +3 -3
  169. package/dist/mocks/generated/standard-dealer/part-lookup.json +129 -0
  170. package/dist/mocks/generated/standard-dealer/vehicle-lookup.json +240 -0
  171. package/dist/shift-components/{p-9d25df8c.entry.js → p-17d8199b.entry.js} +1 -1
  172. package/dist/shift-components/{p-a6ad0fdf.entry.js → p-1cb2457b.entry.js} +1 -1
  173. package/dist/shift-components/{p-fd8ec358.entry.js → p-296ccfd9.entry.js} +1 -1
  174. package/dist/shift-components/{p-dcde6026.entry.js → p-2e50289a.entry.js} +1 -1
  175. package/dist/shift-components/{p-0ea039a0.entry.js → p-2fe3538e.entry.js} +1 -1
  176. package/dist/shift-components/{p-49803ea5.entry.js → p-417600b6.entry.js} +1 -1
  177. package/dist/shift-components/p-573d1313.entry.js +5 -0
  178. package/dist/shift-components/{p-136ce48d.entry.js → p-57fdf787.entry.js} +1 -1
  179. package/dist/shift-components/{p-00514dfd.entry.js → p-7de1057e.entry.js} +1 -1
  180. package/dist/shift-components/{p-37bbc653.entry.js → p-8079b426.entry.js} +1 -1
  181. package/dist/shift-components/p-880c7995.entry.js +5 -0
  182. package/dist/shift-components/p-93d7eaa0.entry.js +5 -0
  183. package/dist/shift-components/{p-DOaMIJLj.js → p-B1_PA5hq.js} +1 -1
  184. package/dist/shift-components/{p-zqc-VRCh.js → p-BJJ8dVwO.js} +1 -1
  185. package/dist/shift-components/{p-DFsecEMm.js → p-BO1gEyb6.js} +1 -1
  186. package/dist/shift-components/p-CIjUcLUD.js +5 -0
  187. package/dist/shift-components/p-CUEKpDuL.js +5 -0
  188. package/dist/shift-components/p-Cm_2J53u.js +5 -0
  189. package/dist/shift-components/p-LS7zYjdk.js +5 -0
  190. package/dist/shift-components/{p-2cb2cf2c.entry.js → p-a65c7ffb.entry.js} +1 -1
  191. package/dist/shift-components/p-b5f4ae44.entry.js +5 -0
  192. package/dist/shift-components/{p-fa57b412.entry.js → p-bc069fd2.entry.js} +1 -1
  193. package/dist/shift-components/p-cd20a29e.entry.js +5 -0
  194. package/dist/shift-components/{p-3eb1890a.entry.js → p-cff21232.entry.js} +1 -1
  195. package/dist/shift-components/p-df2434ff.entry.js +5 -0
  196. package/dist/shift-components/p-e7ac7d2c.entry.js +5 -0
  197. package/dist/shift-components/{p-8049016c.entry.js → p-f4914abc.entry.js} +1 -1
  198. package/dist/shift-components/p-f78a1839.entry.js +5 -0
  199. package/dist/shift-components/{p-31193ab5.entry.js → p-face9d3f.entry.js} +1 -1
  200. package/dist/shift-components/shift-components.esm.js +1 -1
  201. package/dist/types/components/form-elements/form-input-preview.d.ts +1 -0
  202. package/dist/types/components/form-elements/form-select.d.ts +1 -0
  203. package/dist/types/components/forms/defaults/mappers.d.ts +4 -0
  204. package/dist/types/components/forms/defaults/validation.d.ts +2 -0
  205. package/dist/types/components/vehicle-lookup/vehicle-lookup.d.ts +3 -0
  206. package/dist/types/components.d.ts +16 -0
  207. package/dist/types/features/mocks/types.d.ts +2 -2
  208. package/package.json +1 -1
  209. package/dist/components/p-B68P3DtP.js +0 -5
  210. package/dist/components/p-B9Kquvk4.js +0 -5
  211. package/dist/components/p-CPGswmtd.js +0 -5
  212. package/dist/components/p-CXzb5oyt.js +0 -5
  213. package/dist/components/p-CZ_bF39p.js +0 -5
  214. package/dist/components/p-DKzEP2g4.js +0 -5
  215. package/dist/components/p-DOS_lP0E.js +0 -5
  216. package/dist/components/p-D_bnut2e.js +0 -5
  217. package/dist/components/p-MdiEjk1X.js +0 -5
  218. package/dist/components/p-VufjPJkT.js +0 -5
  219. package/dist/components/p-aHqL2KKd.js +0 -5
  220. package/dist/components/p-gEeo-RSf.js +0 -5
  221. package/dist/components/p-rvbbkr0i.js +0 -5
  222. package/dist/components/p-zyFVlTck.js +0 -5
  223. package/dist/mocks/part-lookup.json +0 -281
  224. package/dist/shift-components/p-16eb4c57.entry.js +0 -5
  225. package/dist/shift-components/p-6fca3b48.entry.js +0 -5
  226. package/dist/shift-components/p-9b910889.entry.js +0 -5
  227. package/dist/shift-components/p-D-IGTVAo.js +0 -5
  228. package/dist/shift-components/p-DCHyQw_L.js +0 -5
  229. package/dist/shift-components/p-D_IVXzoK.js +0 -5
  230. package/dist/shift-components/p-b1f9f6e3.entry.js +0 -5
  231. package/dist/shift-components/p-baa868f8.entry.js +0 -5
  232. package/dist/shift-components/p-d26ff83d.entry.js +0 -5
  233. package/dist/shift-components/p-d915cd1c.entry.js +0 -5
  234. package/dist/shift-components/p-e2d72fb9.entry.js +0 -5
@@ -2,9 +2,9 @@
2
2
  * Built by ShiftSoftware
3
3
  * Copyright (c)
4
4
  */
5
- import { F as FormHook } from './get-language-from-url-fGWv4JfI.js';
5
+ import { F as FormHook } from './get-language-from-url-X9X1Ax8Z.js';
6
6
  import './types-BDhR4pDq.js';
7
- import { b as getSharedFormLocal } from './get-local-language-DtdpsfQH.js';
7
+ import { b as getSharedFormLocal } from './get-local-language-DdBv5ynw.js';
8
8
  import { d as dateFnsExports } from './loader-icon-DM4Vm5gX.js';
9
9
 
10
10
  function parseLooseJson(loose) {
@@ -57,20 +57,239 @@ async function fetchJson(url) {
57
57
  return data;
58
58
  }
59
59
 
60
+ const formLanguageChange = async (formContext, newLanguage) => {
61
+ var _a, _b, _c, _d, _e;
62
+ const sharedLocales = await getSharedFormLocal(newLanguage);
63
+ const LS = (_b = (_a = formContext.structure) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.localization;
64
+ const structureLocalization = typeof LS === 'object' ? ((_d = (_c = LS === null || LS === void 0 ? void 0 : LS[newLanguage]) !== null && _c !== void 0 ? _c : LS === null || LS === void 0 ? void 0 : LS.en) !== null && _d !== void 0 ? _d : {}) : {};
65
+ formContext.locale = Object.assign(Object.assign({}, structureLocalization), { sharedFormLocales: Object.assign(Object.assign({}, sharedLocales), structureLocalization === null || structureLocalization === void 0 ? void 0 : structureLocalization.sharedFormLocales) });
66
+ formContext.localeLanguage = newLanguage;
67
+ (_e = formContext.form) === null || _e === void 0 ? void 0 : _e.rerender({ rerenderAll: true });
68
+ };
69
+ const formErrorHandler = async (formContext, error) => {
70
+ var _a, _b, _c;
71
+ const message = error.message || ((_c = (_b = (_a = formContext.locale) === null || _a === void 0 ? void 0 : _a.sharedFormLocales) === null || _b === void 0 ? void 0 : _b.errors) === null || _c === void 0 ? void 0 : _c.wildCard) || '';
72
+ if (formContext === null || formContext === void 0 ? void 0 : formContext.errorCallback)
73
+ formContext.errorCallback(error, message);
74
+ else
75
+ formContext.errorMessage = message;
76
+ };
77
+ const formLoadingHandler = async (formContext, isLoading) => {
78
+ formContext.isLoading = isLoading;
79
+ if (formContext.loadingChanges)
80
+ formContext.loadingChanges(isLoading);
81
+ };
82
+ const formSuccessHandler = async (formContext, data) => {
83
+ if (formContext.successCallback)
84
+ formContext.successCallback(data, formContext.locale['Form submitted successfully.'] || '');
85
+ else
86
+ formContext.form.openDialog();
87
+ if (!formContext.disableScrollToTop) {
88
+ const formDom = formContext.el.shadowRoot || formContext.el;
89
+ let targetElement = formDom instanceof ShadowRoot ? formDom.firstElementChild : formDom;
90
+ const yOffset = -100;
91
+ const y = targetElement.getBoundingClientRect().top + window.pageYOffset + yOffset;
92
+ window.scrollTo({ top: Math.max(y, 0), behavior: 'smooth' });
93
+ }
94
+ };
95
+ const formDidLoadHandler = async (formContext, validator) => {
96
+ var _a, _b;
97
+ if (!formContext.structure) {
98
+ if (formContext.gistId) {
99
+ const [newGistStructure] = await Promise.all([gistLoader(formContext.gistId), formContext.changeLanguage(formContext.language)]);
100
+ formContext.structure = newGistStructure;
101
+ }
102
+ else if (formContext.structureUrl) {
103
+ const [newGistStructure] = await Promise.all([fetchJson(formContext.structureUrl), formContext.changeLanguage(formContext.language)]);
104
+ formContext.structure = newGistStructure;
105
+ }
106
+ }
107
+ formContext.localeLanguage = formContext.language;
108
+ await formContext.changeLanguage(formContext.language);
109
+ if (!formContext.isMobileForm) {
110
+ try {
111
+ const key = (_b = (_a = formContext.structure) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.recaptchaKey;
112
+ if (key) {
113
+ const script = document.createElement('script');
114
+ script.src = `https://www.google.com/recaptcha/api.js?render=${key}&hl=${formContext.language}`;
115
+ script.async = true;
116
+ script.defer = true;
117
+ document.head.appendChild(script);
118
+ }
119
+ }
120
+ catch (error) {
121
+ console.log(error);
122
+ }
123
+ }
124
+ formContext.form = new FormHook(formContext, validator);
125
+ };
126
+ const formGetFormHandler = async (formContext) => {
127
+ if (formContext.form)
128
+ return formContext.form;
129
+ };
130
+ const handleFormSubmit = async (formContext) => {
131
+ if (formContext.form)
132
+ return formContext.form.submit();
133
+ };
134
+ const formStructureRenderedHandler = async (formContext, isRendered) => {
135
+ var _a;
136
+ if (isRendered)
137
+ (_a = formContext.formReadyCallback) === null || _a === void 0 ? void 0 : _a.call(formContext);
138
+ };
139
+ const marketingQueryParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'gclid', 'fbclid'];
140
+ const getMarketingValues = (structure) => {
141
+ var _a;
142
+ if ((_a = structure === null || structure === void 0 ? void 0 : structure.data) === null || _a === void 0 ? void 0 : _a.disableUTMLog)
143
+ return {};
144
+ const params = new URLSearchParams(window.location.search);
145
+ if (typeof params.get('disable_utm_log') === 'string' && params.get('disable_utm_log') === 'true')
146
+ return {};
147
+ const marketingValues = {};
148
+ marketingQueryParams.forEach(param => {
149
+ if (!!params.get(param))
150
+ marketingValues[param] = params.get(param);
151
+ });
152
+ return marketingValues;
153
+ };
154
+ const onFormSubmit = async ({ context, formValues, middleware, afterSuccess }) => {
155
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
156
+ try {
157
+ context.setIsLoading(true);
158
+ // if (formValues?.['phone'] && !isValidPhoneNumber(formValues?.['phone'])) delete formValues?.['phone'];
159
+ Object.keys(formValues).forEach(key => {
160
+ if (context[`${key}-format`]) {
161
+ formValues[key] = context[`${key}-format`];
162
+ }
163
+ });
164
+ const hasAdditionalData = !!((_b = (_a = context.structure) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.truncatedFields) && !!((_e = Object.keys((_d = (_c = context.structure) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.truncatedFields)) === null || _e === void 0 ? void 0 : _e.length);
165
+ let additionalData = {};
166
+ const marketingValues = getMarketingValues(context === null || context === void 0 ? void 0 : context.structure);
167
+ let payload = Object.assign({}, formValues);
168
+ if ((_g = (_f = context.structure) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.extraPayload)
169
+ payload = Object.assign(Object.assign({}, payload), (_j = (_h = context.structure) === null || _h === void 0 ? void 0 : _h.data) === null || _j === void 0 ? void 0 : _j.extraPayload);
170
+ if (hasAdditionalData)
171
+ payload.additionalData = Object.assign({}, additionalData);
172
+ if (!!(context === null || context === void 0 ? void 0 : context.extraPayload))
173
+ payload = Object.assign(Object.assign({}, payload), context === null || context === void 0 ? void 0 : context.extraPayload);
174
+ if (hasAdditionalData) {
175
+ Object.entries((_l = (_k = context.structure) === null || _k === void 0 ? void 0 : _k.data) === null || _l === void 0 ? void 0 : _l.truncatedFields).forEach(([oldKey, truncateValue]) => {
176
+ if (Array.isArray(truncateValue)) {
177
+ let constructNewValue = '';
178
+ truncateValue.forEach(key => {
179
+ constructNewValue += payload[key.toString()] || key.toString();
180
+ });
181
+ payload = Object.assign(Object.assign({}, payload), { [oldKey]: constructNewValue });
182
+ }
183
+ else if (typeof truncateValue === 'string' && truncateValue) {
184
+ if (oldKey.startsWith('parse date: ')) {
185
+ let tempKey = oldKey.replaceAll('parse date: ', '');
186
+ payload[tempKey] = dateFnsExports.parse(payload[tempKey], truncateValue, new Date());
187
+ }
188
+ else if (oldKey.startsWith('format date: ')) {
189
+ let tempKey = oldKey.replaceAll('format date: ', '');
190
+ payload[tempKey] = dateFnsExports.formatISO(payload[tempKey]);
191
+ }
192
+ else {
193
+ additionalData[truncateValue] = payload[oldKey];
194
+ delete payload[oldKey];
195
+ }
196
+ }
197
+ });
198
+ }
199
+ let header = {
200
+ 'Content-Type': 'application/json',
201
+ 'Brand': (_o = (_m = context.structure) === null || _m === void 0 ? void 0 : _m.data) === null || _o === void 0 ? void 0 : _o.brandId,
202
+ 'Accept-Language': context.localeLanguage || 'en',
203
+ };
204
+ if (!!(context === null || context === void 0 ? void 0 : context.extraHeader))
205
+ header = Object.assign(Object.assign({}, header), context === null || context === void 0 ? void 0 : context.extraHeader);
206
+ if (!!((_q = (_p = context.structure) === null || _p === void 0 ? void 0 : _p.data) === null || _q === void 0 ? void 0 : _q.extraHeader))
207
+ header = Object.assign(Object.assign({}, header), (_s = (_r = context.structure) === null || _r === void 0 ? void 0 : _r.data) === null || _s === void 0 ? void 0 : _s.extraHeader);
208
+ let requestEndpoint = '';
209
+ if (context.isMobileForm) {
210
+ const token = await context.getMobileToken();
211
+ if (token.toLowerCase().startsWith('bearer')) {
212
+ header['Authorization'] = token;
213
+ requestEndpoint = (_u = (_t = context.structure) === null || _t === void 0 ? void 0 : _t.data) === null || _u === void 0 ? void 0 : _u.requestAppUrl;
214
+ }
215
+ else {
216
+ header['verification-token'] = token;
217
+ requestEndpoint = (_w = (_v = context.structure) === null || _v === void 0 ? void 0 : _v.data) === null || _w === void 0 ? void 0 : _w.requestAppCheckUrl;
218
+ }
219
+ }
220
+ else {
221
+ requestEndpoint = (_y = (_x = context.structure) === null || _x === void 0 ? void 0 : _x.data) === null || _y === void 0 ? void 0 : _y.requestUrl;
222
+ if ((_0 = (_z = context.structure) === null || _z === void 0 ? void 0 : _z.data) === null || _0 === void 0 ? void 0 : _0.recaptchaKey) {
223
+ const token = await grecaptcha.execute((_2 = (_1 = context.structure) === null || _1 === void 0 ? void 0 : _1.data) === null || _2 === void 0 ? void 0 : _2.recaptchaKey, { action: 'submit' });
224
+ header['Recaptcha-Token'] = token;
225
+ }
226
+ }
227
+ if (context.isDev)
228
+ requestEndpoint = requestEndpoint.replaceAll('production=true', 'production=false');
229
+ if (!requestEndpoint) {
230
+ throw new Error('Request endpoint is not configured');
231
+ }
232
+ const method = ((_4 = (_3 = context.structure) === null || _3 === void 0 ? void 0 : _3.data) === null || _4 === void 0 ? void 0 : _4.requestMethod) || 'POST';
233
+ if (['get', 'head'].includes(method.toLowerCase()))
234
+ header = Object.assign(Object.assign({}, header), marketingValues);
235
+ else
236
+ payload = Object.assign(Object.assign({}, payload), marketingValues);
237
+ if (middleware) {
238
+ const middlewareRes = middleware(payload, header, requestEndpoint);
239
+ payload = Object.assign({}, middlewareRes.payload);
240
+ header = Object.assign({}, middlewareRes.header);
241
+ requestEndpoint = middlewareRes.url;
242
+ }
243
+ Object.values(context.form.pendingRequests).forEach(async (req) => {
244
+ try {
245
+ await req();
246
+ }
247
+ catch (error) {
248
+ console.error(error);
249
+ }
250
+ });
251
+ const response = await fetch(requestEndpoint, Object.assign({ headers: header, method: ((_6 = (_5 = context.structure) === null || _5 === void 0 ? void 0 : _5.data) === null || _6 === void 0 ? void 0 : _6.requestMethod) || 'POST' }, (((_9 = (_8 = (_7 = context.structure) === null || _7 === void 0 ? void 0 : _7.data) === null || _8 === void 0 ? void 0 : _8.requestMethod) === null || _9 === void 0 ? void 0 : _9.toLowerCase()) === 'get' ? {} : { body: JSON.stringify(payload) })));
252
+ if (response.ok) {
253
+ const result = await (response === null || response === void 0 ? void 0 : response.json());
254
+ if (afterSuccess)
255
+ await afterSuccess(payload, header);
256
+ context.setSuccessCallback(result);
257
+ setTimeout(() => {
258
+ context.form.reset();
259
+ context.form.rerender({ rerenderForm: true, rerenderAll: true });
260
+ }, 100);
261
+ }
262
+ else {
263
+ const contentType = response.headers.get('content-type');
264
+ const errorText = (contentType === null || contentType === void 0 ? void 0 : contentType.includes('application/json')) ? (_11 = (_10 = (await response.json())) === null || _10 === void 0 ? void 0 : _10.message) === null || _11 === void 0 ? void 0 : _11.body : await response.text();
265
+ throw new Error(errorText);
266
+ }
267
+ }
268
+ catch (error) {
269
+ console.error(error);
270
+ context.setErrorCallback(error);
271
+ }
272
+ finally {
273
+ context.setIsLoading(false);
274
+ }
275
+ };
276
+ const functionHooks = {
277
+ formLanguageChange,
278
+ formErrorHandler,
279
+ handleFormSubmit,
280
+ formLoadingHandler,
281
+ formSuccessHandler,
282
+ formDidLoadHandler,
283
+ formGetFormHandler,
284
+ onFormSubmit,
285
+ formStructureRenderedHandler,
286
+ };
287
+
60
288
  // This file is a workaround for a bug in web browsers' "native"
61
289
  // ES6 importing system which is uncapable of importing "*.json" files.
62
290
  // https://github.com/catamphetamine/libphonenumber-js/issues/239
63
291
  var metadata = {"version":4,"country_calling_codes":{"1":["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],"7":["RU","KZ"],"20":["EG"],"27":["ZA"],"30":["GR"],"31":["NL"],"32":["BE"],"33":["FR"],"34":["ES"],"36":["HU"],"39":["IT","VA"],"40":["RO"],"41":["CH"],"43":["AT"],"44":["GB","GG","IM","JE"],"45":["DK"],"46":["SE"],"47":["NO","SJ"],"48":["PL"],"49":["DE"],"51":["PE"],"52":["MX"],"53":["CU"],"54":["AR"],"55":["BR"],"56":["CL"],"57":["CO"],"58":["VE"],"60":["MY"],"61":["AU","CC","CX"],"62":["ID"],"63":["PH"],"64":["NZ"],"65":["SG"],"66":["TH"],"81":["JP"],"82":["KR"],"84":["VN"],"86":["CN"],"90":["TR"],"91":["IN"],"92":["PK"],"93":["AF"],"94":["LK"],"95":["MM"],"98":["IR"],"211":["SS"],"212":["MA","EH"],"213":["DZ"],"216":["TN"],"218":["LY"],"220":["GM"],"221":["SN"],"222":["MR"],"223":["ML"],"224":["GN"],"225":["CI"],"226":["BF"],"227":["NE"],"228":["TG"],"229":["BJ"],"230":["MU"],"231":["LR"],"232":["SL"],"233":["GH"],"234":["NG"],"235":["TD"],"236":["CF"],"237":["CM"],"238":["CV"],"239":["ST"],"240":["GQ"],"241":["GA"],"242":["CG"],"243":["CD"],"244":["AO"],"245":["GW"],"246":["IO"],"247":["AC"],"248":["SC"],"249":["SD"],"250":["RW"],"251":["ET"],"252":["SO"],"253":["DJ"],"254":["KE"],"255":["TZ"],"256":["UG"],"257":["BI"],"258":["MZ"],"260":["ZM"],"261":["MG"],"262":["RE","YT"],"263":["ZW"],"264":["NA"],"265":["MW"],"266":["LS"],"267":["BW"],"268":["SZ"],"269":["KM"],"290":["SH","TA"],"291":["ER"],"297":["AW"],"298":["FO"],"299":["GL"],"350":["GI"],"351":["PT"],"352":["LU"],"353":["IE"],"354":["IS"],"355":["AL"],"356":["MT"],"357":["CY"],"358":["FI","AX"],"359":["BG"],"370":["LT"],"371":["LV"],"372":["EE"],"373":["MD"],"374":["AM"],"375":["BY"],"376":["AD"],"377":["MC"],"378":["SM"],"380":["UA"],"381":["RS"],"382":["ME"],"383":["XK"],"385":["HR"],"386":["SI"],"387":["BA"],"389":["MK"],"420":["CZ"],"421":["SK"],"423":["LI"],"500":["FK"],"501":["BZ"],"502":["GT"],"503":["SV"],"504":["HN"],"505":["NI"],"506":["CR"],"507":["PA"],"508":["PM"],"509":["HT"],"590":["GP","BL","MF"],"591":["BO"],"592":["GY"],"593":["EC"],"594":["GF"],"595":["PY"],"596":["MQ"],"597":["SR"],"598":["UY"],"599":["CW","BQ"],"670":["TL"],"672":["NF"],"673":["BN"],"674":["NR"],"675":["PG"],"676":["TO"],"677":["SB"],"678":["VU"],"679":["FJ"],"680":["PW"],"681":["WF"],"682":["CK"],"683":["NU"],"685":["WS"],"686":["KI"],"687":["NC"],"688":["TV"],"689":["PF"],"690":["TK"],"691":["FM"],"692":["MH"],"850":["KP"],"852":["HK"],"853":["MO"],"855":["KH"],"856":["LA"],"880":["BD"],"886":["TW"],"960":["MV"],"961":["LB"],"962":["JO"],"963":["SY"],"964":["IQ"],"965":["KW"],"966":["SA"],"967":["YE"],"968":["OM"],"970":["PS"],"971":["AE"],"972":["IL"],"973":["BH"],"974":["QA"],"975":["BT"],"976":["MN"],"977":["NP"],"992":["TJ"],"993":["TM"],"994":["AZ"],"995":["GE"],"996":["KG"],"998":["UZ"]},"countries":{"AC":["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],"AD":["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],"AE":["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],"AF":["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],"AG":["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],"AI":["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],"AL":["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],"AM":["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],"AO":["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],"AR":["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["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])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?: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]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],"AS":["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],"AT":["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],"AU":["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],"AW":["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],"AX":["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],"AZ":["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],"BA":["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],"BB":["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],"BD":["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],"BE":["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],"BF":["226","00","(?:[025-7]\\d|44)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],"BG":["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],"BH":["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],"BI":["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],"BJ":["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],"BL":["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],"BM":["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],"BN":["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],"BO":["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],"BQ":["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],"BR":["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],"BS":["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],"BT":["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],"BW":["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],"BY":["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],"BZ":["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],"CA":["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|33|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],"CC":["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],"CD":["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],"CF":["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],"CG":["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],"CH":["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],"CI":["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],"CK":["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],"CL":["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],"CM":["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],"CN":["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],"CO":["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],"CR":["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],"CU":["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],"CV":["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],"CW":["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],"CX":["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],"CY":["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],"CZ":["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],"DE":["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],"DJ":["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],"DK":["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],"DM":["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],"DO":["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],"DZ":["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],"EC":["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],"EE":["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],"EG":["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],"EH":["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],"ER":["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],"ES":["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],"ET":["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],"FI":["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],"FJ":["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],"FK":["500","00","[2-7]\\d{4}",[5]],"FM":["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],"FO":["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],"FR":["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],"GA":["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],"GB":["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],"GD":["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],"GE":["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],"GF":["594","00","(?:[56]94\\d|7093)\\d{5}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],"GG":["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],"GH":["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],"GI":["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],"GL":["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],"GM":["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],"GN":["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],"GP":["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],"GQ":["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],"GR":["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],"GT":["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],"GU":["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],"GW":["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],"GY":["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],"HK":["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],"HN":["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],"HR":["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],"HT":["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],"HU":["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],"ID":["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],"IE":["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],"IL":["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],"IM":["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],"IN":["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689])\\d|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["16|[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["18[06]","18[06]0"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],"IO":["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],"IQ":["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],"IR":["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],"IS":["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],"IT":["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],"JE":["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],"JM":["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],"JO":["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],"JP":["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],"KE":["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],"KG":["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],"KH":["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],"KI":["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],"KM":["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],"KN":["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],"KP":["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],"KR":["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],"KW":["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],"KY":["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],"KZ":["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33622|7",0,"8~10"],"LA":["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],"LB":["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],"LC":["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],"LI":["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],"LK":["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],"LR":["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],"LS":["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],"LT":["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],"LU":["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],"LV":["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],"LY":["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],"MA":["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:[19]|2[2-46-9]|3[3-9])|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:(?:18|4[0679]|5[03])\\d|2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9]))\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],"MC":["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],"MD":["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],"ME":["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],"MF":["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],"MG":["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],"MH":["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],"MK":["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],"ML":["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],"MM":["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],"MN":["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],"MO":["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],"MP":["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],"MQ":["596","00","(?:596\\d|7091)\\d{5}|(?:69|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],"MR":["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],"MS":["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],"MT":["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],"MU":["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],"MV":["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],"MW":["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],"MX":["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],"MY":["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],"MZ":["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],"NA":["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],"NC":["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],"NE":["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],"NF":["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],"NG":["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],"NI":["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],"NL":["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],"NO":["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],"NP":["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],"NR":["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],"NU":["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],"NZ":["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],"OM":["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],"PA":["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],"PE":["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],"PF":["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],"PG":["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],"PH":["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],"PK":["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],"PL":["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],"PM":["508","00","[45]\\d{5}|(?:708|8\\d\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],"PR":["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],"PS":["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],"PT":["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],"PW":["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],"PY":["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],"QA":["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],"RE":["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],"RO":["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],"RS":["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],"RU":["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,0,[["336(?:[013-9]\\d|2[013-9])\\d{5}|(?:3(?:0[12]|4[1-35-79]|5[1-3]|65|8[1-58]|9[0145])|4(?:01|1[1356]|2[13467]|7[1-5]|8[1-7]|9[1-689])|8(?:1[1-8]|2[01]|3[13-6]|4[0-8]|5[15-7]|6[0-35-79]|7[1-37-9]))\\d{7}",[10]],["9\\d{9}",[10]],["8(?:0[04]|108\\d{3})\\d{7}"],["80[39]\\d{7}",[10]],["808\\d{7}",[10]]],"8~10"],"RW":["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],"SA":["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],"SB":["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],"SC":["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],"SD":["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],"SE":["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],"SG":["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],"SH":["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],"SI":["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],"SJ":["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],"SK":["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],"SL":["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],"SM":["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],"SN":["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],"SO":["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|7[67]|9[2-9]"]]],"0"],"SR":["597","00","(?:[2-5]|[6-8]\\d|90)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],"SS":["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],"ST":["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],"SV":["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],"SX":["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],"SY":["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],"SZ":["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],"TA":["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],"TC":["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],"TD":["235","00|16","(?:22|30|[689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],"TG":["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],"TH":["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],"TJ":["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],"TK":["690","00","[2-47]\\d{3,6}",[4,5,6,7]],"TL":["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],"TM":["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],"TN":["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],"TO":["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],"TR":["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],"TT":["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],"TV":["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],"TW":["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],"TZ":["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],"UA":["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],"UG":["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],"US":["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["3052(?:0[0-8]|[1-9]\\d)\\d{4}|(?:2742|305[3-9])\\d{6}|(?:472|983)[2-47-9]\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,0,0,["305209\\d{4}"]]],"UY":["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],"UZ":["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],"VA":["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],"VC":["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],"VE":["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],"VG":["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],"VI":["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],"VN":["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],"VU":["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],"WF":["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],"WS":["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],"XK":["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],"YE":["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],"YT":["262","00","7093\\d{5}|(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],"ZA":["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],"ZM":["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],"ZW":["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},"nonGeographic":{"800":["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],"808":["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],"870":["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],"878":["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],"881":["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],"882":["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],"883":["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],"888":["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],"979":["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};
64
292
 
65
- // Importing from a ".js" file is a workaround for Node.js "ES Modules"
66
- // importing system which is even uncapable of importing "*.json" files.
67
-
68
- function withMetadataArgument(func, _arguments) {
69
- var args = Array.prototype.slice.call(_arguments);
70
- args.push(metadata);
71
- return func.apply(this, args)
72
- }
73
-
74
293
  // Copy-pasted from:
75
294
  // https://github.com/substack/semver-compare/blob/master/index.js
76
295
  //
@@ -103,12 +322,12 @@ function isObject(object) {
103
322
  return object !== undefined && object !== null && object.constructor === objectConstructor;
104
323
  }
105
324
 
106
- function _typeof$c(o) { "@babel/helpers - typeof"; return _typeof$c = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$c(o); }
107
- function _classCallCheck$8(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
108
- function _defineProperties$7(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey$b(o.key), o); } }
109
- function _createClass$8(e, r, t) { return r && _defineProperties$7(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e; }
110
- function _toPropertyKey$b(t) { var i = _toPrimitive$b(t, "string"); return "symbol" == _typeof$c(i) ? i : i + ""; }
111
- function _toPrimitive$b(t, r) { if ("object" != _typeof$c(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof$c(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return (String )(t); }
325
+ function _typeof$7(o) { "@babel/helpers - typeof"; return _typeof$7 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$7(o); }
326
+ function _classCallCheck$7(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
327
+ function _defineProperties$7(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey$7(o.key), o); } }
328
+ function _createClass$7(e, r, t) { return r && _defineProperties$7(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e; }
329
+ function _toPropertyKey$7(t) { var i = _toPrimitive$7(t, "string"); return "symbol" == _typeof$7(i) ? i : i + ""; }
330
+ function _toPrimitive$7(t, r) { if ("object" != _typeof$7(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof$7(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return (String )(t); }
112
331
 
113
332
  // Added "idd_prefix" and "default_idd_prefix".
114
333
  var V3 = '1.2.0';
@@ -123,12 +342,12 @@ var CALLING_CODE_REG_EXP = /^\d+$/;
123
342
  */
124
343
  var Metadata = /*#__PURE__*/function () {
125
344
  function Metadata(metadata) {
126
- _classCallCheck$8(this, Metadata);
345
+ _classCallCheck$7(this, Metadata);
127
346
  validateMetadata(metadata);
128
347
  this.metadata = metadata;
129
348
  setVersion.call(this, metadata);
130
349
  }
131
- return _createClass$8(Metadata, [{
350
+ return _createClass$7(Metadata, [{
132
351
  key: "getCountries",
133
352
  value: function getCountries() {
134
353
  return Object.keys(this.metadata.countries).filter(function (_) {
@@ -369,12 +588,12 @@ var Metadata = /*#__PURE__*/function () {
369
588
  }();
370
589
  var NumberingPlan = /*#__PURE__*/function () {
371
590
  function NumberingPlan(metadata, globalMetadataObject) {
372
- _classCallCheck$8(this, NumberingPlan);
591
+ _classCallCheck$7(this, NumberingPlan);
373
592
  this.globalMetadataObject = globalMetadataObject;
374
593
  this.metadata = metadata;
375
594
  setVersion.call(this, globalMetadataObject.metadata);
376
595
  }
377
- return _createClass$8(NumberingPlan, [{
596
+ return _createClass$7(NumberingPlan, [{
378
597
  key: "callingCode",
379
598
  value: function callingCode() {
380
599
  return this.metadata[0];
@@ -529,11 +748,11 @@ var NumberingPlan = /*#__PURE__*/function () {
529
748
  }();
530
749
  var Format = /*#__PURE__*/function () {
531
750
  function Format(format, metadata) {
532
- _classCallCheck$8(this, Format);
751
+ _classCallCheck$7(this, Format);
533
752
  this._format = format;
534
753
  this.metadata = metadata;
535
754
  }
536
- return _createClass$8(Format, [{
755
+ return _createClass$7(Format, [{
537
756
  key: "pattern",
538
757
  value: function pattern() {
539
758
  return this._format[0];
@@ -597,11 +816,11 @@ var Format = /*#__PURE__*/function () {
597
816
  var FIRST_GROUP_ONLY_PREFIX_PATTERN = /^\(?\$1\)?$/;
598
817
  var Type = /*#__PURE__*/function () {
599
818
  function Type(type, metadata) {
600
- _classCallCheck$8(this, Type);
819
+ _classCallCheck$7(this, Type);
601
820
  this.type = type;
602
821
  this.metadata = metadata;
603
822
  }
604
- return _createClass$8(Type, [{
823
+ return _createClass$7(Type, [{
605
824
  key: "pattern",
606
825
  value: function pattern() {
607
826
  if (this.metadata.v1) return this.type;
@@ -656,7 +875,7 @@ function validateMetadata(metadata) {
656
875
  // so istanbul will show this as "branch not covered".
657
876
  /* istanbul ignore next */
658
877
  var typeOf = function typeOf(_) {
659
- return _typeof$c(_);
878
+ return _typeof$7(_);
660
879
  };
661
880
 
662
881
  /**
@@ -676,11 +895,6 @@ function getCountryCallingCode(country, metadata) {
676
895
  }
677
896
  throw new Error("Unknown country: ".concat(country));
678
897
  }
679
- function isSupportedCountry(country, metadata) {
680
- // metadata = new Metadata(metadata)
681
- // return metadata.hasCountry(country)
682
- return metadata.countries.hasOwnProperty(country);
683
- }
684
898
  function setVersion(metadata) {
685
899
  var version = metadata.version;
686
900
  if (typeof version === 'number') {
@@ -871,9 +1085,9 @@ function matchesEntirely(text, regularExpressionText) {
871
1085
  return new RegExp('^(?:' + regularExpressionText + ')$').test(text);
872
1086
  }
873
1087
 
874
- function _createForOfIteratorHelperLoose$6(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$9(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
875
- function _unsupportedIterableToArray$9(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$9(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$9(r, a) : void 0; } }
876
- function _arrayLikeToArray$9(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
1088
+ function _createForOfIteratorHelperLoose$5(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$7(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1089
+ function _unsupportedIterableToArray$7(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$7(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$7(r, a) : void 0; } }
1090
+ function _arrayLikeToArray$7(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
877
1091
  var NON_FIXED_LINE_PHONE_TYPES = ['MOBILE', 'PREMIUM_RATE', 'TOLL_FREE', 'SHARED_COST', 'VOIP', 'PERSONAL_NUMBER', 'PAGER', 'UAN', 'VOICEMAIL'];
878
1092
 
879
1093
  // Finds out national phone number type (fixed line, mobile, etc)
@@ -929,7 +1143,7 @@ function getNumberType(input, options, metadata) {
929
1143
  }
930
1144
  return 'FIXED_LINE';
931
1145
  }
932
- for (var _iterator = _createForOfIteratorHelperLoose$6(NON_FIXED_LINE_PHONE_TYPES), _step; !(_step = _iterator()).done;) {
1146
+ for (var _iterator = _createForOfIteratorHelperLoose$5(NON_FIXED_LINE_PHONE_TYPES), _step; !(_step = _iterator()).done;) {
933
1147
  var type = _step.value;
934
1148
  if (isNumberTypeEqualTo(nationalNumber, type, metadata)) {
935
1149
  return type;
@@ -1033,11 +1247,6 @@ function couldNationalNumberBelongToCountry(nationalNumber, country, metadata) {
1033
1247
  }
1034
1248
 
1035
1249
  // The minimum length of the national significant number.
1036
- var MIN_LENGTH_FOR_NSN = 2;
1037
-
1038
- // The ITU says the maximum length should be 15,
1039
- // but one can find longer numbers in Germany.
1040
- var MAX_LENGTH_FOR_NSN = 17;
1041
1250
 
1042
1251
  // The maximum length of the country calling code.
1043
1252
  var MAX_LENGTH_COUNTRY_CODE = 3;
@@ -1192,9 +1401,9 @@ function extractNationalNumberFromPossiblyIncompleteNumber(number, metadata) {
1192
1401
  };
1193
1402
  }
1194
1403
 
1195
- function _createForOfIteratorHelperLoose$5(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$8(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1196
- function _unsupportedIterableToArray$8(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$8(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$8(r, a) : void 0; } }
1197
- function _arrayLikeToArray$8(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
1404
+ function _createForOfIteratorHelperLoose$4(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$6(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1405
+ function _unsupportedIterableToArray$6(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$6(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$6(r, a) : void 0; } }
1406
+ function _arrayLikeToArray$6(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
1198
1407
 
1199
1408
  // Returns the exact country that the `nationalPhoneNumber` belongs to
1200
1409
  // in cases of ambiguity, i.e. when multiple countries share the same "country calling code".
@@ -1206,7 +1415,7 @@ function getCountryByNationalNumber(nationalPhoneNumber, _ref) {
1206
1415
 
1207
1416
  // const matchingCountries = []
1208
1417
 
1209
- for (var _iterator = _createForOfIteratorHelperLoose$5(countries), _step; !(_step = _iterator()).done;) {
1418
+ for (var _iterator = _createForOfIteratorHelperLoose$4(countries), _step; !(_step = _iterator()).done;) {
1210
1419
  var country = _step.value;
1211
1420
  metadata.selectNumberingPlan(country);
1212
1421
  // "Leading digits" patterns are only defined for about 20% of all countries.
@@ -1664,188 +1873,21 @@ function getIddPrefix(country, callingCode, metadata) {
1664
1873
  }
1665
1874
  }
1666
1875
 
1667
- // The RFC 3966 format for extensions.
1668
- var RFC3966_EXTN_PREFIX = ';ext=';
1669
-
1670
1876
  /**
1671
- * Helper method for constructing regular expressions for parsing. Creates
1672
- * an expression that captures up to max_length digits.
1673
- * @return {string} RegEx pattern to capture extension digits.
1877
+ * @param {object} - `{ ?number, ?extension }`.
1878
+ * @return {string} Phone URI (RFC 3966).
1674
1879
  */
1675
- var getExtensionDigitsPattern = function getExtensionDigitsPattern(maxLength) {
1676
- return "([".concat(VALID_DIGITS, "]{1,").concat(maxLength, "})");
1677
- };
1678
-
1679
- /**
1680
- * Helper initialiser method to create the regular-expression pattern to match
1681
- * extensions.
1682
- * Copy-pasted from Google's `libphonenumber`:
1683
- * https://github.com/google/libphonenumber/blob/55b2646ec9393f4d3d6661b9c82ef9e258e8b829/javascript/i18n/phonenumbers/phonenumberutil.js#L759-L766
1684
- * @return {string} RegEx pattern to capture extensions.
1685
- */
1686
- function createExtensionPattern(purpose) {
1687
- // We cap the maximum length of an extension based on the ambiguity of the way
1688
- // the extension is prefixed. As per ITU, the officially allowed length for
1689
- // extensions is actually 40, but we don't support this since we haven't seen real
1690
- // examples and this introduces many false interpretations as the extension labels
1691
- // are not standardized.
1692
- /** @type {string} */
1693
- var extLimitAfterExplicitLabel = '20';
1694
- /** @type {string} */
1695
- var extLimitAfterLikelyLabel = '15';
1696
- /** @type {string} */
1697
- var extLimitAfterAmbiguousChar = '9';
1698
- /** @type {string} */
1699
- var extLimitWhenNotSure = '6';
1700
-
1701
- /** @type {string} */
1702
- var possibleSeparatorsBetweenNumberAndExtLabel = "[ \xA0\\t,]*";
1703
- // Optional full stop (.) or colon, followed by zero or more spaces/tabs/commas.
1704
- /** @type {string} */
1705
- var possibleCharsAfterExtLabel = "[:\\.\uFF0E]?[ \xA0\\t,-]*";
1706
- /** @type {string} */
1707
- var optionalExtnSuffix = "#?";
1708
-
1709
- // Here the extension is called out in more explicit way, i.e mentioning it obvious
1710
- // patterns like "ext.".
1711
- /** @type {string} */
1712
- var explicitExtLabels = "(?:e?xt(?:ensi(?:o\u0301?|\xF3))?n?|\uFF45?\uFF58\uFF54\uFF4E?|\u0434\u043E\u0431|anexo)";
1713
- // One-character symbols that can be used to indicate an extension, and less
1714
- // commonly used or more ambiguous extension labels.
1715
- /** @type {string} */
1716
- var ambiguousExtLabels = "(?:[x\uFF58#\uFF03~\uFF5E]|int|\uFF49\uFF4E\uFF54)";
1717
- // When extension is not separated clearly.
1718
- /** @type {string} */
1719
- var ambiguousSeparator = "[- ]+";
1720
- // This is the same as possibleSeparatorsBetweenNumberAndExtLabel, but not matching
1721
- // comma as extension label may have it.
1722
- /** @type {string} */
1723
- var possibleSeparatorsNumberExtLabelNoComma = "[ \xA0\\t]*";
1724
- // ",," is commonly used for auto dialling the extension when connected. First
1725
- // comma is matched through possibleSeparatorsBetweenNumberAndExtLabel, so we do
1726
- // not repeat it here. Semi-colon works in Iphone and Android also to pop up a
1727
- // button with the extension number following.
1728
- /** @type {string} */
1729
- var autoDiallingAndExtLabelsFound = "(?:,{2}|;)";
1730
-
1731
- /** @type {string} */
1732
- var rfcExtn = RFC3966_EXTN_PREFIX + getExtensionDigitsPattern(extLimitAfterExplicitLabel);
1733
- /** @type {string} */
1734
- var explicitExtn = possibleSeparatorsBetweenNumberAndExtLabel + explicitExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterExplicitLabel) + optionalExtnSuffix;
1735
- /** @type {string} */
1736
- var ambiguousExtn = possibleSeparatorsBetweenNumberAndExtLabel + ambiguousExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix;
1737
- /** @type {string} */
1738
- var americanStyleExtnWithSuffix = ambiguousSeparator + getExtensionDigitsPattern(extLimitWhenNotSure) + "#";
1739
-
1740
- /** @type {string} */
1741
- var autoDiallingExtn = possibleSeparatorsNumberExtLabelNoComma + autoDiallingAndExtLabelsFound + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterLikelyLabel) + optionalExtnSuffix;
1742
- /** @type {string} */
1743
- var onlyCommasExtn = possibleSeparatorsNumberExtLabelNoComma + "(?:,)+" + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix;
1744
-
1745
- // The first regular expression covers RFC 3966 format, where the extension is added
1746
- // using ";ext=". The second more generic where extension is mentioned with explicit
1747
- // labels like "ext:". In both the above cases we allow more numbers in extension than
1748
- // any other extension labels. The third one captures when single character extension
1749
- // labels or less commonly used labels are used. In such cases we capture fewer
1750
- // extension digits in order to reduce the chance of falsely interpreting two
1751
- // numbers beside each other as a number + extension. The fourth one covers the
1752
- // special case of American numbers where the extension is written with a hash
1753
- // at the end, such as "- 503#". The fifth one is exclusively for extension
1754
- // autodialling formats which are used when dialling and in this case we accept longer
1755
- // extensions. The last one is more liberal on the number of commas that acts as
1756
- // extension labels, so we have a strict cap on the number of digits in such extensions.
1757
- return rfcExtn + "|" + explicitExtn + "|" + ambiguousExtn + "|" + americanStyleExtnWithSuffix + "|" + autoDiallingExtn + "|" + onlyCommasExtn;
1758
- }
1759
-
1760
- // Regular expression of viable phone numbers. This is location independent.
1761
- // Checks we have at least three leading digits, and only valid punctuation,
1762
- // alpha characters and digits in the phone number. Does not include extension
1763
- // data. The symbol 'x' is allowed here as valid punctuation since it is often
1764
- // used as a placeholder for carrier codes, for example in Brazilian phone
1765
- // numbers. We also allow multiple '+' characters at the start.
1766
- //
1767
- // Corresponds to the following:
1768
- // [digits]{minLengthNsn}|
1769
- // plus_sign*
1770
- // (([punctuation]|[star])*[digits]){3,}([punctuation]|[star]|[digits]|[alpha])*
1771
- //
1772
- // The first reg-ex is to allow short numbers (two digits long) to be parsed if
1773
- // they are entered as "15" etc, but only if there is no punctuation in them.
1774
- // The second expression restricts the number of digits to three or more, but
1775
- // then allows them to be in international form, and to have alpha-characters
1776
- // and punctuation. We split up the two reg-exes here and combine them when
1777
- // creating the reg-ex VALID_PHONE_NUMBER_PATTERN itself so we can prefix it
1778
- // with ^ and append $ to each branch.
1779
- //
1780
- // "Note VALID_PUNCTUATION starts with a -,
1781
- // so must be the first in the range" (c) Google devs.
1782
- // (wtf did they mean by saying that; probably nothing)
1783
- //
1784
- var MIN_LENGTH_PHONE_NUMBER_PATTERN = '[' + VALID_DIGITS + ']{' + MIN_LENGTH_FOR_NSN + '}';
1785
- //
1786
- // And this is the second reg-exp:
1787
- // (see MIN_LENGTH_PHONE_NUMBER_PATTERN for a full description of this reg-exp)
1788
- //
1789
- var VALID_PHONE_NUMBER = '[' + PLUS_CHARS + ']{0,1}' + '(?:' + '[' + VALID_PUNCTUATION + ']*' + '[' + VALID_DIGITS + ']' + '){3,}' + '[' + VALID_PUNCTUATION + VALID_DIGITS + ']*';
1790
-
1791
- // This regular expression isn't present in Google's `libphonenumber`
1792
- // and is only used to determine whether the phone number being input
1793
- // is too short for it to even consider it a "valid" number.
1794
- // This is just a way to differentiate between a really invalid phone
1795
- // number like "abcde" and a valid phone number that a user has just
1796
- // started inputting, like "+1" or "1": both these cases would be
1797
- // considered `NOT_A_NUMBER` by Google's `libphonenumber`, but this
1798
- // library can provide a more detailed error message — whether it's
1799
- // really "not a number", or is it just a start of a valid phone number.
1800
- var VALID_PHONE_NUMBER_START_REG_EXP = new RegExp('^' + '[' + PLUS_CHARS + ']{0,1}' + '(?:' + '[' + VALID_PUNCTUATION + ']*' + '[' + VALID_DIGITS + ']' + '){1,2}' + '$', 'i');
1801
- var VALID_PHONE_NUMBER_WITH_EXTENSION = VALID_PHONE_NUMBER +
1802
- // Phone number extensions
1803
- '(?:' + createExtensionPattern() + ')?';
1804
-
1805
- // The combined regular expression for valid phone numbers:
1806
- //
1807
- var VALID_PHONE_NUMBER_PATTERN = new RegExp(
1808
- // Either a short two-digit-only phone number
1809
- '^' + MIN_LENGTH_PHONE_NUMBER_PATTERN + '$' + '|' +
1810
- // Or a longer fully parsed phone number (min 3 characters)
1811
- '^' + VALID_PHONE_NUMBER_WITH_EXTENSION + '$', 'i');
1812
-
1813
- // Checks to see if the string of characters could possibly be a phone number at
1814
- // all. At the moment, checks to see that the string begins with at least 2
1815
- // digits, ignoring any punctuation commonly found in phone numbers. This method
1816
- // does not require the number to be normalized in advance - but does assume
1817
- // that leading non-number symbols have been removed, such as by the method
1818
- // `extract_possible_number`.
1819
- //
1820
- function isViablePhoneNumber(number) {
1821
- return number.length >= MIN_LENGTH_FOR_NSN && VALID_PHONE_NUMBER_PATTERN.test(number);
1822
- }
1823
-
1824
- // This is just a way to differentiate between a really invalid phone
1825
- // number like "abcde" and a valid phone number that a user has just
1826
- // started inputting, like "+1" or "1": both these cases would be
1827
- // considered `NOT_A_NUMBER` by Google's `libphonenumber`, but this
1828
- // library can provide a more detailed error message — whether it's
1829
- // really "not a number", or is it just a start of a valid phone number.
1830
- function isViablePhoneNumberStart(number) {
1831
- return VALID_PHONE_NUMBER_START_REG_EXP.test(number);
1832
- }
1833
-
1834
- /**
1835
- * @param {object} - `{ ?number, ?extension }`.
1836
- * @return {string} Phone URI (RFC 3966).
1837
- */
1838
- function formatRFC3966(_ref) {
1839
- var number = _ref.number,
1840
- ext = _ref.ext;
1841
- if (!number) {
1842
- return '';
1843
- }
1844
- if (number[0] !== '+') {
1845
- throw new Error("\"formatRFC3966()\" expects \"number\" to be in E.164 format.");
1846
- }
1847
- return "tel:".concat(number).concat(ext ? ';ext=' + ext : '');
1848
- }
1880
+ function formatRFC3966(_ref) {
1881
+ var number = _ref.number,
1882
+ ext = _ref.ext;
1883
+ if (!number) {
1884
+ return '';
1885
+ }
1886
+ if (number[0] !== '+') {
1887
+ throw new Error("\"formatRFC3966()\" expects \"number\" to be in E.164 format.");
1888
+ }
1889
+ return "tel:".concat(number).concat(ext ? ';ext=' + ext : '');
1890
+ }
1849
1891
 
1850
1892
  // This is a port of Google Android `libphonenumber`'s
1851
1893
  // `phonenumberutil.js` of December 31th, 2018.
@@ -2048,15 +2090,15 @@ function pickFirstMatchingElement(elements, testFunction) {
2048
2090
  }
2049
2091
  }
2050
2092
 
2051
- function _typeof$b(o) { "@babel/helpers - typeof"; return _typeof$b = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$b(o); }
2052
- function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2053
- function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2054
- function _defineProperty$4(e, r, t) { return (r = _toPropertyKey$a(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; }
2055
- function _classCallCheck$7(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
2056
- function _defineProperties$6(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey$a(o.key), o); } }
2057
- function _createClass$7(e, r, t) { return r && _defineProperties$6(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e; }
2058
- function _toPropertyKey$a(t) { var i = _toPrimitive$a(t, "string"); return "symbol" == _typeof$b(i) ? i : i + ""; }
2059
- function _toPrimitive$a(t, r) { if ("object" != _typeof$b(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof$b(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return (String )(t); }
2093
+ function _typeof$6(o) { "@babel/helpers - typeof"; return _typeof$6 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$6(o); }
2094
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2095
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2096
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey$6(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; }
2097
+ function _classCallCheck$6(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
2098
+ function _defineProperties$6(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey$6(o.key), o); } }
2099
+ function _createClass$6(e, r, t) { return r && _defineProperties$6(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e; }
2100
+ function _toPropertyKey$6(t) { var i = _toPrimitive$6(t, "string"); return "symbol" == _typeof$6(i) ? i : i + ""; }
2101
+ function _toPrimitive$6(t, r) { if ("object" != _typeof$6(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof$6(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return (String )(t); }
2060
2102
  var PhoneNumber = /*#__PURE__*/function () {
2061
2103
  /**
2062
2104
  * @param {string} countryOrCountryCallingCode
@@ -2065,7 +2107,7 @@ var PhoneNumber = /*#__PURE__*/function () {
2065
2107
  * @return {PhoneNumber}
2066
2108
  */
2067
2109
  function PhoneNumber(countryOrCountryCallingCode, nationalNumber, metadata) {
2068
- _classCallCheck$7(this, PhoneNumber);
2110
+ _classCallCheck$6(this, PhoneNumber);
2069
2111
  // Validate `countryOrCountryCallingCode` argument.
2070
2112
  if (!countryOrCountryCallingCode) {
2071
2113
  throw new TypeError('First argument is required');
@@ -2123,7 +2165,7 @@ var PhoneNumber = /*#__PURE__*/function () {
2123
2165
  return metadata;
2124
2166
  };
2125
2167
  }
2126
- return _createClass$7(PhoneNumber, [{
2168
+ return _createClass$6(PhoneNumber, [{
2127
2169
  key: "setExt",
2128
2170
  value: function setExt(ext) {
2129
2171
  this.ext = ext;
@@ -2186,7 +2228,7 @@ var PhoneNumber = /*#__PURE__*/function () {
2186
2228
  }, {
2187
2229
  key: "format",
2188
2230
  value: function format(_format, options) {
2189
- return formatNumber(this, _format, options ? _objectSpread$4(_objectSpread$4({}, options), {}, {
2231
+ return formatNumber(this, _format, options ? _objectSpread(_objectSpread({}, options), {}, {
2190
2232
  v2: true
2191
2233
  }) : {
2192
2234
  v2: true
@@ -2232,70 +2274,9 @@ function getCountryAndCountryCallingCode(countryOrCountryCallingCode, metadataJs
2232
2274
  }
2233
2275
  var E164_NUMBER_REGEXP = /^\+\d+$/;
2234
2276
 
2235
- function _typeof$a(o) { "@babel/helpers - typeof"; return _typeof$a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$a(o); }
2236
- function _createClass$6(e, r, t) { return Object.defineProperty(e, "prototype", { writable: false }), e; }
2237
- function _classCallCheck$6(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
2238
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
2239
- function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof$a(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
2240
- function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
2241
- function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: true, configurable: true } }), Object.defineProperty(t, "prototype", { writable: false }), e && _setPrototypeOf(t, e); }
2242
- function _wrapNativeSuper(t) { var r = "function" == typeof Map ? new Map() : void 0; return _wrapNativeSuper = function _wrapNativeSuper(t) { if (null === t || !_isNativeFunction(t)) return t; if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); if (void 0 !== r) { if (r.has(t)) return r.get(t); r.set(t, Wrapper); } function Wrapper() { return _construct(t, arguments, _getPrototypeOf(this).constructor); } return Wrapper.prototype = Object.create(t.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }), _setPrototypeOf(Wrapper, t); }, _wrapNativeSuper(t); }
2243
- function _construct(t, e, r) { if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); var o = [null]; o.push.apply(o, e); var p = new (t.bind.apply(t, o))(); return r && _setPrototypeOf(p, r.prototype), p; }
2244
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
2245
- function _isNativeFunction(t) { try { return -1 !== Function.toString.call(t).indexOf("[native code]"); } catch (n) { return "function" == typeof t; } }
2246
- function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
2247
- function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
2248
- // https://stackoverflow.com/a/46971044/970769
2249
- // "Breaking changes in Typescript 2.1"
2250
- // "Extending built-ins like Error, Array, and Map may no longer work."
2251
- // "As a recommendation, you can manually adjust the prototype immediately after any super(...) calls."
2252
- // https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
2253
- var ParseError = /*#__PURE__*/function (_Error) {
2254
- function ParseError(code) {
2255
- var _this;
2256
- _classCallCheck$6(this, ParseError);
2257
- _this = _callSuper(this, ParseError, [code]);
2258
- // Set the prototype explicitly.
2259
- // Any subclass of FooError will have to manually set the prototype as well.
2260
- Object.setPrototypeOf(_this, ParseError.prototype);
2261
- _this.name = _this.constructor.name;
2262
- return _this;
2263
- }
2264
- _inherits(ParseError, _Error);
2265
- return _createClass$6(ParseError);
2266
- }(/*#__PURE__*/_wrapNativeSuper(Error));
2267
-
2268
- // Regexp of all known extension prefixes used by different regions followed by
2269
- // 1 or more valid digits, for use when parsing.
2270
- var EXTN_PATTERN = new RegExp('(?:' + createExtensionPattern() + ')$', 'i');
2271
-
2272
- // Strips any extension (as in, the part of the number dialled after the call is
2273
- // connected, usually indicated with extn, ext, x or similar) from the end of
2274
- // the number, and returns it.
2275
- function extractExtension(number) {
2276
- var start = number.search(EXTN_PATTERN);
2277
- if (start < 0) {
2278
- return {};
2279
- }
2280
- // If we find a potential extension, and the number preceding this is a viable
2281
- // number, we assume it is an extension.
2282
- var numberWithoutExtension = number.slice(0, start);
2283
- var matches = number.match(EXTN_PATTERN);
2284
- var i = 1;
2285
- while (i < matches.length) {
2286
- if (matches[i]) {
2287
- return {
2288
- number: numberWithoutExtension,
2289
- ext: matches[i]
2290
- };
2291
- }
2292
- i++;
2293
- }
2294
- }
2295
-
2296
- function _createForOfIteratorHelperLoose$4(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$7(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2297
- function _unsupportedIterableToArray$7(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$7(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$7(r, a) : void 0; } }
2298
- function _arrayLikeToArray$7(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2277
+ function _createForOfIteratorHelperLoose$3(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$5(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2278
+ function _unsupportedIterableToArray$5(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$5(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$5(r, a) : void 0; } }
2279
+ function _arrayLikeToArray$5(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2299
2280
  // These mappings map a character (key) to a specific digit that should
2300
2281
  // replace it for normalization purposes. Non-European digits that
2301
2282
  // may be used in phone numbers are mapped to a European equivalent.
@@ -2385,659 +2366,27 @@ function parseDigit(character) {
2385
2366
  * @param {string} string
2386
2367
  * @return {string}
2387
2368
  * @example
2388
- * ```js
2389
- * parseDigits('8 (800) 555')
2390
- * // Outputs '8800555'.
2391
- * ```
2392
- */
2393
- function parseDigits(string) {
2394
- var result = '';
2395
- // Using `.split('')` here instead of normal `for ... of`
2396
- // because the importing application doesn't neccessarily include an ES6 polyfill.
2397
- // The `.split('')` approach discards "exotic" UTF-8 characters
2398
- // (the ones consisting of four bytes) but digits
2399
- // (including non-European ones) don't fall into that range
2400
- // so such "exotic" characters would be discarded anyway.
2401
- for (var _iterator = _createForOfIteratorHelperLoose$4(string.split('')), _step; !(_step = _iterator()).done;) {
2402
- var character = _step.value;
2403
- var digit = parseDigit(character);
2404
- if (digit) {
2405
- result += digit;
2406
- }
2407
- }
2408
- return result;
2409
- }
2410
-
2411
- function _createForOfIteratorHelperLoose$3(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$6(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2412
- function _unsupportedIterableToArray$6(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$6(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$6(r, a) : void 0; } }
2413
- function _arrayLikeToArray$6(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2414
-
2415
- /**
2416
- * Parses phone number characters from a string.
2417
- * Drops all punctuation leaving only digits and the leading `+` sign (if any).
2418
- * Also converts wide-ascii and arabic-indic numerals to conventional numerals.
2419
- * E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.
2420
- * @param {string} string
2421
- * @return {string}
2422
- * @example
2423
- * ```js
2424
- * // Outputs '8800555'.
2425
- * parseIncompletePhoneNumber('8 (800) 555')
2426
- * // Outputs '+7800555'.
2427
- * parseIncompletePhoneNumber('+7 800 555')
2428
- * ```
2429
- */
2430
- function parseIncompletePhoneNumber(string) {
2431
- var result = '';
2432
- // Using `.split('')` here instead of normal `for ... of`
2433
- // because the importing application doesn't neccessarily include an ES6 polyfill.
2434
- // The `.split('')` approach discards "exotic" UTF-8 characters
2435
- // (the ones consisting of four bytes) but digits
2436
- // (including non-European ones) don't fall into that range
2437
- // so such "exotic" characters would be discarded anyway.
2438
- for (var _iterator = _createForOfIteratorHelperLoose$3(string.split('')), _step; !(_step = _iterator()).done;) {
2439
- var character = _step.value;
2440
- result += parsePhoneNumberCharacter(character, result) || '';
2441
- }
2442
- return result;
2443
- }
2444
-
2445
- /**
2446
- * Parses next character while parsing phone number digits (including a `+`)
2447
- * from text: discards everything except `+` and digits, and `+` is only allowed
2448
- * at the start of a phone number.
2449
- * For example, is used in `react-phone-number-input` where it uses
2450
- * [`input-format`](https://gitlab.com/catamphetamine/input-format).
2451
- * @param {string} character - Yet another character from raw input string.
2452
- * @param {string?} prevParsedCharacters - Previous parsed characters.
2453
- * @param {function?} eventListener - An optional "on event" function.
2454
- * @return {string?} The parsed character.
2455
- */
2456
- function parsePhoneNumberCharacter(character, prevParsedCharacters, eventListener) {
2457
- // Only allow a leading `+`.
2458
- if (character === '+') {
2459
- // If this `+` is not the first parsed character
2460
- // then discard it.
2461
- if (prevParsedCharacters) {
2462
- return;
2463
- }
2464
- return '+';
2465
- }
2466
- // Allow digits.
2467
- return parseDigit(character);
2468
- }
2469
-
2470
- // When phone numbers are written in `RFC3966` format — `"tel:+12133734253"` —
2471
- // they can have their "calling code" part written separately in a `phone-context` parameter.
2472
- // Example: `"tel:12133734253;phone-context=+1"`.
2473
- // This function parses the full phone number from the local number and the `phone-context`
2474
- // when the `phone-context` contains a `+` sign.
2475
-
2476
- var PLUS_SIGN = '+';
2477
- var RFC3966_VISUAL_SEPARATOR_ = '[\\-\\.\\(\\)]?';
2478
- var RFC3966_PHONE_DIGIT_ = '(' + '[' + VALID_DIGITS + ']' + '|' + RFC3966_VISUAL_SEPARATOR_ + ')';
2479
- var RFC3966_GLOBAL_NUMBER_DIGITS_ = '^' + '\\' + PLUS_SIGN + RFC3966_PHONE_DIGIT_ + '*' + '[' + VALID_DIGITS + ']' + RFC3966_PHONE_DIGIT_ + '*' + '$';
2480
-
2481
- /**
2482
- * Regular expression of valid global-number-digits for the phone-context
2483
- * parameter, following the syntax defined in RFC3966.
2484
- */
2485
- var RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_ = new RegExp(RFC3966_GLOBAL_NUMBER_DIGITS_, 'g');
2486
-
2487
- // In this port of Google's library, we don't accept alpha characters in phone numbers.
2488
- // const ALPHANUM_ = VALID_ALPHA_ + VALID_DIGITS
2489
- var ALPHANUM_ = VALID_DIGITS;
2490
- var RFC3966_DOMAINLABEL_ = '[' + ALPHANUM_ + ']+((\\-)*[' + ALPHANUM_ + '])*';
2491
- var VALID_ALPHA_ = 'a-zA-Z';
2492
- var RFC3966_TOPLABEL_ = '[' + VALID_ALPHA_ + ']+((\\-)*[' + ALPHANUM_ + '])*';
2493
- var RFC3966_DOMAINNAME_ = '^(' + RFC3966_DOMAINLABEL_ + '\\.)*' + RFC3966_TOPLABEL_ + '\\.?$';
2494
-
2495
- /**
2496
- * Regular expression of valid domainname for the phone-context parameter,
2497
- * following the syntax defined in RFC3966.
2498
- */
2499
- var RFC3966_DOMAINNAME_PATTERN_ = new RegExp(RFC3966_DOMAINNAME_, 'g');
2500
- var RFC3966_PREFIX_ = 'tel:';
2501
- var RFC3966_PHONE_CONTEXT_ = ';phone-context=';
2502
- var RFC3966_ISDN_SUBADDRESS_ = ';isub=';
2503
-
2504
- /**
2505
- * Extracts the value of the phone-context parameter of `numberToExtractFrom`,
2506
- * following the syntax defined in RFC3966.
2507
- *
2508
- * @param {string} numberToExtractFrom
2509
- * @return {string|null} the extracted string (possibly empty), or `null` if no phone-context parameter is found.
2510
- */
2511
- function extractPhoneContext(numberToExtractFrom) {
2512
- var indexOfPhoneContext = numberToExtractFrom.indexOf(RFC3966_PHONE_CONTEXT_);
2513
- // If no phone-context parameter is present
2514
- if (indexOfPhoneContext < 0) {
2515
- return null;
2516
- }
2517
- var phoneContextStart = indexOfPhoneContext + RFC3966_PHONE_CONTEXT_.length;
2518
- // If phone-context parameter is empty
2519
- if (phoneContextStart >= numberToExtractFrom.length) {
2520
- return '';
2521
- }
2522
- var phoneContextEnd = numberToExtractFrom.indexOf(';', phoneContextStart);
2523
- // If phone-context is not the last parameter
2524
- if (phoneContextEnd >= 0) {
2525
- return numberToExtractFrom.substring(phoneContextStart, phoneContextEnd);
2526
- } else {
2527
- return numberToExtractFrom.substring(phoneContextStart);
2528
- }
2529
- }
2530
-
2531
- /**
2532
- * Returns whether the value of phoneContext follows the syntax defined in RFC3966.
2533
- *
2534
- * @param {string|null} phoneContext
2535
- * @return {boolean}
2536
- */
2537
- function isPhoneContextValid(phoneContext) {
2538
- if (phoneContext === null) {
2539
- return true;
2540
- }
2541
- if (phoneContext.length === 0) {
2542
- return false;
2543
- }
2544
-
2545
- // Does phone-context value match pattern of global-number-digits or domainname.
2546
- return RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_.test(phoneContext) || RFC3966_DOMAINNAME_PATTERN_.test(phoneContext);
2547
- }
2548
-
2549
- /**
2550
- * @param {string} numberToParse
2551
- * @param {string} nationalNumber
2552
- * @return {}
2553
- */
2554
- function extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(numberToParse, _ref) {
2555
- var extractFormattedPhoneNumber = _ref.extractFormattedPhoneNumber;
2556
- var phoneContext = extractPhoneContext(numberToParse);
2557
- if (!isPhoneContextValid(phoneContext)) {
2558
- throw new ParseError('NOT_A_NUMBER');
2559
- }
2560
- var phoneNumberString;
2561
- if (phoneContext === null) {
2562
- // Extract a possible number from the string passed in.
2563
- // (this strips leading characters that could not be the start of a phone number)
2564
- phoneNumberString = extractFormattedPhoneNumber(numberToParse) || '';
2565
- } else {
2566
- phoneNumberString = '';
2567
-
2568
- // If the phone context contains a phone number prefix, we need to capture
2569
- // it, whereas domains will be ignored.
2570
- if (phoneContext.charAt(0) === PLUS_SIGN) {
2571
- phoneNumberString += phoneContext;
2572
- }
2573
-
2574
- // Now append everything between the "tel:" prefix and the phone-context.
2575
- // This should include the national number, an optional extension or
2576
- // isdn-subaddress component. Note we also handle the case when "tel:" is
2577
- // missing, as we have seen in some of the phone number inputs.
2578
- // In that case, we append everything from the beginning.
2579
- var indexOfRfc3966Prefix = numberToParse.indexOf(RFC3966_PREFIX_);
2580
- var indexOfNationalNumber;
2581
- // RFC 3966 "tel:" prefix is preset at this stage because
2582
- // `isPhoneContextValid()` requires it to be present.
2583
- /* istanbul ignore else */
2584
- if (indexOfRfc3966Prefix >= 0) {
2585
- indexOfNationalNumber = indexOfRfc3966Prefix + RFC3966_PREFIX_.length;
2586
- } else {
2587
- indexOfNationalNumber = 0;
2588
- }
2589
- var indexOfPhoneContext = numberToParse.indexOf(RFC3966_PHONE_CONTEXT_);
2590
- phoneNumberString += numberToParse.substring(indexOfNationalNumber, indexOfPhoneContext);
2591
- }
2592
-
2593
- // Delete the isdn-subaddress and everything after it if it is present.
2594
- // Note extension won't appear at the same time with isdn-subaddress
2595
- // according to paragraph 5.3 of the RFC3966 spec.
2596
- var indexOfIsdn = phoneNumberString.indexOf(RFC3966_ISDN_SUBADDRESS_);
2597
- if (indexOfIsdn > 0) {
2598
- phoneNumberString = phoneNumberString.substring(0, indexOfIsdn);
2599
- }
2600
- // If both phone context and isdn-subaddress are absent but other
2601
- // parameters are present, the parameters are left in nationalNumber.
2602
- // This is because we are concerned about deleting content from a potential
2603
- // number string when there is no strong evidence that the number is
2604
- // actually written in RFC3966.
2605
-
2606
- if (phoneNumberString !== '') {
2607
- return phoneNumberString;
2608
- }
2609
- }
2610
-
2611
- // This is a port of Google Android `libphonenumber`'s
2612
- // `phonenumberutil.js` of December 31th, 2018.
2613
- //
2614
- // https://github.com/googlei18n/libphonenumber/commits/master/javascript/i18n/phonenumbers/phonenumberutil.js
2615
-
2616
-
2617
- // We don't allow input strings for parsing to be longer than 250 chars.
2618
- // This prevents malicious input from consuming CPU.
2619
- var MAX_INPUT_STRING_LENGTH = 250;
2620
-
2621
- // This consists of the plus symbol, digits, and arabic-indic digits.
2622
- var PHONE_NUMBER_START_PATTERN = new RegExp('[' + PLUS_CHARS + VALID_DIGITS + ']');
2623
-
2624
- // Regular expression of trailing characters that we want to remove.
2625
- // A trailing `#` is sometimes used when writing phone numbers with extensions in US.
2626
- // Example: "+1 (645) 123 1234-910#" number has extension "910".
2627
- var AFTER_PHONE_NUMBER_END_PATTERN = new RegExp('[^' + VALID_DIGITS + '#' + ']+$');
2628
-
2629
- // Examples:
2630
- //
2631
- // ```js
2632
- // parse('8 (800) 555-35-35', 'RU')
2633
- // parse('8 (800) 555-35-35', 'RU', metadata)
2634
- // parse('8 (800) 555-35-35', { country: { default: 'RU' } })
2635
- // parse('8 (800) 555-35-35', { country: { default: 'RU' } }, metadata)
2636
- // parse('+7 800 555 35 35')
2637
- // parse('+7 800 555 35 35', metadata)
2638
- // ```
2639
- //
2640
-
2641
- /**
2642
- * Parses a phone number.
2643
- *
2644
- * parse('123456789', { defaultCountry: 'RU', v2: true }, metadata)
2645
- * parse('123456789', { defaultCountry: 'RU' }, metadata)
2646
- * parse('123456789', undefined, metadata)
2647
- *
2648
- * @param {string} input
2649
- * @param {object} [options]
2650
- * @param {object} metadata
2651
- * @return {object|PhoneNumber?} If `options.v2: true` flag is passed, it returns a `PhoneNumber?` instance. Otherwise, returns an object of shape `{ phone: '...', country: '...' }` (or just `{}` if no phone number was parsed).
2652
- */
2653
- function parse(text, options, metadata) {
2654
- // If assigning the `{}` default value is moved to the arguments above,
2655
- // code coverage would decrease for some weird reason.
2656
- options = options || {};
2657
- metadata = new Metadata(metadata);
2658
-
2659
- // Validate `defaultCountry`.
2660
- if (options.defaultCountry && !metadata.hasCountry(options.defaultCountry)) {
2661
- if (options.v2) {
2662
- throw new ParseError('INVALID_COUNTRY');
2663
- }
2664
- throw new Error("Unknown country: ".concat(options.defaultCountry));
2665
- }
2666
-
2667
- // Parse the phone number.
2668
- var _parseInput = parseInput(text, options.v2, options.extract),
2669
- formattedPhoneNumber = _parseInput.number,
2670
- ext = _parseInput.ext,
2671
- error = _parseInput.error;
2672
-
2673
- // If the phone number is not viable then return nothing.
2674
- if (!formattedPhoneNumber) {
2675
- if (options.v2) {
2676
- if (error === 'TOO_SHORT') {
2677
- throw new ParseError('TOO_SHORT');
2678
- }
2679
- throw new ParseError('NOT_A_NUMBER');
2680
- }
2681
- return {};
2682
- }
2683
- var _parsePhoneNumber = parsePhoneNumber$1(formattedPhoneNumber, options.defaultCountry, options.defaultCallingCode, metadata),
2684
- country = _parsePhoneNumber.country,
2685
- nationalNumber = _parsePhoneNumber.nationalNumber,
2686
- countryCallingCode = _parsePhoneNumber.countryCallingCode,
2687
- countryCallingCodeSource = _parsePhoneNumber.countryCallingCodeSource,
2688
- carrierCode = _parsePhoneNumber.carrierCode;
2689
- if (!metadata.hasSelectedNumberingPlan()) {
2690
- if (options.v2) {
2691
- throw new ParseError('INVALID_COUNTRY');
2692
- }
2693
- return {};
2694
- }
2695
-
2696
- // Validate national (significant) number length.
2697
- if (!nationalNumber || nationalNumber.length < MIN_LENGTH_FOR_NSN) {
2698
- // Won't throw here because the regexp already demands length > 1.
2699
- /* istanbul ignore if */
2700
- if (options.v2) {
2701
- throw new ParseError('TOO_SHORT');
2702
- }
2703
- // Google's demo just throws an error in this case.
2704
- return {};
2705
- }
2706
-
2707
- // Validate national (significant) number length.
2708
- //
2709
- // A sidenote:
2710
- //
2711
- // They say that sometimes national (significant) numbers
2712
- // can be longer than `MAX_LENGTH_FOR_NSN` (e.g. in Germany).
2713
- // https://github.com/googlei18n/libphonenumber/blob/7e1748645552da39c4e1ba731e47969d97bdb539/resources/phonenumber.proto#L36
2714
- // Such numbers will just be discarded.
2715
- //
2716
- if (nationalNumber.length > MAX_LENGTH_FOR_NSN) {
2717
- if (options.v2) {
2718
- throw new ParseError('TOO_LONG');
2719
- }
2720
- // Google's demo just throws an error in this case.
2721
- return {};
2722
- }
2723
- if (options.v2) {
2724
- var phoneNumber = new PhoneNumber(countryCallingCode, nationalNumber, metadata.metadata);
2725
- if (country) {
2726
- phoneNumber.country = country;
2727
- }
2728
- if (carrierCode) {
2729
- phoneNumber.carrierCode = carrierCode;
2730
- }
2731
- if (ext) {
2732
- phoneNumber.ext = ext;
2733
- }
2734
- phoneNumber.__countryCallingCodeSource = countryCallingCodeSource;
2735
- return phoneNumber;
2736
- }
2737
-
2738
- // Check if national phone number pattern matches the number.
2739
- // National number pattern is different for each country,
2740
- // even for those ones which are part of the "NANPA" group.
2741
- var valid = (options.extended ? metadata.hasSelectedNumberingPlan() : country) ? matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) : false;
2742
- if (!options.extended) {
2743
- return valid ? result(country, nationalNumber, ext) : {};
2744
- }
2745
-
2746
- // isInternational: countryCallingCode !== undefined
2747
-
2748
- return {
2749
- country: country,
2750
- countryCallingCode: countryCallingCode,
2751
- carrierCode: carrierCode,
2752
- valid: valid,
2753
- possible: valid ? true : options.extended === true && metadata.possibleLengths() && isPossibleNumber(nationalNumber, country, metadata) ? true : false,
2754
- phone: nationalNumber,
2755
- ext: ext
2756
- };
2757
- }
2758
-
2759
- /**
2760
- * Extracts a formatted phone number from text.
2761
- * Doesn't guarantee that the extracted phone number
2762
- * is a valid phone number (for example, doesn't validate its length).
2763
- * @param {string} text
2764
- * @param {boolean} [extract] — If `false`, then will parse the entire `text` as a phone number.
2765
- * @param {boolean} [throwOnError] — By default, it won't throw if the text is too long.
2766
- * @return {string}
2767
- * @example
2768
- * // Returns "(213) 373-4253".
2769
- * extractFormattedPhoneNumber("Call (213) 373-4253 for assistance.")
2770
- */
2771
- function _extractFormattedPhoneNumber(text, extract, throwOnError) {
2772
- if (!text) {
2773
- return;
2774
- }
2775
- if (text.length > MAX_INPUT_STRING_LENGTH) {
2776
- if (throwOnError) {
2777
- throw new ParseError('TOO_LONG');
2778
- }
2779
- return;
2780
- }
2781
- if (extract === false) {
2782
- return text;
2783
- }
2784
- // Attempt to extract a possible number from the string passed in
2785
- var startsAt = text.search(PHONE_NUMBER_START_PATTERN);
2786
- if (startsAt < 0) {
2787
- return;
2788
- }
2789
- return text
2790
- // Trim everything to the left of the phone number
2791
- .slice(startsAt)
2792
- // Remove trailing non-numerical characters
2793
- .replace(AFTER_PHONE_NUMBER_END_PATTERN, '');
2794
- }
2795
-
2796
- /**
2797
- * @param {string} text - Input.
2798
- * @param {boolean} v2 - Legacy API functions don't pass `v2: true` flag.
2799
- * @param {boolean} [extract] - Whether to extract a phone number from `text`, or attempt to parse the entire text as a phone number.
2800
- * @return {object} `{ ?number, ?ext }`.
2801
- */
2802
- function parseInput(text, v2, extract) {
2803
- // // Parse RFC 3966 phone number URI.
2804
- // if (text && text.indexOf('tel:') === 0) {
2805
- // return parseRFC3966(text)
2806
- // }
2807
- // let number = extractFormattedPhoneNumber(text, extract, v2)
2808
- var number = extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(text, {
2809
- extractFormattedPhoneNumber: function extractFormattedPhoneNumber(text) {
2810
- return _extractFormattedPhoneNumber(text, extract, v2);
2811
- }
2812
- });
2813
- // If the phone number is not viable, then abort.
2814
- if (!number) {
2815
- return {};
2816
- }
2817
- if (!isViablePhoneNumber(number)) {
2818
- if (isViablePhoneNumberStart(number)) {
2819
- return {
2820
- error: 'TOO_SHORT'
2821
- };
2822
- }
2823
- return {};
2824
- }
2825
- // Attempt to parse extension first, since it doesn't require region-specific
2826
- // data and we want to have the non-normalised number here.
2827
- var withExtensionStripped = extractExtension(number);
2828
- if (withExtensionStripped.ext) {
2829
- return withExtensionStripped;
2830
- }
2831
- return {
2832
- number: number
2833
- };
2834
- }
2835
-
2836
- /**
2837
- * Creates `parse()` result object.
2838
- */
2839
- function result(country, nationalNumber, ext) {
2840
- var result = {
2841
- country: country,
2842
- phone: nationalNumber
2843
- };
2844
- if (ext) {
2845
- result.ext = ext;
2846
- }
2847
- return result;
2848
- }
2849
-
2850
- /**
2851
- * Parses a viable phone number.
2852
- * @param {string} formattedPhoneNumber — Example: "(213) 373-4253".
2853
- * @param {string} [defaultCountry]
2854
- * @param {string} [defaultCallingCode]
2855
- * @param {Metadata} metadata
2856
- * @return {object} Returns `{ country: string?, countryCallingCode: string?, nationalNumber: string? }`.
2857
- */
2858
- function parsePhoneNumber$1(formattedPhoneNumber, defaultCountry, defaultCallingCode, metadata) {
2859
- // Extract calling code from phone number.
2860
- var _extractCountryCallin = extractCountryCallingCode(parseIncompletePhoneNumber(formattedPhoneNumber), undefined, defaultCountry, defaultCallingCode, metadata.metadata),
2861
- countryCallingCodeSource = _extractCountryCallin.countryCallingCodeSource,
2862
- countryCallingCode = _extractCountryCallin.countryCallingCode,
2863
- number = _extractCountryCallin.number;
2864
-
2865
- // The exact country of the phone number
2866
- var country;
2867
-
2868
- // If `formattedPhoneNumber` is passed in "international" format,
2869
- // choose a country by `countryCallingCode`.
2870
- if (countryCallingCode) {
2871
- metadata.selectNumberingPlan(countryCallingCode);
2872
- }
2873
- // Else, if `formattedPhoneNumber` is passed in "national" format,
2874
- // then `number` is defined and `countryCallingCode` is `undefined`.
2875
- else if (number && (defaultCountry || defaultCallingCode)) {
2876
- metadata.selectNumberingPlan(defaultCountry, defaultCallingCode);
2877
- if (defaultCountry) {
2878
- country = defaultCountry;
2879
- }
2880
- countryCallingCode = defaultCallingCode || getCountryCallingCode(defaultCountry, metadata.metadata);
2881
- } else return {};
2882
- if (!number) {
2883
- return {
2884
- countryCallingCodeSource: countryCallingCodeSource,
2885
- countryCallingCode: countryCallingCode
2886
- };
2887
- }
2888
- var _extractNationalNumbe = extractNationalNumber(parseIncompletePhoneNumber(number), country, metadata),
2889
- nationalNumber = _extractNationalNumbe.nationalNumber,
2890
- carrierCode = _extractNationalNumbe.carrierCode;
2891
-
2892
- // Sometimes there are several countries
2893
- // corresponding to the same country phone code
2894
- // (e.g. NANPA countries all having `1` country phone code).
2895
- // Therefore, to reliably determine the exact country,
2896
- // national (significant) number should have been parsed first.
2897
- //
2898
- // When `metadata.json` is generated, all "ambiguous" country phone codes
2899
- // get their countries populated with the full set of
2900
- // "phone number type" regular expressions.
2901
- //
2902
- var exactCountry = getCountryByCallingCode(countryCallingCode, {
2903
- nationalNumber: nationalNumber,
2904
- metadata: metadata
2905
- });
2906
- if (exactCountry) {
2907
- country = exactCountry;
2908
- /* istanbul ignore if */
2909
- if (exactCountry === '001') ; else {
2910
- metadata.selectNumberingPlan(country);
2911
- }
2912
- }
2913
- return {
2914
- country: country,
2915
- countryCallingCode: countryCallingCode,
2916
- countryCallingCodeSource: countryCallingCodeSource,
2917
- nationalNumber: nationalNumber,
2918
- carrierCode: carrierCode
2919
- };
2920
- }
2921
-
2922
- function _typeof$9(o) { "@babel/helpers - typeof"; return _typeof$9 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$9(o); }
2923
- function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2924
- function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), true).forEach(function (r) { _defineProperty$3(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2925
- function _defineProperty$3(e, r, t) { return (r = _toPropertyKey$9(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; }
2926
- function _toPropertyKey$9(t) { var i = _toPrimitive$9(t, "string"); return "symbol" == _typeof$9(i) ? i : i + ""; }
2927
- function _toPrimitive$9(t, r) { if ("object" != _typeof$9(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof$9(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
2928
- function parsePhoneNumberWithError(text, options, metadata) {
2929
- return parse(text, _objectSpread$3(_objectSpread$3({}, options), {}, {
2930
- v2: true
2931
- }), metadata);
2932
- }
2933
-
2934
- function _typeof$8(o) { "@babel/helpers - typeof"; return _typeof$8 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$8(o); }
2935
- function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2936
- function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty$2(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2937
- function _defineProperty$2(e, r, t) { return (r = _toPropertyKey$8(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; }
2938
- function _toPropertyKey$8(t) { var i = _toPrimitive$8(t, "string"); return "symbol" == _typeof$8(i) ? i : i + ""; }
2939
- function _toPrimitive$8(t, r) { if ("object" != _typeof$8(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof$8(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
2940
- function _slicedToArray$2(r, e) { return _arrayWithHoles$2(r) || _iterableToArrayLimit$2(r, e) || _unsupportedIterableToArray$5(r, e) || _nonIterableRest$2(); }
2941
- function _nonIterableRest$2() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2942
- function _unsupportedIterableToArray$5(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$5(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$5(r, a) : void 0; } }
2943
- function _arrayLikeToArray$5(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2944
- function _iterableToArrayLimit$2(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = true, o = false; try { if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true); } catch (r) { o = true, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
2945
- function _arrayWithHoles$2(r) { if (Array.isArray(r)) return r; }
2946
-
2947
- // Extracts the following properties from function arguments:
2948
- // * input `text`
2949
- // * `options` object
2950
- // * `metadata` JSON
2951
- function normalizeArguments(args) {
2952
- var _Array$prototype$slic = Array.prototype.slice.call(args),
2953
- _Array$prototype$slic2 = _slicedToArray$2(_Array$prototype$slic, 4),
2954
- arg_1 = _Array$prototype$slic2[0],
2955
- arg_2 = _Array$prototype$slic2[1],
2956
- arg_3 = _Array$prototype$slic2[2],
2957
- arg_4 = _Array$prototype$slic2[3];
2958
- var text;
2959
- var options;
2960
- var metadata;
2961
-
2962
- // If the phone number is passed as a string.
2963
- // `parsePhoneNumber('88005553535', ...)`.
2964
- if (typeof arg_1 === 'string') {
2965
- text = arg_1;
2966
- } else throw new TypeError('A text for parsing must be a string.');
2967
-
2968
- // If "default country" argument is being passed then move it to `options`.
2969
- // `parsePhoneNumber('88005553535', 'RU', [options], metadata)`.
2970
- if (!arg_2 || typeof arg_2 === 'string') {
2971
- if (arg_4) {
2972
- options = arg_3;
2973
- metadata = arg_4;
2974
- } else {
2975
- options = undefined;
2976
- metadata = arg_3;
2977
- }
2978
- if (arg_2) {
2979
- options = _objectSpread$2({
2980
- defaultCountry: arg_2
2981
- }, options);
2982
- }
2983
- }
2984
- // `defaultCountry` is not passed.
2985
- // Example: `parsePhoneNumber('+78005553535', [options], metadata)`.
2986
- else if (isObject(arg_2)) {
2987
- if (arg_3) {
2988
- options = arg_2;
2989
- metadata = arg_3;
2990
- } else {
2991
- metadata = arg_2;
2992
- }
2993
- } else throw new Error("Invalid second argument: ".concat(arg_2));
2994
- return {
2995
- text: text,
2996
- options: options,
2997
- metadata: metadata
2998
- };
2999
- }
3000
-
3001
- function _typeof$7(o) { "@babel/helpers - typeof"; return _typeof$7 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$7(o); }
3002
- function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3003
- function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3004
- function _defineProperty$1(e, r, t) { return (r = _toPropertyKey$7(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; }
3005
- function _toPropertyKey$7(t) { var i = _toPrimitive$7(t, "string"); return "symbol" == _typeof$7(i) ? i : i + ""; }
3006
- function _toPrimitive$7(t, r) { if ("object" != _typeof$7(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof$7(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
3007
- function parsePhoneNumber(text, options, metadata) {
3008
- // Validate `defaultCountry`.
3009
- if (options && options.defaultCountry && !isSupportedCountry(options.defaultCountry, metadata)) {
3010
- options = _objectSpread$1(_objectSpread$1({}, options), {}, {
3011
- defaultCountry: undefined
3012
- });
3013
- }
3014
- // Parse phone number.
3015
- try {
3016
- return parsePhoneNumberWithError(text, options, metadata);
3017
- } catch (error) {
3018
- /* istanbul ignore else */
3019
- if (error instanceof ParseError) ; else {
3020
- throw error;
2369
+ * ```js
2370
+ * parseDigits('8 (800) 555')
2371
+ * // Outputs '8800555'.
2372
+ * ```
2373
+ */
2374
+ function parseDigits(string) {
2375
+ var result = '';
2376
+ // Using `.split('')` here instead of normal `for ... of`
2377
+ // because the importing application doesn't neccessarily include an ES6 polyfill.
2378
+ // The `.split('')` approach discards "exotic" UTF-8 characters
2379
+ // (the ones consisting of four bytes) but digits
2380
+ // (including non-European ones) don't fall into that range
2381
+ // so such "exotic" characters would be discarded anyway.
2382
+ for (var _iterator = _createForOfIteratorHelperLoose$3(string.split('')), _step; !(_step = _iterator()).done;) {
2383
+ var character = _step.value;
2384
+ var digit = parseDigit(character);
2385
+ if (digit) {
2386
+ result += digit;
3021
2387
  }
3022
2388
  }
3023
- }
3024
-
3025
- function _typeof$6(o) { "@babel/helpers - typeof"; return _typeof$6 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$6(o); }
3026
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3027
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3028
- function _defineProperty(e, r, t) { return (r = _toPropertyKey$6(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; }
3029
- function _toPropertyKey$6(t) { var i = _toPrimitive$6(t, "string"); return "symbol" == _typeof$6(i) ? i : i + ""; }
3030
- function _toPrimitive$6(t, r) { if ("object" != _typeof$6(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof$6(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
3031
- function isValidPhoneNumber$1() {
3032
- var _normalizeArguments = normalizeArguments(arguments),
3033
- text = _normalizeArguments.text,
3034
- options = _normalizeArguments.options,
3035
- metadata = _normalizeArguments.metadata;
3036
- options = _objectSpread(_objectSpread({}, options), {}, {
3037
- extract: false
3038
- });
3039
- var phoneNumber = parsePhoneNumber(text, options, metadata);
3040
- return phoneNumber && phoneNumber.isValid() || false;
2389
+ return result;
3041
2390
  }
3042
2391
 
3043
2392
  function _typeof$5(o) { "@babel/helpers - typeof"; return _typeof$5 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$5(o); }
@@ -5380,10 +4729,6 @@ var AsYouType$1 = /*#__PURE__*/function () {
5380
4729
  }]);
5381
4730
  }();
5382
4731
 
5383
- function isValidPhoneNumber() {
5384
- return withMetadataArgument(isValidPhoneNumber$1, arguments)
5385
- }
5386
-
5387
4732
  // Importing from a ".js" file is a workaround for Node.js "ES Modules"
5388
4733
  // importing system which is even uncapable of importing "*.json" files.
5389
4734
 
@@ -5394,235 +4739,6 @@ function AsYouType(country) {
5394
4739
  AsYouType.prototype = Object.create(AsYouType$1.prototype, {});
5395
4740
  AsYouType.prototype.constructor = AsYouType;
5396
4741
 
5397
- const formLanguageChange = async (formContext, newLanguage) => {
5398
- var _a, _b, _c, _d, _e;
5399
- const sharedLocales = await getSharedFormLocal(newLanguage);
5400
- const LS = (_b = (_a = formContext.structure) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.localization;
5401
- const structureLocalization = typeof LS === 'object' ? ((_d = (_c = LS === null || LS === void 0 ? void 0 : LS[newLanguage]) !== null && _c !== void 0 ? _c : LS === null || LS === void 0 ? void 0 : LS.en) !== null && _d !== void 0 ? _d : {}) : {};
5402
- formContext.locale = Object.assign(Object.assign({}, structureLocalization), { sharedFormLocales: Object.assign(Object.assign({}, sharedLocales), structureLocalization === null || structureLocalization === void 0 ? void 0 : structureLocalization.sharedFormLocales) });
5403
- formContext.localeLanguage = newLanguage;
5404
- (_e = formContext.form) === null || _e === void 0 ? void 0 : _e.rerender({ rerenderAll: true });
5405
- };
5406
- const formErrorHandler = async (formContext, error) => {
5407
- var _a, _b, _c;
5408
- const message = error.message || ((_c = (_b = (_a = formContext.locale) === null || _a === void 0 ? void 0 : _a.sharedFormLocales) === null || _b === void 0 ? void 0 : _b.errors) === null || _c === void 0 ? void 0 : _c.wildCard) || '';
5409
- if (formContext === null || formContext === void 0 ? void 0 : formContext.errorCallback)
5410
- formContext.errorCallback(error, message);
5411
- else
5412
- formContext.errorMessage = message;
5413
- };
5414
- const formLoadingHandler = async (formContext, isLoading) => {
5415
- formContext.isLoading = isLoading;
5416
- if (formContext.loadingChanges)
5417
- formContext.loadingChanges(isLoading);
5418
- };
5419
- const formSuccessHandler = async (formContext, data) => {
5420
- if (formContext.successCallback)
5421
- formContext.successCallback(data, formContext.locale['Form submitted successfully.'] || '');
5422
- else
5423
- formContext.form.openDialog();
5424
- if (!formContext.disableScrollToTop) {
5425
- const formDom = formContext.el.shadowRoot || formContext.el;
5426
- let targetElement = formDom instanceof ShadowRoot ? formDom.firstElementChild : formDom;
5427
- const yOffset = -100;
5428
- const y = targetElement.getBoundingClientRect().top + window.pageYOffset + yOffset;
5429
- window.scrollTo({ top: Math.max(y, 0), behavior: 'smooth' });
5430
- }
5431
- };
5432
- const formDidLoadHandler = async (formContext, validator) => {
5433
- var _a, _b;
5434
- if (!formContext.structure) {
5435
- if (formContext.gistId) {
5436
- const [newGistStructure] = await Promise.all([gistLoader(formContext.gistId), formContext.changeLanguage(formContext.language)]);
5437
- formContext.structure = newGistStructure;
5438
- }
5439
- else if (formContext.structureUrl) {
5440
- const [newGistStructure] = await Promise.all([fetchJson(formContext.structureUrl), formContext.changeLanguage(formContext.language)]);
5441
- formContext.structure = newGistStructure;
5442
- }
5443
- }
5444
- formContext.localeLanguage = formContext.language;
5445
- await formContext.changeLanguage(formContext.language);
5446
- if (!formContext.isMobileForm) {
5447
- try {
5448
- const key = (_b = (_a = formContext.structure) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.recaptchaKey;
5449
- if (key) {
5450
- const script = document.createElement('script');
5451
- script.src = `https://www.google.com/recaptcha/api.js?render=${key}&hl=${formContext.language}`;
5452
- script.async = true;
5453
- script.defer = true;
5454
- document.head.appendChild(script);
5455
- }
5456
- }
5457
- catch (error) {
5458
- console.log(error);
5459
- }
5460
- }
5461
- formContext.form = new FormHook(formContext, validator);
5462
- };
5463
- const formGetFormHandler = async (formContext) => {
5464
- if (formContext.form)
5465
- return formContext.form;
5466
- };
5467
- const handleFormSubmit = async (formContext) => {
5468
- if (formContext.form)
5469
- return formContext.form.submit();
5470
- };
5471
- const formStructureRenderedHandler = async (formContext, isRendered) => {
5472
- var _a;
5473
- if (isRendered)
5474
- (_a = formContext.formReadyCallback) === null || _a === void 0 ? void 0 : _a.call(formContext);
5475
- };
5476
- const marketingQueryParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'gclid', 'fbclid'];
5477
- const getMarketingValues = (structure) => {
5478
- var _a;
5479
- if ((_a = structure === null || structure === void 0 ? void 0 : structure.data) === null || _a === void 0 ? void 0 : _a.disableUTMLog)
5480
- return {};
5481
- const params = new URLSearchParams(window.location.search);
5482
- if (typeof params.get('disable_utm_log') === 'string' && params.get('disable_utm_log') === 'true')
5483
- return {};
5484
- const marketingValues = {};
5485
- marketingQueryParams.forEach(param => {
5486
- if (!!params.get(param))
5487
- marketingValues[param] = params.get(param);
5488
- });
5489
- return marketingValues;
5490
- };
5491
- const onFormSubmit = async ({ context, formValues, middleware, afterSuccess }) => {
5492
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
5493
- try {
5494
- context.setIsLoading(true);
5495
- if ((formValues === null || formValues === void 0 ? void 0 : formValues['phone']) && !isValidPhoneNumber(formValues === null || formValues === void 0 ? void 0 : formValues['phone']))
5496
- formValues === null || formValues === void 0 ? true : delete formValues['phone'];
5497
- Object.keys(formValues).forEach(key => {
5498
- if (context[`${key}-format`]) {
5499
- formValues[key] = context[`${key}-format`];
5500
- }
5501
- });
5502
- const hasAdditionalData = !!((_b = (_a = context.structure) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.truncatedFields) && !!((_e = Object.keys((_d = (_c = context.structure) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.truncatedFields)) === null || _e === void 0 ? void 0 : _e.length);
5503
- let additionalData = {};
5504
- const marketingValues = getMarketingValues(context === null || context === void 0 ? void 0 : context.structure);
5505
- let payload = Object.assign({}, formValues);
5506
- if ((_g = (_f = context.structure) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.extraPayload)
5507
- payload = Object.assign(Object.assign({}, payload), (_j = (_h = context.structure) === null || _h === void 0 ? void 0 : _h.data) === null || _j === void 0 ? void 0 : _j.extraPayload);
5508
- if (hasAdditionalData)
5509
- payload.additionalData = Object.assign({}, additionalData);
5510
- if (!!(context === null || context === void 0 ? void 0 : context.extraPayload))
5511
- payload = Object.assign(Object.assign({}, payload), context === null || context === void 0 ? void 0 : context.extraPayload);
5512
- if (hasAdditionalData) {
5513
- Object.entries((_l = (_k = context.structure) === null || _k === void 0 ? void 0 : _k.data) === null || _l === void 0 ? void 0 : _l.truncatedFields).forEach(([oldKey, truncateValue]) => {
5514
- if (Array.isArray(truncateValue)) {
5515
- let constructNewValue = '';
5516
- truncateValue.forEach(key => {
5517
- constructNewValue += payload[key.toString()] || key.toString();
5518
- });
5519
- payload = Object.assign(Object.assign({}, payload), { [oldKey]: constructNewValue });
5520
- }
5521
- else if (typeof truncateValue === 'string' && truncateValue) {
5522
- if (oldKey.startsWith('parse date: ')) {
5523
- let tempKey = oldKey.replaceAll('parse date: ', '');
5524
- payload[tempKey] = dateFnsExports.parse(payload[tempKey], truncateValue, new Date());
5525
- }
5526
- else if (oldKey.startsWith('format date: ')) {
5527
- let tempKey = oldKey.replaceAll('format date: ', '');
5528
- payload[tempKey] = dateFnsExports.formatISO(payload[tempKey]);
5529
- }
5530
- else {
5531
- additionalData[truncateValue] = payload[oldKey];
5532
- delete payload[oldKey];
5533
- }
5534
- }
5535
- });
5536
- }
5537
- let header = {
5538
- 'Content-Type': 'application/json',
5539
- 'Brand': (_o = (_m = context.structure) === null || _m === void 0 ? void 0 : _m.data) === null || _o === void 0 ? void 0 : _o.brandId,
5540
- 'Accept-Language': context.localeLanguage || 'en',
5541
- };
5542
- if (!!(context === null || context === void 0 ? void 0 : context.extraHeader))
5543
- header = Object.assign(Object.assign({}, header), context === null || context === void 0 ? void 0 : context.extraHeader);
5544
- if (!!((_q = (_p = context.structure) === null || _p === void 0 ? void 0 : _p.data) === null || _q === void 0 ? void 0 : _q.extraHeader))
5545
- header = Object.assign(Object.assign({}, header), (_s = (_r = context.structure) === null || _r === void 0 ? void 0 : _r.data) === null || _s === void 0 ? void 0 : _s.extraHeader);
5546
- let requestEndpoint = '';
5547
- if (context.isMobileForm) {
5548
- const token = await context.getMobileToken();
5549
- if (token.toLowerCase().startsWith('bearer')) {
5550
- header['Authorization'] = token;
5551
- requestEndpoint = (_u = (_t = context.structure) === null || _t === void 0 ? void 0 : _t.data) === null || _u === void 0 ? void 0 : _u.requestAppUrl;
5552
- }
5553
- else {
5554
- header['verification-token'] = token;
5555
- requestEndpoint = (_w = (_v = context.structure) === null || _v === void 0 ? void 0 : _v.data) === null || _w === void 0 ? void 0 : _w.requestAppCheckUrl;
5556
- }
5557
- }
5558
- else {
5559
- requestEndpoint = (_y = (_x = context.structure) === null || _x === void 0 ? void 0 : _x.data) === null || _y === void 0 ? void 0 : _y.requestUrl;
5560
- if ((_0 = (_z = context.structure) === null || _z === void 0 ? void 0 : _z.data) === null || _0 === void 0 ? void 0 : _0.recaptchaKey) {
5561
- const token = await grecaptcha.execute((_2 = (_1 = context.structure) === null || _1 === void 0 ? void 0 : _1.data) === null || _2 === void 0 ? void 0 : _2.recaptchaKey, { action: 'submit' });
5562
- header['Recaptcha-Token'] = token;
5563
- }
5564
- }
5565
- if (context.isDev)
5566
- requestEndpoint = requestEndpoint.replaceAll('production=true', 'production=false');
5567
- if (!requestEndpoint) {
5568
- throw new Error('Request endpoint is not configured');
5569
- }
5570
- const method = ((_4 = (_3 = context.structure) === null || _3 === void 0 ? void 0 : _3.data) === null || _4 === void 0 ? void 0 : _4.requestMethod) || 'POST';
5571
- if (['get', 'head'].includes(method.toLowerCase()))
5572
- header = Object.assign(Object.assign({}, header), marketingValues);
5573
- else
5574
- payload = Object.assign(Object.assign({}, payload), marketingValues);
5575
- if (middleware) {
5576
- const middlewareRes = middleware(payload, header, requestEndpoint);
5577
- payload = Object.assign({}, middlewareRes.payload);
5578
- header = Object.assign({}, middlewareRes.header);
5579
- requestEndpoint = middlewareRes.url;
5580
- }
5581
- Object.values(context.form.pendingRequests).forEach(async (req) => {
5582
- try {
5583
- await req();
5584
- }
5585
- catch (error) {
5586
- console.error(error);
5587
- }
5588
- });
5589
- const response = await fetch(requestEndpoint, Object.assign({ headers: header, method: ((_6 = (_5 = context.structure) === null || _5 === void 0 ? void 0 : _5.data) === null || _6 === void 0 ? void 0 : _6.requestMethod) || 'POST' }, (((_9 = (_8 = (_7 = context.structure) === null || _7 === void 0 ? void 0 : _7.data) === null || _8 === void 0 ? void 0 : _8.requestMethod) === null || _9 === void 0 ? void 0 : _9.toLowerCase()) === 'get' ? {} : { body: JSON.stringify(payload) })));
5590
- if (response.ok) {
5591
- const result = await (response === null || response === void 0 ? void 0 : response.json());
5592
- if (afterSuccess)
5593
- await afterSuccess(payload, header);
5594
- context.setSuccessCallback(result);
5595
- setTimeout(() => {
5596
- context.form.reset();
5597
- context.form.rerender({ rerenderForm: true, rerenderAll: true });
5598
- }, 100);
5599
- }
5600
- else {
5601
- const contentType = response.headers.get('content-type');
5602
- const errorText = (contentType === null || contentType === void 0 ? void 0 : contentType.includes('application/json')) ? (_11 = (_10 = (await response.json())) === null || _10 === void 0 ? void 0 : _10.message) === null || _11 === void 0 ? void 0 : _11.body : await response.text();
5603
- throw new Error(errorText);
5604
- }
5605
- }
5606
- catch (error) {
5607
- console.error(error);
5608
- context.setErrorCallback(error);
5609
- }
5610
- finally {
5611
- context.setIsLoading(false);
5612
- }
5613
- };
5614
- const functionHooks = {
5615
- formLanguageChange,
5616
- formErrorHandler,
5617
- handleFormSubmit,
5618
- formLoadingHandler,
5619
- formSuccessHandler,
5620
- formDidLoadHandler,
5621
- formGetFormHandler,
5622
- onFormSubmit,
5623
- formStructureRenderedHandler,
5624
- };
5625
-
5626
4742
  const getPhoneValidator = (countryCode) => {
5627
4743
  const phoneValidator = new AsYouType(Array.isArray(countryCode) ? undefined : countryCode);
5628
4744
  if (Array.isArray(countryCode)) {