@taiga-ui/core 4.52.0-canary.24b31eb → 4.52.0-canary.2d877cf

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 (297) hide show
  1. package/README.md +1 -1
  2. package/classes/accessors.d.ts +2 -2
  3. package/components/calendar/calendar-sheet.component.d.ts +1 -1
  4. package/components/calendar/calendar-sheet.options.d.ts +1 -3
  5. package/{pipes/calendar-sheet → components/calendar}/calendar-sheet.pipe.d.ts +2 -2
  6. package/components/calendar/calendar-spin.component.d.ts +1 -0
  7. package/components/calendar/calendar-year.component.d.ts +1 -1
  8. package/components/calendar/calendar.options.d.ts +9 -0
  9. package/components/calendar/index.d.ts +3 -0
  10. package/{pipes/order-week-days → components/calendar}/order-week-days.pipe.d.ts +1 -1
  11. package/components/data-list/data-list.component.d.ts +8 -12
  12. package/components/data-list/data-list.d.ts +3 -4
  13. package/components/data-list/data-list.tokens.d.ts +1 -23
  14. package/components/data-list/index.d.ts +3 -4
  15. package/components/data-list/opt-group.directive.d.ts +2 -2
  16. package/components/data-list/option-content.directive.d.ts +14 -0
  17. package/components/data-list/option-with-value.directive.d.ts +9 -0
  18. package/components/data-list/option.directive.d.ts +19 -0
  19. package/components/error/error.component.d.ts +1 -1
  20. package/components/icon/icon.component.d.ts +2 -2
  21. package/components/index.d.ts +2 -3
  22. package/components/input/index.d.ts +2 -0
  23. package/components/input/input.d.ts +5 -0
  24. package/components/input/input.directive.d.ts +30 -0
  25. package/components/label/label.directive.d.ts +1 -1
  26. package/components/link/index.d.ts +0 -1
  27. package/components/link/link.directive.d.ts +8 -6
  28. package/components/loader/loader.component.d.ts +7 -7
  29. package/components/loader/loader.options.d.ts +1 -3
  30. package/components/notification/index.d.ts +3 -0
  31. package/components/notification/notification.component.d.ts +14 -0
  32. package/components/notification/notification.d.ts +3 -0
  33. package/components/notification/notification.directive.d.ts +7 -12
  34. package/components/notification/notification.options.d.ts +10 -7
  35. package/components/notification/notification.service.d.ts +17 -0
  36. package/components/root/root.component.d.ts +2 -2
  37. package/components/scrollbar/scroll-into-view.directive.d.ts +3 -2
  38. package/components/scrollbar/scroll-ref.directive.d.ts +2 -0
  39. package/components/scrollbar/scrollbar.component.d.ts +1 -5
  40. package/components/scrollbar/scrollbar.directive.d.ts +2 -2
  41. package/components/spin-button/spin-button.component.d.ts +9 -10
  42. package/components/textfield/index.d.ts +1 -4
  43. package/components/textfield/textfield-multi/textfield-item.component.d.ts +3 -2
  44. package/components/textfield/textfield-multi/textfield-multi.component.d.ts +10 -15
  45. package/components/textfield/textfield.component.d.ts +23 -37
  46. package/components/textfield/textfield.d.ts +2 -4
  47. package/components/textfield/textfield.options.d.ts +8 -11
  48. package/directives/appearance/appearance.directive.d.ts +1 -1
  49. package/directives/appearance/appearance.options.d.ts +1 -1
  50. package/directives/date-format/date-format.directive.d.ts +3 -7
  51. package/directives/group/group.directive.d.ts +7 -7
  52. package/directives/group/group.options.d.ts +1 -3
  53. package/directives/index.d.ts +0 -4
  54. package/directives/items-handlers/items-handlers.directive.d.ts +5 -9
  55. package/directives/items-handlers/items-handlers.tokens.d.ts +4 -4
  56. package/directives/number-format/number-format.directive.d.ts +3 -7
  57. package/fesm2022/taiga-ui-core-classes.mjs +9 -11
  58. package/fesm2022/taiga-ui-core-classes.mjs.map +1 -1
  59. package/fesm2022/taiga-ui-core-components-button.mjs +6 -6
  60. package/fesm2022/taiga-ui-core-components-button.mjs.map +1 -1
  61. package/fesm2022/taiga-ui-core-components-calendar.mjs +139 -35
  62. package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
  63. package/fesm2022/taiga-ui-core-components-cell.mjs +7 -7
  64. package/fesm2022/taiga-ui-core-components-cell.mjs.map +1 -1
  65. package/fesm2022/taiga-ui-core-components-data-list.mjs +111 -280
  66. package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
  67. package/fesm2022/taiga-ui-core-components-error.mjs +13 -12
  68. package/fesm2022/taiga-ui-core-components-error.mjs.map +1 -1
  69. package/fesm2022/taiga-ui-core-components-expand.mjs +3 -3
  70. package/fesm2022/taiga-ui-core-components-expand.mjs.map +1 -1
  71. package/fesm2022/taiga-ui-core-components-icon.mjs +9 -10
  72. package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
  73. package/fesm2022/taiga-ui-core-components-input.mjs +103 -0
  74. package/fesm2022/taiga-ui-core-components-input.mjs.map +1 -0
  75. package/fesm2022/taiga-ui-core-components-label.mjs +10 -12
  76. package/fesm2022/taiga-ui-core-components-label.mjs.map +1 -1
  77. package/fesm2022/taiga-ui-core-components-link.mjs +14 -31
  78. package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
  79. package/fesm2022/taiga-ui-core-components-loader.mjs +16 -34
  80. package/fesm2022/taiga-ui-core-components-loader.mjs.map +1 -1
  81. package/fesm2022/taiga-ui-core-components-notification.mjs +103 -48
  82. package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
  83. package/fesm2022/taiga-ui-core-components-root.mjs +8 -20
  84. package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
  85. package/fesm2022/taiga-ui-core-components-scrollbar.mjs +68 -82
  86. package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
  87. package/fesm2022/taiga-ui-core-components-spin-button.mjs +18 -31
  88. package/fesm2022/taiga-ui-core-components-spin-button.mjs.map +1 -1
  89. package/fesm2022/taiga-ui-core-components-textfield.mjs +122 -421
  90. package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
  91. package/fesm2022/{taiga-ui-core-directives-title.mjs → taiga-ui-core-components-title.mjs} +7 -7
  92. package/fesm2022/taiga-ui-core-components-title.mjs.map +1 -0
  93. package/fesm2022/taiga-ui-core-components.mjs +2 -3
  94. package/fesm2022/taiga-ui-core-components.mjs.map +1 -1
  95. package/fesm2022/taiga-ui-core-directives-appearance.mjs +15 -15
  96. package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
  97. package/fesm2022/taiga-ui-core-directives-date-format.mjs +26 -20
  98. package/fesm2022/taiga-ui-core-directives-date-format.mjs.map +1 -1
  99. package/fesm2022/taiga-ui-core-directives-group.mjs +22 -34
  100. package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
  101. package/fesm2022/taiga-ui-core-directives-icons.mjs +11 -11
  102. package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
  103. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs +18 -42
  104. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs.map +1 -1
  105. package/fesm2022/taiga-ui-core-directives-number-format.mjs +32 -20
  106. package/fesm2022/taiga-ui-core-directives-number-format.mjs.map +1 -1
  107. package/fesm2022/taiga-ui-core-directives.mjs +0 -4
  108. package/fesm2022/taiga-ui-core-directives.mjs.map +1 -1
  109. package/fesm2022/taiga-ui-core-pipes-format-number.mjs +21 -15
  110. package/fesm2022/taiga-ui-core-pipes-format-number.mjs.map +1 -1
  111. package/fesm2022/taiga-ui-core-pipes.mjs +0 -7
  112. package/fesm2022/taiga-ui-core-pipes.mjs.map +1 -1
  113. package/fesm2022/taiga-ui-core-portals-alert.mjs +73 -0
  114. package/fesm2022/taiga-ui-core-portals-alert.mjs.map +1 -0
  115. package/fesm2022/taiga-ui-core-portals-dialog.mjs +158 -0
  116. package/fesm2022/taiga-ui-core-portals-dialog.mjs.map +1 -0
  117. package/fesm2022/{taiga-ui-core-directives-dropdown.mjs → taiga-ui-core-portals-dropdown.mjs} +178 -330
  118. package/fesm2022/taiga-ui-core-portals-dropdown.mjs.map +1 -0
  119. package/fesm2022/{taiga-ui-core-directives-hint.mjs → taiga-ui-core-portals-hint.mjs} +136 -228
  120. package/fesm2022/taiga-ui-core-portals-hint.mjs.map +1 -0
  121. package/fesm2022/taiga-ui-core-portals-modal.mjs +89 -0
  122. package/fesm2022/taiga-ui-core-portals-modal.mjs.map +1 -0
  123. package/fesm2022/taiga-ui-core-portals-popup.mjs +56 -0
  124. package/fesm2022/taiga-ui-core-portals-popup.mjs.map +1 -0
  125. package/fesm2022/taiga-ui-core-portals.mjs +11 -0
  126. package/fesm2022/taiga-ui-core-portals.mjs.map +1 -0
  127. package/fesm2022/taiga-ui-core-services.mjs +16 -55
  128. package/fesm2022/taiga-ui-core-services.mjs.map +1 -1
  129. package/fesm2022/taiga-ui-core-tokens.mjs +24 -47
  130. package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
  131. package/fesm2022/taiga-ui-core-utils-format.mjs +1 -22
  132. package/fesm2022/taiga-ui-core-utils-format.mjs.map +1 -1
  133. package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs +8 -17
  134. package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs.map +1 -1
  135. package/fesm2022/taiga-ui-core.mjs +1 -1
  136. package/index.d.ts +1 -1
  137. package/package.json +74 -96
  138. package/pipes/format-number/format-number.pipe.d.ts +6 -4
  139. package/pipes/index.d.ts +0 -7
  140. package/portals/alert/alert.directive.d.ts +11 -0
  141. package/portals/alert/alert.service.d.ts +12 -0
  142. package/portals/alert/index.d.ts +2 -0
  143. package/{components → portals}/dialog/dialog.component.d.ts +3 -4
  144. package/portals/dialog/dialog.directive.d.ts +8 -0
  145. package/{components → portals}/dialog/dialog.options.d.ts +2 -3
  146. package/{components → portals}/dialog/dialog.providers.d.ts +1 -2
  147. package/portals/dialog/dialog.service.d.ts +10 -0
  148. package/{components → portals}/dialog/index.d.ts +0 -1
  149. package/portals/dropdown/dropdown-content.directive.d.ts +9 -0
  150. package/{directives → portals}/dropdown/dropdown-hover.directive.d.ts +5 -10
  151. package/{directives → portals}/dropdown/dropdown-hover.options.d.ts +1 -3
  152. package/{directives → portals}/dropdown/dropdown-manual.directive.d.ts +2 -2
  153. package/portals/dropdown/dropdown-open.directive.d.ts +30 -0
  154. package/{directives → portals}/dropdown/dropdown-position-sided.directive.d.ts +3 -3
  155. package/{directives → portals}/dropdown/dropdown-position.directive.d.ts +5 -5
  156. package/{directives → portals}/dropdown/dropdown-selection.directive.d.ts +4 -5
  157. package/{directives → portals}/dropdown/dropdown.bindings.d.ts +0 -1
  158. package/{directives → portals}/dropdown/dropdown.d.ts +2 -3
  159. package/{directives → portals}/dropdown/dropdown.directive.d.ts +6 -8
  160. package/{directives → portals}/dropdown/index.d.ts +1 -4
  161. package/{directives → portals}/hint/hint-describe.directive.d.ts +4 -6
  162. package/{directives → portals}/hint/hint-host.directive.d.ts +2 -2
  163. package/{directives → portals}/hint/hint-hover.directive.d.ts +3 -4
  164. package/{directives → portals}/hint/hint-manual.directive.d.ts +2 -2
  165. package/{directives → portals}/hint/hint-options.directive.d.ts +1 -1
  166. package/{directives → portals}/hint/hint-overflow.directive.d.ts +2 -2
  167. package/{directives → portals}/hint/hint-position.directive.d.ts +5 -6
  168. package/{directives → portals}/hint/hint-unstyled.component.d.ts +2 -7
  169. package/{directives → portals}/hint/hint.component.d.ts +7 -6
  170. package/portals/hint/hint.directive.d.ts +24 -0
  171. package/{directives → portals}/hint/index.d.ts +0 -2
  172. package/portals/index.d.ts +6 -0
  173. package/portals/modal/index.d.ts +2 -0
  174. package/portals/modal/modal.component.d.ts +17 -0
  175. package/portals/modal/modal.service.d.ts +13 -0
  176. package/portals/popup/popup.directive.d.ts +12 -0
  177. package/{directives → portals}/popup/popup.service.d.ts +1 -1
  178. package/{directives → portals}/popup/popups.component.d.ts +2 -2
  179. package/services/index.d.ts +0 -2
  180. package/styles/components/link.less +9 -23
  181. package/styles/components/textfield.less +10 -7
  182. package/styles/mixins/appearance.less +2 -2
  183. package/styles/mixins/mixins.less +0 -5
  184. package/styles/mixins/mixins.scss +0 -5
  185. package/styles/mixins/slider.less +24 -14
  186. package/styles/mixins/slider.scss +1 -2
  187. package/styles/theme/variables.less +2 -4
  188. package/tokens/common-icons.d.ts +3 -3
  189. package/tokens/date-format.d.ts +2 -3
  190. package/tokens/i18n.d.ts +7 -7
  191. package/tokens/icons.d.ts +0 -4
  192. package/tokens/index.d.ts +0 -4
  193. package/tokens/number-format.d.ts +2 -3
  194. package/types/index.d.ts +0 -3
  195. package/types/point.d.ts +1 -1
  196. package/types/size.d.ts +0 -11
  197. package/utils/format/index.d.ts +0 -1
  198. package/utils/miscellaneous/get-duration.d.ts +2 -0
  199. package/utils/miscellaneous/index.d.ts +1 -1
  200. package/animations/animations.d.ts +0 -109
  201. package/animations/index.d.ts +0 -1
  202. package/components/alert/alert.component.d.ts +0 -15
  203. package/components/alert/alert.directive.d.ts +0 -7
  204. package/components/alert/alert.interfaces.d.ts +0 -12
  205. package/components/alert/alert.service.d.ts +0 -7
  206. package/components/alert/alert.tokens.d.ts +0 -12
  207. package/components/alert/alerts.component.d.ts +0 -12
  208. package/components/alert/index.d.ts +0 -6
  209. package/components/data-list/data-list.directive.d.ts +0 -7
  210. package/components/data-list/option/option-content.d.ts +0 -16
  211. package/components/data-list/option/option-legacy.component.d.ts +0 -24
  212. package/components/data-list/option/option.directive.d.ts +0 -27
  213. package/components/dialog/active-zone-adapter.directive.d.ts +0 -11
  214. package/components/dialog/dialog.directive.d.ts +0 -7
  215. package/components/dialog/dialog.service.d.ts +0 -7
  216. package/components/dialog/dialogs.component.d.ts +0 -8
  217. package/components/header/header.directive.d.ts +0 -17
  218. package/components/header/index.d.ts +0 -1
  219. package/components/link/link.options.d.ts +0 -12
  220. package/components/textfield/select.directive.d.ts +0 -19
  221. package/components/textfield/textfield-dropdown.directive.d.ts +0 -16
  222. package/components/textfield/textfield.directive.d.ts +0 -38
  223. package/directives/dropdown/dropdown-open-legacy.directive.d.ts +0 -12
  224. package/directives/dropdown/dropdown-open.directive.d.ts +0 -33
  225. package/directives/dropdown/dropdown-portal.directive.d.ts +0 -14
  226. package/directives/dropdown/dropdown.service.d.ts +0 -6
  227. package/directives/dropdown/dropdowns.component.d.ts +0 -9
  228. package/directives/hint/hint.directive.d.ts +0 -26
  229. package/directives/hint/hint.service.d.ts +0 -13
  230. package/directives/hint/hints.component.d.ts +0 -12
  231. package/directives/popup/popup.directive.d.ts +0 -11
  232. package/fesm2022/taiga-ui-core-animations.mjs +0 -370
  233. package/fesm2022/taiga-ui-core-animations.mjs.map +0 -1
  234. package/fesm2022/taiga-ui-core-components-alert.mjs +0 -149
  235. package/fesm2022/taiga-ui-core-components-alert.mjs.map +0 -1
  236. package/fesm2022/taiga-ui-core-components-dialog.mjs +0 -215
  237. package/fesm2022/taiga-ui-core-components-dialog.mjs.map +0 -1
  238. package/fesm2022/taiga-ui-core-components-header.mjs +0 -42
  239. package/fesm2022/taiga-ui-core-components-header.mjs.map +0 -1
  240. package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +0 -1
  241. package/fesm2022/taiga-ui-core-directives-hint.mjs.map +0 -1
  242. package/fesm2022/taiga-ui-core-directives-popup.mjs +0 -63
  243. package/fesm2022/taiga-ui-core-directives-popup.mjs.map +0 -1
  244. package/fesm2022/taiga-ui-core-directives-title.mjs.map +0 -1
  245. package/fesm2022/taiga-ui-core-pipes-auto-color.mjs +0 -25
  246. package/fesm2022/taiga-ui-core-pipes-auto-color.mjs.map +0 -1
  247. package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs +0 -94
  248. package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs.map +0 -1
  249. package/fesm2022/taiga-ui-core-pipes-flag.mjs +0 -32
  250. package/fesm2022/taiga-ui-core-pipes-flag.mjs.map +0 -1
  251. package/fesm2022/taiga-ui-core-pipes-format-date.mjs +0 -28
  252. package/fesm2022/taiga-ui-core-pipes-format-date.mjs.map +0 -1
  253. package/fesm2022/taiga-ui-core-pipes-initials.mjs +0 -29
  254. package/fesm2022/taiga-ui-core-pipes-initials.mjs.map +0 -1
  255. package/fesm2022/taiga-ui-core-pipes-month.mjs +0 -29
  256. package/fesm2022/taiga-ui-core-pipes-month.mjs.map +0 -1
  257. package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs +0 -36
  258. package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs.map +0 -1
  259. package/pipes/auto-color/auto-color.pipe.d.ts +0 -7
  260. package/pipes/auto-color/index.d.ts +0 -1
  261. package/pipes/calendar-sheet/index.d.ts +0 -1
  262. package/pipes/calendar-sheet/utils.d.ts +0 -20
  263. package/pipes/flag/flag.pipe.d.ts +0 -14
  264. package/pipes/flag/index.d.ts +0 -1
  265. package/pipes/format-date/format-date.pipe.d.ts +0 -9
  266. package/pipes/format-date/index.d.ts +0 -1
  267. package/pipes/initials/index.d.ts +0 -1
  268. package/pipes/initials/initials.pipe.d.ts +0 -7
  269. package/pipes/month/index.d.ts +0 -1
  270. package/pipes/month/month.pipe.d.ts +0 -10
  271. package/pipes/order-week-days/index.d.ts +0 -1
  272. package/services/dark-theme.service.d.ts +0 -10
  273. package/services/format-date.service.d.ts +0 -8
  274. package/tokens/day-type-handler.d.ts +0 -7
  275. package/tokens/first-day-of-week.d.ts +0 -5
  276. package/tokens/scroll-ref.d.ts +0 -2
  277. package/tokens/spin-icons.d.ts +0 -6
  278. package/types/portal-item.d.ts +0 -9
  279. package/types/range-state.d.ts +0 -4
  280. package/types/value-content-context.d.ts +0 -4
  281. package/utils/format/string-hash-to-hsl.d.ts +0 -6
  282. package/utils/miscellaneous/to-animation-options.d.ts +0 -4
  283. /package/{directives → components}/title/index.d.ts +0 -0
  284. /package/{directives → components}/title/title.directive.d.ts +0 -0
  285. /package/{components → portals}/dialog/dialog.factory.d.ts +0 -0
  286. /package/{directives → portals}/dropdown/dropdown-context.directive.d.ts +0 -0
  287. /package/{directives → portals}/dropdown/dropdown-limit-width.d.ts +0 -0
  288. /package/{directives → portals}/dropdown/dropdown-options.directive.d.ts +0 -0
  289. /package/{directives → portals}/dropdown/dropdown.component.d.ts +0 -0
  290. /package/{directives → portals}/dropdown/dropdown.driver.d.ts +0 -0
  291. /package/{directives → portals}/dropdown/dropdown.providers.d.ts +0 -0
  292. /package/{directives → portals}/dropdown/with-dropdown-open.directive.d.ts +0 -0
  293. /package/{directives → portals}/hint/hint-driver.directive.d.ts +0 -0
  294. /package/{directives → portals}/hint/hint-pointer.directive.d.ts +0 -0
  295. /package/{directives → portals}/hint/hint.d.ts +0 -0
  296. /package/{directives → portals}/hint/hint.providers.d.ts +0 -0
  297. /package/{directives → portals}/popup/index.d.ts +0 -0
