@daisforge/ui 1.22.0 → 1.24.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 (498) hide show
  1. package/chunks/AiAgentPopup-CLGSjg5L.cjs +11 -0
  2. package/chunks/AiAgentPopup-CtMhai1X.mjs +797 -0
  3. package/chunks/AnalyticalWidget-Bvcm1qpU.cjs +43 -0
  4. package/chunks/AnalyticalWidget-CRfihris.mjs +352 -0
  5. package/chunks/ApprovalCenter-D7K7J-QB.cjs +1 -0
  6. package/chunks/{ApprovalCenter-DLKZP2AO.mjs → ApprovalCenter-dJpI91uN.mjs} +10 -10
  7. package/chunks/BlockTitle-CcYYHiOo.cjs +1 -0
  8. package/chunks/{BlockTitle-DsXxImR6.mjs → BlockTitle-DCmM-9AN.mjs} +2 -2
  9. package/chunks/{Container-DbZwlfIM.mjs → Container-C7PzvUwd.mjs} +1 -1
  10. package/chunks/{Container-DHnX1sHY.cjs → Container-bVqI3en9.cjs} +1 -1
  11. package/chunks/{EmptyState-DH1xawxg.cjs → EmptyState-D-bmtvmy.cjs} +1 -1
  12. package/chunks/{EmptyState-CUCseg9M.mjs → EmptyState-ZsOlvU4d.mjs} +1 -1
  13. package/chunks/{FiltersActions-BJ5gD6Nx.mjs → FiltersActions-DA06ZTCK.mjs} +15 -15
  14. package/chunks/FiltersActions-DqIbyWHy.cjs +1 -0
  15. package/chunks/{FormSegmentGroup-BYQ6yMK1.cjs → FormSegmentGroup-CNIqOYfm.cjs} +1 -1
  16. package/chunks/{FormSegmentGroup-C9qYxYT9.mjs → FormSegmentGroup-DwTRM58f.mjs} +1 -1
  17. package/chunks/{GridDND-DK6SAO8q.cjs → GridDND-Bwmr7gla.cjs} +1 -1
  18. package/chunks/{GridDND-CqvpXgCY.mjs → GridDND-DC5VoxEY.mjs} +83 -83
  19. package/chunks/{LeftPanel-C5SsoRJS.mjs → LeftPanel-C10BLKIn.mjs} +1 -1
  20. package/chunks/{LeftPanel-AyuV7bGS.cjs → LeftPanel-upGFk7jM.cjs} +1 -1
  21. package/chunks/{ListOfFilters-CfV2bs_4.mjs → ListOfFilters-Cwqz354m.mjs} +3 -3
  22. package/chunks/{ListOfFilters-mqTsQbq_.cjs → ListOfFilters-DSysYwOU.cjs} +1 -1
  23. package/chunks/{MassActions-C6LY-g9r.mjs → MassActions-Bzf8AR_L.mjs} +46 -46
  24. package/chunks/MassActions-yxSUA4Vl.cjs +1 -0
  25. package/chunks/PageTitle-Bg4PNEXS.cjs +9 -0
  26. package/chunks/{PageTitle-DkfAiZM4.mjs → PageTitle-CXtNgH-b.mjs} +7 -7
  27. package/chunks/{SplitView-BqS1Jbo4.mjs → SplitView-BzamJzNc.mjs} +17 -17
  28. package/chunks/{SplitView-DNmd4sJe.cjs → SplitView-DeJ3V-kq.cjs} +1 -1
  29. package/chunks/Stories-CNlL0Bcb.cjs +1 -0
  30. package/chunks/{Stories-BnHxMCEZ.mjs → Stories-UUV0GNEV.mjs} +33 -33
  31. package/chunks/{Table-tUWuA3Ri.mjs → Table-C-03ZtkJ.mjs} +2719 -2671
  32. package/chunks/Table-C1u87WP_.cjs +31 -0
  33. package/chunks/TableCanvas-IDEevoRM.cjs +30 -0
  34. package/chunks/{TableCanvas-BX5aciu7.mjs → TableCanvas-SPpKEgwz.mjs} +5988 -5636
  35. package/chunks/TableGlide-eny8NAi4.cjs +1 -0
  36. package/chunks/TableGlide-oNq4dFXT.mjs +9222 -0
  37. package/chunks/{styles-CJ5y9FKW.mjs → styles-CJPkBVWK.mjs} +6 -6
  38. package/chunks/{styles-kUWPuNSD.cjs → styles-CpC_FuBg.cjs} +1 -1
  39. package/chunks/{utils-u1KJ37g3.mjs → utils-Hu77fGGe.mjs} +102 -102
  40. package/chunks/{utils-ChDQGRjv.cjs → utils-OQNruMpn.cjs} +5 -5
  41. package/components/AiAgentPopover/index.cjs +1 -1
  42. package/components/AiAgentPopover/index.mjs +1 -1
  43. package/components/AiAgentPopup/AiAgentInput.d.ts +3 -0
  44. package/components/AiAgentPopup/AiAgentLeftPanel.d.ts +6 -0
  45. package/components/AiAgentPopup/AiAgentPopup.constants.d.ts +32 -0
  46. package/components/AiAgentPopup/AiAgentPopup.d.ts +3 -0
  47. package/components/AiAgentPopup/AiAgentPopup.styled.d.ts +33 -0
  48. package/components/AiAgentPopup/AiAgentPopup.types.d.ts +83 -0
  49. package/components/AiAgentPopup/AiAgentPopup.utils.d.ts +12 -0
  50. package/components/AiAgentPopup/AiAgentSurface.d.ts +6 -0
  51. package/components/AiAgentPopup/hooks/useDrag.d.ts +18 -0
  52. package/components/AiAgentPopup/hooks/useIsDarkTheme.d.ts +1 -0
  53. package/components/AiAgentPopup/hooks/usePopupPosition.d.ts +20 -0
  54. package/components/AiAgentPopup/hooks/usePopupResize.d.ts +40 -0
  55. package/components/AiAgentPopup/hooks/useStateStorage.d.ts +6 -0
  56. package/components/AiAgentPopup/index.cjs +1 -0
  57. package/components/AiAgentPopup/index.d.ts +3 -0
  58. package/components/AiAgentPopup/index.mjs +5 -0
  59. package/components/AnalyticalWidget/AnalyticalWidget.d.ts +8 -24
  60. package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/AnalyticalWidgetIconButtonDots.d.ts +8 -24
  61. package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/index.cjs +1 -1
  62. package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/index.mjs +1 -1
  63. package/components/AnalyticalWidget/components/AnalyticalWidgetChips/index.cjs +1 -1
  64. package/components/AnalyticalWidget/components/AnalyticalWidgetChips/index.mjs +2 -2
  65. package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/index.cjs +1 -1
  66. package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/index.mjs +2 -2
  67. package/components/AnalyticalWidget/index.cjs +1 -1
  68. package/components/AnalyticalWidget/index.mjs +1 -1
  69. package/components/ApprovalCenter/components/index.cjs +1 -1
  70. package/components/ApprovalCenter/components/index.mjs +1 -1
  71. package/components/ApprovalCenter/index.cjs +1 -1
  72. package/components/ApprovalCenter/index.mjs +1 -1
  73. package/components/Autocomplete/Autocomplete.d.ts +128 -128
  74. package/components/AutocompleteSearch/index.cjs +1 -1
  75. package/components/AutocompleteSearch/index.mjs +2 -2
  76. package/components/BlockGradientScroll/index.cjs +1 -1
  77. package/components/BlockGradientScroll/index.mjs +1 -1
  78. package/components/BlockTitle/index.cjs +1 -1
  79. package/components/BlockTitle/index.mjs +1 -1
  80. package/components/BlockTitle/utils/index.cjs +1 -1
  81. package/components/BlockTitle/utils/index.mjs +1 -1
  82. package/components/Collapse/index.cjs +1 -1
  83. package/components/Collapse/index.mjs +1 -1
  84. package/components/Combobox/index.cjs +1 -1
  85. package/components/Combobox/index.mjs +1 -1
  86. package/components/EmptyState/components/index.cjs +1 -1
  87. package/components/EmptyState/components/index.mjs +1 -1
  88. package/components/EmptyState/index.cjs +1 -1
  89. package/components/EmptyState/index.mjs +1 -1
  90. package/components/GridDND/index.cjs +1 -1
  91. package/components/GridDND/index.mjs +1 -1
  92. package/components/GridDND/utils/index.cjs +1 -1
  93. package/components/GridDND/utils/index.mjs +1 -1
  94. package/components/IconButton/index.cjs +1 -1
  95. package/components/IconButton/index.mjs +1 -1
  96. package/components/LeftPanel/components/index.cjs +1 -1
  97. package/components/LeftPanel/components/index.mjs +1 -1
  98. package/components/LeftPanel/hooks/index.cjs +1 -1
  99. package/components/LeftPanel/hooks/index.mjs +1 -1
  100. package/components/LeftPanel/index.cjs +1 -1
  101. package/components/LeftPanel/index.mjs +1 -1
  102. package/components/LeftPanel/utils/index.cjs +1 -1
  103. package/components/LeftPanel/utils/index.mjs +1 -1
  104. package/components/ListOfFilters/index.cjs +1 -1
  105. package/components/ListOfFilters/index.mjs +1 -1
  106. package/components/MassActions/hooks/index.cjs +1 -1
  107. package/components/MassActions/hooks/index.mjs +1 -1
  108. package/components/MassActions/index.cjs +1 -1
  109. package/components/MassActions/index.mjs +1 -1
  110. package/components/ModalDF/index.cjs +1 -1
  111. package/components/ModalDF/index.mjs +1 -1
  112. package/components/Notification/index.cjs +1 -1
  113. package/components/Notification/index.mjs +6 -6
  114. package/components/PageTitle/index.cjs +1 -1
  115. package/components/PageTitle/index.mjs +1 -1
  116. package/components/PageTitle/utils/index.cjs +1 -1
  117. package/components/PageTitle/utils/index.mjs +1 -1
  118. package/components/PopoverDF/index.cjs +1 -1
  119. package/components/PopoverDF/index.mjs +9 -9
  120. package/components/PopoverDF/styled.d.ts +1 -23
  121. package/components/PopupDF/index.cjs +1 -1
  122. package/components/PopupDF/index.mjs +118 -143
  123. package/components/SplitView/index.cjs +1 -1
  124. package/components/SplitView/index.mjs +1 -1
  125. package/components/SplitView/utils/index.cjs +1 -1
  126. package/components/SplitView/utils/index.mjs +1 -1
  127. package/components/Stories/components/StoriesBanner/index.cjs +1 -1
  128. package/components/Stories/components/StoriesBanner/index.mjs +1 -1
  129. package/components/Stories/components/StoriesContent/index.cjs +1 -1
  130. package/components/Stories/components/StoriesContent/index.mjs +1 -1
  131. package/components/Stories/components/StoriesPreview/index.cjs +1 -1
  132. package/components/Stories/components/StoriesPreview/index.mjs +1 -1
  133. package/components/Stories/components/StoriesProgress/index.cjs +1 -1
  134. package/components/Stories/components/StoriesProgress/index.mjs +1 -1
  135. package/components/Stories/components/StoriesViewer/index.cjs +1 -1
  136. package/components/Stories/components/StoriesViewer/index.mjs +1 -1
  137. package/components/Stories/index.cjs +1 -1
  138. package/components/Stories/index.mjs +1 -1
  139. package/components/Table/components/TableDropdown/index.cjs +1 -1
  140. package/components/Table/components/TableDropdown/index.mjs +1 -1
  141. package/components/Table/feature-collapse-table/index.cjs +1 -1
  142. package/components/Table/feature-collapse-table/index.mjs +1 -1
  143. package/components/Table/feature-column-control/ColumnsList/index.cjs +1 -1
  144. package/components/Table/feature-column-control/ColumnsList/index.mjs +1 -1
  145. package/components/Table/feature-column-control/columnsStateDiff.d.ts +11 -0
  146. package/components/Table/feature-column-control/index.cjs +1 -1
  147. package/components/Table/feature-column-control/index.mjs +1 -1
  148. package/components/Table/feature-column-control/types.d.ts +2 -0
  149. package/components/Table/feature-columns-grouping/index.cjs +1 -1
  150. package/components/Table/feature-columns-grouping/index.mjs +1 -1
  151. package/components/Table/feature-context-menu/index.cjs +1 -1
  152. package/components/Table/feature-context-menu/index.mjs +1 -1
  153. package/components/Table/feature-edit/index.cjs +1 -1
  154. package/components/Table/feature-edit/index.mjs +1 -1
  155. package/components/Table/feature-filtering/combobox/index.cjs +1 -1
  156. package/components/Table/feature-filtering/combobox/index.mjs +1 -1
  157. package/components/Table/feature-filtering/filter-list-block/index.cjs +1 -1
  158. package/components/Table/feature-filtering/filter-list-block/index.mjs +1 -1
  159. package/components/Table/feature-filtering/header-filter-button/index.cjs +1 -1
  160. package/components/Table/feature-filtering/header-filter-button/index.mjs +1 -1
  161. package/components/Table/feature-filtering/index.cjs +1 -1
  162. package/components/Table/feature-filtering/index.mjs +1 -1
  163. package/components/Table/feature-filtering/popover.d.ts +1 -23
  164. package/components/Table/feature-filtering/sidebar-filter-block/index.cjs +1 -1
  165. package/components/Table/feature-filtering/sidebar-filter-block/index.mjs +1 -1
  166. package/components/Table/feature-infinity-scroll/index.cjs +1 -1
  167. package/components/Table/feature-infinity-scroll/index.mjs +1 -1
  168. package/components/Table/feature-key-text/index.cjs +1 -1
  169. package/components/Table/feature-key-text/index.mjs +1 -1
  170. package/components/Table/feature-pagination/index.cjs +1 -1
  171. package/components/Table/feature-pagination/index.mjs +1 -1
  172. package/components/Table/feature-right-sidebar/index.cjs +1 -1
  173. package/components/Table/feature-right-sidebar/index.mjs +1 -1
  174. package/components/Table/feature-row-detail/index.cjs +1 -1
  175. package/components/Table/feature-row-detail/index.mjs +1 -1
  176. package/components/Table/feature-row-instruments/index.cjs +1 -1
  177. package/components/Table/feature-row-instruments/index.mjs +1 -1
  178. package/components/Table/feature-row-size/index.cjs +1 -1
  179. package/components/Table/feature-row-size/index.mjs +1 -1
  180. package/components/Table/feature-rows-grouping/index.cjs +1 -1
  181. package/components/Table/feature-rows-grouping/index.mjs +1 -1
  182. package/components/Table/feature-searching/index.cjs +1 -1
  183. package/components/Table/feature-searching/index.mjs +1 -1
  184. package/components/Table/feature-searching/styled.d.ts +128 -128
  185. package/components/Table/feature-select-row/index.cjs +1 -1
  186. package/components/Table/feature-select-row/index.mjs +1 -1
  187. package/components/Table/feature-sorting/index.cjs +1 -1
  188. package/components/Table/feature-sorting/index.mjs +1 -1
  189. package/components/Table/feature-table-settings/index.cjs +1 -1
  190. package/components/Table/feature-table-settings/index.mjs +1 -1
  191. package/components/Table/feature-tree/index.cjs +1 -1
  192. package/components/Table/feature-tree/index.mjs +1 -1
  193. package/components/Table/index.cjs +1 -1
  194. package/components/Table/index.mjs +1 -1
  195. package/components/Table/renders/formatCell/index.cjs +1 -1
  196. package/components/Table/renders/formatCell/index.mjs +1 -1
  197. package/components/Table/styles/index.cjs +1 -1
  198. package/components/Table/styles/index.mjs +1 -1
  199. package/components/Table/table-hooks/index.cjs +1 -1
  200. package/components/Table/table-hooks/index.mjs +1 -1
  201. package/components/Table/types/index.cjs +1 -1
  202. package/components/Table/types/index.mjs +1 -1
  203. package/components/Table/types/utils.type.d.ts +1 -1
  204. package/components/Table/utils/index.cjs +1 -1
  205. package/components/Table/utils/index.mjs +1 -1
  206. package/components/Table/widgets/control-block/index.cjs +1 -1
  207. package/components/Table/widgets/control-block/index.mjs +1 -1
  208. package/components/Table/widgets/control-block/right-side/index.cjs +1 -1
  209. package/components/Table/widgets/control-block/right-side/index.mjs +1 -1
  210. package/components/Table/widgets/index.cjs +1 -1
  211. package/components/Table/widgets/index.mjs +1 -1
  212. package/components/Table/widgets/mass-actions/index.cjs +1 -1
  213. package/components/Table/widgets/mass-actions/index.mjs +1 -1
  214. package/components/TableCanvas/TableGlideInstance/TableGlideInstance.d.ts +1 -1
  215. package/components/TableCanvas/TableGlideInstance/adapters/column/index.cjs +1 -1
  216. package/components/TableCanvas/TableGlideInstance/adapters/column/index.mjs +1 -1
  217. package/components/TableCanvas/TableGlideInstance/adapters/index.cjs +1 -1
  218. package/components/TableCanvas/TableGlideInstance/adapters/index.mjs +1 -1
  219. package/components/TableCanvas/TableGlideInstance/index.cjs +1 -1
  220. package/components/TableCanvas/TableGlideInstance/index.mjs +6 -6
  221. package/components/TableCanvas/TableGlideInstance/type.d.ts +5 -2
  222. package/components/TableCanvas/TableGlideInstance/utils/column/index.cjs +1 -1
  223. package/components/TableCanvas/TableGlideInstance/utils/column/index.mjs +2 -2
  224. package/components/TableCanvas/TableGlideInstance/utils/index.cjs +1 -1
  225. package/components/TableCanvas/TableGlideInstance/utils/index.mjs +1 -1
  226. package/components/TableCanvas/components/SplitIconButton/index.cjs +1 -1
  227. package/components/TableCanvas/components/SplitIconButton/index.mjs +2 -2
  228. package/components/TableCanvas/components/TableDropdown/index.cjs +1 -1
  229. package/components/TableCanvas/components/TableDropdown/index.mjs +1 -1
  230. package/components/TableCanvas/contexts.d.ts +8 -2
  231. package/components/TableCanvas/feature-borders/resolveBorders.d.ts +5 -0
  232. package/components/TableCanvas/feature-cell-transfer/index.cjs +1 -1
  233. package/components/TableCanvas/feature-cell-transfer/index.mjs +11 -11
  234. package/components/TableCanvas/feature-collapse-table/index.cjs +1 -1
  235. package/components/TableCanvas/feature-collapse-table/index.mjs +2 -2
  236. package/components/TableCanvas/feature-column-control/ColumnsList/index.cjs +1 -1
  237. package/components/TableCanvas/feature-column-control/ColumnsList/index.mjs +2 -2
  238. package/components/TableCanvas/feature-column-control/columnsStateDiff.d.ts +11 -0
  239. package/components/TableCanvas/feature-column-control/index.cjs +1 -1
  240. package/components/TableCanvas/feature-column-control/index.mjs +2 -2
  241. package/components/TableCanvas/feature-column-control/types.d.ts +2 -0
  242. package/components/TableCanvas/feature-columns-grouping/index.cjs +1 -1
  243. package/components/TableCanvas/feature-columns-grouping/index.mjs +1 -1
  244. package/components/TableCanvas/feature-content-state/index.cjs +1 -1
  245. package/components/TableCanvas/feature-content-state/index.mjs +1 -1
  246. package/components/TableCanvas/feature-context-menu/index.cjs +1 -1
  247. package/components/TableCanvas/feature-context-menu/index.mjs +1 -1
  248. package/components/TableCanvas/feature-edit/index.cjs +1 -1
  249. package/components/TableCanvas/feature-edit/index.mjs +6 -6
  250. package/components/TableCanvas/feature-filtering/combobox/index.cjs +1 -1
  251. package/components/TableCanvas/feature-filtering/combobox/index.mjs +4 -4
  252. package/components/TableCanvas/feature-filtering/filter-list-block/index.cjs +1 -1
  253. package/components/TableCanvas/feature-filtering/filter-list-block/index.mjs +1 -1
  254. package/components/TableCanvas/feature-filtering/header-filter-button/index.cjs +1 -1
  255. package/components/TableCanvas/feature-filtering/header-filter-button/index.mjs +1 -1
  256. package/components/TableCanvas/feature-filtering/index.cjs +1 -1
  257. package/components/TableCanvas/feature-filtering/index.mjs +3 -3
  258. package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.cjs +1 -1
  259. package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.mjs +1 -1
  260. package/components/TableCanvas/feature-infinity-scroll/index.cjs +1 -1
  261. package/components/TableCanvas/feature-infinity-scroll/index.mjs +4 -4
  262. package/components/TableCanvas/feature-key-text/index.cjs +1 -1
  263. package/components/TableCanvas/feature-key-text/index.mjs +5 -5
  264. package/components/TableCanvas/feature-notifications/index.cjs +1 -1
  265. package/components/TableCanvas/feature-notifications/index.mjs +2 -2
  266. package/components/TableCanvas/feature-pagination/TablePagination.d.ts +2 -0
  267. package/components/TableCanvas/feature-pagination/index.cjs +1 -1
  268. package/components/TableCanvas/feature-pagination/index.mjs +5 -5
  269. package/components/TableCanvas/feature-popover-table/components/styled.d.ts +1 -23
  270. package/components/TableCanvas/feature-popover-table/context/index.cjs +1 -1
  271. package/components/TableCanvas/feature-popover-table/context/index.mjs +1 -1
  272. package/components/TableCanvas/feature-popover-table/hooks/index.cjs +1 -1
  273. package/components/TableCanvas/feature-popover-table/hooks/index.mjs +1 -1
  274. package/components/TableCanvas/feature-popover-table/index.cjs +1 -1
  275. package/components/TableCanvas/feature-popover-table/index.mjs +6 -6
  276. package/components/TableCanvas/feature-popover-table/utils/index.cjs +1 -1
  277. package/components/TableCanvas/feature-popover-table/utils/index.mjs +1 -1
  278. package/components/TableCanvas/feature-right-sidebar/compatibility.d.ts +8 -0
  279. package/components/TableCanvas/feature-right-sidebar/index.cjs +1 -1
  280. package/components/TableCanvas/feature-right-sidebar/index.d.ts +2 -3
  281. package/components/TableCanvas/feature-right-sidebar/index.mjs +4 -4
  282. package/components/TableCanvas/feature-row-detail/index.cjs +1 -1
  283. package/components/TableCanvas/feature-row-detail/index.mjs +1 -1
  284. package/components/TableCanvas/feature-row-instruments/index.cjs +1 -1
  285. package/components/TableCanvas/feature-row-instruments/index.mjs +7 -7
  286. package/components/TableCanvas/feature-row-markers/index.cjs +1 -1
  287. package/components/TableCanvas/feature-row-markers/index.mjs +1 -1
  288. package/components/TableCanvas/feature-row-size/index.cjs +1 -1
  289. package/components/TableCanvas/feature-row-size/index.mjs +4 -4
  290. package/components/TableCanvas/feature-rows-grouping/index.cjs +1 -1
  291. package/components/TableCanvas/feature-rows-grouping/index.mjs +10 -10
  292. package/components/TableCanvas/feature-searching/index.cjs +1 -1
  293. package/components/TableCanvas/feature-searching/index.mjs +2 -2
  294. package/components/TableCanvas/feature-searching/styled.d.ts +128 -128
  295. package/components/TableCanvas/feature-select-row/index.cjs +1 -1
  296. package/components/TableCanvas/feature-select-row/index.mjs +1 -1
  297. package/components/TableCanvas/feature-sidebar/constants.d.ts +7 -0
  298. package/components/TableCanvas/feature-sidebar/getCustomSidebarTabs.d.ts +4 -0
  299. package/components/TableCanvas/feature-sidebar/index.cjs +1 -0
  300. package/components/TableCanvas/feature-sidebar/index.d.ts +1 -0
  301. package/components/TableCanvas/feature-sidebar/index.mjs +4 -0
  302. package/components/TableCanvas/feature-sidebar/ui/BottomSheet.d.ts +6 -0
  303. package/components/TableCanvas/feature-sidebar/ui/BottomSheet.styled.d.ts +6 -0
  304. package/components/TableCanvas/{feature-right-sidebar → feature-sidebar}/ui/SidebarContentLayout.d.ts +1 -0
  305. package/components/TableCanvas/{feature-right-sidebar → feature-sidebar}/ui/SidebarTabs.d.ts +2 -1
  306. package/components/TableCanvas/feature-sidebar/ui/TableSidebar.d.ts +16 -0
  307. package/components/TableCanvas/{feature-right-sidebar → feature-sidebar}/ui/styled.d.ts +5 -2
  308. package/components/TableCanvas/feature-sidebar/useSidebarTabsState.d.ts +14 -0
  309. package/components/TableCanvas/feature-sorting/index.cjs +1 -1
  310. package/components/TableCanvas/feature-sorting/index.mjs +2 -2
  311. package/components/TableCanvas/feature-sticky/index.cjs +1 -0
  312. package/components/TableCanvas/feature-sticky/index.d.ts +3 -0
  313. package/components/TableCanvas/feature-sticky/index.mjs +5 -0
  314. package/components/TableCanvas/feature-sticky/types.d.ts +2 -0
  315. package/components/TableCanvas/feature-sticky/useStickyColumnIndexes.d.ts +8 -0
  316. package/components/TableCanvas/feature-sticky/useStickyRowIndexes.d.ts +3 -0
  317. package/components/TableCanvas/feature-table-settings/index.cjs +1 -1
  318. package/components/TableCanvas/feature-table-settings/index.mjs +1 -1
  319. package/components/TableCanvas/feature-tooltip/index.cjs +1 -1
  320. package/components/TableCanvas/feature-tooltip/index.mjs +2 -2
  321. package/components/TableCanvas/feature-tooltip/utils/index.cjs +1 -1
  322. package/components/TableCanvas/feature-tooltip/utils/index.mjs +4 -4
  323. package/components/TableCanvas/feature-tree/index.cjs +1 -1
  324. package/components/TableCanvas/feature-tree/index.mjs +1 -1
  325. package/components/TableCanvas/index.cjs +1 -1
  326. package/components/TableCanvas/index.d.ts +2 -1
  327. package/components/TableCanvas/index.mjs +58 -54
  328. package/components/TableCanvas/renders/formatCell/index.cjs +1 -1
  329. package/components/TableCanvas/renders/formatCell/index.mjs +1 -1
  330. package/components/TableCanvas/styles/classNames.d.ts +1 -0
  331. package/components/TableCanvas/styles/getReservedTableHeight.d.ts +18 -0
  332. package/components/TableCanvas/styles/index.cjs +1 -1
  333. package/components/TableCanvas/styles/index.mjs +26 -24
  334. package/components/TableCanvas/styles/styles.constants.d.ts +3 -1
  335. package/components/TableCanvas/styles/styles.d.ts +4 -6
  336. package/components/TableCanvas/table-hooks/index.cjs +1 -1
  337. package/components/TableCanvas/table-hooks/index.mjs +4 -4
  338. package/components/TableCanvas/table-hooks/useInlineStyle.d.ts +2 -1
  339. package/components/TableCanvas/table-hooks/useLeftSidebarValues.d.ts +7 -0
  340. package/components/TableCanvas/table-hooks/useSidebarOpenState.d.ts +11 -0
  341. package/components/TableCanvas/table-hooks/useSidebarValues.d.ts +1 -0
  342. package/components/TableCanvas/types/index.cjs +1 -1
  343. package/components/TableCanvas/types/index.mjs +2 -2
  344. package/components/TableCanvas/types/table-config.type.d.ts +21 -2
  345. package/components/TableCanvas/utils/calculateMinColumnWidth.d.ts +6 -1
  346. package/components/TableCanvas/utils/index.cjs +1 -1
  347. package/components/TableCanvas/utils/index.mjs +4 -4
  348. package/components/TableCanvas/widgets/control-block/compression/index.cjs +1 -1
  349. package/components/TableCanvas/widgets/control-block/compression/index.mjs +1 -1
  350. package/components/TableCanvas/widgets/control-block/control-block.constants.d.ts +6 -0
  351. package/components/TableCanvas/widgets/control-block/index.cjs +1 -1
  352. package/components/TableCanvas/widgets/control-block/index.mjs +5 -5
  353. package/components/TableCanvas/widgets/control-block/right-side/index.cjs +1 -1
  354. package/components/TableCanvas/widgets/control-block/right-side/index.mjs +2 -2
  355. package/components/TableCanvas/widgets/control-block/types.d.ts +1 -0
  356. package/components/TableCanvas/widgets/header-buttons-state.d.ts +16 -0
  357. package/components/TableCanvas/widgets/index.cjs +1 -1
  358. package/components/TableCanvas/widgets/index.mjs +5 -5
  359. package/components/TableCanvas/widgets/mass-actions/MassActions.d.ts +2 -1
  360. package/components/TableCanvas/widgets/mass-actions/hooks/index.cjs +1 -1
  361. package/components/TableCanvas/widgets/mass-actions/hooks/index.mjs +3 -3
  362. package/components/TableCanvas/widgets/mass-actions/hooks/useMassActionsCanvasWidth.d.ts +1 -0
  363. package/components/TableCanvas/widgets/mass-actions/hooks/useMassActionsCompression.d.ts +1 -1
  364. package/components/TableCanvas/widgets/mass-actions/hooks/useMassActionsSidebar.d.ts +4 -1
  365. package/components/TableCanvas/widgets/mass-actions/index.cjs +1 -1
  366. package/components/TableCanvas/widgets/mass-actions/index.mjs +1 -1
  367. package/components/TableCanvas/widgets/table-or-card-UI.d.ts +8 -4
  368. package/components/TableContract/index.cjs +1 -1
  369. package/components/TableContract/index.mjs +2 -2
  370. package/components/TableGlide/TableGlide.d.ts +1 -1
  371. package/components/TableGlide/constants.d.ts +3 -3
  372. package/components/TableGlide/content-tokens.generated.d.ts +612 -0
  373. package/components/TableGlide/hooks/selection/index.cjs +1 -1
  374. package/components/TableGlide/hooks/selection/index.mjs +1 -1
  375. package/components/TableGlide/hooks/selection/useBaseHighlightRegions.d.ts +3 -1
  376. package/components/TableGlide/hooks/selection/useColoringLayers.d.ts +3 -3
  377. package/components/TableGlide/hooks/selection/useColumnRowHighlightRegions.d.ts +2 -4
  378. package/components/TableGlide/hooks/selection/useSelectionGeometry.d.ts +3 -1
  379. package/components/TableGlide/hooks/useErrorCellRanges.d.ts +1 -2
  380. package/components/TableGlide/index.cjs +1 -1
  381. package/components/TableGlide/index.mjs +46 -46
  382. package/components/TableGlide/lib/canvas/cells/buttons/index.cjs +1 -1
  383. package/components/TableGlide/lib/canvas/cells/buttons/index.mjs +14 -14
  384. package/components/TableGlide/lib/canvas/cells/iconSprites/index.cjs +1 -1
  385. package/components/TableGlide/lib/canvas/cells/iconSprites/index.mjs +1 -1
  386. package/components/TableGlide/lib/canvas/cells/index.cjs +1 -1
  387. package/components/TableGlide/lib/canvas/cells/index.mjs +18 -18
  388. package/components/TableGlide/lib/canvas/cells/renderer/index.cjs +1 -1
  389. package/components/TableGlide/lib/canvas/cells/renderer/index.mjs +4 -4
  390. package/components/TableGlide/lib/canvas/core/CanvasNode.d.ts +1 -0
  391. package/components/TableGlide/lib/canvas/core/CanvasNode.type.d.ts +1 -0
  392. package/components/TableGlide/lib/canvas/core/helpers/index.cjs +1 -1
  393. package/components/TableGlide/lib/canvas/core/helpers/index.mjs +1 -1
  394. package/components/TableGlide/lib/canvas/core/index.cjs +1 -1
  395. package/components/TableGlide/lib/canvas/core/index.mjs +1 -1
  396. package/components/TableGlide/lib/canvas/hooks/index.cjs +1 -1
  397. package/components/TableGlide/lib/canvas/hooks/index.mjs +1 -1
  398. package/components/TableGlide/lib/canvas/index.cjs +1 -1
  399. package/components/TableGlide/lib/canvas/index.mjs +46 -46
  400. package/components/TableGlide/lib/canvas/miniflex/index.cjs +1 -1
  401. package/components/TableGlide/lib/canvas/miniflex/index.mjs +1 -1
  402. package/components/TableGlide/lib/canvas/miniflex/types.d.ts +1 -0
  403. package/components/TableGlide/lib/canvas/primitives/CanvasLink.d.ts +2 -2
  404. package/components/TableGlide/lib/canvas/primitives/CanvasText.d.ts +5 -1
  405. package/components/TableGlide/lib/canvas/primitives/index.cjs +1 -1
  406. package/components/TableGlide/lib/canvas/primitives/index.mjs +5 -5
  407. package/components/TableGlide/lib/canvas/utils/index.cjs +1 -1
  408. package/components/TableGlide/lib/canvas/utils/index.mjs +4 -4
  409. package/components/TableGlide/lib/canvas/utils/textOverflow.d.ts +1 -0
  410. package/components/TableGlide/theming/activeTheme.type.d.ts +3 -1
  411. package/components/TableGlide/theming/cell-fill-override.d.ts +31 -0
  412. package/components/TableGlide/theming/custom-colors.d.ts +52 -11
  413. package/components/TableGlide/theming/fill-states.d.ts +19 -0
  414. package/components/TableGlide/theming/glide-colors.d.ts +14 -14
  415. package/components/TableGlide/theming/index.cjs +1 -1
  416. package/components/TableGlide/theming/index.d.ts +2 -2
  417. package/components/TableGlide/theming/index.mjs +1 -1
  418. package/components/TableGlide/theming/size-tokens.d.ts +1 -1
  419. package/components/TableGlide/theming/table-colors.generated.d.ts +569 -0
  420. package/components/TableGlide/tokens.d.ts +1 -104
  421. package/components/TableGlide/types.d.ts +10 -5
  422. package/components/TableTabs/index.cjs +1 -1
  423. package/components/TableTabs/index.mjs +1 -1
  424. package/components/Tooltip/index.cjs +1 -1
  425. package/components/Tooltip/index.mjs +1 -1
  426. package/components/TourWidget/index.cjs +3 -3
  427. package/components/TourWidget/index.mjs +14 -14
  428. package/components/Typography/index.cjs +1 -1
  429. package/components/Typography/index.mjs +1 -1
  430. package/components/Widget/index.cjs +1 -1
  431. package/components/Widget/index.mjs +2 -2
  432. package/formComponents/FormCombobox/index.cjs +1 -1
  433. package/formComponents/FormCombobox/index.mjs +1 -1
  434. package/formComponents/FormRadioGroupBox/index.cjs +1 -1
  435. package/formComponents/FormRadioGroupBox/index.mjs +1 -1
  436. package/formComponents/FormSegments/index.cjs +1 -1
  437. package/formComponents/FormSegments/index.mjs +1 -1
  438. package/formComponents/FormSwitch/index.cjs +1 -1
  439. package/formComponents/FormSwitch/index.mjs +1 -1
  440. package/index.cjs +1 -1
  441. package/index.d.ts +3 -1
  442. package/index.mjs +1864 -1859
  443. package/layouts/Container/index.cjs +1 -1
  444. package/layouts/Container/index.mjs +1 -1
  445. package/layouts/Container/lib/utils/index.cjs +1 -1
  446. package/layouts/Container/lib/utils/index.mjs +1 -1
  447. package/layouts/ErrorPage/index.cjs +1 -1
  448. package/layouts/ErrorPage/index.mjs +1 -1
  449. package/layouts/FiltersActions/hooks/index.cjs +1 -1
  450. package/layouts/FiltersActions/hooks/index.mjs +1 -1
  451. package/layouts/FiltersActions/index.cjs +1 -1
  452. package/layouts/FiltersActions/index.mjs +1 -1
  453. package/layouts/Layout/index.cjs +1 -1
  454. package/layouts/Layout/index.mjs +1 -1
  455. package/layouts/PageLayout/index.cjs +1 -1
  456. package/layouts/PageLayout/index.mjs +1 -1
  457. package/mcp-data/component-index.json +6385 -10584
  458. package/mixins/index.cjs +4 -4
  459. package/mixins/index.mjs +61 -54
  460. package/package.json +6 -6
  461. package/shared/utils/resizable/index.cjs +1 -0
  462. package/shared/utils/resizable/index.d.ts +2 -0
  463. package/shared/utils/resizable/index.mjs +39 -0
  464. package/shared/utils/resizable/resizableConfig.d.ts +16 -0
  465. package/styles/index.cjs +1 -1
  466. package/styles/index.mjs +1 -1
  467. package/types/index.d.ts +1 -0
  468. package/types/utility.d.ts +1 -0
  469. package/utils/breakpoint/index.cjs +1 -1
  470. package/utils/breakpoint/index.mjs +2 -2
  471. package/utils/clickStream/index.cjs +1 -1
  472. package/utils/clickStream/index.mjs +1 -1
  473. package/utils/eventBus/index.cjs +1 -1
  474. package/utils/eventBus/index.mjs +1 -1
  475. package/utils/getActiveTheme.d.ts +1 -1
  476. package/utils/hooks/index.cjs +1 -1
  477. package/utils/hooks/index.mjs +1 -1
  478. package/utils/index.cjs +1 -1
  479. package/utils/index.mjs +8 -8
  480. package/utils/react/index.cjs +1 -1
  481. package/utils/react/index.mjs +1 -1
  482. package/utils/styles/index.cjs +1 -1
  483. package/utils/styles/index.mjs +1 -1
  484. package/chunks/AnalyticalWidget-BtyWKJuu.mjs +0 -537
  485. package/chunks/AnalyticalWidget-YytE3Rlw.cjs +0 -43
  486. package/chunks/ApprovalCenter-DdsLEipZ.cjs +0 -1
  487. package/chunks/BlockTitle-DC1McGof.cjs +0 -1
  488. package/chunks/FiltersActions-Bg5wvHFG.cjs +0 -1
  489. package/chunks/MassActions-BTrj9l-R.cjs +0 -1
  490. package/chunks/PageTitle-CrBeieoq.cjs +0 -9
  491. package/chunks/Stories-UYVANawW.cjs +0 -1
  492. package/chunks/Table-vv1HTrxe.cjs +0 -31
  493. package/chunks/TableCanvas-qnwh4c5g.cjs +0 -30
  494. package/chunks/TableGlide-BLbbkn4C.mjs +0 -8154
  495. package/chunks/TableGlide-CZ2mkokV.cjs +0 -1
  496. package/components/TableCanvas/feature-right-sidebar/constants.d.ts +0 -1
  497. package/components/TableCanvas/feature-right-sidebar/ui/TableSidebar.d.ts +0 -16
  498. /package/components/TableCanvas/{feature-right-sidebar → feature-sidebar}/ui/TableSidebar.classnames.d.ts +0 -0
