@flickfyi/flkr 0.0.141 → 0.0.146

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 (494) hide show
  1. package/node_modules/@flickfyi/attestation/.turbo/turbo-build.log +7 -7
  2. package/node_modules/@flickfyi/biscuit/.turbo/turbo-build.log +7 -7
  3. package/node_modules/@flickfyi/core/.oxlintrc.json +2 -1
  4. package/node_modules/@flickfyi/core/.turbo/turbo-build.log +502 -95
  5. package/node_modules/@flickfyi/core/README.md +58 -4
  6. package/node_modules/@flickfyi/core/dist/index.cjs +1 -1
  7. package/node_modules/@flickfyi/core/dist/index.js +35 -24
  8. package/node_modules/@flickfyi/core/dist/kowalski/calculations.d.ts +17 -0
  9. package/node_modules/@flickfyi/core/dist/kowalski/calculator.d.ts +13 -0
  10. package/node_modules/@flickfyi/core/dist/kowalski/catalog.cjs +1 -0
  11. package/node_modules/@flickfyi/core/dist/kowalski/catalog.d.cts +962 -0
  12. package/node_modules/@flickfyi/core/dist/kowalski/catalog.d.ts +962 -0
  13. package/node_modules/@flickfyi/core/dist/kowalski/catalog.js +639 -0
  14. package/node_modules/@flickfyi/core/dist/kowalski/clocks.d.ts +4 -0
  15. package/node_modules/@flickfyi/core/dist/kowalski/date-time.d.ts +22 -0
  16. package/node_modules/@flickfyi/core/dist/kowalski/details.d.ts +7 -0
  17. package/node_modules/@flickfyi/core/dist/kowalski/everyday.d.ts +8 -0
  18. package/node_modules/@flickfyi/core/dist/kowalski/format.d.ts +4 -0
  19. package/node_modules/@flickfyi/core/dist/kowalski/frame.d.ts +161 -0
  20. package/node_modules/@flickfyi/core/dist/kowalski/index.cjs +21 -0
  21. package/node_modules/@flickfyi/core/dist/kowalski/index.d.cts +8 -0
  22. package/node_modules/@flickfyi/core/dist/kowalski/index.d.ts +8 -0
  23. package/node_modules/@flickfyi/core/dist/kowalski/index.js +7496 -0
  24. package/node_modules/@flickfyi/core/dist/kowalski/productivity.d.ts +5 -0
  25. package/node_modules/@flickfyi/core/dist/kowalski/recipe.d.ts +8 -0
  26. package/node_modules/@flickfyi/core/dist/kowalski/tools.d.ts +7 -0
  27. package/node_modules/@flickfyi/core/dist/kowalski/use-clock.d.ts +6 -0
  28. package/node_modules/@flickfyi/core/dist/kowalski/use-configured-feature.d.ts +19 -0
  29. package/node_modules/@flickfyi/core/dist/kowalski/use-feature-store.d.ts +15 -0
  30. package/node_modules/@flickfyi/core/dist/kowalski.css +506 -0
  31. package/node_modules/@flickfyi/core/dist/molecules/field/field.d.ts +8 -0
  32. package/node_modules/@flickfyi/core/dist/molecules/index.cjs +1 -1
  33. package/node_modules/@flickfyi/core/dist/molecules/index.d.cts +3 -0
  34. package/node_modules/@flickfyi/core/dist/molecules/index.d.ts +3 -0
  35. package/node_modules/@flickfyi/core/dist/molecules/index.js +88 -27
  36. package/node_modules/@flickfyi/core/dist/molecules/segmented/segmented.d.ts +10 -0
  37. package/node_modules/@flickfyi/core/dist/molecules/stepper/stepper.d.ts +10 -0
  38. package/node_modules/@flickfyi/core/dist/quantum/use-store.d.ts +7 -1
  39. package/node_modules/@flickfyi/core/dist/themes.css +2 -0
  40. package/node_modules/@flickfyi/core/examples/kowalski/bill-split/bill-split.stories.tsx +15 -0
  41. package/node_modules/@flickfyi/core/examples/kowalski/bill-split/bill-split.tsx +17 -0
  42. package/node_modules/@flickfyi/core/examples/kowalski/bookmark/bookmark.stories.tsx +15 -0
  43. package/node_modules/@flickfyi/core/examples/kowalski/bookmark/bookmark.tsx +23 -0
  44. package/node_modules/@flickfyi/core/examples/kowalski/budget/budget.stories.tsx +15 -0
  45. package/node_modules/@flickfyi/core/examples/kowalski/budget/budget.tsx +26 -0
  46. package/node_modules/@flickfyi/core/examples/kowalski/calculator/calculator.stories.tsx +15 -0
  47. package/node_modules/@flickfyi/core/examples/kowalski/calculator/calculator.tsx +24 -0
  48. package/node_modules/@flickfyi/core/examples/kowalski/checklist/checklist.stories.tsx +15 -0
  49. package/node_modules/@flickfyi/core/examples/kowalski/checklist/checklist.tsx +26 -0
  50. package/node_modules/@flickfyi/core/examples/kowalski/color-palette/color-palette.stories.tsx +15 -0
  51. package/node_modules/@flickfyi/core/examples/kowalski/color-palette/color-palette.tsx +22 -0
  52. package/node_modules/@flickfyi/core/examples/kowalski/contact/contact.stories.tsx +15 -0
  53. package/node_modules/@flickfyi/core/examples/kowalski/contact/contact.tsx +23 -0
  54. package/node_modules/@flickfyi/core/examples/kowalski/countdown/countdown.stories.tsx +15 -0
  55. package/node_modules/@flickfyi/core/examples/kowalski/countdown/countdown.tsx +23 -0
  56. package/node_modules/@flickfyi/core/examples/kowalski/event/event.stories.tsx +15 -0
  57. package/node_modules/@flickfyi/core/examples/kowalski/event/event.tsx +24 -0
  58. package/node_modules/@flickfyi/core/examples/kowalski/expense/expense.stories.tsx +15 -0
  59. package/node_modules/@flickfyi/core/examples/kowalski/expense/expense.tsx +23 -0
  60. package/node_modules/@flickfyi/core/examples/kowalski/goal/goal.stories.tsx +15 -0
  61. package/node_modules/@flickfyi/core/examples/kowalski/goal/goal.tsx +24 -0
  62. package/node_modules/@flickfyi/core/examples/kowalski/habit/habit.stories.tsx +15 -0
  63. package/node_modules/@flickfyi/core/examples/kowalski/habit/habit.tsx +23 -0
  64. package/node_modules/@flickfyi/core/examples/kowalski/ledger/ledger.stories.tsx +15 -0
  65. package/node_modules/@flickfyi/core/examples/kowalski/ledger/ledger.tsx +25 -0
  66. package/node_modules/@flickfyi/core/examples/kowalski/note/note.stories.tsx +15 -0
  67. package/node_modules/@flickfyi/core/examples/kowalski/note/note.tsx +22 -0
  68. package/node_modules/@flickfyi/core/examples/kowalski/poll/poll.stories.tsx +15 -0
  69. package/node_modules/@flickfyi/core/examples/kowalski/poll/poll.tsx +26 -0
  70. package/node_modules/@flickfyi/core/examples/kowalski/random-picker/random-picker.stories.tsx +15 -0
  71. package/node_modules/@flickfyi/core/examples/kowalski/random-picker/random-picker.tsx +23 -0
  72. package/node_modules/@flickfyi/core/examples/kowalski/rating/rating.stories.tsx +15 -0
  73. package/node_modules/@flickfyi/core/examples/kowalski/rating/rating.tsx +19 -0
  74. package/node_modules/@flickfyi/core/examples/kowalski/recipe/recipe.stories.tsx +15 -0
  75. package/node_modules/@flickfyi/core/examples/kowalski/recipe/recipe.tsx +120 -0
  76. package/node_modules/@flickfyi/core/examples/kowalski/reminder/reminder.stories.tsx +15 -0
  77. package/node_modules/@flickfyi/core/examples/kowalski/reminder/reminder.tsx +23 -0
  78. package/node_modules/@flickfyi/core/examples/kowalski/rotation/rotation.stories.tsx +15 -0
  79. package/node_modules/@flickfyi/core/examples/kowalski/rotation/rotation.tsx +27 -0
  80. package/node_modules/@flickfyi/core/examples/kowalski/scoreboard/scoreboard.stories.tsx +15 -0
  81. package/node_modules/@flickfyi/core/examples/kowalski/scoreboard/scoreboard.tsx +26 -0
  82. package/node_modules/@flickfyi/core/examples/kowalski/shopping-list/shopping-list.stories.tsx +15 -0
  83. package/node_modules/@flickfyi/core/examples/kowalski/shopping-list/shopping-list.tsx +27 -0
  84. package/node_modules/@flickfyi/core/examples/kowalski/task-board/task-board.stories.tsx +15 -0
  85. package/node_modules/@flickfyi/core/examples/kowalski/task-board/task-board.tsx +27 -0
  86. package/node_modules/@flickfyi/core/examples/kowalski/theme.ts +3 -0
  87. package/node_modules/@flickfyi/core/examples/kowalski/time-zone/time-zone.stories.tsx +15 -0
  88. package/node_modules/@flickfyi/core/examples/kowalski/time-zone/time-zone.tsx +22 -0
  89. package/node_modules/@flickfyi/core/examples/kowalski/timer/timer.stories.tsx +15 -0
  90. package/node_modules/@flickfyi/core/examples/kowalski/timer/timer.tsx +23 -0
  91. package/node_modules/@flickfyi/core/examples/kowalski/trip/trip.stories.tsx +15 -0
  92. package/node_modules/@flickfyi/core/examples/kowalski/trip/trip.tsx +26 -0
  93. package/node_modules/@flickfyi/core/examples/kowalski/unit-converter/unit-converter.stories.tsx +15 -0
  94. package/node_modules/@flickfyi/core/examples/kowalski/unit-converter/unit-converter.tsx +24 -0
  95. package/node_modules/@flickfyi/core/examples/parrott/calculator/calculator.stories.tsx +3 -1
  96. package/node_modules/@flickfyi/core/examples/parrott/checklist/checklist.stories.tsx +3 -1
  97. package/node_modules/@flickfyi/core/examples/parrott/countdown/countdown.stories.tsx +3 -1
  98. package/node_modules/@flickfyi/core/examples/parrott/counter/counter.stories.tsx +1 -0
  99. package/node_modules/@flickfyi/core/examples/parrott/fortune/fortune.stories.tsx +3 -1
  100. package/node_modules/@flickfyi/core/examples/parrott/grid/grid.stories.tsx +3 -1
  101. package/node_modules/@flickfyi/core/examples/parrott/kale-smoothie/kale-smoothie.stories.tsx +1 -0
  102. package/node_modules/@flickfyi/core/examples/parrott/list/list.stories.tsx +3 -1
  103. package/node_modules/@flickfyi/core/examples/parrott/log/log.stories.tsx +3 -1
  104. package/node_modules/@flickfyi/core/examples/parrott/timed-task/timed-task.stories.tsx +3 -1
  105. package/node_modules/@flickfyi/core/examples/parrott/timer/timer.stories.tsx +3 -1
  106. package/node_modules/@flickfyi/core/fixtures/native/host/project.yml +3 -0
  107. package/node_modules/@flickfyi/core/fixtures/native/src/catalog-features.tsx +88 -0
  108. package/node_modules/@flickfyi/core/package.json +35 -5
  109. package/node_modules/@flickfyi/core/package.tsgo.json +19 -1
  110. package/node_modules/@flickfyi/core/scripts/vite-globals.d.ts +2 -0
  111. package/node_modules/@flickfyi/core/src/generated-types.d.ts +1 -0
  112. package/node_modules/@flickfyi/core/src/kowalski/README.md +9 -0
  113. package/node_modules/@flickfyi/core/src/kowalski/calculations.ts +106 -0
  114. package/node_modules/@flickfyi/core/src/kowalski/calculator.ts +243 -0
  115. package/node_modules/@flickfyi/core/src/kowalski/catalog.ts +787 -0
  116. package/node_modules/@flickfyi/core/src/kowalski/clocks.tsx +464 -0
  117. package/node_modules/@flickfyi/core/src/kowalski/date-time.tsx +469 -0
  118. package/node_modules/@flickfyi/core/src/kowalski/details.tsx +1387 -0
  119. package/node_modules/@flickfyi/core/src/kowalski/everyday.tsx +652 -0
  120. package/node_modules/@flickfyi/core/src/kowalski/format.ts +48 -0
  121. package/node_modules/@flickfyi/core/src/kowalski/frame.tsx +351 -0
  122. package/node_modules/@flickfyi/core/src/kowalski/index.ts +23 -0
  123. package/node_modules/@flickfyi/core/src/kowalski/productivity.tsx +575 -0
  124. package/node_modules/@flickfyi/core/src/kowalski/recipe.tsx +555 -0
  125. package/node_modules/@flickfyi/core/src/kowalski/stories/composition.stories.tsx +47 -0
  126. package/node_modules/@flickfyi/core/src/kowalski/stories/composition.tsx +100 -0
  127. package/node_modules/@flickfyi/core/src/kowalski/tools.tsx +1213 -0
  128. package/node_modules/@flickfyi/core/src/kowalski/use-clock.ts +19 -0
  129. package/node_modules/@flickfyi/core/src/kowalski/use-configured-feature.ts +85 -0
  130. package/node_modules/@flickfyi/core/src/kowalski/use-feature-store.ts +119 -0
  131. package/node_modules/@flickfyi/core/src/molecules/field/field.tsx +34 -0
  132. package/node_modules/@flickfyi/core/src/molecules/index.ts +3 -0
  133. package/node_modules/@flickfyi/core/src/molecules/segmented/segmented.tsx +48 -0
  134. package/node_modules/@flickfyi/core/src/molecules/stepper/stepper.tsx +54 -0
  135. package/node_modules/@flickfyi/core/src/quantum/use-store.ts +41 -16
  136. package/node_modules/@flickfyi/core/tests/fly.test.ts +34 -7
  137. package/node_modules/@flickfyi/core/tests/kowalski-calculations.test.ts +60 -0
  138. package/node_modules/@flickfyi/core/tests/kowalski-calculator.test.ts +142 -0
  139. package/node_modules/@flickfyi/core/tests/kowalski-contracts.test.ts +223 -0
  140. package/node_modules/@flickfyi/core/tests/kowalski-date-time.test.tsx +462 -0
  141. package/node_modules/@flickfyi/core/tests/kowalski-features.test.tsx +2158 -0
  142. package/node_modules/@flickfyi/core/tests/kowalski-store.test.tsx +514 -0
  143. package/node_modules/@flickfyi/core/tests/preview-build.test.ts +1 -1
  144. package/node_modules/@flickfyi/core/tests/quantum-use-store.test.ts +53 -1
  145. package/node_modules/@flickfyi/core/tests/verify-tsgo-assets.test.ts +1 -1
  146. package/node_modules/@flickfyi/core/tsconfig.vite-dts.json +2 -1
  147. package/node_modules/@flickfyi/core/tsgo.bun.lock +111 -9
  148. package/node_modules/@flickfyi/core/tsgo.package.json +21 -3
  149. package/node_modules/@flickfyi/core/vite.config.ts +9 -5
  150. package/node_modules/@flickfyi/core/vitest.config.ts +1 -1
  151. package/node_modules/@flickfyi/http-message-sig/.turbo/turbo-build.log +7 -7
  152. package/node_modules/@flickfyi/identity/.turbo/turbo-build.log +8 -9
  153. package/node_modules/@flickfyi/lens/.turbo/turbo-build.log +7 -7
  154. package/node_modules/@flickfyi/photon/.turbo/turbo-build.log +10 -4
  155. package/node_modules/@flickfyi/photon/Sources/Photon/Components/Button.swift +29 -2
  156. package/node_modules/@flickfyi/photon/Sources/PhotonVersion/Resources/photon-version.json +1 -1
  157. package/node_modules/@flickfyi/photon/Tests/PhotonTests/Components/ButtonHostTests.swift +26 -0
  158. package/node_modules/@flickfyi/photon/Tests/PhotonTests/Fixtures/StyleX/catalog-features.styles.json +1 -0
  159. package/node_modules/@flickfyi/photon/Tests/PhotonTests/Fixtures/StyleX/catalog-native.styles.json +1 -1
  160. package/node_modules/@flickfyi/photon/Tests/PhotonTests/Fixtures/StyleX/catalog-scale.styles.json +1 -1
  161. package/node_modules/@flickfyi/photon/Tests/PhotonTests/Fixtures/StyleX/catalog-theme.styles.json +1 -1
  162. package/node_modules/@flickfyi/photon/Tests/PhotonTests/Fixtures/StyleX/catalog-typography.styles.json +1 -1
  163. package/node_modules/@flickfyi/photon/Tests/PhotonTests/Fixtures/StyleX/stylex-calculator.styles.json +1 -1
  164. package/node_modules/@flickfyi/photon/dist/globals.d.ts +5 -0
  165. package/node_modules/@flickfyi/photon/dist/version.cjs +1 -1
  166. package/node_modules/@flickfyi/photon/dist/version.js +1 -1
  167. package/node_modules/@flickfyi/photon/generated/react-swiftui.d.ts +1 -0
  168. package/node_modules/@flickfyi/photon/package.json +1 -1
  169. package/node_modules/@flickfyi/photon/src/globals.d.ts +5 -0
  170. package/node_modules/@flickfyi/rwsdk-extensions/.turbo/turbo-build.log +7 -7
  171. package/node_modules/@formatjs/fast-memoize/LICENSE.md +9 -0
  172. package/node_modules/@formatjs/fast-memoize/README.md +3 -0
  173. package/node_modules/@formatjs/fast-memoize/index.d.ts +35 -0
  174. package/node_modules/@formatjs/fast-memoize/index.js +69 -0
  175. package/node_modules/@formatjs/fast-memoize/index.js.map +1 -0
  176. package/node_modules/@formatjs/fast-memoize/package.json +25 -0
  177. package/node_modules/@formatjs/icu-messageformat-parser/LICENSE.md +9 -0
  178. package/node_modules/@formatjs/icu-messageformat-parser/README.md +38 -0
  179. package/node_modules/@formatjs/icu-messageformat-parser/index.d.ts +393 -0
  180. package/node_modules/@formatjs/icu-messageformat-parser/index.js +2187 -0
  181. package/node_modules/@formatjs/icu-messageformat-parser/index.js.map +1 -0
  182. package/node_modules/@formatjs/icu-messageformat-parser/manipulator.d.ts +175 -0
  183. package/node_modules/@formatjs/icu-messageformat-parser/manipulator.js +209 -0
  184. package/node_modules/@formatjs/icu-messageformat-parser/manipulator.js.map +1 -0
  185. package/node_modules/@formatjs/icu-messageformat-parser/no-parser.d.ts +183 -0
  186. package/node_modules/@formatjs/icu-messageformat-parser/no-parser.js +162 -0
  187. package/node_modules/@formatjs/icu-messageformat-parser/no-parser.js.map +1 -0
  188. package/node_modules/@formatjs/icu-messageformat-parser/package.json +21 -0
  189. package/node_modules/@formatjs/icu-messageformat-parser/printer.d.ts +154 -0
  190. package/node_modules/@formatjs/icu-messageformat-parser/printer.js +224 -0
  191. package/node_modules/@formatjs/icu-messageformat-parser/printer.js.map +1 -0
  192. package/node_modules/@formatjs/icu-skeleton-parser/LICENSE.md +9 -0
  193. package/node_modules/@formatjs/icu-skeleton-parser/README.md +1 -0
  194. package/node_modules/@formatjs/icu-skeleton-parser/index.d.ts +67 -0
  195. package/node_modules/@formatjs/icu-skeleton-parser/index.js +380 -0
  196. package/node_modules/@formatjs/icu-skeleton-parser/index.js.map +1 -0
  197. package/node_modules/@formatjs/icu-skeleton-parser/package.json +15 -0
  198. package/node_modules/@formatjs/intl/LICENSE.md +9 -0
  199. package/node_modules/@formatjs/intl/README.md +3 -0
  200. package/node_modules/@formatjs/intl/index.d.ts +499 -0
  201. package/node_modules/@formatjs/intl/index.js +595 -0
  202. package/node_modules/@formatjs/intl/index.js.map +1 -0
  203. package/node_modules/@formatjs/intl/package.json +37 -0
  204. package/node_modules/decimal.js/LICENCE.md +23 -0
  205. package/node_modules/decimal.js/README.md +246 -0
  206. package/node_modules/decimal.js/decimal.d.ts +301 -0
  207. package/node_modules/decimal.js/decimal.js +4951 -0
  208. package/node_modules/decimal.js/decimal.mjs +4914 -0
  209. package/node_modules/decimal.js/package.json +55 -0
  210. package/node_modules/format-quantity/LICENSE +21 -0
  211. package/node_modules/format-quantity/README.md +181 -0
  212. package/node_modules/format-quantity/dist/cjs/format-quantity.cjs.development.d.ts +131 -0
  213. package/node_modules/format-quantity/dist/cjs/format-quantity.cjs.development.js +214 -0
  214. package/node_modules/format-quantity/dist/cjs/format-quantity.cjs.development.js.map +1 -0
  215. package/node_modules/format-quantity/dist/cjs/format-quantity.cjs.production.d.ts +131 -0
  216. package/node_modules/format-quantity/dist/cjs/format-quantity.cjs.production.js +2 -0
  217. package/node_modules/format-quantity/dist/cjs/format-quantity.cjs.production.js.map +1 -0
  218. package/node_modules/format-quantity/dist/cjs/index.d.ts +1 -0
  219. package/node_modules/format-quantity/dist/cjs/index.js +6 -0
  220. package/node_modules/format-quantity/dist/format-quantity.d.mts +131 -0
  221. package/node_modules/format-quantity/dist/format-quantity.legacy-esm.d.ts +131 -0
  222. package/node_modules/format-quantity/dist/format-quantity.legacy-esm.js +268 -0
  223. package/node_modules/format-quantity/dist/format-quantity.legacy-esm.js.map +1 -0
  224. package/node_modules/format-quantity/dist/format-quantity.mjs +208 -0
  225. package/node_modules/format-quantity/dist/format-quantity.mjs.map +1 -0
  226. package/node_modules/format-quantity/dist/format-quantity.production.d.mts +131 -0
  227. package/node_modules/format-quantity/dist/format-quantity.production.mjs +2 -0
  228. package/node_modules/format-quantity/dist/format-quantity.production.mjs.map +1 -0
  229. package/node_modules/format-quantity/dist/format-quantity.umd.min.js +3 -0
  230. package/node_modules/format-quantity/dist/format-quantity.umd.min.js.map +1 -0
  231. package/node_modules/format-quantity/package.json +81 -0
  232. package/node_modules/intl-messageformat/LICENSE.md +33 -0
  233. package/node_modules/intl-messageformat/README.md +3 -0
  234. package/node_modules/intl-messageformat/index.d.ts +177 -0
  235. package/node_modules/intl-messageformat/index.js +327 -0
  236. package/node_modules/intl-messageformat/index.js.map +1 -0
  237. package/node_modules/intl-messageformat/intl-messageformat.iife.js +2819 -0
  238. package/node_modules/intl-messageformat/package.json +40 -0
  239. package/node_modules/numeric-quantity/LICENSE +21 -0
  240. package/node_modules/numeric-quantity/README.md +306 -0
  241. package/node_modules/numeric-quantity/dist/cjs/index.d.ts +1 -0
  242. package/node_modules/numeric-quantity/dist/cjs/index.js +6 -0
  243. package/node_modules/numeric-quantity/dist/cjs/numeric-quantity.cjs.development.d.ts +293 -0
  244. package/node_modules/numeric-quantity/dist/cjs/numeric-quantity.cjs.development.js +579 -0
  245. package/node_modules/numeric-quantity/dist/cjs/numeric-quantity.cjs.development.js.map +1 -0
  246. package/node_modules/numeric-quantity/dist/cjs/numeric-quantity.cjs.production.d.ts +293 -0
  247. package/node_modules/numeric-quantity/dist/cjs/numeric-quantity.cjs.production.js +2 -0
  248. package/node_modules/numeric-quantity/dist/cjs/numeric-quantity.cjs.production.js.map +1 -0
  249. package/node_modules/numeric-quantity/dist/numeric-quantity.d.mts +293 -0
  250. package/node_modules/numeric-quantity/dist/numeric-quantity.iife.umd.min.js +2 -0
  251. package/node_modules/numeric-quantity/dist/numeric-quantity.iife.umd.min.js.map +1 -0
  252. package/node_modules/numeric-quantity/dist/numeric-quantity.legacy-esm.d.ts +293 -0
  253. package/node_modules/numeric-quantity/dist/numeric-quantity.legacy-esm.js +622 -0
  254. package/node_modules/numeric-quantity/dist/numeric-quantity.legacy-esm.js.map +1 -0
  255. package/node_modules/numeric-quantity/dist/numeric-quantity.mjs +564 -0
  256. package/node_modules/numeric-quantity/dist/numeric-quantity.mjs.map +1 -0
  257. package/node_modules/numeric-quantity/dist/numeric-quantity.production.d.mts +293 -0
  258. package/node_modules/numeric-quantity/dist/numeric-quantity.production.mjs +2 -0
  259. package/node_modules/numeric-quantity/dist/numeric-quantity.production.mjs.map +1 -0
  260. package/node_modules/numeric-quantity/package.json +72 -0
  261. package/node_modules/validator/LICENSE +20 -0
  262. package/node_modules/validator/README.md +269 -0
  263. package/node_modules/validator/es/index.js +218 -0
  264. package/node_modules/validator/es/lib/alpha.js +151 -0
  265. package/node_modules/validator/es/lib/blacklist.js +5 -0
  266. package/node_modules/validator/es/lib/contains.js +15 -0
  267. package/node_modules/validator/es/lib/equals.js +5 -0
  268. package/node_modules/validator/es/lib/escape.js +5 -0
  269. package/node_modules/validator/es/lib/isAbaRouting.js +15 -0
  270. package/node_modules/validator/es/lib/isAfter.js +10 -0
  271. package/node_modules/validator/es/lib/isAlpha.js +23 -0
  272. package/node_modules/validator/es/lib/isAlphanumeric.js +23 -0
  273. package/node_modules/validator/es/lib/isAscii.js +10 -0
  274. package/node_modules/validator/es/lib/isBIC.js +16 -0
  275. package/node_modules/validator/es/lib/isBase32.js +15 -0
  276. package/node_modules/validator/es/lib/isBase58.js +8 -0
  277. package/node_modules/validator/es/lib/isBase64.js +23 -0
  278. package/node_modules/validator/es/lib/isBefore.js +10 -0
  279. package/node_modules/validator/es/lib/isBoolean.js +15 -0
  280. package/node_modules/validator/es/lib/isBtcAddress.js +7 -0
  281. package/node_modules/validator/es/lib/isByteLength.js +19 -0
  282. package/node_modules/validator/es/lib/isCreditCard.js +43 -0
  283. package/node_modules/validator/es/lib/isCurrency.js +74 -0
  284. package/node_modules/validator/es/lib/isDataURI.js +31 -0
  285. package/node_modules/validator/es/lib/isDate.js +93 -0
  286. package/node_modules/validator/es/lib/isDecimal.js +22 -0
  287. package/node_modules/validator/es/lib/isDivisibleBy.js +6 -0
  288. package/node_modules/validator/es/lib/isEAN.js +70 -0
  289. package/node_modules/validator/es/lib/isEmail.js +165 -0
  290. package/node_modules/validator/es/lib/isEmpty.js +10 -0
  291. package/node_modules/validator/es/lib/isEthereumAddress.js +6 -0
  292. package/node_modules/validator/es/lib/isFQDN.js +67 -0
  293. package/node_modules/validator/es/lib/isFloat.js +14 -0
  294. package/node_modules/validator/es/lib/isFullWidth.js +6 -0
  295. package/node_modules/validator/es/lib/isHSL.js +13 -0
  296. package/node_modules/validator/es/lib/isHalfWidth.js +6 -0
  297. package/node_modules/validator/es/lib/isHash.js +21 -0
  298. package/node_modules/validator/es/lib/isHexColor.js +13 -0
  299. package/node_modules/validator/es/lib/isHexadecimal.js +6 -0
  300. package/node_modules/validator/es/lib/isIBAN.js +171 -0
  301. package/node_modules/validator/es/lib/isIMEI.js +40 -0
  302. package/node_modules/validator/es/lib/isIP.js +58 -0
  303. package/node_modules/validator/es/lib/isIPRange.js +41 -0
  304. package/node_modules/validator/es/lib/isISBN.js +47 -0
  305. package/node_modules/validator/es/lib/isISIN.js +55 -0
  306. package/node_modules/validator/es/lib/isISO15924.js +9 -0
  307. package/node_modules/validator/es/lib/isISO31661Alpha2.js +21 -0
  308. package/node_modules/validator/es/lib/isISO31661Alpha3.js +20 -0
  309. package/node_modules/validator/es/lib/isISO31661Numeric.js +8 -0
  310. package/node_modules/validator/es/lib/isISO4217.js +9 -0
  311. package/node_modules/validator/es/lib/isISO6346.js +28 -0
  312. package/node_modules/validator/es/lib/isISO6391.js +6 -0
  313. package/node_modules/validator/es/lib/isISO8601.js +42 -0
  314. package/node_modules/validator/es/lib/isISRC.js +8 -0
  315. package/node_modules/validator/es/lib/isISSN.js +19 -0
  316. package/node_modules/validator/es/lib/isIdentityCard.js +407 -0
  317. package/node_modules/validator/es/lib/isIn.js +23 -0
  318. package/node_modules/validator/es/lib/isInt.js +19 -0
  319. package/node_modules/validator/es/lib/isJSON.js +26 -0
  320. package/node_modules/validator/es/lib/isJWT.js +15 -0
  321. package/node_modules/validator/es/lib/isLatLong.js +21 -0
  322. package/node_modules/validator/es/lib/isLength.js +27 -0
  323. package/node_modules/validator/es/lib/isLicensePlate.js +58 -0
  324. package/node_modules/validator/es/lib/isLocale.js +107 -0
  325. package/node_modules/validator/es/lib/isLowercase.js +5 -0
  326. package/node_modules/validator/es/lib/isLuhnNumber.js +25 -0
  327. package/node_modules/validator/es/lib/isMACAddress.js +36 -0
  328. package/node_modules/validator/es/lib/isMD5.js +6 -0
  329. package/node_modules/validator/es/lib/isMagnetURI.js +9 -0
  330. package/node_modules/validator/es/lib/isMailtoURI.js +75 -0
  331. package/node_modules/validator/es/lib/isMimeType.js +40 -0
  332. package/node_modules/validator/es/lib/isMobilePhone.js +212 -0
  333. package/node_modules/validator/es/lib/isMongoId.js +6 -0
  334. package/node_modules/validator/es/lib/isMultibyte.js +10 -0
  335. package/node_modules/validator/es/lib/isNumeric.js +10 -0
  336. package/node_modules/validator/es/lib/isOctal.js +6 -0
  337. package/node_modules/validator/es/lib/isPassportNumber.js +145 -0
  338. package/node_modules/validator/es/lib/isPort.js +8 -0
  339. package/node_modules/validator/es/lib/isPostalCode.js +100 -0
  340. package/node_modules/validator/es/lib/isRFC3339.js +21 -0
  341. package/node_modules/validator/es/lib/isRgbColor.js +34 -0
  342. package/node_modules/validator/es/lib/isSemVer.js +14 -0
  343. package/node_modules/validator/es/lib/isSlug.js +6 -0
  344. package/node_modules/validator/es/lib/isStrongPassword.js +90 -0
  345. package/node_modules/validator/es/lib/isSurrogatePair.js +6 -0
  346. package/node_modules/validator/es/lib/isTaxID.js +1407 -0
  347. package/node_modules/validator/es/lib/isTime.js +22 -0
  348. package/node_modules/validator/es/lib/isULID.js +5 -0
  349. package/node_modules/validator/es/lib/isURL.js +241 -0
  350. package/node_modules/validator/es/lib/isUUID.js +23 -0
  351. package/node_modules/validator/es/lib/isUppercase.js +5 -0
  352. package/node_modules/validator/es/lib/isVAT.js +264 -0
  353. package/node_modules/validator/es/lib/isVariableWidth.js +7 -0
  354. package/node_modules/validator/es/lib/isWhitelisted.js +10 -0
  355. package/node_modules/validator/es/lib/ltrim.js +7 -0
  356. package/node_modules/validator/es/lib/matches.js +8 -0
  357. package/node_modules/validator/es/lib/normalizeEmail.js +131 -0
  358. package/node_modules/validator/es/lib/rtrim.js +15 -0
  359. package/node_modules/validator/es/lib/stripLow.js +7 -0
  360. package/node_modules/validator/es/lib/toBoolean.js +8 -0
  361. package/node_modules/validator/es/lib/toDate.js +6 -0
  362. package/node_modules/validator/es/lib/toFloat.js +5 -0
  363. package/node_modules/validator/es/lib/toInt.js +5 -0
  364. package/node_modules/validator/es/lib/trim.js +5 -0
  365. package/node_modules/validator/es/lib/unescape.js +8 -0
  366. package/node_modules/validator/es/lib/util/algorithms.js +79 -0
  367. package/node_modules/validator/es/lib/util/assertString.js +4 -0
  368. package/node_modules/validator/es/lib/util/checkHost.js +12 -0
  369. package/node_modules/validator/es/lib/util/includesArray.js +6 -0
  370. package/node_modules/validator/es/lib/util/includesString.js +4 -0
  371. package/node_modules/validator/es/lib/util/merge.js +14 -0
  372. package/node_modules/validator/es/lib/util/multilineRegex.js +12 -0
  373. package/node_modules/validator/es/lib/util/nullUndefinedCheck.js +3 -0
  374. package/node_modules/validator/es/lib/util/toString.js +13 -0
  375. package/node_modules/validator/es/lib/util/typeOf.js +10 -0
  376. package/node_modules/validator/es/lib/whitelist.js +5 -0
  377. package/node_modules/validator/index.js +229 -0
  378. package/node_modules/validator/lib/alpha.js +157 -0
  379. package/node_modules/validator/lib/blacklist.js +14 -0
  380. package/node_modules/validator/lib/contains.js +24 -0
  381. package/node_modules/validator/lib/equals.js +14 -0
  382. package/node_modules/validator/lib/escape.js +14 -0
  383. package/node_modules/validator/lib/isAbaRouting.js +23 -0
  384. package/node_modules/validator/lib/isAfter.js +19 -0
  385. package/node_modules/validator/lib/isAlpha.js +31 -0
  386. package/node_modules/validator/lib/isAlphanumeric.js +31 -0
  387. package/node_modules/validator/lib/isAscii.js +18 -0
  388. package/node_modules/validator/lib/isBIC.js +24 -0
  389. package/node_modules/validator/lib/isBase32.js +24 -0
  390. package/node_modules/validator/lib/isBase58.js +16 -0
  391. package/node_modules/validator/lib/isBase64.js +32 -0
  392. package/node_modules/validator/lib/isBefore.js +19 -0
  393. package/node_modules/validator/lib/isBoolean.js +24 -0
  394. package/node_modules/validator/lib/isBtcAddress.js +16 -0
  395. package/node_modules/validator/lib/isByteLength.js +27 -0
  396. package/node_modules/validator/lib/isCreditCard.js +52 -0
  397. package/node_modules/validator/lib/isCurrency.js +83 -0
  398. package/node_modules/validator/lib/isDataURI.js +40 -0
  399. package/node_modules/validator/lib/isDate.js +102 -0
  400. package/node_modules/validator/lib/isDecimal.js +31 -0
  401. package/node_modules/validator/lib/isDivisibleBy.js +15 -0
  402. package/node_modules/validator/lib/isEAN.js +78 -0
  403. package/node_modules/validator/lib/isEmail.js +174 -0
  404. package/node_modules/validator/lib/isEmpty.js +19 -0
  405. package/node_modules/validator/lib/isEthereumAddress.js +15 -0
  406. package/node_modules/validator/lib/isFQDN.js +76 -0
  407. package/node_modules/validator/lib/isFloat.js +22 -0
  408. package/node_modules/validator/lib/isFullWidth.js +14 -0
  409. package/node_modules/validator/lib/isHSL.js +22 -0
  410. package/node_modules/validator/lib/isHalfWidth.js +14 -0
  411. package/node_modules/validator/lib/isHash.js +30 -0
  412. package/node_modules/validator/lib/isHexColor.js +22 -0
  413. package/node_modules/validator/lib/isHexadecimal.js +15 -0
  414. package/node_modules/validator/lib/isIBAN.js +178 -0
  415. package/node_modules/validator/lib/isIMEI.js +49 -0
  416. package/node_modules/validator/lib/isIP.js +67 -0
  417. package/node_modules/validator/lib/isIPRange.js +50 -0
  418. package/node_modules/validator/lib/isISBN.js +56 -0
  419. package/node_modules/validator/lib/isISIN.js +64 -0
  420. package/node_modules/validator/lib/isISO15924.js +16 -0
  421. package/node_modules/validator/lib/isISO31661Alpha2.js +28 -0
  422. package/node_modules/validator/lib/isISO31661Alpha3.js +28 -0
  423. package/node_modules/validator/lib/isISO31661Numeric.js +16 -0
  424. package/node_modules/validator/lib/isISO4217.js +16 -0
  425. package/node_modules/validator/lib/isISO6346.js +35 -0
  426. package/node_modules/validator/lib/isISO6391.js +15 -0
  427. package/node_modules/validator/lib/isISO8601.js +50 -0
  428. package/node_modules/validator/lib/isISRC.js +16 -0
  429. package/node_modules/validator/lib/isISSN.js +28 -0
  430. package/node_modules/validator/lib/isIdentityCard.js +416 -0
  431. package/node_modules/validator/lib/isIn.js +32 -0
  432. package/node_modules/validator/lib/isInt.js +28 -0
  433. package/node_modules/validator/lib/isJSON.js +35 -0
  434. package/node_modules/validator/lib/isJWT.js +24 -0
  435. package/node_modules/validator/lib/isLatLong.js +30 -0
  436. package/node_modules/validator/lib/isLength.js +35 -0
  437. package/node_modules/validator/lib/isLicensePlate.js +67 -0
  438. package/node_modules/validator/lib/isLocale.js +115 -0
  439. package/node_modules/validator/lib/isLowercase.js +14 -0
  440. package/node_modules/validator/lib/isLuhnNumber.js +34 -0
  441. package/node_modules/validator/lib/isMACAddress.js +45 -0
  442. package/node_modules/validator/lib/isMD5.js +15 -0
  443. package/node_modules/validator/lib/isMagnetURI.js +18 -0
  444. package/node_modules/validator/lib/isMailtoURI.js +84 -0
  445. package/node_modules/validator/lib/isMimeType.js +48 -0
  446. package/node_modules/validator/lib/isMobilePhone.js +219 -0
  447. package/node_modules/validator/lib/isMongoId.js +15 -0
  448. package/node_modules/validator/lib/isMultibyte.js +18 -0
  449. package/node_modules/validator/lib/isNumeric.js +19 -0
  450. package/node_modules/validator/lib/isOctal.js +15 -0
  451. package/node_modules/validator/lib/isPassportNumber.js +152 -0
  452. package/node_modules/validator/lib/isPort.js +17 -0
  453. package/node_modules/validator/lib/isPostalCode.js +107 -0
  454. package/node_modules/validator/lib/isRFC3339.js +29 -0
  455. package/node_modules/validator/lib/isRgbColor.js +42 -0
  456. package/node_modules/validator/lib/isSemVer.js +22 -0
  457. package/node_modules/validator/lib/isSlug.js +15 -0
  458. package/node_modules/validator/lib/isStrongPassword.js +99 -0
  459. package/node_modules/validator/lib/isSurrogatePair.js +15 -0
  460. package/node_modules/validator/lib/isTaxID.js +1417 -0
  461. package/node_modules/validator/lib/isTime.js +31 -0
  462. package/node_modules/validator/lib/isULID.js +14 -0
  463. package/node_modules/validator/lib/isURL.js +249 -0
  464. package/node_modules/validator/lib/isUUID.js +32 -0
  465. package/node_modules/validator/lib/isUppercase.js +14 -0
  466. package/node_modules/validator/lib/isVAT.js +274 -0
  467. package/node_modules/validator/lib/isVariableWidth.js +16 -0
  468. package/node_modules/validator/lib/isWhitelisted.js +19 -0
  469. package/node_modules/validator/lib/ltrim.js +16 -0
  470. package/node_modules/validator/lib/matches.js +17 -0
  471. package/node_modules/validator/lib/normalizeEmail.js +140 -0
  472. package/node_modules/validator/lib/rtrim.js +24 -0
  473. package/node_modules/validator/lib/stripLow.js +16 -0
  474. package/node_modules/validator/lib/toBoolean.js +17 -0
  475. package/node_modules/validator/lib/toDate.js +15 -0
  476. package/node_modules/validator/lib/toFloat.js +14 -0
  477. package/node_modules/validator/lib/toInt.js +14 -0
  478. package/node_modules/validator/lib/trim.js +14 -0
  479. package/node_modules/validator/lib/unescape.js +17 -0
  480. package/node_modules/validator/lib/util/algorithms.js +88 -0
  481. package/node_modules/validator/lib/util/assertString.js +12 -0
  482. package/node_modules/validator/lib/util/checkHost.js +20 -0
  483. package/node_modules/validator/lib/util/includesArray.js +14 -0
  484. package/node_modules/validator/lib/util/includesString.js +12 -0
  485. package/node_modules/validator/lib/util/merge.js +22 -0
  486. package/node_modules/validator/lib/util/multilineRegex.js +20 -0
  487. package/node_modules/validator/lib/util/nullUndefinedCheck.js +11 -0
  488. package/node_modules/validator/lib/util/toString.js +21 -0
  489. package/node_modules/validator/lib/util/typeOf.js +18 -0
  490. package/node_modules/validator/lib/whitelist.js +14 -0
  491. package/node_modules/validator/package.json +76 -0
  492. package/node_modules/validator/validator.js +5808 -0
  493. package/node_modules/validator/validator.min.js +23 -0
  494. package/package.json +3 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["getFormatter","getFormatter","getFormatter"],"sources":["../typed-message.ts","../error.ts","../utils.ts","../message.ts","../dateTime.ts","../duration.ts","../displayName.ts","../list.ts","../plural.ts","../relativeTime.ts","../number.ts","../create-intl.ts"],"sourcesContent":["import type {\n MessageContract,\n MessageValuesOf,\n MessageValues,\n MessageFormatArguments,\n UntypedMessageContract,\n Options,\n} from 'intl-messageformat'\nimport type {MessageDescriptor} from '#packages/intl/types.js'\nexport type {\n MessageValue,\n MessageTag,\n NoMessageValues,\n MessageValues,\n MessageValuesOf,\n TypedMessageValues,\n} from 'intl-messageformat'\n\nexport type TypedMessageDescriptor<V extends MessageValues = {}> =\n Readonly<MessageDescriptor> & MessageContract<V>\nexport type UntypedMessageDescriptor = MessageDescriptor &\n UntypedMessageContract\n\nexport type TypedMessageArguments<\n V extends MessageValues,\n T = string,\n TChunk = T,\n> = MessageFormatArguments<V, T, TChunk, [options?: Options]>\n\nexport function defineMessage<\n V extends MessageValues = {},\n const D extends MessageDescriptor = never,\n>(\n message: D,\n options?: {typed: true}\n): Readonly<D> & Omit<TypedMessageDescriptor<NoInfer<V>>, keyof D>\nexport function defineMessage<V extends MessageValues = {}>(\n message: MessageDescriptor & {\n id: NonNullable<MessageDescriptor['id']>\n defaultMessage: string\n },\n options?: {typed: true}\n): TypedMessageDescriptor<NoInfer<V>> &\n Readonly<{id: NonNullable<MessageDescriptor['id']>; defaultMessage: string}>\nexport function defineMessage<V extends MessageValues = {}>(\n message: MessageDescriptor & {\n id: NonNullable<MessageDescriptor['id']>\n defaultMessage: NonNullable<MessageDescriptor['defaultMessage']>\n },\n options?: {typed: true}\n): TypedMessageDescriptor<NoInfer<V>> &\n Readonly<{\n id: NonNullable<MessageDescriptor['id']>\n defaultMessage: NonNullable<MessageDescriptor['defaultMessage']>\n }>\nexport function defineMessage<V extends MessageValues = {}>(\n message: MessageDescriptor & {defaultMessage: string},\n options?: {typed: true}\n): TypedMessageDescriptor<NoInfer<V>> & Readonly<{defaultMessage: string}>\nexport function defineMessage<V extends MessageValues = {}>(\n message: MessageDescriptor & {\n defaultMessage: NonNullable<MessageDescriptor['defaultMessage']>\n },\n options?: {typed: true}\n): TypedMessageDescriptor<NoInfer<V>> &\n Readonly<{defaultMessage: NonNullable<MessageDescriptor['defaultMessage']>}>\nexport function defineMessage<V extends MessageValues = {}>(\n message: MessageDescriptor & {id: NonNullable<MessageDescriptor['id']>},\n options?: {typed: true}\n): TypedMessageDescriptor<NoInfer<V>> &\n Readonly<{id: NonNullable<MessageDescriptor['id']>}>\nexport function defineMessage<V extends MessageValues = {}>(\n message: MessageDescriptor,\n options?: {typed: true}\n): TypedMessageDescriptor<NoInfer<V>>\nexport function defineMessage<T>(message: T): Readonly<T>\nexport function defineMessage(\n message: unknown,\n _options?: {typed: true}\n): unknown {\n return message\n}\n\nexport function defineMessages<\n V extends Record<string, MessageValues> = never,\n const D extends {[K in keyof NoInfer<V>]: MessageDescriptor} = never,\n>(\n messages: [NoInfer<V>] extends [never] ? never : D,\n options?: {typed: true}\n): {\n readonly [K in keyof NoInfer<V>]: Readonly<D[K]> &\n Omit<TypedMessageDescriptor<NoInfer<V[K]>>, keyof D[K]>\n}\nexport function defineMessages<V extends Record<string, MessageValues> = never>(\n messages: [NoInfer<V>] extends [never]\n ? never\n : {\n [K in keyof NoInfer<V>]: MessageDescriptor & {\n id: NonNullable<MessageDescriptor['id']>\n defaultMessage: string\n }\n },\n options?: {typed: true}\n): {\n readonly [K in keyof NoInfer<V>]: TypedMessageDescriptor<NoInfer<V[K]>> &\n Readonly<{id: NonNullable<MessageDescriptor['id']>; defaultMessage: string}>\n}\nexport function defineMessages<V extends Record<string, MessageValues> = never>(\n messages: [NoInfer<V>] extends [never]\n ? never\n : {\n [K in keyof NoInfer<V>]: MessageDescriptor & {\n id: NonNullable<MessageDescriptor['id']>\n defaultMessage: NonNullable<MessageDescriptor['defaultMessage']>\n }\n },\n options?: {typed: true}\n): {\n readonly [K in keyof NoInfer<V>]: TypedMessageDescriptor<NoInfer<V[K]>> &\n Readonly<{\n id: NonNullable<MessageDescriptor['id']>\n defaultMessage: NonNullable<MessageDescriptor['defaultMessage']>\n }>\n}\nexport function defineMessages<V extends Record<string, MessageValues> = never>(\n messages: [NoInfer<V>] extends [never]\n ? never\n : {[K in keyof NoInfer<V>]: MessageDescriptor & {defaultMessage: string}},\n options?: {typed: true}\n): {\n readonly [K in keyof NoInfer<V>]: TypedMessageDescriptor<NoInfer<V[K]>> &\n Readonly<{defaultMessage: string}>\n}\nexport function defineMessages<V extends Record<string, MessageValues> = never>(\n messages: [NoInfer<V>] extends [never]\n ? never\n : {\n [K in keyof NoInfer<V>]: MessageDescriptor & {\n defaultMessage: NonNullable<MessageDescriptor['defaultMessage']>\n }\n },\n options?: {typed: true}\n): {\n readonly [K in keyof NoInfer<V>]: TypedMessageDescriptor<NoInfer<V[K]>> &\n Readonly<{defaultMessage: NonNullable<MessageDescriptor['defaultMessage']>}>\n}\nexport function defineMessages<V extends Record<string, MessageValues> = never>(\n messages: [NoInfer<V>] extends [never]\n ? never\n : {\n [K in keyof NoInfer<V>]: MessageDescriptor & {\n id: NonNullable<MessageDescriptor['id']>\n }\n },\n options?: {typed: true}\n): {\n readonly [K in keyof NoInfer<V>]: TypedMessageDescriptor<NoInfer<V[K]>> &\n Readonly<{id: NonNullable<MessageDescriptor['id']>}>\n}\nexport function defineMessages<V extends Record<string, MessageValues> = never>(\n messages: [NoInfer<V>] extends [never]\n ? never\n : {[K in keyof NoInfer<V>]: MessageDescriptor},\n options?: {typed: true}\n): {readonly [K in keyof NoInfer<V>]: TypedMessageDescriptor<NoInfer<V[K]>>}\nexport function defineMessages<\n const D extends Record<string, MessageDescriptor>,\n>(\n messages: D,\n options?: {typed: true}\n): {\n readonly [K in keyof D]: Readonly<D[K]> &\n Omit<TypedMessageDescriptor, keyof D[K]>\n}\nexport function defineMessages<\n K extends keyof any,\n T = MessageDescriptor,\n U extends Record<K, T> = Record<K, T>,\n>(messages: U): {readonly [P in keyof U]: Readonly<U[P]>}\nexport function defineMessages(\n messages: unknown,\n _options?: {typed: true}\n): unknown {\n return messages\n}\n\n/** Argument contracts keyed by application message IDs. */\nexport type RegisteredMessageId = keyof FormatjsIntl.MessageArguments & string\n\nexport type RegisteredMessageValues<K extends RegisteredMessageId> =\n FormatjsIntl.MessageArguments[K] extends MessageValues\n ? FormatjsIntl.MessageArguments[K]\n : never\n\n/** Keep known IDs out of the permissive overload without rejecting dynamic IDs. */\nexport type UnregisteredMessageDescriptor<D extends UntypedMessageDescriptor> =\n D &\n (D extends {id: infer K}\n ? Extract<K, RegisteredMessageId> extends never\n ? unknown\n : never\n : unknown)\n\n/** Derive a registry from typed catalog entries with literal IDs. */\nexport type MessageArgumentsFromCatalog<\n C extends Record<string, TypedMessageDescriptor<MessageValues>>,\n> = {\n readonly [\n K in keyof C as C[K] extends {id: infer I extends string}\n ? string extends I\n ? never\n : I\n : never\n ]: MessageValuesOf<C[K]>\n}\n","import {type MessageDescriptor} from '#packages/intl/types.js'\n\nexport enum IntlErrorCode {\n FORMAT_ERROR = 'FORMAT_ERROR',\n UNSUPPORTED_FORMATTER = 'UNSUPPORTED_FORMATTER',\n INVALID_CONFIG = 'INVALID_CONFIG',\n MISSING_DATA = 'MISSING_DATA',\n MISSING_TRANSLATION = 'MISSING_TRANSLATION',\n}\n\nexport class IntlError<\n T extends IntlErrorCode = IntlErrorCode.FORMAT_ERROR,\n> extends Error {\n public readonly code: T\n\n constructor(code: T, message: string, exception?: Error | unknown) {\n const err = exception\n ? exception instanceof Error\n ? exception\n : new Error(String(exception))\n : undefined\n super(\n `[@formatjs/intl Error ${code}] ${message}\n${err ? `\\n${err.message}\\n${err.stack}` : ''}`\n )\n this.code = code\n // @ts-ignore just so we don't need to declare dep on @types/node\n if (typeof Error.captureStackTrace === 'function') {\n // @ts-ignore just so we don't need to declare dep on @types/node\n Error.captureStackTrace(this, IntlError)\n }\n }\n}\n\nexport class UnsupportedFormatterError extends IntlError<IntlErrorCode.UNSUPPORTED_FORMATTER> {\n constructor(message: string, exception?: Error | unknown) {\n super(IntlErrorCode.UNSUPPORTED_FORMATTER, message, exception)\n }\n}\n\nexport class InvalidConfigError extends IntlError<IntlErrorCode.INVALID_CONFIG> {\n constructor(message: string, exception?: Error | unknown) {\n super(IntlErrorCode.INVALID_CONFIG, message, exception)\n }\n}\n\nexport class MissingDataError extends IntlError<IntlErrorCode.MISSING_DATA> {\n constructor(message: string, exception?: Error | unknown) {\n super(IntlErrorCode.MISSING_DATA, message, exception)\n }\n}\n\nexport class IntlFormatError extends IntlError<IntlErrorCode.FORMAT_ERROR> {\n public readonly descriptor?: MessageDescriptor\n public readonly locale: string\n constructor(message: string, locale: string, exception?: Error | unknown) {\n super(\n IntlErrorCode.FORMAT_ERROR,\n `${message}\nLocale: ${locale}\n`,\n exception\n )\n this.locale = locale\n }\n}\n\nexport class MessageFormatError extends IntlFormatError {\n public readonly descriptor?: MessageDescriptor\n public readonly locale: string\n constructor(\n message: string,\n locale: string,\n descriptor?: MessageDescriptor,\n exception?: Error | unknown\n ) {\n super(\n `${message}\nMessageID: ${descriptor?.id}\nDefault Message: ${descriptor?.defaultMessage}\nDescription: ${descriptor?.description}\n`,\n locale,\n exception\n )\n this.descriptor = descriptor\n this.locale = locale\n }\n}\n\nexport class MissingTranslationError extends IntlError<IntlErrorCode.MISSING_TRANSLATION> {\n public readonly descriptor?: MessageDescriptor\n constructor(descriptor: MessageDescriptor, locale: string) {\n super(\n IntlErrorCode.MISSING_TRANSLATION,\n `Missing message: \"${descriptor.id}\" for locale \"${locale}\", using ${\n descriptor.defaultMessage\n ? `default message (${\n typeof descriptor.defaultMessage === 'string'\n ? descriptor.defaultMessage\n : descriptor.defaultMessage\n .map((e: any) => e.value ?? JSON.stringify(e))\n .join()\n })`\n : 'id'\n } as fallback.`\n )\n this.descriptor = descriptor\n }\n}\n","import type {DurationFormatOptions} from '#packages/ecma402-abstract/types/duration.js'\nimport {type NumberFormatOptions} from '#packages/ecma402-abstract/types/number.js'\nimport {type Cache, memoize, strategies} from '@formatjs/fast-memoize'\nimport {IntlMessageFormat} from 'intl-messageformat'\nimport {UnsupportedFormatterError} from '#packages/intl/error.js'\nimport {\n type CustomFormats,\n type Formatters,\n type IntlCache,\n type OnErrorFn,\n type OnWarnFn,\n type ResolvedIntlConfig,\n} from '#packages/intl/types.js'\n\nexport function invariant(\n condition: boolean,\n message: string,\n Err: any = Error\n): asserts condition {\n if (!condition) {\n throw new Err(message)\n }\n}\n\nexport function filterProps<T extends Record<string, any>, K extends string>(\n props: T,\n allowlist: Array<K>,\n defaults: Partial<T> = {}\n): Pick<T, K> {\n return allowlist.reduce(\n (filtered, name) => {\n if (name in props) {\n filtered[name] = props[name]\n } else if (name in defaults) {\n filtered[name] = defaults[name]!\n }\n\n return filtered\n },\n {} as Pick<T, K>\n )\n}\n\nconst defaultErrorHandler: OnErrorFn = error => {\n // @ts-ignore just so we don't need to declare dep on @types/node\n if (process.env.NODE_ENV !== 'production') {\n console.error(error)\n }\n}\n\nconst defaultWarnHandler: OnWarnFn = (warning: string) => {\n // @ts-ignore just so we don't need to declare dep on @types/node\n if (process.env.NODE_ENV !== 'production') {\n console.warn(warning)\n }\n}\n\nexport const DEFAULT_INTL_CONFIG: Pick<\n ResolvedIntlConfig<any>,\n | 'fallbackOnEmptyString'\n | 'formats'\n | 'messages'\n | 'timeZone'\n | 'defaultLocale'\n | 'defaultFormats'\n | 'onError'\n | 'onWarn'\n> = {\n formats: {},\n messages: {},\n timeZone: undefined,\n\n defaultLocale: 'en',\n defaultFormats: {},\n\n fallbackOnEmptyString: true,\n\n onError: defaultErrorHandler,\n onWarn: defaultWarnHandler,\n}\n\nexport function createIntlCache(): IntlCache {\n return {\n dateTime: {},\n number: {},\n message: {},\n duration: {},\n relativeTime: {},\n pluralRules: {},\n list: {},\n displayNames: {},\n }\n}\n\nfunction createFastMemoizeCache<V>(\n store: Record<string, V | undefined>\n): Cache<string, V> {\n return {\n create() {\n return {\n get(key) {\n return store[key]\n },\n set(key, value) {\n store[key] = value\n },\n }\n },\n }\n}\n\n/**\n * Create intl formatters and populate cache\n * @param cache explicit cache to prevent leaking memory\n */\nexport function createFormatters(\n cache: IntlCache = createIntlCache()\n): Formatters {\n const RelativeTimeFormat = (Intl as any).RelativeTimeFormat\n const ListFormat = (Intl as any).ListFormat\n const DisplayNames = (Intl as any).DisplayNames\n const getDateTimeFormat = memoize(\n (...args) => new Intl.DateTimeFormat(...args),\n {\n cache: createFastMemoizeCache(cache.dateTime),\n strategy: strategies.variadic,\n }\n )\n const getNumberFormat = memoize((...args) => new Intl.NumberFormat(...args), {\n cache: createFastMemoizeCache(cache.number),\n strategy: strategies.variadic,\n })\n const getPluralRules = memoize((...args) => new Intl.PluralRules(...args), {\n cache: createFastMemoizeCache(cache.pluralRules),\n strategy: strategies.variadic,\n })\n return {\n getDateTimeFormat,\n getNumberFormat,\n getMessageFormat: memoize(\n (message, locales, overrideFormats, opts) =>\n new IntlMessageFormat(message, locales, overrideFormats, {\n formatters: {\n getNumberFormat,\n getDateTimeFormat,\n getPluralRules,\n },\n ...opts,\n }),\n {\n cache: createFastMemoizeCache(cache.message),\n strategy: strategies.variadic,\n }\n ),\n getDurationFormat: memoize((...args) => new Intl.DurationFormat(...args), {\n cache: createFastMemoizeCache(cache.duration),\n strategy: strategies.variadic,\n }),\n getRelativeTimeFormat: memoize(\n (...args) => new RelativeTimeFormat(...args),\n {\n cache: createFastMemoizeCache(cache.relativeTime),\n strategy: strategies.variadic,\n }\n ),\n getPluralRules,\n getListFormat: memoize((...args) => new ListFormat(...args), {\n cache: createFastMemoizeCache(cache.list),\n strategy: strategies.variadic,\n }),\n getDisplayNames: memoize((...args) => new DisplayNames(...args), {\n cache: createFastMemoizeCache(cache.displayNames),\n strategy: strategies.variadic,\n }),\n }\n}\n\nexport function getNamedFormat<T extends keyof CustomFormats>(\n formats: CustomFormats,\n type: T,\n name: string,\n onError: OnErrorFn\n):\n | NumberFormatOptions\n | Intl.DateTimeFormatOptions\n | Intl.RelativeTimeFormatOptions\n | DurationFormatOptions\n | undefined {\n const formatType = formats && formats[type]\n let format\n if (formatType) {\n format = formatType[name]\n }\n if (format) {\n return format\n }\n\n onError(new UnsupportedFormatterError(`No ${type} format named: ${name}`))\n}\n","import {\n type CustomFormats,\n type Formatters,\n type MessageDescriptor,\n type OnErrorFn,\n} from '#packages/intl/types.js'\n\nimport {\n type MessageFormatElement,\n TYPE,\n} from '@formatjs/icu-messageformat-parser'\nimport {\n type FormatXMLElementFn,\n IntlMessageFormat,\n type Formatters as IntlMessageFormatFormatters,\n type Options,\n type PrimitiveType,\n} from 'intl-messageformat'\nimport {\n MessageFormatError,\n MissingTranslationError,\n} from '#packages/intl/error.js'\nimport {invariant} from '#packages/intl/utils.js'\n\nfunction setTimeZoneInOptions(\n opts: Record<string, Intl.DateTimeFormatOptions>,\n timeZone: string\n): Record<string, Intl.DateTimeFormatOptions> {\n return Object.keys(opts).reduce(\n (all: Record<string, Intl.DateTimeFormatOptions>, k) => {\n all[k] = {\n timeZone,\n ...opts[k],\n }\n return all\n },\n {}\n )\n}\n\nfunction deepMergeOptions(\n opts1: Record<string, Intl.DateTimeFormatOptions>,\n opts2: Record<string, Intl.DateTimeFormatOptions>\n): Record<string, Intl.DateTimeFormatOptions> {\n const keys = Object.keys({...opts1, ...opts2})\n return keys.reduce((all: Record<string, Intl.DateTimeFormatOptions>, k) => {\n all[k] = {\n ...opts1[k],\n ...opts2[k],\n }\n return all\n }, {})\n}\n\nfunction deepMergeFormatsAndSetTimeZone(\n f1: CustomFormats,\n timeZone?: string\n): CustomFormats {\n if (!timeZone) {\n return f1\n }\n const mfFormats = IntlMessageFormat.formats\n return {\n ...mfFormats,\n ...f1,\n date: deepMergeOptions(\n setTimeZoneInOptions(mfFormats.date, timeZone),\n setTimeZoneInOptions(f1.date || {}, timeZone)\n ),\n time: deepMergeOptions(\n setTimeZoneInOptions(mfFormats.time, timeZone),\n setTimeZoneInOptions(f1.time || {}, timeZone)\n ),\n }\n}\n\nexport type FormatMessageFn<T> = (\n {\n locale,\n formats,\n messages,\n defaultLocale,\n defaultFormats,\n fallbackOnEmptyString,\n onError,\n timeZone,\n defaultRichTextElements,\n }: {\n locale: string\n timeZone?: string\n formats: CustomFormats\n messages: Record<string, string> | Record<string, MessageFormatElement[]>\n defaultLocale: string\n defaultFormats: CustomFormats\n defaultRichTextElements?: Record<string, FormatXMLElementFn<T>>\n fallbackOnEmptyString?: boolean\n onError: OnErrorFn\n },\n state: IntlMessageFormatFormatters & Pick<Formatters, 'getMessageFormat'>,\n messageDescriptor: MessageDescriptor,\n values?: Record<string, PrimitiveType | T | FormatXMLElementFn<T>>,\n opts?: Options\n) => T extends string ? string : Array<T | string> | string | T\n\nfunction getMessageDescriptorContext(\n messageDescriptor: MessageDescriptor\n): string {\n const {defaultMessage} = messageDescriptor\n try {\n return defaultMessage !== undefined\n ? `\\nDefault Message: ${\n typeof defaultMessage === 'string'\n ? defaultMessage\n : JSON.stringify(defaultMessage)\n }`\n : `\\nMessage Descriptor: ${JSON.stringify(messageDescriptor)}`\n } catch {\n return ''\n }\n}\n\nexport const formatMessage: FormatMessageFn<any> = (\n {\n locale,\n formats,\n messages,\n defaultLocale,\n defaultFormats,\n fallbackOnEmptyString,\n onError,\n timeZone,\n defaultRichTextElements,\n },\n state,\n messageDescriptor = {id: ''},\n values,\n opts\n) => {\n const {id: msgId, defaultMessage} = messageDescriptor\n\n // `id` is a required field of a Message Descriptor.\n if (!msgId) {\n invariant(\n false,\n `[@formatjs/intl] An \\`id\\` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.github.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.github.io/docs/tooling/ts-transformer) OR\n2. Configure your \\`eslint\\` config to include [eslint-plugin-formatjs](https://formatjs.github.io/docs/tooling/linter#enforce-id)\nto autofix this issue${getMessageDescriptorContext(messageDescriptor)}`\n )\n }\n const id = String(msgId)\n const message =\n // In case messages is Object.create(null)\n // e.g import('foo.json') from webpack)\n // See https://github.com/formatjs/formatjs/issues/1914\n messages &&\n Object.prototype.hasOwnProperty.call(messages, id) &&\n messages[id]\n\n // IMPORTANT: Hot path if `message` is AST with a single literal node\n if (\n Array.isArray(message) &&\n message.length === 1 &&\n message[0].type === TYPE.literal\n ) {\n return message[0].value\n }\n\n values = {\n ...defaultRichTextElements,\n ...values,\n }\n formats = deepMergeFormatsAndSetTimeZone(formats, timeZone)\n defaultFormats = deepMergeFormatsAndSetTimeZone(defaultFormats, timeZone)\n\n if (!message) {\n if (fallbackOnEmptyString === false && message === '') {\n return message\n }\n\n if (\n !defaultMessage ||\n (locale && locale.toLowerCase() !== defaultLocale.toLowerCase())\n ) {\n // This prevents warnings from littering the console in development\n // when no `messages` are passed into the <IntlProvider> for the\n // default locale.\n onError(new MissingTranslationError(messageDescriptor, locale))\n }\n if (defaultMessage) {\n try {\n const formatter = state.getMessageFormat(\n defaultMessage,\n defaultLocale,\n defaultFormats,\n opts\n )\n\n return formatter.format(values)\n } catch (e) {\n onError(\n new MessageFormatError(\n `Error formatting default message for: \"${id}\", rendering default message verbatim`,\n locale,\n messageDescriptor,\n e\n )\n )\n return typeof defaultMessage === 'string' ? defaultMessage : id\n }\n }\n return id\n }\n\n // We have the translated message\n try {\n const formatter = state.getMessageFormat(message, locale, formats, {\n formatters: state,\n ...opts,\n })\n\n return formatter.format<any>(values)\n } catch (e) {\n onError(\n new MessageFormatError(\n `Error formatting message: \"${id}\", using ${\n defaultMessage ? 'default message' : 'id'\n } as fallback.`,\n locale,\n messageDescriptor,\n e\n )\n )\n }\n\n if (defaultMessage) {\n try {\n const formatter = state.getMessageFormat(\n defaultMessage,\n defaultLocale,\n defaultFormats,\n opts\n )\n\n return formatter.format(values)\n } catch (e) {\n onError(\n new MessageFormatError(\n `Error formatting the default message for: \"${id}\", rendering message verbatim`,\n locale,\n messageDescriptor,\n e\n )\n )\n }\n }\n\n if (typeof message === 'string') {\n return message\n }\n if (typeof defaultMessage === 'string') {\n return defaultMessage\n }\n return id\n}\n","import {\n type CustomFormats,\n type Formatters,\n type IntlFormatters,\n type OnErrorFn,\n} from '#packages/intl/types.js'\n\nimport {IntlFormatError} from '#packages/intl/error.js'\nimport {filterProps, getNamedFormat} from '#packages/intl/utils.js'\n\nconst DATE_TIME_FORMAT_OPTIONS: Array<keyof Intl.DateTimeFormatOptions> = [\n 'formatMatcher',\n\n 'timeZone',\n 'hour12',\n\n 'weekday',\n 'era',\n 'year',\n 'month',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'timeZoneName',\n 'hourCycle',\n 'dateStyle',\n 'timeStyle',\n 'calendar',\n // 'dayPeriod',\n 'numberingSystem',\n 'fractionalSecondDigits',\n]\n\nexport function getFormatter(\n {\n locale,\n formats,\n onError,\n timeZone,\n }: {\n locale: string\n timeZone?: string\n formats: CustomFormats\n onError: OnErrorFn\n },\n type: 'date' | 'time' | 'dateTimeRange',\n getDateTimeFormat: Formatters['getDateTimeFormat'],\n options: Parameters<IntlFormatters['formatDate']>[1] = {}\n): Intl.DateTimeFormat {\n const {format} = options\n const defaults = {\n ...(timeZone && {timeZone}),\n ...(format && getNamedFormat(formats!, type, format, onError)),\n }\n\n let filteredOptions = filterProps(\n options,\n DATE_TIME_FORMAT_OPTIONS,\n defaults\n ) as Intl.DateTimeFormatOptions\n\n if (\n type === 'time' &&\n !filteredOptions.hour &&\n !filteredOptions.minute &&\n !filteredOptions.second &&\n !filteredOptions.timeStyle &&\n !filteredOptions.dateStyle\n ) {\n // Add default formatting options if hour, minute, or second isn't defined.\n filteredOptions = {...filteredOptions, hour: 'numeric', minute: 'numeric'}\n }\n\n return getDateTimeFormat(locale, filteredOptions)\n}\n\nexport function formatDate(\n config: {\n locale: string\n timeZone?: string\n formats: CustomFormats\n onError: OnErrorFn\n },\n getDateTimeFormat: Formatters['getDateTimeFormat'],\n value: Parameters<IntlFormatters['formatDate']>[0],\n options: Parameters<IntlFormatters['formatDate']>[1] = {}\n): string {\n const date = typeof value === 'string' ? new Date(value || 0) : value\n try {\n return getFormatter(config, 'date', getDateTimeFormat, options).format(date)\n } catch (e) {\n config.onError(\n new IntlFormatError('Error formatting date.', config.locale, e)\n )\n }\n\n return String(date)\n}\n\nexport function formatTime(\n config: {\n locale: string\n timeZone?: string\n formats: CustomFormats\n onError: OnErrorFn\n },\n getDateTimeFormat: Formatters['getDateTimeFormat'],\n value: Parameters<IntlFormatters['formatTime']>[0],\n options: Parameters<IntlFormatters['formatTime']>[1] = {}\n): string {\n const date = typeof value === 'string' ? new Date(value || 0) : value\n\n try {\n return getFormatter(config, 'time', getDateTimeFormat, options).format(date)\n } catch (e) {\n config.onError(\n new IntlFormatError('Error formatting time.', config.locale, e)\n )\n }\n\n return String(date)\n}\n\nexport function formatDateTimeRange(\n config: {\n locale: string\n timeZone?: string\n formats: CustomFormats\n onError: OnErrorFn\n },\n getDateTimeFormat: Formatters['getDateTimeFormat'],\n from: Parameters<IntlFormatters['formatDateTimeRange']>[0],\n to: Parameters<IntlFormatters['formatDateTimeRange']>[1],\n options: Parameters<IntlFormatters['formatDateTimeRange']>[2] = {}\n): string {\n const fromDate = typeof from === 'string' ? new Date(from || 0) : from\n const toDate = typeof to === 'string' ? new Date(to || 0) : to\n\n try {\n return getFormatter(\n config,\n 'dateTimeRange',\n getDateTimeFormat,\n options\n ).formatRange(fromDate, toDate)\n } catch (e) {\n config.onError(\n new IntlFormatError('Error formatting date time range.', config.locale, e)\n )\n }\n\n return String(fromDate)\n}\n\nexport function formatDateToParts(\n config: {\n locale: string\n timeZone?: string\n formats: CustomFormats\n onError: OnErrorFn\n },\n getDateTimeFormat: Formatters['getDateTimeFormat'],\n value: Parameters<IntlFormatters['formatDate']>[0],\n options: Parameters<IntlFormatters['formatDate']>[1] = {}\n): Intl.DateTimeFormatPart[] {\n const date = typeof value === 'string' ? new Date(value || 0) : value\n try {\n return getFormatter(\n config,\n 'date',\n getDateTimeFormat,\n options\n ).formatToParts(date) as Intl.DateTimeFormatPart[] // TODO: remove this when https://github.com/microsoft/TypeScript/pull/50402 is merged\n } catch (e) {\n config.onError(\n new IntlFormatError('Error formatting date.', config.locale, e)\n )\n }\n\n return []\n}\n\nexport function formatTimeToParts(\n config: {\n locale: string\n timeZone?: string\n formats: CustomFormats\n onError: OnErrorFn\n },\n getDateTimeFormat: Formatters['getDateTimeFormat'],\n value: Parameters<IntlFormatters['formatTimeToParts']>[0],\n options: Parameters<IntlFormatters['formatTimeToParts']>[1] = {}\n): Intl.DateTimeFormatPart[] {\n const date = typeof value === 'string' ? new Date(value || 0) : value\n\n try {\n return getFormatter(\n config,\n 'time',\n getDateTimeFormat,\n options\n ).formatToParts(date) as Intl.DateTimeFormatPart[] // TODO: remove this when https://github.com/microsoft/TypeScript/pull/50402 is merged\n } catch (e) {\n config.onError(\n new IntlFormatError('Error formatting time.', config.locale, e)\n )\n }\n\n return []\n}\n","import {IntlFormatError} from '#packages/intl/error.js'\nimport type {\n CustomFormats,\n FormatDurationOptions,\n Formatters,\n IntlFormatters,\n OnErrorFn,\n} from '#packages/intl/types.js'\nimport {filterProps, getNamedFormat} from '#packages/intl/utils.js'\nimport {ErrorCode, FormatError} from 'intl-messageformat'\n\nconst DURATION_FORMAT_OPTIONS: Array<\n Exclude<keyof FormatDurationOptions, 'format'>\n> = [\n 'style',\n 'numberingSystem',\n 'years',\n 'yearsDisplay',\n 'months',\n 'monthsDisplay',\n 'weeks',\n 'weeksDisplay',\n 'days',\n 'daysDisplay',\n 'hours',\n 'hoursDisplay',\n 'minutes',\n 'minutesDisplay',\n 'seconds',\n 'secondsDisplay',\n 'milliseconds',\n 'millisecondsDisplay',\n 'microseconds',\n 'microsecondsDisplay',\n 'nanoseconds',\n 'nanosecondsDisplay',\n 'fractionalDigits',\n]\n\ntype Config = {\n locale: string\n formats: CustomFormats\n onError: OnErrorFn\n}\n\nfunction getFormatter(\n {locale, formats, onError}: Config,\n getDurationFormat: Formatters['getDurationFormat'],\n options: FormatDurationOptions\n): ReturnType<Formatters['getDurationFormat']> | undefined {\n if (!Intl.DurationFormat) {\n onError(\n new FormatError(\n 'Intl.DurationFormat is not available in this environment.\\nTry polyfilling it using \"@formatjs/intl-durationformat\"',\n ErrorCode.MISSING_INTL_API\n )\n )\n return\n }\n\n const {format} = options\n const defaults = ((format &&\n getNamedFormat(formats, 'duration', format, onError)) ||\n {}) as FormatDurationOptions\n return getDurationFormat(\n locale,\n filterProps(options, DURATION_FORMAT_OPTIONS, defaults)\n )\n}\n\nexport function formatDuration(\n config: Config,\n getDurationFormat: Formatters['getDurationFormat'],\n value: Parameters<IntlFormatters['formatDuration']>[0],\n options: FormatDurationOptions = {}\n): string {\n try {\n return getFormatter(config, getDurationFormat, options)?.format(value) ?? ''\n } catch (e) {\n config.onError(\n new IntlFormatError('Error formatting duration.', config.locale, e)\n )\n }\n return ''\n}\n\nexport function formatDurationToParts(\n config: Config,\n getDurationFormat: Formatters['getDurationFormat'],\n value: Parameters<IntlFormatters['formatDuration']>[0],\n options: FormatDurationOptions = {}\n): ReturnType<IntlFormatters['formatDurationToParts']> {\n try {\n return (\n getFormatter(config, getDurationFormat, options)?.formatToParts(value) ??\n []\n )\n } catch (e) {\n config.onError(\n new IntlFormatError('Error formatting duration.', config.locale, e)\n )\n }\n return []\n}\n","import {\n type Formatters,\n type IntlFormatters,\n type OnErrorFn,\n} from '#packages/intl/types.js'\nimport {filterProps} from '#packages/intl/utils.js'\n\nimport {ErrorCode, FormatError} from 'intl-messageformat'\nimport {IntlFormatError} from '#packages/intl/error.js'\n\nconst DISPLAY_NAMES_OPTONS: Array<keyof Intl.DisplayNamesOptions> = [\n 'style',\n 'type',\n 'fallback',\n 'languageDisplay',\n]\n\nexport function formatDisplayName(\n {\n locale,\n onError,\n }: {\n locale: string\n onError: OnErrorFn\n },\n getDisplayNames: Formatters['getDisplayNames'],\n value: Parameters<IntlFormatters['formatDisplayName']>[0],\n options: Parameters<IntlFormatters['formatDisplayName']>[1]\n): string | undefined {\n const DisplayNames: typeof Intl.DisplayNames = (Intl as any).DisplayNames\n if (!DisplayNames) {\n onError(\n new FormatError(\n `Intl.DisplayNames is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-displaynames\"\n`,\n ErrorCode.MISSING_INTL_API\n )\n )\n }\n const filteredOptions = filterProps(\n options,\n DISPLAY_NAMES_OPTONS\n ) as Intl.DisplayNamesOptions\n try {\n return getDisplayNames(locale, filteredOptions).of(value)\n } catch (e) {\n onError(new IntlFormatError('Error formatting display name.', locale, e))\n }\n}\n","import {ErrorCode, FormatError} from 'intl-messageformat'\nimport {IntlFormatError} from '#packages/intl/error.js'\nimport {\n type Formatters,\n type IntlFormatters,\n type OnErrorFn,\n type Part,\n} from '#packages/intl/types.js'\nimport {filterProps} from '#packages/intl/utils.js'\n\nconst LIST_FORMAT_OPTIONS: Array<keyof Intl.ListFormatOptions> = [\n 'type',\n 'style',\n]\n\nconst now = Date.now()\n\nfunction generateToken(i: number): string {\n return `${now}_${i}_${now}`\n}\n\nexport function formatList(\n opts: {\n locale: string\n onError: OnErrorFn\n },\n getListFormat: Formatters['getListFormat'],\n values: Iterable<string>,\n options: Parameters<IntlFormatters['formatList']>[1]\n): string\nexport function formatList<T>(\n opts: {\n locale: string\n onError: OnErrorFn\n },\n getListFormat: Formatters['getListFormat'],\n values: Iterable<string | T>,\n options: Parameters<IntlFormatters['formatList']>[1] = {}\n): Array<T | string> | T | string {\n const results = formatListToParts(\n opts,\n getListFormat,\n values,\n options\n ).reduce((all: Array<string | T>, el) => {\n const val = el.value\n if (typeof val !== 'string') {\n all.push(val)\n } else if (typeof all[all.length - 1] === 'string') {\n all[all.length - 1] += val\n } else {\n all.push(val)\n }\n return all\n }, [])\n return results.length === 1 ? results[0] : results.length === 0 ? '' : results\n}\n\nexport function formatListToParts<T>(\n opts: {\n locale: string\n onError: OnErrorFn\n },\n getListFormat: Formatters['getListFormat'],\n values: Iterable<string | T>,\n options: Parameters<IntlFormatters['formatList']>[1]\n): Part[]\nexport function formatListToParts<T>(\n {\n locale,\n onError,\n }: {\n locale: string\n onError: OnErrorFn\n },\n getListFormat: Formatters['getListFormat'],\n values: Parameters<IntlFormatters['formatList']>[0],\n options: Parameters<IntlFormatters['formatList']>[1] = {}\n): Part<T>[] {\n const ListFormat: typeof Intl.ListFormat = Intl.ListFormat\n if (!ListFormat) {\n onError(\n new FormatError(\n `Intl.ListFormat is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-listformat\"\n`,\n ErrorCode.MISSING_INTL_API\n )\n )\n }\n const filteredOptions = filterProps(\n options,\n LIST_FORMAT_OPTIONS\n ) as Intl.ListFormatOptions\n\n try {\n const richValues: Record<string, T> = {}\n const serializedValues = Array.from(values).map((v, i) => {\n if (typeof v === 'object' && v !== null) {\n const id = generateToken(i)\n richValues[id] = v as any\n return id\n }\n return String(v)\n })\n return getListFormat(locale, filteredOptions)\n .formatToParts(serializedValues)\n .map(\n part =>\n (part.type === 'literal'\n ? part\n : {...part, value: richValues[part.value] || part.value}) as Part<T>\n )\n } catch (e) {\n onError(new IntlFormatError('Error formatting list.', locale, e))\n }\n\n // @ts-ignore\n return values\n}\n","import {ErrorCode, FormatError} from 'intl-messageformat'\nimport {IntlFormatError} from '#packages/intl/error.js'\nimport {\n type Formatters,\n type IntlFormatters,\n type OnErrorFn,\n} from '#packages/intl/types.js'\nimport {filterProps} from '#packages/intl/utils.js'\n\nconst PLURAL_FORMAT_OPTIONS: Array<keyof Intl.PluralRulesOptions> = ['type']\n\nexport function formatPlural(\n {\n locale,\n onError,\n }: {\n locale: string\n onError: OnErrorFn\n },\n getPluralRules: Formatters['getPluralRules'],\n value: Parameters<IntlFormatters['formatPlural']>[0],\n options: Parameters<IntlFormatters['formatPlural']>[1] = {}\n): Intl.LDMLPluralRule {\n if (!Intl.PluralRules) {\n onError(\n new FormatError(\n `Intl.PluralRules is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-pluralrules\"\n`,\n ErrorCode.MISSING_INTL_API\n )\n )\n }\n const filteredOptions = filterProps(\n options,\n PLURAL_FORMAT_OPTIONS\n ) as Intl.PluralRulesOptions\n\n try {\n return getPluralRules(locale, filteredOptions).select(\n value\n ) as Intl.LDMLPluralRule\n } catch (e) {\n onError(new IntlFormatError('Error formatting plural.', locale, e))\n }\n\n return 'other'\n}\n","import {\n type IntlFormatters,\n type Formatters,\n type CustomFormats,\n type OnErrorFn,\n} from '#packages/intl/types.js'\n\nimport {getNamedFormat, filterProps} from '#packages/intl/utils.js'\nimport {FormatError, ErrorCode} from 'intl-messageformat'\nimport {IntlFormatError} from '#packages/intl/error.js'\n\nconst RELATIVE_TIME_FORMAT_OPTIONS: Array<\n keyof Intl.RelativeTimeFormatOptions\n> = ['numeric', 'style']\n\nfunction getFormatter(\n {\n locale,\n formats,\n onError,\n }: {\n locale: string\n formats: CustomFormats\n onError: OnErrorFn\n },\n getRelativeTimeFormat: Formatters['getRelativeTimeFormat'],\n options: Parameters<IntlFormatters['formatRelativeTime']>[2] = {}\n): Intl.RelativeTimeFormat {\n const {format} = options\n\n const defaults =\n (!!format && getNamedFormat(formats, 'relative', format, onError)) || {}\n const filteredOptions = filterProps(\n options,\n RELATIVE_TIME_FORMAT_OPTIONS,\n defaults as Intl.RelativeTimeFormatOptions\n ) as Intl.RelativeTimeFormatOptions\n\n return getRelativeTimeFormat(locale, filteredOptions)\n}\n\nexport function formatRelativeTime(\n config: {\n locale: string\n formats: CustomFormats\n onError: OnErrorFn\n },\n getRelativeTimeFormat: Formatters['getRelativeTimeFormat'],\n value: Parameters<IntlFormatters['formatRelativeTime']>[0],\n unit?: Parameters<IntlFormatters['formatRelativeTime']>[1],\n options: Parameters<IntlFormatters['formatRelativeTime']>[2] = {}\n): string {\n if (!unit) {\n unit = 'second'\n }\n const RelativeTimeFormat = Intl.RelativeTimeFormat\n if (!RelativeTimeFormat) {\n config.onError(\n new FormatError(\n `Intl.RelativeTimeFormat is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-relativetimeformat\"\n`,\n ErrorCode.MISSING_INTL_API\n )\n )\n }\n try {\n return getFormatter(config, getRelativeTimeFormat, options).format(\n value,\n unit\n )\n } catch (e) {\n config.onError(\n new IntlFormatError('Error formatting relative time.', config.locale, e)\n )\n }\n\n return String(value)\n}\n","import {type NumberFormatOptions} from '#packages/ecma402-abstract/types/number.js'\nimport {IntlFormatError} from '#packages/intl/error.js'\nimport {\n type CustomFormats,\n type Formatters,\n type IntlFormatters,\n type OnErrorFn,\n} from '#packages/intl/types.js'\nimport {filterProps, getNamedFormat} from '#packages/intl/utils.js'\n\nconst NUMBER_FORMAT_OPTIONS: Array<keyof NumberFormatOptions> = [\n 'style',\n 'currency',\n 'unit',\n 'unitDisplay',\n 'useGrouping',\n\n 'minimumIntegerDigits',\n 'minimumFractionDigits',\n 'maximumFractionDigits',\n 'minimumSignificantDigits',\n 'maximumSignificantDigits',\n\n // ES2020 NumberFormat\n 'compactDisplay',\n 'currencyDisplay',\n 'currencySign',\n 'notation',\n 'signDisplay',\n 'unit',\n 'unitDisplay',\n 'numberingSystem',\n\n // ES2023 NumberFormat\n 'trailingZeroDisplay',\n 'roundingPriority',\n 'roundingIncrement',\n 'roundingMode',\n]\n\nexport function getFormatter(\n {\n locale,\n formats,\n onError,\n }: {\n locale: string\n\n formats: CustomFormats\n onError: OnErrorFn\n },\n getNumberFormat: Formatters['getNumberFormat'],\n options: Parameters<IntlFormatters['formatNumber']>[1] = {}\n): Intl.NumberFormat {\n const {format} = options\n const defaults = ((format &&\n getNamedFormat(formats!, 'number', format, onError)) ||\n {}) as NumberFormatOptions\n const filteredOptions = filterProps(\n options,\n NUMBER_FORMAT_OPTIONS,\n defaults\n ) as NumberFormatOptions\n\n return getNumberFormat(locale, filteredOptions)\n}\n\nexport function formatNumber(\n config: {\n locale: string\n\n formats: CustomFormats\n onError: OnErrorFn\n },\n getNumberFormat: Formatters['getNumberFormat'],\n value: Parameters<IntlFormatters['formatNumber']>[0],\n options: Parameters<IntlFormatters['formatNumber']>[1] = {}\n): string {\n try {\n return getFormatter(config, getNumberFormat, options).format(value)\n } catch (e) {\n config.onError(\n new IntlFormatError('Error formatting number.', config.locale, e)\n )\n }\n\n return String(value)\n}\n\nexport function formatNumberToParts(\n config: {\n locale: string\n formats: CustomFormats\n onError: OnErrorFn\n },\n getNumberFormat: Formatters['getNumberFormat'],\n value: Parameters<IntlFormatters['formatNumber']>[0],\n options: Parameters<IntlFormatters['formatNumber']>[1] = {}\n): Intl.NumberFormatPart[] {\n try {\n return getFormatter(config, getNumberFormat, options).formatToParts(\n value as number\n )\n } catch (e) {\n config.onError(\n new IntlFormatError('Error formatting number.', config.locale, e)\n )\n }\n\n return []\n}\n","import {\n formatDate,\n formatDateTimeRange,\n formatDateToParts,\n formatTime,\n formatTimeToParts,\n} from '#packages/intl/dateTime.js'\nimport {formatDisplayName} from '#packages/intl/displayName.js'\nimport {formatDuration, formatDurationToParts} from '#packages/intl/duration.js'\nimport {InvalidConfigError, MissingDataError} from '#packages/intl/error.js'\nimport {formatList, formatListToParts} from '#packages/intl/list.js'\nimport {formatMessage} from '#packages/intl/message.js'\nimport {formatNumber, formatNumberToParts} from '#packages/intl/number.js'\nimport {formatPlural} from '#packages/intl/plural.js'\nimport {formatRelativeTime} from '#packages/intl/relativeTime.js'\nimport {\n type IntlCache,\n type IntlConfig,\n type IntlShape,\n type ResolvedIntlConfig,\n} from '#packages/intl/types.js'\nimport {createFormatters, DEFAULT_INTL_CONFIG} from '#packages/intl/utils.js'\nimport {type MessageFormatElement} from '@formatjs/icu-messageformat-parser'\n\nexport interface CreateIntlFn<\n T = string,\n C extends IntlConfig<T> = IntlConfig<T>,\n S extends IntlShape<T> = IntlShape<T>,\n> {\n (config: C, cache?: IntlCache): S\n}\n\nfunction messagesContainString(\n messages: Record<string, string> | Record<string, MessageFormatElement[]>\n): messages is Record<string, MessageFormatElement[]> {\n const firstMessage = messages ? messages[Object.keys(messages)[0]] : undefined\n\n return typeof firstMessage === 'string'\n}\n\nfunction verifyConfigMessages<T = string>(config: IntlConfig<T>) {\n if (\n config.onWarn &&\n config.defaultRichTextElements &&\n messagesContainString(config.messages || {})\n ) {\n config.onWarn(`[@formatjs/intl] \"defaultRichTextElements\" was specified but \"message\" was not pre-compiled. \nPlease consider using \"@formatjs/cli\" to pre-compile your messages for performance.\nFor more details see https://formatjs.github.io/docs/getting-started/message-distribution`)\n }\n}\n\n/**\n * Create intl object\n * @param config intl config\n * @param cache cache for formatter instances to prevent memory leak\n */\nexport function createIntl<T = string>(\n config: IntlConfig<T>,\n cache?: IntlCache\n): IntlShape<T> {\n const formatters = createFormatters(cache)\n const resolvedConfig: ResolvedIntlConfig<T> = {\n ...DEFAULT_INTL_CONFIG,\n ...config,\n }\n\n const {locale, defaultLocale, onError} = resolvedConfig\n if (!locale) {\n if (onError) {\n onError(\n new InvalidConfigError(\n `\"locale\" was not configured, using \"${defaultLocale}\" as fallback. See https://formatjs.github.io/docs/react-intl/api#intlshape for more details`\n )\n )\n }\n // Since there's no registered locale data for `locale`, this will\n // fallback to the `defaultLocale` to make sure things can render.\n // The `messages` are overridden to the `defaultProps` empty object\n // to maintain referential equality across re-renders. It's assumed\n // each <FormattedMessage> contains a `defaultMessage` prop.\n resolvedConfig.locale = resolvedConfig.defaultLocale || 'en'\n } else if (!Intl.NumberFormat.supportedLocalesOf(locale).length && onError) {\n onError(\n new MissingDataError(\n `Missing locale data for locale: \"${locale}\" in Intl.NumberFormat. Using default locale: \"${defaultLocale}\" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details`\n )\n )\n } else if (\n !Intl.DateTimeFormat.supportedLocalesOf(locale).length &&\n onError\n ) {\n onError(\n new MissingDataError(\n `Missing locale data for locale: \"${locale}\" in Intl.DateTimeFormat. Using default locale: \"${defaultLocale}\" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details`\n )\n )\n }\n\n verifyConfigMessages(resolvedConfig)\n return {\n ...resolvedConfig,\n formatters,\n formatNumber: formatNumber.bind(\n null,\n resolvedConfig,\n formatters.getNumberFormat\n ),\n formatNumberToParts: formatNumberToParts.bind(\n null,\n resolvedConfig,\n formatters.getNumberFormat\n ),\n formatDuration: formatDuration.bind(\n null,\n resolvedConfig,\n formatters.getDurationFormat\n ),\n formatDurationToParts: formatDurationToParts.bind(\n null,\n resolvedConfig,\n formatters.getDurationFormat\n ),\n formatRelativeTime: formatRelativeTime.bind(\n null,\n resolvedConfig,\n formatters.getRelativeTimeFormat\n ),\n formatDate: formatDate.bind(\n null,\n resolvedConfig,\n formatters.getDateTimeFormat\n ),\n formatDateToParts: formatDateToParts.bind(\n null,\n resolvedConfig,\n formatters.getDateTimeFormat\n ),\n formatTime: formatTime.bind(\n null,\n resolvedConfig,\n formatters.getDateTimeFormat\n ),\n formatDateTimeRange: formatDateTimeRange.bind(\n null,\n resolvedConfig,\n formatters.getDateTimeFormat\n ),\n formatTimeToParts: formatTimeToParts.bind(\n null,\n resolvedConfig,\n formatters.getDateTimeFormat\n ),\n formatPlural: formatPlural.bind(\n null,\n resolvedConfig,\n formatters.getPluralRules\n ),\n formatMessage: formatMessage.bind(null, resolvedConfig, formatters),\n $t: formatMessage.bind(null, resolvedConfig, formatters),\n formatList: formatList.bind(null, resolvedConfig, formatters.getListFormat),\n formatListToParts: formatListToParts.bind(\n null,\n resolvedConfig,\n formatters.getListFormat\n ),\n formatDisplayName: formatDisplayName.bind(\n null,\n resolvedConfig,\n formatters.getDisplayNames\n ),\n }\n}\n"],"mappings":";;;;AA4EA,SAAgB,cACd,SACA,UACS;CACT,OAAO;AACT;AAkGA,SAAgB,eACd,UACA,UACS;CACT,OAAO;AACT;;;ACtLA,IAAY,gBAAL,yBAAA,eAAA;CACL,cAAA,kBAAA;CACA,cAAA,2BAAA;CACA,cAAA,oBAAA;CACA,cAAA,kBAAA;CACA,cAAA,yBAA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AoC,OAAO,mDAAmD,cAAc,oGAC9G,CACF;CAGF,qBAAqB,cAAc;CACnC,OAAO;EACL,GAAG;EACH;EACA,cAAc,aAAa,KACzB,MACA,gBACA,WAAW,eACb;EACA,qBAAqB,oBAAoB,KACvC,MACA,gBACA,WAAW,eACb;EACA,gBAAgB,eAAe,KAC7B,MACA,gBACA,WAAW,iBACb;EACA,uBAAuB,sBAAsB,KAC3C,MACA,gBACA,WAAW,iBACb;EACA,oBAAoB,mBAAmB,KACrC,MACA,gBACA,WAAW,qBACb;EACA,YAAY,WAAW,KACrB,MACA,gBACA,WAAW,iBACb;EACA,mBAAmB,kBAAkB,KACnC,MACA,gBACA,WAAW,iBACb;EACA,YAAY,WAAW,KACrB,MACA,gBACA,WAAW,iBACb;EACA,qBAAqB,oBAAoB,KACvC,MACA,gBACA,WAAW,iBACb;EACA,mBAAmB,kBAAkB,KACnC,MACA,gBACA,WAAW,iBACb;EACA,cAAc,aAAa,KACzB,MACA,gBACA,WAAW,cACb;EACA,eAAe,cAAc,KAAK,MAAM,gBAAgB,UAAU;EAClE,IAAI,cAAc,KAAK,MAAM,gBAAgB,UAAU;EACvD,YAAY,WAAW,KAAK,MAAM,gBAAgB,WAAW,aAAa;EAC1E,mBAAmB,kBAAkB,KACnC,MACA,gBACA,WAAW,aACb;EACA,mBAAmB,kBAAkB,KACnC,MACA,gBACA,WAAW,eACb;CACF;AACF"}
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@formatjs/intl",
3
+ "version": "6.1.3",
4
+ "description": "Internationalize JS apps. This library provides an API to format dates, numbers, and strings, including pluralization and handling translations.",
5
+ "keywords": [
6
+ "format",
7
+ "formatting",
8
+ "globalization",
9
+ "i18n",
10
+ "internationalization",
11
+ "intl",
12
+ "locale",
13
+ "localization",
14
+ "react-intl",
15
+ "translate",
16
+ "translation"
17
+ ],
18
+ "homepage": "https://formatjs.github.io",
19
+ "bugs": "https://github.com/formatjs/formatjs/issues",
20
+ "license": "MIT",
21
+ "author": "Long Ho <holevietlong@gmail.com>",
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git@github.com:formatjs/formatjs.git"
25
+ },
26
+ "type": "module",
27
+ "sideEffects": false,
28
+ "types": "index.d.ts",
29
+ "exports": {
30
+ ".": "./index.js"
31
+ },
32
+ "dependencies": {
33
+ "@formatjs/fast-memoize": "3.1.7",
34
+ "@formatjs/icu-messageformat-parser": "3.5.21",
35
+ "intl-messageformat": "12.1.3"
36
+ }
37
+ }
@@ -0,0 +1,23 @@
1
+ The MIT Licence.
2
+
3
+ Copyright (c) 2025 Michael Mclaughlin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ 'Software'), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
+
@@ -0,0 +1,246 @@
1
+ ![decimal.js](https://raw.githubusercontent.com/MikeMcl/decimal.js/gh-pages/decimaljs.png)
2
+
3
+ An arbitrary-precision Decimal type for JavaScript.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/decimal.js.svg)](https://www.npmjs.com/package/decimal.js)
6
+ [![npm downloads](https://img.shields.io/npm/dw/decimal.js)](https://www.npmjs.com/package/decimal.js)
7
+ [![CDNJS](https://img.shields.io/cdnjs/v/decimal.js.svg)](https://cdnjs.com/libraries/decimal.js)
8
+ [![](https://data.jsdelivr.com/v1/package/npm/decimal.js/badge)](https://www.jsdelivr.com/package/npm/decimal.js)
9
+
10
+ <br>
11
+
12
+ ## Features
13
+
14
+ - Integers and floats
15
+ - Simple but full-featured API
16
+ - Replicates many of the methods of JavaScript's `Number.prototype` and `Math` objects
17
+ - Also handles hexadecimal, binary and octal values
18
+ - Faster, smaller, and perhaps easier to use than JavaScript versions of Java's BigDecimal
19
+ - No dependencies
20
+ - Wide platform compatibility: uses JavaScript 1.5 (ECMAScript 3) features only
21
+ - Comprehensive [documentation](https://mikemcl.github.io/decimal.js/) and test set
22
+ - Used under the hood by [math.js](https://github.com/josdejong/mathjs)
23
+ - Includes a TypeScript declaration file: *decimal.d.ts*
24
+
25
+ ![API](https://raw.githubusercontent.com/MikeMcl/decimal.js/gh-pages/API.png)
26
+
27
+ The library is similar to [bignumber.js](https://github.com/MikeMcl/bignumber.js/), but here
28
+ precision is specified in terms of significant digits rather than decimal places, and all
29
+ calculations are rounded to the precision (similar to Python's decimal module) rather than just
30
+ those involving division.
31
+
32
+ This library also adds the trigonometric functions, among others, and supports non-integer powers,
33
+ which makes it a significantly larger library than *bignumber.js* and the even smaller
34
+ [big.js](https://github.com/MikeMcl/big.js/).
35
+
36
+ For a lighter version of this library without the trigonometric functions see
37
+ [decimal.js-light](https://github.com/MikeMcl/decimal.js-light/).
38
+
39
+ ## Load
40
+
41
+ The library is the single JavaScript file *decimal.js* or ES module *decimal.mjs*.
42
+
43
+ Browser:
44
+
45
+ ```html
46
+ <script src='path/to/decimal.js'></script>
47
+
48
+ <script type="module">
49
+ import Decimal from './path/to/decimal.mjs';
50
+ ...
51
+ </script>
52
+ ```
53
+
54
+ [Node.js](https://nodejs.org):
55
+
56
+ ```bash
57
+ npm install decimal.js
58
+ ```
59
+ ```js
60
+ const Decimal = require('decimal.js');
61
+
62
+ import Decimal from 'decimal.js';
63
+
64
+ import {Decimal} from 'decimal.js';
65
+ ```
66
+
67
+ ## Use
68
+
69
+ *In all examples below, semicolons and `toString` calls are not shown.
70
+ If a commented-out value is in quotes it means `toString` has been called on the preceding expression.*
71
+
72
+ The library exports a single constructor function, `Decimal`, which expects a single argument that is a number, string or Decimal instance.
73
+
74
+ ```js
75
+ x = new Decimal(123.4567)
76
+ y = new Decimal('123456.7e-3')
77
+ z = new Decimal(x)
78
+ x.equals(y) && y.equals(z) && x.equals(z) // true
79
+ ```
80
+
81
+ If using values with more than a few digits, it is recommended to pass strings rather than numbers to avoid a potential loss of precision.
82
+
83
+ ```js
84
+ // Precision loss from using numeric literals with more than 15 significant digits.
85
+ new Decimal(1.0000000000000001) // '1'
86
+ new Decimal(88259496234518.57) // '88259496234518.56'
87
+ new Decimal(99999999999999999999) // '100000000000000000000'
88
+
89
+ // Precision loss from using numeric literals outside the range of Number values.
90
+ new Decimal(2e+308) // 'Infinity'
91
+ new Decimal(1e-324) // '0'
92
+
93
+ // Precision loss from the unexpected result of arithmetic with Number values.
94
+ new Decimal(0.7 + 0.1) // '0.7999999999999999'
95
+ ```
96
+
97
+ As with JavaScript numbers, strings can contain underscores as separators to improve readability.
98
+
99
+ ```js
100
+ x = new Decimal('2_147_483_647')
101
+ ```
102
+
103
+ String values in binary, hexadecimal or octal notation are also accepted if the appropriate prefix is included.
104
+
105
+ ```js
106
+ x = new Decimal('0xff.f') // '255.9375'
107
+ y = new Decimal('0b10101100') // '172'
108
+ z = x.plus(y) // '427.9375'
109
+
110
+ z.toBinary() // '0b110101011.1111'
111
+ z.toBinary(13) // '0b1.101010111111p+8'
112
+
113
+ // Using binary exponential notation to create a Decimal with the value of `Number.MAX_VALUE`.
114
+ x = new Decimal('0b1.1111111111111111111111111111111111111111111111111111p+1023')
115
+ // '1.7976931348623157081e+308'
116
+ ```
117
+
118
+ Decimal instances are immutable in the sense that they are not changed by their methods.
119
+
120
+ ```js
121
+ 0.3 - 0.1 // 0.19999999999999998
122
+ x = new Decimal(0.3)
123
+ x.minus(0.1) // '0.2'
124
+ x // '0.3'
125
+ ```
126
+
127
+ The methods that return a Decimal can be chained.
128
+
129
+ ```js
130
+ x.dividedBy(y).plus(z).times(9).floor()
131
+ x.times('1.23456780123456789e+9').plus(9876.5432321).dividedBy('4444562598.111772').ceil()
132
+ ```
133
+
134
+ Many method names have a shorter alias.
135
+
136
+ ```js
137
+ x.squareRoot().dividedBy(y).toPower(3).equals(x.sqrt().div(y).pow(3)) // true
138
+ x.comparedTo(y.modulo(z).negated() === x.cmp(y.mod(z).neg()) // true
139
+ ```
140
+
141
+ Most of the methods of JavaScript's `Number.prototype` and `Math` objects are replicated.
142
+
143
+ ```js
144
+ x = new Decimal(255.5)
145
+ x.toExponential(5) // '2.55500e+2'
146
+ x.toFixed(5) // '255.50000'
147
+ x.toPrecision(5) // '255.50'
148
+
149
+ Decimal.sqrt('6.98372465832e+9823') // '8.3568682281821340204e+4911'
150
+ Decimal.pow(2, 0.0979843) // '1.0702770511687781839'
151
+
152
+ // Using `toFixed()` to avoid exponential notation:
153
+ x = new Decimal('0.0000001')
154
+ x.toString() // '1e-7'
155
+ x.toFixed() // '0.0000001'
156
+ ```
157
+
158
+ And there are `isNaN` and `isFinite` methods, as `NaN` and `Infinity` are valid `Decimal` values.
159
+
160
+ ```js
161
+ x = new Decimal(NaN) // 'NaN'
162
+ y = new Decimal(Infinity) // 'Infinity'
163
+ x.isNaN() && !y.isNaN() && !x.isFinite() && !y.isFinite() // true
164
+ ```
165
+
166
+ There is also a `toFraction` method with an optional *maximum denominator* argument.
167
+
168
+ ```js
169
+ z = new Decimal(355)
170
+ pi = z.dividedBy(113) // '3.1415929204'
171
+ pi.toFraction() // [ '7853982301', '2500000000' ]
172
+ pi.toFraction(1000) // [ '355', '113' ]
173
+ ```
174
+
175
+ All calculations are rounded according to the number of significant digits and rounding mode specified
176
+ by the `precision` and `rounding` properties of the Decimal constructor.
177
+
178
+ For advanced usage, multiple Decimal constructors can be created, each with their own independent
179
+ configuration which applies to all Decimal numbers created from it.
180
+
181
+ ```js
182
+ // Set the precision and rounding of the default Decimal constructor
183
+ Decimal.set({ precision: 5, rounding: 4 })
184
+
185
+ // Create another Decimal constructor, optionally passing in a configuration object
186
+ Dec = Decimal.clone({ precision: 9, rounding: 1 })
187
+
188
+ x = new Decimal(5)
189
+ y = new Dec(5)
190
+
191
+ x.div(3) // '1.6667'
192
+ y.div(3) // '1.66666666'
193
+ ```
194
+
195
+ The value of a Decimal is stored in a floating point format in terms of its digits, exponent and sign, but these properties should be considered read-only.
196
+
197
+ ```js
198
+ x = new Decimal(-12345.67);
199
+ x.d // [ 12345, 6700000 ] digits (base 10000000)
200
+ x.e // 4 exponent (base 10)
201
+ x.s // -1 sign
202
+ ```
203
+
204
+ For further information see the [API](http://mikemcl.github.io/decimal.js/) reference in the *doc* directory.
205
+
206
+ ## Test
207
+
208
+ To run the tests using Node.js from the root directory:
209
+
210
+ ```bash
211
+ npm test
212
+ ```
213
+
214
+ Each separate test module can also be executed individually, for example:
215
+
216
+ ```bash
217
+ node test/modules/toFraction
218
+ ```
219
+
220
+ To run the tests in a browser, open *test/test.html*.
221
+
222
+ ## Minify
223
+
224
+ Two minification examples:
225
+
226
+ Using [uglify-js](https://github.com/mishoo/UglifyJS) to minify the *decimal.js* file:
227
+
228
+ ```bash
229
+ npm install uglify-js -g
230
+ uglifyjs decimal.js --source-map url=decimal.min.js.map -c -m -o decimal.min.js
231
+ ```
232
+
233
+ Using [terser](https://github.com/terser/terser) to minify the ES module version, *decimal.mjs*:
234
+
235
+ ```bash
236
+ npm install terser -g
237
+ terser decimal.mjs --source-map url=decimal.min.mjs.map -c -m --toplevel -o decimal.min.mjs
238
+ ```
239
+
240
+ ```js
241
+ import Decimal from './decimal.min.mjs';
242
+ ```
243
+
244
+ ## Licence
245
+
246
+ [The MIT Licence](LICENCE.md)