diff --git a/CHANGELOG.md b/CHANGELOG.md index 410a2779..9ae1f011 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [2.2.1](https://github.com/toptal/simple-react-calendar/compare/v2.2.0...v2.2.1) (2020-04-22) + + +### Bug Fixes + +* call preventDefault method of event object properly ([#188](https://github.com/toptal/simple-react-calendar/issues/188)) ([614c194](https://github.com/toptal/simple-react-calendar/commit/614c194963f0b84cb6713b57832b5492b7c2b1a7)) + # [2.2.0](https://github.com/toptal/simple-react-calendar/compare/v2.1.0...v2.2.0) (2020-04-20) diff --git a/dist/simple-calendar.js b/dist/simple-calendar.js index 9a92e557..c71848eb 100644 --- a/dist/simple-calendar.js +++ b/dist/simple-calendar.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("classnames")):"function"==typeof define&&define.amd?define(["React","Classnames"],t):"object"==typeof exports?exports.Calendar=t(require("react"),require("classnames")):e.Calendar=t(e.React,e.Classnames)}(window,(function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=36)}([function(t,n){t.exports=e},function(e,t,n){var r=n(26),o=n(19),a=36e5,i=6e4,c=2,u=/[T ]/,s=/:/,l=/^(\d{2})$/,f=[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],d=/^(\d{4})/,p=[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],h=/^-(\d{2})$/,y=/^-?(\d{3})$/,m=/^-?(\d{2})-?(\d{2})$/,v=/^-?W(\d{2})$/,b=/^-?W(\d{2})-?(\d{1})$/,g=/^(\d{2}([.,]\d*)?)$/,D=/^(\d{2}):?(\d{2}([.,]\d*)?)$/,O=/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,_=/([Z+-].*)$/,S=/^(Z)$/,k=/^([+-])(\d{2})$/,w=/^([+-])(\d{2}):?(\d{2})$/;function M(e,t,n){t=t||0,n=n||0;var r=new Date(0);r.setUTCFullYear(e,0,4);var o=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+o),r}e.exports=function(e,t){if(o(e))return new Date(e.getTime());if("string"!=typeof e)return new Date(e);var n=(t||{}).additionalDigits;n=null==n?c:Number(n);var x=function(e){var t,n={},r=e.split(u);s.test(r[0])?(n.date=null,t=r[0]):(n.date=r[0],t=r[1]);if(t){var o=_.exec(t);o?(n.time=t.replace(o[1],""),n.timezone=o[1]):n.time=t}return n}(e),P=function(e,t){var n,r=f[t],o=p[t];if(n=d.exec(e)||o.exec(e)){var a=n[1];return{year:parseInt(a,10),restDateString:e.slice(a.length)}}if(n=l.exec(e)||r.exec(e)){var i=n[1];return{year:100*parseInt(i,10),restDateString:e.slice(i.length)}}return{year:null}}(x.date,n),j=P.year,T=function(e,t){if(null===t)return null;var n,r,o,a;if(0===e.length)return(r=new Date(0)).setUTCFullYear(t),r;if(n=h.exec(e))return r=new Date(0),o=parseInt(n[1],10)-1,r.setUTCFullYear(t,o),r;if(n=y.exec(e)){r=new Date(0);var i=parseInt(n[1],10);return r.setUTCFullYear(t,0,i),r}if(n=m.exec(e)){r=new Date(0),o=parseInt(n[1],10)-1;var c=parseInt(n[2],10);return r.setUTCFullYear(t,o,c),r}if(n=v.exec(e))return a=parseInt(n[1],10)-1,M(t,a);if(n=b.exec(e)){a=parseInt(n[1],10)-1;var u=parseInt(n[2],10)-1;return M(t,a,u)}return null}(P.restDateString,j);if(T){var E,C=T.getTime(),N=0;if(x.time&&(N=function(e){var t,n,r;if(t=g.exec(e))return(n=parseFloat(t[1].replace(",",".")))%24*a;if(t=D.exec(e))return n=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")),n%24*a+r*i;if(t=O.exec(e)){n=parseInt(t[1],10),r=parseInt(t[2],10);var o=parseFloat(t[3].replace(",","."));return n%24*a+r*i+1e3*o}return null}(x.time)),x.timezone)E=function(e){var t,n;if(t=S.exec(e))return 0;if(t=k.exec(e))return n=60*parseInt(t[2],10),"+"===t[1]?-n:n;if(t=w.exec(e))return n=60*parseInt(t[2],10)+parseInt(t[3],10),"+"===t[1]?-n:n;return 0}(x.timezone)*i;else{var W=C+N,Y=new Date(W);E=r(Y);var R=new Date(W);R.setDate(Y.getDate()+1);var F=r(R)-r(Y);F>0&&(E+=F)}return new Date(C+N+E)}return new Date(e)}},function(e,t,n){var r=n(1);e.exports=function(e,t){var n=r(e),o=r(t);return n.getTime()12?t%12:t},hh:function(e){return d(s.h(e),2)},m:function(e){return e.getMinutes()},mm:function(e){return d(e.getMinutes(),2)},s:function(e){return e.getSeconds()},ss:function(e){return d(e.getSeconds(),2)},S:function(e){return Math.floor(e.getMilliseconds()/100)},SS:function(e){return d(Math.floor(e.getMilliseconds()/10),2)},SSS:function(e){return d(e.getMilliseconds(),3)},Z:function(e){return f(e.getTimezoneOffset(),":")},ZZ:function(e){return f(e.getTimezoneOffset())},X:function(e){return Math.floor(e.getTime()/1e3)},x:function(e){return e.getTime()}};function l(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|]$/g,""):e.replace(/\\/g,"")}function f(e,t){t=t||"";var n=e>0?"-":"+",r=Math.abs(e),o=r%60;return n+d(Math.floor(r/60),2)+t+d(o,2)}function d(e,t){for(var n=Math.abs(e).toString();n.lengtho.getTime()}},function(e,t,n){var r=n(1);e.exports=function(e,t,n){var o=r(e).getTime(),a=r(t).getTime(),i=r(n).getTime();if(a>i)throw new Error("The start of the range cannot be after the end of the range");return o>=a&&o<=i}},function(e,t,n){var r=n(1);e.exports=function(e,t){var n=r(e),o=r(t);return n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()}},function(e,t,n){var r=n(1);e.exports=function(e,t){var n=t&&Number(t.weekStartsOn)||0,o=r(e),a=o.getDay(),i=6+(a=i.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1}},function(e,t,n){var r=n(1);e.exports=function(e,t,n,o){var a=r(e).getTime(),i=r(t).getTime(),c=r(n).getTime(),u=r(o).getTime();if(a>i||c>u)throw new Error("The start of the range cannot be after the end of the range");return ai)throw new Error("The first date cannot be after the second date");var c=[],u=o;for(u.setHours(0,0,0,0);u.getTime()<=i;)c.push(r(u)),u.setDate(u.getDate()+a);return c}},function(e,t,n){var r=n(1);e.exports=function(e){var t=r(e).getDay();return 0===t||6===t}},function(e,t,n){var r=n(1),o=n(35);e.exports=function(e,t){var n=r(e),a=Number(t),i=n.getMonth()+a,c=new Date(0);c.setFullYear(n.getFullYear(),i,1),c.setHours(0,0,0,0);var u=o(c);return n.setMonth(i,Math.min(u,n.getDate())),n}},function(e,t){e.exports=function(e){var t=new Date(e.getTime()),n=t.getTimezoneOffset();return t.setSeconds(0,0),6e4*n+t.getTime()%6e4}},function(e,t,n){var r=n(1),o=n(28),a=n(17);e.exports=function(e){var t=r(e);return a(t,o(t))+1}},function(e,t,n){var r=n(1);e.exports=function(e){var t=r(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}},function(e,t,n){var r=n(1),o=n(15),a=n(30),i=6048e5;e.exports=function(e){var t=r(e),n=o(t).getTime()-a(t).getTime();return Math.round(n/i)+1}},function(e,t,n){var r=n(20),o=n(15);e.exports=function(e){var t=r(e),n=new Date(0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),o(n)}},function(e,t,n){var r=n(32),o=n(33);e.exports={distanceInWords:r(),format:o()}},function(e,t){e.exports=function(){var e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};return{localize:function(t,n,r){var o;return r=r||{},o="string"==typeof e[t]?e[t]:1===n?e[t].one:e[t].other.replace("{{count}}",n),r.addSuffix?r.comparison>0?"in "+o:o+" ago":o}}}},function(e,t,n){var r=n(34);e.exports=function(){var e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],t=["January","February","March","April","May","June","July","August","September","October","November","December"],n=["Su","Mo","Tu","We","Th","Fr","Sa"],o=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],a=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],i=["AM","PM"],c=["am","pm"],u=["a.m.","p.m."],s={MMM:function(t){return e[t.getMonth()]},MMMM:function(e){return t[e.getMonth()]},dd:function(e){return n[e.getDay()]},ddd:function(e){return o[e.getDay()]},dddd:function(e){return a[e.getDay()]},A:function(e){return e.getHours()/12>=1?i[1]:i[0]},a:function(e){return e.getHours()/12>=1?c[1]:c[0]},aa:function(e){return e.getHours()/12>=1?u[1]:u[0]}};return["M","D","DDD","d","Q","W"].forEach((function(e){s[e+"o"]=function(t,n){return function(e){var t=e%100;if(t>20||t<10)switch(t%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"}(n[e](t))}})),{formatters:s,formattingTokensRegExp:r(s)}}},function(e,t){var n=["M","MM","Q","D","DD","DDD","DDDD","d","E","W","WW","YY","YYYY","GG","GGGG","H","HH","h","hh","m","mm","s","ss","S","SS","SSS","Z","ZZ","X","x"];e.exports=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);var o=n.concat(t).sort().reverse();return new RegExp("(\\[[^\\[]*\\])|(\\\\)?("+o.join("|")+"|.)","g")}},function(e,t,n){var r=n(1);e.exports=function(e){var t=r(e),n=t.getFullYear(),o=t.getMonth(),a=new Date(0);return a.setFullYear(n,o+1,0),a.setHours(0,0,0,0),a.getDate()}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),a=n(13),i=n.n(a),c=n(16),u=n.n(c),s=n(4),l=n.n(s),f=n(8),d=n.n(f),p=n(5),h=n.n(p),y=function(e){var t=e.blockClassName,n=e.date,r=e.getDayFormatted,a=e.handleOnClick,i=e.handleOnEnter,c=e.isCurrentMonth,u=e.isDisabled,s=e.isHighlighted,l=e.isMonthNext,f=e.isMonthPrev,d=e.isNonSelectable,p=e.ISODate,y=e.isSelectable,m=e.isSelected,v=e.isSelectionEnd,b=e.isSelectionStart,g=e.isToday,D=e.isWeekend,O=e.isWorkDay;return(o.a.createElement("button",{"data-simple-react-calendar-day":p,className:h()("".concat(t,"-week-day"),{"is-current_month":c,"is-disabled":u,"is-end_selection":v,"is-highlighted":s,"is-next_month":l,"is-not_selectable":d,"is-prev_month":f,"is-selectable":y,"is-selected":m,"is-start_selection":b,"is-today":g,"is-weekend":D,"is-working_day":O}),onClick:a,onMouseEnter:i,type:"button",value:p},r(n)))};y.displayName="Day";var m=y,v=function(e){var t=e.blockClassName,n=e.isWeekend,r=e.day;return(o.a.createElement("div",{className:h()("".concat(t,"-days_of_week_day"),{"is-weekend":n})},r))},b=n(9),g=n.n(b),D=n(21),O=n.n(D),_=n(17),S=n.n(_),k=n(22),w=n.n(k),M=n(14),x=n.n(M),P=n(2),j=n.n(P),T=n(10),E=n.n(T),C=n(6),N=n.n(C),W=n(1),Y=n.n(W),R=n(7),F=n.n(R),I=n(18),H=n.n(I);function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var A=function(e){var t=e.daysOfWeek,n=e.dayIndex-1;return t.slice(n).concat(t.slice(0,n))},G=function(e){var t=e.blockClassName,n=e.weekStartsOn,r=e.customRender,a=e.renderDayOfWeek,i=e.daysOfWeek,c=A({dayIndex:n,daysOfWeek:i}).map((function(e,n){return a({blockClassName:t,day:e,isWeekend:n>4,key:e})}));return r?r(function(e){for(var t=1;tD.length||j()(k,M)||N()(k,M);)D.push(k),k=g()(k,7);return D.map((function(t){return o.a.createElement(ue,{activeMonth:u,blockClassName:f,customRender:m,getDayFormatted:v,date:t,disabledIntervals:c,highlightedEnd:i,highlightedStart:a,key:t.getTime(),maxDate:S,minDate:_,onDayClick:e.handleOnDayClick,onDayMouseEnter:e.handleOnDayMouseEnter,onDisabledDayClick:e.handleOnDisabledDayClick,renderDay:y,selectedMax:r,selectedMin:n,today:s,weekStartsOn:h,getISODate:b})}))}},{key:"render",value:function(){var e=this.props,t=e.blockClassName,n=e.customRender,r=o.a.createElement(o.a.Fragment,null,this._renderDaysOfWeek(),this._renderWeeks());return n?n(function(e){for(var t=1;t0&&(E+=F)}return new Date(C+N+E)}return new Date(e)}},function(e,t,n){var r=n(1);e.exports=function(e,t){var n=r(e),o=r(t);return n.getTime()12?t%12:t},hh:function(e){return d(s.h(e),2)},m:function(e){return e.getMinutes()},mm:function(e){return d(e.getMinutes(),2)},s:function(e){return e.getSeconds()},ss:function(e){return d(e.getSeconds(),2)},S:function(e){return Math.floor(e.getMilliseconds()/100)},SS:function(e){return d(Math.floor(e.getMilliseconds()/10),2)},SSS:function(e){return d(e.getMilliseconds(),3)},Z:function(e){return f(e.getTimezoneOffset(),":")},ZZ:function(e){return f(e.getTimezoneOffset())},X:function(e){return Math.floor(e.getTime()/1e3)},x:function(e){return e.getTime()}};function l(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|]$/g,""):e.replace(/\\/g,"")}function f(e,t){t=t||"";var n=e>0?"-":"+",r=Math.abs(e),o=r%60;return n+d(Math.floor(r/60),2)+t+d(o,2)}function d(e,t){for(var n=Math.abs(e).toString();n.lengtho.getTime()}},function(e,t,n){var r=n(1);e.exports=function(e,t,n){var o=r(e).getTime(),a=r(t).getTime(),i=r(n).getTime();if(a>i)throw new Error("The start of the range cannot be after the end of the range");return o>=a&&o<=i}},function(e,t,n){var r=n(1);e.exports=function(e,t){var n=r(e),o=r(t);return n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()}},function(e,t,n){var r=n(1);e.exports=function(e,t){var n=t&&Number(t.weekStartsOn)||0,o=r(e),a=o.getDay(),i=6+(a=i.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1}},function(e,t,n){var r=n(1);e.exports=function(e,t,n,o){var a=r(e).getTime(),i=r(t).getTime(),c=r(n).getTime(),u=r(o).getTime();if(a>i||c>u)throw new Error("The start of the range cannot be after the end of the range");return ai)throw new Error("The first date cannot be after the second date");var c=[],u=o;for(u.setHours(0,0,0,0);u.getTime()<=i;)c.push(r(u)),u.setDate(u.getDate()+a);return c}},function(e,t,n){var r=n(1);e.exports=function(e){var t=r(e).getDay();return 0===t||6===t}},function(e,t,n){var r=n(1),o=n(35);e.exports=function(e,t){var n=r(e),a=Number(t),i=n.getMonth()+a,c=new Date(0);c.setFullYear(n.getFullYear(),i,1),c.setHours(0,0,0,0);var u=o(c);return n.setMonth(i,Math.min(u,n.getDate())),n}},function(e,t){e.exports=function(e){var t=new Date(e.getTime()),n=t.getTimezoneOffset();return t.setSeconds(0,0),6e4*n+t.getTime()%6e4}},function(e,t,n){var r=n(1),o=n(28),a=n(17);e.exports=function(e){var t=r(e);return a(t,o(t))+1}},function(e,t,n){var r=n(1);e.exports=function(e){var t=r(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}},function(e,t,n){var r=n(1),o=n(15),a=n(30),i=6048e5;e.exports=function(e){var t=r(e),n=o(t).getTime()-a(t).getTime();return Math.round(n/i)+1}},function(e,t,n){var r=n(20),o=n(15);e.exports=function(e){var t=r(e),n=new Date(0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),o(n)}},function(e,t,n){var r=n(32),o=n(33);e.exports={distanceInWords:r(),format:o()}},function(e,t){e.exports=function(){var e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};return{localize:function(t,n,r){var o;return r=r||{},o="string"==typeof e[t]?e[t]:1===n?e[t].one:e[t].other.replace("{{count}}",n),r.addSuffix?r.comparison>0?"in "+o:o+" ago":o}}}},function(e,t,n){var r=n(34);e.exports=function(){var e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],t=["January","February","March","April","May","June","July","August","September","October","November","December"],n=["Su","Mo","Tu","We","Th","Fr","Sa"],o=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],a=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],i=["AM","PM"],c=["am","pm"],u=["a.m.","p.m."],s={MMM:function(t){return e[t.getMonth()]},MMMM:function(e){return t[e.getMonth()]},dd:function(e){return n[e.getDay()]},ddd:function(e){return o[e.getDay()]},dddd:function(e){return a[e.getDay()]},A:function(e){return e.getHours()/12>=1?i[1]:i[0]},a:function(e){return e.getHours()/12>=1?c[1]:c[0]},aa:function(e){return e.getHours()/12>=1?u[1]:u[0]}};return["M","D","DDD","d","Q","W"].forEach((function(e){s[e+"o"]=function(t,n){return function(e){var t=e%100;if(t>20||t<10)switch(t%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"}(n[e](t))}})),{formatters:s,formattingTokensRegExp:r(s)}}},function(e,t){var n=["M","MM","Q","D","DD","DDD","DDDD","d","E","W","WW","YY","YYYY","GG","GGGG","H","HH","h","hh","m","mm","s","ss","S","SS","SSS","Z","ZZ","X","x"];e.exports=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);var o=n.concat(t).sort().reverse();return new RegExp("(\\[[^\\[]*\\])|(\\\\)?("+o.join("|")+"|.)","g")}},function(e,t,n){var r=n(1);e.exports=function(e){var t=r(e),n=t.getFullYear(),o=t.getMonth(),a=new Date(0);return a.setFullYear(n,o+1,0),a.setHours(0,0,0,0),a.getDate()}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),a=n(13),i=n.n(a),c=n(16),u=n.n(c),s=n(4),l=n.n(s),f=n(8),d=n.n(f),p=n(5),h=n.n(p),y=function(e){var t=e.blockClassName,n=e.date,r=e.getDayFormatted,a=e.handleOnClick,i=e.handleOnEnter,c=e.isCurrentMonth,u=e.isDisabled,s=e.isHighlighted,l=e.isMonthNext,f=e.isMonthPrev,d=e.isNonSelectable,p=e.ISODate,y=e.isSelectable,m=e.isSelected,v=e.isSelectionEnd,b=e.isSelectionStart,g=e.isToday,D=e.isWeekend,O=e.isWorkDay;return(o.a.createElement("button",{"data-simple-react-calendar-day":p,className:h()("".concat(t,"-week-day"),{"is-current_month":c,"is-disabled":u,"is-end_selection":v,"is-highlighted":s,"is-next_month":l,"is-not_selectable":d,"is-prev_month":f,"is-selectable":y,"is-selected":m,"is-start_selection":b,"is-today":g,"is-weekend":D,"is-working_day":O}),onClick:a,onMouseEnter:i,type:"button",value:p},r(n)))};y.displayName="Day";var m=y,v=function(e){var t=e.blockClassName,n=e.isWeekend,r=e.day;return(o.a.createElement("div",{className:h()("".concat(t,"-days_of_week_day"),{"is-weekend":n})},r))},b=n(9),g=n.n(b),D=n(21),O=n.n(D),_=n(17),S=n.n(_),k=n(22),w=n.n(k),M=n(14),x=n.n(M),P=n(2),j=n.n(P),T=n(10),E=n.n(T),C=n(6),N=n.n(C),W=n(1),Y=n.n(W),R=n(7),F=n.n(R),I=n(18),H=n.n(I);function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var A=function(e){var t=e.daysOfWeek,n=e.dayIndex-1;return t.slice(n).concat(t.slice(0,n))},G=function(e){var t=e.blockClassName,n=e.weekStartsOn,r=e.customRender,a=e.renderDayOfWeek,i=e.daysOfWeek,c=A({dayIndex:n,daysOfWeek:i}).map((function(e,n){return a({blockClassName:t,day:e,isWeekend:n>4,key:e})}));return r?r(function(e){for(var t=1;tD.length||j()(k,M)||N()(k,M);)D.push(k),k=g()(k,7);return D.map((function(t){return o.a.createElement(ue,{activeMonth:u,blockClassName:f,customRender:m,getDayFormatted:v,date:t,disabledIntervals:c,highlightedEnd:i,highlightedStart:a,key:t.getTime(),maxDate:S,minDate:_,onDayClick:e.handleOnDayClick,onDayMouseEnter:e.handleOnDayMouseEnter,onDisabledDayClick:e.handleOnDisabledDayClick,renderDay:y,selectedMax:r,selectedMin:n,today:s,weekStartsOn:h,getISODate:b})}))}},{key:"render",value:function(){var e=this.props,t=e.blockClassName,n=e.customRender,r=o.a.createElement(o.a.Fragment,null,this._renderDaysOfWeek(),this._renderWeeks());return n?n(function(e){for(var t=1;t Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Parse string '+02014101',\n * // if the additional number of digits in the extended year format is 1:\n * var result = parse('+02014101', {additionalDigits: 1})\n * //=> Fri Apr 11 2014 00:00:00\n */\nfunction parse (argument, dirtyOptions) {\n if (isDate(argument)) {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new Date(argument.getTime())\n } else if (typeof argument !== 'string') {\n return new Date(argument)\n }\n\n var options = dirtyOptions || {}\n var additionalDigits = options.additionalDigits\n if (additionalDigits == null) {\n additionalDigits = DEFAULT_ADDITIONAL_DIGITS\n } else {\n additionalDigits = Number(additionalDigits)\n }\n\n var dateStrings = splitDateString(argument)\n\n var parseYearResult = parseYear(dateStrings.date, additionalDigits)\n var year = parseYearResult.year\n var restDateString = parseYearResult.restDateString\n\n var date = parseDate(restDateString, year)\n\n if (date) {\n var timestamp = date.getTime()\n var time = 0\n var offset\n\n if (dateStrings.time) {\n time = parseTime(dateStrings.time)\n }\n\n if (dateStrings.timezone) {\n offset = parseTimezone(dateStrings.timezone) * MILLISECONDS_IN_MINUTE\n } else {\n var fullTime = timestamp + time\n var fullTimeDate = new Date(fullTime)\n\n offset = getTimezoneOffsetInMilliseconds(fullTimeDate)\n\n // Adjust time when it's coming from DST\n var fullTimeDateNextDay = new Date(fullTime)\n fullTimeDateNextDay.setDate(fullTimeDate.getDate() + 1)\n var offsetDiff =\n getTimezoneOffsetInMilliseconds(fullTimeDateNextDay) -\n getTimezoneOffsetInMilliseconds(fullTimeDate)\n if (offsetDiff > 0) {\n offset += offsetDiff\n }\n }\n\n return new Date(timestamp + time + offset)\n } else {\n return new Date(argument)\n }\n}\n\nfunction splitDateString (dateString) {\n var dateStrings = {}\n var array = dateString.split(parseTokenDateTimeDelimeter)\n var timeString\n\n if (parseTokenPlainTime.test(array[0])) {\n dateStrings.date = null\n timeString = array[0]\n } else {\n dateStrings.date = array[0]\n timeString = array[1]\n }\n\n if (timeString) {\n var token = parseTokenTimezone.exec(timeString)\n if (token) {\n dateStrings.time = timeString.replace(token[1], '')\n dateStrings.timezone = token[1]\n } else {\n dateStrings.time = timeString\n }\n }\n\n return dateStrings\n}\n\nfunction parseYear (dateString, additionalDigits) {\n var parseTokenYYY = parseTokensYYY[additionalDigits]\n var parseTokenYYYYY = parseTokensYYYYY[additionalDigits]\n\n var token\n\n // YYYY or ±YYYYY\n token = parseTokenYYYY.exec(dateString) || parseTokenYYYYY.exec(dateString)\n if (token) {\n var yearString = token[1]\n return {\n year: parseInt(yearString, 10),\n restDateString: dateString.slice(yearString.length)\n }\n }\n\n // YY or ±YYY\n token = parseTokenYY.exec(dateString) || parseTokenYYY.exec(dateString)\n if (token) {\n var centuryString = token[1]\n return {\n year: parseInt(centuryString, 10) * 100,\n restDateString: dateString.slice(centuryString.length)\n }\n }\n\n // Invalid ISO-formatted year\n return {\n year: null\n }\n}\n\nfunction parseDate (dateString, year) {\n // Invalid ISO-formatted year\n if (year === null) {\n return null\n }\n\n var token\n var date\n var month\n var week\n\n // YYYY\n if (dateString.length === 0) {\n date = new Date(0)\n date.setUTCFullYear(year)\n return date\n }\n\n // YYYY-MM\n token = parseTokenMM.exec(dateString)\n if (token) {\n date = new Date(0)\n month = parseInt(token[1], 10) - 1\n date.setUTCFullYear(year, month)\n return date\n }\n\n // YYYY-DDD or YYYYDDD\n token = parseTokenDDD.exec(dateString)\n if (token) {\n date = new Date(0)\n var dayOfYear = parseInt(token[1], 10)\n date.setUTCFullYear(year, 0, dayOfYear)\n return date\n }\n\n // YYYY-MM-DD or YYYYMMDD\n token = parseTokenMMDD.exec(dateString)\n if (token) {\n date = new Date(0)\n month = parseInt(token[1], 10) - 1\n var day = parseInt(token[2], 10)\n date.setUTCFullYear(year, month, day)\n return date\n }\n\n // YYYY-Www or YYYYWww\n token = parseTokenWww.exec(dateString)\n if (token) {\n week = parseInt(token[1], 10) - 1\n return dayOfISOYear(year, week)\n }\n\n // YYYY-Www-D or YYYYWwwD\n token = parseTokenWwwD.exec(dateString)\n if (token) {\n week = parseInt(token[1], 10) - 1\n var dayOfWeek = parseInt(token[2], 10) - 1\n return dayOfISOYear(year, week, dayOfWeek)\n }\n\n // Invalid ISO-formatted date\n return null\n}\n\nfunction parseTime (timeString) {\n var token\n var hours\n var minutes\n\n // hh\n token = parseTokenHH.exec(timeString)\n if (token) {\n hours = parseFloat(token[1].replace(',', '.'))\n return (hours % 24) * MILLISECONDS_IN_HOUR\n }\n\n // hh:mm or hhmm\n token = parseTokenHHMM.exec(timeString)\n if (token) {\n hours = parseInt(token[1], 10)\n minutes = parseFloat(token[2].replace(',', '.'))\n return (hours % 24) * MILLISECONDS_IN_HOUR +\n minutes * MILLISECONDS_IN_MINUTE\n }\n\n // hh:mm:ss or hhmmss\n token = parseTokenHHMMSS.exec(timeString)\n if (token) {\n hours = parseInt(token[1], 10)\n minutes = parseInt(token[2], 10)\n var seconds = parseFloat(token[3].replace(',', '.'))\n return (hours % 24) * MILLISECONDS_IN_HOUR +\n minutes * MILLISECONDS_IN_MINUTE +\n seconds * 1000\n }\n\n // Invalid ISO-formatted time\n return null\n}\n\nfunction parseTimezone (timezoneString) {\n var token\n var absoluteOffset\n\n // Z\n token = parseTokenTimezoneZ.exec(timezoneString)\n if (token) {\n return 0\n }\n\n // ±hh\n token = parseTokenTimezoneHH.exec(timezoneString)\n if (token) {\n absoluteOffset = parseInt(token[2], 10) * 60\n return (token[1] === '+') ? -absoluteOffset : absoluteOffset\n }\n\n // ±hh:mm or ±hhmm\n token = parseTokenTimezoneHHMM.exec(timezoneString)\n if (token) {\n absoluteOffset = parseInt(token[2], 10) * 60 + parseInt(token[3], 10)\n return (token[1] === '+') ? -absoluteOffset : absoluteOffset\n }\n\n return 0\n}\n\nfunction dayOfISOYear (isoYear, week, day) {\n week = week || 0\n day = day || 0\n var date = new Date(0)\n date.setUTCFullYear(isoYear, 0, 4)\n var fourthOfJanuaryDay = date.getUTCDay() || 7\n var diff = week * 7 + day + 1 - fourthOfJanuaryDay\n date.setUTCDate(date.getUTCDate() + diff)\n return date\n}\n\nmodule.exports = parse\n","var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * @param {Date|String|Number} date - the date that should be before the other one to return true\n * @param {Date|String|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is before the second date\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * var result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\nfunction isBefore (dirtyDate, dirtyDateToCompare) {\n var date = parse(dirtyDate)\n var dateToCompare = parse(dirtyDateToCompare)\n return date.getTime() < dateToCompare.getTime()\n}\n\nmodule.exports = isBefore\n","var parse = require('../parse/index.js')\n\n/**\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of a day\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * var result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\nfunction startOfDay (dirtyDate) {\n var date = parse(dirtyDate)\n date.setHours(0, 0, 0, 0)\n return date\n}\n\nmodule.exports = startOfDay\n","var parse = require('../parse/index.js')\n\n/**\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of a month\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * var result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nfunction startOfMonth (dirtyDate) {\n var date = parse(dirtyDate)\n date.setDate(1)\n date.setHours(0, 0, 0, 0)\n return date\n}\n\nmodule.exports = startOfMonth\n","module.exports = __WEBPACK_EXTERNAL_MODULE__5__;","var startOfDay = require('../start_of_day/index.js')\n\n/**\n * @category Day Helpers\n * @summary Are the given dates in the same day?\n *\n * @description\n * Are the given dates in the same day?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same day\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * var result = isSameDay(\n * new Date(2014, 8, 4, 6, 0),\n * new Date(2014, 8, 4, 18, 0)\n * )\n * //=> true\n */\nfunction isSameDay (dirtyDateLeft, dirtyDateRight) {\n var dateLeftStartOfDay = startOfDay(dirtyDateLeft)\n var dateRightStartOfDay = startOfDay(dirtyDateRight)\n\n return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime()\n}\n\nmodule.exports = isSameDay\n","var parse = require('../parse/index.js')\n\n/**\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the start of a week\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * var result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * var result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1})\n * //=> Mon Sep 01 2014 00:00:00\n */\nfunction startOfWeek (dirtyDate, dirtyOptions) {\n var weekStartsOn = dirtyOptions ? (Number(dirtyOptions.weekStartsOn) || 0) : 0\n\n var date = parse(dirtyDate)\n var day = date.getDay()\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn\n\n date.setDate(date.getDate() - diff)\n date.setHours(0, 0, 0, 0)\n return date\n}\n\nmodule.exports = startOfWeek\n","var getDayOfYear = require('../get_day_of_year/index.js')\nvar getISOWeek = require('../get_iso_week/index.js')\nvar getISOYear = require('../get_iso_year/index.js')\nvar parse = require('../parse/index.js')\nvar isValid = require('../is_valid/index.js')\nvar enLocale = require('../locale/en/index.js')\n\n/**\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format.\n *\n * Accepted tokens:\n * | Unit | Token | Result examples |\n * |-------------------------|-------|----------------------------------|\n * | Month | M | 1, 2, ..., 12 |\n * | | Mo | 1st, 2nd, ..., 12th |\n * | | MM | 01, 02, ..., 12 |\n * | | MMM | Jan, Feb, ..., Dec |\n * | | MMMM | January, February, ..., December |\n * | Quarter | Q | 1, 2, 3, 4 |\n * | | Qo | 1st, 2nd, 3rd, 4th |\n * | Day of month | D | 1, 2, ..., 31 |\n * | | Do | 1st, 2nd, ..., 31st |\n * | | DD | 01, 02, ..., 31 |\n * | Day of year | DDD | 1, 2, ..., 366 |\n * | | DDDo | 1st, 2nd, ..., 366th |\n * | | DDDD | 001, 002, ..., 366 |\n * | Day of week | d | 0, 1, ..., 6 |\n * | | do | 0th, 1st, ..., 6th |\n * | | dd | Su, Mo, ..., Sa |\n * | | ddd | Sun, Mon, ..., Sat |\n * | | dddd | Sunday, Monday, ..., Saturday |\n * | Day of ISO week | E | 1, 2, ..., 7 |\n * | ISO week | W | 1, 2, ..., 53 |\n * | | Wo | 1st, 2nd, ..., 53rd |\n * | | WW | 01, 02, ..., 53 |\n * | Year | YY | 00, 01, ..., 99 |\n * | | YYYY | 1900, 1901, ..., 2099 |\n * | ISO week-numbering year | GG | 00, 01, ..., 99 |\n * | | GGGG | 1900, 1901, ..., 2099 |\n * | AM/PM | A | AM, PM |\n * | | a | am, pm |\n * | | aa | a.m., p.m. |\n * | Hour | H | 0, 1, ... 23 |\n * | | HH | 00, 01, ... 23 |\n * | | h | 1, 2, ..., 12 |\n * | | hh | 01, 02, ..., 12 |\n * | Minute | m | 0, 1, ..., 59 |\n * | | mm | 00, 01, ..., 59 |\n * | Second | s | 0, 1, ..., 59 |\n * | | ss | 00, 01, ..., 59 |\n * | 1/10 of second | S | 0, 1, ..., 9 |\n * | 1/100 of second | SS | 00, 01, ..., 99 |\n * | Millisecond | SSS | 000, 001, ..., 999 |\n * | Timezone | Z | -01:00, +00:00, ... +12:00 |\n * | | ZZ | -0100, +0000, ..., +1200 |\n * | Seconds timestamp | X | 512969520 |\n * | Milliseconds timestamp | x | 512969520900 |\n *\n * The characters wrapped in square brackets are escaped.\n *\n * The result may vary by locale.\n *\n * @param {Date|String|Number} date - the original date\n * @param {String} [format='YYYY-MM-DDTHH:mm:ss.SSSZ'] - the string of tokens\n * @param {Object} [options] - the object with options\n * @param {Object} [options.locale=enLocale] - the locale object\n * @returns {String} the formatted date string\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * var result = format(\n * new Date(2014, 1, 11),\n * 'MM/DD/YYYY'\n * )\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * var eoLocale = require('date-fns/locale/eo')\n * var result = format(\n * new Date(2014, 6, 2),\n * 'Do [de] MMMM YYYY',\n * {locale: eoLocale}\n * )\n * //=> '2-a de julio 2014'\n */\nfunction format (dirtyDate, dirtyFormatStr, dirtyOptions) {\n var formatStr = dirtyFormatStr ? String(dirtyFormatStr) : 'YYYY-MM-DDTHH:mm:ss.SSSZ'\n var options = dirtyOptions || {}\n\n var locale = options.locale\n var localeFormatters = enLocale.format.formatters\n var formattingTokensRegExp = enLocale.format.formattingTokensRegExp\n if (locale && locale.format && locale.format.formatters) {\n localeFormatters = locale.format.formatters\n\n if (locale.format.formattingTokensRegExp) {\n formattingTokensRegExp = locale.format.formattingTokensRegExp\n }\n }\n\n var date = parse(dirtyDate)\n\n if (!isValid(date)) {\n return 'Invalid Date'\n }\n\n var formatFn = buildFormatFn(formatStr, localeFormatters, formattingTokensRegExp)\n\n return formatFn(date)\n}\n\nvar formatters = {\n // Month: 1, 2, ..., 12\n 'M': function (date) {\n return date.getMonth() + 1\n },\n\n // Month: 01, 02, ..., 12\n 'MM': function (date) {\n return addLeadingZeros(date.getMonth() + 1, 2)\n },\n\n // Quarter: 1, 2, 3, 4\n 'Q': function (date) {\n return Math.ceil((date.getMonth() + 1) / 3)\n },\n\n // Day of month: 1, 2, ..., 31\n 'D': function (date) {\n return date.getDate()\n },\n\n // Day of month: 01, 02, ..., 31\n 'DD': function (date) {\n return addLeadingZeros(date.getDate(), 2)\n },\n\n // Day of year: 1, 2, ..., 366\n 'DDD': function (date) {\n return getDayOfYear(date)\n },\n\n // Day of year: 001, 002, ..., 366\n 'DDDD': function (date) {\n return addLeadingZeros(getDayOfYear(date), 3)\n },\n\n // Day of week: 0, 1, ..., 6\n 'd': function (date) {\n return date.getDay()\n },\n\n // Day of ISO week: 1, 2, ..., 7\n 'E': function (date) {\n return date.getDay() || 7\n },\n\n // ISO week: 1, 2, ..., 53\n 'W': function (date) {\n return getISOWeek(date)\n },\n\n // ISO week: 01, 02, ..., 53\n 'WW': function (date) {\n return addLeadingZeros(getISOWeek(date), 2)\n },\n\n // Year: 00, 01, ..., 99\n 'YY': function (date) {\n return addLeadingZeros(date.getFullYear(), 4).substr(2)\n },\n\n // Year: 1900, 1901, ..., 2099\n 'YYYY': function (date) {\n return addLeadingZeros(date.getFullYear(), 4)\n },\n\n // ISO week-numbering year: 00, 01, ..., 99\n 'GG': function (date) {\n return String(getISOYear(date)).substr(2)\n },\n\n // ISO week-numbering year: 1900, 1901, ..., 2099\n 'GGGG': function (date) {\n return getISOYear(date)\n },\n\n // Hour: 0, 1, ... 23\n 'H': function (date) {\n return date.getHours()\n },\n\n // Hour: 00, 01, ..., 23\n 'HH': function (date) {\n return addLeadingZeros(date.getHours(), 2)\n },\n\n // Hour: 1, 2, ..., 12\n 'h': function (date) {\n var hours = date.getHours()\n if (hours === 0) {\n return 12\n } else if (hours > 12) {\n return hours % 12\n } else {\n return hours\n }\n },\n\n // Hour: 01, 02, ..., 12\n 'hh': function (date) {\n return addLeadingZeros(formatters['h'](date), 2)\n },\n\n // Minute: 0, 1, ..., 59\n 'm': function (date) {\n return date.getMinutes()\n },\n\n // Minute: 00, 01, ..., 59\n 'mm': function (date) {\n return addLeadingZeros(date.getMinutes(), 2)\n },\n\n // Second: 0, 1, ..., 59\n 's': function (date) {\n return date.getSeconds()\n },\n\n // Second: 00, 01, ..., 59\n 'ss': function (date) {\n return addLeadingZeros(date.getSeconds(), 2)\n },\n\n // 1/10 of second: 0, 1, ..., 9\n 'S': function (date) {\n return Math.floor(date.getMilliseconds() / 100)\n },\n\n // 1/100 of second: 00, 01, ..., 99\n 'SS': function (date) {\n return addLeadingZeros(Math.floor(date.getMilliseconds() / 10), 2)\n },\n\n // Millisecond: 000, 001, ..., 999\n 'SSS': function (date) {\n return addLeadingZeros(date.getMilliseconds(), 3)\n },\n\n // Timezone: -01:00, +00:00, ... +12:00\n 'Z': function (date) {\n return formatTimezone(date.getTimezoneOffset(), ':')\n },\n\n // Timezone: -0100, +0000, ... +1200\n 'ZZ': function (date) {\n return formatTimezone(date.getTimezoneOffset())\n },\n\n // Seconds timestamp: 512969520\n 'X': function (date) {\n return Math.floor(date.getTime() / 1000)\n },\n\n // Milliseconds timestamp: 512969520900\n 'x': function (date) {\n return date.getTime()\n }\n}\n\nfunction buildFormatFn (formatStr, localeFormatters, formattingTokensRegExp) {\n var array = formatStr.match(formattingTokensRegExp)\n var length = array.length\n\n var i\n var formatter\n for (i = 0; i < length; i++) {\n formatter = localeFormatters[array[i]] || formatters[array[i]]\n if (formatter) {\n array[i] = formatter\n } else {\n array[i] = removeFormattingTokens(array[i])\n }\n }\n\n return function (date) {\n var output = ''\n for (var i = 0; i < length; i++) {\n if (array[i] instanceof Function) {\n output += array[i](date, formatters)\n } else {\n output += array[i]\n }\n }\n return output\n }\n}\n\nfunction removeFormattingTokens (input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|]$/g, '')\n }\n return input.replace(/\\\\/g, '')\n}\n\nfunction formatTimezone (offset, delimeter) {\n delimeter = delimeter || ''\n var sign = offset > 0 ? '-' : '+'\n var absOffset = Math.abs(offset)\n var hours = Math.floor(absOffset / 60)\n var minutes = absOffset % 60\n return sign + addLeadingZeros(hours, 2) + delimeter + addLeadingZeros(minutes, 2)\n}\n\nfunction addLeadingZeros (number, targetLength) {\n var output = Math.abs(number).toString()\n while (output.length < targetLength) {\n output = '0' + output\n }\n return output\n}\n\nmodule.exports = format\n","var parse = require('../parse/index.js')\n\n/**\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added\n * @returns {Date} the new date with the days added\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * var result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\nfunction addDays (dirtyDate, dirtyAmount) {\n var date = parse(dirtyDate)\n var amount = Number(dirtyAmount)\n date.setDate(date.getDate() + amount)\n return date\n}\n\nmodule.exports = addDays\n","var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Are the given dates equal?\n *\n * @description\n * Are the given dates equal?\n *\n * @param {Date|String|Number} dateLeft - the first date to compare\n * @param {Date|String|Number} dateRight - the second date to compare\n * @returns {Boolean} the dates are equal\n *\n * @example\n * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\n * var result = isEqual(\n * new Date(2014, 6, 2, 6, 30, 45, 0)\n * new Date(2014, 6, 2, 6, 30, 45, 500)\n * )\n * //=> false\n */\nfunction isEqual (dirtyLeftDate, dirtyRightDate) {\n var dateLeft = parse(dirtyLeftDate)\n var dateRight = parse(dirtyRightDate)\n return dateLeft.getTime() === dateRight.getTime()\n}\n\nmodule.exports = isEqual\n","var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @param {Date|String|Number} date - the date that should be after the other one to return true\n * @param {Date|String|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is after the second date\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * var result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\nfunction isAfter (dirtyDate, dirtyDateToCompare) {\n var date = parse(dirtyDate)\n var dateToCompare = parse(dirtyDateToCompare)\n return date.getTime() > dateToCompare.getTime()\n}\n\nmodule.exports = isAfter\n","var parse = require('../parse/index.js')\n\n/**\n * @category Range Helpers\n * @summary Is the given date within the range?\n *\n * @description\n * Is the given date within the range?\n *\n * @param {Date|String|Number} date - the date to check\n * @param {Date|String|Number} startDate - the start of range\n * @param {Date|String|Number} endDate - the end of range\n * @returns {Boolean} the date is within the range\n * @throws {Error} startDate cannot be after endDate\n *\n * @example\n * // For the date within the range:\n * isWithinRange(\n * new Date(2014, 0, 3), new Date(2014, 0, 1), new Date(2014, 0, 7)\n * )\n * //=> true\n *\n * @example\n * // For the date outside of the range:\n * isWithinRange(\n * new Date(2014, 0, 10), new Date(2014, 0, 1), new Date(2014, 0, 7)\n * )\n * //=> false\n */\nfunction isWithinRange (dirtyDate, dirtyStartDate, dirtyEndDate) {\n var time = parse(dirtyDate).getTime()\n var startTime = parse(dirtyStartDate).getTime()\n var endTime = parse(dirtyEndDate).getTime()\n\n if (startTime > endTime) {\n throw new Error('The start of the range cannot be after the end of the range')\n }\n\n return time >= startTime && time <= endTime\n}\n\nmodule.exports = isWithinRange\n","var parse = require('../parse/index.js')\n\n/**\n * @category Month Helpers\n * @summary Are the given dates in the same month?\n *\n * @description\n * Are the given dates in the same month?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same month\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * var result = isSameMonth(\n * new Date(2014, 8, 2),\n * new Date(2014, 8, 25)\n * )\n * //=> true\n */\nfunction isSameMonth (dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft)\n var dateRight = parse(dirtyDateRight)\n return dateLeft.getFullYear() === dateRight.getFullYear() &&\n dateLeft.getMonth() === dateRight.getMonth()\n}\n\nmodule.exports = isSameMonth\n","var parse = require('../parse/index.js')\n\n/**\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the end of a week\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * var result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * var result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1})\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nfunction endOfWeek (dirtyDate, dirtyOptions) {\n var weekStartsOn = dirtyOptions ? (Number(dirtyOptions.weekStartsOn) || 0) : 0\n\n var date = parse(dirtyDate)\n var day = date.getDay()\n var diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn)\n\n date.setDate(date.getDate() + diff)\n date.setHours(23, 59, 59, 999)\n return date\n}\n\nmodule.exports = endOfWeek\n","var startOfWeek = require('../start_of_week/index.js')\n\n/**\n * @category ISO Week Helpers\n * @summary Return the start of an ISO week for the given date.\n *\n * @description\n * Return the start of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of an ISO week\n *\n * @example\n * // The start of an ISO week for 2 September 2014 11:55:00:\n * var result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nfunction startOfISOWeek (dirtyDate) {\n return startOfWeek(dirtyDate, {weekStartsOn: 1})\n}\n\nmodule.exports = startOfISOWeek\n","var isDate = require('../is_date/index.js')\n\n/**\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param {Date} date - the date to check\n * @returns {Boolean} the date is valid\n * @throws {TypeError} argument must be an instance of Date\n *\n * @example\n * // For the valid date:\n * var result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the invalid date:\n * var result = isValid(new Date(''))\n * //=> false\n */\nfunction isValid (dirtyDate) {\n if (isDate(dirtyDate)) {\n return !isNaN(dirtyDate)\n } else {\n throw new TypeError(toString.call(dirtyDate) + ' is not an instance of Date')\n }\n}\n\nmodule.exports = isValid\n","var startOfDay = require('../start_of_day/index.js')\n\nvar MILLISECONDS_IN_MINUTE = 60000\nvar MILLISECONDS_IN_DAY = 86400000\n\n/**\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar days\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * var result = differenceInCalendarDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n */\nfunction differenceInCalendarDays (dirtyDateLeft, dirtyDateRight) {\n var startOfDayLeft = startOfDay(dirtyDateLeft)\n var startOfDayRight = startOfDay(dirtyDateRight)\n\n var timestampLeft = startOfDayLeft.getTime() -\n startOfDayLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE\n var timestampRight = startOfDayRight.getTime() -\n startOfDayRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE\n\n // Round the number of days to the nearest integer\n // because the number of milliseconds in a day is not constant\n // (e.g. it's different in the day of the daylight saving time clock shift)\n return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY)\n}\n\nmodule.exports = differenceInCalendarDays\n","var addDays = require('../add_days/index.js')\n\n/**\n * @category Day Helpers\n * @summary Subtract the specified number of days from the given date.\n *\n * @description\n * Subtract the specified number of days from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be subtracted\n * @returns {Date} the new date with the days subtracted\n *\n * @example\n * // Subtract 10 days from 1 September 2014:\n * var result = subDays(new Date(2014, 8, 1), 10)\n * //=> Fri Aug 22 2014 00:00:00\n */\nfunction subDays (dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount)\n return addDays(dirtyDate, -amount)\n}\n\nmodule.exports = subDays\n","/**\n * @category Common Helpers\n * @summary Is the given argument an instance of Date?\n *\n * @description\n * Is the given argument an instance of Date?\n *\n * @param {*} argument - the argument to check\n * @returns {Boolean} the given argument is an instance of Date\n *\n * @example\n * // Is 'mayonnaise' a Date?\n * var result = isDate('mayonnaise')\n * //=> false\n */\nfunction isDate (argument) {\n return argument instanceof Date\n}\n\nmodule.exports = isDate\n","var parse = require('../parse/index.js')\nvar startOfISOWeek = require('../start_of_iso_week/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the ISO week-numbering year\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * var result = getISOYear(new Date(2005, 0, 2))\n * //=> 2004\n */\nfunction getISOYear (dirtyDate) {\n var date = parse(dirtyDate)\n var year = date.getFullYear()\n\n var fourthOfJanuaryOfNextYear = new Date(0)\n fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4)\n fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0)\n var startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear)\n\n var fourthOfJanuaryOfThisYear = new Date(0)\n fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4)\n fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0)\n var startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear)\n\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year\n } else {\n return year - 1\n }\n}\n\nmodule.exports = getISOYear\n","var parse = require('../parse/index.js')\n\n/**\n * @category Range Helpers\n * @summary Is the given date range overlapping with another date range?\n *\n * @description\n * Is the given date range overlapping with another date range?\n *\n * @param {Date|String|Number} initialRangeStartDate - the start of the initial range\n * @param {Date|String|Number} initialRangeEndDate - the end of the initial range\n * @param {Date|String|Number} comparedRangeStartDate - the start of the range to compare it with\n * @param {Date|String|Number} comparedRangeEndDate - the end of the range to compare it with\n * @returns {Boolean} whether the date ranges are overlapping\n * @throws {Error} startDate of a date range cannot be after its endDate\n *\n * @example\n * // For overlapping date ranges:\n * areRangesOverlapping(\n * new Date(2014, 0, 10), new Date(2014, 0, 20), new Date(2014, 0, 17), new Date(2014, 0, 21)\n * )\n * //=> true\n *\n * @example\n * // For non-overlapping date ranges:\n * areRangesOverlapping(\n * new Date(2014, 0, 10), new Date(2014, 0, 20), new Date(2014, 0, 21), new Date(2014, 0, 22)\n * )\n * //=> false\n */\nfunction areRangesOverlapping (dirtyInitialRangeStartDate, dirtyInitialRangeEndDate, dirtyComparedRangeStartDate, dirtyComparedRangeEndDate) {\n var initialStartTime = parse(dirtyInitialRangeStartDate).getTime()\n var initialEndTime = parse(dirtyInitialRangeEndDate).getTime()\n var comparedStartTime = parse(dirtyComparedRangeStartDate).getTime()\n var comparedEndTime = parse(dirtyComparedRangeEndDate).getTime()\n\n if (initialStartTime > initialEndTime || comparedStartTime > comparedEndTime) {\n throw new Error('The start of the range cannot be after the end of the range')\n }\n\n return initialStartTime < comparedEndTime && comparedStartTime < initialEndTime\n}\n\nmodule.exports = areRangesOverlapping\n","var parse = require('../parse/index.js')\n\n/**\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * var result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nfunction endOfMonth (dirtyDate) {\n var date = parse(dirtyDate)\n var month = date.getMonth()\n date.setFullYear(date.getFullYear(), month + 1, 0)\n date.setHours(23, 59, 59, 999)\n return date\n}\n\nmodule.exports = endOfMonth\n","var parse = require('../parse/index.js')\n\n/**\n * @category Day Helpers\n * @summary Return the array of dates within the specified range.\n *\n * @description\n * Return the array of dates within the specified range.\n *\n * @param {Date|String|Number} startDate - the first date\n * @param {Date|String|Number} endDate - the last date\n * @param {Number} [step=1] - the step between each day\n * @returns {Date[]} the array with starts of days from the day of startDate to the day of endDate\n * @throws {Error} startDate cannot be after endDate\n *\n * @example\n * // Each day between 6 October 2014 and 10 October 2014:\n * var result = eachDay(\n * new Date(2014, 9, 6),\n * new Date(2014, 9, 10)\n * )\n * //=> [\n * // Mon Oct 06 2014 00:00:00,\n * // Tue Oct 07 2014 00:00:00,\n * // Wed Oct 08 2014 00:00:00,\n * // Thu Oct 09 2014 00:00:00,\n * // Fri Oct 10 2014 00:00:00\n * // ]\n */\nfunction eachDay (dirtyStartDate, dirtyEndDate, dirtyStep) {\n var startDate = parse(dirtyStartDate)\n var endDate = parse(dirtyEndDate)\n var step = dirtyStep !== undefined ? dirtyStep : 1\n\n var endTime = endDate.getTime()\n\n if (startDate.getTime() > endTime) {\n throw new Error('The first date cannot be after the second date')\n }\n\n var dates = []\n\n var currentDate = startDate\n currentDate.setHours(0, 0, 0, 0)\n\n while (currentDate.getTime() <= endTime) {\n dates.push(parse(currentDate))\n currentDate.setDate(currentDate.getDate() + step)\n }\n\n return dates\n}\n\nmodule.exports = eachDay\n","var parse = require('../parse/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Does the given date fall on a weekend?\n *\n * @description\n * Does the given date fall on a weekend?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date falls on a weekend\n *\n * @example\n * // Does 5 October 2014 fall on a weekend?\n * var result = isWeekend(new Date(2014, 9, 5))\n * //=> true\n */\nfunction isWeekend (dirtyDate) {\n var date = parse(dirtyDate)\n var day = date.getDay()\n return day === 0 || day === 6\n}\n\nmodule.exports = isWeekend\n","var parse = require('../parse/index.js')\nvar getDaysInMonth = require('../get_days_in_month/index.js')\n\n/**\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added\n * @returns {Date} the new date with the months added\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * var result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\nfunction addMonths (dirtyDate, dirtyAmount) {\n var date = parse(dirtyDate)\n var amount = Number(dirtyAmount)\n var desiredMonth = date.getMonth() + amount\n var dateWithDesiredMonth = new Date(0)\n dateWithDesiredMonth.setFullYear(date.getFullYear(), desiredMonth, 1)\n dateWithDesiredMonth.setHours(0, 0, 0, 0)\n var daysInMonth = getDaysInMonth(dateWithDesiredMonth)\n // Set the last day of the new month\n // if the original date was the last day of the longer month\n date.setMonth(desiredMonth, Math.min(daysInMonth, date.getDate()))\n return date\n}\n\nmodule.exports = addMonths\n","var MILLISECONDS_IN_MINUTE = 60000\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nmodule.exports = function getTimezoneOffsetInMilliseconds (dirtyDate) {\n var date = new Date(dirtyDate.getTime())\n var baseTimezoneOffset = date.getTimezoneOffset()\n date.setSeconds(0, 0)\n var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE\n\n return baseTimezoneOffset * MILLISECONDS_IN_MINUTE + millisecondsPartOfTimezoneOffset\n}\n","var parse = require('../parse/index.js')\nvar startOfYear = require('../start_of_year/index.js')\nvar differenceInCalendarDays = require('../difference_in_calendar_days/index.js')\n\n/**\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * var result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\nfunction getDayOfYear (dirtyDate) {\n var date = parse(dirtyDate)\n var diff = differenceInCalendarDays(date, startOfYear(date))\n var dayOfYear = diff + 1\n return dayOfYear\n}\n\nmodule.exports = getDayOfYear\n","var parse = require('../parse/index.js')\n\n/**\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of a year\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * var result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\nfunction startOfYear (dirtyDate) {\n var cleanDate = parse(dirtyDate)\n var date = new Date(0)\n date.setFullYear(cleanDate.getFullYear(), 0, 1)\n date.setHours(0, 0, 0, 0)\n return date\n}\n\nmodule.exports = startOfYear\n","var parse = require('../parse/index.js')\nvar startOfISOWeek = require('../start_of_iso_week/index.js')\nvar startOfISOYear = require('../start_of_iso_year/index.js')\n\nvar MILLISECONDS_IN_WEEK = 604800000\n\n/**\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the ISO week\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * var result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\nfunction getISOWeek (dirtyDate) {\n var date = parse(dirtyDate)\n var diff = startOfISOWeek(date).getTime() - startOfISOYear(date).getTime()\n\n // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1\n}\n\nmodule.exports = getISOWeek\n","var getISOYear = require('../get_iso_year/index.js')\nvar startOfISOWeek = require('../start_of_iso_week/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of an ISO year\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * var result = startOfISOYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\nfunction startOfISOYear (dirtyDate) {\n var year = getISOYear(dirtyDate)\n var fourthOfJanuary = new Date(0)\n fourthOfJanuary.setFullYear(year, 0, 4)\n fourthOfJanuary.setHours(0, 0, 0, 0)\n var date = startOfISOWeek(fourthOfJanuary)\n return date\n}\n\nmodule.exports = startOfISOYear\n","var buildDistanceInWordsLocale = require('./build_distance_in_words_locale/index.js')\nvar buildFormatLocale = require('./build_format_locale/index.js')\n\n/**\n * @category Locales\n * @summary English locale.\n */\nmodule.exports = {\n distanceInWords: buildDistanceInWordsLocale(),\n format: buildFormatLocale()\n}\n","function buildDistanceInWordsLocale () {\n var distanceInWordsLocale = {\n lessThanXSeconds: {\n one: 'less than a second',\n other: 'less than {{count}} seconds'\n },\n\n xSeconds: {\n one: '1 second',\n other: '{{count}} seconds'\n },\n\n halfAMinute: 'half a minute',\n\n lessThanXMinutes: {\n one: 'less than a minute',\n other: 'less than {{count}} minutes'\n },\n\n xMinutes: {\n one: '1 minute',\n other: '{{count}} minutes'\n },\n\n aboutXHours: {\n one: 'about 1 hour',\n other: 'about {{count}} hours'\n },\n\n xHours: {\n one: '1 hour',\n other: '{{count}} hours'\n },\n\n xDays: {\n one: '1 day',\n other: '{{count}} days'\n },\n\n aboutXMonths: {\n one: 'about 1 month',\n other: 'about {{count}} months'\n },\n\n xMonths: {\n one: '1 month',\n other: '{{count}} months'\n },\n\n aboutXYears: {\n one: 'about 1 year',\n other: 'about {{count}} years'\n },\n\n xYears: {\n one: '1 year',\n other: '{{count}} years'\n },\n\n overXYears: {\n one: 'over 1 year',\n other: 'over {{count}} years'\n },\n\n almostXYears: {\n one: 'almost 1 year',\n other: 'almost {{count}} years'\n }\n }\n\n function localize (token, count, options) {\n options = options || {}\n\n var result\n if (typeof distanceInWordsLocale[token] === 'string') {\n result = distanceInWordsLocale[token]\n } else if (count === 1) {\n result = distanceInWordsLocale[token].one\n } else {\n result = distanceInWordsLocale[token].other.replace('{{count}}', count)\n }\n\n if (options.addSuffix) {\n if (options.comparison > 0) {\n return 'in ' + result\n } else {\n return result + ' ago'\n }\n }\n\n return result\n }\n\n return {\n localize: localize\n }\n}\n\nmodule.exports = buildDistanceInWordsLocale\n","var buildFormattingTokensRegExp = require('../../_lib/build_formatting_tokens_reg_exp/index.js')\n\nfunction buildFormatLocale () {\n // Note: in English, the names of days of the week and months are capitalized.\n // If you are making a new locale based on this one, check if the same is true for the language you're working on.\n // Generally, formatted dates should look like they are in the middle of a sentence,\n // e.g. in Spanish language the weekdays and months should be in the lowercase.\n var months3char = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']\n var monthsFull = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']\n var weekdays2char = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']\n var weekdays3char = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']\n var weekdaysFull = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\n var meridiemUppercase = ['AM', 'PM']\n var meridiemLowercase = ['am', 'pm']\n var meridiemFull = ['a.m.', 'p.m.']\n\n var formatters = {\n // Month: Jan, Feb, ..., Dec\n 'MMM': function (date) {\n return months3char[date.getMonth()]\n },\n\n // Month: January, February, ..., December\n 'MMMM': function (date) {\n return monthsFull[date.getMonth()]\n },\n\n // Day of week: Su, Mo, ..., Sa\n 'dd': function (date) {\n return weekdays2char[date.getDay()]\n },\n\n // Day of week: Sun, Mon, ..., Sat\n 'ddd': function (date) {\n return weekdays3char[date.getDay()]\n },\n\n // Day of week: Sunday, Monday, ..., Saturday\n 'dddd': function (date) {\n return weekdaysFull[date.getDay()]\n },\n\n // AM, PM\n 'A': function (date) {\n return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0]\n },\n\n // am, pm\n 'a': function (date) {\n return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0]\n },\n\n // a.m., p.m.\n 'aa': function (date) {\n return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0]\n }\n }\n\n // Generate ordinal version of formatters: M -> Mo, D -> Do, etc.\n var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W']\n ordinalFormatters.forEach(function (formatterToken) {\n formatters[formatterToken + 'o'] = function (date, formatters) {\n return ordinal(formatters[formatterToken](date))\n }\n })\n\n return {\n formatters: formatters,\n formattingTokensRegExp: buildFormattingTokensRegExp(formatters)\n }\n}\n\nfunction ordinal (number) {\n var rem100 = number % 100\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + 'st'\n case 2:\n return number + 'nd'\n case 3:\n return number + 'rd'\n }\n }\n return number + 'th'\n}\n\nmodule.exports = buildFormatLocale\n","var commonFormatterKeys = [\n 'M', 'MM', 'Q', 'D', 'DD', 'DDD', 'DDDD', 'd',\n 'E', 'W', 'WW', 'YY', 'YYYY', 'GG', 'GGGG',\n 'H', 'HH', 'h', 'hh', 'm', 'mm',\n 's', 'ss', 'S', 'SS', 'SSS',\n 'Z', 'ZZ', 'X', 'x'\n]\n\nfunction buildFormattingTokensRegExp (formatters) {\n var formatterKeys = []\n for (var key in formatters) {\n if (formatters.hasOwnProperty(key)) {\n formatterKeys.push(key)\n }\n }\n\n var formattingTokens = commonFormatterKeys\n .concat(formatterKeys)\n .sort()\n .reverse()\n var formattingTokensRegExp = new RegExp(\n '(\\\\[[^\\\\[]*\\\\])|(\\\\\\\\)?' + '(' + formattingTokens.join('|') + '|.)', 'g'\n )\n\n return formattingTokensRegExp\n}\n\nmodule.exports = buildFormattingTokensRegExp\n","var parse = require('../parse/index.js')\n\n/**\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the number of days in a month\n *\n * @example\n * // How many days are in February 2000?\n * var result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\nfunction getDaysInMonth (dirtyDate) {\n var date = parse(dirtyDate)\n var year = date.getFullYear()\n var monthIndex = date.getMonth()\n var lastDayOfMonth = new Date(0)\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0)\n lastDayOfMonth.setHours(0, 0, 0, 0)\n return lastDayOfMonth.getDate()\n}\n\nmodule.exports = getDaysInMonth\n","import React, { FC } from 'react'\nimport cx from 'classnames'\n\nimport * as helper from '../../helper'\nimport { HandleOnDayClick, HandleOnDayEnter } from '../../@types'\n\ninterface Props {\n blockClassName: string\n date: Date\n getDayFormatted: typeof helper.getDayFormatted\n handleOnClick: HandleOnDayClick\n handleOnEnter: HandleOnDayEnter\n isCurrentMonth: boolean\n isDisabled: boolean\n isHighlighted: boolean\n isMonthNext: boolean\n isMonthPrev: boolean\n isNonSelectable: boolean\n ISODate: string\n isSelectable: boolean\n isSelected: boolean\n isSelectionEnd: boolean\n isSelectionStart: boolean\n isToday: boolean\n isWeekend: boolean\n isWorkDay: boolean\n key?: string\n}\n\nconst Day: FC = ({\n blockClassName,\n date,\n getDayFormatted,\n handleOnClick,\n handleOnEnter,\n isCurrentMonth,\n isDisabled,\n isHighlighted,\n isMonthNext,\n isMonthPrev,\n isNonSelectable,\n ISODate,\n isSelectable,\n isSelected,\n isSelectionEnd,\n isSelectionStart,\n isToday,\n isWeekend,\n isWorkDay\n}) => (\n \n {getDayFormatted(date)}\n \n)\n\nDay.displayName = 'Day'\n\nexport default Day\n","import React, { FC } from 'react'\nimport classnames from 'classnames'\n\ntype Props = {\n blockClassName?: string\n day: string\n isWeekend: boolean\n // TODO: fix type definitions instead\n key?: string\n}\n\nconst DayOfWeek: FC = ({ blockClassName, isWeekend, day }) => (\n \n {day}\n \n)\n\nexport default DayOfWeek\n","import React, { FC } from 'react'\n\nimport { IDaysOfWeekRenderProps, RenderPropsDayOfWeek } from '../@types'\n\nconst FRIDAY_INDEX = 4\n\nexport type Props = {\n blockClassName: string\n customRender?: IDaysOfWeekRenderProps\n daysOfWeek: string[]\n renderDayOfWeek: RenderPropsDayOfWeek\n weekStartsOn: number\n}\n\ninterface IGetDaysOfWeek {\n daysOfWeek: string[]\n dayIndex: number\n}\n\nconst getDaysOfWeek = ({ daysOfWeek, dayIndex }: IGetDaysOfWeek): string[] => {\n const adjustedIndex = dayIndex - 1\n\n return daysOfWeek\n .slice(adjustedIndex)\n .concat(daysOfWeek.slice(0, adjustedIndex))\n}\n\nconst DaysOfWeek: FC & {\n getDaysOfWeek: (props: IGetDaysOfWeek) => string[]\n} = props => {\n const {\n blockClassName,\n weekStartsOn,\n customRender,\n renderDayOfWeek,\n daysOfWeek\n } = props\n const slicedDaysOfWeek = getDaysOfWeek({ dayIndex: weekStartsOn, daysOfWeek })\n\n const children = slicedDaysOfWeek.map((day, index) =>\n renderDayOfWeek({\n blockClassName,\n day,\n isWeekend: index > FRIDAY_INDEX,\n key: day\n })\n )\n\n if (customRender) {\n return customRender({\n ...props,\n children\n })\n }\n\n return
{children}
\n}\n\nDaysOfWeek.displayName = 'DaysOfWeek'\n\n// TODO: extract to a separate helper\n// @ts-ignore\nDaysOfWeek.getDaysOfWeek = getDaysOfWeek\n\nexport default DaysOfWeek\n","import React, { Component } from 'react'\nimport eachDay from 'date-fns/each_day'\nimport endOfWeek from 'date-fns/end_of_week'\nimport isAfter from 'date-fns/is_after'\nimport isBefore from 'date-fns/is_before'\nimport isEqual from 'date-fns/is_equal'\nimport isSameDay from 'date-fns/is_same_day'\nimport isSameMonth from 'date-fns/is_same_month'\nimport isWeekend from 'date-fns/is_weekend'\nimport isWithinRange from 'date-fns/is_within_range'\nimport startOfDay from 'date-fns/start_of_day'\nimport startOfWeek from 'date-fns/start_of_week'\n\nimport * as helper from '../helper'\nimport {\n IDate,\n IWeekRenderProps,\n OnDayClick,\n OnDayMouseEnter,\n OnDisabledDayClick,\n RenderPropsDay\n} from '../@types'\n\nexport type Props = {\n activeMonth: IDate\n blockClassName: string\n customRender?: IWeekRenderProps\n date: IDate\n disabledIntervals?: {\n start: IDate\n end: IDate\n }[]\n getDayFormatted: typeof helper.getDayFormatted\n getISODate: typeof helper.getISODate\n highlightedEnd?: IDate\n highlightedStart?: IDate\n maxDate?: IDate\n minDate?: IDate\n onDayClick: OnDayClick\n onDayMouseEnter: OnDayMouseEnter\n onDisabledDayClick: OnDisabledDayClick\n renderDay: RenderPropsDay\n selectedMax?: IDate\n selectedMin?: IDate\n today: IDate\n weekStartsOn: number\n}\n\n// TODO: FC Rewrite\n/* eslint-disable react/require-optimization */\nexport default class Week extends Component {\n _dateSelectable(date: Date) {\n const { minDate, maxDate } = this.props\n\n if (this._dateDisabled(date)) {\n return false\n }\n\n if (minDate && maxDate) {\n return isWithinRange(date, minDate, maxDate)\n } else if (minDate && !maxDate) {\n return isAfter(date, minDate) || isEqual(date, minDate)\n } else if (maxDate && !minDate) {\n return isBefore(date, maxDate) || isEqual(date, maxDate)\n }\n return true\n }\n\n _dateSelected(date: Date) {\n const { selectedMin, selectedMax } = this.props\n\n return Boolean(\n selectedMin &&\n selectedMax &&\n isWithinRange(\n startOfDay(date),\n startOfDay(selectedMin),\n startOfDay(selectedMax)\n )\n )\n }\n\n _dateHighlighted(date: Date) {\n const { highlightedStart, highlightedEnd } = this.props\n\n if (!highlightedStart || !highlightedEnd) return false\n\n return isWithinRange(\n startOfDay(date),\n startOfDay(highlightedStart),\n startOfDay(highlightedEnd)\n )\n }\n\n _dateDisabled(date: Date | string) {\n let dateDisabled\n const { disabledIntervals } = this.props\n\n if (!disabledIntervals) return false\n\n for (let i = 0; i < disabledIntervals.length; i++) {\n const { start, end } = disabledIntervals[i]\n\n dateDisabled = isWithinRange(\n startOfDay(date),\n startOfDay(start),\n startOfDay(end)\n )\n\n if (dateDisabled) {\n return dateDisabled\n }\n }\n\n return false\n }\n\n _renderDays() {\n const {\n date,\n today,\n onDayClick,\n onDisabledDayClick,\n onDayMouseEnter,\n getISODate,\n getDayFormatted,\n blockClassName,\n activeMonth,\n selectedMax,\n selectedMin,\n weekStartsOn,\n renderDay\n } = this.props\n const start = startOfWeek(date, { weekStartsOn })\n const end = endOfWeek(date, { weekStartsOn })\n\n return eachDay(start, end).map(day => {\n const date = getISODate(day)\n const isSelectable = this._dateSelectable(day)\n const isDisabled = this._dateDisabled(date)\n const isWorkDay = !isWeekend(date)\n const isCurrentMonth = isSameMonth(date, activeMonth)\n const isNextMonth = !isCurrentMonth && isAfter(date, activeMonth)\n\n return renderDay({\n ISODate: getISODate(day),\n blockClassName,\n date: day,\n getDayFormatted,\n handleOnClick: isSelectable\n ? onDayClick\n : isDisabled\n ? onDisabledDayClick\n : () => {},\n handleOnEnter: isSelectable ? onDayMouseEnter : () => {},\n isCurrentMonth,\n isDisabled,\n isHighlighted: this._dateHighlighted(day),\n isMonthNext: isNextMonth,\n isMonthPrev: !isCurrentMonth && !isNextMonth,\n isNonSelectable: !isSelectable,\n isSelectable,\n isSelected: this._dateSelected(day),\n isSelectionEnd: Boolean(selectedMax && isSameDay(selectedMax, day)),\n isSelectionStart: Boolean(selectedMin && isSameDay(selectedMin, day)),\n isToday: isSameDay(today, day),\n isWeekend: !isWorkDay,\n isWorkDay,\n key: getISODate(day)\n })\n })\n }\n\n render() {\n const { customRender, blockClassName } = this.props\n const children = this._renderDays()\n\n if (customRender) {\n return customRender({\n ...this.props,\n children\n })\n }\n\n return
{children}
\n }\n}\n","import React, { Component, SyntheticEvent } from 'react'\nimport addDays from 'date-fns/add_days'\nimport areRangesOverlapping from 'date-fns/are_ranges_overlapping'\nimport differenceInCalendarDays from 'date-fns/difference_in_calendar_days'\nimport endOfMonth from 'date-fns/end_of_month'\nimport endOfWeek from 'date-fns/end_of_week'\nimport isBefore from 'date-fns/is_before'\nimport isEqual from 'date-fns/is_equal'\nimport isSameDay from 'date-fns/is_same_day'\nimport parse from 'date-fns/parse'\nimport startOfMonth from 'date-fns/start_of_month'\nimport startOfWeek from 'date-fns/start_of_week'\nimport subDays from 'date-fns/sub_days'\n\nimport * as helper from '../helper'\nimport {\n IDate,\n IDaysOfWeekRenderProps,\n IMonthRenderProps,\n IWeekRenderProps,\n RenderPropsDay,\n RenderPropsDayOfWeek\n} from '../@types'\nimport DaysOfWeek from './days_of_week'\nimport Week from './week'\n\nconst RANGE_MODE = 'range'\n\nexport type Props = {\n activeMonth: IDate\n blockClassName: string\n customRender?: IMonthRenderProps\n daysOfWeek: string[]\n disableDaysOfWeek: boolean\n disabledIntervals?: {\n start: IDate\n end: IDate\n }[]\n getDayFormatted: typeof helper.getDayFormatted\n getISODate: typeof helper.getISODate\n highlightedEnd?: IDate\n highlightedStart?: IDate\n maxDate?: IDate\n minDate?: IDate\n minNumberOfWeeks?: number\n mode: string\n onChange: (...args: any[]) => any\n onDayMouseEnter?: (...args: any[]) => any\n onNoticeChange: (...args: any[]) => any\n rangeLimit?: number\n renderDay: RenderPropsDay\n renderDayOfWeek: RenderPropsDayOfWeek\n renderDaysOfWeek?: IDaysOfWeekRenderProps\n renderWeek?: IWeekRenderProps\n selectedMax?: IDate\n selectedMin?: IDate\n today: IDate\n weekStartsOn: number\n}\n\ntype IInterval = {\n start: Date | null\n end: Date | null\n}\n\n// TODO: FC Rewrite\n/* eslint-disable react/require-optimization */\nexport default class Month extends Component {\n handleOnDayMouseEnter = (event: SyntheticEvent) => {\n event.preventDefault()\n const {\n currentTarget: {\n dataset: { simpleReactCalendarDay }\n }\n } = event\n const date = parse(simpleReactCalendarDay as string)\n\n const { onDayMouseEnter } = this.props\n\n if (onDayMouseEnter) {\n onDayMouseEnter(date)\n }\n\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n if (!this._selectionInProgress) return\n\n const { rangeLimit } = this.props\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n const dateLimit = subDays(this._selectionStart, rangeLimit as number)\n const isDisabledWithin = this._getDisabledRange({\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n end: !isBefore(this._selectionStart, date) ? this._selectionStart : date,\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n start: isBefore(this._selectionStart, date) ? this._selectionStart : date\n })\n\n if (!isDisabledWithin) return\n\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n if (!isEqual(date, this._selectionEnd)) {\n if (!rangeLimit || (rangeLimit && !isBefore(date, dateLimit))) {\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n this._selectionEnd = date\n this._pushUpdate()\n }\n }\n }\n\n handleOnDayClick = (event: SyntheticEvent) => {\n event.preventDefault()\n\n const {\n currentTarget: {\n dataset: { simpleReactCalendarDay }\n }\n } = event\n const date = parse(simpleReactCalendarDay as string)\n const { mode } = this.props\n\n if (mode === RANGE_MODE) {\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n if (this._selectionInProgress) {\n const isDisabledWithin = this._getDisabledRange({\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n end: !isBefore(this._selectionStart, date)\n // @ts-ignore\n ? this._selectionStart\n : date,\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n start: isBefore(this._selectionStart, date)\n // @ts-ignore\n ? this._selectionStart\n : date\n })\n\n if (!isDisabledWithin) {\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n this._selectionInProgress = false\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n this._selectionStart = null\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n this._selectionEnd = null\n this._pushUpdate()\n this._pushNoticeUpdate('overlapping_with_disabled')\n return\n }\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n this._selectionInProgress = false\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n this._selectionEnd = date\n } else {\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n this._selectionInProgress = true\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n this._selectionStart = date\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n this._selectionEnd = date\n }\n } else {\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n this._selectionInProgress = false\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n this._selectionStart = date\n\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n this._selectionEnd = date\n }\n\n this._pushUpdate()\n this._pushNoticeUpdate(null)\n }\n\n handleOnDisabledDayClick = ({\n preventDefault\n }: SyntheticEvent) => {\n const { onNoticeChange } = this.props\n\n preventDefault()\n onNoticeChange('disabled_day_click')\n }\n\n _pushUpdate() {\n const { onChange, rangeLimit } = this.props\n let end, start\n\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n if (this._selectionStart && this._selectionEnd) {\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n if (isBefore(this._selectionStart, this._selectionEnd)) {\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n start = this._selectionStart\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n end = this._selectionEnd\n } else {\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n start = this._selectionEnd\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n end = this._selectionStart\n }\n\n if (rangeLimit && rangeLimit < differenceInCalendarDays(end, start)) {\n end = addDays(start, rangeLimit)\n }\n }\n\n return onChange({\n end,\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n inProgress: this._selectionInProgress,\n start\n })\n }\n\n _getMinDate() {\n const { rangeLimit, minDate } = this.props\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n const calcStartDate = subDays(this._selectionStart, rangeLimit as number)\n\n if (minDate) {\n const isCalcStartDayAfter = isBefore(minDate, calcStartDate)\n\n return isCalcStartDayAfter ? calcStartDate : minDate\n }\n return calcStartDate\n }\n\n _pushNoticeUpdate(noticeType: helper.NoticeMessageType) {\n const { onNoticeChange } = this.props\n\n return onNoticeChange(noticeType)\n }\n\n _getDisabledRange(interval: IInterval) {\n const { start, end } = interval\n const { disabledIntervals } = this.props\n\n if (!disabledIntervals) return true\n\n for (let i = 0; i < disabledIntervals.length; i++) {\n const { start: intervalStart, end: intervalEnd } = disabledIntervals[i]\n\n if (\n areRangesOverlapping(\n start as Date,\n end as Date,\n intervalStart,\n intervalEnd\n )\n ) {\n return\n }\n }\n\n return true\n }\n\n _getMaxDate() {\n const { rangeLimit, maxDate } = this.props\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n const calcEndDate = addDays(this._selectionStart, rangeLimit as number)\n\n if (maxDate) {\n const isCalcEndDayBefore = isBefore(calcEndDate, maxDate)\n\n return isCalcEndDayBefore ? calcEndDate : maxDate\n }\n return calcEndDate\n }\n\n _renderDaysOfWeek() {\n const {\n disableDaysOfWeek,\n blockClassName,\n weekStartsOn,\n daysOfWeek,\n renderDaysOfWeek,\n renderDayOfWeek\n } = this.props\n\n if (disableDaysOfWeek) return\n\n return (\n \n )\n }\n\n _renderWeeks() {\n const {\n selectedMin,\n selectedMax,\n highlightedStart,\n highlightedEnd,\n disabledIntervals,\n activeMonth,\n today,\n blockClassName,\n minNumberOfWeeks,\n rangeLimit,\n weekStartsOn,\n renderDay,\n renderWeek,\n getDayFormatted,\n getISODate\n } = this.props\n const weeks = []\n let { minDate, maxDate } = this.props\n let date = startOfWeek(startOfMonth(activeMonth), { weekStartsOn })\n const end = endOfWeek(endOfMonth(activeMonth), { weekStartsOn })\n\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n if (this._selectionInProgress && rangeLimit) {\n minDate = this._getMinDate()\n maxDate = this._getMaxDate()\n }\n\n while (\n // TODO: External helper with weeknumber etc\n /* eslint-disable no-unmodified-loop-condition */\n (typeof minNumberOfWeeks === 'number' &&\n minNumberOfWeeks > weeks.length) ||\n isBefore(date, end) ||\n isSameDay(date, end)\n ) {\n weeks.push(date)\n date = addDays(date, 7)\n }\n\n return weeks.map(week => {\n return (\n \n )\n })\n }\n\n render() {\n const { blockClassName, customRender } = this.props\n\n const children = (\n <>\n {this._renderDaysOfWeek()}\n {this._renderWeeks()}\n \n )\n\n if (customRender) {\n return customRender({\n ...this.props,\n children\n })\n }\n\n return
{children}
\n }\n}\n","import React, { FC, ReactElement } from 'react'\nimport classnames from 'classnames'\n\nexport type Props = {\n arrow?: ReactElement\n blockClassName?: string\n enabled?: boolean\n offset?: number\n onClick: () => void\n title?: string\n type: 'prev' | 'next'\n}\n\nconst HeaderButton: FC = ({\n arrow,\n blockClassName,\n enabled,\n type,\n title,\n onClick\n}) => (\n \n {arrow}\n \n)\n\nexport default HeaderButton\n","import React, { Component, ReactElement } from 'react'\nimport addMonths from 'date-fns/add_months'\nimport formatDate from 'date-fns/format'\nimport isAfter from 'date-fns/is_after'\nimport isBefore from 'date-fns/is_before'\nimport startOfMonth from 'date-fns/start_of_month'\n\nimport { IDate, IMonthHeaderRenderProps } from '../@types'\nimport HeaderButton from './header_button'\n\nexport type Props = {\n activeMonth: IDate\n blockClassName?: string\n customRender?: IMonthHeaderRenderProps\n headerNextArrow?: ReactElement\n headerNextTitle?: string\n headerPrevArrow?: ReactElement\n headerPrevTitle?: string\n maxDate?: IDate\n minDate?: IDate\n onMonthChange: (...args: any[]) => any\n}\n\n// TODO: FC Rewrite\n/* eslint-disable react/require-optimization */\nexport default class MonthHeader extends Component {\n _switchMonth(offset: -1 | 1) {\n const { onMonthChange, activeMonth } = this.props\n\n onMonthChange(addMonths(activeMonth, offset))\n }\n\n render() {\n const {\n activeMonth,\n minDate,\n maxDate,\n blockClassName,\n headerNextArrow,\n headerNextTitle,\n headerPrevArrow,\n headerPrevTitle,\n customRender\n } = this.props\n\n const prevEnabled = minDate\n ? isBefore(startOfMonth(minDate), startOfMonth(activeMonth))\n : true\n const nextEnabled = maxDate\n ? isAfter(startOfMonth(maxDate), startOfMonth(activeMonth))\n : true\n\n if (customRender) {\n return customRender({\n ...this.props,\n children:\n 'no content, please use activeMonth prop and custom buttons instead',\n nextEnabled,\n prevEnabled,\n switchMonth: this._switchMonth.bind(this)\n })\n }\n\n return (\n
\n \n
\n {formatDate(activeMonth, 'MMMM YYYY')}\n
\n \n
\n )\n }\n}\n","import React, { FC } from 'react'\n\ntype Props = {\n blockClassName?: string\n}\n\nconst displayName = 'Notice'\n\nconst Notice: FC = ({ blockClassName, children }) => {\n if (!children) return null\n\n return
{children}
\n}\n\nNotice.displayName = displayName\n\nexport default Notice\n","import React, { Component, ComponentProps, ReactElement } from 'react'\nimport isSameMonth from 'date-fns/is_same_month'\nimport isValidDate from 'date-fns/is_valid'\nimport startOfMonth from 'date-fns/start_of_month'\n\nimport * as helper from '../helper'\nimport {\n BLOCK_CLASS_NAME,\n DAYS_OF_WEEK,\n NEXT_MONTH_TITLE,\n PREV_MONTH_TITLE\n} from './consts'\nimport {\n ICalendarRenderProp,\n IDate,\n IDateSelection,\n IDaysOfWeekRenderProps,\n IMonthHeaderRenderProps,\n IMonthRenderProps,\n ISelectionRange,\n IWeekRenderProps,\n RenderPropsDay,\n RenderPropsDayOfWeek,\n RenderPropsNotice\n} from '../@types'\nimport Day from '../RenderPropsComponents/Day'\nimport DayOfWeek from '../RenderPropsComponents/DayOfWeek'\nimport Month from './month'\nimport MonthHeader from './month_header'\nimport Notice from '../RenderPropsComponents/Notice'\n\nconst isValid = function (date: Date) {\n try {\n return isValidDate(date)\n } catch (e) {\n return false\n }\n}\n\ntype ISelection = {\n start: IDate\n end: IDate\n inProgress: boolean\n}\n\nexport type Props = {\n MonthHeaderComponent?: ReactElement\n activeMonth?: IDate\n blockClassName: string\n customRender?: ICalendarRenderProp\n daysOfWeek?: string[]\n disableDaysOfWeek?: boolean\n disabledIntervals?: {\n start: IDate\n end: IDate\n }[]\n getDayFormatted: typeof helper.getDayFormatted\n getISODate: typeof helper.getISODate\n getNoticeContent: typeof helper.getNoticeContent\n headerNextArrow?: ReactElement\n headerNextTitle?: string\n headerPrevArrow?: ReactElement\n headerPrevTitle?: string\n highlighted?: {\n start: IDate\n end: IDate\n }\n maxDate?: IDate | undefined\n minDate?: IDate | undefined\n minNumberOfWeeks?: number\n mode?: 'range' | 'single'\n onDayHover?: (...args: any[]) => any\n onMonthChange?: (...args: any[]) => any\n onSelect?: (...args: any[]) => any\n onSelectionProgress?: (...args: any[]) => any\n rangeLimit?: number\n renderNotice?: RenderPropsNotice\n renderDay?: RenderPropsDay\n renderDayOfWeek?: RenderPropsDayOfWeek\n renderDaysOfWeek?: IDaysOfWeekRenderProps\n renderMonth?: IMonthRenderProps\n renderMonthHeader?: IMonthHeaderRenderProps\n renderWeek?: IWeekRenderProps\n selected?: IDate | ISelectionRange\n today?: IDate\n weekStartsOn?: number\n}\n\ntype State = {\n activeMonth: any\n selection: { start: any; end: any } | null\n shownNoticeType: any | null\n}\n\n// TODO: FC Rewrite\n/* eslint-disable react/require-optimization */\nexport default class Calendar extends Component {\n static defaultProps = {\n blockClassName: BLOCK_CLASS_NAME,\n daysOfWeek: DAYS_OF_WEEK,\n disableDaysOfWeek: false,\n getDayFormatted: helper.getDayFormatted,\n getISODate: helper.getISODate,\n getNoticeContent: helper.getNoticeContent,\n headerNextTitle: NEXT_MONTH_TITLE,\n headerPrevTitle: PREV_MONTH_TITLE,\n mode: 'single',\n renderDay: (props: ComponentProps) => ,\n renderDayOfWeek: (props: ComponentProps) => (\n \n ),\n renderNotice: (props: ComponentProps) => (\n \n ),\n weekStartsOn: 1\n }\n\n constructor(props: Props) {\n super(props)\n this.state = {\n activeMonth: this._initialMonth(props),\n selection: null,\n shownNoticeType: null\n }\n }\n\n // TODO: FC Rewrite\n /* eslint-disable react/no-deprecated */\n componentWillReceiveProps(nextProps: Props) {\n const { activeMonth } = this.props\n\n if (\n nextProps.activeMonth &&\n !isSameMonth(nextProps.activeMonth, activeMonth as IDate)\n ) {\n this.setState({ activeMonth: startOfMonth(nextProps.activeMonth) })\n }\n }\n\n _initialMonth(props: Props) {\n const { selected, activeMonth, mode, today } = props || this.props\n\n if (isValid(activeMonth as Date)) {\n return activeMonth\n }\n if (selected) {\n const selectionStart =\n mode === 'single' ? selected : (selected as ISelectionRange).start\n\n if (isValid(selectionStart as Date)) {\n return startOfMonth(selectionStart as Date)\n }\n }\n\n return startOfMonth(today || new Date())\n }\n\n _switchMonth(date: Date) {\n const { onMonthChange } = this.props\n\n if (typeof onMonthChange === 'function') {\n onMonthChange(date)\n } else {\n this.setState({\n activeMonth: date\n })\n }\n }\n\n _activeMonth() {\n const { onMonthChange, activeMonth } = this.props\n\n if (onMonthChange) {\n return activeMonth\n }\n /* eslint-disable react/destructuring-assignment */\n return this.state.activeMonth\n }\n\n _highlight() {\n const { highlighted } = this.props\n\n if (!highlighted) return { end: null, start: null }\n\n const { start, end } = highlighted\n\n if (isValid(start as Date) && isValid(end as Date)) {\n return { end, start }\n }\n return { end: null, start: null }\n }\n\n _selection() {\n const start = this._selectionStart()\n const end = this._selectionEnd()\n\n if (isValid(start) && isValid(end)) {\n return { end, start }\n }\n return { end: null, start: null }\n }\n\n _selectionStart(): Date {\n return this._selectionDate('start')\n }\n\n _selectionEnd(): Date {\n return this._selectionDate('end')\n }\n\n _selectionDate(dateType: IDateSelection) {\n const { selected, onSelectionProgress, mode } = this.props\n const { selection } = this.state\n\n switch (mode) {\n case 'single':\n return selected\n\n case 'range':\n if (!onSelectionProgress && selection) {\n return selection[dateType]\n }\n return selected && (selected as ISelectionRange)[dateType]\n }\n }\n\n _selectionChanged(selection: ISelection) {\n const { start, end, inProgress } = selection\n const { mode, onSelect, onSelectionProgress } = this.props\n\n if (onSelect && start && (mode !== 'range' || !inProgress)) {\n onSelect(mode === 'single' ? start : { end, start })\n }\n\n if (mode === 'range') {\n if (onSelectionProgress) {\n onSelectionProgress(selection)\n } else {\n this.setState({ selection: inProgress ? { end, start } : null })\n }\n }\n }\n\n _noticeChanged(shownNoticeType: helper.NoticeMessageType) {\n this.setState({ shownNoticeType })\n }\n\n _today() {\n /* eslint-disable react/destructuring-assignment */\n return this.props.today || new Date()\n }\n\n _renderMonth() {\n const {\n blockClassName,\n disableDaysOfWeek,\n maxDate,\n minDate,\n minNumberOfWeeks,\n mode,\n onDayHover,\n disabledIntervals,\n rangeLimit,\n weekStartsOn,\n daysOfWeek,\n renderDay,\n renderWeek,\n renderMonth,\n renderDaysOfWeek,\n renderDayOfWeek,\n getDayFormatted,\n getISODate\n } = this.props\n\n const selection = this._selection()\n const highlight = this._highlight()\n\n return (\n // @ts-ignore: No overload matches this call\n \n )\n }\n\n _renderMonthHeader() {\n const {\n blockClassName,\n headerNextArrow,\n headerNextTitle,\n headerPrevArrow,\n headerPrevTitle,\n maxDate,\n minDate,\n MonthHeaderComponent = MonthHeader,\n renderMonthHeader\n } = this.props\n\n return (\n // @ts-ignore\n \n )\n }\n\n render() {\n const {\n blockClassName,\n customRender,\n getNoticeContent,\n renderNotice = (props: ComponentProps) => (\n \n )\n } = this.props\n const { shownNoticeType } = this.state\n\n const children = (\n <>\n {renderNotice({\n blockClassName,\n children: getNoticeContent(shownNoticeType)\n })}\n {this._renderMonthHeader()}\n {this._renderMonth()}\n \n )\n\n if (customRender) {\n return customRender({\n ...this.props,\n children\n })\n }\n\n return
{children}
\n }\n}\n","export const BLOCK_CLASS_NAME = 'calendar'\nexport const NEXT_MONTH_TITLE = 'Next month'\nexport const PREV_MONTH_TITLE = 'Previous month'\nexport const DAYS_IN_WEEK = [0, 1, 2, 3, 4, 5, 6]\nexport const DAYS_OF_WEEK = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']\n","import formatDate from 'date-fns/format'\n\nexport type NoticeMessageType =\n | 'overlapping_with_disabled'\n | 'disabled_day_click'\n | null\n\nexport const getISODate = (date: Date) => formatDate(date, 'YYYY-MM-DD')\nexport const getDayFormatted = (date: Date) => formatDate(date, 'D')\nexport const getNoticeContent = (type: NoticeMessageType) => {\n switch (type) {\n case 'overlapping_with_disabled':\n case 'disabled_day_click':\n return 'Selected range must not overlap with disabled dates.'\n\n default:\n return null\n }\n}\n","export { default } from './calendar/calendar'\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://Calendar/webpack/universalModuleDefinition","webpack://Calendar/webpack/bootstrap","webpack://Calendar/external {\"amd\":\"React\",\"commonjs\":\"react\",\"commonjs2\":\"react\",\"root\":\"React\"}","webpack://Calendar/./node_modules/date-fns/parse/index.js","webpack://Calendar/./node_modules/date-fns/is_before/index.js","webpack://Calendar/./node_modules/date-fns/start_of_day/index.js","webpack://Calendar/./node_modules/date-fns/start_of_month/index.js","webpack://Calendar/external {\"amd\":\"Classnames\",\"commonjs\":\"classnames\",\"commonjs2\":\"classnames\",\"root\":\"Classnames\"}","webpack://Calendar/./node_modules/date-fns/is_same_day/index.js","webpack://Calendar/./node_modules/date-fns/start_of_week/index.js","webpack://Calendar/./node_modules/date-fns/format/index.js","webpack://Calendar/./node_modules/date-fns/add_days/index.js","webpack://Calendar/./node_modules/date-fns/is_equal/index.js","webpack://Calendar/./node_modules/date-fns/is_after/index.js","webpack://Calendar/./node_modules/date-fns/is_within_range/index.js","webpack://Calendar/./node_modules/date-fns/is_same_month/index.js","webpack://Calendar/./node_modules/date-fns/end_of_week/index.js","webpack://Calendar/./node_modules/date-fns/start_of_iso_week/index.js","webpack://Calendar/./node_modules/date-fns/is_valid/index.js","webpack://Calendar/./node_modules/date-fns/difference_in_calendar_days/index.js","webpack://Calendar/./node_modules/date-fns/sub_days/index.js","webpack://Calendar/./node_modules/date-fns/is_date/index.js","webpack://Calendar/./node_modules/date-fns/get_iso_year/index.js","webpack://Calendar/./node_modules/date-fns/are_ranges_overlapping/index.js","webpack://Calendar/./node_modules/date-fns/end_of_month/index.js","webpack://Calendar/./node_modules/date-fns/each_day/index.js","webpack://Calendar/./node_modules/date-fns/is_weekend/index.js","webpack://Calendar/./node_modules/date-fns/add_months/index.js","webpack://Calendar/./node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds/index.js","webpack://Calendar/./node_modules/date-fns/get_day_of_year/index.js","webpack://Calendar/./node_modules/date-fns/start_of_year/index.js","webpack://Calendar/./node_modules/date-fns/get_iso_week/index.js","webpack://Calendar/./node_modules/date-fns/start_of_iso_year/index.js","webpack://Calendar/./node_modules/date-fns/locale/en/index.js","webpack://Calendar/./node_modules/date-fns/locale/en/build_distance_in_words_locale/index.js","webpack://Calendar/./node_modules/date-fns/locale/en/build_format_locale/index.js","webpack://Calendar/./node_modules/date-fns/locale/_lib/build_formatting_tokens_reg_exp/index.js","webpack://Calendar/./node_modules/date-fns/get_days_in_month/index.js","webpack://Calendar/./src/RenderPropsComponents/Day/Day.tsx","webpack://Calendar/./src/RenderPropsComponents/DayOfWeek/DayOfWeek.tsx","webpack://Calendar/./src/calendar/days_of_week.tsx","webpack://Calendar/./src/calendar/week.tsx","webpack://Calendar/./src/calendar/month.tsx","webpack://Calendar/./src/calendar/header_button.tsx","webpack://Calendar/./src/calendar/month_header.tsx","webpack://Calendar/./src/RenderPropsComponents/Notice/Notice.tsx","webpack://Calendar/./src/calendar/calendar.tsx","webpack://Calendar/./src/calendar/consts.ts","webpack://Calendar/./src/helper/index.ts","webpack://Calendar/./src/index.tsx"],"names":["root","factory","exports","module","require","define","amd","window","__WEBPACK_EXTERNAL_MODULE__0__","__WEBPACK_EXTERNAL_MODULE__5__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","getTimezoneOffsetInMilliseconds","isDate","MILLISECONDS_IN_HOUR","MILLISECONDS_IN_MINUTE","DEFAULT_ADDITIONAL_DIGITS","parseTokenDateTimeDelimeter","parseTokenPlainTime","parseTokenYY","parseTokensYYY","parseTokenYYYY","parseTokensYYYYY","parseTokenMM","parseTokenDDD","parseTokenMMDD","parseTokenWww","parseTokenWwwD","parseTokenHH","parseTokenHHMM","parseTokenHHMMSS","parseTokenTimezone","parseTokenTimezoneZ","parseTokenTimezoneHH","parseTokenTimezoneHHMM","dayOfISOYear","isoYear","week","day","date","Date","setUTCFullYear","diff","getUTCDay","setUTCDate","getUTCDate","argument","dirtyOptions","getTime","additionalDigits","Number","dateStrings","dateString","timeString","array","split","test","token","exec","time","replace","timezone","splitDateString","parseYearResult","parseTokenYYY","parseTokenYYYYY","yearString","year","parseInt","restDateString","slice","length","centuryString","parseYear","month","dayOfYear","dayOfWeek","parseDate","offset","timestamp","hours","minutes","parseFloat","seconds","parseTime","timezoneString","absoluteOffset","parseTimezone","fullTime","fullTimeDate","fullTimeDateNextDay","setDate","getDate","offsetDiff","parse","dirtyDate","dirtyDateToCompare","dateToCompare","setHours","startOfDay","dirtyDateLeft","dirtyDateRight","dateLeftStartOfDay","dateRightStartOfDay","weekStartsOn","getDay","getDayOfYear","getISOWeek","getISOYear","isValid","enLocale","formatters","getMonth","addLeadingZeros","Math","ceil","getFullYear","substr","String","getHours","getMinutes","getSeconds","floor","getMilliseconds","formatTimezone","getTimezoneOffset","removeFormattingTokens","input","match","delimeter","sign","absOffset","abs","number","targetLength","output","toString","dirtyFormatStr","formatStr","locale","localeFormatters","format","formattingTokensRegExp","formatter","Function","buildFormatFn","formatFn","dirtyAmount","amount","dirtyLeftDate","dirtyRightDate","dateLeft","dateRight","dirtyStartDate","dirtyEndDate","startTime","endTime","Error","startOfWeek","isNaN","TypeError","MILLISECONDS_IN_DAY","startOfDayLeft","startOfDayRight","timestampLeft","timestampRight","round","addDays","startOfISOWeek","fourthOfJanuaryOfNextYear","setFullYear","startOfNextYear","fourthOfJanuaryOfThisYear","startOfThisYear","dirtyInitialRangeStartDate","dirtyInitialRangeEndDate","dirtyComparedRangeStartDate","dirtyComparedRangeEndDate","initialStartTime","initialEndTime","comparedStartTime","comparedEndTime","dirtyStep","startDate","step","undefined","dates","currentDate","push","getDaysInMonth","desiredMonth","dateWithDesiredMonth","daysInMonth","setMonth","min","baseTimezoneOffset","setSeconds","startOfYear","differenceInCalendarDays","cleanDate","startOfISOYear","MILLISECONDS_IN_WEEK","fourthOfJanuary","buildDistanceInWordsLocale","buildFormatLocale","distanceInWords","distanceInWordsLocale","lessThanXSeconds","one","other","xSeconds","halfAMinute","lessThanXMinutes","xMinutes","aboutXHours","xHours","xDays","aboutXMonths","xMonths","aboutXYears","xYears","overXYears","almostXYears","localize","count","options","result","addSuffix","comparison","buildFormattingTokensRegExp","months3char","monthsFull","weekdays2char","weekdays3char","weekdaysFull","meridiemUppercase","meridiemLowercase","meridiemFull","forEach","formatterToken","rem100","ordinal","commonFormatterKeys","formatterKeys","formattingTokens","concat","sort","reverse","RegExp","join","monthIndex","lastDayOfMonth","Day","blockClassName","getDayFormatted","handleOnClick","handleOnEnter","isCurrentMonth","isDisabled","isHighlighted","isMonthNext","isMonthPrev","isNonSelectable","ISODate","isSelectable","isSelected","isSelectionEnd","isSelectionStart","isToday","isWeekend","isWorkDay","data-simple-react-calendar-day","className","cx","onClick","onMouseEnter","type","displayName","DayOfWeek","classnames","getDaysOfWeek","daysOfWeek","adjustedIndex","dayIndex","DaysOfWeek","props","customRender","renderDayOfWeek","children","map","index","Week","this","minDate","maxDate","_dateDisabled","isWithinRange","isAfter","isEqual","isBefore","selectedMin","selectedMax","Boolean","highlightedStart","highlightedEnd","dateDisabled","disabledIntervals","start","end","today","onDayClick","onDisabledDayClick","onDayMouseEnter","getISODate","activeMonth","renderDay","endOfWeek","eachDay","_dateSelectable","isSameMonth","isNextMonth","_dateHighlighted","_dateSelected","isSameDay","_renderDays","Component","RANGE_MODE","Month","event","preventDefault","simpleReactCalendarDay","currentTarget","dataset","_selectionInProgress","rangeLimit","dateLimit","subDays","_selectionStart","_getDisabledRange","_selectionEnd","_pushUpdate","_pushNoticeUpdate","onNoticeChange","onChange","inProgress","calcStartDate","noticeType","interval","intervalStart","intervalEnd","areRangesOverlapping","calcEndDate","disableDaysOfWeek","renderDaysOfWeek","minNumberOfWeeks","renderWeek","weeks","startOfMonth","endOfMonth","_getMinDate","_getMaxDate","handleOnDayClick","handleOnDayMouseEnter","handleOnDisabledDayClick","_renderDaysOfWeek","_renderWeeks","HeaderButton","arrow","enabled","title","disabled","MonthHeader","onMonthChange","addMonths","headerNextArrow","headerNextTitle","headerPrevArrow","headerPrevTitle","prevEnabled","nextEnabled","switchMonth","_switchMonth","formatDate","Notice","isValidDate","e","Calendar","state","_initialMonth","selection","shownNoticeType","nextProps","setState","selected","selectionStart","highlighted","_selectionDate","dateType","onSelectionProgress","onSelect","onDayHover","renderMonth","_selection","highlight","_highlight","_activeMonth","_selectionChanged","_noticeChanged","_today","MonthHeaderComponent","renderMonthHeader","getNoticeContent","renderNotice","_renderMonthHeader","_renderMonth"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,SAAUA,QAAQ,eAC1B,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,QAAS,cAAeJ,GACN,iBAAZC,QACdA,QAAkB,SAAID,EAAQG,QAAQ,SAAUA,QAAQ,eAExDJ,EAAe,SAAIC,EAAQD,EAAY,MAAGA,EAAiB,YAR7D,CASGO,QAAQ,SAASC,EAAgCC,GACpD,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUV,QAGnC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,OAAQA,GACN,IAAK,4BACL,IAAK,qBACH,MAAO,uDAET,QACE,OAAO,OFwFTmG,gBCvG4B,aDwG5BE,gBCvG4B,iBDwG5B1X,KAAM,SACN4T,UAAW,SAAC9B,GAAD,OAAuC,kBAAC,EAAQA,IAC3DE,gBAAiB,SAACF,GAAD,OACf,kBAAC,EAAcA,IAEjB+H,aAAc,SAAC/H,GAAD,OACZ,kBAAC,GAAWA,IAEdrL,aAAc,IGlHlB","file":"simple-calendar.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"classnames\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"React\", \"Classnames\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Calendar\"] = factory(require(\"react\"), require(\"classnames\"));\n\telse\n\t\troot[\"Calendar\"] = factory(root[\"React\"], root[\"Classnames\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__5__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 36);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","var getTimezoneOffsetInMilliseconds = require('../_lib/getTimezoneOffsetInMilliseconds/index.js')\nvar isDate = require('../is_date/index.js')\n\nvar MILLISECONDS_IN_HOUR = 3600000\nvar MILLISECONDS_IN_MINUTE = 60000\nvar DEFAULT_ADDITIONAL_DIGITS = 2\n\nvar parseTokenDateTimeDelimeter = /[T ]/\nvar parseTokenPlainTime = /:/\n\n// year tokens\nvar parseTokenYY = /^(\\d{2})$/\nvar parseTokensYYY = [\n /^([+-]\\d{2})$/, // 0 additional digits\n /^([+-]\\d{3})$/, // 1 additional digit\n /^([+-]\\d{4})$/ // 2 additional digits\n]\n\nvar parseTokenYYYY = /^(\\d{4})/\nvar parseTokensYYYYY = [\n /^([+-]\\d{4})/, // 0 additional digits\n /^([+-]\\d{5})/, // 1 additional digit\n /^([+-]\\d{6})/ // 2 additional digits\n]\n\n// date tokens\nvar parseTokenMM = /^-(\\d{2})$/\nvar parseTokenDDD = /^-?(\\d{3})$/\nvar parseTokenMMDD = /^-?(\\d{2})-?(\\d{2})$/\nvar parseTokenWww = /^-?W(\\d{2})$/\nvar parseTokenWwwD = /^-?W(\\d{2})-?(\\d{1})$/\n\n// time tokens\nvar parseTokenHH = /^(\\d{2}([.,]\\d*)?)$/\nvar parseTokenHHMM = /^(\\d{2}):?(\\d{2}([.,]\\d*)?)$/\nvar parseTokenHHMMSS = /^(\\d{2}):?(\\d{2}):?(\\d{2}([.,]\\d*)?)$/\n\n// timezone tokens\nvar parseTokenTimezone = /([Z+-].*)$/\nvar parseTokenTimezoneZ = /^(Z)$/\nvar parseTokenTimezoneHH = /^([+-])(\\d{2})$/\nvar parseTokenTimezoneHHMM = /^([+-])(\\d{2}):?(\\d{2})$/\n\n/**\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If an argument is a string, the function tries to parse it.\n * Function accepts complete ISO 8601 formats as well as partial implementations.\n * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601\n *\n * If all above fails, the function passes the given argument to Date constructor.\n *\n * @param {Date|String|Number} argument - the value to convert\n * @param {Object} [options] - the object with options\n * @param {0 | 1 | 2} [options.additionalDigits=2] - the additional number of digits in the extended year format\n * @returns {Date} the parsed date in the local time zone\n *\n * @example\n * // Convert string '2014-02-11T11:30:30' to date:\n * var result = parse('2014-02-11T11:30:30')\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Parse string '+02014101',\n * // if the additional number of digits in the extended year format is 1:\n * var result = parse('+02014101', {additionalDigits: 1})\n * //=> Fri Apr 11 2014 00:00:00\n */\nfunction parse (argument, dirtyOptions) {\n if (isDate(argument)) {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new Date(argument.getTime())\n } else if (typeof argument !== 'string') {\n return new Date(argument)\n }\n\n var options = dirtyOptions || {}\n var additionalDigits = options.additionalDigits\n if (additionalDigits == null) {\n additionalDigits = DEFAULT_ADDITIONAL_DIGITS\n } else {\n additionalDigits = Number(additionalDigits)\n }\n\n var dateStrings = splitDateString(argument)\n\n var parseYearResult = parseYear(dateStrings.date, additionalDigits)\n var year = parseYearResult.year\n var restDateString = parseYearResult.restDateString\n\n var date = parseDate(restDateString, year)\n\n if (date) {\n var timestamp = date.getTime()\n var time = 0\n var offset\n\n if (dateStrings.time) {\n time = parseTime(dateStrings.time)\n }\n\n if (dateStrings.timezone) {\n offset = parseTimezone(dateStrings.timezone) * MILLISECONDS_IN_MINUTE\n } else {\n var fullTime = timestamp + time\n var fullTimeDate = new Date(fullTime)\n\n offset = getTimezoneOffsetInMilliseconds(fullTimeDate)\n\n // Adjust time when it's coming from DST\n var fullTimeDateNextDay = new Date(fullTime)\n fullTimeDateNextDay.setDate(fullTimeDate.getDate() + 1)\n var offsetDiff =\n getTimezoneOffsetInMilliseconds(fullTimeDateNextDay) -\n getTimezoneOffsetInMilliseconds(fullTimeDate)\n if (offsetDiff > 0) {\n offset += offsetDiff\n }\n }\n\n return new Date(timestamp + time + offset)\n } else {\n return new Date(argument)\n }\n}\n\nfunction splitDateString (dateString) {\n var dateStrings = {}\n var array = dateString.split(parseTokenDateTimeDelimeter)\n var timeString\n\n if (parseTokenPlainTime.test(array[0])) {\n dateStrings.date = null\n timeString = array[0]\n } else {\n dateStrings.date = array[0]\n timeString = array[1]\n }\n\n if (timeString) {\n var token = parseTokenTimezone.exec(timeString)\n if (token) {\n dateStrings.time = timeString.replace(token[1], '')\n dateStrings.timezone = token[1]\n } else {\n dateStrings.time = timeString\n }\n }\n\n return dateStrings\n}\n\nfunction parseYear (dateString, additionalDigits) {\n var parseTokenYYY = parseTokensYYY[additionalDigits]\n var parseTokenYYYYY = parseTokensYYYYY[additionalDigits]\n\n var token\n\n // YYYY or ±YYYYY\n token = parseTokenYYYY.exec(dateString) || parseTokenYYYYY.exec(dateString)\n if (token) {\n var yearString = token[1]\n return {\n year: parseInt(yearString, 10),\n restDateString: dateString.slice(yearString.length)\n }\n }\n\n // YY or ±YYY\n token = parseTokenYY.exec(dateString) || parseTokenYYY.exec(dateString)\n if (token) {\n var centuryString = token[1]\n return {\n year: parseInt(centuryString, 10) * 100,\n restDateString: dateString.slice(centuryString.length)\n }\n }\n\n // Invalid ISO-formatted year\n return {\n year: null\n }\n}\n\nfunction parseDate (dateString, year) {\n // Invalid ISO-formatted year\n if (year === null) {\n return null\n }\n\n var token\n var date\n var month\n var week\n\n // YYYY\n if (dateString.length === 0) {\n date = new Date(0)\n date.setUTCFullYear(year)\n return date\n }\n\n // YYYY-MM\n token = parseTokenMM.exec(dateString)\n if (token) {\n date = new Date(0)\n month = parseInt(token[1], 10) - 1\n date.setUTCFullYear(year, month)\n return date\n }\n\n // YYYY-DDD or YYYYDDD\n token = parseTokenDDD.exec(dateString)\n if (token) {\n date = new Date(0)\n var dayOfYear = parseInt(token[1], 10)\n date.setUTCFullYear(year, 0, dayOfYear)\n return date\n }\n\n // YYYY-MM-DD or YYYYMMDD\n token = parseTokenMMDD.exec(dateString)\n if (token) {\n date = new Date(0)\n month = parseInt(token[1], 10) - 1\n var day = parseInt(token[2], 10)\n date.setUTCFullYear(year, month, day)\n return date\n }\n\n // YYYY-Www or YYYYWww\n token = parseTokenWww.exec(dateString)\n if (token) {\n week = parseInt(token[1], 10) - 1\n return dayOfISOYear(year, week)\n }\n\n // YYYY-Www-D or YYYYWwwD\n token = parseTokenWwwD.exec(dateString)\n if (token) {\n week = parseInt(token[1], 10) - 1\n var dayOfWeek = parseInt(token[2], 10) - 1\n return dayOfISOYear(year, week, dayOfWeek)\n }\n\n // Invalid ISO-formatted date\n return null\n}\n\nfunction parseTime (timeString) {\n var token\n var hours\n var minutes\n\n // hh\n token = parseTokenHH.exec(timeString)\n if (token) {\n hours = parseFloat(token[1].replace(',', '.'))\n return (hours % 24) * MILLISECONDS_IN_HOUR\n }\n\n // hh:mm or hhmm\n token = parseTokenHHMM.exec(timeString)\n if (token) {\n hours = parseInt(token[1], 10)\n minutes = parseFloat(token[2].replace(',', '.'))\n return (hours % 24) * MILLISECONDS_IN_HOUR +\n minutes * MILLISECONDS_IN_MINUTE\n }\n\n // hh:mm:ss or hhmmss\n token = parseTokenHHMMSS.exec(timeString)\n if (token) {\n hours = parseInt(token[1], 10)\n minutes = parseInt(token[2], 10)\n var seconds = parseFloat(token[3].replace(',', '.'))\n return (hours % 24) * MILLISECONDS_IN_HOUR +\n minutes * MILLISECONDS_IN_MINUTE +\n seconds * 1000\n }\n\n // Invalid ISO-formatted time\n return null\n}\n\nfunction parseTimezone (timezoneString) {\n var token\n var absoluteOffset\n\n // Z\n token = parseTokenTimezoneZ.exec(timezoneString)\n if (token) {\n return 0\n }\n\n // ±hh\n token = parseTokenTimezoneHH.exec(timezoneString)\n if (token) {\n absoluteOffset = parseInt(token[2], 10) * 60\n return (token[1] === '+') ? -absoluteOffset : absoluteOffset\n }\n\n // ±hh:mm or ±hhmm\n token = parseTokenTimezoneHHMM.exec(timezoneString)\n if (token) {\n absoluteOffset = parseInt(token[2], 10) * 60 + parseInt(token[3], 10)\n return (token[1] === '+') ? -absoluteOffset : absoluteOffset\n }\n\n return 0\n}\n\nfunction dayOfISOYear (isoYear, week, day) {\n week = week || 0\n day = day || 0\n var date = new Date(0)\n date.setUTCFullYear(isoYear, 0, 4)\n var fourthOfJanuaryDay = date.getUTCDay() || 7\n var diff = week * 7 + day + 1 - fourthOfJanuaryDay\n date.setUTCDate(date.getUTCDate() + diff)\n return date\n}\n\nmodule.exports = parse\n","var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * @param {Date|String|Number} date - the date that should be before the other one to return true\n * @param {Date|String|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is before the second date\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * var result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\nfunction isBefore (dirtyDate, dirtyDateToCompare) {\n var date = parse(dirtyDate)\n var dateToCompare = parse(dirtyDateToCompare)\n return date.getTime() < dateToCompare.getTime()\n}\n\nmodule.exports = isBefore\n","var parse = require('../parse/index.js')\n\n/**\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of a day\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * var result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\nfunction startOfDay (dirtyDate) {\n var date = parse(dirtyDate)\n date.setHours(0, 0, 0, 0)\n return date\n}\n\nmodule.exports = startOfDay\n","var parse = require('../parse/index.js')\n\n/**\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of a month\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * var result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nfunction startOfMonth (dirtyDate) {\n var date = parse(dirtyDate)\n date.setDate(1)\n date.setHours(0, 0, 0, 0)\n return date\n}\n\nmodule.exports = startOfMonth\n","module.exports = __WEBPACK_EXTERNAL_MODULE__5__;","var startOfDay = require('../start_of_day/index.js')\n\n/**\n * @category Day Helpers\n * @summary Are the given dates in the same day?\n *\n * @description\n * Are the given dates in the same day?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same day\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * var result = isSameDay(\n * new Date(2014, 8, 4, 6, 0),\n * new Date(2014, 8, 4, 18, 0)\n * )\n * //=> true\n */\nfunction isSameDay (dirtyDateLeft, dirtyDateRight) {\n var dateLeftStartOfDay = startOfDay(dirtyDateLeft)\n var dateRightStartOfDay = startOfDay(dirtyDateRight)\n\n return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime()\n}\n\nmodule.exports = isSameDay\n","var parse = require('../parse/index.js')\n\n/**\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the start of a week\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * var result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * var result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1})\n * //=> Mon Sep 01 2014 00:00:00\n */\nfunction startOfWeek (dirtyDate, dirtyOptions) {\n var weekStartsOn = dirtyOptions ? (Number(dirtyOptions.weekStartsOn) || 0) : 0\n\n var date = parse(dirtyDate)\n var day = date.getDay()\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn\n\n date.setDate(date.getDate() - diff)\n date.setHours(0, 0, 0, 0)\n return date\n}\n\nmodule.exports = startOfWeek\n","var getDayOfYear = require('../get_day_of_year/index.js')\nvar getISOWeek = require('../get_iso_week/index.js')\nvar getISOYear = require('../get_iso_year/index.js')\nvar parse = require('../parse/index.js')\nvar isValid = require('../is_valid/index.js')\nvar enLocale = require('../locale/en/index.js')\n\n/**\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format.\n *\n * Accepted tokens:\n * | Unit | Token | Result examples |\n * |-------------------------|-------|----------------------------------|\n * | Month | M | 1, 2, ..., 12 |\n * | | Mo | 1st, 2nd, ..., 12th |\n * | | MM | 01, 02, ..., 12 |\n * | | MMM | Jan, Feb, ..., Dec |\n * | | MMMM | January, February, ..., December |\n * | Quarter | Q | 1, 2, 3, 4 |\n * | | Qo | 1st, 2nd, 3rd, 4th |\n * | Day of month | D | 1, 2, ..., 31 |\n * | | Do | 1st, 2nd, ..., 31st |\n * | | DD | 01, 02, ..., 31 |\n * | Day of year | DDD | 1, 2, ..., 366 |\n * | | DDDo | 1st, 2nd, ..., 366th |\n * | | DDDD | 001, 002, ..., 366 |\n * | Day of week | d | 0, 1, ..., 6 |\n * | | do | 0th, 1st, ..., 6th |\n * | | dd | Su, Mo, ..., Sa |\n * | | ddd | Sun, Mon, ..., Sat |\n * | | dddd | Sunday, Monday, ..., Saturday |\n * | Day of ISO week | E | 1, 2, ..., 7 |\n * | ISO week | W | 1, 2, ..., 53 |\n * | | Wo | 1st, 2nd, ..., 53rd |\n * | | WW | 01, 02, ..., 53 |\n * | Year | YY | 00, 01, ..., 99 |\n * | | YYYY | 1900, 1901, ..., 2099 |\n * | ISO week-numbering year | GG | 00, 01, ..., 99 |\n * | | GGGG | 1900, 1901, ..., 2099 |\n * | AM/PM | A | AM, PM |\n * | | a | am, pm |\n * | | aa | a.m., p.m. |\n * | Hour | H | 0, 1, ... 23 |\n * | | HH | 00, 01, ... 23 |\n * | | h | 1, 2, ..., 12 |\n * | | hh | 01, 02, ..., 12 |\n * | Minute | m | 0, 1, ..., 59 |\n * | | mm | 00, 01, ..., 59 |\n * | Second | s | 0, 1, ..., 59 |\n * | | ss | 00, 01, ..., 59 |\n * | 1/10 of second | S | 0, 1, ..., 9 |\n * | 1/100 of second | SS | 00, 01, ..., 99 |\n * | Millisecond | SSS | 000, 001, ..., 999 |\n * | Timezone | Z | -01:00, +00:00, ... +12:00 |\n * | | ZZ | -0100, +0000, ..., +1200 |\n * | Seconds timestamp | X | 512969520 |\n * | Milliseconds timestamp | x | 512969520900 |\n *\n * The characters wrapped in square brackets are escaped.\n *\n * The result may vary by locale.\n *\n * @param {Date|String|Number} date - the original date\n * @param {String} [format='YYYY-MM-DDTHH:mm:ss.SSSZ'] - the string of tokens\n * @param {Object} [options] - the object with options\n * @param {Object} [options.locale=enLocale] - the locale object\n * @returns {String} the formatted date string\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * var result = format(\n * new Date(2014, 1, 11),\n * 'MM/DD/YYYY'\n * )\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * var eoLocale = require('date-fns/locale/eo')\n * var result = format(\n * new Date(2014, 6, 2),\n * 'Do [de] MMMM YYYY',\n * {locale: eoLocale}\n * )\n * //=> '2-a de julio 2014'\n */\nfunction format (dirtyDate, dirtyFormatStr, dirtyOptions) {\n var formatStr = dirtyFormatStr ? String(dirtyFormatStr) : 'YYYY-MM-DDTHH:mm:ss.SSSZ'\n var options = dirtyOptions || {}\n\n var locale = options.locale\n var localeFormatters = enLocale.format.formatters\n var formattingTokensRegExp = enLocale.format.formattingTokensRegExp\n if (locale && locale.format && locale.format.formatters) {\n localeFormatters = locale.format.formatters\n\n if (locale.format.formattingTokensRegExp) {\n formattingTokensRegExp = locale.format.formattingTokensRegExp\n }\n }\n\n var date = parse(dirtyDate)\n\n if (!isValid(date)) {\n return 'Invalid Date'\n }\n\n var formatFn = buildFormatFn(formatStr, localeFormatters, formattingTokensRegExp)\n\n return formatFn(date)\n}\n\nvar formatters = {\n // Month: 1, 2, ..., 12\n 'M': function (date) {\n return date.getMonth() + 1\n },\n\n // Month: 01, 02, ..., 12\n 'MM': function (date) {\n return addLeadingZeros(date.getMonth() + 1, 2)\n },\n\n // Quarter: 1, 2, 3, 4\n 'Q': function (date) {\n return Math.ceil((date.getMonth() + 1) / 3)\n },\n\n // Day of month: 1, 2, ..., 31\n 'D': function (date) {\n return date.getDate()\n },\n\n // Day of month: 01, 02, ..., 31\n 'DD': function (date) {\n return addLeadingZeros(date.getDate(), 2)\n },\n\n // Day of year: 1, 2, ..., 366\n 'DDD': function (date) {\n return getDayOfYear(date)\n },\n\n // Day of year: 001, 002, ..., 366\n 'DDDD': function (date) {\n return addLeadingZeros(getDayOfYear(date), 3)\n },\n\n // Day of week: 0, 1, ..., 6\n 'd': function (date) {\n return date.getDay()\n },\n\n // Day of ISO week: 1, 2, ..., 7\n 'E': function (date) {\n return date.getDay() || 7\n },\n\n // ISO week: 1, 2, ..., 53\n 'W': function (date) {\n return getISOWeek(date)\n },\n\n // ISO week: 01, 02, ..., 53\n 'WW': function (date) {\n return addLeadingZeros(getISOWeek(date), 2)\n },\n\n // Year: 00, 01, ..., 99\n 'YY': function (date) {\n return addLeadingZeros(date.getFullYear(), 4).substr(2)\n },\n\n // Year: 1900, 1901, ..., 2099\n 'YYYY': function (date) {\n return addLeadingZeros(date.getFullYear(), 4)\n },\n\n // ISO week-numbering year: 00, 01, ..., 99\n 'GG': function (date) {\n return String(getISOYear(date)).substr(2)\n },\n\n // ISO week-numbering year: 1900, 1901, ..., 2099\n 'GGGG': function (date) {\n return getISOYear(date)\n },\n\n // Hour: 0, 1, ... 23\n 'H': function (date) {\n return date.getHours()\n },\n\n // Hour: 00, 01, ..., 23\n 'HH': function (date) {\n return addLeadingZeros(date.getHours(), 2)\n },\n\n // Hour: 1, 2, ..., 12\n 'h': function (date) {\n var hours = date.getHours()\n if (hours === 0) {\n return 12\n } else if (hours > 12) {\n return hours % 12\n } else {\n return hours\n }\n },\n\n // Hour: 01, 02, ..., 12\n 'hh': function (date) {\n return addLeadingZeros(formatters['h'](date), 2)\n },\n\n // Minute: 0, 1, ..., 59\n 'm': function (date) {\n return date.getMinutes()\n },\n\n // Minute: 00, 01, ..., 59\n 'mm': function (date) {\n return addLeadingZeros(date.getMinutes(), 2)\n },\n\n // Second: 0, 1, ..., 59\n 's': function (date) {\n return date.getSeconds()\n },\n\n // Second: 00, 01, ..., 59\n 'ss': function (date) {\n return addLeadingZeros(date.getSeconds(), 2)\n },\n\n // 1/10 of second: 0, 1, ..., 9\n 'S': function (date) {\n return Math.floor(date.getMilliseconds() / 100)\n },\n\n // 1/100 of second: 00, 01, ..., 99\n 'SS': function (date) {\n return addLeadingZeros(Math.floor(date.getMilliseconds() / 10), 2)\n },\n\n // Millisecond: 000, 001, ..., 999\n 'SSS': function (date) {\n return addLeadingZeros(date.getMilliseconds(), 3)\n },\n\n // Timezone: -01:00, +00:00, ... +12:00\n 'Z': function (date) {\n return formatTimezone(date.getTimezoneOffset(), ':')\n },\n\n // Timezone: -0100, +0000, ... +1200\n 'ZZ': function (date) {\n return formatTimezone(date.getTimezoneOffset())\n },\n\n // Seconds timestamp: 512969520\n 'X': function (date) {\n return Math.floor(date.getTime() / 1000)\n },\n\n // Milliseconds timestamp: 512969520900\n 'x': function (date) {\n return date.getTime()\n }\n}\n\nfunction buildFormatFn (formatStr, localeFormatters, formattingTokensRegExp) {\n var array = formatStr.match(formattingTokensRegExp)\n var length = array.length\n\n var i\n var formatter\n for (i = 0; i < length; i++) {\n formatter = localeFormatters[array[i]] || formatters[array[i]]\n if (formatter) {\n array[i] = formatter\n } else {\n array[i] = removeFormattingTokens(array[i])\n }\n }\n\n return function (date) {\n var output = ''\n for (var i = 0; i < length; i++) {\n if (array[i] instanceof Function) {\n output += array[i](date, formatters)\n } else {\n output += array[i]\n }\n }\n return output\n }\n}\n\nfunction removeFormattingTokens (input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|]$/g, '')\n }\n return input.replace(/\\\\/g, '')\n}\n\nfunction formatTimezone (offset, delimeter) {\n delimeter = delimeter || ''\n var sign = offset > 0 ? '-' : '+'\n var absOffset = Math.abs(offset)\n var hours = Math.floor(absOffset / 60)\n var minutes = absOffset % 60\n return sign + addLeadingZeros(hours, 2) + delimeter + addLeadingZeros(minutes, 2)\n}\n\nfunction addLeadingZeros (number, targetLength) {\n var output = Math.abs(number).toString()\n while (output.length < targetLength) {\n output = '0' + output\n }\n return output\n}\n\nmodule.exports = format\n","var parse = require('../parse/index.js')\n\n/**\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added\n * @returns {Date} the new date with the days added\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * var result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\nfunction addDays (dirtyDate, dirtyAmount) {\n var date = parse(dirtyDate)\n var amount = Number(dirtyAmount)\n date.setDate(date.getDate() + amount)\n return date\n}\n\nmodule.exports = addDays\n","var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Are the given dates equal?\n *\n * @description\n * Are the given dates equal?\n *\n * @param {Date|String|Number} dateLeft - the first date to compare\n * @param {Date|String|Number} dateRight - the second date to compare\n * @returns {Boolean} the dates are equal\n *\n * @example\n * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\n * var result = isEqual(\n * new Date(2014, 6, 2, 6, 30, 45, 0)\n * new Date(2014, 6, 2, 6, 30, 45, 500)\n * )\n * //=> false\n */\nfunction isEqual (dirtyLeftDate, dirtyRightDate) {\n var dateLeft = parse(dirtyLeftDate)\n var dateRight = parse(dirtyRightDate)\n return dateLeft.getTime() === dateRight.getTime()\n}\n\nmodule.exports = isEqual\n","var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @param {Date|String|Number} date - the date that should be after the other one to return true\n * @param {Date|String|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is after the second date\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * var result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\nfunction isAfter (dirtyDate, dirtyDateToCompare) {\n var date = parse(dirtyDate)\n var dateToCompare = parse(dirtyDateToCompare)\n return date.getTime() > dateToCompare.getTime()\n}\n\nmodule.exports = isAfter\n","var parse = require('../parse/index.js')\n\n/**\n * @category Range Helpers\n * @summary Is the given date within the range?\n *\n * @description\n * Is the given date within the range?\n *\n * @param {Date|String|Number} date - the date to check\n * @param {Date|String|Number} startDate - the start of range\n * @param {Date|String|Number} endDate - the end of range\n * @returns {Boolean} the date is within the range\n * @throws {Error} startDate cannot be after endDate\n *\n * @example\n * // For the date within the range:\n * isWithinRange(\n * new Date(2014, 0, 3), new Date(2014, 0, 1), new Date(2014, 0, 7)\n * )\n * //=> true\n *\n * @example\n * // For the date outside of the range:\n * isWithinRange(\n * new Date(2014, 0, 10), new Date(2014, 0, 1), new Date(2014, 0, 7)\n * )\n * //=> false\n */\nfunction isWithinRange (dirtyDate, dirtyStartDate, dirtyEndDate) {\n var time = parse(dirtyDate).getTime()\n var startTime = parse(dirtyStartDate).getTime()\n var endTime = parse(dirtyEndDate).getTime()\n\n if (startTime > endTime) {\n throw new Error('The start of the range cannot be after the end of the range')\n }\n\n return time >= startTime && time <= endTime\n}\n\nmodule.exports = isWithinRange\n","var parse = require('../parse/index.js')\n\n/**\n * @category Month Helpers\n * @summary Are the given dates in the same month?\n *\n * @description\n * Are the given dates in the same month?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same month\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * var result = isSameMonth(\n * new Date(2014, 8, 2),\n * new Date(2014, 8, 25)\n * )\n * //=> true\n */\nfunction isSameMonth (dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft)\n var dateRight = parse(dirtyDateRight)\n return dateLeft.getFullYear() === dateRight.getFullYear() &&\n dateLeft.getMonth() === dateRight.getMonth()\n}\n\nmodule.exports = isSameMonth\n","var parse = require('../parse/index.js')\n\n/**\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the end of a week\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * var result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * var result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1})\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nfunction endOfWeek (dirtyDate, dirtyOptions) {\n var weekStartsOn = dirtyOptions ? (Number(dirtyOptions.weekStartsOn) || 0) : 0\n\n var date = parse(dirtyDate)\n var day = date.getDay()\n var diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn)\n\n date.setDate(date.getDate() + diff)\n date.setHours(23, 59, 59, 999)\n return date\n}\n\nmodule.exports = endOfWeek\n","var startOfWeek = require('../start_of_week/index.js')\n\n/**\n * @category ISO Week Helpers\n * @summary Return the start of an ISO week for the given date.\n *\n * @description\n * Return the start of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of an ISO week\n *\n * @example\n * // The start of an ISO week for 2 September 2014 11:55:00:\n * var result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nfunction startOfISOWeek (dirtyDate) {\n return startOfWeek(dirtyDate, {weekStartsOn: 1})\n}\n\nmodule.exports = startOfISOWeek\n","var isDate = require('../is_date/index.js')\n\n/**\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param {Date} date - the date to check\n * @returns {Boolean} the date is valid\n * @throws {TypeError} argument must be an instance of Date\n *\n * @example\n * // For the valid date:\n * var result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the invalid date:\n * var result = isValid(new Date(''))\n * //=> false\n */\nfunction isValid (dirtyDate) {\n if (isDate(dirtyDate)) {\n return !isNaN(dirtyDate)\n } else {\n throw new TypeError(toString.call(dirtyDate) + ' is not an instance of Date')\n }\n}\n\nmodule.exports = isValid\n","var startOfDay = require('../start_of_day/index.js')\n\nvar MILLISECONDS_IN_MINUTE = 60000\nvar MILLISECONDS_IN_DAY = 86400000\n\n/**\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar days\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * var result = differenceInCalendarDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n */\nfunction differenceInCalendarDays (dirtyDateLeft, dirtyDateRight) {\n var startOfDayLeft = startOfDay(dirtyDateLeft)\n var startOfDayRight = startOfDay(dirtyDateRight)\n\n var timestampLeft = startOfDayLeft.getTime() -\n startOfDayLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE\n var timestampRight = startOfDayRight.getTime() -\n startOfDayRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE\n\n // Round the number of days to the nearest integer\n // because the number of milliseconds in a day is not constant\n // (e.g. it's different in the day of the daylight saving time clock shift)\n return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY)\n}\n\nmodule.exports = differenceInCalendarDays\n","var addDays = require('../add_days/index.js')\n\n/**\n * @category Day Helpers\n * @summary Subtract the specified number of days from the given date.\n *\n * @description\n * Subtract the specified number of days from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be subtracted\n * @returns {Date} the new date with the days subtracted\n *\n * @example\n * // Subtract 10 days from 1 September 2014:\n * var result = subDays(new Date(2014, 8, 1), 10)\n * //=> Fri Aug 22 2014 00:00:00\n */\nfunction subDays (dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount)\n return addDays(dirtyDate, -amount)\n}\n\nmodule.exports = subDays\n","/**\n * @category Common Helpers\n * @summary Is the given argument an instance of Date?\n *\n * @description\n * Is the given argument an instance of Date?\n *\n * @param {*} argument - the argument to check\n * @returns {Boolean} the given argument is an instance of Date\n *\n * @example\n * // Is 'mayonnaise' a Date?\n * var result = isDate('mayonnaise')\n * //=> false\n */\nfunction isDate (argument) {\n return argument instanceof Date\n}\n\nmodule.exports = isDate\n","var parse = require('../parse/index.js')\nvar startOfISOWeek = require('../start_of_iso_week/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the ISO week-numbering year\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * var result = getISOYear(new Date(2005, 0, 2))\n * //=> 2004\n */\nfunction getISOYear (dirtyDate) {\n var date = parse(dirtyDate)\n var year = date.getFullYear()\n\n var fourthOfJanuaryOfNextYear = new Date(0)\n fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4)\n fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0)\n var startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear)\n\n var fourthOfJanuaryOfThisYear = new Date(0)\n fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4)\n fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0)\n var startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear)\n\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year\n } else {\n return year - 1\n }\n}\n\nmodule.exports = getISOYear\n","var parse = require('../parse/index.js')\n\n/**\n * @category Range Helpers\n * @summary Is the given date range overlapping with another date range?\n *\n * @description\n * Is the given date range overlapping with another date range?\n *\n * @param {Date|String|Number} initialRangeStartDate - the start of the initial range\n * @param {Date|String|Number} initialRangeEndDate - the end of the initial range\n * @param {Date|String|Number} comparedRangeStartDate - the start of the range to compare it with\n * @param {Date|String|Number} comparedRangeEndDate - the end of the range to compare it with\n * @returns {Boolean} whether the date ranges are overlapping\n * @throws {Error} startDate of a date range cannot be after its endDate\n *\n * @example\n * // For overlapping date ranges:\n * areRangesOverlapping(\n * new Date(2014, 0, 10), new Date(2014, 0, 20), new Date(2014, 0, 17), new Date(2014, 0, 21)\n * )\n * //=> true\n *\n * @example\n * // For non-overlapping date ranges:\n * areRangesOverlapping(\n * new Date(2014, 0, 10), new Date(2014, 0, 20), new Date(2014, 0, 21), new Date(2014, 0, 22)\n * )\n * //=> false\n */\nfunction areRangesOverlapping (dirtyInitialRangeStartDate, dirtyInitialRangeEndDate, dirtyComparedRangeStartDate, dirtyComparedRangeEndDate) {\n var initialStartTime = parse(dirtyInitialRangeStartDate).getTime()\n var initialEndTime = parse(dirtyInitialRangeEndDate).getTime()\n var comparedStartTime = parse(dirtyComparedRangeStartDate).getTime()\n var comparedEndTime = parse(dirtyComparedRangeEndDate).getTime()\n\n if (initialStartTime > initialEndTime || comparedStartTime > comparedEndTime) {\n throw new Error('The start of the range cannot be after the end of the range')\n }\n\n return initialStartTime < comparedEndTime && comparedStartTime < initialEndTime\n}\n\nmodule.exports = areRangesOverlapping\n","var parse = require('../parse/index.js')\n\n/**\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * var result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nfunction endOfMonth (dirtyDate) {\n var date = parse(dirtyDate)\n var month = date.getMonth()\n date.setFullYear(date.getFullYear(), month + 1, 0)\n date.setHours(23, 59, 59, 999)\n return date\n}\n\nmodule.exports = endOfMonth\n","var parse = require('../parse/index.js')\n\n/**\n * @category Day Helpers\n * @summary Return the array of dates within the specified range.\n *\n * @description\n * Return the array of dates within the specified range.\n *\n * @param {Date|String|Number} startDate - the first date\n * @param {Date|String|Number} endDate - the last date\n * @param {Number} [step=1] - the step between each day\n * @returns {Date[]} the array with starts of days from the day of startDate to the day of endDate\n * @throws {Error} startDate cannot be after endDate\n *\n * @example\n * // Each day between 6 October 2014 and 10 October 2014:\n * var result = eachDay(\n * new Date(2014, 9, 6),\n * new Date(2014, 9, 10)\n * )\n * //=> [\n * // Mon Oct 06 2014 00:00:00,\n * // Tue Oct 07 2014 00:00:00,\n * // Wed Oct 08 2014 00:00:00,\n * // Thu Oct 09 2014 00:00:00,\n * // Fri Oct 10 2014 00:00:00\n * // ]\n */\nfunction eachDay (dirtyStartDate, dirtyEndDate, dirtyStep) {\n var startDate = parse(dirtyStartDate)\n var endDate = parse(dirtyEndDate)\n var step = dirtyStep !== undefined ? dirtyStep : 1\n\n var endTime = endDate.getTime()\n\n if (startDate.getTime() > endTime) {\n throw new Error('The first date cannot be after the second date')\n }\n\n var dates = []\n\n var currentDate = startDate\n currentDate.setHours(0, 0, 0, 0)\n\n while (currentDate.getTime() <= endTime) {\n dates.push(parse(currentDate))\n currentDate.setDate(currentDate.getDate() + step)\n }\n\n return dates\n}\n\nmodule.exports = eachDay\n","var parse = require('../parse/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Does the given date fall on a weekend?\n *\n * @description\n * Does the given date fall on a weekend?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date falls on a weekend\n *\n * @example\n * // Does 5 October 2014 fall on a weekend?\n * var result = isWeekend(new Date(2014, 9, 5))\n * //=> true\n */\nfunction isWeekend (dirtyDate) {\n var date = parse(dirtyDate)\n var day = date.getDay()\n return day === 0 || day === 6\n}\n\nmodule.exports = isWeekend\n","var parse = require('../parse/index.js')\nvar getDaysInMonth = require('../get_days_in_month/index.js')\n\n/**\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added\n * @returns {Date} the new date with the months added\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * var result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\nfunction addMonths (dirtyDate, dirtyAmount) {\n var date = parse(dirtyDate)\n var amount = Number(dirtyAmount)\n var desiredMonth = date.getMonth() + amount\n var dateWithDesiredMonth = new Date(0)\n dateWithDesiredMonth.setFullYear(date.getFullYear(), desiredMonth, 1)\n dateWithDesiredMonth.setHours(0, 0, 0, 0)\n var daysInMonth = getDaysInMonth(dateWithDesiredMonth)\n // Set the last day of the new month\n // if the original date was the last day of the longer month\n date.setMonth(desiredMonth, Math.min(daysInMonth, date.getDate()))\n return date\n}\n\nmodule.exports = addMonths\n","var MILLISECONDS_IN_MINUTE = 60000\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nmodule.exports = function getTimezoneOffsetInMilliseconds (dirtyDate) {\n var date = new Date(dirtyDate.getTime())\n var baseTimezoneOffset = date.getTimezoneOffset()\n date.setSeconds(0, 0)\n var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE\n\n return baseTimezoneOffset * MILLISECONDS_IN_MINUTE + millisecondsPartOfTimezoneOffset\n}\n","var parse = require('../parse/index.js')\nvar startOfYear = require('../start_of_year/index.js')\nvar differenceInCalendarDays = require('../difference_in_calendar_days/index.js')\n\n/**\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * var result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\nfunction getDayOfYear (dirtyDate) {\n var date = parse(dirtyDate)\n var diff = differenceInCalendarDays(date, startOfYear(date))\n var dayOfYear = diff + 1\n return dayOfYear\n}\n\nmodule.exports = getDayOfYear\n","var parse = require('../parse/index.js')\n\n/**\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of a year\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * var result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\nfunction startOfYear (dirtyDate) {\n var cleanDate = parse(dirtyDate)\n var date = new Date(0)\n date.setFullYear(cleanDate.getFullYear(), 0, 1)\n date.setHours(0, 0, 0, 0)\n return date\n}\n\nmodule.exports = startOfYear\n","var parse = require('../parse/index.js')\nvar startOfISOWeek = require('../start_of_iso_week/index.js')\nvar startOfISOYear = require('../start_of_iso_year/index.js')\n\nvar MILLISECONDS_IN_WEEK = 604800000\n\n/**\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the ISO week\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * var result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\nfunction getISOWeek (dirtyDate) {\n var date = parse(dirtyDate)\n var diff = startOfISOWeek(date).getTime() - startOfISOYear(date).getTime()\n\n // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1\n}\n\nmodule.exports = getISOWeek\n","var getISOYear = require('../get_iso_year/index.js')\nvar startOfISOWeek = require('../start_of_iso_week/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of an ISO year\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * var result = startOfISOYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\nfunction startOfISOYear (dirtyDate) {\n var year = getISOYear(dirtyDate)\n var fourthOfJanuary = new Date(0)\n fourthOfJanuary.setFullYear(year, 0, 4)\n fourthOfJanuary.setHours(0, 0, 0, 0)\n var date = startOfISOWeek(fourthOfJanuary)\n return date\n}\n\nmodule.exports = startOfISOYear\n","var buildDistanceInWordsLocale = require('./build_distance_in_words_locale/index.js')\nvar buildFormatLocale = require('./build_format_locale/index.js')\n\n/**\n * @category Locales\n * @summary English locale.\n */\nmodule.exports = {\n distanceInWords: buildDistanceInWordsLocale(),\n format: buildFormatLocale()\n}\n","function buildDistanceInWordsLocale () {\n var distanceInWordsLocale = {\n lessThanXSeconds: {\n one: 'less than a second',\n other: 'less than {{count}} seconds'\n },\n\n xSeconds: {\n one: '1 second',\n other: '{{count}} seconds'\n },\n\n halfAMinute: 'half a minute',\n\n lessThanXMinutes: {\n one: 'less than a minute',\n other: 'less than {{count}} minutes'\n },\n\n xMinutes: {\n one: '1 minute',\n other: '{{count}} minutes'\n },\n\n aboutXHours: {\n one: 'about 1 hour',\n other: 'about {{count}} hours'\n },\n\n xHours: {\n one: '1 hour',\n other: '{{count}} hours'\n },\n\n xDays: {\n one: '1 day',\n other: '{{count}} days'\n },\n\n aboutXMonths: {\n one: 'about 1 month',\n other: 'about {{count}} months'\n },\n\n xMonths: {\n one: '1 month',\n other: '{{count}} months'\n },\n\n aboutXYears: {\n one: 'about 1 year',\n other: 'about {{count}} years'\n },\n\n xYears: {\n one: '1 year',\n other: '{{count}} years'\n },\n\n overXYears: {\n one: 'over 1 year',\n other: 'over {{count}} years'\n },\n\n almostXYears: {\n one: 'almost 1 year',\n other: 'almost {{count}} years'\n }\n }\n\n function localize (token, count, options) {\n options = options || {}\n\n var result\n if (typeof distanceInWordsLocale[token] === 'string') {\n result = distanceInWordsLocale[token]\n } else if (count === 1) {\n result = distanceInWordsLocale[token].one\n } else {\n result = distanceInWordsLocale[token].other.replace('{{count}}', count)\n }\n\n if (options.addSuffix) {\n if (options.comparison > 0) {\n return 'in ' + result\n } else {\n return result + ' ago'\n }\n }\n\n return result\n }\n\n return {\n localize: localize\n }\n}\n\nmodule.exports = buildDistanceInWordsLocale\n","var buildFormattingTokensRegExp = require('../../_lib/build_formatting_tokens_reg_exp/index.js')\n\nfunction buildFormatLocale () {\n // Note: in English, the names of days of the week and months are capitalized.\n // If you are making a new locale based on this one, check if the same is true for the language you're working on.\n // Generally, formatted dates should look like they are in the middle of a sentence,\n // e.g. in Spanish language the weekdays and months should be in the lowercase.\n var months3char = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']\n var monthsFull = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']\n var weekdays2char = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']\n var weekdays3char = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']\n var weekdaysFull = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\n var meridiemUppercase = ['AM', 'PM']\n var meridiemLowercase = ['am', 'pm']\n var meridiemFull = ['a.m.', 'p.m.']\n\n var formatters = {\n // Month: Jan, Feb, ..., Dec\n 'MMM': function (date) {\n return months3char[date.getMonth()]\n },\n\n // Month: January, February, ..., December\n 'MMMM': function (date) {\n return monthsFull[date.getMonth()]\n },\n\n // Day of week: Su, Mo, ..., Sa\n 'dd': function (date) {\n return weekdays2char[date.getDay()]\n },\n\n // Day of week: Sun, Mon, ..., Sat\n 'ddd': function (date) {\n return weekdays3char[date.getDay()]\n },\n\n // Day of week: Sunday, Monday, ..., Saturday\n 'dddd': function (date) {\n return weekdaysFull[date.getDay()]\n },\n\n // AM, PM\n 'A': function (date) {\n return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0]\n },\n\n // am, pm\n 'a': function (date) {\n return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0]\n },\n\n // a.m., p.m.\n 'aa': function (date) {\n return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0]\n }\n }\n\n // Generate ordinal version of formatters: M -> Mo, D -> Do, etc.\n var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W']\n ordinalFormatters.forEach(function (formatterToken) {\n formatters[formatterToken + 'o'] = function (date, formatters) {\n return ordinal(formatters[formatterToken](date))\n }\n })\n\n return {\n formatters: formatters,\n formattingTokensRegExp: buildFormattingTokensRegExp(formatters)\n }\n}\n\nfunction ordinal (number) {\n var rem100 = number % 100\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + 'st'\n case 2:\n return number + 'nd'\n case 3:\n return number + 'rd'\n }\n }\n return number + 'th'\n}\n\nmodule.exports = buildFormatLocale\n","var commonFormatterKeys = [\n 'M', 'MM', 'Q', 'D', 'DD', 'DDD', 'DDDD', 'd',\n 'E', 'W', 'WW', 'YY', 'YYYY', 'GG', 'GGGG',\n 'H', 'HH', 'h', 'hh', 'm', 'mm',\n 's', 'ss', 'S', 'SS', 'SSS',\n 'Z', 'ZZ', 'X', 'x'\n]\n\nfunction buildFormattingTokensRegExp (formatters) {\n var formatterKeys = []\n for (var key in formatters) {\n if (formatters.hasOwnProperty(key)) {\n formatterKeys.push(key)\n }\n }\n\n var formattingTokens = commonFormatterKeys\n .concat(formatterKeys)\n .sort()\n .reverse()\n var formattingTokensRegExp = new RegExp(\n '(\\\\[[^\\\\[]*\\\\])|(\\\\\\\\)?' + '(' + formattingTokens.join('|') + '|.)', 'g'\n )\n\n return formattingTokensRegExp\n}\n\nmodule.exports = buildFormattingTokensRegExp\n","var parse = require('../parse/index.js')\n\n/**\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the number of days in a month\n *\n * @example\n * // How many days are in February 2000?\n * var result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\nfunction getDaysInMonth (dirtyDate) {\n var date = parse(dirtyDate)\n var year = date.getFullYear()\n var monthIndex = date.getMonth()\n var lastDayOfMonth = new Date(0)\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0)\n lastDayOfMonth.setHours(0, 0, 0, 0)\n return lastDayOfMonth.getDate()\n}\n\nmodule.exports = getDaysInMonth\n","import React, { FC } from 'react'\nimport cx from 'classnames'\n\nimport * as helper from '../../helper'\nimport { HandleOnDayClick, HandleOnDayEnter } from '../../@types'\n\ninterface Props {\n blockClassName: string\n date: Date\n getDayFormatted: typeof helper.getDayFormatted\n handleOnClick: HandleOnDayClick\n handleOnEnter: HandleOnDayEnter\n isCurrentMonth: boolean\n isDisabled: boolean\n isHighlighted: boolean\n isMonthNext: boolean\n isMonthPrev: boolean\n isNonSelectable: boolean\n ISODate: string\n isSelectable: boolean\n isSelected: boolean\n isSelectionEnd: boolean\n isSelectionStart: boolean\n isToday: boolean\n isWeekend: boolean\n isWorkDay: boolean\n key?: string\n}\n\nconst Day: FC = ({\n blockClassName,\n date,\n getDayFormatted,\n handleOnClick,\n handleOnEnter,\n isCurrentMonth,\n isDisabled,\n isHighlighted,\n isMonthNext,\n isMonthPrev,\n isNonSelectable,\n ISODate,\n isSelectable,\n isSelected,\n isSelectionEnd,\n isSelectionStart,\n isToday,\n isWeekend,\n isWorkDay\n}) => (\n \n {getDayFormatted(date)}\n \n)\n\nDay.displayName = 'Day'\n\nexport default Day\n","import React, { FC } from 'react'\nimport classnames from 'classnames'\n\ntype Props = {\n blockClassName?: string\n day: string\n isWeekend: boolean\n // TODO: fix type definitions instead\n key?: string\n}\n\nconst DayOfWeek: FC = ({ blockClassName, isWeekend, day }) => (\n \n {day}\n \n)\n\nexport default DayOfWeek\n","import React, { FC } from 'react'\n\nimport { IDaysOfWeekRenderProps, RenderPropsDayOfWeek } from '../@types'\n\nconst FRIDAY_INDEX = 4\n\nexport type Props = {\n blockClassName: string\n customRender?: IDaysOfWeekRenderProps\n daysOfWeek: string[]\n renderDayOfWeek: RenderPropsDayOfWeek\n weekStartsOn: number\n}\n\ninterface IGetDaysOfWeek {\n daysOfWeek: string[]\n dayIndex: number\n}\n\nconst getDaysOfWeek = ({ daysOfWeek, dayIndex }: IGetDaysOfWeek): string[] => {\n const adjustedIndex = dayIndex - 1\n\n return daysOfWeek\n .slice(adjustedIndex)\n .concat(daysOfWeek.slice(0, adjustedIndex))\n}\n\nconst DaysOfWeek: FC & {\n getDaysOfWeek: (props: IGetDaysOfWeek) => string[]\n} = props => {\n const {\n blockClassName,\n weekStartsOn,\n customRender,\n renderDayOfWeek,\n daysOfWeek\n } = props\n const slicedDaysOfWeek = getDaysOfWeek({ dayIndex: weekStartsOn, daysOfWeek })\n\n const children = slicedDaysOfWeek.map((day, index) =>\n renderDayOfWeek({\n blockClassName,\n day,\n isWeekend: index > FRIDAY_INDEX,\n key: day\n })\n )\n\n if (customRender) {\n return customRender({\n ...props,\n children\n })\n }\n\n return
{children}
\n}\n\nDaysOfWeek.displayName = 'DaysOfWeek'\n\n// TODO: extract to a separate helper\n// @ts-ignore\nDaysOfWeek.getDaysOfWeek = getDaysOfWeek\n\nexport default DaysOfWeek\n","import React, { Component } from 'react'\nimport eachDay from 'date-fns/each_day'\nimport endOfWeek from 'date-fns/end_of_week'\nimport isAfter from 'date-fns/is_after'\nimport isBefore from 'date-fns/is_before'\nimport isEqual from 'date-fns/is_equal'\nimport isSameDay from 'date-fns/is_same_day'\nimport isSameMonth from 'date-fns/is_same_month'\nimport isWeekend from 'date-fns/is_weekend'\nimport isWithinRange from 'date-fns/is_within_range'\nimport startOfDay from 'date-fns/start_of_day'\nimport startOfWeek from 'date-fns/start_of_week'\n\nimport * as helper from '../helper'\nimport {\n IDate,\n IWeekRenderProps,\n OnDayClick,\n OnDayMouseEnter,\n OnDisabledDayClick,\n RenderPropsDay\n} from '../@types'\n\nexport type Props = {\n activeMonth: IDate\n blockClassName: string\n customRender?: IWeekRenderProps\n date: IDate\n disabledIntervals?: {\n start: IDate\n end: IDate\n }[]\n getDayFormatted: typeof helper.getDayFormatted\n getISODate: typeof helper.getISODate\n highlightedEnd?: IDate\n highlightedStart?: IDate\n maxDate?: IDate\n minDate?: IDate\n onDayClick: OnDayClick\n onDayMouseEnter: OnDayMouseEnter\n onDisabledDayClick: OnDisabledDayClick\n renderDay: RenderPropsDay\n selectedMax?: IDate\n selectedMin?: IDate\n today: IDate\n weekStartsOn: number\n}\n\n// TODO: FC Rewrite\n/* eslint-disable react/require-optimization */\nexport default class Week extends Component {\n _dateSelectable(date: Date) {\n const { minDate, maxDate } = this.props\n\n if (this._dateDisabled(date)) {\n return false\n }\n\n if (minDate && maxDate) {\n return isWithinRange(date, minDate, maxDate)\n } else if (minDate && !maxDate) {\n return isAfter(date, minDate) || isEqual(date, minDate)\n } else if (maxDate && !minDate) {\n return isBefore(date, maxDate) || isEqual(date, maxDate)\n }\n return true\n }\n\n _dateSelected(date: Date) {\n const { selectedMin, selectedMax } = this.props\n\n return Boolean(\n selectedMin &&\n selectedMax &&\n isWithinRange(\n startOfDay(date),\n startOfDay(selectedMin),\n startOfDay(selectedMax)\n )\n )\n }\n\n _dateHighlighted(date: Date) {\n const { highlightedStart, highlightedEnd } = this.props\n\n if (!highlightedStart || !highlightedEnd) return false\n\n return isWithinRange(\n startOfDay(date),\n startOfDay(highlightedStart),\n startOfDay(highlightedEnd)\n )\n }\n\n _dateDisabled(date: Date | string) {\n let dateDisabled\n const { disabledIntervals } = this.props\n\n if (!disabledIntervals) return false\n\n for (let i = 0; i < disabledIntervals.length; i++) {\n const { start, end } = disabledIntervals[i]\n\n dateDisabled = isWithinRange(\n startOfDay(date),\n startOfDay(start),\n startOfDay(end)\n )\n\n if (dateDisabled) {\n return dateDisabled\n }\n }\n\n return false\n }\n\n _renderDays() {\n const {\n date,\n today,\n onDayClick,\n onDisabledDayClick,\n onDayMouseEnter,\n getISODate,\n getDayFormatted,\n blockClassName,\n activeMonth,\n selectedMax,\n selectedMin,\n weekStartsOn,\n renderDay\n } = this.props\n const start = startOfWeek(date, { weekStartsOn })\n const end = endOfWeek(date, { weekStartsOn })\n\n return eachDay(start, end).map(day => {\n const date = getISODate(day)\n const isSelectable = this._dateSelectable(day)\n const isDisabled = this._dateDisabled(date)\n const isWorkDay = !isWeekend(date)\n const isCurrentMonth = isSameMonth(date, activeMonth)\n const isNextMonth = !isCurrentMonth && isAfter(date, activeMonth)\n\n return renderDay({\n ISODate: getISODate(day),\n blockClassName,\n date: day,\n getDayFormatted,\n handleOnClick: isSelectable\n ? onDayClick\n : isDisabled\n ? onDisabledDayClick\n : () => {},\n handleOnEnter: isSelectable ? onDayMouseEnter : () => {},\n isCurrentMonth,\n isDisabled,\n isHighlighted: this._dateHighlighted(day),\n isMonthNext: isNextMonth,\n isMonthPrev: !isCurrentMonth && !isNextMonth,\n isNonSelectable: !isSelectable,\n isSelectable,\n isSelected: this._dateSelected(day),\n isSelectionEnd: Boolean(selectedMax && isSameDay(selectedMax, day)),\n isSelectionStart: Boolean(selectedMin && isSameDay(selectedMin, day)),\n isToday: isSameDay(today, day),\n isWeekend: !isWorkDay,\n isWorkDay,\n key: getISODate(day)\n })\n })\n }\n\n render() {\n const { customRender, blockClassName } = this.props\n const children = this._renderDays()\n\n if (customRender) {\n return customRender({\n ...this.props,\n children\n })\n }\n\n return
{children}
\n }\n}\n","import React, { Component, SyntheticEvent } from 'react'\nimport addDays from 'date-fns/add_days'\nimport areRangesOverlapping from 'date-fns/are_ranges_overlapping'\nimport differenceInCalendarDays from 'date-fns/difference_in_calendar_days'\nimport endOfMonth from 'date-fns/end_of_month'\nimport endOfWeek from 'date-fns/end_of_week'\nimport isBefore from 'date-fns/is_before'\nimport isEqual from 'date-fns/is_equal'\nimport isSameDay from 'date-fns/is_same_day'\nimport parse from 'date-fns/parse'\nimport startOfMonth from 'date-fns/start_of_month'\nimport startOfWeek from 'date-fns/start_of_week'\nimport subDays from 'date-fns/sub_days'\n\nimport * as helper from '../helper'\nimport {\n IDate,\n IDaysOfWeekRenderProps,\n IMonthRenderProps,\n IWeekRenderProps,\n RenderPropsDay,\n RenderPropsDayOfWeek\n} from '../@types'\nimport DaysOfWeek from './days_of_week'\nimport Week from './week'\n\nconst RANGE_MODE = 'range'\n\nexport type Props = {\n activeMonth: IDate\n blockClassName: string\n customRender?: IMonthRenderProps\n daysOfWeek: string[]\n disableDaysOfWeek: boolean\n disabledIntervals?: {\n start: IDate\n end: IDate\n }[]\n getDayFormatted: typeof helper.getDayFormatted\n getISODate: typeof helper.getISODate\n highlightedEnd?: IDate\n highlightedStart?: IDate\n maxDate?: IDate\n minDate?: IDate\n minNumberOfWeeks?: number\n mode: string\n onChange: (...args: any[]) => any\n onDayMouseEnter?: (...args: any[]) => any\n onNoticeChange: (...args: any[]) => any\n rangeLimit?: number\n renderDay: RenderPropsDay\n renderDayOfWeek: RenderPropsDayOfWeek\n renderDaysOfWeek?: IDaysOfWeekRenderProps\n renderWeek?: IWeekRenderProps\n selectedMax?: IDate\n selectedMin?: IDate\n today: IDate\n weekStartsOn: number\n}\n\ntype IInterval = {\n start: Date | null\n end: Date | null\n}\n\n// TODO: FC Rewrite\n/* eslint-disable react/require-optimization */\nexport default class Month extends Component {\n handleOnDayMouseEnter = (event: SyntheticEvent) => {\n event.preventDefault()\n const {\n currentTarget: {\n dataset: { simpleReactCalendarDay }\n }\n } = event\n const date = parse(simpleReactCalendarDay as string)\n\n const { onDayMouseEnter } = this.props\n\n if (onDayMouseEnter) {\n onDayMouseEnter(date)\n }\n\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n if (!this._selectionInProgress) return\n\n const { rangeLimit } = this.props\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n const dateLimit = subDays(this._selectionStart, rangeLimit as number)\n const isDisabledWithin = this._getDisabledRange({\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n end: !isBefore(this._selectionStart, date) ? this._selectionStart : date,\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n start: isBefore(this._selectionStart, date) ? this._selectionStart : date\n })\n\n if (!isDisabledWithin) return\n\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n if (!isEqual(date, this._selectionEnd)) {\n if (!rangeLimit || (rangeLimit && !isBefore(date, dateLimit))) {\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n this._selectionEnd = date\n this._pushUpdate()\n }\n }\n }\n\n handleOnDayClick = (event: SyntheticEvent) => {\n event.preventDefault()\n\n const {\n currentTarget: {\n dataset: { simpleReactCalendarDay }\n }\n } = event\n const date = parse(simpleReactCalendarDay as string)\n const { mode } = this.props\n\n if (mode === RANGE_MODE) {\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n if (this._selectionInProgress) {\n const isDisabledWithin = this._getDisabledRange({\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n end: !isBefore(this._selectionStart, date)\n // @ts-ignore\n ? this._selectionStart\n : date,\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n start: isBefore(this._selectionStart, date)\n // @ts-ignore\n ? this._selectionStart\n : date\n })\n\n if (!isDisabledWithin) {\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n this._selectionInProgress = false\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n this._selectionStart = null\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n this._selectionEnd = null\n this._pushUpdate()\n this._pushNoticeUpdate('overlapping_with_disabled')\n return\n }\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n this._selectionInProgress = false\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n this._selectionEnd = date\n } else {\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n this._selectionInProgress = true\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n this._selectionStart = date\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n this._selectionEnd = date\n }\n } else {\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n this._selectionInProgress = false\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n this._selectionStart = date\n\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n this._selectionEnd = date\n }\n\n this._pushUpdate()\n this._pushNoticeUpdate(null)\n }\n\n handleOnDisabledDayClick = (event: SyntheticEvent) => {\n const { onNoticeChange } = this.props\n\n event.preventDefault()\n onNoticeChange('disabled_day_click')\n }\n\n _pushUpdate() {\n const { onChange, rangeLimit } = this.props\n let end, start\n\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n if (this._selectionStart && this._selectionEnd) {\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n if (isBefore(this._selectionStart, this._selectionEnd)) {\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n start = this._selectionStart\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n end = this._selectionEnd\n } else {\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n start = this._selectionEnd\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n end = this._selectionStart\n }\n\n if (rangeLimit && rangeLimit < differenceInCalendarDays(end, start)) {\n end = addDays(start, rangeLimit)\n }\n }\n\n return onChange({\n end,\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n inProgress: this._selectionInProgress,\n start\n })\n }\n\n _getMinDate() {\n const { rangeLimit, minDate } = this.props\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n const calcStartDate = subDays(this._selectionStart, rangeLimit as number)\n\n if (minDate) {\n const isCalcStartDayAfter = isBefore(minDate, calcStartDate)\n\n return isCalcStartDayAfter ? calcStartDate : minDate\n }\n return calcStartDate\n }\n\n _pushNoticeUpdate(noticeType: helper.NoticeMessageType) {\n const { onNoticeChange } = this.props\n\n return onNoticeChange(noticeType)\n }\n\n _getDisabledRange(interval: IInterval) {\n const { start, end } = interval\n const { disabledIntervals } = this.props\n\n if (!disabledIntervals) return true\n\n for (let i = 0; i < disabledIntervals.length; i++) {\n const { start: intervalStart, end: intervalEnd } = disabledIntervals[i]\n\n if (\n areRangesOverlapping(\n start as Date,\n end as Date,\n intervalStart,\n intervalEnd\n )\n ) {\n return\n }\n }\n\n return true\n }\n\n _getMaxDate() {\n const { rangeLimit, maxDate } = this.props\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n const calcEndDate = addDays(this._selectionStart, rangeLimit as number)\n\n if (maxDate) {\n const isCalcEndDayBefore = isBefore(calcEndDate, maxDate)\n\n return isCalcEndDayBefore ? calcEndDate : maxDate\n }\n return calcEndDate\n }\n\n _renderDaysOfWeek() {\n const {\n disableDaysOfWeek,\n blockClassName,\n weekStartsOn,\n daysOfWeek,\n renderDaysOfWeek,\n renderDayOfWeek\n } = this.props\n\n if (disableDaysOfWeek) return\n\n return (\n \n )\n }\n\n _renderWeeks() {\n const {\n selectedMin,\n selectedMax,\n highlightedStart,\n highlightedEnd,\n disabledIntervals,\n activeMonth,\n today,\n blockClassName,\n minNumberOfWeeks,\n rangeLimit,\n weekStartsOn,\n renderDay,\n renderWeek,\n getDayFormatted,\n getISODate\n } = this.props\n const weeks = []\n let { minDate, maxDate } = this.props\n let date = startOfWeek(startOfMonth(activeMonth), { weekStartsOn })\n const end = endOfWeek(endOfMonth(activeMonth), { weekStartsOn })\n\n // TODO: simplify with FC approach, remove state logic from child components\n // this is passed from the parent component\n // @ts-ignore\n if (this._selectionInProgress && rangeLimit) {\n minDate = this._getMinDate()\n maxDate = this._getMaxDate()\n }\n\n while (\n // TODO: External helper with weeknumber etc\n /* eslint-disable no-unmodified-loop-condition */\n (typeof minNumberOfWeeks === 'number' &&\n minNumberOfWeeks > weeks.length) ||\n isBefore(date, end) ||\n isSameDay(date, end)\n ) {\n weeks.push(date)\n date = addDays(date, 7)\n }\n\n return weeks.map(week => {\n return (\n \n )\n })\n }\n\n render() {\n const { blockClassName, customRender } = this.props\n\n const children = (\n <>\n {this._renderDaysOfWeek()}\n {this._renderWeeks()}\n \n )\n\n if (customRender) {\n return customRender({\n ...this.props,\n children\n })\n }\n\n return
{children}
\n }\n}\n","import React, { FC, ReactElement } from 'react'\nimport classnames from 'classnames'\n\nexport type Props = {\n arrow?: ReactElement\n blockClassName?: string\n enabled?: boolean\n offset?: number\n onClick: () => void\n title?: string\n type: 'prev' | 'next'\n}\n\nconst HeaderButton: FC = ({\n arrow,\n blockClassName,\n enabled,\n type,\n title,\n onClick\n}) => (\n \n {arrow}\n \n)\n\nexport default HeaderButton\n","import React, { Component, ReactElement } from 'react'\nimport addMonths from 'date-fns/add_months'\nimport formatDate from 'date-fns/format'\nimport isAfter from 'date-fns/is_after'\nimport isBefore from 'date-fns/is_before'\nimport startOfMonth from 'date-fns/start_of_month'\n\nimport { IDate, IMonthHeaderRenderProps } from '../@types'\nimport HeaderButton from './header_button'\n\nexport type Props = {\n activeMonth: IDate\n blockClassName?: string\n customRender?: IMonthHeaderRenderProps\n headerNextArrow?: ReactElement\n headerNextTitle?: string\n headerPrevArrow?: ReactElement\n headerPrevTitle?: string\n maxDate?: IDate\n minDate?: IDate\n onMonthChange: (...args: any[]) => any\n}\n\n// TODO: FC Rewrite\n/* eslint-disable react/require-optimization */\nexport default class MonthHeader extends Component {\n _switchMonth(offset: -1 | 1) {\n const { onMonthChange, activeMonth } = this.props\n\n onMonthChange(addMonths(activeMonth, offset))\n }\n\n render() {\n const {\n activeMonth,\n minDate,\n maxDate,\n blockClassName,\n headerNextArrow,\n headerNextTitle,\n headerPrevArrow,\n headerPrevTitle,\n customRender\n } = this.props\n\n const prevEnabled = minDate\n ? isBefore(startOfMonth(minDate), startOfMonth(activeMonth))\n : true\n const nextEnabled = maxDate\n ? isAfter(startOfMonth(maxDate), startOfMonth(activeMonth))\n : true\n\n if (customRender) {\n return customRender({\n ...this.props,\n children:\n 'no content, please use activeMonth prop and custom buttons instead',\n nextEnabled,\n prevEnabled,\n switchMonth: this._switchMonth.bind(this)\n })\n }\n\n return (\n
\n \n
\n {formatDate(activeMonth, 'MMMM YYYY')}\n
\n \n
\n )\n }\n}\n","import React, { FC } from 'react'\n\ntype Props = {\n blockClassName?: string\n}\n\nconst displayName = 'Notice'\n\nconst Notice: FC = ({ blockClassName, children }) => {\n if (!children) return null\n\n return
{children}
\n}\n\nNotice.displayName = displayName\n\nexport default Notice\n","import React, { Component, ComponentProps, ReactElement } from 'react'\nimport isSameMonth from 'date-fns/is_same_month'\nimport isValidDate from 'date-fns/is_valid'\nimport startOfMonth from 'date-fns/start_of_month'\n\nimport * as helper from '../helper'\nimport {\n BLOCK_CLASS_NAME,\n DAYS_OF_WEEK,\n NEXT_MONTH_TITLE,\n PREV_MONTH_TITLE\n} from './consts'\nimport {\n ICalendarRenderProp,\n IDate,\n IDateSelection,\n IDaysOfWeekRenderProps,\n IMonthHeaderRenderProps,\n IMonthRenderProps,\n ISelectionRange,\n IWeekRenderProps,\n RenderPropsDay,\n RenderPropsDayOfWeek,\n RenderPropsNotice\n} from '../@types'\nimport Day from '../RenderPropsComponents/Day'\nimport DayOfWeek from '../RenderPropsComponents/DayOfWeek'\nimport Month from './month'\nimport MonthHeader from './month_header'\nimport Notice from '../RenderPropsComponents/Notice'\n\nconst isValid = function (date: Date) {\n try {\n return isValidDate(date)\n } catch (e) {\n return false\n }\n}\n\ntype ISelection = {\n start: IDate\n end: IDate\n inProgress: boolean\n}\n\nexport type Props = {\n MonthHeaderComponent?: ReactElement\n activeMonth?: IDate\n blockClassName: string\n customRender?: ICalendarRenderProp\n daysOfWeek?: string[]\n disableDaysOfWeek?: boolean\n disabledIntervals?: {\n start: IDate\n end: IDate\n }[]\n getDayFormatted: typeof helper.getDayFormatted\n getISODate: typeof helper.getISODate\n getNoticeContent: typeof helper.getNoticeContent\n headerNextArrow?: ReactElement\n headerNextTitle?: string\n headerPrevArrow?: ReactElement\n headerPrevTitle?: string\n highlighted?: {\n start: IDate\n end: IDate\n }\n maxDate?: IDate | undefined\n minDate?: IDate | undefined\n minNumberOfWeeks?: number\n mode?: 'range' | 'single'\n onDayHover?: (...args: any[]) => any\n onMonthChange?: (...args: any[]) => any\n onSelect?: (...args: any[]) => any\n onSelectionProgress?: (...args: any[]) => any\n rangeLimit?: number\n renderNotice?: RenderPropsNotice\n renderDay?: RenderPropsDay\n renderDayOfWeek?: RenderPropsDayOfWeek\n renderDaysOfWeek?: IDaysOfWeekRenderProps\n renderMonth?: IMonthRenderProps\n renderMonthHeader?: IMonthHeaderRenderProps\n renderWeek?: IWeekRenderProps\n selected?: IDate | ISelectionRange\n today?: IDate\n weekStartsOn?: number\n}\n\ntype State = {\n activeMonth: any\n selection: { start: any; end: any } | null\n shownNoticeType: any | null\n}\n\n// TODO: FC Rewrite\n/* eslint-disable react/require-optimization */\nexport default class Calendar extends Component {\n static defaultProps = {\n blockClassName: BLOCK_CLASS_NAME,\n daysOfWeek: DAYS_OF_WEEK,\n disableDaysOfWeek: false,\n getDayFormatted: helper.getDayFormatted,\n getISODate: helper.getISODate,\n getNoticeContent: helper.getNoticeContent,\n headerNextTitle: NEXT_MONTH_TITLE,\n headerPrevTitle: PREV_MONTH_TITLE,\n mode: 'single',\n renderDay: (props: ComponentProps) => ,\n renderDayOfWeek: (props: ComponentProps) => (\n \n ),\n renderNotice: (props: ComponentProps) => (\n \n ),\n weekStartsOn: 1\n }\n\n constructor(props: Props) {\n super(props)\n this.state = {\n activeMonth: this._initialMonth(props),\n selection: null,\n shownNoticeType: null\n }\n }\n\n // TODO: FC Rewrite\n /* eslint-disable react/no-deprecated */\n componentWillReceiveProps(nextProps: Props) {\n const { activeMonth } = this.props\n\n if (\n nextProps.activeMonth &&\n !isSameMonth(nextProps.activeMonth, activeMonth as IDate)\n ) {\n this.setState({ activeMonth: startOfMonth(nextProps.activeMonth) })\n }\n }\n\n _initialMonth(props: Props) {\n const { selected, activeMonth, mode, today } = props || this.props\n\n if (isValid(activeMonth as Date)) {\n return activeMonth\n }\n if (selected) {\n const selectionStart =\n mode === 'single' ? selected : (selected as ISelectionRange).start\n\n if (isValid(selectionStart as Date)) {\n return startOfMonth(selectionStart as Date)\n }\n }\n\n return startOfMonth(today || new Date())\n }\n\n _switchMonth(date: Date) {\n const { onMonthChange } = this.props\n\n if (typeof onMonthChange === 'function') {\n onMonthChange(date)\n } else {\n this.setState({\n activeMonth: date\n })\n }\n }\n\n _activeMonth() {\n const { onMonthChange, activeMonth } = this.props\n\n if (onMonthChange) {\n return activeMonth\n }\n /* eslint-disable react/destructuring-assignment */\n return this.state.activeMonth\n }\n\n _highlight() {\n const { highlighted } = this.props\n\n if (!highlighted) return { end: null, start: null }\n\n const { start, end } = highlighted\n\n if (isValid(start as Date) && isValid(end as Date)) {\n return { end, start }\n }\n return { end: null, start: null }\n }\n\n _selection() {\n const start = this._selectionStart()\n const end = this._selectionEnd()\n\n if (isValid(start) && isValid(end)) {\n return { end, start }\n }\n return { end: null, start: null }\n }\n\n _selectionStart(): Date {\n return this._selectionDate('start')\n }\n\n _selectionEnd(): Date {\n return this._selectionDate('end')\n }\n\n _selectionDate(dateType: IDateSelection) {\n const { selected, onSelectionProgress, mode } = this.props\n const { selection } = this.state\n\n switch (mode) {\n case 'single':\n return selected\n\n case 'range':\n if (!onSelectionProgress && selection) {\n return selection[dateType]\n }\n return selected && (selected as ISelectionRange)[dateType]\n }\n }\n\n _selectionChanged(selection: ISelection) {\n const { start, end, inProgress } = selection\n const { mode, onSelect, onSelectionProgress } = this.props\n\n if (onSelect && start && (mode !== 'range' || !inProgress)) {\n onSelect(mode === 'single' ? start : { end, start })\n }\n\n if (mode === 'range') {\n if (onSelectionProgress) {\n onSelectionProgress(selection)\n } else {\n this.setState({ selection: inProgress ? { end, start } : null })\n }\n }\n }\n\n _noticeChanged(shownNoticeType: helper.NoticeMessageType) {\n this.setState({ shownNoticeType })\n }\n\n _today() {\n /* eslint-disable react/destructuring-assignment */\n return this.props.today || new Date()\n }\n\n _renderMonth() {\n const {\n blockClassName,\n disableDaysOfWeek,\n maxDate,\n minDate,\n minNumberOfWeeks,\n mode,\n onDayHover,\n disabledIntervals,\n rangeLimit,\n weekStartsOn,\n daysOfWeek,\n renderDay,\n renderWeek,\n renderMonth,\n renderDaysOfWeek,\n renderDayOfWeek,\n getDayFormatted,\n getISODate\n } = this.props\n\n const selection = this._selection()\n const highlight = this._highlight()\n\n return (\n // @ts-ignore: No overload matches this call\n \n )\n }\n\n _renderMonthHeader() {\n const {\n blockClassName,\n headerNextArrow,\n headerNextTitle,\n headerPrevArrow,\n headerPrevTitle,\n maxDate,\n minDate,\n MonthHeaderComponent = MonthHeader,\n renderMonthHeader\n } = this.props\n\n return (\n // @ts-ignore\n \n )\n }\n\n render() {\n const {\n blockClassName,\n customRender,\n getNoticeContent,\n renderNotice = (props: ComponentProps) => (\n \n )\n } = this.props\n const { shownNoticeType } = this.state\n\n const children = (\n <>\n {renderNotice({\n blockClassName,\n children: getNoticeContent(shownNoticeType)\n })}\n {this._renderMonthHeader()}\n {this._renderMonth()}\n \n )\n\n if (customRender) {\n return customRender({\n ...this.props,\n children\n })\n }\n\n return
{children}
\n }\n}\n","export const BLOCK_CLASS_NAME = 'calendar'\nexport const NEXT_MONTH_TITLE = 'Next month'\nexport const PREV_MONTH_TITLE = 'Previous month'\nexport const DAYS_IN_WEEK = [0, 1, 2, 3, 4, 5, 6]\nexport const DAYS_OF_WEEK = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']\n","import formatDate from 'date-fns/format'\n\nexport type NoticeMessageType =\n | 'overlapping_with_disabled'\n | 'disabled_day_click'\n | null\n\nexport const getISODate = (date: Date) => formatDate(date, 'YYYY-MM-DD')\nexport const getDayFormatted = (date: Date) => formatDate(date, 'D')\nexport const getNoticeContent = (type: NoticeMessageType) => {\n switch (type) {\n case 'overlapping_with_disabled':\n case 'disabled_day_click':\n return 'Selected range must not overlap with disabled dates.'\n\n default:\n return null\n }\n}\n","export { default } from './calendar/calendar'\n"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/iframe.html b/docs/iframe.html index 360a3fef..951e38e7 100644 --- a/docs/iframe.html +++ b/docs/iframe.html @@ -71,4 +71,4 @@ }

