PageSourceSearch

https://edia.app/static/js/page-B6r7_k3h.js

js edia.app collected 2026-10-01 15:11:08 UTC 9,291 bytes, 2 lines download raw bytes

1import{d as J,l as K,r as S,n as v,j as t,S as $,am as Q,H as U,t as Z,L as _,eL as Y}from"./index-C_WF_BJq.js";import{n as w}from"./benchmarks-wU_dLkgh.js";import{e as x}from"./object-geCv8b2G.js";import{D as ee}from"./DownloadButton-Bc1hEw_Z.js";import{S as te}from"./SortTable-D6PZB-Xi.js";import{m as N,a as y,s as se,b as D,p as ae,c as re}from"./tableFormatters-CmNbxmO8.js";import{b as ne}from"./BoxPlotChart-BUROqNut.js";import{a3 as oe,a4 as ce,P as ie,S as L,a as O,b as F,c as G,d as M,a5 as A}from"./index-CIwrb30O.js";import{a as V,i as I,dz as me,dA as le,dB as ue,dC as de,dD as he,dE as fe}from"./DataProviderContext-CBDYCNcF.js";import{d as pe}from"./school-hooks-6EUkEa-d.js";import{a as C}from"./utils-CzBtCSbB.js";/* empty css                  */import"./moment-SmB3XSuS.js";import"./file-download-ClRLabp_.js";import"./index-tMgwUWAz.js";import"./csv-HrEr3YiY.js";import"./Icon-DVT53fS0.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"./Avatar-DtGDmkuP.js";import"./createLucideIcon-07Q-ETyz.js";import"./loader-circle-Ck1hktYW.js";import"./Link-17SPgqEk.js";import"./sart-B3jih3T5.js";import"./users-BgQSeBqf.js";import"./tslib.es6-CMwweBXX.js";import"./common-DrIemzIo.js";import"./standards-D-5mjPXc.js";/* empty css                  */import"./prep_levels-DAO8iQsN.js";import"./arrow-left-DoUYf9FM.js";import"./circle-alert--qStYFqi.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"./index-DgoKnyni.js";function be(o,m,i){const s={byBenchmark:{},bySchool:{},byTeacher:{},byClass:{},byStudent:{}};for(const c of o){const l=new Set;for(const r of c.teachers){const n=new Set;for(const a of r.classes){if(a.subject!==m)continue;l.add(r.uuid),n.add(a.uuid);const p=new Set;for(const u of a.students)p.add(u),s.byStudent[u]={benchmarkResults:{}};s.byClass[a.uuid]={name:a.name,studentIds:p,benchmarkResults:{}}}n.size&&(s.byTeacher[r.uuid]={name:r.name,classIds:n,fetchResults:()=>i(r.uuid),studentResultsLoaded:!1,benchmarkResults:{}})}l.size&&(s.bySchool[c.id]={name:c.name,teacherIds:l,benchmarkResults:{}})}return s}const P=t.jsx("span",{children:"–"}),T=t.jsx("div",{className:"loader"});function ke(o){const m=fe(),[i,s]=S.useState({});return{teacherGrades:i,fetchForTeacher:S.useCallback(async c=>{if(i[c])return;const l=await m(o,c);s(r=>({...r,[c]:l}))},[m,o,i])}}function xe(o,m){const i=pe(),s=m.filter(n=>n.subject===o),{data:c}=he(s),{teacherGrades:l,fetchForTeacher:r}=ke(o);return S.useMemo(()=>{if(!c)return null;const n=be(i,o,r);for(const[a,{bySchool:p,byTeacher:u,byClass:h}]of x(c)){n.byBenchmark[a]=Object.values(h).map(e=>e.grade);for(const[e,{grade:f}]of x(p))e in n.bySchool&&(n.bySchool[e].benchmarkResults[a]=f);for(const[e,{grade:f}]of x(u))e in n.byTeacher&&(n.byTeacher[e].benchmarkResults[a]=f);for(const[e,{grade:f}]of x(h))e in n.byClass&&(n.byClass[e].benchmarkResults[a]=f)}for(const[a,{benchmarks:p,classes:u}]of x(l))if(n.byTeacher[a]){n.byTeacher[a].studentResultsLoaded=!0;for(const h of u)for(const e of h.students)e.uuid in n.byStudent&&(n.byStudent[e.uuid].name=e.name,n.byStudent[e.uuid].firstName=e.firstName,n.byStudent[e.uuid].lastName=e.lastName);for(const[h,e]of x(p))for(const[f,d]of x(e.students))if(f in n.byStudent&&(d!=null&&d.completed)){const b=d.score.metric/d.score.target;n.byStudent[f].benchmarkResults[h]=b}}return n},[c,r,i,o,l])}function ye(o,m,i,s){const{benchmarkSeasons:c}=I();if(!s)return null;const l=[{name:"School",val:"name",width:"50%",formatter:N(se,T),sortOn:"sortName"},...c.map(a=>({name:w(a,m),val:a,width:`${40/c.length}%`,formatter:N(D(ae,P),T),sortOn:`sort${a}`})),{name:"Growth",val:"growth",width:"10%",formatter:N(D(re,P),T),sortOn:"sortGrowth"}];function r(a,p){const u=c.map(b=>{var g;const k=(g=A(i,o,b,m))==null?void 0:g.uuid;return k?a[k]:null});let h=null;const e=u.findIndex(b=>b!=null),f=u.findLastIndex(b=>b!=null);e>=0&&f>=0&&e<f&&(h=u[f]-u[e]);const d={growth:y(h,p),sortGrowth:h??-1/0};for(const[b,k]of u.entries())d[c[b]]=y(k,p),d[`sort${c[b]}`]=k??-1/0;return d}const n=Object.entries(s.bySchool).map(([a,{name:p,benchmarkResults:u,teacherIds:h}])=>({id:a,key:a,name:y(p,!1),sortName:p,...r(u,!1),children:Array.from(h).map(e=>{const{name:f,benchmarkResults:d,classIds:b,fetchResults:k,studentResultsLoaded:g}=s.byTeacher[e];return{key:e,id:e,name:y(f,!1),sortName:f,...r(d,!1),onToggleOpen:j=>{j&&k().catch(R=>Z(R))},children:Array.from(b).map(j=>{const{name:R,benchmarkResults:E,studentIds:z}=s.byClass[j];return{key:j,id:j,name:y(R,!1),sortName:R,...r(E,!1),children:Array.from(z).map(B=>{const{name:q,firstName:W,lastName:H,benchmarkResults:X}=s.byStudent[B];return{key:B,id:B,name:y(q,!g),sortName:[H,W],...r(X,!g)}})}})}})}));return{columns:l,data:n,defaultSort:"sortName",depthLabels:["","Teacher","","Student"]}}function Se({dataPoints:o,label:m}){return t.jsx("div",{className:"min-w-[210px] h-[210px] mt-4 relative hover:z-10",children:t.jsx(ne,{dataset:{series:[{key:"District",buckets:[{values:o??[]}]}]}
1,buckets:[m],yTickValues:[0,.25,.5,.75,1],yTickFormat:i=>Y(i),hideXAxis:!0})})}function ge({subject:o,season:m,schoolYear:i,benchmark:s,benchmarkStats:c,benchmarkDefinition:l}){const r=V(),n=v(),a=!s||n.isBefore(s.testingWindowStart),p=s&&c.byBenchmark[s.uuid];return t.jsxs("div",{className:"benchmarkResult",children:[t.jsx("div",{className:C("benchmarkName",a&&"disabled"),children:w(m,i)}),t.jsx("div",{className:C("benchmarkWindow",a&&"disabled"),children:a?"Not open":`${v(s.testingWindowStart).format("MMM D")} - ${v(s.testingWindowEnd).format("MMM D")}`}),!s&&!l?t.jsx("button",{className:C("btn btn-sm btn-secondary benchmarkResultButton disabled relative","after:content-[attr(data-tooltip)] after:hidden hover:after:block","after:absolute after:left-1/2 after:-translate-x-1/2 after:top-full after:mt-2 after:z-10","after:bg-gray-800 after:px-2 after:py-1 after:text-white after:rounded-[4px] after:text-sm","after:w-[120px]"),disabled:!0,"data-tooltip":"Not yet available. Contact us to create your benchmark.",children:"Assign"}):t.jsx(_,{className:"btn btn-sm btn-secondary benchmarkResultButton",to:s?`${r}/resources/assignments/${s.uuid}`:`${r}/resources/assignments/new`,state:{duplicate:{format:"benchmark",questions:l==null?void 0:l.questions,benchmarkSubject:o,benchmarkSchoolYear:i.toString(),benchmarkSeason:m,name:`${w(m,i)} ${o} Benchmark`},backLink:`${r}/math/benchmarks/${o}`},children:s?"View":"Assign"}),t.jsx(Se,{dataPoints:p,label:w(m,i)})]})}function je({benchmarks:o,benchmarkDefinition:m,subjects:i,selectedSubject:s,setSelectedSubject:c,schoolYears:l,selectedSchoolYear:r,setSelectedSchoolYear:n}){const{benchmarkSeasons:a}=I(),p=de(),u=xe(s,o),h=ye(s,r,o,u);return t.jsxs("div",{className:"districtBenchmarksOverview",children:[t.jsx(U,{children:t.jsx("title",{children:"Edia | Benchmarks"})}),t.jsx(ie,{title:"Benchmarks",subtitle:"Create and view results for seasonal benchmarks across your district",className:"pt-8 px-8",actions:t.jsxs("div",{className:"flex gap-2 items-center",children:[t.jsxs(L,{value:s,onValueChange:c,children:[t.jsx(O,{children:t.jsx(F,{placeholder:"Subject"})}),t.jsx(G,{children:i.map(e=>t.jsx(M,{value:e,children:e},e))})]}),t.jsxs(L,{value:r.toString(),onValueChange:e=>n(parseInt(e)),children:[t.jsx(O,{children:t.jsx(F,{placeholder:"School year"})}),t.jsx(G,{children:l.map(e=>t.jsxs(M,{value:e.toString(),children:[e,"-",e+1]},e))})]}),t.jsx(ee,{getFileContents:async e=>await p(s,r.toString(),e),title:`${r}-${r+1} ${s} Benchmark Results`})]})}),t.jsx("div",{className:"bot",children:h&&u?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"benchmarksCard card outlined",children:a.map((e,f)=>t.jsx(ge,{subject:s,season:e,schoolYear:r,benchmark:A(o,s,e,r),benchmarkStats:u,benchmarkDefinition:m},f))}),s&&t.jsx(te,{className:"cardTable squared resultsTable",...h})]}):t.jsx($,{})})]})}function gt(){const o=V(),{mathRosterSnapshot:m,mathRosterSummary:i,schoolYearStartDate:s}=I(),c=J(),{subject:l}=K(),r=oe(),n=S.useMemo(()=>{const d=ce(i??m,r,null);return r.reduce((b,k)=>b===void 0||(d.get(k)??0)>(d.get(b)??0)?k:b,void 0)},[i,m,r]),a=l&&r.includes(l)?l:n??"",[p,u]=S.useState(()=>v(s).year()),{data:h}=me(),{data:e}=le();if(!h||!e)return t.jsx($,{});const f=Q([v(s).year(),...h.map(d=>parseInt(d.schoolYear))]).slice().sort((d,b)=>b-d);return a?t.jsx(S.Suspense,{fallback:t.jsx($,{}),children:t.jsx(ue,{options:{subject:a},children:t.jsx(je,{benchmarks:h,benchmarkDefinition:e[a],subjects:r,selectedSubject:a,setSelectedSubject:d=>{c(`${o}/math/benchmarks/${d}`,{replace:!0})},schoolYears:f,selectedSchoolYear:p,setSelectedSchoolYear:u},a)})}):t.jsx("p",{children:"No Math subjects are available."})}export{gt as default};
2//# sourceMappingURL=page-B6r7_k3h.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.