{"version":3,"file":"ng-hub-ui-portal.mjs","sources":["../../../projects/portal/src/lib/portal-config.ts","../../../projects/portal/src/lib/portal-ref.ts","../../../projects/portal/src/lib/portal-window.ts","../../../projects/portal/src/lib/portal-stack.ts","../../../projects/portal/src/lib/portal.ts","../../../projects/portal/src/lib/portal-dismiss-reasons.ts","../../../projects/portal/src/lib/portal.module.ts","../../../projects/portal/src/public-api.ts","../../../projects/portal/src/ng-hub-ui-portal.ts"],"sourcesContent":["import { Injectable, Injector } from '@angular/core';\n// import { HubConfig } from '../hub-config';\n\n/**\n * Options available when opening new portal windows with `HubPortal.open()` method.\n */\nexport interface HubPortalOptions {\n\t/**\n\t * If `true`, portal opening and closing will be animated.\n\t *\n\t * @since 8.0.0\n\t */\n\tanimation?: boolean;\n\n\t/**\n\t * `aria-labelledby` attribute value to set on the portal window.\n\t *\n\t * @since 2.2.0\n\t */\n\tariaLabelledBy?: string;\n\n\t/**\n\t * `aria-describedby` attribute value to set on the portal window.\n\t *\n\t * @since 6.1.0\n\t */\n\tariaDescribedBy?: string;\n\n\t/**\n\t * Callback right before the portal will be dismissed.\n\t *\n\t * If this function returns:\n\t * * `false`\n\t * * a promise resolved with `false`\n\t * * a promise that is rejected\n\t *\n\t * then the portal won't be dismissed.\n\t */\n\tbeforeDismiss?: () => boolean | Promise<boolean>;\n\n\t/**\n\t * A selector specifying the element all new portal windows should be appended to.\n\t * Since v5.3.0 it is also possible to pass the reference to an `HTMLElement`.\n\t *\n\t * If not specified, will be `body`.\n\t */\n\tcontainer?: string | HTMLElement;\n\n\t/**\n\t * The `Injector` to use for portal content.\n\t */\n\tinjector?: Injector;\n\n\t/**\n\t * If `true`, the portal will be closed when `Escape` key is pressed\n\t *\n\t * Default value is `true`.\n\t */\n\tkeyboard?: boolean;\n\n\t/**\n\t * Scrollable portal content (false by default).\n\t *\n\t * @since 5.0.0\n\t */\n\tscrollable?: boolean;\n\n\t/**\n\t * A custom class to append to the portal window.\n\t */\n\twindowClass?: string;\n\n\t/**\n\t * A custom class to append to the portal dialog.\n\t *\n\t * @since 9.1.0\n\t */\n\tportalDialogClass?: string;\n\n\t/**\n\t * A custom class to append to the portal content.\n\t *\n\t * @since 9.1.0\n\t */\n\tportalContentClass?: string;\n\n\t/**\n\t * Allows to specify a custom selector for the header element of the portal window. This can be useful if you want to target\n\t * a specific element within the portal to act as the header, for example, to apply custom styling or functionality to it. By\n\t * providing a CSS selector string, you can target the desired\theader element within the portal content.\n\t */\n\theaderSelector?: string;\n\n\t/**\n\t * Allows to specify a custom selector for the footer element of the portal window. This can be useful if you want to target\n\t * a specific element within the portal to act as the footer, for example, to apply custom styling or functionality to it. By\n\t * providing a CSS selector string, you can target the desired footer element within the portal content.\n\t */\n\tfooterSelector?: string;\n\n\t/** Used to specify a custom selector for elements that can trigger the dismissal of the portal window. By providing a CSS selector\n\t * string for `dismissSelector`, you can target specific elements within the portal content that, when interacted with (e.g., clicked),\n\t * will close or dismiss the portal window.\n\t */\n\tdismissSelector?: string;\n\n\t/**\n\t * Used to specify a custom selector for elements that can trigger the closing of the portal window. By providing a CSS selector\n\t * string for `closeSelector`, you can target specific elements within the portal content that, when interacted with (e.g., clicked),\n\t * will close the portal window. This allows for customization of the elements that can act as close buttons for the portal.\n\t */\n\tcloseSelector?: string;\n}\n\n/**\n * Options that can be changed on an opened portal with `HubPortalRef.update()` and `HubActivePortal.update()` methods.\n *\n * @since 14.2.0\n */\nexport type HubPortalUpdatableOptions = Pick<\n\tHubPortalOptions,\n\t| 'ariaLabelledBy'\n\t| 'ariaDescribedBy'\n\t| 'windowClass'\n\t| 'portalDialogClass'\n\t| 'portalContentClass'\n>;\n\n/**\n * A configuration service for the [`HubPortal`](#/components/portal/api#HubPortal) service.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all portals used in the application.\n *\n * @since 3.1.0\n */\n@Injectable({ providedIn: 'root' })\nexport class HubPortalConfig implements Required<HubPortalOptions> {\n\t// private _hubConfig = inject(HubConfig);\n\tprivate _animation: boolean;\n\n\tariaLabelledBy: string;\n\tariaDescribedBy: string;\n\tbeforeDismiss: () => boolean | Promise<boolean>;\n\tcontainer: string | HTMLElement;\n\tinjector: Injector;\n\tkeyboard = true;\n\tscrollable: boolean;\n\twindowClass: string;\n\tportalDialogClass: string;\n\tportalContentClass: string;\n\theaderSelector: string;\n\tfooterSelector: string;\n\tdismissSelector: string = '[data-dismiss=\"portal\"]';\n\tcloseSelector: string = '[data-close=\"portal\"]';\n\n\tget animation(): boolean {\n\t\treturn this._animation ?? true /* this._hubConfig.animation */;\n\t}\n\tset animation(animation: boolean) {\n\t\tthis._animation = animation;\n\t}\n}\n","import { ComponentRef } from '@angular/core';\nimport { ContentRef, isDefined, isPromise } from 'ng-hub-ui-utils';\nimport { Observable, Subject, zip } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { HubPortalOptions, HubPortalUpdatableOptions } from './portal-config';\nimport { HubPortalWindow } from './portal-window';\n\n/**\n * A reference to the currently opened (active) portal.\n *\n * Instances of this class can be injected into your component passed as portal content.\n * So you can `.update()`, `.close()` or `.dismiss()` the portal window from your component.\n */\nexport class HubActivePortal {\n\t/**\n\t * Updates options of an opened portal.\n\t *\n\t * @since 14.2.0\n\t */\n\tupdate(options: HubPortalUpdatableOptions): void {}\n\t/**\n\t * Closes the portal with an optional `result` value.\n\t *\n\t * The `HubPortalRef.result` promise will be resolved with the provided value.\n\t */\n\tclose(result?: any): void {}\n\n\t/**\n\t * Dismisses the portal with an optional `reason` value.\n\t *\n\t * The `HubPortalRef.result` promise will be rejected with the provided value.\n\t */\n\tdismiss(reason?: any): void {}\n}\n\nconst WINDOW_ATTRIBUTES: string[] = [\n\t'animation',\n\t'ariaLabelledBy',\n\t'ariaDescribedBy',\n\t'scrollable',\n\t'windowClass',\n\t'portalDialogClass',\n\t'portalContentClass'\n];\nconst BACKDROP_ATTRIBUTES: string[] = ['animation', 'backdropClass'];\n\n/**\n * A reference to the newly opened portal returned by the `HubPortal.open()` method.\n */\nexport class HubPortalRef {\n\tprivate _closed = new Subject<any>();\n\tprivate _dismissed = new Subject<any>();\n\tprivate _hidden = new Subject<void>();\n\tprivate _resolve!: (result?: any) => void;\n\tprivate _reject!: (reason?: any) => void;\n\n\tprivate _applyWindowOptions(\n\t\twindowInstance: HubPortalWindow,\n\t\toptions: HubPortalOptions\n\t): void {\n\t\tWINDOW_ATTRIBUTES.forEach((optionName: string) => {\n\t\t\tif (isDefined(options[optionName])) {\n\t\t\t\twindowInstance[optionName] = options[optionName];\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Updates options of an opened portal.\n\t *\n\t * @since 14.2.0\n\t */\n\tupdate(options: HubPortalUpdatableOptions): void {\n\t\tthis._applyWindowOptions(this._windowCmptRef.instance, options);\n\t}\n\n\t/**\n\t * The instance of a component used for the portal content.\n\t *\n\t * When a `TemplateRef` is used as the content or when the portal is closed, will return `undefined`.\n\t */\n\tget componentInstance(): any {\n\t\tif (this._contentRef && this._contentRef.componentRef) {\n\t\t\treturn this._contentRef.componentRef.instance;\n\t\t}\n\t}\n\n\t/**\n\t * The promise that is resolved when the portal is closed and rejected when the portal is dismissed.\n\t */\n\tresult: Promise<any>;\n\n\t/**\n\t * The observable that emits when the portal is closed via the `.close()` method.\n\t *\n\t * It will emit the result passed to the `.close()` method.\n\t */\n\tget closed(): Observable<any> {\n\t\treturn this._closed.asObservable().pipe(takeUntil(this._hidden));\n\t}\n\n\t/**\n\t * The observable that emits when the portal is dismissed via the `.dismiss()` method.\n\t *\n\t * It will emit the reason passed to the `.dismissed()` method by the user.\n\t */\n\tget dismissed(): Observable<any> {\n\t\treturn this._dismissed.asObservable().pipe(takeUntil(this._hidden));\n\t}\n\n\t/**\n\t * The observable that emits when portal window is closed and animations were finished.\n\t * At this point portal element will be removed from the DOM tree.\n\t *\n\t * This observable will be completed after emitting.\n\t */\n\tget hidden(): Observable<void> {\n\t\treturn this._hidden.asObservable();\n\t}\n\n\t/**\n\t * The observable that emits when portal is fully visible and animation was finished.\n\t * Portal DOM element is always available synchronously after calling 'portal.open()' service.\n\t *\n\t * This observable will be completed after emitting.\n\t * It will not emit, if portal is closed before open animation is finished.\n\t */\n\tget shown(): Observable<void> {\n\t\treturn this._windowCmptRef.instance.shown.asObservable();\n\t}\n\n\tconstructor(\n\t\tprivate _windowCmptRef: ComponentRef<HubPortalWindow>,\n\t\tprivate _contentRef: ContentRef,\n\t\tprivate _beforeDismiss?: () => boolean | Promise<boolean>\n\t) {\n\t\t_windowCmptRef.instance.dismissEvent.subscribe((reason: any) => {\n\t\t\tthis.dismiss(reason);\n\t\t});\n\n\t\tthis.result = new Promise((resolve, reject) => {\n\t\t\tthis._resolve = resolve;\n\t\t\tthis._reject = reject;\n\t\t});\n\t\tthis.result.then(null, () => {});\n\t}\n\n\t/**\n\t * Closes the portal with an optional `result` value.\n\t *\n\t * The `HubMobalRef.result` promise will be resolved with the provided value.\n\t */\n\tclose(result?: any): void {\n\t\tif (this._windowCmptRef) {\n\t\t\tthis._closed.next(result);\n\t\t\tthis._resolve(result);\n\t\t\tthis._removePortalElements();\n\t\t}\n\t}\n\n\tprivate _dismiss(reason?: any) {\n\t\tthis._dismissed.next(reason);\n\t\tthis._reject(reason);\n\t\tthis._removePortalElements();\n\t}\n\n\t/**\n\t * Dismisses the portal with an optional `reason` value.\n\t *\n\t * The `HubPortalRef.result` promise will be rejected with the provided value.\n\t */\n\tdismiss(reason?: any): void {\n\t\tif (this._windowCmptRef) {\n\t\t\tif (!this._beforeDismiss) {\n\t\t\t\tthis._dismiss(reason);\n\t\t\t} else {\n\t\t\t\tconst dismiss = this._beforeDismiss();\n\t\t\t\tif (isPromise(dismiss)) {\n\t\t\t\t\tdismiss.then(\n\t\t\t\t\t\t(result) => {\n\t\t\t\t\t\t\tif (result !== false) {\n\t\t\t\t\t\t\t\tthis._dismiss(reason);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t() => {}\n\t\t\t\t\t);\n\t\t\t\t} else if (dismiss !== false) {\n\t\t\t\t\tthis._dismiss(reason);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _removePortalElements() {\n\t\tconst windowTransition$ = this._windowCmptRef.instance.hide();\n\n\t\t// hiding window\n\t\twindowTransition$.subscribe(() => {\n\t\t\tconst { nativeElement } = this._windowCmptRef.location;\n\t\t\tnativeElement.parentNode.removeChild(nativeElement);\n\t\t\tthis._windowCmptRef.destroy();\n\t\t\tthis._contentRef?.viewRef?.destroy();\n\n\t\t\tthis._windowCmptRef = <any>null;\n\t\t\tthis._contentRef = <any>null;\n\t\t});\n\n\t\t// all done\n\t\tzip(windowTransition$).subscribe(() => {\n\t\t\tthis._hidden.next();\n\t\t\tthis._hidden.complete();\n\t\t});\n\t}\n}\n","import { DOCUMENT, NgIf } from '@angular/common';\nimport {\n\tComponent,\n\tElementRef,\n\tEventEmitter,\n\tinject,\n\tInput,\n\tNgZone,\n\tOnDestroy,\n\tOnInit,\n\tOutput,\n\tViewChild,\n\tViewEncapsulation\n} from '@angular/core';\nimport {\n\tgetFocusableBoundaryElements,\n\thubRunTransition,\n\treflow,\n\tTransitionOptions\n} from 'ng-hub-ui-utils';\nimport { Observable, Subject, zip } from 'rxjs';\nimport { take } from 'rxjs/operators';\n\n@Component({\n\tselector: 'hub-portal-window',\n\tstandalone: true,\n\timports: [NgIf],\n\thost: {\n\t\t'[class]': '\"portal d-block\" + (windowClass ? \" \" + windowClass : \"\")',\n\t\t'[class.fade]': 'animation',\n\t\trole: 'dialog',\n\t\ttabindex: '-1',\n\t\t'[attr.aria-portal]': 'true',\n\t\t'[attr.aria-labelledby]': 'ariaLabelledBy',\n\t\t'[attr.aria-describedby]': 'ariaDescribedBy'\n\t},\n\ttemplate: `\n\t\t<div\n\t\t\t#dialog\n\t\t\t[class]=\"\n\t\t\t\t'portal-dialog' +\n\t\t\t\t(scrollable ? ' portal-dialog-scrollable' : '') +\n\t\t\t\t(portalDialogClass ? ' ' + portalDialogClass : '')\n\t\t\t\"\n\t\t\trole=\"document\"\n\t\t>\n\t\t\t<div\n\t\t\t\t[class]=\"\n\t\t\t\t\t'portal-content' +\n\t\t\t\t\t(portalContentClass ? ' ' + portalContentClass : '')\n\t\t\t\t\"\n\t\t\t>\n\t\t\t\t<ng-container *ngIf=\"singleContent; else multipleContent\">\n\t\t\t\t\t<ng-content></ng-content>\n\t\t\t\t</ng-container>\n\t\t\t\t<ng-template #multipleContent>\n\t\t\t\t\t<div class=\"portal-header\">\n\t\t\t\t\t\t<ng-content />\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tclass=\"btn-close\"\n\t\t\t\t\t\t\tdata-bs-dismiss=\"portal\"\n\t\t\t\t\t\t\taria-label=\"Close\"\n\t\t\t\t\t\t\t(click)=\"dismiss(null)\"\n\t\t\t\t\t\t></button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"portal-body\">\n\t\t\t\t\t\t<ng-content />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"portal-footer\">\n\t\t\t\t\t\t<ng-content />\n\t\t\t\t\t</div>\n\t\t\t\t</ng-template>\n\t\t\t</div>\n\t\t</div>\n\t`,\n\tencapsulation: ViewEncapsulation.None,\n\tstyleUrl: './portal.scss'\n})\nexport class HubPortalWindow implements OnInit, OnDestroy {\n\tprivate _document = inject(DOCUMENT);\n\tprivate _elRef = inject(ElementRef<HTMLElement>);\n\tprivate _zone = inject(NgZone);\n\n\tprivate _closed$ = new Subject<void>();\n\tprivate _elWithFocus: Element | null = null; // element that is focused prior to portal opening\n\n\t@ViewChild('dialog', { static: true })\n\tprivate _dialogEl: ElementRef<HTMLElement>;\n\n\t@Input() animation: boolean;\n\t@Input() ariaLabelledBy: string;\n\t@Input() ariaDescribedBy: string;\n\t@Input() scrollable: string;\n\t@Input() windowClass: string;\n\t@Input() portalDialogClass: string;\n\t@Input() portalContentClass: string;\n\n\tsingleContent!: boolean;\n\n\t@Output('dismiss') dismissEvent = new EventEmitter();\n\n\tshown = new Subject<void>();\n\thidden = new Subject<void>();\n\n\tdismiss(reason): void {\n\t\tthis.dismissEvent.emit(reason);\n\t}\n\n\tngOnInit() {\n\t\tthis._elWithFocus = this._document.activeElement;\n\t\tthis._zone.onStable\n\t\t\t.asObservable()\n\t\t\t.pipe(take(1))\n\t\t\t.subscribe(() => {\n\t\t\t\tthis._show();\n\t\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis._disableEventHandling();\n\t}\n\n\thide(): Observable<any> {\n\t\tconst { nativeElement } = this._elRef;\n\t\tconst context: TransitionOptions<any> = {\n\t\t\tanimation: this.animation,\n\t\t\trunningTransition: 'stop'\n\t\t};\n\n\t\tconst windowTransition$ = hubRunTransition(\n\t\t\tthis._zone,\n\t\t\tnativeElement,\n\t\t\t() => nativeElement.classList.remove('show'),\n\t\t\tcontext\n\t\t);\n\t\tconst dialogTransition$ = hubRunTransition(\n\t\t\tthis._zone,\n\t\t\tthis._dialogEl.nativeElement,\n\t\t\t() => {},\n\t\t\tcontext\n\t\t);\n\n\t\tconst transitions$ = zip(windowTransition$, dialogTransition$);\n\t\ttransitions$.subscribe(() => {\n\t\t\tthis.hidden.next();\n\t\t\tthis.hidden.complete();\n\t\t});\n\n\t\tthis._disableEventHandling();\n\t\tthis._restoreFocus();\n\n\t\treturn transitions$;\n\t}\n\n\tprivate _show() {\n\t\tconst context: TransitionOptions<any> = {\n\t\t\tanimation: this.animation,\n\t\t\trunningTransition: 'continue'\n\t\t};\n\n\t\tconst windowTransition$ = hubRunTransition(\n\t\t\tthis._zone,\n\t\t\tthis._elRef.nativeElement,\n\t\t\t(element: HTMLElement, animation: boolean) => {\n\t\t\t\tif (animation) {\n\t\t\t\t\treflow(element);\n\t\t\t\t}\n\t\t\t\telement.classList.add('show');\n\t\t\t},\n\t\t\tcontext\n\t\t);\n\t\tconst dialogTransition$ = hubRunTransition(\n\t\t\tthis._zone,\n\t\t\tthis._dialogEl.nativeElement,\n\t\t\t() => {},\n\t\t\tcontext\n\t\t);\n\n\t\tzip(windowTransition$, dialogTransition$).subscribe(() => {\n\t\t\tthis.shown.next();\n\t\t\tthis.shown.complete();\n\t\t});\n\n\t\tthis._setFocus();\n\t}\n\n\tprivate _disableEventHandling() {\n\t\tthis._closed$.next();\n\t}\n\n\tprivate _setFocus() {\n\t\tconst { nativeElement } = this._elRef;\n\t\tif (!nativeElement.contains(document.activeElement)) {\n\t\t\tconst autoFocusable = nativeElement.querySelector(\n\t\t\t\t`[hubAutofocus]`\n\t\t\t) as HTMLElement;\n\t\t\tconst firstFocusable =\n\t\t\t\tgetFocusableBoundaryElements(nativeElement)[0];\n\n\t\t\tconst elementToFocus =\n\t\t\t\tautoFocusable || firstFocusable || nativeElement;\n\t\t\telementToFocus.focus();\n\t\t}\n\t}\n\n\tprivate _restoreFocus() {\n\t\tconst body = this._document.body;\n\t\tconst elWithFocus = this._elWithFocus;\n\n\t\tlet elementToFocus;\n\t\tif (elWithFocus && elWithFocus['focus'] && body.contains(elWithFocus)) {\n\t\t\telementToFocus = elWithFocus;\n\t\t} else {\n\t\t\telementToFocus = body;\n\t\t}\n\t\tthis._zone.runOutsideAngular(() => {\n\t\t\tsetTimeout(() => elementToFocus.focus());\n\t\t\tthis._elWithFocus = null;\n\t\t});\n\t}\n}\n","import { DOCUMENT } from '@angular/common';\nimport {\n\tApplicationRef,\n\tComponentRef,\n\tcreateComponent,\n\tEnvironmentInjector,\n\tEventEmitter,\n\tinject,\n\tInjectable,\n\tInjector,\n\tNgZone,\n\tTemplateRef,\n\tType\n} from '@angular/core';\nimport {\n\tContentRef,\n\thubFocusTrap,\n\tisDefined,\n\tisString,\n\tScrollBar\n} from 'ng-hub-ui-utils';\nimport { Subject } from 'rxjs';\nimport { take } from 'rxjs/operators';\nimport { HubPortalOptions, HubPortalUpdatableOptions } from './portal-config';\nimport { HubActivePortal, HubPortalRef } from './portal-ref';\nimport { HubPortalWindow } from './portal-window';\n\n@Injectable({ providedIn: 'root' })\nexport class HubPortalStack {\n\tprivate _applicationRef = inject(ApplicationRef);\n\tprivate _injector = inject(Injector);\n\tprivate _environmentInjector = inject(EnvironmentInjector);\n\tprivate _document = inject(DOCUMENT);\n\tprivate _scrollBar = inject(ScrollBar);\n\n\tprivate _activeWindowCmptHasChanged = new Subject<void>();\n\tprivate _ariaHiddenValues: Map<Element, string | null> = new Map();\n\tprivate _scrollBarRestoreFn: null | (() => void) = null;\n\tprivate _portalRefs: HubPortalRef[] = [];\n\tprivate _windowCmpts: ComponentRef<HubPortalWindow>[] = [];\n\tprivate _activeInstances: EventEmitter<HubPortalRef[]> = new EventEmitter();\n\n\tconstructor() {\n\t\tconst ngZone = inject(NgZone);\n\n\t\t// Trap focus on active WindowCmpt\n\t\tthis._activeWindowCmptHasChanged.subscribe(() => {\n\t\t\tif (this._windowCmpts.length) {\n\t\t\t\tconst activeWindowCmpt =\n\t\t\t\t\tthis._windowCmpts[this._windowCmpts.length - 1];\n\t\t\t\thubFocusTrap(\n\t\t\t\t\tngZone,\n\t\t\t\t\tactiveWindowCmpt.location.nativeElement,\n\t\t\t\t\tthis._activeWindowCmptHasChanged\n\t\t\t\t);\n\t\t\t\tthis._revertAriaHidden();\n\t\t\t\tthis._setAriaHidden(activeWindowCmpt.location.nativeElement);\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _restoreScrollBar() {\n\t\tconst scrollBarRestoreFn = this._scrollBarRestoreFn;\n\t\tif (scrollBarRestoreFn) {\n\t\t\tthis._scrollBarRestoreFn = null;\n\t\t\tscrollBarRestoreFn();\n\t\t}\n\t}\n\n\tprivate _hideScrollBar() {\n\t\tif (!this._scrollBarRestoreFn) {\n\t\t\tthis._scrollBarRestoreFn = this._scrollBar.hide();\n\t\t}\n\t}\n\n\topen(\n\t\tcontentInjector: Injector,\n\t\tcontent: any,\n\t\toptions: HubPortalOptions\n\t): HubPortalRef {\n\t\tconst containerEl =\n\t\t\toptions.container instanceof HTMLElement\n\t\t\t\t? options.container\n\t\t\t\t: isDefined(options.container)\n\t\t\t\t? this._document.querySelector(options.container!)\n\t\t\t\t: this._document.body;\n\n\t\tif (!containerEl) {\n\t\t\tthrow new Error(\n\t\t\t\t`The specified portal container \"${\n\t\t\t\t\toptions.container || 'body'\n\t\t\t\t}\" was not found in the DOM.`\n\t\t\t);\n\t\t}\n\n\t\tthis._hideScrollBar();\n\n\t\tconst activePortal = new HubActivePortal();\n\n\t\tcontentInjector = options.injector || contentInjector;\n\t\tconst environmentInjector =\n\t\t\tcontentInjector.get(EnvironmentInjector, null) ||\n\t\t\tthis._environmentInjector;\n\t\tconst contentRef = this._getContentRef(\n\t\t\tcontentInjector,\n\t\t\tenvironmentInjector,\n\t\t\tcontent,\n\t\t\tactivePortal,\n\t\t\toptions\n\t\t);\n\n\t\tconst windowCmptRef: ComponentRef<HubPortalWindow> =\n\t\t\tthis._createWindowComponent(contentRef.nodes, options);\n\t\tthis._attachWindowComponent(containerEl, windowCmptRef);\n\t\tconst hubPortalRef: HubPortalRef = new HubPortalRef(\n\t\t\twindowCmptRef,\n\t\t\tcontentRef,\n\t\t\toptions.beforeDismiss\n\t\t);\n\n\t\tthis._registerPortalRef(hubPortalRef);\n\t\tthis._registerWindowCmpt(windowCmptRef);\n\n\t\t// We have to cleanup DOM after the last portal when BOTH 'hidden' was emitted and 'result' promise was resolved:\n\t\t// - with animations OFF, 'hidden' emits synchronously, then 'result' is resolved asynchronously\n\t\t// - with animations ON, 'result' is resolved asynchronously, then 'hidden' emits asynchronously\n\t\thubPortalRef.hidden.pipe(take(1)).subscribe(() =>\n\t\t\tPromise.resolve(true).then(() => {\n\t\t\t\tif (!this._portalRefs.length) {\n\t\t\t\t\tthis._document.body.classList.remove('portal-open');\n\t\t\t\t\tthis._restoreScrollBar();\n\t\t\t\t\tthis._revertAriaHidden();\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\n\t\tactivePortal.close = (result: any) => {\n\t\t\thubPortalRef.close(result);\n\t\t};\n\t\tactivePortal.dismiss = (reason: any) => {\n\t\t\thubPortalRef.dismiss(reason);\n\t\t};\n\n\t\tactivePortal.update = (options: HubPortalUpdatableOptions) => {\n\t\t\thubPortalRef.update(options);\n\t\t};\n\n\t\thubPortalRef.update(options);\n\t\tif (this._portalRefs.length === 1) {\n\t\t\tthis._document.body.classList.add('portal-open');\n\t\t}\n\n\t\twindowCmptRef.changeDetectorRef.detectChanges();\n\t\treturn hubPortalRef;\n\t}\n\n\t/**\n\t * Toggles a portal by dismissing all existing portals and waiting for them to be hidden\n\t * before showing the new one.\n\t *\n\t * @param contentInjector - The injector to use for dependency injection\n\t * @param content - The content to display (component, template, or string)\n\t * @param options - Portal configuration options\n\t * @returns A reference to the newly created portal\n\t */\n\ttoggle(\n\t\tcontentInjector: Injector,\n\t\tcontent: any,\n\t\toptions: HubPortalOptions\n\t): HubPortalRef {\n\t\t// Get current portals before creating the new one\n\t\tconst existingPortals = [...this._portalRefs];\n\n\t\t// Create the new portal but suppress normal registration\n\t\tconst containerEl =\n\t\t\toptions.container instanceof HTMLElement\n\t\t\t\t? options.container\n\t\t\t\t: isDefined(options.container)\n\t\t\t\t? this._document.querySelector(options.container!)\n\t\t\t\t: this._document.body;\n\n\t\tif (!containerEl) {\n\t\t\tthrow new Error(\n\t\t\t\t`The specified portal container \"${\n\t\t\t\t\toptions.container || 'body'\n\t\t\t\t}\" was not found in the DOM.`\n\t\t\t);\n\t\t}\n\n\t\tthis._hideScrollBar();\n\n\t\tconst activePortal = new HubActivePortal();\n\t\tcontentInjector = options.injector || contentInjector;\n\t\tconst environmentInjector =\n\t\t\tcontentInjector.get(EnvironmentInjector, null) ||\n\t\t\tthis._environmentInjector;\n\n\t\tconst contentRef = this._getContentRef(\n\t\t\tcontentInjector,\n\t\t\tenvironmentInjector,\n\t\t\tcontent,\n\t\t\tactivePortal,\n\t\t\toptions\n\t\t);\n\n\t\tconst windowCmptRef = this._createWindowComponent(\n\t\t\tcontentRef.nodes,\n\t\t\toptions\n\t\t);\n\n\t\tconst newPortalRef = new HubPortalRef(\n\t\t\twindowCmptRef,\n\t\t\tcontentRef,\n\t\t\toptions.beforeDismiss\n\t\t);\n\n\t\t// Setup active portal methods\n\t\tactivePortal.close = (result: any) => {\n\t\t\tnewPortalRef.close(result);\n\t\t};\n\t\tactivePortal.dismiss = (reason: any) => {\n\t\t\tnewPortalRef.dismiss(reason);\n\t\t};\n\t\tactivePortal.update = (options: HubPortalUpdatableOptions) => {\n\t\t\tnewPortalRef.update(options);\n\t\t};\n\n\t\t// Dismiss all existing portals and wait for them to be hidden\n\t\tconst hidePromises = existingPortals.map(\n\t\t\t(portal) =>\n\t\t\t\tnew Promise<void>((resolve) => {\n\t\t\t\t\tportal.hidden.pipe(take(1)).subscribe(() => {\n\t\t\t\t\t\tresolve();\n\t\t\t\t\t});\n\t\t\t\t\tportal.dismiss('toggle');\n\t\t\t\t})\n\t\t);\n\n\t\t// After all portals are hidden, register and show the new one\n\t\tPromise.all(hidePromises).then(() => {\n\t\t\tthis._attachWindowComponent(containerEl, windowCmptRef);\n\n\t\t\tthis._registerPortalRef(newPortalRef);\n\t\t\tthis._registerWindowCmpt(windowCmptRef);\n\n\t\t\tif (this._portalRefs.length === 1) {\n\t\t\t\tthis._document.body.classList.add('portal-open');\n\t\t\t}\n\n\t\t\tnewPortalRef.update(options);\n\t\t\twindowCmptRef.changeDetectorRef.detectChanges();\n\t\t});\n\n\t\t// Setup hidden cleanup like in open()\n\t\tnewPortalRef.hidden.pipe(take(1)).subscribe(() =>\n\t\t\tPromise.resolve(true).then(() => {\n\t\t\t\tif (!this._portalRefs.length) {\n\t\t\t\t\tthis._document.body.classList.remove('portal-open');\n\t\t\t\t\tthis._restoreScrollBar();\n\t\t\t\t\tthis._revertAriaHidden();\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\n\t\treturn newPortalRef;\n\t}\n\n\tget activeInstances() {\n\t\treturn this._activeInstances;\n\t}\n\n\tdismissAll(reason?: any) {\n\t\tthis._portalRefs.forEach((hubPortalRef) =>\n\t\t\thubPortalRef.dismiss(reason)\n\t\t);\n\t}\n\n\thasOpenPortals(): boolean {\n\t\treturn this._portalRefs.length > 0;\n\t}\n\n\tprivate _createWindowComponent(\n\t\t[headerNodes, bodyNodes, footerNodes]: Node[][],\n\t\toptions: HubPortalOptions\n\t): ComponentRef<HubPortalWindow> {\n\t\tconst singleContent =\n\t\t\t!options.headerSelector && !options.footerSelector;\n\t\tlet windowCmptRef = createComponent(HubPortalWindow, {\n\t\t\tenvironmentInjector: this._applicationRef.injector,\n\t\t\telementInjector: this._injector,\n\t\t\tprojectableNodes: singleContent\n\t\t\t\t? [bodyNodes]\n\t\t\t\t: [[], headerNodes, bodyNodes, footerNodes]\n\t\t});\n\n\t\tObject.assign(windowCmptRef.instance, { singleContent });\n\n\t\treturn windowCmptRef;\n\t}\n\n\tprivate _attachWindowComponent(\n\t\tcontainerEl: Element,\n\t\twindowCmptRef: ComponentRef<HubPortalWindow>\n\t): ComponentRef<HubPortalWindow> {\n\t\tthis._applicationRef.attachView(windowCmptRef.hostView);\n\t\tcontainerEl.appendChild(windowCmptRef.location.nativeElement);\n\t\treturn windowCmptRef;\n\t}\n\n\tprivate _getContentRef(\n\t\tcontentInjector: Injector,\n\t\tenvironmentInjector: EnvironmentInjector,\n\t\tcontent: Type<any> | TemplateRef<any> | string,\n\t\tactivePortal: HubActivePortal,\n\t\toptions: HubPortalOptions\n\t): ContentRef {\n\t\tif (!content) {\n\t\t\treturn new ContentRef([]);\n\t\t} else if (content instanceof TemplateRef) {\n\t\t\treturn this._createFromTemplateRef(content, activePortal, options);\n\t\t} else if (isString(content)) {\n\t\t\treturn this._createFromString(content);\n\t\t} else {\n\t\t\treturn this._createFromComponent(\n\t\t\t\tcontentInjector,\n\t\t\t\tenvironmentInjector,\n\t\t\t\tcontent,\n\t\t\t\tactivePortal,\n\t\t\t\toptions\n\t\t\t);\n\t\t}\n\t}\n\n\tprivate _createFromTemplateRef(\n\t\ttemplateRef: TemplateRef<any>,\n\t\tactivePortal: HubActivePortal,\n\t\toptions: HubPortalOptions\n\t): ContentRef {\n\t\tconst context = {\n\t\t\t$implicit: activePortal,\n\t\t\tclose(result) {\n\t\t\t\tactivePortal.close(result);\n\t\t\t},\n\t\t\tdismiss(reason) {\n\t\t\t\tactivePortal.dismiss(reason);\n\t\t\t}\n\t\t};\n\t\tconst viewRef = templateRef.createEmbeddedView(context);\n\t\tthis._applicationRef.attachView(viewRef);\n\n\t\tconst containerNode = document.createElement('ng-container');\n\t\tcontainerNode.append(...viewRef.rootNodes);\n\n\t\tthis._addDismissEventListener(containerNode, context as any, options);\n\t\tthis._addCloseEventListener(containerNode, context as any, options);\n\n\t\treturn new ContentRef(\n\t\t\t[\n\t\t\t\toptions.headerSelector\n\t\t\t\t\t? extractAndRemoveNodesBySelector(\n\t\t\t\t\t\t\tcontainerNode,\n\t\t\t\t\t\t\toptions.headerSelector\n\t\t\t\t\t  )\n\t\t\t\t\t: [],\n\t\t\t\tcontainerNode.childNodes as any,\n\t\t\t\toptions.footerSelector\n\t\t\t\t\t? extractAndRemoveNodesBySelector(\n\t\t\t\t\t\t\tcontainerNode,\n\t\t\t\t\t\t\toptions.footerSelector\n\t\t\t\t\t  )\n\t\t\t\t\t: []\n\t\t\t],\n\t\t\tviewRef\n\t\t);\n\t}\n\n\tprivate _createFromString(content: string): ContentRef {\n\t\tconst component = this._document.createTextNode(`${content}`);\n\t\treturn new ContentRef([[component]]);\n\t}\n\n\tprivate _createFromComponent(\n\t\tcontentInjector: Injector,\n\t\tenvironmentInjector: EnvironmentInjector,\n\t\tcomponentType: Type<any>,\n\t\tcontext: HubActivePortal,\n\t\toptions: HubPortalOptions\n\t): ContentRef {\n\t\tconst elementInjector = Injector.create({\n\t\t\tproviders: [{ provide: HubActivePortal, useValue: context }],\n\t\t\tparent: contentInjector\n\t\t});\n\t\tconst componentRef = createComponent(componentType, {\n\t\t\tenvironmentInjector,\n\t\t\telementInjector\n\t\t});\n\n\t\tconst componentNativeEl: HTMLElement =\n\t\t\tcomponentRef.location.nativeElement;\n\t\tif (options.scrollable) {\n\t\t\tcomponentNativeEl.classList.add('component-host-scrollable');\n\t\t}\n\t\tthis._applicationRef.attachView(componentRef.hostView);\n\n\t\tthis._addDismissEventListener(componentNativeEl, context, options);\n\t\tthis._addCloseEventListener(componentNativeEl, context as any, options);\n\n\t\t// FIXME: we should here get rid of the component nativeElement\n\t\t// and use `[Array.from(componentNativeEl.childNodes)]` instead and remove the above CSS class.\n\t\treturn new ContentRef(\n\t\t\t[\n\t\t\t\toptions.headerSelector\n\t\t\t\t\t? extractAndRemoveNodesBySelector(\n\t\t\t\t\t\t\tcomponentNativeEl,\n\t\t\t\t\t\t\toptions.headerSelector\n\t\t\t\t\t  )\n\t\t\t\t\t: [],\n\t\t\t\tcomponentNativeEl.childNodes as any,\n\t\t\t\toptions.footerSelector\n\t\t\t\t\t? extractAndRemoveNodesBySelector(\n\t\t\t\t\t\t\tcomponentNativeEl,\n\t\t\t\t\t\t\toptions.footerSelector\n\t\t\t\t\t  )\n\t\t\t\t\t: []\n\t\t\t],\n\t\t\tcomponentRef.hostView,\n\t\t\tcomponentRef\n\t\t);\n\t}\n\n\tprivate _setAriaHidden(element: Element) {\n\t\tconst parent = element.parentElement;\n\t\tif (parent && element !== this._document.body) {\n\t\t\tArray.from(parent.children).forEach((sibling) => {\n\t\t\t\tif (sibling !== element && sibling.nodeName !== 'SCRIPT') {\n\t\t\t\t\tthis._ariaHiddenValues.set(\n\t\t\t\t\t\tsibling,\n\t\t\t\t\t\tsibling.getAttribute('aria-hidden')\n\t\t\t\t\t);\n\t\t\t\t\tsibling.setAttribute('aria-hidden', 'true');\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis._setAriaHidden(parent);\n\t\t}\n\t}\n\n\tprivate _revertAriaHidden() {\n\t\tthis._ariaHiddenValues.forEach((value, element) => {\n\t\t\tif (value) {\n\t\t\t\telement.setAttribute('aria-hidden', value);\n\t\t\t} else {\n\t\t\t\telement.removeAttribute('aria-hidden');\n\t\t\t}\n\t\t});\n\t\tthis._ariaHiddenValues.clear();\n\t}\n\n\tprivate _registerPortalRef(hubPortalRef: HubPortalRef) {\n\t\tconst unregisterPortalRef = () => {\n\t\t\tconst index = this._portalRefs.indexOf(hubPortalRef);\n\t\t\tif (index > -1) {\n\t\t\t\tthis._portalRefs.splice(index, 1);\n\t\t\t\tthis._activeInstances.emit(this._portalRefs);\n\t\t\t}\n\t\t};\n\t\tthis._portalRefs.push(hubPortalRef);\n\t\tthis._activeInstances.emit(this._portalRefs);\n\t\thubPortalRef.result.then(unregisterPortalRef, unregisterPortalRef);\n\t}\n\n\tprivate _registerWindowCmpt(hubWindowCmpt: ComponentRef<HubPortalWindow>) {\n\t\tthis._windowCmpts.push(hubWindowCmpt);\n\t\tthis._activeWindowCmptHasChanged.next();\n\n\t\thubWindowCmpt.onDestroy(() => {\n\t\t\tconst index = this._windowCmpts.indexOf(hubWindowCmpt);\n\t\t\tif (index > -1) {\n\t\t\t\tthis._windowCmpts.splice(index, 1);\n\t\t\t\tthis._activeWindowCmptHasChanged.next();\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Attaches click event listeners to elements within a container based on a specified dismiss selector to dismiss a portal.\n\t *\n\t * @param {HTMLElement} container - The `container` parameter is an HTMLElement that represents the DOM element which contains the\n\t * portal content.\n\t * @param {HubActivePortal} context - The `context` parameter in the `_addDismissEventListener` function refers to the active portal\n\t * instance that is being displayed. It is used to call the `dismiss` method on the portal instance when a dismissible element is\n\t * clicked.\n\t * @param {HubPortalOptions} options - The `options` parameter is an object that contains configuration options for the portal. It\n\t * may include properties such as `dismissSelector`, which is used to specify a CSS selector for elements that, when clicked, will\n\t * dismiss the portal by calling the `dismiss` method on the `context` object.\n\t */\n\tprivate _addDismissEventListener(\n\t\tcontainer: HTMLElement,\n\t\tcontext: HubActivePortal,\n\t\toptions: HubPortalOptions\n\t) {\n\t\tif (options.dismissSelector) {\n\t\t\tconst dismissaable: NodeListOf<Element> =\n\t\t\t\tcontainer.querySelectorAll(options.dismissSelector);\n\t\t\tfor (const item of Array.from(dismissaable)) {\n\t\t\t\titem.addEventListener('click', () => context.dismiss());\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Attaches click event listeners to elements matching a specified selector to close a portal window.\n\t *\n\t * @param {HTMLElement} container - The `container` parameter is an HTMLElement that represents the DOM element which contains the\n\t * portal content.\n\t * @param {HubActivePortal} context - The `context` parameter in the `_addCloseEventListener` function is of type `HubActivePortal`.\n\t * It is used to reference the active portal instance within the function and call the `close()` method on it when a close event is\n\t * triggered.\n\t * @param {HubPortalOptions} options - The `options` parameter is an object that contains configuration options for the portal. It\n\t * may include properties such as `closeSelector`, which is used to specify the selector for elements that can trigger the portal\n\t * to close when clicked.\n\t */\n\tprivate _addCloseEventListener(\n\t\tcontainer: HTMLElement,\n\t\tcontext: HubActivePortal,\n\t\toptions: HubPortalOptions\n\t) {\n\t\tif (options.closeSelector) {\n\t\t\tconst dismissaable: NodeListOf<Element> =\n\t\t\t\tcontainer.querySelectorAll(options.closeSelector);\n\t\t\tfor (const item of Array.from(dismissaable)) {\n\t\t\t\titem.addEventListener('click', () => context.close());\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Extracts child nodes matching a selector from a container element, removes those nodes from the DOM, and returns them as an array.\n *\n * @param {HTMLElement} container - The `container` parameter in the `extractAndRemoveNodesBySelector` function is an HTMLElement\n * that represents the parent element within which we want to search for nodes matching a specific selector and remove them.\n * @param {string} selector - The `selector` parameter in the `extractAndRemoveNodesBySelector` function is a string that\n * represents a CSS selector. This selector is used to query and select specific elements within the `container` HTMLElement.\n *\n * @returns An array of nodes that were extracted from the container element based on the provided selector, and then removes those\n * nodes from the DOM.\n */\nfunction extractAndRemoveNodesBySelector(\n\tcontainer: HTMLElement,\n\tselector: string\n): Array<Node> {\n\tlet containerNodes = container.querySelectorAll(selector);\n\n\tconst nodes = Array.from(containerNodes).reduce((acc, c) => {\n\t\treturn [...acc, ...Array.from(c.childNodes)];\n\t}, [] as Array<Node>);\n\n\t// Selecciona los nodos dentro del contenedor que coincidan con el selector\n\tconst nodesToRemove = container.querySelectorAll<HTMLElement>(selector);\n\n\t// Convertir NodeList a array y eliminar cada nodo del DOM\n\tArray.from(nodesToRemove).forEach((node) => node.remove());\n\treturn nodes;\n}\n","import { inject, Injectable, Injector } from '@angular/core';\n\nimport { HubPortalConfig, HubPortalOptions } from './portal-config';\nimport { HubPortalRef } from './portal-ref';\nimport { HubPortalStack } from './portal-stack';\n\n/**\n * A service for opening portal windows.\n *\n * Creating a portal is straightforward: create a component or a template and pass it as an argument to\n * the `.open()` method.\n */\n@Injectable({ providedIn: 'root' })\nexport class HubPortal {\n\tprivate _injector = inject(Injector);\n\tprivate _portalStack = inject(HubPortalStack);\n\tprivate _config = inject(HubPortalConfig);\n\n\t/**\n\t * Opens a new portal window with the specified content and supplied options.\n\t *\n\t * Content can be provided as a `TemplateRef` or a component type. If you pass a component type as content,\n\t * then instances of those components can be injected with an instance of the `HubActivePortal` class. You can then\n\t * use `HubActivePortal` methods to close / dismiss portals from \"inside\" of your component.\n\t *\n\t * Also see the [`HubPortalOptions`](#/components/portal/api#HubPortalOptions) for the list of supported options.\n\t */\n\topen(content: any, options: HubPortalOptions = {}): HubPortalRef {\n\t\tconst combinedOptions = {\n\t\t\t...this._config,\n\t\t\tanimation: this._config.animation,\n\t\t\t...options\n\t\t};\n\t\treturn this._portalStack.open(this._injector, content, combinedOptions);\n\t}\n\n\t/**\n\t * The function `toggle` opens a portal with specified content and options while dismissing any existing portals.\n\t *\n\t * @param {any} content - The `content` parameter in the `toggle` function is the content that you want to display within the\n\t * portal. This can be any type of content such as a component, template, or any other HTML element that you want to show in the\n\t * portal.\n\t * @param {HubPortalOptions} options - The `options` parameter in the `toggle` function is an object that allows you to customize\n\t * the behavior of the portal.\n\t *\n\t * @returns The `toggle` function is returning a `HubPortalRef` object.\n\t */\n\ttoggle(content: any, options: HubPortalOptions = {}): HubPortalRef {\n\t\tconst combinedOptions = {\n\t\t\t...this._config,\n\t\t\tanimation: this._config.animation,\n\t\t\t...options\n\t\t};\n\t\t// this.dismissAll();\n\t\t// return this._portalStack.open(this._injector, content, combinedOptions);\n\t\treturn this._portalStack.toggle(\n\t\t\tthis._injector,\n\t\t\tcontent,\n\t\t\tcombinedOptions\n\t\t);\n\t}\n\n\t/**\n\t * Returns an observable that holds the active portal instances.\n\t */\n\tget activeInstances() {\n\t\treturn this._portalStack.activeInstances;\n\t}\n\n\t/**\n\t * Dismisses all currently displayed portal windows with the supplied reason.\n\t *\n\t * @since 3.1.0\n\t */\n\tdismissAll(reason?: any) {\n\t\tthis._portalStack.dismissAll(reason);\n\t}\n\n\t/**\n\t * Indicates if there are currently any open portal windows in the application.\n\t *\n\t * @since 3.3.0\n\t */\n\thasOpenPortals(): boolean {\n\t\treturn this._portalStack.hasOpenPortals();\n\t}\n}\n","export enum PortalDismissReasons {\n\tBACKDROP_CLICK,\n\tESC\n}\n","import { NgModule } from '@angular/core';\nimport { HubPortal } from './portal';\n\nexport { HubPortal } from './portal';\nexport {\n\tHubPortalConfig,\n\tHubPortalOptions,\n\tHubPortalUpdatableOptions\n} from './portal-config';\nexport { HubPortalRef, HubActivePortal } from './portal-ref';\nexport { HubPortalStack } from './portal-stack';\nexport { PortalDismissReasons } from './portal-dismiss-reasons';\n\n@NgModule({ providers: [HubPortal] })\nexport class HubPortalModule {}\n","/*\n * Public API Surface of modal\n */\nexport * from './lib/portal.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAgIA;;;;;;;AAOG;MAEU,eAAe,CAAA;AAD5B,IAAA,WAAA,GAAA;QAUC,IAAQ,CAAA,QAAA,GAAG,IAAI,CAAC;QAOhB,IAAe,CAAA,eAAA,GAAW,yBAAyB,CAAC;QACpD,IAAa,CAAA,aAAA,GAAW,uBAAuB,CAAC;AAQhD,KAAA;AANA,IAAA,IAAI,SAAS,GAAA;AACZ,QAAA,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