No Preview

Sorry, but you either have no stories or none are selected somehow.

  • Please check the Storybook config.
  • Try reloading the page.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

\ No newline at end of file + }

No Preview

Sorry, but you either have no stories or none are selected somehow.

  • Please check the Storybook config.
  • Try reloading the page.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

\ No newline at end of file diff --git a/docs/main.0f51837d80c4aa8b41b7.bundle.js b/docs/main.0f51837d80c4aa8b41b7.bundle.js deleted file mode 100644 index 5c8b15be..00000000 --- a/docs/main.0f51837d80c4aa8b41b7.bundle.js +++ /dev/null @@ -1,2 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{207:function(module,__webpack_exports__,__webpack_require__){"use strict";var react=__webpack_require__(1),react_default=__webpack_require__.n(react),is_same_month=__webpack_require__(143),is_same_month_default=__webpack_require__.n(is_same_month),is_valid=__webpack_require__(204),is_valid_default=__webpack_require__.n(is_valid),start_of_month=__webpack_require__(42),start_of_month_default=__webpack_require__.n(start_of_month),format=__webpack_require__(106),format_default=__webpack_require__.n(format),classnames=__webpack_require__(81),classnames_default=__webpack_require__.n(classnames),Day_Day=function Day(_ref){var blockClassName=_ref.blockClassName,date=_ref.date,getDayFormatted=_ref.getDayFormatted,handleOnClick=_ref.handleOnClick,handleOnEnter=_ref.handleOnEnter,isCurrentMonth=_ref.isCurrentMonth,isDisabled=_ref.isDisabled,isHighlighted=_ref.isHighlighted,isMonthNext=_ref.isMonthNext,isMonthPrev=_ref.isMonthPrev,isNonSelectable=_ref.isNonSelectable,ISODate=_ref.ISODate,isSelectable=_ref.isSelectable,isSelected=_ref.isSelected,isSelectionEnd=_ref.isSelectionEnd,isSelectionStart=_ref.isSelectionStart,isToday=_ref.isToday,isWeekend=_ref.isWeekend,isWorkDay=_ref.isWorkDay;return(react_default.a.createElement("button",{"data-simple-react-calendar-day":ISODate,className:classnames_default()("".concat(blockClassName,"-week-day"),{"is-current_month":isCurrentMonth,"is-disabled":isDisabled,"is-end_selection":isSelectionEnd,"is-highlighted":isHighlighted,"is-next_month":isMonthNext,"is-not_selectable":isNonSelectable,"is-prev_month":isMonthPrev,"is-selectable":isSelectable,"is-selected":isSelected,"is-start_selection":isSelectionStart,"is-today":isToday,"is-weekend":isWeekend,"is-working_day":isWorkDay}),onClick:handleOnClick,onMouseEnter:handleOnEnter,type:"button",value:ISODate},getDayFormatted(date)))};Day_Day.displayName="Day";var RenderPropsComponents_Day_Day=Day_Day,RenderPropsComponents_DayOfWeek_DayOfWeek=function DayOfWeek(_ref){var blockClassName=_ref.blockClassName,isWeekend=_ref.isWeekend,day=_ref.day;return(react_default.a.createElement("div",{className:classnames_default()("".concat(blockClassName,"-days_of_week_day"),{"is-weekend":isWeekend})},day))},add_days=__webpack_require__(107),add_days_default=__webpack_require__.n(add_days),are_ranges_overlapping=__webpack_require__(350),are_ranges_overlapping_default=__webpack_require__.n(are_ranges_overlapping),difference_in_calendar_days=__webpack_require__(205),difference_in_calendar_days_default=__webpack_require__.n(difference_in_calendar_days),end_of_month=__webpack_require__(351),end_of_month_default=__webpack_require__.n(end_of_month),end_of_week=__webpack_require__(144),end_of_week_default=__webpack_require__.n(end_of_week),is_before=__webpack_require__(20),is_before_default=__webpack_require__.n(is_before),is_equal=__webpack_require__(108),is_equal_default=__webpack_require__.n(is_equal),is_same_day=__webpack_require__(82),is_same_day_default=__webpack_require__.n(is_same_day),parse=__webpack_require__(7),parse_default=__webpack_require__.n(parse),start_of_week=__webpack_require__(105),start_of_week_default=__webpack_require__.n(start_of_week),sub_days=__webpack_require__(206),sub_days_default=__webpack_require__.n(sub_days);function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var getDaysOfWeek=function getDaysOfWeek(_ref){var daysOfWeek=_ref.daysOfWeek,adjustedIndex=_ref.dayIndex-1;return daysOfWeek.slice(adjustedIndex).concat(daysOfWeek.slice(0,adjustedIndex))},days_of_week_DaysOfWeek=function DaysOfWeek(props){var blockClassName=props.blockClassName,weekStartsOn=props.weekStartsOn,customRender=props.customRender,renderDayOfWeek=props.renderDayOfWeek,daysOfWeek=props.daysOfWeek,children=getDaysOfWeek({dayIndex:weekStartsOn,daysOfWeek:daysOfWeek}).map((function(day,index){return renderDayOfWeek({blockClassName:blockClassName,day:day,isWeekend:index>4,key:day})}));return customRender?customRender(function _objectSpread(target){for(var i=1;iweeks.length||is_before_default()(date,end)||is_same_day_default()(date,end);)weeks.push(date),date=add_days_default()(date,7);return weeks.map((function(week){return react_default.a.createElement(week_Week,{activeMonth:activeMonth,blockClassName:blockClassName,customRender:renderWeek,getDayFormatted:getDayFormatted,date:week,disabledIntervals:disabledIntervals,highlightedEnd:highlightedEnd,highlightedStart:highlightedStart,key:week.getTime(),maxDate:maxDate,minDate:minDate,onDayClick:_this2.handleOnDayClick,onDayMouseEnter:_this2.handleOnDayMouseEnter,onDisabledDayClick:_this2.handleOnDisabledDayClick,renderDay:renderDay,selectedMax:selectedMax,selectedMin:selectedMin,today:today,weekStartsOn:weekStartsOn,getISODate:getISODate})}))}},{key:"render",value:function render(){var _this$props7=this.props,blockClassName=_this$props7.blockClassName,customRender=_this$props7.customRender,children=react_default.a.createElement(react_default.a.Fragment,null,this._renderDaysOfWeek(),this._renderWeeks());return customRender?customRender(function month_objectSpread(target){for(var i=1;i';\n}\n"},749:function(module,exports,__webpack_require__){var api=__webpack_require__(345),content=__webpack_require__(750);"string"==typeof(content=content.__esModule?content.default:content)&&(content=[[module.i,content,""]]);var options={insert:"head",singleton:!1},exported=(api(content,options),content.locals?content.locals:{});module.exports=exported},750:function(module,exports){module.exports=".date_picker {\n padding: 30px;\n border-radius: 5px;\n border: 1px solid #e4e7ea;\n color: #303030;\n margin-top: 30px;\n display: flex;\n flex-direction: column;\n flex-basis: 250px;\n max-width: 250px;\n font-family: 'PT Sans', sans-serif;\n}\n.date_picker-month_header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n}\n.date_picker-month_header_wrapper {\n text-align: center;\n margin: 0 auto 25px;\n}\n.date_picker-month_header_title {\n font-size: 20px;\n}\n.date_picker-header_button {\n cursor: pointer;\n background: transparent;\n border-radius: 50%;\n border: 1px solid #e4e7ea;\n transition: border 0.1s ease-in, color 0.1s ease-in;\n position: relative;\n height: 35px;\n width: 35px;\n}\n.date_picker-header_button:focus {\n outline: 0;\n}\n.date_picker-header_button.is-disabled {\n cursor: default;\n}\n.date_picker-header_button.is-next:before,\n.date_picker-header_button.is-prev:before {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n transition: fill 0.1s ease-in;\n color: #303030;\n}\n.date_picker-header_button.is-disabled .date_picker-header_button.is-next,\n.date_picker-header_button.is-disabled .date_picker-header_button.is-prev {\n color: #acb3bb;\n}\n.date_picker-calendar_wrapper.is-shortcut_hover_outrange .date_picker-header_button.is-next,\n.date_picker-calendar_wrapper.is-shortcut_hover_outrange .date_picker-header_button.is-prev {\n border-color: #4a90e2;\n background: #e7f5ff;\n}\n.date_picker-header_button.is-prev:before {\n content: '<';\n}\n.date_picker-header_button.is-next:after {\n content: '>';\n}\n.date_picker-days_of_week {\n font-size: 13px;\n display: flex;\n color: #c3c3c3;\n text-align: center;\n margin-bottom: 25px;\n}\n.date_picker-days_of_week_day {\n flex-basis: 15%;\n}\n.date_picker-week {\n display: flex;\n margin-bottom: 8px;\n}\n.date_picker-week:last-of-type {\n margin-bottom: 0;\n}\n.date_picker-week-day {\n height: 34px;\n width: 34px;\n vertical-align: middle;\n font-size: 15px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-basis: 15%;\n background: #fff;\n position: relative;\n border-radius: 50%;\n margin: 0;\n padding: 0;\n border: none;\n outline: 0;\n}\n.date_picker-week-day:first-of-type:hover,\n.date_picker-week-day:last-of-type:hover {\n border-radius: 50%;\n}\n.date_picker-week-day:first-of-type {\n border-radius: 50% 0 0 50%;\n}\n.date_picker-week-day:last-of-type {\n border-radius: 0 50% 50% 0;\n}\n.date_picker-week-day.is-prev_month,\n.date_picker-week-day.is-next_month {\n color: rgba(172,179,187,0.85);\n}\n.date_picker-week-day.is-today {\n font-weight: 700;\n}\n.date_picker-week-day.is-selected {\n background: #e3effc;\n color: #404040;\n position: relative;\n z-index: 1;\n border-radius: 0;\n}\n.date_picker-week-day.is-selected:first-of-type {\n border-radius: 50% 0 0 50%;\n}\n.date_picker-week-day.is-selected:last-of-type {\n border-radius: 0 50% 50% 0;\n}\n.date_picker-week-day.is-selected::before {\n background: #3863a0;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n position: absolute;\n z-index: -1;\n border-radius: 50%;\n color: #fff;\n}\n.date_picker-calendar_wrapper.is-shortcut_hovered .date_picker-week-day.is-selected::before {\n background: #4a90e2;\n}\n.date_picker-week-day.is-selected:hover::before {\n content: '';\n box-shadow: inset 0 0 1px 0 #3863a0;\n background: #e3effc;\n color: #404040;\n}\n.date_picker-week-day.is-selected.is-start_selection.date_picker-week-day.is-selected:hover::before,\n.date_picker-week-day.is-selected.is-end_selection.date_picker-week-day.is-selected:hover::before {\n background: #3863a0;\n}\n.date_picker-week-day.is-selected.is-start_selection,\n.date_picker-week-day.is-selected.is-end_selection {\n background: #e3effc;\n color: #fff;\n}\n.date_picker-week-day.is-selected.is-start_selection::before,\n.date_picker-week-day.is-selected.is-end_selection::before {\n content: '';\n}\n.date_picker-week-day.is-selected.is-start_selection {\n border-radius: 50% 0 0 50%;\n}\n.date_picker-week-day.is-selected.is-start_selection:last-of-type {\n border-radius: 50%;\n}\n.date_picker-week-day.is-selected.is-end_selection {\n border-radius: 0 50% 50% 0;\n}\n.date_picker-week-day.is-selected.is-end_selection.is-start_selection,\n.date_picker-week-day.is-selected.is-end_selection:first-of-type {\n border-radius: 50%;\n}\n.date_picker-week-day.is-selectable {\n cursor: pointer;\n position: relative;\n}\n.date_picker-week-day.is-selectable:before {\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n display: block;\n width: 100%;\n height: 100%;\n position: absolute;\n}\n.date_picker-week-day.is-selectable:hover:not(.is-selected) {\n z-index: 1;\n box-shadow: inset 0 0 1px 0 #3863a0;\n}\n.date_picker-week-day.is-not_selectable {\n color: #e4e7ea;\n}\n.date_picker-notice {\n font-size: 11px;\n font-weight: 700;\n margin-bottom: 15px;\n border-radius: 5px;\n padding: 15px;\n color: #fff;\n background: #ff6c7e;\n max-width: 238px;\n}\n"}},[[355,1,2]]]); -//# sourceMappingURL=main.0f51837d80c4aa8b41b7.bundle.js.map \ No newline at end of file diff --git a/docs/main.0f51837d80c4aa8b41b7.bundle.js.map b/docs/main.0f51837d80c4aa8b41b7.bundle.js.map deleted file mode 100644 index 974f83d4..00000000 --- a/docs/main.0f51837d80c4aa8b41b7.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"main.0f51837d80c4aa8b41b7.bundle.js","sources":["webpack:///main.0f51837d80c4aa8b41b7.bundle.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/docs/main.4522ae9600afaf512ef3.bundle.js b/docs/main.4522ae9600afaf512ef3.bundle.js new file mode 100644 index 00000000..99cb0bc8 --- /dev/null +++ b/docs/main.4522ae9600afaf512ef3.bundle.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{207:function(module,__webpack_exports__,__webpack_require__){"use strict";var react=__webpack_require__(1),react_default=__webpack_require__.n(react),is_same_month=__webpack_require__(143),is_same_month_default=__webpack_require__.n(is_same_month),is_valid=__webpack_require__(204),is_valid_default=__webpack_require__.n(is_valid),start_of_month=__webpack_require__(42),start_of_month_default=__webpack_require__.n(start_of_month),format=__webpack_require__(106),format_default=__webpack_require__.n(format),classnames=__webpack_require__(81),classnames_default=__webpack_require__.n(classnames),Day_Day=function Day(_ref){var blockClassName=_ref.blockClassName,date=_ref.date,getDayFormatted=_ref.getDayFormatted,handleOnClick=_ref.handleOnClick,handleOnEnter=_ref.handleOnEnter,isCurrentMonth=_ref.isCurrentMonth,isDisabled=_ref.isDisabled,isHighlighted=_ref.isHighlighted,isMonthNext=_ref.isMonthNext,isMonthPrev=_ref.isMonthPrev,isNonSelectable=_ref.isNonSelectable,ISODate=_ref.ISODate,isSelectable=_ref.isSelectable,isSelected=_ref.isSelected,isSelectionEnd=_ref.isSelectionEnd,isSelectionStart=_ref.isSelectionStart,isToday=_ref.isToday,isWeekend=_ref.isWeekend,isWorkDay=_ref.isWorkDay;return(react_default.a.createElement("button",{"data-simple-react-calendar-day":ISODate,className:classnames_default()("".concat(blockClassName,"-week-day"),{"is-current_month":isCurrentMonth,"is-disabled":isDisabled,"is-end_selection":isSelectionEnd,"is-highlighted":isHighlighted,"is-next_month":isMonthNext,"is-not_selectable":isNonSelectable,"is-prev_month":isMonthPrev,"is-selectable":isSelectable,"is-selected":isSelected,"is-start_selection":isSelectionStart,"is-today":isToday,"is-weekend":isWeekend,"is-working_day":isWorkDay}),onClick:handleOnClick,onMouseEnter:handleOnEnter,type:"button",value:ISODate},getDayFormatted(date)))};Day_Day.displayName="Day";var RenderPropsComponents_Day_Day=Day_Day,RenderPropsComponents_DayOfWeek_DayOfWeek=function DayOfWeek(_ref){var blockClassName=_ref.blockClassName,isWeekend=_ref.isWeekend,day=_ref.day;return(react_default.a.createElement("div",{className:classnames_default()("".concat(blockClassName,"-days_of_week_day"),{"is-weekend":isWeekend})},day))},add_days=__webpack_require__(107),add_days_default=__webpack_require__.n(add_days),are_ranges_overlapping=__webpack_require__(350),are_ranges_overlapping_default=__webpack_require__.n(are_ranges_overlapping),difference_in_calendar_days=__webpack_require__(205),difference_in_calendar_days_default=__webpack_require__.n(difference_in_calendar_days),end_of_month=__webpack_require__(351),end_of_month_default=__webpack_require__.n(end_of_month),end_of_week=__webpack_require__(144),end_of_week_default=__webpack_require__.n(end_of_week),is_before=__webpack_require__(20),is_before_default=__webpack_require__.n(is_before),is_equal=__webpack_require__(108),is_equal_default=__webpack_require__.n(is_equal),is_same_day=__webpack_require__(82),is_same_day_default=__webpack_require__.n(is_same_day),parse=__webpack_require__(7),parse_default=__webpack_require__.n(parse),start_of_week=__webpack_require__(105),start_of_week_default=__webpack_require__.n(start_of_week),sub_days=__webpack_require__(206),sub_days_default=__webpack_require__.n(sub_days);function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var getDaysOfWeek=function getDaysOfWeek(_ref){var daysOfWeek=_ref.daysOfWeek,adjustedIndex=_ref.dayIndex-1;return daysOfWeek.slice(adjustedIndex).concat(daysOfWeek.slice(0,adjustedIndex))},days_of_week_DaysOfWeek=function DaysOfWeek(props){var blockClassName=props.blockClassName,weekStartsOn=props.weekStartsOn,customRender=props.customRender,renderDayOfWeek=props.renderDayOfWeek,daysOfWeek=props.daysOfWeek,children=getDaysOfWeek({dayIndex:weekStartsOn,daysOfWeek:daysOfWeek}).map((function(day,index){return renderDayOfWeek({blockClassName:blockClassName,day:day,isWeekend:index>4,key:day})}));return customRender?customRender(function _objectSpread(target){for(var i=1;iweeks.length||is_before_default()(date,end)||is_same_day_default()(date,end);)weeks.push(date),date=add_days_default()(date,7);return weeks.map((function(week){return react_default.a.createElement(week_Week,{activeMonth:activeMonth,blockClassName:blockClassName,customRender:renderWeek,getDayFormatted:getDayFormatted,date:week,disabledIntervals:disabledIntervals,highlightedEnd:highlightedEnd,highlightedStart:highlightedStart,key:week.getTime(),maxDate:maxDate,minDate:minDate,onDayClick:_this2.handleOnDayClick,onDayMouseEnter:_this2.handleOnDayMouseEnter,onDisabledDayClick:_this2.handleOnDisabledDayClick,renderDay:renderDay,selectedMax:selectedMax,selectedMin:selectedMin,today:today,weekStartsOn:weekStartsOn,getISODate:getISODate})}))}},{key:"render",value:function render(){var _this$props7=this.props,blockClassName=_this$props7.blockClassName,customRender=_this$props7.customRender,children=react_default.a.createElement(react_default.a.Fragment,null,this._renderDaysOfWeek(),this._renderWeeks());return customRender?customRender(function month_objectSpread(target){for(var i=1;i';\n}\n"},749:function(module,exports,__webpack_require__){var api=__webpack_require__(345),content=__webpack_require__(750);"string"==typeof(content=content.__esModule?content.default:content)&&(content=[[module.i,content,""]]);var options={insert:"head",singleton:!1},exported=(api(content,options),content.locals?content.locals:{});module.exports=exported},750:function(module,exports){module.exports=".date_picker {\n padding: 30px;\n border-radius: 5px;\n border: 1px solid #e4e7ea;\n color: #303030;\n margin-top: 30px;\n display: flex;\n flex-direction: column;\n flex-basis: 250px;\n max-width: 250px;\n font-family: 'PT Sans', sans-serif;\n}\n.date_picker-month_header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n}\n.date_picker-month_header_wrapper {\n text-align: center;\n margin: 0 auto 25px;\n}\n.date_picker-month_header_title {\n font-size: 20px;\n}\n.date_picker-header_button {\n cursor: pointer;\n background: transparent;\n border-radius: 50%;\n border: 1px solid #e4e7ea;\n transition: border 0.1s ease-in, color 0.1s ease-in;\n position: relative;\n height: 35px;\n width: 35px;\n}\n.date_picker-header_button:focus {\n outline: 0;\n}\n.date_picker-header_button.is-disabled {\n cursor: default;\n}\n.date_picker-header_button.is-next:before,\n.date_picker-header_button.is-prev:before {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n transition: fill 0.1s ease-in;\n color: #303030;\n}\n.date_picker-header_button.is-disabled .date_picker-header_button.is-next,\n.date_picker-header_button.is-disabled .date_picker-header_button.is-prev {\n color: #acb3bb;\n}\n.date_picker-calendar_wrapper.is-shortcut_hover_outrange .date_picker-header_button.is-next,\n.date_picker-calendar_wrapper.is-shortcut_hover_outrange .date_picker-header_button.is-prev {\n border-color: #4a90e2;\n background: #e7f5ff;\n}\n.date_picker-header_button.is-prev:before {\n content: '<';\n}\n.date_picker-header_button.is-next:after {\n content: '>';\n}\n.date_picker-days_of_week {\n font-size: 13px;\n display: flex;\n color: #c3c3c3;\n text-align: center;\n margin-bottom: 25px;\n}\n.date_picker-days_of_week_day {\n flex-basis: 15%;\n}\n.date_picker-week {\n display: flex;\n margin-bottom: 8px;\n}\n.date_picker-week:last-of-type {\n margin-bottom: 0;\n}\n.date_picker-week-day {\n height: 34px;\n width: 34px;\n vertical-align: middle;\n font-size: 15px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-basis: 15%;\n background: #fff;\n position: relative;\n border-radius: 50%;\n margin: 0;\n padding: 0;\n border: none;\n outline: 0;\n}\n.date_picker-week-day:first-of-type:hover,\n.date_picker-week-day:last-of-type:hover {\n border-radius: 50%;\n}\n.date_picker-week-day:first-of-type {\n border-radius: 50% 0 0 50%;\n}\n.date_picker-week-day:last-of-type {\n border-radius: 0 50% 50% 0;\n}\n.date_picker-week-day.is-prev_month,\n.date_picker-week-day.is-next_month {\n color: rgba(172,179,187,0.85);\n}\n.date_picker-week-day.is-today {\n font-weight: 700;\n}\n.date_picker-week-day.is-selected {\n background: #e3effc;\n color: #404040;\n position: relative;\n z-index: 1;\n border-radius: 0;\n}\n.date_picker-week-day.is-selected:first-of-type {\n border-radius: 50% 0 0 50%;\n}\n.date_picker-week-day.is-selected:last-of-type {\n border-radius: 0 50% 50% 0;\n}\n.date_picker-week-day.is-selected::before {\n background: #3863a0;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n position: absolute;\n z-index: -1;\n border-radius: 50%;\n color: #fff;\n}\n.date_picker-calendar_wrapper.is-shortcut_hovered .date_picker-week-day.is-selected::before {\n background: #4a90e2;\n}\n.date_picker-week-day.is-selected:hover::before {\n content: '';\n box-shadow: inset 0 0 1px 0 #3863a0;\n background: #e3effc;\n color: #404040;\n}\n.date_picker-week-day.is-selected.is-start_selection.date_picker-week-day.is-selected:hover::before,\n.date_picker-week-day.is-selected.is-end_selection.date_picker-week-day.is-selected:hover::before {\n background: #3863a0;\n}\n.date_picker-week-day.is-selected.is-start_selection,\n.date_picker-week-day.is-selected.is-end_selection {\n background: #e3effc;\n color: #fff;\n}\n.date_picker-week-day.is-selected.is-start_selection::before,\n.date_picker-week-day.is-selected.is-end_selection::before {\n content: '';\n}\n.date_picker-week-day.is-selected.is-start_selection {\n border-radius: 50% 0 0 50%;\n}\n.date_picker-week-day.is-selected.is-start_selection:last-of-type {\n border-radius: 50%;\n}\n.date_picker-week-day.is-selected.is-end_selection {\n border-radius: 0 50% 50% 0;\n}\n.date_picker-week-day.is-selected.is-end_selection.is-start_selection,\n.date_picker-week-day.is-selected.is-end_selection:first-of-type {\n border-radius: 50%;\n}\n.date_picker-week-day.is-selectable {\n cursor: pointer;\n position: relative;\n}\n.date_picker-week-day.is-selectable:before {\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n display: block;\n width: 100%;\n height: 100%;\n position: absolute;\n}\n.date_picker-week-day.is-selectable:hover:not(.is-selected) {\n z-index: 1;\n box-shadow: inset 0 0 1px 0 #3863a0;\n}\n.date_picker-week-day.is-not_selectable {\n color: #e4e7ea;\n}\n.date_picker-notice {\n font-size: 11px;\n font-weight: 700;\n margin-bottom: 15px;\n border-radius: 5px;\n padding: 15px;\n color: #fff;\n background: #ff6c7e;\n max-width: 238px;\n}\n"}},[[355,1,2]]]); +//# sourceMappingURL=main.4522ae9600afaf512ef3.bundle.js.map \ No newline at end of file diff --git a/docs/main.4522ae9600afaf512ef3.bundle.js.map b/docs/main.4522ae9600afaf512ef3.bundle.js.map new file mode 100644 index 00000000..0ba400a5 --- /dev/null +++ b/docs/main.4522ae9600afaf512ef3.bundle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"main.4522ae9600afaf512ef3.bundle.js","sources":["webpack:///main.4522ae9600afaf512ef3.bundle.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/docs/runtime~main.0f51837d80c4aa8b41b7.bundle.js.map b/docs/runtime~main.0f51837d80c4aa8b41b7.bundle.js.map deleted file mode 100644 index 9bb02bcb..00000000 --- a/docs/runtime~main.0f51837d80c4aa8b41b7.bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"runtime~main.0f51837d80c4aa8b41b7.bundle.js","sources":["webpack:///runtime~main.0f51837d80c4aa8b41b7.bundle.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/docs/runtime~main.0f51837d80c4aa8b41b7.bundle.js b/docs/runtime~main.4522ae9600afaf512ef3.bundle.js similarity index 97% rename from docs/runtime~main.0f51837d80c4aa8b41b7.bundle.js rename to docs/runtime~main.4522ae9600afaf512ef3.bundle.js index 287f318e..6d86df9e 100644 --- a/docs/runtime~main.0f51837d80c4aa8b41b7.bundle.js +++ b/docs/runtime~main.4522ae9600afaf512ef3.bundle.js @@ -1,2 +1,2 @@ !function(modules){function webpackJsonpCallback(data){for(var moduleId,chunkId,chunkIds=data[0],moreModules=data[1],executeModules=data[2],i=0,resolves=[];i1&&"boolean"!=typeof allowMissing)throw new TypeError('"allowMissing" argument must be a boolean');for(var parts=stringToPath(name),value=getBaseIntrinsic("%"+(parts.length>0?parts[0]:"")+"%",allowMissing),i=1;i=parts.length){var desc=$gOPD(value,parts[i]);if(!(allowMissing||parts[i]in value))throw new $TypeError("base intrinsic for "+name+" exists, but the property is not available.");value=desc?desc.get||desc.value:value[parts[i]]}else value=value[parts[i]];return value}},function(module,exports,__webpack_require__){"use strict";module.exports=__webpack_require__(723)},function(module,exports,__webpack_require__){var global=__webpack_require__(4),getOwnPropertyDescriptor=__webpack_require__(89).f,createNonEnumerableProperty=__webpack_require__(45),redefine=__webpack_require__(32),setGlobal=__webpack_require__(164),copyConstructorProperties=__webpack_require__(276),isForced=__webpack_require__(120);module.exports=function(options,source){var target,key,targetProperty,sourceProperty,descriptor,TARGET=options.target,GLOBAL=options.global,STATIC=options.stat;if(target=GLOBAL?global:STATIC?global[TARGET]||setGlobal(TARGET,{}):(global[TARGET]||{}).prototype)for(key in source){if(sourceProperty=source[key],targetProperty=options.noTargetGet?(descriptor=getOwnPropertyDescriptor(target,key))&&descriptor.value:target[key],!isForced(GLOBAL?key:TARGET+(STATIC?".":"#")+key,options.forced)&&void 0!==targetProperty){if(typeof sourceProperty==typeof targetProperty)continue;copyConstructorProperties(sourceProperty,targetProperty)}(options.sham||targetProperty&&targetProperty.sham)&&createNonEnumerableProperty(sourceProperty,"sham",!0),redefine(target,key,sourceProperty,options)}}},function(module,exports,__webpack_require__){"use strict";var bind=__webpack_require__(19);module.exports=bind.call(Function.call,Object.prototype.hasOwnProperty)},function(module,exports,__webpack_require__){(function(global){var check=function(it){return it&&it.Math==Math&&it};module.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof global&&global)||Function("return this")()}).call(this,__webpack_require__(15))},function(module,exports,__webpack_require__){"use strict";var ES5Type=__webpack_require__(247);module.exports=function Type(x){return"symbol"==typeof x?"Symbol":ES5Type(x)}},function(module,exports){module.exports=function(exec){try{return!!exec()}catch(error){return!0}}},function(module,exports,__webpack_require__){var getTimezoneOffsetInMilliseconds=__webpack_require__(774),isDate=__webpack_require__(348),parseTokenDateTimeDelimeter=/[T ]/,parseTokenPlainTime=/:/,parseTokenYY=/^(\d{2})$/,parseTokensYYY=[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],parseTokenYYYY=/^(\d{4})/,parseTokensYYYYY=[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],parseTokenMM=/^-(\d{2})$/,parseTokenDDD=/^-?(\d{3})$/,parseTokenMMDD=/^-?(\d{2})-?(\d{2})$/,parseTokenWww=/^-?W(\d{2})$/,parseTokenWwwD=/^-?W(\d{2})-?(\d{1})$/,parseTokenHH=/^(\d{2}([.,]\d*)?)$/,parseTokenHHMM=/^(\d{2}):?(\d{2}([.,]\d*)?)$/,parseTokenHHMMSS=/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,parseTokenTimezone=/([Z+-].*)$/,parseTokenTimezoneZ=/^(Z)$/,parseTokenTimezoneHH=/^([+-])(\d{2})$/,parseTokenTimezoneHHMM=/^([+-])(\d{2}):?(\d{2})$/;function dayOfISOYear(isoYear,week,day){week=week||0,day=day||0;var date=new Date(0);date.setUTCFullYear(isoYear,0,4);var diff=7*week+day+1-(date.getUTCDay()||7);return date.setUTCDate(date.getUTCDate()+diff),date}module.exports=function parse(argument,dirtyOptions){if(isDate(argument))return new Date(argument.getTime());if("string"!=typeof argument)return new Date(argument);var additionalDigits=(dirtyOptions||{}).additionalDigits;additionalDigits=null==additionalDigits?2:Number(additionalDigits);var dateStrings=function splitDateString(dateString){var timeString,dateStrings={},array=dateString.split(parseTokenDateTimeDelimeter);parseTokenPlainTime.test(array[0])?(dateStrings.date=null,timeString=array[0]):(dateStrings.date=array[0],timeString=array[1]);if(timeString){var token=parseTokenTimezone.exec(timeString);token?(dateStrings.time=timeString.replace(token[1],""),dateStrings.timezone=token[1]):dateStrings.time=timeString}return dateStrings}(argument),parseYearResult=function parseYear(dateString,additionalDigits){var token,parseTokenYYY=parseTokensYYY[additionalDigits],parseTokenYYYYY=parseTokensYYYYY[additionalDigits];if(token=parseTokenYYYY.exec(dateString)||parseTokenYYYYY.exec(dateString)){var yearString=token[1];return{year:parseInt(yearString,10),restDateString:dateString.slice(yearString.length)}}if(token=parseTokenYY.exec(dateString)||parseTokenYYY.exec(dateString)){var centuryString=token[1];return{year:100*parseInt(centuryString,10),restDateString:dateString.slice(centuryString.length)}}return{year:null}}(dateStrings.date,additionalDigits),year=parseYearResult.year,date=function parseDate(dateString,year){if(null===year)return null;var token,date,month,week;if(0===dateString.length)return(date=new Date(0)).setUTCFullYear(year),date;if(token=parseTokenMM.exec(dateString))return date=new Date(0),month=parseInt(token[1],10)-1,date.setUTCFullYear(year,month),date;if(token=parseTokenDDD.exec(dateString)){date=new Date(0);var dayOfYear=parseInt(token[1],10);return date.setUTCFullYear(year,0,dayOfYear),date}if(token=parseTokenMMDD.exec(dateString)){date=new Date(0),month=parseInt(token[1],10)-1;var day=parseInt(token[2],10);return date.setUTCFullYear(year,month,day),date}if(token=parseTokenWww.exec(dateString))return week=parseInt(token[1],10)-1,dayOfISOYear(year,week);if(token=parseTokenWwwD.exec(dateString)){week=parseInt(token[1],10)-1;var dayOfWeek=parseInt(token[2],10)-1;return dayOfISOYear(year,week,dayOfWeek)}return null}(parseYearResult.restDateString,year);if(date){var offset,timestamp=date.getTime(),time=0;if(dateStrings.time&&(time=function parseTime(timeString){var token,hours,minutes;if(token=parseTokenHH.exec(timeString))return(hours=parseFloat(token[1].replace(",",".")))%24*36e5;if(token=parseTokenHHMM.exec(timeString))return hours=parseInt(token[1],10),minutes=parseFloat(token[2].replace(",",".")),hours%24*36e5+6e4*minutes;if(token=parseTokenHHMMSS.exec(timeString)){hours=parseInt(token[1],10),minutes=parseInt(token[2],10);var seconds=parseFloat(token[3].replace(",","."));return hours%24*36e5+6e4*minutes+1e3*seconds}return null}(dateStrings.time)),dateStrings.timezone)offset=6e4*function parseTimezone(timezoneString){var token,absoluteOffset;if(token=parseTokenTimezoneZ.exec(timezoneString))return 0;if(token=parseTokenTimezoneHH.exec(timezoneString))return absoluteOffset=60*parseInt(token[2],10),"+"===token[1]?-absoluteOffset:absoluteOffset;if(token=parseTokenTimezoneHHMM.exec(timezoneString))return absoluteOffset=60*parseInt(token[2],10)+parseInt(token[3],10),"+"===token[1]?-absoluteOffset:absoluteOffset;return 0}(dateStrings.timezone);else{var fullTime=timestamp+time,fullTimeDate=new Date(fullTime);offset=getTimezoneOffsetInMilliseconds(fullTimeDate);var fullTimeDateNextDay=new Date(fullTime);fullTimeDateNextDay.setDate(fullTimeDate.getDate()+1);var offsetDiff=getTimezoneOffsetInMilliseconds(fullTimeDateNextDay)-getTimezoneOffsetInMilliseconds(fullTimeDate);offsetDiff>0&&(offset+=offsetDiff)}return new Date(timestamp+time+offset)}return new Date(argument)}},function(module,exports,__webpack_require__){var global=__webpack_require__(4),shared=__webpack_require__(166),has=__webpack_require__(16),uid=__webpack_require__(118),NATIVE_SYMBOL=__webpack_require__(173),USE_SYMBOL_AS_UID=__webpack_require__(278),WellKnownSymbolsStore=shared("wks"),Symbol=global.Symbol,createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol:Symbol&&Symbol.withoutSetter||uid;module.exports=function(name){return has(WellKnownSymbolsStore,name)||(NATIVE_SYMBOL&&has(Symbol,name)?WellKnownSymbolsStore[name]=Symbol[name]:WellKnownSymbolsStore[name]=createWellKnownSymbol("Symbol."+name)),WellKnownSymbolsStore[name]}},function(module,exports){module.exports=function(it){return"object"==typeof it?null!==it:"function"==typeof it}},function(module,exports,__webpack_require__){"use strict";var keys=__webpack_require__(83),hasSymbols="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),toStr=Object.prototype.toString,concat=Array.prototype.concat,origDefineProperty=Object.defineProperty,supportsDescriptors=origDefineProperty&&function(){var obj={};try{for(var _ in origDefineProperty(obj,"x",{enumerable:!1,value:obj}),obj)return!1;return obj.x===obj}catch(e){return!1}}(),defineProperty=function(object,name,value,predicate){var fn;name in object&&("function"!=typeof(fn=predicate)||"[object Function]"!==toStr.call(fn)||!predicate())||(supportsDescriptors?origDefineProperty(object,name,{configurable:!0,enumerable:!1,value:value,writable:!0}):object[name]=value)},defineProperties=function(object,map){var predicates=arguments.length>2?arguments[2]:{},props=keys(map);hasSymbols&&(props=concat.call(props,Object.getOwnPropertySymbols(map)));for(var i=0;i=51||!fails((function(){var array=[];return array[IS_CONCAT_SPREADABLE]=!1,array.concat()[0]!==array})),SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("concat"),isConcatSpreadable=function(O){if(!isObject(O))return!1;var spreadable=O[IS_CONCAT_SPREADABLE];return void 0!==spreadable?!!spreadable:isArray(O)};$({target:"Array",proto:!0,forced:!IS_CONCAT_SPREADABLE_SUPPORT||!SPECIES_SUPPORT},{concat:function concat(arg){var i,k,length,len,E,O=toObject(this),A=arraySpeciesCreate(O,0),n=0;for(i=-1,length=arguments.length;i9007199254740991)throw TypeError("Maximum allowed index exceeded");for(k=0;k=9007199254740991)throw TypeError("Maximum allowed index exceeded");createProperty(A,n++,E)}return A.length=n,A}})},function(module,exports,__webpack_require__){var requireObjectCoercible=__webpack_require__(53);module.exports=function(argument){return Object(requireObjectCoercible(argument))}},function(module,exports,__webpack_require__){"use strict";var $=__webpack_require__(2),global=__webpack_require__(4),getBuiltIn=__webpack_require__(71),IS_PURE=__webpack_require__(92),DESCRIPTORS=__webpack_require__(13),NATIVE_SYMBOL=__webpack_require__(173),USE_SYMBOL_AS_UID=__webpack_require__(278),fails=__webpack_require__(6),has=__webpack_require__(16),isArray=__webpack_require__(95),isObject=__webpack_require__(9),anObject=__webpack_require__(14),toObject=__webpack_require__(26),toIndexedObject=__webpack_require__(60),toPrimitive=__webpack_require__(91),createPropertyDescriptor=__webpack_require__(90),nativeObjectCreate=__webpack_require__(72),objectKeys=__webpack_require__(97),getOwnPropertyNamesModule=__webpack_require__(119),getOwnPropertyNamesExternal=__webpack_require__(544),getOwnPropertySymbolsModule=__webpack_require__(171),getOwnPropertyDescriptorModule=__webpack_require__(89),definePropertyModule=__webpack_require__(17),propertyIsEnumerableModule=__webpack_require__(115),createNonEnumerableProperty=__webpack_require__(45),redefine=__webpack_require__(32),shared=__webpack_require__(166),sharedKey=__webpack_require__(117),hiddenKeys=__webpack_require__(93),uid=__webpack_require__(118),wellKnownSymbol=__webpack_require__(8),wrappedWellKnownSymbolModule=__webpack_require__(282),defineWellKnownSymbol=__webpack_require__(11),setToStringTag=__webpack_require__(65),InternalStateModule=__webpack_require__(61),$forEach=__webpack_require__(62).forEach,HIDDEN=sharedKey("hidden"),TO_PRIMITIVE=wellKnownSymbol("toPrimitive"),setInternalState=InternalStateModule.set,getInternalState=InternalStateModule.getterFor("Symbol"),ObjectPrototype=Object.prototype,$Symbol=global.Symbol,$stringify=getBuiltIn("JSON","stringify"),nativeGetOwnPropertyDescriptor=getOwnPropertyDescriptorModule.f,nativeDefineProperty=definePropertyModule.f,nativeGetOwnPropertyNames=getOwnPropertyNamesExternal.f,nativePropertyIsEnumerable=propertyIsEnumerableModule.f,AllSymbols=shared("symbols"),ObjectPrototypeSymbols=shared("op-symbols"),StringToSymbolRegistry=shared("string-to-symbol-registry"),SymbolToStringRegistry=shared("symbol-to-string-registry"),WellKnownSymbolsStore=shared("wks"),QObject=global.QObject,USE_SETTER=!QObject||!QObject.prototype||!QObject.prototype.findChild,setSymbolDescriptor=DESCRIPTORS&&fails((function(){return 7!=nativeObjectCreate(nativeDefineProperty({},"a",{get:function(){return nativeDefineProperty(this,"a",{value:7}).a}})).a}))?function(O,P,Attributes){var ObjectPrototypeDescriptor=nativeGetOwnPropertyDescriptor(ObjectPrototype,P);ObjectPrototypeDescriptor&&delete ObjectPrototype[P],nativeDefineProperty(O,P,Attributes),ObjectPrototypeDescriptor&&O!==ObjectPrototype&&nativeDefineProperty(ObjectPrototype,P,ObjectPrototypeDescriptor)}:nativeDefineProperty,wrap=function(tag,description){var symbol=AllSymbols[tag]=nativeObjectCreate($Symbol.prototype);return setInternalState(symbol,{type:"Symbol",tag:tag,description:description}),DESCRIPTORS||(symbol.description=description),symbol},isSymbol=USE_SYMBOL_AS_UID?function(it){return"symbol"==typeof it}:function(it){return Object(it)instanceof $Symbol},$defineProperty=function defineProperty(O,P,Attributes){O===ObjectPrototype&&$defineProperty(ObjectPrototypeSymbols,P,Attributes),anObject(O);var key=toPrimitive(P,!0);return anObject(Attributes),has(AllSymbols,key)?(Attributes.enumerable?(has(O,HIDDEN)&&O[HIDDEN][key]&&(O[HIDDEN][key]=!1),Attributes=nativeObjectCreate(Attributes,{enumerable:createPropertyDescriptor(0,!1)})):(has(O,HIDDEN)||nativeDefineProperty(O,HIDDEN,createPropertyDescriptor(1,{})),O[HIDDEN][key]=!0),setSymbolDescriptor(O,key,Attributes)):nativeDefineProperty(O,key,Attributes)},$defineProperties=function defineProperties(O,Properties){anObject(O);var properties=toIndexedObject(Properties),keys=objectKeys(properties).concat($getOwnPropertySymbols(properties));return $forEach(keys,(function(key){DESCRIPTORS&&!$propertyIsEnumerable.call(properties,key)||$defineProperty(O,key,properties[key])})),O},$propertyIsEnumerable=function propertyIsEnumerable(V){var P=toPrimitive(V,!0),enumerable=nativePropertyIsEnumerable.call(this,P);return!(this===ObjectPrototype&&has(AllSymbols,P)&&!has(ObjectPrototypeSymbols,P))&&(!(enumerable||!has(this,P)||!has(AllSymbols,P)||has(this,HIDDEN)&&this[HIDDEN][P])||enumerable)},$getOwnPropertyDescriptor=function getOwnPropertyDescriptor(O,P){var it=toIndexedObject(O),key=toPrimitive(P,!0);if(it!==ObjectPrototype||!has(AllSymbols,key)||has(ObjectPrototypeSymbols,key)){var descriptor=nativeGetOwnPropertyDescriptor(it,key);return!descriptor||!has(AllSymbols,key)||has(it,HIDDEN)&&it[HIDDEN][key]||(descriptor.enumerable=!0),descriptor}},$getOwnPropertyNames=function getOwnPropertyNames(O){var names=nativeGetOwnPropertyNames(toIndexedObject(O)),result=[];return $forEach(names,(function(key){has(AllSymbols,key)||has(hiddenKeys,key)||result.push(key)})),result},$getOwnPropertySymbols=function getOwnPropertySymbols(O){var IS_OBJECT_PROTOTYPE=O===ObjectPrototype,names=nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE?ObjectPrototypeSymbols:toIndexedObject(O)),result=[];return $forEach(names,(function(key){!has(AllSymbols,key)||IS_OBJECT_PROTOTYPE&&!has(ObjectPrototype,key)||result.push(AllSymbols[key])})),result};(NATIVE_SYMBOL||(redefine(($Symbol=function Symbol(){if(this instanceof $Symbol)throw TypeError("Symbol is not a constructor");var description=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,tag=uid(description),setter=function(value){this===ObjectPrototype&&setter.call(ObjectPrototypeSymbols,value),has(this,HIDDEN)&&has(this[HIDDEN],tag)&&(this[HIDDEN][tag]=!1),setSymbolDescriptor(this,tag,createPropertyDescriptor(1,value))};return DESCRIPTORS&&USE_SETTER&&setSymbolDescriptor(ObjectPrototype,tag,{configurable:!0,set:setter}),wrap(tag,description)}).prototype,"toString",(function toString(){return getInternalState(this).tag})),redefine($Symbol,"withoutSetter",(function(description){return wrap(uid(description),description)})),propertyIsEnumerableModule.f=$propertyIsEnumerable,definePropertyModule.f=$defineProperty,getOwnPropertyDescriptorModule.f=$getOwnPropertyDescriptor,getOwnPropertyNamesModule.f=getOwnPropertyNamesExternal.f=$getOwnPropertyNames,getOwnPropertySymbolsModule.f=$getOwnPropertySymbols,wrappedWellKnownSymbolModule.f=function(name){return wrap(wellKnownSymbol(name),name)},DESCRIPTORS&&(nativeDefineProperty($Symbol.prototype,"description",{configurable:!0,get:function description(){return getInternalState(this).description}}),IS_PURE||redefine(ObjectPrototype,"propertyIsEnumerable",$propertyIsEnumerable,{unsafe:!0}))),$({global:!0,wrap:!0,forced:!NATIVE_SYMBOL,sham:!NATIVE_SYMBOL},{Symbol:$Symbol}),$forEach(objectKeys(WellKnownSymbolsStore),(function(name){defineWellKnownSymbol(name)})),$({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL},{for:function(key){var string=String(key);if(has(StringToSymbolRegistry,string))return StringToSymbolRegistry[string];var symbol=$Symbol(string);return StringToSymbolRegistry[string]=symbol,SymbolToStringRegistry[symbol]=string,symbol},keyFor:function keyFor(sym){if(!isSymbol(sym))throw TypeError(sym+" is not a symbol");if(has(SymbolToStringRegistry,sym))return SymbolToStringRegistry[sym]},useSetter:function(){USE_SETTER=!0},useSimple:function(){USE_SETTER=!1}}),$({target:"Object",stat:!0,forced:!NATIVE_SYMBOL,sham:!DESCRIPTORS},{create:function create(O,Properties){return void 0===Properties?nativeObjectCreate(O):$defineProperties(nativeObjectCreate(O),Properties)},defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor}),$({target:"Object",stat:!0,forced:!NATIVE_SYMBOL},{getOwnPropertyNames:$getOwnPropertyNames,getOwnPropertySymbols:$getOwnPropertySymbols}),$({target:"Object",stat:!0,forced:fails((function(){getOwnPropertySymbolsModule.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(it){return getOwnPropertySymbolsModule.f(toObject(it))}}),$stringify)&&$({target:"JSON",stat:!0,forced:!NATIVE_SYMBOL||fails((function(){var symbol=$Symbol();return"[null]"!=$stringify([symbol])||"{}"!=$stringify({a:symbol})||"{}"!=$stringify(Object(symbol))}))},{stringify:function stringify(it,replacer,space){for(var $replacer,args=[it],index=1;arguments.length>index;)args.push(arguments[index++]);if($replacer=replacer,(isObject(replacer)||void 0!==it)&&!isSymbol(it))return isArray(replacer)||(replacer=function(key,value){if("function"==typeof $replacer&&(value=$replacer.call(this,key,value)),!isSymbol(value))return value}),args[1]=replacer,$stringify.apply(null,args)}});$Symbol.prototype[TO_PRIMITIVE]||createNonEnumerableProperty($Symbol.prototype,TO_PRIMITIVE,$Symbol.prototype.valueOf),setToStringTag($Symbol,"Symbol"),hiddenKeys[HIDDEN]=!0},function(module,exports,__webpack_require__){"use strict";var $=__webpack_require__(2),forEach=__webpack_require__(284);$({target:"Array",proto:!0,forced:[].forEach!=forEach},{forEach:forEach})},function(module,exports,__webpack_require__){"use strict";var toIndexedObject=__webpack_require__(60),addToUnscopables=__webpack_require__(178),Iterators=__webpack_require__(100),InternalStateModule=__webpack_require__(61),defineIterator=__webpack_require__(180),setInternalState=InternalStateModule.set,getInternalState=InternalStateModule.getterFor("Array Iterator");module.exports=defineIterator(Array,"Array",(function(iterated,kind){setInternalState(this,{type:"Array Iterator",target:toIndexedObject(iterated),index:0,kind:kind})}),(function(){var state=getInternalState(this),target=state.target,kind=state.kind,index=state.index++;return!target||index>=target.length?(state.target=void 0,{value:void 0,done:!0}):"keys"==kind?{value:index,done:!1}:"values"==kind?{value:target[index],done:!1}:{value:[index,target[index]],done:!1}}),"values"),Iterators.Arguments=Iterators.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries")},function(module,exports,__webpack_require__){var global=__webpack_require__(4),DOMIterables=__webpack_require__(294),forEach=__webpack_require__(284),createNonEnumerableProperty=__webpack_require__(45);for(var COLLECTION_NAME in DOMIterables){var Collection=global[COLLECTION_NAME],CollectionPrototype=Collection&&Collection.prototype;if(CollectionPrototype&&CollectionPrototype.forEach!==forEach)try{createNonEnumerableProperty(CollectionPrototype,"forEach",forEach)}catch(error){CollectionPrototype.forEach=forEach}}},function(module,exports,__webpack_require__){var parse=__webpack_require__(7);module.exports=function startOfDay(dirtyDate){var date=parse(dirtyDate);return date.setHours(0,0,0,0),date}},function(module,exports,__webpack_require__){var global=__webpack_require__(4),createNonEnumerableProperty=__webpack_require__(45),has=__webpack_require__(16),setGlobal=__webpack_require__(164),inspectSource=__webpack_require__(165),InternalStateModule=__webpack_require__(61),getInternalState=InternalStateModule.get,enforceInternalState=InternalStateModule.enforce,TEMPLATE=String(String).split("String");(module.exports=function(O,key,value,options){var unsafe=!!options&&!!options.unsafe,simple=!!options&&!!options.enumerable,noTargetGet=!!options&&!!options.noTargetGet;"function"==typeof value&&("string"!=typeof key||has(value,"name")||createNonEnumerableProperty(value,"name",key),enforceInternalState(value).source=TEMPLATE.join("string"==typeof key?key:"")),O!==global?(unsafe?!noTargetGet&&O[key]&&(simple=!0):delete O[key],simple?O[key]=value:createNonEnumerableProperty(O,key,value)):simple?O[key]=value:setGlobal(key,value)})(Function.prototype,"toString",(function toString(){return"function"==typeof this&&getInternalState(this).source||inspectSource(this)}))},function(module,exports,__webpack_require__){var toInteger=__webpack_require__(94),min=Math.min;module.exports=function(argument){return argument>0?min(toInteger(argument),9007199254740991):0}},function(module,exports,__webpack_require__){"use strict";var $=__webpack_require__(2),DESCRIPTORS=__webpack_require__(13),global=__webpack_require__(4),has=__webpack_require__(16),isObject=__webpack_require__(9),defineProperty=__webpack_require__(17).f,copyConstructorProperties=__webpack_require__(276),NativeSymbol=global.Symbol;if(DESCRIPTORS&&"function"==typeof NativeSymbol&&(!("description"in NativeSymbol.prototype)||void 0!==NativeSymbol().description)){var EmptyStringDescriptionStore={},SymbolWrapper=function Symbol(){var description=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),result=this instanceof SymbolWrapper?new NativeSymbol(description):void 0===description?NativeSymbol():NativeSymbol(description);return""===description&&(EmptyStringDescriptionStore[result]=!0),result};copyConstructorProperties(SymbolWrapper,NativeSymbol);var symbolPrototype=SymbolWrapper.prototype=NativeSymbol.prototype;symbolPrototype.constructor=SymbolWrapper;var symbolToString=symbolPrototype.toString,native="Symbol(test)"==String(NativeSymbol("test")),regexp=/^Symbol\((.*)\)[^)]+$/;defineProperty(symbolPrototype,"description",{configurable:!0,get:function description(){var symbol=isObject(this)?this.valueOf():this,string=symbolToString.call(symbol);if(has(EmptyStringDescriptionStore,symbol))return"";var desc=native?string.slice(7,-1):string.replace(regexp,"$1");return""===desc?void 0:desc}}),$({global:!0,forced:!0},{Symbol:SymbolWrapper})}},function(module,exports,__webpack_require__){__webpack_require__(11)("iterator")},function(module,exports,__webpack_require__){(function(global){var win;win="undefined"!=typeof window?window:void 0!==global?global:"undefined"!=typeof self?self:{},module.exports=win}).call(this,__webpack_require__(15))},function(module,exports,__webpack_require__){var DESCRIPTORS=__webpack_require__(13),fails=__webpack_require__(6),has=__webpack_require__(16),defineProperty=Object.defineProperty,cache={},thrower=function(it){throw it};module.exports=function(METHOD_NAME,options){if(has(cache,METHOD_NAME))return cache[METHOD_NAME];options||(options={});var method=[][METHOD_NAME],ACCESSORS=!!has(options,"ACCESSORS")&&options.ACCESSORS,argument0=has(options,0)?options[0]:thrower,argument1=has(options,1)?options[1]:void 0;return cache[METHOD_NAME]=!!method&&!fails((function(){if(ACCESSORS&&!DESCRIPTORS)return!0;var O={length:-1};ACCESSORS?defineProperty(O,1,{enumerable:!0,get:thrower}):O[1]=1,method.call(O,argument0,argument1)}))}},function(module,exports,__webpack_require__){var $=__webpack_require__(2),assign=__webpack_require__(575);$({target:"Object",stat:!0,forced:Object.assign!==assign},{assign:assign})},function(module,exports,__webpack_require__){"use strict";var charAt=__webpack_require__(293).charAt,InternalStateModule=__webpack_require__(61),defineIterator=__webpack_require__(180),setInternalState=InternalStateModule.set,getInternalState=InternalStateModule.getterFor("String Iterator");defineIterator(String,"String",(function(iterated){setInternalState(this,{type:"String Iterator",string:String(iterated),index:0})}),(function next(){var point,state=getInternalState(this),string=state.string,index=state.index;return index>=string.length?{value:void 0,done:!0}:(point=charAt(string,index),state.index+=point.length,{value:point,done:!1})}))},function(module,exports,__webpack_require__){var global=__webpack_require__(4),DOMIterables=__webpack_require__(294),ArrayIteratorMethods=__webpack_require__(29),createNonEnumerableProperty=__webpack_require__(45),wellKnownSymbol=__webpack_require__(8),ITERATOR=wellKnownSymbol("iterator"),TO_STRING_TAG=wellKnownSymbol("toStringTag"),ArrayValues=ArrayIteratorMethods.values;for(var COLLECTION_NAME in DOMIterables){var Collection=global[COLLECTION_NAME],CollectionPrototype=Collection&&Collection.prototype;if(CollectionPrototype){if(CollectionPrototype[ITERATOR]!==ArrayValues)try{createNonEnumerableProperty(CollectionPrototype,ITERATOR,ArrayValues)}catch(error){CollectionPrototype[ITERATOR]=ArrayValues}if(CollectionPrototype[TO_STRING_TAG]||createNonEnumerableProperty(CollectionPrototype,TO_STRING_TAG,COLLECTION_NAME),DOMIterables[COLLECTION_NAME])for(var METHOD_NAME in ArrayIteratorMethods)if(CollectionPrototype[METHOD_NAME]!==ArrayIteratorMethods[METHOD_NAME])try{createNonEnumerableProperty(CollectionPrototype,METHOD_NAME,ArrayIteratorMethods[METHOD_NAME])}catch(error){CollectionPrototype[METHOD_NAME]=ArrayIteratorMethods[METHOD_NAME]}}}},function(module,exports,__webpack_require__){var freeGlobal=__webpack_require__(311),freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")();module.exports=root},function(module,exports,__webpack_require__){var parse=__webpack_require__(7);module.exports=function startOfMonth(dirtyDate){var date=parse(dirtyDate);return date.setDate(1),date.setHours(0,0,0,0),date}},function(module,exports,__webpack_require__){"use strict";(function(global){var origSymbol=global.Symbol,hasSymbolSham=__webpack_require__(220);module.exports=function hasNativeSymbols(){return"function"==typeof origSymbol&&("function"==typeof Symbol&&("symbol"==typeof origSymbol("foo")&&("symbol"==typeof Symbol("bar")&&hasSymbolSham())))}}).call(this,__webpack_require__(15))},function(module,exports,__webpack_require__){"use strict";var $TypeError=TypeError,ThrowTypeError=Object.getOwnPropertyDescriptor?function(){return Object.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new $TypeError},hasSymbols=__webpack_require__(154)(),getProto=Object.getPrototypeOf||function(x){return x.__proto__},asyncGenIterator=void 0,TypedArray="undefined"==typeof Uint8Array?void 0:getProto(Uint8Array),INTRINSICS={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":hasSymbols?getProto([][Symbol.iterator]()):void 0,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":void 0,"$ %AsyncFunction%":void 0,"$ %AsyncFunctionPrototype%":void 0,"$ %AsyncGenerator%":void 0,"$ %AsyncGeneratorFunction%":void 0,"$ %AsyncGeneratorPrototype%":void 0,"$ %AsyncIteratorPrototype%":asyncGenIterator&&hasSymbols&&Symbol.asyncIterator?asyncGenIterator[Symbol.asyncIterator]():void 0,"$ %Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"==typeof DataView?void 0:DataView,"$ %DataViewPrototype%":"undefined"==typeof DataView?void 0:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":Error,"$ %ErrorPrototype%":Error.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"$ %Float32ArrayPrototype%":"undefined"==typeof Float32Array?void 0:Float32Array.prototype,"$ %Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"$ %Float64ArrayPrototype%":"undefined"==typeof Float64Array?void 0:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":void 0,"$ %GeneratorFunction%":void 0,"$ %GeneratorPrototype%":void 0,"$ %Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"$ %Int8ArrayPrototype%":"undefined"==typeof Int8Array?void 0:Int8Array.prototype,"$ %Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"$ %Int16ArrayPrototype%":"undefined"==typeof Int16Array?void 0:Int8Array.prototype,"$ %Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"$ %Int32ArrayPrototype%":"undefined"==typeof Int32Array?void 0:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":isNaN,"$ %IteratorPrototype%":hasSymbols?getProto(getProto([][Symbol.iterator]())):void 0,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"==typeof Map?void 0:Map,"$ %MapIteratorPrototype%":"undefined"!=typeof Map&&hasSymbols?getProto((new Map)[Symbol.iterator]()):void 0,"$ %MapPrototype%":"undefined"==typeof Map?void 0:Map.prototype,"$ %Math%":Math,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":Object,"$ %ObjectPrototype%":Object.prototype,"$ %ObjProto_toString%":Object.prototype.toString,"$ %ObjProto_valueOf%":Object.prototype.valueOf,"$ %parseFloat%":parseFloat,"$ %parseInt%":parseInt,"$ %Promise%":"undefined"==typeof Promise?void 0:Promise,"$ %PromisePrototype%":"undefined"==typeof Promise?void 0:Promise.prototype,"$ %PromiseProto_then%":"undefined"==typeof Promise?void 0:Promise.prototype.then,"$ %Promise_all%":"undefined"==typeof Promise?void 0:Promise.all,"$ %Promise_reject%":"undefined"==typeof Promise?void 0:Promise.reject,"$ %Promise_resolve%":"undefined"==typeof Promise?void 0:Promise.resolve,"$ %Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"==typeof Set?void 0:Set,"$ %SetIteratorPrototype%":"undefined"!=typeof Set&&hasSymbols?getProto((new Set)[Symbol.iterator]()):void 0,"$ %SetPrototype%":"undefined"==typeof Set?void 0:Set.prototype,"$ %SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":hasSymbols?getProto(""[Symbol.iterator]()):void 0,"$ %StringPrototype%":String.prototype,"$ %Symbol%":hasSymbols?Symbol:void 0,"$ %SymbolPrototype%":hasSymbols?Symbol.prototype:void 0,"$ %SyntaxError%":SyntaxError,"$ %SyntaxErrorPrototype%":SyntaxError.prototype,"$ %ThrowTypeError%":ThrowTypeError,"$ %TypedArray%":TypedArray,"$ %TypedArrayPrototype%":TypedArray?TypedArray.prototype:void 0,"$ %TypeError%":$TypeError,"$ %TypeErrorPrototype%":$TypeError.prototype,"$ %Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"$ %Uint8ArrayPrototype%":"undefined"==typeof Uint8Array?void 0:Uint8Array.prototype,"$ %Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?void 0:Uint16Array.prototype,"$ %Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?void 0:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"$ %WeakMapPrototype%":"undefined"==typeof WeakMap?void 0:WeakMap.prototype,"$ %WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet,"$ %WeakSetPrototype%":"undefined"==typeof WeakSet?void 0:WeakSet.prototype},$replace=__webpack_require__(19).call(Function.call,String.prototype.replace),rePropName=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=function stringToPath(string){var result=[];return $replace(string,rePropName,(function(match,number,quote,subString){result[result.length]=quote?$replace(subString,reEscapeChar,"$1"):number||match})),result},getBaseIntrinsic=function getBaseIntrinsic(name,allowMissing){var key="$ "+name;if(!(key in INTRINSICS))throw new SyntaxError("intrinsic "+name+" does not exist!");if(void 0===INTRINSICS[key]&&!allowMissing)throw new $TypeError("intrinsic "+name+" exists, but is not available. Please file an issue!");return INTRINSICS[key]};module.exports=function GetIntrinsic(name,allowMissing){if(arguments.length>1&&"boolean"!=typeof allowMissing)throw new TypeError('"allowMissing" argument must be a boolean');var parts=stringToPath(name);if(0===parts.length)return getBaseIntrinsic(name,allowMissing);for(var value=getBaseIntrinsic("%"+parts[0]+"%",allowMissing),i=1;i1&&"boolean"!=typeof allowMissing)throw new TypeError('"allowMissing" argument must be a boolean');var parts=stringToPath(name);if(0===parts.length)return getBaseIntrinsic(name,allowMissing);for(var value=getBaseIntrinsic("%"+parts[0]+"%",allowMissing),i=1;i1&&"boolean"!=typeof allowMissing)throw new TypeError('"allowMissing" argument must be a boolean');var parts=stringToPath(name);if(0===parts.length)return getBaseIntrinsic(name,allowMissing);for(var value=getBaseIntrinsic("%"+parts[0]+"%",allowMissing),i=1;i1&&"boolean"!=typeof allowMissing)throw new TypeError('"allowMissing" argument must be a boolean');var parts=stringToPath(name);if(0===parts.length)return getBaseIntrinsic(name,allowMissing);for(var value=getBaseIntrinsic("%"+parts[0]+"%",allowMissing),i=1;i2?arguments[2]:[];if(!IsCallable(F))throw new $TypeError(inspect(F)+" is not a function");return F.apply(V,args)}},function(module,exports,__webpack_require__){"use strict";module.exports=__webpack_require__(245)},function(module,exports,__webpack_require__){var IndexedObject=__webpack_require__(116),requireObjectCoercible=__webpack_require__(53);module.exports=function(it){return IndexedObject(requireObjectCoercible(it))}},function(module,exports,__webpack_require__){var set,get,has,NATIVE_WEAK_MAP=__webpack_require__(275),global=__webpack_require__(4),isObject=__webpack_require__(9),createNonEnumerableProperty=__webpack_require__(45),objectHas=__webpack_require__(16),sharedKey=__webpack_require__(117),hiddenKeys=__webpack_require__(93),WeakMap=global.WeakMap;if(NATIVE_WEAK_MAP){var store=new WeakMap,wmget=store.get,wmhas=store.has,wmset=store.set;set=function(it,metadata){return wmset.call(store,it,metadata),metadata},get=function(it){return wmget.call(store,it)||{}},has=function(it){return wmhas.call(store,it)}}else{var STATE=sharedKey("state");hiddenKeys[STATE]=!0,set=function(it,metadata){return createNonEnumerableProperty(it,STATE,metadata),metadata},get=function(it){return objectHas(it,STATE)?it[STATE]:{}},has=function(it){return objectHas(it,STATE)}}module.exports={set:set,get:get,has:has,enforce:function(it){return has(it)?get(it):set(it,{})},getterFor:function(TYPE){return function(it){var state;if(!isObject(it)||(state=get(it)).type!==TYPE)throw TypeError("Incompatible receiver, "+TYPE+" required");return state}}}},function(module,exports,__webpack_require__){var bind=__webpack_require__(98),IndexedObject=__webpack_require__(116),toObject=__webpack_require__(26),toLength=__webpack_require__(33),arraySpeciesCreate=__webpack_require__(172),push=[].push,createMethod=function(TYPE){var IS_MAP=1==TYPE,IS_FILTER=2==TYPE,IS_SOME=3==TYPE,IS_EVERY=4==TYPE,IS_FIND_INDEX=6==TYPE,NO_HOLES=5==TYPE||IS_FIND_INDEX;return function($this,callbackfn,that,specificCreate){for(var value,result,O=toObject($this),self=IndexedObject(O),boundFunction=bind(callbackfn,that,3),length=toLength(self.length),index=0,create=specificCreate||arraySpeciesCreate,target=IS_MAP?create($this,length):IS_FILTER?create($this,0):void 0;length>index;index++)if((NO_HOLES||index in self)&&(result=boundFunction(value=self[index],index,O),TYPE))if(IS_MAP)target[index]=result;else if(result)switch(TYPE){case 3:return!0;case 5:return value;case 6:return index;case 2:push.call(target,value)}else if(IS_EVERY)return!1;return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:target}};module.exports={forEach:createMethod(0),map:createMethod(1),filter:createMethod(2),some:createMethod(3),every:createMethod(4),find:createMethod(5),findIndex:createMethod(6)}},function(module,exports,__webpack_require__){var $=__webpack_require__(2),DESCRIPTORS=__webpack_require__(13);$({target:"Object",stat:!0,forced:!DESCRIPTORS,sham:!DESCRIPTORS},{defineProperty:__webpack_require__(17).f})},function(module,exports,__webpack_require__){"use strict";module.exports=__webpack_require__(393)},function(module,exports,__webpack_require__){var defineProperty=__webpack_require__(17).f,has=__webpack_require__(16),TO_STRING_TAG=__webpack_require__(8)("toStringTag");module.exports=function(it,TAG,STATIC){it&&!has(it=STATIC?it:it.prototype,TO_STRING_TAG)&&defineProperty(it,TO_STRING_TAG,{configurable:!0,value:TAG})}},function(module,exports){module.exports=function(it){if("function"!=typeof it)throw TypeError(String(it)+" is not a function");return it}},function(module,exports){var isArray=Array.isArray;module.exports=isArray},function(module,exports){module.exports=function isObjectLike(value){return null!=value&&"object"==typeof value}},function(module,exports,__webpack_require__){var baseIsNative=__webpack_require__(627),getValue=__webpack_require__(630);module.exports=function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:void 0}},function(module,exports,__webpack_require__){"use strict";var MAX_SAFE_INTEGER=__webpack_require__(150),ToInteger=__webpack_require__(414);module.exports=function ToLength(argument){var len=ToInteger(argument);return len<=0?0:len>MAX_SAFE_INTEGER?MAX_SAFE_INTEGER:len}},function(module,exports,__webpack_require__){var path=__webpack_require__(167),global=__webpack_require__(4),aFunction=function(variable){return"function"==typeof variable?variable:void 0};module.exports=function(namespace,method){return arguments.length<2?aFunction(path[namespace])||aFunction(global[namespace]):path[namespace]&&path[namespace][method]||global[namespace]&&global[namespace][method]}},function(module,exports,__webpack_require__){var activeXDocument,anObject=__webpack_require__(14),defineProperties=__webpack_require__(280),enumBugKeys=__webpack_require__(170),hiddenKeys=__webpack_require__(93),html=__webpack_require__(281),documentCreateElement=__webpack_require__(163),sharedKey=__webpack_require__(117),IE_PROTO=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(content){return"