@@ -11,16 +11,11 @@ import * as i2 from '@taiga-ui/cdk/directives/visual-viewport';
11
11
  import { TuiVisualViewport } from '@taiga-ui/cdk/directives/visual-viewport';
12
12
  import { TUI_IS_MOBILE } from '@taiga-ui/cdk/tokens';
13
13
  import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
14
- import { TuiAlerts } from '@taiga-ui/core/components/alert';
15
- import { TuiDialogs } from '@taiga-ui/core/components/dialog';
16
14
  import { TUI_SCROLLBAR_OPTIONS, TuiScrollControls } from '@taiga-ui/core/components/scrollbar';
17
- import { TuiDropdowns } from '@taiga-ui/core/directives/dropdown';
18
- import { TuiHints } from '@taiga-ui/core/directives/hint';
19
- import { TuiPopups } from '@taiga-ui/core/directives/popup';
15
+ import { TuiPopups } from '@taiga-ui/core/portals/popup';
20
16
  import { TuiBreakpointService } from '@taiga-ui/core/services';
21
17
  import { TUI_REDUCED_MOTION, TUI_ANIMATIONS_SPEED } from '@taiga-ui/core/tokens';
22
18
  import { tuiGetDuration, TUI_OPTIONS } from '@taiga-ui/core/utils/miscellaneous';
23
- import { map } from 'rxjs';
24
19
 
