@dev.smartpricing/message-composer-layer 1.0.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 (169) hide show
  1. package/README.md +75 -0
  2. package/app/api/ai.ts +28 -0
  3. package/app/api/brands.ts +54 -0
  4. package/app/api/client.ts +56 -0
  5. package/app/api/compilation.ts +34 -0
  6. package/app/api/dynamicValues.ts +11 -0
  7. package/app/api/index.ts +11 -0
  8. package/app/api/languages.ts +6 -0
  9. package/app/api/media.ts +26 -0
  10. package/app/api/messageGroups.ts +49 -0
  11. package/app/api/messages.ts +22 -0
  12. package/app/api/meta.ts +18 -0
  13. package/app/api/tracking.ts +9 -0
  14. package/app/components/Brand/BrandDrawer.vue +281 -0
  15. package/app/components/Brand/BrandPreview.vue +137 -0
  16. package/app/components/Brand/Steps/BrandStepGeneral.vue +37 -0
  17. package/app/components/Brand/Steps/BrandStepSocials.vue +48 -0
  18. package/app/components/Brand/Steps/BrandStepVisual.vue +214 -0
  19. package/app/components/Common/BrandColorSwatches.vue +37 -0
  20. package/app/components/Common/ColorInput.vue +144 -0
  21. package/app/components/Common/EmojiPickerButton.vue +35 -0
  22. package/app/components/Common/FontFamilySelect.vue +39 -0
  23. package/app/components/Common/HtmlPreviewIframe.vue +68 -0
  24. package/app/components/Common/IncompleteTranslationsDialog.vue +97 -0
  25. package/app/components/Common/LanguageList.vue +356 -0
  26. package/app/components/Common/LoadingOverlay.vue +12 -0
  27. package/app/components/Common/MediaUploadOrSelect.vue +299 -0
  28. package/app/components/Common/MessagePreviewSlideover.vue +88 -0
  29. package/app/components/Common/MonacoEditor.vue +110 -0
  30. package/app/components/Common/PhoneInput.vue +804 -0
  31. package/app/components/Common/SectionHeader.vue +26 -0
  32. package/app/components/Common/TranslationActionBar.vue +139 -0
  33. package/app/components/Common/ViewLessMore.vue +40 -0
  34. package/app/components/CreateTemplateButton.vue +59 -0
  35. package/app/components/DynamicDataButton.vue +75 -0
  36. package/app/components/DynamicDataSlideover.vue +149 -0
  37. package/app/components/Editor/AiGenerateSlideover.vue +292 -0
  38. package/app/components/Editor/EditorLinkPopover.vue +154 -0
  39. package/app/components/Editor/RichTextEditor.vue +495 -0
  40. package/app/components/Email/Editor/BlockLibrary.vue +89 -0
  41. package/app/components/Email/Editor/BlockSettings.vue +60 -0
  42. package/app/components/Email/Editor/Blocks/ButtonBlock.vue +117 -0
  43. package/app/components/Email/Editor/Blocks/ButtonSettings.vue +228 -0
  44. package/app/components/Email/Editor/Blocks/DiscountCodeBlock.vue +74 -0
  45. package/app/components/Email/Editor/Blocks/DiscountCodeSettings.vue +162 -0
  46. package/app/components/Email/Editor/Blocks/DividerBlock.vue +31 -0
  47. package/app/components/Email/Editor/Blocks/DividerSettings.vue +108 -0
  48. package/app/components/Email/Editor/Blocks/FooterBlock.vue +61 -0
  49. package/app/components/Email/Editor/Blocks/FooterSettings.vue +123 -0
  50. package/app/components/Email/Editor/Blocks/GridBlock.vue +128 -0
  51. package/app/components/Email/Editor/Blocks/GridSettings.vue +109 -0
  52. package/app/components/Email/Editor/Blocks/HTMLBlock.vue +31 -0
  53. package/app/components/Email/Editor/Blocks/HTMLSettings.vue +85 -0
  54. package/app/components/Email/Editor/Blocks/HeaderBlock.vue +53 -0
  55. package/app/components/Email/Editor/Blocks/HeaderSettings.vue +113 -0
  56. package/app/components/Email/Editor/Blocks/HeadingBlock.vue +61 -0
  57. package/app/components/Email/Editor/Blocks/HeadingSettings.vue +156 -0
  58. package/app/components/Email/Editor/Blocks/ImageBlock.vue +49 -0
  59. package/app/components/Email/Editor/Blocks/ImageSettings.vue +53 -0
  60. package/app/components/Email/Editor/Blocks/IndexBlock.vue +155 -0
  61. package/app/components/Email/Editor/Blocks/ParagraphBlock.vue +61 -0
  62. package/app/components/Email/Editor/Blocks/ParagraphSettings.vue +157 -0
  63. package/app/components/Email/Editor/Blocks/SocialsBlock.vue +63 -0
  64. package/app/components/Email/Editor/Blocks/SocialsSettings.vue +117 -0
  65. package/app/components/Email/Editor/Blocks/SpacerBlock.vue +37 -0
  66. package/app/components/Email/Editor/Blocks/SpacerSettings.vue +95 -0
  67. package/app/components/Email/Editor/Blocks/TopProductsBlock.vue +47 -0
  68. package/app/components/Email/Editor/Blocks/TopProductsSettings.vue +87 -0
  69. package/app/components/Email/Editor/Blocks/UnsubscribeLinkBlock.vue +61 -0
  70. package/app/components/Email/Editor/Blocks/UnsubscribeLinkSettings.vue +123 -0
  71. package/app/components/Email/Editor/Canvas.vue +143 -0
  72. package/app/components/Email/Editor/GeneralStyleSettings.vue +125 -0
  73. package/app/components/Email/Editor/Index.vue +77 -0
  74. package/app/components/Email/Editor/LeftSidebar.vue +95 -0
  75. package/app/components/Email/InlinePreview.vue +124 -0
  76. package/app/components/Email/Preview.vue +126 -0
  77. package/app/components/Email/PreviewPanel.vue +57 -0
  78. package/app/components/Email/SendTestEmailModal.vue +121 -0
  79. package/app/components/Email/TranslationEditor.vue +198 -0
  80. package/app/components/Email/Translator/Button.vue +101 -0
  81. package/app/components/Email/Translator/Discount.vue +60 -0
  82. package/app/components/Email/Translator/Footer.vue +66 -0
  83. package/app/components/Email/Translator/Grid.vue +127 -0
  84. package/app/components/Email/Translator/Header.vue +90 -0
  85. package/app/components/Email/Translator/Heading.vue +66 -0
  86. package/app/components/Email/Translator/Image.vue +91 -0
  87. package/app/components/Email/Translator/Index.vue +138 -0
  88. package/app/components/Email/Translator/Paragraph.vue +66 -0
  89. package/app/components/Email/Translator/RawHtml.vue +64 -0
  90. package/app/components/Email/Translator/UnsubscribeLink.vue +59 -0
  91. package/app/components/TemplateList/BaseTable.vue +354 -0
  92. package/app/components/TemplateList/StatusCell.vue +67 -0
  93. package/app/components/Whatsapp/CategoryChanger.vue +63 -0
  94. package/app/components/Whatsapp/Editor/Body.vue +53 -0
  95. package/app/components/Whatsapp/Editor/Buttons.vue +341 -0
  96. package/app/components/Whatsapp/Editor/Footer.vue +70 -0
  97. package/app/components/Whatsapp/Editor/Header.vue +156 -0
  98. package/app/components/Whatsapp/Editor/Index.vue +89 -0
  99. package/app/components/Whatsapp/Editor/SyncWrapper.vue +166 -0
  100. package/app/components/Whatsapp/Preview.vue +197 -0
  101. package/app/components/Whatsapp/PreviewPanel.vue +24 -0
  102. package/app/components/Whatsapp/TranslationEditor.vue +150 -0
  103. package/app/components/Whatsapp/Translator/Body.vue +61 -0
  104. package/app/components/Whatsapp/Translator/Button.vue +209 -0
  105. package/app/components/Whatsapp/Translator/Footer.vue +56 -0
  106. package/app/components/Whatsapp/Translator/Header.vue +61 -0
  107. package/app/components/Whatsapp/Translator/HeaderMedia.vue +117 -0
  108. package/app/components/Whatsapp/Translator/Index.vue +159 -0
  109. package/app/composables/composerContext.ts +35 -0
  110. package/app/composables/useAutoTranslate.ts +242 -0
  111. package/app/composables/useAutoTranslateEmail.ts +294 -0
  112. package/app/composables/useChangeTracking.ts +212 -0
  113. package/app/composables/useChangeTrackingEmail.ts +227 -0
  114. package/app/composables/useChannels.ts +36 -0
  115. package/app/composables/useEmailBlockContext.ts +43 -0
  116. package/app/composables/useExitConfirmation.ts +39 -0
  117. package/app/composables/useGoBack.ts +15 -0
  118. package/app/composables/useIncompleteTranslations.ts +55 -0
  119. package/app/composables/useIncompleteTranslationsEmail.ts +56 -0
  120. package/app/composables/useMediaLimits.ts +42 -0
  121. package/app/composables/useTemplateFormValidation.ts +109 -0
  122. package/app/composables/useTemplateOperations.ts +147 -0
  123. package/app/composables/useTracking.ts +39 -0
  124. package/app/composables/useTranslationFilters.ts +176 -0
  125. package/app/composables/useTranslationFiltersEmail.ts +244 -0
  126. package/app/composables/useWhatsappTemplateBehaviors.ts +58 -0
  127. package/app/middleware/channel-guard.ts +13 -0
  128. package/app/pages/brands.vue +195 -0
  129. package/app/pages/images.vue +141 -0
  130. package/app/pages/index.vue +198 -0
  131. package/app/pages/preview/[id].vue +47 -0
  132. package/app/pages/template/email/[id].vue +596 -0
  133. package/app/pages/template/email/create.vue +562 -0
  134. package/app/pages/template/whatsapp/[id].vue +561 -0
  135. package/app/pages/template/whatsapp/create.vue +468 -0
  136. package/app/plugins/admin-shortcut.client.ts +7 -0
  137. package/app/plugins/tracking.client.ts +12 -0
  138. package/app/queries/ai.ts +20 -0
  139. package/app/queries/brands.ts +75 -0
  140. package/app/queries/compilation.ts +37 -0
  141. package/app/queries/dynamicValues.ts +13 -0
  142. package/app/queries/index.ts +9 -0
  143. package/app/queries/languages.ts +10 -0
  144. package/app/queries/media.ts +27 -0
  145. package/app/queries/messageGroups.ts +112 -0
  146. package/app/queries/messages.ts +42 -0
  147. package/app/queries/meta.ts +13 -0
  148. package/app/stores/adminStore.ts +50 -0
  149. package/app/stores/appContext.ts +99 -0
  150. package/app/stores/emailEditor.ts +220 -0
  151. package/app/stores/main.ts +3 -0
  152. package/app/stores/metaSubmission.ts +116 -0
  153. package/app/types/app-config.d.ts +14 -0
  154. package/app/types/hooks.d.ts +9 -0
  155. package/app/types/tracking.ts +148 -0
  156. package/app/utils/locale.ts +17 -0
  157. package/app/utils/notifyParent.ts +7 -0
  158. package/app/utils/resolveDefaultLanguage.ts +14 -0
  159. package/app/utils/socialDefaults.ts +42 -0
  160. package/app/utils/testIds.const.ts +728 -0
  161. package/app.config.ts +5 -0
  162. package/i18n/check-translations.ts +56 -0
  163. package/i18n/locales/de.ts +834 -0
  164. package/i18n/locales/en.ts +826 -0
  165. package/i18n/locales/es.ts +833 -0
  166. package/i18n/locales/fr.ts +837 -0
  167. package/i18n/locales/it.ts +831 -0
  168. package/nuxt.config.ts +65 -0
  169. package/package.json +64 -0