@@ -1,21 +1,21 @@
1
1
  import { jsx as B, jsxs as yt } from "react/jsx-runtime";
2
2
  import { Divider as Ft, EmbedIconButton as Kt, LinkButton as Zt, Button as Pt, Dropdown as Gt, Checkbox as Qt, IconButton as bt, Tooltip as te } from "@salutejs/sdds-finai";
3
3
  import { IconDoubleDisclosureUp as ee, IconDotsVerticalCenteredOutline as ne } from "@salutejs/plasma-icons";
4
- import { c as Ut, d as qt, i as se, p as ie } from "./utils-u1KJ37g3.mjs";
4
+ import { c as Ut, e as qt, j as se, p as ie } from "./utils-Hu77fGGe.mjs";
5
5
  import { useMemo as Xt, useCallback as pt, useRef as $, useState as ht, useEffect as st, useLayoutEffect as oe } from "react";
6
- import { T as jt, A as ce } from "./Table-tUWuA3Ri.mjs";
6
+ import { T as jt, A as ce } from "./Table-C-03ZtkJ.mjs";
7
7
  import { s as Jt } from "../constants/index.mjs";
8
8
  import { surfaceSolidCard as re, outlineSolidPrimary as le, shadowDownHardS as ae, spacing10x as de } from "@salutejs/sdds-themes/tokens/sdds_finai";