25
20
  class TuiRoot {
26
21
  constructor() {
@@ -30,7 +25,7 @@ class TuiRoot {
30
25
  this.reducedMotion = inject(TUI_REDUCED_MOTION);
31
26
  this.duration = tuiGetDuration(inject(TUI_ANIMATIONS_SPEED));
32
27
  this.top = signal(this.parent);
33
- this.isMobileRes = toSignal(inject(TuiBreakpointService).pipe(map((breakpoint) => breakpoint === 'mobile')));
28
+ this.breakpoint = toSignal(inject(TuiBreakpointService));
34
29
  this.scrollbars = !inject(TUI_IS_MOBILE) &&
35
30
  !this.child &&
36
31
  inject(TUI_SCROLLBAR_OPTIONS).mode !== 'native' &&
@@ -39,27 +34,20 @@ class TuiRoot {
39
34
  get parent() {
40
35
  return this.doc.fullscreenElement === this.el || !this.child;
41
36
  }
42
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiRoot, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
43
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiRoot, isStandalone: true, selector: "tui-root", host: { attributes: { "data-tui-version": "4.52.0-canary.24b31eb" }, listeners: { "touchstart.passive.zoneless": "0", "document:fullscreenchange": "top.set(parent)" }, properties: { "style.--tui-duration.ms": "duration", "style.--tui-scroll-behavior": "reducedMotion ? \"auto\" : \"smooth\"", "class._mobile": "isMobileRes()" } }, hostDirectives: [{ directive: i1.TuiPlatform }, { directive: i2.TuiVisualViewport }, { directive: i3.TuiFontSize }], ngImport: i0, template: "<div class=\"t-root-content\">\n <ng-content />\n</div>\n@if (top()) {\n @if (scrollbars) {\n <tui-scroll-controls class=\"t-root-scrollbar\" />\n }\n <tui-popups />\n <ng-content select=\"tuiOverContent\" />\n <tui-dialogs />\n <ng-content select=\"tuiOverDialogs\" />\n <tui-alerts />\n <ng-content select=\"tuiOverAlerts\" />\n <tui-dropdowns />\n <ng-content select=\"tuiOverDropdowns\" />\n <tui-hints />\n <ng-content select=\"tuiOverHints\" />\n}\n", styles: ["@keyframes tuiSkeletonVibe{to{opacity:.5}}@keyframes tuiPresent{to{content:\"\"}}@keyframes tuiFade{0%{opacity:0}}@keyframes tuiSlide{0%{transform:var(--tui-from, translateY(100%))}}@keyframes tuiScale{0%{transform:scale(var(--tui-scale, 0))}}@keyframes tuiCollapse{0%{grid-template-rows:0fr}to{grid-template-rows:1fr}}.tui-enter,.tui-leave{animation-duration:var(--tui-duration);animation-timing-function:ease-in-out;pointer-events:none}.tui-leave{animation-direction:reverse}\n", ".tui-zero-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.tui-zero-scrollbar::-webkit-scrollbar,.tui-zero-scrollbar::-webkit-scrollbar-thumb{display:none}body,input{margin:0}tui-root{position:relative;display:block;font:var(--tui-font-text-s);color:var(--tui-text-primary);flex:1;border-image:conic-gradient(var(--tui-background-base) 0 0) fill 0/0/0 0 100vh 0;-webkit-tap-highlight-color:transparent}:root{--tui-inline-start: left;--tui-inline-end: right;--tui-inline: 1}[dir=rtl]{--tui-inline-start: right;--tui-inline-end: left;--tui-inline: -1}tui-root>.t-root-scrollbar{position:fixed;z-index:0;top:0;right:0;bottom:0;left:0}.t-root-content{position:relative;top:var(--t-root-top);block-size:100%;isolation:isolate}.t-root-content>*{--t-root-top: 0}[tuiDropdownButton][tuiDropdownButton]{display:none}\n"], dependencies: [{ kind: "component", type: TuiAlerts, selector: "tui-alerts" }, { kind: "component", type: TuiDialogs, selector: "tui-dialogs" }, { kind: "component", type: TuiDropdowns, selector: "tui-dropdowns" }, { kind: "component", type: TuiHints, selector: "tui-hints" }, { kind: "component", type: TuiPopups, selector: "tui-popups" }, { kind: "component", type: TuiScrollControls, selector: "tui-scroll-controls" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
37
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiRoot, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
38
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiRoot, isStandalone: true, selector: "tui-root", host: { attributes: { "data-tui-version": "4.52.0-canary.2d877cf" }, listeners: { "touchstart.passive.zoneless": "0", "document:fullscreenchange": "top.set(parent)" }, properties: { "style.--tui-duration.ms": "duration", "style.--tui-scroll-behavior": "reducedMotion ? \"auto\" : \"smooth\"", "class._mobile": "breakpoint() === \"mobile\"" } }, hostDirectives: [{ directive: i1.TuiPlatform }, { directive: i2.TuiVisualViewport }, { directive: i3.TuiFontSize }], ngImport: i0, template: "<div class=\"t-root-content\">\n <ng-content />\n</div>\n@if (top()) {\n @if (scrollbars) {\n <tui-scroll-controls class=\"t-root-scrollbar\" />\n }\n <tui-popups>\n <ng-content select=\"tuiOverContent\" />\n </tui-popups>\n}\n", styles: ["@keyframes tuiPresent{to{opacity:.99999}}@keyframes tuiFade{0%{opacity:0}}@keyframes tuiSlide{0%{transform:var(--tui-from, translateY(100%))}}@keyframes tuiScale{0%{transform:scale(var(--tui-scale, 0))}}@keyframes tuiCollapse{0%{grid-template-rows:0fr}to{grid-template-rows:1fr}}.tui-enter,.tui-leave{animation-duration:var(--tui-duration);animation-timing-function:ease-in-out;pointer-events:none}.tui-leave{animation-direction:reverse}\n", ".tui-zero-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.tui-zero-scrollbar::-webkit-scrollbar,.tui-zero-scrollbar::-webkit-scrollbar-thumb{display:none}body,input{margin:0}tui-root{position:relative;display:block;font:var(--tui-font-text-s);color:var(--tui-text-primary);flex:1;border-image:conic-gradient(var(--tui-background-base) 0 0) fill 0/0/0 0 100vh 0;-webkit-tap-highlight-color:transparent}:root{--tui-inline-start: left;--tui-inline-end: right;--tui-inline: 1}[dir=rtl]{--tui-inline-start: right;--tui-inline-end: left;--tui-inline: -1}tui-root>.t-root-scrollbar{position:fixed;z-index:0;inset:0}.t-root-content{position:relative;top:var(--t-root-top);block-size:100%;isolation:isolate}.t-root-content>*{--t-root-top: 0}[tuiDropdownButton][tuiDropdownButton]{display:none}\n"], dependencies: [{ kind: "component", type: TuiPopups, selector: "tui-popups" }, { kind: "component", type: TuiScrollControls, selector: "tui-scroll-controls" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
44
39
  }
45
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiRoot, decorators: [{
40
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiRoot, decorators: [{
46
41
  type: Component,
47
- args: [{ selector: 'tui-root', imports: [
48
- TuiAlerts,
49
- TuiDialogs,
50
- TuiDropdowns,
51
- TuiHints,
52
- TuiPopups,
53
- TuiScrollControls,
54
- ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, hostDirectives: [TuiPlatform, TuiVisualViewport, TuiFontSize], host: {
42
+ args: [{ selector: 'tui-root', imports: [TuiPopups, TuiScrollControls], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, hostDirectives: [TuiPlatform, TuiVisualViewport, TuiFontSize], host: {
55
43
  'data-tui-version': TUI_VERSION,
56
44
  '[style.--tui-duration.ms]': 'duration',
57
45
  '[style.--tui-scroll-behavior]': 'reducedMotion ? "auto" : "smooth"',
58
- '[class._mobile]': 'isMobileRes()',
46
+ '[class._mobile]': 'breakpoint() === "mobile"',
59
47
  // Required for the :active state to work in Safari. https://stackoverflow.com/a/33681490
60
48
  '(touchstart.passive.zoneless)': '0',
61
49
  '(document:fullscreenchange)': 'top.set(parent)',
62
- }, template: "<div class=\"t-root-content\">\n <ng-content />\n</div>\n@if (top()) {\n @if (scrollbars) {\n <tui-scroll-controls class=\"t-root-scrollbar\" />\n }\n <tui-popups />\n <ng-content select=\"tuiOverContent\" />\n <tui-dialogs />\n <ng-content select=\"tuiOverDialogs\" />\n <tui-alerts />\n <ng-content select=\"tuiOverAlerts\" />\n <tui-dropdowns />\n <ng-content select=\"tuiOverDropdowns\" />\n <tui-hints />\n <ng-content select=\"tuiOverHints\" />\n}\n", styles: ["@keyframes tuiSkeletonVibe{to{opacity:.5}}@keyframes tuiPresent{to{content:\"\"}}@keyframes tuiFade{0%{opacity:0}}@keyframes tuiSlide{0%{transform:var(--tui-from, translateY(100%))}}@keyframes tuiScale{0%{transform:scale(var(--tui-scale, 0))}}@keyframes tuiCollapse{0%{grid-template-rows:0fr}to{grid-template-rows:1fr}}.tui-enter,.tui-leave{animation-duration:var(--tui-duration);animation-timing-function:ease-in-out;pointer-events:none}.tui-leave{animation-direction:reverse}\n", ".tui-zero-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.tui-zero-scrollbar::-webkit-scrollbar,.tui-zero-scrollbar::-webkit-scrollbar-thumb{display:none}body,input{margin:0}tui-root{position:relative;display:block;font:var(--tui-font-text-s);color:var(--tui-text-primary);flex:1;border-image:conic-gradient(var(--tui-background-base) 0 0) fill 0/0/0 0 100vh 0;-webkit-tap-highlight-color:transparent}:root{--tui-inline-start: left;--tui-inline-end: right;--tui-inline: 1}[dir=rtl]{--tui-inline-start: right;--tui-inline-end: left;--tui-inline: -1}tui-root>.t-root-scrollbar{position:fixed;z-index:0;top:0;right:0;bottom:0;left:0}.t-root-content{position:relative;top:var(--t-root-top);block-size:100%;isolation:isolate}.t-root-content>*{--t-root-top: 0}[tuiDropdownButton][tuiDropdownButton]{display:none}\n"] }]
50
+ }, template: "<div class=\"t-root-content\">\n <ng-content />\n</div>\n@if (top()) {\n @if (scrollbars) {\n <tui-scroll-controls class=\"t-root-scrollbar\" />\n }\n <tui-popups>\n <ng-content select=\"tuiOverContent\" />\n </tui-popups>\n}\n", styles: ["@keyframes tuiPresent{to{opacity:.99999}}@keyframes tuiFade{0%{opacity:0}}@keyframes tuiSlide{0%{transform:var(--tui-from, translateY(100%))}}@keyframes tuiScale{0%{transform:scale(var(--tui-scale, 0))}}@keyframes tuiCollapse{0%{grid-template-rows:0fr}to{grid-template-rows:1fr}}.tui-enter,.tui-leave{animation-duration:var(--tui-duration);animation-timing-function:ease-in-out;pointer-events:none}.tui-leave{animation-direction:reverse}\n", ".tui-zero-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.tui-zero-scrollbar::-webkit-scrollbar,.tui-zero-scrollbar::-webkit-scrollbar-thumb{display:none}body,input{margin:0}tui-root{position:relative;display:block;font:var(--tui-font-text-s);color:var(--tui-text-primary);flex:1;border-image:conic-gradient(var(--tui-background-base) 0 0) fill 0/0/0 0 100vh 0;-webkit-tap-highlight-color:transparent}:root{--tui-inline-start: left;--tui-inline-end: right;--tui-inline: 1}[dir=rtl]{--tui-inline-start: right;--tui-inline-end: left;--tui-inline: -1}tui-root>.t-root-scrollbar{position:fixed;z-index:0;inset:0}.t-root-content{position:relative;top:var(--t-root-top);block-size:100%;isolation:isolate}.t-root-content>*{--t-root-top: 0}[tuiDropdownButton][tuiDropdownButton]{display:none}\n"] }]
63
51
  }] });
64
52
 
65
53
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-root.mjs","sources":["../../../projects/core/components/root/root.component.ts","../../../projects/core/components/root/root.template.html","../../../projects/core/components/root/taiga-ui-core-components-root.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {TUI_VERSION} from '@taiga-ui/cdk/constants';\nimport {TuiFontSize} from '@taiga-ui/cdk/directives/font-size';\nimport {TuiPlatform} from '@taiga-ui/cdk/directives/platform';\nimport {TuiVisualViewport} from '@taiga-ui/cdk/directives/visual-viewport';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiAlerts} from '@taiga-ui/core/components/alert';\nimport {TuiDialogs} from '@taiga-ui/core/components/dialog';\nimport {\n TUI_SCROLLBAR_OPTIONS,\n TuiScrollControls,\n} from '@taiga-ui/core/components/scrollbar';\nimport {TuiDropdowns} from '@taiga-ui/core/directives/dropdown';\nimport {TuiHints} from '@taiga-ui/core/directives/hint';\nimport {TuiPopups} from '@taiga-ui/core/directives/popup';\nimport {TuiBreakpointService} from '@taiga-ui/core/services';\nimport {TUI_ANIMATIONS_SPEED, TUI_REDUCED_MOTION} from '@taiga-ui/core/tokens';\nimport {TUI_OPTIONS, tuiGetDuration} from '@taiga-ui/core/utils/miscellaneous';\nimport {map} from 'rxjs';\n\n@Component({\n selector: 'tui-root',\n imports: [\n TuiAlerts,\n TuiDialogs,\n TuiDropdowns,\n TuiHints,\n TuiPopups,\n TuiScrollControls,\n ],\n templateUrl: './root.template.html',\n styleUrls: ['./animations.less', './root.style.less'],\n encapsulation: ViewEncapsulation.None,\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n hostDirectives: [TuiPlatform, TuiVisualViewport, TuiFontSize],\n host: {\n 'data-tui-version': TUI_VERSION,\n '[style.--tui-duration.ms]': 'duration',\n '[style.--tui-scroll-behavior]': 'reducedMotion ? \"auto\" : \"smooth\"',\n '[class._mobile]': 'isMobileRes()',\n // Required for the :active state to work in Safari. https://stackoverflow.com/a/33681490\n '(touchstart.passive.zoneless)': '0',\n '(document:fullscreenchange)': 'top.set(parent)',\n },\n})\nexport class TuiRoot {\n private readonly doc = inject(DOCUMENT);\n private readonly el = tuiInjectElement();\n private readonly child = !!inject(TuiRoot, {optional: true, skipSelf: true});\n\n protected readonly reducedMotion = inject(TUI_REDUCED_MOTION);\n protected readonly duration = tuiGetDuration(inject(TUI_ANIMATIONS_SPEED));\n protected readonly top = signal(this.parent);\n protected readonly isMobileRes = toSignal(\n inject(TuiBreakpointService).pipe(map((breakpoint) => breakpoint === 'mobile')),\n );\n\n protected readonly scrollbars =\n !inject(TUI_IS_MOBILE) &&\n !this.child &&\n inject(TUI_SCROLLBAR_OPTIONS).mode !== 'native' &&\n inject(TUI_OPTIONS).scrollbars !== 'native';\n\n protected get parent(): boolean {\n return this.doc.fullscreenElement === this.el || !this.child;\n }\n}\n","<div class=\"t-root-content\">\n <ng-content />\n</div>\n@if (top()) {\n @if (scrollbars) {\n <tui-scroll-controls class=\"t-root-scrollbar\" />\n }\n <tui-popups />\n <ng-content select=\"tuiOverContent\" />\n <tui-dialogs />\n <ng-content select=\"tuiOverDialogs\" />\n <tui-alerts />\n <ng-content select=\"tuiOverAlerts\" />\n <tui-dropdowns />\n <ng-content select=\"tuiOverDropdowns\" />\n <tui-hints />\n <ng-content select=\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AA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAkBZ,OAAO,EAAA,UAAA,EAAA,CAAA;kBA1BnB,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,UAAU,EACX,OAAA,EAAA;wBACL,SAAS;wBACT,UAAU;wBACV,YAAY;wBACZ,QAAQ;wBACR,SAAS;wBACT,iBAAiB;AACpB,qBAAA,EAAA,aAAA,EAGc,iBAAiB,CAAC,IAAI,EAAA,eAAA,EAEpB,uBAAuB,CAAC,OAAO,EAChC,cAAA,EAAA,CAAC,WAAW,EAAE,iBAAiB,EAAE,WAAW,CAAC,EACvD,IAAA,EAAA;AACF,wBAAA,kBAAkB,EAAE,WAAW;AAC/B,wBAAA,2BAA2B,EAAE,UAAU;AACvC,wBAAA,+BAA+B,EAAE,mCAAmC;AACpE,wBAAA,iBAAiB,EAAE,eAAe;;AAElC,wBAAA,+BAA+B,EAAE,GAAG;AACpC,wBAAA,6BAA6B,EAAE,iBAAiB;AACnD,qBAAA,EAAA,QAAA,EAAA,ufAAA,EAAA,MAAA,EAAA,CAAA,ieAAA,EAAA,kzBAAA,CAAA,EAAA;;;AErDL;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-root.mjs","sources":["../../../projects/core/components/root/root.component.ts","../../../projects/core/components/root/root.template.html","../../../projects/core/components/root/taiga-ui-core-components-root.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {TUI_VERSION} from '@taiga-ui/cdk/constants';\nimport {TuiFontSize} from '@taiga-ui/cdk/directives/font-size';\nimport {TuiPlatform} from '@taiga-ui/cdk/directives/platform';\nimport {TuiVisualViewport} from '@taiga-ui/cdk/directives/visual-viewport';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {\n TUI_SCROLLBAR_OPTIONS,\n TuiScrollControls,\n} from '@taiga-ui/core/components/scrollbar';\nimport {TuiPopups} from '@taiga-ui/core/portals/popup';\nimport {TuiBreakpointService} from '@taiga-ui/core/services';\nimport {TUI_ANIMATIONS_SPEED, TUI_REDUCED_MOTION} from '@taiga-ui/core/tokens';\nimport {TUI_OPTIONS, tuiGetDuration} from '@taiga-ui/core/utils/miscellaneous';\n\n@Component({\n selector: 'tui-root',\n imports: [TuiPopups, TuiScrollControls],\n templateUrl: './root.template.html',\n styleUrls: ['./animations.less', './root.style.less'],\n encapsulation: ViewEncapsulation.None,\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n hostDirectives: [TuiPlatform, TuiVisualViewport, TuiFontSize],\n host: {\n 'data-tui-version': TUI_VERSION,\n '[style.--tui-duration.ms]': 'duration',\n '[style.--tui-scroll-behavior]': 'reducedMotion ? \"auto\" : \"smooth\"',\n '[class._mobile]': 'breakpoint() === \"mobile\"',\n // Required for the :active state to work in Safari. https://stackoverflow.com/a/33681490\n '(touchstart.passive.zoneless)': '0',\n '(document:fullscreenchange)': 'top.set(parent)',\n },\n})\nexport class TuiRoot {\n private readonly doc = inject(DOCUMENT);\n private readonly el = tuiInjectElement();\n private readonly child = !!inject(TuiRoot, {optional: true, skipSelf: true});\n\n protected readonly reducedMotion = inject(TUI_REDUCED_MOTION);\n protected readonly duration = tuiGetDuration(inject(TUI_ANIMATIONS_SPEED));\n protected readonly top = signal(this.parent);\n protected readonly breakpoint = toSignal(inject(TuiBreakpointService));\n protected readonly scrollbars =\n !inject(TUI_IS_MOBILE) &&\n !this.child &&\n inject(TUI_SCROLLBAR_OPTIONS).mode !== 'native' &&\n inject(TUI_OPTIONS).scrollbars !== 'native';\n\n protected get parent(): boolean {\n return this.doc.fullscreenElement === this.el || !this.child;\n }\n}\n","<div class=\"t-root-content\">\n <ng-content />\n</div>\n@if (top()) {\n @if (scrollbars) {\n <tui-scroll-controls class=\"t-root-scrollbar\" />\n }\n <tui-popups>\n <ng-content select=\"tuiOverContent\" />\n </tui-popups>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;MA2Ca,OAAO,CAAA;AAnBpB,IAAA,WAAA,GAAA;AAoBqB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;QACtB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;AAEzD,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,kBAAkB,CAAC;QAC1C,IAAQ,CAAA,QAAA,GAAG,cAAc,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;AACvD,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;QACzB,IAAU,CAAA,UAAA,GAAG,QAAQ,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;AACnD,QAAA,IAAA,CAAA,UAAU,GACzB,CAAC,MAAM,CAAC,aAAa,CAAC;YACtB,CAAC,IAAI,CAAC,KAAK;AACX,YAAA,MAAM,CAAC,qBAAqB,CAAC,CAAC,IAAI,KAAK,QAAQ;AAC/C,YAAA,MAAM,CAAC,WAAW,CAAC,CAAC,UAAU,KAAK,QAAQ;AAKlD;AAHG,IAAA,IAAc,MAAM,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,iBAAiB,KAAK,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK;;+GAhBvD,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,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IAAA,EAAA;AACF,wBAAA,kBAAkB,EAAE,WAAW;AAC/B,wBAAA,2BAA2B,EAAE,UAAU;AACvC,wBAAA,+BAA+B,EAAE,mCAAmC;AACpE,wBAAA,iBAAiB,EAAE,2BAA2B;;AAE9C,wBAAA,+BAA+B,EAAE,GAAG;AACpC,wBAAA,6BAA6B,EAAE,iBAAiB;AACnD,qBAAA,EAAA,QAAA,EAAA,kQAAA,EAAA,MAAA,EAAA,CAAA,ybAAA,EAAA,4xBAAA,CAAA,EAAA;;;AEzCL;;AAEG;;;;"}
@@ -1,16 +1,30 @@
1
- import { AsyncPipe } from '@angular/common';
1
+ import { DOCUMENT, AsyncPipe } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, Injectable, Input, Directive, ChangeDetectionStrategy, Component, ElementRef, DestroyRef } from '@angular/core';
3
+ import { InjectionToken, ElementRef, inject, Directive, Injectable, input, ChangeDetectionStrategy, Component, DestroyRef, effect } from '@angular/core';
4
4
  import { WA_ANIMATION_FRAME } from '@ng-web-apis/common';
5
5
  import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
6
6
  import { tuiTypedFromEvent, tuiZonefree, tuiZonefreeScheduler, tuiScrollFrom, tuiZoneOptimized } from '@taiga-ui/cdk/observables';
7
- import { TUI_SCROLL_REF } from '@taiga-ui/core/tokens';
8
7
  import { Observable, merge, filter, map, switchMap, takeUntil, throttleTime, startWith, distinctUntilChanged, timer } from 'rxjs';
8
+ import { tuiProvide, tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
9
9
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
10
10
  import { tuiInjectElement, tuiGetElementOffset } from '@taiga-ui/cdk/utils/dom';
11
- import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
12
11
  import { TUI_IS_IOS } from '@taiga-ui/cdk/tokens';
13
- import { tuiProvide } from '@taiga-ui/cdk/utils/miscellaneous';
12
+
13
+ const SCROLL_REF_SELECTOR = '[tuiScrollRef]';
14
+ const TUI_SCROLL_REF = new InjectionToken(ngDevMode ? 'TUI_SCROLL_REF' : '', {
15
+ factory: () => new ElementRef(inject(DOCUMENT).documentElement),
16
+ });
17
+ class TuiScrollRef {
18
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiScrollRef, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
19
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiScrollRef, isStandalone: true, selector: "[tuiScrollRef]", providers: [tuiProvide(TUI_SCROLL_REF, ElementRef)], ngImport: i0 }); }
20
+ }
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiScrollRef, decorators: [{
22
+ type: Directive,
23
+ args: [{
24
+ selector: '[tuiScrollRef]',
25
+ providers: [tuiProvide(TUI_SCROLL_REF, ElementRef)],
26
+ }]
27
+ }] });
14
28
 
15
29
  class TuiScrollbarService extends Observable {
16
30
  constructor() {
@@ -38,10 +52,10 @@ class TuiScrollbarService extends Observable {
38
52
  (width - offsetWidth);
39
53
  return [maxTop * scrolledTop, maxLeft * scrolledLeft];
40
54
  }
41
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiScrollbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
42
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiScrollbarService }); }
55
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiScrollbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
56
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiScrollbarService }); }
43
57
  }
