@onesy/ui-react 1.0.130 → 1.0.131

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 (444) hide show
  1. package/Accordion/Accordion.js +342 -242
  2. package/Accordion/index.js +12 -7
  3. package/AdvancedTextField/AdvancedTextField.js +165 -157
  4. package/AdvancedTextField/index.js +12 -7
  5. package/Append/Append.js +502 -519
  6. package/Append/index.js +12 -7
  7. package/AreaChart/AreaChart.js +53 -40
  8. package/AreaChart/index.js +12 -7
  9. package/AreaChartItem/AreaChartItem.js +325 -237
  10. package/AreaChartItem/index.js +12 -7
  11. package/AudioPlayer/AudioPlayer.js +683 -466
  12. package/AudioPlayer/index.js +12 -7
  13. package/AudioRecorder/AudioRecorder.js +359 -259
  14. package/AudioRecorder/index.js +12 -7
  15. package/AutoComplete/AutoComplete.js +693 -568
  16. package/AutoComplete/index.js +12 -7
  17. package/AutoCompleteCountry/AutoCompleteCountry.js +99 -62
  18. package/AutoCompleteCountry/index.js +12 -7
  19. package/AutoCompleteCurrency/AutoCompleteCurrency.js +73 -61
  20. package/AutoCompleteCurrency/index.js +12 -7
  21. package/Avatar/Avatar.js +113 -86
  22. package/Avatar/index.js +12 -7
  23. package/AvatarGroup/AvatarGroup.js +104 -87
  24. package/AvatarGroup/index.js +12 -7
  25. package/Backdrop/Backdrop.js +160 -139
  26. package/Backdrop/index.js +12 -7
  27. package/Badge/Badge.js +116 -96
  28. package/Badge/index.js +12 -7
  29. package/Banner/Banner.js +126 -85
  30. package/Banner/index.js +12 -7
  31. package/BottomAppBar/BottomAppBar.js +89 -60
  32. package/BottomAppBar/index.js +12 -7
  33. package/BottomSheet/BottomSheet.js +66 -59
  34. package/BottomSheet/index.js +12 -7
  35. package/Box/Box.js +43 -35
  36. package/Box/index.js +12 -7
  37. package/Breadcrumbs/Breadcrumbs.js +168 -144
  38. package/Breadcrumbs/index.js +12 -7
  39. package/BubbleChart/BubbleChart.js +261 -132
  40. package/BubbleChart/index.js +12 -7
  41. package/BubbleChartItem/BubbleChartItem.js +228 -161
  42. package/BubbleChartItem/index.js +12 -7
  43. package/Button/Button.js +488 -467
  44. package/Button/index.js +12 -7
  45. package/Buttons/Buttons.js +366 -293
  46. package/Buttons/index.js +12 -7
  47. package/Calendar/Calendar.js +715 -452
  48. package/Calendar/index.js +12 -7
  49. package/CalendarAvailability/CalendarAvailability.js +709 -388
  50. package/CalendarAvailability/index.js +12 -7
  51. package/CalendarMenu/CalendarMenu.js +430 -303
  52. package/CalendarMenu/index.js +12 -7
  53. package/CalendarMonth/CalendarMonth.js +537 -498
  54. package/CalendarMonth/index.js +12 -7
  55. package/CalendarViews/CalendarViews.js +403 -254
  56. package/CalendarViews/index.js +12 -7
  57. package/CalendarWeek/CalendarWeek.js +536 -395
  58. package/CalendarWeek/index.js +12 -7
  59. package/Card/Card.js +133 -101
  60. package/Card/index.js +12 -7
  61. package/CardButton/CardButton.js +78 -58
  62. package/CardButton/index.js +12 -7
  63. package/CardFooter/CardFooter.js +58 -39
  64. package/CardFooter/index.js +12 -7
  65. package/CardHeader/CardHeader.js +61 -44
  66. package/CardHeader/index.js +12 -7
  67. package/CardImage/CardImage.js +80 -67
  68. package/CardImage/index.js +12 -7
  69. package/CardMain/CardMain.js +53 -39
  70. package/CardMain/index.js +12 -7
  71. package/Carousel/Carousel.js +1025 -913
  72. package/Carousel/index.js +12 -7
  73. package/Chart/Chart.js +1325 -1174
  74. package/Chart/index.js +12 -7
  75. package/Checkbox/Checkbox.js +339 -325
  76. package/Checkbox/index.js +12 -7
  77. package/Chip/Chip.js +131 -102
  78. package/Chip/index.js +12 -7
  79. package/Chips/Chips.js +121 -94
  80. package/Chips/index.js +12 -7
  81. package/ClickListener/ClickListener.js +86 -89
  82. package/ClickListener/index.js +12 -7
  83. package/Clock/Clock.js +470 -417
  84. package/Clock/index.js +12 -7
  85. package/ColorTextField/ColorTextField.js +234 -171
  86. package/ColorTextField/index.js +12 -7
  87. package/ColumnChart/ColumnChart.js +63 -46
  88. package/ColumnChart/index.js +12 -7
  89. package/ColumnChartItem/ColumnChartItem.js +208 -149
  90. package/ColumnChartItem/index.js +12 -7
  91. package/Confirm/Confirm.js +184 -129
  92. package/Confirm/Context.js +9 -7
  93. package/Confirm/index.js +32 -13
  94. package/Confirm/useConfirm.js +11 -10
  95. package/Container/Container.js +154 -133
  96. package/Container/index.js +12 -7
  97. package/CookieBanner/CookieBanner.js +142 -76
  98. package/CookieBanner/index.js +12 -7
  99. package/Countdown/Countdown.js +403 -255
  100. package/Countdown/index.js +12 -7
  101. package/DatePicker/DatePicker.js +802 -547
  102. package/DatePicker/index.js +12 -7
  103. package/DateRangePicker/DateRangePicker.js +44 -37
  104. package/DateRangePicker/index.js +12 -7
  105. package/DateTimePicker/DateTimePicker.js +672 -459
  106. package/DateTimePicker/index.js +12 -7
  107. package/DateTimeRangePicker/DateTimeRangePicker.js +44 -37
  108. package/DateTimeRangePicker/index.js +12 -7
  109. package/Divider/Divider.js +198 -185
  110. package/Divider/index.js +12 -7
  111. package/DonutChart/DonutChart.js +49 -42
  112. package/DonutChart/index.js +12 -7
  113. package/DragAndDropList/DragAndDropList.js +160 -156
  114. package/DragAndDropList/index.js +12 -7
  115. package/Drawing/Drawing.js +850 -523
  116. package/Drawing/index.js +12 -7
  117. package/DropZone/DropZone.js +239 -201
  118. package/DropZone/index.js +12 -7
  119. package/Emojis/Emojis.js +409 -317
  120. package/Emojis/emojis_list.js +7279 -9250
  121. package/Emojis/index.js +19 -9
  122. package/Expand/Expand.js +201 -149
  123. package/Expand/index.js +12 -7
  124. package/Fab/Fab.js +46 -26
  125. package/Fab/index.js +12 -7
  126. package/Fade/Fade.js +131 -101
  127. package/Fade/index.js +12 -7
  128. package/FileChoose/FileChoose.js +218 -150
  129. package/FileChoose/index.js +12 -7
  130. package/Focus/Focus.js +87 -88
  131. package/Focus/index.js +12 -7
  132. package/Form/Form.js +194 -120
  133. package/Form/index.js +12 -7
  134. package/FormRow/FormRow.js +123 -78
  135. package/FormRow/index.js +12 -7
  136. package/Forms/Forms.js +55 -41
  137. package/Forms/index.js +12 -7
  138. package/Frame/Frame.js +212 -150
  139. package/Frame/index.js +12 -7
  140. package/Grid/Grid.js +231 -166
  141. package/Grid/index.js +12 -7
  142. package/Grow/Grow.js +137 -109
  143. package/Grow/index.js +12 -7
  144. package/HTMLCanvas/HTMLCanvas.js +752 -542
  145. package/HTMLCanvas/index.js +24 -21
  146. package/IFrame/IFrame.js +122 -104
  147. package/IFrame/index.js +12 -7
  148. package/Icon/Icon.js +112 -95
  149. package/Icon/index.js +24 -21
  150. package/IconButton/IconButton.js +49 -37
  151. package/IconButton/index.js +12 -7
  152. package/Image/Image.js +285 -252
  153. package/Image/index.js +12 -7
  154. package/ImageCrop/ImageCrop.js +1073 -1048
  155. package/ImageCrop/index.js +12 -7
  156. package/ImageEdit/ImageEdit.js +1088 -783
  157. package/ImageEdit/index.js +12 -7
  158. package/ImageGallery/ImageGallery.js +518 -473
  159. package/ImageGallery/index.js +12 -7
  160. package/ImageList/ImageList.js +136 -129
  161. package/ImageList/index.js +12 -7
  162. package/ImageListItem/ImageListItem.js +101 -87
  163. package/ImageListItem/index.js +12 -7
  164. package/ImageListItemBox/ImageListItemBox.js +61 -50
  165. package/ImageListItemBox/index.js +12 -7
  166. package/Info/Info.js +99 -63
  167. package/Info/index.js +12 -7
  168. package/Interaction/Interaction.js +405 -345
  169. package/Interaction/index.js +12 -7
  170. package/Keyframes/Context.js +9 -7
  171. package/Keyframes/Keyframes.js +189 -174
  172. package/Keyframes/index.js +42 -25
  173. package/Keyframes/useKeyframes.js +11 -10
  174. package/Label/Label.js +177 -151
  175. package/Label/index.js +12 -7
  176. package/Labels/Labels.js +126 -98
  177. package/Labels/index.js +12 -7
  178. package/Line/Line.js +296 -174
  179. package/Line/index.js +12 -7
  180. package/LineChart/LineChart.js +57 -40
  181. package/LineChart/index.js +12 -7
  182. package/LineChartItem/LineChartItem.js +239 -177
  183. package/LineChartItem/index.js +12 -7
  184. package/LinearMeter/LinearMeter.js +453 -377
  185. package/LinearMeter/index.js +12 -7
  186. package/LinearProgress/LinearProgress.js +324 -255
  187. package/LinearProgress/index.js +12 -7
  188. package/Link/Link.js +182 -127
  189. package/Link/index.js +12 -7
  190. package/Links/Links.js +277 -156
  191. package/Links/index.js +12 -7
  192. package/List/List.js +148 -113
  193. package/List/index.js +12 -7
  194. package/ListItem/ListItem.js +388 -362
  195. package/ListItem/index.js +12 -7
  196. package/ListSubheader/ListSubheader.js +52 -44
  197. package/ListSubheader/index.js +12 -7
  198. package/MainProgress/Context.js +9 -7
  199. package/MainProgress/MainProgress.js +193 -161
  200. package/MainProgress/index.js +32 -13
  201. package/MainProgress/useMainProgress.js +11 -10
  202. package/Markdown/Markdown.js +676 -704
  203. package/Markdown/index.js +12 -7
  204. package/Masonry/Masonry.js +207 -181
  205. package/Masonry/index.js +12 -7
  206. package/Medias/Medias.js +436 -398
  207. package/Medias/index.js +12 -7
  208. package/Menu/Menu.js +278 -243
  209. package/Menu/index.js +12 -7
  210. package/MenuDesktop/MenuDesktop.js +496 -419
  211. package/MenuDesktop/index.js +12 -7
  212. package/MenuItem/MenuItem.js +286 -231
  213. package/MenuItem/index.js +12 -7
  214. package/Meta/Meta.js +78 -54
  215. package/Meta/index.js +12 -7
  216. package/Modal/Modal.js +333 -272
  217. package/Modal/index.js +12 -7
  218. package/ModalFooter/ModalFooter.js +50 -39
  219. package/ModalFooter/index.js +12 -7
  220. package/ModalHeader/ModalHeader.js +51 -39
  221. package/ModalHeader/index.js +12 -7
  222. package/ModalIcon/ModalIcon.js +29 -23
  223. package/ModalIcon/index.js +12 -7
  224. package/ModalMain/ModalMain.js +50 -41
  225. package/ModalMain/index.js +12 -7
  226. package/ModalText/ModalText.js +47 -37
  227. package/ModalText/index.js +12 -7
  228. package/ModalTitle/ModalTitle.js +47 -37
  229. package/ModalTitle/index.js +12 -7
  230. package/MoreOptions/MoreOptions.js +72 -52
  231. package/MoreOptions/index.js +12 -7
  232. package/Move/Move.js +166 -141
  233. package/Move/index.js +12 -7
  234. package/NavigationBar/NavigationBar.js +133 -109
  235. package/NavigationBar/index.js +12 -7
  236. package/NavigationDrawer/NavigationDrawer.js +241 -211
  237. package/NavigationDrawer/index.js +12 -7
  238. package/NavigationItem/NavigationItem.js +293 -262
  239. package/NavigationItem/index.js +12 -7
  240. package/NavigationRail/NavigationRail.js +187 -150
  241. package/NavigationRail/index.js +12 -7
  242. package/NotFound/NotFound.js +89 -66
  243. package/NotFound/index.js +12 -7
  244. package/NumericTextField/NumericTextField.js +217 -212
  245. package/NumericTextField/index.js +12 -7
  246. package/Page/Page.js +131 -67
  247. package/Page/index.js +12 -7
  248. package/PageTransition/PageTransition.js +112 -102
  249. package/PageTransition/index.js +12 -7
  250. package/Pagination/Pagination.js +153 -98
  251. package/Pagination/index.js +12 -7
  252. package/PaginationItem/PaginationItem.js +85 -65
  253. package/PaginationItem/index.js +12 -7
  254. package/Parallax/Parallax.js +138 -145
  255. package/Parallax/index.js +12 -7
  256. package/Path/Path.js +40 -35
  257. package/Path/index.js +12 -7
  258. package/PieChart/PieChart.js +382 -267
  259. package/PieChart/index.js +12 -7
  260. package/Placeholder/Placeholder.js +125 -117
  261. package/Placeholder/index.js +12 -7
  262. package/Portal/Portal.js +37 -38
  263. package/Portal/index.js +12 -7
  264. package/Properties/Properties.js +85 -64
  265. package/Properties/index.js +12 -7
  266. package/Property/Property.js +120 -108
  267. package/Property/index.js +12 -7
  268. package/Radio/Radio.js +211 -181
  269. package/Radio/index.js +12 -7
  270. package/Radios/Radios.js +124 -92
  271. package/Radios/index.js +12 -7
  272. package/Rating/Rating.js +353 -360
  273. package/Rating/index.js +12 -7
  274. package/Reset/Reset.js +19 -24
  275. package/Reset/index.js +12 -7
  276. package/Reveal/Reveal.js +98 -89
  277. package/Reveal/index.js +12 -7
  278. package/RichTextEditor/RichTextEditor.js +1764 -972
  279. package/RichTextEditor/index.js +12 -7
  280. package/RoundMeter/RoundMeter.js +629 -537
  281. package/RoundMeter/index.js +12 -7
  282. package/RoundProgress/RoundProgress.js +233 -174
  283. package/RoundProgress/index.js +12 -7
  284. package/ScatterChart/ScatterChart.js +53 -40
  285. package/ScatterChart/index.js +12 -7
  286. package/ScatterChartItem/ScatterChartItem.js +214 -153
  287. package/ScatterChartItem/index.js +12 -7
  288. package/ScreenCapture/ScreenCapture.js +427 -335
  289. package/ScreenCapture/index.js +12 -7
  290. package/Section/Section.js +380 -319
  291. package/Section/index.js +12 -7
  292. package/SectionAction/SectionAction.js +72 -61
  293. package/SectionAction/index.js +12 -7
  294. package/SectionBoxes/SectionBoxes.js +240 -208
  295. package/SectionBoxes/index.js +12 -7
  296. package/SectionCards/SectionCards.js +256 -217
  297. package/SectionCards/index.js +12 -7
  298. package/SectionCarousel/SectionCarousel.js +284 -242
  299. package/SectionCarousel/index.js +12 -7
  300. package/SectionContact/SectionContact.js +174 -116
  301. package/SectionContact/index.js +12 -7
  302. package/SectionImageGallery/SectionImageGallery.js +64 -51
  303. package/SectionImageGallery/index.js +12 -7
  304. package/SectionLogos/SectionLogos.js +123 -109
  305. package/SectionLogos/index.js +12 -7
  306. package/SectionMedia/SectionMedia.js +170 -152
  307. package/SectionMedia/index.js +12 -7
  308. package/SectionReviews/SectionReviews.js +170 -129
  309. package/SectionReviews/index.js +12 -7
  310. package/SectionTextMedia/SectionTextMedia.js +187 -142
  311. package/SectionTextMedia/index.js +12 -7
  312. package/SectionTimeline/SectionTimeline.js +126 -95
  313. package/SectionTimeline/index.js +12 -7
  314. package/SectionWatch/SectionWatch.js +65 -53
  315. package/SectionWatch/index.js +12 -7
  316. package/Select/Select.js +517 -406
  317. package/Select/index.js +12 -7
  318. package/Share/Share.js +458 -319
  319. package/Share/index.js +12 -7
  320. package/Slide/Slide.js +184 -140
  321. package/Slide/index.js +12 -7
  322. package/Slider/Slider.js +927 -837
  323. package/Slider/index.js +12 -7
  324. package/SmartTextField/SmartTextField.js +1406 -1014
  325. package/SmartTextField/index.js +12 -7
  326. package/Snackbar/Snackbar.js +227 -185
  327. package/Snackbar/index.js +12 -7
  328. package/Snackbars/Context.js +9 -7
  329. package/Snackbars/Snackbars.js +234 -210
  330. package/Snackbars/index.js +32 -13
  331. package/Snackbars/useSnackbars.js +11 -10
  332. package/Space/Space.js +1683 -968
  333. package/Space/index.js +24 -21
  334. package/SpeechToText/SpeechToText.js +207 -172
  335. package/SpeechToText/index.js +12 -7
  336. package/SpeedDial/SpeedDial.js +434 -398
  337. package/SpeedDial/index.js +12 -7
  338. package/SpeedDialItem/SpeedDialItem.js +89 -63
  339. package/SpeedDialItem/index.js +12 -7
  340. package/SpyScroll/SpyScroll.js +154 -142
  341. package/SpyScroll/index.js +12 -7
  342. package/Step/Step.js +181 -127
  343. package/Step/index.js +12 -7
  344. package/Stepper/Stepper.js +159 -139
  345. package/Stepper/index.js +12 -7
  346. package/Surface/Surface.js +760 -798
  347. package/Surface/index.js +12 -7
  348. package/Switch/Switch.js +688 -532
  349. package/Switch/index.js +12 -7
  350. package/Tab/Tab.js +185 -150
  351. package/Tab/index.js +12 -7
  352. package/Table/Table.js +100 -77
  353. package/Table/index.js +12 -7
  354. package/TableBody/TableBody.js +76 -63
  355. package/TableBody/index.js +12 -7
  356. package/TableCell/TableCell.js +258 -220
  357. package/TableCell/index.js +12 -7
  358. package/TableFooter/TableFooter.js +60 -48
  359. package/TableFooter/index.js +12 -7
  360. package/TableHead/TableHead.js +139 -120
  361. package/TableHead/index.js +12 -7
  362. package/TableHeader/TableHeader.js +65 -50
  363. package/TableHeader/index.js +12 -7
  364. package/TablePagination/TablePagination.js +171 -98
  365. package/TablePagination/index.js +12 -7
  366. package/TableRow/TableRow.js +77 -64
  367. package/TableRow/index.js +12 -7
  368. package/Tabs/Tabs.js +425 -377
  369. package/Tabs/index.js +12 -7
  370. package/Text/Text.js +131 -113
  371. package/Text/index.js +12 -7
  372. package/TextField/TextField.js +940 -879
  373. package/TextField/index.js +12 -7
  374. package/TextToSpeech/TextToSpeech.js +176 -153
  375. package/TextToSpeech/index.js +12 -7
  376. package/TimePicker/TimePicker.js +985 -718
  377. package/TimePicker/index.js +12 -7
  378. package/TimeRangePicker/TimeRangePicker.js +44 -37
  379. package/TimeRangePicker/index.js +12 -7
  380. package/Timeline/Timeline.js +54 -42
  381. package/Timeline/index.js +12 -7
  382. package/TimelineItem/TimelineItem.js +144 -147
  383. package/TimelineItem/index.js +12 -7
  384. package/Timer/Timer.js +321 -204
  385. package/Timer/index.js +12 -7
  386. package/ToggleButton/ToggleButton.js +67 -58
  387. package/ToggleButton/index.js +12 -7
  388. package/ToggleButtons/ToggleButtons.js +46 -37
  389. package/ToggleButtons/index.js +12 -7
  390. package/Tooltip/Tooltip.js +489 -454
  391. package/Tooltip/index.js +12 -7
  392. package/TopAppBar/TopAppBar.js +237 -197
  393. package/TopAppBar/index.js +12 -7
  394. package/Transition/Context.js +9 -7
  395. package/Transition/Transition.js +321 -339
  396. package/Transition/index.js +42 -25
  397. package/Transition/useTransition.js +11 -10
  398. package/Transitions/Transitions.js +215 -179
  399. package/Transitions/index.js +12 -7
  400. package/Tree/Tree.js +375 -312
  401. package/Tree/index.js +12 -7
  402. package/Type/Type.js +251 -152
  403. package/Type/index.js +12 -7
  404. package/VideoPlayer/VideoPlayer.js +866 -656
  405. package/VideoPlayer/index.js +12 -7
  406. package/ViewSplit/ViewSplit.js +413 -387
  407. package/ViewSplit/index.js +12 -7
  408. package/Watch/Watch.js +436 -290
  409. package/Watch/index.js +12 -7
  410. package/Weather/Weather.js +294 -247
  411. package/Weather/index.js +12 -7
  412. package/Whiteboard/Whiteboard.js +1392 -1292
  413. package/Whiteboard/index.js +12 -7
  414. package/Widgets/Context.js +9 -7
  415. package/Widgets/Widgets.js +220 -168
  416. package/Widgets/index.js +32 -13
  417. package/Widgets/useWidgets.js +11 -10
  418. package/WindowSplit/WindowSplit.js +381 -336
  419. package/WindowSplit/index.js +12 -7
  420. package/Zoom/Zoom.js +126 -99
  421. package/Zoom/index.js +12 -7
  422. package/esm/Buttons/Buttons.js +1 -1
  423. package/esm/index.js +1 -1
  424. package/index.js +4053 -660
  425. package/package.json +1 -1
  426. package/types.js +4 -1
  427. package/useForm/index.js +25 -11
  428. package/useForm/useForm.js +203 -174
  429. package/useForm/validate.js +215 -203
  430. package/useLocation/index.js +12 -7
  431. package/useLocation/useLocation.js +54 -49
  432. package/useMediaQuery/index.js +12 -7
  433. package/useMediaQuery/useMediaQuery.js +44 -43
  434. package/useQuery/index.js +12 -7
  435. package/useQuery/useQuery.js +14 -10
  436. package/useScroll/index.js +12 -7
  437. package/useScroll/useScroll.js +61 -56
  438. package/useSubscription/index.js +12 -7
  439. package/useSubscription/useSubscription.js +35 -35
  440. package/useSwipe/index.js +12 -7
  441. package/useSwipe/useSwipe.js +157 -131
  442. package/useVisible/index.js +12 -7
  443. package/useVisible/useVisible.js +86 -76
  444. package/utils.js +1224 -1362
