@opexa/portal-components 0.0.1004 → 0.0.1006

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 (34) hide show
  1. package/dist/components/AccountInfo/AccountInfo.js +11 -5
  2. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +4 -4
  3. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +2 -2
  4. package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.js +1 -1
  5. package/dist/components/KYC/KYCAccountVerificationRequired.lazy.js +9 -1
  6. package/dist/schemas/forgotPasswordSchema.d.ts +8 -8
  7. package/dist/services/queries.d.ts +1 -1
  8. package/dist/services/queries.js +9 -3
  9. package/dist/services/wallet.d.ts +5 -3
  10. package/dist/services/wallet.js +3 -4
  11. package/dist/types/index.d.ts +1 -1
  12. package/dist/ui/AlertDialog/AlertDialog.d.ts +55 -55
  13. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +5 -5
  14. package/dist/ui/Carousel/Carousel.d.ts +45 -45
  15. package/dist/ui/Carousel/carousel.recipe.d.ts +5 -5
  16. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  17. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  18. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  19. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  20. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  21. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  22. package/dist/ui/Field/Field.d.ts +21 -21
  23. package/dist/ui/Field/field.recipe.d.ts +3 -3
  24. package/dist/ui/Menu/Menu.d.ts +90 -90
  25. package/dist/ui/Menu/menu.recipe.d.ts +5 -5
  26. package/dist/ui/Popover/Popover.d.ts +88 -88
  27. package/dist/ui/Popover/popover.recipe.d.ts +8 -8
  28. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  29. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  30. package/dist/ui/Select/Select.d.ts +45 -45
  31. package/dist/ui/Select/select.recipe.d.ts +3 -3
  32. package/dist/utils/countries/getLocaleInfo.d.ts +2 -0
  33. package/dist/utils/countries/getLocaleInfo.js +1153 -1149
  34. package/package.json +1 -1
@@ -1,1154 +1,1158 @@
1
1
  import { cache } from 'react';
2
2
  import { AlgeriaFlag as AlgerianFlag, UnitedStatesFlag as AmericanFlag, ArubaFlag as ArubanFlag, AustraliaFlag as AustralianFlag, AustriaFlag as AustrianFlag, BahrainFlag as BahrainiFlag, BelgiumFlag as BelgianFlag, BrazilFlag as BrazilianFlag, UnitedKingdomFlag as BritishFlag, BruneiFlag, CambodiaFlag as CambodianFlag, CanadaFlag as CanadianFlag, CroatiaFlag as CroatianFlag, CyprusFlag as CypriotFlag, NetherlandsFlag as DutchFlag, EgyptFlag as EgyptianFlag, FinlandFlag as FinnishFlag, FranceFlag as FrenchFlag, GermanyFlag as GermanFlag, GreeceFlag as GreekFlag, GuamFlag, HongKongFlag, HungaryFlag as HungarianFlag, IndianFlag, IndonesianFlag, IraqFlag as IraqiFlag, IrelandFlag as IrishFlag, IsraelFlag as IsraeliFlag, ItalyFlag as ItalianFlag, JapanFlag as JapaneseFlag, JordanFlag as JordanianFlag, KuwaitFlag as KuwaitiFlag, LatviaFlag as LatvianFlag, LebanonFlag as LebaneseFlag, LithuaniaFlag as LithuanianFlag, LuxembourgFlag, MacauFlag, MalaysianFlag, MaltaFlag as MalteseFlag, NewZealandFlag, NorthernMarianaIslandsFlag, NorwayFlag as NorwegianFlag, OmanFlag as OmaniFlag, PhilippineFlag, PolandFlag as PolishFlag, PortugalFlag as PortugueseFlag, QatarFlag as QatariFlag, RomaniaFlag as RomanianFlag, SaoTomeAndPrincipeFlag as SaoTomeFlag, SaudiArabiaFlag as SaudiArabianFlag, SingaporeFlag as SingaporeanFlag, SlovakiaFlag as SlovakFlag, SouthKoreaFlag as SouthKoreanFlag, SpainFlag as SpanishFlag, SwedenFlag as SwedishFlag, SwitzerlandFlag as SwissFlag, TaiwanFlag as TaiwaneseFlag, TanzaniaFlag as TanzanianFlag, TrinidadAndTobagoFlag as TrinidadianFlag, TurkiyeFlag as TurkishFlag, UnitedArabEmiratesFlag as UAEFlag, UzbekistanFlag as UzbekFlag, VietnameseFlag, } from './flags/index.js';
