├── .eslintignore ├── .eslintrc.json ├── .gitignore ├── README.md ├── dist ├── images │ └── logo.png ├── index.html ├── main.js └── style.css ├── package-lock.json ├── package.json ├── src ├── index.js └── modules │ ├── Project.js │ ├── Storage.js │ ├── Task.js │ ├── TodoList.js │ └── UI.js └── webpack.config.js /.eslintignore: -------------------------------------------------------------------------------- 1 | /dist/main.js 2 | /node_modules -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["airbnb", "prettier"], 3 | "plugins": ["prettier"], 4 | "env": { 5 | "browser": true 6 | }, 7 | "rules": { 8 | "no-alert": "off", 9 | "prettier/prettier": [ 10 | "error", 11 | { 12 | "singleQuote": true, 13 | "semi": false, 14 | "printWidth": 80, 15 | "tabWidth": 2, 16 | "endOfLine": "auto" 17 | } 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Todo List 2 | 3 | Todo list app created with HTML, CSS and JS. 4 | 5 | [Live Demo](https://michalosman.github.io/todo-list/) :point_left: 6 | -------------------------------------------------------------------------------- /dist/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michalosman/todo-list/c640a07cd5a8a0745f720016c1c4cae05ed18efd/dist/images/logo.png -------------------------------------------------------------------------------- /dist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Todo List 7 | 8 | 9 | 10 | 14 | 18 | 19 | 20 | 21 |
22 | 26 | 29 |
30 |
31 | 76 | 77 |
78 |
79 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /dist/main.js: -------------------------------------------------------------------------------- 1 | /* 2 | * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). 3 | * This devtool is neither made for production nor for readable output files. 4 | * It uses "eval()" calls to create a separate source file in the browser devtools. 5 | * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) 6 | * or disable the default devtool with "devtool: false". 7 | * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). 8 | */ 9 | /******/ (() => { // webpackBootstrap 10 | /******/ "use strict"; 11 | /******/ var __webpack_modules__ = ({ 12 | 13 | /***/ "./node_modules/date-fns/esm/_lib/addLeadingZeros/index.js": 14 | /*!*****************************************************************!*\ 15 | !*** ./node_modules/date-fns/esm/_lib/addLeadingZeros/index.js ***! 16 | \*****************************************************************/ 17 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 18 | 19 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ addLeadingZeros\n/* harmony export */ });\nfunction addLeadingZeros(number, targetLength) {\n var sign = number < 0 ? '-' : '';\n var output = Math.abs(number).toString();\n\n while (output.length < targetLength) {\n output = '0' + output;\n }\n\n return sign + output;\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/_lib/addLeadingZeros/index.js?"); 20 | 21 | /***/ }), 22 | 23 | /***/ "./node_modules/date-fns/esm/_lib/format/formatters/index.js": 24 | /*!*******************************************************************!*\ 25 | !*** ./node_modules/date-fns/esm/_lib/format/formatters/index.js ***! 26 | \*******************************************************************/ 27 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 28 | 29 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\n/* harmony import */ var _lightFormatters_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../lightFormatters/index.js */ \"./node_modules/date-fns/esm/_lib/format/lightFormatters/index.js\");\n/* harmony import */ var _lib_getUTCDayOfYear_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../_lib/getUTCDayOfYear/index.js */ \"./node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js\");\n/* harmony import */ var _lib_getUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../_lib/getUTCISOWeek/index.js */ \"./node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js\");\n/* harmony import */ var _lib_getUTCISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../_lib/getUTCISOWeekYear/index.js */ \"./node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js\");\n/* harmony import */ var _lib_getUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../_lib/getUTCWeek/index.js */ \"./node_modules/date-fns/esm/_lib/getUTCWeek/index.js\");\n/* harmony import */ var _lib_getUTCWeekYear_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../_lib/getUTCWeekYear/index.js */ \"./node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js\");\n/* harmony import */ var _addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../addLeadingZeros/index.js */ \"./node_modules/date-fns/esm/_lib/addLeadingZeros/index.js\");\n\n\n\n\n\n\n\nvar dayPeriodEnum = {\n am: 'am',\n pm: 'pm',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n /*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\n};\nvar formatters = {\n // Era\n G: function (date, token, localize) {\n var era = date.getUTCFullYear() > 0 ? 1 : 0;\n\n switch (token) {\n // AD, BC\n case 'G':\n case 'GG':\n case 'GGG':\n return localize.era(era, {\n width: 'abbreviated'\n });\n // A, B\n\n case 'GGGGG':\n return localize.era(era, {\n width: 'narrow'\n });\n // Anno Domini, Before Christ\n\n case 'GGGG':\n default:\n return localize.era(era, {\n width: 'wide'\n });\n }\n },\n // Year\n y: function (date, token, localize) {\n // Ordinal number\n if (token === 'yo') {\n var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, {\n unit: 'year'\n });\n }\n\n return _lightFormatters_index_js__WEBPACK_IMPORTED_MODULE_0__.default.y(date, token);\n },\n // Local week-numbering year\n Y: function (date, token, localize, options) {\n var signedWeekYear = (0,_lib_getUTCWeekYear_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(date, options); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear; // Two digit year\n\n if (token === 'YY') {\n var twoDigitYear = weekYear % 100;\n return (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(twoDigitYear, 2);\n } // Ordinal number\n\n\n if (token === 'Yo') {\n return localize.ordinalNumber(weekYear, {\n unit: 'year'\n });\n } // Padding\n\n\n return (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(weekYear, token.length);\n },\n // ISO week-numbering year\n R: function (date, token) {\n var isoWeekYear = (0,_lib_getUTCISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__.default)(date); // Padding\n\n return (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(isoWeekYear, token.length);\n },\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function (date, token) {\n var year = date.getUTCFullYear();\n return (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(year, token.length);\n },\n // Quarter\n Q: function (date, token, localize) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n\n switch (token) {\n // 1, 2, 3, 4\n case 'Q':\n return String(quarter);\n // 01, 02, 03, 04\n\n case 'QQ':\n return (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n\n case 'Qo':\n return localize.ordinalNumber(quarter, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'QQQ':\n return localize.quarter(quarter, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'QQQQQ':\n return localize.quarter(quarter, {\n width: 'narrow',\n context: 'formatting'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'QQQQ':\n default:\n return localize.quarter(quarter, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone quarter\n q: function (date, token, localize) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n\n switch (token) {\n // 1, 2, 3, 4\n case 'q':\n return String(quarter);\n // 01, 02, 03, 04\n\n case 'qq':\n return (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n\n case 'qo':\n return localize.ordinalNumber(quarter, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'qqq':\n return localize.quarter(quarter, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'qqqqq':\n return localize.quarter(quarter, {\n width: 'narrow',\n context: 'standalone'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'qqqq':\n default:\n return localize.quarter(quarter, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // Month\n M: function (date, token, localize) {\n var month = date.getUTCMonth();\n\n switch (token) {\n case 'M':\n case 'MM':\n return _lightFormatters_index_js__WEBPACK_IMPORTED_MODULE_0__.default.M(date, token);\n // 1st, 2nd, ..., 12th\n\n case 'Mo':\n return localize.ordinalNumber(month + 1, {\n unit: 'month'\n });\n // Jan, Feb, ..., Dec\n\n case 'MMM':\n return localize.month(month, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // J, F, ..., D\n\n case 'MMMMM':\n return localize.month(month, {\n width: 'narrow',\n context: 'formatting'\n });\n // January, February, ..., December\n\n case 'MMMM':\n default:\n return localize.month(month, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone month\n L: function (date, token, localize) {\n var month = date.getUTCMonth();\n\n switch (token) {\n // 1, 2, ..., 12\n case 'L':\n return String(month + 1);\n // 01, 02, ..., 12\n\n case 'LL':\n return (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(month + 1, 2);\n // 1st, 2nd, ..., 12th\n\n case 'Lo':\n return localize.ordinalNumber(month + 1, {\n unit: 'month'\n });\n // Jan, Feb, ..., Dec\n\n case 'LLL':\n return localize.month(month, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // J, F, ..., D\n\n case 'LLLLL':\n return localize.month(month, {\n width: 'narrow',\n context: 'standalone'\n });\n // January, February, ..., December\n\n case 'LLLL':\n default:\n return localize.month(month, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // Local week of year\n w: function (date, token, localize, options) {\n var week = (0,_lib_getUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_4__.default)(date, options);\n\n if (token === 'wo') {\n return localize.ordinalNumber(week, {\n unit: 'week'\n });\n }\n\n return (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(week, token.length);\n },\n // ISO week of year\n I: function (date, token, localize) {\n var isoWeek = (0,_lib_getUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_5__.default)(date);\n\n if (token === 'Io') {\n return localize.ordinalNumber(isoWeek, {\n unit: 'week'\n });\n }\n\n return (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(isoWeek, token.length);\n },\n // Day of the month\n d: function (date, token, localize) {\n if (token === 'do') {\n return localize.ordinalNumber(date.getUTCDate(), {\n unit: 'date'\n });\n }\n\n return _lightFormatters_index_js__WEBPACK_IMPORTED_MODULE_0__.default.d(date, token);\n },\n // Day of year\n D: function (date, token, localize) {\n var dayOfYear = (0,_lib_getUTCDayOfYear_index_js__WEBPACK_IMPORTED_MODULE_6__.default)(date);\n\n if (token === 'Do') {\n return localize.ordinalNumber(dayOfYear, {\n unit: 'dayOfYear'\n });\n }\n\n return (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(dayOfYear, token.length);\n },\n // Day of week\n E: function (date, token, localize) {\n var dayOfWeek = date.getUTCDay();\n\n switch (token) {\n // Tue\n case 'E':\n case 'EE':\n case 'EEE':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'EEEEE':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'EEEEEE':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'EEEE':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Local day of week\n e: function (date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case 'e':\n return String(localDayOfWeek);\n // Padded numerical value\n\n case 'ee':\n return (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n\n case 'eo':\n return localize.ordinalNumber(localDayOfWeek, {\n unit: 'day'\n });\n\n case 'eee':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'eeeee':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'eeeeee':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'eeee':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone local day of week\n c: function (date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n\n switch (token) {\n // Numerical value (same as in `e`)\n case 'c':\n return String(localDayOfWeek);\n // Padded numerical value\n\n case 'cc':\n return (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n\n case 'co':\n return localize.ordinalNumber(localDayOfWeek, {\n unit: 'day'\n });\n\n case 'ccc':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // T\n\n case 'ccccc':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'standalone'\n });\n // Tu\n\n case 'cccccc':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'standalone'\n });\n // Tuesday\n\n case 'cccc':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // ISO day of week\n i: function (date, token, localize) {\n var dayOfWeek = date.getUTCDay();\n var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n\n switch (token) {\n // 2\n case 'i':\n return String(isoDayOfWeek);\n // 02\n\n case 'ii':\n return (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(isoDayOfWeek, token.length);\n // 2nd\n\n case 'io':\n return localize.ordinalNumber(isoDayOfWeek, {\n unit: 'day'\n });\n // Tue\n\n case 'iii':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'iiiii':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'iiiiii':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'iiii':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // AM or PM\n a: function (date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n\n switch (token) {\n case 'a':\n case 'aa':\n case 'aaa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'aaaaa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'aaaa':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // AM, PM, midnight, noon\n b: function (date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue;\n\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n }\n\n switch (token) {\n case 'b':\n case 'bb':\n case 'bbb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'bbbbb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'bbbb':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // in the morning, in the afternoon, in the evening, at night\n B: function (date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue;\n\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n\n switch (token) {\n case 'B':\n case 'BB':\n case 'BBB':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'BBBBB':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'BBBB':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Hour [1-12]\n h: function (date, token, localize) {\n if (token === 'ho') {\n var hours = date.getUTCHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return _lightFormatters_index_js__WEBPACK_IMPORTED_MODULE_0__.default.h(date, token);\n },\n // Hour [0-23]\n H: function (date, token, localize) {\n if (token === 'Ho') {\n return localize.ordinalNumber(date.getUTCHours(), {\n unit: 'hour'\n });\n }\n\n return _lightFormatters_index_js__WEBPACK_IMPORTED_MODULE_0__.default.H(date, token);\n },\n // Hour [0-11]\n K: function (date, token, localize) {\n var hours = date.getUTCHours() % 12;\n\n if (token === 'Ko') {\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(hours, token.length);\n },\n // Hour [1-24]\n k: function (date, token, localize) {\n var hours = date.getUTCHours();\n if (hours === 0) hours = 24;\n\n if (token === 'ko') {\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(hours, token.length);\n },\n // Minute\n m: function (date, token, localize) {\n if (token === 'mo') {\n return localize.ordinalNumber(date.getUTCMinutes(), {\n unit: 'minute'\n });\n }\n\n return _lightFormatters_index_js__WEBPACK_IMPORTED_MODULE_0__.default.m(date, token);\n },\n // Second\n s: function (date, token, localize) {\n if (token === 'so') {\n return localize.ordinalNumber(date.getUTCSeconds(), {\n unit: 'second'\n });\n }\n\n return _lightFormatters_index_js__WEBPACK_IMPORTED_MODULE_0__.default.s(date, token);\n },\n // Fraction of second\n S: function (date, token) {\n return _lightFormatters_index_js__WEBPACK_IMPORTED_MODULE_0__.default.S(date, token);\n },\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n if (timezoneOffset === 0) {\n return 'Z';\n }\n\n switch (token) {\n // Hours and optional minutes\n case 'X':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n\n case 'XXXX':\n case 'XX':\n // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n\n case 'XXXXX':\n case 'XXX': // Hours and minutes with `:` delimiter\n\n default:\n return formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Hours and optional minutes\n case 'x':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n\n case 'xxxx':\n case 'xx':\n // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n\n case 'xxxxx':\n case 'xxx': // Hours and minutes with `:` delimiter\n\n default:\n return formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (GMT)\n O: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Short\n case 'O':\n case 'OO':\n case 'OOO':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n // Long\n\n case 'OOOO':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (specific non-location)\n z: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Short\n case 'z':\n case 'zz':\n case 'zzz':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n // Long\n\n case 'zzzz':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':');\n }\n },\n // Seconds timestamp\n t: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timestamp = Math.floor(originalDate.getTime() / 1000);\n return (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(timestamp, token.length);\n },\n // Milliseconds timestamp\n T: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timestamp = originalDate.getTime();\n return (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(timestamp, token.length);\n }\n};\n\nfunction formatTimezoneShort(offset, dirtyDelimiter) {\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = Math.floor(absOffset / 60);\n var minutes = absOffset % 60;\n\n if (minutes === 0) {\n return sign + String(hours);\n }\n\n var delimiter = dirtyDelimiter || '';\n return sign + String(hours) + delimiter + (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {\n if (offset % 60 === 0) {\n var sign = offset > 0 ? '-' : '+';\n return sign + (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(Math.abs(offset) / 60, 2);\n }\n\n return formatTimezone(offset, dirtyDelimiter);\n}\n\nfunction formatTimezone(offset, dirtyDelimiter) {\n var delimiter = dirtyDelimiter || '';\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(Math.floor(absOffset / 60), 2);\n var minutes = (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (formatters);\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/_lib/format/formatters/index.js?"); 30 | 31 | /***/ }), 32 | 33 | /***/ "./node_modules/date-fns/esm/_lib/format/lightFormatters/index.js": 34 | /*!************************************************************************!*\ 35 | !*** ./node_modules/date-fns/esm/_lib/format/lightFormatters/index.js ***! 36 | \************************************************************************/ 37 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 38 | 39 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\n/* harmony import */ var _addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../addLeadingZeros/index.js */ \"./node_modules/date-fns/esm/_lib/addLeadingZeros/index.js\");\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | |\n * | d | Day of month | D | |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | m | Minute | M | Month |\n * | s | Second | S | Fraction of second |\n * | y | Year (abs) | Y | |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nvar formatters = {\n // Year\n y: function (date, token) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var year = signedYear > 0 ? signedYear : 1 - signedYear;\n return (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(token === 'yy' ? year % 100 : year, token.length);\n },\n // Month\n M: function (date, token) {\n var month = date.getUTCMonth();\n return token === 'M' ? String(month + 1) : (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(month + 1, 2);\n },\n // Day of the month\n d: function (date, token) {\n return (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(date.getUTCDate(), token.length);\n },\n // AM or PM\n a: function (date, token) {\n var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';\n\n switch (token) {\n case 'a':\n case 'aa':\n case 'aaa':\n return dayPeriodEnumValue.toUpperCase();\n\n case 'aaaaa':\n return dayPeriodEnumValue[0];\n\n case 'aaaa':\n default:\n return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';\n }\n },\n // Hour [1-12]\n h: function (date, token) {\n return (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(date.getUTCHours() % 12 || 12, token.length);\n },\n // Hour [0-23]\n H: function (date, token) {\n return (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(date.getUTCHours(), token.length);\n },\n // Minute\n m: function (date, token) {\n return (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(date.getUTCMinutes(), token.length);\n },\n // Second\n s: function (date, token) {\n return (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(date.getUTCSeconds(), token.length);\n },\n // Fraction of second\n S: function (date, token) {\n var numberOfDigits = token.length;\n var milliseconds = date.getUTCMilliseconds();\n var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));\n return (0,_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(fractionalSeconds, token.length);\n }\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (formatters);\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/_lib/format/lightFormatters/index.js?"); 40 | 41 | /***/ }), 42 | 43 | /***/ "./node_modules/date-fns/esm/_lib/format/longFormatters/index.js": 44 | /*!***********************************************************************!*\ 45 | !*** ./node_modules/date-fns/esm/_lib/format/longFormatters/index.js ***! 46 | \***********************************************************************/ 47 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 48 | 49 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\nfunction dateLongFormatter(pattern, formatLong) {\n switch (pattern) {\n case 'P':\n return formatLong.date({\n width: 'short'\n });\n\n case 'PP':\n return formatLong.date({\n width: 'medium'\n });\n\n case 'PPP':\n return formatLong.date({\n width: 'long'\n });\n\n case 'PPPP':\n default:\n return formatLong.date({\n width: 'full'\n });\n }\n}\n\nfunction timeLongFormatter(pattern, formatLong) {\n switch (pattern) {\n case 'p':\n return formatLong.time({\n width: 'short'\n });\n\n case 'pp':\n return formatLong.time({\n width: 'medium'\n });\n\n case 'ppp':\n return formatLong.time({\n width: 'long'\n });\n\n case 'pppp':\n default:\n return formatLong.time({\n width: 'full'\n });\n }\n}\n\nfunction dateTimeLongFormatter(pattern, formatLong) {\n var matchResult = pattern.match(/(P+)(p+)?/);\n var datePattern = matchResult[1];\n var timePattern = matchResult[2];\n\n if (!timePattern) {\n return dateLongFormatter(pattern, formatLong);\n }\n\n var dateTimeFormat;\n\n switch (datePattern) {\n case 'P':\n dateTimeFormat = formatLong.dateTime({\n width: 'short'\n });\n break;\n\n case 'PP':\n dateTimeFormat = formatLong.dateTime({\n width: 'medium'\n });\n break;\n\n case 'PPP':\n dateTimeFormat = formatLong.dateTime({\n width: 'long'\n });\n break;\n\n case 'PPPP':\n default:\n dateTimeFormat = formatLong.dateTime({\n width: 'full'\n });\n break;\n }\n\n return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));\n}\n\nvar longFormatters = {\n p: timeLongFormatter,\n P: dateTimeLongFormatter\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (longFormatters);\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/_lib/format/longFormatters/index.js?"); 50 | 51 | /***/ }), 52 | 53 | /***/ "./node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js": 54 | /*!*********************************************************************************!*\ 55 | !*** ./node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js ***! 56 | \*********************************************************************************/ 57 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 58 | 59 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ getTimezoneOffsetInMilliseconds\n/* harmony export */ });\nvar MILLISECONDS_IN_MINUTE = 60000;\n\nfunction getDateMillisecondsPart(date) {\n return date.getTime() % MILLISECONDS_IN_MINUTE;\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 */\n\n\nfunction getTimezoneOffsetInMilliseconds(dirtyDate) {\n var date = new Date(dirtyDate.getTime());\n var baseTimezoneOffset = Math.ceil(date.getTimezoneOffset());\n date.setSeconds(0, 0);\n var hasNegativeUTCOffset = baseTimezoneOffset > 0;\n var millisecondsPartOfTimezoneOffset = hasNegativeUTCOffset ? (MILLISECONDS_IN_MINUTE + getDateMillisecondsPart(date)) % MILLISECONDS_IN_MINUTE : getDateMillisecondsPart(date);\n return baseTimezoneOffset * MILLISECONDS_IN_MINUTE + millisecondsPartOfTimezoneOffset;\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js?"); 60 | 61 | /***/ }), 62 | 63 | /***/ "./node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js": 64 | /*!*****************************************************************!*\ 65 | !*** ./node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js ***! 66 | \*****************************************************************/ 67 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 68 | 69 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ getUTCDayOfYear\n/* harmony export */ });\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\nvar MILLISECONDS_IN_DAY = 86400000; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction getUTCDayOfYear(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var timestamp = date.getTime();\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n var startOfYearTimestamp = date.getTime();\n var difference = timestamp - startOfYearTimestamp;\n return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js?"); 70 | 71 | /***/ }), 72 | 73 | /***/ "./node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js": 74 | /*!*******************************************************************!*\ 75 | !*** ./node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js ***! 76 | \*******************************************************************/ 77 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 78 | 79 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ getUTCISOWeekYear\n/* harmony export */ });\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../startOfUTCISOWeek/index.js */ \"./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction getUTCISOWeekYear(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var year = date.getUTCFullYear();\n var fourthOfJanuaryOfNextYear = new Date(0);\n fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);\n var startOfNextYear = (0,_startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(fourthOfJanuaryOfNextYear);\n var fourthOfJanuaryOfThisYear = new Date(0);\n fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);\n var startOfThisYear = (0,_startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(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\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js?"); 80 | 81 | /***/ }), 82 | 83 | /***/ "./node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js": 84 | /*!***************************************************************!*\ 85 | !*** ./node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js ***! 86 | \***************************************************************/ 87 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 88 | 89 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ getUTCISOWeek\n/* harmony export */ });\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../startOfUTCISOWeek/index.js */ \"./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js\");\n/* harmony import */ var _startOfUTCISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../startOfUTCISOWeekYear/index.js */ \"./node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n\n\nvar MILLISECONDS_IN_WEEK = 604800000; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction getUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var diff = (0,_startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(date).getTime() - (0,_startOfUTCISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__.default)(date).getTime(); // 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\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js?"); 90 | 91 | /***/ }), 92 | 93 | /***/ "./node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js": 94 | /*!****************************************************************!*\ 95 | !*** ./node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js ***! 96 | \****************************************************************/ 97 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 98 | 99 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ getUTCWeekYear\n/* harmony export */ });\n/* harmony import */ var _toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../toInteger/index.js */ \"./node_modules/date-fns/esm/_lib/toInteger/index.js\");\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../startOfUTCWeek/index.js */ \"./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n\n // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction getUTCWeekYear(dirtyDate, dirtyOptions) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate, dirtyOptions);\n var year = date.getUTCFullYear();\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeFirstWeekContainsDate = locale && locale.options && locale.options.firstWeekContainsDate;\n var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : (0,_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(localeFirstWeekContainsDate);\n var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : (0,_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(options.firstWeekContainsDate); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n\n var firstWeekOfNextYear = new Date(0);\n firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);\n var startOfNextYear = (0,_startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_3__.default)(firstWeekOfNextYear, dirtyOptions);\n var firstWeekOfThisYear = new Date(0);\n firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);\n var startOfThisYear = (0,_startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_3__.default)(firstWeekOfThisYear, dirtyOptions);\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\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js?"); 100 | 101 | /***/ }), 102 | 103 | /***/ "./node_modules/date-fns/esm/_lib/getUTCWeek/index.js": 104 | /*!************************************************************!*\ 105 | !*** ./node_modules/date-fns/esm/_lib/getUTCWeek/index.js ***! 106 | \************************************************************/ 107 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 108 | 109 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ getUTCWeek\n/* harmony export */ });\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../startOfUTCWeek/index.js */ \"./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js\");\n/* harmony import */ var _startOfUTCWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../startOfUTCWeekYear/index.js */ \"./node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n\n\nvar MILLISECONDS_IN_WEEK = 604800000; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction getUTCWeek(dirtyDate, options) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var diff = (0,_startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(date, options).getTime() - (0,_startOfUTCWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__.default)(date, options).getTime(); // 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\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/_lib/getUTCWeek/index.js?"); 110 | 111 | /***/ }), 112 | 113 | /***/ "./node_modules/date-fns/esm/_lib/protectedTokens/index.js": 114 | /*!*****************************************************************!*\ 115 | !*** ./node_modules/date-fns/esm/_lib/protectedTokens/index.js ***! 116 | \*****************************************************************/ 117 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 118 | 119 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"isProtectedDayOfYearToken\": () => /* binding */ isProtectedDayOfYearToken,\n/* harmony export */ \"isProtectedWeekYearToken\": () => /* binding */ isProtectedWeekYearToken,\n/* harmony export */ \"throwProtectedError\": () => /* binding */ throwProtectedError\n/* harmony export */ });\nvar protectedDayOfYearTokens = ['D', 'DD'];\nvar protectedWeekYearTokens = ['YY', 'YYYY'];\nfunction isProtectedDayOfYearToken(token) {\n return protectedDayOfYearTokens.indexOf(token) !== -1;\n}\nfunction isProtectedWeekYearToken(token) {\n return protectedWeekYearTokens.indexOf(token) !== -1;\n}\nfunction throwProtectedError(token, format, input) {\n if (token === 'YYYY') {\n throw new RangeError(\"Use `yyyy` instead of `YYYY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://git.io/fxCyr\"));\n } else if (token === 'YY') {\n throw new RangeError(\"Use `yy` instead of `YY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://git.io/fxCyr\"));\n } else if (token === 'D') {\n throw new RangeError(\"Use `d` instead of `D` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://git.io/fxCyr\"));\n } else if (token === 'DD') {\n throw new RangeError(\"Use `dd` instead of `DD` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://git.io/fxCyr\"));\n }\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/_lib/protectedTokens/index.js?"); 120 | 121 | /***/ }), 122 | 123 | /***/ "./node_modules/date-fns/esm/_lib/requiredArgs/index.js": 124 | /*!**************************************************************!*\ 125 | !*** ./node_modules/date-fns/esm/_lib/requiredArgs/index.js ***! 126 | \**************************************************************/ 127 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 128 | 129 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ requiredArgs\n/* harmony export */ });\nfunction requiredArgs(required, args) {\n if (args.length < required) {\n throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');\n }\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/_lib/requiredArgs/index.js?"); 130 | 131 | /***/ }), 132 | 133 | /***/ "./node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js": 134 | /*!***********************************************************************!*\ 135 | !*** ./node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js ***! 136 | \***********************************************************************/ 137 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 138 | 139 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ startOfUTCISOWeekYear\n/* harmony export */ });\n/* harmony import */ var _getUTCISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../getUTCISOWeekYear/index.js */ \"./node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js\");\n/* harmony import */ var _startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../startOfUTCISOWeek/index.js */ \"./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction startOfUTCISOWeekYear(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var year = (0,_getUTCISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var fourthOfJanuary = new Date(0);\n fourthOfJanuary.setUTCFullYear(year, 0, 4);\n fourthOfJanuary.setUTCHours(0, 0, 0, 0);\n var date = (0,_startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(fourthOfJanuary);\n return date;\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js?"); 140 | 141 | /***/ }), 142 | 143 | /***/ "./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js": 144 | /*!*******************************************************************!*\ 145 | !*** ./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js ***! 146 | \*******************************************************************/ 147 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 148 | 149 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ startOfUTCISOWeek\n/* harmony export */ });\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction startOfUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var weekStartsOn = 1;\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js?"); 150 | 151 | /***/ }), 152 | 153 | /***/ "./node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js": 154 | /*!********************************************************************!*\ 155 | !*** ./node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js ***! 156 | \********************************************************************/ 157 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 158 | 159 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ startOfUTCWeekYear\n/* harmony export */ });\n/* harmony import */ var _toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../toInteger/index.js */ \"./node_modules/date-fns/esm/_lib/toInteger/index.js\");\n/* harmony import */ var _getUTCWeekYear_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../getUTCWeekYear/index.js */ \"./node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js\");\n/* harmony import */ var _startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../startOfUTCWeek/index.js */ \"./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n\n // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction startOfUTCWeekYear(dirtyDate, dirtyOptions) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeFirstWeekContainsDate = locale && locale.options && locale.options.firstWeekContainsDate;\n var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : (0,_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(localeFirstWeekContainsDate);\n var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : (0,_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(options.firstWeekContainsDate);\n var year = (0,_getUTCWeekYear_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(dirtyDate, dirtyOptions);\n var firstWeek = new Date(0);\n firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setUTCHours(0, 0, 0, 0);\n var date = (0,_startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_3__.default)(firstWeek, dirtyOptions);\n return date;\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js?"); 160 | 161 | /***/ }), 162 | 163 | /***/ "./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js": 164 | /*!****************************************************************!*\ 165 | !*** ./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js ***! 166 | \****************************************************************/ 167 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 168 | 169 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ startOfUTCWeek\n/* harmony export */ });\n/* harmony import */ var _toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../toInteger/index.js */ \"./node_modules/date-fns/esm/_lib/toInteger/index.js\");\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction startOfUTCWeek(dirtyDate, dirtyOptions) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : (0,_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : (0,_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js?"); 170 | 171 | /***/ }), 172 | 173 | /***/ "./node_modules/date-fns/esm/_lib/toInteger/index.js": 174 | /*!***********************************************************!*\ 175 | !*** ./node_modules/date-fns/esm/_lib/toInteger/index.js ***! 176 | \***********************************************************/ 177 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 178 | 179 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ toInteger\n/* harmony export */ });\nfunction toInteger(dirtyNumber) {\n if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {\n return NaN;\n }\n\n var number = Number(dirtyNumber);\n\n if (isNaN(number)) {\n return number;\n }\n\n return number < 0 ? Math.ceil(number) : Math.floor(number);\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/_lib/toInteger/index.js?"); 180 | 181 | /***/ }), 182 | 183 | /***/ "./node_modules/date-fns/esm/addDays/index.js": 184 | /*!****************************************************!*\ 185 | !*** ./node_modules/date-fns/esm/addDays/index.js ***! 186 | \****************************************************/ 187 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 188 | 189 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ addDays\n/* harmony export */ });\n/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_lib/toInteger/index.js */ \"./node_modules/date-fns/esm/_lib/toInteger/index.js\");\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n\n/**\n * @name addDays\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 * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the days added\n * @throws {TypeError} 2 arguments required\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 */\n\nfunction addDays(dirtyDate, dirtyAmount) {\n (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(2, arguments);\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var amount = (0,_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n date.setDate(date.getDate() + amount);\n return date;\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/addDays/index.js?"); 190 | 191 | /***/ }), 192 | 193 | /***/ "./node_modules/date-fns/esm/addMilliseconds/index.js": 194 | /*!************************************************************!*\ 195 | !*** ./node_modules/date-fns/esm/addMilliseconds/index.js ***! 196 | \************************************************************/ 197 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 198 | 199 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ addMilliseconds\n/* harmony export */ });\n/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_lib/toInteger/index.js */ \"./node_modules/date-fns/esm/_lib/toInteger/index.js\");\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n\n/**\n * @name addMilliseconds\n * @category Millisecond Helpers\n * @summary Add the specified number of milliseconds to the given date.\n *\n * @description\n * Add the specified number of milliseconds to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 750 milliseconds to 10 July 2014 12:45:30.000:\n * var result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:30.750\n */\n\nfunction addMilliseconds(dirtyDate, dirtyAmount) {\n (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(2, arguments);\n var timestamp = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate).getTime();\n var amount = (0,_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(dirtyAmount);\n return new Date(timestamp + amount);\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/addMilliseconds/index.js?"); 200 | 201 | /***/ }), 202 | 203 | /***/ "./node_modules/date-fns/esm/compareAsc/index.js": 204 | /*!*******************************************************!*\ 205 | !*** ./node_modules/date-fns/esm/compareAsc/index.js ***! 206 | \*******************************************************/ 207 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 208 | 209 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ compareAsc\n/* harmony export */ });\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n/**\n * @name compareAsc\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to compare\n * @param {Date|Number} dateRight - the second date to compare\n * @returns {Number} the result of the comparison\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * var result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * var result = [\n * new Date(1995, 6, 2),\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * // Wed Feb 11 1987 00:00:00,\n * // Mon Jul 10 1989 00:00:00,\n * // Sun Jul 02 1995 00:00:00\n * // ]\n */\n\nfunction compareAsc(dirtyDateLeft, dirtyDateRight) {\n (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(2, arguments);\n var dateLeft = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDateLeft);\n var dateRight = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDateRight);\n var diff = dateLeft.getTime() - dateRight.getTime();\n\n if (diff < 0) {\n return -1;\n } else if (diff > 0) {\n return 1; // Return 0 if diff is 0; return NaN if diff is NaN\n } else {\n return diff;\n }\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/compareAsc/index.js?"); 210 | 211 | /***/ }), 212 | 213 | /***/ "./node_modules/date-fns/esm/format/index.js": 214 | /*!***************************************************!*\ 215 | !*** ./node_modules/date-fns/esm/format/index.js ***! 216 | \***************************************************/ 217 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 218 | 219 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ format\n/* harmony export */ });\n/* harmony import */ var _isValid_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../isValid/index.js */ \"./node_modules/date-fns/esm/isValid/index.js\");\n/* harmony import */ var _locale_en_US_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../locale/en-US/index.js */ \"./node_modules/date-fns/esm/locale/en-US/index.js\");\n/* harmony import */ var _subMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../subMilliseconds/index.js */ \"./node_modules/date-fns/esm/subMilliseconds/index.js\");\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _lib_format_formatters_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../_lib/format/formatters/index.js */ \"./node_modules/date-fns/esm/_lib/format/formatters/index.js\");\n/* harmony import */ var _lib_format_longFormatters_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_lib/format/longFormatters/index.js */ \"./node_modules/date-fns/esm/_lib/format/longFormatters/index.js\");\n/* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../_lib/getTimezoneOffsetInMilliseconds/index.js */ \"./node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js\");\n/* harmony import */ var _lib_protectedTokens_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../_lib/protectedTokens/index.js */ \"./node_modules/date-fns/esm/_lib/protectedTokens/index.js\");\n/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_lib/toInteger/index.js */ \"./node_modules/date-fns/esm/_lib/toInteger/index.js\");\n/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n\n\n\n\n\n\n\n // This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\n\nvar formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g; // This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\n\nvar longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\nvar escapedStringRegExp = /^'([^]*?)'?$/;\nvar doubleQuoteRegExp = /''/g;\nvar unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n/**\n * @name format\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://git.io/fxCyr\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Su, Sa | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Su, Sa | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Su, Sa | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Su, Sa | |\n * | AM, PM | a..aaa | AM, PM | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bbb | AM, PM, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 0001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 05/29/1453 | 7 |\n * | | PP | May 29, 1453 | 7 |\n * | | PPP | May 29th, 1453 | 7 |\n * | | PPPP | Sunday, May 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 05/29/1453, 12:00 AM | 7 |\n * | | PPpp | May 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | May 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Sunday, May 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}\n * and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://git.io/fxCyr\n *\n * 9. `D` and `DD` tokens represent days of the year but they are ofthen confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://git.io/fxCyr\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The second argument is now required for the sake of explicitness.\n *\n * ```javascript\n * // Before v2.0.0\n * format(new Date(2016, 0, 1))\n *\n * // v2.0.0 onward\n * format(new Date(2016, 0, 1), \"yyyy-MM-dd'T'HH:mm:ss.SSSxxx\")\n * ```\n *\n * - New format string API for `format` function\n * which is based on [Unicode Technical Standard #35](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table).\n * See [this post](https://blog.date-fns.org/post/unicode-tokens-in-date-fns-v2-sreatyki91jg) for more details.\n *\n * - Characters are now escaped using single quote symbols (`'`) instead of square brackets.\n *\n * @param {Date|Number} date - the original date\n * @param {String} format - the string of tokens\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 {Number} [options.firstWeekContainsDate=1] - the day of January, which is\n * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;\n * see: https://git.io/fxCyr\n * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;\n * see: https://git.io/fxCyr\n * @returns {String} the formatted date string\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `localize` property\n * @throws {RangeError} `options.locale` must contain `formatLong` property\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * var result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * var result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * var result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\n\nfunction format(dirtyDate, dirtyFormatStr, dirtyOptions) {\n (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(2, arguments);\n var formatStr = String(dirtyFormatStr);\n var options = dirtyOptions || {};\n var locale = options.locale || _locale_en_US_index_js__WEBPACK_IMPORTED_MODULE_1__.default;\n var localeFirstWeekContainsDate = locale.options && locale.options.firstWeekContainsDate;\n var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : (0,_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(localeFirstWeekContainsDate);\n var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : (0,_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(options.firstWeekContainsDate); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n\n var localeWeekStartsOn = locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : (0,_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : (0,_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n if (!locale.localize) {\n throw new RangeError('locale must contain localize property');\n }\n\n if (!locale.formatLong) {\n throw new RangeError('locale must contain formatLong property');\n }\n\n var originalDate = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_3__.default)(dirtyDate);\n\n if (!(0,_isValid_index_js__WEBPACK_IMPORTED_MODULE_4__.default)(originalDate)) {\n throw new RangeError('Invalid time value');\n } // Convert the date in system timezone to the same date in UTC+00:00 timezone.\n // This ensures that when UTC functions will be implemented, locales will be compatible with them.\n // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376\n\n\n var timezoneOffset = (0,_lib_getTimezoneOffsetInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_5__.default)(originalDate);\n var utcDate = (0,_subMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_6__.default)(originalDate, timezoneOffset);\n var formatterOptions = {\n firstWeekContainsDate: firstWeekContainsDate,\n weekStartsOn: weekStartsOn,\n locale: locale,\n _originalDate: originalDate\n };\n var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {\n var firstCharacter = substring[0];\n\n if (firstCharacter === 'p' || firstCharacter === 'P') {\n var longFormatter = _lib_format_longFormatters_index_js__WEBPACK_IMPORTED_MODULE_7__.default[firstCharacter];\n return longFormatter(substring, locale.formatLong, formatterOptions);\n }\n\n return substring;\n }).join('').match(formattingTokensRegExp).map(function (substring) {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return \"'\";\n }\n\n var firstCharacter = substring[0];\n\n if (firstCharacter === \"'\") {\n return cleanEscapedString(substring);\n }\n\n var formatter = _lib_format_formatters_index_js__WEBPACK_IMPORTED_MODULE_8__.default[firstCharacter];\n\n if (formatter) {\n if (!options.useAdditionalWeekYearTokens && (0,_lib_protectedTokens_index_js__WEBPACK_IMPORTED_MODULE_9__.isProtectedWeekYearToken)(substring)) {\n (0,_lib_protectedTokens_index_js__WEBPACK_IMPORTED_MODULE_9__.throwProtectedError)(substring, dirtyFormatStr, dirtyDate);\n }\n\n if (!options.useAdditionalDayOfYearTokens && (0,_lib_protectedTokens_index_js__WEBPACK_IMPORTED_MODULE_9__.isProtectedDayOfYearToken)(substring)) {\n (0,_lib_protectedTokens_index_js__WEBPACK_IMPORTED_MODULE_9__.throwProtectedError)(substring, dirtyFormatStr, dirtyDate);\n }\n\n return formatter(utcDate, substring, locale.localize, formatterOptions);\n }\n\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');\n }\n\n return substring;\n }).join('');\n return result;\n}\n\nfunction cleanEscapedString(input) {\n return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, \"'\");\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/format/index.js?"); 220 | 221 | /***/ }), 222 | 223 | /***/ "./node_modules/date-fns/esm/isSameDay/index.js": 224 | /*!******************************************************!*\ 225 | !*** ./node_modules/date-fns/esm/isSameDay/index.js ***! 226 | \******************************************************/ 227 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 228 | 229 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ isSameDay\n/* harmony export */ });\n/* harmony import */ var _startOfDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../startOfDay/index.js */ \"./node_modules/date-fns/esm/startOfDay/index.js\");\n/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n/**\n * @name isSameDay\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 * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same day\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * var result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))\n * //=> true\n */\n\nfunction isSameDay(dirtyDateLeft, dirtyDateRight) {\n (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(2, arguments);\n var dateLeftStartOfDay = (0,_startOfDay_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDateLeft);\n var dateRightStartOfDay = (0,_startOfDay_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDateRight);\n return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime();\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/isSameDay/index.js?"); 230 | 231 | /***/ }), 232 | 233 | /***/ "./node_modules/date-fns/esm/isSameWeek/index.js": 234 | /*!*******************************************************!*\ 235 | !*** ./node_modules/date-fns/esm/isSameWeek/index.js ***! 236 | \*******************************************************/ 237 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 238 | 239 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ isSameWeek\n/* harmony export */ });\n/* harmony import */ var _startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../startOfWeek/index.js */ \"./node_modules/date-fns/esm/startOfWeek/index.js\");\n/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n/**\n * @name isSameWeek\n * @category Week Helpers\n * @summary Are the given dates in the same week?\n *\n * @description\n * Are the given dates in the same week?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\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 {Boolean} the dates are in the same week\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n *\n * @example\n * // Are 31 August 2014 and 4 September 2014 in the same week?\n * var result = isSameWeek(new Date(2014, 7, 31), new Date(2014, 8, 4))\n * //=> true\n *\n * @example\n * // If week starts with Monday,\n * // are 31 August 2014 and 4 September 2014 in the same week?\n * var result = isSameWeek(new Date(2014, 7, 31), new Date(2014, 8, 4), {\n * weekStartsOn: 1\n * })\n * //=> false\n */\n\nfunction isSameWeek(dirtyDateLeft, dirtyDateRight, dirtyOptions) {\n (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(2, arguments);\n var dateLeftStartOfWeek = (0,_startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDateLeft, dirtyOptions);\n var dateRightStartOfWeek = (0,_startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDateRight, dirtyOptions);\n return dateLeftStartOfWeek.getTime() === dateRightStartOfWeek.getTime();\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/isSameWeek/index.js?"); 240 | 241 | /***/ }), 242 | 243 | /***/ "./node_modules/date-fns/esm/isThisWeek/index.js": 244 | /*!*******************************************************!*\ 245 | !*** ./node_modules/date-fns/esm/isThisWeek/index.js ***! 246 | \*******************************************************/ 247 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 248 | 249 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ isThisWeek\n/* harmony export */ });\n/* harmony import */ var _isSameWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../isSameWeek/index.js */ \"./node_modules/date-fns/esm/isSameWeek/index.js\");\n/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n/**\n * @name isThisWeek\n * @category Week Helpers\n * @summary Is the given date in the same week as the current date?\n * @pure false\n *\n * @description\n * Is the given date in the same week as the current date?\n *\n * > ⚠️ Please note that this function is not present in the FP submodule as\n * > it uses `Date.now()` internally hence impure and can't be safely curried.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to check\n * @param {Object} [options] - the 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 {Boolean} the date is in this week\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n *\n * @example\n * // If today is 25 September 2014, is 21 September 2014 in this week?\n * var result = isThisWeek(new Date(2014, 8, 21))\n * //=> true\n *\n * @example\n * // If today is 25 September 2014 and week starts with Monday\n * // is 21 September 2014 in this week?\n * var result = isThisWeek(new Date(2014, 8, 21), { weekStartsOn: 1 })\n * //=> false\n */\n\nfunction isThisWeek(dirtyDate, options) {\n (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n return (0,_isSameWeek_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate, Date.now(), options);\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/isThisWeek/index.js?"); 250 | 251 | /***/ }), 252 | 253 | /***/ "./node_modules/date-fns/esm/isToday/index.js": 254 | /*!****************************************************!*\ 255 | !*** ./node_modules/date-fns/esm/isToday/index.js ***! 256 | \****************************************************/ 257 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 258 | 259 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ isToday\n/* harmony export */ });\n/* harmony import */ var _isSameDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../isSameDay/index.js */ \"./node_modules/date-fns/esm/isSameDay/index.js\");\n/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n/**\n * @name isToday\n * @category Day Helpers\n * @summary Is the given date today?\n * @pure false\n *\n * @description\n * Is the given date today?\n *\n * > ⚠️ Please note that this function is not present in the FP submodule as\n * > it uses `Date.now()` internally hence impure and can't be safely curried.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to check\n * @returns {Boolean} the date is today\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // If today is 6 October 2014, is 6 October 14:00:00 today?\n * var result = isToday(new Date(2014, 9, 6, 14, 0))\n * //=> true\n */\n\nfunction isToday(dirtyDate) {\n (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n return (0,_isSameDay_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate, Date.now());\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/isToday/index.js?"); 260 | 261 | /***/ }), 262 | 263 | /***/ "./node_modules/date-fns/esm/isValid/index.js": 264 | /*!****************************************************!*\ 265 | !*** ./node_modules/date-fns/esm/isValid/index.js ***! 266 | \****************************************************/ 267 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 268 | 269 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ isValid\n/* harmony export */ });\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n/**\n * @name isValid\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 * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\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 * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - Now `isValid` doesn't throw an exception\n * if the first argument is not an instance of Date.\n * Instead, argument is converted beforehand using `toDate`.\n *\n * Examples:\n *\n * | `isValid` argument | Before v2.0.0 | v2.0.0 onward |\n * |---------------------------|---------------|---------------|\n * | `new Date()` | `true` | `true` |\n * | `new Date('2016-01-01')` | `true` | `true` |\n * | `new Date('')` | `false` | `false` |\n * | `new Date(1488370835081)` | `true` | `true` |\n * | `new Date(NaN)` | `false` | `false` |\n * | `'2016-01-01'` | `TypeError` | `false` |\n * | `''` | `TypeError` | `false` |\n * | `1488370835081` | `TypeError` | `true` |\n * | `NaN` | `TypeError` | `false` |\n *\n * We introduce this change to make *date-fns* consistent with ECMAScript behavior\n * that try to coerce arguments to the expected type\n * (which is also the case with other *date-fns* functions).\n *\n * @param {*} date - the date to check\n * @returns {Boolean} the date is valid\n * @throws {TypeError} 1 argument required\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 value, convertable into a date:\n * var result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * var result = isValid(new Date(''))\n * //=> false\n */\n\nfunction isValid(dirtyDate) {\n (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n return !isNaN(date);\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/isValid/index.js?"); 270 | 271 | /***/ }), 272 | 273 | /***/ "./node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js": 274 | /*!**************************************************************************!*\ 275 | !*** ./node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js ***! 276 | \**************************************************************************/ 277 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 278 | 279 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ buildFormatLongFn\n/* harmony export */ });\nfunction buildFormatLongFn(args) {\n return function (dirtyOptions) {\n var options = dirtyOptions || {};\n var width = options.width ? String(options.width) : args.defaultWidth;\n var format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js?"); 280 | 281 | /***/ }), 282 | 283 | /***/ "./node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js": 284 | /*!************************************************************************!*\ 285 | !*** ./node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js ***! 286 | \************************************************************************/ 287 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 288 | 289 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ buildLocalizeFn\n/* harmony export */ });\nfunction buildLocalizeFn(args) {\n return function (dirtyIndex, dirtyOptions) {\n var options = dirtyOptions || {};\n var context = options.context ? String(options.context) : 'standalone';\n var valuesArray;\n\n if (context === 'formatting' && args.formattingValues) {\n var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n var width = options.width ? String(options.width) : defaultWidth;\n valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n var _defaultWidth = args.defaultWidth;\n\n var _width = options.width ? String(options.width) : args.defaultWidth;\n\n valuesArray = args.values[_width] || args.values[_defaultWidth];\n }\n\n var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;\n return valuesArray[index];\n };\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js?"); 290 | 291 | /***/ }), 292 | 293 | /***/ "./node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js": 294 | /*!*********************************************************************!*\ 295 | !*** ./node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js ***! 296 | \*********************************************************************/ 297 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 298 | 299 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ buildMatchFn\n/* harmony export */ });\nfunction buildMatchFn(args) {\n return function (dirtyString, dirtyOptions) {\n var string = String(dirtyString);\n var options = dirtyOptions || {};\n var width = options.width;\n var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];\n var matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null;\n }\n\n var matchedString = matchResult[0];\n var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];\n var value;\n\n if (Object.prototype.toString.call(parsePatterns) === '[object Array]') {\n value = findIndex(parsePatterns, function (pattern) {\n return pattern.test(matchedString);\n });\n } else {\n value = findKey(parsePatterns, function (pattern) {\n return pattern.test(matchedString);\n });\n }\n\n value = args.valueCallback ? args.valueCallback(value) : value;\n value = options.valueCallback ? options.valueCallback(value) : value;\n return {\n value: value,\n rest: string.slice(matchedString.length)\n };\n };\n}\n\nfunction findKey(object, predicate) {\n for (var key in object) {\n if (object.hasOwnProperty(key) && predicate(object[key])) {\n return key;\n }\n }\n}\n\nfunction findIndex(array, predicate) {\n for (var key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js?"); 300 | 301 | /***/ }), 302 | 303 | /***/ "./node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js": 304 | /*!****************************************************************************!*\ 305 | !*** ./node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js ***! 306 | \****************************************************************************/ 307 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 308 | 309 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ buildMatchPatternFn\n/* harmony export */ });\nfunction buildMatchPatternFn(args) {\n return function (dirtyString, dirtyOptions) {\n var string = String(dirtyString);\n var options = dirtyOptions || {};\n var matchResult = string.match(args.matchPattern);\n\n if (!matchResult) {\n return null;\n }\n\n var matchedString = matchResult[0];\n var parseResult = string.match(args.parsePattern);\n\n if (!parseResult) {\n return null;\n }\n\n var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];\n value = options.valueCallback ? options.valueCallback(value) : value;\n return {\n value: value,\n rest: string.slice(matchedString.length)\n };\n };\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js?"); 310 | 311 | /***/ }), 312 | 313 | /***/ "./node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js": 314 | /*!*****************************************************************************!*\ 315 | !*** ./node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js ***! 316 | \*****************************************************************************/ 317 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 318 | 319 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ formatDistance\n/* harmony export */ });\nvar formatDistanceLocale = {\n lessThanXSeconds: {\n one: 'less than a second',\n other: 'less than {{count}} seconds'\n },\n xSeconds: {\n one: '1 second',\n other: '{{count}} seconds'\n },\n halfAMinute: 'half a minute',\n lessThanXMinutes: {\n one: 'less than a minute',\n other: 'less than {{count}} minutes'\n },\n xMinutes: {\n one: '1 minute',\n other: '{{count}} minutes'\n },\n aboutXHours: {\n one: 'about 1 hour',\n other: 'about {{count}} hours'\n },\n xHours: {\n one: '1 hour',\n other: '{{count}} hours'\n },\n xDays: {\n one: '1 day',\n other: '{{count}} days'\n },\n aboutXWeeks: {\n one: 'about 1 week',\n other: 'about {{count}} weeks'\n },\n xWeeks: {\n one: '1 week',\n other: '{{count}} weeks'\n },\n aboutXMonths: {\n one: 'about 1 month',\n other: 'about {{count}} months'\n },\n xMonths: {\n one: '1 month',\n other: '{{count}} months'\n },\n aboutXYears: {\n one: 'about 1 year',\n other: 'about {{count}} years'\n },\n xYears: {\n one: '1 year',\n other: '{{count}} years'\n },\n overXYears: {\n one: 'over 1 year',\n other: 'over {{count}} years'\n },\n almostXYears: {\n one: 'almost 1 year',\n other: 'almost {{count}} years'\n }\n};\nfunction formatDistance(token, count, options) {\n options = options || {};\n var result;\n\n if (typeof formatDistanceLocale[token] === 'string') {\n result = formatDistanceLocale[token];\n } else if (count === 1) {\n result = formatDistanceLocale[token].one;\n } else {\n result = formatDistanceLocale[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//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js?"); 320 | 321 | /***/ }), 322 | 323 | /***/ "./node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js": 324 | /*!*************************************************************************!*\ 325 | !*** ./node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js ***! 326 | \*************************************************************************/ 327 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 328 | 329 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\n/* harmony import */ var _lib_buildFormatLongFn_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../_lib/buildFormatLongFn/index.js */ \"./node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js\");\n\nvar dateFormats = {\n full: 'EEEE, MMMM do, y',\n long: 'MMMM do, y',\n medium: 'MMM d, y',\n short: 'MM/dd/yyyy'\n};\nvar timeFormats = {\n full: 'h:mm:ss a zzzz',\n long: 'h:mm:ss a z',\n medium: 'h:mm:ss a',\n short: 'h:mm a'\n};\nvar dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: '{{date}}, {{time}}',\n short: '{{date}}, {{time}}'\n};\nvar formatLong = {\n date: (0,_lib_buildFormatLongFn_index_js__WEBPACK_IMPORTED_MODULE_0__.default)({\n formats: dateFormats,\n defaultWidth: 'full'\n }),\n time: (0,_lib_buildFormatLongFn_index_js__WEBPACK_IMPORTED_MODULE_0__.default)({\n formats: timeFormats,\n defaultWidth: 'full'\n }),\n dateTime: (0,_lib_buildFormatLongFn_index_js__WEBPACK_IMPORTED_MODULE_0__.default)({\n formats: dateTimeFormats,\n defaultWidth: 'full'\n })\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (formatLong);\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js?"); 330 | 331 | /***/ }), 332 | 333 | /***/ "./node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js": 334 | /*!*****************************************************************************!*\ 335 | !*** ./node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js ***! 336 | \*****************************************************************************/ 337 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 338 | 339 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ formatRelative\n/* harmony export */ });\nvar formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: 'P'\n};\nfunction formatRelative(token, _date, _baseDate, _options) {\n return formatRelativeLocale[token];\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js?"); 340 | 341 | /***/ }), 342 | 343 | /***/ "./node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js": 344 | /*!***********************************************************************!*\ 345 | !*** ./node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js ***! 346 | \***********************************************************************/ 347 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 348 | 349 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\n/* harmony import */ var _lib_buildLocalizeFn_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../_lib/buildLocalizeFn/index.js */ \"./node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js\");\n\nvar eraValues = {\n narrow: ['B', 'A'],\n abbreviated: ['BC', 'AD'],\n wide: ['Before Christ', 'Anno Domini']\n};\nvar quarterValues = {\n narrow: ['1', '2', '3', '4'],\n abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],\n wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter'] // 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\n};\nvar monthValues = {\n narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']\n};\nvar dayValues = {\n narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],\n short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\n};\nvar dayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mi',\n noon: 'n',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n }\n};\nvar formattingDayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mi',\n noon: 'n',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n }\n};\n\nfunction ordinalNumber(dirtyNumber, _dirtyOptions) {\n var number = Number(dirtyNumber); // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`:\n //\n // var options = dirtyOptions || {}\n // var unit = String(options.unit)\n //\n // where `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'\n\n var rem100 = number % 100;\n\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + 'st';\n\n case 2:\n return number + 'nd';\n\n case 3:\n return number + 'rd';\n }\n }\n\n return number + 'th';\n}\n\nvar localize = {\n ordinalNumber: ordinalNumber,\n era: (0,_lib_buildLocalizeFn_index_js__WEBPACK_IMPORTED_MODULE_0__.default)({\n values: eraValues,\n defaultWidth: 'wide'\n }),\n quarter: (0,_lib_buildLocalizeFn_index_js__WEBPACK_IMPORTED_MODULE_0__.default)({\n values: quarterValues,\n defaultWidth: 'wide',\n argumentCallback: function (quarter) {\n return Number(quarter) - 1;\n }\n }),\n month: (0,_lib_buildLocalizeFn_index_js__WEBPACK_IMPORTED_MODULE_0__.default)({\n values: monthValues,\n defaultWidth: 'wide'\n }),\n day: (0,_lib_buildLocalizeFn_index_js__WEBPACK_IMPORTED_MODULE_0__.default)({\n values: dayValues,\n defaultWidth: 'wide'\n }),\n dayPeriod: (0,_lib_buildLocalizeFn_index_js__WEBPACK_IMPORTED_MODULE_0__.default)({\n values: dayPeriodValues,\n defaultWidth: 'wide',\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: 'wide'\n })\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (localize);\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js?"); 350 | 351 | /***/ }), 352 | 353 | /***/ "./node_modules/date-fns/esm/locale/en-US/_lib/match/index.js": 354 | /*!********************************************************************!*\ 355 | !*** ./node_modules/date-fns/esm/locale/en-US/_lib/match/index.js ***! 356 | \********************************************************************/ 357 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 358 | 359 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\n/* harmony import */ var _lib_buildMatchPatternFn_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../_lib/buildMatchPatternFn/index.js */ \"./node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js\");\n/* harmony import */ var _lib_buildMatchFn_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../_lib/buildMatchFn/index.js */ \"./node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js\");\n\n\nvar matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nvar parseOrdinalNumberPattern = /\\d+/i;\nvar matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i\n};\nvar parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i]\n};\nvar matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i\n};\nvar parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i]\n};\nvar matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i\n};\nvar parseMonthPatterns = {\n 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],\n 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]\n};\nvar matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i\n};\nvar parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]\n};\nvar matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i\n};\nvar parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i\n }\n};\nvar match = {\n ordinalNumber: (0,_lib_buildMatchPatternFn_index_js__WEBPACK_IMPORTED_MODULE_0__.default)({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: function (value) {\n return parseInt(value, 10);\n }\n }),\n era: (0,_lib_buildMatchFn_index_js__WEBPACK_IMPORTED_MODULE_1__.default)({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseEraPatterns,\n defaultParseWidth: 'any'\n }),\n quarter: (0,_lib_buildMatchFn_index_js__WEBPACK_IMPORTED_MODULE_1__.default)({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: 'any',\n valueCallback: function (index) {\n return index + 1;\n }\n }),\n month: (0,_lib_buildMatchFn_index_js__WEBPACK_IMPORTED_MODULE_1__.default)({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: 'any'\n }),\n day: (0,_lib_buildMatchFn_index_js__WEBPACK_IMPORTED_MODULE_1__.default)({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseDayPatterns,\n defaultParseWidth: 'any'\n }),\n dayPeriod: (0,_lib_buildMatchFn_index_js__WEBPACK_IMPORTED_MODULE_1__.default)({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: 'any',\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: 'any'\n })\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (match);\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/locale/en-US/_lib/match/index.js?"); 360 | 361 | /***/ }), 362 | 363 | /***/ "./node_modules/date-fns/esm/locale/en-US/index.js": 364 | /*!*********************************************************!*\ 365 | !*** ./node_modules/date-fns/esm/locale/en-US/index.js ***! 366 | \*********************************************************/ 367 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 368 | 369 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\n/* harmony import */ var _lib_formatDistance_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_lib/formatDistance/index.js */ \"./node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js\");\n/* harmony import */ var _lib_formatLong_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_lib/formatLong/index.js */ \"./node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js\");\n/* harmony import */ var _lib_formatRelative_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_lib/formatRelative/index.js */ \"./node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js\");\n/* harmony import */ var _lib_localize_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./_lib/localize/index.js */ \"./node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js\");\n/* harmony import */ var _lib_match_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./_lib/match/index.js */ \"./node_modules/date-fns/esm/locale/en-US/_lib/match/index.js\");\n\n\n\n\n\n/**\n * @type {Locale}\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}\n * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}\n */\n\nvar locale = {\n code: 'en-US',\n formatDistance: _lib_formatDistance_index_js__WEBPACK_IMPORTED_MODULE_0__.default,\n formatLong: _lib_formatLong_index_js__WEBPACK_IMPORTED_MODULE_1__.default,\n formatRelative: _lib_formatRelative_index_js__WEBPACK_IMPORTED_MODULE_2__.default,\n localize: _lib_localize_index_js__WEBPACK_IMPORTED_MODULE_3__.default,\n match: _lib_match_index_js__WEBPACK_IMPORTED_MODULE_4__.default,\n options: {\n weekStartsOn: 0\n /* Sunday */\n ,\n firstWeekContainsDate: 1\n }\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (locale);\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/locale/en-US/index.js?"); 370 | 371 | /***/ }), 372 | 373 | /***/ "./node_modules/date-fns/esm/startOfDay/index.js": 374 | /*!*******************************************************!*\ 375 | !*** ./node_modules/date-fns/esm/startOfDay/index.js ***! 376 | \*******************************************************/ 377 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 378 | 379 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ startOfDay\n/* harmony export */ });\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n/**\n * @name startOfDay\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 * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a day\n * @throws {TypeError} 1 argument required\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 */\n\nfunction startOfDay(dirtyDate) {\n (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n date.setHours(0, 0, 0, 0);\n return date;\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/startOfDay/index.js?"); 380 | 381 | /***/ }), 382 | 383 | /***/ "./node_modules/date-fns/esm/startOfWeek/index.js": 384 | /*!********************************************************!*\ 385 | !*** ./node_modules/date-fns/esm/startOfWeek/index.js ***! 386 | \********************************************************/ 387 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 388 | 389 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ startOfWeek\n/* harmony export */ });\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_lib/toInteger/index.js */ \"./node_modules/date-fns/esm/_lib/toInteger/index.js\");\n/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n\n/**\n * @name startOfWeek\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 * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original 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 {Date} the start of a week\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\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 */\n\nfunction startOfWeek(dirtyDate, dirtyOptions) {\n (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : (0,_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : (0,_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(dirtyDate);\n var day = date.getDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setDate(date.getDate() - diff);\n date.setHours(0, 0, 0, 0);\n return date;\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/startOfWeek/index.js?"); 390 | 391 | /***/ }), 392 | 393 | /***/ "./node_modules/date-fns/esm/subDays/index.js": 394 | /*!****************************************************!*\ 395 | !*** ./node_modules/date-fns/esm/subDays/index.js ***! 396 | \****************************************************/ 397 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 398 | 399 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ subDays\n/* harmony export */ });\n/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_lib/toInteger/index.js */ \"./node_modules/date-fns/esm/_lib/toInteger/index.js\");\n/* harmony import */ var _addDays_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../addDays/index.js */ \"./node_modules/date-fns/esm/addDays/index.js\");\n/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n\n/**\n * @name subDays\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 * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the days subtracted\n * @throws {TypeError} 2 arguments required\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 */\n\nfunction subDays(dirtyDate, dirtyAmount) {\n (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(2, arguments);\n var amount = (0,_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyAmount);\n return (0,_addDays_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(dirtyDate, -amount);\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/subDays/index.js?"); 400 | 401 | /***/ }), 402 | 403 | /***/ "./node_modules/date-fns/esm/subMilliseconds/index.js": 404 | /*!************************************************************!*\ 405 | !*** ./node_modules/date-fns/esm/subMilliseconds/index.js ***! 406 | \************************************************************/ 407 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 408 | 409 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ subMilliseconds\n/* harmony export */ });\n/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_lib/toInteger/index.js */ \"./node_modules/date-fns/esm/_lib/toInteger/index.js\");\n/* harmony import */ var _addMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../addMilliseconds/index.js */ \"./node_modules/date-fns/esm/addMilliseconds/index.js\");\n/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n\n/**\n * @name subMilliseconds\n * @category Millisecond Helpers\n * @summary Subtract the specified number of milliseconds from the given date.\n *\n * @description\n * Subtract the specified number of milliseconds from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:\n * var result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:29.250\n */\n\nfunction subMilliseconds(dirtyDate, dirtyAmount) {\n (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(2, arguments);\n var amount = (0,_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyAmount);\n return (0,_addMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(dirtyDate, -amount);\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/subMilliseconds/index.js?"); 410 | 411 | /***/ }), 412 | 413 | /***/ "./node_modules/date-fns/esm/toDate/index.js": 414 | /*!***************************************************!*\ 415 | !*** ./node_modules/date-fns/esm/toDate/index.js ***! 416 | \***************************************************/ 417 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 418 | 419 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ toDate\n/* harmony export */ });\n/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n/**\n * @name toDate\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 the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @param {Date|Number} argument - the value to convert\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\n\nfunction toDate(argument) {\n (0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var argStr = Object.prototype.toString.call(argument); // Clone the date\n\n if (argument instanceof Date || typeof argument === 'object' && argStr === '[object Date]') {\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 === 'number' || argStr === '[object Number]') {\n return new Date(argument);\n } else {\n if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {\n // eslint-disable-next-line no-console\n console.warn(\"Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule\"); // eslint-disable-next-line no-console\n\n console.warn(new Error().stack);\n }\n\n return new Date(NaN);\n }\n}\n\n//# sourceURL=webpack://todo-list/./node_modules/date-fns/esm/toDate/index.js?"); 420 | 421 | /***/ }), 422 | 423 | /***/ "./src/index.js": 424 | /*!**********************!*\ 425 | !*** ./src/index.js ***! 426 | \**********************/ 427 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 428 | 429 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _modules_UI__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./modules/UI */ \"./src/modules/UI.js\");\n\r\n\r\ndocument.addEventListener('DOMContentLoaded', _modules_UI__WEBPACK_IMPORTED_MODULE_0__.default.loadHomepage)\r\n\n\n//# sourceURL=webpack://todo-list/./src/index.js?"); 430 | 431 | /***/ }), 432 | 433 | /***/ "./src/modules/Project.js": 434 | /*!********************************!*\ 435 | !*** ./src/modules/Project.js ***! 436 | \********************************/ 437 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 438 | 439 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ Project\n/* harmony export */ });\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/esm/isToday/index.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/esm/isThisWeek/index.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/esm/subDays/index.js\");\n\r\n\r\nclass Project {\r\n constructor(name) {\r\n this.name = name\r\n this.tasks = []\r\n }\r\n\r\n setName(name) {\r\n this.name = name\r\n }\r\n\r\n getName() {\r\n return this.name\r\n }\r\n\r\n setTasks(tasks) {\r\n this.tasks = tasks\r\n }\r\n\r\n getTasks() {\r\n return this.tasks\r\n }\r\n\r\n getTask(taskName) {\r\n return this.tasks.find((task) => task.getName() === taskName)\r\n }\r\n\r\n contains(taskName) {\r\n return this.tasks.some((task) => task.getName() === taskName)\r\n }\r\n\r\n addTask(newTask) {\r\n if (this.tasks.find((task) => task.getName() === newTask.name)) return\r\n this.tasks.push(newTask)\r\n }\r\n\r\n deleteTask(taskName) {\r\n this.tasks = this.tasks.filter((task) => task.name !== taskName)\r\n }\r\n\r\n getTasksToday() {\r\n return this.tasks.filter((task) => {\r\n const taskDate = new Date(task.getDateFormatted())\r\n return (0,date_fns__WEBPACK_IMPORTED_MODULE_0__.default)((0,date_fns__WEBPACK_IMPORTED_MODULE_1__.default)(taskDate))\r\n })\r\n }\r\n\r\n getTasksThisWeek() {\r\n return this.tasks.filter((task) => {\r\n const taskDate = new Date(task.getDateFormatted())\r\n return (0,date_fns__WEBPACK_IMPORTED_MODULE_2__.default)((0,date_fns__WEBPACK_IMPORTED_MODULE_3__.default)((0,date_fns__WEBPACK_IMPORTED_MODULE_1__.default)(taskDate), 1))\r\n })\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://todo-list/./src/modules/Project.js?"); 440 | 441 | /***/ }), 442 | 443 | /***/ "./src/modules/Storage.js": 444 | /*!********************************!*\ 445 | !*** ./src/modules/Storage.js ***! 446 | \********************************/ 447 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 448 | 449 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ Storage\n/* harmony export */ });\n/* harmony import */ var _Project__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Project */ \"./src/modules/Project.js\");\n/* harmony import */ var _Task__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Task */ \"./src/modules/Task.js\");\n/* harmony import */ var _TodoList__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TodoList */ \"./src/modules/TodoList.js\");\n\r\n\r\n\r\n\r\nclass Storage {\r\n static saveTodoList(data) {\r\n localStorage.setItem('todoList', JSON.stringify(data))\r\n }\r\n\r\n static getTodoList() {\r\n const todoList = Object.assign(\r\n new _TodoList__WEBPACK_IMPORTED_MODULE_2__.default(),\r\n JSON.parse(localStorage.getItem('todoList'))\r\n )\r\n\r\n todoList.setProjects(\r\n todoList\r\n .getProjects()\r\n .map((project) => Object.assign(new _Project__WEBPACK_IMPORTED_MODULE_0__.default(), project))\r\n )\r\n\r\n todoList\r\n .getProjects()\r\n .forEach((project) =>\r\n project.setTasks(\r\n project.getTasks().map((task) => Object.assign(new _Task__WEBPACK_IMPORTED_MODULE_1__.default(), task))\r\n )\r\n )\r\n\r\n return todoList\r\n }\r\n\r\n static addProject(project) {\r\n const todoList = Storage.getTodoList()\r\n todoList.addProject(project)\r\n Storage.saveTodoList(todoList)\r\n }\r\n\r\n static deleteProject(projectName) {\r\n const todoList = Storage.getTodoList()\r\n todoList.deleteProject(projectName)\r\n Storage.saveTodoList(todoList)\r\n }\r\n\r\n static addTask(projectName, task) {\r\n const todoList = Storage.getTodoList()\r\n todoList.getProject(projectName).addTask(task)\r\n Storage.saveTodoList(todoList)\r\n }\r\n\r\n static deleteTask(projectName, taskName) {\r\n const todoList = Storage.getTodoList()\r\n todoList.getProject(projectName).deleteTask(taskName)\r\n Storage.saveTodoList(todoList)\r\n }\r\n\r\n static renameTask(projectName, taskName, newTaskName) {\r\n const todoList = Storage.getTodoList()\r\n todoList.getProject(projectName).getTask(taskName).setName(newTaskName)\r\n Storage.saveTodoList(todoList)\r\n }\r\n\r\n static setTaskDate(projectName, taskName, newDueDate) {\r\n const todoList = Storage.getTodoList()\r\n todoList.getProject(projectName).getTask(taskName).setDate(newDueDate)\r\n Storage.saveTodoList(todoList)\r\n }\r\n\r\n static updateTodayProject() {\r\n const todoList = Storage.getTodoList()\r\n todoList.updateTodayProject()\r\n Storage.saveTodoList(todoList)\r\n }\r\n\r\n static updateWeekProject() {\r\n const todoList = Storage.getTodoList()\r\n todoList.updateWeekProject()\r\n Storage.saveTodoList(todoList)\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://todo-list/./src/modules/Storage.js?"); 450 | 451 | /***/ }), 452 | 453 | /***/ "./src/modules/Task.js": 454 | /*!*****************************!*\ 455 | !*** ./src/modules/Task.js ***! 456 | \*****************************/ 457 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 458 | 459 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ Task\n/* harmony export */ });\nclass Task {\r\n constructor(name, dueDate = 'No date') {\r\n this.name = name\r\n this.dueDate = dueDate\r\n }\r\n\r\n setName(name) {\r\n this.name = name\r\n }\r\n\r\n getName() {\r\n return this.name\r\n }\r\n\r\n setDate(dueDate) {\r\n this.dueDate = dueDate\r\n }\r\n\r\n getDate() {\r\n return this.dueDate\r\n }\r\n\r\n getDateFormatted() {\r\n const day = this.dueDate.split('/')[0]\r\n const month = this.dueDate.split('/')[1]\r\n const year = this.dueDate.split('/')[2]\r\n return `${month}/${day}/${year}`\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://todo-list/./src/modules/Task.js?"); 460 | 461 | /***/ }), 462 | 463 | /***/ "./src/modules/TodoList.js": 464 | /*!*********************************!*\ 465 | !*** ./src/modules/TodoList.js ***! 466 | \*********************************/ 467 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 468 | 469 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ TodoList\n/* harmony export */ });\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/esm/compareAsc/index.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _Project__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Project */ \"./src/modules/Project.js\");\n/* harmony import */ var _Task__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Task */ \"./src/modules/Task.js\");\n\r\n\r\n\r\n\r\nclass TodoList {\r\n constructor() {\r\n this.projects = []\r\n this.projects.push(new _Project__WEBPACK_IMPORTED_MODULE_0__.default('Inbox'))\r\n this.projects.push(new _Project__WEBPACK_IMPORTED_MODULE_0__.default('Today'))\r\n this.projects.push(new _Project__WEBPACK_IMPORTED_MODULE_0__.default('This week'))\r\n }\r\n\r\n setProjects(projects) {\r\n this.projects = projects\r\n }\r\n\r\n getProjects() {\r\n return this.projects\r\n }\r\n\r\n getProject(projectName) {\r\n return this.projects.find((project) => project.getName() === projectName)\r\n }\r\n\r\n contains(projectName) {\r\n return this.projects.some((project) => project.getName() === projectName)\r\n }\r\n\r\n addProject(newProject) {\r\n if (this.projects.find((project) => project.name === newProject.name))\r\n return\r\n this.projects.push(newProject)\r\n }\r\n\r\n deleteProject(projectName) {\r\n const projectToDelete = this.projects.find(\r\n (project) => project.getName() === projectName\r\n )\r\n this.projects.splice(this.projects.indexOf(projectToDelete), 1)\r\n }\r\n\r\n updateTodayProject() {\r\n this.getProject('Today').tasks = []\r\n\r\n this.projects.forEach((project) => {\r\n if (project.getName() === 'Today' || project.getName() === 'This week')\r\n return\r\n\r\n const todayTasks = project.getTasksToday()\r\n todayTasks.forEach((task) => {\r\n const taskName = `${task.getName()} (${project.getName()})`\r\n this.getProject('Today').addTask(new _Task__WEBPACK_IMPORTED_MODULE_1__.default(taskName, task.getDate()))\r\n })\r\n })\r\n }\r\n\r\n updateWeekProject() {\r\n this.getProject('This week').tasks = []\r\n\r\n this.projects.forEach((project) => {\r\n if (project.getName() === 'Today' || project.getName() === 'This week')\r\n return\r\n\r\n const weekTasks = project.getTasksThisWeek()\r\n weekTasks.forEach((task) => {\r\n const taskName = `${task.getName()} (${project.getName()})`\r\n this.getProject('This week').addTask(new _Task__WEBPACK_IMPORTED_MODULE_1__.default(taskName, task.getDate()))\r\n })\r\n })\r\n\r\n this.getProject('This week').setTasks(\r\n this.getProject('This week')\r\n .getTasks()\r\n .sort((taskA, taskB) =>\r\n (0,date_fns__WEBPACK_IMPORTED_MODULE_2__.default)(\r\n (0,date_fns__WEBPACK_IMPORTED_MODULE_3__.default)(new Date(taskA.getDateFormatted())),\r\n (0,date_fns__WEBPACK_IMPORTED_MODULE_3__.default)(new Date(taskB.getDateFormatted()))\r\n )\r\n )\r\n )\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://todo-list/./src/modules/TodoList.js?"); 470 | 471 | /***/ }), 472 | 473 | /***/ "./src/modules/UI.js": 474 | /*!***************************!*\ 475 | !*** ./src/modules/UI.js ***! 476 | \***************************/ 477 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 478 | 479 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ UI\n/* harmony export */ });\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/esm/format/index.js\");\n/* harmony import */ var _Storage__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Storage */ \"./src/modules/Storage.js\");\n/* harmony import */ var _Project__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Project */ \"./src/modules/Project.js\");\n/* harmony import */ var _Task__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Task */ \"./src/modules/Task.js\");\n\r\n\r\n\r\n\r\n\r\nclass UI {\r\n // LOADING CONTENT\r\n\r\n static loadHomepage() {\r\n UI.loadProjects()\r\n UI.initProjectButtons()\r\n UI.openProject('Inbox', document.getElementById('button-inbox-projects'))\r\n document.addEventListener('keydown', UI.handleKeyboardInput)\r\n }\r\n\r\n static loadProjects() {\r\n _Storage__WEBPACK_IMPORTED_MODULE_0__.default.getTodoList()\r\n .getProjects()\r\n .forEach((project) => {\r\n if (\r\n project.name !== 'Inbox' &&\r\n project.name !== 'Today' &&\r\n project.name !== 'This week'\r\n ) {\r\n UI.createProject(project.name)\r\n }\r\n })\r\n\r\n UI.initAddProjectButtons()\r\n }\r\n\r\n static loadTasks(projectName) {\r\n _Storage__WEBPACK_IMPORTED_MODULE_0__.default.getTodoList()\r\n .getProject(projectName)\r\n .getTasks()\r\n .forEach((task) => UI.createTask(task.name, task.dueDate))\r\n\r\n if (projectName !== 'Today' && projectName !== 'This week') {\r\n UI.initAddTaskButtons()\r\n }\r\n }\r\n\r\n static loadProjectContent(projectName) {\r\n const projectPreview = document.getElementById('project-preview')\r\n projectPreview.innerHTML = `\r\n

${projectName}

\r\n
`\r\n\r\n if (projectName !== 'Today' && projectName !== 'This week') {\r\n projectPreview.innerHTML += `\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n Cancel\r\n \r\n
\r\n
`\r\n }\r\n\r\n UI.loadTasks(projectName)\r\n }\r\n\r\n // CREATING CONTENT\r\n\r\n static createProject(name) {\r\n const userProjects = document.getElementById('projects-list')\r\n userProjects.innerHTML += ` \r\n `\r\n\r\n UI.initProjectButtons()\r\n }\r\n\r\n static createTask(name, dueDate) {\r\n const tasksList = document.getElementById('tasks-list')\r\n tasksList.innerHTML += `\r\n `\r\n\r\n UI.initTaskButtons()\r\n }\r\n\r\n static clear() {\r\n UI.clearProjectPreview()\r\n UI.clearProjects()\r\n UI.clearTasks()\r\n }\r\n\r\n static clearProjectPreview() {\r\n const projectPreview = document.getElementById('project-preview')\r\n projectPreview.textContent = ''\r\n }\r\n\r\n static clearProjects() {\r\n const projectsList = document.getElementById('projects-list')\r\n projectsList.textContent = ''\r\n }\r\n\r\n static clearTasks() {\r\n const tasksList = document.getElementById('tasks-list')\r\n tasksList.textContent = ''\r\n }\r\n\r\n static closeAllPopups() {\r\n UI.closeAddProjectPopup()\r\n if (document.getElementById('button-add-task')) {\r\n UI.closeAddTaskPopup()\r\n }\r\n if (\r\n document.getElementById('tasks-list') &&\r\n document.getElementById('tasks-list').innerHTML !== ''\r\n ) {\r\n UI.closeAllInputs()\r\n }\r\n }\r\n\r\n static closeAllInputs() {\r\n const taskButtons = document.querySelectorAll('[data-task-button]')\r\n\r\n taskButtons.forEach((button) => {\r\n UI.closeRenameInput(button)\r\n UI.closeSetDateInput(button)\r\n })\r\n }\r\n\r\n static handleKeyboardInput(e) {\r\n if (e.key === 'Escape') UI.closeAllPopups()\r\n }\r\n\r\n // PROJECT ADD EVENT LISTENERS\r\n\r\n static initAddProjectButtons() {\r\n const addProjectButton = document.getElementById('button-add-project')\r\n const addProjectPopupButton = document.getElementById(\r\n 'button-add-project-popup'\r\n )\r\n const cancelProjectPopupButton = document.getElementById(\r\n 'button-cancel-project-popup'\r\n )\r\n const addProjectPopupInput = document.getElementById(\r\n 'input-add-project-popup'\r\n )\r\n\r\n addProjectButton.addEventListener('click', UI.openAddProjectPopup)\r\n addProjectPopupButton.addEventListener('click', UI.addProject)\r\n cancelProjectPopupButton.addEventListener('click', UI.closeAddProjectPopup)\r\n addProjectPopupInput.addEventListener(\r\n 'keypress',\r\n UI.handleAddProjectPopupInput\r\n )\r\n }\r\n\r\n static openAddProjectPopup() {\r\n const addProjectPopup = document.getElementById('add-project-popup')\r\n const addProjectButton = document.getElementById('button-add-project')\r\n\r\n UI.closeAllPopups()\r\n addProjectPopup.classList.add('active')\r\n addProjectButton.classList.add('active')\r\n }\r\n\r\n static closeAddProjectPopup() {\r\n const addProjectPopup = document.getElementById('add-project-popup')\r\n const addProjectButton = document.getElementById('button-add-project')\r\n const addProjectPopupInput = document.getElementById(\r\n 'input-add-project-popup'\r\n )\r\n\r\n addProjectPopup.classList.remove('active')\r\n addProjectButton.classList.remove('active')\r\n addProjectPopupInput.value = ''\r\n }\r\n\r\n static addProject() {\r\n const addProjectPopupInput = document.getElementById(\r\n 'input-add-project-popup'\r\n )\r\n const projectName = addProjectPopupInput.value\r\n\r\n if (projectName === '') {\r\n alert(\"Project name can't be empty\")\r\n return\r\n }\r\n\r\n if (_Storage__WEBPACK_IMPORTED_MODULE_0__.default.getTodoList().contains(projectName)) {\r\n addProjectPopupInput.value = ''\r\n alert('Project names must be different')\r\n return\r\n }\r\n\r\n _Storage__WEBPACK_IMPORTED_MODULE_0__.default.addProject(new _Project__WEBPACK_IMPORTED_MODULE_1__.default(projectName))\r\n UI.createProject(projectName)\r\n UI.closeAddProjectPopup()\r\n }\r\n\r\n static handleAddProjectPopupInput(e) {\r\n if (e.key === 'Enter') UI.addProject()\r\n }\r\n\r\n // PROJECT EVENT LISTENERS\r\n\r\n static initProjectButtons() {\r\n const inboxProjectsButton = document.getElementById('button-inbox-projects')\r\n const todayProjectsButton = document.getElementById('button-today-projects')\r\n const weekProjectsButton = document.getElementById('button-week-projects')\r\n const projectButtons = document.querySelectorAll('[data-project-button]')\r\n const openNavButton = document.getElementById('button-open-nav')\r\n\r\n inboxProjectsButton.addEventListener('click', UI.openInboxTasks)\r\n todayProjectsButton.addEventListener('click', UI.openTodayTasks)\r\n weekProjectsButton.addEventListener('click', UI.openWeekTasks)\r\n projectButtons.forEach((projectButton) =>\r\n projectButton.addEventListener('click', UI.handleProjectButton)\r\n )\r\n openNavButton.addEventListener('click', UI.openNav)\r\n }\r\n\r\n static openInboxTasks() {\r\n UI.openProject('Inbox', this)\r\n }\r\n\r\n static openTodayTasks() {\r\n _Storage__WEBPACK_IMPORTED_MODULE_0__.default.updateTodayProject()\r\n UI.openProject('Today', this)\r\n }\r\n\r\n static openWeekTasks() {\r\n _Storage__WEBPACK_IMPORTED_MODULE_0__.default.updateWeekProject()\r\n UI.openProject('This week', this)\r\n }\r\n\r\n static handleProjectButton(e) {\r\n const projectName = this.children[0].children[1].textContent\r\n\r\n if (e.target.classList.contains('fa-times')) {\r\n UI.deleteProject(projectName, this)\r\n return\r\n }\r\n\r\n UI.openProject(projectName, this)\r\n }\r\n\r\n static openProject(projectName, projectButton) {\r\n const defaultProjectButtons = document.querySelectorAll(\r\n '.button-default-project'\r\n )\r\n const projectButtons = document.querySelectorAll('.button-project')\r\n const buttons = [...defaultProjectButtons, ...projectButtons]\r\n\r\n buttons.forEach((button) => button.classList.remove('active'))\r\n projectButton.classList.add('active')\r\n UI.closeAddProjectPopup()\r\n UI.loadProjectContent(projectName)\r\n }\r\n\r\n static deleteProject(projectName, button) {\r\n if (button.classList.contains('active')) UI.clearProjectPreview()\r\n _Storage__WEBPACK_IMPORTED_MODULE_0__.default.deleteProject(projectName)\r\n UI.clearProjects()\r\n UI.loadProjects()\r\n }\r\n\r\n static openNav() {\r\n const nav = document.getElementById('nav')\r\n\r\n UI.closeAllPopups()\r\n nav.classList.toggle('active')\r\n }\r\n\r\n // ADD TASK EVENT LISTENERS\r\n\r\n static initAddTaskButtons() {\r\n const addTaskButton = document.getElementById('button-add-task')\r\n const addTaskPopupButton = document.getElementById('button-add-task-popup')\r\n const cancelTaskPopupButton = document.getElementById(\r\n 'button-cancel-task-popup'\r\n )\r\n const addTaskPopupInput = document.getElementById('input-add-task-popup')\r\n\r\n addTaskButton.addEventListener('click', UI.openAddTaskPopup)\r\n addTaskPopupButton.addEventListener('click', UI.addTask)\r\n cancelTaskPopupButton.addEventListener('click', UI.closeAddTaskPopup)\r\n addTaskPopupInput.addEventListener('keypress', UI.handleAddTaskPopupInput)\r\n }\r\n\r\n static openAddTaskPopup() {\r\n const addTaskPopup = document.getElementById('add-task-popup')\r\n const addTaskButton = document.getElementById('button-add-task')\r\n\r\n UI.closeAllPopups()\r\n addTaskPopup.classList.add('active')\r\n addTaskButton.classList.add('active')\r\n }\r\n\r\n static closeAddTaskPopup() {\r\n const addTaskPopup = document.getElementById('add-task-popup')\r\n const addTaskButton = document.getElementById('button-add-task')\r\n const addTaskInput = document.getElementById('input-add-task-popup')\r\n\r\n addTaskPopup.classList.remove('active')\r\n addTaskButton.classList.remove('active')\r\n addTaskInput.value = ''\r\n }\r\n\r\n static addTask() {\r\n const projectName = document.getElementById('project-name').textContent\r\n const addTaskPopupInput = document.getElementById('input-add-task-popup')\r\n const taskName = addTaskPopupInput.value\r\n\r\n if (taskName === '') {\r\n alert(\"Task name can't be empty\")\r\n return\r\n }\r\n if (_Storage__WEBPACK_IMPORTED_MODULE_0__.default.getTodoList().getProject(projectName).contains(taskName)) {\r\n alert('Task names must be different')\r\n addTaskPopupInput.value = ''\r\n return\r\n }\r\n\r\n _Storage__WEBPACK_IMPORTED_MODULE_0__.default.addTask(projectName, new _Task__WEBPACK_IMPORTED_MODULE_2__.default(taskName))\r\n UI.createTask(taskName, 'No date')\r\n UI.closeAddTaskPopup()\r\n }\r\n\r\n static handleAddTaskPopupInput(e) {\r\n if (e.key === 'Enter') UI.addTask()\r\n }\r\n\r\n // TASK EVENT LISTENERS\r\n\r\n static initTaskButtons() {\r\n const taskButtons = document.querySelectorAll('[data-task-button]')\r\n const taskNameInputs = document.querySelectorAll('[data-input-task-name')\r\n const dueDateInputs = document.querySelectorAll('[data-input-due-date')\r\n\r\n taskButtons.forEach((taskButton) =>\r\n taskButton.addEventListener('click', UI.handleTaskButton)\r\n )\r\n taskNameInputs.forEach((taskNameInput) =>\r\n taskNameInput.addEventListener('keypress', UI.renameTask)\r\n )\r\n dueDateInputs.forEach((dueDateInput) =>\r\n dueDateInput.addEventListener('change', UI.setTaskDate)\r\n )\r\n }\r\n\r\n static handleTaskButton(e) {\r\n if (e.target.classList.contains('fa-circle')) {\r\n UI.setTaskCompleted(this)\r\n return\r\n }\r\n if (e.target.classList.contains('fa-times')) {\r\n UI.deleteTask(this)\r\n return\r\n }\r\n if (e.target.classList.contains('task-content')) {\r\n UI.openRenameInput(this)\r\n return\r\n }\r\n if (e.target.classList.contains('due-date')) {\r\n UI.openSetDateInput(this)\r\n }\r\n }\r\n\r\n static setTaskCompleted(taskButton) {\r\n const projectName = document.getElementById('project-name').textContent\r\n const taskName = taskButton.children[0].children[1].textContent\r\n\r\n if (projectName === 'Today' || projectName === 'This week') {\r\n const parentProjectName = taskName.split('(')[1].split(')')[0]\r\n _Storage__WEBPACK_IMPORTED_MODULE_0__.default.deleteTask(parentProjectName, taskName.split(' ')[0])\r\n if (projectName === 'Today') {\r\n _Storage__WEBPACK_IMPORTED_MODULE_0__.default.updateTodayProject()\r\n } else {\r\n _Storage__WEBPACK_IMPORTED_MODULE_0__.default.updateWeekProject()\r\n }\r\n } else {\r\n _Storage__WEBPACK_IMPORTED_MODULE_0__.default.deleteTask(projectName, taskName)\r\n }\r\n UI.clearTasks()\r\n UI.loadTasks(projectName)\r\n }\r\n\r\n static deleteTask(taskButton) {\r\n const projectName = document.getElementById('project-name').textContent\r\n const taskName = taskButton.children[0].children[1].textContent\r\n\r\n if (projectName === 'Today' || projectName === 'This week') {\r\n const mainProjectName = taskName.split('(')[1].split(')')[0]\r\n _Storage__WEBPACK_IMPORTED_MODULE_0__.default.deleteTask(mainProjectName, taskName)\r\n }\r\n _Storage__WEBPACK_IMPORTED_MODULE_0__.default.deleteTask(projectName, taskName)\r\n UI.clearTasks()\r\n UI.loadTasks(projectName)\r\n }\r\n\r\n static openRenameInput(taskButton) {\r\n const taskNamePara = taskButton.children[0].children[1]\r\n let taskName = taskNamePara.textContent\r\n const taskNameInput = taskButton.children[0].children[2]\r\n const projectName = taskButton.parentNode.parentNode.children[0].textContent\r\n\r\n if (projectName === 'Today' || projectName === 'This week') {\r\n ;[taskName] = taskName.split(' (')\r\n }\r\n\r\n UI.closeAllPopups()\r\n taskNamePara.classList.add('active')\r\n taskNameInput.classList.add('active')\r\n taskNameInput.value = taskName\r\n }\r\n\r\n static closeRenameInput(taskButton) {\r\n const taskName = taskButton.children[0].children[1]\r\n const taskNameInput = taskButton.children[0].children[2]\r\n\r\n taskName.classList.remove('active')\r\n taskNameInput.classList.remove('active')\r\n taskNameInput.value = ''\r\n }\r\n\r\n static renameTask(e) {\r\n if (e.key !== 'Enter') return\r\n\r\n const projectName = document.getElementById('project-name').textContent\r\n const taskName = this.previousElementSibling.textContent\r\n const newTaskName = this.value\r\n\r\n if (newTaskName === '') {\r\n alert(\"Task name can't be empty\")\r\n return\r\n }\r\n\r\n if (_Storage__WEBPACK_IMPORTED_MODULE_0__.default.getTodoList().getProject(projectName).contains(newTaskName)) {\r\n this.value = ''\r\n alert('Task names must be different')\r\n return\r\n }\r\n\r\n if (projectName === 'Today' || projectName === 'This week') {\r\n const mainProjectName = taskName.split('(')[1].split(')')[0]\r\n const mainTaskName = taskName.split(' ')[0]\r\n _Storage__WEBPACK_IMPORTED_MODULE_0__.default.renameTask(\r\n projectName,\r\n taskName,\r\n `${newTaskName} (${mainProjectName})`\r\n )\r\n _Storage__WEBPACK_IMPORTED_MODULE_0__.default.renameTask(mainProjectName, mainTaskName, newTaskName)\r\n } else {\r\n _Storage__WEBPACK_IMPORTED_MODULE_0__.default.renameTask(projectName, taskName, newTaskName)\r\n }\r\n UI.clearTasks()\r\n UI.loadTasks(projectName)\r\n UI.closeRenameInput(this.parentNode.parentNode)\r\n }\r\n\r\n static openSetDateInput(taskButton) {\r\n const dueDate = taskButton.children[1].children[0]\r\n const dueDateInput = taskButton.children[1].children[1]\r\n\r\n UI.closeAllPopups()\r\n dueDate.classList.add('active')\r\n dueDateInput.classList.add('active')\r\n }\r\n\r\n static closeSetDateInput(taskButton) {\r\n const dueDate = taskButton.children[1].children[0]\r\n const dueDateInput = taskButton.children[1].children[1]\r\n\r\n dueDate.classList.remove('active')\r\n dueDateInput.classList.remove('active')\r\n }\r\n\r\n static setTaskDate() {\r\n const taskButton = this.parentNode.parentNode\r\n const projectName = document.getElementById('project-name').textContent\r\n const taskName = taskButton.children[0].children[1].textContent\r\n const newDueDate = (0,date_fns__WEBPACK_IMPORTED_MODULE_3__.default)(new Date(this.value), 'dd/MM/yyyy')\r\n\r\n if (projectName === 'Today' || projectName === 'This week') {\r\n const mainProjectName = taskName.split('(')[1].split(')')[0]\r\n const mainTaskName = taskName.split(' (')[0]\r\n _Storage__WEBPACK_IMPORTED_MODULE_0__.default.setTaskDate(projectName, taskName, newDueDate)\r\n _Storage__WEBPACK_IMPORTED_MODULE_0__.default.setTaskDate(mainProjectName, mainTaskName, newDueDate)\r\n if (projectName === 'Today') {\r\n _Storage__WEBPACK_IMPORTED_MODULE_0__.default.updateTodayProject()\r\n } else {\r\n _Storage__WEBPACK_IMPORTED_MODULE_0__.default.updateWeekProject()\r\n }\r\n } else {\r\n _Storage__WEBPACK_IMPORTED_MODULE_0__.default.setTaskDate(projectName, taskName, newDueDate)\r\n }\r\n UI.clearTasks()\r\n UI.loadTasks(projectName)\r\n UI.closeSetDateInput(taskButton)\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://todo-list/./src/modules/UI.js?"); 480 | 481 | /***/ }) 482 | 483 | /******/ }); 484 | /************************************************************************/ 485 | /******/ // The module cache 486 | /******/ var __webpack_module_cache__ = {}; 487 | /******/ 488 | /******/ // The require function 489 | /******/ function __webpack_require__(moduleId) { 490 | /******/ // Check if module is in cache 491 | /******/ if(__webpack_module_cache__[moduleId]) { 492 | /******/ return __webpack_module_cache__[moduleId].exports; 493 | /******/ } 494 | /******/ // Create a new module (and put it into the cache) 495 | /******/ var module = __webpack_module_cache__[moduleId] = { 496 | /******/ // no module.id needed 497 | /******/ // no module.loaded needed 498 | /******/ exports: {} 499 | /******/ }; 500 | /******/ 501 | /******/ // Execute the module function 502 | /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 503 | /******/ 504 | /******/ // Return the exports of the module 505 | /******/ return module.exports; 506 | /******/ } 507 | /******/ 508 | /************************************************************************/ 509 | /******/ /* webpack/runtime/define property getters */ 510 | /******/ (() => { 511 | /******/ // define getter functions for harmony exports 512 | /******/ __webpack_require__.d = (exports, definition) => { 513 | /******/ for(var key in definition) { 514 | /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 515 | /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 516 | /******/ } 517 | /******/ } 518 | /******/ }; 519 | /******/ })(); 520 | /******/ 521 | /******/ /* webpack/runtime/hasOwnProperty shorthand */ 522 | /******/ (() => { 523 | /******/ __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop) 524 | /******/ })(); 525 | /******/ 526 | /******/ /* webpack/runtime/make namespace object */ 527 | /******/ (() => { 528 | /******/ // define __esModule on exports 529 | /******/ __webpack_require__.r = (exports) => { 530 | /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 531 | /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 532 | /******/ } 533 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); 534 | /******/ }; 535 | /******/ })(); 536 | /******/ 537 | /************************************************************************/ 538 | /******/ // startup 539 | /******/ // Load entry module 540 | /******/ __webpack_require__("./src/index.js"); 541 | /******/ // This entry module used 'exports' so it can't be inlined 542 | /******/ })() 543 | ; -------------------------------------------------------------------------------- /dist/style.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --primary-dark: #333; 3 | --secondary-dark: #444; 4 | --primary-light: #eee; 5 | --secondary-light: #ddd; 6 | } 7 | 8 | *, 9 | *::after, 10 | *::before { 11 | box-sizing: border-box; 12 | padding: 0; 13 | margin: 0; 14 | } 15 | 16 | html { 17 | /* footer support */ 18 | position: relative; 19 | min-height: 100%; 20 | } 21 | 22 | body { 23 | background-color: var(--primary-light); 24 | color: var(--primary-dark); 25 | font-family: 'Roboto', sans-serif; 26 | line-height: 1.6; 27 | /* footer support */ 28 | margin-bottom: 48px; 29 | } 30 | 31 | button, 32 | input { 33 | border: none; 34 | color: inherit; 35 | font-family: inherit; 36 | font-size: inherit; 37 | outline: none; 38 | } 39 | 40 | button { 41 | width: 100%; 42 | padding: 10px 20px; 43 | border-radius: 5px; 44 | cursor: pointer; 45 | } 46 | 47 | input { 48 | width: 100%; 49 | padding: 10px; 50 | border-radius: 5px; 51 | } 52 | 53 | i { 54 | margin-right: 10px; 55 | } 56 | 57 | /* Header */ 58 | 59 | .header { 60 | display: flex; 61 | align-items: center; 62 | justify-content: space-between; 63 | padding: 20px; 64 | background-color: var(--primary-dark); 65 | color: var(--primary-light); 66 | } 67 | 68 | .logo { 69 | display: flex; 70 | align-items: center; 71 | justify-content: center; 72 | } 73 | 74 | .fa-check-double { 75 | font-size: 40px; 76 | } 77 | 78 | .page-name { 79 | font-family: 'Yusei Magic', sans-serif; 80 | font-size: 40px; 81 | } 82 | 83 | .button-open-nav { 84 | display: none; 85 | width: 40px; 86 | padding: 0; 87 | background-color: var(--primary-dark); 88 | font-size: 40px; 89 | } 90 | 91 | .button-open-nav i { 92 | margin-right: 0; 93 | } 94 | 95 | /* Main */ 96 | 97 | .main { 98 | display: flex; 99 | /* navbar support */ 100 | min-height: calc(100vh - 104px - 48px); /* - header_height - footer_height */ 101 | } 102 | 103 | .nav { 104 | width: 300px; 105 | min-width: 250px; 106 | padding: 20px; 107 | background-color: var(--secondary-light); 108 | } 109 | 110 | .nav.active { 111 | display: block; 112 | } 113 | 114 | .button-default-project { 115 | background-color: var(--secondary-light); 116 | text-align: left; 117 | } 118 | 119 | .fa-inbox { 120 | margin-right: 6px; 121 | } 122 | 123 | .projects-title { 124 | padding: 10px; 125 | margin-top: 10px; 126 | } 127 | 128 | .button-project { 129 | display: flex; 130 | align-items: center; 131 | justify-content: space-between; 132 | background-color: var(--secondary-light); 133 | text-align: left; 134 | } 135 | 136 | .button-add-project { 137 | margin-top: 10px; 138 | margin-left: 2px; 139 | background-color: var(--secondary-light); 140 | text-align: left; 141 | } 142 | 143 | .button-add-project.active { 144 | display: none; 145 | } 146 | 147 | .button-project.active, 148 | .button-default-project.active { 149 | background-color: #ccc; 150 | font-weight: bold; 151 | } 152 | 153 | .button-project:hover, 154 | .button-default-project:hover, 155 | .button-add-project:hover { 156 | background-color: #ccc; 157 | } 158 | 159 | .right-project-panel { 160 | visibility: hidden; 161 | } 162 | 163 | .button-project:hover .right-project-panel { 164 | visibility: visible; 165 | } 166 | 167 | .fa-times { 168 | margin-right: 0; 169 | } 170 | 171 | .add-project-popup { 172 | display: none; 173 | width: 100%; 174 | padding: 10px; 175 | text-align: center; 176 | } 177 | 178 | .add-project-popup.active { 179 | display: block; 180 | } 181 | 182 | .input-add-project-popup { 183 | border: 1px solid #aaa; 184 | margin-bottom: 10px; 185 | } 186 | 187 | .add-project-popup-buttons { 188 | display: flex; 189 | align-items: center; 190 | justify-content: space-between; 191 | gap: 20px; 192 | } 193 | 194 | .button-add-project-popup { 195 | border: 1px solid #99dd99; 196 | background-color: #aaffaa; 197 | font-weight: bold; 198 | } 199 | 200 | .button-cancel-project-popup { 201 | border: 1px solid #eeadad; 202 | background-color: #ffbebe; 203 | font-weight: bold; 204 | } 205 | 206 | .button-add-project-popup:hover { 207 | background-color: #a6f0a6; 208 | } 209 | 210 | .button-cancel-project-popup:hover { 211 | background-color: #f5b2b2; 212 | } 213 | 214 | .project-preview { 215 | width: 900px; 216 | padding: 20px 40px; 217 | margin: 0 auto; 218 | } 219 | 220 | .project-preview h1 { 221 | padding: 0 10px; 222 | margin-bottom: 10px; 223 | } 224 | 225 | .button-task { 226 | display: flex; 227 | align-items: center; 228 | justify-content: space-between; 229 | padding: 10px; 230 | background-color: var(--primary-light); 231 | cursor: default; 232 | } 233 | 234 | .button-task:hover { 235 | background-color: var(--secondary-light); 236 | } 237 | 238 | .left-task-panel { 239 | display: flex; 240 | align-items: center; 241 | } 242 | 243 | .fa-circle { 244 | font-size: 24px; 245 | cursor: pointer; 246 | } 247 | 248 | .task-content { 249 | cursor: pointer; 250 | } 251 | 252 | .task-content.active { 253 | display: none; 254 | } 255 | 256 | .input-task-name { 257 | display: none; 258 | height: 24px; 259 | padding: 5px; 260 | border: 1px solid #555; 261 | background-color: var(--primary-light); 262 | color: inherit; 263 | font-family: inherit; 264 | } 265 | 266 | .input-task-name.active { 267 | display: block; 268 | } 269 | 270 | .right-task-panel { 271 | display: flex; 272 | align-items: center; 273 | } 274 | 275 | .due-date { 276 | margin-right: 10px; 277 | cursor: pointer; 278 | } 279 | 280 | .due-date.active { 281 | display: none; 282 | } 283 | 284 | .input-due-date { 285 | display: none; 286 | height: 24px; 287 | padding: 5px; 288 | border: 1px solid #555; 289 | margin: 0 10px; 290 | background-color: var(--primary-light); 291 | color: inherit; 292 | font-family: inherit; 293 | } 294 | 295 | .input-due-date.active { 296 | display: block; 297 | } 298 | 299 | .button-task .right-task-panel i { 300 | visibility: hidden; 301 | cursor: pointer; 302 | } 303 | 304 | .button-task:hover .right-task-panel i { 305 | visibility: visible; 306 | } 307 | 308 | .button-add-task { 309 | display: block; 310 | padding-left: 15px; 311 | margin-top: 10px; 312 | text-align: left; 313 | } 314 | 315 | .button-add-task.active { 316 | display: none; 317 | } 318 | 319 | .button-add-task:hover { 320 | background-color: var(--secondary-light); 321 | } 322 | 323 | .add-task-popup { 324 | display: none; 325 | width: 100%; 326 | padding: 10px; 327 | text-align: center; 328 | } 329 | 330 | .add-task-popup.active { 331 | display: block; 332 | } 333 | 334 | .input-add-task-popup { 335 | border: 1px solid #aaa; 336 | margin-bottom: 10px; 337 | } 338 | 339 | .add-task-popup-buttons { 340 | display: flex; 341 | align-items: center; 342 | justify-content: space-around; 343 | gap: 20px; 344 | } 345 | 346 | .button-add-task-popup { 347 | border: 1px solid #99dd99; 348 | background-color: #aaffaa; 349 | font-weight: bold; 350 | } 351 | 352 | .button-cancel-task-popup { 353 | border: 1px solid #eeadad; 354 | background-color: #ffbebe; 355 | font-weight: bold; 356 | } 357 | 358 | .button-add-task-popup:hover { 359 | background-color: #a6f0a6; 360 | } 361 | 362 | .button-cancel-task-popup:hover { 363 | background-color: #f5b2b2; 364 | } 365 | 366 | /* Footer */ 367 | 368 | .footer { 369 | position: absolute; 370 | bottom: 0; 371 | left: 0; 372 | display: flex; 373 | align-items: center; 374 | justify-content: center; 375 | gap: 10px; 376 | width: 100%; 377 | padding: 10px; 378 | background-color: var(--primary-dark); 379 | color: var(--primary-light); 380 | font-size: 18px; 381 | } 382 | 383 | .fa-github { 384 | color: var(--primary-light); 385 | font-size: 22px; 386 | transition: transform 0.3s ease-in-out; 387 | } 388 | 389 | .fa-github:hover { 390 | transform: rotate(360deg) scale(1.2); 391 | } 392 | 393 | /* Media queries */ 394 | 395 | @media (max-width: 650px) { 396 | .button-open-nav { 397 | display: block; 398 | } 399 | 400 | .main { 401 | flex-direction: column; 402 | } 403 | 404 | .nav { 405 | width: 100%; 406 | display: none; 407 | } 408 | 409 | .project-preview { 410 | width: 100%; 411 | } 412 | 413 | .right-task-panel { 414 | justify-content: flex-end; 415 | max-width: 33%; 416 | } 417 | } 418 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "todo-list", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "watch": "webpack --progress --watch", 9 | "lint": "eslint .", 10 | "lint:fix": "eslint . --fix" 11 | }, 12 | "author": "michalosman", 13 | "license": "ISC", 14 | "devDependencies": { 15 | "eslint": "^7.2.0", 16 | "eslint-config-airbnb": "^18.2.1", 17 | "eslint-config-prettier": "^7.2.0", 18 | "eslint-plugin-import": "^2.22.1", 19 | "eslint-plugin-jsx-a11y": "^6.4.1", 20 | "eslint-plugin-prettier": "^3.3.1", 21 | "eslint-plugin-react": "^7.21.5", 22 | "eslint-plugin-react-hooks": "^1.7.0", 23 | "prettier": "^2.2.1", 24 | "webpack": "^5.18.0", 25 | "webpack-cli": "^4.4.0" 26 | }, 27 | "dependencies": { 28 | "date-fns": "^2.16.1" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import UI from './modules/UI' 2 | 3 | document.addEventListener('DOMContentLoaded', UI.loadHomepage) 4 | -------------------------------------------------------------------------------- /src/modules/Project.js: -------------------------------------------------------------------------------- 1 | import { toDate, isToday, isThisWeek, subDays } from 'date-fns' 2 | 3 | export default class Project { 4 | constructor(name) { 5 | this.name = name 6 | this.tasks = [] 7 | } 8 | 9 | setName(name) { 10 | this.name = name 11 | } 12 | 13 | getName() { 14 | return this.name 15 | } 16 | 17 | setTasks(tasks) { 18 | this.tasks = tasks 19 | } 20 | 21 | getTasks() { 22 | return this.tasks 23 | } 24 | 25 | getTask(taskName) { 26 | return this.tasks.find((task) => task.getName() === taskName) 27 | } 28 | 29 | contains(taskName) { 30 | return this.tasks.some((task) => task.getName() === taskName) 31 | } 32 | 33 | addTask(newTask) { 34 | if (this.tasks.find((task) => task.getName() === newTask.name)) return 35 | this.tasks.push(newTask) 36 | } 37 | 38 | deleteTask(taskName) { 39 | this.tasks = this.tasks.filter((task) => task.name !== taskName) 40 | } 41 | 42 | getTasksToday() { 43 | return this.tasks.filter((task) => { 44 | const taskDate = new Date(task.getDateFormatted()) 45 | return isToday(toDate(taskDate)) 46 | }) 47 | } 48 | 49 | getTasksThisWeek() { 50 | return this.tasks.filter((task) => { 51 | const taskDate = new Date(task.getDateFormatted()) 52 | return isThisWeek(subDays(toDate(taskDate), 1)) 53 | }) 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/modules/Storage.js: -------------------------------------------------------------------------------- 1 | import Project from './Project' 2 | import Task from './Task' 3 | import TodoList from './TodoList' 4 | 5 | export default class Storage { 6 | static saveTodoList(data) { 7 | localStorage.setItem('todoList', JSON.stringify(data)) 8 | } 9 | 10 | static getTodoList() { 11 | const todoList = Object.assign( 12 | new TodoList(), 13 | JSON.parse(localStorage.getItem('todoList')) 14 | ) 15 | 16 | todoList.setProjects( 17 | todoList 18 | .getProjects() 19 | .map((project) => Object.assign(new Project(), project)) 20 | ) 21 | 22 | todoList 23 | .getProjects() 24 | .forEach((project) => 25 | project.setTasks( 26 | project.getTasks().map((task) => Object.assign(new Task(), task)) 27 | ) 28 | ) 29 | 30 | return todoList 31 | } 32 | 33 | static addProject(project) { 34 | const todoList = Storage.getTodoList() 35 | todoList.addProject(project) 36 | Storage.saveTodoList(todoList) 37 | } 38 | 39 | static deleteProject(projectName) { 40 | const todoList = Storage.getTodoList() 41 | todoList.deleteProject(projectName) 42 | Storage.saveTodoList(todoList) 43 | } 44 | 45 | static addTask(projectName, task) { 46 | const todoList = Storage.getTodoList() 47 | todoList.getProject(projectName).addTask(task) 48 | Storage.saveTodoList(todoList) 49 | } 50 | 51 | static deleteTask(projectName, taskName) { 52 | const todoList = Storage.getTodoList() 53 | todoList.getProject(projectName).deleteTask(taskName) 54 | Storage.saveTodoList(todoList) 55 | } 56 | 57 | static renameTask(projectName, taskName, newTaskName) { 58 | const todoList = Storage.getTodoList() 59 | todoList.getProject(projectName).getTask(taskName).setName(newTaskName) 60 | Storage.saveTodoList(todoList) 61 | } 62 | 63 | static setTaskDate(projectName, taskName, newDueDate) { 64 | const todoList = Storage.getTodoList() 65 | todoList.getProject(projectName).getTask(taskName).setDate(newDueDate) 66 | Storage.saveTodoList(todoList) 67 | } 68 | 69 | static updateTodayProject() { 70 | const todoList = Storage.getTodoList() 71 | todoList.updateTodayProject() 72 | Storage.saveTodoList(todoList) 73 | } 74 | 75 | static updateWeekProject() { 76 | const todoList = Storage.getTodoList() 77 | todoList.updateWeekProject() 78 | Storage.saveTodoList(todoList) 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/modules/Task.js: -------------------------------------------------------------------------------- 1 | export default class Task { 2 | constructor(name, dueDate = 'No date') { 3 | this.name = name 4 | this.dueDate = dueDate 5 | } 6 | 7 | setName(name) { 8 | this.name = name 9 | } 10 | 11 | getName() { 12 | return this.name 13 | } 14 | 15 | setDate(dueDate) { 16 | this.dueDate = dueDate 17 | } 18 | 19 | getDate() { 20 | return this.dueDate 21 | } 22 | 23 | getDateFormatted() { 24 | const day = this.dueDate.split('/')[0] 25 | const month = this.dueDate.split('/')[1] 26 | const year = this.dueDate.split('/')[2] 27 | return `${month}/${day}/${year}` 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/modules/TodoList.js: -------------------------------------------------------------------------------- 1 | import { compareAsc, toDate } from 'date-fns' 2 | import Project from './Project' 3 | import Task from './Task' 4 | 5 | export default class TodoList { 6 | constructor() { 7 | this.projects = [] 8 | this.projects.push(new Project('Inbox')) 9 | this.projects.push(new Project('Today')) 10 | this.projects.push(new Project('This week')) 11 | } 12 | 13 | setProjects(projects) { 14 | this.projects = projects 15 | } 16 | 17 | getProjects() { 18 | return this.projects 19 | } 20 | 21 | getProject(projectName) { 22 | return this.projects.find((project) => project.getName() === projectName) 23 | } 24 | 25 | contains(projectName) { 26 | return this.projects.some((project) => project.getName() === projectName) 27 | } 28 | 29 | addProject(newProject) { 30 | if (this.projects.find((project) => project.name === newProject.name)) 31 | return 32 | this.projects.push(newProject) 33 | } 34 | 35 | deleteProject(projectName) { 36 | const projectToDelete = this.projects.find( 37 | (project) => project.getName() === projectName 38 | ) 39 | this.projects.splice(this.projects.indexOf(projectToDelete), 1) 40 | } 41 | 42 | updateTodayProject() { 43 | this.getProject('Today').tasks = [] 44 | 45 | this.projects.forEach((project) => { 46 | if (project.getName() === 'Today' || project.getName() === 'This week') 47 | return 48 | 49 | const todayTasks = project.getTasksToday() 50 | todayTasks.forEach((task) => { 51 | const taskName = `${task.getName()} (${project.getName()})` 52 | this.getProject('Today').addTask(new Task(taskName, task.getDate())) 53 | }) 54 | }) 55 | } 56 | 57 | updateWeekProject() { 58 | this.getProject('This week').tasks = [] 59 | 60 | this.projects.forEach((project) => { 61 | if (project.getName() === 'Today' || project.getName() === 'This week') 62 | return 63 | 64 | const weekTasks = project.getTasksThisWeek() 65 | weekTasks.forEach((task) => { 66 | const taskName = `${task.getName()} (${project.getName()})` 67 | this.getProject('This week').addTask(new Task(taskName, task.getDate())) 68 | }) 69 | }) 70 | 71 | this.getProject('This week').setTasks( 72 | this.getProject('This week') 73 | .getTasks() 74 | .sort((taskA, taskB) => 75 | compareAsc( 76 | toDate(new Date(taskA.getDateFormatted())), 77 | toDate(new Date(taskB.getDateFormatted())) 78 | ) 79 | ) 80 | ) 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/modules/UI.js: -------------------------------------------------------------------------------- 1 | import { format } from 'date-fns' 2 | import Storage from './Storage' 3 | import Project from './Project' 4 | import Task from './Task' 5 | 6 | export default class UI { 7 | // LOADING CONTENT 8 | 9 | static loadHomepage() { 10 | UI.loadProjects() 11 | UI.initProjectButtons() 12 | UI.openProject('Inbox', document.getElementById('button-inbox-projects')) 13 | document.addEventListener('keydown', UI.handleKeyboardInput) 14 | } 15 | 16 | static loadProjects() { 17 | Storage.getTodoList() 18 | .getProjects() 19 | .forEach((project) => { 20 | if ( 21 | project.name !== 'Inbox' && 22 | project.name !== 'Today' && 23 | project.name !== 'This week' 24 | ) { 25 | UI.createProject(project.name) 26 | } 27 | }) 28 | 29 | UI.initAddProjectButtons() 30 | } 31 | 32 | static loadTasks(projectName) { 33 | Storage.getTodoList() 34 | .getProject(projectName) 35 | .getTasks() 36 | .forEach((task) => UI.createTask(task.name, task.dueDate)) 37 | 38 | if (projectName !== 'Today' && projectName !== 'This week') { 39 | UI.initAddTaskButtons() 40 | } 41 | } 42 | 43 | static loadProjectContent(projectName) { 44 | const projectPreview = document.getElementById('project-preview') 45 | projectPreview.innerHTML = ` 46 |

${projectName}

47 |
` 48 | 49 | if (projectName !== 'Today' && projectName !== 'This week') { 50 | projectPreview.innerHTML += ` 51 | 55 |
56 | 61 |
62 | 65 | 71 |
72 |
` 73 | } 74 | 75 | UI.loadTasks(projectName) 76 | } 77 | 78 | // CREATING CONTENT 79 | 80 | static createProject(name) { 81 | const userProjects = document.getElementById('projects-list') 82 | userProjects.innerHTML += ` 83 | ` 92 | 93 | UI.initProjectButtons() 94 | } 95 | 96 | static createTask(name, dueDate) { 97 | const tasksList = document.getElementById('tasks-list') 98 | tasksList.innerHTML += ` 99 | ` 111 | 112 | UI.initTaskButtons() 113 | } 114 | 115 | static clear() { 116 | UI.clearProjectPreview() 117 | UI.clearProjects() 118 | UI.clearTasks() 119 | } 120 | 121 | static clearProjectPreview() { 122 | const projectPreview = document.getElementById('project-preview') 123 | projectPreview.textContent = '' 124 | } 125 | 126 | static clearProjects() { 127 | const projectsList = document.getElementById('projects-list') 128 | projectsList.textContent = '' 129 | } 130 | 131 | static clearTasks() { 132 | const tasksList = document.getElementById('tasks-list') 133 | tasksList.textContent = '' 134 | } 135 | 136 | static closeAllPopups() { 137 | UI.closeAddProjectPopup() 138 | if (document.getElementById('button-add-task')) { 139 | UI.closeAddTaskPopup() 140 | } 141 | if ( 142 | document.getElementById('tasks-list') && 143 | document.getElementById('tasks-list').innerHTML !== '' 144 | ) { 145 | UI.closeAllInputs() 146 | } 147 | } 148 | 149 | static closeAllInputs() { 150 | const taskButtons = document.querySelectorAll('[data-task-button]') 151 | 152 | taskButtons.forEach((button) => { 153 | UI.closeRenameInput(button) 154 | UI.closeSetDateInput(button) 155 | }) 156 | } 157 | 158 | static handleKeyboardInput(e) { 159 | if (e.key === 'Escape') UI.closeAllPopups() 160 | } 161 | 162 | // PROJECT ADD EVENT LISTENERS 163 | 164 | static initAddProjectButtons() { 165 | const addProjectButton = document.getElementById('button-add-project') 166 | const addProjectPopupButton = document.getElementById( 167 | 'button-add-project-popup' 168 | ) 169 | const cancelProjectPopupButton = document.getElementById( 170 | 'button-cancel-project-popup' 171 | ) 172 | const addProjectPopupInput = document.getElementById( 173 | 'input-add-project-popup' 174 | ) 175 | 176 | addProjectButton.addEventListener('click', UI.openAddProjectPopup) 177 | addProjectPopupButton.addEventListener('click', UI.addProject) 178 | cancelProjectPopupButton.addEventListener('click', UI.closeAddProjectPopup) 179 | addProjectPopupInput.addEventListener( 180 | 'keypress', 181 | UI.handleAddProjectPopupInput 182 | ) 183 | } 184 | 185 | static openAddProjectPopup() { 186 | const addProjectPopup = document.getElementById('add-project-popup') 187 | const addProjectButton = document.getElementById('button-add-project') 188 | 189 | UI.closeAllPopups() 190 | addProjectPopup.classList.add('active') 191 | addProjectButton.classList.add('active') 192 | } 193 | 194 | static closeAddProjectPopup() { 195 | const addProjectPopup = document.getElementById('add-project-popup') 196 | const addProjectButton = document.getElementById('button-add-project') 197 | const addProjectPopupInput = document.getElementById( 198 | 'input-add-project-popup' 199 | ) 200 | 201 | addProjectPopup.classList.remove('active') 202 | addProjectButton.classList.remove('active') 203 | addProjectPopupInput.value = '' 204 | } 205 | 206 | static addProject() { 207 | const addProjectPopupInput = document.getElementById( 208 | 'input-add-project-popup' 209 | ) 210 | const projectName = addProjectPopupInput.value 211 | 212 | if (projectName === '') { 213 | alert("Project name can't be empty") 214 | return 215 | } 216 | 217 | if (Storage.getTodoList().contains(projectName)) { 218 | addProjectPopupInput.value = '' 219 | alert('Project names must be different') 220 | return 221 | } 222 | 223 | Storage.addProject(new Project(projectName)) 224 | UI.createProject(projectName) 225 | UI.closeAddProjectPopup() 226 | } 227 | 228 | static handleAddProjectPopupInput(e) { 229 | if (e.key === 'Enter') UI.addProject() 230 | } 231 | 232 | // PROJECT EVENT LISTENERS 233 | 234 | static initProjectButtons() { 235 | const inboxProjectsButton = document.getElementById('button-inbox-projects') 236 | const todayProjectsButton = document.getElementById('button-today-projects') 237 | const weekProjectsButton = document.getElementById('button-week-projects') 238 | const projectButtons = document.querySelectorAll('[data-project-button]') 239 | const openNavButton = document.getElementById('button-open-nav') 240 | 241 | inboxProjectsButton.addEventListener('click', UI.openInboxTasks) 242 | todayProjectsButton.addEventListener('click', UI.openTodayTasks) 243 | weekProjectsButton.addEventListener('click', UI.openWeekTasks) 244 | projectButtons.forEach((projectButton) => 245 | projectButton.addEventListener('click', UI.handleProjectButton) 246 | ) 247 | openNavButton.addEventListener('click', UI.openNav) 248 | } 249 | 250 | static openInboxTasks() { 251 | UI.openProject('Inbox', this) 252 | } 253 | 254 | static openTodayTasks() { 255 | Storage.updateTodayProject() 256 | UI.openProject('Today', this) 257 | } 258 | 259 | static openWeekTasks() { 260 | Storage.updateWeekProject() 261 | UI.openProject('This week', this) 262 | } 263 | 264 | static handleProjectButton(e) { 265 | const projectName = this.children[0].children[1].textContent 266 | 267 | if (e.target.classList.contains('fa-times')) { 268 | UI.deleteProject(projectName, this) 269 | return 270 | } 271 | 272 | UI.openProject(projectName, this) 273 | } 274 | 275 | static openProject(projectName, projectButton) { 276 | const defaultProjectButtons = document.querySelectorAll( 277 | '.button-default-project' 278 | ) 279 | const projectButtons = document.querySelectorAll('.button-project') 280 | const buttons = [...defaultProjectButtons, ...projectButtons] 281 | 282 | buttons.forEach((button) => button.classList.remove('active')) 283 | projectButton.classList.add('active') 284 | UI.closeAddProjectPopup() 285 | UI.loadProjectContent(projectName) 286 | } 287 | 288 | static deleteProject(projectName, button) { 289 | if (button.classList.contains('active')) UI.clearProjectPreview() 290 | Storage.deleteProject(projectName) 291 | UI.clearProjects() 292 | UI.loadProjects() 293 | } 294 | 295 | static openNav() { 296 | const nav = document.getElementById('nav') 297 | 298 | UI.closeAllPopups() 299 | nav.classList.toggle('active') 300 | } 301 | 302 | // ADD TASK EVENT LISTENERS 303 | 304 | static initAddTaskButtons() { 305 | const addTaskButton = document.getElementById('button-add-task') 306 | const addTaskPopupButton = document.getElementById('button-add-task-popup') 307 | const cancelTaskPopupButton = document.getElementById( 308 | 'button-cancel-task-popup' 309 | ) 310 | const addTaskPopupInput = document.getElementById('input-add-task-popup') 311 | 312 | addTaskButton.addEventListener('click', UI.openAddTaskPopup) 313 | addTaskPopupButton.addEventListener('click', UI.addTask) 314 | cancelTaskPopupButton.addEventListener('click', UI.closeAddTaskPopup) 315 | addTaskPopupInput.addEventListener('keypress', UI.handleAddTaskPopupInput) 316 | } 317 | 318 | static openAddTaskPopup() { 319 | const addTaskPopup = document.getElementById('add-task-popup') 320 | const addTaskButton = document.getElementById('button-add-task') 321 | 322 | UI.closeAllPopups() 323 | addTaskPopup.classList.add('active') 324 | addTaskButton.classList.add('active') 325 | } 326 | 327 | static closeAddTaskPopup() { 328 | const addTaskPopup = document.getElementById('add-task-popup') 329 | const addTaskButton = document.getElementById('button-add-task') 330 | const addTaskInput = document.getElementById('input-add-task-popup') 331 | 332 | addTaskPopup.classList.remove('active') 333 | addTaskButton.classList.remove('active') 334 | addTaskInput.value = '' 335 | } 336 | 337 | static addTask() { 338 | const projectName = document.getElementById('project-name').textContent 339 | const addTaskPopupInput = document.getElementById('input-add-task-popup') 340 | const taskName = addTaskPopupInput.value 341 | 342 | if (taskName === '') { 343 | alert("Task name can't be empty") 344 | return 345 | } 346 | if (Storage.getTodoList().getProject(projectName).contains(taskName)) { 347 | alert('Task names must be different') 348 | addTaskPopupInput.value = '' 349 | return 350 | } 351 | 352 | Storage.addTask(projectName, new Task(taskName)) 353 | UI.createTask(taskName, 'No date') 354 | UI.closeAddTaskPopup() 355 | } 356 | 357 | static handleAddTaskPopupInput(e) { 358 | if (e.key === 'Enter') UI.addTask() 359 | } 360 | 361 | // TASK EVENT LISTENERS 362 | 363 | static initTaskButtons() { 364 | const taskButtons = document.querySelectorAll('[data-task-button]') 365 | const taskNameInputs = document.querySelectorAll('[data-input-task-name') 366 | const dueDateInputs = document.querySelectorAll('[data-input-due-date') 367 | 368 | taskButtons.forEach((taskButton) => 369 | taskButton.addEventListener('click', UI.handleTaskButton) 370 | ) 371 | taskNameInputs.forEach((taskNameInput) => 372 | taskNameInput.addEventListener('keypress', UI.renameTask) 373 | ) 374 | dueDateInputs.forEach((dueDateInput) => 375 | dueDateInput.addEventListener('change', UI.setTaskDate) 376 | ) 377 | } 378 | 379 | static handleTaskButton(e) { 380 | if (e.target.classList.contains('fa-circle')) { 381 | UI.setTaskCompleted(this) 382 | return 383 | } 384 | if (e.target.classList.contains('fa-times')) { 385 | UI.deleteTask(this) 386 | return 387 | } 388 | if (e.target.classList.contains('task-content')) { 389 | UI.openRenameInput(this) 390 | return 391 | } 392 | if (e.target.classList.contains('due-date')) { 393 | UI.openSetDateInput(this) 394 | } 395 | } 396 | 397 | static setTaskCompleted(taskButton) { 398 | const projectName = document.getElementById('project-name').textContent 399 | const taskName = taskButton.children[0].children[1].textContent 400 | 401 | if (projectName === 'Today' || projectName === 'This week') { 402 | const parentProjectName = taskName.split('(')[1].split(')')[0] 403 | Storage.deleteTask(parentProjectName, taskName.split(' ')[0]) 404 | if (projectName === 'Today') { 405 | Storage.updateTodayProject() 406 | } else { 407 | Storage.updateWeekProject() 408 | } 409 | } else { 410 | Storage.deleteTask(projectName, taskName) 411 | } 412 | UI.clearTasks() 413 | UI.loadTasks(projectName) 414 | } 415 | 416 | static deleteTask(taskButton) { 417 | const projectName = document.getElementById('project-name').textContent 418 | const taskName = taskButton.children[0].children[1].textContent 419 | 420 | if (projectName === 'Today' || projectName === 'This week') { 421 | const mainProjectName = taskName.split('(')[1].split(')')[0] 422 | Storage.deleteTask(mainProjectName, taskName) 423 | } 424 | Storage.deleteTask(projectName, taskName) 425 | UI.clearTasks() 426 | UI.loadTasks(projectName) 427 | } 428 | 429 | static openRenameInput(taskButton) { 430 | const taskNamePara = taskButton.children[0].children[1] 431 | let taskName = taskNamePara.textContent 432 | const taskNameInput = taskButton.children[0].children[2] 433 | const projectName = taskButton.parentNode.parentNode.children[0].textContent 434 | 435 | if (projectName === 'Today' || projectName === 'This week') { 436 | ;[taskName] = taskName.split(' (') 437 | } 438 | 439 | UI.closeAllPopups() 440 | taskNamePara.classList.add('active') 441 | taskNameInput.classList.add('active') 442 | taskNameInput.value = taskName 443 | } 444 | 445 | static closeRenameInput(taskButton) { 446 | const taskName = taskButton.children[0].children[1] 447 | const taskNameInput = taskButton.children[0].children[2] 448 | 449 | taskName.classList.remove('active') 450 | taskNameInput.classList.remove('active') 451 | taskNameInput.value = '' 452 | } 453 | 454 | static renameTask(e) { 455 | if (e.key !== 'Enter') return 456 | 457 | const projectName = document.getElementById('project-name').textContent 458 | const taskName = this.previousElementSibling.textContent 459 | const newTaskName = this.value 460 | 461 | if (newTaskName === '') { 462 | alert("Task name can't be empty") 463 | return 464 | } 465 | 466 | if (Storage.getTodoList().getProject(projectName).contains(newTaskName)) { 467 | this.value = '' 468 | alert('Task names must be different') 469 | return 470 | } 471 | 472 | if (projectName === 'Today' || projectName === 'This week') { 473 | const mainProjectName = taskName.split('(')[1].split(')')[0] 474 | const mainTaskName = taskName.split(' ')[0] 475 | Storage.renameTask( 476 | projectName, 477 | taskName, 478 | `${newTaskName} (${mainProjectName})` 479 | ) 480 | Storage.renameTask(mainProjectName, mainTaskName, newTaskName) 481 | } else { 482 | Storage.renameTask(projectName, taskName, newTaskName) 483 | } 484 | UI.clearTasks() 485 | UI.loadTasks(projectName) 486 | UI.closeRenameInput(this.parentNode.parentNode) 487 | } 488 | 489 | static openSetDateInput(taskButton) { 490 | const dueDate = taskButton.children[1].children[0] 491 | const dueDateInput = taskButton.children[1].children[1] 492 | 493 | UI.closeAllPopups() 494 | dueDate.classList.add('active') 495 | dueDateInput.classList.add('active') 496 | } 497 | 498 | static closeSetDateInput(taskButton) { 499 | const dueDate = taskButton.children[1].children[0] 500 | const dueDateInput = taskButton.children[1].children[1] 501 | 502 | dueDate.classList.remove('active') 503 | dueDateInput.classList.remove('active') 504 | } 505 | 506 | static setTaskDate() { 507 | const taskButton = this.parentNode.parentNode 508 | const projectName = document.getElementById('project-name').textContent 509 | const taskName = taskButton.children[0].children[1].textContent 510 | const newDueDate = format(new Date(this.value), 'dd/MM/yyyy') 511 | 512 | if (projectName === 'Today' || projectName === 'This week') { 513 | const mainProjectName = taskName.split('(')[1].split(')')[0] 514 | const mainTaskName = taskName.split(' (')[0] 515 | Storage.setTaskDate(projectName, taskName, newDueDate) 516 | Storage.setTaskDate(mainProjectName, mainTaskName, newDueDate) 517 | if (projectName === 'Today') { 518 | Storage.updateTodayProject() 519 | } else { 520 | Storage.updateWeekProject() 521 | } 522 | } else { 523 | Storage.setTaskDate(projectName, taskName, newDueDate) 524 | } 525 | UI.clearTasks() 526 | UI.loadTasks(projectName) 527 | UI.closeSetDateInput(taskButton) 528 | } 529 | } 530 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | module.exports = { 4 | mode: 'development', 5 | entry: './src/index.js', 6 | output: { 7 | filename: 'main.js', 8 | path: path.resolve(__dirname, 'dist'), 9 | }, 10 | } 11 | --------------------------------------------------------------------------------