9
9
  import U, { css as Ct } from "styled-components";
10
10
  import { Box as kt } from "../components/Box/index.mjs";
11
11
  import { Collapse as ue } from "../components/Collapse/index.mjs";
12
- import { T as zt } from "./AnalyticalWidget-BtyWKJuu.mjs";
13
- const mt = 24, k = 4, vt = 44, Yt = 40, It = 24, it = {
12
+ import { a as zt } from "./AiAgentPopup-CtMhai1X.mjs";
13
+ const mt = 24, k = 4, vt = 44, Yt = 40, Tt = 24, it = {
14
14
  top: 12,
15
15
  right: 8,
16
16
  bottom: 12,
17
17
  left: 24
18
- }, Tt = {
18
+ }, It = {
19
19
  top: 0,
20
20
  right: 10,
21
21
  bottom: 0,
@@ -75,14 +75,14 @@ const mt = 24, k = 4, vt = 44, Yt = 40, It = 24, it = {
75
75
  isHaveSomeFeatureInSidebar: r,
76
76
  getContainerWidth: f,
77
77
  setVisibleButtonsCount: p,
78
- minPadding: u = It,
78
+ minPadding: u = Tt,
79
79
  leftPadding: v = it.left,
80
80
  rightPadding: m = it.right,
81
81
  moreButtonWidthEstimate: A = Yt,
82
82
  enableDebugLogs: w = !1
83
83
  }) => {
84
84
  const _ = $([]), L = pt(() => {
85
- var dt, Y, ft, rt, ut, I;
85
+ var dt, Y, ft, rt, ut, T;
86
86
  const E = f();
87
87
  if (!E || E === 0 || !s || s.length === 0)
88
88
  return w && console.debug("❌ calculateInitialCompression: нет tableWidth или buttons"), !1;
@@ -130,7 +130,7 @@ const mt = 24, k = 4, vt = 44, Yt = 40, It = 24, it = {
130
130
  buttonWidthsLength: C.length,
131
131
  buttonsLength: s.length
132
132
  }), !1;
133
- const b = ((I = c.current) == null ? void 0 : I.getBoundingClientRect().width) ?? A, T = O - u * 2, N = [], D = [];
133
+ const b = ((T = c.current) == null ? void 0 : T.getBoundingClientRect().width) ?? A, I = O - u * 2, N = [], D = [];
134
134
  s.forEach((g, y) => {
135
135
  if (C[y] === void 0)
136
136
  return;
@@ -148,7 +148,7 @@ const mt = 24, k = 4, vt = 44, Yt = 40, It = 24, it = {
148
148
  if (M === void 0)
149
149
  continue;
150
150
  const gt = g < D.length - 1 ? b + k : 0, xt = (j.size + 1 - 1) * k, Bt = tt + M + xt + gt;
151
- if (ct + Bt <= T)
151
+ if (ct + Bt <= I)
152
152
  tt += M, et += 1, typeof y < "u" && j.add(y);
153
153
  else
154
154
  break;
@@ -233,18 +233,18 @@ const mt = 24, k = 4, vt = 44, Yt = 40, It = 24, it = {
233
233
  }
234
234
  if (!z && C.length === 0 && ((s == null ? void 0 : s.length) ?? 0) > 0)
235
235
  return;
236
- const b = ((Ot = c.current) == null ? void 0 : Ot.getBoundingClientRect().width) ?? A, T = W - u * 2, N = i.current ? i.current.getBoundingClientRect().width : 0;
236
+ const b = ((Ot = c.current) == null ? void 0 : Ot.getBoundingClientRect().width) ?? A, I = W - u * 2, N = i.current ? i.current.getBoundingClientRect().width : 0;
237
237
  w && (console.debug("🎯 Ограничения и текущее состояние:", JSON.stringify({
238
238
  targetContainer: {
239
239
  tableWidth: E,
240
240
  availableWidth: W,
241
241
  minPaddingEach: u,
242
242
  minPaddingTotal: u * 2,
243
- maxPanelWidth: T
243
+ maxPanelWidth: I
244
244
  },
245
245
  currentPanel: {
246
246
  width: N,
247
- exceedsMax: N > T,
247
+ exceedsMax: N > I,
248
248
  exceedsAvailable: N > W,
249
249
  leftPadding: u,
250
250
  rightPadding: u
@@ -300,15 +300,15 @@ const mt = 24, k = 4, vt = 44, Yt = 40, It = 24, it = {
300
300
  requiredWidth: Dt,
301
301
  testPanelWidth: Wt,
302
302
  testWithBuffer: Et,
303
- maxPanelWidth: T,
304
- fits: Wt <= T,
305
- fitsWithBuffer: Et <= T
306
- }), Et <= T)
303
+ maxPanelWidth: I,
304
+ fits: Wt <= I,
305
+ fitsWithBuffer: Et <= I
306
+ }), Et <= I)
307
307
  J += K, dt += 1, typeof x < "u" && et.add(x);
308
308
  else
309
309
  break;
310
310
  }
311
- const Y = et.size, rt = D.length - Y > 0, ut = Y > 0 ? (Y - 1) * k : 0, I = J + ut + (rt ? b + k : 0), g = ct + I, y = [], M = [];
311
+ const Y = et.size, rt = D.length - Y > 0, ut = Y > 0 ? (Y - 1) * k : 0, T = J + ut + (rt ? b + k : 0), g = ct + T, y = [], M = [];
312
312
  D.forEach((d, x) => {
313
313
  et.has(x) ? y.push(d) : M.push(d);
314
314
  });
@@ -328,7 +328,7 @@ const mt = 24, k = 4, vt = 44, Yt = 40, It = 24, it = {
328
328
  totalButtonsWidth: J,
329
329
  // Сумма только ширин кнопок без gaps
330
330
  gapsBetweenVisibleButtons: ut,
331
- buttonsAreaWidth: I,
331
+ buttonsAreaWidth: T,
332
332
  // С учетом gaps
333
333
  visibleButtonsCount: Y,
334
334
  hiddenButtonsCount: M.length
@@ -342,12 +342,12 @@ const mt = 24, k = 4, vt = 44, Yt = 40, It = 24, it = {
342
342
  calculatedWidth: g,
343
343
  actualPanelWidth: N,
344
344
  widthDifference: N - g,
345
- maxAllowedWidth: T,
345
+ maxAllowedWidth: I,
346
346
  availableWidth: W,
347
- fits: g <= T,
348
- actualFits: N <= T,
349
- exceedsBy: g > T ? g - T : 0,
350
- actualExceedsBy: N > T ? N - T : 0,
347
+ fits: g <= I,
348
+ actualFits: N <= I,
349
+ exceedsBy: g > I ? g - I : 0,
350
+ actualExceedsBy: N > I ? N - I : 0,
351
351
  leftPaddingRequired: u,
352
352
  rightPaddingRequired: u,
353
353
  totalPaddingRequired: u * 2
@@ -361,8 +361,8 @@ const mt = 24, k = 4, vt = 44, Yt = 40, It = 24, it = {
361
361
  visibleCount: F,
362
362
  hiddenCount: M.length,
363
363
  finalPanelWidth: g,
364
- maxPanelWidth: T,
365
- fits: g <= T,
364
+ maxPanelWidth: I,
365
+ fits: g <= I,
366
366
  hasMoreButton: rt
367
367
  },
368
368
  breakdown: gt
@@ -465,7 +465,7 @@ const mt = 24, k = 4, vt = 44, Yt = 40, It = 24, it = {
465
465
  sidebarConfig: c,
466
466
  visibleButtonsCount: h,
467
467
  setTranslateX: l,
468
- minPadding: a = It,
468
+ minPadding: a = Tt,
469
469
  enableDebugLogs: s = !1
470
470
  }) => {
471
471
  const r = (c == null ? void 0 : c.isOpen) ?? !1, f = (c == null ? void 0 : c.width) ?? 0, p = (c == null ? void 0 : c.togglePanelWidth) ?? vt, u = $(!1), v = pt((A) => {
@@ -476,7 +476,7 @@ const mt = 24, k = 4, vt = 44, Yt = 40, It = 24, it = {
476
476
  const _ = f + p, L = r ? _ / 2 : 0, R = e ? p / 2 : 0;
477
477
  let E = -(L + R), W;
478
478
  if (A) {
479
- const P = ((S = o == null ? void 0 : o.current) == null ? void 0 : S.getBoundingClientRect().width) ?? $t, X = ((V = i.current) == null ? void 0 : V.getBoundingClientRect().width) ?? mt, Q = Tt.top + Tt.right + Tt.left;
479
+ const P = ((S = o == null ? void 0 : o.current) == null ? void 0 : S.getBoundingClientRect().width) ?? $t, X = ((V = i.current) == null ? void 0 : V.getBoundingClientRect().width) ?? mt, Q = It.top + It.right + It.left;
480
480
  W = P + X + Q;
481
481
  } else if (t.current)
482
482
  W = t.current.getBoundingClientRect().width;
@@ -511,7 +511,7 @@ const mt = 24, k = 4, vt = 44, Yt = 40, It = 24, it = {
511
511
  leftEdgePosition: O,
512
512
  minPadding: a,
513
513
  finalTranslateX: R,
514
- adjusted: O < It
514
+ adjusted: O < Tt
515
515
  }, null, 2)), console.groupEnd()), l(R), r ? u.current = !0 : u.current = !1;
516
516
  }, [n, t, s, f, p, e, r, l, a]),
517
517
  calculatePositionForState: v,
@@ -586,7 +586,7 @@ const mt = 24, k = 4, vt = 44, Yt = 40, It = 24, it = {
586
586
  $hasDropdown: i
587
587
  }) => i && Ct(["& > div > span:last-child{max-width:fit-content;min-width:unset;}"]), ({
588
588
  $buttonStyles: i
589
- }) => i && Ct(["", ""], i)), Te = Ht(Pt), Ie = Ht(Ee), _e = U.div.withConfig({
589
+ }) => i && Ct(["", ""], i)), Ie = Ht(Pt), Te = Ht(Ee), _e = U.div.withConfig({
590
590
  displayName: "styled__MassActionsContainer"
591
591
  })(["position:absolute;bottom:", "px;left:50%;transform:", ";background:", ";border:2px solid ", ";padding:", ";border-radius:14px;display:block;width:fit-content;max-width:", ";view-transition-name:", ";opacity:", ";transition:padding 0.3s cubic-bezier(0.4,0,0.2,1),transform 0.3s cubic-bezier(0.4,0,0.2,1),max-width 0.2s cubic-bezier(0.4,0,0.2,1),opacity 0.2s ease-in-out;will-change:padding,transform,max-width;box-shadow:", ";"], ({
592
592
  $bottom: t = 24
@@ -659,10 +659,10 @@ const $e = U(Ft).withConfig({
659
659
  let v;
660
660
  if (a === "button") {
661
661
  const m = l, A = m.text ?? p;
662
- v = /* @__PURE__ */ B(Te, { ...r, ...m, view: f, text: A, $hasDropdown: u, $showLabel: o, $buttonStyles: e });
662
+ v = /* @__PURE__ */ B(Ie, { ...r, ...m, view: f, text: A, $hasDropdown: u, $showLabel: o, $buttonStyles: e });
663
663
  } else {
664
664
  const m = String(f ?? "linkDefault"), w = m.startsWith("link") ? Le(m) : m;
665
- v = /* @__PURE__ */ B(Ie, { ...r, ...l, view: w, text: p, $hasDropdown: u, $showLabel: o, $buttonStyles: e });
665
+ v = /* @__PURE__ */ B(Te, { ...r, ...l, view: w, text: p, $hasDropdown: u, $showLabel: o, $buttonStyles: e });
666
666
  }
667
667
  if (c && c.items && c.items.length > 0)
668
668
  if (h)
@@ -823,7 +823,7 @@ const $e = U(Ft).withConfig({
823
823
  } = qt(), m = u ? u === "xs" : v("xl"), A = u ? "xxs" : "xs", [w, _] = ht(!1), L = $(null), R = $(null), E = $(null), W = $([]), O = $(null), q = $(null), S = $(null), V = $(null), [P, X] = ht((n == null ? void 0 : n.length) ?? 0), [Q, ot] = ht(void 0), [at, ct] = ht(!1), {
824
824
  containerWidth: C,
825
825
  getContainerWidth: z
826
- } = Be(t), b = Ae(l), T = a !== void 0 ? a : b, {
826
+ } = Be(t), b = Ae(l), I = a !== void 0 ? a : b, {
827
827
  calculatePosition: N,
828
828
  calculatePositionForState: D,
829
829
  shouldApplySidebarOffsetRef: G
@@ -891,13 +891,13 @@ const $e = U(Ft).withConfig({
891
891
  visibleButtonsCount: P
892
892
  });
893
893
  if (st(() => {
894
- const I = setTimeout(() => ct(!0), pe);
895
- return () => clearTimeout(I);
894
+ const T = setTimeout(() => ct(!0), pe);
895
+ return () => clearTimeout(T);
896
896
  }, []), ve({
897
897
  containerRef: L,
898
898
  buttonRefs: W,
899
899
  buttons: n,
900
- isVisible: T,
900
+ isVisible: I,
901
901
  isCollapsed: w,
902
902
  visibleButtonsCount: P,
903
903
  selectedCount: l,
@@ -907,29 +907,29 @@ const $e = U(Ft).withConfig({
907
907
  calculateCompression: j,
908
908
  measuredButtonWidthsRef: tt,
909
909
  containerWidth: C
910
- }), !T)
910
+ }), !I)
911
911
  return null;
912
912
  const ut = !w && ((n == null ? void 0 : n.length) ?? 0) > 0;
913
913
  return /* @__PURE__ */ B(_e, { ref: L, $isCollapsed: w, $size: u, $translateX: Q, $isInitialCalculationComplete: at, $bottom: f, children: /* @__PURE__ */ yt(Ne, { ref: R, $isCollapsed: w, $isCompact: m, children: [
914
- /* @__PURE__ */ B(Me, { children: rt.map((I, g) => {
915
- const y = I.key ?? `${I.text}${g}`;
914
+ /* @__PURE__ */ B(Me, { children: rt.map((T, g) => {
915
+ const y = T.key ?? `${T.text}${g}`;
916
916
  return /* @__PURE__ */ B(Se, { ref: (M) => {
917
917
  W.current[g] = M;
918
- }, children: Vt(I, m, s, A) }, `measure-${y}`);
918
+ }, children: Vt(T, m, s, A) }, `measure-${y}`);
919
919
  }) }),
920
920
  /* @__PURE__ */ B("div", { ref: S, children: i }),
921
921
  /* @__PURE__ */ yt(Oe, { $isCollapsed: w, children: [
922
922
  o && /* @__PURE__ */ B("div", { ref: E, children: o }),
923
923
  ut && /* @__PURE__ */ B("div", { ref: V, children: /* @__PURE__ */ B($e, { orientation: "vertical", length: "16px" }) }),
924
- ft.length > 0 && /* @__PURE__ */ B("div", { ref: (I) => {
925
- O.current = I;
924
+ ft.length > 0 && /* @__PURE__ */ B("div", { ref: (T) => {
925
+ O.current = T;
926
926
  }, children: /* @__PURE__ */ B(Ue, { buttons: ft, useTableDropdown: s, dropdownProps: {
927
927
  placement: "top",
928
928
  ...h
929
929
  }, triggerSlot: /* @__PURE__ */ B(bt, { view: "secondary", size: m ? A : "s", contentLeft: /* @__PURE__ */ B(ne, { size: m ? "xs" : "s" }) }) }) }),
930
- Y.map((I, g) => {
931
- const y = I.key ?? `${I.text}${g}`, M = /* @__PURE__ */ B(De, { children: Vt(I, m, s, A) }, y);
932
- return I.disabled && I.disabledTooltipProps ? /* @__PURE__ */ B(te, { trigger: "hover", ...I.disabledTooltipProps, children: M }, y) : M;
930
+ Y.map((T, g) => {
931
+ const y = T.key ?? `${T.text}${g}`, M = /* @__PURE__ */ B(De, { children: Vt(T, m, s, A) }, y);
932
+ return T.disabled && T.disabledTooltipProps ? /* @__PURE__ */ B(te, { trigger: "hover", ...T.disabledTooltipProps, children: M }, y) : M;
933
933
  })
934
934
  ] }),
935
935
  /* @__PURE__ */ B("div", { ref: q, children: /* @__PURE__ */ B(ze, { size: m ? "s" : "m", $isCollapsed: w, $isCompact: m, onClick: dt, children: /* @__PURE__ */ B(ke, { size: m ? "xs" : "s", $isCollapsed: w }) }) })
@@ -943,7 +943,7 @@ export {
943
943
  k as E,
944
944
  ge as I,
945
945
  je as M,
946
- Tt as P,
946
+ It as P,
947
947
  he as R,
948
948
  vt as T,
949
949
  _t as a,
@@ -951,7 +951,7 @@ export {
951
951
  fe as c,
952
952
  on as d,
953
953
  $t as e,
954
- It as f,
954
+ Tt as f,
955
955
  Yt as g,
956
956
  Rt as h,
957
957
  Pe as i,
@@ -0,0 +1 @@
1
+ "use strict";const g=require("react/jsx-runtime"),b=require("@salutejs/sdds-finai"),Rt=require("@salutejs/plasma-icons"),xt=require("./utils-OQNruMpn.cjs"),p=require("react"),Wt=require("./Table-C1u87WP_.cjs"),Vt=require("../constants/index.cjs"),Et=require("@salutejs/sdds-themes/tokens/sdds_finai"),M=require("styled-components"),jt=require("../components/Box/index.cjs"),se=require("../components/Collapse/index.cjs"),Pt=require("./AiAgentPopup-CLGSjg5L.cjs"),ht=24,L=4,wt=44,Nt=40,Ct=24,Q={top:12,right:8,bottom:12,left:24},Bt={top:0,right:10,bottom:0,left:24},ie=Q.left+Q.right,vt=90,qt=110,gt=100,oe=300,Tt=550,Ut=350,Gt=50,Ht=100,Xt=({buttons:t,visibleButtonsCount:i})=>{const{visibleButtons:o,buttonsInDropdown:n}=p.useMemo(()=>{const e=t??[],c=new Set,h=[];e.forEach((f,u)=>{f.view==="accent"?c.add(u):h.push(u)});const l=c.size,a=Math.max(0,i-l),s=new Set(h.slice(0,a)),r=[],x=[];return e.forEach((f,u)=>{c.has(u)||s.has(u)?r.push(f):x.push(f)}),{visibleButtons:r,buttonsInDropdown:x}},[t,i]);return{visibleButtons:o,buttonsInDropdown:n,allButtons:t??[]}},Yt=({isCollapsed:t,setIsCollapsed:i,isSidebarOpen:o,calculatePositionForState:n,calculatePosition:e,setTranslateX:c,shouldApplySidebarOffsetRef:h,wasAutoCollapsedRef:l})=>({handleToggleCollapse:p.useCallback(()=>{const s=!t,r=n(s);r!==void 0&&c(r),o&&(s?h.current=!0:(h.current=!1,l.current=!1)),i(s),setTimeout(()=>{e()},Tt)},[t,o,n,e,c,h,l,i])}),Jt=({isCollapsed:t,containerRef:i,contentRef:o,middleSectionRef:n,buttonRefs:e,moreButtonRef:c,collapseButtonRef:h,leftSectionRef:l,dividerRef:a,buttons:s,isHaveSomeFeatureInSidebar:r,getContainerWidth:x,setVisibleButtonsCount:f,minPadding:u=Ct,leftPadding:E=Q.left,rightPadding:m=Q.right,moreButtonWidthEstimate:I=Nt,enableDebugLogs:A=!1})=>{const N=p.useRef([]),z=p.useCallback(()=>{var dt,X,pt,rt,ut,W;const y=x();if(!y||y===0||!s||s.length===0)return A&&console.debug("❌ calculateInitialCompression: нет tableWidth или buttons"),!1;if(!s.every((w,C)=>e.current[C]!==null&&e.current[C]!==void 0))return A&&console.debug("❌ calculateInitialCompression: ref'ы еще не установлены",{buttonsCount:s.length,refsCount:e.current.filter(Boolean).length,refs:e.current.map((w,C)=>({index:C,hasRef:!!w}))}),!1;const S=y-(r?wt:0),q=((dt=l==null?void 0:l.current)==null?void 0:dt.getBoundingClientRect().width)??0,k=((X=n.current)==null?void 0:X.getBoundingClientRect().width)??0,$=s.length>0,R=$?((pt=a==null?void 0:a.current)==null?void 0:pt.getBoundingClientRect().width)??0:0,U=$?L:0,tt=$&&k>0?L:0,ot=R+tt+U,at=L*2,ct=q+k+ot+(((rt=h.current)==null?void 0:rt.getBoundingClientRect().width)??ht)+(E+m)+at,T=[];let P=!0;for(let w=0;w<s.length;w+=1){const C=e.current[w];if(!C){P=!1;break}const F=C.querySelector("button, a")||C;if(!F||!F.isConnected){P=!1;break}const ft=F.getBoundingClientRect(),lt=ft.width||F.offsetWidth||F.scrollWidth||F.clientWidth;if(lt>0)T.push(lt),N.current[w]=lt;else{console.debug("❌ calculateInitialCompression: кнопка не отрендерилась",{index:w,text:(ut=s[w])==null?void 0:ut.text,width:lt,isConnected:F.isConnected,rect:ft}),P=!1;break}}if(!P||T.length!==s.length)return A&&console.debug("❌ calculateInitialCompression: не все кнопки измерены",{allButtonsMeasured:P,buttonWidthsLength:T.length,buttonsLength:s.length}),!1;const et=((W=c.current)==null?void 0:W.getBoundingClientRect().width)??I,v=S-u*2,O=[],j=[];s.forEach((w,C)=>{if(T[C]===void 0)return;(w==null?void 0:w.view)==="accent"?O.push(C):j.push(C)});let V=0;O.forEach(w=>{const C=T[w];C!==void 0&&(V+=C)});const G=new Set(O);let nt=V,st=0;for(let w=0;w<j.length;w+=1){const C=j[w],D=typeof C<"u"?T[C]:0;if(D===void 0)continue;const ft=w<j.length-1?et+L:0,mt=(G.size+1-1)*L,At=nt+D+mt+ft;if(ct+At<=v)nt+=D,st+=1,typeof C<"u"&&G.add(C);else break}const H=G.size;return f(H),console.debug("✅ calculateInitialCompression: успешно выполнено",{buttonWidths:T,visibleCount:H,accentCount:O.length,regularVisibleCount:st}),!0},[s,x,r,f,e,l,n,c,h,a,A,u,E,m,I]);return{calculateCompression:p.useCallback(()=>{t||!i.current||!o.current||requestAnimationFrame(()=>{setTimeout(()=>{var lt,mt,At,It,Mt,St,Dt;const y=x();if(!y||y===0)return;const _=y-(r?wt:0);A&&(console.group("🔧 MassActions Compression"),console.debug("📏 Размеры контейнера:",JSON.stringify({tableWidth:y,isHaveSomeFeatureInSidebar:r,togglePanelWidth:r?wt:0,availableWidth:_,minPaddingRequired:u*2,maxPanelWidthAllowed:_-u*2},null,2)));const S=((lt=l==null?void 0:l.current)==null?void 0:lt.getBoundingClientRect().width)??0,q=((mt=n.current)==null?void 0:mt.getBoundingClientRect().width)??0,k=((s==null?void 0:s.length)??0)>0,$=k?((At=a==null?void 0:a.current)==null?void 0:At.getBoundingClientRect().width)??0:0,R=k?L:0,U=k&&q>0?L:0,tt=$+U+R;let ot=null;if(l!=null&&l.current){const d=l.current.getBoundingClientRect(),{children:B}=l.current,K=[];for(let Y=0;Y<B.length;Y+=1){const Z=B[Y];if(Z){const it=Z.getBoundingClientRect();K.push({tagName:Z.tagName,className:Z.className,width:it.width,height:it.height})}}ot={width:d.width,height:d.height,children:K,childrenTotalWidth:K.reduce((Y,Z)=>Y+Z.width,0)}}const at=L*2,ct=S+q+tt+(((It=h.current)==null?void 0:It.getBoundingClientRect().width)??ht)+(E+m)+at;A&&console.debug("🔲 Фиксированные элементы:",JSON.stringify({leftSectionWidth:S,leftSectionDetails:ot,middleSectionWidth:q,divider:{shouldShow:k,wrapperWidth:$,gapLeft:U,gapRight:R,totalWidth:tt},collapseButtonWidth:((Mt=h.current)==null?void 0:Mt.getBoundingClientRect().width)??ht,containerPadding:E+m,gapsBetweenFixedElements:at,fixedElementsTotal:ct},null,2));const T=[];let P=!0;for(let d=0;d<((s==null?void 0:s.length)??0);d+=1){const B=e.current[d];if(B){const Y=B.querySelector("button, a")||B,it=Y.getBoundingClientRect().width||Y.offsetWidth||Y.scrollWidth||Y.clientWidth;it>0?(T.push(it),N.current[d]=it):N.current[d]!==void 0?T.push(N.current[d]??gt):(P=!1,T.push(gt))}else N.current[d]!==void 0?T.push(N.current[d]??gt):(P=!1,T.push(gt))}if(!P&&T.length===0&&((s==null?void 0:s.length)??0)>0)return;const et=((St=c.current)==null?void 0:St.getBoundingClientRect().width)??I,v=_-u*2,O=i.current?i.current.getBoundingClientRect().width:0;A&&(console.debug("🎯 Ограничения и текущее состояние:",JSON.stringify({targetContainer:{tableWidth:y,availableWidth:_,minPaddingEach:u,minPaddingTotal:u*2,maxPanelWidth:v},currentPanel:{width:O,exceedsMax:O>v,exceedsAvailable:O>_,leftPadding:u,rightPadding:u},moreButtonWidth:et},null,2)),console.debug("🔘 Ширины кнопок:",JSON.stringify({buttons:s==null?void 0:s.map((d,B)=>({index:B,text:d.text,view:d.view,isAccent:d.view==="accent",width:T[B]})),totalButtonsWidth:T.reduce((d,B)=>d+B,0),averageButtonWidth:T.length>0?T.reduce((d,B)=>d+B,0)/T.length:0},null,2)));const j=s??[],V=[],G=[];j.forEach((d,B)=>{if(T[B]===void 0)return;(d==null?void 0:d.view)==="accent"?V.push(B):G.push(B)}),A&&console.debug("🎨 Распределение:",{accentCount:V.length,regularCount:G.length,accentButtons:V.map(d=>{var B;return{index:d,text:(B=j[d])==null?void 0:B.text,width:T[d]}})});let nt=0;V.forEach(d=>{const B=T[d];B!==void 0&&(nt+=B)});const st=new Set(V);let H=nt,dt=0;for(let d=0;d<G.length;d+=1){const B=G[d],K=typeof B<"u"?T[B]:0;if(K===void 0)continue;const Z=d<G.length-1?et+L:0,it=st.size+1,Lt=(it-1)*L,kt=H+K+Lt+Z,_t=ct+kt,yt=_t+3;if(A&&console.debug(` 🔍 Проверка кнопки ${d}:`,{text:typeof B<"u"?(Dt=j[B])==null?void 0:Dt.text:"",width:K,totalButtonsWidthBefore:H,visibleCountAfter:it,gapsBetweenButtons:Lt,moreButtonSpace:Z,requiredWidth:kt,testPanelWidth:_t,testWithBuffer:yt,maxPanelWidth:v,fits:_t<=v,fitsWithBuffer:yt<=v}),yt<=v)H+=K,dt+=1,typeof B<"u"&&st.add(B);else break}const X=st.size,rt=j.length-X>0,ut=X>0?(X-1)*L:0,W=H+ut+(rt?et+L:0),w=ct+W,C=[],D=[];j.forEach((d,B)=>{st.has(B)?C.push(d):D.push(d)});const F=X,ft={fixedElements:{leftSection:S,middleSection:q,divider:tt,collapseButton:ht,containerPadding:E+m,gapsBetweenFixedElements:at,total:ct},buttons:{accentButtonsWidth:nt,visibleRegularButtonsWidth:H-nt,totalButtonsWidth:H,gapsBetweenVisibleButtons:ut,buttonsAreaWidth:W,visibleButtonsCount:X,hiddenButtonsCount:D.length},moreButton:rt?{width:et,gap:L,total:et+L}:null,final:{calculatedWidth:w,actualPanelWidth:O,widthDifference:O-w,maxAllowedWidth:v,availableWidth:_,fits:w<=v,actualFits:O<=v,exceedsBy:w>v?w-v:0,actualExceedsBy:O>v?O-v:0,leftPaddingRequired:u,rightPaddingRequired:u,totalPaddingRequired:u*2}};A&&(console.debug("✅ Результат компрессии:",JSON.stringify({summary:{totalButtons:j.length,accentCount:V.length,visibleRegularCount:dt,visibleCount:F,hiddenCount:D.length,finalPanelWidth:w,maxPanelWidth:v,fits:w<=v,hasMoreButton:rt},breakdown:ft},null,2)),console.debug("👁️ Видимые кнопки:",{buttons:C.map(d=>({text:d.text,view:d.view,isAccent:d.view==="accent"}))}),console.debug("📦 Кнопки в dropdown:",{buttons:D.map(d=>({text:d.text,view:d.view}))}),console.groupEnd()),f(X)},Gt)})},[t,i,o,x,r,A,l,n,s,a,c,h,u,E,m,I,f,e]),calculateInitialCompression:z,measuredButtonWidthsRef:N}},Ft=t=>{const[i,o]=p.useState(0),n=p.useCallback(()=>typeof t=="function"?t():t.current,[t]),e=p.useCallback(()=>{const c=n();return c?c.getBoundingClientRect().width:0},[n]);return p.useEffect(()=>{const c=n();if(!c)return;o(c.getBoundingClientRect().width);const h=xt.createSafeResizeObserver(l=>{for(const a of l){const{width:s}=a.contentRect;o(s)}});return h.observe(c),()=>{h.disconnect()}},[n]),{containerWidth:i,getContainerWidth:e,getContainer:n}},Kt=({containerRef:t,buttonRefs:i,buttons:o,isVisible:n,isCollapsed:e,visibleButtonsCount:c,selectedCount:h,setIsCollapsed:l,setVisibleButtonsCount:a,calculatePosition:s,calculateCompression:r,measuredButtonWidthsRef:x,containerWidth:f})=>{p.useEffect(()=>{f>0&&(s(),r())},[f,s,r]),p.useLayoutEffect(()=>{if(!t.current)return;const u=xt.createSafeResizeObserver(()=>{s()});return u.observe(t.current),()=>{u.disconnect()}},[s,t]),p.useEffect(()=>{i.current=Array((o==null?void 0:o.length)??0).fill(null),a((o==null?void 0:o.length)??0),x.current=[]},[o==null?void 0:o.length,i,a,x]),p.useEffect(()=>{if(n&&!e){const u=setTimeout(()=>{r(),s()},Ht);return()=>{clearTimeout(u)}}},[n,e,r,s]),p.useEffect(()=>{if(e){s();return}s()},[e,c,s]),p.useEffect(()=>()=>{(!n||h===0)&&l(!1)},[n,h,l])},Zt=({containerRef:t,collapseButtonRef:i,leftSectionRef:o,getContainerWidth:n,isHaveSomeFeatureInSidebar:e,sidebarConfig:c,visibleButtonsCount:h,setTranslateX:l,minPadding:a=Ct,enableDebugLogs:s=!1})=>{const r=(c==null?void 0:c.isOpen)??!1,x=(c==null?void 0:c.width)??0,f=(c==null?void 0:c.togglePanelWidth)??wt,u=p.useRef(!1),E=p.useCallback(I=>{var k,$;const A=n();if(!A||A===0)return;const N=x+f,z=r?N/2:0,J=e?f/2:0;let y=-(z+J),_;if(I){const R=((k=o==null?void 0:o.current)==null?void 0:k.getBoundingClientRect().width)??vt,U=(($=i.current)==null?void 0:$.getBoundingClientRect().width)??ht,tt=Bt.top+Bt.right+Bt.left;_=R+U+tt}else if(t.current)_=t.current.getBoundingClientRect().width;else{const R=h*gt,U=Q.top+Q.right+Q.left;_=vt+qt+ht+R+U}const S=A/2;return S-_/2+y<a&&(y=a-(S-_/2)),y},[n,t,i,o,e,r,x,f,h,a]);return{calculatePosition:p.useCallback(()=>{const I=n();if(!I||I===0||!t.current)return;s&&console.group("📍 MassActions Position");const A=x+f,N=r?A/2:0,z=e?f/2:0;let J=-(N+z);const y=t.current.getBoundingClientRect().width,_=I/2,S=_-y/2+J;S<a&&(J=a-(_-y/2)),s&&(console.log("🎯 Позиционирование:",JSON.stringify({tableWidth:I,panelWidth:y,tableCenter:_,sidebarWidth:x,toggleSidebarPanelWidth:f,isSidebarOpen:r,isHaveSomeFeatureInSidebar:e,totalSidebarWidth:A,sidebarOffset:N,togglePanelOffset:z,idealTranslateX:-(N+z),leftEdgePosition:S,minPadding:a,finalTranslateX:J,adjusted:S<Ct},null,2)),console.groupEnd()),l(J),r?u.current=!0:u.current=!1},[n,t,s,x,f,e,r,l,a]),calculatePositionForState:E,shouldApplySidebarOffsetRef:u}},Qt=({isCollapsed:t,setIsCollapsed:i,calculatePositionForState:o,calculatePosition:n,setTranslateX:e,shouldApplySidebarOffsetRef:c,sidebarConfig:h,getContainerWidth:l})=>{const a=(h==null?void 0:h.isOpen)??!1,s=(h==null?void 0:h.width)??0,r=p.useRef(!1),x=p.useRef(a);return p.useEffect(()=>{if(!h)return;const u=x.current!==a;if(x.current=a,!u){n();return}if(a)if(t)n();else{r.current=!0;const E=o(!0);E!==void 0&&(e(E),c.current=!0),i(!0),setTimeout(()=>{n()},Tt)}else if(t){r.current=!1,c.current=!1;const E=o(!1);E!==void 0&&e(E),i(!1),setTimeout(()=>{n()},Tt)}else c.current=!1,n()},[a,s,l]),{isSidebarOpen:a,sidebarWidth:s,wasAutoCollapsedRef:r}},bt=t=>{const i=p.useRef(t),[o,n]=p.useState(t>0);return p.useEffect(()=>{var l;const e=i.current,c=e===0&&t>0,h=e>0&&t===0;if(c||h){const a=()=>{n(t>0)};document.startViewTransition?(l=document.startViewTransition)==null||l.call(document,a):a()}else n(t>0);i.current=t},[t]),o},ce="mass-actions-panel",zt={surfaceSolidCard:()=>Et.surfaceSolidCard,outlineSolidPrimary:()=>Et.outlineSolidPrimary},re=M(b.LinkButton).withConfig({displayName:"styled__StyledLinkButton"})({paddingInline:Vt.s.x8}),te=t=>M(t).withConfig({displayName:"styled__getButtonWithDropdown"})([""," ",""],({$hasDropdown:i})=>i&&M.css(["& > div > span:last-child{max-width:fit-content;min-width:unset;}"]),({$buttonStyles:i})=>i&&M.css(["",""],i)),le=te(b.Button),ae=te(re),de=M.div.withConfig({displayName:"styled__MassActionsContainer"})(["position:absolute;bottom:","px;left:50%;transform:",";background:",";border:2px solid ",";padding:",";border-radius:14px;display:block;width:fit-content;max-width:",";view-transition-name:",";opacity:",";transition:padding 0.3s cubic-bezier(0.4,0,0.2,1),transform 0.3s cubic-bezier(0.4,0,0.2,1),max-width 0.2s cubic-bezier(0.4,0,0.2,1),opacity 0.2s ease-in-out;will-change:padding,transform,max-width;box-shadow:",";"],({$bottom:t=24})=>t,({$translateX:t})=>t!==void 0?`translateX(calc(-50% + ${t}px))`:"translateX(-50%)",zt.surfaceSolidCard,zt.outlineSolidPrimary,({$isCollapsed:t,$size:i})=>{const o=i==="xs";return t?o?"0px 2px 0px 12px":"0px 10px 0px 24px":o?"4px 2px 4px 12px":"12px 8px 12px 24px"},({$isCollapsed:t})=>t?"350":"2000px",ce,({$isInitialCalculationComplete:t})=>t?1:0,Et.shadowDownHardS),ue=M.div.withConfig({displayName:"styled__MassActionsContent"})(["display:flex;align-items:center;gap:",";"],({$isCollapsed:t,$isCompact:i})=>t?i?"4px":"8px":"0px"),he=M.div.withConfig({displayName:"styled__ActionsWrapper"})(["display:flex;max-height:",";align-items:center;gap:4px;flex:1;justify-content:flex-end;overflow:hidden;min-width:0;transition:max-height 0.2s cubic-bezier(0.4,0,0.2,1),opacity 0.3s cubic-bezier(0.4,0,0.2,1),max-width 0.1s cubic-bezier(0.4,0,0.2,1),margin 0.3s cubic-bezier(0.4,0,0.2,1),gap 0.3s cubic-bezier(0.4,0,0.2,1);",""],({$isCollapsed:t})=>t?"0":"40px",({$isCollapsed:t})=>t?M.css(["opacity:0;max-width:0;margin:0;gap:0;"]):M.css(["opacity:1;max-width:2000px;"])),pe=M.div.withConfig({displayName:"styled__HiddenButtonsMeasurementContainer"})(["position:absolute;left:-9999px;top:0;display:flex;gap:4px;align-items:center;z-index:-1;pointer-events:none;width:auto;height:auto;"]),fe=M.div.withConfig({displayName:"styled__ButtonMeasurementWrapper"})(["display:inline-flex;width:auto;height:auto;"]),ge=M.div.withConfig({displayName:"styled__VisibleButtonWrapper"})(["margin-left:0;"]),xe=M(Rt.IconDoubleDisclosureUp).withConfig({displayName:"styled__CollapseIcon"})(["transition:all 0.3s;transform:",";"],({$isCollapsed:t})=>t?"scaleY(1)":"scaleY(-1)"),we=M(b.EmbedIconButton).withConfig({displayName:"styled__CollapseButton"})(["padding:",";"],({$isCompact:t})=>t?Vt.s.x8:Et.spacing10x);M(b.Button).withConfig({displayName:"styled__MoreButton"})(["margin-left:0;"]);const me=M(b.Divider).withConfig({displayName:"styled__StyledDivider"})(["padding-left:1px;margin-left:12px;margin-right:8px;"]),Ae=t=>{if(typeof t=="string"&&t.startsWith("link")){const i=t.slice(4);return i.charAt(0).toLowerCase()+i.slice(1)}return t??"default"},Be={size:"s",view:"linkDefault"},Ot=({type:t,view:i,showLabel:o,text:n,buttonStyles:e,dropdown:c,useTableDropdown:h=!1,...l})=>{const a=t??"linkButton",{view:s,...r}=Be,x=i??s,f=o?n:void 0,u=!!c;let E;if(a==="button"){const m=l,I=m.text??f;E=g.jsx(le,{...r,...m,view:x,text:I,$hasDropdown:u,$showLabel:o,$buttonStyles:e})}else{const m=String(x??"linkDefault"),A=m.startsWith("link")?Ae(m):m;E=g.jsx(ae,{...r,...l,view:A,text:f,$hasDropdown:u,$showLabel:o,$buttonStyles:e})}if(c&&c.items&&c.items.length>0)if(h)E=g.jsx(Wt.TableDropdown,{...c,children:E});else{const{$css:m,...I}=c;E=g.jsx(b.Dropdown,{...I,children:E})}return E},ee=({selectedCount:t,maxCount:i,label:o="Выбрано",showCheckbox:n=!1,checked:e=!1,onCheckboxChange:c,className:h,indeterminate:l})=>{const{down:a}=xt.useBreakpoint(),s=a("xl"),r=t>0,x=s?"BodyXS":"BodyS",f=typeof i=="number"&&t>i?`${i}+`:`${t}`,u=(()=>{if(t===0)return"0px";const m=f.length;return`${Math.max(16,7.1+m*6.1)+4}px`})(),E=n?g.jsxs(jt.Box,{$css:{display:"flex",alignItems:"center",gap:"4px"},children:[g.jsx(b.Checkbox,{checked:e,indeterminate:l,onChange:c,size:"m"}),g.jsx(Pt.Typography,{variant:x,children:o})]}):g.jsx(Pt.Typography,{variant:x,children:o});return g.jsxs(jt.Box,{className:h,$css:{display:"flex",alignItems:"center"},children:[E,g.jsx(se.Collapse,{duration:.3,orientation:"horizontal",isOpen:r,unMountOnClose:!0,sizeOnOpen:u,extContainerCss:{overflow:"visible",display:"flex",justifyContent:"flex-end"},intContainerCss:{always:{opacity:"0",transition:".3s ease"},onOpen:{opacity:1}},children:r&&g.jsx(Wt.AnimatedCounter,{className:"counter",count:t,maxCount:i,size:"xs",view:"accent",style:{marginBottom:"3px"}},t)})]})},Ee=(t=[])=>p.useMemo(()=>{const i=[],o={},n=new Map;return t.forEach(e=>{var c,h;if(e.dropdown){const l=`group-${e.key||e.text||Date.now()}`,a="items"in e.dropdown?e.dropdown.items||[]:[],s="onItemSelect"in e.dropdown?e.dropdown.onItemSelect:void 0;s&&n.set(l.toString(),s);const[r,x]=xt.processDropdownItems(a,s);x.forEach((f,u)=>n.set(u,f)),(c=e.dropdown)!=null&&c.$css&&Object.assign(o,(h=e.dropdown)==null?void 0:h.$css),i.push({label:e.text??"",value:l,contentLeft:e.contentLeft,items:r,className:e.className,disabled:e.disabled})}else{const l=e.key||e.text||`btn-${Date.now()}`,a={label:e.text||"Кнопка",value:l.toString(),disabled:e.disabled,contentLeft:e.contentLeft};e.onClick&&n.set(l.toString(),(s,r)=>{var f;const x={...r,nativeEvent:r.nativeEvent,preventDefault:r.preventDefault,stopPropagation:r.stopPropagation,target:r.target,currentTarget:r.currentTarget};(f=e.onClick)==null||f.call(e,x)}),i.push(a)}}),{dropdownItems:i,handlerMap:n,$summaryCSS:o}},[t]),Ce=({buttons:t=[],dividerIndexes:i=[],triggerSlot:o,dropdownProps:n,useTableDropdown:e=!1})=>{const{dropdownItems:c,handlerMap:h,$summaryCSS:l}=Ee(t),a=xt.useDropdownItemClickHandler(h),[s,r]=p.useState(!1),x=c.map((m,I)=>(i.includes(I)&&(m.dividerAfter=!0),m)),f={closeOnSelect:!0,...n,onItemSelect:a,items:x,onToggle:m=>r(m),portal:"document",view:(n==null?void 0:n.view)||"default"},{portal:u,...E}=f;return e?g.jsx(Wt.TableDropdown,{$css:l,...E,children:o}):g.jsx(b.Dropdown,{...f,children:o})},Te=({button:t,isCompact:i,compactSize:o="xs",useTableDropdown:n=!1})=>{const e=t.size??(i?o:"s");return g.jsx(Ot,{...t,size:e,showLabel:!0,useTableDropdown:n})},Ie=({button:t,isCompact:i,compactSize:o="xs",useTableDropdown:n=!1})=>{const e=t.size??(i?o:"s");return g.jsx(Ot,{...t,size:e,showLabel:!0,useTableDropdown:n})},$t=(t,i,o=!1,n="xs")=>t.type==="button"?g.jsx(Te,{button:t,isCompact:i,compactSize:n,useTableDropdown:o}):g.jsx(Ie,{button:t,isCompact:i,compactSize:n,useTableDropdown:o}),ne=({containerRef:t,leftSection:i,middleSection:o,buttons:n,sidebarConfig:e,isHaveSomeFeatureInSidebar:c=!1,collapsedDropdownProps:h,selectedCount:l,show:a,useTableDropdown:s=!1,enableDebugLogs:r=!1,bottom:x=16,minPadding:f=16,size:u})=>{const{down:E}=xt.useBreakpoint(),m=u?u==="xs":E("xl"),I=u?"xxs":"xs",[A,N]=p.useState(!1),z=p.useRef(null),J=p.useRef(null),y=p.useRef(null),_=p.useRef([]),S=p.useRef(null),q=p.useRef(null),k=p.useRef(null),$=p.useRef(null),[R,U]=p.useState((n==null?void 0:n.length)??0),[tt,ot]=p.useState(void 0),[at,ct]=p.useState(!1),{containerWidth:T,getContainerWidth:P}=Ft(t),et=bt(l),v=a!==void 0?a:et,{calculatePosition:O,calculatePositionForState:j,shouldApplySidebarOffsetRef:V}=Zt({containerRef:z,collapseButtonRef:q,leftSectionRef:k,getContainerWidth:P,isHaveSomeFeatureInSidebar:c,sidebarConfig:e,visibleButtonsCount:R,setTranslateX:ot,minPadding:f}),{calculateCompression:G,measuredButtonWidthsRef:nt}=Jt({isCollapsed:A,containerRef:z,contentRef:J,middleSectionRef:y,buttonRefs:_,moreButtonRef:S,collapseButtonRef:q,leftSectionRef:k,dividerRef:$,buttons:n,isHaveSomeFeatureInSidebar:c,getContainerWidth:P,setVisibleButtonsCount:U,enableDebugLogs:r,minPadding:f,leftPadding:Q.left,rightPadding:Q.right,moreButtonWidthEstimate:m?32:Nt}),{isSidebarOpen:st,wasAutoCollapsedRef:H}=Qt({isCollapsed:A,setIsCollapsed:N,calculatePositionForState:j,calculatePosition:O,setTranslateX:ot,shouldApplySidebarOffsetRef:V,sidebarConfig:e,getContainerWidth:P}),{handleToggleCollapse:dt}=Yt({isCollapsed:A,setIsCollapsed:N,isSidebarOpen:st,calculatePositionForState:j,calculatePosition:O,setTranslateX:ot,shouldApplySidebarOffsetRef:V,wasAutoCollapsedRef:H}),{visibleButtons:X,buttonsInDropdown:pt,allButtons:rt}=Xt({buttons:n,visibleButtonsCount:R});if(p.useEffect(()=>{const W=setTimeout(()=>ct(!0),Ut);return()=>clearTimeout(W)},[]),Kt({containerRef:z,buttonRefs:_,buttons:n,isVisible:v,isCollapsed:A,visibleButtonsCount:R,selectedCount:l,setIsCollapsed:N,setVisibleButtonsCount:U,calculatePosition:O,calculateCompression:G,measuredButtonWidthsRef:nt,containerWidth:T}),!v)return null;const ut=!A&&((n==null?void 0:n.length)??0)>0;return g.jsx(de,{ref:z,$isCollapsed:A,$size:u,$translateX:tt,$isInitialCalculationComplete:at,$bottom:x,children:g.jsxs(ue,{ref:J,$isCollapsed:A,$isCompact:m,children:[g.jsx(pe,{children:rt.map((W,w)=>{const C=W.key??`${W.text}${w}`;return g.jsx(fe,{ref:D=>{_.current[w]=D},children:$t(W,m,s,I)},`measure-${C}`)})}),g.jsx("div",{ref:k,children:i}),g.jsxs(he,{$isCollapsed:A,children:[o&&g.jsx("div",{ref:y,children:o}),ut&&g.jsx("div",{ref:$,children:g.jsx(me,{orientation:"vertical",length:"16px"})}),pt.length>0&&g.jsx("div",{ref:W=>{S.current=W},children:g.jsx(Ce,{buttons:pt,useTableDropdown:s,dropdownProps:{placement:"top",...h},triggerSlot:g.jsx(b.IconButton,{view:"secondary",size:m?I:"s",contentLeft:g.jsx(Rt.IconDotsVerticalCenteredOutline,{size:m?"xs":"s"})})})}),X.map((W,w)=>{const C=W.key??`${W.text}${w}`,D=g.jsx(ge,{children:$t(W,m,s,I)},C);return W.disabled&&W.disabledTooltipProps?g.jsx(b.Tooltip,{trigger:"hover",...W.disabledTooltipProps,children:D},C):D})]}),g.jsx("div",{ref:q,children:g.jsx(we,{size:m?"s":"m",$isCollapsed:A,$isCompact:m,onClick:dt,children:g.jsx(xe,{size:m?"xs":"s",$isCollapsed:A})})})]})})};ne.Counter=ee;exports.ACTION_BUTTON_WIDTH_ESTIMATE=gt;exports.ANIMATION_COMPLETE_DELAY=Tt;exports.ANIMATION_DURATION=oe;exports.COLLAPSE_BUTTON_WIDTH=ht;exports.COMPRESSION_CALCULATION_DELAY=Gt;exports.CONTAINER_PADDING_HORIZONTAL=ie;exports.COUNTER_WIDTH_ESTIMATE=vt;exports.DELAY_BEFORE_SHOW_PANEL=Ut;exports.ELEMENTS_GAP=L;exports.INITIAL_POSITION_CALCULATION_DELAY=Ht;exports.MIN_PANEL_PADDING=Ct;exports.MORE_BUTTON_WIDTH_ESTIMATE=Nt;exports.MassActions=ne;exports.MassActionsButton=Ot;exports.MassActionsCounter=ee;exports.PANEL_PADDING_COLLAPSED=Bt;exports.PANEL_PADDING_EXPANDED=Q;exports.RESET_BUTTON_WIDTH_ESTIMATE=qt;exports.TOGGLE_SIDEBAR_PANEL_WIDTH=wt;exports.useMassActionsButtons=Xt;exports.useMassActionsCollapse=Yt;exports.useMassActionsCompression=Jt;exports.useMassActionsContainer=Ft;exports.useMassActionsEffects=Kt;exports.useMassActionsPosition=Zt;exports.useMassActionsSidebar=Qt;exports.useMassActionsVisibility=bt;
@@ -0,0 +1,9 @@
1
+ "use strict";const y=require("@salutejs/sdds-finai"),e=require("react/jsx-runtime"),f=require("./AiAgentPopup-CLGSjg5L.cjs"),w=require("@salutejs/plasma-icons"),$=require("@salutejs/sdds-themes/tokens/sdds_finai"),a=require("./utils-OQNruMpn.cjs"),q=require("react"),o=require("../constants/index.cjs"),s=require("styled-components"),n="PageTitle__",l={root:`${n}root`,breadcrumbs:`${n}breadcrumbs`,content:`${n}content`,leftBlock:`${n}left-block`,titleBlock:`${n}title-block`,title:`${n}title`,subtitle:`${n}subtitle`,titleSlot:`${n}title-slot`,rightBlock:`${n}right-block`,backIconButton:`${n}back-icon-block`},R=s.div.attrs({className:l.root}).withConfig({displayName:"PageTitlestyled__StyledRoot"})(["width:100%;display:flex;flex-direction:column;gap:",";"],()=>o.s.x8),z=s.div.attrs({className:l.breadcrumbs}).withConfig({displayName:"PageTitlestyled__StyledBreadcrumbs"})([""]),A=s.div.attrs({className:l.content}).withConfig({displayName:"PageTitlestyled__StyledContent"})(["display:flex;justify-content:space-between;align-items:flex-start;gap:",";"],()=>o.s.x12),I=s.div.attrs({className:l.leftBlock}).withConfig({displayName:"PageTitlestyled__StyledLeftBlock"})(["display:flex;align-items:flex-start;gap:",";flex:1;min-width:0;"],()=>o.s.x8),L=s.div.attrs({className:l.titleBlock}).withConfig({displayName:"PageTitlestyled__StyledTitleBlock"})(["display:flex;flex-direction:column;gap:",";flex-shrink:1;min-width:0;"],()=>o.s.x2),H=s.div.attrs({className:l.backIconButton}).withConfig({displayName:"PageTitlestyled__StyledBackButtonContainer"})(["margin-top:4px;",""],({$isAdaptive1280:t})=>t&&s.css([""," ",""],a.media.exact(960,1280)`
2
+ margin-top: 2px;
3
+ `,a.media.exact(0,959)`
4
+ margin-top: 0;
5
+ `)),W=s.div.attrs({className:l.title}).withConfig({displayName:"PageTitlestyled__StyledTitle"})([""]),E=s.div.attrs({className:l.subtitle}).withConfig({displayName:"PageTitlestyled__StyledSubtitle"})([""]),F=s.div.attrs({className:l.titleSlot}).withConfig({displayName:"PageTitlestyled__StyledTitleSlot"})(["margin-top:4px;",""],({$isAdaptive1280:t})=>t&&s.css([""," ",""],a.media.exact(960,1280)`
6
+ margin-top: 3px;
7
+ `,a.media.exact(0,959)`
8
+ margin-top: 2px;
9
+ `)),D=s.div.attrs({className:l.rightBlock}).withConfig({displayName:"PageTitlestyled__StyledRightBlock"})(["display:flex;align-items:flex-end;flex-shrink:0;align-self:flex-end;"]),S=t=>({buttonSize:t?"xs":"s"}),d=(t,i)=>typeof t=="function"?t(i):t,G=({isAdaptive1280:t,...i})=>e.jsx(H,{$isAdaptive1280:t,children:e.jsx(y.IconButton,{size:"xs",view:"secondary",className:l.backIconButton,pin:"circle-circle",...i,children:e.jsx(w.IconChevronLeft,{size:"xs",color:"inherit"})})}),J=({breadcrumbs:t})=>{if(!t)return null;const i={size:"m",...t};return e.jsx(z,{children:e.jsx(y.Breadcrumbs,{...i})})},K=({title:t,titleTypographyProps:i})=>t?e.jsx(W,{children:e.jsx(f.TypographyWithAutoTooltip,{variant:"H2",bold:!0,tooltipText:(i&&"tooltipText"in i?i.tooltipText:void 0)??t,...i,children:t})}):null,M=({subtitle:t,subtitleTypographyProps:i})=>t?e.jsx(E,{children:e.jsx(f.TypographyWithAutoTooltip,{variant:"BodyS",color:$.textSecondary,tooltipText:(i&&"tooltipText"in i?i.tooltipText:void 0)??t,...i,children:t})}):null,p=q.forwardRef(({title:t,titleTypographyProps:i,subtitle:r,subtitleTypographyProps:T,titleSlot:h,rightSlot:B,disableMediaAdaptive:k=!1,breadcrumbs:x,$css:N,className:_,showBackButton:j,onBackClick:b,...v},C)=>{const{down:P}=a.useBreakpoint(),c=!k&&P("xl"),g=S(c),m=d(h,g),u=d(B,g);return e.jsxs(R,{ref:C,$css:N,className:a.mCls(l.root,_),...v,children:[x&&e.jsx(J,{breadcrumbs:x}),e.jsxs(A,{children:[e.jsxs(I,{children:[j&&e.jsx(G,{isAdaptive1280:c,onClick:b}),(t||r)&&e.jsxs(L,{children:[e.jsx(K,{title:t,titleTypographyProps:i}),e.jsx(M,{subtitle:r,subtitleTypographyProps:T})]}),m&&e.jsx(F,{$isAdaptive1280:c,children:m})]}),u&&e.jsx(D,{children:u})]})]})});p.displayName="PageTitle";exports.PageTitle=p;exports.getPageTitleSlotSizes=S;exports.pageTitleClassNames=l;exports.renderPageTitleSlot=d;
@@ -1,9 +1,9 @@
1
1
  import { Breadcrumbs as P, IconButton as $ } from "@salutejs/sdds-finai";
2
2
  import { jsxs as n, jsx as l } from "react/jsx-runtime";
3
- import { a as x } from "./AnalyticalWidget-BtyWKJuu.mjs";
3
+ import { T as y } from "./AiAgentPopup-CtMhai1X.mjs";
4
4
  import { IconChevronLeft as R } from "@salutejs/plasma-icons";
5
5
  import { textSecondary as z } from "@salutejs/sdds-themes/tokens/sdds_finai";
6
- import { b as s, d as I, s as A } from "./utils-u1KJ37g3.mjs";
6
+ import { b as s, e as I, x as A } from "./utils-Hu77fGGe.mjs";
7
7
  import { forwardRef as j } from "react";
8
8
  import { s as c } from "../constants/index.mjs";
9
9
  import a, { css as S } from "styled-components";
@@ -72,7 +72,7 @@ const o = "PageTitle__", i = {
72
72
  displayName: "PageTitlestyled__StyledRightBlock"
73
73
  })(["display:flex;align-items:flex-end;flex-shrink:0;align-self:flex-end;"]), M = (t) => ({
74
74
  buttonSize: t ? "xs" : "s"
75
- }), y = (t, e) => typeof t == "function" ? t(e) : t, O = ({
75
+ }), x = (t, e) => typeof t == "function" ? t(e) : t, O = ({
76
76
  isAdaptive1280: t,
77
77
  ...e
78
78
  }) => /* @__PURE__ */ l(D, { $isAdaptive1280: t, children: /* @__PURE__ */ l($, { size: "xs", view: "secondary", className: i.backIconButton, pin: "circle-circle", ...e, children: /* @__PURE__ */ l(R, { size: "xs", color: "inherit" }) }) }), Q = ({
@@ -88,10 +88,10 @@ const o = "PageTitle__", i = {
88
88
  }, U = ({
89
89
  title: t,
90
90
  titleTypographyProps: e
91
- }) => t ? /* @__PURE__ */ l(F, { children: /* @__PURE__ */ l(x, { variant: "H2", bold: !0, tooltipText: (e && "tooltipText" in e ? e.tooltipText : void 0) ?? t, ...e, children: t }) }) : null, V = ({
91
+ }) => t ? /* @__PURE__ */ l(F, { children: /* @__PURE__ */ l(y, { variant: "H2", bold: !0, tooltipText: (e && "tooltipText" in e ? e.tooltipText : void 0) ?? t, ...e, children: t }) }) : null, V = ({
92
92
  subtitle: t,
93
93
  subtitleTypographyProps: e
94
- }) => t ? /* @__PURE__ */ l(G, { children: /* @__PURE__ */ l(x, { variant: "BodyS", color: z, tooltipText: (e && "tooltipText" in e ? e.tooltipText : void 0) ?? t, ...e, children: t }) }) : null, X = j(({
94
+ }) => t ? /* @__PURE__ */ l(G, { children: /* @__PURE__ */ l(y, { variant: "BodyS", color: z, tooltipText: (e && "tooltipText" in e ? e.tooltipText : void 0) ?? t, ...e, children: t }) }) : null, X = j(({
95
95
  title: t,
96
96
  titleTypographyProps: e,
97
97
  subtitle: r,
@@ -108,7 +108,7 @@ const o = "PageTitle__", i = {
108
108
  }, C) => {
109
109
  const {
110
110
  down: w
111
- } = I(), d = !B && w("xl"), f = M(d), g = y(u, f), p = y(T, f);
111
+ } = I(), d = !B && w("xl"), f = M(d), g = x(u, f), p = x(T, f);
112
112
  return /* @__PURE__ */ n(L, { ref: C, $css: k, className: A(i.root, N), ...v, children: [
113
113
  m && /* @__PURE__ */ l(Q, { breadcrumbs: m }),
114
114
  /* @__PURE__ */ n(E, { children: [
@@ -129,5 +129,5 @@ export {
129
129
  X as P,
130
130
  M as g,
131
131
  i as p,
132
- y as r
132
+ x as r
133
133
  };
@@ -1,5 +1,5 @@
1
- import { jsx as W, jsxs as H } from "react/jsx-runtime";
2
- import { t as G, e as V, w as J, b as y, d as K, s as Q, q as Y } from "./utils-u1KJ37g3.mjs";
1
+ import { jsx as W, jsxs as q } from "react/jsx-runtime";
2
+ import { t as G, f as V, d as J, b as y, e as K, x as Q, r as Y } from "./utils-Hu77fGGe.mjs";
3
3
  import { useState as F, useEffect as $, useCallback as T, useRef as L, useMemo as X } from "react";
4
4
  import { ModalDF as Z } from "../components/ModalDF/index.mjs";
5
5
  import { s as E } from "../constants/index.mjs";
@@ -74,11 +74,11 @@ const nt = ({
74
74
  const s = () => {
75
75
  var l;
76
76
  document.body.style.cursor = "auto", t.current = !1, (l = i.current) == null || l.classList.toggle(n.sidebarBlockIsResizing, !1);
77
- }, w = G((l) => {
77
+ }, v = G((l) => {
78
78
  if (!t.current || !i.current)
79
79
  return;
80
80
  l.preventDefault();
81
- const g = l.clientX, m = i.current.getBoundingClientRect(), p = m.width - r.separatorDefaultWidth, b = (m.right - g - r.separatorButtonDefaultWidth / 2) / p * 100, v = at(o, p), x = V(v, b, a), f = 100 - x, k = x * p / 100, B = f * p / 100, P = {
81
+ const g = l.clientX, m = i.current.getBoundingClientRect(), p = m.width - r.separatorDefaultWidth, b = (m.right - g - r.separatorButtonDefaultWidth / 2) / p * 100, w = at(o, p), x = V(w, b, a), f = 100 - x, k = x * p / 100, B = f * p / 100, P = {
82
82
  main: f,
83
83
  mainPx: B,
84
84
  sidebar: x,
@@ -86,8 +86,8 @@ const nt = ({
86
86
  };
87
87
  e(P), d == null || d(P);
88
88
  }, 150);
89
- return window.addEventListener("mousemove", w), window.addEventListener("mouseup", s), () => {
90
- window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", s);
89
+ return window.addEventListener("mousemove", v), window.addEventListener("mouseup", s), () => {
90
+ window.removeEventListener("mousemove", v), window.removeEventListener("mouseup", s);
91
91
  };
92
92
  }, [i, t, d, e, a, o]), {
93
93
  startResizing: c
@@ -177,17 +177,17 @@ const nt = ({
177
177
  onResize: c,
178
178
  headerHeight: s,
179
179
  insidePageLayout: h = !1,
180
- disableMediaAdaptive: w = !1,
180
+ disableMediaAdaptive: v = !1,
181
181
  ...l
182
182
  }) => {
183
183
  const g = L(!1), m = L(null), {
184
184
  down: C
185
- } = K(), p = !w && C("xl"), {
185
+ } = K(), p = !v && C("xl"), {
186
186
  minWidthPx: b,
187
- maxWidthPercent: v = r.sidebarWidths.maxWidthPercent,
187
+ maxWidthPercent: w = r.sidebarWidths.maxWidthPercent,
188
188
  defaultWidthPercent: D = r.sidebarWidths.defaultWidthPercent
189
189
  } = t ?? {}, x = t == null ? void 0 : t.content, f = ht(p, b), k = X(() => ut(p), [p]), B = X(() => mt(x, k), [x, k]), [P, z] = F(() => {
190
- const I = V(0, D, Math.min(v, 100));
190
+ const I = V(0, D, Math.min(w, 100));
191
191
  return {
192
192
  main: 100 - I,
193
193
  sidebar: I
@@ -198,32 +198,32 @@ const nt = ({
198
198
  setSizes: z,
199
199
  containerRef: m,
200
200
  isResizingRef: g,
201
- sidebarMaxWidthPercent: v,
201
+ sidebarMaxWidthPercent: w,
202
202
  sidebarMinWidthPx: f,
203
203
  onResize: c
204
204
  });
205
205
  dt({
206
206
  setSizes: z,
207
207
  containerRef: m,
208
- sidebarMaxWidthPercent: v,
208
+ sidebarMaxWidthPercent: w,
209
209
  sidebarMinWidthPx: f,
210
210
  onResize: c
211
211
  });
212
212
  const {
213
- isClosingOrClosedOrOpening: q,
214
- onTransitionEnd: A
213
+ isClosingOrClosedOrOpening: A,
214
+ onTransitionEnd: H
215
215
  } = ot({
216
216
  sidebarIsClosed: O,
217
217
  isResizingRef: g,
218
218
  onTransitionEndExt: d
219
219
  });
220
- return /* @__PURE__ */ H(pt, { ref: Y(m, o), style: {
220
+ return /* @__PURE__ */ q(pt, { ref: Y(m, o), style: {
221
221
  ...ct(P, O, t == null ? void 0 : t.paddingLeftOnClosed, f),
222
222
  ...i
223
- }, $css: a, $headerHeight: s, $insidePageLayout: h, $sidebarIsClosed: O, onTransitionEnd: A, ...l, children: [
223
+ }, $css: a, $headerHeight: s, $insidePageLayout: h, $sidebarIsClosed: O, onTransitionEnd: H, ...l, children: [
224
224
  /* @__PURE__ */ W("div", { className: n.mainBlock, children: e }),
225
225
  /* @__PURE__ */ W("div", { className: n.separator, children: /* @__PURE__ */ W("button", { className: n.separatorButton, type: "button", onMouseDown: U, children: "Разделитель" }) }),
226
- /* @__PURE__ */ W("div", { className: Q(n.sidebarBlock, q && n.sidebarIsClosingOrClosedOrOpening, (t == null ? void 0 : t.isFullScreened) && n.sidebarBlockInModal), children: /* @__PURE__ */ W(nt, { isFullScreened: t == null ? void 0 : t.isFullScreened, fullScreenedModalDFProps: t == null ? void 0 : t.fullScreenedModalDFProps, children: B }) })
226
+ /* @__PURE__ */ W("div", { className: Q(n.sidebarBlock, A && n.sidebarIsClosingOrClosedOrOpening, (t == null ? void 0 : t.isFullScreened) && n.sidebarBlockInModal), children: /* @__PURE__ */ W(nt, { isFullScreened: t == null ? void 0 : t.isFullScreened, fullScreenedModalDFProps: t == null ? void 0 : t.fullScreenedModalDFProps, children: B }) })
227
227
  ] });
228
228
  };
229
229
  export {
@@ -1,4 +1,4 @@
1
- "use strict";const W=require("react/jsx-runtime"),u=require("./utils-ChDQGRjv.cjs"),l=require("react"),H=require("../components/ModalDF/index.cjs"),L=require("../constants/index.cjs"),S=require("@salutejs/sdds-themes/tokens/sdds_finai"),U=require("styled-components"),A=({children:e,isFullScreened:t,fullScreenedModalDFProps:i})=>{if(!t)return e;const s=typeof(i==null?void 0:i.fullScreen)=="object"?i.fullScreen:void 0;return W.jsx(H.ModalDF,{opened:!0,closeOnOverlayClick:!1,...i,fullScreen:{...s,defaultEnabled:!0},children:e})},G=({sidebarIsClosed:e,isResizingRef:t,onTransitionEndExt:i})=>{const[s,o]=l.useState(()=>e);l.useEffect(()=>{e&&o(!0)},[e]);const d=l.useCallback(c=>{i&&i(c),!e&&!t.current&&s&&o(!1)},[s,t,i,e]);return{isClosingOrClosedOrOpening:s,onTransitionEnd:d}},m="SplitView__",r={container:`${m}container`,separator:`${m}separator`,separatorButton:`${m}separator-button`,mainBlock:`${m}main-block`,sidebarBlock:`${m}sidebar-block`,sidebarBlockIsResizing:`${m}sidebar-block-is-resizing`,sidebarIsClosingOrClosedOrOpening:`${m}sidebar-is-closing-closed-opening`,sidebarBlockFullScreenContentContainer:`${m}sidebar-block__full-screen-content-container`,sidebarBlockInModal:`${m}sidebar-block-in-modal`},j=32,E=12,n={mainWidthVar:"--main-width",separatorWidthVar:"--separator-width",sidebarWidthVar:"--sidebar-width",sidebarWidthInPxVar:"--sidebar-width-in-px",gapBetweenBlocksDefaultWidth:j,separatorButtonDefaultWidth:E,separatorDefaultWidth:j+E,sidebarWidths:{minWidthPx:600,adaptive1280MinWidthPx:440,maxWidthPercent:70,defaultWidthPercent:30}},M=(e,t)=>e/100*t,J=(e,t)=>e/t*100,K=({setSizes:e,isResizingRef:t,containerRef:i,sidebarMinWidthPx:s,sidebarMaxWidthPercent:o,onResize:d})=>{const c=l.useCallback(()=>{var a;document.body.style.cursor="col-resize",t.current=!0,(a=i.current)==null||a.classList.toggle(r.sidebarBlockIsResizing,!0)},[i,t]);return l.useEffect(()=>{const a=()=>{var p;document.body.style.cursor="auto",t.current=!1,(p=i.current)==null||p.classList.toggle(r.sidebarBlockIsResizing,!1)},g=p=>{if(!t.current||!i.current)return;p.preventDefault();const x=p.clientX,b=i.current.getBoundingClientRect(),h=b.width-n.separatorDefaultWidth,f=(b.right-x-n.separatorButtonDefaultWidth/2)/h*100,k=J(s,h),y=o,w=u.clamp(k,f,y),v=100-w,B=w*h/100,$=v*h/100,O={main:v,mainPx:$,sidebar:w,sidebarPx:B};e(O),d==null||d(O)},C=u.throttleWithLastCall(g,150);return window.addEventListener("mousemove",C),window.addEventListener("mouseup",a),()=>{window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",a)}},[i,t,d,e,o,s]),{startResizing:c}},Q=({setSizes:e,containerRef:t,sidebarMinWidthPx:i,sidebarMaxWidthPercent:s,onResize:o})=>{l.useEffect(()=>{const d=g=>{const p=g.contentRect.width-n.separatorDefaultWidth;e(x=>{const b=M(x.sidebar,p),V=M(s,p),h=u.clamp(i,b,V),f={...x,sidebarPx:h};return o==null||o(f),f})},c=u.debounce(d,1e3),a=new ResizeObserver(g=>{g.forEach(c)});return t.current&&a.observe(t.current),()=>{a.disconnect()}},[t,e,s,i])},P={spaceX4:()=>L.s.x4,spaceX16:()=>L.s.x16},Y=(e,t,i,s=n.sidebarWidths.minWidthPx)=>{const o=t?{...e,main:100,separator:`${i??0}px`,sidebar:0}:{...e,separator:`${n.separatorDefaultWidth}px`},{main:d,sidebar:c,sidebarPx:a,separator:g}=o;return{[n.mainWidthVar]:`${d}fr`,[n.sidebarWidthVar]:c===0?"minmax(0px, 0fr)":`minmax(${s}px, ${c}fr)`,[n.separatorWidthVar]:g,...a!==void 0&&{[n.sidebarWidthInPxVar]:`${a}px`}}},Z=`
1
+ "use strict";const W=require("react/jsx-runtime"),u=require("./utils-OQNruMpn.cjs"),l=require("react"),H=require("../components/ModalDF/index.cjs"),L=require("../constants/index.cjs"),S=require("@salutejs/sdds-themes/tokens/sdds_finai"),U=require("styled-components"),A=({children:e,isFullScreened:t,fullScreenedModalDFProps:i})=>{if(!t)return e;const s=typeof(i==null?void 0:i.fullScreen)=="object"?i.fullScreen:void 0;return W.jsx(H.ModalDF,{opened:!0,closeOnOverlayClick:!1,...i,fullScreen:{...s,defaultEnabled:!0},children:e})},G=({sidebarIsClosed:e,isResizingRef:t,onTransitionEndExt:i})=>{const[s,o]=l.useState(()=>e);l.useEffect(()=>{e&&o(!0)},[e]);const d=l.useCallback(c=>{i&&i(c),!e&&!t.current&&s&&o(!1)},[s,t,i,e]);return{isClosingOrClosedOrOpening:s,onTransitionEnd:d}},m="SplitView__",r={container:`${m}container`,separator:`${m}separator`,separatorButton:`${m}separator-button`,mainBlock:`${m}main-block`,sidebarBlock:`${m}sidebar-block`,sidebarBlockIsResizing:`${m}sidebar-block-is-resizing`,sidebarIsClosingOrClosedOrOpening:`${m}sidebar-is-closing-closed-opening`,sidebarBlockFullScreenContentContainer:`${m}sidebar-block__full-screen-content-container`,sidebarBlockInModal:`${m}sidebar-block-in-modal`},j=32,E=12,n={mainWidthVar:"--main-width",separatorWidthVar:"--separator-width",sidebarWidthVar:"--sidebar-width",sidebarWidthInPxVar:"--sidebar-width-in-px",gapBetweenBlocksDefaultWidth:j,separatorButtonDefaultWidth:E,separatorDefaultWidth:j+E,sidebarWidths:{minWidthPx:600,adaptive1280MinWidthPx:440,maxWidthPercent:70,defaultWidthPercent:30}},M=(e,t)=>e/100*t,J=(e,t)=>e/t*100,K=({setSizes:e,isResizingRef:t,containerRef:i,sidebarMinWidthPx:s,sidebarMaxWidthPercent:o,onResize:d})=>{const c=l.useCallback(()=>{var a;document.body.style.cursor="col-resize",t.current=!0,(a=i.current)==null||a.classList.toggle(r.sidebarBlockIsResizing,!0)},[i,t]);return l.useEffect(()=>{const a=()=>{var p;document.body.style.cursor="auto",t.current=!1,(p=i.current)==null||p.classList.toggle(r.sidebarBlockIsResizing,!1)},g=p=>{if(!t.current||!i.current)return;p.preventDefault();const x=p.clientX,b=i.current.getBoundingClientRect(),h=b.width-n.separatorDefaultWidth,f=(b.right-x-n.separatorButtonDefaultWidth/2)/h*100,k=J(s,h),y=o,w=u.clamp(k,f,y),v=100-w,B=w*h/100,$=v*h/100,O={main:v,mainPx:$,sidebar:w,sidebarPx:B};e(O),d==null||d(O)},C=u.throttleWithLastCall(g,150);return window.addEventListener("mousemove",C),window.addEventListener("mouseup",a),()=>{window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",a)}},[i,t,d,e,o,s]),{startResizing:c}},Q=({setSizes:e,containerRef:t,sidebarMinWidthPx:i,sidebarMaxWidthPercent:s,onResize:o})=>{l.useEffect(()=>{const d=g=>{const p=g.contentRect.width-n.separatorDefaultWidth;e(x=>{const b=M(x.sidebar,p),V=M(s,p),h=u.clamp(i,b,V),f={...x,sidebarPx:h};return o==null||o(f),f})},c=u.debounce(d,1e3),a=new ResizeObserver(g=>{g.forEach(c)});return t.current&&a.observe(t.current),()=>{a.disconnect()}},[t,e,s,i])},P={spaceX4:()=>L.s.x4,spaceX16:()=>L.s.x16},Y=(e,t,i,s=n.sidebarWidths.minWidthPx)=>{const o=t?{...e,main:100,separator:`${i??0}px`,sidebar:0}:{...e,separator:`${n.separatorDefaultWidth}px`},{main:d,sidebar:c,sidebarPx:a,separator:g}=o;return{[n.mainWidthVar]:`${d}fr`,[n.sidebarWidthVar]:c===0?"minmax(0px, 0fr)":`minmax(${s}px, ${c}fr)`,[n.separatorWidthVar]:g,...a!==void 0&&{[n.sidebarWidthInPxVar]:`${a}px`}}},Z=`
2
2
  border-top-right-radius: ${P.spaceX4};
3
3
  border-bottom-right-radius: ${P.spaceX4};
4
4
  `,R=U.div.attrs({className:r.container}).withConfig({displayName:"SplitViewstyled__StyledDiv"})(["*{box-sizing:border-box;}display:grid;position:relative;z-index:0;grid-template-columns:var(",") var(",") var(",");transition:grid-template-columns 0.2s ease-in-out,margin-right 0.2s ease-in-out;flex-grow:1;& .","{overflow-x:hidden;}& .",",& .","{--split-view-header-height:",";--split-view-bottom-gap:var(--page-layout-padding-bottom,32px);"," position:sticky;top:var(--split-view-header-height);height:calc( 100vh - var(--split-view-header-height) - var(--split-view-bottom-gap) );overflow-x:hidden;}& .","{align-self:start;z-index:1;& .","{margin-left:","px;position:relative;border:none;padding:0;width:","px;height:100%;background-color:",";border-radius:"," 0 0 ",";&::before{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:4px;height:",";border-radius:95px;background-color:",";}&:hover{&::before{background-color:",";}}cursor:col-resize;text-indent:100%;white-space:nowrap;overflow:hidden;}}&.","{& .",":before{background-color:",";}}.","{z-index:0;align-self:start;background-color:",";box-shadow:",";",";}."," > *{width:var(",");}"," ",""],n.mainWidthVar,n.separatorWidthVar,n.sidebarWidthVar,r.mainBlock,r.separator,r.sidebarBlock,({$headerHeight:e})=>e!==void 0?`${e}px`:"var(--global-header-height, 72px)",u.media.down("l")`
@@ -0,0 +1 @@
1
+ "use strict";const r=require("react/jsx-runtime"),U=require("@salutejs/sdds-finai"),ne=require("@salutejs/plasma-icons"),s=require("react"),fe=require("react-dom"),Re=require("./EmptyState-D-bmtvmy.cjs"),q=require("./utils-OQNruMpn.cjs"),V=require("@salutejs/sdds-themes/tokens/sdds_finai"),l=require("styled-components"),Ee=require("./AiAgentPopup-CLGSjg5L.cjs"),Pe=({controller:e,pauseHoldDelay:t,tapPrevZone:n,isOpen:o})=>{const i=s.useRef(),y=s.useRef(!1),p=s.useRef("next"),u=()=>{i.current&&(clearTimeout(i.current),i.current=void 0)},v=f=>{const c=f.currentTarget.getBoundingClientRect(),_=c.width>0?(f.clientX-c.left)/c.width:1;p.current=_<n?"prev":"next",y.current=!1,u(),i.current=setTimeout(()=>{y.current=!0,e.pause()},t)},I=()=>{if(u(),y.current){y.current=!1,e.resume();return}p.current==="prev"?e.prev():e.next()},d=()=>{u(),y.current&&(y.current=!1,e.resume())};return s.useEffect(()=>{if(!o)return;const f=c=>{c.key==="ArrowLeft"?(c.preventDefault(),e.prev()):c.key==="ArrowRight"?(c.preventDefault(),e.next()):c.key==="Escape"&&(c.preventDefault(),e.close())};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[o,e]),{onPointerDown:v,onPointerUp:I,onPointerLeave:d,onPointerCancel:d}},ge=s.createContext(null),je=ge.Provider,Y=()=>{const e=s.useContext(ge);if(!e)throw new Error("Компоненты Stories должны использоваться внутри <Stories>.");return e},Z=e=>s.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot),C={root:"df-stories",preview:"df-stories-preview",previewRing:"df-stories-preview__ring",previewGap:"df-stories-preview__gap",previewBody:"df-stories-preview__body",previewTitle:"df-stories-preview__title",viewer:"df-stories-viewer",overlay:"df-stories-viewer__overlay",stage:"df-stories-viewer__stage",banner:"df-stories-banner",progress:"df-stories-progress",progressItem:"df-stories-progress__item",content:"df-stories-content",action:"df-stories-banner__action",arrowPrev:"df-stories-viewer__arrow-prev",arrowNext:"df-stories-viewer__arrow-next",close:"df-stories-viewer__close"},ke="linear-gradient(135deg, #08c6c9 0%, #99b0fe 100%)",Ne="#ecf6fc",L="df-stories-banner",X={duration:5e3,pauseHoldDelay:200,tapPrevZone:1/3,overlayColor:"#060a0c47",zIndex:9e3},x={circle:98,ring:2,titleGap:6,rectRadiusOuter:12,rectRadiusBody:8,bannerMaxWidth:430,bannerMaxHeight:900,bannerRadius:16,bannerPadding:28,stageWidth:558,progressHeight:4,progressRadius:2,progressFillRadius:6,progressGap:4},Te="StoriesPreview",ce=l.div.withConfig({displayName:"StoriesContentstyled__StyledContent"})(["position:absolute;inset:0;display:flex;align-items:center;justify-content:center;overflow:hidden;background:",";"],V.surfaceSolidCard),Oe=l.img.withConfig({displayName:"StoriesContentstyled__StyledImage"})(["width:100%;height:100%;object-fit:",";opacity:",";transition:opacity 0.2s ease;user-select:none;"],({$objectFit:e})=>e,({$loaded:e})=>e?1:0),Ae=l.div.withConfig({displayName:"StoriesContentstyled__StyledSpinner"})(["position:absolute;display:flex;align-items:center;justify-content:center;"]),ze=l.div.withConfig({displayName:"StoriesContentstyled__StyledErrorSlot"})(["position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:","px;"],x.bannerPadding),ye=({slide:e,status:t,errorNode:n})=>{const o=e.objectFit??"cover",i=t==="loaded";return t==="error"?r.jsx(ce,{className:C.content,children:r.jsx(ze,{children:n})}):r.jsxs(ce,{className:C.content,children:[r.jsx(Oe,{src:e.src,alt:"",draggable:!1,$objectFit:o,$loaded:i}),t==="loading"?r.jsx(Ae,{children:r.jsx(U.Spinner,{view:"default",size:"l"})}):null]})},pe=(e,t)=>{e&&(e.style.transform=`scaleX(${t})`)},De=({fillRef:e,active:t,duration:n,isPlaying:o,isReady:i,resetKey:y,onComplete:p})=>{const u=s.useRef(0),v=s.useRef(p);v.current=p,s.useEffect(()=>{u.current=0,pe(e.current,0)},[y,e]),s.useEffect(()=>{if(!t||!o||!i||n<=0)return;let I=0,d=performance.now();const f=c=>{u.current+=c-d,d=c;const _=Math.min(1,u.current/n);if(pe(e.current,_),_>=1){v.current();return}I=requestAnimationFrame(f)};return I=requestAnimationFrame(f),()=>cancelAnimationFrame(I)},[t,o,i,n,y,e])},$e=l.div.withConfig({displayName:"StoriesProgressstyled__StyledProgress"})(["display:flex;gap:","px;width:100%;"],x.progressGap),Be=l.div.withConfig({displayName:"StoriesProgressstyled__StyledItem"})(["position:relative;flex:1 1 0;height:","px;border-radius:","px;overflow:hidden;background:",";"],x.progressHeight,x.progressRadius,({$bg:e})=>e),Ve=l.span.withConfig({displayName:"StoriesProgressstyled__StyledFill"})(["position:absolute;inset:0;border-radius:","px;background:",";transform:scaleX(0);transform-origin:left center;will-change:transform;"],x.progressFillRadius,({$color:e})=>e),xe=({isReady:e})=>{var O;const{store:t,controller:n,groups:o,defaultDuration:i,mode:y}=Y(),{groupIndex:p,slideIndex:u,isPlaying:v,isOpen:I}=Z(t),d=q.useActiveTheme(),c=(y??d)==="dark",_=c?V.onLightSurfaceTransparentTertiary:V.onDarkSurfaceTransparentTertiary,S=c?V.onLightSurfaceTransparentDeep:V.onDarkSurfaceTransparentDeep,b=o[p],h=(b==null?void 0:b.slides)??[],z=s.useRef(null),k=((O=h[u])==null?void 0:O.duration)??(b==null?void 0:b.defaultDuration)??i;return De({fillRef:z,active:I,duration:k,isPlaying:v,isReady:e,resetKey:`${p}-${u}`,onComplete:n.next}),r.jsx($e,{className:C.progress,children:h.map((D,N)=>{const T=D.id??`${p}-${N}`,P=N<u,G=N===u;return r.jsx(Be,{className:C.progressItem,$bg:P?S:_,children:G?r.jsx(Ve,{ref:z,$color:S}):null},T)})})},Ge=l.keyframes(["from{opacity:0;transform:scale(0.92) translateY(8px);}to{opacity:1;transform:scale(1) translateY(0);}"]),Le=l.keyframes(["from{opacity:1;transform:scale(1) translateY(0);}to{opacity:0;transform:scale(0.96) translateY(6px);}"]),Fe=l.div.withConfig({displayName:"StoriesBannerstyled__StyledBanner"})(["position:relative;height:100%;width:auto;aspect-ratio:"," / ",";max-width:calc( 100vw - ","px );border-radius:","px;overflow:hidden;view-transition-name:",";animation:"," "," ease forwards;"],x.bannerMaxWidth,x.bannerMaxHeight,x.stageWidth-x.bannerMaxWidth,x.bannerRadius,L,({$closing:e})=>e?Le:Ge,({$closing:e})=>e?"0.2s":"0.24s"),He=l.div.withConfig({displayName:"StoriesBannerstyled__StyledTapLayer"})(["position:absolute;inset:0;z-index:1;touch-action:none;"]),Me=l.div.withConfig({displayName:"StoriesBannerstyled__StyledTop"})(["position:absolute;top:0;left:0;right:0;z-index:2;padding:","px;pointer-events:none;"],x.bannerPadding),We=l.div.withConfig({displayName:"StoriesBannerstyled__StyledBottom"})(["position:absolute;bottom:0;left:0;right:0;z-index:2;padding:","px;pointer-events:none;"],x.bannerPadding),Xe=l.div.withConfig({displayName:"StoriesBannerstyled__StyledActionSlot"})(["pointer-events:auto;"]),me=({closing:e,onAnimationEnd:t})=>{const{store:n,controller:o,groups:i,pauseHoldDelay:y,tapPrevZone:p,loadingDelay:u,onError:v,renderError:I}=Y(),{groupIndex:d,slideIndex:f,isOpen:c}=Z(n),_=i[d],S=_==null?void 0:_.slides[f],{status:b,reload:h}=q.useImageLoader(S==null?void 0:S.src,u),z=Pe({controller:o,pauseHoldDelay:y,tapPrevZone:p,isOpen:c}),k=s.useRef();s.useEffect(()=>{if(b!=="error"||!S)return;const P=`${d}-${f}`;k.current!==P&&(k.current=P,v==null||v({groupIndex:d,slideIndex:f,slide:S,retry:h}))},[b,d,f,S,v,h]);const O=P=>P.stopPropagation(),D=P=>{P.target===P.currentTarget&&t()};if(!S)return null;const{footer:N}=S,T=I?I({groupIndex:d,slideIndex:f,slide:S,retry:h}):r.jsx(Re.EmptyState,{size:"s",variant:"loading",title:"Не удалось загрузить",centered:!0,buttons:[{type:"link",props:{text:"Обновить",view:"accent",onClick:h}}]});return r.jsxs(Fe,{className:C.banner,$closing:e,onClick:O,onAnimationEnd:D,children:[r.jsx(ye,{slide:S,status:b,errorNode:T}),b==="error"?null:r.jsx(He,{...z}),r.jsx(Me,{children:r.jsx(xe,{isReady:b==="loaded"})}),N?r.jsx(We,{children:r.jsx(Xe,{className:C.action,children:N})}):null]})},se={ring:()=>ke,fallback:()=>Ne,boxShadow:()=>V.shadowDownSoftL},re=(e,t)=>e==="circle"?"50%":`${{outer:x.rectRadiusOuter,body:x.rectRadiusBody}[t]}px`,qe=l.div.withConfig({displayName:"StoriesPreviewstyled__StyledPreview"})(["display:flex;flex-direction:column;align-items:center;width:","px;"],({$width:e})=>e),Ye=l.button.withConfig({displayName:"StoriesPreviewstyled__StyledTrigger"})(["position:relative;display:block;box-sizing:border-box;width:","px;height:","px;padding:0;margin:0;border:0;background:transparent;cursor:pointer;border-radius:",";outline:none;&:focus-visible{outline:2px solid ",";outline-offset:2px;}"],({$width:e})=>e,({$height:e})=>e,({$shape:e})=>re(e,"outer"),V.textAccent),Ze=l.div.withConfig({displayName:"StoriesPreviewstyled__StyledRing"})(["position:absolute;inset:0;box-sizing:border-box;padding:","px;background:",";border-radius:",";-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;"],x.ring,se.ring,({$shape:e})=>re(e,"outer")),Ke=l.div.withConfig({displayName:"StoriesPreviewstyled__StyledBody"})(["position:absolute;inset:","px;box-sizing:border-box;box-shadow:",";background-color:",";background-position:center;background-size:cover;background-repeat:no-repeat;"," border-radius:",";"],({$viewed:e})=>e?0:x.ring*2,se.boxShadow,se.fallback,({$image:e})=>e&&l.css(["background-image:url('","');"],e),({$shape:e,$viewed:t})=>re(e,t?"outer":"body")),Ue=l.div.withConfig({displayName:"StoriesPreviewstyled__StyledTitle"})(["margin-top:","px;width:100%;text-align:",";& > *{width:100%;}"],x.titleGap,({$align:e})=>e),oe=e=>{var $;const{slides:t,shape:n="circle",title:o,titleProps:i,image:y,viewed:p=!1,size:u=x.circle,width:v,height:I,renderTrigger:d,className:f,__index:c=0}=e,{store:_,controller:S,preloadOnHover:b}=Y(),h=Z(_),z=h.isOpen&&h.groupIndex===c,k=n==="rect"?v??u:u,O=n==="rect"?I??u:u,D=()=>S.open(c),N=()=>{b&&t[0]&&q.preloadImage(t[0].src)},T=()=>d?d({index:c,viewed:p,isActive:z}):r.jsxs(r.Fragment,{children:[p?null:r.jsx(Ze,{className:C.previewRing,$shape:n}),r.jsx(Ke,{className:C.previewBody,$shape:n,$viewed:p,$image:y})]}),P={variant:"BodyXXS",bold:!0,lines:2,tooltipText:o,color:V.textPrimary,...i,children:o},G=(($=i==null?void 0:i.style)==null?void 0:$.textAlign)??"center";return r.jsxs(qe,{className:[C.preview,f].filter(Boolean).join(" "),"data-component":Te,$width:k,children:[r.jsx(Ye,{type:"button","aria-label":o,$width:k,$height:O,$shape:n,onClick:D,onMouseEnter:N,children:T()}),o?r.jsx(Ue,{className:C.previewTitle,style:{maxWidth:k},$align:G,children:r.jsx(Ee.TypographyWithAutoTooltip,{...P})}):null]})},Je=l.keyframes(["from{opacity:0;}to{opacity:1;}"]),Qe=l.keyframes(["from{opacity:1;}to{opacity:0;}"]),Se=e=>l.css(["animation:"," "," ease forwards;"],e?Qe:Je,e?"0.2s":"0.24s"),et=l.div.withConfig({displayName:"StoriesViewerstyled__StyledRoot"})(["position:fixed;inset:0;z-index:",";display:flex;align-items:center;justify-content:center;"],({$zIndex:e})=>e),tt=l.div.withConfig({displayName:"StoriesViewerstyled__StyledOverlay"})(["position:absolute;inset:0;background:",";opacity:",";transition:opacity 0.24s ease;"],({$color:e})=>e,({$closing:e})=>e?0:1),nt=l.div.withConfig({displayName:"StoriesViewerstyled__StyledStage"})(["position:relative;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:fit-content;max-width:min(","px,100vw);height:min(","px,calc(100vh - 32px));padding:0 ","px;outline:none;"],x.stageWidth,x.bannerMaxHeight,(x.stageWidth-x.bannerMaxWidth)/2),ue=l.div.withConfig({displayName:"StoriesViewerstyled__StyledArrow"})(["position:absolute;top:50%;"," z-index:3;transform:translateY(-50%);",""],({$side:e})=>e==="prev"?"left: 0;":"right: 0;",({$closing:e})=>Se(e)),st=l.div.withConfig({displayName:"StoriesViewerstyled__StyledClose"})(["position:absolute;top:0;right:0;z-index:3;",""],({$closing:e})=>Se(e)),rt=l.keyframes(["from{transform:translateX(24px);opacity:0;}to{transform:translateX(0);opacity:1;}"]),ot=l.keyframes(["from{transform:translateX(0);opacity:1;}to{transform:translateX(-24px);opacity:0;}"]),it=l.keyframes(["from{transform:translateX(-24px);opacity:0;}to{transform:translateX(0);opacity:1;}"]),at=l.keyframes(["from{transform:translateX(0);opacity:1;}to{transform:translateX(24px);opacity:0;}"]),lt=l.createGlobalStyle(["::view-transition-old(","),::view-transition-new(","){animation-duration:0.3s;animation-timing-function:ease;}html[data-df-stories-dir='next']::view-transition-new(","){animation-name:",";}html[data-df-stories-dir='next']::view-transition-old(","){animation-name:",";}html[data-df-stories-dir='prev']::view-transition-new(","){animation-name:",";}html[data-df-stories-dir='prev']::view-transition-old(","){animation-name:",";}"],L,L,L,rt,L,ot,L,it,L,at),he=()=>{var Q;const{store:e,controller:t,groups:n,overlay:o,overlayColor:i,zIndex:y,groupTransition:p,arrows:u,hideDisabledArrows:v,preloadGroup:I}=Y(),{isOpen:d,groupIndex:f,slideIndex:c}=Z(e),[_,S]=s.useState(d),b=s.useRef(null);s.useEffect(()=>{d&&S(!0)},[d]),s.useEffect(()=>{var A;d&&((A=b.current)==null||A.focus())},[d]),s.useEffect(()=>{d&&I(f)},[d,f,I]);const h=_&&!d,z=s.useCallback(()=>{h&&S(!1)},[h]);if(!_||typeof document>"u")return null;const k=((Q=n[f])==null?void 0:Q.slides.length)??0,O=f>0||c>0,D=c+1<k||f+1<n.length,N=n.reduce((A,F)=>A+F.slides.length,0),T=u==="always"||u==="auto"&&N>1,P=T&&(O||!v),G=T&&(D||!v),$=A=>A.stopPropagation(),J=r.jsxs(et,{className:C.viewer,$zIndex:y,onClick:()=>t.close(),children:[o?r.jsx(tt,{className:C.overlay,$color:i,$closing:h}):null,p==="slide"?r.jsx(lt,{}):null,r.jsxs(nt,{ref:b,tabIndex:-1,className:C.stage,children:[P?r.jsx(ue,{className:C.arrowPrev,$side:"prev",$closing:h,onClick:$,children:r.jsx(U.IconButton,{size:"s",view:"white",pin:"circle-circle","aria-label":"Назад",disabled:!O,onClick:()=>t.prev(),children:r.jsx(ne.IconDisclosureLeftOutline,{size:"s"})})}):null,r.jsx(me,{closing:h,onAnimationEnd:z}),G?r.jsx(ue,{className:C.arrowNext,$side:"next",$closing:h,onClick:$,children:r.jsx(U.IconButton,{size:"s",view:"white",pin:"circle-circle","aria-label":"Вперёд",disabled:!D,onClick:()=>t.next(),children:r.jsx(ne.IconDisclosureRightOutline,{size:"s"})})}):null,r.jsx(st,{className:C.close,$closing:h,onClick:$,children:r.jsx(U.IconButton,{size:"s",view:"white",pin:"circle-circle","aria-label":"Закрыть",onClick:()=>t.close(),children:r.jsx(ne.IconClose,{size:"s"})})})]})]});return fe.createPortal(J,document.body)},dt=Object.freeze(Object.defineProperty({__proto__:null,StoriesViewer:he},Symbol.toStringTag,{value:"Module"})),we=s.lazy(()=>Promise.resolve().then(()=>dt).then(e=>({default:e.StoriesViewer}))),ct=e=>{const t=s.useRef(e);return t.current=e,s.useCallback(n=>{const o=t.current[n];if(!o)return;o.slides.forEach(y=>q.preloadImage(y.src));const i=t.current[n+1];i!=null&&i.slides[0]&&q.preloadImage(i.slides[0].src)},[])},pt={isOpen:!1,groupIndex:0,slideIndex:0,isPlaying:!0,direction:"next"},ut=e=>{let t={...pt,...e};const n=new Set;return{getSnapshot:()=>t,subscribe:o=>(n.add(o),()=>{n.delete(o)}),setState:o=>{Object.keys(o).some(p=>t[p]!==o[p])&&(t={...t,...o},n.forEach(p=>p()))}}},ft=()=>typeof document<"u"&&typeof document.startViewTransition=="function",gt=(e,t)=>{const{direction:n="next",enabled:o=!0}=t??{};if(!o||!ft()){e();return}const i=document;i.documentElement.dataset.dfStoriesDir=n,i.startViewTransition(()=>fe.flushSync(e)).finished.finally(()=>{delete i.documentElement.dataset.dfStoriesDir})},yt=l.div.withConfig({displayName:"Storiesstyled__StyledStories"})(["display:flex;align-items:flex-start;gap:16px;"]),ve=e=>s.isValidElement(e)&&e.type===oe,be=e=>{const t=[];return s.Children.forEach(e,n=>{var o;ve(n)?t.push(n):s.isValidElement(n)&&((o=n.props)!=null&&o.children)&&t.push(...be(n.props.children))}),t},Ie=(e,t)=>s.Children.map(e,n=>{var o;if(ve(n)){const i=t.value;return t.value+=1,s.cloneElement(n,{__index:i})}return s.isValidElement(n)&&((o=n.props)!=null&&o.children)?s.cloneElement(n,void 0,Ie(n.props.children,t)):n}),xt=()=>{const{store:e}=Y(),{isOpen:t}=Z(e),[n,o]=s.useState(t);return s.useEffect(()=>{t&&o(!0)},[t]),n?r.jsx(s.Suspense,{fallback:null,children:r.jsx(we,{})}):null},mt=(e,t)=>{const{children:n,defaultDuration:o=X.duration,open:i,defaultOpen:y,activeGroupIndex:p,activeSlideIndex:u,onOpenChange:v,onGroupChange:I,onSlideChange:d,onComplete:f,onGroupComplete:c,onClose:_,onError:S,renderError:b,overlay:h=!0,overlayColor:z=X.overlayColor,zIndex:k=X.zIndex,preloadOnHover:O=!0,loadingDelay:D=0,pauseHoldDelay:N=X.pauseHoldDelay,groupTransition:T="slide",arrows:P="auto",hideDisabledArrows:G=!0,mode:$,className:J}=e,A=be(n).map(R=>({slides:R.props.slides??[],defaultDuration:R.props.defaultDuration})),F=s.useRef();F.current||(F.current=ut({isOpen:y??!1}));const g=F.current,K=s.useRef(A);K.current=A;const ae=s.useRef({groupTransition:T});ae.current={groupTransition:T};const H=s.useRef({onOpenChange:v,onGroupChange:I,onSlideChange:d,onComplete:f,onGroupComplete:c,onClose:_});H.current={onOpenChange:v,onGroupChange:I,onSlideChange:d,onComplete:f,onGroupComplete:c,onClose:_};const ee=s.useRef();if(!ee.current){const R=(a,E)=>g.setState({slideIndex:a,direction:E,isPlaying:!0}),m=(a,E,j)=>gt(()=>g.setState({groupIndex:a,slideIndex:E,direction:j,isPlaying:!0}),{direction:j,enabled:ae.current.groupTransition!=="none"}),w=()=>{var a,E;(E=(a=H.current).onComplete)==null||E.call(a),g.setState({isOpen:!1,isPlaying:!1})};ee.current={open:(a,E)=>{const j=g.getSnapshot();g.setState({isOpen:!0,groupIndex:a??j.groupIndex,slideIndex:E??0,isPlaying:!0,direction:"next"})},close:()=>g.setState({isOpen:!1,isPlaying:!1}),next:()=>{var j,B,M,W,de;const a=g.getSnapshot(),E=((j=K.current[a.groupIndex])==null?void 0:j.slides.length)??0;a.slideIndex+1<E?R(a.slideIndex+1,"next"):a.groupIndex+1<K.current.length?((M=(B=H.current).onGroupComplete)==null||M.call(B,a.groupIndex),m(a.groupIndex+1,0,"next")):((de=(W=H.current).onGroupComplete)==null||de.call(W,a.groupIndex),w())},prev:()=>{const a=g.getSnapshot();a.slideIndex>0?R(a.slideIndex-1,"prev"):a.groupIndex>0&&m(a.groupIndex-1,0,"prev")},nextGroup:()=>{const a=g.getSnapshot();a.groupIndex+1<K.current.length&&m(a.groupIndex+1,0,"next")},prevGroup:()=>{const a=g.getSnapshot();a.groupIndex>0&&m(a.groupIndex-1,0,"prev")},goTo:(a,E)=>{const j=g.getSnapshot(),B=a<j.groupIndex?"prev":"next";a===j.groupIndex?R(E??0,B):m(a,E??0,B)},pause:()=>g.setState({isPlaying:!1}),resume:()=>g.setState({isPlaying:!0})}}const te=ee.current,_e=ct(A),le=s.useRef(g.getSnapshot());s.useEffect(()=>g.subscribe(()=>{var a,E,j,B,M,W;const R=le.current,m=g.getSnapshot();le.current=m;const w=H.current;if(R.isOpen!==m.isOpen){(a=w.onOpenChange)==null||a.call(w,m.isOpen,{groupIndex:m.groupIndex}),m.isOpen?((E=w.onGroupChange)==null||E.call(w,m.groupIndex),(j=w.onSlideChange)==null||j.call(w,m.groupIndex,m.slideIndex)):(B=w.onClose)==null||B.call(w);return}m.isOpen&&(R.groupIndex!==m.groupIndex&&((M=w.onGroupChange)==null||M.call(w,m.groupIndex)),(R.groupIndex!==m.groupIndex||R.slideIndex!==m.slideIndex)&&((W=w.onSlideChange)==null||W.call(w,m.groupIndex,m.slideIndex)))}),[g]),s.useEffect(()=>{i!==void 0&&g.setState({isOpen:i})},[i,g]),s.useEffect(()=>{p!==void 0&&g.setState({groupIndex:p})},[p,g]),s.useEffect(()=>{u!==void 0&&g.setState({slideIndex:u})},[u,g]),s.useImperativeHandle(t,()=>({...te,getState:()=>{const R=g.getSnapshot();return{isOpen:R.isOpen,groupIndex:R.groupIndex,slideIndex:R.slideIndex,isPlaying:R.isPlaying}}}),[te,g]);const Ce={store:g,controller:te,groups:A,defaultDuration:o,pauseHoldDelay:N,tapPrevZone:X.tapPrevZone,preloadGroup:_e,preloadOnHover:O,loadingDelay:D,overlay:h,overlayColor:z,zIndex:k,groupTransition:T,arrows:P,hideDisabledArrows:G,mode:$,onError:S,renderError:b};return r.jsxs(je,{value:Ce,children:[r.jsx(yt,{className:[C.root,J].filter(Boolean).join(" "),children:Ie(n,{value:0})}),r.jsx(xt,{})]})},ie=s.forwardRef(mt);ie.Preview=oe;ie.displayName="Stories";exports.Stories=ie;exports.StoriesBanner=me;exports.StoriesContent=ye;exports.StoriesPreview=oe;exports.StoriesProgress=xe;exports.StoriesViewer=he;exports.StoriesViewerLazy=we;exports.storiesClassNames=C;