PageSourceSearch

https://www.studypug.com/_next/static/chunks/pages/parent-dashboard-95e95088f0b6e0c4.js

js studypug.com collected 2026-09-25 09:40:33 UTC 46,089 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[50778,1847],{52408:function(e,t,i){"use strict";i.d(t,{W:function(){return r.ZP}});var r=i(5579)},4322:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/parent-dashboard",function(){return i(61720)}])},12946:function(e,t,i){"use strict";var r=i(34896);t.Z=void 0;var n=r(i(20489)),o=i(11527);t.Z=(0,n.default)((0,o.jsx)("path",{d:"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1"}),"AddRounded")},30176:function(e,t,i){"use strict";var r=i(34896);t.Z=void 0;var n=r(i(20489)),o=i(11527);t.Z=(0,n.default)((0,o.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy")},57337:function(e,t,i){"use strict";var r=i(34896);t.Z=void 0;var n=r(i(20489)),o=i(11527);t.Z=(0,n.default)((0,o.jsx)("path",{d:"M15 21h-2v-2h2zm-2-7h-2v5h2zm8-2h-2v4h2zm-2-2h-2v2h2zM7 12H5v2h2zm-2-2H3v2h2zm7-5h2V3h-2zm-7.5-.5v3h3v-3zM8 9H4c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1m-3.5 7.5v3h3v-3zM8 21H4c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1m8.5-16.5v3h3v-3zM20 9h-4c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1m-1 10v-3h-4v2h2v3h4v-2zm-2-7h-4v2h4zm-4-2H7v2h2v2h2v-2h2zm1-1V7h-2V5h-2v4zM6.75 5.25h-1.5v1.5h1.5zm0 12h-1.5v1.5h1.5zm12-12h-1.5v1.5h1.5z"}),"QrCode2Rounded")},31532:function(e,t,i){"use strict";var r=i(34896);t.Z=void 0;var n=r(i(20489)),o=i(11527);t.Z=(0,n.default)((0,o.jsx)("path",{d:"M20 4H4c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2m0 14H4V8h16zm-8-2c0-.55.45-1 1-1h4c.55 0 1 .45 1 1s-.45 1-1 1h-4c-.55 0-1-.45-1-1M6.79 9.71c.39-.39 1.02-.39 1.41 0l2.59 2.59c.39.39.39 1.02 0 1.41L8.2 16.3c-.39.39-1.02.39-1.41 0a.9959.9959 0 0 1 0-1.41L8.67 13l-1.88-1.88a.9959.9959 0 0 1 0-1.41"}),"TerminalRounded")},22040:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return S}});var r=i(11527),n=i(88498),o=i(2066),s=i(66802),a=i(2866),d=i(15588),l=i(25027),c=i(89096),u=i(50959),h=i(59933),x=i(13318),f=i(81048),p=i(66021),g=i(31135),m=i(43763),w=i(9732),b=i(48779);let y=w.Z.div({width:520,maxWidth:"100%",height:"auto",borderRadius:16,display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center",padding:32,background:"#ffffff",zIndex:1010,boxSizing:"border-box",[b._s.breakpoints.down("sm")]:{padding:20}},e=>({display:e.display})),v=w.Z.form({width:"100%",height:"auto",display:"flex",flexDirection:"column",alignItems:"stretch",gap:24}),j=w.Z.div({display:"flex",alignItems:"flex-start",justifyContent:"space-between",width:"100%"}),_=w.Z.div({display:"flex",flexDirection:"column",gap:8}),k=w.Z.div({width:"100%",display:"flex",flexDirection:"column",alignItems:"center",gap:24}),C=w.Z.button({background:"none",border:"none",padding:0,cursor:"pointer",color:b.kx.brand.dark,fontSize:14,fontFamily:b.yh.style.fontFamily,alignSelf:"flex-start","&:hover":{textDecoration:"underline"}});var S=e=>{let{display:t,locale:i,error:w,setError:b}=e,{setCardModal:S}=(0,x.wh)(),{token:Z,user:P}=(0,f.Ry)(),[T,I]=(0,u.useState)(""),[z,D]=(0,u.useState)(1),[E,A]=(0,u.useState)(""),[R,F]=(0,u.useState)(""),[L,N]=(0,u.useState)(!1),[W,U]=(0,u.useState)(!1),[H,$]=(0,u.useState)(!1),X=(0,u.useRef)(null);(0,u.useEffect)(()=>{"flex"===t&&(I(""),D(1),A(""),F(""),N(!1),U(!1),$(!1),b({isError:!1,errorInfo:"",title:""}),requestAnimationFrame(()=>{var e;return null===(e=X.current)||void 0===e?void 0:e.focus()}))},[t]),(0,u.useEffect)(()=>{T.length>0&&b({isError:!1,errorInfo:"",title:""})},[T]);let B=()=>S(x.sj.Empty),M=async(e,t)=>{(await (0,g.Dx)("/user/password",{new_password:e,old_password:t},Z)).success?(b({isError:!1,errorInfo:"",title:""}),N(!0)):b({isError:!0,errorInfo:"Failed to save password. Please try again.",title:"New Password"})},q=async()=>{let e=(null==P?void 0:P.user.email)??"";(await (0,g.Dx)("/user/password/forgot",{email:e})).success?(b({isError:!1,errorInfo:"",title:""}),U(!0)):b({isError:!0,errorInfo:"Failed to send reset email. Please try again.",title:"Current Password"})};return L?(0,r.jsxs)(y,{display:t,children:[(0,r.jsxs)(j,{children:[(0,r.jsx)(c.ZP,{sx:{fontWeight:700,fontSize:24,lineHeight:"36px",color:"#333"},children:"Change Password"}),(0,r.jsx)(d.ZP,{onClick:B,sx:{minWidth:"auto",padding:0,fontSize:24,color:"#6a7282",lineHeight:1},children:"\xd7"})]}),(0,r.jsxs)(k,{children:[(0,r.jsx)(n.Z,{sx:{fontSize:56,color:"#333"}}),(0,r.jsx)(c.ZP,{sx:{fontSize:16,textAlign:"center",lineHeight:"24px"},children:"Your password's all set! \uD83D\uDE0A You can now log in with your new password, head to the parent dashboard, and switch over from the student view."})]})]}):W?(0,r.jsxs)(y,{display:t,children:[(0,r.jsxs)(j,{children:[(0,r.jsx)(c.ZP,{sx:{fontWeight:700,fontSize:24,lineHeight:"36px",color:"#333"},children:"Reset Password"}),(0,r.jsx)(d.ZP,{onClick:B,sx:{minWidth:"auto",padding:0,fontSize:24,color:"#6a7282",lineHeight:1},children:"\xd7"})]}),(0,r.jsxs)(k,{children:[(0,r.jsx)(o.Z,{sx:{fontSize:56,color:"#333"}}),(0,r.jsx)(c.ZP,{sx:{fontSize:16,textAlign:"center",lineHeight:"24px"},children:"The password reset link has been sent to your email. Please use it to reset your password."})]})]}):(0,r.jsx)(y,{display:t,children:(0,r.jsxs)(v,{onSubmit:e=>{if(e.preventDefault(),1===z){if((0,m.Wq)(T)){b({isError:!0,errorInfo:"Please enter your current password.",title:"Current Password"});return}A(T),I(""),$(!1),b({isError:!1,errorInfo:"",title:""}),D(2),requestAnimationFrame(()=>{var e;return null===(e=X.current)||void 0===e?void 0:e.focus()})}else if(2===z){if(T.length<6){b({isError:!0,errorInfo:"Password must be at least 6 characters.",title:"New Password"});return}F(T),I(""),$(!1),b({isError:!1,errorInfo:"",title:""}),D(3),requestAnimationFrame(()=>{var e;return null===(e=X.current)||void 0===e?void 0:e.focus()})}else T!==R?(b({isError:!0,errorInfo:"Passwords do not match. Please try again.",title:"New Password"}),I(""),requestAnimationFrame(()=>{var e;return null===(e=X.current)||void 0===e?void 0:e.focus()})):M(R,E)},children:[(0,r.jsxs)(j,{children:[(0,r.jsxs)(_,{children:[(0,r.jsx)(c.ZP,{sx:{fontWeight:700,fontSize:24,lineHeight:"36px",color:"#333"},children:1===z?"Enter Current Password":2===z?"Enter New Password":"Confirm New Password"}),(0,r.jsx)(c.ZP,{sx:{fontSize:14,lineHeight:"21px",color:"rgba(0,0,0,0.7)"}
1,children:1===z?"Enter your existing password to continue.":2===z?"Enter your new password (min. 6 characters).":"Re-enter your new password to confirm."})]}),(0,r.jsx)(d.ZP,{onClick:B,sx:{minWidth:"auto",padding:0,fontSize:24,color:"#6a7282",lineHeight:1},children:"\xd7"})]}),(0,r.jsx)(p.Z,{locale:i,ref:X,props:{width:"100%",title:1===z?"Current Password":"New Password",height:52,placeholder:1===z?"Enter your current password":2===z?"Enter new password (min. 6 characters)":"Re-enter new password",type:H?"text":"password",autoComplete:1===z?"current-password":"new-password",endAdornment:(0,r.jsx)(l.ZP,{onClick:()=>$(e=>!e),edge:"end",size:"small",tabIndex:-1,children:H?(0,r.jsx)(a.Z,{fontSize:"small"}):(0,r.jsx)(s.Z,{fontSize:"small"})}),error:1===z?"Please enter your current password.":"Passwords do not match. Please try again.",required:!0},error:w,onChange:e=>I(e.target.value),value:T}),(0,r.jsx)(h.Z,{btnType:h.L.FUNC,buttonText:"Continue",type:"submit",minWidth:"100%",padding:"12px 16px",background:"#05A7CF",borderColor:"#0486A6",fontWeight:700,color:"white"}),z>1&&(0,r.jsx)(d.ZP,{onClick:()=>{2===z?(I(E),A(""),D(1)):3===z&&(I(R),F(""),D(2)),$(!1),b({isError:!1,errorInfo:"",title:""}),requestAnimationFrame(()=>{var e;return null===(e=X.current)||void 0===e?void 0:e.focus()})},sx:{padding:0,margin:0,textTransform:"capitalize",alignSelf:"flex-start"},children:"← Back"}),1===z&&(0,r.jsx)(C,{type:"button",onClick:q,children:"Forgot Password?"})]})})}},24501:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return _}});var r=i(11527),n=i(88498),o=i(66802),s=i(2866),a=i(15588),d=i(25027),l=i(89096),c=i(50959),u=i(59933),h=i(13318),x=i(81048),f=i(66021),p=i(31135),g=i(9732),m=i(48779);let w=g.Z.div({width:520,maxWidth:"100%",height:"auto",borderRadius:16,display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center",padding:32,background:"#ffffff",zIndex:1010,boxSizing:"border-box",[m._s.breakpoints.down("sm")]:{padding:20}},e=>({display:e.display})),b=g.Z.form({width:"100%",height:"auto",display:"flex",flexDirection:"column",alignItems:"stretch",gap:24}),y=g.Z.div({display:"flex",alignItems:"flex-start",justifyContent:"space-between",width:"100%"}),v=g.Z.div({display:"flex",flexDirection:"column",gap:8}),j=g.Z.div({width:"100%",display:"flex",flexDirection:"column",alignItems:"center",gap:24});var _=e=>{let{display:t,locale:i,error:g,setError:m}=e,{setCardModal:_}=(0,h.wh)(),{token:k}=(0,x.Ry)(),[C,S]=(0,c.useState)(""),[Z,P]=(0,c.useState)(1),[T,I]=(0,c.useState)(""),[z,D]=(0,c.useState)(!1),[E,A]=(0,c.useState)(!1),R=(0,c.useRef)(null);(0,c.useEffect)(()=>{"flex"===t&&(S(""),P(1),I(""),D(!1),A(!1),m({isError:!1,errorInfo:"",title:""}),requestAnimationFrame(()=>{var e;return null===(e=R.current)||void 0===e?void 0:e.focus()}))},[t]),(0,c.useEffect)(()=>{C.length>0&&m({isError:!1,errorInfo:"",title:""})},[C]);let F=()=>_(h.sj.Empty),L=async e=>{(await (0,p.Dx)("/user/password",{new_password:e},k)).success?(m({isError:!1,errorInfo:"",title:""}),D(!0)):m({isError:!0,errorInfo:"Failed to save password. Please try again.",title:"New Password"})};return z?(0,r.jsxs)(w,{display:t,children:[(0,r.jsxs)(y,{children:[(0,r.jsx)(l.ZP,{sx:{fontWeight:700,fontSize:24,lineHeight:"36px",color:"#333"},children:"Set Password"}),(0,r.jsx)(a.ZP,{onClick:F,sx:{minWidth:"auto",padding:0,fontSize:24,color:"#6a7282",lineHeight:1},children:"\xd7"})]}),(0,r.jsxs)(j,{children:[(0,r.jsx)(n.Z,{sx:{fontSize:56,color:"#333"}}),(0,r.jsx)(l.ZP,{sx:{fontSize:16,textAlign:"center",lineHeight:"24px"},children:"Your password's all set! \uD83D\uDE0A You can now log in with your new password, head to the parent dashboard, and switch over from the student view."})]})]}):(0,r.jsx)(w,{display:t,children:(0,r.jsxs)(b,{onSubmit:e=>{if(e.preventDefault(),1===Z){if(C.length<6){m({isError:!0,errorInfo:"Password must be at least 6 characters.",title:"New Password"});return}I(C),S(""),A(!1),m({isError:!1,errorInfo:"",title:""}),P(2),requestAnimationFrame(()=>{var e;return null===(e=R.current)||void 0===e?void 0:e.focus()})}else C!==T?(m({isError:!0,errorInfo:"Passwords do not match. Please try again.",title:"New Password"}),S(""),requestAnimationFrame(()=>{var e;return null===(e=R.current)||void 0===e?void 0:e.focus()})):L(T)},children:[(0,r.jsxs)(y,{children:[(0,r.jsxs)(v,{children:[(0,r.jsx)(l.ZP,{sx:{fontWeight:700,fontSize:24,lineHeight:"36px",color:"#333"},children:1===Z?"Enter New Password":"Confirm New Password"}),(0,r.jsx)(l.ZP,{sx:{fontSize:14,lineHeight:"21px",color:"rgba(0,0,0,0.7)"},children:1===Z?"Enter your new password (min. 6 characters).":"Re-enter your new password to confirm."})]}),(0,r.jsx)(a.ZP,{onClick:F,sx:{minWidth:"auto",padding:0,fontSize:24,color:"#6a7282",lineHeight:1},children:"\xd7"})]}),(0,r.jsx)(f.Z,{locale:i,ref:R,props:{width:"100%",title:"New Password",height:52,placeholder:1===Z?"Enter new password (min. 6 characters)":"Re-enter new password",type:E?"text":"password",autoComplete:"new-password",error:"Passwords do not match. Please try again.",required:!0,endAdornment:(0,r.jsx)(d.ZP,{onClick:()=>A(e=>
1!e),edge:"end",size:"small",tabIndex:-1,children:E?(0,r.jsx)(s.Z,{fontSize:"small"}):(0,r.jsx)(o.Z,{fontSize:"small"})})},error:g,onChange:e=>S(e.target.value),value:C}),(0,r.jsx)(u.Z,{btnType:u.L.FUNC,buttonText:"Continue",type:"submit",minWidth:"100%",padding:"12px 16px",background:"#05A7CF",borderColor:"#0486A6",fontWeight:700,color:"white"}),2===Z&&(0,r.jsx)(a.ZP,{onClick:()=>{S(T),I(""),P(1),A(!1),m({isError:!1,errorInfo:"",title:""}),requestAnimationFrame(()=>{var e;return null===(e=R.current)||void 0===e?void 0:e.focus()})},sx:{padding:0,margin:0,textTransform:"capitalize",alignSelf:"flex-start"},children:"← Back"})]})})}},93163:function(e,t,i){"use strict";i.d(t,{Qc:function(){return a},W2:function(){return o},g5:function(){return s}});var r=i(9732),n=i(48779);let o=r.Z.div({width:"100%",height:310,display:"flex",flexDirection:"column",justifyContent:"space-between",alignContent:"center",borderRadius:16,padding:16,background:"#ffffff",position:"relative",zIndex:101,boxSizing:"border-box",top:"25%",[n._s.breakpoints.down("md")]:{top:"7.5%"},[n._s.breakpoints.down("sm")]:{top:100}},e=>({display:e.display,justifyContent:e.justifyContent,alignItems:e.alignItems,gap:e.gap,width:e.width,height:e.height,padding:e.padding})),s=r.Z.div({width:"100vw",height:"100%",background:"#000000",display:"flex",opacity:.75,position:"absolute",zIndex:100,top:0},e=>({display:e.display,top:e.top,height:e.height,zIndex:e.zIndex,background:e.background})),a=r.Z.div({width:"100%",borderRadius:12,border:`2px solid ${n.kx.yellow[500]}`,padding:"8px 16px",position:"relative",boxSizing:"border-box",display:"flex",flexDirection:"row",alignItems:"center",gap:16},e=>({display:e.display,top:e.top,height:e.height,zIndex:e.zIndex,background:e.background,borderColor:e.borderColor,flexDirection:e.flexDirection,alignItems:e.alignItems}))},9238:function(e,t,i){"use strict";i.d(t,{ZP:function(){return S}});var r=i(11527),n=i(30176),o=i(57337),s=i(72701),a=i(89096),d=i(97618),l=i(15588),c=i(96828),u=i.n(c),h=i(50959),x=i(31513),f={src:"/_next/static/media/switchUserExample.a3e7bb7a.webp"},p=i(59933),g=i(53796),m=i(76686),w=i(7039),b=i(13318),y=i(81048),v=i(12312),j=i(48779),_=i(9732);let k=_.Z.div({width:330,height:"auto",borderRadius:16,display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center",padding:16,background:"#ffffff",zIndex:1e3,top:100,boxSizing:"border-box",[j._s.breakpoints.down("md")]:{top:"7.5%"},[j._s.breakpoints.down("sm")]:{top:75}},e=>({display:e.display})),C=_.Z.div({width:300,height:325,borderRadius:10,display:"flex",flexDirection:"column",justifyContent:"space-around",alignItems:"center",background:"#E8F1FC",boxSizing:"border-box",position:"relative"},e=>({height:e.height,background:e.background}));var S=e=>{var t;let{userProfile:i,isSubscribed:c,authStudent:_,display:S,onClick:Z,QRLink:P}=e,[T,I]=(0,h.useState)(!1),z=(0,d.Z)(j._s.breakpoints.down("sm")),{cardModal:D,setCardModal:E}=(0,b.wh)(),{user:A}=(0,y.Ry)(),R=!!(null==A?void 0:null===(t=A.isTeacher)||void 0===t?void 0:t.call(A)),F=R?"Teacher":"Parent",[L,N]=(0,h.useState)(!1),W=()=>{E(b.sj.Empty)};return(0,h.useEffect)(()=>{"flex"===S&&(I(!0),setTimeout(()=>{I(!1)},1500))},[S]),(0,h.useEffect)(()=>{if(L){let e=setTimeout(()=>{N(!1)},1500);return()=>clearTimeout(e)}},[L]),(0,r.jsxs)(k,{display:S,children:[D===b.sj.UserSwitch&&(0,r.jsxs)(v.$K,{flexDirection:"column",alignItems:"center",width:"100%",gap:16,children:[(0,r.jsxs)(v.$K,{justifyContent:"center",width:"100%",gap:16,children:[(0,r.jsx)(s.Z,{}),(0,r.jsx)(a.ZP,{sx:{fontWeight:700,fontSize:18},children:"Start Learning on This Device"})]}),(0,r.jsxs)(v.$K,{alignItems:"center",children:[(0,r.jsx)(g.ZP,{photoKey:i.photo_key,photoUrl:i.photo_url,size:65,alt:i.first_name,sx:{borderRadius:"50%",overflow:"hidden"}}),(0,r.jsx)(a.ZP,{sx:{marginLeft:1},children:i.first_name})]}),(0,r.jsxs)(C,{height:z?"auto":325,children:[(0,r.jsxs)(a.ZP,{variant:z?"body2":"body1",sx:{padding:2},children:["One last note: you can switch back to the"," ",F," role by clicking on the profile picture."]}),(0,r.jsx)(u(),{src:w.Zi+f.src,alt:`Example showing how to switch back to ${F.toLowerCase()} profile by clicking the profile picture`,width:z?172.5:230,height:z?165:220})]}),(0,r.jsx)(p.Z,{btnType:p.L.FUNC,buttonText:"OK, Switch to This Profile",onClick:_,padding:"8px 20px",background:"#FFCC00"}),(0,r.jsx)(l.ZP,{onClick:W,sx:{padding:"4px 20px",textTransform:"capitalize"},children:"Go Back"})]}),D===b.sj.UserQRCode&&(0,r.jsxs)(v.$K,{flexDirection:"column",alignItems:"center",width:"100%",gap:16,children:[(0,r.jsxs)(v.$K,{justifyContent:"center",width:"100%",gap:16,children:[(0,r.jsx)(o.Z,{}),(0,r.jsx)(a.ZP,{sx:{fontSize:18,fontWeight:700},children:"Start Learning on Their Device"})]}
1),(0,r.jsx)(v.$K,{children:(0,r.jsx)(a.ZP,{children:"Scan this QR code on their device. It will automatically log in to the right profile."})}),(0,r.jsx)(C,{height:200,background:c?"#ffffff":"#bcbcbc",children:c?(0,r.jsxs)(r.Fragment,{children:[T&&(0,r.jsx)(m.Z,{}),!T&&P&&(0,r.jsx)(x.ZP,{value:P})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.ZP,{children:"Unlock this feature with"}),(0,r.jsx)(p.Z,{btnType:p.L.FUNC,buttonText:"StudyPug Membership",onClick:Z,padding:"8px",fontWeight:700,background:"#FFCC00"})]})}),(0,r.jsx)(l.ZP,{onClick:W,sx:{padding:"4px 20px",textTransform:"capitalize"},children:"Go Back"})]}),D===b.sj.ShareAccessLink&&(0,r.jsxs)(v.$K,{flexDirection:"column",alignItems:"center",width:"100%",gap:16,children:[(0,r.jsxs)(v.$K,{justifyContent:"center",width:"100%",gap:16,children:[(0,r.jsx)(n.Z,{}),(0,r.jsx)(a.ZP,{sx:{fontSize:18,fontWeight:700},children:"Start Learning on Their Device"})]}),(0,r.jsx)(v.$K,{children:(0,r.jsxs)(a.ZP,{children:["Share this secure link with your ",R?"student":"child"," so they can log in to their account from their own device."]})}),(0,r.jsx)(C,{height:175,background:c?"#ffffff":"#bcbcbc",children:c?(0,r.jsxs)(r.Fragment,{children:[T&&(0,r.jsx)(m.Z,{}),!T&&P&&(0,r.jsxs)(v.$K,{gap:8,alignItems:"center",flexDirection:"column",width:"100%",justifyContent:"center",children:[(0,r.jsxs)(a.ZP,{width:"auto",textAlign:"center",variant:"h4",sx:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",gap:1,wordBreak:"break-word",color:j.kx.brand.main,"&:hover":{opacity:.75,cursor:"pointer"},"&:active":{textDecoration:"underline"}},onClick:()=>{navigator.clipboard.writeText(P),N(!0)},children:[(0,r.jsx)(n.Z,{sx:{color:j.kx.brand.main}}),"Copy & Share"]}),(0,r.jsx)(a.ZP,{component:"span",style:{fontSize:14,color:j.kx.foregroundText.main,transition:"opacity 0.3s ease",opacity:L?1:0},children:"Link has been copied"})]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.ZP,{children:"Unlock this feature with"}),(0,r.jsx)(p.Z,{btnType:p.L.FUNC,buttonText:"StudyPug Membership",onClick:Z,padding:"8px",fontWeight:700,background:"#FFCC00"})]})}),(0,r.jsx)(l.ZP,{onClick:W,sx:{padding:"4px 20px",marginTop:1,textTransform:"capitalize"},children:"Go Back"})]})]})}},61720:function(e,t,i){"use strict";i.r(t),i.d(t,{__N_SSP:function(){return ek},default:function(){return eC}});var r=i(11527),n=i(5579),o=i(80199),s=i(97618),a=i(2807),d=i(31248),l=i(50959),c=i(76686),u=i(43864),h=i(43523),x=i(81776),f=i(13318),p=i(81048),g=i(22040),m=i(24501),w=i(9238),b=i(43715),y=i(52408),v=JSON.parse('[{"id":0,"step":1,"text":"Welcome back. Hopefully Lisa has made some progress! The Activity section shows what they worked on every week.","top":"50%","left":"50%"},{"id":1,"step":2,"text":"Course Progress shows the most recent topics that Lisa has worked on, and the topics following it. Great job Lisa on getting stars!","top":"72.5%","left":"50%"},{"id":2,"step":3,"text":"The sidebar gives you more at-a-glance stats about your child and lets you edit their profile.","top":"30%","left":"50%"},{"id":3,"step":4,"text":"Click on your profile picture to see more account settings, billing info, and additional help.\\n\\nThat’s all for now! All the best wishes to your avid learners!\\n— The StudyPug Team","top":"7.5%","left":"75%"}]'),j=i(15588),_=i(89096),k=i(12312),C=i(59933),S=i(9732);let Z=S.Z.div({width:330,height:"auto",borderRadius:16,padding:16,display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"center",position:"absolute",top:"50%",left:"50%",transform:"translateX(-50%)",zIndex:15,background:"#ffffff"},e=>({top:e.top,left:e.left}));var P=e=>{let{tutorialData:t,step:i,onCancelClick:n,onNextClick:o}=e;return(0,r.jsxs)(Z,{top:t[i].top,left:t[i].left,children:[(0,r.jsx)(_.ZP,{sx:{whiteSpace:"pre-line",marginBottom:2},children:t[i].text}),(0,r.jsxs)(k.mD,{justifyContent:"space-between",width:"100%",children:[(0,r.jsx)(j.ZP,{sx:{fontSize:16},onClick:n,children:"Colse"}),(0,r.jsxs)(k.mD,{width:"35%",justifyContent:"space-between",children:[(0,r.jsxs)(_.ZP,{children:[t[i].step,"/",t.length]}),(0,r.jsx)(C.Z,{btnType:C.L.FUNC,buttonText:"Next",minWidth:65,padding:"4px 0px",onClick:o})]})]})]})},T=i(93163);let I=S.Z.div({width:"100%",height:"100vh",position:"absolute",display:"flex",justifyContent:"center"},e=>({display:e.display}));var z=e=>{let{closeTotutial:t,showTutorial:i}=e,[n,o]=(0,l.useState)(0);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(I,{display:!0===i?"flex":"none",children:[(0,r.jsx)(P,{step:n,tutorialData:v,onNextClick:()=>{n<3?o(e=>e+1):(o(0),t())},onCancelClick:t}),(0,r.jsx)(y.W,{maxWidth:"lg",sx:{position:"relative",height:"100vh",display:"flex",justifyContent:"center"}})]}),(0,r.jsx)(T.g5,{display:!0===i?"flex":"none"})]})},D=i(17511),E=i(12946),A=i(53796),R=i(48779),F=i(43763);let L=S.Z.div({label:"UserBlock",width:270,height:210,position:"relative",zIndex:0,top:0,left:0,display:"flex",justifyContent:"flex-start",alignItems:"flex-start",paddingTop:35,cursor:"pointer",[R._s.breakpoints.down("ml")]:{justifyContent:"center",width:189},[R._s.breakpoints.down("md")]:{justifyContent:"center",paddingTop:20,width:150},[R._s.breakpoints.down("sl")]:{width:125},[R._s.breakpoints.down("sm")]:{paddingTop:10,width:100}},e=>({background:e.background,zIndex:e.zIndex,margin:e.margin,opacity:e.opacity,position:e.position,marginLeft:e.marginLeft,left:e.left,"&:hover":{background:e.hoverBackgroun
1d}})),N=S.Z.div({label:"UserBlockBackground",clipPath:"path('M154.906 0.0874964C203.003 1.46007 242.969 27.7666 256.036 63.0678C267.686 94.5446 289.608 153.627 256.036 174C215.341 198.695 71.3485 218.745 27.4283 197.5C-22.6738 173.265 7.35432 99.1011 27.4283 56.5439C45.8084 17.5777 100.608 -1.46202 154.906 0.0874964Z')",width:270,height:210,background:"#F3E5DA",position:"absolute",zIndex:0,top:0,left:0,display:"flex",justifyContent:"center",alignItems:"flex-start",paddingTop:35,cursor:"pointer","&:hover":{background:"#F3E5DA"},[R._s.breakpoints.down("lg")]:{transform:"scale(.9) translateX(-5%)"},[R._s.breakpoints.down("ml")]:{transform:"scale(.70) translateX(-22%)",marginTop:-30},[R._s.breakpoints.down("md")]:{clipPath:"path('M80.8754 0.0457693C105.987 0.76376 126.853 14.5247 133.675 32.9907C139.758 49.4562 151.203 80.3623 133.675 91.0193C112.428 103.937 37.2506 114.425 14.3202 103.312C-11.8379 90.6347 3.83965 51.8397 14.3202 29.5781C23.9163 9.19489 52.527 -0.764784 80.8754 0.0457693Z')",marginTop:0,justifyContent:"center",transform:"scale(1) ",width:150},[R._s.breakpoints.down("sl")]:{transform:"scale(.9,1) translateX(-5%)"},[R._s.breakpoints.down("sm")]:{marginTop:-35,transform:"scale(.6,.7) translateX(-25%)"}},e=>({background:e.background,zIndex:e.zIndex,margin:e.margin,opacity:e.opacity,position:e.position,marginLeft:e.marginLeft,left:e.left,"&:hover":{background:e.hoverBackground}})),W=S.Z.div({display:"flex",justifyContent:"center",zIndex:1,width:"100%",gap:8,paddingLeft:16,boxSizing:"border-box",[R._s.breakpoints.down("ml")]:{width:"auto"},[R._s.breakpoints.down("md")]:{},[R._s.breakpoints.down("sl")]:{paddingLeft:16},[R._s.breakpoints.down("sm")]:{marginTop:5,paddingLeft:0}},e=>({opacity:e.opacity,justifyContent:e.justifyContent}));var U=e=>{let{userProfile:t,id:i,background:n,zIndex:o,setUserId:a,margin:d,opacity:c,editProfile:u,position:h,marginLeft:x,left:f,hoverBackground:p,justifyContent:g}=e,m=(0,s.Z)(R._s.breakpoints.down("md")),w=(0,s.Z)(R._s.breakpoints.down("sm")),[b,y]=(0,l.useState)(!1);return(0,r.jsxs)(L,{id:i,zIndex:o,onClick:()=>a(t.user_id),margin:d,marginLeft:x,left:f,position:h,onMouseOver:()=>y(!0),onMouseOut:()=>y(!1),children:[(0,r.jsxs)(W,{justifyContent:g,children:[(0,r.jsx)(A.ZP,{photoKey:t.photo_key,photoUrl:t.photo_url,size:w?30:m?35:50,alt:t.first_name,sx:{borderRadius:"50%",overflow:"hidden"}}),!w&&(0,r.jsx)(k.mD,{flexDirection:"column",alignItems:"flex-start",width:m?50:"auto",children:(0,r.jsx)(_.ZP,{variant:m?"body2":"h6",sx:{textTransform:"capitalize",textWrap:"pretty"},children:(0,F.L$)("name",t.first_name,m?5:10)})})]}),(0,r.jsx)(N,{background:b?p:n,hoverBackground:p})]})},H=i(12452),$=e=>{let{childProfileList:t,selectedChild:i,setUserAsCurrent:n,editProfile:o,user:a,onUpgradeClick:l}=e,c=(0,s.Z)(R._s.breakpoints.down("sm")),u=(0,s.Z)("(max-width:600px)"),h=(0,s.Z)(R._s.breakpoints.down("md")),f=(0,s.Z)("(max-width:960px)"),g=(0,s.Z)(R._s.breakpoints.down("lg")),m=(0,d.useRouter)(),{isSubscribed:w}=(0,p.Ry)();return(0,r.jsxs)(k.mD,{style:{position:"relative"},alignItems:"flex-start",justifyContent:"flex-start",width:"100%",height:95,children:[t.map((e,t)=>(0,r.jsx)(U,{position:"relative",zIndex:i===e.user_id?6:0===t?5:1===t?4:2===t?3:3===t?2:1,hoverBackground:i!==e.user_id?"#A2C8F3":"#f3e5da",background:i!==e.user_id?"#ffffff":"#f3e5da",marginLeft:0===t?"0%":c?"-35px":u?"-25px":h?"-50px":f?"-50px":g?"-125px":"-7.5%",id:e.first_name,userProfile:e,setUserId:()=>n(e.user_id),editProfile:i===e.user_id?()=>{o(e.user_id)}:void 0},t)),(t.length<a.maxChildren()||!w)&&(0,r.jsxs)(j.ZP,{sx:{zIndex:10,marginTop:"2%",width:c?30:h?50:140,heigth:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:c?"column":"row",position:w?"absolute":"relative",marginLeft:w?"0px":c?"-5px":h?"15px":"50px",right:c?"-2.5%":h?"0%":f?"0%":"5%"},onClick:()=>{(0,H.Yo)("click_add_child","child_tabs",x.xi),w?m.push(`${x.r4}`):l()},children:[(0,r.jsx)("div",{style:{width:c?30:h?40:50,height:c?30:h?40:50,borderRadius:"50%",background:"#F9F2ED",display:"flex",justifyContent:"space-around",alignItems:"center",marginBottom:5,boxSizing:"border-box",boxShadow:"0px 4px 0px rgba(0, 0, 0, 0.25)"},children:(0,r.jsx)(E.Z,{sx:{fontSize:c?25:h?30:36,color:"#707070"}})}),(0,r.jsxs)(k.mD,{flexDirection:"column",alignItems:"flex-start",width:"50%",style:{display:h?"none":"flex"},children:[(0,r.jsx)(_.ZP,{variant:h?"caption":"body2",sx:{width:100,textTransform:"capitalize",color:"#707070",textAlign:"left"},children:"Add a Profile"}),(0,r.jsxs)(_.ZP,{variant:h?"caption":"body2",sx:{width:100,textTransform:"capitalize",textAlign:"left",color:"#707070"},children:[5-t.length," available"]})]})]})]})},X=i(31975),B=i(30176),M=i(79569),q=i(57337),O=i(31532),Y=i(6612),K=i(44675),V=i(31135),Q=i(25161),G=i(94259),J=i(73281),ee=i(16061),et=i(93029),ei=i(96828),er=i.n(ei),en=i(44268),eo=i(42666);S.Z.div({width:"100%",height:"100%",display:"flex",justifyContent:"flex-start",alignItems:"center"});let es=S.Z.div({position:"relative",width:"100%",height:220,borderRadius:12,display:"flex",justifyContent:"flex-start",alignItems:"center",boxSizing:"border-box",overflow:"hidden","@media (max-width: 768px)":{minHeight:200},"@media (max-width: 450px)":{flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",height:"auto",minHeight:"auto"}},e=>({background:e.background})),ea=S.Z.div({width:"25%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"center",margin:"16px 0",position:"relative",overflow:"hidden",boxSizing:"border-box",zIndex:0,"@media (max-width: 1200px)":{width:"30%"},"@media (max-width: 960px)":{width:"30%"},"@media (max-width: 768px)":{margin:0},"@media (max-width: 450px)":{flexDirection:"row",width:"100%",height:85},"@media (max-width: 400px)":{flexDirection:"row",width:"100%"}},e=>({background:e.background})),ed=S.Z.div({width:"100%",height:"45%",display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"center",background:"#efefef",boxSizing:"border-box",position:"relative",marginLeft:8,marginBottom:4,borderRadius:"0 0 0 10px",overflow:"hidden","@media (max-width: 450px)":{height:"100%",minHeight:85,borderRadius:0,justifyContent:"center",marginLeft:0},"@media (max-width: 400px)":{minHeight:75,marginBottom:0}},e=>({background:e.background})),el=S.Z.div({width:"75%",height:"100%",borderRadius:12,display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"flex-start",background:"#ffffff",padding:"16px 24px",boxSizing:"border-box",position:"absolute",right:0,zIndex:2,"@media (max-width: 1200px)":{width:"70%"},"@media (max-width: 960px)":{overflowY:"auto",overflowX:"hidden"},"@media (max-width: 450px)":{padding:16,overflowY:"auto",width:"100%",height:"auto",marginTop:-10,marginLeft:0,position:"relative"},"@media (max-width: 400px)":{marginTop:-10}},e=>({background:e.background})),ec=S.Z.div({position:"relative",height:10,width:135,border:"2px s
1olid #f4a261",borderRadius:15,marginTop:10,marginBottom:10,background:"#ffffff",zIndex:1,boxShadow:"0 3px 0 rgba(0,0,0,.35)","@media (max-width: 1200px)":{width:"80%"},"@media (max-width: 960px)":{width:"85%"}},e=>({borderColor:e.borderColor})),eu=S.Z.div({position:"absolute",background:"#ffffff",width:0,height:10,borderRadius:15},e=>({background:e.background,width:e.width})),eh=S.Z.div({display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"flex-start",width:"100%",height:"100%",margin:"10px 0","@media (max-width: 450px)":{margin:"10px 0px"}},e=>({flexDirection:e.flexDirection,justifyContent:e.justifyContent,alignItems:e.alignItems})),ex=S.Z.div({width:"100%",height:"55%",position:"relative",display:"flex",justifyContent:"center",alignItems:"flex-end",borderRadius:16,overflow:"hidden","@media (max-width: 960px)":{},"@media (max-width: 768px)":{},"@media (max-width: 450px)":{left:0,width:"25%",height:"100%",borderRadius:0}}),ef=S.Z.div({background:"#ffffff",width:"100%",height:"100%",position:"absolute",opacity:.78,zIndex:0},e=>({background:e.background,height:e.height,bottom:e.bottom,borderRadius:e.borderRadius,top:e.top,border:`3px solid ${e.border}`,margin:e.margin}));var ep=e=>{let{currentCourse:t,summary:i,tempStudyPlan:n,activity:o,currentStudyPlan:a,setBook:d}=e,[c,u]=(0,l.useState)([]),[h,x]=(0,l.useState)(0),[f,p]=(0,l.useState)([]),g=(0,s.Z)(R._s.breakpoints.down("sm")),m=a.studyplan_id===t.id;(0,l.useEffect)(()=>{let e=[],t=[];if(Array.isArray(i)){i.forEach(i=>{Array.isArray(i.courses)&&i.courses.forEach(t=>{t.studyplan_id===n.id.split("_")[0]&&e.push(...t.topic_ids)}),Array.isArray(i.topics)&&i.topics.forEach(i=>
1{e&&e.includes(i.topic_id)&&t.push(i)}),Array.isArray(o.practiced)&&o.practiced.forEach(i=>{if(e&&e.includes(i.event_detail.topic_id)){let e=t.findIndex(e=>e.topic_id===i.event_detail.topic_id);-1!==e&&(t[e]={...t[e],qe_stars:i.event_detail.qe_stars})}})});let r=0,s=[...t].sort((e,t)=>new Date(t.last_event_time).getTime()-new Date(e.last_event_time).getTime());u(s),s.forEach(e=>{r+=e.qe_stars||0}),x(r);let a=[],d=[];for(let e of s)a.includes(e.topic_id)||(a.push(e.topic_id),d.push(e));p(d)}},[i,n.id,t]);let w=e=>{let t=[];for(let i=0;i<3;i++)i<e?t.push((0,r.jsx)(et.Z,{sx:{color:"#FFCC00"}},i)):t.push((0,r.jsx)(ee.Z,{sx:{color:"#FFCC00"}},i));return t},b=t&&Object.values(t.chapters),y=b[0],v=y&&Object.values(y.topics)[0],j=t&&Math.round(f.length/t.num_topics*100),C=f.length>0?b.find(e=>e.topic_ids.includes(f[0].topic_id))??y:y;return t&&(0,r.jsxs)(es,{background:t.bg_css,children:[(0,r.jsx)(ef,{height:"44%",bottom:4,borderRadius:"0 0 0 15px",margin:"0 0 0 8px"}),(0,r.jsxs)(ea,{id:"CourseCard",children:[(0,r.jsxs)(ex,{children:[t&&(0,r.jsx)(er(),{src:t.header_image_url||"https://dmn92m25mtw4z.cloudfront.net/img/general/ela-nobg.webp",alt:`${t.name}`,width:g?87.5:175,height:g?63.75:127.5,priority:!0,style:{marginBottom:g?10:0}}),(0,r.jsx)(en.Z,{onClick:d,background:t.bg_css,isStudying:m})]}),(0,r.jsxs)(ed,{background:t.bg_css,children:[(0,r.jsx)(ec,{borderColor:t.bg_css,children:(0,r.jsx)(eu,{background:t.bg_css,width:j})}),(0,r.jsxs)(k.mD,{flexDirection:g?"row":"column",width:"70%",alignItems:"flex-start",justifyContent:"space-around",children:[(0,r.jsxs)(_.ZP,{sx:{zIndex:1},variant:g?"body2":"body1",children:[c.length,"/",t.num_topics," ","Topics"]}),t.grade<10&&(0,r.jsxs)(_.ZP,{sx:{zIndex:1},variant:g?"body2":"body1",children:[h,"/",3*t.num_topics," Stars"]})]}),(0,r.jsx)(ef,{})]})]}),(0,r.jsxs)(el,{children:[(0,r.jsxs)(k.mD,{alignItems:"flex-start",children:[(0,r.jsx)(_.ZP,{variant:g?"body2":"body1",sx:{whiteSpace:"nowrap"},children:"Currently learning :"}),(0,r.jsx)(_.ZP,{variant:g?"body2":"body1",sx:{fontWeight:700,marginLeft:1},children:(0,F.DX)(C)?C.name:"Loading..."})]}),f.length>0?(0,r.jsx)(eh,{children:f.map((e,i)=>i<5&&(0,r.jsxs)(k.mD,{justifyContent:"space-between",width:"95%",style:{marginTop:2},children:[(0,r.jsx)(_.ZP,{variant:g?"body2":"body1",children:e.topic_name},i),(0,r.jsxs)(k.mD,{children:[t.grade<10&&w(e.qe_stars),t.grade>=10&&(0,r.jsxs)(k.mD,{width:88,justifyContent:"space-between",children:[t.num_vids?(0,r.jsx)(eo.AX,{type:eo.Tu.INTRO,color:"#FAC731",borderColor:"#FAC731",background:"#FAC731",progress:"100%"}):(0,r.jsx)(eo.AX,{type:eo.Tu.INTRO,color:"#f0f0f0",borderColor:"#f0f0f0",progress:"100%"}),(null==t?void 0:t.num_vids)?(0,r.jsx)(eo.AX,{type:eo.Tu.LESSON,color:"#1fc98a",borderColor:"#1fc98a",background:"#1fc98a",progress:"100%"}):(0,r.jsx)(eo.AX,{type:eo.Tu.LESSON,color:"#f0f0f0",borderColor:"#f0f0f0"}),(null==t?void 0:t.num_qe)||(null==t?void 0:t.num_qb)?(0,r.jsx)(eo.AX,{type:eo.Tu.PRACTICE,color:"#7d76e8",borderColor:"#7d76e8",background:"#7d76e8",cursor:"pointer"}):(0,r.jsx)(eo.AX,{type:eo.Tu.PRACTICE,color:"#f0f0f0",borderColor:"#f0f0f0"})]})]})]},i))}):(0,r.jsxs)(eh,{flexDirection:"row",alignItems:"flex-start",justifyContent:"flex-start",children:[(0,r.jsx)(k.mD,{width:"100%",justifyContent:"flex-start",alignItems:"flex-start",height:"auto",children:(0,r.jsx)(_.ZP,{variant:g?"body2":"body1",children:v.name})}),(0,r.jsxs)(k.mD,{children:[t.grade<10&&w(0),t.grade>=10&&(0,r.jsxs)(k.mD,{width:88,justifyContent:"space-between",children:[t.num_vids?(0,r.jsx)(eo.AX,{type:eo.Tu.INTRO,color:"#FAC731",borderColor:"#FAC731",background:"#FAC731",progress:"100%"}):(0,r.jsx)(eo.AX,{type:eo.Tu.INTRO,color:"#f0f0f0",borderColor:"#f0f0f0",progress:"100%"}),(null==t?void 0:t.num_vids)?(0,r.jsx)(eo.AX,{type:eo.Tu.LESSON,color:"#1fc98a",borderColor:"#1fc98a",background:"#1fc98a",progress:"100%"}):(0,r.jsx)(eo.AX,{type:eo.Tu.LESSON,color:"#f0f0f0",borderColor:"#f0f0f0"}),(null==t?void 0:t.num_qe)||(null==t?void 0:t.num_qb)?(0,r.jsx)(eo.AX,{type:eo.Tu.PRACTICE,color:"#7d76e8",borderColor:"#7d76e8",background:"#7d76e8",curs
1or:"pointer"}):(0,r.jsx)(eo.AX,{type:eo.Tu.PRACTICE,color:"#f0f0f0",borderColor:"#f0f0f0"})]})]})]})]})]})},eg=i(88821),em=e=>{let{editProfile:t,userProfile:i,tempStudyPlan:n,summary:o,studyPlanList:a,activity:d,region:c,achievement:u,onMethodButtonClick:f,activateStudyPlan:g,currentStudyPlan:m,setBook:w}=e,[b,y]=(0,l.useState)(void 0),{isSubscribed:v}=(0,p.Ry)(),S=(0,s.Z)(R._s.breakpoints.down("sm")),Z=(0,s.Z)(R._s.breakpoints.down("sl")),P=(0,s.Z)(R._s.breakpoints.down("md")),T=(0,s.Z)(R._s.breakpoints.down("lg"));(0,l.useEffect)(()=>{(async()=>{let e=n.id||m.studyplan_id;if(!e)return;let t=await (0,V.ov)(e);t.success&&t.data&&y(t.data)})()},[n.id,m]);let I=()=>S?eg.x_.height.mobile:Z?eg.x_.height.lgMobile:P?eg.x_.height.tablet:eg.x_.height.normal,z=(null==i?void 0:i.user_id.toString())||"anonymous";return(0,r.jsx)(eg.im,{children:(0,r.jsx)(k.$K,{maxWidth:R.bT,padding:T?"0 16px":"0px",children:(0,r.jsxs)(eg.YY,{children:[(0,r.jsxs)(eg.ER,{children:[(0,r.jsx)(k.mD,{height:"auto",flexDirection:Z?"column":"row",justifyContent:"flex-start",alignItems:"flex-start",style:{gap:16},children:(0,r.jsxs)(eg.EM,{isSubscribed:v,children:[(0,r.jsx)(_.ZP,{variant:S?"h6":"h5",sx:{width:"100%",textTransform:"capitalize",fontWeight:700},children:(null==o?void 0:o.length)>0?`Choose ${i.first_name.length>10?"their":i.first_name+"'s "} Study Option:`:"We’re ready to go! Choose their study option:"}),(0,r.jsxs)(eg.hk,{children:[(0,r.jsx)(C.Z,{btnType:C.L.FUNC,variant:"body2",minWidth:eg.x_.minWidth,buttonText:"on This Device",onClick:()=>f("onThisDevice"),icon:(0,r.jsx)(O.Z,{sx:eg.x_.icon}),padding:T?eg.x_.padding.desktop:eg.x_.padding.normal,background:eg.x_.background,color:eg.x_.color,height:I()}),(0,r.jsx)(C.Z,{btnType:C.L.FUNC,variant:"body2",minWidth:eg.x_.minWidth,buttonText:"on Their Device",onClick:()=>f("onUserDevice",i.user_id,i.user_guid),icon:(0,r.jsx)(q.Z,{sx:eg.x_.icon}),padding:T?eg.x_.padding.desktop:eg.x_.padding.normal,background:eg.x_.background,color:eg.x_.color,height:I()}),(0,r.jsx)(C.Z,{btnType:C.L.FUNC,variant:"body2",minWidth:eg.x_.minWidth,buttonText:"Share Access Link",onClick:()=>f("shareAccessLink",i.user_id,i.user_guid),icon:(0,r.jsx)(B.Z,{sx:eg.x_.icon}),padding:T?eg.x_.padding.desktop:eg.x_.padding.normal,background:eg.x_.background,color:eg.x_.color,height:I()})]})]})}),(0,r.jsx)(J.Z,{summary:o,userProfile:i,routeTo:(0,G.VQ)(G.qX.PARENT_DASHBOARD)}),(0,r.jsxs)(k.$K,{width:"100%",justifyContent:"space-between",height:"auto",children:[a.length<2?(0,r.jsxs)(_.ZP,{variant:S?"h6":"h5",sx:{fontWeight:700},children:[n.name," Course Progress"]}):(0,r.jsx)(K.Z,{width:"auto",type:Q.F.Studyplan,courseList:a,chooseOption:e=>{g(e.studyplan_id)},studyPlan:n,userProfile:i}),(0,r.jsx)(C.Z,{btnType:C.L.CTA,variant:"h6",boxShadow:"0px 4px rgba(0, 0, 0, 0.5)",buttonText:"View Course",padding:"8px 16px",minWidth:S?"auto":160,background:"#ffffff",routeTo:`/${i.region}/kids/${(null==b?void 0:b.course_key)??""}`,onClick:()=>{(0,H.Yo)("click_view_course","course_progress",x.xi,`/${i.region}/kids/${(null==b?void 0:b.course_key)??""}`)}})]}),b&&d&&(0,r.jsx)(ep,{currentCourse:b,summary:o,tempStudyPlan:n,activity:d,currentStudyPlan:m,setBook:w})]}),(0,r.jsxs)(eg.b,{paddingTop:0,children:[(0,r.jsx)(Y.Z,{userProfile:i,editProfile:t,tempStudyPlan:n,summary:o,achievement:u,currentStudyPlan:m}),(0,r.jsx)(k.mD,{flexDirection:"column",width:"100%",style:{gap:16},children:(0,r.jsxs)(j.ZP,{variant:"contained",onClick:()=>{X.default.logout();try{X.default.setUserId(z),X.default.setAttributes({userId:z,firstName:(null==i?void 0:i.first_name)??"",lastName:(null==i?void 0:i.last_name)??"",email:(null==i?void 0:i.email)??""}),X.default.track(h.AH.PARENT)}catch(e){}},sx:{minWidth:240,width:"100%",backgroundColor:R.kx.beige[100],justifyContent:"space-between",borderRadius:"14px",border:`2px solid ${R.kx.beige[500]}`,boxShadow:"none",textTransform:"none",lineHeight:"24px","&:hover":{boxShadow:"none",backgroundColor:R.kx.beige[500]}},children:["Feedback",(0,r.jsx)(M.Z,{sx:{color:R.kx.foregroundText.faded}})]})})]})]})})})},ew=i(27604),eb=i(5768),ey=i(29677),ev=i(18968),ej=i(35802),e_=i(14224),ek=!0,eC=e=>{let{region:t}=e,{user:i,isAuthenticated:y,switchUser:v,isSubscribed:j,userProfile:_,token:k,selectedChildId:C}=(0,p.Ry)(),S=(0,a.useSearchParams)().get("user_id"),Z=(0,d.useRouter)(),{query:P}=Z,T=(0,s.Z)(R._s.breakpoints.down("sm")),I=(0,s.Z)(R._s.breakpoints.down("md")),E=(0,s.Z)(R._s.breakpoints.down("ml")),{cardModal:A,setCardModal:L}=(0,f.wh)(),[N,W]=(0,l.useState)([]),[U,X]=(0,l.useState)(0),[B,M]=(0,l.useState)(),[q,O]=(0,l.useState)(),[Y,K]=(0,l.useState)(ey.c),[Q,J]=(0,l.useState)([]),[ee,et]=(0,l.useState)(),[ei,er]=(0,l.useState)(!1),[en,eo]=(0,l.useState)(!1),[es,ea]=(0,l.useState)(""),[ed,el]=(0,l.useState)(eb.H),[ec,eu]=(0,l.useState)({isError:!1,errorInfo:"",title:""}),[eh,ex]=(0,l.useState)({onStorePassword:!1,onThisDevice:!1,onUserDevice:!1,onUserEmail:!1,showTutorial:!1}),ef=e=>{(0,H.Yo)("click_edit_profile","user_profile",x.xi,null,null==i?void 0:i.getABTestingGroup()),window.location.assign(`${x.dO}?user_id=${e}`)},ep=(e,t,r)=>{k&&(window.scrollTo({top:0,behavior:"smooth"}),"onThisDevice"===e?((0,F.Ht)("dashboadContainer","MainBackgroun
1d",-500),(0,H.Yo)("click_learning_on_device","continue_learning",x.xi,null,null==i?void 0:i.getABTestingGroup()),(null==_?void 0:_.has_pw)===0?L(f.sj.ManagePassword):L(f.sj.UserSwitch)):"onUserDevice"===e?((0,H.Yo)("click_scan_QR_code","continue_learning",x.xi,null,null==i?void 0:i.getABTestingGroup()),L(f.sj.UserQRCode),t&&ek(t,k)):"shareAccessLink"===e?((0,H.Yo)("click_share_access_link","continue_learning",x.xi,null,null==i?void 0:i.getABTestingGroup()),L(f.sj.ShareAccessLink),t&&ek(t,k)):"onUserEmail"===e?ex({onStorePassword:!1,onThisDevice:!1,onUserDevice:!1,onUserEmail:!0,showTutorial:!1}):"showTutorial"===e&&ex({onStorePassword:!1,onThisDevice:!1,onUserDevice:!1,onUserEmail:!1,showTutorial:!0}))},ek=async(e,t)=>{let r=await (0,V.Nh)(e.toString(),t);if(r.success){var n;ea(`https://www.studypug.com${e_.env.NEXT_PUBLIC_BASE_PATH??""}${(0,G.VQ)(G.qX.SIGNIN_MIDDLEWARE,null==i?void 0:i.getRegion())}?${u.SW}=${e}&${u.Dc}=${null===(n=r.data)||void 0===n?void 0:n.token}`)}},[eC,eS]=(0,l.useState)(!1),eZ=e=>{"open"===e?eS(!0):eS(!1)};(0,l.useEffect)(()=>{if(!(!y||!i||(0,F.kK)(k))){if(y&&j){if(null==i?void 0:i.isStudent()){window.location.assign((0,G.VQ)(G.qX.STUDENT_PORTAL));return}if(null==i?void 0:i.isParent()){window.location.assign((0,G.VQ)(G.qX.PARENT_PORTAL));return}if(!(null==i?void 0:i.hasStudents())){window.location.assign((0,G.VQ)(G.qX.WELCOME));return}eo(!0)}else y&&!j&&window.location.assign((0,G.VQ)(G.qX.START_PAGE))}},[y,Z,i,j,k]),(0,l.useEffect)(()=>{(0,F.DX)(P)&&"1"===P.show_upgrade&&L(f.sj.Freemium)},[P,L]),(0,l.useEffect)(()=>{if(!k)return;let e=async e=>{let t=(0,V.N$)("/user/activity/summary",e,k),i=(0,V.N$)("/user/achievement",e,k),r=(0,V.N$)("/user/activity/recent",e,k);try{let e=await Promise.all([t,i,r]);e&&(M(e[0].data),O(e[1].data),et(e[2].data))}catch(e){}};0!==U&&e(U.toString())},[U,k,C]);let eP=async()=>{try{let e=await (0,V.wA)(U,k);if(e.success&&(0,F.DX)(e.data)){let t=e.data.my_courses_info,i=e.data.my_courses,r=[];for(let e of i){let i=t.filter(t=>t.studyplan_id===e);i.length>0&&r.push(i[0])}if(J(r),r.length>0){let e=r[r.length-1];el(e),K({id:e.studyplan_id,name:e.name,img:e.header_image_url,grade:e.grade,course_key:e.course_key||"",bg_css:e.bg_css})}}}catch(e){}};(0,l.useEffect)(()=>{0===U&&N.length>0&&(S?X(Number(S)):X(N[0].user_id)),0!==U&&eP()},[N,U,k]);let eT=async(e,t)=>{try{await (0,V.lO)(t,e)}catch(e){}},eI=e=>{let t=Q.findIndex(t=>t.studyplan_id===e);if(-1===t)return;let i=Q[t];J([...Q.slice(0,t),...Q.slice(t+1),i]),K({id:i.studyplan_id,name:i.name,img:i.header_image_url,grade:i.grade,course_key:i.course_key,bg_css:i.bg_css})},ez=()=>{let e=Q.map(e=>e.studyplan_id);el(Q[Q.length-1]),eT(U,e),J(Q)},eD={user_id:(null==_?void 0:_.user_id)??0,first_name:(null==_?void 0:_.first_name)??"",photo_key:(null==_?void 0:_.photo_key)??null,photo_url:(null==_?void 0:_.photo_url)??null},eE=async(e,t)=>{(0,ev.D$)("parentUserProfile",_?JSON.stringify(eD):"");let i=await (0,V.Zl)(e,t);i.success&&v(i.data.apikey,e=>{e&&(L(f.sj.Empty),window.location.assign(x.Cu))})},eA=N.find(e=>e.user_id===U);return(0,F.kK)(i)||!1===en||(0,F.kK)(_)||(0,F.kK)(k)?(0,r.jsx)(c.Z,{}):(0,r.jsxs)(D.Z,{title:"Your Child's Math, Calculus & Stats Help | StudyPug",description:"StudyPug is a more interactive way of study math and offers students an easy access to stay on track in their math class.",userProfileList:N,setUserProfileList:W,overflowY:"hidden",zIndex:A===f.sj.Freemium==!0?5:100,overflowX:"hidden",id:"dashboadContainer",height:A===f.sj.Empty?"100%":"100vh",selectedChild:U,children:[(0,r.jsxs)(n.ZP,{maxWidth:"lg",style:{zIndex:2,display:"flex",flexDirection:"column",alignItems:"center",paddingTop:16,position:"relative"},children:[(0,r.jsx)($,{user:i,childProfileList:N,selectedChild:U,setSelectedChild:X,setUserAsCurrent:e=>{(0,H.Yo)("click_switch_child","child_tabs",x.xi,null,null==i?void 0:i.getABTestingGroup()),er(!0),X(e),setTimeout(()=>{er(!1)},300)},editProfile:ef,onUpgradeClick:()=>(0,ej._)(i,L,ew.N.kidTabs,x.xi)}),(0,r.jsxs)(eg.Sx,{id:"MainBackground",marginTop:T?-45:I?-30:E?-10:0,children:[N.length>0&&!ei?N.map((e,t)=>U===e.user_id&&(0,r.jsx)(em,{userProfile:e,summary:B,onMethodButtonClick:ep,editProfile:()=>ef(e.user_id),achievement:q,activity:ee,tempStudyPlan:Y,studyPlanList:Q,activateStudyPlan:eI,region:null==i?void 0:i.getRegion(),onUpgradeClick:()=>(0,ej._)(i,L,ew.N.bannder,x.xi),isSubscribed:j,currentStudyPlan:ed,setBook:ez},t)):(0,r.jsx)(c.Z,{}),(0,r.jsx)(z,{closeTotutial:()=>eZ("close"),showTutorial:eC})]}),(0,r.jsxs)(o.default,{open:A===f.sj.ManagePassword||A===f.sj.Freemium||A===f.sj.UserSwitch||A===f.sj.UserQRCode||A===f.sj.ShareAccessLink,onClose:()=>L(f.sj.Empty),PaperProps:{style:{backgroundColor:"transparent",boxShadow:"none",overflow:"visible"}},children:[A===f.sj.ManagePassword&&(null==i?void 0:i.user.has_pw)===1?(0,r.jsx)(g.default,{locale:null==i?void 0:i.getRegion(),display:"flex",setError:eu,error:ec}):A===f.sj.ManagePassword?(0,r.jsx)(m.default,{locale:null==i?void 0:i.getRegion(),display:"flex",setError:eu,error:ec}):null,(0,r.jsx)(b.Z,{region:null==i?void 0:i.getRegion(),type:h.i4.parent,display:A===f.sj.Freemium?"flex":"none",top:T?25:50}),(0,r.jsx)(w.ZP,{isSubscribed:j,display:A===f.sj.UserSwitch||A===f.sj.UserQRCode||A===f.sj.ShareAccessLink?"flex":"none",userProfile:eA,authStudent:()=>{eA&&eE(eA.user_guid,k),(0,H.Yo)("click_swith_to_profile","learning_on_device",x.xi)},onClick:()=>{(0,ej._)(i,L,ew.N.qrCode,x.xi)},QRLink:es})]})]}),ei&&(0,r.jsx)(eg.Sx,{top:I?160:180,position:"absolute",children:(0,r.jsx)(c.Z,{height:"50vh"})})]})}},27604:function(e,t,i){"use strict";var r,n;i.d(t,{N:function(){return r}}),(n=r||(r={})).header="header",n.askExperts="askExperts",n.bannder="banner",n.kidTabs="child_tabs",n.qrCode="scan_QR_code"},35802:function(e,t,i){"use strict";i.d(t,{_:function(){return a}});var r=i(17726),n=i(12452),o=i(94259),s=i(43763);let a=(e,t,i,a)=>{(0,s.X5)("HeaderDashboard",50),(null==e?void 0:e.hasCancelled())&&!(null==e?void 0:e.isChild())?window.open((0,o.VQ)(o.qX.MY_ACCOUNT),"_blank"):t(r.s.Freemium),(0,n.Yo)("click_open_freemium_card",i,a)}}},function(e){e.O(0,[18881,85139,45374,46514,15908,6404,89521,82014,68950,36327,12635,43070,36157,81307,9985,48798,88463,92888,49774,40179],function(){return e(e.s=4322)}),_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.