package/utils.js CHANGED
@@ -1,1427 +1,1289 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.decodeHTMLEntities = exports.currencies = exports.iconFontSize = exports.formats = exports.toNumber = exports.caret = exports.keyboardStyleCommands = exports.keyboardStandardCommands = exports.getOverflowParent = exports.importIframeStyles = exports.replace = exports.sanitize = exports.minMaxBetweenNumbers = exports.controlPoint = exports.line = exports.angleToCoordinates = exports.matches = exports.save = exports.print = exports.canvasOldPhoto = exports.canvasInvert = exports.canvasFade = exports.canvasSaturation = exports.canvasContrast = exports.canvasBrightness = exports.image = exports.valueBreakpoints = exports.iconSizeToFontSize = exports.staticClassName = exports.reflow = void 0;
4
- const utils_1 = require("@onesy/utils");
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.print = exports.minMaxBetweenNumbers = exports.matches = exports.line = exports.keyboardStyleCommands = exports.keyboardStandardCommands = exports.importIframeStyles = exports.image = exports.iconSizeToFontSize = exports.iconFontSize = exports.getOverflowParent = exports.formats = exports.decodeHTMLEntities = exports.currencies = exports.controlPoint = exports.caret = exports.canvasSaturation = exports.canvasOldPhoto = exports.canvasInvert = exports.canvasFade = exports.canvasContrast = exports.canvasBrightness = exports.angleToCoordinates = void 0;
7
+ exports.reflow = reflow;
8
+ exports.valueBreakpoints = exports.toNumber = exports.staticClassName = exports.save = exports.sanitize = exports.replace = void 0;
9
+ var _utils = require("@onesy/utils");
5
10
  function reflow(element) {
6
- element === null || element === void 0 ? void 0 : element.offsetHeight;
11
+ element === null || element === void 0 || element.offsetHeight;
7
12
  }
