@dcs-tech/ui 0.3.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (427) hide show
  1. package/README.md +1 -6
  2. package/dist/ChartImageMenu-CuuFnW9q.js +1481 -0
  3. package/dist/ChartView-nS4f4EU_.js +1703 -0
  4. package/dist/{SummaryChart-D4jcOv-K.js → SummaryChart-CVg6i2mx.js} +8 -10
  5. package/dist/{SummaryImage-BSbatHym.js → SummaryImage-CoEFzMl6.js} +3 -4
  6. package/dist/{SummarySeeAll-vnaL3pdy.js → SummarySeeAll-C_OUs3kn.js} +24 -20
  7. package/dist/assets/fileTask.worker-FQSUtwcz.js +1 -0
  8. package/dist/columnValue-K98ElfJc.js +610 -0
  9. package/dist/exportContext-CJaIv8R-.js +166 -0
  10. package/dist/{exportEngine-C4n1MiOw.js → exportEngine-CDLYHH0d.js} +142 -139
  11. package/dist/fileActions-KSaVGnaE.js +144 -0
  12. package/dist/geometry-ChwYB45B.js +1732 -0
  13. package/dist/index.js +14895 -17391
  14. package/dist/{defaults-BbLB8QmD.js → labels-CnqqTrne.js} +4 -81
  15. package/dist/runFileTask-BClLQjmv.js +109 -0
  16. package/dist/scrollArea-DAlVT5U7.js +214 -0
  17. package/dist/style.css +1 -1
  18. package/dist/{summaryChartData-CU_W5ocv.js → summaryChartData-pNvzaEHp.js} +2 -3
  19. package/dist/types/{shared-web-ui/src → components}/Breadcrumbs/Breadcrumbs.d.ts +1 -1
  20. package/dist/types/{shared-web-ui/src → components}/Button/Button.d.ts +1 -1
  21. package/dist/types/{shared-web-ui/src → components}/Button/ButtonGroup.d.ts +1 -1
  22. package/dist/types/{shared-web-ui/src → components}/Button/ButtonGroupContext.d.ts +1 -1
  23. package/dist/types/{shared-web-ui/src → components}/Button/index.d.ts +1 -1
  24. package/dist/types/{shared-web-ui/src → components}/Charts/ChartTooltip.d.ts +17 -3
  25. package/dist/types/{shared-web-ui/src → components}/Charts/geometry.d.ts +5 -3
  26. package/dist/types/{shared-web-ui/src → components}/Charts/parts.d.ts +2 -1
  27. package/dist/types/{shared-web-ui/src → components}/Charts/ui.d.ts +1 -1
  28. package/dist/types/components/Charts/useUiScale.d.ts +1 -0
  29. package/dist/types/{shared-web-ui/src → components}/Checkbox/Checkbox.d.ts +1 -1
  30. package/dist/types/{shared-web-ui/src → components}/Checkbox/CheckboxGroup.d.ts +1 -1
  31. package/dist/types/{shared-web-ui/src → components}/Checkbox/CheckboxGroupContext.d.ts +1 -1
  32. package/dist/types/{shared-web-ui/src → components}/Checkbox/index.d.ts +1 -1
  33. package/dist/types/{shared-web-ui/src → components}/ChipInput/ChipInput.d.ts +1 -1
  34. package/dist/types/{shared-web-ui/src → components}/ChipInput/index.d.ts +2 -2
  35. package/dist/types/{shared-web-ui/src → components}/ChipInput/useChipSuggestions.d.ts +1 -1
  36. package/dist/types/{shared-web-ui/src → components}/Collapsible/Collapsible.d.ts +1 -1
  37. package/dist/types/{shared-web-ui/src → components}/Collapsible/CollapsibleContext.d.ts +1 -1
  38. package/dist/types/{shared-web-ui/src → components}/Collapsible/CollapsibleItem.d.ts +1 -1
  39. package/dist/types/{shared-web-ui/src → components}/Collapsible/index.d.ts +1 -1
  40. package/dist/types/{shared-web-ui/src → components}/ColorSchemeSelect/ColorSchemeSelect.d.ts +2 -2
  41. package/dist/types/{shared-web-ui/src → components}/DataTable/DataTable.d.ts +1 -1
  42. package/dist/types/components/DataTable/DataTable.storyData.d.ts +23 -0
  43. package/dist/types/components/DataTable/PressButton.d.ts +2 -0
  44. package/dist/types/{shared-web-ui/src → components}/DataTable/cards/cardFields.d.ts +2 -4
  45. package/dist/types/components/DataTable/columnValue.d.ts +19 -0
  46. package/dist/types/components/DataTable/export/exportCells.d.ts +13 -0
  47. package/dist/types/{shared-web-ui/src → components}/DataTable/export/exportEngine.d.ts +2 -0
  48. package/dist/types/{shared-web-ui/src → components}/DataTable/export/useTableExport.d.ts +2 -0
  49. package/dist/types/components/DataTable/filters/FilterChips.d.ts +9 -0
  50. package/dist/types/{shared-web-ui/src → components}/DataTable/host.d.ts +2 -0
  51. package/dist/types/components/DataTable/index.d.ts +18 -0
  52. package/dist/types/{shared-web-ui/src → components}/DataTable/labels.d.ts +2 -0
  53. package/dist/types/components/DataTable/menu/layers.d.ts +1 -0
  54. package/dist/types/components/DataTable/rows/PressRow.d.ts +7 -0
  55. package/dist/types/{shared-web-ui/src → components}/DataTable/summary/summaryWidth.d.ts +1 -1
  56. package/dist/types/{shared-web-ui/src → components}/DataTable/types.d.ts +11 -0
  57. package/dist/types/components/DataTable/ui-local/scrollLock.d.ts +1 -0
  58. package/dist/types/{shared-web-ui/src → components}/DataTable/useTable.d.ts +4 -1
  59. package/dist/types/{shared-web-ui/src → components}/DataTable/vendor/index.d.ts +1 -1
  60. package/dist/types/{shared-web-ui/src → components}/DatePicker/Calendar.d.ts +1 -1
  61. package/dist/types/{shared-web-ui/src → components}/DatePicker/DatePicker.d.ts +1 -1
  62. package/dist/types/{shared-web-ui/src → components}/DatePicker/TimeField.d.ts +1 -1
  63. package/dist/types/{shared-web-ui/src → components}/DatePicker/index.d.ts +1 -1
  64. package/dist/types/{shared-web-ui/src → components}/Dialog/DialogHost.d.ts +1 -1
  65. package/dist/types/{shared-web-ui/src → components}/DropdownMenu/DropdownMenu.d.ts +1 -1
  66. package/dist/types/{shared-web-ui/src → components}/EditableTable/EditableTable.d.ts +1 -1
  67. package/dist/types/{shared-web-ui/src → components}/EditableTable/EditableTableActions.d.ts +1 -1
  68. package/dist/types/{shared-web-ui/src → components}/EditableTable/EditableTableCell.d.ts +3 -3
  69. package/dist/types/{shared-web-ui/src → components}/EditableTable/EditableTableRow.d.ts +3 -3
  70. package/dist/types/{shared-web-ui/src → components}/EditableTable/EditableTableSummary.d.ts +2 -2
  71. package/dist/types/{shared-web-ui/src → components}/EditableTable/index.d.ts +1 -1
  72. package/dist/types/{shared-web-ui/src → components}/EditableTable/useEditableTable.d.ts +3 -3
  73. package/dist/types/{shared-web-ui/src → components}/FieldContext/FieldContext.d.ts +1 -1
  74. package/dist/types/{shared-web-ui/src → components}/FieldContext/FieldProvider.d.ts +1 -1
  75. package/dist/types/{shared-web-ui/src → components}/FieldContext/index.d.ts +1 -1
  76. package/dist/types/{shared-web-ui/src → components}/FieldContext/useField.d.ts +2 -2
  77. package/dist/types/{shared-web-ui/src → components}/FieldContext/useFieldSurface.d.ts +1 -1
  78. package/dist/types/{shared-web-ui/src → components}/FieldContext/useFormKeyboard.d.ts +1 -1
  79. package/dist/types/{shared-web-ui/src → components}/FieldWrapper/FieldWrapper.d.ts +1 -1
  80. package/dist/types/{shared-web-ui/src → components}/FieldWrapper/index.d.ts +1 -1
  81. package/dist/types/{shared-web-ui/src → components}/Fields/Field.d.ts +1 -1
  82. package/dist/types/{shared-web-ui/src → components}/Fields/FieldButton.d.ts +1 -1
  83. package/dist/types/{shared-web-ui/src → components}/Fields/Fields.d.ts +1 -1
  84. package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldBlur.d.ts +1 -1
  85. package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldChange.d.ts +1 -1
  86. package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldCondition.d.ts +1 -1
  87. package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldDisabled.d.ts +1 -1
  88. package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldRender.d.ts +1 -1
  89. package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldSelect.d.ts +1 -1
  90. package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldValidation.d.ts +1 -1
  91. package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldValue.d.ts +1 -1
  92. package/dist/types/{shared-web-ui/src → components}/Fields/index.d.ts +1 -1
  93. package/dist/types/components/FileEngine/FileEngineContext.d.ts +17 -0
  94. package/dist/types/components/FileEngine/FileEngineProvider.d.ts +12 -0
  95. package/dist/types/components/FileEngine/FileJobsTray.d.ts +10 -0
  96. package/dist/types/components/FileEngine/index.d.ts +8 -0
  97. package/dist/types/components/FileEngine/labels.d.ts +29 -0
  98. package/dist/types/{shared-web-ui/src → components}/Form/Form.d.ts +1 -1
  99. package/dist/types/{shared-web-ui/src → components}/Form/index.d.ts +1 -1
  100. package/dist/types/components/Image/ImagePicker.d.ts +23 -0
  101. package/dist/types/components/Image/ImageStrip.d.ts +13 -0
  102. package/dist/types/components/Image/ImageViewer.d.ts +16 -0
  103. package/dist/types/components/Image/index.d.ts +8 -0
  104. package/dist/types/components/Image/prepareImage.d.ts +19 -0
  105. package/dist/types/{shared-web-ui/src → components}/Input/Input.d.ts +1 -1
  106. package/dist/types/{shared-web-ui/src → components}/Input/index.d.ts +1 -1
  107. package/dist/types/{shared-web-ui/src → components}/Popover/Popover.d.ts +1 -1
  108. package/dist/types/{shared-web-ui/src → components}/Popover/floatingPosition.d.ts +1 -1
  109. package/dist/types/components/Press/index.d.ts +2 -0
  110. package/dist/types/components/Press/usePress.d.ts +9 -0
  111. package/dist/types/{shared-web-ui/src → components}/Radio/Radio.d.ts +1 -1
  112. package/dist/types/{shared-web-ui/src → components}/Radio/RadioGroup.d.ts +1 -1
  113. package/dist/types/{shared-web-ui/src → components}/Radio/RadioGroupContext.d.ts +1 -1
  114. package/dist/types/{shared-web-ui/src → components}/Radio/index.d.ts +1 -1
  115. package/dist/types/{shared-web-ui/src → components}/Select/Select.d.ts +1 -1
  116. package/dist/types/{shared-web-ui/src → components}/Select/index.d.ts +1 -1
  117. package/dist/types/components/Select/useSelect.d.ts +2 -0
  118. package/dist/types/{shared-web-ui/src → components}/Sidebar/Sidebar.d.ts +1 -1
  119. package/dist/types/components/Stepper/Stepper.d.ts +17 -0
  120. package/dist/types/components/Stepper/index.d.ts +2 -0
  121. package/dist/types/{shared-web-ui/src → components}/Suggest/Suggest.d.ts +1 -1
  122. package/dist/types/{shared-web-ui/src → components}/Suggest/SuggestionList.d.ts +1 -1
  123. package/dist/types/{shared-web-ui/src → components}/Suggest/index.d.ts +2 -2
  124. package/dist/types/{shared-web-ui/src → components}/Suggest/searchFilters.d.ts +1 -1
  125. package/dist/types/{shared-web-ui/src → components}/Suggest/useSuggest.d.ts +1 -1
  126. package/dist/types/{shared-web-ui/src → components}/Switch/Switch.d.ts +1 -1
  127. package/dist/types/{shared-web-ui/src → components}/Switch/index.d.ts +1 -1
  128. package/dist/types/{shared-web-ui/src → components}/Toast/ToastHost.d.ts +1 -0
  129. package/dist/types/{shared-web-ui/src → components}/Tooltip/Tooltip.d.ts +1 -1
  130. package/dist/types/{shared-web-ui/src → components}/Tooltip/useTooltip.d.ts +1 -1
  131. package/dist/types/{shared-web-ui/src → components}/Typography/Typography.d.ts +1 -1
  132. package/dist/types/{shared-web-ui/src → components}/Typography/index.d.ts +1 -1
  133. package/dist/types/components/UIProvider/UIFormatContext.d.ts +7 -0
  134. package/dist/types/components/UIProvider/UILabelsContext.d.ts +116 -0
  135. package/dist/types/{shared-web-ui/src → components}/UIProvider/UIProvider.d.ts +7 -2
  136. package/dist/types/{shared-web-ui/src → components}/UIProvider/index.d.ts +4 -0
  137. package/dist/types/core/hooks/index.d.ts +3 -0
  138. package/dist/types/core/hooks/useDebounced.d.ts +7 -0
  139. package/dist/types/core/hooks/usePresence.d.ts +5 -0
  140. package/dist/types/{shared-logic/src/ui → core/logic}/button.logic.d.ts +1 -1
  141. package/dist/types/{shared-logic/src/ui → core/logic}/cellRules.logic.d.ts +1 -1
  142. package/dist/types/{shared-logic/src/ui → core/logic}/chipinput.logic.d.ts +1 -1
  143. package/dist/types/{shared-logic/src/ui → core/logic}/collapsible.logic.d.ts +6 -1
  144. package/dist/types/{shared-logic/src/ui → core/logic}/datePicker.logic.d.ts +6 -1
  145. package/dist/types/core/logic/displayOrder.logic.d.ts +4 -0
  146. package/dist/types/{shared-logic/src/ui → core/logic}/editableTable.logic.d.ts +5 -1
  147. package/dist/types/core/logic/exportSafety.logic.d.ts +1 -0
  148. package/dist/types/{shared-logic/src/ui → core/logic}/fieldControl.logic.d.ts +1 -1
  149. package/dist/types/{shared-logic/src/ui → core/logic}/fieldWrapper.logic.d.ts +1 -1
  150. package/dist/types/{shared-logic/src/ui → core/logic}/fields.logic.d.ts +1 -1
  151. package/dist/types/core/logic/fileQueue.logic.d.ts +28 -0
  152. package/dist/types/core/logic/format.logic.d.ts +4 -0
  153. package/dist/types/{shared-logic/src/ui → core/logic}/index.d.ts +8 -0
  154. package/dist/types/{shared-logic/src/ui → core/logic}/keyboard.logic.d.ts +1 -1
  155. package/dist/types/core/logic/motion.logic.d.ts +1 -0
  156. package/dist/types/{shared-logic/src/ui → core/logic}/navigation.logic.d.ts +1 -1
  157. package/dist/types/{shared-logic/src/ui → core/logic}/popupList.logic.d.ts +1 -1
  158. package/dist/types/core/logic/press.logic.d.ts +14 -0
  159. package/dist/types/{shared-logic/src/ui → core/logic}/quickAddGrid.logic.d.ts +1 -1
  160. package/dist/types/{shared-logic/src/ui → core/logic}/select.logic.d.ts +1 -1
  161. package/dist/types/core/logic/stepper.logic.d.ts +6 -0
  162. package/dist/types/{shared-logic/src/ui → core/logic}/suggest.logic.d.ts +1 -1
  163. package/dist/types/core/logic/tableDate.logic.d.ts +7 -0
  164. package/dist/types/{shared-logic/src/ui → core/logic}/tableLayout.logic.d.ts +1 -1
  165. package/dist/types/{shared-logic/src/ui → core/logic}/tableSummary.logic.d.ts +3 -3
  166. package/dist/types/{shared-logic/src/ui → core/logic}/tooltip.logic.d.ts +1 -1
  167. package/dist/types/{shared-logic/src/ui → core/logic}/typography.logic.d.ts +1 -1
  168. package/dist/types/core/logic/uiScale.logic.d.ts +1 -0
  169. package/dist/types/{shared-types/src/ui → core/types}/button.types.d.ts +1 -0
  170. package/dist/types/{shared-types/src/ui → core/types}/collapsible.types.d.ts +4 -16
  171. package/dist/types/core/types/fileEngine.types.d.ts +65 -0
  172. package/dist/types/core/types/format.types.d.ts +15 -0
  173. package/dist/types/{shared-types/src/ui → core/types}/index.d.ts +2 -0
  174. package/dist/types/{shared-types/src/ui → core/types}/suggest.types.d.ts +1 -0
  175. package/dist/types/{shared-types/src/ui → core/types}/table.types.d.ts +1 -0
  176. package/dist/types/{shared-web-ui/src/DataTable/vendor → file}/fileActions.d.ts +17 -7
  177. package/dist/types/file/fileEngine.d.ts +48 -0
  178. package/dist/types/file/tasks/fileTask.worker.d.ts +1 -0
  179. package/dist/types/file/tasks/runFileTask.d.ts +6 -0
  180. package/dist/types/file/workerPool.d.ts +17 -0
  181. package/dist/types/index.d.ts +93 -0
  182. package/package.json +27 -28
  183. package/dist/ChartImageMenu-gvNAYVkY.js +0 -2938
  184. package/dist/Charts-COljjy0x.js +0 -1759
  185. package/dist/exportContext-CAX8VPrP.js +0 -243
  186. package/dist/fuseSearch-vLQR3O5a.js +0 -37
  187. package/dist/types/published/dcs-ui/src/index.d.ts +0 -4
  188. package/dist/types/published/dcs-ui/src/publicLogic.d.ts +0 -2
  189. package/dist/types/published/dcs-ui/src/publicTypes.d.ts +0 -2
  190. package/dist/types/shared-logic/src/report/aggregate.d.ts +0 -8
  191. package/dist/types/shared-logic/src/report/canvas.d.ts +0 -51
  192. package/dist/types/shared-logic/src/report/conditions.d.ts +0 -4
  193. package/dist/types/shared-logic/src/report/constants.d.ts +0 -7
  194. package/dist/types/shared-logic/src/report/dataset.d.ts +0 -23
  195. package/dist/types/shared-logic/src/report/edit.d.ts +0 -126
  196. package/dist/types/shared-logic/src/report/fields.d.ts +0 -29
  197. package/dist/types/shared-logic/src/report/format.d.ts +0 -5
  198. package/dist/types/shared-logic/src/report/fromColumns.d.ts +0 -31
  199. package/dist/types/shared-logic/src/report/index.d.ts +0 -19
  200. package/dist/types/shared-logic/src/report/layout.d.ts +0 -31
  201. package/dist/types/shared-logic/src/report/metrics.d.ts +0 -17
  202. package/dist/types/shared-logic/src/report/migrate.d.ts +0 -17
  203. package/dist/types/shared-logic/src/report/paginate.d.ts +0 -8
  204. package/dist/types/shared-logic/src/report/renderers/html.d.ts +0 -8
  205. package/dist/types/shared-logic/src/report/renderers/pdfmake.d.ts +0 -18
  206. package/dist/types/shared-logic/src/report/resolve.d.ts +0 -11
  207. package/dist/types/shared-logic/src/report/scope.d.ts +0 -24
  208. package/dist/types/shared-logic/src/report/storage.d.ts +0 -36
  209. package/dist/types/shared-logic/src/report/validate.d.ts +0 -10
  210. package/dist/types/shared-types/src/report/bands.d.ts +0 -12
  211. package/dist/types/shared-types/src/report/blocks.d.ts +0 -122
  212. package/dist/types/shared-types/src/report/conditions.d.ts +0 -11
  213. package/dist/types/shared-types/src/report/dataset.d.ts +0 -53
  214. package/dist/types/shared-types/src/report/document.d.ts +0 -121
  215. package/dist/types/shared-types/src/report/index.d.ts +0 -9
  216. package/dist/types/shared-types/src/report/primitives.d.ts +0 -69
  217. package/dist/types/shared-types/src/report/registry.d.ts +0 -39
  218. package/dist/types/shared-types/src/report/storage.d.ts +0 -10
  219. package/dist/types/shared-types/src/report/template.d.ts +0 -32
  220. package/dist/types/shared-web-ui/src/DataTable/index.d.ts +0 -18
  221. package/dist/types/shared-web-ui/src/ReportDesigner/AlignedRowsEditor.d.ts +0 -4
  222. package/dist/types/shared-web-ui/src/ReportDesigner/BandList.d.ts +0 -18
  223. package/dist/types/shared-web-ui/src/ReportDesigner/BlockEditor.d.ts +0 -33
  224. package/dist/types/shared-web-ui/src/ReportDesigner/ColumnEditor.d.ts +0 -2
  225. package/dist/types/shared-web-ui/src/ReportDesigner/ConditionEditor.d.ts +0 -5
  226. package/dist/types/shared-web-ui/src/ReportDesigner/FieldPicker.d.ts +0 -12
  227. package/dist/types/shared-web-ui/src/ReportDesigner/FieldSelect.d.ts +0 -2
  228. package/dist/types/shared-web-ui/src/ReportDesigner/FormatEditor.d.ts +0 -2
  229. package/dist/types/shared-web-ui/src/ReportDesigner/Inspector.d.ts +0 -7
  230. package/dist/types/shared-web-ui/src/ReportDesigner/OptionsEditor.d.ts +0 -2
  231. package/dist/types/shared-web-ui/src/ReportDesigner/ReportDesigner.d.ts +0 -12
  232. package/dist/types/shared-web-ui/src/ReportDesigner/StyleEditor.d.ts +0 -2
  233. package/dist/types/shared-web-ui/src/ReportDesigner/TableEditor.d.ts +0 -2
  234. package/dist/types/shared-web-ui/src/ReportDesigner/WatermarkEditor.d.ts +0 -2
  235. package/dist/types/shared-web-ui/src/ReportDesigner/chipSources.d.ts +0 -5
  236. package/dist/types/shared-web-ui/src/ReportDesigner/icons.d.ts +0 -21
  237. package/dist/types/shared-web-ui/src/ReportDesigner/index.d.ts +0 -16
  238. package/dist/types/shared-web-ui/src/ReportDesigner/labels.d.ts +0 -22
  239. package/dist/types/shared-web-ui/src/ReportDesigner/parts.d.ts +0 -33
  240. package/dist/types/shared-web-ui/src/ReportDesigner/types.d.ts +0 -67
  241. package/dist/types/shared-web-ui/src/ReportPreview/ReportPreview.d.ts +0 -20
  242. package/dist/types/shared-web-ui/src/ReportPreview/index.d.ts +0 -1
  243. package/dist/types/shared-web-ui/src/Select/useSelect.d.ts +0 -2
  244. package/dist/types/shared-web-ui/src/index.d.ts +0 -83
  245. package/dist/ui-DJFwpPdX.js +0 -4997
  246. /package/dist/types/{shared-web-ui/src → components}/AppBar/AppBar.d.ts +0 -0
  247. /package/dist/types/{shared-web-ui/src → components}/AppBar/index.d.ts +0 -0
  248. /package/dist/types/{shared-web-ui/src → components}/ArrowKeyFocus/useArrowKeyFocus.d.ts +0 -0
  249. /package/dist/types/{shared-web-ui/src → components}/Avatar/Avatar.d.ts +0 -0
  250. /package/dist/types/{shared-web-ui/src → components}/Avatar/index.d.ts +0 -0
  251. /package/dist/types/{shared-web-ui/src → components}/Badge/Badge.d.ts +0 -0
  252. /package/dist/types/{shared-web-ui/src → components}/Badge/index.d.ts +0 -0
  253. /package/dist/types/{shared-web-ui/src → components}/Breadcrumbs/index.d.ts +0 -0
  254. /package/dist/types/{shared-web-ui/src → components}/Card/Card.d.ts +0 -0
  255. /package/dist/types/{shared-web-ui/src → components}/Card/index.d.ts +0 -0
  256. /package/dist/types/{shared-web-ui/src → components}/Charts/AnchoredMenu.d.ts +0 -0
  257. /package/dist/types/{shared-web-ui/src → components}/Charts/BarList.d.ts +0 -0
  258. /package/dist/types/{shared-web-ui/src → components}/Charts/CalendarHeatmap.d.ts +0 -0
  259. /package/dist/types/{shared-web-ui/src → components}/Charts/Chart.d.ts +0 -0
  260. /package/dist/types/{shared-web-ui/src → components}/Charts/ChartIcon.d.ts +0 -0
  261. /package/dist/types/{shared-web-ui/src → components}/Charts/ChartImageMenu.d.ts +0 -0
  262. /package/dist/types/{shared-web-ui/src → components}/Charts/ChartTable.d.ts +0 -0
  263. /package/dist/types/{shared-web-ui/src → components}/Charts/ChartView.d.ts +0 -0
  264. /package/dist/types/{shared-web-ui/src → components}/Charts/ColumnChart.d.ts +0 -0
  265. /package/dist/types/{shared-web-ui/src → components}/Charts/Donut.d.ts +0 -0
  266. /package/dist/types/{shared-web-ui/src → components}/Charts/Funnel.d.ts +0 -0
  267. /package/dist/types/{shared-web-ui/src → components}/Charts/Gauge.d.ts +0 -0
  268. /package/dist/types/{shared-web-ui/src → components}/Charts/Legend.d.ts +0 -0
  269. /package/dist/types/{shared-web-ui/src → components}/Charts/LineChart.d.ts +0 -0
  270. /package/dist/types/{shared-web-ui/src → components}/Charts/NumberTrend.d.ts +0 -0
  271. /package/dist/types/{shared-web-ui/src → components}/Charts/Progress.d.ts +0 -0
  272. /package/dist/types/{shared-web-ui/src → components}/Charts/StackedBar.d.ts +0 -0
  273. /package/dist/types/{shared-web-ui/src → components}/Charts/Treemap.d.ts +0 -0
  274. /package/dist/types/{shared-web-ui/src → components}/Charts/chartData.d.ts +0 -0
  275. /package/dist/types/{shared-web-ui/src → components}/Charts/chartImage.d.ts +0 -0
  276. /package/dist/types/{shared-web-ui/src → components}/Charts/index.d.ts +0 -0
  277. /package/dist/types/{shared-web-ui/src → components}/Charts/labels.d.ts +0 -0
  278. /package/dist/types/{shared-web-ui/src → components}/Charts/menuPlacement.d.ts +0 -0
  279. /package/dist/types/{shared-web-ui/src → components}/Charts/palette.d.ts +0 -0
  280. /package/dist/types/{shared-web-ui/src → components}/Charts/pointer.d.ts +0 -0
  281. /package/dist/types/{shared-web-ui/src → components}/Charts/types.d.ts +0 -0
  282. /package/dist/types/{shared-web-ui/src → components}/Charts/useBoxSize.d.ts +0 -0
  283. /package/dist/types/{shared-web-ui/src → components}/Charts/useLegendFit.d.ts +0 -0
  284. /package/dist/types/{shared-web-ui/src → components}/ColorSchemeSelect/index.d.ts +0 -0
  285. /package/dist/types/{shared-web-ui/src → components}/CommandPalette/CommandPalette.d.ts +0 -0
  286. /package/dist/types/{shared-web-ui/src → components}/CommandPalette/index.d.ts +0 -0
  287. /package/dist/types/{shared-web-ui/src → components}/DataTable/DisplayPopover.d.ts +0 -0
  288. /package/dist/types/{shared-web-ui/src → components}/DataTable/HeaderMenu.d.ts +0 -0
  289. /package/dist/types/{shared-web-ui/src → components}/DataTable/ManageModal.d.ts +0 -0
  290. /package/dist/types/{shared-web-ui/src → components}/DataTable/SingleRowView.d.ts +0 -0
  291. /package/dist/types/{shared-web-ui/src → components}/DataTable/SortModal.d.ts +0 -0
  292. /package/dist/types/{shared-web-ui/src → components}/DataTable/StatusRow.d.ts +0 -0
  293. /package/dist/types/{shared-web-ui/src → components}/DataTable/TableColumnModal.d.ts +0 -0
  294. /package/dist/types/{shared-web-ui/src → components}/DataTable/TableControls.d.ts +0 -0
  295. /package/dist/types/{shared-web-ui/src → components}/DataTable/TablePagination.d.ts +0 -0
  296. /package/dist/types/{shared-web-ui/src → components}/DataTable/TableScrollStrip.d.ts +0 -0
  297. /package/dist/types/{shared-web-ui/src → components}/DataTable/TableToolbar.d.ts +0 -0
  298. /package/dist/types/{shared-web-ui/src → components}/DataTable/TableView.d.ts +0 -0
  299. /package/dist/types/{shared-web-ui/src → components}/DataTable/bulk/BulkConfirmDialog.d.ts +0 -0
  300. /package/dist/types/{shared-web-ui/src → components}/DataTable/bulk/TableToast.d.ts +0 -0
  301. /package/dist/types/{shared-web-ui/src → components}/DataTable/bulk/bulkActions.d.ts +0 -0
  302. /package/dist/types/{shared-web-ui/src → components}/DataTable/cards/CardFieldsEditor.d.ts +0 -0
  303. /package/dist/types/{shared-web-ui/src → components}/DataTable/cards/CardView.d.ts +0 -0
  304. /package/dist/types/{shared-web-ui/src → components}/DataTable/cards/rowParts.d.ts +0 -0
  305. /package/dist/types/{shared-web-ui/src → components}/DataTable/data/useServerData.d.ts +0 -0
  306. /package/dist/types/{shared-web-ui/src → components}/DataTable/defaults.d.ts +0 -0
  307. /package/dist/types/{shared-web-ui/src → components}/DataTable/detail/BuiltInDetail.d.ts +0 -0
  308. /package/dist/types/{shared-web-ui/src → components}/DataTable/detail/DetailHost.d.ts +0 -0
  309. /package/dist/types/{shared-web-ui/src → components}/DataTable/export/ExportPopover.d.ts +0 -0
  310. /package/dist/types/{shared-web-ui/src → components}/DataTable/export/ExportPreviewModal.d.ts +0 -0
  311. /package/dist/types/{shared-web-ui/src → components}/DataTable/export/ExportSettingsModal.d.ts +0 -0
  312. /package/dist/types/{shared-web-ui/src → components}/DataTable/export/ExportTemplateCards.d.ts +0 -0
  313. /package/dist/types/{shared-web-ui/src → components}/DataTable/export/exportContext.d.ts +0 -0
  314. /package/dist/types/{shared-web-ui/src → components}/DataTable/export/exportRows.d.ts +0 -0
  315. /package/dist/types/{shared-web-ui/src → components}/DataTable/export/templateDisplay.d.ts +0 -0
  316. /package/dist/types/{shared-web-ui/src → components}/DataTable/export/templateOptions.d.ts +0 -0
  317. /package/dist/types/{shared-web-ui/src → components}/DataTable/filters/ColumnFilterPopover.d.ts +0 -0
  318. /package/dist/types/{shared-web-ui/src → components}/DataTable/filters/FilterConditionRow.d.ts +0 -0
  319. /package/dist/types/{shared-web-ui/src → components}/DataTable/filters/FilterGroup.d.ts +0 -0
  320. /package/dist/types/{shared-web-ui/src → components}/DataTable/filters/FilterModal.d.ts +0 -0
  321. /package/dist/types/{shared-web-ui/src → components}/DataTable/filters/FilterRow.d.ts +0 -0
  322. /package/dist/types/{shared-web-ui/src → components}/DataTable/filters/columnFilterModel.d.ts +0 -0
  323. /package/dist/types/{shared-web-ui/src → components}/DataTable/filters/filterEngine.d.ts +0 -0
  324. /package/dist/types/{shared-web-ui/src → components}/DataTable/filters/filterRowModel.d.ts +0 -0
  325. /package/dist/types/{shared-web-ui/src → components}/DataTable/filters/quickFilterMatch.d.ts +0 -0
  326. /package/dist/types/{shared-web-ui/src → components}/DataTable/grouping/GroupUi.d.ts +0 -0
  327. /package/dist/types/{shared-web-ui/src → components}/DataTable/grouping/groupModel.d.ts +0 -0
  328. /package/dist/types/{shared-web-ui/src → components}/DataTable/grouping/useGrouping.d.ts +0 -0
  329. /package/dist/types/{shared-web-ui/src → components}/DataTable/keyboard/ShortcutsDialog.d.ts +0 -0
  330. /package/dist/types/{shared-web-ui/src → components}/DataTable/keyboard/shortcuts.d.ts +0 -0
  331. /package/dist/types/{shared-web-ui/src → components}/DataTable/keyboard/useGridKeyboard.d.ts +0 -0
  332. /package/dist/types/{shared-web-ui/src → components}/DataTable/layout/LayoutSwitcher.d.ts +0 -0
  333. /package/dist/types/{shared-web-ui/src → components}/DataTable/layout/layouts.d.ts +0 -0
  334. /package/dist/types/{shared-web-ui/src → components}/DataTable/layout/scrollArea.d.ts +0 -0
  335. /package/dist/types/{shared-web-ui/src → components}/DataTable/layout/useFillHeight.d.ts +0 -0
  336. /package/dist/types/{shared-web-ui/src → components}/DataTable/menu/RowMenu.d.ts +0 -0
  337. /package/dist/types/{shared-web-ui/src → components}/DataTable/menu/buildRowMenu.d.ts +0 -0
  338. /package/dist/types/{shared-web-ui/src → components}/DataTable/menu/clipboard.d.ts +0 -0
  339. /package/dist/types/{shared-web-ui/src → components}/DataTable/menu/valueFilter.d.ts +0 -0
  340. /package/dist/types/{shared-web-ui/src → components}/DataTable/motion/useRowMotion.d.ts +0 -0
  341. /package/dist/types/{shared-web-ui/src → components}/DataTable/persistence/adapters.d.ts +0 -0
  342. /package/dist/types/{shared-web-ui/src → components}/DataTable/persistence/reconcile.d.ts +0 -0
  343. /package/dist/types/{shared-web-ui/src → components}/DataTable/persistence/useColumnPersistence.d.ts +0 -0
  344. /package/dist/types/{shared-web-ui/src → components}/DataTable/persistence/useManagePrefs.d.ts +0 -0
  345. /package/dist/types/{shared-web-ui/src → components}/DataTable/persistence/useOrphanPrefs.d.ts +0 -0
  346. /package/dist/types/{shared-web-ui/src → components}/DataTable/pinning.d.ts +0 -0
  347. /package/dist/types/{shared-web-ui/src → components}/DataTable/rows/RowActions.d.ts +0 -0
  348. /package/dist/types/{shared-web-ui/src → components}/DataTable/rows/rowPress.d.ts +0 -0
  349. /package/dist/types/{shared-web-ui/src → components}/DataTable/sharing/Sharing.d.ts +0 -0
  350. /package/dist/types/{shared-web-ui/src → components}/DataTable/split/SplitView.d.ts +0 -0
  351. /package/dist/types/{shared-web-ui/src → components}/DataTable/summary/ManageSummaryCards.d.ts +0 -0
  352. /package/dist/types/{shared-web-ui/src → components}/DataTable/summary/SummaryChart.d.ts +0 -0
  353. /package/dist/types/{shared-web-ui/src → components}/DataTable/summary/SummaryControls.d.ts +0 -0
  354. /package/dist/types/{shared-web-ui/src → components}/DataTable/summary/SummaryImage.d.ts +0 -0
  355. /package/dist/types/{shared-web-ui/src → components}/DataTable/summary/SummarySeeAll.d.ts +0 -0
  356. /package/dist/types/{shared-web-ui/src → components}/DataTable/summary/TableSummary.d.ts +0 -0
  357. /package/dist/types/{shared-web-ui/src → components}/DataTable/summary/summaryCatalogue.d.ts +0 -0
  358. /package/dist/types/{shared-web-ui/src → components}/DataTable/summary/summaryChartData.d.ts +0 -0
  359. /package/dist/types/{shared-web-ui/src → components}/DataTable/summary/summaryModel.d.ts +0 -0
  360. /package/dist/types/{shared-web-ui/src → components}/DataTable/summary/useTableSummary.d.ts +0 -0
  361. /package/dist/types/{shared-web-ui/src → components}/DataTable/ui-local/AutoHeight.d.ts +0 -0
  362. /package/dist/types/{shared-web-ui/src → components}/DataTable/ui-local/DateRangePicker.d.ts +0 -0
  363. /package/dist/types/{shared-web-ui/src → components}/DataTable/ui-local/DragAndDropList/DragAndDropList.d.ts +0 -0
  364. /package/dist/types/{shared-web-ui/src → components}/DataTable/ui-local/DragAndDropList/index.d.ts +0 -0
  365. /package/dist/types/{shared-web-ui/src → components}/DataTable/ui-local/DragAndDropList/types.d.ts +0 -0
  366. /package/dist/types/{shared-web-ui/src → components}/DataTable/ui-local/ReactModal.d.ts +0 -0
  367. /package/dist/types/{shared-web-ui/src → components}/DataTable/ui.d.ts +0 -0
  368. /package/dist/types/{shared-web-ui/src → components}/DataTable/useDataChangeTracker.d.ts +0 -0
  369. /package/dist/types/{shared-web-ui/src → components}/DataTable/vendor/columnOrder.d.ts +0 -0
  370. /package/dist/types/{shared-web-ui/src → components}/DataTable/vendor/diff.d.ts +0 -0
  371. /package/dist/types/{shared-web-ui/src → components}/DataTable/virtual/useVirtualLines.d.ts +0 -0
  372. /package/dist/types/{shared-web-ui/src → components}/DatePicker/useOneMonthPane.d.ts +0 -0
  373. /package/dist/types/{shared-web-ui/src → components}/Dialog/Dialog.d.ts +0 -0
  374. /package/dist/types/{shared-web-ui/src → components}/Dialog/index.d.ts +0 -0
  375. /package/dist/types/{shared-web-ui/src → components}/DropdownMenu/index.d.ts +0 -0
  376. /package/dist/types/{shared-web-ui/src → components}/EditableTable/useRowAnimation.d.ts +0 -0
  377. /package/dist/types/{shared-web-ui/src → components}/Floating/index.d.ts +0 -0
  378. /package/dist/types/{shared-web-ui/src → components}/Floating/layers.d.ts +0 -0
  379. /package/dist/types/{shared-web-ui/src → components}/Floating/scrollLock.d.ts +0 -0
  380. /package/dist/types/{shared-web-ui/src → components}/Floating/useFloatingLayer.d.ts +0 -0
  381. /package/dist/types/{shared-web-ui/src → components}/Popover/index.d.ts +0 -0
  382. /package/dist/types/{shared-web-ui/src → components}/Scroll/ScrollRule.d.ts +0 -0
  383. /package/dist/types/{shared-web-ui/src → components}/Scroll/ScrollStrip.d.ts +0 -0
  384. /package/dist/types/{shared-web-ui/src → components}/Scroll/index.d.ts +0 -0
  385. /package/dist/types/{shared-web-ui/src → components}/Scroll/labels.d.ts +0 -0
  386. /package/dist/types/{shared-web-ui/src → components}/Scroll/scrollActivity.d.ts +0 -0
  387. /package/dist/types/{shared-web-ui/src → components}/Scroll/ui.d.ts +0 -0
  388. /package/dist/types/{shared-web-ui/src → components}/Sidebar/index.d.ts +0 -0
  389. /package/dist/types/{shared-web-ui/src → components}/Skeleton/Skeleton.d.ts +0 -0
  390. /package/dist/types/{shared-web-ui/src → components}/Skeleton/index.d.ts +0 -0
  391. /package/dist/types/{shared-web-ui/src → components}/Suggest/fuseSearch.d.ts +0 -0
  392. /package/dist/types/{shared-web-ui/src → components}/Tabs/Tabs.d.ts +0 -0
  393. /package/dist/types/{shared-web-ui/src → components}/Tabs/index.d.ts +0 -0
  394. /package/dist/types/{shared-web-ui/src → components}/Toast/ToastItem.d.ts +0 -0
  395. /package/dist/types/{shared-web-ui/src → components}/Toast/index.d.ts +0 -0
  396. /package/dist/types/{shared-web-ui/src → components}/Toast/toast.types.d.ts +0 -0
  397. /package/dist/types/{shared-web-ui/src → components}/Tooltip/index.d.ts +0 -0
  398. /package/dist/types/{shared-web-ui/src → components}/UIProvider/UIPortalContext.d.ts +0 -0
  399. /package/dist/types/{shared-web-ui/src → components}/UIProvider/UIThemeContext.d.ts +0 -0
  400. /package/dist/types/{shared-logic/src/ui → core/logic}/checkbox.logic.d.ts +0 -0
  401. /package/dist/types/{shared-logic/src/ui → core/logic}/colorScheme.d.ts +0 -0
  402. /package/dist/types/{shared-logic/src/ui → core/logic}/columnOrder.logic.d.ts +0 -0
  403. /package/dist/types/{shared-logic/src/ui → core/logic}/form.logic.d.ts +0 -0
  404. /package/dist/types/{shared-logic/src/ui → core/logic}/input.logic.d.ts +0 -0
  405. /package/dist/types/{shared-logic/src/ui → core/logic}/popover.logic.d.ts +0 -0
  406. /package/dist/types/{shared-logic/src/ui → core/logic}/radio.logic.d.ts +0 -0
  407. /package/dist/types/{shared-logic/src/ui → core/logic}/switch.logic.d.ts +0 -0
  408. /package/dist/types/{shared-logic/src/ui → core/logic}/timeField.logic.d.ts +0 -0
  409. /package/dist/types/{shared-logic/src/ui → core/logic}/useMergeRefs.d.ts +0 -0
  410. /package/dist/types/{shared-types/src/ui → core/types}/checkbox.types.d.ts +0 -0
  411. /package/dist/types/{shared-types/src/ui → core/types}/chipinput.types.d.ts +0 -0
  412. /package/dist/types/{shared-types/src/ui → core/types}/common.types.d.ts +0 -0
  413. /package/dist/types/{shared-types/src/ui → core/types}/control.types.d.ts +0 -0
  414. /package/dist/types/{shared-types/src/ui → core/types}/datePicker.types.d.ts +0 -0
  415. /package/dist/types/{shared-types/src/ui → core/types}/editableTable.types.d.ts +0 -0
  416. /package/dist/types/{shared-types/src/ui → core/types}/field.types.d.ts +0 -0
  417. /package/dist/types/{shared-types/src/ui → core/types}/fieldWrapper.types.d.ts +0 -0
  418. /package/dist/types/{shared-types/src/ui → core/types}/fields.types.d.ts +0 -0
  419. /package/dist/types/{shared-types/src/ui → core/types}/form.types.d.ts +0 -0
  420. /package/dist/types/{shared-types/src/ui → core/types}/input.types.d.ts +0 -0
  421. /package/dist/types/{shared-types/src/ui → core/types}/keyboard.types.d.ts +0 -0
  422. /package/dist/types/{shared-types/src/ui → core/types}/navigation.types.d.ts +0 -0
  423. /package/dist/types/{shared-types/src/ui → core/types}/radio.types.d.ts +0 -0
  424. /package/dist/types/{shared-types/src/ui → core/types}/select.types.d.ts +0 -0
  425. /package/dist/types/{shared-types/src/ui → core/types}/switch.types.d.ts +0 -0
  426. /package/dist/types/{shared-types/src/ui → core/types}/tooltip.types.d.ts +0 -0
  427. /package/dist/types/{shared-types/src/ui → core/types}/typography.types.d.ts +0 -0