@@ -0,0 +1,804 @@
1
+ <script lang="ts" setup>
2
+ const PhoneCodes = {
3
+ en: {
4
+ 93: '+ 93 (Afghanistan)',
5
+ 355: '+ 355 (Albania)',
6
+ 213: '+ 213 (Algeria)',
7
+ 1684: '+ 1-684 (American Samoa)',
8
+ 376: '+ 376 (Andorra)',
9
+ 244: '+ 244 (Angola)',
10
+ 1264: '+ 1-264 (Anguilla)',
11
+ 672: '+ 672 (Antarctica)',
12
+ 1268: '+ 1-268 (Antigua and Barbuda)',
13
+ 54: '+ 54 (Argentina)',
14
+ 374: '+ 374 (Armenia)',
15
+ 297: '+ 297 (Aruba)',
16
+ 61: '+ 61 (Australia)',
17
+ 43: '+ 43 (Austria)',
18
+ 994: '+ 994 (Azerbaijan)',
19
+ 1242: '+ 1-242 (Bahamas)',
20
+ 973: '+ 973 (Bahrain)',
21
+ 880: '+ 880 (Bangladesh)',
22
+ 1246: '+ 1-246 (Barbados)',
23
+ 375: '+ 375 (Belarus)',
24
+ 32: '+ 32 (Belgium)',
25
+ 501: '+ 501 (Belize)',
26
+ 229: '+ 229 (Benin)',
27
+ 1441: '+ 1-441 (Bermuda)',
28
+ 975: '+ 975 (Bhutan)',
29
+ 591: '+ 591 (Bolivia)',
30
+ 387: '+ 387 (Bosnia and Herzegovina)',
31
+ 267: '+ 267 (Botswana)',
32
+ 55: '+ 55 (Brazil)',
33
+ 246: '+ 246 (British Indian Ocean Territory)',
34
+ 1284: '+ 1-284 (British Virgin Islands)',
35
+ 673: '+ 673 (Brunei)',
36
+ 359: '+ 359 (Bulgaria)',
37
+ 226: '+ 226 (Burkina Faso)',
38
+ 257: '+ 257 (Burundi)',
39
+ 855: '+ 855 (Cambodia)',
40
+ 237: '+ 237 (Cameroon)',
41
+ 238: '+ 238 (Cape Verde)',
42
+ 1345: '+ 1-345 (Cayman Island-s)',
43
+ 236: '+ 236 (Central African Republic)',
44
+ 235: '+ 235 (Chad)',
45
+ 56: '+ 56 (Chile)',
46
+ 86: '+ 86 (China)',
47
+ 57: '+ 57 (Colombia)',
48
+ 269: '+ 269 (Comoros)',
49
+ 242: '+ 242 (Congo - Brazzaville)',
50
+ 243: '+ 243 (Congo - Kinshasa)',
51
+ 682: '+ 682 (Cook Islands)',
52
+ 506: '+ 506 (Costa Rica)',
53
+ 385: '+ 385 (Croatia)',
54
+ 53: '+ 53 (Cuba)',
55
+ 599: '+ 599 (Curaçao)',
56
+ 357: '+ 357 (Cyprus)',
57
+ 420: '+ 420 (Czech Republic)',
58
+ 45: '+ 45 (Denmark)',
59
+ 253: '+ 253 (Djibouti)',
60
+ 1767: '+ 1-767 (Dominica)',
61
+ 1809: '+ 1-809 (Dominican Republic)',
62
+ 1829: '+ 1-829 (Dominican Republic)',
63
+ 1849: '+ 1-849 (Dominican Republic)',
64
+ 593: '+ 593 (Ecuador)',
65
+ 20: '+ 20 (Egypt)',
66
+ 503: '+ 503 (El Salvador)',
67
+ 240: '+ 240 (Equatorial Guinea)',
68
+ 291: '+ 291 (Eritrea)',
69
+ 372: '+ 372 (Estonia)',
70
+ 251: '+ 251 (Ethiopia)',
71
+ 500: '+ 500 (Falkland Islands)',
72
+ 298: '+ 298 (Faroe Islands)',
73
+ 679: '+ 679 (Fiji)',
74
+ 358: '+ 358 (Finland)',
75
+ 33: '+ 33 (France)',
76
+ 594: '+ 594 (French Guiana)',
77
+ 689: '+ 689 (French Polynesia)',
78
+ 262: '+ 262 (French Southern Territories)',
79
+ 241: '+ 241 (Gabon)',
80
+ 220: '+ 220 (Gambia)',
81
+ 995: '+ 995 (Georgia)',
82
+ 49: '+ 49 (Germany)',
83
+ 233: '+ 233 (Ghana)',
84
+ 350: '+ 350 (Gibraltar)',
85
+ 30: '+ 30 (Greece)',
86
+ 299: '+ 299 (Greenland)',
87
+ 1473: '+ 1-473 (Grenada)',
88
+ 590: '+ 590 (Guadeloupe)',
89
+ 1671: '+ 1-671 (Guam)',
90
+ 502: '+ 502 (Guatemala)',
91
+ 224: '+ 224 (Guinea)',
92
+ 245: '+ 245 (Guinea-Bissau)',
93
+ 592: '+ 592 (Guyana)',
94
+ 509: '+ 509 (Haiti)',
95
+ 504: '+ 504 (Honduras)',
96
+ 852: '+ 852 (Hong Kong SAR China)',
97
+ 36: '+ 36 (Hungary)',
98
+ 354: '+ 354 (Iceland)',
99
+ 91: '+ 91 (India)',
100
+ 62: '+ 62 (Indonesia)',
101
+ 98: '+ 98 (Iran)',
102
+ 964: '+ 964 (Iraq)',
103
+ 353: '+ 353 (Ireland)',
104
+ 972: '+ 972 (Israel)',
105
+ 39: '+ 39 (Italy)',
106
+ 1876: '+ 1-876 (Jamaica)',
107
+ 81: '+ 81 (Japan)',
108
+ 962: '+ 962 (Jordan)',
109
+ 254: '+ 254 (Kenya)',
110
+ 686: '+ 686 (Kiribati)',
111
+ 383: '+ 383 (Kosovo)',
112
+ 965: '+ 965 (Kuwait)',
113
+ 996: '+ 996 (Kyrgyzstan)',
114
+ 856: '+ 856 (Laos)',
115
+ 371: '+ 371 (Latvia)',
116
+ 961: '+ 961 (Lebanon)',
117
+ 266: '+ 266 (Lesotho)',
118
+ 231: '+ 231 (Liberia)',
119
+ 218: '+ 218 (Libya)',
120
+ 423: '+ 423 (Liechtenstein)',
121
+ 370: '+ 370 (Lithuania)',
122
+ 352: '+ 352 (Luxembourg)',
123
+ 853: '+ 853 (Macao SAR China)',
124
+ 389: '+ 389 (Macedonia)',
125
+ 261: '+ 261 (Madagascar)',
126
+ 265: '+ 265 (Malawi)',
127
+ 60: '+ 60 (Malaysia)',
128
+ 960: '+ 960 (Maldives)',
129
+ 223: '+ 223 (Mali)',
130
+ 356: '+ 356 (Malta)',
131
+ 692: '+ 692 (Marshall Islands)',
132
+ 596: '+ 596 (Martinique)',
133
+ 222: '+ 222 (Mauritania)',
134
+ 230: '+ 230 (Mauritius)',
135
+ 52: '+ 52 (Mexico)',
136
+ 691: '+ 691 (Micronesia)',
137
+ 373: '+ 373 (Moldova)',
138
+ 377: '+ 377 (Monaco)',
139
+ 976: '+ 976 (Mongolia)',
140
+ 382: '+ 382 (Montenegro)',
141
+ 1664: '+ 1-664 (Montserrat)',
142
+ 212: '+ 212 (Morocco)',
143
+ 258: '+ 258 (Mozambique)',
144
+ 95: '+ 95 (Myanmar [Burma])',
145
+ 264: '+ 264 (Namibia)',
146
+ 674: '+ 674 (Nauru)',
147
+ 977: '+ 977 (Nepal)',
148
+ 31: '+ 31 (Netherlands)',
149
+ 687: '+ 687 (New Caledonia)',
150
+ 64: '+ 64 (New Zealand)',
151
+ 505: '+ 505 (Nicaragua)',
152
+ 227: '+ 227 (Niger)',
153
+ 234: '+ 234 (Nigeria)',
154
+ 683: '+ 683 (Niue)',
155
+ 850: '+ 850 (North Korea)',
156
+ 1670: '+ 1-670 (Northern Mariana Islands)',
157
+ 47: '+ 47 (Norway)',
158
+ 968: '+ 968 (Oman)',
159
+ 92: '+ 92 (Pakistan)',
160
+ 680: '+ 680 (Palau)',
161
+ 970: '+ 970 (Palestinian Territories)',
162
+ 507: '+ 507 (Panama)',
163
+ 675: '+ 675 (Papua New Guinea)',
164
+ 595: '+ 595 (Paraguay)',
165
+ 51: '+ 51 (Peru)',
166
+ 63: '+ 63 (Philippines)',
167
+ 870: '+ 870 (Pitcairn Islands)',
168
+ 48: '+ 48 (Poland)',
169
+ 351: '+ 351 (Portugal)',
170
+ 1787: '+ 1-787 (Puerto Rico)',
171
+ 1939: '+ 1-939 (Puerto Rico)',
172
+ 974: '+ 974 (Qatar)',
173
+ 40: '+ 40 (Romania)',
174
+ 7: '+ 7 (Russia)',
175
+ 250: '+ 250 (Rwanda)',
176
+ 685: '+ 685 (Samoa)',
177
+ 378: '+ 378 (San Marino)',
178
+ 239: '+ 239 (São Tomé and Príncipe)',
179
+ 966: '+ 966 (Saudi Arabia)',
180
+ 221: '+ 221 (Senegal)',
181
+ 381: '+ 381 (Serbia)',
182
+ 248: '+ 248 (Seychelles)',
183
+ 232: '+ 232 (Sierra Leone)',
184
+ 65: '+ 65 (Singapore)',
185
+ 1721: '+ 1-721 (Sint Maarten)',
186
+ 421: '+ 421 (Slovakia)',
187
+ 386: '+ 386 (Slovenia)',
188
+ 677: '+ 677 (Solomon Islands)',
189
+ 252: '+ 252 (Somalia)',
190
+ 27: '+ 27 (South Africa)',
191
+ 82: '+ 82 (South Korea)',
192
+ 211: '+ 211 (South Sudan)',
193
+ 34: '+ 34 (Spain)',
194
+ 94: '+ 94 (Sri Lanka)',
195
+ 290: '+ 290 (St. Helena)',
196
+ 1869: '+ 1-869 (St. Kitts and Nevis)',
197
+ 1758: '+ 1-758 (St. Lucia)',
198
+ 508: '+ 508 (St. Pierre and Miquelon)',
199
+ 1784: '+ 1-784 (St. Vincent and the Grenadines)',
200
+ 249: '+ 249 (Sudan)',
201
+ 597: '+ 597 (Suriname)',
202
+ 268: '+ 268 (Swaziland)',
203
+ 46: '+ 46 (Sweden)',
204
+ 41: '+ 41 (Switzerland)',
205
+ 963: '+ 963 (Syria)',
206
+ 886: '+ 886 (Taiwan)',
207
+ 992: '+ 992 (Tajikistan)',
208
+ 255: '+ 255 (Tanzania)',
209
+ 66: '+ 66 (Thailand)',
210
+ 670: '+ 670 (Timor-Leste)',
211
+ 228: '+ 228 (Togo)',
212
+ 690: '+ 690 (Tokelau)',
213
+ 676: '+ 676 (Tonga)',
214
+ 1868: '+ 1-868 (Trinidad and Tobago)',
215
+ 216: '+ 216 (Tunisia)',
216
+ 90: '+ 90 (Turkey)',
217
+ 993: '+ 993 (Turkmenistan)',
218
+ 1649: '+ 1-649 (Turks and Caicos Islands)',
219
+ 688: '+ 688 (Tuvalu)',
220
+ 256: '+ 256 (Uganda)',
221
+ 380: '+ 380 (Ukraine)',
222
+ 971: '+ 971 (United Arab Emirates)',
223
+ 44: '+ 44 (United Kingdom)',
224
+ 1: '+ 1 (United States)',
225
+ 598: '+ 598 (Uruguay)',
226
+ 998: '+ 998 (Uzbekistan)',
227
+ 678: '+ 678 (Vanuatu)',
228
+ 58: '+ 58 (Venezuela)',
229
+ 84: '+ 84 (Vietnam)',
230
+ 681: '+ 681 (Wallis and Futuna)',
231
+ 967: '+ 967 (Yemen)',
232
+ 260: '+ 260 (Zambia)',
233
+ 263: '+ 263 (Zimbabwe)',
234
+ },
235
+ it: {
236
+ 93: '+ 93 (Afghanistan)',
237
+ 355: '+ 355 (Albania)',
238
+ 213: '+ 213 (Algeria)',
239
+ 1684: '+ 1-684 (Samoa Americane)',
240
+ 376: '+ 376 (Andorra)',
241
+ 244: '+ 244 (Angola)',
242
+ 1264: '+ 1-264 (Anguilla)',
243
+ 672: '+ 672 (Antartide)',
244
+ 1268: '+ 1-268 (Antigua e Barbuda)',
245
+ 54: '+ 54 (Argentina)',
246
+ 374: '+ 374 (Armenia)',
247
+ 297: '+ 297 (Aruba)',
248
+ 61: '+ 61 (Australia)',
249
+ 43: '+ 43 (Austria)',
250
+ 994: '+ 994 (Azerbaijan)',
251
+ 1242: '+ 1-242 (Bahamas)',
252
+ 973: '+ 973 (Bahrein)',
253
+ 880: '+ 880 (Bangladesh)',
254
+ 1246: '+ 1-246 (Barbados)',
255
+ 375: '+ 375 (Bielorussia)',
256
+ 32: '+ 32 (Belgio)',
257
+ 501: '+ 501 (Belize)',
258
+ 229: '+ 229 (Benin)',
259
+ 1441: '+ 1-441 (Bermuda)',
260
+ 975: '+ 975 (Bhutan)',
261
+ 591: '+ 591 (Bolivia)',
262
+ 387: '+ 387 (Bosnia ed Erzegovina)',
263
+ 267: '+ 267 (Botswana)',
264
+ 55: '+ 55 (Brasile)',
265
+ 246: "🇮🇴 246 (Territorio Britannico dell'Oceano Indiano)",
266
+ 1284: '+ 1-284 (Isole Vergini Britanniche)',
267
+ 673: '+ 673 (Brunei)',
268
+ 359: '+ 359 (Bulgaria)',
269
+ 226: '+ 226 (Burkina Faso)',
270
+ 257: '+ 257 (Burundi)',
271
+ 855: '+ 855 (Cambogia)',
272
+ 237: '+ 237 (Camerun)',
273
+ 238: '+ 238 (Capo Verde)',
274
+ 1345: '+ 1-345 (Isole Cayman)',
275
+ 236: '+ 236 (Repubblica Centrafricana)',
276
+ 235: '+ 235 (Ciad)',
277
+ 56: '+ 56 (Cile)',
278
+ 86: '+ 86 (Cina)',
279
+ 57: '+ 57 (Colombia)',
280
+ 269: '+ 269 (Comore)',
281
+ 242: '+ 242 (Congo - Brazzaville)',
282
+ 243: '+ 243 (Congo - Kinshasa)',
283
+ 682: '+ 682 (Isole Cook)',
284
+ 506: '+ 506 (Costa Rica)',
285
+ 385: '+ 385 (Croazia)',
286
+ 53: '+ 53 (Cuba)',
287
+ 599: '+ 599 (Curaçao)',
288
+ 357: '+ 357 (Cipro)',
289
+ 420: '+ 420 (Repubblica Ceca)',
290
+ 45: '+ 45 (Danimarca)',
291
+ 253: '+ 253 (Gibuti)',
292
+ 1767: '+ 1-767 (Dominica)',
293
+ 1809: '+ 1-809 (Repubblica Dominicana)',
294
+ 1829: '+ 1-829 (Repubblica Dominicana)',
295
+ 1849: '+ 1-849 (Repubblica Dominicana)',
296
+ 593: '+ 593 (Ecuador)',
297
+ 20: '+ 20 (Egitto)',
298
+ 503: '+ 503 (El Salvador)',
299
+ 240: '+ 240 (Guinea Equatoriale)',
300
+ 291: '+ 291 (Eritrea)',
301
+ 372: '+ 372 (Estonia)',
302
+ 251: '+ 251 (Etiopia)',
303
+ 500: '+ 500 (Isole Falkland)',
304
+ 298: '+ 298 (Isole Faroe)',
305
+ 679: '+ 679 (Figi)',
306
+ 358: '+ 358 (Finlandia)',
307
+ 33: '+ 33 (Francia)',
308
+ 594: '+ 594 (Guyana Francese)',
309
+ 689: '+ 689 (Polinesia Francese)',
310
+ 262: '+ 262 (Territori Francesi del Sud)',
311
+ 241: '+ 241 (Gabon)',
312
+ 220: '+ 220 (Gambia)',
313
+ 995: '+ 995 (Georgia)',
314
+ 49: '+ 49 (Germania)',
315
+ 233: '+ 233 (Ghana)',
316
+ 350: '+ 350 (Gibilterra)',
317
+ 30: '+ 30 (Grecia)',
318
+ 299: '+ 299 (Groenlandia)',
319
+ 1473: '+ 1-473 (Grenada)',
320
+ 590: '+ 590 (Guadalupa)',
321
+ 1671: '+ 1-671 (Guam)',
322
+ 502: '+ 502 (Guatemala)',
323
+ 224: '+ 224 (Guinea)',
324
+ 245: '+ 245 (Guinea-Bissau)',
325
+ 592: '+ 592 (Guyana)',
326
+ 509: '+ 509 (Haiti)',
327
+ 504: '+ 504 (Honduras)',
328
+ 852: '+ 852 (Hong Kong)',
329
+ 36: '+ 36 (Ungheria)',
330
+ 354: '+ 354 (Islanda)',
331
+ 91: '+ 91 (India)',
332
+ 62: '+ 62 (Indonesia)',
333
+ 98: '+ 98 (Iran)',
334
+ 964: '+ 964 (Iraq)',
335
+ 353: '+ 353 (Irlanda)',
336
+ 972: '+ 972 (Israele)',
337
+ 39: '+ 39 (Italia)',
338
+ 1876: '+ 1-876 (Giamaica)',
339
+ 81: '+ 81 (Giappone)',
340
+ 962: '+ 962 (Giordania)',
341
+ 254: '+ 254 (Kenya)',
342
+ 686: '+ 686 (Kiribati)',
343
+ 383: '+ 383 (Kosovo)',
344
+ 965: '+ 965 (Kuwait)',
345
+ 996: '+ 996 (Kirghizistan)',
346
+ 856: '+ 856 (Laos)',
347
+ 371: '+ 371 (Lettonia)',
348
+ 961: '+ 961 (Libano)',
349
+ 266: '+ 266 (Lesotho)',
350
+ 231: '+ 231 (Liberia)',
351
+ 218: '+ 218 (Libia)',
352
+ 423: '+ 423 (Liechtenstein)',
353
+ 370: '+ 370 (Lituania)',
354
+ 352: '+ 352 (Lussemburgo)',
355
+ 853: '+ 853 (Macao)',
356
+ 389: '+ 389 (Macedonia del Nord)',
357
+ 261: '+ 261 (Madagascar)',
358
+ 265: '+ 265 (Malawi)',
359
+ 60: '+ 60 (Malaysia)',
360
+ 960: '+ 960 (Maldive)',
361
+ 223: '+ 223 (Mali)',
362
+ 356: '+ 356 (Malta)',
363
+ 692: '+ 692 (Isole Marshall)',
364
+ 596: '+ 596 (Martinica)',
365
+ 222: '+ 222 (Mauritania)',
366
+ 230: '+ 230 (Mauritius)',
367
+ 52: '+ 52 (Messico)',
368
+ 691: '+ 691 (Micronesia)',
369
+ 373: '+ 373 (Moldavia)',
370
+ 377: '+ 377 (Monaco)',
371
+ 976: '+ 976 (Mongolia)',
372
+ 382: '+ 382 (Montenegro)',
373
+ 1664: '+ 1-664 (Montserrat)',
374
+ 212: '+ 212 (Marocco)',
375
+ 258: '+ 258 (Mozambico)',
376
+ 95: '+ 95 (Myanmar [Birmania])',
377
+ 264: '+ 264 (Namibia)',
378
+ 674: '+ 674 (Nauru)',
379
+ 977: '+ 977 (Nepal)',
380
+ 31: '+ 31 (Paesi Bassi)',
381
+ 687: '+ 687 (Nuova Caledonia)',
382
+ 64: '+ 64 (Nuova Zelanda)',
383
+ 505: '+ 505 (Nicaragua)',
384
+ 227: '+ 227 (Niger)',
385
+ 234: '+ 234 (Nigeria)',
386
+ 683: '+ 683 (Niue)',
387
+ 850: '+ 850 (Corea del Nord)',
388
+ 1670: '+ 1-670 (Isole Marianne Settentrionali)',
389
+ 47: '+ 47 (Norvegia)',
390
+ 968: '+ 968 (Oman)',
391
+ 92: '+ 92 (Pakistan)',
392
+ 680: '+ 680 (Palau)',
393
+ 970: '+ 970 (Territori Palestinesi)',
394
+ 507: '+ 507 (Panama)',
395
+ 675: '+ 675 (Papua Nuova Guinea)',
396
+ 595: '+ 595 (Paraguay)',
397
+ 51: '+ 51 (Perù)',
398
+ 63: '+ 63 (Filippine)',
399
+ 870: '+ 870 (Isole Pitcairn)',
400
+ 48: '+ 48 (Polonia)',
401
+ 351: '+ 351 (Portogallo)',
402
+ 1787: '+ 1-787 (Porto Rico)',
403
+ 1939: '+ 1-939 (Porto Rico)',
404
+ 974: '+ 974 (Qatar)',
405
+ 40: '+ 40 (Romania)',
406
+ 7: '+ 7 (Russia)',
407
+ 250: '+ 250 (Ruanda)',
408
+ 685: '+ 685 (Samoa)',
409
+ 378: '+ 378 (San Marino)',
410
+ 239: '+ 239 (São Tomé e Príncipe)',
411
+ 966: '+ 966 (Arabia Saudita)',
412
+ 221: '+ 221 (Senegal)',
413
+ 381: '+ 381 (Serbia)',
414
+ 248: '+ 248 (Seychelles)',
415
+ 232: '+ 232 (Sierra Leone)',
416
+ 65: '+ 65 (Singapore)',
417
+ 1721: '+ 1-721 (Sint Maarten)',
418
+ 421: '+ 421 (Slovacchia)',
419
+ 386: '+ 386 (Slovenia)',
420
+ 677: '+ 677 (Isole Salomone)',
421
+ 252: '+ 252 (Somalia)',
422
+ 27: '+ 27 (Sudafrica)',
423
+ 82: '+ 82 (Corea del Sud)',
424
+ 211: '+ 211 (Sudan del Sud)',
425
+ 34: '+ 34 (Spagna)',
426
+ 94: '+ 94 (Sri Lanka)',
427
+ 290: '+ 290 (Sant’Elena)',
428
+ 1869: '+ 1-869 (Saint Kitts e Nevis)',
429
+ 1758: '+ 1-758 (Saint Lucia)',
430
+ 508: '+ 508 (Saint Pierre e Miquelon)',
431
+ 1784: '+ 1-784 (Saint Vincent e Grenadine)',
432
+ 249: '+ 249 (Sudan)',
433
+ 597: '+ 597 (Suriname)',
434
+ 268: '+ 268 (Swaziland)',
435
+ 46: '+ 46 (Svezia)',
436
+ 41: '+ 41 (Svizzera)',
437
+ 963: '+ 963 (Siria)',
438
+ 886: '+ 886 (Taiwan)',
439
+ 992: '+ 992 (Tagikistan)',
440
+ 255: '+ 255 (Tanzania)',
441
+ 66: '+ 66 (Thailandia)',
442
+ 670: '+ 670 (Timor Est)',
443
+ 228: '+ 228 (Togo)',
444
+ 690: '+ 690 (Tokelau)',
445
+ 676: '+ 676 (Tonga)',
446
+ 1868: '+ 1-868 (Trinidad e Tobago)',
447
+ 216: '+ 216 (Tunisia)',
448
+ 90: '+ 90 (Turchia)',
449
+ 993: '+ 993 (Turkmenistan)',
450
+ 1649: '+ 1-649 (Isole Turks e Caicos)',
451
+ 688: '+ 688 (Tuvalu)',
452
+ 256: '+ 256 (Uganda)',
453
+ 380: '+ 380 (Ucraina)',
454
+ 971: '+ 971 (Emirati Arabi Uniti)',
455
+ 44: '+ 44 (Regno Unito)',
456
+ 1: '+ 1 (Stati Uniti)',
457
+ 598: '+ 598 (Uruguay)',
458
+ 998: '+ 998 (Uzbekistan)',
459
+ 678: '+ 678 (Vanuatu)',
460
+ 58: '+ 58 (Venezuela)',
461
+ 84: '+ 84 (Vietnam)',
462
+ 681: '+ 681 (Wallis e Futuna)',
463
+ 967: '+ 967 (Yemen)',
464
+ 260: '+ 260 (Zambia)',
465
+ 263: '+ 263 (Zimbabwe)',
466
+ },
467
+ de: {
468
+ 93: '+ 93 (Afghanistan)',
469
+ 355: '+ 355 (Albanien)',
470
+ 213: '+ 213 (Algerien)',
471
+ 1684: '+ 1-684 (Amerikanisch-Samoa)',
472
+ 376: '+ 376 (Andorra)',
473
+ 244: '+ 244 (Angola)',
474
+ 1264: '+ 1-264 (Anguilla)',
475
+ 672: '+ 672 (Antarktis)',
476
+ 1268: '+ 1-268 (Antigua und Barbuda)',
477
+ 54: '+ 54 (Argentinien)',
478
+ 374: '+ 374 (Armenien)',
479
+ 297: '+ 297 (Aruba)',
480
+ 61: '+ 61 (Australien)',
481
+ 43: '+ 43 (Österreich)',
482
+ 994: '+ 994 (Aserbaidschan)',
483
+ 1242: '+ 1-242 (Bahamas)',
484
+ 973: '+ 973 (Bahrain)',
485
+ 880: '+ 880 (Bangladesch)',
486
+ 1246: '+ 1-246 (Barbados)',
487
+ 375: '+ 375 (Weißrussland)',
488
+ 32: '+ 32 (Belgien)',
489
+ 501: '+ 501 (Belize)',
490
+ 229: '+ 229 (Benin)',
491
+ 1441: '+ 1-441 (Bermuda)',
492
+ 975: '+ 975 (Bhutan)',
493
+ 591: '+ 591 (Bolivien)',
494
+ 387: '+ 387 (Bosnien und Herzegowina)',
495
+ 267: '+ 267 (Botswana)',
496
+ 55: '+ 55 (Brasilien)',
497
+ 246: '+ 246 (Britisches Territorium im Indischen Ozean)',
498
+ 1284: '+ 1-284 (Britische Jungferninseln)',
499
+ 673: '+ 673 (Brunei)',
500
+ 359: '+ 359 (Bulgarien)',
501
+ 226: '+ 226 (Burkina Faso)',
502
+ 257: '+ 257 (Burundi)',
503
+ 855: '+ 855 (Kambodscha)',
504
+ 237: '+ 237 (Kamerun)',
505
+ 238: '+ 238 (Kap Verde)',
506
+ 1345: '+ 1-345 (Kaimaninseln)',
507
+ 236: '+ 236 (Zentralafrikanische Republik)',
508
+ 235: '+ 235 (Tschad)',
509
+ 56: '+ 56 (Chile)',
510
+ 86: '+ 86 (China)',
511
+ 57: '+ 57 (Kolumbien)',
512
+ 269: '+ 269 (Komoren)',
513
+ 242: '+ 242 (Kongo-Brazzaville)',
514
+ 243: '+ 243 (Kongo-Kinshasa)',
515
+ 682: '+ 682 (Cookinseln)',
516
+ 506: '+ 506 (Costa Rica)',
517
+ 385: '+ 385 (Kroatien)',
518
+ 53: '+ 53 (Kuba)',
519
+ 599: '+ 599 (Curaçao)',
520
+ 357: '+ 357 (Zypern)',
521
+ 420: '+ 420 (Tschechien)',
522
+ 45: '+ 45 (Dänemark)',
523
+ 253: '+ 253 (Dschibuti)',
524
+ 1767: '+ 1-767 (Dominica)',
525
+ 1809: '+ 1-809 (Dominikanische Republik)',
526
+ 1829: '+ 1-829 (Dominikanische Republik)',
527
+ 1849: '+ 1-849 (Dominikanische Republik)',
528
+ 593: '+ 593 (Ecuador)',
529
+ 20: '+ 20 (Ägypten)',
530
+ 503: '+ 503 (El Salvador)',
531
+ 240: '+ 240 (Äquatorialguinea)',
532
+ 291: '+ 291 (Eritrea)',
533
+ 372: '+ 372 (Estland)',
534
+ 251: '+ 251 (Äthiopien)',
535
+ 500: '+ 500 (Falklandinseln)',
536
+ 298: '+ 298 (Färöer)',
537
+ 679: '+ 679 (Fidschi)',
538
+ 358: '+ 358 (Finnland)',
539
+ 33: '+ 33 (Frankreich)',
540
+ 594: '+ 594 (Französisch-Guayana)',
541
+ 689: '+ 689 (Französisch-Polynesien)',
542
+ 262: '+ 262 (Französische Süd- und Antarktisgebiete)',
543
+ 241: '+ 241 (Gabun)',
544
+ 220: '+ 220 (Gambia)',
545
+ 995: '+ 995 (Georgien)',
546
+ 49: '+ 49 (Deutschland)',
547
+ 233: '+ 233 (Ghana)',
548
+ 350: '+ 350 (Gibraltar)',
549
+ 30: '+ 30 (Griechenland)',
550
+ 299: '+ 299 (Grönland)',
551
+ 1473: '+ 1-473 (Grenada)',
552
+ 590: '+ 590 (Guadeloupe)',
553
+ 1671: '+ 1-671 (Guam)',
554
+ 502: '+ 502 (Guatemala)',
555
+ 224: '+ 224 (Guinea)',
556
+ 245: '+ 245 (Guinea-Bissau)',
557
+ 592: '+ 592 (Guyana)',
558
+ 509: '+ 509 (Haiti)',
559
+ 504: '+ 504 (Honduras)',
560
+ 852: '+ 852 (Sonderverwaltungszone Hongkong)',
561
+ 36: '+ 36 (Ungarn)',
562
+ 354: '+ 354 (Island)',
563
+ 91: '+ 91 (Indien)',
564
+ 62: '+ 62 (Indonesien)',
565
+ 98: '+ 98 (Iran)',
566
+ 964: '+ 964 (Irak)',
567
+ 353: '+ 353 (Irland)',
568
+ 972: '+ 972 (Israel)',
569
+ 39: '+ 39 (Italien)',
570
+ 1876: '+ 1-876 (Jamaika)',
571
+ 81: '+ 81 (Japan)',
572
+ 962: '+ 962 (Jordanien)',
573
+ 254: '+ 254 (Kenia)',
574
+ 686: '+ 686 (Kiribati)',
575
+ 383: '+ 383 (Kosovo)',
576
+ 965: '+ 965 (Kuwait)',
577
+ 996: '+ 996 (Kirgisistan)',
578
+ 856: '+ 856 (Laos)',
579
+ 371: '+ 371 (Lettland)',
580
+ 961: '+ 961 (Libanon)',
581
+ 266: '+ 266 (Lesotho)',
582
+ 231: '+ 231 (Liberia)',
583
+ 218: '+ 218 (Libyen)',
584
+ 423: '+ 423 (Liechtenstein)',
585
+ 370: '+ 370 (Litauen)',
586
+ 352: '+ 352 (Luxemburg)',
587
+ 853: '+ 853 (Sonderverwaltungsregion Macau)',
588
+ 389: '+ 389 (Nordmazedonien)',
589
+ 261: '+ 261 (Madagaskar)',
590
+ 265: '+ 265 (Malawi)',
591
+ 60: '+ 60 (Malaysia)',
592
+ 960: '+ 960 (Malediven)',
593
+ 223: '+ 223 (Mali)',
594
+ 356: '+ 356 (Malta)',
595
+ 692: '+ 692 (Marshallinseln)',
596
+ 596: '+ 596 (Martinique)',
597
+ 222: '+ 222 (Mauretanien)',
598
+ 230: '+ 230 (Mauritius)',
599
+ 52: '+ 52 (Mexiko)',
600
+ 691: '+ 691 (Mikronesien)',
601
+ 373: '+ 373 (Moldau)',
602
+ 377: '+ 377 (Monaco)',
603
+ 976: '+ 976 (Mongolei)',
604
+ 382: '+ 382 (Montenegro)',
605
+ 1664: '+ 1-664 (Montserrat)',
606
+ 212: '+ 212 (Marokko)',
607
+ 258: '+ 258 (Mosambik)',
608
+ 95: '+ 95 (Myanmar [Burma])',
609
+ 264: '+ 264 (Namibia)',
610
+ 674: '+ 674 (Nauru)',
611
+ 977: '+ 977 (Nepal)',
612
+ 31: '+ 31 (Niederlande)',
613
+ 687: '+ 687 (Neukaledonien)',
614
+ 64: '+ 64 (Neuseeland)',
615
+ 505: '+ 505 (Nicaragua)',
616
+ 227: '+ 227 (Niger)',
617
+ 234: '+ 234 (Nigeria)',
618
+ 683: '+ 683 (Niue)',
619
+ 850: '+ 850 (Nordkorea)',
620
+ 1670: '+ 1-670 (Nördliche Marianen)',
621
+ 47: '+ 47 (Norwegen)',
622
+ 968: '+ 968 (Oman)',
623
+ 92: '+ 92 (Pakistan)',
624
+ 680: '+ 680 (Palau)',
625
+ 970: '+ 970 (Palästinensische Autonomiegebiete)',
626
+ 507: '+ 507 (Panama)',
627
+ 675: '+ 675 (Papua-Neuguinea)',
628
+ 595: '+ 595 (Paraguay)',
629
+ 51: '+ 51 (Peru)',
630
+ 63: '+ 63 (Philippinen)',
631
+ 870: '+ 870 (Pitcairninseln)',
632
+ 48: '+ 48 (Polen)',
633
+ 351: '+ 351 (Portugal)',
634
+ 1787: '+ 1-787 (Puerto Rico)',
635
+ 1939: '+ 1-939 (Puerto Rico)',
636
+ 974: '+ 974 (Katar)',
637
+ 40: '+ 40 (Rumänien)',
638
+ 7: '+ 7 (Russland)',
639
+ 250: '+ 250 (Ruanda)',
640
+ 685: '+ 685 (Samoa)',
641
+ 378: '+ 378 (San Marino)',
642
+ 239: '+ 239 (São Tomé und Príncipe)',
643
+ 966: '+ 966 (Saudi-Arabien)',
644
+ 221: '+ 221 (Senegal)',
645
+ 381: '+ 381 (Serbien)',
646
+ 248: '+ 248 (Seychellen)',
647
+ 232: '+ 232 (Sierra Leone)',
648
+ 65: '+ 65 (Singapur)',
649
+ 1721: '+ 1-721 (Sint Maarten)',
650
+ 421: '+ 421 (Slowakei)',
651
+ 386: '+ 386 (Slowenien)',
652
+ 677: '+ 677 (Salomonen)',
653
+ 252: '+ 252 (Somalia)',
654
+ 27: '+ 27 (Südafrika)',
655
+ 82: '+ 82 (Südkorea)',
656
+ 211: '+ 211 (Südsudan)',
657
+ 34: '+ 34 (Spanien)',
658
+ 94: '+ 94 (Sri Lanka)',
659
+ 290: '+ 290 (St. Helena)',
660
+ 1869: '+ 1-869 (St. Kitts und Nevis)',
661
+ 1758: '+ 1-758 (St. Lucia)',
662
+ 508: '+ 508 (St. Pierre und Miquelon)',
663
+ 1784: '+ 1-784 (St. Vincent und die Grenadinen)',
664
+ 249: '+ 249 (Sudan)',
665
+ 597: '+ 597 (Suriname)',
666
+ 268: '+ 268 (Swasiland)',
667
+ 46: '+ 46 (Schweden)',
668
+ 41: '+ 41 (Schweiz)',
669
+ 963: '+ 963 (Syrien)',
670
+ 886: '+ 886 (Taiwan)',
671
+ 992: '+ 992 (Tadschikistan)',
672
+ 255: '+ 255 (Tansania)',
673
+ 66: '+ 66 (Thailand)',
674
+ 670: '+ 670 (Osttimor)',
675
+ 228: '+ 228 (Togo)',
676
+ 690: '+ 690 (Tokelau)',
677
+ 676: '+ 676 (Tonga)',
678
+ 1868: '+ 1-868 (Trinidad und Tobago)',
679
+ 216: '+ 216 (Tunesien)',
680
+ 90: '+ 90 (Türkei)',
681
+ 993: '+ 993 (Turkmenistan)',
682
+ 1649: '+ 1-649 (Turks- und Caicosinseln)',
683
+ 688: '+ 688 (Tuvalu)',
684
+ 256: '+ 256 (Uganda)',
685
+ 380: '+ 380 (Ukraine)',
686
+ 971: '+ 971 (Vereinigte Arabische Emirate)',
687
+ 44: '+ 44 (Vereinigtes Königreich)',
688
+ 1: '+ 1 (Vereinigte Staaten)',
689
+ 598: '+ 598 (Uruguay)',
690
+ 998: '+ 998 (Usbekistan)',
691
+ 678: '+ 678 (Vanuatu)',
692
+ 58: '+ 58 (Venezuela)',
693
+ 84: '+ 84 (Vietnam)',
694
+ 681: '+ 681 (Wallis und Futuna)',
695
+ 967: '+ 967 (Jemen)',
696
+ 260: '+ 260 (Sambia)',
697
+ 263: '+ 263 (Simbabwe)',
698
+ },
699
+ } as const
700
+
701
+ const { defaultPrefix } = defineProps<{
702
+ defaultPrefix: string
703
+ }>()
704
+
705
+ const inputValue = defineModel<string | undefined>()
706
+ const textValue = ref<string>()
707
+ watch(
708
+ inputValue,
709
+ (newValue) => {
710
+ if (newValue === undefined) {
711
+ textValue.value = ''
712
+ } else {
713
+ textValue.value = newValue.toString()
714
+ }
715
+ },
716
+ { immediate: true },
717
+ )
718
+
719
+ function splitNumber(phoneNumber: string): [string, number] {
720
+ const phone = phoneNumber.replace(/ /g, '').replace('+', '')
721
+
722
+ const codes = Object.keys(PhoneCodes.en)
723
+
724
+ for (const code of codes) {
725
+ if (phone.startsWith(code)) {
726
+ return [code, Number(phone.replace(code, ''))]
727
+ }
728
+ }
729
+ return ['', Number(phone)]
730
+ }
731
+
732
+ const parts = computed(() => {
733
+ if (inputValue.value) {
734
+ const [prefix, number] = splitNumber(inputValue.value)
735
+ return {
736
+ prefix: prefix,
737
+ number,
738
+ }
739
+ } else {
740
+ return {
741
+ prefix: defaultPrefix ?? '',
742
+ number: undefined,
743
+ }
744
+ }
745
+ })
746
+
747
+ function updatePrefix(value: string | undefined | unknown) {
748
+ if (typeof value !== 'string') {
749
+ return
750
+ }
751
+ inputValue.value = `+${value}${parts.value.number ?? ''}`
752
+ }
753
+
754
+ function updateNumber(value: number | undefined) {
755
+ if (value == null) {
756
+ inputValue.value = `+${parts.value.prefix}`
757
+ } else {
758
+ inputValue.value = `+${parts.value.prefix}${value}`
759
+ }
760
+ }
761
+
762
+ const prefixes = Object.keys(PhoneCodes['en']).map((key) => ({
763
+ label: PhoneCodes['en'][key],
764
+ value: key,
765
+ onSelect: () => {
766
+ updatePrefix(key)
767
+ },
768
+ }))
769
+ </script>
770
+
771
+ <template>
772
+ <UFieldGroup :data-testid="phoneInputTestIds.formField">
773
+ <USelectMenu
774
+ :ui="{
775
+ base: 'w-1/3',
776
+ content: 'w-min',
777
+ }"
778
+ :model-value="parts.prefix"
779
+ value-key="value"
780
+ :items="prefixes"
781
+ :data-testid="phoneInputTestIds.prefixSelect"
782
+ />
783
+ <UInput
784
+ :model-value="parts.number"
785
+ @update:model-value="updateNumber"
786
+ type="number"
787
+ :maxlength="10"
788
+ class="no-spinner"
789
+ :data-testid="phoneInputTestIds.numberInput"
790
+ />
791
+ </UFieldGroup>
792
+ </template>
793
+
794
+ <style scoped>
795
+ .no-spinner :deep(input[type='number'])::-webkit-inner-spin-button,
796
+ .no-spinner :deep(input[type='number'])::-webkit-outer-spin-button {
797
+ -webkit-appearance: none;
798
+ margin: 0;
799
+ }
800
+
801
+ .no-spinner :deep(input[type='number']) {
802
+ -moz-appearance: textfield;
803
+ }
804
+ </style>