-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path1-es2015.6de6788787a110055b42.js.map
1 lines (1 loc) · 289 KB
/
1-es2015.6de6788787a110055b42.js.map
1
{"version":3,"sources":["webpack:///./src/app/shared/copier.service.ts","webpack:///./src/app/custom-elements/code/code.component.ngfactory.js.pre-build-optimizer.js","webpack:///./src/app/custom-elements/code/code.component.ts.CodeComponent.html","webpack:///./src/app/custom-elements/code/code.component.ts","webpack:///./node_modules/@angular/cdk/esm2015/overlay.js.pre-build-optimizer.js","webpack:///./src/app/custom-elements/code/code.module.ts","webpack:///./node_modules/@angular/cdk/esm2015/layout.js.pre-build-optimizer.js","webpack:///./node_modules/@angular/material/esm2015/snack-bar.js.pre-build-optimizer.js","webpack:///./src/app/custom-elements/code/pretty-printer.service.ts","webpack:///./node_modules/@angular/material/snack-bar/typings/index.ngfactory.js.pre-build-optimizer.js","webpack:///./node_modules/@angular/material/snack-bar/typings/index.d.ts.MatSnackBarContainer.html","webpack:///./node_modules/@angular/material/snack-bar/typings/index.d.ts.SimpleSnackBar.html","webpack:///./node_modules/@angular/cdk/esm2015/portal.js.pre-build-optimizer.js"],"names":["__webpack_require__","d","__webpack_exports__","CopierService","[object Object]","text","docElem","document","documentElement","isRTL","getAttribute","this","fakeElem","createElement","style","fontSize","border","padding","margin","position","yPosition","window","pageYOffset","scrollTop","top","setAttribute","value","body","appendChild","select","setSelectionRange","length","removeChild","createFake","execCommand","err","removeFake","RenderType_CodeComponent","View_CodeComponent_0","CodeComponentNgFactory","_angular_core__WEBPACK_IMPORTED_MODULE_0__","_angular_common__WEBPACK_IMPORTED_MODULE_1__","_code_component__WEBPACK_IMPORTED_MODULE_2__","_angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_3__","_pretty_printer_service__WEBPACK_IMPORTED_MODULE_4__","_shared_copier_service__WEBPACK_IMPORTED_MODULE_5__","_shared_logger_service__WEBPACK_IMPORTED_MODULE_6__","encapsulation","styles","data","View_CodeComponent_1","_l","_v","en","$event","ad","component","doCopy","_ck","ariaLabel","codeContainer","ngIf","hideCopy","language","View_CodeComponent_Host_0","linenums","path","region","header","codeFormatted","CodeComponent","rxjs_operators__WEBPACK_IMPORTED_MODULE_1__","DEFAULT_LINE_NUMS_COUNT","snackbar","pretty","copier","logger","code","_code","trim","formatDisplayedCode","showMissingCodeMessage","_header","leftAlignedCode","indent","Number","MAX_VALUE","lines","split","forEach","line","lineIndent","search","Math","min","map","substr","join","leftAlign","setCodeHtml","codeText","getCodeText","formatCode","getLinenums","pipe","Object","emit","subscribe","c","src","formattedCode","nativeElement","innerHTML","textContent","copyText","log","open","duration","error","Error","parseInt","isNaN","match","Overlay","OverlayContainer","OverlayKeyboardDispatcher","OverlayPositionBuilder","OverlayConfig","ScrollStrategyOptions","OverlayModule","CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY","CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY","_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_0__","_angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_1__","_angular_common__WEBPACK_IMPORTED_MODULE_2__","_angular_core__WEBPACK_IMPORTED_MODULE_3__","rxjs__WEBPACK_IMPORTED_MODULE_4__","rxjs__WEBPACK_IMPORTED_MODULE_5__","rxjs__WEBPACK_IMPORTED_MODULE_6__","rxjs__WEBPACK_IMPORTED_MODULE_7__","rxjs_operators__WEBPACK_IMPORTED_MODULE_8__","rxjs_operators__WEBPACK_IMPORTED_MODULE_9__","_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_10__","_angular_cdk_portal__WEBPACK_IMPORTED_MODULE_11__","BlockScrollStrategy","_viewportRuler","_previousHTMLStyles","left","_isEnabled","_document","_canBeEnabled","root","_previousScrollPosition","getViewportScrollPosition","classList","add","html","htmlStyle","bodyStyle","previousHtmlScrollBehavior","scrollBehavior","previousBodyScrollBehavior","remove","scroll","contains","viewport","getViewportSize","scrollHeight","height","scrollWidth","width","getMatScrollStrategyAlreadyAttachedError","CloseScrollStrategy","_scrollDispatcher","_ngZone","_config","_scrollSubscription","_detach","disable","_overlayRef","hasAttached","run","detach","overlayRef","stream","scrolled","threshold","_initialScrollPosition","scrollPosition","abs","updatePosition","unsubscribe","NoopScrollStrategy","isElementScrolledOutsideView","element","scrollContainers","some","containerBounds","bottom","right","isElementClippedByScrolling","scrollContainerRect","RepositionScrollStrategy","scrollThrottle","autoClose","overlayRect","overlayElement","getBoundingClientRect","noop","close","config","block","reposition","ngInjectableDef","factory","token","providedIn","scrollStrategy","panelClass","hasBackdrop","backdropClass","disposeOnNavigation","keys","k","ConnectionPositionPair","origin","overlay","offsetX","offsetY","originX","originY","overlayX","overlayY","ConnectedOverlayPositionChange","connectionPair","scrollableViewProperties","validateVerticalPosition","property","validateHorizontalPosition","_attachedOverlays","_keydownListener","event","overlays","i","_keydownEventSubscriptions","_keydownEvents","next","_isAttached","addEventListener","push","index","indexOf","splice","removeEventListener","_containerElement","parentNode","_createContainer","container","OverlayRef","_portalOutlet","_host","_pane","_keyboardDispatcher","_location","_backdropElement","_backdropClick","_attachments","_detachments","_locationChanges","EMPTY","_keydownEventsObservable","observer","subscription","_scrollStrategy","attach","_positionStrategy","positionStrategy","backdropElement","hostElement","portal","attachResult","parentElement","_previousHostParent","_updateStackingOrder","_updateElementSize","_updateElementDirection","enable","onStable","asObservable","_togglePointerEvents","_attachBackdrop","_toggleClasses","dispose","detachBackdrop","detachmentResult","_detachContentWhenStable","isAttached","_disposeScrollStrategy","complete","apply","strategy","sizeConfig","assign","dir","direction","classes","getDirection","minWidth","minHeight","maxWidth","maxHeight","enablePointer","pointerEvents","insertBefore","requestAnimationFrame","runOutsideAngular","nextSibling","timeoutId","backdropToDetach","finishDetach","clearTimeout","setTimeout","cssClasses","isAdd","cssClass","children","boundingBoxClass","FlexibleConnectedPositionStrategy","connectedTo","_platform","_overlayContainer","_lastBoundingBoxSize","_isPushed","_canPush","_growAfterOpen","_hasFlexibleDimensions","_positionLocked","_viewportMargin","scrollables","_preferredPositions","_positionChanges","_resizeSubscription","_offsetX","_offsetY","_positionChangeSubscriptions","_appliedPanelClasses","positionChanges","setOrigin","positions","_validatePositions","_boundingBox","_isDisposed","_isInitialRender","_lastPosition","change","isBrowser","reapplyLastPosition","_clearPanelClasses","_resetOverlayElementStyles","_resetBoundingBoxStyles","_viewportRect","_getNarrowedViewportRect","_originRect","_getOriginRect","_overlayRect","originRect","viewportRect","flexibleFits","fallback","pos","originPoint","_getOriginPoint","overlayPoint","_getOverlayPoint","overlayFit","_getOverlayFit","isCompletelyWithinViewport","_applyPosition","_canFitWithFlexibleDimensions","boundingBoxRect","_calculateBoundingBoxRect","visibleArea","bestFit","bestScore","fit","score","weight","_previousPushAmount","extendStyles","alignItems","justifyContent","lastPosition","flexibleDimensions","growAfterOpen","canPush","isLocked","_origin","offset","selector","_transformOriginSelector","x","y","startX","_isRtl","endX","overlayStartX","overlayStartY","point","_getOffset","topOverflow","bottomOverflow","visibleWidth","_subtractOverflows","visibleHeight","fitsInViewportVertically","fitsInViewportHorizontally","availableHeight","availableWidth","getConfig","horizontalFit","start","overflowRight","max","overflowBottom","overflowTop","overflowLeft","pushX","pushY","_setTransformOrigin","_setOverlayElementStyles","_setBoundingBoxStyles","_addPanelClasses","_getScrollVisibility","changeEvent","elements","querySelectorAll","xOrigin","yOrigin","transformOrigin","isRtl","smallestDistanceToViewportEdge","previousHeight","previousWidth","_hasExactPosition","transform","_getExactOverlayY","_getExactOverlayX","transformString","_pushOverlayOnScreen","virtualKeyboardOffset","getContainerElement","clientHeight","horizontalStyleProperty","clientWidth","originBounds","overlayBounds","scrollContainerBounds","scrollable","getElementRef","isOriginClipped","isOriginOutsideView","isOverlayClipped","isOverlayOutsideView","overflows","reduce","currentValue","currentOverflow","axis","pair","HTMLElement","dest","source","key","hasOwnProperty","ConnectedPositionStrategy","originPos","overlayPos","viewportRuler","platform","overlayContainer","withFlexibleDimensions","withPush","withViewportMargin","withFallbackPosition","onPositionChange","_direction","setDirection","withScrollableContainers","withPositions","withDefaultOffsetX","withDefaultOffsetY","withLockedPosition","slice","wrapperClass","GlobalPositionStrategy","_cssPosition","_topOffset","_bottomOffset","_leftOffset","_rightOffset","_alignItems","_justifyContent","_width","_height","updateSize","parentStyles","marginLeft","marginTop","marginBottom","marginRight","parent","elementRef","nextUniqueId","scrollStrategies","_componentFactoryResolver","_positionBuilder","_injector","_directionality","host","_createHostElement","pane","_createPaneElement","portalOutlet","_createPortalOutlet","overlayConfig","id","_appRef","get","CodeModule","mediaQueriesForWebkitCompatibility","Set","mediaQueryStyleNode","MediaMatcher","_matchMedia","matchMedia","bind","noopMatchMedia","query","WEBKIT","has","sheet","insertRule","e","console","createEmptyStyleRule","core","matches","media","addListener","removeListener","BreakpointObserver","mediaMatcher","zone","_queries","Map","_destroySubject","Subject","splitQueries","coercion","mediaQuery","_registerQuery","mql","observables","observable","combineLatest","debounceTime","asap","breakpointStates","response","breakpoints","state","output","Observable","handler","startWith","nextMql","takeUntil","set","layout_MediaMatcher","queries","a1","a2","concat","Breakpoints","XSmall","Small","Medium","Large","XLarge","Handset","Tablet","Web","HandsetPortrait","TabletPortrait","WebPortrait","HandsetLandscape","TabletLandscape","WebLandscape","MatSnackBarModule","snack_bar_MatSnackBar","snack_bar_MatSnackBarContainer","MAT_SNACK_BAR_DATA","MatSnackBarConfig","snack_bar_MatSnackBarRef","SimpleSnackBar","containerInstance","_afterDismissed","_afterOpened","_onAction","_dismissedByAction","onAction","dismiss","_onExit","_finishDismiss","closed","exit","_durationTimeoutId","dismissWithAction","dismissedByAction","_onEnter","politeness","announcementMessage","horizontalPosition","verticalPosition","snackBarRef","hasAction","action","esm2015_portal","_elementRef","_changeDetectorRef","snackBarConfig","super","_destroyed","_animationState","_role","_assertNotAttached","_applySnackBarClasses","attachComponentPortal","attachTemplatePortal","fromState","toState","_completeExit","onEnter","detectChanges","onMicrotaskEmpty","take","panelClasses","Array","isArray","MAT_SNACK_BAR_DEFAULT_OPTIONS","MatSnackBar","_overlay","_live","_breakpointObserver","_parentSnackBar","_defaultConfig","_snackBarRefAtThisLevel","_openedSnackBarRef","_attach","template","message","openFromComponent","injector","viewContainerRef","WeakMap","containerPortal","containerRef","instance","content","userConfig","_createOverlay","_attachSnackBarContainer","$implicit","_createInjector","undefined","contentRef","observe","detachments","state$$1","_animateSnackBar","afterDismissed","clear","enter","afterOpened","_dismissAfter","announce","global","isLeft","isRight","centerHorizontally","create","a11y","layout_BreakpointObserver","PrettyPrinter","rxjs__WEBPACK_IMPORTED_MODULE_0__","rxjs_operators__WEBPACK_IMPORTED_MODULE_2__","rxjs_operators__WEBPACK_IMPORTED_MODULE_3__","prettyPrintOne","getPrettyPrintOne","ppo","Promise","resolve","then","t","msg","MatSnackBarContainerNgFactory","SimpleSnackBarNgFactory","_angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_1__","_angular_common__WEBPACK_IMPORTED_MODULE_3__","_angular_cdk_portal__WEBPACK_IMPORTED_MODULE_5__","_angular_material_button__WEBPACK_IMPORTED_MODULE_10__","_button_typings_index_ngfactory__WEBPACK_IMPORTED_MODULE_11__","_angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_12__","_angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_13__","RenderType_MatSnackBarContainer","animation","type","name","definitions","opacity","options","expr","timings","View_MatSnackBarContainer_1","View_MatSnackBarContainer_0","View_MatSnackBarContainer_Host_0","onAnimationEnd","RenderType_SimpleSnackBar","View_SimpleSnackBar_1","_co","disabled","_animationMode","View_SimpleSnackBar_0","View_SimpleSnackBar_Host_0","ComponentPortal","TemplatePortal","BasePortalOutlet","DomPortalOutlet","CdkPortal","CdkPortalOutlet","PortalModule","PortalInjector","throwPortalAlreadyAttachedError","Portal","throwNullPortalOutletError","_attachedHost","throwNoPortalAttachedError","componentFactoryResolver","context","templateRef","_attachedPortal","throwNullPortalError","throwPortalOutletAlreadyDisposedError","throwUnknownPortalTypeError","setAttachedHost","_invokeDisposeFn","fn","_disposeFn","outletElement","_defaultInjector","componentFactory","resolveComponentFactory","componentRef","createComponent","setDisposeFn","destroy","attachView","hostView","detachView","_getComponentRootNode","viewContainer","viewRef","createEmbeddedView","rootNodes","rootNode","_viewContainerRef","_isInitialized","attached","attachedRef","_attachedRef","ref","_parentInjector","_customTokens","notFoundValue"],"mappings":"6FAAAA,EAAAC,EAAAC,EAAA,sBAAAC,IAUO,MAAMA,EAOTC,WAAWC,GACT,MAAMC,EAAUC,SAASC,gBACnBC,EAAwC,QAAhCH,EAAQI,aAAa,OAGnCC,KAAKC,SAAWL,SAASM,cAAc,YAGvCF,KAAKC,SAASE,MAAMC,SAAW,OAG/BJ,KAAKC,SAASE,MAAME,OAAS,IAC7BL,KAAKC,SAASE,MAAMG,QAAU,IAC9BN,KAAKC,SAASE,MAAMI,OAAS,IAG7BP,KAAKC,SAASE,MAAMK,SAAW,WAC/BR,KAAKC,SAASE,MAAOL,EAAQ,QAAU,QAAW,UAGlD,MAAMW,EAAYC,OAAOC,aAAehB,EAAQiB,UAChDZ,KAAKC,SAASE,MAAMU,IAAMJ,EAAY,KAEtCT,KAAKC,SAASa,aAAa,WAAY,IACvCd,KAAKC,SAASc,MAAQrB,EAEtBE,SAASoB,KAAKC,YAAYjB,KAAKC,UAE/BD,KAAKC,SAASiB,SACdlB,KAAKC,SAASkB,kBAAkB,EAAGnB,KAAKC,SAASc,MAAMK,QAGzD3B,aACMO,KAAKC,WACPL,SAASoB,KAAKK,YAAYrB,KAAKC,UAC/BD,KAAKC,SAAW,MAIpBR,SAASC,GACP,IAEE,OADAM,KAAKsB,WAAW5B,GACTE,SAAS2B,YAAY,QAC5B,MAAOC,GACP,OAAO,UAEPxB,KAAKyB,qDC/DbpC,EAAAC,EAAAC,EAAA,sBAAAmC,IAAArC,EAAAC,EAAAC,EAAA,sBAAAoC,IAAAtC,EAAAC,EAAAC,EAAA,sBAAAqC,IAAA,IAAAC,EAAAxC,EAAA,QAAAyC,EAAAzC,EAAA,QAAA0C,EAAA1C,EAAA,QAAA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oB,KAAK4vB,kBAIHf,GAFWje,EAAOod,0BAA4BhuB,KAAKuf,2BAEvBuP,wBAAwBle,EAAO/N,WAE3DotB,EAAMrH,EAAiBoG,gBAAgBH,EAAkBjG,EAAiBxnB,OAAQwP,EAAO+X,UAAYC,EAAiBD,UAQ5H,OAPA/B,MAAMqI,aAAa,IAGbgB,EAAIf,WACVlvB,KAAKmuB,gBAAkBvd,EACvB5Q,KAAKgwB,aAAeC,EACpBjwB,KAAK8vB,SAAS/pB,KAAKkqB,GACZA,EAQXxwB,qBAAqBmR,GACjBA,EAAO2d,gBAAgBvuB,MAEvB,MAAMwvB,EAAUxvB,KAAK4vB,kBAAkBH,mBAAmB7e,EAAOsd,YAAatd,EAAOqd,SAQrF,OAPArH,MAAMqI,aAAa,IAGbjvB,KAAK4vB,kBAAkB9F,SAC7B9pB,KAAKmuB,gBAAkBvd,EACvB5Q,KAAKgwB,aAAeR,EACpBxvB,KAAK8vB,SAAS/pB,KAAKypB,GACZA,GAkBf,MAAM/B,GAmBN,MAAMC,EAKFjuB,YAAYywB,EAAiBC,GACzBnwB,KAAKkwB,gBAAkBA,EACvBlwB,KAAKmwB,cAAgBA,EAOzB1wB,IAAImN,EAAOwjB,GAEP,MAAMrvB,EAAQf,KAAKmwB,cAAc/P,IAAIxT,GACrC,YAAqB,IAAV7L,EACAA,EAEJf,KAAKkwB,gBAAgB9P,IAAIxT,EAAOwjB","file":"1-es2015.6de6788787a110055b42.js","sourcesContent":["/**\n * This class is based on the code in the following projects:\n *\n * - https://github.com/zenorocha/select\n * - https://github.com/zenorocha/clipboard.js/\n *\n * Both released under MIT license - © Zeno Rocha\n */\n\n\nexport class CopierService {\n private fakeElem: HTMLTextAreaElement|null;\n\n /**\n * Creates a fake textarea element, sets its value from `text` property,\n * and makes a selection on it.\n */\n createFake(text: string) {\n const docElem = document.documentElement!;\n const isRTL = docElem.getAttribute('dir') === 'rtl';\n\n // Create a fake element to hold the contents to copy\n this.fakeElem = document.createElement('textarea');\n\n // Prevent zooming on iOS\n this.fakeElem.style.fontSize = '12pt';\n\n // Reset box model\n this.fakeElem.style.border = '0';\n this.fakeElem.style.padding = '0';\n this.fakeElem.style.margin = '0';\n\n // Move element out of screen horizontally\n this.fakeElem.style.position = 'absolute';\n this.fakeElem.style[ isRTL ? 'right' : 'left' ] = '-9999px';\n\n // Move element to the same position vertically\n const yPosition = window.pageYOffset || docElem.scrollTop;\n this.fakeElem.style.top = yPosition + 'px';\n\n this.fakeElem.setAttribute('readonly', '');\n this.fakeElem.value = text;\n\n document.body.appendChild(this.fakeElem);\n\n this.fakeElem.select();\n this.fakeElem.setSelectionRange(0, this.fakeElem.value.length);\n }\n\n removeFake() {\n if (this.fakeElem) {\n document.body.removeChild(this.fakeElem);\n this.fakeElem = null;\n }\n }\n\n copyText(text: string) {\n try {\n this.createFake(text);\n return document.execCommand('copy');\n } catch (err) {\n return false;\n } finally {\n this.removeFake();\n }\n }\n}\n","/**\n * @fileoverview This file was generated by the Angular template compiler. Do not edit.\n *\n * @suppress {suspiciousCode,uselessCode,missingProperties,missingOverride,checkTypes}\n * tslint:disable\n */ \nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"@angular/common\";\nimport * as i2 from \"./code.component\";\nimport * as i3 from \"@angular/material/snack-bar\";\nimport * as i4 from \"./pretty-printer.service\";\nimport * as i5 from \"../../shared/copier.service\";\nimport * as i6 from \"../../shared/logger.service\";\nvar styles_CodeComponent = [];\nvar RenderType_CodeComponent = i0.ɵcrt({ encapsulation: 2, styles: styles_CodeComponent, data: {} });\nexport { RenderType_CodeComponent as RenderType_CodeComponent };\nfunction View_CodeComponent_1(_l) { return i0.ɵvid(0, [(_l()(), i0.ɵeld(0, 0, null, null, 4, \"button\", [[\"class\", \"material-icons copy-button no-print\"], [\"title\", \"Copy code snippet\"]], [[1, \"aria-label\", 0]], [[null, \"click\"]], function (_v, en, $event) { var ad = true; var _co = _v.component; if ((\"click\" === en)) {\n var pd_0 = (_co.doCopy() !== false);\n ad = (pd_0 && ad);\n } return ad; }, null, null)), (_l()(), i0.ɵted(-1, null, [\"\\n \"])), (_l()(), i0.ɵeld(2, 0, null, null, 1, \"span\", [[\"aria-hidden\", \"true\"]], null, null, null, null, null)), (_l()(), i0.ɵted(-1, null, [\"content_copy\"])), (_l()(), i0.ɵted(-1, null, [\"\\n \"]))], null, function (_ck, _v) { var _co = _v.component; var currVal_0 = _co.ariaLabel; _ck(_v, 0, 0, currVal_0); }); }\nexport function View_CodeComponent_0(_l) { return i0.ɵvid(0, [i0.ɵqud(402653184, 1, { codeContainer: 0 }), (_l()(), i0.ɵeld(1, 0, null, null, 6, \"pre\", [], [[8, \"className\", 0]], null, null, null, null)), (_l()(), i0.ɵted(-1, null, [\" \"])), (_l()(), i0.ɵand(16777216, null, null, 1, null, View_CodeComponent_1)), i0.ɵdid(4, 16384, null, 0, i1.NgIf, [i0.ViewContainerRef, i0.TemplateRef], { ngIf: [0, \"ngIf\"] }, null), (_l()(), i0.ɵted(-1, null, [\"\\n \"])), (_l()(), i0.ɵeld(6, 0, [[1, 0], [\"codeContainer\", 1]], null, 0, \"code\", [[\"class\", \"animated fadeIn\"]], null, null, null, null, null)), (_l()(), i0.ɵted(-1, null, [\"\\n \"]))], function (_ck, _v) { var _co = _v.component; var currVal_1 = !_co.hideCopy; _ck(_v, 4, 0, currVal_1); }, function (_ck, _v) { var _co = _v.component; var currVal_0 = i0.ɵinlineInterpolate(1, \"prettyprint lang-\", _co.language, \"\"); _ck(_v, 1, 0, currVal_0); }); }\nexport function View_CodeComponent_Host_0(_l) { return i0.ɵvid(0, [(_l()(), i0.ɵeld(0, 0, null, null, 1, \"aio-code\", [], null, null, null, View_CodeComponent_0, RenderType_CodeComponent)), i0.ɵdid(1, 573440, null, 0, i2.CodeComponent, [i3.MatSnackBar, i4.PrettyPrinter, i5.CopierService, i6.Logger], null, null)], null, null); }\nvar CodeComponentNgFactory = i0.ɵccf(\"aio-code\", i2.CodeComponent, View_CodeComponent_Host_0, { hideCopy: \"hideCopy\", language: \"language\", linenums: \"linenums\", path: \"path\", region: \"region\", header: \"header\" }, { codeFormatted: \"codeFormatted\" }, []);\nexport { CodeComponentNgFactory as CodeComponentNgFactory };\n","\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 ","import { Component, ElementRef, EventEmitter, Input, OnChanges, Output, ViewChild } from '@angular/core';\nimport { Logger } from 'app/shared/logger.service';\nimport { PrettyPrinter } from './pretty-printer.service';\nimport { CopierService } from 'app/shared/copier.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { tap } from 'rxjs/operators';\n\n/**\n * If linenums is not set, this is the default maximum number of lines that\n * an example can display without line numbers.\n */\nconst DEFAULT_LINE_NUMS_COUNT = 10;\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: string) {\n this._code = code;\n\n if (!this._code || !this._code.trim()) {\n this.showMissingCodeMessage();\n } else {\n this.formatDisplayedCode();\n }\n }\n get code(): string { return this._code; }\n _code: string;\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;\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;\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) {\n this._header = header;\n this.ariaLabel = this.header ? `Copy code snippet from ${this.header}` : '';\n }\n get header(): string { return this._header; }\n private _header: string;\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 copier: CopierService,\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 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 this.pretty\n .formatCode(leftAlignedCode, this.language, this.getLinenums(leftAlignedCode))\n .pipe(tap(() => this.codeFormatted.emit()))\n .subscribe(c => this.setCodeHtml(c), err => { /* ignore failure to format */ }\n );\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 srcMsg = src ? ` for\\n${src}` : '.';\n this.setCodeHtml(`<p class=\"code-missing\">The code sample is missing${srcMsg}</p>`);\n }\n\n /** Sets the innerHTML of the code container to the provided code string. */\n private setCodeHtml(formattedCode: string) {\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 = 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.copier.copyText(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(code: string) {\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 // if no linenums, enable line numbers if more than one line\n return linenums == null || isNaN(linenums as number) ?\n (code.match(/\\n/g) || []).length > DEFAULT_LINE_NUMS_COUNT : linenums;\n }\n}\n\nfunction leftAlign(text: string): string {\n let indent = Number.MAX_VALUE;\n\n const lines = text.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 lines.map(line => line.substr(indent)).join('\\n').trim();\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 { coerceCssPixelValue, coerceArray, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { ScrollDispatcher, ViewportRuler, ScrollingModule, VIEWPORT_RULER_PROVIDER } from '@angular/cdk/scrolling';\nexport { ViewportRuler, VIEWPORT_RULER_PROVIDER, CdkScrollable, ScrollDispatcher } from '@angular/cdk/scrolling';\nimport { DOCUMENT, Location } from '@angular/common';\nimport { Inject, Injectable, NgZone, Optional, NgModule, SkipSelf, ApplicationRef, ComponentFactoryResolver, Injector, ElementRef, Directive, EventEmitter, InjectionToken, Input, Output, TemplateRef, ViewContainerRef, ɵɵdefineInjectable, ɵɵinject } from '@angular/core';\nimport { Observable, Subject, merge, Subscription } from 'rxjs';\nimport { take, takeUntil } from 'rxjs/operators';\nimport { Platform } from '@angular/cdk/platform';\nimport { Directionality, BidiModule } from '@angular/cdk/bidi';\nimport { DomPortalOutlet, TemplatePortal, PortalModule } from '@angular/cdk/portal';\nimport { ESCAPE } from '@angular/cdk/keycodes';\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * Strategy that will prevent the user from scrolling while the overlay is visible.\n */\nclass BlockScrollStrategy {\n /**\n * @param {?} _viewportRuler\n * @param {?} document\n */\n constructor(_viewportRuler, document) {\n this._viewportRuler = _viewportRuler;\n this._previousHTMLStyles = { top: '', left: '' };\n this._isEnabled = false;\n this._document = document;\n }\n /**\n * Attaches this scroll strategy to an overlay.\n * @return {?}\n */\n attach() { }\n /**\n * Blocks page-level scroll while the attached overlay is open.\n * @return {?}\n */\n enable() {\n if (this._canBeEnabled()) {\n /** @type {?} */\n const root = (/** @type {?} */ (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 /**\n * Unblocks page-level scroll while the attached overlay is open.\n * @return {?}\n */\n disable() {\n if (this._isEnabled) {\n /** @type {?} */\n const html = (/** @type {?} */ (this._document.documentElement));\n /** @type {?} */\n const body = (/** @type {?} */ (this._document.body));\n /** @type {?} */\n const htmlStyle = (/** @type {?} */ (html.style));\n /** @type {?} */\n const bodyStyle = (/** @type {?} */ (body.style));\n /** @type {?} */\n const previousHtmlScrollBehavior = htmlStyle.scrollBehavior || '';\n /** @type {?} */\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 htmlStyle.scrollBehavior = bodyStyle.scrollBehavior = 'auto';\n window.scroll(this._previousScrollPosition.left, this._previousScrollPosition.top);\n htmlStyle.scrollBehavior = previousHtmlScrollBehavior;\n bodyStyle.scrollBehavior = previousBodyScrollBehavior;\n }\n }\n /**\n * @private\n * @return {?}\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 /** @type {?} */\n const html = (/** @type {?} */ (this._document.documentElement));\n if (html.classList.contains('cdk-global-scrollblock') || this._isEnabled) {\n return false;\n }\n /** @type {?} */\n const body = this._document.body;\n /** @type {?} */\n const viewport = this._viewportRuler.getViewportSize();\n return body.scrollHeight > viewport.height || body.scrollWidth > viewport.width;\n }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * Returns an error to be thrown when attempting to attach an already-attached scroll strategy.\n * @return {?}\n */\nfunction getMatScrollStrategyAlreadyAttachedError() {\n return Error(`Scroll strategy has already been attached.`);\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * Strategy that will close the overlay as soon as the user starts scrolling.\n */\nclass CloseScrollStrategy {\n /**\n * @param {?} _scrollDispatcher\n * @param {?} _ngZone\n * @param {?} _viewportRuler\n * @param {?=} _config\n */\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 /**\n * Detaches the overlay ref and disables the scroll strategy.\n */\n this._detach = (/**\n * @return {?}\n */\n () => {\n this.disable();\n if (this._overlayRef.hasAttached()) {\n this._ngZone.run((/**\n * @return {?}\n */\n () => this._overlayRef.detach()));\n }\n });\n }\n /**\n * Attaches this scroll strategy to an overlay.\n * @param {?} overlayRef\n * @return {?}\n */\n attach(overlayRef) {\n if (this._overlayRef) {\n throw getMatScrollStrategyAlreadyAttachedError();\n }\n this._overlayRef = overlayRef;\n }\n /**\n * Enables the closing of the attached overlay on scroll.\n * @return {?}\n */\n enable() {\n if (this._scrollSubscription) {\n return;\n }\n /** @type {?} */\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 * @return {?}\n */\n () => {\n /** @type {?} */\n const scrollPosition = this._viewportRuler.getViewportScrollPosition().top;\n if (Math.abs(scrollPosition - this._initialScrollPosition) > (/** @type {?} */ ((/** @type {?} */ (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 /**\n * Disables the closing the attached overlay on scroll.\n * @return {?}\n */\n disable() {\n if (this._scrollSubscription) {\n this._scrollSubscription.unsubscribe();\n this._scrollSubscription = null;\n }\n }\n /**\n * @return {?}\n */\n detach() {\n this.disable();\n this._overlayRef = (/** @type {?} */ (null));\n }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\n/**\n * Scroll strategy that doesn't do anything.\n */\nclass NoopScrollStrategy {\n /**\n * Does nothing, as this scroll strategy is a no-op.\n * @return {?}\n */\n enable() { }\n /**\n * Does nothing, as this scroll strategy is a no-op.\n * @return {?}\n */\n disable() { }\n /**\n * Does nothing, as this scroll strategy is a no-op.\n * @return {?}\n */\n attach() { }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\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 * \\@docs-private\n * @param {?} element Dimensions of the element (from getBoundingClientRect)\n * @param {?} scrollContainers Dimensions of element's scrolling containers (from getBoundingClientRect)\n * @return {?} Whether the element is scrolled out of view\n */\nfunction isElementScrolledOutsideView(element, scrollContainers) {\n return scrollContainers.some((/**\n * @param {?} containerBounds\n * @return {?}\n */\n containerBounds => {\n /** @type {?} */\n const outsideAbove = element.bottom < containerBounds.top;\n /** @type {?} */\n const outsideBelow = element.top > containerBounds.bottom;\n /** @type {?} */\n const outsideLeft = element.right < containerBounds.left;\n /** @type {?} */\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 * \\@docs-private\n * @param {?} element Dimensions of the element (from getBoundingClientRect)\n * @param {?} scrollContainers Dimensions of element's scrolling containers (from getBoundingClientRect)\n * @return {?} Whether the element is clipped\n */\nfunction isElementClippedByScrolling(element, scrollContainers) {\n return scrollContainers.some((/**\n * @param {?} scrollContainerRect\n * @return {?}\n */\n scrollContainerRect => {\n /** @type {?} */\n const clippedAbove = element.top < scrollContainerRect.top;\n /** @type {?} */\n const clippedBelow = element.bottom > scrollContainerRect.bottom;\n /** @type {?} */\n const clippedLeft = element.left < scrollContainerRect.left;\n /** @type {?} */\n const clippedRight = element.right > scrollContainerRect.right;\n return clippedAbove || clippedBelow || clippedLeft || clippedRight;\n }));\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * Strategy that will update the element position as the user is scrolling.\n */\nclass RepositionScrollStrategy {\n /**\n * @param {?} _scrollDispatcher\n * @param {?} _viewportRuler\n * @param {?} _ngZone\n * @param {?=} _config\n */\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 /**\n * Attaches this scroll strategy to an overlay.\n * @param {?} overlayRef\n * @return {?}\n */\n attach(overlayRef) {\n if (this._overlayRef) {\n throw getMatScrollStrategyAlreadyAttachedError();\n }\n this._overlayRef = overlayRef;\n }\n /**\n * Enables repositioning of the attached overlay on scroll.\n * @return {?}\n */\n enable() {\n if (!this._scrollSubscription) {\n /** @type {?} */\n const throttle = this._config ? this._config.scrollThrottle : 0;\n this._scrollSubscription = this._scrollDispatcher.scrolled(throttle).subscribe((/**\n * @return {?}\n */\n () => {\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 /** @type {?} */\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 /** @type {?} */\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((/**\n * @return {?}\n */\n () => this._overlayRef.detach()));\n }\n }\n }));\n }\n }\n /**\n * Disables repositioning of the attached overlay on scroll.\n * @return {?}\n */\n disable() {\n if (this._scrollSubscription) {\n this._scrollSubscription.unsubscribe();\n this._scrollSubscription = null;\n }\n }\n /**\n * @return {?}\n */\n detach() {\n this.disable();\n this._overlayRef = (/** @type {?} */ (null));\n }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\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 /**\n * @param {?} _scrollDispatcher\n * @param {?} _viewportRuler\n * @param {?} _ngZone\n * @param {?} document\n */\n constructor(_scrollDispatcher, _viewportRuler, _ngZone, document) {\n this._scrollDispatcher = _scrollDispatcher;\n this._viewportRuler = _viewportRuler;\n this._ngZone = _ngZone;\n /**\n * Do nothing on scroll.\n */\n this.noop = (/**\n * @return {?}\n */\n () => 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 = (/**\n * @param {?=} config\n * @return {?}\n */\n (config) => new CloseScrollStrategy(this._scrollDispatcher, this._ngZone, this._viewportRuler, config));\n /**\n * Block scrolling.\n */\n this.block = (/**\n * @return {?}\n */\n () => 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 = (/**\n * @param {?=} config\n * @return {?}\n */\n (config) => new RepositionScrollStrategy(this._scrollDispatcher, this._viewportRuler, this._ngZone, config));\n this._document = document;\n }\n}\nScrollStrategyOptions.decorators = [\n { type: Injectable, args: [{ providedIn: 'root' },] },\n];\n/** @nocollapse */\nScrollStrategyOptions.ctorParameters = () => [\n { type: ScrollDispatcher },\n { type: ViewportRuler },\n { type: NgZone },\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n];\n/** @nocollapse */ ScrollStrategyOptions.ngInjectableDef = ɵɵdefineInjectable({ factory: function ScrollStrategyOptions_Factory() { return new ScrollStrategyOptions(ɵɵinject(ScrollDispatcher), ɵɵinject(ViewportRuler), ɵɵinject(NgZone), ɵɵinject(DOCUMENT)); }, token: ScrollStrategyOptions, providedIn: \"root\" });\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * Initial configuration used when creating an overlay.\n */\nclass OverlayConfig {\n /**\n * @param {?=} config\n */\n constructor(config) {\n /**\n * Strategy to be used when handling scroll events while the overlay is open.\n */\n this.scrollStrategy = new NoopScrollStrategy();\n /**\n * Custom class to add to the overlay pane.\n */\n this.panelClass = '';\n /**\n * Whether the overlay has a backdrop.\n */\n this.hasBackdrop = false;\n /**\n * Custom class to add to the backdrop\n */\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 Object.keys(config).forEach((/**\n * @param {?} k\n * @return {?}\n */\n k => {\n /** @type {?} */\n const key = (/** @type {?} */ (k));\n if (typeof config[key] !== 'undefined') {\n this[key] = config[key];\n }\n }));\n }\n }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * The points of the origin element and the overlay element to connect.\n */\nclass ConnectionPositionPair {\n /**\n * @param {?} origin\n * @param {?} overlay\n * @param {?=} offsetX\n * @param {?=} offsetY\n * @param {?=} panelClass\n */\n constructor(origin, overlay, offsetX, offsetY, 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/**\n * The change event emitted by the strategy when a fallback position is used.\n */\nclass ConnectedOverlayPositionChange {\n /**\n * @param {?} connectionPair\n * @param {?} scrollableViewProperties\n */\n constructor(connectionPair, scrollableViewProperties) {\n this.connectionPair = connectionPair;\n this.scrollableViewProperties = scrollableViewProperties;\n }\n}\n/** @nocollapse */\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 * \\@docs-private\n * @param {?} property Name of the property being validated.\n * @param {?} value Value of the property being validated.\n * @return {?}\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 * \\@docs-private\n * @param {?} property Name of the property being validated.\n * @param {?} value Value of the property being validated.\n * @return {?}\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 * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\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 {\n /**\n * @param {?} document\n */\n constructor(document) {\n /**\n * Currently attached overlays in the order they were attached.\n */\n this._attachedOverlays = [];\n /**\n * Keyboard event listener that will be attached to the body.\n */\n this._keydownListener = (/**\n * @param {?} event\n * @return {?}\n */\n (event) => {\n /** @type {?} */\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]._keydownEventSubscriptions > 0) {\n overlays[i]._keydownEvents.next(event);\n break;\n }\n }\n });\n this._document = document;\n }\n /**\n * @return {?}\n */\n ngOnDestroy() {\n this._detach();\n }\n /**\n * Add a new overlay to the list of attached overlay refs.\n * @param {?} overlayRef\n * @return {?}\n */\n add(overlayRef) {\n // Ensure that we don't get the same overlay multiple times.\n this.remove(overlayRef);\n // Lazily start dispatcher once first overlay is added\n if (!this._isAttached) {\n this._document.body.addEventListener('keydown', this._keydownListener, true);\n this._isAttached = true;\n }\n this._attachedOverlays.push(overlayRef);\n }\n /**\n * Remove an overlay from the list of attached overlay refs.\n * @param {?} overlayRef\n * @return {?}\n */\n remove(overlayRef) {\n /** @type {?} */\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 /**\n * Detaches the global keyboard event listener.\n * @private\n * @return {?}\n */\n _detach() {\n if (this._isAttached) {\n this._document.body.removeEventListener('keydown', this._keydownListener, true);\n this._isAttached = false;\n }\n }\n}\nOverlayKeyboardDispatcher.decorators = [\n { type: Injectable, args: [{ providedIn: 'root' },] },\n];\n/** @nocollapse */\nOverlayKeyboardDispatcher.ctorParameters = () => [\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n];\n/** @nocollapse */ OverlayKeyboardDispatcher.ngInjectableDef = ɵɵdefineInjectable({ factory: function OverlayKeyboardDispatcher_Factory() { return new OverlayKeyboardDispatcher(ɵɵinject(DOCUMENT)); }, token: OverlayKeyboardDispatcher, providedIn: \"root\" });\n/**\n * \\@docs-private \\@deprecated \\@breaking-change 8.0.0\n * @param {?} dispatcher\n * @param {?} _document\n * @return {?}\n */\nfunction OVERLAY_KEYBOARD_DISPATCHER_PROVIDER_FACTORY(dispatcher, _document) {\n return dispatcher || new OverlayKeyboardDispatcher(_document);\n}\n/**\n * \\@docs-private \\@deprecated \\@breaking-change 8.0.0\n * @type {?}\n */\nconst OVERLAY_KEYBOARD_DISPATCHER_PROVIDER = {\n // If there is already an OverlayKeyboardDispatcher available, use that.\n // Otherwise, provide a new one.\n provide: OverlayKeyboardDispatcher,\n deps: [\n [new Optional(), new SkipSelf(), OverlayKeyboardDispatcher],\n (/** @type {?} */ (\n // Coerce to `InjectionToken` so that the `deps` match the \"shape\"\n // of the type expected by Angular\n DOCUMENT))\n ],\n useFactory: OVERLAY_KEYBOARD_DISPATCHER_PROVIDER_FACTORY\n};\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * Container inside which all overlays will render.\n */\nclass OverlayContainer {\n /**\n * @param {?} _document\n */\n constructor(_document) {\n this._document = _document;\n }\n /**\n * @return {?}\n */\n ngOnDestroy() {\n if (this._containerElement && this._containerElement.parentNode) {\n this._containerElement.parentNode.removeChild(this._containerElement);\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 * @return {?} 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 * @protected\n * @return {?}\n */\n _createContainer() {\n /** @type {?} */\n const container = this._document.createElement('div');\n container.classList.add('cdk-overlay-container');\n this._document.body.appendChild(container);\n this._containerElement = container;\n }\n}\nOverlayContainer.decorators = [\n { type: Injectable, args: [{ providedIn: 'root' },] },\n];\n/** @nocollapse */\nOverlayContainer.ctorParameters = () => [\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n];\n/** @nocollapse */ OverlayContainer.ngInjectableDef = ɵɵdefineInjectable({ factory: function OverlayContainer_Factory() { return new OverlayContainer(ɵɵinject(DOCUMENT)); }, token: OverlayContainer, providedIn: \"root\" });\n/**\n * \\@docs-private \\@deprecated \\@breaking-change 8.0.0\n * @param {?} parentContainer\n * @param {?} _document\n * @return {?}\n */\nfunction OVERLAY_CONTAINER_PROVIDER_FACTORY(parentContainer, _document) {\n return parentContainer || new OverlayContainer(_document);\n}\n/**\n * \\@docs-private \\@deprecated \\@breaking-change 8.0.0\n * @type {?}\n */\nconst OVERLAY_CONTAINER_PROVIDER = {\n // If there is already an OverlayContainer available, use that. Otherwise, provide a new one.\n provide: OverlayContainer,\n deps: [\n [new Optional(), new SkipSelf(), OverlayContainer],\n (/** @type {?} */ (DOCUMENT))\n ],\n useFactory: OVERLAY_CONTAINER_PROVIDER_FACTORY\n};\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\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 /**\n * @param {?} _portalOutlet\n * @param {?} _host\n * @param {?} _pane\n * @param {?} _config\n * @param {?} _ngZone\n * @param {?} _keyboardDispatcher\n * @param {?} _document\n * @param {?=} _location\n */\n constructor(_portalOutlet, _host, _pane, _config, _ngZone, _keyboardDispatcher, _document, _location) {\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._backdropElement = null;\n this._backdropClick = new Subject();\n this._attachments = new Subject();\n this._detachments = new Subject();\n this._locationChanges = Subscription.EMPTY;\n this._keydownEventsObservable = new Observable((/**\n * @param {?} observer\n * @return {?}\n */\n (observer) => {\n /** @type {?} */\n const subscription = this._keydownEvents.subscribe(observer);\n this._keydownEventSubscriptions++;\n return (/**\n * @return {?}\n */\n () => {\n subscription.unsubscribe();\n this._keydownEventSubscriptions--;\n });\n }));\n /**\n * Stream of keydown events dispatched to this overlay.\n */\n this._keydownEvents = new Subject();\n /**\n * Amount of subscriptions to the keydown events.\n */\n this._keydownEventSubscriptions = 0;\n if (_config.scrollStrategy) {\n this._scrollStrategy = _config.scrollStrategy;\n this._scrollStrategy.attach(this);\n }\n this._positionStrategy = _config.positionStrategy;\n }\n /**\n * The overlay's HTML element\n * @return {?}\n */\n get overlayElement() {\n return this._pane;\n }\n /**\n * The overlay's backdrop HTML element.\n * @return {?}\n */\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 * @return {?}\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 * @return {?} The portal attachment result.\n */\n attach(portal) {\n /** @type {?} */\n let attachResult = this._portalOutlet.attach(portal);\n if (this._positionStrategy) {\n this._positionStrategy.attach(this);\n }\n // Update the pane element with the given configuration.\n if (!this._host.parentElement && this._previousHostParent) {\n this._previousHostParent.appendChild(this._host);\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 .asObservable()\n .pipe(take(1))\n .subscribe((/**\n * @return {?}\n */\n () => {\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 // @breaking-change 8.0.0 remove the null check for `_location`\n // once the constructor parameter is made required.\n if (this._config.disposeOnNavigation && this._location) {\n this._locationChanges = this._location.subscribe((/**\n * @return {?}\n */\n () => this.dispose()));\n }\n return attachResult;\n }\n /**\n * Detaches an overlay from a portal.\n * @return {?} 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 /** @type {?} */\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 DOM the 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 // Stop listening for location changes.\n this._locationChanges.unsubscribe();\n return detachmentResult;\n }\n /**\n * Cleans up the overlay from the DOM.\n * @return {?}\n */\n dispose() {\n /** @type {?} */\n const isAttached = this.hasAttached();\n if (this._positionStrategy) {\n this._positionStrategy.dispose();\n }\n this._disposeScrollStrategy();\n this.detachBackdrop();\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 if (this._host && this._host.parentNode) {\n this._host.parentNode.removeChild(this._host);\n this._host = (/** @type {?} */ (null));\n }\n this._previousHostParent = this._pane = (/** @type {?} */ (null));\n if (isAttached) {\n this._detachments.next();\n }\n this._detachments.complete();\n }\n /**\n * Whether the overlay has attached content.\n * @return {?}\n */\n hasAttached() {\n return this._portalOutlet.hasAttached();\n }\n /**\n * Gets an observable that emits when the backdrop has been clicked.\n * @return {?}\n */\n backdropClick() {\n return this._backdropClick.asObservable();\n }\n /**\n * Gets an observable that emits when the overlay has been attached.\n * @return {?}\n */\n attachments() {\n return this._attachments.asObservable();\n }\n /**\n * Gets an observable that emits when the overlay has been detached.\n * @return {?}\n */\n detachments() {\n return this._detachments.asObservable();\n }\n /**\n * Gets an observable of keydown events targeted to this overlay.\n * @return {?}\n */\n keydownEvents() {\n return this._keydownEventsObservable;\n }\n /**\n * Gets the current overlay configuration, which is immutable.\n * @return {?}\n */\n getConfig() {\n return this._config;\n }\n /**\n * Updates the position of the overlay based on the position strategy.\n * @return {?}\n */\n updatePosition() {\n if (this._positionStrategy) {\n this._positionStrategy.apply();\n }\n }\n /**\n * Switches to a new position strategy and updates the overlay position.\n * @param {?} strategy\n * @return {?}\n */\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 /**\n * Update the size properties of the overlay.\n * @param {?} sizeConfig\n * @return {?}\n */\n updateSize(sizeConfig) {\n this._config = Object.assign({}, this._config, sizeConfig);\n this._updateElementSize();\n }\n /**\n * Sets the LTR/RTL direction for the overlay.\n * @param {?} dir\n * @return {?}\n */\n setDirection(dir) {\n this._config = Object.assign({}, this._config, { direction: dir });\n this._updateElementDirection();\n }\n /**\n * Add a CSS class or an array of classes to the overlay pane.\n * @param {?} classes\n * @return {?}\n */\n addPanelClass(classes) {\n if (this._pane) {\n this._toggleClasses(this._pane, classes, true);\n }\n }\n /**\n * Remove a CSS class or an array of classes from the overlay pane.\n * @param {?} classes\n * @return {?}\n */\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 * @return {?}\n */\n getDirection() {\n /** @type {?} */\n const direction = this._config.direction;\n if (!direction) {\n return 'ltr';\n }\n return typeof direction === 'string' ? direction : direction.value;\n }\n /**\n * Switches to a new scroll strategy.\n * @param {?} strategy\n * @return {?}\n */\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 /**\n * Updates the text direction of the overlay panel.\n * @private\n * @return {?}\n */\n _updateElementDirection() {\n this._host.setAttribute('dir', this.getDirection());\n }\n /**\n * Updates the size of the overlay element based on the overlay config.\n * @private\n * @return {?}\n */\n _updateElementSize() {\n /** @type {?} */\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 /**\n * Toggles the pointer events for the overlay pane element.\n * @private\n * @param {?} enablePointer\n * @return {?}\n */\n _togglePointerEvents(enablePointer) {\n this._pane.style.pointerEvents = enablePointer ? 'auto' : 'none';\n }\n /**\n * Attaches a backdrop for this overlay.\n * @private\n * @return {?}\n */\n _attachBackdrop() {\n /** @type {?} */\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 (/** @type {?} */ (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', (/**\n * @param {?} event\n * @return {?}\n */\n (event) => this._backdropClick.next(event)));\n // Add class to fade-in the backdrop after one frame.\n if (typeof requestAnimationFrame !== 'undefined') {\n this._ngZone.runOutsideAngular((/**\n * @return {?}\n */\n () => {\n requestAnimationFrame((/**\n * @return {?}\n */\n () => {\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 * @private\n * @return {?}\n */\n _updateStackingOrder() {\n if (this._host.nextSibling) {\n (/** @type {?} */ (this._host.parentNode)).appendChild(this._host);\n }\n }\n /**\n * Detaches the backdrop (if any) associated with the overlay.\n * @return {?}\n */\n detachBackdrop() {\n /** @type {?} */\n let backdropToDetach = this._backdropElement;\n if (!backdropToDetach) {\n return;\n }\n /** @type {?} */\n let timeoutId;\n /** @type {?} */\n let finishDetach = (/**\n * @return {?}\n */\n () => {\n // It may not be attached to anything in certain cases (e.g. unit tests).\n if (backdropToDetach && backdropToDetach.parentNode) {\n backdropToDetach.parentNode.removeChild(backdropToDetach);\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 == backdropToDetach) {\n this._backdropElement = null;\n }\n if (this._config.backdropClass) {\n this._toggleClasses((/** @type {?} */ (backdropToDetach)), this._config.backdropClass, false);\n }\n clearTimeout(timeoutId);\n });\n backdropToDetach.classList.remove('cdk-overlay-backdrop-showing');\n this._ngZone.runOutsideAngular((/**\n * @return {?}\n */\n () => {\n (/** @type {?} */ (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((/**\n * @return {?}\n */\n () => setTimeout(finishDetach, 500)));\n }\n /**\n * Toggles a single CSS class or an array of classes on an element.\n * @private\n * @param {?} element\n * @param {?} cssClasses\n * @param {?} isAdd\n * @return {?}\n */\n _toggleClasses(element, cssClasses, isAdd) {\n /** @type {?} */\n const classList = element.classList;\n coerceArray(cssClasses).forEach((/**\n * @param {?} cssClass\n * @return {?}\n */\n cssClass => {\n // We can't do a spread here, because IE doesn't support setting multiple classes.\n isAdd ? classList.add(cssClass) : classList.remove(cssClass);\n }));\n }\n /**\n * Detaches the overlay content next time the zone stabilizes.\n * @private\n * @return {?}\n */\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 * @return {?}\n */\n () => {\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 /** @type {?} */\n const subscription = this._ngZone.onStable\n .asObservable()\n .pipe(takeUntil(merge(this._attachments, this._detachments)))\n .subscribe((/**\n * @return {?}\n */\n () => {\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 /**\n * Disposes of a scroll strategy.\n * @private\n * @return {?}\n */\n _disposeScrollStrategy() {\n /** @type {?} */\n const scrollStrategy = this._scrollStrategy;\n if (scrollStrategy) {\n scrollStrategy.disable();\n if (scrollStrategy.detach) {\n scrollStrategy.detach();\n }\n }\n }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\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/**\n * Class to be added to the overlay bounding box.\n * @type {?}\n */\nconst boundingBoxClass = 'cdk-overlay-connected-position-bounding-box';\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 /**\n * @param {?} connectedTo\n * @param {?} _viewportRuler\n * @param {?} _document\n * @param {?} _platform\n * @param {?} _overlayContainer\n */\n constructor(connectedTo, _viewportRuler, _document, _platform, _overlayContainer) {\n this._viewportRuler = _viewportRuler;\n this._document = _document;\n this._platform = _platform;\n this._overlayContainer = _overlayContainer;\n /**\n * Last size used for the bounding box. Used to avoid resizing the overlay after open.\n */\n this._lastBoundingBoxSize = { width: 0, height: 0 };\n /**\n * Whether the overlay was pushed in a previous positioning.\n */\n this._isPushed = false;\n /**\n * Whether the overlay can be pushed on-screen on the initial open.\n */\n this._canPush = true;\n /**\n * Whether the overlay can grow via flexible width/height after the initial open.\n */\n this._growAfterOpen = false;\n /**\n * Whether the overlay's width and height can be constrained to fit within the viewport.\n */\n this._hasFlexibleDimensions = true;\n /**\n * Whether the overlay position is locked.\n */\n this._positionLocked = false;\n /**\n * Amount of space that must be maintained between the overlay and the edge of the viewport.\n */\n this._viewportMargin = 0;\n /**\n * The Scrollable containers used to check scrollable view properties on position change.\n */\n this.scrollables = [];\n /**\n * Ordered list of preferred positions, from most to least desirable.\n */\n this._preferredPositions = [];\n /**\n * Subject that emits whenever the position changes.\n */\n this._positionChanges = new Subject();\n /**\n * Subscription to viewport size changes.\n */\n this._resizeSubscription = Subscription.EMPTY;\n /**\n * Default offset for the overlay along the x axis.\n */\n this._offsetX = 0;\n /**\n * Default offset for the overlay along the y axis.\n */\n this._offsetY = 0;\n /**\n * Amount of subscribers to the `positionChanges` stream.\n */\n this._positionChangeSubscriptions = 0;\n /**\n * Keeps track of the CSS classes that the position strategy has applied on the overlay panel.\n */\n this._appliedPanelClasses = [];\n /**\n * Observable sequence of position changes.\n */\n this.positionChanges = new Observable((/**\n * @param {?} observer\n * @return {?}\n */\n (observer) => {\n /** @type {?} */\n const subscription = this._positionChanges.subscribe(observer);\n this._positionChangeSubscriptions++;\n return (/**\n * @return {?}\n */\n () => {\n subscription.unsubscribe();\n this._positionChangeSubscriptions--;\n });\n }));\n this.setOrigin(connectedTo);\n }\n /**\n * Ordered list of preferred positions, from most to least desirable.\n * @return {?}\n */\n get positions() {\n return this._preferredPositions;\n }\n /**\n * Attaches this position strategy to an overlay.\n * @param {?} overlayRef\n * @return {?}\n */\n attach(overlayRef) {\n if (this._overlayRef && overlayRef !== this._overlayRef) {\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 * @return {?}\n */\n () => {\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 * @return {?}\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 /** @type {?} */\n const originRect = this._originRect;\n /** @type {?} */\n const overlayRect = this._overlayRect;\n /** @type {?} */\n const viewportRect = this._viewportRect;\n // Positions where the overlay will fit with flexible dimensions.\n /** @type {?} */\n const flexibleFits = [];\n // Fallback if none of the preferred positions fit within the viewport.\n /** @type {?} */\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 /** @type {?} */\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 /** @type {?} */\n let overlayPoint = this._getOverlayPoint(originPoint, overlayRect, pos);\n // Calculate how well the overlay would fit into the viewport with this point.\n /** @type {?} */\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 /** @type {?} */\n let bestFit = null;\n /** @type {?} */\n let bestScore = -1;\n for (const fit of flexibleFits) {\n /** @type {?} */\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((/** @type {?} */ (bestFit)).position, (/** @type {?} */ (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((/** @type {?} */ (fallback)).position, (/** @type {?} */ (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((/** @type {?} */ (fallback)).position, (/** @type {?} */ (fallback)).originPoint);\n }\n /**\n * @return {?}\n */\n detach() {\n this._clearPanelClasses();\n this._lastPosition = null;\n this._previousPushAmount = null;\n this._resizeSubscription.unsubscribe();\n }\n /**\n * Cleanup after the element gets destroyed.\n * @return {?}\n */\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, (/** @type {?} */ ({\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 = (/** @type {?} */ (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 * @return {?}\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 /** @type {?} */\n const lastPosition = this._lastPosition || this._preferredPositions[0];\n /** @type {?} */\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 * @template THIS\n * @this {THIS}\n * @param {?} scrollables\n * @return {THIS}\n */\n withScrollableContainers(scrollables) {\n (/** @type {?} */ (this)).scrollables = scrollables;\n return (/** @type {?} */ (this));\n }\n /**\n * Adds new preferred positions.\n * @template THIS\n * @this {THIS}\n * @param {?} positions List of positions options for this overlay.\n * @return {THIS}\n */\n withPositions(positions) {\n (/** @type {?} */ (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((/** @type {?} */ ((/** @type {?} */ (this))._lastPosition))) === -1) {\n (/** @type {?} */ (this))._lastPosition = null;\n }\n (/** @type {?} */ (this))._validatePositions();\n return (/** @type {?} */ (this));\n }\n /**\n * Sets a minimum distance the overlay may be positioned to the edge of the viewport.\n * @template THIS\n * @this {THIS}\n * @param {?} margin Required margin between the overlay and the viewport edge in pixels.\n * @return {THIS}\n */\n withViewportMargin(margin) {\n (/** @type {?} */ (this))._viewportMargin = margin;\n return (/** @type {?} */ (this));\n }\n /**\n * Sets whether the overlay's width and height can be constrained to fit within the viewport.\n * @template THIS\n * @this {THIS}\n * @param {?=} flexibleDimensions\n * @return {THIS}\n */\n withFlexibleDimensions(flexibleDimensions = true) {\n (/** @type {?} */ (this))._hasFlexibleDimensions = flexibleDimensions;\n return (/** @type {?} */ (this));\n }\n /**\n * Sets whether the overlay can grow after the initial open via flexible width/height.\n * @template THIS\n * @this {THIS}\n * @param {?=} growAfterOpen\n * @return {THIS}\n */\n withGrowAfterOpen(growAfterOpen = true) {\n (/** @type {?} */ (this))._growAfterOpen = growAfterOpen;\n return (/** @type {?} */ (this));\n }\n /**\n * Sets whether the overlay can be pushed on-screen if none of the provided positions fit.\n * @template THIS\n * @this {THIS}\n * @param {?=} canPush\n * @return {THIS}\n */\n withPush(canPush = true) {\n (/** @type {?} */ (this))._canPush = canPush;\n return (/** @type {?} */ (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 * @template THIS\n * @this {THIS}\n * @param {?=} isLocked Whether the overlay should locked in.\n * @return {THIS}\n */\n withLockedPosition(isLocked = true) {\n (/** @type {?} */ (this))._positionLocked = isLocked;\n return (/** @type {?} */ (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 * @template THIS\n * @this {THIS}\n * @param {?} origin Reference to the new origin.\n * @return {THIS}\n */\n setOrigin(origin) {\n (/** @type {?} */ (this))._origin = origin;\n return (/** @type {?} */ (this));\n }\n /**\n * Sets the default offset for the overlay's connection point on the x-axis.\n * @template THIS\n * @this {THIS}\n * @param {?} offset New offset in the X axis.\n * @return {THIS}\n */\n withDefaultOffsetX(offset) {\n (/** @type {?} */ (this))._offsetX = offset;\n return (/** @type {?} */ (this));\n }\n /**\n * Sets the default offset for the overlay's connection point on the y-axis.\n * @template THIS\n * @this {THIS}\n * @param {?} offset New offset in the Y axis.\n * @return {THIS}\n */\n withDefaultOffsetY(offset) {\n (/** @type {?} */ (this))._offsetY = offset;\n return (/** @type {?} */ (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 * @template THIS\n * @this {THIS}\n * @param {?} selector CSS selector that will be used to find the target\n * elements onto which to set the transform origin.\n * @return {THIS}\n */\n withTransformOriginOn(selector) {\n (/** @type {?} */ (this))._transformOriginSelector = selector;\n return (/** @type {?} */ (this));\n }\n /**\n * Gets the (x, y) coordinate of a connection point on the origin based on a relative position.\n * @private\n * @param {?} originRect\n * @param {?} pos\n * @return {?}\n */\n _getOriginPoint(originRect, pos) {\n /** @type {?} */\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 /** @type {?} */\n const startX = this._isRtl() ? originRect.right : originRect.left;\n /** @type {?} */\n const endX = this._isRtl() ? originRect.left : originRect.right;\n x = pos.originX == 'start' ? startX : endX;\n }\n /** @type {?} */\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 * @private\n * @param {?} originPoint\n * @param {?} overlayRect\n * @param {?} pos\n * @return {?}\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 /** @type {?} */\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 /** @type {?} */\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 /**\n * Gets how well an overlay at the given point will fit within the viewport.\n * @private\n * @param {?} point\n * @param {?} overlay\n * @param {?} viewport\n * @param {?} position\n * @return {?}\n */\n _getOverlayFit(point, overlay, viewport, position) {\n let { x, y } = point;\n /** @type {?} */\n let offsetX = this._getOffset(position, 'x');\n /** @type {?} */\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 /** @type {?} */\n let leftOverflow = 0 - x;\n /** @type {?} */\n let rightOverflow = (x + overlay.width) - viewport.width;\n /** @type {?} */\n let topOverflow = 0 - y;\n /** @type {?} */\n let bottomOverflow = (y + overlay.height) - viewport.height;\n // Visible parts of the element on each axis.\n /** @type {?} */\n let visibleWidth = this._subtractOverflows(overlay.width, leftOverflow, rightOverflow);\n /** @type {?} */\n let visibleHeight = this._subtractOverflows(overlay.height, topOverflow, bottomOverflow);\n /** @type {?} */\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 * @private\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 * @return {?}\n */\n _canFitWithFlexibleDimensions(fit, point, viewport) {\n if (this._hasFlexibleDimensions) {\n /** @type {?} */\n const availableHeight = viewport.bottom - point.y;\n /** @type {?} */\n const availableWidth = viewport.right - point.x;\n /** @type {?} */\n const minHeight = this._overlayRef.getConfig().minHeight;\n /** @type {?} */\n const minWidth = this._overlayRef.getConfig().minWidth;\n /** @type {?} */\n const verticalFit = fit.fitsInViewportVertically ||\n (minHeight != null && minHeight <= availableHeight);\n /** @type {?} */\n const horizontalFit = fit.fitsInViewportHorizontally ||\n (minWidth != null && minWidth <= availableWidth);\n return verticalFit && horizontalFit;\n }\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 * @private\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 * @return {?} The point at which to position the overlay after pushing. This is effectively a new\n * originPoint.\n */\n _pushOverlayOnScreen(start, overlay, 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 /** @type {?} */\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 /** @type {?} */\n const overflowRight = Math.max(start.x + overlay.width - viewport.right, 0);\n /** @type {?} */\n const overflowBottom = Math.max(start.y + overlay.height - viewport.bottom, 0);\n /** @type {?} */\n const overflowTop = Math.max(viewport.top - scrollPosition.top - start.y, 0);\n /** @type {?} */\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 /** @type {?} */\n let pushX = 0;\n /** @type {?} */\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 * @private\n * @param {?} position The position preference\n * @param {?} originPoint The point on the origin element where the overlay is connected.\n * @return {?}\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._positionChangeSubscriptions > 0) {\n /** @type {?} */\n const scrollableViewProperties = this._getScrollVisibility();\n /** @type {?} */\n const changeEvent = new ConnectedOverlayPositionChange(position, scrollableViewProperties);\n this._positionChanges.next(changeEvent);\n }\n this._isInitialRender = false;\n }\n /**\n * Sets the transform origin based on the configured selector and the passed-in position.\n * @private\n * @param {?} position\n * @return {?}\n */\n _setTransformOrigin(position) {\n if (!this._transformOriginSelector) {\n return;\n }\n /** @type {?} */\n const elements = (/** @type {?} */ (this._boundingBox)).querySelectorAll(this._transformOriginSelector);\n /** @type {?} */\n let xOrigin;\n /** @type {?} */\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 * @private\n * @param {?} origin\n * @param {?} position\n * @return {?}\n */\n _calculateBoundingBoxRect(origin, position) {\n /** @type {?} */\n const viewport = this._viewportRect;\n /** @type {?} */\n const isRtl = this._isRtl();\n /** @type {?} */\n let height;\n /** @type {?} */\n let top;\n /** @type {?} */\n let 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 /** @type {?} */\n const smallestDistanceToViewportEdge = Math.min(viewport.bottom - origin.y + viewport.top, origin.y);\n /** @type {?} */\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 /** @type {?} */\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 /** @type {?} */\n const isBoundedByLeftViewportEdge = (position.overlayX === 'end' && !isRtl) ||\n (position.overlayX === 'start' && isRtl);\n /** @type {?} */\n let width;\n /** @type {?} */\n let left;\n /** @type {?} */\n let right;\n if (isBoundedByLeftViewportEdge) {\n right = viewport.right - origin.x + this._viewportMargin;\n width = origin.x - viewport.left;\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 /** @type {?} */\n const smallestDistanceToViewportEdge = Math.min(viewport.right - origin.x + viewport.left, origin.x);\n /** @type {?} */\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: (/** @type {?} */ (top)), left: (/** @type {?} */ (left)), bottom: (/** @type {?} */ (bottom)), right: (/** @type {?} */ (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 * @private\n * @param {?} origin The point on the origin element where the overlay is connected.\n * @param {?} position The position preference\n * @return {?}\n */\n _setBoundingBoxStyles(origin, position) {\n /** @type {?} */\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 /** @type {?} */\n const styles = (/** @type {?} */ ({}));\n if (this._hasExactPosition()) {\n styles.top = styles.left = '0';\n styles.bottom = styles.right = '';\n styles.width = styles.height = '100%';\n }\n else {\n /** @type {?} */\n const maxHeight = this._overlayRef.getConfig().maxHeight;\n /** @type {?} */\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((/** @type {?} */ (this._boundingBox)).style, styles);\n }\n /**\n * Resets the styles for the bounding box so that a new positioning can be computed.\n * @private\n * @return {?}\n */\n _resetBoundingBoxStyles() {\n extendStyles((/** @type {?} */ (this._boundingBox)).style, (/** @type {?} */ ({\n top: '0',\n left: '0',\n right: '0',\n bottom: '0',\n height: '',\n width: '',\n alignItems: '',\n justifyContent: '',\n })));\n }\n /**\n * Resets the styles for the overlay pane so that a new positioning can be computed.\n * @private\n * @return {?}\n */\n _resetOverlayElementStyles() {\n extendStyles(this._pane.style, (/** @type {?} */ ({\n top: '',\n left: '',\n bottom: '',\n right: '',\n position: '',\n transform: '',\n })));\n }\n /**\n * Sets positioning styles to the overlay element.\n * @private\n * @param {?} originPoint\n * @param {?} position\n * @return {?}\n */\n _setOverlayElementStyles(originPoint, position) {\n /** @type {?} */\n const styles = (/** @type {?} */ ({}));\n if (this._hasExactPosition()) {\n /** @type {?} */\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 /** @type {?} */\n let transformString = '';\n /** @type {?} */\n let offsetX = this._getOffset(position, 'x');\n /** @type {?} */\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 if (this._hasFlexibleDimensions && this._overlayRef.getConfig().maxHeight) {\n styles.maxHeight = '';\n }\n if (this._hasFlexibleDimensions && this._overlayRef.getConfig().maxWidth) {\n styles.maxWidth = '';\n }\n extendStyles(this._pane.style, styles);\n }\n /**\n * Gets the exact top/bottom for the overlay when not using flexible sizing or when pushing.\n * @private\n * @param {?} position\n * @param {?} originPoint\n * @param {?} scrollPosition\n * @return {?}\n */\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 /** @type {?} */\n let styles = (/** @type {?} */ ({ top: null, bottom: null }));\n /** @type {?} */\n let overlayPoint = this._getOverlayPoint(originPoint, this._overlayRect, position);\n if (this._isPushed) {\n overlayPoint = this._pushOverlayOnScreen(overlayPoint, this._overlayRect, scrollPosition);\n }\n /** @type {?} */\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 /** @type {?} */\n const documentHeight = (/** @type {?} */ (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 /**\n * Gets the exact left/right for the overlay when not using flexible sizing or when pushing.\n * @private\n * @param {?} position\n * @param {?} originPoint\n * @param {?} scrollPosition\n * @return {?}\n */\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 /** @type {?} */\n let styles = (/** @type {?} */ ({ left: null, right: null }));\n /** @type {?} */\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 /** @type {?} */\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 /** @type {?} */\n const documentWidth = (/** @type {?} */ (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 * @private\n * @return {?}\n */\n _getScrollVisibility() {\n // Note: needs fresh rects since the position could've changed.\n /** @type {?} */\n const originBounds = this._getOriginRect();\n /** @type {?} */\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 /** @type {?} */\n const scrollContainerBounds = this.scrollables.map((/**\n * @param {?} scrollable\n * @return {?}\n */\n 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 /**\n * Subtracts the amount that an element is overflowing on an axis from it's length.\n * @private\n * @param {?} length\n * @param {...?} overflows\n * @return {?}\n */\n _subtractOverflows(length, ...overflows) {\n return overflows.reduce((/**\n * @param {?} currentValue\n * @param {?} currentOverflow\n * @return {?}\n */\n (currentValue, currentOverflow) => {\n return currentValue - Math.max(currentOverflow, 0);\n }), length);\n }\n /**\n * Narrows the given viewport rect by the current _viewportMargin.\n * @private\n * @return {?}\n */\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 /** @type {?} */\n const width = (/** @type {?} */ (this._document.documentElement)).clientWidth;\n /** @type {?} */\n const height = (/** @type {?} */ (this._document.documentElement)).clientHeight;\n /** @type {?} */\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 /**\n * Whether the we're dealing with an RTL context\n * @private\n * @return {?}\n */\n _isRtl() {\n return this._overlayRef.getDirection() === 'rtl';\n }\n /**\n * Determines whether the overlay uses exact or flexible positioning.\n * @private\n * @return {?}\n */\n _hasExactPosition() {\n return !this._hasFlexibleDimensions || this._isPushed;\n }\n /**\n * Retrieves the offset of a position along the x or y axis.\n * @private\n * @param {?} position\n * @param {?} axis\n * @return {?}\n */\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 /**\n * Validates that the current position match the expected values.\n * @private\n * @return {?}\n */\n _validatePositions() {\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((/**\n * @param {?} pair\n * @return {?}\n */\n 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 * @private\n * @param {?} cssClasses\n * @return {?}\n */\n _addPanelClasses(cssClasses) {\n if (this._pane) {\n coerceArray(cssClasses).forEach((/**\n * @param {?} cssClass\n * @return {?}\n */\n 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 /**\n * Clears the classes that the position strategy has applied from the overlay panel.\n * @private\n * @return {?}\n */\n _clearPanelClasses() {\n if (this._pane) {\n this._appliedPanelClasses.forEach((/**\n * @param {?} cssClass\n * @return {?}\n */\n cssClass => {\n this._pane.classList.remove(cssClass);\n }));\n this._appliedPanelClasses = [];\n }\n }\n /**\n * Returns the ClientRect of the current origin.\n * @private\n * @return {?}\n */\n _getOriginRect() {\n /** @type {?} */\n const origin = this._origin;\n if (origin instanceof ElementRef) {\n return origin.nativeElement.getBoundingClientRect();\n }\n if (origin instanceof HTMLElement) {\n return origin.getBoundingClientRect();\n }\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,\n left: origin.x,\n right: origin.x,\n height: 0,\n width: 0\n };\n }\n}\n/**\n * Shallow-extends a stylesheet object with another stylesheet object.\n * @param {?} dest\n * @param {?} source\n * @return {?}\n */\nfunction extendStyles(dest, source) {\n for (let key in source) {\n if (source.hasOwnProperty(key)) {\n dest[key] = source[key];\n }\n }\n return dest;\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * A strategy for positioning overlays. Using this strategy, an overlay is given an\n * implicit position relative to 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 * @deprecated Use `FlexibleConnectedPositionStrategy` instead.\n * \\@breaking-change 8.0.0\n */\nclass ConnectedPositionStrategy {\n /**\n * @param {?} originPos\n * @param {?} overlayPos\n * @param {?} connectedTo\n * @param {?} viewportRuler\n * @param {?} document\n * @param {?} platform\n * @param {?} overlayContainer\n */\n constructor(originPos, overlayPos, connectedTo, viewportRuler, document, platform, overlayContainer) {\n /**\n * Ordered list of preferred positions, from most to least desirable.\n */\n this._preferredPositions = [];\n // Since the `ConnectedPositionStrategy` is deprecated and we don't want to maintain\n // the extra logic, we create an instance of the positioning strategy that has some\n // defaults that make it behave as the old position strategy and to which we'll\n // proxy all of the API calls.\n this._positionStrategy = new FlexibleConnectedPositionStrategy(connectedTo, viewportRuler, document, platform, overlayContainer)\n .withFlexibleDimensions(false)\n .withPush(false)\n .withViewportMargin(0);\n this.withFallbackPosition(originPos, overlayPos);\n }\n /**\n * Whether the we're dealing with an RTL context\n * @return {?}\n */\n get _isRtl() {\n return this._overlayRef.getDirection() === 'rtl';\n }\n /**\n * Emits an event when the connection point changes.\n * @return {?}\n */\n get onPositionChange() {\n return this._positionStrategy.positionChanges;\n }\n /**\n * Ordered list of preferred positions, from most to least desirable.\n * @return {?}\n */\n get positions() {\n return this._preferredPositions;\n }\n /**\n * Attach this position strategy to an overlay.\n * @param {?} overlayRef\n * @return {?}\n */\n attach(overlayRef) {\n this._overlayRef = overlayRef;\n this._positionStrategy.attach(overlayRef);\n if (this._direction) {\n overlayRef.setDirection(this._direction);\n this._direction = null;\n }\n }\n /**\n * Disposes all resources used by the position strategy.\n * @return {?}\n */\n dispose() {\n this._positionStrategy.dispose();\n }\n /**\n * \\@docs-private\n * @return {?}\n */\n detach() {\n this._positionStrategy.detach();\n }\n /**\n * Updates the position of the overlay element, using whichever preferred position relative\n * to the origin fits on-screen.\n * \\@docs-private\n * @return {?}\n */\n apply() {\n this._positionStrategy.apply();\n }\n /**\n * Re-positions 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 * @return {?}\n */\n recalculateLastPosition() {\n this._positionStrategy.reapplyLastPosition();\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 * @param {?} scrollables\n * @return {?}\n */\n withScrollableContainers(scrollables) {\n this._positionStrategy.withScrollableContainers(scrollables);\n }\n /**\n * Adds a new preferred fallback position.\n * @template THIS\n * @this {THIS}\n * @param {?} originPos\n * @param {?} overlayPos\n * @param {?=} offsetX\n * @param {?=} offsetY\n * @return {THIS}\n */\n withFallbackPosition(originPos, overlayPos, offsetX, offsetY) {\n /** @type {?} */\n const position = new ConnectionPositionPair(originPos, overlayPos, offsetX, offsetY);\n (/** @type {?} */ (this))._preferredPositions.push(position);\n (/** @type {?} */ (this))._positionStrategy.withPositions((/** @type {?} */ (this))._preferredPositions);\n return (/** @type {?} */ (this));\n }\n /**\n * Sets the layout direction so the overlay's position can be adjusted to match.\n * @template THIS\n * @this {THIS}\n * @param {?} dir New layout direction.\n * @return {THIS}\n */\n withDirection(dir) {\n // Since the direction might be declared before the strategy is attached,\n // we save the value in a temporary property and we'll transfer it to the\n // overlay ref on attachment.\n if ((/** @type {?} */ (this))._overlayRef) {\n (/** @type {?} */ (this))._overlayRef.setDirection(dir);\n }\n else {\n (/** @type {?} */ (this))._direction = dir;\n }\n return (/** @type {?} */ (this));\n }\n /**\n * Sets an offset for the overlay's connection point on the x-axis\n * @template THIS\n * @this {THIS}\n * @param {?} offset New offset in the X axis.\n * @return {THIS}\n */\n withOffsetX(offset) {\n (/** @type {?} */ (this))._positionStrategy.withDefaultOffsetX(offset);\n return (/** @type {?} */ (this));\n }\n /**\n * Sets an offset for the overlay's connection point on the y-axis\n * @template THIS\n * @this {THIS}\n * @param {?} offset New offset in the Y axis.\n * @return {THIS}\n */\n withOffsetY(offset) {\n (/** @type {?} */ (this))._positionStrategy.withDefaultOffsetY(offset);\n return (/** @type {?} */ (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 * @template THIS\n * @this {THIS}\n * @param {?} isLocked Whether the overlay should locked in.\n * @return {THIS}\n */\n withLockedPosition(isLocked) {\n (/** @type {?} */ (this))._positionStrategy.withLockedPosition(isLocked);\n return (/** @type {?} */ (this));\n }\n /**\n * Overwrites the current set of positions with an array of new ones.\n * @template THIS\n * @this {THIS}\n * @param {?} positions Position pairs to be set on the strategy.\n * @return {THIS}\n */\n withPositions(positions) {\n (/** @type {?} */ (this))._preferredPositions = positions.slice();\n (/** @type {?} */ (this))._positionStrategy.withPositions((/** @type {?} */ (this))._preferredPositions);\n return (/** @type {?} */ (this));\n }\n /**\n * Sets the origin element, relative to which to position the overlay.\n * @template THIS\n * @this {THIS}\n * @param {?} origin Reference to the new origin element.\n * @return {THIS}\n */\n setOrigin(origin) {\n (/** @type {?} */ (this))._positionStrategy.setOrigin(origin);\n return (/** @type {?} */ (this));\n }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\n/**\n * Class to be added to the overlay pane wrapper.\n * @type {?}\n */\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 /**\n * @param {?} overlayRef\n * @return {?}\n */\n attach(overlayRef) {\n /** @type {?} */\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 * @template THIS\n * @this {THIS}\n * @param {?=} value New top offset.\n * @return {THIS}\n */\n top(value = '') {\n (/** @type {?} */ (this))._bottomOffset = '';\n (/** @type {?} */ (this))._topOffset = value;\n (/** @type {?} */ (this))._alignItems = 'flex-start';\n return (/** @type {?} */ (this));\n }\n /**\n * Sets the left position of the overlay. Clears any previously set horizontal position.\n * @template THIS\n * @this {THIS}\n * @param {?=} value New left offset.\n * @return {THIS}\n */\n left(value = '') {\n (/** @type {?} */ (this))._rightOffset = '';\n (/** @type {?} */ (this))._leftOffset = value;\n (/** @type {?} */ (this))._justifyContent = 'flex-start';\n return (/** @type {?} */ (this));\n }\n /**\n * Sets the bottom position of the overlay. Clears any previously set vertical position.\n * @template THIS\n * @this {THIS}\n * @param {?=} value New bottom offset.\n * @return {THIS}\n */\n bottom(value = '') {\n (/** @type {?} */ (this))._topOffset = '';\n (/** @type {?} */ (this))._bottomOffset = value;\n (/** @type {?} */ (this))._alignItems = 'flex-end';\n return (/** @type {?} */ (this));\n }\n /**\n * Sets the right position of the overlay. Clears any previously set horizontal position.\n * @template THIS\n * @this {THIS}\n * @param {?=} value New right offset.\n * @return {THIS}\n */\n right(value = '') {\n (/** @type {?} */ (this))._leftOffset = '';\n (/** @type {?} */ (this))._rightOffset = value;\n (/** @type {?} */ (this))._justifyContent = 'flex-end';\n return (/** @type {?} */ (this));\n }\n /**\n * Sets the overlay width and clears any previously set width.\n * @deprecated Pass the `width` through the `OverlayConfig`.\n * \\@breaking-change 8.0.0\n * @template THIS\n * @this {THIS}\n * @param {?=} value New width for the overlay\n * @return {THIS}\n */\n width(value = '') {\n if ((/** @type {?} */ (this))._overlayRef) {\n (/** @type {?} */ (this))._overlayRef.updateSize({ width: value });\n }\n else {\n (/** @type {?} */ (this))._width = value;\n }\n return (/** @type {?} */ (this));\n }\n /**\n * Sets the overlay height and clears any previously set height.\n * @deprecated Pass the `height` through the `OverlayConfig`.\n * \\@breaking-change 8.0.0\n * @template THIS\n * @this {THIS}\n * @param {?=} value New height for the overlay\n * @return {THIS}\n */\n height(value = '') {\n if ((/** @type {?} */ (this))._overlayRef) {\n (/** @type {?} */ (this))._overlayRef.updateSize({ height: value });\n }\n else {\n (/** @type {?} */ (this))._height = value;\n }\n return (/** @type {?} */ (this));\n }\n /**\n * Centers the overlay horizontally with an optional offset.\n * Clears any previously set horizontal position.\n *\n * @template THIS\n * @this {THIS}\n * @param {?=} offset Overlay offset from the horizontal center.\n * @return {THIS}\n */\n centerHorizontally(offset = '') {\n (/** @type {?} */ (this)).left(offset);\n (/** @type {?} */ (this))._justifyContent = 'center';\n return (/** @type {?} */ (this));\n }\n /**\n * Centers the overlay vertically with an optional offset.\n * Clears any previously set vertical position.\n *\n * @template THIS\n * @this {THIS}\n * @param {?=} offset Overlay offset from the vertical center.\n * @return {THIS}\n */\n centerVertically(offset = '') {\n (/** @type {?} */ (this)).top(offset);\n (/** @type {?} */ (this))._alignItems = 'center';\n return (/** @type {?} */ (this));\n }\n /**\n * Apply the position to the element.\n * \\@docs-private\n * @return {?}\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 /** @type {?} */\n const styles = this._overlayRef.overlayElement.style;\n /** @type {?} */\n const parentStyles = this._overlayRef.hostElement.style;\n /** @type {?} */\n const config = this._overlayRef.getConfig();\n styles.position = this._cssPosition;\n styles.marginLeft = config.width === '100%' ? '0' : this._leftOffset;\n styles.marginTop = config.height === '100%' ? '0' : this._topOffset;\n styles.marginBottom = this._bottomOffset;\n styles.marginRight = this._rightOffset;\n if (config.width === '100%') {\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 = config.height === '100%' ? 'flex-start' : this._alignItems;\n }\n /**\n * Cleans up the DOM changes from the position strategy.\n * \\@docs-private\n * @return {?}\n */\n dispose() {\n if (this._isDisposed || !this._overlayRef) {\n return;\n }\n /** @type {?} */\n const styles = this._overlayRef.overlayElement.style;\n /** @type {?} */\n const parent = this._overlayRef.hostElement;\n /** @type {?} */\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 = (/** @type {?} */ (null));\n this._isDisposed = true;\n }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * Builder for overlay position strategy.\n */\nclass OverlayPositionBuilder {\n /**\n * @param {?} _viewportRuler\n * @param {?} _document\n * @param {?} _platform\n * @param {?} _overlayContainer\n */\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 * @return {?}\n */\n global() {\n return new GlobalPositionStrategy();\n }\n /**\n * Creates a relative position strategy.\n * @deprecated Use `flexibleConnectedTo` instead.\n * \\@breaking-change 8.0.0\n * @param {?} elementRef\n * @param {?} originPos\n * @param {?} overlayPos\n * @return {?}\n */\n connectedTo(elementRef, originPos, overlayPos) {\n return new ConnectedPositionStrategy(originPos, overlayPos, elementRef, this._viewportRuler, this._document, this._platform, this._overlayContainer);\n }\n /**\n * Creates a flexible position strategy.\n * @param {?} origin Origin relative to which to position the overlay.\n * @return {?}\n */\n flexibleConnectedTo(origin) {\n return new FlexibleConnectedPositionStrategy(origin, this._viewportRuler, this._document, this._platform, this._overlayContainer);\n }\n}\nOverlayPositionBuilder.decorators = [\n { type: Injectable, args: [{ providedIn: 'root' },] },\n];\n/** @nocollapse */\nOverlayPositionBuilder.ctorParameters = () => [\n { type: ViewportRuler },\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },\n { type: Platform },\n { type: OverlayContainer }\n];\n/** @nocollapse */ OverlayPositionBuilder.ngInjectableDef = ɵɵdefineInjectable({ factory: function OverlayPositionBuilder_Factory() { return new OverlayPositionBuilder(ɵɵinject(ViewportRuler), ɵɵinject(DOCUMENT), ɵɵinject(Platform), ɵɵinject(OverlayContainer)); }, token: OverlayPositionBuilder, providedIn: \"root\" });\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * Next overlay unique ID.\n * @type {?}\n */\nlet nextUniqueId = 0;\n// Note that Overlay is *not* scoped to the app root because the ComponentFactoryResolver\n// it needs is different based 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 /**\n * @param {?} scrollStrategies\n * @param {?} _overlayContainer\n * @param {?} _componentFactoryResolver\n * @param {?} _positionBuilder\n * @param {?} _keyboardDispatcher\n * @param {?} _injector\n * @param {?} _ngZone\n * @param {?} _document\n * @param {?} _directionality\n * @param {?=} _location\n */\n constructor(scrollStrategies, _overlayContainer, _componentFactoryResolver, _positionBuilder, _keyboardDispatcher, _injector, _ngZone, _document, _directionality, _location) {\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 }\n /**\n * Creates an overlay.\n * @param {?=} config Configuration applied to the overlay.\n * @return {?} Reference to the created overlay.\n */\n create(config) {\n /** @type {?} */\n const host = this._createHostElement();\n /** @type {?} */\n const pane = this._createPaneElement(host);\n /** @type {?} */\n const portalOutlet = this._createPortalOutlet(pane);\n /** @type {?} */\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);\n }\n /**\n * Gets a position builder that can be used, via fluent API,\n * to construct and configure a position strategy.\n * @return {?} 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 * @private\n * @param {?} host\n * @return {?} Newly-created pane element\n */\n _createPaneElement(host) {\n /** @type {?} */\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 * @private\n * @return {?} Newly-create host element.\n */\n _createHostElement() {\n /** @type {?} */\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 * @private\n * @param {?} pane The DOM element to turn into a portal outlet.\n * @return {?} 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);\n }\n}\nOverlay.decorators = [\n { type: Injectable },\n];\n/** @nocollapse */\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, decorators: [{ type: Optional }] }\n];\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * Default set of positions for the overlay. Follows the behavior of a dropdown.\n * @type {?}\n */\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/**\n * Injection token that determines the scroll handling while the connected overlay is open.\n * @type {?}\n */\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 /**\n * @param {?} elementRef\n */\n constructor(elementRef) {\n this.elementRef = elementRef;\n }\n}\nCdkOverlayOrigin.decorators = [\n { type: Directive, args: [{\n selector: '[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]',\n exportAs: 'cdkOverlayOrigin',\n },] },\n];\n/** @nocollapse */\nCdkOverlayOrigin.ctorParameters = () => [\n { type: ElementRef }\n];\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 /**\n * @param {?} _overlay\n * @param {?} templateRef\n * @param {?} viewContainerRef\n * @param {?} scrollStrategyFactory\n * @param {?} _dir\n */\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 /**\n * Margin between the overlay and the viewport edges.\n */\n this.viewportMargin = 0;\n /**\n * Whether the overlay is open.\n */\n this.open = false;\n /**\n * Event emitted when the backdrop is clicked.\n */\n this.backdropClick = new EventEmitter();\n /**\n * Event emitted when the position has changed.\n */\n this.positionChange = new EventEmitter();\n /**\n * Event emitted when the overlay has been attached.\n */\n this.attach = new EventEmitter();\n /**\n * Event emitted when the overlay has been detached.\n */\n this.detach = new EventEmitter();\n /**\n * Emits when there are keyboard events that are targeted at the overlay.\n */\n this.overlayKeydown = new EventEmitter();\n this._templatePortal = new TemplatePortal(templateRef, viewContainerRef);\n this._scrollStrategyFactory = scrollStrategyFactory;\n this.scrollStrategy = this._scrollStrategyFactory();\n }\n /**\n * The offset in pixels for the overlay connection point on the x-axis\n * @return {?}\n */\n get offsetX() { return this._offsetX; }\n /**\n * @param {?} offsetX\n * @return {?}\n */\n set offsetX(offsetX) {\n this._offsetX = offsetX;\n if (this._position) {\n this._updatePositionStrategy(this._position);\n }\n }\n /**\n * The offset in pixels for the overlay connection point on the y-axis\n * @return {?}\n */\n get offsetY() { return this._offsetY; }\n /**\n * @param {?} offsetY\n * @return {?}\n */\n set offsetY(offsetY) {\n this._offsetY = offsetY;\n if (this._position) {\n this._updatePositionStrategy(this._position);\n }\n }\n /**\n * Whether or not the overlay should attach a backdrop.\n * @return {?}\n */\n get hasBackdrop() { return this._hasBackdrop; }\n /**\n * @param {?} value\n * @return {?}\n */\n set hasBackdrop(value) { this._hasBackdrop = coerceBooleanProperty(value); }\n /**\n * Whether or not the overlay should be locked when scrolling.\n * @return {?}\n */\n get lockPosition() { return this._lockPosition; }\n /**\n * @param {?} value\n * @return {?}\n */\n set lockPosition(value) { this._lockPosition = coerceBooleanProperty(value); }\n /**\n * Whether the overlay's width and height can be constrained to fit within the viewport.\n * @return {?}\n */\n get flexibleDimensions() { return this._flexibleDimensions; }\n /**\n * @param {?} value\n * @return {?}\n */\n set flexibleDimensions(value) {\n this._flexibleDimensions = coerceBooleanProperty(value);\n }\n /**\n * Whether the overlay can grow after the initial open when flexible positioning is turned on.\n * @return {?}\n */\n get growAfterOpen() { return this._growAfterOpen; }\n /**\n * @param {?} value\n * @return {?}\n */\n set growAfterOpen(value) { this._growAfterOpen = coerceBooleanProperty(value); }\n /**\n * Whether the overlay can be pushed on-screen if none of the provided positions fit.\n * @return {?}\n */\n get push() { return this._push; }\n /**\n * @param {?} value\n * @return {?}\n */\n set push(value) { this._push = coerceBooleanProperty(value); }\n /**\n * The associated overlay reference.\n * @return {?}\n */\n get overlayRef() {\n return this._overlayRef;\n }\n /**\n * The element's layout direction.\n * @return {?}\n */\n get dir() {\n return this._dir ? this._dir.value : 'ltr';\n }\n /**\n * @return {?}\n */\n ngOnDestroy() {\n if (this._overlayRef) {\n this._overlayRef.dispose();\n }\n this._backdropSubscription.unsubscribe();\n }\n /**\n * @param {?} changes\n * @return {?}\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 /**\n * Creates an overlay\n * @private\n * @return {?}\n */\n _createOverlay() {\n if (!this.positions || !this.positions.length) {\n this.positions = defaultPositionList;\n }\n this._overlayRef = this._overlay.create(this._buildConfig());\n this._overlayRef.keydownEvents().subscribe((/**\n * @param {?} event\n * @return {?}\n */\n (event) => {\n this.overlayKeydown.next(event);\n if (event.keyCode === ESCAPE) {\n this._detachOverlay();\n }\n }));\n }\n /**\n * Builds the overlay config based on the directive's inputs\n * @private\n * @return {?}\n */\n _buildConfig() {\n /** @type {?} */\n const positionStrategy = this._position = this._createPositionStrategy();\n /** @type {?} */\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 /**\n * Updates the state of a position strategy, based on the values of the directive inputs.\n * @private\n * @param {?} positionStrategy\n * @return {?}\n */\n _updatePositionStrategy(positionStrategy) {\n /** @type {?} */\n const positions = this.positions.map((/**\n * @param {?} currentPosition\n * @return {?}\n */\n 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 })));\n return positionStrategy\n .setOrigin(this.origin.elementRef)\n .withPositions(positions)\n .withFlexibleDimensions(this.flexibleDimensions)\n .withPush(this.push)\n .withGrowAfterOpen(this.growAfterOpen)\n .withViewportMargin(this.viewportMargin)\n .withLockedPosition(this.lockPosition);\n }\n /**\n * Returns the position strategy of the overlay to be set on the overlay config\n * @private\n * @return {?}\n */\n _createPositionStrategy() {\n /** @type {?} */\n const strategy = this._overlay.position().flexibleConnectedTo(this.origin.elementRef);\n this._updatePositionStrategy(strategy);\n strategy.positionChanges.subscribe((/**\n * @param {?} p\n * @return {?}\n */\n p => this.positionChange.emit(p)));\n return strategy;\n }\n /**\n * Attaches the overlay and subscribes to backdrop clicks if backdrop exists\n * @private\n * @return {?}\n */\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 this.attach.emit();\n }\n if (this.hasBackdrop) {\n this._backdropSubscription = this._overlayRef.backdropClick().subscribe((/**\n * @param {?} event\n * @return {?}\n */\n event => {\n this.backdropClick.emit(event);\n }));\n }\n else {\n this._backdropSubscription.unsubscribe();\n }\n }\n /**\n * Detaches the overlay and unsubscribes to backdrop clicks if backdrop exists\n * @private\n * @return {?}\n */\n _detachOverlay() {\n if (this._overlayRef) {\n this._overlayRef.detach();\n this.detach.emit();\n }\n this._backdropSubscription.unsubscribe();\n }\n}\nCdkConnectedOverlay.decorators = [\n { type: Directive, args: [{\n selector: '[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]',\n exportAs: 'cdkConnectedOverlay'\n },] },\n];\n/** @nocollapse */\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 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 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};\n/**\n * \\@docs-private\n * @param {?} overlay\n * @return {?}\n */\nfunction CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {\n return (/**\n * @return {?}\n */\n () => overlay.scrollStrategies.reposition());\n}\n/**\n * \\@docs-private\n * @type {?}\n */\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 * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass OverlayModule {\n}\nOverlayModule.decorators = [\n { type: NgModule, 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];\n/**\n * @deprecated Use `OverlayModule` instead.\n * \\@breaking-change 8.0.0\n * \\@docs-private\n * @type {?}\n */\nconst OVERLAY_PROVIDERS = [\n Overlay,\n OverlayPositionBuilder,\n OVERLAY_KEYBOARD_DISPATCHER_PROVIDER,\n VIEWPORT_RULER_PROVIDER,\n OVERLAY_CONTAINER_PROVIDER,\n CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER,\n];\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\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 /**\n * @param {?} _document\n */\n constructor(_document) {\n super(_document);\n }\n /**\n * @return {?}\n */\n ngOnDestroy() {\n super.ngOnDestroy();\n if (this._fullScreenEventName && this._fullScreenListener) {\n this._document.removeEventListener(this._fullScreenEventName, this._fullScreenListener);\n }\n }\n /**\n * @protected\n * @return {?}\n */\n _createContainer() {\n super._createContainer();\n this._adjustParentForFullscreenChange();\n this._addFullscreenChangeListener((/**\n * @return {?}\n */\n () => this._adjustParentForFullscreenChange()));\n }\n /**\n * @private\n * @return {?}\n */\n _adjustParentForFullscreenChange() {\n if (!this._containerElement) {\n return;\n }\n /** @type {?} */\n const fullscreenElement = this.getFullscreenElement();\n /** @type {?} */\n const parent = fullscreenElement || this._document.body;\n parent.appendChild(this._containerElement);\n }\n /**\n * @private\n * @param {?} fn\n * @return {?}\n */\n _addFullscreenChangeListener(fn) {\n /** @type {?} */\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 /**\n * @private\n * @return {?}\n */\n _getEventName() {\n if (!this._fullScreenEventName) {\n if (this._document.fullscreenEnabled) {\n this._fullScreenEventName = 'fullscreenchange';\n }\n else if (this._document.webkitFullscreenEnabled) {\n this._fullScreenEventName = 'webkitfullscreenchange';\n }\n else if (((/** @type {?} */ (this._document))).mozFullScreenEnabled) {\n this._fullScreenEventName = 'mozfullscreenchange';\n }\n else if (((/** @type {?} */ (this._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 * @return {?}\n */\n getFullscreenElement() {\n return this._document.fullscreenElement ||\n this._document.webkitFullscreenElement ||\n ((/** @type {?} */ (this._document))).mozFullScreenElement ||\n ((/** @type {?} */ (this._document))).msFullscreenElement ||\n null;\n }\n}\nFullscreenOverlayContainer.decorators = [\n { type: Injectable, args: [{ providedIn: 'root' },] },\n];\n/** @nocollapse */\nFullscreenOverlayContainer.ctorParameters = () => [\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n];\n/** @nocollapse */ FullscreenOverlayContainer.ngInjectableDef = ɵɵdefineInjectable({ factory: function FullscreenOverlayContainer_Factory() { return new FullscreenOverlayContainer(ɵɵinject(DOCUMENT)); }, token: FullscreenOverlayContainer, providedIn: \"root\" });\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\nexport { Overlay, OverlayContainer, CdkOverlayOrigin, CdkConnectedOverlay, FullscreenOverlayContainer, OverlayRef, OverlayKeyboardDispatcher, OverlayPositionBuilder, GlobalPositionStrategy, ConnectedPositionStrategy, FlexibleConnectedPositionStrategy, OverlayConfig, validateVerticalPosition, validateHorizontalPosition, ConnectionPositionPair, ScrollingVisibility, ConnectedOverlayPositionChange, ScrollStrategyOptions, RepositionScrollStrategy, CloseScrollStrategy, NoopScrollStrategy, BlockScrollStrategy, OverlayModule, OVERLAY_PROVIDERS, OVERLAY_KEYBOARD_DISPATCHER_PROVIDER as ɵg, OVERLAY_KEYBOARD_DISPATCHER_PROVIDER_FACTORY as ɵf, OVERLAY_CONTAINER_PROVIDER as ɵb, OVERLAY_CONTAINER_PROVIDER_FACTORY as ɵa, CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY as ɵc, CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER as ɵe, CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY as ɵd };\n//# sourceMappingURL=overlay.js.map\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';\nimport { CopierService } from 'app/shared/copier.service';\n\n@NgModule({\n imports: [ CommonModule, MatSnackBarModule ],\n declarations: [ CodeComponent ],\n entryComponents: [ CodeComponent ],\n exports: [ CodeComponent ],\n providers: [ PrettyPrinter, CopierService ]\n})\nexport class CodeModule { }\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 { NgModule, Injectable, NgZone, ɵɵdefineInjectable, ɵɵinject } from '@angular/core';\nimport { Platform } from '@angular/cdk/platform';\nimport { asapScheduler, combineLatest, Observable, Subject } from 'rxjs';\nimport { debounceTime, map, startWith, takeUntil } from 'rxjs/operators';\nimport { coerceArray } from '@angular/cdk/coercion';\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass LayoutModule {\n}\nLayoutModule.decorators = [\n { type: NgModule, args: [{},] },\n];\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * Global registry for all dynamically-created, injected media queries.\n * @type {?}\n */\nconst mediaQueriesForWebkitCompatibility = new Set();\n/**\n * Style tag that holds all of the dynamically-created media queries.\n * @type {?}\n */\nlet mediaQueryStyleNode;\n/**\n * A utility for calling matchMedia queries.\n */\nclass MediaMatcher {\n /**\n * @param {?} platform\n */\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 * @param {?} query\n * @return {?}\n */\n matchMedia(query) {\n if (this.platform.WEBKIT) {\n createEmptyStyleRule(query);\n }\n return this._matchMedia(query);\n }\n}\nMediaMatcher.decorators = [\n { type: Injectable, args: [{ providedIn: 'root' },] },\n];\n/** @nocollapse */\nMediaMatcher.ctorParameters = () => [\n { type: Platform }\n];\n/** @nocollapse */ MediaMatcher.ngInjectableDef = ɵɵdefineInjectable({ factory: function MediaMatcher_Factory() { return new MediaMatcher(ɵɵinject(Platform)); }, token: MediaMatcher, providedIn: \"root\" });\n/**\n * For Webkit engines that only trigger the MediaQueryListListener when\n * there is at least one CSS selector for the respective media query.\n * @param {?} query\n * @return {?}\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 (/** @type {?} */ (document.head)).appendChild(mediaQueryStyleNode);\n }\n if (mediaQueryStyleNode.sheet) {\n ((/** @type {?} */ (mediaQueryStyleNode.sheet)))\n .insertRule(`@media ${query} {.fx-query-test{ }}`, 0);\n mediaQueriesForWebkitCompatibility.add(query);\n }\n }\n catch (e) {\n console.error(e);\n }\n}\n/**\n * No-op matchMedia replacement for non-browser platforms.\n * @param {?} query\n * @return {?}\n */\nfunction noopMatchMedia(query) {\n // Use `as any` here to avoid adding additional necessary properties for\n // the noop matcher.\n return (/** @type {?} */ ({\n matches: query === 'all' || query === '',\n media: query,\n addListener: (/**\n * @return {?}\n */\n () => { }),\n removeListener: (/**\n * @return {?}\n */\n () => { })\n }));\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * Utility for checking the matching state of \\@media queries.\n */\nclass BreakpointObserver {\n /**\n * @param {?} mediaMatcher\n * @param {?} zone\n */\n constructor(mediaMatcher, zone) {\n this.mediaMatcher = mediaMatcher;\n this.zone = zone;\n /**\n * A map of all media queries currently being listened for.\n */\n this._queries = new Map();\n /**\n * A subject for all other observables to takeUntil based on.\n */\n this._destroySubject = new Subject();\n }\n /**\n * Completes the active subject, signalling to all other observables to complete.\n * @return {?}\n */\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 * @return {?} Whether any of the media queries match.\n */\n isMatched(value) {\n /** @type {?} */\n const queries = splitQueries(coerceArray(value));\n return queries.some((/**\n * @param {?} mediaQuery\n * @return {?}\n */\n 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 * @return {?} A stream of matches for the given queries.\n */\n observe(value) {\n /** @type {?} */\n const queries = splitQueries(coerceArray(value));\n /** @type {?} */\n const observables = queries.map((/**\n * @param {?} query\n * @return {?}\n */\n query => this._registerQuery(query).observable));\n return combineLatest(observables).pipe(debounceTime(0, asapScheduler), map((/**\n * @param {?} breakpointStates\n * @return {?}\n */\n (breakpointStates) => {\n /** @type {?} */\n const response = {\n matches: false,\n breakpoints: {},\n };\n breakpointStates.forEach((/**\n * @param {?} state\n * @return {?}\n */\n (state) => {\n response.matches = response.matches || state.matches;\n response.breakpoints[state.query] = state.matches;\n }));\n return response;\n })));\n }\n /**\n * Registers a specific query to be listened for.\n * @private\n * @param {?} query\n * @return {?}\n */\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 (/** @type {?} */ (this._queries.get(query)));\n }\n /** @type {?} */\n const mql = this.mediaMatcher.matchMedia(query);\n // Create callback for match changes and add it is as a listener.\n /** @type {?} */\n const queryObservable = new Observable((/**\n * @param {?} observer\n * @return {?}\n */\n (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 /** @type {?} */\n const handler = (/**\n * @param {?} e\n * @return {?}\n */\n (e) => this.zone.run((/**\n * @return {?}\n */\n () => observer.next(e))));\n mql.addListener(handler);\n return (/**\n * @return {?}\n */\n () => {\n mql.removeListener(handler);\n });\n })).pipe(startWith(mql), map((/**\n * @param {?} nextMql\n * @return {?}\n */\n (nextMql) => ({ query, matches: nextMql.matches }))), takeUntil(this._destroySubject));\n // Add the MediaQueryList to the set of queries.\n /** @type {?} */\n const output = { observable: queryObservable, mql };\n this._queries.set(query, output);\n return output;\n }\n}\nBreakpointObserver.decorators = [\n { type: Injectable, args: [{ providedIn: 'root' },] },\n];\n/** @nocollapse */\nBreakpointObserver.ctorParameters = () => [\n { type: MediaMatcher },\n { type: NgZone }\n];\n/** @nocollapse */ BreakpointObserver.ngInjectableDef = ɵɵdefineInjectable({ factory: function BreakpointObserver_Factory() { return new BreakpointObserver(ɵɵinject(MediaMatcher), ɵɵinject(NgZone)); }, token: BreakpointObserver, providedIn: \"root\" });\n/**\n * Split each query string into separate query strings if two queries are provided as comma\n * separated.\n * @param {?} queries\n * @return {?}\n */\nfunction splitQueries(queries) {\n return queries.map((/**\n * @param {?} query\n * @return {?}\n */\n (query) => query.split(',')))\n .reduce((/**\n * @param {?} a1\n * @param {?} a2\n * @return {?}\n */\n (a1, a2) => a1.concat(a2)))\n .map((/**\n * @param {?} query\n * @return {?}\n */\n query => query.trim()));\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n// PascalCase is being used as Breakpoints is used like an enum.\n// tslint:disable-next-line:variable-name\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 * @type {?}\n */\nconst Breakpoints = {\n XSmall: '(max-width: 599.99px)',\n Small: '(min-width: 600px) and (max-width: 959.99px)',\n Medium: '(min-width: 960px) and (max-width: 1279.99px)',\n Large: '(min-width: 1280px) and (max-width: 1919.99px)',\n XLarge: '(min-width: 1920px)',\n Handset: '(max-width: 599.99px) and (orientation: portrait), ' +\n '(max-width: 959.99px) and (orientation: landscape)',\n Tablet: '(min-width: 600px) and (max-width: 839.99px) and (orientation: portrait), ' +\n '(min-width: 960px) and (max-width: 1279.99px) and (orientation: landscape)',\n Web: '(min-width: 840px) and (orientation: portrait), ' +\n '(min-width: 1280px) and (orientation: landscape)',\n HandsetPortrait: '(max-width: 599.99px) and (orientation: portrait)',\n TabletPortrait: '(min-width: 600px) and (max-width: 839.99px) and (orientation: portrait)',\n WebPortrait: '(min-width: 840px) and (orientation: portrait)',\n HandsetLandscape: '(max-width: 959.99px) and (orientation: landscape)',\n TabletLandscape: '(min-width: 960px) and (max-width: 1279.99px) and (orientation: landscape)',\n WebLandscape: '(min-width: 1280px) and (orientation: landscape)',\n};\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\nexport { LayoutModule, BreakpointObserver, Breakpoints, MediaMatcher };\n//# sourceMappingURL=layout.js.map\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 { Subject } from 'rxjs';\nimport { InjectionToken, Component, ViewEncapsulation, Inject, ChangeDetectionStrategy, ChangeDetectorRef, ElementRef, NgZone, ViewChild, NgModule, Injectable, Injector, Optional, SkipSelf, TemplateRef, ɵɵdefineInjectable, ɵɵinject, INJECTOR } from '@angular/core';\nimport { animate, state, style, transition, trigger } from '@angular/animations';\nimport { BasePortalOutlet, CdkPortalOutlet, PortalModule, ComponentPortal, PortalInjector, TemplatePortal } from '@angular/cdk/portal';\nimport { take, takeUntil } from 'rxjs/operators';\nimport { OverlayModule, Overlay, OverlayConfig } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { LiveAnnouncer } from '@angular/cdk/a11y';\nimport { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * Reference to a snack bar dispatched from the snack bar service.\n * @template T\n */\nclass MatSnackBarRef {\n /**\n * @param {?} containerInstance\n * @param {?} _overlayRef\n */\n constructor(containerInstance, _overlayRef) {\n this._overlayRef = _overlayRef;\n /**\n * Subject for notifying the user that the snack bar has been dismissed.\n */\n this._afterDismissed = new Subject();\n /**\n * Subject for notifying the user that the snack bar has opened and appeared.\n */\n this._afterOpened = new Subject();\n /**\n * Subject for notifying the user that the snack bar action was called.\n */\n this._onAction = new Subject();\n /**\n * Whether the snack bar was dismissed using the action button.\n */\n this._dismissedByAction = false;\n this.containerInstance = containerInstance;\n // Dismiss snackbar on action.\n this.onAction().subscribe((/**\n * @return {?}\n */\n () => this.dismiss()));\n containerInstance._onExit.subscribe((/**\n * @return {?}\n */\n () => this._finishDismiss()));\n }\n /**\n * Dismisses the snack bar.\n * @return {?}\n */\n dismiss() {\n if (!this._afterDismissed.closed) {\n this.containerInstance.exit();\n }\n clearTimeout(this._durationTimeoutId);\n }\n /**\n * Marks the snackbar action clicked.\n * @return {?}\n */\n dismissWithAction() {\n if (!this._onAction.closed) {\n this._dismissedByAction = true;\n this._onAction.next();\n this._onAction.complete();\n }\n }\n /**\n * Marks the snackbar action clicked.\n * @deprecated Use `dismissWithAction` instead.\n * \\@breaking-change 8.0.0\n * @return {?}\n */\n closeWithAction() {\n this.dismissWithAction();\n }\n /**\n * Dismisses the snack bar after some duration\n * @param {?} duration\n * @return {?}\n */\n _dismissAfter(duration) {\n this._durationTimeoutId = setTimeout((/**\n * @return {?}\n */\n () => this.dismiss()), duration);\n }\n /**\n * Marks the snackbar as opened\n * @return {?}\n */\n _open() {\n if (!this._afterOpened.closed) {\n this._afterOpened.next();\n this._afterOpened.complete();\n }\n }\n /**\n * Cleans up the DOM after closing.\n * @private\n * @return {?}\n */\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 /**\n * Gets an observable that is notified when the snack bar is finished closing.\n * @return {?}\n */\n afterDismissed() {\n return this._afterDismissed.asObservable();\n }\n /**\n * Gets an observable that is notified when the snack bar has opened and appeared.\n * @return {?}\n */\n afterOpened() {\n return this.containerInstance._onEnter;\n }\n /**\n * Gets an observable that is notified when the snack bar action is called.\n * @return {?}\n */\n onAction() {\n return this._onAction.asObservable();\n }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * Injection token that can be used to access the data that was passed in to a snack bar.\n * @type {?}\n */\nconst MAT_SNACK_BAR_DATA = new InjectionToken('MatSnackBarData');\n/**\n * Configuration used when opening a snack-bar.\n * @template D\n */\nclass MatSnackBarConfig {\n constructor() {\n /**\n * The politeness level for the MatAriaLiveAnnouncer announcement.\n */\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 /**\n * The length of time in milliseconds to wait before automatically dismissing the snack bar.\n */\n this.duration = 0;\n /**\n * Data being injected into the child component.\n */\n this.data = null;\n /**\n * The horizontal position to place the snack bar.\n */\n this.horizontalPosition = 'center';\n /**\n * The vertical position to place the snack bar.\n */\n this.verticalPosition = 'bottom';\n }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\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 /**\n * @param {?} snackBarRef\n * @param {?} data\n */\n constructor(snackBarRef, data) {\n this.snackBarRef = snackBarRef;\n this.data = data;\n }\n /**\n * Performs the action on the snack bar.\n * @return {?}\n */\n action() {\n this.snackBarRef.dismissWithAction();\n }\n /**\n * If the action button should be shown.\n * @return {?}\n */\n get hasAction() {\n return !!this.data.action;\n }\n}\nSimpleSnackBar.decorators = [\n { type: Component, args: [{selector: 'simple-snack-bar',\n template: \"<span>{{data.message}}</span><div class=\\\"mat-simple-snackbar-action\\\" *ngIf=\\\"hasAction\\\"><button mat-button (click)=\\\"action()\\\">{{data.action}}</button></div>\",\n styles: [\".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;height:100%;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: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'mat-simple-snackbar',\n }\n },] },\n];\n/** @nocollapse */\nSimpleSnackBar.ctorParameters = () => [\n { type: MatSnackBarRef },\n { type: undefined, decorators: [{ type: Inject, args: [MAT_SNACK_BAR_DATA,] }] }\n];\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * Animations used by the Material snack bar.\n * \\@docs-private\n * @type {?}\n */\nconst matSnackBarAnimations = {\n /**\n * Animation that shows and hides a snack bar.\n */\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 * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * Internal component that wraps user-provided snack bar content.\n * \\@docs-private\n */\nclass MatSnackBarContainer extends BasePortalOutlet {\n /**\n * @param {?} _ngZone\n * @param {?} _elementRef\n * @param {?} _changeDetectorRef\n * @param {?} snackBarConfig\n */\n constructor(_ngZone, _elementRef, _changeDetectorRef, snackBarConfig) {\n super();\n this._ngZone = _ngZone;\n this._elementRef = _elementRef;\n this._changeDetectorRef = _changeDetectorRef;\n this.snackBarConfig = snackBarConfig;\n /**\n * Whether the component has been destroyed.\n */\n this._destroyed = false;\n /**\n * Subject for notifying that the snack bar has exited from view.\n */\n this._onExit = new Subject();\n /**\n * Subject for notifying that the snack bar has finished entering the view.\n */\n this._onEnter = new Subject();\n /**\n * The state of the snack bar animations.\n */\n this._animationState = 'void';\n // Based on the ARIA spec, `alert` and `status` roles have an\n // implicit `assertive` and `polite` politeness respectively.\n if (snackBarConfig.politeness === 'assertive' && !snackBarConfig.announcementMessage) {\n this._role = 'alert';\n }\n else if (snackBarConfig.politeness === 'off') {\n this._role = null;\n }\n else {\n this._role = 'status';\n }\n }\n /**\n * Attach a component portal as content to this snack bar container.\n * @template T\n * @param {?} portal\n * @return {?}\n */\n attachComponentPortal(portal) {\n this._assertNotAttached();\n this._applySnackBarClasses();\n return this._portalOutlet.attachComponentPortal(portal);\n }\n /**\n * Attach a template portal as content to this snack bar container.\n * @template C\n * @param {?} portal\n * @return {?}\n */\n attachTemplatePortal(portal) {\n this._assertNotAttached();\n this._applySnackBarClasses();\n return this._portalOutlet.attachTemplatePortal(portal);\n }\n /**\n * Handle end of animations, updating the state of the snackbar.\n * @param {?} event\n * @return {?}\n */\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 /** @type {?} */\n const onEnter = this._onEnter;\n this._ngZone.run((/**\n * @return {?}\n */\n () => {\n onEnter.next();\n onEnter.complete();\n }));\n }\n }\n /**\n * Begin animation of snack bar entrance into view.\n * @return {?}\n */\n enter() {\n if (!this._destroyed) {\n this._animationState = 'visible';\n this._changeDetectorRef.detectChanges();\n }\n }\n /**\n * Begin animation of the snack bar exiting from view.\n * @return {?}\n */\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 return this._onExit;\n }\n /**\n * Makes sure the exit callbacks have been invoked when the element is destroyed.\n * @return {?}\n */\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 * @private\n * @return {?}\n */\n _completeExit() {\n this._ngZone.onMicrotaskEmpty.asObservable().pipe(take(1)).subscribe((/**\n * @return {?}\n */\n () => {\n this._onExit.next();\n this._onExit.complete();\n }));\n }\n /**\n * Applies the various positioning and user-configured CSS classes to the snack bar.\n * @private\n * @return {?}\n */\n _applySnackBarClasses() {\n /** @type {?} */\n const element = this._elementRef.nativeElement;\n /** @type {?} */\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((/**\n * @param {?} cssClass\n * @return {?}\n */\n 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 /**\n * Asserts that no content is already attached to the container.\n * @private\n * @return {?}\n */\n _assertNotAttached() {\n if (this._portalOutlet.hasAttached()) {\n throw Error('Attempting to attach snack bar content after content is already attached');\n }\n }\n}\nMatSnackBarContainer.decorators = [\n { type: Component, args: [{selector: 'snack-bar-container',\n template: \"<ng-template cdkPortalOutlet></ng-template>\",\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}@media (-ms-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 // 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 '[attr.role]': '_role',\n 'class': 'mat-snack-bar-container',\n '[@state]': '_animationState',\n '(@state.done)': 'onAnimationEnd($event)'\n },\n },] },\n];\n/** @nocollapse */\nMatSnackBarContainer.ctorParameters = () => [\n { type: NgZone },\n { type: ElementRef },\n { type: ChangeDetectorRef },\n { type: MatSnackBarConfig }\n];\nMatSnackBarContainer.propDecorators = {\n _portalOutlet: [{ type: ViewChild, args: [CdkPortalOutlet, { static: true },] }]\n};\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass MatSnackBarModule {\n}\nMatSnackBarModule.decorators = [\n { type: NgModule, 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];\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * Injection token that can be used to specify default snack bar.\n * @type {?}\n */\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/**\n * \\@docs-private\n * @return {?}\n */\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 /**\n * @param {?} _overlay\n * @param {?} _live\n * @param {?} _injector\n * @param {?} _breakpointObserver\n * @param {?} _parentSnackBar\n * @param {?} _defaultConfig\n */\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 }\n /**\n * Reference to the currently opened snackbar at *any* level.\n * @return {?}\n */\n get _openedSnackBarRef() {\n /** @type {?} */\n const parent = this._parentSnackBar;\n return parent ? parent._openedSnackBarRef : this._snackBarRefAtThisLevel;\n }\n /**\n * @param {?} value\n * @return {?}\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 * @template T\n * @param {?} component Component to be instantiated.\n * @param {?=} config Extra configuration for the snack bar.\n * @return {?}\n */\n openFromComponent(component, config) {\n return (/** @type {?} */ (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 * @return {?}\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 * @return {?}\n */\n open(message, action = '', config) {\n /** @type {?} */\n const _config = 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 if (!_config.announcementMessage) {\n _config.announcementMessage = message;\n }\n return this.openFromComponent(SimpleSnackBar, _config);\n }\n /**\n * Dismisses the currently-visible snack bar.\n * @return {?}\n */\n dismiss() {\n if (this._openedSnackBarRef) {\n this._openedSnackBarRef.dismiss();\n }\n }\n /**\n * @return {?}\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 * @private\n * @param {?} overlayRef\n * @param {?} config\n * @return {?}\n */\n _attachSnackBarContainer(overlayRef, config) {\n /** @type {?} */\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n /** @type {?} */\n const injector = new PortalInjector(userInjector || this._injector, new WeakMap([\n [MatSnackBarConfig, config]\n ]));\n /** @type {?} */\n const containerPortal = new ComponentPortal(MatSnackBarContainer, config.viewContainerRef, injector);\n /** @type {?} */\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 * @private\n * @template T\n * @param {?} content\n * @param {?=} userConfig\n * @return {?}\n */\n _attach(content, userConfig) {\n /** @type {?} */\n const config = Object.assign({}, new MatSnackBarConfig(), this._defaultConfig, userConfig);\n /** @type {?} */\n const overlayRef = this._createOverlay(config);\n /** @type {?} */\n const container = this._attachSnackBarContainer(overlayRef, config);\n /** @type {?} */\n const snackBarRef = new MatSnackBarRef(container, overlayRef);\n if (content instanceof TemplateRef) {\n /** @type {?} */\n const portal = new TemplatePortal(content, (/** @type {?} */ (null)), (/** @type {?} */ ({\n $implicit: config.data,\n snackBarRef\n })));\n snackBarRef.instance = container.attachTemplatePortal(portal);\n }\n else {\n /** @type {?} */\n const injector = this._createInjector(config, snackBarRef);\n /** @type {?} */\n const portal = new ComponentPortal(content, undefined, injector);\n /** @type {?} */\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.Handset).pipe(takeUntil(overlayRef.detachments().pipe(take(1)))).subscribe((/**\n * @param {?} state\n * @return {?}\n */\n state$$1 => {\n if (state$$1.matches) {\n overlayRef.overlayElement.classList.add('mat-snack-bar-handset');\n }\n else {\n overlayRef.overlayElement.classList.remove('mat-snack-bar-handset');\n }\n }));\n this._animateSnackBar(snackBarRef, config);\n this._openedSnackBarRef = snackBarRef;\n return this._openedSnackBarRef;\n }\n /**\n * Animates the old snack bar out and the new one in.\n * @private\n * @param {?} snackBarRef\n * @param {?} config\n * @return {?}\n */\n _animateSnackBar(snackBarRef, config) {\n // When the snackbar is dismissed, clear the reference to it.\n snackBarRef.afterDismissed().subscribe((/**\n * @return {?}\n */\n () => {\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 * @return {?}\n */\n () => {\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((/**\n * @return {?}\n */\n () => snackBarRef._dismissAfter((/** @type {?} */ (config.duration)))));\n }\n if (config.announcementMessage) {\n this._live.announce(config.announcementMessage, config.politeness);\n }\n }\n /**\n * Creates a new overlay and places it in the correct location.\n * @private\n * @param {?} config The user-specified snack bar config.\n * @return {?}\n */\n _createOverlay(config) {\n /** @type {?} */\n const overlayConfig = new OverlayConfig();\n overlayConfig.direction = config.direction;\n /** @type {?} */\n let positionStrategy = this._overlay.position().global();\n // Set horizontal position.\n /** @type {?} */\n const isRtl = config.direction === 'rtl';\n /** @type {?} */\n const isLeft = (config.horizontalPosition === 'left' ||\n (config.horizontalPosition === 'start' && !isRtl) ||\n (config.horizontalPosition === 'end' && isRtl));\n /** @type {?} */\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 * @private\n * @template T\n * @param {?} config Config that was used to create the snack bar.\n * @param {?} snackBarRef Reference to the snack bar.\n * @return {?}\n */\n _createInjector(config, snackBarRef) {\n /** @type {?} */\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n return new PortalInjector(userInjector || this._injector, new WeakMap([\n [MatSnackBarRef, snackBarRef],\n [MAT_SNACK_BAR_DATA, config.data]\n ]));\n }\n}\nMatSnackBar.decorators = [\n { type: Injectable, args: [{ providedIn: MatSnackBarModule },] },\n];\n/** @nocollapse */\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/** @nocollapse */ MatSnackBar.ngInjectableDef = ɵɵdefineInjectable({ factory: function MatSnackBar_Factory() { return new MatSnackBar(ɵɵinject(Overlay), ɵɵinject(LiveAnnouncer), ɵɵinject(INJECTOR), ɵɵinject(BreakpointObserver), ɵɵinject(MatSnackBar, 12), ɵɵinject(MAT_SNACK_BAR_DEFAULT_OPTIONS)); }, token: MatSnackBar, providedIn: MatSnackBarModule });\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\nexport { MatSnackBarModule, MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY, MAT_SNACK_BAR_DEFAULT_OPTIONS, MatSnackBar, MatSnackBarContainer, MAT_SNACK_BAR_DATA, MatSnackBarConfig, MatSnackBarRef, SimpleSnackBar, matSnackBarAnimations };\n//# sourceMappingURL=snack-bar.js.map\n","import { Injectable } from '@angular/core';\n\nimport { from, Observable } from 'rxjs';\nimport { first, map, share } from 'rxjs/operators';\n\nimport { Logger } from 'app/shared/logger.service';\n\ndeclare const System: {\n import(name: string): Promise<any>;\n};\n\ntype PrettyPrintOne = (code: string, 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 // prettify.js is not in window global; load it with webpack loader\n System.import('assets/js/prettify.js')\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 * @param {string} code - the code snippet to format; should already be HTML encoded\n * @param {string} [language] - The language of the code to render (could be javascript, html, typescript, etc)\n * @param {string|number} [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: string, language?: string, linenums?: number | boolean) {\n return this.prettyPrintOne.pipe(\n map(ppo => {\n try {\n return ppo(code, language, linenums);\n } catch (err) {\n const msg = `Could not format code that begins '${code.substr(0, 50)}...'.`;\n console.error(msg, err);\n throw new Error(msg);\n }\n }),\n first(), // complete immediately\n );\n }\n}\n","/**\n * @fileoverview This file was generated by the Angular template compiler. Do not edit.\n *\n * @suppress {suspiciousCode,uselessCode,missingProperties,missingOverride,checkTypes}\n * tslint:disable\n */ \nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"@angular/material/snack-bar\";\nimport * as i2 from \"@angular/cdk/overlay\";\nimport * as i3 from \"@angular/common\";\nimport * as i4 from \"@angular/cdk/bidi\";\nimport * as i5 from \"@angular/cdk/portal\";\nimport * as i6 from \"@angular/cdk/platform\";\nimport * as i7 from \"@angular/cdk/scrolling\";\nimport * as i8 from \"@angular/material/core\";\nimport * as i9 from \"@angular/platform-browser\";\nimport * as i10 from \"@angular/material/button\";\nimport * as i11 from \"../../button/typings/index.ngfactory\";\nimport * as i12 from \"@angular/cdk/a11y\";\nimport * as i13 from \"@angular/platform-browser/animations\";\nvar MatSnackBarModuleNgFactory = i0.ɵcmf(i1.MatSnackBarModule, [], function (_l) { return i0.ɵmod([i0.ɵmpd(512, i0.ComponentFactoryResolver, i0.ɵCodegenComponentFactoryResolver, [[8, [MatSnackBarContainerNgFactory, SimpleSnackBarNgFactory]], [3, i0.ComponentFactoryResolver], i0.NgModuleRef]), i0.ɵmpd(4608, i2.Overlay, i2.Overlay, [i2.ScrollStrategyOptions, i2.OverlayContainer, i0.ComponentFactoryResolver, i2.OverlayPositionBuilder, i2.OverlayKeyboardDispatcher, i0.Injector, i0.NgZone, i3.DOCUMENT, i4.Directionality, [2, i3.Location]]), i0.ɵmpd(5120, i2.ɵc, i2.ɵd, [i2.Overlay]), i0.ɵmpd(4608, i3.NgLocalization, i3.NgLocaleLocalization, [i0.LOCALE_ID, [2, i3.ɵangular_packages_common_common_a]]), i0.ɵmpd(1073742336, i4.BidiModule, i4.BidiModule, []), i0.ɵmpd(1073742336, i5.PortalModule, i5.PortalModule, []), i0.ɵmpd(1073742336, i6.PlatformModule, i6.PlatformModule, []), i0.ɵmpd(1073742336, i7.ScrollingModule, i7.ScrollingModule, []), i0.ɵmpd(1073742336, i2.OverlayModule, i2.OverlayModule, []), i0.ɵmpd(1073742336, i3.CommonModule, i3.CommonModule, []), i0.ɵmpd(1073742336, i8.MatCommonModule, i8.MatCommonModule, [[2, i8.MATERIAL_SANITY_CHECKS], [2, i9.HAMMER_LOADER]]), i0.ɵmpd(1073742336, i8.MatRippleModule, i8.MatRippleModule, []), i0.ɵmpd(1073742336, i10.MatButtonModule, i10.MatButtonModule, []), i0.ɵmpd(1073742336, i1.MatSnackBarModule, i1.MatSnackBarModule, [])]); });\nexport { MatSnackBarModuleNgFactory as MatSnackBarModuleNgFactory };\nvar styles_MatSnackBarContainer = [\".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}@media (-ms-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%}\"];\nvar RenderType_MatSnackBarContainer = i0.ɵcrt({ encapsulation: 2, styles: styles_MatSnackBarContainer, data: { \"animation\": [{ type: 7, name: \"state\", definitions: [{ type: 0, name: \"void, hidden\", styles: { type: 6, styles: { transform: \"scale(0.8)\", opacity: 0 }, offset: null }, options: undefined }, { type: 0, name: \"visible\", styles: { type: 6, styles: { transform: \"scale(1)\", opacity: 1 }, offset: null }, options: undefined }, { type: 1, expr: \"* => visible\", animation: { type: 4, styles: null, timings: \"150ms cubic-bezier(0, 0, 0.2, 1)\" }, options: null }, { type: 1, expr: \"* => void, * => hidden\", animation: { type: 4, styles: { type: 6, styles: { opacity: 0 }, offset: null }, timings: \"75ms cubic-bezier(0.4, 0.0, 1, 1)\" }, options: null }], options: {} }] } });\nexport { RenderType_MatSnackBarContainer as RenderType_MatSnackBarContainer };\nfunction View_MatSnackBarContainer_1(_l) { return i0.ɵvid(0, [(_l()(), i0.ɵand(0, null, null, 0))], null, null); }\nexport function View_MatSnackBarContainer_0(_l) { return i0.ɵvid(0, [i0.ɵqud(402653184, 1, { _portalOutlet: 0 }), (_l()(), i0.ɵand(16777216, null, null, 1, null, View_MatSnackBarContainer_1)), i0.ɵdid(2, 212992, [[1, 4]], 0, i5.CdkPortalOutlet, [i0.ComponentFactoryResolver, i0.ViewContainerRef], { portal: [0, \"portal\"] }, null)], function (_ck, _v) { var currVal_0 = \"\"; _ck(_v, 2, 0, currVal_0); }, null); }\nexport function View_MatSnackBarContainer_Host_0(_l) { return i0.ɵvid(0, [(_l()(), i0.ɵeld(0, 0, null, null, 1, \"snack-bar-container\", [[\"class\", \"mat-snack-bar-container\"]], [[1, \"role\", 0], [40, \"@state\", 0]], [[\"component\", \"@state.done\"]], function (_v, en, $event) { var ad = true; if ((\"component:@state.done\" === en)) {\n var pd_0 = (i0.ɵnov(_v, 1).onAnimationEnd($event) !== false);\n ad = (pd_0 && ad);\n } return ad; }, View_MatSnackBarContainer_0, RenderType_MatSnackBarContainer)), i0.ɵdid(1, 180224, null, 0, i1.MatSnackBarContainer, [i0.NgZone, i0.ElementRef, i0.ChangeDetectorRef, i1.MatSnackBarConfig], null, null)], null, function (_ck, _v) { var currVal_0 = i0.ɵnov(_v, 1)._role; var currVal_1 = i0.ɵnov(_v, 1)._animationState; _ck(_v, 0, 0, currVal_0, currVal_1); }); }\nvar MatSnackBarContainerNgFactory = i0.ɵccf(\"snack-bar-container\", i1.MatSnackBarContainer, View_MatSnackBarContainer_Host_0, {}, {}, []);\nexport { MatSnackBarContainerNgFactory as MatSnackBarContainerNgFactory };\nvar styles_SimpleSnackBar = [\".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;height:100%;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}\"];\nvar RenderType_SimpleSnackBar = i0.ɵcrt({ encapsulation: 2, styles: styles_SimpleSnackBar, data: {} });\nexport { RenderType_SimpleSnackBar as RenderType_SimpleSnackBar };\nfunction View_SimpleSnackBar_1(_l) { return i0.ɵvid(0, [(_l()(), i0.ɵeld(0, 0, null, null, 3, \"div\", [[\"class\", \"mat-simple-snackbar-action\"]], null, null, null, null, null)), (_l()(), i0.ɵeld(1, 0, null, null, 2, \"button\", [[\"mat-button\", \"\"]], [[1, \"disabled\", 0], [2, \"_mat-animation-noopable\", null]], [[null, \"click\"]], function (_v, en, $event) { var ad = true; var _co = _v.component; if ((\"click\" === en)) {\n var pd_0 = (_co.action() !== false);\n ad = (pd_0 && ad);\n } return ad; }, i11.View_MatButton_0, i11.RenderType_MatButton)), i0.ɵdid(2, 180224, null, 0, i10.MatButton, [i0.ElementRef, i12.FocusMonitor, [2, i13.ANIMATION_MODULE_TYPE]], null, null), (_l()(), i0.ɵted(3, 0, [\"\", \"\"]))], null, function (_ck, _v) { var _co = _v.component; var currVal_0 = (i0.ɵnov(_v, 2).disabled || null); var currVal_1 = (i0.ɵnov(_v, 2)._animationMode === \"NoopAnimations\"); _ck(_v, 1, 0, currVal_0, currVal_1); var currVal_2 = _co.data.action; _ck(_v, 3, 0, currVal_2); }); }\nexport function View_SimpleSnackBar_0(_l) { return i0.ɵvid(2, [(_l()(), i0.ɵeld(0, 0, null, null, 1, \"span\", [], null, null, null, null, null)), (_l()(), i0.ɵted(1, null, [\"\", \"\"])), (_l()(), i0.ɵand(16777216, null, null, 1, null, View_SimpleSnackBar_1)), i0.ɵdid(3, 16384, null, 0, i3.NgIf, [i0.ViewContainerRef, i0.TemplateRef], { ngIf: [0, \"ngIf\"] }, null)], function (_ck, _v) { var _co = _v.component; var currVal_1 = _co.hasAction; _ck(_v, 3, 0, currVal_1); }, function (_ck, _v) { var _co = _v.component; var currVal_0 = _co.data.message; _ck(_v, 1, 0, currVal_0); }); }\nexport function View_SimpleSnackBar_Host_0(_l) { return i0.ɵvid(0, [(_l()(), i0.ɵeld(0, 0, null, null, 1, \"simple-snack-bar\", [[\"class\", \"mat-simple-snackbar\"]], null, null, null, View_SimpleSnackBar_0, RenderType_SimpleSnackBar)), i0.ɵdid(1, 49152, null, 0, i1.SimpleSnackBar, [i1.MatSnackBarRef, i1.MAT_SNACK_BAR_DATA], null, null)], null, null); }\nvar SimpleSnackBarNgFactory = i0.ɵccf(\"simple-snack-bar\", i1.SimpleSnackBar, View_SimpleSnackBar_Host_0, {}, {}, []);\nexport { SimpleSnackBarNgFactory as SimpleSnackBarNgFactory };\n","<ng-template cdkPortalOutlet></ng-template>","<span>{{data.message}}</span><div class=\"mat-simple-snackbar-action\" *ngIf=\"hasAction\"><button mat-button (click)=\"action()\">{{data.action}}</button></div>","/**\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 { ComponentFactoryResolver, Directive, EventEmitter, NgModule, Output, TemplateRef, ViewContainerRef } from '@angular/core';\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\n/**\n * Throws an exception when attempting to attach a null portal to a host.\n * \\@docs-private\n * @return {?}\n */\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 * @return {?}\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 * @return {?}\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 * @return {?}\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 * @return {?}\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 * @return {?}\n */\nfunction throwNoPortalAttachedError() {\n throw Error('Attempting to detach a portal that is not attached to a host');\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\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 * @abstract\n * @template T\n */\nclass Portal {\n /**\n * Attach this portal to a host.\n * @param {?} host\n * @return {?}\n */\n attach(host) {\n if (host == null) {\n throwNullPortalOutletError();\n }\n if (host.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n this._attachedHost = host;\n return (/** @type {?} */ (host.attach(this)));\n }\n /**\n * Detach this portal from its host\n * @return {?}\n */\n detach() {\n /** @type {?} */\n let host = this._attachedHost;\n if (host == null) {\n throwNoPortalAttachedError();\n }\n else {\n this._attachedHost = null;\n host.detach();\n }\n }\n /**\n * Whether this portal is attached to a host.\n * @return {?}\n */\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 * @param {?} host\n * @return {?}\n */\n setAttachedHost(host) {\n this._attachedHost = host;\n }\n}\n/**\n * A `ComponentPortal` is a portal that instantiates some Component upon attachment.\n * @template T\n */\nclass ComponentPortal extends Portal {\n /**\n * @param {?} component\n * @param {?=} viewContainerRef\n * @param {?=} injector\n * @param {?=} componentFactoryResolver\n */\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 * @template C\n */\nclass TemplatePortal extends Portal {\n /**\n * @param {?} template\n * @param {?} viewContainerRef\n * @param {?=} context\n */\n constructor(template, viewContainerRef, context) {\n super();\n this.templateRef = template;\n this.viewContainerRef = viewContainerRef;\n this.context = context;\n }\n /**\n * @return {?}\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 * @param {?} host\n * @param {?=} context\n * @return {?}\n */\n attach(host, context = this.context) {\n this.context = context;\n return super.attach(host);\n }\n /**\n * @return {?}\n */\n detach() {\n this.context = undefined;\n return super.detach();\n }\n}\n/**\n * Partial implementation of PortalOutlet that handles attaching\n * ComponentPortal and TemplatePortal.\n * @abstract\n */\nclass BasePortalOutlet {\n constructor() {\n /**\n * Whether this host has already been permanently disposed.\n */\n this._isDisposed = false;\n }\n /**\n * Whether this host has an attached portal.\n * @return {?}\n */\n hasAttached() {\n return !!this._attachedPortal;\n }\n /**\n * Attaches a portal.\n * @param {?} portal\n * @return {?}\n */\n attach(portal) {\n if (!portal) {\n throwNullPortalError();\n }\n if (this.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n if (this._isDisposed) {\n throwPortalOutletAlreadyDisposedError();\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 }\n throwUnknownPortalTypeError();\n }\n /**\n * Detaches a previously attached portal.\n * @return {?}\n */\n detach() {\n if (this._attachedPortal) {\n this._attachedPortal.setAttachedHost(null);\n this._attachedPortal = null;\n }\n this._invokeDisposeFn();\n }\n /**\n * Permanently dispose of this portal host.\n * @return {?}\n */\n dispose() {\n if (this.hasAttached()) {\n this.detach();\n }\n this._invokeDisposeFn();\n this._isDisposed = true;\n }\n /**\n * \\@docs-private\n * @param {?} fn\n * @return {?}\n */\n setDisposeFn(fn) {\n this._disposeFn = fn;\n }\n /**\n * @private\n * @return {?}\n */\n _invokeDisposeFn() {\n if (this._disposeFn) {\n this._disposeFn();\n this._disposeFn = null;\n }\n }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\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 /**\n * @param {?} outletElement\n * @param {?} _componentFactoryResolver\n * @param {?} _appRef\n * @param {?} _defaultInjector\n */\n constructor(outletElement, _componentFactoryResolver, _appRef, _defaultInjector) {\n super();\n this.outletElement = outletElement;\n this._componentFactoryResolver = _componentFactoryResolver;\n this._appRef = _appRef;\n this._defaultInjector = _defaultInjector;\n }\n /**\n * Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.\n * @template T\n * @param {?} portal Portal to be attached\n * @return {?} Reference to the created component.\n */\n attachComponentPortal(portal) {\n /** @type {?} */\n const resolver = portal.componentFactoryResolver || this._componentFactoryResolver;\n /** @type {?} */\n const componentFactory = resolver.resolveComponentFactory(portal.component);\n /** @type {?} */\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((/**\n * @return {?}\n */\n () => componentRef.destroy()));\n }\n else {\n componentRef = componentFactory.create(portal.injector || this._defaultInjector);\n this._appRef.attachView(componentRef.hostView);\n this.setDisposeFn((/**\n * @return {?}\n */\n () => {\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 return componentRef;\n }\n /**\n * Attaches a template portal to the DOM as an embedded view.\n * @template C\n * @param {?} portal Portal to be attached.\n * @return {?} Reference to the created embedded view.\n */\n attachTemplatePortal(portal) {\n /** @type {?} */\n let viewContainer = portal.viewContainerRef;\n /** @type {?} */\n let viewRef = viewContainer.createEmbeddedView(portal.templateRef, portal.context);\n viewRef.detectChanges();\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((/**\n * @param {?} rootNode\n * @return {?}\n */\n rootNode => this.outletElement.appendChild(rootNode)));\n this.setDisposeFn(((/**\n * @return {?}\n */\n () => {\n /** @type {?} */\n let index = viewContainer.indexOf(viewRef);\n if (index !== -1) {\n viewContainer.remove(index);\n }\n })));\n // TODO(jelbourn): Return locals from view.\n return viewRef;\n }\n /**\n * Clears out a portal from the DOM.\n * @return {?}\n */\n dispose() {\n super.dispose();\n if (this.outletElement.parentNode != null) {\n this.outletElement.parentNode.removeChild(this.outletElement);\n }\n }\n /**\n * Gets the root HTMLElement for an instantiated component.\n * @private\n * @param {?} componentRef\n * @return {?}\n */\n _getComponentRootNode(componentRef) {\n return (/** @type {?} */ (((/** @type {?} */ (componentRef.hostView))).rootNodes[0]));\n }\n}\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\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 /**\n * @param {?} templateRef\n * @param {?} viewContainerRef\n */\n constructor(templateRef, viewContainerRef) {\n super(templateRef, viewContainerRef);\n }\n}\nCdkPortal.decorators = [\n { type: Directive, args: [{\n selector: '[cdk-portal], [cdkPortal], [portal]',\n exportAs: 'cdkPortal',\n },] },\n];\n/** @nocollapse */\nCdkPortal.ctorParameters = () => [\n { type: TemplateRef },\n { type: ViewContainerRef }\n];\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 /**\n * @param {?} _componentFactoryResolver\n * @param {?} _viewContainerRef\n */\n constructor(_componentFactoryResolver, _viewContainerRef) {\n super();\n this._componentFactoryResolver = _componentFactoryResolver;\n this._viewContainerRef = _viewContainerRef;\n /**\n * Whether the portal component is initialized.\n */\n this._isInitialized = false;\n /**\n * Emits when a portal is attached to the outlet.\n */\n this.attached = new EventEmitter();\n }\n /**\n * Portal associated with the Portal outlet.\n * @return {?}\n */\n get portal() {\n return this._attachedPortal;\n }\n /**\n * @param {?} portal\n * @return {?}\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 /**\n * Component or view reference that is attached to the portal.\n * @return {?}\n */\n get attachedRef() {\n return this._attachedRef;\n }\n /**\n * @return {?}\n */\n ngOnInit() {\n this._isInitialized = true;\n }\n /**\n * @return {?}\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 * @template T\n * @param {?} portal Portal to be attached to the portal outlet.\n * @return {?} 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 /** @type {?} */\n const viewContainerRef = portal.viewContainerRef != null ?\n portal.viewContainerRef :\n this._viewContainerRef;\n /** @type {?} */\n const resolver = portal.componentFactoryResolver || this._componentFactoryResolver;\n /** @type {?} */\n const componentFactory = resolver.resolveComponentFactory(portal.component);\n /** @type {?} */\n const ref = viewContainerRef.createComponent(componentFactory, viewContainerRef.length, portal.injector || viewContainerRef.injector);\n super.setDisposeFn((/**\n * @return {?}\n */\n () => 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 PortlHost as an embedded View.\n * @template C\n * @param {?} portal Portal to be attached.\n * @return {?} Reference to the created embedded view.\n */\n attachTemplatePortal(portal) {\n portal.setAttachedHost(this);\n /** @type {?} */\n const viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context);\n super.setDisposeFn((/**\n * @return {?}\n */\n () => this._viewContainerRef.clear()));\n this._attachedPortal = portal;\n this._attachedRef = viewRef;\n this.attached.emit(viewRef);\n return viewRef;\n }\n}\nCdkPortalOutlet.decorators = [\n { type: Directive, args: [{\n selector: '[cdkPortalOutlet], [cdkPortalHost], [portalHost]',\n exportAs: 'cdkPortalOutlet, cdkPortalHost',\n inputs: ['portal: cdkPortalOutlet']\n },] },\n];\n/** @nocollapse */\nCdkPortalOutlet.ctorParameters = () => [\n { type: ComponentFactoryResolver },\n { type: ViewContainerRef }\n];\nCdkPortalOutlet.propDecorators = {\n attached: [{ type: Output }]\n};\nclass PortalModule {\n}\nPortalModule.decorators = [\n { type: NgModule, args: [{\n exports: [CdkPortal, CdkPortalOutlet],\n declarations: [CdkPortal, CdkPortalOutlet],\n },] },\n];\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\n/**\n * Custom injector to be used when providing custom\n * injection tokens to components inside a portal.\n * \\@docs-private\n */\nclass PortalInjector {\n /**\n * @param {?} _parentInjector\n * @param {?} _customTokens\n */\n constructor(_parentInjector, _customTokens) {\n this._parentInjector = _parentInjector;\n this._customTokens = _customTokens;\n }\n /**\n * @param {?} token\n * @param {?=} notFoundValue\n * @return {?}\n */\n get(token, notFoundValue) {\n /** @type {?} */\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 * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\nexport { DomPortalOutlet as DomPortalHost, CdkPortalOutlet as PortalHostDirective, CdkPortal as TemplatePortalDirective, BasePortalOutlet as BasePortalHost, Portal, ComponentPortal, TemplatePortal, BasePortalOutlet, DomPortalOutlet, CdkPortal, CdkPortalOutlet, PortalModule, PortalInjector };\n//# sourceMappingURL=portal.js.map\n"],"sourceRoot":""}