44
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiScrollbarService, decorators: [{
58
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiScrollbarService, decorators: [{
45
59
  type: Injectable
46
60
  }], ctorParameters: () => [] });
47
61
  function getOffsetVertical({ clientY }, { top, height }) {
@@ -60,7 +74,7 @@ class TuiScrollbarDirective {
60
74
  .pipe(takeUntilDestroyed())
61
75
  .subscribe(([top, left]) => {
62
76
  this.el.style.scrollBehavior = 'auto';
63
- if (this.tuiScrollbar === 'horizontal') {
77
+ if (this.tuiScrollbar() === 'horizontal') {
64
78
  this.el.scrollLeft = left;
65
79
  }
66
80
  else {
@@ -81,7 +95,7 @@ class TuiScrollbarDirective {
81
95
  };
82
96
  const thumb = `${this.getThumb(dimension) * 100}%`;
83
97
  const view = `${this.getView(dimension) * 100}%`;
84
- if (this.tuiScrollbar === 'vertical') {
98
+ if (this.tuiScrollbar() === 'vertical') {
85
99
  this.style.top = thumb;
86
100
  this.style.height = view;
87
101
  }
@@ -91,23 +105,23 @@ class TuiScrollbarDirective {
91
105
  this.style.width = view;
92
106
  }
93
107
  });
94
- this.tuiScrollbar = 'vertical';
108
+ this.tuiScrollbar = input('vertical');
95
109
  }
96
110
  getScrolled(dimension) {
97
- return this.tuiScrollbar === 'vertical'
111
+ return this.tuiScrollbar() === 'vertical'
98
112
  ? dimension.scrollTop / (dimension.scrollHeight - dimension.clientHeight)
99
113
  : dimension.scrollLeft / (dimension.scrollWidth - dimension.clientWidth);
100
114
  }
101
115
  getCompensation(dimension) {
102
116
  if (((dimension.clientHeight * dimension.clientHeight) / dimension.scrollHeight >
103
117
  MIN_WIDTH &&
104
- this.tuiScrollbar === 'vertical') ||
118
+ this.tuiScrollbar() === 'vertical') ||
105
119
  ((dimension.clientWidth * dimension.clientWidth) / dimension.scrollWidth >
106
120
  MIN_WIDTH &&
107
- this.tuiScrollbar === 'horizontal')) {
121
+ this.tuiScrollbar() === 'horizontal')) {
108
122
  return 0;
109
123
  }
110
- return this.tuiScrollbar === 'vertical'
124
+ return this.tuiScrollbar() === 'vertical'
111
125
  ? MIN_WIDTH / dimension.clientHeight
112
126
  : MIN_WIDTH / dimension.clientWidth;
113
127
  }
@@ -116,23 +130,20 @@ class TuiScrollbarDirective {
116
130
  return Math.abs(this.getScrolled(dimension) * (1 - compensation));
117
131
  }
118
132
  getView(dimension) {
119
- return this.tuiScrollbar === 'vertical'
133
+ return this.tuiScrollbar() === 'vertical'
120
134
  ? Math.ceil((dimension.clientHeight / dimension.scrollHeight) * 100) / 100
121
135
  : Math.ceil((dimension.clientWidth / dimension.scrollWidth) * 100) / 100;
122
136
  }
123
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiScrollbarDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
124
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiScrollbarDirective, isStandalone: true, selector: "[tuiScrollbar]", inputs: { tuiScrollbar: "tuiScrollbar" }, providers: [TuiScrollbarService], ngImport: i0 }); }
137
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiScrollbarDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
138
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiScrollbarDirective, isStandalone: true, selector: "[tuiScrollbar]", inputs: { tuiScrollbar: { classPropertyName: "tuiScrollbar", publicName: "tuiScrollbar", isSignal: true, isRequired: false, transformFunction: null } }, providers: [TuiScrollbarService], ngImport: i0 }); }
125
139
  }
126
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiScrollbarDirective, decorators: [{
140
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiScrollbarDirective, decorators: [{
127
141
  type: Directive,
128
142
  args: [{
129
- standalone: true,
130
143
  selector: '[tuiScrollbar]',
131
144
  providers: [TuiScrollbarService],
132
145
  }]
133
- }], propDecorators: { tuiScrollbar: [{
134
- type: Input
135
- }] } });
146
+ }] });
136
147
 
137
148
  const TUI_DEFAULT_SCROLLBAR_OPTIONS = {
138
149
  mode: 'always',
@@ -152,10 +163,10 @@ class TuiScrollControls {
152
163
  Math.ceil((clientWidth / scrollWidth) * 100) < 100,
153
164
  ];
154
165
  }
