1import{c as I,j as s,U as Y,r as f,cm as z,q as w,S as Q,u as L,cn as K,l as U,b6 as G,o as J,P as F,p as V,B as X,dj as E,L as q,am as Z}from"./index-C_WF_BJq.js";import{A as _,U as ss}from"./Assign-oCZn1Vks.js";import{s as T,u as es,a as ts}from"./helpers-CNCkBAoC.js";import{S as H,L as M}from"./StandardBox-DiYWZonP.js";import{l as as}from"./animations-B-kHmYgg.js";import{i as B}from"./Markup-Dfpb7gu2.js";import{a as rs}from"./apiHooks-BLFT02ym.js";import{a as is}from"./AdaptiveQuestionSelector-DpwuM0RI.js";import{r as ns,S as os}from"./StudentCharts-B7F0FqSg.js";import{S as ls}from"./StudentProfileStandardsMinimap-BoQXLEgr.js";import{S as ds}from"./StudentProfileSubjectSelector-Q9KT6lgY.js";/* empty css *//* empty css */import"./ScheduleDemo-WZnFPN75.js";import"./ContactForm-Bn5frNEy.js";import"./react-textarea-autosize.browser.esm-CEjOD1-u.js";import"./objectWithoutPropertiesLoose-Cv5OCJ0e.js";import"./Checkbox-DAivm0kd.js";import"./Icon-DVT53fS0.js";import"./prep_levels-DAO8iQsN.js";import"./ccssCommon-DBJjAr3o.js";import"./common-DrIemzIo.js";import"./standards-D-5mjPXc.js";import"./DataProviderContext-CBDYCNcF.js";import"./AssignmentAdder-BQZqYLhc.js";import"./ai-Z_mVEYdG.js";import"./assignment-Bb2_O5Dm.js";import"./bluebonnet-5UhW2wPy.js";import"./communications-CPr3N3PG.js";import"./ContactForm-nFJhnAqW.js";import"./curriculum-Cz49gruj.js";import"./district-CMgaN5Nj.js";import"./it_onboarding-Duk6QZuq.js";import"./pd-DscbDIKQ.js";import"./problems-DEq45IZ7.js";import"./sart-CWW28Bvf.js";import"./subjects-D-MrSF8L.js";import"./search-Ce6BxiQo.js";import"./SearchBar-Co8iaTuY.js";import"./district_scope-FATnlT4N.js";import"./object-geCv8b2G.js";import"./index-DgoKnyni.js";import"./circle-alert--qStYFqi.js";import"./createLucideIcon-07Q-ETyz.js";import"./sortable.esm-8FGb_Wgn.js";import"./index-ORV2Hlps.js";import"./Result-BZrkM40l.js";import"./ProblemExplanationBody-CJkolFuB.js";import"./DropdownMenu-C3OD1lQa.js";import"./ProblemExplanation-BQOszGq3.js";import"./index-DxC9xRKA.js";import"./QuestionsAnsweredChart-a25f4mxN.js";import"./ChartCard-BHAu2KUH.js";import"./Pill-mXXDObeM.js";import"./Tooltip-D5Yeo7Y3.js";import"./utils-CzBtCSbB.js";import"./Link-17SPgqEk.js";import"./info-bfe59BCu.js";import"./chevron-right-QdD5Q5Xj.js";import"./LineChart-B5BAR2pS.js";import"./ChartTooltip-Cq84conM.js";import"./recharts-BKDtqxk9.js";import"./hoist-non-react-statics.cjs-YvWgwviv.js";import"./array--rEjq1cQ.js";import"./objectSpread2-B5i5h7FH.js";import"./tiny-invariant-BaFNuDhB.js";import"./HistogramChart-Cc-5a-J3.js";const cs=({question:e,history:a})=>{let t;return a.length===0?t=s.jsx("div",{className:"noAnswers",children:"No answers yet"}):t=s.jsx("div",{className:"probs",children:a.map((r,i)=>s.jsx(is,{medium:!0,className:"adaptiveQuestionProblem",p:r},i))}),s.jsxs("div",{className:"standardsStandardQuestion",children:[s.jsx("div",{className:"name",children:e.name}),t]})};function ms(e,a){const{data:t,error:r,mutate:i}=L(["getStudentStandardQuestionsHistory",e,a],async([,...n])=>{const o=await K(...n);for(const u of o.questions)for(const c of u.history)c.givenAnswer=B(c.givenAnswer),c.inkWorkspace=c.inkWorkspace&&B(c.inkWorkspace);return o.questions});return{data:t,error:r,mutate:i}}function us({studentId:e,stdId:a}){var x;const[t,r]=f.useState(!1),{data:i,error:n,mutate:o}=ms(e,a);if(n)return s.jsxs("div",{role:"alert",children:["Couldnât load recorded answers."," ",s.jsx("button",{className:"button small white",onClick:()=>void o(),children:"Retry"})]});if(!i)return s.jsx("div",{className:"standardsStandardQuestions loading",children:s.jsx(Q,{immediate:!0})});const u=[],c=[];for(const d of i)(x=d.history)!=null&&x.length?u.push(d):c.push(d);const p=d=>`${d.question.subjectId}:${d.question.topicId}:${d.question.lessonId}:${d.question.id}`,m=u.map(d=>s.jsx(cs,{...d},p(d)));let l;return c.length&&(l=s.jsxs(s.Fragment,{children:[s.jsxs("button",{className:"bbwrap notSeen",onClick:()=>r(d=>!d),children:[c.length," skill",c.length===1?"":"s"," not seen yet"," ",s.jsx("img",{src:"/caretDown16.svg",alt:"caret",className:w(t&&"show")})]}),t&&c.map(d=>s.jsx("div",{className:"notSeenQuestion",children:d.question.name},p(d)))]})),s.jsxs("div",{className:"standardsStandardQuestions",children:[!u.length&&s.jsx("p",{children:"No recorded answers for this skill yet."}),s.jsx("div",{className:"questions",children:m}),l]})}function ps({studentId:e,stats:a,stdId:t}){const{cls:r,text:i}=T(a,!0),[n,o]=f.useState(null),[u,c]=f.useState(!1),[p,m]=f.useState(0);return f.useEffect(()=>{let l=!0;return o(null),c(!1),z(e,t).then(x=>{l&&o(x.analysis)},()=>{l&&c(!0)}),()=>{l=!1}},[e,t,p]),s.jsxs("div",{className:"standardsSummary",children:[s.jsxs("div",{className:"top",children:[s.jsx("div",{children:"AI Analysis"}),s.jsxs("div",{className:w("statusPill",r),children:[s.jsx("div",{className:w("studentProfileStandardBox",r)}),i]})]}),s.jsx("div",{className:"summary",children:u?s.jsxs(s.Fragment,{children:[s.jsx("p",{children:"AI analysis is unavailable right now. You can still review the studentâs answers below."}),s.jsx("button",{className:"button small white",onClick:()=>m(l=>l+1),children:"Retry analysis"})]}):n!==null?n||"Not enough answer history to analyze yet.":as})]})}function xs({studentId:e,stdId:a,stats:t,standards:r,onEscape:i}){const n=I(),o=rs();return s.jsx(Y,{onEscape:()=>i(),popupId:"standardQuestionsPopup",animation:"slideRight",stopPropagation:!1,children:u=>s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"header",children:[s.jsx("button",{className:"bwrap",onClick:u,children:s.jsx("img",{src:"/close.svg",alt:"close"})}),s.jsx("div",{className:"id",children:a}),o&&s.jsx(_,{selectedStudents:[e],standards:r,questionsSubjects:o,standardId:a,backLink:n.pathname+`?standard=${a}`})]}),s.jsxs("div",{className:"bot",children:[s.jsx(ps,{studentId:e,stdId:a,stats:t}),s.jsxs("div",{className:"skills",children:[s.jsx("div",{className:"label",children:"Skills"}),s.jsx(us,{studentId:e,stdId:a})]})]})]})})}function js({std:e,stats:a,hasPlus:t,setViewStandard:r}){const{text:i}=T(a==null?void 0:a[e.id],t);return s.jsxs("button",{className:"bbwrap prereqRow",onClick:()=>r(e.id),children:[s.jsx(H,{standard:e,stats:a==null?void 0:a[e.id],hasPlus:t}),s.jsxs("div",{className:"name",children:[e.id," â ",e.title]}),s.jsxs("div",{className:"rhs",children:[s.jsx("div",{className:"status",children:i}),s.jsx("img",{src:"/caretRightBlack16.svg",alt:"caret"})]})]})}function hs({standard:e,standards:a,stats:t,hasPlus:r,setViewStandard:i}){let n;const o=Object.keys(a),u=Z((e.prereqs??[]).flatMap(m=>{var l;return[...((l=a[m])==null?void 0:l.prereqs)??[],m]})).filter(m=>a[m]).sort((m,l)=>o.indexOf(m)<o.indexOf(l)?-1:1).reverse();u.length&&(n=s.jsxs("div",{className:"prereqs",children:[s.jsx("div",{className:"label",children:"Pre-requisites"}),s.jsx("div",{className:"standards",children:u.map(m=>s.jsx(js,{std:a[m],stats:t,hasPlus:r,setViewStandard:i},m))}),s.jsx("div",{className:"line"})]}));const{text:c,cls:p}=T(t==null?void 0:t[e.id],r);return s.jsxs("div",{className:"topicStandard",children:[s.jsx("div",{className:"topicStandardMarker",id:`topicStandardMarker-${e.id}`}),s.jsxs("button",{className:"bbwrap top",onClick:()=>i(e.id),children:[s.jsxs("div",{className:"topTop",children:[s.jsx(H,{standard:e,stats:t==null?void 0:t[e.id],hasPlus:r}),s.jsx("div",{className:"text",children:s.jsx("div",{className:"name",children:e.id})}),s.jsxs("div",{className:"rhs",children:[s.jsxs("div",{className:w("statusPill",p),children:[s.jsx("div",{className:w("studentProfileStandardBox",p)}),c]}),s.jsx("img",{src:"/caretRightBlack16.svg",alt:"caret"})]})]}),s.jsx("div",{className:"desc",children:e.desc})]}),n]})}const Ss=({subject:e,topic:a,topicSpec:t,topicClusters:r,standards:i,basePath:n,stats:o,hasPlus:u})=>{const[c,p]=f.useState(!1),m=t.standards.map(j=>i[j]);let l;c&&(l=s.jsx(ss,{close:()=>p(!1)}));const x=s.jsxs("div",{className:"top",children:[s.jsx("div",{className:"name",children:s.jsxs("div",{children:[a," ",a!==t.id&&`(${t.id})`]})}),!r&&s.jsx("img",{src:"/caretrightblack24.svg",alt:"caret"})]});if(r){const j=r.map(S=>{const k=`${n}/standards/${e}/${S.id}`,N=m.filter(v=>S.id===v.clusterId).map(v=>s.jsx(M,{standard:v,stats:o,hasPlus:u},v.id));return N.length===0?null:s.jsxs(q,{className:"cluster",to:k,children:[s.jsx("div",{id:`studentProfileStandardsClusterMarker-${S.id}`,className:"clusterMarker"}),s.jsxs("div",{className:"top",children:[s.jsx("div",{className:"name",children:S.title}),s.jsx("img",{src:"/caretRightBlack16.svg",alt:"caret"})]}),s.jsx("div",{className:"standardsSummary",children:N})]},S.id)});return s.jsxs("div",{className:"studentProfileTopic",children:[x,s.jsx("div",{className:"topicClusters",children:j})]})}const d=m.map(j=>s.jsx(M,{standard:j,stats:o,hasPlus:u},j.id)),g=`${n}/standards/${e}/${t.id}`;return s.jsxs(q,{to:g,className:"studentProfileTopic noClusters",onClick:u?void 0:()=>p(!0),children:[x,s.jsx("div",{className:"standardsSummary",children:d}),l]})};function vs({student:e,subject:a,hasPlus:t}){const{user:{teacher:{schoolYearStartDate:r}}}=F(),{historicalSubjectTimes:i,historicalSubjectStats:n,historicalSubjectCounts:o}=ts(e);return s.jsx(os,{subject:a,schoolYearStartDate:r,historicalSubjectTimes:i,historicalSubjectStats:n,historicalSubjectCounts:o,noPlus:!t})}function fs({student:e,classes:a,district:t,pathPrefix:r=""}){const{subject:i,clusterId:n}=U();J(i+n);const o=`${r}/students/${e.uuid}`,{user:{teacher:u}}=F(),c=es({student:e,subject:i}),p=t||u.plusLevel,{search:m,state:l}=I(),{isMobile:x}=V();let d,g;m?d=X.parse(m.slice(1)).standard:l!=null&&l.cluster&&(g=l.cluster);const[j,S]=f.useState(d),{ready:k,stats:N={},subjectTopics:v={},topicClusters:$,irregularTopics:W,standards:y={}}=c;if(f.useEffect(()=>{if(k&&g){const h=document.getElementById(`studentProfileStandardsClusterMarker-${g}`);if(!h)return;E(h,null,!0)}},[g,k]),!k)return s.jsx(Q,{});let C;if(j&&(C=s.jsx(xs,{standards:y,stats:N[j],studentId:e.uuid,stdId:j,onEscape:()=>S(void 0)})),n){const{name:h,standards:P}=ns({clusterId:n,topicClusters:$,subjectTopics:v,standards:y}),O=s.jsx("div",{className:"studentProfilePageHeader",children:s.jsxs("div",{children:[s.jsx(q,{to:`${o}/standards/${i}`,children:s.jsx("img",{src:"/back.svg",alt:"back"})}),s.jsxs("div",{className:"text",children:[s.jsxs("div",{className:"name",children:[e.firstName," ",e.lastName]}),s.jsxs("div",{children:[n,h!==n&&`: ${h}`]})]})]})}),D=s.jsxs("div",{className:"bot",children:[s.jsx("div",{className:"standards",children:P.map(b=>
1s.jsx(hs,{standard:b,standards:y,stats:N,hasPlus:p,setViewStandard:S},b.id))}),!x&&s.jsx("div",{className:"clusterContents",children:P.map(b=>s.jsx("button",{onClick:()=>E(document.getElementById(`topicStandardMarker-${b.id}`),null,!0),className:"bbwrap",children:b.id},b.id))})]});return s.jsxs("div",{className:"studentProfilePage studentProfileCluster",children:[O,D,C]})}const A=[];for(const h in v){const P=v[h];A.push(s.jsx(Ss,{student:e,subject:i,topic:h,topicSpec:P,topicClusters:$==null?void 0:$[P.id],standards:y,basePath:o,stats:N,hasPlus:p,setViewStandard:S},h))}const R=s.jsx(ds,{classes:a,pathPrefix:`${r}/students/${e.uuid}/standards`});return s.jsxs("div",{className:"studentProfilePage studentProfileStandards",children:[s.jsxs("div",{className:"studentProfilePageHeader",children:[s.jsxs("div",{children:[s.jsx(q,{to:`${r}/students/${e.uuid}`,children:s.jsx("img",{src:"/back.svg",alt:"back"})}),s.jsxs("div",{className:"text",children:[s.jsxs("div",{className:"name","data-sl":"mask",children:[e.firstName," ",e.lastName]}),s.jsx("div",{children:"Standards"})]})]}),!x&&R]}),s.jsxs("div",{className:"bottom",children:[s.jsxs("div",{className:"lhs",children:[x&&R,s.jsx(vs,{student:e,subject:i,hasPlus:p}),s.jsx("div",{className:"topics",children:A})]}),!x&&s.jsx("div",{className:"rhs",children:s.jsx(ls,{standards:y,subjectTopics:v,irregularTopics:W,stats:N,hasPlus:p})})]}),C]})}function Re(e){const{studentId:a}=U(),{data:t}=L(["getStudentProfile",a],([,r])=>G(r));return t?s.jsx(fs,{student:t.student,classes:t.classes,...e}):s.jsx(Q,{})}export{Re as default}; 2//# sourceMappingURL=StudentProfileStandards-BR7Ce4Zi.js.map
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.