1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="140cd9fc-7282-4a33-93f3-8689b2b3bdda",e._sentryDebugIdIdentifier="sentry-dbid-140cd9fc-7282-4a33-93f3-8689b2b3bdda")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[69782],{3732:function(e,t,r){var a=r(57437),s=r(63726),n=r(2265),l=r(43707),o=r(99485);t.Z=e=>{var t;let{projectInfo:r}=(0,l.d)(),[i,c]=(0,n.useState)(!1),[d,u]=(0,n.useState)(null);return i?(0,a.jsx)("div",{className:"relative w-full md:w-96 h-12","data-sentry-component":"ProjectSelectionDropdown","data-sentry-source-file":"ClientPageSwitch.tsx",children:(0,a.jsxs)("div",{className:"absolute top-0 left-0 min-w-[100%] flex flex-col gap-2",children:[[{name:"dCommunity Main Games",url:"main-games",id:"1",images:{logo:"/logo.png"}},{name:"dCommunity Tailgate Promo",url:"tailgate-promo",id:"2",images:{logo:"/logo.png"}}].map((e,t)=>(0,a.jsx)(o.default,{href:"/".concat(e.url),className:"w-full bg-neutral-800 rounded-[2rem] p-2 flex flex-row items-center gap-3 transition hover:scale-105",children:(0,a.jsxs)("button",{onClick:()=>{u(e.id),c(!1)},className:"w-fit bg-neutral-800 rounded-[2rem] px-3 flex flex-row items-center gap-3 transition hover:scale-105",children:[(0,a.jsx)("div",{className:"w-9 h-9 rounded-3xl relative",children:e.images.logo?(0,a.jsx)(s.default,{src:e.images.logo,alt:"Project Icon",fill:!0}):(0,a.jsx)("div",{className:"w-9 h-9 border border-neutral-800 rounded-3xl"})}),(0,a.jsx)("p",{className:"text-left mr-3",children:e.name})]},t)},t)),(0,a.jsx)("button",{onClick:()=>{u(null),c(!1)},className:"ml-auto w-fit bg-neutral-800 rounded-[2rem] p-1 px-3 flex flex-row items-center gap-3 transition hover:scale-105",children:(0,a.jsx)("p",{className:"text-center text-sm m-auto mt-1 px-3",children:"X"})})]})}):(0,a.jsx)("button",{onClick:()=>{c(!0)},className:"shadow-lg w-full bg-neutral-900 rounded-[2rem] p-2 flex flex-row items-center justify-between gap-6 transition hover:scale-105","data-sentry-component":"ProjectSelectionButton","data-sentry-source-file":"ClientPageSwitch.tsx",children:(0,a.jsx)(a.Fragment,{children:r?(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"flex flex-row gap-3 items-center w-full pr-12",children:[(0,a.jsx)("div",{className:"w-9 h-9 rounded-3xl relative",children:(null==r?void 0:null===(t=r.images)||void 0===t?void 0:t.logo)?(0,a.jsx)(s.default,{src:r.images.logo,alt:"Project Icon",fill:!0}):(0,a.jsx)("div",{className:"w-9 h-9 border border-neutral-800 rounded-3xl"})}),r&&(0,a.jsx)("p",{className:"text-center",children:r.name})]})}):(0,a.jsx)("p",{className:"px-12",children:"Select project "})})})}},43707:function(e,t,r){r.d(t,{d:function(){return d}});var a=r(57437),s=r(72301),n=r(2265),l=r(95520),o=r(15710),i=r(30896);let c=(0,n.createContext)({loading:!0,setLoading:()=>{},projectInfo:null,setProjectInfo:()=>{},projectUrl:"",timePeriod:"week1",timePeriodMissionsAndLeaderboard:"",selectedWeekNumber:1,currentWeek:1,setTimePeriod:()=>{},missions:[],setMissions:()=>{},createMission:()=>{},prizes:[],createPrize:()=>{},userMissions:[]}),d=()=>(0,n.useContext)(c);t.default=e=>{let{children:t}=e,{userData:r}
1=(0,o.E)(),[d,u]=(0,n.useState)(!0),[f,m]=(0,n.useState)(null),[x,h]=(0,n.useState)("week12"),[p,g]=(0,n.useState)("holidays2024"),[j,w]=(0,n.useState)(12),[v,N]=(0,n.useState)(11),[b,y]=(0,n.useState)([]),[P,k]=(0,n.useState)([]),[S,I]=(0,n.useState)([]),[C,_]=(0,n.useState)([]),{projectUrl:B}=(0,s.useParams)(),E=async e=>{if(!f){console.error("Project info not found");return}let t={...e,createdAt:new Date,projectId:f.id},r=await (0,l.nM)("missions",t);y(e=>[...e,{id:r,...t}])},D=async e=>{if(!f){console.error("Project info not found");return}let t={...e,createdAt:new Date,projectId:f.id},r=await (0,l.nM)("prizes",t);I(e=>[...e,{id:r,...t}])};return(0,n.useEffect)(()=>{(async()=>{B&&(console.log("Fetching project data..."),console.log(B),(0,l.jY)("projects/".concat(B)).then(e=>{console.log("retrievedProjectData"),console.log(e),m(e),u(!1)}).catch(e=>{console.error("Error fetching project data",e),u(!1),i.Am.error("Error fetching project data: ".concat(e))}))})()},[B]),(0,n.useEffect)(()=>{let e=async()=>{if(!f){console.error("Project info not found");return}I(await (0,l.av)("prizes",["projectId","==",f.id]))};f&&e()},[f]),(0,n.useEffect)(()=>{(async()=>{r&&(null==f?void 0:f.id)&&_(await (0,l.av)("usermissions",["userId","==",r.id],["projectId","==",f.id]))})()},[r,f]),(0,n.useEffect)(()=>{x&&w(parseInt(x.replace("week","")))},[x]),(0,a.jsx)(c.Provider,{value:{loading:d,setLoading:u,projectInfo:f,setProjectInfo:m,projectUrl:B,timePeriod:x,timePeriodMissionsAndLeaderboard:p,selectedWeekNumber:j,currentWeek:v,setTimePeriod:h,missions:b,setMissions:y,createMission:E,prizes:S,createPrize:D,userMissions:C},"data-sentry-element":"unknown","data-sentry-component":"ProjectProvider","data-sentry-source-file":"ProjectProvider.tsx",children:t})}},69782:function(e,t,r){var a=r(57437),s=r(63726),n=r(2265),l=r(15710),o=r(99485),i=r(41736),c=r(3732);t.default=e=>{let{opaque:t}=e,[r,d]=(0,n.useState)(!1),{userData:u,handleLogout:f}=(0,l.E)(),m=()=>u?(0,a.jsxs)("div",{className:"flex flex-row gap-6",children:[(0,a.jsxs)(o.default,{href:"/panel",className:"flex flex-row items-center gap-3 transition hover:scale-105 pr-6 rounded-full",children:[(0,a.jsx)(s.default,{src:u.profilePicture||i.a3,alt:"Profile Picture",width:40,height:40,className:"rounded-full"}),(0,a.jsx)("p",{children:u.name}),(0,a.jsxs)("p",{className:"font-light",children:["âï¸ ",u.points]})]}),(0,a.jsx)("button",{onClick:f,className:"font-light transition hover:scale-105",children:"Log out"})]}):(0,a.jsx)(o.default,{href:"/connect",children:(0,a.jsx)("p",{className:"font-light text-neutral-200 transition hover:text-white hover:scale-105",children:"Connect"})});return(0,a.jsxs)("div",{className:"text-white relative w-full flex flex-row justify-between items-center px-3 z-20 "+(t?"bg-[#121212]":""),"data-sentry-component":"NavBar","data-sentry-source-file":"NavBar.tsx",children:[(0,a.jsxs)("div",{className:"flex flex-row items-center gap-3 p-4",children:[(0,a.jsx)(o.default,{href:"/",className:"flex flex-row gap-3 items-center transition hover:scale-105","data-sentry-element":"Link","data-sentry-source-file":"NavBar.tsx",children:(0,a.jsx)(s.default,{alt:"Logo",src:"/logo.png",width:60,height:60,style:{filter:"drop-shadow(3px 3px 10px #00000077)"},"data-sentry-element":"Image","data-sentry-source-file":"NavBar.tsx"})}),(0,a.jsx)("div",{className:"hidden md:block md:ml-6",children:(0,a.jsx)(c.Z,{"data-sentry-element":"ClientPageSwitch","data-sentry-source-file":"NavBar.tsx"})})]}),(0,a.jsxs)("div",{className:"hidden md:flex flex-row gap-3 md:items-center bg-neutral-900 rounded-[4rem] "+(u?"pl-3 pr-16 py-2":"px-12 py-4"),children:[(0,a.jsx)(m,{"data-sentry-element":"UserInfoOrLogin","data-sentry-source-file":"NavBar.tsx"}),(0,a.jsx)("a",{href:"https://x.com/dcommunity_main",target:"_blank",className:"font-light transition hover:scale-105",children:(0,a.jsx)("p",{className:"text-neutral-300 hover:text-white italic ml-12",children:"Support"})})]}),(0,a.jsx)("div",{className:"block md:hidden",children:(0,a.jsx)(()=>r?(0,a.jsx)("button",{onClick:()=>d(!r),className:"text-2xl md:hidden text-white",children:"X"}):(0,a.jsx)("button",{onClick:()=>d(!r),className:"text-2xl md:hidden",children:"â°"}),{"data-sentry-element":"MenuButton","data-sentry-source-file":"NavBar.tsx"})}),r&&(0,a.jsxs)("div",{className:"absolute top-full left-0 w-full bg-[#121212] text-white md:hidden flex flex-col p-6 pt-0",children:[(0,a.jsx)(c.Z,{}),(0,a.jsxs)("div",{className:"w-full flex flex-col gap-3 p-6 text-center",children:[(0,a.jsx)(m,{}),(0,a.jsx)("a",{href:"https://x.com/dcommunity_main",target:"_blank",className:"font-light transition hover:scale-105 mt-4",children:(0,a.jsx)("p",{className:"text-neutral-300 hover:text-white italic",children:"Support"})})]})]})]})}},41736:function(e,t,r){r.d(t,{Lp:function(){return l},a3:function(){return i},tS:function(){return o}});var a=r(95853),s=r(21490),n=r(8765);let l=(0,a.P)({clientId:"3777c98a90f906ac6ee469da241ab33e"}),o=(0,s.ax)(n.t),i="https://media.istockphoto.com/id/1189902622/es/foto/robot-mujer-ciencia-ficci%C3%B3n-androide-mujer-inteligencia-artificial-3d-render.jpg?s=612x612&w=0&k=20&c=FeS69D6pJuZpB7Krc3rp4rI_1lW1uP5DAYQ06XaC5ug="}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.