(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3185],{73289:function(e,t,r){Promise.resolve().then(r.bind(r,35648)),Promise.resolve().then(r.bind(r,1022)),Promise.resolve().then(r.bind(r,27761)),Promise.resolve().then(r.bind(r,23267)),Promise.resolve().then(r.bind(r,7503)),Promise.resolve().then(r.bind(r,32298)),Promise.resolve().then(r.t.bind(r,47960,23)),Promise.resolve().then(r.bind(r,14888)),Promise.resolve().then(r.bind(r,98087)),Promise.resolve().then(r.bind(r,47239)),Promise.resolve().then(r.t.bind(r,88003,23)),Promise.resolve().then(r.t.bind(r,87262,23)),Promise.resolve().then(r.bind(r,34420)),Promise.resolve().then(r.bind(r,63268))},35684:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(57437);r(2265);var s=r(48053);function a(){return(0,n.jsxs)("div",{className:"text-white flex justify-center items-center gap-7 text-sm md:text-md lg:text-lg xl:text-xl",children:[(0,n.jsx)("p",{children:"Powered by: @stacknatic"}),(0,n.jsxs)("a",{href:"https://github.com/stacknatic",target:"_blank",rel:"noopener noreferrer","aria-label":"GitHub Profile Link",children:[(0,n.jsx)(s.RrF,{id:"github-profile-link"}),(0,n.jsx)("div",{className:"sr-only social-link-text",children:"GitHub"})]}),(0,n.jsxs)("a",{href:"https://linkedin.com/in/michael-akerele",target:"_blank",rel:"noopener noreferrer","aria-label":"LinkedIn Profile Link",children:[(0,n.jsx)(s._iD,{id:"linkedin-profile-link"}),(0,n.jsx)("div",{className:"sr-only social-link-text",children:"LinkedIn"})]})]})}},29710:function(e,t,r){"use strict";r.d(t,{a:function(){return n}}),r(83079);var n=(0,r(12119).$)("010ded7706d9a34c2cf95a5e97dbf655214f1402")},35648:function(e,t,r){"use strict";var n=r(57437),s=r(2265),a=r(27648),i=r(33145),o=r(75122),l=r(46523);t.default=()=>{let e=(0,s.useRef)(null),[t,r]=(0,s.useState)(!1),[c,u]=(0,s.useState)(!0);return((0,s.useEffect)(()=>{"undefined"!=typeof Storage&&(localStorage.getItem("cookieConsent")||"/privacy-policy/"===window.location.href?r(!0):r(!1)),u(!1)},[]),c||t)?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"fixed inset-0 bg-black opacity-50 z-40 cursor-auto"}),(0,n.jsx)("div",{className:"fixed bottom-0 left-0 bg-blue-very-dark text-white p-2 w-full h-auto z-50",children:(0,n.jsx)(l.Z,{active:!0,children:(0,n.jsxs)("section",{className:"flex justify-center items-center flex-col",children:[(0,n.jsx)(i.default,{src:"/icon.png",alt:"".concat(o.px," logo"),width:50,height:50}),(0,n.jsxs)("small",{children:[(0,n.jsx)("h2",{children:"We Care About Your Privacy"}),o.px," utilizes technologies, such as cookies, to enhance your browsing experience. By using this technology, you can be provided with a more personalized and seamless interaction with this platform. By continuing, you agree with the"," ",(0,n.jsx)(a.default,{href:"/privacy-policy/",className:"underline underline-offset-2",children:"Privacy Policy"})," ","of ",o.px,"."]}),(0,n.jsx)("div",{className:"cookie-buttons-container",children:(0,n.jsx)("button",{onClick:()=>{localStorage.setItem("cookieConsent","consented"),r(!0)},className:"w-12 rounded-lg ring-2 p-2 bg-dark hover:bg-blue-700",ref:e,id:"cookie-consent-button","aria-Label":"Accept cookies",children:"OK"})})]})})})]})}},1022:function(e,t,r){"use strict";r.d(t,{ThemeMode:function(){return a}});var n=r(57437);r(2265);var s=r(78298);function a(e){let{children:t,...r}=e;return(0,n.jsx)(s.f,{...r,attribute:"class",defaultTheme:"dark",children:t})}},27761:function(e,t,r){"use strict";r.d(t,{default:function(){return P}});var n=r(57437),s=r(2265),a=r(27648),i=r(99376),o=r(5674),l=r(75122),c=r(21151),u=r(69378),d=r(97230),m=r(48053),h=e=>{let{isOpen:t,onClose:r,children:a,relative:i}=e,o=(0,s.useRef)(null),l=(0,s.useRef)(null);return((0,s.useRef)(null),(0,s.useEffect)(()=>{if(t){let e=l.current;e&&e.focus();let t=t=>{o.current&&!o.current.contains(t.target)&&(t.preventDefault(),e&&e.focus())};return document.addEventListener("focusin",t),()=>{document.removeEventListener("focusin",t)}}},[t]),t)?(0,n.jsxs)("div",{onKeyDown:e=>{if("Tab"===e.key){var t;let r=null===(t=o.current)||void 0===t?void 0:t.querySelectorAll("button, [href], input, [tabindex]:not([tabindex='-1'])");if(r){let t=r[0],n=r[r.length-1];e.shiftKey?document.activeElement===t&&(n.focus(),e.preventDefault()):document.activeElement===n&&(t.focus(),e.preventDefault())}}},ref:o,className:"".concat(i?"relative":""),children:[(0,n.jsx)("button",{className:"absolute top-2 right-2 text-white text-xs font-bold flex justify-center items-center w-6 h-6 rounded-full bg-red-dark active:bg-red-800 focus:ring z-10",onClick:r,ref:l,id:"closeButton","aria-label":"Close Modal",children:"x"}),a]}):null},f=r(32298),g=e=>{let{title:t,url:r}=e,[a,i]=(0,s.useState)(!1),{isLoggedIn:g}=(0,f.b)();return!0===g?null:(0,n.jsxs)(n.Fragment,{children:[a&&(0,n.jsx)("div",{className:"fixed top-0 left-0 w-full h-full flex justify-center items-center backdrop-blur-sm",children:(0,n.jsx)("div",{className:"relative px-2 hidden md:block",children:(0,n.jsx)(h,{isOpen:a,onClose:()=>{i(!1)},children:(0,n.jsxs)("div",{className:"flex justify-center items-center border-1 rounded-lg p-4 bg-dark max-w-md w-full",children:[(0,n.jsx)("h2",{className:"absolute top-3 text-lg font-bold",children:"Share this page"}),(0,n.jsx)(()=>{let e=encodeURIComponent(t),s=encodeURIComponent(r);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"social-share flex justify-center flex-row items-baseline flex-wrap gap-8 mt-8 p-2",children:[(0,n.jsx)("a",{className:"p-2",href:"https://www.facebook.com/sharer/sharer.php?u=".concat(s),target:"_blank",rel:"noopener noreferrer",children:(0,n.jsxs)("span",{className:"link",children:[(0,n.jsx)(d.egd,{size:32}),"Facebook"]})}),(0,n.jsx)("a",{className:"p-2",href:"https://twitter.com/intent/tweet?text=".concat(e,"&url=").concat(s,"&hashtags=").concat(encodeURIComponent(l.px),"&via=").concat(encodeURIComponent(l.px)),target:"_blank",rel:"noopener noreferrer",children:(0,n.jsxs)("span",{className:"link",children:[(0,n.jsx)(c.lcJ,{size:30}),"Tweet"]})}),(0,n.jsx)("a",{className:"p-2",href:"https://www.linkedin.com/shareArticle?mini=true&url=".concat(s,"&title=").concat(e),target:"_blank",rel:"noopener noreferrer",children:(0,n.jsxs)("span",{className:"link",children:[(0,n.jsx)(u.h6E,{size:27}),"LinkedIn"]})}),(0,n.jsx)("a",{className:"p-2",href:"mailto:?subject=".concat(e,"&body=").concat(s),target:"_blank",rel:"noopener noreferrer",children:(0,n.jsxs)("span",{className:"link",children:[(0,n.jsx)(m.Dme,{size:32}),"Email"]})})]})})},{})]})})})}),(0,n.jsx)("button",{className:"absolute right-2 bottom-8 flex justify-center items-center bg-light text-dark border-1 rounded-full w-8 h-8 md:hidden cursor-pointer focus:text-green active:text-green hover:text-purple-500",onClick:()=>{if(!navigator.share)return null;navigator.share({title:t,url:r}).catch(e=>null)},id:"shareButton","aria-Label":"Share this page",children:(0,n.jsx)(o.PPi,{size:20})}),(0,n.jsx)("button",{className:"hidden md:flex justify-center items-center bg-light text-dark border-1 rounded-full w-8 h-8 md:absolute right-2 bottom-8 cursor-pointer focus:text-green active:text-green hover:text-purple",onClick:()=>{i(!a)},id:"nativeShareButton","aria-Label":"Share this page",children:(0,n.jsx)(o.PPi,{size:20})})]})},x=r(35684),p=r(33145),b=r(84151),v=r(18206),j=r(31229);let y=j.z.object({name:j.z.string().min(2,{message:"Please enter a valid name."}).max(30,{message:"Name should be less than 30 characters."}),email:j.z.string().email({message:"Please enter a valid email address."}),message:j.z.string().min(10,{message:"Message should be at least 10 characters long."}).max(500,{message:"Message should be less than 500 characters."})}).strict();r(83079);var w=(0,r(12119).$)("955eb1da62a3593602d685746dca5777b8d7dcd5"),k=r(77763),N=()=>{let[e,t]=(0,s.useState)(!1),[r,a]=(0,s.useState)("");(0,b.T)();let i=()=>{t(!e)},o=async e=>{e.preventDefault();let r=new FormData(e.currentTarget),n=Object.fromEntries(r.entries());(()=>{try{return y.parse(n)}catch(e){v.Am.error(e.errors[0].message)}})()&&(await w(r)?(v.Am.success("Message sent"),a(""),t(!1)):v.Am.error("An error occurred while sending the message"))};return(0,n.jsxs)("div",{className:"".concat(e&&"fixed top-0 left-0 w-full h-full z-10 backdrop-blur-md"),children:[(0,n.jsx)("button",{onClick:i,"aria-label":"contact form button",className:"active z-10",children:"Contact Us"}),e&&(0,n.jsxs)("div",{className:"text-dark mt-24 ring-1 dark:ring-light rounded-md w-[95%] md:bottom-28 md:right-12 md:w-2/3 lg:w-1/3 bg-gray-300 dark:text-white dark:bg-dark bg:text-white mx-auto z-10",children:[(0,n.jsxs)("div",{className:"relative w-full bg-blue-700 rounded-t-md p-3",children:[(0,n.jsx)(p.default,{src:l.Oi,alt:"Site logo",width:50,height:50,className:"absolute top-2 left-2 rounded-md"}),(0,n.jsx)(k.FU5,{className:"absolute top-2 right-2 text-2xl cursor-pointer rounded-full border",onClick:i}),(0,n.jsx)("p",{className:"text-white text-center mt-5 font-bold text-lg",children:"Get in Touch"})]}),(0,n.jsxs)("form",{onSubmit:o,className:"flex flex-col p-3 w-full space-y-3 rounded-md",children:[(0,n.jsx)("label",{htmlFor:"name",children:"Name"}),(0,n.jsx)("input",{type:"text",name:"name",id:"name",className:"ring-2 h-10 rounded-sm p-2",required:!0,autoComplete:"on"}),(0,n.jsx)("label",{htmlFor:"email",children:"Email Address"}),(0,n.jsx)("input",{type:"email",name:"email",id:"email",className:"ring-2 h-10 rounded-sm p-2",required:!0,autoComplete:"on"}),(0,n.jsx)("label",{htmlFor:"message",children:"Message or Feedback"}),(0,n.jsx)("textarea",{name:"message",id:"message",value:r,cols:30,rows:5,required:!0,className:"ring-2 rounded-sm p-2",autoComplete:"on",onChange:e=>a(e.target.value)}),(0,n.jsx)("button",{type:"submit",className:"text-white w-1/3 mx-auto bg-blue-dark p-2 font-bold rounded-3xl",children:"Send"})]})]})]})},S=()=>{let[e,t]=(0,s.useState)(!1),r=()=>{t(window.scrollY>100)};return(0,s.useEffect)(()=>(window.addEventListener("scroll",r),()=>{window.removeEventListener("scroll",r)}),[]),(0,n.jsx)(n.Fragment,{children:e&&(0,n.jsx)("button",{onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},className:"absolute rounded-full text-gray left-2 bottom-8 hover:text-gray-light focus:ring focus:bg-blue-dark cursor-pointer","aria-label":"Go to top of page",id:"goToTopButton",children:(0,n.jsx)(c.z2P,{size:31,className:""})})})};function _(){let[e,t]=(0,s.useState)(!1),[r,a]=(0,s.useState)(!1),[i,o]=(0,s.useState)(!0);return((0,s.useEffect)(()=>{setTimeout(()=>{let e=navigator.userAgent;t(/iPad|iPhone|iPod/.test(e)&&!window.MSStream),a(window.matchMedia("(display-mode: standalone)").matches)},2e3)},[]),!r&&i&&e)?(0,n.jsx)("div",{className:"fixed top-0 left-0 w-full h-full flex justify-center",children:(0,n.jsx)("section",{className:"mt-24 bg-dark h-fit max-w-lg p-2 mx-2 rounded-md text-white border-2",children:(0,n.jsxs)(h,{isOpen:!0,onClose:()=>{o(!1)},relative:!0,children:[(0,n.jsx)("h2",{className:"font-bold my-2 text-lg",children:"Install App"}),(0,n.jsxs)("div",{className:"flex gap-3",children:[(0,n.jsx)(p.default,{src:"/icon.png",alt:"App Icon",width:80,height:80,className:"rounded-lg w-auto border-1 border-white"}),e&&(0,n.jsxs)("p",{children:[(0,n.jsxs)("span",{children:["To install ",l.px," app on your iOS device, tap the share button",(0,n.jsxs)("span",{role:"img","aria-label":"share icon",children:[" ",(0,n.jsx)(k.aOG,{className:"inline-block align-middle"})," "]}),'and then "Add to Home Screen"',(0,n.jsxs)("span",{role:"img","aria-label":"plus icon",children:[" ","➕"," "]})]}),"."]})]})]})})}):null}var P=()=>{let e=(0,i.usePathname)(),[t,r]=s.useState("");return(0,s.useEffect)(()=>{r(document.title)},[e]),(0,n.jsxs)("footer",{className:"text-white flex flex-col items-center justify-center text-xs md:text-sm lg:text-sm p-4  bg-blue-very-dark dark:bg-dark fixed left-0 bottom-0 w-full gap-2",children:[l.iB&&(0,n.jsx)("div",{className:"mx-auto",children:(0,n.jsx)(x.Z,{})}),(0,n.jsxs)("span",{className:"flex items-center text-xs md:text-md lg:text-lg gap-3",children:[(0,n.jsx)(a.default,{href:"/privacy-policy",children:"Privacy Policy"}),(0,n.jsx)("span",{children:"\xa0|\xa0"}),(0,n.jsx)(a.default,{href:"/terms-of-use",children:"Terms of Use"})]}),(0,n.jsx)(_,{}),(0,n.jsx)(N,{}),(0,n.jsx)(S,{}),(0,n.jsx)(g,{title:t||l.px,url:e?"".concat(l._O).concat(e):l._O})]})}},23267:function(e,t,r){"use strict";r.d(t,{default:function(){return F}});var n=r(57437),s=r(2265),a=r(33145),i=r(27648),o=r(49567),l=r(99376),c=r(48053),u=r(43326),d=r(70476),m=r(75122),h=r(18206),f=r(61363),g=r(96541),x=r(27528),p=r(84151),b=r(78298),v=r(10378),j=r(77763);let y=()=>{let[e,t]=(0,s.useState)(!1),{theme:r,setTheme:a}=(0,b.F)();return((0,s.useEffect)(()=>{t(!0)},[]),e)?(0,n.jsx)("button",{id:"dark-mode-toggle","aria-label":"Toggle Dark Mode",className:"w-fit p-2 rounded-md hover:scale-110 active:scale-100 duration-200 dark:bg-light",onClick:()=>a("dark"===r?"light":"dark"),children:"light"===r?(0,n.jsx)(v.HGq,{size:20}):(0,n.jsx)(j.Dq,{size:12,color:"black"})}):null};var w=r(21151),k=r(83642),N=e=>{let[t,r]=(0,s.useState)(null),n=(0,s.useRef)(0),a=(0,s.useRef)(5),i=()=>{let t=new WebSocket(e);t.onopen=e=>{n.current=0},t.onmessage=e=>{},t.onclose=e=>{o()},r(t)},o=()=>{n.current+=1,n.current<=a.current&&setTimeout(()=>{i()},Math.min(1e3*Math.pow(2,n.current),3e4))};return(0,s.useEffect)(()=>{i();let e=()=>{"visible"!==document.visibilityState||t&&t.readyState===WebSocket.OPEN||o()},r=()=>{o()},n=()=>{t&&t.close()};return document.addEventListener("visibilitychange",e),window.addEventListener("online",r),window.addEventListener("offline",n),()=>{document.removeEventListener("visibilitychange",e),window.removeEventListener("online",r),window.removeEventListener("offline",n),t&&t.close()}},[]),t},S=r(32298),_=()=>{let{userProfileData:e,setUserProfileData:t}=(0,S.b)();(0,p.C)(e=>e.user.notifications_count),(0,p.T)();let{isLoggedIn:r}=(0,S.b)(),n=N("".concat("wss","://").concat(k.rM,"/ws/user-notifications/"));return(0,s.useEffect)(()=>{n&&(n.onmessage=r=>{let n=JSON.parse(r.data);n.message&&n.notification_count&&"mutual_crush"!==n.notification_type&&e.username===n.user&&n.actor!==e.username&&(h.Am.info(n.message,{toastId:n.actor}),t({...e,notifications_count:n.notification_count})),"mutual_crush"===n.notification_type&&e.username===n.user&&h.Am.success(n.message,{toastId:n.actor})})},[n,r]),null},P=r(12574),C=r(93690),E=r(46523);let A=(0,s.forwardRef)((e,t)=>{let{onClick:r}=e;return(0,n.jsx)("button",{className:"absolute flex justify-center items-center top-2 right-2 w-6 h-6 rounded-full bg-red-dark active:bg-red-very-dark focus:ring z-10 text-xs",onClick:r,ref:t,children:"x"})});A.displayName="XCloseButton";var M=()=>{let e=(0,o.I0)(),[t,r]=(0,s.useState)("password"),c=(0,l.useRouter)(),[u,d]=(0,s.useState)(!0),[x,{isLoading:p}]=(0,f.YA)(),[b,v]=(0,s.useState)({email:"",password:""}),{email:j,password:y}=b,k=(0,l.usePathname)(),{setUserProfileData:N}=(0,S.b)(),{setIsLoggedIn:_,signedIn:M}=(0,S.b)(),O=["/register/","/login/","/reset-password/","/forgot-password/","/"],T=e=>v({...b,[e.target.name]:e.target.value}),L=async t=>{t.preventDefault();let r=(()=>{try{return C.m.parse(b)}catch(e){h.Am.error(e.errors.map(e=>e.message).join(", "))}})();d(!1),x(r).unwrap().then(t=>{N(t.user),e((0,g.QV)()),e((0,g.or)()),e((0,g.Ik)()),M(),h.Am.success("Welcome, ".concat(t.user.username,"!")),O.includes(k)&&c.push("/profile/".concat(t.user.username))}).catch(e=>e.data.detail?h.Am.error(e.data.detail):e.data.non_field_errors?h.Am.error(e.data.non_field_errors[0]):e.data.email?h.Am.error(e.data.email[0]):e.data.password?h.Am.error(e.data.password[0]):h.Am.error("Login failed"))},F=()=>{"password"===t?r("text"):r("password")},z=()=>{e((0,g.Ik)())};return(0,n.jsx)("div",{className:"w-full h-full fixed top-0 left-0 backdrop-blur-sm backdrop-brightness-50 z-10 p-3",children:(0,n.jsx)("section",{className:"relative max-w-lg mx-auto bg-light dark:bg-dark mt-10 p-5 rounded-lg",children:(0,n.jsxs)(E.Z,{active:!0,children:[(0,n.jsx)(A,{onClick:z}),(0,n.jsx)(a.default,{src:m.Oi,alt:"site logo",width:"50",height:"50",className:"mx-auto rounded-full p-[0.1rem] ring-2 ring-gray"}),(0,n.jsx)("h1",{className:"text-center p-3 font-bold",children:m.eT}),(0,n.jsxs)("form",{className:"rounded px-8 pt-6 pb-8 mb-2 z-50",onSubmit:L,children:[(0,n.jsxs)("div",{className:"flex flex-col gap-3 p-2",children:[(0,n.jsx)("label",{htmlFor:"email",children:"Email Address"}),(0,n.jsx)("input",{type:"email",placeholder:"Email Address",id:"email",name:"email",value:j,onChange:T,required:!0,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"}),(0,n.jsx)("label",{htmlFor:"password",children:"Password"}),(0,n.jsxs)("div",{className:"relative flex",children:[(0,n.jsx)("input",{type:t,placeholder:"Password",id:"password",name:"password",value:y,onChange:T,required:!0,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"}),"password"===t?(0,n.jsx)(w.tgn,{className:"absolute top-2 right-2",color:"black",onClick:F}):(0,n.jsx)(w.z5B,{className:"absolute top-2 right-2",color:"black",onClick:F})]}),p&&!u?(0,n.jsx)("span",{className:"mx-auto",children:(0,n.jsx)(P.g4,{color:"#00BFFF",height:40,width:100})}):(0,n.jsx)("button",{className:"btn bg-blue-dark hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",type:"submit",id:"loginSubmitButton","aria-Label":"login submit button",children:"Login"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-center my-3",children:(0,n.jsx)(i.default,{className:"text-blue-very-dark dark:text-blue-very-light",href:"/reset-password",onClick:z,children:"Forgot Your Password?"})}),(0,n.jsxs)("p",{className:"text-center",children:["Don't have an account?"," ",(0,n.jsx)(i.default,{className:"text-blue-very-dark dark:text-blue-very-light",href:"/register",onClick:z,children:"Register"})]})]})]})]})})})};r(83079);var O=(0,r(12119).$)("b6518f17c573eb87e4f01f6feb69d9a60085c4ec"),T=r(5674);let L=e=>{let{href:t,name:r,icon:s,isNavOpen:a,index:o,className:l,closeNav:c,onClick:u}=e;return(0,n.jsx)("li",{style:{animation:a?"navLinkFade 0.5s ease forwards ".concat(o/7+.5,"s"):""},className:"transition ease-in-out delay-75 hover:scale-110",children:(0,n.jsx)(i.default,{href:t,onClick:e=>{u&&u(e),c()},className:"hover:text-blue",children:r})})};var F=()=>{let[e,t]=(0,s.useState)(!1),r=()=>t(!e),b=(0,o.I0)(),v=(0,l.useRouter)(),j=(0,p.C)(e=>e.auth.loginModal),[k,N]=(0,s.useState)(!1),[P,C]=(0,s.useState)(0),{userProfileData:E,setUserProfileData:A}=(0,S.b)(),{isLoggedIn:F,signOut:z}=(0,S.b)(),{userProfileData:{notifications_count:I}}=(0,S.b)(),[q,D]=(0,s.useState)(!0);(0,s.useEffect)(()=>{if(!F||E.username){D(!1);return}(async()=>{A(await O()),D(!1)})()},[F,E.notifications_count]);let[R]=(0,f._y)(),U=()=>{N(e=>!e)},B=()=>{b((0,x.M)({})),R(void 0).unwrap().then(()=>{N(!1),b((0,x.M)({})),z()}).catch(e=>{h.Am.error("Logout failed")}).finally(()=>{b((0,x.M)({})),v.push("/")})},Z=e=>{let{href:t,icon:r,text:s,onClick:a}=e;return(0,n.jsx)(i.default,{href:t,className:"sub-menu-link",onClick:e=>{a&&a(e),U()},children:(0,n.jsxs)("p",{className:"transform ease-in delay-75 flex items-center text-black dark:text-white my-3",children:[r,"\xa0\xa0\xa0\xa0",s]})})},G=[{href:"/",name:"Home"},{href:m.bQ,name:"Blog"},F?{href:"#",name:"Logout",onClick:B}:null,F?null:{href:"",name:"Login",onClick:()=>{b((0,g.m8)())}}].filter(e=>null!==e),K=[{href:"/profile/".concat(E.username?E.username:"/user/my-profile"),icon:(0,n.jsx)(c.nf1,{}),text:"My Profile"},{href:"/people",icon:(0,n.jsx)(T.wN,{}),text:"Browse Profiles"},{href:"/notifications/",icon:(0,n.jsx)(w.Z3q,{className:"".concat(E.notifications_count>0?"animate-pulse text-red border border-red rounded-full p-1":"")}),text:"Notifications"},{href:"/message/",icon:(0,n.jsx)(w.lor,{}),text:"Messages"},{href:"/profile/edit/",icon:(0,n.jsx)(u.$R_,{}),text:"Edit Profile"},{href:"/profile/manage-account/",icon:(0,n.jsx)(u.$R_,{}),text:"Manage Account"},{href:"#",icon:(0,n.jsx)(d.VUx,{}),text:"Log Out",onClick:B}].filter(e=>null!==e);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("header",{className:"h-15 md:h-20 fixed flex justify-between items-center w-full top-0 left-0 bg-blue-very-dark text-white dark:bg-dark z-10",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsxs)("div",{className:"m-3 burger",onClick:r,children:[(0,n.jsx)("div",{className:"line1 bg-light ".concat(e?"bend-down":"")}),(0,n.jsx)("div",{className:"line2 bg-light ".concat(e?"remove":"")}),(0,n.jsx)("div",{className:"line3 bg-light ".concat(e?"bend-up":"")})]}),(0,n.jsx)(i.default,{href:"/","aria-label":"site logo",children:(0,n.jsx)(a.default,{className:"m-2 ring-1 ring-gray object-fill h-9 w-9 rounded-md bg-black hidden md:block",src:m.Oi,alt:"site logo",width:50,height:50})}),(0,n.jsxs)("div",{className:"tracking-widest font-semibold",children:[(0,n.jsx)(i.default,{href:"/",children:m.px}),m.K7&&(0,n.jsx)("div",{className:"site-tagline text-xs md:text-md hidden md:block",children:m.K7})]})]}),(0,n.jsxs)("nav",{className:"flex justify-between items-center",children:[(0,n.jsxs)("ul",{className:"nav-links bg-blue-very-dark dark:bg-dark ".concat(e?"nav-active":""),children:[q&&G.map((e,t)=>(0,n.jsx)("li",{className:"w-24 h-5 border-1 bg-gray animate-pulse rounded-sm"},t)),!q&&G.map((t,s)=>(0,n.jsx)(L,{...t,isNavOpen:e,index:s,closeNav:r,onClick:t.onClick,className:"relative"},s))]}),q&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{id:"dark-mode-toggle","aria-label":"Toggle Dark Mode",className:"w-7 h-7 mr-2 p-2 rounded-md hover:scale-110 active:scale-100 duration-200 bg-gray animate-pulse"}),(0,n.jsx)("div",{className:"text-sm flex justify-center items-center z-10 w-[4.6rem] h-7 p-3 rounded-md ring-1 ring-white mr-2 cursor-pointer bg-gray animate-pulse"})]}),!F&&!q&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"m-2",children:(0,n.jsx)(y,{})}),(0,n.jsx)("div",{className:"text-sm flex justify-center items-center z-10 h-7 w-auto p-3 rounded-md ring-1 ring-white mr-2 cursor-pointer hover:bg-green-very-dark",children:(0,n.jsx)(i.default,{href:"/register",children:"Sign Up"})})]}),F&&!q&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"m-2",children:(0,n.jsx)(y,{})}),(0,n.jsxs)("div",{className:"relative",onClick:U,children:[(null==E?void 0:E.profile_image)?(0,n.jsx)(a.default,{src:"https://afrocuddle.com"+E.profile_image,alt:E.username,width:100,height:100,className:"rounded-full m-4 w-6 h-6 md:w-9 md:h-9 ring-1 ring-gray object-fill cursor-pointer"}):(0,n.jsx)(c.nf1,{className:"m-3 text-3xl"}),(0,n.jsx)("div",{className:"absolute flex justify-center items-center top-2 right-1 text-white ".concat(0!==E.notifications_count?"bg-red-dark":""," w-4 h-4 rounded-full p-3"),children:(0,n.jsx)("div",{className:"flex justify-center items-center text-xs",children:0===E.notifications_count?"":E.notifications_count})})]})]}),k&&(0,n.jsx)("div",{className:"sub-menu-wrap",id:"subMenu",children:(0,n.jsxs)("div",{className:"sub-menu ring-2 bg-light dark:bg-dark",children:[(0,n.jsx)("div",{className:"user-info",children:(0,n.jsx)("h3",{children:E.username&&(0,n.jsxs)("div",{className:"text-dark dark:text-white",children:["Logged in as"," ",(0,n.jsx)("div",{id:"current-user",children:E.username})]})})}),(0,n.jsx)("hr",{}),K.map((e,t)=>(0,n.jsx)(Z,{...e,onClick:e.onClick},t))]})})]}),F&&(0,n.jsx)(_,{})]}),j&&(0,n.jsx)(M,{})]})}},7503:function(e,t,r){"use strict";let n;var s=r(57437),a=r(2265),i=r(55160),o=r(5674),l=r(77763),c=r(44123),u=r(33145),d=r(83642),m=r(84151),h=r(18206),f=r(12574),g=r(31647),x=r(35684),p=r(13458),b=r(32298);t.default=()=>{let{userProfileData:{username:e}}=(0,b.b)();(0,m.C)(e=>e.chat.socketRoom);let t=(0,m.C)(e=>e.chat.chatModalClass),[r,v]=(0,a.useState)(""),j=(0,m.T)(),[y,w]=(0,a.useState)([]),[k,N]=(0,a.useState)(null),S=a.useRef(null),_=a.useRef(null);(0,m.C)(e=>e.chat.chatParticipant),(0,m.C)(e=>e.chat.chatInitiator),(0,m.C)(e=>e.chat.connectionStatus);let P=(0,m.C)(e=>e.chat.typingStatus),C=(0,m.C)(e=>e.user.profile_image),{isLoggedIn:E}=(0,b.b)(),[A,M]=(0,a.useState)(!1),[O,T]=(0,a.useState)(!1),L=()=>{if(O&&y.length>0){var e;null===(e=S.current)||void 0===e||e.scrollTo({top:S.current.scrollHeight})}},F=async()=>{if((null==n?void 0:n.OPEN)!==1)try{n=new WebSocket("".concat("wss","://").concat(d.OS,"/ws/chat/chatroom/").concat(e,"/")),N(n),h.Am.info("Connected to chat",{icon:"\uD83D\uDE80"})}catch(e){h.Am.error("Couldn't connect to chat.")}else h.Am.info("Live chat active.",{icon:"\uD83D\uDE80"})};(0,a.useEffect)(()=>{L()},[O,y]);let z=()=>{try{g.v.parse({message:r,participant:e})}catch(e){h.Am.error(e.errors.map(e=>e.message).join(", "));return}null==k||k.send(JSON.stringify({message:r,participant:e,avatar:C||""})),_.current&&(_.current.value=""),v("")};(null==k?void 0:k.OPEN)&&(k.onclose=()=>{M(!1),j((0,c.Og)("")),j((0,c.en)("")),j((0,c.bl)("Live chat closed")),j((0,c.xS)("Participant disconnected")),w([])},k.onmessage=t=>{j((0,c.t5)(""));let{messageId:r,participant:n,message:s,typing:a,type:i,avatar:o,created_at:l}=JSON.parse(t.data);if("close chat"===s){h.Am.info(s),M(!1);return}void 0===s||a||(I(r,n,s,o,l),L(),n!==e&&M(!0)),a&&n!==e&&j((0,c.t5)("".concat(n," is typing")))});let I=(e,t,r,n,s)=>{let a={messageId:e||y.length+1,author:t,content:r,avatar:n,created_at:s?(0,p.z)(s):""};w(e=>[...e,a])};return(0,s.jsxs)("div",{children:[!t&&(0,s.jsxs)("button",{className:"ChatWithMe active",onClick:()=>{if(!E){h.Am.error("You need to be logged in to chat.");return}F();let e=()=>{"visible"===document.visibilityState&&F()},t=()=>{"visible"===document.visibilityState&&(null==k?void 0:k.OPEN)!==1&&e()},r=()=>{e()},n=()=>{(null==k?void 0:k.OPEN)&&k.close()};return window.addEventListener("online",r),document.addEventListener("visibilitychange",t),j((0,c.iB)()),T(!0),()=>{window.removeEventListener("online",r),document.removeEventListener("visibilitychange",t),window.removeEventListener("offline",n),(null==k?void 0:k.OPEN)&&k.close()}},"aria-label":"life chat button",children:[(0,s.jsx)(i.qa$,{}),!t&&A&&(0,s.jsx)("div",{className:"red-dot"})]}),t&&(0,s.jsx)("div",{className:"chat-modal-container active backdrop-blur-sm",children:(0,s.jsxs)("div",{className:"chat-modal-container-inner",children:[(0,s.jsx)(l.ypC,{id:"maximize-chat",className:"fa-solid fa-angles-down",onClick:()=>{M(!1),j((0,c.iB)()),T(!1)}}),(0,s.jsx)("div",{className:"chat-log-container",ref:S,children:y.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-2 space-y-3",children:[e.avatar&&(0,s.jsx)(u.default,{src:"".concat(d.sy).concat(e.avatar),alt:e.avatar,width:40,height:40,className:"avatar"}),(0,s.jsx)("strong",{className:"text-dark",children:e.author}),(0,s.jsx)("p",{className:"chat-message",children:e.content}),e.created_at&&(0,s.jsx)("span",{className:"text-xs text-gray-dark",children:e.created_at})]},e.messageId))}),(0,s.jsxs)("div",{className:"chat-modal-send",children:[(0,s.jsx)("input",{id:"chat-message-input",type:"text",size:500,disabled:!1,onChange:t=>{""!==t.target.value?null==k||k.send(JSON.stringify({typing:!0,participant:e})):""===t.target.value&&(null==k||k.send(JSON.stringify({typing:!1,participant:e}))),v(t.target.value)},onKeyDown:e=>{"Enter"===e.key&&z()},ref:_,className:"text-black"}),(0,s.jsx)("span",{id:"chat-message-submit",className:"fa-regular fa-paper-plane",onClick:z,children:(0,s.jsx)(o.Y2X,{})})]}),(0,s.jsxs)("small",{className:"text-white absolute bottom-8 left-4 flex items-center",children:[P,P&&(0,s.jsx)(f.g4,{color:"#00BFFF",height:10,width:60})]}),(0,s.jsx)(x.Z,{})]})})]})}},32298:function(e,t,r){"use strict";r.d(t,{AppProvider:function(){return i},b:function(){return o}});var n=r(57437),s=r(2265);let a=(0,s.createContext)(void 0),i=e=>{let{children:t}=e,[r,i]=(0,s.useState)("/default-profile.png"),[o,l]=(0,s.useState)(""),[c,u]=(0,s.useState)({}),[d,m]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{"true"===localStorage.getItem("loggedIn")&&m(!0)},[]),(0,n.jsx)(a.Provider,{value:{profileImage:r,setProfileImage:i,username:o,setUsername:l,userProfileData:c,setUserProfileData:u,isLoggedIn:d,setIsLoggedIn:m,signedIn:()=>{localStorage.setItem("loggedIn","true"),m(!0)},signOut:()=>{localStorage.removeItem("loggedIn"),m(!1),u({}),l("")}},children:t})},o=()=>{let e=(0,s.useContext)(a);if(void 0===e)throw Error("useAppContext must be used within an AppProvider");return e}},46523:function(e,t,r){"use strict";var n=r(57437),s=r(2265);t.Z=e=>{let{children:t,active:r,useStyle:a}=e,i=(0,s.useRef)(null);return(0,s.useEffect)(()=>{if(!r||!i.current)return;let e=Array.from(i.current.querySelectorAll('button, [href], [tabindex]:not([tabindex="-1"])')),t=e[0],n=e[e.length-1],s=e=>{"Tab"===e.key&&(e.shiftKey?document.activeElement===t&&(e.preventDefault(),n.focus()):document.activeElement===n&&(e.preventDefault(),t.focus()))};return i.current.addEventListener("keydown",s),null==t||t.focus(),()=>{var e;null===(e=i.current)||void 0===e||e.removeEventListener("keydown",s)}},[r]),(0,n.jsx)(n.Fragment,{children:a?(0,n.jsx)("div",{ref:i,className:"fixed top-0 left-0 w-full h-full flex justify-center items-center backdrop-blur-sm z-10",children:t}):(0,n.jsx)("div",{ref:i,children:t})})}},75122:function(e,t,r){"use strict";r.d(t,{K7:function(){return l},Oi:function(){return o},_O:function(){return i},bQ:function(){return c},eF:function(){return h},eT:function(){return m},iB:function(){return u},px:function(){return a},yK:function(){return s},zP:function(){return d}});var n=r(40257);let s="afrocuddle",a="AfroCuddle",i="https://afrocuddle.com",o="https://afrocuddle.com/icon.jpeg",l="";n.env.OPENAI_API,n.env.ADMIN_EMAIL;let c="/blog",u=!1,d="Subscribe to our newsletter",m="Login to ".concat(a),h=!0},84151:function(e,t,r){"use strict";r.d(t,{C:function(){return a},T:function(){return s}});var n=r(49567);let s=n.I0,a=n.v9},31647:function(e,t,r){"use strict";r.d(t,{v:function(){return s}});var n=r(31229);let s=n.z.object({message:n.z.string().min(1,{message:"Message cannot be empty"}).max(1e3,{message:"Message should be less than 1000 characters."}),participant:n.z.string().min(1).max(100)})},93690:function(e,t,r){"use strict";r.d(t,{m:function(){return s}});var n=r(31229);let s=n.z.object({email:n.z.string().email({message:"Invalid email address."}),password:n.z.string().min(8,{message:"Password should be at least 8 characters."})}).strict()},9146:function(e,t,r){"use strict";r.d(t,{g:function(){return d}});var n=r(99386),s=r(12722),a=r(96541),i=r(4004);r(57437),r(2265);let o=new i.WU,l=async(e,t,r)=>{let s;let a=function(e){let t=null;if("undefined"==typeof document)return null;if(document.cookie&&""!==document.cookie){let r=document.cookie.split(";");for(let n=0;n<r.length;n++){let s=r[n].trim();if(s.substring(0,e.length+1)===e+"="){t=decodeURIComponent(s.substring(e.length+1));break}}}return t}("csrftoken");return s="string"==typeof e?{url:e,headers:{"Content-Type":"application/json","X-CSRFToken":a||""},credentials:"include"}:{...e,headers:{...e.headers,"Content-Type":"application/json","X-CSRFToken":a||""},credentials:"include"},(0,n.ni)({baseUrl:"".concat("https://afrocuddle.com","/v1/")})(s,t,r)},c=async(e,t,r)=>{try{await o.waitForUnlock();let n=await l(e,t,r);return n.error&&401===n.error.status&&(await u(t,r),n=await l(e,t,r)),n}catch(e){throw t.dispatch((0,a.kS)()),e}finally{o.release()}},u=async(e,t)=>{if(o.isLocked())await o.waitForUnlock();else{let r=await o.acquire();try{(await l({url:"/jwt/refresh/",method:"POST"},e,t)).data?e.dispatch((0,a.QV)()):e.dispatch((0,a.kS)())}catch(t){e.dispatch((0,a.kS)())}finally{r()}}},d=(0,s.LC)({reducerPath:"v1",baseQuery:c,endpoints:e=>({})})},61363:function(e,t,r){"use strict";r.d(t,{Mp:function(){return l},Oc:function(){return d},YA:function(){return s},_y:function(){return i},gL:function(){return u},hS:function(){return o},iG:function(){return c},kf:function(){return g},l4:function(){return a},sO:function(){return j},sz:function(){return y}});let{useRetrieveUserQuery:n,useLoginMutation:s,useRegisterMutation:a,useLogoutMutation:i,useRefreshMutation:o,useVerifyMutation:l,useActivationMutation:c,useResetPasswordMutation:u,useResetPasswordConfirmMutation:d,useProfileQuery:m,useUserProjectsQuery:h,useAddUserAvatarUrlMutation:f,useEditProfileMutation:g,useAddCommentMutation:x,useAddReviewMutation:p,useConfirmSubscriptionMutation:b,useNewsletterMutation:v,useGetCSRFTokenQuery:j,useResendActivationMutation:y}=r(9146).g.injectEndpoints({endpoints:e=>({getCSRFToken:e.query({query:()=>({url:"/csrf/",method:"GET"})}),login:e.mutation({query:e=>({url:"/jwt/create/",method:"POST",body:e})}),register:e.mutation({query:e=>({url:"/users/",method:"POST",body:e})}),logout:e.mutation({query:()=>({url:"/logout/",method:"POST"})}),newsletter:e.mutation({query:e=>{let{name:t,email:r}=e;return{url:"/newsletter/subscribe/",method:"POST",body:{name:t,email:r}}}}),refresh:e.mutation({query:()=>({url:"/jwt/refresh/",method:"POST"})}),verify:e.mutation({query:()=>({url:"/jwt/verify/",method:"POST"})}),retrieveUser:e.query({query:()=>({url:"/users/me/",method:"GET"})}),profile:e.query({query:()=>({url:"/jwt/profile/",method:"GET"})}),editProfile:e.mutation({query:e=>({url:"/jwt/profile/",method:"PUT",body:e})}),userProjects:e.query({query:()=>({url:"/my-projects/",method:"GET"})}),activation:e.mutation({query:e=>{let{uid:t,token:r}=e;return{url:"/users/activation/",method:"POST",body:{uid:t,token:r}}}}),resendActivation:e.mutation({query:e=>({url:"/users/resend_activation/",method:"POST",body:{email:e}})}),confirmSubscription:e.mutation({query:e=>({url:"/newsletter/confirm-subscription/",method:"POST",body:{token:e}})}),addComment:e.mutation({query:e=>{let{comment:t,post:r}=e;return{url:"/comments/".concat(r,"/"),method:"POST",body:{comment:t,post:r}}}}),addReview:e.mutation({query:e=>{let{review:t,movie:r,rating:n}=e;return{url:"/add-movie-review/".concat(r,"/"),method:"POST",body:{review:t,rating:n}}}}),resetPassword:e.mutation({query:e=>({url:"/users/reset_password/",method:"POST",body:{email:e}})}),resetPasswordConfirm:e.mutation({query:e=>{let{uid:t,token:r,new_password:n,re_new_password:s}=e;return{url:"/users/reset_password_confirm/",method:"POST",body:{uid:t,token:r,new_password:n,re_new_password:s}}}}),addUserAvatarUrl:e.mutation({query:e=>({url:"/add-avatar-url/",method:"POST",body:{avatar_url:e}})})})})},96541:function(e,t,r){"use strict";r.d(t,{Ik:function(){return w},QV:function(){return p},he:function(){return c},kS:function(){return j},ls:function(){return d},m8:function(){return y},or:function(){return b}});let n=(0,r(14506).oM)({name:"auth",initialState:{user:null,isAuthenticated:!1,loading:!1,isLoading:!0,registerSuccess:!1,resetRegisterSuccess:!1,registerFail:!1,loginSuccess:!1,loginFail:!1,logoutSuccess:!1,logoutFail:!1,loadUserSuccess:!1,loadUserFail:!1,validAccess:!1,invalidAccess:!1,refreshSuccess:!1,refreshFail:!1,loginModal:!1},reducers:{registerSuccess:e=>{e.registerSuccess=!0,e.loading=!1},resetRegisterSuccess:e=>{e.registerSuccess=!1},registerFail:e=>{e.registerSuccess=!1,e.loading=!1},setAuthLoading:e=>{e.loading=!0},removeAuthLoading:e=>{e.loading=!1},loginSuccess:e=>{e.isAuthenticated=!0,e.loading=!1},loginFail:e=>{e.isAuthenticated=!1,e.loading=!1},logoutSuccess:e=>{e.isAuthenticated=!1,e.loading=!1},logoutFail:e=>{e.isAuthenticated=!1,e.loading=!1},loadUserSuccess:(e,t)=>{e.isAuthenticated=!0,e.loading=!1,e.user=null},loadUserFail:e=>{e.isAuthenticated=!1,e.loading=!1},refreshSuccess:e=>{e.refreshSuccess=!0,e.loading=!1},refreshFail:e=>{e.refreshFail=!0,e.loading=!1},setAuth:e=>{e.isAuthenticated=!0,e.isLoading=!1},logout:e=>{e.isAuthenticated=!1},finishInitialLoad:e=>{e.isLoading=!1},isLoading:e=>{e.isLoading=!1},showLoginModal:e=>{e.loginModal=!0},hideLoginModal:e=>{e.loginModal=!1}}}),{registerSuccess:s,resetRegisterSuccess:a,registerFail:i,setAuthLoading:o,removeAuthLoading:l,loginSuccess:c,loginFail:u,logoutSuccess:d,logoutFail:m,loadUserSuccess:h,loadUserFail:f,refreshSuccess:g,refreshFail:x,setAuth:p,finishInitialLoad:b,isLoading:v,logout:j,showLoginModal:y,hideLoginModal:w}=n.actions;t.ZP=n.reducer},44123:function(e,t,r){"use strict";r.d(t,{Og:function(){return o},bl:function(){return u},en:function(){return c},iB:function(){return l},t5:function(){return d},w0:function(){return i},xS:function(){return m}});let n=(0,r(14506).oM)({name:"chat",initialState:{socket:null,socketRoom:"",disconnectionMessage:"",chatParticipant:"",chatModalClass:!1,chatInitiator:"",connectionStatus:"Connecting to live chat ...",typingStatus:""},reducers:{setSocket:(e,t)=>{e.socket=t.payload},setSocketRoom:(e,t)=>{e.socketRoom=t.payload},setChatParticipant:(e,t)=>{e.chatParticipant=t.payload},disconnectSocket:e=>{e.socket&&(e.socket.close(),e.socket=null,e.disconnectionMessage="disconnection notice from redux")},toggleChatModalClass:e=>{e.chatModalClass=!e.chatModalClass},setChatInitiator:(e,t)=>{e.chatInitiator=t.payload},setConnectionStatus:(e,t)=>{e.connectionStatus=t.payload},setTypingStatus:(e,t)=>{e.typingStatus=t.payload},setDisconnectionMessage:(e,t)=>{e.disconnectionMessage=t.payload}}}),{setSocket:s,disconnectSocket:a,setSocketRoom:i,setChatParticipant:o,toggleChatModalClass:l,setChatInitiator:c,setConnectionStatus:u,setTypingStatus:d,setDisconnectionMessage:m}=n.actions;t.ZP=n.reducer},27528:function(e,t,r){"use strict";r.d(t,{M:function(){return s}});let n=(0,r(14506).oM)({name:"user",initialState:{id:0,first_name:"",last_name:"",full_name:"",profile_image:"",cover_image:"",bio:"",job_title:"",location:"",avatar_url:"",website_url:"",github_url:"",bitbucket_url:"",facebook_url:"",instagram_url:"",linkedin_url:"",twitter_url:"",email_address_visibility:"",telephone_number:"",description:"",suitors:[],crushing_on:[],no_of_posts:0,number_of_suitors:0,number_of_crushing_on:0,username:"",email:"",notifications_count:0,intent:""},reducers:{setUserData:(e,t)=>{Object.assign(e,t.payload)}}}),{setUserData:s}=n.actions;t.Z=n.reducer},83642:function(e,t,r){"use strict";r.d(t,{Jo:function(){return s},OS:function(){return a},rM:function(){return i},sy:function(){return o}});let n=r(75122).yK,s="https://".concat(n,".com"),a="".concat(n,".com"),i="".concat(n,".com"),o="https://".concat(n,".com")},34420:function(e,t,r){"use strict";r.d(t,{Providers:function(){return v}});var n=r(57437),s=r(49567),a=r(14506);let i=(0,a.oM)({name:"counter",initialState:{value:0},reducers:{increment:e=>{e.value+=1},decrement:e=>{e.value-=1},set:(e,t)=>{e.value=t.payload}}}),{increment:o,decrement:l,set:c}=i.actions;var u=i.reducer,d=r(44123),m=r(96541),h=r(9146),f=r(27528);let g=(0,a.oM)({name:"project",initialState:{id:null,project_name:"",project_description:"",project_screenshot:"",project_url:"",source_url:""},reducers:{setProjectData:(e,t)=>{e.id=t.payload.id,e.project_name=t.payload.project_name,e.project_description=t.payload.project_description,e.project_screenshot=t.payload.project_screenshot,e.project_url=t.payload.project_url,e.source_url=t.payload.source_url}}}),{setProjectData:x}=g.actions;var p=g.reducer;let b=(0,a.xC)({reducer:{counter:u,chat:d.ZP,auth:m.ZP,user:f.Z,project:p,[h.g.reducerPath]:h.g.reducer},middleware:e=>e().concat(h.g.middleware),devTools:!1});function v(e){let{children:t}=e;return(0,n.jsx)(s.zt,{store:b,children:t})}},63268:function(e,t,r){"use strict";r.d(t,{default:function(){return h}});var n=r(57437),s=r(2265),a=r(49567),i=r(61363),o=r(96541),l=r(18206);r(2648);var c=r(29710),u=r(27528);r(83079);var d=(0,r(12119).$)("e2c13e9dc576fd823bf5633d2db1439b85858b86"),m=r(32298);function h(e){let{}=e,t=(0,a.I0)(),[r]=(0,i.Mp)(),[h]=(0,i.hS)(),{signedIn:f,signOut:g}=(0,m.b)(),{data:x,error:p,isLoading:b}=(0,i.sO)(void 0);return(0,s.useEffect)(()=>{(async()=>{if(await (0,c.a)())h(void 0).unwrap().then(()=>{r(void 0).unwrap().then(()=>{d().then(e=>{t((0,u.M)(e)),t((0,o.he)()),f()}).catch(e=>{}).finally(()=>{t((0,o.or)())})})}).catch(e=>{t((0,o.or)())});else{localStorage.removeItem("loggedIn"),g(),t((0,o.ls)()),t((0,o.or)());return}})()},[]),(0,n.jsx)(l.Ix,{position:"top-right",theme:"light",hideProgressBar:!0,autoClose:2e3})}},13458:function(e,t,r){"use strict";r.d(t,{p:function(){return s},z:function(){return n}});let n=e=>{let t=new Date,r=new Date(e),n=Math.floor((t.getTime()-r.getTime())/1e3),s=(e,t)=>{let r=Math.floor(e);return"".concat(r," ").concat(t).concat(r>1?"s":""," ago")};return n<60?s(n/1,"second"):n<3600?s(n/60,"minute"):n<86400?s(n/3600,"hour"):n<604800?s(n/86400,"day"):n<2627856?s(n/604800,"week"):n<31557600?s(n/2627856,"month"):s(n/31557600,"year")},s=e=>{let t=new Date(e),r=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),s=String(t.getDate()).padStart(2,"0");return"".concat(r,"-").concat(n,"-").concat(s)}},47960:function(){}},function(e){e.O(0,[8333,5676,9571,1582,2306,2420,3712,2400,9982,5104,1465,9929,1724,8206,2972,9567,9379,5878,4506,429,1229,5183,2971,2117,1744],function(){return e(e.s=73289)}),_N_E=e.O()}]);