utilitify-core 1.0.0

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 (147) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +338 -0
  3. package/dist/async.cjs +25 -0
  4. package/dist/async.cjs.map +1 -0
  5. package/dist/async.d.cts +104 -0
  6. package/dist/async.d.ts +104 -0
  7. package/dist/async.js +4 -0
  8. package/dist/async.js.map +1 -0
  9. package/dist/chunk-2ICNRTSN.cjs +346 -0
  10. package/dist/chunk-2ICNRTSN.cjs.map +1 -0
  11. package/dist/chunk-3DPF72DY.js +170 -0
  12. package/dist/chunk-3DPF72DY.js.map +1 -0
  13. package/dist/chunk-4CV4JOE5.js +24 -0
  14. package/dist/chunk-4CV4JOE5.js.map +1 -0
  15. package/dist/chunk-4SLYNSLH.cjs +783 -0
  16. package/dist/chunk-4SLYNSLH.cjs.map +1 -0
  17. package/dist/chunk-5WP7DWCG.js +1285 -0
  18. package/dist/chunk-5WP7DWCG.js.map +1 -0
  19. package/dist/chunk-BMQ6YPKV.js +876 -0
  20. package/dist/chunk-BMQ6YPKV.js.map +1 -0
  21. package/dist/chunk-BZCMWUKS.cjs +479 -0
  22. package/dist/chunk-BZCMWUKS.cjs.map +1 -0
  23. package/dist/chunk-C5R744DY.cjs +173 -0
  24. package/dist/chunk-C5R744DY.cjs.map +1 -0
  25. package/dist/chunk-C75J62CV.cjs +913 -0
  26. package/dist/chunk-C75J62CV.cjs.map +1 -0
  27. package/dist/chunk-CZLDE2OZ.cjs +28 -0
  28. package/dist/chunk-CZLDE2OZ.cjs.map +1 -0
  29. package/dist/chunk-DSMB6AF6.cjs +193 -0
  30. package/dist/chunk-DSMB6AF6.cjs.map +1 -0
  31. package/dist/chunk-ETWGPOPY.js +426 -0
  32. package/dist/chunk-ETWGPOPY.js.map +1 -0
  33. package/dist/chunk-FQBPVN63.cjs +403 -0
  34. package/dist/chunk-FQBPVN63.cjs.map +1 -0
  35. package/dist/chunk-G4GYQGTW.cjs +178 -0
  36. package/dist/chunk-G4GYQGTW.cjs.map +1 -0
  37. package/dist/chunk-GFDMZDMI.js +486 -0
  38. package/dist/chunk-GFDMZDMI.js.map +1 -0
  39. package/dist/chunk-HOTOYIPB.js +171 -0
  40. package/dist/chunk-HOTOYIPB.js.map +1 -0
  41. package/dist/chunk-HYADH4ZX.js +176 -0
  42. package/dist/chunk-HYADH4ZX.js.map +1 -0
  43. package/dist/chunk-JBN7C5WE.js +255 -0
  44. package/dist/chunk-JBN7C5WE.js.map +1 -0
  45. package/dist/chunk-JNCTPFTD.cjs +25 -0
  46. package/dist/chunk-JNCTPFTD.cjs.map +1 -0
  47. package/dist/chunk-N3BH3BV7.js +21 -0
  48. package/dist/chunk-N3BH3BV7.js.map +1 -0
  49. package/dist/chunk-NFPGAVRQ.js +749 -0
  50. package/dist/chunk-NFPGAVRQ.js.map +1 -0
  51. package/dist/chunk-OFFRGRBN.cjs +1332 -0
  52. package/dist/chunk-OFFRGRBN.cjs.map +1 -0
  53. package/dist/chunk-OZLKYIZL.cjs +490 -0
  54. package/dist/chunk-OZLKYIZL.cjs.map +1 -0
  55. package/dist/chunk-P3NUK46X.js +145 -0
  56. package/dist/chunk-P3NUK46X.js.map +1 -0
  57. package/dist/chunk-P7P2B7ZI.cjs +429 -0
  58. package/dist/chunk-P7P2B7ZI.cjs.map +1 -0
  59. package/dist/chunk-PB6SKSJN.cjs +150 -0
  60. package/dist/chunk-PB6SKSJN.cjs.map +1 -0
  61. package/dist/chunk-R3IXCJR7.js +378 -0
  62. package/dist/chunk-R3IXCJR7.js.map +1 -0
  63. package/dist/chunk-SD6P3WEJ.js +324 -0
  64. package/dist/chunk-SD6P3WEJ.js.map +1 -0
  65. package/dist/chunk-YSCHP26P.js +451 -0
  66. package/dist/chunk-YSCHP26P.js.map +1 -0
  67. package/dist/chunk-ZLMPRPCY.cjs +274 -0
  68. package/dist/chunk-ZLMPRPCY.cjs.map +1 -0
  69. package/dist/common-CBDYNJeh.d.cts +48 -0
  70. package/dist/common-CBDYNJeh.d.ts +48 -0
  71. package/dist/constants.cjs +42 -0
  72. package/dist/constants.cjs.map +1 -0
  73. package/dist/constants.d.cts +60 -0
  74. package/dist/constants.d.ts +60 -0
  75. package/dist/constants.js +5 -0
  76. package/dist/constants.js.map +1 -0
  77. package/dist/country/index.cjs +154 -0
  78. package/dist/country/index.cjs.map +1 -0
  79. package/dist/country/index.d.cts +1 -0
  80. package/dist/country/index.d.ts +1 -0
  81. package/dist/country/index.js +5 -0
  82. package/dist/country/index.js.map +1 -0
  83. package/dist/date/index.cjs +117 -0
  84. package/dist/date/index.cjs.map +1 -0
  85. package/dist/date/index.d.cts +283 -0
  86. package/dist/date/index.d.ts +283 -0
  87. package/dist/date/index.js +4 -0
  88. package/dist/date/index.js.map +1 -0
  89. package/dist/environment/index.cjs +73 -0
  90. package/dist/environment/index.cjs.map +1 -0
  91. package/dist/environment/index.d.cts +127 -0
  92. package/dist/environment/index.d.ts +127 -0
  93. package/dist/environment/index.js +4 -0
  94. package/dist/environment/index.js.map +1 -0
  95. package/dist/form/index.cjs +81 -0
  96. package/dist/form/index.cjs.map +1 -0
  97. package/dist/form/index.d.cts +227 -0
  98. package/dist/form/index.d.ts +227 -0
  99. package/dist/form/index.js +4 -0
  100. package/dist/form/index.js.map +1 -0
  101. package/dist/i18n.cjs +37 -0
  102. package/dist/i18n.cjs.map +1 -0
  103. package/dist/i18n.d.cts +102 -0
  104. package/dist/i18n.d.ts +102 -0
  105. package/dist/i18n.js +4 -0
  106. package/dist/i18n.js.map +1 -0
  107. package/dist/index-BXBmBHyL.d.ts +718 -0
  108. package/dist/index-BYsUCP3u.d.cts +718 -0
  109. package/dist/index-Cl26FrAZ.d.cts +362 -0
  110. package/dist/index-Cl26FrAZ.d.ts +362 -0
  111. package/dist/index.cjs +1265 -0
  112. package/dist/index.cjs.map +1 -0
  113. package/dist/index.d.cts +205 -0
  114. package/dist/index.d.ts +205 -0
  115. package/dist/index.js +277 -0
  116. package/dist/index.js.map +1 -0
  117. package/dist/schema.cjs +13 -0
  118. package/dist/schema.cjs.map +1 -0
  119. package/dist/schema.d.cts +84 -0
  120. package/dist/schema.d.ts +84 -0
  121. package/dist/schema.js +4 -0
  122. package/dist/schema.js.map +1 -0
  123. package/dist/security/index.cjs +94 -0
  124. package/dist/security/index.cjs.map +1 -0
  125. package/dist/security/index.d.cts +216 -0
  126. package/dist/security/index.d.ts +216 -0
  127. package/dist/security/index.js +5 -0
  128. package/dist/security/index.js.map +1 -0
  129. package/dist/string/index.cjs +153 -0
  130. package/dist/string/index.cjs.map +1 -0
  131. package/dist/string/index.d.cts +471 -0
  132. package/dist/string/index.d.ts +471 -0
  133. package/dist/string/index.js +4 -0
  134. package/dist/string/index.js.map +1 -0
  135. package/dist/transform/index.cjs +105 -0
  136. package/dist/transform/index.cjs.map +1 -0
  137. package/dist/transform/index.d.cts +271 -0
  138. package/dist/transform/index.d.ts +271 -0
  139. package/dist/transform/index.js +4 -0
  140. package/dist/transform/index.js.map +1 -0
  141. package/dist/validators/index.cjs +195 -0
  142. package/dist/validators/index.cjs.map +1 -0
  143. package/dist/validators/index.d.cts +2 -0
  144. package/dist/validators/index.d.ts +2 -0
  145. package/dist/validators/index.js +6 -0
  146. package/dist/validators/index.js.map +1 -0
  147. package/package.json +229 -0
