UNPKG

@ng-bootstrap/ng-bootstrap

Version:
1 lines 813 kB
{"version":3,"file":"ng-bootstrap.mjs","sources":["../../../src/environment.ts","../../../src/ngb-config.ts","../../../src/accordion/accordion-config.ts","../../../src/util/transition/util.ts","../../../src/util/util.ts","../../../src/util/transition/ngbTransition.ts","../../../src/util/transition/ngbCollapseTransition.ts","../../../src/collapse/collapse-config.ts","../../../src/collapse/collapse.ts","../../../src/accordion/accordion.directive.ts","../../../src/accordion/accordion.module.ts","../../../src/alert/alert-config.ts","../../../src/alert/alert-transition.ts","../../../src/alert/alert.ts","../../../src/alert/alert.module.ts","../../../src/carousel/carousel-config.ts","../../../src/carousel/carousel-transition.ts","../../../src/carousel/carousel.ts","../../../src/carousel/carousel.module.ts","../../../src/collapse/collapse.module.ts","../../../src/datepicker/ngb-date.ts","../../../src/datepicker/ngb-calendar.ts","../../../src/datepicker/datepicker-tools.ts","../../../src/datepicker/datepicker-i18n.ts","../../../src/datepicker/datepicker-service.ts","../../../src/datepicker/datepicker-view-model.ts","../../../src/datepicker/datepicker-config.ts","../../../src/datepicker/adapters/ngb-date-adapter.ts","../../../src/datepicker/datepicker-keyboard-service.ts","../../../src/datepicker/datepicker-day-view.ts","../../../src/datepicker/datepicker-navigation-select.ts","../../../src/datepicker/datepicker-navigation.ts","../../../src/datepicker/datepicker.ts","../../../src/util/autoclose.ts","../../../src/util/focus-trap.ts","../../../src/util/rtl.ts","../../../src/util/positioning.ts","../../../src/datepicker/ngb-date-parser-formatter.ts","../../../src/datepicker/datepicker-input-config.ts","../../../src/util/positioning-util.ts","../../../src/datepicker/datepicker-input.ts","../../../src/datepicker/hijri/ngb-calendar-hijri.ts","../../../src/datepicker/hijri/ngb-calendar-islamic-civil.ts","../../../src/datepicker/hijri/ngb-calendar-islamic-umalqura.ts","../../../src/datepicker/jalali/jalali.ts","../../../src/datepicker/jalali/ngb-calendar-persian.ts","../../../src/datepicker/hebrew/hebrew.ts","../../../src/datepicker/hebrew/ngb-calendar-hebrew.ts","../../../src/datepicker/hebrew/datepicker-i18n-hebrew.ts","../../../src/datepicker/buddhist/buddhist.ts","../../../src/datepicker/buddhist/ngb-calendar-buddhist.ts","../../../src/datepicker/ethiopian/ethiopian.ts","../../../src/datepicker/ethiopian/ngb-calendar-ethiopian.ts","../../../src/datepicker/ethiopian/datepicker-i18n-amharic.ts","../../../src/datepicker/adapters/ngb-date-native-adapter.ts","../../../src/datepicker/adapters/ngb-date-native-utc-adapter.ts","../../../src/datepicker/datepicker.module.ts","../../../src/dropdown/dropdown-config.ts","../../../src/dropdown/dropdown.ts","../../../src/dropdown/dropdown.module.ts","../../../src/modal/modal-config.ts","../../../src/util/popup.ts","../../../src/util/scrollbar.ts","../../../src/modal/modal-backdrop.ts","../../../src/modal/modal-ref.ts","../../../src/modal/modal-dismiss-reasons.ts","../../../src/modal/modal-window.ts","../../../src/modal/modal-stack.ts","../../../src/modal/modal.ts","../../../src/modal/modal.module.ts","../../../src/nav/nav-config.ts","../../../src/nav/nav.ts","../../../src/nav/nav-transition.ts","../../../src/nav/nav-outlet.ts","../../../src/nav/nav.module.ts","../../../src/pagination/pagination-config.ts","../../../src/pagination/pagination.ts","../../../src/pagination/pagination.module.ts","../../../src/util/triggers.ts","../../../src/popover/popover-config.ts","../../../src/popover/popover.ts","../../../src/popover/popover.module.ts","../../../src/progressbar/progressbar-config.ts","../../../src/progressbar/progressbar.ts","../../../src/progressbar/progressbar.module.ts","../../../src/rating/rating-config.ts","../../../src/rating/rating.ts","../../../src/rating/rating.module.ts","../../../src/scrollspy/scrollspy.utils.ts","../../../src/scrollspy/scrollspy-config.ts","../../../src/scrollspy/scrollspy.service.ts","../../../src/scrollspy/scrollspy.ts","../../../src/scrollspy/scrollspy.module.ts","../../../src/timepicker/ngb-time.ts","../../../src/timepicker/timepicker-config.ts","../../../src/timepicker/ngb-time-adapter.ts","../../../src/timepicker/timepicker-i18n.ts","../../../src/timepicker/timepicker.ts","../../../src/timepicker/timepicker.module.ts","../../../src/toast/toast-config.ts","../../../src/toast/toast-transition.ts","../../../src/toast/toast.ts","../../../src/toast/toast.module.ts","../../../src/tooltip/tooltip-config.ts","../../../src/tooltip/tooltip.ts","../../../src/tooltip/tooltip.module.ts","../../../src/typeahead/highlight.ts","../../../src/util/accessibility/live.ts","../../../src/typeahead/typeahead-config.ts","../../../src/typeahead/typeahead-window.ts","../../../src/typeahead/typeahead.ts","../../../src/typeahead/typeahead.module.ts","../../../src/offcanvas/offcanvas-config.ts","../../../src/offcanvas/offcanvas-ref.ts","../../../src/offcanvas/offcanvas-dismiss-reasons.ts","../../../src/offcanvas/offcanvas-backdrop.ts","../../../src/offcanvas/offcanvas-panel.ts","../../../src/offcanvas/offcanvas-stack.ts","../../../src/offcanvas/offcanvas.ts","../../../src/offcanvas/offcanvas.module.ts","../../../src/index.ts","../../../src/ng-bootstrap.ts"],"sourcesContent":["export const environment = {\n\tanimation: true,\n\ttransitionTimerDelayMs: 5,\n};\n","import { Injectable } from '@angular/core';\nimport { environment } from './environment';\n\n/**\n * Global ng-bootstrap config\n *\n * @since 8.0.0\n */\n@Injectable({ providedIn: 'root' })\nexport class NgbConfig {\n\tanimation = environment.animation;\n}\n","import { inject, Injectable } from '@angular/core';\nimport { NgbConfig } from '../ngb-config';\n\n/**\n * A configuration service for the [`NgbAccordionDirective`](#/components/accordion/api#NgbAccordionDirective).\n *\n * You can inject this service, typically in your root component, and customize its properties\n * to provide default values for all accordions used in the application.\n */\n@Injectable({ providedIn: 'root' })\nexport class NgbAccordionConfig {\n\tprivate _ngbConfig = inject(NgbConfig);\n\tprivate _animation: boolean;\n\n\tcloseOthers = false;\n\tdestroyOnHide = true;\n\n\tget animation(): boolean {\n\t\treturn this._animation ?? this._ngbConfig.animation;\n\t}\n\tset animation(animation: boolean) {\n\t\tthis._animation = animation;\n\t}\n}\n","export function getTransitionDurationMs(element: HTMLElement) {\n\tconst { transitionDelay, transitionDuration } = window.getComputedStyle(element);\n\tconst transitionDelaySec = parseFloat(transitionDelay);\n\tconst transitionDurationSec = parseFloat(transitionDuration);\n\n\treturn (transitionDelaySec + transitionDurationSec) * 1000;\n}\n","import { NgZone } from '@angular/core';\nimport { Observable, OperatorFunction } from 'rxjs';\n\nexport function toInteger(value: any): number {\n\treturn parseInt(`${value}`, 10);\n}\n\nexport function toString(value: any): string {\n\treturn value !== undefined && value !== null ? `${value}` : '';\n}\n\nexport function getValueInRange(value: number, max: number, min = 0): number {\n\treturn Math.max(Math.min(value, max), min);\n}\n\nexport function isString(value: any): value is string {\n\treturn typeof value === 'string';\n}\n\nexport function isNumber(value: any): value is number {\n\treturn !isNaN(toInteger(value));\n}\n\nexport function isInteger(value: any): value is number {\n\treturn typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\n}\n\nexport function isDefined(value: any): boolean {\n\treturn value !== undefined && value !== null;\n}\n\nexport function isPromise<T>(v: any): v is Promise<T> {\n\treturn v && v.then;\n}\n\nexport function padNumber(value: number) {\n\tif (isNumber(value)) {\n\t\treturn `0${value}`.slice(-2);\n\t} else {\n\t\treturn '';\n\t}\n}\n\nexport function regExpEscape(text) {\n\treturn text.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n}\n\nexport function closest(element: HTMLElement, selector?: string): HTMLElement | null {\n\tif (!selector) {\n\t\treturn null;\n\t}\n\n\t/*\n\t * In certain browsers (e.g. Edge 44.18362.449.0) HTMLDocument does\n\t * not support `Element.prototype.closest`. To emulate the correct behaviour\n\t * we return null when the method is missing.\n\t *\n\t * Note that in evergreen browsers `closest(document.documentElement, 'html')`\n\t * will return the document element whilst in Edge null will be returned. This\n\t * compromise was deemed good enough.\n\t */\n\tif (typeof element.closest === 'undefined') {\n\t\treturn null;\n\t}\n\n\treturn element.closest(selector);\n}\n\n/**\n * Force a browser reflow\n * @param element element where to apply the reflow\n */\nexport function reflow(element: HTMLElement) {\n\treturn (element || document.body).getBoundingClientRect();\n}\n\n/**\n * Creates an observable where all callbacks are executed inside a given zone\n *\n * @param zone\n */\nexport function runInZone<T>(zone: NgZone): OperatorFunction<T, T> {\n\treturn (source) => {\n\t\treturn new Observable((observer) => {\n\t\t\tconst next = (value: T) => zone.run(() => observer.next(value));\n\t\t\tconst error = (e: any) => zone.run(() => observer.error(e));\n\t\t\tconst complete = () => zone.run(() => observer.complete());\n\t\t\treturn source.subscribe({ next, error, complete });\n\t\t});\n\t};\n}\n\nexport function removeAccents(str: string): string {\n\treturn str.normalize('NFD').replace(/[\\u0300-\\u036f]/g, '');\n}\n\n/**\n * Returns the active element in the given root.\n * If the active element is inside a shadow root, it is searched recursively.\n */\nexport function getActiveElement(root: Document | ShadowRoot = document): Element | null {\n\tconst activeEl = root?.activeElement;\n\n\tif (!activeEl) {\n\t\treturn null;\n\t}\n\n\treturn activeEl.shadowRoot ? getActiveElement(activeEl.shadowRoot) : activeEl;\n}\n","import { NgZone } from '@angular/core';\nimport { EMPTY, fromEvent, Observable, of, race, Subject, timer } from 'rxjs';\nimport { endWith, filter, takeUntil } from 'rxjs/operators';\nimport { getTransitionDurationMs } from './util';\nimport { environment } from '../../environment';\nimport { runInZone } from '../util';\n\nexport type NgbTransitionStartFn<T = any> = (\n\telement: HTMLElement,\n\tanimation: boolean,\n\tcontext: T,\n) => NgbTransitionEndFn | void;\nexport type NgbTransitionEndFn = () => void;\n\nexport interface NgbTransitionOptions<T> {\n\tanimation: boolean;\n\trunningTransition: 'continue' | 'stop';\n\tcontext?: T;\n}\n\nexport interface NgbTransitionCtx<T> {\n\ttransition$: Subject<any>;\n\tcomplete: () => void;\n\tcontext: T;\n}\n\nconst noopFn: NgbTransitionEndFn = () => {};\n\nconst { transitionTimerDelayMs } = environment;\nconst runningTransitions = new Map<HTMLElement, NgbTransitionCtx<any>>();\n\nexport const ngbRunTransition = <T>(\n\tzone: NgZone,\n\telement: HTMLElement,\n\tstartFn: NgbTransitionStartFn<T>,\n\toptions: NgbTransitionOptions<T>,\n): Observable<void> => {\n\t// Getting initial context from options\n\tlet context = options.context || <T>{};\n\n\t// Checking if there are already running transitions on the given element.\n\tconst running = runningTransitions.get(element);\n\tif (running) {\n\t\tswitch (options.runningTransition) {\n\t\t\t// If there is one running and we want for it to 'continue' to run, we have to cancel the new one.\n\t\t\t// We're not emitting any values, but simply completing the observable (EMPTY).\n\t\t\tcase 'continue':\n\t\t\t\treturn EMPTY;\n\t\t\t// If there is one running and we want for it to 'stop', we have to complete the running one.\n\t\t\t// We're simply completing the running one and not emitting any values and merging newly provided context\n\t\t\t// with the one coming from currently running transition.\n\t\t\tcase 'stop':\n\t\t\t\tzone.run(() => running.transition$.complete());\n\t\t\t\tcontext = Object.assign(running.context, context);\n\t\t\t\trunningTransitions.delete(element);\n\t\t}\n\t}\n\n\t// Running the start function\n\tconst endFn = startFn(element, options.animation, context) || noopFn;\n\n\t// If 'prefer-reduced-motion' is enabled, the 'transition' will be set to 'none'.\n\t// If animations are disabled, we have to emit a value and complete the observable\n\t// In this case we have to call the end function, but can finish immediately by emitting a value,\n\t// completing the observable and executing end functions synchronously.\n\tif (!options.animation || window.getComputedStyle(element).transitionProperty === 'none') {\n\t\tzone.run(() => endFn());\n\t\treturn of(undefined).pipe(runInZone(zone));\n\t}\n\n\t// Starting a new transition\n\tconst transition$ = new Subject<void>();\n\tconst finishTransition$ = new Subject<void>();\n\tconst stop$ = transition$.pipe(endWith(true));\n\trunningTransitions.set(element, {\n\t\ttransition$,\n\t\tcomplete: () => {\n\t\t\tfinishTransition$.next();\n\t\t\tfinishTransition$.complete();\n\t\t},\n\t\tcontext,\n\t});\n\n\tconst transitionDurationMs = getTransitionDurationMs(element);\n\n\t// 1. We have to both listen for the 'transitionend' event and have a 'just-in-case' timer,\n\t// because 'transitionend' event might not be fired in some browsers, if the transitioning\n\t// element becomes invisible (ex. when scrolling, making browser tab inactive, etc.). The timer\n\t// guarantees, that we'll release the DOM element and complete 'ngbRunTransition'.\n\t// 2. We need to filter transition end events, because they might bubble from shorter transitions\n\t// on inner DOM elements. We're only interested in the transition on the 'element' itself.\n\tzone.runOutsideAngular(() => {\n\t\tconst transitionEnd$ = fromEvent(element, 'transitionend').pipe(\n\t\t\ttakeUntil(stop$),\n\t\t\tfilter(({ target }) => target === element),\n\t\t);\n\t\tconst timer$ = timer(transitionDurationMs + transitionTimerDelayMs).pipe(takeUntil(stop$));\n\n\t\trace(timer$, transitionEnd$, finishTransition$)\n\t\t\t.pipe(takeUntil(stop$))\n\t\t\t.subscribe(() => {\n\t\t\t\trunningTransitions.delete(element);\n\t\t\t\tzone.run(() => {\n\t\t\t\t\tendFn();\n\t\t\t\t\ttransition$.next();\n\t\t\t\t\ttransition$.complete();\n\t\t\t\t});\n\t\t\t});\n\t});\n\n\treturn transition$.asObservable();\n};\n\nexport const ngbCompleteTransition = (element: HTMLElement) => {\n\trunningTransitions.get(element)?.complete();\n};\n","import { NgbTransitionStartFn } from './ngbTransition';\nimport { reflow } from '../util';\n\nexport interface NgbCollapseCtx {\n\tdirection: 'show' | 'hide';\n\tdimension: 'width' | 'height';\n\tmaxSize?: string;\n}\n\nfunction measureCollapsingElementDimensionPx(element: HTMLElement, dimension: 'width' | 'height'): string {\n\t// SSR fix for without injecting the PlatformId\n\tif (typeof navigator === 'undefined') {\n\t\treturn '0px';\n\t}\n\n\tconst { classList } = element;\n\tconst hasShownClass = classList.contains('show');\n\tif (!hasShownClass) {\n\t\tclassList.add('show');\n\t}\n\n\telement.style[dimension] = '';\n\tconst dimensionSize = element.getBoundingClientRect()[dimension] + 'px';\n\n\tif (!hasShownClass) {\n\t\tclassList.remove('show');\n\t}\n\n\treturn dimensionSize;\n}\n\nexport const ngbCollapsingTransition: NgbTransitionStartFn<NgbCollapseCtx> = (\n\telement: HTMLElement,\n\tanimation: boolean,\n\tcontext: NgbCollapseCtx,\n) => {\n\tlet { direction, maxSize, dimension } = context;\n\tconst { classList } = element;\n\n\tfunction setInitialClasses() {\n\t\tclassList.add('collapse');\n\t\tif (direction === 'show') {\n\t\t\tclassList.add('show');\n\t\t} else {\n\t\t\tclassList.remove('show');\n\t\t}\n\t}\n\n\t// without animations we just need to set initial classes\n\tif (!animation) {\n\t\tsetInitialClasses();\n\t\treturn;\n\t}\n\n\t// No maxHeight -> running the transition for the first time\n\tif (!maxSize) {\n\t\tmaxSize = measureCollapsingElementDimensionPx(element, dimension);\n\t\tcontext.maxSize = maxSize;\n\n\t\t// Fix the height before starting the animation\n\t\telement.style[dimension] = direction !== 'show' ? maxSize : '0px';\n\n\t\tclassList.remove('collapse', 'collapsing', 'show');\n\n\t\treflow(element);\n\n\t\t// Start the animation\n\t\tclassList.add('collapsing');\n\t}\n\n\t// Start or revert the animation\n\telement.style[dimension] = direction === 'show' ? maxSize : '0px';\n\n\treturn () => {\n\t\tsetInitialClasses();\n\t\tclassList.remove('collapsing');\n\t\telement.style[dimension] = '';\n\t};\n};\n","import { inject, Injectable } from '@angular/core';\nimport { NgbConfig } from '../ngb-config';\n\n/**\n * A configuration service for the [NgbCollapse](#/components/collapse/api#NgbCollapse) component.\n *\n * You can inject this service, typically in your root component, and customize its properties\n * to provide default values for all collapses used in the application.\n */\n@Injectable({ providedIn: 'root' })\nexport class NgbCollapseConfig {\n\tprivate _ngbConfig = inject(NgbConfig);\n\tprivate _animation: boolean;\n\n\thorizontal = false;\n\n\tget animation(): boolean {\n\t\treturn this._animation ?? this._ngbConfig.animation;\n\t}\n\tset animation(animation: boolean) {\n\t\tthis._animation = animation;\n\t}\n}\n","import { Directive, ElementRef, EventEmitter, inject, Input, NgZone, OnInit, Output } from '@angular/core';\nimport { ngbRunTransition } from '../util/transition/ngbTransition';\nimport { ngbCollapsingTransition } from '../util/transition/ngbCollapseTransition';\nimport { NgbCollapseConfig } from './collapse-config';\n\n/**\n * A directive to provide a simple way of hiding and showing elements on the\n * page.\n */\n@Directive({\n\tselector: '[ngbCollapse]',\n\texportAs: 'ngbCollapse',\n\tstandalone: true,\n\thost: {\n\t\t'[class.collapse-horizontal]': 'horizontal',\n\t},\n})\nexport class NgbCollapse implements OnInit {\n\tprivate _config = inject(NgbCollapseConfig);\n\tprivate _element = inject(ElementRef);\n\tprivate _zone = inject(NgZone);\n\n\t/**\n\t * If `true`, collapse will be animated.\n\t *\n\t * Animation is triggered only when clicked on triggering element\n\t * or via the `.toggle()` function\n\t *\n\t * @since 8.0.0\n\t */\n\t@Input() animation = this._config.animation;\n\n\t/**\n\t * Flag used to track if the collapse setter is invoked during initialization\n\t * or not. This distinction is made in order to avoid running the transition during initialization.\n\t */\n\tprivate _afterInit = false;\n\n\tprivate _isCollapsed = false;\n\n\t/**\n\t * If `true`, will collapse the element or show it otherwise.\n\t */\n\t@Input('ngbCollapse')\n\tset collapsed(isCollapsed: boolean) {\n\t\tif (this._isCollapsed !== isCollapsed) {\n\t\t\tthis._isCollapsed = isCollapsed;\n\t\t\tif (this._afterInit) {\n\t\t\t\tthis._runTransitionWithEvents(isCollapsed, this.animation);\n\t\t\t}\n\t\t}\n\t}\n\n\t@Output() ngbCollapseChange = new EventEmitter<boolean>();\n\n\t/**\n\t * If `true`, will collapse horizontally.\n\t *\n\t * @since 13.1.0\n\t */\n\t@Input() horizontal = this._config.horizontal;\n\n\t/**\n\t * An event emitted when the collapse element is shown, after the transition.\n\t * It has no payload.\n\t *\n\t * @since 8.0.0\n\t */\n\t@Output() shown = new EventEmitter<void>();\n\n\t/**\n\t * An event emitted when the collapse element is hidden, after the transition.\n\t * It has no payload.\n\t *\n\t * @since 8.0.0\n\t */\n\t@Output() hidden = new EventEmitter<void>();\n\n\tngOnInit() {\n\t\tthis._runTransition(this._isCollapsed, false);\n\t\tthis._afterInit = true;\n\t}\n\n\t/**\n\t * Triggers collapsing programmatically.\n\t *\n\t * If there is a collapsing transition running already, it will be reversed.\n\t * If the animations are turned off this happens synchronously.\n\t *\n\t * @since 8.0.0\n\t */\n\ttoggle(open: boolean = this._isCollapsed) {\n\t\tthis.collapsed = !open;\n\t\tthis.ngbCollapseChange.next(this._isCollapsed);\n\t}\n\n\tprivate _runTransition(collapsed: boolean, animation: boolean) {\n\t\treturn ngbRunTransition(this._zone, this._element.nativeElement, ngbCollapsingTransition, {\n\t\t\tanimation,\n\t\t\trunningTransition: 'stop',\n\t\t\tcontext: { direction: collapsed ? 'hide' : 'show', dimension: this.horizontal ? 'width' : 'height' },\n\t\t});\n\t}\n\n\tprivate _runTransitionWithEvents(collapsed: boolean, animation: boolean) {\n\t\tthis._runTransition(collapsed, animation).subscribe(() => {\n\t\t\tif (collapsed) {\n\t\t\t\tthis.hidden.emit();\n\t\t\t} else {\n\t\t\t\tthis.shown.emit();\n\t\t\t}\n\t\t});\n\t}\n}\n","import {\n\tAfterContentChecked,\n\tAfterContentInit,\n\tChangeDetectorRef,\n\tComponent,\n\tContentChild,\n\tContentChildren,\n\tDestroyRef,\n\tDirective,\n\tElementRef,\n\tEmbeddedViewRef,\n\tEventEmitter,\n\tinject,\n\tInput,\n\tOnDestroy,\n\tOutput,\n\tQueryList,\n\tTemplateRef,\n\tViewChild,\n\tViewContainerRef,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NgbAccordionConfig } from './accordion-config';\nimport { NgbCollapse } from '../collapse/collapse';\nimport { isString } from '../util/util';\n\nlet nextId = 0;\n\n/**\n * A directive that wraps the content of an accordion item's collapsible body.\n *\n * The actual content is provided in a child `ng-template` element.\n * Depending on the state of the accordion, the template will be either inserted or removed from the DOM.\n *\n * @since 14.1.0\n */\n@Component({\n\tselector: '[ngbAccordionBody]',\n\tstandalone: true,\n\ttemplate: `\n\t\t<ng-container #container />\n\t\t<ng-content />\n\t`,\n\thost: {\n\t\tclass: 'accordion-body',\n\t},\n})\nexport class NgbAccordionBody implements AfterContentChecked, OnDestroy {\n\tprivate _item = inject(NgbAccordionItem);\n\tprivate _viewRef: EmbeddedViewRef<any> | null = null;\n\n\t/**\n\t * the `ElementRef` of the component\n\t *\n\t * @since 18.0.0\n\t */\n\tpublic readonly elementRef = inject(ElementRef);\n\n\t@ViewChild('container', { read: ViewContainerRef, static: true }) private _vcr: ViewContainerRef;\n\t@ContentChild(TemplateRef, { static: true }) private _bodyTpl: TemplateRef<any>;\n\n\tngAfterContentChecked(): void {\n\t\tif (this._bodyTpl) {\n\t\t\tif (this._item._shouldBeInDOM) {\n\t\t\t\tthis._createViewIfNotExists();\n\t\t\t} else {\n\t\t\t\tthis._destroyViewIfExists();\n\t\t\t}\n\t\t}\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis._destroyViewIfExists();\n\t}\n\n\tprivate _destroyViewIfExists(): void {\n\t\tthis._viewRef?.destroy();\n\t\tthis._viewRef = null;\n\t}\n\n\tprivate _createViewIfNotExists(): void {\n\t\tif (!this._viewRef) {\n\t\t\tthis._viewRef = this._vcr.createEmbeddedView(this._bodyTpl);\n\t\t\tthis._viewRef.detectChanges();\n\t\t}\n\t}\n}\n\n/**\n * A directive that wraps the collapsible item's content of the accordion.\n *\n * Internally it reuses the [`NgbCollapse` directive](#/components/collapse)\n *\n * @since 14.1.0\n */\n@Directive({\n\texportAs: 'ngbAccordionCollapse',\n\tstandalone: true,\n\tselector: '[ngbAccordionCollapse]',\n\thost: {\n\t\trole: 'region',\n\t\tclass: 'accordion-collapse',\n\t\t'[id]': 'item.collapseId',\n\t\t'[attr.aria-labelledby]': 'item.toggleId',\n\t},\n\thostDirectives: [NgbCollapse],\n})\nexport class NgbAccordionCollapse {\n\titem = inject(NgbAccordionItem);\n\tngbCollapse = inject(NgbCollapse);\n}\n\n/**\n * A directive to put on a toggling element inside the accordion item's header.\n * It will register click handlers that toggle the associated panel and will handle accessibility attributes.\n *\n * This directive is used internally by the [`NgbAccordionButton` directive](#/components/accordion/api#NgbAccordionButton).\n *\n * @since 14.1.0\n */\n@Directive({\n\tselector: '[ngbAccordionToggle]',\n\tstandalone: true,\n\thost: {\n\t\t'[id]': 'item.toggleId',\n\t\t'[class.collapsed]': 'item.collapsed',\n\t\t'[attr.aria-controls]': 'item.collapseId',\n\t\t'[attr.aria-expanded]': '!item.collapsed',\n\t\t'(click)': '!item.disabled && accordion.toggle(item.id)',\n\t},\n})\nexport class NgbAccordionToggle {\n\titem = inject(NgbAccordionItem);\n\taccordion = inject(NgbAccordionDirective);\n}\n\n/**\n * A directive to put on a button element inside an accordion item's header.\n *\n * If you want a custom markup for the header, you can also use the [`NgbAccordionToggle` directive](#/components/accordion/api#NgbAccordionToggle).\n *\n * @since 14.1.0\n */\n@Directive({\n\tselector: 'button[ngbAccordionButton]',\n\tstandalone: true,\n\thost: {\n\t\t'[disabled]': 'item.disabled',\n\t\tclass: 'accordion-button',\n\t\ttype: 'button',\n\t},\n\thostDirectives: [NgbAccordionToggle],\n})\nexport class NgbAccordionButton {\n\titem = inject(NgbAccordionItem);\n}\n\n/**\n * A directive that wraps an accordion item's header.\n *\n * @since 14.1.0\n */\n@Directive({\n\tselector: '[ngbAccordionHeader]',\n\tstandalone: true,\n\thost: {\n\t\trole: 'heading',\n\t\tclass: 'accordion-header',\n\t\t'[class.collapsed]': 'item.collapsed',\n\t},\n})\nexport class NgbAccordionHeader {\n\titem = inject(NgbAccordionItem);\n}\n\n/**\n * A directive that wraps an accordion item: a toggleable header + body that collapses.\n *\n * You can get hold of the `NgbAccordionItem` instance in the template with `#item=\"ngbAccordionItem\"`.\n * It allows to check if the item is collapsed or not, toggle the collapse state, etc.\n *\n * Every accordion item has a string ID that is automatically generated in the `ngb-accordion-item-XX` format, unless provided explicitly.\n *\n * @since 14.1.0\n */\n@Directive({\n\tselector: '[ngbAccordionItem]',\n\texportAs: 'ngbAccordionItem',\n\tstandalone: true,\n\thost: {\n\t\t'[id]': 'id',\n\t\tclass: 'accordion-item',\n\t},\n})\nexport class NgbAccordionItem implements AfterContentInit {\n\tprivate _accordion = inject(NgbAccordionDirective);\n\tprivate _cd = inject(ChangeDetectorRef);\n\tprivate _destroyRef = inject(DestroyRef);\n\n\tprivate _collapsed = true;\n\tprivate _id = `ngb-accordion-item-${nextId++}`;\n\tprivate _destroyOnHide: boolean | undefined;\n\n\tprivate _collapseAnimationRunning = false;\n\n\t@ContentChild(NgbAccordionCollapse, { static: true }) private _collapse: NgbAccordionCollapse;\n\n\t/**\n\t * Sets the custom ID of the accordion item. It must be unique for the document.\n\t *\n\t * @param id The ID of the accordion item, must be a non-empty string\n\t */\n\t@Input('ngbAccordionItem') set id(id: string) {\n\t\tif (isString(id) && id !== '') {\n\t\t\tthis._id = id;\n\t\t}\n\t}\n\n\t/**\n\t * If `true`, the content of the accordion item's body will be removed from the DOM. It will be just hidden otherwise.\n\t *\n\t * This property can also be set up on the parent [`NgbAccordion` directive](#/components/accordion/api#NgbAccordionDirective).\n\t */\n\t@Input() set destroyOnHide(destroyOnHide: boolean) {\n\t\tthis._destroyOnHide = destroyOnHide;\n\t}\n\n\tget destroyOnHide(): boolean {\n\t\treturn this._destroyOnHide === undefined ? this._accordion.destroyOnHide : this._destroyOnHide!;\n\t}\n\n\t/**\n\t * If `true`, the accordion item will be disabled.\n\t * It won't react to user's clicks, but still will be toggelable programmatically.\n\t */\n\t@Input() disabled = false;\n\n\t/**\n\t *\tIf `true`, the accordion item will be collapsed. Otherwise, it will be expanded.\n\t *\n\t * @param collapsed New state of the accordion item.\n\t */\n\t@Input() set collapsed(collapsed: boolean) {\n\t\tif (collapsed) {\n\t\t\tthis.collapse();\n\t\t} else {\n\t\t\tthis.expand();\n\t\t}\n\t}\n\n\t/**\n\t * Event emitted before the expanding animation starts. It has no payload.\n\t *\n\t * @since 15.1.0\n\t */\n\t@Output() show = new EventEmitter<void>();\n\n\t/**\n\t * Event emitted when the expanding animation is finished. It has no payload.\n\t */\n\t@Output() shown = new EventEmitter<void>();\n\n\t/**\n\t * Event emitted before the collapsing animation starts. It has no payload.\n\t *\n\t * @since 15.1.0\n\t */\n\t@Output() hide = new EventEmitter<void>();\n\n\t/**\n\t * Event emitted when the collapsing animation is finished and before the content is removed from DOM.\n\t * It has no payload.\n\t */\n\t@Output() hidden = new EventEmitter<void>();\n\n\tget collapsed() {\n\t\treturn this._collapsed;\n\t}\n\n\tget id() {\n\t\treturn `${this._id}`;\n\t}\n\n\tget toggleId() {\n\t\treturn `${this.id}-toggle`;\n\t}\n\n\tget collapseId() {\n\t\treturn `${this.id}-collapse`;\n\t}\n\n\tget _shouldBeInDOM() {\n\t\treturn !this.collapsed || this._collapseAnimationRunning || !this.destroyOnHide;\n\t}\n\n\tngAfterContentInit() {\n\t\tconst { ngbCollapse } = this._collapse;\n\t\t// we need to disable the animation for the first init\n\t\tngbCollapse.animation = false;\n\t\tngbCollapse.collapsed = this.collapsed;\n\t\t// we set the animation to the default of the accordion\n\t\tngbCollapse.animation = this._accordion.animation;\n\t\t// event forwarding from 'ngbCollapse' to 'ngbAccordion'\n\t\tngbCollapse.hidden.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => {\n\t\t\t// when the animation finishes we can remove the template from DOM\n\t\t\tthis._collapseAnimationRunning = false;\n\t\t\tthis.hidden.emit();\n\t\t\tthis._accordion.hidden.emit(this.id);\n\t\t\t// need if the accordion is used inside a component having OnPush change detection strategy\n\t\t\tthis._cd.markForCheck();\n\t\t});\n\t\tngbCollapse.shown.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => {\n\t\t\tthis.shown.emit();\n\t\t\tthis._accordion.shown.emit(this.id);\n\t\t\t// need if the accordion is used inside a component having OnPush change detection strategy\n\t\t\tthis._cd.markForCheck();\n\t\t});\n\t}\n\n\t/**\n\t * Toggles an accordion item.\n\t */\n\ttoggle() {\n\t\tthis.collapsed = !this.collapsed;\n\t}\n\n\t/**\n\t * Expands an accordion item.\n\t */\n\texpand() {\n\t\tif (this.collapsed) {\n\t\t\t// checking if accordion allows to expand the panel in respect to 'closeOthers' flag\n\t\t\tif (!this._accordion._ensureCanExpand(this)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._collapsed = false;\n\n\t\t\t// need if the accordion is used inside a component having OnPush change detection strategy\n\t\t\tthis._cd.markForCheck();\n\n\t\t\t// we need force CD to get template into DOM before starting animation to calculate its height correctly\n\t\t\t// this will synchronously put the item body into DOM, because `this._collapsed` was flipped to `false`\n\t\t\tthis._cd.detectChanges();\n\n\t\t\t// firing events before starting animations\n\t\t\tthis.show.emit();\n\t\t\tthis._accordion.show.emit(this.id);\n\n\t\t\t// we also need to make sure 'animation' flag is up-to- date\n\t\t\tthis._collapse.ngbCollapse.animation = this._accordion.animation;\n\t\t\tthis._collapse.ngbCollapse.collapsed = false;\n\t\t}\n\t}\n\n\t/**\n\t * Collapses an accordion item.\n\t */\n\tcollapse() {\n\t\tif (!this.collapsed) {\n\t\t\tthis._collapsed = true;\n\t\t\tthis._collapseAnimationRunning = true;\n\n\t\t\t// need if the accordion is used inside a component having OnPush change detection strategy\n\t\t\tthis._cd.markForCheck();\n\n\t\t\t// firing events before starting animations\n\t\t\tthis.hide.emit();\n\t\t\tthis._accordion.hide.emit(this.id);\n\n\t\t\t// we also need to make sure 'animation' flag is up-to- date\n\t\t\tthis._collapse.ngbCollapse.animation = this._accordion.animation;\n\t\t\tthis._collapse.ngbCollapse.collapsed = true;\n\t\t}\n\t}\n}\n\n/**\n * Accordion is a stack of cards that have a header and collapsible body.\n *\n * This directive is a container for these items and provides an API to handle them.\n *\n * @since 14.1.0\n */\n@Directive({\n\tselector: '[ngbAccordion]',\n\tstandalone: true,\n\texportAs: 'ngbAccordion',\n\thost: {\n\t\tclass: 'accordion',\n\t},\n})\nexport class NgbAccordionDirective {\n\tprivate _config = inject(NgbAccordionConfig);\n\tprivate _anItemWasAlreadyExpandedDuringInitialisation = false;\n\n\t@ContentChildren(NgbAccordionItem, { descendants: false }) private _items?: QueryList<NgbAccordionItem>;\n\t/**\n\t * If `true`, accordion will be animated.\n\t */\n\t@Input() animation = this._config.animation;\n\n\t/**\n\t * If `true`, only one item at the time can stay open.\n\t */\n\t@Input() closeOthers = this._config.closeOthers;\n\t/**\n\t * If `true`, the content of the accordion items body will be removed from the DOM. It will be just hidden otherwise.\n\t *\n\t * This property can be overwritten at the [`NgbAccordionItem`](#/components/accordion/api#NgbAccordionItem) level\n\t */\n\t@Input() destroyOnHide = this._config.destroyOnHide;\n\n\t/**\n\t * Event emitted before expanding animation starts. The payload is the id of shown accordion item.\n\t *\n\t * @since 15.1.0\n\t */\n\t@Output() show = new EventEmitter<string>();\n\n\t/**\n\t * Event emitted when the expanding animation is finished. The payload is the id of shown accordion item.\n\t */\n\t@Output() shown = new EventEmitter<string>();\n\n\t/**\n\t * Event emitted before the collapsing animation starts. The payload is the id of hidden accordion item.\n\t *\n\t * @since 15.1.0\n\t */\n\t@Output() hide = new EventEmitter<string>();\n\n\t/**\n\t * Event emitted when the collapsing animation is finished and before the content is removed from DOM.\n\t * The payload is the id of hidden accordion item.\n\t */\n\t@Output() hidden = new EventEmitter<string>();\n\n\t/**\n\t * Toggles an item with the given id.\n\t *\n\t * It will toggle an item, even if it is disabled.\n\t *\n\t * @param itemId The id of the item to toggle.\n\t */\n\ttoggle(itemId: string) {\n\t\tthis._getItem(itemId)?.toggle();\n\t}\n\n\t/**\n\t * Expands an item with the given id.\n\t *\n\t * If `closeOthers` is `true`, it will collapse other panels.\n\t *\n\t * @param itemId The id of the item to expand.\n\t */\n\texpand(itemId: string) {\n\t\tthis._getItem(itemId)?.expand();\n\t}\n\n\t/**\n\t * Expands all items.\n\t *\n\t * If `closeOthers` is `true` and all items are closed, it will open the first one. Otherwise, it will keep the opened one.\n\t */\n\texpandAll() {\n\t\tif (this._items) {\n\t\t\tif (this.closeOthers) {\n\t\t\t\t// we check if there is an item open and if it is not we can expand the first item\n\t\t\t\t// (otherwise we toggle nothing)\n\t\t\t\tif (!this._items.find((item) => !item.collapsed)) {\n\t\t\t\t\tthis._items.first.expand();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis._items.forEach((item) => item.expand());\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Collapses an item with the given id.\n\t *\n\t * Has no effect if the `itemId` does not correspond to any item.\n\t *\n\t * @param itemId The id of the item to collapse.\n\t */\n\tcollapse(itemId: string) {\n\t\tthis._getItem(itemId)?.collapse();\n\t}\n\n\t/**\n\t * Collapses all items.\n\t */\n\tcollapseAll() {\n\t\tthis._items?.forEach((item) => item.collapse());\n\t}\n\n\t/**\n\t * Checks if an item with the given id is expanded.\n\t *\n\t * If the `itemId` does not correspond to any item, it returns `false`.\n\t *\n\t * @param itemId The id of the item to check.\n\t */\n\tisExpanded(itemId: string) {\n\t\tconst item = this._getItem(itemId);\n\t\treturn item ? !item.collapsed : false;\n\t}\n\n\t/**\n\t * It checks, if the item can be expanded in the current state of the accordion.\n\t * With `closeOthers` there can be only one expanded item at a time.\n\t *\n\t * @internal\n\t */\n\t_ensureCanExpand(toExpand: NgbAccordionItem) {\n\t\tif (!this.closeOthers) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// special case during the initialization of the [collapse]=\"false\" inputs\n\t\t// `this._items` QueryList is not yet initialized, but we need to ensure only one item can be expanded at a time\n\t\tif (!this._items) {\n\t\t\tif (!this._anItemWasAlreadyExpandedDuringInitialisation) {\n\t\t\t\tthis._anItemWasAlreadyExpandedDuringInitialisation = true;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\t// if there is an expanded item, we need to collapse it first\n\t\tthis._items.find((item) => !item.collapsed && toExpand !== item)?.collapse();\n\n\t\treturn true;\n\t}\n\n\tprivate _getItem(itemId: string): NgbAccordionItem | undefined {\n\t\treturn this._items?.find((item) => item.id === itemId);\n\t}\n}\n","import { NgModule } from '@angular/core';\n\nimport {\n\tNgbAccordionDirective,\n\tNgbAccordionItem,\n\tNgbAccordionHeader,\n\tNgbAccordionToggle,\n\tNgbAccordionBody,\n\tNgbAccordionCollapse,\n\tNgbAccordionButton,\n} from './accordion.directive';\n\nexport {\n\tNgbAccordionButton,\n\tNgbAccordionDirective,\n\tNgbAccordionItem,\n\tNgbAccordionHeader,\n\tNgbAccordionToggle,\n\tNgbAccordionBody,\n\tNgbAccordionCollapse,\n} from './accordion.directive';\nexport { NgbAccordionConfig } from './accordion-config';\n\nconst NGB_ACCORDION_DIRECTIVES = [\n\tNgbAccordionButton,\n\tNgbAccordionDirective,\n\tNgbAccordionItem,\n\tNgbAccordionHeader,\n\tNgbAccordionToggle,\n\tNgbAccordionBody,\n\tNgbAccordionCollapse,\n];\n\n@NgModule({\n\timports: NGB_ACCORDION_DIRECTIVES,\n\texports: NGB_ACCORDION_DIRECTIVES,\n})\nexport class NgbAccordionModule {}\n","import { inject, Injectable } from '@angular/core';\nimport { NgbConfig } from '../ngb-config';\n\n/**\n * A configuration service for the [NgbAlert](#/components/alert/api#NgbAlert) component.\n *\n * You can inject this service, typically in your root component, and customize its properties\n * to provide default values for all alerts used in the application.\n */\n@Injectable({ providedIn: 'root' })\nexport class NgbAlertConfig {\n\tprivate _ngbConfig = inject(NgbConfig);\n\tprivate _animation: boolean;\n\n\tdismissible = true;\n\ttype = 'warning';\n\n\tget animation(): boolean {\n\t\treturn this._animation ?? this._ngbConfig.animation;\n\t}\n\tset animation(animation: boolean) {\n\t\tthis._animation = animation;\n\t}\n}\n","import { NgbTransitionStartFn } from '../util/transition/ngbTransition';\n\nexport const ngbAlertFadingTransition: NgbTransitionStartFn = ({ classList }: HTMLElement) => {\n\tclassList.remove('show');\n};\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tElementRef,\n\tEventEmitter,\n\tinject,\n\tInput,\n\tNgZone,\n\tOutput,\n\tViewEncapsulation,\n} from '@angular/core';\n\nimport { Observable } from 'rxjs';\n\nimport { NgbAlertConfig } from './alert-config';\nimport { ngbRunTransition } from '../util/transition/ngbTransition';\nimport { ngbAlertFadingTransition } from './alert-transition';\n\n/**\n * Alert is a component to provide contextual feedback messages for user.\n *\n * It supports several alert types and can be dismissed.\n */\n@Component({\n\tselector: 'ngb-alert',\n\texportAs: 'ngbAlert',\n\tstandalone: true,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n\thost: {\n\t\trole: 'alert',\n\t\t'[class]': '\"alert show\" + (type ? \" alert-\" + type : \"\")',\n\t\t'[class.fade]': 'animation',\n\t\t'[class.alert-dismissible]': 'dismissible',\n\t},\n\ttemplate: `\n\t\t<ng-content />\n\t\t@if (dismissible) {\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"btn-close\"\n\t\t\t\taria-label=\"Close\"\n\t\t\t\ti18n-aria-label=\"@@ngb.alert.close\"\n\t\t\t\t(click)=\"close()\"\n\t\t\t></button>\n\t\t}\n\t`,\n\tstyleUrl: './alert.scss',\n})\nexport class NgbAlert {\n\tprivate _config = inject(NgbAlertConfig);\n\tprivate _elementRef = inject(ElementRef<HTMLElement>);\n\tprivate _zone = inject(NgZone);\n\n\t/**\n\t * If `true`, alert closing will be animated.\n\t *\n\t * Animation is triggered only when clicked on the close button (×)\n\t * or via the `.close()` function\n\t *\n\t * @since 8.0.0\n\t */\n\t@Input() animation = this._config.animation;\n\n\t/**\n\t * If `true`, alert can be dismissed by the user.\n\t *\n\t * The close button (×) will be displayed and you can be notified\n\t * of the event with the `(closed)` output.\n\t */\n\t@Input() dismissible = this._config.dismissible;\n\n\t/**\n\t * Type of the alert.\n\t *\n\t * Bootstrap provides styles for the following types: `'success'`, `'info'`, `'warning'`, `'danger'`, `'primary'`,\n\t * `'secondary'`, `'light'` and `'dark'`.\n\t */\n\t@Input() type = this._config.type;\n\n\t/**\n\t * An event emitted when the close button is clicked. It has no payload and only relevant for dismissible alerts.\n\t *\n\t * @since 8.0.0\n\t */\n\t@Output() closed = new EventEmitter<void>();\n\n\t/**\n\t * Triggers alert closing programmatically (same as clicking on the close button (×)).\n\t *\n\t * The returned observable will emit and be completed once the closing transition has finished.\n\t * If the animations are turned off this happens synchronously.\n\t *\n\t * Alternatively you could listen or subscribe to the `(closed)` output\n\t *\n\t * @since 8.0.0\n\t */\n\tclose(): Observable<void> {\n\t\tconst transition = ngbRunTransition(this._zone, this._elementRef.nativeElement, ngbAlertFadingTransition, {\n\t\t\tanimation: this.animation,\n\t\t\trunningTransition: 'continue',\n\t\t});\n\t\ttransition.subscribe(() => this.closed.emit());\n\t\treturn transition;\n\t}\n}\n","import { NgModule } from '@angular/core';\n\nimport { NgbAlert } from './alert';\n\nexport { NgbAlert } from './alert';\nexport { NgbAlertConfig } from './alert-config';\n\n@NgModule({\n\timports: [NgbAlert],\n\texports: [NgbAlert],\n})\nexport class NgbAlertModule {}\n","import { inject, Injectable } from '@angular/core';\nimport { NgbConfig } from '../ngb-config';\n\n/**\n * A configuration service for the [NgbCarousel](#/components/carousel/api#NgbCarousel) component.\n *\n * You can inject this service, typically in your root component, and customize its properties\n * to provide default values for all carousels used in the application.\n */\n@Injectable({ providedIn: 'root' })\nexport class NgbCarouselConfig {\n\tprivate _ngbConfig = inject(NgbConfig);\n\tprivate _animation: boolean;\n\n\tinterval = 5000;\n\twrap = true;\n\tkeyboard = true;\n\tpauseOnHover = true;\n\tpauseOnFocus = true;\n\tshowNavigationArrows = true;\n\tshowNavigationIndicators = true;\n\n\tget animation(): boolean {\n\t\treturn this._animation ?? this._ngbConfig.animation;\n\t}\n\tset animation(animation: boolean) {\n\t\tthis._animation = animation;\n\t}\n}\n","import { NgbTransitionStartFn } from '../util/transition/ngbTransition';\nimport { reflow } from '../util/util';\n\n/**\n * Defines the carousel slide transition direction.\n */\nexport enum NgbSlideEventDirection {\n\tSTART = 'start',\n\tEND = 'end',\n}\n\nexport interface NgbCarouselCtx {\n\t/**\n\t * <span class=\"badge bg-info text-dark\">since 12.0.0</span> Possible values are `'start' | 'end'`.\n\t *\n\t * <span class=\"badge bg-secondary\">before 12.0.0</span> Possible values were `'left' | 'right'`.\n\t */\n\tdirection: 'start' | 'end';\n}\n\nconst isBeingAnimated = ({ classList }: HTMLElement) => {\n\treturn classList.contains('carousel-item-start') || classList.contains('carousel-item-end');\n};\n\nconst removeDirectionClasses = (classList: DOMTokenList) => {\n\tclassList.remove('carousel-item-start', 'carousel-item-end');\n};\n\nconst removeClasses = (classList: DOMTokenList) => {\n\tremoveDirectionClasses(classList);\n\tclassList.remove('carousel-item-prev', 'carousel-item-next');\n};\n\nexport const ngbCarouselTransitionIn: NgbTransitionStartFn<NgbCarouselCtx> = (\n\telement: HTMLElement,\n\tanimation: boolean,\n\t{ direction }: NgbCarouselCtx,\n) => {\n\tconst { classList } = element;\n\n\tif (!animation) {\n\t\tremoveClasses(classList);\n\t\tclassList.add('active');\n\t\treturn;\n\t}\n\n\tif (isBeingAnimated(element)) {\n\t\t// Revert the transition\n\t\tremoveDirectionClasses(classList);\n\t} else {\n\t\t// For the 'in' transition, a 'pre-class' is applied to the element to ensure its visibility\n\t\tclassList.add('carousel-item-' + (direction === NgbSlideEventDirection.START ? 'next' : 'prev'));\n\t\treflow(element);\n\t\tclassList.add('carousel-item-' + direction);\n\t}\n\n\treturn () => {\n\t\tremoveClasses(classList);\n\t\tclassList.add('active');\n\t};\n};\n\nexport const ngbCarouselTransitionOut: NgbTransitionStartFn<NgbCarouselCtx> = (\n\telement: HTMLElement,\n\tanimation: boolean,\n\t{ direction }: NgbCarouselCtx,\n) => {\n\tconst { classList } = element;\n\n\tif (!animation) {\n\t\tremoveClasses(classList);\n\t\tclassList.remove('active');\n\t\treturn;\n\t}\n\n\t// direction is left or right, depending on the way the slide goes out.\n\tif (isBeingAnimated(element)) {\n\t\t// Revert the transition\n\t\tremoveDirectionClasses(classList);\n\t} else {\n\t\tclassList.add('carousel-item-' + direction);\n\t}\n\n\treturn () => {\n\t\tremoveClasses(classList);\n\t\tclassList.remove('active');\n\t};\n};\n","import {\n\tAfterContentChecked,\n\tAfterContentInit,\n\tafterNextRender,\n\tAfterViewInit,\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tContentChildren,\n\tDestroyRef,\n\tDirective,\n\tElementRef,\n\tEventEmitter,\n\tinject,\n\tInjector,\n\tInput,\n\tNgZone,\n\tOutput,\n\tPLATFORM_ID,\n\tQueryList,\n\tTemplateRef,\n\tViewEncapsulation,\n} from '@angular/core';\nimport { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';\n\nimport { NgbCarouselConfig } from './carousel-config';\n\nimport { BehaviorSubject, combineLatest, NEVER, Observable, timer, zip } from 'rxjs';\nimport { distinctUntilChanged, map, startWith, switchMap, take } from 'rxjs/operators';\nimport { ngbCompleteTransition, ngbRunTransition, NgbTransitionOptions } from '../util/transition/ngbTransition';\nimport {\n\tNgbCarouselCtx,\n\tngbCarouselTransitionIn,\n\tngbCarouselTransitionOut,\n\tNgbSlideEventDirection,\n} from './carousel-transition';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nlet nextId = 0;\nlet carouselId = 0;\n\n/**\n * A directive that wraps the individual carousel slide.\n */\n@Directive({ selector: 'ng-template[ngbSlide]', standalone: true })\nexport class NgbSlide {\n\ttemplateRef = inject(TemplateRef);\n\n\t/**\n\t * Slide id that must be unique for the entire document.\n\t *\n\t * If not provided, will be generated in the `ngb-slide-xx` format.\n\t */\n\t@Input() id = `ngb-slide-${nextId++}`;\n\n\t/**\n\t * An event emitted when the slide transition is finished\n\t *\n\t * @since 8.0.0\n\t */\n\t@Output() slid = new EventEmitter<NgbSingleSlideEvent>();\n}\n\n/**\n * Carousel is a component to easily create and control slideshows.\n *\n * Allows to set intervals, change the way user interacts with the slides and provides a programmatic API.\n */\n@Component({\n\tselector: 'ngb-carousel',\n\texportAs: 'ngbCarousel',\n\timports: [NgTemplateOutlet],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n\thost: {\n\t\tclass: 'carousel slide',\n\t\t'[style.display]': '\"block\"',\n\t\ttabIndex: '0',\n\t\t'(keydown.arrowLeft)': 'keyboard && arrowLeft()',\n\t\t'(keydown.arrowRight)': 'keyboard && arrowRight()',\n\t\t'(mouseenter)': 'mouseHover = true',\n\t\t'(mouseleave)': 'mouseHover = false',\n\t\t'(focusin)': 'focused = true',\n\t\t'(focusout)': 'focused = false',\n\t\t'[attr.aria-activedescendant]': `'slide-' + activeId`,\n\t},\n\ttemplate: `\n\t\t<div class=\"carousel-indicators\" [class.visually-hidden]=\"!showNavigationIndicators\" role=\"tablist\">\n\t\t\t@for (slide of slides; track slide) {\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tdata-bs-target\n\t\t\t\t\t[class.active]=\"slide.id === activeId\"\n\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t[attr.aria-labelledby]=\"'slide-' + slide.id\"\n\t\t\t\t\t[attr.aria-controls]=\"'slide-' + slide.id\"\n\t\t\t\t\t[attr.aria-selected]=\"slide.id === activeId\"\n\t\t\t\t\t(click)=\"focus(); select(slide.id, NgbSlideEventSource.INDICATOR)\"\n\t\t\t\t></button>\n\t\t\t}\n\t\t</div>\n\t\t<div class=\"carousel-inner\">\n\t\t\t@for (slide of slides; track slide; let i = $index; let c = $count) {\n\t\t\t\t<div class=\"carousel-item\" [id]=\"'slide-' + slide.id\" role=\"tabpanel\">\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass=\"visually-hidden\"\n\t\t\t\t\t\ti18n=\"Currently selected slide number read by screen reader@@ngb.carousel.slide-number\"\n\t\t\t\t\t>\n\t\t\t\t\t\tSlide {{ i + 1 }} of {{ c }}\n\t\t\t\t\t</span>\n\t\t\t\t\t<ng-template [ngTemplateOutlet]=\"slide.templateRef\" />\n\t\t\t\t</div>\n\t\t\t}\n\t\t</div>\n\t\t@if (showNavigationArrows) {\n\t\t\t<button\n\t\t\t\tclass=\"carousel-control-prev\"\n\t\t\t\ttype=\"button\"\n\t\t\t\t(click)=\"arrowLeft()\"\n\t\t\t\t[attr.aria-labelledby]=\"id + '-previous'\"\n\t\t\t>\n\t\t\t\t<span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n\t\t\t\t<span class=\"visually-hidden\" i18n=\"@@ngb.carousel.previous\" [id]=\"id + '-previous'\">Previous</span>\n\t\t\t</button>\n\t\t\t<button class=\"carousel-control-next\" type=\"button\" (click)=\"arrowRight()\" [attr.aria-labelledby]=\"id + '-next'\">\n\t\t\t\t<span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\n\t\t\t\t<span class=\"visually-hidden\" i18n=\"@@ngb.carousel.next\" [id]=\"id + '-next'\">Next</span>\n\t\t\t</button>\n\t\t}\n\t`,\n})\nexport class NgbCarousel implements AfterContentChecked, AfterContentInit, AfterViewInit {\n\t@ContentChildren(NgbSlide) slides: QueryList<NgbSlide>;\n\n\tpublic NgbSlideEventSource = NgbSlideEventSource;\n\n\tprivate _config = inject(NgbCarouselConfig);\n\tprivate _platformId = inject(PLATFORM_ID);\n\tprivate _ngZone = inject(NgZone);\n\tprivate _cd = inject(ChangeDetectorRef);\n\tprivate _container = inject(ElementRef);\n\tprivate _destroyRef = inject(DestroyRef);\n\tprivate _injector = inject(Injector);\n\n\tprivate _interval$ = new BehaviorSubject(this._config.interval);\n\tprivate _mouseHover$ = new BehaviorSubject(false);\n\tprivate _focused$ = new BehaviorSubject(false);\n\tprivate _pauseOnHover$ = new BehaviorSubject(this._config.pauseOnHover);\n\tprivate _pauseOnFocus$ = new BehaviorSubject(this._config.pauseOnFocus);\n\tprivate _pause$ = new BehaviorSubject(false);\n\tprivate _wrap$ = new BehaviorSubject(this._config.wrap);\n\n\tid = `ngb-carousel-${carouselId++}`;\n\n\t/**\n\t * A flag to enable/disable the animations.\n\t *