Root Zanli
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
o5t6x7pgljbm
/
www
/
_next
/
static
/
chunks
/
Filename :
7813-5a89f4fff6b5758c.js
back
Copy
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7813],{16846:function(e,n,t){t.d(n,{Z:function(){return c}});var r=t(85893),i=t(31536),o=t(99226),s=t(15861),l=t(83321),a=t(11163);function c(e){var n,t,c,d;let u=(0,a.useRouter)();return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(i.Z,{sx:{textAlign:"center"},spacing:2,children:[(0,r.jsx)(o.Z,{children:(0,r.jsx)("img",{alt:"error",src:null!==(n=e.svg)&&void 0!==n?n:"/svg/error.svg",style:{width:"40%"}})}),(0,r.jsx)(o.Z,{children:(0,r.jsx)(s.Z,{children:null!==(t=e.message)&&void 0!==t?t:"Something went wrong! Check your connectivity and try again"})}),!e.noButton&&null!==e.onReload&&(0,r.jsx)(o.Z,{children:(0,r.jsx)(l.Z,{variant:"contained",onClick:null!==(c=e.onReload)&&void 0!==c?c:()=>{u.reload()},children:null!==(d=e.buttonText)&&void 0!==d?d:"Reload Page"})})]})})}},19030:function(e,n,t){t.d(n,{Z:function(){return s}});var r=t(85893),i=t(99226),o=t(66489);function s(e){let{height:n}=e;return(0,r.jsx)(i.Z,{sx:{height:null!=n?n:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,r.jsx)(o.Z,{})})}},13615:function(e,n,t){t.d(n,{D:function(){return l},h:function(){return s}});var r=t(16829),i=t(31812),o=t(83321);let s=(0,r.Z)(o.Z)(()=>({cursor:"pointer",fontSize:"18px",color:"#696969",background:"white",border:"2px solid #d8d8d8",borderRadius:"15px",padding:"8px 16px",":hover":{color:"inherit",background:"white"}})),l=(0,r.Z)(i.Z)(()=>({cursor:"pointer",fontSize:"18px",color:"#696969",background:"white",border:"2px solid #d8d8d8",borderRadius:"15px",padding:"8px 16px",":hover":{color:"inherit",background:"white"}}))},4893:function(e,n,t){t.d(n,{w:function(){return N}});var r=t(85893),i=t(59054),o=t(83180),s=t(54151),l=t(29462),a=t(59164),c=t(2734),d=t(98396),u=t(99226),h=t(31536),x=t(83321),p=t(93946),g=t(69661),f=t(44347),j=t(15861),Z=t(67720),m=t(18972),v=t(48885),C=t(9008),b=t.n(C),w=t(25675),k=t.n(w),y=t(11163),S=t.n(y),F=t(67294),R=t(58329),I=t(71400),P=t(4730),z=t(74910),q=t(93561),A=t(16637),M=t(38887),T=t(95591);function E(){let e=(0,y.useRouter)(),{data:n}=(0,T.ZP)("/api/rewards/total-tuit",e=>M.R.user.get(e).then(e=>e.data.total).catch(()=>0));return(0,r.jsxs)(u.Z,{sx:{background:"#1f60c910",border:"1px solid #1f60c9",color:"#1f60c9",borderRadius:"8px",padding:"8px",display:"flex",alignItems:"center",cursor:"pointer",gap:1},id:"current-account-container",onClick:()=>e.push("/user/rewards"),children:[(0,r.jsxs)("svg",{width:"24px",height:"24px",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M76.8517 24.4238C76.4097 23.3887 75.9245 22.375 75.407 21.383H61.7574C66.1994 26.5697 68.6253 33.0935 68.6253 39.9947C68.6253 47.6399 65.6496 54.8322 60.2372 60.2346C54.8248 65.6369 47.6442 68.6239 40 68.6239C32.3558 68.6239 25.1644 65.6477 19.7628 60.2346C14.3612 54.8215 11.3747 47.6399 11.3747 39.9947C11.3747 33.0935 13.8006 26.5697 18.2426 21.383H4.59299C4.07547 22.375 3.59029 23.3887 3.14825 24.4238C1.0566 29.3625 0 34.5923 0 39.9947C0 45.397 1.0566 50.6268 3.14825 55.5655C5.16442 60.3316 8.04312 64.6018 11.7197 68.2788C15.3962 71.9558 19.6658 74.8349 24.4313 76.8514C29.3693 78.9433 34.5984 80.0001 40 80.0001C45.4016 80.0001 50.6307 78.9433 55.5687 76.8514C60.3342 74.8349 64.6038 71.9558 68.2803 68.2788C71.9461 64.6125 74.8356 60.3316 76.8517 55.5655C78.9434 50.6268 80 45.397 80 39.9947C80 34.5923 78.9434 29.3625 76.8517 24.4238Z",fill:"#1f60c9"}),(0,r.jsx)("path",{d:"M33.283 12.1526V59.5121H46.7386V12.1526C48.938 12.681 51.062 13.4681 53.0674 14.5033H70.8248C70.027 13.5436 69.1752 12.6055 68.2911 11.7213C64.6253 8.05499 60.345 5.16512 55.5795 3.14867C50.6415 1.05675 45.4124 0 40.0108 0C34.6092 0 29.3801 1.05675 24.4421 3.14867C19.6766 5.16512 15.407 8.04421 11.7305 11.7213C10.8356 12.6163 9.99462 13.5436 9.19678 14.5033H26.9542C28.9596 13.4681 31.0836 12.681 33.283 12.1526Z",fill:"#1f60c9"})]}),(0,r.jsx)(j.Z,{fontWeight:"bold",id:"current-account-value",children:null!=n?n:0}),(0,r.jsx)(j.Z,{display:{xs:"none",md:"block"},fontWeight:"bold",children:"Tuition Coins"})]})}function N(e){var n,t;let C=(0,c.Z)(),{setSwitchModal:w}=(0,z.T)(),y=(0,d.Z)(()=>C.breakpoints.up("sm")),T=(0,P.G)(),{setToken:N}=(0,q.L)(),{user:H}=F.useContext(R.V),[B,L]=F.useState(null),V=()=>{L(null)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b(),{children:(0,r.jsx)("title",{children:"".concat(e.title," - Coins for College")})}),(0,r.jsx)(u.Z,{sx:{position:"sticky",top:0,background:null!==(t=e.background)&&void 0!==t?t:"#fff",zIndex:9},children:(0,r.jsx)(u.Z,{className:"container",sx:{"&.container":{padding:"0.5rem 1rem"}},children:(0,r.jsxs)(h.Z,{direction:"row",justifyContent:"space-between",children:[(0,r.jsx)(u.Z,{sx:{display:"flex",gap:1,alignContent:"center",alignItems:"center"},children:(0,r.jsx)(u.Z,{sx:{display:"flex"},children:(0,r.jsx)(k(),{onClick:()=>S().push("/user/me"),alt:"cfc-logo",src:I.Z,style:{width:"100%",maxWidth:"200px",height:"auto",cursor:"pointer"}})})}),(0,r.jsx)(u.Z,{alignSelf:"center",children:(0,r.jsxs)(h.Z,{direction:"row",spacing:2,alignItems:"center",children:[void 0!==H&&H.type===A.pq.parent&&(0,r.jsx)(u.Z,{children:(0,r.jsx)(E,{})}),!H&&(0,r.jsx)(u.Z,{sx:{minHeight:"46px",display:"flex"},children:(0,r.jsx)(x.Z,{variant:"contained",onClick:()=>S().push("/login"),sx:{"&.MuiButton-contained":{alignSelf:"center"}},children:y?"Sign In / Register":"Sign In"})}),H&&(0,r.jsxs)(u.Z,{sx:{display:"flex"},children:[(0,r.jsx)(p.Z,{onClick:e=>{L(e.currentTarget)},sx:{alignSelf:"center"},children:(0,r.jsx)(g.Z,{src:"",alt:H.firstName,sx:{width:36,height:36,bgcolor:"#14a9ff"},children:null===(n=H.firstName.at(0))||void 0===n?void 0:n.toUpperCase()})}),(0,r.jsxs)(f.Z,{anchorEl:B,id:"account-menu",open:!!B,onClose:V,onClick:V,PaperProps:{elevation:0,sx:{overflow:"visible",filter:"drop-shadow(0px 2px 8px rgba(0,0,0,0.32))",mt:1.5,"& .MuiAvatar-root":{width:36,height:36,ml:-.5,mr:1},"&:before":{content:'""',display:"block",position:"absolute",top:0,right:14,width:10,height:10,bgcolor:"background.paper",transform:"translateY(-50%) rotate(45deg)",zIndex:0}}},transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"bottom"},children:[(0,r.jsx)(u.Z,{padding:"10px 20px",children:(0,r.jsxs)(j.Z,{sx:{textTransform:"capitalize"},children:[H.firstName," ",H.lastName]})}),(0,r.jsx)(Z.Z,{}),(0,r.jsxs)(m.Z,{onClick:()=>S().push(H.type===A.pq.parent?"/user/me":"/learning/dashboard"),children:[(0,r.jsx)(v.Z,{children:(0,r.jsx)(o.Z,{fontSize:"small"})}),"Dashboard"]}),H.type===A.pq.parent&&(0,r.jsxs)(m.Z,{onClick:()=>S().push("/user/lti"),children:[(0,r.jsx)(v.Z,{children:(0,r.jsx)(i.Z,{fontSize:"small"})}),"LTI Apps"]}),(0,r.jsxs)(m.Z,{onClick:()=>S().push(H.type===A.pq.parent?"/user/settings":"/learning/profile/view/".concat(H.id)),children:[(0,r.jsx)(v.Z,{children:(0,r.jsx)(l.Z,{fontSize:"small"})}),"Manage"]}),(0,r.jsxs)(m.Z,{onClick:()=>w(!0),children:[(0,r.jsx)(v.Z,{children:(0,r.jsx)(a.Z,{fontSize:"small"})}),"Switch Account"]}),(0,r.jsxs)(m.Z,{onClick:()=>{if(!H){N(null);return}M.R.user.post(H.type===A.pq.parent?"/api/account/logout":"/api/profile/logout").then(e=>{T.show(e.data.message,"success"),N(null),S().push("/")}).catch(e=>{var n,t,r;T.show(null!==(r=null===(t=e.response)||void 0===t?void 0:null===(n=t.data)||void 0===n?void 0:n.message)&&void 0!==r?r:"Unknown error, please try again","error")})},children:[(0,r.jsx)(v.Z,{children:(0,r.jsx)(s.Z,{fontSize:"small"})}),"Logout"]})]})]})]})})]})})})]})}},26912:function(e,n,t){t.d(n,{I:function(){return c},g:function(){return d}});var r=t(85893),i=t(94393),o=t.n(i),s=t(67294),l=t(95591),a=t(38887);let c=s.createContext({count:0,refresh:async()=>({count:0}),showEffect:async()=>{}});function d(e){let{children:n}=e,[t,i]=s.useState(0),{data:d,mutate:u}=(0,l.ZP)("/api/profile/account-value",e=>a.R.user.get(e).then(e=>e.data),{revalidateOnFocus:!1,refreshInterval:5e3}),h={shapes:["square","rectangle","circle","star"]},x=()=>{let e=document.getElementById("current-account-container");e&&o().confetti(e,h)},p=function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e3,r=document.getElementById("current-account-value");if(r){let i=null,o=s=>{i||(i=s);let l=Math.min((s-i)/t,1);r.innerHTML=Math.floor(l*(n-e)+e).toString(),l<1&&window.requestAnimationFrame(o)};window.requestAnimationFrame(o)}};return s.useMemo(()=>{d&&t!==d.count&&(0===t?i(d.count):setTimeout(()=>{0!==d.count&&(x(),p(t,d.count)),i(d.count)},500))},[d]),(0,r.jsx)(c.Provider,{value:{count:t,refresh:u,showEffect:x},children:n})}},51215:function(e,n,t){t.d(n,{V:function(){return u},Y:function(){return h}});var r=t(85893),i=t(11163),o=t(67294),s=t(16846),l=t(19030),a=t(35394),c=t(26912),d=t(58329);let u=o.createContext({}),h=e=>{let{type:n,children:t}=e,h=(0,i.useRouter)(),{loading:x,refresh:p,user:g}=o.useContext(d.V);return x&&!g?(0,r.jsx)(l.Z,{}):g?g.flags&n?(0,r.jsx)(u.Provider,{value:{loading:x,user:g,refresh:p},children:(0,r.jsx)(c.g,{children:t})}):(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(a.default,{})}):(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{style:{padding:"1rem"},children:(0,r.jsx)(s.Z,{message:"Your session has expired, please login",buttonText:"Go to login",onReload:()=>{h.push({pathname:"/login",query:{redirect:h.asPath}})}})})})}},35394:function(e,n,t){t.r(n);var r=t(85893),i=t(31536),o=t(15861),s=t(18377),l=t(11163),a=t(13615),c=t(61343),d=t(54994);function u(){let e=(0,l.useRouter)();return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(i.Z,{sx:{textAlign:"center",padding:"5rem 0"},spacing:2,children:[(0,r.jsx)(s.Z,{children:(0,r.jsx)("img",{alt:"404",src:"/svg/404.svg",style:{width:"50%"}})}),(0,r.jsx)(s.Z,{children:(0,r.jsx)(o.Z,{children:"Page you are looking for could not be found"})}),(0,r.jsx)(s.Z,{children:(0,r.jsx)(a.h,{variant:"contained",onClick:()=>{"/learning/dashboard"!==e.asPath&&e.asPath.startsWith("/learning/")?e.push("/learning/dashboard"):"/user/me"!==e.asPath&&e.asPath.startsWith("/user/")?e.push("/user/me"):e.push("/")},children:"Go to homepage"})})]})})}u.GetLayout=function(e){return(0,r.jsxs)(s.Z,{sx:{background:"linear-gradient(180deg, #EFF9FA 0%, rgba(239, 249, 250, 0) 69.16%)"},children:[(0,r.jsx)(d.g,{title:"Not Found",background:"#EFF9FA"}),(0,r.jsx)(s.Z,{children:e}),(0,r.jsx)(c.i,{})]})},n.default=u}}]);