ngx-bootstrap 5.6.1 → 5.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/accordion/package.json +1 -1
  3. package/alert/package.json +1 -1
  4. package/buttons/package.json +1 -1
  5. package/carousel/package.json +1 -1
  6. package/chronos/package.json +1 -1
  7. package/collapse/package.json +1 -1
  8. package/component-loader/package.json +1 -1
  9. package/datepicker/base/bs-datepicker-container.d.ts +2 -0
  10. package/datepicker/bundles/ngx-bootstrap-datepicker.umd.js +12 -0
  11. package/datepicker/bundles/ngx-bootstrap-datepicker.umd.js.map +1 -1
  12. package/datepicker/bundles/ngx-bootstrap-datepicker.umd.min.js +1 -1
  13. package/datepicker/bundles/ngx-bootstrap-datepicker.umd.min.js.map +1 -1
  14. package/datepicker/esm2015/base/bs-datepicker-container.js +9 -1
  15. package/datepicker/esm2015/themes/bs/bs-daterangepicker-container.component.js +1 -1
  16. package/datepicker/esm5/base/bs-datepicker-container.js +13 -1
  17. package/datepicker/esm5/themes/bs/bs-daterangepicker-container.component.js +1 -1
  18. package/datepicker/fesm2015/ngx-bootstrap-datepicker.js +8 -0
  19. package/datepicker/fesm2015/ngx-bootstrap-datepicker.js.map +1 -1
  20. package/datepicker/fesm5/ngx-bootstrap-datepicker.js +12 -0
  21. package/datepicker/fesm5/ngx-bootstrap-datepicker.js.map +1 -1
  22. package/datepicker/ngx-bootstrap-datepicker.metadata.json +1 -1
  23. package/datepicker/package.json +1 -1
  24. package/dropdown/bundles/ngx-bootstrap-dropdown.umd.js +8 -2
  25. package/dropdown/bundles/ngx-bootstrap-dropdown.umd.js.map +1 -1
  26. package/dropdown/bundles/ngx-bootstrap-dropdown.umd.min.js +1 -1
  27. package/dropdown/bundles/ngx-bootstrap-dropdown.umd.min.js.map +1 -1
  28. package/dropdown/esm2015/bs-dropdown.directive.js +8 -3
  29. package/dropdown/esm5/bs-dropdown.directive.js +9 -3
  30. package/dropdown/fesm2015/ngx-bootstrap-dropdown.js +7 -2
  31. package/dropdown/fesm2015/ngx-bootstrap-dropdown.js.map +1 -1
  32. package/dropdown/fesm5/ngx-bootstrap-dropdown.js +8 -2
  33. package/dropdown/fesm5/ngx-bootstrap-dropdown.js.map +1 -1
  34. package/dropdown/package.json +1 -1
  35. package/locale/package.json +1 -1
  36. package/mini-ngrx/package.json +1 -1
  37. package/modal/package.json +1 -1
  38. package/package.json +2 -2
  39. package/pagination/package.json +1 -1
  40. package/popover/package.json +1 -1
  41. package/positioning/package.json +1 -1
  42. package/progressbar/package.json +1 -1
  43. package/rating/package.json +1 -1
  44. package/sortable/package.json +1 -1
  45. package/tabs/package.json +1 -1
  46. package/timepicker/package.json +1 -1
  47. package/tooltip/package.json +1 -1
  48. package/typeahead/package.json +1 -1
  49. package/utils/package.json +1 -1
@@ -12,5 +12,5 @@
12
12
 
13
13
  See the Apache Version 2.0 License for specific language governing permissions
14
14
  and limitations under the License.
