@pstdio/ui 0.15.0 → 0.17.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 (304) hide show
  1. package/dist/{MermaidComponent-DBJsTOmj.js → MermaidComponent-BCMQqPqu.js} +11 -11
  2. package/dist/{MermaidComponent-DBJsTOmj.js.map → MermaidComponent-BCMQqPqu.js.map} +1 -1
  3. package/dist/browser-storage-BinyFNJX.js +40 -0
  4. package/dist/browser-storage-BinyFNJX.js.map +1 -0
  5. package/dist/chat-ui.js +1832 -1275
  6. package/dist/chat-ui.js.map +1 -1
  7. package/dist/checkbox-B2zYVemL.js +70 -0
  8. package/dist/checkbox-B2zYVemL.js.map +1 -0
  9. package/dist/components/chat-ui/components/ai-conversation.d.ts +1 -1
  10. package/dist/components/chat-ui/components/ai-message.d.ts +1 -1
  11. package/dist/components/chat-ui/components/ai-response.d.ts +0 -1
  12. package/dist/components/chat-ui/components/attachment-list.d.ts +1 -1
  13. package/dist/components/chat-ui/components/auto-scroll.d.ts +27 -0
  14. package/dist/components/chat-ui/components/chat-input-actions.d.ts +1 -0
  15. package/dist/components/chat-ui/components/chat-input.d.ts +8 -2
  16. package/dist/components/chat-ui/components/chat-message-animation.d.ts +22 -0
  17. package/dist/components/chat-ui/components/chat-panel.d.ts +11 -5
  18. package/dist/components/chat-ui/components/composer-constants.d.ts +1 -0
  19. package/dist/components/chat-ui/components/conversation-browse.d.ts +22 -0
  20. package/dist/components/chat-ui/components/message-types.d.ts +14 -0
  21. package/dist/components/chat-ui/components/queued-follow-up-list-state.d.ts +4 -0
  22. package/dist/components/chat-ui/components/queued-follow-up-list.d.ts +11 -0
  23. package/dist/components/chat-ui/components/timeline.d.ts +5 -2
  24. package/dist/components/chat-ui/components/working-indicator.d.ts +9 -0
  25. package/dist/components/chat-ui/components/workspace-hub.d.ts +8 -1
  26. package/dist/components/chat-ui/index.d.ts +4 -2
  27. package/dist/components/chat-ui/performance/chat-performance-fixtures.d.ts +0 -1
  28. package/dist/components/chat-ui/tool-rendering/build-timeline.d.ts +4 -14
  29. package/dist/components/chat-ui/tool-rendering/question-prompt.d.ts +9 -0
  30. package/dist/components/chat-ui/tool-rendering/shared.d.ts +1 -1
  31. package/dist/components/chat-ui/tool-rendering/types.d.ts +1 -2
  32. package/dist/components/command-palette/index.d.ts +4 -0
  33. package/dist/components/data-table/build-columns.d.ts +13 -2
  34. package/dist/components/data-table/categorical-color-cell.d.ts +8 -0
  35. package/dist/components/data-table/color-cell-style.d.ts +13 -0
  36. package/dist/components/data-table/color-scale-cell.d.ts +7 -0
  37. package/dist/components/data-table/data-table-column-menu.d.ts +12 -0
  38. package/dist/components/data-table/data-table-header.d.ts +18 -0
  39. package/dist/components/data-table/data-table-stat-chart.d.ts +21 -0
  40. package/dist/components/data-table/data-table-state.d.ts +27 -0
  41. package/dist/components/data-table/data-table-stats-row.d.ts +11 -0
  42. package/dist/components/data-table/data-table-stats.d.ts +19 -0
  43. package/dist/components/data-table/data-table-table-parts.d.ts +21 -0
  44. package/dist/components/data-table/data-table.story-descriptions.d.ts +6 -0
  45. package/dist/components/data-table/data-table.story-fixtures.d.ts +6 -0
  46. package/dist/components/data-table/friendly-json-display.d.ts +31 -0
  47. package/dist/components/data-table/index.d.ts +3 -1
  48. package/dist/components/data-table/json-cell.d.ts +6 -0
  49. package/dist/components/data-table/pagination-footer.d.ts +4 -1
  50. package/dist/components/data-table/selection-toolbar.d.ts +3 -1
  51. package/dist/components/data-table/types.d.ts +72 -0
  52. package/dist/components/diff-viewer/diff-card.d.ts +1 -0
  53. package/dist/components/diff-viewer/diff-drawer-scroll.d.ts +0 -19
  54. package/dist/components/diff-viewer/diff-drawer.d.ts +1 -0
  55. package/dist/components/diff-viewer/index.d.ts +2 -0
  56. package/dist/components/diff-viewer/use-selected-diff-scroll.d.ts +7 -3
  57. package/dist/components/internal/style-guide.d.ts +14 -0
  58. package/dist/components/internal/token-editor-controls.d.ts +8 -0
  59. package/dist/components/internal/token-editor-data.d.ts +40 -0
  60. package/dist/components/internal/token-editor-state.d.ts +22 -0
  61. package/dist/components/{data-renderer → kanban-renderer}/display-menu.d.ts +4 -4
  62. package/dist/components/{data-renderer → kanban-renderer}/filter-menu.d.ts +3 -3
  63. package/dist/components/kanban-renderer/index.d.ts +19 -0
  64. package/dist/components/kanban-renderer/kanban-renderer-attribute-badge.d.ts +7 -0
  65. package/dist/components/{data-renderer/data-renderer-board-column-header.d.ts → kanban-renderer/kanban-renderer-board-column-header.d.ts} +2 -2
  66. package/dist/components/{data-renderer/data-renderer-board-group-section.d.ts → kanban-renderer/kanban-renderer-board-group-section.d.ts} +2 -2
  67. package/dist/components/{data-renderer/data-renderer-board-move.d.ts → kanban-renderer/kanban-renderer-board-move.d.ts} +3 -3
  68. package/dist/components/{data-renderer/data-renderer-board.d.ts → kanban-renderer/kanban-renderer-board.d.ts} +16 -15
  69. package/dist/components/{data-renderer/data-renderer-card.d.ts → kanban-renderer/kanban-renderer-card.d.ts} +5 -4
  70. package/dist/components/{data-renderer/data-renderer-content.d.ts → kanban-renderer/kanban-renderer-content.d.ts} +8 -8
  71. package/dist/components/kanban-renderer/kanban-renderer-create-dialog.d.ts +12 -0
  72. package/dist/components/kanban-renderer/kanban-renderer-create-field.d.ts +10 -0
  73. package/dist/components/kanban-renderer/kanban-renderer-grouping.d.ts +23 -0
  74. package/dist/components/{data-renderer/data-renderer-helpers.d.ts → kanban-renderer/kanban-renderer-helpers.d.ts} +15 -15
  75. package/dist/components/kanban-renderer/kanban-renderer-list-items.d.ts +25 -0
  76. package/dist/components/kanban-renderer/kanban-renderer-list.d.ts +43 -0
  77. package/dist/components/{data-renderer/data-renderer-story-fixtures.d.ts → kanban-renderer/kanban-renderer-story-fixtures.d.ts} +3 -2
  78. package/dist/components/kanban-renderer/kanban-renderer-toolbar.d.ts +15 -0
  79. package/dist/components/kanban-renderer/kanban-renderer-view-bar.d.ts +14 -0
  80. package/dist/components/kanban-renderer/kanban-renderer-views.d.ts +12 -0
  81. package/dist/components/{data-renderer/data-renderer.d.ts → kanban-renderer/kanban-renderer.d.ts} +12 -9
  82. package/dist/components/{data-renderer → kanban-renderer}/types.d.ts +51 -14
  83. package/dist/components/kanban-renderer/use-kanban-renderer-store.d.ts +78 -0
  84. package/dist/components/layout/index.d.ts +7 -0
  85. package/dist/components/layout/panel-header.constants.d.ts +3 -0
  86. package/dist/components/{resizable-split-layout.d.ts → layout/resizable-split-layout.d.ts} +3 -2
  87. package/dist/components/layout/resizable-split-layout.geometry.d.ts +56 -0
  88. package/dist/components/{resizable-split-layout.handle.d.ts → layout/resizable-split-layout.handle.d.ts} +6 -2
  89. package/dist/components/layout/resizable-split-layout.panels.d.ts +25 -0
  90. package/dist/components/list-row/list-row-actions.d.ts +1 -0
  91. package/dist/components/list-row/list-row-content.d.ts +7 -0
  92. package/dist/components/list-row/list-row.types.d.ts +4 -1
  93. package/dist/components/overlays/attached-menu.d.ts +6 -0
  94. package/dist/components/overlays/attachment-chip.d.ts +13 -0
  95. package/dist/components/overlays/index.d.ts +16 -0
  96. package/dist/components/{resource-context-menu.d.ts → overlays/resource-context-menu.d.ts} +13 -1
  97. package/dist/components/{search-modal-content.d.ts → overlays/search-modal-content.d.ts} +1 -1
  98. package/dist/components/{searchable-menu.d.ts → overlays/searchable-menu.d.ts} +1 -1
  99. package/dist/components/param-editor/index.d.ts +24 -0
  100. package/dist/components/param-editor/inputs/action-input.d.ts +13 -0
  101. package/dist/components/param-editor/inputs/anchor-grid-input.d.ts +12 -0
  102. package/dist/components/param-editor/inputs/anchor-grid.d.ts +4 -0
  103. package/dist/components/param-editor/inputs/file-accept.d.ts +22 -0
  104. package/dist/components/param-editor/inputs/file-drop-input.d.ts +14 -0
  105. package/dist/components/param-editor/inputs/numeric-value.d.ts +6 -0
  106. package/dist/components/param-editor/inputs/range-input.d.ts +17 -0
  107. package/dist/components/param-editor/inputs/range-value.d.ts +5 -0
  108. package/dist/components/param-editor/inputs/resource-input-chips.d.ts +15 -0
  109. package/dist/components/param-editor/inputs/resource-input.d.ts +18 -0
  110. package/dist/components/param-editor/inputs/segmented-input.d.ts +14 -0
  111. package/dist/components/param-editor/{selection-input.d.ts → inputs/selection-input.d.ts} +6 -6
  112. package/dist/components/param-editor/inputs/selection-menu.d.ts +29 -0
  113. package/dist/components/param-editor/inputs/slider-marks.d.ts +5 -0
  114. package/dist/components/param-editor/inputs/vector-input.d.ts +17 -0
  115. package/dist/components/param-editor/inputs/vector-value.d.ts +7 -0
  116. package/dist/components/param-editor/param-editor-control-item.d.ts +15 -0
  117. package/dist/components/param-editor/param-editor-control-list.d.ts +5 -0
  118. package/dist/components/param-editor/param-editor-field-label.d.ts +1 -0
  119. package/dist/components/param-editor/param-editor-field.d.ts +11 -0
  120. package/dist/components/param-editor/param-editor-horizontal.d.ts +1 -0
  121. package/dist/components/param-editor/param-editor-inline-group.d.ts +5 -0
  122. package/dist/components/param-editor/param-editor-read-only-field.d.ts +9 -0
  123. package/dist/components/param-editor/param-editor-section.d.ts +17 -0
  124. package/dist/components/param-editor/param-editor.d.ts +3 -1
  125. package/dist/components/param-editor/param-editor.types.d.ts +135 -24
  126. package/dist/components/{breadcrumb.d.ts → primitives/breadcrumb.d.ts} +1 -1
  127. package/dist/components/primitives/index.d.ts +28 -0
  128. package/dist/components/{number-input.d.ts → primitives/number-input.d.ts} +0 -2
  129. package/dist/components/{session-indicator.d.ts → primitives/session-indicator.d.ts} +2 -1
  130. package/dist/components/{tooltip.d.ts → primitives/tooltip.d.ts} +0 -1
  131. package/dist/components/rich-text/prompt-input/commands.d.ts +0 -17
  132. package/dist/components/rich-text/prompt-input/events.d.ts +0 -13
  133. package/dist/components/rich-text/prompt-input/plugins/CommentPlugin/nodes/CommentNode/CommentNode.d.ts +1 -2
  134. package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuPlugin.d.ts +2 -1
  135. package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/hooks/useContextLookup.d.ts +2 -1
  136. package/dist/components/rich-text/prompt-input/plugins/ReferencePlugin/ReferencePlugin.d.ts +2 -1
  137. package/dist/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.d.ts +1 -2
  138. package/dist/components/rich-text/prompt-input/prompt-input.d.ts +3 -2
  139. package/dist/components/rich-text/prompt-input/utils.d.ts +1 -2
  140. package/dist/components/rich-text/shared/plugins/MermaidPlugin/MermaidNode.d.ts +0 -1
  141. package/dist/components/rich-text/types.d.ts +1 -1
  142. package/dist/components/rich-text/utils/inferResourceType.d.ts +1 -1
  143. package/dist/components/{sidebar/sidebar-footer.d.ts → sidenav/sidenav-footer.d.ts} +2 -2
  144. package/dist/components/{sidebar/sidebar-header.d.ts → sidenav/sidenav-header.d.ts} +2 -2
  145. package/dist/components/sidenav/sidenav.d.ts +2 -0
  146. package/dist/components/sidenav/sidenav.store.d.ts +49 -0
  147. package/dist/components/{sidebar/sidebar.types.d.ts → sidenav/sidenav.types.d.ts} +6 -6
  148. package/dist/components/tab-strip/tab-visibility-filter.d.ts +2 -1
  149. package/dist/components/tag-editor/tag-editor-row.d.ts +1 -1
  150. package/dist/components/tag-editor/tag-editor.types.d.ts +1 -1
  151. package/dist/components/terminal/bind-session.d.ts +33 -0
  152. package/dist/components/terminal/index.d.ts +6 -0
  153. package/dist/components/terminal/scripted-bridge.d.ts +35 -0
  154. package/dist/components/terminal/terminal-contract.d.ts +22 -0
  155. package/dist/components/terminal/terminal-theme.d.ts +12 -0
  156. package/dist/components/terminal/terminal.d.ts +56 -0
  157. package/dist/components/terminal/types.d.ts +35 -0
  158. package/dist/components/terminal/use-terminal-session.d.ts +21 -0
  159. package/dist/components/tree-list/tree-list-order-filter.d.ts +1 -2
  160. package/dist/components/tree-list/tree-list-visibility-filter.d.ts +1 -2
  161. package/dist/components/tree-list/tree-list.d.ts +2 -2
  162. package/dist/components/tree-list/tree-list.types.d.ts +4 -0
  163. package/dist/data-table.js +1271 -0
  164. package/dist/data-table.js.map +1 -0
  165. package/dist/diff-editor-BnfV8cYB.js +182 -0
  166. package/dist/diff-editor-BnfV8cYB.js.map +1 -0
  167. package/dist/diff.js +1313 -0
  168. package/dist/diff.js.map +1 -0
  169. package/dist/empty-state-Bo4HVrgr.js +34 -0
  170. package/dist/empty-state-Bo4HVrgr.js.map +1 -0
  171. package/dist/foundations/gallery/gallery-frame.d.ts +21 -0
  172. package/dist/foundations/gallery/sections/badges-section.d.ts +1 -0
  173. package/dist/foundations/gallery/sections/buttons-section.d.ts +1 -0
  174. package/dist/foundations/gallery/sections/composite-chat-section.d.ts +1 -0
  175. package/dist/foundations/gallery/sections/composites-section.d.ts +1 -0
  176. package/dist/foundations/gallery/sections/feedback-section.d.ts +1 -0
  177. package/dist/foundations/gallery/sections/input-authoring-card.d.ts +1 -0
  178. package/dist/foundations/gallery/sections/inputs-section.d.ts +1 -0
  179. package/dist/foundations/gallery/sections/layout-section.d.ts +1 -0
  180. package/dist/foundations/gallery/sections/navigation-identity-section.d.ts +1 -0
  181. package/dist/foundations/gallery/sections/overlays-section.d.ts +1 -0
  182. package/dist/foundations/gallery/sections/panels-section.d.ts +1 -0
  183. package/dist/foundations/gallery/sections/param-editor-composite-card.d.ts +1 -0
  184. package/dist/foundations/gallery/sections/settings-composite-cards.d.ts +1 -0
  185. package/dist/index.d.ts +14 -87
  186. package/dist/index.js +2027 -7501
  187. package/dist/index.js.map +1 -1
  188. package/dist/kanban-renderer-toolbar-B9ro-9z1.js +1318 -0
  189. package/dist/kanban-renderer-toolbar-B9ro-9z1.js.map +1 -0
  190. package/dist/kanban-renderer.js +1087 -0
  191. package/dist/kanban-renderer.js.map +1 -0
  192. package/dist/list-row-YRUxEcy3.js +808 -0
  193. package/dist/list-row-YRUxEcy3.js.map +1 -0
  194. package/dist/mermaid-renderer-DZo3qj6D.js +425 -0
  195. package/dist/mermaid-renderer-DZo3qj6D.js.map +1 -0
  196. package/dist/mermaid.js +5 -0
  197. package/dist/mermaid.js.map +1 -0
  198. package/dist/param-editor-CYZJbmKu.js +933 -0
  199. package/dist/param-editor-CYZJbmKu.js.map +1 -0
  200. package/dist/param-editor-read-only-field-DgtLqcFa.js +925 -0
  201. package/dist/param-editor-read-only-field-DgtLqcFa.js.map +1 -0
  202. package/dist/prism-BXb57lxL.js +125 -0
  203. package/dist/prism-BXb57lxL.js.map +1 -0
  204. package/dist/radio-cLMEBBZk.js +76 -0
  205. package/dist/radio-cLMEBBZk.js.map +1 -0
  206. package/dist/resource-badge-qCWHP-wQ.js +99 -0
  207. package/dist/resource-badge-qCWHP-wQ.js.map +1 -0
  208. package/dist/{rich-message-DNSEhxXh.js → rich-message-DBf_5YlW.js} +462 -481
  209. package/dist/rich-message-DBf_5YlW.js.map +1 -0
  210. package/dist/rich-text.js +300 -299
  211. package/dist/rich-text.js.map +1 -1
  212. package/dist/scroll-area-BMbg1WcD.js +91 -0
  213. package/dist/scroll-area-BMbg1WcD.js.map +1 -0
  214. package/dist/style.css +1 -1
  215. package/dist/terminal.js +359 -0
  216. package/dist/terminal.js.map +1 -0
  217. package/dist/theme/global.d.ts +3 -0
  218. package/dist/theme/primitives/sizes.d.ts +23 -0
  219. package/dist/theme/recipes/badge.d.ts +50 -0
  220. package/dist/theme/recipes/button.d.ts +30 -19
  221. package/dist/theme/recipes/color-picker.d.ts +1 -0
  222. package/dist/theme/recipes/dialog.d.ts +1 -1
  223. package/dist/theme/recipes/drawer.d.ts +1 -1
  224. package/dist/theme/recipes/input.d.ts +55 -0
  225. package/dist/theme/recipes/number-input.d.ts +98 -0
  226. package/dist/theme/recipes/tabs.d.ts +49 -28
  227. package/dist/theme/recipes/textarea.d.ts +62 -1
  228. package/dist/theme/recipes/timeline.d.ts +74 -0
  229. package/dist/theme/tokens/borders.d.ts +0 -3
  230. package/dist/theme/tokens/colors.d.ts +118 -94
  231. package/dist/{theme-25P7ij4C.js → theme-CNhnbvcE.js} +1300 -375
  232. package/dist/theme-CNhnbvcE.js.map +1 -0
  233. package/dist/theme-preference-DOzHx64J.js +123 -0
  234. package/dist/theme-preference-DOzHx64J.js.map +1 -0
  235. package/dist/theme.js +1 -1
  236. package/dist/tree-list-CZHLAURU.js +1033 -0
  237. package/dist/tree-list-CZHLAURU.js.map +1 -0
  238. package/package.json +29 -3
  239. package/dist/components/data-renderer/card-interaction-guard.d.ts +0 -2
  240. package/dist/components/data-renderer/data-renderer-attribute-badge.d.ts +0 -7
  241. package/dist/components/data-renderer/data-renderer-grouping.d.ts +0 -23
  242. package/dist/components/data-renderer/data-renderer-list.d.ts +0 -39
  243. package/dist/components/data-renderer/data-renderer-toolbar.d.ts +0 -12
  244. package/dist/components/data-renderer/use-data-renderer-store.d.ts +0 -59
  245. package/dist/components/file-tree-helpers.d.ts +0 -8
  246. package/dist/components/open-source-notices-screen.d.ts +0 -20
  247. package/dist/components/panel-header.constants.d.ts +0 -1
  248. package/dist/components/param-editor/input-group.d.ts +0 -10
  249. package/dist/components/rich-text/shared/plugins/MermaidPlugin/index.d.ts +0 -1
  250. package/dist/components/rich-text/shared/plugins/TableActionMenuPlugin/TableActionMenuPlugin.d.ts +0 -5
  251. package/dist/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.d.ts +0 -2
  252. package/dist/components/rich-text/theme/report-theme.d.ts +0 -3
  253. package/dist/components/sidebar/sidebar.d.ts +0 -2
  254. package/dist/components/sidebar/sidebar.store.d.ts +0 -49
  255. package/dist/components/style-guide-data.d.ts +0 -40
  256. package/dist/components/style-guide.d.ts +0 -1
  257. package/dist/mermaid-renderer-CPGj6vsb.js +0 -570
  258. package/dist/mermaid-renderer-CPGj6vsb.js.map +0 -1
  259. package/dist/radio-DJtQY9po.js +0 -286
  260. package/dist/radio-DJtQY9po.js.map +0 -1
  261. package/dist/resource-badge-CeJTOn8F.js +0 -188
  262. package/dist/resource-badge-CeJTOn8F.js.map +0 -1
  263. package/dist/rich-message-DNSEhxXh.js.map +0 -1
  264. package/dist/theme-25P7ij4C.js.map +0 -1
  265. package/dist/utils/formats.d.ts +0 -7
  266. /package/dist/components/{palette-filter.d.ts → command-palette/palette-filter.d.ts} +0 -0
  267. /package/dist/components/{palette-list.d.ts → command-palette/palette-list.d.ts} +0 -0
  268. /package/dist/components/{palette-shortcut.d.ts → command-palette/palette-shortcut.d.ts} +0 -0
  269. /package/dist/components/{palette.d.ts → command-palette/palette.d.ts} +0 -0
  270. /package/dist/components/{code-editor.d.ts → diff-viewer/code-editor.d.ts} +0 -0
  271. /package/dist/components/{column-file-browser.d.ts → file-browser/column-file-browser.d.ts} +0 -0
  272. /package/dist/components/{performance-panel.d.ts → internal/performance-panel.d.ts} +0 -0
  273. /package/dist/components/{data-renderer/data-renderer-badge-helpers.d.ts → kanban-renderer/kanban-renderer-badge-helpers.d.ts} +0 -0
  274. /package/dist/components/{data-renderer/data-renderer-enum-helpers.d.ts → kanban-renderer/kanban-renderer-enum-helpers.d.ts} +0 -0
  275. /package/dist/components/{data-renderer → kanban-renderer}/use-resolved-attributes.d.ts +0 -0
  276. /package/dist/components/{header.d.ts → layout/header.d.ts} +0 -0
  277. /package/dist/components/{horizontal-menu-stack.d.ts → layout/horizontal-menu-stack.d.ts} +0 -0
  278. /package/dist/components/{item-section.d.ts → layout/item-section.d.ts} +0 -0
  279. /package/dist/components/{attached-panel.d.ts → overlays/attached-panel.d.ts} +0 -0
  280. /package/dist/components/{bubble-button.d.ts → overlays/bubble-button.d.ts} +0 -0
  281. /package/dist/components/{bubble-panel.d.ts → overlays/bubble-panel.d.ts} +0 -0
  282. /package/dist/components/{delete-confirmation-modal.d.ts → overlays/delete-confirmation-modal.d.ts} +0 -0
  283. /package/dist/components/{repo-picker-dialog.d.ts → overlays/repo-picker-dialog.d.ts} +0 -0
  284. /package/dist/components/param-editor/{color-input.d.ts → inputs/color-input.d.ts} +0 -0
  285. /package/dist/components/param-editor/{date-input.d.ts → inputs/date-input.d.ts} +0 -0
  286. /package/dist/components/param-editor/{horizontal-text-input.d.ts → inputs/horizontal-text-input.d.ts} +0 -0
  287. /package/dist/components/param-editor/{number-input.d.ts → inputs/number-input.d.ts} +0 -0
  288. /package/dist/components/param-editor/{text-input.d.ts → inputs/text-input.d.ts} +0 -0
  289. /package/dist/components/{alert.d.ts → primitives/alert.d.ts} +0 -0
  290. /package/dist/components/{checkbox.d.ts → primitives/checkbox.d.ts} +0 -0
  291. /package/dist/components/{content-placeholder.d.ts → primitives/content-placeholder.d.ts} +0 -0
  292. /package/dist/components/{empty-state.d.ts → primitives/empty-state.d.ts} +0 -0
  293. /package/dist/components/{error-boundary.d.ts → primitives/error-boundary.d.ts} +0 -0
  294. /package/dist/components/{icon-color-picker.d.ts → primitives/icon-color-picker.d.ts} +0 -0
  295. /package/dist/components/{info-card.d.ts → primitives/info-card.d.ts} +0 -0
  296. /package/dist/components/{integration-card.d.ts → primitives/integration-card.d.ts} +0 -0
  297. /package/dist/components/{radio.d.ts → primitives/radio.d.ts} +0 -0
  298. /package/dist/components/{resource-badge.d.ts → primitives/resource-badge.d.ts} +0 -0
  299. /package/dist/components/{scroll-area.d.ts → primitives/scroll-area.d.ts} +0 -0
  300. /package/dist/components/{simple-card.d.ts → primitives/simple-card.d.ts} +0 -0
  301. /package/dist/components/{slider.d.ts → primitives/slider.d.ts} +0 -0
  302. /package/dist/components/{switch.d.ts → primitives/switch.d.ts} +0 -0
  303. /package/dist/components/{toaster.d.ts → primitives/toaster.d.ts} +0 -0
  304. /package/dist/components/{workspace-badge.d.ts → primitives/workspace-badge.d.ts} +0 -0
