/** * @license * Copyright Google LLC 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("@angular/cdk/bidi"),require("@angular/cdk"),require("@angular/cdk/coercion"),require("rxjs"),require("@angular/cdk/platform"),require("rxjs/operators"),require("@angular/cdk/a11y"),require("@angular/platform-browser/animations"),require("@angular/cdk/keycodes"),require("@angular/common")):"function"==typeof define&&define.amd?define("@angular/material/core",["exports","@angular/core","@angular/platform-browser","@angular/cdk/bidi","@angular/cdk","@angular/cdk/coercion","rxjs","@angular/cdk/platform","rxjs/operators","@angular/cdk/a11y","@angular/platform-browser/animations","@angular/cdk/keycodes","@angular/common"],e):e((t.ng=t.ng||{},t.ng.material=t.ng.material||{},t.ng.material.core={}),t.ng.core,t.ng.platformBrowser,t.ng.cdk.bidi,t.ng.cdk,t.ng.cdk.coercion,t.rxjs,t.ng.cdk.platform,t.rxjs.operators,t.ng.cdk.a11y,t.ng.platformBrowser.animations,t.ng.cdk.keycodes,t.ng.common)}(this,function(t,e,n,i,r,o,a,s,c,l,p,u,d){"use strict";function h(t,e){function n(){this.constructor=t}T(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function m(){return!0}function f(t){return function(t){function e(){for(var e=[],n=0;n3&&w(e,"mat-multi-line",!0)})}function w(t,e,n){var i=t.nativeElement.classList;n?i.add(e):i.remove(e)}function O(t){window.getComputedStyle(t).getPropertyValue("opacity")}function x(t,e,n){var i=Math.max(Math.abs(t-n.left),Math.abs(t-n.right)),r=Math.max(Math.abs(e-n.top),Math.abs(e-n.bottom));return Math.sqrt(i*i+r*r)}function C(t,e,n){if(n.length){for(var i=e.toArray(),r=n.toArray(),o=0,a=0;an+i?Math.max(0,r-i+e):n}var k,T=function(t,e){return(T=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)},R=function(){return R=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0?n:t},t}(),U=new e.InjectionToken("mat-date-formats");try{k="undefined"!=typeof Intl}catch(t){k=!1}var Y={long:["January","February","March","April","May","June","July","August","September","October","November","December"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],narrow:["J","F","M","A","M","J","J","A","S","O","N","D"]},H=function(t){return String(t+1)},G=I(31,H),B={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},W=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/,q=function(t){function n(e,n){var i=t.call(this)||this;return i.useUtcForDisplay=!0,t.prototype.setLocale.call(i,e),i.useUtcForDisplay=!n.TRIDENT,i._clampDate=n.TRIDENT||n.EDGE,i}return h(n,t),n.prototype.getYear=function(t){return t.getFullYear()},n.prototype.getMonth=function(t){return t.getMonth()},n.prototype.getDate=function(t){return t.getDate()},n.prototype.getDayOfWeek=function(t){return t.getDay()},n.prototype.getMonthNames=function(t){var e=this;if(k){var n=new Intl.DateTimeFormat(this.locale,{month:t,timeZone:"utc"});return I(12,function(t){return e._stripDirectionalityCharacters(e._format(n,new Date(2017,t,1)))})}return Y[t]},n.prototype.getDateNames=function(){var t=this;if(k){var e=new Intl.DateTimeFormat(this.locale,{day:"numeric",timeZone:"utc"});return I(31,function(n){return t._stripDirectionalityCharacters(t._format(e,new Date(2017,0,n+1)))})}return G},n.prototype.getDayOfWeekNames=function(t){var e=this;if(k){var n=new Intl.DateTimeFormat(this.locale,{weekday:t,timeZone:"utc"});return I(7,function(t){return e._stripDirectionalityCharacters(e._format(n,new Date(2017,0,t+1)))})}return B[t]},n.prototype.getYearName=function(t){if(k){var e=new Intl.DateTimeFormat(this.locale,{year:"numeric",timeZone:"utc"});return this._stripDirectionalityCharacters(this._format(e,t))}return String(this.getYear(t))},n.prototype.getFirstDayOfWeek=function(){return 0},n.prototype.getNumDaysInMonth=function(t){return this.getDate(this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+1,0))},n.prototype.clone=function(t){return new Date(t.getTime())},n.prototype.createDate=function(t,e,n){if(e<0||e>11)throw Error('Invalid month index "'+e+'". Month index has to be between 0 and 11.');if(n<1)throw Error('Invalid date "'+n+'". Date has to be greater than 0.');var i=this._createDateWithOverflow(t,e,n);if(i.getMonth()!=e)throw Error('Invalid date "'+n+'" for month with index "'+e+'".');return i},n.prototype.today=function(){return new Date},n.prototype.parse=function(t){return"number"==typeof t?new Date(t):t?new Date(Date.parse(t)):null},n.prototype.format=function(t,e){if(!this.isValid(t))throw Error("NativeDateAdapter: Cannot format invalid date.");if(k){this._clampDate&&(t.getFullYear()<1||t.getFullYear()>9999)&&(t=this.clone(t),t.setFullYear(Math.max(1,Math.min(9999,t.getFullYear())))),e=R({},e,{timeZone:"utc"});var n=new Intl.DateTimeFormat(this.locale,e);return this._stripDirectionalityCharacters(this._format(n,t))}return this._stripDirectionalityCharacters(t.toDateString())},n.prototype.addCalendarYears=function(t,e){return this.addCalendarMonths(t,12*e)},n.prototype.addCalendarMonths=function(t,e){var n=this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+e,this.getDate(t));return this.getMonth(n)!=((this.getMonth(t)+e)%12+12)%12&&(n=this._createDateWithOverflow(this.getYear(n),this.getMonth(n),0)),n},n.prototype.addCalendarDays=function(t,e){return this._createDateWithOverflow(this.getYear(t),this.getMonth(t),this.getDate(t)+e)},n.prototype.toIso8601=function(t){return[t.getUTCFullYear(),this._2digit(t.getUTCMonth()+1),this._2digit(t.getUTCDate())].join("-")},n.prototype.deserialize=function(e){if("string"==typeof e){if(!e)return null;if(W.test(e)){var n=new Date(e);if(this.isValid(n))return n}}return t.prototype.deserialize.call(this,e)},n.prototype.isDateInstance=function(t){return t instanceof Date},n.prototype.isValid=function(t){return!isNaN(t.getTime())},n.prototype.invalid=function(){return new Date(NaN)},n.prototype._createDateWithOverflow=function(t,e,n){var i=new Date(t,e,n);return t>=0&&t<100&&i.setFullYear(this.getYear(i)-1900),i},n.prototype._2digit=function(t){return("00"+t).slice(-2)},n.prototype._stripDirectionalityCharacters=function(t){return t.replace(/[\u200e\u200f]/g,"")},n.prototype._format=function(t,e){var n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.format(n)},n.decorators=[{type:e.Injectable}],n.ctorParameters=function(){return[{type:String,decorators:[{type:e.Optional},{type:e.Inject,args:[F]}]},{type:s.Platform}]},n}(z),J={parse:{dateInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}},Z=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[s.PlatformModule],providers:[{provide:z,useClass:q}]}]}],t}(),K=J,X=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[Z],providers:[{provide:U,useValue:K}]}]}],t}(),$=function(){function t(){}return t.prototype.isErrorState=function(t,e){return!!(t&&t.invalid&&(t.dirty||e&&e.submitted))},t.decorators=[{type:e.Injectable}],t}(),Q=function(){function t(){}return t.prototype.isErrorState=function(t,e){return!!(t&&t.invalid&&(t.touched||e&&e.submitted))},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}(),tt=new e.InjectionToken("MAT_HAMMER_OPTIONS"),et=["longpress","slide","slidestart","slideend","slideright","slideleft"],nt=function(){},it=function(){},rt={on:nt,off:it},ot=function(t){function n(e,n){var i=t.call(this)||this;return i._hammerOptions=e,i.events=et,n&&n._checkHammerIsAvailable(),i}return h(n,t),n.prototype.buildHammer=function(t){var e="undefined"!=typeof window?window.Hammer:null;if(!e)return rt;var n=new e(t,this._hammerOptions||void 0),i=new e.Pan,r=new e.Swipe,o=new e.Press,a=this._createRecognizer(i,{event:"slide",threshold:0},r),s=this._createRecognizer(o,{event:"longpress",time:500});return i.recognizeWith(r),s.recognizeWith(a),n.add([r,o,i,a,s]),n},n.prototype._createRecognizer=function(t,e){for(var n=[],i=2;i{{ label }}',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,inputs:["disabled"],styles:[".mat-optgroup-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup-label[disabled]{cursor:default}[dir=rtl] .mat-optgroup-label{text-align:right}.mat-optgroup-label .mat-icon{margin-right:16px;vertical-align:middle}.mat-optgroup-label .mat-icon svg{vertical-align:top}[dir=rtl] .mat-optgroup-label .mat-icon{margin-left:16px;margin-right:0}"],host:{class:"mat-optgroup",role:"group","[class.mat-optgroup-disabled]":"disabled","[attr.aria-disabled]":"disabled.toString()","[attr.aria-labelledby]":"_labelId"}}]}],n.propDecorators={label:[{type:e.Input}]},n}(Dt),wt=0,Ot=function(){function t(t,e){void 0===e&&(e=!1),this.source=t,this.isUserInput=e}return t}(),xt=new e.InjectionToken("MAT_OPTION_PARENT_COMPONENT"),Ct=function(){function t(t,n,i,r){this._element=t,this._changeDetectorRef=n,this._parent=i,this.group=r,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+wt++,this.onSelectionChange=new e.EventEmitter,this._stateChanges=new a.Subject}return Object.defineProperty(t.prototype,"multiple",{get:function(){return this._parent&&this._parent.multiple},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.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disableRipple",{get:function(){return this._parent&&this._parent.disableRipple},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||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())},t.prototype.deselect=function(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())},t.prototype.focus=function(t,e){var n=this._getHostElement();"function"==typeof n.focus&&n.focus(e)},t.prototype.setActiveStyles=function(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())},t.prototype.setInactiveStyles=function(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())},t.prototype.getLabel=function(){return this.viewValue},t.prototype._handleKeydown=function(t){t.keyCode!==u.ENTER&&t.keyCode!==u.SPACE||u.hasModifierKey(t)||(this._selectViaInteraction(),t.preventDefault())},t.prototype._selectViaInteraction=function(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))},t.prototype._getAriaSelected=function(){return this.selected||!this.multiple&&null},t.prototype._getTabIndex=function(){return this.disabled?"-1":"0"},t.prototype._getHostElement=function(){return this._element.nativeElement},t.prototype.ngAfterViewChecked=function(){if(this._selected){var t=this.viewValue;t!==this._mostRecentViewValue&&(this._mostRecentViewValue=t,this._stateChanges.next())}},t.prototype.ngOnDestroy=function(){this._stateChanges.complete()},t.prototype._emitSelectionChangeEvent=function(t){void 0===t&&(t=!1),this.onSelectionChange.emit(new Ot(this,t))},t.decorators=[{type:e.Component,args:[{selector:"mat-option",exportAs:"matOption",host:{role:"option","[attr.tabindex]":"_getTabIndex()","[class.mat-selected]":"selected","[class.mat-option-multiple]":"multiple","[class.mat-active]":"active","[id]":"id","[attr.aria-selected]":"_getAriaSelected()","[attr.aria-disabled]":"disabled.toString()","[class.mat-option-disabled]":"disabled","(click)":"_selectViaInteraction()","(keydown)":"_handleKeydown($event)",class:"mat-option"},styles:[".mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative;cursor:pointer;outline:0;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center;-webkit-tap-highlight-color:transparent}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}@media (-ms-high-contrast:active){.mat-option{margin:0 1px}.mat-option.mat-active{border:solid 1px currentColor;margin:0}}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option .mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}@media (-ms-high-contrast:active){.mat-option .mat-option-ripple{opacity:.5}}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}"],template:'
',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[xt]}]},{type:Et,decorators:[{type:e.Optional}]}]},t.propDecorators={value:[{type:e.Input}],id:[{type:e.Input}],disabled:[{type:e.Input}],onSelectionChange:[{type:e.Output}]},t}(),Mt=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[yt,d.CommonModule,bt],exports:[Ct,Et],declarations:[Ct,Et]}]}],t}(),kt=new e.InjectionToken("mat-label-global-options");t.VERSION=A,t.AnimationCurves=S,t.AnimationDurations=N,t.MatCommonModule=j,t.MATERIAL_SANITY_CHECKS=L,t.mixinDisabled=f,t.mixinColor=g,t.mixinDisableRipple=y,t.mixinTabIndex=_,t.mixinErrorState=b,t.mixinInitialized=v,t.NativeDateModule=Z,t.MatNativeDateModule=X,t.MAT_DATE_LOCALE_FACTORY=D,t.MAT_DATE_LOCALE=F,t.MAT_DATE_LOCALE_PROVIDER=V,t.DateAdapter=z,t.MAT_DATE_FORMATS=U,t.NativeDateAdapter=q,t.MAT_NATIVE_DATE_FORMATS=J,t.ShowOnDirtyErrorStateMatcher=$,t.ErrorStateMatcher=Q,t.MAT_HAMMER_OPTIONS=tt,t.GestureConfig=ot,t.setLines=E,t.MatLine=at,t.MatLineSetter=st,t.MatLineModule=ct,t.MatOptionModule=Mt,t._countGroupLabelsBeforeOption=C,t._getOptionScrollPosition=M,t.MatOptionSelectionChange=Ot,t.MAT_OPTION_PARENT_COMPONENT=xt,t.MatOption=Ct, t.MatOptgroup=Et,t.MAT_LABEL_GLOBAL_OPTIONS=kt,t.MatRippleModule=yt,t.MAT_RIPPLE_GLOBAL_OPTIONS=ft,t.MatRipple=gt,t.RippleState=lt,t.RippleRef=pt,t.defaultRippleAnimationConfig=ut,t.RippleRenderer=mt,t.MatPseudoCheckboxModule=bt,t.MatPseudoCheckbox=_t,t.JAN=0,t.FEB=1,t.MAR=2,t.APR=3,t.MAY=4,t.JUN=5,t.JUL=6,t.AUG=7,t.SEP=8,t.OCT=9,t.NOV=10,t.DEC=11,t.ɵa1=m,Object.defineProperty(t,"__esModule",{value:!0})}); //# sourceMappingURL=material-core.umd.min.js.map