3
+ const LOCALE_DATA = [
4
+ {
5
+ locale: 'ar-DZ',
6
+ timezone: 'Africa/Algiers',
7
+ country: { name: 'Algeria', code: 'DZ', flag: AlgerianFlag },
8
+ currency: {
9
+ code: 'DZD',
10
+ name: 'Algerian Dinar',
11
+ symbol: 'د.ج',
12
+ externalCode: 'DZD',
13
+ },
14
+ mobileNumber: {
15
+ areaCode: '+213',
16
+ numOfDigits: 9,
17
+ example: '551234567',
18
+ pattern: /^(\+?213|0)?[567]\d{8}$/,
19
+ },
20
+ },
21
+ {
22
+ locale: 'nl-AW',
23
+ timezone: 'America/Aruba',
24
+ country: { name: 'Aruba', code: 'AW', flag: ArubanFlag },
25
+ currency: {
26
+ code: 'AWG',
27
+ name: 'Aruban Florin',
28
+ symbol: 'ƒ',
29
+ externalCode: 'AWG',
30
+ },
31
+ mobileNumber: {
32
+ areaCode: '+297',
33
+ numOfDigits: 7,
34
+ example: '5601234',
35
+ pattern: /^(\+?297)?[56]\d{6}$/,
36
+ },
37
+ },
38
+ {
39
+ locale: 'en-AU',
40
+ timezone: 'Australia/Sydney',
41
+ country: { name: 'Australia', code: 'AU', flag: AustralianFlag },
42
+ currency: {
43
+ code: 'AUD',
44
+ name: 'Australian Dollar',
45
+ symbol: 'A$',
46
+ externalCode: 'AUD',
47
+ },
48
+ mobileNumber: {
49
+ areaCode: '+61',
50
+ numOfDigits: 9,
51
+ example: '412345678',
52
+ pattern: /^(\+?61|0)?4\d{8}$/,
53
+ },
54
+ },
55
+ {
56
+ locale: 'de-AT',
57
+ timezone: 'Europe/Vienna',
58
+ country: { name: 'Austria', code: 'AT', flag: AustrianFlag },
59
+ currency: {
60
+ code: 'EUR',
61
+ name: 'Euro',
62
+ symbol: '€',
63
+ externalCode: 'EUR',
64
+ },
65
+ mobileNumber: {
66
+ areaCode: '+43',
67
+ numOfDigits: 11,
68
+ example: '6641234567',
69
+ pattern: /^(\+?43|0)?6\d{8,10}$/,
70
+ },
71
+ },
72
+ {
73
+ locale: 'ar-BH',
74
+ timezone: 'Asia/Bahrain',
75
+ country: { name: 'Bahrain', code: 'BH', flag: BahrainiFlag },
76
+ currency: {
77
+ code: 'BHD',
78
+ name: 'Bahraini Dinar',
79
+ symbol: '.د.ب',
80
+ externalCode: 'BHD',
81
+ },
82
+ mobileNumber: {
83
+ areaCode: '+973',
84
+ numOfDigits: 8,
85
+ example: '36123456',
86
+ pattern: /^(\+?973)?[36]\d{7}$/,
87
+ },
88
+ },
89
+ {
90
+ locale: 'nl-BE',
91
+ timezone: 'Europe/Brussels',
92
+ country: { name: 'Belgium', code: 'BE', flag: BelgianFlag },
93
+ currency: {
94
+ code: 'EUR',
95
+ name: 'Euro',
96
+ symbol: '€',
97
+ externalCode: 'EUR',
98
+ },
99
+ mobileNumber: {
100
+ areaCode: '+32',
101
+ numOfDigits: 9,
102
+ example: '471234567',
103
+ pattern: /^(\+?32|0)?4\d{8}$/,
104
+ },
105
+ },
106
+ {
107
+ locale: 'pt-BR',
108
+ timezone: 'America/Sao_Paulo',
109
+ country: { name: 'Brazil', code: 'BR', flag: BrazilianFlag },
110
+ currency: {
111
+ code: 'BRL',
112
+ name: 'Brazilian Real',
113
+ symbol: 'R$',
114
+ externalCode: 'BRL',
115
+ },
116
+ mobileNumber: {
117
+ areaCode: '+55',
118
+ numOfDigits: 11,
119
+ example: '11987654321',
120
+ pattern: /^(\+?55)?[1-9]\d{10}$/,
121
+ },
122
+ },
123
+ {
124
+ locale: 'ms-BN',
125
+ timezone: 'Asia/Brunei',
126
+ country: { name: 'Brunei Darussalam', code: 'BN', flag: BruneiFlag },
127
+ currency: {
128
+ code: 'BND',
129
+ name: 'Brunei Dollar',
130
+ symbol: 'B$',
131
+ externalCode: 'BND',
132
+ },
133
+ mobileNumber: {
134
+ areaCode: '+673',
135
+ numOfDigits: 7,
136
+ example: '7123456',
137
+ pattern: /^(\+?673)?[78]\d{6}$/,
138
+ },
139
+ },
140
+ {
141
+ locale: 'km-KH',
142
+ timezone: 'Asia/Phnom_Penh',
143
+ country: { name: 'Cambodia', code: 'KH', flag: CambodianFlag },
144
+ currency: {
145
+ code: 'KHR',
146
+ name: 'Cambodian Riel',
147
+ symbol: '៛',
148
+ externalCode: 'KHR',
149
+ },
150
+ mobileNumber: {
151
+ areaCode: '+855',
152
+ numOfDigits: 8,
153
+ example: '12345678',
154
+ pattern: /^(\+?855)?[1-9]\d{7}$/,
155
+ },
156
+ },
157
+ {
158
+ locale: 'en-CA',
159
+ timezone: 'America/Toronto',
160
+ country: { name: 'Canada', code: 'CA', flag: CanadianFlag },
161
+ currency: {
162
+ code: 'CAD',
163
+ name: 'Canadian Dollar',
164
+ symbol: 'C$',
165
+ externalCode: 'CAD',
166
+ },
167
+ mobileNumber: {
168
+ areaCode: '+1',
169
+ numOfDigits: 10,
170
+ example: '4161234567',
171
+ pattern: /^(\+?1)?[2-9]\d{9}$/,
172
+ },
173
+ },
174
+ {
175
+ locale: 'hr-HR',
176
+ timezone: 'Europe/Zagreb',
177
+ country: { name: 'Croatia', code: 'HR', flag: CroatianFlag },
178
+ currency: {
179
+ code: 'HRK',
180
+ name: 'Croatian Kuna',
181
+ symbol: 'kn',
182
+ externalCode: 'HRK',
183
+ },
184
+ mobileNumber: {
185
+ areaCode: '+385',
186
+ numOfDigits: 8,
187
+ example: '91234567',
188
+ pattern: /^(\+?385)?9\d{7}$/,
189
+ },
190
+ },
191
+ {
192
+ locale: 'el-CY',
193
+ timezone: 'Asia/Nicosia',
194
+ country: { name: 'Cyprus', code: 'CY', flag: CypriotFlag },
195
+ currency: {
196
+ code: 'EUR',
197
+ name: 'Euro',
198
+ symbol: '€',
199
+ externalCode: 'EUR',
200
+ },
201
+ mobileNumber: {
202
+ areaCode: '+357',
203
+ numOfDigits: 8,
204
+ example: '96123456',
205
+ pattern: /^(\+?357)?9[6-9]\d{6}$/,
206
+ },
207
+ },
208
+ {
209
+ locale: 'ar-EG',
210
+ timezone: 'Africa/Cairo',
211
+ country: { name: 'Egypt', code: 'EG', flag: EgyptianFlag },
212
+ currency: {
213
+ code: 'EGP',
214
+ name: 'Egyptian Pound',
215
+ symbol: 'E£',
216
+ externalCode: 'EGP',
217
+ },
218
+ mobileNumber: {
219
+ areaCode: '+20',
220
+ numOfDigits: 10,
221
+ example: '1012345678',
222
+ pattern: /^(\+?20)?1[0-5]\d{8}$/,
223
+ },
224
+ },
225
+ {
226
+ locale: 'fi-FI',
227
+ timezone: 'Europe/Helsinki',
228
+ country: { name: 'Finland', code: 'FI', flag: FinnishFlag },
229
+ currency: {
230
+ code: 'EUR',
231
+ name: 'Euro',
232
+ symbol: '€',
233
+ externalCode: 'EUR',
234
+ },
235
+ mobileNumber: {
236
+ areaCode: '+358',
237
+ numOfDigits: 9,
238
+ example: '501234567',
239
+ pattern: /^(\+?358|0)?[45]\d{8}$/,
240
+ },
241
+ },
242
+ {
243
+ locale: 'fr-FR',
244
+ timezone: 'Europe/Paris',
245
+ country: { name: 'France', code: 'FR', flag: FrenchFlag },
246
+ currency: {
247
+ code: 'EUR',
248
+ name: 'Euro',
249
+ symbol: '€',
250
+ externalCode: 'EUR',
251
+ },
252
+ mobileNumber: {
253
+ areaCode: '+33',
254
+ numOfDigits: 9,
255
+ example: '612345678',
256
+ pattern: /^(\+?33|0)?[67]\d{8}$/,
257
+ },
258
+ },
259
+ {
260
+ locale: 'de-DE',
261
+ timezone: 'Europe/Berlin',
262
+ country: { name: 'Germany', code: 'DE', flag: GermanFlag },
263
+ currency: {
264
+ code: 'EUR',
265
+ name: 'Euro',
266
+ symbol: '€',
267
+ externalCode: 'EUR',
268
+ },
269
+ mobileNumber: {
270
+ areaCode: '+49',
271
+ numOfDigits: 11,
272
+ example: '15123456789',
273
+ pattern: /^(\+?49|0)?1[5-7]\d{8,9}$/,
274
+ },
275
+ },
276
+ {
277
+ locale: 'el-GR',
278
+ timezone: 'Europe/Athens',
279
+ country: { name: 'Greece', code: 'GR', flag: GreekFlag },
280
+ currency: {
281
+ code: 'EUR',
282
+ name: 'Euro',
283
+ symbol: '€',
284
+ externalCode: 'EUR',
285
+ },
286
+ mobileNumber: {
287
+ areaCode: '+30',
288
+ numOfDigits: 10,
289
+ example: '6912345678',
290
+ pattern: /^(\+?30)?69\d{8}$/,
291
+ },
292
+ },
293
+ {
294
+ locale: 'en-GU',
295
+ timezone: 'Pacific/Guam',
296
+ country: { name: 'Guam', code: 'GU', flag: GuamFlag },
297
+ currency: {
298
+ code: 'USD',
299
+ name: 'US Dollar',
300
+ symbol: '$',
301
+ externalCode: 'USD',
302
+ },
303
+ mobileNumber: {
304
+ areaCode: '+1671',
305
+ numOfDigits: 7,
306
+ example: '1234567',
307
+ pattern: /^(\+?1671)?\d{7}$/,
308
+ },
309
+ },
310
+ {
311
+ locale: 'zh-HK',
312
+ timezone: 'Asia/Hong_Kong',
313
+ country: { name: 'Hong Kong', code: 'HK', flag: HongKongFlag },
314
+ currency: {
315
+ code: 'HKD',
316
+ name: 'Hong Kong Dollar',
317
+ symbol: 'HK$',
318
+ externalCode: 'HKD',
319
+ },
320
+ mobileNumber: {
321
+ areaCode: '+852',
322
+ numOfDigits: 8,
323
+ example: '91234567',
324
+ pattern: /^(\+?852)?[569]\d{7}$/,
325
+ },
326
+ },
327
+ {
328
+ locale: 'hu-HU',
329
+ timezone: 'Europe/Budapest',
330
+ country: { name: 'Hungary', code: 'HU', flag: HungarianFlag },
331
+ currency: {
332
+ code: 'HUF',
333
+ name: 'Hungarian Forint',
334
+ symbol: 'Ft',
335
+ externalCode: 'HUF',
336
+ },
337
+ mobileNumber: {
338
+ areaCode: '+36',
339
+ numOfDigits: 9,
340
+ example: '301234567',
341
+ pattern: /^(\+?36)?[237]\d{8}$/,
342
+ },
343
+ },
344
+ {
345
+ locale: 'en-IN',
346
+ timezone: 'Asia/Kolkata',
347
+ country: { code: 'IN', name: 'India', flag: IndianFlag },
348
+ currency: {
349
+ code: 'INR',
350
+ name: 'Indian Rupee',
351
+ symbol: '₹',
352
+ externalCode: 'INR',
353
+ },
354
+ mobileNumber: {
355
+ areaCode: '+91',
356
+ numOfDigits: 10,
357
+ example: `919${''.padStart(7, '0')}`,
358
+ pattern: /^(\+?91|0)?[789]\d{9}$/,
359
+ },
360
+ },
361
+ {
362
+ locale: 'id-ID',
363
+ timezone: 'Asia/Jakarta',
364
+ country: { name: 'Indonesia', code: 'ID', flag: IndonesianFlag },
365
+ currency: {
366
+ code: 'IDR',
367
+ name: 'Indonesian Rupiah',
368
+ symbol: 'Rp',
369
+ externalCode: 'IDR',
370
+ },
371
+ mobileNumber: {
372
+ areaCode: '+62',
373
+ numOfDigits: 10,
374
+ example: `81${''.padStart(8, '0')}`,
375
+ pattern: /^(\+?62|0)?8\d{9}$/,
376
+ },
377
+ },
378
+ {
379
+ locale: 'ar-IQ',
380
+ timezone: 'Asia/Baghdad',
381
+ country: { name: 'Iraq', code: 'IQ', flag: IraqiFlag },
382
+ currency: {
383
+ code: 'IQD',
384
+ name: 'Iraqi Dinar',
385
+ symbol: 'ع.د',
386
+ externalCode: 'IQD',
387
+ },
388
+ mobileNumber: {
389
+ areaCode: '+964',
390
+ numOfDigits: 10,
391
+ example: '7901234567',
392
+ pattern: /^(\+?964)?7[789]\d{8}$/,
393
+ },
394
+ },
395
+ {
396
+ locale: 'en-IE',
397
+ timezone: 'Europe/Dublin',
398
+ country: { name: 'Ireland', code: 'IE', flag: IrishFlag },
399
+ currency: {
400
+ code: 'EUR',
401
+ name: 'Euro',
402
+ symbol: '€',
403
+ externalCode: 'EUR',
404
+ },
405
+ mobileNumber: {
406
+ areaCode: '+353',
407
+ numOfDigits: 9,
408
+ example: '851234567',
409
+ pattern: /^(\+?353|0)?8[356-9]\d{7}$/,
410
+ },
411
+ },
412
+ {
413
+ locale: 'he-IL',
414
+ timezone: 'Asia/Jerusalem',
415
+ country: { name: 'Israel', code: 'IL', flag: IsraeliFlag },
416
+ currency: {
417
+ code: 'ILS',
418
+ name: 'Israeli Shekel',
419
+ symbol: '₪',
420
+ externalCode: 'ILS',
421
+ },
422
+ mobileNumber: {
423
+ areaCode: '+972',
424
+ numOfDigits: 9,
425
+ example: '501234567',
426
+ pattern: /^(\+?972|0)?5[0-9]\d{7}$/,
427
+ },
428
+ },
429
+ {
430
+ locale: 'it-IT',
431
+ timezone: 'Europe/Rome',
432
+ country: { name: 'Italy', code: 'IT', flag: ItalianFlag },
433
+ currency: {
434
+ code: 'EUR',
435
+ name: 'Euro',
436
+ symbol: '€',
437
+ externalCode: 'EUR',
438
+ },
439
+ mobileNumber: {
440
+ areaCode: '+39',
441
+ numOfDigits: 10,
442
+ example: '3123456789',
443
+ pattern: /^(\+?39)?3\d{9}$/,
444
+ },
445
+ },
446
+ {
447
+ locale: 'ja-JP',
448
+ timezone: 'Asia/Tokyo',
449
+ country: { name: 'Japan', code: 'JP', flag: JapaneseFlag },
450
+ currency: {
451
+ code: 'JPY',
452
+ name: 'Japanese Yen',
453
+ symbol: '¥',
454
+ externalCode: 'JPY',
455
+ },
456
+ mobileNumber: {
457
+ areaCode: '+81',
458
+ numOfDigits: 11,
459
+ example: '09012345678',
460
+ pattern: /^(\+?81|0)?[789]0\d{8}$/,
461
+ },
462
+ },
463
+ {
464
+ locale: 'ar-JO',
465
+ timezone: 'Asia/Amman',
466
+ country: { name: 'Jordan', code: 'JO', flag: JordanianFlag },
467
+ currency: {
468
+ code: 'JOD',
469
+ name: 'Jordanian Dinar',
470
+ symbol: 'د.ا',
471
+ externalCode: 'JOD',
472
+ },
473
+ mobileNumber: {
474
+ areaCode: '+962',
475
+ numOfDigits: 9,
476
+ example: '791234567',
477
+ pattern: /^(\+?962)?7[789]\d{7}$/,
478
+ },
479
+ },
480
+ {
481
+ locale: 'ar-KW',
482
+ timezone: 'Asia/Kuwait',
483
+ country: { name: 'Kuwait', code: 'KW', flag: KuwaitiFlag },
484
+ currency: {
485
+ code: 'KWD',
486
+ name: 'Kuwaiti Dinar',
487
+ symbol: 'د.ك',
488
+ externalCode: 'KWD',
489
+ },
490
+ mobileNumber: {
491
+ areaCode: '+965',
492
+ numOfDigits: 8,
493
+ example: '51234567',
494
+ pattern: /^(\+?965)?[569]\d{7}$/,
495
+ },
496
+ },
497
+ {
498
+ locale: 'lv-LV',
499
+ timezone: 'Europe/Riga',
500
+ country: { name: 'Latvia', code: 'LV', flag: LatvianFlag },
501
+ currency: {
502
+ code: 'EUR',
503
+ name: 'Euro',
504
+ symbol: '€',
505
+ externalCode: 'EUR',
506
+ },
507
+ mobileNumber: {
508
+ areaCode: '+371',
509
+ numOfDigits: 8,
510
+ example: '21234567',
511
+ pattern: /^(\+?371)?2\d{7}$/,
512
+ },
513
+ },
514
+ {
515
+ locale: 'ar-LB',
516
+ timezone: 'Asia/Beirut',
517
+ country: { name: 'Lebanon', code: 'LB', flag: LebaneseFlag },
518
+ currency: {
519
+ code: 'LBP',
520
+ name: 'Lebanese Pound',
521
+ symbol: 'ل.ل',
522
+ externalCode: 'LBP',
523
+ },
524
+ mobileNumber: {
525
+ areaCode: '+961',
526
+ numOfDigits: 8,
527
+ example: '71234567',
528
+ pattern: /^(\+?961)?[37-9]\d{7}$/,
529
+ },
530
+ },
531
+ {
532
+ locale: 'lt-LT',
533
+ timezone: 'Europe/Vilnius',
534
+ country: { name: 'Lithuania', code: 'LT', flag: LithuanianFlag },
535
+ currency: {
536
+ code: 'EUR',
537
+ name: 'Euro',
538
+ symbol: '€',
539
+ externalCode: 'EUR',
540
+ },
541
+ mobileNumber: {
542
+ areaCode: '+370',
543
+ numOfDigits: 8,
544
+ example: '61234567',
545
+ pattern: /^(\+?370)?6\d{7}$/,
546
+ },
547
+ },
548
+ {
549
+ locale: 'fr-LU',
550
+ timezone: 'Europe/Luxembourg',
551
+ country: { name: 'Luxembourg', code: 'LU', flag: LuxembourgFlag },
552
+ currency: {
553
+ code: 'EUR',
554
+ name: 'Euro',
555
+ symbol: '€',
556
+ externalCode: 'EUR',
557
+ },
558
+ mobileNumber: {
559
+ areaCode: '+352',
560
+ numOfDigits: 9,
561
+ example: '621234567',
562
+ pattern: /^(\+?352)?6\d{8}$/,
563
+ },
564
+ },
565
+ {
566
+ locale: 'zh-MO',
567
+ timezone: 'Asia/Macau',
568
+ country: { name: 'Macau', code: 'MO', flag: MacauFlag },
569
+ currency: {
570
+ code: 'HKD',
571
+ name: 'Hong Kong Dollar',
572
+ symbol: 'HK$',
573
+ externalCode: 'HKD',
574
+ },
575
+ mobileNumber: {
576
+ areaCode: '+853',
577
+ numOfDigits: 8,
578
+ example: '61234567',
579
+ pattern: /^(\+?853)?6\d{7}$/,
580
+ },
581
+ },
582
+ {
583
+ locale: 'ms-MY',
584
+ timezone: 'Asia/Kuala_Lumpur',
585
+ country: { name: 'Malaysia', code: 'MY', flag: MalaysianFlag },
586
+ currency: {
587
+ code: 'MYR',
588
+ name: 'Malaysian Ringgit',
589
+ symbol: 'RM',
590
+ externalCode: 'MYR',
591
+ },
592
+ mobileNumber: {
593
+ areaCode: '+60',
594
+ numOfDigits: 9,
595
+ example: `12${''.padStart(7, '0')}`,
596
+ pattern: /^(\+?60|0)?1[0-9]{1}\d{7}$/,
597
+ },
598
+ },
599
+ {
600
+ locale: 'mt-MT',
601
+ timezone: 'Europe/Malta',
602
+ country: { name: 'Malta', code: 'MT', flag: MalteseFlag },
603
+ currency: {
604
+ code: 'EUR',
605
+ name: 'Euro',
606
+ symbol: '€',
607
+ externalCode: 'EUR',
608
+ },
609
+ mobileNumber: {
610
+ areaCode: '+356',
611
+ numOfDigits: 8,
612
+ example: '79123456',
613
+ pattern: /^(\+?356)?[79]\d{7}$/,
614
+ },
615
+ },
616
+ {
617
+ locale: 'nl-NL',
618
+ timezone: 'Europe/Amsterdam',
619
+ country: { name: 'Netherlands', code: 'NL', flag: DutchFlag },
620
+ currency: {
621
+ code: 'EUR',
622
+ name: 'Euro',
623
+ symbol: '€',
624
+ externalCode: 'EUR',
625
+ },
626
+ mobileNumber: {
627
+ areaCode: '+31',
628
+ numOfDigits: 9,
629
+ example: '612345678',
630
+ pattern: /^(\+?31|0)?6\d{8}$/,
631
+ },
632
+ },
633
+ {
634
+ locale: 'en-NZ',
635
+ timezone: 'Pacific/Auckland',
636
+ country: { name: 'New Zealand', code: 'NZ', flag: NewZealandFlag },
637
+ currency: {
638
+ code: 'NZD',
639
+ name: 'New Zealand Dollar',
640
+ symbol: 'NZ$',
641
+ externalCode: 'NZD',
642
+ },
643
+ mobileNumber: {
644
+ areaCode: '+64',
645
+ numOfDigits: 9,
646
+ example: '211234567',
647
+ pattern: /^(\+?64|0)?2[1-9]\d{7}$/,
648
+ },
649
+ },
650
+ {
651
+ locale: 'en-MP',
652
+ timezone: 'Pacific/Saipan',
653
+ country: {
654
+ name: 'Northern Mariana Islands',
655
+ code: 'MP',
656
+ flag: NorthernMarianaIslandsFlag,
657
+ },
658
+ currency: {
659
+ code: 'USD',
660
+ name: 'US Dollar',
661
+ symbol: '$',
662
+ externalCode: 'USD',
663
+ },
664
+ mobileNumber: {
665
+ areaCode: '+1670',
666
+ numOfDigits: 7,
667
+ example: '1234567',
668
+ pattern: /^(\+?1670)?\d{7}$/,
669
+ },
670
+ },
671
+ {
672
+ locale: 'no-NO',
673
+ timezone: 'Europe/Oslo',
674
+ country: { name: 'Norway', code: 'NO', flag: NorwegianFlag },
675
+ currency: {
676
+ code: 'NOK',
677
+ name: 'Norwegian Krone',
678
+ symbol: 'kr',
679
+ externalCode: 'NOK',
680
+ },
681
+ mobileNumber: {
682
+ areaCode: '+47',
683
+ numOfDigits: 8,
684
+ example: '41234567',
685
+ pattern: /^(\+?47)?[49]\d{7}$/,
686
+ },
687
+ },
688
+ {
689
+ locale: 'ar-OM',
690
+ timezone: 'Asia/Muscat',
691
+ country: { name: 'Oman', code: 'OM', flag: OmaniFlag },
692
+ currency: {
693
+ code: 'OMR',
694
+ name: 'Omani Rial',
695
+ symbol: 'ر.ع.',
696
+ externalCode: 'OMR',
697
+ },
698
+ mobileNumber: {
699
+ areaCode: '+968',
700
+ numOfDigits: 8,
701
+ example: '91234567',
702
+ pattern: /^(\+?968)?[79]\d{7}$/,
703
+ },
704
+ },
705
+ {
706
+ locale: 'pl-PL',
707
+ timezone: 'Europe/Warsaw',
708
+ country: { name: 'Poland', code: 'PL', flag: PolishFlag },
709
+ currency: {
710
+ code: 'PLN',
711
+ name: 'Polish Zloty',
712
+ symbol: 'zł',
713
+ externalCode: 'PLN',
714
+ },
715
+ mobileNumber: {
716
+ areaCode: '+48',
717
+ numOfDigits: 9,
718
+ example: '512345678',
719
+ pattern: /^(\+?48)?[5-9]\d{8}$/,
720
+ },
721
+ },
722
+ {
723
+ locale: 'pt-PT',
724
+ timezone: 'Europe/Lisbon',
725
+ country: { name: 'Portugal', code: 'PT', flag: PortugueseFlag },
726
+ currency: {
727
+ code: 'EUR',
728
+ name: 'Euro',
729
+ symbol: '€',
730
+ externalCode: 'EUR',
731
+ },
732
+ mobileNumber: {
733
+ areaCode: '+351',
734
+ numOfDigits: 9,
735
+ example: '912345678',
736
+ pattern: /^(\+?351)?9[1236]\d{7}$/,
737
+ },
738
+ },
739
+ {
740
+ locale: 'ar-QA',
741
+ timezone: 'Asia/Qatar',
742
+ country: { name: 'Qatar', code: 'QA', flag: QatariFlag },
743
+ currency: {
744
+ code: 'QAR',
745
+ name: 'Qatari Riyal',
746
+ symbol: 'ر.ق',
747
+ externalCode: 'QAR',
748
+ },
749
+ mobileNumber: {
750
+ areaCode: '+974',
751
+ numOfDigits: 8,
752
+ example: '33123456',
753
+ pattern: /^(\+?974)?[3567]\d{7}$/,
754
+ },
755
+ },
756
+ {
757
+ locale: 'ro-RO',
758
+ timezone: 'Europe/Bucharest',
759
+ country: { name: 'Romania', code: 'RO', flag: RomanianFlag },
760
+ currency: {
761
+ code: 'RON',
762
+ name: 'Romanian Leu',
763
+ symbol: 'lei',
764
+ externalCode: 'RON',
765
+ },
766
+ mobileNumber: {
767
+ areaCode: '+40',
768
+ numOfDigits: 9,
769
+ example: '712345678',
770
+ pattern: /^(\+?40)?7\d{8}$/,
771
+ },
772
+ },
773
+ {
774
+ locale: 'ar-SA',
775
+ timezone: 'Asia/Riyadh',
776
+ country: { name: 'Saudi Arabia', code: 'SA', flag: SaudiArabianFlag },
777
+ currency: {
778
+ code: 'SAR',
779
+ name: 'Saudi Riyal',
780
+ symbol: 'ر.س',
781
+ externalCode: 'SAR',
782
+ },
783
+ mobileNumber: {
784
+ areaCode: '+966',
785
+ numOfDigits: 9,
786
+ example: '501234567',
787
+ pattern: /^(\+?966)?5\d{8}$/,
788
+ },
789
+ },
790
+ {
791
+ locale: 'en-SG',
792
+ timezone: 'Asia/Singapore',
793
+ country: { name: 'Singapore', code: 'SG', flag: SingaporeanFlag },
794
+ currency: {
795
+ code: 'SGD',
796
+ name: 'Singapore Dollar',
797
+ symbol: 'S$',
798
+ externalCode: 'SGD',
799
+ },
800
+ mobileNumber: {
801
+ areaCode: '+65',
802
+ numOfDigits: 8,
803
+ example: '81234567',
804
+ pattern: /^(\+?65)?[89]\d{7}$/,
805
+ },
806
+ },
807
+ {
808
+ locale: 'sk-SK',
809
+ timezone: 'Europe/Bratislava',
810
+ country: { name: 'Slovakia', code: 'SK', flag: SlovakFlag },
811
+ currency: {
812
+ code: 'EUR',
813
+ name: 'Euro',
814
+ symbol: '€',
815
+ externalCode: 'EUR',
816
+ },
817
+ mobileNumber: {
818
+ areaCode: '+421',
819
+ numOfDigits: 9,
820
+ example: '901234567',
821
+ pattern: /^(\+?421)?9\d{8}$/,
822
+ },
823
+ },
824
+ {
825
+ locale: 'ko-KR',
826
+ timezone: 'Asia/Seoul',
827
+ country: { name: 'South Korea', code: 'KR', flag: SouthKoreanFlag },
828
+ currency: {
829
+ code: 'KRW',
830
+ name: 'Korean Won',
831
+ symbol: '₩',
832
+ externalCode: 'KRW',
833
+ },
834
+ mobileNumber: {
835
+ areaCode: '+82',
836
+ numOfDigits: 11,
837
+ example: '01012345678',
838
+ pattern: /^(\+?82|0)?1[0-9]\d{8}$/,
839
+ },
840
+ },
841
+ {
842
+ locale: 'es-ES',
843
+ timezone: 'Europe/Madrid',
844
+ country: { name: 'Spain', code: 'ES', flag: SpanishFlag },
845
+ currency: {
846
+ code: 'EUR',
847
+ name: 'Euro',
848
+ symbol: '€',
849
+ externalCode: 'EUR',
850
+ },
851
+ mobileNumber: {
852
+ areaCode: '+34',
853
+ numOfDigits: 9,
854
+ example: '612345678',
855
+ pattern: /^(\+?34)?[67]\d{8}$/,
856
+ },
857
+ },
858
+ {
859
+ locale: 'sv-SE',
860
+ timezone: 'Europe/Stockholm',
861
+ country: { name: 'Sweden', code: 'SE', flag: SwedishFlag },
862
+ currency: {
863
+ code: 'SEK',
864
+ name: 'Swedish Krona',
865
+ symbol: 'kr',
866
+ externalCode: 'SEK',
867
+ },
868
+ mobileNumber: {
869
+ areaCode: '+46',
870
+ numOfDigits: 9,
871
+ example: '701234567',
872
+ pattern: /^(\+?46|0)?7\d{8}$/,
873
+ },
874
+ },
875
+ {
876
+ locale: 'de-CH',
877
+ timezone: 'Europe/Zurich',
878
+ country: { name: 'Switzerland', code: 'CH', flag: SwissFlag },
879
+ currency: {
880
+ code: 'CHF',
881
+ name: 'Swiss Franc',
882
+ symbol: 'CHF',
883
+ externalCode: 'CHF',
884
+ },
885
+ mobileNumber: {
886
+ areaCode: '+41',
887
+ numOfDigits: 9,
888
+ example: '761234567',
889
+ pattern: /^(\+?41|0)?7[5-9]\d{7}$/,
890
+ },
891
+ },
892
+ {
893
+ locale: 'pt-ST',
894
+ timezone: 'Africa/Sao_Tome',
895
+ country: {
896
+ name: 'São Tomé and Príncipe',
897
+ code: 'ST',
898
+ flag: SaoTomeFlag,
899
+ },
900
+ currency: {
901
+ code: 'STN',
902
+ name: 'São Tomé and Príncipe Dobra',
903
+ symbol: 'Db',
904
+ externalCode: 'STN',
905
+ },
906
+ mobileNumber: {
907
+ areaCode: '+239',
908
+ numOfDigits: 7,
909
+ example: '9123456',
910
+ pattern: /^(\+?239)?9\d{6}$/,
911
+ },
912
+ },
913
+ {
914
+ locale: 'zh-TW',
915
+ timezone: 'Asia/Taipei',
916
+ country: { name: 'Taiwan', code: 'TW', flag: TaiwaneseFlag },
917
+ currency: {
918
+ code: 'TWD',
919
+ name: 'Taiwan Dollar',
920
+ symbol: 'NT$',
921
+ externalCode: 'TWD',
922
+ },
923
+ mobileNumber: {
924
+ areaCode: '+886',
925
+ numOfDigits: 9,
926
+ example: '912345678',
927
+ pattern: /^(\+?886|0)?9\d{8}$/,
928
+ },
929
+ },
930
+ {
931
+ locale: 'sw-TZ',
932
+ timezone: 'Africa/Dar_es_Salaam',
933
+ country: { name: 'Tanzania', code: 'TZ', flag: TanzanianFlag },
934
+ currency: {
935
+ code: 'TZS',
936
+ name: 'Tanzanian Shilling',
937
+ symbol: 'TSh',
938
+ externalCode: 'TZS',
939
+ },
940
+ mobileNumber: {
941
+ areaCode: '+255',
942
+ numOfDigits: 9,
943
+ example: '712345678',
944
+ pattern: /^(\+?255)?[67]\d{8}$/,
945
+ },
946
+ },
947
+ {
948
+ locale: 'en-TT',
949
+ timezone: 'America/Port_of_Spain',
950
+ country: {
951
+ name: 'Trinidad and Tobago',
952
+ code: 'TT',
953
+ flag: TrinidadianFlag,
954
+ },
955
+ currency: {
956
+ code: 'TTD',
957
+ name: 'Trinidad and Tobago Dollar',
958
+ symbol: 'TT$',
959
+ externalCode: 'TTD',
960
+ },
961
+ mobileNumber: {
962
+ areaCode: '+1868',
963
+ numOfDigits: 7,
964
+ example: '1234567',
965
+ pattern: /^(\+?1868)?\d{7}$/,
966
+ },
967
+ },
968
+ {
969
+ locale: 'tr-TR',
970
+ timezone: 'Europe/Istanbul',
971
+ country: { name: 'Türkiye', code: 'TR', flag: TurkishFlag },
972
+ currency: {
973
+ code: 'TRY',
974
+ name: 'Turkish Lira',
975
+ symbol: '₺',
976
+ externalCode: 'TRY',
977
+ },
978
+ mobileNumber: {
979
+ areaCode: '+90',
980
+ numOfDigits: 10,
981
+ example: '5123456789',
982
+ pattern: /^(\+?90|0)?5\d{9}$/,
983
+ },
984
+ },
985
+ {
986
+ locale: 'ar-AE',
987
+ timezone: 'Asia/Dubai',
988
+ country: { name: 'United Arab Emirates', code: 'AE', flag: UAEFlag },
989
+ currency: {
990
+ code: 'AED',
991
+ name: 'UAE Dirham',
992
+ symbol: 'د.إ',
993
+ externalCode: 'AED',
994
+ },
995
+ mobileNumber: {
996
+ areaCode: '+971',
997
+ numOfDigits: 9,
998
+ example: '501234567',
999
+ pattern: /^(\+?971)?5[0-9]\d{7}$/,
1000
+ },
1001
+ },
1002
+ {
1003
+ locale: 'en-GB',
1004
+ timezone: 'Europe/London',
1005
+ country: { name: 'United Kingdom', code: 'GB', flag: BritishFlag },
1006
+ currency: {
1007
+ code: 'GBP',
1008
+ name: 'British Pound',
1009
+ symbol: '£',
1010
+ externalCode: 'GBP',
1011
+ },
1012
+ mobileNumber: {
1013
+ areaCode: '+44',
1014
+ numOfDigits: 10,
1015
+ example: '7123456789',
1016
+ pattern: /^(\+?44|0)?7\d{9}$/,
1017
+ },
1018
+ },
1019
+ {
1020
+ locale: 'en-US',
1021
+ timezone: 'America/New_York',
1022
+ country: { name: 'United States', code: 'US', flag: AmericanFlag },
1023
+ currency: {
1024
+ code: 'USD',
1025
+ name: 'US Dollar',
1026
+ symbol: '$',
1027
+ externalCode: 'USD',
1028
+ },
1029
+ mobileNumber: {
1030
+ areaCode: '+1',
1031
+ numOfDigits: 10,
1032
+ example: '2125551234',
1033
+ pattern: /^(\+?1)?[2-9]\d{9}$/,
1034
+ },
1035
+ },
1036
+ {
1037
+ locale: 'uz-UZ',
1038
+ timezone: 'Asia/Tashkent',
1039
+ country: { name: 'Uzbekistan', code: 'UZ', flag: UzbekFlag },
1040
+ currency: {
1041
+ code: 'UZS',
1042
+ name: 'Uzbekistani Som',
1043
+ symbol: "so'm",
1044
+ externalCode: 'UZS',
1045
+ },
1046
+ mobileNumber: {
1047
+ areaCode: '+998',
1048
+ numOfDigits: 9,
1049
+ example: '901234567',
1050
+ pattern: /^(\+?998)?[79]\d{8}$/,
1051
+ },
1052
+ },
1053
+ {
1054
+ locale: 'vi-VN',
1055
+ timezone: 'Asia/Ho_Chi_Minh',
1056
+ country: { code: 'VN', name: 'Vietnam', flag: VietnameseFlag },
1057
+ currency: {
1058
+ code: 'VND',
1059
+ name: 'Vietnamese Dong',
1060
+ symbol: '₫',
1061
+ externalCode: 'VIRTUAL',
1062
+ },
1063
+ mobileNumber: {
1064
+ areaCode: '+84',
1065
+ numOfDigits: 9,
1066
+ example: `849${''.padStart(7, '0')}`,
1067
+ pattern: /^(\+?84|0)?(3[2-9]|5[6|8|9]|7[0|6-9]|8[1-6|8|9]|9[0-9])\d{7}$/,
1068
+ },
1069
+ },
1070
+ {
1071
+ locale: 'en-PH',
1072
+ timezone: 'Asia/Manila',
1073
+ country: { code: 'PH', name: 'Philippines', flag: PhilippineFlag },
1074
+ currency: {
1075
+ code: 'PHP',
1076
+ name: 'Philippine Peso',
1077
+ symbol: '₱',
1078
+ externalCode: 'PHP',
1079
+ },
1080
+ mobileNumber: {
1081
+ areaCode: '+63',
1082
+ numOfDigits: 10,
1083
+ example: `919${''.padStart(7, '0')}`,
1084
+ pattern: /^(\+?63|0)?9\d{9}$/,
1085
+ },
1086
+ },
1087
+ ];
1088
+ const DEFAULT_LOCALE = {
1089
+ locale: 'en-PH',
1090
+ timezone: 'Asia/Manila',
1091
+ country: { code: 'PH', name: 'Philippines', flag: PhilippineFlag },
1092
+ currency: {
1093
+ code: 'PHP',
1094
+ name: 'Philippine Peso',
1095
+ symbol: '₱',
1096
+ externalCode: 'PHP',
1097
+ },
1098
+ mobileNumber: {
1099
+ areaCode: '+63',
1100
+ numOfDigits: 10,
1101
+ example: `919${''.padStart(7, '0')}`,
1102
+ pattern: /^(\+?63|0)?9\d{9}$/,
1103
+ },
1104
+ };
3
1105
  export const getLocaleInfo = cache((timezone) => {
4
- switch (timezone.toLowerCase()) {
5
- case 'africa/algiers':
6
- return {
7
- locale: 'ar-DZ',
8
- timezone: 'Africa/Algiers',
9
- country: { name: 'Algeria', code: 'DZ', flag: AlgerianFlag },
10
- currency: {
11
- code: 'DZD',
12
- name: 'Algerian Dinar',
13
- symbol: 'د.ج',
14
- externalCode: 'DZD',
15
- },
16
- mobileNumber: {
17
- areaCode: '+213',
18
- numOfDigits: 9,
19
- example: '551234567',
20
- pattern: /^(\+?213|0)?[567]\d{8}$/,
21
- },
22
- };
23
- case 'america/aruba':
24
- return {
25
- locale: 'nl-AW',
26
- timezone: 'America/Aruba',
27
- country: { name: 'Aruba', code: 'AW', flag: ArubanFlag },
28
- currency: {
29
- code: 'AWG',
30
- name: 'Aruban Florin',
31
- symbol: 'ƒ',
32
- externalCode: 'AWG',
33
- },
34
- mobileNumber: {
35
- areaCode: '+297',
36
- numOfDigits: 7,
37
- example: '5601234',
38
- pattern: /^(\+?297)?[56]\d{6}$/,
39
- },
40
- };
41
- case 'australia/sydney':
42
- return {
43
- locale: 'en-AU',
44
- timezone: 'Australia/Sydney',
45
- country: { name: 'Australia', code: 'AU', flag: AustralianFlag },
46
- currency: {
47
- code: 'AUD',
48
- name: 'Australian Dollar',
49
- symbol: 'A$',
50
- externalCode: 'AUD',
51
- },
52
- mobileNumber: {
53
- areaCode: '+61',
54
- numOfDigits: 9,
55
- example: '412345678',
56
- pattern: /^(\+?61|0)?4\d{8}$/,
57
- },
58
- };
59
- case 'europe/vienna':
60
- return {
61
- locale: 'de-AT',
62
- timezone: 'Europe/Vienna',
63
- country: { name: 'Austria', code: 'AT', flag: AustrianFlag },
64
- currency: {
65
- code: 'EUR',
66
- name: 'Euro',
67
- symbol: '€',
68
- externalCode: 'EUR',
69
- },
70
- mobileNumber: {
71
- areaCode: '+43',
72
- numOfDigits: 11,
73
- example: '6641234567',
74
- pattern: /^(\+?43|0)?6\d{8,10}$/,
75
- },
76
- };
77
- case 'asia/bahrain':
78
- return {
79
- locale: 'ar-BH',
80
- timezone: 'Asia/Bahrain',
81
- country: { name: 'Bahrain', code: 'BH', flag: BahrainiFlag },
82
- currency: {
83
- code: 'BHD',
84
- name: 'Bahraini Dinar',
85
- symbol: '.د.ب',
86
- externalCode: 'BHD',
87
- },
88
- mobileNumber: {
89
- areaCode: '+973',
90
- numOfDigits: 8,
91
- example: '36123456',
92
- pattern: /^(\+?973)?[36]\d{7}$/,
93
- },
94
- };
95
- case 'europe/brussels':
96
- return {
97
- locale: 'nl-BE',
98
- timezone: 'Europe/Brussels',
99
- country: { name: 'Belgium', code: 'BE', flag: BelgianFlag },
100
- currency: {
101
- code: 'EUR',
102
- name: 'Euro',
103
- symbol: '€',
104
- externalCode: 'EUR',
105
- },
106
- mobileNumber: {
107
- areaCode: '+32',
108
- numOfDigits: 9,
109
- example: '471234567',
110
- pattern: /^(\+?32|0)?4\d{8}$/,
111
- },
112
- };
113
- case 'america/sao_paulo':
114
- return {
115
- locale: 'pt-BR',
116
- timezone: 'America/Sao_Paulo',
117
- country: { name: 'Brazil', code: 'BR', flag: BrazilianFlag },
118
- currency: {
119
- code: 'BRL',
120
- name: 'Brazilian Real',
121
- symbol: 'R$',
122
- externalCode: 'BRL',
123
- },
124
- mobileNumber: {
125
- areaCode: '+55',
126
- numOfDigits: 11,
127
- example: '11987654321',
128
- pattern: /^(\+?55)?[1-9]\d{10}$/,
129
- },
130
- };
131
- case 'asia/brunei':
132
- return {
133
- locale: 'ms-BN',
134
- timezone: 'Asia/Brunei',
135
- country: { name: 'Brunei Darussalam', code: 'BN', flag: BruneiFlag },
136
- currency: {
137
- code: 'BND',
138
- name: 'Brunei Dollar',
139
- symbol: 'B$',
140
- externalCode: 'BND',
141
- },
142
- mobileNumber: {
143
- areaCode: '+673',
144
- numOfDigits: 7,
145
- example: '7123456',
146
- pattern: /^(\+?673)?[78]\d{6}$/,
147
- },
148
- };
149
- case 'asia/phnom_penh':
150
- return {
151
- locale: 'km-KH',
152
- timezone: 'Asia/Phnom_Penh',
153
- country: { name: 'Cambodia', code: 'KH', flag: CambodianFlag },
154
- currency: {
155
- code: 'KHR',
156
- name: 'Cambodian Riel',
157
- symbol: '៛',
158
- externalCode: 'KHR',
159
- },
160
- mobileNumber: {
161
- areaCode: '+855',
162
- numOfDigits: 8,
163
- example: '12345678',
164
- pattern: /^(\+?855)?[1-9]\d{7}$/,
165
- },
166
- };
167
- case 'america/toronto':
168
- return {
169
- locale: 'en-CA',
170
- timezone: 'America/Toronto',
171
- country: { name: 'Canada', code: 'CA', flag: CanadianFlag },
172
- currency: {
173
- code: 'CAD',
174
- name: 'Canadian Dollar',
175
- symbol: 'C$',
176
- externalCode: 'CAD',
177
- },
178
- mobileNumber: {
179
- areaCode: '+1',
180
- numOfDigits: 10,
181
- example: '4161234567',
182
- pattern: /^(\+?1)?[2-9]\d{9}$/,
183
- },
184
- };
185
- case 'europe/zagreb':
186
- return {
187
- locale: 'hr-HR',
188
- timezone: 'Europe/Zagreb',
189
- country: { name: 'Croatia', code: 'HR', flag: CroatianFlag },
190
- currency: {
191
- code: 'HRK',
192
- name: 'Croatian Kuna',
193
- symbol: 'kn',
194
- externalCode: 'HRK',
195
- },
196
- mobileNumber: {
197
- areaCode: '+385',
198
- numOfDigits: 8,
199
- example: '91234567',
200
- pattern: /^(\+?385)?9\d{7}$/,
201
- },
202
- };
203
- case 'asia/nicosia':
204
- return {
205
- locale: 'el-CY',
206
- timezone: 'Asia/Nicosia',
207
- country: { name: 'Cyprus', code: 'CY', flag: CypriotFlag },
208
- currency: {
209
- code: 'EUR',
210
- name: 'Euro',
211
- symbol: '€',
212
- externalCode: 'EUR',
213
- },
214
- mobileNumber: {
215
- areaCode: '+357',
216
- numOfDigits: 8,
217
- example: '96123456',
218
- pattern: /^(\+?357)?9[6-9]\d{6}$/,
219
- },
220
- };
221
- case 'africa/cairo':
222
- return {
223
- locale: 'ar-EG',
224
- timezone: 'Africa/Cairo',
225
- country: { name: 'Egypt', code: 'EG', flag: EgyptianFlag },
226
- currency: {
227
- code: 'EGP',
228
- name: 'Egyptian Pound',
229
- symbol: 'E£',
230
- externalCode: 'EGP',
231
- },
232
- mobileNumber: {
233
- areaCode: '+20',
234
- numOfDigits: 10,
235
- example: '1012345678',
236
- pattern: /^(\+?20)?1[0-5]\d{8}$/,
237
- },
238
- };
239
- case 'europe/helsinki':
240
- return {
241
- locale: 'fi-FI',
242
- timezone: 'Europe/Helsinki',
243
- country: { name: 'Finland', code: 'FI', flag: FinnishFlag },
244
- currency: {
245
- code: 'EUR',
246
- name: 'Euro',
247
- symbol: '€',
248
- externalCode: 'EUR',
249
- },
250
- mobileNumber: {
251
- areaCode: '+358',
252
- numOfDigits: 9,
253
- example: '501234567',
254
- pattern: /^(\+?358|0)?[45]\d{8}$/,
255
- },
256
- };
257
- case 'europe/paris':
258
- return {
259
- locale: 'fr-FR',
260
- timezone: 'Europe/Paris',
261
- country: { name: 'France', code: 'FR', flag: FrenchFlag },
262
- currency: {
263
- code: 'EUR',
264
- name: 'Euro',
265
- symbol: '€',
266
- externalCode: 'EUR',
267
- },
268
- mobileNumber: {
269
- areaCode: '+33',
270
- numOfDigits: 9,
271
- example: '612345678',
272
- pattern: /^(\+?33|0)?[67]\d{8}$/,
273
- },
274
- };
275
- case 'europe/berlin':
276
- return {
277
- locale: 'de-DE',
278
- timezone: 'Europe/Berlin',
279
- country: { name: 'Germany', code: 'DE', flag: GermanFlag },
280
- currency: {
281
- code: 'EUR',
282
- name: 'Euro',
283
- symbol: '€',
284
- externalCode: 'EUR',
285
- },
286
- mobileNumber: {
287
- areaCode: '+49',
288
- numOfDigits: 11,
289
- example: '15123456789',
290
- pattern: /^(\+?49|0)?1[5-7]\d{8,9}$/,
291
- },
292
- };
293
- case 'europe/athens':
294
- return {
295
- locale: 'el-GR',
296
- timezone: 'Europe/Athens',
297
- country: { name: 'Greece', code: 'GR', flag: GreekFlag },
298
- currency: {
299
- code: 'EUR',
300
- name: 'Euro',
301
- symbol: '€',
302
- externalCode: 'EUR',
303
- },
304
- mobileNumber: {
305
- areaCode: '+30',
306
- numOfDigits: 10,
307
- example: '6912345678',
308
- pattern: /^(\+?30)?69\d{8}$/,
309
- },
310
- };
311
- case 'pacific/guam':
312
- return {
313
- locale: 'en-GU',
314
- timezone: 'Pacific/Guam',
315
- country: { name: 'Guam', code: 'GU', flag: GuamFlag },
316
- currency: {
317
- code: 'USD',
318
- name: 'US Dollar',
319
- symbol: '$',
320
- externalCode: 'USD',
321
- },
322
- mobileNumber: {
323
- areaCode: '+1671',
324
- numOfDigits: 7,
325
- example: '1234567',
326
- pattern: /^(\+?1671)?\d{7}$/,
327
- },
328
- };
329
- case 'asia/hong_kong':
330
- return {
331
- locale: 'zh-HK',
332
- timezone: 'Asia/Hong_Kong',
333
- country: { name: 'Hong Kong', code: 'HK', flag: HongKongFlag },
334
- currency: {
335
- code: 'HKD',
336
- name: 'Hong Kong Dollar',
337
- symbol: 'HK$',
338
- externalCode: 'HKD',
339
- },
340
- mobileNumber: {
341
- areaCode: '+852',
342
- numOfDigits: 8,
343
- example: '91234567',
344
- pattern: /^(\+?852)?[569]\d{7}$/,
345
- },
346
- };
347
- case 'europe/budapest':
348
- return {
349
- locale: 'hu-HU',
350
- timezone: 'Europe/Budapest',
351
- country: { name: 'Hungary', code: 'HU', flag: HungarianFlag },
352
- currency: {
353
- code: 'HUF',
354
- name: 'Hungarian Forint',
355
- symbol: 'Ft',
356
- externalCode: 'HUF',
357
- },
358
- mobileNumber: {
359
- areaCode: '+36',
360
- numOfDigits: 9,
361
- example: '301234567',
362
- pattern: /^(\+?36)?[237]\d{8}$/,
363
- },
364
- };
365
- case 'asia/kolkata':
366
- return {
367
- locale: 'en-IN',
368
- timezone: 'Asia/Kolkata',
369
- country: { code: 'IN', name: 'India', flag: IndianFlag },
370
- currency: {
371
- code: 'INR',
372
- name: 'Indian Rupee',
373
- symbol: '₹',
374
- externalCode: 'INR',
375
- },
376
- mobileNumber: {
377
- areaCode: '+91',
378
- numOfDigits: 10,
379
- example: `919${''.padStart(7, '0')}`,
380
- pattern: /^(\+?91|0)?[789]\d{9}$/,
381
- },
382
- };
383
- case 'asia/jakarta':
384
- case 'asia/jayapura':
385
- case 'asia/makassar':
386
- return {
387
- locale: 'id-ID',
388
- timezone,
389
- country: { name: 'Indonesia', code: 'ID', flag: IndonesianFlag },
390
- currency: {
391
- code: 'IDR',
392
- name: 'Indonesian Rupiah',
393
- symbol: 'Rp',
394
- externalCode: 'IDR',
395
- },
396
- mobileNumber: {
397
- areaCode: '+62',
398
- numOfDigits: 10,
399
- example: `81${''.padStart(8, '0')}`,
400
- pattern: /^(\+?62|0)?8\d{9}$/,
401
- },
402
- };
403
- case 'asia/baghdad':
404
- return {
405
- locale: 'ar-IQ',
406
- timezone: 'Asia/Baghdad',
407
- country: { name: 'Iraq', code: 'IQ', flag: IraqiFlag },
408
- currency: {
409
- code: 'IQD',
410
- name: 'Iraqi Dinar',
411
- symbol: 'ع.د',
412
- externalCode: 'IQD',
413
- },
414
- mobileNumber: {
415
- areaCode: '+964',
416
- numOfDigits: 10,
417
- example: '7901234567',
418
- pattern: /^(\+?964)?7[789]\d{8}$/,
419
- },
420
- };
421
- case 'europe/dublin':
422
- return {
423
- locale: 'en-IE',
424
- timezone: 'Europe/Dublin',
425
- country: { name: 'Ireland', code: 'IE', flag: IrishFlag },
426
- currency: {
427
- code: 'EUR',
428
- name: 'Euro',
429
- symbol: '€',
430
- externalCode: 'EUR',
431
- },
432
- mobileNumber: {
433
- areaCode: '+353',
434
- numOfDigits: 9,
435
- example: '851234567',
436
- pattern: /^(\+?353|0)?8[356-9]\d{7}$/,
437
- },
438
- };
439
- case 'asia/jerusalem':
440
- return {
441
- locale: 'he-IL',
442
- timezone: 'Asia/Jerusalem',
443
- country: { name: 'Israel', code: 'IL', flag: IsraeliFlag },
444
- currency: {
445
- code: 'ILS',
446
- name: 'Israeli Shekel',
447
- symbol: '₪',
448
- externalCode: 'ILS',
449
- },
450
- mobileNumber: {
451
- areaCode: '+972',
452
- numOfDigits: 9,
453
- example: '501234567',
454
- pattern: /^(\+?972|0)?5[0-9]\d{7}$/,
455
- },
456
- };
457
- case 'europe/rome':
458
- return {
459
- locale: 'it-IT',
460
- timezone: 'Europe/Rome',
461
- country: { name: 'Italy', code: 'IT', flag: ItalianFlag },
462
- currency: {
463
- code: 'EUR',
464
- name: 'Euro',
465
- symbol: '€',
466
- externalCode: 'EUR',
467
- },
468
- mobileNumber: {
469
- areaCode: '+39',
470
- numOfDigits: 10,
471
- example: '3123456789',
472
- pattern: /^(\+?39)?3\d{9}$/,
473
- },
474
- };
475
- case 'asia/tokyo':
476
- return {
477
- locale: 'ja-JP',
478
- timezone: 'Asia/Tokyo',
479
- country: { name: 'Japan', code: 'JP', flag: JapaneseFlag },
480
- currency: {
481
- code: 'JPY',
482
- name: 'Japanese Yen',
483
- symbol: '¥',
484
- externalCode: 'JPY',
485
- },
486
- mobileNumber: {
487
- areaCode: '+81',
488
- numOfDigits: 11,
489
- example: '09012345678',
490
- pattern: /^(\+?81|0)?[789]0\d{8}$/,
491
- },
492
- };
493
- case 'asia/amman':
494
- return {
495
- locale: 'ar-JO',
496
- timezone: 'Asia/Amman',
497
- country: { name: 'Jordan', code: 'JO', flag: JordanianFlag },
498
- currency: {
499
- code: 'JOD',
500
- name: 'Jordanian Dinar',
501
- symbol: 'د.ا',
502
- externalCode: 'JOD',
503
- },
504
- mobileNumber: {
505
- areaCode: '+962',
506
- numOfDigits: 9,
507
- example: '791234567',
508
- pattern: /^(\+?962)?7[789]\d{7}$/,
509
- },
510
- };
511
- case 'asia/kuwait':
512
- return {
513
- locale: 'ar-KW',
514
- timezone: 'Asia/Kuwait',
515
- country: { name: 'Kuwait', code: 'KW', flag: KuwaitiFlag },
516
- currency: {
517
- code: 'KWD',
518
- name: 'Kuwaiti Dinar',
519
- symbol: 'د.ك',
520
- externalCode: 'KWD',
521
- },
522
- mobileNumber: {
523
- areaCode: '+965',
524
- numOfDigits: 8,
525
- example: '51234567',
526
- pattern: /^(\+?965)?[569]\d{7}$/,
527
- },
528
- };
529
- case 'europe/riga':
530
- return {
531
- locale: 'lv-LV',
532
- timezone: 'Europe/Riga',
533
- country: { name: 'Latvia', code: 'LV', flag: LatvianFlag },
534
- currency: {
535
- code: 'EUR',
536
- name: 'Euro',
537
- symbol: '€',
538
- externalCode: 'EUR',
539
- },
540
- mobileNumber: {
541
- areaCode: '+371',
542
- numOfDigits: 8,
543
- example: '21234567',
544
- pattern: /^(\+?371)?2\d{7}$/,
545
- },
546
- };
547
- case 'asia/beirut':
548
- return {
549
- locale: 'ar-LB',
550
- timezone: 'Asia/Beirut',
551
- country: { name: 'Lebanon', code: 'LB', flag: LebaneseFlag },
552
- currency: {
553
- code: 'LBP',
554
- name: 'Lebanese Pound',
555
- symbol: 'ل.ل',
556
- externalCode: 'LBP',
557
- },
558
- mobileNumber: {
559
- areaCode: '+961',
560
- numOfDigits: 8,
561
- example: '71234567',
562
- pattern: /^(\+?961)?[37-9]\d{7}$/,
563
- },
564
- };
565
- case 'europe/vilnius':
566
- return {
567
- locale: 'lt-LT',
568
- timezone: 'Europe/Vilnius',
569
- country: { name: 'Lithuania', code: 'LT', flag: LithuanianFlag },
570
- currency: {
571
- code: 'EUR',
572
- name: 'Euro',
573
- symbol: '€',
574
- externalCode: 'EUR',
575
- },
576
- mobileNumber: {
577
- areaCode: '+370',
578
- numOfDigits: 8,
579
- example: '61234567',
580
- pattern: /^(\+?370)?6\d{7}$/,
581
- },
582
- };
583
- case 'europe/luxembourg':
584
- return {
585
- locale: 'fr-LU',
586
- timezone: 'Europe/Luxembourg',
587
- country: { name: 'Luxembourg', code: 'LU', flag: LuxembourgFlag },
588
- currency: {
589
- code: 'EUR',
590
- name: 'Euro',
591
- symbol: '€',
592
- externalCode: 'EUR',
593
- },
594
- mobileNumber: {
595
- areaCode: '+352',
596
- numOfDigits: 9,
597
- example: '621234567',
598
- pattern: /^(\+?352)?6\d{8}$/,
599
- },
600
- };
601
- case 'asia/macau':
602
- return {
603
- locale: 'zh-MO',
604
- timezone: 'Asia/Macau',
605
- country: { name: 'Macau', code: 'MO', flag: MacauFlag },
606
- currency: {
607
- code: 'HKD',
608
- name: 'Hong Kong Dollar',
609
- symbol: 'HK$',
610
- externalCode: 'HKD',
611
- },
612
- mobileNumber: {
613
- areaCode: '+853',
614
- numOfDigits: 8,
615
- example: '61234567',
616
- pattern: /^(\+?853)?6\d{7}$/,
617
- },
618
- };
619
- case 'asia/kuala_lumpur':
620
- return {
621
- locale: 'ms-MY',
622
- timezone: 'Asia/Kuala_Lumpur',
623
- country: { name: 'Malaysia', code: 'MY', flag: MalaysianFlag },
624
- currency: {
625
- code: 'MYR',
626
- name: 'Malaysian Ringgit',
627
- symbol: 'RM',
628
- externalCode: 'MYR',
629
- },
630
- mobileNumber: {
631
- areaCode: '+60',
632
- numOfDigits: 9,
633
- example: `12${''.padStart(7, '0')}`,
634
- pattern: /^(\+?60|0)?1[0-9]{1}\d{7}$/,
635
- },
636
- };
637
- case 'europe/malta':
638
- return {
639
- locale: 'mt-MT',
640
- timezone: 'Europe/Malta',
641
- country: { name: 'Malta', code: 'MT', flag: MalteseFlag },
642
- currency: {
643
- code: 'EUR',
644
- name: 'Euro',
645
- symbol: '€',
646
- externalCode: 'EUR',
647
- },
648
- mobileNumber: {
649
- areaCode: '+356',
650
- numOfDigits: 8,
651
- example: '79123456',
652
- pattern: /^(\+?356)?[79]\d{7}$/,
653
- },
654
- };
655
- case 'europe/amsterdam':
656
- return {
657
- locale: 'nl-NL',
658
- timezone: 'Europe/Amsterdam',
659
- country: { name: 'Netherlands', code: 'NL', flag: DutchFlag },
660
- currency: {
661
- code: 'EUR',
662
- name: 'Euro',
663
- symbol: '€',
664
- externalCode: 'EUR',
665
- },
666
- mobileNumber: {
667
- areaCode: '+31',
668
- numOfDigits: 9,
669
- example: '612345678',
670
- pattern: /^(\+?31|0)?6\d{8}$/,
671
- },
672
- };
673
- case 'pacific/auckland':
674
- return {
675
- locale: 'en-NZ',
676
- timezone: 'Pacific/Auckland',
677
- country: { name: 'New Zealand', code: 'NZ', flag: NewZealandFlag },
678
- currency: {
679
- code: 'NZD',
680
- name: 'New Zealand Dollar',
681
- symbol: 'NZ$',
682
- externalCode: 'NZD',
683
- },
684
- mobileNumber: {
685
- areaCode: '+64',
686
- numOfDigits: 9,
687
- example: '211234567',
688
- pattern: /^(\+?64|0)?2[1-9]\d{7}$/,
689
- },
690
- };
691
- case 'pacific/saipan':
692
- return {
693
- locale: 'en-MP',
694
- timezone: 'Pacific/Saipan',
695
- country: {
696
- name: 'Northern Mariana Islands',
697
- code: 'MP',
698
- flag: NorthernMarianaIslandsFlag,
699
- },
700
- currency: {
701
- code: 'USD',
702
- name: 'US Dollar',
703
- symbol: '$',
704
- externalCode: 'USD',
705
- },
706
- mobileNumber: {
707
- areaCode: '+1670',
708
- numOfDigits: 7,
709
- example: '1234567',
710
- pattern: /^(\+?1670)?\d{7}$/,
711
- },
712
- };
713
- case 'europe/oslo':
714
- return {
715
- locale: 'no-NO',
716
- timezone: 'Europe/Oslo',
717
- country: { name: 'Norway', code: 'NO', flag: NorwegianFlag },
718
- currency: {
719
- code: 'NOK',
720
- name: 'Norwegian Krone',
721
- symbol: 'kr',
722
- externalCode: 'NOK',
723
- },
724
- mobileNumber: {
725
- areaCode: '+47',
726
- numOfDigits: 8,
727
- example: '41234567',
728
- pattern: /^(\+?47)?[49]\d{7}$/,
729
- },
730
- };
731
- case 'asia/muscat':
732
- return {
733
- locale: 'ar-OM',
734
- timezone: 'Asia/Muscat',
735
- country: { name: 'Oman', code: 'OM', flag: OmaniFlag },
736
- currency: {
737
- code: 'OMR',
738
- name: 'Omani Rial',
739
- symbol: 'ر.ع.',
740
- externalCode: 'OMR',
741
- },
742
- mobileNumber: {
743
- areaCode: '+968',
744
- numOfDigits: 8,
745
- example: '91234567',
746
- pattern: /^(\+?968)?[79]\d{7}$/,
747
- },
748
- };
749
- case 'europe/warsaw':
750
- return {
751
- locale: 'pl-PL',
752
- timezone: 'Europe/Warsaw',
753
- country: { name: 'Poland', code: 'PL', flag: PolishFlag },
754
- currency: {
755
- code: 'PLN',
756
- name: 'Polish Zloty',
757
- symbol: 'zł',
758
- externalCode: 'PLN',
759
- },
760
- mobileNumber: {
761
- areaCode: '+48',
762
- numOfDigits: 9,
763
- example: '512345678',
764
- pattern: /^(\+?48)?[5-9]\d{8}$/,
765
- },
766
- };
767
- case 'europe/lisbon':
768
- return {
769
- locale: 'pt-PT',
770
- timezone: 'Europe/Lisbon',
771
- country: { name: 'Portugal', code: 'PT', flag: PortugueseFlag },
772
- currency: {
773
- code: 'EUR',
774
- name: 'Euro',
775
- symbol: '€',
776
- externalCode: 'EUR',
777
- },
778
- mobileNumber: {
779
- areaCode: '+351',
780
- numOfDigits: 9,
781
- example: '912345678',
782
- pattern: /^(\+?351)?9[1236]\d{7}$/,
783
- },
784
- };
785
- case 'asia/qatar':
786
- return {
787
- locale: 'ar-QA',
788
- timezone: 'Asia/Qatar',
789
- country: { name: 'Qatar', code: 'QA', flag: QatariFlag },
790
- currency: {
791
- code: 'QAR',
792
- name: 'Qatari Riyal',
793
- symbol: 'ر.ق',
794
- externalCode: 'QAR',
795
- },
796
- mobileNumber: {
797
- areaCode: '+974',
798
- numOfDigits: 8,
799
- example: '33123456',
800
- pattern: /^(\+?974)?[3567]\d{7}$/,
801
- },
802
- };
803
- case 'europe/bucharest':
804
- return {
805
- locale: 'ro-RO',
806
- timezone: 'Europe/Bucharest',
807
- country: { name: 'Romania', code: 'RO', flag: RomanianFlag },
808
- currency: {
809
- code: 'RON',
810
- name: 'Romanian Leu',
811
- symbol: 'lei',
812
- externalCode: 'RON',
813
- },
814
- mobileNumber: {
815
- areaCode: '+40',
816
- numOfDigits: 9,
817
- example: '712345678',
818
- pattern: /^(\+?40)?7\d{8}$/,
819
- },
820
- };
821
- case 'asia/riyadh':
822
- return {
823
- locale: 'ar-SA',
824
- timezone: 'Asia/Riyadh',
825
- country: { name: 'Saudi Arabia', code: 'SA', flag: SaudiArabianFlag },
826
- currency: {
827
- code: 'SAR',
828
- name: 'Saudi Riyal',
829
- symbol: 'ر.س',
830
- externalCode: 'SAR',
831
- },
832
- mobileNumber: {
833
- areaCode: '+966',
834
- numOfDigits: 9,
835
- example: '501234567',
836
- pattern: /^(\+?966)?5\d{8}$/,
837
- },
838
- };
839
- case 'asia/singapore':
840
- return {
841
- locale: 'en-SG',
842
- timezone: 'Asia/Singapore',
843
- country: { name: 'Singapore', code: 'SG', flag: SingaporeanFlag },
844
- currency: {
845
- code: 'SGD',
846
- name: 'Singapore Dollar',
847
- symbol: 'S$',
848
- externalCode: 'SGD',
849
- },
850
- mobileNumber: {
851
- areaCode: '+65',
852
- numOfDigits: 8,
853
- example: '81234567',
854
- pattern: /^(\+?65)?[89]\d{7}$/,
855
- },
856
- };
857
- case 'europe/bratislava':
858
- return {
859
- locale: 'sk-SK',
860
- timezone: 'Europe/Bratislava',
861
- country: { name: 'Slovakia', code: 'SK', flag: SlovakFlag },
862
- currency: {
863
- code: 'EUR',
864
- name: 'Euro',
865
- symbol: '€',
866
- externalCode: 'EUR',
867
- },
868
- mobileNumber: {
869
- areaCode: '+421',
870
- numOfDigits: 9,
871
- example: '901234567',
872
- pattern: /^(\+?421)?9\d{8}$/,
873
- },
874
- };
875
- case 'asia/seoul':
876
- return {
877
- locale: 'ko-KR',
878
- timezone: 'Asia/Seoul',
879
- country: { name: 'South Korea', code: 'KR', flag: SouthKoreanFlag },
880
- currency: {
881
- code: 'KRW',
882
- name: 'Korean Won',
883
- symbol: '₩',
884
- externalCode: 'KRW',
885
- },
886
- mobileNumber: {
887
- areaCode: '+82',
888
- numOfDigits: 11,
889
- example: '01012345678',
890
- pattern: /^(\+?82|0)?1[0-9]\d{8}$/,
891
- },
892
- };
893
- case 'europe/madrid':
894
- return {
895
- locale: 'es-ES',
896
- timezone: 'Europe/Madrid',
897
- country: { name: 'Spain', code: 'ES', flag: SpanishFlag },
898
- currency: {
899
- code: 'EUR',
900
- name: 'Euro',
901
- symbol: '€',
902
- externalCode: 'EUR',
903
- },
904
- mobileNumber: {
905
- areaCode: '+34',
906
- numOfDigits: 9,
907
- example: '612345678',
908
- pattern: /^(\+?34)?[67]\d{8}$/,
909
- },
910
- };
911
- case 'europe/stockholm':
912
- return {
913
- locale: 'sv-SE',
914
- timezone: 'Europe/Stockholm',
915
- country: { name: 'Sweden', code: 'SE', flag: SwedishFlag },
916
- currency: {
917
- code: 'SEK',
918
- name: 'Swedish Krona',
919
- symbol: 'kr',
920
- externalCode: 'SEK',
921
- },
922
- mobileNumber: {
923
- areaCode: '+46',
924
- numOfDigits: 9,
925
- example: '701234567',
926
- pattern: /^(\+?46|0)?7\d{8}$/,
927
- },
928
- };
929
- case 'europe/zurich':
930
- return {
931
- locale: 'de-CH',
932
- timezone: 'Europe/Zurich',
933
- country: { name: 'Switzerland', code: 'CH', flag: SwissFlag },
934
- currency: {
935
- code: 'CHF',
936
- name: 'Swiss Franc',
937
- symbol: 'CHF',
938
- externalCode: 'CHF',
939
- },
940
- mobileNumber: {
941
- areaCode: '+41',
942
- numOfDigits: 9,
943
- example: '761234567',
944
- pattern: /^(\+?41|0)?7[5-9]\d{7}$/,
945
- },
946
- };
947
- case 'africa/sao_tome':
948
- return {
949
- locale: 'pt-ST',
950
- timezone: 'Africa/Sao_Tome',
951
- country: {
952
- name: 'São Tomé and Príncipe',
953
- code: 'ST',
954
- flag: SaoTomeFlag,
955
- },
956
- currency: {
957
- code: 'STN',
958
- name: 'São Tomé and Príncipe Dobra',
959
- symbol: 'Db',
960
- externalCode: 'STN',
961
- },
962
- mobileNumber: {
963
- areaCode: '+239',
964
- numOfDigits: 7,
965
- example: '9123456',
966
- pattern: /^(\+?239)?9\d{6}$/,
967
- },
968
- };
969
- case 'asia/taipei':
970
- return {
971
- locale: 'zh-TW',
972
- timezone: 'Asia/Taipei',
973
- country: { name: 'Taiwan', code: 'TW', flag: TaiwaneseFlag },
974
- currency: {
975
- code: 'TWD',
976
- name: 'Taiwan Dollar',
977
- symbol: 'NT$',
978
- externalCode: 'TWD',
979
- },
980
- mobileNumber: {
981
- areaCode: '+886',
982
- numOfDigits: 9,
983
- example: '912345678',
984
- pattern: /^(\+?886|0)?9\d{8}$/,
985
- },
986
- };
987
- case 'africa/dar_es_salaam':
988
- return {
989
- locale: 'sw-TZ',
990
- timezone: 'Africa/Dar_es_Salaam',
991
- country: { name: 'Tanzania', code: 'TZ', flag: TanzanianFlag },
992
- currency: {
993
- code: 'TZS',
994
- name: 'Tanzanian Shilling',
995
- symbol: 'TSh',
996
- externalCode: 'TZS',
997
- },
998
- mobileNumber: {
999
- areaCode: '+255',
1000
- numOfDigits: 9,
1001
- example: '712345678',
1002
- pattern: /^(\+?255)?[67]\d{8}$/,
1003
- },
1004
- };
1005
- case 'america/port_of_spain':
1006
- return {
1007
- locale: 'en-TT',
1008
- timezone: 'America/Port_of_Spain',
1009
- country: {
1010
- name: 'Trinidad and Tobago',
1011
- code: 'TT',
1012
- flag: TrinidadianFlag,
1013
- },
1014
- currency: {
1015
- code: 'TTD',
1016
- name: 'Trinidad and Tobago Dollar',
1017
- symbol: 'TT$',
1018
- externalCode: 'TTD',
1019
- },
1020
- mobileNumber: {
1021
- areaCode: '+1868',
1022
- numOfDigits: 7,
1023
- example: '1234567',
1024
- pattern: /^(\+?1868)?\d{7}$/,
1025
- },
1026
- };
1027
- case 'europe/istanbul':
1028
- return {
1029
- locale: 'tr-TR',
1030
- timezone: 'Europe/Istanbul',
1031
- country: { name: 'Türkiye', code: 'TR', flag: TurkishFlag },
1032
- currency: {
1033
- code: 'TRY',
1034
- name: 'Turkish Lira',
1035
- symbol: '₺',
1036
- externalCode: 'TRY',
1037
- },
1038
- mobileNumber: {
1039
- areaCode: '+90',
1040
- numOfDigits: 10,
1041
- example: '5123456789',
1042
- pattern: /^(\+?90|0)?5\d{9}$/,
1043
- },
1044
- };
1045
- case 'asia/dubai':
1046
- return {
1047
- locale: 'ar-AE',
1048
- timezone: 'Asia/Dubai',
1049
- country: { name: 'United Arab Emirates', code: 'AE', flag: UAEFlag },
1050
- currency: {
1051
- code: 'AED',
1052
- name: 'UAE Dirham',
1053
- symbol: 'د.إ',
1054
- externalCode: 'AED',
1055
- },
1056
- mobileNumber: {
1057
- areaCode: '+971',
1058
- numOfDigits: 9,
1059
- example: '501234567',
1060
- pattern: /^(\+?971)?5[0-9]\d{7}$/,
1061
- },
1062
- };
1063
- case 'europe/london':
1064
- return {
1065
- locale: 'en-GB',
1066
- timezone: 'Europe/London',
1067
- country: { name: 'United Kingdom', code: 'GB', flag: BritishFlag },
1068
- currency: {
1069
- code: 'GBP',
1070
- name: 'British Pound',
1071
- symbol: '£',
1072
- externalCode: 'GBP',
1073
- },
1074
- mobileNumber: {
1075
- areaCode: '+44',
1076
- numOfDigits: 10,
1077
- example: '7123456789',
1078
- pattern: /^(\+?44|0)?7\d{9}$/,
1079
- },
1080
- };
1081
- case 'america/new_york':
1082
- return {
1083
- locale: 'en-US',
1084
- timezone: 'America/New_York',
1085
- country: { name: 'United States', code: 'US', flag: AmericanFlag },
1086
- currency: {
1087
- code: 'USD',
1088
- name: 'US Dollar',
1089
- symbol: '$',
1090
- externalCode: 'USD',
1091
- },
1092
- mobileNumber: {
1093
- areaCode: '+1',
1094
- numOfDigits: 10,
1095
- example: '2125551234',
1096
- pattern: /^(\+?1)?[2-9]\d{9}$/,
1097
- },
1098
- };
1099
- case 'asia/tashkent':
1100
- return {
1101
- locale: 'uz-UZ',
1102
- timezone: 'Asia/Tashkent',
1103
- country: { name: 'Uzbekistan', code: 'UZ', flag: UzbekFlag },
1104
- currency: {
1105
- code: 'UZS',
1106
- name: 'Uzbekistani Som',
1107
- symbol: "so'm",
1108
- externalCode: 'UZS',
1109
- },
1110
- mobileNumber: {
1111
- areaCode: '+998',
1112
- numOfDigits: 9,
1113
- example: '901234567',
1114
- pattern: /^(\+?998)?[79]\d{8}$/,
1115
- },
1116
- };
1117
- case 'asia/ho_chi_minh':
1118
- return {
1119
- locale: 'vi-VN',
1120
- timezone: 'Asia/Ho_Chi_Minh',
1121
- country: { code: 'VN', name: 'Vietnam', flag: VietnameseFlag },
1122
- currency: {
1123
- code: 'VND',
1124
- name: 'Vietnamese Dong',
1125
- symbol: '₫',
1126
- externalCode: 'VIRTUAL',
1127
- },
1128
- mobileNumber: {
1129
- areaCode: '+84',
1130
- numOfDigits: 9,
1131
- example: `849${''.padStart(7, '0')}`,
1132
- pattern: /^(\+?84|0)?(3[2-9]|5[6|8|9]|7[0|6-9]|8[1-6|8|9]|9[0-9])\d{7}$/,
1133
- },
1134
- };
1135
- default:
1136
- return {
1137
- locale: 'en-PH',
1138
- timezone: 'Asia/Manila',
1139
- country: { code: 'PH', name: 'Philippines', flag: PhilippineFlag },
1140
- currency: {
1141
- code: 'PHP',
1142
- name: 'Philippine Peso',
1143
- symbol: '₱',
1144
- externalCode: 'PHP',
1145
- },
1146
- mobileNumber: {
1147
- areaCode: '+63',
1148
- numOfDigits: 10,
1149
- example: `919${''.padStart(7, '0')}`,
1150
- pattern: /^(\+?63|0)?9\d{9}$/,
1151
- },
1152
- };
1106
+ // Special cases that map to Indonesia
1107
+ if (timezone.toLowerCase() === 'asia/jayapura' ||
1108
+ timezone.toLowerCase() === 'asia/makassar') {
1109
+ const indonesia = LOCALE_DATA.find((l) => l.timezone === 'Asia/Jakarta');
1110
+ if (indonesia) {
1111
+ return { ...indonesia, timezone: timezone };
1112
+ }
1153
1113
  }
1114
+ return (LOCALE_DATA.find((l) => l.timezone.toLowerCase() === timezone.toLowerCase()) ??
1115
+ DEFAULT_LOCALE);
1154
1116
  });
1117
+ export const getLocale = (timezone, phoneCode) => {
1118
+ // 1. Primary Lookup: Filter by phone code
1119
+ const matchingPhoneCodes = LOCALE_DATA.filter((l) => l.mobileNumber.areaCode === phoneCode);
1120
+ if (matchingPhoneCodes.length === 0) {
1121
+ // 1a. Fallback: If no phone code matches found, try to find by timezone
1122
+ const timezoneMatch = LOCALE_DATA.find((l) => l.timezone.toLowerCase() === timezone.toLowerCase());
1123
+ if (timezoneMatch) {
1124
+ return timezoneMatch;
1125
+ }
1126
+ // 4. Default: If neither matches, fallback to default
1127
+ return DEFAULT_LOCALE;
1128
+ }
1129
+ if (matchingPhoneCodes.length === 1) {
1130
+ // Optimization: If only one match, return it
1131
+ return matchingPhoneCodes[0];
1132
+ }
1133
+ // 2. Secondary Check: If multiple matches found for phone code, find the one where timezone matches
1134
+ const exactMatch = matchingPhoneCodes.find((l) => l.timezone.toLowerCase() === timezone.toLowerCase());
1135
+ if (exactMatch) {
1136
+ return exactMatch;
1137
+ }
1138
+ // 3. Fallback: If no exact timezone match among the phone number candidates, return the first candidate matching the phoneCode
1139
+ return matchingPhoneCodes[0];
1140
+ };
1141
+ export const extractPhoneCode = (mobileNumber) => {
1142
+ // Normalize: Ensure starts with +
1143
+ const normalized = mobileNumber.startsWith('+')
1144
+ ? mobileNumber
1145
+ : `+${mobileNumber}`;
1146
+ // Sort codes by length (descending) to match longest prefix first (e.g. +1671 vs +1)
1147
+ const sortedCodes = [...LOCALE_DATA]
1148
+ .map((l) => l.mobileNumber.areaCode)
1149
+ .sort((a, b) => b.length - a.length);
1150
+ // Find unique codes to avoid redundant checks
1151
+ const uniqueCodes = [...new Set(sortedCodes)];
1152
+ for (const code of uniqueCodes) {
1153
+ if (normalized.startsWith(code)) {
1154
+ return code;
1155
+ }
1156
+ }
1157
+ return undefined;
1158
+ };