1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8451],{1439:(e,s,t)=>{"use strict";t.d(s,{p:()=>h});var n=t(6029),l=t(55729),a=t(20836),r=t(64426),i=t(76264),o=t(22086),c=t(61065),d=t(52629),m=t(64206),u=t(28121);let p=e=>{let{children:s,...t}=e,a=(l.Children.toArray(s)||[]).pop(),{isMulti:o,getValue:c}=t,d=c(),p=d.length,x=p?d[0]:void 0,h=x&&"color"in x,g=x&&"fluencyType"in x;return(0,n.jsx)(r.c.ValueContainer,{...t,children:!o&&g?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("span",{className:(0,i.QP)("relative flex items-center gap-2 text-black",h&&"pl-3"),children:[g?(0,n.jsx)(m.A,{className:"",isAddSub:"ADD_SUB"===x.fluencyType}):null,(0,n.jsx)("span",{className:"overflow-hidden text-ellipsis",children:d[0].label})]}),(0,n.jsx)(r.c.Input,{...a.props})]}):o&&p>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("span",{className:(0,i.QP)("relative flex max-w-full items-center gap-2 text-black",h&&"pl-3"),children:[h?(0,n.jsx)(u.D,{color:x.color,className:"absolute left-0 -translate-x-1"}):null,(0,n.jsx)("span",{className:"overflow-hidden text-ellipsis",children:d[0].label}),p>1?(0,n.jsxs)("strong",{className:"inline-flex shrink-0 items-center justify-center bg-blue-600 text-white px-2 rounded-full text-center font-medium",children:["+ ",p-1]}):null]}),(0,n.jsx)(r.c.Input,{...a.props})]}):s})},x={menu:d.A.menu,input:d.A.input,option:d.A.option,control:d.A.control,menuList:d.A.menuList,container:d.A.container,placeholder:d.A.placeholder,singleValue:d.A.singleValue,valueContainer:d.A.valueContainer},h=(0,l.forwardRef)((e,s)=>{let{id:t,value:l,options:d,className:m,components:u,isMulti:h=!1,...g}=e,f=h?null==d?void 0:d.filter(e=>!!(null==l?void 0:l.includes(e.value))):null==d?void 0:d.find(e=>e.value===l);return(0,n.jsx)(a.Ay,{...g,ref:s,id:t,instanceId:t,options:d,isMulti:h,value:f,styles:x,hideSelectedOptions:!1,closeMenuOnSelect:!h,className:(0,i.QP)("w-full",m),components:{Input:e=>(0,n.jsx)(r.c.Input,{...e,"aria-activedescendant":void 0}),IndicatorsContainer:c.A,ValueContainer:p,Control:o.A,...u}})});h.displayName="SelectInput"},5700:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});var n=t(6029),l=t(76264);function a(e){let{children:s,className:t,title:a,style:r,...i}=e;return(0,n.jsx)("div",{onClick:e.onClick,className:(0,l.QP)("flex items-center text-medium-dark-font",t),title:a,style:r,...i,children:s})}},11653:(e,s,t)=>{"use strict";t.d(s,{A:()=>m});var n=t(6029),l=t(26751),a=t(8588),r=t.n(a);t(55729);var i=t(76264);let o={src:"/_next/static/media/reports-badge.06566957.png",height:175,width:170,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAPFBMVEU5QEo3KElWZ8pmPmvU2fTb5fxARHRidd8nDQBWbtN+cdGiLi5sgO2+yvN9aMlyivByifCjuv6arvu0wfdqy1i4AAAAEXRSTlMBIokW/P0z0A/GWgXg/UP9/Ek72KsAAAAJcEhZcwAACxMAAAsTAQCanBgAAAA8SURBVHicFcXBEcAgCADBU1FA1AT7LzaT/SwQ5wQQU59XZ9BW9p6rYdr3FjeoV+RWoGimFoDhPv7BDPgARmcBp17xlOEAAAAASUVORK5CYII=",blurWidth:8,blurHeight:8},c={src:"/_next/static/media/reports-hero.78a94ba1.svg",height:388,width:367,blurWidth:0,blurHeight:0};var d=t(74998);function m(e){let{className:s,children:t}=e,{t:a}=(0,l.Bd)("teachers");return(0,n.jsxs)("div",{className:(0,i.QP)("relative min-h-[31.25rem] max-h-[50vh] overflow-hidden",s),children:[t,(0,n.jsx)("div",{className:(0,i.QP)("z-50 absolute top-0 left-0 min-w-full min-h-full bg-gradient-to-b from-[#ffffff00] to-[#F3F6F8] flex",s),children:(0,n.jsxs)("div",{className:"m-auto flex flex-col w-[31.25rem] h-[22.5rem] relative gap-4 p-8 px-16 text-center bg-white rounded-xl shadow-md z-[1]",children:[(0,n.jsx)("div",{className:"w-[4rem] h-[5.625rem] absolute",style:{left:"calc(50% - 2rem)",top:"-20px"},children:(0,n.jsx)(r(),{src:o,alt:a("paywall.reports.badgeAlt","Premium Badge"),width:64,height:90})}),(0,n.jsx)("div",{className:"w-[16.25rem] h-[18.75rem] absolute",style:{right:"-11.25rem",top:"calc(50% - 9.375rem)"},children:(0,n.jsx)(r(),{src:c,alt:a("paywall.reports.heroAlt","Hero"),width:260,height:300})}),(0,n.jsx)("p",{className:"h3 mt-10",children:a("paywall.reports.title","Power-Up Your Classroom")}),(0,n.jsx)("p",{className:"main text-dark-grey",children:(0,n.jsx)(l.x6,{t:a,i18nKey:"paywall.reports.body",defaults:"Supercharge your studentsâ performance by gaining insight on how well they are learning content. Data insight power-ups are available as a <0>premium account feature.</0>",components:[(0,n.jsx)("b",{},"0")]})}),(0,n.jsx)(d.A,{className:"mt-8 bg-[#457DD1] hover:bg-[#649bee] text-white",text:a("paywall.reports.cta","Unlock Our Premium Features"),href:"/subscription/plans",link:"href",dataAnalyticsId:"reports-paywall:unlock-premium-features"})]})})]})}},19408:(e,s,t)=>{"use strict";t.d(s,{A:()=>n});let n={src:"/_next/static/media/red-alert.06909bab.svg",height:34,width:38,blurWidth:0,blurHeight:0}},22086:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});var n=t(6029),l=t(64426),a=t(76264);let r=e=>{let{isFocusSelect:s=!1,className:t,hideBorder:r,...i}=e;return(0,n.jsx)(l.c.Control,{className:(0,a.QP)("relative flex text-slate-400 bg-white h-full max-w-full","cursor-default overflow-hidden",s?"rounded-full pl-2 lg:pl-5 pr-2 w-28 lg:w-36 justify-center":"rounded-md px-2 py-2 text-sm flex-auto",!i.isDisabled&&"border-slate-300",!r&&"border input-outline",t),...i})}},28121:(e,s,t)=>{"use strict";t.d(s,{D:()=>i,Z:()=>r});var n=t(6029),l=t(55729),a=t(76264);let r=e=>{let{groups:s,className:t,GroupIndicatorProps:l}=e;return(null==s?void 0:s.length)>0?(0,n.jsx)("ul",{className:(0,a.QP)("flex gap-1",t),children:s.map(e=>{let{id:s,color:t}=e;return(0,n.jsx)("li",{children:(0,n.jsx)(i,{color:t,className:"w-5 h-1 lg:w-2 lg:h-8",...l})},s)})}):null},i=l.forwardRef((e,s)=>{let{className:t,color:l}=e;return(0,n.jsx)("div",{ref:s,className:(0,a.QP)("w-2 h-8 rounded-full",t),style:{background:l}})});i.displayName="GroupIndicator"},30459:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});var n=t(6029),l=t(76264);let a=e=>{let{className:s,name:t,onClick:a,style:r="fas"}=e,i="".concat(r," fa-").concat(t);return(0,n.jsx)("i",{onClick:a,className:(0,l.QP)(i,s)})}},34715:(e,s,t)=>{var n=t(5549);e.exports=function(e){return"function"==typeof e?e:n}},40359:(e,s,t)=>{"use strict";t.d(s,{y:()=>c});var n=t(6029),l=t(55729),a=t(64426),r=t(28121),i=t(1439);let o=e=>{let{isMulti:s,children:t,data:l}=e,{label:i,color:o,numberOfMatches:c}=l;return(0,n.jsx)(a.c.Option,{...e,children:s?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.D,{color:o,className:"-translate-x-1"}),i,null==c?null:(0,n.jsxs)("span",{className:"text-slate-400 font-normal",children:["(",c,")"]})]}):t})},c=(0,l.forwardRef)((e,s)=>{let{value:t,options:l,placeholder:a,onChange:r,className:c,hideBorder:d=!1,...m}=e;return(0,n.jsx)(i.p,{...m,ref:s,isMulti:!0,value:t,options:l,onChange:r,className:c,hideBorder:d,placeholder:a||"Filter by group",closeMenuOnSelect:!0,blurInputOnSelect:!0,components:{Option:o}})});c.displayName="GroupSelect"},52629:(e,s,t)=>{"use strict";t.d(s,{A:()=>o});var n=t(77522);let l=(0,n.tp)("sky",50),a=(0,n.tp)("sky",100),r=(0,n.tp)("slate",200),i=(0,n.tp)("slate",400),o={groupHeading:()=>({}),group:()=>({borderTop:"1px solid ".concat(r)}),control:()=>({height:"2.5rem"}),input:e=>({...e,flex:0}),menu:e=>({...e,width:void 0,minWidth:"100%"}),menuList:e=>({...e,minWidth:"100%",width:"max-content"}),container:e=>({...e,display:"flex"}),indicatorsContainer:e=>({...e,width:12,display:"flex",justifyContent:"center"}),valueContainer:()=>({flex:1,display:"flex",alignItems:"center",lineHeight:"1rem",width:"calc(100% - 1rem)"}),placeholder:e=>
1({...e,margin:0,color:i,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),singleValue:e=>({...e,flex:1,margin:0,height:"auto",color:"black",overflow:"hidden",textOverflow:"ellipsis"}),option:(e,s)=>{let{isFocused:t,isSelected:n}=s;return{...e,gap:"0.5rem",display:"flex",color:"black",":active":void 0,fontWeight:500,alignItems:"center",backgroundColor:n?a:t?l:void 0}}}},61065:(e,s,t)=>{"use strict";t.d(s,{A:()=>i});var n=t(6029),l=t(64426),a=t(76264),r=t(30459);let i=e=>e.isDisabled?null:(0,n.jsx)(l.c.IndicatorsContainer,{...e,children:(0,n.jsx)(r.A,{name:"chevron-down",className:(0,a.QP)("transition-transform text-xs",e.selectProps.menuIsOpen&&"-rotate-180")})})},63683:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});var n=t(6029),l=t(76264);function a(e){let{children:s,className:t}=e;return(0,n.jsx)("div",{className:(0,l.QP)("w-full flex space-x-4 py-3 px-6 bg-[#F6FAFC]",t),children:s})}},64206:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});var n=t(6029),l=t(76264);let a=e=>{let{className:s,isAddSub:t=!1,...a}=e;return(0,n.jsx)("i",{className:(0,l.QP)("inline-flex flex-col items-center text-xs",t?"text-basecamp-as-700":"text-basecamp-md-700",s),...a,children:t?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("i",{className:"fas fa-plus translate-y-0.5"}),(0,n.jsx)("i",{className:"fas fa-minus"})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("i",{className:"fas fa-times"}),(0,n.jsx)("i",{className:"fas fa-divide"})]})})}},64305:(e,s,t)=>{var n=t(30147),l=t(83391),a=t(68988),r=t(91544);e.exports=function(e,s){return(r(e)?n:l)(e,a(s,3))}},69276:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>e6});var n=t(6029),l=t(20148),a=t(7234),r=t(26751),i=t(81278),o=t(55729),c=t(95099),d=t(99281),m=t(62563),u=t(64305),p=t.n(u),x=t(26194),h=t.n(x),g=t(95252),f=t(59916),y=t(4575),v=t(61604),j=t.n(v),A=t(40359),w=t(76264),b=t(82865),N=t(97204),C=t(78244),k=t(70316),S=t(5700),P=t(79608),F=t(63683),q=t(51565),E=t(82517),I=t(37987),_=t(46237),O=t(8781),M=t(63777),R=t(58705),D=t(8588),L=t.n(D),T=t(80059),B=t(92275),Q=t(27609);let G={TEACHER_SKIPPED:"teacher_skipped",STUDENT_SKIPPED:"student_skipped",AWAKENING_NOT_SUPPORTED_IN_WEB_MODE:"awakening_not_supported_in_web_mode"};function U(e){var s,t,l,a,i,o,c,d;let{t:m}=(0,r.Bd)("teachers"),{activity:u,progress:p,playtime:x}=e,h=u.type||"",g="",f=(0,n.jsx)(n.Fragment,{}),v=u.startedAt||"";if((null==u?void 0:u.type)===Q.Z.MINI_GAME&&(null==u?void 0:u.miniGame)){let e=u.miniGame;g=e.game||"",h="video"===e.contentType?"Video Lesson":e.contentType||"",f=(0,n.jsx)(L(),{src:(0,T.F)(e.image),alt:e.game||"",fill:!0,className:"object-cover object-center"})}if((null==u?void 0:u.type)===Q.Z.ASSESSMENT&&(h="Assessment",g=(null==(s=u.learningObjective)?void 0:s.learningObjective)||"",f=(0,n.jsx)(L(),{src:(null==(t=u.learningObjective)?void 0:t.imageUrl)||"",alt:(null==(l=u.learningObjective)?void 0:l.name)||"",fill:!0,className:"object-cover object-center"})),(null==u?void 0:u.type)===Q.Z.VIDEO&&(h="Video",g=(null==(a=u.video)?void 0:a.title)||"",f=(0,n.jsx)(L(),{src:(null==(i=u.video)?void 0:i.thumbnailUrl)||"",alt:(null==(o=u.video)?void 0:o.title)||"",fill:!0,className:"object-center"})),(null==u?void 0:u.type)===Q.Z.AWAKENING||(null==u?void 0:u.type)==="structured_freeplay"||(null==u?void 0:u.type)==="awakening_timed"||(null==u?void 0:u.type)==="awakening_focus"||(null==u?void 0:u.type)==="awakening_mastery"){h=(null==u?void 0:u.type)==="awakening_timed"||(null==u?void 0:u.type)==="awakening_focus"||(null==u?void 0:u.type)==="awakening_mastery"?"Learning Session":"Awakening";let e=u.learningObjective||(null==(c=u.assignmentActivity)?void 0:c.learningObjective);g=(null==u?void 0:u.type)==="structured_freeplay"?"Structured Freeplay":(null==e?void 0:e.learningObjective)||"Learning Session",f=(null==e?void 0:e.imageUrl)?(0,n.jsx)(L(),{src:e.imageUrl,alt:e.name||e.learningObjective||"Learning Objective",fill:!0,className:"object-cover object-center opacity-75"}):(0,n.jsx)(L(),{src:B.A,alt:"Awakening playtime",fill:!0,className:"object-cover object-center"})}let j=y.c9.fromISO(v).toFormat("MMM dd, y"),A=!(null==u?void 0:u.assignmentActivity),w=function(e,s,t,n){if(!s)return e("reports.skipReasons.skipped","Skipped");switch(s){case G.TEACHER_SKIPPED:return e("reports.skipReasons.byTeacher","Ski
1pped by Teacher");case G.AWAKENING_NOT_SUPPORTED_IN_WEB_MODE:return e("reports.skipReasons.notSupported","Not Supported in Basic Player");case G.STUDENT_SKIPPED:if(n)return e("reports.skipReasons.byStudent","Skipped by Student");if("video"===t)return e("reports.skipReasons.videoFailed","Video Failed to Load");return e("reports.skipReasons.gameFailed","Game Failed to Load");default:return e("reports.skipReasons.skipped","Skipped")}}(m,null==u?void 0:u.skipReason,null!=(d=null==u?void 0:u.type)?d:void 0,A);return(0,n.jsxs)("div",{className:"w-full flex flex-col bg-white",children:[(0,n.jsxs)("div",{className:"bg-primary rounded-t-md p-4 flex relative overflow-hidden text-left",children:[(0,n.jsx)("div",{className:"w-[5rem] h-[5rem] min-w-[5rem] min-h-[5rem] bg-primary rounded-md relative flex overflow-hidden",children:(0,n.jsx)("div",{className:"w-full h-full absolute",children:f})}),(0,n.jsxs)("div",{className:"flex flex-col ml-4",children:[(0,n.jsx)("span",{className:"header-sm mb-1 text-primary-200 uppercase",children:h}),(0,n.jsx)("span",{className:"text-white main-bold",children:g})]})]}),(0,n.jsxs)("div",{className:"flex min-h-[5rem]",children:[(0,n.jsxs)("div",{className:"w-1/3 flex flex-col border-r border-light-grey-2 text-center",children:[(0,n.jsx)("span",{className:"text-dark-grey mt-3 header-sm uppercase",children:"Started"}),(0,n.jsx)("span",{className:"text-universal roman-md mt-2",children:v&&j?j:"n/s"})]}),(0,n.jsxs)("div",{className:"w-1/3 flex flex-col border-r border-light-grey-2 text-center",children:[(0,n.jsx)("span",{className:"text-dark-grey mt-3 header-sm uppercase",children:"Playtime"}),(0,n.jsx)("span",{className:"text-universal roman-md mt-2",children:(0,_.LA)(x)})]}),(0,n.jsxs)("div",{className:"w-1/3 flex flex-col text-center",children:[(0,n.jsx)("span",{className:"text-dark-grey mt-3 header-sm uppercase",children:"Completion"}),(0,n.jsx)("span",{className:"text-universal roman-md mt-2",children:(null==u?void 0:u.skipReason)?(0,n.jsxs)("div",{className:"flex flex-col items-center px-2",children:[(0,n.jsx)("span",{children:"Skipped"}),(0,n.jsx)("span",{className:"text-xs text-dark-grey mt-1 italic break-words leading-tight",title:w,children:w})]}):"".concat(p,"%")}),(null==u?void 0:u.type)===Q.Z.ASSESSMENT||(null==u?void 0:u.type)===Q.Z.MINI_GAME&&(null==u?void 0:u.totalCorrectlyAnswered)&&(null==u?void 0:u.totalAnswered)?(0,n.jsx)("span",{className:"text-universal roman-md-sm",children:"".concat(null==u?void 0:u.totalCorrectlyAnswered,"/").concat(null==u?void 0:u.totalAnswered," Correct")}):null]})]})]})}function z(e){let{activity:s,completed:t,progress:l,playtime:a}=e;return(0,n.jsx)(m.Ay,{theme:"white-tip",interactive:!0,arrow:!0,placement:"top",content:(0,n.jsx)("div",{className:"w-[21.875rem] bg-white border-none bg-opacity-80 text-white text-sm overflow-hidden rounded-md flex shadow-lg mb-4",children:(0,n.jsx)(U,{activity:s,progress:l,playtime:a})}),children:(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsxs)("div",{className:"flex bg-white relative w-[3.125rem] h-[3.125rem]",children:[(0,n.jsx)("div",{className:(0,w.QP)("absolute w-[3.125rem] h-[3.125rem]",t&&"opacity-15"),children:(0,n.jsx)(R.A,{activity:s})}),t?(0,n.jsx)("div",{className:"m-auto",children:(0,n.jsx)("i",{className:"fas fa-check text-success"})}):null]}),t?null:(0,n.jsx)("div",{className:"w-full h-1 bg-light-grey-2 mt-1 rounded overflow-hidden",children:(0,n.jsx)("div",{className:"h-full bg-primary",style:{width:"".concat(l,"%")}})})]})},s.id)}var W=t(96746);function V(e){let{percent:s}=e,t=2*Math.PI*50,l="#E91F12";return s>=50&&(l="#865DEE"),s>=75&&(l="#22C345"),(0,n.jsxs)("div",{className:"relative w-12 h-12",children:[(0,n.jsxs)("svg",{className:"w-full h-full",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{transform:"rotate(-90deg)"},children:[(0,n.jsx)("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:"#f3f3f3",strokeWidth:"7"}),(0,n.jsx)("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:l,strokeWidth:"7",strokeDasharray:"".concat(t,"px"),strokeDashoffset:"".concat((100-s)/100*t,"px")})]}),(0,n.jsxs)("div",{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 mt-[2px] text-center text-universal",children:[(0,n.jsx)("span",{className:"text-sm align-top",children:e.percent}),(0,n.jsx)("span",{className:"text-2xs align-top",children:"%"})]})]})}var K=t(93593);let H=["mini_game","assessment","video","awakening_timed","awakening_focus","awakening_mastery"],Z=["student_name","first_name","last_name","startTime","endTime","progress_percent","total_playtime","is_focused"],J={stop:I.Zn,pause:I.FV,mute:I.Ur,skip:I.ci,kickOut:I._S},Y=e=>{var s,t,l,a,c,d;let{queryParams:u,setQueryParams:p,onSkipClick:x,onRestartClick:h,assignmentQueryResults:f,groupsQueryResults:v}=e,{t:j}=(0,r.Bd)("teachers"),I=(()=>{let{t:e}=(0,r.Bd)("teachers"),s={student_name:e("myAssignments.classProgress.sort.studentName","Student Name"),first_name:e("myAssignments.classProgress.sort.firstName","First Name"),last_name:e("myAssignments.classProgress.sort.lastName","Last Name"),startTime:e("myAssignments.classProgress.sort.started","Started"),endTime:e("myAssignments.classProgress.sort.completed","Completed"),progress_percent:e("myAssignments.classProgress.sort.completion","Completion"),total_playtime:e("myAssignments.classProgress.sort.playtime","Playtime"),is_focused:e("myAssignments.classProgress.sort.focus","Focus")};return Z.map(e=>({label:s[e],value:e}))}
1)(),R=(0,O.Yk)(),[D,L]=(0,o.useState)(null),T=(0,o.useRef)(()=>{}),B=(0,o.useRef)(()=>{}),Q=(0,i.useRouter)(),{loading:G,data:U}=f,z=(null==U||null==(t=U.assignment)||null==(s=t.playerAssignments)?void 0:s.entries)||[],H=null==U||null==(a=U.assignment)||null==(l=a.playerAssignments)?void 0:l.totalPages,Y=["minmax(12.5rem, auto)","minmax(7.5rem, auto)","minmax(7.5rem, auto)","minmax(6.25rem, auto)","minmax(6.25rem, auto)","minmax(12.5rem, 1fr)","minmax(9.375rem, auto)"],ee=e=>()=>{p({sortBy:e,sortDirection:"asc"===u.sortDirection&&u.sortBy===e?"desc":"asc"})};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"rounded-lg border-light-grey-2 border shadow-md",children:[D&&(0,n.jsx)(N.A,{open:!!D,width:"31.25rem",onClose:()=>L(null),height:"25rem",openFnRef:T,closeFnRef:B,children:J[D]&&o.createElement(J[D],{onClose:()=>L(null)})}),(0,n.jsxs)(F.A,{children:[(0,n.jsx)(k.A,{onChange:e=>p({q:e.target.value}),type:"text",value:u.q||"",placeholder:j("myAssignments.classProgress.searchPlaceholder","Search by Student Name"),className:"max-w-[25rem]"}),(0,n.jsx)(b.A,{date:new Date,setDate:e=>console.debug(e)}),(0,n.jsx)(C.A,{placeholder:j("myAssignments.classProgress.sortBy","Sort By"),current:u.sortBy&&I.find(e=>e.value===u.sortBy)||null,optionComparator:(e,s)=>e.value===s.value,optionFormatter:e=>e.label,callback:e=>p({sortBy:e.value}),options:I}),(0,n.jsx)("div",{className:"w-72",children:(0,n.jsx)(A.y,{id:"groups-select",instanceId:"groups-select",name:"groups-select",value:u.groupIds,className:"w-72",placeholder:j("myAssignments.classProgress.groupsPlaceholder","Showing all groups (classes)"),options:((null==(d=v.data)||null==(c=d.myGroups)?void 0:c.entries)||[]).map(e=>{let{name:s,id:t,color:n,numberOfStudents:l}=e;return{value:t,label:s,numberOfMatches:l,color:n}}).sort((e,s)=>e.numberOfMatches===s.numberOfMatches?e.label>s.label:e.numberOfMatches<s.numberOfMatches),onChange:e=>p({groupIds:Array.from(e,e=>{let{value:s}=e;return s})})})})]}),(0,n.jsxs)(E.A,{cols:Y,children:[(0,n.jsxs)(P.A,{onClick:ee("student_name"),className:"cursor-pointer",children:[j("myAssignments.classProgress.columns.student","Student"),"student_name"===u.sortBy&&(0,n.jsx)("i",{className:"fas ".concat("asc"===u.sortDirection?"fa-arrow-up":"fa-arrow-down"," ml-2")})]}),(0,n.jsx)(P.A,{children:j("myAssignments.classProgress.columns.username","Username")}),(0,n.jsxs)(P.A,{onClick:ee("startTime"),className:"cursor-pointer",children:[j("myAssignments.classProgress.columns.started","Started"),"startTime"===u.sortBy&&(0,n.jsx)("i",{className:"fas ".concat("asc"===u.sortDirection?"fa-arrow-up":"fa-arrow-down"," ml-2")})]}),(0,n.jsxs)(P.A,{onClick:ee("total_playtime"),className:"cursor-pointer",children:[j("myAssignments.classProgress.columns.playtime","Playtime"),"total_playtime"===u.sortBy&&(0,n.jsx)("i",{className:"fas ".concat("asc"===u.sortDirection?"fa-arrow-up":"fa-arrow-down"," ml-2")})]}),(0,n.jsxs)(P.A,{onClick:ee("progress_percent"),className:"cursor-pointer",children:[j("myAssignments.classProgress.columns.completion","Completion"),"progress_percent"===u.sortBy&&(0,n.jsx)("i",{className:"fas ".concat("asc"===u.sortDirection?"fa-arrow-up":"fa-arrow-down"," ml-2")})]}),(0,n.jsx)(P.A,{children:j("myAssignments.classProgress.columns.content","Content")}),(0,n.jsx)(P.A,{children:j("myAssignments.classProgress.columns.actions","Actions")}),G?(0,n.jsx)(K.A,{cols:Y,rows:5}):0===z.length?(0,n.jsxs)("div",{className:"py-32 px-8 text-center col-span-full",children:[(0,n.jsx)("h2",{className:"text-2xl font-semibold mb-4",children:j("myAssignments.classProgress.empty.title","No records found")}),(0,n.jsx)("p",{className:"text-gray-600",children:j("myAssignments.classProgress.empty.body","There are no student progress records to display.")})]}):z.map(e=>{var s,t,l,a,r,i,c,d,u;let p=(null==e?void 0:e.isFocused)||null;return(0,n.jsxs)(o.Fragment,{children:[(0,n.jsx)(q.A,{}),(0,n.jsxs)(S.A,{className:"flex gap-4 relative",children:[(0,n.jsx)(M.e,{alt:(null==e||null==(s=e.player)?void 0:s.firstName)||"",imageUrl:(0,g.QY)(null==e||null==(r=e.player)||null==(a=r.student)||null==(l=a.user)||null==(t=l.avatar)?void 0:t.headshotUrl)||"",size:"sm"}),(0,n.jsx)("div",{className:"absolute bottom-0 left-7 -mb-1",children:(0,n.jsx)(m.Ay,{placement:"top",theme:"secondary-tip",animation:"scale-subtle",hideOnClick:!1,content:(0,n.jsxs)("div",{className:"bg-secondary rounded-md text-white p-2 px-3",children:[!0===p?j("myAssignments.classProgress.focus.focused","Focused"):"",!1===
1p?j("myAssignments.classProgress.focus.distracted","Distracted"):"",null===p?j("myAssignments.classProgress.focus.unavailable","Status Unavailable"):""]}),children:(0,n.jsx)("i",{className:(0,w.QP)("fas cursor-pointer-on-hover",!0===p&&"fa-play text-green-400",!1===p&&"fa-octagon text-tomato",null===p&&"fa-circle text-gray-400")})})}),(0,n.jsxs)("span",{className:"my-auto",children:[null==e||null==(i=e.player)?void 0:i.firstName," ",null==e||null==(c=e.player)?void 0:c.lastName]})]}),(0,n.jsx)(S.A,{className:"break-words",children:null==e||null==(d=e.player)?void 0:d.username}),(0,n.jsx)(S.A,{children:y.c9.fromISO(null==e?void 0:e.startTime).toFormat("MMM dd, y")}),(0,n.jsx)(S.A,{children:(0,_.LA)((null==e?void 0:e.reportedPlaytimeSec)||0)}),(0,n.jsx)(S.A,{children:(0,n.jsx)(V,{percent:X(e)})}),(0,n.jsx)(S.A,{className:"flex gap-2 flex-wrap py-2",children:(0,n.jsx)($,{activities:null==e?void 0:e.playerActivities})}),(0,n.jsxs)(S.A,{className:"flex space-x-4",children:[(0,n.jsx)("button",{title:j("myAssignments.classProgress.actions.skip","Skip"),onClick:x(null==e||null==(u=e.currentActivity)?void 0:u.id),className:"text-blue-500 hover:text-blue-700 transition",children:(0,n.jsx)("i",{className:"fas fa-forward"})}),(0,n.jsx)("button",{title:j("myAssignments.classProgress.actions.restart","Restart"),onClick:h(null==e?void 0:e.id),className:"text-blue-500 hover:text-blue-700 transition",children:(0,n.jsx)("i",{className:"fas fa-rotate-left"})}),(0,n.jsx)("button",{title:j("myAssignments.classProgress.actions.performance","Performance"),onClick:(e=>()=>{Q.push("/my-assignments/".concat(Q.query.id,"?tab=question-results&q=").concat(null==e?void 0:e.firstName," ").concat((null==e?void 0:e.lastName)||""))})(null==e?void 0:e.player),className:"text-blue-500 hover:text-blue-700 transition",children:(0,n.jsx)("i",{className:"fas fa-chart-column"})})]})]},null==e?void 0:e.id)})]})]}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)(C.A,{className:"mt-4",placeholder:j("myAssignments.filters.pageSizePlaceholder","Page Size"),options:R,current:(0,O.pf)(u.pageSize||20,R),callback:e=>p({pageSize:e.value}),optionFormatter:e=>e.label}),(0,n.jsx)(W.A,{className:"mt-4 ml-auto",currentPage:u.page||1,totalPages:H||1,onPageNext:()=>p({page:(u.page||1)+1}),onPagePrev:()=>p({page:(u.page||1)-1}),onPageNumber:e=>p({page:e})})]})]})},X=e=>(null==e?void 0:e.progressPercent)||0;function $(e){let{activities:s}=e,t=(0,o.useMemo)(()=>p()(s,e=>e.type&&H.includes(e.type)),[s]),l=(0,o.useMemo)(()=>t.length>0?h()(t,[e=>{var s;let{assignmentActivity:t}=e;return null!=(s=null==t?void 0:t.order)?s:1/0},e=>{let{startedAt:s}=e;if(!s)return 1/0;let t=j()(s).unix();return isNaN(t)?1/0:t}]):[],[t]);return(0,n.jsx)(n.Fragment,{children:l.filter(f.hu).map(e=>(0,n.jsx)(z,{activity:e,completed:e.completedAt||100===e.progressPercent,progress:e.progressPercent,playtime:e.reportedPlaytimeSec},e.id))})}var ee=t(68190),es=t(11062);let et=e=>{let{onSendLinkToLMS:s,onSendScoresToLMS:t,onDownloadScoresCSV:l,onPreviewAsStudent:a,onDeleteAssignment:i}=e,{t:c}=(0,r.Bd)("teachers"),[d,u]=(0,o.useState)(!1),{providersData:p}=(0,es.L)();return(0,n.jsx)(m.Ay,{placement:"right",visible:d,theme:"secondary-tip",animation:"scale-subtle",arrow:!0,interactive:!0,hideOnClick:!0,onClickOutside:()=>u(!1),content:(0,n.jsxs)("div",{className:"py-4 bg-secondary rounded-xl shadow-lg",children:[(0,n.jsx)("p",{className:"text-white text-center main-bold my-2",children:"More Options"}),(0,n.jsxs)("div",{className:"p-3 px-4 justify-left flex gap-2 cursor-pointer hover:bg-secondary-900",onClick:()=>{s(),u(!1)},children:[(0,n.jsx)("i",{className:"fas fa-link my-auto w-6 text-center text-secondary-200"}),(0,n.jsxs)("p",{className:"mt-1 text-white button-sm",children:["Send Link to"," ",p&&p.length>1?"LMS":"Google Classroom"]})]}),(0,n.jsxs)("div",{className:"p-3 px-4 justify-left flex gap-2 cursor-pointer hover:bg-secondary-900",onClick:()=>{t(),u(!1)},children:[(0,n.jsx)("i",{className:"fas fa-tachometer-alt my-auto w-6 text-center text-secondary-200"}),(0,n.jsxs)("p",{className:"mt-1 text-white button-sm",children:["Send Scores to"," ",p&&p.length>1?"LMS":"Google Classroom"]}
1)]}),(0,n.jsxs)("div",{className:"p-3 px-4 justify-left flex gap-2 cursor-pointer hover:bg-secondary-900",onClick:()=>{l(),u(!1)},children:[(0,n.jsx)("i",{className:"fas fa-download my-auto w-6 text-center text-secondary-200"}),(0,n.jsx)("p",{className:"mt-1 text-white button-sm",children:" Download Scores CSV"})]}),(0,n.jsxs)("div",{className:"p-3 px-4 justify-left flex gap-2 cursor-pointer hover:bg-secondary-900",onClick:()=>{a(),u(!1)},children:[(0,n.jsx)("i",{className:"fas fa-eye my-auto w-6 text-center text-secondary-200"}),(0,n.jsx)("p",{className:"mt-1 text-white button-sm",children:" Preview as Student"})]}),(0,n.jsxs)("div",{className:"p-3 px-4 justify-left flex gap-2 cursor-pointer hover:bg-secondary-900",onClick:()=>{i(),u(!1)},children:[(0,n.jsx)("i",{className:"fas fa-trash my-auto w-6 text-center text-red-400"}),(0,n.jsx)("p",{className:"mt-1 text-white button-sm",children:" Delete Assignment"})]})]}),children:(0,n.jsxs)("button",{onClick:()=>u(!d),className:"text-cta hover:cta-hover transition px-2 py-1",children:[(0,n.jsx)("i",{className:"far text-xl fa-circle-ellipsis"})," ",c("myAssignments.liveView.more","More")]})})};var en=t(55114),el=t(96104),ea=t(96972),er=t(55777),ei=t(51854),eo=t(77598),ec=t(24918),ed=t(69961),em=t(61915),eu=t(82959),ep=t(25342),ex=t(83353),eh=t(72981),eg=t(73694),ef=t(85255),ey=t(60449),ev=t.n(ey),ej=t(13731),eA=t.n(ej),ew=t(93803),eb=t.n(ew),eN=t(50333),eC=t.n(eN),ek=t(30833),eS=t(32988),eP=t.n(eS);let eF=e=>{let{children:s,isLocked:t,className:l,iconClassName:a,...r}=e;return t?(0,n.jsxs)("div",{...r,className:eP()("inline-flex items-center",l),children:[(0,n.jsx)("figure",{className:eP()("flex flex-shrink-0 absolute z-10 w-6 -ml-3",a),children:(0,n.jsx)("img",{alt:"Lock icon",src:"/svg/lock3.svg"})}),s]}):(0,n.jsx)(n.Fragment,{children:s})};var eq=t(12364),eE=t.n(eq);let eI=()=>({width:ev()(window,"innerWidth",0),height:ev()(window,"innerHeight",0)}),e_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300,s=eI(),[t,n]=(0,o.useState)(s),l=eE()(()=>{n(eI())},e);return(0,o.useEffect)(()=>{if(window)return window.addEventListener("resize",l),()=>{window&&window.removeEventListener("resize",l)}},[]),t};var eO=t(11653),eM=t(91174);let eR=e=>{let{activityQuestion:s}=e;return(0,n.jsx)("div",{className:"flex pt-3 pb-5 overflow-auto classy-scroll",style:{maxWidth:"62.5rem"},children:eb()(h()(s.question.answers,e=>e.choiceNum),e=>(0,n.jsx)("div",{className:"w-1/4 mr-2",children:(0,n.jsxs)("div",{className:eP()({"text-green-400":e.isCorrect,"text-tomato":!e.isCorrect}),children:[(0,n.jsx)(ef.h0,{html:e.answer.replace("[IMAGE]","")}),(0,n.jsx)("hr",{className:"my-2"}),eb()(p()(h()(s.answers,e=>{let{player:s}=e;return s.firstName}),s=>{let{answerId:t}=s;return t===e.id}),e=>{let{player:s}=e;return(0,n.jsxs)("div",{children:[s.firstName," ",s.lastName]},s.id)})]})},e.id))})};var eD=t(80367),eL=t.n(eD);let eT=e=>{let{activityQuestion:s}=e,{t}=(0,r.Bd)("teachers"),l=h()(eb()(s.answers,e=>{let{answersMap:s,answersMapGraded:t,questionScoreCard:n}=e;return{...e,answersMap:s&&JSON.parse(s),answersMapGraded:t&&JSON.parse(t),questionScoreCard:n&&JSON.parse(n)}}),e=>{let{player:s}=e;return s.firstName}),a=JSON.parse(ev()(s,"question.scoreCard","{}"));return(0,n.jsx)("div",{className:"flex pt-3 pb-5 overflow-auto classy-scroll",style:{maxWidth:"62.5rem"},children:(0,n.jsxs)("table",{className:"border",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{className:"border"}),eL()(a?Object.keys(a).length:0,e=>(0,n.jsx)("td",{className:"font-semibold border text-center p-1",children:t("myAssignments.questionResults.openEnded.answerColumn","Answer {answerNumber}",{answerNumber:e+1})},e))]})}),(0,n.jsxs)("tbody",{children:[(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{className:"text-right font-semibold border p-1",children:t("myAssignments.questionResults.openEnded.correctAnswer","Correct Answer â")}),eb()(a,(e,s)=>(0,n.jsx)("td",{className:"text-center border p-1",children:e},s))]}),(0,n.jsx)("tr",{children:(0,n.jsx)("td",{className:"font-semibold border p-1",children:t("myAssignments.questionResults.openEnded.studentName","Student Name â")})}),eb()(l,e=>(0,n.jsxs)("tr",{children:[(0,n.jsxs)("td",{className:"text-center border p-1",children:[e.player.firstName," ",e.player.lastName]}),eb()(a,(s,l)=>e&&e.answersMap?(0,n.jsx)("td",{className:eP()("text-center border p-1",{"text-green-400":e.answersMapGraded[l],"text-tomato":!e.answersMapGraded[l]}),children:e.answersMap[l]},l):(0,n.jsx)("td",{className:"text-center border p-1",children:t("myAssignments.questionResults.answers.notApplicable","N/A")},l))]},e.player.id))]})]})})},eB=e=>null!=e?"".concat(eC()(e),"%"):"",eQ=e=>{let{groupIds:s,queryParams:t,numStudents:l,hasFilters:a,onClearClick:i}=e,{t:o}=(0,r.Bd)("teachers");if(!a)return null;
1let c=s.length,d=t.q;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(S.A,{className:"w-[2%] sticky top-0 left-0 z-30 bg-white",children:"\xa0"}),(0,n.jsx)(S.A,{className:"min-w-[28.125rem] max-w-[28.125rem] sticky top-0 z-30 bg-white",children:"\xa0"}),(0,n.jsxs)(S.A,{className:"py-2 sticky top-0 z-30 bg-white",style:{gridColumn:"span ".concat(l)},children:[c&&d?(0,n.jsx)("span",{children:(0,n.jsx)(r.x6,{t:o,i18nKey:"myAssignments.questionResults.filters.groupsAndSearch",defaults:"{groupCount, plural, one {Filtering by students in group} other {Filtering by students in groups}} and showing search results for <0>{query}</0>",values:{groupCount:c,query:d},components:[(0,n.jsx)("strong",{},"0")]})}):c?(0,n.jsx)("span",{children:o("myAssignments.questionResults.filters.groups","{groupCount, plural, one {Filtering by students in group} other {Filtering by students in groups}}",{groupCount:c})}):d?(0,n.jsx)("span",{children:(0,n.jsx)(r.x6,{t:o,i18nKey:"myAssignments.questionResults.filters.search",defaults:"Showing search results for <0>{query}</0>",values:{query:d},components:[(0,n.jsx)("strong",{},"0")]})}):(0,n.jsx)("span",{}),d||c?(0,n.jsxs)(ek.A,{onClick:i,className:"hover:underline",borderWidth:"0",bgColor:"transparent",py:"1",children:[(0,n.jsx)("i",{className:"fas fa-times"})," ",o("myAssignments.questionResults.filters.clear","clear")]}):(0,n.jsx)("span",{})]}),(0,n.jsx)(q.A,{})]})},eG=e=>{let{hasFilters:s,showStudents:t,assignment:l,hasPlayers:a,assignmentDataLoading:i,noMatches:o,showEmptyLastColumn:c}=e,{t:d}=(0,r.Bd)("teachers");return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(P.A,{className:"pl-6 sticky top-0 left-0 z-40",children:d("myAssignments.questionResults.columns.activities","Activities")}),!s&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(P.A,{className:"flex sticky top-0 z-30",children:(0,n.jsx)("span",{className:"mx-auto",children:d("myAssignments.questionResults.columns.numberAnswered","Number Answered")})}),(0,n.jsx)(P.A,{className:"flex sticky top-0 z-30",children:(0,n.jsx)("span",{className:"mx-auto",children:d("myAssignments.questionResults.columns.numberCorrect","Number Correct")})}),(0,n.jsx)(P.A,{className:"flex sticky top-0 z-30",children:(0,n.jsx)("span",{className:"mx-auto",children:d("myAssignments.questionResults.columns.percentCorrect","Percent Correct")})})]}),t&&eb()(l&&l.playerAssignments&&l.playerAssignments.entries||[],e=>{let{player:s}=e;return(0,n.jsx)(P.A,{className:"flex sticky top-0 z-30",children:(0,n.jsx)("span",{className:"mx-auto",children:d("myAssignments.questionResults.columns.studentName","{lastName}, {firstName}",{lastName:s.lastName||"",firstName:s.firstName||""})})},s.id)}),t&&!a?(0,n.jsx)(P.A,{className:"flex flex-col p-3 sticky top-0 z-30",children:(0,n.jsx)("span",{className:"text-gray-500",children:d("myAssignments.questionResults.students.noneJoined","No students have joined.")})}):t&&i?(0,n.jsx)(P.A,{className:"flex flex-col p-3 sticky top-0 z-30",children:(0,n.jsx)("span",{className:"text-gray-500",children:d("myAssignments.questionResults.loading","Loading...")})}):t&&a&&o&&!i?(0,n.jsx)(P.A,{className:"flex flex-col p-3 sticky top-0 z-30",children:(0,n.jsx)("span",{className:"text-gray-500",children:d("myAssignments.questionResults.students.noMatches","No students match the filters.")})}):c?(0,n.jsx)(P.A,{className:"sticky top-0 z-30",children:"\xa0"}):null,(0,n.jsx)(q.A,{})]})};function eU(e){let{assignment:s,showStudents:t,playerAssignmentEntries:l,showEmptyLastColumn:a,headerColSpan:i,orderedActivities:c}=e,{t:d}=(0,r.Bd)("teachers"),m=c.reduce((e,s)=>e+(s.totalAnswered||0),0),u=c.reduce((e,s)=>e+(s.totalCorrectlyAnswered||0),0),p=m>0?u/m*100:0,x=(0,o.useMemo)(()=>t&&(null==l?void 0:l.length)?l.map(e=>{var s;let t=null==(s=e.player)?void 0:s.id,n=0,l=0;c.forEach(e=>{e.questions&&e.questions.forEach(e=>{var s;
1let a=null==(s=e.answers)?void 0:s.find(e=>{var s;return(null==(s=e.player)?void 0:s.id)===t});a&&null!==a.isCorrect&&(n++,!0===a.isCorrect&&l++)})});let a=n>0?l/n*100:0;return{id:e.id,percentCorrect:a}}):[],[t,l,c]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(S.A,{className:"text-left bg-[#F6FAFC] flex h-full pl-4 sticky left-0 z-20",children:(0,n.jsx)("span",{className:"my-auto ml-2 main-bold",children:d("myAssignments.questionResults.summary.allActivities","All Activities")})}),Array.from({length:i-3}).map((e,s)=>(0,n.jsx)(S.A,{className:"bg-[#F6FAFC] h-full",children:"\xa0"},s)),(0,n.jsx)(q.A,{}),(0,n.jsxs)(S.A,{className:"py-2 flex sticky left-0 z-20 bg-white",children:[(0,n.jsx)("i",{className:"fas fa-arrow-turn-down-right text-light-grey-3 mr-2 my-auto ml-2 pl-4"}),(0,n.jsx)("span",{className:"my-auto",children:d("myAssignments.questionResults.summary.allQuestionsIn","All questions in {assignmentName}",{assignmentName:(null==s?void 0:s.name)||""})})]}),(0,n.jsx)(S.A,{className:"text-center main-bold flex h-full border-l border-light-grey-1",children:(0,n.jsx)("span",{className:"m-auto",children:m})}),(0,n.jsx)(S.A,{className:"text-center main-bold flex h-full border-l border-light-grey-1",children:(0,n.jsx)("span",{className:"m-auto",children:u})}),(0,n.jsxs)(S.A,{className:"text-center flex flex-col h-full main-bold border-l border-light-grey-1",children:[(0,n.jsx)("span",{className:"mx-auto mt-auto",children:eB(p)}),(0,n.jsx)(eV,{className:"mt-auto",percent:p})]}),t&&x.map(e=>{let{percentCorrect:s,id:t}=e;return(0,n.jsxs)(S.A,{className:"text-center flex flex-col h-full main-bold border-l border-light-grey-1",children:[(0,n.jsx)("span",{className:"mx-auto mt-auto",children:eB(s)}),(0,n.jsx)(eV,{className:"mt-auto",percent:s})]},t)}),a&&(0,n.jsx)(S.A,{children:"\xa0"}),(0,n.jsx)(q.A,{})]})}let ez=e=>{let{title:s,subtitle:t,headerColSpan:l,activity:a,isExpanded:r,onToggleExpand:i}
1=e,o="mini_game"===ev()(a,"type");return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(S.A,{className:"text-left bg-[#F6FAFC] flex flex-col h-full py-4 pl-4 cursor-pointer hover:bg-[#EDF4F7] transition-colors duration-200 sticky left-0 z-20",onClick:i,children:[(0,n.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,n.jsx)("span",{className:"my-auto ml-2 main-bold",children:s}),(0,n.jsx)("i",{className:"fas fa-chevron-down mr-4 transition-transform duration-200 text-gray-500 ".concat(r?"rotate-180":"")})]}),(0,n.jsxs)("span",{className:"flex mt-2",children:[o&&(0,n.jsx)(R.A,{activity:a,showTooltip:!1}),(0,n.jsx)("span",{className:"my-auto ml-2 main-semibold",children:t})]})]}),Array.from({length:l-3}).map((e,s)=>(0,n.jsx)(S.A,{className:"bg-[#F6FAFC] h-full cursor-pointer hover:bg-[#EDF4F7] transition-colors duration-200",onClick:i,children:"\xa0"},s)),(0,n.jsx)(q.A,{})]})},eW=e=>{let{activity:s,_orderedPlayerActivities:t,hasFilters:l,showStudents:a,showEmptyLastColumn:i,hasQuestions:c,hasAnswers:d,isMiniGame:m,questionMiniGame:u,playerAssignmentEntries:p}=e,{t:x}=(0,r.Bd)("teachers"),h=(0,o.useMemo)(()=>a&&(null==p?void 0:p.length)&&c?p.map(e=>{var t;let n=null==(t=e.player)?void 0:t.id,l=0,a=0;s.questions&&s.questions.forEach(e=>{var s;
1let t=null==(s=e.answers)?void 0:s.find(e=>{var s;return(null==(s=e.player)?void 0:s.id)===n});t&&null!==t.isCorrect&&(l++,!0===t.isCorrect&&a++)});let r=l>0?a/l*100:0;return{id:e.id,percentCorrect:r,totalAnswered:l,totalCorrect:a}}):[],[a,p,s.questions,c]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(S.A,{className:"flex sticky left-0 z-20 bg-white",children:[(0,n.jsx)("i",{className:"fas fa-arrow-turn-down-right text-light-grey-3 mr-2 my-auto ml-2 pl-4"}),(0,n.jsx)("span",{children:c&&d?x("myAssignments.questionResults.activity.allQuestions","All questions in this activity"):m&&u&&!d?x("myAssignments.questionResults.activity.awaitingData","Awaiting question data for this activity"):x("myAssignments.questionResults.activity.notReported","Question data is not reported for this activity.")})]}),!l&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(S.A,{className:"text-center main-bold flex h-full border-l border-light-grey-1",children:(0,n.jsx)("span",{className:"m-auto",children:s.totalAnswered})}),(0,n.jsx)(S.A,{className:"text-center main-bold flex h-full border-l border-light-grey-1",children:(0,n.jsx)("span",{className:"m-auto",children:s.totalCorrectlyAnswered})}),(0,n.jsxs)(S.A,{className:"text-center flex flex-col h-full main-bold border-l border-light-grey-1",children:[(0,n.jsx)("span",{className:"mx-auto mt-auto",children:eB(s.percentCorrect)}),(0,n.jsx)(eV,{className:"mt-auto",percent:s.percentCorrect})]})]}),a&&h.map(e=>{let{percentCorrect:s,id:t,totalAnswered:l}=e;return(0,n.jsxs)(S.A,{className:"text-center flex flex-col h-full main-bold border-l border-light-grey-1",children:[(0,n.jsx)("span",{className:"mx-auto mt-auto",children:c&&l>0?eB(s):c&&0===l?eB(0):""}),(0,n.jsx)(eV,{className:"mt-auto",percent:c&&l>0?s:0})]},t)}),i&&(0,n.jsx)(S.A,{className:"",children:"\xa0"}),(0,n.jsx)(q.A,{})]})};function eV(e){let{percent:s,className:t}=e;return null==s?null:(0,n.jsx)("div",{className:(0,w.QP)("w-full h-2 bg-light-grey-2",t),children:(0,n.jsx)("div",{className:"h-full",style:{width:"".concat(s,"%"),background:"linear-gradient(to right, #".concat(s<50?"E8554C":"2ABD42",", #").concat(s<50?"E6AC41":"4178E5",")")}})})}function eK(e){var s;let{activity:t,_assignment:l,playerAssignmentEntries:a,headerColSpan:i,hasFilters:c,showStudents:d,showEmptyLastColumn:m,_expandAssignmentQuestionId:u,_toggleExpandAssignmentQuestionId:p,isExpanded:x,onToggleExpand:g}=e,{t:f}=(0,r.Bd)("teachers"),y=eA()(t.playerActivities||[],e=>{let{player:s}=e;return s.id}),v=eb()(a,e=>{let{player:s}=e;return ev()(y[s.id],"[0]",{})}),j=h()(t.questions||[],e=>{let{order:s}=e;return s}
1),A="mini_game"===ev()(t,"type"),w="awakening_activity"===ev()(t,"type")&&"focus"===ev()(t,"awakeningActivity.type"),b=A&&ev()(t,"miniGame.type",""),N="video"===ev()(t,"miniGame.type",""),C=j.filter(e=>ev()(e,"answers",[]).length>0),k=A?C:j,P=k.length>0,F=C.length>0,E=!!j.find(e=>!!e.groupingId);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ez,{title:t.learningObjective?(null==(s=t.learningObjective.subject)?void 0:s.standard)?"".concat(t.learningObjective.subject.standard," - ").concat(t.learningObjective.learningObjective):"".concat(t.learningObjective.ngssDciName," - ").concat(t.learningObjective.learningObjective):f("myAssignments.questionResults.activity.untitled","Activity"),subtitle:"assessment"==t.type?f("myAssignments.questionResults.activity.assessmentSubtitle","{questionCount, plural, one {# question assessment} other {# questions assessment}}",{questionCount:t.numOfQuestions||0}):"mini_game"===t.type?N?f("myAssignments.questionResults.activity.videoLessonSubtitle","Video Lesson: {gameName}",{gameName:ev()(t.miniGame,"game","")}):ev()(t.miniGame,"game",""):w?f("myAssignments.questionResults.activity.awakeningFocus","Awakening Focus"):"awakening_activity"===t.type?f("myAssignments.questionResults.activity.awakeningActivity","Awakening Activity"):null,headerColSpan:i,activity:t,isExpanded:x,onToggleExpand:g}),(0,n.jsx)(eW,{activity:t,_orderedPlayerActivities:v,hasFilters:c,showStudents:d,showEmptyLastColumn:m,hasQuestions:P,hasAnswers:F,isMiniGame:A,questionMiniGame:"question"===b,playerAssignmentEntries:a}),x&&(0,n.jsxs)(n.Fragment,{children:[E&&(0,n.jsx)(eZ,{questions:k,playerAssignmentEntries:a,headerColSpan:i,groupingId:"pre",hasFilters:c,showStudents:d,showEmptyLastColumn:m,_expandAssignmentQuestionId:u,_toggleExpandAssignmentQuestionId:p}),P&&E&&k.filter(e=>!e.groupingId).length>0&&(0,n.jsx)(eH,{title:f("myAssignments.questionResults.sections.inGameQuestions","In Game Questions"),icon:"fas fa-gamepad text-medium-purple",headerColSpan:i}),P&&k.filter(e=>!e.groupingId).map(e=>{let s=eA()(e.answers,e=>{let{player:s}=e;return s.id}),t=eb()(a,e=>{let{player:t}=e;return ev()(s[t.id],"[0]",{})});return(0,n.jsxs)(o.Fragment,{children:[(0,n.jsx)(S.A,{className:"py-2 pl-6 sticky left-0 z-20 bg-white",children:(0,n.jsxs)("div",{className:"flex items-start gap-2",children:[(0,n.jsx)("i",{onClick:s=>null==p?void 0:p(e.id),className:"far transition-transform duration-200 fa-chevron-right cursor-pointer mt-1 ".concat(u===e.id?"rotate-90":"rotate-0")}),(0,n.jsx)("div",{className:"text-gray-700 flex-1",children:(0,n.jsx)(ef.h0,{html:e.question.question})})]})}),!c&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(S.A,{className:"text-center main-bold flex h-full border-l border-light-grey-1",children:(0,n.jsx)("span",{className:"m-auto",children:e.totalAnswered})}),(0,n.jsx)(S.A,{className:"text-center main-bold flex h-full border-l border-light-grey-1",children:(0,n.jsx)("span",{className:"m-auto",children:e.totalCorrectlyAnswered})}),(0,n.jsxs)(S.A,{className:"text-center flex flex-col h-full main-bold border-l border-light-grey-1",children:[(0,n.jsx)("span",{className:"mx-auto mt-auto",children:eB(e.percentCorrect)}),(0,n.jsx)(eV,{className:"mt-auto",percent:e.percentCorrect})]})]}),d&&eb()(t,(e,s)=>{let{id:t,isCorrect:l}=e;return(0,n.jsx)(S.A,{className:"text-center h-full flex border-l border-light-grey-1",children:!0===l?(0,n.jsx)("i",{className:"fas fa-2x fa-circle-check text-green-400 m-auto"}):!1===l?(0,n.jsx)("i",{className:"fas fa-2x fa-circle-xmark text-tomato m-auto"}):(0,n.jsx)("span",{className:"main-bold m-auto",children:f("myAssignments.questionResults.answers.notApplicable","N/A")})},"".concat(t,"-").concat(s))}),m&&(0,n.jsx)(S.A,{children:"\xa0"}),(0,n.jsx)(q.A,{}),u===e.id&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(S.A,{className:"py-2 px-2 bg-[#F6FAFC] border-b",style:{gridColumn:"1 / -1"},children:[(0,n.jsx)("span",{className:"my-auto ml-2 main-bold",children:f("myAssignments.questionResults.sections.studentAnswers","Student Answers")}),(0,n.jsx)("div",{className:"ml-2",children:["open_ended_html","open_ended_text"].includes(e.question.format)?(0,n.jsx)(eT,{activityQuestion:e}):(0,n.jsx)(eR,{activityQuestion:e})})]}),(0,n.jsx)(q.A,{})]})]},e.id)}),E&&(0,n.jsx)(eZ,{questions:k,playerAssignmentEntries:a,headerColSpan:i,groupingId:"post",hasFilters:c,showStudents:d,showEmptyLastColumn:m,_expandAssignmentQuestionId:u,_toggleExpandAssignmentQuestionId:p})]})]})}let eH=e=>{let{title:s,icon:t,headerColSpan:l}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(S.A,{className:"text-left bg-[#F6FAFC] flex h-full pl-4",children:(0,n.jsxs)("span",{className:"flex items-center my-auto ml-2",children:[(0,n.jsx)("i",{className:"".concat(t," text-lg mr-2")}),(0,n.jsx)("span",{className:"main-bold",children:s})]})}),Array.from({length:l-3}).map((e,s)=>(0,n.jsx)(S.A,{className:"bg-[#F6FAFC] h-full",children:"\xa0"},s)),(0,n.jsx)(q.A,{})]})},eZ=e=>{let{questions:s,playerAssignmentEntries:t,headerColSpan:l,groupingId:a,hasFilters:i,showStudents:c,showEmptyLastColumn:d,_expandAssignmentQuestionId:m,_toggleExpandAssignmentQuestionId:u}=e,{t:p}=(0,r.Bd)("teachers"),x=s.filter(e=>e.groupingId===a);if(0===x.length)return null;let h="pre"===a?p("myAssignments.questionResults.sections.preGameAssessment","Pre Game Assessment"):p("myAssignments.questionResults.sections.postGameAssessment","Post Game Assessment");return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eH,{title:h,icon:"fas fa-clipboard-list text-shamrock",headerColSpan:l}),x.map(e=>{let s=eA()(e.answers,e=>{let{player:s}=e;return s.id}),l=eb()(t,e=>{let{player:t}=e;return ev()(s[t.id],"[0]",{})});return(0,n.jsxs)(o.Fragment,{children:[(0,n.jsx)(S.A,{className:"py-2 pl-6 sticky left-0 z-20 bg-white",children:(0,n.jsxs)("div",{className:"flex items-start gap-2",children:[(0,n.jsx)(ek.A,{onClick:s=>null==u?void 0:u(e.id),borderWidth:"0",bgColor:"transparent",className:"text-base flex-shrink-0 mt-1",textColor:"summer-sky",children:(0,n.jsx)("i",{className:"far transition-transform duration-200 ".concat(m===e.id?"fa-chevron-down":"fa-chevron-right")})}),(0,n.jsx)("div",{className:"text-gray-700 flex-1",children:(0,n.jsx)(ef.h0,{html:e.question.question})})]})}),!i&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(S.A,{className:"text-center main-bold flex h-full border-l border-light-grey-1",children:(0,n.jsx)("span",{className:"m-auto",children:e.totalAnswered})}),(0,n.jsx)(S.A,{className:"text-center main-bold flex h-full border-l border-light-grey-1",children:(0,n.jsx)("span",{className:"m-auto",children:e.totalCorrectlyAnswered})}),(0,n.jsxs)(S.A,{className:"text-center flex flex-col h-full main-bold border-l border-light-grey-1",children:[(0,n.jsx)("span",{className:"mx-auto mt-auto",children:eB(e.percentCorrect)}),(0,n.jsx)(eV,{className:"mt-auto",percent:e.percentCorrect})]})]}),c&&eb()(l,(e,s)=>{let{id:t,isCorrect:l}=e;return(0,n.jsx)(S.A,{className:"text-center h-full flex border-l border-light-grey-1",children:!0===l?(0,n.jsx)("i",{className:"fas fa-2x fa-circle-check text-green-400 m-auto"}):!1===l?(0,n.jsx)("i",{className:"fas fa-2x fa-circle-xmark text-tomato m-auto"}):(0,n.jsx)("span",{className:"main-bold m-auto",children:p("myAssignments.questionResults.answers.notApplicable","N/A")})},"".concat(t,"-").concat(s))}),d&&(0,n.jsx)(S.A,{children:"\xa0"}),(0,n.jsx)(q.A,{}),m===e.id&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(S.A,{className:"py-2 px-2 bg-gray-100 border-b",style:{gridColumn:"1 / -1"},children:[(0,n.jsx)("h5",{className:"text-gray-700 font-semibold text-xs md:text-sm lg:text-base mb-2",children:p("myAssignments.questionResults.sections.studentAnswers","Student Answers")}),["open_ended_html","open_ended_text"].includes(e.question.format)?(0,n.jsx)(eT,{activityQuestion:e}):(0,n.jsx)(eR,{activityQuestion:e})]}),(0,n.jsx)(q.A,{})]})]},e.id)})]})};function eJ(e){var s,t,i,c,d,m,u,p,x;let{assignmentId:f,downloadOnClick:y,queryParams:v,setQueryParams:j,groupsQueryResults:w}=e,{t:b}=(0,r.Bd)("teachers"),[N,C]=(0,o.useState)(null),[S,P]=(0,o.useState)(new Set),q=(0,o.useRef)(!1),{userData:_}=(0,es.L)(),O=(null==_||null==(s=_.currentTeacher)?void 0:s.isPaid)||!1,[M,R]=(0,o.useState)(!0),[D,L]=(0,o.useState)([]),T=e=>{C(N===e?null:e)},B={id:f,search:M?v.q:"",groupIds:v.groupIds,sort:"last_name|asc"},{data:Q,loading:G,refetch:U}=(0,l.I)(I.Gs,{skip:!f,variables:B,fetchPolicy:"no-cache",pollInterval:1e4,notifyOnNetworkStatusChange:!1}),{data:z}=(0,l.I)(I.ro,{skip:!f,variables:{id:f},fetchPolicy:"no-cache"}),W=ev()(Q,"assignment",{learningObjective:{},assignedPlayersCounts:{totalCount:0,joinedCount:0,completedCount:0,studentUsers:[]},playerAssignments:{entries:[]},activities:[]}),V=((null==W||null==(t=W.assignedPlayersCounts)?void 0:t.joinedCount)||0)>0,K=(null==W||null==(c=W.playerAssignments)||null==(i=c.entries)?void 0:i.length)===0,H=M&&(!V||K),[Z,J]=(0,a.n)(I.TX),Y=(0,o.useCallback)(async()=>{await Z({variables:{id:f}}),U()},[f,Z,U]);(0,o.useEffect)(()=>{q.current||(q.current=!0,Y())},[Y]);
1let X=M&&(D.length||v.q),$=(null==W||null==(m=W.playerAssignments)||null==(d=m.entries)?void 0:d.length)||0,ee=M?6+$:6,et=ev()(W,"playerAssignments.entries",[]),en=((null==z||null==(u=z.awakeningActivityFocusQuestions)?void 0:u.awakeningFocusActivities)||[]).filter(g.hu).map((e,s)=>{var t;return{activity:e,key:(null==(t=e.learningObjective)?void 0:t.id)||"unknown-".concat(s)}}),el=Object.entries(Object.fromEntries(Object.entries(eA()(en,e=>e.key)).map(e=>{let[s,t]=e;return[s,t.map(e=>e.activity)]}))).map((e,s)=>{let t,n,l,a,[r,i]=e;if(!i||0===i.length)return null;let o=i[0];if(!o)return null;let c=o.learningObjective;if(!c)return null;if(1===i.length){let e=i[0];if(!e)return null;t=e.questions||[],n=e.answers||[],l=e.totalAnswers||0,a=e.totalCorrectAnswers||0}else{let e=[],s=[];l=0,a=0,i.forEach(t=>{t&&(t.questions&&e.push(...t.questions.filter(g.hu)),t.answers&&s.push(...t.answers.filter(g.hu)),l+=t.totalAnswers||0,a+=t.totalCorrectAnswers||0)}),t=Array.from(new Map(e.map(e=>[e.id,e])).values()),n=s}let{learningObjective:d}={learningObjective:c},m=eA()(n,"questionId"),u=t.filter(g.hu).map(e=>{if(!e.id)return null;let s=(m[e.id]||[]).map(e=>{if(!e)return null;let s=e.answerId;if(!s&&e.answersMap)try{let t="string"==typeof e.answersMap?JSON.parse(e.answersMap):e.answersMap,n=Object.values(t);n.length>0&&(s=String(n[0]))}catch(s){console.warn("Failed to parse answersMap:",e.answersMap)}return{...e,answersMap:"string"==typeof e.answersMap?e.answersMap:JSON.stringify(e.answersMap),answersMapGraded:"string"==typeof e.answersMapGraded?e.answersMapGraded:JSON.stringify(e.answersMapGraded),questionScoreCard:"string"==typeof e.questionScoreCard?e.questionScoreCard:JSON.stringify(e.questionScoreCard),answerId:s}}).filter(g.hu),t=new Set(s.map(e=>{var s;return null==e||null==(s=e.player)?void 0:s.id}).filter(g.hu)),n=[...s,...et.filter(g.hu).filter(e=>{var s;let n=null==e||null==(s=e.player)?void 0:s.id;return n&&!t.has(n)}).map(s=>{var t;return{id:"placeholder-".concat(e.id,"-").concat(null==s||null==(t=s.player)?void 0:t.id),questionId:e.id,answerId:null,answersMap:"{}",answersMapGraded:"{}",questionScoreCard:"{}",isCorrect:null,player:null==s?void 0:s.player}})].filter(g.hu);return{id:e.id,question:{...e},answers:n,learningObjective:c,activity:{learningObjective:c},totalCorrectlyAnswered:n.filter(e=>!0===e.isCorrect).length,totalAnswered:n.filter(e=>null!==e.isCorrect).length,percentCorrect:(n.filter(e=>null!==e.isCorrect).length>0?n.filter(e=>!0===e.isCorrect).length/n.filter(e=>null!==e.isCorrect).length:0)*100}}).filter(g.hu);return{id:"focus-".concat(null==c?void 0:c.id,"-").concat(s),order:9999+s,type:"awakening_activity",awakeningActivity:{type:"focus"},numOfQuestions:u.length,totalAnswered:l,totalCorrectlyAnswered:a,percentCorrect:l>0?a/l*100:0,learningObjective:c,questions:u,playerActivities:[]}}),ea=((null==W?void 0:W.activities)||[]).filter(g.hu).filter(e=>"awakening_activity"!==e.type),er=ea.filter(e=>{var s;return null==(s=e.learningObjective)?void 0:s.id}),ei=ea.filter(e=>{var s;return!(null==(s=e.learningObjective)?void 0:s.id)}),eo=[...Object.entries(eA()(er.filter(e=>{var s;return null==(s=e.learningObjective)?void 0:s.id}),e=>e.learningObjective.id)).map(e=>{let[s,t]=e;if(!t||0===t.length)return null;if(1===t.length)return t[0];let n=t[0],l=t.reduce((e,s)=>({totalAnswered:(e.totalAnswered||0)+(s.totalAnswered||0),totalCorrectlyAnswered:(e.totalCorrectlyAnswered||0)+(s.totalCorrectlyAnswered||0)}),{totalAnswered:0,totalCorrectlyAnswered:0}),a=Object.values(t.flatMap(e=>e.questions||[]).filter(g.hu).reduce((e,s)=>{var t,n;if(!(null==s?void 0:s.id))return e;let l=e[s.id];return(!l||((null==(t=s.answers)?void 0:t.length)||0)>
1((null==(n=l.answers)?void 0:n.length)||0))&&(e[s.id]=s),e},{})),r=t.flatMap(e=>e.playerActivities||[]);return{...n,totalAnswered:l.totalAnswered||0,totalCorrectlyAnswered:l.totalCorrectlyAnswered||0,percentCorrect:(l.totalAnswered||0)>0?(l.totalCorrectlyAnswered||0)/(l.totalAnswered||1)*100:0,numOfQuestions:a.length,questions:a,playerActivities:r}}).filter(g.hu),...ei,...el].filter(e=>null!=e),ec=h()(eo.filter(g.hu),e=>e.order||0),ed=!O,em=(0,o.createRef)(),eu=(0,o.createRef)(),ep=e_();(0,o.useEffect)(()=>{let e=em.current,s=eu.current;if(s&&e){let t=Array.from(e.getElementsByClassName("paywall-blur")||[]),n=t[0],l=t[t.length-1];if(n&&l&&e&&s){let t=n.parentElement,a=l.parentElement;if(t&&a){let n=t.offsetLeft,l=a.offsetLeft,r=a.offsetWidth,i=e.offsetLeft;s.style.left="".concat(i+n,"px"),s.style.width="".concat(l+r-n,"px")}}}},[eu,em,ep]);let ex=ed?"gray-500":"tomato",eh=["minmax(28.125rem, 28.125rem)",...X?[]:["minmax(10.625rem, auto)","minmax(10.625rem, auto)","minmax(10.625rem, auto)"],...M?Array($).fill("minmax(10.625rem, auto)"):[],...H?["auto"]:[]],eg=ed?eO.A:o.Fragment;return(0,n.jsxs)("div",{className:"overflow-hidden w-full",children:[(0,n.jsxs)(F.A,{children:[(0,n.jsx)("div",{className:"flex flex-col w-full md:w-auto",children:(0,n.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center",children:[(0,n.jsx)(k.A,{onChange:e=>j({q:e.currentTarget.value}),type:"text",value:v.q||"",placeholder:b("myAssignments.questionResults.filters.searchPlaceholder","Filter students by name"),className:"max-w-[25rem]",disabled:!M}),(0,n.jsx)("div",{className:"w-full md:w-64 lg:w-72 pl-0 md:pl-3 mt-2 md:mt-0 z-50",children:(0,n.jsx)(A.y,{disabled:!M,id:"groups-select",instanceId:"groups-select",name:"groups-select",value:v.groupIds,className:"w-full",placeholder:b("myAssignments.questionResults.filters.groupsPlaceholder","Showing all groups (classes)"),options:((null==(x=w.data)||null==(p=x.myGroups)?void 0:p.entries)||[]).map(e=>{let{name:s,id:t,color:n,numberOfStudents:l}=e;return{value:t,label:s,numberOfMatches:l,color:n}}).sort((e,s)=>e.numberOfMatches===s.numberOfMatches?e.label>s.label:e.numberOfMatches<s.numberOfMatches),onChange:e=>j({groupIds:Array.from(e,e=>{let{value:s}=e;return s})})})}),(0,n.jsxs)("div",{className:"flex items-center ml-2",children:[(0,n.jsx)("div",{className:"my-auto flex align-middle",children:(0,n.jsx)(eM.A,{value:M,callback:()=>R(!M)})}),(0,n.jsx)("div",{className:"my-auto main-sm main-semibold ml-2 w-24",children:b("myAssignments.questionResults.toggle.showStudents","Show Students")})]})]})}),(0,n.jsx)("div",{className:"hidden lg:block flex-grow"}),(0,n.jsxs)("div",{className:"flex pl-0 md:pl-3 mt-3 md:mt-0",children:[(0,n.jsxs)(ek.A,{className:"text-sm mr-4",onClick:Y,bgColor:"transform",borderColor:"summer-sky",textColor:"summer-sky",py:"3",children:[(0,n.jsx)("i",{className:"far fa-redo mr-2"})," ",b("myAssignments.questionResults.actions.refresh","Refresh")]}),(0,n.jsx)(eF,{isLocked:ed,children:(0,n.jsxs)(ek.A,{...{textColor:ex,borderColor:ex,style:ed?{cursor:"not-allowed"}:{},onClick:ed?void 0:y},id:"live-view-assignment-report-download",bgColor:"transparent",className:"text-sm",py:"3",children:[(0,n.jsx)("i",{className:"fas fa-download mr-2"}),b("myAssignments.questionResults.actions.download","Download")]})})]})]}),(0,n.jsx)(eg,{children:(0,n.jsx)("div",{className:"relative bg-white",children:G||J.loading?(0,n.jsx)("p",{className:"text-xl text-gray-600 font-semibold transform animate-pulse p-6",children:b("myAssignments.questionResults.loading","Loading...")}):(0,n.jsx)("div",{className:"overflow-auto md:pb-4 lg:pb-6",style:{maxHeight:"calc(100vh - 300px)"},children:(0,n.jsxs)(E.A,{cols:eh,scrollable:!1,className:"bg-white px-0 rounded border-0 text-xs lg:text-sm grid-rows-[2.5rem] auto-rows-[1fr_minmax(3.375rem,_auto)]",children:[(0,n.jsx)(eQ,{groupIds:D,queryParams:v,numStudents:$,hasFilters:X,onClearClick:e=>{j({q:""},"replaceIn"),L([])}}),(0,n.jsx)(eG,{hasFilters:X,showStudents:M,assignment:W,hasPlayers:V,assignmentDataLoading:G,noMatches:K,showEmptyLastColumn:H}),(0,n.jsx)(eU,{assignment:W,showStudents:M,playerAssignmentEntries:et,showEmptyLastColumn:H,headerColSpan:ee,orderedActivities:ec}),eb()(ec,e=>(0,n.jsx)(eK,{playerAssignmentEntries:et,activity:e,headerColSpan:ee,hasFilters:X,showEmptyLastColumn:H,showStudents:M,_assignment:W,_expandAssignmentQuestionId:N,_toggleExpandAssignmentQuestionId:T,isExpanded:!S.has(e.id||""),onToggleExpand:()=>{var s;return s=e.id||"",void P(e=>{let t=new Set(e);return t.has(s)?t.delete(s):t.add(s),t})}},e.id))]})})})})]})}var eY=t(42759),eX=t(90558);let e$=[{labelKey:"myAssignments.detail.tabs.classProgress",id:"class-progress"},{labelKey:"myAssignments.detail.tabs.questionResults",id:"question-results"}],e0={mute:el.A,skip:eo.A,restart:ea.A,studentInstructions:d.A,sendScoresToLMS:ei.A,sendLinkToLMS:er.A,selectProvider:eg.A,deleteAssignment:en.A},e2={DEFAULT:{width:"400px",height:"400px"},sendLinkToLMS:{width:"600px",height:"600px"},sendScoresToLMS:{width:"900px",height:"900px"},studentInstructions:{width:"670px",height:"750px"},CANVAS:{width:"670px",height:"640px"},CLEVER:{width:"670px",height:"680px"},CLASSLINK:{width:"670px",height:"640px"},SCHOOLOGY:{width:"670px",height:"680px"},JOIN_LINK:{width:"670px",height:"580px"},TEACHER_CODE:{width:"670px",height:"640px"}
1,GOOGLE_CLASSROOM:{width:"670px",height:"640px"},GG4L:{width:"670px",height:"720px"},deleteAssignment:{width:"450px",height:"450px"}},e1=e=>e2[e]?e2[e]:e2.DEFAULT,e5=()=>{var e,s,t,d,m;let{t:u}=(0,r.Bd)("teachers"),{locale:p}=(0,r.Ym)(),x=(()=>{let{t:e}=(0,r.Bd)("teachers"),s={"myAssignments.detail.tabs.classProgress":e("myAssignments.detail.tabs.classProgress","Class Progress"),"myAssignments.detail.tabs.questionResults":e("myAssignments.detail.tabs.questionResults","Question Results")};return e$.map(e=>({id:e.id,name:s[e.labelKey]}))})(),[h,g]=(0,ex.useQueryParams)({q:ex.StringParam,tab:(0,ex.withDefault)(ex.StringParam,"class-progress"),sortBy:(0,ex.withDefault)(ex.StringParam,"student_name"),sortDirection:(0,ex.withDefault)(ex.StringParam,"asc"),playerActivityId:ex.StringParam,playerAssignmentId:ex.StringParam,popup:ex.StringParam,selectedAccessType:ex.StringParam,isNew:ex.BooleanParam,page:(0,ex.withDefault)(ex.NumberParam,1),pageSize:(0,ex.withDefault)(ex.NumberParam,10),groupIds:(0,ex.withDefault)(ex.ArrayParam,[]),provider:ex.StringParam}),f=(0,o.useCallback)(e=>{g(s=>({...s,...e}),"replaceIn")},[g]),y=(0,i.useRouter)(),v=y.query.id,j=(0,l.I)(I.Lu,{variables:{id:v,includeDeleted:!0},skip:!v||"new"===v}),A=null==(e=j.data)?void 0:e.assignment,w=(0,l.I)(I.sD,{variables:{id:v,includeDeleted:!0,sort:"".concat(h.sortBy,"|").concat(h.sortDirection),page:h.page,pageSize:h.pageSize,search:h.q,groupIds:h.groupIds},fetchPolicy:"no-cache",skip:!v||"new"===v||"class-progress"!==h.tab,pollInterval:(null==A?void 0:A.status)==="COMPLETED"||j.error?0:1e4}),b=null==(t=j.data)||null==(s=t.assignment)?void 0:s.activities,N=(0,l.I)(em.OY),C=(0,o.useMemo)(()=>{var e,s;return Object.fromEntries(((null==(s=N.data)||null==(e=s.myGroups)?void 0:e.entries)||[]).filter(e=>null==e?void 0:e.id).map(e=>[null==e?void 0:e.id,(null==e?void 0:e.name)||void 0]))},[null==(m=N.data)||null==(d=m.myGroups)?void 0:d.entries]),k=(0,o.useMemo)(()=>(0,ee.MN)({groups:null==A?void 0:A.groups,targetUsers:null==A?void 0:A.targetUsers,groupNameById:C,labels:{group:u("myAssignments.audience.unnamedGroup","Group"),unnamedUser:u("myAssignments.audience.unnamedStudent","Unnamed Student")}}),[null==A?void 0:A.groups,null==A?void 0:A.targetUsers,C,u]),S=(0,o.useMemo)(()=>(0,ee.XK)(k,{allStudents:u("myAssignments.audience.allStudents","All Students"),formatGroups:e=>u("myAssignments.detail.audience.groupCount","{groupCount, plural, one {# Group} other {# Groups}}",{groupCount:e}),formatStudents:e=>u("myAssignments.detail.audience.studentCount","{studentCount, plural, one {# Student} other {# Students}}",{studentCount:e})}),[k,u]),P=(0,o.useMemo)(()=>k.length?(0,ee.WW)(k):"",[k]),[F]=(0,a.n)(I.FV,{refetchQueries:[{query:I.sD,variables:{id:v}}]}),[q]=(0,a.n)(I.Zn,{refetchQueries:[{query:I.sD,variables:{id:v}}]}),[E]=(0,a.n)(I.ci,{refetchQueries:[{query:I.sD,variables:{id:v}}]}),[_]=(0,a.n)(I._S,{refetchQueries:[{query:I.sD,variables:{id:v}}]}),O=(0,o.useCallback)(e=>()=>{e&&f({popup:"restart",playerAssignmentId:e})},[f]),M=(0,o.useCallback)(e=>()=>{e&&f({popup:"skip",playerActivityId:e})},[f]),D=(0,o.useCallback)(()=>{y.push("".concat(ed.H$,"/teachers/assignments/").concat(v,"/download"))},[v,y]),L=(0,o.useRef)(null),T=["sendLinkToLMS","sendScoresToLMS"].includes(h.popup||""),B=(0,o.useMemo)(()=>!h.provider&&T?eg.A:h.popup?e0[h.popup]:o.Fragment,[h.provider,h.popup,T]),Q=(0,o.useMemo)(()=>{switch(h.tab){case"class-progress":return(0,n.jsx)(Y,{onSkipClick:M,onRestartClick:O,queryParams:h,setQueryParams:f,assignmentQueryResults:w,groupsQueryResults:N});case"question-results":return(0,n.jsx)(eJ,{assignmentId:v,downloadOnClick:D,queryParams:h,setQueryParams:f,groupsQueryResults:N});default:return null}},[M,O,w,v,D,h,f,N]),G=(0,o.useCallback)(e=>{f({provider:e.id})},[f]);return j.error&&!A?(0,n.jsxs)("div",{className:"p-4",children:[(0,n.jsx)(eh.vx,{className:"mr-auto",icon:"circle-arrow-left",href:"/my-assignments",text:u("myAssignments.detail.backToList","Back to My Assignments"),dataAnalyticsId:"my-assignments:back-to-my-assignments"}),(0,n.jsxs)("div",{className:"w-full flex flex-col items-center justify-center py-12 px-6 bg-white text-center mt-4",children:[(0,n.jsx)("span",{className:"h4 text-universal",children:u("myAssignments.detail.notFound.title","Assignment not available")}),(0,n.jsx)("span",{className:"main text-dark-grey max-w-xl mt-2",children:u("myAssignments.detail.notFound.body","We could not load this assignment. It may have been deleted, or you may
1no longer have access to it. Head back to My Assignments to continue.")})]})]}):(0,n.jsxs)("div",{className:"p-4",children:[(0,n.jsx)(eY.A,{open:!!h.popup,contentClassName:"overflow-y-auto",width:e1(h.selectedAccessType||h.popup).width,height:e1(h.selectedAccessType||h.popup).height,onClose:()=>f({popup:null,selectedAccessType:null,isNew:null}),children:(0,n.jsx)(B,{handleProviderClick:G,assignmentId:v,provider:h.provider,assignmentIds:[v],onLinkAssignmentClick:()=>{f({popup:"sendLinkToLMS"})},queryParams:h,setQueryParams:f,onClose:()=>f({popup:null,selectedAccessType:null,isNew:null}),onConfirm:async()=>{"skip"===h.popup?(await E({variables:{playerActivityId:h.playerActivityId}}),f({playerActivityId:null,popup:null,isNew:null}),c.Ay.success(u("myAssignments.detail.toast.activitySkipped","Player activity skipped successfully")),w.refetch()):"restart"===h.popup?(await _({variables:{playerAssignmentId:h.playerAssignmentId}}),f({playerAssignmentId:null,popup:null,isNew:null}),c.Ay.success(u("myAssignments.detail.toast.assignmentRestarted","Player assignment restarted successfully")),w.refetch()):"studentInstructions"===h.popup?f({playerAssignmentId:null,popup:null,isNew:null}):"deleteAssignment"===h.popup&&(c.Ay.success(u("myAssignments.detail.toast.assignmentDeleted","Assignment deleted successfully")),y.push("/my-assignments"))}})}),(0,n.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-4 flex-1 min-w-0 mr-4",children:[(0,n.jsx)(eh.vx,{className:"mr-auto",icon:"circle-arrow-left",href:"/my-assignments",text:u("myAssignments.detail.backToList","Back to My Assignments"),dataAnalyticsId:"my-assignments:back-to-my-assignments"}),(0,n.jsxs)("p",{className:"h3 font-semibold flex items-center gap-2",children:[(null==A?void 0:A.name)||u("myAssignments.detail.untitled","Assignment"),(null==A?void 0:A.deletedAt)?(0,n.jsx)("span",{className:"px-2 py-0.5 rounded-full bg-red-100 text-red-700 text-2xs uppercase tracking-wide",children:u("myAssignments.detail.deletedBadge","Deleted")}):null]}),(0,n.jsxs)("div",{className:"flex gap-4 items-center",children:[(null==A?void 0:A.status)==="SCHEDULED"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("i",{className:"fas fa-clock text-secondary"}),(0,n.jsx)("div",{className:"main-md",children:u("myAssignments.statusLabels.SCHEDULED","Scheduled")})]}),(null==A?void 0:A.status)==="LIVE"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"w-12 h-12 flex",children:(0,n.jsx)("div",{className:"live-pulse m-auto"})}),(0,n.jsx)("div",{className:"main-md",children:u("myAssignments.statusLabels.LIVE","Live")})]}),(null==A?void 0:A.status)==="COMPLETED"&&(0,n.jsx)("div",{className:"main-md",children:u("myAssignments.statusLabels.COMPLETED","Completed")}),(null==A?void 0:A.status)==="PAUSED"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("i",{className:"fas fa-pause text-secondary"}),(0,n.jsx)("div",{className:"main-md",children:u("myAssignments.statusLabels.PAUSED","Paused")})]}),(0,n.jsx)("span",{className:"text-[#5B5B5B]",children:"|"}),(0,n.jsx)("div",{className:"main-md",children:(()=>{let e=null==A?void 0:A.startDate,s=null==A?void 0:A.endDate;return e&&s?u("myAssignments.detail.dateRange","{startDate} - {endDate}",{startDate:(0,r.Yq)(e,p,{month:"short",day:"2-digit",timeZone:"UTC"}),endDate:(0,r.Yq)(s,p,{month:"short",day:"2-digit",year:"numeric",timeZone:"UTC"})}):""})()}),(0,n.jsx)("i",{className:"fas fa-calendar-days text-secondary"}),(0,n.jsx)("span",{className:"text-[#5B5B5B]",children:"|"}),j.loading?(0,n.jsx)("div",{className:"main-md",children:(0,n.jsx)("span",{className:"animate-pulse bg-gray-200 rounded px-2",children:u("myAssignments.detail.loading","Loading...")})}):P?(0,n.jsx)(eX.A,{title:P,children:(0,n.jsx)("div",{className:"main-md max-w-[18rem] truncate",children:S})}):(0,n.jsx)("div",{className:"main-md",children:S})]}),(0,n.jsxs)("div",{className:"border-t border-light-grey-2 flex flex-col mb-4",children:[(0,n.jsx)("div",{className:"header-sm uppercase text-medium-grey my-4",children:u("myAssignments.detail.activities","Activities")}),(0,n.jsx)("div",{className:"flex gap-2 overflow-x-auto pb-2",children:j.loading?[1,2,3].map(e=>(0,n.jsx)("div",{className:"rounded-sm w-[50px] h-[50px] bg-gray-300 animate-pulse flex-shrink-0"},e)):null==b?void 0:b.map(e=>(0,n.jsx)("div",{className:"flex-shrink-0",children:(0,n.jsx)(R.A,{showTooltip:!0,activity:e})},null==e?void 0:e.id))})]})]}),(0,n.jsxs)("form",{hidden:!0,id:"preview-as-student-form",ref:L,action:"".concat(ed.H$,"/awake
1ning_redirect/assignment"),method:"post",target:"_blank",children:[(0,n.jsx)("input",{type:"hidden",name:"assignment_id",value:v}),(0,n.jsx)("input",{type:"hidden",name:"teacher_play",value:"true"})]}),(0,n.jsxs)("div",{className:"flex flex-col items-end gap-4 flex-shrink-0",children:[(0,n.jsx)(eh.vx,{icon:"pencil",href:(0,eu.wA)("/my-assignments/edit",{returnTo:(0,eu.Cq)(y),assignmentId:v}),text:u("myAssignments.detail.editAssignment","Edit Assignment"),dataAnalyticsId:"my-assignments:edit-assignment"}),(0,n.jsx)(eh.vx,{icon:"chart-bar",onClick:()=>{f({popup:"studentInstructions",selectedAccessType:window.localStorage.getItem("default-student-instructions")})},text:u("myAssignments.detail.studentInstructions","Student Instructions"),dataAnalyticsId:"my-assignments:student-instructions"}),(0,n.jsx)(et,{onSendLinkToLMS:()=>{f({popup:"sendLinkToLMS",assignmentId:v,provider:h.provider})},onSendScoresToLMS:()=>{f({popup:"sendScoresToLMS",assignmentId:v,provider:h.provider})},onDownloadScoresCSV:D,onPreviewAsStudent:()=>{L.current&&L.current.submit()},onDeleteAssignment:()=>{f({popup:"deleteAssignment"})}})]})]}),(0,n.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,n.jsx)(ec.Ay,{className:"bg-white p-1 border border-light-grey-2 rounded-full",tabs:x,activeTab:h.tab||null,onTabClick:e=>{f({tab:e.id})}}),(0,n.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-2 text-center",children:[(0,n.jsx)("button",{onClick:()=>{q({variables:{id:v,isStopped:!(null==A?void 0:A.stoppedAt)}})},className:"w-20 h-20 flex rounded-full bg-white border border-light-grey-2 hover:shadow-md transition justify-center text-red-500 items-center",children:(0,n.jsx)("i",{className:"fas text-[20px] fa-".concat((null==A?void 0:A.stoppedAt)?"play":"stop")})}),(0,n.jsx)("span",{className:"header-sm uppercase text-medium-grey text-center",children:(null==A?void 0:A.stoppedAt)?u("myAssignments.detail.controls.start","Start"):u("myAssignments.detail.controls.stop","Stop")})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-2 text-center",children:[(0,n.jsx)("button",{onClick:()=>{F({variables:{id:v,isPaused:!(null==A?void 0:A.pausedAt)}})},className:"w-20 h-20 flex rounded-full bg-white border border-light-grey-2 hover:shadow-md transition justify-center text-secondary items-center",children:(0,n.jsx)("i",{className:"fas text-[20px] fa-".concat((null==A?void 0:A.pausedAt)?"play":"pause")})}),(0,n.jsx)("span",{className:"header-sm uppercase text-medium-grey text-center",children:(null==A?void 0:A.pausedAt)?u("myAssignments.detail.controls.unpause","Unpause"):u("myAssignments.detail.controls.pause","Pause")})]})]})]}),Q]})};e5.getLayout=e=>(0,n.jsx)(ep.O,{pageKey:"my-students",className:"overflow-x-hidden",HeaderProps:{},children:e});let e6=e5},78185:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/my-assignments/[id]",function(){return t(69276)}])},79608:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});var n=t(6029),l=t(76264);function a(e){let{className:s,canSort:t,sortDirection:a,onClick:r,children:i,colSpan:o=1}=e;return(0,n.jsxs)("div",{className:(0,l.QP)("w-full flex items-center text-[0.8125rem] leading-tight text-left uppercase px-4 py-3 bg-[#F6FAFC] font-semibold text-[hsl(var(--foreground))] tracking-wide",r&&"cursor-pointer",s),style:{gridColumn:o>1?"span ".concat(o):void 0},onClick:r,children:[i,t?(0,n.jsx)("i",{className:"fas fa-chevron-".concat("asc"==a?"up":"down"," ml-2")}):null]})}},80367:(e,s,t)=>{var n=t(17085),l=t(34715),a=t(98888),r=Math.min;e.exports=function(e,s){if((e=a(e))<1||e>0x1fffffffffffff)return[];var t=0xffffffff,i=r(e,0xffffffff);s=l(s),e-=0xffffffff;for(var o=n(i,s);++t<e;)s(t);return o}},82517:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});var n=t(6029),l=t(76264);function a(e){let{cols:s,className:t,children:a,scrollable:r=!0}=e;return(0,n.jsx)("div",{className:(0,l.QP)(r?"w-full":"",r&&"overflow-x-auto"),children:(0,n.jsx)("div",{style:{gridTemplateColumns:s.join(" ")},className:(0,l.QP)("w-full border-t border-light-grey-2 grid auto-rows-auto items-stretch justify-items-stretch",t),children:a})})}},83391:(e,s,t)=>{var n=t(50956);e.exports=function(e,s){var t=[];return n(e,function(e,n,l){s(e,n,l)&&t.push(e)}),t}},93593:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});var n=t(6029),l=t(55729),a=t(5700);let r=e=>{let{cols:s,rows:t=5,twoLine:r=!1}=e;return(0,n.jsx)(n.Fragment,{children:[...Array(t)].map((e,t)=>{let i=t%2==0,o="".concat(i?"bg-white":"bg-[#FAFBFC]"," py-4 px-4 border-t border-light-grey-2");return(0,n.jsx)(l.Fragment,{children:s.map((e,s)=>(0,n.jsx)(a.A,{className:o,children:r?(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,n.jsx)("div",{className:"bg-gray-200 rounded h-4 w-3/4 animate-pulse"}),(0,n.jsx)("div",{className:"bg-gray-200 rounded h-3 w-1/2 animate-pulse"})]}):(0,n.jsx)("div",{className:"bg-gray-200 rounded h-4 w-full animate-pulse"})},s))},t)})})}},93803:(e,s,t)=>
1{var n=t(88601),l=t(68988),a=t(93733),r=t(91544);e.exports=function(e,s){return(r(e)?n:a)(e,l(s,3))}}},e=>{e.O(0,[883,1864,7718,2203,8588,2563,4170,4575,7314,5879,7983,836,6619,5753,2573,2734,2981,5342,6161,1816,636,6593,8792],()=>e(e.s=78185)),_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.