155
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiScrollControls, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
156
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiScrollControls, isStandalone: true, selector: "tui-scroll-controls", ngImport: i0, template: "@if (nativeScrollbar) {\n} @else {\n @if (refresh$ | async; as bars) {\n @if (bars[0]) {\n <div\n tuiAnimated\n class=\"t-bar t-bar_vertical\"\n [class.t-bar_has-horizontal]=\"bars[1]\"\n (mousedown.capture.prevent)=\"(0)\"\n >\n <div\n tuiScrollbar=\"vertical\"\n class=\"t-thumb\"\n ></div>\n </div>\n }\n @if (bars[1]) {\n <div\n tuiAnimated\n class=\"t-bar t-bar_horizontal\"\n [class.t-bar_has-vertical]=\"bars[0]\"\n (mousedown.capture.prevent)=\"(0)\"\n >\n <div\n tuiScrollbar=\"horizontal\"\n class=\"t-thumb\"\n ></div>\n </div>\n }\n }\n}\n", styles: [":host{position:sticky;top:0;left:0;z-index:1;inset-inline-start:0;min-inline-size:calc(100% - 1px);min-block-size:calc(100% - 1px);max-inline-size:calc(100% - 1px);max-block-size:calc(100% - 1px);margin-inline-end:calc(-100% + 1px);pointer-events:none;overflow:hidden;color:var(--tui-text-primary)}::ng-deep [tuiScrollable]{scrollbar-width:none;-ms-overflow-style:none}::ng-deep [tuiScrollable]::-webkit-scrollbar,::ng-deep [tuiScrollable]::-webkit-scrollbar-thumb{display:none}.t-bar{position:absolute;right:0;pointer-events:auto}.t-bar.tui-enter,.t-bar.tui-leave{animation-name:tuiFade}.t-bar_vertical{top:.25rem;bottom:.25rem;inline-size:.875rem}@supports (inset-inline-end: 0){.t-bar_vertical{right:unset;inset-inline-end:0}}.t-bar_horizontal{bottom:0;left:0;inset-inline-start:0;block-size:.875rem}.t-bar_has-horizontal{bottom:.5rem}.t-bar_has-vertical{right:.5rem}.t-thumb{transition-property:all;transition-duration:.15s;transition-timing-function:ease-in-out;position:absolute;border-radius:6.25rem;border:.25rem solid transparent;cursor:pointer;pointer-events:auto;-webkit-user-select:none;user-select:none;background:currentColor;background-clip:content-box;box-sizing:border-box;transition-property:width,height,opacity;opacity:.2}.t-thumb:hover{opacity:.24}.t-thumb:active{opacity:.48}.t-bar_vertical .t-thumb{right:0;inset-inline-end:0;inline-size:.75rem;min-block-size:1.25rem}.t-bar_vertical:hover .t-thumb,.t-bar_vertical .t-thumb:active{inline-size:.875rem}.t-bar_horizontal .t-thumb{bottom:0;block-size:.75rem;min-inline-size:1.25rem}.t-bar_horizontal:hover .t-thumb,.t-bar_horizontal .t-thumb:active{block-size:.875rem}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: TuiAnimated, selector: "[tuiAnimated]" }, { kind: "directive", type: TuiScrollbarDirective, selector: "[tuiScrollbar]", inputs: ["tuiScrollbar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
166
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiScrollControls, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
167
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiScrollControls, isStandalone: true, selector: "tui-scroll-controls", ngImport: i0, template: "@if (nativeScrollbar) {\n} @else {\n @if (refresh$ | async; as bars) {\n @if (bars[0]) {\n <div\n tuiAnimated\n class=\"t-bar t-bar_vertical\"\n [class.t-bar_has-horizontal]=\"bars[1]\"\n (mousedown.capture.prevent)=\"(0)\"\n >\n <div\n tuiScrollbar=\"vertical\"\n class=\"t-thumb\"\n ></div>\n </div>\n }\n @if (bars[1]) {\n <div\n tuiAnimated\n class=\"t-bar t-bar_horizontal\"\n [class.t-bar_has-vertical]=\"bars[0]\"\n (mousedown.capture.prevent)=\"(0)\"\n >\n <div\n tuiScrollbar=\"horizontal\"\n class=\"t-thumb\"\n ></div>\n </div>\n }\n }\n}\n", styles: [":host{position:sticky;top:0;left:0;z-index:1;inset-inline-start:0;min-inline-size:calc(100% - 1px);min-block-size:calc(100% - 1px);max-inline-size:calc(100% - 1px);max-block-size:calc(100% - 1px);margin-inline-end:calc(-100% + 1px);pointer-events:none;overflow:hidden;color:var(--tui-text-primary)}::ng-deep [tuiScrollable]{scrollbar-width:none;-ms-overflow-style:none}::ng-deep [tuiScrollable]::-webkit-scrollbar,::ng-deep [tuiScrollable]::-webkit-scrollbar-thumb{display:none}.t-bar{position:absolute;right:0;pointer-events:auto}.t-bar.tui-enter,.t-bar.tui-leave{animation-name:tuiFade}.t-bar_vertical{top:.25rem;bottom:.25rem;inline-size:.875rem}@supports (inset-inline-end: 0){.t-bar_vertical{right:unset;inset-inline-end:0}}.t-bar_horizontal{bottom:0;left:0;inset-inline-start:0;block-size:.875rem}.t-bar_has-horizontal{bottom:.5rem}.t-bar_has-vertical{right:.5rem}.t-thumb{transition-property:all;transition-duration:.15s;transition-timing-function:ease-in-out;position:absolute;border-radius:6.25rem;border:.25rem solid transparent;cursor:pointer;pointer-events:auto;-webkit-user-select:none;user-select:none;background:currentColor;background-clip:content-box;box-sizing:border-box;transition-property:width,height,opacity;opacity:.2}.t-thumb:hover{opacity:.24}.t-thumb:active{opacity:.48}.t-bar_vertical .t-thumb{right:0;inset-inline-end:0;inline-size:.75rem;min-block-size:1.25rem}.t-bar_vertical:hover .t-thumb,.t-bar_vertical .t-thumb:active{inline-size:.875rem}.t-bar_horizontal .t-thumb{bottom:0;block-size:.75rem;min-inline-size:1.25rem}.t-bar_horizontal:hover .t-thumb,.t-bar_horizontal .t-thumb:active{block-size:.875rem}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: TuiAnimated, selector: "[tuiAnimated]" }, { kind: "directive", type: TuiScrollbarDirective, selector: "[tuiScrollbar]", inputs: ["tuiScrollbar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
157
168
  }
158
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiScrollControls, decorators: [{
169
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiScrollControls, decorators: [{
159
170
  type: Component,
160
171
  args: [{ selector: 'tui-scroll-controls', imports: [AsyncPipe, TuiAnimated, TuiScrollbarDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (nativeScrollbar) {\n} @else {\n @if (refresh$ | async; as bars) {\n @if (bars[0]) {\n <div\n tuiAnimated\n class=\"t-bar t-bar_vertical\"\n [class.t-bar_has-horizontal]=\"bars[1]\"\n (mousedown.capture.prevent)=\"(0)\"\n >\n <div\n tuiScrollbar=\"vertical\"\n class=\"t-thumb\"\n ></div>\n </div>\n }\n @if (bars[1]) {\n <div\n tuiAnimated\n class=\"t-bar t-bar_horizontal\"\n [class.t-bar_has-vertical]=\"bars[0]\"\n (mousedown.capture.prevent)=\"(0)\"\n >\n <div\n tuiScrollbar=\"horizontal\"\n class=\"t-thumb\"\n ></div>\n </div>\n }\n }\n}\n", styles: [":host{position:sticky;top:0;left:0;z-index:1;inset-inline-start:0;min-inline-size:calc(100% - 1px);min-block-size:calc(100% - 1px);max-inline-size:calc(100% - 1px);max-block-size:calc(100% - 1px);margin-inline-end:calc(-100% + 1px);pointer-events:none;overflow:hidden;color:var(--tui-text-primary)}::ng-deep [tuiScrollable]{scrollbar-width:none;-ms-overflow-style:none}::ng-deep [tuiScrollable]::-webkit-scrollbar,::ng-deep [tuiScrollable]::-webkit-scrollbar-thumb{display:none}.t-bar{position:absolute;right:0;pointer-events:auto}.t-bar.tui-enter,.t-bar.tui-leave{animation-name:tuiFade}.t-bar_vertical{top:.25rem;bottom:.25rem;inline-size:.875rem}@supports (inset-inline-end: 0){.t-bar_vertical{right:unset;inset-inline-end:0}}.t-bar_horizontal{bottom:0;left:0;inset-inline-start:0;block-size:.875rem}.t-bar_has-horizontal{bottom:.5rem}.t-bar_has-vertical{right:.5rem}.t-thumb{transition-property:all;transition-duration:.15s;transition-timing-function:ease-in-out;position:absolute;border-radius:6.25rem;border:.25rem solid transparent;cursor:pointer;pointer-events:auto;-webkit-user-select:none;user-select:none;background:currentColor;background-clip:content-box;box-sizing:border-box;transition-property:width,height,opacity;opacity:.2}.t-thumb:hover{opacity:.24}.t-thumb:active{opacity:.48}.t-bar_vertical .t-thumb{right:0;inset-inline-end:0;inline-size:.75rem;min-block-size:1.25rem}.t-bar_vertical:hover .t-thumb,.t-bar_vertical .t-thumb:active{inline-size:.875rem}.t-bar_horizontal .t-thumb{bottom:0;block-size:.75rem;min-inline-size:1.25rem}.t-bar_horizontal:hover .t-thumb,.t-bar_horizontal .t-thumb:active{block-size:.875rem}\n"] }]
161
172
  }] });
@@ -175,10 +186,6 @@ class TuiScrollbar {
175
186
  this.options = inject(TUI_SCROLLBAR_OPTIONS);
176
187
  this.isIOS = inject(TUI_IS_IOS);
177
188
  this.browserScrollRef = new ElementRef(this.el);
178
- /**
179
- * @deprecated: use tuiScrollbarOptionsProvider({ mode: 'hidden' })
180
- */
181
- this.hidden = this.options.mode === 'hidden';
182
189
  }
183
190
  get delegated() {
184
191
  return this.scrollRef !== this.el || this.options.mode === 'native';
@@ -199,15 +206,15 @@ class TuiScrollbar {
199
206
  const scrollLeft = offsetLeft + offsetWidth / 2 - this.scrollRef.clientWidth / 2;
200
207
  this.scrollRef.scrollTo?.(scrollLeft, scrollTop);
201
208
  }
202
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiScrollbar, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
203
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiScrollbar, isStandalone: true, selector: "tui-scrollbar", inputs: { hidden: "hidden" }, host: { listeners: { "tui-scrollable.stop": "scrollRef = $event.detail", "tui-scroll-into-view.stop": "scrollIntoView($event.detail)" }, properties: { "class._native-hidden": "options.mode !== \"native\" && (!isIOS || hidden)" } }, providers: [
209
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiScrollbar, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
210
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiScrollbar, isStandalone: true, selector: "tui-scrollbar", host: { listeners: { "tui-scrollable.stop": "scrollRef = $event.detail", "tui-scroll-into-view.stop": "scrollIntoView($event.detail)" }, properties: { "class._native-hidden": "options.mode !== \"native\" && (!isIOS || options.mode === \"hidden\")" } }, providers: [
204
211
  {
205
212
  provide: TUI_SCROLL_REF,
206
213
  useFactory: () => inject(TuiScrollbar).browserScrollRef,
207
214
  },
208
- ], ngImport: i0, template: "@if (!hidden && !isIOS && options.mode !== 'native') {\n <tui-scroll-controls\n class=\"t-bars\"\n [class.t-hover-mode]=\"options.mode === 'hover'\"\n />\n}\n<div\n class=\"t-content\"\n [class.t-content_delegated]=\"delegated\"\n>\n <ng-content />\n</div>\n", styles: [":host{position:relative;display:flex;max-block-size:100%;isolation:isolate;overflow:auto}:host._native-hidden{scrollbar-width:none;-ms-overflow-style:none}:host._native-hidden::-webkit-scrollbar,:host._native-hidden::-webkit-scrollbar-thumb{display:none}:host .t-hover-mode:not(:active){transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:0}:host:hover .t-hover-mode{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:1}.t-content{isolation:isolate;flex:1;flex-basis:auto;inline-size:100%;block-size:max-content}.t-content_delegated{block-size:100%}.t-bars{color:var(--tui-text-primary)}\n"], dependencies: [{ kind: "component", type: TuiScrollControls, selector: "tui-scroll-controls" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
215
+ ], ngImport: i0, template: "@if (!isIOS && options.mode !== 'native' && options.mode !== 'hidden') {\n <tui-scroll-controls\n class=\"t-bars\"\n [class.t-hover-mode]=\"options.mode === 'hover'\"\n />\n}\n<div\n class=\"t-content\"\n [class.t-content_delegated]=\"delegated\"\n>\n <ng-content />\n</div>\n", styles: [":host{position:relative;display:flex;max-block-size:100%;isolation:isolate;overflow:auto}:host._native-hidden{scrollbar-width:none;-ms-overflow-style:none}:host._native-hidden::-webkit-scrollbar,:host._native-hidden::-webkit-scrollbar-thumb{display:none}:host .t-hover-mode:not(:active){transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:0}:host:hover .t-hover-mode{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:1}.t-content{isolation:isolate;flex:1;flex-basis:auto;inline-size:100%;block-size:max-content}.t-content_delegated{block-size:100%}.t-bars{color:var(--tui-text-primary)}\n"], dependencies: [{ kind: "component", type: TuiScrollControls, selector: "tui-scroll-controls" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
209
216
  }
210
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiScrollbar, decorators: [{
217
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiScrollbar, decorators: [{
211
218
  type: Component,
212
219
  args: [{ selector: 'tui-scrollbar', imports: [TuiScrollControls], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
213
220
  {
@@ -215,13 +222,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
215
222
  useFactory: () => inject(TuiScrollbar).browserScrollRef,
216
223
  },
217
224
  ], host: {
218
- '[class._native-hidden]': 'options.mode !== "native" && (!isIOS || hidden)',
225
+ '[class._native-hidden]': 'options.mode !== "native" && (!isIOS || options.mode === "hidden")',
219
226
  [`(${TUI_SCROLLABLE}.stop)`]: 'scrollRef = $event.detail',
220
227
  [`(${TUI_SCROLL_INTO_VIEW}.stop)`]: 'scrollIntoView($event.detail)',
221
- }, template: "@if (!hidden && !isIOS && options.mode !== 'native') {\n <tui-scroll-controls\n class=\"t-bars\"\n [class.t-hover-mode]=\"options.mode === 'hover'\"\n />\n}\n<div\n class=\"t-content\"\n [class.t-content_delegated]=\"delegated\"\n>\n <ng-content />\n</div>\n", styles: [":host{position:relative;display:flex;max-block-size:100%;isolation:isolate;overflow:auto}:host._native-hidden{scrollbar-width:none;-ms-overflow-style:none}:host._native-hidden::-webkit-scrollbar,:host._native-hidden::-webkit-scrollbar-thumb{display:none}:host .t-hover-mode:not(:active){transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:0}:host:hover .t-hover-mode{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:1}.t-content{isolation:isolate;flex:1;flex-basis:auto;inline-size:100%;block-size:max-content}.t-content_delegated{block-size:100%}.t-bars{color:var(--tui-text-primary)}\n"] }]
222
- }], propDecorators: { hidden: [{
223
- type: Input
224
- }] } });
228
+ }, template: "@if (!isIOS && options.mode !== 'native' && options.mode !== 'hidden') {\n <tui-scroll-controls\n class=\"t-bars\"\n [class.t-hover-mode]=\"options.mode === 'hover'\"\n />\n}\n<div\n class=\"t-content\"\n [class.t-content_delegated]=\"delegated\"\n>\n <ng-content />\n</div>\n", styles: [":host{position:relative;display:flex;max-block-size:100%;isolation:isolate;overflow:auto}:host._native-hidden{scrollbar-width:none;-ms-overflow-style:none}:host._native-hidden::-webkit-scrollbar,:host._native-hidden::-webkit-scrollbar-thumb{display:none}:host .t-hover-mode:not(:active){transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:0}:host:hover .t-hover-mode{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:1}.t-content{isolation:isolate;flex:1;flex-basis:auto;inline-size:100%;block-size:max-content}.t-content_delegated{block-size:100%}.t-bars{color:var(--tui-text-primary)}\n"] }]
229
+ }] });
225
230
 
226
231
  /**
227
232
  * Directive scrolls element into view inside tui-scrollbar
@@ -230,47 +235,32 @@ class TuiScrollIntoView {
230
235
  constructor() {
231
236
  this.el = tuiInjectElement();
232
237
  this.destroyRef = inject(DestroyRef);
233
- }
234
- set tuiScrollIntoView(scroll) {
235
- if (!scroll) {
236
- return;
237
- }
238
- // Timeout is necessary in order to give element render cycle to get into its final spot
239
- // (for example if it is inside dropdown box which has to be positioned first)
240
- timer(0)
241
- .pipe(takeUntilDestroyed(this.destroyRef))
242
- .subscribe(() => {
243
- this.el.dispatchEvent(new CustomEvent(TUI_SCROLL_INTO_VIEW, {
244
- bubbles: true,
245
- detail: this.el,
246
- }));
238
+ this.tuiScrollIntoView = input();
239
+ this.dispatchEvent = effect(() => {
240
+ const scroll = this.tuiScrollIntoView();
241
+ if (!scroll) {
242
+ return;
243
+ }
244
+ // Timeout is necessary in order to give element render cycle to get into its final spot
245
+ // (for example if it is inside dropdown box which has to be positioned first)
246
+ timer(0)
247
+ .pipe(takeUntilDestroyed(this.destroyRef))
248
+ .subscribe(() => {
249
+ this.el.dispatchEvent(new CustomEvent(TUI_SCROLL_INTO_VIEW, {
250
+ bubbles: true,
251
+ detail: this.el,
252
+ }));
253
+ });
247
254
  });
248
255
  }
249
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiScrollIntoView, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
250
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiScrollIntoView, isStandalone: true, selector: "[tuiScrollIntoView]", inputs: { tuiScrollIntoView: "tuiScrollIntoView" }, ngImport: i0 }); }
256
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiScrollIntoView, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
257
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiScrollIntoView, isStandalone: true, selector: "[tuiScrollIntoView]", inputs: { tuiScrollIntoView: { classPropertyName: "tuiScrollIntoView", publicName: "tuiScrollIntoView", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
251
258
  }
252
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiScrollIntoView, decorators: [{
259
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiScrollIntoView, decorators: [{
253
260
  type: Directive,
254
261
  args: [{
255
- standalone: true,
256
262
  selector: '[tuiScrollIntoView]',
257
263
  }]
258
- }], propDecorators: { tuiScrollIntoView: [{
259
- type: Input
260
- }] } });
261
-
262
- const SCROLL_REF_SELECTOR = '[tuiScrollRef]';
263
- class TuiScrollRef {
264
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiScrollRef, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
265
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiScrollRef, isStandalone: true, selector: "[tuiScrollRef]", providers: [tuiProvide(TUI_SCROLL_REF, ElementRef)], ngImport: i0 }); }
266
- }
267
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiScrollRef, decorators: [{
268
- type: Directive,
269
- args: [{
270
- standalone: true,
271
- selector: '[tuiScrollRef]',
272
- providers: [tuiProvide(TUI_SCROLL_REF, ElementRef)],
273
- }]
274
264
  }] });
275
265
 
276
266
  class TuiScrollable {
@@ -278,18 +268,14 @@ class TuiScrollable {
278
268
  this.el = tuiInjectElement();
279
269
  }
280
270
  ngOnInit() {
281
- this.el.dispatchEvent(new CustomEvent(TUI_SCROLLABLE, {
282
- bubbles: true,
283
- detail: this.el,
284
- }));
271
+ this.el.dispatchEvent(new CustomEvent(TUI_SCROLLABLE, { bubbles: true, detail: this.el }));
285
272
  }
286
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiScrollable, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
287
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiScrollable, isStandalone: true, selector: "[tuiScrollable]", ngImport: i0 }); }
273
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiScrollable, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
274
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiScrollable, isStandalone: true, selector: "[tuiScrollable]", ngImport: i0 }); }
288
275
  }
289
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiScrollable, decorators: [{
276
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiScrollable, decorators: [{
290
277
  type: Directive,
291
278
  args: [{
292
- standalone: true,
293
279
  selector: '[tuiScrollable]',
294
280
  }]
295
281
  }] });
@@ -298,5 +284,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
298
284
  * Generated bundle index. Do not edit.
299
285
  */
300
286
 
301
- export { SCROLL_REF_SELECTOR, TUI_DEFAULT_SCROLLBAR_OPTIONS, TUI_SCROLLABLE, TUI_SCROLLBAR_OPTIONS, TUI_SCROLL_INTO_VIEW, TuiScrollControls, TuiScrollIntoView, TuiScrollRef, TuiScrollable, TuiScrollbar, TuiScrollbarDirective, TuiScrollbarService, tuiScrollbarOptionsProvider };
287
+ export { SCROLL_REF_SELECTOR, TUI_DEFAULT_SCROLLBAR_OPTIONS, TUI_SCROLLABLE, TUI_SCROLLBAR_OPTIONS, TUI_SCROLL_INTO_VIEW, TUI_SCROLL_REF, TuiScrollControls, TuiScrollIntoView, TuiScrollRef, TuiScrollable, TuiScrollbar, TuiScrollbarDirective, TuiScrollbarService, tuiScrollbarOptionsProvider };
302
288
  //# sourceMappingURL=taiga-ui-core-components-scrollbar.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-scrollbar.mjs","sources":["../../../projects/core/components/scrollbar/scrollbar.service.ts","../../../projects/core/components/scrollbar/scrollbar.directive.ts","../../../projects/core/components/scrollbar/scrollbar.options.ts","../../../projects/core/components/scrollbar/scroll-controls.component.ts","../../../projects/core/components/scrollbar/scroll-controls.template.html","../../../projects/core/components/scrollbar/scrollbar.component.ts","../../../projects/core/components/scrollbar/scrollbar.template.html","../../../projects/core/components/scrollbar/scroll-into-view.directive.ts","../../../projects/core/components/scrollbar/scroll-ref.directive.ts","../../../projects/core/components/scrollbar/scrollable.directive.ts","../../../projects/core/components/scrollbar/taiga-ui-core-components-scrollbar.ts"],"sourcesContent":["import {inject, Injectable} from '@angular/core';\nimport {tuiTypedFromEvent, tuiZonefree} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\nimport {filter, map, merge, Observable, switchMap, takeUntil} from 'rxjs';\n\n@Injectable()\nexport class TuiScrollbarService extends Observable<[number, number]> {\n private readonly el = tuiInjectElement();\n private readonly element = inject(TUI_SCROLL_REF).nativeElement;\n private readonly scroll$ = merge(\n tuiTypedFromEvent(this.el.parentElement!, 'mousedown').pipe(\n filter(({target}) => target !== this.el),\n map((event) => this.getScrolled(event, 0.5, 0.5)),\n ),\n tuiTypedFromEvent(this.el, 'mousedown').pipe(\n tuiZonefree(),\n switchMap((event) => {\n const {ownerDocument} = this.el;\n const rect = this.el.getBoundingClientRect();\n const vertical = getOffsetVertical(event, rect);\n const horizontal = getOffsetHorizontal(event, rect);\n\n return tuiTypedFromEvent(ownerDocument, 'mousemove').pipe(\n map((event) => this.getScrolled(event, vertical, horizontal)),\n takeUntil(tuiTypedFromEvent(ownerDocument, 'mouseup')),\n );\n }),\n ),\n );\n\n constructor() {\n super((subscriber) => this.scroll$.subscribe(subscriber));\n }\n\n private getScrolled(\n {clientY, clientX}: MouseEvent,\n offsetY: number,\n offsetX: number,\n ): [number, number] {\n const {offsetHeight, offsetWidth} = this.el;\n const {top, left, right, width, height} =\n this.el.parentElement!.getBoundingClientRect();\n const rtl = this.el.matches('[dir=\"rtl\"] :scope');\n const inline = rtl ? right : left;\n const multiplier = rtl ? -1 : 1;\n const maxTop = this.element.scrollHeight - height;\n const maxLeft = this.element.scrollWidth - width;\n const scrolledTop =\n (clientY - top - offsetHeight * offsetY) / (height - offsetHeight);\n const scrolledLeft =\n (clientX - inline - offsetWidth * offsetX * multiplier) /\n (width - offsetWidth);\n\n return [maxTop * scrolledTop, maxLeft * scrolledLeft];\n }\n}\n\nfunction getOffsetVertical({clientY}: MouseEvent, {top, height}: DOMRect): number {\n return (clientY - top) / height;\n}\n\nfunction getOffsetHorizontal({clientX}: MouseEvent, {left, width}: DOMRect): number {\n return (clientX - left) / width;\n}\n","import {Directive, inject, Input} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {WA_ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {\n tuiScrollFrom,\n tuiZonefree,\n tuiZonefreeScheduler,\n} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\nimport {merge, throttleTime} from 'rxjs';\n\nimport {TuiScrollbarService} from './scrollbar.service';\n\nconst MIN_WIDTH = 24;\n\ninterface ComputedDimension {\n scrollTop: number;\n scrollHeight: number;\n clientHeight: number;\n scrollLeft: number;\n scrollWidth: number;\n clientWidth: number;\n}\n\n@Directive({\n standalone: true,\n selector: '[tuiScrollbar]',\n providers: [TuiScrollbarService],\n})\nexport class TuiScrollbarDirective {\n private readonly el = inject(TUI_SCROLL_REF).nativeElement;\n private readonly style = tuiInjectElement().style;\n\n protected readonly scrollSub = inject(TuiScrollbarService)\n .pipe(takeUntilDestroyed())\n .subscribe(([top, left]) => {\n this.el.style.scrollBehavior = 'auto';\n\n if (this.tuiScrollbar === 'horizontal') {\n this.el.scrollLeft = left;\n } else {\n this.el.scrollTop = top;\n }\n\n this.el.style.scrollBehavior = '';\n });\n\n protected readonly styleSub = merge(\n inject(WA_ANIMATION_FRAME).pipe(throttleTime(100, tuiZonefreeScheduler())),\n tuiScrollFrom(this.el),\n )\n .pipe(tuiZonefree(), takeUntilDestroyed())\n .subscribe(() => {\n const dimension: ComputedDimension = {\n scrollTop: this.el.scrollTop,\n scrollHeight: this.el.scrollHeight,\n clientHeight: this.el.clientHeight,\n scrollLeft: this.el.scrollLeft,\n scrollWidth: this.el.scrollWidth,\n clientWidth: this.el.clientWidth,\n };\n\n const thumb = `${this.getThumb(dimension) * 100}%`;\n const view = `${this.getView(dimension) * 100}%`;\n\n if (this.tuiScrollbar === 'vertical') {\n this.style.top = thumb;\n this.style.height = view;\n } else {\n this.style.left = thumb;\n this.style.insetInlineStart = thumb;\n this.style.width = view;\n }\n });\n\n @Input()\n public tuiScrollbar: 'horizontal' | 'vertical' = 'vertical';\n\n private getScrolled(dimension: ComputedDimension): number {\n return this.tuiScrollbar === 'vertical'\n ? dimension.scrollTop / (dimension.scrollHeight - dimension.clientHeight)\n : dimension.scrollLeft / (dimension.scrollWidth - dimension.clientWidth);\n }\n\n private getCompensation(dimension: ComputedDimension): number {\n if (\n ((dimension.clientHeight * dimension.clientHeight) / dimension.scrollHeight >\n MIN_WIDTH &&\n this.tuiScrollbar === 'vertical') ||\n ((dimension.clientWidth * dimension.clientWidth) / dimension.scrollWidth >\n MIN_WIDTH &&\n this.tuiScrollbar === 'horizontal')\n ) {\n return 0;\n }\n\n return this.tuiScrollbar === 'vertical'\n ? MIN_WIDTH / dimension.clientHeight\n : MIN_WIDTH / dimension.clientWidth;\n }\n\n private getThumb(dimension: ComputedDimension): number {\n const compensation = this.getCompensation(dimension) || this.getView(dimension);\n\n return Math.abs(this.getScrolled(dimension) * (1 - compensation));\n }\n\n private getView(dimension: ComputedDimension): number {\n return this.tuiScrollbar === 'vertical'\n ? Math.ceil((dimension.clientHeight / dimension.scrollHeight) * 100) / 100\n : Math.ceil((dimension.clientWidth / dimension.scrollWidth) * 100) / 100;\n }\n}\n","import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\nexport interface TuiScrollbarOptions {\n mode: 'always' | 'hidden' | 'hover' | 'native';\n}\n\nexport const TUI_DEFAULT_SCROLLBAR_OPTIONS: TuiScrollbarOptions = {\n mode: 'always',\n};\n\nexport const [TUI_SCROLLBAR_OPTIONS, tuiScrollbarOptionsProvider] =\n tuiCreateOptions<TuiScrollbarOptions>(TUI_DEFAULT_SCROLLBAR_OPTIONS);\n","import {AsyncPipe} from '@angular/common';\nimport {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {WA_ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {tuiZonefreeScheduler, tuiZoneOptimized} from '@taiga-ui/cdk/observables';\nimport {TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\nimport {distinctUntilChanged, map, startWith, throttleTime} from 'rxjs';\n\nimport {TuiScrollbarDirective} from './scrollbar.directive';\nimport {TUI_SCROLLBAR_OPTIONS} from './scrollbar.options';\n\n@Component({\n selector: 'tui-scroll-controls',\n imports: [AsyncPipe, TuiAnimated, TuiScrollbarDirective],\n templateUrl: './scroll-controls.template.html',\n styleUrls: ['./scroll-controls.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiScrollControls {\n private readonly scrollRef = inject(TUI_SCROLL_REF).nativeElement;\n\n protected readonly nativeScrollbar = inject(TUI_SCROLLBAR_OPTIONS).mode === 'native';\n protected readonly refresh$ = inject(WA_ANIMATION_FRAME).pipe(\n throttleTime(300, tuiZonefreeScheduler()),\n map(() => this.scrollbars),\n startWith([false, false]),\n distinctUntilChanged((a, b) => a[0] === b[0] && a[1] === b[1]),\n tuiZoneOptimized(),\n );\n\n private get scrollbars(): [boolean, boolean] {\n const {clientHeight, scrollHeight, clientWidth, scrollWidth} = this.scrollRef;\n\n return [\n Math.ceil((clientHeight / scrollHeight) * 100) < 100,\n Math.ceil((clientWidth / scrollWidth) * 100) < 100,\n ];\n }\n}\n","@if (nativeScrollbar) {\n} @else {\n @if (refresh$ | async; as bars) {\n @if (bars[0]) {\n <div\n tuiAnimated\n class=\"t-bar t-bar_vertical\"\n [class.t-bar_has-horizontal]=\"bars[1]\"\n (mousedown.capture.prevent)=\"(0)\"\n >\n <div\n tuiScrollbar=\"vertical\"\n class=\"t-thumb\"\n ></div>\n </div>\n }\n @if (bars[1]) {\n <div\n tuiAnimated\n class=\"t-bar t-bar_horizontal\"\n [class.t-bar_has-vertical]=\"bars[0]\"\n (mousedown.capture.prevent)=\"(0)\"\n >\n <div\n tuiScrollbar=\"horizontal\"\n class=\"t-thumb\"\n ></div>\n </div>\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n inject,\n Input,\n} from '@angular/core';\nimport {TUI_IS_IOS} from '@taiga-ui/cdk/tokens';\nimport {tuiGetElementOffset, tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\n\nimport {TuiScrollControls} from './scroll-controls.component';\nimport {TUI_SCROLLBAR_OPTIONS} from './scrollbar.options';\n\n/**\n * An event for scrolling an element into view within {@link TuiScrollbar}.\n */\nexport const TUI_SCROLL_INTO_VIEW = 'tui-scroll-into-view';\n\n/**\n * An event to notify {@link TuiScrollbar} that\n * it should control a nested element.\n */\nexport const TUI_SCROLLABLE = 'tui-scrollable';\n\n@Component({\n selector: 'tui-scrollbar',\n imports: [TuiScrollControls],\n templateUrl: './scrollbar.template.html',\n styleUrls: ['./scrollbar.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_SCROLL_REF,\n useFactory: () => inject(TuiScrollbar).browserScrollRef,\n },\n ],\n host: {\n '[class._native-hidden]': 'options.mode !== \"native\" && (!isIOS || hidden)',\n [`(${TUI_SCROLLABLE}.stop)`]: 'scrollRef = $event.detail',\n [`(${TUI_SCROLL_INTO_VIEW}.stop)`]: 'scrollIntoView($event.detail)',\n },\n})\nexport class TuiScrollbar {\n private readonly el = tuiInjectElement();\n\n protected readonly options = inject(TUI_SCROLLBAR_OPTIONS);\n protected readonly isIOS = inject(TUI_IS_IOS);\n protected readonly browserScrollRef = new ElementRef(this.el);\n\n /**\n * @deprecated: use tuiScrollbarOptionsProvider({ mode: 'hidden' })\n */\n @Input()\n public hidden = this.options.mode === 'hidden';\n\n protected get delegated(): boolean {\n return this.scrollRef !== this.el || this.options.mode === 'native';\n }\n\n protected get scrollRef(): HTMLElement {\n return this.browserScrollRef.nativeElement;\n }\n\n protected set scrollRef(element: HTMLElement) {\n this.browserScrollRef.nativeElement = element;\n }\n\n protected scrollIntoView(detail: HTMLElement): void {\n if (this.delegated) {\n return;\n }\n\n const {offsetHeight, offsetWidth} = detail;\n const {offsetTop, offsetLeft} = tuiGetElementOffset(this.scrollRef, detail);\n const scrollTop = offsetTop + offsetHeight / 2 - this.scrollRef.clientHeight / 2;\n const scrollLeft = offsetLeft + offsetWidth / 2 - this.scrollRef.clientWidth / 2;\n\n this.scrollRef.scrollTo?.(scrollLeft, scrollTop);\n }\n}\n","@if (!hidden && !isIOS && options.mode !== 'native') {\n <tui-scroll-controls\n class=\"t-bars\"\n [class.t-hover-mode]=\"options.mode === 'hover'\"\n />\n}\n<div\n class=\"t-content\"\n [class.t-content_delegated]=\"delegated\"\n>\n <ng-content />\n</div>\n","import {DestroyRef, Directive, inject, Input} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {timer} from 'rxjs';\n\nimport {TUI_SCROLL_INTO_VIEW} from './scrollbar.component';\n\n/**\n * Directive scrolls element into view inside tui-scrollbar\n */\n@Directive({\n standalone: true,\n selector: '[tuiScrollIntoView]',\n})\nexport class TuiScrollIntoView {\n private readonly el = tuiInjectElement();\n private readonly destroyRef = inject(DestroyRef);\n\n @Input()\n public set tuiScrollIntoView(scroll: boolean) {\n if (!scroll) {\n return;\n }\n\n // Timeout is necessary in order to give element render cycle to get into its final spot\n // (for example if it is inside dropdown box which has to be positioned first)\n timer(0)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.el.dispatchEvent(\n new CustomEvent<Element>(TUI_SCROLL_INTO_VIEW, {\n bubbles: true,\n detail: this.el,\n }),\n );\n });\n }\n}\n","import {Directive, ElementRef} from '@angular/core';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\n\nexport const SCROLL_REF_SELECTOR = '[tuiScrollRef]';\n\n@Directive({\n standalone: true,\n selector: '[tuiScrollRef]',\n providers: [tuiProvide(TUI_SCROLL_REF, ElementRef)],\n})\nexport class TuiScrollRef {}\n","import {Directive, type OnInit} from '@angular/core';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\n\nimport {TUI_SCROLLABLE} from './scrollbar.component';\n\n@Directive({\n standalone: true,\n selector: '[tuiScrollable]',\n})\nexport class TuiScrollable implements OnInit {\n private readonly el = tuiInjectElement();\n\n public ngOnInit(): void {\n this.el.dispatchEvent(\n new CustomEvent(TUI_SCROLLABLE, {\n bubbles: true,\n detail: this.el,\n }),\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAOM,MAAO,mBAAoB,SAAQ,UAA4B,CAAA;AAwBjE,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,CAAC,CAAC,UAAU,KAAK,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAxB5C,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC,aAAa;AAC9C,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAC5B,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,aAAc,EAAE,WAAW,CAAC,CAAC,IAAI,CACvD,MAAM,CAAC,CAAC,EAAC,MAAM,EAAC,KAAK,MAAM,KAAK,IAAI,CAAC,EAAE,CAAC,EACxC,GAAG,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CACpD,EACD,iBAAiB,CAAC,IAAI,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC,IAAI,CACxC,WAAW,EAAE,EACb,SAAS,CAAC,CAAC,KAAK,KAAI;AAChB,YAAA,MAAM,EAAC,aAAa,EAAC,GAAG,IAAI,CAAC,EAAE;YAC/B,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,qBAAqB,EAAE;YAC5C,MAAM,QAAQ,GAAG,iBAAiB,CAAC,KAAK,EAAE,IAAI,CAAC;YAC/C,MAAM,UAAU,GAAG,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YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,iBAAiB;AAC9B,iBAAA;;;ACRD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-scrollbar.mjs","sources":["../../../projects/core/components/scrollbar/scroll-ref.directive.ts","../../../projects/core/components/scrollbar/scrollbar.service.ts","../../../projects/core/components/scrollbar/scrollbar.directive.ts","../../../projects/core/components/scrollbar/scrollbar.options.ts","../../../projects/core/components/scrollbar/scroll-controls.component.ts","../../../projects/core/components/scrollbar/scroll-controls.template.html","../../../projects/core/components/scrollbar/scrollbar.component.ts","../../../projects/core/components/scrollbar/scrollbar.template.html","../../../projects/core/components/scrollbar/scroll-into-view.directive.ts","../../../projects/core/components/scrollbar/scrollable.directive.ts","../../../projects/core/components/scrollbar/taiga-ui-core-components-scrollbar.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {Directive, ElementRef, inject, InjectionToken} from '@angular/core';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/di';\n\nexport const SCROLL_REF_SELECTOR = '[tuiScrollRef]';\nexport const TUI_SCROLL_REF = new InjectionToken(ngDevMode ? 'TUI_SCROLL_REF' : '', {\n factory: () => new ElementRef(inject(DOCUMENT).documentElement),\n});\n\n@Directive({\n selector: '[tuiScrollRef]',\n providers: [tuiProvide(TUI_SCROLL_REF, ElementRef)],\n})\nexport class TuiScrollRef {}\n","import {inject, Injectable} from '@angular/core';\nimport {tuiTypedFromEvent, tuiZonefree} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {filter, map, merge, Observable, switchMap, takeUntil} from 'rxjs';\n\nimport {TUI_SCROLL_REF} from './scroll-ref.directive';\n\n@Injectable()\nexport class TuiScrollbarService extends Observable<[number, number]> {\n private readonly el = tuiInjectElement();\n private readonly element = inject(TUI_SCROLL_REF).nativeElement;\n private readonly scroll$ = merge(\n tuiTypedFromEvent(this.el.parentElement!, 'mousedown').pipe(\n filter(({target}) => target !== this.el),\n map((event) => this.getScrolled(event, 0.5, 0.5)),\n ),\n tuiTypedFromEvent(this.el, 'mousedown').pipe(\n tuiZonefree(),\n switchMap((event) => {\n const {ownerDocument} = this.el;\n const rect = this.el.getBoundingClientRect();\n const vertical = getOffsetVertical(event, rect);\n const horizontal = getOffsetHorizontal(event, rect);\n\n return tuiTypedFromEvent(ownerDocument, 'mousemove').pipe(\n map((event) => this.getScrolled(event, vertical, horizontal)),\n takeUntil(tuiTypedFromEvent(ownerDocument, 'mouseup')),\n );\n }),\n ),\n );\n\n constructor() {\n super((subscriber) => this.scroll$.subscribe(subscriber));\n }\n\n private getScrolled(\n {clientY, clientX}: MouseEvent,\n offsetY: number,\n offsetX: number,\n ): [number, number] {\n const {offsetHeight, offsetWidth} = this.el;\n const {top, left, right, width, height} =\n this.el.parentElement!.getBoundingClientRect();\n const rtl = this.el.matches('[dir=\"rtl\"] :scope');\n const inline = rtl ? right : left;\n const multiplier = rtl ? -1 : 1;\n const maxTop = this.element.scrollHeight - height;\n const maxLeft = this.element.scrollWidth - width;\n const scrolledTop =\n (clientY - top - offsetHeight * offsetY) / (height - offsetHeight);\n const scrolledLeft =\n (clientX - inline - offsetWidth * offsetX * multiplier) /\n (width - offsetWidth);\n\n return [maxTop * scrolledTop, maxLeft * scrolledLeft];\n }\n}\n\nfunction getOffsetVertical({clientY}: MouseEvent, {top, height}: DOMRect): number {\n return (clientY - top) / height;\n}\n\nfunction getOffsetHorizontal({clientX}: MouseEvent, {left, width}: DOMRect): number {\n return (clientX - left) / width;\n}\n","import {Directive, inject, input} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {WA_ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {\n tuiScrollFrom,\n tuiZonefree,\n tuiZonefreeScheduler,\n} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {merge, throttleTime} from 'rxjs';\n\nimport {TUI_SCROLL_REF} from './scroll-ref.directive';\nimport {TuiScrollbarService} from './scrollbar.service';\n\nconst MIN_WIDTH = 24;\n\ninterface ComputedDimension {\n scrollTop: number;\n scrollHeight: number;\n clientHeight: number;\n scrollLeft: number;\n scrollWidth: number;\n clientWidth: number;\n}\n\n@Directive({\n selector: '[tuiScrollbar]',\n providers: [TuiScrollbarService],\n})\nexport class TuiScrollbarDirective {\n private readonly el = inject(TUI_SCROLL_REF).nativeElement;\n private readonly style = tuiInjectElement().style;\n\n protected readonly scrollSub = inject(TuiScrollbarService)\n .pipe(takeUntilDestroyed())\n .subscribe(([top, left]) => {\n this.el.style.scrollBehavior = 'auto';\n\n if (this.tuiScrollbar() === 'horizontal') {\n this.el.scrollLeft = left;\n } else {\n this.el.scrollTop = top;\n }\n\n this.el.style.scrollBehavior = '';\n });\n\n protected readonly styleSub = merge(\n inject(WA_ANIMATION_FRAME).pipe(throttleTime(100, tuiZonefreeScheduler())),\n tuiScrollFrom(this.el),\n )\n .pipe(tuiZonefree(), takeUntilDestroyed())\n .subscribe(() => {\n const dimension: ComputedDimension = {\n scrollTop: this.el.scrollTop,\n scrollHeight: this.el.scrollHeight,\n clientHeight: this.el.clientHeight,\n scrollLeft: this.el.scrollLeft,\n scrollWidth: this.el.scrollWidth,\n clientWidth: this.el.clientWidth,\n };\n\n const thumb = `${this.getThumb(dimension) * 100}%`;\n const view = `${this.getView(dimension) * 100}%`;\n\n if (this.tuiScrollbar() === 'vertical') {\n this.style.top = thumb;\n this.style.height = view;\n } else {\n this.style.left = thumb;\n this.style.insetInlineStart = thumb;\n this.style.width = view;\n }\n });\n\n public readonly tuiScrollbar = input<'horizontal' | 'vertical'>('vertical');\n\n private getScrolled(dimension: ComputedDimension): number {\n return this.tuiScrollbar() === 'vertical'\n ? dimension.scrollTop / (dimension.scrollHeight - dimension.clientHeight)\n : dimension.scrollLeft / (dimension.scrollWidth - dimension.clientWidth);\n }\n\n private getCompensation(dimension: ComputedDimension): number {\n if (\n ((dimension.clientHeight * dimension.clientHeight) / dimension.scrollHeight >\n MIN_WIDTH &&\n this.tuiScrollbar() === 'vertical') ||\n ((dimension.clientWidth * dimension.clientWidth) / dimension.scrollWidth >\n MIN_WIDTH &&\n this.tuiScrollbar() === 'horizontal')\n ) {\n return 0;\n }\n\n return this.tuiScrollbar() === 'vertical'\n ? MIN_WIDTH / dimension.clientHeight\n : MIN_WIDTH / dimension.clientWidth;\n }\n\n private getThumb(dimension: ComputedDimension): number {\n const compensation = this.getCompensation(dimension) || this.getView(dimension);\n\n return Math.abs(this.getScrolled(dimension) * (1 - compensation));\n }\n\n private getView(dimension: ComputedDimension): number {\n return this.tuiScrollbar() === 'vertical'\n ? Math.ceil((dimension.clientHeight / dimension.scrollHeight) * 100) / 100\n : Math.ceil((dimension.clientWidth / dimension.scrollWidth) * 100) / 100;\n }\n}\n","import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\nexport interface TuiScrollbarOptions {\n mode: 'always' | 'hidden' | 'hover' | 'native';\n}\n\nexport const TUI_DEFAULT_SCROLLBAR_OPTIONS: TuiScrollbarOptions = {\n mode: 'always',\n};\n\nexport const [TUI_SCROLLBAR_OPTIONS, tuiScrollbarOptionsProvider] =\n tuiCreateOptions<TuiScrollbarOptions>(TUI_DEFAULT_SCROLLBAR_OPTIONS);\n","import {AsyncPipe} from '@angular/common';\nimport {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {WA_ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {tuiZonefreeScheduler, tuiZoneOptimized} from '@taiga-ui/cdk/observables';\nimport {distinctUntilChanged, map, startWith, throttleTime} from 'rxjs';\n\nimport {TUI_SCROLL_REF} from './scroll-ref.directive';\nimport {TuiScrollbarDirective} from './scrollbar.directive';\nimport {TUI_SCROLLBAR_OPTIONS} from './scrollbar.options';\n\n@Component({\n selector: 'tui-scroll-controls',\n imports: [AsyncPipe, TuiAnimated, TuiScrollbarDirective],\n templateUrl: './scroll-controls.template.html',\n styleUrl: './scroll-controls.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiScrollControls {\n private readonly scrollRef = inject(TUI_SCROLL_REF).nativeElement;\n\n protected readonly nativeScrollbar = inject(TUI_SCROLLBAR_OPTIONS).mode === 'native';\n protected readonly refresh$ = inject(WA_ANIMATION_FRAME).pipe(\n throttleTime(300, tuiZonefreeScheduler()),\n map(() => this.scrollbars),\n startWith([false, false]),\n distinctUntilChanged((a, b) => a[0] === b[0] && a[1] === b[1]),\n tuiZoneOptimized(),\n );\n\n private get scrollbars(): [boolean, boolean] {\n const {clientHeight, scrollHeight, clientWidth, scrollWidth} = this.scrollRef;\n\n return [\n Math.ceil((clientHeight / scrollHeight) * 100) < 100,\n Math.ceil((clientWidth / scrollWidth) * 100) < 100,\n ];\n }\n}\n","@if (nativeScrollbar) {\n} @else {\n @if (refresh$ | async; as bars) {\n @if (bars[0]) {\n <div\n tuiAnimated\n class=\"t-bar t-bar_vertical\"\n [class.t-bar_has-horizontal]=\"bars[1]\"\n (mousedown.capture.prevent)=\"(0)\"\n >\n <div\n tuiScrollbar=\"vertical\"\n class=\"t-thumb\"\n ></div>\n </div>\n }\n @if (bars[1]) {\n <div\n tuiAnimated\n class=\"t-bar t-bar_horizontal\"\n [class.t-bar_has-vertical]=\"bars[0]\"\n (mousedown.capture.prevent)=\"(0)\"\n >\n <div\n tuiScrollbar=\"horizontal\"\n class=\"t-thumb\"\n ></div>\n </div>\n }\n }\n}\n","import {ChangeDetectionStrategy, Component, ElementRef, inject} from '@angular/core';\nimport {TUI_IS_IOS} from '@taiga-ui/cdk/tokens';\nimport {tuiGetElementOffset, tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\n\nimport {TuiScrollControls} from './scroll-controls.component';\nimport {TUI_SCROLL_REF} from './scroll-ref.directive';\nimport {TUI_SCROLLBAR_OPTIONS} from './scrollbar.options';\n\n/**\n * An event for scrolling an element into view within {@link TuiScrollbar}.\n */\nexport const TUI_SCROLL_INTO_VIEW = 'tui-scroll-into-view';\n\n/**\n * An event to notify {@link TuiScrollbar} that\n * it should control a nested element.\n */\nexport const TUI_SCROLLABLE = 'tui-scrollable';\n\n@Component({\n selector: 'tui-scrollbar',\n imports: [TuiScrollControls],\n templateUrl: './scrollbar.template.html',\n styleUrl: './scrollbar.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_SCROLL_REF,\n useFactory: () => inject(TuiScrollbar).browserScrollRef,\n },\n ],\n host: {\n '[class._native-hidden]':\n 'options.mode !== \"native\" && (!isIOS || options.mode === \"hidden\")',\n [`(${TUI_SCROLLABLE}.stop)`]: 'scrollRef = $event.detail',\n [`(${TUI_SCROLL_INTO_VIEW}.stop)`]: 'scrollIntoView($event.detail)',\n },\n})\nexport class TuiScrollbar {\n private readonly el = tuiInjectElement();\n\n protected readonly options = inject(TUI_SCROLLBAR_OPTIONS);\n protected readonly isIOS = inject(TUI_IS_IOS);\n protected readonly browserScrollRef = new ElementRef(this.el);\n\n protected get delegated(): boolean {\n return this.scrollRef !== this.el || this.options.mode === 'native';\n }\n\n protected get scrollRef(): HTMLElement {\n return this.browserScrollRef.nativeElement;\n }\n\n protected set scrollRef(element: HTMLElement) {\n this.browserScrollRef.nativeElement = element;\n }\n\n protected scrollIntoView(detail: HTMLElement): void {\n if (this.delegated) {\n return;\n }\n\n const {offsetHeight, offsetWidth} = detail;\n const {offsetTop, offsetLeft} = tuiGetElementOffset(this.scrollRef, detail);\n const scrollTop = offsetTop + offsetHeight / 2 - this.scrollRef.clientHeight / 2;\n const scrollLeft = offsetLeft + offsetWidth / 2 - this.scrollRef.clientWidth / 2;\n\n this.scrollRef.scrollTo?.(scrollLeft, scrollTop);\n }\n}\n","@if (!isIOS && options.mode !== 'native' && options.mode !== 'hidden') {\n <tui-scroll-controls\n class=\"t-bars\"\n [class.t-hover-mode]=\"options.mode === 'hover'\"\n />\n}\n<div\n class=\"t-content\"\n [class.t-content_delegated]=\"delegated\"\n>\n <ng-content />\n</div>\n","import {DestroyRef, Directive, effect, inject, input} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {timer} from 'rxjs';\n\nimport {TUI_SCROLL_INTO_VIEW} from './scrollbar.component';\n\n/**\n * Directive scrolls element into view inside tui-scrollbar\n */\n@Directive({\n selector: '[tuiScrollIntoView]',\n})\nexport class TuiScrollIntoView {\n private readonly el = tuiInjectElement();\n private readonly destroyRef = inject(DestroyRef);\n\n public readonly tuiScrollIntoView = input<boolean>();\n\n protected readonly dispatchEvent = effect(() => {\n const scroll = this.tuiScrollIntoView();\n\n if (!scroll) {\n return;\n }\n\n // Timeout is necessary in order to give element render cycle to get into its final spot\n // (for example if it is inside dropdown box which has to be positioned first)\n timer(0)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.el.dispatchEvent(\n new CustomEvent<Element>(TUI_SCROLL_INTO_VIEW, {\n bubbles: true,\n detail: this.el,\n }),\n );\n });\n });\n}\n","import {Directive, type OnInit} from '@angular/core';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\n\nimport {TUI_SCROLLABLE} from './scrollbar.component';\n\n@Directive({\n selector: '[tuiScrollable]',\n})\nexport class TuiScrollable implements OnInit {\n private readonly el = tuiInjectElement();\n\n public ngOnInit(): void {\n this.el.dispatchEvent(\n new CustomEvent(TUI_SCROLLABLE, {bubbles: true, detail: this.el}),\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAIO,MAAM,mBAAmB,GAAG;AACtB,MAAA,cAAc,GAAG,IAAI,cAAc,CAAC,SAAS,GAAG,gBAAgB,GAAG,EAAE,EAAE;AAChF,IAAA,OAAO,EAAE,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC,QAAQ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