8
- exports.reflow = reflow;
9
13
  const staticClassName = (name, theme) => {
10
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
11
- return ((_d = (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _a === void 0 ? void 0 : _a.elements) === null || _b === void 0 ? void 0 : _b[`onesy-${name}`]) === null || _c === void 0 ? void 0 : _c.className) === null || _d === void 0 ? void 0 : _d.static) !== undefined ? (_h = (_g = (_f = (_e = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _e === void 0 ? void 0 : _e.elements) === null || _f === void 0 ? void 0 : _f[`onesy-${name}`]) === null || _g === void 0 ? void 0 : _g.className) === null || _h === void 0 ? void 0 : _h.static : (_j = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _j === void 0 ? void 0 : _j.className.static;
14
+ var _theme$ui, _theme$ui2, _theme$ui3;
15
+ return (theme === null || theme === void 0 || (_theme$ui = theme.ui) === null || _theme$ui === void 0 || (_theme$ui = _theme$ui.elements) === null || _theme$ui === void 0 || (_theme$ui = _theme$ui[`onesy-${name}`]) === null || _theme$ui === void 0 || (_theme$ui = _theme$ui.className) === null || _theme$ui === void 0 ? void 0 : _theme$ui.static) !== undefined ? theme === null || theme === void 0 || (_theme$ui2 = theme.ui) === null || _theme$ui2 === void 0 || (_theme$ui2 = _theme$ui2.elements) === null || _theme$ui2 === void 0 || (_theme$ui2 = _theme$ui2[`onesy-${name}`]) === null || _theme$ui2 === void 0 || (_theme$ui2 = _theme$ui2.className) === null || _theme$ui2 === void 0 ? void 0 : _theme$ui2.static : theme === null || theme === void 0 || (_theme$ui3 = theme.ui) === null || _theme$ui3 === void 0 ? void 0 : _theme$ui3.className.static;
12
16
  };
13
17
  exports.staticClassName = staticClassName;
14
- const iconSizeToFontSize = (value) => {
15
- let fontSize = '1.5rem';
16
- if (value === 'very small')
17
- fontSize = '0.75rem';
18
- else if (value === 'small')
19
- fontSize = '1.125rem';
20
- else if (value === 'regular')
21
- fontSize = '1.5rem';
22
- else if (value === 'medium')
23
- fontSize = '1.875rem';
24
- else if (value === 'large')
25
- fontSize = '2.25rem';
26
- else if (value === 'very large')
27
- fontSize = '2.625rem';
28
- else if (value !== undefined)
29
- fontSize = value;
30
- return fontSize;
18
+ const iconSizeToFontSize = value => {
19
+ let fontSize = '1.5rem';
20
+ if (value === 'very small') fontSize = '0.75rem';else if (value === 'small') fontSize = '1.125rem';else if (value === 'regular') fontSize = '1.5rem';else if (value === 'medium') fontSize = '1.875rem';else if (value === 'large') fontSize = '2.25rem';else if (value === 'very large') fontSize = '2.625rem';else if (value !== undefined) fontSize = value;
21
+ return fontSize;
31
22
  };
32
- exports.iconSizeToFontSize = iconSizeToFontSize;
23
+
33
24
  // Media query value or value
25
+ exports.iconSizeToFontSize = iconSizeToFontSize;
34
26
  const valueBreakpoints = (item, value, breakpoints, theme) => {
35
- // Simple
36
- if (!(0, utils_1.is)('object', item) && item !== undefined)
37
- return item;
38
- const breakpointsKeysTheme = Object.keys(theme.breakpoints.media);
39
- const breakpointsKeys = Object.keys(breakpoints || {});
40
- // No breakpoints object
41
- if ((0, utils_1.is)('object', item) && !Object.keys(item).every(prop => ['default', ...breakpointsKeysTheme].includes(prop)))
42
- return item;
43
- // Item
44
- if ((0, utils_1.is)('object', item)) {
45
- for (const breakpoint of breakpointsKeys) {
46
- if (breakpoints[breakpoint] && (item === null || item === void 0 ? void 0 : item[breakpoint]) !== undefined)
47
- return item[breakpoint];
48
- }
49
- if ((item === null || item === void 0 ? void 0 : item.default) !== undefined)
50
- return item === null || item === void 0 ? void 0 : item.default;
27
+ // Simple
28
+ if (!(0, _utils.is)('object', item) && item !== undefined) return item;
29
+ const breakpointsKeysTheme = Object.keys(theme.breakpoints.media);
30
+ const breakpointsKeys = Object.keys(breakpoints || {});
31
+
32
+ // No breakpoints object
33
+ if ((0, _utils.is)('object', item) && !Object.keys(item).every(prop => ['default', ...breakpointsKeysTheme].includes(prop))) return item;
34
+
35
+ // Item
36
+ if ((0, _utils.is)('object', item)) {
37
+ for (const breakpoint of breakpointsKeys) {
38
+ if (breakpoints[breakpoint] && (item === null || item === void 0 ? void 0 : item[breakpoint]) !== undefined) return item[breakpoint];
51
39
  }
52
- // Value
53
- if ((0, utils_1.is)('object', value)) {
54
- for (const breakpoint of breakpointsKeys) {
55
- if (breakpoints[breakpoint] && (value === null || value === void 0 ? void 0 : value[breakpoint]) !== undefined)
56
- return value[breakpoint];
57
- }
58
- if ((value === null || value === void 0 ? void 0 : value.default) !== undefined)
59
- return value === null || value === void 0 ? void 0 : value.default;
40
+ if ((item === null || item === void 0 ? void 0 : item.default) !== undefined) return item === null || item === void 0 ? void 0 : item.default;
41
+ }
42
+
43
+ // Value
44
+ if ((0, _utils.is)('object', value)) {
45
+ for (const breakpoint of breakpointsKeys) {
46
+ if (breakpoints[breakpoint] && (value === null || value === void 0 ? void 0 : value[breakpoint]) !== undefined) return value[breakpoint];
60
47
  }
61
- return value;
48
+ if ((value === null || value === void 0 ? void 0 : value.default) !== undefined) return value === null || value === void 0 ? void 0 : value.default;
49
+ }
50
+ return value;
62
51
  };
63
52
  exports.valueBreakpoints = valueBreakpoints;
64
- const image = (uri) => new Promise((resolve, reject) => {
65
- const img = document.createElement('img');
66
- const method = () => resolve(img);
67
- img.onload = method;
68
- img.onerror = () => resolve('');
69
- img.src = uri;
53
+ const image = uri => new Promise((resolve, reject) => {
54
+ const img = document.createElement('img');
55
+ const method = () => resolve(img);
56
+ img.onload = method;
57
+ img.onerror = () => resolve('');
58
+ img.src = uri;
70
59
  });
71
60
  exports.image = image;
72
61
  const canvasBrightness = (value, mainCanvas, valueCopy) => {
73
- const rootDocument = (mainCanvas === null || mainCanvas === void 0 ? void 0 : mainCanvas.ownerDocument) || window.document;
74
- const canvas = rootDocument.createElement('canvas');
75
- canvas.width = valueCopy.width;
76
- canvas.height = valueCopy.height;
77
- const context = canvas.getContext('2d');
78
- context.drawImage(valueCopy, 0, 0);
79
- if (![0, undefined].includes(value))
80
- (0, utils_1.canvasFilterBrightness)(value, canvas);
81
- mainCanvas === null || mainCanvas === void 0 ? void 0 : mainCanvas.getContext('2d').drawImage(canvas, 0, 0, canvas.width, canvas.height);
82
- return canvas;
62
+ const rootDocument = (mainCanvas === null || mainCanvas === void 0 ? void 0 : mainCanvas.ownerDocument) || window.document;
63
+ const canvas = rootDocument.createElement('canvas');
64
+ canvas.width = valueCopy.width;
65
+ canvas.height = valueCopy.height;
66
+ const context = canvas.getContext('2d');
67
+ context.drawImage(valueCopy, 0, 0);
68
+ if (![0, undefined].includes(value)) (0, _utils.canvasFilterBrightness)(value, canvas);
69
+ mainCanvas === null || mainCanvas === void 0 || mainCanvas.getContext('2d').drawImage(canvas, 0, 0, canvas.width, canvas.height);
70
+ return canvas;
83
71
  };
84
72
  exports.canvasBrightness = canvasBrightness;
85
73
  const canvasContrast = (value, mainCanvas, valueCopy) => {
86
- const rootDocument = (mainCanvas === null || mainCanvas === void 0 ? void 0 : mainCanvas.ownerDocument) || window.document;
87
- const canvas = rootDocument.createElement('canvas');
88
- canvas.width = valueCopy.width;
89
- canvas.height = valueCopy.height;
90
- const context = canvas.getContext('2d');
91
- context.drawImage(valueCopy, 0, 0);
92
- if (![0, undefined].includes(value))
93
- (0, utils_1.canvasFilterContrast)(value, canvas);
94
- mainCanvas === null || mainCanvas === void 0 ? void 0 : mainCanvas.getContext('2d').drawImage(canvas, 0, 0, canvas.width, canvas.height);
95
- return canvas;
74
+ const rootDocument = (mainCanvas === null || mainCanvas === void 0 ? void 0 : mainCanvas.ownerDocument) || window.document;
75
+ const canvas = rootDocument.createElement('canvas');
76
+ canvas.width = valueCopy.width;
77
+ canvas.height = valueCopy.height;
78
+ const context = canvas.getContext('2d');
79
+ context.drawImage(valueCopy, 0, 0);
80
+ if (![0, undefined].includes(value)) (0, _utils.canvasFilterContrast)(value, canvas);
81
+ mainCanvas === null || mainCanvas === void 0 || mainCanvas.getContext('2d').drawImage(canvas, 0, 0, canvas.width, canvas.height);
82
+ return canvas;
96
83
  };
97
84
  exports.canvasContrast = canvasContrast;
98
85
  const canvasSaturation = (value, mainCanvas, valueCopy) => {
99
- const rootDocument = (mainCanvas === null || mainCanvas === void 0 ? void 0 : mainCanvas.ownerDocument) || window.document;
100
- const canvas = rootDocument.createElement('canvas');
101
- canvas.width = valueCopy.width;
102
- canvas.height = valueCopy.height;
103
- const context = canvas.getContext('2d');
104
- context.drawImage(valueCopy, 0, 0);
105
- if (![0, undefined].includes(value))
106
- (0, utils_1.canvasFilterSaturation)(value, canvas);
107
- mainCanvas === null || mainCanvas === void 0 ? void 0 : mainCanvas.getContext('2d').drawImage(canvas, 0, 0, canvas.width, canvas.height);
108
- return canvas;
86
+ const rootDocument = (mainCanvas === null || mainCanvas === void 0 ? void 0 : mainCanvas.ownerDocument) || window.document;
87
+ const canvas = rootDocument.createElement('canvas');
88
+ canvas.width = valueCopy.width;
89
+ canvas.height = valueCopy.height;
90
+ const context = canvas.getContext('2d');
91
+ context.drawImage(valueCopy, 0, 0);
92
+ if (![0, undefined].includes(value)) (0, _utils.canvasFilterSaturation)(value, canvas);
93
+ mainCanvas === null || mainCanvas === void 0 || mainCanvas.getContext('2d').drawImage(canvas, 0, 0, canvas.width, canvas.height);
94
+ return canvas;
109
95
  };
110
96
  exports.canvasSaturation = canvasSaturation;
111
97
  const canvasFade = (value, mainCanvas, valueCopy) => {
112
- const rootDocument = (mainCanvas === null || mainCanvas === void 0 ? void 0 : mainCanvas.ownerDocument) || window.document;
113
- const canvas = rootDocument.createElement('canvas');
114
- canvas.width = valueCopy.width;
115
- canvas.height = valueCopy.height;
116
- const context = canvas.getContext('2d');
117
- context.drawImage(valueCopy, 0, 0);
118
- if (![0, undefined].includes(value))
119
- (0, utils_1.canvasFilterFade)(value, canvas);
120
- mainCanvas === null || mainCanvas === void 0 ? void 0 : mainCanvas.getContext('2d').drawImage(canvas, 0, 0, canvas.width, canvas.height);
121
- return canvas;
98
+ const rootDocument = (mainCanvas === null || mainCanvas === void 0 ? void 0 : mainCanvas.ownerDocument) || window.document;
99
+ const canvas = rootDocument.createElement('canvas');
100
+ canvas.width = valueCopy.width;
101
+ canvas.height = valueCopy.height;
102
+ const context = canvas.getContext('2d');
103
+ context.drawImage(valueCopy, 0, 0);
104
+ if (![0, undefined].includes(value)) (0, _utils.canvasFilterFade)(value, canvas);
105
+ mainCanvas === null || mainCanvas === void 0 || mainCanvas.getContext('2d').drawImage(canvas, 0, 0, canvas.width, canvas.height);
106
+ return canvas;
122
107
  };
123
108
  exports.canvasFade = canvasFade;
124
109
  const canvasInvert = (value, mainCanvas, valueCopy) => {
125
- const rootDocument = (mainCanvas === null || mainCanvas === void 0 ? void 0 : mainCanvas.ownerDocument) || window.document;
126
- const canvas = rootDocument.createElement('canvas');
127
- canvas.width = valueCopy.width;
128
- canvas.height = valueCopy.height;
129
- const context = canvas.getContext('2d');
130
- context.drawImage(valueCopy, 0, 0);
131
- if (![0, undefined].includes(value))
132
- (0, utils_1.canvasFilterInvert)(value, canvas);
133
- mainCanvas === null || mainCanvas === void 0 ? void 0 : mainCanvas.getContext('2d').drawImage(canvas, 0, 0, canvas.width, canvas.height);
134
- return canvas;
110
+ const rootDocument = (mainCanvas === null || mainCanvas === void 0 ? void 0 : mainCanvas.ownerDocument) || window.document;
111
+ const canvas = rootDocument.createElement('canvas');
112
+ canvas.width = valueCopy.width;
113
+ canvas.height = valueCopy.height;
114
+ const context = canvas.getContext('2d');
115
+ context.drawImage(valueCopy, 0, 0);
116
+ if (![0, undefined].includes(value)) (0, _utils.canvasFilterInvert)(value, canvas);
117
+ mainCanvas === null || mainCanvas === void 0 || mainCanvas.getContext('2d').drawImage(canvas, 0, 0, canvas.width, canvas.height);
118
+ return canvas;
135
119
  };
136
120
  exports.canvasInvert = canvasInvert;
137
121
  const canvasOldPhoto = (value, mainCanvas, valueCopy) => {
138
- const rootDocument = (mainCanvas === null || mainCanvas === void 0 ? void 0 : mainCanvas.ownerDocument) || window.document;
139
- const canvas = rootDocument.createElement('canvas');
140
- canvas.width = valueCopy.width;
141
- canvas.height = valueCopy.height;
142
- const context = canvas.getContext('2d');
143
- context.drawImage(valueCopy, 0, 0);
144
- if (![0, undefined].includes(value))
145
- (0, utils_1.canvasFilterOldPhoto)(value, canvas);
146
- mainCanvas === null || mainCanvas === void 0 ? void 0 : mainCanvas.getContext('2d').drawImage(canvas, 0, 0, canvas.width, canvas.height);
147
- return canvas;
122
+ const rootDocument = (mainCanvas === null || mainCanvas === void 0 ? void 0 : mainCanvas.ownerDocument) || window.document;
123
+ const canvas = rootDocument.createElement('canvas');
124
+ canvas.width = valueCopy.width;
125
+ canvas.height = valueCopy.height;
126
+ const context = canvas.getContext('2d');
127
+ context.drawImage(valueCopy, 0, 0);
128
+ if (![0, undefined].includes(value)) (0, _utils.canvasFilterOldPhoto)(value, canvas);
129
+ mainCanvas === null || mainCanvas === void 0 || mainCanvas.getContext('2d').drawImage(canvas, 0, 0, canvas.width, canvas.height);
130
+ return canvas;
148
131
  };
149
132
  exports.canvasOldPhoto = canvasOldPhoto;
150
- const print = (element) => {
151
- const rootDocument = (element === null || element === void 0 ? void 0 : element.ownerDocument) || window.document;
152
- const clone = rootDocument.cloneNode(true);
153
- clone.body.innerHTML = '';
154
- const elementClone = element.cloneNode(true);
155
- clone.body.append(elementClone);
156
- const windowNew = window.open('', 'print');
157
- windowNew.document.head.innerHTML = clone.head.innerHTML;
158
- windowNew.document.body.innerHTML = clone.body.innerHTML;
159
- windowNew.document.close();
160
- windowNew.focus();
161
- windowNew.print();
162
- windowNew.close();
133
+ const print = element => {
134
+ const rootDocument = (element === null || element === void 0 ? void 0 : element.ownerDocument) || window.document;
135
+ const clone = rootDocument.cloneNode(true);
136
+ clone.body.innerHTML = '';
137
+ const elementClone = element.cloneNode(true);
138
+ clone.body.append(elementClone);
139
+ const windowNew = window.open('', 'print');
140
+ windowNew.document.head.innerHTML = clone.head.innerHTML;
141
+ windowNew.document.body.innerHTML = clone.body.innerHTML;
142
+ windowNew.document.close();
143
+ windowNew.focus();
144
+ windowNew.print();
145
+ windowNew.close();
163
146
  };
164
147
  exports.print = print;
165
- const save = (element) => {
166
- const rootDocument = (element === null || element === void 0 ? void 0 : element.ownerDocument) || window.document;
167
- const clone = rootDocument.cloneNode(true);
168
- clone.body.innerHTML = '';
169
- const elementClone = element.cloneNode(true);
170
- elementClone.contentEditable = 'false';
171
- clone.body.append(elementClone);
172
- (0, utils_1.download)(`${rootDocument.title}.html`, clone.documentElement.innerHTML, 'text/html');
148
+ const save = element => {
149
+ const rootDocument = (element === null || element === void 0 ? void 0 : element.ownerDocument) || window.document;
150
+ const clone = rootDocument.cloneNode(true);
151
+ clone.body.innerHTML = '';
152
+ const elementClone = element.cloneNode(true);
153
+ elementClone.contentEditable = 'false';
154
+ clone.body.append(elementClone);
155
+ (0, _utils.download)(`${rootDocument.title}.html`, clone.documentElement.innerHTML, 'text/html');
173
156
  };
174
157
  exports.save = save;
175
- const matches = (value) => {
176
- const method = (0, utils_1.is)('element', value) && (value.matches || value['webkitMatchesSelector'] || value['mozMatchesSelector'] || value['oMatchesSelector'] || value['msMatchesSelector']);
177
- if (!method)
178
- return () => false;
179
- return method.bind(value);
158
+ const matches = value => {
159
+ const method = (0, _utils.is)('element', value) && (value.matches || value['webkitMatchesSelector'] || value['mozMatchesSelector'] || value['oMatchesSelector'] || value['msMatchesSelector']);
160
+ if (!method) return () => false;
161
+ return method.bind(value);
180
162
  };
181
163
  exports.matches = matches;
182
164
  const angleToCoordinates = (degrees, centerX, centerY, radius) => {
183
- const radians = (degrees * Math.PI) / 180;
184
- return {
185
- x: centerX + (radius * Math.cos(radians)),
186
- y: centerY + (radius * Math.sin(radians))
187
- };
165
+ const radians = degrees * Math.PI / 180;
166
+ return {
167
+ x: centerX + radius * Math.cos(radians),
168
+ y: centerY + radius * Math.sin(radians)
169
+ };
188
170
  };
189
171
  exports.angleToCoordinates = angleToCoordinates;
190
172
  const line = (pointA, pointB) => {
191
- const lengthX = pointB[0] - pointA[0];
192
- const lengthY = pointB[1] - pointA[1];
193
- return {
194
- length: Math.sqrt(Math.pow(lengthX, 2) + Math.pow(lengthY, 2)),
195
- angle: Math.atan2(lengthY, lengthX)
196
- };
173
+ const lengthX = pointB[0] - pointA[0];
174
+ const lengthY = pointB[1] - pointA[1];
175
+ return {
176
+ length: Math.sqrt(Math.pow(lengthX, 2) + Math.pow(lengthY, 2)),
177
+ angle: Math.atan2(lengthY, lengthX)
178
+ };
197
179
  };
198
180
  exports.line = line;
199
181
  const controlPoint = (current, previous_, next_, reverse = false, smoothRatio = 0.14) => {
200
- const previous = previous_ || current;
201
- const next = next_ || current;
202
- const opposed = (0, exports.line)(previous, next);
203
- const angle = opposed.angle + (reverse ? Math.PI : 0);
204
- const length = opposed.length * smoothRatio;
205
- // Bug fix, prevent ties if x are the same
206
- // for previous, and current value
207
- const x = (0, utils_1.clamp)(current[0] + Math.cos(angle) * length, previous[0], next[0]);
208
- const y = current[1] + Math.sin(angle) * length;
209
- return [x, y];
182
+ const previous = previous_ || current;
183
+ const next = next_ || current;
184
+ const opposed = line(previous, next);
185
+ const angle = opposed.angle + (reverse ? Math.PI : 0);
186
+ const length = opposed.length * smoothRatio;
187
+
188
+ // Bug fix, prevent ties if x are the same
189
+ // for previous, and current value
190
+ const x = (0, _utils.clamp)(current[0] + Math.cos(angle) * length, previous[0], next[0]);
191
+ const y = current[1] + Math.sin(angle) * length;
192
+ return [x, y];
210
193
  };
211
194
  exports.controlPoint = controlPoint;
212
195
  const minMaxBetweenNumbers = (value = 10, min = 0, max = 100) => {
213
- const part = (max - min) / (value - 1);
214
- const values = [min];
215
- for (let i = 0; i < (value - 2); i++)
216
- values.push(values[values.length - 1] + part);
217
- values.push(max);
218
- return values;
196
+ const part = (max - min) / (value - 1);
197
+ const values = [min];
198
+ for (let i = 0; i < value - 2; i++) values.push(values[values.length - 1] + part);
199
+ values.push(max);
200
+ return values;
219
201
  };
220
202
  exports.minMaxBetweenNumbers = minMaxBetweenNumbers;
221
- const sanitize = (value) => {
222
- if (value) {
223
- const map = {
224
- '&': '&amp;',
225
- '<': '&lt;',
226
- '>': '&gt;',
227
- '"': '&quot;',
228
- "'": '&#x27;',
229
- "/": '&#x2F;',
230
- "\\": '&#x5c;',
231
- '*': '&#x2a',
232
- };
233
- const reg = /[&<>"'/\\*]/ig;
234
- return value.replace(reg, (match) => (map[match]));
235
- }
203
+ const sanitize = value => {
204
+ if (value) {
205
+ const map = {
206
+ '&': '&amp;',
207
+ '<': '&lt;',
208
+ '>': '&gt;',
209
+ '"': '&quot;',
210
+ "'": '&#x27;',
211
+ "/": '&#x2F;',
212
+ "\\": '&#x5c;',
213
+ '*': '&#x2a'
214
+ };
215
+ const reg = /[&<>"'/\\*]/ig;
216
+ return value.replace(reg, match => map[match]);
217
+ }
236
218
  };
237
219
  exports.sanitize = sanitize;
238
220
  const replace = (value, split, join) => {
239
- return value.split(split).join(join);
221
+ return value.split(split).join(join);
240
222
  };
241
223
  exports.replace = replace;
242
- const importIframeStyles = (iframeDocument) => {
243
- var _a;
244
- const styleSheets = window.document.styleSheets;
245
- for (const styleSheet of Array.from(styleSheets)) {
246
- if (!styleSheet.ownerNode.onesy) {
247
- iframeDocument.head.append((_a = styleSheet.ownerNode) === null || _a === void 0 ? void 0 : _a.cloneNode(true));
248
- continue;
249
- }
250
- let css = '';
251
- const rules = styleSheet === null || styleSheet === void 0 ? void 0 : styleSheet.cssRules;
252
- for (const rule of Array.from(rules))
253
- css += rule.cssText;
254
- const style = window.document.createElement('style');
255
- style.innerHTML = css;
256
- iframeDocument.head.append(style);
224
+ const importIframeStyles = iframeDocument => {
225
+ const styleSheets = window.document.styleSheets;
226
+ for (const styleSheet of Array.from(styleSheets)) {
227
+ if (!styleSheet.ownerNode.onesy) {
228
+ var _styleSheet$ownerNode;
229
+ iframeDocument.head.append((_styleSheet$ownerNode = styleSheet.ownerNode) === null || _styleSheet$ownerNode === void 0 ? void 0 : _styleSheet$ownerNode.cloneNode(true));
230
+ continue;
257
231
  }
232
+ let css = '';
233
+ const rules = styleSheet === null || styleSheet === void 0 ? void 0 : styleSheet.cssRules;
234
+ for (const rule of Array.from(rules)) css += rule.cssText;
235
+ const style = window.document.createElement('style');
236
+ style.innerHTML = css;
237
+ iframeDocument.head.append(style);
238
+ }
258
239
  };
259
240
  exports.importIframeStyles = importIframeStyles;
260
- const getOverflowParent = (element) => {
261
- if (!element)
262
- return;
263
- if (element.scrollHeight > element.clientHeight)
264
- return element;
265
- return (0, exports.getOverflowParent)(element.parentElement);
241
+ const getOverflowParent = element => {
242
+ if (!element) return;
243
+ if (element.scrollHeight > element.clientHeight) return element;
244
+ return getOverflowParent(element.parentElement);
266
245
  };
267
246
  exports.getOverflowParent = getOverflowParent;
268
- exports.keyboardStandardCommands = ['a', 'c', 'v', 'y', 'z'];
269
- exports.keyboardStyleCommands = ['b', 'i', 'u'];
270
- exports.caret = {};
271
- if ((0, utils_1.isEnvironment)('browser')) {
272
- if (window.getSelection && document.createRange) {
273
- // Saves caret position(s)
274
- exports.caret.save = function (container) {
275
- var _a;
276
- const selection = window.getSelection();
277
- if (!(selection && selection.rangeCount > 0))
278
- return;
279
- const range = (_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.getRangeAt(0);
280
- if (!range)
281
- return;
282
- const preSelectionRange = range.cloneRange();
283
- preSelectionRange.selectNodeContents(container);
284
- preSelectionRange.setEnd(range.startContainer, range.startOffset);
285
- const start = preSelectionRange.toString().length;
286
- return {
287
- start: start,
288
- end: start + range.toString().length
289
- };
290
- };
291
- // Restores caret position(s)
292
- exports.caret.restore = function (container, savedElement) {
293
- let charIndex = 0;
294
- const range = document.createRange();
295
- range.setStart(container, 0);
296
- range.collapse(true);
297
- const nodeStack = [container];
298
- let node;
299
- let foundStart = false;
300
- let stop = false;
301
- // tslint:disable-next-line
302
- while (!stop && (node = nodeStack.pop())) {
303
- if (node.nodeType === 3) {
304
- const nextCharIndex = charIndex + node.length;
305
- if (!foundStart && savedElement.start >= charIndex && savedElement.start <= nextCharIndex) {
306
- range.setStart(node, savedElement.start - charIndex);
307
- foundStart = true;
308
- }
309
- if (foundStart && savedElement.end >= charIndex && savedElement.end <= nextCharIndex) {
310
- range.setEnd(node, savedElement.end - charIndex);
311
- stop = true;
312
- }
313
- charIndex = nextCharIndex;
314
- }
315
- else {
316
- let i = node.childNodes.length;
317
- while (i--) {
318
- nodeStack.push(node.childNodes[i]);
319
- }
320
- }
321
- }
322
- const selection = window.getSelection();
323
- selection === null || selection === void 0 ? void 0 : selection.removeAllRanges();
324
- selection === null || selection === void 0 ? void 0 : selection.addRange(range);
325
- };
326
- }
327
- else if (process.window && window.document.selection && window.document.body.createTextRange) {
328
- // Saves caret position(s)
329
- exports.caret.save = function (container) {
330
- const selectedTextRange = window.document.selection.createRange();
331
- const preSelectionTextRange = window.document.body.createTextRange();
332
- preSelectionTextRange.moveToElementText(container);
333
- preSelectionTextRange.setEndPoint("EndToStart", selectedTextRange);
334
- const start = preSelectionTextRange.text.length;
335
- return {
336
- start: start,
337
- end: start + selectedTextRange.text.length
338
- };
339
- };
340
- // Restores caret position(s)
341
- exports.caret.restore = function (container, savedElement) {
342
- const textRange = window.document.body.createTextRange();
343
- textRange.moveToElementText(container);
344
- textRange.collapse(true);
345
- textRange.moveEnd("character", savedElement.end);
346
- textRange.moveStart("character", savedElement.start);
347
- textRange.select();
348
- };
349
- }
247
+ const keyboardStandardCommands = exports.keyboardStandardCommands = ['a', 'c', 'v', 'y', 'z'];
248
+ const keyboardStyleCommands = exports.keyboardStyleCommands = ['b', 'i', 'u'];
249
+ const caret = exports.caret = {};
250
+ if ((0, _utils.isEnvironment)('browser')) {
251
+ if (window.getSelection && document.createRange) {
252
+ // Saves caret position(s)
253
+ caret.save = function (container) {
254
+ var _window$getSelection;
255
+ const selection = window.getSelection();
256
+ if (!(selection && selection.rangeCount > 0)) return;
257
+ const range = (_window$getSelection = window.getSelection()) === null || _window$getSelection === void 0 ? void 0 : _window$getSelection.getRangeAt(0);
258
+ if (!range) return;
259
+ const preSelectionRange = range.cloneRange();
260
+ preSelectionRange.selectNodeContents(container);
261
+ preSelectionRange.setEnd(range.startContainer, range.startOffset);
262
+ const start = preSelectionRange.toString().length;
263
+ return {
264
+ start: start,
265
+ end: start + range.toString().length
266
+ };
267
+ };
268
+
269
+ // Restores caret position(s)
270
+ caret.restore = function (container, savedElement) {
271
+ let charIndex = 0;
272
+ const range = document.createRange();
273
+ range.setStart(container, 0);
274
+ range.collapse(true);
275
+ const nodeStack = [container];
276
+ let node;
277
+ let foundStart = false;
278
+ let stop = false;
279
+
280
+ // tslint:disable-next-line
281
+ while (!stop && (node = nodeStack.pop())) {
282
+ if (node.nodeType === 3) {
283
+ const nextCharIndex = charIndex + node.length;
284
+ if (!foundStart && savedElement.start >= charIndex && savedElement.start <= nextCharIndex) {
285
+ range.setStart(node, savedElement.start - charIndex);
286
+ foundStart = true;
287
+ }
288
+ if (foundStart && savedElement.end >= charIndex && savedElement.end <= nextCharIndex) {
289
+ range.setEnd(node, savedElement.end - charIndex);
290
+ stop = true;
291
+ }
292
+ charIndex = nextCharIndex;
293
+ } else {
294
+ let i = node.childNodes.length;
295
+ while (i--) {
296
+ nodeStack.push(node.childNodes[i]);
297
+ }
298
+ }
299
+ }
300
+ const selection = window.getSelection();
301
+ selection === null || selection === void 0 || selection.removeAllRanges();
302
+ selection === null || selection === void 0 || selection.addRange(range);
303
+ };
304
+ } else if (process.window && window.document.selection && window.document.body.createTextRange) {
305
+ // Saves caret position(s)
306
+ caret.save = function (container) {
307
+ const selectedTextRange = window.document.selection.createRange();
308
+ const preSelectionTextRange = window.document.body.createTextRange();
309
+ preSelectionTextRange.moveToElementText(container);
310
+ preSelectionTextRange.setEndPoint("EndToStart", selectedTextRange);
311
+ const start = preSelectionTextRange.text.length;
312
+ return {
313
+ start: start,
314
+ end: start + selectedTextRange.text.length
315
+ };
316
+ };
317
+
318
+ // Restores caret position(s)
319
+ caret.restore = function (container, savedElement) {
320
+ const textRange = window.document.body.createTextRange();
321
+ textRange.moveToElementText(container);
322
+ textRange.collapse(true);
323
+ textRange.moveEnd("character", savedElement.end);
324
+ textRange.moveStart("character", savedElement.start);
325
+ textRange.select();
326
+ };
327
+ }
350
328
  }
351
- const toNumber = (item, valueDefault = 0) => { var _a; return ((0, utils_1.is)('number', item) ? item : +((_a = String(item).match(/\d+.?\d+/)) === null || _a === void 0 ? void 0 : _a[0])) || valueDefault; };
329
+ const toNumber = (item, valueDefault = 0) => {
330
+ var _String$match;
331
+ return ((0, _utils.is)('number', item) ? item : +((_String$match = String(item).match(/\d+.?\d+/)) === null || _String$match === void 0 ? void 0 : _String$match[0])) || valueDefault;
332
+ };
352
333
  exports.toNumber = toNumber;
353
- exports.formats = {
354
- entire: 'DD MMM, YYYY [at] h:mm a',
355
- date: 'DD MMM, YYYY',
356
- time: 'h:mm a'
334
+ const formats = exports.formats = {
335
+ entire: 'DD MMM, YYYY [at] h:mm a',
336
+ date: 'DD MMM, YYYY',
337
+ time: 'h:mm a'
357
338
  };
358
- exports.iconFontSize = 20;
359
- exports.currencies = [
360
- {
361
- symbol: '$',
362
- name: 'US Dollar',
363
- symbol_native: '$',
364
- 'decimal_digits': 2,
365
- rounding: 0,
366
- code: 'USD',
367
- name_plural: 'US dollars'
368
- },
369
- {
370
- symbol: 'CA$',
371
- name: 'Canadian Dollar',
372
- symbol_native: '$',
373
- 'decimal_digits': 2,
374
- rounding: 0,
375
- code: 'CAD',
376
- name_plural: 'Canadian dollars'
377
- },
378
- {
379
- symbol: '€',
380
- name: 'Euro',
381
- symbol_native: '',
382
- 'decimal_digits': 2,
383
- rounding: 0,
384
- code: 'EUR',
385
- name_plural: 'euros'
386
- },
387
- {
388
- symbol: 'AED',
389
- name: 'United Arab Emirates Dirham',
390
- symbol_native: 'د.إ.‏',
391
- 'decimal_digits': 2,
392
- rounding: 0,
393
- code: 'AED',
394
- name_plural: 'UAE dirhams'
395
- },
396
- {
397
- symbol: 'Af',
398
- name: 'Afghan Afghani',
399
- symbol_native: '؋',
400
- 'decimal_digits': 0,
401
- rounding: 0,
402
- code: 'AFN',
403
- name_plural: 'Afghan Afghanis'
404
- },
405
- {
406
- symbol: 'ALL',
407
- name: 'Albanian Lek',
408
- symbol_native: 'Lek',
409
- 'decimal_digits': 0,
410
- rounding: 0,
411
- code: 'ALL',
412
- name_plural: 'Albanian lekë'
413
- },
414
- {
415
- symbol: 'AMD',
416
- name: 'Armenian Dram',
417
- symbol_native: 'դր.',
418
- 'decimal_digits': 0,
419
- rounding: 0,
420
- code: 'AMD',
421
- name_plural: 'Armenian drams'
422
- },
423
- {
424
- symbol: 'AR$',
425
- name: 'Argentine Peso',
426
- symbol_native: '$',
427
- 'decimal_digits': 2,
428
- rounding: 0,
429
- code: 'ARS',
430
- name_plural: 'Argentine pesos'
431
- },
432
- {
433
- symbol: 'AU$',
434
- name: 'Australian Dollar',
435
- symbol_native: '$',
436
- 'decimal_digits': 2,
437
- rounding: 0,
438
- code: 'AUD',
439
- name_plural: 'Australian dollars'
440
- },
441
- {
442
- symbol: 'man.',
443
- name: 'Azerbaijani Manat',
444
- symbol_native: 'ман.',
445
- 'decimal_digits': 2,
446
- rounding: 0,
447
- code: 'AZN',
448
- name_plural: 'Azerbaijani manats'
449
- },
450
- {
451
- symbol: 'KM',
452
- name: 'Bosnia-Herzegovina Convertible Mark',
453
- symbol_native: 'KM',
454
- 'decimal_digits': 2,
455
- rounding: 0,
456
- code: 'BAM',
457
- name_plural: 'Bosnia-Herzegovina convertible marks'
458
- },
459
- {
460
- symbol: 'Tk',
461
- name: 'Bangladeshi Taka',
462
- symbol_native: '',
463
- 'decimal_digits': 2,
464
- rounding: 0,
465
- code: 'BDT',
466
- name_plural: 'Bangladeshi takas'
467
- },
468
- {
469
- symbol: 'BGN',
470
- name: 'Bulgarian Lev',
471
- symbol_native: 'лв.',
472
- 'decimal_digits': 2,
473
- rounding: 0,
474
- code: 'BGN',
475
- name_plural: 'Bulgarian leva'
476
- },
477
- {
478
- symbol: 'BD',
479
- name: 'Bahraini Dinar',
480
- symbol_native: 'د.ب.‏',
481
- 'decimal_digits': 3,
482
- rounding: 0,
483
- code: 'BHD',
484
- name_plural: 'Bahraini dinars'
485
- },
486
- {
487
- symbol: 'FBu',
488
- name: 'Burundian Franc',
489
- symbol_native: 'FBu',
490
- 'decimal_digits': 0,
491
- rounding: 0,
492
- code: 'BIF',
493
- name_plural: 'Burundian francs'
494
- },
495
- {
496
- symbol: 'BN$',
497
- name: 'Brunei Dollar',
498
- symbol_native: '$',
499
- 'decimal_digits': 2,
500
- rounding: 0,
501
- code: 'BND',
502
- name_plural: 'Brunei dollars'
503
- },
504
- {
505
- symbol: 'Bs',
506
- name: 'Bolivian Boliviano',
507
- symbol_native: 'Bs',
508
- 'decimal_digits': 2,
509
- rounding: 0,
510
- code: 'BOB',
511
- name_plural: 'Bolivian bolivianos'
512
- },
513
- {
514
- symbol: 'R$',
515
- name: 'Brazilian Real',
516
- symbol_native: 'R$',
517
- 'decimal_digits': 2,
518
- rounding: 0,
519
- code: 'BRL',
520
- name_plural: 'Brazilian reals'
521
- },
522
- {
523
- symbol: 'BWP',
524
- name: 'Botswanan Pula',
525
- symbol_native: 'P',
526
- 'decimal_digits': 2,
527
- rounding: 0,
528
- code: 'BWP',
529
- name_plural: 'Botswanan pulas'
530
- },
531
- {
532
- symbol: 'BYR',
533
- name: 'Belarusian Ruble',
534
- symbol_native: 'BYR',
535
- 'decimal_digits': 0,
536
- rounding: 0,
537
- code: 'BYR',
538
- name_plural: 'Belarusian rubles'
539
- },
540
- {
541
- symbol: 'BZ$',
542
- name: 'Belize Dollar',
543
- symbol_native: '$',
544
- 'decimal_digits': 2,
545
- rounding: 0,
546
- code: 'BZD',
547
- name_plural: 'Belize dollars'
548
- },
549
- {
550
- symbol: 'CDF',
551
- name: 'Congolese Franc',
552
- symbol_native: 'FrCD',
553
- 'decimal_digits': 2,
554
- rounding: 0,
555
- code: 'CDF',
556
- name_plural: 'Congolese francs'
557
- },
558
- {
559
- symbol: 'CHF',
560
- name: 'Swiss Franc',
561
- symbol_native: 'CHF',
562
- 'decimal_digits': 2,
563
- rounding: 0.05,
564
- code: 'CHF',
565
- name_plural: 'Swiss francs'
566
- },
567
- {
568
- symbol: 'CL$',
569
- name: 'Chilean Peso',
570
- symbol_native: '$',
571
- 'decimal_digits': 0,
572
- rounding: 0,
573
- code: 'CLP',
574
- name_plural: 'Chilean pesos'
575
- },
576
- {
577
- symbol: 'CN¥',
578
- name: 'Chinese Yuan',
579
- symbol_native: 'CN¥',
580
- 'decimal_digits': 2,
581
- rounding: 0,
582
- code: 'CNY',
583
- name_plural: 'Chinese yuan'
584
- },
585
- {
586
- symbol: 'CO$',
587
- name: 'Colombian Peso',
588
- symbol_native: '$',
589
- 'decimal_digits': 0,
590
- rounding: 0,
591
- code: 'COP',
592
- name_plural: 'Colombian pesos'
593
- },
594
- {
595
- symbol: '₡',
596
- name: 'Costa Rican Colón',
597
- symbol_native: '',
598
- 'decimal_digits': 0,
599
- rounding: 0,
600
- code: 'CRC',
601
- name_plural: 'Costa Rican colóns'
602
- },
603
- {
604
- symbol: 'CV$',
605
- name: 'Cape Verdean Escudo',
606
- symbol_native: 'CV$',
607
- 'decimal_digits': 2,
608
- rounding: 0,
609
- code: 'CVE',
610
- name_plural: 'Cape Verdean escudos'
611
- },
612
- {
613
- symbol: '',
614
- name: 'Czech Republic Koruna',
615
- symbol_native: 'Kč',
616
- 'decimal_digits': 2,
617
- rounding: 0,
618
- code: 'CZK',
619
- name_plural: 'Czech Republic korunas'
620
- },
621
- {
622
- symbol: 'Fdj',
623
- name: 'Djiboutian Franc',
624
- symbol_native: 'Fdj',
625
- 'decimal_digits': 0,
626
- rounding: 0,
627
- code: 'DJF',
628
- name_plural: 'Djiboutian francs'
629
- },
630
- {
631
- symbol: 'Dkr',
632
- name: 'Danish Krone',
633
- symbol_native: 'kr',
634
- 'decimal_digits': 2,
635
- rounding: 0,
636
- code: 'DKK',
637
- name_plural: 'Danish kroner'
638
- },
639
- {
640
- symbol: 'RD$',
641
- name: 'Dominican Peso',
642
- symbol_native: 'RD$',
643
- 'decimal_digits': 2,
644
- rounding: 0,
645
- code: 'DOP',
646
- name_plural: 'Dominican pesos'
647
- },
648
- {
649
- symbol: 'DA',
650
- name: 'Algerian Dinar',
651
- symbol_native: 'د.ج.‏',
652
- 'decimal_digits': 2,
653
- rounding: 0,
654
- code: 'DZD',
655
- name_plural: 'Algerian dinars'
656
- },
657
- {
658
- symbol: 'Ekr',
659
- name: 'Estonian Kroon',
660
- symbol_native: 'kr',
661
- 'decimal_digits': 2,
662
- rounding: 0,
663
- code: 'EEK',
664
- name_plural: 'Estonian kroons'
665
- },
666
- {
667
- symbol: 'EGP',
668
- name: 'Egyptian Pound',
669
- symbol_native: 'ج.م.‏',
670
- 'decimal_digits': 2,
671
- rounding: 0,
672
- code: 'EGP',
673
- name_plural: 'Egyptian pounds'
674
- },
675
- {
676
- symbol: 'Nfk',
677
- name: 'Eritrean Nakfa',
678
- symbol_native: 'Nfk',
679
- 'decimal_digits': 2,
680
- rounding: 0,
681
- code: 'ERN',
682
- name_plural: 'Eritrean nakfas'
683
- },
684
- {
685
- symbol: 'Br',
686
- name: 'Ethiopian Birr',
687
- symbol_native: 'Br',
688
- 'decimal_digits': 2,
689
- rounding: 0,
690
- code: 'ETB',
691
- name_plural: 'Ethiopian birrs'
692
- },
693
- {
694
- symbol: '£',
695
- name: 'British Pound Sterling',
696
- symbol_native: '£',
697
- 'decimal_digits': 2,
698
- rounding: 0,
699
- code: 'GBP',
700
- name_plural: 'British pounds sterling'
701
- },
702
- {
703
- symbol: 'GEL',
704
- name: 'Georgian Lari',
705
- symbol_native: 'GEL',
706
- 'decimal_digits': 2,
707
- rounding: 0,
708
- code: 'GEL',
709
- name_plural: 'Georgian laris'
710
- },
711
- {
712
- symbol: 'GH₵',
713
- name: 'Ghanaian Cedi',
714
- symbol_native: 'GH₵',
715
- 'decimal_digits': 2,
716
- rounding: 0,
717
- code: 'GHS',
718
- name_plural: 'Ghanaian cedis'
719
- },
720
- {
721
- symbol: 'FG',
722
- name: 'Guinean Franc',
723
- symbol_native: 'FG',
724
- 'decimal_digits': 0,
725
- rounding: 0,
726
- code: 'GNF',
727
- name_plural: 'Guinean francs'
728
- },
729
- {
730
- symbol: 'GTQ',
731
- name: 'Guatemalan Quetzal',
732
- symbol_native: 'Q',
733
- 'decimal_digits': 2,
734
- rounding: 0,
735
- code: 'GTQ',
736
- name_plural: 'Guatemalan quetzals'
737
- },
738
- {
739
- symbol: 'HK$',
740
- name: 'Hong Kong Dollar',
741
- symbol_native: '$',
742
- 'decimal_digits': 2,
743
- rounding: 0,
744
- code: 'HKD',
745
- name_plural: 'Hong Kong dollars'
746
- },
747
- {
748
- symbol: 'HNL',
749
- name: 'Honduran Lempira',
750
- symbol_native: 'L',
751
- 'decimal_digits': 2,
752
- rounding: 0,
753
- code: 'HNL',
754
- name_plural: 'Honduran lempiras'
755
- },
756
- {
757
- symbol: 'kn',
758
- name: 'Croatian Kuna',
759
- symbol_native: 'kn',
760
- 'decimal_digits': 2,
761
- rounding: 0,
762
- code: 'HRK',
763
- name_plural: 'Croatian kunas'
764
- },
765
- {
766
- symbol: 'Ft',
767
- name: 'Hungarian Forint',
768
- symbol_native: 'Ft',
769
- 'decimal_digits': 0,
770
- rounding: 0,
771
- code: 'HUF',
772
- name_plural: 'Hungarian forints'
773
- },
774
- {
775
- symbol: 'Rp',
776
- name: 'Indonesian Rupiah',
777
- symbol_native: 'Rp',
778
- 'decimal_digits': 0,
779
- rounding: 0,
780
- code: 'IDR',
781
- name_plural: 'Indonesian rupiahs'
782
- },
783
- {
784
- symbol: '',
785
- name: 'Israeli New Sheqel',
786
- symbol_native: '',
787
- 'decimal_digits': 2,
788
- rounding: 0,
789
- code: 'ILS',
790
- name_plural: 'Israeli new sheqels'
791
- },
792
- {
793
- symbol: 'Rs',
794
- name: 'Indian Rupee',
795
- symbol_native: 'টকা',
796
- 'decimal_digits': 2,
797
- rounding: 0,
798
- code: 'INR',
799
- name_plural: 'Indian rupees'
800
- },
801
- {
802
- symbol: 'IQD',
803
- name: 'Iraqi Dinar',
804
- symbol_native: 'د.ع.‏',
805
- 'decimal_digits': 0,
806
- rounding: 0,
807
- code: 'IQD',
808
- name_plural: 'Iraqi dinars'
809
- },
810
- {
811
- symbol: 'IRR',
812
- name: 'Iranian Rial',
813
- symbol_native: '',
814
- 'decimal_digits': 0,
815
- rounding: 0,
816
- code: 'IRR',
817
- name_plural: 'Iranian rials'
818
- },
819
- {
820
- symbol: 'Ikr',
821
- name: 'Icelandic Króna',
822
- symbol_native: 'kr',
823
- 'decimal_digits': 0,
824
- rounding: 0,
825
- code: 'ISK',
826
- name_plural: 'Icelandic krónur'
827
- },
828
- {
829
- symbol: 'J$',
830
- name: 'Jamaican Dollar',
831
- symbol_native: '$',
832
- 'decimal_digits': 2,
833
- rounding: 0,
834
- code: 'JMD',
835
- name_plural: 'Jamaican dollars'
836
- },
837
- {
838
- symbol: 'JD',
839
- name: 'Jordanian Dinar',
840
- symbol_native: 'د.أ.‏',
841
- 'decimal_digits': 3,
842
- rounding: 0,
843
- code: 'JOD',
844
- name_plural: 'Jordanian dinars'
845
- },
846
- {
847
- symbol: '¥',
848
- name: 'Japanese Yen',
849
- symbol_native: '',
850
- 'decimal_digits': 0,
851
- rounding: 0,
852
- code: 'JPY',
853
- name_plural: 'Japanese yen'
854
- },
855
- {
856
- symbol: 'Ksh',
857
- name: 'Kenyan Shilling',
858
- symbol_native: 'Ksh',
859
- 'decimal_digits': 2,
860
- rounding: 0,
861
- code: 'KES',
862
- name_plural: 'Kenyan shillings'
863
- },
864
- {
865
- symbol: 'KHR',
866
- name: 'Cambodian Riel',
867
- symbol_native: '៛',
868
- 'decimal_digits': 2,
869
- rounding: 0,
870
- code: 'KHR',
871
- name_plural: 'Cambodian riels'
872
- },
873
- {
874
- symbol: 'CF',
875
- name: 'Comorian Franc',
876
- symbol_native: 'FC',
877
- 'decimal_digits': 0,
878
- rounding: 0,
879
- code: 'KMF',
880
- name_plural: 'Comorian francs'
881
- },
882
- {
883
- symbol: '₩',
884
- name: 'South Korean Won',
885
- symbol_native: '',
886
- 'decimal_digits': 0,
887
- rounding: 0,
888
- code: 'KRW',
889
- name_plural: 'South Korean won'
890
- },
891
- {
892
- symbol: 'KD',
893
- name: 'Kuwaiti Dinar',
894
- symbol_native: 'د.ك.‏',
895
- 'decimal_digits': 3,
896
- rounding: 0,
897
- code: 'KWD',
898
- name_plural: 'Kuwaiti dinars'
899
- },
900
- {
901
- symbol: 'KZT',
902
- name: 'Kazakhstani Tenge',
903
- symbol_native: 'тңг.',
904
- 'decimal_digits': 2,
905
- rounding: 0,
906
- code: 'KZT',
907
- name_plural: 'Kazakhstani tenges'
908
- },
909
- {
910
- symbol: 'LB£',
911
- name: 'Lebanese Pound',
912
- symbol_native: 'ل.ل.‏',
913
- 'decimal_digits': 0,
914
- rounding: 0,
915
- code: 'LBP',
916
- name_plural: 'Lebanese pounds'
917
- },
918
- {
919
- symbol: 'SLRs',
920
- name: 'Sri Lankan Rupee',
921
- symbol_native: 'SL Re',
922
- 'decimal_digits': 2,
923
- rounding: 0,
924
- code: 'LKR',
925
- name_plural: 'Sri Lankan rupees'
926
- },
927
- {
928
- symbol: 'Lt',
929
- name: 'Lithuanian Litas',
930
- symbol_native: 'Lt',
931
- 'decimal_digits': 2,
932
- rounding: 0,
933
- code: 'LTL',
934
- name_plural: 'Lithuanian litai'
935
- },
936
- {
937
- symbol: 'Ls',
938
- name: 'Latvian Lats',
939
- symbol_native: 'Ls',
940
- 'decimal_digits': 2,
941
- rounding: 0,
942
- code: 'LVL',
943
- name_plural: 'Latvian lati'
944
- },
945
- {
946
- symbol: 'LD',
947
- name: 'Libyan Dinar',
948
- symbol_native: 'د.ل.‏',
949
- 'decimal_digits': 3,
950
- rounding: 0,
951
- code: 'LYD',
952
- name_plural: 'Libyan dinars'
953
- },
954
- {
955
- symbol: 'MAD',
956
- name: 'Moroccan Dirham',
957
- symbol_native: 'د.م.‏',
958
- 'decimal_digits': 2,
959
- rounding: 0,
960
- code: 'MAD',
961
- name_plural: 'Moroccan dirhams'
962
- },
963
- {
964
- symbol: 'MDL',
965
- name: 'Moldovan Leu',
966
- symbol_native: 'MDL',
967
- 'decimal_digits': 2,
968
- rounding: 0,
969
- code: 'MDL',
970
- name_plural: 'Moldovan lei'
971
- },
972
- {
973
- symbol: 'MGA',
974
- name: 'Malagasy Ariary',
975
- symbol_native: 'MGA',
976
- 'decimal_digits': 0,
977
- rounding: 0,
978
- code: 'MGA',
979
- name_plural: 'Malagasy Ariaries'
980
- },
981
- {
982
- symbol: 'MKD',
983
- name: 'Macedonian Denar',
984
- symbol_native: 'MKD',
985
- 'decimal_digits': 2,
986
- rounding: 0,
987
- code: 'MKD',
988
- name_plural: 'Macedonian denari'
989
- },
990
- {
991
- symbol: 'MMK',
992
- name: 'Myanma Kyat',
993
- symbol_native: 'K',
994
- 'decimal_digits': 0,
995
- rounding: 0,
996
- code: 'MMK',
997
- name_plural: 'Myanma kyats'
998
- },
999
- {
1000
- symbol: 'MOP$',
1001
- name: 'Macanese Pataca',
1002
- symbol_native: 'MOP$',
1003
- 'decimal_digits': 2,
1004
- rounding: 0,
1005
- code: 'MOP',
1006
- name_plural: 'Macanese patacas'
1007
- },
1008
- {
1009
- symbol: 'MURs',
1010
- name: 'Mauritian Rupee',
1011
- symbol_native: 'MURs',
1012
- 'decimal_digits': 0,
1013
- rounding: 0,
1014
- code: 'MUR',
1015
- name_plural: 'Mauritian rupees'
1016
- },
1017
- {
1018
- symbol: 'MX$',
1019
- name: 'Mexican Peso',
1020
- symbol_native: '$',
1021
- 'decimal_digits': 2,
1022
- rounding: 0,
1023
- code: 'MXN',
1024
- name_plural: 'Mexican pesos'
1025
- },
1026
- {
1027
- symbol: 'RM',
1028
- name: 'Malaysian Ringgit',
1029
- symbol_native: 'RM',
1030
- 'decimal_digits': 2,
1031
- rounding: 0,
1032
- code: 'MYR',
1033
- name_plural: 'Malaysian ringgits'
1034
- },
1035
- {
1036
- symbol: 'MTn',
1037
- name: 'Mozambican Metical',
1038
- symbol_native: 'MTn',
1039
- 'decimal_digits': 2,
1040
- rounding: 0,
1041
- code: 'MZN',
1042
- name_plural: 'Mozambican meticals'
1043
- },
1044
- {
1045
- symbol: 'N$',
1046
- name: 'Namibian Dollar',
1047
- symbol_native: 'N$',
1048
- 'decimal_digits': 2,
1049
- rounding: 0,
1050
- code: 'NAD',
1051
- name_plural: 'Namibian dollars'
1052
- },
1053
- {
1054
- symbol: '',
1055
- name: 'Nigerian Naira',
1056
- symbol_native: '',
1057
- 'decimal_digits': 2,
1058
- rounding: 0,
1059
- code: 'NGN',
1060
- name_plural: 'Nigerian nairas'
1061
- },
1062
- {
1063
- symbol: 'C$',
1064
- name: 'Nicaraguan Córdoba',
1065
- symbol_native: 'C$',
1066
- 'decimal_digits': 2,
1067
- rounding: 0,
1068
- code: 'NIO',
1069
- name_plural: 'Nicaraguan córdobas'
1070
- },
1071
- {
1072
- symbol: 'Nkr',
1073
- name: 'Norwegian Krone',
1074
- symbol_native: 'kr',
1075
- 'decimal_digits': 2,
1076
- rounding: 0,
1077
- code: 'NOK',
1078
- name_plural: 'Norwegian kroner'
1079
- },
1080
- {
1081
- symbol: 'NPRs',
1082
- name: 'Nepalese Rupee',
1083
- symbol_native: 'नेरू',
1084
- 'decimal_digits': 2,
1085
- rounding: 0,
1086
- code: 'NPR',
1087
- name_plural: 'Nepalese rupees'
1088
- },
1089
- {
1090
- symbol: 'NZ$',
1091
- name: 'New Zealand Dollar',
1092
- symbol_native: '$',
1093
- 'decimal_digits': 2,
1094
- rounding: 0,
1095
- code: 'NZD',
1096
- name_plural: 'New Zealand dollars'
1097
- },
1098
- {
1099
- symbol: 'OMR',
1100
- name: 'Omani Rial',
1101
- symbol_native: 'ر.ع.‏',
1102
- 'decimal_digits': 3,
1103
- rounding: 0,
1104
- code: 'OMR',
1105
- name_plural: 'Omani rials'
1106
- },
1107
- {
1108
- symbol: 'B/.',
1109
- name: 'Panamanian Balboa',
1110
- symbol_native: 'B/.',
1111
- 'decimal_digits': 2,
1112
- rounding: 0,
1113
- code: 'PAB',
1114
- name_plural: 'Panamanian balboas'
1115
- },
1116
- {
1117
- symbol: 'S/.',
1118
- name: 'Peruvian Nuevo Sol',
1119
- symbol_native: 'S/.',
1120
- 'decimal_digits': 2,
1121
- rounding: 0,
1122
- code: 'PEN',
1123
- name_plural: 'Peruvian nuevos soles'
1124
- },
1125
- {
1126
- symbol: '',
1127
- name: 'Philippine Peso',
1128
- symbol_native: '',
1129
- 'decimal_digits': 2,
1130
- rounding: 0,
1131
- code: 'PHP',
1132
- name_plural: 'Philippine pesos'
1133
- },
1134
- {
1135
- symbol: 'PKRs',
1136
- name: 'Pakistani Rupee',
1137
- symbol_native: '',
1138
- 'decimal_digits': 0,
1139
- rounding: 0,
1140
- code: 'PKR',
1141
- name_plural: 'Pakistani rupees'
1142
- },
1143
- {
1144
- symbol: '',
1145
- name: 'Polish Zloty',
1146
- symbol_native: '',
1147
- 'decimal_digits': 2,
1148
- rounding: 0,
1149
- code: 'PLN',
1150
- name_plural: 'Polish zlotys'
1151
- },
1152
- {
1153
- symbol: '',
1154
- name: 'Paraguayan Guarani',
1155
- symbol_native: '₲',
1156
- 'decimal_digits': 0,
1157
- rounding: 0,
1158
- code: 'PYG',
1159
- name_plural: 'Paraguayan guaranis'
1160
- },
1161
- {
1162
- symbol: 'QR',
1163
- name: 'Qatari Rial',
1164
- symbol_native: 'ر.ق.‏',
1165
- 'decimal_digits': 2,
1166
- rounding: 0,
1167
- code: 'QAR',
1168
- name_plural: 'Qatari rials'
1169
- },
1170
- {
1171
- symbol: 'RON',
1172
- name: 'Romanian Leu',
1173
- symbol_native: 'RON',
1174
- 'decimal_digits': 2,
1175
- rounding: 0,
1176
- code: 'RON',
1177
- name_plural: 'Romanian lei'
1178
- },
1179
- {
1180
- symbol: 'din.',
1181
- name: 'Serbian Dinar',
1182
- symbol_native: 'дин.',
1183
- 'decimal_digits': 0,
1184
- rounding: 0,
1185
- code: 'RSD',
1186
- name_plural: 'Serbian dinars'
1187
- },
1188
- {
1189
- symbol: 'RUB',
1190
- name: 'Russian Ruble',
1191
- symbol_native: 'руб.',
1192
- 'decimal_digits': 2,
1193
- rounding: 0,
1194
- code: 'RUB',
1195
- name_plural: 'Russian rubles'
1196
- },
1197
- {
1198
- symbol: 'RWF',
1199
- name: 'Rwandan Franc',
1200
- symbol_native: 'FR',
1201
- 'decimal_digits': 0,
1202
- rounding: 0,
1203
- code: 'RWF',
1204
- name_plural: 'Rwandan francs'
1205
- },
1206
- {
1207
- symbol: 'SR',
1208
- name: 'Saudi Riyal',
1209
- symbol_native: 'ر.س.‏',
1210
- 'decimal_digits': 2,
1211
- rounding: 0,
1212
- code: 'SAR',
1213
- name_plural: 'Saudi riyals'
1214
- },
1215
- {
1216
- symbol: 'SDG',
1217
- name: 'Sudanese Pound',
1218
- symbol_native: 'SDG',
1219
- 'decimal_digits': 2,
1220
- rounding: 0,
1221
- code: 'SDG',
1222
- name_plural: 'Sudanese pounds'
1223
- },
1224
- {
1225
- symbol: 'Skr',
1226
- name: 'Swedish Krona',
1227
- symbol_native: 'kr',
1228
- 'decimal_digits': 2,
1229
- rounding: 0,
1230
- code: 'SEK',
1231
- name_plural: 'Swedish kronor'
1232
- },
1233
- {
1234
- symbol: 'S$',
1235
- name: 'Singapore Dollar',
1236
- symbol_native: '$',
1237
- 'decimal_digits': 2,
1238
- rounding: 0,
1239
- code: 'SGD',
1240
- name_plural: 'Singapore dollars'
1241
- },
1242
- {
1243
- symbol: 'Ssh',
1244
- name: 'Somali Shilling',
1245
- symbol_native: 'Ssh',
1246
- 'decimal_digits': 0,
1247
- rounding: 0,
1248
- code: 'SOS',
1249
- name_plural: 'Somali shillings'
1250
- },
1251
- {
1252
- symbol: 'SY£',
1253
- name: 'Syrian Pound',
1254
- symbol_native: 'ل.س.‏',
1255
- 'decimal_digits': 0,
1256
- rounding: 0,
1257
- code: 'SYP',
1258
- name_plural: 'Syrian pounds'
1259
- },
1260
- {
1261
- symbol: '฿',
1262
- name: 'Thai Baht',
1263
- symbol_native: '฿',
1264
- 'decimal_digits': 2,
1265
- rounding: 0,
1266
- code: 'THB',
1267
- name_plural: 'Thai baht'
1268
- },
1269
- {
1270
- symbol: 'DT',
1271
- name: 'Tunisian Dinar',
1272
- symbol_native: 'د.ت.‏',
1273
- 'decimal_digits': 3,
1274
- rounding: 0,
1275
- code: 'TND',
1276
- name_plural: 'Tunisian dinars'
1277
- },
1278
- {
1279
- symbol: 'T$',
1280
- name: 'Tongan Paʻanga',
1281
- symbol_native: 'T$',
1282
- 'decimal_digits': 2,
1283
- rounding: 0,
1284
- code: 'TOP',
1285
- name_plural: 'Tongan paʻanga'
1286
- },
1287
- {
1288
- symbol: 'TL',
1289
- name: 'Turkish Lira',
1290
- symbol_native: 'TL',
1291
- 'decimal_digits': 2,
1292
- rounding: 0,
1293
- code: 'TRY',
1294
- name_plural: 'Turkish Lira'
1295
- },
1296
- {
1297
- symbol: 'TT$',
1298
- name: 'Trinidad and Tobago Dollar',
1299
- symbol_native: '$',
1300
- 'decimal_digits': 2,
1301
- rounding: 0,
1302
- code: 'TTD',
1303
- name_plural: 'Trinidad and Tobago dollars'
1304
- },
1305
- {
1306
- symbol: 'NT$',
1307
- name: 'New Taiwan Dollar',
1308
- symbol_native: 'NT$',
1309
- 'decimal_digits': 2,
1310
- rounding: 0,
1311
- code: 'TWD',
1312
- name_plural: 'New Taiwan dollars'
1313
- },
1314
- {
1315
- symbol: 'TSh',
1316
- name: 'Tanzanian Shilling',
1317
- symbol_native: 'TSh',
1318
- 'decimal_digits': 0,
1319
- rounding: 0,
1320
- code: 'TZS',
1321
- name_plural: 'Tanzanian shillings'
1322
- },
1323
- {
1324
- symbol: '₴',
1325
- name: 'Ukrainian Hryvnia',
1326
- symbol_native: '₴',
1327
- 'decimal_digits': 2,
1328
- rounding: 0,
1329
- code: 'UAH',
1330
- name_plural: 'Ukrainian hryvnias'
1331
- },
1332
- {
1333
- symbol: 'USh',
1334
- name: 'Ugandan Shilling',
1335
- symbol_native: 'USh',
1336
- 'decimal_digits': 0,
1337
- rounding: 0,
1338
- code: 'UGX',
1339
- name_plural: 'Ugandan shillings'
1340
- },
1341
- {
1342
- symbol: '$U',
1343
- name: 'Uruguayan Peso',
1344
- symbol_native: '$',
1345
- 'decimal_digits': 2,
1346
- rounding: 0,
1347
- code: 'UYU',
1348
- name_plural: 'Uruguayan pesos'
1349
- },
1350
- {
1351
- symbol: 'UZS',
1352
- name: 'Uzbekistan Som',
1353
- symbol_native: 'UZS',
1354
- 'decimal_digits': 0,
1355
- rounding: 0,
1356
- code: 'UZS',
1357
- name_plural: 'Uzbekistan som'
1358
- },
1359
- {
1360
- symbol: 'Bs.F.',
1361
- name: 'Venezuelan Bolívar',
1362
- symbol_native: 'Bs.F.',
1363
- 'decimal_digits': 2,
1364
- rounding: 0,
1365
- code: 'VEF',
1366
- name_plural: 'Venezuelan bolívars'
1367
- },
1368
- {
1369
- symbol: '₫',
1370
- name: 'Vietnamese Dong',
1371
- symbol_native: '₫',
1372
- 'decimal_digits': 0,
1373
- rounding: 0,
1374
- code: 'VND',
1375
- name_plural: 'Vietnamese dong'
1376
- },
1377
- {
1378
- symbol: 'FCFA',
1379
- name: 'CFA Franc BEAC',
1380
- symbol_native: 'FCFA',
1381
- 'decimal_digits': 0,
1382
- rounding: 0,
1383
- code: 'XAF',
1384
- name_plural: 'CFA francs BEAC'
1385
- },
1386
- {
1387
- symbol: 'CFA',
1388
- name: 'CFA Franc BCEAO',
1389
- symbol_native: 'CFA',
1390
- 'decimal_digits': 0,
1391
- rounding: 0,
1392
- code: 'XOF',
1393
- name_plural: 'CFA francs BCEAO'
1394
- },
1395
- {
1396
- symbol: 'YR',
1397
- name: 'Yemeni Rial',
1398
- symbol_native: 'ر.ي.‏',
1399
- 'decimal_digits': 0,
1400
- rounding: 0,
1401
- code: 'YER',
1402
- name_plural: 'Yemeni rials'
1403
- },
1404
- {
1405
- symbol: 'R',
1406
- name: 'South African Rand',
1407
- symbol_native: 'R',
1408
- 'decimal_digits': 2,
1409
- rounding: 0,
1410
- code: 'ZAR',
1411
- name_plural: 'South African rand'
1412
- },
1413
- {
1414
- symbol: 'ZK',
1415
- name: 'Zambian Kwacha',
1416
- symbol_native: 'ZK',
1417
- 'decimal_digits': 0,
1418
- rounding: 0,
1419
- code: 'ZMK',
1420
- name_plural: 'Zambian kwachas'
1421
- }
1422
- ];
1423
- const decodeHTMLEntities = (html) => {
1424
- const document = new DOMParser().parseFromString(html, 'text/html');
1425
- return document.documentElement.textContent || '';
339
+ const iconFontSize = exports.iconFontSize = 20;
340
+ const currencies = exports.currencies = [{
341
+ symbol: '$',
342
+ name: 'US Dollar',
343
+ symbol_native: '$',
344
+ 'decimal_digits': 2,
345
+ rounding: 0,
346
+ code: 'USD',
347
+ name_plural: 'US dollars'
348
+ }, {
349
+ symbol: 'CA$',
350
+ name: 'Canadian Dollar',
351
+ symbol_native: '$',
352
+ 'decimal_digits': 2,
353
+ rounding: 0,
354
+ code: 'CAD',
355
+ name_plural: 'Canadian dollars'
356
+ }, {
357
+ symbol: '',
358
+ name: 'Euro',
359
+ symbol_native: '€',
360
+ 'decimal_digits': 2,
361
+ rounding: 0,
362
+ code: 'EUR',
363
+ name_plural: 'euros'
364
+ }, {
365
+ symbol: 'AED',
366
+ name: 'United Arab Emirates Dirham',
367
+ symbol_native: 'د.إ.‏',
368
+ 'decimal_digits': 2,
369
+ rounding: 0,
370
+ code: 'AED',
371
+ name_plural: 'UAE dirhams'
372
+ }, {
373
+ symbol: 'Af',
374
+ name: 'Afghan Afghani',
375
+ symbol_native: '؋',
376
+ 'decimal_digits': 0,
377
+ rounding: 0,
378
+ code: 'AFN',
379
+ name_plural: 'Afghan Afghanis'
380
+ }, {
381
+ symbol: 'ALL',
382
+ name: 'Albanian Lek',
383
+ symbol_native: 'Lek',
384
+ 'decimal_digits': 0,
385
+ rounding: 0,
386
+ code: 'ALL',
387
+ name_plural: 'Albanian lekë'
388
+ }, {
389
+ symbol: 'AMD',
390
+ name: 'Armenian Dram',
391
+ symbol_native: 'դր.',
392
+ 'decimal_digits': 0,
393
+ rounding: 0,
394
+ code: 'AMD',
395
+ name_plural: 'Armenian drams'
396
+ }, {
397
+ symbol: 'AR$',
398
+ name: 'Argentine Peso',
399
+ symbol_native: '$',
400
+ 'decimal_digits': 2,
401
+ rounding: 0,
402
+ code: 'ARS',
403
+ name_plural: 'Argentine pesos'
404
+ }, {
405
+ symbol: 'AU$',
406
+ name: 'Australian Dollar',
407
+ symbol_native: '$',
408
+ 'decimal_digits': 2,
409
+ rounding: 0,
410
+ code: 'AUD',
411
+ name_plural: 'Australian dollars'
412
+ }, {
413
+ symbol: 'man.',
414
+ name: 'Azerbaijani Manat',
415
+ symbol_native: 'ман.',
416
+ 'decimal_digits': 2,
417
+ rounding: 0,
418
+ code: 'AZN',
419
+ name_plural: 'Azerbaijani manats'
420
+ }, {
421
+ symbol: 'KM',
422
+ name: 'Bosnia-Herzegovina Convertible Mark',
423
+ symbol_native: 'KM',
424
+ 'decimal_digits': 2,
425
+ rounding: 0,
426
+ code: 'BAM',
427
+ name_plural: 'Bosnia-Herzegovina convertible marks'
428
+ }, {
429
+ symbol: 'Tk',
430
+ name: 'Bangladeshi Taka',
431
+ symbol_native: '৳',
432
+ 'decimal_digits': 2,
433
+ rounding: 0,
434
+ code: 'BDT',
435
+ name_plural: 'Bangladeshi takas'
436
+ }, {
437
+ symbol: 'BGN',
438
+ name: 'Bulgarian Lev',
439
+ symbol_native: 'лв.',
440
+ 'decimal_digits': 2,
441
+ rounding: 0,
442
+ code: 'BGN',
443
+ name_plural: 'Bulgarian leva'
444
+ }, {
445
+ symbol: 'BD',
446
+ name: 'Bahraini Dinar',
447
+ symbol_native: 'د.ب.‏',
448
+ 'decimal_digits': 3,
449
+ rounding: 0,
450
+ code: 'BHD',
451
+ name_plural: 'Bahraini dinars'
452
+ }, {
453
+ symbol: 'FBu',
454
+ name: 'Burundian Franc',
455
+ symbol_native: 'FBu',
456
+ 'decimal_digits': 0,
457
+ rounding: 0,
458
+ code: 'BIF',
459
+ name_plural: 'Burundian francs'
460
+ }, {
461
+ symbol: 'BN$',
462
+ name: 'Brunei Dollar',
463
+ symbol_native: '$',
464
+ 'decimal_digits': 2,
465
+ rounding: 0,
466
+ code: 'BND',
467
+ name_plural: 'Brunei dollars'
468
+ }, {
469
+ symbol: 'Bs',
470
+ name: 'Bolivian Boliviano',
471
+ symbol_native: 'Bs',
472
+ 'decimal_digits': 2,
473
+ rounding: 0,
474
+ code: 'BOB',
475
+ name_plural: 'Bolivian bolivianos'
476
+ }, {
477
+ symbol: 'R$',
478
+ name: 'Brazilian Real',
479
+ symbol_native: 'R$',
480
+ 'decimal_digits': 2,
481
+ rounding: 0,
482
+ code: 'BRL',
483
+ name_plural: 'Brazilian reals'
484
+ }, {
485
+ symbol: 'BWP',
486
+ name: 'Botswanan Pula',
487
+ symbol_native: 'P',
488
+ 'decimal_digits': 2,
489
+ rounding: 0,
490
+ code: 'BWP',
491
+ name_plural: 'Botswanan pulas'
492
+ }, {
493
+ symbol: 'BYR',
494
+ name: 'Belarusian Ruble',
495
+ symbol_native: 'BYR',
496
+ 'decimal_digits': 0,
497
+ rounding: 0,
498
+ code: 'BYR',
499
+ name_plural: 'Belarusian rubles'
500
+ }, {
501
+ symbol: 'BZ$',
502
+ name: 'Belize Dollar',
503
+ symbol_native: '$',
504
+ 'decimal_digits': 2,
505
+ rounding: 0,
506
+ code: 'BZD',
507
+ name_plural: 'Belize dollars'
508
+ }, {
509
+ symbol: 'CDF',
510
+ name: 'Congolese Franc',
511
+ symbol_native: 'FrCD',
512
+ 'decimal_digits': 2,
513
+ rounding: 0,
514
+ code: 'CDF',
515
+ name_plural: 'Congolese francs'
516
+ }, {
517
+ symbol: 'CHF',
518
+ name: 'Swiss Franc',
519
+ symbol_native: 'CHF',
520
+ 'decimal_digits': 2,
521
+ rounding: 0.05,
522
+ code: 'CHF',
523
+ name_plural: 'Swiss francs'
524
+ }, {
525
+ symbol: 'CL$',
526
+ name: 'Chilean Peso',
527
+ symbol_native: '$',
528
+ 'decimal_digits': 0,
529
+ rounding: 0,
530
+ code: 'CLP',
531
+ name_plural: 'Chilean pesos'
532
+ }, {
533
+ symbol: 'CN¥',
534
+ name: 'Chinese Yuan',
535
+ symbol_native: 'CN¥',
536
+ 'decimal_digits': 2,
537
+ rounding: 0,
538
+ code: 'CNY',
539
+ name_plural: 'Chinese yuan'
540
+ }, {
541
+ symbol: 'CO$',
542
+ name: 'Colombian Peso',
543
+ symbol_native: '$',
544
+ 'decimal_digits': 0,
545
+ rounding: 0,
546
+ code: 'COP',
547
+ name_plural: 'Colombian pesos'
548
+ }, {
549
+ symbol: '',
550
+ name: 'Costa Rican Colón',
551
+ symbol_native: '',
552
+ 'decimal_digits': 0,
553
+ rounding: 0,
554
+ code: 'CRC',
555
+ name_plural: 'Costa Rican colóns'
556
+ }, {
557
+ symbol: 'CV$',
558
+ name: 'Cape Verdean Escudo',
559
+ symbol_native: 'CV$',
560
+ 'decimal_digits': 2,
561
+ rounding: 0,
562
+ code: 'CVE',
563
+ name_plural: 'Cape Verdean escudos'
564
+ }, {
565
+ symbol: 'Kč',
566
+ name: 'Czech Republic Koruna',
567
+ symbol_native: '',
568
+ 'decimal_digits': 2,
569
+ rounding: 0,
570
+ code: 'CZK',
571
+ name_plural: 'Czech Republic korunas'
572
+ }, {
573
+ symbol: 'Fdj',
574
+ name: 'Djiboutian Franc',
575
+ symbol_native: 'Fdj',
576
+ 'decimal_digits': 0,
577
+ rounding: 0,
578
+ code: 'DJF',
579
+ name_plural: 'Djiboutian francs'
580
+ }, {
581
+ symbol: 'Dkr',
582
+ name: 'Danish Krone',
583
+ symbol_native: 'kr',
584
+ 'decimal_digits': 2,
585
+ rounding: 0,
586
+ code: 'DKK',
587
+ name_plural: 'Danish kroner'
588
+ }, {
589
+ symbol: 'RD$',
590
+ name: 'Dominican Peso',
591
+ symbol_native: 'RD$',
592
+ 'decimal_digits': 2,
593
+ rounding: 0,
594
+ code: 'DOP',
595
+ name_plural: 'Dominican pesos'
596
+ }, {
597
+ symbol: 'DA',
598
+ name: 'Algerian Dinar',
599
+ symbol_native: 'د.ج.‏',
600
+ 'decimal_digits': 2,
601
+ rounding: 0,
602
+ code: 'DZD',
603
+ name_plural: 'Algerian dinars'
604
+ }, {
605
+ symbol: 'Ekr',
606
+ name: 'Estonian Kroon',
607
+ symbol_native: 'kr',
608
+ 'decimal_digits': 2,
609
+ rounding: 0,
610
+ code: 'EEK',
611
+ name_plural: 'Estonian kroons'
612
+ }, {
613
+ symbol: 'EGP',
614
+ name: 'Egyptian Pound',
615
+ symbol_native: 'ج.م.‏',
616
+ 'decimal_digits': 2,
617
+ rounding: 0,
618
+ code: 'EGP',
619
+ name_plural: 'Egyptian pounds'
620
+ }, {
621
+ symbol: 'Nfk',
622
+ name: 'Eritrean Nakfa',
623
+ symbol_native: 'Nfk',
624
+ 'decimal_digits': 2,
625
+ rounding: 0,
626
+ code: 'ERN',
627
+ name_plural: 'Eritrean nakfas'
628
+ }, {
629
+ symbol: 'Br',
630
+ name: 'Ethiopian Birr',
631
+ symbol_native: 'Br',
632
+ 'decimal_digits': 2,
633
+ rounding: 0,
634
+ code: 'ETB',
635
+ name_plural: 'Ethiopian birrs'
636
+ }, {
637
+ symbol: '£',
638
+ name: 'British Pound Sterling',
639
+ symbol_native: '£',
640
+ 'decimal_digits': 2,
641
+ rounding: 0,
642
+ code: 'GBP',
643
+ name_plural: 'British pounds sterling'
644
+ }, {
645
+ symbol: 'GEL',
646
+ name: 'Georgian Lari',
647
+ symbol_native: 'GEL',
648
+ 'decimal_digits': 2,
649
+ rounding: 0,
650
+ code: 'GEL',
651
+ name_plural: 'Georgian laris'
652
+ }, {
653
+ symbol: 'GH₵',
654
+ name: 'Ghanaian Cedi',
655
+ symbol_native: 'GH₵',
656
+ 'decimal_digits': 2,
657
+ rounding: 0,
658
+ code: 'GHS',
659
+ name_plural: 'Ghanaian cedis'
660
+ }, {
661
+ symbol: 'FG',
662
+ name: 'Guinean Franc',
663
+ symbol_native: 'FG',
664
+ 'decimal_digits': 0,
665
+ rounding: 0,
666
+ code: 'GNF',
667
+ name_plural: 'Guinean francs'
668
+ }, {
669
+ symbol: 'GTQ',
670
+ name: 'Guatemalan Quetzal',
671
+ symbol_native: 'Q',
672
+ 'decimal_digits': 2,
673
+ rounding: 0,
674
+ code: 'GTQ',
675
+ name_plural: 'Guatemalan quetzals'
676
+ }, {
677
+ symbol: 'HK$',
678
+ name: 'Hong Kong Dollar',
679
+ symbol_native: '$',
680
+ 'decimal_digits': 2,
681
+ rounding: 0,
682
+ code: 'HKD',
683
+ name_plural: 'Hong Kong dollars'
684
+ }, {
685
+ symbol: 'HNL',
686
+ name: 'Honduran Lempira',
687
+ symbol_native: 'L',
688
+ 'decimal_digits': 2,
689
+ rounding: 0,
690
+ code: 'HNL',
691
+ name_plural: 'Honduran lempiras'
692
+ }, {
693
+ symbol: 'kn',
694
+ name: 'Croatian Kuna',
695
+ symbol_native: 'kn',
696
+ 'decimal_digits': 2,
697
+ rounding: 0,
698
+ code: 'HRK',
699
+ name_plural: 'Croatian kunas'
700
+ }, {
701
+ symbol: 'Ft',
702
+ name: 'Hungarian Forint',
703
+ symbol_native: 'Ft',
704
+ 'decimal_digits': 0,
705
+ rounding: 0,
706
+ code: 'HUF',
707
+ name_plural: 'Hungarian forints'
708
+ }, {
709
+ symbol: 'Rp',
710
+ name: 'Indonesian Rupiah',
711
+ symbol_native: 'Rp',
712
+ 'decimal_digits': 0,
713
+ rounding: 0,
714
+ code: 'IDR',
715
+ name_plural: 'Indonesian rupiahs'
716
+ }, {
717
+ symbol: '',
718
+ name: 'Israeli New Sheqel',
719
+ symbol_native: '₪',
720
+ 'decimal_digits': 2,
721
+ rounding: 0,
722
+ code: 'ILS',
723
+ name_plural: 'Israeli new sheqels'
724
+ }, {
725
+ symbol: 'Rs',
726
+ name: 'Indian Rupee',
727
+ symbol_native: 'টকা',
728
+ 'decimal_digits': 2,
729
+ rounding: 0,
730
+ code: 'INR',
731
+ name_plural: 'Indian rupees'
732
+ }, {
733
+ symbol: 'IQD',
734
+ name: 'Iraqi Dinar',
735
+ symbol_native: 'د.ع.‏',
736
+ 'decimal_digits': 0,
737
+ rounding: 0,
738
+ code: 'IQD',
739
+ name_plural: 'Iraqi dinars'
740
+ }, {
741
+ symbol: 'IRR',
742
+ name: 'Iranian Rial',
743
+ symbol_native: '',
744
+ 'decimal_digits': 0,
745
+ rounding: 0,
746
+ code: 'IRR',
747
+ name_plural: 'Iranian rials'
748
+ }, {
749
+ symbol: 'Ikr',
750
+ name: 'Icelandic Króna',
751
+ symbol_native: 'kr',
752
+ 'decimal_digits': 0,
753
+ rounding: 0,
754
+ code: 'ISK',
755
+ name_plural: 'Icelandic krónur'
756
+ }, {
757
+ symbol: 'J$',
758
+ name: 'Jamaican Dollar',
759
+ symbol_native: '$',
760
+ 'decimal_digits': 2,
761
+ rounding: 0,
762
+ code: 'JMD',
763
+ name_plural: 'Jamaican dollars'
764
+ }, {
765
+ symbol: 'JD',
766
+ name: 'Jordanian Dinar',
767
+ symbol_native: 'د.أ.‏',
768
+ 'decimal_digits': 3,
769
+ rounding: 0,
770
+ code: 'JOD',
771
+ name_plural: 'Jordanian dinars'
772
+ }, {
773
+ symbol: '¥',
774
+ name: 'Japanese Yen',
775
+ symbol_native: '',
776
+ 'decimal_digits': 0,
777
+ rounding: 0,
778
+ code: 'JPY',
779
+ name_plural: 'Japanese yen'
780
+ }, {
781
+ symbol: 'Ksh',
782
+ name: 'Kenyan Shilling',
783
+ symbol_native: 'Ksh',
784
+ 'decimal_digits': 2,
785
+ rounding: 0,
786
+ code: 'KES',
787
+ name_plural: 'Kenyan shillings'
788
+ }, {
789
+ symbol: 'KHR',
790
+ name: 'Cambodian Riel',
791
+ symbol_native: '៛',
792
+ 'decimal_digits': 2,
793
+ rounding: 0,
794
+ code: 'KHR',
795
+ name_plural: 'Cambodian riels'
796
+ }, {
797
+ symbol: 'CF',
798
+ name: 'Comorian Franc',
799
+ symbol_native: 'FC',
800
+ 'decimal_digits': 0,
801
+ rounding: 0,
802
+ code: 'KMF',
803
+ name_plural: 'Comorian francs'
804
+ }, {
805
+ symbol: '₩',
806
+ name: 'South Korean Won',
807
+ symbol_native: '',
808
+ 'decimal_digits': 0,
809
+ rounding: 0,
810
+ code: 'KRW',
811
+ name_plural: 'South Korean won'
812
+ }, {
813
+ symbol: 'KD',
814
+ name: 'Kuwaiti Dinar',
815
+ symbol_native: 'د.ك.‏',
816
+ 'decimal_digits': 3,
817
+ rounding: 0,
818
+ code: 'KWD',
819
+ name_plural: 'Kuwaiti dinars'
820
+ }, {
821
+ symbol: 'KZT',
822
+ name: 'Kazakhstani Tenge',
823
+ symbol_native: 'тңг.',
824
+ 'decimal_digits': 2,
825
+ rounding: 0,
826
+ code: 'KZT',
827
+ name_plural: 'Kazakhstani tenges'
828
+ }, {
829
+ symbol: 'LB£',
830
+ name: 'Lebanese Pound',
831
+ symbol_native: 'ل.ل.‏',
832
+ 'decimal_digits': 0,
833
+ rounding: 0,
834
+ code: 'LBP',
835
+ name_plural: 'Lebanese pounds'
836
+ }, {
837
+ symbol: 'SLRs',
838
+ name: 'Sri Lankan Rupee',
839
+ symbol_native: 'SL Re',
840
+ 'decimal_digits': 2,
841
+ rounding: 0,
842
+ code: 'LKR',
843
+ name_plural: 'Sri Lankan rupees'
844
+ }, {
845
+ symbol: 'Lt',
846
+ name: 'Lithuanian Litas',
847
+ symbol_native: 'Lt',
848
+ 'decimal_digits': 2,
849
+ rounding: 0,
850
+ code: 'LTL',
851
+ name_plural: 'Lithuanian litai'
852
+ }, {
853
+ symbol: 'Ls',
854
+ name: 'Latvian Lats',
855
+ symbol_native: 'Ls',
856
+ 'decimal_digits': 2,
857
+ rounding: 0,
858
+ code: 'LVL',
859
+ name_plural: 'Latvian lati'
860
+ }, {
861
+ symbol: 'LD',
862
+ name: 'Libyan Dinar',
863
+ symbol_native: 'د.ل.‏',
864
+ 'decimal_digits': 3,
865
+ rounding: 0,
866
+ code: 'LYD',
867
+ name_plural: 'Libyan dinars'
868
+ }, {
869
+ symbol: 'MAD',
870
+ name: 'Moroccan Dirham',
871
+ symbol_native: 'د.م.‏',
872
+ 'decimal_digits': 2,
873
+ rounding: 0,
874
+ code: 'MAD',
875
+ name_plural: 'Moroccan dirhams'
876
+ }, {
877
+ symbol: 'MDL',
878
+ name: 'Moldovan Leu',
879
+ symbol_native: 'MDL',
880
+ 'decimal_digits': 2,
881
+ rounding: 0,
882
+ code: 'MDL',
883
+ name_plural: 'Moldovan lei'
884
+ }, {
885
+ symbol: 'MGA',
886
+ name: 'Malagasy Ariary',
887
+ symbol_native: 'MGA',
888
+ 'decimal_digits': 0,
889
+ rounding: 0,
890
+ code: 'MGA',
891
+ name_plural: 'Malagasy Ariaries'
892
+ }, {
893
+ symbol: 'MKD',
894
+ name: 'Macedonian Denar',
895
+ symbol_native: 'MKD',
896
+ 'decimal_digits': 2,
897
+ rounding: 0,
898
+ code: 'MKD',
899
+ name_plural: 'Macedonian denari'
900
+ }, {
901
+ symbol: 'MMK',
902
+ name: 'Myanma Kyat',
903
+ symbol_native: 'K',
904
+ 'decimal_digits': 0,
905
+ rounding: 0,
906
+ code: 'MMK',
907
+ name_plural: 'Myanma kyats'
908
+ }, {
909
+ symbol: 'MOP$',
910
+ name: 'Macanese Pataca',
911
+ symbol_native: 'MOP$',
912
+ 'decimal_digits': 2,
913
+ rounding: 0,
914
+ code: 'MOP',
915
+ name_plural: 'Macanese patacas'
916
+ }, {
917
+ symbol: 'MURs',
918
+ name: 'Mauritian Rupee',
919
+ symbol_native: 'MURs',
920
+ 'decimal_digits': 0,
921
+ rounding: 0,
922
+ code: 'MUR',
923
+ name_plural: 'Mauritian rupees'
924
+ }, {
925
+ symbol: 'MX$',
926
+ name: 'Mexican Peso',
927
+ symbol_native: '$',
928
+ 'decimal_digits': 2,
929
+ rounding: 0,
930
+ code: 'MXN',
931
+ name_plural: 'Mexican pesos'
932
+ }, {
933
+ symbol: 'RM',
934
+ name: 'Malaysian Ringgit',
935
+ symbol_native: 'RM',
936
+ 'decimal_digits': 2,
937
+ rounding: 0,
938
+ code: 'MYR',
939
+ name_plural: 'Malaysian ringgits'
940
+ }, {
941
+ symbol: 'MTn',
942
+ name: 'Mozambican Metical',
943
+ symbol_native: 'MTn',
944
+ 'decimal_digits': 2,
945
+ rounding: 0,
946
+ code: 'MZN',
947
+ name_plural: 'Mozambican meticals'
948
+ }, {
949
+ symbol: 'N$',
950
+ name: 'Namibian Dollar',
951
+ symbol_native: 'N$',
952
+ 'decimal_digits': 2,
953
+ rounding: 0,
954
+ code: 'NAD',
955
+ name_plural: 'Namibian dollars'
956
+ }, {
957
+ symbol: '',
958
+ name: 'Nigerian Naira',
959
+ symbol_native: '',
960
+ 'decimal_digits': 2,
961
+ rounding: 0,
962
+ code: 'NGN',
963
+ name_plural: 'Nigerian nairas'
964
+ }, {
965
+ symbol: 'C$',
966
+ name: 'Nicaraguan Córdoba',
967
+ symbol_native: 'C$',
968
+ 'decimal_digits': 2,
969
+ rounding: 0,
970
+ code: 'NIO',
971
+ name_plural: 'Nicaraguan córdobas'
972
+ }, {
973
+ symbol: 'Nkr',
974
+ name: 'Norwegian Krone',
975
+ symbol_native: 'kr',
976
+ 'decimal_digits': 2,
977
+ rounding: 0,
978
+ code: 'NOK',
979
+ name_plural: 'Norwegian kroner'
980
+ }, {
981
+ symbol: 'NPRs',
982
+ name: 'Nepalese Rupee',
983
+ symbol_native: 'नेरू',
984
+ 'decimal_digits': 2,
985
+ rounding: 0,
986
+ code: 'NPR',
987
+ name_plural: 'Nepalese rupees'
988
+ }, {
989
+ symbol: 'NZ$',
990
+ name: 'New Zealand Dollar',
991
+ symbol_native: '$',
992
+ 'decimal_digits': 2,
993
+ rounding: 0,
994
+ code: 'NZD',
995
+ name_plural: 'New Zealand dollars'
996
+ }, {
997
+ symbol: 'OMR',
998
+ name: 'Omani Rial',
999
+ symbol_native: 'ر.ع.‏',
1000
+ 'decimal_digits': 3,
1001
+ rounding: 0,
1002
+ code: 'OMR',
1003
+ name_plural: 'Omani rials'
1004
+ }, {
1005
+ symbol: 'B/.',
1006
+ name: 'Panamanian Balboa',
1007
+ symbol_native: 'B/.',
1008
+ 'decimal_digits': 2,
1009
+ rounding: 0,
1010
+ code: 'PAB',
1011
+ name_plural: 'Panamanian balboas'
1012
+ }, {
1013
+ symbol: 'S/.',
1014
+ name: 'Peruvian Nuevo Sol',
1015
+ symbol_native: 'S/.',
1016
+ 'decimal_digits': 2,
1017
+ rounding: 0,
1018
+ code: 'PEN',
1019
+ name_plural: 'Peruvian nuevos soles'
1020
+ }, {
1021
+ symbol: '₱',
1022
+ name: 'Philippine Peso',
1023
+ symbol_native: '',
1024
+ 'decimal_digits': 2,
1025
+ rounding: 0,
1026
+ code: 'PHP',
1027
+ name_plural: 'Philippine pesos'
1028
+ }, {
1029
+ symbol: 'PKRs',
1030
+ name: 'Pakistani Rupee',
1031
+ symbol_native: '',
1032
+ 'decimal_digits': 0,
1033
+ rounding: 0,
1034
+ code: 'PKR',
1035
+ name_plural: 'Pakistani rupees'
1036
+ }, {
1037
+ symbol: '',
1038
+ name: 'Polish Zloty',
1039
+ symbol_native: 'zł',
1040
+ 'decimal_digits': 2,
1041
+ rounding: 0,
1042
+ code: 'PLN',
1043
+ name_plural: 'Polish zlotys'
1044
+ }, {
1045
+ symbol: '',
1046
+ name: 'Paraguayan Guarani',
1047
+ symbol_native: '',
1048
+ 'decimal_digits': 0,
1049
+ rounding: 0,
1050
+ code: 'PYG',
1051
+ name_plural: 'Paraguayan guaranis'
1052
+ }, {
1053
+ symbol: 'QR',
1054
+ name: 'Qatari Rial',
1055
+ symbol_native: 'ر.ق.‏',
1056
+ 'decimal_digits': 2,
1057
+ rounding: 0,
1058
+ code: 'QAR',
1059
+ name_plural: 'Qatari rials'
1060
+ }, {
1061
+ symbol: 'RON',
1062
+ name: 'Romanian Leu',
1063
+ symbol_native: 'RON',
1064
+ 'decimal_digits': 2,
1065
+ rounding: 0,
1066
+ code: 'RON',
1067
+ name_plural: 'Romanian lei'
1068
+ }, {
1069
+ symbol: 'din.',
1070
+ name: 'Serbian Dinar',
1071
+ symbol_native: 'дин.',
1072
+ 'decimal_digits': 0,
1073
+ rounding: 0,
1074
+ code: 'RSD',
1075
+ name_plural: 'Serbian dinars'
1076
+ }, {
1077
+ symbol: 'RUB',
1078
+ name: 'Russian Ruble',
1079
+ symbol_native: 'руб.',
1080
+ 'decimal_digits': 2,
1081
+ rounding: 0,
1082
+ code: 'RUB',
1083
+ name_plural: 'Russian rubles'
1084
+ }, {
1085
+ symbol: 'RWF',
1086
+ name: 'Rwandan Franc',
1087
+ symbol_native: 'FR',
1088
+ 'decimal_digits': 0,
1089
+ rounding: 0,
1090
+ code: 'RWF',
1091
+ name_plural: 'Rwandan francs'
1092
+ }, {
1093
+ symbol: 'SR',
1094
+ name: 'Saudi Riyal',
1095
+ symbol_native: 'ر.س.‏',
1096
+ 'decimal_digits': 2,
1097
+ rounding: 0,
1098
+ code: 'SAR',
1099
+ name_plural: 'Saudi riyals'
1100
+ }, {
1101
+ symbol: 'SDG',
1102
+ name: 'Sudanese Pound',
1103
+ symbol_native: 'SDG',
1104
+ 'decimal_digits': 2,
1105
+ rounding: 0,
1106
+ code: 'SDG',
1107
+ name_plural: 'Sudanese pounds'
1108
+ }, {
1109
+ symbol: 'Skr',
1110
+ name: 'Swedish Krona',
1111
+ symbol_native: 'kr',
1112
+ 'decimal_digits': 2,
1113
+ rounding: 0,
1114
+ code: 'SEK',
1115
+ name_plural: 'Swedish kronor'
1116
+ }, {
1117
+ symbol: 'S$',
1118
+ name: 'Singapore Dollar',
1119
+ symbol_native: '$',
1120
+ 'decimal_digits': 2,
1121
+ rounding: 0,
1122
+ code: 'SGD',
1123
+ name_plural: 'Singapore dollars'
1124
+ }, {
1125
+ symbol: 'Ssh',
1126
+ name: 'Somali Shilling',
1127
+ symbol_native: 'Ssh',
1128
+ 'decimal_digits': 0,
1129
+ rounding: 0,
1130
+ code: 'SOS',
1131
+ name_plural: 'Somali shillings'
1132
+ }, {
1133
+ symbol: 'SY£',
1134
+ name: 'Syrian Pound',
1135
+ symbol_native: 'ل.س.‏',
1136
+ 'decimal_digits': 0,
1137
+ rounding: 0,
1138
+ code: 'SYP',
1139
+ name_plural: 'Syrian pounds'
1140
+ }, {
1141
+ symbol: '฿',
1142
+ name: 'Thai Baht',
1143
+ symbol_native: '฿',
1144
+ 'decimal_digits': 2,
1145
+ rounding: 0,
1146
+ code: 'THB',
1147
+ name_plural: 'Thai baht'
1148
+ }, {
1149
+ symbol: 'DT',
1150
+ name: 'Tunisian Dinar',
1151
+ symbol_native: 'د.ت.‏',
1152
+ 'decimal_digits': 3,
1153
+ rounding: 0,
1154
+ code: 'TND',
1155
+ name_plural: 'Tunisian dinars'
1156
+ }, {
1157
+ symbol: 'T$',
1158
+ name: 'Tongan Paʻanga',
1159
+ symbol_native: 'T$',
1160
+ 'decimal_digits': 2,
1161
+ rounding: 0,
1162
+ code: 'TOP',
1163
+ name_plural: 'Tongan paʻanga'
1164
+ }, {
1165
+ symbol: 'TL',
1166
+ name: 'Turkish Lira',
1167
+ symbol_native: 'TL',
1168
+ 'decimal_digits': 2,
1169
+ rounding: 0,
1170
+ code: 'TRY',
1171
+ name_plural: 'Turkish Lira'
1172
+ }, {
1173
+ symbol: 'TT$',
1174
+ name: 'Trinidad and Tobago Dollar',
1175
+ symbol_native: '$',
1176
+ 'decimal_digits': 2,
1177
+ rounding: 0,
1178
+ code: 'TTD',
1179
+ name_plural: 'Trinidad and Tobago dollars'
1180
+ }, {
1181
+ symbol: 'NT$',
1182
+ name: 'New Taiwan Dollar',
1183
+ symbol_native: 'NT$',
1184
+ 'decimal_digits': 2,
1185
+ rounding: 0,
1186
+ code: 'TWD',
1187
+ name_plural: 'New Taiwan dollars'
1188
+ }, {
1189
+ symbol: 'TSh',
1190
+ name: 'Tanzanian Shilling',
1191
+ symbol_native: 'TSh',
1192
+ 'decimal_digits': 0,
1193
+ rounding: 0,
1194
+ code: 'TZS',
1195
+ name_plural: 'Tanzanian shillings'
1196
+ }, {
1197
+ symbol: '',
1198
+ name: 'Ukrainian Hryvnia',
1199
+ symbol_native: '',
1200
+ 'decimal_digits': 2,
1201
+ rounding: 0,
1202
+ code: 'UAH',
1203
+ name_plural: 'Ukrainian hryvnias'
1204
+ }, {
1205
+ symbol: 'USh',
1206
+ name: 'Ugandan Shilling',
1207
+ symbol_native: 'USh',
1208
+ 'decimal_digits': 0,
1209
+ rounding: 0,
1210
+ code: 'UGX',
1211
+ name_plural: 'Ugandan shillings'
1212
+ }, {
1213
+ symbol: '$U',
1214
+ name: 'Uruguayan Peso',
1215
+ symbol_native: '$',
1216
+ 'decimal_digits': 2,
1217
+ rounding: 0,
1218
+ code: 'UYU',
1219
+ name_plural: 'Uruguayan pesos'
1220
+ }, {
1221
+ symbol: 'UZS',
1222
+ name: 'Uzbekistan Som',
1223
+ symbol_native: 'UZS',
1224
+ 'decimal_digits': 0,
1225
+ rounding: 0,
1226
+ code: 'UZS',
1227
+ name_plural: 'Uzbekistan som'
1228
+ }, {
1229
+ symbol: 'Bs.F.',
1230
+ name: 'Venezuelan Bolívar',
1231
+ symbol_native: 'Bs.F.',
1232
+ 'decimal_digits': 2,
1233
+ rounding: 0,
1234
+ code: 'VEF',
1235
+ name_plural: 'Venezuelan bolívars'
1236
+ }, {
1237
+ symbol: '₫',
1238
+ name: 'Vietnamese Dong',
1239
+ symbol_native: '',
1240
+ 'decimal_digits': 0,
1241
+ rounding: 0,
1242
+ code: 'VND',
1243
+ name_plural: 'Vietnamese dong'
1244
+ }, {
1245
+ symbol: 'FCFA',
1246
+ name: 'CFA Franc BEAC',
1247
+ symbol_native: 'FCFA',
1248
+ 'decimal_digits': 0,
1249
+ rounding: 0,
1250
+ code: 'XAF',
1251
+ name_plural: 'CFA francs BEAC'
1252
+ }, {
1253
+ symbol: 'CFA',
1254
+ name: 'CFA Franc BCEAO',
1255
+ symbol_native: 'CFA',
1256
+ 'decimal_digits': 0,
1257
+ rounding: 0,
1258
+ code: 'XOF',
1259
+ name_plural: 'CFA francs BCEAO'
1260
+ }, {
1261
+ symbol: 'YR',
1262
+ name: 'Yemeni Rial',
1263
+ symbol_native: 'ر.ي.‏',
1264
+ 'decimal_digits': 0,
1265
+ rounding: 0,
1266
+ code: 'YER',
1267
+ name_plural: 'Yemeni rials'
1268
+ }, {
1269
+ symbol: 'R',
1270
+ name: 'South African Rand',
1271
+ symbol_native: 'R',
1272
+ 'decimal_digits': 2,
1273
+ rounding: 0,
1274
+ code: 'ZAR',
1275
+ name_plural: 'South African rand'
1276
+ }, {
1277
+ symbol: 'ZK',
1278
+ name: 'Zambian Kwacha',
1279
+ symbol_native: 'ZK',
1280
+ 'decimal_digits': 0,
1281
+ rounding: 0,
1282
+ code: 'ZMK',
1283
+ name_plural: 'Zambian kwachas'
1284
+ }];
1285
+ const decodeHTMLEntities = html => {
1286
+ const document = new DOMParser().parseFromString(html, 'text/html');
1287
+ return document.documentElement.textContent || '';
1426
1288
  };
1427
- exports.decodeHTMLEntities = decodeHTMLEntities;
1289
+ exports.decodeHTMLEntities = decodeHTMLEntities;