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QAArDC,EAAwBD,EAAgBf,eAA+C,IAA1BgB,OAA5J,EAAwMA,EAAsBgC,oBAAoC,IAAVnC,EAAmBA,EAAQM,EAAe6B,oBAAoC,IAAVpC,EAAmBA,EAA4D,QAAnDK,EAAwBE,EAAeI,cAA8C,IAA1BN,GAAyG,QAA5DC,EAAyBD,EAAsBjB,eAAgD,IAA3BkB,OAA9E,EAA2HA,EAAuB8B,oBAAmC,IAATrC,EAAkBA,EAAO,GACn4B,KAAMqC,GAAgB,GAAKA,GAAgB,GACzC,MAAM,IAAIxB,WAAW,oDAEvB,IAAIyB,GAAoBC,EAAAA,EAAAA,GAAQnE,GAChC,GAAIoE,MAAMF,GAAoB,OAAOG,IACrC,IACIC,EAAqBL,GADNM,EAAAA,EAAAA,IAAOxB,EAAAA,EAAAA,GAAa/C,IAEnCsE,GAAsB,IAAGA,GAAsB,GACnD,IAAIE,EAA8BN,EAAoBI,EACtD,OAAOzE,KAAKiE,KAAKU,EAA8B,GAAK,CACtD,C,kFCtBe,SAASC,EAAerE,GAErC,OADAlB,EAAAA,EAAAA,GAAa,EAAGC,WACTU,KAAKQ,MAAMD,EAAQsE,EAAAA,GAC5B,C,kFCDe,SAASC,EAAU1F,IAChCC,EAAAA,EAAAA,GAAa,EAAGC,WAChB,IACIyF,GADOxF,EAAAA,EAAAA,GAAOH,GACHsF,SAIf,OAHY,IAARK,IACFA,EAAM,GAEDA,CACT,C","sources":["webpack://@rocket.chat/livechat/./node_modules/date-fns/esm/getYear/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/esm/getISOWeeksInYear/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/esm/getISOWeek/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/esm/hoursToMilliseconds/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/esm/getISOWeekYear/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/esm/getWeek/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/esm/getMinutes/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/esm/getQuarter/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/esm/getMilliseconds/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/esm/hoursToSeconds/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/esm/getSeconds/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/esm/getWeekYear/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/esm/getMonth/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/esm/getWeeksInMonth/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/esm/getTime/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/esm/getUnixTime/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/esm/getOverlappingDaysInIntervals/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/esm/getWeekOfMonth/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/esm/hoursToMinutes/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/esm/getISODay/index.js"],"sourcesContent":["import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getYear\n * @category Year Helpers\n * @summary Get the year of the given date.\n *\n * @description\n * Get the year of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which year is 2 July 2014?\n * const result = getYear(new Date(2014, 6, 2))\n * //=> 2014\n */\nexport default function getYear(dirtyDate) {\n requiredArgs(1, arguments);\n return toDate(dirtyDate).getFullYear();\n}","import startOfISOWeekYear from \"../startOfISOWeekYear/index.js\";\nimport addWeeks from \"../addWeeks/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\n\n/**\n * @name getISOWeeksInYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the number of weeks in an ISO week-numbering year of the given date.\n *\n * @description\n * Get the number of weeks in an ISO week-numbering year of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the number of ISO weeks in a year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // How many weeks are in ISO week-numbering year 2015?\n * const result = getISOWeeksInYear(new Date(2015, 1, 11))\n * //=> 53\n */\nexport default function getISOWeeksInYear(dirtyDate) {\n requiredArgs(1, arguments);\n var thisYear = startOfISOWeekYear(dirtyDate);\n var nextYear = startOfISOWeekYear(addWeeks(thisYear, 60));\n var diff = nextYear.valueOf() - thisYear.valueOf();\n // Round the number of weeks 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);\n}","import toDate from \"../toDate/index.js\";\nimport startOfISOWeek from \"../startOfISOWeek/index.js\";\nimport startOfISOWeekYear from \"../startOfISOWeekYear/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\n\n/**\n * @name getISOWeek\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|Number} date - the given date\n * @returns {Number} the ISO week\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * const result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\nexport default function getISOWeek(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfISOWeek(date).getTime() - startOfISOWeekYear(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}","import requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { millisecondsInHour } from \"../constants/index.js\";\n/**\n * @name hoursToMilliseconds\n * @category Conversion Helpers\n * @summary Convert hours to milliseconds.\n *\n * @description\n * Convert a number of hours to a full number of milliseconds.\n *\n * @param {number} hours - number of hours to be converted\n *\n * @returns {number} the number of hours converted to milliseconds\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Convert 2 hours to milliseconds:\n * const result = hoursToMilliseconds(2)\n * //=> 7200000\n */\nexport default function hoursToMilliseconds(hours) {\n requiredArgs(1, arguments);\n return Math.floor(hours * millisecondsInHour);\n}","import toDate from \"../toDate/index.js\";\nimport startOfISOWeek from \"../startOfISOWeek/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getISOWeekYear\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|Number} date - the given date\n * @returns {Number} the ISO week-numbering year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * const result = getISOWeekYear(new Date(2005, 0, 2))\n * //=> 2004\n */\nexport default function getISOWeekYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\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 var fourthOfJanuaryOfThisYear = new Date(0);\n fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);\n var startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);\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}","import startOfWeek from \"../startOfWeek/index.js\";\nimport startOfWeekYear from \"../startOfWeekYear/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\n\n/**\n * @name getWeek\n * @category Week Helpers\n * @summary Get the local week index of the given date.\n *\n * @description\n * Get the local week index of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#Week_numbering\n *\n * @param {Date|Number} date - the given date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {1|2|3|4|5|6|7} [options.firstWeekContainsDate=1] - the day of January, which is always in the first week of the year\n * @returns {Number} the week\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005 with default options?\n * const result = getWeek(new Date(2005, 0, 2))\n * //=> 2\n *\n * // Which week of the local week numbering year is 2 January 2005,\n * // if Monday is the first day of the week,\n * // and the first week of the year always contains 4 January?\n * const result = getWeek(new Date(2005, 0, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> 53\n */\n\nexport default function getWeek(dirtyDate, options) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfWeek(date, options).getTime() - startOfWeekYear(date, options).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}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getMinutes\n * @category Minute Helpers\n * @summary Get the minutes of the given date.\n *\n * @description\n * Get the minutes of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the minutes\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Get the minutes of 29 February 2012 11:45:05:\n * const result = getMinutes(new Date(2012, 1, 29, 11, 45, 5))\n * //=> 45\n */\nexport default function getMinutes(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var minutes = date.getMinutes();\n return minutes;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getQuarter\n * @category Quarter Helpers\n * @summary Get the year quarter of the given date.\n *\n * @description\n * Get the year quarter of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the quarter\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which quarter is 2 July 2014?\n * const result = getQuarter(new Date(2014, 6, 2))\n * //=> 3\n */\nexport default function getQuarter(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var quarter = Math.floor(date.getMonth() / 3) + 1;\n return quarter;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getMilliseconds\n * @category Millisecond Helpers\n * @summary Get the milliseconds of the given date.\n *\n * @description\n * Get the milliseconds of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the milliseconds\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Get the milliseconds of 29 February 2012 11:45:05.123:\n * const result = getMilliseconds(new Date(2012, 1, 29, 11, 45, 5, 123))\n * //=> 123\n */\nexport default function getMilliseconds(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var milliseconds = date.getMilliseconds();\n return milliseconds;\n}","import requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { secondsInHour } from \"../constants/index.js\";\n/**\n * @name hoursToSeconds\n * @category Conversion Helpers\n * @summary Convert hours to seconds.\n *\n * @description\n * Convert a number of hours to a full number of seconds.\n *\n * @param {number} hours - number of hours to be converted\n *\n * @returns {number} the number of hours converted in seconds\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Convert 2 hours to seconds:\n * const result = hoursToSeconds(2)\n * //=> 7200\n */\nexport default function hoursToSeconds(hours) {\n requiredArgs(1, arguments);\n return Math.floor(hours * secondsInHour);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getSeconds\n * @category Second Helpers\n * @summary Get the seconds of the given date.\n *\n * @description\n * Get the seconds of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the seconds\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Get the seconds of 29 February 2012 11:45:05.123:\n * const result = getSeconds(new Date(2012, 1, 29, 11, 45, 5, 123))\n * //=> 5\n */\nexport default function getSeconds(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var seconds = date.getSeconds();\n return seconds;\n}","import startOfWeek from \"../startOfWeek/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getDefaultOptions } from \"../_lib/defaultOptions/index.js\";\n/**\n * @name getWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Get the local week-numbering year of the given date.\n *\n * @description\n * Get the local week-numbering year of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#Week_numbering\n *\n * @param {Date|Number} date - the given date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {1|2|3|4|5|6|7} [options.firstWeekContainsDate=1] - the day of January, which is always in the first week of the year\n * @returns {Number} the local week-numbering year\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n *\n * @example\n * // Which week numbering year is 26 December 2004 with the default settings?\n * const result = getWeekYear(new Date(2004, 11, 26))\n * //=> 2005\n *\n * @example\n * // Which week numbering year is 26 December 2004 if week starts on Saturday?\n * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })\n * //=> 2004\n *\n * @example\n * // Which week numbering year is 26 December 2004 if the first week contains 4 January?\n * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })\n * //=> 2004\n */\nexport default function getWeekYear(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\n var defaultOptions = getDefaultOptions();\n var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);\n\n // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n var firstWeekOfNextYear = new Date(0);\n firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setHours(0, 0, 0, 0);\n var startOfNextYear = startOfWeek(firstWeekOfNextYear, options);\n var firstWeekOfThisYear = new Date(0);\n firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setHours(0, 0, 0, 0);\n var startOfThisYear = startOfWeek(firstWeekOfThisYear, options);\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}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getMonth\n * @category Month Helpers\n * @summary Get the month of the given date.\n *\n * @description\n * Get the month of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which month is 29 February 2012?\n * const result = getMonth(new Date(2012, 1, 29))\n * //=> 1\n */\nexport default function getMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var month = date.getMonth();\n return month;\n}","import differenceInCalendarWeeks from \"../differenceInCalendarWeeks/index.js\";\nimport lastDayOfMonth from \"../lastDayOfMonth/index.js\";\nimport startOfMonth from \"../startOfMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getWeeksInMonth\n * @category Week Helpers\n * @summary Get the number of calendar weeks a month spans.\n *\n * @description\n * Get the number of calendar weeks the month in the given date spans.\n *\n * @param {Date|Number} date - the given date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Number} the number of calendar weeks\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n *\n * @example\n * // How many calendar weeks does February 2015 span?\n * const result = getWeeksInMonth(new Date(2015, 1, 8))\n * //=> 4\n *\n * @example\n * // If the week starts on Monday,\n * // how many calendar weeks does July 2017 span?\n * const result = getWeeksInMonth(new Date(2017, 6, 5), { weekStartsOn: 1 })\n * //=> 6\n */\nexport default function getWeeksInMonth(date, options) {\n requiredArgs(1, arguments);\n return differenceInCalendarWeeks(lastDayOfMonth(date), startOfMonth(date), options) + 1;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getTime\n * @category Timestamp Helpers\n * @summary Get the milliseconds timestamp of the given date.\n *\n * @description\n * Get the milliseconds timestamp of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the timestamp\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Get the timestamp of 29 February 2012 11:45:05.123:\n * const result = getTime(new Date(2012, 1, 29, 11, 45, 5, 123))\n * //=> 1330515905123\n */\nexport default function getTime(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var timestamp = date.getTime();\n return timestamp;\n}","import getTime from \"../getTime/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getUnixTime\n * @category Timestamp Helpers\n * @summary Get the seconds timestamp of the given date.\n *\n * @description\n * Get the seconds timestamp of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the timestamp\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Get the timestamp of 29 February 2012 11:45:05 CET:\n * const result = getUnixTime(new Date(2012, 1, 29, 11, 45, 5))\n * //=> 1330512305\n */\nexport default function getUnixTime(dirtyDate) {\n requiredArgs(1, arguments);\n return Math.floor(getTime(dirtyDate) / 1000);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_DAY = 24 * 60 * 60 * 1000;\n\n/**\n * @name getOverlappingDaysInIntervals\n * @category Interval Helpers\n * @summary Get the number of days that overlap in two time intervals\n *\n * @description\n * Get the number of days that overlap in two time intervals\n *\n * @param {Interval} intervalLeft - the first interval to compare. See [Interval]{@link docs/Interval}\n * @param {Interval} intervalRight - the second interval to compare. See [Interval]{@link docs/Interval}\n * @returns {Number} the number of days that overlap in two time intervals\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} The start of an interval cannot be after its end\n * @throws {RangeError} Date in interval cannot be `Invalid Date`\n *\n * @example\n * // For overlapping time intervals adds 1 for each started overlapping day:\n * getOverlappingDaysInIntervals(\n * { start: new Date(2014, 0, 10), end: new Date(2014, 0, 20) },\n * { start: new Date(2014, 0, 17), end: new Date(2014, 0, 21) }\n * )\n * //=> 3\n *\n * @example\n * // For non-overlapping time intervals returns 0:\n * getOverlappingDaysInIntervals(\n * { start: new Date(2014, 0, 10), end: new Date(2014, 0, 20) },\n * { start: new Date(2014, 0, 21), end: new Date(2014, 0, 22) }\n * )\n * //=> 0\n */\n\nexport default function getOverlappingDaysInIntervals(dirtyIntervalLeft, dirtyIntervalRight) {\n requiredArgs(2, arguments);\n var intervalLeft = dirtyIntervalLeft || {};\n var intervalRight = dirtyIntervalRight || {};\n var leftStartTime = toDate(intervalLeft.start).getTime();\n var leftEndTime = toDate(intervalLeft.end).getTime();\n var rightStartTime = toDate(intervalRight.start).getTime();\n var rightEndTime = toDate(intervalRight.end).getTime();\n\n // Throw an exception if start date is after end date or if any date is `Invalid Date`\n if (!(leftStartTime <= leftEndTime && rightStartTime <= rightEndTime)) {\n throw new RangeError('Invalid interval');\n }\n var isOverlapping = leftStartTime < rightEndTime && rightStartTime < leftEndTime;\n if (!isOverlapping) {\n return 0;\n }\n var overlapStartDate = rightStartTime < leftStartTime ? leftStartTime : rightStartTime;\n var overlapEndDate = rightEndTime > leftEndTime ? leftEndTime : rightEndTime;\n var differenceInMs = overlapEndDate - overlapStartDate;\n return Math.ceil(differenceInMs / MILLISECONDS_IN_DAY);\n}","import { getDefaultOptions } from \"../_lib/defaultOptions/index.js\";\nimport getDate from \"../getDate/index.js\";\nimport getDay from \"../getDay/index.js\";\nimport startOfMonth from \"../startOfMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n/**\n * @name getWeekOfMonth\n * @category Week Helpers\n * @summary Get the week of the month of the given date.\n *\n * @description\n * Get the week of the month of the given date.\n *\n * @param {Date|Number} date - the given date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Number} the week of month\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6 inclusively\n *\n * @example\n * // Which week of the month is 9 November 2017?\n * const result = getWeekOfMonth(new Date(2017, 10, 9))\n * //=> 2\n */\nexport default function getWeekOfMonth(date, options) {\n var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n requiredArgs(1, arguments);\n var defaultOptions = getDefaultOptions();\n var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n var currentDayOfMonth = getDate(date);\n if (isNaN(currentDayOfMonth)) return NaN;\n var startWeekDay = getDay(startOfMonth(date));\n var lastDayOfFirstWeek = weekStartsOn - startWeekDay;\n if (lastDayOfFirstWeek <= 0) lastDayOfFirstWeek += 7;\n var remainingDaysAfterFirstWeek = currentDayOfMonth - lastDayOfFirstWeek;\n return Math.ceil(remainingDaysAfterFirstWeek / 7) + 1;\n}","import requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { minutesInHour } from \"../constants/index.js\";\n/**\n * @name hoursToMinutes\n * @category Conversion Helpers\n * @summary Convert hours to minutes.\n *\n * @description\n * Convert a number of hours to a full number of minutes.\n *\n * @param {number} hours - number of hours to be converted\n *\n * @returns {number} the number of hours converted in minutes\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Convert 2 hours to minutes:\n * const result = hoursToMinutes(2)\n * //=> 120\n */\nexport default function hoursToMinutes(hours) {\n requiredArgs(1, arguments);\n return Math.floor(hours * minutesInHour);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getISODay\n * @category Weekday Helpers\n * @summary Get the day of the ISO week of the given date.\n *\n * @description\n * Get the day of the ISO week of the given date,\n * which is 7 for Sunday, 1 for Monday etc.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the day of ISO week\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which day of the ISO week is 26 February 2012?\n * const result = getISODay(new Date(2012, 1, 26))\n * //=> 7\n */\nexport default function getISODay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var day = date.getDay();\n if (day === 0) {\n day = 7;\n }\n return day;\n}"],"names":["getYear","dirtyDate","requiredArgs","arguments","toDate","getFullYear","MILLISECONDS_IN_WEEK","getISOWeeksInYear","thisYear","startOfISOWeekYear","diff","addWeeks","valueOf","Math","round","getISOWeek","date","startOfISOWeek","getTime","hoursToMilliseconds","hours","floor","millisecondsInHour","getISOWeekYear","year","fourthOfJanuaryOfNextYear","Date","setFullYear","setHours","startOfNextYear","fourthOfJanuaryOfThisYear","startOfThisYear","getWeek","options","startOfWeek","startOfWeekYear","getMinutes","getQuarter","getMonth","getMilliseconds","hoursToSeconds","secondsInHour","getSeconds","getWeekYear","_ref","_ref2","_ref3","_options$firstWeekCon","_options$locale","_options$locale$optio","_defaultOptions$local","_defaultOptions$local2","defaultOptions","getDefaultOptions","firstWeekContainsDate","toInteger","locale","RangeError","firstWeekOfNextYear","firstWeekOfThisYear","getWeeksInMonth","differenceInCalendarWeeks","lastDayOfMonth","startOfMonth","getUnixTime","MILLISECONDS_IN_DAY","getOverlappingDaysInIntervals","dirtyIntervalLeft","dirtyIntervalRight","intervalLeft","intervalRight","leftStartTime","start","leftEndTime","end","rightStartTime","rightEndTime","differenceInMs","ceil","getWeekOfMonth","_options$weekStartsOn","weekStartsOn","currentDayOfMonth","getDate","isNaN","NaN","lastDayOfFirstWeek","getDay","remainingDaysAfterFirstWeek","hoursToMinutes","minutesInHour","getISODay","day"],"sourceRoot":""}