UNPKG

@angular/material

Version:
9 lines 368 kB
/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/platform-browser"),require("rxjs/Subject"),require("rxjs/add/operator/debounceTime"),require("@angular/common"),require("rxjs/Observable"),require("rxjs/Subscription"),require("rxjs/add/observable/fromEvent"),require("rxjs/add/observable/merge"),require("rxjs/add/operator/auditTime"),require("rxjs/add/operator/first"),require("rxjs/add/observable/of"),require("@angular/forms"),require("@angular/animations"),require("rxjs/add/operator/startWith"),require("rxjs/add/operator/filter"),require("@angular/http"),require("rxjs/add/observable/forkJoin"),require("rxjs/add/operator/map"),require("rxjs/add/operator/do"),require("rxjs/add/operator/share"),require("rxjs/add/operator/finally"),require("rxjs/add/operator/catch"),require("rxjs/add/observable/throw"),require("rxjs/add/operator/takeUntil"),require("rxjs/add/operator/switchMap")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/platform-browser","rxjs/Subject","rxjs/add/operator/debounceTime","@angular/common","rxjs/Observable","rxjs/Subscription","rxjs/add/observable/fromEvent","rxjs/add/observable/merge","rxjs/add/operator/auditTime","rxjs/add/operator/first","rxjs/add/observable/of","@angular/forms","@angular/animations","rxjs/add/operator/startWith","rxjs/add/operator/filter","@angular/http","rxjs/add/observable/forkJoin","rxjs/add/operator/map","rxjs/add/operator/do","rxjs/add/operator/share","rxjs/add/operator/finally","rxjs/add/operator/catch","rxjs/add/observable/throw","rxjs/add/operator/takeUntil","rxjs/add/operator/switchMap"],e):e((t.ng=t.ng||{},t.ng.material=t.ng.material||{}),t.ng.core,t.ng.platformBrowser,t.Rx,t.Rx.Observable.prototype,t.ng.common,t.Rx,t.Rx,t.Rx.Observable,t.Rx.Observable,t.Rx.Observable.prototype,t.Rx.Observable.prototype,t.Rx.Observable,t.ng.forms,t.ng.animations,t.Rx.Observable.prototype,t.Rx.Observable.prototype,t.ng.http)}(this,function(t,e,i,n,r,o,a,s,l,c,p,d,u,h,m,f,g,b){"use strict";function _(t,e){function i(){this.constructor=t}Tt(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}function y(t,e){return Error('The "'+t+'-" prefix cannot be used in ng-material v1 compatibility mode. It was used on an "'+e.toLowerCase()+'" element.')}function v(t){window.getComputedStyle(t).getPropertyValue("opacity")}function x(t,e,i){var n=Math.max(Math.abs(t-i.left),Math.abs(t-i.right)),r=Math.max(Math.abs(e-i.top),Math.abs(e-i.bottom));return Math.sqrt(n*n+r*r)}function k(){if(ne)return ne;if("object"!=typeof document||!document)return ne=new Set(re);var t=document.createElement("input");return ne=new Set(re.filter(function(e){return t.setAttribute("type",e),t.type===e}))}function w(t,e,i){return t||new ae(e,i)}function C(t,e){return t||new le(e)}function I(){return Error("Scroll strategy has already been attached.")}function E(t,e){return function(t){function i(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var r=t.apply(this,i)||this;return r._color=null,r.color=e,r}return _(i,t),Object.defineProperty(i.prototype,"color",{get:function(){return this._color},set:function(t){var i=t||e;i!==this._color&&(this._color&&this._renderer.removeClass(this._elementRef.nativeElement,"mat-"+this._color),i&&this._renderer.addClass(this._elementRef.nativeElement,"mat-"+i),this._color=i)},enumerable:!0,configurable:!0}),i}(t)}function O(t){return null!=t&&""+t!="false"}function P(t){return function(t){function e(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var n=t.apply(this,e)||this;return n._disabled=!1,n}return _(e,t),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=O(t)},enumerable:!0,configurable:!0}),e}(t)}function D(){throw Error("Must provide a portal to attach")}function S(){throw Error("Host already has a portal attached")}function M(){throw Error("This PortalHost has already been disposed")}function R(){throw Error("Attempting to attach an unknown Portal type. BasePortalHost accepts eithera ComponentPortal or a TemplatePortal.")}function A(){throw Error("Attempting to attach a portal to a null PortalHost")}function T(){throw Error("Attempting to detach a portal that is not attached to a host")}function F(t){return"string"==typeof t?t:t+"px"}function L(t){return t||new qe}function j(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)}function N(t){var e=t.nodeName.toLowerCase();return"input"===e||"select"===e||"button"===e||"textarea"===e}function B(t){return z(t)&&"hidden"==t.type}function V(t){return H(t)&&t.hasAttribute("href")}function z(t){return"input"==t.nodeName.toLowerCase()}function H(t){return"a"==t.nodeName.toLowerCase()}function W(t){if(!t.hasAttribute("tabindex")||void 0===t.tabIndex)return!1;var e=t.getAttribute("tabindex");return"-32768"!=e&&!(!e||isNaN(parseInt(e,10)))}function Y(t){if(!W(t))return null;var e=parseInt(t.getAttribute("tabindex"),10);return isNaN(e)?-1:e}function G(t){var e=t.nodeName.toLowerCase(),i="input"===e&&t.type;return"text"===i||"password"===i||"select"===e||"textarea"===e}function X(t){return!B(t)&&(N(t)||V(t)||t.hasAttribute("contenteditable")||W(t))}function U(t){return t.ownerDocument.defaultView||window}function q(t,e,i){return t||new pi(e,i)}function Z(t){return 0===t.buttons}function K(t){return t||new bi}function $(t,e,i){return t||new yi(e,i)}function J(t,e){var i=e.trim();t.style.transform=i,t.style.webkitTransform=i}function Q(t,e){return void 0===e&&(e=0),isNaN(parseFloat(t))||isNaN(Number(t))?e:Number(t)}function tt(t,e){for(var i=Array(t),n=0;n<t;n++)i[n]=e(n);return i}function et(){return Error("Cannot change `multiple` mode of select after initialization.")}function it(){return Error("Cannot assign truthy non-array value to select in `multiple` mode.")}function nt(t,e,i){return Math.min(Math.max(t,e),i)}function rt(t){throw Error("A sidenav was already declared for 'align=\""+t+"\"'")}function ot(t){return""+(t||"")}function at(t){return"string"==typeof t?parseInt(t,10):t}function st(t){return"calc("+t+")"}function lt(t){return t.match(/px|em|rem/)?t:t+"px"}function ct(t){return Error('Unable to find icon with the name "'+t+'"')}function pt(){return Error("Could not find Http provider for use with Angular Material icons. Please include the HttpModule from @angular/http in your app imports.")}function dt(t,e,i){return t||new Wr(e,i)}function ut(t){return t.cloneNode(!0)}function ht(t,e){return t+":"+e}function mt(t){return Math.max(0,Math.min(100,t))}function ft(t,e,i){var n=(i-90)*Zr;return t+e*Math.cos(n)+","+(t+e*Math.sin(n))}function gt(t,e,i,n){return i*t/n+e}function bt(t,e,i,n){var r=t/n,o=Math.pow(r,3),a=Math.pow(r,4);return e+i*(6*Math.pow(r,5)+-15*a+10*o)}function _t(t,e,i){var n,r=e||0,o=50-i,a=r*Kr,s=t*Kr,l=ft(50,o,a),c=ft(50,o,s+a),p=s<0?0:1;return n=s<0?s>=-180?0:1:s<=180?0:1,"M"+l+"A"+o+","+o+" 0 "+n+","+p+" "+c}function yt(t,e,i){return void 0===e&&(e=0),void 0===i&&(i=100),Math.max(e,Math.min(i,t))}function vt(){return Error("Placeholder attribute and child element were both specified.")}function xt(t){return Error('Input type "'+t+"\" isn't supported by md-input-container.")}function kt(t){return Error("A hint was already declared for 'align=\""+t+"\"'.")}function wt(){return Error("md-input-container must contain an mdInput directive. Did you forget to add mdInput to the native input or textarea element?")}function Ct(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(null==t)throw TypeError("Cannot convert undefined or null to object");for(var n=0,r=e;n<r.length;n++){var o=r[n];if(null!=o)for(var a in o)o.hasOwnProperty(a)&&(t[a]=o[a])}return t}function It(t){return Ct(new yo,t)}function Et(t){throw Error('Tooltip position "'+t+'" is invalid.')}function Ot(){throw Error('md-menu-trigger: must pass in an md-menu instance.\n\n Example:\n <md-menu #menu="mdMenu"></md-menu>\n <button [mdMenuTriggerFor]="menu"></button>')}function Pt(){throw Error('x-position value must be either \'before\' or after\'.\n Example: <md-menu x-position="before" #menu="mdMenu"></md-menu>')}function Dt(){throw Error('y-position value must be either \'above\' or below\'.\n Example: <md-menu y-position="above" #menu="mdMenu"></md-menu>')}function St(){throw Error("Attempting to attach dialog content after content is already attached")}function Mt(t){return Ct(new sa,t)}function Rt(){return Error("Attempting to open an undefined instance of `md-autocomplete`. Make sure that the id passed to the `mdAutocomplete` is correct and that you're attempting to open it after the ngAfterContentInit hook.")}function At(t){return Error("MdDatepicker: No provider found for "+t+". You must import one of the followingmodules at your application root: MdNativeDateModule, or provide a custom implementation.")}var Tt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},Ft=new e.InjectionToken("md-compatibility-mode"),Lt="\n [mat-button],\n [mat-fab],\n [mat-icon-button],\n [mat-mini-fab],\n [mat-raised-button],\n [matCardSubtitle],\n [matCardTitle],\n [matDialogActions],\n [matDialogClose],\n [matDialogContent],\n [matDialogTitle],\n [matLine],\n [matTabLabel],\n [matTabLink],\n [matTabNav],\n [matTooltip],\n mat-autocomplete,\n mat-button-toggle,\n mat-button-toggle,\n mat-button-toggle-group,\n mat-card,\n mat-card-actions,\n mat-card-content,\n mat-card-footer,\n mat-card-header,\n mat-card-subtitle,\n mat-card-title,\n mat-card-title-group,\n mat-checkbox,\n mat-chip,\n mat-dialog-actions,\n mat-dialog-container,\n mat-dialog-content,\n mat-divider,\n mat-error,\n mat-grid-list,\n mat-grid-tile,\n mat-grid-tile-footer,\n mat-grid-tile-header,\n mat-hint,\n mat-icon,\n mat-list,\n mat-list-item,\n mat-menu,\n mat-nav-list,\n mat-option,\n mat-placeholder,\n mat-progress-bar,\n mat-pseudo-checkbox,\n mat-radio-button,\n mat-radio-group,\n mat-select,\n mat-sidenav,\n mat-sidenav-container,\n mat-slider,\n mat-spinner,\n mat-tab,\n mat-tab-group,\n mat-toolbar",jt="\n [md-button],\n [md-fab],\n [md-icon-button],\n [md-mini-fab],\n [md-raised-button],\n [mdCardSubtitle],\n [mdCardTitle],\n [mdDialogActions],\n [mdDialogClose],\n [mdDialogContent],\n [mdDialogTitle],\n [mdLine],\n [mdTabLabel],\n [mdTabLink],\n [mdTabNav],\n [mdTooltip],\n md-autocomplete,\n md-button-toggle,\n md-button-toggle,\n md-button-toggle-group,\n md-card,\n md-card-actions,\n md-card-content,\n md-card-footer,\n md-card-header,\n md-card-subtitle,\n md-card-title,\n md-card-title-group,\n md-checkbox,\n md-chip,\n md-dialog-actions,\n md-dialog-container,\n md-dialog-content,\n md-divider,\n md-error,\n md-grid-list,\n md-grid-tile,\n md-grid-tile-footer,\n md-grid-tile-header,\n md-hint,\n md-icon,\n md-list,\n md-list-item,\n md-menu,\n md-nav-list,\n md-option,\n md-placeholder,\n md-progress-bar,\n md-pseudo-checkbox,\n md-radio-button,\n md-radio-group,\n md-select,\n md-sidenav,\n md-sidenav-container,\n md-slider,\n md-spinner,\n md-tab,\n md-tab-group,\n md-toolbar",Nt=function(){function t(t,e){if(!t)throw y("mat",e.nativeElement.nodeName)}return t}();Nt.decorators=[{type:e.Directive,args:[{selector:Lt}]}],Nt.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[Ft]}]},{type:e.ElementRef}]};var Bt=function(){function t(t,e){if(t)throw y("md",e.nativeElement.nodeName)}return t}();Bt.decorators=[{type:e.Directive,args:[{selector:jt}]}],Bt.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[Ft]}]},{type:e.ElementRef}]};var Vt=function(){function t(){}return t}();Vt.decorators=[{type:e.NgModule,args:[{declarations:[Nt,Bt],exports:[Nt,Bt]}]}],Vt.ctorParameters=function(){return[]};var zt=function(){function t(){}return t}();zt.decorators=[{type:e.NgModule,args:[{providers:[{provide:Ft,useValue:!0}]}]}],zt.ctorParameters=function(){return[]};var Ht=new e.InjectionToken("md-sanity-checks"),Wt=function(){function t(t,i){this._document=t,this._hasDoneGlobalChecks=!1,i&&!this._hasDoneGlobalChecks&&t&&e.isDevMode()&&(this._checkDoctype(),this._checkTheme(),this._hasDoneGlobalChecks=!0)}return t.prototype._checkDoctype=function(){this._document.doctype||console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")},t.prototype._checkTheme=function(){if("function"==typeof getComputedStyle){var t=this._document.createElement("div");t.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(t),"none"!==getComputedStyle(t).display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),this._document.body.removeChild(t)}},t}();Wt.decorators=[{type:e.NgModule,args:[{imports:[Vt],exports:[Vt],providers:[{provide:Ht,useValue:!0}]}]}],Wt.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[i.DOCUMENT]}]},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[Ht]}]}]};var Yt=function(){function t(){}return t}();Yt.decorators=[{type:e.Directive,args:[{selector:"[md-line], [mat-line], [mdLine], [matLine]",host:{class:"mat-line"}}]}],Yt.ctorParameters=function(){return[]};var Gt=function(){function t(t,e,i){var n=this;this._lines=t,this._renderer=e,this._element=i,this._setLineClass(this._lines.length),this._lines.changes.subscribe(function(){n._setLineClass(n._lines.length)})}return t.prototype._setLineClass=function(t){this._resetClasses(),2===t||3===t?this._setClass("mat-"+t+"-line",!0):t>3&&this._setClass("mat-multi-line",!0)},t.prototype._resetClasses=function(){this._setClass("mat-2-line",!1),this._setClass("mat-3-line",!1),this._setClass("mat-multi-line",!1)},t.prototype._setClass=function(t,e){e?this._renderer.addClass(this._element.nativeElement,t):this._renderer.removeClass(this._element.nativeElement,t)},t}(),Xt=function(){function t(){}return t}();Xt.decorators=[{type:e.NgModule,args:[{imports:[Wt],exports:[Yt,Wt],declarations:[Yt]}]}],Xt.ctorParameters=function(){return[]};var Ut=function(){function t(){this._dir="ltr",this.dirChange=new e.EventEmitter}return Object.defineProperty(t.prototype,"dir",{get:function(){return this._dir},set:function(t){var e=this._dir;this._dir=t,e!=this._dir&&this.dirChange.emit()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.dir},set:function(t){this.dir=t},enumerable:!0,configurable:!0}),t}();Ut.decorators=[{type:e.Directive,args:[{selector:"[dir]",exportAs:"$implicit"}]}],Ut.ctorParameters=function(){return[]},Ut.propDecorators={_dir:[{type:e.Input,args:["dir"]}],dirChange:[{type:e.Output}],dir:[{type:e.HostBinding,args:["attr.dir"]}]};var qt=function(){function t(){}return t}();qt.decorators=[{type:e.NgModule,args:[{exports:[Ut],declarations:[Ut]}]}],qt.ctorParameters=function(){return[]};var Zt=function(){function t(){}return t.prototype.create=function(t){return"undefined"==typeof MutationObserver?null:new MutationObserver(t)},t}();Zt.decorators=[{type:e.Injectable}],Zt.ctorParameters=function(){return[]};var Kt=function(){function t(t,i){this._mutationObserverFactory=t,this._elementRef=i,this.event=new e.EventEmitter,this._debouncer=new n.Subject}return t.prototype.ngAfterContentInit=function(){var t=this;this.debounce>0?this._debouncer.debounceTime(this.debounce).subscribe(function(e){return t.event.emit(e)}):this._debouncer.subscribe(function(e){return t.event.emit(e)}),this._observer=this._mutationObserverFactory.create(function(e){t._debouncer.next(e)}),this._observer&&this._observer.observe(this._elementRef.nativeElement,{characterData:!0,childList:!0,subtree:!0})},t.prototype.ngOnDestroy=function(){this._observer&&(this._observer.disconnect(),this._debouncer.complete(),this._debouncer=this._observer=null)},t}();Kt.decorators=[{type:e.Directive,args:[{selector:"[cdkObserveContent]"}]}],Kt.ctorParameters=function(){return[{type:Zt},{type:e.ElementRef}]},Kt.propDecorators={event:[{type:e.Output,args:["cdkObserveContent"]}],debounce:[{type:e.Input}]};var $t=function(){function t(){}return t}();$t.decorators=[{type:e.NgModule,args:[{exports:[Kt],declarations:[Kt],providers:[Zt]}]}],$t.ctorParameters=function(){return[]};var Jt={};Jt.FADING_IN=0,Jt.VISIBLE=1,Jt.FADING_OUT=2,Jt.HIDDEN=3,Jt[Jt.FADING_IN]="FADING_IN",Jt[Jt.VISIBLE]="VISIBLE",Jt[Jt.FADING_OUT]="FADING_OUT",Jt[Jt.HIDDEN]="HIDDEN";var Qt=function(){function t(t,e,i){this._renderer=t,this.element=e,this.config=i,this.state=Jt.HIDDEN}return t.prototype.fadeOut=function(){this._renderer.fadeOutRipple(this)},t}(),te=function(){function t(t,e,i,n){this._ngZone=e,this._ruler=i,this._isMousedown=!1,this._triggerEvents=new Map,this._activeRipples=new Set,this.rippleConfig={},this.rippleDisabled=!1,n.isBrowser&&(this._containerElement=t.nativeElement,this._triggerEvents.set("mousedown",this.onMousedown.bind(this)),this._triggerEvents.set("mouseup",this.onMouseup.bind(this)),this._triggerEvents.set("mouseleave",this.onMouseLeave.bind(this)),this.setTriggerElement(this._containerElement))}return t.prototype.fadeInRipple=function(t,e,i){var n=this;void 0===i&&(i={});var r=this._containerElement.getBoundingClientRect();if(i.centered)t=r.left+r.width/2,e=r.top+r.height/2;else{var o=this._ruler.getViewportScrollPosition();t-=o.left,e-=o.top}var a=i.radius||x(t,e,r),s=1/(i.speedFactor||1)*450,l=t-r.left,c=e-r.top,p=document.createElement("div");p.classList.add("mat-ripple-element"),p.style.left=l-a+"px",p.style.top=c-a+"px",p.style.height=2*a+"px",p.style.width=2*a+"px",p.style.backgroundColor=i.color,p.style.transitionDuration=s+"ms",this._containerElement.appendChild(p),v(p),p.style.transform="scale(1)";var d=new Qt(this,p,i);return d.state=Jt.FADING_IN,this._activeRipples.add(d),this.runTimeoutOutsideZone(function(){d.state=Jt.VISIBLE,i.persistent||n._isMousedown||d.fadeOut()},s),d},t.prototype.fadeOutRipple=function(t){if(this._activeRipples.delete(t)){var e=t.element;e.style.transitionDuration="400ms",e.style.opacity="0",t.state=Jt.FADING_OUT,this.runTimeoutOutsideZone(function(){t.state=Jt.HIDDEN,e.parentNode.removeChild(e)},400)}},t.prototype.fadeOutAll=function(){this._activeRipples.forEach(function(t){return t.fadeOut()})},t.prototype.setTriggerElement=function(t){var e=this;this._triggerElement&&this._triggerEvents.forEach(function(t,i){return e._triggerElement.removeEventListener(i,t)}),t&&this._ngZone.runOutsideAngular(function(){e._triggerEvents.forEach(function(e,i){return t.addEventListener(i,e)})}),this._triggerElement=t},t.prototype.onMousedown=function(t){this.rippleDisabled||(this._isMousedown=!0,this.fadeInRipple(t.pageX,t.pageY,this.rippleConfig))},t.prototype.onMouseup=function(){this._isMousedown=!1,this._activeRipples.forEach(function(t){t.config.persistent||t.state!==Jt.VISIBLE||t.fadeOut()})},t.prototype.onMouseLeave=function(){this._isMousedown&&this.onMouseup()},t.prototype.runTimeoutOutsideZone=function(t,e){void 0===e&&(e=0),this._ngZone.runOutsideAngular(function(){return setTimeout(t,e)})},t}(),ee="undefined"!=typeof Intl&&Intl.v8BreakIterator,ie=function(){function t(){this.isBrowser="object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!ee)&&!!CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}return t}();ie.decorators=[{type:e.Injectable}],ie.ctorParameters=function(){return[]};var ne,re=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"],oe=function(){function t(){}return t}();oe.decorators=[{type:e.NgModule,args:[{providers:[ie]}]}],oe.ctorParameters=function(){return[]};var ae=function(){function t(t,e){this._ngZone=t,this._platform=e,this._scrolled=new n.Subject,this._globalSubscription=null,this._scrolledCount=0,this.scrollableReferences=new Map}return t.prototype.register=function(t){var e=this,i=t.elementScrolled().subscribe(function(){return e._notify()});this.scrollableReferences.set(t,i)},t.prototype.deregister=function(t){this.scrollableReferences.has(t)&&(this.scrollableReferences.get(t).unsubscribe(),this.scrollableReferences.delete(t))},t.prototype.scrolled=function(t,e){var i=this;if(void 0===t&&(t=20),!this._platform.isBrowser)return s.Subscription.EMPTY;var n=t>0?this._scrolled.asObservable().auditTime(t):this._scrolled.asObservable();this._scrolledCount++,this._globalSubscription||(this._globalSubscription=this._ngZone.runOutsideAngular(function(){return a.Observable.merge(a.Observable.fromEvent(window.document,"scroll"),a.Observable.fromEvent(window,"resize")).subscribe(function(){return i._notify()})}));var r=n.subscribe(e);return r.add(function(){i._scrolledCount--,!i._globalSubscription||i.scrollableReferences.size||i._scrolledCount||(i._globalSubscription.unsubscribe(),i._globalSubscription=null)}),r},t.prototype.getScrollContainers=function(t){var e=this,i=[];return this.scrollableReferences.forEach(function(n,r){e.scrollableContainsElement(r,t)&&i.push(r)}),i},t.prototype.scrollableContainsElement=function(t,e){var i=e.nativeElement,n=t.getElementRef().nativeElement;do{if(i==n)return!0}while(i=i.parentElement)},t.prototype._notify=function(){this._scrolled.next()},t}();ae.decorators=[{type:e.Injectable}],ae.ctorParameters=function(){return[{type:e.NgZone},{type:ie}]};var se={provide:ae,deps:[[new e.Optional,new e.SkipSelf,ae],e.NgZone,ie],useFactory:w},le=function(){function t(t){var e=this;t.scrolled(null,function(){return e._cacheViewportGeometry()})}return t.prototype.getViewportRect=function(t){void 0===t&&(t=this._documentRect),t||(this._cacheViewportGeometry(),t=this._documentRect);var e=this.getViewportScrollPosition(t),i=window.innerHeight,n=window.innerWidth;return{top:e.top,left:e.left,bottom:e.top+i,right:e.left+n,height:i,width:n}},t.prototype.getViewportScrollPosition=function(t){return void 0===t&&(t=this._documentRect),t||(this._cacheViewportGeometry(),t=this._documentRect),{top:-t.top||document.body.scrollTop||window.scrollY||document.documentElement.scrollTop||0,left:-t.left||document.body.scrollLeft||window.scrollX||document.documentElement.scrollLeft||0}},t.prototype._cacheViewportGeometry=function(){this._documentRect=document.documentElement.getBoundingClientRect()},t}();le.decorators=[{type:e.Injectable}],le.ctorParameters=function(){return[{type:ae}]};var ce={provide:le,deps:[[new e.Optional,new e.SkipSelf,le],ae],useFactory:C},pe=new e.InjectionToken("md-ripple-global-options"),de=function(){function t(t,e,i,n,r){this.radius=0,this.speedFactor=1,this._rippleRenderer=new te(t,e,i,n),this._globalOptions=r||{},this._updateRippleRenderer()}return t.prototype.ngOnChanges=function(t){t.trigger&&this.trigger&&this._rippleRenderer.setTriggerElement(this.trigger),this._updateRippleRenderer()},t.prototype.ngOnDestroy=function(){this._rippleRenderer.setTriggerElement(null)},t.prototype.launch=function(t,e,i){return void 0===i&&(i=this.rippleConfig),this._rippleRenderer.fadeInRipple(t,e,i)},t.prototype.fadeOutAll=function(){this._rippleRenderer.fadeOutAll()},Object.defineProperty(t.prototype,"rippleConfig",{get:function(){return{centered:this.centered,speedFactor:this.speedFactor*(this._globalOptions.baseSpeedFactor||1),radius:this.radius,color:this.color}},enumerable:!0,configurable:!0}),t.prototype._updateRippleRenderer=function(){this._rippleRenderer.rippleDisabled=this._globalOptions.disabled||this.disabled,this._rippleRenderer.rippleConfig=this.rippleConfig},t}();de.decorators=[{type:e.Directive,args:[{selector:"[md-ripple], [mat-ripple], [mdRipple], [matRipple]",exportAs:"mdRipple",host:{class:"mat-ripple","[class.mat-ripple-unbounded]":"unbounded"}}]}],de.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone},{type:le},{type:ie},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[pe]}]}]},de.propDecorators={trigger:[{type:e.Input,args:["mdRippleTrigger"]}],centered:[{type:e.Input,args:["mdRippleCentered"]}],disabled:[{type:e.Input,args:["mdRippleDisabled"]}],radius:[{type:e.Input,args:["mdRippleRadius"]}],speedFactor:[{type:e.Input,args:["mdRippleSpeedFactor"]}],color:[{type:e.Input,args:["mdRippleColor"]}],unbounded:[{type:e.Input,args:["mdRippleUnbounded"]}]};var ue=function(){function t(t,e,i,r){this._elementRef=t,this._scroll=e,this._ngZone=i,this._renderer=r,this._elementScrolled=new n.Subject}return t.prototype.ngOnInit=function(){var t=this;this._scrollListener=this._ngZone.runOutsideAngular(function(){return t._renderer.listen(t.getElementRef().nativeElement,"scroll",function(e){t._elementScrolled.next(e)})}),this._scroll.register(this)},t.prototype.ngOnDestroy=function(){this._scroll.deregister(this),this._scrollListener&&(this._scrollListener(),this._scrollListener=null)},t.prototype.elementScrolled=function(){return this._elementScrolled.asObservable()},t.prototype.getElementRef=function(){return this._elementRef},t}();ue.decorators=[{type:e.Directive,args:[{selector:"[cdk-scrollable], [cdkScrollable]"}]}],ue.ctorParameters=function(){return[{type:e.ElementRef},{type:ae},{type:e.NgZone},{type:e.Renderer2}]};var he=function(){function t(t){this._scrollDispatcher=t,this._scrollSubscription=null}return t.prototype.attach=function(t){if(this._overlayRef)throw I();this._overlayRef=t},t.prototype.enable=function(){var t=this;this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(null,function(){t._overlayRef.hasAttached()&&t._overlayRef.detach(),t.disable()}))},t.prototype.disable=function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)},t}(),me=function(){function t(){}return t.prototype.enable=function(){},t.prototype.disable=function(){},t.prototype.attach=function(){},t}(),fe=function(){function t(t){this._viewportRuler=t,this._previousHTMLStyles={top:null,left:null},this._isEnabled=!1}return t.prototype.attach=function(){},t.prototype.enable=function(){if(this._canBeEnabled()){var t=document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left,this._previousHTMLStyles.top=t.style.top,t.style.left=-this._previousScrollPosition.left+"px",t.style.top=-this._previousScrollPosition.top+"px",t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}},t.prototype.disable=function(){this._isEnabled&&(this._isEnabled=!1,document.documentElement.style.left=this._previousHTMLStyles.left,document.documentElement.style.top=this._previousHTMLStyles.top,document.documentElement.classList.remove("cdk-global-scrollblock"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top))},t.prototype._canBeEnabled=function(){if(document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;var t=document.body,e=this._viewportRuler.getViewportRect();return t.scrollHeight>e.height||t.scrollWidth>e.width},t}(),ge=function(){function t(t,e){this._scrollDispatcher=t,this._config=e,this._scrollSubscription=null}return t.prototype.attach=function(t){if(this._overlayRef)throw I();this._overlayRef=t},t.prototype.enable=function(){var t=this;if(!this._scrollSubscription){var e=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(e,function(){t._overlayRef.updatePosition()})}},t.prototype.disable=function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)},t}(),be=function(){function t(t,e){var i=this;this._scrollDispatcher=t,this._viewportRuler=e,this.noop=function(){return new me},this.close=function(){return new he(i._scrollDispatcher)},this.block=function(){return new fe(i._viewportRuler)},this.reposition=function(t){return new ge(i._scrollDispatcher,t)}}return t}();be.decorators=[{type:e.Injectable}],be.ctorParameters=function(){return[{type:ae},{type:le}]};var _e=function(){function t(){}return t}();_e.decorators=[{type:e.NgModule,args:[{imports:[oe],exports:[ue],declarations:[ue],providers:[se,be]}]}],_e.ctorParameters=function(){return[]};var ye=function(){function t(){}return t}();ye.decorators=[{type:e.NgModule,args:[{imports:[Wt,oe,_e],exports:[de,Wt],declarations:[de],providers:[ce]}]}],ye.ctorParameters=function(){return[]};var ve=function(){function t(t,e){this._renderer=t,this._elementRef=e}return t}(),xe=E(ve,"accent"),ke=function(t){function e(e,i){var n=t.call(this,i,e)||this;return n.state="unchecked",n.disabled=!1,n}return _(e,t),e}(xe);ke.decorators=[{type:e.Component,args:[{encapsulation:e.ViewEncapsulation.None,selector:"md-pseudo-checkbox, mat-pseudo-checkbox",styles:[".mat-pseudo-checkbox{width:20px;height:20px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;transition:border-color 90ms cubic-bezier(0,0,.2,.1),background-color 90ms cubic-bezier(0,0,.2,.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:'';border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0,0,.2,.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:9px;left:2px;width:16px;opacity:1}.mat-pseudo-checkbox-checked::after{top:5px;left:3px;width:12px;height:5px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1}"],inputs:["color"],template:"",host:{class:"mat-pseudo-checkbox","[class.mat-pseudo-checkbox-indeterminate]":'state === "indeterminate"',"[class.mat-pseudo-checkbox-checked]":'state === "checked"',"[class.mat-pseudo-checkbox-disabled]":"disabled"}}]}],ke.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2}]},ke.propDecorators={state:[{type:e.Input}],disabled:[{type:e.Input}]};var we=function(){function t(){}return t}();we.decorators=[{type:e.NgModule,args:[{exports:[ke],declarations:[ke]}]}],we.ctorParameters=function(){return[]};var Ce=function(){function t(){}return t}(),Ie=P(Ce),Ee=0,Oe=function(t){function e(){var e=t.apply(this,arguments)||this;return e._labelId="mat-optgroup-label-"+Ee++,e}return _(e,t),e}(Ie);Oe.decorators=[{type:e.Component,args:[{selector:"md-optgroup, mat-optgroup",template:'<label class="mat-optgroup-label" [id]="_labelId">{{ label }}</label><ng-content select="md-option, mat-option"></ng-content>',encapsulation:e.ViewEncapsulation.None,inputs:["disabled"],host:{class:"mat-optgroup",role:"group","[class.mat-optgroup-disabled]":"disabled","[attr.aria-disabled]":"disabled.toString()","[attr.aria-labelledby]":"_labelId"}}]}],Oe.ctorParameters=function(){return[]},Oe.propDecorators={label:[{type:e.Input}]};var Pe=0,De=function(){function t(t,e){void 0===e&&(e=!1),this.source=t,this.isUserInput=e}return t}(),Se=function(){function t(t,i,n){this._element=t,this.group=i,this._isCompatibilityMode=n,this._selected=!1,this._active=!1,this._disabled=!1,this._id="md-option-"+Pe++,this.multiple=!1,this.onSelectionChange=new e.EventEmitter} return Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.group&&this.group.disabled||this._disabled},set:function(t){this._disabled=O(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"active",{get:function(){return this._active},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"viewValue",{get:function(){return this._getHostElement().textContent.trim()},enumerable:!0,configurable:!0}),t.prototype.select=function(){this._selected=!0,this._emitSelectionChangeEvent()},t.prototype.deselect=function(){this._selected=!1,this._emitSelectionChangeEvent()},t.prototype.focus=function(){this._getHostElement().focus()},t.prototype.setActiveStyles=function(){this._active=!0},t.prototype.setInactiveStyles=function(){this._active=!1},t.prototype._handleKeydown=function(t){13!==t.keyCode&&32!==t.keyCode||this._selectViaInteraction()},t.prototype._selectViaInteraction=function(){this.disabled||(this._selected=!this.multiple||!this._selected,this._emitSelectionChangeEvent(!0))},t.prototype._getTabIndex=function(){return this.disabled?"-1":"0"},t.prototype._getHostElement=function(){return this._element.nativeElement},t.prototype._emitSelectionChangeEvent=function(t){void 0===t&&(t=!1),this.onSelectionChange.emit(new De(this,t))},t}();Se.decorators=[{type:e.Component,args:[{selector:"md-option, mat-option",host:{role:"option","[attr.tabindex]":"_getTabIndex()","[class.mat-selected]":"selected","[class.mat-option-multiple]":"multiple","[class.mat-active]":"active","[id]":"id","[attr.aria-selected]":"selected.toString()","[attr.aria-disabled]":"disabled.toString()","[class.mat-option-disabled]":"disabled","(click)":"_selectViaInteraction()","(keydown)":"_handleKeydown($event)",class:"mat-option"},template:'<span [ngSwitch]="_isCompatibilityMode" *ngIf="multiple"><mat-pseudo-checkbox class="mat-option-pseudo-checkbox" *ngSwitchCase="true" [state]="selected ? \'checked\' : \'\'" color="primary"></mat-pseudo-checkbox><md-pseudo-checkbox class="mat-option-pseudo-checkbox" *ngSwitchDefault [state]="selected ? \'checked\' : \'\'" color="primary"></md-pseudo-checkbox></span><ng-content></ng-content><div class="mat-option-ripple" *ngIf="!disabled" md-ripple [mdRippleTrigger]="_getHostElement()"></div>',encapsulation:e.ViewEncapsulation.None}]}],Se.ctorParameters=function(){return[{type:e.ElementRef},{type:Oe,decorators:[{type:e.Optional}]},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[Ft]}]}]},Se.propDecorators={value:[{type:e.Input}],disabled:[{type:e.Input}],onSelectionChange:[{type:e.Output}]};var Me=function(){function t(){}return t}();Me.decorators=[{type:e.NgModule,args:[{imports:[ye,o.CommonModule,we],exports:[Se,Oe],declarations:[Se,Oe]}]}],Me.ctorParameters=function(){return[]};var Re=function(){function t(){}return t.prototype.attach=function(t){return null==t&&A(),t.hasAttached()&&S(),this._attachedHost=t,t.attach(this)},t.prototype.detach=function(){var t=this._attachedHost;return null==t&&T(),this._attachedHost=null,t.detach()},Object.defineProperty(t.prototype,"isAttached",{get:function(){return null!=this._attachedHost},enumerable:!0,configurable:!0}),t.prototype.setAttachedHost=function(t){this._attachedHost=t},t}(),Ae=function(t){function e(e,i,n){void 0===i&&(i=null),void 0===n&&(n=null);var r=t.call(this)||this;return r.component=e,r.viewContainerRef=i,r.injector=n,r}return _(e,t),e}(Re),Te=function(t){function e(e,i){var n=t.call(this)||this;return n.locals=new Map,n.templateRef=e,n.viewContainerRef=i,n}return _(e,t),Object.defineProperty(e.prototype,"origin",{get:function(){return this.templateRef.elementRef},enumerable:!0,configurable:!0}),e.prototype.attach=function(e,i){return this.locals=null==i?new Map:i,t.prototype.attach.call(this,e)},e.prototype.detach=function(){return this.locals=new Map,t.prototype.detach.call(this)},e}(Re),Fe=function(){function t(){this._isDisposed=!1}return t.prototype.hasAttached=function(){return!!this._attachedPortal},t.prototype.attach=function(t){return t||D(),this.hasAttached()&&S(),this._isDisposed&&M(),t instanceof Ae?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Te?(this._attachedPortal=t,this.attachTemplatePortal(t)):void R()},t.prototype.attachComponentPortal=function(t){},t.prototype.attachTemplatePortal=function(t){},t.prototype.detach=function(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()},t.prototype.dispose=function(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0},t.prototype.setDisposeFn=function(t){this._disposeFn=t},t.prototype._invokeDisposeFn=function(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)},t}(),Le=function(t){function e(e,i){return t.call(this,e,i)||this}return _(e,t),e}(Te);Le.decorators=[{type:e.Directive,args:[{selector:"[cdk-portal], [cdkPortal], [portal]",exportAs:"cdkPortal"}]}],Le.ctorParameters=function(){return[{type:e.TemplateRef},{type:e.ViewContainerRef}]};var je=function(t){function e(e,i){var n=t.call(this)||this;return n._componentFactoryResolver=e,n._viewContainerRef=i,n}return _(e,t),Object.defineProperty(e.prototype,"_deprecatedPortal",{get:function(){return this.portal},set:function(t){this.portal=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"portal",{get:function(){return this._portal},set:function(e){this.hasAttached()&&t.prototype.detach.call(this),e&&t.prototype.attach.call(this,e),this._portal=e},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){t.prototype.dispose.call(this),this._portal=null},e.prototype.attachComponentPortal=function(e){e.setAttachedHost(this);var i=null!=e.viewContainerRef?e.viewContainerRef:this._viewContainerRef,n=this._componentFactoryResolver.resolveComponentFactory(e.component),r=i.createComponent(n,i.length,e.injector||i.parentInjector);return t.prototype.setDisposeFn.call(this,function(){return r.destroy()}),this._portal=e,r},e.prototype.attachTemplatePortal=function(e){var i=this;return e.setAttachedHost(this),this._viewContainerRef.createEmbeddedView(e.templateRef),t.prototype.setDisposeFn.call(this,function(){return i._viewContainerRef.clear()}),this._portal=e,new Map},e}(Fe);je.decorators=[{type:e.Directive,args:[{selector:"[cdkPortalHost], [portalHost]",inputs:["portal: cdkPortalHost"]}]}],je.ctorParameters=function(){return[{type:e.ComponentFactoryResolver},{type:e.ViewContainerRef}]},je.propDecorators={_deprecatedPortal:[{type:e.Input,args:["portalHost"]}]};var Ne=function(){function t(){}return t}();Ne.decorators=[{type:e.NgModule,args:[{exports:[Le,je],declarations:[Le,je]}]}],Ne.ctorParameters=function(){return[]};var Be=function(){function t(){this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.direction="ltr"}return t}(),Ve=function(t){function e(e,i,n,r){var o=t.call(this)||this;return o._hostDomElement=e,o._componentFactoryResolver=i,o._appRef=n,o._defaultInjector=r,o}return _(e,t),e.prototype.attachComponentPortal=function(t){var e,i=this,n=this._componentFactoryResolver.resolveComponentFactory(t.component);return t.viewContainerRef?(e=t.viewContainerRef.createComponent(n,t.viewContainerRef.length,t.injector||t.viewContainerRef.parentInjector),this.setDisposeFn(function(){return e.destroy()})):(e=n.create(t.injector||this._defaultInjector),this._appRef.attachView(e.hostView),this.setDisposeFn(function(){i._appRef.detachView(e.hostView),e.destroy()})),this._hostDomElement.appendChild(this._getComponentRootNode(e)),e},e.prototype.attachTemplatePortal=function(t){var e=this,i=t.viewContainerRef,n=i.createEmbeddedView(t.templateRef);return n.detectChanges(),n.rootNodes.forEach(function(t){return e._hostDomElement.appendChild(t)}),this.setDisposeFn(function(){var t=i.indexOf(n);-1!==t&&i.remove(t)}),new Map},e.prototype.dispose=function(){t.prototype.dispose.call(this),null!=this._hostDomElement.parentNode&&this._hostDomElement.parentNode.removeChild(this._hostDomElement)},e.prototype._getComponentRootNode=function(t){return t.hostView.rootNodes[0]},e}(Fe),ze=function(){function t(t,e,i,r,o){this._portalHost=t,this._pane=e,this._state=i,this._scrollStrategy=r,this._ngZone=o,this._backdropElement=null,this._backdropClick=new n.Subject,this._attachments=new n.Subject,this._detachments=new n.Subject,r.attach(this)}return Object.defineProperty(t.prototype,"overlayElement",{get:function(){return this._pane},enumerable:!0,configurable:!0}),t.prototype.attach=function(t){var e=this._portalHost.attach(t);return this._updateStackingOrder(),this.updateSize(),this.updateDirection(),this.updatePosition(),this._scrollStrategy.enable(),this._togglePointerEvents(!0),this._state.hasBackdrop&&this._attachBackdrop(),this._state.panelClass&&this._pane.classList.add(this._state.panelClass),this._attachments.next(),e},t.prototype.detach=function(){this.detachBackdrop(),this._togglePointerEvents(!1),this._scrollStrategy.disable();var t=this._portalHost.detach();return this._detachments.next(),t},t.prototype.dispose=function(){this._state.positionStrategy&&this._state.positionStrategy.dispose(),this._scrollStrategy&&(this._scrollStrategy.disable(),this._scrollStrategy=null),this.detachBackdrop(),this._portalHost.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._detachments.next(),this._detachments.complete()},t.prototype.hasAttached=function(){return this._portalHost.hasAttached()},t.prototype.backdropClick=function(){return this._backdropClick.asObservable()},t.prototype.attachments=function(){return this._attachments.asObservable()},t.prototype.detachments=function(){return this._detachments.asObservable()},t.prototype.getState=function(){return this._state},t.prototype.updatePosition=function(){this._state.positionStrategy&&this._state.positionStrategy.apply(this._pane)},t.prototype.updateDirection=function(){this._pane.setAttribute("dir",this._state.direction)},t.prototype.updateSize=function(){(this._state.width||0===this._state.width)&&(this._pane.style.width=F(this._state.width)),(this._state.height||0===this._state.height)&&(this._pane.style.height=F(this._state.height)),(this._state.minWidth||0===this._state.minWidth)&&(this._pane.style.minWidth=F(this._state.minWidth)),(this._state.minHeight||0===this._state.minHeight)&&(this._pane.style.minHeight=F(this._state.minHeight))},t.prototype._togglePointerEvents=function(t){this._pane.style.pointerEvents=t?"auto":"none"},t.prototype._attachBackdrop=function(){var t=this;this._backdropElement=document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._backdropElement.classList.add(this._state.backdropClass),this._pane.parentElement.insertBefore(this._backdropElement,this._pane),this._backdropElement.addEventListener("click",function(){return t._backdropClick.next(null)}),requestAnimationFrame(function(){t._backdropElement&&t._backdropElement.classList.add("cdk-overlay-backdrop-showing")})},t.prototype._updateStackingOrder=function(){this._pane.nextSibling&&this._pane.parentNode.appendChild(this._pane)},t.prototype.detachBackdrop=function(){var t=this,e=this._backdropElement;if(e){var i=function(){e&&e.parentNode&&e.parentNode.removeChild(e),t._backdropElement==e&&(t._backdropElement=null)};e.classList.remove("cdk-overlay-backdrop-showing"),e.classList.remove(this._state.backdropClass),e.addEventListener("transitionend",i),e.style.pointerEvents="none",this._ngZone.runOutsideAngular(function(){setTimeout(i,500)})}},t}(),He=function(){function t(t,e){this.originX=t.originX,this.originY=t.originY,this.overlayX=e.overlayX,this.overlayY=e.overlayY}return t}(),We=function(){function t(){}return t}(),Ye=function(){function t(t,e){this.connectionPair=t,this.scrollableViewProperties=e}return t}();Ye.ctorParameters=function(){return[{type:He},{type:We,decorators:[{type:e.Optional}]}]};var Ge=function(){function t(t,e,i,r){this._connectedTo=t,this._originPos=e,this._overlayPos=i,this._viewportRuler=r,this._dir="ltr",this._offsetX=0,this._offsetY=0,this.scrollables=[],this._preferredPositions=[],this._onPositionChange=new n.Subject,this._origin=this._connectedTo.nativeElement,this.withFallbackPosition(e,i)}return Object.defineProperty(t.prototype,"_isRtl",{get:function(){return"rtl"===this._dir},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onPositionChange",{get:function(){return this._onPositionChange.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"positions",{get:function(){return this._preferredPositions},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){},t.prototype.apply=function(t){this._pane=t;for(var e=this._origin.getBoundingClientRect(),i=t.getBoundingClientRect(),n=this._viewportRuler.getViewportRect(),r=null,o=null,a=0,s=this._preferredPositions;a<s.length;a++){var l=s[a],c=this._getOriginConnectionPoint(e,l),p=this._getOverlayPoint(c,i,n,l);if(p.fitsInViewport){this._setElementPosition(t,i,p,l),this._lastConnectedPosition=l;var d=this.getScrollableViewProperties(t),u=new Ye(l,d);return this._onPositionChange.next(u),Promise.resolve(null)}(!r||r.visibleArea<p.visibleArea)&&(r=p,o=l)}return this._setElementPosition(t,i,r,o),Promise.resolve(null)},t.prototype.recalculateLastPosition=function(){var t=this._origin.getBoundingClientRect(),e=this._pane.getBoundingClientRect(),i=this._viewportRuler.getViewportRect(),n=this._lastConnectedPosition||this._preferredPositions[0],r=this._getOriginConnectionPoint(t,n),o=this._getOverlayPoint(r,e,i,n);this._setElementPosition(this._pane,e,o,n)},t.prototype.withScrollableContainers=function(t){this.scrollables=t},t.prototype.withFallbackPosition=function(t,e){return this._preferredPositions.push(new He(t,e)),this},t.prototype.withDirection=function(t){return this._dir=t,this},t.prototype.withOffsetX=function(t){return this._offsetX=t,this},t.prototype.withOffsetY=function(t){return this._offsetY=t,this},t.prototype._getStartX=function(t){return this._isRtl?t.right:t.left},t.prototype._getEndX=function(t){return this._isRtl?t.left:t.right},t.prototype._getOriginConnectionPoint=function(t,e){var i,n=this._getStartX(t),r=this._getEndX(t);i="center"==e.originX?n+t.width/2:"start"==e.originX?n:r;var o;return o="center"==e.originY?t.top+t.height/2:"top"==e.originY?t.top:t.bottom,{x:i,y:o}},t.prototype._getOverlayPoint=function(t,e,i,n){var r;r="center"==n.overlayX?-e.width/2:"start"===n.overlayX?this._isRtl?-e.width:0:this._isRtl?0:-e.width;var o;o="center"==n.overlayY?-e.height/2:"top"==n.overlayY?0:-e.height;var a=t.x+r+this._offsetX,s=t.y+o+this._offsetY,l=0-a,c=a+e.width-i.width,p=0-s,d=s+e.height-i.height,u=this._subtractOverflows(e.width,l,c),h=this._subtractOverflows(e.height,p,d),m=u*h;return{x:a,y:s,fitsInViewport:e.width*e.height===m,visibleArea:m}},t.prototype.getScrollableViewProperties=function(t){var e=this,i=this._getElementBounds(this._origin),n=this._getElementBounds(t),r=this.scrollables.map(function(t){return e._getElementBounds(t.getElementRef().nativeElement)});return{isOriginClipped:this.isElementClipped(i,r),isOriginOutsideView:this.isElementOutsideView(i,r),isOverlayClipped:this.isElementClipped(n,r),isOverlayOutsideView:this.isElementOutsideView(n,r)}},t.prototype.isElementOutsideView=function(t,e){return e.some(function(e){var i=t.bottom<e.top,n=t.top>e.bottom,r=t.right<e.left,o=t.left>e.right;return i||n||r||o})},t.prototype.isElementClipped=function(t,e){return e.some(function(e){var i=t.top<e.top,n=t.bottom>e.bottom,r=t.left<e.left,o=t.right>e.right;return i||n||r||o})},t.prototype._setElementPosition=function(t,e,i,n){var r,o="bottom"===n.overlayY?"bottom":"top",a="top"===o?i.y:document.documentElement.clientHeight-(i.y+e.height);r="rtl"===this._dir?"end"===n.overlayX?"left":"right":"end"===n.overlayX?"right":"left";var s="left"===r?i.x:document.documentElement.clientWidth-(i.x+e.width);["top","bottom","left","right"].forEach(function(e){return t.style[e]=null}),t.style[o]=a+"px",t.style[r]=s+"px"},t.prototype._getElementBounds=function(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.left+e.width,bottom:e.top+e.height,left:e.left}},t.prototype._subtractOverflows=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return e.reduce(function(t,e){return t-Math.max(e,0)},t)},t}(),Xe=function(){function t(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._leftOffset="",this._rightOffset="",this._alignItems="",this._justifyContent="",this._width="",this._height=""}return t.prototype.top=function(t){return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this},t.prototype.left=function(t){return this._rightOffset="",this._leftOffset=t,this._justifyContent="flex-start",this},t.prototype.bottom=function(t){return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this},t.prototype.right=function(t){return this._leftOffset="",this._rightOffset=t,this._justifyContent="flex-end",this},t.prototype.width=function(t){return this._width=t,"100%"===t&&this.left("0px"),this},t.prototype.height=function(t){return this._height=t,"100%"===t&&this.top("0px"),this},t.prototype.centerHorizontally=function(t){return void 0===t&&(t=""),this.left(t),this._justifyContent="center",this},t.prototype.centerVertically=function(t){return void 0===t&&(t=""),this.top(t),this._alignItems="center",this},t.prototype.apply=function(t){this._wrapper||(this._wrapper=document.createElement("div"),this._wrapper.classList.add("cdk-global-overlay-wrapper"),t.parentNode.insertBefore(this._wrapper,