blob: 8aecedfea54086b3ade9929067c8d9ad98409a7b [file] [log] [blame]
{"version":3,"file":"material-dialog.umd.min.js","sources":["../../node_modules/tslib/tslib.es6.js","../../src/material/dialog/dialog-container.ts","../../src/material/dialog/dialog.ts","../../src/material/dialog/dialog-content-directives.ts","../../src/material/dialog/dialog-config.ts","../../src/material/dialog/dialog-animations.ts","../../src/material/dialog/dialog-ref.ts","../../src/material/dialog/dialog-module.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n Component,\n ComponentRef,\n ElementRef,\n EmbeddedViewRef,\n EventEmitter,\n Inject,\n Optional,\n ChangeDetectorRef,\n ViewChild,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {AnimationEvent} from '@angular/animations';\nimport {matDialogAnimations} from './dialog-animations';\nimport {\n BasePortalOutlet,\n ComponentPortal,\n CdkPortalOutlet,\n TemplatePortal\n} from '@angular/cdk/portal';\nimport {FocusTrap, FocusTrapFactory} from '@angular/cdk/a11y';\nimport {MatDialogConfig} from './dialog-config';\n\n\n/**\n * Throws an exception for the case when a ComponentPortal is\n * attached to a DomPortalOutlet without an origin.\n * @docs-private\n */\nexport function throwMatDialogContentAlreadyAttachedError() {\n throw Error('Attempting to attach dialog content after content is already attached');\n}\n\n/**\n * Internal component that wraps user-provided dialog content.\n * Animation is based on https://material.io/guidelines/motion/choreography.html.\n * @docs-private\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-dialog-container',\n templateUrl: 'dialog-container.html',\n styleUrls: ['dialog.css'],\n encapsulation: ViewEncapsulation.None,\n // Using OnPush for dialogs caused some G3 sync issues. Disabled until we can track them down.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n animations: [matDialogAnimations.dialogContainer],\n host: {\n 'class': 'mat-dialog-container',\n 'tabindex': '-1',\n 'aria-modal': 'true',\n '[attr.id]': '_id',\n '[attr.role]': '_config.role',\n '[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledBy',\n '[attr.aria-label]': '_config.ariaLabel',\n '[attr.aria-describedby]': '_config.ariaDescribedBy || null',\n '[@dialogContainer]': '_state',\n '(@dialogContainer.start)': '_onAnimationStart($event)',\n '(@dialogContainer.done)': '_onAnimationDone($event)',\n },\n})\nexport class MatDialogContainer extends BasePortalOutlet {\n /** The portal outlet inside of this container into which the dialog content will be loaded. */\n @ViewChild(CdkPortalOutlet, {static: true}) _portalOutlet: CdkPortalOutlet;\n\n /** The class that traps and manages focus within the dialog. */\n private _focusTrap: FocusTrap;\n\n /** Element that was focused before the dialog was opened. Save this to restore upon close. */\n private _elementFocusedBeforeDialogWasOpened: HTMLElement | null = null;\n\n /** State of the dialog animation. */\n _state: 'void' | 'enter' | 'exit' = 'enter';\n\n /** Emits when an animation state changes. */\n _animationStateChanged = new EventEmitter<AnimationEvent>();\n\n /** ID of the element that should be considered as the dialog's label. */\n _ariaLabelledBy: string | null;\n\n /** ID for the container DOM element. */\n _id: string;\n\n constructor(\n private _elementRef: ElementRef,\n private _focusTrapFactory: FocusTrapFactory,\n private _changeDetectorRef: ChangeDetectorRef,\n @Optional() @Inject(DOCUMENT) private _document: any,\n /** The dialog configuration. */\n public _config: MatDialogConfig) {\n\n super();\n this._ariaLabelledBy = _config.ariaLabelledBy || null;\n }\n\n /**\n * Attach a ComponentPortal as content to this dialog container.\n * @param portal Portal to be attached as the dialog content.\n */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n if (this._portalOutlet.hasAttached()) {\n throwMatDialogContentAlreadyAttachedError();\n }\n\n this._savePreviouslyFocusedElement();\n return this._portalOutlet.attachComponentPortal(portal);\n }\n\n /**\n * Attach a TemplatePortal as content to this dialog container.\n * @param portal Portal to be attached as the dialog content.\n */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n if (this._portalOutlet.hasAttached()) {\n throwMatDialogContentAlreadyAttachedError();\n }\n\n this._savePreviouslyFocusedElement();\n return this._portalOutlet.attachTemplatePortal(portal);\n }\n\n /** Moves the focus inside the focus trap. */\n private _trapFocus() {\n const element = this._elementRef.nativeElement;\n\n if (!this._focusTrap) {\n this._focusTrap = this._focusTrapFactory.create(element);\n }\n\n // If we were to attempt to focus immediately, then the content of the dialog would not yet be\n // ready in instances where change detection has to run first. To deal with this, we simply\n // wait for the microtask queue to be empty.\n if (this._config.autoFocus) {\n this._focusTrap.focusInitialElementWhenReady();\n } else {\n const activeElement = this._document.activeElement;\n\n // Otherwise ensure that focus is on the dialog container. It's possible that a different\n // component tried to move focus while the open animation was running. See:\n // https://github.com/angular/components/issues/16215. Note that we only want to do this\n // if the focus isn't inside the dialog already, because it's possible that the consumer\n // turned off `autoFocus` in order to move focus themselves.\n if (activeElement !== element && !element.contains(activeElement)) {\n element.focus();\n }\n }\n }\n\n /** Restores focus to the element that was focused before the dialog opened. */\n private _restoreFocus() {\n const toFocus = this._elementFocusedBeforeDialogWasOpened;\n\n // We need the extra check, because IE can set the `activeElement` to null in some cases.\n if (this._config.restoreFocus && toFocus && typeof toFocus.focus === 'function') {\n toFocus.focus();\n }\n\n if (this._focusTrap) {\n this._focusTrap.destroy();\n }\n }\n\n /** Saves a reference to the element that was focused before the dialog was opened. */\n private _savePreviouslyFocusedElement() {\n if (this._document) {\n this._elementFocusedBeforeDialogWasOpened = this._document.activeElement as HTMLElement;\n\n // Note that there is no focus method when rendering on the server.\n if (this._elementRef.nativeElement.focus) {\n // Move focus onto the dialog immediately in order to prevent the user from accidentally\n // opening multiple dialogs at the same time. Needs to be async, because the element\n // may not be focusable immediately.\n Promise.resolve().then(() => this._elementRef.nativeElement.focus());\n }\n }\n }\n\n /** Callback, invoked whenever an animation on the host completes. */\n _onAnimationDone(event: AnimationEvent) {\n if (event.toState === 'enter') {\n this._trapFocus();\n } else if (event.toState === 'exit') {\n this._restoreFocus();\n }\n\n this._animationStateChanged.emit(event);\n }\n\n /** Callback, invoked when an animation on the host starts. */\n _onAnimationStart(event: AnimationEvent) {\n this._animationStateChanged.emit(event);\n }\n\n /** Starts the dialog exit animation. */\n _startExitAnimation(): void {\n this._state = 'exit';\n\n // Mark the container for check so it can react if the\n // view container is using OnPush change detection.\n this._changeDetectorRef.markForCheck();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directionality} from '@angular/cdk/bidi';\nimport {\n Overlay,\n OverlayConfig,\n OverlayContainer,\n OverlayRef,\n ScrollStrategy,\n} from '@angular/cdk/overlay';\nimport {ComponentPortal, ComponentType, PortalInjector, TemplatePortal} from '@angular/cdk/portal';\nimport {Location} from '@angular/common';\nimport {\n Inject,\n Injectable,\n InjectionToken,\n Injector,\n OnDestroy,\n Optional,\n SkipSelf,\n TemplateRef,\n} from '@angular/core';\nimport {defer, Observable, of as observableOf, Subject} from 'rxjs';\nimport {startWith} from 'rxjs/operators';\nimport {MatDialogConfig} from './dialog-config';\nimport {MatDialogContainer} from './dialog-container';\nimport {MatDialogRef} from './dialog-ref';\n\n\n/** Injection token that can be used to access the data that was passed in to a dialog. */\nexport const MAT_DIALOG_DATA = new InjectionToken<any>('MatDialogData');\n\n/** Injection token that can be used to specify default dialog options. */\nexport const MAT_DIALOG_DEFAULT_OPTIONS =\n new InjectionToken<MatDialogConfig>('mat-dialog-default-options');\n\n/** Injection token that determines the scroll handling while the dialog is open. */\nexport const MAT_DIALOG_SCROLL_STRATEGY =\n new InjectionToken<() => ScrollStrategy>('mat-dialog-scroll-strategy');\n\n/** @docs-private */\nexport function MAT_DIALOG_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy {\n return () => overlay.scrollStrategies.block();\n}\n\n/** @docs-private */\nexport function MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay):\n () => ScrollStrategy {\n return () => overlay.scrollStrategies.block();\n}\n\n/** @docs-private */\nexport const MAT_DIALOG_SCROLL_STRATEGY_PROVIDER = {\n provide: MAT_DIALOG_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY,\n};\n\n\n/**\n * Service to open Material Design modal dialogs.\n */\n@Injectable()\nexport class MatDialog implements OnDestroy {\n private _openDialogsAtThisLevel: MatDialogRef<any>[] = [];\n private readonly _afterAllClosedAtThisLevel = new Subject<void>();\n private readonly _afterOpenedAtThisLevel = new Subject<MatDialogRef<any>>();\n private _ariaHiddenElements = new Map<Element, string|null>();\n private _scrollStrategy: () => ScrollStrategy;\n\n /** Keeps track of the currently-open dialogs. */\n get openDialogs(): MatDialogRef<any>[] {\n return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;\n }\n\n /** Stream that emits when a dialog has been opened. */\n get afterOpened(): Subject<MatDialogRef<any>> {\n return this._parentDialog ? this._parentDialog.afterOpened : this._afterOpenedAtThisLevel;\n }\n\n /**\n * Stream that emits when a dialog has been opened.\n * @deprecated Use `afterOpened` instead.\n * @breaking-change 8.0.0\n */\n get afterOpen(): Subject<MatDialogRef<any>> {\n return this.afterOpened;\n }\n\n get _afterAllClosed(): Subject<void> {\n const parent = this._parentDialog;\n return parent ? parent._afterAllClosed : this._afterAllClosedAtThisLevel;\n }\n\n // TODO (jelbourn): tighten the typing right-hand side of this expression.\n /**\n * Stream that emits when all open dialog have finished closing.\n * Will emit on subscribe if there are no open dialogs to begin with.\n */\n readonly afterAllClosed: Observable<void> = defer(() => this.openDialogs.length ?\n this._afterAllClosed :\n this._afterAllClosed.pipe(startWith(undefined))) as Observable<any>;\n\n constructor(\n private _overlay: Overlay,\n private _injector: Injector,\n @Optional() private _location: Location,\n @Optional() @Inject(MAT_DIALOG_DEFAULT_OPTIONS) private _defaultOptions: MatDialogConfig,\n @Inject(MAT_DIALOG_SCROLL_STRATEGY) scrollStrategy: any,\n @Optional() @SkipSelf() private _parentDialog: MatDialog,\n private _overlayContainer: OverlayContainer) {\n this._scrollStrategy = scrollStrategy;\n }\n\n /**\n * Opens a modal dialog containing the given component.\n * @param componentOrTemplateRef Type of the component to load into the dialog,\n * or a TemplateRef to instantiate as the dialog content.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened dialog.\n */\n open<T, D = any, R = any>(componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,\n config?: MatDialogConfig<D>): MatDialogRef<T, R> {\n\n config = _applyConfigDefaults(config, this._defaultOptions || new MatDialogConfig());\n\n if (config.id && this.getDialogById(config.id)) {\n throw Error(`Dialog with id \"${config.id}\" exists already. The dialog id must be unique.`);\n }\n\n const overlayRef = this._createOverlay(config);\n const dialogContainer = this._attachDialogContainer(overlayRef, config);\n const dialogRef = this._attachDialogContent<T, R>(componentOrTemplateRef,\n dialogContainer,\n overlayRef,\n config);\n\n // If this is the first dialog that we're opening, hide all the non-overlay content.\n if (!this.openDialogs.length) {\n this._hideNonDialogContentFromAssistiveTechnology();\n }\n\n this.openDialogs.push(dialogRef);\n dialogRef.afterClosed().subscribe(() => this._removeOpenDialog(dialogRef));\n this.afterOpened.next(dialogRef);\n\n return dialogRef;\n }\n\n /**\n * Closes all of the currently-open dialogs.\n */\n closeAll(): void {\n this._closeDialogs(this.openDialogs);\n }\n\n /**\n * Finds an open dialog by its id.\n * @param id ID to use when looking up the dialog.\n */\n getDialogById(id: string): MatDialogRef<any> | undefined {\n return this.openDialogs.find(dialog => dialog.id === id);\n }\n\n ngOnDestroy() {\n // Only close the dialogs at this level on destroy\n // since the parent service may still be active.\n this._closeDialogs(this._openDialogsAtThisLevel);\n this._afterAllClosedAtThisLevel.complete();\n this._afterOpenedAtThisLevel.complete();\n }\n\n /**\n * Creates the overlay into which the dialog will be loaded.\n * @param config The dialog configuration.\n * @returns A promise resolving to the OverlayRef for the created overlay.\n */\n private _createOverlay(config: MatDialogConfig): OverlayRef {\n const overlayConfig = this._getOverlayConfig(config);\n return this._overlay.create(overlayConfig);\n }\n\n /**\n * Creates an overlay config from a dialog config.\n * @param dialogConfig The dialog configuration.\n * @returns The overlay configuration.\n */\n private _getOverlayConfig(dialogConfig: MatDialogConfig): OverlayConfig {\n const state = new OverlayConfig({\n positionStrategy: this._overlay.position().global(),\n scrollStrategy: dialogConfig.scrollStrategy || this._scrollStrategy(),\n panelClass: dialogConfig.panelClass,\n hasBackdrop: dialogConfig.hasBackdrop,\n direction: dialogConfig.direction,\n minWidth: dialogConfig.minWidth,\n minHeight: dialogConfig.minHeight,\n maxWidth: dialogConfig.maxWidth,\n maxHeight: dialogConfig.maxHeight,\n disposeOnNavigation: dialogConfig.closeOnNavigation\n });\n\n if (dialogConfig.backdropClass) {\n state.backdropClass = dialogConfig.backdropClass;\n }\n\n return state;\n }\n\n /**\n * Attaches an MatDialogContainer to a dialog's already-created overlay.\n * @param overlay Reference to the dialog's underlying overlay.\n * @param config The dialog configuration.\n * @returns A promise resolving to a ComponentRef for the attached container.\n */\n private _attachDialogContainer(overlay: OverlayRef, config: MatDialogConfig): MatDialogContainer {\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n const injector = new PortalInjector(userInjector || this._injector, new WeakMap([\n [MatDialogConfig, config]\n ]));\n const containerPortal =\n new ComponentPortal(MatDialogContainer, config.viewContainerRef, injector);\n const containerRef = overlay.attach<MatDialogContainer>(containerPortal);\n\n return containerRef.instance;\n }\n\n /**\n * Attaches the user-provided component to the already-created MatDialogContainer.\n * @param componentOrTemplateRef The type of component being loaded into the dialog,\n * or a TemplateRef to instantiate as the content.\n * @param dialogContainer Reference to the wrapping MatDialogContainer.\n * @param overlayRef Reference to the overlay in which the dialog resides.\n * @param config The dialog configuration.\n * @returns A promise resolving to the MatDialogRef that should be returned to the user.\n */\n private _attachDialogContent<T, R>(\n componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,\n dialogContainer: MatDialogContainer,\n overlayRef: OverlayRef,\n config: MatDialogConfig): MatDialogRef<T, R> {\n\n // Create a reference to the dialog we're creating in order to give the user a handle\n // to modify and close it.\n const dialogRef =\n new MatDialogRef<T, R>(overlayRef, dialogContainer, this._location, config.id);\n\n // When the dialog backdrop is clicked, we want to close it.\n if (config.hasBackdrop) {\n overlayRef.backdropClick().subscribe(() => {\n if (!dialogRef.disableClose) {\n dialogRef.close();\n }\n });\n }\n\n if (componentOrTemplateRef instanceof TemplateRef) {\n dialogContainer.attachTemplatePortal(\n new TemplatePortal<T>(componentOrTemplateRef, null!,\n <any>{ $implicit: config.data, dialogRef }));\n } else {\n const injector = this._createInjector<T>(config, dialogRef, dialogContainer);\n const contentRef = dialogContainer.attachComponentPortal<T>(\n new ComponentPortal(componentOrTemplateRef, undefined, injector));\n dialogRef.componentInstance = contentRef.instance;\n }\n\n dialogRef\n .updateSize(config.width, config.height)\n .updatePosition(config.position);\n\n return dialogRef;\n }\n\n /**\n * Creates a custom injector to be used inside the dialog. This allows a component loaded inside\n * of a dialog to close itself and, optionally, to return a value.\n * @param config Config object that is used to construct the dialog.\n * @param dialogRef Reference to the dialog.\n * @param container Dialog container element that wraps all of the contents.\n * @returns The custom injector that can be used inside the dialog.\n */\n private _createInjector<T>(\n config: MatDialogConfig,\n dialogRef: MatDialogRef<T>,\n dialogContainer: MatDialogContainer): PortalInjector {\n\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n\n // The MatDialogContainer is injected in the portal as the MatDialogContainer and the dialog's\n // content are created out of the same ViewContainerRef and as such, are siblings for injector\n // purposes. To allow the hierarchy that is expected, the MatDialogContainer is explicitly\n // added to the injection tokens.\n const injectionTokens = new WeakMap<any, any>([\n [MatDialogContainer, dialogContainer],\n [MAT_DIALOG_DATA, config.data],\n [MatDialogRef, dialogRef]\n ]);\n\n if (config.direction &&\n (!userInjector || !userInjector.get<Directionality | null>(Directionality, null))) {\n injectionTokens.set(Directionality, {\n value: config.direction,\n change: observableOf()\n });\n }\n\n return new PortalInjector(userInjector || this._injector, injectionTokens);\n }\n\n /**\n * Removes a dialog from the array of open dialogs.\n * @param dialogRef Dialog to be removed.\n */\n private _removeOpenDialog(dialogRef: MatDialogRef<any>) {\n const index = this.openDialogs.indexOf(dialogRef);\n\n if (index > -1) {\n this.openDialogs.splice(index, 1);\n\n // If all the dialogs were closed, remove/restore the `aria-hidden`\n // to a the siblings and emit to the `afterAllClosed` stream.\n if (!this.openDialogs.length) {\n this._ariaHiddenElements.forEach((previousValue, element) => {\n if (previousValue) {\n element.setAttribute('aria-hidden', previousValue);\n } else {\n element.removeAttribute('aria-hidden');\n }\n });\n\n this._ariaHiddenElements.clear();\n this._afterAllClosed.next();\n }\n }\n }\n\n /**\n * Hides all of the content that isn't an overlay from assistive technology.\n */\n private _hideNonDialogContentFromAssistiveTechnology() {\n const overlayContainer = this._overlayContainer.getContainerElement();\n\n // Ensure that the overlay container is attached to the DOM.\n if (overlayContainer.parentElement) {\n const siblings = overlayContainer.parentElement.children;\n\n for (let i = siblings.length - 1; i > -1; i--) {\n let sibling = siblings[i];\n\n if (sibling !== overlayContainer &&\n sibling.nodeName !== 'SCRIPT' &&\n sibling.nodeName !== 'STYLE' &&\n !sibling.hasAttribute('aria-live')) {\n\n this._ariaHiddenElements.set(sibling, sibling.getAttribute('aria-hidden'));\n sibling.setAttribute('aria-hidden', 'true');\n }\n }\n }\n }\n\n /** Closes all of the dialogs in an array. */\n private _closeDialogs(dialogs: MatDialogRef<any>[]) {\n let i = dialogs.length;\n\n while (i--) {\n // The `_openDialogs` property isn't updated after close until the rxjs subscription\n // runs on the next microtask, in addition to modifying the array as we're going\n // through it. We loop through all of them and call close without assuming that\n // they'll be removed from the list instantaneously.\n dialogs[i].close();\n }\n }\n\n}\n\n/**\n * Applies default options to the dialog config.\n * @param config Config to be modified.\n * @param defaultOptions Default options provided.\n * @returns The new configuration object.\n */\nfunction _applyConfigDefaults(\n config?: MatDialogConfig, defaultOptions?: MatDialogConfig): MatDialogConfig {\n return {...defaultOptions, ...config};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n Directive,\n Input,\n OnChanges,\n OnInit,\n Optional,\n SimpleChanges,\n ElementRef,\n} from '@angular/core';\nimport {MatDialog} from './dialog';\nimport {MatDialogRef} from './dialog-ref';\n\n/** Counter used to generate unique IDs for dialog elements. */\nlet dialogElementUid = 0;\n\n/**\n * Button that will close the current dialog.\n */\n@Directive({\n selector: `button[mat-dialog-close], button[matDialogClose]`,\n exportAs: 'matDialogClose',\n host: {\n '(click)': 'dialogRef.close(dialogResult)',\n '[attr.aria-label]': 'ariaLabel || null',\n 'type': 'button', // Prevents accidental form submits.\n }\n})\nexport class MatDialogClose implements OnInit, OnChanges {\n /** Screenreader label for the button. */\n @Input('aria-label') ariaLabel: string;\n\n /** Dialog close input. */\n @Input('mat-dialog-close') dialogResult: any;\n\n @Input('matDialogClose') _matDialogClose: any;\n\n constructor(\n @Optional() public dialogRef: MatDialogRef<any>,\n private _elementRef: ElementRef<HTMLElement>,\n private _dialog: MatDialog) {}\n\n ngOnInit() {\n if (!this.dialogRef) {\n // When this directive is included in a dialog via TemplateRef (rather than being\n // in a Component), the DialogRef isn't available via injection because embedded\n // views cannot be given a custom injector. Instead, we look up the DialogRef by\n // ID. This must occur in `onInit`, as the ID binding for the dialog container won't\n // be resolved at constructor time.\n this.dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs)!;\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const proxiedChange = changes['_matDialogClose'] || changes['_matDialogCloseResult'];\n\n if (proxiedChange) {\n this.dialogResult = proxiedChange.currentValue;\n }\n }\n}\n\n/**\n * Title of a dialog element. Stays fixed to the top of the dialog when scrolling.\n */\n@Directive({\n selector: '[mat-dialog-title], [matDialogTitle]',\n exportAs: 'matDialogTitle',\n host: {\n 'class': 'mat-dialog-title',\n '[id]': 'id',\n },\n})\nexport class MatDialogTitle implements OnInit {\n @Input() id = `mat-dialog-title-${dialogElementUid++}`;\n\n constructor(\n @Optional() private _dialogRef: MatDialogRef<any>,\n private _elementRef: ElementRef<HTMLElement>,\n private _dialog: MatDialog) {}\n\n ngOnInit() {\n if (!this._dialogRef) {\n this._dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs)!;\n }\n\n if (this._dialogRef) {\n Promise.resolve().then(() => {\n const container = this._dialogRef._containerInstance;\n\n if (container && !container._ariaLabelledBy) {\n container._ariaLabelledBy = this.id;\n }\n });\n }\n }\n}\n\n\n/**\n * Scrollable content container of a dialog.\n */\n@Directive({\n selector: `[mat-dialog-content], mat-dialog-content, [matDialogContent]`,\n host: {'class': 'mat-dialog-content'}\n})\nexport class MatDialogContent {}\n\n\n/**\n * Container for the bottom action buttons in a dialog.\n * Stays fixed to the bottom when scrolling.\n */\n@Directive({\n selector: `[mat-dialog-actions], mat-dialog-actions, [matDialogActions]`,\n host: {'class': 'mat-dialog-actions'}\n})\nexport class MatDialogActions {}\n\n\n/**\n * Finds the closest MatDialogRef to an element by looking at the DOM.\n * @param element Element relative to which to look for a dialog.\n * @param openDialogs References to the currently-open dialogs.\n */\nfunction getClosestDialog(element: ElementRef<HTMLElement>, openDialogs: MatDialogRef<any>[]) {\n let parent: HTMLElement | null = element.nativeElement.parentElement;\n\n while (parent && !parent.classList.contains('mat-dialog-container')) {\n parent = parent.parentElement;\n }\n\n return parent ? openDialogs.find(dialog => dialog.id === parent!.id) : null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ViewContainerRef} from '@angular/core';\nimport {Direction} from '@angular/cdk/bidi';\nimport {ScrollStrategy} from '@angular/cdk/overlay';\n\n/** Valid ARIA roles for a dialog element. */\nexport type DialogRole = 'dialog' | 'alertdialog';\n\n/** Possible overrides for a dialog's position. */\nexport interface DialogPosition {\n /** Override for the dialog's top position. */\n top?: string;\n\n /** Override for the dialog's bottom position. */\n bottom?: string;\n\n /** Override for the dialog's left position. */\n left?: string;\n\n /** Override for the dialog's right position. */\n right?: string;\n}\n\n/**\n * Configuration for opening a modal dialog with the MatDialog service.\n */\nexport class MatDialogConfig<D = any> {\n\n /**\n * Where the attached component should live in Angular's *logical* component tree.\n * This affects what is available for injection and the change detection order for the\n * component instantiated inside of the dialog. This does not affect where the dialog\n * content will be rendered.\n */\n viewContainerRef?: ViewContainerRef;\n\n /** ID for the dialog. If omitted, a unique one will be generated. */\n id?: string;\n\n /** The ARIA role of the dialog element. */\n role?: DialogRole = 'dialog';\n\n /** Custom class for the overlay pane. */\n panelClass?: string | string[] = '';\n\n /** Whether the dialog has a backdrop. */\n hasBackdrop?: boolean = true;\n\n /** Custom class for the backdrop, */\n backdropClass?: string = '';\n\n /** Whether the user can use escape or clicking on the backdrop to close the modal. */\n disableClose?: boolean = false;\n\n /** Width of the dialog. */\n width?: string = '';\n\n /** Height of the dialog. */\n height?: string = '';\n\n /** Min-width of the dialog. If a number is provided, pixel units are assumed. */\n minWidth?: number | string;\n\n /** Min-height of the dialog. If a number is provided, pixel units are assumed. */\n minHeight?: number | string;\n\n /** Max-width of the dialog. If a number is provided, pixel units are assumed. Defaults to 80vw */\n maxWidth?: number | string = '80vw';\n\n /** Max-height of the dialog. If a number is provided, pixel units are assumed. */\n maxHeight?: number | string;\n\n /** Position overrides. */\n position?: DialogPosition;\n\n /** Data being injected into the child component. */\n data?: D | null = null;\n\n /** Layout direction for the dialog's content. */\n direction?: Direction;\n\n /** ID of the element that describes the dialog. */\n ariaDescribedBy?: string | null = null;\n\n /** ID of the element that labels the dialog. */\n ariaLabelledBy?: string | null = null;\n\n /** Aria label to assign to the dialog element */\n ariaLabel?: string | null = null;\n\n /** Whether the dialog should focus the first focusable element on open. */\n autoFocus?: boolean = true;\n\n /**\n * Whether the dialog should restore focus to the\n * previously-focused element, after it's closed.\n */\n restoreFocus?: boolean = true;\n\n /** Scroll strategy to be used for the dialog. */\n scrollStrategy?: ScrollStrategy;\n\n /**\n * Whether the dialog should close 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 closeOnNavigation?: boolean = true;\n\n // TODO(jelbourn): add configuration for lifecycle hooks, ARIA labelling.\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 {\n animate,\n state,\n style,\n transition,\n trigger,\n AnimationTriggerMetadata,\n} from '@angular/animations';\n\nconst animationBody = [\n // Note: The `enter` animation transitions to `transform: none`, because for some reason\n // specifying the transform explicitly, causes IE both to blur the dialog content and\n // decimate the animation performance. Leaving it as `none` solves both issues.\n state('void, exit', style({opacity: 0, transform: 'scale(0.7)'})),\n state('enter', style({transform: 'none'})),\n transition('* => enter', animate('150ms cubic-bezier(0, 0, 0.2, 1)',\n style({transform: 'none', opacity: 1}))),\n transition('* => void, * => exit',\n animate('75ms cubic-bezier(0.4, 0.0, 0.2, 1)', style({opacity: 0}))),\n];\n\n/**\n * Animations used by MatDialog.\n * @docs-private\n */\nexport const matDialogAnimations: {\n readonly dialogContainer: AnimationTriggerMetadata;\n readonly slideDialog: AnimationTriggerMetadata;\n} = {\n /** Animation that is applied on the dialog container by defalt. */\n dialogContainer: trigger('dialogContainer', animationBody),\n\n /** @deprecated @breaking-change 8.0.0 Use `matDialogAnimations.dialogContainer` instead. */\n slideDialog: trigger('slideDialog', animationBody)\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ESCAPE, hasModifierKey} from '@angular/cdk/keycodes';\nimport {GlobalPositionStrategy, OverlayRef} from '@angular/cdk/overlay';\nimport {Location} from '@angular/common';\nimport {Observable, Subject} from 'rxjs';\nimport {filter, take} from 'rxjs/operators';\nimport {DialogPosition} from './dialog-config';\nimport {MatDialogContainer} from './dialog-container';\n\n\n// TODO(jelbourn): resizing\n\n// Counter for unique dialog ids.\nlet uniqueId = 0;\n\n/**\n * Reference to a dialog opened via the MatDialog service.\n */\nexport class MatDialogRef<T, R = any> {\n /** The instance of component opened into the dialog. */\n componentInstance: T;\n\n /** Whether the user is allowed to close the dialog. */\n disableClose: boolean | undefined = this._containerInstance._config.disableClose;\n\n /** Subject for notifying the user that the dialog has finished opening. */\n private readonly _afterOpened = new Subject<void>();\n\n /** Subject for notifying the user that the dialog has finished closing. */\n private readonly _afterClosed = new Subject<R | undefined>();\n\n /** Subject for notifying the user that the dialog has started closing. */\n private readonly _beforeClosed = new Subject<R | undefined>();\n\n /** Result to be passed to afterClosed. */\n private _result: R | undefined;\n\n /** Handle to the timeout that's running as a fallback in case the exit animation doesn't fire. */\n private _closeFallbackTimeout: number;\n\n constructor(\n private _overlayRef: OverlayRef,\n public _containerInstance: MatDialogContainer,\n // @breaking-change 8.0.0 `_location` parameter to be removed.\n _location?: Location,\n readonly id: string = `mat-dialog-${uniqueId++}`) {\n\n // Pass the id along to the container.\n _containerInstance._id = id;\n\n // Emit when opening animation completes\n _containerInstance._animationStateChanged.pipe(\n filter(event => event.phaseName === 'done' && event.toState === 'enter'),\n take(1)\n )\n .subscribe(() => {\n this._afterOpened.next();\n this._afterOpened.complete();\n });\n\n // Dispose overlay when closing animation is complete\n _containerInstance._animationStateChanged.pipe(\n filter(event => event.phaseName === 'done' && event.toState === 'exit'),\n take(1)\n ).subscribe(() => {\n clearTimeout(this._closeFallbackTimeout);\n this._overlayRef.dispose();\n });\n\n _overlayRef.detachments().subscribe(() => {\n this._beforeClosed.next(this._result);\n this._beforeClosed.complete();\n this._afterClosed.next(this._result);\n this._afterClosed.complete();\n this.componentInstance = null!;\n this._overlayRef.dispose();\n });\n\n _overlayRef.keydownEvents()\n .pipe(filter(event => {\n return event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event);\n }))\n .subscribe(event => {\n event.preventDefault();\n this.close();\n });\n }\n\n /**\n * Close the dialog.\n * @param dialogResult Optional result to return to the dialog opener.\n */\n close(dialogResult?: R): void {\n this._result = dialogResult;\n\n // Transition the backdrop in parallel to the dialog.\n this._containerInstance._animationStateChanged.pipe(\n filter(event => event.phaseName === 'start'),\n take(1)\n )\n .subscribe(event => {\n this._beforeClosed.next(dialogResult);\n this._beforeClosed.complete();\n this._overlayRef.detachBackdrop();\n\n // The logic that disposes of the overlay depends on the exit animation completing, however\n // it isn't guaranteed if the parent view is destroyed while it's running. Add a fallback\n // timeout which will clean everything up if the animation hasn't fired within the specified\n // amount of time plus 100ms. We don't need to run this outside the NgZone, because for the\n // vast majority of cases the timeout will have been cleared before it has the chance to fire.\n this._closeFallbackTimeout = setTimeout(() => {\n this._overlayRef.dispose();\n }, event.totalTime + 100);\n });\n\n this._containerInstance._startExitAnimation();\n }\n\n /**\n * Gets an observable that is notified when the dialog is finished opening.\n */\n afterOpened(): Observable<void> {\n return this._afterOpened.asObservable();\n }\n\n /**\n * Gets an observable that is notified when the dialog is finished closing.\n */\n afterClosed(): Observable<R | undefined> {\n return this._afterClosed.asObservable();\n }\n\n /**\n * Gets an observable that is notified when the dialog has started closing.\n */\n beforeClosed(): Observable<R | undefined> {\n return this._beforeClosed.asObservable();\n }\n\n /**\n * Gets an observable that emits when the overlay's backdrop has been clicked.\n */\n backdropClick(): Observable<MouseEvent> {\n return this._overlayRef.backdropClick();\n }\n\n /**\n * Gets an observable that emits when keydown events are targeted on the overlay.\n */\n keydownEvents(): Observable<KeyboardEvent> {\n return this._overlayRef.keydownEvents();\n }\n\n /**\n * Updates the dialog's position.\n * @param position New dialog position.\n */\n updatePosition(position?: DialogPosition): this {\n let strategy = this._getPositionStrategy();\n\n if (position && (position.left || position.right)) {\n position.left ? strategy.left(position.left) : strategy.right(position.right);\n } else {\n strategy.centerHorizontally();\n }\n\n if (position && (position.top || position.bottom)) {\n position.top ? strategy.top(position.top) : strategy.bottom(position.bottom);\n } else {\n strategy.centerVertically();\n }\n\n this._overlayRef.updatePosition();\n\n return this;\n }\n\n /**\n * Updates the dialog's width and height.\n * @param width New width of the dialog.\n * @param height New height of the dialog.\n */\n updateSize(width: string = '', height: string = ''): this {\n this._getPositionStrategy().width(width).height(height);\n this._overlayRef.updatePosition();\n return this;\n }\n\n /** Add a CSS class or an array of classes to the overlay pane. */\n addPanelClass(classes: string | string[]): this {\n this._overlayRef.addPanelClass(classes);\n return this;\n }\n\n /** Remove a CSS class or an array of classes from the overlay pane. */\n removePanelClass(classes: string | string[]): this {\n this._overlayRef.removePanelClass(classes);\n return this;\n }\n\n /**\n * Gets an observable that is notified when the dialog is finished opening.\n * @deprecated Use `afterOpened` instead.\n * @breaking-change 8.0.0\n */\n afterOpen(): Observable<void> {\n return this.afterOpened();\n }\n\n /**\n * Gets an observable that is notified when the dialog has started closing.\n * @deprecated Use `beforeClosed` instead.\n * @breaking-change 8.0.0\n */\n beforeClose(): Observable<R | undefined> {\n return this.beforeClosed();\n }\n\n /** Fetches the position strategy object from the overlay ref. */\n private _getPositionStrategy(): GlobalPositionStrategy {\n return this._overlayRef.getConfig().positionStrategy as GlobalPositionStrategy;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {PortalModule} from '@angular/cdk/portal';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MAT_DIALOG_SCROLL_STRATEGY_PROVIDER, MatDialog} from './dialog';\nimport {MatDialogContainer} from './dialog-container';\nimport {\n MatDialogActions,\n MatDialogClose,\n MatDialogContent,\n MatDialogTitle,\n} from './dialog-content-directives';\n\n\n@NgModule({\n imports: [\n CommonModule,\n OverlayModule,\n PortalModule,\n MatCommonModule,\n ],\n exports: [\n MatDialogContainer,\n MatDialogClose,\n MatDialogTitle,\n MatDialogContent,\n MatDialogActions,\n MatCommonModule,\n ],\n declarations: [\n MatDialogContainer,\n MatDialogClose,\n MatDialogTitle,\n MatDialogActions,\n MatDialogContent,\n ],\n providers: [\n MatDialog,\n MAT_DIALOG_SCROLL_STRATEGY_PROVIDER,\n ],\n entryComponents: [MatDialogContainer],\n})\nexport class MatDialogModule {}\n"],"names":["__extends","d","b","__","this","constructor","extendStatics","prototype","Object","create","throwMatDialogContentAlreadyAttachedError","Error","MAT_DIALOG_SCROLL_STRATEGY_FACTORY","overlay","scrollStrategies","block","MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY","_applyConfigDefaults","config","defaultOptions","tslib_1.__assign","getClosestDialog","element","openDialogs","parent","nativeElement","parentElement","classList","contains","find","dialog","id","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__assign","assign","t","s","i","n","arguments","length","call","apply","MatDialogConfig","role","panelClass","hasBackdrop","backdropClass","disableClose","width","height","maxWidth","data","ariaDescribedBy","ariaLabelledBy","ariaLabel","autoFocus","restoreFocus","closeOnNavigation","animationBody","state","style","opacity","transform","transition","animate","matDialogAnimations","dialogContainer","trigger","slideDialog","MatDialogContainer","_super","_elementRef","_focusTrapFactory","_changeDetectorRef","_document","_config","_this","_elementFocusedBeforeDialogWasOpened","_state","_animationStateChanged","EventEmitter","_ariaLabelledBy","tslib_1.__extends","attachComponentPortal","portal","_portalOutlet","hasAttached","_savePreviouslyFocusedElement","attachTemplatePortal","_trapFocus","_focusTrap","focusInitialElementWhenReady","activeElement","focus","_restoreFocus","toFocus","destroy","Promise","resolve","then","_onAnimationDone","event","toState","emit","_onAnimationStart","_startExitAnimation","markForCheck","type","Component","args","selector","template","styles","encapsulation","ViewEncapsulation","None","host","class","tabindex","aria-modal","[attr.id]","[attr.role]","[attr.aria-labelledby]","[attr.aria-label]","[attr.aria-describedby]","[@dialogContainer]","(@dialogContainer.start)","(@dialogContainer.done)","ChangeDetectorRef","undefined","decorators","Optional","Inject","DOCUMENT","propDecorators","uniqueId","MatDialogRef","_overlayRef","_containerInstance","_location","_afterOpened","Subject","_afterClosed","_beforeClosed","_id","pipe","filter","phaseName","take","subscribe","next","complete","clearTimeout","_closeFallbackTimeout","dispose","detachments","_result","componentInstance","keydownEvents","keyCode","ESCAPE","hasModifierKey","preventDefault","close","dialogResult","detachBackdrop","setTimeout","totalTime","afterOpened","asObservable","afterClosed","beforeClosed","backdropClick","updatePosition","position","strategy","_getPositionStrategy","left","right","centerHorizontally","top","bottom","centerVertically","updateSize","addPanelClass","classes","removePanelClass","afterOpen","beforeClose","getConfig","MAT_DIALOG_DATA","InjectionToken","MAT_DIALOG_DEFAULT_OPTIONS","MAT_DIALOG_SCROLL_STRATEGY","MAT_DIALOG_SCROLL_STRATEGY_PROVIDER","provide","deps","Overlay","useFactory","MatDialog","_overlay","_injector","_defaultOptions","scrollStrategy","_parentDialog","_overlayContainer","_openDialogsAtThisLevel","_afterAllClosedAtThisLevel","_afterOpenedAtThisLevel","_ariaHiddenElements","Map","afterAllClosed","defer","_afterAllClosed","startWith","_scrollStrategy","defineProperty","open","componentOrTemplateRef","getDialogById","overlayRef","_createOverlay","_attachDialogContainer","dialogRef","_attachDialogContent","_hideNonDialogContentFromAssistiveTechnology","push","_removeOpenDialog","closeAll","_closeDialogs","ngOnDestroy","overlayConfig","_getOverlayConfig","dialogConfig","OverlayConfig","positionStrategy","global","direction","minWidth","minHeight","maxHeight","disposeOnNavigation","userInjector","viewContainerRef","injector","PortalInjector","WeakMap","containerPortal","ComponentPortal","attach","instance","TemplateRef","TemplatePortal","$implicit","_createInjector","contentRef","injectionTokens","get","Directionality","set","value","change","observableOf","index","indexOf","splice","forEach","previousValue","setAttribute","removeAttribute","clear","overlayContainer","getContainerElement","siblings","children","sibling","nodeName","hasAttribute","getAttribute","dialogs","Injectable","Injector","Location","SkipSelf","OverlayContainer","dialogElementUid","MatDialogClose","_dialog","ngOnInit","ngOnChanges","changes","proxiedChange","currentValue","Directive","exportAs","(click)","ElementRef","Input","_matDialogClose","MatDialogTitle","_dialogRef","container","[id]","MatDialogContent","MatDialogActions","MatDialogModule","NgModule","imports","CommonModule","OverlayModule","PortalModule","MatCommonModule","exports","declarations","providers","entryComponents"],"mappings":";;;;;;;o9BAuBA,SAAgBA,GAAUC,EAAGC,GAEzB,QAASC,KAAOC,KAAKC,YAAcJ,EADnCK,EAAcL,EAAGC,GAEjBD,EAAEM,UAAkB,OAANL,EAAaM,OAAOC,OAAOP,IAAMC,EAAGI,UAAYL,EAAEK,UAAW,GAAIJ,ICanF,QAAgBO,KACd,KAAMC,OAAM,yECOd,QAAgBC,GAAmCC,GACjD,MAAA,YAAa,MAAAA,GAAQC,iBAAiBC,SAIxC,QAAgBC,GAA4CH,GAE1D,MAAA,YAAa,MAAAA,GAAQC,iBAAiBC,SA8UxC,QAASE,GACLC,EAA0BC,GAC5B,MAAFC,MAAaD,EAAmBD,GClQhC,QAASG,GAAiBC,EAAkCC,GAG1D,IAFF,GAAMC,GAA6BF,EAAQG,cAAcC,cAEhDF,IAAWA,EAAOG,UAAUC,SAAS,yBAC1CJ,EAASA,EAAOE,aAGlB,OAAOF,GAASD,EAAYM,KAAI,SAACC,GAAU,MAAAA,GAAOC,KAAO,EAAQA,KAAM,KH3HzE,GAAIzB,GAAgB,SAASL,EAAGC,GAI5B,OAHAI,EAAgBE,OAAOwB,iBAChBC,uBAA2BC,QAAS,SAAUjC,EAAGC,GAAKD,EAAEgC,UAAY/B,IACvE,SAAUD,EAAGC,GAAK,IAAK,GAAI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