@@ -0,0 +1,1732 @@
1
+ "use client";
2
+ import { C as e, S as t, a as n, c as r, n as i, p as a, w as o } from "./columnValue-K98ElfJc.js";
3
+ import { createContext as s, useContext as c, useMemo as l } from "react";
4
+ import { Fragment as ee, jsx as u, jsxs as te } from "react/jsx-runtime";
5
+ // src/components/UIProvider/UILabelsContext.tsx
6
+ var ne = {
7
+ common: { loading: "Loading" },
8
+ dialog: {
9
+ ok: "OK",
10
+ cancel: "Cancel",
11
+ confirm: "Confirm",
12
+ close: "Close"
13
+ },
14
+ toast: { dismiss: "Dismiss" },
15
+ input: {
16
+ clear: "Clear",
17
+ showPassword: "Show password",
18
+ hidePassword: "Hide password"
19
+ },
20
+ select: {
21
+ clear: "Clear selection",
22
+ options: "Select options",
23
+ search: "Search...",
24
+ selectAll: "Select All",
25
+ deselectAll: "Deselect All",
26
+ noResults: "No results found",
27
+ noOptions: "No options available",
28
+ fixed: "Cannot be unchecked",
29
+ alwaysDisabled: "Always disabled",
30
+ maxReached: "Maximum selection reached",
31
+ dragToReorder: "Drag to reorder",
32
+ fixedPosition: "Fixed position (cannot be moved)"
33
+ },
34
+ suggest: {
35
+ placeholder: "Start typing to search...",
36
+ loading: "Loading...",
37
+ noResults: "No results found",
38
+ suggestions: "Suggestions",
39
+ otherGroup: "Other"
40
+ },
41
+ commandPalette: {
42
+ placeholder: "Search…",
43
+ empty: "No results found.",
44
+ name: "Command palette"
45
+ },
46
+ datePicker: {
47
+ clear: "Clear",
48
+ apply: "Search",
49
+ presetRanges: "Preset ranges",
50
+ previousMonth: "Previous month",
51
+ nextMonth: "Next month",
52
+ presets: {
53
+ today: "Today",
54
+ yesterday: "Yesterday",
55
+ last7: "Last 7 days",
56
+ last30: "Last 30 days",
57
+ thisWeek: "This Week",
58
+ lastWeek: "Last Week",
59
+ thisMonth: "This Month",
60
+ lastMonth: "Last Month",
61
+ thisQuarter: "This Quarter",
62
+ lastQuarter: "Last Quarter",
63
+ thisFY: "This FY",
64
+ lastFY: "Last FY",
65
+ ytd: "Year to date"
66
+ }
67
+ },
68
+ stepper: { completed: "Completed" },
69
+ tooltip: { moreInformation: "More information" },
70
+ colorScheme: { sample: "Label" },
71
+ editableTable: {
72
+ addRow: "Add row",
73
+ copyRow: "Copy row",
74
+ deleteRow: "Delete row"
75
+ },
76
+ sidebar: {
77
+ name: "Main",
78
+ closeNavigation: "Close navigation"
79
+ },
80
+ breadcrumbs: {
81
+ name: "Breadcrumb",
82
+ related: "Related pages",
83
+ hidden: (e) => `${e} hidden`
84
+ },
85
+ image: {
86
+ image: "Image",
87
+ images: "Images",
88
+ add: "Add",
89
+ preparing: "Preparing…",
90
+ remove: "Remove",
91
+ previous: "Previous image",
92
+ next: "Next image"
93
+ }
94
+ };
95
+ function re(e, t) {
96
+ if (!t) return e;
97
+ let n = { ...e };
98
+ for (let r of Object.keys(t)) {
99
+ let i = t[r];
100
+ i !== void 0 && (n[r] = i && typeof i == "object" && !Array.isArray(i) && e[r] && typeof e[r] == "object" ? re(e[r], i) : i);
101
+ }
102
+ return n;
103
+ }
104
+ var d = s(ne), ie = ({ labels: e, children: t }) => {
105
+ let n = c(d), r = l(() => re(n, e), [n, e]);
106
+ return /* @__PURE__ */ u(d.Provider, {
107
+ value: r,
108
+ children: t
109
+ });
110
+ };
111
+ ie.displayName = "LabelsProvider";
112
+ var ae = () => c(d), f = /* @__PURE__ */ new Map();
113
+ function p(e, t) {
114
+ let n = `${e ?? ""}|${JSON.stringify(t)}`, r = f.get(n);
115
+ if (!r) {
116
+ try {
117
+ r = new Intl.NumberFormat(e, t);
118
+ } catch {
119
+ r = new Intl.NumberFormat(void 0, {
120
+ ...t,
121
+ ...t.currency ? {
122
+ style: "decimal",
123
+ currency: void 0
124
+ } : {}
125
+ });
126
+ }
127
+ f.set(n, r);
128
+ }
129
+ return r;
130
+ }
131
+ var m = (e) => e === void 0 ? {} : {
132
+ minimumFractionDigits: e,
133
+ maximumFractionDigits: e
134
+ };
135
+ function h(e = {}) {
136
+ let { locale: n, currency: r } = e, i = e.dateFormat ?? "dd-mm-yyyy";
137
+ return {
138
+ locale: n,
139
+ currency: r,
140
+ dateFormat: i,
141
+ number: (e, t) => p(n, m(t)).format(e),
142
+ money: (e, t = 2) => p(n, r ? {
143
+ style: "currency",
144
+ currency: r,
145
+ ...m(t)
146
+ } : m(t)).format(e),
147
+ percent: (e, t = 0) => p(n, {
148
+ style: "percent",
149
+ ...m(t)
150
+ }).format(e),
151
+ day: (e) => t(o(e), i)
152
+ };
153
+ }
154
+ function oe(e, t) {
155
+ return {
156
+ locale: t.locale ?? e.locale,
157
+ currency: t.currency ?? e.currency,
158
+ dateFormat: t.dateFormat ?? e.dateFormat
159
+ };
160
+ }
161
+ // src/core/logic/tooltip.logic.ts
162
+ function se(e) {
163
+ if (e == null || e === !1 || e === "") return null;
164
+ let t = typeof e == "object" && !Array.isArray(e) && !("$$typeof" in e) && "content" in e ? e : { content: e };
165
+ return t.disabled || t.content === null || t.content === void 0 || t.content === "" ? null : t;
166
+ }
167
+ function ce(e) {
168
+ return e.openedBy !== "pointer" || e.anchorTo === "element" ? !1 : e.anchorTo === "pointer" || e.anchorWidth > e.tooltipWidth;
169
+ }
170
+ var le = {
171
+ top: "bottom",
172
+ bottom: "top",
173
+ left: "right",
174
+ right: "left"
175
+ };
176
+ function ue(e) {
177
+ let t = e === "top" || e === "bottom" ? ["right", "left"] : ["bottom", "top"];
178
+ return [
179
+ e,
180
+ le[e],
181
+ ...t
182
+ ];
183
+ }
184
+ function de(e, { anchor: t, tooltip: n, viewport: r, offset: i, margin: a = 8 }) {
185
+ switch (e) {
186
+ case "top": return t.top - i - n.height >= a;
187
+ case "bottom": return t.top + t.height + i + n.height <= r.height - a;
188
+ case "left": return t.left - i - n.width >= a;
189
+ case "right": return t.left + t.width + i + n.width <= r.width - a;
190
+ default: return !1;
191
+ }
192
+ }
193
+ var fe = (e, t, n) => Math.min(Math.max(e, t), n);
194
+ function pe(e) {
195
+ let { anchor: t, tooltip: n, viewport: r, offset: i, margin: a = 8 } = e, o = ue(e.placement).find((t) => de(t, e)) || e.placement, s, c;
196
+ switch (o) {
197
+ case "bottom":
198
+ s = t.top + t.height + i, c = t.left + t.width / 2 - n.width / 2;
199
+ break;
200
+ case "left":
201
+ s = t.top + t.height / 2 - n.height / 2, c = t.left - i - n.width;
202
+ break;
203
+ case "right":
204
+ s = t.top + t.height / 2 - n.height / 2, c = t.left + t.width + i;
205
+ break;
206
+ default: s = t.top - i - n.height, c = t.left + t.width / 2 - n.width / 2;
207
+ }
208
+ return {
209
+ placement: o,
210
+ left: fe(c, a, Math.max(a, r.width - n.width - a)),
211
+ top: fe(s, a, Math.max(a, r.height - n.height - a))
212
+ };
213
+ }
214
+ // src/components/UIProvider/UIPortalContext.ts
215
+ var me = s(null), he = () => c(me) || (typeof document > "u" ? null : document.body), g = s({}), ge = ({ children: e, locale: t, currency: n, dateFormat: r }) => {
216
+ let i = c(g), a = l(() => oe(i, {
217
+ locale: t,
218
+ currency: n,
219
+ dateFormat: r
220
+ }), [
221
+ i,
222
+ t,
223
+ n,
224
+ r
225
+ ]);
226
+ return /* @__PURE__ */ u(g.Provider, {
227
+ value: a,
228
+ children: e
229
+ });
230
+ };
231
+ ge.displayName = "FormatProvider";
232
+ function _e() {
233
+ let e = c(g);
234
+ return l(() => h(e), [e]);
235
+ }
236
+ // src/components/DataTable/types.ts
237
+ var ve = {
238
+ title: 1,
239
+ subtitle: 1,
240
+ badge: 1,
241
+ details: 4,
242
+ more: 40
243
+ }, ye = {
244
+ title: 1,
245
+ subtitle: 2,
246
+ badge: 1
247
+ }, be = ["top", "bottom"], _ = {
248
+ value: ["number", "numberTrend"],
249
+ ratio: [
250
+ "bar",
251
+ "gauge",
252
+ "ring",
253
+ "donut",
254
+ "pie"
255
+ ],
256
+ breakdown: [
257
+ "donut",
258
+ "pie",
259
+ "bars",
260
+ "stacked",
261
+ "treemap"
262
+ ],
263
+ trend: [
264
+ "columns",
265
+ "line",
266
+ "area",
267
+ "grouped",
268
+ "stacked",
269
+ "calendar"
270
+ ],
271
+ funnel: ["funnel"]
272
+ }, xe = [
273
+ "auto",
274
+ "quarter",
275
+ "half",
276
+ "full"
277
+ ], Se = [
278
+ "top5",
279
+ "top10",
280
+ "least5",
281
+ "least10",
282
+ "all"
283
+ ], Ce = {
284
+ month: [
285
+ 3,
286
+ 6,
287
+ 12,
288
+ 24,
289
+ 36
290
+ ],
291
+ day: [
292
+ 30,
293
+ 91,
294
+ 182,
295
+ 365
296
+ ]
297
+ }, we = {
298
+ month: {
299
+ min: 1,
300
+ max: 60
301
+ },
302
+ day: {
303
+ min: 7,
304
+ max: 400
305
+ }
306
+ }, Te = 6, Ee = 24;
307
+ function v(e) {
308
+ return "logic" in e && "conditions" in e;
309
+ }
310
+ // src/components/DataTable/grouping/groupModel.ts
311
+ var De = 3, Oe = (e) => JSON.stringify(e.map((e) => [e.key, e.value]));
312
+ function ke(e, t) {
313
+ let n = e.grouping, r = typeof n == "object" && n ? n : {};
314
+ return {
315
+ enabled: n !== !1 && t.allowed && (!t.serverMode || t.hasGroupsSource),
316
+ maxDepth: Math.max(1, Math.min(r.maxDepth ?? 3, 6)),
317
+ defaultLevels: r.defaultGroupBy ?? []
318
+ };
319
+ }
320
+ function Ae(e, t) {
321
+ return e.filter((e) => e.authorized !== !1 && je(e, t));
322
+ }
323
+ function je(e, t) {
324
+ return e.groupable ?? (!t && (e.type === "select" || e.type === "boolean"));
325
+ }
326
+ function Me(e, t, n) {
327
+ let r = [];
328
+ for (let n of e ?? []) t.includes(n) && !r.includes(n) && r.push(n);
329
+ return r.slice(0, n);
330
+ }
331
+ function y(t, i) {
332
+ let a = n(t, i);
333
+ if (t.groupValue) {
334
+ let e = t.groupValue(a, i);
335
+ return e === void 0 || e === "" ? null : e;
336
+ }
337
+ let o = a;
338
+ if (t.filterAccessor && (o = t.filterAccessor(o)), o == null || o === "") return null;
339
+ if (Array.isArray(o)) {
340
+ let e = o.filter((e) => e != null && e !== "").map(String).sort();
341
+ return e.length ? e.join("|") : null;
342
+ }
343
+ return t.type === "date" || o instanceof Date ? e(r(t, a, i)) : typeof o == "boolean" || typeof o == "number" ? o : String(o);
344
+ }
345
+ function b(e, n, r, i) {
346
+ if (n == null) return i || r.groupEmpty;
347
+ if (i) return i;
348
+ if (typeof n == "boolean") return n ? r.yes : r.no;
349
+ if (e?.type === "date" && typeof n == "string") return t(n, e.dateFormat ?? "dd-mm-yyyy");
350
+ if (e?.type === "boolean" && (n === "true" || n === "false")) return n === "true" ? r.yes : r.no;
351
+ let a = (t) => e?.filterOptions?.find((e) => String(e.value) === t)?.label ?? t;
352
+ return e?.type === "array" && typeof n == "string" ? n.split("|").map(a).join(", ") : a(String(n));
353
+ }
354
+ var x = typeof Intl < "u" ? new Intl.Collator(void 0, {
355
+ numeric: !0,
356
+ sensitivity: "base"
357
+ }) : null, Ne = (e, t) => x ? x.compare(e, t) : e.localeCompare(t);
358
+ function Pe(e, t) {
359
+ return [...e].sort((e, n) => {
360
+ if (e.value === null && n.value !== null) return 1;
361
+ if (n.value === null && e.value !== null) return -1;
362
+ let r = typeof e.value == "number" && typeof n.value == "number" ? e.value - n.value : Ne(e.label, n.label);
363
+ return t ? -r : r;
364
+ });
365
+ }
366
+ function S(e, t, n, r) {
367
+ if (!t.length) return [];
368
+ let [i, ...a] = t, o = r.parent ?? [], s = /* @__PURE__ */ new Map();
369
+ for (let t of e) {
370
+ let e = y(i, n(t)), r = JSON.stringify(e), a = s.get(r);
371
+ a || s.set(r, a = {
372
+ value: e,
373
+ rows: []
374
+ }), a.rows.push(t);
375
+ }
376
+ return Pe(Array.from(s.values()).map((e) => {
377
+ let t = [...o, {
378
+ key: i.key,
379
+ field: i.field || i.key,
380
+ value: e.value
381
+ }];
382
+ return {
383
+ key: Oe(t),
384
+ path: t,
385
+ depth: o.length,
386
+ columnKey: i.key,
387
+ value: e.value,
388
+ label: b(i, e.value, r.labels),
389
+ count: e.rows.length,
390
+ rows: e.rows,
391
+ children: a.length ? S(e.rows, a, n, {
392
+ ...r,
393
+ parent: t
394
+ }) : void 0
395
+ };
396
+ }), r.sortedDesc?.(i.key) === !0);
397
+ }
398
+ function C(e, t = []) {
399
+ for (let n of e ?? []) t.push(n.key), C(n.children, t);
400
+ return t;
401
+ }
402
+ function Fe(e, t) {
403
+ let n = [], r = (e) => {
404
+ for (let i of e) {
405
+ let e = t.expanded.has(i.key);
406
+ if (n.push({
407
+ kind: "group",
408
+ key: `g:${i.key}`,
409
+ node: i,
410
+ expanded: e
411
+ }), !e) continue;
412
+ let a = i.depth >= t.levels - 1;
413
+ if (!t.loadState) {
414
+ if (!a && i.children) r(i.children);
415
+ else for (let e of i.rows ?? []) n.push({
416
+ kind: "row",
417
+ key: `r:${t.rowKey(e)}`,
418
+ row: e,
419
+ depth: i.depth + 1
420
+ });
421
+ continue;
422
+ }
423
+ let o = t.loadState(i);
424
+ if (!a) {
425
+ i.children ? r(i.children) : n.push({
426
+ kind: "status",
427
+ key: `s:${i.key}`,
428
+ node: i,
429
+ status: o?.status === "error" ? "error" : "loading"
430
+ });
431
+ continue;
432
+ }
433
+ if (!o || o.status !== "done" && !o.rows?.length) {
434
+ n.push({
435
+ kind: "status",
436
+ key: `s:${i.key}`,
437
+ node: i,
438
+ status: o?.status === "error" ? "error" : "loading"
439
+ });
440
+ continue;
441
+ }
442
+ let s = o.rows ?? [];
443
+ for (let e of s) n.push({
444
+ kind: "row",
445
+ key: `r:${t.rowKey(e)}`,
446
+ row: e,
447
+ depth: i.depth + 1
448
+ });
449
+ s.length < i.count && n.push({
450
+ kind: "more",
451
+ key: `m:${i.key}`,
452
+ node: i,
453
+ shown: s.length,
454
+ loading: !!o.loadingMore,
455
+ capped: !!o.capped
456
+ });
457
+ }
458
+ };
459
+ return r(e), n;
460
+ }
461
+ var Ie = (e) => e.kind === "group" ? e.node.depth : e.kind === "row" ? e.depth : e.node.depth + 1;
462
+ function Le(e, t, n) {
463
+ let r = t * n, i = e.slice(r, r + n), a = i[0];
464
+ if (!a || r === 0) return i;
465
+ let o = [];
466
+ for (let t = 0; t < r; t++) {
467
+ let n = e[t];
468
+ n.kind === "group" && (o.length = n.node.depth, o.push(n));
469
+ }
470
+ let s = Ie(a);
471
+ return [...o.slice(0, s).map((e) => ({
472
+ ...e,
473
+ key: `${e.key}:cont`,
474
+ continued: !0
475
+ })), ...i];
476
+ }
477
+ function Re(e, t, n, r) {
478
+ return r === null ? {
479
+ id: e,
480
+ column: t,
481
+ operator: "is_empty",
482
+ value: "",
483
+ enabled: !0
484
+ } : n?.type === "boolean" || typeof r == "boolean" ? {
485
+ id: e,
486
+ column: t,
487
+ operator: r === !0 || r === "true" ? "is_true" : "is_false",
488
+ value: "",
489
+ enabled: !0
490
+ } : n?.type === "array" ? {
491
+ id: e,
492
+ column: t,
493
+ operator: "includes",
494
+ value: r,
495
+ enabled: !0
496
+ } : n?.type === "select" ? {
497
+ id: e,
498
+ column: t,
499
+ operator: "is",
500
+ value: r,
501
+ enabled: !0
502
+ } : {
503
+ id: e,
504
+ column: t,
505
+ operator: "equals",
506
+ value: r,
507
+ enabled: !0
508
+ };
509
+ }
510
+ function ze(e) {
511
+ return [...e.type === "boolean" ? ["is_true", "is_false"] : e.type === "array" ? ["includes"] : e.type === "select" ? ["is"] : ["equals"], "is_empty"];
512
+ }
513
+ function Be(e, t) {
514
+ return e.map((e, n) => Re(`group:${n}:${e.key}`, e.key, t.find((t) => t.key === e.key), e.value));
515
+ }
516
+ function Ve(e, t, n) {
517
+ let r = Be(t, n);
518
+ return r.length ? e.logic === "AND" && !e.negated ? {
519
+ ...e,
520
+ conditions: [...e.conditions, ...r]
521
+ } : {
522
+ id: "group-path",
523
+ logic: "AND",
524
+ conditions: e.conditions.length ? [e, ...r] : r
525
+ } : e;
526
+ }
527
+ // src/components/DataTable/summary/summaryModel.ts
528
+ var He = "summary:", w = (e) => `${He}${e}`, Ue = (e) => e.kind === "breakdown" || e.kind === "trend" || e.kind === "funnel";
529
+ function We(e) {
530
+ return e.kind === "value" ? e.trend ? _.value : ["number"] : e.kind === "trend" ? [
531
+ ...e.period === "day" ? ["calendar"] : [],
532
+ "columns",
533
+ "line",
534
+ "area",
535
+ ...e.split ? ["grouped", "stacked"] : []
536
+ ] : _[e.kind];
537
+ }
538
+ function T(e) {
539
+ let t = We(e), n = "chart" in e ? e.chart : void 0;
540
+ return n && t.includes(n) ? n : t[0];
541
+ }
542
+ function Ge(e) {
543
+ return e.kind === "value" ? [e.value, ...e.sub ? [e.sub.value] : []] : e.kind === "ratio" ? [
544
+ e.value,
545
+ e.total,
546
+ ...e.sub ? [e.sub.value] : []
547
+ ] : [];
548
+ }
549
+ var Ke = 9;
550
+ function qe(e) {
551
+ if (e === "all") return { from: "all" };
552
+ let t = /^(top|least)(\d+)$/.exec(e);
553
+ return {
554
+ from: t[1],
555
+ count: Number(t[2])
556
+ };
557
+ }
558
+ function E(e, t = 9) {
559
+ return e.show ? qe(e.show) : T(e) === "bars" ? { from: "all" } : {
560
+ from: "top",
561
+ count: t
562
+ };
563
+ }
564
+ var Je = (e) => e.label ?? (e.value === null ? "" : String(e.value));
565
+ function Ye(e, t) {
566
+ let n = [...e].sort((e, t) => t.count - e.count || Je(e).localeCompare(Je(t)));
567
+ return t.from === "all" || t.count >= n.length ? {
568
+ buckets: t.from === "least" ? n.reverse() : n,
569
+ others: 0,
570
+ values: e.length
571
+ } : {
572
+ buckets: t.from === "top" ? n.slice(0, t.count) : n.slice(-t.count).reverse(),
573
+ others: (t.from === "top" ? n.slice(t.count) : n.slice(0, -t.count)).reduce((e, t) => e + t.count, 0),
574
+ values: e.length
575
+ };
576
+ }
577
+ var Xe = (e) => !!e.within && T(e) === "treemap", D = (e) => !!e.split && (T(e) === "grouped" || T(e) === "stacked"), Ze = (e) => !!e.trend && T(e) === "numberTrend";
578
+ function Qe(e, t) {
579
+ switch (e.kind) {
580
+ case "trend": return `${e.id}.${e.period === "day" ? "d" : "m"}${e.count}${D(e) ? `.s${e.split}` : ""}`;
581
+ case "funnel": return `${e.id}.f`;
582
+ case "value": return `${e.id}.t${e.trend?.period === "day" ? "d" : "m"}${e.trend?.count ?? 0}`;
583
+ case "breakdown": {
584
+ let n = E(e, t);
585
+ return `${e.id}.${n.from === "all" ? "all" : `${n.from}${n.count}`}${Xe(e) ? `.w${e.within}` : ""}`;
586
+ }
587
+ }
588
+ }
589
+ function $e(e, t) {
590
+ let n = Array.from(new Set(e.flatMap((e) => Ge(e).map((e) => e.id)))), r = (e) => t.find((t) => t.key === e)?.field || e, i = /* @__PURE__ */ new Map();
591
+ for (let t of e) {
592
+ if (t.kind === "ratio" || t.kind === "value" && !Ze(t)) continue;
593
+ let e = Qe(t);
594
+ if (!i.has(e)) switch (t.kind) {
595
+ case "value":
596
+ i.set(e, {
597
+ key: e,
598
+ id: t.id,
599
+ kind: "series",
600
+ value: t.value.id,
601
+ field: r(t.trend.column),
602
+ period: t.trend.period,
603
+ count: t.trend.count
604
+ });
605
+ break;
606
+ case "breakdown":
607
+ i.set(e, {
608
+ key: e,
609
+ id: t.id,
610
+ kind: "breakdown",
611
+ field: r(t.column),
612
+ part: E(t),
613
+ ...Xe(t) ? { within: r(t.within) } : {}
614
+ });
615
+ break;
616
+ case "trend":
617
+ i.set(e, {
618
+ key: e,
619
+ id: t.id,
620
+ kind: "trend",
621
+ field: r(t.column),
622
+ period: t.period,
623
+ count: t.count,
624
+ ...D(t) ? { split: r(t.split) } : {}
625
+ });
626
+ break;
627
+ case "funnel": i.set(e, {
628
+ key: e,
629
+ id: t.id,
630
+ kind: "funnel",
631
+ steps: t.steps.map((e) => e.value.id)
632
+ });
633
+ }
634
+ }
635
+ return {
636
+ values: n,
637
+ cards: Array.from(i.values())
638
+ };
639
+ }
640
+ function et(e, t) {
641
+ if (e.logic !== "AND" || e.negated) return;
642
+ let n = w(t);
643
+ return e.conditions.find((e) => !v(e) && e.id === n && e.enabled);
644
+ }
645
+ function tt(e, t) {
646
+ let n = et(e, t);
647
+ return n ? {
648
+ ...e,
649
+ conditions: e.conditions.filter((e) => e !== n)
650
+ } : e;
651
+ }
652
+ function nt(e, t, n) {
653
+ let r = w(t), i = e.logic === "AND" && !e.negated ? e : {
654
+ id: a(),
655
+ logic: "AND",
656
+ conditions: e.conditions.length ? [e] : []
657
+ }, o = i.conditions.filter((e) => v(e) || e.id !== r);
658
+ return {
659
+ ...i,
660
+ conditions: n ? [...o, n] : o
661
+ };
662
+ }
663
+ function rt(e, t, n) {
664
+ return Re(w(e.id), e.column, t, n);
665
+ }
666
+ function it(e, t) {
667
+ let n = w(e.id);
668
+ if (t.length > 7) return {
669
+ id: n,
670
+ column: e.column,
671
+ operator: "in_range",
672
+ value: {
673
+ from: t,
674
+ to: t
675
+ },
676
+ enabled: !0
677
+ };
678
+ let [r, i] = t.split("-").map(Number), a = new Date(r, i, 0).getDate();
679
+ return {
680
+ id: n,
681
+ column: e.column,
682
+ operator: "in_range",
683
+ value: {
684
+ from: `${t}-01`,
685
+ to: `${t}-${String(a).padStart(2, "0")}`
686
+ },
687
+ enabled: !0
688
+ };
689
+ }
690
+ function at(e, t) {
691
+ let n = e.steps.find((e) => e.id === t);
692
+ return n?.condition ? {
693
+ id: w(e.id),
694
+ ...n.condition,
695
+ enabled: !0
696
+ } : null;
697
+ }
698
+ var O = (e) => e === null ? "" : String(e), ot = "\0others";
699
+ function st(e, t) {
700
+ if (!t) return null;
701
+ if (e.kind === "trend") {
702
+ let n = t.value?.from;
703
+ return typeof n == "string" ? n.slice(0, e.period === "day" ? 10 : 7) : null;
704
+ }
705
+ return e.kind === "funnel" ? e.steps.find((e) => !!e.condition && e.condition.column === t.column && e.condition.operator === t.operator && JSON.stringify(e.condition.value) === JSON.stringify(t.value))?.id ?? null : t.operator === "is_empty" ? "" : t.operator === "is_true" ? "true" : t.operator === "is_false" ? "false" : String(t.value);
706
+ }
707
+ function k(e, t) {
708
+ return e.compute ? e.compute(t) : t.length;
709
+ }
710
+ function A(e, t) {
711
+ let n = /* @__PURE__ */ new Map();
712
+ for (let r of e) {
713
+ let e = y(t, r), i = O(e), a = n.get(i);
714
+ a ? a.count++ : n.set(i, {
715
+ value: e,
716
+ count: 1
717
+ });
718
+ }
719
+ return Array.from(n.values());
720
+ }
721
+ function ct(e, t, n, r) {
722
+ return {
723
+ ...e,
724
+ buckets: e.buckets.map((e) => ({
725
+ ...e,
726
+ children: A(t.filter((t) => O(y(n, t)) === O(e.value)), r)
727
+ }))
728
+ };
729
+ }
730
+ function lt(e, t = /* @__PURE__ */ new Date()) {
731
+ return Array.from({ length: e }, (n, r) => {
732
+ let i = new Date(t.getFullYear(), t.getMonth() - (e - 1 - r), 1);
733
+ return `${i.getFullYear()}-${String(i.getMonth() + 1).padStart(2, "0")}`;
734
+ });
735
+ }
736
+ function ut(e, t = /* @__PURE__ */ new Date()) {
737
+ let n = (e) => String(e).padStart(2, "0");
738
+ return Array.from({ length: e }, (r, i) => {
739
+ let a = new Date(t.getFullYear(), t.getMonth(), t.getDate() - (e - 1 - i));
740
+ return `${a.getFullYear()}-${n(a.getMonth() + 1)}-${n(a.getDate())}`;
741
+ });
742
+ }
743
+ function dt(t, n, r, a) {
744
+ let o = new Map(r.map((e) => [e, []]));
745
+ for (let r of t) {
746
+ let t = e(i(n, r)), s = t === null ? null : a === "month" ? t.slice(0, 7) : t;
747
+ s !== null && o.get(s)?.push(r);
748
+ }
749
+ return o;
750
+ }
751
+ function ft(e, t, n, r, i, a) {
752
+ let o = n === "month" ? lt(r, i) : ut(r, i), s = dt(e, t, o, n);
753
+ return o.map((e) => {
754
+ let t = s.get(e);
755
+ return {
756
+ period: e,
757
+ count: t.length,
758
+ ...a ? { split: A(t, a) } : {}
759
+ };
760
+ });
761
+ }
762
+ function pt(e, t, n, r, i, a) {
763
+ let o = r === "month" ? lt(2 * i, a) : ut(2 * i, a), s = dt(e, n, o, r), c = o.slice(0, i).flatMap((e) => s.get(e));
764
+ return {
765
+ points: o.slice(i).map((e) => ({
766
+ period: e,
767
+ count: k(t, s.get(e))
768
+ })),
769
+ previous: k(t, c)
770
+ };
771
+ }
772
+ function mt(e, t, n, r, i, a) {
773
+ let o = n.buckets.map((e) => ({
774
+ ...e,
775
+ key: O(e.value),
776
+ label: b(t, e.value, r, e.label)
777
+ })), s = E(e, i).from === "least";
778
+ o.sort((e, t) => (s ? e.count - t.count : t.count - e.count) || e.label.localeCompare(t.label));
779
+ let c = o.map((t, n) => ({
780
+ key: t.key,
781
+ value: t.value,
782
+ label: t.label,
783
+ count: t.count,
784
+ slot: e.slots?.[t.key] ?? n + 1,
785
+ ...t.children ? { children: [...t.children].sort((e, t) => t.count - e.count).map((e) => ({
786
+ key: O(e.value),
787
+ label: b(a, e.value, r, e.label),
788
+ count: e.count
789
+ })) } : {}
790
+ }));
791
+ return n.others > 0 && c.push({
792
+ key: ot,
793
+ value: null,
794
+ label: r.others,
795
+ count: n.others,
796
+ slot: "rest",
797
+ others: !0
798
+ }), c;
799
+ }
800
+ var ht = (e, t) => {
801
+ try {
802
+ return new Intl.DateTimeFormat(e, t);
803
+ } catch {
804
+ return new Intl.DateTimeFormat(void 0, t);
805
+ }
806
+ };
807
+ function gt(e, t, n) {
808
+ let r = ht(n, t === "month" ? { month: "short" } : {
809
+ day: "numeric",
810
+ month: "short"
811
+ }), i = ht(n, t === "month" ? {
812
+ month: "long",
813
+ year: "numeric"
814
+ } : { dateStyle: "medium" });
815
+ return e.map(({ period: e, count: t }) => {
816
+ let [n, a, o] = e.split("-").map(Number), s = new Date(n, a - 1, o ?? 1);
817
+ return {
818
+ key: e,
819
+ label: r.format(s),
820
+ fullLabel: i.format(s),
821
+ count: t
822
+ };
823
+ });
824
+ }
825
+ function _t(e, t, n, r) {
826
+ let i = /* @__PURE__ */ new Map(), a = t.map((e) => {
827
+ let t = {};
828
+ for (let a of e.split ?? []) {
829
+ let e = O(a.value);
830
+ t[e] = (t[e] ?? 0) + a.count;
831
+ let o = i.get(e) ?? {
832
+ value: a.value,
833
+ label: b(n, a.value, r, a.label),
834
+ count: 0
835
+ };
836
+ o.count += a.count, i.set(e, o);
837
+ }
838
+ return t;
839
+ });
840
+ return {
841
+ series: Array.from(i.entries()).sort((e, t) => t[1].count - e[1].count || e[1].label.localeCompare(t[1].label)).map(([t, n], r) => ({
842
+ key: t,
843
+ label: n.label,
844
+ slot: e.slots?.[t] ?? r + 1
845
+ })),
846
+ perPeriod: a
847
+ };
848
+ }
849
+ var j = (e, t) => t > 0 ? e / t * 100 : 0;
850
+ function M(e) {
851
+ return e > 0 && e < 1 ? "<1%" : e > 99 && e < 100 ? ">99%" : `${Math.round(e)}%`;
852
+ }
853
+ function vt(e, t) {
854
+ return e.text ? e.text(t) : `${e.label}: ${t}`;
855
+ }
856
+ function yt(e, t) {
857
+ return e.flatMap((e) => e.kind === "value" && e.value !== null ? [`${e.card.title} ${t(e.value)}`] : e.kind === "ratio" && e.value !== null && e.total !== null ? [`${e.card.title} ${M(j(e.value, e.total))}`] : []).join(" · ");
858
+ }
859
+ function bt(e, t, n) {
860
+ let r = {}, i = [];
861
+ for (let a of e) {
862
+ if (a.kind === "value" && a.value !== null && (r[a.card.title] = a.value), a.kind === "ratio" && a.value !== null && a.total !== null && (r[a.card.title] = `${n(a.value)} / ${n(a.total)} (${M(j(a.value, a.total))})`), (a.kind === "value" || a.kind === "ratio") && a.sub && a.sub.value !== null && (r[a.sub.line.label] = a.sub.value), a.kind === "breakdown" && a.buckets && i.push({
863
+ id: a.key,
864
+ title: a.card.title,
865
+ header: [a.column?.header ?? a.card.column, t.summaryCount],
866
+ rows: a.buckets.map((e) => ({
867
+ label: e.label,
868
+ count: e.count
869
+ }))
870
+ }), a.kind === "trend" && a.periods) {
871
+ let e = a.card.period === "day", n = (e ? a.periods.filter((e) => e.count > 0) : a.periods).map((e) => ({
872
+ label: e.fullLabel,
873
+ count: e.count
874
+ }));
875
+ i.push({
876
+ id: a.key,
877
+ title: a.card.title,
878
+ header: [e ? t.summaryDay : t.summaryMonth, t.summaryCount],
879
+ rows: n
880
+ });
881
+ }
882
+ a.kind === "funnel" && a.steps && i.push({
883
+ id: a.key,
884
+ title: a.card.title,
885
+ header: [t.summaryStep, t.summaryCount],
886
+ rows: a.steps.map((e) => ({
887
+ label: e.label,
888
+ count: e.count
889
+ }))
890
+ });
891
+ }
892
+ return {
893
+ items: r,
894
+ ...i.length ? { tables: i } : {}
895
+ };
896
+ }
897
+ // src/components/Charts/palette.ts
898
+ var xt = 10, N = {
899
+ light: {
900
+ 1: "#2a78d6",
901
+ 2: "#eb6834",
902
+ 3: "#1baf7a",
903
+ 4: "#9257d1",
904
+ 5: "#d9a40e",
905
+ 6: "#d6457f",
906
+ 7: "#1592b0",
907
+ 8: "#9c6b3f",
908
+ 9: "#728a1c",
909
+ 10: "#cf3c3c",
910
+ rest: "#b3b7bf",
911
+ positive: "#2e7d4f",
912
+ warning: "#d98a00",
913
+ negative: "#c62828",
914
+ info: "#3b6fd8",
915
+ neutral: "#8a8a99"
916
+ },
917
+ dark: {
918
+ 1: "#3987e5",
919
+ 2: "#d95926",
920
+ 3: "#199e70",
921
+ 4: "#a676e3",
922
+ 5: "#e2b53a",
923
+ 6: "#e5679a",
924
+ 7: "#2fadcb",
925
+ 8: "#b98a5f",
926
+ 9: "#93ab3a",
927
+ 10: "#e66363",
928
+ rest: "#4a4f59",
929
+ positive: "#3fa56b",
930
+ warning: "#e0a030",
931
+ negative: "#ef5350",
932
+ info: "#6b95ea",
933
+ neutral: "#737380"
934
+ }
935
+ }, St = {
936
+ light: {
937
+ lightness: [
938
+ .46,
939
+ .54,
940
+ .62,
941
+ .7,
942
+ .78
943
+ ],
944
+ chroma: [
945
+ .09,
946
+ .13,
947
+ .17
948
+ ],
949
+ hueStep: 8,
950
+ background: "#ffffff"
951
+ },
952
+ dark: {
953
+ lightness: [
954
+ .58,
955
+ .66,
956
+ .74,
957
+ .82,
958
+ .9
959
+ ],
960
+ chroma: [
961
+ .09,
962
+ .13,
963
+ .17
964
+ ],
965
+ hueStep: 8,
966
+ background: "#1f1f1f"
967
+ }
968
+ };
969
+ function Ct(e, t, n) {
970
+ let r = n * Math.PI / 180, i = t * Math.cos(r), a = t * Math.sin(r), o = (e + .3963377774 * i + .2158037573 * a) ** 3, s = (e - .1055613458 * i - .0638541728 * a) ** 3, c = (e - .0894841775 * i - 1.291485548 * a) ** 3;
971
+ return [
972
+ 4.0767416621 * o - 3.3077115913 * s + .2309699292 * c,
973
+ -1.2684380046 * o + 2.6097574011 * s - .3413193965 * c,
974
+ -.0041960863 * o - .7034186147 * s + 1.707614701 * c
975
+ ];
976
+ }
977
+ var wt = (e) => `#${e.map((e) => {
978
+ let t = Math.min(1, Math.max(0, e)), n = t <= .0031308 ? 12.92 * t : 1.055 * t ** (1 / 2.4) - .055;
979
+ return Math.round(n * 255).toString(16).padStart(2, "0");
980
+ }).join("")}`, Tt = (e, t, n) => wt(Ct(e, t, n));
981
+ function P(e) {
982
+ let t = (t) => {
983
+ let n = parseInt(e.slice(t, t + 2), 16) / 255;
984
+ return n <= .04045 ? n / 12.92 : ((n + .055) / 1.055) ** 2.4;
985
+ }, [n, r, i] = [
986
+ t(1),
987
+ t(3),
988
+ t(5)
989
+ ], a = Math.cbrt(.4122214708 * n + .5363325363 * r + .0514459929 * i), o = Math.cbrt(.2119034982 * n + .6806995451 * r + .1073969566 * i), s = Math.cbrt(.0883024619 * n + .2817188376 * r + .6299787005 * i);
990
+ return [
991
+ .2104542553 * a + .793617785 * o - .0040720468 * s,
992
+ 1.9779984951 * a - 2.428592205 * o + .4505937099 * s,
993
+ .0259040371 * a + .7827717662 * o - .808675766 * s
994
+ ];
995
+ }
996
+ var F = (e, t) => Math.hypot(e[0] - t[0], e[1] - t[1], e[2] - t[2]), Et = {};
997
+ function Dt(e) {
998
+ let t = Et[e];
999
+ if (t) return t;
1000
+ let n = St[e], r = [];
1001
+ for (let e of n.lightness) for (let t of n.chroma) for (let i = 0; i < 360; i += n.hueStep) {
1002
+ let n = Ct(e, t, i);
1003
+ if (n.some((e) => e < -5e-4 || e > 1.0005)) continue;
1004
+ let a = wt(n);
1005
+ r.push({
1006
+ hex: a,
1007
+ lab: P(a)
1008
+ });
1009
+ }
1010
+ let i = Array.from({ length: 10 }, (t, n) => N[e][n + 1]), a = [
1011
+ ...i,
1012
+ N[e].rest,
1013
+ n.background
1014
+ ].map(P), o = {
1015
+ colours: i,
1016
+ candidates: r,
1017
+ nearest: r.map((e) => Math.min(...a.map((t) => F(t, e.lab))))
1018
+ };
1019
+ return Et[e] = o, o;
1020
+ }
1021
+ function Ot(e) {
1022
+ let t = -1;
1023
+ for (let n = 0; n < e.candidates.length; n++) (t < 0 || e.nearest[n] > e.nearest[t]) && (t = n);
1024
+ if (t < 0 || e.nearest[t] <= 0) {
1025
+ e.colours.push(e.colours[10 + (e.colours.length - 10) % Math.max(1, e.candidates.length)] ?? e.colours[0]);
1026
+ return;
1027
+ }
1028
+ let n = e.candidates[t];
1029
+ e.colours.push(n.hex);
1030
+ for (let t = 0; t < e.candidates.length; t++) e.nearest[t] = Math.min(e.nearest[t], F(n.lab, e.candidates[t].lab));
1031
+ }
1032
+ function I(e, t) {
1033
+ let n = Dt(t);
1034
+ for (; n.colours.length <= e;) Ot(n);
1035
+ return n.colours[e];
1036
+ }
1037
+ var kt = (e, t) => typeof e == "number" ? I(e - 1, t) : N[t][e];
1038
+ function At(e) {
1039
+ return typeof e != "number" || e <= 10 ? `var(--chart-series-${e})` : `var(--chart-scheme-light, ${I(e - 1, "light")}) var(--chart-scheme-dark, ${I(e - 1, "dark")})`;
1040
+ }
1041
+ var jt = {
1042
+ bands: [{
1043
+ below: 20,
1044
+ color: "negative"
1045
+ }, {
1046
+ below: 80,
1047
+ color: "warning"
1048
+ }],
1049
+ above: "positive"
1050
+ }, Mt = (e) => typeof e == "object" && !!e;
1051
+ function Nt(e, t) {
1052
+ return Mt(e) ? e.bands.find((e) => t < e.below)?.color ?? e.above : e;
1053
+ }
1054
+ var Pt = (e) => typeof e == "string" && e.startsWith("#"), Ft = (e) => Pt(e) ? e : At(e), L = (e, t) => Pt(e) ? e : kt(e, t), It = {
1055
+ light: [
1056
+ "#e8eff9",
1057
+ "#bcd3f2",
1058
+ "#7faee9",
1059
+ "#4081d2",
1060
+ "#155aa7"
1061
+ ],
1062
+ dark: [
1063
+ "#242930",
1064
+ "#2c4462",
1065
+ "#39659b",
1066
+ "#4f8bd6",
1067
+ "#82baff"
1068
+ ]
1069
+ }, Lt = (e) => `var(--chart-heat-${Math.max(0, Math.min(It.light.length - 1, e))})`, R = {
1070
+ dark: "#0f0f0f",
1071
+ light: "#ffffff"
1072
+ };
1073
+ function Rt(e) {
1074
+ let t = (t) => {
1075
+ let n = parseInt(e.slice(t, t + 2), 16) / 255;
1076
+ return n <= .04045 ? n / 12.92 : ((n + .055) / 1.055) ** 2.4;
1077
+ };
1078
+ return .2126 * t(1) + .7152 * t(3) + .0722 * t(5);
1079
+ }
1080
+ function z(e) {
1081
+ let t = Rt(e);
1082
+ return (t + .05) / .05 > 1.05 / (t + .05) ? R.dark : R.light;
1083
+ }
1084
+ function zt(e) {
1085
+ return `var(--chart-scheme-light, ${z(L(e, "light"))}) var(--chart-scheme-dark, ${z(L(e, "dark"))})`;
1086
+ }
1087
+ // src/components/Charts/labels.ts
1088
+ var Bt = {
1089
+ legend: "Legend",
1090
+ total: "Total",
1091
+ empty: "No records",
1092
+ count: "Count",
1093
+ rest: "Rest",
1094
+ kinds: {
1095
+ donut: "Donut",
1096
+ pie: "Pie",
1097
+ bars: "Bars",
1098
+ stacked: "Stacked",
1099
+ treemap: "Treemap",
1100
+ columns: "Columns",
1101
+ line: "Line",
1102
+ area: "Area",
1103
+ grouped: "Grouped",
1104
+ calendar: "Calendar",
1105
+ bar: "Bar",
1106
+ gauge: "Gauge",
1107
+ ring: "Ring",
1108
+ funnel: "Funnel",
1109
+ number: "Number",
1110
+ numberTrend: "Trend"
1111
+ },
1112
+ chartChoice: "Chart",
1113
+ imageMenu: "Share or save the image",
1114
+ imageDownload: "Download",
1115
+ imageCopy: "Copy",
1116
+ imageShare: "Share",
1117
+ imageCopied: "Copied",
1118
+ imageFailed: "The image could not be made",
1119
+ vsPrevious: "vs the previous period",
1120
+ deltaUp: "up",
1121
+ deltaDown: "down",
1122
+ deltaSame: "no change",
1123
+ deltaNew: "new",
1124
+ ofTotal: (e, t) => `${e} of ${t}`,
1125
+ shareOf: (e, t) => `${e} of ${t}`,
1126
+ moreValues: (e) => `${e} more`,
1127
+ less: "Less",
1128
+ more: "More",
1129
+ busiest: "Busiest day",
1130
+ funnelOfFirst: "Of the first step",
1131
+ funnelDrop: "Drop from the step before"
1132
+ }, B = (e, t = !1) => `chart-root ${e}${t ? " chart-compact" : ""}`;
1133
+ function Vt({ title: e, children: t }) {
1134
+ return e == null || e === "" ? /* @__PURE__ */ u(ee, { children: t }) : /* @__PURE__ */ te("figure", {
1135
+ className: B("chart-titled"),
1136
+ children: [/* @__PURE__ */ u("figcaption", {
1137
+ className: "chart-title",
1138
+ children: e
1139
+ }), t]
1140
+ });
1141
+ }
1142
+ function V(e) {
1143
+ return e > 0 && e < .1 ? "<0.1%" : e < 100 && e > 99.9 ? ">99.9%" : `${e.toFixed(1)}%`;
1144
+ }
1145
+ var Ht = (e) => e === 0 ? V(0) : `${e > 0 ? "−" : "+"}${V(Math.abs(e))}`;
1146
+ function Ut({ locale: e, format: t, labels: n }) {
1147
+ let r = _e().locale, i = e ?? r, a = l(() => {
1148
+ if (t) return t;
1149
+ let e;
1150
+ try {
1151
+ e = new Intl.NumberFormat(i);
1152
+ } catch {
1153
+ e = new Intl.NumberFormat();
1154
+ }
1155
+ return (t) => e.format(t);
1156
+ }, [i, t]), o = ae().charts;
1157
+ return {
1158
+ nf: a,
1159
+ L: l(() => ({
1160
+ ...Bt,
1161
+ ...o,
1162
+ ...n
1163
+ }), [o, n])
1164
+ };
1165
+ }
1166
+ function Wt({ ariaLabel: e, text: t, compact: n }) {
1167
+ return /* @__PURE__ */ u("div", {
1168
+ className: B("chart-empty", n),
1169
+ role: "img",
1170
+ "aria-label": `${e}: ${t}`,
1171
+ children: t
1172
+ });
1173
+ }
1174
+ function Gt(e, t, n, r = {}) {
1175
+ if (n <= 0) return null;
1176
+ let i = {
1177
+ ArrowLeft: -1,
1178
+ ArrowRight: 1,
1179
+ ArrowUp: -1,
1180
+ ArrowDown: 1,
1181
+ ...r
1182
+ };
1183
+ return e === "Home" ? 0 : e === "End" ? n - 1 : !(e in i) || i[e] === 0 ? null : t === null ? i[e] > 0 ? 0 : n - 1 : Math.max(0, Math.min(n - 1, t + i[e]));
1184
+ }
1185
+ function Kt(e, t, n, r = {}, i = () => !0) {
1186
+ let a = Gt(e, t, n, r);
1187
+ if (a === null || i(a)) return a;
1188
+ let o = e === "Home" ? !0 : e === "End" ? !1 : t === null ? a === 0 : a > t;
1189
+ for (let e = a; e >= 0 && e < n; e += o ? 1 : -1) if (i(e)) return e;
1190
+ return t !== null && i(t) ? t : null;
1191
+ }
1192
+ function qt({ text: e }) {
1193
+ return /* @__PURE__ */ u("span", {
1194
+ className: "chart-sr-only",
1195
+ "aria-live": "polite",
1196
+ children: e
1197
+ });
1198
+ }
1199
+ // src/components/Charts/chartData.ts
1200
+ var H = (e) => (e?.length ?? 0) > 0;
1201
+ function U(e) {
1202
+ switch (e.type) {
1203
+ case "values": return H(e.series) ? ["bars"] : [
1204
+ "donut",
1205
+ "pie",
1206
+ "bars",
1207
+ "stacked",
1208
+ "treemap"
1209
+ ];
1210
+ case "time": return [...e.period === "day" ? ["calendar"] : [], ...H(e.series) ? [
1211
+ "grouped",
1212
+ "stacked",
1213
+ "line",
1214
+ "area"
1215
+ ] : [
1216
+ "columns",
1217
+ "line",
1218
+ "area"
1219
+ ]];
1220
+ case "part": return [
1221
+ "bar",
1222
+ "gauge",
1223
+ "ring",
1224
+ "donut",
1225
+ "pie"
1226
+ ];
1227
+ case "steps": return ["funnel", "bars"];
1228
+ case "number": return e.points?.length ? ["numberTrend", "number"] : ["number"];
1229
+ }
1230
+ }
1231
+ function Jt(e, t, n) {
1232
+ let r = U(e).filter((e) => !n || n.includes(e)), i = r.length ? r : U(e);
1233
+ return t && i.includes(t) ? t : i[0];
1234
+ }
1235
+ var W = (e) => [{
1236
+ key: "n",
1237
+ label: e,
1238
+ slot: 1
1239
+ }], Yt = (e, t) => ({
1240
+ ...e.key === void 0 ? {} : { key: e.key },
1241
+ label: e.label,
1242
+ ...e.fullLabel === void 0 ? {} : { fullLabel: e.fullLabel },
1243
+ values: t ? e.counts ?? {} : { n: e.count ?? 0 },
1244
+ ...e.selectable === !1 ? { selectable: !1 } : {},
1245
+ ...e.href ? { href: e.href } : {},
1246
+ ...e.slot === void 0 ? {} : { slot: e.slot }
1247
+ }), G = (e, t) => e.slot ?? t + 1;
1248
+ function Xt(e, t, n, r) {
1249
+ let i = Jt(e, t, r);
1250
+ switch (e.type) {
1251
+ case "values": {
1252
+ let t = H(e.series) ? e.series : W(n.count);
1253
+ if (i === "bars") return {
1254
+ kind: "bars",
1255
+ series: t,
1256
+ data: e.values.map((t) => Yt(t, H(e.series)))
1257
+ };
1258
+ if (i === "treemap") return {
1259
+ kind: "treemap",
1260
+ nodes: e.values.map((e, t) => ({
1261
+ key: e.key ?? e.label,
1262
+ label: e.label,
1263
+ value: e.count ?? 0,
1264
+ slot: G(e, t),
1265
+ ...e.selectable === !1 ? { selectable: !1 } : {},
1266
+ ...e.children ? { children: e.children.map((n) => ({
1267
+ key: n.key ?? n.label,
1268
+ label: n.label,
1269
+ value: n.count,
1270
+ slot: G(e, t)
1271
+ })) } : {}
1272
+ }))
1273
+ };
1274
+ let r = e.values.map((e, t) => ({
1275
+ key: e.key ?? e.label,
1276
+ label: e.label,
1277
+ value: e.count ?? 0,
1278
+ slot: G(e, t),
1279
+ ...e.selectable === !1 ? { selectable: !1 } : {}
1280
+ }));
1281
+ return {
1282
+ kind: i === "stacked" ? "stacked" : i === "pie" ? "pie" : "donut",
1283
+ slices: r
1284
+ };
1285
+ }
1286
+ case "time": {
1287
+ if (i === "calendar") return {
1288
+ kind: "calendar",
1289
+ days: e.points.map((e) => ({
1290
+ day: e.key,
1291
+ count: e.count ?? Object.values(e.counts ?? {}).reduce((e, t) => e + t, 0)
1292
+ }))
1293
+ };
1294
+ let t = H(e.series), r = t ? e.series : W(n.count), a = e.points.map((e) => Yt(e, t));
1295
+ if (i === "line" || i === "area") return {
1296
+ kind: "line",
1297
+ area: i === "area",
1298
+ series: r,
1299
+ data: a
1300
+ };
1301
+ let o = t ? i === "grouped" ? "grouped" : "stacked" : void 0;
1302
+ return {
1303
+ kind: "columns",
1304
+ series: r,
1305
+ data: a,
1306
+ ...o ? { mode: o } : {}
1307
+ };
1308
+ }
1309
+ case "part": {
1310
+ let t = {
1311
+ label: e.label,
1312
+ value: e.value,
1313
+ total: e.total,
1314
+ ...e.color === void 0 ? {} : { color: e.color }
1315
+ };
1316
+ if (i === "gauge" || i === "ring") return {
1317
+ kind: "gauge",
1318
+ variant: i === "ring" ? "ring" : "half",
1319
+ rows: [t]
1320
+ };
1321
+ if (i === "donut" || i === "pie") {
1322
+ let t = e.total > 0 ? e.value / e.total * 100 : 0;
1323
+ return {
1324
+ kind: i,
1325
+ slices: [{
1326
+ key: "value",
1327
+ label: e.label,
1328
+ value: e.value,
1329
+ slot: Nt(e.color ?? 1, t)
1330
+ }, {
1331
+ key: "rest",
1332
+ label: n.rest,
1333
+ value: Math.max(0, e.total - e.value),
1334
+ slot: "rest",
1335
+ selectable: !1
1336
+ }]
1337
+ };
1338
+ }
1339
+ return {
1340
+ kind: "progress",
1341
+ rows: [t]
1342
+ };
1343
+ }
1344
+ case "steps": return i === "bars" ? {
1345
+ kind: "bars",
1346
+ series: W(n.count),
1347
+ data: e.steps.map((e) => ({
1348
+ key: e.key,
1349
+ label: e.label,
1350
+ values: { n: e.count },
1351
+ ...e.slot === void 0 ? {} : { slot: e.slot },
1352
+ ...e.selectable === !1 ? { selectable: !1 } : {}
1353
+ }))
1354
+ } : {
1355
+ kind: "funnel",
1356
+ steps: e.steps.map((e) => ({
1357
+ key: e.key,
1358
+ label: e.label,
1359
+ value: e.count,
1360
+ slot: e.slot ?? 1,
1361
+ ...e.selectable === !1 ? { selectable: !1 } : {}
1362
+ }))
1363
+ };
1364
+ case "number": return {
1365
+ kind: "number",
1366
+ value: e.value,
1367
+ ...i === "numberTrend" && e.points ? {
1368
+ points: e.points,
1369
+ ...e.previous === void 0 ? {} : { previous: e.previous },
1370
+ ...e.good ? { good: e.good } : {}
1371
+ } : {}
1372
+ };
1373
+ }
1374
+ }
1375
+ // src/components/Charts/geometry.ts
1376
+ var Zt = (e) => e.key ?? e.label, Qt = (e, t) => t.reduce((t, n) => t + (e.values[n.key] ?? 0), 0), $t = 2 * Math.PI * 40, en = 1.2;
1377
+ function tn(e) {
1378
+ let t = e.reduce((e, t) => e + t.value, 0);
1379
+ if (!t) return [];
1380
+ let n = e.filter((e) => e.value > 0).length > 1 ? en : 0, r = 0, i = [];
1381
+ for (let a of e) {
1382
+ let e = a.value / t * $t;
1383
+ a.value > 0 && i.push({
1384
+ slice: a,
1385
+ start: r,
1386
+ length: Math.max(.01, e - n)
1387
+ }), r += e;
1388
+ }
1389
+ return i;
1390
+ }
1391
+ var K = (e, t) => t ? e / t * 100 : 0;
1392
+ function nn(e) {
1393
+ if (e <= 5) return 5;
1394
+ let t = 10 ** Math.floor(Math.log10(e)), n = e / t;
1395
+ return (n <= 1 ? 1 : n <= 2 ? 2 : n <= 5 ? 5 : 10) * t;
1396
+ }
1397
+ function rn(e) {
1398
+ let t = nn(Math.max(1, ...e));
1399
+ return {
1400
+ max: t,
1401
+ ticks: [
1402
+ 0,
1403
+ t / 2,
1404
+ t
1405
+ ]
1406
+ };
1407
+ }
1408
+ var an = (e) => Math.max(1, ...e), on = (e, t) => t <= 12 || e % Math.ceil(t / 12) === 0, sn = (e, t, n = "stacked") => n === "grouped" ? e.flatMap((e) => t.map((t) => e.values[t.key] ?? 0)) : e.map((e) => Qt(e, t));
1409
+ function cn(e, t, n = 2) {
1410
+ if (e <= 0) return [];
1411
+ let r = Math.max(0, (t - n * (e - 1)) / e);
1412
+ return Array.from({ length: e }, (e, t) => ({
1413
+ x: t * (r + n),
1414
+ width: r
1415
+ }));
1416
+ }
1417
+ var q = (e, t, n) => t <= 1 ? n / 2 : e / (t - 1) * n;
1418
+ function ln(e, t, n, r) {
1419
+ return e.map((i, a) => ({
1420
+ x: q(a, e.length, t),
1421
+ y: n - Math.max(0, i) / (r || 1) * n
1422
+ }));
1423
+ }
1424
+ var J = (e) => Math.round(e * 100) / 100, un = (e) => e.map((e, t) => `${t ? "L" : "M"}${J(e.x)} ${J(e.y)}`).join(" ");
1425
+ function dn(e, t) {
1426
+ return e.length ? `${un(e)} L${J(e[e.length - 1].x)} ${J(t)} L${J(e[0].x)} ${J(t)} Z` : "";
1427
+ }
1428
+ function fn(e, t, n) {
1429
+ return n <= 1 || t <= 0 ? 0 : Math.max(0, Math.min(n - 1, Math.round(e / t * (n - 1))));
1430
+ }
1431
+ function pn(e, t = 6) {
1432
+ if (e <= 0) return [];
1433
+ if (e <= t) return Array.from({ length: e }, (e, t) => t);
1434
+ let n = (e - 1) / (t - 1);
1435
+ return Array.from(new Set(Array.from({ length: t }, (e, t) => Math.round(t * n))));
1436
+ }
1437
+ function mn(e, t, n) {
1438
+ if (!e.length) return [];
1439
+ let r = Math.min(...e), i = Math.max(...e);
1440
+ return e.map((a, o) => ({
1441
+ x: q(o, e.length, t),
1442
+ y: i === r ? n / 2 : n - (a - r) / (i - r) * n
1443
+ }));
1444
+ }
1445
+ function hn(e, t) {
1446
+ let n = e - t;
1447
+ return {
1448
+ direction: n > 0 ? "up" : n < 0 ? "down" : "same",
1449
+ diff: n,
1450
+ percent: t ? n / t * 100 : n ? null : 0
1451
+ };
1452
+ }
1453
+ function gn(e, t) {
1454
+ return e === "same" || t === "none" ? "neutral" : e === t ? "positive" : "negative";
1455
+ }
1456
+ function Y(e, t, n, r) {
1457
+ return {
1458
+ x: e + n * Math.sin(r),
1459
+ y: t - n * Math.cos(r)
1460
+ };
1461
+ }
1462
+ var X = (e) => Math.round(e * 1e4) / 1e4;
1463
+ function _n(e, t, n, r, i) {
1464
+ if (i - r >= 2 * Math.PI - 1e-9) {
1465
+ let i = Y(e, t, n, r + Math.PI), a = Y(e, t, n, r + 2 * Math.PI - 1e-4), o = Y(e, t, n, r);
1466
+ return `M${X(o.x)} ${X(o.y)} A${n} ${n} 0 0 1 ${X(i.x)} ${X(i.y)} A${n} ${n} 0 0 1 ${X(a.x)} ${X(a.y)}`;
1467
+ }
1468
+ let a = Y(e, t, n, r), o = Y(e, t, n, i);
1469
+ return `M${X(a.x)} ${X(a.y)} A${n} ${n} 0 ${+(i - r > Math.PI)} 1 ${X(o.x)} ${X(o.y)}`;
1470
+ }
1471
+ function vn(e, t, n, r, i) {
1472
+ if (i - r >= 2 * Math.PI - 1e-9) return `M${X(e)} ${X(t - n)} A${n} ${n} 0 1 1 ${X(e)} ${X(t + n)} A${n} ${n} 0 1 1 ${X(e)} ${X(t - n)} Z`;
1473
+ let a = Y(e, t, n, r), o = Y(e, t, n, i);
1474
+ return `M${X(e)} ${X(t)} L${X(a.x)} ${X(a.y)} A${n} ${n} 0 ${+(i - r > Math.PI)} 1 ${X(o.x)} ${X(o.y)} Z`;
1475
+ }
1476
+ var yn = 864e5;
1477
+ function Z(e) {
1478
+ let [t, n, r] = e.split("-").map(Number);
1479
+ return Date.UTC(t, n - 1, r);
1480
+ }
1481
+ var bn = (e) => new Date(e).toISOString().slice(0, 10), xn = (e) => (new Date(Z(e)).getUTCDay() + 6) % 7;
1482
+ function Sn(e, t) {
1483
+ let n = Z(e), r = Math.min(371, Math.max(0, Math.round((Z(t) - n) / yn) + 1));
1484
+ return Array.from({ length: r }, (e, t) => bn(n + t * yn));
1485
+ }
1486
+ var Cn = 371;
1487
+ function wn(e, t) {
1488
+ return e <= 0 || t <= 0 ? 0 : Math.min(4, Math.max(1, Math.ceil(e / t * 4)));
1489
+ }
1490
+ function Tn(e) {
1491
+ if (!e.length) return {
1492
+ cells: [],
1493
+ weeks: 0,
1494
+ months: [],
1495
+ max: 0,
1496
+ total: 0
1497
+ };
1498
+ let t = [...e].sort((e, t) => e.day.localeCompare(t.day)), n = new Map(t.map((e) => [e.day, e.count])), r = Sn(t[0].day, t[t.length - 1].day), i = xn(r[0]), a = Math.max(0, ...r.map((e) => n.get(e) ?? 0)), o = r.map((e, t) => {
1499
+ let r = n.get(e) ?? 0;
1500
+ return {
1501
+ day: e,
1502
+ count: r,
1503
+ week: Math.floor((t + i) / 7),
1504
+ weekday: (t + i) % 7,
1505
+ level: wn(r, a)
1506
+ };
1507
+ }), s = o.filter((e) => e.day.endsWith("-01")).map((e) => ({
1508
+ month: e.day.slice(0, 7),
1509
+ week: e.week
1510
+ }));
1511
+ return !r[0].endsWith("-01") && (s[0]?.week ?? Infinity) >= 2 && s.unshift({
1512
+ month: r[0].slice(0, 7),
1513
+ week: 0
1514
+ }), {
1515
+ cells: o,
1516
+ weeks: o[o.length - 1].week + 1,
1517
+ months: s,
1518
+ max: a,
1519
+ total: o.reduce((e, t) => e + t.count, 0)
1520
+ };
1521
+ }
1522
+ var Q = {
1523
+ min: 4,
1524
+ max: 16,
1525
+ compactMax: 12
1526
+ }, En = 8;
1527
+ function Dn(e, t, n = Q.max, r = 1) {
1528
+ let i = Math.floor(n * r), a = En * r;
1529
+ if (!e || t <= 0) return {
1530
+ cell: i,
1531
+ gap: 2,
1532
+ weekdays: !0
1533
+ };
1534
+ let o = (e) => {
1535
+ let n = 2, r = Math.floor((e - n * (t - 1)) / t);
1536
+ return r < a && (n = 1, r = Math.floor((e - n * (t - 1)) / t)), {
1537
+ cell: r,
1538
+ gap: n
1539
+ };
1540
+ }, s = o(e - On(r));
1541
+ if (s.cell >= a) return {
1542
+ cell: Math.min(i, s.cell),
1543
+ gap: s.gap,
1544
+ weekdays: !0
1545
+ };
1546
+ let c = o(e);
1547
+ return {
1548
+ cell: Math.max(Q.min, Math.min(i, c.cell)),
1549
+ gap: c.gap,
1550
+ weekdays: !1
1551
+ };
1552
+ }
1553
+ var On = (e = 1) => Math.round(28 * e), kn = (e = 1) => 26 * e;
1554
+ function An(e, t, n = 1) {
1555
+ let r = [];
1556
+ for (let i of e) {
1557
+ let e = r[r.length - 1];
1558
+ (!e || (i.week - e.week) * t >= kn(n)) && r.push(i);
1559
+ }
1560
+ return r;
1561
+ }
1562
+ function $(e, t) {
1563
+ let n = e.map(() => ({
1564
+ x: t.x,
1565
+ y: t.y,
1566
+ w: 0,
1567
+ h: 0
1568
+ })), r = e.reduce((e, t) => e + Math.max(0, t), 0);
1569
+ if (r <= 0 || t.w <= 0 || t.h <= 0) return n;
1570
+ let i = t.w * t.h / r, a = e.map((e, t) => ({
1571
+ i: t,
1572
+ a: Math.max(0, e) * i
1573
+ })).filter((e) => e.a > 0), o = { ...t }, s = (e, t) => {
1574
+ let n = e.reduce((e, t) => e + t, 0), r = Math.max(...e), i = Math.min(...e);
1575
+ return Math.max(t * t * r / (n * n), n * n / (t * t * i));
1576
+ }, c = (e) => {
1577
+ let t = e.reduce((e, t) => e + t.a, 0);
1578
+ if (o.w >= o.h) {
1579
+ let r = t / o.h, i = o.y;
1580
+ for (let t of e) {
1581
+ let e = t.a / r;
1582
+ n[t.i] = {
1583
+ x: o.x,
1584
+ y: i,
1585
+ w: r,
1586
+ h: e
1587
+ }, i += e;
1588
+ }
1589
+ o = {
1590
+ x: o.x + r,
1591
+ y: o.y,
1592
+ w: o.w - r,
1593
+ h: o.h
1594
+ };
1595
+ } else {
1596
+ let r = t / o.w, i = o.x;
1597
+ for (let t of e) {
1598
+ let e = t.a / r;
1599
+ n[t.i] = {
1600
+ x: i,
1601
+ y: o.y,
1602
+ w: e,
1603
+ h: r
1604
+ }, i += e;
1605
+ }
1606
+ o = {
1607
+ x: o.x,
1608
+ y: o.y + r,
1609
+ w: o.w,
1610
+ h: o.h - r
1611
+ };
1612
+ }
1613
+ }, l = [];
1614
+ for (let e of a) {
1615
+ let t = Math.min(o.w, o.h);
1616
+ !l.length || s([...l.map((e) => e.a), e.a], t) <= s(l.map((e) => e.a), t) ? l.push(e) : (c(l), l = [e]);
1617
+ }
1618
+ return l.length && c(l), n;
1619
+ }
1620
+ var jn = {
1621
+ w: 44,
1622
+ h: 28
1623
+ };
1624
+ function Mn(e, t, n, r = 1) {
1625
+ let i = {
1626
+ w: jn.w * r,
1627
+ h: jn.h * r
1628
+ }, a = 16 * r, o = (e) => e.w >= i.w && e.h >= i.h, s = [], c = $(e.map((e) => e.value), {
1629
+ x: 0,
1630
+ y: 0,
1631
+ w: t,
1632
+ h: n
1633
+ });
1634
+ return e.forEach((e, t) => {
1635
+ let n = c[t];
1636
+ if (n.w <= 0 || n.h <= 0) return;
1637
+ let r = (e.children ?? []).filter((e) => e.value > 0);
1638
+ if (!r.length) {
1639
+ s.push({
1640
+ node: e,
1641
+ parent: null,
1642
+ rect: n,
1643
+ label: o(n)
1644
+ });
1645
+ return;
1646
+ }
1647
+ let l = n.h >= a + i.h && n.w >= i.w ? a : 0;
1648
+ s.push({
1649
+ node: e,
1650
+ parent: null,
1651
+ rect: n,
1652
+ label: l > 0
1653
+ });
1654
+ let ee = {
1655
+ x: n.x + 2,
1656
+ y: n.y + l + 2,
1657
+ w: Math.max(0, n.w - 4),
1658
+ h: Math.max(0, n.h - l - 4)
1659
+ };
1660
+ $(r.map((e) => e.value), ee).forEach((t, n) => {
1661
+ t.w > 0 && t.h > 0 && s.push({
1662
+ node: r[n],
1663
+ parent: e,
1664
+ rect: t,
1665
+ label: o(t)
1666
+ });
1667
+ });
1668
+ }), s;
1669
+ }
1670
+ var Nn = (e) => Math.max(.55, 1 - e * .09);
1671
+ function Pn(e) {
1672
+ let t = Math.max(0, ...e.map((e) => e.value)), n = e[0]?.value ?? 0;
1673
+ return e.map((r, i) => {
1674
+ let a = i > 0 ? e[i - 1].value : 0;
1675
+ return {
1676
+ step: r,
1677
+ width: t > 0 ? Math.max(0, r.value) / t : 0,
1678
+ ofFirst: K(r.value, n),
1679
+ drop: i > 0 && a > 0 ? (a - r.value) / a * 100 : null
1680
+ };
1681
+ });
1682
+ }
1683
+ var Fn = {
1684
+ half: {
1685
+ width: 120,
1686
+ height: 68,
1687
+ cx: 60,
1688
+ cy: 62,
1689
+ r: 50,
1690
+ from: -Math.PI / 2,
1691
+ to: Math.PI / 2
1692
+ },
1693
+ ring: {
1694
+ width: 100,
1695
+ height: 100,
1696
+ cx: 50,
1697
+ cy: 50,
1698
+ r: 40,
1699
+ from: 0,
1700
+ to: 2 * Math.PI
1701
+ }
1702
+ };
1703
+ function In(e, t) {
1704
+ let n = Fn[e], r = Math.max(0, Math.min(100, t)) / 100;
1705
+ return {
1706
+ a0: n.from,
1707
+ a1: n.to,
1708
+ end: n.from + (n.to - n.from) * r
1709
+ };
1710
+ }
1711
+ var Ln = .62, Rn = 8;
1712
+ function zn(e, t = 48, n = 50) {
1713
+ let r = e.reduce((e, t) => e + t.value, 0);
1714
+ if (!r) return [];
1715
+ let i = 0, a = [];
1716
+ for (let o of e) {
1717
+ if (o.value <= 0) continue;
1718
+ let e = K(o.value, r), s = i + o.value / r * 2 * Math.PI, c = e < 8 ? null : e >= 100 ? {
1719
+ x: n,
1720
+ y: n
1721
+ } : Y(n, n, t * Ln, (i + s) / 2);
1722
+ a.push({
1723
+ slice: o,
1724
+ a0: i,
1725
+ a1: s,
1726
+ share: e,
1727
+ label: c
1728
+ }), i = s;
1729
+ }
1730
+ return a;
1731
+ }
1732
+ export { St as $, S as $t, zn as A, h as An, at as At, Jt as B, _t as Bt, tn as C, _e as Cn, E as Ct, un as D, se as Dn, ft as Dt, cn as E, pe as En, k as Et, mn as F, M as Ft, qt as G, w as Gt, W as H, vt as Ht, $ as I, gt as It, V as J, it as Jt, Vt as K, bt as Kt, Mn as L, st as Lt, Y as M, ie as Mn, yt as Mt, K as N, ae as Nn, et as Nt, ln as O, ue as On, A as Ot, on as P, Ye as Pt, Bt as Q, C as Qt, hn as R, nt as Rt, gn as S, ge as Sn, rt as St, In as T, he as Tn, T as Tt, Xt as U, Qe as Ut, U as V, D as Vt, Wt as W, We as Wt, Kt as X, tt as Xt, Ht as Y, ct as Yt, Ut as Z, De as Zt, sn as _, Ce as _n, kt as _t, Rn as a, je as an, I as at, Z as b, xe as bn, He as bt, pn as c, ke as cn, Lt as ct, Tn as d, ve as dn, Mt as dt, Fe as en, It as et, An as f, ye as fn, Nt as ft, rn as g, be as gn, At as gt, Nn as h, Se as hn, Tt as ht, Fn as i, Me as in, xt as it, q as j, ne as jn, Ue as jt, fn as k, ce as kn, pt as kt, an as l, ze as ln, P as lt, On as m, Ee as mn, F as mt, Cn as n, b as nn, jt as nt, _n as o, Le as on, Ft as ot, kn as p, _ as pn, Rt as pt, B as q, $e as qt, $t as r, Ae as rn, N as rt, dn as s, Oe as sn, L as st, Q as t, Be as tn, R as tt, Dn as u, Ve as un, z as ut, Zt as v, we as vn, zt as vt, Pn as w, me as wn, mt as wt, Sn as x, v as xn, Ke as xt, Qt as y, Te as yn, ot as yt, vn as z, j as zt };