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]="6c349849-4918-46cb-9eae-50b2834c0df6",e._sentryDebugIdIdentifier="sentry-dbid-6c349849-4918-46cb-9eae-50b2834c0df6")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9257],{37678:(e,t,s)=>{"use strict";s.r(t),s.d(t,{__N_SSG:()=>E,default:()=>z});var r=s(14232),l=s(54587),i=s.n(l),a=s(18125),n=s(36333),o=s(35214),c=s(2527),d=s(45541),x=s(63105),h=s(2380),m=s(65083),p=s(52037),g=s(69174),f=s(37876);let u=()=>(0,f.jsx)("div",{className:"flex-1 flex flex-col items-center lg:justify-center",children:(0,f.jsxs)("div",{className:"lg:p-10 p-5 bg-white border border-grey-200 rounded-lg max-w-xl",children:[(0,f.jsx)("div",{className:"mb-5",children:(0,f.jsx)(g.DZ,{fontSize:"text-3xl",weight:"font-extrabold",color:"text-endeavour-500",children:"Youâre new!"})}),(0,f.jsx)("div",{className:"mb-5",children:(0,f.jsx)(g.EY,{as:"p",fontSize:"text-sm",color:"text-gray-700",children:"Take our new 28-question quiz, and receive a personalized report on where you fit, recommend areas where you can improve, along with other insightful information."})}),(0,f.jsx)("div",{children:(0,f.jsx)(g.qh,{href:"/compass/quiz",className:"inline-block bg-carrot-500 px-4 py-2 rounded",onClick:()=>{(0,h.$s)("dashboard_take_next_quiz","click")},children:(0,f.jsx)(g.EY,{as:"p",color:"text-white",weight:"font-bold",letterSpacing:"tracking-tight-1",children:"Take the quiz"})})})]})});var b=s(66284),j=s(89874),y=s(43935),w=s(75261);function v(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),s.push.apply(s,r)}return s}function N(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?v(Object(s),!0).forEach(function(t){(0,b.A)(e,t,s[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):v(Object(s)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))})}return e}let k=e=>{let{surveyResponses:t}=e;return(0,f.jsx)("div",{className:"align-middle min-w-full overflow-x-auto shadow overflow-hidden sm:rounded-lg mb-4 border border-gray-200 -mx-4 sm:mx-0",children:(0,f.jsxs)("table",{className:"min-w-full divide-y divide-gray-200",children:[(0,f.jsx)("thead",{className:"min-w-full bg-gray-50",children:(0,f.jsxs)("tr",{children:[(0,f.jsx)(g.EY,{as:"th",fontSize:"text-xs",color:"text-gray-500",weight:"font-semibold",className:"px-6 py-3 text-left uppercase tracking-wider",children:"Date"}),(0,f.jsx)(g.EY,{as:"th",fontSize:"text-xs",color:"text-gray-500",weight:"font-semibold",className:"px-6 py-3 text-left uppercase tracking-wider",children:j.o.Emerging}),(0,f.jsx)(g.EY,{as:"th",fontSize:"text-xs",color:"text-gray-500",weight:"font-semibold",className:"px-6 py-3 text-left uppercase tracking-wider",children:j.o.Growing}),(0,f.jsx)(g.EY,{as:"th",fontSize:"text-xs",color:"text-gray-500",weight:"font-semibold",className:"px-6 py-3 text-left uppercase tracking-wider",children:j.o.Advanced}),(0,f.jsx)(g.EY,{as:"th",fontSize:"text-xs",color:"text-gray-500",weight:"font-semibold",className:"relative px-6 py-3 text-left uppercase tracking-wider",children:(0,f.jsx)("span",{className:"sr-only",children:"Action"})})]})}),(0,f.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:t.map(e=>{let t=(0,w.cT)(e),s=[],r=[],l=[];Object.keys(j._).forEach(e=>{let i=t.find(t=>t.section===e),a=N(N({},i),{},{value:100*i.score});i.grade===j.o.Emerging?s.push(a):i.grade===j.o.Growing?r.push(a):i.grade===j.o.Advanced&&l.push(a)});let i=e.meta.timestamp.toDateString().split(" ");return(0,f.jsxs)("tr",{children:[(0,f.jsxs)(g.EY,{as:"td",fontSize:"text-sm",color:"text-gray-500",className:"whitespace-nowrap px-6 py-4",children:[i[2]," ",i[1]," ",i[3]]}),(0,f.jsx)(g.EY,{as:"td",className:"px-6 py-4 whitespace-nowrap",children:(0,f.jsx)("div",{className:"space-x-1 inline-flex",children:(0,f.jsx)(y.p,{data:s})})}),(0,f.jsx)(g.EY,{as:"td",className:"px-6 py-4 whitespace-nowrap",children:(0,f.jsx)("div",{className:"space-x-1 inline-flex",children:(0,f.jsx)(y.p,{data:r})})}),(0,f.jsx)(g.EY,{as:"td",className:"px-6 py-4 whitespace-nowrap",children:(0,f.jsx)("div",{className:"space-x-1 inline-flex",children:(0,f.jsx)(y.p,{data:l})})}),(0,f.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:(0,f.jsx)("div",{className:"flex space-x-4 justify-end",children:(0,f.jsx)(g.qh,{href:`/compass/result/?submissionId=${e.submissionId}`,onClick:()=>{(0,h.$s)("compass_dashboard_view_result","click",`submissionId: ${e.submissionId}`)},children:(0,f.jsx)(g.EY,{color:"text-carrot-700 hover:text-carrot-500",fontSize:"text-sm",weight:"font-bold",children:"View"})})})})]},e.meta.timestamp.toDateString())})})]})})};var S=s(67579),_=s(64958),O=s(86400),E=!0;let z=()=>{var e,t;let{surveyResponses:s,isEligible:l,nextDate:b,isLoading:j,latestResponse:y}=(0,c.w)(),{firebaseAuth:v}=(0,m.m9)(),{userInfo:N}=v,{compassPlanPosts:E,isError:z}=(0,d.vm)(null!=N&&null!=(e=N.user)&&e.email&&N.user.emailVerified?N.user.email:null),{localConsumedPosts:$,handleCheckPress:Y}=(0,x.f)((null==N||null==(t=N.user)?void 0:t.email)||null),D=$.filter(e=>E.includes(e)),P=(0,n.Ub)("(max-width: 1023px)"),C=(0,n.Ub)("(min-width: 1279px)"),q=(0,n.Ub)("(min-width: 2559px)"),I=()=>q?150:P?100:140,{generateNewPlan:T,isLoading:A}=(0,d.Kv)(),{0:L,1:R}=(0,r.useState)([]),{0:F,1:G}=(0,r.useState)(0);(0,r.useEffect)(()=>{y&&(console.debug("latestResponse",y),R((0,w.cT)(y)),G((0,w.pN)(y)))},[y]),console.debug("scores",L);let{0:H,1:U}=(0,r.useState)(!1);return(0,r.useEffect)(()=>{!j&&null!=N&&N.user&&E&&U(!0)},[j,N,E]),(0,f.jsxs)(S.DashboardLayout,{pageTitle:"Yaqeen Compass Dashboard",className:"bg-grey-10",children:[(!H||A)&&(0,f.jsx)(m.p8,{}),(null==N?void 0:N.user)&&(0,f.jsxs)("div",{id:"main-content",className:"container mx-auto lg:px-8 px-4 pt-6 flex flex-col",style:{height:"calc(100vh - 64px)"},children:[(0,f.jsx)("div",{className:"mb-6 xl:mb-8 hidden lg:block flex-row justify-between",children:(0,f.jsx)(g.DZ,{fontSize:"lg:text-3xl text-2xl",weight:"font-bold",color:"text-gray-900",letterSpacing:"tracking-tight-1",children:"Yaqeen Compass"})}),(0,f.jsx)("div",{className:"mb-4 lg:ml-0 lg:hidden",children:(0,f.jsx)(_.c,{})}),j&&!z&&!E&&(0,f.jsx)(p.xx,{}),!j&&(0,f.jsx)(f.Fragment,{children:(null==s?void 0:s.length)===0?(0,f.jsx)(u,{}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)("div",{className:"xl:p-6 p-4 bg-white border border-grey-200 rounded-lg xl:mb-8 mb-6",children:[(0,f.jsxs)("div",{className:"flex xl:flex-row flex-col justify-between xl:items-start items-center mb-4",children:[D.length===E.length?(0,f.jsx)("div",{className:"flex-shrink-0 xl:w-1/6 flex justify-center",children:(0,f.jsx)(i(),{src:"/static/images/confetti-2.svg",alt:"",width:I(),height:I(),loader:O.R2})}):(0,f.jsx)("div",{className:"xl:w-1/3 xl:py-3 py-8 xl:-ml-8",children:(0,f.jsx)("div",{id:"compass-flower",children:(0,f.jsx)(p.t1,{data:L.map(e=>({variant:e.sectionTitle,value:100*e.score})),hideText:!0,hideShadow:!0,height:C?130:60,width:"100%",size:C?41:20,className:"flex justify-center items-center"})})}),(0,f.jsxs)("div",{className:`flex-grow ${(D.length<E.length,"xl:pl-10")}`,children:[(0,f.jsxs)("div",{className:"flex xl:flex-row flex-col justify-between items-center mb-2 xl:mb-4",children:[(0,f.jsx)("div",{className:"mb-3 xl:mb-0",children:D.length<E.length?(0,f.jsxs)(g.EY,{as:"p",fontSize:"xl:text-3xl text-xl",color:"text-gray-800",weight:"font-semibold",letterSpacing:"tracking-tight-1",children:["You are"," ",(0,f.jsx)("span",{className:"text-jordy-900 font-extrabold",children:(0,w.ZL)(F)})]}):(0,f.jsx)(g.EY,{as:"p",fontSize:"xl:text-3xl text-xl",color:"text-gray-800",weight:"font-semibold",letterSpacing:"tracking-tight-1",children:"MashaAllah, you did it!"})}),(0,f.jsx)("div",{className:"flex flex-col xl:items-end items-center xl:mb-0 mb-3",children:(0,f.jsxs)("div",{className:"flex flex-col items-center xl:items-end",children:[(0,f.jsx)("div",{className:"xl:order-2 order-1 xl:mt-1 mb-1 xl:mb-0",children:(0,f.jsx)("div",{className:"flex gap-x-1",children:[...Array(E.length)].map((e,t)=>(0,f.jsx)("div",{id:`bar-${t}`,className:`xl:w-12 w-16 h-2 rounded-full ${t<D.length?"bg-jordy-500":"bg-gray-200"}`},t))})}),(0,f.jsxs)(g.EY,{as:"p",weight:"font-semibold",color:"text-gray-800",className:"xl:order-1 order-2",children:[D.length,"/",E.length," completed"]})]})})]}),(0,f.jsx)("div",{className:"mb-5 xl:mb-5",children:(0,f.jsx)(g.EY,{as:"p",fontSize:"text-sm",color:"text-gray-500",children:D.length===E.length?"Congratulations on completing your Compass lesson plan.":"Take that first step towards improving your religiosity today with your very own personal Compass plan. These recommendations are meant to be completed once a week. At the end of 4 weeks, you can generate a new plan to continue growing!"})}),(0,f.jsxs)("div",{className:"flex gap-x-6",children:[y&&(0,f.jsx)(g.qh,{href:`/compass/result?submissionId=${null==y?void 0:y.submissionId}`,className:"inline-flex items-center justify-center space-x-2 z-10",onClick:()=>{(0,h.$s)("compass_dashboard_see_full_progress","click")},children:(0,f.jsx)(g.EY,{as:"p",fontSize:"text-sm",weight:"font-bold",color:"text-carrot-600",children:"See full progress"})}),(0,f.jsx)(g.$n,{onPress:async()=>{var e;await T(null==N||null==(e=N.user)?void 0:e.email),(0,h.$s)("compass_dashboard_generate_new_plan","click",`plan_finished: ${D.length===E.length}`)},children:(0,f.jsx)(g.EY,{as:"p",fontSize:"text-sm",weight:"font-bold",color:"text-carrot-600",children:D.length===E.length?"Generate new plan":"I don't like this plan"})})]})]})]}),(0,f.jsx)("div",{id:"compass-recommendations",className:"flex items-start gap-x-4 xl:overflow-visible overflow-x-auto snap-x justify-start snap-mandatory",children:null==E?void 0:E.map((e,t)=>{var s;let r=D.includes(e),l=(0,w.ef)(e),i=function(e,t){let s=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),l=parseInt(e.slice(5,7),16);return`rgba(${s}, ${r}, ${l}, 0.9)`}((null==(s=o.QB.find(e=>e.type===(null==l?void 0:l.category)))?void 0:s.color)||"#5BC7D9",0);return(0,f.jsxs)("div",{className:"xl:w-1/4 w-64 relative inline-flex snap-center xl:flex-shrink flex-shrink-0",children:[(0,f.jsx)("div",{className:` 2 inline-flex py-1 px-2 absolute z-10 top-2 left-2 font-semibold text-white text-xs 3 `,style:{backgroundColor:i},children:null==l?void 0:l.category}),(0,f.jsxs)(g.$n,{onPress:()=>{Y(e,!r),(0,h.$s)("compass_dashboard_mark_as_consumed","click",`postId: ${e}, isConsumed: ${!r}`)},className:"inline-flex absolute z-10 top-2 right-2 text-white font-semibold",children:[(0,f.jsx)("div",{className:`w-6 h-6 rounded ${r?"bg-carrot-600":"bg-white"}`}),r&&(0,f.jsx)(a.g,{icon:"check",className:"text-white fa-stack-1x align-middle text-xs"})]}),(0,f.jsx)(S.Card,{imgSrc:null==l?void 0:l.post.imgSrc,title:null==l?void 0:l.post.t
3itle,category:null==l?void 0:l.post.type,postLink:null==l?void 0:l.post.link,prefetch:!1,titleSize:"text-xs",hasGrayscaleImg:r,className:r?"pointer-events-none":"",categoryLineHeight:"leading-tighter"})]},t)})})]}),(0,f.jsx)("div",{className:"response-list",children:(0,f.jsx)(k,{surveyResponses:s})}),s&&Array.isArray(s)&&s.length>0&&(0,f.jsx)("div",{className:"flex flex-col",children:l?(0,f.jsx)("div",{className:"my-4 text-center",children:(0,f.jsxs)(g.qh,{href:"/compass/quiz",className:"inline-flex items-center justify-center space-x-2",onClick:()=>{(0,h.$s)("dashboard_take_next_quiz","click")},children:[(0,f.jsx)(g.EY,{as:"p",color:"text-carrot-500",weight:"font-bold",letterSpacing:"tracking-tight-1",children:"Take the test now"}),(0,f.jsx)(a.g,{icon:"chevron-right",fixedWidth:!0,className:"text-carrot-500"})]})}):(0,f.jsx)("div",{className:"my-4",children:(0,f.jsxs)(g.EY,{as:"p",color:"text-gray-400",className:"text-center",children:["Take next quiz on: ",b.toDateString()]})})})]})})]})]})}},63105:(e,t,s)=>{"use strict";s.d(t,{f:()=>i});var r=s(14232),l=s(45541);let i=e=>{let{consumedPosts:t}=(0,l.N)(e),s=(0,l.yH)(),{0:i,1:a}=(0,r.useState)([]);return(0,r.useEffect)(()=>{t.length>0&&a(t.map(e=>e.post_id))},[t]),{localConsumedPosts:i,handleCheckPress:async(t,r)=>{a(e=>r?[...e,t]:e.filter(e=>e!==t)),await s(t,e||"",r)||a(e=>r?e.filter(e=>e!==t):[...e,t])}}}},64958:(e,t,s)=>{"use strict";s.d(t,{c:()=>N});var r=s(66284),l=s(14232),i=s(89099),a=s(18125),n=s(97114),o=s(95311),c=s(14742),d=s(72117),x=s(52916),h=s(69158),m=s(9361),p=s(32984),g=s(2380),f=s(32008),u=s(65083),b=s(69174),j=s(37876);function y(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),s.push.apply(s,r)}return s}function w(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?y(Object(s),!0).forEach(function(t){(0,r.A)(e,t,s[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):y(Object(s)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))})}return e}let v=e=>{let{state:t,className:s}=e,{firebaseAuth:r}=(0,u.m9)(),{userInfo:a,setIsDismissable:c,initAuth:h}=r,{0:y,1:v}=(0,l.useState)(!1),{pathname:N}=(0,i.useRouter)();(0,l.useEffect)(()=>{[m.j_.AuthDismissed,m.j_.SignedOut,m.j_.RequireLoginOrSignUp].includes(a.authState)&&(c(!1),y||h())},[a.authState]);let k=(0,l.useRef)(),{overlayProps:S}=(0,o.e)({onClose:()=>t.close(),shouldCloseOnBlur:!0,isOpen:t.isOpen,isDismissable:!0},k);return(0,j.jsx)(n.n1,{restoreFocus:!0,children:(0,j.jsx)(x.m.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},className:`relative z-50 py-1 shadow-xl ${s||""}`,children:(0,j.jsxs)("div",w(w({ref:k},S),{},{children:[(0,j.jsxs)("div",{className:"py-1 font-proxima-nova",children:[d.Y.primary.map((e,s)=>(0,j.jsx)(b.qh,{href:e.path,onClick:()=>t.close(),className:`nav-${e.name} inline-flex bg-white items-center px-4 py-2 w-full relative ${N==e.path?"bg-carrot-50 border-carrot-50 hover:bg-carrot-50 hover:border-carrot-50":"hover:bg-carrot-50 hover:border-carrot-50 focus:bg-carrot-50 focus:border-carrot-50"} 4 `,children:(0,j.jsx)(b.EY,{color:"text-gray-800",lineHeight:"leading-5",className:e.indent&&"pl-4",fontSize:"text-sm",weight:`${N==e.path?"font-semibold":"font-normal"}`,children:e.name})},s)),(0,j.jsx)(o.Rz,{onDismiss:()=>t.close()})]}),(0,j.jsx)("div",{className:"h-[0px] border border-gray-200"}),d.Y.secondary.map((e,s)=>(0,j.jsxs)(j.Fragment,{children:["logout"!==e.name.toLowerCase()&&(0,j.jsx)(b.qh,{href:e.path,onClick:()=>t.close(),className:`nav-${e.name} inline-flex bg-white items-center px-4 py-2 w-full relative ${N==e.path?"bg-carrot-50 border-carrot-50 hover:bg-carrot-50 hover:border-carrot-50":"hover:bg-carrot-50 hover:border-carrot-50 focus:bg-carrot-50 focus:border-carrot-50"} 5 `,children:(0,j.jsx)(b.EY,{color:"text-gray-500",lineHeight:"leading-5",className:e.indent&&"pl-4",fontSize:"text-sm",weight:`${N==e.path?"font-semibold":"font-normal"}`,children:e.name})},s),"logout"===e.name.toLowerCase()&&(0,j.jsx)(b.$n,{onPress:()=>{v(!0),p.jO.signOut().then(()=>{f.A.log("user signed out"),(0,g.$s)("sign_out","success"),window.location.href="/"}).catch(e=>{f.A.error("user sign out failed",e),(0,g.$s)("sign_out","fail",e)})},className:`nav-${e.name} inline-flex bg-white items-center px-4 py-2 w-full relative ${N==e.path?"bg-carrot-50 border-carrot-50 hover:bg-carrot-50 hover:border-carrot-50":"hover:bg-carrot-50 border-gray-50 hover:border-carrot-50"} 6 `,children:(0,j.jsx)(b.EY,{color:"text-gray-500",lineHeight:"leading-5",className:e.indent&&"pl-4",fontSize:"text-sm",weight:`${N==e.path?"font-semibold":"font-normal"}`,children:e.name})},s)]}))]}))})})},N=e=>{var t;let{className:s}=e,r=(0,c.T)({}),{pathname:l}=(0,i.useRouter)(),n=null==(t=[...d.Y.primary,...d.Y.secondary].find(e=>e.path===l))?void 0:t.name;return(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)("div",{className:"w-full relative",children:[(0,j.jsx)(b.$n,{"aria-label":"Dashboard mobile nav",onPress:()=>{r.isOpen?r.close():r.open()},className:"border bg-white py-[9px] px-[13px] rounded w-full text-left",children:(0,j.jsxs)("div",{className:"flow-root",children:[(0,j.jsx)(b.EY,{weight:"font-semibold",fontSize:"text-base",className:"float-left",children:n}),(0,j.jsx)(b.EY,{weight:"font-bold",fontSize:"text-lg",className:"float-right",children:(0,j.jsx)(a.g,{icon:r.isOpen?"chevron-up":"chevron-down",size:"xs",className:"text-gray-500"})})]})}),(0,j.jsx)("div",{className:"absolute inset-x-0 top-[calc(100%+4px)] z-50 bg-white rounded-md shadow flex-col justify-start items-start",children:(0,j.jsx)(h.N,{children:r.isOpen&&(0,j.jsx)(v,{state:r,className:s})})})]})})}},95608:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/compass",function(){return s(37678)}])}},e=>{e.O(0,[5123,1510,2697,4740,1502,4587,2682,6241,5542,6333,3822,5807,3971,7541,636,6593,8792],()=>e(e.s=95608)),_N_E=e.O()}]);
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.