Root Zanli
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
o5t6x7pgljbm
/
www
/
_next
/
static
/
chunks
/
pages
/
user
/
Filename :
me-cbe4379fcf4b2c98.js
back
Copy
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1480],{52778:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var i=r(n(64938)),s=n(85893),a=(0,i.default)((0,s.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4h-3.5z"}),"DeleteOutlineOutlined");t.Z=a},69368:function(e,t,n){"use strict";n.d(t,{Z:function(){return _}});var r=n(63366),i=n(87462),s=n(67294),a=n(90512),o=n(94780),d=n(41796),l=n(21964),c=n(82066),u=n(85893),h=(0,c.Z)((0,u.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),f=(0,c.Z)((0,u.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),p=(0,c.Z)((0,u.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox"),x=n(98216),m=n(71657),g=n(90948),v=n(1588),j=n(34867);function Z(e){return(0,j.Z)("MuiCheckbox",e)}let y=(0,v.Z)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),b=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],w=e=>{let{classes:t,indeterminate:n,color:r,size:s}=e,a={root:["root",n&&"indeterminate",`color${(0,x.Z)(r)}`,`size${(0,x.Z)(s)}`]},d=(0,o.Z)(a,Z,t);return(0,i.Z)({},t,d)},k=(0,g.ZP)(l.Z,{shouldForwardProp:e=>(0,g.FO)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,"default"!==n.color&&t[`color${(0,x.Z)(n.color)}`]]}})(({theme:e,ownerState:t})=>(0,i.Z)({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${"default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,d.Fq)("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${y.checked}, &.${y.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${y.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),$=(0,u.jsx)(f,{}),S=(0,u.jsx)(h,{}),C=(0,u.jsx)(p,{}),M=s.forwardRef(function(e,t){var n,o;let d=(0,m.Z)({props:e,name:"MuiCheckbox"}),{checkedIcon:l=$,color:c="primary",icon:h=S,indeterminate:f=!1,indeterminateIcon:p=C,inputProps:x,size:g="medium",className:v}=d,j=(0,r.Z)(d,b),Z=f?p:h,y=f?p:l,M=(0,i.Z)({},d,{color:c,indeterminate:f,size:g}),_=w(M);return(0,u.jsx)(k,(0,i.Z)({type:"checkbox",inputProps:(0,i.Z)({"data-indeterminate":f},x),icon:s.cloneElement(Z,{fontSize:null!=(n=Z.props.fontSize)?n:g}),checkedIcon:s.cloneElement(y,{fontSize:null!=(o=y.props.fontSize)?o:g}),ownerState:M,ref:t,className:(0,a.Z)(_.root,v)},j,{classes:_}))});var _=M},21964:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var r=n(63366),i=n(87462),s=n(67294),a=n(90512),o=n(94780),d=n(98216),l=n(90948),c=n(49299),u=n(74423),h=n(47739),f=n(1588),p=n(34867);function x(e){return(0,p.Z)("PrivateSwitchBase",e)}(0,f.Z)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var m=n(85893);let g=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],v=e=>{let{classes:t,checked:n,disabled:r,edge:i}=e,s={root:["root",n&&"checked",r&&"disabled",i&&`edge${(0,d.Z)(i)}`],input:["input"]};return(0,o.Z)(s,x,t)},j=(0,l.ZP)(h.Z)(({ownerState:e})=>(0,i.Z)({padding:9,borderRadius:"50%"},"start"===e.edge&&{marginLeft:"small"===e.size?-3:-12},"end"===e.edge&&{marginRight:"small"===e.size?-3:-12})),Z=(0,l.ZP)("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),y=s.forwardRef(function(e,t){let{autoFocus:n,checked:s,checkedIcon:o,className:d,defaultChecked:l,disabled:h,disableFocusRipple:f=!1,edge:p=!1,icon:x,id:y,inputProps:b,inputRef:w,name:k,onBlur:$,onChange:S,onFocus:C,readOnly:M,required:_=!1,tabIndex:P,type:D,value:O}=e,R=(0,r.Z)(e,g),[F,T]=(0,c.Z)({controlled:s,default:!!l,name:"SwitchBase",state:"checked"}),I=(0,u.Z)(),z=h;I&&void 0===z&&(z=I.disabled);let A="checkbox"===D||"radio"===D,N=(0,i.Z)({},e,{checked:F,disabled:z,disableFocusRipple:f,edge:p}),H=v(N);return(0,m.jsxs)(j,(0,i.Z)({component:"span",className:(0,a.Z)(H.root,d),centerRipple:!0,focusRipple:!f,disabled:z,tabIndex:null,role:void 0,onFocus:e=>{C&&C(e),I&&I.onFocus&&I.onFocus(e)},onBlur:e=>{$&&$(e),I&&I.onBlur&&I.onBlur(e)},ownerState:N,ref:t},R,{children:[(0,m.jsx)(Z,(0,i.Z)({autoFocus:n,checked:s,defaultChecked:l,className:H.input,disabled:z,id:A?y:void 0,name:k,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;let t=e.target.checked;T(t),S&&S(e,t)},readOnly:M,ref:w,required:_,ownerState:N,tabIndex:P,type:D},"checkbox"===D&&void 0===O?{}:{value:O},b)),F?o:x]}))});var b=y},27484:function(e){var t,n,r,i,s,a,o,d,l,c,u,h,f,p,x,m,g,v,j,Z,y;e.exports=(t="millisecond",n="second",r="minute",i="hour",s="week",a="month",o="quarter",d="year",l="date",c="Invalid Date",u=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},(x={})[p="en"]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||"th")+"]"}},m=function(e){return e instanceof Z},g=function e(t,n,r){var i;if(!t)return p;if("string"==typeof t){var s=t.toLowerCase();x[s]&&(i=s),n&&(x[s]=n,i=s);var a=t.split("-");if(!i&&a.length>1)return e(a[0])}else{var o=t.name;x[o]=t,i=o}return!r&&i&&(p=i),i||!r&&p},v=function(e,t){if(m(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new Z(n)},(j={s:f,z:function(e){var t=-e.utcOffset(),n=Math.abs(t);return(t<=0?"+":"-")+f(Math.floor(n/60),2,"0")+":"+f(n%60,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,a),s=n-i<0,o=t.clone().add(r+(s?-1:1),a);return+(-(r+(n-i)/(s?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return({M:a,y:d,w:s,d:"day",D:l,h:i,m:r,s:n,ms:t,Q:o})[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}}).l=g,j.i=m,j.w=function(e,t){return v(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})},y=(Z=function(){function e(e){this.$L=g(e.locale,null,!0),this.parse(e)}var f=e.prototype;return f.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(j.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(u);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},f.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},f.$utils=function(){return j},f.isValid=function(){return this.$d.toString()!==c},f.isSame=function(e,t){var n=v(e);return this.startOf(t)<=n&&n<=this.endOf(t)},f.isAfter=function(e,t){return v(e)<this.startOf(t)},f.isBefore=function(e,t){return this.endOf(t)<v(e)},f.$g=function(e,t,n){return j.u(e)?this[t]:this.set(n,e)},f.unix=function(){return Math.floor(this.valueOf()/1e3)},f.valueOf=function(){return this.$d.getTime()},f.startOf=function(e,t){var o=this,c=!!j.u(t)||t,u=j.p(e),h=function(e,t){var n=j.w(o.$u?Date.UTC(o.$y,t,e):new Date(o.$y,t,e),o);return c?n:n.endOf("day")},f=function(e,t){return j.w(o.toDate()[e].apply(o.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),o)},p=this.$W,x=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(u){case d:return c?h(1,0):h(31,11);case a:return c?h(1,x):h(0,x+1);case s:var v=this.$locale().weekStart||0,Z=(p<v?p+7:p)-v;return h(c?m-Z:m+(6-Z),x);case"day":case l:return f(g+"Hours",0);case i:return f(g+"Minutes",1);case r:return f(g+"Seconds",2);case n:return f(g+"Milliseconds",3);default:return this.clone()}},f.endOf=function(e){return this.startOf(e,!1)},f.$set=function(e,s){var o,c=j.p(e),u="set"+(this.$u?"UTC":""),h=((o={}).day=u+"Date",o[l]=u+"Date",o[a]=u+"Month",o[d]=u+"FullYear",o[i]=u+"Hours",o[r]=u+"Minutes",o[n]=u+"Seconds",o[t]=u+"Milliseconds",o)[c],f="day"===c?this.$D+(s-this.$W):s;if(c===a||c===d){var p=this.clone().set(l,1);p.$d[h](f),p.init(),this.$d=p.set(l,Math.min(this.$D,p.daysInMonth())).$d}else h&&this.$d[h](f);return this.init(),this},f.set=function(e,t){return this.clone().$set(e,t)},f.get=function(e){return this[j.p(e)]()},f.add=function(e,t){var o,l=this;e=Number(e);var c=j.p(t),u=function(t){var n=v(l);return j.w(n.date(n.date()+Math.round(t*e)),l)};if(c===a)return this.set(a,this.$M+e);if(c===d)return this.set(d,this.$y+e);if("day"===c)return u(1);if(c===s)return u(7);var h=((o={})[r]=6e4,o[i]=36e5,o[n]=1e3,o)[c]||1,f=this.$d.getTime()+e*h;return j.w(f,this)},f.subtract=function(e,t){return this.add(-1*e,t)},f.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||c;var r=e||"YYYY-MM-DDTHH:mm:ssZ",i=j.z(this),s=this.$H,a=this.$m,o=this.$M,d=n.weekdays,l=n.months,u=n.meridiem,f=function(e,n,i,s){return e&&(e[n]||e(t,r))||i[n].slice(0,s)},p=function(e){return j.s(s%12||12,e,"0")},x=u||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(h,function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return j.s(t.$y,4,"0");case"M":return o+1;case"MM":return j.s(o+1,2,"0");case"MMM":return f(n.monthsShort,o,l,3);case"MMMM":return f(l,o);case"D":return t.$D;case"DD":return j.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return f(n.weekdaysMin,t.$W,d,2);case"ddd":return f(n.weekdaysShort,t.$W,d,3);case"dddd":return d[t.$W];case"H":return String(s);case"HH":return j.s(s,2,"0");case"h":return p(1);case"hh":return p(2);case"a":return x(s,a,!0);case"A":return x(s,a,!1);case"m":return String(a);case"mm":return j.s(a,2,"0");case"s":return String(t.$s);case"ss":return j.s(t.$s,2,"0");case"SSS":return j.s(t.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")})},f.utcOffset=function(){return-(15*Math.round(this.$d.getTimezoneOffset()/15))},f.diff=function(e,t,l){var c,u=this,h=j.p(t),f=v(e),p=(f.utcOffset()-this.utcOffset())*6e4,x=this-f,m=function(){return j.m(u,f)};switch(h){case d:c=m()/12;break;case a:c=m();break;case o:c=m()/3;break;case s:c=(x-p)/6048e5;break;case"day":c=(x-p)/864e5;break;case i:c=x/36e5;break;case r:c=x/6e4;break;case n:c=x/1e3;break;default:c=x}return l?c:j.a(c)},f.daysInMonth=function(){return this.endOf(a).$D},f.$locale=function(){return x[this.$L]},f.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=g(e,t,!0);return r&&(n.$L=r),n},f.clone=function(){return j.w(this.$d,this)},f.toDate=function(){return new Date(this.valueOf())},f.toJSON=function(){return this.isValid()?this.toISOString():null},f.toISOString=function(){return this.$d.toISOString()},f.toString=function(){return this.$d.toUTCString()},e}()).prototype,v.prototype=y,[["$ms",t],["$s",n],["$m",r],["$H",i],["$W","day"],["$M",a],["$y",d],["$D",l]].forEach(function(e){y[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),v.extend=function(e,t){return e.$i||(e(t,Z,v),e.$i=!0),v},v.locale=g,v.isDayjs=m,v.unix=function(e){return v(1e3*e)},v.en=x[p],v.Ls=x,v.p={},v)},56252:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/user/me",function(){return n(56460)}])},9690:function(e,t,n){"use strict";n.d(t,{u:function(){return l}});var r=n(85893),i=n(66242),s=n(31536),a=n(15861),o=n(99226),d=n(81458);function l(e){let{cash:t,color:n,progress:l,title:c,background:u}=e;return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(i.Z,{sx:{background:u},children:(0,r.jsxs)(s.Z,{spacing:2,children:[(0,r.jsx)(s.Z,{direction:"row",justifyContent:"space-between",children:(0,r.jsx)(a.Z,{children:c})}),(0,r.jsxs)(o.Z,{children:[(0,r.jsxs)(a.Z,{sx:{color:n},children:[l,"%"]}),(0,r.jsx)(d.Z,{sx:{backgroundColor:"".concat(n,"77"),span:{backgroundColor:n}},variant:"determinate",value:l>100?100:l})]}),(0,r.jsx)(o.Z,{children:(0,r.jsxs)(a.Z,{variant:"caption",children:["Average Tuition Fees"," ",(0,r.jsxs)(a.Z,{component:"span",color:"var(--text-color)",variant:"body2",fontWeight:"bold",children:["$",t]})]})})]})})})}},56460:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ex}});var r=n(85893),i=n(86886),s=n(46901),a=n(31536),o=n(66242),d=n(88409),l=n(40044),c=n(83321),u=n(99226),h=n(15861),f=n(41664),p=n.n(f),x=n(67294),m=n(95591),g=n(61343),v=n(4893),j=n(51215),Z=n(16637),y=n(38887),b=n(55973),w=n(69661),k=n(18360),$=n(18972),S=n(11163),C=n.n(S),M=n(9690),_=n(4730),P=n(93561),D=n(30381),O=n.n(D),R=n(27113);function F(e){let[t,n]=x.useState(new Date),{data:i}=(0,m.ZP)("/api/attendance/calendar/".concat(e.id,"?month=").concat(t),e=>y.R.user.get(e).then(e=>e.data)),s=null!=i?i:[],a=x.useMemo(()=>s.map(e=>O()(e)),[s]);return(0,r.jsx)(R.ZP,{tileClassName:t=>{let{date:n}=t,r=[],i=O()(n),s=O()(e.createdAt).add(-1,"day"),o=a.some(e=>e.isSame(i,"day")),d=i.isBefore(O()()),l=i.isAfter(s);return d&&!o&&l&&r.push("absent"),o&&r.push("present"),r.join(" ")},onActiveStartDateChange:e=>{let{activeStartDate:t}=e;t&&n(t)}})}var T=n(5152),I=n.n(T),z=n(16846),A=n(19030);let N=I()(()=>Promise.all([n.e(5279),n.e(7229)]).then(n.bind(n,47229)),{loadableGenerated:{webpack:()=>[47229]},ssr:!1});function H(e){let{data:t,error:n}=(0,m.ZP)("/api/scholarship/group-by-mode/".concat(e.id),e=>y.R.user.get(e).then(e=>e.data));if(n)return(0,r.jsx)(z.Z,{noButton:!0});if(!t)return(0,r.jsx)(A.Z,{height:"175px"});let i={chart:{width:350,height:350,type:"donut",toolbar:{show:!1}},dataLabels:{enabled:!1},labels:t.map(e=>e.mode)};return(0,r.jsxs)(u.Z,{children:[(0,r.jsxs)(u.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,r.jsx)(h.Z,{flexGrow:1,children:"Scholarship Points"}),(0,r.jsx)(u.Z,{children:(0,r.jsx)(h.Z,{sx:{background:"#E8F4FD",padding:"0 1rem",borderRadius:"8px",fontSize:"14px !important"},children:e.total})})]}),(0,r.jsx)(N,{options:i,series:t.map(e=>e.points),type:"donut",width:"100%",height:150})]})}function W(){var e,t,n;let s=(0,_.G)(),{setToken:o}=(0,P.L)(),[d,l]=x.useState(0),{data:f}=(0,m.ZP)("/api/profile/all",e=>y.R.user.get(e).then(e=>e.data),{revalidateOnFocus:!1}),g=null!==(t=null==f?void 0:f.filter(e=>e.type===Z.pq.student))&&void 0!==t?t:[],v=e=>{y.R.user.get("/api/profile/login",{params:{id:e}}).then(e=>{var t;o(e.data.token);let n=(null===(t=C().query.redirect)||void 0===t?void 0:t.toString())||"/learning/dashboard";C().push(n)}).catch(e=>{var t,n,r;s.show(null!==(r=null===(n=e.response)||void 0===n?void 0:null===(t=n.data)||void 0===t?void 0:t.message)&&void 0!==r?r:"unknown error, try again","error")})},j=g[d];return j?(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(i.ZP,{container:!0,spacing:2,children:[(0,r.jsx)(i.ZP,{item:!0,xs:12,md:6,children:(0,r.jsxs)(a.Z,{spacing:2,children:[(0,r.jsx)(u.Z,{sx:{background:"#F3F9FD",borderRadius:"8px",padding:"16px",display:"flex",alignItems:"center",gap:2},children:(0,r.jsxs)(i.ZP,{container:!0,spacing:2,alignItems:"center",children:[(0,r.jsx)(i.ZP,{item:!0,children:(0,r.jsx)(u.Z,{children:(0,r.jsx)(w.Z,{src:null!==(n=j.avatar)&&void 0!==n?n:"",alt:j.firstName,sx:{width:48,height:48,bgcolor:"#14a9ff"},children:null===(e=j.firstName.at(0))||void 0===e?void 0:e.toUpperCase()})})}),(0,r.jsx)(i.ZP,{item:!0,flexGrow:1,children:(0,r.jsxs)(u.Z,{flexGrow:1,children:[(0,r.jsx)(h.Z,{color:"#108FE9",fontSize:"0.75rem",children:"Currently viewing"}),(0,r.jsxs)(k.Z,{value:d,label:"currently viewing",variant:"standard",size:"small",onChange:e=>{"Add student"===e.target.value?C().push("/user/add/student"):l(Number(e.target.value))},children:[g.map((e,t)=>(0,r.jsxs)($.Z,{value:t,children:[e.firstName," ",e.lastName]},"student-select-".concat(t))),(0,r.jsx)($.Z,{value:"Add student",children:(0,r.jsx)(h.Z,{fontWeight:200,children:"Add student"})})]})]})}),(0,r.jsx)(i.ZP,{item:!0,xs:12,md:"auto",children:(0,r.jsx)(c.Z,{fullWidth:!0,variant:"contained",onClick:()=>v(j.id),children:"View Dashboard"})})]})}),(0,r.jsx)(u.Z,{sx:{border:"1px solid rgba(22, 22, 22, 0.1)",borderRadius:"8px"},children:(0,r.jsx)(F,{id:j.id,createdAt:j.createdAt})})]})}),(0,r.jsx)(i.ZP,{item:!0,xs:12,md:6,children:(0,r.jsxs)(a.Z,{spacing:2,children:[(0,r.jsx)(u.Z,{children:(0,r.jsx)(M.u,{cash:8e4,title:"Ivy League",progress:Math.floor(j.points/800),color:"#588AB8",background:"#F4F7FA"})}),(0,r.jsx)(u.Z,{sx:{border:"1px solid rgba(22, 22, 22, 0.1)",borderRadius:"8px",padding:"1rem"},children:(0,r.jsx)(H,{id:j.id,total:j.points})})]})})]})}):(0,r.jsxs)(u.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,r.jsx)(h.Z,{children:"There are no student profile!"}),(0,r.jsx)(p(),{href:"/user/add/student",children:(0,r.jsx)(c.Z,{children:"Click here to add student profile"})})]})}var Y=n(63366),L=n(87462),B=n(90512),E=n(70917),V=n(94780),U=n(88606),G=n(41796),q=n(90948),X=n(71657),J=n(1588),Q=n(34867);function K(e){return(0,Q.Z)("MuiSkeleton",e)}(0,J.Z)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);let ee=["animation","className","component","height","style","variant","width"],et=e=>e,en,er,ei,es,ea=e=>{let{classes:t,variant:n,animation:r,hasChildren:i,width:s,height:a}=e;return(0,V.Z)({root:["root",n,r,i&&"withChildren",i&&!s&&"fitContent",i&&!a&&"heightAuto"]},K,t)},eo=(0,E.F4)(en||(en=et` 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } `)),ed=(0,E.F4)(er||(er=et` 0% { transform: translateX(-100%); } 50% { /* +0.5s of delay between each loop */ transform: translateX(100%); } 100% { transform: translateX(100%); } `)),el=(0,q.ZP)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],!1!==n.animation&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})(({theme:e,ownerState:t})=>{let n=(0,U.Wy)(e.shape.borderRadius)||"px",r=(0,U.YL)(e.shape.borderRadius);return(0,L.Z)({display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:(0,G.Fq)(e.palette.text.primary,"light"===e.palette.mode?.11:.13),height:"1.2em"},"text"===t.variant&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${r}${n}/${Math.round(r/.6*10)/10}${n}`,"&:empty:before":{content:'"\\00a0"'}},"circular"===t.variant&&{borderRadius:"50%"},"rounded"===t.variant&&{borderRadius:(e.vars||e).shape.borderRadius},t.hasChildren&&{"& > *":{visibility:"hidden"}},t.hasChildren&&!t.width&&{maxWidth:"fit-content"},t.hasChildren&&!t.height&&{height:"auto"})},({ownerState:e})=>"pulse"===e.animation&&(0,E.iv)(ei||(ei=et` animation: ${0} 1.5s ease-in-out 0.5s infinite; `),eo),({ownerState:e,theme:t})=>"wave"===e.animation&&(0,E.iv)(es||(es=et` position: relative; overflow: hidden; /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */ -webkit-mask-image: -webkit-radial-gradient(white, black); &::after { animation: ${0} 1.6s linear 0.5s infinite; background: linear-gradient( 90deg, transparent, ${0}, transparent ); content: ''; position: absolute; transform: translateX(-100%); /* Avoid flash during server-side hydration */ bottom: 0; left: 0; right: 0; top: 0; } `),ed,(t.vars||t).palette.action.hover)),ec=x.forwardRef(function(e,t){let n=(0,X.Z)({props:e,name:"MuiSkeleton"}),{animation:i="pulse",className:s,component:a="span",height:o,style:d,variant:l="text",width:c}=n,u=(0,Y.Z)(n,ee),h=(0,L.Z)({},n,{animation:i,component:a,variant:l,hasChildren:!!u.children}),f=ea(h);return(0,r.jsx)(el,(0,L.Z)({as:a,ref:t,className:(0,B.Z)(f.root,s),ownerState:h},u,{style:(0,L.Z)({width:c,height:o},d)}))});var eu=n(67720),eh=n(69368);function ef(){let{data:e,mutate:t}=(0,m.ZP)("/api/rewards/tasks",e=>y.R.user.get(e).then(e=>e.data));return e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.Z,{paddingBottom:"1rem",children:(0,r.jsx)(h.Z,{children:"Complete following tasks to earn more"})}),(0,r.jsxs)(a.Z,{spacing:2,divider:(0,r.jsx)(eu.Z,{}),children:[(0,r.jsxs)(u.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,r.jsx)(u.Z,{children:(0,r.jsx)(eh.Z,{disabled:!0,size:"small",checked:e.reward_complete_identity_verification})}),(0,r.jsx)(u.Z,{children:(0,r.jsxs)(p(),{href:"/user/kyc",children:[(0,r.jsx)(h.Z,{fontSize:"0.875rem",children:"Complete identity verification"}),(0,r.jsx)(h.Z,{fontSize:"0.75rem",children:"You will receive 100 TUITs for completing this task"})]})})]}),(0,r.jsxs)(u.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,r.jsx)(u.Z,{children:(0,r.jsx)(eh.Z,{disabled:!0,size:"small",checked:e.reward_create_student_profile})}),(0,r.jsx)(u.Z,{children:(0,r.jsxs)(p(),{href:"/user/add/student",children:[(0,r.jsx)(h.Z,{fontSize:"0.875rem",children:"Create a new student profile"}),(0,r.jsx)(h.Z,{fontSize:"0.75rem",children:"You will receive 100 TUITs for completing this task"})]})})]}),(0,r.jsxs)(u.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,r.jsx)(u.Z,{children:(0,r.jsx)(eh.Z,{disabled:!0,size:"small",checked:e.reward_visit_intuition})}),(0,r.jsx)(u.Z,{children:(0,r.jsxs)(p(),{href:"https://intuitionexchange.com",target:"_blank",onClick:()=>{y.R.user.get("/api/rewards/tasks/reward_visit_intuition").then(()=>t())},children:[(0,r.jsx)(h.Z,{fontSize:"0.875rem",children:"Visit intuitionexchange.com"}),(0,r.jsx)(h.Z,{fontSize:"0.75rem",children:"You will receive 20 TUITs for completing this task"})]})})]})]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ec,{}),(0,r.jsx)(ec,{}),(0,r.jsx)(ec,{}),(0,r.jsx)(ec,{}),(0,r.jsx)(ec,{}),(0,r.jsx)(ec,{}),(0,r.jsx)(ec,{})]})}function ep(){let{user:e}=x.useContext(j.V),[t,n]=x.useState("personal"),[f,g]=x.useState(!0),[v,Z]=x.useState(!0),{data:w}=(0,m.ZP)("/api/rewards/".concat(t),e=>y.R.user.get(e).then(e=>e.data));return(0,r.jsx)("div",{style:{padding:"2rem 0"},children:(0,r.jsx)("main",{className:"container",children:(0,r.jsxs)(i.ZP,{container:!0,spacing:2,children:[null===e.phone&&f&&(0,r.jsx)(i.ZP,{item:!0,xs:12,children:(0,r.jsxs)(s.Z,{severity:"warning",variant:"standard",onClose:()=>{g(!1)},children:["We are in the process of updating our records and would like to confirm your current phone number. Please provide us with your updated phone number."," ",(0,r.jsx)(p(),{href:"/user/add/phone",children:(0,r.jsx)("b",{children:"Click here"})})," ","to update"]})}),!1===e.pin&&v&&(0,r.jsx)(i.ZP,{item:!0,xs:12,children:(0,r.jsxs)(s.Z,{severity:"warning",variant:"standard",onClose:()=>{Z(!1)},children:["Set an access PIN for your dashboard and ensure your financial data stays secure."," ",(0,r.jsx)(p(),{href:"/user/settings",children:(0,r.jsx)("b",{children:"Protect your account now!"})})]})}),(0,r.jsx)(i.ZP,{item:!0,xs:12,md:8,children:(0,r.jsxs)(a.Z,{spacing:2,children:[(0,r.jsx)(o.Z,{children:(0,r.jsxs)(i.ZP,{container:!0,alignItems:"center",spacing:2,children:[(0,r.jsx)(i.ZP,{item:!0,flexGrow:1,order:{xs:1,md:1},children:(0,r.jsxs)(d.Z,{value:t,onChange:(e,t)=>n(t),textColor:"secondary",indicatorColor:"secondary","aria-label":"secondary tabs example",sx:{".MuiTab-root":{textTransform:"capitalize"}},children:[(0,r.jsx)(l.Z,{value:"personal",label:"My Rewards"}),(0,r.jsx)(l.Z,{value:"community",label:"Community Sponsors"})]})}),(0,r.jsx)(i.ZP,{item:!0,xs:12,md:"auto",order:{xs:3,md:2},children:(0,r.jsx)(p(),{href:"/user/rewards",children:(0,r.jsx)(c.Z,{fullWidth:!0,children:"View All"})})}),(0,r.jsx)(i.ZP,{item:!0,xs:12,order:{xs:2,md:"auto"},children:(0,r.jsx)(u.Z,{children:(0,r.jsx)(i.ZP,{container:!0,spacing:2,children:void 0!==w&&w.data.slice(0,2).map((e,t)=>(0,r.jsx)(i.ZP,{item:!0,xs:12,md:6,children:(0,r.jsx)(b.A,{reward:e})},"reward-".concat(t)))})})})]})}),(0,r.jsx)(o.Z,{children:(0,r.jsx)(W,{})})]})}),(0,r.jsx)(i.ZP,{item:!0,xs:12,md:4,children:(0,r.jsxs)(a.Z,{spacing:2,children:[(0,r.jsx)(o.Z,{children:(0,r.jsx)(ef,{})}),(0,r.jsx)(p(),{href:"https://store.tuit.org/",target:"_blank",children:(0,r.jsx)(o.Z,{sx:{cursor:"pointer"},children:(0,r.jsxs)(u.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,r.jsx)("img",{alt:"companies",src:"/static/png/companies.png",style:{maxWidth:"100px",height:"auto"}}),(0,r.jsxs)(u.Z,{children:[(0,r.jsx)(h.Z,{variant:"h4",paddingBottom:"1rem",children:"Visit our TUIT Store"}),(0,r.jsx)(h.Z,{children:"and get more exciting rewards"})]})]})})}),(0,r.jsxs)(o.Z,{children:[(0,r.jsx)(h.Z,{paddingBottom:"1rem",children:"Help center"}),(0,r.jsxs)(i.ZP,{container:!0,spacing:2,children:[(0,r.jsx)(i.ZP,{item:!0,xs:12,md:6,children:(0,r.jsxs)(u.Z,{children:[(0,r.jsx)("img",{alt:"help-1",src:"/static/png/help-1.png",style:{width:"100%",height:"auto"}}),(0,r.jsx)(h.Z,{variant:"body2",fontSize:12,children:"Learn: How to earn more Scholarship Coins"})]})}),(0,r.jsx)(i.ZP,{item:!0,xs:12,md:6,children:(0,r.jsxs)(u.Z,{children:[(0,r.jsx)("img",{alt:"help-2",src:"/static/png/help-2.png",style:{width:"100%",height:"auto"}}),(0,r.jsx)(h.Z,{variant:"body2",fontSize:12,children:"Microsoft announces 1 Million Dollar scholarship for young students."})]})})]})]})]})})]})})})}ep.GetLayout=function(e){return(0,r.jsxs)(u.Z,{sx:{background:"linear-gradient(180deg, #EFF9FA 0%, rgba(239, 249, 250, 0) 69.16%)"},children:[(0,r.jsx)(v.w,{title:"Dashboard",background:"#EFF9FA"}),(0,r.jsx)(j.Y,{type:Z.pq.parent,children:e}),(0,r.jsx)(g.i,{})]})};var ex=ep},55973:function(e,t,n){"use strict";n.d(t,{A:function(){return j}});var r=n(85893),i=n(52778),s=n(99226),a=n(93946),o=n(31536),d=n(15861),l=n(83321),c=n(27484),u=n.n(c),h=n(41664),f=n.n(h),p=n(67294),x=n(51215),m=n(4730),g=n(16637),v=n(38887);function j(e){var t,n,c;let{reward:h,onRefresh:j}=e,{user:Z}=p.useContext(x.V),y=(0,m.G)(),b=null!==(t=h.linkURL)&&void 0!==t?t:"",w=null!==(n=h.linkTitle)&&void 0!==n?n:"",k=null!==(c=h.logo)&&void 0!==c?c:"",$=w.length>0&&b.length>0,S=async()=>{await v.R.user.delete("/admin/rewards/".concat(h._id)).then(e=>{let{data:t}=e;y.show(t.message),null==j||j()}).catch(e=>{var t,n;y.show(null!==(n=null===(t=e.response)||void 0===t?void 0:t.data.message)&&void 0!==n?n:e.message,"error")})};return"community"===h.type?(0,r.jsxs)(s.Z,{sx:{background:h.backgroundColor,color:h.fontColor,padding:"1rem",borderRadius:"8px",border:"1px solid #00000033",display:"flex",height:"100%",flexDirection:"column",textAlign:"center",position:"relative"},children:[h._id&&(Z.flags&g.pq.admin)!=0&&(0,r.jsx)(s.Z,{sx:{position:"absolute",right:0,top:0},children:(0,r.jsx)(a.Z,{color:"error",onClick:S,children:(0,r.jsx)(i.Z,{})})}),(0,r.jsxs)(o.Z,{spacing:2,children:[(0,r.jsx)(s.Z,{children:k.length>0&&(0,r.jsx)("img",{alt:"logo",src:k,style:{height:"6rem"}})}),void 0!==h.company&&(0,r.jsx)(d.Z,{sx:{flexGrow:1,fontWeight:"bold"},children:h.company}),$&&(0,r.jsx)(f(),{href:b,target:"_blank",children:(0,r.jsx)(l.Z,{sx:{color:h.fontColor},children:w})})]})]}):(0,r.jsxs)(s.Z,{sx:{background:h.backgroundColor,color:h.fontColor,padding:"1rem",borderRadius:"8px",border:"1px solid #00000033",display:"flex",height:"100%",flexDirection:"column"},children:[(0,r.jsxs)(s.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[k.length>0&&(0,r.jsx)("img",{alt:"logo",src:k,style:{height:"2rem"}}),void 0!==h.company&&(0,r.jsx)(d.Z,{sx:{flexGrow:1,fontWeight:"bold"},children:h.company}),(0,r.jsxs)(d.Z,{fontWeight:"bold",children:["+",h.tuit," TUIT"]})]}),(0,r.jsx)(d.Z,{variant:"body2",padding:"1rem 0",flexGrow:1,children:h.text}),(0,r.jsxs)(s.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,r.jsx)(d.Z,{variant:"body2",flexGrow:1,children:u()(h.date).format("DD MMMM YYYY")}),$&&(0,r.jsx)(f(),{href:b,target:"_blank",children:(0,r.jsx)(d.Z,{variant:"body2",children:w})})]})]})}},92703:function(e,t,n){"use strict";var r=n(50414);function i(){}function s(){}s.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,s,a){if(a!==r){var o=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s,resetWarningCache:i};return n.PropTypes=n,n}},45697:function(e,t,n){e.exports=n(92703)()},50414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){e.O(0,[4885,959,9049,3947,6400,7113,6572,6995,8871,7813,9774,2888,179],function(){return e(e.s=56252)}),_N_E=e.O()}]);