@daisforge/ui 1.22.0 → 1.23.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 (485) hide show
  1. package/chunks/AiAgentPopup-CLGSjg5L.cjs +11 -0
  2. package/chunks/AiAgentPopup-CtMhai1X.mjs +797 -0
  3. package/chunks/AnalyticalWidget-Bvcm1qpU.cjs +43 -0
  4. package/chunks/AnalyticalWidget-CRfihris.mjs +352 -0
  5. package/chunks/ApprovalCenter-D7K7J-QB.cjs +1 -0
  6. package/chunks/{ApprovalCenter-DLKZP2AO.mjs → ApprovalCenter-dJpI91uN.mjs} +10 -10
  7. package/chunks/BlockTitle-CcYYHiOo.cjs +1 -0
  8. package/chunks/{BlockTitle-DsXxImR6.mjs → BlockTitle-DCmM-9AN.mjs} +2 -2
  9. package/chunks/{Container-DbZwlfIM.mjs → Container-C7PzvUwd.mjs} +1 -1
  10. package/chunks/{Container-DHnX1sHY.cjs → Container-bVqI3en9.cjs} +1 -1
  11. package/chunks/{EmptyState-DH1xawxg.cjs → EmptyState-D-bmtvmy.cjs} +1 -1
  12. package/chunks/{EmptyState-CUCseg9M.mjs → EmptyState-ZsOlvU4d.mjs} +1 -1
  13. package/chunks/{FiltersActions-BJ5gD6Nx.mjs → FiltersActions-CS27WxA6.mjs} +15 -15
  14. package/chunks/FiltersActions-Cie245Po.cjs +1 -0
  15. package/chunks/{FormSegmentGroup-BYQ6yMK1.cjs → FormSegmentGroup-CNIqOYfm.cjs} +1 -1
  16. package/chunks/{FormSegmentGroup-C9qYxYT9.mjs → FormSegmentGroup-DwTRM58f.mjs} +1 -1
  17. package/chunks/{GridDND-DK6SAO8q.cjs → GridDND-Bwmr7gla.cjs} +1 -1
  18. package/chunks/{GridDND-CqvpXgCY.mjs → GridDND-DC5VoxEY.mjs} +83 -83
  19. package/chunks/{LeftPanel-C5SsoRJS.mjs → LeftPanel-C10BLKIn.mjs} +1 -1
  20. package/chunks/{LeftPanel-AyuV7bGS.cjs → LeftPanel-upGFk7jM.cjs} +1 -1
  21. package/chunks/{ListOfFilters-CfV2bs_4.mjs → ListOfFilters-CEWrWotU.mjs} +3 -3
  22. package/chunks/{ListOfFilters-mqTsQbq_.cjs → ListOfFilters-DNi-z1cn.cjs} +1 -1
  23. package/chunks/MassActions-DJiKcC6r.cjs +1 -0
  24. package/chunks/{MassActions-C6LY-g9r.mjs → MassActions-NLCRjIHw.mjs} +46 -46
  25. package/chunks/PageTitle-Bg4PNEXS.cjs +9 -0
  26. package/chunks/{PageTitle-DkfAiZM4.mjs → PageTitle-CXtNgH-b.mjs} +7 -7
  27. package/chunks/{SplitView-BqS1Jbo4.mjs → SplitView-BzamJzNc.mjs} +17 -17
  28. package/chunks/{SplitView-DNmd4sJe.cjs → SplitView-DeJ3V-kq.cjs} +1 -1
  29. package/chunks/Stories-CNlL0Bcb.cjs +1 -0
  30. package/chunks/{Stories-BnHxMCEZ.mjs → Stories-UUV0GNEV.mjs} +33 -33
  31. package/chunks/{Table-vv1HTrxe.cjs → Table-CZludfzU.cjs} +6 -6
  32. package/chunks/{Table-tUWuA3Ri.mjs → Table-FrYs56BB.mjs} +1597 -1586
  33. package/chunks/{TableCanvas-BX5aciu7.mjs → TableCanvas-CasYPFSm.mjs} +5872 -5633
  34. package/chunks/TableCanvas-DFne0YHS.cjs +30 -0
  35. package/chunks/TableGlide-BKSjSgBn.mjs +9131 -0
  36. package/chunks/TableGlide-C2_HrWEA.cjs +1 -0
  37. package/chunks/{styles-CJ5y9FKW.mjs → styles-CJPkBVWK.mjs} +6 -6
  38. package/chunks/{styles-kUWPuNSD.cjs → styles-CpC_FuBg.cjs} +1 -1
  39. package/chunks/{utils-u1KJ37g3.mjs → utils-Hu77fGGe.mjs} +102 -102
  40. package/chunks/{utils-ChDQGRjv.cjs → utils-OQNruMpn.cjs} +5 -5
  41. package/components/AiAgentPopover/index.cjs +1 -1
  42. package/components/AiAgentPopover/index.mjs +1 -1
  43. package/components/AiAgentPopup/AiAgentInput.d.ts +3 -0
  44. package/components/AiAgentPopup/AiAgentLeftPanel.d.ts +6 -0
  45. package/components/AiAgentPopup/AiAgentPopup.constants.d.ts +32 -0
  46. package/components/AiAgentPopup/AiAgentPopup.d.ts +3 -0
  47. package/components/AiAgentPopup/AiAgentPopup.styled.d.ts +33 -0
  48. package/components/AiAgentPopup/AiAgentPopup.types.d.ts +83 -0
  49. package/components/AiAgentPopup/AiAgentPopup.utils.d.ts +12 -0
  50. package/components/AiAgentPopup/AiAgentSurface.d.ts +6 -0
  51. package/components/AiAgentPopup/hooks/useDrag.d.ts +18 -0
  52. package/components/AiAgentPopup/hooks/useIsDarkTheme.d.ts +1 -0
  53. package/components/AiAgentPopup/hooks/usePopupPosition.d.ts +20 -0
  54. package/components/AiAgentPopup/hooks/usePopupResize.d.ts +40 -0
  55. package/components/AiAgentPopup/hooks/useStateStorage.d.ts +6 -0
  56. package/components/AiAgentPopup/index.cjs +1 -0
  57. package/components/AiAgentPopup/index.d.ts +3 -0
  58. package/components/AiAgentPopup/index.mjs +5 -0
  59. package/components/AnalyticalWidget/AnalyticalWidget.d.ts +8 -24
  60. package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/AnalyticalWidgetIconButtonDots.d.ts +8 -24
  61. package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/index.cjs +1 -1
  62. package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/index.mjs +1 -1
  63. package/components/AnalyticalWidget/components/AnalyticalWidgetChips/index.cjs +1 -1
  64. package/components/AnalyticalWidget/components/AnalyticalWidgetChips/index.mjs +2 -2
  65. package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/index.cjs +1 -1
  66. package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/index.mjs +2 -2
  67. package/components/AnalyticalWidget/index.cjs +1 -1
  68. package/components/AnalyticalWidget/index.mjs +1 -1
  69. package/components/ApprovalCenter/components/index.cjs +1 -1
  70. package/components/ApprovalCenter/components/index.mjs +1 -1
  71. package/components/ApprovalCenter/index.cjs +1 -1
  72. package/components/ApprovalCenter/index.mjs +1 -1
  73. package/components/Autocomplete/Autocomplete.d.ts +128 -128
  74. package/components/AutocompleteSearch/index.cjs +1 -1
  75. package/components/AutocompleteSearch/index.mjs +2 -2
  76. package/components/BlockGradientScroll/index.cjs +1 -1
  77. package/components/BlockGradientScroll/index.mjs +1 -1
  78. package/components/BlockTitle/index.cjs +1 -1
  79. package/components/BlockTitle/index.mjs +1 -1
  80. package/components/BlockTitle/utils/index.cjs +1 -1
  81. package/components/BlockTitle/utils/index.mjs +1 -1
  82. package/components/Collapse/index.cjs +1 -1
  83. package/components/Collapse/index.mjs +1 -1
  84. package/components/Combobox/index.cjs +1 -1
  85. package/components/Combobox/index.mjs +1 -1
  86. package/components/EmptyState/components/index.cjs +1 -1
  87. package/components/EmptyState/components/index.mjs +1 -1
  88. package/components/EmptyState/index.cjs +1 -1
  89. package/components/EmptyState/index.mjs +1 -1
  90. package/components/GridDND/index.cjs +1 -1
  91. package/components/GridDND/index.mjs +1 -1
  92. package/components/GridDND/utils/index.cjs +1 -1
  93. package/components/GridDND/utils/index.mjs +1 -1
  94. package/components/IconButton/index.cjs +1 -1
  95. package/components/IconButton/index.mjs +1 -1
  96. package/components/LeftPanel/components/index.cjs +1 -1
  97. package/components/LeftPanel/components/index.mjs +1 -1
  98. package/components/LeftPanel/hooks/index.cjs +1 -1
  99. package/components/LeftPanel/hooks/index.mjs +1 -1
  100. package/components/LeftPanel/index.cjs +1 -1
  101. package/components/LeftPanel/index.mjs +1 -1
  102. package/components/LeftPanel/utils/index.cjs +1 -1
  103. package/components/LeftPanel/utils/index.mjs +1 -1
  104. package/components/ListOfFilters/index.cjs +1 -1
  105. package/components/ListOfFilters/index.mjs +1 -1
  106. package/components/MassActions/hooks/index.cjs +1 -1
  107. package/components/MassActions/hooks/index.mjs +1 -1
  108. package/components/MassActions/index.cjs +1 -1
  109. package/components/MassActions/index.mjs +1 -1
  110. package/components/ModalDF/index.cjs +1 -1
  111. package/components/ModalDF/index.mjs +1 -1
  112. package/components/Notification/index.cjs +1 -1
  113. package/components/Notification/index.mjs +6 -6
  114. package/components/PageTitle/index.cjs +1 -1
  115. package/components/PageTitle/index.mjs +1 -1
  116. package/components/PageTitle/utils/index.cjs +1 -1
  117. package/components/PageTitle/utils/index.mjs +1 -1
  118. package/components/PopoverDF/index.cjs +1 -1
  119. package/components/PopoverDF/index.mjs +9 -9
  120. package/components/PopoverDF/styled.d.ts +1 -23
  121. package/components/PopupDF/index.cjs +1 -1
  122. package/components/PopupDF/index.mjs +118 -143
  123. package/components/SplitView/index.cjs +1 -1
  124. package/components/SplitView/index.mjs +1 -1
  125. package/components/SplitView/utils/index.cjs +1 -1
  126. package/components/SplitView/utils/index.mjs +1 -1
  127. package/components/Stories/components/StoriesBanner/index.cjs +1 -1
  128. package/components/Stories/components/StoriesBanner/index.mjs +1 -1
  129. package/components/Stories/components/StoriesContent/index.cjs +1 -1
  130. package/components/Stories/components/StoriesContent/index.mjs +1 -1
  131. package/components/Stories/components/StoriesPreview/index.cjs +1 -1
  132. package/components/Stories/components/StoriesPreview/index.mjs +1 -1
  133. package/components/Stories/components/StoriesProgress/index.cjs +1 -1
  134. package/components/Stories/components/StoriesProgress/index.mjs +1 -1
  135. package/components/Stories/components/StoriesViewer/index.cjs +1 -1
  136. package/components/Stories/components/StoriesViewer/index.mjs +1 -1
  137. package/components/Stories/index.cjs +1 -1
  138. package/components/Stories/index.mjs +1 -1
  139. package/components/Table/components/TableDropdown/index.cjs +1 -1
  140. package/components/Table/components/TableDropdown/index.mjs +1 -1
  141. package/components/Table/feature-collapse-table/index.cjs +1 -1
  142. package/components/Table/feature-collapse-table/index.mjs +1 -1
  143. package/components/Table/feature-column-control/ColumnsList/index.cjs +1 -1
  144. package/components/Table/feature-column-control/ColumnsList/index.mjs +1 -1
  145. package/components/Table/feature-column-control/index.cjs +1 -1
  146. package/components/Table/feature-column-control/index.mjs +1 -1
  147. package/components/Table/feature-columns-grouping/index.cjs +1 -1
  148. package/components/Table/feature-columns-grouping/index.mjs +1 -1
  149. package/components/Table/feature-context-menu/index.cjs +1 -1
  150. package/components/Table/feature-context-menu/index.mjs +1 -1
  151. package/components/Table/feature-edit/index.cjs +1 -1
  152. package/components/Table/feature-edit/index.mjs +1 -1
  153. package/components/Table/feature-filtering/combobox/index.cjs +1 -1
  154. package/components/Table/feature-filtering/combobox/index.mjs +1 -1
  155. package/components/Table/feature-filtering/filter-list-block/index.cjs +1 -1
  156. package/components/Table/feature-filtering/filter-list-block/index.mjs +1 -1
  157. package/components/Table/feature-filtering/header-filter-button/index.cjs +1 -1
  158. package/components/Table/feature-filtering/header-filter-button/index.mjs +1 -1
  159. package/components/Table/feature-filtering/index.cjs +1 -1
  160. package/components/Table/feature-filtering/index.mjs +1 -1
  161. package/components/Table/feature-filtering/popover.d.ts +1 -23
  162. package/components/Table/feature-filtering/sidebar-filter-block/index.cjs +1 -1
  163. package/components/Table/feature-filtering/sidebar-filter-block/index.mjs +1 -1
  164. package/components/Table/feature-infinity-scroll/index.cjs +1 -1
  165. package/components/Table/feature-infinity-scroll/index.mjs +1 -1
  166. package/components/Table/feature-key-text/index.cjs +1 -1
  167. package/components/Table/feature-key-text/index.mjs +1 -1
  168. package/components/Table/feature-pagination/index.cjs +1 -1
  169. package/components/Table/feature-pagination/index.mjs +1 -1
  170. package/components/Table/feature-right-sidebar/index.cjs +1 -1
  171. package/components/Table/feature-right-sidebar/index.mjs +1 -1
  172. package/components/Table/feature-row-detail/index.cjs +1 -1
  173. package/components/Table/feature-row-detail/index.mjs +1 -1
  174. package/components/Table/feature-row-instruments/index.cjs +1 -1
  175. package/components/Table/feature-row-instruments/index.mjs +1 -1
  176. package/components/Table/feature-row-size/index.cjs +1 -1
  177. package/components/Table/feature-row-size/index.mjs +1 -1
  178. package/components/Table/feature-rows-grouping/index.cjs +1 -1
  179. package/components/Table/feature-rows-grouping/index.mjs +1 -1
  180. package/components/Table/feature-searching/index.cjs +1 -1
  181. package/components/Table/feature-searching/index.mjs +1 -1
  182. package/components/Table/feature-searching/styled.d.ts +128 -128
  183. package/components/Table/feature-select-row/index.cjs +1 -1
  184. package/components/Table/feature-select-row/index.mjs +1 -1
  185. package/components/Table/feature-sorting/index.cjs +1 -1
  186. package/components/Table/feature-sorting/index.mjs +1 -1
  187. package/components/Table/feature-table-settings/index.cjs +1 -1
  188. package/components/Table/feature-table-settings/index.mjs +1 -1
  189. package/components/Table/feature-tree/index.cjs +1 -1
  190. package/components/Table/feature-tree/index.mjs +1 -1
  191. package/components/Table/index.cjs +1 -1
  192. package/components/Table/index.mjs +1 -1
  193. package/components/Table/renders/formatCell/index.cjs +1 -1
  194. package/components/Table/renders/formatCell/index.mjs +1 -1
  195. package/components/Table/styles/index.cjs +1 -1
  196. package/components/Table/styles/index.mjs +1 -1
  197. package/components/Table/table-hooks/index.cjs +1 -1
  198. package/components/Table/table-hooks/index.mjs +1 -1
  199. package/components/Table/types/index.cjs +1 -1
  200. package/components/Table/types/index.mjs +1 -1
  201. package/components/Table/types/utils.type.d.ts +1 -1
  202. package/components/Table/utils/index.cjs +1 -1
  203. package/components/Table/utils/index.mjs +1 -1
  204. package/components/Table/widgets/control-block/index.cjs +1 -1
  205. package/components/Table/widgets/control-block/index.mjs +1 -1
  206. package/components/Table/widgets/control-block/right-side/index.cjs +1 -1
  207. package/components/Table/widgets/control-block/right-side/index.mjs +1 -1
  208. package/components/Table/widgets/index.cjs +1 -1
  209. package/components/Table/widgets/index.mjs +1 -1
  210. package/components/Table/widgets/mass-actions/index.cjs +1 -1
  211. package/components/Table/widgets/mass-actions/index.mjs +1 -1
  212. package/components/TableCanvas/TableGlideInstance/TableGlideInstance.d.ts +1 -1
  213. package/components/TableCanvas/TableGlideInstance/adapters/column/index.cjs +1 -1
  214. package/components/TableCanvas/TableGlideInstance/adapters/column/index.mjs +1 -1
  215. package/components/TableCanvas/TableGlideInstance/adapters/index.cjs +1 -1
  216. package/components/TableCanvas/TableGlideInstance/adapters/index.mjs +1 -1
  217. package/components/TableCanvas/TableGlideInstance/index.cjs +1 -1
  218. package/components/TableCanvas/TableGlideInstance/index.mjs +6 -6
  219. package/components/TableCanvas/TableGlideInstance/type.d.ts +3 -0
  220. package/components/TableCanvas/TableGlideInstance/utils/column/index.cjs +1 -1
  221. package/components/TableCanvas/TableGlideInstance/utils/column/index.mjs +2 -2
  222. package/components/TableCanvas/TableGlideInstance/utils/index.cjs +1 -1
  223. package/components/TableCanvas/TableGlideInstance/utils/index.mjs +1 -1
  224. package/components/TableCanvas/components/SplitIconButton/index.cjs +1 -1
  225. package/components/TableCanvas/components/SplitIconButton/index.mjs +1 -1
  226. package/components/TableCanvas/components/TableDropdown/index.cjs +1 -1
  227. package/components/TableCanvas/components/TableDropdown/index.mjs +1 -1
  228. package/components/TableCanvas/contexts.d.ts +8 -2
  229. package/components/TableCanvas/feature-cell-transfer/index.cjs +1 -1
  230. package/components/TableCanvas/feature-cell-transfer/index.mjs +13 -13
  231. package/components/TableCanvas/feature-collapse-table/index.cjs +1 -1
  232. package/components/TableCanvas/feature-collapse-table/index.mjs +2 -2
  233. package/components/TableCanvas/feature-column-control/ColumnsList/index.cjs +1 -1
  234. package/components/TableCanvas/feature-column-control/ColumnsList/index.mjs +2 -2
  235. package/components/TableCanvas/feature-column-control/index.cjs +1 -1
  236. package/components/TableCanvas/feature-column-control/index.mjs +4 -4
  237. package/components/TableCanvas/feature-columns-grouping/index.cjs +1 -1
  238. package/components/TableCanvas/feature-columns-grouping/index.mjs +3 -3
  239. package/components/TableCanvas/feature-content-state/index.cjs +1 -1
  240. package/components/TableCanvas/feature-content-state/index.mjs +1 -1
  241. package/components/TableCanvas/feature-context-menu/index.cjs +1 -1
  242. package/components/TableCanvas/feature-context-menu/index.mjs +1 -1
  243. package/components/TableCanvas/feature-edit/index.cjs +1 -1
  244. package/components/TableCanvas/feature-edit/index.mjs +6 -6
  245. package/components/TableCanvas/feature-filtering/combobox/index.cjs +1 -1
  246. package/components/TableCanvas/feature-filtering/combobox/index.mjs +4 -4
  247. package/components/TableCanvas/feature-filtering/filter-list-block/index.cjs +1 -1
  248. package/components/TableCanvas/feature-filtering/filter-list-block/index.mjs +1 -1
  249. package/components/TableCanvas/feature-filtering/header-filter-button/index.cjs +1 -1
  250. package/components/TableCanvas/feature-filtering/header-filter-button/index.mjs +1 -1
  251. package/components/TableCanvas/feature-filtering/index.cjs +1 -1
  252. package/components/TableCanvas/feature-filtering/index.mjs +3 -3
  253. package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.cjs +1 -1
  254. package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.mjs +1 -1
  255. package/components/TableCanvas/feature-infinity-scroll/index.cjs +1 -1
  256. package/components/TableCanvas/feature-infinity-scroll/index.mjs +4 -4
  257. package/components/TableCanvas/feature-key-text/index.cjs +1 -1
  258. package/components/TableCanvas/feature-key-text/index.mjs +6 -6
  259. package/components/TableCanvas/feature-notifications/index.cjs +1 -1
  260. package/components/TableCanvas/feature-notifications/index.mjs +2 -2
  261. package/components/TableCanvas/feature-pagination/TablePagination.d.ts +2 -0
  262. package/components/TableCanvas/feature-pagination/index.cjs +1 -1
  263. package/components/TableCanvas/feature-pagination/index.mjs +3 -3
  264. package/components/TableCanvas/feature-popover-table/components/styled.d.ts +1 -23
  265. package/components/TableCanvas/feature-popover-table/context/index.cjs +1 -1
  266. package/components/TableCanvas/feature-popover-table/context/index.mjs +1 -1
  267. package/components/TableCanvas/feature-popover-table/hooks/index.cjs +1 -1
  268. package/components/TableCanvas/feature-popover-table/hooks/index.mjs +1 -1
  269. package/components/TableCanvas/feature-popover-table/index.cjs +1 -1
  270. package/components/TableCanvas/feature-popover-table/index.mjs +3 -3
  271. package/components/TableCanvas/feature-popover-table/utils/index.cjs +1 -1
  272. package/components/TableCanvas/feature-popover-table/utils/index.mjs +1 -1
  273. package/components/TableCanvas/feature-right-sidebar/compatibility.d.ts +8 -0
  274. package/components/TableCanvas/feature-right-sidebar/index.cjs +1 -1
  275. package/components/TableCanvas/feature-right-sidebar/index.d.ts +2 -3
  276. package/components/TableCanvas/feature-right-sidebar/index.mjs +3 -3
  277. package/components/TableCanvas/feature-row-detail/index.cjs +1 -1
  278. package/components/TableCanvas/feature-row-detail/index.mjs +1 -1
  279. package/components/TableCanvas/feature-row-instruments/index.cjs +1 -1
  280. package/components/TableCanvas/feature-row-instruments/index.mjs +7 -7
  281. package/components/TableCanvas/feature-row-markers/index.cjs +1 -1
  282. package/components/TableCanvas/feature-row-markers/index.mjs +1 -1
  283. package/components/TableCanvas/feature-row-size/index.cjs +1 -1
  284. package/components/TableCanvas/feature-row-size/index.mjs +4 -4
  285. package/components/TableCanvas/feature-rows-grouping/index.cjs +1 -1
  286. package/components/TableCanvas/feature-rows-grouping/index.mjs +10 -10
  287. package/components/TableCanvas/feature-searching/index.cjs +1 -1
  288. package/components/TableCanvas/feature-searching/index.mjs +1 -1
  289. package/components/TableCanvas/feature-searching/styled.d.ts +128 -128
  290. package/components/TableCanvas/feature-select-row/index.cjs +1 -1
  291. package/components/TableCanvas/feature-select-row/index.mjs +1 -1
  292. package/components/TableCanvas/feature-sidebar/constants.d.ts +7 -0
  293. package/components/TableCanvas/feature-sidebar/getCustomSidebarTabs.d.ts +4 -0
  294. package/components/TableCanvas/feature-sidebar/index.cjs +1 -0
  295. package/components/TableCanvas/feature-sidebar/index.d.ts +1 -0
  296. package/components/TableCanvas/feature-sidebar/index.mjs +4 -0
  297. package/components/TableCanvas/feature-sidebar/ui/BottomSheet.d.ts +6 -0
  298. package/components/TableCanvas/feature-sidebar/ui/BottomSheet.styled.d.ts +6 -0
  299. package/components/TableCanvas/{feature-right-sidebar → feature-sidebar}/ui/SidebarContentLayout.d.ts +1 -0
  300. package/components/TableCanvas/{feature-right-sidebar → feature-sidebar}/ui/SidebarTabs.d.ts +2 -1
  301. package/components/TableCanvas/feature-sidebar/ui/TableSidebar.d.ts +16 -0
  302. package/components/TableCanvas/{feature-right-sidebar → feature-sidebar}/ui/styled.d.ts +5 -2
  303. package/components/TableCanvas/feature-sidebar/useSidebarTabsState.d.ts +14 -0
  304. package/components/TableCanvas/feature-sorting/index.cjs +1 -1
  305. package/components/TableCanvas/feature-sorting/index.mjs +1 -1
  306. package/components/TableCanvas/feature-sticky/index.cjs +1 -0
  307. package/components/TableCanvas/feature-sticky/index.d.ts +3 -0
  308. package/components/TableCanvas/feature-sticky/index.mjs +5 -0
  309. package/components/TableCanvas/feature-sticky/types.d.ts +2 -0
  310. package/components/TableCanvas/feature-sticky/useStickyColumnIndexes.d.ts +8 -0
  311. package/components/TableCanvas/feature-sticky/useStickyRowIndexes.d.ts +3 -0
  312. package/components/TableCanvas/feature-table-settings/index.cjs +1 -1
  313. package/components/TableCanvas/feature-table-settings/index.mjs +1 -1
  314. package/components/TableCanvas/feature-tooltip/index.cjs +1 -1
  315. package/components/TableCanvas/feature-tooltip/index.mjs +2 -2
  316. package/components/TableCanvas/feature-tooltip/utils/index.cjs +1 -1
  317. package/components/TableCanvas/feature-tooltip/utils/index.mjs +4 -4
  318. package/components/TableCanvas/feature-tree/index.cjs +1 -1
  319. package/components/TableCanvas/feature-tree/index.mjs +1 -1
  320. package/components/TableCanvas/index.cjs +1 -1
  321. package/components/TableCanvas/index.d.ts +2 -1
  322. package/components/TableCanvas/index.mjs +43 -41
  323. package/components/TableCanvas/renders/formatCell/index.cjs +1 -1
  324. package/components/TableCanvas/renders/formatCell/index.mjs +1 -1
  325. package/components/TableCanvas/styles/classNames.d.ts +1 -0
  326. package/components/TableCanvas/styles/getReservedTableHeight.d.ts +18 -0
  327. package/components/TableCanvas/styles/index.cjs +1 -1
  328. package/components/TableCanvas/styles/index.mjs +10 -10
  329. package/components/TableCanvas/styles/styles.constants.d.ts +1 -1
  330. package/components/TableCanvas/styles/styles.d.ts +2 -5
  331. package/components/TableCanvas/table-hooks/index.cjs +1 -1
  332. package/components/TableCanvas/table-hooks/index.mjs +4 -4
  333. package/components/TableCanvas/table-hooks/useInlineStyle.d.ts +2 -1
  334. package/components/TableCanvas/table-hooks/useLeftSidebarValues.d.ts +7 -0
  335. package/components/TableCanvas/table-hooks/useSidebarOpenState.d.ts +11 -0
  336. package/components/TableCanvas/table-hooks/useSidebarValues.d.ts +1 -0
  337. package/components/TableCanvas/types/index.cjs +1 -1
  338. package/components/TableCanvas/types/index.mjs +2 -2
  339. package/components/TableCanvas/types/table-config.type.d.ts +19 -1
  340. package/components/TableCanvas/utils/index.cjs +1 -1
  341. package/components/TableCanvas/utils/index.mjs +2 -2
  342. package/components/TableCanvas/widgets/control-block/compression/index.cjs +1 -1
  343. package/components/TableCanvas/widgets/control-block/compression/index.mjs +1 -1
  344. package/components/TableCanvas/widgets/control-block/control-block.constants.d.ts +6 -0
  345. package/components/TableCanvas/widgets/control-block/index.cjs +1 -1
  346. package/components/TableCanvas/widgets/control-block/index.mjs +5 -5
  347. package/components/TableCanvas/widgets/control-block/right-side/index.cjs +1 -1
  348. package/components/TableCanvas/widgets/control-block/right-side/index.mjs +1 -1
  349. package/components/TableCanvas/widgets/control-block/types.d.ts +1 -0
  350. package/components/TableCanvas/widgets/index.cjs +1 -1
  351. package/components/TableCanvas/widgets/index.mjs +5 -5
  352. package/components/TableCanvas/widgets/mass-actions/MassActions.d.ts +2 -1
  353. package/components/TableCanvas/widgets/mass-actions/hooks/index.cjs +1 -1
  354. package/components/TableCanvas/widgets/mass-actions/hooks/index.mjs +1 -1
  355. package/components/TableCanvas/widgets/mass-actions/hooks/useMassActionsCanvasWidth.d.ts +1 -0
  356. package/components/TableCanvas/widgets/mass-actions/hooks/useMassActionsCompression.d.ts +1 -1
  357. package/components/TableCanvas/widgets/mass-actions/hooks/useMassActionsSidebar.d.ts +4 -1
  358. package/components/TableCanvas/widgets/mass-actions/index.cjs +1 -1
  359. package/components/TableCanvas/widgets/mass-actions/index.mjs +1 -1
  360. package/components/TableCanvas/widgets/table-or-card-UI.d.ts +6 -3
  361. package/components/TableContract/index.cjs +1 -1
  362. package/components/TableContract/index.mjs +2 -2
  363. package/components/TableGlide/TableGlide.d.ts +1 -1
  364. package/components/TableGlide/constants.d.ts +3 -3
  365. package/components/TableGlide/content-tokens.generated.d.ts +612 -0
  366. package/components/TableGlide/hooks/selection/index.cjs +1 -1
  367. package/components/TableGlide/hooks/selection/index.mjs +1 -1
  368. package/components/TableGlide/hooks/selection/useBaseHighlightRegions.d.ts +2 -1
  369. package/components/TableGlide/hooks/selection/useColoringLayers.d.ts +2 -3
  370. package/components/TableGlide/hooks/selection/useColumnRowHighlightRegions.d.ts +1 -4
  371. package/components/TableGlide/hooks/selection/useSelectionGeometry.d.ts +3 -1
  372. package/components/TableGlide/hooks/useErrorCellRanges.d.ts +1 -2
  373. package/components/TableGlide/index.cjs +1 -1
  374. package/components/TableGlide/index.mjs +31 -31
  375. package/components/TableGlide/lib/canvas/cells/buttons/index.cjs +1 -1
  376. package/components/TableGlide/lib/canvas/cells/buttons/index.mjs +4 -4
  377. package/components/TableGlide/lib/canvas/cells/iconSprites/index.cjs +1 -1
  378. package/components/TableGlide/lib/canvas/cells/iconSprites/index.mjs +1 -1
  379. package/components/TableGlide/lib/canvas/cells/index.cjs +1 -1
  380. package/components/TableGlide/lib/canvas/cells/index.mjs +13 -13
  381. package/components/TableGlide/lib/canvas/cells/renderer/index.cjs +1 -1
  382. package/components/TableGlide/lib/canvas/cells/renderer/index.mjs +4 -4
  383. package/components/TableGlide/lib/canvas/core/helpers/index.cjs +1 -1
  384. package/components/TableGlide/lib/canvas/core/helpers/index.mjs +1 -1
  385. package/components/TableGlide/lib/canvas/core/index.cjs +1 -1
  386. package/components/TableGlide/lib/canvas/core/index.mjs +1 -1
  387. package/components/TableGlide/lib/canvas/hooks/index.cjs +1 -1
  388. package/components/TableGlide/lib/canvas/hooks/index.mjs +1 -1
  389. package/components/TableGlide/lib/canvas/index.cjs +1 -1
  390. package/components/TableGlide/lib/canvas/index.mjs +34 -34
  391. package/components/TableGlide/lib/canvas/miniflex/index.cjs +1 -1
  392. package/components/TableGlide/lib/canvas/miniflex/index.mjs +1 -1
  393. package/components/TableGlide/lib/canvas/primitives/CanvasLink.d.ts +2 -2
  394. package/components/TableGlide/lib/canvas/primitives/CanvasText.d.ts +3 -1
  395. package/components/TableGlide/lib/canvas/primitives/index.cjs +1 -1
  396. package/components/TableGlide/lib/canvas/primitives/index.mjs +5 -5
  397. package/components/TableGlide/lib/canvas/utils/index.cjs +1 -1
  398. package/components/TableGlide/lib/canvas/utils/index.mjs +2 -2
  399. package/components/TableGlide/theming/activeTheme.type.d.ts +3 -1
  400. package/components/TableGlide/theming/cell-fill-override.d.ts +31 -0
  401. package/components/TableGlide/theming/custom-colors.d.ts +46 -11
  402. package/components/TableGlide/theming/fill-states.d.ts +19 -0
  403. package/components/TableGlide/theming/glide-colors.d.ts +14 -14
  404. package/components/TableGlide/theming/index.cjs +1 -1
  405. package/components/TableGlide/theming/index.mjs +1 -1
  406. package/components/TableGlide/theming/size-tokens.d.ts +1 -1
  407. package/components/TableGlide/theming/table-colors.generated.d.ts +529 -0
  408. package/components/TableGlide/tokens.d.ts +1 -104
  409. package/components/TableGlide/types.d.ts +3 -5
  410. package/components/TableTabs/index.cjs +1 -1
  411. package/components/TableTabs/index.mjs +1 -1
  412. package/components/Tooltip/index.cjs +1 -1
  413. package/components/Tooltip/index.mjs +1 -1
  414. package/components/TourWidget/index.cjs +3 -3
  415. package/components/TourWidget/index.mjs +14 -14
  416. package/components/Typography/index.cjs +1 -1
  417. package/components/Typography/index.mjs +1 -1
  418. package/components/Widget/index.cjs +1 -1
  419. package/components/Widget/index.mjs +2 -2
  420. package/formComponents/FormCombobox/index.cjs +1 -1
  421. package/formComponents/FormCombobox/index.mjs +1 -1
  422. package/formComponents/FormRadioGroupBox/index.cjs +1 -1
  423. package/formComponents/FormRadioGroupBox/index.mjs +1 -1
  424. package/formComponents/FormSegments/index.cjs +1 -1
  425. package/formComponents/FormSegments/index.mjs +1 -1
  426. package/formComponents/FormSwitch/index.cjs +1 -1
  427. package/formComponents/FormSwitch/index.mjs +1 -1
  428. package/index.cjs +1 -1
  429. package/index.d.ts +3 -1
  430. package/index.mjs +1864 -1859
  431. package/layouts/Container/index.cjs +1 -1
  432. package/layouts/Container/index.mjs +1 -1
  433. package/layouts/Container/lib/utils/index.cjs +1 -1
  434. package/layouts/Container/lib/utils/index.mjs +1 -1
  435. package/layouts/ErrorPage/index.cjs +1 -1
  436. package/layouts/ErrorPage/index.mjs +1 -1
  437. package/layouts/FiltersActions/hooks/index.cjs +1 -1
  438. package/layouts/FiltersActions/hooks/index.mjs +1 -1
  439. package/layouts/FiltersActions/index.cjs +1 -1
  440. package/layouts/FiltersActions/index.mjs +1 -1
  441. package/layouts/Layout/index.cjs +1 -1
  442. package/layouts/Layout/index.mjs +1 -1
  443. package/layouts/PageLayout/index.cjs +1 -1
  444. package/layouts/PageLayout/index.mjs +1 -1
  445. package/mcp-data/component-index.json +1158 -206
  446. package/mixins/index.cjs +4 -4
  447. package/mixins/index.mjs +61 -54
  448. package/package.json +6 -6
  449. package/shared/utils/resizable/index.cjs +1 -0
  450. package/shared/utils/resizable/index.d.ts +2 -0
  451. package/shared/utils/resizable/index.mjs +39 -0
  452. package/shared/utils/resizable/resizableConfig.d.ts +16 -0
  453. package/styles/index.cjs +1 -1
  454. package/styles/index.mjs +1 -1
  455. package/types/index.d.ts +1 -0
  456. package/types/utility.d.ts +1 -0
  457. package/utils/breakpoint/index.cjs +1 -1
  458. package/utils/breakpoint/index.mjs +2 -2
  459. package/utils/clickStream/index.cjs +1 -1
  460. package/utils/clickStream/index.mjs +1 -1
  461. package/utils/eventBus/index.cjs +1 -1
  462. package/utils/eventBus/index.mjs +1 -1
  463. package/utils/getActiveTheme.d.ts +1 -1
  464. package/utils/hooks/index.cjs +1 -1
  465. package/utils/hooks/index.mjs +1 -1
  466. package/utils/index.cjs +1 -1
  467. package/utils/index.mjs +8 -8
  468. package/utils/react/index.cjs +1 -1
  469. package/utils/react/index.mjs +1 -1
  470. package/utils/styles/index.cjs +1 -1
  471. package/utils/styles/index.mjs +1 -1
  472. package/chunks/AnalyticalWidget-BtyWKJuu.mjs +0 -537
  473. package/chunks/AnalyticalWidget-YytE3Rlw.cjs +0 -43
  474. package/chunks/ApprovalCenter-DdsLEipZ.cjs +0 -1
  475. package/chunks/BlockTitle-DC1McGof.cjs +0 -1
  476. package/chunks/FiltersActions-Bg5wvHFG.cjs +0 -1
  477. package/chunks/MassActions-BTrj9l-R.cjs +0 -1
  478. package/chunks/PageTitle-CrBeieoq.cjs +0 -9
  479. package/chunks/Stories-UYVANawW.cjs +0 -1
  480. package/chunks/TableCanvas-qnwh4c5g.cjs +0 -30
  481. package/chunks/TableGlide-BLbbkn4C.mjs +0 -8154
  482. package/chunks/TableGlide-CZ2mkokV.cjs +0 -1
  483. package/components/TableCanvas/feature-right-sidebar/constants.d.ts +0 -1
  484. package/components/TableCanvas/feature-right-sidebar/ui/TableSidebar.d.ts +0 -16
  485. /package/components/TableCanvas/{feature-right-sidebar → feature-sidebar}/ui/TableSidebar.classnames.d.ts +0 -0
