@riverty/web-components 6.3.0 → 6.3.1

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 (397) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
  3. package/dist/cjs/focusable-Oll_rmtP.js +28 -0
  4. package/dist/cjs/formData-B2DZyLxP.js +44 -0
  5. package/dist/cjs/index-BnETQtSf.js +1834 -0
  6. package/dist/cjs/index.cjs.js +37 -0
  7. package/dist/cjs/loader.cjs.js +13 -0
  8. package/dist/cjs/r-accordion-panel.cjs.entry.js +24 -0
  9. package/dist/cjs/r-accordion-section.cjs.entry.js +125 -0
  10. package/dist/cjs/r-accordion-trigger.cjs.entry.js +93 -0
  11. package/dist/cjs/r-accordion.cjs.entry.js +20 -0
  12. package/dist/cjs/r-alert.cjs.entry.js +146 -0
  13. package/dist/cjs/r-badge.cjs.entry.js +41 -0
  14. package/dist/cjs/r-button.cjs.entry.js +149 -0
  15. package/dist/cjs/r-checkbox-group.cjs.entry.js +237 -0
  16. package/dist/cjs/r-checkbox.cjs.entry.js +274 -0
  17. package/dist/cjs/r-design-system-devtools.cjs.entry.js +31 -0
  18. package/dist/cjs/r-dialog.cjs.entry.js +107 -0
  19. package/dist/cjs/r-hint_2.cjs.entry.js +50 -0
  20. package/dist/cjs/r-icon-button_2.cjs.entry.js +492 -0
  21. package/dist/cjs/r-icon.cjs.entry.js +284 -0
  22. package/dist/cjs/r-illustration.cjs.entry.js +396 -0
  23. package/dist/cjs/r-input-code.cjs.entry.js +437 -0
  24. package/dist/cjs/r-input-date.cjs.entry.js +524 -0
  25. package/dist/cjs/r-input-password.cjs.entry.js +270 -0
  26. package/dist/cjs/r-input-phone-number.cjs.entry.js +2525 -0
  27. package/dist/cjs/r-input.cjs.entry.js +618 -0
  28. package/dist/cjs/r-list-item.cjs.entry.js +109 -0
  29. package/dist/cjs/r-pagination.cjs.entry.js +320 -0
  30. package/dist/cjs/r-panel.cjs.entry.js +184 -0
  31. package/dist/cjs/r-popover-action.cjs.entry.js +80 -0
  32. package/dist/cjs/r-popover-content.cjs.entry.js +62 -0
  33. package/dist/cjs/r-popover-headline.cjs.entry.js +28 -0
  34. package/dist/cjs/r-popover-trigger.cjs.entry.js +70 -0
  35. package/dist/cjs/r-popover.cjs.entry.js +347 -0
  36. package/dist/cjs/r-progress-bar.cjs.entry.js +25 -0
  37. package/dist/cjs/r-radio-button-description.cjs.entry.js +18 -0
  38. package/dist/cjs/r-radio-button-leading.cjs.entry.js +18 -0
  39. package/dist/cjs/r-radio-button-title.cjs.entry.js +18 -0
  40. package/dist/cjs/r-radio-button-trailing.cjs.entry.js +18 -0
  41. package/dist/cjs/r-radio-button.cjs.entry.js +139 -0
  42. package/dist/cjs/r-radio-group.cjs.entry.js +428 -0
  43. package/dist/cjs/r-select-option.cjs.entry.js +130 -0
  44. package/dist/cjs/r-select.cjs.entry.js +1107 -0
  45. package/dist/cjs/r-skip-link.cjs.entry.js +19 -0
  46. package/dist/cjs/r-stepper-item.cjs.entry.js +42 -0
  47. package/dist/cjs/r-stepper.cjs.entry.js +99 -0
  48. package/dist/cjs/r-tab-panel.cjs.entry.js +26 -0
  49. package/dist/cjs/r-tab.cjs.entry.js +62 -0
  50. package/dist/cjs/r-tabs-list.cjs.entry.js +175 -0
  51. package/dist/cjs/r-tabs.cjs.entry.js +277 -0
  52. package/dist/cjs/r-textarea.cjs.entry.js +270 -0
  53. package/dist/cjs/r-toast-group.cjs.entry.js +46 -0
  54. package/dist/cjs/r-toast.cjs.entry.js +314 -0
  55. package/dist/cjs/style-observer-D9zSP9wP.js +1118 -0
  56. package/dist/cjs/theming-NqxjhVJS.js +109 -0
  57. package/dist/cjs/web-components.cjs.js +25 -0
  58. package/dist/collection/collection-manifest.json +60 -0
  59. package/dist/collection/components/accordion/accordion.css +24 -0
  60. package/dist/collection/components/accordion/accordion.js +90 -0
  61. package/dist/collection/components/accordion/exports.js +1 -0
  62. package/dist/collection/components/accordion-panel/accordion-panel.css +50 -0
  63. package/dist/collection/components/accordion-panel/accordion-panel.js +86 -0
  64. package/dist/collection/components/accordion-section/accordion-section.css +27 -0
  65. package/dist/collection/components/accordion-section/accordion-section.js +235 -0
  66. package/dist/collection/components/accordion-trigger/accordion-trigger.css +93 -0
  67. package/dist/collection/components/accordion-trigger/accordion-trigger.js +220 -0
  68. package/dist/collection/components/alert/alert.css +120 -0
  69. package/dist/collection/components/alert/alert.js +526 -0
  70. package/dist/collection/components/alert/exports.js +2 -0
  71. package/dist/collection/components/badge/badge.css +62 -0
  72. package/dist/collection/components/badge/badge.js +124 -0
  73. package/dist/collection/components/badge/exports.js +1 -0
  74. package/dist/collection/components/button/button.css +180 -0
  75. package/dist/collection/components/button/button.js +510 -0
  76. package/dist/collection/components/button/exports.js +5 -0
  77. package/dist/collection/components/checkbox/checkbox.css +116 -0
  78. package/dist/collection/components/checkbox/checkbox.js +803 -0
  79. package/dist/collection/components/checkbox-group/checkbox-group.css +48 -0
  80. package/dist/collection/components/checkbox-group/checkbox-group.js +744 -0
  81. package/dist/collection/components/design-system-devtools/design-system-devtools.js +59 -0
  82. package/dist/collection/components/dialog/dialog.css +125 -0
  83. package/dist/collection/components/dialog/dialog.js +345 -0
  84. package/dist/collection/components/dialog/exports.js +9 -0
  85. package/dist/collection/components/hint/exports.js +1 -0
  86. package/dist/collection/components/hint/hint.css +63 -0
  87. package/dist/collection/components/hint/hint.js +114 -0
  88. package/dist/collection/components/icon/all-kit.js +2 -0
  89. package/dist/collection/components/icon/data.js +90 -0
  90. package/dist/collection/components/icon/exports.js +7 -0
  91. package/dist/collection/components/icon/icon.css +105 -0
  92. package/dist/collection/components/icon/icon.js +379 -0
  93. package/dist/collection/components/icon/riverty-kit.js +2 -0
  94. package/dist/collection/components/icon-button/icon-button.css +105 -0
  95. package/dist/collection/components/icon-button/icon-button.js +343 -0
  96. package/dist/collection/components/illustration/data.js +112 -0
  97. package/dist/collection/components/illustration/exports.js +3 -0
  98. package/dist/collection/components/illustration/illustration.css +52 -0
  99. package/dist/collection/components/illustration/illustration.js +540 -0
  100. package/dist/collection/components/illustration/illustrations-ui-kit.js +2 -0
  101. package/dist/collection/components/input/exports.js +62 -0
  102. package/dist/collection/components/input/input.css +186 -0
  103. package/dist/collection/components/input/input.js +1861 -0
  104. package/dist/collection/components/input-code/exports.js +2 -0
  105. package/dist/collection/components/input-code/input-code.css +127 -0
  106. package/dist/collection/components/input-code/input-code.js +1165 -0
  107. package/dist/collection/components/input-date/exports.js +1 -0
  108. package/dist/collection/components/input-date/input-date.css +148 -0
  109. package/dist/collection/components/input-date/input-date.js +1254 -0
  110. package/dist/collection/components/input-password/exports.js +1 -0
  111. package/dist/collection/components/input-password/input-password.css +25 -0
  112. package/dist/collection/components/input-password/input-password.js +1077 -0
  113. package/dist/collection/components/input-phone-number/input-phone-number.css +61 -0
  114. package/dist/collection/components/input-phone-number/input-phone-number.js +893 -0
  115. package/dist/collection/components/label/label.css +38 -0
  116. package/dist/collection/components/label/label.js +47 -0
  117. package/dist/collection/components/list-item/list-item/exports.js +2 -0
  118. package/dist/collection/components/list-item/list-item/list-item.css +199 -0
  119. package/dist/collection/components/list-item/list-item/list-item.js +467 -0
  120. package/dist/collection/components/pagination/exports.js +3 -0
  121. package/dist/collection/components/pagination/pagination.css +118 -0
  122. package/dist/collection/components/pagination/pagination.js +814 -0
  123. package/dist/collection/components/panel/exports.js +1 -0
  124. package/dist/collection/components/panel/panel.css +192 -0
  125. package/dist/collection/components/panel/panel.js +473 -0
  126. package/dist/collection/components/popover/exports.js +3 -0
  127. package/dist/collection/components/popover/popover.css +251 -0
  128. package/dist/collection/components/popover/popover.js +741 -0
  129. package/dist/collection/components/popover-action/popover-action.css +21 -0
  130. package/dist/collection/components/popover-action/popover-action.js +150 -0
  131. package/dist/collection/components/popover-content/popover-content.css +9 -0
  132. package/dist/collection/components/popover-content/popover-content.js +130 -0
  133. package/dist/collection/components/popover-headline/popover-headline.css +7 -0
  134. package/dist/collection/components/popover-headline/popover-headline.js +28 -0
  135. package/dist/collection/components/popover-trigger/exports.js +1 -0
  136. package/dist/collection/components/popover-trigger/popover-trigger.css +4 -0
  137. package/dist/collection/components/popover-trigger/popover-trigger.js +163 -0
  138. package/dist/collection/components/progress-bar/progress-bar.css +41 -0
  139. package/dist/collection/components/progress-bar/progress-bar.js +71 -0
  140. package/dist/collection/components/radio-button/radio-button.css +126 -0
  141. package/dist/collection/components/radio-button/radio-button.js +559 -0
  142. package/dist/collection/components/radio-button-description/radio-button-description.css +5 -0
  143. package/dist/collection/components/radio-button-description/radio-button-description.js +22 -0
  144. package/dist/collection/components/radio-button-leading/radio-button-leading.css +3 -0
  145. package/dist/collection/components/radio-button-leading/radio-button-leading.js +22 -0
  146. package/dist/collection/components/radio-button-title/radio-button-title.css +8 -0
  147. package/dist/collection/components/radio-button-title/radio-button-title.js +22 -0
  148. package/dist/collection/components/radio-button-trailing/radio-button-trailing.css +6 -0
  149. package/dist/collection/components/radio-button-trailing/radio-button-trailing.js +22 -0
  150. package/dist/collection/components/radio-group/exports.js +1 -0
  151. package/dist/collection/components/radio-group/radio-group.css +65 -0
  152. package/dist/collection/components/radio-group/radio-group.js +1023 -0
  153. package/dist/collection/components/select/exports.js +1 -0
  154. package/dist/collection/components/select/select.css +247 -0
  155. package/dist/collection/components/select/select.js +2038 -0
  156. package/dist/collection/components/select-option/select-option.css +93 -0
  157. package/dist/collection/components/select-option/select-option.js +459 -0
  158. package/dist/collection/components/skip-link/exports.js +1 -0
  159. package/dist/collection/components/skip-link/skip-link.css +37 -0
  160. package/dist/collection/components/skip-link/skip-link.js +52 -0
  161. package/dist/collection/components/stepper/stepper.css +25 -0
  162. package/dist/collection/components/stepper/stepper.js +216 -0
  163. package/dist/collection/components/stepper-item/stepper-item.css +62 -0
  164. package/dist/collection/components/stepper-item/stepper-item.js +171 -0
  165. package/dist/collection/components/tab/tab.css +81 -0
  166. package/dist/collection/components/tab/tab.js +169 -0
  167. package/dist/collection/components/tab-panel/tab-panel.css +19 -0
  168. package/dist/collection/components/tab-panel/tab-panel.js +72 -0
  169. package/dist/collection/components/tabs/tabs.css +4 -0
  170. package/dist/collection/components/tabs/tabs.js +345 -0
  171. package/dist/collection/components/tabs-list/exports.js +2 -0
  172. package/dist/collection/components/tabs-list/tabs-list.css +58 -0
  173. package/dist/collection/components/tabs-list/tabs-list.js +294 -0
  174. package/dist/collection/components/textarea/exports.js +8 -0
  175. package/dist/collection/components/textarea/textarea.css +148 -0
  176. package/dist/collection/components/textarea/textarea.js +1055 -0
  177. package/dist/collection/components/toast/exports.js +3 -0
  178. package/dist/collection/components/toast/toast.css +179 -0
  179. package/dist/collection/components/toast/toast.js +820 -0
  180. package/dist/collection/components/toast-group/exports.js +1 -0
  181. package/dist/collection/components/toast-group/toast-group.css +37 -0
  182. package/dist/collection/components/toast-group/toast-group.js +49 -0
  183. package/dist/collection/components/tooltip/exports.js +3 -0
  184. package/dist/collection/components/tooltip/tooltip.css +77 -0
  185. package/dist/collection/components/tooltip/tooltip.js +525 -0
  186. package/dist/collection/index.js +2 -0
  187. package/dist/collection/utils/focusable.js +24 -0
  188. package/dist/collection/utils/formData.js +40 -0
  189. package/dist/collection/utils/theming.js +103 -0
  190. package/dist/collection/utils/version-checker.js +33 -0
  191. package/dist/esm/app-globals-DQuL1Twl.js +3 -0
  192. package/dist/esm/focusable-ky1yonnS.js +26 -0
  193. package/dist/esm/formData-DvLT8-y3.js +42 -0
  194. package/dist/esm/index-CTxpqopm.js +1806 -0
  195. package/dist/esm/index.js +35 -0
  196. package/dist/esm/loader.js +11 -0
  197. package/dist/esm/r-accordion-panel.entry.js +22 -0
  198. package/dist/esm/r-accordion-section.entry.js +123 -0
  199. package/dist/esm/r-accordion-trigger.entry.js +91 -0
  200. package/dist/esm/r-accordion.entry.js +18 -0
  201. package/dist/esm/r-alert.entry.js +144 -0
  202. package/dist/esm/r-badge.entry.js +39 -0
  203. package/dist/esm/r-button.entry.js +147 -0
  204. package/dist/esm/r-checkbox-group.entry.js +235 -0
  205. package/dist/esm/r-checkbox.entry.js +272 -0
  206. package/dist/esm/r-design-system-devtools.entry.js +29 -0
  207. package/dist/esm/r-dialog.entry.js +105 -0
  208. package/dist/esm/r-hint_2.entry.js +47 -0
  209. package/dist/esm/r-icon-button_2.entry.js +489 -0
  210. package/dist/esm/r-icon.entry.js +282 -0
  211. package/dist/esm/r-illustration.entry.js +394 -0
  212. package/dist/esm/r-input-code.entry.js +435 -0
  213. package/dist/esm/r-input-date.entry.js +522 -0
  214. package/dist/esm/r-input-password.entry.js +268 -0
  215. package/dist/esm/r-input-phone-number.entry.js +2523 -0
  216. package/dist/esm/r-input.entry.js +616 -0
  217. package/dist/esm/r-list-item.entry.js +107 -0
  218. package/dist/esm/r-pagination.entry.js +318 -0
  219. package/dist/esm/r-panel.entry.js +182 -0
  220. package/dist/esm/r-popover-action.entry.js +78 -0
  221. package/dist/esm/r-popover-content.entry.js +60 -0
  222. package/dist/esm/r-popover-headline.entry.js +26 -0
  223. package/dist/esm/r-popover-trigger.entry.js +68 -0
  224. package/dist/esm/r-popover.entry.js +345 -0
  225. package/dist/esm/r-progress-bar.entry.js +23 -0
  226. package/dist/esm/r-radio-button-description.entry.js +16 -0
  227. package/dist/esm/r-radio-button-leading.entry.js +16 -0
  228. package/dist/esm/r-radio-button-title.entry.js +16 -0
  229. package/dist/esm/r-radio-button-trailing.entry.js +16 -0
  230. package/dist/esm/r-radio-button.entry.js +137 -0
  231. package/dist/esm/r-radio-group.entry.js +426 -0
  232. package/dist/esm/r-select-option.entry.js +128 -0
  233. package/dist/esm/r-select.entry.js +1105 -0
  234. package/dist/esm/r-skip-link.entry.js +17 -0
  235. package/dist/esm/r-stepper-item.entry.js +40 -0
  236. package/dist/esm/r-stepper.entry.js +97 -0
  237. package/dist/esm/r-tab-panel.entry.js +24 -0
  238. package/dist/esm/r-tab.entry.js +60 -0
  239. package/dist/esm/r-tabs-list.entry.js +173 -0
  240. package/dist/esm/r-tabs.entry.js +275 -0
  241. package/dist/esm/r-textarea.entry.js +268 -0
  242. package/dist/esm/r-toast-group.entry.js +44 -0
  243. package/dist/esm/r-toast.entry.js +312 -0
  244. package/dist/esm/style-observer-4Uv3PpKT.js +1116 -0
  245. package/dist/esm/theming-DD2IrjpG.js +106 -0
  246. package/dist/esm/web-components.js +21 -0
  247. package/dist/index.cjs.js +1 -0
  248. package/dist/index.js +1 -0
  249. package/dist/types/components/accordion/accordion.d.ts +27 -0
  250. package/dist/types/components/accordion/exports.d.ts +2 -0
  251. package/dist/types/components/accordion-panel/accordion-panel.d.ts +10 -0
  252. package/dist/types/components/accordion-section/accordion-section.d.ts +36 -0
  253. package/dist/types/components/accordion-trigger/accordion-trigger.d.ts +33 -0
  254. package/dist/types/components/alert/alert.d.ts +67 -0
  255. package/dist/types/components/alert/exports.d.ts +4 -0
  256. package/dist/types/components/badge/badge.d.ts +26 -0
  257. package/dist/types/components/badge/exports.d.ts +2 -0
  258. package/dist/types/components/button/button.d.ts +89 -0
  259. package/dist/types/components/button/exports.d.ts +10 -0
  260. package/dist/types/components/checkbox/checkbox.d.ts +138 -0
  261. package/dist/types/components/checkbox-group/checkbox-group.d.ts +124 -0
  262. package/dist/types/components/design-system-devtools/design-system-devtools.d.ts +15 -0
  263. package/dist/types/components/dialog/dialog.d.ts +69 -0
  264. package/dist/types/components/dialog/exports.d.ts +10 -0
  265. package/dist/types/components/hint/exports.d.ts +2 -0
  266. package/dist/types/components/hint/hint.d.ts +20 -0
  267. package/dist/types/components/icon/all-kit.d.ts +2890 -0
  268. package/dist/types/components/icon/data.d.ts +145 -0
  269. package/dist/types/components/icon/exports.d.ts +152 -0
  270. package/dist/types/components/icon/icon.d.ts +37 -0
  271. package/dist/types/components/icon/riverty-kit.d.ts +139 -0
  272. package/dist/types/components/icon-button/icon-button.d.ts +69 -0
  273. package/dist/types/components/illustration/data.d.ts +52 -0
  274. package/dist/types/components/illustration/exports.d.ts +23 -0
  275. package/dist/types/components/illustration/illustration.d.ts +51 -0
  276. package/dist/types/components/illustration/illustrations-ui-kit.d.ts +21 -0
  277. package/dist/types/components/input/exports.d.ts +55 -0
  278. package/dist/types/components/input/input.d.ts +365 -0
  279. package/dist/types/components/input-code/exports.d.ts +4 -0
  280. package/dist/types/components/input-code/input-code.d.ts +177 -0
  281. package/dist/types/components/input-date/exports.d.ts +5 -0
  282. package/dist/types/components/input-date/input-date.d.ts +174 -0
  283. package/dist/types/components/input-password/exports.d.ts +1 -0
  284. package/dist/types/components/input-password/input-password.d.ts +186 -0
  285. package/dist/types/components/input-phone-number/input-phone-number.d.ts +130 -0
  286. package/dist/types/components/label/label.d.ts +9 -0
  287. package/dist/types/components/list-item/list-item/exports.d.ts +4 -0
  288. package/dist/types/components/list-item/list-item/list-item.d.ts +61 -0
  289. package/dist/types/components/pagination/exports.d.ts +6 -0
  290. package/dist/types/components/pagination/pagination.d.ts +140 -0
  291. package/dist/types/components/panel/exports.d.ts +2 -0
  292. package/dist/types/components/panel/panel.d.ts +56 -0
  293. package/dist/types/components/popover/exports.d.ts +6 -0
  294. package/dist/types/components/popover/popover.d.ts +131 -0
  295. package/dist/types/components/popover-action/popover-action.d.ts +24 -0
  296. package/dist/types/components/popover-content/popover-content.d.ts +22 -0
  297. package/dist/types/components/popover-headline/popover-headline.d.ts +6 -0
  298. package/dist/types/components/popover-trigger/exports.d.ts +2 -0
  299. package/dist/types/components/popover-trigger/popover-trigger.d.ts +31 -0
  300. package/dist/types/components/progress-bar/progress-bar.d.ts +10 -0
  301. package/dist/types/components/radio-button/radio-button.d.ts +92 -0
  302. package/dist/types/components/radio-button-description/radio-button-description.d.ts +8 -0
  303. package/dist/types/components/radio-button-leading/radio-button-leading.d.ts +8 -0
  304. package/dist/types/components/radio-button-title/radio-button-title.d.ts +8 -0
  305. package/dist/types/components/radio-button-trailing/radio-button-trailing.d.ts +8 -0
  306. package/dist/types/components/radio-group/exports.d.ts +2 -0
  307. package/dist/types/components/radio-group/radio-group.d.ts +179 -0
  308. package/dist/types/components/select/exports.d.ts +2 -0
  309. package/dist/types/components/select/select.d.ts +319 -0
  310. package/dist/types/components/select-option/select-option.d.ts +113 -0
  311. package/dist/types/components/skip-link/exports.d.ts +2 -0
  312. package/dist/types/components/skip-link/skip-link.d.ts +6 -0
  313. package/dist/types/components/stepper/stepper.d.ts +22 -0
  314. package/dist/types/components/stepper-item/stepper-item.d.ts +23 -0
  315. package/dist/types/components/tab/tab.d.ts +23 -0
  316. package/dist/types/components/tab-panel/tab-panel.d.ts +7 -0
  317. package/dist/types/components/tabs/tabs.d.ts +49 -0
  318. package/dist/types/components/tabs-list/exports.d.ts +4 -0
  319. package/dist/types/components/tabs-list/tabs-list.d.ts +41 -0
  320. package/dist/types/components/textarea/exports.d.ts +2 -0
  321. package/dist/types/components/textarea/textarea.d.ts +158 -0
  322. package/dist/types/components/toast/exports.d.ts +6 -0
  323. package/dist/types/components/toast/toast.d.ts +146 -0
  324. package/dist/types/components/toast-group/exports.d.ts +2 -0
  325. package/dist/types/components/toast-group/toast-group.d.ts +9 -0
  326. package/dist/types/components/tooltip/exports.d.ts +6 -0
  327. package/dist/types/components/tooltip/tooltip.d.ts +132 -0
  328. package/dist/types/components.d.ts +6347 -0
  329. package/dist/types/index.d.ts +1 -0
  330. package/dist/types/stencil-public-runtime.d.ts +1732 -0
  331. package/dist/types/types/jsx-shim.d.ts +13 -0
  332. package/dist/types/types/style-observer.d.ts +20 -0
  333. package/dist/types/utils/focusable.d.ts +1 -0
  334. package/dist/types/utils/formData.d.ts +1 -0
  335. package/dist/types/utils/theming.d.ts +15 -0
  336. package/dist/types/utils/version-checker.d.ts +1 -0
  337. package/dist/web-components/index.esm.js +1 -0
  338. package/dist/web-components/p-01aefcf0.entry.js +1 -0
  339. package/dist/web-components/p-05cb55db.entry.js +1 -0
  340. package/dist/web-components/p-0a34d33b.entry.js +1 -0
  341. package/dist/web-components/p-11b22309.entry.js +1 -0
  342. package/dist/web-components/p-2d878934.entry.js +1 -0
  343. package/dist/web-components/p-325dbedf.entry.js +1 -0
  344. package/dist/web-components/p-34b9457b.entry.js +1 -0
  345. package/dist/web-components/p-36abd05a.entry.js +1 -0
  346. package/dist/web-components/p-386d1ef9.entry.js +1 -0
  347. package/dist/web-components/p-3d67b77b.entry.js +1 -0
  348. package/dist/web-components/p-4Uv3PpKT.js +1 -0
  349. package/dist/web-components/p-4b12fbc0.entry.js +1 -0
  350. package/dist/web-components/p-52f7b505.entry.js +1 -0
  351. package/dist/web-components/p-55600d47.entry.js +1 -0
  352. package/dist/web-components/p-57ebc474.entry.js +1 -0
  353. package/dist/web-components/p-57edf7f4.entry.js +1 -0
  354. package/dist/web-components/p-69a24fe2.entry.js +1 -0
  355. package/dist/web-components/p-6d92648c.entry.js +1 -0
  356. package/dist/web-components/p-75052597.entry.js +1 -0
  357. package/dist/web-components/p-7b2c5b63.entry.js +1 -0
  358. package/dist/web-components/p-7bf463ff.entry.js +1 -0
  359. package/dist/web-components/p-838e43d4.entry.js +1 -0
  360. package/dist/web-components/p-8c16d038.entry.js +1 -0
  361. package/dist/web-components/p-8f8313de.entry.js +1 -0
  362. package/dist/web-components/p-9026d5a2.entry.js +1 -0
  363. package/dist/web-components/p-95396b5c.entry.js +1 -0
  364. package/dist/web-components/p-9c31c7c4.entry.js +1 -0
  365. package/dist/web-components/p-9c415b9c.entry.js +1 -0
  366. package/dist/web-components/p-9f583ed1.entry.js +1 -0
  367. package/dist/web-components/p-B9rsR6cQ.js +1 -0
  368. package/dist/web-components/p-CTxpqopm.js +2 -0
  369. package/dist/web-components/p-DQuL1Twl.js +1 -0
  370. package/dist/web-components/p-DvLT8-y3.js +1 -0
  371. package/dist/web-components/p-b303b2cc.entry.js +1 -0
  372. package/dist/web-components/p-b8df041d.entry.js +1 -0
  373. package/dist/web-components/p-bc30844f.entry.js +1 -0
  374. package/dist/web-components/p-c4a77a65.entry.js +1 -0
  375. package/dist/web-components/p-c549addf.entry.js +1 -0
  376. package/dist/web-components/p-c65df19f.entry.js +1 -0
  377. package/dist/web-components/p-c80a5541.entry.js +1 -0
  378. package/dist/web-components/p-c96ee61a.entry.js +1 -0
  379. package/dist/web-components/p-cf3f044d.entry.js +1 -0
  380. package/dist/web-components/p-d1412932.entry.js +1 -0
  381. package/dist/web-components/p-d9778cfa.entry.js +1 -0
  382. package/dist/web-components/p-dbe4ccb8.entry.js +1 -0
  383. package/dist/web-components/p-ded50850.entry.js +1 -0
  384. package/dist/web-components/p-e5be895b.entry.js +1 -0
  385. package/dist/web-components/p-e6b34c1e.entry.js +1 -0
  386. package/dist/web-components/p-ec3c4800.entry.js +1 -0
  387. package/dist/web-components/p-f670fd87.entry.js +1 -0
  388. package/dist/web-components/p-f867e4c3.entry.js +1 -0
  389. package/dist/web-components/p-ff6b1b8f.entry.js +1 -0
  390. package/dist/web-components/p-ky1yonnS.js +1 -0
  391. package/dist/web-components/web-components.esm.js +1 -0
  392. package/loader/cdn.js +1 -0
  393. package/loader/index.cjs.js +1 -0
  394. package/loader/index.d.ts +24 -0
  395. package/loader/index.es2017.js +1 -0
  396. package/loader/index.js +2 -0
  397. package/package.json +1 -1
