!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs/operators"),require("ngx-bootstrap/chronos"),require("rxjs"),require("ngx-bootstrap/mini-ngrx"),require("ngx-bootstrap/positioning"),require("@angular/animations"),require("ngx-bootstrap/component-loader"),require("@angular/forms"),require("@angular/common"),require("ngx-bootstrap/utils")):"function"==typeof define&&define.amd?define("ngx-bootstrap/datepicker",["exports","@angular/core","rxjs/operators","ngx-bootstrap/chronos","rxjs","ngx-bootstrap/mini-ngrx","ngx-bootstrap/positioning","@angular/animations","ngx-bootstrap/component-loader","@angular/forms","@angular/common","ngx-bootstrap/utils"],t):t(((e=e||self)["ngx-bootstrap"]=e["ngx-bootstrap"]||{},e["ngx-bootstrap"].datepicker={}),e.ng.core,e.rxjs.operators,e.chronos,e.rxjs,e.miniNgrx,e.positioning,e.ng.animations,e.componentLoader,e.ng.forms,e.ng.common,e.utils)}(this,function(e,t,n,a,i,s,r,o,c,d,l,u){"use strict";var p=function(e,t){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function h(e,t){function n(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function f(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,i,s=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(a=s.next()).done;)r.push(a.value)}catch(e){i={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return r}function m(){for(var e=[],t=0;tt[0]&&e<=t[1];if(n)return e>t[0]&&e<=n;return!1}(i.date,t.selectedRange,t.hoveredDate),f=t.isDisabled||a.isBefore(i.date,t.minDate,"day")||a.isAfter(i.date,t.maxDate,"day")||a.isDisabledDay(i.date,t.daysDisabled)||(r=i.date,!(void 0===(o=t.datesDisabled)||!o||!o.length)&&o.some(function(e){return a.isSame(r,e,"date")})),y=new Date,m=!c&&a.isSameDay(i.date,y),b=t.dateCustomClasses&&t.dateCustomClasses.map(function(e){return a.isSameDay(i.date,e.date)?e.classes:[]}).reduce(function(e,t){return e.concat(t)},[]).join(" ")||"",g=Object.assign({},i,{isOtherMonth:c,isHovered:d,isSelected:p,isSelectionStart:l,isSelectionEnd:u,isInRange:h,isDisabled:f,isToday:m,customClasses:b});i.isOtherMonth===g.isOtherMonth&&i.isHovered===g.isHovered&&i.isSelected===g.isSelected&&i.isSelectionStart===g.isSelectionStart&&i.isSelectionEnd===g.isSelectionEnd&&i.isDisabled===g.isDisabled&&i.isInRange===g.isInRange&&i.customClasses===g.customClasses||(n.days[s]=g)})}),e.hideLeftArrow=t.isDisabled||t.monthIndex>0&&t.monthIndex!==t.displayMonths,e.hideRightArrow=t.isDisabled||t.monthIndex=t}var A=4,V=3,R={month:1};function T(e,t){var n=a.startOf(e,"year");return{months:S({width:V,height:A,initialDate:n,shift:R},function(e){return{date:e,label:a.formatDate(e,t.monthLabel,t.locale)}}),monthTitle:"",yearTitle:a.formatDate(e,t.yearTitle,t.locale)}}var P=4,F=4,L=P*F,j=-1*(Math.floor(L/2)-1),N={year:1};function Y(e,t,n){var i=function(e,t){if(t&&e.getFullYear()>=t.getFullYear()&&e.getFullYear()0&&s.monthIndex!==s.displayMonths,i.hideRightArrow=s.monthIndex0&&t.yearIndex!==t.displayMonths,e.hideRightArrow=t.yearIndex animated-down",[o.style({height:0,overflow:"hidden"}),o.animate("220ms cubic-bezier(0, 0, 0.2, 1)")]),o.state("animated-up",o.style({height:"*",overflow:"hidden"})),o.transition("* => animated-up",[o.style({height:"*",overflow:"hidden"}),o.animate("220ms cubic-bezier(0, 0, 0.2, 1)")]),o.transition("* => unanimated",o.animate("0s"))]),U=function(e){function a(n,a,i,s,r,o,c){var d=e.call(this)||this;return d._config=a,d._store=i,d._element=s,d._actions=r,d._positionService=c,d.valueChange=new t.EventEmitter,d.animationState="void",d._subs=[],d._effects=o,n.setStyle(s.nativeElement,"display","block"),n.setStyle(s.nativeElement,"position","absolute"),d}return h(a,e),Object.defineProperty(a.prototype,"value",{set:function(e){this._effects.setValue(e)},enumerable:!0,configurable:!0}),a.prototype.ngOnInit=function(){var e=this;this._positionService.setOptions({modifiers:{flip:{enabled:this._config.adaptivePosition}},allowedPositions:["top","bottom"]}),this._positionService.event$.pipe(n.take(1)).subscribe(function(){e._positionService.disable(),e._config.isAnimated?e.animationState=e.isTopPosition?"animated-up":"animated-down":e.animationState="unanimated"}),this.isOtherMonthsActive=this._config.selectFromOtherMonth,this.containerClass=this._config.containerClass,this._effects.init(this._store).setOptions(this._config).setBindings(this).setEventHandlers(this).registerDatepickerSideEffects(),this._subs.push(this._store.select(function(e){return e.selectedDate}).subscribe(function(t){return e.valueChange.emit(t)}))},Object.defineProperty(a.prototype,"isTopPosition",{get:function(){return this._element.nativeElement.classList.contains("top")},enumerable:!0,configurable:!0}),a.prototype.positionServiceEnable=function(){this._positionService.enable()},a.prototype.daySelectHandler=function(e){(this.isOtherMonthsActive?e.isDisabled:e.isOtherMonth||e.isDisabled)||this._store.dispatch(this._actions.select(e.date))},a.prototype.ngOnDestroy=function(){var e,t;try{for(var n=f(this._subs),a=n.next();!a.done;a=n.next()){a.value.unsubscribe()}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this._effects.destroy()},a.decorators=[{type:t.Component,args:[{selector:"bs-datepicker-container",providers:[G,_],template:'\x3c!-- days calendar view mode --\x3e\n
\n
\n \x3c!--calendars--\x3e\n
\n \x3c!--days calendar--\x3e\n
\n \n \n
\n\n \x3c!--months calendar--\x3e\n
\n \n \n
\n\n \x3c!--years calendar--\x3e\n
\n \n \n
\n
\n\n \x3c!--applycancel buttons--\x3e\n
\n \n \n
\n
\n\n \x3c!--custom dates or date ranges picker--\x3e\n
\n \n
\n
\n',host:{class:"bottom","(click)":"_stopPropagation($event)",role:"dialog","aria-label":"calendar"},animations:[q]}]}],a.ctorParameters=function(){return[{type:t.Renderer2},{type:b},{type:G},{type:t.ElementRef},{type:v},{type:_},{type:r.PositioningService}]},a}(g),Z=function(){function e(e,n,a,i,s){this._config=e,this.placement="bottom",this.triggers="click",this.outsideClick=!0,this.container="body",this.outsideEsc=!0,this.bsValueChange=new t.EventEmitter,this._subs=[],Object.assign(this,this._config),this._datepicker=s.createLoader(n,i,a),this.onShown=this._datepicker.onShown,this.onHidden=this._datepicker.onHidden}return Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._datepicker.isShown},set:function(e){e?this.show():this.hide()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bsValue",{set:function(e){this._bsValue!==e&&(this._bsValue=e,this.bsValueChange.emit(e))},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this._datepicker.listen({outsideClick:this.outsideClick,outsideEsc:this.outsideEsc,triggers:this.triggers,show:function(){return e.show()}}),this.setConfig()},e.prototype.ngOnChanges=function(e){this._datepickerRef&&this._datepickerRef.instance&&(e.minDate&&(this._datepickerRef.instance.minDate=this.minDate),e.maxDate&&(this._datepickerRef.instance.maxDate=this.maxDate),e.daysDisabled&&(this._datepickerRef.instance.daysDisabled=this.daysDisabled),e.datesDisabled&&(this._datepickerRef.instance.datesDisabled=this.datesDisabled),e.isDisabled&&(this._datepickerRef.instance.isDisabled=this.isDisabled),e.dateCustomClasses&&(this._datepickerRef.instance.dateCustomClasses=this.dateCustomClasses))},e.prototype.show=function(){var e=this;this._datepicker.isShown||(this.setConfig(),this._datepickerRef=this._datepicker.provide({provide:b,useValue:this._config}).attach(U).to(this.container).position({attachment:this.placement}).show({placement:this.placement}),this._subs.push(this.bsValueChange.subscribe(function(t){e._datepickerRef.instance.value=t})),this._subs.push(this._datepickerRef.instance.valueChange.subscribe(function(t){e.bsValue=t,e.hide()})))},e.prototype.hide=function(){var e,t;this.isOpen&&this._datepicker.hide();try{for(var n=f(this._subs),a=n.next();!a.done;a=n.next()){a.value.unsubscribe()}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},e.prototype.toggle=function(){if(this.isOpen)return this.hide();this.show()},e.prototype.setConfig=function(){this._config=Object.assign({},this._config,this.bsConfig,{value:this._bsValue,isDisabled:this.isDisabled,minDate:this.minDate||this.bsConfig&&this.bsConfig.minDate,maxDate:this.maxDate||this.bsConfig&&this.bsConfig.maxDate,daysDisabled:this.daysDisabled||this.bsConfig&&this.bsConfig.daysDisabled,dateCustomClasses:this.dateCustomClasses||this.bsConfig&&this.bsConfig.dateCustomClasses,datesDisabled:this.datesDisabled||this.bsConfig&&this.bsConfig.datesDisabled,minMode:this.minMode||this.bsConfig&&this.bsConfig.minMode})},e.prototype.ngOnDestroy=function(){this._datepicker.dispose()},e.decorators=[{type:t.Directive,args:[{selector:"[bsDatepicker]",exportAs:"bsDatepicker"}]}],e.ctorParameters=function(){return[{type:b},{type:t.ElementRef},{type:t.Renderer2},{type:t.ViewContainerRef},{type:c.ComponentLoaderFactory}]},e.propDecorators={placement:[{type:t.Input}],triggers:[{type:t.Input}],outsideClick:[{type:t.Input}],container:[{type:t.Input}],outsideEsc:[{type:t.Input}],isOpen:[{type:t.Input}],onShown:[{type:t.Output}],onHidden:[{type:t.Output}],bsValue:[{type:t.Input}],bsConfig:[{type:t.Input}],isDisabled:[{type:t.Input}],minDate:[{type:t.Input}],maxDate:[{type:t.Input}],minMode:[{type:t.Input}],daysDisabled:[{type:t.Input}],datesDisabled:[{type:t.Input}],dateCustomClasses:[{type:t.Input}],bsValueChange:[{type:t.Output}]},e}(),Q=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return h(n,e),n.decorators=[{type:t.Injectable}],n}(b),K=function(e){function n(t,n,a,i,s,r,o){var c=e.call(this,t,n,a,i,s,r,o)||this;return t.setStyle(i.nativeElement,"display","inline-block"),t.setStyle(i.nativeElement,"position","static"),c}return h(n,e),n.decorators=[{type:t.Component,args:[{selector:"bs-datepicker-inline-container",providers:[G,_],template:'\x3c!-- days calendar view mode --\x3e\n
\n
\n \x3c!--calendars--\x3e\n
\n \x3c!--days calendar--\x3e\n
\n \n \n
\n\n \x3c!--months calendar--\x3e\n
\n \n \n
\n\n \x3c!--years calendar--\x3e\n
\n \n \n
\n
\n\n \x3c!--applycancel buttons--\x3e\n
\n \n \n
\n
\n\n \x3c!--custom dates or date ranges picker--\x3e\n
\n \n
\n
\n',host:{"(click)":"_stopPropagation($event)"},animations:[q]}]}],n.ctorParameters=function(){return[{type:t.Renderer2},{type:b},{type:G},{type:t.ElementRef},{type:v},{type:_},{type:r.PositioningService}]},n}(U),X=function(){function e(e,n,a,i,s){this._config=e,this._elementRef=n,this.bsValueChange=new t.EventEmitter,this._subs=[],Object.assign(this,this._config),this._datepicker=s.createLoader(n,i,a)}return Object.defineProperty(e.prototype,"bsValue",{set:function(e){this._bsValue!==e&&(this._bsValue=e,this.bsValueChange.emit(e))},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.setConfig(),this._datepickerRef=this._datepicker.provide({provide:b,useValue:this._config}).attach(K).to(this._elementRef).show(),this._subs.push(this.bsValueChange.subscribe(function(t){e._datepickerRef.instance.value=t})),this._subs.push(this._datepickerRef.instance.valueChange.subscribe(function(t){e.bsValue=t}))},e.prototype.ngOnChanges=function(e){this._datepickerRef&&this._datepickerRef.instance&&(e.minDate&&(this._datepickerRef.instance.minDate=this.minDate,this._datepickerRef.instance.value=this._bsValue),e.maxDate&&(this._datepickerRef.instance.maxDate=this.maxDate,this._datepickerRef.instance.value=this._bsValue),e.datesDisabled&&(this._datepickerRef.instance.datesDisabled=this.datesDisabled,this._datepickerRef.instance.value=this._bsValue),e.isDisabled&&(this._datepickerRef.instance.isDisabled=this.isDisabled),e.dateCustomClasses&&(this._datepickerRef.instance.dateCustomClasses=this.dateCustomClasses))},e.prototype.setConfig=function(){this._config=Object.assign({},this._config,this.bsConfig,{value:this._bsValue,isDisabled:this.isDisabled,minDate:this.minDate||this.bsConfig&&this.bsConfig.minDate,maxDate:this.maxDate||this.bsConfig&&this.bsConfig.maxDate,dateCustomClasses:this.dateCustomClasses||this.bsConfig&&this.bsConfig.dateCustomClasses,datesDisabled:this.datesDisabled||this.bsConfig&&this.bsConfig.datesDisabled})},e.prototype.ngOnDestroy=function(){this._datepicker.dispose()},e.decorators=[{type:t.Directive,args:[{selector:"bs-datepicker-inline",exportAs:"bsDatepickerInline"}]}],e.ctorParameters=function(){return[{type:Q},{type:t.ElementRef},{type:t.Renderer2},{type:t.ViewContainerRef},{type:c.ComponentLoaderFactory}]},e.propDecorators={bsValue:[{type:t.Input}],bsConfig:[{type:t.Input}],isDisabled:[{type:t.Input}],minDate:[{type:t.Input}],maxDate:[{type:t.Input}],dateCustomClasses:[{type:t.Input}],datesDisabled:[{type:t.Input}],bsValueChange:[{type:t.Output}]},e}(),J=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.displayMonths=2,t.isAnimated=!1,t}return h(n,e),n.decorators=[{type:t.Injectable}],n}(b),ee=function(e){function a(n,a,i,s,r,o,c){var d=e.call(this)||this;return d._config=a,d._store=i,d._element=s,d._actions=r,d._positionService=c,d.valueChange=new t.EventEmitter,d.animationState="void",d._rangeStack=[],d._subs=[],d._effects=o,n.setStyle(s.nativeElement,"display","block"),n.setStyle(s.nativeElement,"position","absolute"),d}return h(a,e),Object.defineProperty(a.prototype,"value",{set:function(e){this._effects.setRangeValue(e)},enumerable:!0,configurable:!0}),a.prototype.ngOnInit=function(){var e=this;this._positionService.setOptions({modifiers:{flip:{enabled:this._config.adaptivePosition}},allowedPositions:["top","bottom"]}),this._positionService.event$.pipe(n.take(1)).subscribe(function(){e._positionService.disable(),e._config.isAnimated?e.animationState=e.isTopPosition?"animated-up":"animated-down":e.animationState="unanimated"}),this.containerClass=this._config.containerClass,this.isOtherMonthsActive=this._config.selectFromOtherMonth,this._effects.init(this._store).setOptions(this._config).setBindings(this).setEventHandlers(this).registerDatepickerSideEffects(),this._subs.push(this._store.select(function(e){return e.selectedRange}).subscribe(function(t){return e.valueChange.emit(t)}))},Object.defineProperty(a.prototype,"isTopPosition",{get:function(){return this._element.nativeElement.classList.contains("top")},enumerable:!0,configurable:!0}),a.prototype.positionServiceEnable=function(){this._positionService.enable()},a.prototype.daySelectHandler=function(e){(this.isOtherMonthsActive?e.isDisabled:e.isOtherMonth||e.isDisabled)||(1===this._rangeStack.length&&(this._rangeStack=e.date>=this._rangeStack[0]?[this._rangeStack[0],e.date]:[e.date]),0===this._rangeStack.length&&(this._rangeStack=[e.date]),this._store.dispatch(this._actions.selectRange(this._rangeStack)),2===this._rangeStack.length&&(this._rangeStack=[]))},a.prototype.ngOnDestroy=function(){var e,t;try{for(var n=f(this._subs),a=n.next();!a.done;a=n.next()){a.value.unsubscribe()}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this._effects.destroy()},a.decorators=[{type:t.Component,args:[{selector:"bs-daterangepicker-container",providers:[G,_],template:'\x3c!-- days calendar view mode --\x3e\n
\n
\n \x3c!--calendars--\x3e\n
\n \x3c!--days calendar--\x3e\n
\n \n \n
\n\n \x3c!--months calendar--\x3e\n
\n \n \n
\n\n \x3c!--years calendar--\x3e\n
\n \n \n
\n
\n\n \x3c!--applycancel buttons--\x3e\n
\n \n \n
\n
\n\n \x3c!--custom dates or date ranges picker--\x3e\n
\n \n
\n
\n',host:{class:"bottom","(click)":"_stopPropagation($event)",role:"dialog","aria-label":"calendar"},animations:[q]}]}],a.ctorParameters=function(){return[{type:t.Renderer2},{type:b},{type:G},{type:t.ElementRef},{type:v},{type:_},{type:r.PositioningService}]},a}(g),te=function(e){function n(t,n,a,i,s,r,o){var c=e.call(this,t,n,a,i,s,r,o)||this;return t.setStyle(i.nativeElement,"display","inline-block"),t.setStyle(i.nativeElement,"position","static"),c}return h(n,e),n.decorators=[{type:t.Component,args:[{selector:"bs-daterangepicker-inline-container",providers:[G,_],template:'\x3c!-- days calendar view mode --\x3e\n
\n
\n \x3c!--calendars--\x3e\n
\n \x3c!--days calendar--\x3e\n
\n \n \n
\n\n \x3c!--months calendar--\x3e\n
\n \n \n
\n\n \x3c!--years calendar--\x3e\n
\n \n \n
\n
\n\n \x3c!--applycancel buttons--\x3e\n
\n \n \n
\n
\n\n \x3c!--custom dates or date ranges picker--\x3e\n
\n \n
\n
\n',host:{"(click)":"_stopPropagation($event)"},animations:[q]}]}],n.ctorParameters=function(){return[{type:t.Renderer2},{type:b},{type:G},{type:t.ElementRef},{type:v},{type:_},{type:r.PositioningService}]},n}(ee),ne=function(){function e(e,n,a,i,s){this._config=e,this._elementRef=n,this.bsValueChange=new t.EventEmitter,this._subs=[],Object.assign(this,this._config),this._datepicker=s.createLoader(n,i,a)}return Object.defineProperty(e.prototype,"bsValue",{set:function(e){this._bsValue!==e&&(this._bsValue=e,this.bsValueChange.emit(e))},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.setConfig(),this._datepickerRef=this._datepicker.provide({provide:b,useValue:this._config}).attach(te).to(this._elementRef).show(),this._subs.push(this.bsValueChange.subscribe(function(t){e._datepickerRef.instance.value=t})),this._subs.push(this._datepickerRef.instance.valueChange.pipe(n.filter(function(e){return e&&e[0]&&!!e[1]})).subscribe(function(t){e.bsValue=t}))},e.prototype.ngOnChanges=function(e){this._datepickerRef&&this._datepickerRef.instance&&(e.minDate&&(this._datepickerRef.instance.minDate=this.minDate),e.maxDate&&(this._datepickerRef.instance.maxDate=this.maxDate),e.datesDisabled&&(this._datepickerRef.instance.datesDisabled=this.datesDisabled),e.isDisabled&&(this._datepickerRef.instance.isDisabled=this.isDisabled),e.dateCustomClasses&&(this._datepickerRef.instance.dateCustomClasses=this.dateCustomClasses))},e.prototype.setConfig=function(){this._config=Object.assign({},this._config,this.bsConfig,{value:this._bsValue,isDisabled:this.isDisabled,minDate:this.minDate||this.bsConfig&&this.bsConfig.minDate,maxDate:this.maxDate||this.bsConfig&&this.bsConfig.maxDate,dateCustomClasses:this.dateCustomClasses||this.bsConfig&&this.bsConfig.dateCustomClasses,datesDisabled:this.datesDisabled||this.bsConfig&&this.bsConfig.datesDisabled})},e.prototype.ngOnDestroy=function(){this._datepicker.dispose()},e.decorators=[{type:t.Directive,args:[{selector:"bs-daterangepicker-inline",exportAs:"bsDaterangepickerInline"}]}],e.ctorParameters=function(){return[{type:J},{type:t.ElementRef},{type:t.Renderer2},{type:t.ViewContainerRef},{type:c.ComponentLoaderFactory}]},e.propDecorators={bsValue:[{type:t.Input}],bsConfig:[{type:t.Input}],isDisabled:[{type:t.Input}],minDate:[{type:t.Input}],maxDate:[{type:t.Input}],dateCustomClasses:[{type:t.Input}],datesDisabled:[{type:t.Input}],bsValueChange:[{type:t.Output}]},e}(),ae={provide:d.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return se}),multi:!0},ie={provide:d.NG_VALIDATORS,useExisting:t.forwardRef(function(){return se}),multi:!0},se=function(){function e(e,t,n,a,i){var s=this;this._picker=e,this._localeService=t,this._renderer=n,this._elRef=a,this.changeDetection=i,this._onChange=Function.prototype,this._onTouched=Function.prototype,this._validatorChange=Function.prototype,this._picker.bsValueChange.subscribe(function(e){s._setInputValue(e),s._value!==e&&(s._value=e,s._onChange(e),s._onTouched()),s.changeDetection.markForCheck()}),this._localeService.localeChange.subscribe(function(){s._setInputValue(s._value)})}return e.prototype._setInputValue=function(e){var t=e?a.formatDate(e,this._picker._config.dateInputFormat,this._localeService.currentLocale):"";this._renderer.setProperty(this._elRef.nativeElement,"value",t)},e.prototype.onChange=function(e){this.writeValue(e.target.value),this._onChange(this._value),this._onTouched()},e.prototype.validate=function(e){var t=e.value;if(null==t||""===t)return null;if(a.isDate(t)){if(!a.isDateValid(t))return{bsDate:{invalid:t}};if(this._picker&&this._picker.minDate&&a.isBefore(t,this._picker.minDate,"date"))return{bsDate:{minDate:this._picker.minDate}};if(this._picker&&this._picker.maxDate&&a.isAfter(t,this._picker.maxDate,"date"))return{bsDate:{maxDate:this._picker.maxDate}}}},e.prototype.registerOnValidatorChange=function(e){this._validatorChange=e},e.prototype.writeValue=function(e){if(e){var t=this._localeService.currentLocale;if(!a.getLocale(t))throw new Error('Locale "'+t+'" is not defined, please add it with "defineLocale(...)"');this._value=a.parseDate(e,this._picker._config.dateInputFormat,this._localeService.currentLocale),this._picker._config.useUtc&&(this._value=a.utcAsLocal(this._value))}else this._value=null;this._picker.bsValue=this._value},e.prototype.setDisabledState=function(e){this._picker.isDisabled=e,e?this._renderer.setAttribute(this._elRef.nativeElement,"disabled","disabled"):this._renderer.removeAttribute(this._elRef.nativeElement,"disabled")},e.prototype.registerOnChange=function(e){this._onChange=e},e.prototype.registerOnTouched=function(e){this._onTouched=e},e.prototype.onBlur=function(){this._onTouched()},e.prototype.hide=function(){this._picker.hide(),this._renderer.selectRootElement(this._elRef.nativeElement).blur()},e.decorators=[{type:t.Directive,args:[{selector:"input[bsDatepicker]",host:{"(change)":"onChange($event)","(keyup.esc)":"hide()","(blur)":"onBlur()"},providers:[ae,ie]}]}],e.ctorParameters=function(){return[{type:Z,decorators:[{type:t.Host}]},{type:D},{type:t.Renderer2},{type:t.ElementRef},{type:t.ChangeDetectorRef}]},e}(),re=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.displayMonths=2,t}return h(n,e),n.decorators=[{type:t.Injectable}],n}(b),oe=function(){function e(e,n,a,i,s){this._config=e,this.placement="bottom",this.triggers="click",this.outsideClick=!0,this.container="body",this.outsideEsc=!0,this.bsValueChange=new t.EventEmitter,this._subs=[],this._datepicker=s.createLoader(n,i,a),Object.assign(this,e),this.onShown=this._datepicker.onShown,this.onHidden=this._datepicker.onHidden}return Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._datepicker.isShown},set:function(e){e?this.show():this.hide()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bsValue",{set:function(e){this._bsValue!==e&&(this._bsValue=e,this.bsValueChange.emit(e))},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this._datepicker.listen({outsideClick:this.outsideClick,outsideEsc:this.outsideEsc,triggers:this.triggers,show:function(){return e.show()}}),this.setConfig()},e.prototype.ngOnChanges=function(e){this._datepickerRef&&this._datepickerRef.instance&&(e.minDate&&(this._datepickerRef.instance.minDate=this.minDate),e.maxDate&&(this._datepickerRef.instance.maxDate=this.maxDate),e.datesDisabled&&(this._datepickerRef.instance.datesDisabled=this.datesDisabled),e.isDisabled&&(this._datepickerRef.instance.isDisabled=this.isDisabled),e.dateCustomClasses&&(this._datepickerRef.instance.dateCustomClasses=this.dateCustomClasses))},e.prototype.show=function(){var e=this;this._datepicker.isShown||(this.setConfig(),this._datepickerRef=this._datepicker.provide({provide:b,useValue:this._config}).attach(ee).to(this.container).position({attachment:this.placement}).show({placement:this.placement}),this._subs.push(this.bsValueChange.subscribe(function(t){e._datepickerRef.instance.value=t})),this._subs.push(this._datepickerRef.instance.valueChange.pipe(n.filter(function(e){return e&&e[0]&&!!e[1]})).subscribe(function(t){e.bsValue=t,e.hide()})))},e.prototype.setConfig=function(){this._config=Object.assign({},this._config,this.bsConfig,{value:this._bsValue,isDisabled:this.isDisabled,minDate:this.minDate||this.bsConfig&&this.bsConfig.minDate,maxDate:this.maxDate||this.bsConfig&&this.bsConfig.maxDate,dateCustomClasses:this.dateCustomClasses||this.bsConfig&&this.bsConfig.dateCustomClasses,datesDisabled:this.datesDisabled||this.bsConfig&&this.bsConfig.datesDisabled})},e.prototype.hide=function(){var e,t;this.isOpen&&this._datepicker.hide();try{for(var n=f(this._subs),a=n.next();!a.done;a=n.next()){a.value.unsubscribe()}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},e.prototype.toggle=function(){if(this.isOpen)return this.hide();this.show()},e.prototype.ngOnDestroy=function(){this._datepicker.dispose()},e.decorators=[{type:t.Directive,args:[{selector:"[bsDaterangepicker]",exportAs:"bsDaterangepicker"}]}],e.ctorParameters=function(){return[{type:re},{type:t.ElementRef},{type:t.Renderer2},{type:t.ViewContainerRef},{type:c.ComponentLoaderFactory}]},e.propDecorators={placement:[{type:t.Input}],triggers:[{type:t.Input}],outsideClick:[{type:t.Input}],container:[{type:t.Input}],outsideEsc:[{type:t.Input}],isOpen:[{type:t.Input}],onShown:[{type:t.Output}],onHidden:[{type:t.Output}],bsValue:[{type:t.Input}],bsConfig:[{type:t.Input}],isDisabled:[{type:t.Input}],minDate:[{type:t.Input}],maxDate:[{type:t.Input}],dateCustomClasses:[{type:t.Input}],datesDisabled:[{type:t.Input}],bsValueChange:[{type:t.Output}]},e}(),ce={provide:d.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return le}),multi:!0},de={provide:d.NG_VALIDATORS,useExisting:t.forwardRef(function(){return le}),multi:!0},le=function(){function e(e,t,n,a,i){var s=this;this._picker=e,this._localeService=t,this._renderer=n,this._elRef=a,this.changeDetection=i,this._onChange=Function.prototype,this._onTouched=Function.prototype,this._validatorChange=Function.prototype,this._picker.bsValueChange.subscribe(function(e){s._setInputValue(e),s._value!==e&&(s._value=e,s._onChange(e),s._onTouched()),s.changeDetection.markForCheck()}),this._localeService.localeChange.subscribe(function(){s._setInputValue(s._value)})}return e.prototype._setInputValue=function(e){var t="";if(e){var n=e[0]?a.formatDate(e[0],this._picker._config.rangeInputFormat,this._localeService.currentLocale):"",i=e[1]?a.formatDate(e[1],this._picker._config.rangeInputFormat,this._localeService.currentLocale):"";t=n&&i?n+this._picker._config.rangeSeparator+i:""}this._renderer.setProperty(this._elRef.nativeElement,"value",t)},e.prototype.onChange=function(e){this.writeValue(e.target.value),this._onChange(this._value),this._onTouched()},e.prototype.validate=function(e){var t=e.value;if(null==t||!a.isArray(t))return null;var n=a.isDateValid(t[0]),i=a.isDateValid(t[1]);return n?i?this._picker&&this._picker.minDate&&a.isBefore(t[0],this._picker.minDate,"date")?{bsDate:{minDate:this._picker.minDate}}:this._picker&&this._picker.maxDate&&a.isAfter(t[1],this._picker.maxDate,"date")?{bsDate:{maxDate:this._picker.maxDate}}:void 0:{bsDate:{invalid:t[1]}}:{bsDate:{invalid:t[0]}}},e.prototype.registerOnValidatorChange=function(e){this._validatorChange=e},e.prototype.writeValue=function(e){var t=this;if(e){var n=this._localeService.currentLocale;if(!a.getLocale(n))throw new Error('Locale "'+n+'" is not defined, please add it with "defineLocale(...)"');var i=[];"string"==typeof e&&(i=e.split(this._picker._config.rangeSeparator)),Array.isArray(e)&&(i=e),this._value=i.map(function(e){return t._picker._config.useUtc?a.utcAsLocal(a.parseDate(e,t._picker._config.dateInputFormat,t._localeService.currentLocale)):a.parseDate(e,t._picker._config.dateInputFormat,t._localeService.currentLocale)}).map(function(e){return isNaN(e.valueOf())?null:e})}else this._value=null;this._picker.bsValue=this._value},e.prototype.setDisabledState=function(e){this._picker.isDisabled=e,e?this._renderer.setAttribute(this._elRef.nativeElement,"disabled","disabled"):this._renderer.removeAttribute(this._elRef.nativeElement,"disabled")},e.prototype.registerOnChange=function(e){this._onChange=e},e.prototype.registerOnTouched=function(e){this._onTouched=e},e.prototype.onBlur=function(){this._onTouched()},e.prototype.hide=function(){this._picker.hide(),this._renderer.selectRootElement(this._elRef.nativeElement).blur()},e.decorators=[{type:t.Directive,args:[{selector:"input[bsDaterangepicker]",host:{"(change)":"onChange($event)","(keyup.esc)":"hide()","(blur)":"onBlur()"},providers:[ce,de]}]}],e.ctorParameters=function(){return[{type:oe,decorators:[{type:t.Host}]},{type:D},{type:t.Renderer2},{type:t.ElementRef},{type:t.ChangeDetectorRef}]},e}(),ue=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"bs-calendar-layout",template:'\n \x3c!-- current date, will be added in nearest releases --\x3e\n \n\n \x3c!--navigation--\x3e\n
\n \n
\n\n
\n \n
\n\n \x3c!--timepicker--\x3e\n \n '}]}],e}(),pe=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"bs-current-date",template:'
{{ title }}
'}]}],e.propDecorators={title:[{type:t.Input}]},e}(),he=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"bs-custom-date-view",template:'\n
\n \n \n
\n ',changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.propDecorators={isCustomRangeShown:[{type:t.Input}],ranges:[{type:t.Input}]},e}(),fe=function(){function e(e,t,n){this._config=e,this._elRef=t,this._renderer=n}return e.prototype.ngOnInit=function(){var e=this;this.day.isToday&&this._config&&this._config.customTodayClass&&this._renderer.addClass(this._elRef.nativeElement,this._config.customTodayClass),"string"==typeof this.day.customClasses&&this.day.customClasses.split(" ").filter(function(e){return e}).forEach(function(t){e._renderer.addClass(e._elRef.nativeElement,t)})},e.decorators=[{type:t.Component,args:[{selector:"[bsDatepickerDayDecorator]",changeDetection:t.ChangeDetectionStrategy.OnPush,host:{"[class.disabled]":"day.isDisabled","[class.is-highlighted]":"day.isHovered","[class.is-other-month]":"day.isOtherMonth","[class.is-active-other-month]":"day.isOtherMonthHovered","[class.in-range]":"day.isInRange","[class.select-start]":"day.isSelectionStart","[class.select-end]":"day.isSelectionEnd","[class.selected]":"day.isSelected"},template:"{{ day.label }}"}]}],e.ctorParameters=function(){return[{type:b},{type:t.ElementRef},{type:t.Renderer2}]},e.propDecorators={day:[{type:t.Input}]},e}(),ye={UP:0,DOWN:1};ye[ye.UP]="UP",ye[ye.DOWN]="DOWN";var me=function(){function e(){this.onNavigate=new t.EventEmitter,this.onViewMode=new t.EventEmitter}return e.prototype.navTo=function(e){this.onNavigate.emit(e?ye.DOWN:ye.UP)},e.prototype.view=function(e){this.onViewMode.emit(e)},e.decorators=[{type:t.Component,args:[{selector:"bs-datepicker-navigation-view",changeDetection:t.ChangeDetectionStrategy.OnPush,template:'\n \n\n ​ \x3c!-- zero-width space needed for correct alignement\n with preserveWhitespaces: false in Angular --\x3e\n\n \n\n ​ \x3c!-- zero-width space needed for correct alignement\n with preserveWhitespaces: false in Angular --\x3e\n\n \n\n ​ \x3c!-- zero-width space needed for correct alignement\n with preserveWhitespaces: false in Angular --\x3e\n\n \n '}]}],e.propDecorators={calendar:[{type:t.Input}],onNavigate:[{type:t.Output}],onViewMode:[{type:t.Output}]},e}(),be=function(){function e(e){this._config=e,this.onNavigate=new t.EventEmitter,this.onViewMode=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onHover=new t.EventEmitter,this.onHoverWeek=new t.EventEmitter}return e.prototype.navigateTo=function(e){var t=ye.DOWN===e?-1:1;this.onNavigate.emit({step:{month:t}})},e.prototype.changeViewMode=function(e){this.onViewMode.emit(e)},e.prototype.selectDay=function(e){this.onSelect.emit(e)},e.prototype.selectWeek=function(e){var t=this;if(this._config.selectWeek)if(e.days&&e.days[0]&&!e.days[0].isDisabled&&this._config.selectFromOtherMonth)this.onSelect.emit(e.days[0]);else if(0!==e.days.length){var n=e.days.find(function(e){return t._config.selectFromOtherMonth?!e.isDisabled:!e.isOtherMonth&&!e.isDisabled});this.onSelect.emit(n)}},e.prototype.weekHoverHandler=function(e,t){var n=this;this._config.selectWeek&&(e.days.find(function(e){return n._config.selectFromOtherMonth?!e.isDisabled:!e.isOtherMonth&&!e.isDisabled})&&(e.isHovered=t,this.isWeekHovered=t,this.onHoverWeek.emit(e)))},e.prototype.hoverDay=function(e,t){this._config.selectFromOtherMonth&&e.isOtherMonth&&(e.isOtherMonthHovered=t),this.onHover.emit({cell:e,isHovered:t})},e.decorators=[{type:t.Component,args:[{selector:"bs-days-calendar-view",template:'\n \n \n\n \x3c!--days matrix--\x3e\n \n \n \n \x3c!--if show weeks--\x3e\n \n \n \n \n \n \n \n \n \n \n
{{ calendar.weekdays[i] }}\n
\n {{ calendar.weekNumbers[i] }}\n \n {{ day.label }}\n
\n\n
\n '}]}],e.ctorParameters=function(){return[{type:b}]},e.propDecorators={calendar:[{type:t.Input}],options:[{type:t.Input}],onNavigate:[{type:t.Output}],onViewMode:[{type:t.Output}],onSelect:[{type:t.Output}],onHover:[{type:t.Output}],onHoverWeek:[{type:t.Output}]},e}(),ge=function(){function e(){this.onNavigate=new t.EventEmitter,this.onViewMode=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onHover=new t.EventEmitter}return e.prototype.navigateTo=function(e){var t=ye.DOWN===e?-1:1;this.onNavigate.emit({step:{year:t}})},e.prototype.viewMonth=function(e){this.onSelect.emit(e)},e.prototype.hoverMonth=function(e,t){this.onHover.emit({cell:e,isHovered:t})},e.prototype.changeViewMode=function(e){this.onViewMode.emit(e)},e.decorators=[{type:t.Component,args:[{selector:"bs-month-calendar-view",template:'\n \n \n\n \n \n \n \n \n \n
\n {{ month.label }}\n
\n
\n '}]}],e.propDecorators={calendar:[{type:t.Input}],onNavigate:[{type:t.Output}],onViewMode:[{type:t.Output}],onSelect:[{type:t.Output}],onHover:[{type:t.Output}]},e}(),ve=function(){function e(){this.ampm="ok",this.hours=0,this.minutes=0}return e.decorators=[{type:t.Component,args:[{selector:"bs-timepicker",template:'\n
\n
\n \n \n \n
\n
\n \n \n \n
\n \n
\n '}]}],e}(),De=function(){function e(){this.onNavigate=new t.EventEmitter,this.onViewMode=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onHover=new t.EventEmitter}return e.prototype.navigateTo=function(e){var t=ye.DOWN===e?-1:1;this.onNavigate.emit({step:{year:t*L}})},e.prototype.viewYear=function(e){this.onSelect.emit(e)},e.prototype.hoverYear=function(e,t){this.onHover.emit({cell:e,isHovered:t})},e.prototype.changeViewMode=function(e){this.onViewMode.emit(e)},e.decorators=[{type:t.Component,args:[{selector:"bs-years-calendar-view",template:'\n \n \n\n \n \n \n \n \n \n
\n {{ year.label }}\n
\n
\n '}]}],e.propDecorators={calendar:[{type:t.Input}],onNavigate:[{type:t.Output}],onViewMode:[{type:t.Output}],onSelect:[{type:t.Output}],onHover:[{type:t.Output}]},e}(),_e=[U,Z,K,X,se,ee,oe,te,ne,le],ke=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[c.ComponentLoaderFactory,r.PositioningService,G,v,b,re,Q,J,_,D]}},e.decorators=[{type:t.NgModule,args:[{imports:[l.CommonModule],declarations:m([ue,pe,he,fe,me,be,ge,ve,De],_e),entryComponents:[U,ee,K,te],exports:_e}]}],e}(),we=function(){function e(){}return e.prototype.format=function(e,t,n){return a.formatDate(e,t,n)},e}(),Ce=function(){function e(){this.selectionDone=new t.EventEmitter(void 0),this.update=new t.EventEmitter(!1),this.activeDateChange=new t.EventEmitter(void 0),this.stepDay={},this.stepMonth={},this.stepYear={},this.modes=["day","month","year"],this.dateFormatter=new we}return Object.defineProperty(e.prototype,"activeDate",{get:function(){return this._activeDate},set:function(e){this._activeDate=e},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.uniqueId="datepicker--"+Math.floor(1e4*Math.random()),this.initDate?(this.activeDate=this.initDate,this.selectedDate=new Date(this.activeDate.valueOf()),this.update.emit(this.activeDate)):void 0===this.activeDate&&(this.activeDate=new Date)},e.prototype.ngOnChanges=function(e){this.refreshView(),this.checkIfActiveDateGotUpdated(e.activeDate)},e.prototype.checkIfActiveDateGotUpdated=function(e){if(e&&!e.firstChange){var t=e.previousValue;t&&t instanceof Date&&t.getTime()!==e.currentValue.getTime()&&this.activeDateChange.emit(this.activeDate)}},e.prototype.setCompareHandler=function(e,t){"day"===t&&(this.compareHandlerDay=e),"month"===t&&(this.compareHandlerMonth=e),"year"===t&&(this.compareHandlerYear=e)},e.prototype.compare=function(e,t){if(void 0!==e&&void 0!==t)return"day"===this.datepickerMode&&this.compareHandlerDay?this.compareHandlerDay(e,t):"month"===this.datepickerMode&&this.compareHandlerMonth?this.compareHandlerMonth(e,t):"year"===this.datepickerMode&&this.compareHandlerYear?this.compareHandlerYear(e,t):void 0},e.prototype.setRefreshViewHandler=function(e,t){"day"===t&&(this.refreshViewHandlerDay=e),"month"===t&&(this.refreshViewHandlerMonth=e),"year"===t&&(this.refreshViewHandlerYear=e)},e.prototype.refreshView=function(){"day"===this.datepickerMode&&this.refreshViewHandlerDay&&this.refreshViewHandlerDay(),"month"===this.datepickerMode&&this.refreshViewHandlerMonth&&this.refreshViewHandlerMonth(),"year"===this.datepickerMode&&this.refreshViewHandlerYear&&this.refreshViewHandlerYear()},e.prototype.dateFilter=function(e,t){return this.dateFormatter.format(e,t,this.locale)},e.prototype.isActive=function(e){return 0===this.compare(e.date,this.activeDate)&&(this.activeDateId=e.uid,!0)},e.prototype.createDateObject=function(e,t){var n={};return n.date=new Date(e.getFullYear(),e.getMonth(),e.getDate()),n.date=this.fixTimeZone(n.date),n.label=this.dateFilter(e,t),n.selected=0===this.compare(e,this.selectedDate),n.disabled=this.isDisabled(e),n.current=0===this.compare(e,new Date),n.customClass=this.getCustomClassForDate(n.date),n},e.prototype.split=function(e,t){for(var n=[];e.length>0;)n.push(e.splice(0,t));return n},e.prototype.fixTimeZone=function(e){var t=e.getHours();return new Date(e.getFullYear(),e.getMonth(),e.getDate(),23===t?t+2:0)},e.prototype.select=function(e,t){void 0===t&&(t=!0),this.datepickerMode===this.minMode?(this.activeDate||(this.activeDate=new Date(0,0,0,0,0,0,0)),this.activeDate=new Date(e.getFullYear(),e.getMonth(),e.getDate()),this.activeDate=this.fixTimeZone(this.activeDate),t&&this.selectionDone.emit(this.activeDate)):(this.activeDate=new Date(e.getFullYear(),e.getMonth(),e.getDate()),this.activeDate=this.fixTimeZone(this.activeDate),t&&(this.datepickerMode=this.modes[this.modes.indexOf(this.datepickerMode)-1])),this.selectedDate=new Date(this.activeDate.valueOf()),this.update.emit(this.activeDate),this.refreshView()},e.prototype.move=function(e){var t;if("day"===this.datepickerMode&&(t=this.stepDay),"month"===this.datepickerMode&&(t=this.stepMonth),"year"===this.datepickerMode&&(t=this.stepYear),t){var n=this.activeDate.getFullYear()+e*(t.years||0),a=this.activeDate.getMonth()+e*(t.months||0);this.activeDate=new Date(n,a,1),this.refreshView(),this.activeDateChange.emit(this.activeDate)}},e.prototype.toggleMode=function(e){var t=e||1;this.datepickerMode===this.maxMode&&1===t||this.datepickerMode===this.minMode&&-1===t||(this.datepickerMode=this.modes[this.modes.indexOf(this.datepickerMode)+t],this.refreshView())},e.prototype.getCustomClassForDate=function(e){var t=this;if(!this.customClass)return"";var n=this.customClass.find(function(n){return n.date.valueOf()===e.valueOf()&&n.mode===t.datepickerMode},this);return void 0===n?"":n.clazz},e.prototype.compareDateDisabled=function(e,t){if(void 0!==e&&void 0!==t)return"day"===e.mode&&this.compareHandlerDay?this.compareHandlerDay(e.date,t):"month"===e.mode&&this.compareHandlerMonth?this.compareHandlerMonth(e.date,t):"year"===e.mode&&this.compareHandlerYear?this.compareHandlerYear(e.date,t):void 0},e.prototype.isDisabled=function(e){var t=this,n=!1;return this.dateDisabled&&this.dateDisabled.forEach(function(a){0===t.compareDateDisabled(a,e)&&(n=!0)}),this.dayDisabled&&(n=n||this.dayDisabled.indexOf(e.getDay())>-1),n||this.minDate&&this.compare(e,this.minDate)<0||this.maxDate&&this.compare(e,this.maxDate)>0},e.decorators=[{type:t.Component,args:[{selector:"datepicker-inner",template:'\n \x3c!--<!–ng-keydown="keydown($event)"–>--\x3e\n
\n \n
\n '}]}],e.propDecorators={locale:[{type:t.Input}],datepickerMode:[{type:t.Input}],startingDay:[{type:t.Input}],yearRange:[{type:t.Input}],minDate:[{type:t.Input}],maxDate:[{type:t.Input}],minMode:[{type:t.Input}],maxMode:[{type:t.Input}],showWeeks:[{type:t.Input}],formatDay:[{type:t.Input}],formatMonth:[{type:t.Input}],formatYear:[{type:t.Input}],formatDayHeader:[{type:t.Input}],formatDayTitle:[{type:t.Input}],formatMonthTitle:[{type:t.Input}],onlyCurrentMonth:[{type:t.Input}],shortcutPropagation:[{type:t.Input}],customClass:[{type:t.Input}],monthColLimit:[{type:t.Input}],yearColLimit:[{type:t.Input}],dateDisabled:[{type:t.Input}],dayDisabled:[{type:t.Input}],initDate:[{type:t.Input}],selectionDone:[{type:t.Output}],update:[{type:t.Output}],activeDateChange:[{type:t.Output}],activeDate:[{type:t.Input}]},e}(),Me=function(){function e(){this.locale="en",this.datepickerMode="day",this.startingDay=0,this.yearRange=20,this.minMode="day",this.maxMode="year",this.showWeeks=!0,this.formatDay="DD",this.formatMonth="MMMM",this.formatYear="YYYY",this.formatDayHeader="dd",this.formatDayTitle="MMMM YYYY",this.formatMonthTitle="YYYY",this.onlyCurrentMonth=!1,this.monthColLimit=3,this.yearColLimit=5,this.shortcutPropagation=!1}return e.decorators=[{type:t.Injectable}],e}(),xe={provide:d.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return Se}),multi:!0},Se=function(){function e(e){this.datepickerMode="day",this.showWeeks=!0,this.selectionDone=new t.EventEmitter(void 0),this.activeDateChange=new t.EventEmitter(void 0),this.onChange=Function.prototype,this.onTouched=Function.prototype,this._now=new Date,this.config=e,this.configureOptions()}return Object.defineProperty(e.prototype,"activeDate",{get:function(){return this._activeDate||this._now},set:function(e){this._activeDate=e},enumerable:!0,configurable:!0}),e.prototype.configureOptions=function(){Object.assign(this,this.config)},e.prototype.onUpdate=function(e){this.activeDate=e,this.onChange(e)},e.prototype.onSelectionDone=function(e){this.selectionDone.emit(e)},e.prototype.onActiveDateChange=function(e){this.activeDateChange.emit(e)},e.prototype.writeValue=function(e){if(0!==this._datePicker.compare(e,this._activeDate))return e&&e instanceof Date?(this.activeDate=e,void this._datePicker.select(e,!1)):void(this.activeDate=e?new Date(e):void 0)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.decorators=[{type:t.Component,args:[{selector:"datepicker",template:'\n \n \n \n \n \n ',providers:[xe]}]}],e.ctorParameters=function(){return[{type:Me}]},e.propDecorators={datepickerMode:[{type:t.Input}],initDate:[{type:t.Input}],minDate:[{type:t.Input}],maxDate:[{type:t.Input}],minMode:[{type:t.Input}],maxMode:[{type:t.Input}],showWeeks:[{type:t.Input}],formatDay:[{type:t.Input}],formatMonth:[{type:t.Input}],formatYear:[{type:t.Input}],formatDayHeader:[{type:t.Input}],formatDayTitle:[{type:t.Input}],formatMonthTitle:[{type:t.Input}],startingDay:[{type:t.Input}],yearRange:[{type:t.Input}],onlyCurrentMonth:[{type:t.Input}],shortcutPropagation:[{type:t.Input}],monthColLimit:[{type:t.Input}],yearColLimit:[{type:t.Input}],customClass:[{type:t.Input}],dateDisabled:[{type:t.Input}],dayDisabled:[{type:t.Input}],activeDate:[{type:t.Input}],selectionDone:[{type:t.Output}],activeDateChange:[{type:t.Output}],_datePicker:[{type:t.ViewChild,args:[Ce,{static:!0}]}]},e}(),Ie=function(){function e(e){this.labels=[],this.rows=[],this.weekNumbers=[],this.datePicker=e}return Object.defineProperty(e.prototype,"isBs4",{get:function(){return!u.isBs3()},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.datePicker.stepDay={months:1},this.datePicker.setRefreshViewHandler(function(){var t=this.activeDate.getFullYear(),n=this.activeDate.getMonth(),a=new Date(t,n,1),i=this.startingDay-a.getDay(),s=i>0?7-i:-i,r=new Date(a.getTime());s>0&&r.setDate(1-s);for(var o=e.getDates(r,42),c=[],d=0;d<42;d++){var l=this.createDateObject(o[d],this.formatDay);l.secondary=o[d].getMonth()!==n,l.uid=this.uniqueId+"-"+d,c[d]=l}e.labels=[];for(var u=0;u<7;u++)e.labels[u]={},e.labels[u].abbr=this.dateFilter(c[u].date,this.formatDayHeader),e.labels[u].full=this.dateFilter(c[u].date,"EEEE");if(e.title=this.dateFilter(this.activeDate,this.formatDayTitle),e.rows=this.split(c,7),this.showWeeks){e.weekNumbers=[];for(var p=(11-this.startingDay)%7,h=e.rows.length,f=0;f\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{ labelz.abbr }}\n \n \n \n \n \n \n \n {{ weekNumbers[index] }}\n \n \n \n \n \n \n \n\n ',styles:["\n :host .btn-secondary {\n color: #292b2c;\n background-color: #fff;\n border-color: #ccc;\n }\n :host .btn-info .text-muted {\n color: #292b2c !important;\n }\n "]}]}],e.ctorParameters=function(){return[{type:Ce}]},e}(),Oe=function(){function e(e){this.rows=[],this.datePicker=e}return Object.defineProperty(e.prototype,"isBs4",{get:function(){return!u.isBs3()},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.datePicker.stepMonth={years:1},this.datePicker.setRefreshViewHandler(function(){for(var t,n=new Array(12),a=this.activeDate.getFullYear(),i=0;i<12;i++)t=new Date(a,i,1),t=this.fixTimeZone(t),n[i]=this.createDateObject(t,this.formatMonth),n[i].uid=this.uniqueId+"-"+i;e.title=this.dateFilter(this.activeDate,this.formatMonthTitle),e.rows=this.split(n,e.datePicker.monthColLimit)},"month"),this.datePicker.setCompareHandler(function(e,t){var n=new Date(e.getFullYear(),e.getMonth()),a=new Date(t.getFullYear(),t.getMonth());return n.getTime()-a.getTime()},"month"),this.datePicker.refreshView()},e.decorators=[{type:t.Component,args:[{selector:"monthpicker",template:'\n\n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n
\n \n
\n ',styles:["\n :host .btn-info .text-success {\n color: #fff !important;\n }\n "]}]}],e.ctorParameters=function(){return[{type:Ce}]},e}(),Ee=function(){function e(e){this.rows=[],this.datePicker=e}return Object.defineProperty(e.prototype,"isBs4",{get:function(){return!u.isBs3()},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.datePicker.stepYear={years:this.datePicker.yearRange},this.datePicker.setRefreshViewHandler(function(){for(var t,n=new Array(this.yearRange),a=e.getStartingYear(this.activeDate.getFullYear()),i=0;i\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n ',styles:["\n :host .btn-info .text-success {\n color: #fff !important;\n }\n "]}]}],e.ctorParameters=function(){return[{type:Ce}]},e}(),He=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[Me]}},e.decorators=[{type:t.NgModule,args:[{imports:[l.CommonModule,d.FormsModule],declarations:[Se,Ce,Ie,Oe,Ee],exports:[Se,Ce,Ie,Oe,Ee],entryComponents:[Se]}]}],e}();e.BsDatepickerConfig=b,e.BsDatepickerContainerComponent=U,e.BsDatepickerDirective=Z,e.BsDatepickerInlineConfig=Q,e.BsDatepickerInlineContainerComponent=K,e.BsDatepickerInlineDirective=X,e.BsDatepickerInputDirective=se,e.BsDatepickerModule=ke,e.BsDaterangepickerConfig=re,e.BsDaterangepickerContainerComponent=ee,e.BsDaterangepickerDirective=oe,e.BsDaterangepickerInlineConfig=J,e.BsDaterangepickerInlineContainerComponent=te,e.BsDaterangepickerInlineDirective=ne,e.BsDaterangepickerInputDirective=le,e.BsLocaleService=D,e.DateFormatter=we,e.DatePickerComponent=Se,e.DatePickerInnerComponent=Ce,e.DatepickerConfig=Me,e.DatepickerModule=He,e.DayPickerComponent=Ie,e.MonthPickerComponent=Oe,e.YearPickerComponent=Ee,e.ɵa=xe,e.ɵb=g,e.ɵc=G,e.ɵd=_,e.ɵe=v,e.ɵf=q,e.ɵg=ue,e.ɵh=pe,e.ɵi=he,e.ɵj=fe,e.ɵk=me,e.ɵl=be,e.ɵm=ge,e.ɵn=ve,e.ɵo=De,Object.defineProperty(e,"__esModule",{value:!0})}); //# sourceMappingURL=ngx-bootstrap-datepicker.umd.min.js.map