This repository has been archived by the owner on Dec 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
default-src_app_custom-elements_code_code_component_ts-src_app_custom-elements_code_code_module_ts.81844719a12f2618.js.map
1 lines (1 loc) · 298 KB
/
default-src_app_custom-elements_code_code_component_ts-src_app_custom-elements_code_code_module_ts.81844719a12f2618.js.map
1
{"version":3,"mappings":"uSAkEA,QAEIA,OAAOC,GASH,YAAKC,cAAgBD,EACdA,EAAKD,OAAOG,MAGvBC,SACI,IAAIH,EAAOE,KAAKD,cACJ,MAARD,IACAE,KAAKD,cAAgB,KACrBD,EAAKG,UAOTC,iBACA,OAA6B,MAAtBF,KAAKD,cAMhBI,gBAAgBL,GACZE,KAAKD,cAAgBD,GAM7B,gBAA8BM,EAC1BC,YAAYC,EAAWC,EAAkBC,EAAUC,GAC/CC,QACAV,KAAKM,UAAYA,EACjBN,KAAKO,iBAAmBA,EACxBP,KAAKQ,SAAWA,EAChBR,KAAKS,yBAA2BA,GAMxC,gBAA6BL,EACzBC,YAAYM,EAAUJ,EAAkBK,GACpCF,QACAV,KAAKa,YAAcF,EACnBX,KAAKO,iBAAmBA,EACxBP,KAAKY,QAAUA,EAEfE,aACA,OAAOd,KAAKa,YAAYE,WAO5BlB,OAAOC,EAAMc,EAAUZ,KAAKY,SACxB,YAAKA,QAAUA,EACRF,MAAMb,OAAOC,GAExBG,SACI,YAAKW,aAAUI,EACRN,MAAMT,UAQrB,gBAAwBG,EACpBC,YAAYY,GACRP,QACAV,KAAKiB,QAAUA,aAAmBC,MAAaD,EAAQE,cAAgBF,GAO/E,QACIZ,cAEIL,KAAKoB,aAAc,EAEnBpB,KAAKqB,gBAAkB,KAG3BC,cACI,QAAStB,KAAKuB,gBAGlB1B,OAAO2B,GAYH,OAAIA,aAAkBC,GAClBzB,KAAKuB,gBAAkBC,EAChBxB,KAAK0B,sBAAsBF,IAE7BA,aAAkBG,GACvB3B,KAAKuB,gBAAkBC,EAChBxB,KAAK4B,qBAAqB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MAA,wCACFA,iCARKA,yCACMA,yEAUFrW,GAAb,gFCjCO,IAAMyX,EAAb,MAAM,sDAAOmB,6DAFA,CAAEW,KAAenQ,SAJnB,CAAEiN,KAAc2B,SAMdY,GAAb,6GCCO,IAAMY,EAAb,MAAM,QAIJnyB,YAAoB0Y,iBAClB/Y,KAAKyyB,kBAAiBzB,KAAKhxB,KAAK0yB,qBAAqBviB,QAAKoiB,QAGpDG,oBACN,MAAM3Z,EAAOlR,OAAe4qB,eAC5B,OAAO1Z,EAAM4Z,QAAQC,QAAQ7Z,GAG3B8Z,2DACGC,KACC,IAAOjrB,OAAe4qB,eACtBM,IACE,MAAMC,EAAM,uCAAuCD,EAAIvK,UACvD,YAAK6I,OAAO9N,MAAM,IAAI4O,MAAMa,IAErB,KAAQ,MAAM,IAAIb,MAAMa,MAezC9B,WAAWnY,EAAmBga,EAAmBC,GAC/C,OAAOhzB,KAAKyyB,eAAetiB,MACzB,OAAI8iB,IACF,IACE,OAAO,QACHA,EAAIla,EAAMga,EAAUC,GAAW,0DAC5BE,GACP,MAAMC,EAAM,sCAAsCpa,EAAK8W,WAAWa,OAAO,EAAG,WAC5E,cAAQnN,MAAM4P,EAAKD,GACb,IAAIf,MAAMgB,SAGpB1C,sDA/CO2C,GAAaxB,uCAAbwB,EAAanoB,QAAbmoB,EAAa,YAAbA,GAAb","names":["attach","host","_attachedHost","this","detach","isAttached","setAttachedHost","Portal","constructor","component","viewContainerRef","injector","componentFactoryResolver","super","template","context","templateRef","origin","elementRef","undefined","element","ElementRef","nativeElement","_isDisposed","attachDomPortal","hasAttached","_attachedPortal","portal","ComponentPortal","attachComponentPortal","TemplatePortal","attachTemplatePortal","DomPortal","_invokeDisposeFn","dispose","setDisposeFn","fn","_disposeFn","BasePortalOutlet","outletElement","_componentFactoryResolver","_appRef","_defaultInjector","_document","anchorNode","createComment","parentNode","insertBefore","appendChild","replaceChild","componentFactory","resolveComponentFactory","componentRef","createComponent","length","destroy","create","attachView","hostView","detachView","_getComponentRootNode","viewContainer","viewRef","createEmbeddedView","rootNodes","forEach","rootNode","detectChanges","index","indexOf","remove","removeChild","CdkPortal","ɵfac","t","ɵngcc0","ɵdir","type","selectors","exportAs","features","CdkPortalOutlet","_viewContainerRef","_isInitialized","attached","EventEmitter","_getRootNode","attachedRef","_attachedRef","ngOnInit","ngOnDestroy","ref","emit","clear","nodeType","ELEMENT_NODE","DOCUMENT","inputs","outputs","PortalModule","ɵmod","ɵinj","scrollBehaviorSupported","supportsScrollBehavior","_viewportRuler","document","_previousHTMLStyles","top","left","_isEnabled","enable","_canBeEnabled","root","documentElement","_previousScrollPosition","getViewportScrollPosition","style","coerceCssPixelValue","classList","add","disable","html","htmlStyle","bodyStyle","body","previousHtmlScrollBehavior","scrollBehavior","previousBodyScrollBehavior","window","scroll","contains","viewport","getViewportSize","scrollHeight","height","scrollWidth","width","_scrollDispatcher","_ngZone","_config","_scrollSubscription","_detach","_overlayRef","run","overlayRef","stream","scrolled","threshold","_initialScrollPosition","subscribe","scrollPosition","Math","abs","updatePosition","unsubscribe","scrollContainers","some","containerBounds","bottom","right","scrollContainerRect","scrollThrottle","autoClose","overlayRect","overlayElement","getBoundingClientRect","isElementScrolledOutsideView","ScrollStrategyOptions","noop","NoopScrollStrategy","close","config","CloseScrollStrategy","block","BlockScrollStrategy","reposition","RepositionScrollStrategy","ɵngcc1","ɵprov","i0","factory","i1","i1$1","token","providedIn","scrollStrategy","panelClass","hasBackdrop","backdropClass","disposeOnNavigation","configKeys","Object","keys","key","connectionPair","scrollableViewProperties","BaseOverlayDispatcher","_attachedOverlays","push","splice","OverlayKeyboardDispatcher","_keydownListener","event","overlays","i","_keydownEvents","observers","next","_isAttached","addEventListener","removeEventListener","OverlayOutsideClickDispatcher","_platform","_cursorStyleIsSet","_clickListener","target","_getEventTarget","slice","_outsidePointerEvents","IOS","_cursorOriginalValue","cursor","ɵngcc2","i2","OverlayContainer","container","_containerElement","getContainerElement","_createContainer","containerClass","isBrowser","_isTestEnvironment","oppositePlatformContainers","querySelectorAll","createElement","setAttribute","_portalOutlet","_host","_pane","_keyboardDispatcher","_location","_outsideClickDispatcher","_backdropElement","_backdropClick","Subject","_attachments","_detachments","_locationChanges","Subscription","_backdropClickHandler","_scrollStrategy","_positionStrategy","positionStrategy","backdropElement","hostElement","attachResult","parentElement","_previousHostParent","_updateStackingOrder","_updateElementSize","_updateElementDirection","onStable","pipe","take","_togglePointerEvents","_attachBackdrop","_toggleClasses","detachBackdrop","detachmentResult","_detachContentWhenStable","_disposeScrollStrategy","_disposeBackdrop","complete","backdropClick","attachments","detachments","keydownEvents","outsidePointerEvents","getConfig","apply","updatePositionStrategy","strategy","updateSize","sizeConfig","assign","setDirection","dir","direction","addPanelClass","classes","removePanelClass","getDirection","value","updateScrollStrategy","minWidth","minHeight","maxWidth","maxHeight","enablePointer","pointerEvents","showingClass","requestAnimationFrame","runOutsideAngular","nextSibling","backdropToDetach","timeoutId","finishDetach","clearTimeout","setTimeout","cssClasses","isAdd","coerceArray","filter","c","subscription","takeUntil","merge","children","backdrop","boundingBoxClass","cssUnitPattern","connectedTo","_overlayContainer","_lastBoundingBoxSize","_isPushed","_canPush","_growAfterOpen","_hasFlexibleDimensions","_positionLocked","_viewportMargin","_scrollables","_preferredPositions","_positionChanges","_resizeSubscription","_offsetX","_offsetY","_appliedPanelClasses","positionChanges","setOrigin","positions","_validatePositions","_boundingBox","_isInitialRender","_lastPosition","change","reapplyLastPosition","_clearPanelClasses","_resetOverlayElementStyles","_resetBoundingBoxStyles","_viewportRect","_getNarrowedViewportRect","_originRect","_getOriginRect","_overlayRect","originRect","viewportRect","flexibleFits","fallback","pos","originPoint","_getOriginPoint","overlayPoint","_getOverlayPoint","overlayFit","_getOverlayFit","isCompletelyWithinViewport","_applyPosition","_canFitWithFlexibleDimensions","position","boundingBoxRect","_calculateBoundingBoxRect","visibleArea","bestFit","bestScore","fit","score","weight","_previousPushAmount","extendStyles","alignItems","justifyContent","lastPosition","withScrollableContainers","scrollables","withPositions","withViewportMargin","margin","withFlexibleDimensions","flexibleDimensions","withGrowAfterOpen","growAfterOpen","withPush","canPush","withLockedPosition","isLocked","_origin","withDefaultOffsetX","offset","withDefaultOffsetY","withTransformOriginOn","selector","_transformOriginSelector","x","y","originX","startX","_isRtl","endX","originY","overlayStartX","overlayStartY","overlayX","overlayY","point","rawOverlayRect","overlay","getRoundedBoundingClientRect","offsetX","_getOffset","offsetY","topOverflow","bottomOverflow","visibleWidth","_subtractOverflows","visibleHeight","fitsInViewportVertically","fitsInViewportHorizontally","availableHeight","availableWidth","getPixelValue","horizontalFit","_pushOverlayOnScreen","start","overflowRight","max","overflowBottom","overflowTop","overflowLeft","pushX","pushY","s","_setTransformOrigin","_setOverlayElementStyles","_setBoundingBoxStyles","_addPanelClasses","_getScrollVisibility","changeEvent","ConnectedOverlayPositionChange","elements","xOrigin","yOrigin","transformOrigin","isRtl","smallestDistanceToViewportEdge","min","previousHeight","previousWidth","styles","_hasExactPosition","e","transform","hasExactPosition","hasFlexibleDimensions","_getExactOverlayY","_getExactOverlayX","transformString","trim","virtualKeyboardOffset","clientHeight","horizontalStyleProperty","clientWidth","originBounds","overlayBounds","scrollContainerBounds","map","scrollable","getElementRef","isOriginClipped","isElementClippedByScrolling","isOriginOutsideView","isOverlayClipped","isOverlayOutsideView","overflows","reduce","currentValue","currentOverflow","axis","cssClass","Element","destination","source","hasOwnProperty","input","units","split","parseFloat","clientRect","floor","wrapperClass","_cssPosition","_topOffset","_bottomOffset","_leftOffset","_rightOffset","_alignItems","_justifyContent","_width","_height","centerHorizontally","centerVertically","parentStyles","shouldBeFlushHorizontally","shouldBeFlushVertically","marginLeft","marginTop","marginBottom","marginRight","_","parent","OverlayPositionBuilder","global","GlobalPositionStrategy","flexibleConnectedTo","FlexibleConnectedPositionStrategy","nextUniqueId","Overlay","scrollStrategies","_positionBuilder","_injector","_directionality","_createHostElement","pane","_createPaneElement","portalOutlet","_createPortalOutlet","overlayConfig","OverlayConfig","OverlayRef","id","get","ApplicationRef","DomPortalOutlet","ɵngcc3","ɵngcc4","CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER","provide","InjectionToken","deps","useFactory","OverlayModule","providers","imports","BidiModule","ScrollingModule","mediaQueriesForWebkitCompatibility","Set","mediaQueryStyleNode","MediaMatcher","_matchMedia","matchMedia","bind","noopMatchMedia","query","WEBKIT","BLINK","has","head","sheet","insertRule","console","error","createEmptyStyleRule","matches","media","addListener","removeListener","BreakpointObserver","_mediaMatcher","_zone","_queries","Map","_destroySubject","isMatched","queries","mediaQuery","_registerQuery","mql","observe","observables","splitQueries","observable","stateObservable","combineLatest","concat","skip","debounceTime","breakpointStates","response","breakpoints","output","Observable","observer","handler","startWith","set","a1","a2","rf","ctx","_r2","action","ctx_r0","data","MAT_SNACK_BAR_DATA","politeness","announcementMessage","duration","horizontalPosition","verticalPosition","MAX_TIMEOUT","pow","containerInstance","_afterDismissed","_afterOpened","_onAction","_dismissedByAction","onAction","dismiss","_onExit","_finishDismiss","closed","exit","_durationTimeoutId","dismissWithAction","closeWithAction","_dismissAfter","_open","dismissedByAction","afterDismissed","afterOpened","_onEnter","SimpleSnackBar","snackBarRef","hasAction","MatSnackBarRef","ɵcmp","hostAttrs","decls","vars","consts","SimpleSnackBar_div_2_Template","message","directives","encapsulation","changeDetection","matSnackBarAnimations","snackBarState","trigger","state","opacity","transition","animate","MatSnackBarContainer","_elementRef","_changeDetectorRef","snackBarConfig","_announceDelay","_destroyed","_onAnnounce","_animationState","_assertNotAttached","_applySnackBarClasses","_live","l","FIREFOX","_role","onAnimationEnd","fromState","toState","_completeExit","onEnter","enter","_screenReaderAnnounce","_announceTimeoutId","onMicrotaskEmpty","panelClasses","Array","isArray","inertElement","querySelector","liveElement","focusedElement","activeElement","HTMLElement","removeAttribute","focus","MatSnackBarConfig","viewQuery","_t","first","hostVars","hostBindings","$event","MatSnackBarContainer_ng_template_1_Template","animation","MatSnackBarModule","CommonModule","MatButtonModule","MatCommonModule","MAT_SNACK_BAR_DEFAULT_OPTIONS","MatSnackBar","_overlay","_breakpointObserver","_parentSnackBar","_defaultConfig","_snackBarRefAtThisLevel","simpleSnackBarComponent","snackBarContainerComponent","handsetCssClass","_openedSnackBarRef","openFromComponent","_attach","openFromTemplate","open","_attachSnackBarContainer","Injector","useValue","containerPortal","containerRef","instance","content","userConfig","_createOverlay","TemplateRef","$implicit","_createInjector","contentRef","toggle","announce","_animateSnackBar","isLeft","isRight","ɵngcc5","ɵngcc6","ɵngcc7","i3","text","textarea","_textarea","copy","successful","currentFocus","select","setSelectionRange","execCommand","_a","Clipboard","pendingCopy","beginCopy","PendingCopy","h","doCopy","Q","d","a","f","code","_code","toString","formatDisplayedCode","showMissingCodeMessage","header","_header","ariaLabel","ngOnChanges","getLinenums","v","Number","MAX_VALUE","search","b","substr","join","W","setCodeHtml","codeText","getCodeText","o","pretty","formatCode","language","g","logger","warn","codeFormatted","path","region","className","textContent","m","codeContainer","innerHTML","R","clipboard","log","snackbar","Error","linenums","parseInt","isNaN","S","k","prettyPrintOne","getPrettyPrintOne","Promise","resolve","p","then","B","F","U","G","Y","O"],"sources":["./node_modules/@angular/cdk/__ivy_ngcc__/fesm2015/portal.js","./node_modules/@angular/cdk/__ivy_ngcc__/fesm2015/overlay.js","./node_modules/@angular/cdk/__ivy_ngcc__/fesm2015/layout.js","./node_modules/@angular/material/__ivy_ngcc__/fesm2015/snack-bar.js","./node_modules/@angular/cdk/__ivy_ngcc__/fesm2015/clipboard.js","./src/app/custom-elements/code/code.component.ts","./src/app/custom-elements/code/code.module.ts","./src/app/custom-elements/code/pretty-printer.service.ts"],"sourcesContent":["import { ElementRef, Directive, TemplateRef, ViewContainerRef, EventEmitter, ComponentFactoryResolver, Inject, Output, NgModule } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Throws an exception when attempting to attach a null portal to a host.\n * @docs-private\n */\nimport * as ɵngcc0 from '@angular/core';\nfunction throwNullPortalError() {\n throw Error('Must provide a portal to attach');\n}\n/**\n * Throws an exception when attempting to attach a portal to a host that is already attached.\n * @docs-private\n */\nfunction throwPortalAlreadyAttachedError() {\n throw Error('Host already has a portal attached');\n}\n/**\n * Throws an exception when attempting to attach a portal to an already-disposed host.\n * @docs-private\n */\nfunction throwPortalOutletAlreadyDisposedError() {\n throw Error('This PortalOutlet has already been disposed');\n}\n/**\n * Throws an exception when attempting to attach an unknown portal type.\n * @docs-private\n */\nfunction throwUnknownPortalTypeError() {\n throw Error('Attempting to attach an unknown Portal type. BasePortalOutlet accepts either ' +\n 'a ComponentPortal or a TemplatePortal.');\n}\n/**\n * Throws an exception when attempting to attach a portal to a null host.\n * @docs-private\n */\nfunction throwNullPortalOutletError() {\n throw Error('Attempting to attach a portal to a null PortalOutlet');\n}\n/**\n * Throws an exception when attempting to detach a portal that is not attached.\n * @docs-private\n */\nfunction throwNoPortalAttachedError() {\n throw Error('Attempting to detach a portal that is not attached to a host');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A `Portal` is something that you want to render somewhere else.\n * It can be attach to / detached from a `PortalOutlet`.\n */\nclass Portal {\n /** Attach this portal to a host. */\n attach(host) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (host == null) {\n throwNullPortalOutletError();\n }\n if (host.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n }\n this._attachedHost = host;\n return host.attach(this);\n }\n /** Detach this portal from its host */\n detach() {\n let host = this._attachedHost;\n if (host != null) {\n this._attachedHost = null;\n host.detach();\n }\n else if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throwNoPortalAttachedError();\n }\n }\n /** Whether this portal is attached to a host. */\n get isAttached() {\n return this._attachedHost != null;\n }\n /**\n * Sets the PortalOutlet reference without performing `attach()`. This is used directly by\n * the PortalOutlet when it is performing an `attach()` or `detach()`.\n */\n setAttachedHost(host) {\n this._attachedHost = host;\n }\n}\n/**\n * A `ComponentPortal` is a portal that instantiates some Component upon attachment.\n */\nclass ComponentPortal extends Portal {\n constructor(component, viewContainerRef, injector, componentFactoryResolver) {\n super();\n this.component = component;\n this.viewContainerRef = viewContainerRef;\n this.injector = injector;\n this.componentFactoryResolver = componentFactoryResolver;\n }\n}\n/**\n * A `TemplatePortal` is a portal that represents some embedded template (TemplateRef).\n */\nclass TemplatePortal extends Portal {\n constructor(template, viewContainerRef, context) {\n super();\n this.templateRef = template;\n this.viewContainerRef = viewContainerRef;\n this.context = context;\n }\n get origin() {\n return this.templateRef.elementRef;\n }\n /**\n * Attach the portal to the provided `PortalOutlet`.\n * When a context is provided it will override the `context` property of the `TemplatePortal`\n * instance.\n */\n attach(host, context = this.context) {\n this.context = context;\n return super.attach(host);\n }\n detach() {\n this.context = undefined;\n return super.detach();\n }\n}\n/**\n * A `DomPortal` is a portal whose DOM element will be taken from its current position\n * in the DOM and moved into a portal outlet, when it is attached. On detach, the content\n * will be restored to its original position.\n */\nclass DomPortal extends Portal {\n constructor(element) {\n super();\n this.element = element instanceof ElementRef ? element.nativeElement : element;\n }\n}\n/**\n * Partial implementation of PortalOutlet that handles attaching\n * ComponentPortal and TemplatePortal.\n */\nclass BasePortalOutlet {\n constructor() {\n /** Whether this host has already been permanently disposed. */\n this._isDisposed = false;\n // @breaking-change 10.0.0 `attachDomPortal` to become a required abstract method.\n this.attachDomPortal = null;\n }\n /** Whether this host has an attached portal. */\n hasAttached() {\n return !!this._attachedPortal;\n }\n /** Attaches a portal. */\n attach(portal) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!portal) {\n throwNullPortalError();\n }\n if (this.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n if (this._isDisposed) {\n throwPortalOutletAlreadyDisposedError();\n }\n }\n if (portal instanceof ComponentPortal) {\n this._attachedPortal = portal;\n return this.attachComponentPortal(portal);\n }\n else if (portal instanceof TemplatePortal) {\n this._attachedPortal = portal;\n return this.attachTemplatePortal(portal);\n // @breaking-change 10.0.0 remove null check for `this.attachDomPortal`.\n }\n else if (this.attachDomPortal && portal instanceof DomPortal) {\n this._attachedPortal = portal;\n return this.attachDomPortal(portal);\n }\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throwUnknownPortalTypeError();\n }\n }\n /** Detaches a previously attached portal. */\n detach() {\n if (this._attachedPortal) {\n this._attachedPortal.setAttachedHost(null);\n this._attachedPortal = null;\n }\n this._invokeDisposeFn();\n }\n /** Permanently dispose of this portal host. */\n dispose() {\n if (this.hasAttached()) {\n this.detach();\n }\n this._invokeDisposeFn();\n this._isDisposed = true;\n }\n /** @docs-private */\n setDisposeFn(fn) {\n this._disposeFn = fn;\n }\n _invokeDisposeFn() {\n if (this._disposeFn) {\n this._disposeFn();\n this._disposeFn = null;\n }\n }\n}\n/**\n * @deprecated Use `BasePortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nclass BasePortalHost extends BasePortalOutlet {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular\n * application context.\n */\nclass DomPortalOutlet extends BasePortalOutlet {\n constructor(\n /** Element into which the content is projected. */\n outletElement, _componentFactoryResolver, _appRef, _defaultInjector, \n /**\n * @deprecated `_document` Parameter to be made required.\n * @breaking-change 10.0.0\n */\n _document) {\n super();\n this.outletElement = outletElement;\n this._componentFactoryResolver = _componentFactoryResolver;\n this._appRef = _appRef;\n this._defaultInjector = _defaultInjector;\n /**\n * Attaches a DOM portal by transferring its content into the outlet.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n this.attachDomPortal = (portal) => {\n // @breaking-change 10.0.0 Remove check and error once the\n // `_document` constructor parameter is required.\n if (!this._document && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Cannot attach DOM portal without _document constructor parameter');\n }\n const element = portal.element;\n if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('DOM portal content must be attached to a parent node.');\n }\n // Anchor used to save the element's previous position so\n // that we can restore it when the portal is detached.\n const anchorNode = this._document.createComment('dom-portal');\n element.parentNode.insertBefore(anchorNode, element);\n this.outletElement.appendChild(element);\n this._attachedPortal = portal;\n super.setDisposeFn(() => {\n // We can't use `replaceWith` here because IE doesn't support it.\n if (anchorNode.parentNode) {\n anchorNode.parentNode.replaceChild(element, anchorNode);\n }\n });\n };\n this._document = _document;\n }\n /**\n * Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.\n * @param portal Portal to be attached\n * @returns Reference to the created component.\n */\n attachComponentPortal(portal) {\n const resolver = portal.componentFactoryResolver || this._componentFactoryResolver;\n const componentFactory = resolver.resolveComponentFactory(portal.component);\n let componentRef;\n // If the portal specifies a ViewContainerRef, we will use that as the attachment point\n // for the component (in terms of Angular's component tree, not rendering).\n // When the ViewContainerRef is missing, we use the factory to create the component directly\n // and then manually attach the view to the application.\n if (portal.viewContainerRef) {\n componentRef = portal.viewContainerRef.createComponent(componentFactory, portal.viewContainerRef.length, portal.injector || portal.viewContainerRef.injector);\n this.setDisposeFn(() => componentRef.destroy());\n }\n else {\n componentRef = componentFactory.create(portal.injector || this._defaultInjector);\n this._appRef.attachView(componentRef.hostView);\n this.setDisposeFn(() => {\n this._appRef.detachView(componentRef.hostView);\n componentRef.destroy();\n });\n }\n // At this point the component has been instantiated, so we move it to the location in the DOM\n // where we want it to be rendered.\n this.outletElement.appendChild(this._getComponentRootNode(componentRef));\n this._attachedPortal = portal;\n return componentRef;\n }\n /**\n * Attaches a template portal to the DOM as an embedded view.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal(portal) {\n let viewContainer = portal.viewContainerRef;\n let viewRef = viewContainer.createEmbeddedView(portal.templateRef, portal.context);\n // The method `createEmbeddedView` will add the view as a child of the viewContainer.\n // But for the DomPortalOutlet the view can be added everywhere in the DOM\n // (e.g Overlay Container) To move the view to the specified host element. We just\n // re-append the existing root nodes.\n viewRef.rootNodes.forEach(rootNode => this.outletElement.appendChild(rootNode));\n // Note that we want to detect changes after the nodes have been moved so that\n // any directives inside the portal that are looking at the DOM inside a lifecycle\n // hook won't be invoked too early.\n viewRef.detectChanges();\n this.setDisposeFn((() => {\n let index = viewContainer.indexOf(viewRef);\n if (index !== -1) {\n viewContainer.remove(index);\n }\n }));\n this._attachedPortal = portal;\n // TODO(jelbourn): Return locals from view.\n return viewRef;\n }\n /**\n * Clears out a portal from the DOM.\n */\n dispose() {\n super.dispose();\n if (this.outletElement.parentNode != null) {\n this.outletElement.parentNode.removeChild(this.outletElement);\n }\n }\n /** Gets the root HTMLElement for an instantiated component. */\n _getComponentRootNode(componentRef) {\n return componentRef.hostView.rootNodes[0];\n }\n}\n/**\n * @deprecated Use `DomPortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nclass DomPortalHost extends DomPortalOutlet {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal,\n * the directive instance itself can be attached to a host, enabling declarative use of portals.\n */\nclass CdkPortal extends TemplatePortal {\n constructor(templateRef, viewContainerRef) {\n super(templateRef, viewContainerRef);\n }\n}\nCdkPortal.ɵfac = function CdkPortal_Factory(t) { return new (t || CdkPortal)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef)); };\nCdkPortal.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: CdkPortal, selectors: [[\"\", \"cdkPortal\", \"\"]], exportAs: [\"cdkPortal\"], features: [ɵngcc0.ɵɵInheritDefinitionFeature] });\nCdkPortal.ctorParameters = () => [\n { type: TemplateRef },\n { type: ViewContainerRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(CdkPortal, [{\n type: Directive,\n args: [{\n selector: '[cdkPortal]',\n exportAs: 'cdkPortal'\n }]\n }], function () { return [{ type: ɵngcc0.TemplateRef }, { type: ɵngcc0.ViewContainerRef }]; }, null); })();\n/**\n * @deprecated Use `CdkPortal` instead.\n * @breaking-change 9.0.0\n */\nclass TemplatePortalDirective extends CdkPortal {\n}\nTemplatePortalDirective.ɵfac = /*@__PURE__*/ function () { let ɵTemplatePortalDirective_BaseFactory; return function TemplatePortalDirective_Factory(t) { return (ɵTemplatePortalDirective_BaseFactory || (ɵTemplatePortalDirective_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(TemplatePortalDirective)))(t || TemplatePortalDirective); }; }();\nTemplatePortalDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: TemplatePortalDirective, selectors: [[\"\", \"cdk-portal\", \"\"], [\"\", \"portal\", \"\"]], exportAs: [\"cdkPortal\"], features: [ɵngcc0.ɵɵProvidersFeature([{\n provide: CdkPortal,\n useExisting: TemplatePortalDirective\n }]), ɵngcc0.ɵɵInheritDefinitionFeature] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(TemplatePortalDirective, [{\n type: Directive,\n args: [{\n selector: '[cdk-portal], [portal]',\n exportAs: 'cdkPortal',\n providers: [{\n provide: CdkPortal,\n useExisting: TemplatePortalDirective\n }]\n }]\n }], null, null); })();\n/**\n * Directive version of a PortalOutlet. Because the directive *is* a PortalOutlet, portals can be\n * directly attached to it, enabling declarative use.\n *\n * Usage:\n * `<ng-template [cdkPortalOutlet]=\"greeting\"></ng-template>`\n */\nclass CdkPortalOutlet extends BasePortalOutlet {\n constructor(_componentFactoryResolver, _viewContainerRef, \n /**\n * @deprecated `_document` parameter to be made required.\n * @breaking-change 9.0.0\n */\n _document) {\n super();\n this._componentFactoryResolver = _componentFactoryResolver;\n this._viewContainerRef = _viewContainerRef;\n /** Whether the portal component is initialized. */\n this._isInitialized = false;\n /** Emits when a portal is attached to the outlet. */\n this.attached = new EventEmitter();\n /**\n * Attaches the given DomPortal to this PortalHost by moving all of the portal content into it.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n this.attachDomPortal = (portal) => {\n // @breaking-change 9.0.0 Remove check and error once the\n // `_document` constructor parameter is required.\n if (!this._document && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Cannot attach DOM portal without _document constructor parameter');\n }\n const element = portal.element;\n if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('DOM portal content must be attached to a parent node.');\n }\n // Anchor used to save the element's previous position so\n // that we can restore it when the portal is detached.\n const anchorNode = this._document.createComment('dom-portal');\n portal.setAttachedHost(this);\n element.parentNode.insertBefore(anchorNode, element);\n this._getRootNode().appendChild(element);\n this._attachedPortal = portal;\n super.setDisposeFn(() => {\n if (anchorNode.parentNode) {\n anchorNode.parentNode.replaceChild(element, anchorNode);\n }\n });\n };\n this._document = _document;\n }\n /** Portal associated with the Portal outlet. */\n get portal() {\n return this._attachedPortal;\n }\n set portal(portal) {\n // Ignore the cases where the `portal` is set to a falsy value before the lifecycle hooks have\n // run. This handles the cases where the user might do something like `<div cdkPortalOutlet>`\n // and attach a portal programmatically in the parent component. When Angular does the first CD\n // round, it will fire the setter with empty string, causing the user's content to be cleared.\n if (this.hasAttached() && !portal && !this._isInitialized) {\n return;\n }\n if (this.hasAttached()) {\n super.detach();\n }\n if (portal) {\n super.attach(portal);\n }\n this._attachedPortal = portal;\n }\n /** Component or view reference that is attached to the portal. */\n get attachedRef() {\n return this._attachedRef;\n }\n ngOnInit() {\n this._isInitialized = true;\n }\n ngOnDestroy() {\n super.dispose();\n this._attachedPortal = null;\n this._attachedRef = null;\n }\n /**\n * Attach the given ComponentPortal to this PortalOutlet using the ComponentFactoryResolver.\n *\n * @param portal Portal to be attached to the portal outlet.\n * @returns Reference to the created component.\n */\n attachComponentPortal(portal) {\n portal.setAttachedHost(this);\n // If the portal specifies an origin, use that as the logical location of the component\n // in the application tree. Otherwise use the location of this PortalOutlet.\n const viewContainerRef = portal.viewContainerRef != null ?\n portal.viewContainerRef :\n this._viewContainerRef;\n const resolver = portal.componentFactoryResolver || this._componentFactoryResolver;\n const componentFactory = resolver.resolveComponentFactory(portal.component);\n const ref = viewContainerRef.createComponent(componentFactory, viewContainerRef.length, portal.injector || viewContainerRef.injector);\n // If we're using a view container that's different from the injected one (e.g. when the portal\n // specifies its own) we need to move the component into the outlet, otherwise it'll be rendered\n // inside of the alternate view container.\n if (viewContainerRef !== this._viewContainerRef) {\n this._getRootNode().appendChild(ref.hostView.rootNodes[0]);\n }\n super.setDisposeFn(() => ref.destroy());\n this._attachedPortal = portal;\n this._attachedRef = ref;\n this.attached.emit(ref);\n return ref;\n }\n /**\n * Attach the given TemplatePortal to this PortalHost as an embedded View.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal(portal) {\n portal.setAttachedHost(this);\n const viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context);\n super.setDisposeFn(() => this._viewContainerRef.clear());\n this._attachedPortal = portal;\n this._attachedRef = viewRef;\n this.attached.emit(viewRef);\n return viewRef;\n }\n /** Gets the root node of the portal outlet. */\n _getRootNode() {\n const nativeElement = this._viewContainerRef.element.nativeElement;\n // The directive could be set on a template which will result in a comment\n // node being the root. Use the comment's parent node if that is the case.\n return (nativeElement.nodeType === nativeElement.ELEMENT_NODE ?\n nativeElement : nativeElement.parentNode);\n }\n}\nCdkPortalOutlet.ɵfac = function CdkPortalOutlet_Factory(t) { return new (t || CdkPortalOutlet)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ComponentFactoryResolver), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(DOCUMENT)); };\nCdkPortalOutlet.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: CdkPortalOutlet, selectors: [[\"\", \"cdkPortalOutlet\", \"\"]], inputs: { portal: [\"cdkPortalOutlet\", \"portal\"] }, outputs: { attached: \"attached\" }, exportAs: [\"cdkPortalOutlet\"], features: [ɵngcc0.ɵɵInheritDefinitionFeature] });\nCdkPortalOutlet.ctorParameters = () => [\n { type: ComponentFactoryResolver },\n { type: ViewContainerRef },\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n];\nCdkPortalOutlet.propDecorators = {\n attached: [{ type: Output }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(CdkPortalOutlet, [{\n type: Directive,\n args: [{\n selector: '[cdkPortalOutlet]',\n exportAs: 'cdkPortalOutlet',\n inputs: ['portal: cdkPortalOutlet']\n }]\n }], function () { return [{ type: ɵngcc0.ComponentFactoryResolver }, { type: ɵngcc0.ViewContainerRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, { attached: [{\n type: Output\n }] }); })();\n/**\n * @deprecated Use `CdkPortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nclass PortalHostDirective extends CdkPortalOutlet {\n}\nPortalHostDirective.ɵfac = /*@__PURE__*/ function () { let ɵPortalHostDirective_BaseFactory; return function PortalHostDirective_Factory(t) { return (ɵPortalHostDirective_BaseFactory || (ɵPortalHostDirective_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(PortalHostDirective)))(t || PortalHostDirective); }; }();\nPortalHostDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: PortalHostDirective, selectors: [[\"\", \"cdkPortalHost\", \"\"], [\"\", \"portalHost\", \"\"]], inputs: { portal: [\"cdkPortalHost\", \"portal\"] }, exportAs: [\"cdkPortalHost\"], features: [ɵngcc0.ɵɵProvidersFeature([{\n provide: CdkPortalOutlet,\n useExisting: PortalHostDirective\n }]), ɵngcc0.ɵɵInheritDefinitionFeature] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(PortalHostDirective, [{\n type: Directive,\n args: [{\n selector: '[cdkPortalHost], [portalHost]',\n exportAs: 'cdkPortalHost',\n inputs: ['portal: cdkPortalHost'],\n providers: [{\n provide: CdkPortalOutlet,\n useExisting: PortalHostDirective\n }]\n }]\n }], null, null); })();\nclass PortalModule {\n}\nPortalModule.ɵfac = function PortalModule_Factory(t) { return new (t || PortalModule)(); };\nPortalModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: PortalModule });\nPortalModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({});\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(PortalModule, [{\n type: NgModule,\n args: [{\n exports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],\n declarations: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective]\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(PortalModule, { declarations: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective], exports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective] }); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Custom injector to be used when providing custom\n * injection tokens to components inside a portal.\n * @docs-private\n * @deprecated Use `Injector.create` instead.\n * @breaking-change 11.0.0\n */\nclass PortalInjector {\n constructor(_parentInjector, _customTokens) {\n this._parentInjector = _parentInjector;\n this._customTokens = _customTokens;\n }\n get(token, notFoundValue) {\n const value = this._customTokens.get(token);\n if (typeof value !== 'undefined') {\n return value;\n }\n return this._parentInjector.get(token, notFoundValue);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BasePortalHost, BasePortalOutlet, CdkPortal, CdkPortalOutlet, ComponentPortal, DomPortal, DomPortalHost, DomPortalOutlet, Portal, PortalHostDirective, PortalInjector, PortalModule, TemplatePortal, TemplatePortalDirective };\n\n","import * as i1 from '@angular/cdk/scrolling';\nimport { ScrollDispatcher, ViewportRuler, ScrollingModule } from '@angular/cdk/scrolling';\nimport * as ɵngcc0 from '@angular/core';\nimport * as ɵngcc1 from '@angular/cdk/scrolling';\nimport * as ɵngcc2 from '@angular/cdk/platform';\nimport * as ɵngcc3 from '@angular/cdk/bidi';\nimport * as ɵngcc4 from '@angular/common';\nexport { CdkScrollable, ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';\nimport * as i1$1 from '@angular/common';\nimport { DOCUMENT, Location } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { Injectable, NgZone, Inject, Optional, ElementRef, ApplicationRef, ComponentFactoryResolver, Injector, InjectionToken, Directive, EventEmitter, TemplateRef, ViewContainerRef, Input, Output, NgModule } from '@angular/core';\nimport { coerceCssPixelValue, coerceArray, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport * as i2 from '@angular/cdk/platform';\nimport { supportsScrollBehavior, _getEventTarget, Platform, _isTestEnvironment } from '@angular/cdk/platform';\nimport { Directionality, BidiModule } from '@angular/cdk/bidi';\nimport { DomPortalOutlet, TemplatePortal, PortalModule } from '@angular/cdk/portal';\nimport { Subject, Subscription, merge } from 'rxjs';\nimport { take, takeUntil, takeWhile } from 'rxjs/operators';\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst scrollBehaviorSupported = supportsScrollBehavior();\n/**\n * Strategy that will prevent the user from scrolling while the overlay is visible.\n */\nclass BlockScrollStrategy {\n constructor(_viewportRuler, document) {\n this._viewportRuler = _viewportRuler;\n this._previousHTMLStyles = { top: '', left: '' };\n this._isEnabled = false;\n this._document = document;\n }\n /** Attaches this scroll strategy to an overlay. */\n attach() { }\n /** Blocks page-level scroll while the attached overlay is open. */\n enable() {\n if (this._canBeEnabled()) {\n const root = this._document.documentElement;\n this._previousScrollPosition = this._viewportRuler.getViewportScrollPosition();\n // Cache the previous inline styles in case the user had set them.\n this._previousHTMLStyles.left = root.style.left || '';\n this._previousHTMLStyles.top = root.style.top || '';\n // Note: we're using the `html` node, instead of the `body`, because the `body` may\n // have the user agent margin, whereas the `html` is guaranteed not to have one.\n root.style.left = coerceCssPixelValue(-this._previousScrollPosition.left);\n root.style.top = coerceCssPixelValue(-this._previousScrollPosition.top);\n root.classList.add('cdk-global-scrollblock');\n this._isEnabled = true;\n }\n }\n /** Unblocks page-level scroll while the attached overlay is open. */\n disable() {\n if (this._isEnabled) {\n const html = this._document.documentElement;\n const body = this._document.body;\n const htmlStyle = html.style;\n const bodyStyle = body.style;\n const previousHtmlScrollBehavior = htmlStyle.scrollBehavior || '';\n const previousBodyScrollBehavior = bodyStyle.scrollBehavior || '';\n this._isEnabled = false;\n htmlStyle.left = this._previousHTMLStyles.left;\n htmlStyle.top = this._previousHTMLStyles.top;\n html.classList.remove('cdk-global-scrollblock');\n // Disable user-defined smooth scrolling temporarily while we restore the scroll position.\n // See https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior\n // Note that we don't mutate the property if the browser doesn't support `scroll-behavior`,\n // because it can throw off feature detections in `supportsScrollBehavior` which\n // checks for `'scrollBehavior' in documentElement.style`.\n if (scrollBehaviorSupported) {\n htmlStyle.scrollBehavior = bodyStyle.scrollBehavior = 'auto';\n }\n window.scroll(this._previousScrollPosition.left, this._previousScrollPosition.top);\n if (scrollBehaviorSupported) {\n htmlStyle.scrollBehavior = previousHtmlScrollBehavior;\n bodyStyle.scrollBehavior = previousBodyScrollBehavior;\n }\n }\n }\n _canBeEnabled() {\n // Since the scroll strategies can't be singletons, we have to use a global CSS class\n // (`cdk-global-scrollblock`) to make sure that we don't try to disable global\n // scrolling multiple times.\n const html = this._document.documentElement;\n if (html.classList.contains('cdk-global-scrollblock') || this._isEnabled) {\n return false;\n }\n const body = this._document.body;\n const viewport = this._viewportRuler.getViewportSize();\n return body.scrollHeight > viewport.height || body.scrollWidth > viewport.width;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Returns an error to be thrown when attempting to attach an already-attached scroll strategy.\n */\nfunction getMatScrollStrategyAlreadyAttachedError() {\n return Error(`Scroll strategy has already been attached.`);\n}\n\n/**\n * Strategy that will close the overlay as soon as the user starts scrolling.\n */\nclass CloseScrollStrategy {\n constructor(_scrollDispatcher, _ngZone, _viewportRuler, _config) {\n this._scrollDispatcher = _scrollDispatcher;\n this._ngZone = _ngZone;\n this._viewportRuler = _viewportRuler;\n this._config = _config;\n this._scrollSubscription = null;\n /** Detaches the overlay ref and disables the scroll strategy. */\n this._detach = () => {\n this.disable();\n if (this._overlayRef.hasAttached()) {\n this._ngZone.run(() => this._overlayRef.detach());\n }\n };\n }\n /** Attaches this scroll strategy to an overlay. */\n attach(overlayRef) {\n if (this._overlayRef && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatScrollStrategyAlreadyAttachedError();\n }\n this._overlayRef = overlayRef;\n }\n /** Enables the closing of the attached overlay on scroll. */\n enable() {\n if (this._scrollSubscription) {\n return;\n }\n const stream = this._scrollDispatcher.scrolled(0);\n if (this._config && this._config.threshold && this._config.threshold > 1) {\n this._initialScrollPosition = this._viewportRuler.getViewportScrollPosition().top;\n this._scrollSubscription = stream.subscribe(() => {\n const scrollPosition = this._viewportRuler.getViewportScrollPosition().top;\n if (Math.abs(scrollPosition - this._initialScrollPosition) > this._config.threshold) {\n this._detach();\n }\n else {\n this._overlayRef.updatePosition();\n }\n });\n }\n else {\n this._scrollSubscription = stream.subscribe(this._detach);\n }\n }\n /** Disables the closing the attached overlay on scroll. */\n disable() {\n if (this._scrollSubscription) {\n this._scrollSubscription.unsubscribe();\n this._scrollSubscription = null;\n }\n }\n detach() {\n this.disable();\n this._overlayRef = null;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Scroll strategy that doesn't do anything. */\nclass NoopScrollStrategy {\n /** Does nothing, as this scroll strategy is a no-op. */\n enable() { }\n /** Does nothing, as this scroll strategy is a no-op. */\n disable() { }\n /** Does nothing, as this scroll strategy is a no-op. */\n attach() { }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// TODO(jelbourn): move this to live with the rest of the scrolling code\n// TODO(jelbourn): someday replace this with IntersectionObservers\n/**\n * Gets whether an element is scrolled outside of view by any of its parent scrolling containers.\n * @param element Dimensions of the element (from getBoundingClientRect)\n * @param scrollContainers Dimensions of element's scrolling containers (from getBoundingClientRect)\n * @returns Whether the element is scrolled out of view\n * @docs-private\n */\nfunction isElementScrolledOutsideView(element, scrollContainers) {\n return scrollContainers.some(containerBounds => {\n const outsideAbove = element.bottom < containerBounds.top;\n const outsideBelow = element.top > containerBounds.bottom;\n const outsideLeft = element.right < containerBounds.left;\n const outsideRight = element.left > containerBounds.right;\n return outsideAbove || outsideBelow || outsideLeft || outsideRight;\n });\n}\n/**\n * Gets whether an element is clipped by any of its scrolling containers.\n * @param element Dimensions of the element (from getBoundingClientRect)\n * @param scrollContainers Dimensions of element's scrolling containers (from getBoundingClientRect)\n * @returns Whether the element is clipped\n * @docs-private\n */\nfunction isElementClippedByScrolling(element, scrollContainers) {\n return scrollContainers.some(scrollContainerRect => {\n const clippedAbove = element.top < scrollContainerRect.top;\n const clippedBelow = element.bottom > scrollContainerRect.bottom;\n const clippedLeft = element.left < scrollContainerRect.left;\n const clippedRight = element.right > scrollContainerRect.right;\n return clippedAbove || clippedBelow || clippedLeft || clippedRight;\n });\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Strategy that will update the element position as the user is scrolling.\n */\nclass RepositionScrollStrategy {\n constructor(_scrollDispatcher, _viewportRuler, _ngZone, _config) {\n this._scrollDispatcher = _scrollDispatcher;\n this._viewportRuler = _viewportRuler;\n this._ngZone = _ngZone;\n this._config = _config;\n this._scrollSubscription = null;\n }\n /** Attaches this scroll strategy to an overlay. */\n attach(overlayRef) {\n if (this._overlayRef && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatScrollStrategyAlreadyAttachedError();\n }\n this._overlayRef = overlayRef;\n }\n /** Enables repositioning of the attached overlay on scroll. */\n enable() {\n if (!this._scrollSubscription) {\n const throttle = this._config ? this._config.scrollThrottle : 0;\n this._scrollSubscription = this._scrollDispatcher.scrolled(throttle).subscribe(() => {\n this._overlayRef.updatePosition();\n // TODO(crisbeto): make `close` on by default once all components can handle it.\n if (this._config && this._config.autoClose) {\n const overlayRect = this._overlayRef.overlayElement.getBoundingClientRect();\n const { width, height } = this._viewportRuler.getViewportSize();\n // TODO(crisbeto): include all ancestor scroll containers here once\n // we have a way of exposing the trigger element to the scroll strategy.\n const parentRects = [{ width, height, bottom: height, right: width, top: 0, left: 0 }];\n if (isElementScrolledOutsideView(overlayRect, parentRects)) {\n this.disable();\n this._ngZone.run(() => this._overlayRef.detach());\n }\n }\n });\n }\n }\n /** Disables repositioning of the attached overlay on scroll. */\n disable() {\n if (this._scrollSubscription) {\n this._scrollSubscription.unsubscribe();\n this._scrollSubscription = null;\n }\n }\n detach() {\n this.disable();\n this._overlayRef = null;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Options for how an overlay will handle scrolling.\n *\n * Users can provide a custom value for `ScrollStrategyOptions` to replace the default\n * behaviors. This class primarily acts as a factory for ScrollStrategy instances.\n */\nclass ScrollStrategyOptions {\n constructor(_scrollDispatcher, _viewportRuler, _ngZone, document) {\n this._scrollDispatcher = _scrollDispatcher;\n this._viewportRuler = _viewportRuler;\n this._ngZone = _ngZone;\n /** Do nothing on scroll. */\n this.noop = () => new NoopScrollStrategy();\n /**\n * Close the overlay as soon as the user scrolls.\n * @param config Configuration to be used inside the scroll strategy.\n */\n this.close = (config) => new CloseScrollStrategy(this._scrollDispatcher, this._ngZone, this._viewportRuler, config);\n /** Block scrolling. */\n this.block = () => new BlockScrollStrategy(this._viewportRuler, this._document);\n /**\n * Update the overlay's position on scroll.\n * @param config Configuration to be used inside the scroll strategy.\n * Allows debouncing the reposition calls.\n */\n this.reposition = (config) => new RepositionScrollStrategy(this._scrollDispatcher, this._viewportRuler, this._ngZone, config);\n this._document = document;\n }\n}\nScrollStrategyOptions.ɵfac = function ScrollStrategyOptions_Factory(t) { return new (t || ScrollStrategyOptions)(ɵngcc0.ɵɵinject(ɵngcc1.ScrollDispatcher), ɵngcc0.ɵɵinject(ɵngcc1.ViewportRuler), ɵngcc0.ɵɵinject(ɵngcc0.NgZone), ɵngcc0.ɵɵinject(DOCUMENT)); };\nScrollStrategyOptions.ɵprov = i0.ɵɵdefineInjectable({ factory: function ScrollStrategyOptions_Factory() { return new ScrollStrategyOptions(i0.ɵɵinject(i1.ScrollDispatcher), i0.ɵɵinject(i1.ViewportRuler), i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i1$1.DOCUMENT)); }, token: ScrollStrategyOptions, providedIn: \"root\" });\nScrollStrategyOptions.ctorParameters = () => [\n { type: ScrollDispatcher },\n { type: ViewportRuler },\n { type: NgZone },\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(ScrollStrategyOptions, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return [{ type: ɵngcc1.ScrollDispatcher }, { type: ɵngcc1.ViewportRuler }, { type: ɵngcc0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Initial configuration used when creating an overlay. */\nclass OverlayConfig {\n constructor(config) {\n /** Strategy to be used when handling scroll events while the overlay is open. */\n this.scrollStrategy = new NoopScrollStrategy();\n /** Custom class to add to the overlay pane. */\n this.panelClass = '';\n /** Whether the overlay has a backdrop. */\n this.hasBackdrop = false;\n /** Custom class to add to the backdrop */\n this.backdropClass = 'cdk-overlay-dark-backdrop';\n /**\n * Whether the overlay should be disposed of when the user goes backwards/forwards in history.\n * Note that this usually doesn't include clicking on links (unless the user is using\n * the `HashLocationStrategy`).\n */\n this.disposeOnNavigation = false;\n if (config) {\n // Use `Iterable` instead of `Array` because TypeScript, as of 3.6.3,\n // loses the array generic type in the `for of`. But we *also* have to use `Array` because\n // typescript won't iterate over an `Iterable` unless you compile with `--downlevelIteration`\n const configKeys = Object.keys(config);\n for (const key of configKeys) {\n if (config[key] !== undefined) {\n // TypeScript, as of version 3.5, sees the left-hand-side of this expression\n // as \"I don't know *which* key this is, so the only valid value is the intersection\n // of all the posible values.\" In this case, that happens to be `undefined`. TypeScript\n // is not smart enough to see that the right-hand-side is actually an access of the same\n // exact type with the same exact key, meaning that the value type must be identical.\n // So we use `any` to work around this.\n this[key] = config[key];\n }\n }\n }\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** The points of the origin element and the overlay element to connect. */\nclass ConnectionPositionPair {\n constructor(origin, overlay, \n /** Offset along the X axis. */\n offsetX, \n /** Offset along the Y axis. */\n offsetY, \n /** Class(es) to be applied to the panel while this position is active. */\n panelClass) {\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n this.panelClass = panelClass;\n this.originX = origin.originX;\n this.originY = origin.originY;\n this.overlayX = overlay.overlayX;\n this.overlayY = overlay.overlayY;\n }\n}\n/**\n * Set of properties regarding the position of the origin and overlay relative to the viewport\n * with respect to the containing Scrollable elements.\n *\n * The overlay and origin are clipped if any part of their bounding client rectangle exceeds the\n * bounds of any one of the strategy's Scrollable's bounding client rectangle.\n *\n * The overlay and origin are outside view if there is no overlap between their bounding client\n * rectangle and any one of the strategy's Scrollable's bounding client rectangle.\n *\n * ----------- -----------\n * | outside | | clipped |\n * | view | --------------------------\n * | | | | | |\n * ---------- | ----------- |\n * -------------------------- | |\n * | | | Scrollable |\n * | | | |\n * | | --------------------------\n * | Scrollable |\n * | |\n * --------------------------\n *\n * @docs-private\n */\nclass ScrollingVisibility {\n}\n/** The change event emitted by the strategy when a fallback position is used. */\nclass ConnectedOverlayPositionChange {\n constructor(\n /** The position used as a result of this change. */\n connectionPair, \n /** @docs-private */\n scrollableViewProperties) {\n this.connectionPair = connectionPair;\n this.scrollableViewProperties = scrollableViewProperties;\n }\n}\nConnectedOverlayPositionChange.ctorParameters = () => [\n { type: ConnectionPositionPair },\n { type: ScrollingVisibility, decorators: [{ type: Optional }] }\n];\n/**\n * Validates whether a vertical position property matches the expected values.\n * @param property Name of the property being validated.\n * @param value Value of the property being validated.\n * @docs-private\n */\nfunction validateVerticalPosition(property, value) {\n if (value !== 'top' && value !== 'bottom' && value !== 'center') {\n throw Error(`ConnectedPosition: Invalid ${property} \"${value}\". ` +\n `Expected \"top\", \"bottom\" or \"center\".`);\n }\n}\n/**\n * Validates whether a horizontal position property matches the expected values.\n * @param property Name of the property being validated.\n * @param value Value of the property being validated.\n * @docs-private\n */\nfunction validateHorizontalPosition(property, value) {\n if (value !== 'start' && value !== 'end' && value !== 'center') {\n throw Error(`ConnectedPosition: Invalid ${property} \"${value}\". ` +\n `Expected \"start\", \"end\" or \"center\".`);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Service for dispatching events that land on the body to appropriate overlay ref,\n * if any. It maintains a list of attached overlays to determine best suited overlay based\n * on event target and order of overlay opens.\n */\nclass BaseOverlayDispatcher {\n constructor(document) {\n /** Currently attached overlays in the order they were attached. */\n this._attachedOverlays = [];\n this._document = document;\n }\n ngOnDestroy() {\n this.detach();\n }\n /** Add a new overlay to the list of attached overlay refs. */\n add(overlayRef) {\n // Ensure that we don't get the same overlay multiple times.\n this.remove(overlayRef);\n this._attachedOverlays.push(overlayRef);\n }\n /** Remove an overlay from the list of attached overlay refs. */\n remove(overlayRef) {\n const index = this._attachedOverlays.indexOf(overlayRef);\n if (index > -1) {\n this._attachedOverlays.splice(index, 1);\n }\n // Remove the global listener once there are no more overlays.\n if (this._attachedOverlays.length === 0) {\n this.detach();\n }\n }\n}\nBaseOverlayDispatcher.ɵfac = function BaseOverlayDispatcher_Factory(t) { return new (t || BaseOverlayDispatcher)(ɵngcc0.ɵɵinject(DOCUMENT)); };\nBaseOverlayDispatcher.ɵprov = i0.ɵɵdefineInjectable({ factory: function BaseOverlayDispatcher_Factory() { return new BaseOverlayDispatcher(i0.ɵɵinject(i1$1.DOCUMENT)); }, token: BaseOverlayDispatcher, providedIn: \"root\" });\nBaseOverlayDispatcher.ctorParameters = () => [\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BaseOverlayDispatcher, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Service for dispatching keyboard events that land on the body to appropriate overlay ref,\n * if any. It maintains a list of attached overlays to determine best suited overlay based\n * on event target and order of overlay opens.\n */\nclass OverlayKeyboardDispatcher extends BaseOverlayDispatcher {\n constructor(document) {\n super(document);\n /** Keyboard event listener that will be attached to the body. */\n this._keydownListener = (event) => {\n const overlays = this._attachedOverlays;\n for (let i = overlays.length - 1; i > -1; i--) {\n // Dispatch the keydown event to the top overlay which has subscribers to its keydown events.\n // We want to target the most recent overlay, rather than trying to match where the event came\n // from, because some components might open an overlay, but keep focus on a trigger element\n // (e.g. for select and autocomplete). We skip overlays without keydown event subscriptions,\n // because we don't want overlays that don't handle keyboard events to block the ones below\n // them that do.\n if (overlays[i]._keydownEvents.observers.length > 0) {\n overlays[i]._keydownEvents.next(event);\n break;\n }\n }\n };\n }\n /** Add a new overlay to the list of attached overlay refs. */\n add(overlayRef) {\n super.add(overlayRef);\n // Lazily start dispatcher once first overlay is added\n if (!this._isAttached) {\n this._document.body.addEventListener('keydown', this._keydownListener);\n this._isAttached = true;\n }\n }\n /** Detaches the global keyboard event listener. */\n detach() {\n if (this._isAttached) {\n this._document.body.removeEventListener('keydown', this._keydownListener);\n this._isAttached = false;\n }\n }\n}\nOverlayKeyboardDispatcher.ɵfac = function OverlayKeyboardDispatcher_Factory(t) { return new (t || OverlayKeyboardDispatcher)(ɵngcc0.ɵɵinject(DOCUMENT)); };\nOverlayKeyboardDispatcher.ɵprov = i0.ɵɵdefineInjectable({ factory: function OverlayKeyboardDispatcher_Factory() { return new OverlayKeyboardDispatcher(i0.ɵɵinject(i1$1.DOCUMENT)); }, token: OverlayKeyboardDispatcher, providedIn: \"root\" });\nOverlayKeyboardDispatcher.ctorParameters = () => [\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(OverlayKeyboardDispatcher, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Service for dispatching mouse click events that land on the body to appropriate overlay ref,\n * if any. It maintains a list of attached overlays to determine best suited overlay based\n * on event target and order of overlay opens.\n */\nclass OverlayOutsideClickDispatcher extends BaseOverlayDispatcher {\n constructor(document, _platform) {\n super(document);\n this._platform = _platform;\n this._cursorStyleIsSet = false;\n /** Click event listener that will be attached to the body propagate phase. */\n this._clickListener = (event) => {\n const target = _getEventTarget(event);\n // We copy the array because the original may be modified asynchronously if the\n // outsidePointerEvents listener decides to detach overlays resulting in index errors inside\n // the for loop.\n const overlays = this._attachedOverlays.slice();\n // Dispatch the mouse event to the top overlay which has subscribers to its mouse events.\n // We want to target all overlays for which the click could be considered as outside click.\n // As soon as we reach an overlay for which the click is not outside click we break off\n // the loop.\n for (let i = overlays.length - 1; i > -1; i--) {\n const overlayRef = overlays[i];\n if (overlayRef._outsidePointerEvents.observers.length < 1 || !overlayRef.hasAttached()) {\n continue;\n }\n // If it's a click inside the overlay, just break - we should do nothing\n // If it's an outside click dispatch the mouse event, and proceed with the next overlay\n if (overlayRef.overlayElement.contains(target)) {\n break;\n }\n overlayRef._outsidePointerEvents.next(event);\n }\n };\n }\n /** Add a new overlay to the list of attached overlay refs. */\n add(overlayRef) {\n super.add(overlayRef);\n // Safari on iOS does not generate click events for non-interactive\n // elements. However, we want to receive a click for any element outside\n // the overlay. We can force a \"clickable\" state by setting\n // `cursor: pointer` on the document body. See:\n // https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event#Safari_Mobile\n // https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html\n if (!this._isAttached) {\n const body = this._document.body;\n body.addEventListener('click', this._clickListener, true);\n body.addEventListener('auxclick', this._clickListener, true);\n body.addEventListener('contextmenu', this._clickListener, true);\n // click event is not fired on iOS. To make element \"clickable\" we are\n // setting the cursor to pointer\n if (this._platform.IOS && !this._cursorStyleIsSet) {\n this._cursorOriginalValue = body.style.cursor;\n body.style.cursor = 'pointer';\n this._cursorStyleIsSet = true;\n }\n this._isAttached = true;\n }\n }\n /** Detaches the global keyboard event listener. */\n detach() {\n if (this._isAttached) {\n const body = this._document.body;\n body.removeEventListener('click', this._clickListener, true);\n body.removeEventListener('auxclick', this._clickListener, true);\n body.removeEventListener('contextmenu', this._clickListener, true);\n if (this._platform.IOS && this._cursorStyleIsSet) {\n body.style.cursor = this._cursorOriginalValue;\n this._cursorStyleIsSet = false;\n }\n this._isAttached = false;\n }\n }\n}\nOverlayOutsideClickDispatcher.ɵfac = function OverlayOutsideClickDispatcher_Factory(t) { return new (t || OverlayOutsideClickDispatcher)(ɵngcc0.ɵɵinject(DOCUMENT), ɵngcc0.ɵɵinject(ɵngcc2.Platform)); };\nOverlayOutsideClickDispatcher.ɵprov = i0.ɵɵdefineInjectable({ factory: function OverlayOutsideClickDispatcher_Factory() { return new OverlayOutsideClickDispatcher(i0.ɵɵinject(i1$1.DOCUMENT), i0.ɵɵinject(i2.Platform)); }, token: OverlayOutsideClickDispatcher, providedIn: \"root\" });\nOverlayOutsideClickDispatcher.ctorParameters = () => [\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },\n { type: Platform }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(OverlayOutsideClickDispatcher, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: ɵngcc2.Platform }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Container inside which all overlays will render. */\nclass OverlayContainer {\n constructor(document, _platform) {\n this._platform = _platform;\n this._document = document;\n }\n ngOnDestroy() {\n const container = this._containerElement;\n if (container && container.parentNode) {\n container.parentNode.removeChild(container);\n }\n }\n /**\n * This method returns the overlay container element. It will lazily\n * create the element the first time it is called to facilitate using\n * the container in non-browser environments.\n * @returns the container element\n */\n getContainerElement() {\n if (!this._containerElement) {\n this._createContainer();\n }\n return this._containerElement;\n }\n /**\n * Create the overlay container element, which is simply a div\n * with the 'cdk-overlay-container' class on the document body.\n */\n _createContainer() {\n const containerClass = 'cdk-overlay-container';\n // TODO(crisbeto): remove the testing check once we have an overlay testing\n // module or Angular starts tearing down the testing `NgModule`. See:\n // https://github.com/angular/angular/issues/18831\n if (this._platform.isBrowser || _isTestEnvironment()) {\n const oppositePlatformContainers = this._document.querySelectorAll(`.${containerClass}[platform=\"server\"], ` +\n `.${containerClass}[platform=\"test\"]`);\n // Remove any old containers from the opposite platform.\n // This can happen when transitioning from the server to the client.\n for (let i = 0; i < oppositePlatformContainers.length; i++) {\n oppositePlatformContainers[i].parentNode.removeChild(oppositePlatformContainers[i]);\n }\n }\n const container = this._document.createElement('div');\n container.classList.add(containerClass);\n // A long time ago we kept adding new overlay containers whenever a new app was instantiated,\n // but at some point we added logic which clears the duplicate ones in order to avoid leaks.\n // The new logic was a little too aggressive since it was breaking some legitimate use cases.\n // To mitigate the problem we made it so that only containers from a different platform are\n // cleared, but the side-effect was that people started depending on the overly-aggressive\n // logic to clean up their tests for them. Until we can introduce an overlay-specific testing\n // module which does the cleanup, we try to detect that we're in a test environment and we\n // always clear the container. See #17006.\n // TODO(crisbeto): remove the test environment check once we have an overlay testing module.\n if (_isTestEnvironment()) {\n container.setAttribute('platform', 'test');\n }\n else if (!this._platform.isBrowser) {\n container.setAttribute('platform', 'server');\n }\n this._document.body.appendChild(container);\n this._containerElement = container;\n }\n}\nOverlayContainer.ɵfac = function OverlayContainer_Factory(t) { return new (t || OverlayContainer)(ɵngcc0.ɵɵinject(DOCUMENT), ɵngcc0.ɵɵinject(ɵngcc2.Platform)); };\nOverlayContainer.ɵprov = i0.ɵɵdefineInjectable({ factory: function OverlayContainer_Factory() { return new OverlayContainer(i0.ɵɵinject(i1$1.DOCUMENT), i0.ɵɵinject(i2.Platform)); }, token: OverlayContainer, providedIn: \"root\" });\nOverlayContainer.ctorParameters = () => [\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },\n { type: Platform }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(OverlayContainer, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: ɵngcc2.Platform }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Reference to an overlay that has been created with the Overlay service.\n * Used to manipulate or dispose of said overlay.\n */\nclass OverlayRef {\n constructor(_portalOutlet, _host, _pane, _config, _ngZone, _keyboardDispatcher, _document, _location, _outsideClickDispatcher) {\n this._portalOutlet = _portalOutlet;\n this._host = _host;\n this._pane = _pane;\n this._config = _config;\n this._ngZone = _ngZone;\n this._keyboardDispatcher = _keyboardDispatcher;\n this._document = _document;\n this._location = _location;\n this._outsideClickDispatcher = _outsideClickDispatcher;\n this._backdropElement = null;\n this._backdropClick = new Subject();\n this._attachments = new Subject();\n this._detachments = new Subject();\n this._locationChanges = Subscription.EMPTY;\n this._backdropClickHandler = (event) => this._backdropClick.next(event);\n /** Stream of keydown events dispatched to this overlay. */\n this._keydownEvents = new Subject();\n /** Stream of mouse outside events dispatched to this overlay. */\n this._outsidePointerEvents = new Subject();\n if (_config.scrollStrategy) {\n this._scrollStrategy = _config.scrollStrategy;\n this._scrollStrategy.attach(this);\n }\n this._positionStrategy = _config.positionStrategy;\n }\n /** The overlay's HTML element */\n get overlayElement() {\n return this._pane;\n }\n /** The overlay's backdrop HTML element. */\n get backdropElement() {\n return this._backdropElement;\n }\n /**\n * Wrapper around the panel element. Can be used for advanced\n * positioning where a wrapper with specific styling is\n * required around the overlay pane.\n */\n get hostElement() {\n return this._host;\n }\n /**\n * Attaches content, given via a Portal, to the overlay.\n * If the overlay is configured to have a backdrop, it will be created.\n *\n * @param portal Portal instance to which to attach the overlay.\n * @returns The portal attachment result.\n */\n attach(portal) {\n let attachResult = this._portalOutlet.attach(portal);\n // Update the pane element with the given configuration.\n if (!this._host.parentElement && this._previousHostParent) {\n this._previousHostParent.appendChild(this._host);\n }\n if (this._positionStrategy) {\n this._positionStrategy.attach(this);\n }\n this._updateStackingOrder();\n this._updateElementSize();\n this._updateElementDirection();\n if (this._scrollStrategy) {\n this._scrollStrategy.enable();\n }\n // Update the position once the zone is stable so that the overlay will be fully rendered\n // before attempting to position it, as the position may depend on the size of the rendered\n // content.\n this._ngZone.onStable\n .pipe(take(1))\n .subscribe(() => {\n // The overlay could've been detached before the zone has stabilized.\n if (this.hasAttached()) {\n this.updatePosition();\n }\n });\n // Enable pointer events for the overlay pane element.\n this._togglePointerEvents(true);\n if (this._config.hasBackdrop) {\n this._attachBackdrop();\n }\n if (this._config.panelClass) {\n this._toggleClasses(this._pane, this._config.panelClass, true);\n }\n // Only emit the `attachments` event once all other setup is done.\n this._attachments.next();\n // Track this overlay by the keyboard dispatcher\n this._keyboardDispatcher.add(this);\n if (this._config.disposeOnNavigation) {\n this._locationChanges = this._location.subscribe(() => this.dispose());\n }\n this._outsideClickDispatcher.add(this);\n return attachResult;\n }\n /**\n * Detaches an overlay from a portal.\n * @returns The portal detachment result.\n */\n detach() {\n if (!this.hasAttached()) {\n return;\n }\n this.detachBackdrop();\n // When the overlay is detached, the pane element should disable pointer events.\n // This is necessary because otherwise the pane element will cover the page and disable\n // pointer events therefore. Depends on the position strategy and the applied pane boundaries.\n this._togglePointerEvents(false);\n if (this._positionStrategy && this._positionStrategy.detach) {\n this._positionStrategy.detach();\n }\n if (this._scrollStrategy) {\n this._scrollStrategy.disable();\n }\n const detachmentResult = this._portalOutlet.detach();\n // Only emit after everything is detached.\n this._detachments.next();\n // Remove this overlay from keyboard dispatcher tracking.\n this._keyboardDispatcher.remove(this);\n // Keeping the host element in the DOM can cause scroll jank, because it still gets\n // rendered, even though it's transparent and unclickable which is why we remove it.\n this._detachContentWhenStable();\n this._locationChanges.unsubscribe();\n this._outsideClickDispatcher.remove(this);\n return detachmentResult;\n }\n /** Cleans up the overlay from the DOM. */\n dispose() {\n const isAttached = this.hasAttached();\n if (this._positionStrategy) {\n this._positionStrategy.dispose();\n }\n this._disposeScrollStrategy();\n this._disposeBackdrop(this._backdropElement);\n this._locationChanges.unsubscribe();\n this._keyboardDispatcher.remove(this);\n this._portalOutlet.dispose();\n this._attachments.complete();\n this._backdropClick.complete();\n this._keydownEvents.complete();\n this._outsidePointerEvents.complete();\n this._outsideClickDispatcher.remove(this);\n if (this._host && this._host.parentNode) {\n this._host.parentNode.removeChild(this._host);\n this._host = null;\n }\n this._previousHostParent = this._pane = null;\n if (isAttached) {\n this._detachments.next();\n }\n this._detachments.complete();\n }\n /** Whether the overlay has attached content. */\n hasAttached() {\n return this._portalOutlet.hasAttached();\n }\n /** Gets an observable that emits when the backdrop has been clicked. */\n backdropClick() {\n return this._backdropClick;\n }\n /** Gets an observable that emits when the overlay has been attached. */\n attachments() {\n return this._attachments;\n }\n /** Gets an observable that emits when the overlay has been detached. */\n detachments() {\n return this._detachments;\n }\n /** Gets an observable of keydown events targeted to this overlay. */\n keydownEvents() {\n return this._keydownEvents;\n }\n /** Gets an observable of pointer events targeted outside this overlay. */\n outsidePointerEvents() {\n return this._outsidePointerEvents;\n }\n /** Gets the current overlay configuration, which is immutable. */\n getConfig() {\n return this._config;\n }\n /** Updates the position of the overlay based on the position strategy. */\n updatePosition() {\n if (this._positionStrategy) {\n this._positionStrategy.apply();\n }\n }\n /** Switches to a new position strategy and updates the overlay position. */\n updatePositionStrategy(strategy) {\n if (strategy === this._positionStrategy) {\n return;\n }\n if (this._positionStrategy) {\n this._positionStrategy.dispose();\n }\n this._positionStrategy = strategy;\n if (this.hasAttached()) {\n strategy.attach(this);\n this.updatePosition();\n }\n }\n /** Update the size properties of the overlay. */\n updateSize(sizeConfig) {\n this._config = Object.assign(Object.assign({}, this._config), sizeConfig);\n this._updateElementSize();\n }\n /** Sets the LTR/RTL direction for the overlay. */\n setDirection(dir) {\n this._config = Object.assign(Object.assign({}, this._config), { direction: dir });\n this._updateElementDirection();\n }\n /** Add a CSS class or an array of classes to the overlay pane. */\n addPanelClass(classes) {\n if (this._pane) {\n this._toggleClasses(this._pane, classes, true);\n }\n }\n /** Remove a CSS class or an array of classes from the overlay pane. */\n removePanelClass(classes) {\n if (this._pane) {\n this._toggleClasses(this._pane, classes, false);\n }\n }\n /**\n * Returns the layout direction of the overlay panel.\n */\n getDirection() {\n const direction = this._config.direction;\n if (!direction) {\n return 'ltr';\n }\n return typeof direction === 'string' ? direction : direction.value;\n }\n /** Switches to a new scroll strategy. */\n updateScrollStrategy(strategy) {\n if (strategy === this._scrollStrategy) {\n return;\n }\n this._disposeScrollStrategy();\n this._scrollStrategy = strategy;\n if (this.hasAttached()) {\n strategy.attach(this);\n strategy.enable();\n }\n }\n /** Updates the text direction of the overlay panel. */\n _updateElementDirection() {\n this._host.setAttribute('dir', this.getDirection());\n }\n /** Updates the size of the overlay element based on the overlay config. */\n _updateElementSize() {\n if (!this._pane) {\n return;\n }\n const style = this._pane.style;\n style.width = coerceCssPixelValue(this._config.width);\n style.height = coerceCssPixelValue(this._config.height);\n style.minWidth = coerceCssPixelValue(this._config.minWidth);\n style.minHeight = coerceCssPixelValue(this._config.minHeight);\n style.maxWidth = coerceCssPixelValue(this._config.maxWidth);\n style.maxHeight = coerceCssPixelValue(this._config.maxHeight);\n }\n /** Toggles the pointer events for the overlay pane element. */\n _togglePointerEvents(enablePointer) {\n this._pane.style.pointerEvents = enablePointer ? '' : 'none';\n }\n /** Attaches a backdrop for this overlay. */\n _attachBackdrop() {\n const showingClass = 'cdk-overlay-backdrop-showing';\n this._backdropElement = this._document.createElement('div');\n this._backdropElement.classList.add('cdk-overlay-backdrop');\n if (this._config.backdropClass) {\n this._toggleClasses(this._backdropElement, this._config.backdropClass, true);\n }\n // Insert the backdrop before the pane in the DOM order,\n // in order to handle stacked overlays properly.\n this._host.parentElement.insertBefore(this._backdropElement, this._host);\n // Forward backdrop clicks such that the consumer of the overlay can perform whatever\n // action desired when such a click occurs (usually closing the overlay).\n this._backdropElement.addEventListener('click', this._backdropClickHandler);\n // Add class to fade-in the backdrop after one frame.\n if (typeof requestAnimationFrame !== 'undefined') {\n this._ngZone.runOutsideAngular(() => {\n requestAnimationFrame(() => {\n if (this._backdropElement) {\n this._backdropElement.classList.add(showingClass);\n }\n });\n });\n }\n else {\n this._backdropElement.classList.add(showingClass);\n }\n }\n /**\n * Updates the stacking order of the element, moving it to the top if necessary.\n * This is required in cases where one overlay was detached, while another one,\n * that should be behind it, was destroyed. The next time both of them are opened,\n * the stacking will be wrong, because the detached element's pane will still be\n * in its original DOM position.\n */\n _updateStackingOrder() {\n if (this._host.nextSibling) {\n this._host.parentNode.appendChild(this._host);\n }\n }\n /** Detaches the backdrop (if any) associated with the overlay. */\n detachBackdrop() {\n const backdropToDetach = this._backdropElement;\n if (!backdropToDetach) {\n return;\n }\n let timeoutId;\n const finishDetach = () => {\n // It may not be attached to anything in certain cases (e.g. unit tests).\n if (backdropToDetach) {\n backdropToDetach.removeEventListener('click', this._backdropClickHandler);\n backdropToDetach.removeEventListener('transitionend', finishDetach);\n this._disposeBackdrop(backdropToDetach);\n }\n if (this._config.backdropClass) {\n this._toggleClasses(backdropToDetach, this._config.backdropClass, false);\n }\n clearTimeout(timeoutId);\n };\n backdropToDetach.classList.remove('cdk-overlay-backdrop-showing');\n this._ngZone.runOutsideAngular(() => {\n backdropToDetach.addEventListener('transitionend', finishDetach);\n });\n // If the backdrop doesn't have a transition, the `transitionend` event won't fire.\n // In this case we make it unclickable and we try to remove it after a delay.\n backdropToDetach.style.pointerEvents = 'none';\n // Run this outside the Angular zone because there's nothing that Angular cares about.\n // If it were to run inside the Angular zone, every test that used Overlay would have to be\n // either async or fakeAsync.\n timeoutId = this._ngZone.runOutsideAngular(() => setTimeout(finishDetach, 500));\n }\n /** Toggles a single CSS class or an array of classes on an element. */\n _toggleClasses(element, cssClasses, isAdd) {\n const classes = coerceArray(cssClasses || []).filter(c => !!c);\n if (classes.length) {\n isAdd ? element.classList.add(...classes) : element.classList.remove(...classes);\n }\n }\n /** Detaches the overlay content next time the zone stabilizes. */\n _detachContentWhenStable() {\n // Normally we wouldn't have to explicitly run this outside the `NgZone`, however\n // if the consumer is using `zone-patch-rxjs`, the `Subscription.unsubscribe` call will\n // be patched to run inside the zone, which will throw us into an infinite loop.\n this._ngZone.runOutsideAngular(() => {\n // We can't remove the host here immediately, because the overlay pane's content\n // might still be animating. This stream helps us avoid interrupting the animation\n // by waiting for the pane to become empty.\n const subscription = this._ngZone.onStable\n .pipe(takeUntil(merge(this._attachments, this._detachments)))\n .subscribe(() => {\n // Needs a couple of checks for the pane and host, because\n // they may have been removed by the time the zone stabilizes.\n if (!this._pane || !this._host || this._pane.children.length === 0) {\n if (this._pane && this._config.panelClass) {\n this._toggleClasses(this._pane, this._config.panelClass, false);\n }\n if (this._host && this._host.parentElement) {\n this._previousHostParent = this._host.parentElement;\n this._previousHostParent.removeChild(this._host);\n }\n subscription.unsubscribe();\n }\n });\n });\n }\n /** Disposes of a scroll strategy. */\n _disposeScrollStrategy() {\n const scrollStrategy = this._scrollStrategy;\n if (scrollStrategy) {\n scrollStrategy.disable();\n if (scrollStrategy.detach) {\n scrollStrategy.detach();\n }\n }\n }\n /** Removes a backdrop element from the DOM. */\n _disposeBackdrop(backdrop) {\n if (backdrop) {\n if (backdrop.parentNode) {\n backdrop.parentNode.removeChild(backdrop);\n }\n // It is possible that a new portal has been attached to this overlay since we started\n // removing the backdrop. If that is the case, only clear the backdrop reference if it\n // is still the same instance that we started to remove.\n if (this._backdropElement === backdrop) {\n this._backdropElement = null;\n }\n }\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// TODO: refactor clipping detection into a separate thing (part of scrolling module)\n// TODO: doesn't handle both flexible width and height when it has to scroll along both axis.\n/** Class to be added to the overlay bounding box. */\nconst boundingBoxClass = 'cdk-overlay-connected-position-bounding-box';\n/** Regex used to split a string on its CSS units. */\nconst cssUnitPattern = /([A-Za-z%]+)$/;\n/**\n * A strategy for positioning overlays. Using this strategy, an overlay is given an\n * implicit position relative some origin element. The relative position is defined in terms of\n * a point on the origin element that is connected to a point on the overlay element. For example,\n * a basic dropdown is connecting the bottom-left corner of the origin to the top-left corner\n * of the overlay.\n */\nclass FlexibleConnectedPositionStrategy {\n constructor(connectedTo, _viewportRuler, _document, _platform, _overlayContainer) {\n this._viewportRuler = _viewportRuler;\n this._document = _document;\n this._platform = _platform;\n this._overlayContainer = _overlayContainer;\n /** Last size used for the bounding box. Used to avoid resizing the overlay after open. */\n this._lastBoundingBoxSize = { width: 0, height: 0 };\n /** Whether the overlay was pushed in a previous positioning. */\n this._isPushed = false;\n /** Whether the overlay can be pushed on-screen on the initial open. */\n this._canPush = true;\n /** Whether the overlay can grow via flexible width/height after the initial open. */\n this._growAfterOpen = false;\n /** Whether the overlay's width and height can be constrained to fit within the viewport. */\n this._hasFlexibleDimensions = true;\n /** Whether the overlay position is locked. */\n this._positionLocked = false;\n /** Amount of space that must be maintained between the overlay and the edge of the viewport. */\n this._viewportMargin = 0;\n /** The Scrollable containers used to check scrollable view properties on position change. */\n this._scrollables = [];\n /** Ordered list of preferred positions, from most to least desirable. */\n this._preferredPositions = [];\n /** Subject that emits whenever the position changes. */\n this._positionChanges = new Subject();\n /** Subscription to viewport size changes. */\n this._resizeSubscription = Subscription.EMPTY;\n /** Default offset for the overlay along the x axis. */\n this._offsetX = 0;\n /** Default offset for the overlay along the y axis. */\n this._offsetY = 0;\n /** Keeps track of the CSS classes that the position strategy has applied on the overlay panel. */\n this._appliedPanelClasses = [];\n /** Observable sequence of position changes. */\n this.positionChanges = this._positionChanges;\n this.setOrigin(connectedTo);\n }\n /** Ordered list of preferred positions, from most to least desirable. */\n get positions() {\n return this._preferredPositions;\n }\n /** Attaches this position strategy to an overlay. */\n attach(overlayRef) {\n if (this._overlayRef && overlayRef !== this._overlayRef &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('This position strategy is already attached to an overlay');\n }\n this._validatePositions();\n overlayRef.hostElement.classList.add(boundingBoxClass);\n this._overlayRef = overlayRef;\n this._boundingBox = overlayRef.hostElement;\n this._pane = overlayRef.overlayElement;\n this._isDisposed = false;\n this._isInitialRender = true;\n this._lastPosition = null;\n this._resizeSubscription.unsubscribe();\n this._resizeSubscription = this._viewportRuler.change().subscribe(() => {\n // When the window is resized, we want to trigger the next reposition as if it\n // was an initial render, in order for the strategy to pick a new optimal position,\n // otherwise position locking will cause it to stay at the old one.\n this._isInitialRender = true;\n this.apply();\n });\n }\n /**\n * Updates the position of the overlay element, using whichever preferred position relative\n * to the origin best fits on-screen.\n *\n * The selection of a position goes as follows:\n * - If any positions fit completely within the viewport as-is,\n * choose the first position that does so.\n * - If flexible dimensions are enabled and at least one satifies the given minimum width/height,\n * choose the position with the greatest available size modified by the positions' weight.\n * - If pushing is enabled, take the position that went off-screen the least and push it\n * on-screen.\n * - If none of the previous criteria were met, use the position that goes off-screen the least.\n * @docs-private\n */\n apply() {\n // We shouldn't do anything if the strategy was disposed or we're on the server.\n if (this._isDisposed || !this._platform.isBrowser) {\n return;\n }\n // If the position has been applied already (e.g. when the overlay was opened) and the\n // consumer opted into locking in the position, re-use the old position, in order to\n // prevent the overlay from jumping around.\n if (!this._isInitialRender && this._positionLocked && this._lastPosition) {\n this.reapplyLastPosition();\n return;\n }\n this._clearPanelClasses();\n this._resetOverlayElementStyles();\n this._resetBoundingBoxStyles();\n // We need the bounding rects for the origin and the overlay to determine how to position\n // the overlay relative to the origin.\n // We use the viewport rect to determine whether a position would go off-screen.\n this._viewportRect = this._getNarrowedViewportRect();\n this._originRect = this._getOriginRect();\n this._overlayRect = this._pane.getBoundingClientRect();\n const originRect = this._originRect;\n const overlayRect = this._overlayRect;\n const viewportRect = this._viewportRect;\n // Positions where the overlay will fit with flexible dimensions.\n const flexibleFits = [];\n // Fallback if none of the preferred positions fit within the viewport.\n let fallback;\n // Go through each of the preferred positions looking for a good fit.\n // If a good fit is found, it will be applied immediately.\n for (let pos of this._preferredPositions) {\n // Get the exact (x, y) coordinate for the point-of-origin on the origin element.\n let originPoint = this._getOriginPoint(originRect, pos);\n // From that point-of-origin, get the exact (x, y) coordinate for the top-left corner of the\n // overlay in this position. We use the top-left corner for calculations and later translate\n // this into an appropriate (top, left, bottom, right) style.\n let overlayPoint = this._getOverlayPoint(originPoint, overlayRect, pos);\n // Calculate how well the overlay would fit into the viewport with this point.\n let overlayFit = this._getOverlayFit(overlayPoint, overlayRect, viewportRect, pos);\n // If the overlay, without any further work, fits into the viewport, use this position.\n if (overlayFit.isCompletelyWithinViewport) {\n this._isPushed = false;\n this._applyPosition(pos, originPoint);\n return;\n }\n // If the overlay has flexible dimensions, we can use this position\n // so long as there's enough space for the minimum dimensions.\n if (this._canFitWithFlexibleDimensions(overlayFit, overlayPoint, viewportRect)) {\n // Save positions where the overlay will fit with flexible dimensions. We will use these\n // if none of the positions fit *without* flexible dimensions.\n flexibleFits.push({\n position: pos,\n origin: originPoint,\n overlayRect,\n boundingBoxRect: this._calculateBoundingBoxRect(originPoint, pos)\n });\n continue;\n }\n // If the current preferred position does not fit on the screen, remember the position\n // if it has more visible area on-screen than we've seen and move onto the next preferred\n // position.\n if (!fallback || fallback.overlayFit.visibleArea < overlayFit.visibleArea) {\n fallback = { overlayFit, overlayPoint, originPoint, position: pos, overlayRect };\n }\n }\n // If there are any positions where the overlay would fit with flexible dimensions, choose the\n // one that has the greatest area available modified by the position's weight\n if (flexibleFits.length) {\n let bestFit = null;\n let bestScore = -1;\n for (const fit of flexibleFits) {\n const score = fit.boundingBoxRect.width * fit.boundingBoxRect.height * (fit.position.weight || 1);\n if (score > bestScore) {\n bestScore = score;\n bestFit = fit;\n }\n }\n this._isPushed = false;\n this._applyPosition(bestFit.position, bestFit.origin);\n return;\n }\n // When none of the preferred positions fit within the viewport, take the position\n // that went off-screen the least and attempt to push it on-screen.\n if (this._canPush) {\n // TODO(jelbourn): after pushing, the opening \"direction\" of the overlay might not make sense.\n this._isPushed = true;\n this._applyPosition(fallback.position, fallback.originPoint);\n return;\n }\n // All options for getting the overlay within the viewport have been exhausted, so go with the\n // position that went off-screen the least.\n this._applyPosition(fallback.position, fallback.originPoint);\n }\n detach() {\n this._clearPanelClasses();\n this._lastPosition = null;\n this._previousPushAmount = null;\n this._resizeSubscription.unsubscribe();\n }\n /** Cleanup after the element gets destroyed. */\n dispose() {\n if (this._isDisposed) {\n return;\n }\n // We can't use `_resetBoundingBoxStyles` here, because it resets\n // some properties to zero, rather than removing them.\n if (this._boundingBox) {\n extendStyles(this._boundingBox.style, {\n top: '',\n left: '',\n right: '',\n bottom: '',\n height: '',\n width: '',\n alignItems: '',\n justifyContent: '',\n });\n }\n if (this._pane) {\n this._resetOverlayElementStyles();\n }\n if (this._overlayRef) {\n this._overlayRef.hostElement.classList.remove(boundingBoxClass);\n }\n this.detach();\n this._positionChanges.complete();\n this._overlayRef = this._boundingBox = null;\n this._isDisposed = true;\n }\n /**\n * This re-aligns the overlay element with the trigger in its last calculated position,\n * even if a position higher in the \"preferred positions\" list would now fit. This\n * allows one to re-align the panel without changing the orientation of the panel.\n */\n reapplyLastPosition() {\n if (!this._isDisposed && (!this._platform || this._platform.isBrowser)) {\n this._originRect = this._getOriginRect();\n this._overlayRect = this._pane.getBoundingClientRect();\n this._viewportRect = this._getNarrowedViewportRect();\n const lastPosition = this._lastPosition || this._preferredPositions[0];\n const originPoint = this._getOriginPoint(this._originRect, lastPosition);\n this._applyPosition(lastPosition, originPoint);\n }\n }\n /**\n * Sets the list of Scrollable containers that host the origin element so that\n * on reposition we can evaluate if it or the overlay has been clipped or outside view. Every\n * Scrollable must be an ancestor element of the strategy's origin element.\n */\n withScrollableContainers(scrollables) {\n this._scrollables = scrollables;\n return this;\n }\n /**\n * Adds new preferred positions.\n * @param positions List of positions options for this overlay.\n */\n withPositions(positions) {\n this._preferredPositions = positions;\n // If the last calculated position object isn't part of the positions anymore, clear\n // it in order to avoid it being picked up if the consumer tries to re-apply.\n if (positions.indexOf(this._lastPosition) === -1) {\n this._lastPosition = null;\n }\n this._validatePositions();\n return this;\n }\n /**\n * Sets a minimum distance the overlay may be positioned to the edge of the viewport.\n * @param margin Required margin between the overlay and the viewport edge in pixels.\n */\n withViewportMargin(margin) {\n this._viewportMargin = margin;\n return this;\n }\n /** Sets whether the overlay's width and height can be constrained to fit within the viewport. */\n withFlexibleDimensions(flexibleDimensions = true) {\n this._hasFlexibleDimensions = flexibleDimensions;\n return this;\n }\n /** Sets whether the overlay can grow after the initial open via flexible width/height. */\n withGrowAfterOpen(growAfterOpen = true) {\n this._growAfterOpen = growAfterOpen;\n return this;\n }\n /** Sets whether the overlay can be pushed on-screen if none of the provided positions fit. */\n withPush(canPush = true) {\n this._canPush = canPush;\n return this;\n }\n /**\n * Sets whether the overlay's position should be locked in after it is positioned\n * initially. When an overlay is locked in, it won't attempt to reposition itself\n * when the position is re-applied (e.g. when the user scrolls away).\n * @param isLocked Whether the overlay should locked in.\n */\n withLockedPosition(isLocked = true) {\n this._positionLocked = isLocked;\n return this;\n }\n /**\n * Sets the origin, relative to which to position the overlay.\n * Using an element origin is useful for building components that need to be positioned\n * relatively to a trigger (e.g. dropdown menus or tooltips), whereas using a point can be\n * used for cases like contextual menus which open relative to the user's pointer.\n * @param origin Reference to the new origin.\n */\n setOrigin(origin) {\n this._origin = origin;\n return this;\n }\n /**\n * Sets the default offset for the overlay's connection point on the x-axis.\n * @param offset New offset in the X axis.\n */\n withDefaultOffsetX(offset) {\n this._offsetX = offset;\n return this;\n }\n /**\n * Sets the default offset for the overlay's connection point on the y-axis.\n * @param offset New offset in the Y axis.\n */\n withDefaultOffsetY(offset) {\n this._offsetY = offset;\n return this;\n }\n /**\n * Configures that the position strategy should set a `transform-origin` on some elements\n * inside the overlay, depending on the current position that is being applied. This is\n * useful for the cases where the origin of an animation can change depending on the\n * alignment of the overlay.\n * @param selector CSS selector that will be used to find the target\n * elements onto which to set the transform origin.\n */\n withTransformOriginOn(selector) {\n this._transformOriginSelector = selector;\n return this;\n }\n /**\n * Gets the (x, y) coordinate of a connection point on the origin based on a relative position.\n */\n _getOriginPoint(originRect, pos) {\n let x;\n if (pos.originX == 'center') {\n // Note: when centering we should always use the `left`\n // offset, otherwise the position will be wrong in RTL.\n x = originRect.left + (originRect.width / 2);\n }\n else {\n const startX = this._isRtl() ? originRect.right : originRect.left;\n const endX = this._isRtl() ? originRect.left : originRect.right;\n x = pos.originX == 'start' ? startX : endX;\n }\n let y;\n if (pos.originY == 'center') {\n y = originRect.top + (originRect.height / 2);\n }\n else {\n y = pos.originY == 'top' ? originRect.top : originRect.bottom;\n }\n return { x, y };\n }\n /**\n * Gets the (x, y) coordinate of the top-left corner of the overlay given a given position and\n * origin point to which the overlay should be connected.\n */\n _getOverlayPoint(originPoint, overlayRect, pos) {\n // Calculate the (overlayStartX, overlayStartY), the start of the\n // potential overlay position relative to the origin point.\n let overlayStartX;\n if (pos.overlayX == 'center') {\n overlayStartX = -overlayRect.width / 2;\n }\n else if (pos.overlayX === 'start') {\n overlayStartX = this._isRtl() ? -overlayRect.width : 0;\n }\n else {\n overlayStartX = this._isRtl() ? 0 : -overlayRect.width;\n }\n let overlayStartY;\n if (pos.overlayY == 'center') {\n overlayStartY = -overlayRect.height / 2;\n }\n else {\n overlayStartY = pos.overlayY == 'top' ? 0 : -overlayRect.height;\n }\n // The (x, y) coordinates of the overlay.\n return {\n x: originPoint.x + overlayStartX,\n y: originPoint.y + overlayStartY,\n };\n }\n /** Gets how well an overlay at the given point will fit within the viewport. */\n _getOverlayFit(point, rawOverlayRect, viewport, position) {\n // Round the overlay rect when comparing against the\n // viewport, because the viewport is always rounded.\n const overlay = getRoundedBoundingClientRect(rawOverlayRect);\n let { x, y } = point;\n let offsetX = this._getOffset(position, 'x');\n let offsetY = this._getOffset(position, 'y');\n // Account for the offsets since they could push the overlay out of the viewport.\n if (offsetX) {\n x += offsetX;\n }\n if (offsetY) {\n y += offsetY;\n }\n // How much the overlay would overflow at this position, on each side.\n let leftOverflow = 0 - x;\n let rightOverflow = (x + overlay.width) - viewport.width;\n let topOverflow = 0 - y;\n let bottomOverflow = (y + overlay.height) - viewport.height;\n // Visible parts of the element on each axis.\n let visibleWidth = this._subtractOverflows(overlay.width, leftOverflow, rightOverflow);\n let visibleHeight = this._subtractOverflows(overlay.height, topOverflow, bottomOverflow);\n let visibleArea = visibleWidth * visibleHeight;\n return {\n visibleArea,\n isCompletelyWithinViewport: (overlay.width * overlay.height) === visibleArea,\n fitsInViewportVertically: visibleHeight === overlay.height,\n fitsInViewportHorizontally: visibleWidth == overlay.width,\n };\n }\n /**\n * Whether the overlay can fit within the viewport when it may resize either its width or height.\n * @param fit How well the overlay fits in the viewport at some position.\n * @param point The (x, y) coordinates of the overlat at some position.\n * @param viewport The geometry of the viewport.\n */\n _canFitWithFlexibleDimensions(fit, point, viewport) {\n if (this._hasFlexibleDimensions) {\n const availableHeight = viewport.bottom - point.y;\n const availableWidth = viewport.right - point.x;\n const minHeight = getPixelValue(this._overlayRef.getConfig().minHeight);\n const minWidth = getPixelValue(this._overlayRef.getConfig().minWidth);\n const verticalFit = fit.fitsInViewportVertically ||\n (minHeight != null && minHeight <= availableHeight);\n const horizontalFit = fit.fitsInViewportHorizontally ||\n (minWidth != null && minWidth <= availableWidth);\n return verticalFit && horizontalFit;\n }\n return false;\n }\n /**\n * Gets the point at which the overlay can be \"pushed\" on-screen. If the overlay is larger than\n * the viewport, the top-left corner will be pushed on-screen (with overflow occuring on the\n * right and bottom).\n *\n * @param start Starting point from which the overlay is pushed.\n * @param overlay Dimensions of the overlay.\n * @param scrollPosition Current viewport scroll position.\n * @returns The point at which to position the overlay after pushing. This is effectively a new\n * originPoint.\n */\n _pushOverlayOnScreen(start, rawOverlayRect, scrollPosition) {\n // If the position is locked and we've pushed the overlay already, reuse the previous push\n // amount, rather than pushing it again. If we were to continue pushing, the element would\n // remain in the viewport, which goes against the expectations when position locking is enabled.\n if (this._previousPushAmount && this._positionLocked) {\n return {\n x: start.x + this._previousPushAmount.x,\n y: start.y + this._previousPushAmount.y\n };\n }\n // Round the overlay rect when comparing against the\n // viewport, because the viewport is always rounded.\n const overlay = getRoundedBoundingClientRect(rawOverlayRect);\n const viewport = this._viewportRect;\n // Determine how much the overlay goes outside the viewport on each\n // side, which we'll use to decide which direction to push it.\n const overflowRight = Math.max(start.x + overlay.width - viewport.width, 0);\n const overflowBottom = Math.max(start.y + overlay.height - viewport.height, 0);\n const overflowTop = Math.max(viewport.top - scrollPosition.top - start.y, 0);\n const overflowLeft = Math.max(viewport.left - scrollPosition.left - start.x, 0);\n // Amount by which to push the overlay in each axis such that it remains on-screen.\n let pushX = 0;\n let pushY = 0;\n // If the overlay fits completely within the bounds of the viewport, push it from whichever\n // direction is goes off-screen. Otherwise, push the top-left corner such that its in the\n // viewport and allow for the trailing end of the overlay to go out of bounds.\n if (overlay.width <= viewport.width) {\n pushX = overflowLeft || -overflowRight;\n }\n else {\n pushX = start.x < this._viewportMargin ? (viewport.left - scrollPosition.left) - start.x : 0;\n }\n if (overlay.height <= viewport.height) {\n pushY = overflowTop || -overflowBottom;\n }\n else {\n pushY = start.y < this._viewportMargin ? (viewport.top - scrollPosition.top) - start.y : 0;\n }\n this._previousPushAmount = { x: pushX, y: pushY };\n return {\n x: start.x + pushX,\n y: start.y + pushY,\n };\n }\n /**\n * Applies a computed position to the overlay and emits a position change.\n * @param position The position preference\n * @param originPoint The point on the origin element where the overlay is connected.\n */\n _applyPosition(position, originPoint) {\n this._setTransformOrigin(position);\n this._setOverlayElementStyles(originPoint, position);\n this._setBoundingBoxStyles(originPoint, position);\n if (position.panelClass) {\n this._addPanelClasses(position.panelClass);\n }\n // Save the last connected position in case the position needs to be re-calculated.\n this._lastPosition = position;\n // Notify that the position has been changed along with its change properties.\n // We only emit if we've got any subscriptions, because the scroll visibility\n // calculcations can be somewhat expensive.\n if (this._positionChanges.observers.length) {\n const scrollableViewProperties = this._getScrollVisibility();\n const changeEvent = new ConnectedOverlayPositionChange(position, scrollableViewProperties);\n this._positionChanges.next(changeEvent);\n }\n this._isInitialRender = false;\n }\n /** Sets the transform origin based on the configured selector and the passed-in position. */\n _setTransformOrigin(position) {\n if (!this._transformOriginSelector) {\n return;\n }\n const elements = this._boundingBox.querySelectorAll(this._transformOriginSelector);\n let xOrigin;\n let yOrigin = position.overlayY;\n if (position.overlayX === 'center') {\n xOrigin = 'center';\n }\n else if (this._isRtl()) {\n xOrigin = position.overlayX === 'start' ? 'right' : 'left';\n }\n else {\n xOrigin = position.overlayX === 'start' ? 'left' : 'right';\n }\n for (let i = 0; i < elements.length; i++) {\n elements[i].style.transformOrigin = `${xOrigin} ${yOrigin}`;\n }\n }\n /**\n * Gets the position and size of the overlay's sizing container.\n *\n * This method does no measuring and applies no styles so that we can cheaply compute the\n * bounds for all positions and choose the best fit based on these results.\n */\n _calculateBoundingBoxRect(origin, position) {\n const viewport = this._viewportRect;\n const isRtl = this._isRtl();\n let height, top, bottom;\n if (position.overlayY === 'top') {\n // Overlay is opening \"downward\" and thus is bound by the bottom viewport edge.\n top = origin.y;\n height = viewport.height - top + this._viewportMargin;\n }\n else if (position.overlayY === 'bottom') {\n // Overlay is opening \"upward\" and thus is bound by the top viewport edge. We need to add\n // the viewport margin back in, because the viewport rect is narrowed down to remove the\n // margin, whereas the `origin` position is calculated based on its `ClientRect`.\n bottom = viewport.height - origin.y + this._viewportMargin * 2;\n height = viewport.height - bottom + this._viewportMargin;\n }\n else {\n // If neither top nor bottom, it means that the overlay is vertically centered on the\n // origin point. Note that we want the position relative to the viewport, rather than\n // the page, which is why we don't use something like `viewport.bottom - origin.y` and\n // `origin.y - viewport.top`.\n const smallestDistanceToViewportEdge = Math.min(viewport.bottom - origin.y + viewport.top, origin.y);\n const previousHeight = this._lastBoundingBoxSize.height;\n height = smallestDistanceToViewportEdge * 2;\n top = origin.y - smallestDistanceToViewportEdge;\n if (height > previousHeight && !this._isInitialRender && !this._growAfterOpen) {\n top = origin.y - (previousHeight / 2);\n }\n }\n // The overlay is opening 'right-ward' (the content flows to the right).\n const isBoundedByRightViewportEdge = (position.overlayX === 'start' && !isRtl) ||\n (position.overlayX === 'end' && isRtl);\n // The overlay is opening 'left-ward' (the content flows to the left).\n const isBoundedByLeftViewportEdge = (position.overlayX === 'end' && !isRtl) ||\n (position.overlayX === 'start' && isRtl);\n let width, left, right;\n if (isBoundedByLeftViewportEdge) {\n right = viewport.width - origin.x + this._viewportMargin;\n width = origin.x - this._viewportMargin;\n }\n else if (isBoundedByRightViewportEdge) {\n left = origin.x;\n width = viewport.right - origin.x;\n }\n else {\n // If neither start nor end, it means that the overlay is horizontally centered on the\n // origin point. Note that we want the position relative to the viewport, rather than\n // the page, which is why we don't use something like `viewport.right - origin.x` and\n // `origin.x - viewport.left`.\n const smallestDistanceToViewportEdge = Math.min(viewport.right - origin.x + viewport.left, origin.x);\n const previousWidth = this._lastBoundingBoxSize.width;\n width = smallestDistanceToViewportEdge * 2;\n left = origin.x - smallestDistanceToViewportEdge;\n if (width > previousWidth && !this._isInitialRender && !this._growAfterOpen) {\n left = origin.x - (previousWidth / 2);\n }\n }\n return { top: top, left: left, bottom: bottom, right: right, width, height };\n }\n /**\n * Sets the position and size of the overlay's sizing wrapper. The wrapper is positioned on the\n * origin's connection point and stetches to the bounds of the viewport.\n *\n * @param origin The point on the origin element where the overlay is connected.\n * @param position The position preference\n */\n _setBoundingBoxStyles(origin, position) {\n const boundingBoxRect = this._calculateBoundingBoxRect(origin, position);\n // It's weird if the overlay *grows* while scrolling, so we take the last size into account\n // when applying a new size.\n if (!this._isInitialRender && !this._growAfterOpen) {\n boundingBoxRect.height = Math.min(boundingBoxRect.height, this._lastBoundingBoxSize.height);\n boundingBoxRect.width = Math.min(boundingBoxRect.width, this._lastBoundingBoxSize.width);\n }\n const styles = {};\n if (this._hasExactPosition()) {\n styles.top = styles.left = '0';\n styles.bottom = styles.right = styles.maxHeight = styles.maxWidth = '';\n styles.width = styles.height = '100%';\n }\n else {\n const maxHeight = this._overlayRef.getConfig().maxHeight;\n const maxWidth = this._overlayRef.getConfig().maxWidth;\n styles.height = coerceCssPixelValue(boundingBoxRect.height);\n styles.top = coerceCssPixelValue(boundingBoxRect.top);\n styles.bottom = coerceCssPixelValue(boundingBoxRect.bottom);\n styles.width = coerceCssPixelValue(boundingBoxRect.width);\n styles.left = coerceCssPixelValue(boundingBoxRect.left);\n styles.right = coerceCssPixelValue(boundingBoxRect.right);\n // Push the pane content towards the proper direction.\n if (position.overlayX === 'center') {\n styles.alignItems = 'center';\n }\n else {\n styles.alignItems = position.overlayX === 'end' ? 'flex-end' : 'flex-start';\n }\n if (position.overlayY === 'center') {\n styles.justifyContent = 'center';\n }\n else {\n styles.justifyContent = position.overlayY === 'bottom' ? 'flex-end' : 'flex-start';\n }\n if (maxHeight) {\n styles.maxHeight = coerceCssPixelValue(maxHeight);\n }\n if (maxWidth) {\n styles.maxWidth = coerceCssPixelValue(maxWidth);\n }\n }\n this._lastBoundingBoxSize = boundingBoxRect;\n extendStyles(this._boundingBox.style, styles);\n }\n /** Resets the styles for the bounding box so that a new positioning can be computed. */\n _resetBoundingBoxStyles() {\n extendStyles(this._boundingBox.style, {\n top: '0',\n left: '0',\n right: '0',\n bottom: '0',\n height: '',\n width: '',\n alignItems: '',\n justifyContent: '',\n });\n }\n /** Resets the styles for the overlay pane so that a new positioning can be computed. */\n _resetOverlayElementStyles() {\n extendStyles(this._pane.style, {\n top: '',\n left: '',\n bottom: '',\n right: '',\n position: '',\n transform: '',\n });\n }\n /** Sets positioning styles to the overlay element. */\n _setOverlayElementStyles(originPoint, position) {\n const styles = {};\n const hasExactPosition = this._hasExactPosition();\n const hasFlexibleDimensions = this._hasFlexibleDimensions;\n const config = this._overlayRef.getConfig();\n if (hasExactPosition) {\n const scrollPosition = this._viewportRuler.getViewportScrollPosition();\n extendStyles(styles, this._getExactOverlayY(position, originPoint, scrollPosition));\n extendStyles(styles, this._getExactOverlayX(position, originPoint, scrollPosition));\n }\n else {\n styles.position = 'static';\n }\n // Use a transform to apply the offsets. We do this because the `center` positions rely on\n // being in the normal flex flow and setting a `top` / `left` at all will completely throw\n // off the position. We also can't use margins, because they won't have an effect in some\n // cases where the element doesn't have anything to \"push off of\". Finally, this works\n // better both with flexible and non-flexible positioning.\n let transformString = '';\n let offsetX = this._getOffset(position, 'x');\n let offsetY = this._getOffset(position, 'y');\n if (offsetX) {\n transformString += `translateX(${offsetX}px) `;\n }\n if (offsetY) {\n transformString += `translateY(${offsetY}px)`;\n }\n styles.transform = transformString.trim();\n // If a maxWidth or maxHeight is specified on the overlay, we remove them. We do this because\n // we need these values to both be set to \"100%\" for the automatic flexible sizing to work.\n // The maxHeight and maxWidth are set on the boundingBox in order to enforce the constraint.\n // Note that this doesn't apply when we have an exact position, in which case we do want to\n // apply them because they'll be cleared from the bounding box.\n if (config.maxHeight) {\n if (hasExactPosition) {\n styles.maxHeight = coerceCssPixelValue(config.maxHeight);\n }\n else if (hasFlexibleDimensions) {\n styles.maxHeight = '';\n }\n }\n if (config.maxWidth) {\n if (hasExactPosition) {\n styles.maxWidth = coerceCssPixelValue(config.maxWidth);\n }\n else if (hasFlexibleDimensions) {\n styles.maxWidth = '';\n }\n }\n extendStyles(this._pane.style, styles);\n }\n /** Gets the exact top/bottom for the overlay when not using flexible sizing or when pushing. */\n _getExactOverlayY(position, originPoint, scrollPosition) {\n // Reset any existing styles. This is necessary in case the\n // preferred position has changed since the last `apply`.\n let styles = { top: '', bottom: '' };\n let overlayPoint = this._getOverlayPoint(originPoint, this._overlayRect, position);\n if (this._isPushed) {\n overlayPoint = this._pushOverlayOnScreen(overlayPoint, this._overlayRect, scrollPosition);\n }\n let virtualKeyboardOffset = this._overlayContainer.getContainerElement().getBoundingClientRect().top;\n // Normally this would be zero, however when the overlay is attached to an input (e.g. in an\n // autocomplete), mobile browsers will shift everything in order to put the input in the middle\n // of the screen and to make space for the virtual keyboard. We need to account for this offset,\n // otherwise our positioning will be thrown off.\n overlayPoint.y -= virtualKeyboardOffset;\n // We want to set either `top` or `bottom` based on whether the overlay wants to appear\n // above or below the origin and the direction in which the element will expand.\n if (position.overlayY === 'bottom') {\n // When using `bottom`, we adjust the y position such that it is the distance\n // from the bottom of the viewport rather than the top.\n const documentHeight = this._document.documentElement.clientHeight;\n styles.bottom = `${documentHeight - (overlayPoint.y + this._overlayRect.height)}px`;\n }\n else {\n styles.top = coerceCssPixelValue(overlayPoint.y);\n }\n return styles;\n }\n /** Gets the exact left/right for the overlay when not using flexible sizing or when pushing. */\n _getExactOverlayX(position, originPoint, scrollPosition) {\n // Reset any existing styles. This is necessary in case the preferred position has\n // changed since the last `apply`.\n let styles = { left: '', right: '' };\n let overlayPoint = this._getOverlayPoint(originPoint, this._overlayRect, position);\n if (this._isPushed) {\n overlayPoint = this._pushOverlayOnScreen(overlayPoint, this._overlayRect, scrollPosition);\n }\n // We want to set either `left` or `right` based on whether the overlay wants to appear \"before\"\n // or \"after\" the origin, which determines the direction in which the element will expand.\n // For the horizontal axis, the meaning of \"before\" and \"after\" change based on whether the\n // page is in RTL or LTR.\n let horizontalStyleProperty;\n if (this._isRtl()) {\n horizontalStyleProperty = position.overlayX === 'end' ? 'left' : 'right';\n }\n else {\n horizontalStyleProperty = position.overlayX === 'end' ? 'right' : 'left';\n }\n // When we're setting `right`, we adjust the x position such that it is the distance\n // from the right edge of the viewport rather than the left edge.\n if (horizontalStyleProperty === 'right') {\n const documentWidth = this._document.documentElement.clientWidth;\n styles.right = `${documentWidth - (overlayPoint.x + this._overlayRect.width)}px`;\n }\n else {\n styles.left = coerceCssPixelValue(overlayPoint.x);\n }\n return styles;\n }\n /**\n * Gets the view properties of the trigger and overlay, including whether they are clipped\n * or completely outside the view of any of the strategy's scrollables.\n */\n _getScrollVisibility() {\n // Note: needs fresh rects since the position could've changed.\n const originBounds = this._getOriginRect();\n const overlayBounds = this._pane.getBoundingClientRect();\n // TODO(jelbourn): instead of needing all of the client rects for these scrolling containers\n // every time, we should be able to use the scrollTop of the containers if the size of those\n // containers hasn't changed.\n const scrollContainerBounds = this._scrollables.map(scrollable => {\n return scrollable.getElementRef().nativeElement.getBoundingClientRect();\n });\n return {\n isOriginClipped: isElementClippedByScrolling(originBounds, scrollContainerBounds),\n isOriginOutsideView: isElementScrolledOutsideView(originBounds, scrollContainerBounds),\n isOverlayClipped: isElementClippedByScrolling(overlayBounds, scrollContainerBounds),\n isOverlayOutsideView: isElementScrolledOutsideView(overlayBounds, scrollContainerBounds),\n };\n }\n /** Subtracts the amount that an element is overflowing on an axis from its length. */\n _subtractOverflows(length, ...overflows) {\n return overflows.reduce((currentValue, currentOverflow) => {\n return currentValue - Math.max(currentOverflow, 0);\n }, length);\n }\n /** Narrows the given viewport rect by the current _viewportMargin. */\n _getNarrowedViewportRect() {\n // We recalculate the viewport rect here ourselves, rather than using the ViewportRuler,\n // because we want to use the `clientWidth` and `clientHeight` as the base. The difference\n // being that the client properties don't include the scrollbar, as opposed to `innerWidth`\n // and `innerHeight` that do. This is necessary, because the overlay container uses\n // 100% `width` and `height` which don't include the scrollbar either.\n const width = this._document.documentElement.clientWidth;\n const height = this._document.documentElement.clientHeight;\n const scrollPosition = this._viewportRuler.getViewportScrollPosition();\n return {\n top: scrollPosition.top + this._viewportMargin,\n left: scrollPosition.left + this._viewportMargin,\n right: scrollPosition.left + width - this._viewportMargin,\n bottom: scrollPosition.top + height - this._viewportMargin,\n width: width - (2 * this._viewportMargin),\n height: height - (2 * this._viewportMargin),\n };\n }\n /** Whether the we're dealing with an RTL context */\n _isRtl() {\n return this._overlayRef.getDirection() === 'rtl';\n }\n /** Determines whether the overlay uses exact or flexible positioning. */\n _hasExactPosition() {\n return !this._hasFlexibleDimensions || this._isPushed;\n }\n /** Retrieves the offset of a position along the x or y axis. */\n _getOffset(position, axis) {\n if (axis === 'x') {\n // We don't do something like `position['offset' + axis]` in\n // order to avoid breking minifiers that rename properties.\n return position.offsetX == null ? this._offsetX : position.offsetX;\n }\n return position.offsetY == null ? this._offsetY : position.offsetY;\n }\n /** Validates that the current position match the expected values. */\n _validatePositions() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!this._preferredPositions.length) {\n throw Error('FlexibleConnectedPositionStrategy: At least one position is required.');\n }\n // TODO(crisbeto): remove these once Angular's template type\n // checking is advanced enough to catch these cases.\n this._preferredPositions.forEach(pair => {\n validateHorizontalPosition('originX', pair.originX);\n validateVerticalPosition('originY', pair.originY);\n validateHorizontalPosition('overlayX', pair.overlayX);\n validateVerticalPosition('overlayY', pair.overlayY);\n });\n }\n }\n /** Adds a single CSS class or an array of classes on the overlay panel. */\n _addPanelClasses(cssClasses) {\n if (this._pane) {\n coerceArray(cssClasses).forEach(cssClass => {\n if (cssClass !== '' && this._appliedPanelClasses.indexOf(cssClass) === -1) {\n this._appliedPanelClasses.push(cssClass);\n this._pane.classList.add(cssClass);\n }\n });\n }\n }\n /** Clears the classes that the position strategy has applied from the overlay panel. */\n _clearPanelClasses() {\n if (this._pane) {\n this._appliedPanelClasses.forEach(cssClass => {\n this._pane.classList.remove(cssClass);\n });\n this._appliedPanelClasses = [];\n }\n }\n /** Returns the ClientRect of the current origin. */\n _getOriginRect() {\n const origin = this._origin;\n if (origin instanceof ElementRef) {\n return origin.nativeElement.getBoundingClientRect();\n }\n // Check for Element so SVG elements are also supported.\n if (origin instanceof Element) {\n return origin.getBoundingClientRect();\n }\n const width = origin.width || 0;\n const height = origin.height || 0;\n // If the origin is a point, return a client rect as if it was a 0x0 element at the point.\n return {\n top: origin.y,\n bottom: origin.y + height,\n left: origin.x,\n right: origin.x + width,\n height,\n width\n };\n }\n}\n/** Shallow-extends a stylesheet object with another stylesheet object. */\nfunction extendStyles(destination, source) {\n for (let key in source) {\n if (source.hasOwnProperty(key)) {\n destination[key] = source[key];\n }\n }\n return destination;\n}\n/**\n * Extracts the pixel value as a number from a value, if it's a number\n * or a CSS pixel string (e.g. `1337px`). Otherwise returns null.\n */\nfunction getPixelValue(input) {\n if (typeof input !== 'number' && input != null) {\n const [value, units] = input.split(cssUnitPattern);\n return (!units || units === 'px') ? parseFloat(value) : null;\n }\n return input || null;\n}\n/**\n * Gets a version of an element's bounding `ClientRect` where all the values are rounded down to\n * the nearest pixel. This allows us to account for the cases where there may be sub-pixel\n * deviations in the `ClientRect` returned by the browser (e.g. when zoomed in with a percentage\n * size, see #21350).\n */\nfunction getRoundedBoundingClientRect(clientRect) {\n return {\n top: Math.floor(clientRect.top),\n right: Math.floor(clientRect.right),\n bottom: Math.floor(clientRect.bottom),\n left: Math.floor(clientRect.left),\n width: Math.floor(clientRect.width),\n height: Math.floor(clientRect.height)\n };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Class to be added to the overlay pane wrapper. */\nconst wrapperClass = 'cdk-global-overlay-wrapper';\n/**\n * A strategy for positioning overlays. Using this strategy, an overlay is given an\n * explicit position relative to the browser's viewport. We use flexbox, instead of\n * transforms, in order to avoid issues with subpixel rendering which can cause the\n * element to become blurry.\n */\nclass GlobalPositionStrategy {\n constructor() {\n this._cssPosition = 'static';\n this._topOffset = '';\n this._bottomOffset = '';\n this._leftOffset = '';\n this._rightOffset = '';\n this._alignItems = '';\n this._justifyContent = '';\n this._width = '';\n this._height = '';\n }\n attach(overlayRef) {\n const config = overlayRef.getConfig();\n this._overlayRef = overlayRef;\n if (this._width && !config.width) {\n overlayRef.updateSize({ width: this._width });\n }\n if (this._height && !config.height) {\n overlayRef.updateSize({ height: this._height });\n }\n overlayRef.hostElement.classList.add(wrapperClass);\n this._isDisposed = false;\n }\n /**\n * Sets the top position of the overlay. Clears any previously set vertical position.\n * @param value New top offset.\n */\n top(value = '') {\n this._bottomOffset = '';\n this._topOffset = value;\n this._alignItems = 'flex-start';\n return this;\n }\n /**\n * Sets the left position of the overlay. Clears any previously set horizontal position.\n * @param value New left offset.\n */\n left(value = '') {\n this._rightOffset = '';\n this._leftOffset = value;\n this._justifyContent = 'flex-start';\n return this;\n }\n /**\n * Sets the bottom position of the overlay. Clears any previously set vertical position.\n * @param value New bottom offset.\n */\n bottom(value = '') {\n this._topOffset = '';\n this._bottomOffset = value;\n this._alignItems = 'flex-end';\n return this;\n }\n /**\n * Sets the right position of the overlay. Clears any previously set horizontal position.\n * @param value New right offset.\n */\n right(value = '') {\n this._leftOffset = '';\n this._rightOffset = value;\n this._justifyContent = 'flex-end';\n return this;\n }\n /**\n * Sets the overlay width and clears any previously set width.\n * @param value New width for the overlay\n * @deprecated Pass the `width` through the `OverlayConfig`.\n * @breaking-change 8.0.0\n */\n width(value = '') {\n if (this._overlayRef) {\n this._overlayRef.updateSize({ width: value });\n }\n else {\n this._width = value;\n }\n return this;\n }\n /**\n * Sets the overlay height and clears any previously set height.\n * @param value New height for the overlay\n * @deprecated Pass the `height` through the `OverlayConfig`.\n * @breaking-change 8.0.0\n */\n height(value = '') {\n if (this._overlayRef) {\n this._overlayRef.updateSize({ height: value });\n }\n else {\n this._height = value;\n }\n return this;\n }\n /**\n * Centers the overlay horizontally with an optional offset.\n * Clears any previously set horizontal position.\n *\n * @param offset Overlay offset from the horizontal center.\n */\n centerHorizontally(offset = '') {\n this.left(offset);\n this._justifyContent = 'center';\n return this;\n }\n /**\n * Centers the overlay vertically with an optional offset.\n * Clears any previously set vertical position.\n *\n * @param offset Overlay offset from the vertical center.\n */\n centerVertically(offset = '') {\n this.top(offset);\n this._alignItems = 'center';\n return this;\n }\n /**\n * Apply the position to the element.\n * @docs-private\n */\n apply() {\n // Since the overlay ref applies the strategy asynchronously, it could\n // have been disposed before it ends up being applied. If that is the\n // case, we shouldn't do anything.\n if (!this._overlayRef || !this._overlayRef.hasAttached()) {\n return;\n }\n const styles = this._overlayRef.overlayElement.style;\n const parentStyles = this._overlayRef.hostElement.style;\n const config = this._overlayRef.getConfig();\n const { width, height, maxWidth, maxHeight } = config;\n const shouldBeFlushHorizontally = (width === '100%' || width === '100vw') &&\n (!maxWidth || maxWidth === '100%' || maxWidth === '100vw');\n const shouldBeFlushVertically = (height === '100%' || height === '100vh') &&\n (!maxHeight || maxHeight === '100%' || maxHeight === '100vh');\n styles.position = this._cssPosition;\n styles.marginLeft = shouldBeFlushHorizontally ? '0' : this._leftOffset;\n styles.marginTop = shouldBeFlushVertically ? '0' : this._topOffset;\n styles.marginBottom = this._bottomOffset;\n styles.marginRight = this._rightOffset;\n if (shouldBeFlushHorizontally) {\n parentStyles.justifyContent = 'flex-start';\n }\n else if (this._justifyContent === 'center') {\n parentStyles.justifyContent = 'center';\n }\n else if (this._overlayRef.getConfig().direction === 'rtl') {\n // In RTL the browser will invert `flex-start` and `flex-end` automatically, but we\n // don't want that because our positioning is explicitly `left` and `right`, hence\n // why we do another inversion to ensure that the overlay stays in the same position.\n // TODO: reconsider this if we add `start` and `end` methods.\n if (this._justifyContent === 'flex-start') {\n parentStyles.justifyContent = 'flex-end';\n }\n else if (this._justifyContent === 'flex-end') {\n parentStyles.justifyContent = 'flex-start';\n }\n }\n else {\n parentStyles.justifyContent = this._justifyContent;\n }\n parentStyles.alignItems = shouldBeFlushVertically ? 'flex-start' : this._alignItems;\n }\n /**\n * Cleans up the DOM changes from the position strategy.\n * @docs-private\n */\n dispose() {\n if (this._isDisposed || !this._overlayRef) {\n return;\n }\n const styles = this._overlayRef.overlayElement.style;\n const parent = this._overlayRef.hostElement;\n const parentStyles = parent.style;\n parent.classList.remove(wrapperClass);\n parentStyles.justifyContent = parentStyles.alignItems = styles.marginTop =\n styles.marginBottom = styles.marginLeft = styles.marginRight = styles.position = '';\n this._overlayRef = null;\n this._isDisposed = true;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Builder for overlay position strategy. */\nclass OverlayPositionBuilder {\n constructor(_viewportRuler, _document, _platform, _overlayContainer) {\n this._viewportRuler = _viewportRuler;\n this._document = _document;\n this._platform = _platform;\n this._overlayContainer = _overlayContainer;\n }\n /**\n * Creates a global position strategy.\n */\n global() {\n return new GlobalPositionStrategy();\n }\n /**\n * Creates a flexible position strategy.\n * @param origin Origin relative to which to position the overlay.\n */\n flexibleConnectedTo(origin) {\n return new FlexibleConnectedPositionStrategy(origin, this._viewportRuler, this._document, this._platform, this._overlayContainer);\n }\n}\nOverlayPositionBuilder.ɵfac = function OverlayPositionBuilder_Factory(t) { return new (t || OverlayPositionBuilder)(ɵngcc0.ɵɵinject(ɵngcc1.ViewportRuler), ɵngcc0.ɵɵinject(DOCUMENT), ɵngcc0.ɵɵinject(ɵngcc2.Platform), ɵngcc0.ɵɵinject(OverlayContainer)); };\nOverlayPositionBuilder.ɵprov = i0.ɵɵdefineInjectable({ factory: function OverlayPositionBuilder_Factory() { return new OverlayPositionBuilder(i0.ɵɵinject(i1.ViewportRuler), i0.ɵɵinject(i1$1.DOCUMENT), i0.ɵɵinject(i2.Platform), i0.ɵɵinject(OverlayContainer)); }, token: OverlayPositionBuilder, providedIn: \"root\" });\nOverlayPositionBuilder.ctorParameters = () => [\n { type: ViewportRuler },\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },\n { type: Platform },\n { type: OverlayContainer }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(OverlayPositionBuilder, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return [{ type: ɵngcc1.ViewportRuler }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: ɵngcc2.Platform }, { type: OverlayContainer }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Next overlay unique ID. */\nlet nextUniqueId = 0;\n// Note that Overlay is *not* scoped to the app root because of the ComponentFactoryResolver\n// which needs to be different depending on where OverlayModule is imported.\n/**\n * Service to create Overlays. Overlays are dynamically added pieces of floating UI, meant to be\n * used as a low-level building block for other components. Dialogs, tooltips, menus,\n * selects, etc. can all be built using overlays. The service should primarily be used by authors\n * of re-usable components rather than developers building end-user applications.\n *\n * An overlay *is* a PortalOutlet, so any kind of Portal can be loaded into one.\n */\nclass Overlay {\n constructor(\n /** Scrolling strategies that can be used when creating an overlay. */\n scrollStrategies, _overlayContainer, _componentFactoryResolver, _positionBuilder, _keyboardDispatcher, _injector, _ngZone, _document, _directionality, _location, _outsideClickDispatcher) {\n this.scrollStrategies = scrollStrategies;\n this._overlayContainer = _overlayContainer;\n this._componentFactoryResolver = _componentFactoryResolver;\n this._positionBuilder = _positionBuilder;\n this._keyboardDispatcher = _keyboardDispatcher;\n this._injector = _injector;\n this._ngZone = _ngZone;\n this._document = _document;\n this._directionality = _directionality;\n this._location = _location;\n this._outsideClickDispatcher = _outsideClickDispatcher;\n }\n /**\n * Creates an overlay.\n * @param config Configuration applied to the overlay.\n * @returns Reference to the created overlay.\n */\n create(config) {\n const host = this._createHostElement();\n const pane = this._createPaneElement(host);\n const portalOutlet = this._createPortalOutlet(pane);\n const overlayConfig = new OverlayConfig(config);\n overlayConfig.direction = overlayConfig.direction || this._directionality.value;\n return new OverlayRef(portalOutlet, host, pane, overlayConfig, this._ngZone, this._keyboardDispatcher, this._document, this._location, this._outsideClickDispatcher);\n }\n /**\n * Gets a position builder that can be used, via fluent API,\n * to construct and configure a position strategy.\n * @returns An overlay position builder.\n */\n position() {\n return this._positionBuilder;\n }\n /**\n * Creates the DOM element for an overlay and appends it to the overlay container.\n * @returns Newly-created pane element\n */\n _createPaneElement(host) {\n const pane = this._document.createElement('div');\n pane.id = `cdk-overlay-${nextUniqueId++}`;\n pane.classList.add('cdk-overlay-pane');\n host.appendChild(pane);\n return pane;\n }\n /**\n * Creates the host element that wraps around an overlay\n * and can be used for advanced positioning.\n * @returns Newly-create host element.\n */\n _createHostElement() {\n const host = this._document.createElement('div');\n this._overlayContainer.getContainerElement().appendChild(host);\n return host;\n }\n /**\n * Create a DomPortalOutlet into which the overlay content can be loaded.\n * @param pane The DOM element to turn into a portal outlet.\n * @returns A portal outlet for the given DOM element.\n */\n _createPortalOutlet(pane) {\n // We have to resolve the ApplicationRef later in order to allow people\n // to use overlay-based providers during app initialization.\n if (!this._appRef) {\n this._appRef = this._injector.get(ApplicationRef);\n }\n return new DomPortalOutlet(pane, this._componentFactoryResolver, this._appRef, this._injector, this._document);\n }\n}\nOverlay.ɵfac = function Overlay_Factory(t) { return new (t || Overlay)(ɵngcc0.ɵɵinject(ScrollStrategyOptions), ɵngcc0.ɵɵinject(OverlayContainer), ɵngcc0.ɵɵinject(ɵngcc0.ComponentFactoryResolver), ɵngcc0.ɵɵinject(OverlayPositionBuilder), ɵngcc0.ɵɵinject(OverlayKeyboardDispatcher), ɵngcc0.ɵɵinject(ɵngcc0.Injector), ɵngcc0.ɵɵinject(ɵngcc0.NgZone), ɵngcc0.ɵɵinject(DOCUMENT), ɵngcc0.ɵɵinject(ɵngcc3.Directionality), ɵngcc0.ɵɵinject(ɵngcc4.Location), ɵngcc0.ɵɵinject(OverlayOutsideClickDispatcher)); };\nOverlay.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: Overlay, factory: Overlay.ɵfac });\nOverlay.ctorParameters = () => [\n { type: ScrollStrategyOptions },\n { type: OverlayContainer },\n { type: ComponentFactoryResolver },\n { type: OverlayPositionBuilder },\n { type: OverlayKeyboardDispatcher },\n { type: Injector },\n { type: NgZone },\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },\n { type: Directionality },\n { type: Location },\n { type: OverlayOutsideClickDispatcher }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(Overlay, [{\n type: Injectable\n }], function () { return [{ type: ScrollStrategyOptions }, { type: OverlayContainer }, { type: ɵngcc0.ComponentFactoryResolver }, { type: OverlayPositionBuilder }, { type: OverlayKeyboardDispatcher }, { type: ɵngcc0.Injector }, { type: ɵngcc0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: ɵngcc3.Directionality }, { type: ɵngcc4.Location }, { type: OverlayOutsideClickDispatcher }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Default set of positions for the overlay. Follows the behavior of a dropdown. */\nconst defaultPositionList = [\n {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top'\n },\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom'\n },\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom'\n },\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top'\n }\n];\n/** Injection token that determines the scroll handling while the connected overlay is open. */\nconst CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY = new InjectionToken('cdk-connected-overlay-scroll-strategy');\n/**\n * Directive applied to an element to make it usable as an origin for an Overlay using a\n * ConnectedPositionStrategy.\n */\nclass CdkOverlayOrigin {\n constructor(\n /** Reference to the element on which the directive is applied. */\n elementRef) {\n this.elementRef = elementRef;\n }\n}\nCdkOverlayOrigin.ɵfac = function CdkOverlayOrigin_Factory(t) { return new (t || CdkOverlayOrigin)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };\nCdkOverlayOrigin.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: CdkOverlayOrigin, selectors: [[\"\", \"cdk-overlay-origin\", \"\"], [\"\", \"overlay-origin\", \"\"], [\"\", \"cdkOverlayOrigin\", \"\"]], exportAs: [\"cdkOverlayOrigin\"] });\nCdkOverlayOrigin.ctorParameters = () => [\n { type: ElementRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(CdkOverlayOrigin, [{\n type: Directive,\n args: [{\n selector: '[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]',\n exportAs: 'cdkOverlayOrigin'\n }]\n }], function () { return [{ type: ɵngcc0.ElementRef }]; }, null); })();\n/**\n * Directive to facilitate declarative creation of an\n * Overlay using a FlexibleConnectedPositionStrategy.\n */\nclass CdkConnectedOverlay {\n // TODO(jelbourn): inputs for size, scroll behavior, animation, etc.\n constructor(_overlay, templateRef, viewContainerRef, scrollStrategyFactory, _dir) {\n this._overlay = _overlay;\n this._dir = _dir;\n this._hasBackdrop = false;\n this._lockPosition = false;\n this._growAfterOpen = false;\n this._flexibleDimensions = false;\n this._push = false;\n this._backdropSubscription = Subscription.EMPTY;\n this._attachSubscription = Subscription.EMPTY;\n this._detachSubscription = Subscription.EMPTY;\n this._positionSubscription = Subscription.EMPTY;\n /** Margin between the overlay and the viewport edges. */\n this.viewportMargin = 0;\n /** Whether the overlay is open. */\n this.open = false;\n /** Whether the overlay can be closed by user interaction. */\n this.disableClose = false;\n /** Event emitted when the backdrop is clicked. */\n this.backdropClick = new EventEmitter();\n /** Event emitted when the position has changed. */\n this.positionChange = new EventEmitter();\n /** Event emitted when the overlay has been attached. */\n this.attach = new EventEmitter();\n /** Event emitted when the overlay has been detached. */\n this.detach = new EventEmitter();\n /** Emits when there are keyboard events that are targeted at the overlay. */\n this.overlayKeydown = new EventEmitter();\n /** Emits when there are mouse outside click events that are targeted at the overlay. */\n this.overlayOutsideClick = new EventEmitter();\n this._templatePortal = new TemplatePortal(templateRef, viewContainerRef);\n this._scrollStrategyFactory = scrollStrategyFactory;\n this.scrollStrategy = this._scrollStrategyFactory();\n }\n /** The offset in pixels for the overlay connection point on the x-axis */\n get offsetX() { return this._offsetX; }\n set offsetX(offsetX) {\n this._offsetX = offsetX;\n if (this._position) {\n this._updatePositionStrategy(this._position);\n }\n }\n /** The offset in pixels for the overlay connection point on the y-axis */\n get offsetY() { return this._offsetY; }\n set offsetY(offsetY) {\n this._offsetY = offsetY;\n if (this._position) {\n this._updatePositionStrategy(this._position);\n }\n }\n /** Whether or not the overlay should attach a backdrop. */\n get hasBackdrop() { return this._hasBackdrop; }\n set hasBackdrop(value) { this._hasBackdrop = coerceBooleanProperty(value); }\n /** Whether or not the overlay should be locked when scrolling. */\n get lockPosition() { return this._lockPosition; }\n set lockPosition(value) { this._lockPosition = coerceBooleanProperty(value); }\n /** Whether the overlay's width and height can be constrained to fit within the viewport. */\n get flexibleDimensions() { return this._flexibleDimensions; }\n set flexibleDimensions(value) {\n this._flexibleDimensions = coerceBooleanProperty(value);\n }\n /** Whether the overlay can grow after the initial open when flexible positioning is turned on. */\n get growAfterOpen() { return this._growAfterOpen; }\n set growAfterOpen(value) { this._growAfterOpen = coerceBooleanProperty(value); }\n /** Whether the overlay can be pushed on-screen if none of the provided positions fit. */\n get push() { return this._push; }\n set push(value) { this._push = coerceBooleanProperty(value); }\n /** The associated overlay reference. */\n get overlayRef() {\n return this._overlayRef;\n }\n /** The element's layout direction. */\n get dir() {\n return this._dir ? this._dir.value : 'ltr';\n }\n ngOnDestroy() {\n this._attachSubscription.unsubscribe();\n this._detachSubscription.unsubscribe();\n this._backdropSubscription.unsubscribe();\n this._positionSubscription.unsubscribe();\n if (this._overlayRef) {\n this._overlayRef.dispose();\n }\n }\n ngOnChanges(changes) {\n if (this._position) {\n this._updatePositionStrategy(this._position);\n this._overlayRef.updateSize({\n width: this.width,\n minWidth: this.minWidth,\n height: this.height,\n minHeight: this.minHeight,\n });\n if (changes['origin'] && this.open) {\n this._position.apply();\n }\n }\n if (changes['open']) {\n this.open ? this._attachOverlay() : this._detachOverlay();\n }\n }\n /** Creates an overlay */\n _createOverlay() {\n if (!this.positions || !this.positions.length) {\n this.positions = defaultPositionList;\n }\n const overlayRef = this._overlayRef = this._overlay.create(this._buildConfig());\n this._attachSubscription = overlayRef.attachments().subscribe(() => this.attach.emit());\n this._detachSubscription = overlayRef.detachments().subscribe(() => this.detach.emit());\n overlayRef.keydownEvents().subscribe((event) => {\n this.overlayKeydown.next(event);\n if (event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event)) {\n event.preventDefault();\n this._detachOverlay();\n }\n });\n this._overlayRef.outsidePointerEvents().subscribe((event) => {\n this.overlayOutsideClick.next(event);\n });\n }\n /** Builds the overlay config based on the directive's inputs */\n _buildConfig() {\n const positionStrategy = this._position =\n this.positionStrategy || this._createPositionStrategy();\n const overlayConfig = new OverlayConfig({\n direction: this._dir,\n positionStrategy,\n scrollStrategy: this.scrollStrategy,\n hasBackdrop: this.hasBackdrop\n });\n if (this.width || this.width === 0) {\n overlayConfig.width = this.width;\n }\n if (this.height || this.height === 0) {\n overlayConfig.height = this.height;\n }\n if (this.minWidth || this.minWidth === 0) {\n overlayConfig.minWidth = this.minWidth;\n }\n if (this.minHeight || this.minHeight === 0) {\n overlayConfig.minHeight = this.minHeight;\n }\n if (this.backdropClass) {\n overlayConfig.backdropClass = this.backdropClass;\n }\n if (this.panelClass) {\n overlayConfig.panelClass = this.panelClass;\n }\n return overlayConfig;\n }\n /** Updates the state of a position strategy, based on the values of the directive inputs. */\n _updatePositionStrategy(positionStrategy) {\n const positions = this.positions.map(currentPosition => ({\n originX: currentPosition.originX,\n originY: currentPosition.originY,\n overlayX: currentPosition.overlayX,\n overlayY: currentPosition.overlayY,\n offsetX: currentPosition.offsetX || this.offsetX,\n offsetY: currentPosition.offsetY || this.offsetY,\n panelClass: currentPosition.panelClass || undefined,\n }));\n return positionStrategy.setOrigin(this._getFlexibleConnectedPositionStrategyOrigin())\n .withPositions(positions)\n .withFlexibleDimensions(this.flexibleDimensions)\n .withPush(this.push)\n .withGrowAfterOpen(this.growAfterOpen)\n .withViewportMargin(this.viewportMargin)\n .withLockedPosition(this.lockPosition)\n .withTransformOriginOn(this.transformOriginSelector);\n }\n /** Returns the position strategy of the overlay to be set on the overlay config */\n _createPositionStrategy() {\n const strategy = this._overlay.position().flexibleConnectedTo(this._getFlexibleConnectedPositionStrategyOrigin());\n this._updatePositionStrategy(strategy);\n return strategy;\n }\n _getFlexibleConnectedPositionStrategyOrigin() {\n if (this.origin instanceof CdkOverlayOrigin) {\n return this.origin.elementRef;\n }\n else {\n return this.origin;\n }\n }\n /** Attaches the overlay and subscribes to backdrop clicks if backdrop exists */\n _attachOverlay() {\n if (!this._overlayRef) {\n this._createOverlay();\n }\n else {\n // Update the overlay size, in case the directive's inputs have changed\n this._overlayRef.getConfig().hasBackdrop = this.hasBackdrop;\n }\n if (!this._overlayRef.hasAttached()) {\n this._overlayRef.attach(this._templatePortal);\n }\n if (this.hasBackdrop) {\n this._backdropSubscription = this._overlayRef.backdropClick().subscribe(event => {\n this.backdropClick.emit(event);\n });\n }\n else {\n this._backdropSubscription.unsubscribe();\n }\n this._positionSubscription.unsubscribe();\n // Only subscribe to `positionChanges` if requested, because putting\n // together all the information for it can be expensive.\n if (this.positionChange.observers.length > 0) {\n this._positionSubscription = this._position.positionChanges\n .pipe(takeWhile(() => this.positionChange.observers.length > 0))\n .subscribe(position => {\n this.positionChange.emit(position);\n if (this.positionChange.observers.length === 0) {\n this._positionSubscription.unsubscribe();\n }\n });\n }\n }\n /** Detaches the overlay and unsubscribes to backdrop clicks if backdrop exists */\n _detachOverlay() {\n if (this._overlayRef) {\n this._overlayRef.detach();\n }\n this._backdropSubscription.unsubscribe();\n this._positionSubscription.unsubscribe();\n }\n}\nCdkConnectedOverlay.ɵfac = function CdkConnectedOverlay_Factory(t) { return new (t || CdkConnectedOverlay)(ɵngcc0.ɵɵdirectiveInject(Overlay), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY), ɵngcc0.ɵɵdirectiveInject(ɵngcc3.Directionality, 8)); };\nCdkConnectedOverlay.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: CdkConnectedOverlay, selectors: [[\"\", \"cdk-connected-overlay\", \"\"], [\"\", \"connected-overlay\", \"\"], [\"\", \"cdkConnectedOverlay\", \"\"]], inputs: { viewportMargin: [\"cdkConnectedOverlayViewportMargin\", \"viewportMargin\"], open: [\"cdkConnectedOverlayOpen\", \"open\"], disableClose: [\"cdkConnectedOverlayDisableClose\", \"disableClose\"], scrollStrategy: [\"cdkConnectedOverlayScrollStrategy\", \"scrollStrategy\"], offsetX: [\"cdkConnectedOverlayOffsetX\", \"offsetX\"], offsetY: [\"cdkConnectedOverlayOffsetY\", \"offsetY\"], hasBackdrop: [\"cdkConnectedOverlayHasBackdrop\", \"hasBackdrop\"], lockPosition: [\"cdkConnectedOverlayLockPosition\", \"lockPosition\"], flexibleDimensions: [\"cdkConnectedOverlayFlexibleDimensions\", \"flexibleDimensions\"], growAfterOpen: [\"cdkConnectedOverlayGrowAfterOpen\", \"growAfterOpen\"], push: [\"cdkConnectedOverlayPush\", \"push\"], positions: [\"cdkConnectedOverlayPositions\", \"positions\"], origin: [\"cdkConnectedOverlayOrigin\", \"origin\"], positionStrategy: [\"cdkConnectedOverlayPositionStrategy\", \"positionStrategy\"], width: [\"cdkConnectedOverlayWidth\", \"width\"], height: [\"cdkConnectedOverlayHeight\", \"height\"], minWidth: [\"cdkConnectedOverlayMinWidth\", \"minWidth\"], minHeight: [\"cdkConnectedOverlayMinHeight\", \"minHeight\"], backdropClass: [\"cdkConnectedOverlayBackdropClass\", \"backdropClass\"], panelClass: [\"cdkConnectedOverlayPanelClass\", \"panelClass\"], transformOriginSelector: [\"cdkConnectedOverlayTransformOriginOn\", \"transformOriginSelector\"] }, outputs: { backdropClick: \"backdropClick\", positionChange: \"positionChange\", attach: \"attach\", detach: \"detach\", overlayKeydown: \"overlayKeydown\", overlayOutsideClick: \"overlayOutsideClick\" }, exportAs: [\"cdkConnectedOverlay\"], features: [ɵngcc0.ɵɵNgOnChangesFeature] });\nCdkConnectedOverlay.ctorParameters = () => [\n { type: Overlay },\n { type: TemplateRef },\n { type: ViewContainerRef },\n { type: undefined, decorators: [{ type: Inject, args: [CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY,] }] },\n { type: Directionality, decorators: [{ type: Optional }] }\n];\nCdkConnectedOverlay.propDecorators = {\n origin: [{ type: Input, args: ['cdkConnectedOverlayOrigin',] }],\n positions: [{ type: Input, args: ['cdkConnectedOverlayPositions',] }],\n positionStrategy: [{ type: Input, args: ['cdkConnectedOverlayPositionStrategy',] }],\n offsetX: [{ type: Input, args: ['cdkConnectedOverlayOffsetX',] }],\n offsetY: [{ type: Input, args: ['cdkConnectedOverlayOffsetY',] }],\n width: [{ type: Input, args: ['cdkConnectedOverlayWidth',] }],\n height: [{ type: Input, args: ['cdkConnectedOverlayHeight',] }],\n minWidth: [{ type: Input, args: ['cdkConnectedOverlayMinWidth',] }],\n minHeight: [{ type: Input, args: ['cdkConnectedOverlayMinHeight',] }],\n backdropClass: [{ type: Input, args: ['cdkConnectedOverlayBackdropClass',] }],\n panelClass: [{ type: Input, args: ['cdkConnectedOverlayPanelClass',] }],\n viewportMargin: [{ type: Input, args: ['cdkConnectedOverlayViewportMargin',] }],\n scrollStrategy: [{ type: Input, args: ['cdkConnectedOverlayScrollStrategy',] }],\n open: [{ type: Input, args: ['cdkConnectedOverlayOpen',] }],\n disableClose: [{ type: Input, args: ['cdkConnectedOverlayDisableClose',] }],\n transformOriginSelector: [{ type: Input, args: ['cdkConnectedOverlayTransformOriginOn',] }],\n hasBackdrop: [{ type: Input, args: ['cdkConnectedOverlayHasBackdrop',] }],\n lockPosition: [{ type: Input, args: ['cdkConnectedOverlayLockPosition',] }],\n flexibleDimensions: [{ type: Input, args: ['cdkConnectedOverlayFlexibleDimensions',] }],\n growAfterOpen: [{ type: Input, args: ['cdkConnectedOverlayGrowAfterOpen',] }],\n push: [{ type: Input, args: ['cdkConnectedOverlayPush',] }],\n backdropClick: [{ type: Output }],\n positionChange: [{ type: Output }],\n attach: [{ type: Output }],\n detach: [{ type: Output }],\n overlayKeydown: [{ type: Output }],\n overlayOutsideClick: [{ type: Output }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(CdkConnectedOverlay, [{\n type: Directive,\n args: [{\n selector: '[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]',\n exportAs: 'cdkConnectedOverlay'\n }]\n }], function () { return [{ type: Overlay }, { type: ɵngcc0.TemplateRef }, { type: ɵngcc0.ViewContainerRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY]\n }] }, { type: ɵngcc3.Directionality, decorators: [{\n type: Optional\n }] }]; }, { viewportMargin: [{\n type: Input,\n args: ['cdkConnectedOverlayViewportMargin']\n }], open: [{\n type: Input,\n args: ['cdkConnectedOverlayOpen']\n }], disableClose: [{\n type: Input,\n args: ['cdkConnectedOverlayDisableClose']\n }], backdropClick: [{\n type: Output\n }], positionChange: [{\n type: Output\n }], attach: [{\n type: Output\n }], detach: [{\n type: Output\n }], overlayKeydown: [{\n type: Output\n }], overlayOutsideClick: [{\n type: Output\n }], scrollStrategy: [{\n type: Input,\n args: ['cdkConnectedOverlayScrollStrategy']\n }], offsetX: [{\n type: Input,\n args: ['cdkConnectedOverlayOffsetX']\n }], offsetY: [{\n type: Input,\n args: ['cdkConnectedOverlayOffsetY']\n }], hasBackdrop: [{\n type: Input,\n args: ['cdkConnectedOverlayHasBackdrop']\n }], lockPosition: [{\n type: Input,\n args: ['cdkConnectedOverlayLockPosition']\n }], flexibleDimensions: [{\n type: Input,\n args: ['cdkConnectedOverlayFlexibleDimensions']\n }], growAfterOpen: [{\n type: Input,\n args: ['cdkConnectedOverlayGrowAfterOpen']\n }], push: [{\n type: Input,\n args: ['cdkConnectedOverlayPush']\n }], positions: [{\n type: Input,\n args: ['cdkConnectedOverlayPositions']\n }], origin: [{\n type: Input,\n args: ['cdkConnectedOverlayOrigin']\n }], positionStrategy: [{\n type: Input,\n args: ['cdkConnectedOverlayPositionStrategy']\n }], width: [{\n type: Input,\n args: ['cdkConnectedOverlayWidth']\n }], height: [{\n type: Input,\n args: ['cdkConnectedOverlayHeight']\n }], minWidth: [{\n type: Input,\n args: ['cdkConnectedOverlayMinWidth']\n }], minHeight: [{\n type: Input,\n args: ['cdkConnectedOverlayMinHeight']\n }], backdropClass: [{\n type: Input,\n args: ['cdkConnectedOverlayBackdropClass']\n }], panelClass: [{\n type: Input,\n args: ['cdkConnectedOverlayPanelClass']\n }], transformOriginSelector: [{\n type: Input,\n args: ['cdkConnectedOverlayTransformOriginOn']\n }] }); })();\n/** @docs-private */\nfunction CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {\n return () => overlay.scrollStrategies.reposition();\n}\n/** @docs-private */\nconst CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER = {\n provide: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY,\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass OverlayModule {\n}\nOverlayModule.ɵfac = function OverlayModule_Factory(t) { return new (t || OverlayModule)(); };\nOverlayModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: OverlayModule });\nOverlayModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ providers: [\n Overlay,\n CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER,\n ], imports: [[BidiModule, PortalModule, ScrollingModule], ScrollingModule] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(OverlayModule, [{\n type: NgModule,\n args: [{\n imports: [BidiModule, PortalModule, ScrollingModule],\n exports: [CdkConnectedOverlay, CdkOverlayOrigin, ScrollingModule],\n declarations: [CdkConnectedOverlay, CdkOverlayOrigin],\n providers: [\n Overlay,\n CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER,\n ]\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(OverlayModule, { declarations: function () { return [CdkConnectedOverlay, CdkOverlayOrigin]; }, imports: function () { return [BidiModule, PortalModule, ScrollingModule]; }, exports: function () { return [CdkConnectedOverlay, CdkOverlayOrigin, ScrollingModule]; } }); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Alternative to OverlayContainer that supports correct displaying of overlay elements in\n * Fullscreen mode\n * https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen\n *\n * Should be provided in the root component.\n */\nclass FullscreenOverlayContainer extends OverlayContainer {\n constructor(_document, platform) {\n super(_document, platform);\n }\n ngOnDestroy() {\n super.ngOnDestroy();\n if (this._fullScreenEventName && this._fullScreenListener) {\n this._document.removeEventListener(this._fullScreenEventName, this._fullScreenListener);\n }\n }\n _createContainer() {\n super._createContainer();\n this._adjustParentForFullscreenChange();\n this._addFullscreenChangeListener(() => this._adjustParentForFullscreenChange());\n }\n _adjustParentForFullscreenChange() {\n if (!this._containerElement) {\n return;\n }\n const fullscreenElement = this.getFullscreenElement();\n const parent = fullscreenElement || this._document.body;\n parent.appendChild(this._containerElement);\n }\n _addFullscreenChangeListener(fn) {\n const eventName = this._getEventName();\n if (eventName) {\n if (this._fullScreenListener) {\n this._document.removeEventListener(eventName, this._fullScreenListener);\n }\n this._document.addEventListener(eventName, fn);\n this._fullScreenListener = fn;\n }\n }\n _getEventName() {\n if (!this._fullScreenEventName) {\n const _document = this._document;\n if (_document.fullscreenEnabled) {\n this._fullScreenEventName = 'fullscreenchange';\n }\n else if (_document.webkitFullscreenEnabled) {\n this._fullScreenEventName = 'webkitfullscreenchange';\n }\n else if (_document.mozFullScreenEnabled) {\n this._fullScreenEventName = 'mozfullscreenchange';\n }\n else if (_document.msFullscreenEnabled) {\n this._fullScreenEventName = 'MSFullscreenChange';\n }\n }\n return this._fullScreenEventName;\n }\n /**\n * When the page is put into fullscreen mode, a specific element is specified.\n * Only that element and its children are visible when in fullscreen mode.\n */\n getFullscreenElement() {\n const _document = this._document;\n return _document.fullscreenElement ||\n _document.webkitFullscreenElement ||\n _document.mozFullScreenElement ||\n _document.msFullscreenElement ||\n null;\n }\n}\nFullscreenOverlayContainer.ɵfac = function FullscreenOverlayContainer_Factory(t) { return new (t || FullscreenOverlayContainer)(ɵngcc0.ɵɵinject(DOCUMENT), ɵngcc0.ɵɵinject(ɵngcc2.Platform)); };\nFullscreenOverlayContainer.ɵprov = i0.ɵɵdefineInjectable({ factory: function FullscreenOverlayContainer_Factory() { return new FullscreenOverlayContainer(i0.ɵɵinject(i1$1.DOCUMENT), i0.ɵɵinject(i2.Platform)); }, token: FullscreenOverlayContainer, providedIn: \"root\" });\nFullscreenOverlayContainer.ctorParameters = () => [\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },\n { type: Platform }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FullscreenOverlayContainer, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: ɵngcc2.Platform }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BlockScrollStrategy, CdkConnectedOverlay, CdkOverlayOrigin, CloseScrollStrategy, ConnectedOverlayPositionChange, ConnectionPositionPair, FlexibleConnectedPositionStrategy, FullscreenOverlayContainer, GlobalPositionStrategy, NoopScrollStrategy, Overlay, OverlayConfig, OverlayContainer, OverlayKeyboardDispatcher, OverlayModule, OverlayOutsideClickDispatcher, OverlayPositionBuilder, OverlayRef, RepositionScrollStrategy, ScrollStrategyOptions, ScrollingVisibility, validateHorizontalPosition, validateVerticalPosition, CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY as ɵangular_material_src_cdk_overlay_overlay_a, CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY as ɵangular_material_src_cdk_overlay_overlay_b, CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER as ɵangular_material_src_cdk_overlay_overlay_c, BaseOverlayDispatcher as ɵangular_material_src_cdk_overlay_overlay_d };\n\n","import * as i0 from '@angular/core';\nimport { NgModule, Injectable, NgZone } from '@angular/core';\nimport { coerceArray } from '@angular/cdk/coercion';\nimport { Subject, combineLatest, concat, Observable } from 'rxjs';\nimport { take, skip, debounceTime, map, startWith, takeUntil } from 'rxjs/operators';\nimport * as i1 from '@angular/cdk/platform';\nimport { Platform } from '@angular/cdk/platform';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport * as ɵngcc0 from '@angular/core';\nimport * as ɵngcc1 from '@angular/cdk/platform';\nclass LayoutModule {\n}\nLayoutModule.ɵfac = function LayoutModule_Factory(t) { return new (t || LayoutModule)(); };\nLayoutModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: LayoutModule });\nLayoutModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({});\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(LayoutModule, [{\n type: NgModule,\n args: [{}]\n }], null, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Global registry for all dynamically-created, injected media queries. */\nconst mediaQueriesForWebkitCompatibility = new Set();\n/** Style tag that holds all of the dynamically-created media queries. */\nlet mediaQueryStyleNode;\n/** A utility for calling matchMedia queries. */\nclass MediaMatcher {\n constructor(_platform) {\n this._platform = _platform;\n this._matchMedia = this._platform.isBrowser && window.matchMedia ?\n // matchMedia is bound to the window scope intentionally as it is an illegal invocation to\n // call it from a different scope.\n window.matchMedia.bind(window) :\n noopMatchMedia;\n }\n /**\n * Evaluates the given media query and returns the native MediaQueryList from which results\n * can be retrieved.\n * Confirms the layout engine will trigger for the selector query provided and returns the\n * MediaQueryList for the query provided.\n */\n matchMedia(query) {\n if (this._platform.WEBKIT || this._platform.BLINK) {\n createEmptyStyleRule(query);\n }\n return this._matchMedia(query);\n }\n}\nMediaMatcher.ɵfac = function MediaMatcher_Factory(t) { return new (t || MediaMatcher)(ɵngcc0.ɵɵinject(ɵngcc1.Platform)); };\nMediaMatcher.ɵprov = i0.ɵɵdefineInjectable({ factory: function MediaMatcher_Factory() { return new MediaMatcher(i0.ɵɵinject(i1.Platform)); }, token: MediaMatcher, providedIn: \"root\" });\nMediaMatcher.ctorParameters = () => [\n { type: Platform }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(MediaMatcher, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return [{ type: ɵngcc1.Platform }]; }, null); })();\n/**\n * Creates an empty stylesheet that is used to work around browser inconsistencies related to\n * `matchMedia`. At the time of writing, it handles the following cases:\n * 1. On WebKit browsers, a media query has to have at least one rule in order for `matchMedia`\n * to fire. We work around it by declaring a dummy stylesheet with a `@media` declaration.\n * 2. In some cases Blink browsers will stop firing the `matchMedia` listener if none of the rules\n * inside the `@media` match existing elements on the page. We work around it by having one rule\n * targeting the `body`. See https://github.com/angular/components/issues/23546.\n */\nfunction createEmptyStyleRule(query) {\n if (mediaQueriesForWebkitCompatibility.has(query)) {\n return;\n }\n try {\n if (!mediaQueryStyleNode) {\n mediaQueryStyleNode = document.createElement('style');\n mediaQueryStyleNode.setAttribute('type', 'text/css');\n document.head.appendChild(mediaQueryStyleNode);\n }\n if (mediaQueryStyleNode.sheet) {\n mediaQueryStyleNode.sheet.insertRule(`@media ${query} {body{ }}`, 0);\n mediaQueriesForWebkitCompatibility.add(query);\n }\n }\n catch (e) {\n console.error(e);\n }\n}\n/** No-op matchMedia replacement for non-browser platforms. */\nfunction noopMatchMedia(query) {\n // Use `as any` here to avoid adding additional necessary properties for\n // the noop matcher.\n return {\n matches: query === 'all' || query === '',\n media: query,\n addListener: () => { },\n removeListener: () => { }\n };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Utility for checking the matching state of @media queries. */\nclass BreakpointObserver {\n constructor(_mediaMatcher, _zone) {\n this._mediaMatcher = _mediaMatcher;\n this._zone = _zone;\n /** A map of all media queries currently being listened for. */\n this._queries = new Map();\n /** A subject for all other observables to takeUntil based on. */\n this._destroySubject = new Subject();\n }\n /** Completes the active subject, signalling to all other observables to complete. */\n ngOnDestroy() {\n this._destroySubject.next();\n this._destroySubject.complete();\n }\n /**\n * Whether one or more media queries match the current viewport size.\n * @param value One or more media queries to check.\n * @returns Whether any of the media queries match.\n */\n isMatched(value) {\n const queries = splitQueries(coerceArray(value));\n return queries.some(mediaQuery => this._registerQuery(mediaQuery).mql.matches);\n }\n /**\n * Gets an observable of results for the given queries that will emit new results for any changes\n * in matching of the given queries.\n * @param value One or more media queries to check.\n * @returns A stream of matches for the given queries.\n */\n observe(value) {\n const queries = splitQueries(coerceArray(value));\n const observables = queries.map(query => this._registerQuery(query).observable);\n let stateObservable = combineLatest(observables);\n // Emit the first state immediately, and then debounce the subsequent emissions.\n stateObservable = concat(stateObservable.pipe(take(1)), stateObservable.pipe(skip(1), debounceTime(0)));\n return stateObservable.pipe(map(breakpointStates => {\n const response = {\n matches: false,\n breakpoints: {},\n };\n breakpointStates.forEach(({ matches, query }) => {\n response.matches = response.matches || matches;\n response.breakpoints[query] = matches;\n });\n return response;\n }));\n }\n /** Registers a specific query to be listened for. */\n _registerQuery(query) {\n // Only set up a new MediaQueryList if it is not already being listened for.\n if (this._queries.has(query)) {\n return this._queries.get(query);\n }\n const mql = this._mediaMatcher.matchMedia(query);\n // Create callback for match changes and add it is as a listener.\n const queryObservable = new Observable((observer) => {\n // Listener callback methods are wrapped to be placed back in ngZone. Callbacks must be placed\n // back into the zone because matchMedia is only included in Zone.js by loading the\n // webapis-media-query.js file alongside the zone.js file. Additionally, some browsers do not\n // have MediaQueryList inherit from EventTarget, which causes inconsistencies in how Zone.js\n // patches it.\n const handler = (e) => this._zone.run(() => observer.next(e));\n mql.addListener(handler);\n return () => {\n mql.removeListener(handler);\n };\n }).pipe(startWith(mql), map(({ matches }) => ({ query, matches })), takeUntil(this._destroySubject));\n // Add the MediaQueryList to the set of queries.\n const output = { observable: queryObservable, mql };\n this._queries.set(query, output);\n return output;\n }\n}\nBreakpointObserver.ɵfac = function BreakpointObserver_Factory(t) { return new (t || BreakpointObserver)(ɵngcc0.ɵɵinject(MediaMatcher), ɵngcc0.ɵɵinject(ɵngcc0.NgZone)); };\nBreakpointObserver.ɵprov = i0.ɵɵdefineInjectable({ factory: function BreakpointObserver_Factory() { return new BreakpointObserver(i0.ɵɵinject(MediaMatcher), i0.ɵɵinject(i0.NgZone)); }, token: BreakpointObserver, providedIn: \"root\" });\nBreakpointObserver.ctorParameters = () => [\n { type: MediaMatcher },\n { type: NgZone }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BreakpointObserver, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return [{ type: MediaMatcher }, { type: ɵngcc0.NgZone }]; }, null); })();\n/**\n * Split each query string into separate query strings if two queries are provided as comma\n * separated.\n */\nfunction splitQueries(queries) {\n return queries.map(query => query.split(','))\n .reduce((a1, a2) => a1.concat(a2))\n .map(query => query.trim());\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// PascalCase is being used as Breakpoints is used like an enum.\n// tslint:disable-next-line:variable-name\nconst Breakpoints = {\n XSmall: '(max-width: 599.98px)',\n Small: '(min-width: 600px) and (max-width: 959.98px)',\n Medium: '(min-width: 960px) and (max-width: 1279.98px)',\n Large: '(min-width: 1280px) and (max-width: 1919.98px)',\n XLarge: '(min-width: 1920px)',\n Handset: '(max-width: 599.98px) and (orientation: portrait), ' +\n '(max-width: 959.98px) and (orientation: landscape)',\n Tablet: '(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), ' +\n '(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)',\n Web: '(min-width: 840px) and (orientation: portrait), ' +\n '(min-width: 1280px) and (orientation: landscape)',\n HandsetPortrait: '(max-width: 599.98px) and (orientation: portrait)',\n TabletPortrait: '(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)',\n WebPortrait: '(min-width: 840px) and (orientation: portrait)',\n HandsetLandscape: '(max-width: 959.98px) and (orientation: landscape)',\n TabletLandscape: '(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)',\n WebLandscape: '(min-width: 1280px) and (orientation: landscape)',\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BreakpointObserver, Breakpoints, LayoutModule, MediaMatcher };\n\n","import * as i1 from '@angular/cdk/overlay';\nimport { OverlayModule, OverlayConfig, Overlay } from '@angular/cdk/overlay';\nimport { BasePortalOutlet, CdkPortalOutlet, PortalModule, ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport { CommonModule } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, NgZone, ElementRef, ChangeDetectorRef, ViewChild, NgModule, Injector, TemplateRef, Injectable, Optional, SkipSelf } from '@angular/core';\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { Subject } from 'rxjs';\nimport { Platform } from '@angular/cdk/platform';\nimport { take, takeUntil } from 'rxjs/operators';\nimport { trigger, state, style, transition, animate } from '@angular/animations';\nimport * as i2 from '@angular/cdk/a11y';\nimport { LiveAnnouncer } from '@angular/cdk/a11y';\nimport * as i3 from '@angular/cdk/layout';\nimport { Breakpoints, BreakpointObserver } from '@angular/cdk/layout';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Injection token that can be used to access the data that was passed in to a snack bar. */\nimport * as ɵngcc0 from '@angular/core';\nimport * as ɵngcc1 from '@angular/common';\nimport * as ɵngcc2 from '@angular/material/button';\nimport * as ɵngcc3 from '@angular/cdk/platform';\nimport * as ɵngcc4 from '@angular/cdk/portal';\nimport * as ɵngcc5 from '@angular/cdk/overlay';\nimport * as ɵngcc6 from '@angular/cdk/a11y';\nimport * as ɵngcc7 from '@angular/cdk/layout';\n\nfunction SimpleSnackBar_div_2_Template(rf, ctx) { if (rf & 1) {\n const _r2 = ɵngcc0.ɵɵgetCurrentView();\n ɵngcc0.ɵɵelementStart(0, \"div\", 1);\n ɵngcc0.ɵɵelementStart(1, \"button\", 2);\n ɵngcc0.ɵɵlistener(\"click\", function SimpleSnackBar_div_2_Template_button_click_1_listener() { ɵngcc0.ɵɵrestoreView(_r2); const ctx_r1 = ɵngcc0.ɵɵnextContext(); return ctx_r1.action(); });\n ɵngcc0.ɵɵtext(2);\n ɵngcc0.ɵɵelementEnd();\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n const ctx_r0 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵadvance(2);\n ɵngcc0.ɵɵtextInterpolate(ctx_r0.data.action);\n} }\nfunction MatSnackBarContainer_ng_template_1_Template(rf, ctx) { }\nconst MAT_SNACK_BAR_DATA = new InjectionToken('MatSnackBarData');\n/**\n * Configuration used when opening a snack-bar.\n */\nclass MatSnackBarConfig {\n constructor() {\n /** The politeness level for the MatAriaLiveAnnouncer announcement. */\n this.politeness = 'assertive';\n /**\n * Message to be announced by the LiveAnnouncer. When opening a snackbar without a custom\n * component or template, the announcement message will default to the specified message.\n */\n this.announcementMessage = '';\n /** The length of time in milliseconds to wait before automatically dismissing the snack bar. */\n this.duration = 0;\n /** Data being injected into the child component. */\n this.data = null;\n /** The horizontal position to place the snack bar. */\n this.horizontalPosition = 'center';\n /** The vertical position to place the snack bar. */\n this.verticalPosition = 'bottom';\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Maximum amount of milliseconds that can be passed into setTimeout. */\nconst MAX_TIMEOUT = Math.pow(2, 31) - 1;\n/**\n * Reference to a snack bar dispatched from the snack bar service.\n */\nclass MatSnackBarRef {\n constructor(containerInstance, _overlayRef) {\n this._overlayRef = _overlayRef;\n /** Subject for notifying the user that the snack bar has been dismissed. */\n this._afterDismissed = new Subject();\n /** Subject for notifying the user that the snack bar has opened and appeared. */\n this._afterOpened = new Subject();\n /** Subject for notifying the user that the snack bar action was called. */\n this._onAction = new Subject();\n /** Whether the snack bar was dismissed using the action button. */\n this._dismissedByAction = false;\n this.containerInstance = containerInstance;\n // Dismiss snackbar on action.\n this.onAction().subscribe(() => this.dismiss());\n containerInstance._onExit.subscribe(() => this._finishDismiss());\n }\n /** Dismisses the snack bar. */\n dismiss() {\n if (!this._afterDismissed.closed) {\n this.containerInstance.exit();\n }\n clearTimeout(this._durationTimeoutId);\n }\n /** Marks the snackbar action clicked. */\n dismissWithAction() {\n if (!this._onAction.closed) {\n this._dismissedByAction = true;\n this._onAction.next();\n this._onAction.complete();\n }\n clearTimeout(this._durationTimeoutId);\n }\n /**\n * Marks the snackbar action clicked.\n * @deprecated Use `dismissWithAction` instead.\n * @breaking-change 8.0.0\n */\n closeWithAction() {\n this.dismissWithAction();\n }\n /** Dismisses the snack bar after some duration */\n _dismissAfter(duration) {\n // Note that we need to cap the duration to the maximum value for setTimeout, because\n // it'll revert to 1 if somebody passes in something greater (e.g. `Infinity`). See #17234.\n this._durationTimeoutId = setTimeout(() => this.dismiss(), Math.min(duration, MAX_TIMEOUT));\n }\n /** Marks the snackbar as opened */\n _open() {\n if (!this._afterOpened.closed) {\n this._afterOpened.next();\n this._afterOpened.complete();\n }\n }\n /** Cleans up the DOM after closing. */\n _finishDismiss() {\n this._overlayRef.dispose();\n if (!this._onAction.closed) {\n this._onAction.complete();\n }\n this._afterDismissed.next({ dismissedByAction: this._dismissedByAction });\n this._afterDismissed.complete();\n this._dismissedByAction = false;\n }\n /** Gets an observable that is notified when the snack bar is finished closing. */\n afterDismissed() {\n return this._afterDismissed;\n }\n /** Gets an observable that is notified when the snack bar has opened and appeared. */\n afterOpened() {\n return this.containerInstance._onEnter;\n }\n /** Gets an observable that is notified when the snack bar action is called. */\n onAction() {\n return this._onAction;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A component used to open as the default snack bar, matching material spec.\n * This should only be used internally by the snack bar service.\n */\nclass SimpleSnackBar {\n constructor(snackBarRef, data) {\n this.snackBarRef = snackBarRef;\n this.data = data;\n }\n /** Performs the action on the snack bar. */\n action() {\n this.snackBarRef.dismissWithAction();\n }\n /** If the action button should be shown. */\n get hasAction() {\n return !!this.data.action;\n }\n}\nSimpleSnackBar.ɵfac = function SimpleSnackBar_Factory(t) { return new (t || SimpleSnackBar)(ɵngcc0.ɵɵdirectiveInject(MatSnackBarRef), ɵngcc0.ɵɵdirectiveInject(MAT_SNACK_BAR_DATA)); };\nSimpleSnackBar.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: SimpleSnackBar, selectors: [[\"simple-snack-bar\"]], hostAttrs: [1, \"mat-simple-snackbar\"], decls: 3, vars: 2, consts: [[\"class\", \"mat-simple-snackbar-action\", 4, \"ngIf\"], [1, \"mat-simple-snackbar-action\"], [\"mat-button\", \"\", 3, \"click\"]], template: function SimpleSnackBar_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementStart(0, \"span\");\n ɵngcc0.ɵɵtext(1);\n ɵngcc0.ɵɵelementEnd();\n ɵngcc0.ɵɵtemplate(2, SimpleSnackBar_div_2_Template, 3, 1, \"div\", 0);\n } if (rf & 2) {\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵtextInterpolate(ctx.data.message);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx.hasAction);\n } }, directives: [ɵngcc1.NgIf, ɵngcc2.MatButton], styles: [\".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}\\n\"], encapsulation: 2, changeDetection: 0 });\nSimpleSnackBar.ctorParameters = () => [\n { type: MatSnackBarRef },\n { type: undefined, decorators: [{ type: Inject, args: [MAT_SNACK_BAR_DATA,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(SimpleSnackBar, [{\n type: Component,\n args: [{\n selector: 'simple-snack-bar',\n template: \"<span>{{data.message}}</span>\\n<div class=\\\"mat-simple-snackbar-action\\\" *ngIf=\\\"hasAction\\\">\\n <button mat-button (click)=\\\"action()\\\">{{data.action}}</button>\\n</div>\\n\",\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'mat-simple-snackbar'\n },\n styles: [\".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}\\n\"]\n }]\n }], function () { return [{ type: MatSnackBarRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_SNACK_BAR_DATA]\n }] }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Animations used by the Material snack bar.\n * @docs-private\n */\nconst matSnackBarAnimations = {\n /** Animation that shows and hides a snack bar. */\n snackBarState: trigger('state', [\n state('void, hidden', style({\n transform: 'scale(0.8)',\n opacity: 0,\n })),\n state('visible', style({\n transform: 'scale(1)',\n opacity: 1,\n })),\n transition('* => visible', animate('150ms cubic-bezier(0, 0, 0.2, 1)')),\n transition('* => void, * => hidden', animate('75ms cubic-bezier(0.4, 0.0, 1, 1)', style({\n opacity: 0\n }))),\n ])\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Internal component that wraps user-provided snack bar content.\n * @docs-private\n */\nclass MatSnackBarContainer extends BasePortalOutlet {\n constructor(_ngZone, _elementRef, _changeDetectorRef, _platform, \n /** The snack bar configuration. */\n snackBarConfig) {\n super();\n this._ngZone = _ngZone;\n this._elementRef = _elementRef;\n this._changeDetectorRef = _changeDetectorRef;\n this._platform = _platform;\n this.snackBarConfig = snackBarConfig;\n /** The number of milliseconds to wait before announcing the snack bar's content. */\n this._announceDelay = 150;\n /** Whether the component has been destroyed. */\n this._destroyed = false;\n /** Subject for notifying that the snack bar has announced to screen readers. */\n this._onAnnounce = new Subject();\n /** Subject for notifying that the snack bar has exited from view. */\n this._onExit = new Subject();\n /** Subject for notifying that the snack bar has finished entering the view. */\n this._onEnter = new Subject();\n /** The state of the snack bar animations. */\n this._animationState = 'void';\n /**\n * Attaches a DOM portal to the snack bar container.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n this.attachDomPortal = (portal) => {\n this._assertNotAttached();\n this._applySnackBarClasses();\n return this._portalOutlet.attachDomPortal(portal);\n };\n // Use aria-live rather than a live role like 'alert' or 'status'\n // because NVDA and JAWS have show inconsistent behavior with live roles.\n if (snackBarConfig.politeness === 'assertive' && !snackBarConfig.announcementMessage) {\n this._live = 'assertive';\n }\n else if (snackBarConfig.politeness === 'off') {\n this._live = 'off';\n }\n else {\n this._live = 'polite';\n }\n // Only set role for Firefox. Set role based on aria-live because setting role=\"alert\" implies\n // aria-live=\"assertive\" which may cause issues if aria-live is set to \"polite\" above.\n if (this._platform.FIREFOX) {\n if (this._live === 'polite') {\n this._role = 'status';\n }\n if (this._live === 'assertive') {\n this._role = 'alert';\n }\n }\n }\n /** Attach a component portal as content to this snack bar container. */\n attachComponentPortal(portal) {\n this._assertNotAttached();\n this._applySnackBarClasses();\n return this._portalOutlet.attachComponentPortal(portal);\n }\n /** Attach a template portal as content to this snack bar container. */\n attachTemplatePortal(portal) {\n this._assertNotAttached();\n this._applySnackBarClasses();\n return this._portalOutlet.attachTemplatePortal(portal);\n }\n /** Handle end of animations, updating the state of the snackbar. */\n onAnimationEnd(event) {\n const { fromState, toState } = event;\n if ((toState === 'void' && fromState !== 'void') || toState === 'hidden') {\n this._completeExit();\n }\n if (toState === 'visible') {\n // Note: we shouldn't use `this` inside the zone callback,\n // because it can cause a memory leak.\n const onEnter = this._onEnter;\n this._ngZone.run(() => {\n onEnter.next();\n onEnter.complete();\n });\n }\n }\n /** Begin animation of snack bar entrance into view. */\n enter() {\n if (!this._destroyed) {\n this._animationState = 'visible';\n this._changeDetectorRef.detectChanges();\n this._screenReaderAnnounce();\n }\n }\n /** Begin animation of the snack bar exiting from view. */\n exit() {\n // Note: this one transitions to `hidden`, rather than `void`, in order to handle the case\n // where multiple snack bars are opened in quick succession (e.g. two consecutive calls to\n // `MatSnackBar.open`).\n this._animationState = 'hidden';\n // Mark this element with an 'exit' attribute to indicate that the snackbar has\n // been dismissed and will soon be removed from the DOM. This is used by the snackbar\n // test harness.\n this._elementRef.nativeElement.setAttribute('mat-exit', '');\n // If the snack bar hasn't been announced by the time it exits it wouldn't have been open\n // long enough to visually read it either, so clear the timeout for announcing.\n clearTimeout(this._announceTimeoutId);\n return this._onExit;\n }\n /** Makes sure the exit callbacks have been invoked when the element is destroyed. */\n ngOnDestroy() {\n this._destroyed = true;\n this._completeExit();\n }\n /**\n * Waits for the zone to settle before removing the element. Helps prevent\n * errors where we end up removing an element which is in the middle of an animation.\n */\n _completeExit() {\n this._ngZone.onMicrotaskEmpty.pipe(take(1)).subscribe(() => {\n this._onExit.next();\n this._onExit.complete();\n });\n }\n /** Applies the various positioning and user-configured CSS classes to the snack bar. */\n _applySnackBarClasses() {\n const element = this._elementRef.nativeElement;\n const panelClasses = this.snackBarConfig.panelClass;\n if (panelClasses) {\n if (Array.isArray(panelClasses)) {\n // Note that we can't use a spread here, because IE doesn't support multiple arguments.\n panelClasses.forEach(cssClass => element.classList.add(cssClass));\n }\n else {\n element.classList.add(panelClasses);\n }\n }\n if (this.snackBarConfig.horizontalPosition === 'center') {\n element.classList.add('mat-snack-bar-center');\n }\n if (this.snackBarConfig.verticalPosition === 'top') {\n element.classList.add('mat-snack-bar-top');\n }\n }\n /** Asserts that no content is already attached to the container. */\n _assertNotAttached() {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Attempting to attach snack bar content after content is already attached');\n }\n }\n /**\n * Starts a timeout to move the snack bar content to the live region so screen readers will\n * announce it.\n */\n _screenReaderAnnounce() {\n if (!this._announceTimeoutId) {\n this._ngZone.runOutsideAngular(() => {\n this._announceTimeoutId = setTimeout(() => {\n const inertElement = this._elementRef.nativeElement.querySelector('[aria-hidden]');\n const liveElement = this._elementRef.nativeElement.querySelector('[aria-live]');\n if (inertElement && liveElement) {\n // If an element in the snack bar content is focused before being moved\n // track it and restore focus after moving to the live region.\n let focusedElement = null;\n if (this._platform.isBrowser &&\n document.activeElement instanceof HTMLElement &&\n inertElement.contains(document.activeElement)) {\n focusedElement = document.activeElement;\n }\n inertElement.removeAttribute('aria-hidden');\n liveElement.appendChild(inertElement);\n focusedElement === null || focusedElement === void 0 ? void 0 : focusedElement.focus();\n this._onAnnounce.next();\n this._onAnnounce.complete();\n }\n }, this._announceDelay);\n });\n }\n }\n}\nMatSnackBarContainer.ɵfac = function MatSnackBarContainer_Factory(t) { return new (t || MatSnackBarContainer)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc3.Platform), ɵngcc0.ɵɵdirectiveInject(MatSnackBarConfig)); };\nMatSnackBarContainer.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: MatSnackBarContainer, selectors: [[\"snack-bar-container\"]], viewQuery: function MatSnackBarContainer_Query(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵviewQuery(CdkPortalOutlet, 7);\n } if (rf & 2) {\n let _t;\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx._portalOutlet = _t.first);\n } }, hostAttrs: [1, \"mat-snack-bar-container\"], hostVars: 1, hostBindings: function MatSnackBarContainer_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵsyntheticHostListener(\"@state.done\", function MatSnackBarContainer_animation_state_done_HostBindingHandler($event) { return ctx.onAnimationEnd($event); });\n } if (rf & 2) {\n ɵngcc0.ɵɵsyntheticHostProperty(\"@state\", ctx._animationState);\n } }, features: [ɵngcc0.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [[\"aria-hidden\", \"true\"], [\"cdkPortalOutlet\", \"\"]], template: function MatSnackBarContainer_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementStart(0, \"div\", 0);\n ɵngcc0.ɵɵtemplate(1, MatSnackBarContainer_ng_template_1_Template, 0, 0, \"ng-template\", 1);\n ɵngcc0.ɵɵelementEnd();\n ɵngcc0.ɵɵelement(2, \"div\");\n } if (rf & 2) {\n ɵngcc0.ɵɵadvance(2);\n ɵngcc0.ɵɵattribute(\"aria-live\", ctx._live)(\"role\", ctx._role);\n } }, directives: [ɵngcc4.CdkPortalOutlet], styles: [\".mat-snack-bar-container{border-radius:4px;box-sizing:border-box;display:block;margin:24px;max-width:33vw;min-width:344px;padding:14px 16px;min-height:48px;transform-origin:center}.cdk-high-contrast-active .mat-snack-bar-container{border:solid 1px}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:8px;max-width:100%;min-width:0;width:100%}\\n\"], encapsulation: 2, data: { animation: [matSnackBarAnimations.snackBarState] } });\nMatSnackBarContainer.ctorParameters = () => [\n { type: NgZone },\n { type: ElementRef },\n { type: ChangeDetectorRef },\n { type: Platform },\n { type: MatSnackBarConfig }\n];\nMatSnackBarContainer.propDecorators = {\n _portalOutlet: [{ type: ViewChild, args: [CdkPortalOutlet, { static: true },] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(MatSnackBarContainer, [{\n type: Component,\n args: [{\n selector: 'snack-bar-container',\n template: \"<!-- Initially holds the snack bar content, will be empty after announcing to screen readers. -->\\n<div aria-hidden=\\\"true\\\">\\n <ng-template cdkPortalOutlet></ng-template>\\n</div>\\n\\n<!-- Will receive the snack bar content from the non-live div, move will happen a short delay after opening -->\\n<div [attr.aria-live]=\\\"_live\\\" [attr.role]=\\\"_role\\\"></div>\\n\",\n // In Ivy embedded views will be change detected from their declaration place, rather than\n // where they were stamped out. This means that we can't have the snack bar container be OnPush,\n // because it might cause snack bars that were opened from a template not to be out of date.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n animations: [matSnackBarAnimations.snackBarState],\n host: {\n 'class': 'mat-snack-bar-container',\n '[@state]': '_animationState',\n '(@state.done)': 'onAnimationEnd($event)'\n },\n styles: [\".mat-snack-bar-container{border-radius:4px;box-sizing:border-box;display:block;margin:24px;max-width:33vw;min-width:344px;padding:14px 16px;min-height:48px;transform-origin:center}.cdk-high-contrast-active .mat-snack-bar-container{border:solid 1px}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:8px;max-width:100%;min-width:0;width:100%}\\n\"]\n }]\n }], function () { return [{ type: ɵngcc0.NgZone }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.ChangeDetectorRef }, { type: ɵngcc3.Platform }, { type: MatSnackBarConfig }]; }, { _portalOutlet: [{\n type: ViewChild,\n args: [CdkPortalOutlet, { static: true }]\n }] }); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass MatSnackBarModule {\n}\nMatSnackBarModule.ɵfac = function MatSnackBarModule_Factory(t) { return new (t || MatSnackBarModule)(); };\nMatSnackBarModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: MatSnackBarModule });\nMatSnackBarModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [[\n OverlayModule,\n PortalModule,\n CommonModule,\n MatButtonModule,\n MatCommonModule,\n ], MatCommonModule] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(MatSnackBarModule, [{\n type: NgModule,\n args: [{\n imports: [\n OverlayModule,\n PortalModule,\n CommonModule,\n MatButtonModule,\n MatCommonModule,\n ],\n exports: [MatSnackBarContainer, MatCommonModule],\n declarations: [MatSnackBarContainer, SimpleSnackBar],\n entryComponents: [MatSnackBarContainer, SimpleSnackBar]\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(MatSnackBarModule, { declarations: function () { return [MatSnackBarContainer, SimpleSnackBar]; }, imports: function () { return [OverlayModule,\n PortalModule,\n CommonModule,\n MatButtonModule,\n MatCommonModule]; }, exports: function () { return [MatSnackBarContainer, MatCommonModule]; } }); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Injection token that can be used to specify default snack bar. */\nconst MAT_SNACK_BAR_DEFAULT_OPTIONS = new InjectionToken('mat-snack-bar-default-options', {\n providedIn: 'root',\n factory: MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY,\n});\n/** @docs-private */\nfunction MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY() {\n return new MatSnackBarConfig();\n}\n/**\n * Service to dispatch Material Design snack bar messages.\n */\nclass MatSnackBar {\n constructor(_overlay, _live, _injector, _breakpointObserver, _parentSnackBar, _defaultConfig) {\n this._overlay = _overlay;\n this._live = _live;\n this._injector = _injector;\n this._breakpointObserver = _breakpointObserver;\n this._parentSnackBar = _parentSnackBar;\n this._defaultConfig = _defaultConfig;\n /**\n * Reference to the current snack bar in the view *at this level* (in the Angular injector tree).\n * If there is a parent snack-bar service, all operations should delegate to that parent\n * via `_openedSnackBarRef`.\n */\n this._snackBarRefAtThisLevel = null;\n /** The component that should be rendered as the snack bar's simple component. */\n this.simpleSnackBarComponent = SimpleSnackBar;\n /** The container component that attaches the provided template or component. */\n this.snackBarContainerComponent = MatSnackBarContainer;\n /** The CSS class to apply for handset mode. */\n this.handsetCssClass = 'mat-snack-bar-handset';\n }\n /** Reference to the currently opened snackbar at *any* level. */\n get _openedSnackBarRef() {\n const parent = this._parentSnackBar;\n return parent ? parent._openedSnackBarRef : this._snackBarRefAtThisLevel;\n }\n set _openedSnackBarRef(value) {\n if (this._parentSnackBar) {\n this._parentSnackBar._openedSnackBarRef = value;\n }\n else {\n this._snackBarRefAtThisLevel = value;\n }\n }\n /**\n * Creates and dispatches a snack bar with a custom component for the content, removing any\n * currently opened snack bars.\n *\n * @param component Component to be instantiated.\n * @param config Extra configuration for the snack bar.\n */\n openFromComponent(component, config) {\n return this._attach(component, config);\n }\n /**\n * Creates and dispatches a snack bar with a custom template for the content, removing any\n * currently opened snack bars.\n *\n * @param template Template to be instantiated.\n * @param config Extra configuration for the snack bar.\n */\n openFromTemplate(template, config) {\n return this._attach(template, config);\n }\n /**\n * Opens a snackbar with a message and an optional action.\n * @param message The message to show in the snackbar.\n * @param action The label for the snackbar action.\n * @param config Additional configuration options for the snackbar.\n */\n open(message, action = '', config) {\n const _config = Object.assign(Object.assign({}, this._defaultConfig), config);\n // Since the user doesn't have access to the component, we can\n // override the data to pass in our own message and action.\n _config.data = { message, action };\n // Since the snack bar has `role=\"alert\"`, we don't\n // want to announce the same message twice.\n if (_config.announcementMessage === message) {\n _config.announcementMessage = undefined;\n }\n return this.openFromComponent(this.simpleSnackBarComponent, _config);\n }\n /**\n * Dismisses the currently-visible snack bar.\n */\n dismiss() {\n if (this._openedSnackBarRef) {\n this._openedSnackBarRef.dismiss();\n }\n }\n ngOnDestroy() {\n // Only dismiss the snack bar at the current level on destroy.\n if (this._snackBarRefAtThisLevel) {\n this._snackBarRefAtThisLevel.dismiss();\n }\n }\n /**\n * Attaches the snack bar container component to the overlay.\n */\n _attachSnackBarContainer(overlayRef, config) {\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n const injector = Injector.create({\n parent: userInjector || this._injector,\n providers: [{ provide: MatSnackBarConfig, useValue: config }]\n });\n const containerPortal = new ComponentPortal(this.snackBarContainerComponent, config.viewContainerRef, injector);\n const containerRef = overlayRef.attach(containerPortal);\n containerRef.instance.snackBarConfig = config;\n return containerRef.instance;\n }\n /**\n * Places a new component or a template as the content of the snack bar container.\n */\n _attach(content, userConfig) {\n const config = Object.assign(Object.assign(Object.assign({}, new MatSnackBarConfig()), this._defaultConfig), userConfig);\n const overlayRef = this._createOverlay(config);\n const container = this._attachSnackBarContainer(overlayRef, config);\n const snackBarRef = new MatSnackBarRef(container, overlayRef);\n if (content instanceof TemplateRef) {\n const portal = new TemplatePortal(content, null, {\n $implicit: config.data,\n snackBarRef\n });\n snackBarRef.instance = container.attachTemplatePortal(portal);\n }\n else {\n const injector = this._createInjector(config, snackBarRef);\n const portal = new ComponentPortal(content, undefined, injector);\n const contentRef = container.attachComponentPortal(portal);\n // We can't pass this via the injector, because the injector is created earlier.\n snackBarRef.instance = contentRef.instance;\n }\n // Subscribe to the breakpoint observer and attach the mat-snack-bar-handset class as\n // appropriate. This class is applied to the overlay element because the overlay must expand to\n // fill the width of the screen for full width snackbars.\n this._breakpointObserver.observe(Breakpoints.HandsetPortrait).pipe(takeUntil(overlayRef.detachments())).subscribe(state => {\n overlayRef.overlayElement.classList.toggle(this.handsetCssClass, state.matches);\n });\n if (config.announcementMessage) {\n // Wait until the snack bar contents have been announced then deliver this message.\n container._onAnnounce.subscribe(() => {\n this._live.announce(config.announcementMessage, config.politeness);\n });\n }\n this._animateSnackBar(snackBarRef, config);\n this._openedSnackBarRef = snackBarRef;\n return this._openedSnackBarRef;\n }\n /** Animates the old snack bar out and the new one in. */\n _animateSnackBar(snackBarRef, config) {\n // When the snackbar is dismissed, clear the reference to it.\n snackBarRef.afterDismissed().subscribe(() => {\n // Clear the snackbar ref if it hasn't already been replaced by a newer snackbar.\n if (this._openedSnackBarRef == snackBarRef) {\n this._openedSnackBarRef = null;\n }\n if (config.announcementMessage) {\n this._live.clear();\n }\n });\n if (this._openedSnackBarRef) {\n // If a snack bar is already in view, dismiss it and enter the\n // new snack bar after exit animation is complete.\n this._openedSnackBarRef.afterDismissed().subscribe(() => {\n snackBarRef.containerInstance.enter();\n });\n this._openedSnackBarRef.dismiss();\n }\n else {\n // If no snack bar is in view, enter the new snack bar.\n snackBarRef.containerInstance.enter();\n }\n // If a dismiss timeout is provided, set up dismiss based on after the snackbar is opened.\n if (config.duration && config.duration > 0) {\n snackBarRef.afterOpened().subscribe(() => snackBarRef._dismissAfter(config.duration));\n }\n }\n /**\n * Creates a new overlay and places it in the correct location.\n * @param config The user-specified snack bar config.\n */\n _createOverlay(config) {\n const overlayConfig = new OverlayConfig();\n overlayConfig.direction = config.direction;\n let positionStrategy = this._overlay.position().global();\n // Set horizontal position.\n const isRtl = config.direction === 'rtl';\n const isLeft = (config.horizontalPosition === 'left' ||\n (config.horizontalPosition === 'start' && !isRtl) ||\n (config.horizontalPosition === 'end' && isRtl));\n const isRight = !isLeft && config.horizontalPosition !== 'center';\n if (isLeft) {\n positionStrategy.left('0');\n }\n else if (isRight) {\n positionStrategy.right('0');\n }\n else {\n positionStrategy.centerHorizontally();\n }\n // Set horizontal position.\n if (config.verticalPosition === 'top') {\n positionStrategy.top('0');\n }\n else {\n positionStrategy.bottom('0');\n }\n overlayConfig.positionStrategy = positionStrategy;\n return this._overlay.create(overlayConfig);\n }\n /**\n * Creates an injector to be used inside of a snack bar component.\n * @param config Config that was used to create the snack bar.\n * @param snackBarRef Reference to the snack bar.\n */\n _createInjector(config, snackBarRef) {\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n return Injector.create({\n parent: userInjector || this._injector,\n providers: [\n { provide: MatSnackBarRef, useValue: snackBarRef },\n { provide: MAT_SNACK_BAR_DATA, useValue: config.data }\n ]\n });\n }\n}\nMatSnackBar.ɵfac = function MatSnackBar_Factory(t) { return new (t || MatSnackBar)(ɵngcc0.ɵɵinject(ɵngcc5.Overlay), ɵngcc0.ɵɵinject(ɵngcc6.LiveAnnouncer), ɵngcc0.ɵɵinject(ɵngcc0.Injector), ɵngcc0.ɵɵinject(ɵngcc7.BreakpointObserver), ɵngcc0.ɵɵinject(MatSnackBar, 12), ɵngcc0.ɵɵinject(MAT_SNACK_BAR_DEFAULT_OPTIONS)); };\nMatSnackBar.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatSnackBar_Factory() { return new MatSnackBar(i0.ɵɵinject(i1.Overlay), i0.ɵɵinject(i2.LiveAnnouncer), i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(i3.BreakpointObserver), i0.ɵɵinject(MatSnackBar, 12), i0.ɵɵinject(MAT_SNACK_BAR_DEFAULT_OPTIONS)); }, token: MatSnackBar, providedIn: MatSnackBarModule });\nMatSnackBar.ctorParameters = () => [\n { type: Overlay },\n { type: LiveAnnouncer },\n { type: Injector },\n { type: BreakpointObserver },\n { type: MatSnackBar, decorators: [{ type: Optional }, { type: SkipSelf }] },\n { type: MatSnackBarConfig, decorators: [{ type: Inject, args: [MAT_SNACK_BAR_DEFAULT_OPTIONS,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(MatSnackBar, [{\n type: Injectable,\n args: [{ providedIn: MatSnackBarModule }]\n }], function () { return [{ type: ɵngcc5.Overlay }, { type: ɵngcc6.LiveAnnouncer }, { type: ɵngcc0.Injector }, { type: ɵngcc7.BreakpointObserver }, { type: MatSnackBar, decorators: [{\n type: Optional\n }, {\n type: SkipSelf\n }] }, { type: MatSnackBarConfig, decorators: [{\n type: Inject,\n args: [MAT_SNACK_BAR_DEFAULT_OPTIONS]\n }] }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_SNACK_BAR_DATA, MAT_SNACK_BAR_DEFAULT_OPTIONS, MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY, MatSnackBar, MatSnackBarConfig, MatSnackBarContainer, MatSnackBarModule, MatSnackBarRef, SimpleSnackBar, matSnackBarAnimations };\n\n","import * as i1 from '@angular/common';\nimport { DOCUMENT } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { Injectable, Inject, InjectionToken, EventEmitter, Directive, NgZone, Optional, Input, Output, NgModule } from '@angular/core';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A pending copy-to-clipboard operation.\n *\n * The implementation of copying text to the clipboard modifies the DOM and\n * forces a relayout. This relayout can take too long if the string is large,\n * causing the execCommand('copy') to happen too long after the user clicked.\n * This results in the browser refusing to copy. This object lets the\n * relayout happen in a separate tick from copying by providing a copy function\n * that can be called later.\n *\n * Destroy must be called when no longer in use, regardless of whether `copy` is\n * called.\n */\nimport * as ɵngcc0 from '@angular/core';\nclass PendingCopy {\n constructor(text, _document) {\n this._document = _document;\n const textarea = this._textarea = this._document.createElement('textarea');\n const styles = textarea.style;\n // Hide the element for display and accessibility. Set a fixed position so the page layout\n // isn't affected. We use `fixed` with `top: 0`, because focus is moved into the textarea\n // for a split second and if it's off-screen, some browsers will attempt to scroll it into view.\n styles.position = 'fixed';\n styles.top = styles.opacity = '0';\n styles.left = '-999em';\n textarea.setAttribute('aria-hidden', 'true');\n textarea.value = text;\n this._document.body.appendChild(textarea);\n }\n /** Finishes copying the text. */\n copy() {\n const textarea = this._textarea;\n let successful = false;\n try { // Older browsers could throw if copy is not supported.\n if (textarea) {\n const currentFocus = this._document.activeElement;\n textarea.select();\n textarea.setSelectionRange(0, textarea.value.length);\n successful = this._document.execCommand('copy');\n if (currentFocus) {\n currentFocus.focus();\n }\n }\n }\n catch (_a) {\n // Discard error.\n // Initial setting of {@code successful} will represent failure here.\n }\n return successful;\n }\n /** Cleans up DOM changes used to perform the copy operation. */\n destroy() {\n const textarea = this._textarea;\n if (textarea) {\n if (textarea.parentNode) {\n textarea.parentNode.removeChild(textarea);\n }\n this._textarea = undefined;\n }\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A service for copying text to the clipboard.\n */\nclass Clipboard {\n constructor(document) {\n this._document = document;\n }\n /**\n * Copies the provided text into the user's clipboard.\n *\n * @param text The string to copy.\n * @returns Whether the operation was successful.\n */\n copy(text) {\n const pendingCopy = this.beginCopy(text);\n const successful = pendingCopy.copy();\n pendingCopy.destroy();\n return successful;\n }\n /**\n * Prepares a string to be copied later. This is useful for large strings\n * which take too long to successfully render and be copied in the same tick.\n *\n * The caller must call `destroy` on the returned `PendingCopy`.\n *\n * @param text The string to copy.\n * @returns the pending copy operation.\n */\n beginCopy(text) {\n return new PendingCopy(text, this._document);\n }\n}\nClipboard.ɵfac = function Clipboard_Factory(t) { return new (t || Clipboard)(ɵngcc0.ɵɵinject(DOCUMENT)); };\nClipboard.ɵprov = i0.ɵɵdefineInjectable({ factory: function Clipboard_Factory() { return new Clipboard(i0.ɵɵinject(i1.DOCUMENT)); }, token: Clipboard, providedIn: \"root\" });\nClipboard.ctorParameters = () => [\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(Clipboard, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Injection token that can be used to provide the default options to `CdkCopyToClipboard`. */\nconst CDK_COPY_TO_CLIPBOARD_CONFIG = new InjectionToken('CDK_COPY_TO_CLIPBOARD_CONFIG');\n/**\n * Provides behavior for a button that when clicked copies content into user's\n * clipboard.\n */\nclass CdkCopyToClipboard {\n constructor(_clipboard, _ngZone, config) {\n this._clipboard = _clipboard;\n this._ngZone = _ngZone;\n /** Content to be copied. */\n this.text = '';\n /**\n * How many times to attempt to copy the text. This may be necessary for longer text, because\n * the browser needs time to fill an intermediate textarea element and copy the content.\n */\n this.attempts = 1;\n /**\n * Emits when some text is copied to the clipboard. The\n * emitted value indicates whether copying was successful.\n */\n this.copied = new EventEmitter();\n /** Copies that are currently being attempted. */\n this._pending = new Set();\n if (config && config.attempts != null) {\n this.attempts = config.attempts;\n }\n }\n /** Copies the current text to the clipboard. */\n copy(attempts = this.attempts) {\n if (attempts > 1) {\n let remainingAttempts = attempts;\n const pending = this._clipboard.beginCopy(this.text);\n this._pending.add(pending);\n const attempt = () => {\n const successful = pending.copy();\n if (!successful && --remainingAttempts && !this._destroyed) {\n // We use 1 for the timeout since it's more predictable when flushing in unit tests.\n this._currentTimeout = this._ngZone.runOutsideAngular(() => setTimeout(attempt, 1));\n }\n else {\n this._currentTimeout = null;\n this._pending.delete(pending);\n pending.destroy();\n this.copied.emit(successful);\n }\n };\n attempt();\n }\n else {\n this.copied.emit(this._clipboard.copy(this.text));\n }\n }\n ngOnDestroy() {\n if (this._currentTimeout) {\n clearTimeout(this._currentTimeout);\n }\n this._pending.forEach(copy => copy.destroy());\n this._pending.clear();\n this._destroyed = true;\n }\n}\nCdkCopyToClipboard.ɵfac = function CdkCopyToClipboard_Factory(t) { return new (t || CdkCopyToClipboard)(ɵngcc0.ɵɵdirectiveInject(Clipboard), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone), ɵngcc0.ɵɵdirectiveInject(CDK_COPY_TO_CLIPBOARD_CONFIG, 8)); };\nCdkCopyToClipboard.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: CdkCopyToClipboard, selectors: [[\"\", \"cdkCopyToClipboard\", \"\"]], hostBindings: function CdkCopyToClipboard_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"click\", function CdkCopyToClipboard_click_HostBindingHandler() { return ctx.copy(); });\n } }, inputs: { text: [\"cdkCopyToClipboard\", \"text\"], attempts: [\"cdkCopyToClipboardAttempts\", \"attempts\"] }, outputs: { copied: \"cdkCopyToClipboardCopied\" } });\nCdkCopyToClipboard.ctorParameters = () => [\n { type: Clipboard },\n { type: NgZone },\n { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [CDK_COPY_TO_CLIPBOARD_CONFIG,] }] }\n];\nCdkCopyToClipboard.propDecorators = {\n text: [{ type: Input, args: ['cdkCopyToClipboard',] }],\n attempts: [{ type: Input, args: ['cdkCopyToClipboardAttempts',] }],\n copied: [{ type: Output, args: ['cdkCopyToClipboardCopied',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(CdkCopyToClipboard, [{\n type: Directive,\n args: [{\n selector: '[cdkCopyToClipboard]',\n host: {\n '(click)': 'copy()'\n }\n }]\n }], function () { return [{ type: Clipboard }, { type: ɵngcc0.NgZone }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [CDK_COPY_TO_CLIPBOARD_CONFIG]\n }] }]; }, { text: [{\n type: Input,\n args: ['cdkCopyToClipboard']\n }], attempts: [{\n type: Input,\n args: ['cdkCopyToClipboardAttempts']\n }], copied: [{\n type: Output,\n args: ['cdkCopyToClipboardCopied']\n }] }); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass ClipboardModule {\n}\nClipboardModule.ɵfac = function ClipboardModule_Factory(t) { return new (t || ClipboardModule)(); };\nClipboardModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: ClipboardModule });\nClipboardModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({});\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(ClipboardModule, [{\n type: NgModule,\n args: [{\n declarations: [CdkCopyToClipboard],\n exports: [CdkCopyToClipboard]\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(ClipboardModule, { declarations: [CdkCopyToClipboard], exports: [CdkCopyToClipboard] }); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { CDK_COPY_TO_CLIPBOARD_CONFIG, CdkCopyToClipboard, Clipboard, ClipboardModule, PendingCopy };\n\n","import { Component, ElementRef, EventEmitter, Input, OnChanges, Output, ViewChild } from '@angular/core';\nimport { Clipboard } from '@angular/cdk/clipboard';\nimport { Logger } from 'app/shared/logger.service';\nimport { PrettyPrinter } from './pretty-printer.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { Observable, of } from 'rxjs';\nimport { tap } from 'rxjs/operators';\nimport { unwrapHtmlForSink } from 'safevalues';\nimport { htmlFromStringKnownToSatisfyTypeContract } from 'safevalues/unsafe/reviewed';\nimport { fromOuterHTML } from 'app/shared/security';\n\n/**\n * Formatted Code Block\n *\n * Pretty renders a code block, used in the docs and API reference by the code-example and\n * code-tabs embedded components.\n * It includes a \"copy\" button that will send the content to the clipboard when clicked\n *\n * Example usage:\n *\n * ```\n * <aio-code\n * [language]=\"ts\"\n * [linenums]=\"true\"\n * [path]=\"router/src/app/app.module.ts\"\n * [region]=\"animations-module\">\n * </aio-code>\n * ```\n *\n *\n * Renders code provided through the `updateCode` method.\n */\n@Component({\n selector: 'aio-code',\n template: `\n <pre class=\"prettyprint lang-{{language}}\">\n <button *ngIf=\"!hideCopy\" class=\"material-icons copy-button no-print\"\n title=\"Copy code snippet\"\n [attr.aria-label]=\"ariaLabel\"\n (click)=\"doCopy()\">\n <span aria-hidden=\"true\">content_copy</span>\n </button>\n <code class=\"animated fadeIn\" #codeContainer></code>\n </pre>\n `\n})\nexport class CodeComponent implements OnChanges {\n ariaLabel = '';\n\n /** The code to be copied when clicking the copy button, this should not be HTML encoded */\n private codeText: string;\n\n /** Code that should be formatted with current inputs and displayed in the view. */\n set code(code: TrustedHTML) {\n this._code = code;\n\n if (!this._code.toString().trim()) {\n this.showMissingCodeMessage();\n } else {\n this.formatDisplayedCode();\n }\n }\n get code(): TrustedHTML {\n return this._code;\n }\n _code: TrustedHTML;\n\n /** Whether the copy button should be shown. */\n @Input() hideCopy: boolean;\n\n /** Language to render the code (e.g. javascript, dart, typescript). */\n @Input() language: string | undefined;\n\n /**\n * Whether to display line numbers:\n * - If false: hide\n * - If true: show\n * - If number: show but start at that number\n */\n @Input() linenums: boolean | number | string | undefined;\n\n /** Path to the source of the code. */\n @Input() path: string;\n\n /** Region of the source of the code being displayed. */\n @Input() region: string;\n\n /** Optional header to be displayed above the code. */\n @Input()\n set header(header: string | undefined) {\n this._header = header;\n this.ariaLabel = this.header ? `Copy code snippet from ${this.header}` : '';\n }\n get header(): string|undefined { return this._header; }\n private _header: string | undefined;\n\n @Output() codeFormatted = new EventEmitter<void>();\n\n /** The element in the template that will display the formatted code. */\n @ViewChild('codeContainer', { static: true }) codeContainer: ElementRef;\n\n constructor(\n private snackbar: MatSnackBar,\n private pretty: PrettyPrinter,\n private clipboard: Clipboard,\n private logger: Logger) {}\n\n ngOnChanges() {\n // If some inputs have changed and there is code displayed, update the view with the latest\n // formatted code.\n if (this.code) {\n this.formatDisplayedCode();\n }\n }\n\n private formatDisplayedCode() {\n const linenums = this.getLinenums();\n const leftAlignedCode = leftAlign(this.code);\n this.setCodeHtml(leftAlignedCode); // start with unformatted code\n this.codeText = this.getCodeText(); // store the unformatted code as text (for copying)\n\n const skipPrettify = of(undefined);\n const prettifyCode = this.pretty\n .formatCode(leftAlignedCode, this.language, linenums)\n .pipe(tap(formattedCode => this.setCodeHtml(formattedCode)));\n\n if (linenums !== false && this.language === 'none') {\n this.logger.warn(\"Using 'linenums' with 'language: none' is currently not supported.\");\n }\n\n ((this.language === 'none' ? skipPrettify : prettifyCode) as Observable<unknown>)\n .subscribe(() => this.codeFormatted.emit(), () => { /* ignore failure to format */ });\n }\n\n /** Sets the message showing that the code could not be found. */\n private showMissingCodeMessage() {\n const src = this.path ? this.path + (this.region ? '#' + this.region : '') : '';\n const msg = `The code sample is missing${src ? ` for\\n${src}` : '.'}`;\n const el = document.createElement('p');\n el.className = 'code-missing';\n el.textContent = msg;\n this.setCodeHtml(fromOuterHTML(el));\n }\n\n /** Sets the innerHTML of the code container to the provided code string. */\n private setCodeHtml(formattedCode: TrustedHTML) {\n // **Security:** Code example content is provided by docs authors and as such its considered to\n // be safe for innerHTML purposes.\n this.codeContainer.nativeElement.innerHTML = unwrapHtmlForSink(formattedCode);\n }\n\n /** Gets the textContent of the displayed code element. */\n private getCodeText() {\n // `prettify` may remove newlines, e.g. when `linenums` are on. Retrieve the content of the\n // container as text, before prettifying it.\n // We take the textContent because we don't want it to be HTML encoded.\n return this.codeContainer.nativeElement.textContent;\n }\n\n /** Copies the code snippet to the user's clipboard. */\n doCopy() {\n const code = this.codeText;\n const successfullyCopied = this.clipboard.copy(code);\n\n if (successfullyCopied) {\n this.logger.log('Copied code to clipboard:', code);\n this.snackbar.open('Code Copied', '', { duration: 800 });\n } else {\n this.logger.error(new Error(`ERROR copying code to clipboard: \"${code}\"`));\n this.snackbar.open('Copy failed. Please try again!', '', { duration: 800 });\n }\n }\n\n /** Gets the calculated value of linenums (boolean/number). */\n getLinenums() {\n const linenums =\n typeof this.linenums === 'boolean' ? this.linenums :\n this.linenums === 'true' ? true :\n this.linenums === 'false' ? false :\n typeof this.linenums === 'string' ? parseInt(this.linenums, 10) :\n this.linenums;\n\n return (linenums != null) && !isNaN(linenums as number) && linenums;\n }\n}\n\nfunction leftAlign(text: TrustedHTML): TrustedHTML {\n let indent = Number.MAX_VALUE;\n\n const lines = text.toString().split('\\n');\n lines.forEach(line => {\n const lineIndent = line.search(/\\S/);\n if (lineIndent !== -1) {\n indent = Math.min(lineIndent, indent);\n }\n });\n\n return htmlFromStringKnownToSatisfyTypeContract(\n lines.map(line => line.substr(indent)).join('\\n').trim(),\n 'safe manipulation of existing trusted HTML');\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CodeComponent } from './code.component';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { PrettyPrinter } from './pretty-printer.service';\n\n@NgModule({\n imports: [ CommonModule, MatSnackBarModule ],\n declarations: [ CodeComponent ],\n entryComponents: [ CodeComponent ],\n exports: [ CodeComponent ],\n providers: [ PrettyPrinter ]\n})\nexport class CodeModule { }\n","import { Injectable } from '@angular/core';\nimport { htmlFromStringKnownToSatisfyTypeContract } from 'safevalues/unsafe/reviewed';\n\nimport { from, Observable } from 'rxjs';\nimport { first, map, share } from 'rxjs/operators';\n\nimport { Logger } from 'app/shared/logger.service';\n\ntype PrettyPrintOne = (code: TrustedHTML, language?: string, linenums?: number|boolean) => string;\n\n/**\n * Wrapper around the prettify.js library\n */\n@Injectable()\nexport class PrettyPrinter {\n\n private prettyPrintOne: Observable<PrettyPrintOne>;\n\n constructor(private logger: Logger) {\n this.prettyPrintOne = from(this.getPrettyPrintOne()).pipe(share());\n }\n\n private getPrettyPrintOne(): Promise<PrettyPrintOne> {\n const ppo = (window as any).prettyPrintOne;\n return ppo ? Promise.resolve(ppo) :\n // `prettyPrintOne` is not on `window`, which means `prettify.js` has not been loaded yet.\n // Import it; ad a side-effect it will add `prettyPrintOne` on `window`.\n import('assets/js/prettify.js' as any)\n .then(\n () => (window as any).prettyPrintOne,\n err => {\n const msg = `Cannot get prettify.js from server: ${err.message}`;\n this.logger.error(new Error(msg));\n // return a pretty print fn that always fails.\n return () => { throw new Error(msg); };\n });\n }\n\n /**\n * Format code snippet as HTML.\n *\n * @param code - the code snippet to format; should already be HTML encoded\n * @param [language] - The language of the code to render (could be javascript, html, typescript, etc)\n * @param [linenums] - Whether to display line numbers:\n * - false: don't display\n * - true: do display\n * - number: do display but start at the given number\n * @returns Observable<string> - Observable of formatted code\n */\n formatCode(code: TrustedHTML, language?: string, linenums?: number|boolean) {\n return this.prettyPrintOne.pipe(\n map(ppo => {\n try {\n return htmlFromStringKnownToSatisfyTypeContract(\n ppo(code, language, linenums), 'prettify.js modifies already trusted HTML inline');\n } catch (err) {\n const msg = `Could not format code that begins '${code.toString().substr(0, 50)}...'.`;\n console.error(msg, err);\n throw new Error(msg);\n }\n }),\n first(), // complete immediately\n );\n }\n}\n"],"sourceRoot":"webpack:///","file":"default-src_app_custom-elements_code_code_component_ts-src_app_custom-elements_code_code_module_ts.81844719a12f2618.js"}