@daisforge/ui 1.12.2 → 1.14.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 (395) hide show
  1. package/chunks/AnalyticalWidget-B6czTLSw.cjs +43 -0
  2. package/chunks/{AnalyticalWidget-CBi-2MtJ.mjs → AnalyticalWidget-BWggL9xa.mjs} +144 -144
  3. package/chunks/{ApprovalCenter-oACSjXxE.cjs → ApprovalCenter-DG3YvEkY.cjs} +1 -1
  4. package/chunks/{ApprovalCenter-ClCoA3cr.mjs → ApprovalCenter-XCXGHaEP.mjs} +2 -2
  5. package/chunks/{BlockTitle-CylSY2DM.cjs → BlockTitle-3YmyxJHJ.cjs} +1 -1
  6. package/chunks/{BlockTitle-DTaIqiFF.mjs → BlockTitle-DDWF1ZeV.mjs} +2 -2
  7. package/chunks/{Container-CV4sT-bB.mjs → Container-BlAaXm8V.mjs} +1 -1
  8. package/chunks/{Container-D8Bcg69e.cjs → Container-CJX4h6tb.cjs} +1 -1
  9. package/chunks/{EmptyState-Bct6Wrxv.mjs → EmptyState-BB3duGQw.mjs} +1 -1
  10. package/chunks/{EmptyState-BD6Ic-OX.cjs → EmptyState-Du-RIjie.cjs} +1 -1
  11. package/chunks/{FiltersActions-C3yWFtQT.mjs → FiltersActions-C38x0y5T.mjs} +4 -4
  12. package/chunks/{FiltersActions-D1aQXh5d.cjs → FiltersActions-CvAwGV9F.cjs} +1 -1
  13. package/chunks/{FormSegmentGroup-C8kROjlQ.mjs → FormSegmentGroup-9b3w4_KU.mjs} +1 -1
  14. package/chunks/{FormSegmentGroup-DIaBZRWv.cjs → FormSegmentGroup-DcOPPn3M.cjs} +1 -1
  15. package/chunks/{GridDND-rVSi0xX1.mjs → GridDND-BnK1dEhJ.mjs} +2 -2
  16. package/chunks/{GridDND-BP_H26We.cjs → GridDND-CVAlpElj.cjs} +1 -1
  17. package/chunks/{LeftPanel-CgexykUg.cjs → LeftPanel-Ciehaz28.cjs} +1 -1
  18. package/chunks/{LeftPanel-bKmeEOHx.mjs → LeftPanel-DuIinlBm.mjs} +1 -1
  19. package/chunks/ListOfFilters-Cji5UH2J.mjs +260 -0
  20. package/chunks/ListOfFilters-DNzfSG-p.cjs +1 -0
  21. package/chunks/{MassActions-D4nb1_gx.mjs → MassActions-BOG04zip.mjs} +3 -3
  22. package/chunks/{MassActions-BCgI08G9.cjs → MassActions-DCk9APKP.cjs} +1 -1
  23. package/chunks/{PageTitle-BC0PnHgQ.cjs → PageTitle-BIllremL.cjs} +1 -1
  24. package/chunks/{PageTitle-B0tuR3fU.mjs → PageTitle-CQ_6jZ0x.mjs} +2 -2
  25. package/chunks/{SplitView-OUGciQ51.cjs → SplitView-DdLshcIk.cjs} +1 -1
  26. package/chunks/{SplitView-C8de8YKV.mjs → SplitView-Dm62AAZj.mjs} +1 -1
  27. package/chunks/Stories-dFpUqS5T.mjs +673 -0
  28. package/chunks/Stories-e_CX_1CS.cjs +1 -0
  29. package/chunks/Table-CrJFfavU.cjs +31 -0
  30. package/chunks/{Table-Bj2se1hR.mjs → Table-f0CmcIhI.mjs} +1161 -1161
  31. package/chunks/{TableCanvas-Y53zQ7M0.mjs → TableCanvas-1bi1WWeP.mjs} +2561 -2548
  32. package/chunks/TableCanvas-DqF5YxEY.cjs +30 -0
  33. package/chunks/TableGlide-CGAh5x3Q.cjs +1 -0
  34. package/chunks/{TableGlide-CuBMIM6Q.mjs → TableGlide-DGKw3w0G.mjs} +2184 -2126
  35. package/chunks/{styles-Dd4uEa27.mjs → styles-BMXAIiBk.mjs} +1 -1
  36. package/chunks/{styles-kPI9R7DO.cjs → styles-DwCVRGsC.cjs} +1 -1
  37. package/chunks/{utils-C5SQhoON.mjs → utils-D4eJY8pa.mjs} +81 -74
  38. package/chunks/utils-DvDFSlCG.cjs +25 -0
  39. package/components/AiAgentPopover/index.cjs +1 -1
  40. package/components/AiAgentPopover/index.mjs +1 -1
  41. package/components/AnalyticalWidget/components/AnalyticalWidgetChips/AnalyticalWidgetChipsGroup.styled.d.ts +7 -0
  42. package/components/AnalyticalWidget/components/AnalyticalWidgetChips/index.cjs +1 -1
  43. package/components/AnalyticalWidget/components/AnalyticalWidgetChips/index.mjs +1 -1
  44. package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/index.cjs +1 -1
  45. package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/index.mjs +1 -1
  46. package/components/AnalyticalWidget/index.cjs +1 -1
  47. package/components/AnalyticalWidget/index.mjs +1 -1
  48. package/components/ApprovalCenter/components/index.cjs +1 -1
  49. package/components/ApprovalCenter/components/index.mjs +1 -1
  50. package/components/ApprovalCenter/index.cjs +1 -1
  51. package/components/ApprovalCenter/index.mjs +1 -1
  52. package/components/AutocompleteSearch/index.cjs +1 -1
  53. package/components/AutocompleteSearch/index.mjs +2 -2
  54. package/components/BlockGradientScroll/index.cjs +1 -1
  55. package/components/BlockGradientScroll/index.mjs +1 -1
  56. package/components/BlockTitle/index.cjs +1 -1
  57. package/components/BlockTitle/index.mjs +1 -1
  58. package/components/BlockTitle/utils/index.cjs +1 -1
  59. package/components/BlockTitle/utils/index.mjs +1 -1
  60. package/components/Collapse/index.cjs +1 -1
  61. package/components/Collapse/index.mjs +1 -1
  62. package/components/Combobox/index.cjs +1 -1
  63. package/components/Combobox/index.mjs +1 -1
  64. package/components/EmptyState/components/index.cjs +1 -1
  65. package/components/EmptyState/components/index.mjs +1 -1
  66. package/components/EmptyState/index.cjs +1 -1
  67. package/components/EmptyState/index.mjs +1 -1
  68. package/components/GridDND/index.cjs +1 -1
  69. package/components/GridDND/index.mjs +1 -1
  70. package/components/GridDND/utils/index.cjs +1 -1
  71. package/components/GridDND/utils/index.mjs +1 -1
  72. package/components/IconButton/index.cjs +1 -1
  73. package/components/IconButton/index.mjs +1 -1
  74. package/components/LeftPanel/components/index.cjs +1 -1
  75. package/components/LeftPanel/components/index.mjs +1 -1
  76. package/components/LeftPanel/hooks/index.cjs +1 -1
  77. package/components/LeftPanel/hooks/index.mjs +1 -1
  78. package/components/LeftPanel/index.cjs +1 -1
  79. package/components/LeftPanel/index.mjs +1 -1
  80. package/components/LeftPanel/utils/index.cjs +1 -1
  81. package/components/LeftPanel/utils/index.mjs +1 -1
  82. package/components/ListOfFilters/index.cjs +1 -1
  83. package/components/ListOfFilters/index.mjs +1 -1
  84. package/components/ListOfFilters/useSyncTabsScrollArrows.d.ts +3 -0
  85. package/components/MassActions/hooks/index.cjs +1 -1
  86. package/components/MassActions/hooks/index.mjs +1 -1
  87. package/components/MassActions/index.cjs +1 -1
  88. package/components/MassActions/index.mjs +1 -1
  89. package/components/ModalDF/index.cjs +1 -1
  90. package/components/ModalDF/index.mjs +1 -1
  91. package/components/Notification/index.cjs +1 -1
  92. package/components/Notification/index.mjs +2 -2
  93. package/components/PageTitle/index.cjs +1 -1
  94. package/components/PageTitle/index.mjs +1 -1
  95. package/components/PageTitle/utils/index.cjs +1 -1
  96. package/components/PageTitle/utils/index.mjs +1 -1
  97. package/components/PopoverDF/index.cjs +1 -1
  98. package/components/PopoverDF/index.mjs +1 -1
  99. package/components/PopupDF/index.cjs +1 -1
  100. package/components/PopupDF/index.mjs +1 -1
  101. package/components/SplitView/index.cjs +1 -1
  102. package/components/SplitView/index.mjs +1 -1
  103. package/components/SplitView/utils/index.cjs +1 -1
  104. package/components/SplitView/utils/index.mjs +1 -1
  105. package/components/Stories/Stories.types.d.ts +1 -0
  106. package/components/Stories/components/StoriesBanner/index.cjs +1 -1
  107. package/components/Stories/components/StoriesBanner/index.mjs +1 -1
  108. package/components/Stories/components/StoriesContent/index.cjs +1 -1
  109. package/components/Stories/components/StoriesContent/index.mjs +1 -1
  110. package/components/Stories/components/StoriesPreview/index.cjs +1 -1
  111. package/components/Stories/components/StoriesPreview/index.mjs +1 -1
  112. package/components/Stories/components/StoriesProgress/index.cjs +1 -1
  113. package/components/Stories/components/StoriesProgress/index.mjs +1 -1
  114. package/components/Stories/components/StoriesViewer/index.cjs +1 -1
  115. package/components/Stories/components/StoriesViewer/index.mjs +1 -1
  116. package/components/Stories/index.cjs +1 -1
  117. package/components/Stories/index.mjs +1 -1
  118. package/components/Stories/store/StoriesContext.d.ts +1 -0
  119. package/components/Table/components/TableDropdown/index.cjs +1 -1
  120. package/components/Table/components/TableDropdown/index.mjs +1 -1
  121. package/components/Table/feature-collapse-table/index.cjs +1 -1
  122. package/components/Table/feature-collapse-table/index.mjs +1 -1
  123. package/components/Table/feature-column-control/ColumnsList/index.cjs +1 -1
  124. package/components/Table/feature-column-control/ColumnsList/index.mjs +1 -1
  125. package/components/Table/feature-column-control/index.cjs +1 -1
  126. package/components/Table/feature-column-control/index.mjs +1 -1
  127. package/components/Table/feature-columns-grouping/index.cjs +1 -1
  128. package/components/Table/feature-columns-grouping/index.mjs +1 -1
  129. package/components/Table/feature-context-menu/index.cjs +1 -1
  130. package/components/Table/feature-context-menu/index.mjs +1 -1
  131. package/components/Table/feature-edit/index.cjs +1 -1
  132. package/components/Table/feature-edit/index.mjs +1 -1
  133. package/components/Table/feature-filtering/combobox/index.cjs +1 -1
  134. package/components/Table/feature-filtering/combobox/index.mjs +1 -1
  135. package/components/Table/feature-filtering/filter-list-block/index.cjs +1 -1
  136. package/components/Table/feature-filtering/filter-list-block/index.mjs +1 -1
  137. package/components/Table/feature-filtering/header-filter-button/index.cjs +1 -1
  138. package/components/Table/feature-filtering/header-filter-button/index.mjs +1 -1
  139. package/components/Table/feature-filtering/index.cjs +1 -1
  140. package/components/Table/feature-filtering/index.mjs +1 -1
  141. package/components/Table/feature-filtering/sidebar-filter-block/index.cjs +1 -1
  142. package/components/Table/feature-filtering/sidebar-filter-block/index.mjs +1 -1
  143. package/components/Table/feature-infinity-scroll/index.cjs +1 -1
  144. package/components/Table/feature-infinity-scroll/index.mjs +1 -1
  145. package/components/Table/feature-key-text/index.cjs +1 -1
  146. package/components/Table/feature-key-text/index.mjs +1 -1
  147. package/components/Table/feature-pagination/index.cjs +1 -1
  148. package/components/Table/feature-pagination/index.mjs +1 -1
  149. package/components/Table/feature-right-sidebar/index.cjs +1 -1
  150. package/components/Table/feature-right-sidebar/index.mjs +1 -1
  151. package/components/Table/feature-row-detail/index.cjs +1 -1
  152. package/components/Table/feature-row-detail/index.mjs +1 -1
  153. package/components/Table/feature-row-instruments/index.cjs +1 -1
  154. package/components/Table/feature-row-instruments/index.mjs +1 -1
  155. package/components/Table/feature-row-size/index.cjs +1 -1
  156. package/components/Table/feature-row-size/index.mjs +1 -1
  157. package/components/Table/feature-rows-grouping/index.cjs +1 -1
  158. package/components/Table/feature-rows-grouping/index.mjs +1 -1
  159. package/components/Table/feature-searching/index.cjs +1 -1
  160. package/components/Table/feature-searching/index.mjs +1 -1
  161. package/components/Table/feature-select-row/index.cjs +1 -1
  162. package/components/Table/feature-select-row/index.mjs +1 -1
  163. package/components/Table/feature-sorting/index.cjs +1 -1
  164. package/components/Table/feature-sorting/index.mjs +1 -1
  165. package/components/Table/feature-table-settings/index.cjs +1 -1
  166. package/components/Table/feature-table-settings/index.mjs +1 -1
  167. package/components/Table/feature-tree/index.cjs +1 -1
  168. package/components/Table/feature-tree/index.mjs +1 -1
  169. package/components/Table/index.cjs +1 -1
  170. package/components/Table/index.mjs +1 -1
  171. package/components/Table/renders/formatCell/index.cjs +1 -1
  172. package/components/Table/renders/formatCell/index.mjs +1 -1
  173. package/components/Table/styles/index.cjs +1 -1
  174. package/components/Table/styles/index.mjs +1 -1
  175. package/components/Table/table-hooks/index.cjs +1 -1
  176. package/components/Table/table-hooks/index.mjs +1 -1
  177. package/components/Table/types/index.cjs +1 -1
  178. package/components/Table/types/index.mjs +1 -1
  179. package/components/Table/utils/index.cjs +1 -1
  180. package/components/Table/utils/index.mjs +1 -1
  181. package/components/Table/widgets/control-block/index.cjs +1 -1
  182. package/components/Table/widgets/control-block/index.mjs +1 -1
  183. package/components/Table/widgets/control-block/right-side/index.cjs +1 -1
  184. package/components/Table/widgets/control-block/right-side/index.mjs +1 -1
  185. package/components/Table/widgets/index.cjs +1 -1
  186. package/components/Table/widgets/index.mjs +1 -1
  187. package/components/Table/widgets/mass-actions/index.cjs +1 -1
  188. package/components/Table/widgets/mass-actions/index.mjs +1 -1
  189. package/components/TableCanvas/TableGlideInstance/adapters/column/index.cjs +1 -1
  190. package/components/TableCanvas/TableGlideInstance/adapters/column/index.mjs +1 -1
  191. package/components/TableCanvas/TableGlideInstance/adapters/index.cjs +1 -1
  192. package/components/TableCanvas/TableGlideInstance/adapters/index.mjs +1 -1
  193. package/components/TableCanvas/TableGlideInstance/index.cjs +1 -1
  194. package/components/TableCanvas/TableGlideInstance/index.mjs +2 -2
  195. package/components/TableCanvas/TableGlideInstance/type.d.ts +2 -0
  196. package/components/TableCanvas/TableGlideInstance/utils/column/index.cjs +1 -1
  197. package/components/TableCanvas/TableGlideInstance/utils/column/index.mjs +1 -1
  198. package/components/TableCanvas/TableGlideInstance/utils/index.cjs +1 -1
  199. package/components/TableCanvas/TableGlideInstance/utils/index.mjs +1 -1
  200. package/components/TableCanvas/components/SplitIconButton/index.cjs +1 -1
  201. package/components/TableCanvas/components/SplitIconButton/index.mjs +1 -1
  202. package/components/TableCanvas/components/TableDropdown/index.cjs +1 -1
  203. package/components/TableCanvas/components/TableDropdown/index.mjs +1 -1
  204. package/components/TableCanvas/feature-cell-transfer/index.cjs +1 -1
  205. package/components/TableCanvas/feature-cell-transfer/index.mjs +1 -1
  206. package/components/TableCanvas/feature-collapse-table/index.cjs +1 -1
  207. package/components/TableCanvas/feature-collapse-table/index.mjs +1 -1
  208. package/components/TableCanvas/feature-column-control/ColumnsList/index.cjs +1 -1
  209. package/components/TableCanvas/feature-column-control/ColumnsList/index.mjs +1 -1
  210. package/components/TableCanvas/feature-column-control/index.cjs +1 -1
  211. package/components/TableCanvas/feature-column-control/index.mjs +1 -1
  212. package/components/TableCanvas/feature-columns-grouping/index.cjs +1 -1
  213. package/components/TableCanvas/feature-columns-grouping/index.mjs +1 -1
  214. package/components/TableCanvas/feature-columns-grouping/useLastLvlColumnConfig.d.ts +1 -0
  215. package/components/TableCanvas/feature-content-state/index.cjs +1 -1
  216. package/components/TableCanvas/feature-content-state/index.mjs +1 -1
  217. package/components/TableCanvas/feature-context-menu/index.cjs +1 -1
  218. package/components/TableCanvas/feature-context-menu/index.mjs +1 -1
  219. package/components/TableCanvas/feature-edit/index.cjs +1 -1
  220. package/components/TableCanvas/feature-edit/index.mjs +1 -1
  221. package/components/TableCanvas/feature-filtering/combobox/index.cjs +1 -1
  222. package/components/TableCanvas/feature-filtering/combobox/index.mjs +1 -1
  223. package/components/TableCanvas/feature-filtering/filter-list-block/index.cjs +1 -1
  224. package/components/TableCanvas/feature-filtering/filter-list-block/index.mjs +1 -1
  225. package/components/TableCanvas/feature-filtering/header-filter-button/index.cjs +1 -1
  226. package/components/TableCanvas/feature-filtering/header-filter-button/index.mjs +1 -1
  227. package/components/TableCanvas/feature-filtering/index.cjs +1 -1
  228. package/components/TableCanvas/feature-filtering/index.mjs +1 -1
  229. package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.cjs +1 -1
  230. package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.mjs +1 -1
  231. package/components/TableCanvas/feature-infinity-scroll/index.cjs +1 -1
  232. package/components/TableCanvas/feature-infinity-scroll/index.mjs +1 -1
  233. package/components/TableCanvas/feature-key-text/index.cjs +1 -1
  234. package/components/TableCanvas/feature-key-text/index.mjs +1 -1
  235. package/components/TableCanvas/feature-notifications/index.cjs +1 -1
  236. package/components/TableCanvas/feature-notifications/index.mjs +1 -1
  237. package/components/TableCanvas/feature-pagination/index.cjs +1 -1
  238. package/components/TableCanvas/feature-pagination/index.mjs +1 -1
  239. package/components/TableCanvas/feature-popover-table/context/index.cjs +1 -1
  240. package/components/TableCanvas/feature-popover-table/context/index.mjs +1 -1
  241. package/components/TableCanvas/feature-popover-table/hooks/index.cjs +1 -1
  242. package/components/TableCanvas/feature-popover-table/hooks/index.mjs +1 -1
  243. package/components/TableCanvas/feature-popover-table/index.cjs +1 -1
  244. package/components/TableCanvas/feature-popover-table/index.mjs +1 -1
  245. package/components/TableCanvas/feature-popover-table/utils/index.cjs +1 -1
  246. package/components/TableCanvas/feature-popover-table/utils/index.mjs +1 -1
  247. package/components/TableCanvas/feature-right-sidebar/index.cjs +1 -1
  248. package/components/TableCanvas/feature-right-sidebar/index.mjs +1 -1
  249. package/components/TableCanvas/feature-row-detail/index.cjs +1 -1
  250. package/components/TableCanvas/feature-row-detail/index.mjs +1 -1
  251. package/components/TableCanvas/feature-row-instruments/index.cjs +1 -1
  252. package/components/TableCanvas/feature-row-instruments/index.mjs +1 -1
  253. package/components/TableCanvas/feature-row-markers/index.cjs +1 -1
  254. package/components/TableCanvas/feature-row-markers/index.mjs +1 -1
  255. package/components/TableCanvas/feature-row-size/index.cjs +1 -1
  256. package/components/TableCanvas/feature-row-size/index.mjs +1 -1
  257. package/components/TableCanvas/feature-rows-grouping/index.cjs +1 -1
  258. package/components/TableCanvas/feature-rows-grouping/index.mjs +1 -1
  259. package/components/TableCanvas/feature-searching/index.cjs +1 -1
  260. package/components/TableCanvas/feature-searching/index.mjs +1 -1
  261. package/components/TableCanvas/feature-select-row/index.cjs +1 -1
  262. package/components/TableCanvas/feature-select-row/index.mjs +1 -1
  263. package/components/TableCanvas/feature-sorting/index.cjs +1 -1
  264. package/components/TableCanvas/feature-sorting/index.mjs +1 -1
  265. package/components/TableCanvas/feature-table-settings/index.cjs +1 -1
  266. package/components/TableCanvas/feature-table-settings/index.mjs +1 -1
  267. package/components/TableCanvas/feature-tooltip/index.cjs +1 -1
  268. package/components/TableCanvas/feature-tooltip/index.mjs +1 -1
  269. package/components/TableCanvas/feature-tooltip/utils/index.cjs +1 -1
  270. package/components/TableCanvas/feature-tooltip/utils/index.mjs +1 -1
  271. package/components/TableCanvas/feature-tree/index.cjs +1 -1
  272. package/components/TableCanvas/feature-tree/index.mjs +1 -1
  273. package/components/TableCanvas/index.cjs +1 -1
  274. package/components/TableCanvas/index.mjs +2 -2
  275. package/components/TableCanvas/renders/formatCell/index.cjs +1 -1
  276. package/components/TableCanvas/renders/formatCell/index.mjs +1 -1
  277. package/components/TableCanvas/styles/index.cjs +1 -1
  278. package/components/TableCanvas/styles/index.mjs +1 -1
  279. package/components/TableCanvas/table-hooks/index.cjs +1 -1
  280. package/components/TableCanvas/table-hooks/index.mjs +1 -1
  281. package/components/TableCanvas/types/column-config.type.d.ts +3 -0
  282. package/components/TableCanvas/types/columns-grouping.type.d.ts +8 -0
  283. package/components/TableCanvas/types/index.cjs +1 -1
  284. package/components/TableCanvas/types/index.mjs +1 -1
  285. package/components/TableCanvas/types/table-config.type.d.ts +3 -0
  286. package/components/TableCanvas/utils/index.cjs +1 -1
  287. package/components/TableCanvas/utils/index.mjs +2 -2
  288. package/components/TableCanvas/widgets/control-block/compression/index.cjs +1 -1
  289. package/components/TableCanvas/widgets/control-block/compression/index.mjs +1 -1
  290. package/components/TableCanvas/widgets/control-block/index.cjs +1 -1
  291. package/components/TableCanvas/widgets/control-block/index.mjs +1 -1
  292. package/components/TableCanvas/widgets/control-block/right-side/index.cjs +1 -1
  293. package/components/TableCanvas/widgets/control-block/right-side/index.mjs +1 -1
  294. package/components/TableCanvas/widgets/index.cjs +1 -1
  295. package/components/TableCanvas/widgets/index.mjs +1 -1
  296. package/components/TableCanvas/widgets/mass-actions/hooks/index.cjs +1 -1
  297. package/components/TableCanvas/widgets/mass-actions/hooks/index.mjs +1 -1
  298. package/components/TableCanvas/widgets/mass-actions/index.cjs +1 -1
  299. package/components/TableCanvas/widgets/mass-actions/index.mjs +1 -1
  300. package/components/TableContract/index.cjs +1 -1
  301. package/components/TableContract/index.mjs +2 -2
  302. package/components/TableGlide/TableGlide.d.ts +1 -1
  303. package/components/TableGlide/hooks/selection/index.cjs +1 -1
  304. package/components/TableGlide/hooks/selection/index.mjs +1 -1
  305. package/components/TableGlide/index.cjs +1 -1
  306. package/components/TableGlide/index.mjs +1 -1
  307. package/components/TableGlide/lib/canvas/cells/buttons/index.cjs +1 -1
  308. package/components/TableGlide/lib/canvas/cells/buttons/index.mjs +1 -1
  309. package/components/TableGlide/lib/canvas/cells/iconSprites/index.cjs +1 -1
  310. package/components/TableGlide/lib/canvas/cells/iconSprites/index.mjs +1 -1
  311. package/components/TableGlide/lib/canvas/cells/index.cjs +1 -1
  312. package/components/TableGlide/lib/canvas/cells/index.mjs +1 -1
  313. package/components/TableGlide/lib/canvas/cells/renderer/index.cjs +1 -1
  314. package/components/TableGlide/lib/canvas/cells/renderer/index.mjs +1 -1
  315. package/components/TableGlide/lib/canvas/core/helpers/index.cjs +1 -1
  316. package/components/TableGlide/lib/canvas/core/helpers/index.mjs +1 -1
  317. package/components/TableGlide/lib/canvas/core/index.cjs +1 -1
  318. package/components/TableGlide/lib/canvas/core/index.mjs +1 -1
  319. package/components/TableGlide/lib/canvas/hooks/index.cjs +1 -1
  320. package/components/TableGlide/lib/canvas/hooks/index.mjs +1 -1
  321. package/components/TableGlide/lib/canvas/index.cjs +1 -1
  322. package/components/TableGlide/lib/canvas/index.mjs +1 -1
  323. package/components/TableGlide/lib/canvas/miniflex/index.cjs +1 -1
  324. package/components/TableGlide/lib/canvas/miniflex/index.mjs +1 -1
  325. package/components/TableGlide/lib/canvas/primitives/index.cjs +1 -1
  326. package/components/TableGlide/lib/canvas/primitives/index.mjs +1 -1
  327. package/components/TableGlide/lib/canvas/utils/index.cjs +1 -1
  328. package/components/TableGlide/lib/canvas/utils/index.mjs +1 -1
  329. package/components/TableGlide/theming/index.cjs +1 -1
  330. package/components/TableGlide/theming/index.mjs +1 -1
  331. package/components/TableGlide/types.d.ts +3 -2
  332. package/components/TableTabs/index.cjs +1 -1
  333. package/components/TableTabs/index.mjs +1 -1
  334. package/components/Tooltip/index.cjs +1 -1
  335. package/components/Tooltip/index.mjs +1 -1
  336. package/components/TourWidget/index.cjs +1 -1
  337. package/components/TourWidget/index.mjs +2 -2
  338. package/components/Typography/index.cjs +1 -1
  339. package/components/Typography/index.mjs +1 -1
  340. package/components/Widget/index.cjs +1 -1
  341. package/components/Widget/index.mjs +2 -2
  342. package/formComponents/FormCombobox/index.cjs +1 -1
  343. package/formComponents/FormCombobox/index.mjs +1 -1
  344. package/formComponents/FormRadioGroupBox/index.cjs +1 -1
  345. package/formComponents/FormRadioGroupBox/index.mjs +1 -1
  346. package/formComponents/FormSegments/index.cjs +1 -1
  347. package/formComponents/FormSegments/index.mjs +1 -1
  348. package/formComponents/FormSwitch/index.cjs +1 -1
  349. package/formComponents/FormSwitch/index.mjs +1 -1
  350. package/index.cjs +1 -1
  351. package/index.mjs +137 -136
  352. package/layouts/Container/index.cjs +1 -1
  353. package/layouts/Container/index.mjs +1 -1
  354. package/layouts/Container/lib/utils/index.cjs +1 -1
  355. package/layouts/Container/lib/utils/index.mjs +1 -1
  356. package/layouts/ErrorPage/index.cjs +1 -1
  357. package/layouts/ErrorPage/index.mjs +1 -1
  358. package/layouts/FiltersActions/hooks/index.cjs +1 -1
  359. package/layouts/FiltersActions/hooks/index.mjs +1 -1
  360. package/layouts/FiltersActions/index.cjs +1 -1
  361. package/layouts/FiltersActions/index.mjs +1 -1
  362. package/layouts/Layout/index.cjs +1 -1
  363. package/layouts/Layout/index.mjs +1 -1
  364. package/layouts/PageLayout/index.cjs +1 -1
  365. package/layouts/PageLayout/index.mjs +1 -1
  366. package/mcp-data/component-index.json +45769 -0
  367. package/mixins/index.cjs +1 -1
  368. package/mixins/index.mjs +1 -1
  369. package/package.json +6 -6
  370. package/styles/index.cjs +1 -1
  371. package/styles/index.mjs +1 -1
  372. package/utils/breakpoint/index.cjs +1 -1
  373. package/utils/breakpoint/index.mjs +1 -1
  374. package/utils/clickStream/index.cjs +1 -1
  375. package/utils/clickStream/index.d.ts +2 -2
  376. package/utils/clickStream/index.mjs +6 -5
  377. package/utils/clickStream/types.d.ts +14 -1
  378. package/utils/clickStream/utils.d.ts +2 -1
  379. package/utils/eventBus/index.cjs +1 -1
  380. package/utils/eventBus/index.mjs +1 -1
  381. package/utils/hooks/index.cjs +1 -1
  382. package/utils/hooks/index.mjs +1 -1
  383. package/utils/index.cjs +1 -1
  384. package/utils/index.mjs +26 -25
  385. package/utils/styles/index.cjs +1 -1
  386. package/utils/styles/index.mjs +1 -1
  387. package/chunks/AnalyticalWidget-fBDe37Ur.cjs +0 -43
  388. package/chunks/ListOfFilters-DgInAZFi.cjs +0 -1
  389. package/chunks/ListOfFilters-IEPKSKxx.mjs +0 -243
  390. package/chunks/Stories--_pE4YtR.mjs +0 -668
  391. package/chunks/Stories-Dvh6rMeV.cjs +0 -1
  392. package/chunks/Table-CnWVNNoW.cjs +0 -31
  393. package/chunks/TableCanvas-eYhmqTbp.cjs +0 -30
  394. package/chunks/TableGlide-CvMz7x7a.cjs +0 -1
  395. package/chunks/utils-DKi1rqLX.cjs +0 -25