@@ -0,0 +1 @@
1
+ "use strict";const I=require("@glideappsfinal/glide-data-grid"),Pi=require("@salutejs/sdds-themes/tokens/sdds_finai"),Da=require("canvas-hypertxt"),F=require("react"),xa=require("react-dom/server"),At=require("react/jsx-runtime");require("@glideappsfinal/glide-data-grid/dist/index.css");const Qt=require("./utils-OQNruMpn.cjs"),Ze=require("react-dom"),Ge=require("../components/TableCanvasSharedConstants/index.cjs"),Yo=require("styled-components"),E={bgCell:{light:"#FFFFFF",dark:"#060A0C",betaCoreLight:"#FFFFFF",betaCoreDark:"#060A0D",highContrastLight:"#FFFFFF",highContrastDark:"#060A0C"},bgRowHovered:{light:"#F5F7F9",dark:"#0C1013",betaCoreLight:"#F4F8FA",betaCoreDark:"#0C1013",highContrastLight:"#E8EEF2",highContrastDark:"#0C1013"},bgHeader:{light:"#ECF6FC",dark:"#071A26",betaCoreLight:"#EFF8FF",betaCoreDark:"#0C1A24",highContrastLight:"#CFE5F2",highContrastDark:"#071A26"},bgHeaderHasFocus:{light:"#ECF6FC",dark:"#071A26",betaCoreLight:"#EFF8FF",betaCoreDark:"#0C1A24",highContrastLight:"#CFE5F2",highContrastDark:"#071A26"},bgGroupHeader:{light:"#ECF6FC",dark:"#071A26",betaCoreLight:"#EFF8FF",betaCoreDark:"#0C1A24",highContrastLight:"#CFE5F2",highContrastDark:"#071A26"},bgHeaderHovered:{light:"#DEF0FA",dark:"#0A212F",betaCoreLight:"#E1F2FF",betaCoreDark:"#11212D",highContrastLight:"#C2DEEE",highContrastDark:"#0A212F"},bgGroupHeaderHovered:{light:"#DEF0FA",dark:"#0A212F",betaCoreLight:"#E1F2FF",betaCoreDark:"#11212D",highContrastLight:"#C2DEEE",highContrastDark:"#0A212F"},selectionServiceActiveBg:{light:"#D1E9F8",dark:"#09314B",betaCoreLight:"#D2EBFB",betaCoreDark:"#0A3248",highContrastLight:"#B6D8EE",highContrastDark:"#09314B"},bgHeaderSelectedHovered:{light:"#C3E3F6",dark:"#0C3956",betaCoreLight:"#C4E5FA",betaCoreDark:"#0D3A53",highContrastLight:"#A9D1EB",highContrastDark:"#0C3956"},selectionCheckboxBg:{light:"#ECF6FC",dark:"#071A26",betaCoreLight:"#EFF8FF",betaCoreDark:"#0C1A24",highContrastLight:"#CFE5F2",highContrastDark:"#071A26"},selectionServiceBg:{light:"#ECF6FC",dark:"#071A26",betaCoreLight:"#EFF8FF",betaCoreDark:"#0C1A24",highContrastLight:"#CFE5F2",highContrastDark:"#071A26"},bgSelectedRowHovered:{light:"#DEF0FA",dark:"#0A212F",betaCoreLight:"#E1F2FF",betaCoreDark:"#11212D",highContrastLight:"#C2DEEE",highContrastDark:"#0A212F"},bgSelectedRowActiveHovered:{light:"#D0EAF8",dark:"#0E2839",betaCoreLight:"#D3ECFF",betaCoreDark:"#162836",highContrastLight:"#B5D7EA",highContrastDark:"#0E2839"},bgServiceRowHovered:{light:"#DEF0FA",dark:"#0A212F",betaCoreLight:"#E1F2FF",betaCoreDark:"#11212D",highContrastLight:"#C2DEEE",highContrastDark:"#0A212F"},selectionServiceActiveHoveredBg:{light:"#C3E3F6",dark:"#0C3956",betaCoreLight:"#C4E5FA",betaCoreDark:"#0D3A53",highContrastLight:"#A9D1EB",highContrastDark:"#0C3956"},selectionActiveBg:{light:"#E2F1FB",dark:"#082436",betaCoreLight:"#E0F2FB",betaCoreDark:"#052536",highContrastLight:"#E0EEFA",highContrastDark:"#082436"},accentLight:{light:"#E2F1FB",dark:"#082436",betaCoreLight:"#E0F2FB",betaCoreDark:"#052536",highContrastLight:"#E0EEFA",highContrastDark:"#082436"},selectionActiveCheckboxBg:{light:"#D1E9F8",dark:"#09314B",betaCoreLight:"#D2EBFB",betaCoreDark:"#0A3248",highContrastLight:"#B6D8EE",highContrastDark:"#09314B"},selectionActiveHoveredBg:{light:"#D5EBF9",dark:"#0B2B40",betaCoreLight:"#D2ECF9",betaCoreDark:"#072D40",highContrastLight:"#D3E7F8",highContrastDark:"#0B2B40"},selectionActiveCheckboxHoveredBg:{light:"#C3E3F6",dark:"#0C3956",betaCoreLight:"#C4E5FA",betaCoreDark:"#0D3A53",highContrastLight:"#A9D1EB",highContrastDark:"#0C3956"},bgEditableCell:{light:"#FFF6E5",dark:"#211807",betaCoreLight:"#FFF5E7",betaCoreDark:"#211607",highContrastLight:"#F1DDB8",highContrastDark:"#211807"},bgEditableCellHovered:{light:"#FFEFD2",dark:"#291F0A",betaCoreLight:"#FFEDD5",betaCoreDark:"#291C0A",highContrastLight:"#EED5A8",highContrastDark:"#291F0A"},bgEditableCellActive:{light:"#E2E9E4",dark:"#1E2F32",betaCoreLight:"#E0E9E5",betaCoreDark:"#1A2E31",highContrastLight:"#D4D0BB",highContrastDark:"#1E2F32"},bgEditableCellActiveHovered:{light:"#D8E2DB",dark:"#24373A",betaCoreLight:"#D6E2DC",betaCoreDark:"#1F3639",highContrastLight:"#CDC8B0",highContrastDark:"#24373A"},bgEditableCellRowActiveHovered:{light:"#FFE8BF",dark:"#31260E",betaCoreLight:"#FFE5C3",betaCoreDark:"#32230E",highContrastLight:"#EBCD97",highContrastDark:"#31260E"},editedSuccessfullyCellColor:{light:"#EDF8FF",dark:"#0A1924",betaCoreLight:"#EFF8FF",betaCoreDark:"#0C1A24",highContrastLight:"#DAE8F1",highContrastDark:"#0A1924"},editedSuccessfullyCellHoverColor:{light:"#DEF2FF",dark:"#0E202D",betaCoreLight:"#E1F2FF",betaCoreDark:"#11212D",highContrastLight:"#CEE1ED",highContrastDark:"#0E202D"},editedSuccessfullyCellActiveColor:{light:"#D2EBFB",dark:"#0B3049",betaCoreLight:"#D2EBFB",betaCoreDark:"#0A3248",highContrastLight:"#BFDAED",highContrastDark:"#0B3049"},editedSuccessfullyCellActiveHoverColor:{light:"#C4E5FA",dark:"#0E3854",betaCoreLight:"#C4E5FA",betaCoreDark:"#0D3A53",highContrastLight:"#B3D3E9",highContrastDark:"#0E3854"},editedSuccessfullyCellRowActiveHoverColor:{light:"#CFECFF",dark:"#122736",betaCoreLight:"#D3ECFF",betaCoreDark:"#162836",highContrastLight:"#C2DAE9",highContrastDark:"#122736"},bgCellPositive:{light:"#E3F3E6",dark:"#0A2814",betaCoreLight:"#E4F3E7",betaCoreDark:"#0B2816",highContrastLight:"#E3F1E0",highContrastDark:"#0A2814"},bgCellPositiveHovered:{light:"#D7EEDB",dark:"#0E3019",betaCoreLight:"#D8EEDC",betaCoreDark:"#0F301B",highContrastLight:"#D8EBD4",highContrastDark:"#0E3019"},bgCellPositiveActive:{light:"#C9E6E5",dark:"#0B3C3D",betaCoreLight:"#C8E7E5",betaCoreDark:"#093D3D",highContrastLight:"#C7E2DE",highContrastDark:"#0B3C3D"},bgCellPositiveActiveHovered:{light:"#BBE0DF",dark:"#0E4546",betaCoreLight:"#BAE1DF",betaCoreDark:"#0C4646",highContrastLight:"#BADCD7",highContrastDark:"#0E4546"},bgCellPositiveRowActiveHovered:{light:"#CBE9D0",dark:"#12381E",betaCoreLight:"#CCE9D1",betaCoreDark:"#133821",highContrastLight:"#CDE5C8",highContrastDark:"#12381E"},bgCellNegative:{light:"#FFE0E3",dark:"#4A0D13",betaCoreLight:"#FEDFDE",betaCoreDark:"#480B11",highContrastLight:"#FFE0E3",highContrastDark:"#4A0D13"},bgCellNegativeHovered:{light:"#FED6DA",dark:"#561117",betaCoreLight:"#FDD5D4",betaCoreDark:"#540E15",highContrastLight:"#FED6DA",highContrastDark:"#561117"},bgCellNegativeActive:{light:"#E2D6E3",dark:"#3F263C",betaCoreLight:"#DFD5DE",betaCoreDark:"#3A2639",highContrastLight:"#E2D6E3",highContrastDark:"#3F263C"},bgCellNegativeActiveHovered:{light:"#DCCDDD",dark:"#482C45",betaCoreLight:"#D8CCD7",betaCoreDark:"#432C42",highContrastLight:"#DCCDDD",highContrastDark:"#482C45"},bgCellNegativeRowActiveHovered:{light:"#FDCCD1",dark:"#62151B",betaCoreLight:"#FCCBCA",betaCoreDark:"#601119",highContrastLight:"#FDCCD1",highContrastDark:"#62151B"},bgCellWarning:{light:"#FEECE1",dark:"#371B0B",betaCoreLight:"#FBEAE0",betaCoreDark:"#32190A",highContrastLight:"#FAEBE0",highContrastDark:"#371B0B"},bgCellWarningHovered:{light:"#FDE3D3",dark:"#41210F",betaCoreLight:"#F9E1D2",betaCoreDark:"#3C1F0E",highContrastLight:"#F8E2D2",highContrastDark:"#41210F"},bgCellWarningActive:{light:"#E1E0E1",dark:"#2F3235",betaCoreLight:"#DCDFDF",betaCoreDark:"#283134",highContrastLight:"#DCDDDE",highContrastDark:"#2F3235"},bgCellWarningActiveHovered:{light:"#CFDAE5",dark:"#363A3D",betaCoreLight:"#C7D9E7",betaCoreDark:"#2F393C",highContrastLight:"#D4D5D6",highContrastDark:"#363A3D"},bgCellWarningRowActiveHovered:{light:"#FCDAC5",dark:"#4B2713",betaCoreLight:"#F7D8C4",betaCoreDark:"#462512",highContrastLight:"#F6D9C4",highContrastDark:"#4B2713"},bgCellInfo:{light:"#CFECFF",dark:"#0C283B",betaCoreLight:"#D3EBFF",betaCoreDark:"#09283D",highContrastLight:"#CFECFF",highContrastDark:"#0C283B"},bgCellInfoHovered:{light:"#C0E6FF",dark:"#103045",betaCoreLight:"#C5E5FF",betaCoreDark:"#0C3048",highContrastLight:"#C0E6FF",highContrastDark:"#103045"},bgCellInfoActive:{light:"#B8E0FB",dark:"#0D3C5C",betaCoreLight:"#B9E0FB",betaCoreDark:"#073D5C",highContrastLight:"#B8E0FB",highContrastDark:"#0D3C5C"},bgCellInfoActiveHovered:{light:"#AADAFA",dark:"#104467",betaCoreLight:"#ABDAFA",betaCoreDark:"#094567",highContrastLight:"#AADAFA",highContrastDark:"#104467"},bgCellInfoRowActiveHovered:{light:"#B1E0FF",dark:"#14384F",betaCoreLight:"#B7DFFF",betaCoreDark:"#0F3853",highContrastLight:"#B1E0FF",highContrastDark:"#14384F"},textDark:{light:"#13181BF5",dark:"#F2F5F8F5",betaCoreLight:"#14191DF5",betaCoreDark:"#F3F7FAF5",highContrastLight:"#13181BF5",highContrastDark:"#F2F5F8F5"},textHeader:{light:"#13181BF5",dark:"#F2F5F8F5",betaCoreLight:"#14191DF5",betaCoreDark:"#F3F7FAF5",highContrastLight:"#13181BF5",highContrastDark:"#F2F5F8F5"},textHeaderSelected:{light:"#13181BF5",dark:"#F2F5F8F5",betaCoreLight:"#14191DF5",betaCoreDark:"#F3F7FAF5",highContrastLight:"#13181BF5",highContrastDark:"#F2F5F8F5"},textGroupHeader:{light:"#13181BF5",dark:"#F2F5F8F5",betaCoreLight:"#14191DF5",betaCoreDark:"#F3F7FAF5",highContrastLight:"#13181BF5",highContrastDark:"#F2F5F8F5"},borderColor:{light:"#D5DFE6",dark:"#23292D",betaCoreLight:"#CFDBE4",betaCoreDark:"#262626",highContrastLight:"#C4CFD7",highContrastDark:"#23292D"},accentColor:{light:"#0B7ECB",dark:"#199AF0",betaCoreLight:"#0087CD",betaCoreDark:"#1F9EEB",highContrastLight:"#0058A2",highContrastDark:"#199AF0"},hiddenColumnsIndicatorColor:{light:"#0B7ECB",dark:"#199AF0",betaCoreLight:"#0087CD",betaCoreDark:"#1F9EEB",highContrastLight:"#0058A2",highContrastDark:"#199AF0"},errorOutlineColor:{light:"#FF293E",dark:"#FF293E",betaCoreLight:"#F81C42",betaCoreDark:"#F81C42",highContrastLight:"#E7002F",highContrastDark:"#FF293E"},fadeWhite:{light:"#FFFFFF",dark:"#060A0C",betaCoreLight:"#FFFFFF",betaCoreDark:"#060A0D",highContrastLight:"#FFFFFF",highContrastDark:"#060A0C"},fadeGray:{light:"#F2F5F8",dark:"#060A0C",betaCoreLight:"#F3F7FA",betaCoreDark:"#060A0D",highContrastLight:"#F2F5F8",highContrastDark:"#060A0C"}},Sa={light:{mode:"light",stepFactor:1,cardHex:"#FFFFFFFF",primaryHex:"#F2F5F8",selectionHex:"#118CDF1F"},dark:{mode:"dark",stepFactor:1.2,cardHex:"#060A0C",primaryHex:"#13181B",selectionHex:"#118CDF33"},betaCoreLight:{mode:"light",stepFactor:1,cardHex:"#FFFFFF",primaryHex:"#F3F7FA",selectionHex:"#0090DA1F"},betaCoreDark:{mode:"dark",stepFactor:1.2,cardHex:"#060A0D",primaryHex:"#14191D",selectionHex:"#0090DA33"},highContrastLight:{mode:"light",stepFactor:1,cardHex:"#FFFFFF",primaryHex:null,selectionHex:"#0076D21F"},highContrastDark:{mode:"dark",stepFactor:1.2,cardHex:"#060A0C",primaryHex:"#13181B",selectionHex:"#118CDF33"}},tt={small:{rowHeight:20,cellVerticalPadding:4,cellHorizontalPadding:4,textfieldSize:"xs"},medium:{rowHeight:32,cellVerticalPadding:7,cellHorizontalPadding:6,textfieldSize:"s"},big:{rowHeight:48,cellVerticalPadding:12,cellHorizontalPadding:16,textfieldSize:"s"}},je=i=>tt[i].rowHeight,Li=i=>tt[i].textfieldSize,Ko={small:tt.small.rowHeight,medium:tt.medium.rowHeight,big:tt.big.rowHeight},Ea={kind:I.GridCellKind.Text,data:"",displayData:"",allowOverlay:!0,readonly:!0},qo={big:{cellVerticalPadding:tt.big.cellVerticalPadding,cellHorizontalPadding:tt.big.cellHorizontalPadding,textfieldSize:tt.big.textfieldSize},medium:{cellVerticalPadding:tt.medium.cellVerticalPadding,cellHorizontalPadding:tt.medium.cellHorizontalPadding,textfieldSize:tt.medium.textfieldSize},small:{cellVerticalPadding:tt.small.cellVerticalPadding,cellHorizontalPadding:tt.small.cellHorizontalPadding,textfieldSize:tt.small.textfieldSize}},Ii={"padding-block":"0px","padding-inline":"0px"},Vt=i=>`${i}px`,wa={small:{rowHeight:je("small"),cell:{"padding-block":Vt(tt.small.cellVerticalPadding),"padding-inline":Vt(tt.small.cellHorizontalPadding)},editorCell:Ii,input:Li("small"),icon:"xs",combobox:"s",checkboxOfCombobox:"s",switch:"s",font:()=>Pi.bodyXXS},medium:{rowHeight:je("medium"),cell:{"padding-block":Vt(tt.medium.cellVerticalPadding),"padding-inline":Vt(tt.medium.cellHorizontalPadding)},editorCell:Ii,input:Li("medium"),icon:"s",combobox:"m",checkboxOfCombobox:"m",switch:"s",font:()=>Pi.bodyS},big:{rowHeight:je("big"),cell:{"padding-block":Vt(tt.big.cellVerticalPadding),"padding-inline":Vt(tt.big.cellHorizontalPadding)},editorCell:Ii,input:Li("big"),icon:"m",combobox:"l",checkboxOfCombobox:"l",switch:"l",font:()=>Pi.bodyM}},ei=33,Ta={bodyM:{"font-size":"1rem","font-weight":400,"line-height":"1.25rem","bold-font-size":"1rem","bold-font-weight":600,"bold-line-height":"1.25rem"},bodyS:{"font-size":"0.875rem","font-weight":400,"line-height":"1.125rem","bold-font-size":"0.875rem","bold-font-weight":600,"bold-line-height":"1.125rem"},bodyXS:{"font-size":"0.75rem","font-weight":400,"line-height":"0.875rem","bold-font-size":"0.75rem","bold-font-weight":600,"bold-line-height":"0.875rem"},bodyXXS:{"font-size":"0.625rem","font-weight":400,"line-height":"0.75rem","bold-font-size":"0.625rem","bold-font-weight":600,"bold-line-height":"0.75rem"}},Ha=16;function co(i,t=Ha){const e=parseFloat(i);return Number.isFinite(e)?i.endsWith("rem")?e*t:e:0}const ka=(i,t=!1)=>{const e=t?i["bold-font-weight"]:i["font-weight"],r=t?i["bold-font-size"]:i["font-size"],o=t?i["bold-line-height"]:i["line-height"];return`${e} normal ${r}/${o}`},Ba=(i,t=!1)=>{const e=t?i["bold-font-size"]:i["font-size"],r=t?i["bold-line-height"]:i["line-height"];return{fontSize:co(e),lineHeightPx:co(r)}},Zo=i=>Object.entries(Ta).reduce((t,[e,r])=>{const o=e;return t.push([o,i(r)],[`${o}Bold`,i(r,!0)]),t},[]),ii=Object.fromEntries(Zo(ka)),jo=Object.fromEntries(Zo(Ba)),Pa={flexGrow:0,flexShrink:1,flexBasis:0,alignSelf:"auto",width:void 0,height:void 0,crossAxisSizing:"auto"},La={top:0,right:0,bottom:0,left:0};class Jo{constructor(t=Pa){this.size={width:0,height:0},this.position={x:0,y:0},this.style={flexGrow:t.flexGrow??0,flexShrink:t.flexShrink??1,flexBasis:t.flexBasis??0,alignSelf:t.alignSelf??"auto",width:t.width,height:t.height,crossAxisSizing:t.crossAxisSizing??"auto",id:t.id,metadata:t.metadata},this.id=t.id,this.metadata=t.metadata}}class Qo extends Jo{build(){}}class St extends Jo{constructor(t,e,r={}){super({}),this.children=[],this.direction="row",this.wrap="nowrap",this.columnGap=0,this.rowGap=0,this.justifyContent="flex-start",this.alignItems="stretch",this.alignContent="stretch",this.padding={top:0,right:0,bottom:0,left:0},this.size.width=t,this.size.height=e,this.id=r.id,r.direction!==void 0&&(this.direction=r.direction),r.wrap!==void 0&&(this.wrap=r.wrap),r.columnGap!==void 0&&(this.columnGap=r.columnGap),r.rowGap!==void 0&&(this.rowGap=r.rowGap),r.justifyContent!==void 0&&(this.justifyContent=r.justifyContent),r.alignItems!==void 0&&(this.alignItems=r.alignItems),r.alignContent!==void 0&&(this.alignContent=r.alignContent),this.padding=tn(r.padding)}addChild(t,e){if(t instanceof St){const o=t;if(e){const n=o.style;n.flexGrow=e.flexGrow??0,n.flexShrink=e.flexShrink??1,n.flexBasis=e.flexBasis??0,n.alignSelf=e.alignSelf??"auto",n.width=e.width,n.height=e.height,n.crossAxisSizing=e.crossAxisSizing??"auto"}return this.children.push(o),o}const r=new Qo(t);return this.children.push(r),r}getContainerMetrics(){const t=this.direction==="row"||this.direction==="row-reverse",{left:e,right:r,top:o,bottom:n}=this.padding,{width:s,height:a}=this.size;return t?{main:s-e-r,cross:a-o-n,mainGap:this.columnGap,crossGap:this.rowGap}:{main:a-o-n,cross:s-e-r,mainGap:this.rowGap,crossGap:this.columnGap}}buildFlexLines(t,e){if(this.wrap==="nowrap")return[t];const r=[];let o=[],n=0;for(const s of t){const a=s.style.flexBasis,c=o.length>0?e.mainGap:0;o.length>0&&n+c+a>e.main&&(r.push(o),o=[],n=0),o.push(s),n+=(o.length>1?e.mainGap:0)+a}return o.length>0&&r.push(o),this.wrap==="wrap-reverse"&&r.reverse(),r}measureLineCrossSizes(t,e){const r=[];for(const o of t){let n=0;for(const s of o){if(this.isDeferredCrossAxisPercentChild(s,e))continue;const a=e?s.style.height:s.style.width,c=a!==void 0?a:e?s.size.height:s.size.width;c>n&&(n=c)}r.push(n)}return r}isDeferredCrossAxisPercentChild(t,e){const r=e?t.style.height:t.style.width;return(t.style.alignSelf!=="auto"?t.style.alignSelf:this.alignItems)==="stretch"&&r===void 0&&t.style.crossAxisSizing==="deferred-percent-stretch"}resolveCrossAxisLayout(t,e){const r=t.length,o=t.reduce((d,h)=>d+h,0),n=e.crossGap*(r>1?r-1:0),s=e.cross-o-n;let a=0,c=e.crossGap;if(this.wrap==="nowrap"&&r===1)t[0]=e.cross;else if(this.wrap!=="nowrap"){const{crossStart:d,crossBetween:h}=this.calculateAlignContent(s,r,e.crossGap);if(a=d,c=h,this.alignContent==="stretch"&&s>0){const l=s/r;for(let u=0;u<r;u++)t[u]+=l}}return{crossStart:a,crossBetween:c}}calculateAlignContent(t,e,r){let o=0,n=r;switch(this.alignContent){case"flex-end":o=t;break;case"center":o=t/2;break;case"space-between":n=e>1?r+t/(e-1):0;break;case"space-around":n=r+t/e,o=n/2;break;case"space-evenly":n=r+t/(e+1),o=n;break}return{crossStart:o,crossBetween:n}}distributeMainAxisSizes(t,e,r){let o=0,n=0,s=0;for(const h of t){const l=h.style.flexBasis;o+=l,n+=h.style.flexGrow,s+=h.style.flexShrink*l}const a=t.length>1?e.mainGap*(t.length-1):0,c=e.main-o-a;let d=0;for(const h of t){const{style:l}=h;let u=l.flexBasis;c>0&&n>0?u+=c*l.flexGrow/n:c<0&&s>0&&(u+=c*l.flexShrink*u/s),u<0&&(u=0),r?h.size.width=u:h.size.height=u,d+=u}return{lineMainUsed:d,totalGrow:n}}calculateJustifySpacing(t,e,r,o){let n=0,s=r.mainGap;if(o===0){const a=t>1?r.mainGap*(t-1):0;let c=r.main-e-a;switch(c<0&&(c=0),this.justifyContent){case"flex-end":n=c;break;case"center":n=c/2;break;case"space-between":s=t>1?r.mainGap+c/(t-1):0;break;case"space-around":s=r.mainGap+c/t,n=s/2;break;case"space-evenly":s=r.mainGap+c/(t+1),n=s;break}}return{leading:n,between:s}}getFinalLineHeight(t,e,r){if(this.wrap!=="nowrap")return e;let o=e;for(const n of t){if(this.isDeferredCrossAxisPercentChild(n,r))continue;const s=r?n.style.height:n.style.width,a=s!==void 0?s:r?n.size.height:n.size.width;a>o&&(o=a)}return o}getCrossSize(t,e,r){const o=r?t.style.height:t.style.width,n=t.style.alignSelf!=="auto"?t.style.alignSelf:this.alignItems;return o!==void 0?(r?t.size.height=o:t.size.width=o,o):n==="stretch"?(r?t.size.height=e:t.size.width=e,e):r?t.size.height:t.size.width}positionChildren(t,e,r,o,n,s,a,c,d){const h=this.direction==="row-reverse"||this.direction==="column-reverse",l=h?t.length-1:0,u=h?-1:t.length,f=h?-1:1;let g=n;for(let v=l;v!==u;v+=f){const C=t[v];if(C!==void 0){const m=C.style,p=C.size,b=C.position;if(r){const H=this.direction==="row"?g:e.main-g-p.width;b.x=a+H}else{const H=this.direction==="column"?g:e.main-g-p.height;b.y=c+H}const A=m.alignSelf!=="auto"?m.alignSelf:this.alignItems,S=this.getCrossSize(C,o,r);let D=0;A==="flex-end"?D=o-S:A==="center"&&(D=(o-S)*.5),r?(b.y=c+d+D,g+=p.width+s):(b.x=a+d+D,g+=p.height+s)}}}build(){const{children:t}=this;if(t.length===0)return;const e=this.direction==="row"||this.direction==="row-reverse",r=this.getContainerMetrics(),o=this.buildFlexLines(t,r);if(o.length===0)return;const n=this.measureLineCrossSizes(o,e),{crossStart:s,crossBetween:a}=this.resolveCrossAxisLayout(n,r),c=this.padding.left,d=this.padding.top;let h=s;for(let l=0;l<o.length;l++){const u=o[l];if(u===void 0||u.length===0)continue;const{lineMainUsed:f,totalGrow:g}=this.distributeMainAxisSizes(u,r,e),{leading:v,between:C}=this.calculateJustifySpacing(u.length,f,r,g),m=this.getFinalLineHeight(u,n[l],e);this.positionChildren(u,r,e,m,v,C,c,d,h),h+=m+a}for(const l of t)l instanceof St&&l.build()}}function tn(i){return i===void 0?La:typeof i=="number"?{top:i,right:i,bottom:i,left:i}:{top:i.top??0,right:i.right??0,bottom:i.bottom??0,left:i.left??0}}class Fr extends St{constructor(t,e,r={}){super(t,e,r)}getLayout(){this.build();const t={};return this._collectLayout(this,t,{counter:0}),t}_collectLayout(t,e,r){for(const o of t.children){const n=o.id??`_$$${r.counter++}`;e[n]={position:o.position,size:o.size},o instanceof St&&this._collectLayout(o,e,r)}}}const he={direction:"row",columnGap:0,rowGap:0,justifyContent:"flex-start",alignItems:"stretch"};function en(i){const t=i;return{id:i.id,direction:t.direction??he.direction,columnGap:t.columnGap??he.columnGap,rowGap:t.rowGap??he.rowGap,justifyContent:t.justifyContent??he.justifyContent,alignItems:t.alignItems??he.alignItems}}function rn(i,t){if(t!=null&&t.length)for(const e of t)if(e.children&&e.children.length>0){const r=new St(e.width??0,e.height??0,en(e));i.addChild(r,e),rn(r,e.children)}else i.addChild(e)}const Ia=i=>{const t=i.width??0,e=i.height??0,r=en(i),o=new Fr(t,e,r);return rn(o,i.children),o.getLayout()},hi=class hi{constructor(t){this.debugColor="magenta",this.parent=null,this.children=[],this.rect={x:0,y:0,width:0,height:0},this.zIndex=0,this._intrinsicWidth=0,this._intrinsicHeight=0,this._layoutDirty=!0,this._measureDirty=!0,this._style={flexGrow:0,flexShrink:1,flexBasis:0,alignSelf:"auto"},this._position="static",this.backgroundColor="transparent",this.borderColor="transparent",this.borderWidth=0,this.portalHoverEnabled=!1,this.id=t}get style(){return this._style}set style(t){this._style=t,this.markLayoutDirty()}get position(){return this._position}set position(t){this._position!==t&&(this._position=t,this.markLayoutDirty())}get left(){return this._left}set left(t){this._left!==t&&(this._left=t,this.markLayoutDirty())}get top(){return this._top}set top(t){this._top!==t&&(this._top=t,this.markLayoutDirty())}get right(){return this._right}set right(t){this._right!==t&&(this._right=t,this.markLayoutDirty())}get bottom(){return this._bottom}set bottom(t){this._bottom!==t&&(this._bottom=t,this.markLayoutDirty())}isAbsolute(){return this._position==="absolute"}isPositioningContext(){return this._position!=="static"}markLayoutDirty(){var t;this._layoutDirty||(this._layoutDirty=!0,(t=this.parent)==null||t.markLayoutDirty())}markMeasureDirty(){this._measureDirty||(this._measureDirty=!0,this.markLayoutDirty())}isLayoutDirty(){return this._layoutDirty}isMeasureDirty(){return this._measureDirty}clearLayoutDirty(){this._layoutDirty=!1}clearMeasureDirty(){this._measureDirty=!1}addChild(t){this.attachChild(t,(e,r)=>e.push(r))}addChildStart(t){this.attachChild(t,(e,r)=>e.unshift(r))}removeChild(t){const e=this.children.indexOf(t);e!==-1&&(this.children.splice(e,1),t.parent=null,this.markLayoutDirty())}getTooltip(){return this.tooltip}paint(t,e){const r=t.getZIndex();t.setZIndex(r+this.zIndex),this.onPaint(t,e),hi.DEBUG&&t.strokeRect(this.rect.x,this.rect.y,this.rect.width,this.rect.height,this.debugColor,1),t.setZIndex(r)}hitTest(t,e){const r=[];return this.collectHitCandidates(t,e,0,{value:0},r),r.sort((o,n)=>n.cumulativeZIndex-o.cumulativeZIndex||n.order-o.order),r.map(({node:o})=>o)}requestLayout(){this.parent&&this.parent.requestLayout()}requestPaint(){this.parent&&this.parent.requestPaint()}onClick(t){}onMouseDown(t){}onMouseUp(t){}onMouseEnter(t){}onMouseLeave(t){}onMouseMove(t){}onDoubleClick(t){}attachChild(t,e){t.parent=this,e(this.children,t),this.markLayoutDirty()}collectHitCandidates(t,e,r,o,n){if(!this.containsHitPoint(t,e))return;const s=r+this.zIndex;n.push({node:this,cumulativeZIndex:s,order:o.value}),o.value+=1;for(const a of this.children)a.collectHitCandidates(t,e,s,o,n)}containsHitPoint(t,e){return t>=this.rect.x&&t<=this.rect.x+this.rect.width&&e>=this.rect.y&&e<=this.rect.y+this.rect.height}};hi.DEBUG=!1;let _t=hi;class on{constructor(){this.defaultFlexStyle={flexGrow:0,flexShrink:1,flexBasis:0,alignSelf:"auto",width:void 0,height:void 0,crossAxisSizing:"auto"}}build(t,e,r){const o=r??t.children.filter(c=>!c.isAbsolute()),n=o.length,s=e.direction,a=s==="row"||s==="row-reverse";for(let c=0;c<n;c+=1){const d=o[c],h=d.style,l=this.extractChildFlexProperties(d,h);this.handlePercentageDimensions(l,h.width,h.height,a,d.rect),this.defaultFlexStyle.flexGrow=l.flexGrow,this.defaultFlexStyle.flexShrink=l.flexShrink,this.defaultFlexStyle.flexBasis=l.flexBasis,this.defaultFlexStyle.alignSelf=l.alignSelf,this.defaultFlexStyle.width=l.width,this.defaultFlexStyle.height=l.height,this.defaultFlexStyle.crossAxisSizing=l.crossAxisSizing,this.isContainer(d)?this.addContainerChild(d,e):this.addLeafChild(d,e)}}extractChildFlexProperties(t,e){const r=e.flexGrow??0,o=e.flexShrink??1,n=e.flexBasis??0;return{width:typeof e.width=="number"?e.width:void 0,height:typeof e.height=="number"?e.height:void 0,flexGrow:r,flexShrink:o,flexBasis:n,alignSelf:e.alignSelf??"auto",crossAxisSizing:"auto"}}handlePercentageDimensions(t,e,r,o,n){e==="100%"&&(o?(t.width=void 0,t.flexGrow===0&&(t.flexGrow=1)):(t.width=void 0,t.alignSelf="stretch",t.crossAxisSizing="deferred-percent-stretch")),r==="100%"&&(o?(t.height=void 0,t.alignSelf="stretch",t.crossAxisSizing="deferred-percent-stretch"):(t.height=void 0,t.flexGrow===0&&(t.flexGrow=1))),t.flexBasis===0&&(t.flexBasis=o?n.width:n.height)}isContainer(t){return"flexOptions"in t}addContainerChild(t,e){const r=new St(0,0,t.flexOptions);r.size.width=t.rect.width,r.size.height=t.rect.height,e.addChild(r,this.defaultFlexStyle),this.build(t,r)}addLeafChild(t,e){const r=e.addChild(this.defaultFlexStyle);r.size.width=t.rect.width,r.size.height=t.rect.height}}const $e=.5;class nn{constructor(t){this.positionResolver=t}reconcile(t,e,r,o,n,s=!1){let a=!1;const{parent:c}=e,d=c!==null?c.rect:n;a=this.updateNodePosition(e,r,d??e.rect);const h=o??e.children.filter(u=>!u.isAbsolute()),l=h.length>0;if(l&&r instanceof St){const u=this.reconcileChildLayouts(t,h,r,n);if(a=a||u,this.isContainer(e)&&!s){const f=this.updateContainerFromContent(e,r);a=a||f}}else if(!l){const u=this.remeasureAndUpdateLeaf(t,e,r);a=a||u}return this.positionNestedAbsoluteChildren(t,e),a}updateNodePosition(t,e,r){const o=t.rect,n=e.position,s=e.size;o.x=r.x+n.x,o.y=r.y+n.y;const a=o.width!==s.width,c=o.height!==s.height;return o.width=s.width,o.height=s.height,a||c}reconcileChildLayouts(t,e,r,o){let n=!1;const s=r.children,a=e.length;for(let c=0;c<a;c+=1){const d=this.reconcile(t,e[c],s[c],void 0,o);n=n||d}return n}updateContainerFromContent(t,e){const r=this.getContainerCachedIsRow(t),o=this.getContainerCachedPadding(t),n=e.children,s=n.length;let a=0;if(r){for(let u=0;u<s;u+=1){const f=n[u],g=f.position.y+f.size.height;g>a&&(a=g)}const c=a>0?a+o.bottom:0,d=t.style.height;if(d==="100%")return!1;const h=typeof d=="number"?d:0,l=c>h?c:h;if(l>t.rect.height+$e)return t.rect.height=l,this.syncFlexNodeSizeFromRect(t,e,!1,!0),!0}else{let c=0;for(let C=0;C<s;C+=1){const m=n[C],p=m.position.x+m.size.width,b=m.position.y+m.size.height;p>a&&(a=p),b>c&&(c=b)}const d=a>0?a+o.right:0,h=t.style.width;let l=!1,u=!1,f=!1;if(h!=="100%"){const C=typeof h=="number"?h:0,m=d>C?d:C;m>t.rect.width+$e&&(t.rect.width=m,l=!0,u=!0)}const g=c>0?c+o.bottom:0,v=t.style.height;if(v!=="100%"){const C=typeof v=="number"?v:0,m=g>C?g:C;m>t.rect.height+$e&&(t.rect.height=m,l=!0,f=!0)}return l&&this.syncFlexNodeSizeFromRect(t,e,u,f),l}return!1}syncFlexNodeSizeFromRect(t,e,r,o){r&&(e.size.width=t.rect.width),o&&(e.size.height=t.rect.height),this.syncAutoMainAxisFlexBasis(t,e,r,o)}syncAutoMainAxisFlexBasis(t,e,r,o){const n=t.parent;if(n===null||!this.isContainer(n)||t.style.flexBasis!==void 0&&t.style.flexBasis!==0)return;const s=this.getContainerCachedIsRow(n);s&&r?e.style.flexBasis=t.rect.width:!s&&o&&(e.style.flexBasis=t.rect.height)}remeasureAndUpdateLeaf(t,e,r){const o=e.rect.height,n=e.rect.width;e.measure(t),e.rect.width=n;const s=e.rect.height-o;return Math.abs(s)>$e?(this.syncFlexNodeSizeFromRect(e,r,!1,!0),!0):!1}positionNestedAbsoluteChildren(t,e){if(!this.isContainer(e)||!e.isPositioningContext())return;const r=e,n=r.children.filter(a=>a.isAbsolute());if(n.length===0)return;const s=this.getContainerCachedPadding(r);this.positionResolver.positionAbsoluteChildren(r.rect,s,n,a=>a.measure(t),a=>this.layoutAbsoluteChildSubtree(t,a))}layoutAbsoluteChildSubtree(t,e){if(!this.isContainer(e))return;const r=e.parent;e.parent=null;try{e.performLayout(t,!0)}finally{e.parent=r}}isContainer(t){return"flexOptions"in t}getContainerCachedIsRow(t){return t.cachedIsRow??!0}getContainerCachedPadding(t){return t.cachedPadding??{top:0,right:0,bottom:0,left:0}}}class Dt{static resolvePositionValue(t,e){if(t!==void 0){if(typeof t=="number")return t;if(typeof t=="string"&&t.endsWith("%"))return parseFloat(t)/100*e}}static applyAxisPositioning(t,e,r,o,n){const s=n?e.x:e.y,a=s+(n?e.width:e.height),c=n?e.width:e.height;if(r!==void 0&&o!==void 0){const d=Math.max(0,c-r-o);n?(t.x=s+r,t.width=d):(t.y=s+r,t.height=d)}else r!==void 0&&(n?t.x=s+r:t.y=s+r);o!==void 0&&r===void 0?n?t.x=a-t.width-o:t.y=a-t.height-o:o===void 0&&r===void 0&&(n?t.x=s:t.y=s)}applyAbsolutePositioning(t,e){const r=Dt.resolvePositionValue(t.left,e.width),o=Dt.resolvePositionValue(t.right,e.width),n=Dt.resolvePositionValue(t.top,e.height),s=Dt.resolvePositionValue(t.bottom,e.height),a=t.rect;Dt.applyAxisPositioning(a,e,r,o,!0),Dt.applyAxisPositioning(a,e,n,s,!1)}positionAbsoluteChildren(t,e,r,o,n){const s={x:t.x+e.left,y:t.y+e.top,width:t.width-e.left-e.right,height:t.height-e.top-e.bottom};for(const a of r)o(a),this.applyAbsolutePositioning(a,s),n==null||n(a)}}class di{constructor(){this.width=0,this.height=0,this.maxCrossSize=0,this.childCount=0,this.isRow=!0}reset(){this.width=0,this.height=0,this.maxCrossSize=0,this.childCount=0,this.isRow=!0}accumulate(t,e){this.isRow=e,e?(this.width+=t.width,this.maxCrossSize=Math.max(this.maxCrossSize,t.height)):(this.height+=t.height,this.maxCrossSize=Math.max(this.maxCrossSize,t.width)),this.childCount+=1}addGap(t,e){if(this.childCount>1){const r=t*(this.childCount-1);e?this.width+=r:this.height+=r}}getSize(){return this.isRow?{width:this.width,height:this.maxCrossSize}:{width:this.maxCrossSize,height:this.height}}static computeIntrinsicSize(t,e,r){const o=new di;for(const n of t)o.accumulate(n,e);return o.addGap(r,e),o.getSize()}}const Ma=3,sn={top:0,right:0,bottom:0,left:0},_a=i=>i===void 0||i==="row"||i==="row-reverse",an=i=>i===void 0?sn:typeof i=="number"?{top:i,right:i,bottom:i,left:i}:{top:i.top??0,right:i.right??0,bottom:i.bottom??0,left:i.left??0};class dt extends _t{constructor(t,e={},r="transparent"){super(t),this.cachedPadding=sn,this.cachedIsRow=!0,this.cachedGap=0,this.optionsCacheValid=!1,this.flexOptionsValue=e,this.positionResolver=new Dt,this.flexTreeBuilder=new on,this.layoutReconciler=new nn(this.positionResolver),this.invalidateOptionsCache(),this.backgroundColor=r}get flexOptions(){return this.flexOptionsValue}set flexOptions(t){this.flexOptionsValue=t,this.invalidateOptionsCache(),this.markLayoutDirty()}setFlexOptions(t){Object.assign(this.flexOptionsValue,t),this.invalidateOptionsCache(),this.markLayoutDirty()}invalidateOptionsCache(){this.optionsCacheValid=!1}ensureOptionsCache(){if(this.optionsCacheValid)return;const t=this.flexOptionsValue;this.cachedIsRow=_a(t.direction),this.cachedGap=this.cachedIsRow?t.columnGap??0:t.rowGap??0,this.cachedPadding=an(t.padding),this.optionsCacheValid=!0}measure(t){this.measureChildren(t),this.computeIntrinsicSize(),this.applySizeConstraints(),this.clearMeasureDirty()}measureChildren(t){const{children:e}=this;for(let r=0;r<e.length;r+=1)e[r].measure(t)}computeIntrinsicSize(){this.ensureOptionsCache();const{layoutChildren:t}=this.separateChildrenByLayoutMode(),e=t.map(s=>s.rect),{width:r,height:o}=di.computeIntrinsicSize(e,this.cachedIsRow,this.cachedGap),n=this.cachedPadding;this._intrinsicWidth=r+n.left+n.right,this._intrinsicHeight=o+n.top+n.bottom}applySizeConstraints(){const{style:t}=this,e=this.resolveStyleDimension(t.width,"width"),r=this.resolveStyleDimension(t.height,"height");this.rect.width=e??this._intrinsicWidth,this.rect.height=r??this._intrinsicHeight,e===void 0&&this.clampWidthToParent()}resolveStyleDimension(t,e){if(typeof t=="number")return t;if(t!=="100%")return;const r=this.resolveParentContentSize(e);return r!==void 0?r:this.rect[e]>0?this.rect[e]:void 0}resolveParentContentSize(t){const{parent:e}=this;if(!(e instanceof dt))return e!=null&&e.rect[t]&&e.rect[t]>0?e.rect[t]:void 0;e.ensureOptionsCache();const r=e.cachedPadding,o=t==="width"?r.left+r.right:r.top+r.bottom,n=e.rect[t]-o;return n>0?n:void 0}performLayout(t,e=!1){if(e?(this.measureChildren(t),this.clearMeasureDirty()):this.measure(t),this.children.length===0){this.clearLayoutDirty();return}const{layoutChildren:r,absoluteChildren:o}=this.separateChildrenByLayoutMode();r.length>0&&this.layoutPhase1Flexbox(t,r,e),o.length>0&&this.isPositioningContext()&&this.layoutPhase2Absolute(t,o),this.clearLayoutDirty()}layoutPhase1Flexbox(t,e,r=!1){const o=new Fr(this.rect.width,this.rect.height,this.flexOptionsValue);this.flexTreeBuilder.build(this,o,e);let n=0,s;do o.build(),s=this.layoutReconciler.reconcile(t,this,o,e,this.rect,r),n+=1;while(s&&n<Ma)}layoutPhase2Absolute(t,e){this.ensureOptionsCache(),this.positionResolver.positionAbsoluteChildren(this.rect,this.cachedPadding,e,r=>r.measure(t),r=>this.layoutAbsoluteChildSubtree(t,r))}layoutAbsoluteChildSubtree(t,e){if(!(e instanceof dt))return;const r=e.parent;e.parent=null;try{e.performLayout(t,!0)}finally{e.parent=r}}clampWidthToParent(){const{parent:t}=this;if(t===null||t.rect.width<=0)return;let e=t.rect.width;t instanceof dt&&(t.ensureOptionsCache(),e-=t.cachedPadding.left+t.cachedPadding.right),e=Math.max(0,e),this.rect.width>e&&(this.rect.width=e)}separateChildrenByLayoutMode(){const t=[],e=[];for(const r of this.children)r.isAbsolute()?e.push(r):t.push(r);return{layoutChildren:t,absoluteChildren:e}}onPaint(t,e){this.backgroundColor!=="transparent"&&t.fillRect(this.rect.x,this.rect.y,this.rect.width,this.rect.height,this.backgroundColor);for(const r of this.children)r.paint(t,e)}}const Ra={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0},Na=(i,t)=>({minX:Math.min(i.minX,t.rect.x),minY:Math.min(i.minY,t.rect.y),maxX:Math.max(i.maxX,t.rect.x+t.rect.width),maxY:Math.max(i.maxY,t.rect.y+t.rect.height)}),Oa=i=>i.minX===1/0||i.maxX===-1/0;class za extends dt{performLayout(t){const e=this.layoutChildren(t);if(!e){this.clearLayoutDirty();return}this.expandToFitBounds(e),this.clearLayoutDirty()}layoutChildren(t){let e={...Ra};return this.children.forEach(r=>{r instanceof dt?r.performLayout(t):r.measure(t),e=Na(e,r)}),Oa(e)?null:e}expandToFitBounds(t){const e=t.maxX-this.rect.x,r=t.maxY-this.rect.y;e>this.rect.width&&(this.rect.width=e),r>this.rect.height&&(this.rect.height=r)}onPaint(t,e){this.backgroundColor&&this.backgroundColor!=="transparent"&&t.fillRect(this.rect.x,this.rect.y,this.rect.width,this.rect.height,this.backgroundColor),this.borderWidth>0&&this.borderColor&&this.borderColor!=="transparent"&&t.strokeRect(this.rect.x+this.borderWidth/2,this.rect.y+this.borderWidth/2,this.rect.width-this.borderWidth,this.rect.height-this.borderWidth,this.borderColor,this.borderWidth),super.onPaint(t,e)}}class pr{constructor(t={}){this.options=t,this.hoveredNode=null,this.activePortalNode=null,this.currentCursor="default",this.bounds=null}setAbsoluteBounds(t){this.bounds=t?{...t}:null}handlePointerMove(t,e){this.transitionHover(t[0],e),this.updateCursor(t)}handlePointerLeave(){this.transitionHover(void 0,null),this.updateCursor([])}handlePortalReset(){this.activePortalNode&&this.dispatchPortalHover({visible:!1,x:0,y:0,width:0,height:0,originId:this.activePortalNode.id,source:this.options.portalSource}),this.activePortalNode=null}computeCursor(t,e,r){var n;const o=r.hitTest(t,e);for(const s of o){const a=(n=s.style)==null?void 0:n.cursor;if(a)return a}return"default"}getCurrentCursor(){return this.currentCursor}transitionHover(t,e){if(this.hoveredNode===t){this.updatePortalHover(t,e);return}this.hoveredNode&&this.hoveredNode.onMouseLeave(this.buildEvent("mouseleave",this.hoveredNode,e)),t&&t.onMouseEnter(this.buildEvent("mouseenter",t,e)),this.hoveredNode=t??null,this.updatePortalHover(t,e)}buildEvent(t,e,r){return r?{...r,type:t,target:e,currentTarget:e}:{type:t,x:0,y:0,originalEvent:{},stopPropagation:()=>{},preventDefault:()=>{},target:e,currentTarget:e}}updateCursor(t){var r,o,n;let e="default";for(const s of t){const a=(r=s.style)==null?void 0:r.cursor;if(a){e=a;break}}e!==this.currentCursor&&(this.currentCursor=e,(n=(o=this.options).onCursorChange)==null||n.call(o,e))}findPortalTarget(t){let e=t;for(;e;){if(e.portalHoverEnabled)return e;e=e.parent}return null}updatePortalHover(t,e=null){var a,c,d,h,l,u;const r=this.findPortalTarget(t),o=r?{...r.rect}:null,n=this.activePortalNode,s=r&&o?{id:r.id,rect:o}:null;if(r&&(n==null?void 0:n.id)===r.id){(c=(a=this.options).onPortalTargetChange)==null||c.call(a,r,e);return}if(this.activePortalNode=s,(h=(d=this.options).onPortalTargetChange)==null||h.call(d,r??null,e),!!this.options.portalHoverDispatch)if(r&&o&&this.bounds){const f=((u=(l=this.options).getTooltipContext)==null?void 0:u.call(l))??void 0;this.dispatchPortalHover({visible:!0,x:this.bounds.x+o.x,y:this.bounds.y+o.y,width:o.width,height:o.height,nodeId:r.id,originId:r.id,source:this.options.portalSource,tooltipContext:f,tooltipFromNode:r.getTooltip(),priority:1})}else n&&this.dispatchPortalHover({visible:!1,x:0,y:0,width:0,height:0,originId:n.id,source:this.options.portalSource})}dispatchPortalHover(t){var r,o,n,s;const e=((o=(r=this.options).getPortalEventTarget)==null?void 0:o.call(r))??null;(s=(n=this.options).portalHoverDispatch)==null||s.call(n,t,e)}}class vt extends _t{addChild(){throw new Error("CanvasLeaf cannot have children")}}const ge={selection:"normal",cellClick:"normal",editor:"normal",contextMenu:"normal"};function Wa(i){return i.selection!==void 0||i.cellClick!==void 0||i.editor!==void 0||i.contextMenu!==void 0}function cn(i){if(!i||!Wa(i))return;const t={selection:i.selection??ge.selection,cellClick:i.cellClick??ge.cellClick,editor:i.editor??ge.editor,contextMenu:i.contextMenu??ge.contextMenu};return t.editor==="open-on-click"&&t.selection==="keep"&&(console.warn('[TableCanvas interaction] `editor: "open-on-click"` требует обычного selection. Editor не будет открыт, чтобы не менять выделение неожиданно.'),t.editor="normal"),t.editor==="open-on-click"&&t.cellClick==="stop"&&(console.warn('[TableCanvas interaction] `editor: "open-on-click"` требует обычного cellClick, потому что editor открывается через click pipeline таблицы. Editor не будет открыт.'),t.editor="normal"),t}function ln(){return{...ge}}class hn{constructor(){this.nodes=new Map,this.listeners=new Set}register(t,e){this.nodes.set(t,e),this.notify(t)}unregister(t){this.nodes.delete(t)}get(t){return this.nodes.get(t)}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}notify(t){this.listeners.forEach(e=>e(t))}}class Ga{constructor(){this.isActive=!1,this.displayed=new Map,this.painted=new Set}beginFrame(t){var e,r,o;this.isActive=!0,(((e=this.resources)==null?void 0:e.loader)!==(t==null?void 0:t.loader)||((r=this.resources)==null?void 0:r.colIndex)!==(t==null?void 0:t.colIndex)||((o=this.resources)==null?void 0:o.rowIndex)!==(t==null?void 0:t.rowIndex))&&this.displayed.clear(),this.resources=t?{...t}:void 0,this.painted.clear()}getAvatarImage(t,e,r){const{resources:o}=this;if(!r||!o){this.displayed.delete(t);return}this.painted.add(t);const n=this.displayed.get(t);(n==null?void 0:n.name)!==e&&this.displayed.delete(t);const s=o.loader.loadOrGetImage(r,o.colIndex,o.rowIndex);if(s)return this.displayed.set(t,{name:e,url:r}),s;if(n&&n.name===e&&n.url!==r)return o.loader.loadOrGetImage(n.url,o.colIndex,o.rowIndex)}endFrame(){this.isActive=!1,this.displayed.forEach((t,e)=>{this.painted.has(e)||this.displayed.delete(e)}),this.painted.clear()}}function $a(i,t){return i.zIndex!==t.zIndex?i.zIndex-t.zIndex:i.order-t.order}const lo=typeof Path2D<"u"&&typeof CanvasRenderingContext2D.prototype.roundRect=="function";class ui{constructor(){this.imageTransitions=new Ga,this.commands=[],this.orderCounter=0,this.currentZIndex=0}setAnimationContext(t){return this.animationContext=t,this}getAnimationContext(){return this.animationContext}setZIndex(t){return this.currentZIndex=t,this}getZIndex(){return this.currentZIndex}pushZIndex(t=1){return this.currentZIndex+=t,this}popZIndex(t=1){return this.currentZIndex-=t,this}fillRect(t,e,r,o,n){return this.commands.push({type:"fillRect",x:t,y:e,width:r,height:o,fillStyle:n,zIndex:this.currentZIndex,order:this.orderCounter++}),this}strokeRect(t,e,r,o,n,s=1){return this.commands.push({type:"strokeRect",x:t,y:e,width:r,height:o,strokeStyle:n,lineWidth:s,zIndex:this.currentZIndex,order:this.orderCounter++}),this}fillText(t,e,r,o,n,s="middle",a){return this.commands.push({type:"fillText",text:t,x:e,y:r,font:o,fillStyle:n,textBaseline:s,textAlign:a,zIndex:this.currentZIndex,order:this.orderCounter++}),this}fillTextClipped(t,e,r,o,n,s,a="middle",c){return this.commands.push({type:"fillTextClipped",text:t,x:e,y:r,font:o,fillStyle:n,textBaseline:a,textAlign:c,clipX:s.x,clipY:s.y,clipWidth:s.width,clipHeight:s.height,zIndex:this.currentZIndex,order:this.orderCounter++}),this}drawImage(t,e,r,o,n){return this.commands.push({type:"drawImage",image:t,x:e,y:r,width:o,height:n,zIndex:this.currentZIndex,order:this.orderCounter++}),this}roundedRect(t,e,r,o,n,s){return this.commands.push({type:"roundedRect",x:t,y:e,width:r,height:o,radius:n,fillStyle:s==null?void 0:s.fillStyle,strokeStyle:s==null?void 0:s.strokeStyle,lineWidth:s==null?void 0:s.lineWidth,zIndex:this.currentZIndex,order:this.orderCounter++}),this}linearGradientRect(t,e,r,o,n,s,a=90){return this.commands.push({type:"linearGradientRect",x:t,y:e,width:r,height:o,radius:n,gradientStops:s,angle:a,zIndex:this.currentZIndex,order:this.orderCounter++}),this}custom(t){return this.commands.push({type:"custom",fn:t,zIndex:this.currentZIndex,order:this.orderCounter++}),this}clear(){return this.commands.length=0,this.orderCounter=0,this.currentZIndex=0,this.animationContext=void 0,this}get commandCount(){return this.commands.length}flush(t){const{commands:e}=this,r=e.length;if(r===0)return;e.sort($a);let o="",n="",s=-1,a="",c="",d="";for(let h=0;h<r;h++){const l=e[h];if(l!==void 0)switch(l.type){case"fillRect":o!==l.fillStyle&&(t.fillStyle=l.fillStyle,o=l.fillStyle),t.fillRect(l.x,l.y,l.width,l.height);break;case"strokeRect":n!==l.strokeStyle&&(t.strokeStyle=l.strokeStyle,n=l.strokeStyle),s!==l.lineWidth&&(t.lineWidth=l.lineWidth,s=l.lineWidth),t.strokeRect(l.x,l.y,l.width,l.height);break;case"fillText":a!==l.font&&(t.font=l.font,a=l.font),o!==l.fillStyle&&(t.fillStyle=l.fillStyle,o=l.fillStyle),c!==l.textBaseline&&(t.textBaseline=l.textBaseline,c=l.textBaseline),l.textAlign&&d!==l.textAlign&&(t.textAlign=l.textAlign,d=l.textAlign),t.fillText(l.text,l.x,l.y);break;case"fillTextClipped":a!==l.font&&(t.font=l.font,a=l.font),o!==l.fillStyle&&(t.fillStyle=l.fillStyle,o=l.fillStyle),c!==l.textBaseline&&(t.textBaseline=l.textBaseline,c=l.textBaseline),l.textAlign&&d!==l.textAlign&&(t.textAlign=l.textAlign,d=l.textAlign),this.executeFillTextClipped(t,l);break;case"drawImage":t.drawImage(l.image,l.x,l.y,l.width,l.height);break;case"roundedRect":this.executeRoundedRect(t,l),l.fillStyle&&(o=l.fillStyle),l.strokeStyle&&(n=l.strokeStyle),l.lineWidth!==void 0&&(s=l.lineWidth);break;case"linearGradientRect":this.executeLinearGradientRect(t,l);break;case"custom":l.fn(t),o="",n="",s=-1,a="",c="",d="";break}}this.clear()}executeLinearGradientRect(t,e){const{x:r,y:o,width:n,height:s,radius:a,gradientStops:c,angle:d}=e,h=(d-90)*Math.PI/180,l=Math.cos(h),u=Math.sin(h),f=n/2,g=s/2,v=r+f,C=o+g,p=(Math.abs(l*n)+Math.abs(u*s))/2,b=v-l*p,A=C-u*p,S=v+l*p,D=C+u*p,H=t.createLinearGradient(b,A,S,D);for(const w of c)H.addColorStop(w.offset,w.color);if(t.fillStyle=H,a>0)if(lo)t.beginPath(),t.roundRect(r,o,n,s,a),t.fill();else{const w=a,P=r+n,_=o+s;t.beginPath(),t.moveTo(r+w,o),t.lineTo(P-w,o),t.quadraticCurveTo(P,o,P,o+w),t.lineTo(P,_-w),t.quadraticCurveTo(P,_,P-w,_),t.lineTo(r+w,_),t.quadraticCurveTo(r,_,r,_-w),t.lineTo(r,o+w),t.quadraticCurveTo(r,o,r+w,o),t.closePath(),t.fill()}else t.fillRect(r,o,n,s)}executeFillTextClipped(t,e){e.clipWidth<=0||e.clipHeight<=0||e.text.length===0||(t.save(),t.beginPath(),t.rect(e.clipX,e.clipY,e.clipWidth,e.clipHeight),t.clip(),t.fillText(e.text,e.x,e.y),t.restore())}executeRoundedRect(t,e){const{x:r,y:o,width:n,height:s,radius:a,fillStyle:c,strokeStyle:d,lineWidth:h}=e;if(lo)t.beginPath(),t.roundRect(r,o,n,s,a);else{const l=a,u=r+n,f=o+s;t.beginPath(),t.moveTo(r+l,o),t.lineTo(u-l,o),t.quadraticCurveTo(u,o,u,o+l),t.lineTo(u,f-l),t.quadraticCurveTo(u,f,u-l,f),t.lineTo(r+l,f),t.quadraticCurveTo(r,f,r,f-l),t.lineTo(r,o+l),t.quadraticCurveTo(r,o,r+l,o),t.closePath()}c&&(t.fillStyle=c,t.fill()),d&&(t.strokeStyle=d,h!==void 0&&(t.lineWidth=h),t.stroke())}}const Ua=new ui;class Xa{constructor(t,e){this.eventHandlers=new Map,this.batcher=new ui,this.canvas=t,this.ctx=t.getContext("2d",{alpha:!1}),this.rootNode=e,this.hoverController=new pr({onCursorChange:r=>{var o;return(o=this.onCursorChange)==null?void 0:o.call(this,r)},onPortalTargetChange:(r,o)=>{var n;return(n=this.onPortalHoverTargetChange)==null?void 0:n.call(this,r,o)}}),this.setupEvents()}setupEvents(){["click","mousedown","mouseup","mousemove","dblclick"].forEach(e=>{const r=o=>this.dispatchPointerEvent(o,e);this.eventHandlers.set(e,r),this.canvas.addEventListener(e,r)})}destroy(){this.eventHandlers.forEach((t,e)=>{this.canvas.removeEventListener(e,t)}),this.eventHandlers.clear()}dispatchPointerEvent(t,e){const{x:r,y:o}=this.getEventCoords(t),n=this.rootNode.hitTest(r,o),s=n[0];let a=!1;const c={type:e,x:r,y:o,originalEvent:t,target:s,stopPropagation:()=>{a=!0},preventDefault:()=>t.preventDefault()};this.bubbleEvent(n,c,e,()=>a),e==="mousemove"&&(this.dispatchMouseMove(n,c,()=>a),this.hoverController.handlePointerMove(n,c))}getEventCoords(t){const e=this.canvas.getBoundingClientRect();return{x:t.clientX-e.left,y:t.clientY-e.top}}bubbleEvent(t,e,r,o){t.length!==0&&this.dispatchToNodes(t,e,(n,s)=>this.invokePointerHandler(n,r,s),o)}dispatchMouseMove(t,e,r){this.dispatchToNodes(t,e,(o,n)=>o.onMouseMove(n),r)}dispatchToNodes(t,e,r,o){for(const n of t){if(o())break;r(n,{...e,currentTarget:n})}}invokePointerHandler(t,e,r){switch(e){case"click":t.onClick(r);break;case"mousedown":t.onMouseDown(r);break;case"mouseup":t.onMouseUp(r);break;case"dblclick":t.onDoubleClick(r);break}}render(){const t=window.devicePixelRatio||1,e=this.canvas.getBoundingClientRect();this.clearCanvas(),this.applyResolutionScale(t),this.updateRootRect(e),this.layoutRoot(),this.batcher.clear(),this.rootNode.paint(this.batcher,this.ctx),this.batcher.flush(this.ctx)}clearCanvas(){this.ctx.fillStyle="#ffffff",this.ctx.fillRect(0,0,this.canvas.width,this.canvas.height)}applyResolutionScale(t){this.ctx.setTransform(1,0,0,1,0,0),this.ctx.scale(t,t)}updateRootRect(t){this.rootNode.rect.width=t.width,this.rootNode.rect.height=t.height,this.rootNode.rect.x=0,this.rootNode.rect.y=0}layoutRoot(){this.rootNode instanceof dt?this.rootNode.performLayout(this.ctx):this.rootNode.measure(this.ctx)}}const Va={textPrimary:"#13181BF5",textPrimaryHover:"#13181B93",textPrimaryActive:"#13181BC4",textSecondary:"#485056B0",textSecondaryHover:"#485056FF",textSecondaryActive:"#485056D3",textTertiary:"#707C847A",textTertiaryHover:"#717C84FF",textTertiaryActive:"#717C8493",textTertiaryBase:"#707C847A",textTertiaryVariant:"#707C847A",textParagraph:"#13181BCC",textParagraphHover:"#13181B7A",textParagraphActive:"#13181BA3",textAccent:"#0B7ECB",textAccentHover:"#0D96F2FF",textAccentActive:"#0966A5FF",textAccentTransparent20:"#0B7ECB33",textPositive:"#108E26",textPositiveHover:"#14B32EFF",textPositiveActive:"#0C6A1BFF",textWarning:"#FA5F05",textWarningHover:"#FB782DFF",textWarningActive:"#D25004FF",textNegative:"#E31227",textNegativeHover:"#EE2F43FF",textNegativeActive:"#BD0F21FF",inverseTextPrimary:"#F2F5F8F5",onDarkTextPrimary:"#F2F5F8F5",onDarkTextPrimaryHover:"#F2F5F893",onDarkTextPrimaryActive:"#F2F5F8C4",onDarkTextPrimary96:"#F7F9FBF4",onDarkTextPrimary56:"#F7F9FB8E",onDarkTextPrimary28:"#F7F9FB47",onLightTextPrimary:"#13181BF5",onLightTextPrimaryHover:"#13181B93",onLightTextPrimaryActive:"#13181BC4",surfaceSolidCard:"#FFFFFFFF",surfaceAccentMinor:"#ECF6FCFF",surfaceSolidDefault:"#060A0C",surfaceSolidTertiary:"#D5DFE6",surfaceAccent:"#199AF0",surfaceAccentHover:"#36A7F2FF",surfaceAccentActive:"#0F90E6FF",surfaceTransparentSecondary:"#ADB9C238",surfaceTransparentSecondaryHover:"#ADB9C247",surfaceTransparentSecondaryActive:"#ADB9C24D",surfaceTransparentTertiary:"#8A959D47",surfaceTransparentDeep:"#30373CC7",surfaceClear:"#FFFFFF00",surfacePositive:"#1A9E32",surfacePositiveHover:"#1EB83AFF",surfacePositiveActive:"#178C2CFF",surfaceWarning:"#FA5F05",surfaceWarningHover:"#FB782DFF",surfaceWarningActive:"#E65705FF",surfaceWarningMinor56:"#F3A9128E",surfaceNegative:"#FF293E",surfaceNegativeHover:"#FF5263FF",surfaceNegativeActive:"#FF142CFF",surfaceTransparentAccent:"#118CDF1F",surfaceTransparentAccentActive:"#118CDF33",surfaceTransparentAccent12:"#118CDF1E",surfaceTransparentAccent20:"#118CDF33",surfaceTransparentPositive:"#1A9E321F",surfaceTransparentPositive12:"#1A9E321E",surfaceTransparentPositive20:"#1A9E3233",surfaceTransparentWarning:"#FA5F051F",surfaceTransparentWarning12:"#FA5F051E",surfaceTransparentWarning20:"#FA5F0533",surfaceTransparentNegative:"#FF293E1F",surfaceTransparentNegative12:"#FF293E1E",surfaceTransparentNegative20:"#FF293E33",onLightSurfaceSolidDefault:"#060A0C",onLightSurfaceTransparentDeep:"#30373CC7",onDarkSurfaceSolidDefault:"#F7F9FB",onDarkSurfaceTransparentCard:"#FFFFFF0F",outlineAccent:"#0B7ECB",outlineSolidPrimary:"#D5DFE6",outlineSolidPrimary26:"#D5DFE642",dataBlueMinor:"#CFECFF",dataBlueMinorActive:"#C2E7FFFF",dataBlue:"#8BB2FC",dataAccentMinorHover:"#52BAFF",dataPositive:"#28D247",dataPositiveMinor:"#9EFAAF",dataNegative:"#FF8F9A",dataNegativeMinor:"#FFE0E3",dataWarning:"#FD9C68",dataWarningMinor:"#FEE2D2",dataOrange:"#F3A912",dataOrangeMinor:"#FFD37A",dataViolet:"#C46BFF",dataVioletMinor:"#DEB7F7",dataPink:"#FF8FBC",dataMagenta:"#F391E2",dataCyan:"#00DDE0",dataCyanDark:"#04C6C9",dataLime:"#93E006",dataTeal:"#14CC98"},Ya={textPrimary:"#F2F5F8F5",textPrimaryHover:"#F2F5F893",textPrimaryActive:"#F2F5F8C4",textSecondary:"#D5DFE69E",textSecondaryHover:"#D6DFE6FF",textSecondaryActive:"#D6DFE6BE",textTertiary:"#D5DFE64D",textTertiaryHover:"#D6DFE6FF",textTertiaryActive:"#D6DFE65C",textTertiaryBase:"#D5DFE64D",textTertiaryVariant:"#D5DFE64D",textParagraph:"#F2F5F8CC",textParagraphHover:"#F2F5F87A",textParagraphActive:"#F2F5F8A3",textAccent:"#199AF0",textAccentHover:"#66BCF5FF",textAccentActive:"#0E8ADDFF",textAccentTransparent20:"#199AF033",textPositive:"#24B23E",textPositiveHover:"#2ACB47FF",textPositiveActive:"#1F9835FF",textWarning:"#FF7024",textWarningHover:"#FF8442FF",textWarningActive:"#FF5D05FF",textNegative:"#FF3D51",textNegativeHover:"#FF5C6CFF",textNegativeActive:"#FF1F35FF",inverseTextPrimary:"#13181BF5",onDarkTextPrimary:"#F2F5F8F5",onDarkTextPrimaryHover:"#F2F5F893",onDarkTextPrimaryActive:"#F2F5F8C4",onDarkTextPrimary96:"#F7F9FBF4",onDarkTextPrimary56:"#F7F9FB8E",onDarkTextPrimary28:"#F7F9FB47",onLightTextPrimary:"#13181BF5",onLightTextPrimaryHover:"#13181B93",onLightTextPrimaryActive:"#13181BC4",surfaceSolidCard:"#060A0C",surfaceAccentMinor:"#071A26FF",surfaceSolidDefault:"#F7F9FB",surfaceSolidTertiary:"#30373C",surfaceAccent:"#199AF0",surfaceAccentHover:"#36A7F2FF",surfaceAccentActive:"#0F96F0FF",surfaceTransparentSecondary:"#D5DFE624",surfaceTransparentSecondaryHover:"#D6DFE642",surfaceTransparentSecondaryActive:"#D6DFE614",surfaceTransparentTertiary:"#D5DFE63D",surfaceTransparentDeep:"#D5DFE6BD",surfaceClear:"#FFFFFF00",surfacePositive:"#1A9E32",surfacePositiveHover:"#1DAF37FF",surfacePositiveActive:"#18952FFF",surfaceWarning:"#FA5F05",surfaceWarningHover:"#FB7223FF",surfaceWarningActive:"#F05B05FF",surfaceWarningMinor56:"#A16B008E",surfaceNegative:"#FF293E",surfaceNegativeHover:"#FF475AFF",surfaceNegativeActive:"#FF1F35FF",surfaceTransparentAccent:"#118CDF33",surfaceTransparentAccentActive:"#118CDF24",surfaceTransparentAccent12:"#118CDF1E",surfaceTransparentAccent20:"#118CDF33",surfaceTransparentPositive:"#1A9E3233",surfaceTransparentPositive12:"#1A9E321E",surfaceTransparentPositive20:"#1A9E3233",surfaceTransparentWarning:"#FA5F0533",surfaceTransparentWarning12:"#FA5F051E",surfaceTransparentWarning20:"#FA5F0533",surfaceTransparentNegative:"#FF293E33",surfaceTransparentNegative12:"#FF293E1E",surfaceTransparentNegative20:"#FF293E33",onLightSurfaceSolidDefault:"#060A0C",onLightSurfaceTransparentDeep:"#30373CC7",onDarkSurfaceSolidDefault:"#F7F9FB",onDarkSurfaceTransparentCard:"#FFFFFF0F",outlineAccent:"#199AF0",outlineSolidPrimary:"#23292D",outlineSolidPrimary26:"#23292D42",dataBlueMinor:"#0D3B59",dataBlueMinorActive:"#0B3550FF",dataBlue:"#1549AB",dataAccentMinorHover:"#0C72B6",dataPositive:"#0D8523",dataPositiveMinor:"#0A2B10",dataNegative:"#9C1422",dataNegativeMinor:"#4A0D13",dataWarning:"#85380C",dataWarningMinor:"#3D1D0A",dataOrange:"#A16B00",dataOrangeMinor:"#493203",dataViolet:"#A139E5",dataVioletMinor:"#722BA1",dataPink:"#9B0D46",dataMagenta:"#8A2178",dataCyan:"#0C585A",dataCyanDark:"#007D80",dataLime:"#0D8523",dataTeal:"#14CC98"},Ka={textPrimary:"#14191DF5",textPrimaryHover:"#151A1E93",textPrimaryActive:"#151A1EC4",textSecondary:"#475158B0",textSecondaryHover:"#465058FF",textSecondaryActive:"#465058D3",textTertiary:"#707F897A",textTertiaryHover:"#707F89FF",textTertiaryActive:"#707F8993",textTertiaryBase:"#707F897A",textTertiaryVariant:"#707F897A",textParagraph:"#14191DCC",textParagraphHover:"#151A1E7A",textParagraphActive:"#151A1EA3",textAccent:"#0087CD",textAccentHover:"#00A3F5FF",textAccentActive:"#006DA3FF",textAccentTransparent20:"#0087CD33",textPositive:"#219532",textPositiveHover:"#28B83EFF",textPositiveActive:"#1A7527FF",textWarning:"#E15400",textWarningHover:"#FF640AFF",textWarningActive:"#B84300FF",textNegative:"#D60033",textNegativeHover:"#FF003BFF",textNegativeActive:"#AD0028FF",inverseTextPrimary:"#F3F7FAF5",onDarkTextPrimary:"#F3F7FAF5",onDarkTextPrimaryHover:"#F4F8FA93",onDarkTextPrimaryActive:"#F4F8FAC4",onDarkTextPrimary96:"#F7F9FBF4",onDarkTextPrimary56:"#F7F9FB8E",onDarkTextPrimary28:"#F7F9FB47",onLightTextPrimary:"#14191DF5",onLightTextPrimaryHover:"#151A1E93",onLightTextPrimaryActive:"#151A1EC4",surfaceSolidCard:"#FFFFFF",surfaceAccentMinor:"#EFF8FF",surfaceSolidDefault:"#060A0D",surfaceSolidTertiary:"#CFDBE4",surfaceAccent:"#1F9EEB",surfaceAccentHover:"#3AA9EEFF",surfaceAccentActive:"#1492E1FF",surfaceTransparentSecondary:"#A8B6BF38",surfaceTransparentSecondaryHover:"#A7B5BE47",surfaceTransparentSecondaryActive:"#A7B5BE4D",surfaceTransparentTertiary:"#8B98A247",surfaceTransparentDeep:"#30383EC7",surfaceClear:"#FFFFFF00",surfacePositive:"#21A038",surfacePositiveHover:"#24B23EFF",surfacePositiveActive:"#1D9032FF",surfaceWarning:"#E15400",surfaceWarningHover:"#F55A00FF",surfaceWarningActive:"#CC4B00FF",surfaceWarningMinor56:"#E9A4318E",surfaceNegative:"#F81C42",surfaceNegativeHover:"#F94361FF",surfaceNegativeActive:"#F70830FF",surfaceTransparentAccent:"#0090DA1F",surfaceTransparentAccentActive:"#0092DB33",surfaceTransparentAccent12:"#0090DA1E",surfaceTransparentAccent20:"#0090DA33",surfaceTransparentPositive:"#21A0381F",surfaceTransparentPositive12:"#21A0381E",surfaceTransparentPositive20:"#21A03833",surfaceTransparentWarning:"#E154001F",surfaceTransparentWarning12:"#E154001E",surfaceTransparentWarning20:"#E1540033",surfaceTransparentNegative:"#F81C421F",surfaceTransparentNegative12:"#F81C421E",surfaceTransparentNegative20:"#F81C4233",onLightSurfaceSolidDefault:"#060A0D",onLightSurfaceTransparentDeep:"#30383EC7",onDarkSurfaceSolidDefault:"#F6F9FB",onDarkSurfaceTransparentCard:"#FFFFFF0F",outlineAccent:"#0087CD",outlineSolidPrimary:"#CFDBE4",outlineSolidPrimary26:"#CFDBE442",dataBlueMinor:"#D3EBFF",dataBlueMinorActive:"#C2E3FFFF",dataBlue:"#8BB4FD",dataAccentMinorHover:"#62BDFF",dataPositive:"#31D64B",dataPositiveMinor:"#AFFFB1",dataNegative:"#FE8E8E",dataNegativeMinor:"#FFE0E3",dataWarning:"#F79772",dataWarningMinor:"#FEE2D2",dataOrange:"#E9A431",dataOrangeMinor:"#FFD191",dataViolet:"#BF62FD",dataVioletMinor:"#D9B5F6",dataPink:"#FC8CA6",dataMagenta:"#EF8BDA",dataCyan:"#56DDE0",dataCyanDark:"#3DCACD",dataLime:"#A0E720",dataTeal:"#14CC98"},qa={textPrimary:"#F3F7FAF5",textPrimaryHover:"#F4F8FA93",textPrimaryActive:"#F4F8FAC4",textSecondary:"#CFDBE49E",textSecondaryHover:"#CEDAE3FF",textSecondaryActive:"#CEDAE3BE",textTertiary:"#CFDBE44D",textTertiaryHover:"#CEDAE3FF",textTertiaryActive:"#CEDAE35C",textTertiaryBase:"#CFDBE44D",textTertiaryVariant:"#CFDBE44D",textParagraph:"#F3F7FACC",textParagraphHover:"#F4F8FA7A",textParagraphActive:"#F4F8FAA3",textAccent:"#1F9EEB",textAccentHover:"#69BDF2FF",textAccentActive:"#138CD8FF",textAccentTransparent20:"#1F9EEB33",textPositive:"#20B43A",textPositiveHover:"#25D044FF",textPositiveActive:"#1C9C33FF",textWarning:"#F3621C",textWarningHover:"#F57738FF",textWarningActive:"#E4540CFF",textNegative:"#FF4B59",textNegativeHover:"#FF6B77FF",textNegativeActive:"#FF2E3FFF",inverseTextPrimary:"#14191DF5",onDarkTextPrimary:"#F3F7FAF5",onDarkTextPrimaryHover:"#F4F8FA93",onDarkTextPrimaryActive:"#F4F8FAC4",onDarkTextPrimary96:"#F7F9FBF4",onDarkTextPrimary56:"#F7F9FB8E",onDarkTextPrimary28:"#F7F9FB47",onLightTextPrimary:"#14191DF5",onLightTextPrimaryHover:"#151A1E93",onLightTextPrimaryActive:"#151A1EC4",surfaceSolidCard:"#060A0D",surfaceAccentMinor:"#0C1A24",surfaceSolidDefault:"#F6F9FB",surfaceSolidTertiary:"#30383E",surfaceAccent:"#1F9EEB",surfaceAccentHover:"#3AA9EEFF",surfaceAccentActive:"#1498EBFF",surfaceTransparentSecondary:"#CFDBE424",surfaceTransparentSecondaryHover:"#CEDAE342",surfaceTransparentSecondaryActive:"#CEDAE314",surfaceTransparentTertiary:"#CFDBE43D",surfaceTransparentDeep:"#CFDBE4BD",surfaceClear:"#FFFFFF00",surfacePositive:"#21A038",surfacePositiveHover:"#24B23EFF",surfacePositiveActive:"#1F9835FF",surfaceWarning:"#E15400",surfaceWarningHover:"#F55A00FF",surfaceWarningActive:"#D64F00FF",surfaceWarningMinor56:"#9A67008E",surfaceNegative:"#F81C42",surfaceNegativeHover:"#F93959FF",surfaceNegativeActive:"#F81238FF",surfaceTransparentAccent:"#0090DA33",surfaceTransparentAccentActive:"#0092DB24",surfaceTransparentAccent12:"#0090DA1E",surfaceTransparentAccent20:"#0090DA33",surfaceTransparentPositive:"#21A03833",surfaceTransparentPositive12:"#21A0381E",surfaceTransparentPositive20:"#21A03833",surfaceTransparentWarning:"#E1540033",surfaceTransparentWarning12:"#E154001E",surfaceTransparentWarning20:"#E1540033",surfaceTransparentNegative:"#F81C4233",surfaceTransparentNegative12:"#F81C421E",surfaceTransparentNegative20:"#F81C4233",onLightSurfaceSolidDefault:"#060A0D",onLightSurfaceTransparentDeep:"#30383EC7",onDarkSurfaceSolidDefault:"#F6F9FB",onDarkSurfaceTransparentCard:"#FFFFFF0F",outlineAccent:"#1F9EEB",outlineSolidPrimary:"#262626",outlineSolidPrimary26:"#26262642",dataBlueMinor:"#003A5C",dataBlueMinorActive:"#003452FF",dataBlue:"#0B45AF",dataAccentMinorHover:"#0079B9",dataPositive:"#1C892D",dataPositiveMinor:"#0F2D11",dataNegative:"#980022",dataNegativeMinor:"#4A0D13",dataWarning:"#872F00",dataWarningMinor:"#3D1D0A",dataOrange:"#9A6700",dataOrangeMinor:"#4A3107",dataViolet:"#9E28DF",dataVioletMinor:"#7012A1",dataPink:"#940041",dataMagenta:"#880077",dataCyan:"#005C5D",dataCyanDark:"#008385",dataLime:"#548200",dataTeal:"#14CC98"},Za={textPrimary:"#13181BF5",textPrimaryHover:"#16181D93",textPrimaryActive:"#16181DC4",textSecondary:"#03070CB0",textSecondaryHover:"#16181DFF",textSecondaryActive:"#16181DAB",textTertiary:"#000206A8",textTertiaryHover:"#16181DFF",textTertiaryActive:"#16181D56",textTertiaryBase:"#000206A8",textTertiaryVariant:"#000206A8",textParagraph:"#13181BCC",textParagraphHover:"#16181D7A",textParagraphActive:"#16181DA3",textAccent:"#0058A2",textAccentHover:"#00D69AFF",textAccentActive:"#00855FFF",textAccentTransparent20:"#0058A233",textPositive:"#0F5E00",textPositiveHover:"#2BD44AFF",textPositiveActive:"#1D9032FF",textWarning:"#983B00",textWarningHover:"#FF8B4DFF",textWarningActive:"#FA5700FF",textNegative:"#A50016",textNegativeHover:"#FF6675FF",textNegativeActive:"#FF142CFF",inverseTextPrimary:"#F2F5F8F5",onDarkTextPrimary:"#F2F5F8F5",onDarkTextPrimaryHover:"#F8F9FC93",onDarkTextPrimaryActive:"#F8F9FCC4",onDarkTextPrimary96:"#F7F9FBF4",onDarkTextPrimary56:"#F7F9FB8E",onDarkTextPrimary28:"#F7F9FB47",onLightTextPrimary:"#13181BF5",onLightTextPrimaryHover:"#16181D93",onLightTextPrimaryActive:"#16181DC4",surfaceSolidCard:"#FFFFFF",surfaceAccentMinor:"#CFE5F2",surfaceSolidDefault:"#060A0C",surfaceSolidTertiary:"#C4CFD7",surfaceAccent:"#0076D2",surfaceAccentHover:"#00C28BFF",surfaceAccentActive:"#00996EFF",surfaceTransparentSecondary:"#7D96A84D",surfaceTransparentSecondaryHover:"#08090C1A",surfaceTransparentSecondaryActive:"#08090C1F",surfaceTransparentTertiary:"#516E834D",surfaceTransparentDeep:"#30373DC7",surfaceClear:"#FFFFFF00",surfacePositive:"#198A00",surfacePositiveHover:"#28C344FF",surfacePositiveActive:"#21A138FF",surfaceWarning:"#D95800",surfaceWarningHover:"#FF8B4DFF",surfaceWarningActive:"#FF630FFF",surfaceWarningMinor56:"#D491008E",surfaceNegative:"#E7002F",surfaceNegativeHover:"#FF6675FF",surfaceNegativeActive:"#FF293EFF",surfaceTransparentAccent:"#0076D240",surfaceTransparentAccentActive:"#00AD7C33",surfaceTransparentAccent12:"#0076D21E",surfaceTransparentAccent20:"#0076D233",surfaceTransparentPositive:"#198A004D",surfaceTransparentPositive12:"#198A001E",surfaceTransparentPositive20:"#198A0033",surfaceTransparentWarning:"#D958004D",surfaceTransparentWarning12:"#D958001E",surfaceTransparentWarning20:"#D9580033",surfaceTransparentNegative:"#E7002F4D",surfaceTransparentNegative12:"#E7002F1E",surfaceTransparentNegative20:"#E7002F33",onLightSurfaceSolidDefault:"#060A0C",onLightSurfaceTransparentDeep:"#30373CC7",onDarkSurfaceSolidDefault:"#F7F9FB",onDarkSurfaceTransparentCard:"#FFFFFF0F",outlineAccent:"#0058A2",outlineSolidPrimary:"#A3ACB4",outlineSolidPrimary26:"#A3ACB442",dataBlueMinor:"#9CD5FF",dataBlueMinorActive:"#C2E7FFFF",dataBlue:"#8BB2FC",dataAccentMinorHover:"#0077C1",dataPositive:"#05AF32",dataPositiveMinor:"#96DAA1",dataNegative:"#BA5161",dataNegativeMinor:"#FFE0E3",dataWarning:"#B35B10",dataWarningMinor:"#FEE2D2",dataOrange:"#D49100",dataOrangeMinor:"#F3B400",dataViolet:"#9A29E0",dataVioletMinor:"#D48BFF",dataPink:"#FB5AA5",dataMagenta:"#F391E2",dataCyan:"#00C1C3",dataCyanDark:"#00AAAD",dataLime:"#7FC400",dataTeal:"#00B082"},ja={textPrimary:"#F2F5F8F5",textPrimaryHover:"#F8F9FC93",textPrimaryActive:"#F8F9FCC4",textSecondary:"#D5DFE69E",textSecondaryHover:"#F8F9FCFF",textSecondaryActive:"#F8F9FCAB",textTertiary:"#D5DFE64D",textTertiaryHover:"#F8F9FCFF",textTertiaryActive:"#F8F9FC56",textTertiaryBase:"#D5DFE64D",textTertiaryVariant:"#D5DFE64D",textParagraph:"#F2F5F8CC",textParagraphHover:"#F8F9FC7A",textParagraphActive:"#F8F9FCA3",textAccent:"#199AF0",textAccentHover:"#71F4CFFF",textAccentActive:"#38F0BCFF",textAccentTransparent20:"#199AF033",textPositive:"#24B23E",textPositiveHover:"#93F6A5FF",textPositiveActive:"#5BF176FF",textWarning:"#FF7024",textWarningHover:"#FFA97AFF",textWarningActive:"#FFBD99FF",textNegative:"#FF3D51",textNegativeHover:"#FD919CFF",textNegativeActive:"#FDAFB7FF",inverseTextPrimary:"#13181BF5",onDarkTextPrimary:"#F2F5F8F5",onDarkTextPrimaryHover:"#F8F9FC93",onDarkTextPrimaryActive:"#F8F9FCC4",onDarkTextPrimary96:"#F7F9FBF4",onDarkTextPrimary56:"#F7F9FB8E",onDarkTextPrimary28:"#F7F9FB47",onLightTextPrimary:"#13181BF5",onLightTextPrimaryHover:"#16181D93",onLightTextPrimaryActive:"#16181DC4",surfaceSolidCard:"#060A0C",surfaceAccentMinor:"#071A26",surfaceSolidDefault:"#F7F9FB",surfaceSolidTertiary:"#30373C",surfaceAccent:"#118CDF",surfaceAccentHover:"#16DFA6FF",surfaceAccentActive:"#13C391FF",surfaceTransparentSecondary:"#D5DFE624",surfaceTransparentSecondaryHover:"#F8F9FC3D",surfaceTransparentSecondaryActive:"#F8F9FC0F",surfaceTransparentTertiary:"#D5DFE63D",surfaceTransparentDeep:"#D5DFE6BD",surfaceClear:"#FFFFFF00",surfacePositive:"#1A9E32",surfacePositiveHover:"#36D954FF",surfacePositiveActive:"#26C944FF",surfaceWarning:"#FA5F05",surfaceWarningHover:"#FDA97CFF",surfaceWarningActive:"#FD965EFF",surfaceWarningMinor56:"#A16B008E",surfaceNegative:"#FF293E",surfaceNegativeHover:"#FFA3ACFF",surfaceNegativeActive:"#FF8591FF",surfaceTransparentAccent:"#118CDF33",surfaceTransparentAccentActive:"#14CC9824",surfaceTransparentAccent12:"#118CDF1E",surfaceTransparentAccent20:"#118CDF33",surfaceTransparentPositive:"#1A9E3233",surfaceTransparentPositive12:"#1A9E321E",surfaceTransparentPositive20:"#1A9E3233",surfaceTransparentWarning:"#FA5F0533",surfaceTransparentWarning12:"#FA5F051E",surfaceTransparentWarning20:"#FA5F0533",surfaceTransparentNegative:"#FF293E33",surfaceTransparentNegative12:"#FF293E1E",surfaceTransparentNegative20:"#FF293E33",onLightSurfaceSolidDefault:"#060A0C",onLightSurfaceTransparentDeep:"#30373CC7",onDarkSurfaceSolidDefault:"#F7F9FB",onDarkSurfaceTransparentCard:"#FFFFFF0F",outlineAccent:"#199AF0",outlineSolidPrimary:"#25262D",outlineSolidPrimary26:"#25262D42",dataBlueMinor:"#0D3B59",dataBlueMinorActive:"#0B3550FF",dataBlue:"#1549AB",dataAccentMinorHover:"#0C72B6",dataPositive:"#0D8523",dataPositiveMinor:"#0A2B10",dataNegative:"#9C1422",dataNegativeMinor:"#4A0D13",dataWarning:"#85380C",dataWarningMinor:"#3D1D0A",dataOrange:"#A16B00",dataOrangeMinor:"#493203",dataViolet:"#AD42F5",dataVioletMinor:"#722BA1",dataPink:"#9B0D46",dataMagenta:"#8A2178",dataCyan:"#0C585A",dataCyanDark:"#007D80",dataLime:"#567D0C",dataTeal:"#14CC98"},Ja={light:{...Va,surfaceAccent20:"#199AF033"},dark:Ya,highContrastLight:Za,highContrastDark:ja,betaCoreLight:Ka,betaCoreDark:qa},dn=(i="light")=>Ja[i],Yi={step:.8,cutoutRadius:.58,rightCutoutCenter:1.3,leftCutoutCenter:-.3};function un(i,t){return i?t==null?void 0:t.loader.loadOrGetImage(i,t.colIndex,t.rowIndex):void 0}function Qa(i,t,e,r){if(i<=0||t<=0||e.width<=0||e.height<=0)return;const o={x:0,y:0,width:i,height:t},n={...e};if(r==="cover"){const s=Math.max(e.width/i,e.height/t);o.width=e.width/s,o.height=e.height/s,o.x=(i-o.width)/2,o.y=(t-o.height)/2}else if(r==="contain"){const s=Math.min(e.width/i,e.height/t);n.width=i*s,n.height=t*s,n.x+=(e.width-n.width)/2,n.y+=(e.height-n.height)/2}return{source:o,destination:n}}function fn(i,t,e,r){const o="naturalWidth"in t?t.naturalWidth:t.width,n="naturalHeight"in t?t.naturalHeight:t.height,s=Qa(o,n,e,r);if(!s)return;const{source:a,destination:c}=s;i.drawImage(t,a.x,a.y,a.width,a.height,c.x,c.y,c.width,c.height)}const tc=600,ec={s:{diameter:24,fontSize:8},m:{diameter:36,fontSize:14},l:{diameter:48,fontSize:20},xxl:{diameter:88,fontSize:32}};function ic(i=""){return i.split(" ").slice(0,2).map(t=>t[0]??"").join("").toUpperCase()}class ye extends vt{constructor(t,e={}){super(t),this.options=e,this.cutLeft=!1,this.cutRight=!1;const{diameter:r}=this.metrics;this.style={width:r,height:r,flexShrink:0}}set style(t){super.style={...super.style,...t}}get style(){return super.style}get metrics(){return ec[this.options.size??"s"]}measure(){this.rect.width=this.metrics.diameter,this.rect.height=this.metrics.diameter}onPaint(t){var v;const{diameter:e,fontSize:r}=this.metrics,o={x:this.rect.x,y:this.rect.y,width:e,height:e},n=this.options.customText?void 0:this.options.url,s=t.imageTransitions.isActive?t.imageTransitions.getAvatarImage(this.id,this.options.name,n):un(n,t.imageResources),a=this.options.customText||ic(this.options.name),c=((v=this.options.theme)==null?void 0:v.tokens)??dn(),d=this.groupClip&&{...this.groupClip},{cutLeft:h,cutRight:l}=this,{cutoutRadius:u,leftCutoutCenter:f,rightCutoutCenter:g}=Yi;t.custom(C=>{var m;C.save();try{d&&(C.beginPath(),C.rect(d.x,d.y,d.width,d.height),C.clip()),[h?f:void 0,l?g:void 0].forEach(p=>{p!==void 0&&(C.beginPath(),C.rect(o.x,o.y,e,e),C.moveTo(o.x+p*e+u*e,o.y+e/2),C.arc(o.x+p*e,o.y+e/2,u*e,0,Math.PI*2),C.clip("evenodd"))}),C.beginPath(),C.arc(o.x+e/2,o.y+e/2,e/2,0,Math.PI*2),C.clip(),C.fillStyle=c.surfaceAccent20??c.surfaceTransparentAccentActive,C.fillRect(o.x,o.y,e,e),s?fn(C,s,o,"fill"):(C.font=`${tc} ${r}px ${((m=this.options.theme)==null?void 0:m.fontFamily)||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'}`,C.textAlign="center",C.textBaseline="middle",C.fillStyle=c.textAccent,C.fillText(a,o.x+e/2,o.y+e/2))}finally{C.restore()}})}}function ho(i,t){return i===void 0||!Number.isFinite(i)?t:Math.min(Number.MAX_SAFE_INTEGER,Math.max(0,Math.floor(i)))}function rc(i,t,e){const r=Math.min(i,ho(t,3)),o=Math.max(i,ho(e,i)),n=o-r;return{visible:r,total:o,hidden:n,slots:r+(n>0?1:0)}}class mr extends dt{constructor(t,e){var a;super(t),this.options=e,this.activeIndex=-1,this.avatars=[];const r=rc(e.items.length,e.visibleCount,e.totalCount),o=e.items.slice(0,r.visible);if(new Set(e.items.map(c=>c.id)).size!==e.items.length)throw new Error("Canvas.AvatarGroup items must have unique ids");if(o.forEach((c,d)=>{const h=new ye(`${t}:item:${c.id}`,{...c,size:e.size,theme:e.theme});h.tooltip=c.tooltip,h.onClick=l=>{var u;l.target===h&&((u=e.onItemClick)==null||u.call(e,{item:c,index:d,event:l}))},e.onItemClick&&(h.style.cursor="pointer"),this.appendAvatar(h)}),r.hidden>0){const c=new ye(`${t}:overflow`,{customText:`+${r.hidden}`,size:e.size,theme:e.theme});c.tooltip=e.overflowTooltip??`+${r.hidden}`,c.onClick=d=>{var h;d.target===c&&((h=e.onOverflowClick)==null||h.call(e,{hiddenCount:r.hidden,hiddenItems:e.items.slice(r.visible),totalCount:r.total,event:d}))},e.onOverflowClick&&(c.style.cursor="pointer"),this.appendAvatar(c)}const s=((a=this.avatars[0])==null?void 0:a.metrics.diameter)??0;this.position="relative",this.style={width:r.slots?s+(r.slots-1)*Yi.step*s:0,height:s,flexShrink:0}}set style(t){super.style={...super.style,...t}}get style(){return super.style}appendAvatar(t){const e=this.avatars.length;t.position="absolute",t.left=e*Yi.step*t.metrics.diameter,t.top=0,t.portalHoverEnabled=t.tooltip!==void 0,t.onMouseEnter=()=>{this.activeIndex=e},t.onMouseLeave=()=>{this.activeIndex===e&&(this.activeIndex=-1)},this.avatars.push(t),this.addChild(t)}onPaint(t,e){this.avatars.forEach((r,o)=>{r.groupClip=this.rect,r.cutRight=o<this.avatars.length-1&&o!==this.activeIndex,r.cutLeft=this.activeIndex>=0&&o===this.activeIndex+1,r.paint(t,e)})}}const at={xs:{height:24,fontSize:12,borderRadius:4,paddingX:8,iconSize:14},s:{height:32,fontSize:13,borderRadius:6,paddingX:12,iconSize:16},m:{height:40,fontSize:14,borderRadius:8,paddingX:16,iconSize:18},l:{height:48,fontSize:16,borderRadius:10,paddingX:20,iconSize:20}};function gn(i){return{default:{bgColor:i.surfaceSolidDefault,bgColorHover:i.surfaceSolidDefault,borderColor:i.surfaceSolidDefault,textColor:i.inverseTextPrimary,iconColor:i.inverseTextPrimary},primary:{bgColor:i.surfaceSolidDefault,bgColorHover:i.surfaceSolidDefault,borderColor:i.surfaceSolidDefault,textColor:i.inverseTextPrimary,iconColor:i.inverseTextPrimary},accent:{bgColor:i.surfaceAccent,bgColorHover:i.surfaceAccentHover,borderColor:i.surfaceAccent,textColor:i.onDarkTextPrimary,iconColor:i.onDarkTextPrimary},secondary:{bgColor:i.surfaceTransparentSecondary,bgColorHover:i.surfaceTransparentSecondaryHover,borderColor:"transparent",textColor:i.textPrimary,iconColor:i.textPrimary},clear:{bgColor:i.surfaceClear,bgColorHover:i.surfaceTransparentSecondaryHover,borderColor:"transparent",textColor:i.textPrimary,iconColor:i.textPrimary},success:{bgColor:i.surfacePositive,bgColorHover:i.surfacePositiveHover,borderColor:i.surfacePositive,textColor:i.onDarkTextPrimary,iconColor:i.onDarkTextPrimary},warning:{bgColor:i.surfaceWarning,bgColorHover:i.surfaceWarningHover,borderColor:i.surfaceWarning,textColor:i.onDarkTextPrimary,iconColor:i.onDarkTextPrimary},critical:{bgColor:i.surfaceNegative,bgColorHover:i.surfaceNegativeHover,borderColor:i.surfaceNegative,textColor:i.onDarkTextPrimary,iconColor:i.onDarkTextPrimary},dark:{bgColor:i.onLightSurfaceTransparentDeep,bgColorHover:i.onLightSurfaceTransparentDeep,borderColor:i.onLightSurfaceTransparentDeep,textColor:i.onDarkTextPrimary,iconColor:i.onDarkTextPrimary},black:{bgColor:i.onLightSurfaceSolidDefault,bgColorHover:i.onLightSurfaceSolidDefault,borderColor:i.onLightSurfaceSolidDefault,textColor:i.onDarkTextPrimary,iconColor:i.onDarkTextPrimary},white:{bgColor:i.onDarkSurfaceSolidDefault,bgColorHover:i.onDarkSurfaceSolidDefault,borderColor:i.onDarkSurfaceSolidDefault,textColor:i.onLightTextPrimary,iconColor:i.onLightTextPrimary}}}const uo={bgColor:"#060A0C",bgColorHover:"#13181B",borderColor:"transparent",textColor:"#FFFFFF",textColorHover:"#F2F5F893",iconColor:"#FFFFFF",iconColorHover:"#F2F5F893"},fi={default:uo,primary:{bgColor:"#060A0C",bgColorHover:"#111C22",borderColor:"transparent",textColor:"#FFFFFF",iconColor:"#FFFFFF"},accent:{bgColor:"#118CDF",bgColorHover:"#1798EE",borderColor:"transparent",textColor:"#FFFFFF",iconColor:"#FFFFFF"},secondary:{bgColor:"#ADB9C238",bgColorHover:"#ADB9C247",borderColor:"transparent",textColor:"#060A0C",iconColor:"#060A0C"},clear:{bgColor:"transparent",bgColorHover:"rgba(6, 10, 12, 0.08)",borderColor:"transparent",textColor:"#060A0C",iconColor:"#060A0C"},success:{bgColor:"#1A9E32",bgColorHover:"#1EB83A",borderColor:"transparent",textColor:"#FFFFFF",iconColor:"#FFFFFF"},warning:{bgColor:"#FA5F05",bgColorHover:"#FB782D",borderColor:"transparent",textColor:"#FFFFFF",iconColor:"#FFFFFF"},critical:{bgColor:"#FF293E",bgColorHover:"#FF5263",borderColor:"transparent",textColor:"#FFFFFF",iconColor:"#FFFFFF"},dark:{bgColor:"#30373CC7",bgColorHover:"#30373CC7",borderColor:"transparent",textColor:"#FFFFFF",textColorHover:"#F2F5F893",iconColor:"#FFFFFF",iconColorHover:"#F2F5F893"},black:uo,white:{bgColor:"#FFFFFF",bgColorHover:"#FFFFFF",borderColor:"transparent",textColor:"#060A0C",textColorHover:"#13181B93",iconColor:"#060A0C",iconColorHover:"#13181B93"}},re=4,oe=4,Cn=16,yr=20,br=4,Et=1,Ar=6,oc=4,gi="s",Ci="default",Dr="#d32f2f",be="#ffffff",vn="rgba(30, 136, 229, 0.08)",Ki="#ffffff",Fn="#E8EEF2",pn="#D5DFE6",qi="#8A959D",xr="|",mn="#",yn=35,Sr=15,Zi=new Map,ji=new Map;function Er(i,t){if(i.charCodeAt(0)===yn){const e=parseInt(i.slice(1),16),r=Math.min(255,(e>>16&255)+t),o=Math.min(255,(e>>8&255)+t),n=Math.min(255,(e&255)+t);return`${mn}${(r<<16|o<<8|n).toString(16).padStart(6,"0")}`}return i}function fo(i,t){const e=Math.min(1,Math.max(0,t));if(i.charCodeAt(0)!==35)throw new Error("Only HEX color format is supported");let r=i.slice(1),o,n,s;if((r.length===3||r.length===4)&&(r=r.split("").map(a=>a+a).join("")),r.length===6)o=parseInt(r.slice(0,2),16),n=parseInt(r.slice(2,4),16),s=parseInt(r.slice(4,6),16);else if(r.length===8)o=parseInt(r.slice(0,2),16),n=parseInt(r.slice(2,4),16),s=parseInt(r.slice(4,6),16);else throw new Error(`Invalid HEX color format: ${i}`);return`rgba(${o}, ${n}, ${s}, ${e})`}function bn(i,t){const e=`${i}${xr}${t}`;let r=Zi.get(e);return r===void 0&&(r=Er(i,t),Zi.set(e,r)),r}function wr(i,t,e){const r=`${e}${xr}${t}`;let o=ji.get(r);return o===void 0&&(i.font=e,o=i.measureText(t).width,ji.set(r,o)),o}function Tr(i,t,e,r,o,n){if(i!=="auto")return i;let s=0;return o&&(s+=e+r),n&&(s+=e+r),t+s+4}function Hr(i,t,e,r,o){let n=i;return r&&(n+=t+e),o&&(n+=t+e),n}function nc(){Zi.clear(),ji.clear()}const sc=Er(Dr,Sr);function kr(i,t,e,r){if(e)return{bgColor:i.bgCell,borderColor:i.borderColor,textColor:i.textLight,iconColor:i.textLight};switch(t){case"primary":return Ji(i,r);case"secondary":return An(i,r);case"danger":return Dn(r);default:return Ji(i,r)}}function ac(i,t,e,r,o){const{accentColor:n}=i,s=i.accentFg||be,a=i.accentFg||be,c=.4;if(t||e){const u=o?fo(n,c):n;return{bgColor:u,borderColor:u,textColor:s,iconColor:a}}const d="#485056B0",h="white",l=o?fo(d,c):d;return{bgColor:h,borderColor:l,textColor:s,iconColor:a}}function Ji(i,t){const{accentColor:e}=i,r=t?bn(e,Sr):e;return{bgColor:r,borderColor:r,textColor:i.accentFg||be,iconColor:i.accentFg||be}}function An(i,t){return{bgColor:t?i.accentLight||vn:i.bgCell,borderColor:i.accentColor,textColor:i.accentColor,iconColor:i.accentColor}}function Dn(i){const t=i?sc:Dr;return{bgColor:t,borderColor:t,textColor:Ki,iconColor:Ki}}function Br(i,t,e){return t?{bgColor:Fn,borderColor:pn,textColor:qi,iconColor:qi}:{bgColor:e?i.bgColorHover:i.bgColor,borderColor:i.borderColor,textColor:e&&i.textColorHover?i.textColorHover:i.textColor,iconColor:e&&i.iconColorHover?i.iconColorHover:i.iconColor}}const Zt=-1,go=0,gt={colIndex:Zt,rowIndex:Zt},et={x:go,y:go},cc=2;function Je(i){const{location:t}=i;if(Array.isArray(t)&&t.length>=cc)return gt.colIndex=t[0]??Zt,gt.rowIndex=t[1]??Zt,gt;const{col:e}=i,{row:r}=i;if(typeof e=="number"&&typeof r=="number")return gt.colIndex=e,gt.rowIndex=r,gt;const{colIndex:o}=i,{rowIndex:n}=i;return typeof o=="number"&&typeof n=="number"?(gt.colIndex=o,gt.rowIndex=n,gt):(gt.colIndex=Zt,gt.rowIndex=Zt,gt)}const Ue="-",Co=0;function te(i,t){const{colIndex:e,rowIndex:r}=i;return e>=Co&&r>=Co?`${e}${Ue}${r}`:`${t.x}${Ue}${t.y}${Ue}${t.width}${Ue}${t.height}`}function Qi(i){const{posX:t}=i,{posY:e}=i;if(typeof t=="number"&&typeof e=="number"&&t===t&&e===e)return et.x=t,et.y=e,et;const{x:r}=i,{y:o}=i;if(typeof r=="number"&&typeof o=="number"&&r===r&&o===o)return et.x=r,et.y=o,et;const{location:n}=i;if(Array.isArray(n)&&n.length>=2){const s=n[0],a=n[1];if(typeof s=="number"&&typeof a=="number")return et.x=s,et.y=a,et}return null}function tr(i,t){const e=i.x,r=i.y,o=t.x,n=t.y;return e>=o&&e<=o+t.width&&r>=n&&r<=n+t.height?(et.x=e-o,et.y=r-n,et):i}function xn(i,t,e){if(typeof i!="number"||typeof t!="number")return;const r=e.width,o=e.height,n=e.x,s=e.y;if(i>=-1&&i<=r+1&&t>=-1&&t<=o+1)return et.x=i,et.y=t,et;if(i>=n-1&&i<=n+r+1&&t>=s-1&&t<=s+o+1)return et.x=i-n,et.y=t-s,et}function Pr(i,t,e){const r=e.x,o=e.y;return i>=r&&i<=r+e.width&&t>=o&&t<=o+e.height}function Rt(i,t){if(typeof i=="object"&&i){const{hoverX:e}=i,{hoverY:r}=i,{rectX:o}=i,{rectY:n}=i;if(typeof e=="number"&&typeof r=="number"&&typeof o=="number"&&typeof n=="number"){const s=t.x-o,a=t.y-n;return e>=s&&e<=s+t.width&&r>=a&&r<=a+t.height}}return!!i}function Qe(){return typeof window<"u"?Math.ceil(window.devicePixelRatio):1}function Sn(i){let t=0;for(let e=0;e<i.length;e++)t=(t<<5)-t+i.charCodeAt(e),t|=0;return t.toString(36)}function er(i,t){let e=i;return t&&(e=e.replace(/currentColor/g,t),!e.includes("fill=")&&!e.includes("stroke=")&&(e=e.replace("<svg",`<svg fill="${t}"`))),`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}class En{constructor(){this.iconRegistry=new Map,this.svgDataUrlCache=new Map,this.spriteCache=new Map,this.pendingLoads=new Set,this.loadListeners=new Set,this.inFlightCount=0,this.stats={requests:0,hits:0,misses:0,cacheSize:0,inFlight:0}}onLoad(t){return this.loadListeners.add(t),()=>this.loadListeners.delete(t)}register(t,e={}){const r=Array.isArray(t)?t:Object.entries(t).map(([o,n])=>({name:o,svg:n}));for(const{name:o,svg:n}of r)o&&n&&(e.overwrite||!this.iconRegistry.has(o))&&this.iconRegistry.set(o,n);return this}getSprite(t,e,r){const o=this.resolveKey(t,e,r);if(!o)return null;this.stats.requests++;const n=this.spriteCache.get(o.key);return n?(this.stats.hits++,n):(this.stats.misses++,this.loadSprite(o.key,o.url,e,!0),null)}preload(t,e){const r=Array.isArray(t)?t:[t];for(const o of r){const n=this.resolveKey(o,e.size,e.color);n&&this.loadSprite(n.key,n.url,e.size,!1)}return this}draw(t,e,r,o,n,s){const a=this.getSprite(e,n,s);if(a){const c=n*Qe();t.drawImage(a,0,0,c,c,r,o,n,n)}}getImageDirect(t){return t&&t instanceof HTMLImageElement&&t.complete&&t.naturalHeight!==0?t:null}getStats(){return{...this.stats}}reset(){return this.spriteCache.clear(),this.svgDataUrlCache.clear(),this.pendingLoads.clear(),this.stats={requests:0,hits:0,misses:0,cacheSize:0,inFlight:0},this}clearSpriteCache(){return this.spriteCache.clear(),this.pendingLoads.clear(),this.stats.cacheSize=0,this}has(t){return this.iconRegistry.has(t)}getSvg(t){return this.iconRegistry.get(t)}resolveKey(t,e,r){if(!t||e<=0)return null;const o=e*Qe();if(typeof t=="string"){const{key:n,url:s}=this.resolveIconUrl(t,r);return{key:`${n}@${o}`,url:s}}return t instanceof HTMLImageElement?{key:`img:${t.src}:${r??""}@${o}`,url:t.src}:null}resolveIconUrl(t,e){const r=e??"",o=this.iconRegistry.get(t);if(o){const s=`r:${t}:${r}`;return this.svgDataUrlCache.has(s)||this.svgDataUrlCache.set(s,er(o,e)),{key:s,url:this.svgDataUrlCache.get(s)}}const n=t.trimStart();if(n.startsWith("<svg")){const s=`s:${Sn(n)}:${r}`;return this.svgDataUrlCache.has(s)||this.svgDataUrlCache.set(s,er(n,e)),{key:s,url:this.svgDataUrlCache.get(s)}}return{key:`u:${t}:${r}`,url:t}}loadSprite(t,e,r,o){var a;if(this.spriteCache.has(t)||this.pendingLoads.has(t))return;this.pendingLoads.add(t),this.inFlightCount++,this.stats.inFlight=this.inFlightCount;const n=new Image;n.src=e;const s=r*Qe();(a=n.decode)==null||a.call(n).then(()=>{const c=document.createElement("canvas");c.width=s,c.height=s;const d=c.getContext("2d");d&&(d.drawImage(n,0,0,s,s),this.spriteCache.set(t,c),this.stats.cacheSize=this.spriteCache.size),o&&this.notifyListeners()}).catch(()=>{}).finally(()=>{this.pendingLoads.delete(t),this.inFlightCount--,this.stats.inFlight=this.inFlightCount,!o&&this.inFlightCount===0&&this.notifyListeners()})}notifyListeners(){this.loadListeners.forEach(t=>t())}}const wt=new En;function wn(i){return wt.onLoad(i)}function lc(i,t={}){wt.register(i,t)}function Tn(i,t,e){return wt.getSprite(i,t,e)}function Hn(i,t){wt.preload(i,t)}function kn(i,t,e,r,o,n){wt.draw(i,t,e,r,o,n)}function Bn(i,t){return wt.getImageDirect(i)}function hc(){return wt.getStats()}function dc(){wt.clearSpriteCache()}const uc=kn;function Ct(i,t,e,r,o,n){if(!t||o<=0)return;const s=Tn(t,o,n);if(s){i.drawImage(s,e,r,o,o);return}const a=Bn(t);a&&i.drawImage(a,e,r,o,o)}function Pn(i,t,e,r,o,n,s,a="primary",c=!1,d=!1,h,l,u,f=Ar){const g=re,v=o-g*2,C=Math.min(v-oe,Cn),m=s.baseFontFull,p=u?wr(u,n,m):0,b=Tr(r,p,C,f,h,l),A=e+g,S=Rt(d,{x:t,y:e,width:b,height:o}),D=kr(s,a,c,S),H=t+b*.5,w=A+v*.5;i.roundedRect(t,A,b,v,br,{fillStyle:D.bgColor,strokeStyle:D.borderColor,lineWidth:Et});const P=Hr(p,C,f,h,l);let _=H-P*.5;if(h){const G=w-C*.5;Ct(i,h,_,G,C,D.textColor),_+=C+f}if(i.fillText(n,_,w,m,D.textColor,"middle","left"),l){const G=_+p+f,V=w-C*.5;Ct(i,l,G,V,C,D.textColor)}return{x:t,y:A,width:b,height:v,actualWidth:b}}function Ln(i,t,e,r,o,n=Ci,s=gi,a=!1,c=!1,d,h,l,u=Ar,f){const g=at[s],v=f?f[n]:fi[n],C=`${g.fontSize}px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`,m=l?wr(l,o,C):0,p=Tr(r,m,g.iconSize,u,d,h),b=Rt(c,{x:t,y:e,width:p,height:g.height}),A=Br(v,a,b),S=t+p*.5,D=e+g.height*.5;A.bgColor!=="transparent"?i.roundedRect(t,e,p,g.height,g.borderRadius,{fillStyle:A.bgColor,strokeStyle:A.borderColor!=="transparent"?A.borderColor:void 0,lineWidth:A.borderColor!=="transparent"?Et:0}):A.borderColor!=="transparent"&&i.roundedRect(t,e,p,g.height,g.borderRadius,{fillStyle:A.bgColor,strokeStyle:A.borderColor,lineWidth:Et});const H=Hr(m,g.iconSize,u,d,h);let w=S-H*.5;if(d){const P=D-g.iconSize*.5;Ct(i,d,w,P,g.iconSize,A.textColor),w+=g.iconSize+u}if(i.fillText(o,w,D,C,A.textColor,"middle","left"),h){const P=w+m+u,_=D-g.iconSize*.5;Ct(i,h,P,_,g.iconSize,A.textColor)}return{x:t,y:e,width:p,height:g.height,actualWidth:p}}const fc={100:"FF",90:"E6",80:"CC",75:"BF",70:"B3",60:"99",50:"80",40:"66",30:"4D",25:"40",20:"33",10:"1A",0:"00"},gc=(i,t)=>i.length!==6?i:i.slice(0,4)+fc[t],Yt="transparent",Cc=Object.fromEntries(Object.entries(fi).map(([i,t])=>i==="secondary"?[i,{bgColor:Yt,borderColor:Yt,textColor:"#485056B0",bgColorHover:Yt,iconColor:"#485056B0",iconColorHovered:"#485056FF"}]:[i,{bgColor:Yt,borderColor:Yt,textColor:t.bgColor,bgColorHover:Yt,iconColor:t.bgColor,iconColorHovered:t.bgColorHover}]));function In(i,t,e,r,o=Ci,n=gi,s=!1,a=!1,c){const d=at[n],h=Cc[o],l=(c==null?void 0:c.overrideSquareSize)??d.height,u=(c==null?void 0:c.overrideIconSize)??d.iconSize,f=Rt(a,{x:t,y:e,width:l,height:l}),g=h,v=t+l*.5,C=e+l*.5,m=v-u*.5,p=C-u*.5;g.bgColor!=="transparent"?i.roundedRect(t,e,l,l,d.borderRadius,{fillStyle:g.bgColor,strokeStyle:g.borderColor!=="transparent"?g.borderColor:void 0,lineWidth:g.borderColor!=="transparent"?Et:0}):g.borderColor!=="transparent"&&i.roundedRect(t,e,l,l,d.borderRadius,{fillStyle:g.bgColor,strokeStyle:g.borderColor,lineWidth:Et});const b=(c==null?void 0:c.iconColor)??g.iconColor,A=(c==null?void 0:c.iconColorHovered)??(c==null?void 0:c.iconColor)??g.iconColorHovered,S=s?gc(b,40):f?A:b;return Ct(i,r,m,p,u,S),{x:t,y:e,width:l,height:l}}function Lr(i,t,e,r,o,n,s,a="primary",c=!1,d=!1){const h=re,l=o-h*2,u=Math.min(l-oe,yr),f=r==="auto"?u:r,g=e+h,v=Rt(d,{x:t,y:e,width:f,height:o}),C=kr(s,a,c,v),m=t+f*.5,p=g+l*.5,b=m-u*.5,A=p-u*.5;return i.roundedRect(t,g,f,l,br,{fillStyle:C.bgColor,strokeStyle:C.borderColor,lineWidth:Et}),Ct(i,n,b,A,u,C.iconColor),{x:t,y:g,width:f,height:l}}function Mn(i,t,e,r,o=Ci,n=gi,s=!1,a=!1){const c=at[n],d=fi[o],h=c.height,l=Rt(a,{x:t,y:e,width:h,height:h}),u=Br(d,s,l),f=t+h*.5,g=e+h*.5,v=f-c.iconSize*.5,C=g-c.iconSize*.5;return u.bgColor!=="transparent"?i.roundedRect(t,e,h,h,c.borderRadius,{fillStyle:u.bgColor,strokeStyle:u.borderColor!=="transparent"?u.borderColor:void 0,lineWidth:u.borderColor!=="transparent"?Et:0}):u.borderColor!=="transparent"&&i.roundedRect(t,e,h,h,c.borderRadius,{fillStyle:u.bgColor,strokeStyle:u.borderColor,lineWidth:Et}),Ct(i,r,v,C,c.iconSize,u.iconColor),{x:t,y:e,width:h,height:h}}const vo={xs:{height:16,fontSize:10,paddingX:4,borderRadius:4},s:{height:20,fontSize:11,paddingX:6,borderRadius:5},m:{height:24,fontSize:12,paddingX:8,borderRadius:6},l:{height:28,fontSize:13,paddingX:10,borderRadius:7}};function vc(i){return{default:{bgColor:i.surfaceSolidDefault,bgColorTransparent:i.surfaceTransparentSecondary,textColor:i.inverseTextPrimary,textColorOnTransparent:i.textPrimary},accent:{bgColor:i.surfaceAccent,bgColorTransparent:i.surfaceTransparentAccent,textColor:i.onDarkTextPrimary,textColorOnTransparent:i.textAccent},positive:{bgColor:i.surfacePositive,bgColorTransparent:i.surfaceTransparentPositive,textColor:i.onDarkTextPrimary,textColorOnTransparent:i.textPositive},warning:{bgColor:i.surfaceWarning,bgColorTransparent:i.surfaceTransparentWarning,textColor:i.onDarkTextPrimary,textColorOnTransparent:i.textWarning},negative:{bgColor:i.surfaceNegative,bgColorTransparent:i.surfaceTransparentNegative,textColor:i.onDarkTextPrimary,textColorOnTransparent:i.textNegative},dark:{bgColor:i.onLightSurfaceSolidDefault,bgColorTransparent:i.onLightSurfaceTransparentDeep,textColor:i.onDarkTextPrimary,textColorOnTransparent:i.onLightTextPrimary},light:{bgColor:i.onDarkSurfaceSolidDefault,bgColorTransparent:i.onDarkSurfaceTransparentCard,textColor:i.onLightTextPrimary,textColorOnTransparent:i.onDarkTextPrimary}}}const Fc="|",Xe=6,Fo=new Map,po={xs:10,s:12,m:14,l:16};class _n extends vt{constructor(t,e,r){var o;super(t),this.view="default",this.size="s",this.transparent=!1,this.clear=!1,this.pilled=!1,this.viewColors={},this.text=e,r&&(r.view!==void 0&&(this.view=r.view),r.size!==void 0&&(this.size=r.size),r.transparent!==void 0&&(this.transparent=r.transparent),r.clear!==void 0&&(this.clear=r.clear),r.pilled!==void 0&&(this.pilled=r.pilled),this.leftIcon=r.leftIcon,this.rightIcon=r.rightIcon,this.customColor=r.customColor,this.customBackgroundColor=r.customBackgroundColor,(o=r.theme)!=null&&o.tokens&&(this.viewColors=vc(r.theme.tokens)))}measure(t){const e=vo[this.size],r=po[this.size],o=`${e.fontSize}px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`,n=mo(t,o,this.text),s=this.text.length>0;let a=0;this.leftIcon&&(a+=r+(s?Xe:0)),this.rightIcon&&(a+=r+(s?Xe:0)),this.rect.width=n+a+e.paddingX*2,this.rect.height=e.height}onPaint(t,e){const{x:r,y:o,width:n,height:s}=this.rect,a=vo[this.size],c=po[this.size],d=this.viewColors[this.view];if(!d)return;const h=`${a.fontSize}px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`;let l,u;if(this.clear?(l="transparent",u=this.customColor??d.textColorOnTransparent):this.transparent?(l=this.customBackgroundColor??d.bgColorTransparent,u=this.customColor??d.textColorOnTransparent):(l=this.customBackgroundColor??d.bgColor,u=this.customColor??d.textColor),!this.clear){const v=this.pilled?s/2:a.borderRadius;t.roundedRect(r,o,n,s,v,{fillStyle:l})}const f=o+s/2;let g=r+a.paddingX;if(this.leftIcon){const v=f-c/2;Ct(t,this.leftIcon,g,v,c,u),g+=c+Xe}if(t.fillText(this.text,g,f,h,u,"middle"),this.rightIcon){const v=mo(e,h,this.text),C=g+v+Xe,m=f-c/2;Ct(t,this.rightIcon,C,m,c,u)}}}function mo(i,t,e){const r=`${t}${Fc}${e}`;let o=Fo.get(r);return o===void 0&&(i.font=t,o=i.measureText(e).width,Fo.set(r,o)),o}const pc="default",mc="s",Mi="pointer",Ve=8,yc={accentColor:"#1e88e5",accentLight:"rgba(30, 136, 229, 0.16)",accentFg:"#ffffff",bgCell:"#ffffff",borderColor:"#e0e0e0",textLight:"#9e9e9e",baseFontFull:"13px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"},yo=new Map;class Rn extends vt{constructor(t,e,r){var o;super(t),this.variant="primary",this.view=pc,this.size=mc,this.disabled=!1,this.isHovered=!1,this.useNewApi=!1,this.text=e,super.style={...super.style,cursor:Mi},r&&(r.view!==void 0?(this.view=r.view,this.useNewApi=!0):r.variant!==void 0&&(this.variant=r.variant),r.size!==void 0&&(this.size=r.size,this.useNewApi=!0),this.leftIcon=r.leftIcon,this.rightIcon=r.rightIcon,r.disabled!==void 0&&(this.disabled=r.disabled),r.onClick&&(this.onClick=r.onClick),(o=r.theme)!=null&&o.tokens&&(this.viewColors=gn(r.theme.tokens)))}set style(t){super.style={...super.style,cursor:Mi,...t}}get style(){const t=super.style;return t.cursor||(t.cursor=Mi),t}measure(t){const e=at[this.size],r=`${e.fontSize}px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`,o=bc(t,this.text,r);let n=0;this.leftIcon&&(n+=e.iconSize+Ve),this.rightIcon&&(n+=e.iconSize+Ve),this.rect.width=o+n+e.paddingX*2,this.rect.height=e.height}onPaint(t,e){const{x:r,y:o,width:n}=this.rect;if(this.useNewApi)Ln(t,r,o,n,this.text,this.view,this.size,this.disabled,this.isHovered,this.leftIcon,this.rightIcon,e,Ve,this.viewColors);else{const s=at[this.size];Pn(t,r,o,n,s.height,this.text,yc,this.variant,this.disabled,this.isHovered,this.leftIcon,this.rightIcon,e,Ve)}}onMouseEnter(){this.isHovered=!0}onMouseLeave(){this.isHovered=!1}}function bc(i,t,e){const r=`${e}|${t}`;let o=yo.get(r);return o===void 0&&(i.font=e,o=i.measureText(t).width,yo.set(r,o)),o}const bo=16,Ao="black",Do=0,Ac=Math.PI/2,Dc=1.8,Kt={startX:-3.5,startY:-4.25,middleX:2.75,middleY:0,endX:-3.5,endY:4.25};class xc extends vt{constructor(t,e={}){super(t),this.rotation=Do,this.color=Ao,this.rotation=e.rotation??Do,this.color=e.color??Ao,this.rect.width=bo,this.rect.height=bo}measure(t){}onPaint(t,e){const{x:r,y:o,width:n,height:s}=this.rect,a=r+n/2,c=o+s/2,d=this.rotation*Ac;t.custom(h=>{h.save(),h.translate(a,c),h.rotate(d),h.strokeStyle=this.color,h.lineWidth=Dc,h.lineCap="round",h.lineJoin="round",h.beginPath(),h.moveTo(Kt.startX,Kt.startY),h.lineTo(Kt.middleX,Kt.middleY),h.lineTo(Kt.endX,Kt.endY),h.stroke(),h.restore()})}}const Sc=28,Ec="default",wc="s",Tc="pointer",Hc=20,kc={accentColor:"#1e88e5",accentLight:"rgba(30, 136, 229, 0.16)",accentFg:"#ffffff",bgCell:"#ffffff",borderColor:"#e0e0e0",textLight:"#9e9e9e"};class ir extends vt{constructor(t,e,r){super(t),this.view=Ec,this.buttonSize=wc,this.isHovered=!1,this.useNewApi=!1,this.getDisabled=()=>this.disabled?"default":Tc,this.icon=e,this.size=(r==null?void 0:r.size)??"auto",this.variant=(r==null?void 0:r.variant)??"primary",this.disabled=(r==null?void 0:r.disabled)??!1,super.style={...super.style,cursor:this.getDisabled()},(r==null?void 0:r.view)!==void 0&&(this.view=r.view,this.useNewApi=!0),(r==null?void 0:r.buttonSize)!==void 0&&(this.buttonSize=r.buttonSize,this.useNewApi=!0),(r==null?void 0:r.overrideSquareSize)!==void 0&&(this.overrideSquareSize=r.overrideSquareSize),(r==null?void 0:r.overrideIconSize)!==void 0&&(this.overrideIconSize=r.overrideIconSize),(r==null?void 0:r.overrideWidth)!==void 0&&(this.overrideWidth=r.overrideWidth),(r==null?void 0:r.iconColor)!==void 0&&(this.iconColor=r.iconColor),(r==null?void 0:r.iconColorHovered)!==void 0&&(this.iconColorHovered=r.iconColorHovered),r!=null&&r.onClick&&(this.onClick=o=>{var n;return(n=r.onClick)==null?void 0:n.call(r,o)})}set style(t){super.style={...super.style,cursor:this.getDisabled(),...t}}get style(){const t=super.style;return t.cursor||(t.cursor=this.getDisabled()),t}measure(t){if(this.useNewApi){const e=at[this.buttonSize],r=this.overrideSquareSize??e.height;this.rect.height=r,this.rect.width=this.overrideWidth??r}else{const e=xo(this.size);this.rect.height=e.height,this.rect.width=e.width}}onPaint(t,e){const{x:r,y:o,width:n,height:s}=this.rect;if(this.useNewApi){const a=this.overrideSquareSize!==void 0||this.overrideIconSize!==void 0||this.iconColor!==void 0||this.iconColorHovered!==void 0?{overrideSquareSize:this.overrideSquareSize,overrideIconSize:this.overrideIconSize,iconColor:this.iconColor,iconColorHovered:this.iconColorHovered}:void 0;if(In(t,r,o,this.icon,this.view,this.buttonSize,this.disabled,this.isHovered,a),_t.DEBUG){const c=at[this.buttonSize],d=this.overrideSquareSize??c.height,h=this.overrideIconSize??c.iconSize,l=r+(d-h)*.5,u=o+(d-h)*.5;t.strokeRect(l,u,h,h,"cyan",1)}}else Lr(t,r,o,n,s,this.icon,kc,this.variant,this.disabled,this.isHovered)}onMouseEnter(){this.isHovered=!0}onMouseLeave(){this.isHovered=!1}containsHitPoint(t,e){if(this.useNewApi){const n=at[this.buttonSize],s=this.overrideSquareSize??n.height,a={x:this.rect.x,y:this.rect.y,width:this.overrideWidth??s,height:s};return So(t,e,a)}const r=xo(this.size,this.rect.height),o=Bc(this.rect.x,this.rect.y,r);return So(t,e,o)}}function xo(i,t){const e=typeof i=="number"?i:t??Sc,r=0,o=re,n=Math.min(e-o*2-oe,Hc),s=typeof i=="number"?i:n+r*2;return{height:e,width:s,paddingX:r,paddingY:o,iconSize:n}}function Bc(i,t,e){return{x:i+e.paddingX,y:t+e.paddingY,width:e.width-e.paddingX*2,height:e.height-e.paddingY*2}}function So(i,t,e){return i>=e.x&&i<=e.x+e.width&&t>=e.y&&t<=e.y+e.height}const Pc=16,Lc="transparent";class Nn extends vt{constructor(t,e,r){super(t),this.icon=e,this.size=(r==null?void 0:r.size)??Pc,this.color=r==null?void 0:r.color}measure(t){this.rect.width=this.size,this.rect.height=this.size}onPaint(t,e){const{x:r,y:o,width:n,height:s}=this.rect;this.backgroundColor&&this.backgroundColor!==Lc&&t.fillRect(r,o,n,s,this.backgroundColor),Ct(t,this.icon,r,o,this.size,this.color)}}const Ic=28,Mc="default",_c="s",_i="pointer",Rc=20,Nc={accentColor:"#1e88e5",accentLight:"rgba(30, 136, 229, 0.16)",accentFg:"#ffffff",bgCell:"#ffffff",borderColor:"#e0e0e0",textLight:"#9e9e9e"};class On extends vt{constructor(t,e,r){super(t),this.view=Mc,this.buttonSize=_c,this.isHovered=!1,this.useNewApi=!1,this.icon=e,this.size=(r==null?void 0:r.size)??"auto",this.variant=(r==null?void 0:r.variant)??"primary",this.disabled=(r==null?void 0:r.disabled)??!1,super.style={...super.style,cursor:_i},(r==null?void 0:r.view)!==void 0&&(this.view=r.view,this.useNewApi=!0),(r==null?void 0:r.buttonSize)!==void 0&&(this.buttonSize=r.buttonSize,this.useNewApi=!0),r!=null&&r.onClick&&(this.onClick=o=>{var n;return(n=r.onClick)==null?void 0:n.call(r,o)})}set style(t){super.style={...super.style,cursor:_i,...t}}get style(){const t=super.style;return t.cursor||(t.cursor=_i),t}measure(t){if(this.useNewApi){const e=at[this.buttonSize];this.rect.height=e.height,this.rect.width=e.height}else{const e=Eo(this.size);this.rect.height=e.height,this.rect.width=e.width}}onPaint(t,e){const{x:r,y:o,width:n,height:s}=this.rect;this.useNewApi?Mn(t,r,o,this.icon,this.view,this.buttonSize,this.disabled,this.isHovered):Lr(t,r,o,n,s,this.icon,Nc,this.variant,this.disabled,this.isHovered)}onMouseEnter(){this.isHovered=!0}onMouseLeave(){this.isHovered=!1}containsHitPoint(t,e){if(this.useNewApi){const n=at[this.buttonSize],s={x:this.rect.x,y:this.rect.y,width:n.height,height:n.height};return wo(t,e,s)}const r=Eo(this.size,this.rect.height),o=Oc(this.rect.x,this.rect.y,r);return wo(t,e,o)}}function Eo(i,t){const e=typeof i=="number"?i:t??Ic,r=0,o=re,n=Math.min(e-o*2-oe,Rc),s=typeof i=="number"?i:n+r*2;return{height:e,width:s,paddingX:r,paddingY:o,iconSize:n}}function Oc(i,t,e){return{x:i+e.paddingX,y:t+e.paddingY,width:e.width-e.paddingX*2,height:e.height-e.paddingY*2}}function wo(i,t,e){return i>=e.x&&i<=e.x+e.width&&t>=e.y&&t<=e.y+e.height}class Ir extends vt{constructor(t,e){super(t),this.options=e,this.style={flexShrink:0}}set style(t){super.style={...super.style,...t}}get style(){return super.style}measure(){typeof this.style.width=="number"&&(this.rect.width=this.style.width),typeof this.style.height=="number"&&(this.rect.height=this.style.height)}onPaint(t){const e=un(this.options.src,t.imageResources);if(!e)return;const r={...this.rect};t.custom(o=>{o.save();try{o.beginPath(),o.rect(r.x,r.y,r.width,r.height),o.clip(),fn(o,e,r,this.options.fit??"cover")}finally{o.restore()}})}}function zc(i,t){const e=i.replace("#","");let r,o,n,s=255;e.length===3||e.length===4?(r=parseInt(e[0]+e[0],16),o=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),e.length===4&&(s=parseInt(e[3]+e[3],16))):(r=parseInt(e.slice(0,2),16),o=parseInt(e.slice(2,4),16),n=parseInt(e.slice(4,6),16),e.length===8&&(s=parseInt(e.slice(6,8),16)));const a=Math.round(s*t),c=d=>d.toString(16).padStart(2,"0");return`#${c(r)}${c(o)}${c(n)}${c(a)}`}const zn="|",Wc=2,Gc=1e4,rr=new Map,or=new Map;function Wn(i,t,e){i.size>=Gc&&i.clear(),i.set(t,e)}function $c(i,t){return`${i}${zn}${t}`}function Uc({text:i,font:t,maxWidth:e,textOverflow:r,ellipsis:o,forceEllipsis:n}){return[t,i,e.toFixed(Wc),r,o,n?"force":"normal"].join(zn)}function nr(i,t,e){const r=$c(e,t);let o=rr.get(r);return o===void 0&&(i.font=e,o=i.measureText(t).width,Wn(rr,r,o)),o}function Xc(i){const t=typeof Intl<"u"?Intl.Segmenter:void 0;if(typeof t=="function"){const e=new t(void 0,{granularity:"grapheme"});return Array.from(e.segment(i),({segment:r})=>r)}return Array.from(i)}function Vc(i,t,e,r,o){const n=nr(i,o,e);if(n>r)return{text:"",didTruncate:!0,width:0};const s=Xc(t);let a=0,c=s.length,d=o,h=n;for(;a<=c;){const l=Math.floor((a+c)/2),u=`${s.slice(0,l).join("")}${o}`,f=nr(i,u,e);f<=r?(d=u,h=f,a=l+1):c=l-1}return{text:d,didTruncate:!0,width:h}}function sr(i){const{ctx:t,text:e,font:r,maxWidth:o,textOverflow:n,ellipsis:s,forceEllipsis:a=!1}=i,c=Math.max(0,o);if(c<=0||e.length===0&&!(a&&n==="ellipsis"))return{text:"",didTruncate:e.length>0,width:0};const d=Uc({text:e,font:r,maxWidth:c,textOverflow:n,ellipsis:s,forceEllipsis:a}),h=or.get(d);if(h)return h;const l=nr(t,e,r);let u;return l<=c&&!a?u={text:e,didTruncate:!1,width:l}:n==="clip"?u={text:e,didTruncate:!0,width:l}:u=Vc(t,e,r,c,s),Wn(or,d,u),u}function To({ctx:i,lines:t,font:e,maxWidth:r,maxLines:o,textOverflow:n,ellipsis:s}){const a=Math.max(0,Math.floor(o)),c=Math.min(t.length,a),d=t.slice(0,c),h=t.length>c;if(n==="ellipsis"&&d.length>0){const l=d.length-1,u=d[l]??"";d[l]=sr({ctx:i,text:u,font:e,maxWidth:r,textOverflow:n,ellipsis:s,forceEllipsis:h}).text}return{lines:d,didClamp:h}}function Yc(){rr.clear(),or.clear()}const Kc="14px sans-serif",qc="black",Zc=1,jc=14,Jc="visible",Qc="clip",tl="…",el=/(\d*\.?\d+)px/,yt="|",il=30,rl=`${yt}precise-wrap`,ol=1e4,nl=5e3,sl=/[\u0300-\u036F\u1AB0-\u1AFF\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F\u200D\uFE0E\uFE0F\u2600-\u27BF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/,ar=new Map,cr=new Map,lr=new Map;let Ri=null;function al(){return Ri===null&&typeof document<"u"&&(Ri=document.createElement("canvas").getContext("2d")),Ri}function Gn(i,t,e,r){i.size>=r&&i.clear(),i.set(t,e)}function cl(i,t,e,r){return`${i}${yt}${t}${yt}${e??""}${yt}${r??""}`}function ll(i,t){return`${i}${yt}${t}`}function hl(i,t,e){return`${i}${yt}${t}${yt}${e}`}function $n(i,t,e,r){return`${i}${yt}${t}${yt}${e}${yt}${r}`}class Mr extends _t{constructor(t,e,r){super(t),this.font=Kc,this.color=qc,this.wordWrap=!1,this.lineHeight=Zc,this.overflow=Jc,this.textOverflow=Qc,this.ellipsis=tl,this.lastMeasureKey="",this.cachedLines=null,this.cachedLinesKey="",this.lastPaintedTextWidth=0,this.text=e,r&&(r.font&&(this.font=r.font),r.fontSize!==void 0&&(this.fontSize=r.fontSize),r.lineHeightPx!==void 0&&(this.lineHeightPx=r.lineHeightPx),r.color&&(this.color=r.color),r.wordWrap!==void 0&&(this.wordWrap=r.wordWrap),r.lineHeight!==void 0&&(this.lineHeight=r.lineHeight,this.lineHeightPx=void 0),r.overflow!==void 0&&(this.overflow=r.overflow),r.textOverflow!==void 0&&(this.textOverflow=r.textOverflow),r.ellipsis!==void 0&&(this.ellipsis=r.ellipsis),r.maxLines!==void 0&&(this.maxLines=r.maxLines),r.autoTooltip!==void 0&&(this.autoTooltip=r.autoTooltip))}measure(t){const{font:e,text:r,wordWrap:o,lineHeight:n,rect:s,fontSize:a}=this,{lineHeightPx:c}=Ni(e,n,a,this.lineHeightPx);this.isSingleLineClampEnabled()?this.measureSingleLineClamp(t,e,r,c,s):o?this.measureWordWrap(t,e,r,c,s):this.measureSingleLine(t,e,r,c,s)}measureWordWrap(t,e,r,o,n){const s=Ho(this.style.width,n.width);if(s>0){const a=this.getResolvedMaxLines(),d=!(this.overflow==="hidden"&&a!==void 0&&a>1&&ul(r)),h=$n(e,r,s,d);(h!==this.cachedLinesKey||this.cachedLines===null)&&(this.cachedLines=dl(t,r,e,s,d),this.cachedLinesKey=h),n.width=s;const l=a!==void 0&&this.overflow==="hidden"?Math.min(this.cachedLines.length,a):this.cachedLines.length;n.height=l*o}else n.width=de(t,r,e),n.height=o,this.cachedLines=null}measureSingleLineClamp(t,e,r,o,n){const s=Ho(this.style.width,n.width);s>0?(n.width=s,n.height=o):(n.width=de(t,r,e),n.height=o),this.cachedLines=null}measureSingleLine(t,e,r,o,n){const s=hl(e,r,o);s!==this.lastMeasureKey&&(this.lastMeasureKey=s,n.width=de(t,r,e),n.height=o),this.cachedLines=null}getLastPaintedTextWidth(){return this.lastPaintedTextWidth}measureTextWidth(t,e){return de(t,e,this.font)}onPaintLine(t,e,r,o,n,s,a){}getTooltip(){if(this.tooltip)return this.tooltip;const t=this.autoTooltip;if(!t)return;const e=typeof t=="object"?t:void 0;if(!(e?e.enabled!==!1:t===!0)||!this.computeIsTruncated())return;let o=this.text;if(e&&typeof e.text=="function"?o=e.text(this.text):e&&typeof e.text=="string"&&(o=e.text),o===null||o==="")return;if(!e)return o;const{enabled:n,text:s,...a}=e;return{...a,text:o}}computeIsTruncated(){if(this.overflow!=="hidden"||this.textOverflow!=="ellipsis")return!1;const t=al();if(!t)return!1;const e=this.cachedLines;if(e!==null&&e.length>0){const r=this.getResolvedMaxLines();return r===void 0?!1:To({ctx:t,lines:e,font:this.font,maxWidth:this.rect.width,maxLines:r,textOverflow:this.textOverflow,ellipsis:this.ellipsis}).didClamp}return sr({ctx:t,text:this.text,font:this.font,maxWidth:this.rect.width,textOverflow:this.textOverflow,ellipsis:this.ellipsis}).didTruncate}getResolvedMaxLines(){if(this.maxLines===void 0||!Number.isFinite(this.maxLines)||this.maxLines<=0)return;const t=Math.floor(this.maxLines);return t>0?t:void 0}isSingleLineClampEnabled(){return this.wordWrap&&this.overflow==="hidden"&&this.getResolvedMaxLines()===1}isMultilineClampEnabled(){return this.wordWrap&&this.overflow==="hidden"&&this.getResolvedMaxLines()!==void 0}onPaint(t,e){const{font:r,text:o,rect:n,color:s}=this,a=this.cachedLines;a!==null&&a.length>0?this.paintMultiline(t,e,r,s,a,n):this.paintSingleLine(t,e,o,r,s,n)}paintMultiline(t,e,r,o,n,s){const{fontSize:a,lineHeightPx:c}=Ni(r,this.lineHeight,this.fontSize,this.lineHeightPx),d=this.getResolvedMaxLines(),h=this.isMultilineClampEnabled()&&d!==void 0?To({ctx:e,lines:n,font:r,maxWidth:s.width,maxLines:d,textOverflow:this.textOverflow,ellipsis:this.ellipsis}).lines:n,l=h.length*c;let u=s.y+Math.max(0,(s.height-l)*.5);this.lastPaintedTextWidth=0;for(let f=0,g=h.length;f<g;f+=1){const v=h[f];if(v!==void 0){const C=u+c/2;this.overflow==="hidden"?t.fillTextClipped(v,s.x,C,r,o,s,"middle","left"):t.fillText(v,s.x,C,r,o,"middle"),this.onPaintLine(t,e,v,s.x,C,a,c),u+=c}}}paintSingleLine(t,e,r,o,n,s){const a=s.y+s.height*.5,{fontSize:c,lineHeightPx:d}=Ni(o,this.lineHeight,this.fontSize,this.lineHeightPx);if(this.overflow==="hidden"){const h=sr({ctx:e,text:r,font:o,maxWidth:s.width,textOverflow:this.textOverflow,ellipsis:this.ellipsis});if(this.lastPaintedTextWidth=Math.min(h.width,Math.max(0,s.width)),h.text.length===0)return;t.fillTextClipped(h.text,s.x,a,o,n,s,"middle","left"),this.onPaintLine(t,e,h.text,s.x,a,c,d);return}this.lastPaintedTextWidth=de(e,r,o),t.fillText(r,s.x,a,o,n,"middle"),this.onPaintLine(t,e,r,s.x,a,c,d)}}function Ni(i,t,e,r){const o=cl(i,t,e,r);let n=ar.get(o);if(n===void 0){const s=el.exec(i),a=e??(s&&s[1]!==void 0?Number(s[1]):jc);n={fontSize:a,lineHeightPx:r??a*t},ar.set(o,n)}return n}function de(i,t,e){const r=ll(e,t);let o=cr.get(r);return o===void 0&&(i.font=e,o=i.measureText(t).width,Gn(cr,r,o,ol)),o}function dl(i,t,e,r,o){i.font=e;const n=Math.max(r,il),s=$n(e,t,n,o);let a=lr.get(s);if(!a){const c=o?e:`${e}${rl}`;a=fl(Da.split(i,t,c,n,o)),Gn(lr,s,a,nl)}return a}function Ho(i,t){return typeof i=="number"&&i>0?i:t>0?t:0}function ul(i){return sl.test(i)}function fl(i){if(Array.isArray(i))return i;const t=i;return t.lines&&Array.isArray(t.lines)?t.lines:[]}function gl(){ar.clear(),cr.clear(),lr.clear(),Yc()}function Cl(i){return{default:{color:i.textPrimary,colorHover:i.textPrimaryHover,colorActive:i.textPrimaryActive},accent:{color:i.textAccent,colorHover:i.textAccentHover,colorActive:i.textAccentActive},secondary:{color:i.textSecondary,colorHover:i.textSecondaryHover,colorActive:i.textSecondaryActive},tertiary:{color:i.textTertiary,colorHover:i.textTertiaryHover,colorActive:i.textTertiaryActive},paragraph:{color:i.textParagraph,colorHover:i.textParagraphHover,colorActive:i.textParagraphActive},positive:{color:i.textPositive,colorHover:i.textPositiveHover,colorActive:i.textPositiveActive},warning:{color:i.textWarning,colorHover:i.textWarningHover,colorActive:i.textWarningActive},negative:{color:i.textNegative,colorHover:i.textNegativeHover,colorActive:i.textNegativeActive},clear:{color:i.textPrimary,colorHover:i.textPrimaryHover,colorActive:i.textPrimaryActive}}}const vl="default",Oi="pointer",Fl=.4,pl=2,ko=1;class Un extends Mr{constructor(t,e,r){var o;super(t,e,r),this.view=vl,this.disabled=!1,this.isHovered=!1,this.isActive=!1,this.hasCustomColor=!1,super.style={...super.style,cursor:Oi},r&&(this.href=r.href,this.target=r.target,this.rel=r.rel,r.view!==void 0&&(this.view=r.view),r.disabled!==void 0&&(this.disabled=r.disabled),this.hasCustomColor=r.color!==void 0,(o=r.theme)!=null&&o.tokens&&(this.viewColors=Cl(r.theme.tokens))),!this.hasCustomColor&&this.viewColors&&(this.color=this.viewColors[this.view].color)}set style(t){super.style={...super.style,cursor:Oi,...t}}get style(){const t=super.style;return t.cursor=this.disabled?"not-allowed":Oi,t}setOnClick(t){this.customClickHandler=t}resolveColor(){let t;if(this.hasCustomColor||!this.viewColors)t=this.color;else{const e=this.viewColors[this.view];this.isActive?t=e.colorActive:this.isHovered?t=e.colorHover:t=e.color}return this.disabled&&(t=zc(t,Fl)),t}onPaint(t,e){const r=this.color;this.color=this.resolveColor();try{super.onPaint(t,e)}finally{this.color=r}}onPaintLine(t,e,r,o,n,s,a){const{view:c,isHovered:d}=this;if(!(c==="default"||c==="clear"||!this.disabled&&d)||r.length===0)return;const u=this.measureTextWidth(e,r);if(u<=0)return;const f=n+Math.min(s/2+pl,a/2-ko/2),{color:g}=this,v=this.overflow==="hidden"?{...this.rect}:void 0;t.custom(C=>{C.save(),v&&(C.beginPath(),C.rect(v.x,v.y,v.width,v.height),C.clip()),C.beginPath(),C.moveTo(o,f),C.lineTo(o+u,f),C.strokeStyle=g,C.lineWidth=ko,C.lineCap="butt",C.stroke(),C.restore()})}onMouseEnter(){this.isHovered=!0}onMouseLeave(){this.isHovered=!1,this.isActive=!1}onMouseDown(){this.disabled||(this.isActive=!0)}onMouseUp(){this.isActive=!1}onClick(t){if(this.disabled)return;let e=!1;const r=t.preventDefault;t.preventDefault=()=>{e=!0,r.call(t)},!(this.customClickHandler&&(this.customClickHandler(t),e))&&this.navigate()}navigate(){if(!this.href)return;const t=this.target||"_self";if(t==="_self")window.location.href=this.href;else{const e=this.rel??(t==="_blank"?"noopener,noreferrer":void 0);window.open(this.href,t,e)}}}const ue="transparent",ml=0;class Xn extends vt{constructor(t,e=ue){super(t),this.color=ue,this.borderColor=ue,this.borderWidth=ml,this.color=e}measure(t){const{style:e,rect:r}=this;typeof e.width=="number"&&(r.width=e.width),typeof e.height=="number"&&(r.height=e.height)}onPaint(t,e){const{x:r,y:o,width:n,height:s}=this.rect;if(this.color!==ue&&t.fillRect(r,o,n,s,this.color),this.borderWidth>0&&this.borderColor!==ue){const a=this.borderWidth/2;t.strokeRect(r+a,o+a,n-this.borderWidth,s-this.borderWidth,this.borderColor,this.borderWidth)}}}const Ce={250:15.625,32:2,28:1.75,24:1.5,20:1.25,18:1.125,16:1,14:.875,12:.75,8:.5,0:0},Bo=16,fe=16,Vn=90,Po="rgba(8, 8, 8, 0.08)",yl=4e3,bl=1920,Al="linear-gradient( 90deg, rgba(8, 8, 8, 0.09) 0%, rgba(8, 8, 8, 0.08) 6.25%, rgba(8, 8, 8, 0.05) 12.5%, rgba(8, 8, 8, 0.01) 25%, rgba(8, 8, 8, 0.05) 37.5%, rgba(8, 8, 8, 0.08) 43.75%, rgba(8, 8, 8, 0.09) 50%, rgba(8, 8, 8, 0.08) 56.25%, rgba(8, 8, 8, 0.05) 62.5%, rgba(8, 8, 8, 0.01) 75%, rgba(8, 8, 8, 0.05) 87.5%, rgba(8, 8, 8, 0.08) 93.75%, rgba(8, 8, 8, 0.09) 100% )",Dl="linear-gradient( 90deg, rgba(8, 8, 8, 0.36) 0%, rgba(8, 8, 8, 0.32) 6.25%, rgba(8, 8, 8, 0.20) 12.5%, rgba(8, 8, 8, 0.04) 25%, rgba(8, 8, 8, 0.20) 37.5%, rgba(8, 8, 8, 0.32) 43.75%, rgba(8, 8, 8, 0.36) 50%, rgba(8, 8, 8, 0.08) 56.25%, rgba(8, 8, 8, 0.20) 62.5%, rgba(8, 8, 8, 0.04) 75%, rgba(8, 8, 8, 0.20) 87.5%, rgba(8, 8, 8, 0.32) 93.75%, rgba(8, 8, 8, 0.36) 100% )";let Lo=null;const xl={right:90,left:270,top:0,bottom:180,"top right":45,"right top":45,"bottom right":135,"right bottom":135,"bottom left":225,"left bottom":225,"top left":315,"left top":315};class Yn extends vt{constructor(t,e){super(t),this._gradientStops=null,this._gradientAngle=Vn;const r=(e==null?void 0:e.customGradientColor)??(e!=null&&e.lighter?Dl:Al),o=Tl(r);o&&(this._gradientStops=o.stops,this._gradientAngle=o.angle),this.borderRadius=Sl(e==null?void 0:e.roundness),this.animated=(e==null?void 0:e.animated)??!0,this.shimmerDuration=(e==null?void 0:e.shimmerDuration)??yl}measure(t){const{style:e,rect:r}=this;typeof e.width=="number"&&(r.width=e.width),typeof e.height=="number"&&(r.height=e.height)}onPaint(t,e){var f;const{x:r,y:o,width:n,height:s}=this.rect;if(n<=0||s<=0)return;const{_gradientStops:a,borderRadius:c}=this;if(!a||a.length<2){c>0?t.roundedRect(r,o,n,s,c,{fillStyle:Po}):t.fillRect(r,o,n,s,Po);return}const d=t.getAnimationContext(),h=d==null?void 0:d.frameTime;if(!this.animated||h===void 0){t.linearGradientRect(r,o,n,s,c,a,this._gradientAngle);return}Lo??(Lo=h);const u=(h-Lo)%this.shimmerDuration/this.shimmerDuration;t.custom(g=>{g.save(),g.beginPath(),c>0?g.roundRect(r,o,n,s,c):g.rect(r,o,n,s),g.clip();const{startX:v,startY:C,endX:m,endY:p}=Hl(r,o,s,u),b=g.createLinearGradient(v,C,m,p);for(const A of a)b.addColorStop(A.offset,A.color);g.fillStyle=b,g.fillRect(r,o,n,s),g.restore()}),(f=d==null?void 0:d.requestAnimationFrame)==null||f.call(d)}}function Io(i){return i in Ce}function Sl(i){if(i===void 0)return Ce[Bo]*fe;if(typeof i=="number")return Io(i)?Ce[i]*fe:i;const t=i.trim(),e=Number(t);if(!Number.isNaN(e))return Io(e)?Ce[e]*fe:e;const r=t.match(/^(-?\d+(?:\.\d+)?)px$/i);if(r){const[,n]=r;return parseFloat(n)}const o=t.match(/^(-?\d+(?:\.\d+)?)rem$/i);if(o){const[,n]=o;return parseFloat(n)*fe}return Ce[Bo]*fe}function El(i){var r;const t=i.trim(),e=t.match(/^var\s*\(\s*[^,]+,\s*([\s\S]+)\s*\)$/i);return((r=e==null?void 0:e[1])==null?void 0:r.trim())??t}function wl(i,t){switch(t.toLowerCase()){case"rad":return i*180/Math.PI;case"turn":return i*360;case"grad":return i*180/200;default:return i}}function Tl(i){const e=El(i).match(/^linear-gradient\s*\(([\s\S]+)\)$/i);if(!(e!=null&&e[1]))return null;const r=[];let o="",n=0;for(const u of e[1])u==="("&&n++,u===")"&&n--,u===","&&n===0?(r.push(o.trim()),o=""):o+=u;o.trim()&&r.push(o.trim());const[s]=r;if(r.length<2||!s)return null;let a=Vn,c=0;const d=s.match(/^(-?\d+(?:\.\d+)?)(deg|rad|turn|grad)?$/i);if(d!=null&&d[1]){const[,u,f="deg"]=d;a=wl(parseFloat(u),f),c=1}else if(s.startsWith("to ")){const u=s.substring(3).trim().toLowerCase(),f=xl[u];f!==void 0&&(a=f,c=1)}const h=[],l=r.slice(c);for(let u=0;u<l.length;u++){const f=l[u];if(!f)continue;const g=f.trim().match(/^(#[0-9a-fA-F]{3,8}|rgba?\s*\([^)]+\)|hsla?\s*\([^)]+\)|[a-zA-Z]+)(?:\s+(-?\d+(?:\.\d+)?)(%))?$/);if(!(g!=null&&g[1]))continue;const[,v,C,m]=g,p=m==="%"?parseFloat(C)/100:l.length>1?u/(l.length-1):0;h.push({offset:Math.max(0,Math.min(1,p)),color:v})}return h.length<2?null:{stops:h,angle:a}}function Hl(i,t,e,r){const o=bl,n=r*o,s=i-o+n,a=i+o+n,c=t+e/2;return{startX:s,startY:c,endX:a,endY:c}}let ve=0;const ri=new Set;function kl(){ve++,ve===1&&ri.forEach(t=>t(!0));let i=!1;return()=>{i||(i=!0,ve--,ve===0&&ri.forEach(t=>t(!1)))}}function Bl(){return ve>0}function Pl(i){return ri.add(i),()=>{ri.delete(i)}}const oi="basic-grid-canvas-portal-hover",Ll=400;let Il=0;const zi="__canvasPortalTargetId";function Ml(i){var r;if(!i)return"window";const t=i;if((r=t.dataset)!=null&&r.portalTargetId)return t.dataset.portalTargetId;const e=i;return e[zi]||(e[zi]=++Il),String(e[zi])}const ie=new Map;function _l(i,t){return`${i??"default"}:${t??"default"}`}function hr(i,t){const e=new CustomEvent(oi,{detail:i});t?t.dispatchEvent(e):window.dispatchEvent(e)}function Mo(i){const t=ie.get(i);t!==void 0&&(window.clearTimeout(t),ie.delete(i))}function Rl(i){const t=`${i}:`;for(const[e,r]of ie.entries())e.startsWith(t)&&(window.clearTimeout(r),ie.delete(e))}function Nl(i,t,e){const r=window.setTimeout(()=>{ie.delete(i),hr(t,e)},Ll);ie.set(i,r)}function jt(i,t,e){if(typeof window>"u")return;const r=Ml(t),o=`${r}:${_l(i.source,i.originId)}`;i.visible?(Rl(r),hr(i,t)):e?(Mo(o),hr(i,t)):(Mo(o),Nl(o,i,t))}function Ol(i,t){if(typeof window>"u")return()=>{};const e=t??window,r=o=>{const n=o;n.detail&&i(n.detail)};return e.addEventListener(oi,r),()=>{e.removeEventListener(oi,r)}}const zl="cell";class bt{constructor(t,e){this.bounds=null,this.batcher=new ui,this.portalEventTarget=null,this.tooltipContext=void 0,this.rootNode=t,this.hoverController=new pr({onCursorChange:r=>{var o;return(o=this.onCursorChange)==null?void 0:o.call(this,r)},portalHoverDispatch:jt,getPortalEventTarget:()=>this.portalEventTarget,portalSource:zl,getTooltipContext:()=>this.tooltipContext})}setPortalEventTarget(t){this.portalEventTarget=t}setTooltipContext(t){this.tooltipContext=t}setRootNode(t){this.rootNode=t}setOriginId(t){}render(t,e,r,o,n,s){this.bounds={...o??e},this.hoverController.setAbsoluteBounds(this.bounds),t.save(),t.translate(e.x,e.y),this.prepareRootNode(t,e),r?this.dispatchPointerEvent("mousemove",r.x,r.y):this.handleMouseLeave(),this.batcher.clear(),this.batcher.setAnimationContext(n),this.batcher.imageResources=s,this.batcher.imageTransitions.beginFrame(s);try{this.rootNode.paint(this.batcher,t),this.batcher.flush(t)}finally{this.batcher.imageTransitions.endFrame()}t.restore()}dispatchPointerEvent(t,e,r,o){var h;if(!this.bounds)return{propagationStopped:!1,suppressGridDefault:!1};const n=this.rootNode.hitTest(e,r),s=(h=n.find(l=>l.interaction!==void 0))==null?void 0:h.interaction;let a=!1,c=!1;const d={type:t,x:e,y:r,originalEvent:o??{},target:n[0],stopPropagation:()=>{a=!0},preventDefault:()=>{c=!0,o==null||o.preventDefault()}};return n.length===0?(t==="mousemove"&&this.hoverController.handlePointerMove([],null),{propagationStopped:!1,suppressGridDefault:c,...s?{interaction:s}:{}}):(this.dispatchEventToNodes(n,d,t),t==="mousemove"&&this.hoverController.handlePointerMove(n,d),{propagationStopped:a,suppressGridDefault:c,...s?{interaction:s}:{}})}getInteractionAtPoint(t,e){var r;if(this.bounds)return(r=this.rootNode.hitTest(t,e).find(o=>o.interaction))==null?void 0:r.interaction}dispatchEventToNodes(t,e,r){let o=!1;const n={...e,stopPropagation:()=>{o=!0,e.stopPropagation()}};for(const s of t){if(o)break;const a={...n,currentTarget:s};this.invokeNodeHandler(s,r,a)}}invokeNodeHandler(t,e,r){switch(e){case"click":t.onClick({...r,cellBounds:this.bounds});break;case"mousedown":t.onMouseDown(r);break;case"mouseup":t.onMouseUp(r);break;case"dblclick":t.onDoubleClick(r);break;case"mousemove":t.onMouseMove(r);break;case"mouseenter":t.onMouseEnter(r);break;case"mouseleave":t.onMouseLeave(r);break}}handleMouseLeave(){this.hoverController.handlePointerLeave()}prepareRootNode(t,e){this.rootNode.rect.x=0,this.rootNode.rect.y=0,this.rootNode.rect.width=e.width,this.rootNode.rect.height=e.height,this.rootNode instanceof dt?this.rootNode.performLayout(t):this.rootNode.measure(t)}computeCursor(t,e){return this.hoverController.computeCursor(t,e,this.rootNode)}getCurrentCursor(){return this.hoverController.getCurrentCursor()}forcePortalHide(){this.hoverController.handlePortalReset()}}const vi="canvas-cell";function Kn(i,t,e,r){return{kind:I.GridCellKind.Custom,allowOverlay:!1,readonly:!0,copyData:e??"",data:{kind:vi,render:i,onClick:t},...r}}function _r(i){var e;const t=i;return!!(t&&t.kind===I.GridCellKind.Custom&&((e=t.data)==null?void 0:e.kind)===vi)}const Fe=5,qn=[["hoverX","hoverY"],["mouseX","mouseY"],["pointerX","pointerY"],["posX","posY"],["x","y"]],Zn="default",jn="pointer";function Jn(i,t){for(const[e,r]of qn){const o=i[e],n=i[r];if(typeof o=="number"&&typeof n=="number"&&!Number.isNaN(o)&&!Number.isNaN(n)){if(Qn(o,n,t))return{x:o-t.x,y:n-t.y};if(ts(o,n,t))return{x:o,y:n}}}}function Qn(i,t,e){return i>=e.x&&i<=e.x+e.width&&t>=e.y&&t<=e.y+e.height}function ts(i,t,e){return i>=-Fe&&i<=e.width+Fe&&t>=-Fe&&t<=e.height+Fe}function es(i,t,e){if((i==null?void 0:i.canvasRoot)instanceof bt){const r=e?"nativeEvent"in e?e.nativeEvent:e:void 0;return i.canvasRoot.dispatchPointerEvent("click",t.x,t.y,r)}return{propagationStopped:!1,suppressGridDefault:!1}}function is(i,t){if(i!=null&&i.clickHandlers&&Array.isArray(i.clickHandlers)){for(const{area:e,handler:r}of i.clickHandlers)if(Pr(t.x,t.y,e))return r(),!0}return!1}function rs(i,t,e,r,o,n){const{onClick:s}=i.data;return s?!!s(t.x,t.y,e,r,o,n??void 0):!1}const dr=new WeakMap,os=new Map;function ns(i,t,e){const r={...e??{}};return delete r.hoveredAreas,os.set(i,r),t.data.renderData=r,r}function ee(i,t){return t.data.renderData??os.get(i)}function ss(i,t){var r,o;(((r=dr.get(i))==null?void 0:r.hovered)??!1)!==t&&(dr.set(i,{hovered:t}),t?(o=i.onMouseEnter)==null||o.call(i):Wl(i))}function Wl(i){const{renderData:t}=i;(t==null?void 0:t.canvasRoot)instanceof bt&&t.canvasRoot.forcePortalHide()}function as(i){var t;return(t=dr.get(i))==null?void 0:t.hovered}function cs(i,t,e,r){var o;if(i instanceof bt)if(t){if(e.event){const s="nativeEvent"in e.event?e.event.nativeEvent:e.event;i.dispatchPointerEvent("mousemove",t.x,t.y,s)}const n=i.computeCursor(t.x,t.y);n&&n!==Zn&&((o=r.overrideCursor)==null||o.call(r,n))}else i.handleMouseLeave(),i.forcePortalHide()}function ls(i,t,e,r,o){var c;const n=!!(t&&e.some(d=>Pr(t.x,t.y,d))),s=as(i)??!1,a=!!t;a!==s&&ss(i,a),n&&!r&&((c=o.overrideCursor)==null||c.call(o,jn))}function Rr({cell:i,rect:t,relativePoint:e,renderData:r,rowData:o,rowIndex:n,event:s}){const a=es(r,e,s);return a.propagationStopped?{handled:!0,propagationStopped:!0,suppressGridDefault:a.suppressGridDefault}:is(r,e)?{handled:!0,propagationStopped:!1,suppressGridDefault:a.suppressGridDefault}:rs(i,e,t,o,n,r)?{handled:!0,propagationStopped:!1,suppressGridDefault:a.suppressGridDefault}:{handled:!1,propagationStopped:!1,suppressGridDefault:a.suppressGridDefault}}function hs(i){const t=i.selection==="keep",e=i.cellClick==="stop",r=i.editor==="never",o=i.contextMenu==="keep-selection"?"manual-keep-selection":i.contextMenu==="none"?"none":"normal";return{suppressEarlyGridSelect:t,suppressExternalCellClick:e,suppressGridDefaultFor:{pointerdown:t,click:r,contextmenu:o!=="normal"},contextMenuMode:o,...i.editor==="open-on-click"?{editorRequest:{target:"self"}}:{}}}function Gl({decision:i,propagationStopped:t,suppressGridDefault:e}){const r=i.suppressGridDefaultFor.click||e,o={suppressExternalCellClick:i.suppressExternalCellClick||t,suppressGridDefaultForClick:r};return!r&&i.editorRequest&&(o.editorRequest=i.editorRequest),o}function ds({renderData:i,relativePoint:t}){const e=(i==null?void 0:i.canvasRoot)instanceof bt?i.canvasRoot.getInteractionAtPoint(t.x,t.y):void 0;return e?{handled:!0,suppressEarlyGridSelect:hs(e).suppressEarlyGridSelect,interaction:e}:{handled:!1,suppressEarlyGridSelect:!1}}function Nr(i={}){return{kind:I.GridCellKind.Custom,isMatch:t=>{var e;return((e=t.data)==null?void 0:e.kind)===vi},needsHover:!0,needsHoverPosition:!0,onSelect:t=>{var u;const e=t.cell,r=t.bounds,o=Qi(t);if(!o)return;const n=tr(o,r),s=Je(t),a=te(s,r),c=ee(a,e),d=ds({renderData:c,relativePoint:n}),h=t.location??[s.colIndex,s.rowIndex],l=d.interaction&&i.beginOrGetInteractionSession?i.beginOrGetInteractionSession({cell:h,relativePoint:n,interaction:d.interaction,source:"pointer",...t.button!==void 0?{button:t.button}:{}}):void 0;(l!=null&&l.decision.suppressEarlyGridSelect||d.suppressEarlyGridSelect)&&((u=t.preventDefault)==null||u.call(t))},onClick:t=>{var u,f;const e=t.cell,r=t.bounds,o=Qi(t);if(!o)return;const n=tr(o,r),s=Je(t),a=te(s,r),c=ee(a,e),d=t.location??[s.colIndex,s.rowIndex],l=((u=i.consumeCanvasClickResult)==null?void 0:u.call(i,{cell:d,relativePoint:n,...t.button!==void 0?{button:t.button}:{}}))??Rr({cell:e,rect:r,relativePoint:n,renderData:c,rowData:t.row??t.rowData,rowIndex:s.rowIndex,event:t.event});l.suppressGridDefault&&((f=t.preventDefault)==null||f.call(t)),l.handled},draw:(t,e)=>{const{ctx:r,rect:o,theme:n}=t,{render:s}=e.data,a=t.cellFillColor!==void 0?{...n,bgCell:t.cellFillColor}:n,c=Je(t),d=te(c,o),h={hoverX:t.hoverX,hoverY:t.hoverY,row:t.row,imageResources:t.imageLoader&&typeof t.col=="number"&&typeof t.row=="number"?{loader:t.imageLoader,colIndex:t.col,rowIndex:t.row}:void 0,rowData:t.rowData,event:t.event,frameTime:t.frameTime,requestAnimationFrame:t.requestAnimationFrame},l=xn(t.hoverX,t.hoverY,o)??Jn(h,o);r.save();const u=ee(d,e),f=s(r,o,a,l==null?void 0:l.x,l==null?void 0:l.y,{...h,canvasRoot:u==null?void 0:u.canvasRoot}),g=(f==null?void 0:f.hoveredAreas)??[];ns(d,e,f);const v=(f==null?void 0:f.canvasRoot)??(u==null?void 0:u.canvasRoot);cs(v,l,h,t),ls(e.data,l,g,v,t),r.restore()},onPaste:()=>{}}}const $l=Nr(),ni=new Map;function us(i){const t=Ul(i),e=ni.get(t);if(e)return e;const o=xa.renderToString(i).match(/<svg[\s\S]*?<\/svg>/);if(!o)return console.warn("Could not extract SVG from React icon component:",i.type),"";const n=o[0];return ni.set(t,n),n}function Ul(i){const t=i.type,e=typeof t=="function"||typeof t=="object"?t.displayName||t.name||"Anonymous":String(t),{size:r,color:o,className:n}=i.props||{},s=JSON.stringify({size:r,color:o,className:n});return`${e}:${s}`}function xt(i){return F.isValidElement(i)}function mt(i){return typeof i=="string"?i:xt(i)?us(i):""}function Xl(){ni.clear()}function Vl(){return ni.size}const ur=i=>{if(i===void 0)return;if(typeof i=="number")return i;const t=i.trim();if(t==="100%")return"100%";const e=t.match(/^(-?\d+(?:\.\d+)?)px$/i);if(e)return Number(e[1]);const r=t.match(/^(-?\d+(?:\.\d+)?)rem$/i);if(r)return Number(r[1])*16;const o=Number(t);if(!Number.isNaN(o))return o},_o={small:{radius:4,stroke:1.5},medium:{radius:4,stroke:1.5},big:{radius:6,stroke:2}};function Yl(i,t,e,r,o,n,s,a,c,d,h=!1,l=!1){const f=s-0,v=Math.min(f-0,yr),C=n==="auto"?v:n,m=e+0,p=(c==null?void 0:c.rowSize)||"medium",b=!r&&!o,A=Rt(l,{x:t,y:e,width:C,height:s}),S=ac(c,r,o,A,h),D=t+C*.5,H=m+f*.5,w=D-v*.5,P=H-v*.5;return i.roundedRect(t,m,C,f,_o[p].radius,{fillStyle:S.bgColor,strokeStyle:S.borderColor,lineWidth:b?_o[p].stroke:void 0}),Ct(i,a,w,P,v,S.iconColor),{x:t,y:m,width:C,height:f}}const Kl=28,ql="default",Zl="s",Ro="pointer",jl=20,fr={indeterminateIcon:'<svg viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" fill="none"><path stroke-linecap="round" stroke-width="2" stroke="currentColor" d="m5.09449,9.0315l8,0"></path></svg>',checkedIcon:'<svg viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" fill="none"><path fill="currentColor" d="m5.70711,8.15582c-0.39053,-0.39052 -1.02369,-0.39052 -1.41422,0c-0.39052,0.39053 -0.39052,1.02369 0,1.41422l3.70666,3.70666l6.71095,-6.70248c0.3908,-0.39027 0.3912,-1.02344 0.0009,-1.41421c-0.3903,-0.39077 -1.02344,-0.39117 -1.41421,-0.00089l-5.29674,5.29004l-2.29334,-2.29334z"></path></svg>'},Jl=Object.values(fr),Ql={accentColor:"#1e88e5",accentFg:"#ffffff"};class th extends vt{constructor(t,e,r=!1,o=!1,n){super(t),this.view=ql,this.buttonSize=Zl,this.isHovered=!1,this.useNewApi=!1,this.icon=e,this.checked=r,this.indeterminate=o,this.size=(n==null?void 0:n.size)??"auto",this.theme=n==null?void 0:n.theme,this.view=(n==null?void 0:n.view)??"primary",this.disabled=(n==null?void 0:n.disabled)??!1,super.style={...super.style,cursor:this.disabled?"auto":Ro},!this.disabled&&(n!=null&&n.onClick)&&(this.onClick=s=>{var a;return(a=n.onClick)==null?void 0:a.call(n,s)})}set style(t){super.style={...super.style,...t}}get style(){const t=super.style;return t.cursor||(t.cursor=Ro),t}measure(t){if(this.useNewApi){const e=at[this.buttonSize];this.rect.height=e.height,this.rect.width=e.height}else{const e=eh(this.size);this.rect.height=e.height,this.rect.width=e.width}}onPaint(t,e){const{x:r,y:o,width:n,height:s}=this.rect;Yl(t,r,o,this.checked,this.indeterminate,n,s,this.icon,this.theme??Ql,this.view,this.disabled,this.isHovered)}onMouseEnter(){this.isHovered=!0}onMouseLeave(){this.isHovered=!1}}function eh(i,t){const e=typeof i=="number"?i:Kl,r=0,o=re,n=Math.min(e-o*2-oe,jl),s=typeof i=="number"?i:n+r*2;return{height:e,width:s,paddingX:r,paddingY:o,iconSize:n}}const ih=({backgroundColor:i,__backgroundColorResolver:t},e)=>(t==null?void 0:t(e))??i,lt=i=>{const t=e=>null;return t.__canvasType=i,t},rh=F.memo(({cellId:i,renderContent:t,nodeRegistry:e,onRegistryChange:r})=>{const o=t(),n=F.useRef(null);return F.useLayoutEffect(()=>{const s=e.current,a=n.current;a&&a!==i&&s.delete(a);const c=s.get(i),d=c!==void 0;s.set(i,o),d&&c!==o&&(r==null||r()),n.current=i},[i,o,e,r]),F.useLayoutEffect(()=>()=>{const s=e.current;n.current&&(s.delete(n.current),n.current=null)},[e]),null}),oh=lt("Skeleton"),nh=lt("Container"),sh=lt("Text"),ah=lt("Icon"),ch=lt("Button"),lh=lt("IconButton"),hh=lt("EmbedIconButton"),dh=lt("Rect"),uh=lt("Badge"),fh=lt("Checkbox"),gh=lt("Link"),pe={Image:lt("Image"),Avatar:lt("Avatar"),AvatarGroup:lt("AvatarGroup"),Container:nh,Text:sh,Icon:ah,Button:ch,IconButton:lh,EmbedIconButton:hh,Checkbox:fh,Rect:dh,Badge:uh,Skeleton:oh,Link:gh,icon:mt};function ht(i,t){if(i)return function(e){i.call(this,e)}}function si({element:i,idPrefix:t="root",theme:e}){const r=[],o=fs(i,t,0,r,e);if(r.length>0){const n=new Map;for(const{icon:s,size:a}of r){if(!s)continue;const c=n.get(a)??[];c.push(s),n.set(a,c)}n.forEach((s,a)=>{Hn(s,{size:a})})}return o}function gr(i){return i==null?"":typeof i=="string"||typeof i=="number"?String(i):Array.isArray(i)?i.map(gr).join(""):""}function No(i,t,e){const r=i.fontMetrics,o=i.fonts;if(r===void 0||o===void 0)return{};const n=t??i.baseFontStyle,s=Object.keys(o).find(c=>o[c]===n);if(s===void 0)return{};const a=r[s];return a===void 0?{}:{fontSize:a.fontSize,...e===void 0?{lineHeightPx:a.lineHeightPx}:{}}}function fs(i,t,e,r,o){if(!i||!F.isValidElement(i))throw new Error("Invalid element. Use Canvas.* components.");const n=i.type,s=n.__canvasType;if(!s)throw new Error(`Unknown canvas component. Use Canvas.* components. Got: ${(n==null?void 0:n.name)||n}`);const a=i.props,d=(i.key!=null?String(i.key):null)??e,h=a.id??`${t}-${s.toLowerCase()}-${d}`,l=g=>xt(g)?mt(g):g;if(s==="Icon"&&a.icon)r.push({icon:l(a.icon),size:a.size??16});else if(s==="IconButton"&&a.icon){const g=a.buttonSize??"s",{iconSize:v}=at[g];r.push({icon:l(a.icon),size:v})}else if(s==="EmbedIconButton"&&a.icon){const g=a.buttonSize??"s",v=a.overrideIconSize??at[g].iconSize;r.push({icon:l(a.icon),size:v})}else if(s==="Checkbox")Jl.forEach(g=>{r.push({icon:l(g),size:20})});else if(s==="Button"){const g=a.size??"s",{iconSize:v}=at[g];a.leftIcon&&r.push({icon:l(a.leftIcon),size:v}),a.rightIcon&&r.push({icon:l(a.rightIcon),size:v})}else if(s==="Badge"){const g=a.size??"s",C={xs:10,s:12,m:14,l:16}[g]??12;a.leftIcon&&r.push({icon:l(a.leftIcon),size:C}),a.rightIcon&&r.push({icon:l(a.rightIcon),size:C})}const u=Ch(s,h,a,o);if(a.portalHoverEnabled&&(u.portalHoverEnabled=!0),a.tooltip!==void 0&&(u.tooltip=a.tooltip),a.autoTooltip!==void 0){const g=a.autoTooltip;(g===!0||typeof g=="object"&&g!==null&&g.enabled!==!1)&&(u.portalHoverEnabled=!0)}a.interaction!==void 0&&(u.interaction=cn(a.interaction)),typeof a.zIndex=="number"&&(u.zIndex=a.zIndex),a.style&&(u.style=a.style);const{children:f}=a;return f&&u instanceof dt&&F.Children.toArray(f).forEach((v,C)=>{if(F.isValidElement(v)){const m=fs(v,h,C,r,o);u.addChild(m)}}),u}function Wi(i,t,e){if(t.children!==void 0)throw new Error(`Canvas.${e} does not accept children`);t.position&&(i.position=t.position),t.left!==void 0&&(i.left=t.left),t.top!==void 0&&(i.top=t.top),t.right!==void 0&&(i.right=t.right),t.bottom!==void 0&&(i.bottom=t.bottom);for(const r of["onClick","onMouseEnter","onMouseLeave"]){const o=ht(t[r]);if(o){const n=i[r].bind(i);i[r]=s=>{n(s),o.call(i,s)}}}return t.tooltip!==void 0&&(i.portalHoverEnabled=!0),t.onClick&&(i.style={...i.style,cursor:"pointer"}),i}function Ch(i,t,e,r){switch(i){case"Image":return Wi(new Ir(t,e),e,i);case"Avatar":return Wi(new ye(t,{...e,theme:r}),e,i);case"AvatarGroup":return Wi(new mr(t,{...e,theme:r}),e,i);case"Container":{const o=e,{id:n,gap:s,columnGap:a,rowGap:c,position:d,left:h,top:l,right:u,bottom:f,zIndex:g,onClick:v,onMouseEnter:C,onMouseLeave:m,onMouseDown:p,backgroundColor:b,__backgroundColorResolver:A,portalHoverEnabled:S,...D}=o,H={...D,columnGap:a??s??0,rowGap:c??s??0},w=new dt(t,H,ih(o,r));d&&(w.position=d),h!==void 0&&(w.left=h),l!==void 0&&(w.top=l),u!==void 0&&(w.right=u),f!==void 0&&(w.bottom=f);const P=ht(v),_=ht(C),G=ht(m),V=ht(p);return P&&(w.onClick=P),_&&(w.onMouseEnter=_),G&&(w.onMouseLeave=G),V&&(w.onMouseDown=V),w}case"Text":{const{children:o,font:n,color:s,wordWrap:a,lineHeight:c,overflow:d,textOverflow:h,ellipsis:l,maxLines:u,autoTooltip:f,position:g,left:v,top:C,right:m,bottom:p,portalHoverEnabled:b}=e,A=gr(o),S=r.fontFamily||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';let D;n?D=/["']|sans-serif|serif|monospace/i.test(n)?n:`${n} ${S}`:D=r.baseFontStyle?`${r.baseFontStyle} ${S}`:`13px ${S}`;const H=No(r,n,c),w=new Mr(t,A,{font:D,...H,color:s,wordWrap:a,lineHeight:c,overflow:d,textOverflow:h,ellipsis:l,maxLines:u,autoTooltip:f});return g&&(w.position=g),v!==void 0&&(w.left=v),C!==void 0&&(w.top=C),m!==void 0&&(w.right=m),p!==void 0&&(w.bottom=p),w}case"Icon":{const{icon:o,size:n,color:s,backgroundColor:a,position:c,left:d,top:h,right:l,bottom:u,onClick:f,onMouseEnter:g,onMouseLeave:v,onMouseDown:C}=e,m=xt(o)?mt(o):o,p=new Nn(t,m,{size:n,color:s});a&&(p.backgroundColor=a),c&&(p.position=c),d!==void 0&&(p.left=d),h!==void 0&&(p.top=h),l!==void 0&&(p.right=l),u!==void 0&&(p.bottom=u);const b=ht(f),A=ht(g),S=ht(v),D=ht(C);return b&&(p.onClick=b),A&&(p.onMouseEnter=A),S&&(p.onMouseLeave=S),D&&(p.onMouseDown=D),p}case"Button":{const{children:o,variant:n,view:s,size:a,leftIcon:c,rightIcon:d,disabled:h,position:l,left:u,top:f,right:g,bottom:v,onClick:C}=e,m=typeof o=="string"?o:"",p=xt(c)?mt(c):c,b=xt(d)?mt(d):d,A=new Rn(t,m,{variant:n,view:s,size:a,leftIcon:p,rightIcon:b,disabled:h,theme:r});if(l&&(A.position=l),u!==void 0&&(A.left=u),f!==void 0&&(A.top=f),g!==void 0&&(A.right=g),v!==void 0&&(A.bottom=v),!h){const S=ht(C);S&&(A.onClick=S)}return A}case"EmbedIconButton":case"IconButton":{const{icon:o,size:n,variant:s,view:a,buttonSize:c,overrideSquareSize:d,overrideIconSize:h,disabled:l,position:u,left:f,top:g,right:v,bottom:C,onClick:m}=e,p=xt(o)?mt(o):o,b=i==="IconButton"?On:ir,A=new b(t,p,{size:n,variant:s,view:a,buttonSize:c,overrideSquareSize:d,overrideIconSize:h,disabled:l});if(A instanceof ir){const{iconColor:S,iconColorHovered:D,overrideWidth:H}=e;H!==void 0&&(A.overrideWidth=H),S!==void 0&&(A.iconColor=S),D!==void 0&&(A.iconColorHovered=D)}if(u&&(A.position=u),f!==void 0&&(A.left=f),g!==void 0&&(A.top=g),v!==void 0&&(A.right=v),C!==void 0&&(A.bottom=C),!l){const S=ht(m);S&&(A.onClick=S)}return A}case"Checkbox":{const{checked:o,indeterminate:n,size:s="auto",theme:a,view:c,buttonSize:d,disabled:h,position:l,left:u,top:f,right:g,bottom:v,onClick:C}=e,m=mt(o?fr.checkedIcon:fr.indeterminateIcon),p=new th(t,m,o,n,{size:s,theme:a??r,view:c,buttonSize:d,disabled:h});if(l&&(p.position=l),u!==void 0&&(p.left=u),f!==void 0&&(p.top=f),g!==void 0&&(p.right=g),v!==void 0&&(p.bottom=v),!h){const b=ht(C);b&&(p.onClick=b)}return p}case"Rect":{const{color:o,borderColor:n,borderWidth:s,position:a,left:c,top:d,right:h,bottom:l}=e,u=new Xn(t,o);return n&&(u.borderColor=n),s&&(u.borderWidth=s),a&&(u.position=a),c!==void 0&&(u.left=c),d!==void 0&&(u.top=d),h!==void 0&&(u.right=h),l!==void 0&&(u.bottom=l),u}case"Badge":{const{text:o,view:n,size:s,transparent:a,clear:c,leftIcon:d,rightIcon:h,customColor:l,customBackgroundColor:u,position:f,left:g,top:v,right:C,bottom:m,portalHoverEnabled:p,pilled:b}=e,A=xt(d)?mt(d):d,S=xt(h)?mt(h):h,D=new _n(t,o,{view:n,size:s,transparent:a,clear:c,leftIcon:A,rightIcon:S,pilled:b,customColor:l,customBackgroundColor:u,theme:r});return f&&(D.position=f),g!==void 0&&(D.left=g),v!==void 0&&(D.top=v),C!==void 0&&(D.right=C),m!==void 0&&(D.bottom=m),D}case"Skeleton":{const{width:o,height:n,roundness:s,lighter:a,customGradientColor:c,animated:d,shimmerDuration:h,style:l,portalHoverEnabled:u}=e,f=ur(o),g=ur(n),v={...l,...f!==void 0?{width:f}:null,...g!==void 0?{height:g}:null},C=new Yn(t,{roundness:s,lighter:a,customGradientColor:c,shimmerDuration:h,animated:d});return C.style=v,C}case"Link":{const{children:o,href:n,target:s,view:a,disabled:c,font:d,color:h,wordWrap:l,lineHeight:u,overflow:f,textOverflow:g,ellipsis:v,maxLines:C,autoTooltip:m,position:p,left:b,top:A,right:S,bottom:D,onClick:H,portalHoverEnabled:w}=e,P=gr(o),_=r.fontFamily||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';let G;d?G=/["']|sans-serif|serif|monospace/i.test(d)?d:`${d} ${_}`:G=r.baseFontStyle?`${r.baseFontStyle} ${_}`:`13px ${_}`;const V=No(r,d,u),Z=new Un(t,P,{font:G,...V,color:h,wordWrap:l,lineHeight:u,overflow:f,textOverflow:g,ellipsis:v,maxLines:C,autoTooltip:m,href:n,target:s,view:a,disabled:c,theme:r});if(p&&(Z.position=p),b!==void 0&&(Z.left=b),A!==void 0&&(Z.top=A),S!==void 0&&(Z.right=S),D!==void 0&&(Z.bottom=D),!c){const Ft=ht(H);Ft&&Z.setOnClick(Ft)}return Z}default:throw new Error(`Unknown canvas component type: ${i}`)}}const vh='400 normal 1rem/1.25rem "SB Sans Text", sans-serif, Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif',Fh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",ph=30,mh=50,yh=3;async function gs(){return typeof document>"u"||!document.fonts?Promise.resolve():document.fonts.ready.then(()=>{})}function Cs(i={}){const{testFont:t=vh,testText:e=Fh,maxChecks:r=ph,checkInterval:o=mh,stableThreshold:n=yh}=i;return new Promise(s=>{if(typeof document>"u"){s();return}const c=document.createElement("canvas").getContext("2d");if(!c){s();return}let d=-1,h=0,l=0;const u=()=>{c.font=t;const{width:f}=c.measureText(e);f!==d?(d=f,h=0):h+=1,l+=1,h>=n||l>=r?s():setTimeout(u,o)};u()})}function vs(i){return gs().then(()=>Cs(i))}function Or({dataEditorRef:i,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:r}){const o=i.current;if(!o)return;const n=Math.min(30,t),s=e,a=[];for(let c=0-r;c<n;c+=1)for(let d=0;d<s;d+=1)a.push({cell:[d,c]});a.length>0&&o.updateCells(a)}function zr(i){let t=null;return()=>{t===null&&(t=requestAnimationFrame(()=>{t=null,i()}))}}function bh(){const i=F.useRef(null),t=F.useCallback(()=>(i.current||(i.current=new hn),i.current),[]);return{registry:t(),getRegistry:t}}function Fs({dataEditorRef:i,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:r}){F.useLayoutEffect(()=>{const o=zr(()=>{gl(),Or({dataEditorRef:i,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:r})});vs().then(o)},[i,t,e,r])}function ps({dataEditorRef:i,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:r}){F.useEffect(()=>{const o=zr(()=>{Or({dataEditorRef:i,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:r})});return wn(o)},[i,t,e,r])}I.GridCellKind.Text;const ai=(i,t)=>({kind:I.GridCellKind.Text,data:i,displayData:i,allowOverlay:!0,readonly:!0,...t}),Jt=i=>{const{data:t,...e}=i??{};return{kind:I.GridCellKind.Text,data:"",displayData:"",allowOverlay:!0,readonly:!0,...e}};function ms(i){const t=i;return!!(t!=null&&t.kind)}function Ah(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}function Wr(i){return typeof i!="object"&&!Array.isArray(i)||i===null}function ys(i){return i==null||typeof i=="boolean"}const Fi=i=>{if(!i||!F.isValidElement(i))return!1;const t=i.type;return!!(t!=null&&t.__canvasType)},Gr=i=>typeof i=="string",Cr=i=>Gr(i)?!0:Fi(i),Dh=i=>Gr(i)?!0:Fi(i),Oo=({jsxElement:i,canvasCellCache:t,cellInfo:e,options:r})=>{let o=null;if(ms(i))return{...i,...r};if(Wr(i))return ys(i)?Jt(r):ai(String(i),r);if(!Fi(i)){const m="передан НЕ CanvasEl";return ai(m,{...r,data:m})}const{colInd:n,rowInd:s,row:a,column:c}=e,{id:d}=c,{getPortalEventTarget:h}=r;let l=null;const u=`cell-${n}-${s}`,f=(m,p,b,A,S,D)=>{let H=(D==null?void 0:D.canvasRoot)instanceof bt?D.canvasRoot:l;{if(!i)return{};let _=si({element:i,idPrefix:`cell-${n}-${s}-${d}`,theme:b});if(_ instanceof Ir||_ instanceof ye||_ instanceof mr){const G=new dt(`${_.id}:cell-root`);G.addChild(_),_=G}H?(H.setRootNode(_),H.setOriginId(u)):H=new bt(_,u),l=H}if(!H)return{};const w=A!==void 0&&S!==void 0?{x:A,y:S}:void 0;H.rootNode.style={width:p.width,height:p.height},o||(o=m.canvas.getBoundingClientRect());const P={x:o.left+p.x,y:o.top+p.y,width:p.width,height:p.height};return H.setPortalEventTarget((h==null?void 0:h())??null),H.setTooltipContext({column:e.column,row:e.row,ctxs:e.ctxs,refTable:r.refTable}),H.render(m,p,w,P,{frameTime:D==null?void 0:D.frameTime,requestAnimationFrame:D==null?void 0:D.requestAnimationFrame},D==null?void 0:D.imageResources),l=H,{canvasRoot:H}},{data:g,...v}=r;let C=g;return c.copyData&&(C=typeof c.copyData=="function"?c.copyData(a):c.copyData),Kn(f,void 0,C,v)},bs=(i,t,e)=>i?t>=i.x&&t<i.x+i.width&&e>=i.y&&e<i.y+i.height:!1,xh=i=>{const t=i.findIndex(e=>!e.isServiceColumn);return t===-1?i.length:t},Sh=(i,t)=>{if(!i)return;const e=Math.max(i.x,t),r=Math.max(0,i.x+i.width-e);if(!(r<=0||i.height<=0))return{x:e,y:i.y,width:r,height:i.height}};function Eh({cellsSelectionMode:i,selection:t,baseTheme:e,serviceColumnsCount:r,activeDataRange:o,outlineRange:n,checkboxSelectedRowIndexes:s,highlightActiveRow:a,errorCellRanges:c,highlightRegionsExternal:d}){return F.useMemo(()=>{const h=[...d??[]],l=t.current,u=()=>{if(c!=null&&c.length)for(const m of c)h.push({color:e.errorOutlineColor,range:m,style:"solid-outline",drawAboveSelection:!0})};if(!l||i==="disabled")return u(),h.length>0?h:void 0;const[,f]=l.cell,v=(s==null?void 0:s.has(f))??!1?e.selectionActiveCheckboxBg:e.selectionActiveBg,C=e.selectionServiceActiveBg;return o&&r>0&&h.push({color:C,range:{x:0,y:o.y,width:r,height:o.height},style:"no-outline"}),o&&i==="cell"&&o.width===1&&o.height===1&&o.y!==a&&h.push({color:v,range:o,style:"no-outline"}),n&&h.push({color:e.accentColor,range:n,style:"solid-outline"}),u(),h.length>0?h:void 0},[i,t,e.selectionActiveBg,e.selectionActiveCheckboxBg,e.selectionServiceActiveBg,e.errorOutlineColor,e.accentColor,r,o,n,s,a,c,d])}function wh({baseRegions:i,selectedColumnIndexes:t,headerSelectedRowIndexes:e,selectionRangeStack:r,totalRows:o,firstDataCol:n,columnsCount:s,theme:a}){return F.useMemo(()=>{const c=t.length>0,d=e.length>0,h=((r==null?void 0:r.length)??0)>0;if(!c&&!d&&!h)return i;const l=s-n,u=[...i??[]],f=(g,v)=>{const[C,...m]=[...g].sort((S,D)=>S-D);if(C===void 0)return;let p=C,b=C;const A=(S,D)=>{u.push({color:a.accentColor,range:v(S,D),style:"solid-outline"})};for(const S of m)S===b+1||(A(p,b),p=S),b=S;A(p,b)};if(c){n>0&&u.push({color:a.selectionServiceActiveBg,range:{x:0,y:0,width:n,height:o},style:"no-outline"});for(const g of t)u.push({color:a.selectionActiveBg,range:{x:g,y:0,width:1,height:o},style:"accent"});f(t,(g,v)=>({x:g,y:0,width:v-g+1,height:o}))}if(d&&l>0){if(n>0)for(const g of e)u.push({color:a.selectionServiceActiveBg,range:{x:0,y:g,width:n,height:1},style:"no-outline"});for(const g of e)u.push({color:a.selectionActiveBg,range:{x:n,y:g,width:l,height:1},style:"accent"});f(e,(g,v)=>({x:n,y:g,width:l,height:v-g+1}))}if(h&&r&&n>0){const g=new Set;for(const v of r){const C=Math.max(v.x,n);if(!(v.x+v.width-C<=0||v.height<=0))for(let p=v.y;p<v.y+v.height;p+=1)g.add(p)}for(const v of g)u.push({color:a.selectionServiceActiveBg,range:{x:0,y:v,width:n,height:1},style:"no-outline"})}return u},[i,t,e,r,o,n,s,a.selectionActiveBg,a.selectionServiceActiveBg,a.accentColor])}function As({theme:i,cellsSelectionMode:t,selection:e,serviceColumnsCount:r,activeDataRange:o,outlineRange:n,checkboxSelectedRowIndexes:s,activeRow:a,errorCellRanges:c,highlightRegionsExternal:d,selectedColumnIndexes:h,headerSelectedRowIndexes:l,totalRows:u,columnsCount:f,isRowHoverEnabled:g,hoverRow:v,dataRowsCount:C}){var b;const m=Eh({cellsSelectionMode:t,selection:e,baseTheme:i,serviceColumnsCount:r,activeDataRange:o,outlineRange:n,checkboxSelectedRowIndexes:s,highlightActiveRow:a,errorCellRanges:c,highlightRegionsExternal:d}),p=wh({baseRegions:m,selectedColumnIndexes:h,headerSelectedRowIndexes:l,selectionRangeStack:(b=e.current)==null?void 0:b.rangeStack,totalRows:u,firstDataCol:r,columnsCount:f,theme:i});return F.useMemo(()=>!g||v===void 0||v>C-1||r===0?p:[{color:i.bgServiceRowHovered,range:{x:0,y:v,width:r,height:1},style:"no-outline"},...p??[]],[p,r,g,v,C,i.bgServiceRowHovered])}const Ye={columns:I.CompactSelection.empty(),rows:I.CompactSelection.empty(),current:void 0};function Ds({cellsSelectionMode:i,gridSelection:t,onGridSelectionChange:e,onSelectionEmit:r}){const[o,n]=F.useState(Ye),s=t!==void 0,a=t??o,c=F.useCallback(l=>{s?e==null||e(l):n(l),r==null||r(l)},[s,e,r]),d=F.useCallback(()=>{s?e==null||e(Ye):n(Ye),r==null||r(Ye)},[s,e,r]),h=F.useMemo(()=>i==="range-cell"?"rect":i==="multi-range-cell"?"multi-rect":i==="disabled"?"none":"cell",[i]);return{selection:a,handleGridSelectionChange:c,handleSelectionCleared:d,rangeSelect:h}}const qt=new Set,zo=({start:i,length:t})=>{const e=new Set;for(let r=0;r<t;r+=1)e.add(i+r);return e};function xs({columns:i,selection:t,cellsSelectionMode:e,checkboxSelectedRowIndexes:r}){return F.useMemo(()=>{const o=t.current,n=xh(i);if(!(e!=="disabled"&&o!==void 0)||!o)return{hasAnyActiveSelection:!1,firstDataColumnIndex:n,leadingServiceColumnsCount:n,activeRows:qt,activeColumns:qt,activeDataRange:void 0,soloDataCell:void 0,isSingleCellCustomHighlight:!1,outlineRange:void 0,isServiceColumn:f=>{var g;return!!((g=i[f])!=null&&g.isServiceColumn)},isActiveRow:f=>!1,isCheckboxSelectedRow:f=>(r==null?void 0:r.has(f))??!1,isActiveDataCell:(f,g)=>!1,isActiveHeaderColumn:f=>!1};const a=Sh(o.range,n),c=a!==void 0,d=e==="cell"&&a!==void 0&&a.width===1&&a.height===1;if(!c)return{hasAnyActiveSelection:!1,firstDataColumnIndex:n,leadingServiceColumnsCount:n,activeRows:qt,activeColumns:qt,activeDataRange:void 0,soloDataCell:void 0,isSingleCellCustomHighlight:!1,outlineRange:void 0,isServiceColumn:f=>{var g;return!!((g=i[f])!=null&&g.isServiceColumn)},isActiveRow:f=>!1,isCheckboxSelectedRow:f=>(r==null?void 0:r.has(f))??!1,isActiveDataCell:(f,g)=>!1,isActiveHeaderColumn:f=>!1};const h=a!=null&&a.height&&a.height>0?zo({start:a.y,length:a.height}):qt,l=a!=null&&a.width&&a.width>0?zo({start:a.x,length:a.width}):qt,u=a.width===1&&a.height===1?[a.x,a.y]:void 0;return{hasAnyActiveSelection:c,firstDataColumnIndex:n,leadingServiceColumnsCount:n,activeRows:h,activeColumns:l,activeDataRange:a,soloDataCell:u,isSingleCellCustomHighlight:d,outlineRange:d?a:void 0,isServiceColumn:f=>{var g;return!!((g=i[f])!=null&&g.isServiceColumn)},isActiveRow:f=>h.has(f),isCheckboxSelectedRow:f=>(r==null?void 0:r.has(f))??!1,isActiveDataCell:(f,g)=>bs(a,f,g),isActiveHeaderColumn:f=>i[f]?l.has(f):!1}},[i,e,r,t])}function Th({highlightActiveRow:i,onHighlightActiveRowChange:t,isHighlightActiveRowControlled:e}){const[r,o]=F.useState(void 0),n=e??t!==void 0,s=n?i:r,a=F.useCallback(c=>{n||o(c),t==null||t(c)},[n,t]);return{activeRow:s,commitActiveRow:a}}function Hh({columns:i}){const[t,e]=F.useState(()=>I.CompactSelection.empty()),r=F.useMemo(()=>t.toArray().filter(d=>{var h;return!((h=i[d])!=null&&h.isServiceColumn)}),[t,i]),o=F.useMemo(()=>new Set(r),[r]),n=F.useRef(void 0),[s,a]=F.useState(!1),c=F.useCallback(()=>{e(I.CompactSelection.empty())},[]);return{selectedColumns:t,setSelectedColumns:e,selectedColumnIndexes:r,selectedColumnSet:o,lastSelectedColumnRef:n,isNativeColumnSelection:s,setIsNativeColumnSelection:a,clearColumnSelection:c}}function kh(){const[i,t]=F.useState(()=>I.CompactSelection.empty()),e=F.useMemo(()=>i.toArray(),[i]),r=F.useRef(i);r.current=i;const o=F.useRef(!1),n=F.useRef(I.CompactSelection.empty()),s=F.useRef(!1);F.useEffect(()=>{const c=h=>{o.current=h.ctrlKey||h.metaKey,n.current=r.current,s.current=!0},d=()=>{s.current=!1};return window.addEventListener("pointerdown",c,!0),window.addEventListener("pointerup",d,!0),()=>{window.removeEventListener("pointerdown",c,!0),window.removeEventListener("pointerup",d,!0)}},[]);const a=F.useCallback(()=>{t(I.CompactSelection.empty())},[]);return{selectedRows:i,setSelectedRows:t,headerSelectedRowIndexes:e,selectedRowsRef:r,ctrlGestureRef:o,ctrlBaseRowsRef:n,pointerGestureRef:s,clearRowSelection:a}}function Ss({columns:i,selection:t,cellsSelectionMode:e,highlightActiveType:r,enableColumnSelection:o,enableRowSelection:n,enableSelectAll:s,leadingServiceColumnsCount:a,dataRowCount:c,handleGridSelectionChange:d,handleSelectionCleared:h,onSelectionEmit:l,highlightActiveRow:u,onHighlightActiveRowChange:f,isHighlightActiveRowControlled:g}){const{selectedColumns:v,setSelectedColumns:C,selectedColumnIndexes:m,selectedColumnSet:p,lastSelectedColumnRef:b,isNativeColumnSelection:A,setIsNativeColumnSelection:S}=Hh({columns:i}),{setSelectedRows:D,headerSelectedRowIndexes:H,ctrlGestureRef:w,ctrlBaseRowsRef:P,pointerGestureRef:_}=kh(),{activeRow:G,commitActiveRow:V}=Th({highlightActiveRow:u,onHighlightActiveRowChange:f,isHighlightActiveRowControlled:g}),Z=F.useMemo(()=>i.findIndex(O=>O.isServiceColumn&&O.id==="row-markers"),[i]),Ft=F.useCallback(O=>{const{current:$}=O;if(!$)return O;const X=a,{range:J}=$;if(J.x>=X)return O;const U=J.x+J.width-X;return U<=0?{current:void 0,rows:I.CompactSelection.empty(),columns:I.CompactSelection.empty()}:{...O,current:{...$,cell:[Math.max($.cell[0],X),$.cell[1]],range:{...J,x:X,width:U}}}},[a]),ne=F.useCallback(O=>{const $=O.current;if(n&&Z>=0&&$&&$.cell[0]===Z){const J=a,U=$.range.y,Q=U+Math.max($.range.height,1);if(w.current){const N=Q-U<=1;let ot=P.current;if(ot.length===0&&t.current&&t.current.cell[0]===Z){const pt=t.current.range;ot=I.CompactSelection.empty().add([pt.y,pt.y+Math.max(pt.height,1)]),P.current=ot}let ut;N?ut=ot.hasIndex(U)?ot.remove(U):ot.add(U):ut=ot.add([U,Q]),C(I.CompactSelection.empty()),D(ut),V(void 0),S(!1),d({...O,current:{...$,range:{x:J,y:$.range.y,width:0,height:$.range.height}}}),l==null||l({current:void 0,rows:ut,columns:I.CompactSelection.empty()});return}const rt=Math.max(i.length-J,0);C(I.CompactSelection.empty()),D(I.CompactSelection.empty()),V(void 0),S(!1),d({...O,current:{...$,range:{x:J,y:$.range.y,width:rt,height:$.range.height}}});return}const X=Ft(O);(X.current!==void 0||X.rows.length>0)&&(C(I.CompactSelection.empty()),D(I.CompactSelection.empty())),S(!1),r==="row"?_.current&&X.current&&V(X.current.cell[1]):V(void 0),d(X)},[i,t,d,Ft,Z,n,a,r,l,V,w,P,_,C,D,S]),pi=F.useCallback(()=>{C(I.CompactSelection.empty()),D(I.CompactSelection.empty()),V(void 0),S(!1),h()},[h,V,C,D,S]),Ae=F.useRef([]),se=F.useMemo(()=>{var J;const O=new Set(m);if(A&&t.current){const{x:U,width:Q}=t.current.range;for(let rt=U;rt<U+Q;rt+=1)(J=i[rt])!=null&&J.isServiceColumn||O.add(rt)}const $=Array.from(O).sort((U,Q)=>U-Q).map(U=>{var Q;return(Q=i[U])==null?void 0:Q.id}).filter(U=>!!U),X=Ae.current;return X.length===$.length&&X.every((U,Q)=>U===$[Q])?X:(Ae.current=$,$)},[m,A,t,i]),Bt=(e==="range-cell"||e==="multi-range-cell")&&!A&&!(t.current!==void 0&&t.current.cell[0]<a),mi=F.useCallback((O,$)=>{if(s&&Z>=0&&O===Z&&e!=="disabled"){const N=a,ot=Math.max(i.length-N,0);if(ot===0||c===0)return;C(I.CompactSelection.empty()),D(I.CompactSelection.empty()),V(void 0),S(!0),d({current:{cell:[N,0],range:{x:N,y:0,width:ot,height:c},rangeStack:[]},rows:I.CompactSelection.empty(),columns:I.CompactSelection.empty()});return}if(!o)return;const X=i[O];if(!X||X.isServiceColumn)return;const J=$.shiftKey;if($.ctrlKey||$.metaKey){let N=v;if(N.length===0&&A&&t.current){const ut=t.current.range;N=N.add([ut.x,ut.x+ut.width])}const ot=N.hasIndex(O)?N.remove(O):N.add(O);b.current=O,C(ot),D(I.CompactSelection.empty()),V(void 0),S(!1),d({current:void 0,rows:I.CompactSelection.empty(),columns:I.CompactSelection.empty()}),l==null||l({current:void 0,rows:I.CompactSelection.empty(),columns:ot});return}let Q,rt;J&&b.current!==void 0?(Q=Math.min(b.current,O),rt=Math.max(b.current,O)):(Q=O,rt=O,b.current=O),C(I.CompactSelection.empty()),D(I.CompactSelection.empty()),V(void 0),S(!0),d({current:{cell:[Q,0],range:{x:Q,y:0,width:rt-Q+1,height:c},rangeStack:[]},rows:I.CompactSelection.empty(),columns:I.CompactSelection.empty()})},[o,s,Z,e,a,i,t,A,v,c,d,l,V,b,C,D,S]),De=F.useCallback(O=>{const $=new Set(O),X=i.map((N,ot)=>!N.isServiceColumn&&$.has(N.id)?ot:-1).filter(N=>N>=0);if(D(I.CompactSelection.empty()),V(void 0),X.length===0){C(I.CompactSelection.empty()),S(!1),d({current:void 0,rows:I.CompactSelection.empty(),columns:I.CompactSelection.empty()});return}const J=X[0],U=X[X.length-1];if(J===void 0||U===void 0)return;const Q=U-J===X.length-1;if(b.current=U,Q){C(I.CompactSelection.empty()),S(!0),d({current:{cell:[J,0],range:{x:J,y:0,width:U-J+1,height:c},rangeStack:[]},rows:I.CompactSelection.empty(),columns:I.CompactSelection.empty()});return}let rt=I.CompactSelection.empty();X.forEach(N=>{rt=rt.add(N)}),C(rt),S(!1),d({current:void 0,rows:I.CompactSelection.empty(),columns:I.CompactSelection.empty()})},[i,c,d,C,D,S,V,b]);return{selectedColumnIndexes:m,selectedColumnKeysAll:se,selectColumnsByKeys:De,selectedColumnSet:p,headerSelectedRowIndexes:H,activeRow:G,numberingColumnIndex:Z,drawFocusRing:Bt,selectColumnFromHeader:mi,handleGridSelectionWithColumnReset:ne,handleSelectionClearedWithColumns:pi}}function Bh(i,t,e,r){const o=performance.now();function n(s){const a=s-o,c=Math.min(a/r,1),d=t+(e-t)*c;i(Math.round(d)),c<1&&requestAnimationFrame(n)}requestAnimationFrame(n)}const Ph=i=>{const t=typeof i=="number",[e,r]=F.useState(()=>t?i:56);return F.useEffect(()=>{t&&Bh(r,e,i,300)},[i]),t?e:i};function Lh({columns:i,rows:t,freezeColumns:e}){const[r,o]=F.useState(null),n=F.useRef(r);n.current=r;const s=F.useRef(null),a=F.useRef(0),c=F.useMemo(()=>i.some(f=>!f.isServiceColumn&&f.isErrorCell),[i]),d=F.useRef({cols:0,rows:0,freeze:0});d.current={cols:i.length,rows:t.length,freeze:e??0};const h=F.useCallback(()=>{a.current||(a.current=requestAnimationFrame(()=>{a.current=0;const f=s.current;if(!f)return;const{cols:g,rows:v,freeze:C}=d.current,m=Math.max(f.width,1),p=Math.max(f.height,1),b=n.current;if(b){const w=b.x+b.width,P=b.y+b.height,_=b.x>0&&f.x-b.x<m/2,G=b.y>0&&f.y-b.y<p/2,V=w<g&&w-(f.x+f.width)<m/2,Z=P<v&&P-(f.y+f.height)<p/2;if(!_&&!G&&!V&&!Z)return}const A=C>0?0:Math.max(0,f.x-m),S=Math.max(0,f.y-p),D=Math.min(g,f.x+f.width+m),H=Math.min(v,f.y+f.height+p);o({x:A,y:S,width:D-A,height:H-S})}))},[]);F.useEffect(()=>()=>{a.current&&cancelAnimationFrame(a.current)},[]),F.useEffect(()=>{c&&h()},[c,h]);const l=F.useCallback(f=>{s.current=f,h()},[h]);return{errorCellRanges:F.useMemo(()=>{const f=[];if(!c)return f;const g=r??{x:0,y:0,width:Math.min(i.length,60),height:Math.min(t.length,300)},v=Math.max(0,g.x),C=Math.min(i.length,g.x+g.width),m=Math.max(0,g.y),p=Math.min(t.length,g.y+g.height);for(let b=v;b<C;b+=1){const A=i[b],{isErrorCell:S}=A??{};if(!(!A||A.isServiceColumn||!S))for(let D=m;D<p;D+=1){const H=t[D];H!==void 0&&S(H)&&f.push({x:b,y:D,width:1,height:1})}}return f},[i,t,r,c]),trackVisibleRegion:l}}function Es({cell:i,glideCell:t,rect:e,renderData:r,relativePoint:o,mouseArgs:n}){const s=(r==null?void 0:r.canvasRoot)instanceof bt?r.canvasRoot.getInteractionAtPoint(o.x,o.y):void 0;if(s)return{cell:i,glideCell:t,rect:e,renderData:r,relativePoint:o,interaction:s,...n?{mouseArgs:n}:{}}}function Ih({dataEditor:i,getCellContent:t,clientX:e,clientY:r,nativeEvent:o}){const n=i==null?void 0:i.getMouseArgsForPosition(e,r,o);if(!n||n.kind!=="cell")return;const s=[n.location[0],n.location[1]],a=t(s);if(!_r(a))return;const c=n.bounds,d=te({colIndex:s[0],rowIndex:s[1]},c),h=ee(d,a),l={x:n.localEventX,y:n.localEventY};return Es({cell:s,mouseArgs:n,glideCell:a,rect:c,renderData:h,relativePoint:l})}function Mh({eventTarget:i,dataEditorRef:t,getCellContent:e,interactionSessionStore:r,onCellContextMenuExternal:o}){F.useEffect(()=>{if(!i)return;const n=s=>{var g;if(!(s instanceof MouseEvent))return;const a=s;if(a.clientX===0&&a.clientY===0)return;const c=Ih({dataEditor:t.current,getCellContent:e,clientX:a.clientX,clientY:a.clientY,nativeEvent:a});if(!c)return;const{cell:d,interaction:h,mouseArgs:l,relativePoint:u}=c,f=r.beginOrGet({cell:d,relativePoint:u,interaction:h,button:a.button,source:"contextmenu"});if(f.decision.contextMenuMode!=="normal"){if(r.consumePhase(f,"contextmenu-capture"),a.stopPropagation(),(g=a.stopImmediatePropagation)==null||g.call(a),f.decision.contextMenuMode==="none"){a.cancelable&&a.preventDefault();return}!l||!o||o(d,{...l,preventDefault:()=>{a.cancelable&&a.preventDefault()}})}};return i.addEventListener("contextmenu",n,!0),()=>{i.removeEventListener("contextmenu",n,!0)}},[t,i,e,r,o])}const _h=250;function Rh(i){return F.useCallback((t,e)=>{const r=i.consumeEditorRequest(t,_h);return!r||r.target!=="self"?e:{...e,activationBehaviorOverride:"single-click"}},[i])}const ti=350;function Wo(i){return Math.round(i)}function Nh({cell:i,relativePoint:t,button:e}){return[i[0],i[1],e??"unknown",Wo(t.x),Wo(t.y)].join(":")}function ci(i,t){return i[0]===t[0]&&i[1]===t[1]}function ws(i,t){return Math.abs(i.x-t.x)<=1&&Math.abs(i.y-t.y)<=1}function Oh(i,t){return!ci(i.cell,t.cell)||i.button!==void 0&&t.button!==void 0&&i.button!==t.button?!1:ws(i.relativePoint,t.relativePoint)}function zh(i,t){return Date.now()-i.startedAt>(t.maxAgeMs??ti)||!ci(i.cell,t.cell)||i.button!==void 0&&t.button!==void 0&&i.button!==t.button?!1:ws(i.relativePoint,t.relativePoint)}function Wh(){let i,t=1;const e=r=>{if(!(!i||!zh(i,r)))return i};return{beginOrGet:r=>{const o=e(r);return o||(i={id:t++,key:Nh(r),cell:r.cell,relativePoint:r.relativePoint,interaction:r.interaction,decision:hs(r.interaction),consumedPhases:new Set,startedAt:r.startedAt??Date.now(),source:r.source,...r.button!==void 0?{button:r.button}:{}},i)},findMatching:e,getCurrent:()=>i,storeClickResult:(r,o)=>{r.clickResult=o},consumeClickResult:r=>{const o=i;if(!(o!=null&&o.clickResult))return;if(!Oh(o,r)){delete o.clickResult;return}const n=o.clickResult;return delete o.clickResult,o.consumedPhases.add("renderer-click"),n},consumePhase:(r,o)=>r.consumedPhases.has(o)?!1:(r.consumedPhases.add(o),!0),armEditorRequest:(r,o)=>{var n;(n=r.editorRequest)!=null&&n.consumed||(r.editorRequest={target:o.target,armedAt:Date.now()})},consumeEditorRequest:(r,o=ti)=>{const n=i;if(!n)return;const s=n.editorRequest;if(!(s!=null&&s.consumed)&&s){if(Date.now()-s.armedAt>o){i=void 0;return}if(ci(n.cell,r))return s.consumed=!0,n.consumedPhases.add("editor-activation"),s}},isMatchingRecent:(r,o,n=ti)=>{const s=i;return!s||!s.consumedPhases.has(r)?!1:Date.now()-s.startedAt<=n&&ci(s.cell,o)},clearStale:(r=ti)=>{i&&Date.now()-i.startedAt>r&&(i=void 0)},clear:()=>{i=void 0}}}function Gh(){const i=F.useMemo(()=>Wh(),[]),t=F.useCallback(r=>i.beginOrGet(r),[i]),e=F.useCallback(r=>i.consumeClickResult(r),[i]);return{interactionSessionStore:i,beginOrGetInteractionSession:t,consumeCanvasClickResult:e}}function $h(i={}){const t=F.useMemo(()=>!0,[]);return F.useMemo(()=>{const e=[];return t&&e.push(Nr({beginOrGetInteractionSession:i.beginOrGetInteractionSession,consumeCanvasClickResult:i.consumeCanvasClickResult})),e.length>0?e:void 0},[t,i.beginOrGetInteractionSession,i.consumeCanvasClickResult])}const Gi={glideScroller:"dvn-scroller",glideTable:"gdg-table",glideUnderlay:"dvn-underlay"};function Ts(i){const t=(i==null?void 0:i.querySelector(`.${Gi.glideTable}`))??null,e=(t==null?void 0:t.querySelector(`.${Gi.glideScroller}`))??null,r=(t==null?void 0:t.querySelector(`.${Gi.glideUnderlay}`))??null;return{container:t,scroller:e,underlay:r}}const Go="[useGlideElements]";function Uh(i,t){const[e,r]=F.useState(null),[o,n]=F.useState(null),[s,a]=F.useState(null),c=F.useRef(null);F.useEffect(()=>{const h=i==null?void 0:i.current;if(Qt.tableDebug(Go,"useEffect fired",{hasWrapper:!!h,fullScreened:t}),!h)return;const l=()=>{const{container:f,scroller:g,underlay:v}=Ts(h);return Qt.tableDebug(Go,"tryFind",{containerFound:!!f,scrollerFound:!!g,underlayFound:!!v}),f?(r(C=>C===f?C:f),n(C=>C===g?C:g),a(C=>C===v?C:v),c.current&&(c.current.disconnect(),c.current=null),!0):!1},u=requestAnimationFrame(()=>{if(l())return;const f=new MutationObserver(()=>{l()});f.observe(h,{childList:!0,subtree:!0}),c.current=f});return()=>{cancelAnimationFrame(u),c.current&&(c.current.disconnect(),c.current=null),r(null),n(null),a(null)}},[i,t]);const d=F.useCallback(h=>e?Ze.createPortal(h,e):null,[e]);return{glideContainer:e,glideScroller:o,glideUnderlay:s,isReady:!!e,renderInContainer:d}}function Xh({isRowHoverEnabled:i,dataEditorRef:t,columnsCount:e,rowsCount:r}){const o=F.useRef(null),n=F.useCallback((...h)=>{var g;const l=t.current;if(!l)return;const u=new Set;h.forEach(v=>{typeof v=="number"&&v>=0&&v<r&&u.add(v)});const f=[];u.forEach(v=>{for(let C=0;C<e;C+=1)f.push({cell:[C,v]})}),f.length>0&&((g=l.updateCells)==null||g.call(l,f))},[t,e,r]),s=F.useCallback(h=>{const l=o.current;(l==null?void 0:l.colInd)===(h==null?void 0:h.colInd)&&(l==null?void 0:l.rowInd)===(h==null?void 0:h.rowInd)||(o.current=h,n(l==null?void 0:l.rowInd,h==null?void 0:h.rowInd))},[n]),[a,c]=F.useState(void 0),d=F.useCallback(h=>{c(l=>l===h?l:h)},[]);return{hoveredCellRef:o,setHoveredCell:s,hoverRow:a,onHoverRowChange:i?d:void 0}}function Vh(i){const t=document.createElement("div");t.style.cssText="position:fixed;left:0;top:0;width:0;height:0;pointer-events:none;visibility:hidden",i.appendChild(t);const e=t.getBoundingClientRect();return i.removeChild(t),{x:e.left,y:e.top}}function Yh(i,t){F.useEffect(()=>{if(!t)return;const e=i.current;if(!e)return;const r=Qt.throttleWithLastCall(()=>{const{x:o,y:n}=Vh(e);e.style.setProperty("--gdg-portal-offset-x",`${o}px`),e.style.setProperty("--gdg-portal-offset-y",`${n}px`)},100);return r(),window.addEventListener("resize",r),e.addEventListener("resize",r),()=>{window.removeEventListener("resize",r),e.removeEventListener("resize",r)}},[i,t])}function Kh(i,t){const{columnsLast:e,rows:r,ctxs:o,refTable:n,theme:s,portalEventTargetRef:a,externalOnItemHovered:c,onHoverRowChange:d}=i,h=F.useRef(null),l=F.useCallback(g=>{const v=h.current;h.current=null,jt({visible:!1,x:0,y:0,width:0,height:0,source:"cell",originId:v??void 0,nodeId:v??void 0},g,!0)},[]),u=F.useCallback(g=>{var p,b,A,S,D;c==null||c(g),d==null||d(g.kind==="cell"?((p=g.rawLocation)==null?void 0:p[1])??g.location[1]:void 0);const v=(a==null?void 0:a.current)??null,C=(b=g.location)==null?void 0:b[0],m=C!=null?e[C]:void 0;if((g.kind==="header"||g.kind==="group-header")&&g.hiddenIndicatorCol!=null){const H=g.hiddenIndicatorCol;h.current===Ge.HEADER_TOOLTIP_HIDDEN_COLS_ID||l(v);const P=e.length,_=Math.min(H,P-1),G=(A=t.current)==null?void 0:A.getBounds(_,-1);if(!G)return;const V=H>=P?G.x+G.width:G.x,Z=g.hiddenIndicatorAboveLeaf??0;h.current=Ge.HEADER_TOOLTIP_HIDDEN_COLS_ID,jt({visible:!0,x:V-2,y:G.y-Z,width:4,height:G.height+Z,source:"header",originId:Ge.HEADER_TOOLTIP_HIDDEN_COLS_ID,nodeId:Ge.HEADER_TOOLTIP_HIDDEN_COLS_ID,priority:1},v);return}if(g.kind==="header"){if(!(m!=null&&m.headerCellTooltip)){l(v);return}const H=`header-tooltip-${C}`;h.current===H||l(v);const P=(S=t.current)==null?void 0:S.getBounds(C,-1);if(!P)return;h.current=H,jt({visible:!0,x:P.x,y:P.y,width:P.width,height:P.height,source:"header",originId:H,nodeId:H,priority:0,tooltipContext:{column:m,ctxs:o,refTable:n,colInd:C,theme:s}},v);return}if(g.kind==="cell"){const H=g.location[1],w=r[H];if(!m||!w||!m.cellTooltip){l(v);return}const P=`col-tooltip-${C}-${H}`;h.current===P||l(v);const G=(D=t.current)==null?void 0:D.getBounds(C,H);if(!G)return;h.current=P,jt({visible:!0,x:G.x,y:G.y,width:G.width,height:G.height,source:"cell",originId:P,nodeId:P,priority:0,tooltipContext:{column:m,row:w,ctxs:o,refTable:n,colInd:C,rowInd:H,theme:s}},v);return}l(v)},[e,r,o,n,s,a,c,d,l,t]),f=F.useCallback(()=>{l((a==null?void 0:a.current)??null)},[l,a]);return{onItemHovered:u,hideTooltip:f}}function qh({enabled:i,portalEventTargetRef:t,headerHeight:e,groupHeaderHeight:r,experimental:o}){const[n,s]=F.useState(0),a=F.useRef(null),c=F.useMemo(()=>{const u=e??ei;let f=typeof u=="number"?u:ei;return Array.isArray(r)?f+=r.reduce((g,v)=>g+v,0):typeof r=="number"&&(f+=r),f},[e,r]),d=F.useRef(c);d.current=c;const h=F.useCallback(u=>{var m;if((m=a.current)==null||m.call(a),a.current=null,!u)return;if(!i){s(0);return}const f=t==null?void 0:t.current;if(!f)return;const g=f.querySelector(".dvn-scroller"),v=f.querySelector(".dvn-underlay");if(!g||!v)return;const C=()=>{const p=g.scrollTop,b=Math.min(p,d.current);s(-1*b),v.style.overflowY="visible",v.style.transform=`translateY(-${b}px)`};g.addEventListener("scroll",C),a.current=()=>{g.removeEventListener("scroll",C),v.style.transform="",v.style.overflowY=""}},[i,t]),l=F.useMemo(()=>i?{...o,paddingBottom:n}:o,[i,n,o]);return{unstickyCallbackRef:h,mergedExperimental:l}}const $i=Yo.div.withConfig({displayName:"styled__StyledOverlayPortal"})(["[id^='gdg-overlay-']{position:fixed;z-index:9001;margin-left:calc(-1 * var(--gdg-portal-offset-x,0px));margin-top:calc(-1 * var(--gdg-portal-offset-y,0px));}"]),Zh=Yo(I).withConfig({displayName:"styled__StyledGlideDataEditor"})([""]),jh=i=>({tokens:dn(i),fonts:ii,fontMetrics:jo,bgEditableCell:E.bgEditableCell[i],bgEditableCellHovered:E.bgEditableCellHovered[i],bgEditableCellActive:E.bgEditableCellActive[i],bgEditableCellActiveHovered:E.bgEditableCellActiveHovered[i],bgEditableCellRowActiveHovered:E.bgEditableCellRowActiveHovered[i],selectionCheckboxBg:E.selectionCheckboxBg[i],bgSelectedRowActiveHovered:E.bgSelectedRowActiveHovered[i],selectionActiveBg:E.selectionActiveBg[i],selectionActiveCheckboxBg:E.selectionActiveCheckboxBg[i],selectionServiceBg:E.selectionServiceBg[i],selectionServiceActiveBg:E.selectionServiceActiveBg[i],errorOutlineColor:E.errorOutlineColor[i],bgRowHovered:E.bgRowHovered[i],bgServiceRowHovered:E.bgServiceRowHovered[i],bgSelectedRowHovered:E.bgSelectedRowHovered[i],selectionActiveHoveredBg:E.selectionActiveHoveredBg[i],selectionActiveCheckboxHoveredBg:E.selectionActiveCheckboxHoveredBg[i],selectionServiceActiveHoveredBg:E.selectionServiceActiveHoveredBg[i],bgHeaderSelectedHovered:E.bgHeaderSelectedHovered[i],editedSuccessfullyCellColor:E.editedSuccessfullyCellColor[i],editedSuccessfullyCellHoverColor:E.editedSuccessfullyCellHoverColor[i],editedSuccessfullyCellActiveColor:E.editedSuccessfullyCellActiveColor[i],editedSuccessfullyCellActiveHoverColor:E.editedSuccessfullyCellActiveHoverColor[i],editedSuccessfullyCellRowActiveHoverColor:E.editedSuccessfullyCellRowActiveHoverColor[i],bgCellPositive:E.bgCellPositive[i],bgCellPositiveHovered:E.bgCellPositiveHovered[i],bgCellPositiveActive:E.bgCellPositiveActive[i],bgCellPositiveActiveHovered:E.bgCellPositiveActiveHovered[i],bgCellPositiveRowActiveHovered:E.bgCellPositiveRowActiveHovered[i],bgCellNegative:E.bgCellNegative[i],bgCellNegativeHovered:E.bgCellNegativeHovered[i],bgCellNegativeActive:E.bgCellNegativeActive[i],bgCellNegativeActiveHovered:E.bgCellNegativeActiveHovered[i],bgCellNegativeRowActiveHovered:E.bgCellNegativeRowActiveHovered[i],bgCellWarning:E.bgCellWarning[i],bgCellWarningHovered:E.bgCellWarningHovered[i],bgCellWarningActive:E.bgCellWarningActive[i],bgCellWarningActiveHovered:E.bgCellWarningActiveHovered[i],bgCellWarningRowActiveHovered:E.bgCellWarningRowActiveHovered[i],bgCellInfo:E.bgCellInfo[i],bgCellInfoHovered:E.bgCellInfoHovered[i],bgCellInfoActive:E.bgCellInfoActive[i],bgCellInfoActiveHovered:E.bgCellInfoActiveHovered[i],bgCellInfoRowActiveHovered:E.bgCellInfoRowActiveHovered[i],fadeWhite:E.fadeWhite[i],fadeGray:E.fadeGray[i]}),Jh=i=>({accentColor:E.accentColor[i],accentLight:E.accentLight[i],textDark:E.textDark[i],textHeader:E.textHeader[i],textHeaderSelected:E.textHeaderSelected[i],textGroupHeader:E.textGroupHeader[i],bgCell:E.bgCell[i],bgHeader:E.bgHeader[i],bgHeaderHasFocus:E.bgHeaderHasFocus[i],bgHeaderHovered:E.bgHeaderHovered[i],borderColor:E.borderColor[i],bgGroupHeader:E.bgGroupHeader[i],bgGroupHeaderHovered:E.bgGroupHeaderHovered[i],hiddenColumnsIndicatorColor:E.hiddenColumnsIndicatorColor[i]}),$o={small:"bodyXXS",medium:"bodyS",big:"bodyM"},Qh=(i="big")=>{const t=ii[$o[i]],e=jo[$o[i]],r=`${e.fontSize}px`,o=e.lineHeightPx,n=qo[i],{cellHorizontalPadding:s,cellVerticalPadding:a}=n;return{headerFontStyle:ii.bodyXSBold,baseFontStyle:t,fontFamily:'"SB Sans Text", sans-serif, Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif',editorFontSize:r,lineHeight:o,cellHorizontalPadding:s,cellVerticalPadding:a,activeSizes:n}},$r=(i="big",t="light")=>({...Jh(t),...Qh(i),...jh(t),rowSize:i}),td=$r(),ed=.025,Hs=.004,vr=i=>{let t=i.trim().replace("#","");if(t.length===3&&(t=t.split("").map(e=>e+e).join("")),t.length===6&&(t+="FF"),!/^[0-9a-fA-F]{8}$/.test(t))throw new Error(`Не hex: ${i}`);return[0,2,4,6].map(e=>parseInt(t.slice(e,e+2),16)/255)},ks=i=>Math.round(Math.min(1,Math.max(0,i))*255).toString(16).padStart(2,"0"),id=i=>i<=.04045?i/12.92:((i+.055)/1.055)**2.4,rd=i=>i<=.0031308?12.92*i:1.055*i**(1/2.4)-.055,Ke=(i,t="#FFFFFF")=>{const[e,r,o,n]=vr(i),[s,a,c]=vr(t),d=(h,l)=>ks(Math.round((h*n+l*(1-n))*255)/255);return`#${d(e,s)}${d(r,a)}${d(o,c)}`.toUpperCase()},li=i=>{const[t,e,r]=vr(i),[o,n,s]=[t,e,r].map(id),a=Math.cbrt(.4122214708*o+.5363325363*n+.0514459929*s),c=Math.cbrt(.2119034982*o+.6806995451*n+.1073969566*s),d=Math.cbrt(.0883024619*o+.2817188376*n+.6299787005*s),h=.2104542553*a+.793617785*c-.0040720468*d,l=1.9779984951*a-2.428592205*c+.4505937099*d,u=.0259040371*a+.7827717662*c-.808675766*d;return{l:h,c:Math.hypot(l,u),h:(Math.atan2(u,l)*180/Math.PI+360)%360}},Ui=({l:i,c:t,h:e})=>{const r=t*Math.cos(e*Math.PI/180),o=t*Math.sin(e*Math.PI/180),n=(i+.3963377774*r+.2158037573*o)**3,s=(i-.1055613458*r-.0638541728*o)**3,a=(i-.0894841775*r-1.291485548*o)**3;return[4.0767416621*n-3.3077115913*s+.2309699292*a,-1.2684380046*n+2.6097574011*s-.3413193965*a,-.0041960863*n-.7034186147*s+1.707614701*a]},Uo=i=>i.every(t=>t>=-1e-6&&t<=1+1e-6),od=i=>{const t={...i,l:Math.min(1,Math.max(0,i.l))};let e=Ui(t);if(!Uo(e)){let r=0,o=t.c;for(let n=0;n<24;n+=1){const s=(r+o)/2;Uo(Ui({...t,c:s}))?r=s:o=s}e=Ui({...t,c:r})}return`#${e.map(r=>ks(rd(Math.min(1,Math.max(0,r))))).join("")}`.toUpperCase()},me=(i,t,e,r)=>{const o=li(i),n=e==="light"?1:0,s=r?li(r):o,a=Math.abs(s.l-n),c=a>1e-6?s.c/a:0,d=t/Math.sqrt(1+c*c),h=e==="light"?o.l-d:o.l+d;return od({l:h,c:c*Math.abs(h-n),h:s.h})},nd=(i,t,e,r)=>{if(!i)return null;const o=li(i).c<Hs;return me(i,t,e,o?r:void 0)},sd=(i,t,e={})=>{const r=Ke(e.cardHex??(t==="light"?"#FFFFFF":"#000000")),o=Ke(i,r),n=ed*(e.stepFactor??(t==="dark"?1.2:1)),s=e.selectionHex?Ke(e.selectionHex,o):null,a=e.primaryHex?Ke(e.primaryHex,r):void 0,c=nd(s,n,t,a);if(e.achromatic||li(o).c<Hs){if(!a)return{rest:o,hover:null,hover2:null,active:s,hoverActive:c};const h=me(o,n,t,a);return{rest:o,hover:h,hover2:me(h,n,t,a),active:s,hoverActive:c}}const d=me(o,n,t);return{rest:o,hover:d,hover2:me(d,n,t),active:s,hoverActive:c}},qe=new Map,ad=1024,cd=(i,t)=>{const e=`${t}/${i}`,r=qe.get(e);if(r)return r;const o=Sa[t],n=sd(i,o.mode,{stepFactor:o.stepFactor,cardHex:o.cardHex,primaryHex:o.primaryHex,selectionHex:o.selectionHex});return qe.size>=ad&&qe.clear(),qe.set(e,n),n},Bs=(i,{rowHover:t,rowActive:e})=>{const r=i.hover??i.rest,o=i.hover2??r;let n;e?n=t?o:r:n=t?r:i.rest;const s=t?i.hoverActive??i.active:i.active;return{bgCell:n,...s?{accentLight:s}:{}}},ld=(i,t,e)=>{try{return Bs(cd(i,t),e)}catch{return{bgCell:i}}},hd=i=>({rest:i.bgEditableCell,hover:i.bgEditableCellHovered,hover2:i.bgEditableCellRowActiveHovered,active:i.bgEditableCellActive,hoverActive:i.bgEditableCellActiveHovered}),Xo=(i,{rowHover:t,checkboxChecked:e})=>{const r=Number(t)+Number(e);return[i.selectionCheckboxBg,i.bgSelectedRowHovered,i.bgSelectedRowActiveHovered][r]??i.selectionCheckboxBg},Ps=(i,t,e,r)=>{let o=i;for(let s=i;s>=0;s-=1){const a=e(s,t);if(a&&a[0]<=i&&a[1]>=i){o=a[0];break}}const n=r(o,t);return[o,n?n[0]:t]},Xi=(i,t)=>{if(i==null)return null;const e=typeof i=="number"?i:i(t);return e<=0?null:[t.colInd,t.colInd+e]},Vo=(i,t)=>i==null?null:i(t);function dd(...i){}const ud={},Vi=i=>Array.isArray(i)?i.filter(t=>typeof t=="string"):typeof i=="string"?[i]:[],fd=({columns:i,rows:t,bottomSummaryRows:e,rowHeight:r,width:o,rowSize:n="medium",ctxs:s=ud,freezeColumns:a,onColumnResize:c,renderGroupHeader:d,groupAlignMap:h,refTable:l,onColumnsReorder:u,portalEventTargetRef:f,onItemHovered:g,unstickyHeader:v,resizableColumn:C=!0,minColumnWidth:m=56,maxColumnWidth:p,maxColumnAutoWidth:b,containerRef:A,containerClassName:S,containerStyle:D,renderOverlayFeatures:H,hideGrid:w,contentStateNode:P,containerSlot:_,fullScreened:G,editorOverlayPortal:V,highlightActiveType:Z="disabled",cellsSelectionMode:Ft="range-cell",enableColumnSelection:ne=!0,enableRowSelection:pi=!0,enableSelectAll:Ae=!0,enableLowDprHairline:se,gridSelection:Bt,onGridSelectionChange:mi,onSelectionEmit:De,onColumnSelectionChange:O,pendingColumnSelectionKeys:$,onColumnSelectionApplied:X,highlightActiveRow:J,onHighlightActiveRowChange:U,highlightActiveRowControlled:Q,highlightRegions:rt,checkboxSelectedRowIndexes:N,checkboxVisibleRowIndexes:ot,hoverEffects:ut,onCellClicked:pt,onCellContextMenu:ae,onGroupHeaderClicked:Pt,onMouseMove:xe,onVisibleRegionChanged:Se,portalElementRef:gd,...Nt})=>{const Ee=Qt.useActiveTheme(),M=F.useMemo(()=>$r(n,Ee),[n,Ee]),Ls=F.useMemo(()=>{const y=typeof r=="number"?r:void 0;if(y)return y;const x=Ko[n],T=typeof r=="function"?r:void 0;return T?k=>{const B=t[k];if(!B)return y??x;const R=T(B,{rowSizeName:n,rowSizeValue:x},k);return typeof R=="number"&&!Number.isNaN(R)?R:x}:x},[t,r,n]),Ot=(e==null?void 0:e.length)??0,Is=Ph(Ls),[we,Ms]=F.useState(new Map),Te=F.useRef(null),_s=F.useCallback((y,x,T,k)=>{var L;const B=y;B.id&&((L=Te.current)==null||L.call(Te),c==null||c(B,x,T,k),Ms(R=>(R.set(B.id,x),new Map(R))))},[c]),Lt=F.useMemo(()=>we.size===0?i:i.map(y=>we.has(y.id)?{...y,width:we.get(y.id),grow:0}:y),[i,we]),[Ur,Cd]=F.useState(0),yi=F.useMemo(()=>new WeakMap,[]),Tt=F.useRef(null);F.useEffect(()=>{var y;(Bt==null?void 0:Bt.current)!==void 0&&((y=Tt.current)==null||y.focus())},[Bt]);const{interactionSessionStore:ft,beginOrGetInteractionSession:Rs,consumeCanvasClickResult:Ns}=Gh(),Xr=Rh(ft),{selection:zt,handleGridSelectionChange:Os,handleSelectionCleared:zs,rangeSelect:Ws}=Ds({cellsSelectionMode:Ft,gridSelection:Bt,onGridSelectionChange:mi,onSelectionEmit:De}),ct=xs({columns:Lt,selection:zt,cellsSelectionMode:Ft,checkboxSelectedRowIndexes:N}),Gs=F.useMemo(()=>U?y=>U(y,y!==void 0?t[y]:void 0):void 0,[U,t]),{selectedColumnIndexes:$s,selectedColumnKeysAll:Vr,selectColumnsByKeys:He,selectedColumnSet:ke,headerSelectedRowIndexes:Yr,activeRow:Wt,numberingColumnIndex:Kr,drawFocusRing:Us,selectColumnFromHeader:qr,handleGridSelectionWithColumnReset:Xs,handleSelectionClearedWithColumns:Vs}=Ss({columns:Lt,selection:zt,cellsSelectionMode:Ft,highlightActiveType:Z,enableColumnSelection:ne,enableRowSelection:pi,enableSelectAll:Ae,leadingServiceColumnsCount:ct.leadingServiceColumnsCount,dataRowCount:t.length+Ot,handleGridSelectionChange:Os,handleSelectionCleared:zs,onSelectionEmit:De,highlightActiveRow:J,onHighlightActiveRowChange:Gs,isHighlightActiveRowControlled:Q});F.useEffect(()=>{O==null||O(Vr)},[Vr,O]),F.useEffect(()=>{if(!$)return;He($);const y=setTimeout(()=>X==null?void 0:X(),0);return()=>clearTimeout(y)},[$,Lt,He,X]);const Be=Yr.length>0,Pe=F.useMemo(()=>{var T;const y=new Set,x=(T=zt.current)==null?void 0:T.rangeStack;if(x){const k=ct.firstDataColumnIndex;for(const B of x){const L=Math.max(B.x,k);for(let R=L;R<B.x+B.width;R+=1)y.add(R)}}return y},[zt,ct.firstDataColumnIndex]),K=F.useMemo(()=>Lt.map((y,x)=>{const T={...y.themeOverride??{}};let k=Object.keys(T).length>0;return y.isServiceColumn&&(T.bgCell=M.selectionServiceBg,k=!0),x===Kr&&(T.accentLight="transparent",T.accentColor="transparent",k=!0),(ct.isActiveHeaderColumn(x)||ke.has(x)||Pe.has(x)||Be&&!y.isServiceColumn)&&(T.bgHeader=M.selectionServiceActiveBg,T.bgHeaderHasFocus=M.selectionServiceActiveBg,T.bgHeaderHovered=M.bgHeaderSelectedHovered,k=!0),k?{...y,themeOverride:T}:y}),[Lt,ct,ke,Pe,Be,Kr,M.selectionServiceBg,M.selectionServiceActiveBg,M.bgHeaderSelectedHovered]),Gt=(ut==null?void 0:ut.row)!==!1,{hoveredCellRef:Ys,setHoveredCell:Le,hoverRow:bi,onHoverRowChange:Ks}=Xh({isRowHoverEnabled:Gt,dataEditorRef:Tt,columnsCount:K.length,rowsCount:t.length}),{errorCellRanges:qs,trackVisibleRegion:Zr}=Lh({columns:Lt,rows:t,freezeColumns:a}),Zs=F.useCallback((y,x,T,k)=>{Zr(y),Se==null||Se(y,x,T,k)},[Zr,Se]),ce=F.useCallback(([y,x],T)=>{var ze,oo,We,no;dd(Ur);const k=(T==null?void 0:T.applyCanvasEditorActivation)!==!1,B=nt=>k?Xr([y,x],nt):nt,L=!!e&&x>t.length-1,R=t[x],z=K[y];if(!z)return Jt();if(L){const nt=e[x-t.length],{renderSummaryCell:kt,colSpan:st}=z,so={bgCell:M.bgHeader};if(!kt||!nt)return Jt({themeOverride:so});const Bi={row:nt,column:z,colInd:y,rowInd:x,ctxs:s,theme:M,hovered:{cellHover:!1,rowHover:!1},active:{cellActive:!1,rowActive:!1}},ba=kt(Bi),ao=Xi(st,Bi),Aa={data:"",themeOverride:so,...ao&&{span:ao}};return B(Oo({jsxElement:ba,canvasCellCache:yi,cellInfo:Bi,options:{...Aa,getPortalEventTarget:()=>(f==null?void 0:f.current)??null,refTable:l}}))}if(!R)return Jt();const it=(nt,kt,st)=>({row:t[st],column:nt,colInd:kt,rowInd:st,ctxs:s,theme:M,hovered:{cellHover:!1,rowHover:!1},active:{cellActive:!1,rowActive:!1}}),[q,j]=Ps(y,x,(nt,kt)=>{const st=K[nt];return st!=null&&st.colSpan?Xi(st.colSpan,it(st,nt,kt)):null},(nt,kt)=>{const st=K[nt];return st!=null&&st.rowSpan?Vo(st.rowSpan,it(st,nt,kt)):null});if(q!==y||j!==x)return ce([q,j],T);const Y=Ys.current,W={row:R,column:z,colInd:y,rowInd:x,ctxs:s,theme:M,hovered:{cellHover:(Y==null?void 0:Y.colInd)===y&&(Y==null?void 0:Y.rowInd)===x,rowHover:(Y==null?void 0:Y.rowInd)===x},active:{cellActive:ct.isActiveDataCell(y,x),rowActive:ct.isActiveRow(x)}},{renderCell:Xt,id:Ht,colSpan:Si,rowSpan:Ie,spanAlign:Me,editable:_e,contentAlign:Fa,columnThemeOverride:io}=z,pa=((oo=(ze=R[Ht])==null?void 0:ze.toString)==null?void 0:oo.call(ze))??"NOT FOUND",Re=Xi(Si,W),Ne=Vo(Ie,W),Ei=(Re||Ne)&&Me?typeof Me=="function"?Me(W):Me:void 0,ro=_e?typeof _e=="boolean"?_e:_e(R):!1,Mt=typeof io=="function"?io(W):void 0,Oe={rowHover:Gt&&W.hovered.rowHover,rowActive:x===Wt},wi=ro?Bs(hd(M),Oe):Mt!=null&&Mt.bgCell?ld(Mt.bgCell,Ee,Oe):void 0,{soloDataCell:Ti}=ct,ma=Oe.rowActive&&Ti!==void 0&&Ti[0]===y&&Ti[1]===x?{accentLight:wi?wi.bgCell:Xo(M,{rowHover:Oe.rowHover,checkboxChecked:(N==null?void 0:N.has(x))??!1})}:void 0,Hi={data:((no=(We=R[Ht])==null?void 0:We.toString)==null?void 0:no.call(We))??"NOT FOUND",...ro?{readonly:!1,allowOverlay:!0}:{readonly:!0,...z.hasPreview===!0&&{allowOverlay:!0},...z.hasPreview==="none"&&{allowOverlay:!1}},themeOverride:{...Mt,...wi,...ma},contentAlign:Fa,...Re&&{span:Re},...Ne&&{spanRows:Ne},...Ei&&{spanAlign:Ei}};if(!Xt){const nt=String(pa);return Wr(nt)?B(ai(nt,Hi)):B(Jt(Hi))}const ki=Mt?{...W,theme:{...M,...Mt}}:W,ya=Xt(Re||Ne?{...ki,__mergedCell:{align:Ei}}:ki);return B(Oo({jsxElement:ya,canvasCellCache:yi,cellInfo:ki,options:{...Hi,getPortalEventTarget:()=>(f==null?void 0:f.current)??null,refTable:l}}))},[Ur,e,t,K,s,M,Ee,Gt,Wt,N,ct,yi,f,Xr]),js=F.useCallback((y,x)=>{var W;const T=ce(y,{applyCanvasEditorActivation:!1});if(!_r(T)){pt==null||pt(y,x);return}let k=!1;const B=x.preventDefault;x.preventDefault=()=>{k=!0,B()};const L=te({colIndex:y[0],rowIndex:y[1]},x.bounds),R=ee(L,T),z={x:x.localEventX,y:x.localEventY},it=Es({cell:y,glideCell:T,rect:x.bounds,renderData:R,relativePoint:z}),q=it?ft.beginOrGet({cell:y,relativePoint:z,interaction:it.interaction,button:x.button,source:"click"}):ft.beginOrGet({cell:y,relativePoint:z,interaction:ln(),button:x.button,source:"click"}),j=Rr({cell:T,rect:x.bounds,relativePoint:z,renderData:R,rowData:t[y[1]],rowIndex:y[1]}),Y=q?Gl({decision:q.decision,propagationStopped:j.propagationStopped,suppressGridDefault:j.suppressGridDefault}):{suppressExternalCellClick:j.propagationStopped,suppressGridDefaultForClick:j.suppressGridDefault};if(q&&(ft.consumePhase(q,"cell-click"),ft.storeClickResult(q,j)),x.button===0&&((W=Y.editorRequest)==null?void 0:W.target)==="self"&&ft.armEditorRequest(q,Y.editorRequest),Y.suppressGridDefaultForClick&&(x.preventDefault(),q!=null&&q.decision.editorRequest&&ft.clear()),Y.suppressExternalCellClick||pt==null||pt(y,x),k||x.button===1){ft.clear();return}},[ce,ft,pt,t]),Js=F.useCallback((y,x)=>{ft.isMatchingRecent("contextmenu-capture",y)||ae==null||ae(y,x)},[ft,ae]),Qs=$h({beginOrGetInteractionSession:Rs,consumeCanvasClickResult:Ns}),$t=F.useRef(null),Ut=F.useRef(null),le=F.useMemo(()=>new Map,[]),jr=F.useMemo(()=>new Map,[]),Ai=F.useRef(null),It=F.useRef(null),ta=F.useMemo(()=>Qt.mergeRefs(It,A),[A]),{drawHeader:ea,onHeaderClicked:ia}=F.useMemo(()=>({drawHeader:(T,k)=>{var Ie;const{ctx:B,rect:L,columnIndex:R}=T,z=K[R];if(!z||!z.renderHeaderCell)return k();const it={column:z,drawArgs:T,ctxs:s,theme:M};let q=z.renderHeaderCell(it);if(!Cr(q))return k();typeof q=="string"&&(q=At.jsx(pe.Container,{style:{width:"100%"},alignItems:"center",children:At.jsx(pe.Text,{children:q})}));const j=`header-${z.id}-${R}`,Y=si({element:q,idPrefix:j,theme:M});let W;le.has(z.id)?(W=le.get(z.id),W==null||W.setRootNode(Y),W!=null&&W.rootNode&&(W.rootNode.style={width:L.width,height:L.height})):(W=new bt(Y,j),W.rootNode.style={width:L.width,height:L.height},le.set(z.id,W)),W==null||W.setPortalEventTarget((f==null?void 0:f.current)??null),W==null||W.setTooltipContext({column:z,ctxs:s,refTable:l,theme:M});const Xt=((Ie=$t.current)==null?void 0:Ie.id)===z.id?$t.current:void 0,Ht=B.canvas.getBoundingClientRect(),Si={x:Ht.left+L.x,y:Ht.top+L.y,width:L.width,height:L.height};return W==null?void 0:W.render(B,L,Xt,Si)},onHeaderClicked:(T,k)=>{const B=K[T];if(B){if(B.renderHeaderCell){const L=le.get(B.id);if(L){const R=L.getInteractionAtPoint(k.localEventX,k.localEventY);if(L.dispatchPointerEvent("click",k.localEventX,k.localEventY),R)return}}qr(T,k)}}}),[K,s,M,le,f,Tt,qr]),ra=F.useCallback((y,x)=>{const T=K[y];if(!ne||!T){Pt==null||Pt(y,x);return}const k=Vi(T.group),B=Math.max(0,k.indexOf(x.group)),L=k.slice(0,B+1).join("\0"),R=j=>{const Y=K[j];return Y!==void 0&&Vi(Y.group).slice(0,B+1).join("\0")===L};let z=y,it=y;for(;z-1>=0&&R(z-1);)z-=1;for(;it+1<K.length&&R(it+1);)it+=1;const q=[];for(let j=z;j<=it;j+=1){const Y=K[j];Y&&!Y.isServiceColumn&&q.push(Y.id)}q.length>0&&He(q),Pt==null||Pt(y,x)},[ne,K,He,Pt]),Jr=F.useMemo(()=>{const y=new Map;K.forEach((T,k)=>{if(T.isServiceColumn)return;const B=ct.isActiveHeaderColumn(k)||ke.has(k)||Pe.has(k)||Be;Vi(T.group).forEach(L=>{if(L==="")return;const R=y.get(L);y.set(L,(R??!0)&&B)})});const x=new Set;return y.forEach((T,k)=>{T&&x.add(k)}),x},[K,ct,ke,Pe,Be]),oa=F.useCallback(y=>{const x=h==null?void 0:h.get(y),T={name:y,...x&&{spanAlign:x}};return Jr.has(y)?{...T,overrideTheme:{bgGroupHeader:M.selectionServiceActiveBg,bgGroupHeaderHovered:M.bgHeaderSelectedHovered}}:T},[h,Jr,M.selectionServiceActiveBg,M.bgHeaderSelectedHovered]),{glideContainer:Di,isReady:na,renderInContainer:sa}=Uh(It,G),Qr=V==="inside";Yh(It,Qr),Mh({eventTarget:Di??It.current,dataEditorRef:Tt,getCellContent:ce,interactionSessionStore:ft,onCellContextMenuExternal:ae});const{unstickyCallbackRef:to,mergedExperimental:xi}=qh({enabled:v,portalEventTargetRef:f,headerHeight:Nt.headerHeight,groupHeaderHeight:Nt.groupHeaderHeight,experimental:Nt.experimental}),aa=F.useMemo(()=>Qt.mergeRefs(Tt,l,to),[l,to]),ca=F.useMemo(()=>se===void 0?xi:{...xi,enableLowDprHairline:se},[se,xi]),la=F.useCallback(y=>{xe==null||xe(y),y.kind==="cell"?(()=>{const T=y.location[0],k=y.location[1],B=t[k],L=K[T];if(!B||!L||L.isServiceColumn){Le(null);return}Le({colInd:T,rowInd:k})})():Le(null),y.kind==="group-header"?(()=>{if(typeof y.group!="string"){Ut.current=null;return}Ut.current={id:y.group,x:y.localEventX,y:y.localEventY}})():Ut.current=null,y.kind==="header"?(()=>{var L,R;const T=y.location[0],k=y.location[1],B=K[T];if(!B||!(B!=null&&B.renderHeaderCell)){$t.current=null;return}$t.current={id:B.id,x:y.localEventX,y:y.localEventY},(R=(L=Tt.current)==null?void 0:L.updateCells)==null||R.call(L,[{cell:[T,k]}])})():$t.current=null,$t.current=null,Ut.current=null},[K,xe,t,Le]),eo={dataEditorRef:Tt,rowCount:t.length,columnCount:K.length,headerAndGroupHeaderRowsCount:1+(Nt.groupHeaderHeight??[]).length};ps(eo),Fs(eo);const ha=F.useMemo(()=>u?(x,T)=>{var L,R;const k=(L=K[x])==null?void 0:L.id,B=(R=K[T])==null?void 0:R.id;typeof k!="string"||typeof B!="string"||u(k,B)}:void 0,[K,u]),da=F.useMemo(()=>{if(d)return(y,x)=>{var Ht;const T=d(y);if(T==="default")return x();if("defaultWithCustomGroupName"in T)return x(T.defaultWithCustomGroupName);const{groupName:B,rect:L,ctx:R}=y;let z=T;if(!Cr(z))return x();typeof z=="string"&&(z=At.jsx(pe.Container,{style:{width:"100%"},alignItems:"center",children:At.jsx(pe.Text,{children:z})}));const it=B,q=si({element:z,idPrefix:it,theme:M}),j=new bt(q,it);j.rootNode.style={width:L.width,height:L.height},j.setPortalEventTarget((f==null?void 0:f.current)??null),jr.set(it,j);const Y=((Ht=Ut.current)==null?void 0:Ht.id)===it?Ut.current:void 0,W=R.canvas.getBoundingClientRect(),Xt={x:W.left+L.x,y:W.top+L.y,width:L.width,height:L.height};return j.render(R,L,Y,Xt)}},[jr,d,M,f]),ua=F.useMemo(()=>{const y=!!(N!=null&&N.size),x=Gt?bi:void 0;if(!Ot&&!y&&x===void 0&&Wt===void 0)return;const T=M.bgRowHovered;return k=>{if(k===Wt){const B=k===x;return{bgCell:Xo(M,{rowHover:B,checkboxChecked:(N==null?void 0:N.has(k))??!1}),accentLight:B?M.selectionActiveCheckboxHoveredBg:M.selectionActiveCheckboxBg}}if(N!=null&&N.has(k)){const B=k===x;return{bgCell:B?M.bgSelectedRowHovered:M.selectionCheckboxBg,accentLight:B?M.selectionActiveCheckboxHoveredBg:M.selectionActiveCheckboxBg}}return k===x?{bgCell:T,accentLight:M.selectionActiveHoveredBg}:{}}},[Ot,M.selectionCheckboxBg,M.bgRowHovered,M.bgSelectedRowHovered,M.bgSelectedRowActiveHovered,M.selectionActiveCheckboxBg,M.selectionActiveCheckboxHoveredBg,M.selectionActiveHoveredBg,N,Gt,bi,Wt]),{onItemHovered:fa,hideTooltip:ga}=Kh({columnsLast:K,rows:t,ctxs:s,refTable:l,theme:M,portalEventTargetRef:f,externalOnItemHovered:g,onHoverRowChange:Ks},Tt);Te.current=ga;const Ca=As({theme:M,cellsSelectionMode:Ft,selection:zt,serviceColumnsCount:ct.leadingServiceColumnsCount,activeDataRange:ct.activeDataRange,outlineRange:ct.outlineRange,checkboxSelectedRowIndexes:N,errorCellRanges:qs,highlightRegionsExternal:rt,selectedColumnIndexes:$s,headerSelectedRowIndexes:Yr,activeRow:Wt,totalRows:t.length+Ot,columnsCount:Lt.length,isRowHoverEnabled:Gt,hoverRow:bi,dataRowsCount:t.length}),va=F.useMemo(()=>{if(!(!D&&!P&&!w))return{...D,...P?{position:"relative"}:void 0,...w?{height:"100%",minHeight:0}:void 0}},[D,P,w]);return At.jsxs("div",{ref:ta,className:S,style:va,children:[Qr?Ze.createPortal(At.jsx($i,{ref:Ai,onAnimationEndCapture:y=>y.stopPropagation(),id:"portal"}),(It==null?void 0:It.current)??document.body):Ze.createPortal(At.jsx($i,{id:"portal",ref:Ai}),document.body),Ze.createPortal(At.jsx($i,{id:"portal2"}),document.body),!w&&At.jsx(Zh,{ref:aa,className:"gdg-table",portalElementRef:Ai,theme:M,getRowThemeOverride:ua,onHeaderClicked:ia,onGroupHeaderClicked:ra,onMouseMove:la,drawHeader:ea,drawGroupHeader:da,getGroupDetails:oa,getCellContent:ce,columns:K,rows:t.length+Ot,freezeTrailingRows:Ot,freezeColumns:a,minColumnWidth:m,maxColumnAutoWidth:b,maxColumnWidth:p,columnSelect:"none",columnSelectionBlending:"exclusive",drawFocusRing:Us,gridSelection:zt,onGridSelectionChange:Xs,onSelectionCleared:Vs,width:o??"100%",onColumnMoved:ha,onColumnResize:C?_s:void 0,customRenderers:Qs,rowHeight:Is,highlightRegions:Ca,rangeSelect:Ws,smoothScrollX:!0,smoothScrollY:!0,headerHeight:ei,onCellClicked:js,onCellContextMenu:Js,onItemHovered:fa,onVisibleRegionChanged:Zs,...Nt,experimental:ca,keybindings:{...Nt.keybindings,copy:!1,paste:!1},onPaste:!1}),P,_,na&&Di&&(H==null?void 0:H({containerElement:Di,renderInContainer:sa}))]})};exports.BUTTON_PADDING_Y=re;exports.CACHE_SEPARATOR=xr;exports.CANVAS_CELL_KIND=vi;exports.CANVAS_PORTAL_EVENT=oi;exports.Canvas=pe;exports.CanvasAbsoluteContainer=za;exports.CanvasAvatar=ye;exports.CanvasAvatarGroup=mr;exports.CanvasBadge=_n;exports.CanvasButton=Rn;exports.CanvasChevron=xc;exports.CanvasContainer=dt;exports.CanvasEmbedIconButton=ir;exports.CanvasHoverController=pr;exports.CanvasIcon=Nn;exports.CanvasIconButton=On;exports.CanvasImage=Ir;exports.CanvasLeaf=vt;exports.CanvasLink=Un;exports.CanvasNode=_t;exports.CanvasRect=Xn;exports.CanvasRegistry=hn;exports.CanvasRoot=Xa;exports.CanvasSkeleton=Yn;exports.CanvasText=Mr;exports.CellCanvasRoot=bt;exports.DANGER_COLOR=Dr;exports.DANGER_TEXT_COLOR=Ki;exports.DEFAULT_ACCENT_FG=be;exports.DEFAULT_BORDER_WIDTH=Et;exports.DEFAULT_BUTTON_RADIUS=br;exports.DEFAULT_CURSOR=Zn;exports.DEFAULT_HEADER_HEIGHT=ei;exports.DEFAULT_ICON_SIZE=Cn;exports.DEFAULT_ICON_SPACING=Ar;exports.DEFAULT_ROW_HEIGHT=Ko;exports.DEFAULT_SECONDARY_HOVER=vn;exports.DEFAULT_SIZE=gi;exports.DEFAULT_TEXT_PADDING=oc;exports.DEFAULT_VIEW=Ci;exports.DISABLED_BG_COLOR=Fn;exports.DISABLED_BORDER_COLOR=pn;exports.DISABLED_TEXT_COLOR=qi;exports.DrawBatcher=ui;exports.EMPTY_CELL_OBJ=Ea;exports.FlexBox=St;exports.FlexElement=Qo;exports.FlexTreeBuilder=on;exports.HEX_COLOR_CHAR_CODE=yn;exports.HEX_COLOR_PREFIX=mn;exports.ICON_SIZE_ADJUSTMENT=oe;exports.IconSpriteManager=En;exports.LEGACY_HOVER_CURSOR=jn;exports.LIGHTEN_AMOUNT=Sr;exports.LayoutReconciler=nn;exports.MAX_ICON_SIZE=yr;exports.POINTER_CANDIDATE_KEYS=qn;exports.PositionResolver=Dt;exports.RELATIVE_COORD_TOLERANCE=Fe;exports.RootBridge=rh;exports.RootFlexBox=Fr;exports.SIZES=qo;exports.SIZE_CONFIG=at;exports.SizeAccumulator=di;exports.TABLE_GLIDE_SIZES=wa;exports.TABLE_STATE_COLORS=E;exports.THEME=td;exports.TableGlide=fd;exports.VIEW_COLORS=fi;exports.buildButtonViewColors=gn;exports.buildCanvasTree=si;exports.buildCellId=te;exports.calculateButtonWidth=Tr;exports.calculateContentWidth=Hr;exports.canvasCellRenderer=$l;exports.clearButtonCaches=nc;exports.clearIconCache=Xl;exports.createCanvasCell=Kn;exports.createCanvasCellRenderer=Nr;exports.createEmptyCellGlide=Jt;exports.createNormalCanvasInteraction=ln;exports.createRafUpdate=zr;exports.createSvgDataUrl=er;exports.createTextCellGlide=ai;exports.defaultBatcher=Ua;exports.defaultIconManager=wt;exports.dispatchCanvasPortalHover=jt;exports.drawButton=Pn;exports.drawButtonWithView=Ln;exports.drawEmbedIconButtonWithView=In;exports.drawIcon=kn;exports.drawIcon$1=Ct;exports.drawIconButton=Lr;exports.drawIconButtonWithView=Mn;exports.drawIconDirect=uc;exports.findBlockOrigin=Ps;exports.flexBoxLayout=Ia;exports.fontStyles=ii;exports.getCachedTextWidth=wr;exports.getCellIndices=Je;exports.getDpr=Qe;exports.getHoverState=as;exports.getIconCacheSize=Vl;exports.getIconImageDirect=Bn;exports.getIconSprite=Tn;exports.getIconSpriteStats=hc;exports.getRelativePointerPosition=Jn;exports.getRowHeightBySize=je;exports.getTheme=$r;exports.handleCanvasRootClick=es;exports.handleCanvasRootHover=cs;exports.handleCellClick=rs;exports.handleClickHandlers=is;exports.hashString=Sn;exports.isAbsoluteCoords=Qn;exports.isCanvasCell=_r;exports.isCanvasContent=Cr;exports.isCanvasEl=Fi;exports.isCanvasString=Gr;exports.isGlideCellObj=Dh;exports.isGlideGridCellObj=ms;exports.isHoveringBounds=Rt;exports.isObject=Ah;exports.isPointInArea=Pr;exports.isPortalHoverLocked=Bl;exports.isPrimitive=Wr;exports.isReactIcon=xt;exports.isRelativeCoords=ts;exports.isValueEmpty=ys;exports.lightenColor=Er;exports.lightenColorCached=bn;exports.lockPortalHover=kl;exports.normalizeCanvasInteraction=cn;exports.normalizeDimensionValue=ur;exports.normalizeHoverPoint=xn;exports.normalizeIcon=mt;exports.onAnyIconLoad=wn;exports.performCanvasClick=Rr;exports.performCanvasPointerDownIntent=ds;exports.preloadIconSprites=Hn;exports.queryGlideElements=Ts;exports.reactIconToSvg=us;exports.rectContainsCell=bs;exports.registerIconDefinitions=lc;exports.resetIconSpriteCache=dc;exports.resolveButtonColors=kr;exports.resolveClickPoint=Qi;exports.resolveDangerColors=Dn;exports.resolvePaddingBox=tn;exports.resolvePaddingBox$1=an;exports.resolvePrimaryColors=Ji;exports.resolveSecondaryColors=An;exports.resolveViewColors=Br;exports.retrieveRenderData=ee;exports.storeRenderData=ns;exports.subscribeToCanvasPortalHover=Ol;exports.subscribeToPortalHoverLock=Pl;exports.toRelativePoint=tr;exports.updateGridCells=Or;exports.updateHoverState=ss;exports.updateHoverStateIfNeeded=ls;exports.useCanvasRegistry=bh;exports.useColoringLayers=As;exports.useFontLoadRedraw=Fs;exports.useIconLoadRedraw=ps;exports.useNativeGridSelection=Ds;exports.useSelectionGeometry=xs;exports.useTableSelectionSystem=Ss;exports.waitForCanvasFonts=Cs;exports.waitForDocumentFonts=gs;exports.waitForFonts=vs;
@@ -5,7 +5,7 @@ import { s as S } from "./EXTERNAL_PACKAGE_MODULE_sdds_finai_high_contrast__ligh
5
5
  import { jsxs as l, Fragment as d, jsx as o } from "react/jsx-runtime";
6
6
  import { getCustomScrollbar as c } from "../mixins/index.mjs";
7
7
  import "@salutejs/sdds-finai";
8
- import { s as A } from "./utils-u1KJ37g3.mjs";
8
+ import { x as A } from "./utils-Hu77fGGe.mjs";
9
9
  import { useEffect as C } from "react";
10
10
  import O, { css as h, createGlobalStyle as i } from "styled-components";
11
11
  import { outlineInfo as R, dataInfoGradient as $, outlineWarning as W, dataWarningGradient as F, outlineNegative as j, dataNegativeGradient as H, outlinePositive as M, dataPositiveGradient as z, textPrimary as V, shadowDownHardS as X } from "@salutejs/sdds-themes/tokens/sdds_finai";
@@ -55,7 +55,7 @@ function G(t, e) {
55
55
  return t.join(`
56
56
  `).replace(/:root/g, e);
57
57
  }
58
- const P = {
58
+ const x = {
59
59
  light: f,
60
60
  dark: b,
61
61
  highContrastLight: S,
@@ -87,7 +87,7 @@ const P = {
87
87
  }, et = i(["", ""], ({
88
88
  $theme: t,
89
89
  $scopeSelector: e
90
- }) => e ? G(P[t], e) : ""), ut = ({
90
+ }) => e ? G(x[t], e) : ""), ut = ({
91
91
  theme: t = "light",
92
92
  scopeSelector: e
93
93
  }) => /* @__PURE__ */ l(d, { children: [
@@ -98,7 +98,7 @@ const P = {
98
98
  ] }), it = ({
99
99
  isLightBase: t,
100
100
  theme: e
101
- }) => h(["", " ", " ", " ", ""], G(P[e], "&"), c({
101
+ }) => h(["", " ", " ", " ", ""], G(x[e], "&"), c({
102
102
  theme: t ? "light" : "dark"
103
103
  }), I, L()), at = O.div.withConfig({
104
104
  displayName: "DefaultGlobalStyle__StyledTestRootIsolatedThemeProviderLayout"
@@ -112,10 +112,10 @@ const P = {
112
112
  theme: t = "light",
113
113
  className: e,
114
114
  children: r,
115
- ...x
115
+ ...P
116
116
  }) => {
117
117
  const N = t === "light" || t === "highContrastLight" || t === "betaCoreLight";
118
- return /* @__PURE__ */ o(at, { className: A("TestRootIsolatedThemeProviderLayout", e), ...x, isLightBase: N, activeTheme: t, children: r });
118
+ return /* @__PURE__ */ o(at, { className: A("TestRootIsolatedThemeProviderLayout", e), ...P, isLightBase: N, activeTheme: t, children: r });
119
119
  };
120
120
  export {
121
121
  ft as D,
@@ -1,2 +1,2 @@
1
- "use strict";const T=require("@salutejs/plasma-typo"),c=require("@salutejs/sdds-themes"),l=require("./vendor-BSEdLAmZ.cjs"),m=require("./EXTERNAL_PACKAGE_MODULE_sdds_finai_high_contrast__light_theme-75fNjCa0.cjs"),e=require("react/jsx-runtime"),_=require("../mixins/index.cjs");require("@salutejs/sdds-finai");const w=require("./utils-ChDQGRjv.cjs"),p=require("react"),a=require("styled-components"),i=require("@salutejs/sdds-themes/tokens/sdds_finai"),s="dais-ui__",h="notification-wrapper",R="notification-text",S="notification-title",n={wrapper:`${s}notification`,positive:`${s}notification--positive`,negative:`${s}notification--negative`,warning:`${s}notification--warning`,info:`${s}notification--info`,hasBackground:`${s}notification--has-background`,hasTitleColor:`${s}notification--has-title-color`,hasBorderColor:`${s}notification--has-border-color`},E={positive:{background:i.dataPositiveGradient,borderColor:i.outlinePositive},negative:{background:i.dataNegativeGradient,borderColor:i.outlineNegative},warning:{background:i.dataWarningGradient,borderColor:i.outlineWarning},info:{background:i.dataInfoGradient,borderColor:i.outlineInfo}},y=()=>Object.entries(E).map(([t,o])=>{const r=n[t];return a.css([".",".",":not(.","){.","{overflow:hidden;}.notification-buttons-wrapper,.",",.","{z-index:1;}.","::after{content:'';position:absolute;z-index:0;height:600px;width:600px;top:0;right:0;transform:translate(50%,-80%);background:",";pointer-events:none;}}.",".",":not(.","){.","{color:",";}}.",".","{.","{border:1px solid ",";box-shadow:",";}}"],n.wrapper,r,n.hasBackground,h,R,S,h,o.background,n.wrapper,r,n.hasTitleColor,S,i.textPrimary,n.wrapper,r,h,o.borderColor,i.shadowDownHardS)}).flat(),f="tooltip--fullWidth",C=a.createGlobalStyle(T.standard),L=a.createGlobalStyle(T.compatible),A=a.createGlobalStyle(c.sdds_finai__light),x=a.createGlobalStyle(["*{","}"],()=>_.getCustomScrollbar({theme:"light"})),g=a.createGlobalStyle(["*{","}"],()=>_.getCustomScrollbar({theme:"dark"})),G=a.createGlobalStyle(["*{","}"],()=>y()),b=a.css([".popover-wrapper:has(> .","){width:100%;}"],f),d=a.createGlobalStyle(["",""],b),v=a.createGlobalStyle(c.sdds_finai__dark),N=a.createGlobalStyle(m.sdds_finai_high_contrast__light_2),O=a.createGlobalStyle(l.sdds_finai_high_contrast__dark_2),q=a.createGlobalStyle(l.sdds_finai_beta_core__light_2),F=a.createGlobalStyle(l.sdds_finai_beta_core__dark_2),W=()=>(p.useEffect(()=>(document.documentElement.setAttribute("data-theme","dark"),()=>{document.documentElement.removeAttribute("data-theme")}),[]),e.jsxs(e.Fragment,{children:[e.jsx(C,{}),e.jsx(L,{}),e.jsx(v,{}),e.jsx(g,{}),e.jsx(d,{})]}));function u(t,o){return t.join(`
1
+ "use strict";const T=require("@salutejs/plasma-typo"),c=require("@salutejs/sdds-themes"),l=require("./vendor-BSEdLAmZ.cjs"),m=require("./EXTERNAL_PACKAGE_MODULE_sdds_finai_high_contrast__light_theme-75fNjCa0.cjs"),e=require("react/jsx-runtime"),_=require("../mixins/index.cjs");require("@salutejs/sdds-finai");const w=require("./utils-OQNruMpn.cjs"),p=require("react"),a=require("styled-components"),i=require("@salutejs/sdds-themes/tokens/sdds_finai"),s="dais-ui__",h="notification-wrapper",R="notification-text",S="notification-title",n={wrapper:`${s}notification`,positive:`${s}notification--positive`,negative:`${s}notification--negative`,warning:`${s}notification--warning`,info:`${s}notification--info`,hasBackground:`${s}notification--has-background`,hasTitleColor:`${s}notification--has-title-color`,hasBorderColor:`${s}notification--has-border-color`},E={positive:{background:i.dataPositiveGradient,borderColor:i.outlinePositive},negative:{background:i.dataNegativeGradient,borderColor:i.outlineNegative},warning:{background:i.dataWarningGradient,borderColor:i.outlineWarning},info:{background:i.dataInfoGradient,borderColor:i.outlineInfo}},y=()=>Object.entries(E).map(([t,o])=>{const r=n[t];return a.css([".",".",":not(.","){.","{overflow:hidden;}.notification-buttons-wrapper,.",",.","{z-index:1;}.","::after{content:'';position:absolute;z-index:0;height:600px;width:600px;top:0;right:0;transform:translate(50%,-80%);background:",";pointer-events:none;}}.",".",":not(.","){.","{color:",";}}.",".","{.","{border:1px solid ",";box-shadow:",";}}"],n.wrapper,r,n.hasBackground,h,R,S,h,o.background,n.wrapper,r,n.hasTitleColor,S,i.textPrimary,n.wrapper,r,h,o.borderColor,i.shadowDownHardS)}).flat(),f="tooltip--fullWidth",C=a.createGlobalStyle(T.standard),L=a.createGlobalStyle(T.compatible),A=a.createGlobalStyle(c.sdds_finai__light),x=a.createGlobalStyle(["*{","}"],()=>_.getCustomScrollbar({theme:"light"})),g=a.createGlobalStyle(["*{","}"],()=>_.getCustomScrollbar({theme:"dark"})),G=a.createGlobalStyle(["*{","}"],()=>y()),b=a.css([".popover-wrapper:has(> .","){width:100%;}"],f),d=a.createGlobalStyle(["",""],b),v=a.createGlobalStyle(c.sdds_finai__dark),N=a.createGlobalStyle(m.sdds_finai_high_contrast__light_2),O=a.createGlobalStyle(l.sdds_finai_high_contrast__dark_2),q=a.createGlobalStyle(l.sdds_finai_beta_core__light_2),F=a.createGlobalStyle(l.sdds_finai_beta_core__dark_2),W=()=>(p.useEffect(()=>(document.documentElement.setAttribute("data-theme","dark"),()=>{document.documentElement.removeAttribute("data-theme")}),[]),e.jsxs(e.Fragment,{children:[e.jsx(C,{}),e.jsx(L,{}),e.jsx(v,{}),e.jsx(g,{}),e.jsx(d,{})]}));function u(t,o){return t.join(`
2
2
  `).replace(/:root/g,o)}const k={light:c.sdds_finai__light,dark:c.sdds_finai__dark,highContrastLight:m.sdds_finai_high_contrast__light_2,highContrastDark:l.sdds_finai_high_contrast__dark_2,betaCoreLight:l.sdds_finai_beta_core__light_2,betaCoreDark:l.sdds_finai_beta_core__dark_2},$={light:A,dark:v,highContrastLight:N,highContrastDark:O,betaCoreLight:q,betaCoreDark:F},B=({theme:t="light"})=>{p.useEffect(()=>{document.documentElement.setAttribute("data-theme",t)},[t]);const o=$[t],r=t==="light"||t==="highContrastLight"||t==="betaCoreLight";return e.jsxs(e.Fragment,{children:[e.jsx(C,{}),e.jsx(L,{}),e.jsx(o,{}),r?e.jsx(x,{}):e.jsx(g,{}),e.jsx(d,{}),e.jsx(G,{})]})},M=a.createGlobalStyle(["",""],({$theme:t,$scopeSelector:o})=>o?u(k[t],o):""),H=({theme:t="light",scopeSelector:o})=>{const r=t==="light"||t==="highContrastLight"||t==="betaCoreLight";return e.jsxs(e.Fragment,{children:[e.jsx(M,{$theme:t,$scopeSelector:o}),r?e.jsx(x,{}):e.jsx(g,{}),e.jsx(d,{}),e.jsx(G,{})]})},D=({isLightBase:t,theme:o})=>a.css([""," "," "," ",""],u(k[o],"&"),_.getCustomScrollbar({theme:t?"light":"dark"}),b,y()),I=a.div.withConfig({displayName:"DefaultGlobalStyle__StyledTestRootIsolatedThemeProviderLayout"})(["",""],({isLightBase:t,activeTheme:o})=>D({isLightBase:t,theme:o})),U=({theme:t="light",className:o,children:r,...j})=>{const P=t==="light"||t==="highContrastLight"||t==="betaCoreLight";return e.jsx(I,{className:w.mCls("TestRootIsolatedThemeProviderLayout",o),...j,isLightBase:P,activeTheme:t,children:r})};exports.DarkGlobalStyle=W;exports.GlobalPopoverStyles=d;exports.GlobalStyle=B;exports.StyledTestRootIsolatedThemeProviderLayout=I;exports.TOOLTIP_FULL_WIDTH_CLASS=f;exports.TestGlobalIsolatedStyleWithReplace=H;exports.TestRootIsolatedThemeProviderLayout=U;exports.cls=n;exports.scopeTheme=u;exports.styledTestRootIsolatedThemeProviderLayoutMixin=D;exports.testGlobalPopoverStylesMixin=b;