15
- ***************************************************************************** */var u=function(e,t){return(u=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 p(e,t){function n(){this.constructor=e}u(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}var b=function(){function e(){this.adaptivePosition=!1,this.useUtc=!1,this.isAnimated=!1,this.returnFocusToInput=!1,this.containerClass="theme-green",this.displayMonths=1,this.showWeekNumbers=!0,this.dateInputFormat="L",this.rangeSeparator=" - ",this.rangeInputFormat="L",this.monthTitle="MMMM",this.yearTitle="YYYY",this.dayLabel="D",this.monthLabel="MMMM",this.yearLabel="YYYY",this.weekNumbers="w"}return e.decorators=[{type:t.Injectable}],e}();var m=function(){function e(){this.customRanges=[]}return Object.defineProperty(e.prototype,"minDate",{set:function(e){this._effects.setMinDate(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxDate",{set:function(e){this._effects.setMaxDate(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"daysDisabled",{set:function(e){this._effects.setDaysDisabled(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"datesDisabled",{set:function(e){this._effects.setDatesDisabled(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"datesEnabled",{set:function(e){this._effects.setDatesEnabled(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisabled",{set:function(e){this._effects.setDisabled(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dateCustomClasses",{set:function(e){this._effects.setDateCustomClasses(e)},enumerable:!0,configurable:!0}),e.prototype.setViewMode=function(e){},e.prototype.navigateTo=function(e){},e.prototype.dayHoverHandler=function(e){},e.prototype.weekHoverHandler=function(e){},e.prototype.monthHoverHandler=function(e){},e.prototype.yearHoverHandler=function(e){},e.prototype.daySelectHandler=function(e){},e.prototype.monthSelectHandler=function(e){},e.prototype.yearSelectHandler=function(e){},e.prototype._stopPropagation=function(e){e.stopPropagation()},e}();var g=function(){function e(){}return e.prototype.calculate=function(){return{type:e.CALCULATE}},e.prototype.format=function(){return{type:e.FORMAT}},e.prototype.flag=function(){return{type:e.FLAG}},e.prototype.select=function(t){return{type:e.SELECT,payload:t}},e.prototype.changeViewMode=function(t){return{type:e.CHANGE_VIEWMODE,payload:t}},e.prototype.navigateTo=function(t){return{type:e.NAVIGATE_TO,payload:t}},e.prototype.navigateStep=function(t){return{type:e.NAVIGATE_OFFSET,payload:t}},e.prototype.setOptions=function(t){return{type:e.SET_OPTIONS,payload:t}},e.prototype.selectRange=function(t){return{type:e.SELECT_RANGE,payload:t}},e.prototype.hoverDay=function(t){return{type:e.HOVER,payload:t.isHovered?t.cell.date:null}},e.prototype.minDate=function(t){return{type:e.SET_MIN_DATE,payload:t}},e.prototype.maxDate=function(t){return{type:e.SET_MAX_DATE,payload:t}},e.prototype.daysDisabled=function(t){return{type:e.SET_DAYSDISABLED,payload:t}},e.prototype.datesDisabled=function(t){return{type:e.SET_DATESDISABLED,payload:t}},e.prototype.datesEnabled=function(t){return{type:e.SET_DATESENABLED,payload:t}},e.prototype.isDisabled=function(t){return{type:e.SET_IS_DISABLED,payload:t}},e.prototype.setDateCustomClasses=function(t){return{type:e.SET_DATE_CUSTOM_CLASSES,payload:t}},e.prototype.setLocale=function(t){return{type:e.SET_LOCALE,payload:t}},e.CALCULATE="[datepicker] calculate dates matrix",e.FORMAT="[datepicker] format datepicker values",e.FLAG="[datepicker] set flags",e.SELECT="[datepicker] select date",e.NAVIGATE_OFFSET="[datepicker] shift view date",e.NAVIGATE_TO="[datepicker] change view date",e.SET_OPTIONS="[datepicker] update render options",e.HOVER="[datepicker] hover date",e.CHANGE_VIEWMODE="[datepicker] switch view mode",e.SET_MIN_DATE="[datepicker] set min date",e.SET_MAX_DATE="[datepicker] set max date",e.SET_DAYSDISABLED="[datepicker] set days disabled",e.SET_DATESDISABLED="[datepicker] set dates disabled",e.SET_DATESENABLED="[datepicker] set dates enabled",e.SET_IS_DISABLED="[datepicker] set is disabled",e.SET_DATE_CUSTOM_CLASSES="[datepicker] set date custom classes",e.SET_LOCALE="[datepicker] set datepicker locale",e.SELECT_RANGE="[daterangepicker] select dates range",e.decorators=[{type:t.Injectable}],e}();var v=function(){function e(){this._defaultLocale="en",this._locale=new i.BehaviorSubject(this._defaultLocale),this._localeChange=this._locale.asObservable()}return Object.defineProperty(e.prototype,"locale",{get:function(){return this._locale},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"localeChange",{get:function(){return this._localeChange},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentLocale",{get:function(){return this._locale.getValue()},enumerable:!0,configurable:!0}),e.prototype.use=function(e){e!==this.currentLocale&&this._locale.next(e)},e.decorators=[{type:t.Injectable}],e}();var D=function(){function e(e,t){this._actions=e,this._localeService=t,this._subs=[]}return e.prototype.init=function(e){return this._store=e,this},e.prototype.setValue=function(e){this._store.dispatch(this._actions.select(e))},e.prototype.setRangeValue=function(e){this._store.dispatch(this._actions.selectRange(e))},e.prototype.setMinDate=function(e){return this._store.dispatch(this._actions.minDate(e)),this},e.prototype.setMaxDate=function(e){return this._store.dispatch(this._actions.maxDate(e)),this},e.prototype.setDaysDisabled=function(e){return this._store.dispatch(this._actions.daysDisabled(e)),this},e.prototype.setDatesDisabled=function(e){return this._store.dispatch(this._actions.datesDisabled(e)),this},e.prototype.setDatesEnabled=function(e){return this._store.dispatch(this._actions.datesEnabled(e)),this},e.prototype.setDisabled=function(e){return this._store.dispatch(this._actions.isDisabled(e)),this},e.prototype.setDateCustomClasses=function(e){return this._store.dispatch(this._actions.setDateCustomClasses(e)),this},e.prototype.setOptions=function(e){var t=Object.assign({locale:this._localeService.currentLocale},e);return this._store.dispatch(this._actions.setOptions(t)),this},e.prototype.setBindings=function(e){return e.daysCalendar=this._store.select((function(e){return e.flaggedMonths})).pipe(n.filter((function(e){return!!e}))),e.monthsCalendar=this._store.select((function(e){return e.flaggedMonthsCalendar})).pipe(n.filter((function(e){return!!e}))),e.yearsCalendar=this._store.select((function(e){return e.yearsCalendarFlagged})).pipe(n.filter((function(e){return!!e}))),e.viewMode=this._store.select((function(e){return e.view.mode})),e.options=this._store.select((function(e){return e.showWeekNumbers})).pipe(n.map((function(e){return{showWeekNumbers:e}}))),this},e.prototype.setEventHandlers=function(e){var t=this;return e.setViewMode=function(e){t._store.dispatch(t._actions.changeViewMode(e))},e.navigateTo=function(e){t._store.dispatch(t._actions.navigateStep(e.step))},e.dayHoverHandler=function(e){var n=e.cell;n.isOtherMonth||n.isDisabled||(t._store.dispatch(t._actions.hoverDay(e)),n.isHovered=e.isHovered)},e.monthHoverHandler=function(e){e.cell.isHovered=e.isHovered},e.yearHoverHandler=function(e){e.cell.isHovered=e.isHovered},e.monthSelectHandler=function(e){e.isDisabled||t._store.dispatch(t._actions.navigateTo({unit:{month:a.getMonth(e.date),year:a.getFullYear(e.date)},viewMode:"day"}))},e.yearSelectHandler=function(e){e.isDisabled||t._store.dispatch(t._actions.navigateTo({unit:{year:a.getFullYear(e.date)},viewMode:"month"}))},this},e.prototype.registerDatepickerSideEffects=function(){var e=this;return this._subs.push(this._store.select((function(e){return e.view})).subscribe((function(t){e._store.dispatch(e._actions.calculate())}))),this._subs.push(this._store.select((function(e){return e.monthsModel})).pipe(n.filter((function(e){return!!e}))).subscribe((function(t){return e._store.dispatch(e._actions.format())}))),this._subs.push(this._store.select((function(e){return e.formattedMonths})).pipe(n.filter((function(e){return!!e}))).subscribe((function(t){return e._store.dispatch(e._actions.flag())}))),this._subs.push(this._store.select((function(e){return e.selectedDate})).pipe(n.filter((function(e){return!!e}))).subscribe((function(t){return e._store.dispatch(e._actions.flag())}))),this._subs.push(this._store.select((function(e){return e.selectedRange})).pipe(n.filter((function(e){return!!e}))).subscribe((function(t){return e._store.dispatch(e._actions.flag())}))),this._subs.push(this._store.select((function(e){return e.monthsCalendar})).subscribe((function(){return e._store.dispatch(e._actions.flag())}))),this._subs.push(this._store.select((function(e){return e.yearsCalendarModel})).pipe(n.filter((function(e){return!!e}))).subscribe((function(){return e._store.dispatch(e._actions.flag())}))),this._subs.push(this._store.select((function(e){return e.hoveredDate})).pipe(n.filter((function(e){return!!e}))).subscribe((function(t){return e._store.dispatch(e._actions.flag())}))),this._subs.push(this._store.select((function(e){return e.dateCustomClasses})).pipe(n.filter((function(e){return!!e}))).subscribe((function(t){return e._store.dispatch(e._actions.flag())}))),this._subs.push(this._localeService.localeChange.subscribe((function(t){return e._store.dispatch(e._actions.setLocale(t))}))),this},e.prototype.destroy=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}}},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:g},{type:v}]},e}();var _={date:new Date,mode:"day"},k=Object.assign(new b,{locale:"en",view:_,selectedRange:[],monthViewOptions:{width:7,height:6}});function w(e,t,n){var i=t&&a.isBefore(a.endOf(e,"month"),t,"day"),s=n&&a.isAfter(a.startOf(e,"month"),n,"day");return i||s}function C(e,t,n){var i=t&&a.isBefore(a.endOf(e,"year"),t,"day"),s=n&&a.isAfter(a.startOf(e,"year"),n,"day");return i||s}function M(e,t){void 0===t&&(t=0);var n=e&&e.yearsCalendarModel&&e.yearsCalendarModel[t];return n&&n.years&&n.years[0]&&n.years[0][0]&&n.years[0][0].date}function S(e,t){for(var n=e.initialDate,i=new Array(e.height),s=0;s<e.height;s++){i[s]=new Array(e.width);for(var r=0;r<e.width;r++)i[s][r]=t(n),n=a.shiftDate(n,e.shift)}return i}function E(e,t){var n=a.getFirstDayOfMonth(e),i=function(e,t){if(a.isFirstDayOfWeek(e,t.firstDayOfWeek))return e;var n=function(e,t){if(0===t)return e;var n=e-t%7;return n<0?n+7:n}(a.getDay(e),t.firstDayOfWeek);return a.shiftDate(e,{day:-n})}(n,t);return{daysMatrix:S({width:t.width,height:t.height,initialDate:i,shift:{day:1}},(function(e){return e})),month:n}}function x(e){var t=a.getLocale(e),n=t.weekdaysShort(),i=t.firstDayOfWeek();return function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(y(arguments[t]));return e}(n.slice(i),n.slice(0,i))}function O(e,t){return e.weeks.forEach((function(n){n.days.forEach((function(i,s){var r,o,c=!a.isSameMonth(i.date,e.month),d=!c&&a.isSameDay(i.date,t.hoveredDate),l=!c&&t.selectedRange&&a.isSameDay(i.date,t.selectedRange[0]),h=!c&&t.selectedRange&&a.isSameDay(i.date,t.selectedRange[1]),u=!c&&a.isSameDay(i.date,t.selectedDate)||l||h,p=!c&&t.selectedRange&&function(e,t,n){if(!e||!t[0])return!1;if(t[1])return e>t[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,!!((o=t.datesDisabled)&&a.isArray(o)&&o.length)&&o.some((function(e){return a.isSame(r,e,"date")})))||function(e,t){return!!(t&&a.isArray(t)&&t.length)&&!t.some((function(t){return a.isSame(e,t,"date")}))}(i.date,t.datesEnabled),y=new Date,b=!c&&a.isSameDay(i.date,y),m=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:u,isSelectionStart:l,isSelectionEnd:h,isInRange:p,isDisabled:f,isToday:b,customClasses:m});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.displayMonths&&t.monthIndex+1!==t.displayMonths,e.disableLeftArrow=w(a.shiftDate(e.month,{month:-1}),t.minDate,t.maxDate),e.disableRightArrow=w(a.shiftDate(e.month,{month:1}),t.minDate,t.maxDate),e}function I(e,t){return!t||e>=t}var R={month:1};function A(e,t){return{months:S({width:3,height:4,initialDate:a.startOf(e,"year"),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 H=-1*(Math.floor(8)-1),V={year:1};function T(e,t,n){var i=S({width:4,height:4,initialDate:function(e,t){if(t&&e.getFullYear()>=t.getFullYear()&&e.getFullYear()<t.getFullYear()+16)return t;return a.shiftDate(e,{year:H})}(e,n),shift:V},(function(e){return{date:e,label:a.formatDate(e,t.yearLabel,t.locale)}}));return{years:i,monthTitle:"",yearTitle:function(e,t){var n=a.formatDate(e[0][0].date,t.yearTitle,t.locale),i=a.formatDate(e[3][3].date,t.yearTitle,t.locale);return n+" - "+i}(i,t)}}function P(e,t){switch(void 0===e&&(e=k),t.type){case g.CALCULATE:return function(e){var t=e.displayOneMonthRange&&$(e.view.date,e.minDate,e.maxDate)?1:e.displayMonths,n=e.view.date;if("day"===e.view.mode){e.showPreviousMonth&&0===e.selectedRange.length&&(n=a.shiftDate(n,{month:-1})),e.monthViewOptions.firstDayOfWeek=a.getLocale(e.locale).firstDayOfWeek();for(var i=new Array(t),s=0;s<t;s++)i[s]=E(n,e.monthViewOptions),n=a.shiftDate(n,{month:1});return Object.assign({},e,{monthsModel:i})}if("month"===e.view.mode){for(var r=new Array(t),o=0;o<t;o++)r[o]=A(n,L(e)),n=a.shiftDate(n,{year:1});return Object.assign({},e,{monthsCalendar:r})}if("year"===e.view.mode){var c=new Array(t);for(o=0;o<t;o++)c[o]=T(n,L(e),"year"===e.minMode?M(e,o):void 0),n=a.shiftDate(n,{year:16});return Object.assign({},e,{yearsCalendarModel:c})}return e}(e);case g.FORMAT:return function(e,t){if("day"===e.view.mode){var n=e.monthsModel.map((function(t,n){return function(e,t,n){return{month:e.month,monthTitle:a.formatDate(e.month,t.monthTitle,t.locale),yearTitle:a.formatDate(e.month,t.yearTitle,t.locale),weekNumbers:(i=e.daysMatrix,s=t.weekNumbers,r=t.locale,i.map((function(e){return e[0]?a.formatDate(e[0],s,r):""}))),weekdays:x(t.locale),weeks:e.daysMatrix.map((function(e,i){return{days:e.map((function(e,s){return{date:e,label:a.formatDate(e,t.dayLabel,t.locale),monthIndex:n,weekIndex:i,dayIndex:s}}))}}))};var i,s,r}(t,L(e),n)}));return Object.assign({},e,{formattedMonths:n})}var i=e.displayMonths,s=e.view.date;if("month"===e.view.mode){for(var r=new Array(i),o=0;o<i;o++)r[o]=A(s,L(e)),s=a.shiftDate(s,{year:1});return Object.assign({},e,{monthsCalendar:r})}if("year"===e.view.mode){var c=new Array(i);for(o=0;o<i;o++)c[o]=T(s,L(e)),s=a.shiftDate(s,{year:16});return Object.assign({},e,{yearsCalendarModel:c})}return e}(e);case g.FLAG:return function(e,t){var n=$(e.view.date,e.minDate,e.maxDate)?1:e.displayMonths;if("day"===e.view.mode){var i=e.formattedMonths.map((function(t,a){return O(t,{isDisabled:e.isDisabled,minDate:e.minDate,maxDate:e.maxDate,daysDisabled:e.daysDisabled,datesDisabled:e.datesDisabled,datesEnabled:e.datesEnabled,hoveredDate:e.hoveredDate,selectedDate:e.selectedDate,selectedRange:e.selectedRange,displayMonths:n,dateCustomClasses:e.dateCustomClasses,monthIndex:a})}));return Object.assign({},e,{flaggedMonths:i})}if("month"===e.view.mode){var s=e.monthsCalendar.map((function(t,i){return s=t,r={isDisabled:e.isDisabled,minDate:e.minDate,maxDate:e.maxDate,hoveredMonth:e.hoveredMonth,selectedDate:e.selectedDate,displayMonths:n,monthIndex:i},s.months.forEach((function(e,t){e.forEach((function(e,n){var i=a.isSameMonth(e.date,r.hoveredMonth),o=r.isDisabled||w(e.date,r.minDate,r.maxDate),c=a.isSameMonth(e.date,r.selectedDate),d=Object.assign(e,{isHovered:i,isDisabled:o,isSelected:c});e.isHovered===d.isHovered&&e.isDisabled===d.isDisabled&&e.isSelected===d.isSelected||(s.months[t][n]=d)}))})),s.hideLeftArrow=r.monthIndex>0&&r.monthIndex!==r.displayMonths,s.hideRightArrow=r.monthIndex<r.displayMonths&&r.monthIndex+1!==r.displayMonths,s.disableLeftArrow=C(a.shiftDate(s.months[0][0].date,{year:-1}),r.minDate,r.maxDate),s.disableRightArrow=C(a.shiftDate(s.months[0][0].date,{year:1}),r.minDate,r.maxDate),s;var s,r}));return Object.assign({},e,{flaggedMonthsCalendar:s})}if("year"===e.view.mode){var r=e.yearsCalendarModel.map((function(t,i){return function(e,t){e.years.forEach((function(n,i){n.forEach((function(n,s){var r=a.isSameYear(n.date,t.hoveredYear),o=t.isDisabled||C(n.date,t.minDate,t.maxDate),c=a.isSameYear(n.date,t.selectedDate),d=Object.assign(n,{isHovered:r,isDisabled:o,isSelected:c});n.isHovered===d.isHovered&&n.isDisabled===d.isDisabled&&n.isSelected===d.isSelected||(e.years[i][s]=d)}))})),e.hideLeftArrow=t.yearIndex>0&&t.yearIndex!==t.displayMonths,e.hideRightArrow=t.yearIndex<t.displayMonths&&t.yearIndex+1!==t.displayMonths,e.disableLeftArrow=C(a.shiftDate(e.years[0][0].date,{year:-1}),t.minDate,t.maxDate);var n=e.years.length-1,i=e.years[n].length-1;return e.disableRightArrow=C(a.shiftDate(e.years[n][i].date,{year:1}),t.minDate,t.maxDate),e}(t,{isDisabled:e.isDisabled,minDate:e.minDate,maxDate:e.maxDate,hoveredYear:e.hoveredYear,selectedDate:e.selectedDate,displayMonths:n,yearIndex:i})}));return Object.assign({},e,{yearsCalendarFlagged:r})}return e}(e);case g.NAVIGATE_OFFSET:return function(e,t){var n={view:{mode:e.view.mode,date:F(e,t)}};return Object.assign({},e,n)}(e,t);case g.NAVIGATE_TO:var n=t.payload,i=a.setFullDate(e.view.date,n.unit),s=void 0,r=void 0;return s=I(n.viewMode,e.minMode)?{view:{date:i,mode:r=n.viewMode}}:{selectedDate:i,view:{date:i,mode:r=e.view.mode}},Object.assign({},e,s);case g.CHANGE_VIEWMODE:if(!I(t.payload,e.minMode))return e;s={view:{date:i=e.view.date,mode:r=t.payload}};return Object.assign({},e,s);case g.HOVER:return Object.assign({},e,{hoveredDate:t.payload});case g.SELECT:s={selectedDate:t.payload,view:e.view},r=e.view.mode,i=j(t.payload||e.view.date,e.minDate,e.maxDate);return s.view={mode:r,date:i},Object.assign({},e,s);case g.SET_OPTIONS:r=(s=t.payload).minMode?s.minMode:e.view.mode,i=j(a.isDateValid(s.value)&&s.value||a.isArray(s.value)&&a.isDateValid(s.value[0])&&s.value[0]||e.view.date,s.minDate,s.maxDate);return s.view={mode:r,date:i},s.value&&(a.isArray(s.value)&&(s.selectedRange=s.value),s.value instanceof Date&&(s.selectedDate=s.value)),Object.assign({},e,s);case g.SELECT_RANGE:s={selectedRange:t.payload,view:e.view},r=e.view.mode,i=j(t.payload&&t.payload[0]||e.view.date,e.minDate,e.maxDate);return s.view={mode:r,date:i},Object.assign({},e,s);case g.SET_MIN_DATE:return Object.assign({},e,{minDate:t.payload});case g.SET_MAX_DATE:return Object.assign({},e,{maxDate:t.payload});case g.SET_IS_DISABLED:return Object.assign({},e,{isDisabled:t.payload});case g.SET_DATE_CUSTOM_CLASSES:return Object.assign({},e,{dateCustomClasses:t.payload});default:return e}}function F(e,t){if("year"===e.view.mode&&"year"===e.minMode){var n=M(e,0),i=a.shiftDate(n,{year:-H});return a.shiftDate(i,t.payload)}return a.shiftDate(a.startOf(e.view.date,"month"),t.payload)}function L(e){return{locale:e.locale,monthTitle:e.monthTitle,yearTitle:e.yearTitle,dayLabel:e.dayLabel,monthLabel:e.monthLabel,yearLabel:e.yearLabel,weekNumbers:e.weekNumbers}}function j(e,t,n){var i=Array.isArray(e)?e[0]:e;return t&&a.isAfter(t,i,"day")?t:n&&a.isBefore(n,i,"day")?n:i}function $(e,t,n){return!(!n||!a.isSame(n,e,"day"))||!(!t||!n||t.getMonth()!==n.getMonth())}var N=function(e){function n(){var t=new i.BehaviorSubject({type:"[datepicker] dispatcher init"}),n=new s.MiniState(k,t,P);return e.call(this,t,P,n)||this}return p(n,e),n.decorators=[{type:t.Injectable}],n.ctorParameters=function(){return[]},n}(s.MiniStore),Y=o.trigger("datepickerAnimation",[o.state("animated-down",o.style({height:"*",overflow:"hidden"})),o.transition("* => 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"))]),B=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 p(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){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:[N,D],template:'\x3c!-- days calendar view mode --\x3e\n<div class="bs-datepicker" [ngClass]="containerClass" *ngIf="viewMode | async">\n <div class="bs-datepicker-container"\n [@datepickerAnimation]="animationState"\n (@datepickerAnimation.done)="positionServiceEnable()">\n \x3c!--calendars--\x3e\n <div class="bs-calendar-container" [ngSwitch]="viewMode | async" role="application">\n \x3c!--days calendar--\x3e\n <div *ngSwitchCase="\'day\'" class="bs-media-container">\n <bs-days-calendar-view\n *ngFor="let calendar of daysCalendar | async"\n [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1"\n [calendar]="calendar"\n [options]="options | async"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="setViewMode($event)"\n (onHover)="dayHoverHandler($event)"\n (onHoverWeek)="weekHoverHandler($event)"\n (onSelect)="daySelectHandler($event)">\n </bs-days-calendar-view>\n </div>\n\n \x3c!--months calendar--\x3e\n <div *ngSwitchCase="\'month\'" class="bs-media-container">\n <bs-month-calendar-view\n *ngFor="let calendar of monthsCalendar | async"\n [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1"\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="setViewMode($event)"\n (onHover)="monthHoverHandler($event)"\n (onSelect)="monthSelectHandler($event)">\n </bs-month-calendar-view>\n </div>\n\n \x3c!--years calendar--\x3e\n <div *ngSwitchCase="\'year\'" class="bs-media-container">\n <bs-years-calendar-view\n *ngFor="let calendar of yearsCalendar | async"\n [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1"\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="setViewMode($event)"\n (onHover)="yearHoverHandler($event)"\n (onSelect)="yearSelectHandler($event)">\n </bs-years-calendar-view>\n </div>\n </div>\n\n \x3c!--applycancel buttons--\x3e\n <div class="bs-datepicker-buttons" *ngIf="false">\n <button class="btn btn-success" type="button">Apply</button>\n <button class="btn btn-default" type="button">Cancel</button>\n </div>\n </div>\n\n \x3c!--custom dates or date ranges picker--\x3e\n <div class="bs-datepicker-custom-range" *ngIf="customRanges?.length > 0">\n <bs-custom-date-view \n [selectedRange]="chosenRange" \n [ranges]="customRanges"\n (onSelect)="setRangeOnCalendar($event)">\n </bs-custom-date-view>\n </div>\n</div>\n',host:{class:"bottom","(click)":"_stopPropagation($event)",role:"dialog","aria-label":"calendar"},animations:[Y]}]}],a.ctorParameters=function(){return[{type:t.Renderer2},{type:b},{type:N},{type:t.ElementRef},{type:g},{type:D},{type:r.PositioningService}]},a}(m);var z=function(){function e(e,n,a,s,r){this._config=e,this._elementRef=n,this._renderer=a,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=r.createLoader(n,s,a),this.onShown=this._datepicker.onShown,this.onHidden=this._datepicker.onHidden,this.isOpen$=new i.BehaviorSubject(this.isOpen)}return Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._datepicker.isShown},set:function(e){this.isOpen$.next(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bsValue",{set:function(e){this._bsValue&&e&&this._bsValue.getTime()===e.getTime()||(this._bsValue=e,this.bsValueChange.emit(e))},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.isDestroy$=new i.Subject,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.datesEnabled&&(this._datepickerRef.instance.datesEnabled=this.datesEnabled),e.isDisabled&&(this._datepickerRef.instance.isDisabled=this.isDisabled),e.dateCustomClasses&&(this._datepickerRef.instance.dateCustomClasses=this.dateCustomClasses))},e.prototype.ngAfterViewInit=function(){var e=this;this.isOpen$.pipe(n.filter((function(t){return t!==e.isOpen})),n.takeUntil(this.isDestroy$)).subscribe((function(){return e.toggle()}))},e.prototype.show=function(){var e=this;this._datepicker.isShown||(this.setConfig(),this._datepickerRef=this._datepicker.provide({provide:b,useValue:this._config}).attach(B).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}}this._config.returnFocusToInput&&this._renderer.selectRootElement(this._elementRef.nativeElement).focus()},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,datesEnabled:this.datesEnabled||this.bsConfig&&this.bsConfig.datesEnabled,minMode:this.minMode||this.bsConfig&&this.bsConfig.minMode})},e.prototype.ngOnDestroy=function(){this._datepicker.dispose(),this.isOpen$.next(!1),this.isDestroy$&&(this.isDestroy$.next(),this.isDestroy$.complete())},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}],datesEnabled:[{type:t.Input}],dateCustomClasses:[{type:t.Input}],bsValueChange:[{type:t.Output}]},e}();var W=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return p(n,e),n.decorators=[{type:t.Injectable}],n}(b),G=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 p(n,e),n.decorators=[{type:t.Component,args:[{selector:"bs-datepicker-inline-container",providers:[N,D],template:'\x3c!-- days calendar view mode --\x3e\n<div class="bs-datepicker" [ngClass]="containerClass" *ngIf="viewMode | async">\n <div class="bs-datepicker-container"\n [@datepickerAnimation]="animationState"\n (@datepickerAnimation.done)="positionServiceEnable()">\n \x3c!--calendars--\x3e\n <div class="bs-calendar-container" [ngSwitch]="viewMode | async" role="application">\n \x3c!--days calendar--\x3e\n <div *ngSwitchCase="\'day\'" class="bs-media-container">\n <bs-days-calendar-view\n *ngFor="let calendar of daysCalendar | async"\n [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1"\n [calendar]="calendar"\n [options]="options | async"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="setViewMode($event)"\n (onHover)="dayHoverHandler($event)"\n (onHoverWeek)="weekHoverHandler($event)"\n (onSelect)="daySelectHandler($event)">\n </bs-days-calendar-view>\n </div>\n\n \x3c!--months calendar--\x3e\n <div *ngSwitchCase="\'month\'" class="bs-media-container">\n <bs-month-calendar-view\n *ngFor="let calendar of monthsCalendar | async"\n [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1"\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="setViewMode($event)"\n (onHover)="monthHoverHandler($event)"\n (onSelect)="monthSelectHandler($event)">\n </bs-month-calendar-view>\n </div>\n\n \x3c!--years calendar--\x3e\n <div *ngSwitchCase="\'year\'" class="bs-media-container">\n <bs-years-calendar-view\n *ngFor="let calendar of yearsCalendar | async"\n [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1"\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="setViewMode($event)"\n (onHover)="yearHoverHandler($event)"\n (onSelect)="yearSelectHandler($event)">\n </bs-years-calendar-view>\n </div>\n </div>\n\n \x3c!--applycancel buttons--\x3e\n <div class="bs-datepicker-buttons" *ngIf="false">\n <button class="btn btn-success" type="button">Apply</button>\n <button class="btn btn-default" type="button">Cancel</button>\n </div>\n </div>\n\n \x3c!--custom dates or date ranges picker--\x3e\n <div class="bs-datepicker-custom-range" *ngIf="customRanges?.length > 0">\n <bs-custom-date-view \n [selectedRange]="chosenRange" \n [ranges]="customRanges"\n (onSelect)="setRangeOnCalendar($event)">\n </bs-custom-date-view>\n </div>\n</div>\n',host:{"(click)":"_stopPropagation($event)"},animations:[Y]}]}],n.ctorParameters=function(){return[{type:t.Renderer2},{type:b},{type:N},{type:t.ElementRef},{type:g},{type:D},{type:r.PositioningService}]},n}(B),U=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._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.setConfig()),e.maxDate&&(this._datepickerRef.instance.maxDate=this.maxDate,this.setConfig()),e.datesDisabled&&(this._datepickerRef.instance.datesDisabled=this.datesDisabled,this.setConfig()),e.datesEnabled&&(this._datepickerRef.instance.datesEnabled=this.datesEnabled,this._datepickerRef.instance.value=this._bsValue),e.isDisabled&&(this._datepickerRef.instance.isDisabled=this.isDisabled,this.setConfig()),e.dateCustomClasses&&(this._datepickerRef.instance.dateCustomClasses=this.dateCustomClasses,this.setConfig()))},e.prototype.setConfig=function(){this._datepicker&&this._datepicker.hide(),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,datesEnabled:this.datesEnabled||this.bsConfig&&this.bsConfig.datesEnabled}),this._datepickerRef=this._datepicker.provide({provide:b,useValue:this._config}).attach(G).to(this._elementRef).show()},e.prototype.ngOnDestroy=function(){this._datepicker.dispose()},e.decorators=[{type:t.Directive,args:[{selector:"bs-datepicker-inline",exportAs:"bsDatepickerInline"}]}],e.ctorParameters=function(){return[{type:W},{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}],datesEnabled:[{type:t.Input}],datesDisabled:[{type:t.Input}],bsValueChange:[{type:t.Output}]},e}();var q=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.displayMonths=2,t.isAnimated=!1,t}return p(n,e),n.decorators=[{type:t.Injectable}],n}(b);var Z=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.chosenRange=[],d._subs=[],d._effects=o,d.customRanges=d._config.ranges,n.setStyle(s.nativeElement,"display","block"),n.setStyle(s.nativeElement,"position","absolute"),d}return p(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){e.valueChange.emit(t),e.chosenRange=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){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.prototype.setRangeOnCalendar=function(e){this._rangeStack=null===e?[]:e.value instanceof Date?[e.value]:e.value,this._store.dispatch(this._actions.selectRange(this._rangeStack))},a.decorators=[{type:t.Component,args:[{selector:"bs-daterangepicker-container",providers:[N,D],template:'\x3c!-- days calendar view mode --\x3e\n<div class="bs-datepicker" [ngClass]="containerClass" *ngIf="viewMode | async">\n <div class="bs-datepicker-container"\n [@datepickerAnimation]="animationState"\n (@datepickerAnimation.done)="positionServiceEnable()">\n \x3c!--calendars--\x3e\n <div class="bs-calendar-container" [ngSwitch]="viewMode | async" role="application">\n \x3c!--days calendar--\x3e\n <div *ngSwitchCase="\'day\'" class="bs-media-container">\n <bs-days-calendar-view\n *ngFor="let calendar of daysCalendar | async"\n [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1"\n [calendar]="calendar"\n [options]="options | async"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="setViewMode($event)"\n (onHover)="dayHoverHandler($event)"\n (onHoverWeek)="weekHoverHandler($event)"\n (onSelect)="daySelectHandler($event)">\n </bs-days-calendar-view>\n </div>\n\n \x3c!--months calendar--\x3e\n <div *ngSwitchCase="\'month\'" class="bs-media-container">\n <bs-month-calendar-view\n *ngFor="let calendar of monthsCalendar | async"\n [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1"\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="setViewMode($event)"\n (onHover)="monthHoverHandler($event)"\n (onSelect)="monthSelectHandler($event)">\n </bs-month-calendar-view>\n </div>\n\n \x3c!--years calendar--\x3e\n <div *ngSwitchCase="\'year\'" class="bs-media-container">\n <bs-years-calendar-view\n *ngFor="let calendar of yearsCalendar | async"\n [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1"\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="setViewMode($event)"\n (onHover)="yearHoverHandler($event)"\n (onSelect)="yearSelectHandler($event)">\n </bs-years-calendar-view>\n </div>\n </div>\n\n \x3c!--applycancel buttons--\x3e\n <div class="bs-datepicker-buttons" *ngIf="false">\n <button class="btn btn-success" type="button">Apply</button>\n <button class="btn btn-default" type="button">Cancel</button>\n </div>\n </div>\n\n \x3c!--custom dates or date ranges picker--\x3e\n <div class="bs-datepicker-custom-range" *ngIf="customRanges?.length > 0">\n <bs-custom-date-view \n [selectedRange]="chosenRange" \n [ranges]="customRanges"\n (onSelect)="setRangeOnCalendar($event)">\n </bs-custom-date-view>\n </div>\n</div>\n',host:{class:"bottom","(click)":"_stopPropagation($event)",role:"dialog","aria-label":"calendar"},animations:[Y]}]}],a.ctorParameters=function(){return[{type:t.Renderer2},{type:b},{type:N},{type:t.ElementRef},{type:g},{type:D},{type:r.PositioningService}]},a}(m);var 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 p(n,e),n.decorators=[{type:t.Component,args:[{selector:"bs-daterangepicker-inline-container",providers:[N,D],template:'\x3c!-- days calendar view mode --\x3e\n<div class="bs-datepicker" [ngClass]="containerClass" *ngIf="viewMode | async">\n <div class="bs-datepicker-container"\n [@datepickerAnimation]="animationState"\n (@datepickerAnimation.done)="positionServiceEnable()">\n \x3c!--calendars--\x3e\n <div class="bs-calendar-container" [ngSwitch]="viewMode | async" role="application">\n \x3c!--days calendar--\x3e\n <div *ngSwitchCase="\'day\'" class="bs-media-container">\n <bs-days-calendar-view\n *ngFor="let calendar of daysCalendar | async"\n [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1"\n [calendar]="calendar"\n [options]="options | async"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="setViewMode($event)"\n (onHover)="dayHoverHandler($event)"\n (onHoverWeek)="weekHoverHandler($event)"\n (onSelect)="daySelectHandler($event)">\n </bs-days-calendar-view>\n </div>\n\n \x3c!--months calendar--\x3e\n <div *ngSwitchCase="\'month\'" class="bs-media-container">\n <bs-month-calendar-view\n *ngFor="let calendar of monthsCalendar | async"\n [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1"\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="setViewMode($event)"\n (onHover)="monthHoverHandler($event)"\n (onSelect)="monthSelectHandler($event)">\n </bs-month-calendar-view>\n </div>\n\n \x3c!--years calendar--\x3e\n <div *ngSwitchCase="\'year\'" class="bs-media-container">\n <bs-years-calendar-view\n *ngFor="let calendar of yearsCalendar | async"\n [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1"\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="setViewMode($event)"\n (onHover)="yearHoverHandler($event)"\n (onSelect)="yearSelectHandler($event)">\n </bs-years-calendar-view>\n </div>\n </div>\n\n \x3c!--applycancel buttons--\x3e\n <div class="bs-datepicker-buttons" *ngIf="false">\n <button class="btn btn-success" type="button">Apply</button>\n <button class="btn btn-default" type="button">Cancel</button>\n </div>\n </div>\n\n \x3c!--custom dates or date ranges picker--\x3e\n <div class="bs-datepicker-custom-range" *ngIf="customRanges?.length > 0">\n <bs-custom-date-view \n [selectedRange]="chosenRange" \n [ranges]="customRanges"\n (onSelect)="setRangeOnCalendar($event)">\n </bs-custom-date-view>\n </div>\n</div>\n',host:{"(click)":"_stopPropagation($event)"},animations:[Y]}]}],n.ctorParameters=function(){return[{type:t.Renderer2},{type:b},{type:N},{type:t.ElementRef},{type:g},{type:D},{type:r.PositioningService}]},n}(Z),Q=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._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,this.setConfig()),e.maxDate&&(this._datepickerRef.instance.maxDate=this.maxDate,this.setConfig()),e.datesEnabled&&(this._datepickerRef.instance.datesEnabled=this.datesEnabled),e.datesDisabled&&(this._datepickerRef.instance.datesDisabled=this.datesDisabled,this.setConfig()),e.daysDisabled&&(this._datepickerRef.instance.daysDisabled=this.daysDisabled,this.setConfig()),e.isDisabled&&(this._datepickerRef.instance.isDisabled=this.isDisabled,this.setConfig()),e.dateCustomClasses&&(this._datepickerRef.instance.dateCustomClasses=this.dateCustomClasses,this.setConfig()))},e.prototype.setConfig=function(){this._datepicker&&this._datepicker.hide(),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,datesEnabled:this.datesEnabled||this.bsConfig&&this.bsConfig.datesEnabled,ranges:this.bsConfig&&this.bsConfig.ranges}),this._datepickerRef=this._datepicker.provide({provide:b,useValue:this._config}).attach(K).to(this._elementRef).show()},e.prototype.ngOnDestroy=function(){this._datepicker.dispose()},e.decorators=[{type:t.Directive,args:[{selector:"bs-daterangepicker-inline",exportAs:"bsDaterangepickerInline"}]}],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}],daysDisabled:[{type:t.Input}],datesDisabled:[{type:t.Input}],datesEnabled:[{type:t.Input}],bsValueChange:[{type:t.Output}]},e}();var X={provide:d.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return ee})),multi:!0},J={provide:d.NG_VALIDATORS,useExisting:t.forwardRef((function(){return ee})),multi:!0},ee=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.onKeydownEvent=function(e){13!==e.keyCode&&"Enter"!==e.code||this.hide()},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._picker._config.returnFocusToInput&&this._renderer.selectRootElement(this._elRef.nativeElement).focus(),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 this.writeValue(this._picker.minDate),{bsDate:{minDate:this._picker.minDate}};if(this._picker&&this._picker.maxDate&&a.isAfter(t,this._picker.maxDate,"date"))return this.writeValue(this._picker.maxDate),{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(),this._picker._config.returnFocusToInput&&this._renderer.selectRootElement(this._elRef.nativeElement).focus()},e.decorators=[{type:t.Directive,args:[{selector:"input[bsDatepicker]",host:{"(change)":"onChange($event)","(keyup.esc)":"hide()","(keydown)":"onKeydownEvent($event)","(blur)":"onBlur()"},providers:[X,J]}]}],e.ctorParameters=function(){return[{type:z,decorators:[{type:t.Host}]},{type:v},{type:t.Renderer2},{type:t.ElementRef},{type:t.ChangeDetectorRef}]},e}();var te=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.displayMonths=2,t}return p(n,e),n.decorators=[{type:t.Injectable}],n}(b);var ne=function(){function e(e,n,a,s,r){this._config=e,this._elementRef=n,this._renderer=a,this.placement="bottom",this.triggers="click",this.outsideClick=!0,this.container="body",this.outsideEsc=!0,this.bsValueChange=new t.EventEmitter,this._subs=[],this._datepicker=r.createLoader(n,s,a),Object.assign(this,e),this.onShown=this._datepicker.onShown,this.onHidden=this._datepicker.onHidden,this.isOpen$=new i.BehaviorSubject(this.isOpen)}return Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._datepicker.isShown},set:function(e){this.isOpen$.next(e)},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.isDestroy$=new i.Subject,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.datesEnabled&&(this._datepickerRef.instance.datesEnabled=this.datesEnabled),e.daysDisabled&&(this._datepickerRef.instance.daysDisabled=this.daysDisabled),e.isDisabled&&(this._datepickerRef.instance.isDisabled=this.isDisabled),e.dateCustomClasses&&(this._datepickerRef.instance.dateCustomClasses=this.dateCustomClasses))},e.prototype.ngAfterViewInit=function(){var e=this;this.isOpen$.pipe(n.filter((function(t){return t!==e.isOpen})),n.takeUntil(this.isDestroy$)).subscribe((function(){return e.toggle()}))},e.prototype.show=function(){var e=this;this._datepicker.isShown||(this.setConfig(),this._datepickerRef=this._datepicker.provide({provide:b,useValue:this._config}).attach(Z).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,daysDisabled:this.daysDisabled||this.bsConfig&&this.bsConfig.daysDisabled,dateCustomClasses:this.dateCustomClasses||this.bsConfig&&this.bsConfig.dateCustomClasses,datesDisabled:this.datesDisabled||this.bsConfig&&this.bsConfig.datesDisabled,datesEnabled:this.datesEnabled||this.bsConfig&&this.bsConfig.datesEnabled,ranges:this.bsConfig&&this.bsConfig.ranges})},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}}this._config.returnFocusToInput&&this._renderer.selectRootElement(this._elementRef.nativeElement).focus()},e.prototype.toggle=function(){if(this.isOpen)return this.hide();this.show()},e.prototype.ngOnDestroy=function(){this._datepicker.dispose(),this.isOpen$.next(!1),this.isDestroy$&&(this.isDestroy$.next(),this.isDestroy$.complete())},e.decorators=[{type:t.Directive,args:[{selector:"[bsDaterangepicker]",exportAs:"bsDaterangepicker"}]}],e.ctorParameters=function(){return[{type:te},{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}],daysDisabled:[{type:t.Input}],datesDisabled:[{type:t.Input}],datesEnabled:[{type:t.Input}],bsValueChange:[{type:t.Output}]},e}();var 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.onKeydownEvent=function(e){13!==e.keyCode&&"Enter"!==e.code||this.hide()},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._picker._config.returnFocusToInput&&this._renderer.selectRootElement(this._elRef.nativeElement).focus(),this._onTouched()},e.prototype.validate=function(e){var t=e.value,n=[];if(null==t||!a.isArray(t))return null;t.sort((function(e,t){return e-t}));var i=a.isDateValid(t[0]),s=a.isDateValid(t[1]);return i?s?(this._picker&&this._picker.minDate&&a.isBefore(t[0],this._picker.minDate,"date")&&(t[0]=this._picker.minDate,n.push({bsDate:{minDate:this._picker.minDate}})),this._picker&&this._picker.maxDate&&a.isAfter(t[1],this._picker.maxDate,"date")&&(t[1]=this._picker.maxDate,n.push({bsDate:{maxDate:this._picker.maxDate}})),n.length>0?(this.writeValue(t),n):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(),this._picker._config.returnFocusToInput&&this._renderer.selectRootElement(this._elRef.nativeElement).focus()},e.decorators=[{type:t.Directive,args:[{selector:"input[bsDaterangepicker]",host:{"(change)":"onChange($event)","(keyup.esc)":"hide()","(keydown)":"onKeydownEvent($event)","(blur)":"onBlur()"},providers:[ae,ie]}]}],e.ctorParameters=function(){return[{type:ne,decorators:[{type:t.Host}]},{type:v},{type:t.Renderer2},{type:t.ElementRef},{type:t.ChangeDetectorRef}]},e}();var re=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 <bs-current-date title="hey there" *ngIf="false"></bs-current-date>\n\n \x3c!--navigation--\x3e\n <div class="bs-datepicker-head">\n <ng-content select="bs-datepicker-navigation-view"></ng-content>\n </div>\n\n <div class="bs-datepicker-body">\n <ng-content></ng-content>\n </div>\n\n \x3c!--timepicker--\x3e\n <bs-timepicker *ngIf="false"></bs-timepicker>\n '}]}],e}(),oe=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"bs-current-date",template:'<div class="current-timedate"><span>{{ title }}</span></div>'}]}],e.propDecorators={title:[{type:t.Input}]},e}();var ce=function(){function e(){this.onSelect=new t.EventEmitter,this.customRange=null}return e.prototype.selectFromRanges=function(e){this.onSelect.emit(e)},e.prototype.checkRange=function(){var e=this;return!!this.ranges&&this.ranges.filter((function(t){return t.value===e.selectedRange})).length>0},e.decorators=[{type:t.Component,args:[{selector:"bs-custom-date-view",template:'\n <div class="bs-datepicker-predefined-btns">\n <button *ngFor="let range of ranges"\n type="button"\n class="btn"\n (click)="selectFromRanges(range)"\n [class.selected]="range.value === selectedRange">\n {{ range.label }}\n </button>\n <button\n type="button"\n class="btn"\n (click)="selectFromRanges(customRange)"\n [class.selected]="!checkRange()">\n Custom Range\n </button>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.propDecorators={ranges:[{type:t.Input}],selectedRange:[{type:t.Input}],onSelect:[{type:t.Output}]},e}();var de=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}();var le={UP:0,DOWN:1};le[le.UP]="UP",le[le.DOWN]="DOWN";var he=function(){function e(){this.onNavigate=new t.EventEmitter,this.onViewMode=new t.EventEmitter}return e.prototype.navTo=function(e){this.onNavigate.emit(e?le.DOWN:le.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 <button class="previous"\n [disabled]="calendar.disableLeftArrow"\n [style.visibility]="calendar.hideLeftArrow ? \'hidden\' : \'visible\'"\n type="button"\n (click)="navTo(true)">\n <span>&lsaquo;</span>\n </button>\n\n <ng-container *ngIf="calendar.monthTitle">\n &#8203; \x3c!-- zero-width space needed for correct alignement\n with preserveWhitespaces: false in Angular --\x3e\n\n <button class="current"\n type="button"\n (click)="view(\'month\')"\n ><span>{{ calendar.monthTitle }}</span>\n </button>\n </ng-container>\n\n &#8203; \x3c!-- zero-width space needed for correct alignement\n with preserveWhitespaces: false in Angular --\x3e\n\n <button class="current" (click)="view(\'year\')" type="button">\n <span>{{ calendar.yearTitle }}</span>\n </button>\n\n &#8203; \x3c!-- zero-width space needed for correct alignement\n with preserveWhitespaces: false in Angular --\x3e\n\n <button class="next"\n [disabled]="calendar.disableRightArrow"\n [style.visibility]="calendar.hideRightArrow ? \'hidden\' : \'visible\'"\n type="button"\n (click)="navTo(false)"><span>&rsaquo;</span>\n </button>\n '}]}],e.propDecorators={calendar:[{type:t.Input}],onNavigate:[{type:t.Output}],onViewMode:[{type:t.Output}]},e}();var ue=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=le.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||this._config.selectWeekDateRange)&&0!==e.days.length)if(this._config.selectWeek&&e.days[0]&&!e.days[0].isDisabled&&this._config.selectFromOtherMonth)this.onSelect.emit(e.days[0]);else{var n=e.days.find((function(e){return t._config.selectFromOtherMonth?!e.isDisabled:!e.isOtherMonth&&!e.isDisabled}));if(this.onSelect.emit(n),this._config.selectWeekDateRange){var a=e.days.slice(0).reverse().find((function(e){return t._config.selectFromOtherMonth?!e.isDisabled:!e.isOtherMonth&&!e.isDisabled}));this.onSelect.emit(a)}}},e.prototype.weekHoverHandler=function(e,t){var n=this;(this._config.selectWeek||this._config.selectWeekDateRange)&&(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 <bs-calendar-layout>\n <bs-datepicker-navigation-view\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="changeViewMode($event)"\n ></bs-datepicker-navigation-view>\n\n \x3c!--days matrix--\x3e\n <table role="grid" class="days weeks">\n <thead>\n <tr>\n \x3c!--if show weeks--\x3e\n <th *ngIf="options.showWeekNumbers"></th>\n <th *ngFor="let weekday of calendar.weekdays; let i = index"\n aria-label="weekday">{{ calendar.weekdays[i] }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor="let week of calendar.weeks; let i = index">\n <td class="week" [class.active-week]="isWeekHovered" *ngIf="options.showWeekNumbers">\n <span\n (click)="selectWeek(week)"\n (mouseenter)="weekHoverHandler(week, true)"\n (mouseleave)="weekHoverHandler(week, false)">{{ calendar.weekNumbers[i] }}</span>\n </td>\n <td *ngFor="let day of week.days" role="gridcell">\n <span bsDatepickerDayDecorator\n [day]="day"\n (click)="selectDay(day)"\n (mouseenter)="hoverDay(day, true)"\n (mouseleave)="hoverDay(day, false)">{{ day.label }}</span>\n </td>\n </tr>\n </tbody>\n </table>\n\n </bs-calendar-layout>\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}();var pe=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=le.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 <bs-calendar-layout>\n <bs-datepicker-navigation-view\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="changeViewMode($event)"\n ></bs-datepicker-navigation-view>\n\n <table role="grid" class="months">\n <tbody>\n <tr *ngFor="let row of calendar.months">\n <td *ngFor="let month of row" role="gridcell"\n (click)="viewMonth(month)"\n (mouseenter)="hoverMonth(month, true)"\n (mouseleave)="hoverMonth(month, false)"\n [class.disabled]="month.isDisabled"\n [class.is-highlighted]="month.isHovered">\n <span [class.selected]="month.isSelected">{{ month.label }}</span>\n </td>\n </tr>\n </tbody>\n </table>\n </bs-calendar-layout>\n '}]}],e.propDecorators={calendar:[{type:t.Input}],onNavigate:[{type:t.Output}],onViewMode:[{type:t.Output}],onSelect:[{type:t.Output}],onHover:[{type:t.Output}]},e}();var fe=function(){function e(){this.ampm="ok",this.hours=0,this.minutes=0}return e.decorators=[{type:t.Component,args:[{selector:"bs-timepicker",template:'\n <div class="bs-timepicker-container">\n <div class="bs-timepicker-controls">\n <button class="bs-decrease" type="button">-</button>\n <input type="text" [value]="hours" placeholder="00">\n <button class="bs-increase" type="button">+</button>\n </div>\n <div class="bs-timepicker-controls">\n <button class="bs-decrease" type="button">-</button>\n <input type="text" [value]="minutes" placeholder="00">\n <button class="bs-increase" type="button">+</button>\n </div>\n <button class="switch-time-format" type="button">{{ ampm }}\n <img\n src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAYAAABi8KSDAAABSElEQVQYV3XQPUvDUBQG4HNuagtVqc6KgouCv6GIuIntYBLB9hcIQpLStCAIV7DYmpTcRWcXqZio3Vwc/UCc/QEqfgyKGbr0I7nS1EiHeqYzPO/h5SD0jaxUZjmSLCB+OFb+UFINFwASAEAdpu9gaGXVyAHHFQBkHpKHc6a9dzECvADyY9sqlAMsK9W0jzxDXqeytr3mhQckxSji27TJJ5/rPmIpwJJq3HrtduriYOurv1a4i1p5HnhkG9OFymi0ReoO05cGwb+ayv4dysVygjeFmsP05f8wpZQ8fsdvfmuY9zjWSNqUtgYFVnOVReILYoBFzdQI5/GGFzNHhGbeZnopDGU29sZbscgldmC99w35VOATTycIMMcBXIfpSVGzZhA6C8hh00conln6VQ9TGgV32OEAKQC4DrBq7CJwd0ggR7Vq/rPrfgB+C3sGypY5DAAAAABJRU5ErkJggg=="\n alt="">\n </button>\n </div>\n '}]}],e}();var ye=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=le.DOWN===e?-1:1;this.onNavigate.emit({step:{year:16*t}})},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 <bs-calendar-layout>\n <bs-datepicker-navigation-view\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="changeViewMode($event)"\n ></bs-datepicker-navigation-view>\n\n <table role="grid" class="years">\n <tbody>\n <tr *ngFor="let row of calendar.years">\n <td *ngFor="let year of row" role="gridcell"\n (click)="viewYear(year)"\n (mouseenter)="hoverYear(year, true)"\n (mouseleave)="hoverYear(year, false)"\n [class.disabled]="year.isDisabled"\n [class.is-highlighted]="year.isHovered">\n <span [class.selected]="year.isSelected">{{ year.label }}</span>\n </td>\n </tr>\n </tbody>\n </table>\n </bs-calendar-layout>\n '}]}],e.propDecorators={calendar:[{type:t.Input}],onNavigate:[{type:t.Output}],onViewMode:[{type:t.Output}],onSelect:[{type:t.Output}],onHover:[{type:t.Output}]},e}();var be=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[c.ComponentLoaderFactory,r.PositioningService,N,g,b,te,W,q,D,v]}},e.decorators=[{type:t.NgModule,args:[{imports:[l.CommonModule],declarations:[re,oe,ce,de,he,ue,pe,fe,ye,B,z,G,U,ee,Z,ne,K,Q,se],entryComponents:[B,Z,G,K],exports:[B,z,G,U,ee,Z,ne,K,Q,se]}]}],e}(),me=function(){function e(){}return e.prototype.format=function(e,t,n){return a.formatDate(e,t,n)},e}(),ge=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 me}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!--&lt;!&ndash;ng-keydown="keydown($event)"&ndash;&gt;--\x3e\n <div *ngIf="datepickerMode" class="well well-sm bg-faded p-a card" role="application" >\n <ng-content></ng-content>\n </div>\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}();var ve=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}();var De={provide:d.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return _e})),multi:!0},_e=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 <datepicker-inner [activeDate]="activeDate"\n (update)="onUpdate($event)"\n [locale]="config.locale"\n [datepickerMode]="datepickerMode"\n [initDate]="initDate"\n [minDate]="minDate"\n [maxDate]="maxDate"\n [minMode]="minMode"\n [maxMode]="maxMode"\n [showWeeks]="showWeeks"\n [formatDay]="formatDay"\n [formatMonth]="formatMonth"\n [formatYear]="formatYear"\n [formatDayHeader]="formatDayHeader"\n [formatDayTitle]="formatDayTitle"\n [formatMonthTitle]="formatMonthTitle"\n [startingDay]="startingDay"\n [yearRange]="yearRange"\n [customClass]="customClass"\n [dateDisabled]="dateDisabled"\n [dayDisabled]="dayDisabled"\n [onlyCurrentMonth]="onlyCurrentMonth"\n [shortcutPropagation]="shortcutPropagation"\n [monthColLimit]="monthColLimit"\n [yearColLimit]="yearColLimit"\n (selectionDone)="onSelectionDone($event)"\n (activeDateChange)="onActiveDateChange($event)">\n <daypicker tabindex="0"></daypicker>\n <monthpicker tabindex="0"></monthpicker>\n <yearpicker tabindex="0"></yearpicker>\n </datepicker-inner>\n ',providers:[De]}]}],e.ctorParameters=function(){return[{type:ve}]},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:[ge,{static:!0}]}]},e}();var ke=function(){function e(e){this.labels=[],this.rows=[],this.weekNumbers=[],this.datePicker=e}return Object.defineProperty(e.prototype,"isBs4",{get:function(){return!h.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 h=0;h<7;h++)e.labels[h]={},e.labels[h].abbr=this.dateFilter(c[h].date,this.formatDayHeader),e.labels[h].full=this.dateFilter(c[h].date,"EEEE");if(e.title=this.dateFilter(this.activeDate,this.formatDayTitle),e.rows=this.split(c,7),this.showWeeks){e.weekNumbers=[];for(var u=(11-this.startingDay)%7,p=e.rows.length,f=0;f<p;f++)e.weekNumbers.push(e.getISO8601WeekNumber(e.rows[f][u].date))}}),"day"),this.datePicker.setCompareHandler((function(e,t){var n=new Date(e.getFullYear(),e.getMonth(),e.getDate()),a=new Date(t.getFullYear(),t.getMonth(),t.getDate());return n.getTime()-a.getTime()}),"day"),this.datePicker.refreshView()},e.prototype.getDates=function(e,t){for(var n,a=new Array(t),i=new Date(e.getTime()),s=0;s<t;)n=new Date(i.getTime()),n=this.datePicker.fixTimeZone(n),a[s++]=n,i=new Date(n.getFullYear(),n.getMonth(),n.getDate()+1);return a},e.prototype.getISO8601WeekNumber=function(e){var t=new Date(e.getTime());t.setDate(t.getDate()+4-(t.getDay()||7));var n=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((n-t.getTime())/864e5)/7)+1},e.decorators=[{type:t.Component,args:[{selector:"daypicker",template:'\n<table *ngIf="datePicker.datepickerMode === \'day\'" role="grid" [attr.aria-labelledby]="datePicker.uniqueId + \'-title\'" aria-activedescendant="activeDateId">\n <thead>\n <tr>\n <th>\n <button *ngIf="!isBs4"\n type="button"\n class="btn btn-default btn-secondary btn-sm pull-left float-left"\n (click)="datePicker.move(-1)"\n tabindex="-1">‹</button>\n <button *ngIf="isBs4"\n type="button"\n class="btn btn-default btn-secondary btn-sm pull-left float-left"\n (click)="datePicker.move(-1)"\n tabindex="-1">&lt;</button>\n </th>\n <th [attr.colspan]="5 + (datePicker.showWeeks ? 1 : 0)">\n <button [id]="datePicker.uniqueId + \'-title\'"\n type="button" class="btn btn-default btn-secondary btn-sm"\n (click)="datePicker.toggleMode(0)"\n [disabled]="datePicker.datepickerMode === datePicker.maxMode"\n [ngClass]="{disabled: datePicker.datepickerMode === datePicker.maxMode}" tabindex="-1" style="width:100%;">\n <strong>{{ title }}</strong>\n </button>\n </th>\n <th>\n <button *ngIf="!isBs4"\n type="button"\n class="btn btn-default btn-secondary btn-sm pull-right float-right"\n (click)="datePicker.move(1)"\n tabindex="-1">›</button>\n <button *ngIf="isBs4"\n type="button"\n class="btn btn-default btn-secondary btn-sm pull-right float-right"\n (click)="datePicker.move(1)"\n tabindex="-1">&gt;\n </button>\n </th>\n </tr>\n <tr>\n <th *ngIf="datePicker.showWeeks"></th>\n <th *ngFor="let labelz of labels" class="text-center">\n <small aria-label="labelz.full"><b>{{ labelz.abbr }}</b></small>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-template ngFor [ngForOf]="rows" let-rowz="$implicit" let-index="index">\n <tr *ngIf="!(datePicker.onlyCurrentMonth && rowz[0].secondary && rowz[6].secondary)">\n <td *ngIf="datePicker.showWeeks" class="h6" class="text-center">\n <em>{{ weekNumbers[index] }}</em>\n </td>\n <td *ngFor="let dtz of rowz" class="text-center" role="gridcell" [id]="dtz.uid">\n <button type="button" style="min-width:100%;" class="btn btn-sm {{dtz.customClass}}"\n *ngIf="!(datePicker.onlyCurrentMonth && dtz.secondary)"\n [ngClass]="{\'btn-secondary\': isBs4 && !dtz.selected && !datePicker.isActive(dtz), \'btn-info\': dtz.selected, disabled: dtz.disabled, active: !isBs4 && datePicker.isActive(dtz), \'btn-default\': !isBs4}"\n [disabled]="dtz.disabled"\n (click)="datePicker.select(dtz.date)" tabindex="-1">\n <span [ngClass]="{\'text-muted\': dtz.secondary || dtz.current, \'text-info\': !isBs4 && dtz.current}">{{ dtz.label }}</span>\n </button>\n </td>\n </tr>\n </ng-template>\n </tbody>\n</table>\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:ge}]},e}();var we=function(){function e(e){this.rows=[],this.datePicker=e}return Object.defineProperty(e.prototype,"isBs4",{get:function(){return!h.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<table *ngIf="datePicker.datepickerMode===\'month\'" role="grid">\n <thead>\n <tr>\n <th>\n <button type="button" class="btn btn-default btn-sm pull-left float-left"\n (click)="datePicker.move(-1)" tabindex="-1">‹</button></th>\n <th [attr.colspan]="((datePicker.monthColLimit - 2) <= 0) ? 1 : datePicker.monthColLimit - 2">\n <button [id]="datePicker.uniqueId + \'-title\'"\n type="button" class="btn btn-default btn-sm"\n (click)="datePicker.toggleMode(0)"\n [disabled]="datePicker.datepickerMode === maxMode"\n [ngClass]="{disabled: datePicker.datepickerMode === maxMode}" tabindex="-1" style="width:100%;">\n <strong>{{ title }}</strong> \n </button>\n </th>\n <th>\n <button type="button" class="btn btn-default btn-sm pull-right float-right"\n (click)="datePicker.move(1)" tabindex="-1">›</button>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor="let rowz of rows">\n <td *ngFor="let dtz of rowz" class="text-center" role="gridcell" [attr.id]="dtz.uid" [ngClass]="dtz.customClass">\n <button type="button" style="min-width:100%;" class="btn btn-default"\n [ngClass]="{\'btn-link\': isBs4 && !dtz.selected && !datePicker.isActive(dtz), \'btn-info\': dtz.selected || (isBs4 && !dtz.selected && datePicker.isActive(dtz)), disabled: dtz.disabled, active: !isBs4 && datePicker.isActive(dtz)}"\n [disabled]="dtz.disabled"\n (click)="datePicker.select(dtz.date)" tabindex="-1">\n <span [ngClass]="{\'text-success\': isBs4 && dtz.current, \'text-info\': !isBs4 && dtz.current}">{{ dtz.label }}</span>\n </button>\n </td>\n </tr>\n </tbody>\n</table>\n ',styles:["\n :host .btn-info .text-success {\n color: #fff !important;\n }\n "]}]}],e.ctorParameters=function(){return[{type:ge}]},e}();var Ce=function(){function e(e){this.rows=[],this.datePicker=e}return Object.defineProperty(e.prototype,"isBs4",{get:function(){return!h.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<this.yearRange;i++)t=new Date(a+i,0,1),t=this.fixTimeZone(t),n[i]=this.createDateObject(t,this.formatYear),n[i].uid=this.uniqueId+"-"+i;e.title=[n[0].label,n[this.yearRange-1].label].join(" - "),e.rows=this.split(n,e.datePicker.yearColLimit)}),"year"),this.datePicker.setCompareHandler((function(e,t){return e.getFullYear()-t.getFullYear()}),"year"),this.datePicker.refreshView()},e.prototype.getStartingYear=function(e){return(e-1)/this.datePicker.yearRange*this.datePicker.yearRange+1},e.decorators=[{type:t.Component,args:[{selector:"yearpicker",template:'\n<table *ngIf="datePicker.datepickerMode===\'year\'" role="grid">\n <thead>\n <tr>\n <th>\n <button type="button" class="btn btn-default btn-sm pull-left float-left"\n (click)="datePicker.move(-1)" tabindex="-1">‹</button>\n </th>\n <th [attr.colspan]="((datePicker.yearColLimit - 2) <= 0) ? 1 : datePicker.yearColLimit - 2">\n <button [id]="datePicker.uniqueId + \'-title\'" role="heading"\n type="button" class="btn btn-default btn-sm"\n (click)="datePicker.toggleMode(0)"\n [disabled]="datePicker.datepickerMode === datePicker.maxMode"\n [ngClass]="{disabled: datePicker.datepickerMode === datePicker.maxMode}" tabindex="-1" style="width:100%;">\n <strong>{{ title }}</strong>\n </button>\n </th>\n <th>\n <button type="button" class="btn btn-default btn-sm pull-right float-right"\n (click)="datePicker.move(1)" tabindex="-1">›</button>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor="let rowz of rows">\n <td *ngFor="let dtz of rowz" class="text-center" role="gridcell" [attr.id]="dtz.uid">\n <button type="button" style="min-width:100%;" class="btn btn-default"\n [ngClass]="{\'btn-link\': isBs4 && !dtz.selected && !datePicker.isActive(dtz), \'btn-info\': dtz.selected || (isBs4 && !dtz.selected && datePicker.isActive(dtz)), disabled: dtz.disabled, active: !isBs4 && datePicker.isActive(dtz)}"\n [disabled]="dtz.disabled"\n (click)="datePicker.select(dtz.date)" tabindex="-1">\n <span [ngClass]="{\'text-success\': isBs4 && dtz.current, \'text-info\': !isBs4 && dtz.current}">{{ dtz.label }}</span>\n </button>\n </td>\n </tr>\n </tbody>\n</table>\n ',styles:["\n :host .btn-info .text-success {\n color: #fff !important;\n }\n "]}]}],e.ctorParameters=function(){return[{type:ge}]},e}();var Me=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[ve]}},e.decorators=[{type:t.NgModule,args:[{imports:[l.CommonModule,d.FormsModule],declarations:[_e,ge,ke,we,Ce],exports:[_e,ge,ke,we,Ce],entryComponents:[_e]}]}],e}();e.BsDatepickerConfig=b,e.BsDatepickerContainerComponent=B,e.BsDatepickerDirective=z,e.BsDatepickerInlineConfig=W,e.BsDatepickerInlineContainerComponent=G,e.BsDatepickerInlineDirective=U,e.BsDatepickerInputDirective=ee,e.BsDatepickerModule=be,e.BsDaterangepickerConfig=te,e.BsDaterangepickerContainerComponent=Z,e.BsDaterangepickerDirective=ne,e.BsDaterangepickerInlineConfig=q,e.BsDaterangepickerInlineContainerComponent=K,e.BsDaterangepickerInlineDirective=Q,e.BsDaterangepickerInputDirective=se,e.BsLocaleService=v,e.DateFormatter=me,e.DatePickerComponent=_e,e.DatePickerInnerComponent=ge,e.DatepickerConfig=ve,e.DatepickerModule=Me,e.DayPickerComponent=ke,e.MonthPickerComponent=we,e.YearPickerComponent=Ce,e.ɵa=De,e.ɵb=m,e.ɵc=N,e.ɵd=D,e.ɵe=g,e.ɵf=Y,e.ɵg=re,e.ɵh=oe,e.ɵi=ce,e.ɵj=de,e.ɵk=he,e.ɵl=ue,e.ɵm=pe,e.ɵn=fe,e.ɵo=ye,Object.defineProperty(e,"__esModule",{value:!0})}));
15
+ ***************************************************************************** */var u=function(e,t){return(u=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 p(e,t){function n(){this.constructor=e}u(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}var b=function(){function e(){this.adaptivePosition=!1,this.useUtc=!1,this.isAnimated=!1,this.returnFocusToInput=!1,this.containerClass="theme-green",this.displayMonths=1,this.showWeekNumbers=!0,this.dateInputFormat="L",this.rangeSeparator=" - ",this.rangeInputFormat="L",this.monthTitle="MMMM",this.yearTitle="YYYY",this.dayLabel="D",this.monthLabel="MMMM",this.yearLabel="YYYY",this.weekNumbers="w"}return e.decorators=[{type:t.Injectable}],e}();var m=function(){function e(){this.customRanges=[],this.chosenRange=[]}return Object.defineProperty(e.prototype,"minDate",{set:function(e){this._effects.setMinDate(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxDate",{set:function(e){this._effects.setMaxDate(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"daysDisabled",{set:function(e){this._effects.setDaysDisabled(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"datesDisabled",{set:function(e){this._effects.setDatesDisabled(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"datesEnabled",{set:function(e){this._effects.setDatesEnabled(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisabled",{set:function(e){this._effects.setDisabled(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dateCustomClasses",{set:function(e){this._effects.setDateCustomClasses(e)},enumerable:!0,configurable:!0}),e.prototype.setViewMode=function(e){},e.prototype.navigateTo=function(e){},e.prototype.dayHoverHandler=function(e){},e.prototype.weekHoverHandler=function(e){},e.prototype.monthHoverHandler=function(e){},e.prototype.yearHoverHandler=function(e){},e.prototype.daySelectHandler=function(e){},e.prototype.monthSelectHandler=function(e){},e.prototype.yearSelectHandler=function(e){},e.prototype.setRangeOnCalendar=function(e){},e.prototype._stopPropagation=function(e){e.stopPropagation()},e}();var g=function(){function e(){}return e.prototype.calculate=function(){return{type:e.CALCULATE}},e.prototype.format=function(){return{type:e.FORMAT}},e.prototype.flag=function(){return{type:e.FLAG}},e.prototype.select=function(t){return{type:e.SELECT,payload:t}},e.prototype.changeViewMode=function(t){return{type:e.CHANGE_VIEWMODE,payload:t}},e.prototype.navigateTo=function(t){return{type:e.NAVIGATE_TO,payload:t}},e.prototype.navigateStep=function(t){return{type:e.NAVIGATE_OFFSET,payload:t}},e.prototype.setOptions=function(t){return{type:e.SET_OPTIONS,payload:t}},e.prototype.selectRange=function(t){return{type:e.SELECT_RANGE,payload:t}},e.prototype.hoverDay=function(t){return{type:e.HOVER,payload:t.isHovered?t.cell.date:null}},e.prototype.minDate=function(t){return{type:e.SET_MIN_DATE,payload:t}},e.prototype.maxDate=function(t){return{type:e.SET_MAX_DATE,payload:t}},e.prototype.daysDisabled=function(t){return{type:e.SET_DAYSDISABLED,payload:t}},e.prototype.datesDisabled=function(t){return{type:e.SET_DATESDISABLED,payload:t}},e.prototype.datesEnabled=function(t){return{type:e.SET_DATESENABLED,payload:t}},e.prototype.isDisabled=function(t){return{type:e.SET_IS_DISABLED,payload:t}},e.prototype.setDateCustomClasses=function(t){return{type:e.SET_DATE_CUSTOM_CLASSES,payload:t}},e.prototype.setLocale=function(t){return{type:e.SET_LOCALE,payload:t}},e.CALCULATE="[datepicker] calculate dates matrix",e.FORMAT="[datepicker] format datepicker values",e.FLAG="[datepicker] set flags",e.SELECT="[datepicker] select date",e.NAVIGATE_OFFSET="[datepicker] shift view date",e.NAVIGATE_TO="[datepicker] change view date",e.SET_OPTIONS="[datepicker] update render options",e.HOVER="[datepicker] hover date",e.CHANGE_VIEWMODE="[datepicker] switch view mode",e.SET_MIN_DATE="[datepicker] set min date",e.SET_MAX_DATE="[datepicker] set max date",e.SET_DAYSDISABLED="[datepicker] set days disabled",e.SET_DATESDISABLED="[datepicker] set dates disabled",e.SET_DATESENABLED="[datepicker] set dates enabled",e.SET_IS_DISABLED="[datepicker] set is disabled",e.SET_DATE_CUSTOM_CLASSES="[datepicker] set date custom classes",e.SET_LOCALE="[datepicker] set datepicker locale",e.SELECT_RANGE="[daterangepicker] select dates range",e.decorators=[{type:t.Injectable}],e}();var v=function(){function e(){this._defaultLocale="en",this._locale=new i.BehaviorSubject(this._defaultLocale),this._localeChange=this._locale.asObservable()}return Object.defineProperty(e.prototype,"locale",{get:function(){return this._locale},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"localeChange",{get:function(){return this._localeChange},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentLocale",{get:function(){return this._locale.getValue()},enumerable:!0,configurable:!0}),e.prototype.use=function(e){e!==this.currentLocale&&this._locale.next(e)},e.decorators=[{type:t.Injectable}],e}();var D=function(){function e(e,t){this._actions=e,this._localeService=t,this._subs=[]}return e.prototype.init=function(e){return this._store=e,this},e.prototype.setValue=function(e){this._store.dispatch(this._actions.select(e))},e.prototype.setRangeValue=function(e){this._store.dispatch(this._actions.selectRange(e))},e.prototype.setMinDate=function(e){return this._store.dispatch(this._actions.minDate(e)),this},e.prototype.setMaxDate=function(e){return this._store.dispatch(this._actions.maxDate(e)),this},e.prototype.setDaysDisabled=function(e){return this._store.dispatch(this._actions.daysDisabled(e)),this},e.prototype.setDatesDisabled=function(e){return this._store.dispatch(this._actions.datesDisabled(e)),this},e.prototype.setDatesEnabled=function(e){return this._store.dispatch(this._actions.datesEnabled(e)),this},e.prototype.setDisabled=function(e){return this._store.dispatch(this._actions.isDisabled(e)),this},e.prototype.setDateCustomClasses=function(e){return this._store.dispatch(this._actions.setDateCustomClasses(e)),this},e.prototype.setOptions=function(e){var t=Object.assign({locale:this._localeService.currentLocale},e);return this._store.dispatch(this._actions.setOptions(t)),this},e.prototype.setBindings=function(e){return e.daysCalendar=this._store.select((function(e){return e.flaggedMonths})).pipe(n.filter((function(e){return!!e}))),e.monthsCalendar=this._store.select((function(e){return e.flaggedMonthsCalendar})).pipe(n.filter((function(e){return!!e}))),e.yearsCalendar=this._store.select((function(e){return e.yearsCalendarFlagged})).pipe(n.filter((function(e){return!!e}))),e.viewMode=this._store.select((function(e){return e.view.mode})),e.options=this._store.select((function(e){return e.showWeekNumbers})).pipe(n.map((function(e){return{showWeekNumbers:e}}))),this},e.prototype.setEventHandlers=function(e){var t=this;return e.setViewMode=function(e){t._store.dispatch(t._actions.changeViewMode(e))},e.navigateTo=function(e){t._store.dispatch(t._actions.navigateStep(e.step))},e.dayHoverHandler=function(e){var n=e.cell;n.isOtherMonth||n.isDisabled||(t._store.dispatch(t._actions.hoverDay(e)),n.isHovered=e.isHovered)},e.monthHoverHandler=function(e){e.cell.isHovered=e.isHovered},e.yearHoverHandler=function(e){e.cell.isHovered=e.isHovered},e.monthSelectHandler=function(e){e.isDisabled||t._store.dispatch(t._actions.navigateTo({unit:{month:a.getMonth(e.date),year:a.getFullYear(e.date)},viewMode:"day"}))},e.yearSelectHandler=function(e){e.isDisabled||t._store.dispatch(t._actions.navigateTo({unit:{year:a.getFullYear(e.date)},viewMode:"month"}))},this},e.prototype.registerDatepickerSideEffects=function(){var e=this;return this._subs.push(this._store.select((function(e){return e.view})).subscribe((function(t){e._store.dispatch(e._actions.calculate())}))),this._subs.push(this._store.select((function(e){return e.monthsModel})).pipe(n.filter((function(e){return!!e}))).subscribe((function(t){return e._store.dispatch(e._actions.format())}))),this._subs.push(this._store.select((function(e){return e.formattedMonths})).pipe(n.filter((function(e){return!!e}))).subscribe((function(t){return e._store.dispatch(e._actions.flag())}))),this._subs.push(this._store.select((function(e){return e.selectedDate})).pipe(n.filter((function(e){return!!e}))).subscribe((function(t){return e._store.dispatch(e._actions.flag())}))),this._subs.push(this._store.select((function(e){return e.selectedRange})).pipe(n.filter((function(e){return!!e}))).subscribe((function(t){return e._store.dispatch(e._actions.flag())}))),this._subs.push(this._store.select((function(e){return e.monthsCalendar})).subscribe((function(){return e._store.dispatch(e._actions.flag())}))),this._subs.push(this._store.select((function(e){return e.yearsCalendarModel})).pipe(n.filter((function(e){return!!e}))).subscribe((function(){return e._store.dispatch(e._actions.flag())}))),this._subs.push(this._store.select((function(e){return e.hoveredDate})).pipe(n.filter((function(e){return!!e}))).subscribe((function(t){return e._store.dispatch(e._actions.flag())}))),this._subs.push(this._store.select((function(e){return e.dateCustomClasses})).pipe(n.filter((function(e){return!!e}))).subscribe((function(t){return e._store.dispatch(e._actions.flag())}))),this._subs.push(this._localeService.localeChange.subscribe((function(t){return e._store.dispatch(e._actions.setLocale(t))}))),this},e.prototype.destroy=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}}},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:g},{type:v}]},e}();var _={date:new Date,mode:"day"},k=Object.assign(new b,{locale:"en",view:_,selectedRange:[],monthViewOptions:{width:7,height:6}});function w(e,t,n){var i=t&&a.isBefore(a.endOf(e,"month"),t,"day"),s=n&&a.isAfter(a.startOf(e,"month"),n,"day");return i||s}function C(e,t,n){var i=t&&a.isBefore(a.endOf(e,"year"),t,"day"),s=n&&a.isAfter(a.startOf(e,"year"),n,"day");return i||s}function M(e,t){void 0===t&&(t=0);var n=e&&e.yearsCalendarModel&&e.yearsCalendarModel[t];return n&&n.years&&n.years[0]&&n.years[0][0]&&n.years[0][0].date}function S(e,t){for(var n=e.initialDate,i=new Array(e.height),s=0;s<e.height;s++){i[s]=new Array(e.width);for(var r=0;r<e.width;r++)i[s][r]=t(n),n=a.shiftDate(n,e.shift)}return i}function E(e,t){var n=a.getFirstDayOfMonth(e),i=function(e,t){if(a.isFirstDayOfWeek(e,t.firstDayOfWeek))return e;var n=function(e,t){if(0===t)return e;var n=e-t%7;return n<0?n+7:n}(a.getDay(e),t.firstDayOfWeek);return a.shiftDate(e,{day:-n})}(n,t);return{daysMatrix:S({width:t.width,height:t.height,initialDate:i,shift:{day:1}},(function(e){return e})),month:n}}function x(e){var t=a.getLocale(e),n=t.weekdaysShort(),i=t.firstDayOfWeek();return function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(y(arguments[t]));return e}(n.slice(i),n.slice(0,i))}function O(e,t){return e.weeks.forEach((function(n){n.days.forEach((function(i,s){var r,o,c=!a.isSameMonth(i.date,e.month),d=!c&&a.isSameDay(i.date,t.hoveredDate),l=!c&&t.selectedRange&&a.isSameDay(i.date,t.selectedRange[0]),h=!c&&t.selectedRange&&a.isSameDay(i.date,t.selectedRange[1]),u=!c&&a.isSameDay(i.date,t.selectedDate)||l||h,p=!c&&t.selectedRange&&function(e,t,n){if(!e||!t[0])return!1;if(t[1])return e>t[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,!!((o=t.datesDisabled)&&a.isArray(o)&&o.length)&&o.some((function(e){return a.isSame(r,e,"date")})))||function(e,t){return!!(t&&a.isArray(t)&&t.length)&&!t.some((function(t){return a.isSame(e,t,"date")}))}(i.date,t.datesEnabled),y=new Date,b=!c&&a.isSameDay(i.date,y),m=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:u,isSelectionStart:l,isSelectionEnd:h,isInRange:p,isDisabled:f,isToday:b,customClasses:m});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.displayMonths&&t.monthIndex+1!==t.displayMonths,e.disableLeftArrow=w(a.shiftDate(e.month,{month:-1}),t.minDate,t.maxDate),e.disableRightArrow=w(a.shiftDate(e.month,{month:1}),t.minDate,t.maxDate),e}function I(e,t){return!t||e>=t}var R={month:1};function A(e,t){return{months:S({width:3,height:4,initialDate:a.startOf(e,"year"),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 H=-1*(Math.floor(8)-1),V={year:1};function T(e,t,n){var i=S({width:4,height:4,initialDate:function(e,t){if(t&&e.getFullYear()>=t.getFullYear()&&e.getFullYear()<t.getFullYear()+16)return t;return a.shiftDate(e,{year:H})}(e,n),shift:V},(function(e){return{date:e,label:a.formatDate(e,t.yearLabel,t.locale)}}));return{years:i,monthTitle:"",yearTitle:function(e,t){var n=a.formatDate(e[0][0].date,t.yearTitle,t.locale),i=a.formatDate(e[3][3].date,t.yearTitle,t.locale);return n+" - "+i}(i,t)}}function P(e,t){switch(void 0===e&&(e=k),t.type){case g.CALCULATE:return function(e){var t=e.displayOneMonthRange&&$(e.view.date,e.minDate,e.maxDate)?1:e.displayMonths,n=e.view.date;if("day"===e.view.mode){e.showPreviousMonth&&0===e.selectedRange.length&&(n=a.shiftDate(n,{month:-1})),e.monthViewOptions.firstDayOfWeek=a.getLocale(e.locale).firstDayOfWeek();for(var i=new Array(t),s=0;s<t;s++)i[s]=E(n,e.monthViewOptions),n=a.shiftDate(n,{month:1});return Object.assign({},e,{monthsModel:i})}if("month"===e.view.mode){for(var r=new Array(t),o=0;o<t;o++)r[o]=A(n,L(e)),n=a.shiftDate(n,{year:1});return Object.assign({},e,{monthsCalendar:r})}if("year"===e.view.mode){var c=new Array(t);for(o=0;o<t;o++)c[o]=T(n,L(e),"year"===e.minMode?M(e,o):void 0),n=a.shiftDate(n,{year:16});return Object.assign({},e,{yearsCalendarModel:c})}return e}(e);case g.FORMAT:return function(e,t){if("day"===e.view.mode){var n=e.monthsModel.map((function(t,n){return function(e,t,n){return{month:e.month,monthTitle:a.formatDate(e.month,t.monthTitle,t.locale),yearTitle:a.formatDate(e.month,t.yearTitle,t.locale),weekNumbers:(i=e.daysMatrix,s=t.weekNumbers,r=t.locale,i.map((function(e){return e[0]?a.formatDate(e[0],s,r):""}))),weekdays:x(t.locale),weeks:e.daysMatrix.map((function(e,i){return{days:e.map((function(e,s){return{date:e,label:a.formatDate(e,t.dayLabel,t.locale),monthIndex:n,weekIndex:i,dayIndex:s}}))}}))};var i,s,r}(t,L(e),n)}));return Object.assign({},e,{formattedMonths:n})}var i=e.displayMonths,s=e.view.date;if("month"===e.view.mode){for(var r=new Array(i),o=0;o<i;o++)r[o]=A(s,L(e)),s=a.shiftDate(s,{year:1});return Object.assign({},e,{monthsCalendar:r})}if("year"===e.view.mode){var c=new Array(i);for(o=0;o<i;o++)c[o]=T(s,L(e)),s=a.shiftDate(s,{year:16});return Object.assign({},e,{yearsCalendarModel:c})}return e}(e);case g.FLAG:return function(e,t){var n=$(e.view.date,e.minDate,e.maxDate)?1:e.displayMonths;if("day"===e.view.mode){var i=e.formattedMonths.map((function(t,a){return O(t,{isDisabled:e.isDisabled,minDate:e.minDate,maxDate:e.maxDate,daysDisabled:e.daysDisabled,datesDisabled:e.datesDisabled,datesEnabled:e.datesEnabled,hoveredDate:e.hoveredDate,selectedDate:e.selectedDate,selectedRange:e.selectedRange,displayMonths:n,dateCustomClasses:e.dateCustomClasses,monthIndex:a})}));return Object.assign({},e,{flaggedMonths:i})}if("month"===e.view.mode){var s=e.monthsCalendar.map((function(t,i){return s=t,r={isDisabled:e.isDisabled,minDate:e.minDate,maxDate:e.maxDate,hoveredMonth:e.hoveredMonth,selectedDate:e.selectedDate,displayMonths:n,monthIndex:i},s.months.forEach((function(e,t){e.forEach((function(e,n){var i=a.isSameMonth(e.date,r.hoveredMonth),o=r.isDisabled||w(e.date,r.minDate,r.maxDate),c=a.isSameMonth(e.date,r.selectedDate),d=Object.assign(e,{isHovered:i,isDisabled:o,isSelected:c});e.isHovered===d.isHovered&&e.isDisabled===d.isDisabled&&e.isSelected===d.isSelected||(s.months[t][n]=d)}))})),s.hideLeftArrow=r.monthIndex>0&&r.monthIndex!==r.displayMonths,s.hideRightArrow=r.monthIndex<r.displayMonths&&r.monthIndex+1!==r.displayMonths,s.disableLeftArrow=C(a.shiftDate(s.months[0][0].date,{year:-1}),r.minDate,r.maxDate),s.disableRightArrow=C(a.shiftDate(s.months[0][0].date,{year:1}),r.minDate,r.maxDate),s;var s,r}));return Object.assign({},e,{flaggedMonthsCalendar:s})}if("year"===e.view.mode){var r=e.yearsCalendarModel.map((function(t,i){return function(e,t){e.years.forEach((function(n,i){n.forEach((function(n,s){var r=a.isSameYear(n.date,t.hoveredYear),o=t.isDisabled||C(n.date,t.minDate,t.maxDate),c=a.isSameYear(n.date,t.selectedDate),d=Object.assign(n,{isHovered:r,isDisabled:o,isSelected:c});n.isHovered===d.isHovered&&n.isDisabled===d.isDisabled&&n.isSelected===d.isSelected||(e.years[i][s]=d)}))})),e.hideLeftArrow=t.yearIndex>0&&t.yearIndex!==t.displayMonths,e.hideRightArrow=t.yearIndex<t.displayMonths&&t.yearIndex+1!==t.displayMonths,e.disableLeftArrow=C(a.shiftDate(e.years[0][0].date,{year:-1}),t.minDate,t.maxDate);var n=e.years.length-1,i=e.years[n].length-1;return e.disableRightArrow=C(a.shiftDate(e.years[n][i].date,{year:1}),t.minDate,t.maxDate),e}(t,{isDisabled:e.isDisabled,minDate:e.minDate,maxDate:e.maxDate,hoveredYear:e.hoveredYear,selectedDate:e.selectedDate,displayMonths:n,yearIndex:i})}));return Object.assign({},e,{yearsCalendarFlagged:r})}return e}(e);case g.NAVIGATE_OFFSET:return function(e,t){var n={view:{mode:e.view.mode,date:F(e,t)}};return Object.assign({},e,n)}(e,t);case g.NAVIGATE_TO:var n=t.payload,i=a.setFullDate(e.view.date,n.unit),s=void 0,r=void 0;return s=I(n.viewMode,e.minMode)?{view:{date:i,mode:r=n.viewMode}}:{selectedDate:i,view:{date:i,mode:r=e.view.mode}},Object.assign({},e,s);case g.CHANGE_VIEWMODE:if(!I(t.payload,e.minMode))return e;s={view:{date:i=e.view.date,mode:r=t.payload}};return Object.assign({},e,s);case g.HOVER:return Object.assign({},e,{hoveredDate:t.payload});case g.SELECT:s={selectedDate:t.payload,view:e.view},r=e.view.mode,i=j(t.payload||e.view.date,e.minDate,e.maxDate);return s.view={mode:r,date:i},Object.assign({},e,s);case g.SET_OPTIONS:r=(s=t.payload).minMode?s.minMode:e.view.mode,i=j(a.isDateValid(s.value)&&s.value||a.isArray(s.value)&&a.isDateValid(s.value[0])&&s.value[0]||e.view.date,s.minDate,s.maxDate);return s.view={mode:r,date:i},s.value&&(a.isArray(s.value)&&(s.selectedRange=s.value),s.value instanceof Date&&(s.selectedDate=s.value)),Object.assign({},e,s);case g.SELECT_RANGE:s={selectedRange:t.payload,view:e.view},r=e.view.mode,i=j(t.payload&&t.payload[0]||e.view.date,e.minDate,e.maxDate);return s.view={mode:r,date:i},Object.assign({},e,s);case g.SET_MIN_DATE:return Object.assign({},e,{minDate:t.payload});case g.SET_MAX_DATE:return Object.assign({},e,{maxDate:t.payload});case g.SET_IS_DISABLED:return Object.assign({},e,{isDisabled:t.payload});case g.SET_DATE_CUSTOM_CLASSES:return Object.assign({},e,{dateCustomClasses:t.payload});default:return e}}function F(e,t){if("year"===e.view.mode&&"year"===e.minMode){var n=M(e,0),i=a.shiftDate(n,{year:-H});return a.shiftDate(i,t.payload)}return a.shiftDate(a.startOf(e.view.date,"month"),t.payload)}function L(e){return{locale:e.locale,monthTitle:e.monthTitle,yearTitle:e.yearTitle,dayLabel:e.dayLabel,monthLabel:e.monthLabel,yearLabel:e.yearLabel,weekNumbers:e.weekNumbers}}function j(e,t,n){var i=Array.isArray(e)?e[0]:e;return t&&a.isAfter(t,i,"day")?t:n&&a.isBefore(n,i,"day")?n:i}function $(e,t,n){return!(!n||!a.isSame(n,e,"day"))||!(!t||!n||t.getMonth()!==n.getMonth())}var N=function(e){function n(){var t=new i.BehaviorSubject({type:"[datepicker] dispatcher init"}),n=new s.MiniState(k,t,P);return e.call(this,t,P,n)||this}return p(n,e),n.decorators=[{type:t.Injectable}],n.ctorParameters=function(){return[]},n}(s.MiniStore),Y=o.trigger("datepickerAnimation",[o.state("animated-down",o.style({height:"*",overflow:"hidden"})),o.transition("* => 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"))]),B=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 p(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){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:[N,D],template:'\x3c!-- days calendar view mode --\x3e\n<div class="bs-datepicker" [ngClass]="containerClass" *ngIf="viewMode | async">\n <div class="bs-datepicker-container"\n [@datepickerAnimation]="animationState"\n (@datepickerAnimation.done)="positionServiceEnable()">\n \x3c!--calendars--\x3e\n <div class="bs-calendar-container" [ngSwitch]="viewMode | async" role="application">\n \x3c!--days calendar--\x3e\n <div *ngSwitchCase="\'day\'" class="bs-media-container">\n <bs-days-calendar-view\n *ngFor="let calendar of daysCalendar | async"\n [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1"\n [calendar]="calendar"\n [options]="options | async"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="setViewMode($event)"\n (onHover)="dayHoverHandler($event)"\n (onHoverWeek)="weekHoverHandler($event)"\n (onSelect)="daySelectHandler($event)">\n </bs-days-calendar-view>\n </div>\n\n \x3c!--months calendar--\x3e\n <div *ngSwitchCase="\'month\'" class="bs-media-container">\n <bs-month-calendar-view\n *ngFor="let calendar of monthsCalendar | async"\n [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1"\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="setViewMode($event)"\n (onHover)="monthHoverHandler($event)"\n (onSelect)="monthSelectHandler($event)">\n </bs-month-calendar-view>\n </div>\n\n \x3c!--years calendar--\x3e\n <div *ngSwitchCase="\'year\'" class="bs-media-container">\n <bs-years-calendar-view\n *ngFor="let calendar of yearsCalendar | async"\n [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1"\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="setViewMode($event)"\n (onHover)="yearHoverHandler($event)"\n (onSelect)="yearSelectHandler($event)">\n </bs-years-calendar-view>\n </div>\n </div>\n\n \x3c!--applycancel buttons--\x3e\n <div class="bs-datepicker-buttons" *ngIf="false">\n <button class="btn btn-success" type="button">Apply</button>\n <button class="btn btn-default" type="button">Cancel</button>\n </div>\n </div>\n\n \x3c!--custom dates or date ranges picker--\x3e\n <div class="bs-datepicker-custom-range" *ngIf="customRanges?.length > 0">\n <bs-custom-date-view \n [selectedRange]="chosenRange" \n [ranges]="customRanges"\n (onSelect)="setRangeOnCalendar($event)">\n </bs-custom-date-view>\n </div>\n</div>\n',host:{class:"bottom","(click)":"_stopPropagation($event)",role:"dialog","aria-label":"calendar"},animations:[Y]}]}],a.ctorParameters=function(){return[{type:t.Renderer2},{type:b},{type:N},{type:t.ElementRef},{type:g},{type:D},{type:r.PositioningService}]},a}(m);var z=function(){function e(e,n,a,s,r){this._config=e,this._elementRef=n,this._renderer=a,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=r.createLoader(n,s,a),this.onShown=this._datepicker.onShown,this.onHidden=this._datepicker.onHidden,this.isOpen$=new i.BehaviorSubject(this.isOpen)}return Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._datepicker.isShown},set:function(e){this.isOpen$.next(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bsValue",{set:function(e){this._bsValue&&e&&this._bsValue.getTime()===e.getTime()||(this._bsValue=e,this.bsValueChange.emit(e))},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.isDestroy$=new i.Subject,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.datesEnabled&&(this._datepickerRef.instance.datesEnabled=this.datesEnabled),e.isDisabled&&(this._datepickerRef.instance.isDisabled=this.isDisabled),e.dateCustomClasses&&(this._datepickerRef.instance.dateCustomClasses=this.dateCustomClasses))},e.prototype.ngAfterViewInit=function(){var e=this;this.isOpen$.pipe(n.filter((function(t){return t!==e.isOpen})),n.takeUntil(this.isDestroy$)).subscribe((function(){return e.toggle()}))},e.prototype.show=function(){var e=this;this._datepicker.isShown||(this.setConfig(),this._datepickerRef=this._datepicker.provide({provide:b,useValue:this._config}).attach(B).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}}this._config.returnFocusToInput&&this._renderer.selectRootElement(this._elementRef.nativeElement).focus()},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,datesEnabled:this.datesEnabled||this.bsConfig&&this.bsConfig.datesEnabled,minMode:this.minMode||this.bsConfig&&this.bsConfig.minMode})},e.prototype.ngOnDestroy=function(){this._datepicker.dispose(),this.isOpen$.next(!1),this.isDestroy$&&(this.isDestroy$.next(),this.isDestroy$.complete())},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}],datesEnabled:[{type:t.Input}],dateCustomClasses:[{type:t.Input}],bsValueChange:[{type:t.Output}]},e}();var W=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return p(n,e),n.decorators=[{type:t.Injectable}],n}(b),G=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 p(n,e),n.decorators=[{type:t.Component,args:[{selector:"bs-datepicker-inline-container",providers:[N,D],template:'\x3c!-- days calendar view mode --\x3e\n<div class="bs-datepicker" [ngClass]="containerClass" *ngIf="viewMode | async">\n <div class="bs-datepicker-container"\n [@datepickerAnimation]="animationState"\n (@datepickerAnimation.done)="positionServiceEnable()">\n \x3c!--calendars--\x3e\n <div class="bs-calendar-container" [ngSwitch]="viewMode | async" role="application">\n \x3c!--days calendar--\x3e\n <div *ngSwitchCase="\'day\'" class="bs-media-container">\n <bs-days-calendar-view\n *ngFor="let calendar of daysCalendar | async"\n [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1"\n [calendar]="calendar"\n [options]="options | async"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="setViewMode($event)"\n (onHover)="dayHoverHandler($event)"\n (onHoverWeek)="weekHoverHandler($event)"\n (onSelect)="daySelectHandler($event)">\n </bs-days-calendar-view>\n </div>\n\n \x3c!--months calendar--\x3e\n <div *ngSwitchCase="\'month\'" class="bs-media-container">\n <bs-month-calendar-view\n *ngFor="let calendar of monthsCalendar | async"\n [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1"\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="setViewMode($event)"\n (onHover)="monthHoverHandler($event)"\n (onSelect)="monthSelectHandler($event)">\n </bs-month-calendar-view>\n </div>\n\n \x3c!--years calendar--\x3e\n <div *ngSwitchCase="\'year\'" class="bs-media-container">\n <bs-years-calendar-view\n *ngFor="let calendar of yearsCalendar | async"\n [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1"\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="setViewMode($event)"\n (onHover)="yearHoverHandler($event)"\n (onSelect)="yearSelectHandler($event)">\n </bs-years-calendar-view>\n </div>\n </div>\n\n \x3c!--applycancel buttons--\x3e\n <div class="bs-datepicker-buttons" *ngIf="false">\n <button class="btn btn-success" type="button">Apply</button>\n <button class="btn btn-default" type="button">Cancel</button>\n </div>\n </div>\n\n \x3c!--custom dates or date ranges picker--\x3e\n <div class="bs-datepicker-custom-range" *ngIf="customRanges?.length > 0">\n <bs-custom-date-view \n [selectedRange]="chosenRange" \n [ranges]="customRanges"\n (onSelect)="setRangeOnCalendar($event)">\n </bs-custom-date-view>\n </div>\n</div>\n',host:{"(click)":"_stopPropagation($event)"},animations:[Y]}]}],n.ctorParameters=function(){return[{type:t.Renderer2},{type:b},{type:N},{type:t.ElementRef},{type:g},{type:D},{type:r.PositioningService}]},n}(B),U=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._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.setConfig()),e.maxDate&&(this._datepickerRef.instance.maxDate=this.maxDate,this.setConfig()),e.datesDisabled&&(this._datepickerRef.instance.datesDisabled=this.datesDisabled,this.setConfig()),e.datesEnabled&&(this._datepickerRef.instance.datesEnabled=this.datesEnabled,this._datepickerRef.instance.value=this._bsValue),e.isDisabled&&(this._datepickerRef.instance.isDisabled=this.isDisabled,this.setConfig()),e.dateCustomClasses&&(this._datepickerRef.instance.dateCustomClasses=this.dateCustomClasses,this.setConfig()))},e.prototype.setConfig=function(){this._datepicker&&this._datepicker.hide(),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,datesEnabled:this.datesEnabled||this.bsConfig&&this.bsConfig.datesEnabled}),this._datepickerRef=this._datepicker.provide({provide:b,useValue:this._config}).attach(G).to(this._elementRef).show()},e.prototype.ngOnDestroy=function(){this._datepicker.dispose()},e.decorators=[{type:t.Directive,args:[{selector:"bs-datepicker-inline",exportAs:"bsDatepickerInline"}]}],e.ctorParameters=function(){return[{type:W},{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}],datesEnabled:[{type:t.Input}],datesDisabled:[{type:t.Input}],bsValueChange:[{type:t.Output}]},e}();var q=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.displayMonths=2,t.isAnimated=!1,t}return p(n,e),n.decorators=[{type:t.Injectable}],n}(b);var Z=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.chosenRange=[],d._subs=[],d._effects=o,d.customRanges=d._config.ranges,n.setStyle(s.nativeElement,"display","block"),n.setStyle(s.nativeElement,"position","absolute"),d}return p(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){e.valueChange.emit(t),e.chosenRange=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){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.prototype.setRangeOnCalendar=function(e){this._rangeStack=null===e?[]:e.value instanceof Date?[e.value]:e.value,this._store.dispatch(this._actions.selectRange(this._rangeStack))},a.decorators=[{type:t.Component,args:[{selector:"bs-daterangepicker-container",providers:[N,D],template:'\x3c!-- days calendar view mode --\x3e\n<div class="bs-datepicker" [ngClass]="containerClass" *ngIf="viewMode | async">\n <div class="bs-datepicker-container"\n [@datepickerAnimation]="animationState"\n (@datepickerAnimation.done)="positionServiceEnable()">\n \x3c!--calendars--\x3e\n <div class="bs-calendar-container" [ngSwitch]="viewMode | async" role="application">\n \x3c!--days calendar--\x3e\n <div *ngSwitchCase="\'day\'" class="bs-media-container">\n <bs-days-calendar-view\n *ngFor="let calendar of daysCalendar | async"\n [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1"\n [calendar]="calendar"\n [options]="options | async"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="setViewMode($event)"\n (onHover)="dayHoverHandler($event)"\n (onHoverWeek)="weekHoverHandler($event)"\n (onSelect)="daySelectHandler($event)">\n </bs-days-calendar-view>\n </div>\n\n \x3c!--months calendar--\x3e\n <div *ngSwitchCase="\'month\'" class="bs-media-container">\n <bs-month-calendar-view\n *ngFor="let calendar of monthsCalendar | async"\n [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1"\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="setViewMode($event)"\n (onHover)="monthHoverHandler($event)"\n (onSelect)="monthSelectHandler($event)">\n </bs-month-calendar-view>\n </div>\n\n \x3c!--years calendar--\x3e\n <div *ngSwitchCase="\'year\'" class="bs-media-container">\n <bs-years-calendar-view\n *ngFor="let calendar of yearsCalendar | async"\n [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1"\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="setViewMode($event)"\n (onHover)="yearHoverHandler($event)"\n (onSelect)="yearSelectHandler($event)">\n </bs-years-calendar-view>\n </div>\n </div>\n\n \x3c!--applycancel buttons--\x3e\n <div class="bs-datepicker-buttons" *ngIf="false">\n <button class="btn btn-success" type="button">Apply</button>\n <button class="btn btn-default" type="button">Cancel</button>\n </div>\n </div>\n\n \x3c!--custom dates or date ranges picker--\x3e\n <div class="bs-datepicker-custom-range" *ngIf="customRanges?.length > 0">\n <bs-custom-date-view \n [selectedRange]="chosenRange" \n [ranges]="customRanges"\n (onSelect)="setRangeOnCalendar($event)">\n </bs-custom-date-view>\n </div>\n</div>\n',host:{class:"bottom","(click)":"_stopPropagation($event)",role:"dialog","aria-label":"calendar"},animations:[Y]}]}],a.ctorParameters=function(){return[{type:t.Renderer2},{type:b},{type:N},{type:t.ElementRef},{type:g},{type:D},{type:r.PositioningService}]},a}(m);var 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 p(n,e),n.decorators=[{type:t.Component,args:[{selector:"bs-daterangepicker-inline-container",providers:[N,D],template:'\x3c!-- days calendar view mode --\x3e\n<div class="bs-datepicker" [ngClass]="containerClass" *ngIf="viewMode | async">\n <div class="bs-datepicker-container"\n [@datepickerAnimation]="animationState"\n (@datepickerAnimation.done)="positionServiceEnable()">\n \x3c!--calendars--\x3e\n <div class="bs-calendar-container" [ngSwitch]="viewMode | async" role="application">\n \x3c!--days calendar--\x3e\n <div *ngSwitchCase="\'day\'" class="bs-media-container">\n <bs-days-calendar-view\n *ngFor="let calendar of daysCalendar | async"\n [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1"\n [calendar]="calendar"\n [options]="options | async"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="setViewMode($event)"\n (onHover)="dayHoverHandler($event)"\n (onHoverWeek)="weekHoverHandler($event)"\n (onSelect)="daySelectHandler($event)">\n </bs-days-calendar-view>\n </div>\n\n \x3c!--months calendar--\x3e\n <div *ngSwitchCase="\'month\'" class="bs-media-container">\n <bs-month-calendar-view\n *ngFor="let calendar of monthsCalendar | async"\n [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1"\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="setViewMode($event)"\n (onHover)="monthHoverHandler($event)"\n (onSelect)="monthSelectHandler($event)">\n </bs-month-calendar-view>\n </div>\n\n \x3c!--years calendar--\x3e\n <div *ngSwitchCase="\'year\'" class="bs-media-container">\n <bs-years-calendar-view\n *ngFor="let calendar of yearsCalendar | async"\n [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1"\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="setViewMode($event)"\n (onHover)="yearHoverHandler($event)"\n (onSelect)="yearSelectHandler($event)">\n </bs-years-calendar-view>\n </div>\n </div>\n\n \x3c!--applycancel buttons--\x3e\n <div class="bs-datepicker-buttons" *ngIf="false">\n <button class="btn btn-success" type="button">Apply</button>\n <button class="btn btn-default" type="button">Cancel</button>\n </div>\n </div>\n\n \x3c!--custom dates or date ranges picker--\x3e\n <div class="bs-datepicker-custom-range" *ngIf="customRanges?.length > 0">\n <bs-custom-date-view \n [selectedRange]="chosenRange" \n [ranges]="customRanges"\n (onSelect)="setRangeOnCalendar($event)">\n </bs-custom-date-view>\n </div>\n</div>\n',host:{"(click)":"_stopPropagation($event)"},animations:[Y]}]}],n.ctorParameters=function(){return[{type:t.Renderer2},{type:b},{type:N},{type:t.ElementRef},{type:g},{type:D},{type:r.PositioningService}]},n}(Z),Q=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._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,this.setConfig()),e.maxDate&&(this._datepickerRef.instance.maxDate=this.maxDate,this.setConfig()),e.datesEnabled&&(this._datepickerRef.instance.datesEnabled=this.datesEnabled),e.datesDisabled&&(this._datepickerRef.instance.datesDisabled=this.datesDisabled,this.setConfig()),e.daysDisabled&&(this._datepickerRef.instance.daysDisabled=this.daysDisabled,this.setConfig()),e.isDisabled&&(this._datepickerRef.instance.isDisabled=this.isDisabled,this.setConfig()),e.dateCustomClasses&&(this._datepickerRef.instance.dateCustomClasses=this.dateCustomClasses,this.setConfig()))},e.prototype.setConfig=function(){this._datepicker&&this._datepicker.hide(),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,datesEnabled:this.datesEnabled||this.bsConfig&&this.bsConfig.datesEnabled,ranges:this.bsConfig&&this.bsConfig.ranges}),this._datepickerRef=this._datepicker.provide({provide:b,useValue:this._config}).attach(K).to(this._elementRef).show()},e.prototype.ngOnDestroy=function(){this._datepicker.dispose()},e.decorators=[{type:t.Directive,args:[{selector:"bs-daterangepicker-inline",exportAs:"bsDaterangepickerInline"}]}],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}],daysDisabled:[{type:t.Input}],datesDisabled:[{type:t.Input}],datesEnabled:[{type:t.Input}],bsValueChange:[{type:t.Output}]},e}();var X={provide:d.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return ee})),multi:!0},J={provide:d.NG_VALIDATORS,useExisting:t.forwardRef((function(){return ee})),multi:!0},ee=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.onKeydownEvent=function(e){13!==e.keyCode&&"Enter"!==e.code||this.hide()},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._picker._config.returnFocusToInput&&this._renderer.selectRootElement(this._elRef.nativeElement).focus(),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 this.writeValue(this._picker.minDate),{bsDate:{minDate:this._picker.minDate}};if(this._picker&&this._picker.maxDate&&a.isAfter(t,this._picker.maxDate,"date"))return this.writeValue(this._picker.maxDate),{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(),this._picker._config.returnFocusToInput&&this._renderer.selectRootElement(this._elRef.nativeElement).focus()},e.decorators=[{type:t.Directive,args:[{selector:"input[bsDatepicker]",host:{"(change)":"onChange($event)","(keyup.esc)":"hide()","(keydown)":"onKeydownEvent($event)","(blur)":"onBlur()"},providers:[X,J]}]}],e.ctorParameters=function(){return[{type:z,decorators:[{type:t.Host}]},{type:v},{type:t.Renderer2},{type:t.ElementRef},{type:t.ChangeDetectorRef}]},e}();var te=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.displayMonths=2,t}return p(n,e),n.decorators=[{type:t.Injectable}],n}(b);var ne=function(){function e(e,n,a,s,r){this._config=e,this._elementRef=n,this._renderer=a,this.placement="bottom",this.triggers="click",this.outsideClick=!0,this.container="body",this.outsideEsc=!0,this.bsValueChange=new t.EventEmitter,this._subs=[],this._datepicker=r.createLoader(n,s,a),Object.assign(this,e),this.onShown=this._datepicker.onShown,this.onHidden=this._datepicker.onHidden,this.isOpen$=new i.BehaviorSubject(this.isOpen)}return Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._datepicker.isShown},set:function(e){this.isOpen$.next(e)},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.isDestroy$=new i.Subject,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.datesEnabled&&(this._datepickerRef.instance.datesEnabled=this.datesEnabled),e.daysDisabled&&(this._datepickerRef.instance.daysDisabled=this.daysDisabled),e.isDisabled&&(this._datepickerRef.instance.isDisabled=this.isDisabled),e.dateCustomClasses&&(this._datepickerRef.instance.dateCustomClasses=this.dateCustomClasses))},e.prototype.ngAfterViewInit=function(){var e=this;this.isOpen$.pipe(n.filter((function(t){return t!==e.isOpen})),n.takeUntil(this.isDestroy$)).subscribe((function(){return e.toggle()}))},e.prototype.show=function(){var e=this;this._datepicker.isShown||(this.setConfig(),this._datepickerRef=this._datepicker.provide({provide:b,useValue:this._config}).attach(Z).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,daysDisabled:this.daysDisabled||this.bsConfig&&this.bsConfig.daysDisabled,dateCustomClasses:this.dateCustomClasses||this.bsConfig&&this.bsConfig.dateCustomClasses,datesDisabled:this.datesDisabled||this.bsConfig&&this.bsConfig.datesDisabled,datesEnabled:this.datesEnabled||this.bsConfig&&this.bsConfig.datesEnabled,ranges:this.bsConfig&&this.bsConfig.ranges})},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}}this._config.returnFocusToInput&&this._renderer.selectRootElement(this._elementRef.nativeElement).focus()},e.prototype.toggle=function(){if(this.isOpen)return this.hide();this.show()},e.prototype.ngOnDestroy=function(){this._datepicker.dispose(),this.isOpen$.next(!1),this.isDestroy$&&(this.isDestroy$.next(),this.isDestroy$.complete())},e.decorators=[{type:t.Directive,args:[{selector:"[bsDaterangepicker]",exportAs:"bsDaterangepicker"}]}],e.ctorParameters=function(){return[{type:te},{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}],daysDisabled:[{type:t.Input}],datesDisabled:[{type:t.Input}],datesEnabled:[{type:t.Input}],bsValueChange:[{type:t.Output}]},e}();var 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.onKeydownEvent=function(e){13!==e.keyCode&&"Enter"!==e.code||this.hide()},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._picker._config.returnFocusToInput&&this._renderer.selectRootElement(this._elRef.nativeElement).focus(),this._onTouched()},e.prototype.validate=function(e){var t=e.value,n=[];if(null==t||!a.isArray(t))return null;t.sort((function(e,t){return e-t}));var i=a.isDateValid(t[0]),s=a.isDateValid(t[1]);return i?s?(this._picker&&this._picker.minDate&&a.isBefore(t[0],this._picker.minDate,"date")&&(t[0]=this._picker.minDate,n.push({bsDate:{minDate:this._picker.minDate}})),this._picker&&this._picker.maxDate&&a.isAfter(t[1],this._picker.maxDate,"date")&&(t[1]=this._picker.maxDate,n.push({bsDate:{maxDate:this._picker.maxDate}})),n.length>0?(this.writeValue(t),n):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(),this._picker._config.returnFocusToInput&&this._renderer.selectRootElement(this._elRef.nativeElement).focus()},e.decorators=[{type:t.Directive,args:[{selector:"input[bsDaterangepicker]",host:{"(change)":"onChange($event)","(keyup.esc)":"hide()","(keydown)":"onKeydownEvent($event)","(blur)":"onBlur()"},providers:[ae,ie]}]}],e.ctorParameters=function(){return[{type:ne,decorators:[{type:t.Host}]},{type:v},{type:t.Renderer2},{type:t.ElementRef},{type:t.ChangeDetectorRef}]},e}();var re=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 <bs-current-date title="hey there" *ngIf="false"></bs-current-date>\n\n \x3c!--navigation--\x3e\n <div class="bs-datepicker-head">\n <ng-content select="bs-datepicker-navigation-view"></ng-content>\n </div>\n\n <div class="bs-datepicker-body">\n <ng-content></ng-content>\n </div>\n\n \x3c!--timepicker--\x3e\n <bs-timepicker *ngIf="false"></bs-timepicker>\n '}]}],e}(),oe=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"bs-current-date",template:'<div class="current-timedate"><span>{{ title }}</span></div>'}]}],e.propDecorators={title:[{type:t.Input}]},e}();var ce=function(){function e(){this.onSelect=new t.EventEmitter,this.customRange=null}return e.prototype.selectFromRanges=function(e){this.onSelect.emit(e)},e.prototype.checkRange=function(){var e=this;return!!this.ranges&&this.ranges.filter((function(t){return t.value===e.selectedRange})).length>0},e.decorators=[{type:t.Component,args:[{selector:"bs-custom-date-view",template:'\n <div class="bs-datepicker-predefined-btns">\n <button *ngFor="let range of ranges"\n type="button"\n class="btn"\n (click)="selectFromRanges(range)"\n [class.selected]="range.value === selectedRange">\n {{ range.label }}\n </button>\n <button\n type="button"\n class="btn"\n (click)="selectFromRanges(customRange)"\n [class.selected]="!checkRange()">\n Custom Range\n </button>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.propDecorators={ranges:[{type:t.Input}],selectedRange:[{type:t.Input}],onSelect:[{type:t.Output}]},e}();var de=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}();var le={UP:0,DOWN:1};le[le.UP]="UP",le[le.DOWN]="DOWN";var he=function(){function e(){this.onNavigate=new t.EventEmitter,this.onViewMode=new t.EventEmitter}return e.prototype.navTo=function(e){this.onNavigate.emit(e?le.DOWN:le.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 <button class="previous"\n [disabled]="calendar.disableLeftArrow"\n [style.visibility]="calendar.hideLeftArrow ? \'hidden\' : \'visible\'"\n type="button"\n (click)="navTo(true)">\n <span>&lsaquo;</span>\n </button>\n\n <ng-container *ngIf="calendar.monthTitle">\n &#8203; \x3c!-- zero-width space needed for correct alignement\n with preserveWhitespaces: false in Angular --\x3e\n\n <button class="current"\n type="button"\n (click)="view(\'month\')"\n ><span>{{ calendar.monthTitle }}</span>\n </button>\n </ng-container>\n\n &#8203; \x3c!-- zero-width space needed for correct alignement\n with preserveWhitespaces: false in Angular --\x3e\n\n <button class="current" (click)="view(\'year\')" type="button">\n <span>{{ calendar.yearTitle }}</span>\n </button>\n\n &#8203; \x3c!-- zero-width space needed for correct alignement\n with preserveWhitespaces: false in Angular --\x3e\n\n <button class="next"\n [disabled]="calendar.disableRightArrow"\n [style.visibility]="calendar.hideRightArrow ? \'hidden\' : \'visible\'"\n type="button"\n (click)="navTo(false)"><span>&rsaquo;</span>\n </button>\n '}]}],e.propDecorators={calendar:[{type:t.Input}],onNavigate:[{type:t.Output}],onViewMode:[{type:t.Output}]},e}();var ue=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=le.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||this._config.selectWeekDateRange)&&0!==e.days.length)if(this._config.selectWeek&&e.days[0]&&!e.days[0].isDisabled&&this._config.selectFromOtherMonth)this.onSelect.emit(e.days[0]);else{var n=e.days.find((function(e){return t._config.selectFromOtherMonth?!e.isDisabled:!e.isOtherMonth&&!e.isDisabled}));if(this.onSelect.emit(n),this._config.selectWeekDateRange){var a=e.days.slice(0).reverse().find((function(e){return t._config.selectFromOtherMonth?!e.isDisabled:!e.isOtherMonth&&!e.isDisabled}));this.onSelect.emit(a)}}},e.prototype.weekHoverHandler=function(e,t){var n=this;(this._config.selectWeek||this._config.selectWeekDateRange)&&(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 <bs-calendar-layout>\n <bs-datepicker-navigation-view\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="changeViewMode($event)"\n ></bs-datepicker-navigation-view>\n\n \x3c!--days matrix--\x3e\n <table role="grid" class="days weeks">\n <thead>\n <tr>\n \x3c!--if show weeks--\x3e\n <th *ngIf="options.showWeekNumbers"></th>\n <th *ngFor="let weekday of calendar.weekdays; let i = index"\n aria-label="weekday">{{ calendar.weekdays[i] }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor="let week of calendar.weeks; let i = index">\n <td class="week" [class.active-week]="isWeekHovered" *ngIf="options.showWeekNumbers">\n <span\n (click)="selectWeek(week)"\n (mouseenter)="weekHoverHandler(week, true)"\n (mouseleave)="weekHoverHandler(week, false)">{{ calendar.weekNumbers[i] }}</span>\n </td>\n <td *ngFor="let day of week.days" role="gridcell">\n <span bsDatepickerDayDecorator\n [day]="day"\n (click)="selectDay(day)"\n (mouseenter)="hoverDay(day, true)"\n (mouseleave)="hoverDay(day, false)">{{ day.label }}</span>\n </td>\n </tr>\n </tbody>\n </table>\n\n </bs-calendar-layout>\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}();var pe=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=le.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 <bs-calendar-layout>\n <bs-datepicker-navigation-view\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="changeViewMode($event)"\n ></bs-datepicker-navigation-view>\n\n <table role="grid" class="months">\n <tbody>\n <tr *ngFor="let row of calendar.months">\n <td *ngFor="let month of row" role="gridcell"\n (click)="viewMonth(month)"\n (mouseenter)="hoverMonth(month, true)"\n (mouseleave)="hoverMonth(month, false)"\n [class.disabled]="month.isDisabled"\n [class.is-highlighted]="month.isHovered">\n <span [class.selected]="month.isSelected">{{ month.label }}</span>\n </td>\n </tr>\n </tbody>\n </table>\n </bs-calendar-layout>\n '}]}],e.propDecorators={calendar:[{type:t.Input}],onNavigate:[{type:t.Output}],onViewMode:[{type:t.Output}],onSelect:[{type:t.Output}],onHover:[{type:t.Output}]},e}();var fe=function(){function e(){this.ampm="ok",this.hours=0,this.minutes=0}return e.decorators=[{type:t.Component,args:[{selector:"bs-timepicker",template:'\n <div class="bs-timepicker-container">\n <div class="bs-timepicker-controls">\n <button class="bs-decrease" type="button">-</button>\n <input type="text" [value]="hours" placeholder="00">\n <button class="bs-increase" type="button">+</button>\n </div>\n <div class="bs-timepicker-controls">\n <button class="bs-decrease" type="button">-</button>\n <input type="text" [value]="minutes" placeholder="00">\n <button class="bs-increase" type="button">+</button>\n </div>\n <button class="switch-time-format" type="button">{{ ampm }}\n <img\n src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAYAAABi8KSDAAABSElEQVQYV3XQPUvDUBQG4HNuagtVqc6KgouCv6GIuIntYBLB9hcIQpLStCAIV7DYmpTcRWcXqZio3Vwc/UCc/QEqfgyKGbr0I7nS1EiHeqYzPO/h5SD0jaxUZjmSLCB+OFb+UFINFwASAEAdpu9gaGXVyAHHFQBkHpKHc6a9dzECvADyY9sqlAMsK9W0jzxDXqeytr3mhQckxSji27TJJ5/rPmIpwJJq3HrtduriYOurv1a4i1p5HnhkG9OFymi0ReoO05cGwb+ayv4dysVygjeFmsP05f8wpZQ8fsdvfmuY9zjWSNqUtgYFVnOVReILYoBFzdQI5/GGFzNHhGbeZnopDGU29sZbscgldmC99w35VOATTycIMMcBXIfpSVGzZhA6C8hh00conln6VQ9TGgV32OEAKQC4DrBq7CJwd0ggR7Vq/rPrfgB+C3sGypY5DAAAAABJRU5ErkJggg=="\n alt="">\n </button>\n </div>\n '}]}],e}();var ye=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=le.DOWN===e?-1:1;this.onNavigate.emit({step:{year:16*t}})},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 <bs-calendar-layout>\n <bs-datepicker-navigation-view\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="changeViewMode($event)"\n ></bs-datepicker-navigation-view>\n\n <table role="grid" class="years">\n <tbody>\n <tr *ngFor="let row of calendar.years">\n <td *ngFor="let year of row" role="gridcell"\n (click)="viewYear(year)"\n (mouseenter)="hoverYear(year, true)"\n (mouseleave)="hoverYear(year, false)"\n [class.disabled]="year.isDisabled"\n [class.is-highlighted]="year.isHovered">\n <span [class.selected]="year.isSelected">{{ year.label }}</span>\n </td>\n </tr>\n </tbody>\n </table>\n </bs-calendar-layout>\n '}]}],e.propDecorators={calendar:[{type:t.Input}],onNavigate:[{type:t.Output}],onViewMode:[{type:t.Output}],onSelect:[{type:t.Output}],onHover:[{type:t.Output}]},e}();var be=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[c.ComponentLoaderFactory,r.PositioningService,N,g,b,te,W,q,D,v]}},e.decorators=[{type:t.NgModule,args:[{imports:[l.CommonModule],declarations:[re,oe,ce,de,he,ue,pe,fe,ye,B,z,G,U,ee,Z,ne,K,Q,se],entryComponents:[B,Z,G,K],exports:[B,z,G,U,ee,Z,ne,K,Q,se]}]}],e}(),me=function(){function e(){}return e.prototype.format=function(e,t,n){return a.formatDate(e,t,n)},e}(),ge=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 me}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!--&lt;!&ndash;ng-keydown="keydown($event)"&ndash;&gt;--\x3e\n <div *ngIf="datepickerMode" class="well well-sm bg-faded p-a card" role="application" >\n <ng-content></ng-content>\n </div>\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}();var ve=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}();var De={provide:d.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return _e})),multi:!0},_e=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 <datepicker-inner [activeDate]="activeDate"\n (update)="onUpdate($event)"\n [locale]="config.locale"\n [datepickerMode]="datepickerMode"\n [initDate]="initDate"\n [minDate]="minDate"\n [maxDate]="maxDate"\n [minMode]="minMode"\n [maxMode]="maxMode"\n [showWeeks]="showWeeks"\n [formatDay]="formatDay"\n [formatMonth]="formatMonth"\n [formatYear]="formatYear"\n [formatDayHeader]="formatDayHeader"\n [formatDayTitle]="formatDayTitle"\n [formatMonthTitle]="formatMonthTitle"\n [startingDay]="startingDay"\n [yearRange]="yearRange"\n [customClass]="customClass"\n [dateDisabled]="dateDisabled"\n [dayDisabled]="dayDisabled"\n [onlyCurrentMonth]="onlyCurrentMonth"\n [shortcutPropagation]="shortcutPropagation"\n [monthColLimit]="monthColLimit"\n [yearColLimit]="yearColLimit"\n (selectionDone)="onSelectionDone($event)"\n (activeDateChange)="onActiveDateChange($event)">\n <daypicker tabindex="0"></daypicker>\n <monthpicker tabindex="0"></monthpicker>\n <yearpicker tabindex="0"></yearpicker>\n </datepicker-inner>\n ',providers:[De]}]}],e.ctorParameters=function(){return[{type:ve}]},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:[ge,{static:!0}]}]},e}();var ke=function(){function e(e){this.labels=[],this.rows=[],this.weekNumbers=[],this.datePicker=e}return Object.defineProperty(e.prototype,"isBs4",{get:function(){return!h.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 h=0;h<7;h++)e.labels[h]={},e.labels[h].abbr=this.dateFilter(c[h].date,this.formatDayHeader),e.labels[h].full=this.dateFilter(c[h].date,"EEEE");if(e.title=this.dateFilter(this.activeDate,this.formatDayTitle),e.rows=this.split(c,7),this.showWeeks){e.weekNumbers=[];for(var u=(11-this.startingDay)%7,p=e.rows.length,f=0;f<p;f++)e.weekNumbers.push(e.getISO8601WeekNumber(e.rows[f][u].date))}}),"day"),this.datePicker.setCompareHandler((function(e,t){var n=new Date(e.getFullYear(),e.getMonth(),e.getDate()),a=new Date(t.getFullYear(),t.getMonth(),t.getDate());return n.getTime()-a.getTime()}),"day"),this.datePicker.refreshView()},e.prototype.getDates=function(e,t){for(var n,a=new Array(t),i=new Date(e.getTime()),s=0;s<t;)n=new Date(i.getTime()),n=this.datePicker.fixTimeZone(n),a[s++]=n,i=new Date(n.getFullYear(),n.getMonth(),n.getDate()+1);return a},e.prototype.getISO8601WeekNumber=function(e){var t=new Date(e.getTime());t.setDate(t.getDate()+4-(t.getDay()||7));var n=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((n-t.getTime())/864e5)/7)+1},e.decorators=[{type:t.Component,args:[{selector:"daypicker",template:'\n<table *ngIf="datePicker.datepickerMode === \'day\'" role="grid" [attr.aria-labelledby]="datePicker.uniqueId + \'-title\'" aria-activedescendant="activeDateId">\n <thead>\n <tr>\n <th>\n <button *ngIf="!isBs4"\n type="button"\n class="btn btn-default btn-secondary btn-sm pull-left float-left"\n (click)="datePicker.move(-1)"\n tabindex="-1">‹</button>\n <button *ngIf="isBs4"\n type="button"\n class="btn btn-default btn-secondary btn-sm pull-left float-left"\n (click)="datePicker.move(-1)"\n tabindex="-1">&lt;</button>\n </th>\n <th [attr.colspan]="5 + (datePicker.showWeeks ? 1 : 0)">\n <button [id]="datePicker.uniqueId + \'-title\'"\n type="button" class="btn btn-default btn-secondary btn-sm"\n (click)="datePicker.toggleMode(0)"\n [disabled]="datePicker.datepickerMode === datePicker.maxMode"\n [ngClass]="{disabled: datePicker.datepickerMode === datePicker.maxMode}" tabindex="-1" style="width:100%;">\n <strong>{{ title }}</strong>\n </button>\n </th>\n <th>\n <button *ngIf="!isBs4"\n type="button"\n class="btn btn-default btn-secondary btn-sm pull-right float-right"\n (click)="datePicker.move(1)"\n tabindex="-1">›</button>\n <button *ngIf="isBs4"\n type="button"\n class="btn btn-default btn-secondary btn-sm pull-right float-right"\n (click)="datePicker.move(1)"\n tabindex="-1">&gt;\n </button>\n </th>\n </tr>\n <tr>\n <th *ngIf="datePicker.showWeeks"></th>\n <th *ngFor="let labelz of labels" class="text-center">\n <small aria-label="labelz.full"><b>{{ labelz.abbr }}</b></small>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-template ngFor [ngForOf]="rows" let-rowz="$implicit" let-index="index">\n <tr *ngIf="!(datePicker.onlyCurrentMonth && rowz[0].secondary && rowz[6].secondary)">\n <td *ngIf="datePicker.showWeeks" class="h6" class="text-center">\n <em>{{ weekNumbers[index] }}</em>\n </td>\n <td *ngFor="let dtz of rowz" class="text-center" role="gridcell" [id]="dtz.uid">\n <button type="button" style="min-width:100%;" class="btn btn-sm {{dtz.customClass}}"\n *ngIf="!(datePicker.onlyCurrentMonth && dtz.secondary)"\n [ngClass]="{\'btn-secondary\': isBs4 && !dtz.selected && !datePicker.isActive(dtz), \'btn-info\': dtz.selected, disabled: dtz.disabled, active: !isBs4 && datePicker.isActive(dtz), \'btn-default\': !isBs4}"\n [disabled]="dtz.disabled"\n (click)="datePicker.select(dtz.date)" tabindex="-1">\n <span [ngClass]="{\'text-muted\': dtz.secondary || dtz.current, \'text-info\': !isBs4 && dtz.current}">{{ dtz.label }}</span>\n </button>\n </td>\n </tr>\n </ng-template>\n </tbody>\n</table>\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:ge}]},e}();var we=function(){function e(e){this.rows=[],this.datePicker=e}return Object.defineProperty(e.prototype,"isBs4",{get:function(){return!h.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<table *ngIf="datePicker.datepickerMode===\'month\'" role="grid">\n <thead>\n <tr>\n <th>\n <button type="button" class="btn btn-default btn-sm pull-left float-left"\n (click)="datePicker.move(-1)" tabindex="-1">‹</button></th>\n <th [attr.colspan]="((datePicker.monthColLimit - 2) <= 0) ? 1 : datePicker.monthColLimit - 2">\n <button [id]="datePicker.uniqueId + \'-title\'"\n type="button" class="btn btn-default btn-sm"\n (click)="datePicker.toggleMode(0)"\n [disabled]="datePicker.datepickerMode === maxMode"\n [ngClass]="{disabled: datePicker.datepickerMode === maxMode}" tabindex="-1" style="width:100%;">\n <strong>{{ title }}</strong> \n </button>\n </th>\n <th>\n <button type="button" class="btn btn-default btn-sm pull-right float-right"\n (click)="datePicker.move(1)" tabindex="-1">›</button>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor="let rowz of rows">\n <td *ngFor="let dtz of rowz" class="text-center" role="gridcell" [attr.id]="dtz.uid" [ngClass]="dtz.customClass">\n <button type="button" style="min-width:100%;" class="btn btn-default"\n [ngClass]="{\'btn-link\': isBs4 && !dtz.selected && !datePicker.isActive(dtz), \'btn-info\': dtz.selected || (isBs4 && !dtz.selected && datePicker.isActive(dtz)), disabled: dtz.disabled, active: !isBs4 && datePicker.isActive(dtz)}"\n [disabled]="dtz.disabled"\n (click)="datePicker.select(dtz.date)" tabindex="-1">\n <span [ngClass]="{\'text-success\': isBs4 && dtz.current, \'text-info\': !isBs4 && dtz.current}">{{ dtz.label }}</span>\n </button>\n </td>\n </tr>\n </tbody>\n</table>\n ',styles:["\n :host .btn-info .text-success {\n color: #fff !important;\n }\n "]}]}],e.ctorParameters=function(){return[{type:ge}]},e}();var Ce=function(){function e(e){this.rows=[],this.datePicker=e}return Object.defineProperty(e.prototype,"isBs4",{get:function(){return!h.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<this.yearRange;i++)t=new Date(a+i,0,1),t=this.fixTimeZone(t),n[i]=this.createDateObject(t,this.formatYear),n[i].uid=this.uniqueId+"-"+i;e.title=[n[0].label,n[this.yearRange-1].label].join(" - "),e.rows=this.split(n,e.datePicker.yearColLimit)}),"year"),this.datePicker.setCompareHandler((function(e,t){return e.getFullYear()-t.getFullYear()}),"year"),this.datePicker.refreshView()},e.prototype.getStartingYear=function(e){return(e-1)/this.datePicker.yearRange*this.datePicker.yearRange+1},e.decorators=[{type:t.Component,args:[{selector:"yearpicker",template:'\n<table *ngIf="datePicker.datepickerMode===\'year\'" role="grid">\n <thead>\n <tr>\n <th>\n <button type="button" class="btn btn-default btn-sm pull-left float-left"\n (click)="datePicker.move(-1)" tabindex="-1">‹</button>\n </th>\n <th [attr.colspan]="((datePicker.yearColLimit - 2) <= 0) ? 1 : datePicker.yearColLimit - 2">\n <button [id]="datePicker.uniqueId + \'-title\'" role="heading"\n type="button" class="btn btn-default btn-sm"\n (click)="datePicker.toggleMode(0)"\n [disabled]="datePicker.datepickerMode === datePicker.maxMode"\n [ngClass]="{disabled: datePicker.datepickerMode === datePicker.maxMode}" tabindex="-1" style="width:100%;">\n <strong>{{ title }}</strong>\n </button>\n </th>\n <th>\n <button type="button" class="btn btn-default btn-sm pull-right float-right"\n (click)="datePicker.move(1)" tabindex="-1">›</button>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor="let rowz of rows">\n <td *ngFor="let dtz of rowz" class="text-center" role="gridcell" [attr.id]="dtz.uid">\n <button type="button" style="min-width:100%;" class="btn btn-default"\n [ngClass]="{\'btn-link\': isBs4 && !dtz.selected && !datePicker.isActive(dtz), \'btn-info\': dtz.selected || (isBs4 && !dtz.selected && datePicker.isActive(dtz)), disabled: dtz.disabled, active: !isBs4 && datePicker.isActive(dtz)}"\n [disabled]="dtz.disabled"\n (click)="datePicker.select(dtz.date)" tabindex="-1">\n <span [ngClass]="{\'text-success\': isBs4 && dtz.current, \'text-info\': !isBs4 && dtz.current}">{{ dtz.label }}</span>\n </button>\n </td>\n </tr>\n </tbody>\n</table>\n ',styles:["\n :host .btn-info .text-success {\n color: #fff !important;\n }\n "]}]}],e.ctorParameters=function(){return[{type:ge}]},e}();var Me=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[ve]}},e.decorators=[{type:t.NgModule,args:[{imports:[l.CommonModule,d.FormsModule],declarations:[_e,ge,ke,we,Ce],exports:[_e,ge,ke,we,Ce],entryComponents:[_e]}]}],e}();e.BsDatepickerConfig=b,e.BsDatepickerContainerComponent=B,e.BsDatepickerDirective=z,e.BsDatepickerInlineConfig=W,e.BsDatepickerInlineContainerComponent=G,e.BsDatepickerInlineDirective=U,e.BsDatepickerInputDirective=ee,e.BsDatepickerModule=be,e.BsDaterangepickerConfig=te,e.BsDaterangepickerContainerComponent=Z,e.BsDaterangepickerDirective=ne,e.BsDaterangepickerInlineConfig=q,e.BsDaterangepickerInlineContainerComponent=K,e.BsDaterangepickerInlineDirective=Q,e.BsDaterangepickerInputDirective=se,e.BsLocaleService=v,e.DateFormatter=me,e.DatePickerComponent=_e,e.DatePickerInnerComponent=ge,e.DatepickerConfig=ve,e.DatepickerModule=Me,e.DayPickerComponent=ke,e.MonthPickerComponent=we,e.YearPickerComponent=Ce,e.ɵa=De,e.ɵb=m,e.ɵc=N,e.ɵd=D,e.ɵe=g,e.ɵf=Y,e.ɵg=re,e.ɵh=oe,e.ɵi=ce,e.ɵj=de,e.ɵk=he,e.ɵl=ue,e.ɵm=pe,e.ɵn=fe,e.ɵo=ye,Object.defineProperty(e,"__esModule",{value:!0})}));
16
16
  //# sourceMappingURL=ngx-bootstrap-datepicker.umd.min.js.map