@@ -0,0 +1,2525 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-BnETQtSf.js');
4
+ var formData = require('./formData-B2DZyLxP.js');
5
+
6
+ var dist = {};
7
+
8
+ var country_phone_data = {};
9
+
10
+ var hasRequiredCountry_phone_data;
11
+
12
+ function requireCountry_phone_data () {
13
+ if (hasRequiredCountry_phone_data) return country_phone_data;
14
+ hasRequiredCountry_phone_data = 1;
15
+ Object.defineProperty(country_phone_data, "__esModule", { value: true });
16
+ country_phone_data.default = [
17
+ {
18
+ alpha2: 'US',
19
+ alpha3: 'USA',
20
+ country_code: '1',
21
+ country_name: 'United States',
22
+ mobile_begin_with: ['201', '202', '203', '205', '206', '207', '208', '209', '210', '212', '213', '214', '215',
23
+ '216', '217', '218', '219', '220', '223', '224', '225', '227', '228', '229', '231', '234', '239', '240',
24
+ '248', '251', '252', '253', '254', '256', '260', '262', '267', '269', '270', '272', '274', '276', '278',
25
+ '281', '283', '301', '302', '303', '304', '305', '307', '308', '309', '310', '312', '313', '314', '315',
26
+ '316', '317', '318', '319', '320', '321', '323', '325', '327', '329', '330', '331', '332', '334', '336', '337',
27
+ '339', '341', '346', '347', '351', '352', '353', '360', '361', '364', '369', '380', '385', '386', '401', '402',
28
+ '404', '405', '406', '407', '408', '409', '410', '412', '413', '414', '415', '417', '419', '423', '424',
29
+ '425', '430', '432', '434', '435', '440', '441', '442', '443', '445', '447', '458', '463', '464', '469', '470', '472', '475',
30
+ '478', '479', '480', '484', '501', '502', '503', '504', '505', '507', '508', '509', '510', '512', '513',
31
+ '515', '516', '517', '518', '520', '530', '531', '534', '539', '540', '541', '551', '557', '559', '561',
32
+ '562', '563', '564', '567', '570', '571', '572', '573', '574', '575', '580', '582', '585', '586', '601', '602',
33
+ '603', '605', '606', '607', '608', '609', '610', '612', '614', '615', '616', '617', '618', '619', '620',
34
+ '623', '626', '627', '628', '629', '630', '631', '636', '640', '641', '645', '646', '650', '651', '656', '657', '659', '660',
35
+ '661', '662', '667', '669', '678', '679', '680', '681', '682', '689', '701', '702', '703', '704', '706', '707',
36
+ '708', '712', '713', '714', '715', '716', '717', '718', '719', '720', '724', '725', '726', '727', '728', '730', '731',
37
+ '732', '734', '737', '740', '743', '747', '752', '754', '757', '760', '762', '763', '764', '765', '769', '770', '771',
38
+ '772', '773', '774', '775', '779', '781', '785', '786', '787', '801', '802', '803', '804', '805', '806', '808',
39
+ '810', '812', '813', '814', '815', '816', '817', '818', '820', '828', '830', '831', '832', '835', '838', '840', '843', '845',
40
+ '847', '848', '850', '854', '856', '857', '858', '859', '860', '862', '863', '864', '865', '870', '872',
41
+ '878', '901', '903', '904', '906', '907', '908', '909', '910', '912', '913', '914', '915', '916', '917',
42
+ '918', '919', '920', '925', '927', '928', '929', '930', '931', '934', '935', '936', '937', '938', '939', '940', '941', '945',
43
+ '947', '949', '951', '952', '954', '956', '957', '959', '970', '971', '972', '973', '975', '978', '979',
44
+ '980', '984', '985', '986', '989', '888', '800', '833', '844', '855', '866', '877', '279', '340', '983', '448', '943', '363',
45
+ '326', '839', '826', '948', '924'
46
+ ],
47
+ phone_number_lengths: [10]
48
+ },
49
+ // https://en.wikipedia.org/wiki/Telephone_numbers_in_Aruba
50
+ {
51
+ alpha2: 'AW',
52
+ alpha3: 'ABW',
53
+ country_code: '297',
54
+ country_name: 'Aruba',
55
+ mobile_begin_with: ['56', '59', '64', '73', '74', '99'],
56
+ phone_number_lengths: [7]
57
+ },
58
+ {
59
+ alpha2: 'AF',
60
+ alpha3: 'AFG',
61
+ country_code: '93',
62
+ country_name: 'Afghanistan',
63
+ mobile_begin_with: ['7'],
64
+ phone_number_lengths: [9]
65
+ },
66
+ {
67
+ alpha2: 'AO',
68
+ alpha3: 'AGO',
69
+ country_code: '244',
70
+ country_name: 'Angola',
71
+ mobile_begin_with: ['9'],
72
+ phone_number_lengths: [9]
73
+ },
74
+ {
75
+ alpha2: 'AI',
76
+ alpha3: 'AIA',
77
+ country_code: '1',
78
+ country_name: 'Anguilla',
79
+ mobile_begin_with: ['2642', '2644', '2645', '2647'],
80
+ phone_number_lengths: [10]
81
+ },
82
+ {
83
+ alpha2: 'AX',
84
+ alpha3: 'ALA',
85
+ country_code: '358',
86
+ country_name: 'Åland Islands',
87
+ mobile_begin_with: ['18'],
88
+ phone_number_lengths: [6, 7, 8]
89
+ },
90
+ {
91
+ alpha2: 'AL',
92
+ alpha3: 'ALB',
93
+ country_code: '355',
94
+ country_name: 'Albania',
95
+ mobile_begin_with: ['6'],
96
+ phone_number_lengths: [9]
97
+ },
98
+ {
99
+ alpha2: 'AD',
100
+ alpha3: 'AND',
101
+ country_code: '376',
102
+ country_name: 'Andorra',
103
+ mobile_begin_with: ['3', '4', '6'],
104
+ phone_number_lengths: [6]
105
+ },
106
+ // https://en.wikipedia.org/wiki/Telephone_numbers_in_Cura%C3%A7ao_and_the_Caribbean_Netherlands
107
+ {
108
+ alpha2: "BQ",
109
+ alpha3: "BES",
110
+ country_code: "599",
111
+ country_name: "Caribbean Netherlands",
112
+ mobile_begin_with: ['3', '416', '700', '701', '795'],
113
+ phone_number_lengths: [7]
114
+ },
115
+ {
116
+ alpha2: 'AE',
117
+ alpha3: 'ARE',
118
+ country_code: '971',
119
+ country_name: 'United Arab Emirates',
120
+ mobile_begin_with: ['5'],
121
+ phone_number_lengths: [9]
122
+ },
123
+ {
124
+ alpha2: 'AR',
125
+ alpha3: 'ARG',
126
+ country_code: '54',
127
+ country_name: 'Argentina',
128
+ mobile_begin_with: ['1', '2', '3'], // Same for mobile and landlines
129
+ phone_number_lengths: [8, 9, 10, 11, 12]
130
+ },
131
+ {
132
+ alpha2: 'AM',
133
+ alpha3: 'ARM',
134
+ country_code: '374',
135
+ country_name: 'Armenia',
136
+ mobile_begin_with: ['3', '4', '5', '7', '9'],
137
+ phone_number_lengths: [8]
138
+ },
139
+ // http://www.howtocallabroad.com/results.php?callfrom=united_states&callto=american_samoa
140
+ {
141
+ alpha2: 'AS',
142
+ alpha3: 'ASM',
143
+ country_code: '1',
144
+ country_name: 'American Samoa',
145
+ mobile_begin_with: ['684733', '684258'],
146
+ phone_number_lengths: [10]
147
+ },
148
+ // {alpha2: "AQ", alpha3: "ATA", country_code: "672", country_name: "Antarctica", mobile_begin_with: [], phone_number_lengths: []},
149
+ // {alpha2: "TF", alpha3: "ATF", country_code: "", country_name: "French Southern Territories", mobile_begin_with: [], phone_number_lengths: []},
150
+ // http://www.howtocallabroad.com/results.php?callfrom=united_states&callto=antigua_barbuda
151
+ {
152
+ alpha2: 'AG',
153
+ alpha3: 'ATG',
154
+ country_code: '1',
155
+ country_name: 'Antigua and Barbuda',
156
+ mobile_begin_with: ['2687'],
157
+ phone_number_lengths: [10]
158
+ },
159
+ {
160
+ alpha2: 'AU',
161
+ alpha3: 'AUS',
162
+ country_code: '61',
163
+ country_name: 'Australia',
164
+ mobile_begin_with: ['4'],
165
+ phone_number_lengths: [9]
166
+ },
167
+ {
168
+ alpha2: 'AT',
169
+ alpha3: 'AUT',
170
+ country_code: '43',
171
+ country_name: 'Austria',
172
+ mobile_begin_with: ['6'],
173
+ phone_number_lengths: [10, 11, 12, 13, 14]
174
+ },
175
+ {
176
+ alpha2: 'AZ',
177
+ alpha3: 'AZE',
178
+ country_code: '994',
179
+ country_name: 'Azerbaijan',
180
+ mobile_begin_with: ['10', '50', '51', '55', '60', '70', '77', '99'],
181
+ phone_number_lengths: [9]
182
+ },
183
+ {
184
+ alpha2: 'BI',
185
+ alpha3: 'BDI',
186
+ country_code: '257',
187
+ country_name: 'Burundi',
188
+ mobile_begin_with: ['71', '72', '75', '76', '77', '79', '29', '61', '68', '69'],
189
+ phone_number_lengths: [8]
190
+ },
191
+ {
192
+ alpha2: 'BE',
193
+ alpha3: 'BEL',
194
+ country_code: '32',
195
+ country_name: 'Belgium',
196
+ mobile_begin_with: ['4', '3'],
197
+ phone_number_lengths: [9, 8]
198
+ },
199
+ {
200
+ alpha2: 'BJ',
201
+ alpha3: 'BEN',
202
+ country_code: '229',
203
+ country_name: 'Benin',
204
+ mobile_begin_with: ['4', '6', '9'],
205
+ phone_number_lengths: [8]
206
+ },
207
+ {
208
+ alpha2: 'BF',
209
+ alpha3: 'BFA',
210
+ country_code: '226',
211
+ country_name: 'Burkina Faso',
212
+ mobile_begin_with: ['6', '7'],
213
+ phone_number_lengths: [8]
214
+ },
215
+ {
216
+ alpha2: 'BD',
217
+ alpha3: 'BGD',
218
+ country_code: '880',
219
+ country_name: 'Bangladesh',
220
+ mobile_begin_with: ['1'],
221
+ phone_number_lengths: [8, 9, 10]
222
+ },
223
+ {
224
+ alpha2: 'BG',
225
+ alpha3: 'BGR',
226
+ country_code: '359',
227
+ country_name: 'Bulgaria',
228
+ mobile_begin_with: ['87', '88', '89', '98', '99', '43'],
229
+ phone_number_lengths: [8, 9]
230
+ },
231
+ {
232
+ alpha2: 'BH',
233
+ alpha3: 'BHR',
234
+ country_code: '973',
235
+ country_name: 'Bahrain',
236
+ mobile_begin_with: ['3'],
237
+ phone_number_lengths: [8]
238
+ },
239
+ {
240
+ alpha2: 'BS',
241
+ alpha3: 'BHS',
242
+ country_code: '1',
243
+ country_name: 'Bahamas',
244
+ mobile_begin_with: ['242'],
245
+ phone_number_lengths: [10]
246
+ },
247
+ {
248
+ alpha2: 'BA',
249
+ alpha3: 'BIH',
250
+ country_code: '387',
251
+ country_name: 'Bosnia and Herzegovina',
252
+ mobile_begin_with: ['6'],
253
+ phone_number_lengths: [8, 9]
254
+ },
255
+ // {alpha2: "BL", alpha3: "BLM", country_code: "590", country_name: "Saint Barthélemy", mobile_begin_with: [], phone_number_lengths: []},
256
+ {
257
+ alpha2: 'BY',
258
+ alpha3: 'BLR',
259
+ country_code: '375',
260
+ country_name: 'Belarus',
261
+ mobile_begin_with: ['25', '29', '33', '44'],
262
+ phone_number_lengths: [9]
263
+ },
264
+ {
265
+ alpha2: 'BZ',
266
+ alpha3: 'BLZ',
267
+ country_code: '501',
268
+ country_name: 'Belize',
269
+ mobile_begin_with: ['6'],
270
+ phone_number_lengths: [7]
271
+ },
272
+ // http://www.howtocallabroad.com/results.php?callfrom=united_states&callto=bermuda
273
+ {
274
+ alpha2: 'BM',
275
+ alpha3: 'BMU',
276
+ country_code: '1',
277
+ country_name: 'Bermuda',
278
+ mobile_begin_with: ['4413', '4415', '4417'],
279
+ phone_number_lengths: [10]
280
+ },
281
+ {
282
+ alpha2: 'BO',
283
+ alpha3: 'BOL',
284
+ country_code: '591',
285
+ country_name: 'Bolivia',
286
+ mobile_begin_with: ['6', '7'],
287
+ phone_number_lengths: [8]
288
+ },
289
+ {
290
+ alpha2: 'BR',
291
+ alpha3: 'BRA',
292
+ country_code: '55',
293
+ country_name: 'Brazil',
294
+ mobile_begin_with: [
295
+ '119', '129', '139', '149', '159', '169', '179', '189', '199', '219', '229', '249', '279', '289',
296
+ '319', '329', '339', '349', '359', '379', '389',
297
+ '419', '429', '439', '449', '459', '469', '479', '489', '499',
298
+ '519', '539', '549', '559',
299
+ '619', '629', '639', '649', '659', '669', '679', '689', '699',
300
+ '719', '739', '749', '759', '779', '799',
301
+ '819', '829', '839', '849', '859', '869', '879', '889', '899',
302
+ '919', '929', '939', '949', '959', '969', '979', '989', '999',
303
+ ],
304
+ phone_number_lengths: [10, 11]
305
+ },
306
+ {
307
+ alpha2: 'BB',
308
+ alpha3: 'BRB',
309
+ country_code: '1',
310
+ country_name: 'Barbados',
311
+ mobile_begin_with: ['246'],
312
+ phone_number_lengths: [10]
313
+ },
314
+ {
315
+ alpha2: 'BN',
316
+ alpha3: 'BRN',
317
+ country_code: '673',
318
+ country_name: 'Brunei Darussalam',
319
+ mobile_begin_with: ['7', '8'],
320
+ phone_number_lengths: [7]
321
+ },
322
+ {
323
+ alpha2: 'BT',
324
+ alpha3: 'BTN',
325
+ country_code: '975',
326
+ country_name: 'Bhutan',
327
+ mobile_begin_with: ['17'],
328
+ phone_number_lengths: [8]
329
+ },
330
+ // {alpha2: "BV", alpha3: "BVT", country_code: "", country_name: "Bouvet Island", mobile_begin_with: [], phone_number_lengths: []},
331
+ {
332
+ alpha2: 'BW',
333
+ alpha3: 'BWA',
334
+ country_code: '267',
335
+ country_name: 'Botswana',
336
+ mobile_begin_with: ['71', '72', '73', '74', '75', '76', '77', '78', '79'],
337
+ phone_number_lengths: [8]
338
+ },
339
+ {
340
+ alpha2: 'CF',
341
+ alpha3: 'CAF',
342
+ country_code: '236',
343
+ country_name: 'Central African Republic',
344
+ mobile_begin_with: ['7'],
345
+ phone_number_lengths: [8]
346
+ },
347
+ // http://www.howtocallabroad.com/canada/
348
+ // http://areacode.org/
349
+ // http://countrycode.org/canada
350
+ {
351
+ alpha2: 'CA',
352
+ alpha3: 'CAN',
353
+ country_code: '1',
354
+ country_name: 'Canada',
355
+ mobile_begin_with: [
356
+ '204', '226', '236', '249', '250', '263', '289', '306', '343', '354',
357
+ '365', '367', '368', '403', '416', '418', '431', '437', '438', '450',
358
+ '468', '474', '506', '514', '519', '548', '579', '581', '584', '587',
359
+ '600', '604', '613', '639', '647', '672', '683', '705', '709', '742',
360
+ '753', '778', '780', '782', '807', '819', '825', '867', '873', '902',
361
+ '905', '428', '382', '942'
362
+ ],
363
+ phone_number_lengths: [10]
364
+ },
365
+ // {alpha2: "CC", alpha3: "CCK", country_code: "61", country_name: "Cocos (Keeling) Islands", mobile_begin_with: [], phone_number_lengths: []},
366
+ {
367
+ alpha2: 'CH',
368
+ alpha3: 'CHE',
369
+ country_code: '41',
370
+ country_name: 'Switzerland',
371
+ mobile_begin_with: ['74', '75', '76', '77', '78', '79'],
372
+ phone_number_lengths: [9]
373
+ },
374
+ {
375
+ alpha2: 'CL',
376
+ alpha3: 'CHL',
377
+ country_code: '56',
378
+ country_name: 'Chile',
379
+ mobile_begin_with: ['9'],
380
+ phone_number_lengths: [9]
381
+ },
382
+ {
383
+ alpha2: 'CN',
384
+ alpha3: 'CHN',
385
+ country_code: '86',
386
+ country_name: 'China',
387
+ mobile_begin_with: ['13', '14', '15', '17', '18', '19', '16'],
388
+ phone_number_lengths: [11]
389
+ },
390
+ {
391
+ alpha2: 'CI',
392
+ alpha3: 'CIV',
393
+ country_code: '225',
394
+ country_name: "Côte D'Ivoire",
395
+ mobile_begin_with: ['0', '4', '5', '6', '7', '8'],
396
+ phone_number_lengths: [10]
397
+ },
398
+ {
399
+ alpha2: 'CM',
400
+ alpha3: 'CMR',
401
+ country_code: '237',
402
+ country_name: 'Cameroon',
403
+ mobile_begin_with: ['6'],
404
+ phone_number_lengths: [9]
405
+ },
406
+ {
407
+ alpha2: 'CD',
408
+ alpha3: 'COD',
409
+ country_code: '243',
410
+ country_name: 'Congo, The Democratic Republic Of The',
411
+ mobile_begin_with: ['8', '9'],
412
+ phone_number_lengths: [9]
413
+ },
414
+ {
415
+ alpha2: 'CG',
416
+ alpha3: 'COG',
417
+ country_code: '242',
418
+ country_name: 'Congo',
419
+ mobile_begin_with: ['0'],
420
+ phone_number_lengths: [9]
421
+ },
422
+ {
423
+ alpha2: 'CK',
424
+ alpha3: 'COK',
425
+ country_code: '682',
426
+ country_name: 'Cook Islands',
427
+ mobile_begin_with: ['5', '7'],
428
+ phone_number_lengths: [5]
429
+ },
430
+ {
431
+ alpha2: 'CO',
432
+ alpha3: 'COL',
433
+ country_code: '57',
434
+ country_name: 'Colombia',
435
+ mobile_begin_with: ['3'],
436
+ phone_number_lengths: [10]
437
+ },
438
+ {
439
+ alpha2: 'CW',
440
+ alpha3: 'CUW',
441
+ country_code: '599',
442
+ country_name: 'Curaçao',
443
+ mobile_begin_with: ['95', '96'],
444
+ phone_number_lengths: [8]
445
+ },
446
+ {
447
+ alpha2: 'KM',
448
+ alpha3: 'COM',
449
+ country_code: '269',
450
+ country_name: 'Comoros',
451
+ mobile_begin_with: ['3', '76'],
452
+ phone_number_lengths: [7]
453
+ },
454
+ {
455
+ alpha2: 'CV',
456
+ alpha3: 'CPV',
457
+ country_code: '238',
458
+ country_name: 'Cape Verde',
459
+ mobile_begin_with: ['5', '9'],
460
+ phone_number_lengths: [7]
461
+ },
462
+ {
463
+ alpha2: 'CR',
464
+ alpha3: 'CRI',
465
+ country_code: '506',
466
+ country_name: 'Costa Rica',
467
+ mobile_begin_with: ['5', '6', '7', '8'],
468
+ phone_number_lengths: [8]
469
+ },
470
+ {
471
+ alpha2: 'CU',
472
+ alpha3: 'CUB',
473
+ country_code: '53',
474
+ country_name: 'Cuba',
475
+ mobile_begin_with: ['5', '6'],
476
+ phone_number_lengths: [8]
477
+ },
478
+ // {alpha2: "CX", alpha3: "CXR", country_code: "61", country_name: "Christmas Island", mobile_begin_with: [], phone_number_lengths: []},
479
+ {
480
+ alpha2: 'KY',
481
+ alpha3: 'CYM',
482
+ country_code: '1',
483
+ country_name: 'Cayman Islands',
484
+ mobile_begin_with: ['345'],
485
+ phone_number_lengths: [10]
486
+ },
487
+ {
488
+ alpha2: 'CY',
489
+ alpha3: 'CYP',
490
+ country_code: '357',
491
+ country_name: 'Cyprus',
492
+ mobile_begin_with: ['9'],
493
+ phone_number_lengths: [8]
494
+ },
495
+ {
496
+ alpha2: 'CZ',
497
+ alpha3: 'CZE',
498
+ country_code: '420',
499
+ country_name: 'Czech Republic',
500
+ mobile_begin_with: ['6', '7'],
501
+ phone_number_lengths: [9]
502
+ },
503
+ {
504
+ alpha2: 'DE',
505
+ alpha3: 'DEU',
506
+ country_code: '49',
507
+ country_name: 'Germany',
508
+ mobile_begin_with: ['15', '16', '17'],
509
+ phone_number_lengths: [10, 11]
510
+ },
511
+ {
512
+ alpha2: 'DJ',
513
+ alpha3: 'DJI',
514
+ country_code: '253',
515
+ country_name: 'Djibouti',
516
+ mobile_begin_with: ['77'],
517
+ phone_number_lengths: [8]
518
+ },
519
+ {
520
+ alpha2: 'DM',
521
+ alpha3: 'DMA',
522
+ country_code: '1',
523
+ country_name: 'Dominica',
524
+ mobile_begin_with: ['767'],
525
+ phone_number_lengths: [10]
526
+ },
527
+ {
528
+ alpha2: 'DK',
529
+ alpha3: 'DNK',
530
+ country_code: '45',
531
+ country_name: 'Denmark',
532
+ mobile_begin_with: [
533
+ '2', '30', '31', '40', '41', '42', '50', '51', '52', '53', '60', '61', '71', '81', '91', '92', '93',
534
+ '342', '344', '345', '346', '347', '348', '349', '356', '357', '359', '362',
535
+ '365', '366', '389', '398', '431', '441', '462', '466', '468', '472', '474',
536
+ '476', '478', '485', '486', '488', '489', '493', '494', '495', '496', '498',
537
+ '499', '542', '543', '545', '551', '552', '556', '571', '572', '573', '574',
538
+ '577', '579', '584', '586', '587', '589', '597', '598', '627', '629', '641',
539
+ '649', '658', '662', '663', '664', '665', '667', '692', '693', '694', '697',
540
+ '771', '772', '782', '783', '785', '786', '788', '789', '826', '827', '829'
541
+ ],
542
+ phone_number_lengths: [8]
543
+ },
544
+ {
545
+ alpha2: 'DO',
546
+ alpha3: 'DOM',
547
+ country_code: '1',
548
+ country_name: 'Dominican Republic',
549
+ mobile_begin_with: ['809', '829', '849'],
550
+ phone_number_lengths: [10]
551
+ },
552
+ {
553
+ alpha2: 'DZ',
554
+ alpha3: 'DZA',
555
+ country_code: '213',
556
+ country_name: 'Algeria',
557
+ mobile_begin_with: ['5', '6', '7'],
558
+ phone_number_lengths: [9]
559
+ },
560
+ {
561
+ alpha2: 'EC',
562
+ alpha3: 'ECU',
563
+ country_code: '593',
564
+ country_name: 'Ecuador',
565
+ mobile_begin_with: ['9'],
566
+ phone_number_lengths: [9]
567
+ },
568
+ {
569
+ alpha2: 'EG',
570
+ alpha3: 'EGY',
571
+ country_code: '20',
572
+ country_name: 'Egypt',
573
+ mobile_begin_with: ['1'],
574
+ phone_number_lengths: [10, 8]
575
+ },
576
+ {
577
+ alpha2: 'ER',
578
+ alpha3: 'ERI',
579
+ country_code: '291',
580
+ country_name: 'Eritrea',
581
+ mobile_begin_with: ['1', '7', '8'],
582
+ phone_number_lengths: [7]
583
+ },
584
+ // {alpha2: "EH", alpha3: "ESH", country_code: "212", country_name: "Western Sahara", mobile_begin_with: [], phone_number_lengths: []},
585
+ {
586
+ alpha2: 'ES',
587
+ alpha3: 'ESP',
588
+ country_code: '34',
589
+ country_name: 'Spain',
590
+ mobile_begin_with: ['6', '7'],
591
+ phone_number_lengths: [9]
592
+ },
593
+ {
594
+ alpha2: 'EE',
595
+ alpha3: 'EST',
596
+ country_code: '372',
597
+ country_name: 'Estonia',
598
+ mobile_begin_with: ['5', '81', '82', '83'],
599
+ phone_number_lengths: [7, 8]
600
+ },
601
+ {
602
+ alpha2: 'ET',
603
+ alpha3: 'ETH',
604
+ country_code: '251',
605
+ country_name: 'Ethiopia',
606
+ mobile_begin_with: ['7', '9'],
607
+ phone_number_lengths: [9]
608
+ },
609
+ {
610
+ alpha2: 'FI',
611
+ alpha3: 'FIN',
612
+ country_code: '358',
613
+ country_name: 'Finland',
614
+ mobile_begin_with: ['4', '5'],
615
+ phone_number_lengths: [6, 7, 9, 10]
616
+ },
617
+ {
618
+ alpha2: 'FJ',
619
+ alpha3: 'FJI',
620
+ country_code: '679',
621
+ country_name: 'Fiji',
622
+ mobile_begin_with: ['2', '7', '8', '9'],
623
+ phone_number_lengths: [7]
624
+ },
625
+ {
626
+ alpha2: 'FK',
627
+ alpha3: 'FLK',
628
+ country_code: '500',
629
+ country_name: 'Falkland Islands (Malvinas)',
630
+ mobile_begin_with: ['5', '6'],
631
+ phone_number_lengths: [5]
632
+ },
633
+ {
634
+ alpha2: 'FR',
635
+ alpha3: 'FRA',
636
+ country_code: '33',
637
+ country_name: 'France',
638
+ mobile_begin_with: ['6', '7'],
639
+ phone_number_lengths: [9]
640
+ },
641
+ {
642
+ alpha2: 'FO',
643
+ alpha3: 'FRO',
644
+ country_code: '298',
645
+ country_name: 'Faroe Islands',
646
+ mobile_begin_with: [],
647
+ phone_number_lengths: [6]
648
+ },
649
+ {
650
+ alpha2: 'FM',
651
+ alpha3: 'FSM',
652
+ country_code: '691',
653
+ country_name: 'Micronesia, Federated States Of',
654
+ mobile_begin_with: [],
655
+ phone_number_lengths: [7]
656
+ },
657
+ {
658
+ alpha2: 'GA',
659
+ alpha3: 'GAB',
660
+ country_code: '241',
661
+ country_name: 'Gabon',
662
+ mobile_begin_with: ['2', '3', '4', '5', '6', '7'],
663
+ phone_number_lengths: [7]
664
+ },
665
+ {
666
+ alpha2: 'GB',
667
+ alpha3: 'GBR',
668
+ country_code: '44',
669
+ country_name: 'United Kingdom',
670
+ mobile_begin_with: ['7'],
671
+ phone_number_lengths: [10]
672
+ },
673
+ {
674
+ alpha2: 'GE',
675
+ alpha3: 'GEO',
676
+ country_code: '995',
677
+ country_name: 'Georgia',
678
+ mobile_begin_with: ['5', '7'],
679
+ phone_number_lengths: [9]
680
+ },
681
+ // {alpha2: "GG", alpha3: "GGY", country_code: "44", country_name: "Guernsey", mobile_begin_with: [], phone_number_lengths: []},
682
+ {
683
+ alpha2: 'GH',
684
+ alpha3: 'GHA',
685
+ country_code: '233',
686
+ country_name: 'Ghana',
687
+ mobile_begin_with: ['2', '5'],
688
+ phone_number_lengths: [9]
689
+ },
690
+ {
691
+ alpha2: 'GI',
692
+ alpha3: 'GIB',
693
+ country_code: '350',
694
+ country_name: 'Gibraltar',
695
+ mobile_begin_with: ['5'],
696
+ phone_number_lengths: [8]
697
+ },
698
+ {
699
+ alpha2: 'GN',
700
+ alpha3: 'GIN',
701
+ country_code: '224',
702
+ country_name: 'Guinea',
703
+ mobile_begin_with: ['6'],
704
+ phone_number_lengths: [9]
705
+ },
706
+ {
707
+ alpha2: 'GP',
708
+ alpha3: 'GLP',
709
+ country_code: '590',
710
+ country_name: 'Guadeloupe',
711
+ mobile_begin_with: ['690', '691'],
712
+ phone_number_lengths: [9]
713
+ },
714
+ {
715
+ alpha2: 'GM',
716
+ alpha3: 'GMB',
717
+ country_code: '220',
718
+ country_name: 'Gambia',
719
+ mobile_begin_with: ['7', '9'],
720
+ phone_number_lengths: [7]
721
+ },
722
+ {
723
+ alpha2: 'GW',
724
+ alpha3: 'GNB',
725
+ country_code: '245',
726
+ country_name: 'Guinea-Bissau',
727
+ mobile_begin_with: ['5', '6', '7'],
728
+ phone_number_lengths: [7]
729
+ },
730
+ {
731
+ alpha2: 'GQ',
732
+ alpha3: 'GNQ',
733
+ country_code: '240',
734
+ country_name: 'Equatorial Guinea',
735
+ mobile_begin_with: ['222', '551'],
736
+ phone_number_lengths: [9]
737
+ },
738
+ {
739
+ alpha2: 'GR',
740
+ alpha3: 'GRC',
741
+ country_code: '30',
742
+ country_name: 'Greece',
743
+ mobile_begin_with: ['6'],
744
+ phone_number_lengths: [10]
745
+ },
746
+ {
747
+ alpha2: 'GD',
748
+ alpha3: 'GRD',
749
+ country_code: '1',
750
+ country_name: 'Grenada',
751
+ mobile_begin_with: ['473'],
752
+ phone_number_lengths: [10]
753
+ },
754
+ {
755
+ alpha2: 'GL',
756
+ alpha3: 'GRL',
757
+ country_code: '299',
758
+ country_name: 'Greenland',
759
+ mobile_begin_with: ['2', '4', '5'],
760
+ phone_number_lengths: [6]
761
+ },
762
+ {
763
+ alpha2: 'GT',
764
+ alpha3: 'GTM',
765
+ country_code: '502',
766
+ country_name: 'Guatemala',
767
+ mobile_begin_with: ['3', '4', '5'],
768
+ phone_number_lengths: [8]
769
+ },
770
+ {
771
+ alpha2: 'GF',
772
+ alpha3: 'GUF',
773
+ country_code: '594',
774
+ country_name: 'French Guiana',
775
+ mobile_begin_with: ['694'],
776
+ phone_number_lengths: [9]
777
+ },
778
+ {
779
+ alpha2: 'GU',
780
+ alpha3: 'GUM',
781
+ country_code: '1',
782
+ country_name: 'Guam',
783
+ mobile_begin_with: ['671'],
784
+ phone_number_lengths: [10]
785
+ },
786
+ {
787
+ alpha2: 'GY',
788
+ alpha3: 'GUY',
789
+ country_code: '592',
790
+ country_name: 'Guyana',
791
+ mobile_begin_with: ['6'],
792
+ phone_number_lengths: [7]
793
+ },
794
+ {
795
+ alpha2: 'HK',
796
+ alpha3: 'HKG',
797
+ country_code: '852',
798
+ country_name: 'Hong Kong',
799
+ mobile_begin_with: ['4', '5', '6', '70', '71', '72', '73', '81', '82', '83', '84', '85', '86', '87', '88', '89', '9'],
800
+ phone_number_lengths: [8]
801
+ },
802
+ // {alpha2: "HM", alpha3: "HMD", country_code: "", country_name: "Heard and McDonald Islands", mobile_begin_with: [], phone_number_lengths: []},
803
+ {
804
+ alpha2: 'HN',
805
+ alpha3: 'HND',
806
+ country_code: '504',
807
+ country_name: 'Honduras',
808
+ mobile_begin_with: ['3', '7', '8', '9'],
809
+ phone_number_lengths: [8]
810
+ },
811
+ {
812
+ alpha2: 'HR',
813
+ alpha3: 'HRV',
814
+ country_code: '385',
815
+ country_name: 'Croatia',
816
+ mobile_begin_with: ['9'],
817
+ phone_number_lengths: [8, 9]
818
+ },
819
+ {
820
+ alpha2: 'HT',
821
+ alpha3: 'HTI',
822
+ country_code: '509',
823
+ country_name: 'Haiti',
824
+ mobile_begin_with: ['3', '4'],
825
+ phone_number_lengths: [8]
826
+ },
827
+ {
828
+ alpha2: 'HU',
829
+ alpha3: 'HUN',
830
+ country_code: '36',
831
+ country_name: 'Hungary',
832
+ mobile_begin_with: ['20', '30', '31', '50', '70'],
833
+ phone_number_lengths: [9]
834
+ },
835
+ {
836
+ alpha2: 'ID',
837
+ alpha3: 'IDN',
838
+ country_code: '62',
839
+ country_name: 'Indonesia',
840
+ mobile_begin_with: ['8'],
841
+ phone_number_lengths: [9, 10, 11, 12]
842
+ },
843
+ // {alpha2: "IM", alpha3: "IMN", country_code: "44", country_name: "Isle of Man", mobile_begin_with: [], phone_number_lengths: []},
844
+ {
845
+ alpha2: 'IN',
846
+ alpha3: 'IND',
847
+ country_code: '91',
848
+ country_name: 'India',
849
+ mobile_begin_with: ['6', '7', '8', '9'],
850
+ phone_number_lengths: [10]
851
+ },
852
+ // {alpha2: "IO", alpha3: "IOT", country_code: "246", country_name: "British Indian Ocean Territory", mobile_begin_with: [], phone_number_lengths: []},
853
+ {
854
+ alpha2: 'IE',
855
+ alpha3: 'IRL',
856
+ country_code: '353',
857
+ country_name: 'Ireland',
858
+ mobile_begin_with: ['82', '83', '84', '85', '86', '87', '88', '89'],
859
+ phone_number_lengths: [9]
860
+ },
861
+ {
862
+ alpha2: 'IR',
863
+ alpha3: 'IRN',
864
+ country_code: '98',
865
+ country_name: 'Iran, Islamic Republic Of',
866
+ mobile_begin_with: ['9'],
867
+ phone_number_lengths: [10]
868
+ },
869
+ {
870
+ alpha2: 'IQ',
871
+ alpha3: 'IRQ',
872
+ country_code: '964',
873
+ country_name: 'Iraq',
874
+ mobile_begin_with: ['7'],
875
+ phone_number_lengths: [10]
876
+ },
877
+ {
878
+ alpha2: 'IS',
879
+ alpha3: 'ISL',
880
+ country_code: '354',
881
+ country_name: 'Iceland',
882
+ mobile_begin_with: ['6', '7', '8'],
883
+ phone_number_lengths: [7]
884
+ },
885
+ {
886
+ alpha2: 'IL',
887
+ alpha3: 'ISR',
888
+ country_code: '972',
889
+ country_name: 'Israel',
890
+ mobile_begin_with: ['5'],
891
+ phone_number_lengths: [9]
892
+ },
893
+ {
894
+ alpha2: 'IT',
895
+ alpha3: 'ITA',
896
+ country_code: '39',
897
+ country_name: 'Italy',
898
+ mobile_begin_with: ['3'],
899
+ phone_number_lengths: [9, 10]
900
+ },
901
+ {
902
+ alpha2: 'JM',
903
+ alpha3: 'JAM',
904
+ country_code: '1',
905
+ country_name: 'Jamaica',
906
+ mobile_begin_with: ['876'],
907
+ phone_number_lengths: [10]
908
+ },
909
+ // {alpha2: "JE", alpha3: "JEY", country_code: "44", country_name: "Jersey", mobile_begin_with: [], phone_number_lengths: []},
910
+ {
911
+ alpha2: 'JO',
912
+ alpha3: 'JOR',
913
+ country_code: '962',
914
+ country_name: 'Jordan',
915
+ mobile_begin_with: ['7'],
916
+ phone_number_lengths: [9]
917
+ },
918
+ {
919
+ alpha2: 'JP',
920
+ alpha3: 'JPN',
921
+ country_code: '81',
922
+ country_name: 'Japan',
923
+ mobile_begin_with: ['70', '80', '90'],
924
+ phone_number_lengths: [10]
925
+ },
926
+ {
927
+ alpha2: 'KZ',
928
+ alpha3: 'KAZ',
929
+ country_code: '7',
930
+ country_name: 'Kazakhstan',
931
+ mobile_begin_with: ['70', '74', '77'],
932
+ phone_number_lengths: [10]
933
+ },
934
+ {
935
+ alpha2: 'KE',
936
+ alpha3: 'KEN',
937
+ country_code: '254',
938
+ country_name: 'Kenya',
939
+ mobile_begin_with: ['7', '1'],
940
+ phone_number_lengths: [9]
941
+ },
942
+ {
943
+ alpha2: 'KG',
944
+ alpha3: 'KGZ',
945
+ country_code: '996',
946
+ country_name: 'Kyrgyzstan',
947
+ mobile_begin_with: ['20', '22', '31258', '312973', '5', '600', '7', '88', '912', '99'],
948
+ phone_number_lengths: [9]
949
+ },
950
+ {
951
+ alpha2: 'KH',
952
+ alpha3: 'KHM',
953
+ country_code: '855',
954
+ country_name: 'Cambodia',
955
+ mobile_begin_with: ['1', '6', '7', '8', '9'],
956
+ phone_number_lengths: [8, 9]
957
+ },
958
+ {
959
+ alpha2: 'KI',
960
+ alpha3: 'KIR',
961
+ country_code: '686',
962
+ country_name: 'Kiribati',
963
+ mobile_begin_with: ['9', '30'],
964
+ phone_number_lengths: [5]
965
+ },
966
+ {
967
+ alpha2: 'KN',
968
+ alpha3: 'KNA',
969
+ country_code: '1',
970
+ country_name: 'Saint Kitts And Nevis',
971
+ mobile_begin_with: ['869'],
972
+ phone_number_lengths: [10]
973
+ },
974
+ {
975
+ alpha2: 'KR',
976
+ alpha3: 'KOR',
977
+ country_code: '82',
978
+ country_name: 'Korea, Republic of',
979
+ mobile_begin_with: ['1'],
980
+ phone_number_lengths: [9, 10]
981
+ },
982
+ // https://www.howtocallabroad.com/kosovo/
983
+ // https://en.wikipedia.org/wiki/Telephone_numbers_in_Kosovo
984
+ {
985
+ alpha2: "XK",
986
+ alpha3: "XKX",
987
+ country_code: "383",
988
+ country_name: "Kosovo, Republic of",
989
+ mobile_begin_with: ["43", "44", "45", "46", "47", "48", "49"],
990
+ phone_number_lengths: [8],
991
+ },
992
+ {
993
+ alpha2: 'KW',
994
+ alpha3: 'KWT',
995
+ country_code: '965',
996
+ country_name: 'Kuwait',
997
+ mobile_begin_with: ['5', '6', '9'],
998
+ phone_number_lengths: [8]
999
+ },
1000
+ {
1001
+ alpha2: 'LA',
1002
+ alpha3: 'LAO',
1003
+ country_code: '856',
1004
+ country_name: "Lao People's Democratic Republic",
1005
+ mobile_begin_with: ['20'],
1006
+ phone_number_lengths: [10]
1007
+ },
1008
+ {
1009
+ alpha2: 'LB',
1010
+ alpha3: 'LBN',
1011
+ country_code: '961',
1012
+ country_name: 'Lebanon',
1013
+ mobile_begin_with: ['3', '7', '8'],
1014
+ phone_number_lengths: [7, 8]
1015
+ },
1016
+ {
1017
+ alpha2: 'LR',
1018
+ alpha3: 'LBR',
1019
+ country_code: '231',
1020
+ country_name: 'Liberia',
1021
+ mobile_begin_with: ['4', '5', '6', '7'],
1022
+ phone_number_lengths: [7, 8]
1023
+ },
1024
+ {
1025
+ alpha2: 'LY',
1026
+ alpha3: 'LBY',
1027
+ country_code: '218',
1028
+ country_name: 'Libyan Arab Jamahiriya',
1029
+ mobile_begin_with: ['9'],
1030
+ phone_number_lengths: [9]
1031
+ },
1032
+ {
1033
+ alpha2: 'LC',
1034
+ alpha3: 'LCA',
1035
+ country_code: '1',
1036
+ country_name: 'Saint Lucia',
1037
+ mobile_begin_with: ['758'],
1038
+ phone_number_lengths: [10]
1039
+ },
1040
+ {
1041
+ alpha2: 'LI',
1042
+ alpha3: 'LIE',
1043
+ country_code: '423',
1044
+ country_name: 'Liechtenstein',
1045
+ mobile_begin_with: ['7'],
1046
+ phone_number_lengths: [7]
1047
+ },
1048
+ {
1049
+ alpha2: 'LK',
1050
+ alpha3: 'LKA',
1051
+ country_code: '94',
1052
+ country_name: 'Sri Lanka',
1053
+ mobile_begin_with: ['7'],
1054
+ phone_number_lengths: [9]
1055
+ },
1056
+ {
1057
+ alpha2: 'LS',
1058
+ alpha3: 'LSO',
1059
+ country_code: '266',
1060
+ country_name: 'Lesotho',
1061
+ mobile_begin_with: ['5', '6'],
1062
+ phone_number_lengths: [8]
1063
+ },
1064
+ {
1065
+ alpha2: 'LT',
1066
+ alpha3: 'LTU',
1067
+ country_code: '370',
1068
+ country_name: 'Lithuania',
1069
+ mobile_begin_with: ['6'],
1070
+ phone_number_lengths: [8]
1071
+ },
1072
+ {
1073
+ alpha2: 'LU',
1074
+ alpha3: 'LUX',
1075
+ country_code: '352',
1076
+ country_name: 'Luxembourg',
1077
+ mobile_begin_with: ['6'],
1078
+ phone_number_lengths: [9]
1079
+ },
1080
+ {
1081
+ alpha2: 'LV',
1082
+ alpha3: 'LVA',
1083
+ country_code: '371',
1084
+ country_name: 'Latvia',
1085
+ mobile_begin_with: ['2'],
1086
+ phone_number_lengths: [8]
1087
+ },
1088
+ {
1089
+ alpha2: 'MO',
1090
+ alpha3: 'MAC',
1091
+ country_code: '853',
1092
+ country_name: 'Macao',
1093
+ mobile_begin_with: ['6'],
1094
+ phone_number_lengths: [8]
1095
+ },
1096
+ // {alpha2: "MF", alpha3: "MAF", country_code: "590", country_name: "Saint Martin", mobile_begin_with: [], phone_number_lengths: []},
1097
+ {
1098
+ alpha2: 'MA',
1099
+ alpha3: 'MAR',
1100
+ country_code: '212',
1101
+ country_name: 'Morocco',
1102
+ mobile_begin_with: ['6', '7'],
1103
+ phone_number_lengths: [9]
1104
+ },
1105
+ {
1106
+ alpha2: 'MC',
1107
+ alpha3: 'MCO',
1108
+ country_code: '377',
1109
+ country_name: 'Monaco',
1110
+ mobile_begin_with: ['4', '6'],
1111
+ phone_number_lengths: [8, 9]
1112
+ },
1113
+ {
1114
+ alpha2: 'MD',
1115
+ alpha3: 'MDA',
1116
+ country_code: '373',
1117
+ country_name: 'Moldova, Republic of',
1118
+ mobile_begin_with: ['6', '7'],
1119
+ phone_number_lengths: [8]
1120
+ },
1121
+ {
1122
+ alpha2: 'MG',
1123
+ alpha3: 'MDG',
1124
+ country_code: '261',
1125
+ country_name: 'Madagascar',
1126
+ mobile_begin_with: ['3'],
1127
+ phone_number_lengths: [9]
1128
+ },
1129
+ {
1130
+ alpha2: 'MV',
1131
+ alpha3: 'MDV',
1132
+ country_code: '960',
1133
+ country_name: 'Maldives',
1134
+ mobile_begin_with: ['7', '9'],
1135
+ phone_number_lengths: [7]
1136
+ },
1137
+ {
1138
+ alpha2: 'MX',
1139
+ alpha3: 'MEX',
1140
+ country_code: '52',
1141
+ country_name: 'Mexico',
1142
+ mobile_begin_with: [''],
1143
+ phone_number_lengths: [10, 11]
1144
+ },
1145
+ {
1146
+ alpha2: 'MH',
1147
+ alpha3: 'MHL',
1148
+ country_code: '692',
1149
+ country_name: 'Marshall Islands',
1150
+ mobile_begin_with: [],
1151
+ phone_number_lengths: [7]
1152
+ },
1153
+ {
1154
+ alpha2: 'MK',
1155
+ alpha3: 'MKD',
1156
+ country_code: '389',
1157
+ country_name: 'Macedonia, the Former Yugoslav Republic Of',
1158
+ mobile_begin_with: ['7'],
1159
+ phone_number_lengths: [8]
1160
+ },
1161
+ {
1162
+ alpha2: 'ML',
1163
+ alpha3: 'MLI',
1164
+ country_code: '223',
1165
+ country_name: 'Mali',
1166
+ mobile_begin_with: ['6', '7'],
1167
+ phone_number_lengths: [8]
1168
+ },
1169
+ {
1170
+ alpha2: 'MT',
1171
+ alpha3: 'MLT',
1172
+ country_code: '356',
1173
+ country_name: 'Malta',
1174
+ mobile_begin_with: ['7', '9'],
1175
+ phone_number_lengths: [8]
1176
+ },
1177
+ {
1178
+ alpha2: 'MM',
1179
+ alpha3: 'MMR',
1180
+ country_code: '95',
1181
+ country_name: 'Myanmar',
1182
+ mobile_begin_with: ['9'],
1183
+ phone_number_lengths: [8, 9, 10]
1184
+ },
1185
+ {
1186
+ alpha2: 'ME',
1187
+ alpha3: 'MNE',
1188
+ country_code: '382',
1189
+ country_name: 'Montenegro',
1190
+ mobile_begin_with: ['6'],
1191
+ phone_number_lengths: [8]
1192
+ },
1193
+ {
1194
+ alpha2: 'MN',
1195
+ alpha3: 'MNG',
1196
+ country_code: '976',
1197
+ country_name: 'Mongolia',
1198
+ mobile_begin_with: ['5', '8', '9'],
1199
+ phone_number_lengths: [8]
1200
+ },
1201
+ {
1202
+ alpha2: 'MP',
1203
+ alpha3: 'MNP',
1204
+ country_code: '1',
1205
+ country_name: 'Northern Mariana Islands',
1206
+ mobile_begin_with: ['670'],
1207
+ phone_number_lengths: [10]
1208
+ },
1209
+ {
1210
+ alpha2: 'MZ',
1211
+ alpha3: 'MOZ',
1212
+ country_code: '258',
1213
+ country_name: 'Mozambique',
1214
+ mobile_begin_with: ['8'],
1215
+ phone_number_lengths: [9]
1216
+ },
1217
+ {
1218
+ alpha2: 'MR',
1219
+ alpha3: 'MRT',
1220
+ country_code: '222',
1221
+ country_name: 'Mauritania',
1222
+ mobile_begin_with: [],
1223
+ phone_number_lengths: [8]
1224
+ },
1225
+ {
1226
+ alpha2: 'MS',
1227
+ alpha3: 'MSR',
1228
+ country_code: '1',
1229
+ country_name: 'Montserrat',
1230
+ mobile_begin_with: ['664'],
1231
+ phone_number_lengths: [10]
1232
+ },
1233
+ {
1234
+ alpha2: 'MQ',
1235
+ alpha3: 'MTQ',
1236
+ country_code: '596',
1237
+ country_name: 'Martinique',
1238
+ mobile_begin_with: ['696', '697'],
1239
+ phone_number_lengths: [9]
1240
+ },
1241
+ {
1242
+ alpha2: 'MU',
1243
+ alpha3: 'MUS',
1244
+ country_code: '230',
1245
+ country_name: 'Mauritius',
1246
+ mobile_begin_with: ['5'],
1247
+ phone_number_lengths: [8]
1248
+ },
1249
+ {
1250
+ alpha2: 'MW',
1251
+ alpha3: 'MWI',
1252
+ country_code: '265',
1253
+ country_name: 'Malawi',
1254
+ mobile_begin_with: ['77', '88', '99'],
1255
+ phone_number_lengths: [9]
1256
+ },
1257
+ {
1258
+ alpha2: 'MY',
1259
+ alpha3: 'MYS',
1260
+ country_code: '60',
1261
+ country_name: 'Malaysia',
1262
+ mobile_begin_with: ['1', '6'],
1263
+ phone_number_lengths: [9, 10, 8]
1264
+ },
1265
+ {
1266
+ alpha2: 'YT',
1267
+ alpha3: 'MYT',
1268
+ country_code: '262',
1269
+ country_name: 'Mayotte',
1270
+ mobile_begin_with: ['639'],
1271
+ phone_number_lengths: [9]
1272
+ },
1273
+ {
1274
+ alpha2: 'NA',
1275
+ alpha3: 'NAM',
1276
+ country_code: '264',
1277
+ country_name: 'Namibia',
1278
+ mobile_begin_with: ['60', '81', '82', '85'],
1279
+ phone_number_lengths: [9]
1280
+ },
1281
+ {
1282
+ alpha2: 'NC',
1283
+ alpha3: 'NCL',
1284
+ country_code: '687',
1285
+ country_name: 'New Caledonia',
1286
+ mobile_begin_with: ['5', '7', '8', '9'],
1287
+ phone_number_lengths: [6]
1288
+ },
1289
+ {
1290
+ alpha2: 'NE',
1291
+ alpha3: 'NER',
1292
+ country_code: '227',
1293
+ country_name: 'Niger',
1294
+ mobile_begin_with: ['9'],
1295
+ phone_number_lengths: [8]
1296
+ },
1297
+ {
1298
+ alpha2: 'NF',
1299
+ alpha3: 'NFK',
1300
+ country_code: '672',
1301
+ country_name: 'Norfolk Island',
1302
+ mobile_begin_with: ['5', '8'],
1303
+ phone_number_lengths: [5]
1304
+ },
1305
+ {
1306
+ alpha2: 'NG',
1307
+ alpha3: 'NGA',
1308
+ country_code: '234',
1309
+ country_name: 'Nigeria',
1310
+ mobile_begin_with: ['70', '80', '81', '90', '91'],
1311
+ phone_number_lengths: [10]
1312
+ },
1313
+ {
1314
+ alpha2: 'NI',
1315
+ alpha3: 'NIC',
1316
+ country_code: '505',
1317
+ country_name: 'Nicaragua',
1318
+ mobile_begin_with: ['7', '8'],
1319
+ phone_number_lengths: [8]
1320
+ },
1321
+ {
1322
+ alpha2: 'NU',
1323
+ alpha3: 'NIU',
1324
+ country_code: '683',
1325
+ country_name: 'Niue',
1326
+ mobile_begin_with: [],
1327
+ phone_number_lengths: [4]
1328
+ },
1329
+ {
1330
+ alpha2: 'NL',
1331
+ alpha3: 'NLD',
1332
+ country_code: '31',
1333
+ country_name: 'Netherlands',
1334
+ mobile_begin_with: ['6', '97'],
1335
+ phone_number_lengths: [9, 11]
1336
+ },
1337
+ {
1338
+ alpha2: 'NO',
1339
+ alpha3: 'NOR',
1340
+ country_code: '47',
1341
+ country_name: 'Norway',
1342
+ mobile_begin_with: ['4', '9'],
1343
+ phone_number_lengths: [8]
1344
+ },
1345
+ {
1346
+ alpha2: 'NP',
1347
+ alpha3: 'NPL',
1348
+ country_code: '977',
1349
+ country_name: 'Nepal',
1350
+ mobile_begin_with: ['97', '98'],
1351
+ phone_number_lengths: [10]
1352
+ },
1353
+ {
1354
+ alpha2: 'NR',
1355
+ alpha3: 'NRU',
1356
+ country_code: '674',
1357
+ country_name: 'Nauru',
1358
+ mobile_begin_with: ['555'],
1359
+ phone_number_lengths: [7]
1360
+ },
1361
+ {
1362
+ alpha2: 'NZ',
1363
+ alpha3: 'NZL',
1364
+ country_code: '64',
1365
+ country_name: 'New Zealand',
1366
+ mobile_begin_with: ['2'],
1367
+ phone_number_lengths: [8, 9, 10]
1368
+ },
1369
+ {
1370
+ alpha2: 'OM',
1371
+ alpha3: 'OMN',
1372
+ country_code: '968',
1373
+ country_name: 'Oman',
1374
+ mobile_begin_with: ['7', '9'],
1375
+ phone_number_lengths: [8]
1376
+ },
1377
+ {
1378
+ alpha2: 'PK',
1379
+ alpha3: 'PAK',
1380
+ country_code: '92',
1381
+ country_name: 'Pakistan',
1382
+ mobile_begin_with: ['3'],
1383
+ phone_number_lengths: [10]
1384
+ },
1385
+ {
1386
+ alpha2: 'PA',
1387
+ alpha3: 'PAN',
1388
+ country_code: '507',
1389
+ country_name: 'Panama',
1390
+ mobile_begin_with: ['6'],
1391
+ phone_number_lengths: [8]
1392
+ },
1393
+ // {alpha2: "PN", alpha3: "PCN", country_code: "", country_name: "Pitcairn", mobile_begin_with: [], phone_number_lengths: []},
1394
+ {
1395
+ alpha2: 'PE',
1396
+ alpha3: 'PER',
1397
+ country_code: '51',
1398
+ country_name: 'Peru',
1399
+ mobile_begin_with: ['9'],
1400
+ phone_number_lengths: [9]
1401
+ },
1402
+ {
1403
+ alpha2: 'PH',
1404
+ alpha3: 'PHL',
1405
+ country_code: '63',
1406
+ country_name: 'Philippines',
1407
+ mobile_begin_with: ['9'],
1408
+ phone_number_lengths: [10]
1409
+ },
1410
+ {
1411
+ alpha2: 'PW',
1412
+ alpha3: 'PLW',
1413
+ country_code: '680',
1414
+ country_name: 'Palau',
1415
+ mobile_begin_with: [],
1416
+ phone_number_lengths: [7]
1417
+ },
1418
+ {
1419
+ alpha2: 'PG',
1420
+ alpha3: 'PNG',
1421
+ country_code: '675',
1422
+ country_name: 'Papua New Guinea',
1423
+ mobile_begin_with: ['7'],
1424
+ phone_number_lengths: [8]
1425
+ },
1426
+ {
1427
+ alpha2: 'PL',
1428
+ alpha3: 'POL',
1429
+ country_code: '48',
1430
+ country_name: 'Poland',
1431
+ mobile_begin_with: ['4', '5', '6', '7', '8'],
1432
+ phone_number_lengths: [9]
1433
+ },
1434
+ {
1435
+ alpha2: 'PR',
1436
+ alpha3: 'PRI',
1437
+ country_code: '1',
1438
+ country_name: 'Puerto Rico',
1439
+ mobile_begin_with: ['787', '939'],
1440
+ phone_number_lengths: [10]
1441
+ },
1442
+ // {alpha2: "KP", alpha3: "PRK", country_code: "850", country_name: "Korea, Democratic People's Republic Of", mobile_begin_with: [], phone_number_lengths: []},
1443
+ {
1444
+ alpha2: 'PT',
1445
+ alpha3: 'PRT',
1446
+ country_code: '351',
1447
+ country_name: 'Portugal',
1448
+ mobile_begin_with: ['9'],
1449
+ phone_number_lengths: [9]
1450
+ },
1451
+ {
1452
+ alpha2: 'PY',
1453
+ alpha3: 'PRY',
1454
+ country_code: '595',
1455
+ country_name: 'Paraguay',
1456
+ mobile_begin_with: ['9'],
1457
+ phone_number_lengths: [9]
1458
+ },
1459
+ {
1460
+ alpha2: 'PS',
1461
+ alpha3: 'PSE',
1462
+ country_code: '970',
1463
+ country_name: 'Palestinian Territory, Occupied',
1464
+ mobile_begin_with: ['5'],
1465
+ phone_number_lengths: [9]
1466
+ },
1467
+ {
1468
+ alpha2: 'PF',
1469
+ alpha3: 'PYF',
1470
+ country_code: '689',
1471
+ country_name: 'French Polynesia',
1472
+ mobile_begin_with: ['8'],
1473
+ phone_number_lengths: [8]
1474
+ },
1475
+ {
1476
+ alpha2: 'QA',
1477
+ alpha3: 'QAT',
1478
+ country_code: '974',
1479
+ country_name: 'Qatar',
1480
+ mobile_begin_with: ['3', '5', '6', '7'],
1481
+ phone_number_lengths: [8]
1482
+ },
1483
+ {
1484
+ alpha2: 'RE',
1485
+ alpha3: 'REU',
1486
+ country_code: '262',
1487
+ country_name: 'Réunion',
1488
+ mobile_begin_with: ['692', '693'],
1489
+ phone_number_lengths: [9]
1490
+ },
1491
+ {
1492
+ alpha2: 'RO',
1493
+ alpha3: 'ROU',
1494
+ country_code: '40',
1495
+ country_name: 'Romania',
1496
+ mobile_begin_with: ['7'],
1497
+ phone_number_lengths: [9]
1498
+ },
1499
+ {
1500
+ alpha2: 'RU',
1501
+ alpha3: 'RUS',
1502
+ country_code: '7',
1503
+ country_name: 'Russian Federation',
1504
+ mobile_begin_with: ['9', '495', '498', '499', '835'],
1505
+ phone_number_lengths: [10]
1506
+ },
1507
+ {
1508
+ alpha2: 'RW',
1509
+ alpha3: 'RWA',
1510
+ country_code: '250',
1511
+ country_name: 'Rwanda',
1512
+ mobile_begin_with: ['7'],
1513
+ phone_number_lengths: [9]
1514
+ },
1515
+ {
1516
+ alpha2: 'SA',
1517
+ alpha3: 'SAU',
1518
+ country_code: '966',
1519
+ country_name: 'Saudi Arabia',
1520
+ mobile_begin_with: ['5'],
1521
+ phone_number_lengths: [9]
1522
+ },
1523
+ {
1524
+ alpha2: 'SD',
1525
+ alpha3: 'SDN',
1526
+ country_code: '249',
1527
+ country_name: 'Sudan',
1528
+ mobile_begin_with: ['9'],
1529
+ phone_number_lengths: [9]
1530
+ },
1531
+ {
1532
+ alpha2: 'SS',
1533
+ alpha3: 'SSD',
1534
+ country_code: '211',
1535
+ country_name: 'South Sudan',
1536
+ mobile_begin_with: ['9'],
1537
+ phone_number_lengths: [9]
1538
+ },
1539
+ {
1540
+ alpha2: 'SN',
1541
+ alpha3: 'SEN',
1542
+ country_code: '221',
1543
+ country_name: 'Senegal',
1544
+ mobile_begin_with: ['7'],
1545
+ phone_number_lengths: [9]
1546
+ },
1547
+ {
1548
+ alpha2: 'SG',
1549
+ alpha3: 'SGP',
1550
+ country_code: '65',
1551
+ country_name: 'Singapore',
1552
+ mobile_begin_with: ['8', '9'],
1553
+ phone_number_lengths: [8]
1554
+ },
1555
+ // {alpha2: "GS", alpha3: "SGS", country_code: "500", country_name: "South Georgia and the South Sandwich Islands", mobile_begin_with: [], phone_number_lengths: []},
1556
+ {
1557
+ alpha2: 'SH',
1558
+ alpha3: 'SHN',
1559
+ country_code: '290',
1560
+ country_name: 'Saint Helena',
1561
+ mobile_begin_with: [],
1562
+ phone_number_lengths: [4]
1563
+ },
1564
+ {
1565
+ alpha2: 'SJ',
1566
+ alpha3: 'SJM',
1567
+ country_code: '47',
1568
+ country_name: 'Svalbard And Jan Mayen',
1569
+ mobile_begin_with: ['79'],
1570
+ phone_number_lengths: [8]
1571
+ },
1572
+ {
1573
+ alpha2: 'SB',
1574
+ alpha3: 'SLB',
1575
+ country_code: '677',
1576
+ country_name: 'Solomon Islands',
1577
+ mobile_begin_with: ['7', '8'],
1578
+ phone_number_lengths: [7]
1579
+ },
1580
+ {
1581
+ alpha2: 'SL',
1582
+ alpha3: 'SLE',
1583
+ country_code: '232',
1584
+ country_name: 'Sierra Leone',
1585
+ mobile_begin_with: ['21', '25', '30', '33', '34', '40', '44', '50', '55', '76', '77', '78', '79', '88'],
1586
+ phone_number_lengths: [8]
1587
+ },
1588
+ {
1589
+ alpha2: 'SV',
1590
+ alpha3: 'SLV',
1591
+ country_code: '503',
1592
+ country_name: 'El Salvador',
1593
+ mobile_begin_with: ['6', '7'],
1594
+ phone_number_lengths: [8]
1595
+ },
1596
+ {
1597
+ alpha2: 'SM',
1598
+ alpha3: 'SMR',
1599
+ country_code: '378',
1600
+ country_name: 'San Marino',
1601
+ mobile_begin_with: ['3', '6'],
1602
+ phone_number_lengths: [10]
1603
+ },
1604
+ {
1605
+ alpha2: 'SO',
1606
+ alpha3: 'SOM',
1607
+ country_code: '252',
1608
+ country_name: 'Somalia',
1609
+ mobile_begin_with: ['61', '62', '63', '65', '66', '68', '69', '71', '90'],
1610
+ phone_number_lengths: [9]
1611
+ },
1612
+ {
1613
+ alpha2: 'SX',
1614
+ alpha3: 'SXM',
1615
+ country_code: '1',
1616
+ country_name: 'Sint Maarten',
1617
+ mobile_begin_with: ['721'],
1618
+ phone_number_lengths: [10]
1619
+ },
1620
+ {
1621
+ alpha2: 'PM',
1622
+ alpha3: 'SPM',
1623
+ country_code: '508',
1624
+ country_name: 'Saint Pierre And Miquelon',
1625
+ mobile_begin_with: ['55', '41'],
1626
+ phone_number_lengths: [6]
1627
+ },
1628
+ {
1629
+ alpha2: 'RS',
1630
+ alpha3: 'SRB',
1631
+ country_code: '381',
1632
+ country_name: 'Serbia',
1633
+ mobile_begin_with: ['6'],
1634
+ phone_number_lengths: [8, 9]
1635
+ },
1636
+ {
1637
+ alpha2: 'ST',
1638
+ alpha3: 'STP',
1639
+ country_code: '239',
1640
+ country_name: 'Sao Tome and Principe',
1641
+ mobile_begin_with: ['98', '99'],
1642
+ phone_number_lengths: [7]
1643
+ },
1644
+ {
1645
+ alpha2: 'SR',
1646
+ alpha3: 'SUR',
1647
+ country_code: '597',
1648
+ country_name: 'Suriname',
1649
+ mobile_begin_with: ['6', '7', '8'],
1650
+ phone_number_lengths: [7]
1651
+ },
1652
+ {
1653
+ alpha2: 'SK',
1654
+ alpha3: 'SVK',
1655
+ country_code: '421',
1656
+ country_name: 'Slovakia',
1657
+ mobile_begin_with: ['9'],
1658
+ phone_number_lengths: [9]
1659
+ },
1660
+ {
1661
+ alpha2: 'SI',
1662
+ alpha3: 'SVN',
1663
+ country_code: '386',
1664
+ country_name: 'Slovenia',
1665
+ mobile_begin_with: ['3', '4', '5', '6', '7'],
1666
+ phone_number_lengths: [8]
1667
+ },
1668
+ {
1669
+ alpha2: 'SE',
1670
+ alpha3: 'SWE',
1671
+ country_code: '46',
1672
+ country_name: 'Sweden',
1673
+ mobile_begin_with: ['7'],
1674
+ phone_number_lengths: [9]
1675
+ },
1676
+ {
1677
+ alpha2: 'SZ',
1678
+ alpha3: 'SWZ',
1679
+ country_code: '268',
1680
+ country_name: 'Swaziland',
1681
+ mobile_begin_with: ['76', '77', '78', '79'],
1682
+ phone_number_lengths: [8]
1683
+ },
1684
+ {
1685
+ alpha2: 'SC',
1686
+ alpha3: 'SYC',
1687
+ country_code: '248',
1688
+ country_name: 'Seychelles',
1689
+ mobile_begin_with: ['2'],
1690
+ phone_number_lengths: [7]
1691
+ },
1692
+ {
1693
+ alpha2: 'SY',
1694
+ alpha3: 'SYR',
1695
+ country_code: '963',
1696
+ country_name: 'Syrian Arab Republic',
1697
+ mobile_begin_with: ['9'],
1698
+ phone_number_lengths: [9]
1699
+ },
1700
+ // http://www.howtocallabroad.com/turks-caicos/
1701
+ {
1702
+ alpha2: 'TC',
1703
+ alpha3: 'TCA',
1704
+ country_code: '1',
1705
+ country_name: 'Turks and Caicos Islands',
1706
+ mobile_begin_with: ['6492', '6493', '6494'],
1707
+ phone_number_lengths: [10]
1708
+ },
1709
+ {
1710
+ alpha2: 'TD',
1711
+ alpha3: 'TCD',
1712
+ country_code: '235',
1713
+ country_name: 'Chad',
1714
+ mobile_begin_with: ['6', '7', '9'],
1715
+ phone_number_lengths: [8]
1716
+ },
1717
+ {
1718
+ alpha2: 'TG',
1719
+ alpha3: 'TGO',
1720
+ country_code: '228',
1721
+ country_name: 'Togo',
1722
+ mobile_begin_with: ['9'],
1723
+ phone_number_lengths: [8]
1724
+ },
1725
+ {
1726
+ alpha2: 'TH',
1727
+ alpha3: 'THA',
1728
+ country_code: '66',
1729
+ country_name: 'Thailand',
1730
+ mobile_begin_with: ['6', '8', '9'],
1731
+ phone_number_lengths: [9]
1732
+ },
1733
+ {
1734
+ alpha2: 'TJ',
1735
+ alpha3: 'TJK',
1736
+ country_code: '992',
1737
+ country_name: 'Tajikistan',
1738
+ mobile_begin_with: ['9'],
1739
+ phone_number_lengths: [9]
1740
+ },
1741
+ {
1742
+ alpha2: 'TK',
1743
+ alpha3: 'TKL',
1744
+ country_code: '690',
1745
+ country_name: 'Tokelau',
1746
+ mobile_begin_with: [],
1747
+ phone_number_lengths: [4]
1748
+ },
1749
+ {
1750
+ alpha2: 'TM',
1751
+ alpha3: 'TKM',
1752
+ country_code: '993',
1753
+ country_name: 'Turkmenistan',
1754
+ mobile_begin_with: ['6'],
1755
+ phone_number_lengths: [8]
1756
+ },
1757
+ {
1758
+ alpha2: 'TL',
1759
+ alpha3: 'TLS',
1760
+ country_code: '670',
1761
+ country_name: 'Timor-Leste',
1762
+ mobile_begin_with: ['7'],
1763
+ phone_number_lengths: [8]
1764
+ },
1765
+ {
1766
+ alpha2: 'TO',
1767
+ alpha3: 'TON',
1768
+ country_code: '676',
1769
+ country_name: 'Tonga',
1770
+ mobile_begin_with: [],
1771
+ phone_number_lengths: [5]
1772
+ },
1773
+ {
1774
+ alpha2: 'TT',
1775
+ alpha3: 'TTO',
1776
+ country_code: '1',
1777
+ country_name: 'Trinidad and Tobago',
1778
+ mobile_begin_with: ['868'],
1779
+ phone_number_lengths: [10]
1780
+ },
1781
+ {
1782
+ alpha2: 'TN',
1783
+ alpha3: 'TUN',
1784
+ country_code: '216',
1785
+ country_name: 'Tunisia',
1786
+ mobile_begin_with: ['2', '4', '5', '9'],
1787
+ phone_number_lengths: [8]
1788
+ },
1789
+ {
1790
+ alpha2: 'TR',
1791
+ alpha3: 'TUR',
1792
+ country_code: '90',
1793
+ country_name: 'Turkey',
1794
+ mobile_begin_with: ['5'],
1795
+ phone_number_lengths: [10]
1796
+ },
1797
+ {
1798
+ alpha2: 'TV',
1799
+ alpha3: 'TUV',
1800
+ country_code: '688',
1801
+ country_name: 'Tuvalu',
1802
+ mobile_begin_with: [],
1803
+ phone_number_lengths: [5]
1804
+ },
1805
+ {
1806
+ alpha2: 'TW',
1807
+ alpha3: 'TWN',
1808
+ country_code: '886',
1809
+ country_name: 'Taiwan',
1810
+ mobile_begin_with: ['9'],
1811
+ phone_number_lengths: [9]
1812
+ },
1813
+ {
1814
+ alpha2: 'TZ',
1815
+ alpha3: 'TZA',
1816
+ country_code: '255',
1817
+ country_name: 'Tanzania, United Republic of',
1818
+ mobile_begin_with: ['7', '6'],
1819
+ phone_number_lengths: [9]
1820
+ },
1821
+ {
1822
+ alpha2: 'UG',
1823
+ alpha3: 'UGA',
1824
+ country_code: '256',
1825
+ country_name: 'Uganda',
1826
+ mobile_begin_with: ['7'],
1827
+ phone_number_lengths: [9]
1828
+ },
1829
+ {
1830
+ alpha2: 'UA',
1831
+ alpha3: 'UKR',
1832
+ country_code: '380',
1833
+ country_name: 'Ukraine',
1834
+ mobile_begin_with: ['39', '50', '63', '66', '67', '68', '73', '75', '77', '9'],
1835
+ phone_number_lengths: [9]
1836
+ },
1837
+ // {alpha2: "UM", alpha3: "UMI", country_code: "", country_name: "United States Minor Outlying Islands", mobile_begin_with: [], phone_number_lengths: []},
1838
+ {
1839
+ alpha2: 'UY',
1840
+ alpha3: 'URY',
1841
+ country_code: '598',
1842
+ country_name: 'Uruguay',
1843
+ mobile_begin_with: ['9'],
1844
+ phone_number_lengths: [8]
1845
+ },
1846
+ {
1847
+ alpha2: 'UZ',
1848
+ alpha3: 'UZB',
1849
+ country_code: '998',
1850
+ country_name: 'Uzbekistan',
1851
+ mobile_begin_with: ['9', '88', '33'],
1852
+ phone_number_lengths: [9]
1853
+ },
1854
+ // {alpha2: "VA", alpha3: "VAT", country_code: "39", country_name: "Holy See (Vatican City State)", mobile_begin_with: [], phone_number_lengths: []},
1855
+ {
1856
+ alpha2: 'VC',
1857
+ alpha3: 'VCT',
1858
+ country_code: '1',
1859
+ country_name: 'Saint Vincent And The Grenedines',
1860
+ mobile_begin_with: ['784'],
1861
+ phone_number_lengths: [10]
1862
+ },
1863
+ {
1864
+ alpha2: 'VE',
1865
+ alpha3: 'VEN',
1866
+ country_code: '58',
1867
+ country_name: 'Venezuela, Bolivarian Republic of',
1868
+ mobile_begin_with: ['4'],
1869
+ phone_number_lengths: [10]
1870
+ },
1871
+ {
1872
+ alpha2: 'VG',
1873
+ alpha3: 'VGB',
1874
+ country_code: '1',
1875
+ country_name: 'Virgin Islands, British',
1876
+ mobile_begin_with: ['284'],
1877
+ phone_number_lengths: [10]
1878
+ },
1879
+ {
1880
+ alpha2: 'VI',
1881
+ alpha3: 'VIR',
1882
+ country_code: '1',
1883
+ country_name: 'Virgin Islands, U.S.',
1884
+ mobile_begin_with: ['340'],
1885
+ phone_number_lengths: [10]
1886
+ },
1887
+ {
1888
+ alpha2: 'VN',
1889
+ alpha3: 'VNM',
1890
+ country_code: '84',
1891
+ country_name: 'Viet Nam',
1892
+ mobile_begin_with: ['8', '9', '3', '7', '5'],
1893
+ phone_number_lengths: [9]
1894
+ },
1895
+ {
1896
+ alpha2: 'VU',
1897
+ alpha3: 'VUT',
1898
+ country_code: '678',
1899
+ country_name: 'Vanuatu',
1900
+ mobile_begin_with: ['5', '7'],
1901
+ phone_number_lengths: [7]
1902
+ },
1903
+ {
1904
+ alpha2: 'WF',
1905
+ alpha3: 'WLF',
1906
+ country_code: '681',
1907
+ country_name: 'Wallis and Futuna',
1908
+ mobile_begin_with: [],
1909
+ phone_number_lengths: [6]
1910
+ },
1911
+ {
1912
+ alpha2: 'WS',
1913
+ alpha3: 'WSM',
1914
+ country_code: '685',
1915
+ country_name: 'Samoa',
1916
+ mobile_begin_with: ['7'],
1917
+ phone_number_lengths: [7]
1918
+ },
1919
+ {
1920
+ alpha2: 'YE',
1921
+ alpha3: 'YEM',
1922
+ country_code: '967',
1923
+ country_name: 'Yemen',
1924
+ mobile_begin_with: ['7'],
1925
+ phone_number_lengths: [9]
1926
+ },
1927
+ {
1928
+ alpha2: 'ZA',
1929
+ alpha3: 'ZAF',
1930
+ country_code: '27',
1931
+ country_name: 'South Africa',
1932
+ mobile_begin_with: ['1', '2', '3', '4', '5', '6', '7', '8'],
1933
+ phone_number_lengths: [9]
1934
+ },
1935
+ {
1936
+ alpha2: 'ZM',
1937
+ alpha3: 'ZMB',
1938
+ country_code: '260',
1939
+ country_name: 'Zambia',
1940
+ mobile_begin_with: ['9', '7'],
1941
+ phone_number_lengths: [9]
1942
+ },
1943
+ {
1944
+ alpha2: 'ZW',
1945
+ alpha3: 'ZWE',
1946
+ country_code: '263',
1947
+ country_name: 'Zimbabwe',
1948
+ mobile_begin_with: ['71', '73', '77', '78'],
1949
+ phone_number_lengths: [9]
1950
+ }
1951
+ ];
1952
+ return country_phone_data;
1953
+ }
1954
+
1955
+ var utility = {};
1956
+
1957
+ var hasRequiredUtility;
1958
+
1959
+ function requireUtility () {
1960
+ if (hasRequiredUtility) return utility;
1961
+ hasRequiredUtility = 1;
1962
+ var __importDefault = (utility && utility.__importDefault) || function (mod) {
1963
+ return (mod && mod.__esModule) ? mod : { "default": mod };
1964
+ };
1965
+ Object.defineProperty(utility, "__esModule", { value: true });
1966
+ utility.findCountryPhoneDataByCountry = findCountryPhoneDataByCountry;
1967
+ utility.findExactCountryPhoneData = findExactCountryPhoneData;
1968
+ utility.findPossibleCountryPhoneData = findPossibleCountryPhoneData;
1969
+ utility.findCountryPhoneDataByPhoneNumber = findCountryPhoneDataByPhoneNumber;
1970
+ utility.validatePhoneISO3166 = validatePhoneISO3166;
1971
+ const country_phone_data_1 = __importDefault(requireCountry_phone_data());
1972
+ /**
1973
+ * @param {string=} country - country code alpha 2 or 3
1974
+ * @returns {{country_code: string, alpha2: string, country_name: string, alpha3: string, mobile_begin_with, phone_number_lengths: [number]}|{country_code: string, alpha2: string, country_name: string, alpha3: string, mobile_begin_with: [string, string, string, string], phone_number_lengths: [number]}|{country_code: string, alpha2: string, country_name: string, alpha3: string, mobile_begin_with: [string], phone_number_lengths: [number]}|{country_code: string, alpha2: string, country_name: string, alpha3: string, mobile_begin_with: [string], phone_number_lengths: [number]}|{country_code: string, alpha2: string, country_name: string, alpha3: string, mobile_begin_with: [string, string], phone_number_lengths: [number]}|null}
1975
+ */
1976
+ function findCountryPhoneDataByCountry(country) {
1977
+ // if no country provided, assume it's USA
1978
+ if (!country) {
1979
+ return country_phone_data_1.default.find(countryPhoneDatum => countryPhoneDatum.alpha3 === 'USA') || null;
1980
+ }
1981
+ if (country.length === 2) {
1982
+ return country_phone_data_1.default.find(countryPhoneDatum => country.toUpperCase() === countryPhoneDatum.alpha2) || null;
1983
+ }
1984
+ if (country.length === 3) {
1985
+ return country_phone_data_1.default.find(countryPhoneDatum => country.toUpperCase() === countryPhoneDatum.alpha3) || null;
1986
+ }
1987
+ return country_phone_data_1.default.find(countryPhoneDatum => country.toUpperCase() === countryPhoneDatum.country_name.toUpperCase()) || null;
1988
+ }
1989
+ function findExactCountryPhoneData(phoneNumber, validateMobilePrefix, countryPhoneDatum) {
1990
+ // check if the phone number length match any one of the length config
1991
+ const phoneNumberLengthMatched = countryPhoneDatum.phone_number_lengths.some(length => {
1992
+ // as the phone number must include the country code,
1993
+ // but countryPhoneDatum.phone_number_lengths is the length without country code
1994
+ // therefore need to add back countryPhoneDatum.country_code.length to length
1995
+ return (countryPhoneDatum.country_code.length + length === phoneNumber.length);
1996
+ });
1997
+ if (!phoneNumberLengthMatched) {
1998
+ return null;
1999
+ }
2000
+ // if no need to validate mobile prefix or the country data does not have mobile begin with
2001
+ // pick the current one as the answer directly
2002
+ if (!countryPhoneDatum.mobile_begin_with.length || !validateMobilePrefix) {
2003
+ return countryPhoneDatum;
2004
+ }
2005
+ // if the mobile begin with is correct, pick as the correct answer
2006
+ if (countryPhoneDatum.mobile_begin_with.some(beginWith => {
2007
+ return phoneNumber.match(new RegExp('^' + countryPhoneDatum.country_code + beginWith));
2008
+ })) {
2009
+ return countryPhoneDatum;
2010
+ }
2011
+ return null;
2012
+ }
2013
+ function findPossibleCountryPhoneData(phoneNumber, validateMobilePrefix, countryPhoneDatum) {
2014
+ // check if the phone number length match any one of the length config
2015
+ const phoneNumberLengthMatched = countryPhoneDatum.phone_number_lengths.some(length => {
2016
+ // the phone number must include the country code
2017
+ // countryPhoneDatum.phone_number_lengths is the length without country code
2018
+ // + 1 is assuming there is an unwanted trunk code prepended to the phone number
2019
+ return (countryPhoneDatum.country_code.length + length + 1 === phoneNumber.length);
2020
+ });
2021
+ if (!phoneNumberLengthMatched) {
2022
+ return null;
2023
+ }
2024
+ // if no need to validate mobile prefix or the country data does not have mobile begin with
2025
+ // pick the current one as the answer directly
2026
+ if (!countryPhoneDatum.mobile_begin_with.length || !validateMobilePrefix) {
2027
+ return countryPhoneDatum;
2028
+ }
2029
+ // if the mobile begin with is correct, pick as the correct answer
2030
+ // match another \d for the unwanted trunk code prepended to the phone number
2031
+ if (countryPhoneDatum.mobile_begin_with.some(beginWith => {
2032
+ return phoneNumber.match(new RegExp('^' + countryPhoneDatum.country_code + '\\d?' + beginWith));
2033
+ })) {
2034
+ return countryPhoneDatum;
2035
+ }
2036
+ }
2037
+ /**
2038
+ * get country phone data by phone number
2039
+ * the phone number must include country code as the complete phone number includes the plus sign
2040
+ * @param phoneNumber
2041
+ * @param validateMobilePrefix
2042
+ * @returns {{exactCountryPhoneData: (*), possibleCountryPhoneData: (*)}}
2043
+ */
2044
+ function findCountryPhoneDataByPhoneNumber(phoneNumber, validateMobilePrefix) {
2045
+ let exactCountryPhoneData;
2046
+ let possibleCountryPhoneData;
2047
+ for (const countryPhoneDatum of country_phone_data_1.default) {
2048
+ // if the country code is wrong, skip directly
2049
+ if (!phoneNumber.match(new RegExp('^' + countryPhoneDatum.country_code))) {
2050
+ continue;
2051
+ }
2052
+ // process only if exact match not found yet
2053
+ if (!exactCountryPhoneData) {
2054
+ exactCountryPhoneData = findExactCountryPhoneData(phoneNumber, validateMobilePrefix, countryPhoneDatum);
2055
+ }
2056
+ if (!possibleCountryPhoneData) {
2057
+ possibleCountryPhoneData = findPossibleCountryPhoneData(phoneNumber, validateMobilePrefix, countryPhoneDatum);
2058
+ }
2059
+ }
2060
+ return {
2061
+ exactCountryPhoneData,
2062
+ possibleCountryPhoneData
2063
+ };
2064
+ }
2065
+ /**
2066
+ *
2067
+ * @param {string} phone - phone number without plus sign, with or without country calling code
2068
+ * @param {Object} countryPhoneDatum - iso 3166 data
2069
+ * @param {String} countryPhoneDatum.country_code - country calling codes
2070
+ * @param {Array} countryPhoneDatum.phone_number_lengths - all available phone number lengths for this country
2071
+ * @param {Array} countryPhoneDatum.mobile_begin_with - mobile begin with number
2072
+ * @param {boolean} validateMobilePrefix - true if we skip mobile begin with checking
2073
+ * @param {boolean} plusSign - true if the input contains a plus sign
2074
+ * @returns {*|boolean}
2075
+ */
2076
+ function validatePhoneISO3166(phone, countryPhoneDatum, validateMobilePrefix, plusSign) {
2077
+ if (!countryPhoneDatum.phone_number_lengths) {
2078
+ return false;
2079
+ }
2080
+ // remove country calling code from the phone number
2081
+ const phoneWithoutCountry = phone.replace(new RegExp('^' + countryPhoneDatum.country_code), '');
2082
+ // if the phone number have +, countryPhoneDatum detected,
2083
+ // but the phone number does not have country calling code
2084
+ // then should consider the phone number as invalid
2085
+ if (plusSign && countryPhoneDatum && phoneWithoutCountry.length === phone.length) {
2086
+ return false;
2087
+ }
2088
+ const phone_number_lengths = countryPhoneDatum.phone_number_lengths;
2089
+ const mobile_begin_with = countryPhoneDatum.mobile_begin_with;
2090
+ const isLengthValid = phone_number_lengths.some(length => phoneWithoutCountry.length === length);
2091
+ // some country doesn't have mobile_begin_with
2092
+ const isBeginWithValid = mobile_begin_with.length ?
2093
+ mobile_begin_with.some(beginWith => phoneWithoutCountry.match(new RegExp('^' + beginWith))) :
2094
+ true;
2095
+ return isLengthValid && (!validateMobilePrefix || isBeginWithValid);
2096
+ }
2097
+ return utility;
2098
+ }
2099
+
2100
+ var hasRequiredDist;
2101
+
2102
+ function requireDist () {
2103
+ if (hasRequiredDist) return dist;
2104
+ hasRequiredDist = 1;
2105
+ var __importDefault = (dist && dist.__importDefault) || function (mod) {
2106
+ return (mod && mod.__esModule) ? mod : { "default": mod };
2107
+ };
2108
+ Object.defineProperty(dist, "__esModule", { value: true });
2109
+ dist.countryPhoneData = void 0;
2110
+ dist.default = phone;
2111
+ dist.phone = phone;
2112
+ const country_phone_data_1 = __importDefault(requireCountry_phone_data());
2113
+ dist.countryPhoneData = country_phone_data_1.default;
2114
+ const utility_1 = requireUtility();
2115
+ /**
2116
+ * @typedef {Object} Option
2117
+ * @property {string=} country - country code in ISO3166 alpha 2 or 3
2118
+ * @property {boolean=} validateMobilePrefix - true to validate phone number prefix
2119
+ * @property {boolean=} strictDetection - true to disable remove truck code and detection logic
2120
+ *
2121
+ * @param {string} phoneNumber - phone number
2122
+ * @param {Option} option
2123
+ * @returns {{phoneNumber: string|null, countryIso2: string|null, countryIso3: string|null}}
2124
+ */
2125
+ function phone(phoneNumber, { country = '', validateMobilePrefix = true, strictDetection = false } = {}) {
2126
+ const invalidResult = {
2127
+ isValid: false,
2128
+ phoneNumber: null,
2129
+ countryIso2: null,
2130
+ countryIso3: null,
2131
+ countryCode: null
2132
+ };
2133
+ let processedPhoneNumber = (typeof phoneNumber !== 'string') ? '' : phoneNumber.trim();
2134
+ const processedCountry = (typeof country !== 'string') ? '' : country.trim();
2135
+ const hasPlusSign = Boolean(processedPhoneNumber.match(/^\+/));
2136
+ // remove any non-digit character, included the +
2137
+ processedPhoneNumber = processedPhoneNumber.replace(/\D/g, '');
2138
+ let foundCountryPhoneData = (0, utility_1.findCountryPhoneDataByCountry)(processedCountry);
2139
+ if (!foundCountryPhoneData) {
2140
+ return invalidResult;
2141
+ }
2142
+ let defaultCountry = false;
2143
+ // if country provided, only reformat the phone number
2144
+ if (processedCountry) {
2145
+ // remove leading 0s for all countries except 'CIV', 'COG'
2146
+ if (!['CIV', 'COG'].includes(foundCountryPhoneData.alpha3)) {
2147
+ processedPhoneNumber = processedPhoneNumber.replace(/^0+/, '');
2148
+ }
2149
+ // if input 89234567890, RUS, remove the 8
2150
+ if (foundCountryPhoneData.alpha3 === 'RUS' && processedPhoneNumber.length === 11 && processedPhoneNumber.match(/^89/) !== null) {
2151
+ processedPhoneNumber = processedPhoneNumber.replace(/^8+/, '');
2152
+ }
2153
+ // if there's no plus sign and the phone number length is one of the valid length under country phone data
2154
+ // then assume there's no country code, hence add back the country code
2155
+ if (!hasPlusSign && foundCountryPhoneData.phone_number_lengths.includes(processedPhoneNumber.length)) {
2156
+ processedPhoneNumber = `${foundCountryPhoneData.country_code}${processedPhoneNumber}`;
2157
+ }
2158
+ }
2159
+ else if (hasPlusSign) {
2160
+ // if there is a plus sign but no country provided
2161
+ // try to find the country phone data by the phone number
2162
+ const { exactCountryPhoneData, possibleCountryPhoneData } = (0, utility_1.findCountryPhoneDataByPhoneNumber)(processedPhoneNumber, validateMobilePrefix);
2163
+ if (exactCountryPhoneData) {
2164
+ foundCountryPhoneData = exactCountryPhoneData;
2165
+ }
2166
+ else if (possibleCountryPhoneData && !strictDetection) {
2167
+ // for some countries, the phone number usually includes one trunk prefix for local use
2168
+ // The UK mobile phone number ‘07911 123456’ in international format is ‘+44 7911 123456’, so without the first zero.
2169
+ // 8 (AAA) BBB-BB-BB, 0AA-BBBBBBB
2170
+ // the numbers should be omitted in international calls
2171
+ foundCountryPhoneData = possibleCountryPhoneData;
2172
+ processedPhoneNumber = foundCountryPhoneData.country_code + processedPhoneNumber.replace(new RegExp(`^${foundCountryPhoneData.country_code}\\d`), '');
2173
+ }
2174
+ else {
2175
+ foundCountryPhoneData = null;
2176
+ }
2177
+ }
2178
+ else if (foundCountryPhoneData.phone_number_lengths.indexOf(processedPhoneNumber.length) !== -1) {
2179
+ // B: no country, no plus sign --> treat it as USA
2180
+ // 1. check length if == 11, or 10, if 10, add +1, then go go D
2181
+ // no plus sign, no country is given. then it must be USA
2182
+ // iso3166 = iso3166_data[0]; already assign by the default value
2183
+ processedPhoneNumber = `1${processedPhoneNumber}`;
2184
+ defaultCountry = true;
2185
+ }
2186
+ if (!foundCountryPhoneData) {
2187
+ return invalidResult;
2188
+ }
2189
+ let validateResult = (0, utility_1.validatePhoneISO3166)(processedPhoneNumber, foundCountryPhoneData, validateMobilePrefix, hasPlusSign);
2190
+ if (validateResult) {
2191
+ return {
2192
+ isValid: true,
2193
+ phoneNumber: `+${processedPhoneNumber}`,
2194
+ countryIso2: foundCountryPhoneData.alpha2,
2195
+ countryIso3: foundCountryPhoneData.alpha3,
2196
+ countryCode: `+${foundCountryPhoneData.country_code}`
2197
+ };
2198
+ }
2199
+ if (defaultCountry) {
2200
+ // also try to validate against CAN for default country, as CAN is also start with +1
2201
+ foundCountryPhoneData = (0, utility_1.findCountryPhoneDataByCountry)('CAN');
2202
+ validateResult = (0, utility_1.validatePhoneISO3166)(processedPhoneNumber, foundCountryPhoneData, validateMobilePrefix, hasPlusSign);
2203
+ if (validateResult) {
2204
+ return {
2205
+ isValid: true,
2206
+ phoneNumber: `+${processedPhoneNumber}`,
2207
+ countryIso2: foundCountryPhoneData.alpha2,
2208
+ countryIso3: foundCountryPhoneData.alpha3,
2209
+ countryCode: `+${foundCountryPhoneData.country_code}`
2210
+ };
2211
+ }
2212
+ }
2213
+ return invalidResult;
2214
+ }
2215
+ return dist;
2216
+ }
2217
+
2218
+ var distExports = requireDist();
2219
+
2220
+ const inputPhoneNumberCss = ":host{display:inline-flex;flex-direction:column;vertical-align:top;--r-input--container--margin-top:0;--r-input--container--margin-bottom:0}:host slot{display:contents}:host ::slotted(r-select){min-width:var(--r-input-phone-number--select--min-width, 7rem);width:var(--r-input-phone-number--select--width, fit-content)}:host r-input.focused{--r-input--container--border-style:solid}:host([full-width]:not([full-width=false])){width:100%}.r-input-phone-number{margin-top:var(--r-input-phone-number--margin-top, var(--r-spacing-025, 0.25rem));margin-bottom:var(--r-input-phone-number--margin-bottom, var(--r-spacing-025, 0.25rem));width:var(--r-input-phone-number--width, 100%);display:var(--r-input-phone-number--display, inline-flex);justify-content:var(--r-input-phone-number--justify-content, center);align-items:var(--r-input-phone-number--align-items, center);gap:var(--r-input-phone-number--gap, 0)}.r-input-phone-number--label-container{display:var(--r-input-phone-number--label-container--display, flex);gap:var(--r-input-phone-number--label-container--gap, var(--r-spacing-100, 1rem));align-items:var(--r-input-phone-number--label-container--align-items, center);justify-content:var(--r-input-phone-number--label-container--align-items, space-between)}.r-input-phone-number--label-container ::slotted([slot=popover]){display:var(--r-input-phone-number--popover--display, inline-flex);height:var(--r-input-phone-number--popover--height, var(--r-spacing-150, 1.5));align-items:var(--r-input-phone-number--popover--align-items, center);justify-content:var(--r-input-phone-number--popover--justify-content, center);margin-right:var(--r-input-phone-number--popover--margin-right, -0.25rem);--r-popover--trigger--min-width:var(--r-input-phone-number--popover-trigger--min-width, var(--r-spacing-150, 1.5));--r-popover--trigger--min-height:var(--r-input-phone-number--popover--trigger--min-height, var(--r-spacing-150, 1.5))}.r-input-phone-number r-input{margin-left:-1px;flex:1}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}";
2221
+
2222
+ const InputPhoneNumber = class {
2223
+ constructor(hostRef) {
2224
+ index.registerInstance(this, hostRef);
2225
+ this.rInput = index.createEvent(this, "rInput");
2226
+ this.rChange = index.createEvent(this, "rChange");
2227
+ this.rValidate = index.createEvent(this, "rValidate");
2228
+ this.rReset = index.createEvent(this, "rReset");
2229
+ /** Specifies a name for an input for submitting within formData object. */
2230
+ this.name = 'phone-number';
2231
+ /** Label for phone input */
2232
+ this.inputLabel = 'Phone number without country code';
2233
+ /** Label for countryCode code */
2234
+ this.countryCodeLabel = 'Country code';
2235
+ this.fullPhoneNumber = '';
2236
+ this.phoneNumber = '';
2237
+ this.validityState = '';
2238
+ this.validityMessage = '';
2239
+ this.uniqueId = `r-input-phone-number-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g, '');
2240
+ /**
2241
+ * Initial attributes state
2242
+ * */
2243
+ this.initial = {};
2244
+ this.handleOnInput = (event) => {
2245
+ if (this.readonly)
2246
+ return;
2247
+ this.phoneNumber = event.target.value;
2248
+ this.fullPhoneNumber = this.phoneNumber ? this.countryCode + this.phoneNumber : '';
2249
+ const { host, phoneNumber, countryCode, value } = this;
2250
+ this.rInput.emit({ element: host, value, countryCode, phoneNumber });
2251
+ this.validateFormElement(this.nativeElement);
2252
+ };
2253
+ this.handleInputOnChange = (event) => {
2254
+ if (this.readonly)
2255
+ return;
2256
+ this.phoneNumber = event.target.value;
2257
+ this.handleValueChange();
2258
+ };
2259
+ this.handleValueChange = () => {
2260
+ if (this.readonly)
2261
+ return;
2262
+ this.fullPhoneNumber = this.phoneNumber ? this.countryCode + this.phoneNumber : '';
2263
+ const { host, phoneNumber, countryCode, value } = this;
2264
+ this.rChange.emit({ element: host, value, countryCode, phoneNumber });
2265
+ this.validateFormElement(this.nativeElement);
2266
+ };
2267
+ this.validateFormElement = (element) => {
2268
+ if (this.readonly)
2269
+ return;
2270
+ if (element === null)
2271
+ return;
2272
+ if (this.isNoValidate)
2273
+ return;
2274
+ if (this.error)
2275
+ return;
2276
+ const { validityState, validityMessage } = this.getValidityStateData();
2277
+ this.validityState = validityState;
2278
+ this.validityMessage = validityMessage;
2279
+ const isValid = this.validityState === 'valid';
2280
+ this.valid = isValid;
2281
+ this.invalid = !isValid;
2282
+ this.rValidate.emit({
2283
+ state: this.validityState,
2284
+ message: this.validityMessage
2285
+ });
2286
+ };
2287
+ this.getValidityStateData = () => {
2288
+ var _a, _b;
2289
+ let validityState = '';
2290
+ let validityMessage = '';
2291
+ if (!this.required && !((_a = this.phoneNumber) === null || _a === void 0 ? void 0 : _a.length)) {
2292
+ validityState = 'valid';
2293
+ return { validityState, validityMessage };
2294
+ }
2295
+ if (!((_b = this.phoneNumber) === null || _b === void 0 ? void 0 : _b.length)) {
2296
+ validityState = 'valueMissing';
2297
+ validityMessage = this.valueMissingMessage;
2298
+ return { validityState, validityMessage };
2299
+ }
2300
+ const isPhoneNumberValid = this.countryCode ? this.getPhoneValidationResult(this.phoneNumber, this.countryCode).isValid : false;
2301
+ if (!isPhoneNumberValid) {
2302
+ validityState = 'invalid';
2303
+ validityMessage = this.invalidPhoneNumberMessage;
2304
+ return { validityState, validityMessage };
2305
+ }
2306
+ validityState = 'valid';
2307
+ return { validityState, validityMessage };
2308
+ };
2309
+ this.onSubmitForm = (event) => {
2310
+ if (this.isNoValidate)
2311
+ return;
2312
+ this.validateFormElement(this.nativeElement);
2313
+ if (this.invalid) {
2314
+ event.preventDefault();
2315
+ event.stopPropagation();
2316
+ }
2317
+ };
2318
+ this.contributeToFormData = (event) => {
2319
+ formData.appendControlToFormData(this.nativeElement || this.host, event.formData);
2320
+ };
2321
+ this.onResetForm = () => {
2322
+ var _a;
2323
+ if (this.readonly)
2324
+ return;
2325
+ this.validityState = null;
2326
+ this.validityMessage = null;
2327
+ this.phoneNumber = '';
2328
+ this.invalid = this.initial['invalid'];
2329
+ this.valid = !this.invalid;
2330
+ (_a = this.countryCodeElement) === null || _a === void 0 ? void 0 : _a.reset();
2331
+ this.updateValues(this.initial['value']);
2332
+ const { host, value } = this;
2333
+ this.rReset.emit({ element: host, value });
2334
+ };
2335
+ }
2336
+ /** Returns the element value. */
2337
+ async getValue() {
2338
+ return this.fullPhoneNumber;
2339
+ }
2340
+ /** Set the element value. */
2341
+ async setValue(value) {
2342
+ this.updateValues(value);
2343
+ }
2344
+ /** Validates an element, displays provided message in case value is invalid. */
2345
+ async setCustomValidity(message) {
2346
+ this.customErrorMessage = message;
2347
+ this.validateFormElement(this.nativeElement);
2348
+ }
2349
+ /**
2350
+ * Validates the input phone number without triggering UI and returns a boolean indicating its validity.
2351
+ * @returns A boolean indicating whether the input phone number is valid.
2352
+ */
2353
+ async checkValidity() {
2354
+ const { validityState } = this.getValidityStateData();
2355
+ return validityState === 'valid';
2356
+ }
2357
+ /** Check validity and reveal validation state. */
2358
+ async reportValidity() {
2359
+ this.validateFormElement(this.nativeElement);
2360
+ return this.validityState === 'valid';
2361
+ }
2362
+ /** Reset phone number input to its initial state */
2363
+ async reset() {
2364
+ this.onResetForm();
2365
+ }
2366
+ watchValueChange(value) {
2367
+ this.updateValues(value);
2368
+ this.validateFormElement(this.nativeElement);
2369
+ }
2370
+ handleDisabledChange() {
2371
+ this.setCountryCodeElementAttributes({
2372
+ 'disabled': `${!!this.disabled}`
2373
+ });
2374
+ }
2375
+ handleRequiredChange() {
2376
+ this.setCountryCodeElementAttributes({
2377
+ 'required': `${!!this.required}`
2378
+ });
2379
+ }
2380
+ handleReadonlyChange() {
2381
+ this.setCountryCodeElementAttributes({
2382
+ 'readonly': `${!!this.readonly}`
2383
+ });
2384
+ }
2385
+ handleLabelChange() {
2386
+ this.setCountryCodeElementAttributes({
2387
+ 'label': this.countryCodeLabel
2388
+ });
2389
+ }
2390
+ /** Identify wrapping form element */
2391
+ get parentFormEl() {
2392
+ return this.host.closest('form') || document.querySelector(`#${this.form}`) || null;
2393
+ }
2394
+ get countryCodeElement() {
2395
+ return this.host.querySelector('r-select');
2396
+ }
2397
+ get countryCode() {
2398
+ return this.host.querySelector('r-select').value || '';
2399
+ }
2400
+ get ariaDescribedBy() {
2401
+ const describedBy = `${this.uniqueId}-message`;
2402
+ return this.hint ? `${this.uniqueId}-hint ${describedBy}` : describedBy;
2403
+ }
2404
+ get hasError() {
2405
+ var _a;
2406
+ return this.invalid && !!((_a = this.error) === null || _a === void 0 ? void 0 : _a.length);
2407
+ }
2408
+ get hasValidationError() {
2409
+ var _a, _b;
2410
+ return this.validityState && this.validityState !== 'valid' && (!!((_a = this.customErrorMessage) === null || _a === void 0 ? void 0 : _a.length) || !!((_b = this.validityMessage) === null || _b === void 0 ? void 0 : _b.length));
2411
+ }
2412
+ get hasMessage() {
2413
+ return this.hasError || this.hasValidationError;
2414
+ }
2415
+ get errorMessage() {
2416
+ return this.hasError && this.error || this.hasValidationError && this.validityMessage;
2417
+ }
2418
+ /**
2419
+ * Determine whether this element should be ignored
2420
+ * during Constraint Validation API validation.
2421
+ * */
2422
+ get isNoValidate() {
2423
+ var _a;
2424
+ return (((_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.hasAttribute('novalidate')) ||
2425
+ this.novalidate ||
2426
+ false);
2427
+ }
2428
+ updateValues(value) {
2429
+ var _a, _b;
2430
+ this.fullPhoneNumber = value || '';
2431
+ if (!value) {
2432
+ (_a = this.countryCodeElement) === null || _a === void 0 ? void 0 : _a.reset();
2433
+ this.phoneNumber = '';
2434
+ return;
2435
+ }
2436
+ if (!this.getPhoneValidationResult(value).isValid) {
2437
+ console.error('Provided phone number is not valid');
2438
+ return;
2439
+ }
2440
+ const countryCode = this.getPhoneValidationResult(value).countryCode;
2441
+ this.phoneNumber = value.replace(countryCode, '');
2442
+ (_b = this.countryCodeElement) === null || _b === void 0 ? void 0 : _b.setValue(countryCode);
2443
+ }
2444
+ setCountryCodeElementAttributes(attributes) {
2445
+ Object.entries(attributes || {}).forEach(([key, val]) => {
2446
+ var _a, _b;
2447
+ if (val === false || val === null || val === undefined) {
2448
+ (_a = this.countryCodeElement) === null || _a === void 0 ? void 0 : _a.removeAttribute(key);
2449
+ }
2450
+ else {
2451
+ (_b = this.countryCodeElement) === null || _b === void 0 ? void 0 : _b.setAttribute(key, String(val));
2452
+ }
2453
+ });
2454
+ }
2455
+ getPhoneValidationResult(phoneNumber, countryCode = '') {
2456
+ return distExports.phone(countryCode + phoneNumber, { validateMobilePrefix: false });
2457
+ }
2458
+ connectEventListeners() {
2459
+ var _a, _b, _c, _d;
2460
+ (_a = this.countryCodeElement) === null || _a === void 0 ? void 0 : _a.addEventListener('rChange', this.handleValueChange);
2461
+ (_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.addEventListener('formdata', this.contributeToFormData);
2462
+ (_c = this.parentFormEl) === null || _c === void 0 ? void 0 : _c.addEventListener('submit', this.onSubmitForm, { capture: true });
2463
+ (_d = this.parentFormEl) === null || _d === void 0 ? void 0 : _d.addEventListener('reset', this.onResetForm);
2464
+ }
2465
+ disconnectEventListeners() {
2466
+ var _a, _b, _c, _d;
2467
+ (_a = this.countryCodeElement) === null || _a === void 0 ? void 0 : _a.removeEventListener('rChange', this.handleValueChange);
2468
+ (_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.removeEventListener('formdata', this.contributeToFormData);
2469
+ (_c = this.parentFormEl) === null || _c === void 0 ? void 0 : _c.removeEventListener('submit', this.onSubmitForm);
2470
+ (_d = this.parentFormEl) === null || _d === void 0 ? void 0 : _d.removeEventListener('reset', this.onResetForm);
2471
+ }
2472
+ componentWillLoad() {
2473
+ this.initial['value'] = this.value;
2474
+ this.initial['invalid'] = this.invalid;
2475
+ this.updateValues(this.value);
2476
+ const staticAttributes = {
2477
+ 'show-leading-icon': 'true',
2478
+ 'leading-icon': 'globe',
2479
+ 'placeholder': '+00',
2480
+ 'internal': 'true'
2481
+ };
2482
+ const dynamicAttributes = {
2483
+ 'disabled': `${!!this.disabled}`,
2484
+ 'required': `${!!this.required}`,
2485
+ 'readonly': `${!!this.readonly}`,
2486
+ 'label': this.countryCodeLabel
2487
+ };
2488
+ this.setCountryCodeElementAttributes(Object.assign(Object.assign({}, staticAttributes), dynamicAttributes));
2489
+ }
2490
+ componentDidLoad() {
2491
+ this.connectEventListeners();
2492
+ }
2493
+ disconnectedCallback() {
2494
+ this.disconnectEventListeners();
2495
+ }
2496
+ render() {
2497
+ const { label, fieldIndicator, hint, name, form, inputLabel, disabled, uniqueId, required, valid, invalid, novalidate, phoneNumber, fullPhoneNumber, fullWidth } = this;
2498
+ const labelAttr = {
2499
+ fieldIndicator
2500
+ };
2501
+ const inputAttrs = {
2502
+ id: uniqueId,
2503
+ form,
2504
+ name,
2505
+ novalidate,
2506
+ required,
2507
+ disabled,
2508
+ 'aria-describedby': this.ariaDescribedBy
2509
+ };
2510
+ return (index.h(index.Host, { key: 'e5170613c08f3927d2a65cb7649cd29d27954b99' }, index.h("div", { key: '42e8954e2140be50ea42290779af01522e0e39e7', class: "r-input-phone-number--label-container" }, index.h("label", { key: '0dbd4ad0d762f97d4a2242f1dc95ba8cd9039ce0', id: `${uniqueId}-label` }, label &&
2511
+ index.h("r-label", Object.assign({ key: 'ec76421b8dad5b1ed58cb0302d7c8d32fed66735' }, labelAttr), label)), index.h("slot", { key: 'c9e8a6fb83822826f5a1f62cedb06169715dac52', name: "popover" })), hint &&
2512
+ index.h("r-hint", { key: 'c0755d106d3d01f6f6c0ab1d939337d98e014652', id: `${uniqueId}-hint`, role: "note" }, hint), index.h("div", { key: 'e32fe35fed92c7a729231164705ef6437060775e', class: "r-input-phone-number", role: "group", "aria-labelledby": `${uniqueId}-label`, "aria-describedby": this.ariaDescribedBy }, index.h("slot", { key: 'cc2d797e9f9c5b5a21d6e8a7a7d6c7edb2d2b88a' }), index.h("r-input", { key: 'c3402afa0f6f30afb61b81c947272368dfabbbcf', label: inputLabel, value: phoneNumber, internal: true, valid: valid, invalid: invalid, required: required, readonly: this.readonly, novalidate: true, fullWidth: fullWidth, type: "tel", error: this.errorMessage || '', onRInput: this.handleOnInput, onRChange: this.handleInputOnChange, disabled: disabled })), index.h("input", Object.assign({ key: 'cd814c1b35708f56a911b4d93e907f9a2fac0f1c', type: "hidden" }, inputAttrs, { readonly: this.readonly, value: fullPhoneNumber, ref: el => this.nativeElement = el })), index.h("r-hint", { key: '211661682d51d22ffe93a6e993e03a3c89cc76e2', "aria-live": "polite", "aria-atomic": "true", id: `${uniqueId}-message`, class: !this.hasMessage && 'visually-hidden', variant: "error" }, this.hasMessage ? (this.hasError ? this.error : (this.customErrorMessage || this.validityMessage)) : '')));
2513
+ }
2514
+ get host() { return index.getElement(this); }
2515
+ static get watchers() { return {
2516
+ "value": ["watchValueChange"],
2517
+ "disabled": ["handleDisabledChange"],
2518
+ "required": ["handleRequiredChange"],
2519
+ "readonly": ["handleReadonlyChange"],
2520
+ "label": ["handleLabelChange"]
2521
+ }; }
2522
+ };
2523
+ InputPhoneNumber.style = inputPhoneNumberCss;
2524
+
2525
+ exports.r_input_phone_number = InputPhoneNumber;