@taiga-ui/addon-mobile 4.51.0 → 4.52.0-canary.34c26c6

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 (112) hide show
  1. package/components/mobile-calendar-dropdown/mobile-calendar-dropdown.component.d.ts +1 -1
  2. package/fesm2022/taiga-ui-addon-mobile-components-bottom-sheet.mjs +4 -4
  3. package/fesm2022/taiga-ui-addon-mobile-components-bottom-sheet.mjs.map +1 -1
  4. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-dropdown.mjs +22 -26
  5. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-dropdown.mjs.map +1 -1
  6. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-sheet.mjs +5 -5
  7. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-sheet.mjs.map +1 -1
  8. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar.mjs +5 -5
  9. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar.mjs.map +1 -1
  10. package/fesm2022/taiga-ui-addon-mobile-components-mobile-dialog.mjs +7 -7
  11. package/fesm2022/taiga-ui-addon-mobile-components-mobile-dialog.mjs.map +1 -1
  12. package/fesm2022/taiga-ui-addon-mobile-components-pull-to-refresh.mjs +15 -15
  13. package/fesm2022/taiga-ui-addon-mobile-components-pull-to-refresh.mjs.map +1 -1
  14. package/fesm2022/taiga-ui-addon-mobile-components-sheet-dialog.mjs +11 -11
  15. package/fesm2022/taiga-ui-addon-mobile-components-sheet-dialog.mjs.map +1 -1
  16. package/fesm2022/taiga-ui-addon-mobile-components-swipe-action.mjs +8 -8
  17. package/fesm2022/taiga-ui-addon-mobile-components-swipe-action.mjs.map +1 -1
  18. package/fesm2022/taiga-ui-addon-mobile-components-tab-bar.mjs +11 -11
  19. package/fesm2022/taiga-ui-addon-mobile-components-tab-bar.mjs.map +1 -1
  20. package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-mobile.mjs +8 -8
  21. package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-mobile.mjs.map +1 -1
  22. package/fesm2022/taiga-ui-addon-mobile-directives-elastic-sticky.mjs +8 -8
  23. package/fesm2022/taiga-ui-addon-mobile-directives-elastic-sticky.mjs.map +1 -1
  24. package/fesm2022/taiga-ui-addon-mobile-directives-responsive-dialog.mjs +6 -6
  25. package/fesm2022/taiga-ui-addon-mobile-directives-responsive-dialog.mjs.map +1 -1
  26. package/fesm2022/taiga-ui-addon-mobile-directives-ripple.mjs +7 -7
  27. package/fesm2022/taiga-ui-addon-mobile-directives-ripple.mjs.map +1 -1
  28. package/fesm2022/taiga-ui-addon-mobile-directives-sidebar.mjs +7 -7
  29. package/fesm2022/taiga-ui-addon-mobile-directives-sidebar.mjs.map +1 -1
  30. package/fesm2022/taiga-ui-addon-mobile-directives-touchable.mjs +5 -5
  31. package/fesm2022/taiga-ui-addon-mobile-directives-touchable.mjs.map +1 -1
  32. package/fesm2022/taiga-ui-addon-mobile-services.mjs +3 -3
  33. package/fesm2022/taiga-ui-addon-mobile-services.mjs.map +1 -1
  34. package/package.json +12 -50
  35. package/styles/common/notification-middle.less +9 -0
  36. package/styles/taiga-ui-mobile.less +1 -0
  37. package/esm2022/components/bottom-sheet/bottom-sheet.component.mjs +0 -49
  38. package/esm2022/components/bottom-sheet/index.mjs +0 -2
  39. package/esm2022/components/bottom-sheet/taiga-ui-addon-mobile-components-bottom-sheet.mjs +0 -5
  40. package/esm2022/components/index.mjs +0 -10
  41. package/esm2022/components/mobile-calendar/index.mjs +0 -5
  42. package/esm2022/components/mobile-calendar/mobile-calendar.component.mjs +0 -308
  43. package/esm2022/components/mobile-calendar/mobile-calendar.const.mjs +0 -35
  44. package/esm2022/components/mobile-calendar/mobile-calendar.providers.mjs +0 -27
  45. package/esm2022/components/mobile-calendar/mobile-calendar.strategy.mjs +0 -126
  46. package/esm2022/components/mobile-calendar/taiga-ui-addon-mobile-components-mobile-calendar.mjs +0 -5
  47. package/esm2022/components/mobile-calendar-dropdown/index.mjs +0 -3
  48. package/esm2022/components/mobile-calendar-dropdown/mobile-calendar-dropdown.component.mjs +0 -117
  49. package/esm2022/components/mobile-calendar-dropdown/mobile-calendar-dropdown.directive.mjs +0 -53
  50. package/esm2022/components/mobile-calendar-dropdown/taiga-ui-addon-mobile-components-mobile-calendar-dropdown.mjs +0 -5
  51. package/esm2022/components/mobile-calendar-sheet/index.mjs +0 -2
  52. package/esm2022/components/mobile-calendar-sheet/mobile-calendar-sheet.component.mjs +0 -25
  53. package/esm2022/components/mobile-calendar-sheet/taiga-ui-addon-mobile-components-mobile-calendar-sheet.mjs +0 -5
  54. package/esm2022/components/mobile-dialog/index.mjs +0 -4
  55. package/esm2022/components/mobile-dialog/mobile-dialog.component.mjs +0 -26
  56. package/esm2022/components/mobile-dialog/mobile-dialog.options.mjs +0 -17
  57. package/esm2022/components/mobile-dialog/mobile-dialog.service.mjs +0 -22
  58. package/esm2022/components/mobile-dialog/taiga-ui-addon-mobile-components-mobile-dialog.mjs +0 -5
  59. package/esm2022/components/pull-to-refresh/index.mjs +0 -6
  60. package/esm2022/components/pull-to-refresh/loader-android/loader-android.component.mjs +0 -46
  61. package/esm2022/components/pull-to-refresh/loader-ios/loader-ios.component.mjs +0 -39
  62. package/esm2022/components/pull-to-refresh/pull-to-refresh.component.mjs +0 -51
  63. package/esm2022/components/pull-to-refresh/pull-to-refresh.providers.mjs +0 -24
  64. package/esm2022/components/pull-to-refresh/pull-to-refresh.service.mjs +0 -37
  65. package/esm2022/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.mjs +0 -5
  66. package/esm2022/components/sheet-dialog/index.mjs +0 -5
  67. package/esm2022/components/sheet-dialog/sheet-dialog.component.mjs +0 -80
  68. package/esm2022/components/sheet-dialog/sheet-dialog.directive.mjs +0 -21
  69. package/esm2022/components/sheet-dialog/sheet-dialog.options.mjs +0 -24
  70. package/esm2022/components/sheet-dialog/sheet-dialog.service.mjs +0 -38
  71. package/esm2022/components/sheet-dialog/taiga-ui-addon-mobile-components-sheet-dialog.mjs +0 -5
  72. package/esm2022/components/swipe-action/index.mjs +0 -3
  73. package/esm2022/components/swipe-action/swipe-actions-auto-close.directive.mjs +0 -34
  74. package/esm2022/components/swipe-action/swipe-actions.component.mjs +0 -23
  75. package/esm2022/components/swipe-action/taiga-ui-addon-mobile-components-swipe-action.mjs +0 -5
  76. package/esm2022/components/tab-bar/index.mjs +0 -5
  77. package/esm2022/components/tab-bar/tab-bar-item.component.mjs +0 -26
  78. package/esm2022/components/tab-bar/tab-bar-item.directive.mjs +0 -27
  79. package/esm2022/components/tab-bar/tab-bar.component.mjs +0 -46
  80. package/esm2022/components/tab-bar/tab-bar.mjs +0 -9
  81. package/esm2022/components/tab-bar/taiga-ui-addon-mobile-components-tab-bar.mjs +0 -5
  82. package/esm2022/components/taiga-ui-addon-mobile-components.mjs +0 -5
  83. package/esm2022/directives/dropdown-mobile/dropdown-mobile.component.mjs +0 -98
  84. package/esm2022/directives/dropdown-mobile/dropdown-mobile.directive.mjs +0 -54
  85. package/esm2022/directives/dropdown-mobile/index.mjs +0 -3
  86. package/esm2022/directives/dropdown-mobile/taiga-ui-addon-mobile-directives-dropdown-mobile.mjs +0 -5
  87. package/esm2022/directives/elastic-sticky/elastic-sticky.directive.mjs +0 -23
  88. package/esm2022/directives/elastic-sticky/elastic-sticky.service.mjs +0 -53
  89. package/esm2022/directives/elastic-sticky/index.mjs +0 -3
  90. package/esm2022/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.mjs +0 -5
  91. package/esm2022/directives/index.mjs +0 -7
  92. package/esm2022/directives/responsive-dialog/index.mjs +0 -3
  93. package/esm2022/directives/responsive-dialog/responsive-dialog.directive.mjs +0 -21
  94. package/esm2022/directives/responsive-dialog/responsive-dialog.service.mjs +0 -34
  95. package/esm2022/directives/responsive-dialog/taiga-ui-addon-mobile-directives-responsive-dialog.mjs +0 -5
  96. package/esm2022/directives/ripple/index.mjs +0 -2
  97. package/esm2022/directives/ripple/ripple.directive.mjs +0 -98
  98. package/esm2022/directives/ripple/taiga-ui-addon-mobile-directives-ripple.mjs +0 -5
  99. package/esm2022/directives/sidebar/index.mjs +0 -4
  100. package/esm2022/directives/sidebar/sidebar.component.mjs +0 -45
  101. package/esm2022/directives/sidebar/sidebar.directive.mjs +0 -64
  102. package/esm2022/directives/sidebar/sidebar.mjs +0 -7
  103. package/esm2022/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.mjs +0 -5
  104. package/esm2022/directives/taiga-ui-addon-mobile-directives.mjs +0 -5
  105. package/esm2022/directives/touchable/index.mjs +0 -2
  106. package/esm2022/directives/touchable/taiga-ui-addon-mobile-directives-touchable.mjs +0 -5
  107. package/esm2022/directives/touchable/touchable.directive.mjs +0 -71
  108. package/esm2022/index.mjs +0 -4
  109. package/esm2022/services/index.mjs +0 -2
  110. package/esm2022/services/keyboard.service.mjs +0 -53
  111. package/esm2022/services/taiga-ui-addon-mobile-services.mjs +0 -5
  112. package/esm2022/taiga-ui-addon-mobile.mjs +0 -5
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-directives-dropdown-mobile.mjs","sources":["../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.directive.ts","../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.component.ts","../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.template.html","../../../projects/addon-mobile/directives/dropdown-mobile/taiga-ui-addon-mobile-directives-dropdown-mobile.ts"],"sourcesContent":["import {Directive, inject, Input} from '@angular/core';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\nimport {TUI_DROPDOWN_COMPONENT} from '@taiga-ui/core/directives/dropdown';\n\nimport {TuiDropdownMobileComponent} from './dropdown-mobile.component';\n\n@Directive({\n standalone: true,\n selector: '[tuiDropdownMobile]',\n providers: [\n {\n provide: TUI_DROPDOWN_COMPONENT,\n useFactory: () =>\n inject(TUI_IS_MOBILE)\n ? TuiDropdownMobileComponent\n : inject(TUI_DROPDOWN_COMPONENT, {skipSelf: true}),\n },\n ],\n host: {\n '[style.visibility]': '\"visible\"',\n '(mousedown)': 'onMouseDown($event)',\n },\n})\nexport class TuiDropdownMobile {\n private readonly isMobile = inject(TUI_IS_MOBILE);\n\n @Input()\n public tuiDropdownMobile = '';\n\n protected onMouseDown(event: MouseEvent): void {\n if (\n !this.isMobile ||\n !tuiIsHTMLElement(event.target) ||\n !event.target.matches('input,textarea') ||\n this.tuiDropdownMobile\n ) {\n return;\n }\n\n event.preventDefault();\n event.target.focus({preventScroll: true});\n }\n}\n","import {DOCUMENT, NgIf} from '@angular/common';\nimport {\n type AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n inject,\n type OnDestroy,\n ViewEncapsulation,\n} from '@angular/core';\nimport {WaIntersectionObserver} from '@ng-web-apis/intersection-observer';\nimport {TuiKeyboardService} from '@taiga-ui/addon-mobile/services';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {TuiSwipe, type TuiSwipeEvent} from '@taiga-ui/cdk/directives/swipe';\nimport {tuiInjectElement, tuiIsElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiGetNativeFocused} from '@taiga-ui/cdk/utils/focus';\nimport {tuiPx} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TuiDropdownMobile} from './dropdown-mobile.directive';\n\nconst GAP = 16;\n\n@Component({\n standalone: true,\n selector: 'tui-dropdown-mobile',\n imports: [NgIf, PolymorpheusOutlet, TuiSwipe, WaIntersectionObserver],\n templateUrl: './dropdown-mobile.template.html',\n styleUrls: ['./dropdown-mobile.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiActiveZone, TuiAnimated],\n host: {\n '[class._sheet]': 'directive.tuiDropdownMobile',\n '(document:click.zoneless.capture)': 'onClick($event)',\n '(window>scroll.zoneless.capture)':\n 'refresh($event.currentTarget.visualViewport)',\n '(visualViewport>resize.zoneless)': 'refresh($event.target)',\n '(visualViewport>scroll.zoneless)': 'refresh($event.target)',\n },\n})\nexport class TuiDropdownMobileComponent implements OnDestroy, AfterViewInit {\n private readonly el = tuiInjectElement();\n private readonly keyboard = inject(TuiKeyboardService);\n private readonly doc = inject(DOCUMENT);\n private readonly scrollTop = this.doc.documentElement.scrollTop;\n private readonly observer = new ResizeObserver(\n () =>\n this.doc.defaultView?.visualViewport &&\n this.refresh(this.doc.defaultView.visualViewport),\n );\n\n protected readonly directive = inject(TuiDropdownMobile);\n protected readonly dropdown = inject(TuiDropdownDirective);\n\n constructor() {\n this.observer.observe(this.dropdown.el);\n this.doc.documentElement.style.setProperty('scroll-behavior', 'initial');\n }\n\n public ngAfterViewInit(): void {\n this.el.scrollTop = this.directive.tuiDropdownMobile ? this.el.clientHeight : 0;\n }\n\n public ngOnDestroy(): void {\n this.observer.disconnect();\n this.doc.body.classList.remove('t-dropdown-mobile');\n this.doc.body.style.removeProperty('--t-root-top');\n this.doc.documentElement.scrollTop = this.scrollTop;\n this.doc.documentElement.style.removeProperty('scroll-behavior');\n\n if (this.focused) {\n this.keyboard.hide();\n }\n }\n\n protected readonly close = (): void => this.dropdown.toggle(false);\n\n protected onClick(event: MouseEvent): void {\n if (\n tuiIsElement(event.target) &&\n !this.el.contains(event.target) &&\n (!this.dropdown.el.contains(event.target) ||\n event.target.matches('input,textarea'))\n ) {\n event.stopPropagation();\n }\n }\n\n protected onSwipe({direction}: TuiSwipeEvent, el: HTMLElement): void {\n if (\n direction === 'bottom' &&\n el.getBoundingClientRect().bottom > Number(this.doc.defaultView?.innerHeight)\n ) {\n this.close();\n }\n }\n\n protected onIntersection({isIntersecting}: IntersectionObserverEntry): void {\n if (isIntersecting) {\n this.close();\n }\n }\n\n protected refresh({offsetTop, height}: VisualViewport): void {\n this.doc.body.style.removeProperty('--t-root-top');\n\n if (\n !this.focused ||\n this.directive.tuiDropdownMobile ||\n !this.doc.documentElement.style.getPropertyValue('scroll-behavior')\n ) {\n return;\n }\n\n this.doc.documentElement.scrollTop = 0;\n\n const rect = this.dropdown.el.getBoundingClientRect();\n const topMargin = `max(var(--tui-dropdown-mobile-offset, ${tuiPx(GAP)}), env(safe-area-inset-top))`;\n const offset = `(${topMargin} + ${tuiPx(rect.height + GAP)})`;\n\n this.el.style.setProperty('top', `calc(${tuiPx(offsetTop)} + ${offset})`);\n this.el.style.setProperty('height', `calc(${tuiPx(height)} - ${offset})`);\n\n this.doc.body.classList.add('t-dropdown-mobile');\n this.doc.body.style.setProperty(\n '--t-root-top',\n `calc(${tuiPx(offsetTop - rect.top)} + ${topMargin})`,\n );\n }\n\n private get focused(): boolean {\n return this.dropdown.el.contains(tuiGetNativeFocused(this.doc));\n }\n}\n","<div\n *ngIf=\"directive.tuiDropdownMobile\"\n waIntersectionObserver\n waIntersectionThreshold=\"1\"\n class=\"t-filler\"\n (touchstart.prevent)=\"close()\"\n (waIntersectionObservee)=\"$event[0] && onIntersection($event[0])\"\n></div>\n<div\n #container\n class=\"t-container\"\n (tuiSwipe)=\"onSwipe($event, container)\"\n>\n <h2\n *ngIf=\"directive.tuiDropdownMobile\"\n class=\"t-heading\"\n >\n {{ directive.tuiDropdownMobile }}\n </h2>\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"dropdown._content() as text; context: {$implicit: close}\">\n {{ text }}\n </ng-container>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAOA,MAiBa,iBAAiB,CAAA;AAjB9B,IAAA,WAAA,GAAA;AAkBqB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,aAAa,CAAC,CA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-mobile.mjs","sources":["../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.directive.ts","../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.component.ts","../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.template.html","../../../projects/addon-mobile/directives/dropdown-mobile/taiga-ui-addon-mobile-directives-dropdown-mobile.ts"],"sourcesContent":["import {Directive, inject, Input} from '@angular/core';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\nimport {TUI_DROPDOWN_COMPONENT} from '@taiga-ui/core/directives/dropdown';\n\nimport {TuiDropdownMobileComponent} from './dropdown-mobile.component';\n\n@Directive({\n standalone: true,\n selector: '[tuiDropdownMobile]',\n providers: [\n {\n provide: TUI_DROPDOWN_COMPONENT,\n useFactory: () =>\n inject(TUI_IS_MOBILE)\n ? TuiDropdownMobileComponent\n : inject(TUI_DROPDOWN_COMPONENT, {skipSelf: true}),\n },\n ],\n host: {\n '[style.visibility]': '\"visible\"',\n '(mousedown)': 'onMouseDown($event)',\n },\n})\nexport class TuiDropdownMobile {\n private readonly isMobile = inject(TUI_IS_MOBILE);\n\n @Input()\n public tuiDropdownMobile = '';\n\n protected onMouseDown(event: MouseEvent): void {\n if (\n !this.isMobile ||\n !tuiIsHTMLElement(event.target) ||\n !event.target.matches('input,textarea') ||\n this.tuiDropdownMobile\n ) {\n return;\n }\n\n event.preventDefault();\n event.target.focus({preventScroll: true});\n }\n}\n","import {DOCUMENT, NgIf} from '@angular/common';\nimport {\n type AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n inject,\n type OnDestroy,\n ViewEncapsulation,\n} from '@angular/core';\nimport {WaIntersectionObserver} from '@ng-web-apis/intersection-observer';\nimport {TuiKeyboardService} from '@taiga-ui/addon-mobile/services';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {TuiSwipe, type TuiSwipeEvent} from '@taiga-ui/cdk/directives/swipe';\nimport {tuiInjectElement, tuiIsElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiGetNativeFocused} from '@taiga-ui/cdk/utils/focus';\nimport {tuiPx} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TuiDropdownMobile} from './dropdown-mobile.directive';\n\nconst GAP = 16;\n\n@Component({\n standalone: true,\n selector: 'tui-dropdown-mobile',\n imports: [NgIf, PolymorpheusOutlet, TuiSwipe, WaIntersectionObserver],\n templateUrl: './dropdown-mobile.template.html',\n styleUrls: ['./dropdown-mobile.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiActiveZone, TuiAnimated],\n host: {\n '[class._sheet]': 'directive.tuiDropdownMobile',\n '(document:click.zoneless.capture)': 'onClick($event)',\n '(window>scroll.zoneless.capture)':\n 'refresh($event.currentTarget.visualViewport)',\n '(visualViewport>resize.zoneless)': 'refresh($event.target)',\n '(visualViewport>scroll.zoneless)': 'refresh($event.target)',\n },\n})\nexport class TuiDropdownMobileComponent implements OnDestroy, AfterViewInit {\n private readonly el = tuiInjectElement();\n private readonly keyboard = inject(TuiKeyboardService);\n private readonly doc = inject(DOCUMENT);\n private readonly scrollTop = this.doc.documentElement.scrollTop;\n private readonly observer = new ResizeObserver(\n () =>\n this.doc.defaultView?.visualViewport &&\n this.refresh(this.doc.defaultView.visualViewport),\n );\n\n protected readonly directive = inject(TuiDropdownMobile);\n protected readonly dropdown = inject(TuiDropdownDirective);\n\n constructor() {\n this.observer.observe(this.dropdown.el);\n this.doc.documentElement.style.setProperty('scroll-behavior', 'initial');\n }\n\n public ngAfterViewInit(): void {\n this.el.scrollTop = this.directive.tuiDropdownMobile ? this.el.clientHeight : 0;\n }\n\n public ngOnDestroy(): void {\n this.observer.disconnect();\n this.doc.body.classList.remove('t-dropdown-mobile');\n this.doc.body.style.removeProperty('--t-root-top');\n this.doc.documentElement.scrollTop = this.scrollTop;\n this.doc.documentElement.style.removeProperty('scroll-behavior');\n\n if (this.focused) {\n this.keyboard.hide();\n }\n }\n\n protected readonly close = (): void => this.dropdown.toggle(false);\n\n protected onClick(event: MouseEvent): void {\n if (\n tuiIsElement(event.target) &&\n !this.el.contains(event.target) &&\n (!this.dropdown.el.contains(event.target) ||\n event.target.matches('input,textarea'))\n ) {\n event.stopPropagation();\n }\n }\n\n protected onSwipe({direction}: TuiSwipeEvent, el: HTMLElement): void {\n if (\n direction === 'bottom' &&\n el.getBoundingClientRect().bottom > Number(this.doc.defaultView?.innerHeight)\n ) {\n this.close();\n }\n }\n\n protected onIntersection({isIntersecting}: IntersectionObserverEntry): void {\n if (isIntersecting) {\n this.close();\n }\n }\n\n protected refresh({offsetTop, height}: VisualViewport): void {\n this.doc.body.style.removeProperty('--t-root-top');\n\n if (\n !this.focused ||\n this.directive.tuiDropdownMobile ||\n !this.doc.documentElement.style.getPropertyValue('scroll-behavior')\n ) {\n return;\n }\n\n this.doc.documentElement.scrollTop = 0;\n\n const rect = this.dropdown.el.getBoundingClientRect();\n const topMargin = `max(var(--tui-dropdown-mobile-offset, ${tuiPx(GAP)}), env(safe-area-inset-top))`;\n const offset = `(${topMargin} + ${tuiPx(rect.height + GAP)})`;\n\n this.el.style.setProperty('top', `calc(${tuiPx(offsetTop)} + ${offset})`);\n this.el.style.setProperty('height', `calc(${tuiPx(height)} - ${offset})`);\n\n this.doc.body.classList.add('t-dropdown-mobile');\n this.doc.body.style.setProperty(\n '--t-root-top',\n `calc(${tuiPx(offsetTop - rect.top)} + ${topMargin})`,\n );\n }\n\n private get focused(): boolean {\n return this.dropdown.el.contains(tuiGetNativeFocused(this.doc));\n }\n}\n","<div\n *ngIf=\"directive.tuiDropdownMobile\"\n waIntersectionObserver\n waIntersectionThreshold=\"1\"\n class=\"t-filler\"\n (touchstart.prevent)=\"close()\"\n (waIntersectionObservee)=\"$event[0] && onIntersection($event[0])\"\n></div>\n<div\n #container\n class=\"t-container\"\n (tuiSwipe)=\"onSwipe($event, container)\"\n>\n <h2\n *ngIf=\"directive.tuiDropdownMobile\"\n class=\"t-heading\"\n >\n {{ directive.tuiDropdownMobile }}\n </h2>\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"dropdown._content() as text; context: {$implicit: close}\">\n {{ text }}\n </ng-container>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;MAwBa,iBAAiB,CAAA;AAjB9B,IAAA,WAAA,GAAA;AAkBqB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,aAAa,CAAC;QAG1C,IAAA,CAAA,iBAAiB,GAAG,EAAE;AAehC,IAAA;AAba,IAAA,WAAW,CAAC,KAAiB,EAAA;QACnC,IACI,CAAC,IAAI,CAAC,QAAQ;AACd,YAAA,CAAC,gBAAgB,CAAC,KAAK,CAAC,MAAM,CAAC;AAC/B,YAAA,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC;YACvC,IAAI,CAAC,iBAAiB,EACxB;YACE;QACJ;QAEA,KAAK,CAAC,cAAc,EAAE;QACtB,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAC,aAAa,EAAE,IAAI,EAAC,CAAC;IAC7C;8GAlBS,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,EA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CAAkC,EAAE,wBAAwB;AAC/D,qBAAA,EAAA,QAAA,EAAA,osBAAA,EAAA,MAAA,EAAA,CAAA,6hHAAA,CAAA,EAAA;;;AExCL;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { afterNextRender, inject, INJECTOR, DestroyRef, NgZone, Injectable, Directive, Output } from '@angular/core';
2
+ import { afterNextRender, inject, INJECTOR, DestroyRef, NgZone, Injectable, Output, Directive } from '@angular/core';
3
3
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
4
  import { tuiScrollFrom, tuiZoneOptimized } from '@taiga-ui/cdk/observables';
5
5
  import { tuiInjectElement, tuiGetElementOffset } from '@taiga-ui/cdk/utils/dom';
@@ -44,21 +44,21 @@ class TuiElasticStickyService extends Observable {
44
44
  this.host.getBoundingClientRect().top ===
45
45
  0);
46
46
  }
47
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiElasticStickyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
48
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiElasticStickyService }); }
47
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiElasticStickyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
48
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiElasticStickyService }); }
49
49
  }