@@ -0,0 +1,1271 @@
1
+ import { jsx as r, jsxs as z, Fragment as rt } from "react/jsx-runtime";
2
+ import { Text as j, Icon as N, Popover as te, HStack as ze, Portal as se, Image as it, Button as ce, chakra as he, Menu as V, IconButton as le, Stack as be, Input as st, Box as _e, Flex as Y, Table as ee } from "@chakra-ui/react";
3
+ import { createColumnHelper as at, flexRender as we, useReactTable as ct, getPaginationRowModel as dt, getCoreRowModel as ut, getSortedRowModel as mt } from "@tanstack/react-table";
4
+ import { isValidElement as Se, cloneElement as ft, useState as re, useEffect as gt, Fragment as ht } from "react";
5
+ import { S as Ae, T as Je } from "./scroll-area-BMbg1WcD.js";
6
+ import { K as bt, e as pt, d as St } from "./kanban-renderer-toolbar-B9ro-9z1.js";
7
+ import { c as k } from "react/compiler-runtime";
8
+ import { CalendarClock as xt, Type as Ct, Hash as yt, CheckCircle2 as wt, Braces as vt, ChevronRight as Xe, CircleHelp as Rt, Minus as It, Check as $e, ChevronDown as zt, Columns3 as _t, Search as At, GripVertical as $t, X as kt, ArrowUpAZ as Ge, ArrowDownAZ as qe, MoreVertical as Tt, ChevronsLeft as Dt, ChevronLeft as Vt, ChevronsRight as Pt } from "lucide-react";
9
+ import { C as ke } from "./checkbox-B2zYVemL.js";
10
+ import { L as ie, R as Mt } from "./list-row-YRUxEcy3.js";
11
+ import { P as Nt } from "./param-editor-CYZJbmKu.js";
12
+ import { useSensors as Ht, useSensor as Lt, PointerSensor as jt, DndContext as Ot, closestCenter as Bt } from "@dnd-kit/core";
13
+ import { SortableContext as Ft, verticalListSortingStrategy as Wt, useSortable as Et } from "@dnd-kit/sortable";
14
+ import { CSS as Kt } from "@dnd-kit/utilities";
15
+ import { useChart as Jt, Chart as Ne } from "@chakra-ui/charts";
16
+ import { XAxis as Xt, YAxis as Gt, Bar as qt, Tooltip as Ut, BarChart as Yt, useActiveTooltipCoordinate as Zt, usePlotArea as Qt } from "recharts";
17
+ import { c as el, d as tl } from "./param-editor-read-only-field-DgtLqcFa.js";
18
+ const Ue = (l, e) => e.find((t) => Object.is(t.value, l))?.color ?? null, ll = (l) => {
19
+ const {
20
+ children: e
21
+ } = l;
22
+ return e;
23
+ }, ol = "#111827", nl = "#ffffff", rl = "#000000", il = 4.5, sl = (l) => l.split("").map((e) => e + e).join(""), de = (l) => {
24
+ const e = l.trim(), t = e.startsWith("#") ? e.slice(1) : e, o = t.length === 3 ? sl(t) : t;
25
+ return /^[\da-f]{6}$/i.test(o) ? {
26
+ r: Number.parseInt(o.slice(0, 2), 16),
27
+ g: Number.parseInt(o.slice(2, 4), 16),
28
+ b: Number.parseInt(o.slice(4, 6), 16)
29
+ } : null;
30
+ }, Ce = (l) => {
31
+ const e = l / 255;
32
+ return e <= 0.03928 ? e / 12.92 : ((e + 0.055) / 1.055) ** 2.4;
33
+ }, He = (l) => 0.2126 * Ce(l.r) + 0.7152 * Ce(l.g) + 0.0722 * Ce(l.b), al = (l, e) => {
34
+ const t = He(l), o = He(e), n = Math.max(t, o), s = Math.min(t, o);
35
+ return (n + 0.05) / (s + 0.05);
36
+ }, ve = (l) => {
37
+ const e = (t) => Math.round(t).toString(16).padStart(2, "0");
38
+ return `#${e(l.r)}${e(l.g)}${e(l.b)}`;
39
+ }, Ye = (l, e, t) => ({
40
+ r: l.r * (1 - t) + e.r * t,
41
+ g: l.g * (1 - t) + e.g * t,
42
+ b: l.b * (1 - t) + e.b * t
43
+ }), Le = (l, e) => {
44
+ for (let t = 1; t <= 50; t += 1) {
45
+ const o = Ye(l, e, t / 50);
46
+ if (al(o, l) >= il)
47
+ return {
48
+ color: ve(o),
49
+ step: t
50
+ };
51
+ }
52
+ return {
53
+ color: ve(e),
54
+ step: 50
55
+ };
56
+ }, je = (l) => {
57
+ const e = de(l);
58
+ if (!e) return ol;
59
+ const t = de(rl), o = de(nl), n = Le(e, t), s = Le(e, o);
60
+ return n.step <= s.step ? n.color : s.color;
61
+ }, cl = (l, e, t) => {
62
+ const o = de(l), n = de(e);
63
+ return !o || !n ? null : ve(Ye(o, n, 1 - t));
64
+ }, Oe = (l) => {
65
+ const e = l.foreground?.light ?? je(l.light), t = l.foreground?.dark ?? je(l.dark);
66
+ return {
67
+ backgroundColor: `light-dark(${l.light}, ${l.dark})`,
68
+ color: `light-dark(${e}, ${t})`
69
+ };
70
+ }, dl = (l) => Math.round(l * 100) / 100, me = (l, e, t) => {
71
+ const o = cl(l, e, t);
72
+ return o || `color-mix(in srgb, ${l} ${dl(t * 100)}%, ${e})`;
73
+ }, ul = (l, e, t) => {
74
+ const o = l.foreground && e.foreground ? {
75
+ light: me(l.foreground.light, e.foreground.light, t),
76
+ dark: me(l.foreground.dark, e.foreground.dark, t)
77
+ } : void 0;
78
+ return {
79
+ light: me(l.light, e.light, t),
80
+ dark: me(l.dark, e.dark, t),
81
+ ...o ? {
82
+ foreground: o
83
+ } : {}
84
+ };
85
+ }, Ze = (l, e) => {
86
+ if (typeof l != "number" || !Number.isFinite(l) || e.length < 2) return null;
87
+ const t = e[0], o = e[e.length - 1];
88
+ if (o.value - t.value <= 0) return null;
89
+ if (l <= t.value) return t.color;
90
+ if (l >= o.value) return o.color;
91
+ const s = e.findIndex((u) => l <= u.value), i = e[s - 1], a = e[s], d = 1 - (l - i.value) / (a.value - i.value);
92
+ return ul(i.color, a.color, d);
93
+ }, ml = (l) => {
94
+ const e = k(2), {
95
+ value: t
96
+ } = l;
97
+ let o;
98
+ return e[0] !== t ? (o = /* @__PURE__ */ r(j, { textStyle: "paragraph/S/medium", fontVariantNumeric: "tabular-nums", truncate: !0, children: t }), e[0] = t, e[1] = o) : o = e[1], o;
99
+ }, ue = (l) => typeof l == "object" && l !== null && "display" in l, Be = (l) => typeof l == "string" || l instanceof String, fl = (l) => typeof l == "number" || l instanceof Number, gl = (l) => typeof l == "boolean" || l instanceof Boolean, hl = (l) => {
100
+ const e = l.map((t) => ue(t) ? t.sortValue ?? null : t instanceof String || t instanceof Number || t instanceof Boolean ? t.valueOf() : Se(t) ? null : t).filter((t) => t != null);
101
+ return e.length === 0 ? "unknown" : e.every((t) => Be(t) && !Number.isNaN(Date.parse(t.toString()))) ? "date" : e.every((t) => fl(t)) ? "number" : e.every((t) => gl(t)) ? "boolean" : e.every((t) => Be(t)) ? "string" : "unknown";
102
+ }, fe = {
103
+ boxSize: "14px",
104
+ marginRight: "2px"
105
+ }, bl = (l) => {
106
+ const e = hl(l);
107
+ return e === "date" ? /* @__PURE__ */ r(N, { as: xt, ...fe }) : e === "string" ? /* @__PURE__ */ r(N, { as: Ct, ...fe }) : e === "number" ? /* @__PURE__ */ r(N, { as: yt, ...fe }) : e === "boolean" ? /* @__PURE__ */ r(N, { as: wt, ...fe }) : null;
108
+ };
109
+ function pl(l) {
110
+ if (ue(l)) return l.display;
111
+ if (Se(l)) return l;
112
+ switch ((l instanceof String || l instanceof Number || l instanceof Boolean) && (l = l.valueOf()), typeof l) {
113
+ case "boolean":
114
+ return l ? "TRUE" : "FALSE";
115
+ case "number":
116
+ return l;
117
+ case "object":
118
+ return l !== null ? JSON.stringify(l) : "-";
119
+ case "undefined":
120
+ return "-";
121
+ default:
122
+ return l ? String(l) : "-";
123
+ }
124
+ }
125
+ const ge = at(), Sl = /\.(avif|bmp|gif|jpe?g|png|svg|webp)$/i, xl = /(^|\s)(avatar|image|logo|photo|picture|thumbnail)(\s|$)/i, Cl = (l) => {
126
+ const e = l.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().toLowerCase();
127
+ return e ? `${e[0]?.toUpperCase()}${e.slice(1)}` : "Details";
128
+ }, ye = (l) => l.map((e) => /^\d+$/.test(e) ? e : Cl(e)).join(" / "), yl = (l) => l.every((e) => e === null || typeof e != "object"), Re = (l, e, t) => {
129
+ if (Array.isArray(l)) {
130
+ if (l.length === 0 || yl(l)) {
131
+ t.push({
132
+ label: ye(e),
133
+ value: l
134
+ });
135
+ return;
136
+ }
137
+ l.forEach((o, n) => {
138
+ Re(o, [...e, String(n + 1)], t);
139
+ });
140
+ return;
141
+ }
142
+ if (l !== null && typeof l == "object") {
143
+ const o = Object.entries(l);
144
+ if (o.length === 0) {
145
+ t.push({
146
+ label: ye(e),
147
+ value: null
148
+ });
149
+ return;
150
+ }
151
+ o.forEach(([n, s]) => {
152
+ Re(s, [...e, n], t);
153
+ });
154
+ return;
155
+ }
156
+ t.push({
157
+ label: ye(e),
158
+ value: l
159
+ });
160
+ }, Qe = (l) => {
161
+ if (typeof l != "string") return l;
162
+ try {
163
+ return JSON.parse(l);
164
+ } catch {
165
+ return l;
166
+ }
167
+ }, Te = (l) => {
168
+ const e = [];
169
+ return Re(Qe(l), [], e), e.map((t) => ({
170
+ ...t,
171
+ label: t.label || "Value"
172
+ }));
173
+ }, xe = (l, e) => {
174
+ if (typeof l != "string") return !1;
175
+ if (l.startsWith("data:image/")) return !0;
176
+ try {
177
+ const t = new URL(l);
178
+ return t.protocol !== "http:" && t.protocol !== "https:" ? !1 : Sl.test(t.pathname) || xl.test(e);
179
+ } catch {
180
+ return !1;
181
+ }
182
+ }, De = (l, e) => Array.isArray(l) && l.length > 0 && l.every((t) => xe(t, e)), Fe = (l) => l == null || l === "" ? "Not provided" : typeof l == "boolean" ? l ? "Yes" : "No" : String(l), wl = (l) => Array.isArray(l) ? l.length === 0 ? "None" : l.map(Fe).join(", ") : Fe(l), vl = (l) => {
183
+ const e = Qe(l);
184
+ if (Array.isArray(e) && e.length === 0 || e !== null && typeof e == "object" && Object.keys(e).length === 0)
185
+ return "No details";
186
+ const t = Te(l).filter((s) => !xe(s.value, s.label) && !De(s.value, s.label));
187
+ if (t.length === 0) return "No details";
188
+ const o = t.slice(0, 2).map((s) => wl(s.value)), n = t.length - o.length;
189
+ return [...o, n > 0 ? `${n} more` : null].filter(Boolean).join(" · ");
190
+ }, Rl = (l) => {
191
+ const {
192
+ label: e,
193
+ value: t
194
+ } = l;
195
+ return xe(t, e) ? {
196
+ type: "image",
197
+ src: String(t),
198
+ alt: `${e} preview`
199
+ } : Array.isArray(t) && De(t, e) ? {
200
+ type: "image-gallery",
201
+ images: t.map((o, n) => ({
202
+ src: String(o),
203
+ alt: `${e} ${n + 1} preview`
204
+ }))
205
+ } : Array.isArray(t) ? t : t === void 0 ? null : t;
206
+ }, Il = (l) => Te(l).map((e, t) => ({
207
+ id: `friendly-json-${t}`,
208
+ name: e.label,
209
+ type: "readOnly",
210
+ value: Rl(e)
211
+ })), zl = (l) => {
212
+ const e = k(4), {
213
+ value: t
214
+ } = l;
215
+ let o;
216
+ e[0] !== t ? (o = Il(t), e[0] = t, e[1] = o) : o = e[1];
217
+ let n;
218
+ return e[2] !== o ? (n = /* @__PURE__ */ r(Nt, { params: o, readOnly: !0, fullWidth: !0 }), e[2] = o, e[3] = n) : n = e[3], n;
219
+ }, _l = (l) => l.stopPropagation(), Al = (l) => {
220
+ const e = k(49), {
221
+ columnLabel: t,
222
+ value: o
223
+ } = l;
224
+ let n, s, i, a, c, d, u, m, h, b, f, g, p, y, x, w;
225
+ if (e[0] !== t || e[1] !== o) {
226
+ const D = Te(o).flatMap($l).slice(0, 2);
227
+ let H;
228
+ e[18] !== o ? (H = vl(o), e[18] = o, e[19] = H) : H = e[19], a = H, i = te.Root, e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = {
229
+ placement: "bottom-start",
230
+ offset: {
231
+ mainAxis: 6
232
+ }
233
+ }, e[20] = m) : m = e[20], s = te.Trigger, u = !0, n = ce, c = `View ${t} details`, d = "ghost", h = "xs", b = "full", f = "0", g = "28px", p = "2xs", y = "flex-start", x = _l, w = D.length > 0 ? /* @__PURE__ */ r(ze, { gap: "-1", flexShrink: "0", children: D.map(kl) }) : /* @__PURE__ */ r(vt, { size: 14 }), e[0] = t, e[1] = o, e[2] = n, e[3] = s, e[4] = i, e[5] = a, e[6] = c, e[7] = d, e[8] = u, e[9] = m, e[10] = h, e[11] = b, e[12] = f, e[13] = g, e[14] = p, e[15] = y, e[16] = x, e[17] = w;
234
+ } else
235
+ n = e[2], s = e[3], i = e[4], a = e[5], c = e[6], d = e[7], u = e[8], m = e[9], h = e[10], b = e[11], f = e[12], g = e[13], p = e[14], y = e[15], x = e[16], w = e[17];
236
+ let C;
237
+ e[21] !== a ? (C = /* @__PURE__ */ r(j, { flex: "1", minWidth: "0", textAlign: "left", textStyle: "paragraph/S/regular", truncate: !0, children: a }), e[21] = a, e[22] = C) : C = e[22];
238
+ let S;
239
+ e[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ r(Xe, { size: 12 }), e[23] = S) : S = e[23];
240
+ let v;
241
+ e[24] !== n || e[25] !== c || e[26] !== d || e[27] !== C || e[28] !== h || e[29] !== b || e[30] !== f || e[31] !== g || e[32] !== p || e[33] !== y || e[34] !== x || e[35] !== w ? (v = /* @__PURE__ */ z(n, { "aria-label": c, variant: d, size: h, width: b, minWidth: f, height: g, paddingX: p, justifyContent: y, onClick: x, children: [
242
+ w,
243
+ C,
244
+ S
245
+ ] }), e[24] = n, e[25] = c, e[26] = d, e[27] = C, e[28] = h, e[29] = b, e[30] = f, e[31] = g, e[32] = p, e[33] = y, e[34] = x, e[35] = w, e[36] = v) : v = e[36];
246
+ let R;
247
+ e[37] !== s || e[38] !== u || e[39] !== v ? (R = /* @__PURE__ */ r(s, { asChild: u, children: v }), e[37] = s, e[38] = u, e[39] = v, e[40] = R) : R = e[40];
248
+ let _;
249
+ e[41] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = {
250
+ overscrollBehavior: "contain"
251
+ }, e[41] = _) : _ = e[41];
252
+ let A;
253
+ e[42] !== o ? (A = /* @__PURE__ */ r(se, { children: /* @__PURE__ */ r(te.Positioner, { children: /* @__PURE__ */ r(te.Content, { width: "min(380px, calc(100vw - 32px))", padding: "0", background: "bg", overflow: "hidden", children: /* @__PURE__ */ r(Ae, { maxH: "360px", viewportProps: _, children: /* @__PURE__ */ r(zl, { value: o }) }) }) }) }), e[42] = o, e[43] = A) : A = e[43];
254
+ let $;
255
+ return e[44] !== i || e[45] !== m || e[46] !== R || e[47] !== A ? ($ = /* @__PURE__ */ z(i, { positioning: m, children: [
256
+ R,
257
+ A
258
+ ] }), e[44] = i, e[45] = m, e[46] = R, e[47] = A, e[48] = $) : $ = e[48], $;
259
+ };
260
+ function $l(l) {
261
+ return xe(l.value, l.label) ? [l] : !Array.isArray(l.value) || !De(l.value, l.label) ? [] : l.value.map((e, t) => ({
262
+ label: `${l.label} ${t + 1}`,
263
+ value: e
264
+ }));
265
+ }
266
+ function kl(l) {
267
+ return /* @__PURE__ */ r(it, { src: String(l.value), alt: `${l.label} preview`, boxSize: "22px", borderRadius: "xs", borderWidth: "1px", borderColor: "border.subtle", objectFit: "cover" }, l.label);
268
+ }
269
+ const We = (l) => ue(l) ? l.sortValue : l, Tl = (l, e) => l === e ? 0 : l == null ? 1 : e == null ? -1 : typeof l == "number" && typeof e == "number" ? l - e : String(l).localeCompare(String(e)), Dl = (l) => Se(l) ? ft(l, {
270
+ style: {
271
+ ...l.props.style,
272
+ flexWrap: "nowrap",
273
+ minWidth: 0,
274
+ whiteSpace: "nowrap"
275
+ }
276
+ }) : l, pe = (l) => {
277
+ l.stopPropagation();
278
+ }, Vl = (l) => {
279
+ const e = k(8), {
280
+ table: t
281
+ } = l, o = t.getIsAllRowsSelected(), n = !o && t.getIsSomeRowsSelected(), s = o ? !0 : n ? "indeterminate" : !1, i = n ? It : $e;
282
+ let a;
283
+ e[0] !== i ? (a = /* @__PURE__ */ r(N, { as: i, boxSize: "12px", strokeWidth: "3" }), e[0] = i, e[1] = a) : a = e[1];
284
+ let c;
285
+ e[2] !== t ? (c = (u) => t.toggleAllRowsSelected(u.checked === !0), e[2] = t, e[3] = c) : c = e[3];
286
+ let d;
287
+ return e[4] !== s || e[5] !== a || e[6] !== c ? (d = /* @__PURE__ */ r(ke, { checked: s, "aria-label": "Select all", icon: a, onClick: pe, onCheckedChange: c }), e[4] = s, e[5] = a, e[6] = c, e[7] = d) : d = e[7], d;
288
+ }, Pl = (l) => {
289
+ const e = k(6), {
290
+ row: t,
291
+ selectedRowIds: o
292
+ } = l, n = !!o?.[t.id];
293
+ let s;
294
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ r(N, { as: $e, boxSize: "12px", strokeWidth: "3" }), e[0] = s) : s = e[0];
295
+ let i;
296
+ e[1] !== t ? (i = (c) => t.toggleSelected(c.checked === !0), e[1] = t, e[2] = i) : i = e[2];
297
+ let a;
298
+ return e[3] !== n || e[4] !== i ? (a = /* @__PURE__ */ r(ke, { checked: n, "aria-label": "Select row", icon: s, onClick: pe, onCheckedChange: i }), e[3] = n, e[4] = i, e[5] = a) : a = e[5], a;
299
+ }, Ml = (l) => {
300
+ const e = k(8), {
301
+ row: t,
302
+ actions: o
303
+ } = l;
304
+ let n;
305
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ r(V.Trigger, { asChild: !0, children: /* @__PURE__ */ r(le, { "aria-label": "Row actions", size: "2xs", variant: "ghost", onClick: pe, children: /* @__PURE__ */ r(N, { as: zt, boxSize: "14px" }) }) }), e[0] = n) : n = e[0];
306
+ let s;
307
+ if (e[1] !== o || e[2] !== t) {
308
+ let a;
309
+ e[4] !== t ? (a = (c) => /* @__PURE__ */ r(V.Item, { value: c.label, asChild: !0, children: /* @__PURE__ */ r(ie, { asChild: !0, variant: "full-width", tone: c.destructive ? "danger" : "default", label: c.label, icon: c.icon, onClick: pe, onActivate: () => c.onSelect(t.original) }) }, c.label), e[4] = t, e[5] = a) : a = e[5], s = o.map(a), e[1] = o, e[2] = t, e[3] = s;
310
+ } else
311
+ s = e[3];
312
+ let i;
313
+ return e[6] !== s ? (i = /* @__PURE__ */ z(V.Root, { children: [
314
+ n,
315
+ /* @__PURE__ */ r(se, { children: /* @__PURE__ */ r(V.Positioner, { children: /* @__PURE__ */ r(V.Content, { zIndex: "popover", bg: "bg", children: s }) }) })
316
+ ] }), e[6] = s, e[7] = i) : i = e[7], i;
317
+ }, Ee = (l) => {
318
+ const e = k(5), {
319
+ value: t
320
+ } = l;
321
+ let o, n;
322
+ if (e[0] !== t) {
323
+ n = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
324
+ e:
325
+ if (o = pl(t), Se(o)) {
326
+ n = /* @__PURE__ */ r(he.span, { display: "inline-flex", maxWidth: "full", minW: "0", overflow: "hidden", whiteSpace: "nowrap", children: Dl(o) });
327
+ break e;
328
+ }
329
+ e[0] = t, e[1] = o, e[2] = n;
330
+ } else
331
+ o = e[1], n = e[2];
332
+ if (n !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
333
+ return n;
334
+ let s;
335
+ return e[3] !== o ? (s = /* @__PURE__ */ r(j, { maxWidth: "full", overflow: "hidden", textOverflow: "ellipsis", textStyle: "paragraph/S/regular", whiteSpace: "nowrap", children: o }), e[3] = o, e[4] = s) : s = e[4], s;
336
+ }, Nl = (l) => {
337
+ const e = k(9), {
338
+ columnLabel: t,
339
+ renderer: o,
340
+ value: n
341
+ } = l;
342
+ if (o?.type === "json") {
343
+ let i;
344
+ return e[0] !== t || e[1] !== n ? (i = /* @__PURE__ */ r(Al, { columnLabel: t, value: n }), e[0] = t, e[1] = n, e[2] = i) : i = e[2], i;
345
+ }
346
+ if (o?.type === "color-scale" && Ze(n, o.stops) && typeof n == "number") {
347
+ let a;
348
+ return e[3] !== n ? (a = /* @__PURE__ */ r(ml, { value: n }), e[3] = n, e[4] = a) : a = e[4], a;
349
+ }
350
+ if (o?.type === "categorical-color" && Ue(n, o.categories)) {
351
+ let a;
352
+ return e[5] !== n ? (a = /* @__PURE__ */ r(ll, { children: /* @__PURE__ */ r(Ee, { value: n }) }), e[5] = n, e[6] = a) : a = e[6], a;
353
+ }
354
+ let s;
355
+ return e[7] !== n ? (s = /* @__PURE__ */ r(Ee, { value: n }), e[7] = n, e[8] = s) : s = e[8], s;
356
+ }, Hl = (l, e) => {
357
+ if (e?.type === "color-scale") {
358
+ const t = Ze(l, e.stops);
359
+ if (t && typeof l == "number") return Oe(t);
360
+ }
361
+ if (e?.type === "categorical-color") {
362
+ const t = Ue(l, e.categories);
363
+ if (t) return Oe(t);
364
+ }
365
+ };
366
+ function Ll(l, e, t = {}) {
367
+ const {
368
+ columnIcons: o,
369
+ columnDescriptions: n,
370
+ compactHeaders: s,
371
+ enableSelection: i = !1,
372
+ rowActions: a = [],
373
+ selectedRowIds: c,
374
+ columnRenderers: d
375
+ } = t, u = ge.accessor((f, g) => g + 1, {
376
+ header: "",
377
+ id: "rowIndex",
378
+ enableResizing: !1,
379
+ size: 20,
380
+ cell: (f) => /* @__PURE__ */ r(he.span, { display: "block", textStyle: "paragraph/S/regular", textAlign: "center", children: f.getValue() })
381
+ }), m = ge.display({
382
+ id: "rowSelection",
383
+ header: Vl,
384
+ cell: (f) => /* @__PURE__ */ r(Pl, { ...f, selectedRowIds: c }),
385
+ enableResizing: !1,
386
+ enableSorting: !1,
387
+ size: 36
388
+ }), h = e.map((f) => {
389
+ const g = f || "-", p = l.map((S) => S[g]), y = d?.[g], x = o?.[g], w = x === void 0 ? bl(p) : x, C = n?.[g];
390
+ return ge.accessor((S) => S[g], {
391
+ id: g,
392
+ header: () => {
393
+ const S = s?.[g] ?? g;
394
+ return /* @__PURE__ */ z(he.span, { display: "inline-flex", alignItems: "center", gap: "4px", minW: "0", maxW: "full", overflow: "hidden", children: [
395
+ w,
396
+ /* @__PURE__ */ r(he.span, { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: S }),
397
+ C ? /* @__PURE__ */ r(Je, { content: C, children: /* @__PURE__ */ r(N, { as: Rt, "aria-label": `About ${S}`, boxSize: "12px", color: "fg.muted", cursor: "help", flexShrink: 0, opacity: 0.6, tabIndex: 0 }) }) : null
398
+ ] });
399
+ },
400
+ cell: (S) => /* @__PURE__ */ r(Nl, { columnLabel: g, renderer: y, value: S.getValue() }),
401
+ meta: {
402
+ getCellStyle: (S) => Hl(S, y)
403
+ },
404
+ sortingFn: (S, v) => {
405
+ const R = We(S.original[g]), _ = We(v.original[g]);
406
+ return Tl(R, _);
407
+ }
408
+ });
409
+ }), b = ge.display({
410
+ id: "rowActions",
411
+ header: "",
412
+ cell: (f) => /* @__PURE__ */ r(Ml, { ...f, actions: a }),
413
+ enableResizing: !1,
414
+ enableSorting: !1,
415
+ size: 36
416
+ });
417
+ return [u, ...i ? [m] : [], ...h, ...a.length > 0 ? [b] : []];
418
+ }
419
+ const jl = (l) => {
420
+ const e = k(28), {
421
+ column: t,
422
+ checked: o,
423
+ onColumnToggle: n
424
+ } = l;
425
+ let s;
426
+ e[0] !== t.id ? (s = {
427
+ id: t.id
428
+ }, e[0] = t.id, e[1] = s) : s = e[1];
429
+ const {
430
+ attributes: i,
431
+ listeners: a,
432
+ setNodeRef: c,
433
+ transform: d,
434
+ transition: u,
435
+ isDragging: m
436
+ } = Et(s);
437
+ let h;
438
+ e[2] !== d ? (h = Kt.Transform.toString(d), e[2] = d, e[3] = h) : h = e[3];
439
+ const b = m ? 0.5 : 1;
440
+ let f;
441
+ e[4] !== h || e[5] !== b || e[6] !== u ? (f = {
442
+ transform: h,
443
+ transition: u,
444
+ opacity: b
445
+ }, e[4] = h, e[5] = b, e[6] = u, e[7] = f) : f = e[7];
446
+ const g = f;
447
+ let p;
448
+ e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (p = {
449
+ bg: "bg.hover"
450
+ }, e[8] = p) : p = e[8];
451
+ let y;
452
+ e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ r($t, { size: 14 }), e[9] = y) : y = e[9];
453
+ let x;
454
+ e[10] !== i || e[11] !== a ? (x = /* @__PURE__ */ r(_e, { as: "span", display: "inline-flex", cursor: "grab", color: "fg.muted", ...i, ...a, children: y }), e[10] = i, e[11] = a, e[12] = x) : x = e[12];
455
+ let w;
456
+ e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ r(N, { as: $e, boxSize: "12px", strokeWidth: "3" }), e[13] = w) : w = e[13];
457
+ let C;
458
+ e[14] !== t.id || e[15] !== n ? (C = () => n(t.id), e[14] = t.id, e[15] = n, e[16] = C) : C = e[16];
459
+ let S;
460
+ e[17] !== t.label ? (S = /* @__PURE__ */ r(j, { as: "span", textStyle: "label/S/regular", truncate: !0, children: t.label }), e[17] = t.label, e[18] = S) : S = e[18];
461
+ let v;
462
+ e[19] !== o || e[20] !== C || e[21] !== S ? (v = /* @__PURE__ */ r(ke, { checked: o, size: "sm", icon: w, onCheckedChange: C, children: S }), e[19] = o, e[20] = C, e[21] = S, e[22] = v) : v = e[22];
463
+ let R;
464
+ return e[23] !== c || e[24] !== g || e[25] !== v || e[26] !== x ? (R = /* @__PURE__ */ z(ze, { ref: c, style: g, gap: "2xs", minW: "0", width: "full", borderRadius: "xs", px: "xs", py: "2xs", _hover: p, children: [
465
+ x,
466
+ v
467
+ ] }), e[23] = c, e[24] = g, e[25] = v, e[26] = x, e[27] = R) : R = e[27], R;
468
+ }, Ol = (l) => {
469
+ const e = k(34), {
470
+ columns: t,
471
+ visibleColumnIds: o,
472
+ onColumnToggle: n,
473
+ onColumnReorder: s
474
+ } = l, [i, a] = re("");
475
+ let c;
476
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = {
477
+ activationConstraint: {
478
+ distance: 5
479
+ }
480
+ }, e[0] = c) : c = e[0];
481
+ const d = Ht(Lt(jt, c));
482
+ let u;
483
+ if (e[1] !== t || e[2] !== i) {
484
+ const $ = i.trim().toLowerCase();
485
+ u = $ ? t.filter((T) => T.label.toLowerCase().includes($)) : t, e[1] = t, e[2] = i, e[3] = u;
486
+ } else
487
+ u = e[3];
488
+ const m = u;
489
+ let h;
490
+ e[4] !== s ? (h = ($) => {
491
+ const {
492
+ active: T,
493
+ over: D
494
+ } = $;
495
+ !D || T.id === D.id || s(String(T.id), String(D.id));
496
+ }, e[4] = s, e[5] = h) : h = e[5];
497
+ const b = h;
498
+ let f;
499
+ e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = {
500
+ placement: "bottom-end",
501
+ offset: {
502
+ mainAxis: 8
503
+ }
504
+ }, e[6] = f) : f = e[6];
505
+ let g;
506
+ e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ r(te.Trigger, { asChild: !0, children: /* @__PURE__ */ r(le, { "aria-label": "Manage columns", variant: "ghost", size: "sm", children: /* @__PURE__ */ r(N, { as: _t, boxSize: "14px" }) }) }), e[7] = g) : g = e[7];
507
+ let p;
508
+ e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ r(N, { as: At, boxSize: "14px", color: "fg.muted" }), e[8] = p) : p = e[8];
509
+ let y;
510
+ e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = ($) => a($.target.value), e[9] = y) : y = e[9];
511
+ let x;
512
+ e[10] !== i ? (x = /* @__PURE__ */ z(ze, { borderBottomWidth: "1px", borderColor: "border.subtle", padding: "xs", gap: "2xs", children: [
513
+ p,
514
+ /* @__PURE__ */ r(st, { size: "xs", variant: "flushed", placeholder: "Search columns", value: i, onChange: y })
515
+ ] }), e[10] = i, e[11] = x) : x = e[11];
516
+ let w;
517
+ e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = {
518
+ overscrollBehavior: "contain"
519
+ }, e[12] = w) : w = e[12];
520
+ let C;
521
+ e[13] !== t ? (C = t.map(Bl), e[13] = t, e[14] = C) : C = e[14];
522
+ let S;
523
+ if (e[15] !== m || e[16] !== n || e[17] !== o) {
524
+ let $;
525
+ e[19] !== n || e[20] !== o ? ($ = (T) => /* @__PURE__ */ r(jl, { column: T, checked: o.has(T.id), onColumnToggle: n }, T.id), e[19] = n, e[20] = o, e[21] = $) : $ = e[21], S = m.map($), e[15] = m, e[16] = n, e[17] = o, e[18] = S;
526
+ } else
527
+ S = e[18];
528
+ let v;
529
+ e[22] !== S ? (v = /* @__PURE__ */ r(be, { gap: "1px", children: S }), e[22] = S, e[23] = v) : v = e[23];
530
+ let R;
531
+ e[24] !== v || e[25] !== C ? (R = /* @__PURE__ */ r(Ft, { items: C, strategy: Wt, children: v }), e[24] = v, e[25] = C, e[26] = R) : R = e[26];
532
+ let _;
533
+ e[27] !== b || e[28] !== d || e[29] !== R ? (_ = /* @__PURE__ */ r(Ae, { maxH: "280px", viewportProps: w, children: /* @__PURE__ */ r(_e, { padding: "2xs", children: /* @__PURE__ */ r(Ot, { sensors: d, collisionDetection: Bt, onDragEnd: b, children: R }) }) }), e[27] = b, e[28] = d, e[29] = R, e[30] = _) : _ = e[30];
534
+ let A;
535
+ return e[31] !== _ || e[32] !== x ? (A = /* @__PURE__ */ z(te.Root, { positioning: f, children: [
536
+ g,
537
+ /* @__PURE__ */ r(se, { children: /* @__PURE__ */ r(te.Positioner, { children: /* @__PURE__ */ r(te.Content, { width: "min(320px, calc(100vw - 32px))", p: "0", bg: "bg", overflow: "hidden", children: /* @__PURE__ */ z(be, { gap: "0", children: [
538
+ x,
539
+ _
540
+ ] }) }) }) })
541
+ ] }), e[31] = _, e[32] = x, e[33] = A) : A = e[33], A;
542
+ };
543
+ function Bl(l) {
544
+ return l.id;
545
+ }
546
+ function Fl(l) {
547
+ const e = k(24), {
548
+ selectedCount: t,
549
+ totalCount: o,
550
+ onClearSelection: n,
551
+ onSelectAll: s,
552
+ actions: i,
553
+ selectedRows: a
554
+ } = l, c = i.length === 1 ? i[0]?.label : "Actions";
555
+ let d;
556
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ r(N, { as: kt, boxSize: "16px" }), e[0] = d) : d = e[0];
557
+ let u;
558
+ e[1] !== n ? (u = /* @__PURE__ */ r(le, { "aria-label": "clear-selection", onClick: n, size: "xs", children: d }), e[1] = n, e[2] = u) : u = e[2];
559
+ let m;
560
+ e[3] !== t ? (m = /* @__PURE__ */ z(j, { children: [
561
+ t,
562
+ " rows selected"
563
+ ] }), e[3] = t, e[4] = m) : m = e[4];
564
+ let h;
565
+ e[5] !== s || e[6] !== t || e[7] !== o ? (h = t !== o && /* @__PURE__ */ z(ce, { size: "xs", onClick: s, children: [
566
+ "Select all ",
567
+ o,
568
+ " rows"
569
+ ] }), e[5] = s, e[6] = t, e[7] = o, e[8] = h) : h = e[8];
570
+ let b;
571
+ e[9] !== c || e[10] !== i[0] || e[11] !== i.length || e[12] !== a ? (b = i.length === 1 && i[0] ? /* @__PURE__ */ r(ce, { size: "xs", onClick: () => i[0]?.onSelect(a), children: c }) : null, e[9] = c, e[10] = i[0], e[11] = i.length, e[12] = a, e[13] = b) : b = e[13];
572
+ let f;
573
+ e[14] !== c || e[15] !== i || e[16] !== a ? (f = i.length > 1 ? /* @__PURE__ */ z(V.Root, { children: [
574
+ /* @__PURE__ */ r(V.Trigger, { asChild: !0, children: /* @__PURE__ */ r(ce, { size: "xs", children: c }) }),
575
+ /* @__PURE__ */ r(se, { children: /* @__PURE__ */ r(V.Positioner, { children: /* @__PURE__ */ r(V.Content, { zIndex: "popover", bg: "bg", children: i.map((p) => /* @__PURE__ */ r(V.Item, { value: p.label, asChild: !0, children: /* @__PURE__ */ r(ie, { asChild: !0, variant: "full-width", tone: p.destructive ? "danger" : "default", label: p.label, icon: p.icon, onActivate: () => p.onSelect(a) }) }, p.label)) }) }) })
576
+ ] }) : null, e[14] = c, e[15] = i, e[16] = a, e[17] = f) : f = e[17];
577
+ let g;
578
+ return e[18] !== u || e[19] !== m || e[20] !== h || e[21] !== b || e[22] !== f ? (g = /* @__PURE__ */ r(Y, { alignItems: "center", paddingY: "2xs", paddingX: "sm", children: /* @__PURE__ */ z(be, { direction: "row", alignItems: "center", children: [
579
+ u,
580
+ m,
581
+ h,
582
+ b,
583
+ f
584
+ ] }) }), e[18] = u, e[19] = m, e[20] = h, e[21] = b, e[22] = f, e[23] = g) : g = e[23], g;
585
+ }
586
+ const Wl = (l) => {
587
+ const e = k(15), {
588
+ rows: t,
589
+ attributes: o,
590
+ storageKey: n,
591
+ selectedCount: s,
592
+ totalCount: i,
593
+ visibleCount: a,
594
+ actions: c,
595
+ selectedRows: d,
596
+ columnControl: u,
597
+ onClearSelection: m,
598
+ onSelectAll: h
599
+ } = l;
600
+ let b;
601
+ e[0] !== c || e[1] !== m || e[2] !== h || e[3] !== s || e[4] !== d || e[5] !== i || e[6] !== a ? (b = s > 0 ? /* @__PURE__ */ r(Fl, { selectedCount: s, totalCount: i, onClearSelection: m, onSelectAll: h, actions: c, selectedRows: d }) : /* @__PURE__ */ z(j, { px: "xs", textStyle: "label/S/regular", color: "fg.muted", children: [
602
+ a,
603
+ " rows"
604
+ ] }), e[0] = c, e[1] = m, e[2] = h, e[3] = s, e[4] = d, e[5] = i, e[6] = a, e[7] = b) : b = e[7];
605
+ const f = b;
606
+ let g;
607
+ e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = {
608
+ viewMode: "list"
609
+ }, e[8] = g) : g = e[8];
610
+ let p;
611
+ return e[9] !== o || e[10] !== u || e[11] !== f || e[12] !== t || e[13] !== n ? (p = /* @__PURE__ */ r(bt, { rows: t, storageKey: n, attributes: o, defaultSettings: g, leading: f, displayControl: u }), e[9] = o, e[10] = u, e[11] = f, e[12] = t, e[13] = n, e[14] = p) : p = e[14], p;
612
+ }, El = 30, Ve = (l, e, t) => t ? t(l, e) : typeof l.id == "string" ? l.id : String(e), Kl = (l) => typeof l.initialPageSize == "number" && l.initialPageSize > 0 ? l.initialPageSize : El, Jl = (l) => l.map((e) => e.original), Xl = (l) => {
613
+ const e = [...l.selectionActions ?? []];
614
+ return l.onCSVDownload && e.push({
615
+ label: "Download CSV",
616
+ onSelect: (t) => {
617
+ l.onCSVDownload?.(t.map((o, n) => Ve(o, n, l.getRowId)));
618
+ }
619
+ }), e;
620
+ }, Gl = (l) => l.selectionMode === "multiple" || !!l.onCSVDownload || !!l.selectionActions?.length, ql = (l) => l.enableRowActivation === !0 && l.activeRowId === l.rowId, Ie = (l) => {
621
+ const e = ue(l) ? l.sortValue : l;
622
+ return typeof e == "boolean" ? String(e) : e;
623
+ }, Ul = (l, e) => {
624
+ const t = l.map((o) => Ie(o[e])).filter((o) => o != null);
625
+ return t.length > 0 && t.every((o) => typeof o == "number");
626
+ }, Yl = (l, e) => Ul(l, e) ? {
627
+ kind: "number"
628
+ } : {
629
+ kind: "string"
630
+ }, Zl = (l, e, t) => e.map((o) => ({
631
+ id: o,
632
+ label: t?.[o] ?? o,
633
+ type: Yl(l, o),
634
+ filterable: !0,
635
+ sortable: !0,
636
+ displayable: !0
637
+ })), Ql = (l, e, t) => l.map((o, n) => {
638
+ const s = Object.fromEntries(e.map((c) => [c, Ie(o[c])])), i = Ve(o, n, t), a = e.length > 0 ? Ie(o[e[0]]) : i;
639
+ return {
640
+ id: i,
641
+ title: String(a ?? i),
642
+ attributes: s,
643
+ sourceRow: o
644
+ };
645
+ }), eo = (l, e, t) => pt(l, e, t), Ke = (l, e) => {
646
+ const t = new Set(l), o = e.filter((i) => t.has(i)), n = new Set(o), s = l.filter((i) => !n.has(i));
647
+ return [...o, ...s];
648
+ }, to = (l, e, t) => {
649
+ const o = l.indexOf(e), n = l.indexOf(t);
650
+ if (o < 0 || n < 0 || o === n) return l;
651
+ const s = [...l], [i] = s.splice(o, 1);
652
+ return i ? (s.splice(n, 0, i), s) : l;
653
+ }, lo = (l) => l.toolbarStorageKey ?? `data-table:${l.columnKeys.join("|") || "empty"}`, oo = () => {
654
+ const l = k(11), e = Zt(), t = Qt();
655
+ if (!e || !t)
656
+ return null;
657
+ const o = t.y + t.height;
658
+ let n;
659
+ l[0] !== e.x || l[1] !== t.y || l[2] !== o ? (n = /* @__PURE__ */ r("line", { x1: e.x, x2: e.x, y1: t.y, y2: o }), l[0] = e.x, l[1] = t.y, l[2] = o, l[3] = n) : n = l[3];
660
+ const s = t.x + t.width;
661
+ let i;
662
+ l[4] !== e.y || l[5] !== t.x || l[6] !== s ? (i = /* @__PURE__ */ r("line", { x1: t.x, x2: s, y1: e.y, y2: e.y }), l[4] = e.y, l[5] = t.x, l[6] = s, l[7] = i) : i = l[7];
663
+ let a;
664
+ return l[8] !== n || l[9] !== i ? (a = /* @__PURE__ */ z("g", { pointerEvents: "none", stroke: "var(--chakra-colors-border-emphasized)", strokeWidth: "1", children: [
665
+ n,
666
+ i
667
+ ] }), l[8] = n, l[9] = i, l[10] = a) : a = l[10], a;
668
+ }, et = (l) => {
669
+ const e = k(47), {
670
+ data: t,
671
+ dataKey: o,
672
+ color: n,
673
+ height: s,
674
+ ariaLabel: i,
675
+ tooltipLabel: a,
676
+ tooltipValue: c,
677
+ tooltipSeriesLabel: d,
678
+ layout: u,
679
+ categoryKey: m,
680
+ domain: h,
681
+ barSize: b,
682
+ barCategoryGap: f
683
+ } = l, g = u === void 0 ? "horizontal" : u, p = f === void 0 ? 1 : f;
684
+ let y;
685
+ e[0] !== n || e[1] !== o ? (y = [{
686
+ name: o,
687
+ color: n
688
+ }], e[0] = n, e[1] = o, e[2] = y) : y = e[2];
689
+ let x;
690
+ e[3] !== t || e[4] !== y ? (x = {
691
+ data: t,
692
+ series: y
693
+ }, e[3] = t, e[4] = y, e[5] = x) : x = e[5];
694
+ const w = Jt(x);
695
+ let C;
696
+ e[6] !== o ? (C = (O) => O[o], e[6] = o, e[7] = C) : C = e[7];
697
+ const S = C;
698
+ let v;
699
+ e[8] !== m ? (v = m ? (O) => O[m] : void 0, e[8] = m, e[9] = v) : v = e[9];
700
+ const R = v, _ = w.data;
701
+ let A;
702
+ e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = {
703
+ top: 2,
704
+ right: 0,
705
+ bottom: 0,
706
+ left: 0
707
+ }, e[10] = A) : A = e[10];
708
+ let $;
709
+ e[11] !== h || e[12] !== R || e[13] !== g ? ($ = g === "vertical" ? /* @__PURE__ */ z(rt, { children: [
710
+ /* @__PURE__ */ r(Xt, { type: "number", domain: h, hide: !0 }),
711
+ /* @__PURE__ */ r(Gt, { type: "category", dataKey: R, hide: !0 })
712
+ ] }) : null, e[11] = h, e[12] = R, e[13] = g, e[14] = $) : $ = e[14];
713
+ let T;
714
+ e[15] !== w || e[16] !== n ? (T = w.color(n), e[15] = w, e[16] = n, e[17] = T) : T = e[17];
715
+ let D;
716
+ e[18] !== b || e[19] !== S || e[20] !== T ? (D = /* @__PURE__ */ r(qt, { dataKey: S, fill: T, barSize: b, isAnimationActive: !1 }), e[18] = b, e[19] = S, e[20] = T, e[21] = D) : D = e[21];
717
+ let H;
718
+ e[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (H = {
719
+ x: !0,
720
+ y: !0
721
+ }, e[22] = H) : H = e[22];
722
+ let K;
723
+ e[23] !== a ? (K = (O, G) => {
724
+ const q = G[0]?.payload;
725
+ return q ? a(q) : O;
726
+ }, e[23] = a, e[24] = K) : K = e[24];
727
+ let B;
728
+ e[25] !== d || e[26] !== c ? (B = (O) => [c(O), d], e[25] = d, e[26] = c, e[27] = B) : B = e[27];
729
+ let P;
730
+ e[28] !== K || e[29] !== B ? (P = /* @__PURE__ */ r(Ne.Tooltip, { labelFormatter: K, formatter: B }), e[28] = K, e[29] = B, e[30] = P) : P = e[30];
731
+ let J;
732
+ e[31] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (J = /* @__PURE__ */ r(oo, {}), e[31] = J) : J = e[31];
733
+ let Z;
734
+ e[32] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Z = {
735
+ zIndex: 1800
736
+ }, e[32] = Z) : Z = e[32];
737
+ let L;
738
+ e[33] !== P ? (L = /* @__PURE__ */ r(Ut, { allowEscapeViewBox: H, content: P, cursor: J, isAnimationActive: !1, wrapperStyle: Z }), e[33] = P, e[34] = L) : L = e[34];
739
+ let E;
740
+ e[35] !== p || e[36] !== w.data || e[37] !== g || e[38] !== D || e[39] !== L || e[40] !== $ ? (E = /* @__PURE__ */ z(Yt, { responsive: !0, data: _, layout: g, margin: A, barCategoryGap: p, children: [
741
+ $,
742
+ D,
743
+ L
744
+ ] }), e[35] = p, e[36] = w.data, e[37] = g, e[38] = D, e[39] = L, e[40] = $, e[41] = E) : E = e[41];
745
+ let W;
746
+ return e[42] !== i || e[43] !== w || e[44] !== s || e[45] !== E ? (W = /* @__PURE__ */ r(Ne.Root, { chart: w, height: s, aspectRatio: "auto", cursor: "crosshair", "aria-label": i, children: E }), e[42] = i, e[43] = w, e[44] = s, e[45] = E, e[46] = W) : W = e[46], W;
747
+ }, no = (l) => ue(l) ? l.sortValue : l, Pe = (l, e) => l.map((t) => no(t[e])).filter((t) => t != null && t !== ""), ro = (l, e) => new Set(Pe(l, e)).size, io = (l, e, t) => {
748
+ const o = Pe(l, e), n = /* @__PURE__ */ new Map();
749
+ for (const c of o)
750
+ n.set(c, (n.get(c) ?? 0) + 1);
751
+ const s = [...n.entries()].map(([c, d]) => ({
752
+ label: String(c),
753
+ count: d,
754
+ percentage: Math.round(d / o.length * 100)
755
+ })).sort((c, d) => d.count - c.count || c.label.localeCompare(d.label)), i = s.slice(0, t), a = s.slice(t).reduce((c, d) => c + d.count, 0);
756
+ return a === 0 ? i : [...i, {
757
+ label: "Other",
758
+ count: a,
759
+ percentage: Math.round(a / o.length * 100)
760
+ }];
761
+ }, so = (l, e, t) => {
762
+ const o = Pe(l, e).filter((c) => typeof c == "number");
763
+ if (o.length === 0) return null;
764
+ const n = Math.min(...o), s = Math.max(...o), i = (s - n) / t, a = Array.from({
765
+ length: t
766
+ }, (c, d) => ({
767
+ start: n + i * d,
768
+ end: n + i * (d + 1),
769
+ count: 0
770
+ }));
771
+ for (const c of o) {
772
+ const d = c === s || i === 0 ? t - 1 : Math.floor((c - n) / i);
773
+ a[d].count += 1;
774
+ }
775
+ return {
776
+ min: n,
777
+ max: s,
778
+ bins: a
779
+ };
780
+ }, oe = new Intl.NumberFormat(void 0, {
781
+ maximumFractionDigits: 2
782
+ }).format, ao = (l) => {
783
+ const e = k(22), {
784
+ rows: t,
785
+ columnId: o
786
+ } = l;
787
+ let n, s, i, a, c, d, u, m;
788
+ if (e[0] !== o || e[1] !== t) {
789
+ const g = ro(t, o);
790
+ s = Y, d = "column", u = "2xs", m = "flex-start", n = j, i = "label/L/medium", a = "1", c = oe(g), e[0] = o, e[1] = t, e[2] = n, e[3] = s, e[4] = i, e[5] = a, e[6] = c, e[7] = d, e[8] = u, e[9] = m;
791
+ } else
792
+ n = e[2], s = e[3], i = e[4], a = e[5], c = e[6], d = e[7], u = e[8], m = e[9];
793
+ let h;
794
+ e[10] !== n || e[11] !== i || e[12] !== a || e[13] !== c ? (h = /* @__PURE__ */ r(n, { textStyle: i, lineHeight: a, children: c }), e[10] = n, e[11] = i, e[12] = a, e[13] = c, e[14] = h) : h = e[14];
795
+ let b;
796
+ e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ r(j, { textStyle: "label/XS/regular", color: "fg.muted", children: "unique values" }), e[15] = b) : b = e[15];
797
+ let f;
798
+ return e[16] !== s || e[17] !== d || e[18] !== u || e[19] !== m || e[20] !== h ? (f = /* @__PURE__ */ z(s, { direction: d, gap: u, alignItems: m, children: [
799
+ h,
800
+ b
801
+ ] }), e[16] = s, e[17] = d, e[18] = u, e[19] = m, e[20] = h, e[21] = f) : f = e[21], f;
802
+ }, co = (l) => {
803
+ const e = k(36), {
804
+ rows: t,
805
+ columnId: o,
806
+ binCount: n
807
+ } = l;
808
+ let s, i, a, c, d, u, m, h, b, f, g, p, y, x;
809
+ if (e[0] !== n || e[1] !== o || e[2] !== t) {
810
+ u = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
811
+ e: {
812
+ const v = so(t, o, n);
813
+ if (!v) {
814
+ let R;
815
+ e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ r(j, { textStyle: "label/XS/regular", color: "fg.muted", children: "No numeric values" }), e[17] = R) : R = e[17], u = R;
816
+ break e;
817
+ }
818
+ a = Y, g = "column", p = "100%", y = "2xs", x = /* @__PURE__ */ r(et, { data: v.bins, dataKey: "count", color: "vis.categorical.1", height: "40px", ariaLabel: `Distribution for ${o}`, tooltipLabel: ho, tooltipValue: bo, tooltipSeriesLabel: "Count" }), i = Y, h = "space-between", b = "xs", f = /* @__PURE__ */ r(j, { textStyle: "label/XS/regular", color: "fg.muted", children: oe(v.min) }), s = j, c = "label/XS/regular", d = "fg.muted", m = oe(v.max);
819
+ }
820
+ e[0] = n, e[1] = o, e[2] = t, e[3] = s, e[4] = i, e[5] = a, e[6] = c, e[7] = d, e[8] = u, e[9] = m, e[10] = h, e[11] = b, e[12] = f, e[13] = g, e[14] = p, e[15] = y, e[16] = x;
821
+ } else
822
+ s = e[3], i = e[4], a = e[5], c = e[6], d = e[7], u = e[8], m = e[9], h = e[10], b = e[11], f = e[12], g = e[13], p = e[14], y = e[15], x = e[16];
823
+ if (u !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
824
+ return u;
825
+ let w;
826
+ e[18] !== s || e[19] !== c || e[20] !== d || e[21] !== m ? (w = /* @__PURE__ */ r(s, { textStyle: c, color: d, children: m }), e[18] = s, e[19] = c, e[20] = d, e[21] = m, e[22] = w) : w = e[22];
827
+ let C;
828
+ e[23] !== i || e[24] !== w || e[25] !== h || e[26] !== b || e[27] !== f ? (C = /* @__PURE__ */ z(i, { justifyContent: h, gap: b, children: [
829
+ f,
830
+ w
831
+ ] }), e[23] = i, e[24] = w, e[25] = h, e[26] = b, e[27] = f, e[28] = C) : C = e[28];
832
+ let S;
833
+ return e[29] !== a || e[30] !== C || e[31] !== g || e[32] !== p || e[33] !== y || e[34] !== x ? (S = /* @__PURE__ */ z(a, { direction: g, width: p, gap: y, children: [
834
+ x,
835
+ C
836
+ ] }), e[29] = a, e[30] = C, e[31] = g, e[32] = p, e[33] = y, e[34] = x, e[35] = S) : S = e[35], S;
837
+ }, uo = (l) => {
838
+ const e = k(14), {
839
+ rows: t,
840
+ columnId: o,
841
+ limit: n
842
+ } = l;
843
+ let s, i, a, c, d;
844
+ if (e[0] !== o || e[1] !== n || e[2] !== t) {
845
+ const m = io(t, o, n);
846
+ s = Y, i = "column", a = "100%", c = "2xs", d = m.map(xo), e[0] = o, e[1] = n, e[2] = t, e[3] = s, e[4] = i, e[5] = a, e[6] = c, e[7] = d;
847
+ } else
848
+ s = e[3], i = e[4], a = e[5], c = e[6], d = e[7];
849
+ let u;
850
+ return e[8] !== s || e[9] !== i || e[10] !== a || e[11] !== c || e[12] !== d ? (u = /* @__PURE__ */ r(s, { direction: i, width: a, gap: c, children: d }), e[8] = s, e[9] = i, e[10] = a, e[11] = c, e[12] = d, e[13] = u) : u = e[13], u;
851
+ }, mo = (l) => {
852
+ const e = k(11), {
853
+ rows: t,
854
+ columnId: o,
855
+ stat: n
856
+ } = l;
857
+ if (n.type === "unique") {
858
+ let a;
859
+ return e[0] !== o || e[1] !== t ? (a = /* @__PURE__ */ r(ao, { rows: t, columnId: o }), e[0] = o, e[1] = t, e[2] = a) : a = e[2], a;
860
+ }
861
+ if (n.type === "histogram") {
862
+ const a = n.bins ?? 10;
863
+ let c;
864
+ return e[3] !== o || e[4] !== t || e[5] !== a ? (c = /* @__PURE__ */ r(co, { rows: t, columnId: o, binCount: a }), e[3] = o, e[4] = t, e[5] = a, e[6] = c) : c = e[6], c;
865
+ }
866
+ const s = n.limit ?? 2;
867
+ let i;
868
+ return e[7] !== o || e[8] !== t || e[9] !== s ? (i = /* @__PURE__ */ r(uo, { rows: t, columnId: o, limit: s }), e[7] = o, e[8] = t, e[9] = s, e[10] = i) : i = e[10], i;
869
+ }, fo = (l) => {
870
+ const e = k(12), {
871
+ header: t,
872
+ headerGroup: o,
873
+ rows: n,
874
+ columnStats: s,
875
+ fullWidth: i
876
+ } = l, a = s[t.column.id], c = a?.type;
877
+ let d;
878
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = {
879
+ borderRight: "none"
880
+ }, e[0] = d) : d = e[0];
881
+ const u = i && o.headers.indexOf(t) === o.headers.length - 1 ? void 0 : `calc(var(--header-${t.id}-size) * 1px)`;
882
+ let m;
883
+ e[1] !== u ? (m = {
884
+ width: u
885
+ }, e[1] = u, e[2] = m) : m = e[2];
886
+ let h;
887
+ e[3] !== t.column.id || e[4] !== n || e[5] !== a ? (h = a ? /* @__PURE__ */ r(mo, { rows: n, columnId: t.column.id, stat: a }) : null, e[3] = t.column.id, e[4] = n, e[5] = a, e[6] = h) : h = e[6];
888
+ let b;
889
+ return e[7] !== t.column.id || e[8] !== c || e[9] !== m || e[10] !== h ? (b = /* @__PURE__ */ r(ee.ColumnHeader, { "data-column-id": t.column.id, "data-stat-type": c, borderRight: "1px solid", _last: d, borderColor: "border.subtle", padding: "xs", verticalAlign: "middle", overflow: "hidden", style: m, children: h }), e[7] = t.column.id, e[8] = c, e[9] = m, e[10] = h, e[11] = b) : b = e[11], b;
890
+ }, go = (l) => {
891
+ const e = k(8), {
892
+ headerGroup: t,
893
+ rows: o,
894
+ columnStats: n,
895
+ fullWidth: s,
896
+ noBorder: i
897
+ } = l;
898
+ if (!t.headers.some((m) => n[m.column.id]))
899
+ return null;
900
+ const c = i ? "none" : "1px solid";
901
+ let d;
902
+ e[0] !== n || e[1] !== s || e[2] !== t || e[3] !== o ? (d = t.headers.map((m) => /* @__PURE__ */ r(fo, { header: m, headerGroup: t, rows: o, columnStats: n, fullWidth: s }, m.id)), e[0] = n, e[1] = s, e[2] = t, e[3] = o, e[4] = d) : d = e[4];
903
+ let u;
904
+ return e[5] !== c || e[6] !== d ? (u = /* @__PURE__ */ r(ee.Row, { className: "data-table-stats-row", borderRight: c, borderColor: "border.subtle", children: d }), e[5] = c, e[6] = d, e[7] = u) : u = e[7], u;
905
+ };
906
+ function ho(l) {
907
+ return `${oe(l.start)} – ${oe(l.end)}`;
908
+ }
909
+ function bo(l) {
910
+ return `${oe(Number(l))} values`;
911
+ }
912
+ function po(l) {
913
+ return `${l.label} · ${oe(l.count)} values`;
914
+ }
915
+ function So(l) {
916
+ return `${oe(Number(l))}%`;
917
+ }
918
+ function xo(l) {
919
+ return /* @__PURE__ */ z(_e, { position: "relative", height: "18px", children: [
920
+ /* @__PURE__ */ r(et, { data: [l], dataKey: "percentage", categoryKey: "label", color: "vis.sequential.blue.low-3", height: "18px", ariaLabel: `${l.label}: ${l.percentage}%`, layout: "vertical", domain: [0, 100], barSize: 18, tooltipLabel: po, tooltipValue: So, tooltipSeriesLabel: "Share" }),
921
+ /* @__PURE__ */ z(Y, { position: "absolute", inset: "0", paddingX: "2xs", justifyContent: "space-between", gap: "xs", pointerEvents: "none", children: [
922
+ /* @__PURE__ */ r(j, { textStyle: "label/XS/regular", truncate: !0, children: l.label }),
923
+ /* @__PURE__ */ z(j, { textStyle: "label/XS/medium", color: "fg.muted", children: [
924
+ l.percentage,
925
+ "%"
926
+ ] })
927
+ ] })
928
+ ] }, l.label);
929
+ }
930
+ const Co = /* @__PURE__ */ new Set(["rowIndex", "rowSelection", "rowActions"]), yo = (l) => l === "asc" ? Ge : l === "desc" ? qe : Tt, wo = (l) => {
931
+ const e = k(37), {
932
+ header: t,
933
+ headerGroup: o,
934
+ table: n,
935
+ fullWidth: s,
936
+ hasDescription: i
937
+ } = l;
938
+ let a, c, d;
939
+ if (e[0] !== t.column || e[1] !== n) {
940
+ c = t.column.getIsSorted();
941
+ let A;
942
+ e[5] !== t.column.id || e[6] !== n ? (A = !Co.has(t.column.id) && n.getCoreRowModel().rows.length > 1, e[5] = t.column.id, e[6] = n, e[7] = A) : A = e[7], a = A, d = yo(c), e[0] = t.column, e[1] = n, e[2] = a, e[3] = c, e[4] = d;
943
+ } else
944
+ a = e[2], c = e[3], d = e[4];
945
+ const u = d;
946
+ let m;
947
+ e[8] !== t ? (m = t.column.id === "rowSelection" ? "Select all" : we(t.column.columnDef.header, t.getContext()), e[8] = t, e[9] = m) : m = e[9];
948
+ const h = m, b = t.column.id;
949
+ let f;
950
+ e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = {
951
+ borderRight: "none"
952
+ }, e[10] = f) : f = e[10];
953
+ const g = t.id, p = s && o.headers.indexOf(t) === o.headers.length - 1 ? void 0 : `calc(var(--header-${t.id}-size) * 1px)`;
954
+ let y;
955
+ e[11] !== p ? (y = {
956
+ width: p
957
+ }, e[11] = p, e[12] = y) : y = e[12];
958
+ let x;
959
+ e[13] !== t ? (x = we(t.column.columnDef.header, t.getContext()), e[13] = t, e[14] = x) : x = e[14];
960
+ let w;
961
+ e[15] !== x ? (w = /* @__PURE__ */ r(j, { textStyle: "label/S/medium", lineHeight: "1.2", truncate: !0, children: x }), e[15] = x, e[16] = w) : w = e[16];
962
+ let C;
963
+ e[17] !== u || e[18] !== a || e[19] !== t.column || e[20] !== c ? (C = a && /* @__PURE__ */ z(V.Root, { children: [
964
+ /* @__PURE__ */ r(V.Trigger, { asChild: !0, children: /* @__PURE__ */ r(le, { ml: "2px", size: "2xs", "aria-label": c ? `Sorted ${c}` : "Sort column", variant: "ghost", visibility: c ? "visible" : "hidden", _groupHover: {
965
+ visibility: "visible"
966
+ }, children: /* @__PURE__ */ r(N, { as: u, boxSize: "14px" }) }) }),
967
+ /* @__PURE__ */ r(se, { children: /* @__PURE__ */ r(V.Positioner, { children: /* @__PURE__ */ z(V.Content, { zIndex: "popover", bg: "bg", children: [
968
+ /* @__PURE__ */ r(V.Item, { value: "sort-asc", asChild: !0, children: /* @__PURE__ */ r(ie, { asChild: !0, variant: "full-width", label: "Sort ascending", icon: /* @__PURE__ */ r(N, { as: Ge, boxSize: "16px" }), disabled: c === "asc", onActivate: () => t.column.toggleSorting(!1) }) }),
969
+ /* @__PURE__ */ r(V.Item, { value: "sort-desc", asChild: !0, children: /* @__PURE__ */ r(ie, { asChild: !0, variant: "full-width", label: "Sort descending", icon: /* @__PURE__ */ r(N, { as: qe, boxSize: "16px" }), disabled: c === "desc", onActivate: () => t.column.toggleSorting(!0) }) }),
970
+ c && /* @__PURE__ */ r(V.Item, { value: "clear-sort", asChild: !0, children: /* @__PURE__ */ r(ie, { asChild: !0, variant: "full-width", label: "Clear sort", onActivate: () => t.column.clearSorting() }) })
971
+ ] }) }) })
972
+ ] }), e[17] = u, e[18] = a, e[19] = t.column, e[20] = c, e[21] = C) : C = e[21];
973
+ let S;
974
+ e[22] !== t ? (S = t.column.getCanResize() && /* @__PURE__ */ r("span", { onDoubleClick: () => t.column.resetSize(), onMouseDown: t.getResizeHandler(), onTouchStart: t.getResizeHandler(), className: `resizer ${t.column.getIsResizing() ? "isResizing" : ""}` }), e[22] = t, e[23] = S) : S = e[23];
975
+ let v;
976
+ e[24] !== S || e[25] !== w || e[26] !== C ? (v = /* @__PURE__ */ z(Y, { className: "group", alignItems: "center", justifyContent: "space-between", gap: "1", flex: "1", minW: "0", children: [
977
+ w,
978
+ C,
979
+ S
980
+ ] }), e[24] = S, e[25] = w, e[26] = C, e[27] = v) : v = e[27];
981
+ let R;
982
+ e[28] !== i || e[29] !== v || e[30] !== h ? (R = /* @__PURE__ */ r(Je, { content: h, disabled: i, children: v }), e[28] = i, e[29] = v, e[30] = h, e[31] = R) : R = e[31];
983
+ let _;
984
+ return e[32] !== t.column.id || e[33] !== t.id || e[34] !== R || e[35] !== y ? (_ = /* @__PURE__ */ r(ee.ColumnHeader, { "data-column-id": b, textTransform: "none", borderRight: "1px solid", _last: f, borderColor: "border.subtle", paddingX: "xs", paddingY: "xs", overflow: "hidden", position: "relative", verticalAlign: "middle", whiteSpace: "nowrap", style: y, children: R }, g), e[32] = t.column.id, e[33] = t.id, e[34] = R, e[35] = y, e[36] = _) : _ = e[36], _;
985
+ }, vo = (l) => {
986
+ const e = k(20), {
987
+ cell: t,
988
+ row: o,
989
+ getCellContextMenuActions: n
990
+ } = l, s = t.column.columnDef.meta;
991
+ let i;
992
+ e[0] !== t || e[1] !== s ? (i = s?.getCellStyle?.(t.getValue()), e[0] = t, e[1] = s, e[2] = i) : i = e[2];
993
+ const a = i;
994
+ let c;
995
+ if (e[3] !== t || e[4] !== n || e[5] !== o.id || e[6] !== o.original) {
996
+ const y = {
997
+ row: o.original,
998
+ rowId: o.id,
999
+ columnId: t.column.id,
1000
+ value: t.getValue()
1001
+ };
1002
+ c = n?.(y).map((x) => ({
1003
+ key: x.label,
1004
+ label: x.label,
1005
+ icon: x.icon,
1006
+ onClick: () => x.onSelect(y)
1007
+ })) ?? [], e[3] = t, e[4] = n, e[5] = o.id, e[6] = o.original, e[7] = c;
1008
+ } else
1009
+ c = e[7];
1010
+ const d = c, u = t.column.id;
1011
+ let m;
1012
+ e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = {
1013
+ borderRight: "none"
1014
+ }, e[8] = m) : m = e[8];
1015
+ const h = t.id;
1016
+ let b;
1017
+ e[9] !== t ? (b = we(t.column.columnDef.cell, t.getContext()), e[9] = t, e[10] = b) : b = e[10];
1018
+ let f;
1019
+ e[11] !== t.column.id || e[12] !== t.id || e[13] !== a || e[14] !== b ? (f = /* @__PURE__ */ r(ee.Cell, { "data-column-id": u, width: "fit-content", maxWidth: "12rem", overflow: "hidden", padding: "xs", borderRight: "1px solid", borderColor: "border.subtle", _last: m, borderBottom: "none", textStyle: "paragraph/S/regular", textOverflow: "ellipsis", whiteSpace: "nowrap", style: a, children: b }, h), e[11] = t.column.id, e[12] = t.id, e[13] = a, e[14] = b, e[15] = f) : f = e[15];
1020
+ const g = f;
1021
+ if (d.length === 0)
1022
+ return g;
1023
+ let p;
1024
+ return e[16] !== t.id || e[17] !== g || e[18] !== d ? (p = /* @__PURE__ */ r(Mt, { actions: d, children: g }, t.id), e[16] = t.id, e[17] = g, e[18] = d, e[19] = p) : p = e[19], p;
1025
+ }, Ro = (l) => {
1026
+ const e = k(21), {
1027
+ row: t,
1028
+ noBorder: o,
1029
+ rowIsInteractive: n,
1030
+ rowIsActive: s,
1031
+ rowIsSelected: i,
1032
+ onRowClick: a,
1033
+ getCellContextMenuActions: c
1034
+ } = l, d = t.id, u = s ? "true" : void 0, m = i ? "true" : void 0, h = i ? "true" : void 0, b = n ? "pointer" : void 0;
1035
+ let f;
1036
+ e[0] !== a || e[1] !== t.original || e[2] !== n ? (f = n ? () => a?.(t.original) : void 0, e[0] = a, e[1] = t.original, e[2] = n, e[3] = f) : f = e[3];
1037
+ const g = o ? "none" : "1px solid", p = o ? "none" : "1px solid", y = o ? "none" : "1px solid";
1038
+ let x;
1039
+ e[4] !== y ? (x = {
1040
+ borderBottom: y,
1041
+ borderColor: "border.subtle"
1042
+ }, e[4] = y, e[5] = x) : x = e[5];
1043
+ const w = s ? "bg.active" : "bg";
1044
+ let C;
1045
+ e[6] !== c || e[7] !== t ? (C = t.getVisibleCells().map((v) => /* @__PURE__ */ r(vo, { cell: v, row: t, getCellContextMenuActions: c }, v.id)), e[6] = c, e[7] = t, e[8] = C) : C = e[8];
1046
+ let S;
1047
+ return e[9] !== t.id || e[10] !== u || e[11] !== w || e[12] !== C || e[13] !== m || e[14] !== h || e[15] !== b || e[16] !== f || e[17] !== g || e[18] !== p || e[19] !== x ? (S = /* @__PURE__ */ r(ee.Row, { "data-active": u, "data-selected": m, "aria-selected": h, cursor: b, onClick: f, borderTop: g, borderBottom: "1px solid", borderRight: p, _last: x, borderColor: "border.subtle", background: w, children: C }, d), e[9] = t.id, e[10] = u, e[11] = w, e[12] = C, e[13] = m, e[14] = h, e[15] = b, e[16] = f, e[17] = g, e[18] = p, e[19] = x, e[20] = S) : S = e[20], S;
1048
+ };
1049
+ function Io(l) {
1050
+ const e = k(71), {
1051
+ table: t,
1052
+ pageIndex: o,
1053
+ pageSize: n,
1054
+ pageSizeOptions: s
1055
+ } = l;
1056
+ let i;
1057
+ e[0] !== t ? (i = t.getPageCount(), e[0] = t, e[1] = i) : i = e[1];
1058
+ const a = Math.max(i, 1), c = o > 0, d = o < a - 1;
1059
+ let u;
1060
+ e[2] !== t ? (u = t.getCoreRowModel(), e[2] = t, e[3] = u) : u = e[3];
1061
+ let m;
1062
+ e[4] !== u.rows.length ? (m = /* @__PURE__ */ z(j, { textStyle: "label/S/regular", children: [
1063
+ u.rows.length,
1064
+ " rows"
1065
+ ] }), e[4] = u.rows.length, e[5] = m) : m = e[5];
1066
+ let h;
1067
+ e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ r(j, { textStyle: "label/S/regular", children: "Rows per page" }), e[6] = h) : h = e[6];
1068
+ let b;
1069
+ e[7] !== n ? (b = /* @__PURE__ */ r(V.Trigger, { asChild: !0, children: /* @__PURE__ */ r(ce, { size: "xs", variant: "outline", children: n }) }), e[7] = n, e[8] = b) : b = e[8];
1070
+ let f;
1071
+ if (e[9] !== n || e[10] !== s || e[11] !== t) {
1072
+ let U;
1073
+ e[13] !== n || e[14] !== t ? (U = (Q) => /* @__PURE__ */ r(V.Item, { value: `${Q}`, asChild: !0, children: /* @__PURE__ */ r(ie, { asChild: !0, variant: "full-width", label: `${Q}`, isSelected: Q === n, onActivate: () => t.setPageSize(Q) }) }, Q), e[13] = n, e[14] = t, e[15] = U) : U = e[15], f = s.map(U), e[9] = n, e[10] = s, e[11] = t, e[12] = f;
1074
+ } else
1075
+ f = e[12];
1076
+ let g;
1077
+ e[16] !== f ? (g = /* @__PURE__ */ r(se, { children: /* @__PURE__ */ r(V.Positioner, { children: /* @__PURE__ */ r(V.Content, { zIndex: "popover", bg: "bg", children: f }) }) }), e[16] = f, e[17] = g) : g = e[17];
1078
+ let p;
1079
+ e[18] !== b || e[19] !== g ? (p = /* @__PURE__ */ z(Y, { alignItems: "center", gap: "xs", marginRight: "sm", children: [
1080
+ h,
1081
+ /* @__PURE__ */ z(V.Root, { children: [
1082
+ b,
1083
+ g
1084
+ ] })
1085
+ ] }), e[18] = b, e[19] = g, e[20] = p) : p = e[20];
1086
+ let y;
1087
+ e[21] !== t ? (y = () => t.setPageIndex(0), e[21] = t, e[22] = y) : y = e[22];
1088
+ const x = !c;
1089
+ let w;
1090
+ e[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ r(N, { as: Dt, boxSize: "14px" }), e[23] = w) : w = e[23];
1091
+ let C;
1092
+ e[24] !== x || e[25] !== y ? (C = /* @__PURE__ */ r(le, { size: "xs", "aria-label": "Go to first page", onClick: y, disabled: x, children: w }), e[24] = x, e[25] = y, e[26] = C) : C = e[26];
1093
+ let S;
1094
+ e[27] !== o || e[28] !== t ? (S = () => t.setPageIndex(o - 1), e[27] = o, e[28] = t, e[29] = S) : S = e[29];
1095
+ const v = !c;
1096
+ let R;
1097
+ e[30] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ r(N, { as: Vt, boxSize: "14px" }), e[30] = R) : R = e[30];
1098
+ let _;
1099
+ e[31] !== S || e[32] !== v ? (_ = /* @__PURE__ */ r(le, { size: "xs", "aria-label": "Go to previous page", onClick: S, disabled: v, children: R }), e[31] = S, e[32] = v, e[33] = _) : _ = e[33];
1100
+ let A;
1101
+ e[34] !== o || e[35] !== t ? (A = () => t.setPageIndex(o + 1), e[34] = o, e[35] = t, e[36] = A) : A = e[36];
1102
+ const $ = !d;
1103
+ let T;
1104
+ e[37] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ r(N, { as: Xe, boxSize: "14px" }), e[37] = T) : T = e[37];
1105
+ let D;
1106
+ e[38] !== A || e[39] !== $ ? (D = /* @__PURE__ */ r(le, { size: "xs", "aria-label": "Go to next page", onClick: A, disabled: $, children: T }), e[38] = A, e[39] = $, e[40] = D) : D = e[40];
1107
+ let H;
1108
+ e[41] !== t ? (H = () => t.setPageIndex(t.getPageCount() - 1), e[41] = t, e[42] = H) : H = e[42];
1109
+ const K = !d;
1110
+ let B;
1111
+ e[43] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (B = /* @__PURE__ */ r(N, { as: Pt, boxSize: "14px" }), e[43] = B) : B = e[43];
1112
+ let P;
1113
+ e[44] !== H || e[45] !== K ? (P = /* @__PURE__ */ r(le, { size: "xs", "aria-label": "Go to last page", onClick: H, disabled: K, children: B }), e[44] = H, e[45] = K, e[46] = P) : P = e[46];
1114
+ let J;
1115
+ e[47] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (J = /* @__PURE__ */ r(j, { children: "Page" }), e[47] = J) : J = e[47];
1116
+ const Z = `${o + 1}`;
1117
+ let L;
1118
+ e[48] !== t || e[49] !== a ? (L = (U) => {
1119
+ const Q = Number.isNaN(U.valueAsNumber) ? 1 : U.valueAsNumber, F = Math.min(a, Math.max(1, Q));
1120
+ t.setPageIndex(F - 1);
1121
+ }, e[48] = t, e[49] = a, e[50] = L) : L = e[50];
1122
+ let E;
1123
+ e[51] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ r(el, { className: "nodrag" }), e[51] = E) : E = e[51];
1124
+ let W;
1125
+ e[52] !== Z || e[53] !== L || e[54] !== a ? (W = /* @__PURE__ */ r(tl, { margin: "2xs", width: "3rem", size: "xs", min: 1, max: a, value: Z, onValueChange: L, children: E }), e[52] = Z, e[53] = L, e[54] = a, e[55] = W) : W = e[55];
1126
+ let O;
1127
+ e[56] !== a ? (O = /* @__PURE__ */ z(j, { children: [
1128
+ "of ",
1129
+ a
1130
+ ] }), e[56] = a, e[57] = O) : O = e[57];
1131
+ let G;
1132
+ e[58] !== W || e[59] !== O ? (G = /* @__PURE__ */ z(Y, { alignItems: "center", height: "100%", marginLeft: "sm", marginRight: "md", gap: "xs", children: [
1133
+ J,
1134
+ W,
1135
+ O
1136
+ ] }), e[58] = W, e[59] = O, e[60] = G) : G = e[60];
1137
+ let q;
1138
+ e[61] !== C || e[62] !== _ || e[63] !== D || e[64] !== P || e[65] !== G || e[66] !== p ? (q = /* @__PURE__ */ z(be, { alignItems: "center", direction: "row", justifyContent: "flex-end", paddingY: "xs", children: [
1139
+ p,
1140
+ C,
1141
+ _,
1142
+ D,
1143
+ P,
1144
+ G
1145
+ ] }), e[61] = C, e[62] = _, e[63] = D, e[64] = P, e[65] = G, e[66] = p, e[67] = q) : q = e[67];
1146
+ let ae;
1147
+ return e[68] !== m || e[69] !== q ? (ae = /* @__PURE__ */ z(Y, { alignItems: "center", justifyContent: "space-between", borderTop: "1px solid", borderColor: "border.subtle", paddingX: "xs", children: [
1148
+ m,
1149
+ q
1150
+ ] }), e[68] = m, e[69] = q, e[70] = ae) : ae = e[70], ae;
1151
+ }
1152
+ const Wo = (l) => {
1153
+ const {
1154
+ data: e,
1155
+ noBorder: t,
1156
+ fullWidth: o,
1157
+ hiddenColumns: n,
1158
+ onRowClick: s,
1159
+ isRowInteractive: i,
1160
+ activeRowId: a,
1161
+ columnIcons: c,
1162
+ columnDescriptions: d,
1163
+ compactHeaders: u,
1164
+ columnStats: m,
1165
+ columnRenderers: h,
1166
+ initialPageSize: b,
1167
+ pageSizeOptions: f = [10, 20, 30, 50, 100],
1168
+ rowActions: g = [],
1169
+ getRowId: p,
1170
+ toolbarStorageKey: y,
1171
+ enableRowActivation: x = !1,
1172
+ getCellContextMenuActions: w
1173
+ } = l, [C, S] = re([]), [v, R] = re(() => ({
1174
+ pageIndex: 0,
1175
+ pageSize: Kl({
1176
+ initialPageSize: b
1177
+ })
1178
+ })), [_, A] = re({}), [$, T] = re(() => {
1179
+ const I = new Set(n ?? []);
1180
+ return Object.keys(e[0] || {}).filter((M) => !I.has(M));
1181
+ }), [D, H] = re(() => /* @__PURE__ */ new Set()), K = new Set(n ?? []), B = Object.keys(e[0] || {}).filter((I) => !K.has(I)), P = Ke(B, $), J = new Set(P.filter((I) => !D.has(I))), Z = P.filter((I) => J.has(I)), L = Gl(l), E = Xl(l), W = Zl(e, P, u), O = Ql(e, P, p), G = lo({
1182
+ toolbarStorageKey: y,
1183
+ columnKeys: B
1184
+ }), q = St(G, (I) => I.filters, {
1185
+ settings: {
1186
+ viewMode: "list"
1187
+ }
1188
+ }), U = eo(O, q, W).map((I) => I.sourceRow), Q = Ll(e, Z, {
1189
+ columnIcons: c,
1190
+ columnDescriptions: d,
1191
+ compactHeaders: u,
1192
+ enableSelection: L,
1193
+ rowActions: g,
1194
+ selectedRowIds: _,
1195
+ columnRenderers: h
1196
+ }), F = ct({
1197
+ data: U,
1198
+ columns: Q,
1199
+ defaultColumn: {
1200
+ size: 150,
1201
+ minSize: 40,
1202
+ maxSize: 800
1203
+ },
1204
+ state: {
1205
+ sorting: C,
1206
+ pagination: v,
1207
+ rowSelection: _
1208
+ },
1209
+ getRowId: (I, M) => Ve(I, M, p),
1210
+ columnResizeMode: "onChange",
1211
+ columnResizeDirection: "ltr",
1212
+ onSortingChange: S,
1213
+ onPaginationChange: R,
1214
+ onRowSelectionChange: A,
1215
+ getSortedRowModel: mt(),
1216
+ getCoreRowModel: ut(),
1217
+ getPaginationRowModel: dt(),
1218
+ enableMultiRowSelection: L,
1219
+ enableRowSelection: L,
1220
+ autoResetAll: !1
1221
+ });
1222
+ gt(() => {
1223
+ const I = F.getPageCount();
1224
+ I === 0 || v.pageIndex < I || R((M) => ({
1225
+ ...M,
1226
+ pageIndex: Math.max(I - 1, 0)
1227
+ }));
1228
+ }, [v.pageIndex, F]);
1229
+ const tt = (() => {
1230
+ const I = F.getFlatHeaders(), M = {};
1231
+ for (let X = 0; X < I.length; X++) {
1232
+ const ne = I[X];
1233
+ M[`--header-${ne.id}-size`] = ne.getSize(), M[`--col-${ne.column.id}-size`] = ne.column.getSize();
1234
+ }
1235
+ return M;
1236
+ })(), Me = F.getSelectedRowModel().rows, lt = F.getCoreRowModel().rows, ot = Jl(Me), nt = /* @__PURE__ */ r(Ol, { columns: P.map((I) => ({
1237
+ id: I,
1238
+ label: u?.[I] ?? I
1239
+ })), visibleColumnIds: J, onColumnToggle: (I) => H((M) => {
1240
+ const X = new Set(M);
1241
+ return X.has(I) ? X.delete(I) : X.add(I), X;
1242
+ }), onColumnReorder: (I, M) => T((X) => to(Ke(B, X), I, M)) });
1243
+ return /* @__PURE__ */ z(Y, { direction: "column", height: "100%", width: "100%", children: [
1244
+ /* @__PURE__ */ r(Wl, { rows: O, storageKey: G, attributes: W, selectedCount: L ? Me.length : 0, totalCount: lt.length, visibleCount: U.length, onClearSelection: () => F.toggleAllRowsSelected(!1), onSelectAll: () => F.toggleAllRowsSelected(!0), actions: E, selectedRows: ot, columnControl: nt }),
1245
+ /* @__PURE__ */ r(Ae, { height: "100%", maxWidth: "unset", showHorizontalScrollbar: !0, children: /* @__PURE__ */ z(ee.Root, { className: `data-table${o ? " full-width" : ""}`, style: {
1246
+ ...tt,
1247
+ width: o ? "100%" : F.getTotalSize()
1248
+ }, children: [
1249
+ /* @__PURE__ */ r(ee.Header, { children: F.getHeaderGroups().map((I) => /* @__PURE__ */ z(ht, { children: [
1250
+ /* @__PURE__ */ r(ee.Row, { className: "data-table-column-header-row", borderRight: t ? "none" : "1px solid", borderColor: "border.subtle", children: I.headers.map((M) => /* @__PURE__ */ r(wo, { header: M, headerGroup: I, table: F, fullWidth: o, hasDescription: !!d?.[M.column.id] }, M.id)) }),
1251
+ m ? /* @__PURE__ */ r(go, { headerGroup: I, rows: U, columnStats: m, noBorder: t, fullWidth: o }) : null
1252
+ ] }, I.id)) }),
1253
+ /* @__PURE__ */ r(ee.Body, { children: F.getRowModel().rows.map((I) => {
1254
+ const M = s ? i?.(I.original) ?? !0 : !1, X = ql({
1255
+ enableRowActivation: x,
1256
+ activeRowId: a,
1257
+ rowId: I.id
1258
+ }), ne = I.getIsSelected();
1259
+ return /* @__PURE__ */ r(Ro, { row: I, noBorder: t, rowIsInteractive: M, rowIsActive: X, rowIsSelected: ne, onRowClick: s, getCellContextMenuActions: w }, I.id);
1260
+ }) })
1261
+ ] }) }),
1262
+ F.getPageCount() > 1 && /* @__PURE__ */ r(Io, { table: F, pageIndex: v.pageIndex, pageSize: v.pageSize, pageSizeOptions: f })
1263
+ ] });
1264
+ };
1265
+ export {
1266
+ Wo as DataTable,
1267
+ zl as FriendlyJsonDisplay,
1268
+ pl as formatDisplayValue,
1269
+ bl as getIcon
1270
+ };
1271
+ //# sourceMappingURL=data-table.js.map