(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3185],{46744:function(){},33008:function(e,t,n){Promise.resolve().then(n.t.bind(n,61687,23)),Promise.resolve().then(n.bind(n,67740)),Promise.resolve().then(n.bind(n,30052)),Promise.resolve().then(n.bind(n,89362)),Promise.resolve().then(n.bind(n,48)),Promise.resolve().then(n.bind(n,88563)),Promise.resolve().then(n.bind(n,54174)),Promise.resolve().then(n.bind(n,59883)),Promise.resolve().then(n.bind(n,72807)),Promise.resolve().then(n.bind(n,59162)),Promise.resolve().then(n.bind(n,59958))},94546:function(e,t,n){"use strict";n.d(t,{default:function(){return A}});var r=n(15124),i=n(97159),o=n(17669),a=n(48),s=n(44315),l=n(43784),c=n(43181),d=n(36616),u=n(95559),f=n(11685),h=n(63050),x=n(79921),p=n(49722),b=n(97765),m=n(1693),g=n(76374),j=n(18847),w=n(31300),y=n(97451),v=n(36437),k=n(79239),Z=n(29005),C=n(30052),S=n(52068),M=n(67485),T=n(7279),$=n(2995),I=n(279),O=n(14769),P=n(22098),R=n(63424),U=n(16490),E=n(62222);function A(e){let{user:t,isNotif:n}=e,A=(0,M.useParams)(),J=(0,M.useRouter)(),L=t&&"admin"===t.role,[N,z]=(0,T.useState)(!0),[F,B]=(0,T.useState)("shortlist"),D=["shortlist","jobtracker","referral"],H=n?5:10,[_,W]=(0,T.useState)(0),[q,Q]=(0,T.useState)(new i.UL),[V,G]=(0,T.useState)(!1),[K,X]=(0,T.useState)(""),[Y,ee]=(0,T.useState)({}),[et,en]=(0,T.useState)(new O.i({show:!1,key:0})),er=async()=>{ee(await (0,U.L)())},ei=async()=>{Q(await (0,i.ob)()),z(!1)},eo=e=>{if(null===t)return J.push("/login");en(new O.i({show:!0,key:et.key+1,title:"Add Job",handleClose:()=>en(new O.i({show:!1,key:0})),handleConfirm:async e=>{await (0,I.uN)(e,t),en(new O.i({show:!1,key:0}))},confirm:"Save",defaultOptions:{...e,application_date:new Date().toISOString().split("T")[0]}}))},ea=e=>(0,r.jsx)("div",{role:"tabpanel",hidden:e.activeTab!==e.tab,children:e.activeTab===F&&(0,r.jsxs)("div",{children:[(0,r.jsx)("br",{}),N&&(0,r.jsx)(o.Z,{}),!N&&(0,r.jsx)(es,{logs:e.logs})]})}),es=e=>(0,r.jsx)(a.default,{spacing:2,children:e.logs.slice(_*H,_*H+H).map((e,t)=>{let n=e.getUrl(),i=e.getMessage();return(0,r.jsxs)(s.ZP,{container:!0,columnSpacing:0,children:[(0,r.jsx)(s.ZP,{item:!0,xs:L?11:12,children:(0,r.jsxs)(l.Z,{style:{cursor:"pointer"},severity:"info",sx:{padding:1,border:"1px solid",borderColor:"info.main",borderRadius:5},onClick:()=>"jobtracker"===e.type?eo(e.data):""!==n&&J.push(n),children:[(0,r.jsx)(c.Z,{children:(0,r.jsx)(a.default,{direction:"row",justifyContent:"space-between",children:e.createdAt.toDateString().split(" ").slice(1).join(" ")})}),(0,r.jsx)(d.Z,{variant:"body1",children:i})]})}),L&&(0,r.jsx)(s.ZP,{item:!0,xs:1,display:"flex",justifyContent:"center",margin:"auto",children:(0,r.jsx)(u.Z,{size:"small",color:"error",onClick:()=>{X(e.id),G(!0)},children:(0,r.jsx)(P.Z,{})})})]},t)})});return(0,T.useEffect)(()=>{er()},[]),(0,T.useEffect)(()=>{let e=window.location.hash.substring(1);D.includes(e)&&(B(e),W(0))},[A]),(0,T.useEffect)(()=>{let e=(0,i.cW)(),t=(0,E.cf)(e,async()=>{await ei()});return()=>t()},[]),(0,r.jsx)(j.Z,{maxWidth:n?"sm":"md",style:{padding:0},children:(0,r.jsxs)(w.Z,{elevation:n?24:2,sx:{p:2,width:"100%"},children:[(0,r.jsxs)(a.default,{direction:"row",justifyContent:"center",children:[(0,r.jsx)(d.Z,{variant:"h3",textAlign:"center",children:"Events"}),n&&(0,r.jsx)(y.Z,{color:"primary",onClick:()=>J.push("/events"),sx:{position:"relative",bottom:10},children:(0,r.jsx)(R.Z,{fontSize:"small"})})]}),(0,r.jsx)("br",{})," ",(0,r.jsx)(v.Z,{})," ",(0,r.jsx)("br",{}),(0,r.jsxs)(k.Z,{value:F,onChange:(e,t)=>{n?(B(t),W(0)):J.push(`#${t}`)},centered:!0,children:[(0,r.jsx)(Z.Z,{label:"Shortlist",value:"shortlist"}),(0,r.jsx)(Z.Z,{label:"Job Tracker",value:"jobtracker"}),(0,r.jsx)(Z.Z,{label:"Referral",value:"referral"})]}),(0,r.jsx)(ea,{tab:"shortlist",activeTab:F,title:"Shortlist",logs:q.shortlist}),(0,r.jsx)(ea,{tab:"jobtracker",activeTab:F,title:"Job Tracker",logs:q.jobtracker}),(0,r.jsx)(ea,{tab:"referral",activeTab:F,title:"Referral",logs:q.referral}),(0,r.jsx)(C.default,{className:"center",children:(0,r.jsx)(w.Z,{elevation:2,sx:{p:1,borderRadius:5,mt:2,display:"inline-block"},children:(0,r.jsx)(S.Z,{color:"primary",shape:"rounded",count:Math.ceil(q[F].length/H),page:_+1,onChange:(e,t)=>W(t-1),showFirstButton:!0,showLastButton:!0})})}),(0,r.jsx)($.Z,{...et,countryData:Y}),(0,r.jsx)(()=>{let[e,t]=(0,T.useState)(!1),n=async()=>{t(!0),await (0,i.zk)(K),await ei(),t(!1),G(!1)};return(0,r.jsxs)(f.Z,{open:V,onClose:()=>G(!1),children:[(0,r.jsx)(h.Z,{children:"Delete Log"}),(0,r.jsx)(x.Z,{children:(0,r.jsx)(p.Z,{children:"Are you sure you want to delete this log?"})}),(0,r.jsxs)(b.Z,{children:[(0,r.jsx)(m.Z,{color:"error",disabled:e,onClick:()=>G(!1),children:"Cancel"}),(0,r.jsxs)(m.Z,{color:"success",onClick:n,disabled:e,children:[e&&(0,r.jsx)(g.Z,{size:20,color:"inherit"}),"Delete"]})]})]})},{})]})})}},54174:function(e,t,n){"use strict";n.d(t,{default:function(){return s}});var r=n(15124),i=n(95559),o=n(59997),a=n(52600);function s(){return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(i.Z,{size:"small",color:"warning","aria-label":"add",onClick:e=>(0,o._)(e,"https://github.com/HowToAbroad/Howtoabroad/issues/new"),children:(0,r.jsx)(a.Z,{})})})}n(7279)},59883:function(e,t,n){"use strict";n.d(t,{default:function(){return s}});var r=n(15124),i=n(95559),o=n(59997),a=n(30061);function s(){let e="Hi, I was on https://app.howtoabroad.com and I need help with...";encodeURIComponent(e);let t="https://wa.me/917607537338?text="+encodeURIComponent(e);return(0,r.jsx)(i.Z,{size:"small",color:"success","aria-label":"add",onClick:e=>(0,o._)(e,t),children:(0,r.jsx)(a.Z,{})})}n(7279)},72807:function(e,t,n){"use strict";n.d(t,{default:function(){return Y}});var r=n(15124),i=n(7279);n(37446);var o=n(18236),a=n(30052),s=n(48),l=n(36616),c=n(97451),d=n(36437),u=n(1693),f=n(67485);function h(){let e=(0,f.useRouter)();return(0,r.jsx)(a.default,{sx:{height:{md:70},zIndex:{md:1201,xs:1199},position:{md:"absolute",xs:"relative"}},className:"footer",children:(0,r.jsx)(a.default,{sx:{width:"80%",m:"auto"},children:(0,r.jsxs)(s.default,{width:"100%",direction:{xs:"column",md:"row"},justifyContent:"space-between",alignItems:"center",children:[(0,r.jsx)(l.Z,{variant:"body2",color:"inherit",children:"\xa9 Copyright 2024, All Rights Reserved  |  Powered by How To Abroad"}),(0,r.jsxs)(s.default,{direction:{xs:"column",md:"row"},children:[(0,r.jsxs)(s.default,{direction:"row",children:[(0,r.jsx)(c.Z,{color:"inherit",onClick:()=>handleClick("https://www.facebook.com/HowtoAbroad"),children:(0,r.jsx)(o.Am9,{size:15})}),(0,r.jsx)(c.Z,{color:"inherit",onClick:()=>handleClick("https://twitter.com/HowToAbroad"),children:(0,r.jsx)(o.fWC,{size:15})}),(0,r.jsx)(c.Z,{color:"inherit",onClick:()=>handleClick("https://in.pinterest.com/howtoabroad21"),children:(0,r.jsx)(o.oIN,{size:15})}),(0,r.jsx)(c.Z,{color:"inherit",onClick:()=>handleClick("http://www.linkedin.com/company/howtoabroad/"),children:(0,r.jsx)(o.BUd,{size:15})}),(0,r.jsx)(c.Z,{color:"inherit",onClick:()=>handleClick("https://www.youtube.com/channel/UCxvyTD4rObdyJD7UifqQxFA"),children:(0,r.jsx)(o.V2E,{size:15})}),(0,r.jsx)(c.Z,{color:"inherit",onClick:()=>handleClick("https://www.instagram.com/howtoabroad/"),children:(0,r.jsx)(o.Zf_,{size:15})}),(0,r.jsx)(c.Z,{color:"inherit",onClick:()=>handleClick("https://t.me/joinchat/5OhxT2sHKRw5ZDUy"),children:(0,r.jsx)(o.Ww5,{size:15})}),(0,r.jsx)(c.Z,{color:"inherit",onClick:()=>handleClick("https://howtoabroad.com/feed/"),children:(0,r.jsx)(o.FZ6,{size:15})})]}),(0,r.jsxs)(s.default,{direction:"row",children:[(0,r.jsx)(d.Z,{orientation:"vertical",flexItem:!0,sx:{ml:1,mr:1}}),(0,r.jsx)(u.Z,{color:"inherit",onClick:()=>e.push("/privacy-policy"),children:"Privacy Policy"}),(0,r.jsx)(d.Z,{orientation:"vertical",flexItem:!0,sx:{ml:1,mr:1}}),(0,r.jsx)(u.Z,{color:"inherit",onClick:()=>e.push("/sitemap.xml"),children:"Sitemap"})]})]})]})})})}var x=n(3446),p=n(81977),b=n(87763),m=n(53416),g=n(7761),j=n(43784),w=n(30061),y=n(52600),v=n(42149),k=n(4422),Z=n(22308),C=n(90246),S=n(13739),M=n(7717),T=n(28738),$=n(96040),I=n(72359),O=n(57589),P=n(83808),R=n(1892),U=n(18640),E=n(31538),A=n(81086),J=n(5674),L=n(94546),N=n(24031),z=n(13686);function F(e){let{user:t}=e,[n,o]=(0,i.useState)(null);return(0,r.jsxs)(a.default,{children:[(0,r.jsx)(c.Z,{onClick:e=>{o(e.currentTarget)},color:"primary",children:(0,r.jsx)(N.Z,{})}),(0,r.jsx)(z.ZP,{anchorEl:n,open:!!n,onClose:()=>{o(null)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:(0,r.jsx)(L.default,{user:t,isNotif:!0})})]})}var B=n(20639),D=n(43181),H=n(62222);function _(){let[e,t]=(0,i.useState)([]),[n,o]=(0,i.useState)({}),a=async()=>{let e=await (0,B.cC)();t(e);let r={};e.forEach(e=>{n[e.id]||(r[e.id]=!1)}),o(r)};return((0,i.useEffect)(()=>{let e=(0,B.qZ)(),t=(0,H.cf)(e,async()=>await a());return()=>t()},[]),0===e.length)?null:e.every(e=>n[e.id])?null:(0,r.jsx)(s.default,{direction:"column",spacing:1,p:2,pb:0,children:e.map((e,t)=>n[e.id]?null:(0,r.jsxs)(j.Z,{severity:e.severity,onClose:()=>o({...n,[e.id]:!0}),children:[e.title&&(0,r.jsx)(D.Z,{children:e.title}),e.description]},t))})}let W="#3258a3",q="rgb(91, 121, 181)",Q="rgb(35, 61, 114)",V=(0,x.Z)({breakpoints:{values:{xs:0,sm:850,md:1230,lg:1550,xl:1870}},palette:{mode:"light",background:{default:"#f4f6f8",paper:"#fff"},primary:{main:W,light:q,dark:Q},secondary:{main:"#a33258",light:"rgb(181, 91, 121)",dark:"rgb(114, 35, 61)"}},components:{MuiPaper:{styleOverrides:{root:{borderRadius:"10px"}}},MuiContainer:{styleOverrides:{root:{borderRadius:"10px"}}},MuiButton:{styleOverrides:{root:{borderRadius:"10px",textTransform:"none"}}},MuiCard:{styleOverrides:{root:{borderRadius:"10px"}}},MuiAppBar:{styleOverrides:{root:{borderRadius:0,background:`linear-gradient(0deg, ${Q} 0%, ${W} 100%) !important`,"& .MuiSvgIcon-root":{color:"#fff"}}}},MuiDrawer:{styleOverrides:{docked:{"& .MuiListItemButton-root":{paddingTop:"2px",paddingBottom:"2px",height:"auto"},"& .MuiListItemText-primary":{fontSize:"0.9rem"},"> div:first-child:after":{content:'""',display:"block",height:"75px"}}}},MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{background:`linear-gradient(90deg, ${Q} 0%, ${q} 100%)`,"& .MuiTypography-root":{color:"#fff !important",fontWeight:"bold"},"& .MuiSvgIcon-root":{color:"#fff !important"}}}}},MuiListSubheader:{styleOverrides:{sticky:{position:"relative"}}},MuiTableContainer:{styleOverrides:{root:{borderRadius:"10px"}}},MuiTableRow:{styleOverrides:{root:{"&:nth-child(odd)":{backgroundColor:"#E7E9EB"}},head:{background:`linear-gradient(0deg, ${Q} 0%, ${q} 100%) !important`,"& .MuiTableCell-head":{color:"#fff",fontWeight:"bold"}}}},MuiTableSortLabel:{styleOverrides:{root:{"&:hover":{color:"rgba(255, 255, 255, 0.67)"},"&.Mui-active":{color:"#fff",fontWeight:"bold","& .MuiSvgIcon-root":{color:"#fff"},"&:hover":{color:"rgba(255, 255, 255, 0.67)"}}}}},MuiTab:{styleOverrides:{root:{"&.Mui-selected":{background:`linear-gradient(90deg, ${Q} 0%, ${q} 100%)`,color:"#fff",fontWeight:"bold","& .MuiSvgIcon-root":{color:"#fff !important"}}}}}}}),G=(0,x.Z)({breakpoints:{values:{xs:0,sm:850,md:1230,lg:1550,xl:1870}},palette:{mode:"dark",primary:{main:"#90caf9",light:"#e3f2fd",dark:"#42a5f5"},secondary:{main:"#ce93d8",light:"#f3e5f5",dark:"#f3e5f5"}},components:{MuiPaper:{styleOverrides:{root:{borderRadius:"10px"}}},MuiContainer:{styleOverrides:{root:{borderRadius:"10px"}}},MuiButton:{styleOverrides:{root:{borderRadius:"10px",textTransform:"none"}}},MuiCard:{styleOverrides:{root:{borderRadius:"10px"}}},MuiTableContainer:{styleOverrides:{root:{borderRadius:"10px"}}},MuiAppBar:{styleOverrides:{root:{borderRadius:0}}},MuiDrawer:{styleOverrides:{docked:{"& .MuiListItemButton-root":{paddingTop:"2px",paddingBottom:"2px",height:"auto"},"& .MuiListItemText-primary":{fontSize:"0.9rem"},"> div:first-child:after":{content:'""',display:"block",height:"75px"}}}},MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{background:`linear-gradient(90deg, ${Q} 0%, ${q} 100%)`,"& .MuiTypography-root":{color:"#fff !important",fontWeight:"bold"},"& .MuiSvgIcon-root":{color:"#fff !important"}}}}},MuiListSubheader:{styleOverrides:{sticky:{position:"relative"}}},MuiTab:{styleOverrides:{root:{"&.Mui-selected":{background:`linear-gradient(90deg, ${Q} 0%, ${q} 100%)`,color:"#fff",fontWeight:"bold","& .MuiSvgIcon-root":{color:"#fff !important"}}}}},MuiTableRow:{styleOverrides:{root:{"&:nth-child(odd)":{backgroundColor:"#232323"}},head:{background:"#111 !important","& .MuiTableCell-head":{color:"#fff",fontWeight:"bold"}}}}}}),K=()=>((0,p.Z)(),(0,r.jsx)("img",{src:"/_next/static/media/logo_white.2ee11664.png",alt:"How To Abroad",height:50})),X=e=>{let{mini:t}=e,n="https://github.com/HowToAbroad/Howtoabroad/issues/new",i="https://wa.me/917607537338?text="+encodeURIComponent("Hi, I was on https://app.howtoabroad.com and I need help with...");return t?(0,r.jsxs)(a.default,{sx:{p:2,display:"flex",flexDirection:"column",justifyContent:"center"},children:[(0,r.jsx)(c.Z,{href:i,target:"_blank",rel:"noopener noreferrer",color:"success",children:(0,r.jsx)(w.Z,{})}),(0,r.jsx)(c.Z,{href:n,target:"_blank",rel:"noopener noreferrer",color:"warning",children:(0,r.jsx)(y.Z,{})})]}):(0,r.jsxs)(a.default,{sx:{p:2,m:2,display:"flex",flexDirection:"column",gap:2},children:[(0,r.jsx)(u.Z,{fullWidth:!0,variant:"outlined",color:"success",startIcon:(0,r.jsx)(w.Z,{}),href:i,target:"_blank",rel:"noopener noreferrer",children:"Contact us on WhatsApp"}),(0,r.jsx)(u.Z,{fullWidth:!0,variant:"outlined",color:"warning",startIcon:(0,r.jsx)(y.Z,{}),href:n,target:"_blank",rel:"noopener noreferrer",children:"Report an issue"})]})};function Y(e){let{user:t,children:n,role:o,viewAsEnabled:s}=e,l=[{segment:"",title:"Dashboard",icon:(0,r.jsx)(v.Z,{})},{segment:"resume-builder",title:"Resume Builder",icon:(0,r.jsx)(k.Z,{}),pattern:"/resume-builder{/:uuid}*"},{segment:"motivation-letter-creator",title:"Motivation Letter",icon:(0,r.jsx)(Z.Z,{})},{segment:"jobtracker",title:"My Jobs",icon:(0,r.jsx)(C.Z,{})},{kind:"divider"},{kind:"header",title:"For Professionals"},{segment:"jobs",title:"Browse Jobs",icon:(0,r.jsx)(S.Z,{})},{segment:"referral",title:"Referral",icon:(0,r.jsx)(M.Z,{}),pattern:"/referral{/:referralId}*"},{kind:"divider"},{kind:"header",title:"For Students"},{segment:"tools",title:"Tools",icon:(0,r.jsx)(T.Z,{})},{segment:"courses",title:"Browse Courses",icon:(0,r.jsx)($.Z,{}),pattern:"/courses{/:courseId}*"},{segment:"shortlists",title:"Shortlist",icon:(0,r.jsx)(I.Z,{})},..."admin"===o?[{kind:"divider"},{kind:"header",title:"Admin"},{segment:"admin",title:"Admin Dashboard",icon:(0,r.jsx)(v.Z,{})},{segment:"admin/users",title:"Users",icon:(0,r.jsx)(O.Z,{})},{segment:"admin/flags",title:"Flagged Content",icon:(0,r.jsx)(P.Z,{})}]:[],...t?[{kind:"divider"},{kind:"header",title:"Account"},{kind:"folder",title:"Profile",segment:"account",icon:(0,r.jsx)(R.Z,{}),children:[{title:"Account",icon:(0,r.jsx)(U.Z,{})},{segment:"student-data",title:"Student Info",icon:(0,r.jsx)(E.Z,{})}]},{segment:"logout",title:"Logout",icon:(0,r.jsx)(A.Z,{})}]:[],{kind:"divider"}],c=(0,f.useRouter)(),d=(0,f.usePathname)(),[x,p]=i.useState(null),w=async()=>{await (0,J.Fj)(),location.reload()},y=i.useMemo(()=>({signIn:()=>{c.push("/login")},signOut:()=>{let e=encodeURIComponent(d+"?"+new URLSearchParams(window.location.search).toString());c.push(`/logout?redirect=${e}`)}}),[]);return(0,i.useEffect)(()=>{t?p({user:{id:t.uid,name:t.displayName,email:t.email,image:t.photoURL}}):p(null)},[t]),(0,r.jsx)(g.N,{children:(0,r.jsx)(b.w,{session:x,authentication:y,theme:{light:V,dark:G},navigation:l,branding:{title:"",logo:(0,r.jsx)(K,{})},children:(0,r.jsxs)(m.c,{slots:{sidebarFooter:X,toolbarActions:F},children:[(0,r.jsx)(_,{}),s&&(0,r.jsxs)(j.Z,{severity:"info",sx:{textAlign:"center"},action:(0,r.jsx)(u.Z,{onClick:w,children:"Stop Viewing"}),children:["Viewing as another user: ",t.email]}),(0,r.jsx)(a.default,{sx:{flexGrow:1,p:2,display:"flex",justifyContent:"center",maxWidth:{xs:"100vw",sm:"none"},"> div:first-child:after":{content:'""',display:"block",height:"80px"}},children:n}),(0,r.jsx)(h,{})]})})})}},59997:function(e,t,n){"use strict";function r(e,t){e.preventDefault(),window.open(t,"_blank")}n.d(t,{_:function(){return r}})},88563:function(e,t,n){"use strict";n.r(t);var r=n(15124),i=n(7279);n(34971),t.default=()=>{let[e,t]=(0,i.useState)([]),[n,o]=(0,i.useState)(""),[a,s]=(0,i.useState)(!1),l=()=>{if(""===n.trim())return;t([...e,{sender:"user",text:n}]),o("");let r={sender:"bot",text:`You said: ${n}`};setTimeout(()=>{t(e=>[...e,r])},1e3)},c=()=>{s(!a)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"floating-icon",onClick:c,style:{display:a?"none":"flex"},children:"?"}),(0,r.jsxs)("div",{className:"chat-bot",style:{display:a?"flex":"none"},children:[(0,r.jsxs)("div",{className:"chat-header",children:[(0,r.jsx)("div",{className:"chat-title",children:"How can I help you?"}),(0,r.jsx)("button",{className:"minimize-button",onClick:c,children:"−"})]}),(0,r.jsx)("div",{className:"chat-window",children:e.map((e,t)=>(0,r.jsx)("div",{className:`message ${"user"===e.sender?"user":"bot"}`,children:e.text},t))}),(0,r.jsxs)("div",{className:"input-area",children:[(0,r.jsx)("input",{type:"text",value:n,onChange:e=>o(e.target.value),onKeyDown:e=>"Enter"===e.key&&l(),placeholder:"Type a message..."}),(0,r.jsx)("button",{onClick:l,children:"Send"})]})]})]})}},59162:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return u}});var r=n(15124),i=n(7279),o=n(30052),a=n(36616),s=n(42087),l=n(48),c=n(1693),d=n(5674);function u(){let[e,t]=(0,i.useState)(!1),n=async()=>{await (0,d.cf)()||t(!0)},u=async()=>{await (0,d.jW)(),t(!1)},f=async()=>{await (0,d.Ch)(),t(!1)};return((0,i.useEffect)(()=>{n()},[]),e)?(0,r.jsxs)(o.default,{sx:{position:"fixed",bottom:0,left:0,width:"100%",backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:2,textAlign:"center",zIndex:1e4},children:[(0,r.jsx)(a.Z,{variant:"body1",children:"This website uses cookies to ensure you get the best experience on our website."}),(0,r.jsxs)(a.Z,{variant:"body2",children:["By using this site, you agree to our use of cookies. ",(0,r.jsx)(s.Z,{href:"/privacy-policy",color:"inherit",children:"Learn more"})]}),(0,r.jsx)("br",{}),(0,r.jsxs)(l.default,{direction:"row",spacing:2,justifyContent:"center",children:[(0,r.jsx)(c.Z,{color:"error",variant:"contained",onClick:f,children:"Reject"}),(0,r.jsx)(c.Z,{color:"success",variant:"contained",onClick:u,children:"Accept"})]})]}):null}},5674:function(e,t,n){"use strict";n.d(t,{Ch:function(){return a},Fj:function(){return f},Jp:function(){return h},Qk:function(){return c},cf:function(){return s},dJ:function(){return i},fV:function(){return l},jW:function(){return o},kf:function(){return u},qj:function(){return d}}),n(76390);var r=n(38566),i=(0,r.$)("257d50718a9419feb73af935b2e921a6b24ced7c"),o=(0,r.$)("55907f5a2b1486d291447f16573bb7d530bc7313"),a=(0,r.$)("f235daac7a533f291c5d19f7b01006b2eafd94a9"),s=(0,r.$)("03b58c5f04c031bcf353f1a331e8b556fa62d91e"),l=(0,r.$)("7aaa25cc5c1a40fb2c3a6fef7b83f5f1648a6103"),c=(0,r.$)("1f466f586766a3b827f6986b0e24963c92d48542");(0,r.$)("eb25e1cb50d01d68d996f13f4023e4deab51501b");var d=(0,r.$)("6aa4fd5c0f8dedc4945d17bd91f68e63067ab16c");(0,r.$)("d71fa610a0cb4c0b77b7a918ca5576b18722afd7");var u=(0,r.$)("986ddf004f8b7e0be08eac26c24083e568fc17d5");(0,r.$)("13810f1162b80dd9fb1a9d948cb87490174f1c36");var f=(0,r.$)("61207ddb06d6c111ed2a95f6bc26c4afcfad29cc");(0,r.$)("df7214588b2e18851f897f50ab98e5af590e9c9b");var h=(0,r.$)("71ec5fc952d877b0ea9fd965f670a63bf0c933c4")},59958:function(e,t,n){"use strict";n.d(t,{AuthProvider:function(){return k},a:function(){return v}});var r=n(15124),i=n(7279),o=n(61713),a=n(56628),s=n(35931),l=n(5674),c=n(74556),d=n(32759);async function u(){let e;let t=(0,d.v0)(o.l).currentUser,n=null,r=!1;if(t){let i=await (0,s.rD)("profile/info",t);n=i?.role,e=i?.name;let o=i?.country;(null===n||""===n||void 0===n)&&(n="user"),null!=e&&""!==e&&null!=o&&""!==o&&(r=!0)}let i={user:{role:n,validated:r,...JSON.parse(JSON.stringify(t)),displayName:e},role:n};console.log(i),await (0,l.Qk)(JSON.stringify(i))}async function f(e,t){let n=(0,d.v0)(o.l);await (0,d.Xb)(n,e,t),await u()}async function h(e,t){let n=(0,d.v0)(o.l);await (0,d.e5)(n,e,t),await u()}async function x(e,t){let n=(0,d.v0)(o.l),r=t?c.Z.auth.GoogleAuthProvider.credential(null,e):c.Z.auth.GoogleAuthProvider.credential(e);await (0,d.sB)(n,r),await u()}async function p(){let e=(0,d.v0)(o.l);await (0,a.Kz)(),await (0,d.w7)(e),await (0,l.qj)()}async function b(e){let t=(0,d.v0)(o.l);await (0,d.LS)(t,e),await u()}async function m(e,t){await (0,d.s)(e,t),await u()}async function g(e,t){await (0,d.gQ)(e,t),await u()}var j=n(76374),w=()=>(0,r.jsx)("div",{className:"loading-spinner",children:(0,r.jsx)(j.Z,{})});let y=i.createContext();function v(){return(0,i.useContext)(y)}function k(e){let{children:t}=e,[n,l]=(0,i.useState)(),[c,d]=(0,i.useState)("user"),[u,j]=(0,i.useState)(!0),v=async()=>{l(null),d(null),await p()};return(0,i.useEffect)(()=>{let e=o.l.auth().onAuthStateChanged(async e=>{if(l(e),null!=e){(0,s.Mu)(e);let t=await (0,s.V1)("profile/info","role",e);t||(t="user"),d(t),await (0,s.UX)(e)}j(!1)});return()=>e()},[]),(0,r.jsx)(y.Provider,{value:{currentUser:n,userRole:c,login:function(e,t){return h(e,t)},signup:function(e,t){return f(e,t)},googleSignIn:function(e,t){return x(e,t)},logout:v,resetPassword:function(e){return b(e)},updateEmail:function(e){return m(e,n)},updatePassword:function(e){return g(e,n)},setUpRecaptcha:function(e){}},children:(0,r.jsx)(a.rg,{clientId:"661001782943-ho3ukdn3rgco5glvgp1u52mm6b0kqn4c.apps.googleusercontent.com",children:u?(0,r.jsx)(w,{}):t})})}},35931:function(e,t,n){"use strict";n.d(t,{Bb:function(){return l},CS:function(){return u},LL:function(){return x},Mu:function(){return a},Q$:function(){return h},UX:function(){return s},V1:function(){return p},bj:function(){return d},d_:function(){return f},n0:function(){return c},rD:function(){return b},uX:function(){return m}});var r=n(62222),i=n(61713);function o(e){return null==e?"":`users/${e.uid}/`}async function a(e){let t=(0,r.ad)(i.l),n=(0,r.JU)(t,`users/${e.uid}`);await (0,r.pl)(n,{lastLogin:new Date},{merge:!0})}async function s(e){let t=(0,r.ad)(i.l),n=(0,r.JU)(t,o(e)+"profile/info");(await (0,r.QT)(n)).exists()||(await (0,r.pl)((0,r.JU)(t,`users/${e.uid}`),{created:new Date}),await (0,r.pl)(n,{email:e.email,name:e.displayName,phone:e.phoneNumber,role:"user"}))}async function l(e){let t=(0,r.ad)(i.l),n=(0,r.JU)(t,`users/${e}`);await (0,r.oe)(n)}async function c(e,t,n,a){let s=(0,r.ad)(i.l),l=(0,r.JU)(s,o(a)+e);await (0,r.pl)(l,{[t]:n},{merge:!0})}async function d(e,t,n){let a=(0,r.ad)(i.l),s=(0,r.JU)(a,o(n)+e);await (0,r.pl)(s,t,{merge:!0})}async function u(e,t,n,a){let s=(0,r.ad)(i.l),l=(0,r.JU)(s,o(a)+e);await (0,r.pl)(l,{[t]:(0,r.vr)(n)},{merge:!0})}async function f(e,t){let n=(0,r.ad)(i.l),a=(0,r.JU)(n,o(t)+e);await (0,r.oe)(a)}async function h(e,t){let n=(0,r.ad)(i.l),a=(0,r.hJ)(n,o(t)+e);(await (0,r.PL)(a)).forEach(async e=>{await (0,r.oe)(e.ref)})}async function x(e,t,n,a){let s=(0,r.ad)(i.l),l=(0,r.JU)(s,o(a)+e);await (0,r.pl)(l,{[t]:(0,r.Ab)(n)},{merge:!0})}async function p(e,t,n){let a=(0,r.ad)(i.l),s=(0,r.JU)(a,o(n)+e),l=await (0,r.QT)(s);return l.exists()?l.data()[t]:null}async function b(e,t){let n=(0,r.ad)(i.l),a=(0,r.JU)(n,o(t)+e),s=await (0,r.QT)(a);return s.exists()?s.data():null}async function m(e,t){let n=(0,r.ad)(i.l),a=await (0,r.PL)((0,r.hJ)(n,o(t)+e)),s={};return a.forEach(e=>{s[e.id]=e.data()}),s}n(24487)},24487:function(e,t,n){"use strict";n.d(t,{G1:function(){return s},Gq:function(){return f},ST:function(){return a},Sd:function(){return l},mU:function(){return c},oI:function(){return u},se:function(){return d}});var r=n(41726),i=n(61713);function o(e){return null==e?"":`users/${e.uid}/`}async function a(e){let t=(0,r.cF)(i.l),n=(0,r.iH)(t,`users/${e}`);await (0,r.oq)(n).then(()=>(console.log("User deleted successfully"),!0)).catch(e=>(console.error("Error deleting user: ",e),!1))}async function s(e,t,n){let a=(0,r.cF)(i.l),s=(0,r.iH)(a,o(n)+t);await (0,r.KV)(s,e).then(e=>{console.log("Uploaded a file!")}).then(()=>(console.log("File uploaded successfully"),!0)).catch(e=>(console.error("Error uploading file: ",e),!1))}async function l(e,t){let n=(0,r.cF)(i.l),a=(0,r.iH)(n,o(t)+e);await (0,r.aF)(a).then(e=>{e.items.forEach(async e=>{await (0,r.oq)(e).then(()=>(console.log("File deleted successfully"),!0)).catch(e=>(console.error("Error deleting file: ",e),!1))}),e.prefixes.forEach(async e=>{await l(e.fullPath)})}).catch(e=>(console.error("Error deleting folder: ",e),!1))}async function c(e,t){let n=(0,r.cF)(i.l),a=(0,r.iH)(n,o(t)+e);await (0,r.oq)(a).then(()=>(console.log("File deleted successfully"),!0)).catch(e=>(console.error("Error deleting file: ",e),!1))}async function d(e,t){let n=(0,r.cF)(i.l),a=(0,r.iH)(n,o(t)+e),s=await (0,r.aF)(a),l=[];return s.items.forEach(e=>{l.push(e.name)}),l}async function u(e,t){let n=(0,r.cF)(i.l),a=(0,r.iH)(n,o(t)+e);return await (0,r.Br)(a)}async function f(e,t){let n=(0,r.cF)(i.l),a=(0,r.iH)(n,o(t)+e);return(await (0,r.sd)(a)).size}},20639:function(e,t,n){"use strict";n.d(t,{Wj:function(){return a},c6:function(){return s},cC:function(){return o},lf:function(){return l},qZ:function(){return c}});var r=n(62222),i=n(61713);async function o(){let e=(0,r.ad)(i.l),t=(0,r.hJ)(e,"admin/data/warnings");return(await (0,r.PL)(t)).docs.map(e=>({id:e.id,...e.data()}))}async function a(e){let t=(0,r.ad)(i.l),n={title:e.title,description:e.description,severity:e.severity};await (0,r.ET)((0,r.hJ)(t,"admin/data/warnings"),n)}async function s(e){let t=(0,r.ad)(i.l);await (0,r.oe)((0,r.JU)(t,`admin/data/warnings/${e}`))}async function l(e){let t=(0,r.ad)(i.l),n={title:e.title,description:e.description,severity:e.severity};await (0,r.r7)((0,r.JU)(t,`admin/data/warnings/${e.id}`),n)}function c(){let e=(0,r.ad)(i.l);return(0,r.hJ)(e,"admin/data/warnings")}},61687:function(){},37446:function(){},34971:function(){}},function(e){e.O(0,[4260,5634,7375,5565,5529,4885,1204,4811,4856,815,6178,1464,1968,8770,1726,4514,7675,6695,3784,9319,9411,7196,6515,7889,797,8122,2936,826,7449,4333,6971,9579,4464,8677,1744],function(){return e(e.s=33008)}),_N_E=e.O()}]);