UNPKG

@angular/material

Version:
11 lines (10 loc) 49.4 kB
/** * @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(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/cdk/a11y"),require("@angular/cdk/overlay"),require("@angular/common"),require("@angular/core"),require("@angular/material/button"),require("@angular/material/dialog"),require("@angular/cdk/keycodes"),require("@angular/material/core"),require("rxjs/operators/take"),require("rxjs/Subject"),require("@angular/cdk/bidi"),require("@angular/cdk/coercion"),require("@angular/cdk/portal"),require("rxjs/operators/filter"),require("rxjs/Subscription"),require("rxjs/observable/merge"),require("@angular/forms"),require("@angular/material/form-field"),require("@angular/material/input"),require("rxjs/observable/of")):"function"==typeof define&&define.amd?define(["exports","@angular/cdk/a11y","@angular/cdk/overlay","@angular/common","@angular/core","@angular/material/button","@angular/material/dialog","@angular/cdk/keycodes","@angular/material/core","rxjs/operators/take","rxjs/Subject","@angular/cdk/bidi","@angular/cdk/coercion","@angular/cdk/portal","rxjs/operators/filter","rxjs/Subscription","rxjs/observable/merge","@angular/forms","@angular/material/form-field","@angular/material/input","rxjs/observable/of"],t):t((e.ng=e.ng||{},e.ng.material=e.ng.material||{},e.ng.material.datepicker=e.ng.material.datepicker||{}),e.ng.cdk.a11y,e.ng.cdk.overlay,e.ng.common,e.ng.core,e.ng.material.button,e.ng.material.dialog,e.ng.cdk.keycodes,e.ng.material.core,e.Rx.operators,e.Rx,e.ng.cdk.bidi,e.ng.cdk.coercion,e.ng.cdk.portal,e.Rx.operators,e.Rx,e.Rx.Observable,e.ng.forms,e.ng.material.formField,e.ng.material.input,e.Rx.Observable)}(this,function(e,t,a,i,r,n,o,s,d,l,c,p,h,u,_,m,g,f,y,b,D){"use strict";function v(e){return Error("MatDatepicker: No provider found for "+e+". You must import one of the following modules at your application root: MatNativeDateModule, MatMomentDateModule, or provide a custom implementation.")}function A(e){return function(){return e.scrollStrategies.reposition()}}var C=function(){function e(){this.changes=new c.Subject,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 20 years",this.nextMultiYearLabel="Next 20 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year"}return e.decorators=[{type:r.Injectable}],e.ctorParameters=function(){return[]},e}(),k=function(){function e(e,t,a,i){this.value=e,this.displayValue=t,this.ariaLabel=a,this.enabled=i}return e}(),w=function(){function e(){this.numCols=7,this.allowDisabledSelection=!1,this.activeCell=0,this.cellAspectRatio=1,this.selectedValueChange=new r.EventEmitter}return e.prototype._cellClicked=function(e){(this.allowDisabledSelection||e.enabled)&&this.selectedValueChange.emit(e.value)},Object.defineProperty(e.prototype,"_firstRowOffset",{get:function(){return this.rows&&this.rows.length&&this.rows[0].length?this.numCols-this.rows[0].length:0},enumerable:!0,configurable:!0}),e.prototype._isActiveCell=function(e,t){var a=e*this.numCols+t;return e&&(a-=this._firstRowOffset),a==this.activeCell},e.decorators=[{type:r.Component,args:[{selector:"[mat-calendar-body]",template:'<tr *ngIf="_firstRowOffset < labelMinRequiredCells" aria-hidden="true"><td class="mat-calendar-body-label" [attr.colspan]="numCols" [style.paddingTop.%]="50 * cellAspectRatio / numCols" [style.paddingBottom.%]="50 * cellAspectRatio / numCols">{{label}}</td></tr><tr *ngFor="let row of rows; let rowIndex = index" role="row"><td *ngIf="rowIndex === 0 && _firstRowOffset" aria-hidden="true" class="mat-calendar-body-label" [attr.colspan]="_firstRowOffset" [style.paddingTop.%]="50 * cellAspectRatio / numCols" [style.paddingBottom.%]="50 * cellAspectRatio / numCols">{{_firstRowOffset >= labelMinRequiredCells ? label : \'\'}}</td><td *ngFor="let item of row; let colIndex = index" role="gridcell" class="mat-calendar-body-cell" [tabindex]="_isActiveCell(rowIndex, colIndex) ? 0 : -1" [class.mat-calendar-body-disabled]="!item.enabled" [class.mat-calendar-body-active]="_isActiveCell(rowIndex, colIndex)" [attr.aria-label]="item.ariaLabel" [attr.aria-disabled]="!item.enabled || null" (click)="_cellClicked(item)" [style.width.%]="100 / numCols" [style.paddingTop.%]="50 * cellAspectRatio / numCols" [style.paddingBottom.%]="50 * cellAspectRatio / numCols"><div class="mat-calendar-body-cell-content" [class.mat-calendar-body-selected]="selectedValue === item.value" [class.mat-calendar-body-today]="todayValue === item.value">{{item.displayValue}}</div></td></tr>',styles:[".mat-calendar-body{min-width:224px}.mat-calendar-body-label{height:0;line-height:0;text-align:left;padding-left:4.71429%;padding-right:4.71429%}.mat-calendar-body-cell{position:relative;height:0;line-height:0;text-align:center;outline:0;cursor:pointer}.mat-calendar-body-disabled{cursor:default}.mat-calendar-body-cell-content{position:absolute;top:5%;left:5%;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px}[dir=rtl] .mat-calendar-body-label{text-align:right}"],host:{class:"mat-calendar-body",role:"grid","attr.aria-readonly":"true"},exportAs:"matCalendarBody",encapsulation:r.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:r.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[]},e.propDecorators={label:[{type:r.Input}],rows:[{type:r.Input}],todayValue:[{type:r.Input}],selectedValue:[{type:r.Input}],labelMinRequiredCells:[{type:r.Input}],numCols:[{type:r.Input}],allowDisabledSelection:[{type:r.Input}],activeCell:[{type:r.Input}],cellAspectRatio:[{type:r.Input}],selectedValueChange:[{type:r.Output}]},e}(),O=function(){function e(e,t,a){if(this._dateAdapter=e,this._dateFormats=t,this._changeDetectorRef=a,this.selectedChange=new r.EventEmitter,this._userSelection=new r.EventEmitter,!this._dateAdapter)throw v("DateAdapter");if(!this._dateFormats)throw v("MAT_DATE_FORMATS");var i=this._dateAdapter.getFirstDayOfWeek(),n=this._dateAdapter.getDayOfWeekNames("narrow"),o=this._dateAdapter.getDayOfWeekNames("long"),s=o.map(function(e,t){return{long:e,narrow:n[t]}});this._weekdays=s.slice(i).concat(s.slice(0,i)),this._activeDate=this._dateAdapter.today()}return Object.defineProperty(e.prototype,"activeDate",{get:function(){return this._activeDate},set:function(e){var t=this._activeDate;this._activeDate=this._getValidDateOrNull(this._dateAdapter.deserialize(e))||this._dateAdapter.today(),this._hasSameMonthAndYear(t,this._activeDate)||this._init()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selected",{get:function(){return this._selected},set:function(e){this._selected=this._getValidDateOrNull(this._dateAdapter.deserialize(e)),this._selectedDate=this._getDateInCurrentMonth(this._selected)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minDate",{get:function(){return this._minDate},set:function(e){this._minDate=this._getValidDateOrNull(this._dateAdapter.deserialize(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxDate",{get:function(){return this._maxDate},set:function(e){this._maxDate=this._getValidDateOrNull(this._dateAdapter.deserialize(e))},enumerable:!0,configurable:!0}),e.prototype.ngAfterContentInit=function(){this._init()},e.prototype._dateSelected=function(e){if(this._selectedDate!=e){var t=this._dateAdapter.getYear(this.activeDate),a=this._dateAdapter.getMonth(this.activeDate),i=this._dateAdapter.createDate(t,a,e);this.selectedChange.emit(i)}this._userSelection.emit()},e.prototype._init=function(){this._selectedDate=this._getDateInCurrentMonth(this.selected),this._todayDate=this._getDateInCurrentMonth(this._dateAdapter.today()),this._monthLabel=this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();var e=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(7+this._dateAdapter.getDayOfWeek(e)-this._dateAdapter.getFirstDayOfWeek())%7,this._createWeekCells(),this._changeDetectorRef.markForCheck()},e.prototype._createWeekCells=function(){var e=this._dateAdapter.getNumDaysInMonth(this.activeDate),t=this._dateAdapter.getDateNames();this._weeks=[[]];for(var a=0,i=this._firstWeekOffset;a<e;a++,i++){7==i&&(this._weeks.push([]),i=0);var r=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),a+1),n=this._shouldEnableDate(r),o=this._dateAdapter.format(r,this._dateFormats.display.dateA11yLabel);this._weeks[this._weeks.length-1].push(new k(a+1,t[a],o,n))}},e.prototype._shouldEnableDate=function(e){return!!e&&(!this.dateFilter||this.dateFilter(e))&&(!this.minDate||this._dateAdapter.compareDate(e,this.minDate)>=0)&&(!this.maxDate||this._dateAdapter.compareDate(e,this.maxDate)<=0)},e.prototype._getDateInCurrentMonth=function(e){return e&&this._hasSameMonthAndYear(e,this.activeDate)?this._dateAdapter.getDate(e):null},e.prototype._hasSameMonthAndYear=function(e,t){return!(!e||!t||this._dateAdapter.getMonth(e)!=this._dateAdapter.getMonth(t)||this._dateAdapter.getYear(e)!=this._dateAdapter.getYear(t))},e.prototype._getValidDateOrNull=function(e){return this._dateAdapter.isDateInstance(e)&&this._dateAdapter.isValid(e)?e:null},e.decorators=[{type:r.Component,args:[{selector:"mat-month-view",template:'<table class="mat-calendar-table"><thead class="mat-calendar-table-header"><tr><th *ngFor="let day of _weekdays" [attr.aria-label]="day.long">{{day.narrow}}</th></tr><tr><th class="mat-calendar-table-header-divider" colspan="7" aria-hidden="true"></th></tr></thead><tbody mat-calendar-body [label]="_monthLabel" [rows]="_weeks" [todayValue]="_todayDate" [selectedValue]="_selectedDate" [labelMinRequiredCells]="3" [activeCell]="_dateAdapter.getDate(activeDate) - 1" (selectedValueChange)="_dateSelected($event)"></tbody></table>',exportAs:"matMonthView",encapsulation:r.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:r.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:d.DateAdapter,decorators:[{type:r.Optional}]},{type:void 0,decorators:[{type:r.Optional},{type:r.Inject,args:[d.MAT_DATE_FORMATS]}]},{type:r.ChangeDetectorRef}]},e.propDecorators={activeDate:[{type:r.Input}],selected:[{type:r.Input}],minDate:[{type:r.Input}],maxDate:[{type:r.Input}],dateFilter:[{type:r.Input}],selectedChange:[{type:r.Output}],_userSelection:[{type:r.Output}]},e}(),x=function(){function e(e,t){if(this._dateAdapter=e,this._changeDetectorRef=t,this.selectedChange=new r.EventEmitter,!this._dateAdapter)throw v("DateAdapter");this._activeDate=this._dateAdapter.today()}return Object.defineProperty(e.prototype,"activeDate",{get:function(){return this._activeDate},set:function(e){var t=this._activeDate;this._activeDate=this._getValidDateOrNull(this._dateAdapter.deserialize(e))||this._dateAdapter.today(),Math.floor(this._dateAdapter.getYear(t)/24)!=Math.floor(this._dateAdapter.getYear(this._activeDate)/24)&&this._init()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selected",{get:function(){return this._selected},set:function(e){this._selected=this._getValidDateOrNull(this._dateAdapter.deserialize(e)),this._selectedYear=this._selected&&this._dateAdapter.getYear(this._selected)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minDate",{get:function(){return this._minDate},set:function(e){this._minDate=this._getValidDateOrNull(this._dateAdapter.deserialize(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxDate",{get:function(){return this._maxDate},set:function(e){this._maxDate=this._getValidDateOrNull(this._dateAdapter.deserialize(e))},enumerable:!0,configurable:!0}),e.prototype.ngAfterContentInit=function(){this._init()},e.prototype._init=function(){var e=this;this._todayYear=this._dateAdapter.getYear(this._dateAdapter.today());var t=this._dateAdapter.getYear(this._activeDate),a=t%24;this._years=[];for(var i=0,r=[];i<24;i++)r.push(t-a+i),4==r.length&&(this._years.push(r.map(function(t){return e._createCellForYear(t)})),r=[]);this._changeDetectorRef.markForCheck()},e.prototype._yearSelected=function(e){var t=this._dateAdapter.getMonth(this.activeDate),a=this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(e,t,1));this.selectedChange.emit(this._dateAdapter.createDate(e,t,Math.min(this._dateAdapter.getDate(this.activeDate),a)))},e.prototype._getActiveCell=function(){return this._dateAdapter.getYear(this.activeDate)%24},e.prototype._createCellForYear=function(e){var t=this._dateAdapter.getYearName(this._dateAdapter.createDate(e,0,1));return new k(e,t,t,this._shouldEnableYear(e))},e.prototype._shouldEnableYear=function(e){if(void 0===e||null===e||this.maxDate&&e>this._dateAdapter.getYear(this.maxDate)||this.minDate&&e<this._dateAdapter.getYear(this.minDate))return!1;if(!this.dateFilter)return!0;for(var t=this._dateAdapter.createDate(e,0,1),a=t;this._dateAdapter.getYear(a)==e;a=this._dateAdapter.addCalendarDays(a,1))if(this.dateFilter(a))return!0;return!1},e.prototype._getValidDateOrNull=function(e){return this._dateAdapter.isDateInstance(e)&&this._dateAdapter.isValid(e)?e:null},e.decorators=[{type:r.Component,args:[{selector:"mat-multi-year-view",template:'<table class="mat-calendar-table"><thead class="mat-calendar-table-header"><tr><th class="mat-calendar-table-header-divider" colspan="4"></th></tr></thead><tbody mat-calendar-body allowDisabledSelection="true" [rows]="_years" [todayValue]="_todayYear" [selectedValue]="_selectedYear" [numCols]="4" [cellAspectRatio]="4 / 7" [activeCell]="_getActiveCell()" (selectedValueChange)="_yearSelected($event)"></tbody></table>',exportAs:"matMultiYearView",encapsulation:r.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:r.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:d.DateAdapter,decorators:[{type:r.Optional}]},{type:r.ChangeDetectorRef}]},e.propDecorators={activeDate:[{type:r.Input}],selected:[{type:r.Input}],minDate:[{type:r.Input}],maxDate:[{type:r.Input}],dateFilter:[{type:r.Input}],selectedChange:[{type:r.Output}]},e}(),M=function(){function e(e,t,a){if(this._dateAdapter=e,this._dateFormats=t,this._changeDetectorRef=a,this.selectedChange=new r.EventEmitter,!this._dateAdapter)throw v("DateAdapter");if(!this._dateFormats)throw v("MAT_DATE_FORMATS");this._activeDate=this._dateAdapter.today()}return Object.defineProperty(e.prototype,"activeDate",{get:function(){return this._activeDate},set:function(e){var t=this._activeDate;this._activeDate=this._getValidDateOrNull(this._dateAdapter.deserialize(e))||this._dateAdapter.today(),this._dateAdapter.getYear(t)!=this._dateAdapter.getYear(this._activeDate)&&this._init()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selected",{get:function(){return this._selected},set:function(e){this._selected=this._getValidDateOrNull(this._dateAdapter.deserialize(e)),this._selectedMonth=this._getMonthInCurrentYear(this._selected)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minDate",{get:function(){return this._minDate},set:function(e){this._minDate=this._getValidDateOrNull(this._dateAdapter.deserialize(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxDate",{get:function(){return this._maxDate},set:function(e){this._maxDate=this._getValidDateOrNull(this._dateAdapter.deserialize(e))},enumerable:!0,configurable:!0}),e.prototype.ngAfterContentInit=function(){this._init()},e.prototype._monthSelected=function(e){var t=this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,1));this.selectedChange.emit(this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,Math.min(this._dateAdapter.getDate(this.activeDate),t)))},e.prototype._init=function(){var e=this;this._selectedMonth=this._getMonthInCurrentYear(this.selected),this._todayMonth=this._getMonthInCurrentYear(this._dateAdapter.today()),this._yearLabel=this._dateAdapter.getYearName(this.activeDate);var t=this._dateAdapter.getMonthNames("short");this._months=[[0,1,2,3],[4,5,6,7],[8,9,10,11]].map(function(a){return a.map(function(a){return e._createCellForMonth(a,t[a])})}),this._changeDetectorRef.markForCheck()},e.prototype._getMonthInCurrentYear=function(e){return e&&this._dateAdapter.getYear(e)==this._dateAdapter.getYear(this.activeDate)?this._dateAdapter.getMonth(e):null},e.prototype._createCellForMonth=function(e,t){var a=this._dateAdapter.format(this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,1),this._dateFormats.display.monthYearA11yLabel);return new k(e,t.toLocaleUpperCase(),a,this._shouldEnableMonth(e))},e.prototype._shouldEnableMonth=function(e){var t=this._dateAdapter.getYear(this.activeDate);if(void 0===e||null===e||this._isYearAndMonthAfterMaxDate(t,e)||this._isYearAndMonthBeforeMinDate(t,e))return!1;if(!this.dateFilter)return!0;for(var a=this._dateAdapter.createDate(t,e,1),i=a;this._dateAdapter.getMonth(i)==e;i=this._dateAdapter.addCalendarDays(i,1))if(this.dateFilter(i))return!0;return!1},e.prototype._isYearAndMonthAfterMaxDate=function(e,t){if(this.maxDate){var a=this._dateAdapter.getYear(this.maxDate),i=this._dateAdapter.getMonth(this.maxDate);return e>a||e===a&&t>i}return!1},e.prototype._isYearAndMonthBeforeMinDate=function(e,t){if(this.minDate){var a=this._dateAdapter.getYear(this.minDate),i=this._dateAdapter.getMonth(this.minDate);return e<a||e===a&&t<i}return!1},e.prototype._getValidDateOrNull=function(e){return this._dateAdapter.isDateInstance(e)&&this._dateAdapter.isValid(e)?e:null},e.decorators=[{type:r.Component,args:[{selector:"mat-year-view",template:'<table class="mat-calendar-table"><thead class="mat-calendar-table-header"><tr><th class="mat-calendar-table-header-divider" colspan="4"></th></tr></thead><tbody mat-calendar-body allowDisabledSelection="true" [label]="_yearLabel" [rows]="_months" [todayValue]="_todayMonth" [selectedValue]="_selectedMonth" [labelMinRequiredCells]="2" [numCols]="4" [cellAspectRatio]="4 / 7" [activeCell]="_dateAdapter.getMonth(activeDate)" (selectedValueChange)="_monthSelected($event)"></tbody></table>',exportAs:"matYearView",encapsulation:r.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:r.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:d.DateAdapter,decorators:[{type:r.Optional}]},{type:void 0,decorators:[{type:r.Optional},{type:r.Inject,args:[d.MAT_DATE_FORMATS]}]},{type:r.ChangeDetectorRef}]},e.propDecorators={activeDate:[{type:r.Input}],selected:[{type:r.Input}],minDate:[{type:r.Input}],maxDate:[{type:r.Input}],dateFilter:[{type:r.Input}],selectedChange:[{type:r.Output}]},e}(),V=function(){function e(e,t,a,i,n,o,s){if(this._elementRef=e,this._intl=t,this._ngZone=a,this._dateAdapter=i,this._dateFormats=n,this._dir=s,this.startView="month",this.selectedChange=new r.EventEmitter,this._userSelection=new r.EventEmitter,!this._dateAdapter)throw v("DateAdapter");if(!this._dateFormats)throw v("MAT_DATE_FORMATS");this._intlChanges=t.changes.subscribe(function(){return o.markForCheck()})}return Object.defineProperty(e.prototype,"startAt",{get:function(){return this._startAt},set:function(e){this._startAt=this._getValidDateOrNull(this._dateAdapter.deserialize(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selected",{get:function(){return this._selected},set:function(e){this._selected=this._getValidDateOrNull(this._dateAdapter.deserialize(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minDate",{get:function(){return this._minDate},set:function(e){this._minDate=this._getValidDateOrNull(this._dateAdapter.deserialize(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxDate",{get:function(){return this._maxDate},set:function(e){this._maxDate=this._getValidDateOrNull(this._dateAdapter.deserialize(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_activeDate",{get:function(){return this._clampedActiveDate},set:function(e){this._clampedActiveDate=this._dateAdapter.clampDate(e,this.minDate,this.maxDate)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_periodButtonText",{get:function(){if("month"==this._currentView)return this._dateAdapter.format(this._activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase();if("year"==this._currentView)return this._dateAdapter.getYearName(this._activeDate);var e=this._dateAdapter.getYear(this._activeDate);return this._dateAdapter.getYearName(this._dateAdapter.createDate(e-e%24,0,1))+" – "+this._dateAdapter.getYearName(this._dateAdapter.createDate(e+24-1-e%24,0,1))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_periodButtonLabel",{get:function(){return"month"==this._currentView?this._intl.switchToMultiYearViewLabel:this._intl.switchToMonthViewLabel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_prevButtonLabel",{get:function(){return{month:this._intl.prevMonthLabel,year:this._intl.prevYearLabel,"multi-year":this._intl.prevMultiYearLabel}[this._currentView]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_nextButtonLabel",{get:function(){return{month:this._intl.nextMonthLabel,year:this._intl.nextYearLabel,"multi-year":this._intl.nextMultiYearLabel}[this._currentView]},enumerable:!0,configurable:!0}),e.prototype.ngAfterContentInit=function(){this._activeDate=this.startAt||this._dateAdapter.today(),this._focusActiveCell(),this._currentView=this.startView},e.prototype.ngOnDestroy=function(){this._intlChanges.unsubscribe()},e.prototype.ngOnChanges=function(e){var t=e.minDate||e.maxDate||e.dateFilter;if(t&&!t.firstChange){var a=this.monthView||this.yearView||this.multiYearView;a&&a._init()}},e.prototype._dateSelected=function(e){this._dateAdapter.sameDate(e,this.selected)||this.selectedChange.emit(e)},e.prototype._userSelected=function(){this._userSelection.emit()},e.prototype._goToDateInView=function(e,t){this._activeDate=e,this._currentView=t},e.prototype._currentPeriodClicked=function(){this._currentView="month"==this._currentView?"multi-year":"month"},e.prototype._previousClicked=function(){this._activeDate="month"==this._currentView?this._dateAdapter.addCalendarMonths(this._activeDate,-1):this._dateAdapter.addCalendarYears(this._activeDate,"year"==this._currentView?-1:-24)},e.prototype._nextClicked=function(){this._activeDate="month"==this._currentView?this._dateAdapter.addCalendarMonths(this._activeDate,1):this._dateAdapter.addCalendarYears(this._activeDate,"year"==this._currentView?1:24)},e.prototype._previousEnabled=function(){return!this.minDate||(!this.minDate||!this._isSameView(this._activeDate,this.minDate))},e.prototype._nextEnabled=function(){return!this.maxDate||!this._isSameView(this._activeDate,this.maxDate)},e.prototype._handleCalendarBodyKeydown=function(e){"month"==this._currentView?this._handleCalendarBodyKeydownInMonthView(e):"year"==this._currentView?this._handleCalendarBodyKeydownInYearView(e):this._handleCalendarBodyKeydownInMultiYearView(e)},e.prototype._focusActiveCell=function(){var e=this;this._ngZone.runOutsideAngular(function(){e._ngZone.onStable.asObservable().pipe(l.take(1)).subscribe(function(){e._elementRef.nativeElement.querySelector(".mat-calendar-body-active").focus()})})},e.prototype._isSameView=function(e,t){return"month"==this._currentView?this._dateAdapter.getYear(e)==this._dateAdapter.getYear(t)&&this._dateAdapter.getMonth(e)==this._dateAdapter.getMonth(t):"year"==this._currentView?this._dateAdapter.getYear(e)==this._dateAdapter.getYear(t):Math.floor(this._dateAdapter.getYear(e)/24)==Math.floor(this._dateAdapter.getYear(t)/24)},e.prototype._handleCalendarBodyKeydownInMonthView=function(e){var t=this._isRtl();switch(e.keyCode){case s.LEFT_ARROW:this._activeDate=this._dateAdapter.addCalendarDays(this._activeDate,t?1:-1);break;case s.RIGHT_ARROW:this._activeDate=this._dateAdapter.addCalendarDays(this._activeDate,t?-1:1);break;case s.UP_ARROW:this._activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case s.DOWN_ARROW:this._activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case s.HOME:this._activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case s.END:this._activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case s.PAGE_UP:this._activeDate=e.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case s.PAGE_DOWN:this._activeDate=e.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case s.ENTER:return void(this.dateFilter&&!this.dateFilter(this._activeDate)||(this._dateSelected(this._activeDate),this._userSelected(),e.preventDefault()));default:return}this._focusActiveCell(),e.preventDefault()},e.prototype._handleCalendarBodyKeydownInYearView=function(e){var t=this._isRtl();switch(e.keyCode){case s.LEFT_ARROW:this._activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,t?1:-1);break;case s.RIGHT_ARROW:this._activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,t?-1:1);break;case s.UP_ARROW:this._activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-4);break;case s.DOWN_ARROW:this._activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,4);break;case s.HOME:this._activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-this._dateAdapter.getMonth(this._activeDate));break;case s.END:this._activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,11-this._dateAdapter.getMonth(this._activeDate));break;case s.PAGE_UP:this._activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?-10:-1);break;case s.PAGE_DOWN:this._activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?10:1);break;case s.ENTER:this._goToDateInView(this._activeDate,"month");break;default:return}this._focusActiveCell(),e.preventDefault()},e.prototype._handleCalendarBodyKeydownInMultiYearView=function(e){switch(e.keyCode){case s.LEFT_ARROW:this._activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-1);break;case s.RIGHT_ARROW:this._activeDate=this._dateAdapter.addCalendarYears(this._activeDate,1);break;case s.UP_ARROW:this._activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-4);break;case s.DOWN_ARROW:this._activeDate=this._dateAdapter.addCalendarYears(this._activeDate,4);break;case s.HOME:this._activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-this._dateAdapter.getYear(this._activeDate)%24);break;case s.END:this._activeDate=this._dateAdapter.addCalendarYears(this._activeDate,24-this._dateAdapter.getYear(this._activeDate)%24-1);break;case s.PAGE_UP:this._activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?-240:-24);break;case s.PAGE_DOWN:this._activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?240:24);break;case s.ENTER:this._goToDateInView(this._activeDate,"year");break;default:return}this._focusActiveCell(),e.preventDefault()},e.prototype._getValidDateOrNull=function(e){return this._dateAdapter.isDateInstance(e)&&this._dateAdapter.isValid(e)?e:null},e.prototype._isRtl=function(){return this._dir&&"rtl"===this._dir.value},e.decorators=[{type:r.Component,args:[{selector:"mat-calendar",template:'<div class="mat-calendar-header"><div class="mat-calendar-controls"><button mat-button class="mat-calendar-period-button" (click)="_currentPeriodClicked()" [attr.aria-label]="_periodButtonLabel">{{_periodButtonText}}<div class="mat-calendar-arrow" [class.mat-calendar-invert]="_currentView != \'month\'"></div></button><div class="mat-calendar-spacer"></div><button mat-icon-button class="mat-calendar-previous-button" [disabled]="!_previousEnabled()" (click)="_previousClicked()" [attr.aria-label]="_prevButtonLabel"></button> <button mat-icon-button class="mat-calendar-next-button" [disabled]="!_nextEnabled()" (click)="_nextClicked()" [attr.aria-label]="_nextButtonLabel"></button></div></div><div class="mat-calendar-content" (keydown)="_handleCalendarBodyKeydown($event)" [ngSwitch]="_currentView" cdkMonitorSubtreeFocus tabindex="-1"><mat-month-view *ngSwitchCase="\'month\'" [activeDate]="_activeDate" [selected]="selected" [dateFilter]="dateFilter" [maxDate]="maxDate" [minDate]="minDate" (selectedChange)="_dateSelected($event)" (_userSelection)="_userSelected()"></mat-month-view><mat-year-view *ngSwitchCase="\'year\'" [activeDate]="_activeDate" [selected]="selected" [dateFilter]="dateFilter" [maxDate]="maxDate" [minDate]="minDate" (selectedChange)="_goToDateInView($event, \'month\')"></mat-year-view><mat-multi-year-view *ngSwitchCase="\'multi-year\'" [activeDate]="_activeDate" [selected]="selected" [dateFilter]="dateFilter" [maxDate]="maxDate" [minDate]="minDate" (selectedChange)="_goToDateInView($event, \'year\')"></mat-multi-year-view></div>',styles:[".mat-calendar{display:block}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:0}.mat-calendar-controls{display:flex;margin:5% calc(33% / 7 - 16px)}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0}.mat-calendar-arrow{display:inline-block;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top-width:5px;border-top-style:solid;margin:0 0 0 5px;vertical-align:middle}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.mat-calendar-next-button,.mat-calendar-previous-button{position:relative}.mat-calendar-next-button::after,.mat-calendar-previous-button::after{top:0;left:0;right:0;bottom:0;position:absolute;content:'';margin:15.5px;border:0 solid currentColor;border-top-width:2px}[dir=rtl] .mat-calendar-next-button,[dir=rtl] .mat-calendar-previous-button{transform:rotate(180deg)}.mat-calendar-previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:'';position:absolute;top:0;left:-8px;right:-8px;height:1px}"],host:{class:"mat-calendar"},exportAs:"matCalendar",encapsulation:r.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:r.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:r.ElementRef},{type:C},{type:r.NgZone},{type:d.DateAdapter,decorators:[{type:r.Optional}]},{type:void 0,decorators:[{type:r.Optional},{type:r.Inject,args:[d.MAT_DATE_FORMATS]}]},{type:r.ChangeDetectorRef},{type:p.Directionality,decorators:[{type:r.Optional}]}]},e.propDecorators={startAt:[{type:r.Input}],startView:[{type:r.Input}],selected:[{type:r.Input}],minDate:[{type:r.Input}],maxDate:[{type:r.Input}],dateFilter:[{type:r.Input}],selectedChange:[{type:r.Output}],_userSelection:[{type:r.Output}],monthView:[{type:r.ViewChild,args:[O]}],yearView:[{type:r.ViewChild,args:[M]}],multiYearView:[{type:r.ViewChild,args:[x]}]},e}(),I=0,R=new r.InjectionToken("mat-datepicker-scroll-strategy"),E={provide:R,deps:[a.Overlay],useFactory:A},P=function(){function e(){}return e.prototype.ngAfterContentInit=function(){this._calendar._focusActiveCell()},e.decorators=[{type:r.Component,args:[{selector:"mat-datepicker-content", template:'<mat-calendar cdkTrapFocus [id]="datepicker.id" [ngClass]="datepicker.panelClass" [startAt]="datepicker.startAt" [startView]="datepicker.startView" [minDate]="datepicker._minDate" [maxDate]="datepicker._maxDate" [dateFilter]="datepicker._dateFilter" [selected]="datepicker._selected" (selectedChange)="datepicker._select($event)" (_userSelection)="datepicker.close()"></mat-calendar>',styles:[".mat-datepicker-content{box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);display:block;border-radius:2px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content-touch{box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-calendar{min-width:250px;min-height:312px;max-width:750px;max-height:788px}@media all and (orientation:landscape){.mat-datepicker-content-touch .mat-calendar{width:64vh;height:80vh}}@media all and (orientation:portrait){.mat-datepicker-content-touch .mat-calendar{width:80vw;height:100vw}}"],host:{class:"mat-datepicker-content","[class.mat-datepicker-content-touch]":"datepicker.touchUi"},exportAs:"matDatepickerContent",encapsulation:r.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:r.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[]},e.propDecorators={_calendar:[{type:r.ViewChild,args:[V]}]},e}(),S=function(){function e(e,t,a,i,n,o,s,d){if(this._dialog=e,this._overlay=t,this._ngZone=a,this._viewContainerRef=i,this._scrollStrategy=n,this._dateAdapter=o,this._dir=s,this._document=d,this.startView="month",this._touchUi=!1,this.selectedChanged=new r.EventEmitter,this.openedStream=new r.EventEmitter,this.closedStream=new r.EventEmitter,this._opened=!1,this.id="mat-datepicker-"+I++,this._validSelected=null,this._focusedElementBeforeOpen=null,this._inputSubscription=m.Subscription.EMPTY,this._disabledChange=new c.Subject,!this._dateAdapter)throw v("DateAdapter")}return Object.defineProperty(e.prototype,"startAt",{get:function(){return this._startAt||(this._datepickerInput?this._datepickerInput.value:null)},set:function(e){this._startAt=this._getValidDateOrNull(this._dateAdapter.deserialize(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"touchUi",{get:function(){return this._touchUi},set:function(e){this._touchUi=h.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return void 0===this._disabled&&this._datepickerInput?this._datepickerInput.disabled:!!this._disabled},set:function(e){var t=h.coerceBooleanProperty(e);t!==this._disabled&&(this._disabled=t,this._disabledChange.next(t))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"opened",{get:function(){return this._opened},set:function(e){e?this.open():this.close()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_selected",{get:function(){return this._validSelected},set:function(e){this._validSelected=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_minDate",{get:function(){return this._datepickerInput&&this._datepickerInput.min},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_maxDate",{get:function(){return this._datepickerInput&&this._datepickerInput.max},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_dateFilter",{get:function(){return this._datepickerInput&&this._datepickerInput._dateFilter},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this.close(),this._inputSubscription.unsubscribe(),this._disabledChange.complete(),this._popupRef&&this._popupRef.dispose()},e.prototype._select=function(e){var t=this._selected;this._selected=e,this._dateAdapter.sameDate(t,this._selected)||this.selectedChanged.emit(e)},e.prototype._registerInput=function(e){var t=this;if(this._datepickerInput)throw Error("A MatDatepicker can only be associated with a single input.");this._datepickerInput=e,this._inputSubscription=this._datepickerInput._valueChange.subscribe(function(e){return t._selected=e})},e.prototype.open=function(){if(!this._opened&&!this.disabled){if(!this._datepickerInput)throw Error("Attempted to open an MatDatepicker with no associated input.");this._document&&(this._focusedElementBeforeOpen=this._document.activeElement),this.touchUi?this._openAsDialog():this._openAsPopup(),this._opened=!0,this.openedStream.emit()}},e.prototype.close=function(){var e=this;if(this._opened){this._popupRef&&this._popupRef.hasAttached()&&this._popupRef.detach(),this._dialogRef&&(this._dialogRef.close(),this._dialogRef=null),this._calendarPortal&&this._calendarPortal.isAttached&&this._calendarPortal.detach();var t=function(){e._opened&&(e._opened=!1,e.closedStream.emit(),e._focusedElementBeforeOpen=null)};this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus?(this._focusedElementBeforeOpen.focus(),setTimeout(t)):t()}},e.prototype._openAsDialog=function(){var e=this;this._dialogRef=this._dialog.open(P,{direction:this._dir?this._dir.value:"ltr",viewContainerRef:this._viewContainerRef,panelClass:"mat-datepicker-dialog"}),this._dialogRef.afterClosed().subscribe(function(){return e.close()}),this._dialogRef.componentInstance.datepicker=this},e.prototype._openAsPopup=function(){var e=this;if(this._calendarPortal||(this._calendarPortal=new u.ComponentPortal(P,this._viewContainerRef)),this._popupRef||this._createPopup(),!this._popupRef.hasAttached()){this._popupRef.attach(this._calendarPortal).instance.datepicker=this,this._ngZone.onStable.asObservable().pipe(l.take(1)).subscribe(function(){e._popupRef.updatePosition()})}},e.prototype._createPopup=function(){var e=this,t=new a.OverlayConfig({positionStrategy:this._createPopupPositionStrategy(),hasBackdrop:!0,backdropClass:"mat-overlay-transparent-backdrop",direction:this._dir?this._dir.value:"ltr",scrollStrategy:this._scrollStrategy(),panelClass:"mat-datepicker-popup"});this._popupRef=this._overlay.create(t),g.merge(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(_.filter(function(e){return e.keyCode===s.ESCAPE}))).subscribe(function(){return e.close()})},e.prototype._createPopupPositionStrategy=function(){var e=this._datepickerInput._getPopupFallbackOffset();return this._overlay.position().connectedTo(this._datepickerInput.getPopupConnectionElementRef(),{originX:"start",originY:"bottom"},{overlayX:"start",overlayY:"top"}).withFallbackPosition({originX:"start",originY:"top"},{overlayX:"start",overlayY:"bottom"},void 0,e).withFallbackPosition({originX:"end",originY:"bottom"},{overlayX:"end",overlayY:"top"}).withFallbackPosition({originX:"end",originY:"top"},{overlayX:"end",overlayY:"bottom"},void 0,e)},e.prototype._getValidDateOrNull=function(e){return this._dateAdapter.isDateInstance(e)&&this._dateAdapter.isValid(e)?e:null},e.decorators=[{type:r.Component,args:[{selector:"mat-datepicker",template:"",exportAs:"matDatepicker",changeDetection:r.ChangeDetectionStrategy.OnPush,encapsulation:r.ViewEncapsulation.None,preserveWhitespaces:!1}]}],e.ctorParameters=function(){return[{type:o.MatDialog},{type:a.Overlay},{type:r.NgZone},{type:r.ViewContainerRef},{type:void 0,decorators:[{type:r.Inject,args:[R]}]},{type:d.DateAdapter,decorators:[{type:r.Optional}]},{type:p.Directionality,decorators:[{type:r.Optional}]},{type:void 0,decorators:[{type:r.Optional},{type:r.Inject,args:[i.DOCUMENT]}]}]},e.propDecorators={startAt:[{type:r.Input}],startView:[{type:r.Input}],touchUi:[{type:r.Input}],disabled:[{type:r.Input}],selectedChanged:[{type:r.Output}],panelClass:[{type:r.Input}],openedStream:[{type:r.Output,args:["opened"]}],closedStream:[{type:r.Output,args:["closed"]}],opened:[{type:r.Input}]},e}(),Y={provide:f.NG_VALUE_ACCESSOR,useExisting:r.forwardRef(function(){return N}),multi:!0},T={provide:f.NG_VALIDATORS,useExisting:r.forwardRef(function(){return N}),multi:!0},F=function(){function e(e,t){this.target=e,this.targetElement=t,this.value=this.target.value}return e}(),N=function(){function e(e,t,a,i){var n=this;if(this._elementRef=e,this._dateAdapter=t,this._dateFormats=a,this._formField=i,this.dateChange=new r.EventEmitter,this.dateInput=new r.EventEmitter,this._valueChange=new r.EventEmitter,this._disabledChange=new r.EventEmitter,this._onTouched=function(){},this._cvaOnChange=function(){},this._validatorOnChange=function(){},this._datepickerSubscription=m.Subscription.EMPTY,this._localeSubscription=m.Subscription.EMPTY,this._parseValidator=function(){return n._lastValueValid?null:{matDatepickerParse:{text:n._elementRef.nativeElement.value}}},this._minValidator=function(e){var t=n._getValidDateOrNull(n._dateAdapter.deserialize(e.value));return!n.min||!t||n._dateAdapter.compareDate(n.min,t)<=0?null:{matDatepickerMin:{min:n.min,actual:t}}},this._maxValidator=function(e){var t=n._getValidDateOrNull(n._dateAdapter.deserialize(e.value));return!n.max||!t||n._dateAdapter.compareDate(n.max,t)>=0?null:{matDatepickerMax:{max:n.max,actual:t}}},this._filterValidator=function(e){var t=n._getValidDateOrNull(n._dateAdapter.deserialize(e.value));return n._dateFilter&&t&&!n._dateFilter(t)?{matDatepickerFilter:!0}:null},this._validator=f.Validators.compose([this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]),this._lastValueValid=!1,!this._dateAdapter)throw v("DateAdapter");if(!this._dateFormats)throw v("MAT_DATE_FORMATS");this._localeSubscription=t.localeChanges.subscribe(function(){n.value=n.value})}return Object.defineProperty(e.prototype,"matDatepicker",{set:function(e){this.registerDatepicker(e)},enumerable:!0,configurable:!0}),e.prototype.registerDatepicker=function(e){e&&(this._datepicker=e,this._datepicker._registerInput(this))},Object.defineProperty(e.prototype,"matDatepickerFilter",{set:function(e){this._dateFilter=e,this._validatorOnChange()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){e=this._dateAdapter.deserialize(e),this._lastValueValid=!e||this._dateAdapter.isValid(e),e=this._getValidDateOrNull(e);var t=this.value;this._value=e,this._elementRef.nativeElement.value=e?this._dateAdapter.format(e,this._dateFormats.display.dateInput):"",this._dateAdapter.sameDate(t,e)||this._valueChange.emit(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},set:function(e){this._min=this._getValidDateOrNull(this._dateAdapter.deserialize(e)),this._validatorOnChange()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},set:function(e){this._max=this._getValidDateOrNull(this._dateAdapter.deserialize(e)),this._validatorOnChange()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return!!this._disabled},set:function(e){var t=h.coerceBooleanProperty(e);this._disabled!==t&&(this._disabled=t,this._disabledChange.emit(t)),t&&this._elementRef.nativeElement.blur()},enumerable:!0,configurable:!0}),e.prototype.ngAfterContentInit=function(){var e=this;this._datepicker&&(this._datepickerSubscription=this._datepicker.selectedChanged.subscribe(function(t){e.value=t,e._cvaOnChange(t),e._onTouched(),e.dateInput.emit(new F(e,e._elementRef.nativeElement)),e.dateChange.emit(new F(e,e._elementRef.nativeElement))}))},e.prototype.ngOnDestroy=function(){this._datepickerSubscription.unsubscribe(),this._localeSubscription.unsubscribe(),this._valueChange.complete(),this._disabledChange.complete()},e.prototype.registerOnValidatorChange=function(e){this._validatorOnChange=e},e.prototype.validate=function(e){return this._validator?this._validator(e):null},e.prototype.getPopupConnectionElementRef=function(){return this._formField?this._formField.underlineRef:this._elementRef},e.prototype._getPopupFallbackOffset=function(){return this._formField?-this._formField._inputContainerRef.nativeElement.clientHeight:0},e.prototype.writeValue=function(e){this.value=e},e.prototype.registerOnChange=function(e){this._cvaOnChange=e},e.prototype.registerOnTouched=function(e){this._onTouched=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype._onKeydown=function(e){e.altKey&&e.keyCode===s.DOWN_ARROW&&(this._datepicker.open(),e.preventDefault())},e.prototype._onInput=function(e){var t=this._dateAdapter.parse(e,this._dateFormats.parse.dateInput);this._lastValueValid=!t||this._dateAdapter.isValid(t),t=this._getValidDateOrNull(t),this._value=t,this._cvaOnChange(t),this._valueChange.emit(t),this.dateInput.emit(new F(this,this._elementRef.nativeElement))},e.prototype._onChange=function(){this.dateChange.emit(new F(this,this._elementRef.nativeElement))},e.prototype._getValidDateOrNull=function(e){return this._dateAdapter.isDateInstance(e)&&this._dateAdapter.isValid(e)?e:null},e.decorators=[{type:r.Directive,args:[{selector:"input[matDatepicker]",providers:[Y,T,{provide:b.MAT_INPUT_VALUE_ACCESSOR,useExisting:e}],host:{"[attr.aria-haspopup]":"true","[attr.aria-owns]":"(_datepicker?.opened && _datepicker.id) || null","[attr.min]":"min ? _dateAdapter.toIso8601(min) : null","[attr.max]":"max ? _dateAdapter.toIso8601(max) : null","[disabled]":"disabled","(input)":"_onInput($event.target.value)","(change)":"_onChange()","(blur)":"_onTouched()","(keydown)":"_onKeydown($event)"},exportAs:"matDatepickerInput"}]}],e.ctorParameters=function(){return[{type:r.ElementRef},{type:d.DateAdapter,decorators:[{type:r.Optional}]},{type:void 0,decorators:[{type:r.Optional},{type:r.Inject,args:[d.MAT_DATE_FORMATS]}]},{type:y.MatFormField,decorators:[{type:r.Optional}]}]},e.propDecorators={matDatepicker:[{type:r.Input}],matDatepickerFilter:[{type:r.Input}],value:[{type:r.Input}],min:[{type:r.Input}],max:[{type:r.Input}],disabled:[{type:r.Input}],dateChange:[{type:r.Output}],dateInput:[{type:r.Output}]},e}(),j=function(){function e(){}return e.decorators=[{type:r.Directive,args:[{selector:"[matDatepickerToggleIcon]"}]}],e.ctorParameters=function(){return[]},e}(),L=function(){function e(e,t){this._intl=e,this._changeDetectorRef=t,this._stateChanges=m.Subscription.EMPTY}return Object.defineProperty(e.prototype,"disabled",{get:function(){return void 0===this._disabled?this.datepicker.disabled:!!this._disabled},set:function(e){this._disabled=h.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(e){e.datepicker&&this._watchStateChanges()},e.prototype.ngOnDestroy=function(){this._stateChanges.unsubscribe()},e.prototype.ngAfterContentInit=function(){this._watchStateChanges()},e.prototype._open=function(e){this.datepicker&&!this.disabled&&(this.datepicker.open(),e.stopPropagation())},e.prototype._watchStateChanges=function(){var e=this,t=this.datepicker?this.datepicker._disabledChange:D.of(),a=this.datepicker&&this.datepicker._datepickerInput?this.datepicker._datepickerInput._disabledChange:D.of(),i=this.datepicker?g.merge(this.datepicker.openedStream,this.datepicker.closedStream):D.of();this._stateChanges.unsubscribe(),this._stateChanges=g.merge(this._intl.changes,t,a,i).subscribe(function(){return e._changeDetectorRef.markForCheck()})},e.decorators=[{type:r.Component,args:[{selector:"mat-datepicker-toggle",template:'<button mat-icon-button type="button" [attr.aria-label]="_intl.openCalendarLabel" [disabled]="disabled" (click)="_open($event)"><svg *ngIf="!_customIcon" class="mat-datepicker-toggle-default-icon" viewBox="0 0 24 24" width="24px" height="24px" fill="currentColor" focusable="false"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"/></svg><ng-content select="[matDatepickerToggleIcon]"></ng-content></button>',styles:[".mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field-suffix .mat-datepicker-toggle-default-icon{width:1em}"],host:{class:"mat-datepicker-toggle","[class.mat-datepicker-toggle-active]":"datepicker && datepicker.opened"},exportAs:"matDatepickerToggle",encapsulation:r.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:r.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:C},{type:r.ChangeDetectorRef}]},e.propDecorators={datepicker:[{type:r.Input,args:["for"]}],disabled:[{type:r.Input}],_customIcon:[{type:r.ContentChild,args:[j]}]},e}(),W=function(){function e(){}return e.decorators=[{type:r.NgModule,args:[{imports:[i.CommonModule,n.MatButtonModule,o.MatDialogModule,a.OverlayModule,t.A11yModule],exports:[V,w,S,P,N,L,j,O,M,x],declarations:[V,w,S,P,N,L,j,O,M,x],providers:[C,E],entryComponents:[P]}]}],e.ctorParameters=function(){return[]},e}();e.MatDatepickerModule=W,e.MatCalendar=V,e.MatCalendarCell=k,e.MatCalendarBody=w,e.MAT_DATEPICKER_SCROLL_STRATEGY=R,e.MAT_DATEPICKER_SCROLL_STRATEGY_PROVIDER_FACTORY=A,e.MAT_DATEPICKER_SCROLL_STRATEGY_PROVIDER=E,e.MatDatepickerContent=P,e.MatDatepicker=S,e.MAT_DATEPICKER_VALUE_ACCESSOR=Y,e.MAT_DATEPICKER_VALIDATORS=T,e.MatDatepickerInputEvent=F,e.MatDatepickerInput=N,e.MatDatepickerIntl=C,e.MatDatepickerToggleIcon=j,e.MatDatepickerToggle=L,e.MatMonthView=O,e.MatYearView=M,e.ɵa31=x,Object.defineProperty(e,"__esModule",{value:!0})}); //# sourceMappingURL=material-datepicker.umd.min.js.map