@@ -0,0 +1,749 @@
1
+ import { getPhoneFormat } from './chunk-GFDMZDMI.js';
2
+
3
+ // src/country/data/countries.ts
4
+ var COUNTRIES = [
5
+ // North America (3)
6
+ { name: "United States", officialName: "United States of America", alpha2: "US", alpha3: "USA", numeric: "840", continent: "North America", capital: "Washington, D.C.", languages: ["en"], currency: "USD", dialCode: "+1", flag: "🇺🇸" },
7
+ { name: "Canada", alpha2: "CA", alpha3: "CAN", numeric: "124", continent: "North America", capital: "Ottawa", languages: ["en", "fr"], currency: "CAD", dialCode: "+1", flag: "🇨🇦" },
8
+ { name: "Mexico", officialName: "United Mexican States", alpha2: "MX", alpha3: "MEX", numeric: "484", continent: "North America", capital: "Mexico City", languages: ["es"], currency: "MXN", dialCode: "+52", flag: "🇲🇽" },
9
+ // Central America (7)
10
+ { name: "Guatemala", alpha2: "GT", alpha3: "GTM", numeric: "320", continent: "North America", capital: "Guatemala City", languages: ["es"], currency: "GTQ", dialCode: "+502", flag: "🇬🇹" },
11
+ { name: "Honduras", alpha2: "HN", alpha3: "HND", numeric: "340", continent: "North America", capital: "Tegucigalpa", languages: ["es"], currency: "HNL", dialCode: "+504", flag: "🇭🇳" },
12
+ { name: "El Salvador", alpha2: "SV", alpha3: "SLV", numeric: "222", continent: "North America", capital: "San Salvador", languages: ["es"], currency: "USD", dialCode: "+503", flag: "🇸🇻" },
13
+ { name: "Nicaragua", alpha2: "NI", alpha3: "NIC", numeric: "558", continent: "North America", capital: "Managua", languages: ["es"], currency: "NIO", dialCode: "+505", flag: "🇳🇮" },
14
+ { name: "Costa Rica", alpha2: "CR", alpha3: "CRI", numeric: "188", continent: "North America", capital: "San José", languages: ["es"], currency: "CRC", dialCode: "+506", flag: "🇨🇷" },
15
+ { name: "Panama", alpha2: "PA", alpha3: "PAN", numeric: "591", continent: "North America", capital: "Panama City", languages: ["es"], currency: "PAB", dialCode: "+507", flag: "🇵🇦" },
16
+ { name: "Belize", alpha2: "BZ", alpha3: "BLZ", numeric: "084", continent: "North America", capital: "Belmopan", languages: ["en"], currency: "BZD", dialCode: "+501", flag: "🇧🇿" },
17
+ // Caribbean (15)
18
+ { name: "Jamaica", alpha2: "JM", alpha3: "JAM", numeric: "388", continent: "North America", capital: "Kingston", languages: ["en"], currency: "JMD", dialCode: "+1", flag: "🇯🇲" },
19
+ { name: "Cuba", alpha2: "CU", alpha3: "CUB", numeric: "192", continent: "North America", capital: "Havana", languages: ["es"], currency: "CUP", dialCode: "+53", flag: "🇨🇺" },
20
+ { name: "Haiti", alpha2: "HT", alpha3: "HTI", numeric: "332", continent: "North America", capital: "Port-au-Prince", languages: ["fr", "ht"], currency: "HTG", dialCode: "+509", flag: "🇭🇹" },
21
+ { name: "Dominican Republic", alpha2: "DO", alpha3: "DOM", numeric: "214", continent: "North America", capital: "Santo Domingo", languages: ["es"], currency: "DOP", dialCode: "+1", flag: "🇩🇴" },
22
+ { name: "Puerto Rico", alpha2: "PR", alpha3: "PRI", numeric: "630", continent: "North America", capital: "San Juan", languages: ["es", "en"], currency: "USD", dialCode: "+1", flag: "🇵🇷" },
23
+ { name: "Trinidad and Tobago", alpha2: "TT", alpha3: "TTO", numeric: "780", continent: "North America", capital: "Port of Spain", languages: ["en"], currency: "TTD", dialCode: "+1", flag: "🇹🇹" },
24
+ { name: "Bahamas", alpha2: "BS", alpha3: "BHS", numeric: "044", continent: "North America", capital: "Nassau", languages: ["en"], currency: "BSD", dialCode: "+1", flag: "🇧🇸" },
25
+ { name: "Barbados", alpha2: "BB", alpha3: "BRB", numeric: "052", continent: "North America", capital: "Bridgetown", languages: ["en"], currency: "BBD", dialCode: "+1", flag: "🇧🇧" },
26
+ // Europe (35)
27
+ { name: "United Kingdom", officialName: "United Kingdom of Great Britain and Northern Ireland", alpha2: "GB", alpha3: "GBR", numeric: "826", continent: "Europe", capital: "London", languages: ["en"], currency: "GBP", dialCode: "+44", flag: "🇬🇧" },
28
+ { name: "Germany", officialName: "Federal Republic of Germany", alpha2: "DE", alpha3: "DEU", numeric: "276", continent: "Europe", capital: "Berlin", languages: ["de"], currency: "EUR", dialCode: "+49", flag: "🇩🇪" },
29
+ { name: "France", officialName: "French Republic", alpha2: "FR", alpha3: "FRA", numeric: "250", continent: "Europe", capital: "Paris", languages: ["fr"], currency: "EUR", dialCode: "+33", flag: "🇫🇷" },
30
+ { name: "Italy", officialName: "Italian Republic", alpha2: "IT", alpha3: "ITA", numeric: "380", continent: "Europe", capital: "Rome", languages: ["it"], currency: "EUR", dialCode: "+39", flag: "🇮🇹" },
31
+ { name: "Spain", officialName: "Kingdom of Spain", alpha2: "ES", alpha3: "ESP", numeric: "724", continent: "Europe", capital: "Madrid", languages: ["es"], currency: "EUR", dialCode: "+34", flag: "🇪🇸" },
32
+ { name: "Netherlands", officialName: "Kingdom of the Netherlands", alpha2: "NL", alpha3: "NLD", numeric: "528", continent: "Europe", capital: "Amsterdam", languages: ["nl"], currency: "EUR", dialCode: "+31", flag: "🇳🇱" },
33
+ { name: "Belgium", officialName: "Kingdom of Belgium", alpha2: "BE", alpha3: "BEL", numeric: "056", continent: "Europe", capital: "Brussels", languages: ["nl", "fr", "de"], currency: "EUR", dialCode: "+32", flag: "🇧🇪" },
34
+ { name: "Switzerland", officialName: "Swiss Confederation", alpha2: "CH", alpha3: "CHE", numeric: "756", continent: "Europe", capital: "Bern", languages: ["de", "fr", "it", "rm"], currency: "CHF", dialCode: "+41", flag: "🇨🇭" },
35
+ { name: "Austria", officialName: "Republic of Austria", alpha2: "AT", alpha3: "AUT", numeric: "040", continent: "Europe", capital: "Vienna", languages: ["de"], currency: "EUR", dialCode: "+43", flag: "🇦🇹" },
36
+ { name: "Sweden", officialName: "Kingdom of Sweden", alpha2: "SE", alpha3: "SWE", numeric: "752", continent: "Europe", capital: "Stockholm", languages: ["sv"], currency: "SEK", dialCode: "+46", flag: "🇸🇪" },
37
+ { name: "Norway", officialName: "Kingdom of Norway", alpha2: "NO", alpha3: "NOR", numeric: "578", continent: "Europe", capital: "Oslo", languages: ["no"], currency: "NOK", dialCode: "+47", flag: "🇳🇴" },
38
+ { name: "Denmark", officialName: "Kingdom of Denmark", alpha2: "DK", alpha3: "DNK", numeric: "208", continent: "Europe", capital: "Copenhagen", languages: ["da"], currency: "DKK", dialCode: "+45", flag: "🇩🇰" },
39
+ { name: "Finland", officialName: "Republic of Finland", alpha2: "FI", alpha3: "FIN", numeric: "246", continent: "Europe", capital: "Helsinki", languages: ["fi", "sv"], currency: "EUR", dialCode: "+358", flag: "🇫🇮" },
40
+ { name: "Poland", officialName: "Republic of Poland", alpha2: "PL", alpha3: "POL", numeric: "616", continent: "Europe", capital: "Warsaw", languages: ["pl"], currency: "PLN", dialCode: "+48", flag: "🇵🇱" },
41
+ { name: "Portugal", officialName: "Portuguese Republic", alpha2: "PT", alpha3: "PRT", numeric: "620", continent: "Europe", capital: "Lisbon", languages: ["pt"], currency: "EUR", dialCode: "+351", flag: "🇵🇹" },
42
+ { name: "Ireland", alpha2: "IE", alpha3: "IRL", numeric: "372", continent: "Europe", capital: "Dublin", languages: ["en", "ga"], currency: "EUR", dialCode: "+353", flag: "🇮🇪" },
43
+ { name: "Greece", officialName: "Hellenic Republic", alpha2: "GR", alpha3: "GRC", numeric: "300", continent: "Europe", capital: "Athens", languages: ["el"], currency: "EUR", dialCode: "+30", flag: "🇬🇷" },
44
+ { name: "Czech Republic", alpha2: "CZ", alpha3: "CZE", numeric: "203", continent: "Europe", capital: "Prague", languages: ["cs"], currency: "CZK", dialCode: "+420", flag: "🇨🇿" },
45
+ { name: "Hungary", alpha2: "HU", alpha3: "HUN", numeric: "348", continent: "Europe", capital: "Budapest", languages: ["hu"], currency: "HUF", dialCode: "+36", flag: "🇭🇺" },
46
+ { name: "Romania", alpha2: "RO", alpha3: "ROU", numeric: "642", continent: "Europe", capital: "Bucharest", languages: ["ro"], currency: "RON", dialCode: "+40", flag: "🇷🇴" },
47
+ { name: "Bulgaria", alpha2: "BG", alpha3: "BGR", numeric: "100", continent: "Europe", capital: "Sofia", languages: ["bg"], currency: "BGN", dialCode: "+359", flag: "🇧🇬" },
48
+ { name: "Croatia", alpha2: "HR", alpha3: "HRV", numeric: "191", continent: "Europe", capital: "Zagreb", languages: ["hr"], currency: "EUR", dialCode: "+385", flag: "🇭🇷" },
49
+ { name: "Slovakia", alpha2: "SK", alpha3: "SVK", numeric: "703", continent: "Europe", capital: "Bratislava", languages: ["sk"], currency: "EUR", dialCode: "+421", flag: "🇸🇰" },
50
+ { name: "Slovenia", alpha2: "SI", alpha3: "SVN", numeric: "705", continent: "Europe", capital: "Ljubljana", languages: ["sl"], currency: "EUR", dialCode: "+386", flag: "🇸🇮" },
51
+ { name: "Serbia", alpha2: "RS", alpha3: "SRB", numeric: "688", continent: "Europe", capital: "Belgrade", languages: ["sr"], currency: "RSD", dialCode: "+381", flag: "🇷🇸" },
52
+ { name: "Lithuania", alpha2: "LT", alpha3: "LTU", numeric: "440", continent: "Europe", capital: "Vilnius", languages: ["lt"], currency: "EUR", dialCode: "+370", flag: "🇱🇹" },
53
+ { name: "Latvia", alpha2: "LV", alpha3: "LVA", numeric: "428", continent: "Europe", capital: "Riga", languages: ["lv"], currency: "EUR", dialCode: "+371", flag: "🇱🇻" },
54
+ { name: "Estonia", alpha2: "EE", alpha3: "EST", numeric: "233", continent: "Europe", capital: "Tallinn", languages: ["et"], currency: "EUR", dialCode: "+372", flag: "🇪🇪" },
55
+ { name: "Luxembourg", alpha2: "LU", alpha3: "LUX", numeric: "442", continent: "Europe", capital: "Luxembourg", languages: ["lb", "fr", "de"], currency: "EUR", dialCode: "+352", flag: "🇱🇺" },
56
+ { name: "Iceland", alpha2: "IS", alpha3: "ISL", numeric: "352", continent: "Europe", capital: "Reykjavik", languages: ["is"], currency: "ISK", dialCode: "+354", flag: "🇮🇸" },
57
+ { name: "Cyprus", alpha2: "CY", alpha3: "CYP", numeric: "196", continent: "Europe", capital: "Nicosia", languages: ["el", "tr"], currency: "EUR", dialCode: "+357", flag: "🇨🇾" },
58
+ { name: "Malta", alpha2: "MT", alpha3: "MLT", numeric: "470", continent: "Europe", capital: "Valletta", languages: ["mt", "en"], currency: "EUR", dialCode: "+356", flag: "🇲🇹" },
59
+ { name: "Russia", officialName: "Russian Federation", alpha2: "RU", alpha3: "RUS", numeric: "643", continent: "Europe", capital: "Moscow", languages: ["ru"], currency: "RUB", dialCode: "+7", flag: "🇷🇺" },
60
+ { name: "Ukraine", alpha2: "UA", alpha3: "UKR", numeric: "804", continent: "Europe", capital: "Kyiv", languages: ["uk"], currency: "UAH", dialCode: "+380", flag: "🇺🇦" },
61
+ { name: "Belarus", alpha2: "BY", alpha3: "BLR", numeric: "112", continent: "Europe", capital: "Minsk", languages: ["be", "ru"], currency: "BYN", dialCode: "+375", flag: "🇧🇾" },
62
+ // Asia (35)
63
+ { name: "China", officialName: "People's Republic of China", alpha2: "CN", alpha3: "CHN", numeric: "156", continent: "Asia", capital: "Beijing", languages: ["zh"], currency: "CNY", dialCode: "+86", flag: "🇨🇳" },
64
+ { name: "Japan", alpha2: "JP", alpha3: "JPN", numeric: "392", continent: "Asia", capital: "Tokyo", languages: ["ja"], currency: "JPY", dialCode: "+81", flag: "🇯🇵" },
65
+ { name: "South Korea", officialName: "Republic of Korea", alpha2: "KR", alpha3: "KOR", numeric: "410", continent: "Asia", capital: "Seoul", languages: ["ko"], currency: "KRW", dialCode: "+82", flag: "🇰🇷" },
66
+ { name: "India", officialName: "Republic of India", alpha2: "IN", alpha3: "IND", numeric: "356", continent: "Asia", capital: "New Delhi", languages: ["hi", "en"], currency: "INR", dialCode: "+91", flag: "🇮🇳" },
67
+ { name: "Pakistan", officialName: "Islamic Republic of Pakistan", alpha2: "PK", alpha3: "PAK", numeric: "586", continent: "Asia", capital: "Islamabad", languages: ["ur", "en"], currency: "PKR", dialCode: "+92", flag: "🇵🇰" },
68
+ { name: "Bangladesh", officialName: "People's Republic of Bangladesh", alpha2: "BD", alpha3: "BGD", numeric: "050", continent: "Asia", capital: "Dhaka", languages: ["bn"], currency: "BDT", dialCode: "+880", flag: "🇧🇩" },
69
+ { name: "Indonesia", officialName: "Republic of Indonesia", alpha2: "ID", alpha3: "IDN", numeric: "360", continent: "Asia", capital: "Jakarta", languages: ["id"], currency: "IDR", dialCode: "+62", flag: "🇮🇩" },
70
+ { name: "Thailand", officialName: "Kingdom of Thailand", alpha2: "TH", alpha3: "THA", numeric: "764", continent: "Asia", capital: "Bangkok", languages: ["th"], currency: "THB", dialCode: "+66", flag: "🇹🇭" },
71
+ { name: "Vietnam", officialName: "Socialist Republic of Vietnam", alpha2: "VN", alpha3: "VNM", numeric: "704", continent: "Asia", capital: "Hanoi", languages: ["vi"], currency: "VND", dialCode: "+84", flag: "🇻🇳" },
72
+ { name: "Philippines", officialName: "Republic of the Philippines", alpha2: "PH", alpha3: "PHL", numeric: "608", continent: "Asia", capital: "Manila", languages: ["tl", "en"], currency: "PHP", dialCode: "+63", flag: "🇵🇭" },
73
+ { name: "Malaysia", alpha2: "MY", alpha3: "MYS", numeric: "458", continent: "Asia", capital: "Kuala Lumpur", languages: ["ms"], currency: "MYR", dialCode: "+60", flag: "🇲🇾" },
74
+ { name: "Singapore", officialName: "Republic of Singapore", alpha2: "SG", alpha3: "SGP", numeric: "702", continent: "Asia", capital: "Singapore", languages: ["en", "zh", "ms", "ta"], currency: "SGD", dialCode: "+65", flag: "🇸🇬" },
75
+ { name: "Myanmar", alpha2: "MM", alpha3: "MMR", numeric: "104", continent: "Asia", capital: "Naypyidaw", languages: ["my"], currency: "MMK", dialCode: "+95", flag: "🇲🇲" },
76
+ { name: "Cambodia", alpha2: "KH", alpha3: "KHM", numeric: "116", continent: "Asia", capital: "Phnom Penh", languages: ["km"], currency: "KHR", dialCode: "+855", flag: "🇰🇭" },
77
+ { name: "Laos", alpha2: "LA", alpha3: "LAO", numeric: "418", continent: "Asia", capital: "Vientiane", languages: ["lo"], currency: "LAK", dialCode: "+856", flag: "🇱🇦" },
78
+ { name: "Nepal", alpha2: "NP", alpha3: "NPL", numeric: "524", continent: "Asia", capital: "Kathmandu", languages: ["ne"], currency: "NPR", dialCode: "+977", flag: "🇳🇵" },
79
+ { name: "Sri Lanka", alpha2: "LK", alpha3: "LKA", numeric: "144", continent: "Asia", capital: "Colombo", languages: ["si", "ta"], currency: "LKR", dialCode: "+94", flag: "🇱🇰" },
80
+ { name: "Mongolia", alpha2: "MN", alpha3: "MNG", numeric: "496", continent: "Asia", capital: "Ulaanbaatar", languages: ["mn"], currency: "MNT", dialCode: "+976", flag: "🇲🇳" },
81
+ { name: "North Korea", alpha2: "KP", alpha3: "PRK", numeric: "408", continent: "Asia", capital: "Pyongyang", languages: ["ko"], currency: "KPW", dialCode: "+850", flag: "🇰🇵" },
82
+ { name: "Taiwan", alpha2: "TW", alpha3: "TWN", numeric: "158", continent: "Asia", capital: "Taipei", languages: ["zh"], currency: "TWD", dialCode: "+886", flag: "🇹🇼" },
83
+ { name: "Hong Kong", alpha2: "HK", alpha3: "HKG", numeric: "344", continent: "Asia", capital: "Hong Kong", languages: ["zh", "en"], currency: "HKD", dialCode: "+852", flag: "🇭🇰" },
84
+ // Central Asia (5)
85
+ { name: "Kazakhstan", alpha2: "KZ", alpha3: "KAZ", numeric: "398", continent: "Asia", capital: "Astana", languages: ["kk", "ru"], currency: "KZT", dialCode: "+7", flag: "🇰🇿" },
86
+ { name: "Uzbekistan", alpha2: "UZ", alpha3: "UZB", numeric: "860", continent: "Asia", capital: "Tashkent", languages: ["uz"], currency: "UZS", dialCode: "+998", flag: "🇺🇿" },
87
+ { name: "Turkmenistan", alpha2: "TM", alpha3: "TKM", numeric: "795", continent: "Asia", capital: "Ashgabat", languages: ["tk"], currency: "TMT", dialCode: "+993", flag: "🇹🇲" },
88
+ { name: "Kyrgyzstan", alpha2: "KG", alpha3: "KGZ", numeric: "417", continent: "Asia", capital: "Bishkek", languages: ["ky", "ru"], currency: "KGS", dialCode: "+996", flag: "🇰🇬" },
89
+ { name: "Tajikistan", alpha2: "TJ", alpha3: "TJK", numeric: "762", continent: "Asia", capital: "Dushanbe", languages: ["tg"], currency: "TJS", dialCode: "+992", flag: "🇹🇯" },
90
+ // Middle East (15)
91
+ { name: "United Arab Emirates", alpha2: "AE", alpha3: "ARE", numeric: "784", continent: "Asia", capital: "Abu Dhabi", languages: ["ar"], currency: "AED", dialCode: "+971", flag: "🇦🇪" },
92
+ { name: "Saudi Arabia", officialName: "Kingdom of Saudi Arabia", alpha2: "SA", alpha3: "SAU", numeric: "682", continent: "Asia", capital: "Riyadh", languages: ["ar"], currency: "SAR", dialCode: "+966", flag: "🇸🇦" },
93
+ { name: "Turkey", officialName: "Republic of Turkey", alpha2: "TR", alpha3: "TUR", numeric: "792", continent: "Asia", capital: "Ankara", languages: ["tr"], currency: "TRY", dialCode: "+90", flag: "🇹🇷" },
94
+ { name: "Iran", officialName: "Islamic Republic of Iran", alpha2: "IR", alpha3: "IRN", numeric: "364", continent: "Asia", capital: "Tehran", languages: ["fa"], currency: "IRR", dialCode: "+98", flag: "🇮🇷" },
95
+ { name: "Israel", officialName: "State of Israel", alpha2: "IL", alpha3: "ISR", numeric: "376", continent: "Asia", capital: "Jerusalem", languages: ["he", "ar"], currency: "ILS", dialCode: "+972", flag: "🇮🇱" },
96
+ { name: "Qatar", officialName: "State of Qatar", alpha2: "QA", alpha3: "QAT", numeric: "634", continent: "Asia", capital: "Doha", languages: ["ar"], currency: "QAR", dialCode: "+974", flag: "🇶🇦" },
97
+ { name: "Kuwait", officialName: "State of Kuwait", alpha2: "KW", alpha3: "KWT", numeric: "414", continent: "Asia", capital: "Kuwait City", languages: ["ar"], currency: "KWD", dialCode: "+965", flag: "🇰🇼" },
98
+ { name: "Bahrain", alpha2: "BH", alpha3: "BHR", numeric: "048", continent: "Asia", capital: "Manama", languages: ["ar"], currency: "BHD", dialCode: "+973", flag: "🇧🇭" },
99
+ { name: "Oman", alpha2: "OM", alpha3: "OMN", numeric: "512", continent: "Asia", capital: "Muscat", languages: ["ar"], currency: "OMR", dialCode: "+968", flag: "🇴🇲" },
100
+ { name: "Jordan", alpha2: "JO", alpha3: "JOR", numeric: "400", continent: "Asia", capital: "Amman", languages: ["ar"], currency: "JOD", dialCode: "+962", flag: "🇯🇴" },
101
+ { name: "Lebanon", alpha2: "LB", alpha3: "LBN", numeric: "422", continent: "Asia", capital: "Beirut", languages: ["ar"], currency: "LBP", dialCode: "+961", flag: "🇱🇧" },
102
+ { name: "Iraq", alpha2: "IQ", alpha3: "IRQ", numeric: "368", continent: "Asia", capital: "Baghdad", languages: ["ar", "ku"], currency: "IQD", dialCode: "+964", flag: "🇮🇶" },
103
+ { name: "Syria", alpha2: "SY", alpha3: "SYR", numeric: "760", continent: "Asia", capital: "Damascus", languages: ["ar"], currency: "SYP", dialCode: "+963", flag: "🇸🇾" },
104
+ { name: "Yemen", alpha2: "YE", alpha3: "YEM", numeric: "887", continent: "Asia", capital: "Sana'a", languages: ["ar"], currency: "YER", dialCode: "+967", flag: "🇾🇪" },
105
+ { name: "Afghanistan", alpha2: "AF", alpha3: "AFG", numeric: "004", continent: "Asia", capital: "Kabul", languages: ["ps", "fa"], currency: "AFN", dialCode: "+93", flag: "🇦🇫" },
106
+ // Africa (35)
107
+ { name: "Egypt", officialName: "Arab Republic of Egypt", alpha2: "EG", alpha3: "EGY", numeric: "818", continent: "Africa", capital: "Cairo", languages: ["ar"], currency: "EGP", dialCode: "+20", flag: "🇪🇬" },
108
+ { name: "Nigeria", officialName: "Federal Republic of Nigeria", alpha2: "NG", alpha3: "NGA", numeric: "566", continent: "Africa", capital: "Abuja", languages: ["en"], currency: "NGN", dialCode: "+234", flag: "🇳🇬" },
109
+ { name: "South Africa", officialName: "Republic of South Africa", alpha2: "ZA", alpha3: "ZAF", numeric: "710", continent: "Africa", capital: "Pretoria", languages: ["af", "en", "zu", "xh"], currency: "ZAR", dialCode: "+27", flag: "🇿🇦" },
110
+ { name: "Kenya", officialName: "Republic of Kenya", alpha2: "KE", alpha3: "KEN", numeric: "404", continent: "Africa", capital: "Nairobi", languages: ["en", "sw"], currency: "KES", dialCode: "+254", flag: "🇰🇪" },
111
+ { name: "Morocco", officialName: "Kingdom of Morocco", alpha2: "MA", alpha3: "MAR", numeric: "504", continent: "Africa", capital: "Rabat", languages: ["ar", "fr"], currency: "MAD", dialCode: "+212", flag: "🇲🇦" },
112
+ { name: "Algeria", officialName: "People's Democratic Republic of Algeria", alpha2: "DZ", alpha3: "DZA", numeric: "012", continent: "Africa", capital: "Algiers", languages: ["ar", "fr"], currency: "DZD", dialCode: "+213", flag: "🇩🇿" },
113
+ { name: "Tunisia", alpha2: "TN", alpha3: "TUN", numeric: "788", continent: "Africa", capital: "Tunis", languages: ["ar", "fr"], currency: "TND", dialCode: "+216", flag: "🇹🇳" },
114
+ { name: "Libya", alpha2: "LY", alpha3: "LBY", numeric: "434", continent: "Africa", capital: "Tripoli", languages: ["ar"], currency: "LYD", dialCode: "+218", flag: "🇱🇾" },
115
+ { name: "Ghana", alpha2: "GH", alpha3: "GHA", numeric: "288", continent: "Africa", capital: "Accra", languages: ["en"], currency: "GHS", dialCode: "+233", flag: "🇬🇭" },
116
+ { name: "Tanzania", alpha2: "TZ", alpha3: "TZA", numeric: "834", continent: "Africa", capital: "Dodoma", languages: ["sw", "en"], currency: "TZS", dialCode: "+255", flag: "🇹🇿" },
117
+ { name: "Ethiopia", alpha2: "ET", alpha3: "ETH", numeric: "231", continent: "Africa", capital: "Addis Ababa", languages: ["am"], currency: "ETB", dialCode: "+251", flag: "🇪🇹" },
118
+ { name: "Uganda", alpha2: "UG", alpha3: "UGA", numeric: "800", continent: "Africa", capital: "Kampala", languages: ["en", "sw"], currency: "UGX", dialCode: "+256", flag: "🇺🇬" },
119
+ { name: "Rwanda", alpha2: "RW", alpha3: "RWA", numeric: "646", continent: "Africa", capital: "Kigali", languages: ["rw", "en", "fr"], currency: "RWF", dialCode: "+250", flag: "🇷🇼" },
120
+ { name: "Senegal", alpha2: "SN", alpha3: "SEN", numeric: "686", continent: "Africa", capital: "Dakar", languages: ["fr"], currency: "XOF", dialCode: "+221", flag: "🇸🇳" },
121
+ { name: "Ivory Coast", alpha2: "CI", alpha3: "CIV", numeric: "384", continent: "Africa", capital: "Yamoussoukro", languages: ["fr"], currency: "XOF", dialCode: "+225", flag: "🇨🇮" },
122
+ { name: "Cameroon", alpha2: "CM", alpha3: "CMR", numeric: "120", continent: "Africa", capital: "Yaoundé", languages: ["fr", "en"], currency: "XAF", dialCode: "+237", flag: "🇨🇲" },
123
+ { name: "Angola", alpha2: "AO", alpha3: "AGO", numeric: "024", continent: "Africa", capital: "Luanda", languages: ["pt"], currency: "AOA", dialCode: "+244", flag: "🇦🇴" },
124
+ { name: "Mozambique", alpha2: "MZ", alpha3: "MOZ", numeric: "508", continent: "Africa", capital: "Maputo", languages: ["pt"], currency: "MZN", dialCode: "+258", flag: "🇲🇿" },
125
+ { name: "Zimbabwe", alpha2: "ZW", alpha3: "ZWE", numeric: "716", continent: "Africa", capital: "Harare", languages: ["en", "sn", "nd"], currency: "ZWL", dialCode: "+263", flag: "🇿🇼" },
126
+ { name: "Zambia", alpha2: "ZM", alpha3: "ZMB", numeric: "894", continent: "Africa", capital: "Lusaka", languages: ["en"], currency: "ZMW", dialCode: "+260", flag: "🇿🇲" },
127
+ { name: "Botswana", alpha2: "BW", alpha3: "BWA", numeric: "072", continent: "Africa", capital: "Gaborone", languages: ["en", "tn"], currency: "BWP", dialCode: "+267", flag: "🇧🇼" },
128
+ { name: "Namibia", alpha2: "NA", alpha3: "NAM", numeric: "516", continent: "Africa", capital: "Windhoek", languages: ["en"], currency: "NAD", dialCode: "+264", flag: "🇳🇦" },
129
+ { name: "Mauritius", alpha2: "MU", alpha3: "MUS", numeric: "480", continent: "Africa", capital: "Port Louis", languages: ["en", "fr"], currency: "MUR", dialCode: "+230", flag: "🇲🇺" },
130
+ { name: "Madagascar", alpha2: "MG", alpha3: "MDG", numeric: "450", continent: "Africa", capital: "Antananarivo", languages: ["mg", "fr"], currency: "MGA", dialCode: "+261", flag: "🇲🇬" },
131
+ { name: "Sudan", alpha2: "SD", alpha3: "SDN", numeric: "729", continent: "Africa", capital: "Khartoum", languages: ["ar", "en"], currency: "SDG", dialCode: "+249", flag: "🇸🇩" },
132
+ // South America (12)
133
+ { name: "Brazil", officialName: "Federative Republic of Brazil", alpha2: "BR", alpha3: "BRA", numeric: "076", continent: "South America", capital: "Brasília", languages: ["pt"], currency: "BRL", dialCode: "+55", flag: "🇧🇷" },
134
+ { name: "Argentina", officialName: "Argentine Republic", alpha2: "AR", alpha3: "ARG", numeric: "032", continent: "South America", capital: "Buenos Aires", languages: ["es"], currency: "ARS", dialCode: "+54", flag: "🇦🇷" },
135
+ { name: "Colombia", officialName: "Republic of Colombia", alpha2: "CO", alpha3: "COL", numeric: "170", continent: "South America", capital: "Bogotá", languages: ["es"], currency: "COP", dialCode: "+57", flag: "🇨🇴" },
136
+ { name: "Chile", officialName: "Republic of Chile", alpha2: "CL", alpha3: "CHL", numeric: "152", continent: "South America", capital: "Santiago", languages: ["es"], currency: "CLP", dialCode: "+56", flag: "🇨🇱" },
137
+ { name: "Peru", officialName: "Republic of Peru", alpha2: "PE", alpha3: "PER", numeric: "604", continent: "South America", capital: "Lima", languages: ["es"], currency: "PEN", dialCode: "+51", flag: "🇵🇪" },
138
+ { name: "Venezuela", alpha2: "VE", alpha3: "VEN", numeric: "862", continent: "South America", capital: "Caracas", languages: ["es"], currency: "VES", dialCode: "+58", flag: "🇻🇪" },
139
+ { name: "Ecuador", alpha2: "EC", alpha3: "ECU", numeric: "218", continent: "South America", capital: "Quito", languages: ["es"], currency: "USD", dialCode: "+593", flag: "🇪🇨" },
140
+ { name: "Bolivia", alpha2: "BO", alpha3: "BOL", numeric: "068", continent: "South America", capital: "Sucre", languages: ["es"], currency: "BOB", dialCode: "+591", flag: "🇧🇴" },
141
+ { name: "Paraguay", alpha2: "PY", alpha3: "PRY", numeric: "600", continent: "South America", capital: "Asunción", languages: ["es", "gn"], currency: "PYG", dialCode: "+595", flag: "🇵🇾" },
142
+ { name: "Uruguay", alpha2: "UY", alpha3: "URY", numeric: "858", continent: "South America", capital: "Montevideo", languages: ["es"], currency: "UYU", dialCode: "+598", flag: "🇺🇾" },
143
+ { name: "Guyana", alpha2: "GY", alpha3: "GUY", numeric: "328", continent: "South America", capital: "Georgetown", languages: ["en"], currency: "GYD", dialCode: "+592", flag: "🇬🇾" },
144
+ { name: "Suriname", alpha2: "SR", alpha3: "SUR", numeric: "740", continent: "South America", capital: "Paramaribo", languages: ["nl"], currency: "SRD", dialCode: "+597", flag: "🇸🇷" },
145
+ // Oceania (8)
146
+ { name: "Australia", officialName: "Commonwealth of Australia", alpha2: "AU", alpha3: "AUS", numeric: "036", continent: "Oceania", capital: "Canberra", languages: ["en"], currency: "AUD", dialCode: "+61", flag: "🇦🇺" },
147
+ { name: "New Zealand", alpha2: "NZ", alpha3: "NZL", numeric: "554", continent: "Oceania", capital: "Wellington", languages: ["en", "mi"], currency: "NZD", dialCode: "+64", flag: "🇳🇿" },
148
+ { name: "Papua New Guinea", alpha2: "PG", alpha3: "PNG", numeric: "598", continent: "Oceania", capital: "Port Moresby", languages: ["en", "tpi", "ho"], currency: "PGK", dialCode: "+675", flag: "🇵🇬" },
149
+ { name: "Fiji", alpha2: "FJ", alpha3: "FJI", numeric: "242", continent: "Oceania", capital: "Suva", languages: ["en", "fj", "hi"], currency: "FJD", dialCode: "+679", flag: "🇫🇯" },
150
+ { name: "Samoa", alpha2: "WS", alpha3: "WSM", numeric: "882", continent: "Oceania", capital: "Apia", languages: ["sm", "en"], currency: "WST", dialCode: "+685", flag: "🇼🇸" },
151
+ { name: "Tonga", alpha2: "TO", alpha3: "TON", numeric: "776", continent: "Oceania", capital: "Nuku'alofa", languages: ["to", "en"], currency: "TOP", dialCode: "+676", flag: "🇹🇴" },
152
+ { name: "Vanuatu", alpha2: "VU", alpha3: "VUT", numeric: "548", continent: "Oceania", capital: "Port Vila", languages: ["bi", "en", "fr"], currency: "VUV", dialCode: "+678", flag: "🇻🇺" },
153
+ { name: "Solomon Islands", alpha2: "SB", alpha3: "SLB", numeric: "090", continent: "Oceania", capital: "Honiara", languages: ["en"], currency: "SBD", dialCode: "+677", flag: "🇸🇧" }
154
+ ];
155
+ var COUNTRY_BY_ALPHA2 = new Map(
156
+ COUNTRIES.map((c) => [c.alpha2.toUpperCase(), c])
157
+ );
158
+ var COUNTRY_BY_ALPHA3 = new Map(
159
+ COUNTRIES.map((c) => [c.alpha3.toUpperCase(), c])
160
+ );
161
+ var COUNTRY_BY_NUMERIC = new Map(
162
+ COUNTRIES.map((c) => [c.numeric, c])
163
+ );
164
+
165
+ // src/country/codes.ts
166
+ function getCountryByAlpha2(code) {
167
+ if (!code || typeof code !== "string") return null;
168
+ return COUNTRY_BY_ALPHA2.get(code.toUpperCase()) || null;
169
+ }
170
+ function getCountryByAlpha3(code) {
171
+ if (!code || typeof code !== "string") return null;
172
+ return COUNTRY_BY_ALPHA3.get(code.toUpperCase()) || null;
173
+ }
174
+ function getCountryByNumeric(code) {
175
+ if (code === null || code === void 0) return null;
176
+ const numericStr = String(code).padStart(3, "0");
177
+ return COUNTRY_BY_NUMERIC.get(numericStr) || null;
178
+ }
179
+ function getCountry(code) {
180
+ if (code === null || code === void 0) return null;
181
+ const codeStr = String(code).toUpperCase();
182
+ if (codeStr.length === 2) {
183
+ return getCountryByAlpha2(codeStr);
184
+ }
185
+ if (codeStr.length === 3 && /^[A-Z]+$/.test(codeStr)) {
186
+ return getCountryByAlpha3(codeStr);
187
+ }
188
+ if (/^\d+$/.test(codeStr)) {
189
+ return getCountryByNumeric(codeStr);
190
+ }
191
+ return null;
192
+ }
193
+ function convertCountryCode(code, to) {
194
+ const country = getCountry(code);
195
+ if (!country) return null;
196
+ switch (to) {
197
+ case "alpha2":
198
+ return country.alpha2;
199
+ case "alpha3":
200
+ return country.alpha3;
201
+ case "numeric":
202
+ return country.numeric;
203
+ default:
204
+ return null;
205
+ }
206
+ }
207
+ function getAllCountries() {
208
+ return [...COUNTRIES];
209
+ }
210
+ function getCountriesByContinent(continent) {
211
+ return COUNTRIES.filter((c) => c.continent.toLowerCase() === continent.toLowerCase());
212
+ }
213
+ function getCountriesByLanguage(language) {
214
+ const lang = language.toLowerCase();
215
+ return COUNTRIES.filter((c) => c.languages.some((l) => l.toLowerCase() === lang));
216
+ }
217
+ function searchCountries(query) {
218
+ if (!query || typeof query !== "string") return [];
219
+ const q = query.toLowerCase().trim();
220
+ if (!q) return [];
221
+ return COUNTRIES.filter(
222
+ (c) => c.name.toLowerCase().includes(q) || c.officialName?.toLowerCase().includes(q) || c.alpha2.toLowerCase() === q || c.alpha3.toLowerCase() === q
223
+ );
224
+ }
225
+ function isValidCountryCode(code) {
226
+ return getCountry(code) !== null;
227
+ }
228
+
229
+ // src/country/data/timezones.ts
230
+ var TIMEZONES_BY_COUNTRY = {
231
+ // North America
232
+ US: ["America/New_York", "America/Chicago", "America/Denver", "America/Los_Angeles", "America/Anchorage", "Pacific/Honolulu"],
233
+ CA: ["America/Toronto", "America/Vancouver", "America/Edmonton", "America/Winnipeg", "America/Halifax"],
234
+ MX: ["America/Mexico_City", "America/Tijuana", "America/Cancun"],
235
+ // Europe
236
+ GB: ["Europe/London"],
237
+ DE: ["Europe/Berlin"],
238
+ FR: ["Europe/Paris"],
239
+ IT: ["Europe/Rome"],
240
+ ES: ["Europe/Madrid"],
241
+ NL: ["Europe/Amsterdam"],
242
+ BE: ["Europe/Brussels"],
243
+ CH: ["Europe/Zurich"],
244
+ AT: ["Europe/Vienna"],
245
+ SE: ["Europe/Stockholm"],
246
+ NO: ["Europe/Oslo"],
247
+ DK: ["Europe/Copenhagen"],
248
+ FI: ["Europe/Helsinki"],
249
+ PL: ["Europe/Warsaw"],
250
+ PT: ["Europe/Lisbon"],
251
+ IE: ["Europe/Dublin"],
252
+ GR: ["Europe/Athens"],
253
+ CZ: ["Europe/Prague"],
254
+ HU: ["Europe/Budapest"],
255
+ RO: ["Europe/Bucharest"],
256
+ // Asia
257
+ CN: ["Asia/Shanghai", "Asia/Hong_Kong"],
258
+ JP: ["Asia/Tokyo"],
259
+ KR: ["Asia/Seoul"],
260
+ IN: ["Asia/Kolkata"],
261
+ PK: ["Asia/Karachi"],
262
+ BD: ["Asia/Dhaka"],
263
+ ID: ["Asia/Jakarta", "Asia/Makassar", "Asia/Jayapura"],
264
+ TH: ["Asia/Bangkok"],
265
+ VN: ["Asia/Ho_Chi_Minh"],
266
+ PH: ["Asia/Manila"],
267
+ MY: ["Asia/Kuala_Lumpur"],
268
+ SG: ["Asia/Singapore"],
269
+ // Middle East
270
+ AE: ["Asia/Dubai"],
271
+ SA: ["Asia/Riyadh"],
272
+ EG: ["Africa/Cairo"],
273
+ TR: ["Europe/Istanbul"],
274
+ IR: ["Asia/Tehran"],
275
+ IL: ["Asia/Jerusalem"],
276
+ QA: ["Asia/Qatar"],
277
+ KW: ["Asia/Kuwait"],
278
+ // Africa
279
+ NG: ["Africa/Lagos"],
280
+ ZA: ["Africa/Johannesburg"],
281
+ KE: ["Africa/Nairobi"],
282
+ MA: ["Africa/Casablanca"],
283
+ DZ: ["Africa/Algiers"],
284
+ // South America
285
+ BR: ["America/Sao_Paulo", "America/Manaus", "America/Recife"],
286
+ AR: ["America/Buenos_Aires"],
287
+ CO: ["America/Bogota"],
288
+ CL: ["America/Santiago"],
289
+ PE: ["America/Lima"],
290
+ // Oceania
291
+ AU: ["Australia/Sydney", "Australia/Melbourne", "Australia/Brisbane", "Australia/Perth", "Australia/Adelaide"],
292
+ NZ: ["Pacific/Auckland"],
293
+ // Russia & CIS
294
+ RU: ["Europe/Moscow", "Asia/Yekaterinburg", "Asia/Novosibirsk", "Asia/Vladivostok"],
295
+ UA: ["Europe/Kiev"]
296
+ };
297
+ var DEFAULT_TIMEZONE = {
298
+ US: "America/New_York",
299
+ CA: "America/Toronto",
300
+ MX: "America/Mexico_City",
301
+ GB: "Europe/London",
302
+ DE: "Europe/Berlin",
303
+ FR: "Europe/Paris",
304
+ IT: "Europe/Rome",
305
+ ES: "Europe/Madrid",
306
+ NL: "Europe/Amsterdam",
307
+ BE: "Europe/Brussels",
308
+ CH: "Europe/Zurich",
309
+ AT: "Europe/Vienna",
310
+ SE: "Europe/Stockholm",
311
+ NO: "Europe/Oslo",
312
+ DK: "Europe/Copenhagen",
313
+ FI: "Europe/Helsinki",
314
+ PL: "Europe/Warsaw",
315
+ PT: "Europe/Lisbon",
316
+ IE: "Europe/Dublin",
317
+ GR: "Europe/Athens",
318
+ CZ: "Europe/Prague",
319
+ HU: "Europe/Budapest",
320
+ RO: "Europe/Bucharest",
321
+ CN: "Asia/Shanghai",
322
+ JP: "Asia/Tokyo",
323
+ KR: "Asia/Seoul",
324
+ IN: "Asia/Kolkata",
325
+ PK: "Asia/Karachi",
326
+ BD: "Asia/Dhaka",
327
+ ID: "Asia/Jakarta",
328
+ TH: "Asia/Bangkok",
329
+ VN: "Asia/Ho_Chi_Minh",
330
+ PH: "Asia/Manila",
331
+ MY: "Asia/Kuala_Lumpur",
332
+ SG: "Asia/Singapore",
333
+ AE: "Asia/Dubai",
334
+ SA: "Asia/Riyadh",
335
+ EG: "Africa/Cairo",
336
+ TR: "Europe/Istanbul",
337
+ IR: "Asia/Tehran",
338
+ IL: "Asia/Jerusalem",
339
+ QA: "Asia/Qatar",
340
+ KW: "Asia/Kuwait",
341
+ NG: "Africa/Lagos",
342
+ ZA: "Africa/Johannesburg",
343
+ KE: "Africa/Nairobi",
344
+ MA: "Africa/Casablanca",
345
+ DZ: "Africa/Algiers",
346
+ BR: "America/Sao_Paulo",
347
+ AR: "America/Buenos_Aires",
348
+ CO: "America/Bogota",
349
+ CL: "America/Santiago",
350
+ PE: "America/Lima",
351
+ AU: "Australia/Sydney",
352
+ NZ: "Pacific/Auckland",
353
+ RU: "Europe/Moscow",
354
+ UA: "Europe/Kiev"
355
+ };
356
+
357
+ // src/country/timezone.ts
358
+ function getTimezonesByCountry(countryCode) {
359
+ if (!countryCode || typeof countryCode !== "string") return [];
360
+ return TIMEZONES_BY_COUNTRY[countryCode.toUpperCase()] || [];
361
+ }
362
+ function getDefaultTimezone(countryCode) {
363
+ if (!countryCode || typeof countryCode !== "string") return null;
364
+ return DEFAULT_TIMEZONE[countryCode.toUpperCase()] || null;
365
+ }
366
+ function getCurrentTimeInCountry(countryCode) {
367
+ const timezone = getDefaultTimezone(countryCode);
368
+ if (!timezone) return null;
369
+ try {
370
+ const now = /* @__PURE__ */ new Date();
371
+ const options = {
372
+ timeZone: timezone,
373
+ year: "numeric",
374
+ month: "2-digit",
375
+ day: "2-digit",
376
+ hour: "2-digit",
377
+ minute: "2-digit",
378
+ second: "2-digit",
379
+ hour12: false
380
+ };
381
+ const formatter = new Intl.DateTimeFormat("en-CA", options);
382
+ const parts = formatter.formatToParts(now);
383
+ const getPart = (type) => parts.find((p) => p.type === type)?.value || "0";
384
+ return new Date(
385
+ parseInt(getPart("year")),
386
+ parseInt(getPart("month")) - 1,
387
+ parseInt(getPart("day")),
388
+ parseInt(getPart("hour")),
389
+ parseInt(getPart("minute")),
390
+ parseInt(getPart("second"))
391
+ );
392
+ } catch {
393
+ return null;
394
+ }
395
+ }
396
+ function getTimezoneOffset(countryCode) {
397
+ const timezone = getDefaultTimezone(countryCode);
398
+ if (!timezone) return null;
399
+ try {
400
+ const now = /* @__PURE__ */ new Date();
401
+ const options = {
402
+ timeZone: timezone,
403
+ timeZoneName: "shortOffset"
404
+ };
405
+ const formatter = new Intl.DateTimeFormat("en-US", options);
406
+ const parts = formatter.formatToParts(now);
407
+ const tzPart = parts.find((p) => p.type === "timeZoneName");
408
+ if (tzPart?.value) {
409
+ const match = tzPart.value.match(/GMT([+-])(\d+)(?::(\d+))?/);
410
+ if (match) {
411
+ const sign = match[1];
412
+ const hours = match[2].padStart(2, "0");
413
+ const minutes = (match[3] || "00").padStart(2, "0");
414
+ return `${sign}${hours}:${minutes}`;
415
+ }
416
+ }
417
+ return null;
418
+ } catch {
419
+ return null;
420
+ }
421
+ }
422
+ function convertTimeBetweenCountries(date, _fromCountry, toCountry) {
423
+ const toTimezone = getDefaultTimezone(toCountry);
424
+ if (!toTimezone) return null;
425
+ try {
426
+ const options = {
427
+ timeZone: toTimezone,
428
+ year: "numeric",
429
+ month: "2-digit",
430
+ day: "2-digit",
431
+ hour: "2-digit",
432
+ minute: "2-digit",
433
+ second: "2-digit",
434
+ hour12: false
435
+ };
436
+ const formatter = new Intl.DateTimeFormat("en-CA", options);
437
+ const parts = formatter.formatToParts(date);
438
+ const getPart = (type) => parts.find((p) => p.type === type)?.value || "0";
439
+ return new Date(
440
+ parseInt(getPart("year")),
441
+ parseInt(getPart("month")) - 1,
442
+ parseInt(getPart("day")),
443
+ parseInt(getPart("hour")),
444
+ parseInt(getPart("minute")),
445
+ parseInt(getPart("second"))
446
+ );
447
+ } catch {
448
+ return null;
449
+ }
450
+ }
451
+ function formatTimeForCountry(date, countryCode, options = {}) {
452
+ const timezone = getDefaultTimezone(countryCode);
453
+ if (!timezone) return date.toISOString();
454
+ try {
455
+ const formatOptions = {
456
+ timeZone: timezone,
457
+ ...options
458
+ };
459
+ return new Intl.DateTimeFormat("en-US", formatOptions).format(date);
460
+ } catch {
461
+ return date.toISOString();
462
+ }
463
+ }
464
+
465
+ // src/country/data/currencies.ts
466
+ var CURRENCIES = {
467
+ USD: { code: "USD", symbol: "$", name: "US Dollar", decimals: 2, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
468
+ EUR: { code: "EUR", symbol: "€", name: "Euro", decimals: 2, symbolPosition: "before", thousandsSeparator: ".", decimalSeparator: "," },
469
+ GBP: { code: "GBP", symbol: "£", name: "British Pound", decimals: 2, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
470
+ JPY: { code: "JPY", symbol: "¥", name: "Japanese Yen", decimals: 0, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
471
+ CNY: { code: "CNY", symbol: "¥", name: "Chinese Yuan", decimals: 2, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
472
+ INR: { code: "INR", symbol: "₹", name: "Indian Rupee", decimals: 2, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
473
+ PKR: { code: "PKR", symbol: "Rs", name: "Pakistani Rupee", decimals: 2, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
474
+ BDT: { code: "BDT", symbol: "৳", name: "Bangladeshi Taka", decimals: 2, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
475
+ AUD: { code: "AUD", symbol: "A$", name: "Australian Dollar", decimals: 2, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
476
+ CAD: { code: "CAD", symbol: "C$", name: "Canadian Dollar", decimals: 2, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
477
+ CHF: { code: "CHF", symbol: "CHF", name: "Swiss Franc", decimals: 2, symbolPosition: "before", thousandsSeparator: "'", decimalSeparator: "." },
478
+ HKD: { code: "HKD", symbol: "HK$", name: "Hong Kong Dollar", decimals: 2, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
479
+ SGD: { code: "SGD", symbol: "S$", name: "Singapore Dollar", decimals: 2, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
480
+ NZD: { code: "NZD", symbol: "NZ$", name: "New Zealand Dollar", decimals: 2, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
481
+ KRW: { code: "KRW", symbol: "₩", name: "South Korean Won", decimals: 0, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
482
+ MXN: { code: "MXN", symbol: "$", name: "Mexican Peso", decimals: 2, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
483
+ BRL: { code: "BRL", symbol: "R$", name: "Brazilian Real", decimals: 2, symbolPosition: "before", thousandsSeparator: ".", decimalSeparator: "," },
484
+ RUB: { code: "RUB", symbol: "₽", name: "Russian Ruble", decimals: 2, symbolPosition: "after", thousandsSeparator: " ", decimalSeparator: "," },
485
+ ZAR: { code: "ZAR", symbol: "R", name: "South African Rand", decimals: 2, symbolPosition: "before", thousandsSeparator: " ", decimalSeparator: "." },
486
+ TRY: { code: "TRY", symbol: "₺", name: "Turkish Lira", decimals: 2, symbolPosition: "before", thousandsSeparator: ".", decimalSeparator: "," },
487
+ AED: { code: "AED", symbol: "د.إ", name: "UAE Dirham", decimals: 2, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
488
+ SAR: { code: "SAR", symbol: "﷼", name: "Saudi Riyal", decimals: 2, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
489
+ QAR: { code: "QAR", symbol: "﷼", name: "Qatari Riyal", decimals: 2, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
490
+ KWD: { code: "KWD", symbol: "د.ك", name: "Kuwaiti Dinar", decimals: 3, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
491
+ EGP: { code: "EGP", symbol: "E£", name: "Egyptian Pound", decimals: 2, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
492
+ NGN: { code: "NGN", symbol: "₦", name: "Nigerian Naira", decimals: 2, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
493
+ KES: { code: "KES", symbol: "KSh", name: "Kenyan Shilling", decimals: 2, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
494
+ THB: { code: "THB", symbol: "฿", name: "Thai Baht", decimals: 2, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
495
+ MYR: { code: "MYR", symbol: "RM", name: "Malaysian Ringgit", decimals: 2, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
496
+ IDR: { code: "IDR", symbol: "Rp", name: "Indonesian Rupiah", decimals: 0, symbolPosition: "before", thousandsSeparator: ".", decimalSeparator: "," },
497
+ PHP: { code: "PHP", symbol: "₱", name: "Philippine Peso", decimals: 2, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
498
+ VND: { code: "VND", symbol: "₫", name: "Vietnamese Dong", decimals: 0, symbolPosition: "after", thousandsSeparator: ".", decimalSeparator: "," },
499
+ PLN: { code: "PLN", symbol: "zł", name: "Polish Zloty", decimals: 2, symbolPosition: "after", thousandsSeparator: " ", decimalSeparator: "," },
500
+ SEK: { code: "SEK", symbol: "kr", name: "Swedish Krona", decimals: 2, symbolPosition: "after", thousandsSeparator: " ", decimalSeparator: "," },
501
+ NOK: { code: "NOK", symbol: "kr", name: "Norwegian Krone", decimals: 2, symbolPosition: "after", thousandsSeparator: " ", decimalSeparator: "," },
502
+ DKK: { code: "DKK", symbol: "kr", name: "Danish Krone", decimals: 2, symbolPosition: "after", thousandsSeparator: ".", decimalSeparator: "," },
503
+ CZK: { code: "CZK", symbol: "Kč", name: "Czech Koruna", decimals: 2, symbolPosition: "after", thousandsSeparator: " ", decimalSeparator: "," },
504
+ HUF: { code: "HUF", symbol: "Ft", name: "Hungarian Forint", decimals: 0, symbolPosition: "after", thousandsSeparator: " ", decimalSeparator: "," },
505
+ RON: { code: "RON", symbol: "lei", name: "Romanian Leu", decimals: 2, symbolPosition: "after", thousandsSeparator: ".", decimalSeparator: "," },
506
+ UAH: { code: "UAH", symbol: "₴", name: "Ukrainian Hryvnia", decimals: 2, symbolPosition: "after", thousandsSeparator: " ", decimalSeparator: "," },
507
+ ILS: { code: "ILS", symbol: "₪", name: "Israeli Shekel", decimals: 2, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
508
+ IRR: { code: "IRR", symbol: "﷼", name: "Iranian Rial", decimals: 0, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
509
+ ARS: { code: "ARS", symbol: "$", name: "Argentine Peso", decimals: 2, symbolPosition: "before", thousandsSeparator: ".", decimalSeparator: "," },
510
+ COP: { code: "COP", symbol: "$", name: "Colombian Peso", decimals: 0, symbolPosition: "before", thousandsSeparator: ".", decimalSeparator: "," },
511
+ CLP: { code: "CLP", symbol: "$", name: "Chilean Peso", decimals: 0, symbolPosition: "before", thousandsSeparator: ".", decimalSeparator: "," },
512
+ PEN: { code: "PEN", symbol: "S/", name: "Peruvian Sol", decimals: 2, symbolPosition: "before", thousandsSeparator: ",", decimalSeparator: "." },
513
+ MAD: { code: "MAD", symbol: "د.م.", name: "Moroccan Dirham", decimals: 2, symbolPosition: "after", thousandsSeparator: " ", decimalSeparator: "," },
514
+ DZD: { code: "DZD", symbol: "د.ج", name: "Algerian Dinar", decimals: 2, symbolPosition: "after", thousandsSeparator: " ", decimalSeparator: "," }
515
+ };
516
+ var CURRENCY_BY_COUNTRY = {
517
+ US: "USD",
518
+ CA: "CAD",
519
+ MX: "MXN",
520
+ GB: "GBP",
521
+ DE: "EUR",
522
+ FR: "EUR",
523
+ IT: "EUR",
524
+ ES: "EUR",
525
+ NL: "EUR",
526
+ BE: "EUR",
527
+ AT: "EUR",
528
+ PT: "EUR",
529
+ IE: "EUR",
530
+ GR: "EUR",
531
+ FI: "EUR",
532
+ CH: "CHF",
533
+ SE: "SEK",
534
+ NO: "NOK",
535
+ DK: "DKK",
536
+ PL: "PLN",
537
+ CZ: "CZK",
538
+ HU: "HUF",
539
+ RO: "RON",
540
+ CN: "CNY",
541
+ JP: "JPY",
542
+ KR: "KRW",
543
+ IN: "INR",
544
+ PK: "PKR",
545
+ BD: "BDT",
546
+ ID: "IDR",
547
+ TH: "THB",
548
+ VN: "VND",
549
+ PH: "PHP",
550
+ MY: "MYR",
551
+ SG: "SGD",
552
+ AE: "AED",
553
+ SA: "SAR",
554
+ EG: "EGP",
555
+ TR: "TRY",
556
+ IR: "IRR",
557
+ IL: "ILS",
558
+ QA: "QAR",
559
+ KW: "KWD",
560
+ NG: "NGN",
561
+ ZA: "ZAR",
562
+ KE: "KES",
563
+ MA: "MAD",
564
+ DZ: "DZD",
565
+ BR: "BRL",
566
+ AR: "ARS",
567
+ CO: "COP",
568
+ CL: "CLP",
569
+ PE: "PEN",
570
+ AU: "AUD",
571
+ NZ: "NZD",
572
+ RU: "RUB",
573
+ UA: "UAH"
574
+ };
575
+
576
+ // src/country/currency.ts
577
+ function getCurrency(currencyCode) {
578
+ if (!currencyCode || typeof currencyCode !== "string") return null;
579
+ return CURRENCIES[currencyCode.toUpperCase()] || null;
580
+ }
581
+ function getCurrencyByCountry(countryCode) {
582
+ if (!countryCode || typeof countryCode !== "string") return null;
583
+ const currencyCode = CURRENCY_BY_COUNTRY[countryCode.toUpperCase()];
584
+ if (!currencyCode) return null;
585
+ return getCurrency(currencyCode);
586
+ }
587
+ function formatCurrency(amount, currencyCode) {
588
+ if (typeof amount !== "number" || isNaN(amount)) return "";
589
+ let currency = getCurrency(currencyCode);
590
+ if (!currency) {
591
+ currency = getCurrencyByCountry(currencyCode);
592
+ }
593
+ if (!currency) {
594
+ return amount.toFixed(2);
595
+ }
596
+ const absoluteAmount = Math.abs(amount);
597
+ const fixedAmount = absoluteAmount.toFixed(currency.decimals);
598
+ const [integerPart, decimalPart] = fixedAmount.split(".");
599
+ const formattedInteger = integerPart.replace(
600
+ /\B(?=(\d{3})+(?!\d))/g,
601
+ currency.thousandsSeparator
602
+ );
603
+ let formattedAmount = formattedInteger;
604
+ if (currency.decimals > 0 && decimalPart) {
605
+ formattedAmount += currency.decimalSeparator + decimalPart;
606
+ }
607
+ if (currency.symbolPosition === "before") {
608
+ formattedAmount = currency.symbol + formattedAmount;
609
+ } else {
610
+ formattedAmount = formattedAmount + " " + currency.symbol;
611
+ }
612
+ if (amount < 0) {
613
+ formattedAmount = "-" + formattedAmount;
614
+ }
615
+ return formattedAmount;
616
+ }
617
+ function parseCurrency(value, currencyCode) {
618
+ if (!value || typeof value !== "string") return NaN;
619
+ const currency = getCurrency(currencyCode);
620
+ if (!currency) {
621
+ return parseFloat(value.replace(/[^\d.-]/g, ""));
622
+ }
623
+ let cleaned = value.replace(currency.symbol, "").trim();
624
+ cleaned = cleaned.split(currency.thousandsSeparator).join("");
625
+ if (currency.decimalSeparator !== ".") {
626
+ cleaned = cleaned.replace(currency.decimalSeparator, ".");
627
+ }
628
+ cleaned = cleaned.replace(/[^\d.-]/g, "");
629
+ return parseFloat(cleaned);
630
+ }
631
+ function getAllCurrencies() {
632
+ return Object.values(CURRENCIES);
633
+ }
634
+ function getCurrencySymbol(currencyCode) {
635
+ const currency = getCurrency(currencyCode);
636
+ return currency?.symbol || null;
637
+ }
638
+ function convertCurrency(amount, _fromCurrency, toCurrency, exchangeRate) {
639
+ if (typeof amount !== "number" || isNaN(amount)) return NaN;
640
+ if (typeof exchangeRate !== "number" || isNaN(exchangeRate)) return NaN;
641
+ const toCurrencyInfo = getCurrency(toCurrency);
642
+ const converted = amount * exchangeRate;
643
+ if (toCurrencyInfo) {
644
+ const multiplier = Math.pow(10, toCurrencyInfo.decimals);
645
+ return Math.round(converted * multiplier) / multiplier;
646
+ }
647
+ return converted;
648
+ }
649
+
650
+ // src/country/flags.ts
651
+ function getFlagEmoji(countryCode) {
652
+ if (!countryCode || typeof countryCode !== "string") return null;
653
+ const code = countryCode.toUpperCase().trim();
654
+ if (code.length !== 2) return null;
655
+ const country = getCountryByAlpha2(code);
656
+ if (country) {
657
+ return country.flag;
658
+ }
659
+ return null;
660
+ }
661
+ function getCountryFromEmoji(emoji) {
662
+ if (!emoji || typeof emoji !== "string") return null;
663
+ try {
664
+ const codePoints = [...emoji].map((char) => char.codePointAt(0) || 0);
665
+ if (codePoints.length !== 2) return null;
666
+ const chars = codePoints.map((cp) => {
667
+ if (cp >= 127462 && cp <= 127487) {
668
+ return String.fromCharCode(65 + (cp - 127462));
669
+ }
670
+ return null;
671
+ });
672
+ if (chars.some((c) => c === null)) return null;
673
+ return chars.join("");
674
+ } catch {
675
+ return null;
676
+ }
677
+ }
678
+ function isFlagEmoji(str) {
679
+ if (!str || typeof str !== "string") return false;
680
+ const countryCode = getCountryFromEmoji(str);
681
+ if (!countryCode) return false;
682
+ return getCountryByAlpha2(countryCode) !== null;
683
+ }
684
+ function getAllFlags() {
685
+ const flags = {};
686
+ for (let i = 65; i <= 90; i++) {
687
+ for (let j = 65; j <= 90; j++) {
688
+ const code = String.fromCharCode(i, j);
689
+ const country = getCountryByAlpha2(code);
690
+ if (country) {
691
+ flags[code] = country.flag;
692
+ }
693
+ }
694
+ }
695
+ return flags;
696
+ }
697
+
698
+ // src/country/dialCode.ts
699
+ function getDialingCode(countryCode) {
700
+ if (!countryCode || typeof countryCode !== "string") return null;
701
+ const country = getCountryByAlpha2(countryCode);
702
+ if (country) {
703
+ return country.dialCode;
704
+ }
705
+ const phoneFormat = getPhoneFormat(countryCode);
706
+ return phoneFormat?.dialCode || null;
707
+ }
708
+ function getCountriesByDialingCode(dialCode) {
709
+ if (!dialCode || typeof dialCode !== "string") return [];
710
+ let normalized = dialCode.trim();
711
+ if (!normalized.startsWith("+")) {
712
+ normalized = "+" + normalized;
713
+ }
714
+ const countries = [];
715
+ const allCountries = getAllCountries();
716
+ for (const country of allCountries) {
717
+ if (country.dialCode === normalized) {
718
+ countries.push(country.alpha2);
719
+ }
720
+ }
721
+ return countries;
722
+ }
723
+ function formatWithDialingCode(nationalNumber, countryCode) {
724
+ const dialCode = getDialingCode(countryCode);
725
+ if (!dialCode) return nationalNumber;
726
+ let cleaned = nationalNumber.replace(/\D/g, "");
727
+ if (cleaned.startsWith("0")) {
728
+ cleaned = cleaned.slice(1);
729
+ }
730
+ return `${dialCode} ${cleaned}`;
731
+ }
732
+ function hasValidDialingCode(phone) {
733
+ if (!phone || typeof phone !== "string") return false;
734
+ const cleaned = phone.trim();
735
+ if (!cleaned.startsWith("+")) return false;
736
+ const allCountries = getAllCountries();
737
+ for (const country of allCountries) {
738
+ const dialDigits = country.dialCode.replace(/\D/g, "");
739
+ const phoneDigits = cleaned.replace(/\D/g, "");
740
+ if (phoneDigits.startsWith(dialDigits)) {
741
+ return true;
742
+ }
743
+ }
744
+ return false;
745
+ }
746
+
747
+ export { COUNTRIES, CURRENCIES, convertCountryCode, convertCurrency, convertTimeBetweenCountries, formatCurrency, formatTimeForCountry, formatWithDialingCode, getAllCountries, getAllCurrencies, getAllFlags, getCountriesByContinent, getCountriesByDialingCode, getCountriesByLanguage, getCountry, getCountryByAlpha2, getCountryByAlpha3, getCountryByNumeric, getCountryFromEmoji, getCurrency, getCurrencyByCountry, getCurrencySymbol, getCurrentTimeInCountry, getDefaultTimezone, getDialingCode, getFlagEmoji, getTimezoneOffset, getTimezonesByCountry, hasValidDialingCode, isFlagEmoji, isValidCountryCode, parseCurrency, searchCountries };
748
+ //# sourceMappingURL=chunk-NFPGAVRQ.js.map
749
+ //# sourceMappingURL=chunk-NFPGAVRQ.js.map