blob: e08cc6a487439b5b03094c2d8662d2b64c8039fe [file] [log] [blame]
{"version":3,"file":"material-datepicker.umd.min.js","sources":["../../src/material/datepicker/calendar.ts","../../src/material/datepicker/datepicker-animations.ts","../../src/material/datepicker/datepicker.ts","../../src/material/datepicker/datepicker-input.ts","../../src/material/datepicker/datepicker-toggle.ts","../../src/material/datepicker/datepicker-module.ts","../../src/material/datepicker/multi-year-view.ts","../../node_modules/tslib/tslib.es6.js","../../src/material/datepicker/datepicker-errors.ts","../../src/material/datepicker/datepicker-intl.ts","../../src/material/datepicker/calendar-body.ts","../../src/material/datepicker/month-view.ts","../../src/material/datepicker/year-view.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentPortal, ComponentType, Portal} from '@angular/cdk/portal';\nimport {\n AfterContentInit,\n AfterViewChecked,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n Optional,\n Output,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {DateAdapter, MAT_DATE_FORMATS, MatDateFormats} from '@angular/material/core';\nimport {Subject, Subscription} from 'rxjs';\nimport {MatCalendarCellCssClasses} from './calendar-body';\nimport {createMissingDateImplError} from './datepicker-errors';\nimport {MatDatepickerIntl} from './datepicker-intl';\nimport {MatMonthView} from './month-view';\nimport {\n getActiveOffset,\n isSameMultiYearView,\n MatMultiYearView,\n yearsPerPage\n} from './multi-year-view';\nimport {MatYearView} from './year-view';\n\n/**\n * Possible views for the calendar.\n * @docs-private\n */\nexport type MatCalendarView = 'month' | 'year' | 'multi-year';\n\n/** Default header for MatCalendar */\n@Component({\n moduleId: module.id,\n selector: 'mat-calendar-header',\n templateUrl: 'calendar-header.html',\n exportAs: 'matCalendarHeader',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatCalendarHeader<D> {\n constructor(private _intl: MatDatepickerIntl,\n @Inject(forwardRef(() => MatCalendar)) public calendar: MatCalendar<D>,\n @Optional() private _dateAdapter: DateAdapter<D>,\n @Optional() @Inject(MAT_DATE_FORMATS) private _dateFormats: MatDateFormats,\n changeDetectorRef: ChangeDetectorRef) {\n\n this.calendar.stateChanges.subscribe(() => changeDetectorRef.markForCheck());\n }\n\n /** The label for the current calendar view. */\n get periodButtonText(): string {\n if (this.calendar.currentView == 'month') {\n return this._dateAdapter\n .format(this.calendar.activeDate, this._dateFormats.display.monthYearLabel)\n .toLocaleUpperCase();\n }\n if (this.calendar.currentView == 'year') {\n return this._dateAdapter.getYearName(this.calendar.activeDate);\n }\n\n // The offset from the active year to the \"slot\" for the starting year is the\n // *actual* first rendered year in the multi-year view, and the last year is\n // just yearsPerPage - 1 away.\n const activeYear = this._dateAdapter.getYear(this.calendar.activeDate);\n const minYearOfPage = activeYear - getActiveOffset(\n this._dateAdapter, this.calendar.activeDate, this.calendar.minDate, this.calendar.maxDate);\n const maxYearOfPage = minYearOfPage + yearsPerPage - 1;\n return `${minYearOfPage} \\u2013 ${maxYearOfPage}`;\n }\n\n get periodButtonLabel(): string {\n return this.calendar.currentView == 'month' ?\n this._intl.switchToMultiYearViewLabel : this._intl.switchToMonthViewLabel;\n }\n\n /** The label for the previous button. */\n get prevButtonLabel(): string {\n return {\n 'month': this._intl.prevMonthLabel,\n 'year': this._intl.prevYearLabel,\n 'multi-year': this._intl.prevMultiYearLabel\n }[this.calendar.currentView];\n }\n\n /** The label for the next button. */\n get nextButtonLabel(): string {\n return {\n 'month': this._intl.nextMonthLabel,\n 'year': this._intl.nextYearLabel,\n 'multi-year': this._intl.nextMultiYearLabel\n }[this.calendar.currentView];\n }\n\n /** Handles user clicks on the period label. */\n currentPeriodClicked(): void {\n this.calendar.currentView = this.calendar.currentView == 'month' ? 'multi-year' : 'month';\n }\n\n /** Handles user clicks on the previous button. */\n previousClicked(): void {\n this.calendar.activeDate = this.calendar.currentView == 'month' ?\n this._dateAdapter.addCalendarMonths(this.calendar.activeDate, -1) :\n this._dateAdapter.addCalendarYears(\n this.calendar.activeDate, this.calendar.currentView == 'year' ? -1 : -yearsPerPage\n );\n }\n\n /** Handles user clicks on the next button. */\n nextClicked(): void {\n this.calendar.activeDate = this.calendar.currentView == 'month' ?\n this._dateAdapter.addCalendarMonths(this.calendar.activeDate, 1) :\n this._dateAdapter.addCalendarYears(\n this.calendar.activeDate,\n this.calendar.currentView == 'year' ? 1 : yearsPerPage\n );\n }\n\n /** Whether the previous period button is enabled. */\n previousEnabled(): boolean {\n if (!this.calendar.minDate) {\n return true;\n }\n return !this.calendar.minDate ||\n !this._isSameView(this.calendar.activeDate, this.calendar.minDate);\n }\n\n /** Whether the next period button is enabled. */\n nextEnabled(): boolean {\n return !this.calendar.maxDate ||\n !this._isSameView(this.calendar.activeDate, this.calendar.maxDate);\n }\n\n /** Whether the two dates represent the same view in the current view mode (month or year). */\n private _isSameView(date1: D, date2: D): boolean {\n if (this.calendar.currentView == 'month') {\n return this._dateAdapter.getYear(date1) == this._dateAdapter.getYear(date2) &&\n this._dateAdapter.getMonth(date1) == this._dateAdapter.getMonth(date2);\n }\n if (this.calendar.currentView == 'year') {\n return this._dateAdapter.getYear(date1) == this._dateAdapter.getYear(date2);\n }\n // Otherwise we are in 'multi-year' view.\n return isSameMultiYearView(\n this._dateAdapter, date1, date2, this.calendar.minDate, this.calendar.maxDate);\n }\n}\n\n/**\n * A calendar that is used as part of the datepicker.\n * @docs-private\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-calendar',\n templateUrl: 'calendar.html',\n styleUrls: ['calendar.css'],\n host: {\n 'class': 'mat-calendar',\n },\n exportAs: 'matCalendar',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatCalendar<D> implements AfterContentInit, AfterViewChecked, OnDestroy, OnChanges {\n /** An input indicating the type of the header component, if set. */\n @Input() headerComponent: ComponentType<any>;\n\n /** A portal containing the header component type for this calendar. */\n _calendarHeaderPortal: Portal<any>;\n\n private _intlChanges: Subscription;\n\n /**\n * Used for scheduling that focus should be moved to the active cell on the next tick.\n * We need to schedule it, rather than do it immediately, because we have to wait\n * for Angular to re-evaluate the view children.\n */\n private _moveFocusOnNextTick = false;\n\n /** A date representing the period (month or year) to start the calendar in. */\n @Input()\n get startAt(): D | null { return this._startAt; }\n set startAt(value: D | null) {\n this._startAt = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _startAt: D | null;\n\n /** Whether the calendar should be started in month or year view. */\n @Input() startView: MatCalendarView = 'month';\n\n /** The currently selected date. */\n @Input()\n get selected(): D | null { return this._selected; }\n set selected(value: D | null) {\n this._selected = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _selected: D | null;\n\n /** The minimum selectable date. */\n @Input()\n get minDate(): D | null { return this._minDate; }\n set minDate(value: D | null) {\n this._minDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _minDate: D | null;\n\n /** The maximum selectable date. */\n @Input()\n get maxDate(): D | null { return this._maxDate; }\n set maxDate(value: D | null) {\n this._maxDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _maxDate: D | null;\n\n /** Function used to filter which dates are selectable. */\n @Input() dateFilter: (date: D) => boolean;\n\n /** Function that can be used to add custom CSS classes to dates. */\n @Input() dateClass: (date: D) => MatCalendarCellCssClasses;\n\n /** Emits when the currently selected date changes. */\n @Output() readonly selectedChange: EventEmitter<D> = new EventEmitter<D>();\n\n /**\n * Emits the year chosen in multiyear view.\n * This doesn't imply a change on the selected date.\n */\n @Output() readonly yearSelected: EventEmitter<D> = new EventEmitter<D>();\n\n /**\n * Emits the month chosen in year view.\n * This doesn't imply a change on the selected date.\n */\n @Output() readonly monthSelected: EventEmitter<D> = new EventEmitter<D>();\n\n /** Emits when any date is selected. */\n @Output() readonly _userSelection: EventEmitter<void> = new EventEmitter<void>();\n\n /** Reference to the current month view component. */\n @ViewChild(MatMonthView, {static: false}) monthView: MatMonthView<D>;\n\n /** Reference to the current year view component. */\n @ViewChild(MatYearView, {static: false}) yearView: MatYearView<D>;\n\n /** Reference to the current multi-year view component. */\n @ViewChild(MatMultiYearView, {static: false}) multiYearView: MatMultiYearView<D>;\n\n /**\n * The current active date. This determines which time period is shown and which date is\n * highlighted when using keyboard navigation.\n */\n get activeDate(): D { return this._clampedActiveDate; }\n set activeDate(value: D) {\n this._clampedActiveDate = this._dateAdapter.clampDate(value, this.minDate, this.maxDate);\n this.stateChanges.next();\n this._changeDetectorRef.markForCheck();\n }\n private _clampedActiveDate: D;\n\n /** Whether the calendar is in month view. */\n get currentView(): MatCalendarView { return this._currentView; }\n set currentView(value: MatCalendarView) {\n this._currentView = value;\n this._moveFocusOnNextTick = true;\n this._changeDetectorRef.markForCheck();\n }\n private _currentView: MatCalendarView;\n\n /**\n * Emits whenever there is a state change that the header may need to respond to.\n */\n stateChanges = new Subject<void>();\n\n constructor(_intl: MatDatepickerIntl,\n @Optional() private _dateAdapter: DateAdapter<D>,\n @Optional() @Inject(MAT_DATE_FORMATS) private _dateFormats: MatDateFormats,\n private _changeDetectorRef: ChangeDetectorRef) {\n\n if (!this._dateAdapter) {\n throw createMissingDateImplError('DateAdapter');\n }\n\n if (!this._dateFormats) {\n throw createMissingDateImplError('MAT_DATE_FORMATS');\n }\n\n this._intlChanges = _intl.changes.subscribe(() => {\n _changeDetectorRef.markForCheck();\n this.stateChanges.next();\n });\n }\n\n ngAfterContentInit() {\n this._calendarHeaderPortal = new ComponentPortal(this.headerComponent || MatCalendarHeader);\n this.activeDate = this.startAt || this._dateAdapter.today();\n\n // Assign to the private property since we don't want to move focus on init.\n this._currentView = this.startView;\n }\n\n ngAfterViewChecked() {\n if (this._moveFocusOnNextTick) {\n this._moveFocusOnNextTick = false;\n this.focusActiveCell();\n }\n }\n\n ngOnDestroy() {\n this._intlChanges.unsubscribe();\n this.stateChanges.complete();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const change =\n changes['minDate'] || changes['maxDate'] || changes['dateFilter'];\n\n if (change && !change.firstChange) {\n const view = this._getCurrentViewComponent();\n\n if (view) {\n // We need to `detectChanges` manually here, because the `minDate`, `maxDate` etc. are\n // passed down to the view via data bindings which won't be up-to-date when we call `_init`.\n this._changeDetectorRef.detectChanges();\n view._init();\n }\n }\n\n this.stateChanges.next();\n }\n\n focusActiveCell() {\n this._getCurrentViewComponent()._focusActiveCell();\n }\n\n /** Updates today's date after an update of the active date */\n updateTodaysDate() {\n let view = this.currentView == 'month' ? this.monthView :\n (this.currentView == 'year' ? this.yearView : this.multiYearView);\n\n view.ngAfterContentInit();\n }\n\n /** Handles date selection in the month view. */\n _dateSelected(date: D): void {\n if (!this._dateAdapter.sameDate(date, this.selected)) {\n this.selectedChange.emit(date);\n }\n }\n\n /** Handles year selection in the multiyear view. */\n _yearSelectedInMultiYearView(normalizedYear: D) {\n this.yearSelected.emit(normalizedYear);\n }\n\n /** Handles month selection in the year view. */\n _monthSelectedInYearView(normalizedMonth: D) {\n this.monthSelected.emit(normalizedMonth);\n }\n\n _userSelected(): void {\n this._userSelection.emit();\n }\n\n /** Handles year/month selection in the multi-year/year views. */\n _goToDateInView(date: D, view: 'month' | 'year' | 'multi-year'): void {\n this.activeDate = date;\n this.currentView = view;\n }\n\n /**\n * @param obj The object to check.\n * @returns The given object if it is both a date instance and valid, otherwise null.\n */\n private _getValidDateOrNull(obj: any): D | null {\n return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;\n }\n\n /** Returns the component instance that corresponds to the current calendar view. */\n private _getCurrentViewComponent() {\n return this.monthView || this.yearView || this.multiYearView;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {\n animate,\n state,\n style,\n transition,\n trigger,\n AnimationTriggerMetadata,\n} from '@angular/animations';\n\n/**\n * Animations used by the Material datepicker.\n * @docs-private\n */\nexport const matDatepickerAnimations: {\n readonly transformPanel: AnimationTriggerMetadata;\n readonly fadeInCalendar: AnimationTriggerMetadata;\n} = {\n /** Transforms the height of the datepicker's calendar. */\n transformPanel: trigger('transformPanel', [\n state('void', style({\n opacity: 0,\n transform: 'scale(1, 0.8)'\n })),\n transition('void => enter', animate('120ms cubic-bezier(0, 0, 0.2, 1)', style({\n opacity: 1,\n transform: 'scale(1, 1)'\n }))),\n transition('* => void', animate('100ms linear', style({opacity: 0})))\n ]),\n\n /** Fades in the content of the calendar. */\n fadeInCalendar: trigger('fadeInCalendar', [\n state('void', style({opacity: 0})),\n state('enter', style({opacity: 1})),\n\n // TODO(crisbeto): this animation should be removed since it isn't quite on spec, but we\n // need to keep it until #12440 gets in, otherwise the exit animation will look glitchy.\n transition('void => *', animate('120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)'))\n ])\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directionality} from '@angular/cdk/bidi';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {ESCAPE, UP_ARROW} from '@angular/cdk/keycodes';\nimport {\n Overlay,\n OverlayConfig,\n OverlayRef,\n PositionStrategy,\n ScrollStrategy,\n} from '@angular/cdk/overlay';\nimport {ComponentPortal, ComponentType} from '@angular/cdk/portal';\nimport {DOCUMENT} from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n ElementRef,\n EventEmitter,\n Inject,\n InjectionToken,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n ViewChild,\n ViewContainerRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n CanColor,\n CanColorCtor,\n DateAdapter,\n mixinColor,\n ThemePalette,\n} from '@angular/material/core';\nimport {MatDialog, MatDialogRef} from '@angular/material/dialog';\nimport {merge, Subject, Subscription} from 'rxjs';\nimport {filter, take} from 'rxjs/operators';\nimport {MatCalendar} from './calendar';\nimport {matDatepickerAnimations} from './datepicker-animations';\nimport {createMissingDateImplError} from './datepicker-errors';\nimport {MatDatepickerInput} from './datepicker-input';\nimport {MatCalendarCellCssClasses} from './calendar-body';\n\n/** Used to generate a unique ID for each datepicker instance. */\nlet datepickerUid = 0;\n\n/** Injection token that determines the scroll handling while the calendar is open. */\nexport const MAT_DATEPICKER_SCROLL_STRATEGY =\n new InjectionToken<() => ScrollStrategy>('mat-datepicker-scroll-strategy');\n\n/** @docs-private */\nexport function MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy {\n return () => overlay.scrollStrategies.reposition();\n}\n\n/** @docs-private */\nexport const MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER = {\n provide: MAT_DATEPICKER_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY,\n};\n\n// Boilerplate for applying mixins to MatDatepickerContent.\n/** @docs-private */\nclass MatDatepickerContentBase {\n constructor(public _elementRef: ElementRef) { }\n}\nconst _MatDatepickerContentMixinBase: CanColorCtor & typeof MatDatepickerContentBase =\n mixinColor(MatDatepickerContentBase);\n\n/**\n * Component used as the content for the datepicker dialog and popup. We use this instead of using\n * MatCalendar directly as the content so we can control the initial focus. This also gives us a\n * place to put additional features of the popup that are not part of the calendar itself in the\n * future. (e.g. confirmation buttons).\n * @docs-private\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-datepicker-content',\n templateUrl: 'datepicker-content.html',\n styleUrls: ['datepicker-content.css'],\n host: {\n 'class': 'mat-datepicker-content',\n '[@transformPanel]': '\"enter\"',\n '[class.mat-datepicker-content-touch]': 'datepicker.touchUi',\n },\n animations: [\n matDatepickerAnimations.transformPanel,\n matDatepickerAnimations.fadeInCalendar,\n ],\n exportAs: 'matDatepickerContent',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n inputs: ['color'],\n})\nexport class MatDatepickerContent<D> extends _MatDatepickerContentMixinBase\n implements AfterViewInit, CanColor {\n\n /** Reference to the internal calendar component. */\n @ViewChild(MatCalendar, {static: false}) _calendar: MatCalendar<D>;\n\n /** Reference to the datepicker that created the overlay. */\n datepicker: MatDatepicker<D>;\n\n /** Whether the datepicker is above or below the input. */\n _isAbove: boolean;\n\n constructor(elementRef: ElementRef) {\n super(elementRef);\n }\n\n ngAfterViewInit() {\n this._calendar.focusActiveCell();\n }\n}\n\n\n// TODO(mmalerba): We use a component instead of a directive here so the user can use implicit\n// template reference variables (e.g. #d vs #d=\"matDatepicker\"). We can change this to a directive\n// if angular adds support for `exportAs: '$implicit'` on directives.\n/** Component responsible for managing the datepicker popup/dialog. */\n@Component({\n moduleId: module.id,\n selector: 'mat-datepicker',\n template: '',\n exportAs: 'matDatepicker',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatDatepicker<D> implements OnDestroy, CanColor {\n private _scrollStrategy: () => ScrollStrategy;\n\n /** An input indicating the type of the custom header component for the calendar, if set. */\n @Input() calendarHeaderComponent: ComponentType<any>;\n\n /** The date to open the calendar to initially. */\n @Input()\n get startAt(): D | null {\n // If an explicit startAt is set we start there, otherwise we start at whatever the currently\n // selected value is.\n return this._startAt || (this._datepickerInput ? this._datepickerInput.value : null);\n }\n set startAt(value: D | null) {\n this._startAt = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _startAt: D | null;\n\n /** The view that the calendar should start in. */\n @Input() startView: 'month' | 'year' | 'multi-year' = 'month';\n\n /** Color palette to use on the datepicker's calendar. */\n @Input()\n get color(): ThemePalette {\n return this._color ||\n (this._datepickerInput ? this._datepickerInput._getThemePalette() : undefined);\n }\n set color(value: ThemePalette) {\n this._color = value;\n }\n _color: ThemePalette;\n\n /**\n * Whether the calendar UI is in touch mode. In touch mode the calendar opens in a dialog rather\n * than a popup and elements have more padding to allow for bigger touch targets.\n */\n @Input()\n get touchUi(): boolean { return this._touchUi; }\n set touchUi(value: boolean) {\n this._touchUi = coerceBooleanProperty(value);\n }\n private _touchUi = false;\n\n /** Whether the datepicker pop-up should be disabled. */\n @Input()\n get disabled(): boolean {\n return this._disabled === undefined && this._datepickerInput ?\n this._datepickerInput.disabled : !!this._disabled;\n }\n set disabled(value: boolean) {\n const newValue = coerceBooleanProperty(value);\n\n if (newValue !== this._disabled) {\n this._disabled = newValue;\n this._disabledChange.next(newValue);\n }\n }\n private _disabled: boolean;\n\n /**\n * Emits selected year in multiyear view.\n * This doesn't imply a change on the selected date.\n */\n @Output() readonly yearSelected: EventEmitter<D> = new EventEmitter<D>();\n\n /**\n * Emits selected month in year view.\n * This doesn't imply a change on the selected date.\n */\n @Output() readonly monthSelected: EventEmitter<D> = new EventEmitter<D>();\n\n /** Classes to be passed to the date picker panel. Supports the same syntax as `ngClass`. */\n @Input() panelClass: string | string[];\n\n /** Function that can be used to add custom CSS classes to dates. */\n @Input() dateClass: (date: D) => MatCalendarCellCssClasses;\n\n /** Emits when the datepicker has been opened. */\n @Output('opened') openedStream: EventEmitter<void> = new EventEmitter<void>();\n\n /** Emits when the datepicker has been closed. */\n @Output('closed') closedStream: EventEmitter<void> = new EventEmitter<void>();\n\n\n /** Whether the calendar is open. */\n @Input()\n get opened(): boolean { return this._opened; }\n set opened(value: boolean) { value ? this.open() : this.close(); }\n private _opened = false;\n\n /** The id for the datepicker calendar. */\n id: string = `mat-datepicker-${datepickerUid++}`;\n\n /** The currently selected date. */\n get _selected(): D | null { return this._validSelected; }\n set _selected(value: D | null) { this._validSelected = value; }\n private _validSelected: D | null = null;\n\n /** The minimum selectable date. */\n get _minDate(): D | null {\n return this._datepickerInput && this._datepickerInput.min;\n }\n\n /** The maximum selectable date. */\n get _maxDate(): D | null {\n return this._datepickerInput && this._datepickerInput.max;\n }\n\n get _dateFilter(): (date: D | null) => boolean {\n return this._datepickerInput && this._datepickerInput._dateFilter;\n }\n\n /** A reference to the overlay when the calendar is opened as a popup. */\n _popupRef: OverlayRef;\n\n /** A reference to the dialog when the calendar is opened as a dialog. */\n private _dialogRef: MatDialogRef<MatDatepickerContent<D>> | null;\n\n /** A portal containing the calendar for this datepicker. */\n private _calendarPortal: ComponentPortal<MatDatepickerContent<D>>;\n\n /** Reference to the component instantiated in popup mode. */\n private _popupComponentRef: ComponentRef<MatDatepickerContent<D>> | null;\n\n /** The element that was focused before the datepicker was opened. */\n private _focusedElementBeforeOpen: HTMLElement | null = null;\n\n /** Subscription to value changes in the associated input element. */\n private _inputSubscription = Subscription.EMPTY;\n\n /** The input element this datepicker is associated with. */\n _datepickerInput: MatDatepickerInput<D>;\n\n /** Emits when the datepicker is disabled. */\n readonly _disabledChange = new Subject<boolean>();\n\n /** Emits new selected date when selected date changes. */\n readonly _selectedChanged = new Subject<D>();\n\n constructor(private _dialog: MatDialog,\n private _overlay: Overlay,\n private _ngZone: NgZone,\n private _viewContainerRef: ViewContainerRef,\n @Inject(MAT_DATEPICKER_SCROLL_STRATEGY) scrollStrategy: any,\n @Optional() private _dateAdapter: DateAdapter<D>,\n @Optional() private _dir: Directionality,\n @Optional() @Inject(DOCUMENT) private _document: any) {\n if (!this._dateAdapter) {\n throw createMissingDateImplError('DateAdapter');\n }\n\n this._scrollStrategy = scrollStrategy;\n }\n\n ngOnDestroy() {\n this.close();\n this._inputSubscription.unsubscribe();\n this._disabledChange.complete();\n\n if (this._popupRef) {\n this._popupRef.dispose();\n this._popupComponentRef = null;\n }\n }\n\n /** Selects the given date */\n select(date: D): void {\n let oldValue = this._selected;\n this._selected = date;\n if (!this._dateAdapter.sameDate(oldValue, this._selected)) {\n this._selectedChanged.next(date);\n }\n }\n\n /** Emits the selected year in multiyear view */\n _selectYear(normalizedYear: D): void {\n this.yearSelected.emit(normalizedYear);\n }\n\n /** Emits selected month in year view */\n _selectMonth(normalizedMonth: D): void {\n this.monthSelected.emit(normalizedMonth);\n }\n\n /**\n * Register an input with this datepicker.\n * @param input The datepicker input to register with this datepicker.\n */\n _registerInput(input: MatDatepickerInput<D>): void {\n if (this._datepickerInput) {\n throw Error('A MatDatepicker can only be associated with a single input.');\n }\n this._datepickerInput = input;\n this._inputSubscription =\n this._datepickerInput._valueChange.subscribe((value: D | null) => this._selected = value);\n }\n\n /** Open the calendar. */\n open(): void {\n if (this._opened || this.disabled) {\n return;\n }\n if (!this._datepickerInput) {\n throw Error('Attempted to open an MatDatepicker with no associated input.');\n }\n if (this._document) {\n this._focusedElementBeforeOpen = this._document.activeElement;\n }\n\n this.touchUi ? this._openAsDialog() : this._openAsPopup();\n this._opened = true;\n this.openedStream.emit();\n }\n\n /** Close the calendar. */\n close(): void {\n if (!this._opened) {\n return;\n }\n if (this._popupRef && this._popupRef.hasAttached()) {\n this._popupRef.detach();\n }\n if (this._dialogRef) {\n this._dialogRef.close();\n this._dialogRef = null;\n }\n if (this._calendarPortal && this._calendarPortal.isAttached) {\n this._calendarPortal.detach();\n }\n\n const completeClose = () => {\n // The `_opened` could've been reset already if\n // we got two events in quick succession.\n if (this._opened) {\n this._opened = false;\n this.closedStream.emit();\n this._focusedElementBeforeOpen = null;\n }\n };\n\n if (this._focusedElementBeforeOpen &&\n typeof this._focusedElementBeforeOpen.focus === 'function') {\n // Because IE moves focus asynchronously, we can't count on it being restored before we've\n // marked the datepicker as closed. If the event fires out of sequence and the element that\n // we're refocusing opens the datepicker on focus, the user could be stuck with not being\n // able to close the calendar at all. We work around it by making the logic, that marks\n // the datepicker as closed, async as well.\n this._focusedElementBeforeOpen.focus();\n setTimeout(completeClose);\n } else {\n completeClose();\n }\n }\n\n /** Open the calendar as a dialog. */\n private _openAsDialog(): void {\n // Usually this would be handled by `open` which ensures that we can only have one overlay\n // open at a time, however since we reset the variables in async handlers some overlays\n // may slip through if the user opens and closes multiple times in quick succession (e.g.\n // by holding down the enter key).\n if (this._dialogRef) {\n this._dialogRef.close();\n }\n\n this._dialogRef = this._dialog.open<MatDatepickerContent<D>>(MatDatepickerContent, {\n direction: this._dir ? this._dir.value : 'ltr',\n viewContainerRef: this._viewContainerRef,\n panelClass: 'mat-datepicker-dialog',\n });\n\n this._dialogRef.afterClosed().subscribe(() => this.close());\n this._dialogRef.componentInstance.datepicker = this;\n this._setColor();\n }\n\n /** Open the calendar as a popup. */\n private _openAsPopup(): void {\n if (!this._calendarPortal) {\n this._calendarPortal = new ComponentPortal<MatDatepickerContent<D>>(MatDatepickerContent,\n this._viewContainerRef);\n }\n\n if (!this._popupRef) {\n this._createPopup();\n }\n\n if (!this._popupRef.hasAttached()) {\n this._popupComponentRef = this._popupRef.attach(this._calendarPortal);\n this._popupComponentRef.instance.datepicker = this;\n this._setColor();\n\n // Update the position once the calendar has rendered.\n this._ngZone.onStable.asObservable().pipe(take(1)).subscribe(() => {\n this._popupRef.updatePosition();\n });\n }\n }\n\n /** Create the popup. */\n private _createPopup(): void {\n const overlayConfig = new OverlayConfig({\n positionStrategy: this._createPopupPositionStrategy(),\n hasBackdrop: true,\n backdropClass: 'mat-overlay-transparent-backdrop',\n direction: this._dir,\n scrollStrategy: this._scrollStrategy(),\n panelClass: 'mat-datepicker-popup',\n });\n\n this._popupRef = this._overlay.create(overlayConfig);\n this._popupRef.overlayElement.setAttribute('role', 'dialog');\n\n merge(\n this._popupRef.backdropClick(),\n this._popupRef.detachments(),\n this._popupRef.keydownEvents().pipe(filter(event => {\n // Closing on alt + up is only valid when there's an input associated with the datepicker.\n return event.keyCode === ESCAPE ||\n (this._datepickerInput && event.altKey && event.keyCode === UP_ARROW);\n }))\n ).subscribe(event => {\n if (event) {\n event.preventDefault();\n }\n\n this.close();\n });\n }\n\n /** Create the popup PositionStrategy. */\n private _createPopupPositionStrategy(): PositionStrategy {\n return this._overlay.position()\n .flexibleConnectedTo(this._datepickerInput.getConnectedOverlayOrigin())\n .withTransformOriginOn('.mat-datepicker-content')\n .withFlexibleDimensions(false)\n .withViewportMargin(8)\n .withLockedPosition()\n .withPositions([\n {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top'\n },\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom'\n },\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top'\n },\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom'\n }\n ]);\n }\n\n /**\n * @param obj The object to check.\n * @returns The given object if it is both a date instance and valid, otherwise null.\n */\n private _getValidDateOrNull(obj: any): D | null {\n return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;\n }\n\n /** Passes the current theme color along to the calendar overlay. */\n private _setColor(): void {\n const color = this.color;\n if (this._popupComponentRef) {\n this._popupComponentRef.instance.color = color;\n }\n if (this._dialogRef) {\n this._dialogRef.componentInstance.color = color;\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {DOWN_ARROW} from '@angular/cdk/keycodes';\nimport {\n Directive,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n OnDestroy,\n Optional,\n Output,\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n ValidatorFn,\n Validators,\n} from '@angular/forms';\nimport {DateAdapter, MAT_DATE_FORMATS, MatDateFormats, ThemePalette} from '@angular/material/core';\nimport {MatFormField} from '@angular/material/form-field';\nimport {MAT_INPUT_VALUE_ACCESSOR} from '@angular/material/input';\nimport {Subscription} from 'rxjs';\nimport {MatDatepicker} from './datepicker';\nimport {createMissingDateImplError} from './datepicker-errors';\n\n/** @docs-private */\nexport const MAT_DATEPICKER_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatDatepickerInput),\n multi: true\n};\n\n/** @docs-private */\nexport const MAT_DATEPICKER_VALIDATORS: any = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MatDatepickerInput),\n multi: true\n};\n\n\n/**\n * An event used for datepicker input and change events. We don't always have access to a native\n * input or change event because the event may have been triggered by the user clicking on the\n * calendar popup. For consistency, we always use MatDatepickerInputEvent instead.\n */\nexport class MatDatepickerInputEvent<D> {\n /** The new value for the target datepicker input. */\n value: D | null;\n\n constructor(\n /** Reference to the datepicker input component that emitted the event. */\n public target: MatDatepickerInput<D>,\n /** Reference to the native input element associated with the datepicker input. */\n public targetElement: HTMLElement) {\n this.value = this.target.value;\n }\n}\n\n\n/** Directive used to connect an input to a MatDatepicker. */\n@Directive({\n selector: 'input[matDatepicker]',\n providers: [\n MAT_DATEPICKER_VALUE_ACCESSOR,\n MAT_DATEPICKER_VALIDATORS,\n {provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: MatDatepickerInput},\n ],\n host: {\n 'aria-haspopup': 'dialog',\n '[attr.aria-owns]': '(_datepicker?.opened && _datepicker.id) || null',\n '[attr.min]': 'min ? _dateAdapter.toIso8601(min) : null',\n '[attr.max]': 'max ? _dateAdapter.toIso8601(max) : null',\n '[disabled]': 'disabled',\n '(input)': '_onInput($event.target.value)',\n '(change)': '_onChange()',\n '(blur)': '_onBlur()',\n '(keydown)': '_onKeydown($event)',\n },\n exportAs: 'matDatepickerInput',\n})\nexport class MatDatepickerInput<D> implements ControlValueAccessor, OnDestroy, Validator {\n /** The datepicker that this input is associated with. */\n @Input()\n set matDatepicker(value: MatDatepicker<D>) {\n if (!value) {\n return;\n }\n\n this._datepicker = value;\n this._datepicker._registerInput(this);\n this._datepickerSubscription.unsubscribe();\n\n this._datepickerSubscription = this._datepicker._selectedChanged.subscribe((selected: D) => {\n this.value = selected;\n this._cvaOnChange(selected);\n this._onTouched();\n this.dateInput.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));\n this.dateChange.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));\n });\n }\n _datepicker: MatDatepicker<D>;\n\n /** Function that can be used to filter out dates within the datepicker. */\n @Input()\n set matDatepickerFilter(value: (date: D | null) => boolean) {\n this._dateFilter = value;\n this._validatorOnChange();\n }\n _dateFilter: (date: D | null) => boolean;\n\n /** The value of the input. */\n @Input()\n get value(): D | null { return this._value; }\n set value(value: D | null) {\n value = this._dateAdapter.deserialize(value);\n this._lastValueValid = !value || this._dateAdapter.isValid(value);\n value = this._getValidDateOrNull(value);\n const oldDate = this.value;\n this._value = value;\n this._formatValue(value);\n\n if (!this._dateAdapter.sameDate(oldDate, value)) {\n this._valueChange.emit(value);\n }\n }\n private _value: D | null;\n\n /** The minimum valid date. */\n @Input()\n get min(): D | null { return this._min; }\n set min(value: D | null) {\n this._min = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n this._validatorOnChange();\n }\n private _min: D | null;\n\n /** The maximum valid date. */\n @Input()\n get max(): D | null { return this._max; }\n set max(value: D | null) {\n this._max = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n this._validatorOnChange();\n }\n private _max: D | null;\n\n /** Whether the datepicker-input is disabled. */\n @Input()\n get disabled(): boolean { return !!this._disabled; }\n set disabled(value: boolean) {\n const newValue = coerceBooleanProperty(value);\n const element = this._elementRef.nativeElement;\n\n if (this._disabled !== newValue) {\n this._disabled = newValue;\n this._disabledChange.emit(newValue);\n }\n\n // We need to null check the `blur` method, because it's undefined during SSR.\n if (newValue && element.blur) {\n // Normally, native input elements automatically blur if they turn disabled. This behavior\n // is problematic, because it would mean that it triggers another change detection cycle,\n // which then causes a changed after checked error if the input element was focused before.\n element.blur();\n }\n }\n private _disabled: boolean;\n\n /** Emits when a `change` event is fired on this `<input>`. */\n @Output() readonly dateChange: EventEmitter<MatDatepickerInputEvent<D>> =\n new EventEmitter<MatDatepickerInputEvent<D>>();\n\n /** Emits when an `input` event is fired on this `<input>`. */\n @Output() readonly dateInput: EventEmitter<MatDatepickerInputEvent<D>> =\n new EventEmitter<MatDatepickerInputEvent<D>>();\n\n /** Emits when the value changes (either due to user input or programmatic change). */\n _valueChange = new EventEmitter<D | null>();\n\n /** Emits when the disabled state has changed */\n _disabledChange = new EventEmitter<boolean>();\n\n _onTouched = () => {};\n\n private _cvaOnChange: (value: any) => void = () => {};\n\n private _validatorOnChange = () => {};\n\n private _datepickerSubscription = Subscription.EMPTY;\n\n private _localeSubscription = Subscription.EMPTY;\n\n /** The form control validator for whether the input parses. */\n private _parseValidator: ValidatorFn = (): ValidationErrors | null => {\n return this._lastValueValid ?\n null : {'matDatepickerParse': {'text': this._elementRef.nativeElement.value}};\n }\n\n /** The form control validator for the min date. */\n private _minValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {\n const controlValue = this._getValidDateOrNull(this._dateAdapter.deserialize(control.value));\n return (!this.min || !controlValue ||\n this._dateAdapter.compareDate(this.min, controlValue) <= 0) ?\n null : {'matDatepickerMin': {'min': this.min, 'actual': controlValue}};\n }\n\n /** The form control validator for the max date. */\n private _maxValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {\n const controlValue = this._getValidDateOrNull(this._dateAdapter.deserialize(control.value));\n return (!this.max || !controlValue ||\n this._dateAdapter.compareDate(this.max, controlValue) >= 0) ?\n null : {'matDatepickerMax': {'max': this.max, 'actual': controlValue}};\n }\n\n /** The form control validator for the date filter. */\n private _filterValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {\n const controlValue = this._getValidDateOrNull(this._dateAdapter.deserialize(control.value));\n return !this._dateFilter || !controlValue || this._dateFilter(controlValue) ?\n null : {'matDatepickerFilter': true};\n }\n\n /** The combined form control validator for this input. */\n private _validator: ValidatorFn | null =\n Validators.compose(\n [this._parseValidator, this._minValidator, this._maxValidator, this._filterValidator]);\n\n /** Whether the last value set on the input was valid. */\n private _lastValueValid = false;\n\n constructor(\n private _elementRef: ElementRef<HTMLInputElement>,\n @Optional() public _dateAdapter: DateAdapter<D>,\n @Optional() @Inject(MAT_DATE_FORMATS) private _dateFormats: MatDateFormats,\n @Optional() private _formField: MatFormField) {\n if (!this._dateAdapter) {\n throw createMissingDateImplError('DateAdapter');\n }\n if (!this._dateFormats) {\n throw createMissingDateImplError('MAT_DATE_FORMATS');\n }\n\n // Update the displayed date when the locale changes.\n this._localeSubscription = _dateAdapter.localeChanges.subscribe(() => {\n this.value = this.value;\n });\n }\n\n ngOnDestroy() {\n this._datepickerSubscription.unsubscribe();\n this._localeSubscription.unsubscribe();\n this._valueChange.complete();\n this._disabledChange.complete();\n }\n\n /** @docs-private */\n registerOnValidatorChange(fn: () => void): void {\n this._validatorOnChange = fn;\n }\n\n /** @docs-private */\n validate(c: AbstractControl): ValidationErrors | null {\n return this._validator ? this._validator(c) : null;\n }\n\n /**\n * @deprecated\n * @breaking-change 8.0.0 Use `getConnectedOverlayOrigin` instead\n */\n getPopupConnectionElementRef(): ElementRef {\n return this.getConnectedOverlayOrigin();\n }\n\n /**\n * Gets the element that the datepicker popup should be connected to.\n * @return The element to connect the popup to.\n */\n getConnectedOverlayOrigin(): ElementRef {\n return this._formField ? this._formField.getConnectedOverlayOrigin() : this._elementRef;\n }\n\n // Implemented as part of ControlValueAccessor.\n writeValue(value: D): void {\n this.value = value;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn: (value: any) => void): void {\n this._cvaOnChange = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n _onKeydown(event: KeyboardEvent) {\n const isAltDownArrow = event.altKey && event.keyCode === DOWN_ARROW;\n\n if (this._datepicker && isAltDownArrow && !this._elementRef.nativeElement.readOnly) {\n this._datepicker.open();\n event.preventDefault();\n }\n }\n\n _onInput(value: string) {\n let date = this._dateAdapter.parse(value, this._dateFormats.parse.dateInput);\n this._lastValueValid = !date || this._dateAdapter.isValid(date);\n date = this._getValidDateOrNull(date);\n\n if (!this._dateAdapter.sameDate(date, this._value)) {\n this._value = date;\n this._cvaOnChange(date);\n this._valueChange.emit(date);\n this.dateInput.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));\n } else {\n this._validatorOnChange();\n }\n }\n\n _onChange() {\n this.dateChange.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));\n }\n\n /** Returns the palette used by the input's form field, if any. */\n _getThemePalette(): ThemePalette {\n return this._formField ? this._formField.color : undefined;\n }\n\n /** Handles blur events on the input. */\n _onBlur() {\n // Reformat the input only if we have a valid value.\n if (this.value) {\n this._formatValue(this.value);\n }\n\n this._onTouched();\n }\n\n /** Formats a value and sets it on the input element. */\n private _formatValue(value: D | null) {\n this._elementRef.nativeElement.value =\n value ? this._dateAdapter.format(value, this._dateFormats.display.dateInput) : '';\n }\n\n /**\n * @param obj The object to check.\n * @returns The given object if it is both a date instance and valid, otherwise null.\n */\n private _getValidDateOrNull(obj: any): D | null {\n return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n AfterContentInit,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n Directive,\n Input,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n ViewEncapsulation,\n ViewChild,\n} from '@angular/core';\nimport {MatButton} from '@angular/material/button';\nimport {merge, of as observableOf, Subscription} from 'rxjs';\nimport {MatDatepicker} from './datepicker';\nimport {MatDatepickerIntl} from './datepicker-intl';\n\n\n/** Can be used to override the icon of a `matDatepickerToggle`. */\n@Directive({\n selector: '[matDatepickerToggleIcon]'\n})\nexport class MatDatepickerToggleIcon {}\n\n\n@Component({\n moduleId: module.id,\n selector: 'mat-datepicker-toggle',\n templateUrl: 'datepicker-toggle.html',\n styleUrls: ['datepicker-toggle.css'],\n host: {\n 'class': 'mat-datepicker-toggle',\n // Always set the tabindex to -1 so that it doesn't overlap with any custom tabindex the\n // consumer may have provided, while still being able to receive focus.\n '[attr.tabindex]': '-1',\n '[class.mat-datepicker-toggle-active]': 'datepicker && datepicker.opened',\n '[class.mat-accent]': 'datepicker && datepicker.color === \"accent\"',\n '[class.mat-warn]': 'datepicker && datepicker.color === \"warn\"',\n '(focus)': '_button.focus()',\n },\n exportAs: 'matDatepickerToggle',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatDatepickerToggle<D> implements AfterContentInit, OnChanges, OnDestroy {\n private _stateChanges = Subscription.EMPTY;\n\n /** Datepicker instance that the button will toggle. */\n @Input('for') datepicker: MatDatepicker<D>;\n\n /** Tabindex for the toggle. */\n @Input() tabIndex: number | null;\n\n /** Whether the toggle button is disabled. */\n @Input()\n get disabled(): boolean {\n if (this._disabled === undefined && this.datepicker) {\n return this.datepicker.disabled;\n }\n\n return !!this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n }\n private _disabled: boolean;\n\n /** Whether ripples on the toggle should be disabled. */\n @Input() disableRipple: boolean;\n\n /** Custom icon set by the consumer. */\n @ContentChild(MatDatepickerToggleIcon, {static: false}) _customIcon: MatDatepickerToggleIcon;\n\n /** Underlying button element. */\n @ViewChild('button', {static: false}) _button: MatButton;\n\n constructor(\n public _intl: MatDatepickerIntl,\n private _changeDetectorRef: ChangeDetectorRef,\n @Attribute('tabindex') defaultTabIndex: string) {\n\n const parsedTabIndex = Number(defaultTabIndex);\n this.tabIndex = (parsedTabIndex || parsedTabIndex === 0) ? parsedTabIndex : null;\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['datepicker']) {\n this._watchStateChanges();\n }\n }\n\n ngOnDestroy() {\n this._stateChanges.unsubscribe();\n }\n\n ngAfterContentInit() {\n this._watchStateChanges();\n }\n\n _open(event: Event): void {\n if (this.datepicker && !this.disabled) {\n this.datepicker.open();\n event.stopPropagation();\n }\n }\n\n private _watchStateChanges() {\n const datepickerDisabled = this.datepicker ? this.datepicker._disabledChange : observableOf();\n const inputDisabled = this.datepicker && this.datepicker._datepickerInput ?\n this.datepicker._datepickerInput._disabledChange : observableOf();\n const datepickerToggled = this.datepicker ?\n merge(this.datepicker.openedStream, this.datepicker.closedStream) :\n observableOf();\n\n this._stateChanges.unsubscribe();\n this._stateChanges = merge(\n this._intl.changes,\n datepickerDisabled,\n inputDisabled,\n datepickerToggled\n ).subscribe(() => this._changeDetectorRef.markForCheck());\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {A11yModule} from '@angular/cdk/a11y';\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {PortalModule} from '@angular/cdk/portal';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatButtonModule} from '@angular/material/button';\nimport {MatDialogModule} from '@angular/material/dialog';\nimport {MatCalendar, MatCalendarHeader} from './calendar';\nimport {MatCalendarBody} from './calendar-body';\nimport {\n MatDatepicker,\n MatDatepickerContent,\n MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER,\n} from './datepicker';\nimport {MatDatepickerInput} from './datepicker-input';\nimport {MatDatepickerIntl} from './datepicker-intl';\nimport {MatDatepickerToggle, MatDatepickerToggleIcon} from './datepicker-toggle';\nimport {MatMonthView} from './month-view';\nimport {MatMultiYearView} from './multi-year-view';\nimport {MatYearView} from './year-view';\n\n\n@NgModule({\n imports: [\n CommonModule,\n MatButtonModule,\n MatDialogModule,\n OverlayModule,\n A11yModule,\n PortalModule,\n ],\n exports: [\n MatCalendar,\n MatCalendarBody,\n MatDatepicker,\n MatDatepickerContent,\n MatDatepickerInput,\n MatDatepickerToggle,\n MatDatepickerToggleIcon,\n MatMonthView,\n MatYearView,\n MatMultiYearView,\n MatCalendarHeader,\n ],\n declarations: [\n MatCalendar,\n MatCalendarBody,\n MatDatepicker,\n MatDatepickerContent,\n MatDatepickerInput,\n MatDatepickerToggle,\n MatDatepickerToggleIcon,\n MatMonthView,\n MatYearView,\n MatMultiYearView,\n MatCalendarHeader,\n ],\n providers: [\n MatDatepickerIntl,\n MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER,\n ],\n entryComponents: [\n MatDatepickerContent,\n MatCalendarHeader,\n ]\n})\nexport class MatDatepickerModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n DOWN_ARROW,\n END,\n ENTER,\n HOME,\n LEFT_ARROW,\n PAGE_DOWN,\n PAGE_UP,\n RIGHT_ARROW,\n UP_ARROW,\n SPACE,\n} from '@angular/cdk/keycodes';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n Optional,\n Output,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {DateAdapter} from '@angular/material/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {MatCalendarBody, MatCalendarCell} from './calendar-body';\nimport {createMissingDateImplError} from './datepicker-errors';\n\nexport const yearsPerPage = 24;\n\nexport const yearsPerRow = 4;\n\n/**\n * An internal component used to display a year selector in the datepicker.\n * @docs-private\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-multi-year-view',\n templateUrl: 'multi-year-view.html',\n exportAs: 'matMultiYearView',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MatMultiYearView<D> implements AfterContentInit {\n /** The date to display in this multi-year view (everything other than the year is ignored). */\n @Input()\n get activeDate(): D { return this._activeDate; }\n set activeDate(value: D) {\n let oldActiveDate = this._activeDate;\n const validDate =\n this._getValidDateOrNull(this._dateAdapter.deserialize(value)) || this._dateAdapter.today();\n this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);\n\n if (!isSameMultiYearView(\n this._dateAdapter, oldActiveDate, this._activeDate, this.minDate, this.maxDate)) {\n this._init();\n }\n }\n private _activeDate: D;\n\n /** The currently selected date. */\n @Input()\n get selected(): D | null { return this._selected; }\n set selected(value: D | null) {\n this._selected = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n this._selectedYear = this._selected && this._dateAdapter.getYear(this._selected);\n }\n private _selected: D | null;\n\n /** The minimum selectable date. */\n @Input()\n get minDate(): D | null { return this._minDate; }\n set minDate(value: D | null) {\n this._minDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _minDate: D | null;\n\n /** The maximum selectable date. */\n @Input()\n get maxDate(): D | null { return this._maxDate; }\n set maxDate(value: D | null) {\n this._maxDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _maxDate: D | null;\n\n /** A function used to filter which dates are selectable. */\n @Input() dateFilter: (date: D) => boolean;\n\n /** Emits when a new year is selected. */\n @Output() readonly selectedChange: EventEmitter<D> = new EventEmitter<D>();\n\n /** Emits the selected year. This doesn't imply a change on the selected date */\n @Output() readonly yearSelected: EventEmitter<D> = new EventEmitter<D>();\n\n /** Emits when any date is activated. */\n @Output() readonly activeDateChange: EventEmitter<D> = new EventEmitter<D>();\n\n /** The body of calendar table */\n @ViewChild(MatCalendarBody, {static: false}) _matCalendarBody: MatCalendarBody;\n\n /** Grid of calendar cells representing the currently displayed years. */\n _years: MatCalendarCell[][];\n\n /** The year that today falls on. */\n _todayYear: number;\n\n /** The year of the selected date. Null if the selected date is null. */\n _selectedYear: number | null;\n\n constructor(private _changeDetectorRef: ChangeDetectorRef,\n @Optional() public _dateAdapter: DateAdapter<D>,\n @Optional() private _dir?: Directionality) {\n if (!this._dateAdapter) {\n throw createMissingDateImplError('DateAdapter');\n }\n\n this._activeDate = this._dateAdapter.today();\n }\n\n ngAfterContentInit() {\n this._init();\n }\n\n /** Initializes this multi-year view. */\n _init() {\n this._todayYear = this._dateAdapter.getYear(this._dateAdapter.today());\n\n // We want a range years such that we maximize the number of\n // enabled dates visible at once. This prevents issues where the minimum year\n // is the last item of a page OR the maximum year is the first item of a page.\n\n // The offset from the active year to the \"slot\" for the starting year is the\n // *actual* first rendered year in the multi-year view.\n const activeYear = this._dateAdapter.getYear(this._activeDate);\n const minYearOfPage = activeYear - getActiveOffset(\n this._dateAdapter, this.activeDate, this.minDate, this.maxDate);\n\n this._years = [];\n for (let i = 0, row: number[] = []; i < yearsPerPage; i++) {\n row.push(minYearOfPage + i);\n if (row.length == yearsPerRow) {\n this._years.push(row.map(year => this._createCellForYear(year)));\n row = [];\n }\n }\n this._changeDetectorRef.markForCheck();\n }\n\n /** Handles when a new year is selected. */\n _yearSelected(year: number) {\n this.yearSelected.emit(this._dateAdapter.createDate(year, 0, 1));\n let month = this._dateAdapter.getMonth(this.activeDate);\n let daysInMonth =\n this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(year, month, 1));\n this.selectedChange.emit(this._dateAdapter.createDate(year, month,\n Math.min(this._dateAdapter.getDate(this.activeDate), daysInMonth)));\n }\n\n /** Handles keydown events on the calendar body when calendar is in multi-year view. */\n _handleCalendarBodyKeydown(event: KeyboardEvent): void {\n const oldActiveDate = this._activeDate;\n const isRtl = this._isRtl();\n\n switch (event.keyCode) {\n case LEFT_ARROW:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, isRtl ? 1 : -1);\n break;\n case RIGHT_ARROW:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, isRtl ? -1 : 1);\n break;\n case UP_ARROW:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, -yearsPerRow);\n break;\n case DOWN_ARROW:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, yearsPerRow);\n break;\n case HOME:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate,\n -getActiveOffset(this._dateAdapter, this.activeDate, this.minDate, this.maxDate));\n break;\n case END:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate,\n yearsPerPage - getActiveOffset(\n this._dateAdapter, this.activeDate, this.minDate, this.maxDate) - 1);\n break;\n case PAGE_UP:\n this.activeDate =\n this._dateAdapter.addCalendarYears(\n this._activeDate, event.altKey ? -yearsPerPage * 10 : -yearsPerPage);\n break;\n case PAGE_DOWN:\n this.activeDate =\n this._dateAdapter.addCalendarYears(\n this._activeDate, event.altKey ? yearsPerPage * 10 : yearsPerPage);\n break;\n case ENTER:\n case SPACE:\n this._yearSelected(this._dateAdapter.getYear(this._activeDate));\n break;\n default:\n // Don't prevent default or focus active cell on keys that we don't explicitly handle.\n return;\n }\n if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {\n this.activeDateChange.emit(this.activeDate);\n }\n\n this._focusActiveCell();\n // Prevent unexpected default actions such as form submission.\n event.preventDefault();\n }\n\n _getActiveCell(): number {\n return getActiveOffset(this._dateAdapter, this.activeDate, this.minDate, this.maxDate);\n }\n\n /** Focuses the active cell after the microtask queue is empty. */\n _focusActiveCell() {\n this._matCalendarBody._focusActiveCell();\n }\n\n /** Creates an MatCalendarCell for the given year. */\n private _createCellForYear(year: number) {\n let yearName = this._dateAdapter.getYearName(this._dateAdapter.createDate(year, 0, 1));\n return new MatCalendarCell(year, yearName, yearName, this._shouldEnableYear(year));\n }\n\n /** Whether the given year is enabled. */\n private _shouldEnableYear(year: number) {\n // disable if the year is greater than maxDate lower than minDate\n if (year === undefined || year === null ||\n (this.maxDate && year > this._dateAdapter.getYear(this.maxDate)) ||\n (this.minDate && year < this._dateAdapter.getYear(this.minDate))) {\n return false;\n }\n\n // enable if it reaches here and there's no filter defined\n if (!this.dateFilter) {\n return true;\n }\n\n const firstOfYear = this._dateAdapter.createDate(year, 0, 1);\n\n // If any date in the year is enabled count the year as enabled.\n for (let date = firstOfYear; this._dateAdapter.getYear(date) == year;\n date = this._dateAdapter.addCalendarDays(date, 1)) {\n if (this.dateFilter(date)) {\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * @param obj The object to check.\n * @returns The given object if it is both a date instance and valid, otherwise null.\n */\n private _getValidDateOrNull(obj: any): D | null {\n return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;\n }\n\n /** Determines whether the user has the RTL layout direction. */\n private _isRtl() {\n return this._dir && this._dir.value === 'rtl';\n }\n}\n\nexport function isSameMultiYearView<D>(\n dateAdapter: DateAdapter<D>, date1: D, date2: D, minDate: D | null, maxDate: D | null): boolean {\n const year1 = dateAdapter.getYear(date1);\n const year2 = dateAdapter.getYear(date2);\n const startingYear = getStartingYear(dateAdapter, minDate, maxDate);\n return Math.floor((year1 - startingYear) / yearsPerPage) ===\n Math.floor((year2 - startingYear) / yearsPerPage);\n}\n\n/**\n * When the multi-year view is first opened, the active year will be in view.\n * So we compute how many years are between the active year and the *slot* where our\n * \"startingYear\" will render when paged into view.\n */\nexport function getActiveOffset<D>(\n dateAdapter: DateAdapter<D>, activeDate: D, minDate: D | null, maxDate: D | null): number {\n const activeYear = dateAdapter.getYear(activeDate);\n return euclideanModulo((activeYear - getStartingYear(dateAdapter, minDate, maxDate)),\n yearsPerPage);\n}\n\n/**\n * We pick a \"starting\" year such that either the maximum year would be at the end\n * or the minimum year would be at the beginning of a page.\n */\nfunction getStartingYear<D>(\n dateAdapter: DateAdapter<D>, minDate: D | null, maxDate: D | null): number {\n let startingYear = 0;\n if (maxDate) {\n const maxYear = dateAdapter.getYear(maxDate);\n startingYear = maxYear - yearsPerPage + 1;\n } else if (minDate) {\n startingYear = dateAdapter.getYear(minDate);\n }\n return startingYear;\n}\n\n/** Gets remainder that is non-negative, even if first number is negative */\nfunction euclideanModulo (a: number, b: number): number {\n return (a % b + b) % b;\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/** @docs-private */\nexport function createMissingDateImplError(provider: string) {\n return Error(\n `MatDatepicker: No provider found for ${provider}. You must import one of the following ` +\n `modules at your application root: MatNativeDateModule, MatMomentDateModule, or provide a ` +\n `custom implementation.`);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable} from '@angular/core';\nimport {Subject} from 'rxjs';\n\n\n/** Datepicker data that requires internationalization. */\n@Injectable({providedIn: 'root'})\nexport class MatDatepickerIntl {\n /**\n * Stream that emits whenever the labels here are changed. Use this to notify\n * components if the labels have changed after initialization.\n */\n readonly changes: Subject<void> = new Subject<void>();\n\n /** A label for the calendar popup (used by screen readers). */\n calendarLabel: string = 'Calendar';\n\n /** A label for the button used to open the calendar popup (used by screen readers). */\n openCalendarLabel: string = 'Open calendar';\n\n /** A label for the previous month button (used by screen readers). */\n prevMonthLabel: string = 'Previous month';\n\n /** A label for the next month button (used by screen readers). */\n nextMonthLabel: string = 'Next month';\n\n /** A label for the previous year button (used by screen readers). */\n prevYearLabel: string = 'Previous year';\n\n /** A label for the next year button (used by screen readers). */\n nextYearLabel: string = 'Next year';\n\n /** A label for the previous multi-year button (used by screen readers). */\n prevMultiYearLabel: string = 'Previous 20 years';\n\n /** A label for the next multi-year button (used by screen readers). */\n nextMultiYearLabel: string = 'Next 20 years';\n\n /** A label for the 'switch to month view' button (used by screen readers). */\n switchToMonthViewLabel: string = 'Choose date';\n\n /** A label for the 'switch to year view' button (used by screen readers). */\n switchToMultiYearViewLabel: string = 'Choose month and year';\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n Output,\n ViewEncapsulation,\n NgZone,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\nimport {take} from 'rxjs/operators';\n\n/**\n * Extra CSS classes that can be associated with a calendar cell.\n */\nexport type MatCalendarCellCssClasses = string | string[] | Set<string> | {[key: string]: any};\n\n/**\n * An internal class that represents the data corresponding to a single calendar cell.\n * @docs-private\n */\nexport class MatCalendarCell {\n constructor(public value: number,\n public displayValue: string,\n public ariaLabel: string,\n public enabled: boolean,\n public cssClasses?: MatCalendarCellCssClasses) {}\n}\n\n\n/**\n * An internal component used to display calendar data in a table.\n * @docs-private\n */\n@Component({\n moduleId: module.id,\n selector: '[mat-calendar-body]',\n templateUrl: 'calendar-body.html',\n styleUrls: ['calendar-body.css'],\n host: {\n 'class': 'mat-calendar-body',\n 'role': 'grid',\n 'aria-readonly': 'true'\n },\n exportAs: 'matCalendarBody',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatCalendarBody implements OnChanges {\n /** The label for the table. (e.g. \"Jan 2017\"). */\n @Input() label: string;\n\n /** The cells to display in the table. */\n @Input() rows: MatCalendarCell[][];\n\n /** The value in the table that corresponds to today. */\n @Input() todayValue: number;\n\n /** The value in the table that is currently selected. */\n @Input() selectedValue: number;\n\n /** The minimum number of free cells needed to fit the label in the first row. */\n @Input() labelMinRequiredCells: number;\n\n /** The number of columns in the table. */\n @Input() numCols = 7;\n\n /** The cell number of the active cell in the table. */\n @Input() activeCell = 0;\n\n /**\n * The aspect ratio (width / height) to use for the cells in the table. This aspect ratio will be\n * maintained even as the table resizes.\n */\n @Input() cellAspectRatio = 1;\n\n /** Emits when a new value is selected. */\n @Output() readonly selectedValueChange: EventEmitter<number> = new EventEmitter<number>();\n\n /** The number of blank cells to put at the beginning for the first row. */\n _firstRowOffset: number;\n\n /** Padding for the individual date cells. */\n _cellPadding: string;\n\n /** Width of an individual cell. */\n _cellWidth: string;\n\n constructor(private _elementRef: ElementRef<HTMLElement>, private _ngZone: NgZone) { }\n\n _cellClicked(cell: MatCalendarCell): void {\n if (cell.enabled) {\n this.selectedValueChange.emit(cell.value);\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const columnChanges = changes['numCols'];\n const {rows, numCols} = this;\n\n if (changes['rows'] || columnChanges) {\n this._firstRowOffset = rows && rows.length && rows[0].length ? numCols - rows[0].length : 0;\n }\n\n if (changes['cellAspectRatio'] || columnChanges || !this._cellPadding) {\n this._cellPadding = `${50 * this.cellAspectRatio / numCols}%`;\n }\n\n if (columnChanges || !this._cellWidth) {\n this._cellWidth = `${100 / numCols}%`;\n }\n }\n\n _isActiveCell(rowIndex: number, colIndex: number): boolean {\n let cellNumber = rowIndex * this.numCols + colIndex;\n\n // Account for the fact that the first row may not have as many cells.\n if (rowIndex) {\n cellNumber -= this._firstRowOffset;\n }\n\n return cellNumber == this.activeCell;\n }\n\n /** Focuses the active cell after the microtask queue is empty. */\n _focusActiveCell() {\n this._ngZone.runOutsideAngular(() => {\n this._ngZone.onStable.asObservable().pipe(take(1)).subscribe(() => {\n const activeCell: HTMLElement | null =\n this._elementRef.nativeElement.querySelector('.mat-calendar-body-active');\n\n if (activeCell) {\n activeCell.focus();\n }\n });\n });\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n DOWN_ARROW,\n END,\n ENTER,\n HOME,\n LEFT_ARROW,\n PAGE_DOWN,\n PAGE_UP,\n RIGHT_ARROW,\n UP_ARROW,\n SPACE,\n} from '@angular/cdk/keycodes';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n Optional,\n Output,\n ViewEncapsulation,\n ViewChild,\n} from '@angular/core';\nimport {DateAdapter, MAT_DATE_FORMATS, MatDateFormats} from '@angular/material/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {MatCalendarBody, MatCalendarCell, MatCalendarCellCssClasses} from './calendar-body';\nimport {createMissingDateImplError} from './datepicker-errors';\n\n\nconst DAYS_PER_WEEK = 7;\n\n\n/**\n * An internal component used to display a single month in the datepicker.\n * @docs-private\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-month-view',\n templateUrl: 'month-view.html',\n exportAs: 'matMonthView',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MatMonthView<D> implements AfterContentInit {\n /**\n * The date to display in this month view (everything other than the month and year is ignored).\n */\n @Input()\n get activeDate(): D { return this._activeDate; }\n set activeDate(value: D) {\n const oldActiveDate = this._activeDate;\n const validDate =\n this._getValidDateOrNull(this._dateAdapter.deserialize(value)) || this._dateAdapter.today();\n this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);\n if (!this._hasSameMonthAndYear(oldActiveDate, this._activeDate)) {\n this._init();\n }\n }\n private _activeDate: D;\n\n /** The currently selected date. */\n @Input()\n get selected(): D | null { return this._selected; }\n set selected(value: D | null) {\n this._selected = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n this._selectedDate = this._getDateInCurrentMonth(this._selected);\n }\n private _selected: D | null;\n\n /** The minimum selectable date. */\n @Input()\n get minDate(): D | null { return this._minDate; }\n set minDate(value: D | null) {\n this._minDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _minDate: D | null;\n\n /** The maximum selectable date. */\n @Input()\n get maxDate(): D | null { return this._maxDate; }\n set maxDate(value: D | null) {\n this._maxDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _maxDate: D | null;\n\n /** Function used to filter which dates are selectable. */\n @Input() dateFilter: (date: D) => boolean;\n\n /** Function that can be used to add custom CSS classes to dates. */\n @Input() dateClass: (date: D) => MatCalendarCellCssClasses;\n\n /** Emits when a new date is selected. */\n @Output() readonly selectedChange: EventEmitter<D | null> = new EventEmitter<D | null>();\n\n /** Emits when any date is selected. */\n @Output() readonly _userSelection: EventEmitter<void> = new EventEmitter<void>();\n\n /** Emits when any date is activated. */\n @Output() readonly activeDateChange: EventEmitter<D> = new EventEmitter<D>();\n\n /** The body of calendar table */\n @ViewChild(MatCalendarBody, {static: false}) _matCalendarBody: MatCalendarBody;\n\n /** The label for this month (e.g. \"January 2017\"). */\n _monthLabel: string;\n\n /** Grid of calendar cells representing the dates of the month. */\n _weeks: MatCalendarCell[][];\n\n /** The number of blank cells in the first row before the 1st of the month. */\n _firstWeekOffset: number;\n\n /**\n * The date of the month that the currently selected Date falls on.\n * Null if the currently selected Date is in another month.\n */\n _selectedDate: number | null;\n\n /** The date of the month that today falls on. Null if today is in another month. */\n _todayDate: number | null;\n\n /** The names of the weekdays. */\n _weekdays: {long: string, narrow: string}[];\n\n constructor(private _changeDetectorRef: ChangeDetectorRef,\n @Optional() @Inject(MAT_DATE_FORMATS) private _dateFormats: MatDateFormats,\n @Optional() public _dateAdapter: DateAdapter<D>,\n @Optional() private _dir?: Directionality) {\n if (!this._dateAdapter) {\n throw createMissingDateImplError('DateAdapter');\n }\n if (!this._dateFormats) {\n throw createMissingDateImplError('MAT_DATE_FORMATS');\n }\n\n const firstDayOfWeek = this._dateAdapter.getFirstDayOfWeek();\n const narrowWeekdays = this._dateAdapter.getDayOfWeekNames('narrow');\n const longWeekdays = this._dateAdapter.getDayOfWeekNames('long');\n\n // Rotate the labels for days of the week based on the configured first day of the week.\n let weekdays = longWeekdays.map((long, i) => {\n return {long, narrow: narrowWeekdays[i]};\n });\n this._weekdays = weekdays.slice(firstDayOfWeek).concat(weekdays.slice(0, firstDayOfWeek));\n\n this._activeDate = this._dateAdapter.today();\n }\n\n ngAfterContentInit() {\n this._init();\n }\n\n /** Handles when a new date is selected. */\n _dateSelected(date: number) {\n if (this._selectedDate != date) {\n const selectedYear = this._dateAdapter.getYear(this.activeDate);\n const selectedMonth = this._dateAdapter.getMonth(this.activeDate);\n const selectedDate = this._dateAdapter.createDate(selectedYear, selectedMonth, date);\n\n this.selectedChange.emit(selectedDate);\n }\n\n this._userSelection.emit();\n }\n\n /** Handles keydown events on the calendar body when calendar is in month view. */\n _handleCalendarBodyKeydown(event: KeyboardEvent): void {\n // TODO(mmalerba): We currently allow keyboard navigation to disabled dates, but just prevent\n // disabled ones from being selected. This may not be ideal, we should look into whether\n // navigation should skip over disabled dates, and if so, how to implement that efficiently.\n\n const oldActiveDate = this._activeDate;\n const isRtl = this._isRtl();\n\n switch (event.keyCode) {\n case LEFT_ARROW:\n this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, isRtl ? 1 : -1);\n break;\n case RIGHT_ARROW:\n this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, isRtl ? -1 : 1);\n break;\n case UP_ARROW:\n this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, -7);\n break;\n case DOWN_ARROW:\n this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, 7);\n break;\n case HOME:\n this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate,\n 1 - this._dateAdapter.getDate(this._activeDate));\n break;\n case END:\n this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate,\n (this._dateAdapter.getNumDaysInMonth(this._activeDate) -\n this._dateAdapter.getDate(this._activeDate)));\n break;\n case PAGE_UP:\n this.activeDate = event.altKey ?\n this._dateAdapter.addCalendarYears(this._activeDate, -1) :\n this._dateAdapter.addCalendarMonths(this._activeDate, -1);\n break;\n case PAGE_DOWN:\n this.activeDate = event.altKey ?\n this._dateAdapter.addCalendarYears(this._activeDate, 1) :\n this._dateAdapter.addCalendarMonths(this._activeDate, 1);\n break;\n case ENTER:\n case SPACE:\n if (!this.dateFilter || this.dateFilter(this._activeDate)) {\n this._dateSelected(this._dateAdapter.getDate(this._activeDate));\n this._userSelection.emit();\n // Prevent unexpected default actions such as form submission.\n event.preventDefault();\n }\n return;\n default:\n // Don't prevent default or focus active cell on keys that we don't explicitly handle.\n return;\n }\n\n if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {\n this.activeDateChange.emit(this.activeDate);\n }\n\n this._focusActiveCell();\n // Prevent unexpected default actions such as form submission.\n event.preventDefault();\n }\n\n /** Initializes this month view. */\n _init() {\n this._selectedDate = this._getDateInCurrentMonth(this.selected);\n this._todayDate = this._getDateInCurrentMonth(this._dateAdapter.today());\n this._monthLabel =\n this._dateAdapter.getMonthNames('short')[this._dateAdapter.getMonth(this.activeDate)]\n .toLocaleUpperCase();\n\n let firstOfMonth = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),\n this._dateAdapter.getMonth(this.activeDate), 1);\n this._firstWeekOffset =\n (DAYS_PER_WEEK + this._dateAdapter.getDayOfWeek(firstOfMonth) -\n this._dateAdapter.getFirstDayOfWeek()) % DAYS_PER_WEEK;\n\n this._createWeekCells();\n this._changeDetectorRef.markForCheck();\n }\n\n /** Focuses the active cell after the microtask queue is empty. */\n _focusActiveCell() {\n this._matCalendarBody._focusActiveCell();\n }\n\n /** Creates MatCalendarCells for the dates in this month. */\n private _createWeekCells() {\n const daysInMonth = this._dateAdapter.getNumDaysInMonth(this.activeDate);\n const dateNames = this._dateAdapter.getDateNames();\n this._weeks = [[]];\n for (let i = 0, cell = this._firstWeekOffset; i < daysInMonth; i++, cell++) {\n if (cell == DAYS_PER_WEEK) {\n this._weeks.push([]);\n cell = 0;\n }\n const date = this._dateAdapter.createDate(\n this._dateAdapter.getYear(this.activeDate),\n this._dateAdapter.getMonth(this.activeDate), i + 1);\n const enabled = this._shouldEnableDate(date);\n const ariaLabel = this._dateAdapter.format(date, this._dateFormats.display.dateA11yLabel);\n const cellClasses = this.dateClass ? this.dateClass(date) : undefined;\n\n this._weeks[this._weeks.length - 1]\n .push(new MatCalendarCell(i + 1, dateNames[i], ariaLabel, enabled, cellClasses));\n }\n }\n\n /** Date filter for the month */\n private _shouldEnableDate(date: D): boolean {\n return !!date &&\n (!this.dateFilter || this.dateFilter(date)) &&\n (!this.minDate || this._dateAdapter.compareDate(date, this.minDate) >= 0) &&\n (!this.maxDate || this._dateAdapter.compareDate(date, this.maxDate) <= 0);\n }\n\n /**\n * Gets the date in this month that the given Date falls on.\n * Returns null if the given Date is in another month.\n */\n private _getDateInCurrentMonth(date: D | null): number | null {\n return date && this._hasSameMonthAndYear(date, this.activeDate) ?\n this._dateAdapter.getDate(date) : null;\n }\n\n /** Checks whether the 2 dates are non-null and fall within the same month of the same year. */\n private _hasSameMonthAndYear(d1: D | null, d2: D | null): boolean {\n return !!(d1 && d2 && this._dateAdapter.getMonth(d1) == this._dateAdapter.getMonth(d2) &&\n this._dateAdapter.getYear(d1) == this._dateAdapter.getYear(d2));\n }\n\n /**\n * @param obj The object to check.\n * @returns The given object if it is both a date instance and valid, otherwise null.\n */\n private _getValidDateOrNull(obj: any): D | null {\n return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;\n }\n\n /** Determines whether the user has the RTL layout direction. */\n private _isRtl() {\n return this._dir && this._dir.value === 'rtl';\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n DOWN_ARROW,\n END,\n ENTER,\n HOME,\n LEFT_ARROW,\n PAGE_DOWN,\n PAGE_UP,\n RIGHT_ARROW,\n UP_ARROW,\n SPACE,\n} from '@angular/cdk/keycodes';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n Optional,\n Output,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {DateAdapter, MAT_DATE_FORMATS, MatDateFormats} from '@angular/material/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {MatCalendarBody, MatCalendarCell} from './calendar-body';\nimport {createMissingDateImplError} from './datepicker-errors';\n\n/**\n * An internal component used to display a single year in the datepicker.\n * @docs-private\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-year-view',\n templateUrl: 'year-view.html',\n exportAs: 'matYearView',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MatYearView<D> implements AfterContentInit {\n /** The date to display in this year view (everything other than the year is ignored). */\n @Input()\n get activeDate(): D { return this._activeDate; }\n set activeDate(value: D) {\n let oldActiveDate = this._activeDate;\n const validDate =\n this._getValidDateOrNull(this._dateAdapter.deserialize(value)) || this._dateAdapter.today();\n this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);\n if (this._dateAdapter.getYear(oldActiveDate) !== this._dateAdapter.getYear(this._activeDate)) {\n this._init();\n }\n }\n private _activeDate: D;\n\n /** The currently selected date. */\n @Input()\n get selected(): D | null { return this._selected; }\n set selected(value: D | null) {\n this._selected = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n this._selectedMonth = this._getMonthInCurrentYear(this._selected);\n }\n private _selected: D | null;\n\n /** The minimum selectable date. */\n @Input()\n get minDate(): D | null { return this._minDate; }\n set minDate(value: D | null) {\n this._minDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _minDate: D | null;\n\n /** The maximum selectable date. */\n @Input()\n get maxDate(): D | null { return this._maxDate; }\n set maxDate(value: D | null) {\n this._maxDate = this._getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _maxDate: D | null;\n\n /** A function used to filter which dates are selectable. */\n @Input() dateFilter: (date: D) => boolean;\n\n /** Emits when a new month is selected. */\n @Output() readonly selectedChange: EventEmitter<D> = new EventEmitter<D>();\n\n /** Emits the selected month. This doesn't imply a change on the selected date */\n @Output() readonly monthSelected: EventEmitter<D> = new EventEmitter<D>();\n\n /** Emits when any date is activated. */\n @Output() readonly activeDateChange: EventEmitter<D> = new EventEmitter<D>();\n\n /** The body of calendar table */\n @ViewChild(MatCalendarBody, {static: false}) _matCalendarBody: MatCalendarBody;\n\n /** Grid of calendar cells representing the months of the year. */\n _months: MatCalendarCell[][];\n\n /** The label for this year (e.g. \"2017\"). */\n _yearLabel: string;\n\n /** The month in this year that today falls on. Null if today is in a different year. */\n _todayMonth: number | null;\n\n /**\n * The month in this year that the selected Date falls on.\n * Null if the selected Date is in a different year.\n */\n _selectedMonth: number | null;\n\n constructor(private _changeDetectorRef: ChangeDetectorRef,\n @Optional() @Inject(MAT_DATE_FORMATS) private _dateFormats: MatDateFormats,\n @Optional() public _dateAdapter: DateAdapter<D>,\n @Optional() private _dir?: Directionality) {\n if (!this._dateAdapter) {\n throw createMissingDateImplError('DateAdapter');\n }\n if (!this._dateFormats) {\n throw createMissingDateImplError('MAT_DATE_FORMATS');\n }\n\n this._activeDate = this._dateAdapter.today();\n }\n\n ngAfterContentInit() {\n this._init();\n }\n\n /** Handles when a new month is selected. */\n _monthSelected(month: number) {\n const normalizedDate =\n this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), month, 1);\n\n this.monthSelected.emit(normalizedDate);\n\n const daysInMonth = this._dateAdapter.getNumDaysInMonth(normalizedDate);\n\n this.selectedChange.emit(this._dateAdapter.createDate(\n this._dateAdapter.getYear(this.activeDate), month,\n Math.min(this._dateAdapter.getDate(this.activeDate), daysInMonth)));\n }\n\n /** Handles keydown events on the calendar body when calendar is in year view. */\n _handleCalendarBodyKeydown(event: KeyboardEvent): void {\n // TODO(mmalerba): We currently allow keyboard navigation to disabled dates, but just prevent\n // disabled ones from being selected. This may not be ideal, we should look into whether\n // navigation should skip over disabled dates, and if so, how to implement that efficiently.\n\n const oldActiveDate = this._activeDate;\n const isRtl = this._isRtl();\n\n switch (event.keyCode) {\n case LEFT_ARROW:\n this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, isRtl ? 1 : -1);\n break;\n case RIGHT_ARROW:\n this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, isRtl ? -1 : 1);\n break;\n case UP_ARROW:\n this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, -4);\n break;\n case DOWN_ARROW:\n this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, 4);\n break;\n case HOME:\n this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate,\n -this._dateAdapter.getMonth(this._activeDate));\n break;\n case END:\n this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate,\n 11 - this._dateAdapter.getMonth(this._activeDate));\n break;\n case PAGE_UP:\n this.activeDate =\n this._dateAdapter.addCalendarYears(this._activeDate, event.altKey ? -10 : -1);\n break;\n case PAGE_DOWN:\n this.activeDate =\n this._dateAdapter.addCalendarYears(this._activeDate, event.altKey ? 10 : 1);\n break;\n case ENTER:\n case SPACE:\n this._monthSelected(this._dateAdapter.getMonth(this._activeDate));\n break;\n default:\n // Don't prevent default or focus active cell on keys that we don't explicitly handle.\n return;\n }\n\n if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {\n this.activeDateChange.emit(this.activeDate);\n }\n\n this._focusActiveCell();\n // Prevent unexpected default actions such as form submission.\n event.preventDefault();\n }\n\n /** Initializes this year view. */\n _init() {\n this._selectedMonth = this._getMonthInCurrentYear(this.selected);\n this._todayMonth = this._getMonthInCurrentYear(this._dateAdapter.today());\n this._yearLabel = this._dateAdapter.getYearName(this.activeDate);\n\n let monthNames = this._dateAdapter.getMonthNames('short');\n // First row of months only contains 5 elements so we can fit the year label on the same row.\n this._months = [[0, 1, 2, 3], [4, 5, 6, 7], [8, 9, 10, 11]].map(row => row.map(\n month => this._createCellForMonth(month, monthNames[month])));\n this._changeDetectorRef.markForCheck();\n }\n\n /** Focuses the active cell after the microtask queue is empty. */\n _focusActiveCell() {\n this._matCalendarBody._focusActiveCell();\n }\n\n /**\n * Gets the month in this year that the given Date falls on.\n * Returns null if the given Date is in another year.\n */\n private _getMonthInCurrentYear(date: D | null) {\n return date && this._dateAdapter.getYear(date) == this._dateAdapter.getYear(this.activeDate) ?\n this._dateAdapter.getMonth(date) : null;\n }\n\n /** Creates an MatCalendarCell for the given month. */\n private _createCellForMonth(month: number, monthName: string) {\n let ariaLabel = this._dateAdapter.format(\n this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), month, 1),\n this._dateFormats.display.monthYearA11yLabel);\n return new MatCalendarCell(\n month, monthName.toLocaleUpperCase(), ariaLabel, this._shouldEnableMonth(month));\n }\n\n /** Whether the given month is enabled. */\n private _shouldEnableMonth(month: number) {\n\n const activeYear = this._dateAdapter.getYear(this.activeDate);\n\n if (month === undefined || month === null ||\n this._isYearAndMonthAfterMaxDate(activeYear, month) ||\n this._isYearAndMonthBeforeMinDate(activeYear, month)) {\n return false;\n }\n\n if (!this.dateFilter) {\n return true;\n }\n\n const firstOfMonth = this._dateAdapter.createDate(activeYear, month, 1);\n\n // If any date in the month is enabled count the month as enabled.\n for (let date = firstOfMonth; this._dateAdapter.getMonth(date) == month;\n date = this._dateAdapter.addCalendarDays(date, 1)) {\n if (this.dateFilter(date)) {\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Tests whether the combination month/year is after this.maxDate, considering\n * just the month and year of this.maxDate\n */\n private _isYearAndMonthAfterMaxDate(year: number, month: number) {\n if (this.maxDate) {\n const maxYear = this._dateAdapter.getYear(this.maxDate);\n const maxMonth = this._dateAdapter.getMonth(this.maxDate);\n\n return year > maxYear || (year === maxYear && month > maxMonth);\n }\n\n return false;\n }\n\n /**\n * Tests whether the combination month/year is before this.minDate, considering\n * just the month and year of this.minDate\n */\n private _isYearAndMonthBeforeMinDate(year: number, month: number) {\n if (this.minDate) {\n const minYear = this._dateAdapter.getYear(this.minDate);\n const minMonth = this._dateAdapter.getMonth(this.minDate);\n\n return year < minYear || (year === minYear && month < minMonth);\n }\n\n return false;\n }\n\n /**\n * @param obj The object to check.\n * @returns The given object if it is both a date instance and valid, otherwise null.\n */\n private _getValidDateOrNull(obj: any): D | null {\n return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;\n }\n\n /** Determines whether the user has the RTL layout direction. */\n private _isRtl() {\n return this._dir && this._dir.value === 'rtl';\n }\n}\n"],"names":["this","stateChanges","complete","change","changes","view","_getCurrentViewComponent","_changeDetectorRef","detectChanges","_init","next","currentView","monthView","ngAfterContentInit","selectedChange","emit","date","MatCalendar","decorators","type","Component","args","selector","styles","host","class","exportAs","encapsulation","ViewEncapsulation","None","changeDetection","ChangeDetectionStrategy","OnPush","ctorParameters","MatDatepickerIntl","propDecorators","headerComponent","Input","startAt","minDate","maxDate","dateFilter","dateClass","Output","yearSelected","monthSelected","_userSelection","ViewChild","MatMonthView","static","yearView","MatYearView","multiYearView","MatMultiYearView","matDatepickerAnimations","transformPanel","trigger","state","style","opacity","transform","transition","animate","fadeInCalendar","datepickerUid","MAT_DATEPICKER_SCROLL_STRATEGY","InjectionToken","MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER","provide","deps","Overlay","useFactory","MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY","MatDatepickerContentBase","_elementRef","_MatDatepickerContentMixinBase","mixinColor","MatDatepickerContent","_super","elementRef","call","tslib_1.__extends","prototype","ngAfterViewInit","_calendar","focusActiveCell","template","[@transformPanel]","[class.mat-datepicker-content-touch]","animations","inputs","_dialog","_overlay","_ngZone","_viewContainerRef","_dateAdapter","_dir","_document","createMissingDateImplError","_scrollStrategy","scrollStrategy","Object","defineProperty","MatDatepicker","get","_startAt","_datepickerInput","value","set","enumerable","configurable","_getThemePalette","undefined","disabled","_disabled","newValue","coerceBooleanProperty","_disabledChange","_inputSubscription","unsubscribe","_popupRef","dispose","_popupComponentRef","oldValue","_selected","sameDate","_selectedChanged","Error","input","_valueChange","subscribe","_focusedElementBeforeOpen","activeElement","touchUi","_openAsDialog","_openAsPopup","_opened","openedStream","hasAttached","detach","_dialogRef","close","_calendarPortal","isAttached","completeClose","_this","closedStream","focus","setTimeout","open","direction","viewContainerRef","panelClass","afterClosed","_setColor","ComponentPortal","_createPopup","attach","instance","datepicker","onStable","asObservable","pipe","take","overlayConfig","OverlayConfig","hasBackdrop","backdropClass","create","overlayElement","setAttribute","merge","backdropClick","detachments","keydownEvents","filter","event","keyCode","ESCAPE","altKey","UP_ARROW","preventDefault","flexibleConnectedTo","getConnectedOverlayOrigin","withTransformOriginOn","withFlexibleDimensions","withViewportMargin","withLockedPosition","withPositions","originX","originY","overlayX","overlayY","color","componentInstance","MatDialog","Inject","DateAdapter","Optional","Directionality","DOCUMENT","calendarHeaderComponent","opened","MAT_DATEPICKER_VALUE_ACCESSOR","NG_VALUE_ACCESSOR","useExisting","forwardRef","MatDatepickerInput","multi","MAT_DATEPICKER_VALIDATORS","NG_VALIDATORS","MatDatepickerInputEvent","target","targetElement","_dateFormats","_formField","dateChange","EventEmitter","dateInput","_onTouched","_cvaOnChange","_validatorOnChange","_datepickerSubscription","Subscription","EMPTY","_localeSubscription","_parseValidator","_lastValueValid","matDatepickerParse","text","nativeElement","_minValidator","control","controlValue","_getValidDateOrNull","deserialize","min","compareDate","matDatepickerMin","actual","_maxValidator","max","matDatepickerMax","_filterValidator","_dateFilter","matDatepickerFilter","_validator","Validators","compose","localeChanges","_datepicker","_registerInput","selected","_value","isValid","oldDate","_formatValue","_min","_max","element","blur","ngOnDestroy","registerOnValidatorChange","fn","validate","c","getPopupConnectionElementRef","writeValue","registerOnChange","registerOnTouched","setDisabledState","isDisabled","_onKeydown","isAltDownArrow","DOWN_ARROW","readOnly","_onInput","parse","_onChange","_onBlur","format","display","obj","isDateInstance","Directive","providers","MAT_INPUT_VALUE_ACCESSOR","aria-haspopup","[attr.aria-owns]","[attr.min]","[attr.max]","[disabled]","(input)","(change)","(blur)","(keydown)","ElementRef","MAT_DATE_FORMATS","MatFormField","matDatepicker","MatDatepickerToggleIcon","MatDatepickerToggle","_intl","defaultTabIndex","_stateChanges","parsedTabIndex","Number","tabIndex","ngOnChanges","_watchStateChanges","_open","stopPropagation","datepickerDisabled","observableOf","inputDisabled","datepickerToggled","markForCheck","[class.mat-accent]","[class.mat-warn]","(focus)","String","Attribute","disableRipple","_customIcon","ContentChild","_button","MatDatepickerModule","NgModule","imports","CommonModule","MatButtonModule","MatDialogModule","OverlayModule","A11yModule","PortalModule","exports","MatCalendarBody","MatCalendarHeader","declarations","entryComponents","__extends","d","b","__","constructor","extendStatics","provider","year1","dateAdapter","getYear","date1","year2","date2","startingYear","getStartingYear","Math","floor","yearsPerPage","activeDate","overlay","scrollStrategies","reposition","setPrototypeOf","__proto__","Array","p","hasOwnProperty","Subject","calendarLabel","openCalendarLabel","prevMonthLabel","nextMonthLabel","prevYearLabel","nextYearLabel","prevMultiYearLabel","nextMultiYearLabel","switchToMonthViewLabel","switchToMultiYearViewLabel","Injectable","providedIn","MatCalendarCell","displayValue","ariaLabel","enabled","cssClasses","numCols","activeCell","cellAspectRatio","selectedValueChange","_cellClicked","cell","columnChanges","_a","rows","_firstRowOffset","length","_cellPadding","_cellWidth","_isActiveCell","rowIndex","colIndex","cellNumber","_focusActiveCell","runOutsideAngular","querySelector","role","aria-readonly","todayValue","selectedValue","labelMinRequiredCells","activeDateChange","firstDayOfWeek","getFirstDayOfWeek","narrowWeekdays","getDayOfWeekNames","longWeekdays","weekdays","map","long","i","narrow","_weekdays","slice","concat","_activeDate","today","oldActiveDate","validDate","clampDate","_hasSameMonthAndYear","_selectedDate","_getDateInCurrentMonth","_minDate","_maxDate","_dateSelected","selectedYear","selectedMonth","getMonth","selectedDate","createDate","_handleCalendarBodyKeydown","isRtl","_isRtl","LEFT_ARROW","addCalendarDays","RIGHT_ARROW","HOME","getDate","END","getNumDaysInMonth","PAGE_UP","addCalendarYears","addCalendarMonths","PAGE_DOWN","ENTER","SPACE","_todayDate","_monthLabel","getMonthNames","toLocaleUpperCase","firstOfMonth","_firstWeekOffset","getDayOfWeek","_createWeekCells","_matCalendarBody","daysInMonth","dateNames","getDateNames","_weeks","push","_shouldEnableDate","dateA11yLabel","cellClasses","d1","d2","isSameMultiYearView","_selectedYear","_todayYear","activeYear","minYearOfPage","getActiveOffset","_years","row","year","_createCellForYear","_yearSelected","month","_getActiveCell","yearName","getYearName","_shouldEnableYear","firstOfYear","_selectedMonth","_getMonthInCurrentYear","_monthSelected","normalizedDate","_todayMonth","_yearLabel","monthNames","_months","_createCellForMonth","monthName","monthYearA11yLabel","_shouldEnableMonth","_isYearAndMonthAfterMaxDate","_isYearAndMonthBeforeMinDate","maxYear","maxMonth","minYear","minMonth","calendar","changeDetectorRef","monthYearLabel","multi-year","currentPeriodClicked","previousClicked","nextClicked","previousEnabled","_isSameView","nextEnabled","ChangeDetectorRef","_intlChanges","_moveFocusOnNextTick","_currentView","startView"],"mappings":";;;;;;;i8COuBA,SAAgBoV,GAAUC,EAAGC,GAEzB,QAASC,KAAOvV,KAAKwV,YAAcH,EADnCI,EAAcJ,EAAGC,GAEjBD,EAAEnQ,UAAkB,OAANoQ,EAAajP,OAAOmE,OAAO8K,IAAMC,EAAGrQ,UAAYoQ,EAAEpQ,UAAW,GAAIqQ,ICjBnF,QAAgBrP,GAA2BwP,GACzC,MAAO3N,OACH,wCAAwC2N,EAD9C,gLF4QA,GAAAC,GAAgBC,EAAhBC,QACEC,GACMC,EAAQH,EAAYC,QAAQG,GAC5BC,EAARC,EAAAN,EAAArT,EAAAC,gCACQ2T,KAARC,OAAoBL,EAApBE,GAAAI,gCAUAT,EAAAC,QAAAS,iCAWA,GAAAL,GAAA,UAGAL,EAAAC,QAAArT,WAEAD,KACA0T,EAAAL,EAAAC,QAAAtT,GACA,OAAA0T,mCJxPA,QAAgBzR,GAAuC+R,GACrD,MAAA,YAAa,MAAAA,GAAQC,iBAAiBC,cK/CxC,GAAIhB,GAAgB,SAASJ,EAAGC,GAI5B,OAHAG,EAAgBpP,OAAOqQ,iBAChBC,uBAA2BC,QAAS,SAAUvB,E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