UNPKG

cluedin-widget

Version:
1,603 lines (1,314 loc) • 488 kB
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[35],{ /***/ 1836: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return toDate; }); /** * @name toDate * @category Common Helpers * @summary Convert the given argument to an instance of Date. * * @description * Convert the given argument to an instance of Date. * * If the argument is an instance of Date, the function returns its clone. * * If the argument is a number, it is treated as a timestamp. * * If the argument is none of the above, the function returns Invalid Date. * * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`. * * @param {Date|Number} argument - the value to convert * @returns {Date} the parsed date in the local time zone * @throws {TypeError} 1 argument required * * @example * // Clone the date: * var result = toDate(new Date(2014, 1, 11, 11, 30, 30)) * //=> Tue Feb 11 2014 11:30:30 * * @example * // Convert the timestamp to date: * var result = toDate(1392098430000) * //=> Tue Feb 11 2014 11:30:30 */ function toDate(argument) { if (arguments.length < 1) { throw new TypeError( '1 argument required, but only ' + arguments.length + ' present' ) } var argStr = Object.prototype.toString.call(argument) // Clone the date if ( argument instanceof Date || (typeof argument === 'object' && argStr === '[object Date]') ) { // Prevent the date to lose the milliseconds when passed to new Date() in IE10 return new Date(argument.getTime()) } else if (typeof argument === 'number' || argStr === '[object Number]') { return new Date(argument) } else { if ( (typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined' ) { console.warn( "Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fpAk2" ) console.warn(new Error().stack) } return new Date(NaN) } } /***/ }), /***/ 1841: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return toInteger; }); function toInteger (dirtyNumber) { if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) { return NaN } var number = Number(dirtyNumber) if (isNaN(number)) { return number } return number < 0 ? Math.ceil(number) : Math.floor(number) } /***/ }), /***/ 1877: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return startOfUTCWeek; }); /* harmony import */ var _toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1841); /* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1836); // This function will be a part of public API when UTC function will be implemented. // See issue: https://github.com/date-fns/date-fns/issues/376 function startOfUTCWeek(dirtyDate, dirtyOptions) { if (arguments.length < 1) { throw new TypeError( '1 argument required, but only ' + arguments.length + ' present' ) } var options = dirtyOptions || {} var locale = options.locale var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : Object(_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(localeWeekStartsOn) var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : Object(_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(options.weekStartsOn) // Test if weekStartsOn is between 0 and 6 _and_ is not NaN if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) { throw new RangeError('weekStartsOn must be between 0 and 6 inclusively') } var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(dirtyDate) var day = date.getUTCDay() var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn date.setUTCDate(date.getUTCDate() - diff) date.setUTCHours(0, 0, 0, 0) return date } /***/ }), /***/ 1878: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return startOfUTCISOWeek; }); /* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1836); // This function will be a part of public API when UTC function will be implemented. // See issue: https://github.com/date-fns/date-fns/issues/376 function startOfUTCISOWeek(dirtyDate) { if (arguments.length < 1) { throw new TypeError( '1 argument required, but only ' + arguments.length + ' present' ) } var weekStartsOn = 1 var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(dirtyDate) var day = date.getUTCDay() var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn date.setUTCDate(date.getUTCDate() - diff) date.setUTCHours(0, 0, 0, 0) return date } /***/ }), /***/ 1879: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getTimezoneOffsetInMilliseconds; }); var MILLISECONDS_IN_MINUTE = 60000 /** * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds. * They usually appear for dates that denote time before the timezones were introduced * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891 * and GMT+01:00:00 after that date) * * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above, * which would lead to incorrect calculations. * * This function returns the timezone offset in milliseconds that takes seconds in account. */ function getTimezoneOffsetInMilliseconds (dirtyDate) { var date = new Date(dirtyDate.getTime()) var baseTimezoneOffset = date.getTimezoneOffset() date.setSeconds(0, 0) var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE return baseTimezoneOffset * MILLISECONDS_IN_MINUTE + millisecondsPartOfTimezoneOffset } /***/ }), /***/ 1902: /***/ (function(module, exports) { function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } module.exports = _inheritsLoose; /***/ }), /***/ 1903: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getUTCWeekYear; }); /* harmony import */ var _toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1841); /* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1836); /* harmony import */ var _startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1877); // This function will be a part of public API when UTC function will be implemented. // See issue: https://github.com/date-fns/date-fns/issues/376 function getUTCWeekYear (dirtyDate, dirtyOptions) { if (arguments.length < 1) { throw new TypeError('1 argument required, but only ' + arguments.length + ' present') } var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(dirtyDate, dirtyOptions) var year = date.getUTCFullYear() var options = dirtyOptions || {} var locale = options.locale var localeFirstWeekContainsDate = locale && locale.options && locale.options.firstWeekContainsDate var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : Object(_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(localeFirstWeekContainsDate) var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : Object(_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(options.firstWeekContainsDate) // Test if weekStartsOn is between 1 and 7 _and_ is not NaN if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) { throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively') } var firstWeekOfNextYear = new Date(0) firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate) firstWeekOfNextYear.setUTCHours(0, 0, 0, 0) var startOfNextYear = Object(_startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(firstWeekOfNextYear, dirtyOptions) var firstWeekOfThisYear = new Date(0) firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate) firstWeekOfThisYear.setUTCHours(0, 0, 0, 0) var startOfThisYear = Object(_startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(firstWeekOfThisYear, dirtyOptions) if (date.getTime() >= startOfNextYear.getTime()) { return year + 1 } else if (date.getTime() >= startOfThisYear.getTime()) { return year } else { return year - 1 } } /***/ }), /***/ 1904: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addMilliseconds; }); /* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1841); /* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1836); /** * @name addMilliseconds * @category Millisecond Helpers * @summary Add the specified number of milliseconds to the given date. * * @description * Add the specified number of milliseconds to the given date. * * ### v2.0.0 breaking changes: * * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes). * * @param {Date|Number} date - the date to be changed * @param {Number} amount - the amount of milliseconds to be added * @returns {Date} the new date with the milliseconds added * @throws {TypeError} 2 arguments required * * @example * // Add 750 milliseconds to 10 July 2014 12:45:30.000: * var result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750) * //=> Thu Jul 10 2014 12:45:30.750 */ function addMilliseconds(dirtyDate, dirtyAmount) { if (arguments.length < 2) { throw new TypeError( '2 arguments required, but only ' + arguments.length + ' present' ) } var timestamp = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(dirtyDate).getTime() var amount = Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(dirtyAmount) return new Date(timestamp + amount) } /***/ }), /***/ 1905: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return startOfDay; }); /* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1836); /** * @name startOfDay * @category Day Helpers * @summary Return the start of a day for the given date. * * @description * Return the start of a day for the given date. * The result will be in the local timezone. * * ### v2.0.0 breaking changes: * * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes). * * @param {Date|Number} date - the original date * @returns {Date} the start of a day * @throws {TypeError} 1 argument required * * @example * // The start of a day for 2 September 2014 11:55:00: * var result = startOfDay(new Date(2014, 8, 2, 11, 55, 0)) * //=> Tue Sep 02 2014 00:00:00 */ function startOfDay(dirtyDate) { if (arguments.length < 1) { throw new TypeError( '1 argument required, but only ' + arguments.length + ' present' ) } var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(dirtyDate) date.setHours(0, 0, 0, 0) return date } /***/ }), /***/ 1906: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addMonths; }); /* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1841); /* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1836); /* harmony import */ var _getDaysInMonth_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1949); /** * @name addMonths * @category Month Helpers * @summary Add the specified number of months to the given date. * * @description * Add the specified number of months to the given date. * * ### v2.0.0 breaking changes: * * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes). * * @param {Date|Number} date - the date to be changed * @param {Number} amount - the amount of months to be added * @returns {Date} the new date with the months added * @throws {TypeError} 2 arguments required * * @example * // Add 5 months to 1 September 2014: * var result = addMonths(new Date(2014, 8, 1), 5) * //=> Sun Feb 01 2015 00:00:00 */ function addMonths(dirtyDate, dirtyAmount) { if (arguments.length < 2) { throw new TypeError( '2 arguments required, but only ' + arguments.length + ' present' ) } var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(dirtyDate) var amount = Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(dirtyAmount) var desiredMonth = date.getMonth() + amount var dateWithDesiredMonth = new Date(0) dateWithDesiredMonth.setFullYear(date.getFullYear(), desiredMonth, 1) dateWithDesiredMonth.setHours(0, 0, 0, 0) var daysInMonth = Object(_getDaysInMonth_index_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(dateWithDesiredMonth) // Set the last day of the new month // if the original date was the last day of the longer month date.setMonth(desiredMonth, Math.min(daysInMonth, date.getDate())) return date } /***/ }), /***/ 1907: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addDays; }); /* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1841); /* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1836); /** * @name addDays * @category Day Helpers * @summary Add the specified number of days to the given date. * * @description * Add the specified number of days to the given date. * * ### v2.0.0 breaking changes: * * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes). * * @param {Date|Number} date - the date to be changed * @param {Number} amount - the amount of days to be added * @returns {Date} the new date with the days added * @throws {TypeError} 2 arguments required * * @example * // Add 10 days to 1 September 2014: * var result = addDays(new Date(2014, 8, 1), 10) * //=> Thu Sep 11 2014 00:00:00 */ function addDays(dirtyDate, dirtyAmount) { if (arguments.length < 2) { throw new TypeError( '2 arguments required, but only ' + arguments.length + ' present' ) } var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(dirtyDate) var amount = Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(dirtyAmount) date.setDate(date.getDate() + amount) return date } /***/ }), /***/ 1944: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export protectedTokens */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isProtectedToken; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return throwProtectedError; }); var protectedTokens = ['D', 'DD', 'YY', 'YYYY'] function isProtectedToken(token) { return protectedTokens.indexOf(token) !== -1 } function throwProtectedError(token) { throw new RangeError( '`options.awareOfUnicodeTokens` must be set to `true` to use `' + token + '` token; see: https://git.io/fxCyr' ) } /***/ }), /***/ 1945: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getUTCISOWeekYear; }); /* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1836); /* harmony import */ var _startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1878); // This function will be a part of public API when UTC function will be implemented. // See issue: https://github.com/date-fns/date-fns/issues/376 function getUTCISOWeekYear(dirtyDate) { if (arguments.length < 1) { throw new TypeError( '1 argument required, but only ' + arguments.length + ' present' ) } var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(dirtyDate) var year = date.getUTCFullYear() var fourthOfJanuaryOfNextYear = new Date(0) fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4) fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0) var startOfNextYear = Object(_startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(fourthOfJanuaryOfNextYear) var fourthOfJanuaryOfThisYear = new Date(0) fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4) fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0) var startOfThisYear = Object(_startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(fourthOfJanuaryOfThisYear) if (date.getTime() >= startOfNextYear.getTime()) { return year + 1 } else if (date.getTime() >= startOfThisYear.getTime()) { return year } else { return year - 1 } } /***/ }), /***/ 1946: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return subMilliseconds; }); /* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1841); /* harmony import */ var _addMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1904); /** * @name subMilliseconds * @category Millisecond Helpers * @summary Subtract the specified number of milliseconds from the given date. * * @description * Subtract the specified number of milliseconds from the given date. * * ### v2.0.0 breaking changes: * * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes). * * @param {Date|Number} date - the date to be changed * @param {Number} amount - the amount of milliseconds to be subtracted * @returns {Date} the new date with the milliseconds subtracted * @throws {TypeError} 2 arguments required * * @example * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000: * var result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750) * //=> Thu Jul 10 2014 12:45:29.250 */ function subMilliseconds(dirtyDate, dirtyAmount) { if (arguments.length < 2) { throw new TypeError( '2 arguments required, but only ' + arguments.length + ' present' ) } var amount = Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(dirtyAmount) return Object(_addMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(dirtyDate, -amount) } /***/ }), /***/ 1947: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isValid; }); /* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1836); /** * @name isValid * @category Common Helpers * @summary Is the given date valid? * * @description * Returns false if argument is Invalid Date and true otherwise. * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate} * Invalid Date is a Date, whose time value is NaN. * * Time value of Date: http://es5.github.io/#x15.9.1.1 * * ### v2.0.0 breaking changes: * * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes). * * - Now `isValid` doesn't throw an exception * if the first argument is not an instance of Date. * Instead, argument is converted beforehand using `toDate`. * * Examples: * * | `isValid` argument | Before v2.0.0 | v2.0.0 onward | * |---------------------------|---------------|---------------| * | `new Date()` | `true` | `true` | * | `new Date('2016-01-01')` | `true` | `true` | * | `new Date('')` | `false` | `false` | * | `new Date(1488370835081)` | `true` | `true` | * | `new Date(NaN)` | `false` | `false` | * | `'2016-01-01'` | `TypeError` | `true` | * | `''` | `TypeError` | `false` | * | `1488370835081` | `TypeError` | `true` | * | `NaN` | `TypeError` | `false` | * * We introduce this change to make *date-fns* consistent with ECMAScript behavior * that try to coerce arguments to the expected type * (which is also the case with other *date-fns* functions). * * @param {*} date - the date to check * @returns {Boolean} the date is valid * @throws {TypeError} 1 argument required * * @example * // For the valid date: * var result = isValid(new Date(2014, 1, 31)) * //=> true * * @example * // For the value, convertable into a date: * var result = isValid(1393804800000) * //=> true * * @example * // For the invalid date: * var result = isValid(new Date('')) * //=> false */ function isValid(dirtyDate) { if (arguments.length < 1) { throw new TypeError( '1 argument required, but only ' + arguments.length + ' present' ) } var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(dirtyDate) return !isNaN(date) } /***/ }), /***/ 1948: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return startOfWeek; }); /* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1841); /* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1836); /** * @name startOfWeek * @category Week Helpers * @summary Return the start of a week for the given date. * * @description * Return the start of a week for the given date. * The result will be in the local timezone. * * ### v2.0.0 breaking changes: * * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes). * * @param {Date|Number} date - the original date * @param {Object} [options] - an object with options. * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} * @returns {Date} the start of a week * @throws {TypeError} 1 argument required * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6 * * @example * // The start of a week for 2 September 2014 11:55:00: * var result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0)) * //=> Sun Aug 31 2014 00:00:00 * * @example * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00: * var result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 }) * //=> Mon Sep 01 2014 00:00:00 */ function startOfWeek(dirtyDate, dirtyOptions) { if (arguments.length < 1) { throw new TypeError( '1 argument required, but only ' + arguments.length + ' present' ) } var options = dirtyOptions || {} var locale = options.locale var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(localeWeekStartsOn) var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(options.weekStartsOn) // Test if weekStartsOn is between 0 and 6 _and_ is not NaN if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) { throw new RangeError('weekStartsOn must be between 0 and 6 inclusively') } var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(dirtyDate) var day = date.getDay() var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn date.setDate(date.getDate() - diff) date.setHours(0, 0, 0, 0) return date } /***/ }), /***/ 1949: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getDaysInMonth; }); /* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1836); /** * @name getDaysInMonth * @category Month Helpers * @summary Get the number of days in a month of the given date. * * @description * Get the number of days in a month of the given date. * * ### v2.0.0 breaking changes: * * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes). * * @param {Date|Number} date - the given date * @returns {Number} the number of days in a month * @throws {TypeError} 1 argument required * * @example * // How many days are in February 2000? * var result = getDaysInMonth(new Date(2000, 1)) * //=> 29 */ function getDaysInMonth(dirtyDate) { if (arguments.length < 1) { throw new TypeError( '1 argument required, but only ' + arguments.length + ' present' ) } var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(dirtyDate) var year = date.getFullYear() var monthIndex = date.getMonth() var lastDayOfMonth = new Date(0) lastDayOfMonth.setFullYear(year, monthIndex + 1, 0) lastDayOfMonth.setHours(0, 0, 0, 0) return lastDayOfMonth.getDate() } /***/ }), /***/ 1950: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addWeeks; }); /* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1841); /* harmony import */ var _addDays_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1907); /** * @name addWeeks * @category Week Helpers * @summary Add the specified number of weeks to the given date. * * @description * Add the specified number of week to the given date. * * ### v2.0.0 breaking changes: * * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes). * * @param {Date|Number} date - the date to be changed * @param {Number} amount - the amount of weeks to be added * @returns {Date} the new date with the weeks added * @throws {TypeError} 2 arguments required * * @example * // Add 4 weeks to 1 September 2014: * var result = addWeeks(new Date(2014, 8, 1), 4) * //=> Mon Sep 29 2014 00:00:00 */ function addWeeks(dirtyDate, dirtyAmount) { if (arguments.length < 2) { throw new TypeError( '2 arguments required, but only ' + arguments.length + ' present' ) } var amount = Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(dirtyAmount) var days = amount * 7 return Object(_addDays_index_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(dirtyDate, days) } /***/ }), /***/ 1951: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addYears; }); /* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1841); /* harmony import */ var _addMonths_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1906); /** * @name addYears * @category Year Helpers * @summary Add the specified number of years to the given date. * * @description * Add the specified number of years to the given date. * * ### v2.0.0 breaking changes: * * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes). * * @param {Date|Number} date - the date to be changed * @param {Number} amount - the amount of years to be added * @returns {Date} the new date with the years added * @throws {TypeError} 2 arguments required * * @example * // Add 5 years to 1 September 2014: * var result = addYears(new Date(2014, 8, 1), 5) * //=> Sun Sep 01 2019 00:00:00 */ function addYears(dirtyDate, dirtyAmount) { if (arguments.length < 2) { throw new TypeError( '2 arguments required, but only ' + arguments.length + ' present' ) } var amount = Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(dirtyAmount) return Object(_addMonths_index_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(dirtyDate, amount * 12) } /***/ }), /***/ 1984: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // CONCATENATED MODULE: ./node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js var formatDistanceLocale = { 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' } } function formatDistance (token, count, options) { options = options || {} var result if (typeof formatDistanceLocale[token] === 'string') { result = formatDistanceLocale[token] } else if (count === 1) { result = formatDistanceLocale[token].one } else { result = formatDistanceLocale[token].other.replace('{{count}}', count) } if (options.addSuffix) { if (options.comparison > 0) { return 'in ' + result } else { return result + ' ago' } } return result } // CONCATENATED MODULE: ./node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js function buildFormatLongFn (args) { return function (dirtyOptions) { var options = dirtyOptions || {} var width = options.width ? String(options.width) : args.defaultWidth var format = args.formats[width] || args.formats[args.defaultWidth] return format } } // CONCATENATED MODULE: ./node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js var dateFormats = { full: 'EEEE, MMMM do, y', long: 'MMMM do, y', medium: 'MMM d, y', short: 'MM/dd/yyyy' } var timeFormats = { full: 'h:mm:ss a zzzz', long: 'h:mm:ss a z', medium: 'h:mm:ss a', short: 'h:mm a' } var dateTimeFormats = { full: "{{date}} 'at' {{time}}", long: "{{date}} 'at' {{time}}", medium: '{{date}}, {{time}}', short: '{{date}}, {{time}}' } var formatLong = { date: buildFormatLongFn({ formats: dateFormats, defaultWidth: 'full' }), time: buildFormatLongFn({ formats: timeFormats, defaultWidth: 'full' }), dateTime: buildFormatLongFn({ formats: dateTimeFormats, defaultWidth: 'full' }) } /* harmony default export */ var _lib_formatLong = (formatLong); // CONCATENATED MODULE: ./node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js var formatRelativeLocale = { lastWeek: "'last' eeee 'at' p", yesterday: "'yesterday at' p", today: "'today at' p", tomorrow: "'tomorrow at' p", nextWeek: "eeee 'at' p", other: 'P' } function formatRelative (token, date, baseDate, options) { return formatRelativeLocale[token] } // CONCATENATED MODULE: ./node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js function buildLocalizeFn (args) { return function (dirtyIndex, dirtyOptions) { var options = dirtyOptions || {} var width = options.width ? String(options.width) : args.defaultWidth var context = options.context ? String(options.context) : 'standalone' var valuesArray if (context === 'formatting' && args.formattingValues) { valuesArray = args.formattingValues[width] || args.formattingValues[args.defaultFormattingWidth] } else { valuesArray = args.values[width] || args.values[args.defaultWidth] } var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex return valuesArray[index] } } // CONCATENATED MODULE: ./node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js var eraValues = { narrow: ['B', 'A'], abbreviated: ['BC', 'AD'], wide: ['Before Christ', 'Anno Domini'] } var quarterValues = { narrow: ['1', '2', '3', '4'], abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'], wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter'] } // Note: in English, the names of days of the week and months are capitalized. // If you are making a new locale based on this one, check if the same is true for the language you're working on. // Generally, formatted dates should look like they are in the middle of a sentence, // e.g. in Spanish language the weekdays and months should be in the lowercase. var monthValues = { narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'], abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] } var dayValues = { narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'], short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'] } var dayPeriodValues = { narrow: { am: 'a', pm: 'p', midnight: 'mi', noon: 'n', morning: 'morning', afternoon: 'afternoon', evening: 'evening', night: 'night' }, abbreviated: { am: 'AM', pm: 'PM', midnight: 'midnight', noon: 'noon', morning: 'morning', afternoon: 'afternoon', evening: 'evening', night: 'night' }, wide: { am: 'a.m.', pm: 'p.m.', midnight: 'midnight', noon: 'noon', morning: 'morning', afternoon: 'afternoon', evening: 'evening', night: 'night' } } var formattingDayPeriodValues = { narrow: { am: 'a', pm: 'p', midnight: 'mi', noon: 'n', morning: 'in the morning', afternoon: 'in the afternoon', evening: 'in the evening', night: 'at night' }, abbreviated: { am: 'AM', pm: 'PM', midnight: 'midnight', noon: 'noon', morning: 'in the morning', afternoon: 'in the afternoon', evening: 'in the evening', night: 'at night' }, wide: { am: 'a.m.', pm: 'p.m.', midnight: 'midnight', noon: 'noon', morning: 'in the morning', afternoon: 'in the afternoon', evening: 'in the evening', night: 'at night' } } function ordinalNumber (dirtyNumber, dirtyOptions) { var number = Number(dirtyNumber) // If ordinal numbers depend on context, for example, // if they are different for different grammatical genders, // use `options.unit`: // // var options = dirtyOptions || {} // var unit = String(options.unit) // // where `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear', // 'day', 'hour', 'minute', 'second' var rem100 = number % 100 if (rem100 > 20 || rem100 < 10) { switch (rem100 % 10) { case 1: return number + 'st' case 2: return number + 'nd' case 3: return number + 'rd' } } return number + 'th' } var localize = { ordinalNumber: ordinalNumber, era: buildLocalizeFn({ values: eraValues, defaultWidth: 'wide' }), quarter: buildLocalizeFn({ values: quarterValues, defaultWidth: 'wide', argumentCallback: function (quarter) { return Number(quarter) - 1 } }), month: buildLocalizeFn({ values: monthValues, defaultWidth: 'wide' }), day: buildLocalizeFn({ values: dayValues, defaultWidth: 'wide' }), dayPeriod: buildLocalizeFn({ values: dayPeriodValues, defaultWidth: 'wide', formattingValues: formattingDayPeriodValues, defaultFormattingWidth: 'wide' }) } /* harmony default export */ var _lib_localize = (localize); // CONCATENATED MODULE: ./node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js function buildMatchPatternFn (args) { return function (dirtyString, dirtyOptions) { var string = String(dirtyString) var options = dirtyOptions || {} var matchResult = string.match(args.matchPattern) if (!matchResult) { return null } var matchedString = matchResult[0] var parseResult = string.match(args.parsePattern) if (!parseResult) { return null } var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0] value = options.valueCallback ? options.valueCallback(value) : value return { value: value, rest: string.slice(matchedString.length) } } } // CONCATENATED MODULE: ./node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js function buildMatchFn (args) { return function (dirtyString, dirtyOptions) { var string = String(dirtyString) var options = dirtyOptions || {} var width = options.width var matchPattern = (width && args.matchPatterns[width]) || args.matchPatterns[args.defaultMatchWidth] var matchResult = string.match(matchPattern) if (!matchResult) { return null } var matchedString = matchResult[0] var parsePatterns = (width && args.parsePatterns[width]) || args.parsePatterns[args.defaultParseWidth] var value if (Object.prototype.toString.call(parsePatterns) === '[object Array]') { value = parsePatterns.findIndex(function (pattern) { return pattern.test(string) }) } else { value = findKey(parsePatterns, function (pattern) { return pattern.test(string) }) } value = args.valueCallback ? args.valueCallback(value) : value value = options.valueCallback ? options.valueCallback(value) : value return { value: value, rest: string.slice(matchedString.length) } } } function findKey (object, predicate) { for (var key in object) { if (object.hasOwnProperty(key) && predicate(object[key])) { return key } } } // CONCATENATED MODULE: ./node_modules/date-fns/esm/locale/en-US/_lib/match/index.js var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i var parseOrdinalNumberPattern = /\d+/i var matchEraPatterns = { narrow: /^(b|a)/i, abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i, wide: /^(before christ|before common era|anno domini|common era)/i } var parseEraPatterns = { any: [/^b/i, /^(a|c)/i] } var matchQuarterPatterns = { narrow: /^[1234]/i, abbreviated: /^q[1234]/i, wide: /^[1234](th|st|nd|rd)? quarter/i } var parseQuarterPatterns = { any: [/1/i, /2/i, /3/i, /4/i] } var matchMonthPatterns = { narrow: /^[jfmasond]/i, abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i, wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i } var parseMonthPatterns = { narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i], any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i] } var matchDayPatterns = { narrow: /^[smtwf]/i, short: /^(su|mo|tu|we|th|fr|sa)/i, abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i, wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i } var parseDayPatterns = { narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i], any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i] } var matchDayPeriodPatterns = { narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i, any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i } var parseDayPeriodPatterns = { any: { am: /^a/i, pm: /^p/i, midnight: /^mi/i, noon: /^no/i, morning: /morning/i, afternoon: /afternoon/i, evening: /evening/i, night: /night/i } } var match = { ordinalNumber: buildMatchPatternFn({ matchPattern: matchOrdinalNumberPattern, parsePattern: parseOrdinalNumberPattern, valueCallback: function (value) { return parseInt(value, 10) } }), era: buildMatchFn({ matchPatterns: matchEraPatterns, defaultMatchWidth: 'wide', parsePatterns: parseEraPatterns, defaultParseWidth: 'any' }), quarter: buildMatchFn({ matchPatterns: matchQuarterPatterns, defaultMatchWidth: 'wide', parsePatterns: parseQuarterPatterns, defaultParseWidth: 'any', valueCallback: function (index) { return index + 1 } }), month: buildMatchFn({ matchPatterns: matchMonthPatterns, defaultMatchWidth: 'wide', parsePatterns: parseMonthPatterns, defaultParseWidth: 'any' }), day: buildMatchFn({ matchPatterns: matchDayPatterns, defaultMatchWidth: 'wide', parsePatterns: parseDayPatterns, defaultParseWidth: 'any' }), dayPeriod: buildMatchFn({ matchPatterns: matchDayPeriodPatterns, defaultMatchWidth: 'any', parsePatterns: parseDayPeriodPatterns, defaultParseWidth: 'any' }) } /* harmony default export */ var _lib_match = (match); // CONCATENATED MODULE: ./node_modules/date-fns/esm/locale/en-US/index.js /** * @type {Locale} * @category Locales * @summary English locale (United States). * @language English * @iso-639-2 eng * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp} * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss} */ var locale = { formatDistance: formatDistance, formatLong: _lib_formatLong, formatRelative: formatRelative, localize: _lib_localize, match: _lib_match, options: { weekStartsOn: 0 /* Sunday */, firstWeekContainsDate: 1 } } /* harmony default export */ var en_US = __webpack_exports__["a"] = (locale); /***/ }), /***/ 1985: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXTERNAL MODULE: ./node_modules/date-fns/esm/toDate/index.js var toDate = __webpack_require__(1836); // EXTERNAL MODULE: ./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js var startOfUTCWeek = __webpack_require__(1877); // EXTERNAL MODULE: ./node_modules/date-fns/esm/_lib/toInteger/index.js var toInteger = __webpack_require__(1841); // EXTERNAL MODULE: ./node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js var getUTCWeekYear = __webpack_require__(1903); // CONCATENATED MODULE: ./node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js // This function will be a part of public API when UTC function will be implemented. // See issue: https://github.com/date-fns/date-fns/issues/376 function startOfUTCWeekYear (dirtyDate, dirtyOptions) { if (arguments.length < 1) { throw new TypeError('1 argument required, but only ' + arguments.length + ' present') } var options = dirtyOptions || {} var locale = options.locale var localeFirstWeekContainsDate = locale && locale.options && locale.options.firstWeekContainsDate var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : Object(toInteger["a" /* default */])(localeFirstWeekContainsDate) var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : Object(toInteger["a" /* default */])(options.firstWeekContainsDate) var year = Object(getUTCWeekYear["a" /* default */])(dirtyDate, dirtyOptions) var firstWeek = new Date(0) firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate) firstWeek.setUTCHours(0, 0, 0, 0) var date = Object(startOfUTCWeek["a" /* default */])(firstWeek, dirtyOptions) return date } // CONCATENATED MODULE: ./node_modules/date-fns/esm/_lib/getUTCWeek/index.js /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getUTCWeek; }); var MILLISECONDS_IN_WEEK = 604800000 // This function will be a part of public API when UTC function will be implemented. // See issue: https://github.com/date-fns/date-fns/issues/376 function getUTCWeek(dirtyDate, options) { if (arguments.length < 1) { throw new TypeError( '1 argument required, but only ' + arguments.length + ' present' ) } var date = Object(toDate["a" /* default */])(dirtyDate) var diff = Object(startOfUTCWeek["a" /* default */])(date, options).getTime() - startOfUTCWeekYear(date, options).getTime() // Round the number of days to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) return Math.round(diff / MILLISECONDS_IN_WEEK) + 1 } /***/ }), /***/ 1986: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXTERNAL MODULE: ./node_modules/date-fns/esm/toDate/index.js var toDate = __webpack_require__(1836); // EXTERNAL MODULE: ./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js var startOfUTCISOWeek = __webpack_require__(1878); // EXTERNAL MODULE: ./node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js var getUTCISOWeekYear = __webpack_require__(1945); // CONCATENATED MODULE: ./node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js // This function will be a part of public API when UTC function will be implemented. // See issue: https://github.com/date-fns/date-fns/issues/376 function startOfUTCISOWeekYear(dirtyDate) { if (arguments.length < 1) { throw new TypeError( '1 argument required, but only ' + arguments.length + ' present' ) } var year = Object(getUTCISOWeekYear["a" /* default */])(dirtyDate) var fourthOfJanuary = new Date(0) fourthOfJanuary.setUTCFullYear(year, 0, 4) fourthOfJanuary.setUTCHours(0, 0, 0, 0) var date = Object(startOfUTCISOWeek["a" /* default */])(fourthOfJanuary) return date } // CONCATENATED MODULE: ./node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getUTCISOWeek; }); var MILLISECONDS_IN_WEEK = 604800000 // This function will be a part of public API when UTC function will be implemented. // See issue: https://github.com/date-fns/date-fns/issues/376 function getUTCISOWeek(dirtyDate) { if (arguments.length < 1) { throw new TypeError( '1 argument required, but only ' + arguments.length + ' present' ) } var date = Object(toDate["a" /* default */])(dirtyDate) var diff = Object(startOfUTCISOWeek["a" /* default */])(date).getTime() - startOfUTCISOWeekYear(date).getTime() // Round the number of days to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) return Math.round(diff / MILLISECONDS_IN_WEEK) + 1 } /***/ }), /***/ 2065: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global) {/* unused harmony export registerLocale */ /* unused harmony export setDefaultLocale */ /* unused harmony export getDefaultLocale */ /* unused harmony export CalendarContainer */ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPAC