(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[329],{3544:function(e,t,s){Promise.resolve().then(s.bind(s,6718))},6718:function(e,t,s){"use strict";s.r(t),s.d(t,{EVENT_TYPES:function(){return r}});var n=s(7437),i=s(2265);let l=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],r={workshop:{title:"Workshop",examples:["Startup Ideation Workshop","Business Model Canvas","Pitch Perfect Workshop","Design Thinking Session"],color:"bg-violet-500/90 text-white"},mentorship:{title:"Mentorship",examples:["Founder Office Hours","Alumni Mentorship Session","Industry Expert Connect","Technical Mentorship"],color:"bg-emerald-500/90 text-white"},competition:{title:"Competition",examples:["Pitch Competition","Hackathon","Case Study Challenge","B-Plan Competition"],color:"bg-amber-500/90 text-white"},speaker:{title:"Speaker Session",examples:["Founder's Talk","Industry Leader Session","Alumni Success Story","Tech Entrepreneurship Talk"],color:"bg-sky-500/90 text-white"},networking:{title:"Networking",examples:["Startup Mixer","Industry Connect","Alumni Network Meet","Investor Networking"],color:"bg-rose-500/90 text-white"}},a="ecell-calendar-events";function monthName(e){return new Date(0,e).toLocaleString(void 0,{month:"long"})}t.default=()=>{let e=new Date,[t,s]=(0,i.useState)(e.getFullYear()),[o,d]=(0,i.useState)(e.getMonth()),[c,m]=(0,i.useState)(null),[h,x]=(0,i.useState)(!1),[u,p]=(0,i.useState)("month"),[g,b]=(0,i.useState)(new Set(Object.keys(r))),[f,w]=(0,i.useState)(()=>{{let e=localStorage.getItem(a);return e?JSON.parse(e):{}}});(0,i.useEffect)(()=>{localStorage.setItem(a,JSON.stringify(f))},[f]);let handleCloseWithAnimation=()=>{x(!0),setTimeout(()=>{m(null),x(!1)},150)},toggleFilter=e=>{b(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},v=t===e.getFullYear()&&o===e.getMonth(),j=new Date(t,o,1).getDay(),y=new Date(t,o+1,0).getDate(),N={};Object.entries(f).forEach(e=>{let[t,s]=e;N[Number(t)]=s.filter(e=>g.has(e.type))});let k=[];for(let e=0;e{let[t,s]=e;return s.map(e=>({day:Number(t),...e}))}).sort((e,t)=>e.day-t.day||e.time.localeCompare(t.time));return(0,n.jsxs)("div",{className:"max-w-7xl mx-auto p-4",children:[(0,n.jsx)("style",{children:"\n @keyframes slideOutUp {\n from {\n opacity: 1;\n transform: translateY(0);\n }\n to {\n opacity: 0;\n transform: translateY(-10px);\n }\n }\n \n .animate-out {\n animation: slideOutUp 0.15s ease-in forwards;\n }\n\n /* Custom scrollbar styling */\n .custom-scrollbar::-webkit-scrollbar {\n width: 6px;\n }\n\n .custom-scrollbar::-webkit-scrollbar-track {\n background: rgba(255, 255, 255, 0.05);\n border-radius: 10px;\n }\n\n .custom-scrollbar::-webkit-scrollbar-thumb {\n background: rgba(99, 102, 241, 0.5);\n border-radius: 10px;\n }\n\n .custom-scrollbar::-webkit-scrollbar-thumb:hover {\n background: rgba(99, 102, 241, 0.8);\n }\n"}),(0,n.jsxs)("div",{className:"grid md:grid-cols-4 gap-4",children:[(0,n.jsxs)("aside",{className:"md:col-span-1 bg-gradient-to-br from-slate-800/90 to-slate-900/90 rounded-2xl p-4 text-white/95 shadow-xl border border-white/10 flex flex-col h-full",children:[(0,n.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"text-lg font-semibold bg-gradient-to-r from-indigo-400 to-pink-400 bg-clip-text text-transparent",children:"E-Cell Calendar"}),(0,n.jsx)("p",{className:"text-sm text-white/80",children:"IIIT Delhi"})]})}),(0,n.jsxs)("div",{className:"flex gap-2 mb-4",children:[(0,n.jsx)("button",{onClick:()=>p("month"),className:"px-3 py-1.5 rounded-lg font-medium transition-colors ".concat("month"===u?"bg-gradient-to-r from-indigo-500 to-purple-500 text-white shadow-lg":"bg-white/5 hover:bg-white/10"),children:"Month View"}),(0,n.jsx)("button",{onClick:()=>p("list"),className:"px-3 py-1.5 rounded-lg font-medium transition-colors ".concat("list"===u?"bg-gradient-to-r from-indigo-500 to-purple-500 text-white shadow-lg":"bg-white/5 hover:bg-white/10"),children:"List View"})]}),(0,n.jsxs)("div",{className:"mb-6",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,n.jsx)("h5",{className:"text-sm font-medium text-white/90",children:"Event Categories"}),(0,n.jsx)("button",{onClick:()=>{g.size===Object.keys(r).length?b(new Set):b(new Set(Object.keys(r)))},className:"text-xs px-2 py-1 rounded-md bg-white/10 hover:bg-white/20 transition-colors text-white/80 hover:text-white",title:g.size===Object.keys(r).length?"Uncheck all":"Check all",children:g.size===Object.keys(r).length?"✗ Select None":"✓ Select All"})]}),(0,n.jsx)("div",{className:"space-y-2",children:Object.entries(r).map(e=>{let[t,{title:s,color:i}]=e;return(0,n.jsxs)("button",{onClick:()=>toggleFilter(t),className:"w-full flex items-center gap-2 text-sm p-2 rounded-lg transition-all ".concat(g.has(t)?"".concat(i," shadow-lg"):"bg-white/5 hover:bg-white/10 opacity-50"),children:[(0,n.jsx)("div",{className:"w-3 h-3 rounded-full ".concat(i)}),(0,n.jsx)("span",{children:s})]},t)})})]}),(0,n.jsxs)("div",{className:"flex-1 flex flex-col min-h-0",children:[(0,n.jsx)("h5",{className:"text-sm font-medium mb-2 text-white/90",children:"Upcoming Events"}),(0,n.jsx)("div",{className:"custom-scrollbar space-y-3 overflow-y-auto flex-1",children:S.slice(0,5).map((e,t)=>(0,n.jsxs)("div",{className:"bg-white/5 rounded-lg p-3 hover:bg-white/10 transition-colors",children:[(0,n.jsx)("div",{className:"text-sm font-medium ".concat(r[e.type].color.replace("bg-","text-").replace("/90","/80")),children:e.title}),(0,n.jsxs)("div",{className:"text-xs text-white/70 mt-1",children:[monthName(o)," ",e.day," • ",e.time]}),(0,n.jsx)("div",{className:"text-xs text-white/60 mt-0.5",children:e.location})]},t))})]})]}),(0,n.jsxs)("section",{className:"md:col-span-3 bg-gradient-to-br from-slate-800/90 to-slate-900/90 rounded-2xl p-4 text-white shadow-xl border border-white/10",children:[(0,n.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)("button",{onClick:()=>{0===o?(d(11),s(e=>e-1)):d(e=>e-1),m(null)},className:"bg-white/5 hover:bg-white/10 px-3 py-2 rounded-lg transition-colors text-white/80 hover:text-white font-medium",children:"◀"}),(0,n.jsxs)("div",{className:"text-2xl font-medium bg-gradient-to-r from-indigo-400 to-pink-400 bg-clip-text text-transparent min-w-[200px] text-center",children:[monthName(o)," ",t]}),(0,n.jsx)("button",{onClick:()=>{11===o?(d(0),s(e=>e+1)):d(e=>e+1),m(null)},className:"bg-white/5 hover:bg-white/10 px-3 py-2 rounded-lg transition-colors text-white/80 hover:text-white font-medium",children:"▶"}),(0,n.jsx)("button",{onClick:()=>{let e=new Date;s(e.getFullYear()),d(e.getMonth()),m(null),x(!1)},disabled:v,className:"px-4 py-2 rounded-lg text-white font-medium transition-all duration-200 text-sm ".concat(v?"bg-white/10 text-white/50 cursor-not-allowed":"bg-gradient-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600 shadow-lg hover:shadow-xl"),children:"Current Month"})]}),(0,n.jsxs)("div",{className:"text-sm font-medium bg-gradient-to-r from-indigo-400 to-pink-400 bg-clip-text text-transparent",children:[S.length," events this month"]})]}),"list"===u?(0,n.jsx)("div",{className:"space-y-3",children:S.length>0?S.map((e,t)=>(0,n.jsxs)("div",{className:"".concat(r[e.type].color," p-3 rounded-lg shadow-lg"),children:[(0,n.jsx)("div",{className:"font-medium",children:e.title}),(0,n.jsxs)("div",{className:"text-sm mt-1",children:[monthName(o)," ",e.day," • ",e.time]}),(0,n.jsx)("div",{className:"text-xs mt-0.5 text-white/90",children:e.location}),e.description&&(0,n.jsx)("div",{className:"text-xs mt-2 text-white/80 border-t border-white/10 pt-2",children:e.description})]},t)):(0,n.jsx)("div",{className:"text-center py-12",children:(0,n.jsx)("p",{className:"text-white/50 text-lg",children:"No events scheduled for the time being"})})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"grid grid-cols-7 gap-2 text-center mb-2",children:l.map(e=>(0,n.jsx)("div",{className:"text-xs font-medium text-white/70 py-2",children:e},e))}),(0,n.jsx)("div",{children:Array.from({length:Math.ceil(k.length/7)}).map((s,i)=>{var l;let a=k.slice(7*i,(i+1)*7),d=c&&a.some(e=>e.day===c);return(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"grid grid-cols-7 gap-2 mb-2",children:a.map((s,l)=>{var a,d;return(0,n.jsxs)("div",{onClick:()=>{s.day&&(c===s.day?handleCloseWithAnimation():(m(s.day),x(!1)))},className:"\n min-h-[7rem] p-3 rounded-lg cursor-pointer relative\n ".concat(s.day?"bg-white/5 hover:bg-white/10":"bg-transparent"," \n ").concat(s.day&&c===s.day?"ring-2 ring-indigo-500":"","\n transition-colors flex flex-col justify-start\n "),children:[s.day===e.getDate()&&o===e.getMonth()&&t===e.getFullYear()&&(0,n.jsx)("div",{className:"absolute top-0 left-0 bg-gradient-to-br from-indigo-500 to-purple-600 text-white text-sm font-semibold w-2/3 h-8 flex items-center justify-start pl-3 rounded-tl-lg rounded-br-xl shadow-[0_4px_12px_rgba(99,102,241,0.4)] border border-white/20",children:s.day}),(0,n.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,n.jsx)("div",{className:"\n text-sm font-medium \n ".concat(s.day===e.getDate()&&o===e.getMonth()&&t===e.getFullYear()?"opacity-0":"text-white/90","\n "),children:null!==(d=s.day)&&void 0!==d?d:""}),s.day&&N[s.day]&&(0,n.jsx)("div",{className:"text-xs text-white/90 bg-white/10 px-2 py-0.5 rounded-full",children:N[s.day].length})]}),(0,n.jsx)("div",{className:"flex flex-col gap-1",children:s.day&&(null===(a=N[s.day])||void 0===a?void 0:a.map((e,t)=>(0,n.jsxs)("div",{className:"".concat(r[e.type].color," text-[0.7rem] px-2 py-1 rounded-md truncate shadow-sm"),children:[e.time," • ",e.title]},t)))})]},7*i+l)})}),d&&c&&(0,n.jsxs)("div",{className:"bg-white/5 p-4 rounded-lg border border-white/10 mb-2 ".concat(h?"animate-out":"animate-in fade-in slide-in-from-top-2 duration-300"),children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,n.jsxs)("h4",{className:"font-semibold text-lg bg-gradient-to-r from-indigo-400 to-pink-400 bg-clip-text text-transparent",children:["Events on ",monthName(o)," ",c]}),(0,n.jsx)("button",{onClick:handleCloseWithAnimation,className:"text-sm text-white/70 hover:text-white/90 transition-colors",children:"Close"})]}),(null===(l=N[c])||void 0===l?void 0:l.length)>0?(0,n.jsx)("div",{className:"space-y-3",children:N[c].map((e,t)=>(0,n.jsxs)("div",{className:"".concat(r[e.type].color," p-3 rounded-lg shadow-lg animate-in fade-in slide-in-from-left-2 duration-150"),children:[(0,n.jsx)("div",{className:"font-medium",children:e.title}),(0,n.jsx)("div",{className:"text-sm mt-1",children:e.time}),(0,n.jsx)("div",{className:"text-xs mt-0.5 text-white/90",children:e.location}),e.description&&(0,n.jsx)("div",{className:"text-xs mt-2 text-white/80 border-t border-white/10 pt-2",children:e.description})]},t))}):(0,n.jsx)("div",{className:"text-center py-8 animate-in fade-in duration-300",children:(0,n.jsx)("p",{className:"text-white/50",children:"No events scheduled for this day"})})]},"drawer-".concat(c))]},i)})})]})]})]})]})}},622:function(e,t,s){"use strict";/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var n=s(2265),i=Symbol.for("react.element"),l=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function q(e,t,s){var n,l={},d=null,c=null;for(n in void 0!==s&&(d=""+s),void 0!==t.key&&(d=""+t.key),void 0!==t.ref&&(c=t.ref),t)r.call(t,n)&&!o.hasOwnProperty(n)&&(l[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===l[n]&&(l[n]=t[n]);return{$$typeof:i,type:e,key:d,ref:c,props:l,_owner:a.current}}t.Fragment=l,t.jsx=q,t.jsxs=q},7437:function(e,t,s){"use strict";e.exports=s(622)}},function(e){e.O(0,[971,472,744],function(){return e(e.s=3544)}),_N_E=e.O()}]);