(()=>{"use strict";var t={426:(t,e,n)=>{n.d(e,{Z:()=>d});var a=n(81),o=n.n(a),r=n(645),i=n.n(r)()(o());i.push([t.id,':root {\n --font-size: 18px;\n}\n\nbody,\nhtml {\n margin: 0;\n padding: 0;\n font-size: var(--font-size);\n line-height: 1.7;\n}\n\ntable {\n width: 100%;\n margin-bottom: 30px;\n padding: 0 5px;\n}\n\ntr {\n height: 2em;\n}\n\nbutton {\n padding: 10px 20px;\n margin: 10px;\n border-radius: 5px;\n cursor: pointer;\n border: none;\n width: 100%;\n font-size: 1rem;\n}\n\n\ninput[type="checkbox"] {\n /* appearance: none; */\n /* For iOS < 15 to remove gradient background */\n /* background-color: #fff; */\n /* Not removed via appearance */\n /* margin: 0; */\n width: 1.2rem;\n height: 1.2rem;\n}\n\n.container {\n display: flex;\n}\n\n.nav {\n display: flex;\n flex-direction: column;\n min-width: 250px;\n width: 350px;\n padding: 20px;\n}\n\n.projects {\n display: flex;\n flex-direction: column;\n}\n\n.project-heading {\n padding-left: 15px;\n}\n\n.project-add {\n display: none;\n width: 100%;\n}\n\n.project-add input {\n padding: 10px;\n}\n\n.project-add-active {\n display: flex;\n flex-direction: column;\n padding: 15px 10px;\n}\n\n.active,\n.project-btn:hover {\n background-color: gray;\n}\n\n.project-btn .project-delete-btn {\n visibility: hidden;\n float: right;\n}\n\n.project-btn:hover .project-delete-btn {\n visibility: visible;\n float: right;\n}\n\n\n.popup-buttons {\n display: flex;\n gap: 10px;\n}\n\n.popup-buttons button {\n width: 100%;\n margin: 10px 0;\n}\n\n.itag {\n float: left;\n}\n\n/* TODOS */\n\n.todos {\n flex: 1;\n padding: 0 20px;\n margin: 0 20px;\n display: flex;\n flex-direction: column;\n \n}\n\n.todos p {\n text-align: center;\n}\n\n.todo-add {\n display: none;\n width: 100%;\n}\n\n.todo-add-active {\n display: flex;\n flex-direction: column;\n padding: 15px 10px;\n width: 100%;\n}\n\n.todo-add input {\n padding: 10px;\n}\n\n.todo-add-inputs {\n display: flex;\n gap: 10px;\n}\n\n.todo-add-inputs input {\n flex: 1 1 auto;\n}\n\n.todo-delete-btn {\n visibility: hidden;\n background: none;\n width: auto;\n padding: 0;\n margin: 0;\n}\n\n.todo-row:hover .todo-delete-btn {\n visibility: visible;\n}\n\n.add-todo-btn {\n width: initial;\n}\n\n.completed {\n text-decoration: line-through 3px;\n}\n',""]);const d=i},645:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",a=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),a&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),a&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,a,o,r){"string"==typeof t&&(t=[[null,t,void 0]]);var i={};if(a)for(var d=0;d0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=r),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),e.push(u))}},e}},81:t=>{t.exports=function(t){return t[1]}},379:t=>{var e=[];function n(t){for(var n=-1,a=0;a{var e={};t.exports=function(t,n){var a=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(n)}},216:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},565:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},795:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var a="";n.supports&&(a+="@supports (".concat(n.supports,") {")),n.media&&(a+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(a+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),a+=n.css,o&&(a+="}"),n.media&&(a+="}"),n.supports&&(a+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleTagTransform(a,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},589:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(a){var o=e[a];if(void 0!==o)return o.exports;var r=e[a]={id:a,exports:{}};return t[a](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var a in e)n.o(e,a)&&!n.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.nc=void 0;var a={};(()=>{function t(t){let e=JSON.stringify(t);localStorage.setItem("todoList",e)}function e(t){let e=document.createElement("td");return"object"!=typeof t?e.textContent=t:e.appendChild(t),e}function o(){const t=document.createElement("button");t.classList.add("todo-delete-btn");let e=document.createElement("i");return e.classList.add("fa","fa-trash"),t.appendChild(e),t}n.d(a,{dN:()=>gt,pK:()=>pt,Oe:()=>bt});var r=n(379),i=n.n(r),d=n(795),s=n.n(d),c=n(569),u=n.n(c),l=n(565),m=n.n(l),h=n(216),f=n.n(h),p=n(589),g=n.n(p),b=n(426),w={};function y(t){const e=Object.prototype.toString.call(t);return t instanceof Date||"object"==typeof t&&"[object Date]"===e?new t.constructor(+t):"number"==typeof t||"[object Number]"===e||"string"==typeof t||"[object String]"===e?new Date(t):new Date(NaN)}function v(t){if(!(e=t,e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)||"number"==typeof t))return!1;var e;const n=y(t);return!isNaN(Number(n))}w.styleTagTransform=g(),w.setAttributes=m(),w.insert=u().bind(null,"head"),w.domAPI=s(),w.insertStyleElement=f(),i()(b.Z,w),b.Z&&b.Z.locals&&b.Z.locals;const x={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function E(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const M={date:E({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:E({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:E({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},j={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function k(t){return(e,n)=>{let a;if("formatting"===(n?.context?String(n.context):"standalone")&&t.formattingValues){const e=t.defaultFormattingWidth||t.defaultWidth,o=n?.width?String(n.width):e;a=t.formattingValues[o]||t.formattingValues[e]}else{const e=t.defaultWidth,o=n?.width?String(n.width):t.defaultWidth;a=t.values[o]||t.values[e]}return a[t.argumentCallback?t.argumentCallback(e):e]}}const S={ordinalNumber:(t,e)=>{const n=Number(t),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:k({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:k({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:t=>t-1}),month:k({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:k({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:k({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function C(t){return(e,n={})=>{const a=n.width,o=a&&t.matchPatterns[a]||t.matchPatterns[t.defaultMatchWidth],r=e.match(o);if(!r)return null;const i=r[0],d=a&&t.parsePatterns[a]||t.parsePatterns[t.defaultParseWidth],s=Array.isArray(d)?function(t,e){for(let e=0;eparseInt(t,10)},(t,e={})=>{const n=t.match(P.matchPattern);if(!n)return null;const a=n[0],o=t.match(P.parsePattern);if(!o)return null;let r=P.valueCallback?P.valueCallback(o[0]):o[0];return r=e.valueCallback?e.valueCallback(r):r,{value:r,rest:t.slice(a.length)}}),era:C({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:C({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:t=>t+1}),month:C({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:C({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:C({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var P;const T={code:"en-US",formatDistance:(t,e,n)=>{let a;const o=x[t];return a="string"==typeof o?o:1===e?o.one:o.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a},formatLong:M,formatRelative:(t,e,n,a)=>j[t],localize:S,match:L,options:{weekStartsOn:0,firstWeekContainsDate:1}};let D={};function N(){return D}Math.pow(10,8);const W=6048e5,q=864e5;function Y(t){const e=y(t);return e.setHours(0,0,0,0),e}function O(t){const e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function F(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function H(t){const e=y(t);return function(t,e){const n=Y(t),a=Y(e),o=n.getTime()-O(n),r=a.getTime()-O(a);return Math.round((o-r)/q)}(e,function(t){const e=y(t),n=F(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}(e))+1}function A(t,e){const n=N(),a=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=y(t),r=o.getDay(),i=(r=o.getTime()?n+1:e.getTime()>=i.getTime()?n:n-1}function Q(t){const e=y(t),n=z(e).getTime()-function(t){const e=I(t),n=F(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),z(n)}(e).getTime();return Math.round(n/W)+1}function G(t,e){const n=y(t),a=n.getFullYear(),o=N(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=F(t,0);i.setFullYear(a+1,0,r),i.setHours(0,0,0,0);const d=A(i,e),s=F(t,0);s.setFullYear(a,0,r),s.setHours(0,0,0,0);const c=A(s,e);return n.getTime()>=d.getTime()?a+1:n.getTime()>=c.getTime()?a:a-1}function X(t,e){const n=y(t),a=A(n,e).getTime()-function(t,e){const n=N(),a=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=G(t,e),r=F(t,0);return r.setFullYear(o,0,a),r.setHours(0,0,0,0),A(r,e)}(n,e).getTime();return Math.round(a/W)+1}function B(t,e){return(t<0?"-":"")+Math.abs(t).toString().padStart(e,"0")}const $={y(t,e){const n=t.getFullYear(),a=n>0?n:1-n;return B("yy"===e?a%100:a,e.length)},M(t,e){const n=t.getMonth();return"M"===e?String(n+1):B(n+1,2)},d:(t,e)=>B(t.getDate(),e.length),a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(t,e)=>B(t.getHours()%12||12,e.length),H:(t,e)=>B(t.getHours(),e.length),m:(t,e)=>B(t.getMinutes(),e.length),s:(t,e)=>B(t.getSeconds(),e.length),S(t,e){const n=e.length,a=t.getMilliseconds();return B(Math.floor(a*Math.pow(10,n-3)),e.length)}},J={G:function(t,e,n){const a=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});default:return n.era(a,{width:"wide"})}},y:function(t,e,n){if("yo"===e){const e=t.getFullYear(),a=e>0?e:1-e;return n.ordinalNumber(a,{unit:"year"})}return $.y(t,e)},Y:function(t,e,n,a){const o=G(t,a),r=o>0?o:1-o;return"YY"===e?B(r%100,2):"Yo"===e?n.ordinalNumber(r,{unit:"year"}):B(r,e.length)},R:function(t,e){return B(I(t),e.length)},u:function(t,e){return B(t.getFullYear(),e.length)},Q:function(t,e,n){const a=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(a);case"QQ":return B(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(t,e,n){const a=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(a);case"qq":return B(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(t,e,n){const a=t.getMonth();switch(e){case"M":case"MM":return $.M(t,e);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(t,e,n){const a=t.getMonth();switch(e){case"L":return String(a+1);case"LL":return B(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(t,e,n,a){const o=X(t,a);return"wo"===e?n.ordinalNumber(o,{unit:"week"}):B(o,e.length)},I:function(t,e,n){const a=Q(t);return"Io"===e?n.ordinalNumber(a,{unit:"week"}):B(a,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getDate(),{unit:"date"}):$.d(t,e)},D:function(t,e,n){const a=H(t);return"Do"===e?n.ordinalNumber(a,{unit:"dayOfYear"}):B(a,e.length)},E:function(t,e,n){const a=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(t,e,n,a){const o=t.getDay(),r=(o-a.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return B(r,2);case"eo":return n.ordinalNumber(r,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(t,e,n,a){const o=t.getDay(),r=(o-a.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return B(r,e.length);case"co":return n.ordinalNumber(r,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(t,e,n){const a=t.getDay(),o=0===a?7:a;switch(e){case"i":return String(o);case"ii":return B(o,e.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(t,e,n){const a=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){const a=t.getHours();let o;switch(o=12===a?"noon":0===a?"midnight":a/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,e,n){const a=t.getHours();let o;switch(o=a>=17?"evening":a>=12?"afternoon":a>=4?"morning":"night",e){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),n.ordinalNumber(e,{unit:"hour"})}return $.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getHours(),{unit:"hour"}):$.H(t,e)},K:function(t,e,n){const a=t.getHours()%12;return"Ko"===e?n.ordinalNumber(a,{unit:"hour"}):B(a,e.length)},k:function(t,e,n){let a=t.getHours();return 0===a&&(a=24),"ko"===e?n.ordinalNumber(a,{unit:"hour"}):B(a,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):$.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getSeconds(),{unit:"second"}):$.s(t,e)},S:function(t,e){return $.S(t,e)},X:function(t,e,n,a){const o=(a._originalDate||t).getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return U(o);case"XXXX":case"XX":return _(o);default:return _(o,":")}},x:function(t,e,n,a){const o=(a._originalDate||t).getTimezoneOffset();switch(e){case"x":return U(o);case"xxxx":case"xx":return _(o);default:return _(o,":")}},O:function(t,e,n,a){const o=(a._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+R(o,":");default:return"GMT"+_(o,":")}},z:function(t,e,n,a){const o=(a._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+R(o,":");default:return"GMT"+_(o,":")}},t:function(t,e,n,a){const o=a._originalDate||t;return B(Math.floor(o.getTime()/1e3),e.length)},T:function(t,e,n,a){return B((a._originalDate||t).getTime(),e.length)}};function R(t,e=""){const n=t>0?"-":"+",a=Math.abs(t),o=Math.floor(a/60),r=a%60;return 0===r?n+String(o):n+String(o)+e+B(r,2)}function U(t,e){return t%60==0?(t>0?"-":"+")+B(Math.abs(t)/60,2):_(t,e)}function _(t,e=""){const n=t>0?"-":"+",a=Math.abs(t);return n+B(Math.floor(a/60),2)+e+B(a%60,2)}const Z=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},K=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},V={p:K,P:(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],a=n[1],o=n[2];if(!o)return Z(t,e);let r;switch(a){case"P":r=e.dateTime({width:"short"});break;case"PP":r=e.dateTime({width:"medium"});break;case"PPP":r=e.dateTime({width:"long"});break;default:r=e.dateTime({width:"full"})}return r.replace("{{date}}",Z(a,e)).replace("{{time}}",K(o,e))}},tt=["D","DD"],et=["YY","YYYY"];function nt(t,e,n){if("YYYY"===t)throw new RangeError(`Use \`yyyy\` instead of \`YYYY\` (in \`${e}\`) for formatting years to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);if("YY"===t)throw new RangeError(`Use \`yy\` instead of \`YY\` (in \`${e}\`) for formatting years to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);if("D"===t)throw new RangeError(`Use \`d\` instead of \`D\` (in \`${e}\`) for formatting days of the month to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);if("DD"===t)throw new RangeError(`Use \`dd\` instead of \`DD\` (in \`${e}\`) for formatting days of the month to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`)}const at=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ot=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,rt=/^'([^]*?)'?$/,it=/''/g,dt=/[a-zA-Z]/;function st(t,e,n){const a=N(),o=n?.locale??a.locale??T,r=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,d=y(t);if(!v(d))throw new RangeError("Invalid time value");const s={firstWeekContainsDate:r,weekStartsOn:i,locale:o,_originalDate:d};return e.match(ot).map((function(t){const e=t[0];return"p"===e||"P"===e?(0,V[e])(t,o.formatLong):t})).join("").match(at).map((function(a){if("''"===a)return"'";const r=a[0];if("'"===r)return function(t){const e=t.match(rt);return e?e[1].replace(it,"'"):t}(a);const i=J[r];if(i)return n?.useAdditionalWeekYearTokens||(c=a,-1===et.indexOf(c))||nt(a,e,String(t)),!n?.useAdditionalDayOfYearTokens&&function(t){return-1!==tt.indexOf(t)}(a)&&nt(a,e,String(t)),i(d,a,o.localize,s);var c;if(r.match(dt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return a})).join("")}function ct(t,e,n,a){return n=n.replaceAll("-","/"),{title:t,description:e,dueDate:st(new Date(n),"MM/dd/yyyy"),pomodoros:a,completed:!1}}function ut(t){return{name:t,todos:[]}}class lt{constructor(t=null){t?this.projects=t:this.projects||(this.projects=[new ut("default")])}getEverything(){return this.projects}getTodos(){return this.projects.map((t=>t.todos))}getTodosFromProject(t){return this.projects.find((e=>e.name===t)).todos}addTodo(t="default",e,n,a,o){let r=this.projects.findIndex((e=>e.name===t));this.titleExists(e,this.projects[r].todos)?alert("unable to create duplicate note"):(this.projects[r].todos.push(new ct(e,n,a,o)),this.projects[r].todos.sort(((t,e)=>function(t,e){const n=y(t),a=y(e),o=n.getTime()-a.getTime();return o<0?-1:o>0?1:o}(new Date(t.dueDate),new Date(e.dueDate)))))}editTodo(t,e){let n=this.projects.findIndex((e=>e.name===t)),a=this.projects[n].todos.find((t=>t.title===e));a&&(a.completed=!a.completed)}deleteTodo(t,e){let n=this.projects.findIndex((e=>e.name===t)),a=this.projects[n].todos.filter((t=>{if(t.title!==e)return t}));this.projects[n].todos=a}titleExists(t,e){return e.find((e=>e.title===t))}addProject(t){this.projects.find((e=>e.name===t))?alert(`Project ${t} already exists!`):this.projects.push(ut(t))}getProjects(){return this.projects}delProject(t){let e=this.projects.findIndex((e=>e.name===t)),n=this.projects.filter((n=>{if(n!==this.projects[e]||"default"===t)return n}));this.projects=n}}const mt=localStorage.getItem("todoList")||null;let ht;ht=mt?new lt(JSON.parse(mt)):new lt;let ft="default";function pt(t){ft=t}function gt(){return ft}function bt(){const n=document.querySelector(".container");n&&(n.innerHTML="");let a=ht.getProjects(),r=ft,i=ht.getTodosFromProject(r);const d=function(t){let e=document.createElement("nav");e.classList.add("nav");let n=document.createElement("h1");n.classList.add(["project-heading"]),n.textContent="Projects";let a=function(t){const e=document.createElement("div"),n=gt();return e.classList.add(["projects"]),t.forEach((t=>{let a=document.createElement("button"),o=document.createElement("i"),r=document.createElement("span");if(r.textContent=` ${t.name}`,"default"===t.name)o.classList.add("fas","fa-home","itag");else{let t=document.createElement("span"),e=document.createElement("i");o.classList.add("fas","fa-tasks","itag"),e.classList.add("fa","fa-trash"),t.classList.add("project-delete-btn"),t.appendChild(e),a.appendChild(t)}a.classList.add("btn","project-btn"),t.name===n&&(a.classList+=" active"),a.appendChild(o),a.appendChild(r),a.dataset.projectName=t.name,e.append(a)})),e}(t),o=function(){const t=document.createElement("button"),e=document.createElement("i"),n=document.createElement("span");return e.classList.add("fas","fa-plus","itag"),t.classList.add("btn","add-project-btn"),n.textContent="New Project",t.appendChild(e),t.appendChild(n),t}();return e.appendChild(n),e.appendChild(a),e.appendChild(o),e}(a),s=function(){const t=document.createElement("div"),e=document.createElement("input"),n=document.createElement("button"),a=document.createElement("button"),o=document.createElement("div");return t.classList.add("project-add"),e.classList.add("project-input-name"),n.classList.add("cancel-btn"),a.classList.add("submit-btn"),o.classList.add("popup-buttons"),e.placeholder="Project name...",a.textContent="Submit",n.textContent="Cancel",t.appendChild(e),o.appendChild(a),o.appendChild(n),t.appendChild(o),t}(),c=function(){const t=document.createElement("div");t.classList.add("todo-add");const e=document.createElement("div");e.classList.add("todo-add-inputs");const n=document.createElement("input");n.classList.add("todo-input-name"),n.placeholder="Todo title..",n.required=!0;const a=document.createElement("input");a.classList.add("todo-input-desc"),a.placeholder="Todo description..";const o=document.createElement("input");o.classList.add("todo-input-duedate"),o.type="date";const r=document.createElement("input");r.classList.add("todo-input-pomodoro"),r.type="";const i=document.createElement("button");i.classList.add("cancel-btn"),i.textContent="Cancel";const d=document.createElement("button");d.classList.add("submit-btn"),d.textContent="Submit";const s=document.createElement("div");return s.classList.add("popup-buttons"),e.append(n,a,o),s.append(d,i),t.append(e,s),t}(),u=function(t){const n=document.createElement("div");n.classList.add("todos");const a=document.createElement("h1");a.classList.add("todo-heading"),a.textContent=gt();const r=document.createElement("button"),i=document.createElement("i"),d=document.createElement("span");if(i.classList.add("fas","fa-plus","itag"),d.textContent="Add Todo",r.append(i,d),r.classList.add("add-todo-btn"),n.appendChild(a),t.length>0){const a=document.createElement("table");a.classList.add(["table"]),t.forEach((t=>{const n=function(t){const n=document.createElement("tr");return n.classList.add("todo-row"),n.dataset.todoId=t.title,[e(function(t){let e=document.createElement("input");return e.type="checkbox",e.classList.add("todo-checkbox"),e.checked=t,e}(t.completed)),e(t.title),e(t.description),e(t.dueDate.toString()),e(o())].forEach((t=>n.appendChild(t))),t.completed?n.classList.add("completed"):n.classList.remove("completed"),n}(t);a.appendChild(n)})),n.appendChild(a)}else{const t=document.createElement("p");t.textContent="All tasks completed",n.appendChild(t)}return n.appendChild(r),n}(i);d.appendChild(s),u.appendChild(c),n.appendChild(d),n.appendChild(u),document.body.appendChild(n),function(){const t=document.querySelectorAll(".project-btn");let e;const n=t=>{e=t.target.closest(".project-btn").dataset.projectName,e&&(pt(e),bt())};t&&t.forEach((t=>t.addEventListener("click",n)))}(),function(e){const n=gt(),a=document.querySelector(".add-todo-btn"),o=document.querySelector(".todo-add"),r=o.querySelector(".submit-btn"),i=o.querySelector(".cancel-btn"),d=document.querySelector(".todo-add-inputs");a.addEventListener("click",(()=>{o.classList.add("todo-add-active"),a.style.display="none"})),i.addEventListener("click",(()=>{o.classList.remove("todo-add-active"),a.style.display="inline-block"})),r.addEventListener("click",(()=>{let a=function(t){return[...t].map((t=>t.value))}(d.childNodes),r=a[0],i=a[1],s=a[2];e.addTodo(n,r,i,s,0),o.classList.remove("todo-add-active"),bt(),t(e.getEverything())}))}(ht),function(e){document.querySelectorAll(".todo-delete-btn").forEach((n=>{n.addEventListener("click",(n=>{let a=gt(),o=n.target.parentNode.parentNode.parentNode.dataset.todoId;e.deleteTodo(a,o),t(e.getEverything()),bt()}))}))}(ht),function(e){const n=document.querySelector(".add-project-btn"),a=document.querySelector(".project-add"),o=a.querySelector(".submit-btn"),r=a.querySelector(".cancel-btn"),i=document.querySelector(".project-input-name");n.addEventListener("click",(()=>{a.classList.add("project-add-active"),n.style.display="none"})),r.addEventListener("click",(()=>{a.classList.remove("project-add-active"),n.style.display="block"})),o.addEventListener("click",(()=>{let n=i.value;e.addProject(n),a.classList.remove("project-add-active"),pt(n),bt(),t(e.getEverything())}))}(ht),function(e){document.querySelectorAll(".project-delete-btn").forEach((n=>{n.addEventListener("click",(n=>{n.stopPropagation();let a=n.target.parentNode.parentNode.dataset.projectName;e.delProject(a),pt("default"),t(e.getEverything()),bt()}))}))}(ht),function(e){const n=gt();document.querySelectorAll(".todo-checkbox").forEach((a=>{a.addEventListener("click",(a=>{const o=a.target.parentNode.parentNode.dataset.todoId;e.editTodo(n,o),t(e.getEverything()),bt()}))}))}(ht)}!function(){let t=document.createElement("script");t.src="https://kit.fontawesome.com/24f16b96cf.js",t.crossOrigin="anonymous",document.head.appendChild(t)}(),function(){const t=document.createElement("div");t.classList.add("container"),document.body.appendChild(t),bt()}(),t(ht.getEverything())})()})();