@blox/material
Version:
Material Components for Angular
37 lines (35 loc) • 208 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("@material/ripple"),require("@material/dom"),require("@angular/forms"),require("rxjs"),require("rxjs/operators"),require("@material/checkbox"),require("@material/chips"),require("@material/dialog"),require("@material/drawer"),require("@material/list"),require("@material/radio"),require("@material/floating-label"),require("@material/form-field"),require("@material/icon-button"),require("@material/linear-progress"),require("@material/menu"),require("@material/menu-surface"),require("@material/notched-outline"),require("@material/line-ripple"),require("@material/select"),require("@material/slider"),require("@material/snackbar"),require("@material/switch"),require("@material/tab-bar"),require("@material/tab-scroller"),require("@material/tab"),require("@material/tab-indicator"),require("@angular/router"),require("@material/textfield"),require("@material/top-app-bar")):"function"==typeof define&&define.amd?define("@blox/material",["exports","@angular/core","@angular/common","@material/ripple","@material/dom","@angular/forms","rxjs","rxjs/operators","@material/checkbox","@material/chips","@material/dialog","@material/drawer","@material/list","@material/radio","@material/floating-label","@material/form-field","@material/icon-button","@material/linear-progress","@material/menu","@material/menu-surface","@material/notched-outline","@material/line-ripple","@material/select","@material/slider","@material/snackbar","@material/switch","@material/tab-bar","@material/tab-scroller","@material/tab","@material/tab-indicator","@angular/router","@material/textfield","@material/top-app-bar"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).blox=t.blox||{},t.blox.material={}),t.ng.core,t.ng.common,t.mdc.ripple,t.mdc.dom,t.ng.forms,t.rxjs,t.rxjs.operators,t.mdc.checkbox,t.mdc.chips,t.mdc.dialog,t.mdc.drawer,t.mdc.list,t.mdc.radio,t.mdc.floatingLabel,t.mdc.formField,t.mdc.iconButton,t.mdc.linearProgress,t.mdc.menu,t.mdc.menuSurface,t.mdc.notchedOutline,t.mdc.lineRipple,t.mdc.select,t.mdc.slider,t.mdc.snackbar,t.mdc.switch,t.mdc.tabBar,t.mdc.tabScroller,t.mdc.tab,t.mdc.tabIndicator,t.ng.router,t.mdc.textfield,t.mdc.topAppBar)}(this,(function(t,e,n,i,r,o,s,a,c,l,u,d,p,h,f,_,m,v,y,g,b,C,E,I,D,A,x,O,T,S,R,L,B){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var w=function(t,e){return(w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function k(t,e){function n(){this.constructor=t}w(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function H(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s}function P(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(H(arguments[e]));return t}function M(t){return null!=t&&""+t!="false"}function F(t){return null==t?t:""+t!="false"}var j=new Map,V=function(){function t(){}return t.prototype.listen=function(t,e,n,i,r){this.listenElm(t,e,n,i.nativeElement,r)},t.prototype.listenElm=function(t,e,n,i,r){i.addEventListener(e,n,r);this.registerUnlisten(e,n,(function(){i.removeEventListener(e,n,r)}))},t.prototype.registerUnlisten=function(t,e,n){j.has(t)||j.set(t,new WeakMap),j.get(t).set(e,n)},t.prototype.unlisten=function(t,e){if(j.has(t)){var n=j.get(t);n.has(e)&&(n.get(e)(),n.delete(e))}},t}();V.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new V},token:V,providedIn:"root"}),V.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],V.ctorParameters=function(){return[]};var $=function(){function t(t,e,n,o){var s=this;this._rippleElm=t,this._renderer=e,this._registry=n,this.mdcRippleAdapter={browserSupportsCssVars:function(){return i.util.supportsCssVariables(s.document.defaultView)},isUnbounded:function(){return s._unbounded},isSurfaceActive:function(){return s.isRippleSurfaceActive()},isSurfaceDisabled:function(){return s.isRippleSurfaceDisabled()},addClass:function(t){return s.addClassToRipple(t)},removeClass:function(t){return s.removeClassFromRipple(t)},containsEventTarget:function(t){return s._rippleElm.nativeElement.contains(t)},registerInteractionHandler:function(t,e){s.getRippleInteractionElement()&&s._registry.listenElm(s._renderer,t,e,s.getRippleInteractionElement().nativeElement,r.events.applyPassive())},deregisterInteractionHandler:function(t,e){s._registry.unlisten(t,e)},registerDocumentInteractionHandler:function(t,e){return s._registry.listenElm(s._renderer,t,e,s.document,r.events.applyPassive())},deregisterDocumentInteractionHandler:function(t,e){return s._registry.unlisten(t,e)},registerResizeHandler:function(t){s._registry.listenElm(s._renderer,"resize",t,s.document.defaultView)},deregisterResizeHandler:function(t){s._registry.unlisten("resize",t)},updateCssVariable:function(t,e){s.getRippleStylingElement().nativeElement.style.setProperty(t,e)},computeBoundingRect:function(){return s.computeRippleBoundingRect()},getWindowPageOffset:function(){return{x:s.document.defaultView.pageXOffset,y:s.document.defaultView.pageYOffset}}},this._rippleFoundation=null,this._unbounded=!1,this._rippleSurface=null,this.document=o}return t.prototype.initRipple=function(t){if(void 0===t&&(t=!1),this._rippleFoundation)throw new Error("initRipple() is called multiple times");this._unbounded=t,this._rippleFoundation=new i.MDCRippleFoundation(this.mdcRippleAdapter),this._rippleFoundation.init()},t.prototype.destroyRipple=function(){this._rippleFoundation&&(this._rippleFoundation.destroy(),this._rippleFoundation=null)},t.prototype.reinitRipple=function(){this._rippleFoundation&&(this.destroyRipple(),this.initRipple(this._unbounded))},t.prototype.isRippleInitialized=function(){return null!=this._rippleFoundation},t.prototype.addRippleSurface=function(t,e){if(void 0===e&&(e=!1),this.destroyRippleSurface(),this._rippleSurface=this._renderer.createElement("div"),this._renderer.addClass(this._rippleSurface,t),e&&this._rippleElm.nativeElement.children.length>0){var n=this._rippleElm.nativeElement.children.item(0);this._renderer.insertBefore(this._rippleElm.nativeElement,this._rippleSurface,n)}else this._renderer.appendChild(this._rippleElm.nativeElement,this._rippleSurface);return this._rippleSurface},t.prototype.destroyRippleSurface=function(){this._rippleSurface&&(this._renderer.removeChild(this._rippleElm.nativeElement,this._rippleSurface),this._rippleSurface=null)},t.prototype.activateRipple=function(){this._rippleFoundation&&this._rippleFoundation.activate()},t.prototype.deactivateRipple=function(){this._rippleFoundation&&this._rippleFoundation.deactivate()},t.prototype.layout=function(){this._rippleFoundation&&this._rippleFoundation.layout()},Object.defineProperty(t.prototype,"rippleSurface",{get:function(){return new e.ElementRef(this._rippleSurface)},enumerable:!1,configurable:!0}),t.prototype.getRippleInteractionElement=function(){return this._rippleElm},t.prototype.getRippleStylingElement=function(){return this._rippleElm},t.prototype.isRippleUnbounded=function(){return this._unbounded},t.prototype.setRippleUnbounded=function(t){!!t!==this._unbounded&&(this._unbounded=!!t,this.reinitRipple())},t.prototype.isRippleSurfaceActive=function(){var t=this.getRippleInteractionElement();return!!t&&this.isActiveElement(t.nativeElement)},t.prototype.isActiveElement=function(t){return null!=t&&r.ponyfill.matches(t,":active")},t.prototype.isRippleSurfaceDisabled=function(){var t=this.getRippleInteractionElement();return!!t&&!!t.nativeElement.attributes.getNamedItem("disabled")},t.prototype.addClassToRipple=function(t){this._renderer.addClass(this.getRippleStylingElement().nativeElement,t)},t.prototype.removeClassFromRipple=function(t){this._renderer.removeClass(this.getRippleStylingElement().nativeElement,t)},t.prototype.computeRippleBoundingRect=function(){return this._rippleElm.nativeElement.getBoundingClientRect()},t.prototype.onFocus=function(){this._rippleFoundation&&this._rippleFoundation.handleFocus()},t.prototype.onBlur=function(){this._rippleFoundation&&this._rippleFoundation.handleBlur()},t}();$.decorators=[{type:e.Directive}],$.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:V},{type:void 0}]},$.propDecorators={onFocus:[{type:e.HostListener,args:["focusin"]}],onBlur:[{type:e.HostListener,args:["focusout"]}]};var N=function(){this._cls=!0,this._ariaHidden=!0};N.decorators=[{type:e.Directive,args:[{selector:"[mdcButtonIcon]"}]}],N.propDecorators={_cls:[{type:e.HostBinding,args:["class.mdc-button__icon"]}],_ariaHidden:[{type:e.HostBinding,args:["attr.aria-hidden"]}]};var U=function(){this._cls=!0};U.decorators=[{type:e.Directive,args:[{selector:"[mdcButtonLabel]"}]}],U.propDecorators={_cls:[{type:e.HostBinding,args:["class.mdc-button__label"]}]};var z=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i,r)||this;return o._elm=e,o._cls=!0,o._raised=!1,o._unelevated=!1,o._outlined=!1,o.addRippleSurface("mdc-button__ripple"),o}return k(e,t),e.prototype.ngAfterContentInit=function(){this.initRipple()},e.prototype.ngOnDestroy=function(){this.destroyRipple()},Object.defineProperty(e.prototype,"raised",{get:function(){return this._raised},set:function(t){this._raised=M(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"outlined",{get:function(){return this._outlined},set:function(t){this._outlined=M(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"unelevated",{get:function(){return this._unelevated},set:function(t){this._unelevated=M(t)},enumerable:!1,configurable:!0}),e}($);z.decorators=[{type:e.Directive,args:[{selector:"button[mdcButton],a[mdcButton]",providers:[{provide:$,useExisting:e.forwardRef((function(){return z}))}]}]}],z.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:V},{type:void 0,decorators:[{type:e.Inject,args:[n.DOCUMENT]}]}]},z.propDecorators={_cls:[{type:e.HostBinding,args:["class.mdc-button"]}],raised:[{type:e.HostBinding,args:["class.mdc-button--raised"]},{type:e.Input}],outlined:[{type:e.HostBinding,args:["class.mdc-button--outlined"]},{type:e.Input}],unelevated:[{type:e.HostBinding,args:["class.mdc-button--unelevated"]},{type:e.Input}]};var q=[N,U,z],W=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i,r)||this;return o._elm=e,o}return k(e,t),e}($);W.decorators=[{type:e.Directive}],W.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:V},{type:void 0,decorators:[{type:e.Inject,args:[n.DOCUMENT]}]}]};var K=function(){function t(){this._cls=!0,this._size="cover"}return Object.defineProperty(t.prototype,"_square",{get:function(){return"square"===this._size},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_size2",{get:function(){return"16:9"===this._size},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this._size},set:function(t){this._size=t},enumerable:!1,configurable:!0}),t}();K.decorators=[{type:e.Directive,args:[{selector:"[mdcCardMedia]"}]}],K.ctorParameters=function(){return[]},K.propDecorators={_cls:[{type:e.HostBinding,args:["class.mdc-card__media"]}],_square:[{type:e.HostBinding,args:["class.mdc-card__media--square"]}],_size2:[{type:e.HostBinding,args:["class.mdc-card__media--16-9"]}],size:[{type:e.Input}]};var G=function(){this._cls=!0};G.decorators=[{type:e.Directive,args:[{selector:"[mdcCardMediaContent]"}]}],G.propDecorators={_cls:[{type:e.HostBinding,args:["class.mdc-card__media-content"]}]};var X=function(){this._cls=!0};X.decorators=[{type:e.Directive,args:[{selector:"[mdcCardActionButtons]"}]}],X.propDecorators={_cls:[{type:e.HostBinding,args:["class.mdc-card__action-buttons"]}]};var Q=function(){this._cls=!0};Q.decorators=[{type:e.Directive,args:[{selector:"[mdcCardActionIcons]"}]}],Q.propDecorators={_cls:[{type:e.HostBinding,args:["class.mdc-card__action-icons"]}]};var Y=function(){function t(t){this.renderer=t,this._cls=!0,this._initialized=!1,this._fullBleed=!1}return t.prototype.ngAfterContentInit=function(){var t=this;this._initialized=!0,this._initButtons(),this._initIcons(),this._buttons.changes.subscribe((function(){t._initButtons()})),this._icons.changes.subscribe((function(){t._initIcons()}))},t.prototype._initButtons=function(){var t=this;this._initialized&&this._buttons.forEach((function(e){t.renderer.addClass(e._elm.nativeElement,"mdc-card__action"),t.renderer.addClass(e._elm.nativeElement,"mdc-card__action--button")}))},t.prototype._initIcons=function(){var t=this;this._initialized&&this._icons.forEach((function(e){t.renderer.addClass(e._elm.nativeElement,"mdc-card__action"),t.renderer.addClass(e._elm.nativeElement,"mdc-card__action--icon")}))},Object.defineProperty(t.prototype,"fullBleed",{get:function(){return this._fullBleed},set:function(t){this._fullBleed=M(t)},enumerable:!1,configurable:!0}),t}();Y.decorators=[{type:e.Directive,args:[{selector:"[mdcCardActions]"}]}],Y.ctorParameters=function(){return[{type:e.Renderer2}]},Y.propDecorators={_cls:[{type:e.HostBinding,args:["class.mdc-card__actions"]}],_buttons:[{type:e.ContentChildren,args:[z,{descendants:!0}]}],_icons:[{type:e.ContentChildren,args:[W,{descendants:!0}]}],fullBleed:[{type:e.HostBinding,args:["class.mdc-card__actions--full-bleed"]},{type:e.Input}]};var Z=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i,r)||this;return o.elm=e,o._cls=!0,o}return k(e,t),e.prototype.ngAfterContentInit=function(){this.elm.nativeElement.hasAttribute("tabindex")||(this.elm.nativeElement.tabIndex=0),this.initRipple()},e.prototype.ngOnDestroy=function(){this.destroyRipple()},e}($);Z.decorators=[{type:e.Directive,args:[{selector:"[mdcCardPrimaryAction]"}]}],Z.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:V},{type:void 0,decorators:[{type:e.Inject,args:[n.DOCUMENT]}]}]},Z.propDecorators={_cls:[{type:e.HostBinding,args:["class.mdc-card__primary-action"]}]};var J=function(){function t(){this._cls=!0,this._outlined=!1}return Object.defineProperty(t.prototype,"outlined",{get:function(){return this._outlined},set:function(t){this._outlined=M(t)},enumerable:!1,configurable:!0}),t}();J.decorators=[{type:e.Directive,args:[{selector:"[mdcCard]"}]}],J.propDecorators={_cls:[{type:e.HostBinding,args:["class.mdc-card"]}],outlined:[{type:e.HostBinding,args:["class.mdc-card--outlined"]},{type:e.Input}]};var tt=[K,G,X,Q,Y,Z,J],et=function(){},nt=function(t){function n(n,i){var r=t.call(this)||this;return r._elm=n,r._cntr=i,r._cls=!0,r.onDestroy$=new s.Subject,r._id=null,r._disabled=!1,r._checked=!1,r._indeterminate=!1,r._checkedChange=new e.EventEmitter,r._indeterminateChange=new e.EventEmitter,r._disabledChange=new e.EventEmitter,r}return k(n,t),n.prototype.ngOnInit=function(){var t,e=this;null===(t=this._cntr)||void 0===t||t.valueChanges.pipe(a.takeUntil(this.onDestroy$)).subscribe((function(t){e.updateValue(t,!0)}))},n.prototype.ngOnDestroy=function(){this.onDestroy$.next(),this.onDestroy$.complete()},Object.defineProperty(n.prototype,"id",{get:function(){return this._id},set:function(t){this._id=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._cntr?!!this._cntr.disabled:this._disabled},set:function(t){var e=M(t);e!=this._disabled&&(this._disabled=M(e),this._disabledChange.emit(e))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"checked",{get:function(){return this._checked},set:function(t){this.updateValue(t,!1)},enumerable:!1,configurable:!0}),n.prototype.updateValue=function(t,e){var n=e?!!t:M(t);n!==this._checked&&(this._checked=n,this._checkedChange.emit(n)),!e&&this._cntr&&n!==this._cntr.value&&this._cntr.control.setValue(n)},Object.defineProperty(n.prototype,"indeterminate",{get:function(){return this._indeterminate},set:function(t){var e=this,n=M(t);n!==this._indeterminate&&(this._indeterminate=n,Promise.resolve().then((function(){return e._indeterminateChange.emit(n)})))},enumerable:!1,configurable:!0}),n.prototype._onChange=function(){this._cntr||(this.checked=this._elm.nativeElement.checked),this.indeterminate=this._elm.nativeElement.indeterminate},n}(et);nt.decorators=[{type:e.Directive,args:[{selector:"input[mdcCheckboxInput][type=checkbox]",providers:[{provide:et,useExisting:e.forwardRef((function(){return nt}))}]}]}],nt.ctorParameters=function(){return[{type:e.ElementRef},{type:o.NgControl,decorators:[{type:e.Optional},{type:e.Self}]}]},nt.propDecorators={_cls:[{type:e.HostBinding,args:["class.mdc-checkbox__native-control"]}],_checkedChange:[{type:e.Output}],_indeterminateChange:[{type:e.Output}],_disabledChange:[{type:e.Output}],id:[{type:e.HostBinding},{type:e.Input}],disabled:[{type:e.HostBinding},{type:e.Input}],checked:[{type:e.HostBinding},{type:e.Input}],indeterminate:[{type:e.HostBinding},{type:e.Input}],_onChange:[{type:e.HostListener,args:["click"]}]};var it=function(t){function e(e,n,i,r){var o=t.call(this,n,e,i,r)||this;return o.root=n,o._cls=!0,o.onDestroy$=new s.Subject,o.onInputChange$=new s.Subject,o.mdcAdapter={addClass:function(t){return o._renderer.addClass(o.root.nativeElement,t)},removeClass:function(t){return o._renderer.removeClass(o.root.nativeElement,t)},setNativeControlAttr:function(t,e){return o._renderer.setAttribute(o._input._elm.nativeElement,t,e)},removeNativeControlAttr:function(t){return o._renderer.removeAttribute(o._input._elm.nativeElement,t)},forceLayout:function(){return o.root.nativeElement.offsetWidth},isAttachedToDOM:function(){return!!o._input},hasNativeControl:function(){return!!o._input},isChecked:function(){return o._input._elm.nativeElement.checked},isIndeterminate:function(){return o._input._elm.nativeElement.indeterminate},setNativeControlDisabled:function(t){return o._input.disabled=t}},o._foundation=null,o.addRippleSurface("mdc-checkbox__ripple"),o}return k(e,t),e.prototype.ngAfterContentInit=function(){var t=this;e.addBackground(this._rippleElm,this._renderer),this.initRipple(!0),this._input&&(this._foundation=new c.MDCCheckboxFoundation(this.mdcAdapter),this._foundation.init()),this._inputs.changes.pipe(a.takeUntil(this.onDestroy$)).subscribe((function(){t.reinitRipple(),t._foundation&&t._foundation.destroy(),t._input?(t._foundation=new c.MDCCheckboxFoundation(t.mdcAdapter),t._foundation.init()):t._foundation=null,t.subscribeInputChanges()})),this.subscribeInputChanges()},e.prototype.ngOnDestroy=function(){this.onInputChange$.next(),this.onInputChange$.complete(),this.onDestroy$.next(),this.onDestroy$.complete(),this._foundation&&(this._foundation.destroy(),this._foundation=null),this.destroyRipple()},e.prototype.subscribeInputChanges=function(){var t,e,n,i=this;this.onInputChange$.next(),null===(t=this._input)||void 0===t||t._indeterminateChange.asObservable().pipe(a.takeUntil(this.onInputChange$)).subscribe((function(){var t;return null===(t=i._foundation)||void 0===t?void 0:t.handleChange()})),null===(e=this._input)||void 0===e||e._checkedChange.asObservable().pipe(a.takeUntil(this.onInputChange$)).subscribe((function(){var t;return null===(t=i._foundation)||void 0===t?void 0:t.handleChange()})),null===(n=this._input)||void 0===n||n._disabledChange.asObservable().pipe(a.takeUntil(this.onInputChange$)).subscribe((function(t){var e;return null===(e=i._foundation)||void 0===e?void 0:e.setDisabled(t)}))},e.addBackground=function(t,e){var n=e.createElement("path","svg");e.addClass(n,"mdc-checkbox__checkmark-path"),e.setAttribute(n,"fill","none"),e.setAttribute(n,"d","M1.73,12.91 8.1,19.28 22.79,4.59");var i=e.createElement("svg","svg");e.appendChild(i,n),e.addClass(i,"mdc-checkbox__checkmark"),e.setAttribute(i,"viewBox","0 0 24 24");var r=e.createElement("div");e.addClass(r,"mdc-checkbox__mixedmark");var o=e.createElement("div");e.appendChild(o,i),e.appendChild(o,r),e.addClass(o,"mdc-checkbox__background"),e.appendChild(t.nativeElement,o)},e.prototype.getRippleInteractionElement=function(){var t;return null===(t=this._input)||void 0===t?void 0:t._elm},e.prototype.onAnimationEnd=function(){var t;null===(t=this._foundation)||void 0===t||t.handleAnimationEnd()},Object.defineProperty(e.prototype,"_input",{get:function(){return this._inputs&&this._inputs.length>0?this._inputs.first:null},enumerable:!1,configurable:!0}),e}($);it.decorators=[{type:e.Directive,args:[{selector:"[mdcCheckbox]"}]}],it.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef},{type:V},{type:void 0,decorators:[{type:e.Inject,args:[n.DOCUMENT]}]}]},it.propDecorators={_cls:[{type:e.HostBinding,args:["class.mdc-checkbox"]}],_inputs:[{type:e.ContentChildren,args:[nt]}],onAnimationEnd:[{type:e.HostListener,args:["animationend"]}]};var rt,ot=[nt,it];
/**
* @license
* Copyright 2020 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/!function(t){t.POLITE="polite",t.ASSERTIVE="assertive"}(rt||(rt={}));var st,at=function(){function t(){this.liveRegions=new Map}return t.getInstance=function(){return t.instance||(t.instance=new t),t.instance},t.prototype.say=function(t,e){void 0===e&&(e=rt.POLITE);var n=this.getLiveRegion(e);function i(){n.textContent="",document.removeEventListener("click",i)}n.textContent="",setTimeout((function(){n.textContent=t,document.addEventListener("click",i)}),1)},t.prototype.getLiveRegion=function(t){var e=this.liveRegions.get(t);if(e&&document.body.contains(e))return e;var n=this.createLiveRegion(t);return this.liveRegions.set(t,n),n},t.prototype.createLiveRegion=function(t){var e=document.createElement("div");return e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",e.style.height="1px",e.style.overflow="hidden",e.setAttribute("aria-atomic","true"),e.setAttribute("aria-live",t),e.setAttribute("data-mdc-dom-announce","true"),document.body.appendChild(e),e},t}();(st=t.ChipEventSource||(t.ChipEventSource={}))[st.primary=0]="primary",st[st.trailing=1]="trailing",st[st.none=2]="none";var ct=function(){function t(t,n,i){this._elm=t,this._rndr=n,this._cdRef=i,this._cls=!0,this._leading=!1,this.interact=new e.EventEmitter,this._trailing=!1,this._originalTabindex=null,this.__tabindex=-1,this.__role=null,this._chip=null,this.__role=t.nativeElement.getAttribute("role");var r=t.nativeElement.getAttribute("tabindex");r&&(this._originalTabindex=+r,this.__tabindex=+r)}return t.prototype.ngOnDestroy=function(){this._chip=null},Object.defineProperty(t.prototype,"_tabindex",{get:function(){return this._trailing?this.__tabindex:this._originalTabindex},set:function(t){this.__tabindex=null==t?-1:t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_role",{get:function(){return this.__role?this.__role:this._trailing?"button":null},enumerable:!1,configurable:!0}),t.prototype._handleClick=function(t){var e;this._chip&&this._trailing&&(null===(e=this._chip._foundation)||void 0===e||e.handleTrailingIconInteraction(t))},t.prototype._handleInteraction=function(t){var e;this._chip&&this._trailing&&(null===(e=this._chip._foundation)||void 0===e||e.handleTrailingIconInteraction(t))},t}();ct.decorators=[{type:e.Directive,args:[{selector:"[mdcChipIcon]"}]}],ct.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:e.ChangeDetectorRef}]},ct.propDecorators={_cls:[{type:e.HostBinding,args:["class.mdc-chip__icon"]}],_leading:[{type:e.HostBinding,args:["class.mdc-chip__icon--leading"]}],interact:[{type:e.Output}],_trailing:[{type:e.HostBinding,args:["class.mdc-chip__icon--trailing"]}],_tabindex:[{type:e.HostBinding,args:["attr.tabindex"]}],_role:[{type:e.HostBinding,args:["attr.role"]}],_handleClick:[{type:e.HostListener,args:["click",["$event"]]}],_handleInteraction:[{type:e.HostListener,args:["keydown",["$event"]]}]};var lt=function(t){this._elm=t,this._cls=!0};lt.decorators=[{type:e.Directive,args:[{selector:"[mdcChipText]"}]}],lt.ctorParameters=function(){return[{type:e.ElementRef}]},lt.propDecorators={_cls:[{type:e.HostBinding,args:["class.mdc-chip__text"]}]};var ut=function(){function t(t){this._elm=t,this._cls=!0,this.__tabindex=-1,this.__role="button",this.__tabindex=+(this._elm.nativeElement.getAttribute("tabindex")||-1)}return Object.defineProperty(t.prototype,"_role",{get:function(){return this.__role},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_tabindex",{get:function(){return this.__tabindex},set:function(t){this.__tabindex=t},enumerable:!1,configurable:!0}),t}();ut.decorators=[{type:e.Directive,args:[{selector:"[mdcChipPrimaryAction]"}]}],ut.ctorParameters=function(){return[{type:e.ElementRef}]},ut.propDecorators={_cls:[{type:e.HostBinding,args:["class.mdc-chip__primary-action"]}],_role:[{type:e.HostBinding,args:["attr.role"]}],_tabindex:[{type:e.HostBinding,args:["attr.tabindex"]}]};var dt=function(t){this._elm=t,this._role="gridcell"};dt.decorators=[{type:e.Directive,args:[{selector:"[mdcChipCell]"}]}],dt.ctorParameters=function(){return[{type:e.ElementRef}]},dt.propDecorators={_role:[{type:e.HostBinding,args:["attr.role"]}]};var pt=function(t){function n(i,r,o,s){var a=t.call(this,i,r,o,s)||this;return a._elm=i,a._cls=!0,a._role="row",a.initialized=!1,a.selectedMem=!1,a.removableMem=!0,a._value=null,a.interact=new e.EventEmitter,a.remove=new e.EventEmitter,a.navigation=new e.EventEmitter,a.selectedChange=new e.EventEmitter,a._selectedForChipSet=new e.EventEmitter,a._notifyRemoval=new e.EventEmitter,a._set=null,a._checkmark=null,a._leadingIcon=null,a._trailingIcon=null,a._adapter={addClass:function(t){var e=a._elm.nativeElement.classList.contains(t);a._renderer.addClass(a._elm.nativeElement,t),e||"mdc-chip--selected"!==t||(a.selectedMem=!0,a.selectedChange.emit(!0))},removeClass:function(t){var e=a._elm.nativeElement.classList.contains(t);a._renderer.removeClass(a._elm.nativeElement,t),e&&"mdc-chip--selected"===t&&(a.selectedMem=!1,a.selectedChange.emit(!1))},hasClass:function(t){return a._elm.nativeElement.classList.contains(t)},addClassToLeadingIcon:function(t){return a._leadingIcon&&a._renderer.addClass(a._leadingIcon._elm.nativeElement,t)},removeClassFromLeadingIcon:function(t){return a._leadingIcon&&a._renderer.removeClass(a._leadingIcon._elm.nativeElement,t)},eventTargetHasClass:function(t,e){return!!t&&t.classList.contains(e)},getAttribute:function(t){return a._elm.nativeElement.getAttribute(t)},notifyInteraction:function(){return a.interact.emit()},notifySelection:function(t,e){e||a._selectedForChipSet.emit(t)},notifyTrailingIconInteraction:function(){return a._trailingIcon.interact.emit()},notifyRemoval:function(t){return a._notifyRemoval.emit({removedAnnouncement:t})},notifyNavigation:function(t,e){return a.navigation.emit({key:t,source:e})},getComputedStyleValue:function(t){return getComputedStyle(a._elm.nativeElement).getPropertyValue(t)},setStyleProperty:function(t,e){return a._renderer.setStyle(a._elm.nativeElement,t,e)},hasLeadingIcon:function(){return!!a._leadingIcon},getRootBoundingClientRect:function(){return a._elm.nativeElement.getBoundingClientRect()},getCheckmarkBoundingClientRect:function(){var t;return(null===(t=a._checkmark)||void 0===t?void 0:t.getBoundingClientRect())||null},setPrimaryActionAttr:function(t,e){return a._primaryAction&&a._renderer.setAttribute(a._primaryAction._elm.nativeElement,t,e)},focusPrimaryAction:function(){var t;return null===(t=a._primaryAction)||void 0===t?void 0:t._elm.nativeElement.focus()},hasTrailingAction:function(){return!!a._trailingIcon},setTrailingActionAttr:function(t,e){return a._trailingIcon&&a._renderer.setAttribute(a._trailingIcon._elm.nativeElement,t,e)},focusTrailingAction:function(){var t;return null===(t=a._trailingIcon)||void 0===t?void 0:t._elm.nativeElement.focus()},isRTL:function(){return"rtl"===getComputedStyle(a._elm.nativeElement).getPropertyValue("direction")}},a._foundation=new l.MDCChipFoundation(a._adapter),a._uniqueValue="mdc-chip-"+n.nextValue++,a}return k(n,t),n.prototype.ngAfterContentInit=function(){var t=this;this.initActions(),this.initIcons(),this._icons.changes.subscribe((function(){return t._reInit()})),this._texts.changes.subscribe((function(){return t._reInit()})),this._primaryActions.changes.subscribe((function(){return t._reInit()})),this._chipCells.changes.subscribe((function(){return t._reInit()})),this.addRippleSurface("mdc-chip__ripple"),this.initCheckMark(),this.initRipple(),this._foundation.init(),this.selectedMem&&(this.selected=this.selectedMem),this.removableMem||this._foundation.setShouldRemoveOnTrailingIconClick(this.removableMem),this.initialized=!0},n.prototype.ngOnDestroy=function(){this.destroyRipple(),this._foundation.destroy()},n.prototype._reInit=function(){this._foundation.destroy(),this._foundation=new l.MDCChipFoundation(this._adapter),this.initActions(),this.initIcons(),this.initCheckMark(),this._foundation.init(),this.removableMem||this._foundation.setShouldRemoveOnTrailingIconClick(this.removableMem)},n.prototype.initActions=function(){if(this._set){var t="button";"choice"===this._set._type?t="radio":"filter"===this._set._type&&(t="checkbox"),this._primaryActions.forEach((function(e){e.__role=t}))}},n.prototype.initIcons=function(){var t=this,e=this.computeLeadingIcon(),n=this.computeTrailingIcon(e);e===this._leadingIcon&&n===this._trailingIcon||(this._leadingIcon=e,this._trailingIcon=n,this._icons.forEach((function(e){e._chip=t;var n=e===t._leadingIcon,i=e===t._trailingIcon,r=n!==e._leading||i!==e._trailing;e._leading=e===t._leadingIcon,e._trailing=e===t._trailingIcon,r&&e._cdRef.detectChanges()})),this.removeCheckMark())},Object.defineProperty(n.prototype,"_text",{get:function(){var t;return null===(t=this._texts)||void 0===t?void 0:t.first},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_primaryAction",{get:function(){var t;return null===(t=this._primaryActions)||void 0===t?void 0:t.first},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"_chipCell",{get:function(){var t;return null===(t=this._chipCells)||void 0===t?void 0:t.first},enumerable:!1,configurable:!0}),n.prototype.computeLeadingIcon=function(){if(this._icons&&this._icons.length>0)for(var t=this._icons.first,e=this.previousElement(t._elm.nativeElement),n=t._elm.nativeElement;;){if(null==e&&null!=n&&n.parentElement!==this._elm.nativeElement&&(e=n.parentElement),null==e)return t;if(this._text&&(e===this._text._elm.nativeElement||e.contains(this._text._elm.nativeElement)))return null;n=e,e=this.previousElement(e)}return null},n.prototype.computeTrailingIcon=function(t){if(this._icons.length>0){var e=this._icons.last;return e===t?null:e}return null},n.prototype.previousElement=function(t){for(var e=t.previousSibling;null!=e&&!(e instanceof Element);)e=e.previousSibling;return e},n.prototype.initCheckMark=function(){this._set&&"filter"===this._set._type?this.addCheckMark():this.removeCheckMark()},n.prototype.addCheckMark=function(){if(!this._checkmark&&this._chipCell){var t=this._renderer.createElement("path","svg");this._renderer.addClass(t,"mdc-chip__checkmark-path"),this._renderer.setAttribute(t,"fill","none"),this._renderer.setAttribute(t,"stroke","black"),this._renderer.setAttribute(t,"d","M1.73,12.91 8.1,19.28 22.79,4.59");var e=this._renderer.createElement("svg","svg");this._renderer.appendChild(e,t),this._renderer.addClass(e,"mdc-chip__checkmark-svg"),this._renderer.setAttribute(e,"viewBox","-2 -3 30 30"),this._checkmark=this._renderer.createElement("div"),this._renderer.appendChild(this._checkmark,e),this._renderer.addClass(this._checkmark,"mdc-chip__checkmark"),this._renderer.insertBefore(this._elm.nativeElement,this._checkmark,this._chipCell._elm.nativeElement)}},n.prototype.removeCheckMark=function(){this._checkmark&&(this._checkmark.parentElement.removeChild(this._checkmark),this._checkmark=null)},Object.defineProperty(n.prototype,"value",{get:function(){return this._value?this._value:this._uniqueValue},set:function(t){this._value=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"selected",{get:function(){return this.initialized?this._foundation.isSelected():this.selectedMem},set:function(t){var e=M(t);this.selectedMem=e,this.initialized&&e!==this._foundation.isSelected()&&this._foundation.setSelected(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"removable",{get:function(){return this.initialized?this._foundation.getShouldRemoveOnTrailingIconClick():this.removableMem},set:function(t){var e=M(t);this.removableMem=e,this.initialized&&e!==this._foundation.getShouldRemoveOnTrailingIconClick()&&this._foundation.setShouldRemoveOnTrailingIconClick(e)},enumerable:!1,configurable:!0}),n.prototype.computeRippleBoundingRect=function(){return this._foundation.getDimensions()},n.prototype._handleInteraction=function(t){var e;null===(e=this._foundation)||void 0===e||e.handleInteraction(t)},n.prototype._handleTransitionEnd=function(t){var e;null===(e=this._foundation)||void 0===e||e.handleTransitionEnd(t)},n.prototype._handleKeydown=function(t){var e,n;null===(e=this._foundation)||void 0===e||e.handleKeydown(t),null===(n=this._foundation)||void 0===n||n.handleInteraction(t)},n.prototype._untabbable=function(){this._primaryAction&&(this._primaryAction._tabindex=-1),this._trailingIcon&&(this._trailingIcon._tabindex=-1)},n.prototype._allowtabbable=function(){var t=!!this._primaryAction&&-1!==this._primaryAction._tabindex;return t&&this._trailingIcon&&(this._trailingIcon._tabindex=-1),t||(t=!!this._trailingIcon&&null!=this._trailingIcon._tabindex&&-1!==this._trailingIcon._tabindex),t},n.prototype._forceTabbable=function(){this._primaryAction?this._primaryAction._tabindex=0:this._trailingIcon&&(this._trailingIcon._tabindex=0)},n}($);pt.nextValue=1,pt.decorators=[{type:e.Directive,args:[{selector:"[mdcChip]"}]}],pt.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:V},{type:void 0,decorators:[{type:e.Inject,args:[n.DOCUMENT]}]}]},pt.propDecorators={_cls:[{type:e.HostBinding,args:["class.mdc-chip"]}],_role:[{type:e.HostBinding,args:["attr.role"]}],interact:[{type:e.Output}],remove:[{type:e.Output}],navigation:[{type:e.Output}],selectedChange:[{type:e.Output}],_selectedForChipSet:[{type:e.Output}],_notifyRemoval:[{type:e.Output}],_icons:[{type:e.ContentChildren,args:[ct,{descendants:!0}]}],_texts:[{type:e.ContentChildren,args:[lt,{descendants:!0}]}],_primaryActions:[{type:e.ContentChildren,args:[ut,{descendants:!0}]}],_chipCells:[{type:e.ContentChildren,args:[dt]}],value:[{type:e.Input}],selected:[{type:e.Input}],removable:[{type:e.HostBinding,args:["class.mdc-chip--deletable"]},{type:e.Input}],_handleInteraction:[{type:e.HostListener,args:["click",["$event"]]}],_handleTransitionEnd:[{type:e.HostListener,args:["transitionend",["$event"]]}],_handleKeydown:[{type:e.HostListener,args:["keydown",["$event"]]}]};var ht=function(){function t(t,e){var n=this;this._elm=t,this.cdRef=e,this._cls=!0,this._role="grid",this._subscriptions=[],this._initialized=!1,this._type="action",this._adapter={hasClass:function(t){return n._elm.nativeElement.classList.contains(t)},removeChipAtIndex:function(t){n.chip(t).remove.emit(),n.cdRef.detectChanges()},selectChipAtIndex:function(t,e,i){var r;null===(r=n.chip(t))||void 0===r||r._foundation.setSelectedFromChipSet(e,i)},getIndexOfChipById:function(t){return n.findChipIndex(t)},focusChipPrimaryActionAtIndex:function(t){var e;return null===(e=n.chip(t))||void 0===e?void 0:e._foundation.focusPrimaryAction()},focusChipTrailingActionAtIndex:function(t){var e;return null===(e=n.chip(t))||void 0===e?void 0:e._foundation.focusTrailingAction()},removeFocusFromChipAtIndex:function(t){var e;return null===(e=n.chip(t))||void 0===e?void 0:e._foundation.removeFocus()},isRTL:function(){return"rtl"===getComputedStyle(n._elm.nativeElement).getPropertyValue("direction")},getChipListCount:function(){return n._chips.length},announceMessage:function(t){return function(t,e){at.getInstance().say(t,e)}(t)}},this._foundation=new l.MDCChipSetFoundation(this._adapter)}return t.prototype.ngAfterContentInit=function(){var t=this;this._chips.changes.subscribe((function(){t.initSubscriptions(),t.initChips(),t.cdRef.detectChanges()})),this.initSubscriptions(),this.initChips(),this._foundation.init(),this._initialized=!0,this.cdRef.detectChanges()},t.prototype.ngOnDestroy=function(){var t;null===(t=this._foundation)||void 0===t||t.destroy(),this._foundation=null,this.destroySubscriptions(),this._initialized=!1},Object.defineProperty(t.prototype,"mdcChipSet",{get:function(){return this._type},set:function(t){t!==this._type&&(this._type="choice"===t||"filter"===t||"input"===t?t:"action",this._initialized&&this.initChips(!0))},enumerable:!1,configurable:!0}),t.prototype.initChips=function(t){var e=this;void 0===t&&(t=!1);var n=!1;this._chips.forEach((function(i){(t||i._set!==e)&&(i._set=e,i._reInit()),n?i._untabbable():n=i._allowtabbable()})),!n&&this._chips.length>0&&this._chips.first._forceTabbable()},t.prototype.destroySubscriptions=function(){try{this._subscriptions.forEach((function(t){return t.unsubscribe()}))}finally{this._subscriptions=[]}},t.prototype.initSubscriptions=function(){var t=this;this.destroySubscriptions(),this._subscriptions=[],this._chips.forEach((function(e){t._subscriptions.push(e.interact.subscribe((function(){return t._foundation.handleChipInteraction({chipId:e.value})}))),t._subscriptions.push(e._selectedForChipSet.subscribe((function(n){return t._foundation.handleChipSelection({chipId:e.value,selected:n,shouldIgnore:!1})}))),t._subscriptions.push(e._notifyRemoval.subscribe((function(n){var i=n.removedAnnouncement;return t._foundation.handleChipRemoval({chipId:e.value,removedAnnouncement:i})}))),t._subscriptions.push(e.navigation.subscribe((function(n){var i=n.key,r=n.source;return t._foundation.handleChipNavigation({chipId:e.value,key:i,source:r})})))}))},t.prototype.chip=function(t){return t<0||t>=this._chips.length?null:this._chips.toArray()[t]},t.prototype.findChipIndex=function(t){return this._chips.toArray().findIndex((function(e){return e.value===t}))},Object.defineProperty(t.prototype,"_choice",{get:function(){return"choice"===this._type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_filter",{get:function(){return"filter"===this._type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_input",{get:function(){return"input"===this._type},enumerable:!1,configurable:!0}),t}();ht.decorators=[{type:e.Directive,args:[{selector:"[mdcChipSet]"}]}],ht.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef}]},ht.propDecorators={_cls:[{type:e.HostBinding,args:["class.mdc-chip-set"]}],_role:[{type:e.HostBinding,args:["attr.role"]}],_chips:[{type:e.ContentChildren,args:[pt,{descendants:!0}]}],mdcChipSet:[{type:e.Input}],_choice:[{type:e.HostBinding,args:["class.mdc-chip-set--choice"]}],_filter:[{type:e.HostBinding,args:["class.mdc-chip-set--filter"]}],_input:[{type:e.HostBinding,args:["class.mdc-chip-set--input"]}]};var ft=[ct,lt,ut,dt,pt,ht],_t=function(){this.priority=null,this._elm=null},mt=function(){},vt=1,yt=function(){function t(){this._id=null,this.cachedId=null,this._idChange=new s.Subject}return t.prototype.initId=function(){this.id=this.id,this._idChange=new s.Subject},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},set:function(t){this._id=t||this._newId(),this._idChange&&this._idChange.next()},enumerable:!1,configurable:!0}),t.prototype._newId=function(){return this.cachedId=this.cachedId||"mdc-u-id-"+vt++,this.cachedId},t.prototype.idChange=function(){return this._idChange.asObservable()},t}();function gt(t,e){e.forEach((function(e){Object.getOwnPropertyNames(e.prototype).forEach((function(n){Object.defineProperty(t.prototype,n,Object.getOwnPropertyDescriptor(e.prototype,n))}))}))}yt.decorators=[{type:e.Directive}],yt.propDecorators={id:[{type:e.HostBinding},{type:e.Input}]};var bt=function(){};bt.decorators=[{type:e.Directive}],gt(bt,[yt]);var Ct=function(t){function e(){var e=t.apply(this,P(arguments))||this;return e._cls=!0,e}return k(e,t),e.prototype.ngOnInit=function(){this.initId()},e}(bt);Ct.decorators=[{type:e.Directive,args:[{selector:"[mdcDialogTitle]"}]}],Ct.propDecorators={_cls:[{type:e.HostBinding,args:["class.mdc-dialog__title"]}]};var Et=function(){};Et.decorators=[{type:e.Directive}],gt(Et,[yt]);var It=function(t){function e(e){var n=t.call(this)||this;return n._elm=e,n._cls=!0,n}return k(e,t),e.prototype.ngOnInit=function(){this.initId()},e}(Et);It.decorators=[{type:e.Directive,args:[{selector:"[mdcDialogContent]"}]}],It.ctorParameters=function(){return[{type:e.ElementRef}]},It.propDecorators={_cls:[{type:e.HostBinding,args:["class.mdc-dialog__content"]}]};var Dt=function(){function t(t){this._rndr=t,this._cls=!0}return t.prototype.ngAfterContentInit=function(){var t=this;this.initButtons(),this._buttons.changes.subscribe((function(){t.initButtons()}))},t.prototype.initButtons=function(){var t=this;this._buttons.forEach((function(e){t._rndr.addClass(e._elm.nativeElement,"mdc-dialog__button")}))},t}();Dt.decorators=[{type:e.Directive,args:[{selector:"[mdcDialogActions]"}]}],Dt.ctorParameters=function(){return[{type:e.Renderer2}]},Dt.propDecorators={_cls:[{type:e.HostBinding,args:["class.mdc-dialog__actions"]}],_buttons:[{type:e.ContentChildren,args:[z,{descendants:!0}]}]};var At=function(t){this._elm=t,this.mdcDialogTrigger=null};At.decorators=[{type:e.Directive,args:[{selector:"[mdcDialogTrigger]"}]}],At.ctorParameters=function(){return[{type:e.ElementRef}]},At.propDecorators={mdcDialogTrigger:[{type:e.Input}]};var xt=function(t){function e(e){var n=t.call(this)||this;return n._elm=e,n.priority=0,n}return k(e,t),e}(_t);xt.decorators=[{type:e.Directive,args:[{selector:"[mdcDialogDefault]",providers:[{provide:_t,useExisting:e.forwardRef((function(){return xt}))}]}]}],xt.ctorParameters=function(){return[{type:e.ElementRef}]};var Ot=function(){function t(){this._cls=!0,this._role="alertdialog",this._modal="true",this._labelledBy=null,this._describedBy=null}return t.prototype.ngAfterContentInit=function(){var t=this;this._titles.changes.subscribe((function(){return t.setAriaLabels()})),this._contents.changes.subscribe((function(){return t.setAriaLabels()})),this.setAriaLabels()},t.prototype.setAriaLabels=function(){var t,e;this._labelledBy=null===(t=this._titles.first)||void 0===t?void 0:t.id,this._describedBy=null===(e=this._contents.first)||void 0===e?void 0:e.id},t}();Ot.decorators=[{type:e.Directive,args:[{selector:"[mdcDialogSurface]"}]}],Ot.propDecorators={_cls:[{type:e.HostBinding,args:["class.mdc-dialog__surface"]}],_role:[{type:e.HostBinding,args:["attr.role"]}],_modal:[{type:e.HostBinding,args:["attr.aria-modal"]}],_labelledBy:[{type:e.HostBinding,args:["attr.aria-labelledby"]}],_describedBy:[{type:e.HostBinding,args:["attr.aria-describedby"]}],_titles:[{type:e.ContentChildren,args:[Ct]}],_contents:[{type:e.ContentChildren,args:[It]}]};var Tt=function(){this._cls=!0};Tt.decorators=[{type:e.Directive,args:[{selector:"[mdcDialogContainer]"}]}],Tt.propDecorators={_cls:[{type:e.HostBinding,args:["class.mdc-dialog__container"]}]};var St=function(){this._cls=!0};St.decorators=[{type:e.Directive,args:[{selector:"[mdcDialogScrim]"}]}],St.propDecorators={_cls:[{type:e.HostBinding,args:["class.mdc-dialog__scrim"]}]};var Rt=function(){function t(t,n,i,o,s){var a=this;this._elm=t,this._rndr=n,this._registry=i,this._focusTrap=o,this._cls=!0,this._surface=null,this.accept=new e.EventEmitter,this.cancel=new e.EventEmitter,this.opening=new e.EventEmitter,this.opened=new e.EventEmitter,this.closing=new e.EventEmitter,this.closed=new e.EventEmitter,this._onDocumentKeydown=function(t){return a.onDocumentKeydown(t)},this.focusTrapHandle=null,this.mdcAdapter={addClass:function(t){return a._rndr.addClass(a._elm.nativeElement,t)},removeClass:function(t){return a._rndr.removeClass(a._elm.nativeElement,t)},addBodyClass:function(t){return a._rndr.addClass(a.document.body,t)},removeBodyClass:function(t){return a._rndr.removeClass(a.document.body,t)},areButtonsStacked:function(){var t,e;return!!(null===(t=a._footers)||void 0===t?void 0:t.first)&&u.util.areTopsMisaligned(null===(e=a._footers.first)||void 0===e?void 0:e._buttons.map((function(t){return t._elm.nativeElement})))},clickDefaultButton:function(){var t,e;return null===(e=null===(t=a._defaultActions)||void 0===t?void 0:t.first)||void 0===e?void 0:e._elm.nativeElement.click()},eventTargetMatches:function(t,e){return!!t&&r.ponyfill.matches(t,e)},getActionFromEvent:function(t){var e=a.closest(t.target,a._triggers.toArray());return(null==e?void 0:e.mdcDialogTrigger)||null},getInitialFocusEl:function(){return null},hasClass:function(t){return t!==u.cssClasses.STACKED&&a._elm.nativeElement.classList.contains(t)},isContentScrollable:function(){var t;return u.util.isScrollable(null===(t=a._content)||void 0===t?void 0:t._elm.nativeElement)},notifyClosed:function(t){a.closed.emit({action:t})},notifyClosing:function(t){a.document.removeEventListener("keydown",a._onDocumentKeydown),a.closing.emit({action:t}),"accept"===t?a.accept.emit():"close"===t&&a.cancel.emit()},notifyOpened:function(){a.opened.emit()},notifyOpening:function(){a.document.addEventListener("keydown",a._onDocumentKeydown),a.opening.emit()},releaseFocus:function(){return a.untrapFocus()},reverseButtons:function(){},trapFocus:function(){return a.trapFocus()}},this.foundation=null,this.document=s}return t.prototype.ngAfterContentInit=function(){this.foundation=new u.MDCDialogFoundation(this.mdcAdapter),this.foundation.init(),this.foundation.setAutoStackButtons(!1)},t.prototype.ngOnDestroy=function(){var t;this.document.removeEventListener("keydown",this._onDocumentKeydown),null===(t=this.foundation)||void 0===t||t.destroy(),this.foundation=null},t.prototype.open=function(){this.foundation.open()},t.prototype.close=function(t){void 0===t&&(t="close"),this.foundation.close(t)},t.prototype.layout=function(){this.foundation.layout()},t.prototype.trapFocus=function(){this.untrapFocus(),this._focusTrap&&(this.focusTrapHandle=this._focusTrap.trapFocus())},t.prototype.untrapFocus=function(){this.focusTrapHandle&&this.focusTrapHandle.active&&(this.focusTrapHandle.untrap(),this.focusTrapHandle=null)},t.prototype.onClick=function(t){var e;null===(e=this.foundation)||void 0===e||e.handleClick(t)},t.prototype.onKeydown=function(t){var e;null===(e=this.foundation)||void 0===e||e.handleKeydown(t)},t.prototype.onDocumentKeydown=function(t){var e;null===(e=this.foundation)||void 0===e||e.handleDocumentKeydown(t)},Object.defineProperty(t.prototype,"_content",{get:function(){return this._contents.first},enumerable:!1,configurable:!0}),t.prototype.closest=function(t,e){for(var n=t;n&&n!==this._elm.nativeElement;){for(var i=0;i!=e.length;++i)if(e[i]._elm.nativeElement===n)return e[i];n=n.parentElement}return null},t}();Rt.decorators=[{type:e.Directive,args:[{selector:"[mdcDialog]",exportAs:"mdcDialog"}]}],Rt.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:V},{type:mt,decorators:[{type:e.Optional},{type:e.Self}]},{type:void 0,decorators:[{type:e.Inject,args:[n.DOCUMENT]}]}]},Rt.propDecorators={_cls:[{type:e.HostBinding,args:["class.mdc-dialog"]}],_surface:[{type:e.ContentChild,args:[Ot]}],_triggers:[{type:e.ContentChildren,args:[At,{descendants:!0}]}],_contents:[{type:e.ContentChildren,args:[It,{descendants:!0}]}],_footers:[{type:e.ContentChildren,args:[Dt,{descendants:!0}]}],_defaultActions:[{type:e.ContentChildren,args:[xt,{descendants:!0}]}],accept:[{type:e.Output}],cancel:[{type:e.Output}],opening:[{type:e.Output}],opened:[{type:e.Output}],closing:[{type:e.Output}],closed:[{type:e.Output}],onClick:[{type:e.HostListener,args:["click",["$event"]]}],onKeydown:[{type:e.HostListener,args:["keydown",["$event"]]}]};var Lt=[Rt,Ct,It,Ot,Tt,Dt,At,xt,St],Bt=function(t){function e(e,n){var i=t.call(this)||this;return i._elm=e,i._cntr=n,i._cls=!0,i._id=null,i._disabled=!1,i}return k(e,t),Object.defineProperty(e.prototy