50
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiElasticStickyService, decorators: [{
50
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiElasticStickyService, decorators: [{
51
51
  type: Injectable
52
- }], ctorParameters: function () { return []; } });
52
+ }], ctorParameters: () => [] });
53
53
 
54
54
  class TuiElasticSticky {
55
55
  constructor() {
56
56
  this.tuiElasticSticky = inject(TuiElasticStickyService);
57
57
  }
58
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiElasticSticky, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
59
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiElasticSticky, isStandalone: true, selector: "[tuiElasticSticky]", outputs: { tuiElasticSticky: "tuiElasticSticky" }, providers: [TuiElasticStickyService], exportAs: ["tuiElasticSticky"], ngImport: i0 }); }
58
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiElasticSticky, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
59
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.9", type: TuiElasticSticky, isStandalone: true, selector: "[tuiElasticSticky]", outputs: { tuiElasticSticky: "tuiElasticSticky" }, providers: [TuiElasticStickyService], exportAs: ["tuiElasticSticky"], ngImport: i0 }); }
60
60
  }
61
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiElasticSticky, decorators: [{
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiElasticSticky, decorators: [{
62
62
  type: Directive,
63
63
  args: [{
64
64
  standalone: true,
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-directives-elastic-sticky.mjs","sources":["../../../projects/addon-mobile/directives/elastic-sticky/elastic-sticky.service.ts","../../../projects/addon-mobile/directives/elastic-sticky/elastic-sticky.directive.ts","../../../projects/addon-mobile/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.ts"],"sourcesContent":["import {\n afterNextRender,\n DestroyRef,\n inject,\n Injectable,\n INJECTOR,\n NgZone,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {tuiScrollFrom, tuiZoneOptimized} from '@taiga-ui/cdk/observables';\nimport {tuiGetElementOffset, tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {SCROLL_REF_SELECTOR} from '@taiga-ui/core/components/scrollbar';\nimport {TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\nimport {distinctUntilChanged, map, Observable, scan, Subscription} from 'rxjs';\n\n@Injectable()\nexport class TuiElasticStickyService extends Observable<number> {\n private readonly injector = inject(INJECTOR);\n private readonly el = tuiInjectElement();\n private readonly scrollRef = inject(TUI_SCROLL_REF).nativeElement;\n private readonly destroyRef = inject(DestroyRef);\n private readonly zone = inject(NgZone);\n\n constructor() {\n super((subscriber) => {\n const subscription = new Subscription();\n\n afterNextRender(\n () => {\n const teardown = tuiScrollFrom(this.host)\n .pipe(\n scan(\n (top) => (this.pinned ? top : this.offsetTop),\n this.offsetTop,\n ),\n map((top) =>\n Math.max(\n 1 -\n Math.max(\n Math.round(this.host.scrollTop) - top,\n 0,\n ) /\n this.el.offsetHeight,\n 0,\n ),\n ),\n distinctUntilChanged(),\n tuiZoneOptimized(this.zone),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe(subscriber);\n\n if (!subscription.closed) {\n subscription.add(teardown);\n } else {\n teardown.unsubscribe();\n }\n },\n {injector: this.injector},\n );\n\n return subscription;\n });\n }\n\n private get host(): Element {\n // TODO: Test if we still need it now, that templates pass injector\n return this.el.closest(SCROLL_REF_SELECTOR) || this.scrollRef;\n }\n\n private get offsetTop(): number {\n return tuiGetElementOffset(this.host, this.el).offsetTop;\n }\n\n private get pinned(): boolean {\n return (\n this.el.getBoundingClientRect().top -\n this.host.getBoundingClientRect().top ===\n 0\n );\n }\n}\n","import {Directive, inject, Output} from '@angular/core';\n\nimport {TuiElasticStickyService} from './elastic-sticky.service';\n\n@Directive({\n standalone: true,\n selector: '[tuiElasticSticky]',\n providers: [TuiElasticStickyService],\n exportAs: 'tuiElasticSticky',\n})\nexport class TuiElasticSticky {\n @Output()\n public readonly tuiElasticSticky = inject(TuiElasticStickyService);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAeA,MACa,uBAAwB,SAAQ,UAAkB,CAAA;AAO3D,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,CAAC,CAAC,UAAU,KAAI;AACjB,YAAA,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;YAExC,eAAe,CACX,MAAK;AACD,gBAAA,MAAM,QAAQ,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC;AACpC,qBAAA,IAAI,CACD,IAAI,CACA,CAAC,GAAG,MAAM,IAAI,CAAC,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,EAC7C,IAAI,CAAC,SAAS,CACjB,EACD,GAAG,CAAC,CAAC,GAAG,KACJ,IAAI,CAAC,GAAG,CACJ,CAAC;AACG,oBAAA,IAAI,CAAC,GAAG,CACJ,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,GAAG,EACrC,CAAC,CACJ;wBACG,IAAI,CAAC,EAAE,CAAC,YAAY,EAC5B,CAAC,CACJ,CACJ,EACD,oBAAoB,EAAE,EACtB,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAC3B,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,CACtC;qBACA,SAAS,CAAC,UAAU,CAAC,CAAC;AAE3B,gBAAA,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;AACtB,oBAAA,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC9B,iBAAA;AAAM,qBAAA;oBACH,QAAQ,CAAC,WAAW,EAAE,CAAC;AAC1B,iBAAA;aACJ,EACD,EAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAC,CAC5B,CAAC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AA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,OAAA,EAAA,EAAA,gBAAA,EAAA,kBAAA,EAAA,EAAA,SAAA,EAHd,CAAC,uBAAuB,CAAC,EAAA,QAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAG3B,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAN5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,oBAAoB;oBAC9B,SAAS,EAAE,CAAC,uBAAuB,CAAC;AACpC,oBAAA,QAAQ,EAAE,kBAAkB;AAC/B,iBAAA,CAAA;8BAGmB,gBAAgB,EAAA,CAAA;sBAD/B,MAAM;;;ACXX;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-directives-elastic-sticky.mjs","sources":["../../../projects/addon-mobile/directives/elastic-sticky/elastic-sticky.service.ts","../../../projects/addon-mobile/directives/elastic-sticky/elastic-sticky.directive.ts","../../../projects/addon-mobile/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.ts"],"sourcesContent":["import {\n afterNextRender,\n DestroyRef,\n inject,\n Injectable,\n INJECTOR,\n NgZone,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {tuiScrollFrom, tuiZoneOptimized} from '@taiga-ui/cdk/observables';\nimport {tuiGetElementOffset, tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {SCROLL_REF_SELECTOR} from '@taiga-ui/core/components/scrollbar';\nimport {TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\nimport {distinctUntilChanged, map, Observable, scan, Subscription} from 'rxjs';\n\n@Injectable()\nexport class TuiElasticStickyService extends Observable<number> {\n private readonly injector = inject(INJECTOR);\n private readonly el = tuiInjectElement();\n private readonly scrollRef = inject(TUI_SCROLL_REF).nativeElement;\n private readonly destroyRef = inject(DestroyRef);\n private readonly zone = inject(NgZone);\n\n constructor() {\n super((subscriber) => {\n const subscription = new Subscription();\n\n afterNextRender(\n () => {\n const teardown = tuiScrollFrom(this.host)\n .pipe(\n scan(\n (top) => (this.pinned ? top : this.offsetTop),\n this.offsetTop,\n ),\n map((top) =>\n Math.max(\n 1 -\n Math.max(\n Math.round(this.host.scrollTop) - top,\n 0,\n ) /\n this.el.offsetHeight,\n 0,\n ),\n ),\n distinctUntilChanged(),\n tuiZoneOptimized(this.zone),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe(subscriber);\n\n if (!subscription.closed) {\n subscription.add(teardown);\n } else {\n teardown.unsubscribe();\n }\n },\n {injector: this.injector},\n );\n\n return subscription;\n });\n }\n\n private get host(): Element {\n // TODO: Test if we still need it now, that templates pass injector\n return this.el.closest(SCROLL_REF_SELECTOR) || this.scrollRef;\n }\n\n private get offsetTop(): number {\n return tuiGetElementOffset(this.host, this.el).offsetTop;\n }\n\n private get pinned(): boolean {\n return (\n this.el.getBoundingClientRect().top -\n this.host.getBoundingClientRect().top ===\n 0\n );\n }\n}\n","import {Directive, inject, Output} from '@angular/core';\n\nimport {TuiElasticStickyService} from './elastic-sticky.service';\n\n@Directive({\n standalone: true,\n selector: '[tuiElasticSticky]',\n providers: [TuiElasticStickyService],\n exportAs: 'tuiElasticSticky',\n})\nexport class TuiElasticSticky {\n @Output()\n public readonly tuiElasticSticky = inject(TuiElasticStickyService);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAgBM,MAAO,uBAAwB,SAAQ,UAAkB,CAAA;AAO3D,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,CAAC,CAAC,UAAU,KAAI;AACjB,YAAA,MAAM,YAAY,GAAG,IAAI,YAAY,E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9B,SAAS,EAAE,CAAC,uBAAuB,CAAC;AACpC,oBAAA,QAAQ,EAAE,kBAAkB;AAC/B,iBAAA;8BAGmB,gBAAgB,EAAA,CAAA;sBAD/B;;;ACXL;;AAEG;;;;"}
@@ -24,10 +24,10 @@ class TuiResponsiveDialogService {
24
24
  label: tuiIsString(options.label) ? options.label : '',
25
25
  });
26
26
  }
27
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiResponsiveDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
28
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiResponsiveDialogService, providedIn: 'root' }); }
27
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiResponsiveDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
28
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiResponsiveDialogService, providedIn: 'root' }); }
29
29
  }
30
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiResponsiveDialogService, decorators: [{
30
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiResponsiveDialogService, decorators: [{
31
31
  type: Injectable,
32
32
  args: [{
33
33
  providedIn: 'root',
@@ -35,10 +35,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
35
35
  }] });
36
36
 
37
37
  class TuiResponsiveDialog extends TuiPopoverDirective {
38
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiResponsiveDialog, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
39
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiResponsiveDialog, isStandalone: true, selector: "ng-template[tuiResponsiveDialog]", inputs: { options: ["tuiResponsiveDialogOptions", "options"], open: ["tuiResponsiveDialog", "open"] }, outputs: { openChange: "tuiResponsiveDialogChange" }, providers: [tuiAsPopover(TuiResponsiveDialogService)], usesInheritance: true, ngImport: i0 }); }
38
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiResponsiveDialog, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
39
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.9", type: TuiResponsiveDialog, isStandalone: true, selector: "ng-template[tuiResponsiveDialog]", inputs: { options: ["tuiResponsiveDialogOptions", "options"], open: ["tuiResponsiveDialog", "open"] }, outputs: { openChange: "tuiResponsiveDialogChange" }, providers: [tuiAsPopover(TuiResponsiveDialogService)], usesInheritance: true, ngImport: i0 }); }
40
40
  }
41
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiResponsiveDialog, decorators: [{
41
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiResponsiveDialog, decorators: [{
42
42
  type: Directive,
43
43
  args: [{
44
44
  standalone: true,
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-directives-responsive-dialog.mjs","sources":["../../../projects/addon-mobile/directives/responsive-dialog/responsive-dialog.service.ts","../../../projects/addon-mobile/directives/responsive-dialog/responsive-dialog.directive.ts","../../../projects/addon-mobile/directives/responsive-dialog/taiga-ui-addon-mobile-directives-responsive-dialog.ts"],"sourcesContent":["import {inject, Injectable} from '@angular/core';\nimport {\n type TuiSheetDialogOptions,\n TuiSheetDialogService,\n} from '@taiga-ui/addon-mobile/components/sheet-dialog';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n type TuiDialogContext,\n type TuiDialogOptions,\n TuiDialogService,\n} from '@taiga-ui/core/components/dialog';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport {type Observable} from 'rxjs';\n\nexport interface TuiResponsiveDialogOptions<I = undefined>\n extends Omit<TuiDialogOptions<I>, 'label'>,\n TuiSheetDialogOptions<unknown> {\n readonly data: I extends void ? undefined : I & {button?: string};\n readonly label: PolymorpheusContent;\n}\n\n/**\n * Same as `TuiDialogService` but automatically switches to `TuiSheetDialogService` on mobile\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiResponsiveDialogService {\n private readonly isMobile = inject(TUI_IS_MOBILE);\n private readonly dialogs = inject(TuiDialogService);\n private readonly sheets = inject(TuiSheetDialogService);\n\n public open<G = void>(\n content: PolymorpheusContent<\n TuiDialogContext<G> & TuiResponsiveDialogOptions<any>\n >,\n options: Partial<TuiResponsiveDialogOptions<any>> = {},\n ): Observable<G> {\n return this.isMobile\n ? this.sheets.open(content, options)\n : this.dialogs.open(content, {\n ...options,\n label: tuiIsString(options.label) ? options.label : '',\n });\n }\n}\n","import {Directive} from '@angular/core';\nimport {TuiPopoverDirective} from '@taiga-ui/cdk/directives/popover';\nimport {tuiAsPopover} from '@taiga-ui/cdk/services';\n\nimport {\n type TuiResponsiveDialogOptions,\n TuiResponsiveDialogService,\n} from './responsive-dialog.service';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiResponsiveDialog]',\n inputs: ['options: tuiResponsiveDialogOptions', 'open: tuiResponsiveDialog'],\n outputs: ['openChange: tuiResponsiveDialogChange'],\n providers: [tuiAsPopover(TuiResponsiveDialogService as any)],\n})\nexport class TuiResponsiveDialog extends TuiPopoverDirective<TuiResponsiveDialogOptions> {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAsBA;;AAEG;AACH,MAGa,0BAA0B,CAAA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AAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,mBAAmB,4OAFjB,CAAC,YAAY,CAAC,0BAAiC,CAAC,CAAC,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAEnD,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAP/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,kCAAkC;AAC5C,oBAAA,MAAM,EAAE,CAAC,qCAAqC,EAAE,2BAA2B,CAAC;oBAC5E,OAAO,EAAE,CAAC,uCAAuC,CAAC;AAClD,oBAAA,SAAS,EAAE,CAAC,YAAY,CAAC,0BAAiC,CAAC,CAAC;AAC/D,iBAAA,CAAA;;;ACfD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-directives-responsive-dialog.mjs","sources":["../../../projects/addon-mobile/directives/responsive-dialog/responsive-dialog.service.ts","../../../projects/addon-mobile/directives/responsive-dialog/responsive-dialog.directive.ts","../../../projects/addon-mobile/directives/responsive-dialog/taiga-ui-addon-mobile-directives-responsive-dialog.ts"],"sourcesContent":["import {inject, Injectable} from '@angular/core';\nimport {\n type TuiSheetDialogOptions,\n TuiSheetDialogService,\n} from '@taiga-ui/addon-mobile/components/sheet-dialog';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n type TuiDialogContext,\n type TuiDialogOptions,\n TuiDialogService,\n} from '@taiga-ui/core/components/dialog';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport {type Observable} from 'rxjs';\n\nexport interface TuiResponsiveDialogOptions<I = undefined>\n extends Omit<TuiDialogOptions<I>, 'label'>,\n TuiSheetDialogOptions<unknown> {\n readonly data: I extends void ? undefined : I & {button?: string};\n readonly label: PolymorpheusContent;\n}\n\n/**\n * Same as `TuiDialogService` but automatically switches to `TuiSheetDialogService` on mobile\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiResponsiveDialogService {\n private readonly isMobile = inject(TUI_IS_MOBILE);\n private readonly dialogs = inject(TuiDialogService);\n private readonly sheets = inject(TuiSheetDialogService);\n\n public open<G = void>(\n content: PolymorpheusContent<\n TuiDialogContext<G> & TuiResponsiveDialogOptions<any>\n >,\n options: Partial<TuiResponsiveDialogOptions<any>> = {},\n ): Observable<G> {\n return this.isMobile\n ? this.sheets.open(content, options)\n : this.dialogs.open(content, {\n ...options,\n label: tuiIsString(options.label) ? options.label : '',\n });\n }\n}\n","import {Directive} from '@angular/core';\nimport {TuiPopoverDirective} from '@taiga-ui/cdk/directives/popover';\nimport {tuiAsPopover} from '@taiga-ui/cdk/services';\n\nimport {\n type TuiResponsiveDialogOptions,\n TuiResponsiveDialogService,\n} from './responsive-dialog.service';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiResponsiveDialog]',\n inputs: ['options: tuiResponsiveDialogOptions', 'open: tuiResponsiveDialog'],\n outputs: ['openChange: tuiResponsiveDialogChange'],\n providers: [tuiAsPopover(TuiResponsiveDialogService as any)],\n})\nexport class TuiResponsiveDialog extends TuiPopoverDirective<TuiResponsiveDialogOptions> {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAsBA;;AAEG;MAIU,0BAA0B,CAAA;AAHvC,IAAA,WAAA,GAAA;AAIqB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,aAAa,CAAC;AAChC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAClC,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,qBAAqB,CAAC;AAe1D,IAAA;AAbU,IAAA,IAAI,CACP,OAEC,EACD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CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,kCAAkC;AAC5C,oBAAA,MAAM,EAAE,CAAC,qCAAqC,EAAE,2BAA2B,CAAC;oBAC5E,OAAO,EAAE,CAAC,uCAAuC,CAAC;AAClD,oBAAA,SAAS,EAAE,CAAC,YAAY,CAAC,0BAAiC,CAAC,CAAC;AAC/D,iBAAA;;;ACfD;;AAEG;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { DOCUMENT } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { Component, ViewEncapsulation, ChangeDetectionStrategy, inject, DestroyRef, Directive, Input } from '@angular/core';
3
+ import { ChangeDetectionStrategy, ViewEncapsulation, Component, inject, DestroyRef, Input, Directive } from '@angular/core';
4
4
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
5
  import { tuiTypedFromEvent } from '@taiga-ui/cdk/observables';
6
6
  import { tuiIsHTMLElement } from '@taiga-ui/cdk/utils/dom';
@@ -27,10 +27,10 @@ const FROM_KEYFRAMES = [
27
27
  },
28
28
  ];
29
29
  class TuiRippleStyles {
30
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiRippleStyles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
31
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiRippleStyles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-ripple-styles" }, ngImport: i0, template: '', isInline: true, styles: [".tui-ripple{position:absolute;z-index:100;opacity:.12;border-radius:100%;background:var(--tui-ripple-background, currentColor);animation-fill-mode:forwards;pointer-events:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
30
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiRippleStyles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
31
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.9", type: TuiRippleStyles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-ripple-styles" }, ngImport: i0, template: '', isInline: true, styles: [".tui-ripple{position:absolute;z-index:100;opacity:.12;border-radius:100%;background:var(--tui-ripple-background, currentColor);animation-fill-mode:forwards;pointer-events:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
32
32
  }
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiRippleStyles, decorators: [{
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiRippleStyles, decorators: [{
34
34
  type: Component,
35
35
  args: [{ standalone: true, template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
36
36
  class: 'tui-ripple-styles',
@@ -80,10 +80,10 @@ class TuiRipple {
80
80
  });
81
81
  return ripple;
82
82
  }
83
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiRipple, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
84
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiRipple, isStandalone: true, selector: "[tuiRipple]", inputs: { tuiRipple: "tuiRipple" }, host: { listeners: { "pointerdown.zoneless": "start($event.clientX, $event.clientY, $event.target, $event.currentTarget)" } }, ngImport: i0 }); }
83
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiRipple, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
84
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.9", type: TuiRipple, isStandalone: true, selector: "[tuiRipple]", inputs: { tuiRipple: "tuiRipple" }, host: { listeners: { "pointerdown.zoneless": "start($event.clientX, $event.clientY, $event.target, $event.currentTarget)" } }, ngImport: i0 }); }
85
85
  }
86
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiRipple, decorators: [{
86
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiRipple, decorators: [{
87
87
  type: Directive,
88
88
  args: [{
89
89
  standalone: true,
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-directives-ripple.mjs","sources":["../../../projects/addon-mobile/directives/ripple/ripple.directive.ts","../../../projects/addon-mobile/directives/ripple/taiga-ui-addon-mobile-directives-ripple.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n Directive,\n inject,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\nimport {tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiPx, tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_ANIMATIONS_SPEED} from '@taiga-ui/core/tokens';\nimport {tuiGetDuration} from '@taiga-ui/core/utils/miscellaneous';\nimport {first, merge, race, switchMap, tap} from 'rxjs';\n\nconst TO_KEYFRAMES = [\n {\n transform: 'scale(0)',\n opacity: '0.12',\n },\n {\n opacity: '0.12',\n },\n];\nconst FROM_KEYFRAMES = [\n {\n opacity: '0.12',\n },\n {\n opacity: '0',\n },\n];\n\n@Component({\n standalone: true,\n template: '',\n styleUrls: ['./ripple.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-ripple-styles',\n },\n})\nclass TuiRippleStyles {}\n\n@Directive({\n standalone: true,\n selector: '[tuiRipple]',\n host: {\n '(pointerdown.zoneless)':\n 'start($event.clientX, $event.clientY, $event.target, $event.currentTarget)',\n },\n})\nexport class TuiRipple {\n private readonly doc = inject(DOCUMENT);\n private readonly destroyRef = inject(DestroyRef);\n private readonly animationOptions = {\n duration: tuiGetDuration(inject(TUI_ANIMATIONS_SPEED)),\n };\n\n protected readonly nothing = tuiWithStyles(TuiRippleStyles);\n\n @Input()\n public tuiRipple = '';\n\n protected start(x: number, y: number, target: HTMLElement, el: HTMLElement): void {\n const element = this.tuiRipple ? target.closest(this.tuiRipple) : el;\n\n if (!tuiIsHTMLElement(element)) {\n return;\n }\n\n const ripple = this.createRipple(x, y, element.getBoundingClientRect());\n const touchEnd$ = merge(\n tuiTypedFromEvent(element, 'pointerup'),\n tuiTypedFromEvent(element, 'pointercancel'),\n tuiTypedFromEvent(element, 'pointermove'),\n );\n\n element.appendChild(ripple);\n\n const animationEndOn$ = tuiTypedFromEvent(\n ripple.animate(TO_KEYFRAMES, this.animationOptions),\n 'finish',\n );\n\n race(\n touchEnd$.pipe(switchMap(() => animationEndOn$)),\n animationEndOn$.pipe(switchMap(() => touchEnd$)),\n )\n .pipe(\n first(),\n switchMap(() =>\n tuiTypedFromEvent(\n ripple.animate(FROM_KEYFRAMES, this.animationOptions),\n 'finish',\n ),\n ),\n first(),\n tap(() => element.removeChild(ripple)),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe();\n }\n\n private createRipple(\n clientX: number,\n clientY: number,\n {width, height, top, left}: DOMRect,\n ): HTMLElement {\n const ripple: HTMLElement = this.doc.createElement('div');\n const radius = Math.sqrt(width * width + height * height);\n const dimension = radius * 2;\n const x = clientX - left - radius;\n const y = clientY - top - radius;\n\n Object.assign(ripple.style, {\n position: 'absolute',\n top: tuiPx(y),\n left: tuiPx(x),\n width: tuiPx(dimension),\n height: tuiPx(dimension),\n zIndex: 100,\n opacity: 0.12,\n borderRadius: '100%',\n background: 'var(--tui-ripple-background, currentColor)',\n animationFillMode: 'forwards',\n pointerEvents: 'none',\n });\n\n return ripple;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAkBA,MAAM,YAAY,GAAG;AACjB,IAAA;AACI,QAAA,SAAS,EAAE,UAAU;AACrB,QAAA,OAAO,EAAE,MAAM;AAClB,KAAA;AACD,IAAA;AACI,QAAA,OAAO,EAAE,MAAM;AAClB,KAAA;CACJ,CAAC;AACF,MAAM,cAAc,GAAG;AACnB,IAAA;AACI,QAAA,OAAO,EAAE,MAAM;AAClB,KAAA;AACD,IAAA;AACI,QAAA,OAAO,EAAE,GAAG;AACf,KAAA;CACJ,CAAC;AAEF,MAUM,eAAe,CAAA;+GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,eAAe,uHARP,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,oLAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;4FAQV,eAAe,EAAA,UAAA,EAAA,CAAA;kBAVpB,SAAS;iCACM,IAAI,EAAA,QAAA,EACN,EAAE,EAAA,aAAA,EAEG,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA;AACF,wBAAA,KAAK,EAAE,mBAAmB;AAC7B,qBAAA,EAAA,MAAA,EAAA,CAAA,oLAAA,CAAA,EAAA,CAAA;;AAIL,MAQa,SAAS,CAAA;AARtB,IAAA,WAAA,GAAA;AASqB,QAAA,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AA4C;AACxD,YAAA,iBAAiB,EAAE,UAAU;AAC7B,YAAA,aAAa,EAAE,MAAM;AACxB,SAAA,CAAC,CAAC;AAEH,QAAA,OAAO,MAAM,CAAC;KACjB;+GA9EQ,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAAT,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,sBAAA,EAAA,4EAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAAT,SAAS,EAAA,UAAA,EAAA,CAAA;kBARrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,IAAI,EAAE;AACF,wBAAA,wBAAwB,EACpB,4EAA4E;AACnF,qBAAA;AACJ,iBAAA,CAAA;8BAWU,SAAS,EAAA,CAAA;sBADf,KAAK;;;ACjEV;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-directives-ripple.mjs","sources":["../../../projects/addon-mobile/directives/ripple/ripple.directive.ts","../../../projects/addon-mobile/directives/ripple/taiga-ui-addon-mobile-directives-ripple.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n Directive,\n inject,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\nimport {tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiPx, tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_ANIMATIONS_SPEED} from '@taiga-ui/core/tokens';\nimport {tuiGetDuration} from '@taiga-ui/core/utils/miscellaneous';\nimport {first, merge, race, switchMap, tap} from 'rxjs';\n\nconst TO_KEYFRAMES = [\n {\n transform: 'scale(0)',\n opacity: '0.12',\n },\n {\n opacity: '0.12',\n },\n];\nconst FROM_KEYFRAMES = [\n {\n opacity: '0.12',\n },\n {\n opacity: '0',\n },\n];\n\n@Component({\n standalone: true,\n template: '',\n styleUrls: ['./ripple.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-ripple-styles',\n },\n})\nclass TuiRippleStyles {}\n\n@Directive({\n standalone: true,\n selector: '[tuiRipple]',\n host: {\n '(pointerdown.zoneless)':\n 'start($event.clientX, $event.clientY, $event.target, $event.currentTarget)',\n },\n})\nexport class TuiRipple {\n private readonly doc = inject(DOCUMENT);\n private readonly destroyRef = inject(DestroyRef);\n private readonly animationOptions = {\n duration: tuiGetDuration(inject(TUI_ANIMATIONS_SPEED)),\n };\n\n protected readonly nothing = tuiWithStyles(TuiRippleStyles);\n\n @Input()\n public tuiRipple = '';\n\n protected start(x: number, y: number, target: HTMLElement, el: HTMLElement): void {\n const element = this.tuiRipple ? target.closest(this.tuiRipple) : el;\n\n if (!tuiIsHTMLElement(element)) {\n return;\n }\n\n const ripple = this.createRipple(x, y, element.getBoundingClientRect());\n const touchEnd$ = merge(\n tuiTypedFromEvent(element, 'pointerup'),\n tuiTypedFromEvent(element, 'pointercancel'),\n tuiTypedFromEvent(element, 'pointermove'),\n );\n\n element.appendChild(ripple);\n\n const animationEndOn$ = tuiTypedFromEvent(\n ripple.animate(TO_KEYFRAMES, this.animationOptions),\n 'finish',\n );\n\n race(\n touchEnd$.pipe(switchMap(() => animationEndOn$)),\n animationEndOn$.pipe(switchMap(() => touchEnd$)),\n )\n .pipe(\n first(),\n switchMap(() =>\n tuiTypedFromEvent(\n ripple.animate(FROM_KEYFRAMES, this.animationOptions),\n 'finish',\n ),\n ),\n first(),\n tap(() => element.removeChild(ripple)),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe();\n }\n\n private createRipple(\n clientX: number,\n clientY: number,\n {width, height, top, left}: DOMRect,\n ): HTMLElement {\n const ripple: HTMLElement = this.doc.createElement('div');\n const radius = Math.sqrt(width * width + height * height);\n const dimension = radius * 2;\n const x = clientX - left - radius;\n const y = clientY - top - radius;\n\n Object.assign(ripple.style, {\n position: 'absolute',\n top: tuiPx(y),\n left: tuiPx(x),\n width: tuiPx(dimension),\n height: tuiPx(dimension),\n zIndex: 100,\n opacity: 0.12,\n borderRadius: '100%',\n background: 'var(--tui-ripple-background, currentColor)',\n animationFillMode: 'forwards',\n pointerEvents: 'none',\n });\n\n return ripple;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAkBA,MAAM,YAAY,GAAG;AACjB,IAAA;AACI,QAAA,SAAS,EAAE,UAAU;AACrB,QAAA,OAAO,EAAE,MAAM;AAClB,KAAA;AACD,IAAA;AACI,QAAA,OAAO,EAAE,MAAM;AAClB,KAAA;CACJ;AACD,MAAM,cAAc,GAAG;AACnB,IAAA;AACI,QAAA,OAAO,EAAE,MAAM;AAClB,KAAA;AACD,IAAA;AACI,QAAA,OAAO,EAAE,GAAG;AACf,KAAA;CACJ;AAED,MAUM,eAAe,CAAA;8GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAe,uHARP,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,oLAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,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,EAAE,KAAK,CAAC,CAAC,CAAC;AACb,YAAA,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;AACd,YAAA,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;AACvB,YAAA,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;AACxB,YAAA,MAAM,EAAE,GAAG;AACX,YAAA,OAAO,EAAE,IAAI;AACb,YAAA,YAAY,EAAE,MAAM;AACpB,YAAA,UAAU,EAAE,4CAA4C;AACxD,YAAA,iBAAiB,EAAE,UAAU;AAC7B,YAAA,aAAa,EAAE,MAAM;AACxB,SAAA,CAAC;AAEF,QAAA,OAAO,MAAM;IACjB;8GA9ES,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAT,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,sBAAA,EAAA,4EAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAT,SAAS,EAAA,UAAA,EAAA,CAAA;kBARrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,IAAI,EAAE;AACF,wBAAA,wBAAwB,EACpB,4EAA4E;AACnF,qBAAA;AACJ,iBAAA;8BAWU,SAAS,EAAA,CAAA;sBADf;;;ACjEL;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, INJECTOR, TemplateRef, Directive, Input, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { inject, INJECTOR, TemplateRef, Input, Directive, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
4
4
  import { tuiSlideIn } from '@taiga-ui/core/animations';
5
5
  import { TUI_ANIMATIONS_SPEED } from '@taiga-ui/core/tokens';
@@ -46,10 +46,10 @@ class TuiSidebarDirective extends PolymorpheusTemplate {
46
46
  this.service.remove(this.sidebarRef);
47
47
  this.sidebarRef = null;
48
48
  }
49
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSidebarDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
50
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiSidebarDirective, isStandalone: true, selector: "[tuiSidebar]", inputs: { direction: ["tuiSidebarDirection", "direction"], autoWidth: ["tuiSidebarAutoWidth", "autoWidth"], tuiSidebar: "tuiSidebar" }, usesInheritance: true, ngImport: i0 }); }
49
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiSidebarDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
50
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.9", type: TuiSidebarDirective, isStandalone: true, selector: "[tuiSidebar]", inputs: { direction: ["tuiSidebarDirection", "direction"], autoWidth: ["tuiSidebarAutoWidth", "autoWidth"], tuiSidebar: "tuiSidebar" }, usesInheritance: true, ngImport: i0 }); }
51
51
  }
52
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSidebarDirective, decorators: [{
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiSidebarDirective, decorators: [{
53
53
  type: Directive,
54
54
  args: [{
55
55
  standalone: true,
@@ -90,10 +90,10 @@ class TuiSidebarComponent {
90
90
  get autoWidth() {
91
91
  return this.directive.autoWidth;
92
92
  }
93
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
94
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiSidebarComponent, isStandalone: true, selector: "aside[tuiSidebar]", host: { properties: { "class": "\"t-\" + direction", "@tuiSlideIn": "animation" } }, ngImport: i0, template: "<div\n tuiActiveZone\n class=\"t-wrapper\"\n [class.t-wrapper_auto-width]=\"autoWidth\"\n>\n <ng-container *polymorpheusOutlet=\"content as text\">\n {{ text }}\n </ng-container>\n</div>\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;display:flex}:host:before,:host:after{position:absolute;top:0;left:0;inline-size:100%;content:\"\";block-size:100%;background:#00000061;animation:tuiFadeIn var(--tui-duration)}:host:before{left:-100%;inline-size:200%}:host:after{left:100%}:host.ng-animating:before,:host.ng-animating:after{opacity:0;transition:opacity var(--tui-duration)}:host.t-right{justify-content:flex-end}:host.t-left{justify-content:flex-start}.t-wrapper{position:relative;display:flex;flex-direction:column;background:var(--tui-background-base);box-shadow:0 10rem var(--tui-background-base);inline-size:17.25rem}.t-wrapper_auto-width{inline-size:auto}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiActiveZone, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }], animations: [tuiSlideIn], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
93
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiSidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
94
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.9", type: TuiSidebarComponent, isStandalone: true, selector: "aside[tuiSidebar]", host: { properties: { "class": "\"t-\" + direction", "@tuiSlideIn": "animation" } }, ngImport: i0, template: "<div\n tuiActiveZone\n class=\"t-wrapper\"\n [class.t-wrapper_auto-width]=\"autoWidth\"\n>\n <ng-container *polymorpheusOutlet=\"content as text\">\n {{ text }}\n </ng-container>\n</div>\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;display:flex}:host:before,:host:after{position:absolute;top:0;left:0;inline-size:100%;content:\"\";block-size:100%;background:#00000061;animation:tuiFadeIn var(--tui-duration)}:host:before{left:-100%;inline-size:200%}:host:after{left:100%}:host.ng-animating:before,:host.ng-animating:after{opacity:0;transition:opacity var(--tui-duration)}:host.t-right{justify-content:flex-end}:host.t-left{justify-content:flex-start}.t-wrapper{position:relative;display:flex;flex-direction:column;background:var(--tui-background-base);box-shadow:0 10rem var(--tui-background-base);inline-size:17.25rem}.t-wrapper_auto-width{inline-size:auto}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiActiveZone, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }], animations: [tuiSlideIn], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
95
95
  }
96
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSidebarComponent, decorators: [{
96
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiSidebarComponent, decorators: [{
97
97
  type: Component,
98
98
  args: [{ standalone: true, selector: 'aside[tuiSidebar]', imports: [PolymorpheusOutlet, TuiActiveZone], changeDetection: ChangeDetectionStrategy.OnPush, animations: [tuiSlideIn], host: {
99
99
  '[class]': '"t-" + direction',
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-directives-sidebar.mjs","sources":["../../../projects/addon-mobile/directives/sidebar/sidebar.directive.ts","../../../projects/addon-mobile/directives/sidebar/sidebar.component.ts","../../../projects/addon-mobile/directives/sidebar/sidebar.template.html","../../../projects/addon-mobile/directives/sidebar/sidebar.ts","../../../projects/addon-mobile/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.ts"],"sourcesContent":["import {\n type ComponentRef,\n Directive,\n inject,\n INJECTOR,\n Input,\n type OnDestroy,\n TemplateRef,\n} from '@angular/core';\nimport {TuiPopupService} from '@taiga-ui/core/directives/popup';\nimport {type TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {PolymorpheusComponent, PolymorpheusTemplate} from '@taiga-ui/polymorpheus';\n\nimport {TuiSidebarComponent} from './sidebar.component';\n\n/**\n * @deprecated use {@link TuiDrawer} instead\n */\n@Directive({\n standalone: true,\n selector: '[tuiSidebar]',\n})\nexport class TuiSidebarDirective<T = Record<string, unknown>>\n extends PolymorpheusTemplate<T>\n implements OnDestroy\n{\n private readonly injector = inject(INJECTOR);\n private readonly service = inject(TuiPopupService);\n\n private readonly component = new PolymorpheusComponent(\n TuiSidebarComponent,\n this.injector,\n );\n\n private sidebarRef: ComponentRef<TuiSidebarComponent> | null = null;\n\n @Input('tuiSidebarDirection')\n public direction: TuiHorizontalDirection = 'left';\n\n @Input('tuiSidebarAutoWidth')\n public autoWidth = false;\n\n public readonly content = inject(TemplateRef<T>);\n\n @Input()\n public set tuiSidebar(open: boolean) {\n if (open) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n public ngOnDestroy(): void {\n this.hide();\n }\n\n private show(): void {\n if (this.sidebarRef !== null) {\n return;\n }\n\n this.sidebarRef = this.service.add(this.component);\n this.sidebarRef.changeDetectorRef.detectChanges();\n }\n\n private hide(): void {\n if (this.sidebarRef === null) {\n return;\n }\n\n this.service.remove(this.sidebarRef);\n this.sidebarRef = null;\n }\n}\n","import {type AnimationOptions} from '@angular/animations';\nimport {ChangeDetectionStrategy, Component, type DoCheck, inject} from '@angular/core';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {tuiSlideIn} from '@taiga-ui/core/animations';\nimport {TUI_ANIMATIONS_SPEED} from '@taiga-ui/core/tokens';\nimport {type TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {tuiToAnimationOptions} from '@taiga-ui/core/utils/miscellaneous';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TuiSidebarDirective} from './sidebar.directive';\n\n/**\n * @deprecated use {@link TuiDrawer} instead\n */\n@Component({\n standalone: true,\n selector: 'aside[tuiSidebar]',\n imports: [PolymorpheusOutlet, TuiActiveZone],\n templateUrl: './sidebar.template.html',\n styleUrls: ['./sidebar.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [tuiSlideIn],\n host: {\n '[class]': '\"t-\" + direction',\n '[@tuiSlideIn]': 'animation',\n },\n})\nexport class TuiSidebarComponent implements DoCheck {\n private readonly directive = inject(TuiSidebarDirective);\n private readonly options = tuiToAnimationOptions(inject(TUI_ANIMATIONS_SPEED));\n private readonly left = {...this.options, value: 'left'};\n private readonly right = {...this.options, value: 'right'};\n\n public ngDoCheck(): void {\n this.directive.check();\n }\n\n protected get animation(): AnimationOptions {\n return this.direction === 'left' ? this.left : this.right;\n }\n\n protected get direction(): TuiHorizontalDirection {\n return this.directive.direction;\n }\n\n protected get content(): PolymorpheusContent {\n return this.directive.content;\n }\n\n protected get autoWidth(): boolean {\n return this.directive.autoWidth;\n }\n}\n","<div\n tuiActiveZone\n class=\"t-wrapper\"\n [class.t-wrapper_auto-width]=\"autoWidth\"\n>\n <ng-container *polymorpheusOutlet=\"content as text\">\n {{ text }}\n </ng-container>\n</div>\n","import {TuiSidebarComponent} from './sidebar.component';\nimport {TuiSidebarDirective} from './sidebar.directive';\n\n/**\n * @deprecated use {@link TuiDrawer} instead\n */\nexport const TuiSidebar = [TuiSidebarComponent, TuiSidebarDirective] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAeA;;AAEG;AACH,MAIa,mBACT,SAAQ,oBAAuB,CAAA;AALnC,IAAA,WAAA,GAAA;;AAQqB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC5B,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;QAElC,IAAS,CAAA,SAAA,GAAG,IAAI,qBAAqB,CAClD,mBAAmB,EACnB,IAAI,CAAC,QAAQ,CAChB,CAAC;QAEM,IAAU,CAAA,UAAA,GAA6C,IAAI,CAAC;QAG7D,IAAS,CAAA,SAAA,GAA2B,MAAM,CAAC;QAG3C,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;AAET,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,EAAC,WAAc,EAAC,CAAC;AAgCpD,KAAA;IA9BG,IACW,UAAU,CAAC,IAAa,EAAA;AAC/B,QAAA,IAAI,IAAI,EAAE;YACN,IAAI,CAAC,IAAI,EAAE,CAAC;AACf,SAAA;AAAM,aAAA;YACH,IAAI,CAAC,IAAI,EAAE,CAAC;AACf,SAAA;KACJ;IAEM,WAAW,GAAA;QACd,IAAI,CAAC,IAAI,EAAE,CAAC;KACf;IAEO,IAAI,GAAA;AACR,QAAA,IAAI,IAAI,CAAC,UAAU,KAAK,IAAI,EAAE;YAC1B,OAAO;AACV,SAAA;AAED,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACnD,QAAA,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,aAAa,EAAE,CAAC;KACrD;IAEO,I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A,UAAA,EAI/B,CAAC,UAAU,CAAC,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;4FAMf,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAb/B,SAAS;AACM,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,YACN,mBAAmB,EAAA,OAAA,EACpB,CAAC,kBAAkB,EAAE,aAAa,CAAC,EAG3B,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,CAAC,UAAU,CAAC,EAClB,IAAA,EAAA;AACF,wBAAA,SAAS,EAAE,kBAAkB;AAC7B,wBAAA,eAAe,EAAE,WAAW;AAC/B,qBAAA,EAAA,QAAA,EAAA,oNAAA,EAAA,MAAA,EAAA,CAAA,yrBAAA,CAAA,EAAA,CAAA;;;AEtBL;;AAEG;MACU,UAAU,GAAG,CAAC,mBAAmB,EAAE,mBAAmB;;ACNnE;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-directives-sidebar.mjs","sources":["../../../projects/addon-mobile/directives/sidebar/sidebar.directive.ts","../../../projects/addon-mobile/directives/sidebar/sidebar.component.ts","../../../projects/addon-mobile/directives/sidebar/sidebar.template.html","../../../projects/addon-mobile/directives/sidebar/sidebar.ts","../../../projects/addon-mobile/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.ts"],"sourcesContent":["import {\n type ComponentRef,\n Directive,\n inject,\n INJECTOR,\n Input,\n type OnDestroy,\n TemplateRef,\n} from '@angular/core';\nimport {TuiPopupService} from '@taiga-ui/core/directives/popup';\nimport {type TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {PolymorpheusComponent, PolymorpheusTemplate} from '@taiga-ui/polymorpheus';\n\nimport {TuiSidebarComponent} from './sidebar.component';\n\n/**\n * @deprecated use {@link TuiDrawer} instead\n */\n@Directive({\n standalone: true,\n selector: '[tuiSidebar]',\n})\nexport class TuiSidebarDirective<T = Record<string, unknown>>\n extends PolymorpheusTemplate<T>\n implements OnDestroy\n{\n private readonly injector = inject(INJECTOR);\n private readonly service = inject(TuiPopupService);\n\n private readonly component = new PolymorpheusComponent(\n TuiSidebarComponent,\n this.injector,\n );\n\n private sidebarRef: ComponentRef<TuiSidebarComponent> | null = null;\n\n @Input('tuiSidebarDirection')\n public direction: TuiHorizontalDirection = 'left';\n\n @Input('tuiSidebarAutoWidth')\n public autoWidth = false;\n\n public readonly content = inject(TemplateRef<T>);\n\n @Input()\n public set tuiSidebar(open: boolean) {\n if (open) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n public ngOnDestroy(): void {\n this.hide();\n }\n\n private show(): void {\n if (this.sidebarRef !== null) {\n return;\n }\n\n this.sidebarRef = this.service.add(this.component);\n this.sidebarRef.changeDetectorRef.detectChanges();\n }\n\n private hide(): void {\n if (this.sidebarRef === null) {\n return;\n }\n\n this.service.remove(this.sidebarRef);\n this.sidebarRef = null;\n }\n}\n","import {type AnimationOptions} from '@angular/animations';\nimport {ChangeDetectionStrategy, Component, type DoCheck, inject} from '@angular/core';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {tuiSlideIn} from '@taiga-ui/core/animations';\nimport {TUI_ANIMATIONS_SPEED} from '@taiga-ui/core/tokens';\nimport {type TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {tuiToAnimationOptions} from '@taiga-ui/core/utils/miscellaneous';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TuiSidebarDirective} from './sidebar.directive';\n\n/**\n * @deprecated use {@link TuiDrawer} instead\n */\n@Component({\n standalone: true,\n selector: 'aside[tuiSidebar]',\n imports: [PolymorpheusOutlet, TuiActiveZone],\n templateUrl: './sidebar.template.html',\n styleUrls: ['./sidebar.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [tuiSlideIn],\n host: {\n '[class]': '\"t-\" + direction',\n '[@tuiSlideIn]': 'animation',\n },\n})\nexport class TuiSidebarComponent implements DoCheck {\n private readonly directive = inject(TuiSidebarDirective);\n private readonly options = tuiToAnimationOptions(inject(TUI_ANIMATIONS_SPEED));\n private readonly left = {...this.options, value: 'left'};\n private readonly right = {...this.options, value: 'right'};\n\n public ngDoCheck(): void {\n this.directive.check();\n }\n\n protected get animation(): AnimationOptions {\n return this.direction === 'left' ? this.left : this.right;\n }\n\n protected get direction(): TuiHorizontalDirection {\n return this.directive.direction;\n }\n\n protected get content(): PolymorpheusContent {\n return this.directive.content;\n }\n\n protected get autoWidth(): boolean {\n return this.directive.autoWidth;\n }\n}\n","<div\n tuiActiveZone\n class=\"t-wrapper\"\n [class.t-wrapper_auto-width]=\"autoWidth\"\n>\n <ng-container *polymorpheusOutlet=\"content as text\">\n {{ text }}\n </ng-container>\n</div>\n","import {TuiSidebarComponent} from './sidebar.component';\nimport {TuiSidebarDirective} from './sidebar.directive';\n\n/**\n * @deprecated use {@link TuiDrawer} instead\n */\nexport const TuiSidebar = [TuiSidebarComponent, TuiSidebarDirective] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAeA;;AAEG;AAKG,MAAO,mBACT,SAAQ,oBAAuB,CAAA;AALnC,IAAA,WAAA,GAAA;;AAQqB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC;QAEjC,IAAA,CAAA,SAAS,GAAG,IAAI,qBAAqB,CAClD,mBAAmB,EACnB,IAAI,CAAC,QAAQ,CAChB;QAEO,IAAA,CAAA,UAAU,GAA6C,IAAI;QAG5D,IAAA,CAAA,SAAS,GAA2B,MAAM;QAG1C,IAAA,CAAA,SAAS,GAAG,KAAK;AAER,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,EAAC,WAAc,EAAC;AAgCnD,IAAA;IA9BG,IACW,UAAU,CAAC,IAAa,EAAA;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A,EC3BhC,oNASA,EAAA,MAAA,EAAA,CAAA,yrBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDQc,kBAAkB,8HAAE,aAAa,EAAA,QAAA,EAAA,qHAAA,EAAA,MAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,eAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAI/B,CAAC,UAAU,CAAC,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAMf,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAb/B,SAAS;AACM,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,YACN,mBAAmB,EAAA,OAAA,EACpB,CAAC,kBAAkB,EAAE,aAAa,CAAC,EAAA,eAAA,EAG3B,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,CAAC,UAAU,CAAC,EAAA,IAAA,EAClB;AACF,wBAAA,SAAS,EAAE,kBAAkB;AAC7B,wBAAA,eAAe,EAAE,WAAW;AAC/B,qBAAA,EAAA,QAAA,EAAA,oNAAA,EAAA,MAAA,EAAA,CAAA,yrBAAA,CAAA,EAAA;;;AEtBL;;AAEG;MACU,UAAU,GAAG,CAAC,mBAAmB,EAAE,mBAAmB;;ACNnE;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, Directive, Input } from '@angular/core';
2
+ import { inject, Input, Directive } from '@angular/core';
3
3
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
4
  import { tuiTypedFromEvent } from '@taiga-ui/cdk/observables';
5
5
  import { TUI_IS_IOS } from '@taiga-ui/cdk/tokens';
@@ -56,16 +56,16 @@ class TuiTouchable {
56
56
  }
57
57
  this.el.style.setProperty(this.style, STYLE[this.style]);
58
58
  }
59
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiTouchable, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
60
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiTouchable, isStandalone: true, selector: "[tuiTouchable]", inputs: { tuiTouchable: "tuiTouchable" }, ngImport: i0 }); }
59
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiTouchable, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
60
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.9", type: TuiTouchable, isStandalone: true, selector: "[tuiTouchable]", inputs: { tuiTouchable: "tuiTouchable" }, ngImport: i0 }); }
61
61
  }
62
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiTouchable, decorators: [{
62
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiTouchable, decorators: [{
63
63
  type: Directive,
64
64
  args: [{
65
65
  standalone: true,
66
66
  selector: '[tuiTouchable]',
67
67
  }]
68
- }], ctorParameters: function () { return []; }, propDecorators: { tuiTouchable: [{
68
+ }], ctorParameters: () => [], propDecorators: { tuiTouchable: [{
69
69
  type: Input
70
70
  }] } });
71
71
 
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-directives-touchable.mjs","sources":["../../../projects/addon-mobile/directives/touchable/touchable.directive.ts","../../../projects/addon-mobile/directives/touchable/taiga-ui-addon-mobile-directives-touchable.ts"],"sourcesContent":["import {Directive, inject, Input} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\nimport {TUI_IS_IOS} from '@taiga-ui/cdk/tokens';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {filter, map, race, switchMap, take, tap} from 'rxjs';\n\nconst STYLE = {\n transform: 'scale(0.95)',\n opacity: '0.6',\n background: 'rgba(146, 153, 162, 0.12)',\n} as const;\n\nexport function tuiFindTouchIndex(touches: TouchList, id: number): number {\n for (let i = 0; i < touches.length; i++) {\n if (touches[i]?.identifier === id) {\n return i;\n }\n }\n\n return -1;\n}\n\n@Directive({\n standalone: true,\n selector: '[tuiTouchable]',\n})\nexport class TuiTouchable {\n private readonly isIOS = inject(TUI_IS_IOS);\n private readonly el = tuiInjectElement();\n\n @Input()\n public tuiTouchable: '' | 'background' | 'opacity' | 'transform' = '';\n\n constructor() {\n if (!this.isIOS) {\n return;\n }\n\n tuiTypedFromEvent(this.el, 'touchstart', {passive: true})\n .pipe(\n tap(() => this.onTouchStart()),\n map(({touches}) => touches[touches.length - 1]?.identifier),\n switchMap((identifier) =>\n race(\n tuiTypedFromEvent(this.el, 'touchmove', {passive: true}).pipe(\n filter(({touches}) =>\n this.hasTouchLeft(this.el, touches, identifier ?? 0),\n ),\n ),\n tuiTypedFromEvent(this.el, 'touchend'),\n ).pipe(take(1)),\n ),\n takeUntilDestroyed(),\n )\n .subscribe(() => {\n this.el.style.removeProperty('transform');\n this.el.style.removeProperty('opacity');\n this.el.style.removeProperty('background');\n });\n }\n\n protected get style(): 'background' | 'opacity' | 'transform' {\n return this.tuiTouchable || 'transform';\n }\n\n private hasTouchLeft(\n element: HTMLElement,\n touches: TouchList,\n identifier: number,\n ): boolean {\n const {ownerDocument} = element;\n const id = tuiFindTouchIndex(touches, identifier);\n\n if (!ownerDocument || id === -1) {\n return true;\n }\n\n const {clientX = 0, clientY = 0} = touches[id] ?? {};\n\n return !element.contains(ownerDocument.elementFromPoint(clientX, clientY));\n }\n\n private onTouchStart(): void {\n if (this.style !== 'transform') {\n this.el.style.removeProperty('transition');\n } else {\n this.el.style.setProperty('transition', 'transform 0.2s');\n }\n\n this.el.style.setProperty(this.style, STYLE[this.style]);\n }\n}\n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;YAC5B,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;AAC9C,SAAA;AAAM,aAAA;YACH,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;AAC7D,SAAA;AAED,QAAA,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;KAC5D;+GAhEQ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,EAAA,YAAA,EAAA,cAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,gBAAgB;AAC7B,iBAAA,CAAA;0EAMU,YAAY,EAAA,CAAA;sBADlB,KAAK;;;AC/BV;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-directives-touchable.mjs","sources":["../../../projects/addon-mobile/directives/touchable/touchable.directive.ts","../../../projects/addon-mobile/directives/touchable/taiga-ui-addon-mobile-directives-touchable.ts"],"sourcesContent":["import {Directive, inject, Input} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\nimport {TUI_IS_IOS} from '@taiga-ui/cdk/tokens';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {filter, map, race, switchMap, take, tap} from 'rxjs';\n\nconst STYLE = {\n transform: 'scale(0.95)',\n opacity: '0.6',\n background: 'rgba(146, 153, 162, 0.12)',\n} as const;\n\nexport function tuiFindTouchIndex(touches: TouchList, id: number): number {\n for (let i = 0; i < touches.length; i++) {\n if (touches[i]?.identifier === id) {\n return i;\n }\n }\n\n return -1;\n}\n\n@Directive({\n standalone: true,\n selector: '[tuiTouchable]',\n})\nexport class TuiTouchable {\n private readonly isIOS = inject(TUI_IS_IOS);\n private readonly el = tuiInjectElement();\n\n @Input()\n public tuiTouchable: '' | 'background' | 'opacity' | 'transform' = '';\n\n constructor() {\n if (!this.isIOS) {\n return;\n }\n\n tuiTypedFromEvent(this.el, 'touchstart', {passive: true})\n .pipe(\n tap(() => this.onTouchStart()),\n map(({touches}) => touches[touches.length - 1]?.identifier),\n switchMap((identifier) =>\n race(\n tuiTypedFromEvent(this.el, 'touchmove', {passive: true}).pipe(\n filter(({touches}) =>\n this.hasTouchLeft(this.el, touches, identifier ?? 0),\n ),\n ),\n tuiTypedFromEvent(this.el, 'touchend'),\n ).pipe(take(1)),\n ),\n takeUntilDestroyed(),\n )\n .subscribe(() => {\n this.el.style.removeProperty('transform');\n this.el.style.removeProperty('opacity');\n this.el.style.removeProperty('background');\n });\n }\n\n protected get style(): 'background' | 'opacity' | 'transform' {\n return this.tuiTouchable || 'transform';\n }\n\n private hasTouchLeft(\n element: HTMLElement,\n touches: TouchList,\n identifier: number,\n ): boolean {\n const {ownerDocument} = element;\n const id = tuiFindTouchIndex(touches, identifier);\n\n if (!ownerDocument || id === -1) {\n return true;\n }\n\n const {clientX = 0, clientY = 0} = touches[id] ?? {};\n\n return !element.contains(ownerDocument.elementFromPoint(clientX, clientY));\n }\n\n private onTouchStart(): void {\n if (this.style !== 'transform') {\n this.el.style.removeProperty('transition');\n } else {\n this.el.style.setProperty('transition', 'transform 0.2s');\n }\n\n this.el.style.setProperty(this.style, STYLE[this.style]);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";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AAE,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5D;8GAhES,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,EAAA,YAAA,EAAA,cAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,gBAAgB;AAC7B,iBAAA;wDAMU,YAAY,EAAA,CAAA;sBADlB;;;AC/BL;;AAEG;;;;"}
@@ -41,10 +41,10 @@ class TuiKeyboardService {
41
41
  this.element.inputMode = this.inputMode;
42
42
  this.element = undefined;
43
43
  }
44
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiKeyboardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
45
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiKeyboardService, providedIn: 'root' }); }
44
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiKeyboardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
45
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiKeyboardService, providedIn: 'root' }); }
46
46
  }
47
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiKeyboardService, decorators: [{
47
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiKeyboardService, decorators: [{
48
48
  type: Injectable,
49
49
  args: [{
50
50
  providedIn: 'root',
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-services.mjs","sources":["../../../projects/addon-mobile/services/keyboard.service.ts","../../../projects/addon-mobile/services/taiga-ui-addon-mobile-services.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {inject, Injectable, type OnDestroy} from '@angular/core';\nimport {tuiGetNativeFocused} from '@taiga-ui/cdk/utils/focus';\nimport {filter, fromEvent, merge} from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiKeyboardService implements OnDestroy {\n private readonly doc = inject(DOCUMENT);\n private readonly sub = merge(\n fromEvent(this.doc, 'focusout'),\n fromEvent(this.doc, 'mousedown').pipe(\n filter((e) => Object.is(e.target, this.element)),\n ),\n ).subscribe(() => {\n this.show();\n });\n\n private element?: ElementContentEditable;\n private inputMode = '';\n\n public ngOnDestroy(): void {\n this.sub.unsubscribe();\n this.show();\n }\n\n public toggle(): void {\n if (this.element) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n public hide(): void {\n const focused = tuiGetNativeFocused(this.doc) as HTMLInputElement;\n\n if (focused?.inputMode === undefined || this.element) {\n return;\n }\n\n this.element = focused;\n this.inputMode = focused.inputMode;\n focused.inputMode = 'none';\n }\n\n public show(): void {\n if (!this.element) {\n return;\n }\n\n this.element.inputMode = 'none';\n this.element.inputMode = this.inputMode;\n this.element = undefined;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAKA,MAGa,kBAAkB,CAAA;AAH/B,IAAA,WAAA,GAAA;AAIqB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;QACvB,IAAG,CAAA,GAAA,GAAG,KAAK,CACxB,SAAS,CAAC,IAAI,CAAC,GA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C;KAC5B;+GA/CQ,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,cAFf,MAAM,EAAA,CAAA,CAAA,EAAA;;4FAET,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAH9B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE,MAAM;AACrB,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-services.mjs","sources":["../../../projects/addon-mobile/services/keyboard.service.ts","../../../projects/addon-mobile/services/taiga-ui-addon-mobile-services.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {inject, Injectable, type OnDestroy} from '@angular/core';\nimport {tuiGetNativeFocused} from '@taiga-ui/cdk/utils/focus';\nimport {filter, fromEvent, merge} from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiKeyboardService implements OnDestroy {\n private readonly doc = inject(DOCUMENT);\n private readonly sub = merge(\n fromEvent(this.doc, 'focusout'),\n fromEvent(this.doc, 'mousedown').pipe(\n filter((e) => Object.is(e.target, this.element)),\n ),\n ).subscribe(() => {\n this.show();\n });\n\n private element?: ElementContentEditable;\n private inputMode = '';\n\n public ngOnDestroy(): void {\n this.sub.unsubscribe();\n this.show();\n }\n\n public toggle(): void {\n if (this.element) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n public hide(): void {\n const focused = tuiGetNativeFocused(this.doc) as HTMLInputElement;\n\n if (focused?.inputMode === undefined || this.element) {\n return;\n }\n\n this.element = focused;\n this.inputMode = focused.inputMode;\n focused.inputMode = 'none';\n }\n\n public show(): void {\n if (!this.element) {\n return;\n }\n\n this.element.inputMode = 'none';\n this.element.inputMode = this.inputMode;\n this.element = undefined;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAQa,kBAAkB,CAAA;AAH/B,IAAA,WAAA,GAAA;AAIqB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;QACtB,IAAA,CAAA,GAAG,GAAG,KAAK,CACxB,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,EAC/B,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC,IAAI,CACjC,MAAM,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CACnD,CACJ,CAAC,SAAS,CAAC,MAAK;YACb,IAAI,CAAC,IAAI,EAAE;AACf,QAAA,CAAC,CAAC;QAGM,IAAA,CAAA,SAAS,GAAG,EAAE;AAoCzB,IAAA;IAlCU,WAAW,GAAA;AACd,QAAA,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE;QACtB,IAAI,CAAC,IAAI,EAAE;IACf;IAEO,MAAM,GAAA;AACT,QAAA,IAAI,IAAI,CAAC,OAAO,EAAE;YACd,IAAI,CAAC,IAAI,EAAE;QACf;aAAO;YACH,IAAI,CAAC,IAAI,EAAE;QACf;IACJ;IAEO,IAAI,GAAA;QACP,MAAM,OAAO,GAAG,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAqB;QAEjE,IAAI,OAAO,EAAE,SAAS,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,EAAE;YAClD;QACJ;AAEA,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO;AACtB,QAAA,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS;AAClC,QAAA,OAAO,CAAC,SAAS,GAAG,MAAM;IAC9B;IAEO,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