@@ -1 +0,0 @@
1
- "use strict";const H=require("@glideappsfinal/glide-data-grid"),ci=require("@salutejs/sdds-themes/tokens/sdds_finai"),Ns=require("canvas-hypertxt"),p=require("react"),Ws=require("react-dom/server"),Ft=require("react/jsx-runtime");require("@glideappsfinal/glide-data-grid/dist/index.css");const qt=require("./utils-DKi1rqLX.cjs"),Ie=require("react-dom"),br=require("styled-components"),Y={small:{rowHeight:20,cellVerticalPadding:4,cellHorizontalPadding:4,textfieldSize:"xs"},medium:{rowHeight:32,cellVerticalPadding:7,cellHorizontalPadding:8,textfieldSize:"s"},big:{rowHeight:48,cellVerticalPadding:12,cellHorizontalPadding:16,textfieldSize:"s"}},He=o=>Y[o].rowHeight,ai=o=>Y[o].textfieldSize,Fr={small:Y.small.rowHeight,medium:Y.medium.rowHeight,big:Y.big.rowHeight},Gs={kind:H.GridCellKind.Text,data:"",displayData:"",allowOverlay:!0,readonly:!0},Sr={big:{cellVerticalPadding:Y.big.cellVerticalPadding,cellHorizontalPadding:Y.big.cellHorizontalPadding,textfieldSize:Y.big.textfieldSize},medium:{cellVerticalPadding:Y.medium.cellVerticalPadding,cellHorizontalPadding:Y.medium.cellHorizontalPadding,textfieldSize:Y.medium.textfieldSize},small:{cellVerticalPadding:Y.small.cellVerticalPadding,cellHorizontalPadding:Y.small.cellHorizontalPadding,textfieldSize:Y.small.textfieldSize}},ui={"padding-block":"0px","padding-inline":"0px"},Gt=o=>`${o}px`,$s={small:{rowHeight:He("small"),cell:{"padding-block":Gt(Y.small.cellVerticalPadding),"padding-inline":Gt(Y.small.cellHorizontalPadding)},editorCell:ui,input:ai("small"),icon:"xs",combobox:"s",checkboxOfCombobox:"s",switch:"s",font:()=>ci.bodyXXS},medium:{rowHeight:He("medium"),cell:{"padding-block":Gt(Y.medium.cellVerticalPadding),"padding-inline":Gt(Y.medium.cellHorizontalPadding)},editorCell:ui,input:ai("medium"),icon:"s",combobox:"m",checkboxOfCombobox:"m",switch:"s",font:()=>ci.bodyS},big:{rowHeight:He("big"),cell:{"padding-block":Gt(Y.big.cellVerticalPadding),"padding-inline":Gt(Y.big.cellHorizontalPadding)},editorCell:ui,input:ai("big"),icon:"m",combobox:"l",checkboxOfCombobox:"l",switch:"l",font:()=>ci.bodyM}},_e=33,Us={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"}},Xs=16;function Oo(o,t=Xs){const e=parseFloat(o);return Number.isFinite(e)?o.endsWith("rem")?e*t:e:0}const Vs=(o,t=!1)=>{const e=t?o["bold-font-weight"]:o["font-weight"],i=t?o["bold-font-size"]:o["font-size"],r=t?o["bold-line-height"]:o["line-height"];return`${e} normal ${i}/${r}`},Ys=(o,t=!1)=>{const e=t?o["bold-font-size"]:o["font-size"],i=t?o["bold-line-height"]:o["line-height"];return{fontSize:Oo(e),lineHeightPx:Oo(i)}},xr=o=>Object.entries(Us).reduce((t,[e,i])=>{const r=e;return t.push([r,o(i)],[`${r}Bold`,o(i,!0)]),t},[]),Re=Object.fromEntries(xr(Vs)),wr=Object.fromEntries(xr(Ys)),qs={flexGrow:0,flexShrink:1,flexBasis:0,alignSelf:"auto",width:void 0,height:void 0,crossAxisSizing:"auto"},Ks={top:0,right:0,bottom:0,left:0};class Ar{constructor(t=qs){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 Er extends Ar{build(){}}class wt extends Ar{constructor(t,e,i={}){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=i.id,i.direction!==void 0&&(this.direction=i.direction),i.wrap!==void 0&&(this.wrap=i.wrap),i.columnGap!==void 0&&(this.columnGap=i.columnGap),i.rowGap!==void 0&&(this.rowGap=i.rowGap),i.justifyContent!==void 0&&(this.justifyContent=i.justifyContent),i.alignItems!==void 0&&(this.alignItems=i.alignItems),i.alignContent!==void 0&&(this.alignContent=i.alignContent),this.padding=Tr(i.padding)}addChild(t,e){if(t instanceof wt){const r=t;if(e){const n=r.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(r),r}const i=new Er(t);return this.children.push(i),i}getContainerMetrics(){const t=this.direction==="row"||this.direction==="row-reverse",{left:e,right:i,top:r,bottom:n}=this.padding,{width:s,height:l}=this.size;return t?{main:s-e-i,cross:l-r-n,mainGap:this.columnGap,crossGap:this.rowGap}:{main:l-r-n,cross:s-e-i,mainGap:this.rowGap,crossGap:this.columnGap}}buildFlexLines(t,e){if(this.wrap==="nowrap")return[t];const i=[];let r=[],n=0;for(const s of t){const l=s.style.flexBasis,c=r.length>0?e.mainGap:0;r.length>0&&n+c+l>e.main&&(i.push(r),r=[],n=0),r.push(s),n+=(r.length>1?e.mainGap:0)+l}return r.length>0&&i.push(r),this.wrap==="wrap-reverse"&&i.reverse(),i}measureLineCrossSizes(t,e){const i=[];for(const r of t){let n=0;for(const s of r){if(this.isDeferredCrossAxisPercentChild(s,e))continue;const l=e?s.style.height:s.style.width,c=l!==void 0?l:e?s.size.height:s.size.width;c>n&&(n=c)}i.push(n)}return i}isDeferredCrossAxisPercentChild(t,e){const i=e?t.style.height:t.style.width;return(t.style.alignSelf!=="auto"?t.style.alignSelf:this.alignItems)==="stretch"&&i===void 0&&t.style.crossAxisSizing==="deferred-percent-stretch"}resolveCrossAxisLayout(t,e){const i=t.length,r=t.reduce((h,d)=>h+d,0),n=e.crossGap*(i>1?i-1:0),s=e.cross-r-n;let l=0,c=e.crossGap;if(this.wrap==="nowrap"&&i===1)t[0]=e.cross;else if(this.wrap!=="nowrap"){const{crossStart:h,crossBetween:d}=this.calculateAlignContent(s,i,e.crossGap);if(l=h,c=d,this.alignContent==="stretch"&&s>0){const a=s/i;for(let u=0;u<i;u++)t[u]+=a}}return{crossStart:l,crossBetween:c}}calculateAlignContent(t,e,i){let r=0,n=i;switch(this.alignContent){case"flex-end":r=t;break;case"center":r=t/2;break;case"space-between":n=e>1?i+t/(e-1):0;break;case"space-around":n=i+t/e,r=n/2;break;case"space-evenly":n=i+t/(e+1),r=n;break}return{crossStart:r,crossBetween:n}}distributeMainAxisSizes(t,e,i){let r=0,n=0,s=0;for(const d of t){const a=d.style.flexBasis;r+=a,n+=d.style.flexGrow,s+=d.style.flexShrink*a}const l=t.length>1?e.mainGap*(t.length-1):0,c=e.main-r-l;let h=0;for(const d of t){const{style:a}=d;let u=a.flexBasis;c>0&&n>0?u+=c*a.flexGrow/n:c<0&&s>0&&(u+=c*a.flexShrink*u/s),u<0&&(u=0),i?d.size.width=u:d.size.height=u,h+=u}return{lineMainUsed:h,totalGrow:n}}calculateJustifySpacing(t,e,i,r){let n=0,s=i.mainGap;if(r===0){const l=t>1?i.mainGap*(t-1):0;let c=i.main-e-l;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?i.mainGap+c/(t-1):0;break;case"space-around":s=i.mainGap+c/t,n=s/2;break;case"space-evenly":s=i.mainGap+c/(t+1),n=s;break}}return{leading:n,between:s}}getFinalLineHeight(t,e,i){if(this.wrap!=="nowrap")return e;let r=e;for(const n of t){if(this.isDeferredCrossAxisPercentChild(n,i))continue;const s=i?n.style.height:n.style.width,l=s!==void 0?s:i?n.size.height:n.size.width;l>r&&(r=l)}return r}getCrossSize(t,e,i){const r=i?t.style.height:t.style.width,n=t.style.alignSelf!=="auto"?t.style.alignSelf:this.alignItems;return r!==void 0?(i?t.size.height=r:t.size.width=r,r):n==="stretch"?(i?t.size.height=e:t.size.width=e,e):i?t.size.height:t.size.width}positionChildren(t,e,i,r,n,s,l,c,h){const d=this.direction==="row-reverse"||this.direction==="column-reverse",a=d?t.length-1:0,u=d?-1:t.length,f=d?-1:1;let g=n;for(let v=a;v!==u;v+=f){const C=t[v];if(C!==void 0){const x=C.style,m=C.size,S=C.position;if(i){const L=this.direction==="row"?g:e.main-g-m.width;S.x=l+L}else{const L=this.direction==="column"?g:e.main-g-m.height;S.y=c+L}const F=x.alignSelf!=="auto"?x.alignSelf:this.alignItems,A=this.getCrossSize(C,r,i);let b=0;F==="flex-end"?b=r-A:F==="center"&&(b=(r-A)*.5),i?(S.y=c+h+b,g+=m.width+s):(S.x=l+h+b,g+=m.height+s)}}}build(){const{children:t}=this;if(t.length===0)return;const e=this.direction==="row"||this.direction==="row-reverse",i=this.getContainerMetrics(),r=this.buildFlexLines(t,i);if(r.length===0)return;const n=this.measureLineCrossSizes(r,e),{crossStart:s,crossBetween:l}=this.resolveCrossAxisLayout(n,i),c=this.padding.left,h=this.padding.top;let d=s;for(let a=0;a<r.length;a++){const u=r[a];if(u===void 0||u.length===0)continue;const{lineMainUsed:f,totalGrow:g}=this.distributeMainAxisSizes(u,i,e),{leading:v,between:C}=this.calculateJustifySpacing(u.length,f,i,g),x=this.getFinalLineHeight(u,n[a],e);this.positionChildren(u,i,e,x,v,C,c,h,d),d+=x+l}for(const a of t)a instanceof wt&&a.build()}}function Tr(o){return o===void 0?Ks:typeof o=="number"?{top:o,right:o,bottom:o,left:o}:{top:o.top??0,right:o.right??0,bottom:o.bottom??0,left:o.left??0}}class Ni extends wt{constructor(t,e,i={}){super(t,e,i)}getLayout(){this.build();const t={};return this._collectLayout(this,t,{counter:0}),t}_collectLayout(t,e,i){for(const r of t.children){const n=r.id??`_$$${i.counter++}`;e[n]={position:r.position,size:r.size},r instanceof wt&&this._collectLayout(r,e,i)}}}const oe={direction:"row",columnGap:0,rowGap:0,justifyContent:"flex-start",alignItems:"stretch"};function Dr(o){const t=o;return{id:o.id,direction:t.direction??oe.direction,columnGap:t.columnGap??oe.columnGap,rowGap:t.rowGap??oe.rowGap,justifyContent:t.justifyContent??oe.justifyContent,alignItems:t.alignItems??oe.alignItems}}function Ir(o,t){if(t!=null&&t.length)for(const e of t)if(e.children&&e.children.length>0){const i=new wt(e.width??0,e.height??0,Dr(e));o.addChild(i,e),Ir(i,e.children)}else o.addChild(e)}const Zs=o=>{const t=o.width??0,e=o.height??0,i=Dr(o),r=new Ni(t,e,i);return Ir(r,o.children),r.getLayout()},Ge=class Ge{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,i)=>e.push(i))}addChildStart(t){this.attachChild(t,(e,i)=>e.unshift(i))}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 i=t.getZIndex();t.setZIndex(i+this.zIndex),this.onPaint(t,e),Ge.DEBUG&&t.strokeRect(this.rect.x,this.rect.y,this.rect.width,this.rect.height,this.debugColor,1),t.setZIndex(i)}hitTest(t,e){const i=[];return this.collectHitCandidates(t,e,0,{value:0},i),i.sort((r,n)=>n.cumulativeZIndex-r.cumulativeZIndex||n.order-r.order),i.map(({node:r})=>r)}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,i,r,n){if(!this.containsHitPoint(t,e))return;const s=i+this.zIndex;n.push({node:this,cumulativeZIndex:s,order:r.value}),r.value+=1;for(const l of this.children)l.collectHitCandidates(t,e,s,r,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}};Ge.DEBUG=!1;let Bt=Ge;class Hr{constructor(){this.defaultFlexStyle={flexGrow:0,flexShrink:1,flexBasis:0,alignSelf:"auto",width:void 0,height:void 0,crossAxisSizing:"auto"}}build(t,e,i){const r=i??t.children.filter(c=>!c.isAbsolute()),n=r.length,s=e.direction,l=s==="row"||s==="row-reverse";for(let c=0;c<n;c+=1){const h=r[c],d=h.style,a=this.extractChildFlexProperties(h,d);this.handlePercentageDimensions(a,d.width,d.height,l,h.rect),this.defaultFlexStyle.flexGrow=a.flexGrow,this.defaultFlexStyle.flexShrink=a.flexShrink,this.defaultFlexStyle.flexBasis=a.flexBasis,this.defaultFlexStyle.alignSelf=a.alignSelf,this.defaultFlexStyle.width=a.width,this.defaultFlexStyle.height=a.height,this.defaultFlexStyle.crossAxisSizing=a.crossAxisSizing,this.isContainer(h)?this.addContainerChild(h,e):this.addLeafChild(h,e)}}extractChildFlexProperties(t,e){const i=e.flexGrow??0,r=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:i,flexShrink:r,flexBasis:n,alignSelf:e.alignSelf??"auto",crossAxisSizing:"auto"}}handlePercentageDimensions(t,e,i,r,n){e==="100%"&&(r?(t.width=void 0,t.flexGrow===0&&(t.flexGrow=1)):(t.width=void 0,t.alignSelf="stretch",t.crossAxisSizing="deferred-percent-stretch")),i==="100%"&&(r?(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=r?n.width:n.height)}isContainer(t){return"flexOptions"in t}addContainerChild(t,e){const i=new wt(0,0,t.flexOptions);i.size.width=t.rect.width,i.size.height=t.rect.height,e.addChild(i,this.defaultFlexStyle),this.build(t,i)}addLeafChild(t,e){const i=e.addChild(this.defaultFlexStyle);i.size.width=t.rect.width,i.size.height=t.rect.height}}const xe=.5;class Lr{constructor(t){this.positionResolver=t}reconcile(t,e,i,r,n,s=!1){let l=!1;const{parent:c}=e,h=c!==null?c.rect:n;l=this.updateNodePosition(e,i,h??e.rect);const d=r??e.children.filter(u=>!u.isAbsolute()),a=d.length>0;if(a&&i instanceof wt){const u=this.reconcileChildLayouts(t,d,i,n);if(l=l||u,this.isContainer(e)&&!s){const f=this.updateContainerFromContent(e,i);l=l||f}}else if(!a){const u=this.remeasureAndUpdateLeaf(t,e,i);l=l||u}return this.positionNestedAbsoluteChildren(t,e),l}updateNodePosition(t,e,i){const r=t.rect,n=e.position,s=e.size;r.x=i.x+n.x,r.y=i.y+n.y;const l=r.width!==s.width,c=r.height!==s.height;return r.width=s.width,r.height=s.height,l||c}reconcileChildLayouts(t,e,i,r){let n=!1;const s=i.children,l=e.length;for(let c=0;c<l;c+=1){const h=this.reconcile(t,e[c],s[c],void 0,r);n=n||h}return n}updateContainerFromContent(t,e){const i=this.getContainerCachedIsRow(t),r=this.getContainerCachedPadding(t),n=e.children,s=n.length;let l=0;if(i){for(let u=0;u<s;u+=1){const f=n[u],g=f.position.y+f.size.height;g>l&&(l=g)}const c=l>0?l+r.bottom:0,h=t.style.height;if(h==="100%")return!1;const d=typeof h=="number"?h:0,a=c>d?c:d;if(a>t.rect.height+xe)return t.rect.height=a,this.syncFlexNodeSizeFromRect(t,e,!1,!0),!0}else{let c=0;for(let C=0;C<s;C+=1){const x=n[C],m=x.position.x+x.size.width,S=x.position.y+x.size.height;m>l&&(l=m),S>c&&(c=S)}const h=l>0?l+r.right:0,d=t.style.width;let a=!1,u=!1,f=!1;if(d!=="100%"){const C=typeof d=="number"?d:0,x=h>C?h:C;x>t.rect.width+xe&&(t.rect.width=x,a=!0,u=!0)}const g=c>0?c+r.bottom:0,v=t.style.height;if(v!=="100%"){const C=typeof v=="number"?v:0,x=g>C?g:C;x>t.rect.height+xe&&(t.rect.height=x,a=!0,f=!0)}return a&&this.syncFlexNodeSizeFromRect(t,e,u,f),a}return!1}syncFlexNodeSizeFromRect(t,e,i,r){i&&(e.size.width=t.rect.width),r&&(e.size.height=t.rect.height),this.syncAutoMainAxisFlexBasis(t,e,i,r)}syncAutoMainAxisFlexBasis(t,e,i,r){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&&i?e.style.flexBasis=t.rect.width:!s&&r&&(e.style.flexBasis=t.rect.height)}remeasureAndUpdateLeaf(t,e,i){const r=e.rect.height,n=e.rect.width;e.measure(t),e.rect.width=n;const s=e.rect.height-r;return Math.abs(s)>xe?(this.syncFlexNodeSizeFromRect(e,i,!1,!0),!0):!1}positionNestedAbsoluteChildren(t,e){if(!this.isContainer(e)||!e.isPositioningContext())return;const i=e,n=i.children.filter(l=>l.isAbsolute());if(n.length===0)return;const s=this.getContainerCachedPadding(i);this.positionResolver.positionAbsoluteChildren(i.rect,s,n,l=>l.measure(t),l=>this.layoutAbsoluteChildSubtree(t,l))}layoutAbsoluteChildSubtree(t,e){if(!this.isContainer(e))return;const i=e.parent;e.parent=null;try{e.performLayout(t,!0)}finally{e.parent=i}}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 St{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,i,r,n){const s=n?e.x:e.y,l=s+(n?e.width:e.height),c=n?e.width:e.height;if(i!==void 0&&r!==void 0){const h=Math.max(0,c-i-r);n?(t.x=s+i,t.width=h):(t.y=s+i,t.height=h)}else i!==void 0&&(n?t.x=s+i:t.y=s+i);r!==void 0&&i===void 0?n?t.x=l-t.width-r:t.y=l-t.height-r:r===void 0&&i===void 0&&(n?t.x=s:t.y=s)}applyAbsolutePositioning(t,e){const i=St.resolvePositionValue(t.left,e.width),r=St.resolvePositionValue(t.right,e.width),n=St.resolvePositionValue(t.top,e.height),s=St.resolvePositionValue(t.bottom,e.height),l=t.rect;St.applyAxisPositioning(l,e,i,r,!0),St.applyAxisPositioning(l,e,n,s,!1)}positionAbsoluteChildren(t,e,i,r,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 l of i)r(l),this.applyAbsolutePositioning(l,s),n==null||n(l)}}class $e{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 i=t*(this.childCount-1);e?this.width+=i:this.height+=i}}getSize(){return this.isRow?{width:this.width,height:this.maxCrossSize}:{width:this.maxCrossSize,height:this.height}}static computeIntrinsicSize(t,e,i){const r=new $e;for(const n of t)r.accumulate(n,e);return r.addGap(i,e),r.getSize()}}const js=3,Pr={top:0,right:0,bottom:0,left:0},Js=o=>o===void 0||o==="row"||o==="row-reverse",Br=o=>o===void 0?Pr:typeof o=="number"?{top:o,right:o,bottom:o,left:o}:{top:o.top??0,right:o.right??0,bottom:o.bottom??0,left:o.left??0};class ft extends Bt{constructor(t,e={},i="transparent"){super(t),this.cachedPadding=Pr,this.cachedIsRow=!0,this.cachedGap=0,this.optionsCacheValid=!1,this.flexOptionsValue=e,this.positionResolver=new St,this.flexTreeBuilder=new Hr,this.layoutReconciler=new Lr(this.positionResolver),this.invalidateOptionsCache(),this.backgroundColor=i}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=Js(t.direction),this.cachedGap=this.cachedIsRow?t.columnGap??0:t.rowGap??0,this.cachedPadding=Br(t.padding),this.optionsCacheValid=!0}measure(t){this.measureChildren(t),this.computeIntrinsicSize(),this.applySizeConstraints(),this.clearMeasureDirty()}measureChildren(t){const{children:e}=this;for(let i=0;i<e.length;i+=1)e[i].measure(t)}computeIntrinsicSize(){this.ensureOptionsCache();const{layoutChildren:t}=this.separateChildrenByLayoutMode(),e=t.map(s=>s.rect),{width:i,height:r}=$e.computeIntrinsicSize(e,this.cachedIsRow,this.cachedGap),n=this.cachedPadding;this._intrinsicWidth=i+n.left+n.right,this._intrinsicHeight=r+n.top+n.bottom}applySizeConstraints(){const{style:t}=this,e=this.resolveStyleDimension(t.width,"width"),i=this.resolveStyleDimension(t.height,"height");this.rect.width=e??this._intrinsicWidth,this.rect.height=i??this._intrinsicHeight,e===void 0&&this.clampWidthToParent()}resolveStyleDimension(t,e){if(typeof t=="number")return t;if(t!=="100%")return;const i=this.resolveParentContentSize(e);return i!==void 0?i:this.rect[e]>0?this.rect[e]:void 0}resolveParentContentSize(t){const{parent:e}=this;if(!(e instanceof ft))return e!=null&&e.rect[t]&&e.rect[t]>0?e.rect[t]:void 0;e.ensureOptionsCache();const i=e.cachedPadding,r=t==="width"?i.left+i.right:i.top+i.bottom,n=e.rect[t]-r;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:i,absoluteChildren:r}=this.separateChildrenByLayoutMode();i.length>0&&this.layoutPhase1Flexbox(t,i,e),r.length>0&&this.isPositioningContext()&&this.layoutPhase2Absolute(t,r),this.clearLayoutDirty()}layoutPhase1Flexbox(t,e,i=!1){const r=new Ni(this.rect.width,this.rect.height,this.flexOptionsValue);this.flexTreeBuilder.build(this,r,e);let n=0,s;do r.build(),s=this.layoutReconciler.reconcile(t,this,r,e,this.rect,i),n+=1;while(s&&n<js)}layoutPhase2Absolute(t,e){this.ensureOptionsCache(),this.positionResolver.positionAbsoluteChildren(this.rect,this.cachedPadding,e,i=>i.measure(t),i=>this.layoutAbsoluteChildSubtree(t,i))}layoutAbsoluteChildSubtree(t,e){if(!(e instanceof ft))return;const i=e.parent;e.parent=null;try{e.performLayout(t,!0)}finally{e.parent=i}}clampWidthToParent(){const{parent:t}=this;if(t===null||t.rect.width<=0)return;let e=t.rect.width;t instanceof ft&&(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 i of this.children)i.isAbsolute()?e.push(i):t.push(i);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 i of this.children)i.paint(t,e)}}const Qs={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0},tl=(o,t)=>({minX:Math.min(o.minX,t.rect.x),minY:Math.min(o.minY,t.rect.y),maxX:Math.max(o.maxX,t.rect.x+t.rect.width),maxY:Math.max(o.maxY,t.rect.y+t.rect.height)}),el=o=>o.minX===1/0||o.maxX===-1/0;class il extends ft{performLayout(t){const e=this.layoutChildren(t);if(!e){this.clearLayoutDirty();return}this.expandToFitBounds(e),this.clearLayoutDirty()}layoutChildren(t){let e={...Qs};return this.children.forEach(i=>{i instanceof ft?i.performLayout(t):i.measure(t),e=tl(e,i)}),el(e)?null:e}expandToFitBounds(t){const e=t.maxX-this.rect.x,i=t.maxY-this.rect.y;e>this.rect.width&&(this.rect.width=e),i>this.rect.height&&(this.rect.height=i)}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 Wi{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,i){var n;const r=i.hitTest(t,e);for(const s of r){const l=(n=s.style)==null?void 0:n.cursor;if(l)return l}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,i){return i?{...i,type:t,target:e,currentTarget:e}:{type:t,x:0,y:0,originalEvent:{},stopPropagation:()=>{},preventDefault:()=>{},target:e,currentTarget:e}}updateCursor(t){var i,r,n;let e="default";for(const s of t){const l=(i=s.style)==null?void 0:i.cursor;if(l){e=l;break}}e!==this.currentCursor&&(this.currentCursor=e,(n=(r=this.options).onCursorChange)==null||n.call(r,e))}findPortalTarget(t){let e=t;for(;e;){if(e.portalHoverEnabled)return e;e=e.parent}return null}updatePortalHover(t,e=null){var l,c,h,d,a,u;const i=this.findPortalTarget(t),r=i?{...i.rect}:null,n=this.activePortalNode,s=i&&r?{id:i.id,rect:r}:null;if(i&&(n==null?void 0:n.id)===i.id){(c=(l=this.options).onPortalTargetChange)==null||c.call(l,i,e);return}if(this.activePortalNode=s,(d=(h=this.options).onPortalTargetChange)==null||d.call(h,i??null,e),!!this.options.portalHoverDispatch)if(i&&r&&this.bounds){const f=((u=(a=this.options).getTooltipContext)==null?void 0:u.call(a))??void 0;this.dispatchPortalHover({visible:!0,x:this.bounds.x+r.x,y:this.bounds.y+r.y,width:r.width,height:r.height,nodeId:i.id,originId:i.id,source:this.options.portalSource,tooltipContext:f,tooltipFromNode:i.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 i,r,n,s;const e=((r=(i=this.options).getPortalEventTarget)==null?void 0:r.call(i))??null;(s=(n=this.options).portalHoverDispatch)==null||s.call(n,t,e)}}class yt extends Bt{addChild(){throw new Error("CanvasLeaf cannot have children")}}const se={selection:"normal",cellClick:"normal",editor:"normal",contextMenu:"normal"};function ol(o){return o.selection!==void 0||o.cellClick!==void 0||o.editor!==void 0||o.contextMenu!==void 0}function _r(o){if(!o||!ol(o))return;const t={selection:o.selection??se.selection,cellClick:o.cellClick??se.cellClick,editor:o.editor??se.editor,contextMenu:o.contextMenu??se.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 Rr(){return{...se}}class kr{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))}}function rl(o,t){return o.zIndex!==t.zIndex?o.zIndex-t.zIndex:o.order-t.order}const No=typeof Path2D<"u"&&typeof CanvasRenderingContext2D.prototype.roundRect=="function";class Ue{constructor(){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,i,r,n){return this.commands.push({type:"fillRect",x:t,y:e,width:i,height:r,fillStyle:n,zIndex:this.currentZIndex,order:this.orderCounter++}),this}strokeRect(t,e,i,r,n,s=1){return this.commands.push({type:"strokeRect",x:t,y:e,width:i,height:r,strokeStyle:n,lineWidth:s,zIndex:this.currentZIndex,order:this.orderCounter++}),this}fillText(t,e,i,r,n,s="middle",l){return this.commands.push({type:"fillText",text:t,x:e,y:i,font:r,fillStyle:n,textBaseline:s,textAlign:l,zIndex:this.currentZIndex,order:this.orderCounter++}),this}fillTextClipped(t,e,i,r,n,s,l="middle",c){return this.commands.push({type:"fillTextClipped",text:t,x:e,y:i,font:r,fillStyle:n,textBaseline:l,textAlign:c,clipX:s.x,clipY:s.y,clipWidth:s.width,clipHeight:s.height,zIndex:this.currentZIndex,order:this.orderCounter++}),this}drawImage(t,e,i,r,n){return this.commands.push({type:"drawImage",image:t,x:e,y:i,width:r,height:n,zIndex:this.currentZIndex,order:this.orderCounter++}),this}roundedRect(t,e,i,r,n,s){return this.commands.push({type:"roundedRect",x:t,y:e,width:i,height:r,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,i,r,n,s,l=90){return this.commands.push({type:"linearGradientRect",x:t,y:e,width:i,height:r,radius:n,gradientStops:s,angle:l,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,i=e.length;if(i===0)return;e.sort(rl);let r="",n="",s=-1,l="",c="",h="";for(let d=0;d<i;d++){const a=e[d];if(a!==void 0)switch(a.type){case"fillRect":r!==a.fillStyle&&(t.fillStyle=a.fillStyle,r=a.fillStyle),t.fillRect(a.x,a.y,a.width,a.height);break;case"strokeRect":n!==a.strokeStyle&&(t.strokeStyle=a.strokeStyle,n=a.strokeStyle),s!==a.lineWidth&&(t.lineWidth=a.lineWidth,s=a.lineWidth),t.strokeRect(a.x,a.y,a.width,a.height);break;case"fillText":l!==a.font&&(t.font=a.font,l=a.font),r!==a.fillStyle&&(t.fillStyle=a.fillStyle,r=a.fillStyle),c!==a.textBaseline&&(t.textBaseline=a.textBaseline,c=a.textBaseline),a.textAlign&&h!==a.textAlign&&(t.textAlign=a.textAlign,h=a.textAlign),t.fillText(a.text,a.x,a.y);break;case"fillTextClipped":l!==a.font&&(t.font=a.font,l=a.font),r!==a.fillStyle&&(t.fillStyle=a.fillStyle,r=a.fillStyle),c!==a.textBaseline&&(t.textBaseline=a.textBaseline,c=a.textBaseline),a.textAlign&&h!==a.textAlign&&(t.textAlign=a.textAlign,h=a.textAlign),this.executeFillTextClipped(t,a);break;case"drawImage":t.drawImage(a.image,a.x,a.y,a.width,a.height);break;case"roundedRect":this.executeRoundedRect(t,a),a.fillStyle&&(r=a.fillStyle),a.strokeStyle&&(n=a.strokeStyle),a.lineWidth!==void 0&&(s=a.lineWidth);break;case"linearGradientRect":this.executeLinearGradientRect(t,a);break;case"custom":a.fn(t),r="",n="",s=-1,l="",c="",h="";break}}this.clear()}executeLinearGradientRect(t,e){const{x:i,y:r,width:n,height:s,radius:l,gradientStops:c,angle:h}=e,d=(h-90)*Math.PI/180,a=Math.cos(d),u=Math.sin(d),f=n/2,g=s/2,v=i+f,C=r+g,m=(Math.abs(a*n)+Math.abs(u*s))/2,S=v-a*m,F=C-u*m,A=v+a*m,b=C+u*m,L=t.createLinearGradient(S,F,A,b);for(const E of c)L.addColorStop(E.offset,E.color);if(t.fillStyle=L,l>0)if(No)t.beginPath(),t.roundRect(i,r,n,s,l),t.fill();else{const E=l,B=i+n,z=r+s;t.beginPath(),t.moveTo(i+E,r),t.lineTo(B-E,r),t.quadraticCurveTo(B,r,B,r+E),t.lineTo(B,z-E),t.quadraticCurveTo(B,z,B-E,z),t.lineTo(i+E,z),t.quadraticCurveTo(i,z,i,z-E),t.lineTo(i,r+E),t.quadraticCurveTo(i,r,i+E,r),t.closePath(),t.fill()}else t.fillRect(i,r,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:i,y:r,width:n,height:s,radius:l,fillStyle:c,strokeStyle:h,lineWidth:d}=e;if(No)t.beginPath(),t.roundRect(i,r,n,s,l);else{const a=l,u=i+n,f=r+s;t.beginPath(),t.moveTo(i+a,r),t.lineTo(u-a,r),t.quadraticCurveTo(u,r,u,r+a),t.lineTo(u,f-a),t.quadraticCurveTo(u,f,u-a,f),t.lineTo(i+a,f),t.quadraticCurveTo(i,f,i,f-a),t.lineTo(i,r+a),t.quadraticCurveTo(i,r,i+a,r),t.closePath()}c&&(t.fillStyle=c,t.fill()),h&&(t.strokeStyle=h,d!==void 0&&(t.lineWidth=d),t.stroke())}}const nl=new Ue;class sl{constructor(t,e){this.eventHandlers=new Map,this.batcher=new Ue,this.canvas=t,this.ctx=t.getContext("2d",{alpha:!1}),this.rootNode=e,this.hoverController=new Wi({onCursorChange:i=>{var r;return(r=this.onCursorChange)==null?void 0:r.call(this,i)},onPortalTargetChange:(i,r)=>{var n;return(n=this.onPortalHoverTargetChange)==null?void 0:n.call(this,i,r)}}),this.setupEvents()}setupEvents(){["click","mousedown","mouseup","mousemove","dblclick"].forEach(e=>{const i=r=>this.dispatchPointerEvent(r,e);this.eventHandlers.set(e,i),this.canvas.addEventListener(e,i)})}destroy(){this.eventHandlers.forEach((t,e)=>{this.canvas.removeEventListener(e,t)}),this.eventHandlers.clear()}dispatchPointerEvent(t,e){const{x:i,y:r}=this.getEventCoords(t),n=this.rootNode.hitTest(i,r),s=n[0];let l=!1;const c={type:e,x:i,y:r,originalEvent:t,target:s,stopPropagation:()=>{l=!0},preventDefault:()=>t.preventDefault()};this.bubbleEvent(n,c,e,()=>l),e==="mousemove"&&(this.dispatchMouseMove(n,c,()=>l),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,i,r){t.length!==0&&this.dispatchToNodes(t,e,(n,s)=>this.invokePointerHandler(n,i,s),r)}dispatchMouseMove(t,e,i){this.dispatchToNodes(t,e,(r,n)=>r.onMouseMove(n),i)}dispatchToNodes(t,e,i,r){for(const n of t){if(r())break;i(n,{...e,currentTarget:n})}}invokePointerHandler(t,e,i){switch(e){case"click":t.onClick(i);break;case"mousedown":t.onMouseDown(i);break;case"mouseup":t.onMouseUp(i);break;case"dblclick":t.onDoubleClick(i);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 ft?this.rootNode.performLayout(this.ctx):this.rootNode.measure(this.ctx)}}const et={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 Mr(o){return{default:{bgColor:o.surfaceSolidDefault,bgColorHover:o.surfaceSolidDefault,borderColor:o.surfaceSolidDefault,textColor:o.inverseTextPrimary,iconColor:o.inverseTextPrimary},primary:{bgColor:o.surfaceSolidDefault,bgColorHover:o.surfaceSolidDefault,borderColor:o.surfaceSolidDefault,textColor:o.inverseTextPrimary,iconColor:o.inverseTextPrimary},accent:{bgColor:o.surfaceAccent,bgColorHover:o.surfaceAccentHover,borderColor:o.surfaceAccent,textColor:o.onDarkTextPrimary,iconColor:o.onDarkTextPrimary},secondary:{bgColor:o.surfaceTransparentSecondary,bgColorHover:o.surfaceTransparentSecondaryHover,borderColor:"transparent",textColor:o.textPrimary,iconColor:o.textPrimary},clear:{bgColor:o.surfaceClear,bgColorHover:o.surfaceTransparentSecondaryHover,borderColor:"transparent",textColor:o.textPrimary,iconColor:o.textPrimary},success:{bgColor:o.surfacePositive,bgColorHover:o.surfacePositiveHover,borderColor:o.surfacePositive,textColor:o.onDarkTextPrimary,iconColor:o.onDarkTextPrimary},warning:{bgColor:o.surfaceWarning,bgColorHover:o.surfaceWarningHover,borderColor:o.surfaceWarning,textColor:o.onDarkTextPrimary,iconColor:o.onDarkTextPrimary},critical:{bgColor:o.surfaceNegative,bgColorHover:o.surfaceNegativeHover,borderColor:o.surfaceNegative,textColor:o.onDarkTextPrimary,iconColor:o.onDarkTextPrimary},dark:{bgColor:o.onLightSurfaceTransparentDeep,bgColorHover:o.onLightSurfaceTransparentDeep,borderColor:o.onLightSurfaceTransparentDeep,textColor:o.onDarkTextPrimary,iconColor:o.onDarkTextPrimary},black:{bgColor:o.onLightSurfaceSolidDefault,bgColorHover:o.onLightSurfaceSolidDefault,borderColor:o.onLightSurfaceSolidDefault,textColor:o.onDarkTextPrimary,iconColor:o.onDarkTextPrimary},white:{bgColor:o.onDarkSurfaceSolidDefault,bgColorHover:o.onDarkSurfaceSolidDefault,borderColor:o.onDarkSurfaceSolidDefault,textColor:o.onLightTextPrimary,iconColor:o.onLightTextPrimary}}}const Wo={bgColor:"#060A0C",bgColorHover:"#13181B",borderColor:"transparent",textColor:"#FFFFFF",textColorHover:"#F2F5F893",iconColor:"#FFFFFF",iconColorHover:"#F2F5F893"},Xe={default:Wo,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:Wo,white:{bgColor:"#FFFFFF",bgColorHover:"#FFFFFF",borderColor:"transparent",textColor:"#060A0C",textColorHover:"#13181B93",iconColor:"#060A0C",iconColorHover:"#13181B93"}},Jt=4,Qt=4,zr=16,Gi=20,$i=4,At=1,Ui=6,ll=4,Ve="s",Ye="default",Xi="#d32f2f",de="#ffffff",Or="rgba(30, 136, 229, 0.08)",mi="#ffffff",Nr="#E8EEF2",Wr="#D5DFE6",yi="#8A959D",Vi="|",Gr="#",$r=35,Yi=15,bi=new Map,Fi=new Map;function qi(o,t){if(o.charCodeAt(0)===$r){const e=parseInt(o.slice(1),16),i=Math.min(255,(e>>16&255)+t),r=Math.min(255,(e>>8&255)+t),n=Math.min(255,(e&255)+t);return`${Gr}${(i<<16|r<<8|n).toString(16).padStart(6,"0")}`}return o}function Go(o,t){const e=Math.min(1,Math.max(0,t));if(o.charCodeAt(0)!==35)throw new Error("Only HEX color format is supported");let i=o.slice(1),r,n,s;if((i.length===3||i.length===4)&&(i=i.split("").map(l=>l+l).join("")),i.length===6)r=parseInt(i.slice(0,2),16),n=parseInt(i.slice(2,4),16),s=parseInt(i.slice(4,6),16);else if(i.length===8)r=parseInt(i.slice(0,2),16),n=parseInt(i.slice(2,4),16),s=parseInt(i.slice(4,6),16);else throw new Error(`Invalid HEX color format: ${o}`);return`rgba(${r}, ${n}, ${s}, ${e})`}function Ur(o,t){const e=`${o}${Vi}${t}`;let i=bi.get(e);return i===void 0&&(i=qi(o,t),bi.set(e,i)),i}function Ki(o,t,e){const i=`${e}${Vi}${t}`;let r=Fi.get(i);return r===void 0&&(o.font=e,r=o.measureText(t).width,Fi.set(i,r)),r}function Zi(o,t,e,i,r,n){if(o!=="auto")return o;let s=0;return r&&(s+=e+i),n&&(s+=e+i),t+s+4}function ji(o,t,e,i,r){let n=o;return i&&(n+=t+e),r&&(n+=t+e),n}function cl(){bi.clear(),Fi.clear()}const al=qi(Xi,Yi);function Ji(o,t,e,i){if(e)return{bgColor:o.bgCell,borderColor:o.borderColor,textColor:o.textLight,iconColor:o.textLight};switch(t){case"primary":return Si(o,i);case"secondary":return Xr(o,i);case"danger":return Vr(i);default:return Si(o,i)}}function ul(o,t,e,i,r){const{accentColor:n}=o,s=o.accentFg||de,l=o.accentFg||de,c=.4;if(t||e){const u=r?Go(n,c):n;return{bgColor:u,borderColor:u,textColor:s,iconColor:l}}const h="#485056B0",d="white",a=r?Go(h,c):h;return{bgColor:d,borderColor:a,textColor:s,iconColor:l}}function Si(o,t){const{accentColor:e}=o,i=t?Ur(e,Yi):e;return{bgColor:i,borderColor:i,textColor:o.accentFg||de,iconColor:o.accentFg||de}}function Xr(o,t){return{bgColor:t?o.accentLight||Or:o.bgCell,borderColor:o.accentColor,textColor:o.accentColor,iconColor:o.accentColor}}function Vr(o){const t=o?al:Xi;return{bgColor:t,borderColor:t,textColor:mi,iconColor:mi}}function Qi(o,t,e){return t?{bgColor:Nr,borderColor:Wr,textColor:yi,iconColor:yi}:{bgColor:e?o.bgColorHover:o.bgColor,borderColor:o.borderColor,textColor:e&&o.textColorHover?o.textColorHover:o.textColor,iconColor:e&&o.iconColorHover?o.iconColorHover:o.iconColor}}const Vt=-1,$o=0,at={colIndex:Vt,rowIndex:Vt},J={x:$o,y:$o},hl=2;function Le(o){const{location:t}=o;if(Array.isArray(t)&&t.length>=hl)return at.colIndex=t[0]??Vt,at.rowIndex=t[1]??Vt,at;const{col:e}=o,{row:i}=o;if(typeof e=="number"&&typeof i=="number")return at.colIndex=e,at.rowIndex=i,at;const{colIndex:r}=o,{rowIndex:n}=o;return typeof r=="number"&&typeof n=="number"?(at.colIndex=r,at.rowIndex=n,at):(at.colIndex=Vt,at.rowIndex=Vt,at)}const we="-",Uo=0;function Kt(o,t){const{colIndex:e,rowIndex:i}=o;return e>=Uo&&i>=Uo?`${e}${we}${i}`:`${t.x}${we}${t.y}${we}${t.width}${we}${t.height}`}function xi(o){const{posX:t}=o,{posY:e}=o;if(typeof t=="number"&&typeof e=="number"&&t===t&&e===e)return J.x=t,J.y=e,J;const{x:i}=o,{y:r}=o;if(typeof i=="number"&&typeof r=="number"&&i===i&&r===r)return J.x=i,J.y=r,J;const{location:n}=o;if(Array.isArray(n)&&n.length>=2){const s=n[0],l=n[1];if(typeof s=="number"&&typeof l=="number")return J.x=s,J.y=l,J}return null}function wi(o,t){const e=o.x,i=o.y,r=t.x,n=t.y;return e>=r&&e<=r+t.width&&i>=n&&i<=n+t.height?(J.x=e-r,J.y=i-n,J):o}function Yr(o,t,e){if(typeof o!="number"||typeof t!="number")return;const i=e.width,r=e.height,n=e.x,s=e.y;if(o>=-1&&o<=i+1&&t>=-1&&t<=r+1)return J.x=o,J.y=t,J;if(o>=n-1&&o<=n+i+1&&t>=s-1&&t<=s+r+1)return J.x=o-n,J.y=t-s,J}function to(o,t,e){const i=e.x,r=e.y;return o>=i&&o<=i+e.width&&t>=r&&t<=r+e.height}function _t(o,t){if(typeof o=="object"&&o){const{hoverX:e}=o,{hoverY:i}=o,{rectX:r}=o,{rectY:n}=o;if(typeof e=="number"&&typeof i=="number"&&typeof r=="number"&&typeof n=="number"){const s=t.x-r,l=t.y-n;return e>=s&&e<=s+t.width&&i>=l&&i<=l+t.height}}return!!o}function Pe(){return typeof window<"u"?Math.ceil(window.devicePixelRatio):1}function qr(o){let t=0;for(let e=0;e<o.length;e++)t=(t<<5)-t+o.charCodeAt(e),t|=0;return t.toString(36)}function Ai(o,t){let e=o;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 Kr{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 i=Array.isArray(t)?t:Object.entries(t).map(([r,n])=>({name:r,svg:n}));for(const{name:r,svg:n}of i)r&&n&&(e.overwrite||!this.iconRegistry.has(r))&&this.iconRegistry.set(r,n);return this}getSprite(t,e,i){const r=this.resolveKey(t,e,i);if(!r)return null;this.stats.requests++;const n=this.spriteCache.get(r.key);return n?(this.stats.hits++,n):(this.stats.misses++,this.loadSprite(r.key,r.url,e,!0),null)}preload(t,e){const i=Array.isArray(t)?t:[t];for(const r of i){const n=this.resolveKey(r,e.size,e.color);n&&this.loadSprite(n.key,n.url,e.size,!1)}return this}draw(t,e,i,r,n,s){const l=this.getSprite(e,n,s);if(l){const c=n*Pe();t.drawImage(l,0,0,c,c,i,r,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,i){if(!t||e<=0)return null;const r=e*Pe();if(typeof t=="string"){const{key:n,url:s}=this.resolveIconUrl(t,i);return{key:`${n}@${r}`,url:s}}return t instanceof HTMLImageElement?{key:`img:${t.src}:${i??""}@${r}`,url:t.src}:null}resolveIconUrl(t,e){const i=e??"",r=this.iconRegistry.get(t);if(r){const s=`r:${t}:${i}`;return this.svgDataUrlCache.has(s)||this.svgDataUrlCache.set(s,Ai(r,e)),{key:s,url:this.svgDataUrlCache.get(s)}}const n=t.trimStart();if(n.startsWith("<svg")){const s=`s:${qr(n)}:${i}`;return this.svgDataUrlCache.has(s)||this.svgDataUrlCache.set(s,Ai(n,e)),{key:s,url:this.svgDataUrlCache.get(s)}}return{key:`u:${t}:${i}`,url:t}}loadSprite(t,e,i,r){var l;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=i*Pe();(l=n.decode)==null||l.call(n).then(()=>{const c=document.createElement("canvas");c.width=s,c.height=s;const h=c.getContext("2d");h&&(h.drawImage(n,0,0,s,s),this.spriteCache.set(t,c),this.stats.cacheSize=this.spriteCache.size),r&&this.notifyListeners()}).catch(()=>{}).finally(()=>{this.pendingLoads.delete(t),this.inFlightCount--,this.stats.inFlight=this.inFlightCount,!r&&this.inFlightCount===0&&this.notifyListeners()})}notifyListeners(){this.loadListeners.forEach(t=>t())}}const Et=new Kr;function Zr(o){return Et.onLoad(o)}function dl(o,t={}){Et.register(o,t)}function jr(o,t,e){return Et.getSprite(o,t,e)}function Jr(o,t){Et.preload(o,t)}function Qr(o,t,e,i,r,n){Et.draw(o,t,e,i,r,n)}function tn(o,t){return Et.getImageDirect(o)}function fl(){return Et.getStats()}function gl(){Et.clearSpriteCache()}const Cl=Qr;function ht(o,t,e,i,r,n){if(!t||r<=0)return;const s=jr(t,r,n);if(s){o.drawImage(s,e,i,r,r);return}const l=tn(t);l&&o.drawImage(l,e,i,r,r)}function en(o,t,e,i,r,n,s,l="primary",c=!1,h=!1,d,a,u,f=Ui){const g=Jt,v=r-g*2,C=Math.min(v-Qt,zr),x=s.baseFontFull,m=u?Ki(u,n,x):0,S=Zi(i,m,C,f,d,a),F=e+g,A=_t(h,{x:t,y:e,width:S,height:r}),b=Ji(s,l,c,A),L=t+S*.5,E=F+v*.5;o.roundedRect(t,F,S,v,$i,{fillStyle:b.bgColor,strokeStyle:b.borderColor,lineWidth:At});const B=ji(m,C,f,d,a);let z=L-B*.5;if(d){const nt=E-C*.5;ht(o,d,z,nt,C,b.textColor),z+=C+f}if(o.fillText(n,z,E,x,b.textColor,"middle","left"),a){const nt=z+m+f,O=E-C*.5;ht(o,a,nt,O,C,b.textColor)}return{x:t,y:F,width:S,height:v,actualWidth:S}}function on(o,t,e,i,r,n=Ye,s=Ve,l=!1,c=!1,h,d,a,u=Ui,f){const g=et[s],v=f?f[n]:Xe[n],C=`${g.fontSize}px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`,x=a?Ki(a,r,C):0,m=Zi(i,x,g.iconSize,u,h,d),S=_t(c,{x:t,y:e,width:m,height:g.height}),F=Qi(v,l,S),A=t+m*.5,b=e+g.height*.5;F.bgColor!=="transparent"?o.roundedRect(t,e,m,g.height,g.borderRadius,{fillStyle:F.bgColor,strokeStyle:F.borderColor!=="transparent"?F.borderColor:void 0,lineWidth:F.borderColor!=="transparent"?At:0}):F.borderColor!=="transparent"&&o.roundedRect(t,e,m,g.height,g.borderRadius,{fillStyle:F.bgColor,strokeStyle:F.borderColor,lineWidth:At});const L=ji(x,g.iconSize,u,h,d);let E=A-L*.5;if(h){const B=b-g.iconSize*.5;ht(o,h,E,B,g.iconSize,F.textColor),E+=g.iconSize+u}if(o.fillText(r,E,b,C,F.textColor,"middle","left"),d){const B=E+x+u,z=b-g.iconSize*.5;ht(o,d,B,z,g.iconSize,F.textColor)}return{x:t,y:e,width:m,height:g.height,actualWidth:m}}const vl={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"},pl=(o,t)=>o.length!==6?o:o.slice(0,4)+vl[t],$t="transparent",ml=Object.fromEntries(Object.entries(Xe).map(([o,t])=>o==="secondary"?[o,{bgColor:$t,borderColor:$t,textColor:"#485056B0",bgColorHover:$t,iconColor:"#485056B0",iconColorHovered:"#485056FF"}]:[o,{bgColor:$t,borderColor:$t,textColor:t.bgColor,bgColorHover:$t,iconColor:t.bgColor,iconColorHovered:t.bgColorHover}]));function rn(o,t,e,i,r=Ye,n=Ve,s=!1,l=!1,c){const h=et[n],d=ml[r],a=(c==null?void 0:c.overrideSquareSize)??h.height,u=(c==null?void 0:c.overrideIconSize)??h.iconSize,f=_t(l,{x:t,y:e,width:a,height:a}),g=d,v=t+a*.5,C=e+a*.5,x=v-u*.5,m=C-u*.5;g.bgColor!=="transparent"?o.roundedRect(t,e,a,a,h.borderRadius,{fillStyle:g.bgColor,strokeStyle:g.borderColor!=="transparent"?g.borderColor:void 0,lineWidth:g.borderColor!=="transparent"?At:0}):g.borderColor!=="transparent"&&o.roundedRect(t,e,a,a,h.borderRadius,{fillStyle:g.bgColor,strokeStyle:g.borderColor,lineWidth:At});const S=(c==null?void 0:c.iconColor)??g.iconColor,F=(c==null?void 0:c.iconColorHovered)??(c==null?void 0:c.iconColor)??g.iconColorHovered,A=s?pl(S,40):f?F:S;return ht(o,i,x,m,u,A),{x:t,y:e,width:a,height:a}}function eo(o,t,e,i,r,n,s,l="primary",c=!1,h=!1){const d=Jt,a=r-d*2,u=Math.min(a-Qt,Gi),f=i==="auto"?u:i,g=e+d,v=_t(h,{x:t,y:e,width:f,height:r}),C=Ji(s,l,c,v),x=t+f*.5,m=g+a*.5,S=x-u*.5,F=m-u*.5;return o.roundedRect(t,g,f,a,$i,{fillStyle:C.bgColor,strokeStyle:C.borderColor,lineWidth:At}),ht(o,n,S,F,u,C.iconColor),{x:t,y:g,width:f,height:a}}function nn(o,t,e,i,r=Ye,n=Ve,s=!1,l=!1){const c=et[n],h=Xe[r],d=c.height,a=_t(l,{x:t,y:e,width:d,height:d}),u=Qi(h,s,a),f=t+d*.5,g=e+d*.5,v=f-c.iconSize*.5,C=g-c.iconSize*.5;return u.bgColor!=="transparent"?o.roundedRect(t,e,d,d,c.borderRadius,{fillStyle:u.bgColor,strokeStyle:u.borderColor!=="transparent"?u.borderColor:void 0,lineWidth:u.borderColor!=="transparent"?At:0}):u.borderColor!=="transparent"&&o.roundedRect(t,e,d,d,c.borderRadius,{fillStyle:u.bgColor,strokeStyle:u.borderColor,lineWidth:At}),ht(o,i,v,C,c.iconSize,u.iconColor),{x:t,y:e,width:d,height:d}}const Xo={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 yl(o){return{default:{bgColor:o.surfaceSolidDefault,bgColorTransparent:o.surfaceTransparentSecondary,textColor:o.inverseTextPrimary,textColorOnTransparent:o.textPrimary},accent:{bgColor:o.surfaceAccent,bgColorTransparent:o.surfaceTransparentAccent,textColor:o.onDarkTextPrimary,textColorOnTransparent:o.textAccent},positive:{bgColor:o.surfacePositive,bgColorTransparent:o.surfaceTransparentPositive,textColor:o.onDarkTextPrimary,textColorOnTransparent:o.textPositive},warning:{bgColor:o.surfaceWarning,bgColorTransparent:o.surfaceTransparentWarning,textColor:o.onDarkTextPrimary,textColorOnTransparent:o.textWarning},negative:{bgColor:o.surfaceNegative,bgColorTransparent:o.surfaceTransparentNegative,textColor:o.onDarkTextPrimary,textColorOnTransparent:o.textNegative},dark:{bgColor:o.onLightSurfaceSolidDefault,bgColorTransparent:o.onLightSurfaceTransparentDeep,textColor:o.onDarkTextPrimary,textColorOnTransparent:o.onLightTextPrimary},light:{bgColor:o.onDarkSurfaceSolidDefault,bgColorTransparent:o.onDarkSurfaceTransparentCard,textColor:o.onLightTextPrimary,textColorOnTransparent:o.onDarkTextPrimary}}}const bl="|",Ae=6,Vo=new Map,Yo={xs:10,s:12,m:14,l:16};class sn extends yt{constructor(t,e,i){var r;super(t),this.view="default",this.size="s",this.transparent=!1,this.clear=!1,this.pilled=!1,this.viewColors={},this.text=e,i&&(i.view!==void 0&&(this.view=i.view),i.size!==void 0&&(this.size=i.size),i.transparent!==void 0&&(this.transparent=i.transparent),i.clear!==void 0&&(this.clear=i.clear),i.pilled!==void 0&&(this.pilled=i.pilled),this.leftIcon=i.leftIcon,this.rightIcon=i.rightIcon,this.customColor=i.customColor,this.customBackgroundColor=i.customBackgroundColor,(r=i.theme)!=null&&r.tokens&&(this.viewColors=yl(i.theme.tokens)))}measure(t){const e=Xo[this.size],i=Yo[this.size],r=`${e.fontSize}px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`,n=qo(t,r,this.text);let s=0;this.leftIcon&&(s+=i+Ae),this.rightIcon&&(s+=i+Ae),this.rect.width=n+s+e.paddingX*2,this.rect.height=e.height}onPaint(t,e){const{x:i,y:r,width:n,height:s}=this.rect,l=Xo[this.size],c=Yo[this.size],h=this.viewColors[this.view];if(!h)return;const d=`${l.fontSize}px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`;let a,u;if(this.clear?(a="transparent",u=this.customColor??h.textColorOnTransparent):this.transparent?(a=this.customBackgroundColor??h.bgColorTransparent,u=this.customColor??h.textColorOnTransparent):(a=this.customBackgroundColor??h.bgColor,u=this.customColor??h.textColor),!this.clear){const v=this.pilled?s/2:l.borderRadius;t.roundedRect(i,r,n,s,v,{fillStyle:a})}const f=r+s/2;let g=i+l.paddingX;if(this.leftIcon){const v=f-c/2;ht(t,this.leftIcon,g,v,c,u),g+=c+Ae}if(t.fillText(this.text,g,f,d,u,"middle"),this.rightIcon){const v=qo(e,d,this.text),C=g+v+Ae,x=f-c/2;ht(t,this.rightIcon,C,x,c,u)}}}function qo(o,t,e){const i=`${t}${bl}${e}`;let r=Vo.get(i);return r===void 0&&(o.font=t,r=o.measureText(e).width,Vo.set(i,r)),r}const Fl="default",Sl="s",hi="pointer",Ee=8,xl={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"},Ko=new Map;class ln extends yt{constructor(t,e,i){var r;super(t),this.variant="primary",this.view=Fl,this.size=Sl,this.disabled=!1,this.isHovered=!1,this.useNewApi=!1,this.text=e,super.style={...super.style,cursor:hi},i&&(i.view!==void 0?(this.view=i.view,this.useNewApi=!0):i.variant!==void 0&&(this.variant=i.variant),i.size!==void 0&&(this.size=i.size,this.useNewApi=!0),this.leftIcon=i.leftIcon,this.rightIcon=i.rightIcon,i.disabled!==void 0&&(this.disabled=i.disabled),i.onClick&&(this.onClick=i.onClick),(r=i.theme)!=null&&r.tokens&&(this.viewColors=Mr(i.theme.tokens)))}set style(t){super.style={...super.style,cursor:hi,...t}}get style(){const t=super.style;return t.cursor||(t.cursor=hi),t}measure(t){const e=et[this.size],i=`${e.fontSize}px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`,r=wl(t,this.text,i);let n=0;this.leftIcon&&(n+=e.iconSize+Ee),this.rightIcon&&(n+=e.iconSize+Ee),this.rect.width=r+n+e.paddingX*2,this.rect.height=e.height}onPaint(t,e){const{x:i,y:r,width:n}=this.rect;if(this.useNewApi)on(t,i,r,n,this.text,this.view,this.size,this.disabled,this.isHovered,this.leftIcon,this.rightIcon,e,Ee,this.viewColors);else{const s=et[this.size];en(t,i,r,n,s.height,this.text,xl,this.variant,this.disabled,this.isHovered,this.leftIcon,this.rightIcon,e,Ee)}}onMouseEnter(){this.isHovered=!0}onMouseLeave(){this.isHovered=!1}}function wl(o,t,e){const i=`${e}|${t}`;let r=Ko.get(i);return r===void 0&&(o.font=e,r=o.measureText(t).width,Ko.set(i,r)),r}const Zo=16,jo="black",Jo=0,Al=Math.PI/2,El=1.8,Ut={startX:-3.5,startY:-4.25,middleX:2.75,middleY:0,endX:-3.5,endY:4.25};class Tl extends yt{constructor(t,e={}){super(t),this.rotation=Jo,this.color=jo,this.rotation=e.rotation??Jo,this.color=e.color??jo,this.rect.width=Zo,this.rect.height=Zo}measure(t){}onPaint(t,e){const{x:i,y:r,width:n,height:s}=this.rect,l=i+n/2,c=r+s/2,h=this.rotation*Al;t.custom(d=>{d.save(),d.translate(l,c),d.rotate(h),d.strokeStyle=this.color,d.lineWidth=El,d.lineCap="round",d.lineJoin="round",d.beginPath(),d.moveTo(Ut.startX,Ut.startY),d.lineTo(Ut.middleX,Ut.middleY),d.lineTo(Ut.endX,Ut.endY),d.stroke(),d.restore()})}}const Dl=28,Il="default",Hl="s",Ll="pointer",Pl=20,Bl={accentColor:"#1e88e5",accentLight:"rgba(30, 136, 229, 0.16)",accentFg:"#ffffff",bgCell:"#ffffff",borderColor:"#e0e0e0",textLight:"#9e9e9e"};class Ei extends yt{constructor(t,e,i){super(t),this.view=Il,this.buttonSize=Hl,this.isHovered=!1,this.useNewApi=!1,this.getDisabled=()=>this.disabled?"default":Ll,this.icon=e,this.size=(i==null?void 0:i.size)??"auto",this.variant=(i==null?void 0:i.variant)??"primary",this.disabled=(i==null?void 0:i.disabled)??!1,super.style={...super.style,cursor:this.getDisabled()},(i==null?void 0:i.view)!==void 0&&(this.view=i.view,this.useNewApi=!0),(i==null?void 0:i.buttonSize)!==void 0&&(this.buttonSize=i.buttonSize,this.useNewApi=!0),(i==null?void 0:i.overrideSquareSize)!==void 0&&(this.overrideSquareSize=i.overrideSquareSize),(i==null?void 0:i.overrideIconSize)!==void 0&&(this.overrideIconSize=i.overrideIconSize),(i==null?void 0:i.iconColor)!==void 0&&(this.iconColor=i.iconColor),(i==null?void 0:i.iconColorHovered)!==void 0&&(this.iconColorHovered=i.iconColorHovered),i!=null&&i.onClick&&(this.onClick=r=>{var n;return(n=i.onClick)==null?void 0:n.call(i,r)})}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=et[this.buttonSize],i=this.overrideSquareSize??e.height;this.rect.height=i,this.rect.width=i}else{const e=Qo(this.size);this.rect.height=e.height,this.rect.width=e.width}}onPaint(t,e){const{x:i,y:r,width:n,height:s}=this.rect;if(this.useNewApi){const l=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(rn(t,i,r,this.icon,this.view,this.buttonSize,this.disabled,this.isHovered,l),Bt.DEBUG){const c=et[this.buttonSize],h=this.overrideSquareSize??c.height,d=this.overrideIconSize??c.iconSize,a=i+(h-d)*.5,u=r+(h-d)*.5;t.strokeRect(a,u,d,d,"cyan",1)}}else eo(t,i,r,n,s,this.icon,Bl,this.variant,this.disabled,this.isHovered)}onMouseEnter(){this.isHovered=!0}onMouseLeave(){this.isHovered=!1}containsHitPoint(t,e){if(this.useNewApi){const n=et[this.buttonSize],s=this.overrideSquareSize??n.height,l={x:this.rect.x,y:this.rect.y,width:s,height:s};return tr(t,e,l)}const i=Qo(this.size,this.rect.height),r=_l(this.rect.x,this.rect.y,i);return tr(t,e,r)}}function Qo(o,t){const e=typeof o=="number"?o:t??Dl,i=0,r=Jt,n=Math.min(e-r*2-Qt,Pl),s=typeof o=="number"?o:n+i*2;return{height:e,width:s,paddingX:i,paddingY:r,iconSize:n}}function _l(o,t,e){return{x:o+e.paddingX,y:t+e.paddingY,width:e.width-e.paddingX*2,height:e.height-e.paddingY*2}}function tr(o,t,e){return o>=e.x&&o<=e.x+e.width&&t>=e.y&&t<=e.y+e.height}const Rl=16,kl="transparent";class cn extends yt{constructor(t,e,i){super(t),this.icon=e,this.size=(i==null?void 0:i.size)??Rl,this.color=i==null?void 0:i.color}measure(t){this.rect.width=this.size,this.rect.height=this.size}onPaint(t,e){const{x:i,y:r,width:n,height:s}=this.rect;this.backgroundColor&&this.backgroundColor!==kl&&t.fillRect(i,r,n,s,this.backgroundColor),ht(t,this.icon,i,r,this.size,this.color)}}const Ml=28,zl="default",Ol="s",di="pointer",Nl=20,Wl={accentColor:"#1e88e5",accentLight:"rgba(30, 136, 229, 0.16)",accentFg:"#ffffff",bgCell:"#ffffff",borderColor:"#e0e0e0",textLight:"#9e9e9e"};class an extends yt{constructor(t,e,i){super(t),this.view=zl,this.buttonSize=Ol,this.isHovered=!1,this.useNewApi=!1,this.icon=e,this.size=(i==null?void 0:i.size)??"auto",this.variant=(i==null?void 0:i.variant)??"primary",this.disabled=(i==null?void 0:i.disabled)??!1,super.style={...super.style,cursor:di},(i==null?void 0:i.view)!==void 0&&(this.view=i.view,this.useNewApi=!0),(i==null?void 0:i.buttonSize)!==void 0&&(this.buttonSize=i.buttonSize,this.useNewApi=!0),i!=null&&i.onClick&&(this.onClick=r=>{var n;return(n=i.onClick)==null?void 0:n.call(i,r)})}set style(t){super.style={...super.style,cursor:di,...t}}get style(){const t=super.style;return t.cursor||(t.cursor=di),t}measure(t){if(this.useNewApi){const e=et[this.buttonSize];this.rect.height=e.height,this.rect.width=e.height}else{const e=er(this.size);this.rect.height=e.height,this.rect.width=e.width}}onPaint(t,e){const{x:i,y:r,width:n,height:s}=this.rect;this.useNewApi?nn(t,i,r,this.icon,this.view,this.buttonSize,this.disabled,this.isHovered):eo(t,i,r,n,s,this.icon,Wl,this.variant,this.disabled,this.isHovered)}onMouseEnter(){this.isHovered=!0}onMouseLeave(){this.isHovered=!1}containsHitPoint(t,e){if(this.useNewApi){const n=et[this.buttonSize],s={x:this.rect.x,y:this.rect.y,width:n.height,height:n.height};return ir(t,e,s)}const i=er(this.size,this.rect.height),r=Gl(this.rect.x,this.rect.y,i);return ir(t,e,r)}}function er(o,t){const e=typeof o=="number"?o:t??Ml,i=0,r=Jt,n=Math.min(e-r*2-Qt,Nl),s=typeof o=="number"?o:n+i*2;return{height:e,width:s,paddingX:i,paddingY:r,iconSize:n}}function Gl(o,t,e){return{x:o+e.paddingX,y:t+e.paddingY,width:e.width-e.paddingX*2,height:e.height-e.paddingY*2}}function ir(o,t,e){return o>=e.x&&o<=e.x+e.width&&t>=e.y&&t<=e.y+e.height}const re="transparent",$l=0;class un extends yt{constructor(t,e=re){super(t),this.color=re,this.borderColor=re,this.borderWidth=$l,this.color=e}measure(t){const{style:e,rect:i}=this;typeof e.width=="number"&&(i.width=e.width),typeof e.height=="number"&&(i.height=e.height)}onPaint(t,e){const{x:i,y:r,width:n,height:s}=this.rect;if(this.color!==re&&t.fillRect(i,r,n,s,this.color),this.borderWidth>0&&this.borderColor!==re){const l=this.borderWidth/2;t.strokeRect(i+l,r+l,n-this.borderWidth,s-this.borderWidth,this.borderColor,this.borderWidth)}}}const hn="|",Ul=2,Xl=1e4,Ti=new Map,Di=new Map;function dn(o,t,e){o.size>=Xl&&o.clear(),o.set(t,e)}function Vl(o,t){return`${o}${hn}${t}`}function Yl({text:o,font:t,maxWidth:e,textOverflow:i,ellipsis:r,forceEllipsis:n}){return[t,o,e.toFixed(Ul),i,r,n?"force":"normal"].join(hn)}function Ii(o,t,e){const i=Vl(e,t);let r=Ti.get(i);return r===void 0&&(o.font=e,r=o.measureText(t).width,dn(Ti,i,r)),r}function ql(o){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(o),({segment:i})=>i)}return Array.from(o)}function Kl(o,t,e,i,r){const n=Ii(o,r,e);if(n>i)return{text:"",didTruncate:!0,width:0};const s=ql(t);let l=0,c=s.length,h=r,d=n;for(;l<=c;){const a=Math.floor((l+c)/2),u=`${s.slice(0,a).join("")}${r}`,f=Ii(o,u,e);f<=i?(h=u,d=f,l=a+1):c=a-1}return{text:h,didTruncate:!0,width:d}}function Hi(o){const{ctx:t,text:e,font:i,maxWidth:r,textOverflow:n,ellipsis:s,forceEllipsis:l=!1}=o,c=Math.max(0,r);if(c<=0||e.length===0&&!(l&&n==="ellipsis"))return{text:"",didTruncate:e.length>0,width:0};const h=Yl({text:e,font:i,maxWidth:c,textOverflow:n,ellipsis:s,forceEllipsis:l}),d=Di.get(h);if(d)return d;const a=Ii(t,e,i);let u;return a<=c&&!l?u={text:e,didTruncate:!1,width:a}:n==="clip"?u={text:e,didTruncate:!0,width:a}:u=Kl(t,e,i,c,s),dn(Di,h,u),u}function or({ctx:o,lines:t,font:e,maxWidth:i,maxLines:r,textOverflow:n,ellipsis:s}){const l=Math.max(0,Math.floor(r)),c=Math.min(t.length,l),h=t.slice(0,c),d=t.length>c;if(n==="ellipsis"&&h.length>0){const a=h.length-1,u=h[a]??"";h[a]=Hi({ctx:o,text:u,font:e,maxWidth:i,textOverflow:n,ellipsis:s,forceEllipsis:d}).text}return{lines:h,didClamp:d}}function Zl(){Ti.clear(),Di.clear()}const jl="14px sans-serif",Jl="black",Ql=1,tc=14,ec="visible",ic="clip",oc="…",rc=/(\d*\.?\d+)px/,pt="|",nc=30,sc=`${pt}precise-wrap`,lc=1e4,cc=5e3,ac=/[\u0300-\u036F\u1AB0-\u1AFF\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F\u200D\uFE0E\uFE0F\u2600-\u27BF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/,Li=new Map,Pi=new Map,Bi=new Map;let fi=null;function uc(){return fi===null&&typeof document<"u"&&(fi=document.createElement("canvas").getContext("2d")),fi}function fn(o,t,e,i){o.size>=i&&o.clear(),o.set(t,e)}function hc(o,t,e,i){return`${o}${pt}${t}${pt}${e??""}${pt}${i??""}`}function dc(o,t){return`${o}${pt}${t}`}function fc(o,t,e){return`${o}${pt}${t}${pt}${e}`}function gn(o,t,e,i){return`${o}${pt}${t}${pt}${e}${pt}${i}`}class io extends Bt{constructor(t,e,i){super(t),this.font=jl,this.color=Jl,this.wordWrap=!1,this.lineHeight=Ql,this.overflow=ec,this.textOverflow=ic,this.ellipsis=oc,this.lastMeasureKey="",this.cachedLines=null,this.cachedLinesKey="",this.lastPaintedTextWidth=0,this.text=e,i&&(i.font&&(this.font=i.font),i.fontSize!==void 0&&(this.fontSize=i.fontSize),i.lineHeightPx!==void 0&&(this.lineHeightPx=i.lineHeightPx),i.color&&(this.color=i.color),i.wordWrap!==void 0&&(this.wordWrap=i.wordWrap),i.lineHeight!==void 0&&(this.lineHeight=i.lineHeight,this.lineHeightPx=void 0),i.overflow!==void 0&&(this.overflow=i.overflow),i.textOverflow!==void 0&&(this.textOverflow=i.textOverflow),i.ellipsis!==void 0&&(this.ellipsis=i.ellipsis),i.maxLines!==void 0&&(this.maxLines=i.maxLines),i.autoTooltip!==void 0&&(this.autoTooltip=i.autoTooltip))}measure(t){const{font:e,text:i,wordWrap:r,lineHeight:n,rect:s,fontSize:l}=this,{lineHeightPx:c}=rr(e,n,l,this.lineHeightPx);this.isSingleLineClampEnabled()?this.measureSingleLineClamp(t,e,i,c,s):r?this.measureWordWrap(t,e,i,c,s):this.measureSingleLine(t,e,i,c,s)}measureWordWrap(t,e,i,r,n){const s=nr(this.style.width,n.width);if(s>0){const l=this.getResolvedMaxLines(),h=!(this.overflow==="hidden"&&l!==void 0&&l>1&&Cc(i)),d=gn(e,i,s,h);(d!==this.cachedLinesKey||this.cachedLines===null)&&(this.cachedLines=gc(t,i,e,s,h),this.cachedLinesKey=d),n.width=s;const a=l!==void 0&&this.overflow==="hidden"?Math.min(this.cachedLines.length,l):this.cachedLines.length;n.height=a*r}else n.width=Te(t,i,e),n.height=r,this.cachedLines=null}measureSingleLineClamp(t,e,i,r,n){const s=nr(this.style.width,n.width);s>0?(n.width=s,n.height=r):(n.width=Te(t,i,e),n.height=r),this.cachedLines=null}measureSingleLine(t,e,i,r,n){const s=fc(e,i,r);s!==this.lastMeasureKey&&(this.lastMeasureKey=s,n.width=Te(t,i,e),n.height=r),this.cachedLines=null}getLastPaintedTextWidth(){return this.lastPaintedTextWidth}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 r=this.text;if(e&&typeof e.text=="function"?r=e.text(this.text):e&&typeof e.text=="string"&&(r=e.text),r===null||r==="")return;if(!e)return r;const{enabled:n,text:s,...l}=e;return{...l,text:r}}computeIsTruncated(){if(this.overflow!=="hidden"||this.textOverflow!=="ellipsis")return!1;const t=uc();if(!t)return!1;const e=this.cachedLines;if(e!==null&&e.length>0){const i=this.getResolvedMaxLines();return i===void 0?!1:or({ctx:t,lines:e,font:this.font,maxWidth:this.rect.width,maxLines:i,textOverflow:this.textOverflow,ellipsis:this.ellipsis}).didClamp}return Hi({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:i,text:r,rect:n,color:s}=this,l=this.cachedLines;l!==null&&l.length>0?this.paintMultiline(t,e,i,s,l,n):this.paintSingleLine(t,e,r,i,s,n)}paintMultiline(t,e,i,r,n,s){const{lineHeightPx:l}=rr(i,this.lineHeight,this.fontSize,this.lineHeightPx),c=this.getResolvedMaxLines(),h=this.isMultilineClampEnabled()&&c!==void 0?or({ctx:e,lines:n,font:i,maxWidth:s.width,maxLines:c,textOverflow:this.textOverflow,ellipsis:this.ellipsis}).lines:n,d=h.length*l;let a=s.y+Math.max(0,(s.height-d)*.5);this.lastPaintedTextWidth=0;for(let u=0,f=h.length;u<f;u+=1){const g=h[u];g!==void 0&&(this.overflow==="hidden"?t.fillTextClipped(g,s.x,a,i,r,s,"top","left"):t.fillText(g,s.x,a,i,r,"top"),a+=l)}}paintSingleLine(t,e,i,r,n,s){const l=s.y+s.height*.5;if(this.overflow==="hidden"){const c=Hi({ctx:e,text:i,font:r,maxWidth:s.width,textOverflow:this.textOverflow,ellipsis:this.ellipsis});if(this.lastPaintedTextWidth=Math.min(c.width,Math.max(0,s.width)),c.text.length===0)return;t.fillTextClipped(c.text,s.x,l,r,n,s,"middle","left");return}this.lastPaintedTextWidth=Te(e,i,r),t.fillText(i,s.x,l,r,n,"middle")}}function rr(o,t,e,i){const r=hc(o,t,e,i);let n=Li.get(r);if(n===void 0){const s=rc.exec(o),l=e??(s&&s[1]!==void 0?Number(s[1]):tc);n={fontSize:l,lineHeightPx:i??l*t},Li.set(r,n)}return n}function Te(o,t,e){const i=dc(e,t);let r=Pi.get(i);return r===void 0&&(o.font=e,r=o.measureText(t).width,fn(Pi,i,r,lc)),r}function gc(o,t,e,i,r){o.font=e;const n=Math.max(i,nc),s=gn(e,t,n,r);let l=Bi.get(s);if(!l){const c=r?e:`${e}${sc}`;l=vc(Ns.split(o,t,c,n,r)),fn(Bi,s,l,cc)}return l}function nr(o,t){return typeof o=="number"&&o>0?o:t>0?t:0}function Cc(o){return ac.test(o)}function vc(o){if(Array.isArray(o))return o;const t=o;return t.lines&&Array.isArray(t.lines)?t.lines:[]}function pc(){Li.clear(),Pi.clear(),Bi.clear(),Zl()}const le={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},sr=16,ne=16,Cn=90,lr="rgba(8, 8, 8, 0.08)",mc=4e3,yc=1920,bc="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% )",Fc="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 cr=null;const Sc={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 vn extends yt{constructor(t,e){super(t),this._gradientStops=null,this._gradientAngle=Cn;const i=(e==null?void 0:e.customGradientColor)??(e!=null&&e.lighter?Fc:bc),r=Ec(i);r&&(this._gradientStops=r.stops,this._gradientAngle=r.angle),this.borderRadius=xc(e==null?void 0:e.roundness),this.animated=(e==null?void 0:e.animated)??!0,this.shimmerDuration=(e==null?void 0:e.shimmerDuration)??mc}measure(t){const{style:e,rect:i}=this;typeof e.width=="number"&&(i.width=e.width),typeof e.height=="number"&&(i.height=e.height)}onPaint(t,e){var f;const{x:i,y:r,width:n,height:s}=this.rect;if(n<=0||s<=0)return;const{_gradientStops:l,borderRadius:c}=this;if(!l||l.length<2){c>0?t.roundedRect(i,r,n,s,c,{fillStyle:lr}):t.fillRect(i,r,n,s,lr);return}const h=t.getAnimationContext(),d=h==null?void 0:h.frameTime;if(!this.animated||d===void 0){t.linearGradientRect(i,r,n,s,c,l,this._gradientAngle);return}cr??(cr=d);const u=(d-cr)%this.shimmerDuration/this.shimmerDuration;t.custom(g=>{g.save(),g.beginPath(),c>0?g.roundRect(i,r,n,s,c):g.rect(i,r,n,s),g.clip();const{startX:v,startY:C,endX:x,endY:m}=Tc(i,r,s,u),S=g.createLinearGradient(v,C,x,m);for(const F of l)S.addColorStop(F.offset,F.color);g.fillStyle=S,g.fillRect(i,r,n,s),g.restore()}),(f=h==null?void 0:h.requestAnimationFrame)==null||f.call(h)}}function ar(o){return o in le}function xc(o){if(o===void 0)return le[sr]*ne;if(typeof o=="number")return ar(o)?le[o]*ne:o;const t=o.trim(),e=Number(t);if(!Number.isNaN(e))return ar(e)?le[e]*ne:e;const i=t.match(/^(-?\d+(?:\.\d+)?)px$/i);if(i){const[,n]=i;return parseFloat(n)}const r=t.match(/^(-?\d+(?:\.\d+)?)rem$/i);if(r){const[,n]=r;return parseFloat(n)*ne}return le[sr]*ne}function wc(o){var i;const t=o.trim(),e=t.match(/^var\s*\(\s*[^,]+,\s*([\s\S]+)\s*\)$/i);return((i=e==null?void 0:e[1])==null?void 0:i.trim())??t}function Ac(o,t){switch(t.toLowerCase()){case"rad":return o*180/Math.PI;case"turn":return o*360;case"grad":return o*180/200;default:return o}}function Ec(o){const e=wc(o).match(/^linear-gradient\s*\(([\s\S]+)\)$/i);if(!(e!=null&&e[1]))return null;const i=[];let r="",n=0;for(const u of e[1])u==="("&&n++,u===")"&&n--,u===","&&n===0?(i.push(r.trim()),r=""):r+=u;r.trim()&&i.push(r.trim());const[s]=i;if(i.length<2||!s)return null;let l=Cn,c=0;const h=s.match(/^(-?\d+(?:\.\d+)?)(deg|rad|turn|grad)?$/i);if(h!=null&&h[1]){const[,u,f="deg"]=h;l=Ac(parseFloat(u),f),c=1}else if(s.startsWith("to ")){const u=s.substring(3).trim().toLowerCase(),f=Sc[u];f!==void 0&&(l=f,c=1)}const d=[],a=i.slice(c);for(let u=0;u<a.length;u++){const f=a[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,x]=g,m=x==="%"?parseFloat(C)/100:a.length>1?u/(a.length-1):0;d.push({offset:Math.max(0,Math.min(1,m)),color:v})}return d.length<2?null:{stops:d,angle:l}}function Tc(o,t,e,i){const r=yc,n=i*r,s=o-r+n,l=o+r+n,c=t+e/2;return{startX:s,startY:c,endX:l,endY:c}}function Dc(o,t){const e=o.replace("#","");let i,r,n,s=255;e.length===3||e.length===4?(i=parseInt(e[0]+e[0],16),r=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),e.length===4&&(s=parseInt(e[3]+e[3],16))):(i=parseInt(e.slice(0,2),16),r=parseInt(e.slice(2,4),16),n=parseInt(e.slice(4,6),16),e.length===8&&(s=parseInt(e.slice(6,8),16)));const l=Math.round(s*t),c=h=>h.toString(16).padStart(2,"0");return`#${c(i)}${c(r)}${c(n)}${c(l)}`}function Ic(o){return{default:{color:o.textPrimary,colorHover:o.textPrimaryHover,colorActive:o.textPrimaryActive},accent:{color:o.textAccent,colorHover:o.textAccentHover,colorActive:o.textAccentActive},secondary:{color:o.textSecondary,colorHover:o.textSecondaryHover,colorActive:o.textSecondaryActive},tertiary:{color:o.textTertiary,colorHover:o.textTertiaryHover,colorActive:o.textTertiaryActive},paragraph:{color:o.textParagraph,colorHover:o.textParagraphHover,colorActive:o.textParagraphActive},positive:{color:o.textPositive,colorHover:o.textPositiveHover,colorActive:o.textPositiveActive},warning:{color:o.textWarning,colorHover:o.textWarningHover,colorActive:o.textWarningActive},negative:{color:o.textNegative,colorHover:o.textNegativeHover,colorActive:o.textNegativeActive},clear:{color:o.textPrimary,colorHover:o.textPrimaryHover,colorActive:o.textPrimaryActive}}}const Hc="default",gi="pointer",Lc=.4,Pc=2,Bc=1;class pn extends io{constructor(t,e,i){var r;super(t,e,i),this.view=Hc,this.disabled=!1,this.isHovered=!1,this.isActive=!1,this.hasCustomColor=!1,super.style={...super.style,cursor:gi},i&&(this.href=i.href,this.target=i.target,this.rel=i.rel,i.view!==void 0&&(this.view=i.view),i.disabled!==void 0&&(this.disabled=i.disabled),this.hasCustomColor=i.color!==void 0,(r=i.theme)!=null&&r.tokens&&(this.viewColors=Ic(i.theme.tokens))),!this.hasCustomColor&&this.viewColors&&(this.color=this.viewColors[this.view].color)}set style(t){super.style={...super.style,cursor:gi,...t}}get style(){const t=super.style;return t.cursor=this.disabled?"not-allowed":gi,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=Dc(t,Lc)),t}onPaint(t,e){const i=this.color;this.color=this.resolveColor(),super.onPaint(t,e);const{view:r,isHovered:n,wordWrap:s}=this,c=!s&&(r==="default"||r==="clear"||!this.disabled&&n),h=this.getLastPaintedTextWidth();c&&h>0&&this.paintUnderline(t,h),this.color=i}paintUnderline(t,e){const{x:i,y:r,height:n}=this.rect,s=r+n+Pc,l=this.resolveColor();t.custom(c=>{c.beginPath(),c.moveTo(i,s),c.lineTo(i+e,s),c.strokeStyle=l,c.lineWidth=Bc,c.stroke()})}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 i=t.preventDefault;t.preventDefault=()=>{e=!0,i.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)}}}let ce=0;const ke=new Set;function _c(){ce++,ce===1&&ke.forEach(t=>t(!0));let o=!1;return()=>{o||(o=!0,ce--,ce===0&&ke.forEach(t=>t(!1)))}}function Rc(){return ce>0}function kc(o){return ke.add(o),()=>{ke.delete(o)}}const Me="basic-grid-canvas-portal-hover",Mc=400;let zc=0;const Ci="__canvasPortalTargetId";function Oc(o){var i;if(!o)return"window";const t=o;if((i=t.dataset)!=null&&i.portalTargetId)return t.dataset.portalTargetId;const e=o;return e[Ci]||(e[Ci]=++zc),String(e[Ci])}const jt=new Map;function Nc(o,t){return`${o??"default"}:${t??"default"}`}function _i(o,t){const e=new CustomEvent(Me,{detail:o});t?t.dispatchEvent(e):window.dispatchEvent(e)}function ur(o){const t=jt.get(o);t!==void 0&&(window.clearTimeout(t),jt.delete(o))}function Wc(o){const t=`${o}:`;for(const[e,i]of jt.entries())e.startsWith(t)&&(window.clearTimeout(i),jt.delete(e))}function Gc(o,t,e){const i=window.setTimeout(()=>{jt.delete(o),_i(t,e)},Mc);jt.set(o,i)}function he(o,t,e){if(typeof window>"u")return;const i=Oc(t),r=`${i}:${Nc(o.source,o.originId)}`;o.visible?(Wc(i),_i(o,t)):e?(ur(r),_i(o,t)):(ur(r),Gc(r,o,t))}function $c(o,t){if(typeof window>"u")return()=>{};const e=t??window,i=r=>{const n=r;n.detail&&o(n.detail)};return e.addEventListener(Me,i),()=>{e.removeEventListener(Me,i)}}const Uc="cell";class mt{constructor(t,e){this.bounds=null,this.batcher=new Ue,this.portalEventTarget=null,this.tooltipContext=void 0,this.rootNode=t,this.hoverController=new Wi({onCursorChange:i=>{var r;return(r=this.onCursorChange)==null?void 0:r.call(this,i)},portalHoverDispatch:he,getPortalEventTarget:()=>this.portalEventTarget,portalSource:Uc,getTooltipContext:()=>this.tooltipContext})}setPortalEventTarget(t){this.portalEventTarget=t}setTooltipContext(t){this.tooltipContext=t}setRootNode(t){this.rootNode=t}setOriginId(t){}render(t,e,i,r,n){this.bounds={...r??e},this.hoverController.setAbsoluteBounds(this.bounds),t.save(),t.translate(e.x,e.y),this.prepareRootNode(t,e),i?this.dispatchPointerEvent("mousemove",i.x,i.y):this.handleMouseLeave(),this.batcher.clear(),this.batcher.setAnimationContext(n),this.rootNode.paint(this.batcher,t),this.batcher.flush(t),t.restore()}dispatchPointerEvent(t,e,i,r){var d;if(!this.bounds)return{propagationStopped:!1,suppressGridDefault:!1};const n=this.rootNode.hitTest(e,i),s=(d=n.find(a=>a.interaction!==void 0))==null?void 0:d.interaction;let l=!1,c=!1;const h={type:t,x:e,y:i,originalEvent:r??{},target:n[0],stopPropagation:()=>{l=!0},preventDefault:()=>{c=!0,r==null||r.preventDefault()}};return n.length===0?(t==="mousemove"&&this.hoverController.handlePointerMove([],null),{propagationStopped:!1,suppressGridDefault:c,...s?{interaction:s}:{}}):(this.dispatchEventToNodes(n,h,t),t==="mousemove"&&this.hoverController.handlePointerMove(n,h),{propagationStopped:l,suppressGridDefault:c,...s?{interaction:s}:{}})}getInteractionAtPoint(t,e){var i;if(this.bounds)return(i=this.rootNode.hitTest(t,e).find(r=>r.interaction))==null?void 0:i.interaction}dispatchEventToNodes(t,e,i){let r=!1;const n={...e,stopPropagation:()=>{r=!0,e.stopPropagation()}};for(const s of t){if(r)break;const l={...n,currentTarget:s};this.invokeNodeHandler(s,i,l)}}invokeNodeHandler(t,e,i){switch(e){case"click":t.onClick({...i,cellBounds:this.bounds});break;case"mousedown":t.onMouseDown(i);break;case"mouseup":t.onMouseUp(i);break;case"dblclick":t.onDoubleClick(i);break;case"mousemove":t.onMouseMove(i);break;case"mouseenter":t.onMouseEnter(i);break;case"mouseleave":t.onMouseLeave(i);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 ft?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 qe="canvas-cell";function mn(o,t,e,i){return{kind:H.GridCellKind.Custom,allowOverlay:!1,readonly:!0,copyData:e??"",data:{kind:qe,render:o,onClick:t},...i}}function oo(o){var e;const t=o;return!!(t&&t.kind===H.GridCellKind.Custom&&((e=t.data)==null?void 0:e.kind)===qe)}const ae=5,yn=[["hoverX","hoverY"],["mouseX","mouseY"],["pointerX","pointerY"],["posX","posY"],["x","y"]],bn="default",Fn="pointer";function Sn(o,t){for(const[e,i]of yn){const r=o[e],n=o[i];if(typeof r=="number"&&typeof n=="number"&&!Number.isNaN(r)&&!Number.isNaN(n)){if(xn(r,n,t))return{x:r-t.x,y:n-t.y};if(wn(r,n,t))return{x:r,y:n}}}}function xn(o,t,e){return o>=e.x&&o<=e.x+e.width&&t>=e.y&&t<=e.y+e.height}function wn(o,t,e){return o>=-ae&&o<=e.width+ae&&t>=-ae&&t<=e.height+ae}function An(o,t,e){if((o==null?void 0:o.canvasRoot)instanceof mt){const i=e?"nativeEvent"in e?e.nativeEvent:e:void 0;return o.canvasRoot.dispatchPointerEvent("click",t.x,t.y,i)}return{propagationStopped:!1,suppressGridDefault:!1}}function En(o,t){if(o!=null&&o.clickHandlers&&Array.isArray(o.clickHandlers)){for(const{area:e,handler:i}of o.clickHandlers)if(to(t.x,t.y,e))return i(),!0}return!1}function Tn(o,t,e,i,r,n){const{onClick:s}=o.data;return s?!!s(t.x,t.y,e,i,r,n??void 0):!1}const Ri=new WeakMap,Dn=new Map;function In(o,t,e){const i={...e??{}};return delete i.hoveredAreas,Dn.set(o,i),t.data.renderData=i,i}function Zt(o,t){return t.data.renderData??Dn.get(o)}function Hn(o,t){var i,r;(((i=Ri.get(o))==null?void 0:i.hovered)??!1)!==t&&(Ri.set(o,{hovered:t}),t?(r=o.onMouseEnter)==null||r.call(o):Xc(o))}function Xc(o){const{renderData:t}=o;(t==null?void 0:t.canvasRoot)instanceof mt&&t.canvasRoot.forcePortalHide()}function Ln(o){var t;return(t=Ri.get(o))==null?void 0:t.hovered}function Pn(o,t,e,i){var r;if(o instanceof mt)if(t){if(e.event){const s="nativeEvent"in e.event?e.event.nativeEvent:e.event;o.dispatchPointerEvent("mousemove",t.x,t.y,s)}const n=o.computeCursor(t.x,t.y);n&&n!==bn&&((r=i.overrideCursor)==null||r.call(i,n))}else o.handleMouseLeave(),o.forcePortalHide()}function Bn(o,t,e,i,r){var c;const n=!!(t&&e.some(h=>to(t.x,t.y,h))),s=Ln(o)??!1,l=!!t;l!==s&&Hn(o,l),n&&!i&&((c=r.overrideCursor)==null||c.call(r,Fn))}function ro({cell:o,rect:t,relativePoint:e,renderData:i,rowData:r,rowIndex:n,event:s}){const l=An(i,e,s);return l.propagationStopped?{handled:!0,propagationStopped:!0,suppressGridDefault:l.suppressGridDefault}:En(i,e)?{handled:!0,propagationStopped:!1,suppressGridDefault:l.suppressGridDefault}:Tn(o,e,t,r,n,i)?{handled:!0,propagationStopped:!1,suppressGridDefault:l.suppressGridDefault}:{handled:!1,propagationStopped:!1,suppressGridDefault:l.suppressGridDefault}}function _n(o){const t=o.selection==="keep",e=o.cellClick==="stop",i=o.editor==="never",r=o.contextMenu==="keep-selection"?"manual-keep-selection":o.contextMenu==="none"?"none":"normal";return{suppressEarlyGridSelect:t,suppressExternalCellClick:e,suppressGridDefaultFor:{pointerdown:t,click:i,contextmenu:r!=="normal"},contextMenuMode:r,...o.editor==="open-on-click"?{editorRequest:{target:"self"}}:{}}}function Vc({decision:o,propagationStopped:t,suppressGridDefault:e}){const i=o.suppressGridDefaultFor.click||e,r={suppressExternalCellClick:o.suppressExternalCellClick||t,suppressGridDefaultForClick:i};return!i&&o.editorRequest&&(r.editorRequest=o.editorRequest),r}function Rn({renderData:o,relativePoint:t}){const e=(o==null?void 0:o.canvasRoot)instanceof mt?o.canvasRoot.getInteractionAtPoint(t.x,t.y):void 0;return e?{handled:!0,suppressEarlyGridSelect:_n(e).suppressEarlyGridSelect,interaction:e}:{handled:!1,suppressEarlyGridSelect:!1}}function no(o={}){return{kind:H.GridCellKind.Custom,isMatch:t=>{var e;return((e=t.data)==null?void 0:e.kind)===qe},needsHover:!0,needsHoverPosition:!0,onSelect:t=>{var u;const e=t.cell,i=t.bounds,r=xi(t);if(!r)return;const n=wi(r,i),s=Le(t),l=Kt(s,i),c=Zt(l,e),h=Rn({renderData:c,relativePoint:n}),d=t.location??[s.colIndex,s.rowIndex],a=h.interaction&&o.beginOrGetInteractionSession?o.beginOrGetInteractionSession({cell:d,relativePoint:n,interaction:h.interaction,source:"pointer",...t.button!==void 0?{button:t.button}:{}}):void 0;(a!=null&&a.decision.suppressEarlyGridSelect||h.suppressEarlyGridSelect)&&((u=t.preventDefault)==null||u.call(t))},onClick:t=>{var u,f;const e=t.cell,i=t.bounds,r=xi(t);if(!r)return;const n=wi(r,i),s=Le(t),l=Kt(s,i),c=Zt(l,e),h=t.location??[s.colIndex,s.rowIndex],a=((u=o.consumeCanvasClickResult)==null?void 0:u.call(o,{cell:h,relativePoint:n,...t.button!==void 0?{button:t.button}:{}}))??ro({cell:e,rect:i,relativePoint:n,renderData:c,rowData:t.row??t.rowData,rowIndex:s.rowIndex,event:t.event});a.suppressGridDefault&&((f=t.preventDefault)==null||f.call(t)),a.handled},draw:(t,e)=>{const{ctx:i,rect:r,theme:n}=t,{render:s}=e.data,l=t.cellFillColor!==void 0?{...n,bgCell:t.cellFillColor}:n,c=Le(t),h=Kt(c,r),d={hoverX:t.hoverX,hoverY:t.hoverY,row:t.row,rowData:t.rowData,event:t.event,frameTime:t.frameTime,requestAnimationFrame:t.requestAnimationFrame},a=Yr(t.hoverX,t.hoverY,r)??Sn(d,r);i.save();const u=Zt(h,e),f=s(i,r,l,a==null?void 0:a.x,a==null?void 0:a.y,{...d,canvasRoot:u==null?void 0:u.canvasRoot}),g=(f==null?void 0:f.hoveredAreas)??[];In(h,e,f);const v=(f==null?void 0:f.canvasRoot)??(u==null?void 0:u.canvasRoot);Pn(v,a,d,t),Bn(e.data,a,g,v,t),i.restore()},onPaste:()=>{}}}const Yc=no(),ze=new Map;function kn(o){const t=qc(o),e=ze.get(t);if(e)return e;const r=Ws.renderToString(o).match(/<svg[\s\S]*?<\/svg>/);if(!r)return console.warn("Could not extract SVG from React icon component:",o.type),"";const n=r[0];return ze.set(t,n),n}function qc(o){const t=o.type,e=typeof t=="function"||typeof t=="object"?t.displayName||t.name||"Anonymous":String(t),{size:i,color:r,className:n}=o.props||{},s=JSON.stringify({size:i,color:r,className:n});return`${e}:${s}`}function xt(o){return p.isValidElement(o)}function vt(o){return typeof o=="string"?o:xt(o)?kn(o):""}function Kc(){ze.clear()}function Zc(){return ze.size}const ki=o=>{if(o===void 0)return;if(typeof o=="number")return o;const t=o.trim();if(t==="100%")return"100%";const e=t.match(/^(-?\d+(?:\.\d+)?)px$/i);if(e)return Number(e[1]);const i=t.match(/^(-?\d+(?:\.\d+)?)rem$/i);if(i)return Number(i[1])*16;const r=Number(t);if(!Number.isNaN(r))return r},hr={small:{radius:4,stroke:1.5},medium:{radius:4,stroke:1.5},big:{radius:6,stroke:2}};function jc(o,t,e,i,r,n,s,l,c,h,d=!1,a=!1){const f=s-0,v=Math.min(f-0,Gi),C=n==="auto"?v:n,x=e+0,m=(c==null?void 0:c.rowSize)||"medium",S=!i&&!r,F=_t(a,{x:t,y:e,width:C,height:s}),A=ul(c,i,r,F,d),b=t+C*.5,L=x+f*.5,E=b-v*.5,B=L-v*.5;return o.roundedRect(t,x,C,f,hr[m].radius,{fillStyle:A.bgColor,strokeStyle:A.borderColor,lineWidth:S?hr[m].stroke:void 0}),ht(o,l,E,B,v,A.iconColor),{x:t,y:x,width:C,height:f}}const Jc=28,Qc="default",ta="s",dr="pointer",ea=20,Mi={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>'},ia=Object.values(Mi),oa={accentColor:"#1e88e5",accentFg:"#ffffff"};class ra extends yt{constructor(t,e,i=!1,r=!1,n){super(t),this.view=Qc,this.buttonSize=ta,this.isHovered=!1,this.useNewApi=!1,this.icon=e,this.checked=i,this.indeterminate=r,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":dr},!this.disabled&&(n!=null&&n.onClick)&&(this.onClick=s=>{var l;return(l=n.onClick)==null?void 0:l.call(n,s)})}set style(t){super.style={...super.style,...t}}get style(){const t=super.style;return t.cursor||(t.cursor=dr),t}measure(t){if(this.useNewApi){const e=et[this.buttonSize];this.rect.height=e.height,this.rect.width=e.height}else{const e=na(this.size);this.rect.height=e.height,this.rect.width=e.width}}onPaint(t,e){const{x:i,y:r,width:n,height:s}=this.rect;jc(t,i,r,this.checked,this.indeterminate,n,s,this.icon,this.theme??oa,this.view,this.disabled,this.isHovered)}onMouseEnter(){this.isHovered=!0}onMouseLeave(){this.isHovered=!1}}function na(o,t){const e=typeof o=="number"?o:Jc,i=0,r=Jt,n=Math.min(e-r*2-Qt,ea),s=typeof o=="number"?o:n+i*2;return{height:e,width:s,paddingX:i,paddingY:r,iconSize:n}}const sa=({backgroundColor:o,__backgroundColorResolver:t},e)=>(t==null?void 0:t(e))??o,gt=o=>{const t=e=>null;return t.__canvasType=o,t},la=p.memo(({cellId:o,renderContent:t,nodeRegistry:e,onRegistryChange:i})=>{const r=t(),n=p.useRef(null);return p.useLayoutEffect(()=>{const s=e.current,l=n.current;l&&l!==o&&s.delete(l);const c=s.get(o),h=c!==void 0;s.set(o,r),h&&c!==r&&(i==null||i()),n.current=o},[o,r,e,i]),p.useLayoutEffect(()=>()=>{const s=e.current;n.current&&(s.delete(n.current),n.current=null)},[e]),null}),ca=gt("Skeleton"),aa=gt("Container"),ua=gt("Text"),ha=gt("Icon"),da=gt("Button"),fa=gt("IconButton"),ga=gt("EmbedIconButton"),Ca=gt("Rect"),va=gt("Badge"),pa=gt("Checkbox"),ma=gt("Link"),ue={Container:aa,Text:ua,Icon:ha,Button:da,IconButton:fa,EmbedIconButton:ga,Checkbox:pa,Rect:Ca,Badge:va,Skeleton:ca,Link:ma,icon:vt};function ut(o,t){if(o)return function(e){o.call(this,e)}}function Oe({element:o,idPrefix:t="root",theme:e}){const i=[],r=Mn(o,t,0,i,e);if(i.length>0){const n=new Map;for(const{icon:s,size:l}of i){if(!s)continue;const c=n.get(l)??[];c.push(s),n.set(l,c)}n.forEach((s,l)=>{Jr(s,{size:l})})}return r}function zi(o){return o==null?"":typeof o=="string"||typeof o=="number"?String(o):Array.isArray(o)?o.map(zi).join(""):""}function fr(o,t,e){const i=o.fontMetrics,r=o.fonts;if(i===void 0||r===void 0)return{};const n=t??o.baseFontStyle,s=Object.keys(r).find(c=>r[c]===n);if(s===void 0)return{};const l=i[s];return l===void 0?{}:{fontSize:l.fontSize,...e===void 0?{lineHeightPx:l.lineHeightPx}:{}}}function Mn(o,t,e,i,r){if(!o||!p.isValidElement(o))throw new Error("Invalid element. Use Canvas.* components.");const n=o.type,s=n.__canvasType;if(!s)throw new Error(`Unknown canvas component. Use Canvas.* components. Got: ${(n==null?void 0:n.name)||n}`);const l=o.props,h=(o.key!=null?String(o.key):null)??e,d=l.id??`${t}-${s.toLowerCase()}-${h}`,a=g=>xt(g)?vt(g):g;if(s==="Icon"&&l.icon)i.push({icon:a(l.icon),size:l.size??16});else if(s==="IconButton"&&l.icon){const g=l.buttonSize??"s",{iconSize:v}=et[g];i.push({icon:a(l.icon),size:v})}else if(s==="EmbedIconButton"&&l.icon){const g=l.buttonSize??"s",v=l.overrideIconSize??et[g].iconSize;i.push({icon:a(l.icon),size:v})}else if(s==="Checkbox")ia.forEach(g=>{i.push({icon:a(g),size:20})});else if(s==="Button"){const g=l.size??"s",{iconSize:v}=et[g];l.leftIcon&&i.push({icon:a(l.leftIcon),size:v}),l.rightIcon&&i.push({icon:a(l.rightIcon),size:v})}else if(s==="Badge"){const g=l.size??"s",C={xs:10,s:12,m:14,l:16}[g]??12;l.leftIcon&&i.push({icon:a(l.leftIcon),size:C}),l.rightIcon&&i.push({icon:a(l.rightIcon),size:C})}const u=ya(s,d,l,r);if(l.portalHoverEnabled&&(u.portalHoverEnabled=!0),l.tooltip!==void 0&&(u.tooltip=l.tooltip),l.autoTooltip!==void 0){const g=l.autoTooltip;(g===!0||typeof g=="object"&&g!==null&&g.enabled!==!1)&&(u.portalHoverEnabled=!0)}l.interaction!==void 0&&(u.interaction=_r(l.interaction)),typeof l.zIndex=="number"&&(u.zIndex=l.zIndex),l.style&&(u.style=l.style);const{children:f}=l;return f&&u instanceof ft&&p.Children.toArray(f).forEach((v,C)=>{if(p.isValidElement(v)){const x=Mn(v,d,C,i,r);u.addChild(x)}}),u}function ya(o,t,e,i){switch(o){case"Container":{const r=e,{id:n,gap:s,columnGap:l,rowGap:c,position:h,left:d,top:a,right:u,bottom:f,zIndex:g,onClick:v,onMouseEnter:C,onMouseLeave:x,onMouseDown:m,backgroundColor:S,__backgroundColorResolver:F,portalHoverEnabled:A,...b}=r,L={...b,columnGap:l??s??0,rowGap:c??s??0},E=new ft(t,L,sa(r,i));h&&(E.position=h),d!==void 0&&(E.left=d),a!==void 0&&(E.top=a),u!==void 0&&(E.right=u),f!==void 0&&(E.bottom=f);const B=ut(v),z=ut(C),nt=ut(x),O=ut(m);return B&&(E.onClick=B),z&&(E.onMouseEnter=z),nt&&(E.onMouseLeave=nt),O&&(E.onMouseDown=O),E}case"Text":{const{children:r,font:n,color:s,wordWrap:l,lineHeight:c,overflow:h,textOverflow:d,ellipsis:a,maxLines:u,autoTooltip:f,position:g,left:v,top:C,right:x,bottom:m,portalHoverEnabled:S}=e,F=zi(r),A=i.fontFamily||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';let b;n?b=/["']|sans-serif|serif|monospace/i.test(n)?n:`${n} ${A}`:b=i.baseFontStyle?`${i.baseFontStyle} ${A}`:`13px ${A}`;const L=fr(i,n,c),E=new io(t,F,{font:b,...L,color:s,wordWrap:l,lineHeight:c,overflow:h,textOverflow:d,ellipsis:a,maxLines:u,autoTooltip:f});return g&&(E.position=g),v!==void 0&&(E.left=v),C!==void 0&&(E.top=C),x!==void 0&&(E.right=x),m!==void 0&&(E.bottom=m),E}case"Icon":{const{icon:r,size:n,color:s,backgroundColor:l,position:c,left:h,top:d,right:a,bottom:u,onClick:f,onMouseEnter:g,onMouseLeave:v,onMouseDown:C}=e,x=xt(r)?vt(r):r,m=new cn(t,x,{size:n,color:s});l&&(m.backgroundColor=l),c&&(m.position=c),h!==void 0&&(m.left=h),d!==void 0&&(m.top=d),a!==void 0&&(m.right=a),u!==void 0&&(m.bottom=u);const S=ut(f),F=ut(g),A=ut(v),b=ut(C);return S&&(m.onClick=S),F&&(m.onMouseEnter=F),A&&(m.onMouseLeave=A),b&&(m.onMouseDown=b),m}case"Button":{const{children:r,variant:n,view:s,size:l,leftIcon:c,rightIcon:h,disabled:d,position:a,left:u,top:f,right:g,bottom:v,onClick:C}=e,x=typeof r=="string"?r:"",m=xt(c)?vt(c):c,S=xt(h)?vt(h):h,F=new ln(t,x,{variant:n,view:s,size:l,leftIcon:m,rightIcon:S,disabled:d,theme:i});if(a&&(F.position=a),u!==void 0&&(F.left=u),f!==void 0&&(F.top=f),g!==void 0&&(F.right=g),v!==void 0&&(F.bottom=v),!d){const A=ut(C);A&&(F.onClick=A)}return F}case"EmbedIconButton":case"IconButton":{const{icon:r,size:n,variant:s,view:l,buttonSize:c,overrideSquareSize:h,overrideIconSize:d,disabled:a,position:u,left:f,top:g,right:v,bottom:C,onClick:x}=e,m=xt(r)?vt(r):r,S=o==="IconButton"?an:Ei,F=new S(t,m,{size:n,variant:s,view:l,buttonSize:c,overrideSquareSize:h,overrideIconSize:d,disabled:a});if(F instanceof Ei){const{iconColor:A,iconColorHovered:b}=e;A!==void 0&&(F.iconColor=A),b!==void 0&&(F.iconColorHovered=b)}if(u&&(F.position=u),f!==void 0&&(F.left=f),g!==void 0&&(F.top=g),v!==void 0&&(F.right=v),C!==void 0&&(F.bottom=C),!a){const A=ut(x);A&&(F.onClick=A)}return F}case"Checkbox":{const{checked:r,indeterminate:n,size:s="auto",theme:l,view:c,buttonSize:h,disabled:d,position:a,left:u,top:f,right:g,bottom:v,onClick:C}=e,x=vt(r?Mi.checkedIcon:Mi.indeterminateIcon),m=new ra(t,x,r,n,{size:s,theme:l??i,view:c,buttonSize:h,disabled:d});if(a&&(m.position=a),u!==void 0&&(m.left=u),f!==void 0&&(m.top=f),g!==void 0&&(m.right=g),v!==void 0&&(m.bottom=v),!d){const S=ut(C);S&&(m.onClick=S)}return m}case"Rect":{const{color:r,borderColor:n,borderWidth:s,position:l,left:c,top:h,right:d,bottom:a}=e,u=new un(t,r);return n&&(u.borderColor=n),s&&(u.borderWidth=s),l&&(u.position=l),c!==void 0&&(u.left=c),h!==void 0&&(u.top=h),d!==void 0&&(u.right=d),a!==void 0&&(u.bottom=a),u}case"Badge":{const{text:r,view:n,size:s,transparent:l,clear:c,leftIcon:h,rightIcon:d,customColor:a,customBackgroundColor:u,position:f,left:g,top:v,right:C,bottom:x,portalHoverEnabled:m,pilled:S}=e,F=xt(h)?vt(h):h,A=xt(d)?vt(d):d,b=new sn(t,r,{view:n,size:s,transparent:l,clear:c,leftIcon:F,rightIcon:A,pilled:S,customColor:a,customBackgroundColor:u,theme:i});return f&&(b.position=f),g!==void 0&&(b.left=g),v!==void 0&&(b.top=v),C!==void 0&&(b.right=C),x!==void 0&&(b.bottom=x),b}case"Skeleton":{const{width:r,height:n,roundness:s,lighter:l,customGradientColor:c,animated:h,shimmerDuration:d,style:a,portalHoverEnabled:u}=e,f=ki(r),g=ki(n),v={...a,...f!==void 0?{width:f}:null,...g!==void 0?{height:g}:null},C=new vn(t,{roundness:s,lighter:l,customGradientColor:c,shimmerDuration:d,animated:h});return C.style=v,C}case"Link":{const{children:r,href:n,target:s,view:l,disabled:c,font:h,color:d,wordWrap:a,lineHeight:u,overflow:f,textOverflow:g,ellipsis:v,maxLines:C,position:x,left:m,top:S,right:F,bottom:A,onClick:b,portalHoverEnabled:L}=e,E=zi(r),B=i.fontFamily||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';let z;h?z=/["']|sans-serif|serif|monospace/i.test(h)?h:`${h} ${B}`:z=i.baseFontStyle?`${i.baseFontStyle} ${B}`:`13px ${B}`;const nt=fr(i,h,u),O=new pn(t,E,{font:z,...nt,color:d,wordWrap:a,lineHeight:u,overflow:f,textOverflow:g,ellipsis:v,maxLines:C,href:n,target:s,view:l,disabled:c,theme:i});if(x&&(O.position=x),m!==void 0&&(O.left=m),S!==void 0&&(O.top=S),F!==void 0&&(O.right=F),A!==void 0&&(O.bottom=A),!c){const it=ut(b);it&&O.setOnClick(it)}return O}default:throw new Error(`Unknown canvas component type: ${o}`)}}const ba='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',Fa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",Sa=30,xa=50,wa=3;async function zn(){return typeof document>"u"||!document.fonts?Promise.resolve():document.fonts.ready.then(()=>{})}function On(o={}){const{testFont:t=ba,testText:e=Fa,maxChecks:i=Sa,checkInterval:r=xa,stableThreshold:n=wa}=o;return new Promise(s=>{if(typeof document>"u"){s();return}const c=document.createElement("canvas").getContext("2d");if(!c){s();return}let h=-1,d=0,a=0;const u=()=>{c.font=t;const{width:f}=c.measureText(e);f!==h?(h=f,d=0):d+=1,a+=1,d>=n||a>=i?s():setTimeout(u,r)};u()})}function Nn(o){return zn().then(()=>On(o))}function so({dataEditorRef:o,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:i}){const r=o.current;if(!r)return;const n=Math.min(30,t),s=e,l=[];for(let c=0-i;c<n;c+=1)for(let h=0;h<s;h+=1)l.push({cell:[h,c]});l.length>0&&r.updateCells(l)}function lo(o){let t=null;return()=>{t===null&&(t=requestAnimationFrame(()=>{t=null,o()}))}}function Aa(){const o=p.useRef(null),t=p.useCallback(()=>(o.current||(o.current=new kr),o.current),[]);return{registry:t(),getRegistry:t}}function Wn({dataEditorRef:o,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:i}){p.useLayoutEffect(()=>{const r=lo(()=>{pc(),so({dataEditorRef:o,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:i})});Nn().then(r)},[o,t,e,i])}function Gn({dataEditorRef:o,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:i}){p.useEffect(()=>{const r=lo(()=>{so({dataEditorRef:o,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:i})});return Zr(r)},[o,t,e,i])}H.GridCellKind.Text;const Ne=(o,t)=>({kind:H.GridCellKind.Text,data:o,displayData:o,allowOverlay:!0,readonly:!0,...t}),Yt=o=>{const{data:t,...e}=o??{};return{kind:H.GridCellKind.Text,data:"",displayData:"",allowOverlay:!0,readonly:!0,...e}};function $n(o){const t=o;return!!(t!=null&&t.kind)}function Ea(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)}function co(o){return typeof o!="object"&&!Array.isArray(o)||o===null}function Un(o){return o==null||typeof o=="boolean"}const Ke=o=>{if(!o||!p.isValidElement(o))return!1;const t=o.type;return!!(t!=null&&t.__canvasType)},ao=o=>typeof o=="string",Oi=o=>ao(o)?!0:Ke(o),Ta=o=>ao(o)?!0:Ke(o),gr=({jsxElement:o,canvasCellCache:t,cellInfo:e,options:i})=>{let r=null;if($n(o))return{...o,...i};if(co(o))return Un(o)?Yt(i):Ne(String(o),i);if(!Ke(o)){const x="передан НЕ CanvasEl";return Ne(x,{...i,data:x})}const{colInd:n,rowInd:s,row:l,column:c}=e,{id:h}=c,d=i.getPortalEventTarget;let a=null;const u=`cell-${n}-${s}`,f=(x,m,S,F,A,b)=>{let L=(b==null?void 0:b.canvasRoot)instanceof mt?b.canvasRoot:a;{if(!o)return{};const z=Oe({element:o,idPrefix:`cell-${n}-${s}-${h}`,theme:S});L?(L.setRootNode(z),L.setOriginId(u)):L=new mt(z,u),a=L}if(!L)return{};const E=F!==void 0&&A!==void 0?{x:F,y:A}:void 0;L.rootNode.style={width:m.width,height:m.height},r||(r=x.canvas.getBoundingClientRect());const B={x:r.left+m.x,y:r.top+m.y,width:m.width,height:m.height};return L.setPortalEventTarget((d==null?void 0:d())??null),L.setTooltipContext({column:e.column,row:e.row,ctxs:e.ctxs,refTable:i.refTable}),L.render(x,m,E,B,{frameTime:b==null?void 0:b.frameTime,requestAnimationFrame:b==null?void 0:b.requestAnimationFrame}),a=L,{canvasRoot:L}},{data:g,...v}=i,C=c.copyData?typeof c.copyData=="function"?c.copyData(l):c.copyData:g;return mn(f,void 0,C,v)},uo=(o,t,e)=>o?t>=o.x&&t<o.x+o.width&&e>=o.y&&e<o.y+o.height:!1,Da=o=>{const t=o.findIndex(e=>!e.isServiceColumn);return t===-1?o.length:t},Ia=(o,t)=>{if(!o)return;const e=Math.max(o.x,t),i=Math.max(0,o.x+o.width-e);if(!(i<=0||o.height<=0))return{x:e,y:o.y,width:i,height:o.height}};function Xn({cellsSelectionMode:o,selection:t,baseTheme:e,serviceColumnsCount:i,activeDataRange:r,outlineRange:n,checkboxSelectedRowIndexes:s,errorCellRanges:l,highlightRegionsExternal:c}){return p.useMemo(()=>{const h=[...c??[]],d=t.current,a=()=>{if(l!=null&&l.length)for(const C of l)h.push({color:e.errorOutlineColor,range:C,style:"solid-outline"})};if(!d||o==="disabled")return a(),h.length>0?h:void 0;const[,u]=d.cell,g=(s==null?void 0:s.has(u))??!1?e.selectionActiveCheckboxBg:e.selectionActiveBg,v=e.selectionServiceActiveBg;return r&&i>0&&h.push({color:v,range:{x:0,y:r.y,width:i,height:r.height},style:"no-outline"}),r&&o==="cell"&&r.width===1&&r.height===1&&h.push({color:g,range:r,style:"no-outline"}),n&&h.push({color:e.accentColor,range:n,style:"solid-outline"}),a(),h.length>0?h:void 0},[o,t,e.selectionActiveBg,e.selectionActiveCheckboxBg,e.selectionServiceActiveBg,e.errorOutlineColor,e.accentColor,i,r,n,s,l,c])}function Vn({baseRegions:o,selectedColumnIndexes:t,headerSelectedRowIndexes:e,activeRow:i,activeRange:r,selectionRangeStack:n,checkboxAvailableRowIndexes:s,totalRows:l,firstDataCol:c,columnsCount:h,theme:d}){return p.useMemo(()=>{const a=t.length>0,u=e.length>0,f=i!==void 0,g=((n==null?void 0:n.length)??0)>0;if(!a&&!u&&!f&&!g)return o;const v=h-c,C=[...o??[]],x=(m,S)=>{const[F,...A]=[...m].sort((B,z)=>B-z);if(F===void 0)return;let b=F,L=F;const E=(B,z)=>{C.push({color:d.accentColor,range:S(B,z),style:"solid-outline"})};for(const B of A)B===L+1||(E(b,L),b=B),L=B;E(b,L)};if(a){c>0&&C.push({color:d.selectionServiceActiveBg,range:{x:0,y:0,width:c,height:l},style:"no-outline"});for(const m of t)C.push({color:d.selectionActiveBg,range:{x:m,y:0,width:1,height:l},style:"no-outline"});x(t,(m,S)=>({x:m,y:0,width:S-m+1,height:l}))}if(u&&v>0){if(c>0)for(const m of e)C.push({color:d.selectionServiceActiveBg,range:{x:0,y:m,width:c,height:1},style:"no-outline"});for(const m of e)C.push({color:d.selectionActiveBg,range:{x:c,y:m,width:v,height:1},style:"no-outline"});x(e,(m,S)=>({x:c,y:m,width:v,height:S-m+1}))}if(i!==void 0&&v>0){const m=s!=null&&s.has(i)?d.selectionActiveCheckboxBg:d.selectionCheckboxBg,S=(A,b)=>{b>0&&C.push({color:m,range:{x:A,y:i,width:b,height:1},style:"no-outline"})};if(!(r&&i>=r.y&&i<r.y+r.height))S(c,v);else{const A=Math.max(r.x,c),b=r.x+r.width;S(c,A-c),S(b,h-b)}}if(g&&n&&c>0){const m=new Set;for(const S of n){const F=Math.max(S.x,c);if(!(S.x+S.width-F<=0||S.height<=0))for(let b=S.y;b<S.y+S.height;b+=1)m.add(b)}for(const S of m)C.push({color:d.selectionServiceActiveBg,range:{x:0,y:S,width:c,height:1},style:"no-outline"})}return C},[o,t,e,i,r,n,s,l,c,h,d.selectionActiveBg,d.selectionActiveCheckboxBg,d.selectionCheckboxBg,d.selectionServiceActiveBg,d.accentColor])}const De={columns:H.CompactSelection.empty(),rows:H.CompactSelection.empty(),current:void 0};function Yn({cellsSelectionMode:o,gridSelection:t,onGridSelectionChange:e,onSelectionEmit:i}){const[r,n]=p.useState(De),s=t!==void 0,l=t??r,c=p.useCallback(a=>{s?e==null||e(a):n(a),i==null||i(a)},[s,e,i]),h=p.useCallback(()=>{s?e==null||e(De):n(De),i==null||i(De)},[s,e,i]),d=p.useMemo(()=>o==="range-cell"?"rect":o==="multi-range-cell"?"multi-rect":o==="disabled"?"none":"cell",[o]);return{selection:l,handleGridSelectionChange:c,handleSelectionCleared:h,rangeSelect:d}}const Xt=new Set,Cr=({start:o,length:t})=>{const e=new Set;for(let i=0;i<t;i+=1)e.add(o+i);return e};function qn({columns:o,selection:t,cellsSelectionMode:e,checkboxSelectedRowIndexes:i}){return p.useMemo(()=>{const r=t.current,n=Da(o);if(!(e!=="disabled"&&r!==void 0)||!r)return{hasAnyActiveSelection:!1,firstDataColumnIndex:n,leadingServiceColumnsCount:n,activeRows:Xt,activeColumns:Xt,activeDataRange:void 0,isSingleCellCustomHighlight:!1,outlineRange:void 0,isServiceColumn:u=>{var f;return!!((f=o[u])!=null&&f.isServiceColumn)},isActiveRow:u=>!1,isCheckboxSelectedRow:u=>(i==null?void 0:i.has(u))??!1,isActiveDataCell:(u,f)=>!1,isActiveHeaderColumn:u=>!1};const l=Ia(r.range,n),c=l!==void 0,h=e==="cell"&&l!==void 0&&l.width===1&&l.height===1;if(!c)return{hasAnyActiveSelection:!1,firstDataColumnIndex:n,leadingServiceColumnsCount:n,activeRows:Xt,activeColumns:Xt,activeDataRange:void 0,isSingleCellCustomHighlight:!1,outlineRange:void 0,isServiceColumn:u=>{var f;return!!((f=o[u])!=null&&f.isServiceColumn)},isActiveRow:u=>!1,isCheckboxSelectedRow:u=>(i==null?void 0:i.has(u))??!1,isActiveDataCell:(u,f)=>!1,isActiveHeaderColumn:u=>!1};const d=l!=null&&l.height&&l.height>0?Cr({start:l.y,length:l.height}):Xt,a=l!=null&&l.width&&l.width>0?Cr({start:l.x,length:l.width}):Xt;return{hasAnyActiveSelection:c,firstDataColumnIndex:n,leadingServiceColumnsCount:n,activeRows:d,activeColumns:a,activeDataRange:l,isSingleCellCustomHighlight:h,outlineRange:h?l:void 0,isServiceColumn:u=>{var f;return!!((f=o[u])!=null&&f.isServiceColumn)},isActiveRow:u=>d.has(u),isCheckboxSelectedRow:u=>(i==null?void 0:i.has(u))??!1,isActiveDataCell:(u,f)=>uo(l,u,f),isActiveHeaderColumn:u=>o[u]?a.has(u):!1}},[o,e,i,t])}function Ha({highlightActiveRow:o,onHighlightActiveRowChange:t,isHighlightActiveRowControlled:e}){const[i,r]=p.useState(void 0),n=e??t!==void 0,s=n?o:i,l=p.useCallback(c=>{n||r(c),t==null||t(c)},[n,t]);return{activeRow:s,commitActiveRow:l}}function La({columns:o}){const[t,e]=p.useState(()=>H.CompactSelection.empty()),i=p.useMemo(()=>t.toArray().filter(h=>{var d;return!((d=o[h])!=null&&d.isServiceColumn)}),[t,o]),r=p.useMemo(()=>new Set(i),[i]),n=p.useRef(void 0),[s,l]=p.useState(!1),c=p.useCallback(()=>{e(H.CompactSelection.empty())},[]);return{selectedColumns:t,setSelectedColumns:e,selectedColumnIndexes:i,selectedColumnSet:r,lastSelectedColumnRef:n,isNativeColumnSelection:s,setIsNativeColumnSelection:l,clearColumnSelection:c}}function Pa(){const[o,t]=p.useState(()=>H.CompactSelection.empty()),e=p.useMemo(()=>o.toArray(),[o]),i=p.useRef(o);i.current=o;const r=p.useRef(!1),n=p.useRef(H.CompactSelection.empty()),s=p.useRef(!1);p.useEffect(()=>{const c=d=>{r.current=d.ctrlKey||d.metaKey,n.current=i.current,s.current=!0},h=()=>{s.current=!1};return window.addEventListener("pointerdown",c,!0),window.addEventListener("pointerup",h,!0),()=>{window.removeEventListener("pointerdown",c,!0),window.removeEventListener("pointerup",h,!0)}},[]);const l=p.useCallback(()=>{t(H.CompactSelection.empty())},[]);return{selectedRows:o,setSelectedRows:t,headerSelectedRowIndexes:e,selectedRowsRef:i,ctrlGestureRef:r,ctrlBaseRowsRef:n,pointerGestureRef:s,clearRowSelection:l}}function Kn({columns:o,selection:t,cellsSelectionMode:e,highlightActiveType:i,enableColumnSelection:r,enableRowSelection:n,enableSelectAll:s,leadingServiceColumnsCount:l,dataRowCount:c,handleGridSelectionChange:h,handleSelectionCleared:d,onSelectionEmit:a,highlightActiveRow:u,onHighlightActiveRowChange:f,isHighlightActiveRowControlled:g}){const{selectedColumns:v,setSelectedColumns:C,selectedColumnIndexes:x,selectedColumnSet:m,lastSelectedColumnRef:S,isNativeColumnSelection:F,setIsNativeColumnSelection:A}=La({columns:o}),{setSelectedRows:b,headerSelectedRowIndexes:L,ctrlGestureRef:E,ctrlBaseRowsRef:B,pointerGestureRef:z}=Pa(),{activeRow:nt,commitActiveRow:O}=Ha({highlightActiveRow:u,onHighlightActiveRowChange:f,isHighlightActiveRowControlled:g}),it=p.useMemo(()=>o.findIndex(M=>M.isServiceColumn&&M.id==="row-markers"),[o]),fe=p.useCallback(M=>{const{current:W}=M;if(!W)return M;const N=l,{range:$}=W;if($.x>=N)return M;const U=$.x+$.width-N;return U<=0?{current:void 0,rows:H.CompactSelection.empty(),columns:H.CompactSelection.empty()}:{...M,current:{...W,cell:[Math.max(W.cell[0],N),W.cell[1]],range:{...$,x:N,width:U}}}},[l]),Ze=p.useCallback(M=>{const W=M.current;if(n&&it>=0&&W&&W.cell[0]===it){const $=l,U=W.range.y,st=U+Math.max(W.range.height,1);if(E.current){const V=st-U<=1;let K=B.current;if(K.length===0&&t.current&&t.current.cell[0]===it){const bt=t.current.range;K=H.CompactSelection.empty().add([bt.y,bt.y+Math.max(bt.height,1)]),B.current=K}let Q;V?Q=K.hasIndex(U)?K.remove(U):K.add(U):Q=K.add([U,st]),C(H.CompactSelection.empty()),b(Q),O(void 0),A(!1),h({...M,current:{...W,range:{x:$,y:W.range.y,width:0,height:W.range.height}}}),a==null||a({current:void 0,rows:Q,columns:H.CompactSelection.empty()});return}const q=Math.max(o.length-$,0);C(H.CompactSelection.empty()),b(H.CompactSelection.empty()),O(void 0),A(!1),h({...M,current:{...W,range:{x:$,y:W.range.y,width:q,height:W.range.height}}});return}const N=fe(M);(N.current!==void 0||N.rows.length>0)&&(C(H.CompactSelection.empty()),b(H.CompactSelection.empty())),A(!1),i==="row"?z.current&&N.current&&O(N.current.cell[1]):O(void 0),h(N)},[o,t,h,fe,it,n,l,i,a,O,E,B,z,C,b,A]),te=p.useCallback(()=>{C(H.CompactSelection.empty()),b(H.CompactSelection.empty()),O(void 0),A(!1),d()},[d,O,C,b,A]),Ht=p.useMemo(()=>{var W;const M=new Set(x);if(F&&t.current){const{x:N,width:$}=t.current.range;for(let U=N;U<N+$;U+=1)(W=o[U])!=null&&W.isServiceColumn||M.add(U)}return Array.from(M).sort((N,$)=>N-$).map(N=>{var $;return($=o[N])==null?void 0:$.id}).filter(N=>!!N)},[x,F,t,o]),je=(e==="range-cell"||e==="multi-range-cell")&&!F&&!(t.current!==void 0&&t.current.cell[0]<l),ge=p.useCallback((M,W)=>{if(s&&it>=0&&M===it&&e!=="disabled"){const V=l,K=Math.max(o.length-V,0);if(K===0||c===0)return;C(H.CompactSelection.empty()),b(H.CompactSelection.empty()),O(void 0),A(!0),h({current:{cell:[V,0],range:{x:V,y:0,width:K,height:c},rangeStack:[]},rows:H.CompactSelection.empty(),columns:H.CompactSelection.empty()});return}if(!r)return;const N=o[M];if(!N||N.isServiceColumn)return;const $=W.shiftKey;if(W.ctrlKey||W.metaKey){let V=v;if(V.length===0&&F&&t.current){const Q=t.current.range;V=V.add([Q.x,Q.x+Q.width])}const K=V.hasIndex(M)?V.remove(M):V.add(M);S.current=M,C(K),b(H.CompactSelection.empty()),O(void 0),A(!1),h({current:void 0,rows:H.CompactSelection.empty(),columns:H.CompactSelection.empty()}),a==null||a({current:void 0,rows:H.CompactSelection.empty(),columns:K});return}let st,q;$&&S.current!==void 0?(st=Math.min(S.current,M),q=Math.max(S.current,M)):(st=M,q=M,S.current=M),C(H.CompactSelection.empty()),b(H.CompactSelection.empty()),O(void 0),A(!0),h({current:{cell:[st,0],range:{x:st,y:0,width:q-st+1,height:c},rangeStack:[]},rows:H.CompactSelection.empty(),columns:H.CompactSelection.empty()})},[r,s,it,e,l,o,t,F,v,c,h,a,O,S,C,b,A]),Rt=p.useCallback(M=>{const W=new Set(M),N=o.map((V,K)=>!V.isServiceColumn&&W.has(V.id)?K:-1).filter(V=>V>=0);if(b(H.CompactSelection.empty()),O(void 0),N.length===0){C(H.CompactSelection.empty()),A(!1),h({current:void 0,rows:H.CompactSelection.empty(),columns:H.CompactSelection.empty()});return}const $=N[0],U=N[N.length-1];if($===void 0||U===void 0)return;const st=U-$===N.length-1;if(S.current=U,st){C(H.CompactSelection.empty()),A(!0),h({current:{cell:[$,0],range:{x:$,y:0,width:U-$+1,height:c},rangeStack:[]},rows:H.CompactSelection.empty(),columns:H.CompactSelection.empty()});return}let q=H.CompactSelection.empty();N.forEach(V=>{q=q.add(V)}),C(q),A(!1),h({current:void 0,rows:H.CompactSelection.empty(),columns:H.CompactSelection.empty()})},[o,c,h,C,b,A,O,S]);return{selectedColumnIndexes:x,selectedColumnKeysAll:Ht,selectColumnsByKeys:Rt,selectedColumnSet:m,headerSelectedRowIndexes:L,activeRow:nt,numberingColumnIndex:it,drawFocusRing:je,selectColumnFromHeader:ge,handleGridSelectionWithColumnReset:Ze,handleSelectionClearedWithColumns:te}}function Ba(o,t,e,i){const r=performance.now();function n(s){const l=s-r,c=Math.min(l/i,1),h=t+(e-t)*c;o(Math.round(h)),c<1&&requestAnimationFrame(n)}requestAnimationFrame(n)}const _a=o=>{const t=typeof o=="number",[e,i]=p.useState(()=>t?o:56);return p.useEffect(()=>{t&&Ba(i,e,o,300)},[o]),t?e:o};function Zn({cell:o,glideCell:t,rect:e,renderData:i,relativePoint:r,mouseArgs:n}){const s=(i==null?void 0:i.canvasRoot)instanceof mt?i.canvasRoot.getInteractionAtPoint(r.x,r.y):void 0;if(s)return{cell:o,glideCell:t,rect:e,renderData:i,relativePoint:r,interaction:s,...n?{mouseArgs:n}:{}}}function Ra({dataEditor:o,getCellContent:t,clientX:e,clientY:i,nativeEvent:r}){const n=o==null?void 0:o.getMouseArgsForPosition(e,i,r);if(!n||n.kind!=="cell")return;const s=[n.location[0],n.location[1]],l=t(s);if(!oo(l))return;const c=n.bounds,h=Kt({colIndex:s[0],rowIndex:s[1]},c),d=Zt(h,l),a={x:n.localEventX,y:n.localEventY};return Zn({cell:s,mouseArgs:n,glideCell:l,rect:c,renderData:d,relativePoint:a})}function ka({eventTarget:o,dataEditorRef:t,getCellContent:e,interactionSessionStore:i,onCellContextMenuExternal:r}){p.useEffect(()=>{if(!o)return;const n=s=>{var g;if(!(s instanceof MouseEvent))return;const l=s;if(l.clientX===0&&l.clientY===0)return;const c=Ra({dataEditor:t.current,getCellContent:e,clientX:l.clientX,clientY:l.clientY,nativeEvent:l});if(!c)return;const{cell:h,interaction:d,mouseArgs:a,relativePoint:u}=c,f=i.beginOrGet({cell:h,relativePoint:u,interaction:d,button:l.button,source:"contextmenu"});if(f.decision.contextMenuMode!=="normal"){if(i.consumePhase(f,"contextmenu-capture"),l.stopPropagation(),(g=l.stopImmediatePropagation)==null||g.call(l),f.decision.contextMenuMode==="none"){l.cancelable&&l.preventDefault();return}!a||!r||r(h,{...a,preventDefault:()=>{l.cancelable&&l.preventDefault()}})}};return o.addEventListener("contextmenu",n,!0),()=>{o.removeEventListener("contextmenu",n,!0)}},[t,o,e,i,r])}const Ma=250;function za(o){return p.useCallback((t,e)=>{const i=o.consumeEditorRequest(t,Ma);return!i||i.target!=="self"?e:{...e,activationBehaviorOverride:"single-click"}},[o])}const Be=350;function vr(o){return Math.round(o)}function Oa({cell:o,relativePoint:t,button:e}){return[o[0],o[1],e??"unknown",vr(t.x),vr(t.y)].join(":")}function We(o,t){return o[0]===t[0]&&o[1]===t[1]}function jn(o,t){return Math.abs(o.x-t.x)<=1&&Math.abs(o.y-t.y)<=1}function Na(o,t){return!We(o.cell,t.cell)||o.button!==void 0&&t.button!==void 0&&o.button!==t.button?!1:jn(o.relativePoint,t.relativePoint)}function Wa(o,t){return Date.now()-o.startedAt>(t.maxAgeMs??Be)||!We(o.cell,t.cell)||o.button!==void 0&&t.button!==void 0&&o.button!==t.button?!1:jn(o.relativePoint,t.relativePoint)}function Ga(){let o,t=1;const e=i=>{if(!(!o||!Wa(o,i)))return o};return{beginOrGet:i=>{const r=e(i);return r||(o={id:t++,key:Oa(i),cell:i.cell,relativePoint:i.relativePoint,interaction:i.interaction,decision:_n(i.interaction),consumedPhases:new Set,startedAt:i.startedAt??Date.now(),source:i.source,...i.button!==void 0?{button:i.button}:{}},o)},findMatching:e,getCurrent:()=>o,storeClickResult:(i,r)=>{i.clickResult=r},consumeClickResult:i=>{const r=o;if(!(r!=null&&r.clickResult))return;if(!Na(r,i)){delete r.clickResult;return}const n=r.clickResult;return delete r.clickResult,r.consumedPhases.add("renderer-click"),n},consumePhase:(i,r)=>i.consumedPhases.has(r)?!1:(i.consumedPhases.add(r),!0),armEditorRequest:(i,r)=>{var n;(n=i.editorRequest)!=null&&n.consumed||(i.editorRequest={target:r.target,armedAt:Date.now()})},consumeEditorRequest:(i,r=Be)=>{const n=o;if(!n)return;const s=n.editorRequest;if(!(s!=null&&s.consumed)&&s){if(Date.now()-s.armedAt>r){o=void 0;return}if(We(n.cell,i))return s.consumed=!0,n.consumedPhases.add("editor-activation"),s}},isMatchingRecent:(i,r,n=Be)=>{const s=o;return!s||!s.consumedPhases.has(i)?!1:Date.now()-s.startedAt<=n&&We(s.cell,r)},clearStale:(i=Be)=>{o&&Date.now()-o.startedAt>i&&(o=void 0)},clear:()=>{o=void 0}}}function $a(){const o=p.useMemo(()=>Ga(),[]),t=p.useCallback(i=>o.beginOrGet(i),[o]),e=p.useCallback(i=>o.consumeClickResult(i),[o]);return{interactionSessionStore:o,beginOrGetInteractionSession:t,consumeCanvasClickResult:e}}function Ua(o={}){const t=p.useMemo(()=>!0,[]);return p.useMemo(()=>{const e=[];return t&&e.push(no({beginOrGetInteractionSession:o.beginOrGetInteractionSession,consumeCanvasClickResult:o.consumeCanvasClickResult})),e.length>0?e:void 0},[t,o.beginOrGetInteractionSession,o.consumeCanvasClickResult])}const vi={glideScroller:"dvn-scroller",glideTable:"gdg-table",glideUnderlay:"dvn-underlay"};function Jn(o){const t=(o==null?void 0:o.querySelector(`.${vi.glideTable}`))??null,e=(t==null?void 0:t.querySelector(`.${vi.glideScroller}`))??null,i=(t==null?void 0:t.querySelector(`.${vi.glideUnderlay}`))??null;return{container:t,scroller:e,underlay:i}}const pr="[useGlideElements]";function Xa(o,t){const[e,i]=p.useState(null),[r,n]=p.useState(null),[s,l]=p.useState(null),c=p.useRef(null);p.useEffect(()=>{const d=o==null?void 0:o.current;if(qt.tableDebug(pr,"useEffect fired",{hasWrapper:!!d,fullScreened:t}),!d)return;const a=()=>{const{container:f,scroller:g,underlay:v}=Jn(d);return qt.tableDebug(pr,"tryFind",{containerFound:!!f,scrollerFound:!!g,underlayFound:!!v}),f?(i(C=>C===f?C:f),n(C=>C===g?C:g),l(C=>C===v?C:v),c.current&&(c.current.disconnect(),c.current=null),!0):!1},u=requestAnimationFrame(()=>{if(a())return;const f=new MutationObserver(()=>{a()});f.observe(d,{childList:!0,subtree:!0}),c.current=f});return()=>{cancelAnimationFrame(u),c.current&&(c.current.disconnect(),c.current=null),i(null),n(null),l(null)}},[o,t]);const h=p.useCallback(d=>e?Ie.createPortal(d,e):null,[e]);return{glideContainer:e,glideScroller:r,glideUnderlay:s,isReady:!!e,renderInContainer:h}}function Va(o){const t=document.createElement("div");t.style.cssText="position:fixed;left:0;top:0;width:0;height:0;pointer-events:none;visibility:hidden",o.appendChild(t);const e=t.getBoundingClientRect();return o.removeChild(t),{x:e.left,y:e.top}}function Ya(o,t){p.useEffect(()=>{if(!t)return;const e=o.current;if(!e)return;const i=qt.throttleWithLastCall(()=>{const{x:r,y:n}=Va(e);e.style.setProperty("--gdg-portal-offset-x",`${r}px`),e.style.setProperty("--gdg-portal-offset-y",`${n}px`)},100);return i(),window.addEventListener("resize",i),e.addEventListener("resize",i),()=>{window.removeEventListener("resize",i),e.removeEventListener("resize",i)}},[o,t])}function qa(o,t){const{columnsLast:e,rows:i,ctxs:r,refTable:n,theme:s,portalEventTargetRef:l,externalOnItemHovered:c,onHoverRowChange:h}=o,d=p.useRef(null),a=p.useCallback(f=>{const g=d.current;d.current=null,he({visible:!1,x:0,y:0,width:0,height:0,source:"cell",originId:g??void 0,nodeId:g??void 0},f,!0)},[]);return p.useCallback(f=>{var x,m,S;c==null||c(f),h==null||h(f.kind==="cell"?f.location[1]:void 0);const g=(l==null?void 0:l.current)??null,v=(x=f.location)==null?void 0:x[0],C=v!=null?e[v]:void 0;if(f.kind==="header"){if(!(C!=null&&C.headerCellTooltip)){a(g);return}const F=`header-tooltip-${v}`;d.current===F||a(g);const b=(m=t.current)==null?void 0:m.getBounds(v,-1);if(!b)return;d.current=F,he({visible:!0,x:b.x,y:b.y,width:b.width,height:b.height,source:"header",originId:F,nodeId:F,priority:0,tooltipContext:{column:C,ctxs:r,refTable:n,colInd:v,theme:s}},g);return}if(f.kind==="cell"){const F=f.location[1],A=i[F];if(!C||!A||!C.cellTooltip){a(g);return}const b=`col-tooltip-${v}-${F}`;d.current===b||a(g);const E=(S=t.current)==null?void 0:S.getBounds(v,F);if(!E)return;d.current=b,he({visible:!0,x:E.x,y:E.y,width:E.width,height:E.height,source:"cell",originId:b,nodeId:b,priority:0,tooltipContext:{column:C,row:A,ctxs:r,refTable:n,colInd:v,rowInd:F,theme:s}},g);return}a(g)},[e,i,r,n,s,l,c,h,a,t])}function Ka({enabled:o,portalEventTargetRef:t,headerHeight:e,groupHeaderHeight:i,experimental:r}){const[n,s]=p.useState(0),l=p.useRef(null),c=p.useMemo(()=>{const u=e??_e;let f=typeof u=="number"?u:_e;return Array.isArray(i)?f+=i.reduce((g,v)=>g+v,0):typeof i=="number"&&(f+=i),f},[e,i]),h=p.useRef(c);h.current=c;const d=p.useCallback(u=>{var x;if((x=l.current)==null||x.call(l),l.current=null,!u)return;if(!o){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 m=g.scrollTop,S=Math.min(m,h.current);s(-1*S),v.style.overflowY="visible",v.style.transform=`translateY(-${S}px)`};g.addEventListener("scroll",C),l.current=()=>{g.removeEventListener("scroll",C),v.style.transform="",v.style.overflowY=""}},[o,t]),a=p.useMemo(()=>o?{...r,paddingBottom:n}:r,[o,n,r]);return{unstickyCallbackRef:d,mergedExperimental:a}}const pi=br.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));}"]),Za=br(H).withConfig({displayName:"styled__StyledGlideDataEditor"})([""]),Qn={textPrimary:"#13181BF5",textPrimaryHover:"#13181B93",textPrimaryActive:"#13181BC4",textSecondary:"#485056B0",textSecondaryHover:"#485056FF",textSecondaryActive:"#485056D3",textTertiary:"#707C847A",textTertiaryHover:"#717C84FF",textTertiaryActive:"#717C8493",textTertiaryBase:"#8A959D",textTertiaryVariant:"#657179",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:"#FFFFFF",surfaceAccentMinor:"#ECF6FCFF",surfaceSolidDefault:"#060A0C",surfaceSolidTertiary:"#E8EEF2",surfaceAccent:"#118CDF",surfaceAccentHover:"#1798EEFF",surfaceAccentActive:"#0F81CCFF",surfaceTransparentSecondary:"#ADB9C238",surfaceTransparentSecondaryHover:"#ADB9C247",surfaceTransparentSecondaryActive:"#ADB9C24D",surfaceTransparentTertiary:"#8A959D47",surfaceTransparentDeep:"#30373CC6",surfaceClear:"#FFFFFF00",surfacePositive:"#1A9E32",surfacePositiveHover:"#1EB83AFF",surfacePositiveActive:"#178C2CFF",surfaceWarning:"#FA5F05",surfaceWarningHover:"#FB782DFF",surfaceWarningActive:"#E65705FF",surfaceWarningMinor56:"#F3A9128E",surfaceNegative:"#FF293E",surfaceNegativeHover:"#FF5263FF",surfaceNegativeActive:"#FF142CFF",disabled:"#DDDDDD",surfaceTransparentAccent:"#118CDF1F",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:"#AD42F5",dataVioletMinor:"#DEB7F7",dataPink:"#FF8FBC",dataMagenta:"#F391E2",dataCyan:"#00DDE0",dataCyanDark:"#04C6C9",dataLime:"#93E006",dataTeal:"#14CC98"},ja={textPrimary:"#13181BF5",textPrimaryHover:"#13181B93",textPrimaryActive:"#13181BC4",textSecondary:"#03070CAF",textSecondaryHover:"#485056FF",textSecondaryActive:"#485056D3",textTertiary:"#000206A8",textTertiaryHover:"#717C84FF",textTertiaryActive:"#717C8493",textTertiaryBase:"#818C95",textTertiaryVariant:"#65717A",textParagraph:"#13181BCC",textParagraphHover:"#13181B7A",textParagraphActive:"#13181BA3",textAccent:"#0058A2",textAccentHover:"#0D96F2FF",textAccentActive:"#0966A5FF",textAccentTransparent20:"#0058A23F",textPositive:"#0F5E00",textPositiveHover:"#14B32EFF",textPositiveActive:"#0C6A1BFF",textWarning:"#D95800",textWarningHover:"#FB782DFF",textWarningActive:"#D25004FF",textNegative:"#A50016",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:"#FFFFFF",surfaceAccentMinor:"#CFE5F2FF",surfaceSolidDefault:"#060A0C",surfaceSolidTertiary:"#CFD9E0",surfaceAccent:"#0076D2",surfaceAccentHover:"#1798EEFF",surfaceAccentActive:"#0F81CCFF",surfaceTransparentSecondary:"#7D96A838",surfaceTransparentSecondaryHover:"#ADB9C247",surfaceTransparentSecondaryActive:"#ADB9C24D",surfaceTransparentTertiary:"#516E8347",surfaceTransparentDeep:"#30373DC6",surfaceClear:"#FFFFFF00",surfacePositive:"#198A00",surfacePositiveHover:"#1EB83AFF",surfacePositiveActive:"#178C2CFF",surfaceWarning:"#D95800",surfaceWarningHover:"#FB782DFF",surfaceWarningActive:"#E65705FF",surfaceWarningMinor56:"#D491008E",surfaceNegative:"#E7002F",surfaceNegativeHover:"#FF5263FF",surfaceNegativeActive:"#FF142CFF",disabled:"#DDDDDD",surfaceTransparentAccent:"#0076D21F",surfaceTransparentAccent12:"#0076D21E",surfaceTransparentAccent20:"#0076D233",surfaceTransparentPositive:"#198A001F",surfaceTransparentPositive12:"#198A003F",surfaceTransparentPositive20:"#198A0033",surfaceTransparentWarning:"#D958001F",surfaceTransparentWarning12:"#D958003F",surfaceTransparentWarning20:"#D9580033",surfaceTransparentNegative:"#E7002F1F",surfaceTransparentNegative12:"#E7002F3F",surfaceTransparentNegative20:"#E7002F33",onLightSurfaceSolidDefault:"#060A0C",onLightSurfaceTransparentDeep:"#30373DC7",onDarkSurfaceSolidDefault:"#D6DFE7",onDarkSurfaceTransparentCard:"#FFFFFF0F",outlineAccent:"#0058A2",outlineSolidPrimary:"#C4CFD7",outlineSolidPrimary26:"#AFC0CB42",dataBlueMinor:"#9CD5FF",dataBlueMinorActive:"#C2E7FFFF",dataBlue:"#6096FF",dataAccentMinorHover:"#0077C1",dataPositive:"#168600",dataPositiveMinor:"#96DAA1",dataNegative:"#BA5161",dataNegativeMinor:"#F8BDC4",dataWarning:"#B35B10",dataWarningMinor:"#F7C29D",dataOrange:"#D49100",dataOrangeMinor:"#F3B400",dataViolet:"#9A29E0",dataVioletMinor:"#D48BFF",dataPink:"#FB5AA5",dataMagenta:"#EB60D7",dataCyan:"#00C1C3",dataCyanDark:"#00AAAD",dataLime:"#7FC400",dataTeal:"#00B082"},Ja={...Qn},Qa={light:Qn,dark:Ja,highContrastLight:ja},tu=(o="light")=>Qa[o],dt={bgEditableCell:{light:"#FFF6E5",dark:"#211807",highContrastLight:"#F1DDB8"},bgEditableCellHovered:{light:"#FFF4E0",dark:"#2A1F09",highContrastLight:"#E8D4AD"},selectionCheckboxBg:{light:"#ECF6FC",dark:"#ECF6FC",highContrastLight:"#CFE5F2"},selectionActiveBg:{light:"#E2F1FB",dark:"#E2F1FB",highContrastLight:"#BFDDF4"},selectionActiveCheckboxBg:{light:"#D1E9F8",dark:"#D1E9F8",highContrastLight:"#9BCAEA"},selectionServiceBg:{light:"#ECF6FC",dark:"#ECF6FC",highContrastLight:"#CFE5F2"},selectionServiceActiveBg:{light:"#D4E7F2",dark:"#D4E7F2",highContrastLight:"#B9D6E7"},errorOutlineColor:{light:"#FF3D51",dark:"#FF3D51",highContrastLight:"#E9203F"},bgRowHovered:{light:"#F7F9FB",dark:"#F7F9FB",highContrastLight:"#E8EEF2"},bgServiceRowHovered:{light:"#D4E7F2",dark:"#D4E7F2",highContrastLight:"#B9D6E7"},bgSelectedRowHovered:{light:"#DEECF5",dark:"#DEECF5",highContrastLight:"#C2DCEB"}},eu=o=>({tokens:tu(o),fonts:Re,fontMetrics:wr,bgEditableCell:dt.bgEditableCell[o],bgEditableCellHovered:dt.bgEditableCellHovered[o],selectionCheckboxBg:dt.selectionCheckboxBg[o],selectionActiveBg:dt.selectionActiveBg[o],selectionActiveCheckboxBg:dt.selectionActiveCheckboxBg[o],selectionServiceBg:dt.selectionServiceBg[o],selectionServiceActiveBg:dt.selectionServiceActiveBg[o],errorOutlineColor:dt.errorOutlineColor[o],bgRowHovered:dt.bgRowHovered[o],bgServiceRowHovered:dt.bgServiceRowHovered[o],bgSelectedRowHovered:dt.bgSelectedRowHovered[o]}),rt={accentColor:{light:"#0b7ecb",dark:"#0b7ecb",highContrastLight:"#0058A2"},accentLight:{light:"#E2F1FB",dark:"#E2F1FB",highContrastLight:"#DAE8F1"},textDark:{light:"#13181BF5",dark:"#13181BF5",highContrastLight:"#13181BF5"},textHeader:{light:"#13181BF5",dark:"#13181BF5",highContrastLight:"#13181BF5"},textHeaderSelected:{light:"#13181BF5",dark:"#13181BF5",highContrastLight:"#13181BF5"},textGroupHeader:{light:"#13181BF5",dark:"#13181BF5",highContrastLight:"#13181BF5"},bgCell:{light:"#FFFFFF",dark:"#FFFFFF",highContrastLight:"#FFFFFF"},bgHeader:{light:"#ECF6FCFF",dark:"#ECF6FCFF",highContrastLight:"#CFE5F2FF"},bgHeaderHasFocus:{light:"#ECF6FCFF",dark:"#ECF6FCFF",highContrastLight:"#B9D6E7"},bgHeaderHovered:{light:"#DEECF5",dark:"#DEECF5",highContrastLight:"#C2DCEB"},borderColor:{light:"#D5DFE6",dark:"#D5DFE6",highContrastLight:"#C4CFD7"},bgGroupHeader:{light:"#ECF6FCFF",dark:"#ECF6FCFF",highContrastLight:"#CFE5F2FF"},bgGroupHeaderHovered:{light:"#DEECF5",dark:"#DEECF5",highContrastLight:"#C2DCEB"}},iu=o=>({accentColor:rt.accentColor[o],accentLight:rt.accentLight[o],textDark:rt.textDark[o],textHeader:rt.textHeader[o],textHeaderSelected:rt.textHeaderSelected[o],textGroupHeader:rt.textGroupHeader[o],bgCell:rt.bgCell[o],bgHeader:rt.bgHeader[o],bgHeaderHasFocus:rt.bgHeaderHasFocus[o],bgHeaderHovered:rt.bgHeaderHovered[o],borderColor:rt.borderColor[o],bgGroupHeader:rt.bgGroupHeader[o],bgGroupHeaderHovered:rt.bgGroupHeaderHovered[o]}),mr={small:"bodyXXS",medium:"bodyS",big:"bodyM"},ou=(o="big")=>{const t=Re[mr[o]],e=wr[mr[o]],i=`${e.fontSize}px`,r=e.lineHeightPx,n=Sr[o],{cellHorizontalPadding:s,cellVerticalPadding:l}=n;return{headerFontStyle:Re.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:i,lineHeight:r,cellHorizontalPadding:s,cellVerticalPadding:l,activeSizes:n}},ho=(o="big",t="light")=>({...iu(t),...ou(o),...eu(t),rowSize:o}),ru=ho(),yr=(o,t)=>{if(o==null)return null;const e=typeof o=="number"?o:o(t);return[t.colInd,t.colInd+e]};function nu(...o){}const su={},lu=({columns:o,rows:t,bottomSummaryRows:e,rowHeight:i,width:r,rowSize:n="medium",ctxs:s=su,freezeColumns:l,onColumnResize:c,renderGroupHeader:h,refTable:d,onColumnsReorder:a,portalEventTargetRef:u,onItemHovered:f,unstickyHeader:g,resizableColumn:v=!0,minColumnWidth:C=56,maxColumnWidth:x,maxColumnAutoWidth:m,containerRef:S,containerClassName:F,containerStyle:A,renderOverlayFeatures:b,hideGrid:L,contentStateNode:E,fullScreened:B,editorOverlayPortal:z,highlightActiveType:nt="disabled",cellsSelectionMode:O="range-cell",enableColumnSelection:it=!0,enableRowSelection:fe=!0,enableSelectAll:Ze=!0,enableLowDprHairline:te,gridSelection:Ht,onGridSelectionChange:je,onSelectionEmit:ge,onColumnSelectionChange:Rt,pendingColumnSelectionKeys:M,onColumnSelectionApplied:W,highlightActiveRow:N,onHighlightActiveRowChange:$,highlightActiveRowControlled:U,highlightRegions:st,checkboxSelectedRowIndexes:q,checkboxVisibleRowIndexes:V,hoverEffects:K,onCellClicked:Q,onCellContextMenu:bt,onMouseMove:Ce,portalElementRef:cu,...kt})=>{var Ho,Lo;const fo=qt.useActiveTheme(),_=p.useMemo(()=>ho(n,fo),[n,fo]),ts=p.useMemo(()=>{const y=typeof i=="number"?i:void 0;if(y)return y;const w=Fr[n],T=typeof i=="function"?i:void 0;return T?D=>{const P=t[D];if(!P)return y??w;const R=T(P,{rowSizeName:n,rowSizeValue:w},D);return typeof R=="number"&&!Number.isNaN(R)?R:w}:w},[t,i,n]),Mt=(e==null?void 0:e.length)??0,es=_a(ts),[ve,is]=p.useState(new Map),os=p.useCallback((y,w,T,D)=>{const P=y;P.id&&(c==null||c(P,w,T,D),is(I=>(I.set(P.id,w),new Map(I))))},[c]),zt=p.useMemo(()=>ve.size===0?o:o.map(y=>ve.has(y.id)?{...y,width:ve.get(y.id),grow:0}:y),[o,ve]),[go,au]=p.useState(0),Je=p.useMemo(()=>new WeakMap,[]),Qe=p.useRef(null),Tt=p.useRef(null);p.useEffect(()=>{var y;(Ht==null?void 0:Ht.current)!==void 0&&((y=Tt.current)==null||y.focus())},[Ht]);const{interactionSessionStore:lt,beginOrGetInteractionSession:rs,consumeCanvasClickResult:ns}=$a(),Co=za(lt),{selection:Ct,handleGridSelectionChange:ss,handleSelectionCleared:ls,rangeSelect:cs}=Yn({cellsSelectionMode:O,gridSelection:Ht,onGridSelectionChange:je,onSelectionEmit:ge}),ot=qn({columns:zt,selection:Ct,cellsSelectionMode:O,checkboxSelectedRowIndexes:q}),as=p.useMemo(()=>$?y=>$(y,y!==void 0?t[y]:void 0):void 0,[$,t]),{selectedColumnIndexes:us,selectedColumnKeysAll:vo,selectColumnsByKeys:po,selectedColumnSet:mo,headerSelectedRowIndexes:yo,activeRow:hs,numberingColumnIndex:bo,drawFocusRing:ds,selectColumnFromHeader:Fo,handleGridSelectionWithColumnReset:fs,handleSelectionClearedWithColumns:gs}=Kn({columns:zt,selection:Ct,cellsSelectionMode:O,highlightActiveType:nt,enableColumnSelection:it,enableRowSelection:fe,enableSelectAll:Ze,leadingServiceColumnsCount:ot.leadingServiceColumnsCount,dataRowCount:t.length+Mt,handleGridSelectionChange:ss,handleSelectionCleared:ls,onSelectionEmit:ge,highlightActiveRow:N,onHighlightActiveRowChange:as,isHighlightActiveRowControlled:U});p.useEffect(()=>{Rt==null||Rt(vo)},[vo,Rt]),p.useEffect(()=>{if(!M)return;po(M);const y=setTimeout(()=>W==null?void 0:W(),0);return()=>clearTimeout(y)},[M,zt,po,W]);const So=yo.length>0,xo=p.useMemo(()=>{var T;const y=new Set,w=(T=Ct.current)==null?void 0:T.rangeStack;if(w){const D=ot.firstDataColumnIndex;for(const P of w){const I=Math.max(P.x,D);for(let R=I;R<P.x+P.width;R+=1)y.add(R)}}return y},[Ct,ot.firstDataColumnIndex]),j=p.useMemo(()=>zt.map((y,w)=>{const T={...y.themeOverride??{}};let D=Object.keys(T).length>0;return y.isServiceColumn&&(T.bgCell=_.selectionServiceBg,D=!0),w===bo&&(T.accentLight="transparent",T.accentColor="transparent",D=!0),ot.isActiveHeaderColumn(w)&&(T.bgHeader=_.selectionServiceActiveBg,T.bgHeaderHasFocus=_.selectionServiceActiveBg,D=!0),mo.has(w)&&(T.bgHeader=_.selectionServiceActiveBg,T.bgHeaderHasFocus=_.selectionServiceActiveBg,D=!0),xo.has(w)&&(T.bgHeader=_.selectionServiceActiveBg,T.bgHeaderHasFocus=_.selectionServiceActiveBg,D=!0),So&&!y.isServiceColumn&&(T.bgHeader=_.selectionServiceActiveBg,T.bgHeaderHasFocus=_.selectionServiceActiveBg,D=!0),D?{...y,themeOverride:T}:y}),[zt,ot,mo,xo,So,bo,_.selectionServiceBg,_.selectionServiceActiveBg]),Cs=p.useMemo(()=>{var T;const y=(T=Ct.current)==null?void 0:T.range,w=[];return j.forEach((D,P)=>{D.isServiceColumn||!D.isErrorCell||t.forEach((I,R)=>{var k;(k=D.isErrorCell)!=null&&k.call(D,I)&&(uo(y,P,R)||w.push({x:P,y:R,width:1,height:1}))})}),w},[j,t,Ct.current]),pe=p.useCallback(([y,w],T)=>{var Fe,Ro,Se,ko;nu(go);const D=(T==null?void 0:T.applyCanvasEditorActivation)!==!1,P=It=>D?Co([y,w],It):It,I=!!e&&w>t.length-1,R=t[w],k=j[y];if(!k)return Yt();if(I){const It=e[w-t.length],{renderSummaryCell:Mo,colSpan:Ms}=k;if(!Mo||!It)return Yt();const li={row:It,column:k,colInd:y,rowInd:w,ctxs:s,theme:_,hovered:{cellHover:!1,rowHover:!1},active:{cellActive:!1,rowActive:!1}},zs=Mo(li),zo=yr(Ms,li),Os={data:"",...zo&&{span:zo}};return P(gr({jsxElement:zs,canvasCellCache:Je,cellInfo:li,options:{...Os,getPortalEventTarget:()=>(u==null?void 0:u.current)??null,refTable:d}}))}if(!R)return Yt();const Z=Qe.current,X={row:R,column:k,colInd:y,rowInd:w,ctxs:s,theme:_,hovered:{cellHover:(Z==null?void 0:Z.colInd)===y&&(Z==null?void 0:Z.rowInd)===w,rowHover:(Z==null?void 0:Z.rowInd)===w},active:{cellActive:ot.isActiveDataCell(y,w),rowActive:ot.isActiveRow(w)}},{renderCell:tt,id:ct,colSpan:G,editable:Dt,contentAlign:Pt,columnThemeOverride:ye}=k,be=((Ro=(Fe=R[ct])==null?void 0:Fe.toString)==null?void 0:Ro.call(Fe))??"NOT FOUND",Po=yr(G,X),Bo=Dt?typeof Dt=="boolean"?Dt:Dt(R):!1,ni=typeof ye=="function"?ye(X):void 0,si={data:((ko=(Se=R[ct])==null?void 0:Se.toString)==null?void 0:ko.call(Se))??"NOT FOUND",...Bo?{readonly:!1,allowOverlay:!0}:{readonly:!0,...k.hasPreview===!0&&{allowOverlay:!0},...k.hasPreview==="none"&&{allowOverlay:!1}},themeOverride:{...ni,...Bo&&{bgCell:_.bgEditableCell}},contentAlign:Pt,...Po&&{span:Po}};if(!tt){const It=String(be);return co(It)?P(Ne(It,si)):P(Yt(si))}const _o=ni?{...X,theme:{..._,...ni}}:X,ks=tt(_o);return P(gr({jsxElement:ks,canvasCellCache:Je,cellInfo:_o,options:{...si,getPortalEventTarget:()=>(u==null?void 0:u.current)??null,refTable:d}}))},[go,e,t,j,s,_,ot,Je,u,Co]),vs=p.useCallback((y,w)=>{var G;const T=pe(y,{applyCanvasEditorActivation:!1});if(!oo(T)){Q==null||Q(y,w);return}let D=!1;const P=w.preventDefault;w.preventDefault=()=>{D=!0,P()};const I=Kt({colIndex:y[0],rowIndex:y[1]},w.bounds),R=Zt(I,T),k={x:w.localEventX,y:w.localEventY},Z=Zn({cell:y,glideCell:T,rect:w.bounds,renderData:R,relativePoint:k}),X=Z?lt.beginOrGet({cell:y,relativePoint:k,interaction:Z.interaction,button:w.button,source:"click"}):lt.beginOrGet({cell:y,relativePoint:k,interaction:Rr(),button:w.button,source:"click"}),tt=ro({cell:T,rect:w.bounds,relativePoint:k,renderData:R,rowData:t[y[1]],rowIndex:y[1]}),ct=X?Vc({decision:X.decision,propagationStopped:tt.propagationStopped,suppressGridDefault:tt.suppressGridDefault}):{suppressExternalCellClick:tt.propagationStopped,suppressGridDefaultForClick:tt.suppressGridDefault};if(X&&(lt.consumePhase(X,"cell-click"),lt.storeClickResult(X,tt)),w.button===0&&((G=ct.editorRequest)==null?void 0:G.target)==="self"&&lt.armEditorRequest(X,ct.editorRequest),ct.suppressGridDefaultForClick&&(w.preventDefault(),X!=null&&X.decision.editorRequest&&lt.clear()),ct.suppressExternalCellClick||Q==null||Q(y,w),D||w.button===1){lt.clear();return}},[pe,lt,Q,t]),ps=p.useCallback((y,w)=>{lt.isMatchingRecent("contextmenu-capture",y)||bt==null||bt(y,w)},[lt,bt]),ms=Ua({beginOrGetInteractionSession:rs,consumeCanvasClickResult:ns}),Ot=p.useRef(null),Nt=p.useRef(null),ee=p.useMemo(()=>new Map,[]),wo=p.useMemo(()=>new Map,[]),ti=p.useRef(null),Lt=p.useRef(null),ys=p.useMemo(()=>qt.mergeRefs(Lt,S),[S]),{drawHeader:bs,onHeaderClicked:Fs}=p.useMemo(()=>({drawHeader:(T,D)=>{var be;const{ctx:P,rect:I,columnIndex:R}=T,k=j[R];if(!k||!k.renderHeaderCell)return D();const Z={column:k,drawArgs:T,ctxs:s,theme:_};let X=k.renderHeaderCell(Z);if(!Oi(X))return D();typeof X=="string"&&(X=Ft.jsx(ue.Container,{style:{width:"100%"},alignItems:"center",children:Ft.jsx(ue.Text,{children:X})}));const tt=`header-${k.id}-${R}`,ct=Oe({element:X,idPrefix:tt,theme:_});let G;ee.has(k.id)?(G=ee.get(k.id),G==null||G.setRootNode(ct),G!=null&&G.rootNode&&(G.rootNode.style={width:I.width,height:I.height})):(G=new mt(ct,tt),G.rootNode.style={width:I.width,height:I.height},ee.set(k.id,G)),G==null||G.setPortalEventTarget((u==null?void 0:u.current)??null),G==null||G.setTooltipContext({column:k,ctxs:s,refTable:d});const Dt=((be=Ot.current)==null?void 0:be.id)===k.id?Ot.current:void 0,Pt=P.canvas.getBoundingClientRect(),ye={x:Pt.left+I.x,y:Pt.top+I.y,width:I.width,height:I.height};return G==null?void 0:G.render(P,I,Dt,ye)},onHeaderClicked:(T,D)=>{const P=j[T];if(P){if(P.renderHeaderCell){const I=ee.get(P.id);if(I){const R=I.getInteractionAtPoint(D.localEventX,D.localEventY);if(I.dispatchPointerEvent("click",D.localEventX,D.localEventY),R)return}}Fo(T,D)}}}),[j,s,_,ee,u,Tt,Fo]),{glideContainer:ei,isReady:Ss,renderInContainer:xs}=Xa(Lt,B),Ao=z==="inside";Ya(Lt,Ao),ka({eventTarget:ei??Lt.current,dataEditorRef:Tt,getCellContent:pe,interactionSessionStore:lt,onCellContextMenuExternal:bt});const{unstickyCallbackRef:Eo,mergedExperimental:ii}=Ka({enabled:g,portalEventTargetRef:u,headerHeight:kt.headerHeight,groupHeaderHeight:kt.groupHeaderHeight,experimental:kt.experimental}),ws=p.useMemo(()=>qt.mergeRefs(Tt,d,Eo),[d,Eo]),As=p.useMemo(()=>te===void 0?ii:{...ii,enableLowDprHairline:te},[te,ii]),To=p.useCallback((...y)=>{var P;const w=Tt.current;if(!w)return;const T=new Set;y.forEach(I=>{typeof I=="number"&&I>=0&&I<t.length&&T.add(I)});const D=[];T.forEach(I=>{j.forEach((R,k)=>{D.push({cell:[k,I]})})}),D.length>0&&((P=w.updateCells)==null||P.call(w,D))},[j,t.length]),me=p.useCallback(y=>{const w=Qe.current;(w==null?void 0:w.colInd)===(y==null?void 0:y.colInd)&&(w==null?void 0:w.rowInd)===(y==null?void 0:y.rowInd)||(Qe.current=y,To(w==null?void 0:w.rowInd,y==null?void 0:y.rowInd))},[To]),Es=p.useCallback(y=>{Ce==null||Ce(y),y.kind==="cell"?(()=>{const T=y.location[0],D=y.location[1],P=t[D],I=j[T];if(!P||!I||I.isServiceColumn){me(null);return}me({colInd:T,rowInd:D})})():me(null),y.kind==="group-header"?(()=>{if(typeof y.group!="string"){Nt.current=null;return}Nt.current={id:y.group,x:y.localEventX,y:y.localEventY}})():Nt.current=null,y.kind==="header"?(()=>{var I,R;const T=y.location[0],D=y.location[1],P=j[T];if(!P||!(P!=null&&P.renderHeaderCell)){Ot.current=null;return}Ot.current={id:P.id,x:y.localEventX,y:y.localEventY},(R=(I=Tt.current)==null?void 0:I.updateCells)==null||R.call(I,[{cell:[T,D]}])})():Ot.current=null,Ot.current=null,Nt.current=null},[j,Ce,t,me]),Do={dataEditorRef:Tt,rowCount:t.length,columnCount:j.length,headerAndGroupHeaderRowsCount:1+(kt.groupHeaderHeight??[]).length};Gn(Do),Wn(Do);const Ts=p.useMemo(()=>a?(w,T)=>{var I,R;const D=(I=j[w])==null?void 0:I.id,P=(R=j[T])==null?void 0:R.id;typeof D!="string"||typeof P!="string"||a(D,P)}:void 0,[j,a]),Ds=p.useMemo(()=>{if(h)return(y,w)=>{var Pt;const T=h(y);if(T==="default")return w();if("defaultWithCustomGroupName"in T)return w(T.defaultWithCustomGroupName);const{groupName:P,rect:I,ctx:R}=y;let k=T;if(!Oi(k))return w();typeof k=="string"&&(k=Ft.jsx(ue.Container,{style:{width:"100%"},alignItems:"center",children:Ft.jsx(ue.Text,{children:k})}));const Z=P,X=Oe({element:k,idPrefix:Z,theme:_}),tt=new mt(X,Z);tt.rootNode.style={width:I.width,height:I.height},tt.setPortalEventTarget((u==null?void 0:u.current)??null),wo.set(Z,tt);const ct=((Pt=Nt.current)==null?void 0:Pt.id)===Z?Nt.current:void 0,G=R.canvas.getBoundingClientRect(),Dt={x:G.left+I.x,y:G.top+I.y,width:I.width,height:I.height};return tt.render(R,I,ct,Dt)}},[wo,h,_,u]),oi=K==null?void 0:K.row,ie=!!oi,Io=typeof oi=="object"?oi.color:void 0,[Wt,Is]=p.useState(void 0),Hs=p.useCallback(y=>{Is(w=>w===y?w:y)},[]),Ls=p.useMemo(()=>{const y=!!(q!=null&&q.size),w=ie?Wt:void 0;if(!Mt&&!y&&w===void 0)return;const T=Io??_.bgRowHovered;return D=>D>t.length-1?{bgCell:_.bgHeader}:q!=null&&q.has(D)?{bgCell:D===w?_.bgSelectedRowHovered:_.selectionCheckboxBg}:D===w?{bgCell:T}:{}},[t.length,Mt,_.bgHeader,_.selectionCheckboxBg,_.bgRowHovered,_.bgSelectedRowHovered,q,ie,Wt,Io]),Ps=qa({columnsLast:j,rows:t,ctxs:s,refTable:d,theme:_,portalEventTargetRef:u,externalOnItemHovered:f,onHoverRowChange:ie?Hs:void 0},Tt),Bs=Xn({cellsSelectionMode:O,selection:Ct,baseTheme:_,serviceColumnsCount:ot.leadingServiceColumnsCount,activeDataRange:ot.activeDataRange,outlineRange:ot.outlineRange,checkboxSelectedRowIndexes:q,errorCellRanges:Cs,highlightRegionsExternal:st}),ri=Vn({baseRegions:Bs,selectedColumnIndexes:us,headerSelectedRowIndexes:yo,activeRow:hs,activeRange:(Ho=Ct.current)==null?void 0:Ho.range,selectionRangeStack:(Lo=Ct.current)==null?void 0:Lo.rangeStack,checkboxAvailableRowIndexes:V,totalRows:t.length+Mt,firstDataCol:ot.leadingServiceColumnsCount,columnsCount:zt.length,theme:_}),_s=p.useMemo(()=>{const y=ot.leadingServiceColumnsCount;return!ie||Wt===void 0||Wt>t.length-1||y===0?ri:[{color:_.bgServiceRowHovered,range:{x:0,y:Wt,width:y,height:1},style:"no-outline"},...ri??[]]},[ri,ot.leadingServiceColumnsCount,ie,Wt,t.length,_.bgServiceRowHovered]),Rs=p.useMemo(()=>{if(!(!A&&!E&&!L))return{...A,...E?{position:"relative"}:void 0,...L?{height:"100%",minHeight:0}:void 0}},[A,E,L]);return Ft.jsxs("div",{ref:ys,className:F,style:Rs,children:[Ao?Ie.createPortal(Ft.jsx(pi,{ref:ti,onAnimationEndCapture:y=>y.stopPropagation(),id:"portal"}),(Lt==null?void 0:Lt.current)??document.body):Ie.createPortal(Ft.jsx(pi,{id:"portal",ref:ti}),document.body),Ie.createPortal(Ft.jsx(pi,{id:"portal2"}),document.body),!L&&Ft.jsx(Za,{ref:ws,className:"gdg-table",portalElementRef:ti,theme:_,getRowThemeOverride:Ls,onHeaderClicked:Fs,onMouseMove:Es,drawHeader:bs,drawGroupHeader:Ds,getCellContent:pe,columns:j,rows:t.length+Mt,freezeTrailingRows:Mt,freezeColumns:l,minColumnWidth:C,maxColumnAutoWidth:m,maxColumnWidth:x,columnSelect:"none",columnSelectionBlending:"exclusive",drawFocusRing:ds,gridSelection:Ct,onGridSelectionChange:fs,onSelectionCleared:gs,width:r??"100%",onColumnMoved:Ts,onColumnResize:v?os:void 0,customRenderers:ms,rowHeight:es,highlightRegions:_s,rangeSelect:cs,smoothScrollX:!0,smoothScrollY:!0,headerHeight:_e,onCellClicked:vs,onCellContextMenu:ps,onItemHovered:Ps,...kt,experimental:As,keybindings:{...kt.keybindings,copy:!1,paste:!1},onPaste:!1}),E,Ss&&ei&&(b==null?void 0:b({containerElement:ei,renderInContainer:xs}))]})};exports.BUTTON_PADDING_Y=Jt;exports.CACHE_SEPARATOR=Vi;exports.CANVAS_CELL_KIND=qe;exports.CANVAS_PORTAL_EVENT=Me;exports.Canvas=ue;exports.CanvasAbsoluteContainer=il;exports.CanvasBadge=sn;exports.CanvasButton=ln;exports.CanvasChevron=Tl;exports.CanvasContainer=ft;exports.CanvasEmbedIconButton=Ei;exports.CanvasHoverController=Wi;exports.CanvasIcon=cn;exports.CanvasIconButton=an;exports.CanvasLeaf=yt;exports.CanvasLink=pn;exports.CanvasNode=Bt;exports.CanvasRect=un;exports.CanvasRegistry=kr;exports.CanvasRoot=sl;exports.CanvasSkeleton=vn;exports.CanvasText=io;exports.CellCanvasRoot=mt;exports.DANGER_COLOR=Xi;exports.DANGER_TEXT_COLOR=mi;exports.DEFAULT_ACCENT_FG=de;exports.DEFAULT_BORDER_WIDTH=At;exports.DEFAULT_BUTTON_RADIUS=$i;exports.DEFAULT_CURSOR=bn;exports.DEFAULT_HEADER_HEIGHT=_e;exports.DEFAULT_ICON_SIZE=zr;exports.DEFAULT_ICON_SPACING=Ui;exports.DEFAULT_ROW_HEIGHT=Fr;exports.DEFAULT_SECONDARY_HOVER=Or;exports.DEFAULT_SIZE=Ve;exports.DEFAULT_TEXT_PADDING=ll;exports.DEFAULT_VIEW=Ye;exports.DISABLED_BG_COLOR=Nr;exports.DISABLED_BORDER_COLOR=Wr;exports.DISABLED_TEXT_COLOR=yi;exports.DrawBatcher=Ue;exports.EMPTY_CELL_OBJ=Gs;exports.FlexBox=wt;exports.FlexElement=Er;exports.FlexTreeBuilder=Hr;exports.HEX_COLOR_CHAR_CODE=$r;exports.HEX_COLOR_PREFIX=Gr;exports.ICON_SIZE_ADJUSTMENT=Qt;exports.IconSpriteManager=Kr;exports.LEGACY_HOVER_CURSOR=Fn;exports.LIGHTEN_AMOUNT=Yi;exports.LayoutReconciler=Lr;exports.MAX_ICON_SIZE=Gi;exports.POINTER_CANDIDATE_KEYS=yn;exports.PositionResolver=St;exports.RELATIVE_COORD_TOLERANCE=ae;exports.RootBridge=la;exports.RootFlexBox=Ni;exports.SIZES=Sr;exports.SIZE_CONFIG=et;exports.SizeAccumulator=$e;exports.TABLE_GLIDE_SIZES=$s;exports.THEME=ru;exports.TableGlide=lu;exports.VIEW_COLORS=Xe;exports.buildButtonViewColors=Mr;exports.buildCanvasTree=Oe;exports.buildCellId=Kt;exports.calculateButtonWidth=Zi;exports.calculateContentWidth=ji;exports.canvasCellRenderer=Yc;exports.clearButtonCaches=cl;exports.clearIconCache=Kc;exports.createCanvasCell=mn;exports.createCanvasCellRenderer=no;exports.createEmptyCellGlide=Yt;exports.createNormalCanvasInteraction=Rr;exports.createRafUpdate=lo;exports.createSvgDataUrl=Ai;exports.createTextCellGlide=Ne;exports.defaultBatcher=nl;exports.defaultIconManager=Et;exports.dispatchCanvasPortalHover=he;exports.drawButton=en;exports.drawButtonWithView=on;exports.drawEmbedIconButtonWithView=rn;exports.drawIcon=Qr;exports.drawIcon$1=ht;exports.drawIconButton=eo;exports.drawIconButtonWithView=nn;exports.drawIconDirect=Cl;exports.flexBoxLayout=Zs;exports.fontStyles=Re;exports.getCachedTextWidth=Ki;exports.getCellIndices=Le;exports.getDpr=Pe;exports.getHoverState=Ln;exports.getIconCacheSize=Zc;exports.getIconImageDirect=tn;exports.getIconSprite=jr;exports.getIconSpriteStats=fl;exports.getRelativePointerPosition=Sn;exports.getRowHeightBySize=He;exports.getTheme=ho;exports.handleCanvasRootClick=An;exports.handleCanvasRootHover=Pn;exports.handleCellClick=Tn;exports.handleClickHandlers=En;exports.hashString=qr;exports.isAbsoluteCoords=xn;exports.isCanvasCell=oo;exports.isCanvasContent=Oi;exports.isCanvasEl=Ke;exports.isCanvasString=ao;exports.isGlideCellObj=Ta;exports.isGlideGridCellObj=$n;exports.isHoveringBounds=_t;exports.isObject=Ea;exports.isPointInArea=to;exports.isPortalHoverLocked=Rc;exports.isPrimitive=co;exports.isReactIcon=xt;exports.isRelativeCoords=wn;exports.isValueEmpty=Un;exports.lightenColor=qi;exports.lightenColorCached=Ur;exports.lockPortalHover=_c;exports.normalizeCanvasInteraction=_r;exports.normalizeDimensionValue=ki;exports.normalizeHoverPoint=Yr;exports.normalizeIcon=vt;exports.onAnyIconLoad=Zr;exports.performCanvasClick=ro;exports.performCanvasPointerDownIntent=Rn;exports.preloadIconSprites=Jr;exports.queryGlideElements=Jn;exports.reactIconToSvg=kn;exports.rectContainsCell=uo;exports.registerIconDefinitions=dl;exports.resetIconSpriteCache=gl;exports.resolveButtonColors=Ji;exports.resolveClickPoint=xi;exports.resolveDangerColors=Vr;exports.resolvePaddingBox=Tr;exports.resolvePaddingBox$1=Br;exports.resolvePrimaryColors=Si;exports.resolveSecondaryColors=Xr;exports.resolveViewColors=Qi;exports.retrieveRenderData=Zt;exports.storeRenderData=In;exports.subscribeToCanvasPortalHover=$c;exports.subscribeToPortalHoverLock=kc;exports.toRelativePoint=wi;exports.updateGridCells=so;exports.updateHoverState=Hn;exports.updateHoverStateIfNeeded=Bn;exports.useBaseHighlightRegions=Xn;exports.useCanvasRegistry=Aa;exports.useColumnRowHighlightRegions=Vn;exports.useFontLoadRedraw=Wn;exports.useIconLoadRedraw=Gn;exports.useNativeGridSelection=Yn;exports.useSelectionGeometry=qn;exports.useTableSelectionSystem=Kn;exports.waitForCanvasFonts=On;exports.waitForDocumentFonts=zn;exports.waitForFonts=Nn;
@@ -1,25 +0,0 @@
1
- "use strict";const C=require("react/jsx-runtime"),s=require("react"),T=require("../constants/index.cjs"),h=require("styled-components"),V=require("../shared/utils/debug/index.cjs"),S="xl",v=T.breakPoints,E=s.createContext({breakpoint:S,breakpointConfig:v}),b=e=>t=>`
2
- @media ${e} {
3
- ${t}
4
- }
5
- `,W=e=>({xs:{min:0,max:e.xs-1},s:{min:e.xs+1,max:e.s},m:{min:e.s+1,max:e.m},l:{min:e.m+1,max:e.l},xl:{min:e.l+1,max:e.xl},xxl:{min:e.xl+1,max:1e5}}),A=e=>{const t=W(e);return{up:n=>b(`(min-width: ${t[n].max+1}px)`),down:n=>b(`(max-width: ${t[n].min-1}px)`),only:n=>b(`(min-width: ${t[n].min}px) and (max-width: ${t[n].max}px)`),not:n=>b(`(max-width: ${t[n].min-1}px), (min-width: ${t[n].max+1}px)`),between:(n,r)=>b(`(min-width: ${t[n].min}px) and (max-width: ${t[r].max}px)`),exact:(n,r)=>b(`(min-width: ${n}px) and (max-width: ${r}px)`)}},_=A(v),I=({breakpointConfig:e=v,children:t})=>C.jsx(h.ThemeProvider,{theme:{media:A(e)},children:t}),j=({children:e,breakpointConfig:t=v})=>{const[n,r]=s.useState(S);s.useEffect(()=>{const c=Object.entries(t).map(([i,a])=>({key:i,mql:window.matchMedia(`(max-width: ${a}px)`)})),u=()=>{var a;const i=((a=c.find(({mql:l})=>l.matches))==null?void 0:a.key)||S;r(i)};return u(),c.forEach(({mql:i})=>{i.addEventListener("change",u)}),()=>{c.forEach(({mql:i})=>{i.removeEventListener("change",u)})}},[]);const o=s.useMemo(()=>({breakpoint:n,breakpointConfig:t}),[n,t]);return C.jsx(E.Provider,{value:o,children:C.jsx(I,{breakpointConfig:t,children:e})})},U=()=>{const{breakpoint:e,breakpointConfig:t}=s.useContext(E),n=s.useMemo(()=>({up:r=>t[e]>t[r],down:r=>t[e]<t[r],only:r=>t[e]===t[r],not:r=>t[e]!==t[r],between:(r,o)=>t[e]>t[r]&&t[e]<t[o]}),[e,t]);return{breakpoint:e,...n}};function N(e,t,n,r={}){const o={bubbles:!0,cancelable:!0,composed:!0,...r,detail:n},c=new CustomEvent(t,o);return e.dispatchEvent(c)}const q=null,k=s.createContext(q),H=({children:e,clickStreamInstance:t})=>C.jsx(k.Provider,{value:t,children:e});var R=(e=>(e.START="Start",e.END="End",e.SUCCESS="Success",e.FAILED="Failed",e))(R||{}),B=(e=>(e.BUISINESS="business",e))(B||{});const M=()=>{const e=s.useContext(k);if(!e)throw new Error("Ошибка. Приложение необходимо обернуть в ClickStreamProvider");return e},z=(e,t)=>e.join("/").concat(t?`_${t}`:""),K=e=>Object.entries(e).reduce((t,n)=>{if(n[0]&&n[1]){const r={key:n[0],value:n[1]};t.push(r)}return t},[]),Q=e=>Array.isArray(e)?e.join(";"):typeof e=="boolean"?`${e}`:e??"null";function Y(e){function t(){const i=s.useRef(e),a=s.useCallback(()=>i.current,[]),l=s.useRef(new Set),d=s.useCallback(m=>{i.current={...i.current,...m},l.current.forEach(g=>g())},[]),f=s.useCallback(m=>(l.current.add(m),()=>l.current.delete(m)),[]);return{get:a,set:d,subscribe:f}}const n=s.createContext(null);function r({children:i}){return C.jsx(n.Provider,{value:t(),children:i})}function o(i){const a=s.useContext(n);if(!a)throw new Error("Store not found");const[l,d]=s.useState(a.get());return s.useEffect(()=>a.subscribe(()=>d(a.get())),[]),[i(l),a.set]}function c(){const i=s.useContext(n);if(!i)throw new Error("Store not found");return i.set}function u(i){const a=s.useContext(n);if(!a)throw new Error("Store not found");const[l,d]=s.useState(a.get());return s.useEffect(()=>a.subscribe(()=>d(a.get())),[]),i(l)}return{Provider:r,useStore:o,useSelector:u,useDispatch:c}}const X=typeof requestAnimationFrame=="function",G=typeof cancelAnimationFrame=="function",J=e=>X?requestAnimationFrame(e):setTimeout(e,0),Z=e=>{G?cancelAnimationFrame(e):clearTimeout(e)},P=e=>{let t=null;return new ResizeObserver((n,r)=>{t!==null&&Z(t),t=J(()=>{t=null,e(n,r)})})},ee=(e,t=200)=>{let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}},L=(e,t,n="")=>{const r=[],o=new Map;return e.forEach((c,u)=>{const i=`${n}-${u}`,a=c.value||i,l={...c,value:a};if(t&&o.set(a.toString(),t),c.items){const[d,f]=L(c.items,t,i);f.forEach((m,g)=>o.set(g,m)),l.items=d}r.push(l)}),[r,o]},te=e=>s.useCallback((t,n)=>{const r=e.get(t.value);r==null||r(t,n)},[e]),ne=null,$=s.createContext(ne),re=({children:e,busInstance:t})=>C.jsx($.Provider,{value:t,children:e}),oe=()=>{const e=s.useContext($);if(!e)throw new Error("Ошибка. Приложение необходимо обернуть в EventBusProvider");return e},se=()=>{const e=new Uint8Array(16);crypto.getRandomValues(e);const t=Array.from(e).map(o=>o.toString(16).padStart(2,"0")).join(""),n=new Uint8Array(8);crypto.getRandomValues(n);const r=Array.from(n).map(o=>o.toString(16).padStart(2,"0")).join("");return{traceId:t,requestQueryParam:"rq",headers:{"x-b3-traceid":t,"x-b3-spanid":r}}},w=()=>{const e=document.documentElement.getAttribute("data-theme");return e==="dark"?"dark":e==="highContrastLight"?"highContrastLight":"light"},ie=e=>e?h.css(["&&{","}"],e):void 0,x=new Map;function ce(e){const t=`${e}_<space>`;if(x.has(t)){const o=x.get(t);return typeof o=="number"&&o||0}const n=document.createElement("span");n.style.cssText=`
6
- font: ${e};
7
- visibility: hidden;
8
- white-space: pre-wrap;
9
- position: absolute;
10
- `,n.textContent=" ",document.body.appendChild(n);const r=n.offsetWidth;return document.body.removeChild(n),x.set(t,r),r}function ae(e,t){const n=document.createElement("span");n.style.cssText=`
11
- font: ${t};
12
- visibility: hidden;
13
- white-space: nowrap;
14
- position: absolute;
15
- padding: 0;
16
- margin: 0;
17
- `,n.textContent=e,document.body.appendChild(n);const r=n.offsetWidth;return document.body.removeChild(n),r}function D(e,t){if(e===" ")return ce(t);if(e===" ")return D(" ",t)*4;const n=`${t}_${e}`;if(x.has(n)){const o=x.get(n);return typeof o=="number"&&o||0}const r=ae(e,t);return x.set(n,r),r}function ue(e,t,n=0){if(!e)return 0;const r=Array.from(e).reduce((u,i)=>u+D(i,t),0),o=e.length,c=Math.max(o-1,0)*n;return r+c}function le(e,t,n=0){const r=document.createElement("span");r.style.cssText=`
18
- font: ${t};
19
- visibility: hidden;
20
- position: absolute;
21
- white-space: pre;
22
- padding: 0;
23
- margin: 0;
24
- letter-spacing: ${n}px;
25
- `,r.textContent=e,document.body.appendChild(r);const o=r.offsetWidth;return document.body.removeChild(r),o}function de(e,t,n=0){return e?le(e,t,n):0}const me=e=>{const t=e.substring(e.indexOf("(")+1,e.indexOf(","));return getComputedStyle(document.body).getPropertyValue(t)},fe=(e,t)=>{const n=t.split(".");let r=e;for(const o of n)if(typeof r=="object"&&r!==null&&o in r)r=r[o];else return;return r},he=e=>T.viewColors[e],pe=()=>{const[e,t]=s.useState(()=>w()??"light");return s.useEffect(()=>{t(w());const n=new MutationObserver(()=>t(w()));return n.observe(document.documentElement,{childList:!1,attributes:!0,attributeFilter:["data-theme"],subtree:!1}),()=>{var r;return(r=n==null?void 0:n.disconnect)==null?void 0:r.call(n)}},[]),e},ge=(e,t)=>{const[n,r]=s.useState(!1),o=s.useRef();return[s.useCallback(function(...u){r(!0),clearTimeout(o.current),o.current=setTimeout(()=>{e.apply(this,u),r(!1)},t)},[t,e]),{debouncing:n}]},be=(e,t=500,n)=>{const[r,o]=s.useState(n??e);return s.useEffect(()=>{const c=setTimeout(()=>{o(e)},t);return()=>{clearTimeout(c)}},[e]),r},p=new Map,xe=e=>!e||p.get(e)==="loaded"?Promise.resolve():new Promise(t=>{const n=new Image;n.onload=()=>{p.set(e,"loaded"),t()},n.onerror=()=>{p.set(e,"error"),t()},n.src=e}),Ce=(e,t=0)=>{const[n,r]=s.useState(()=>e?p.get(e)??"loading":"idle"),[o,c]=s.useState(0),u=s.useRef(e);u.current=e;const i=s.useCallback(()=>{e&&p.delete(e),c(a=>a+1)},[e]);return s.useEffect(()=>{if(!e){r("idle");return}const a=p.get(e);if(a){r(a);return}let l=!0,d;r("loading");const f=g=>{p.set(e,g);const y=()=>{l&&u.current===e&&r(g)};t>0?d=setTimeout(y,t):y()},m=new Image;return m.onload=()=>f("loaded"),m.onerror=()=>f("error"),m.src=e,()=>{l=!1,d&&clearTimeout(d)}},[e,o,t]),{status:n,isLoading:n==="loading",isLoaded:n==="loaded",isError:n==="error",reload:i}},we=typeof window<"u"&&"structuredClone"in window&&typeof window.structuredClone=="function"||typeof globalThis<"u"&&"structuredClone"in globalThis&&typeof globalThis.structuredClone=="function";function F(...e){return e.reduce((t,n)=>(!n||typeof n!="string"||(t=`${t} ${n}`),t),"")}const ve=F;function Se(...e){const t=e.filter(Boolean);return t.length<=1?t[0]||null:function(r){for(const o of t)typeof o=="function"?o(r):o&&(o.current=r)}}const ye=(e,t,n)=>t>n?n:t<e?e:t,O=e=>e!=null&&e.lines&&e.lines>1?{display:"-webkit-box",WebkitLineClamp:e.lines,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"normal"}:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},Te=e=>h.css(O(e)),Ee=h.css(["width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;"]),Ae=(e,t=200)=>{let n;return(...r)=>{n||(n=!0,e(...r),setTimeout(()=>{n=!1},t))}},Ie=(e,t=200)=>{let n=null,r=null,o=!1;const c=(...u)=>{n=u,o||(e(...u),o=!0,r=setTimeout(()=>{o=!1,n!==u&&c(...n),r=null},t))};return c.cancel=()=>{r&&(clearTimeout(r),o=!1,r=null)},c},ke="0.3s",Re=`all ${ke} ease`,Be=h.keyframes(["from{transform:scale(0.85);opacity:0;}to{transform:scale(1);opacity:1;}"]),Pe=h.keyframes(["from{transform:scale(1);opacity:1;}to{transform:scale(0.85);opacity:0;}"]);h.css(["animation:"," "," "," forwards;"],({$isOpen:e})=>e?Be:Pe,({$duration:e="2.35s"})=>e,({$timing:e="ease"})=>e);const Le=h.keyframes(["from{opacity:0;transform:translateY(-10px);}to{opacity:1;transform:translateY(0);}"]),$e=(e,t="vertical",n=!0)=>{const[r,o]=s.useState({vertical:!1,horizontal:!1});switch(s.useEffect(()=>{const c=e.current;if(!c)return;const u=()=>{if(!c)return;const a=c.scrollHeight>c.clientHeight,l=c.scrollWidth>c.clientWidth;o(d=>d.vertical!==a||d.horizontal!==l?{vertical:a,horizontal:l}:d)};u();let i;return n&&typeof ResizeObserver<"u"&&(i=P(u),i.observe(c)),()=>{i==null||i.disconnect()}},[e,n]),t){case"vertical":return r.vertical;case"horizontal":return r.horizontal;case"both":return r;default:return r.vertical}},De=V.createDebugLogger("TABLE");exports.BreakpointProvider=j;exports.ClickStreamProvider=H;exports.DEFAULT_TRANSITION=Re;exports.EClickStreamErrorType=B;exports.EClickStreamStatusProcess=R;exports.EventBusProvider=re;exports.MediaProvider=I;exports.bubble=N;exports.clamp=ye;exports.createClickStreamEventValue=z;exports.createSafeResizeObserver=P;exports.createStore=Y;exports.debounce=ee;exports.fadeIn=Le;exports.generateB3Headers=se;exports.getActiveTheme=w;exports.getCssProp=ie;exports.getTextWidth=de;exports.getTextWidthByCache=ue;exports.getTokenValue=me;exports.getValue=fe;exports.getViewColor=he;exports.isStructuredCloneSupported=we;exports.mCls=ve;exports.media=_;exports.mergeClasses=F;exports.mergeRefs=Se;exports.preloadImage=xe;exports.processDropdownItems=L;exports.tableDebug=De;exports.throttle=Ae;exports.throttleWithLastCall=Ie;exports.transformClickStreamProperties=K;exports.transformClickStreamPropertyValuesToString=Q;exports.truncateText=O;exports.truncateTextCss=Te;exports.useActiveTheme=pe;exports.useBreakpoint=U;exports.useClickStream=M;exports.useDebouncedFn=ge;exports.useDebouncedValue=be;exports.useDropdownItemClickHandler=te;exports.useEventBus=oe;exports.useHasScroll=$e;exports.useImageLoader=Ce;exports.visuallyHiddenCss=Ee;