1import{j as t,c as C,S as b,N as R,P as z,l as N,u as v,ai as M,r as F,a9 as E,L as P,ad as q,a7 as V,cb as G,B as U,z as H,A as f}from"./index-C_WF_BJq.js";import{U as W,V as Q}from"./Updater-COv6uXqT.js";import{u as $,S as O}from"./StudentStandardQuestionsPopup--w9Yn8oD.js";import{useDuplicateSubjects as J,CreatorBody as K}from"./Creator-7Vilfif4.js";import{u as X}from"./GradesFilters-shIHtwAV.js";import{A as k}from"./Icon-DVT53fS0.js";import{A as Y}from"./ShareAssignmentPopup-B6XKoj39.js";import{d as Z,s as L,F as D,e as _,A as tt,l as et,f as st}from"./index-CNvhqCn-.js";import{r as ot,N as at}from"./AssignmentAdder-BQZqYLhc.js";import{V as rt}from"./View-BN2yPGIr.js";/* empty css */import{g as B,v as nt,h as it}from"./assignment-Bb2_O5Dm.js";import{s as mt}from"./helpers-mmw5hiDd.js";import{a as ct}from"./apiHooks-BLFT02ym.js";import"./index-DxC9xRKA.js";import"./TryAssignment-Bru0-3l4.js";import"./problems-DEq45IZ7.js";import"./TryStandardAssignment-B3LmMVQM.js";import"./ai-Z_mVEYdG.js";import"./district-CMgaN5Nj.js";import"./district_scope-FATnlT4N.js";import"./AssignmentEditor-DK_-iZgg.js";import"./assignmentEditorContext-CAL4LO4f.js";import"./time-cgC4WIKX.js";import"./index-RV5JhC3H.js";import"./es-OE0C7Ny2.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./Calendar-BrMxL6qb.js";import"./InfoTooltip-BL90WiLR.js";import"./SliderSwitch-DWN-GRZW.js";import"./Checkbox-DAivm0kd.js";import"./search-Ce6BxiQo.js";import"./SearchBar-Co8iaTuY.js";import"./class_terms-DUNljeZp.js";import"./GoogleImport-DxAfXscg.js";import"./ClassSubjectSelector-Di5Nqawz.js";import"./DataProviderContext-CBDYCNcF.js";import"./object-geCv8b2G.js";import"./index-DgoKnyni.js";import"./circle-alert--qStYFqi.js";import"./createLucideIcon-07Q-ETyz.js";import"./ContactForm-nFJhnAqW.js";import"./Checkboxes-Ca3wBA8H.js";import"./AdaptiveProgressBar-D_PY9dUi.js";import"./AssignmentNav-52ZBcqUd.js";import"./DarkModeToggle-BzD7AAAA.js";import"./DropdownMenu-C3OD1lQa.js";import"./uiLanguages-BjfBRNjo.js";import"./TryProblem-DQTXiWRl.js";import"./useInkIntention-CSK6x8Gr.js";import"./ProblemExplanation-BQOszGq3.js";import"./Markup-Dfpb7gu2.js";import"./sortable.esm-8FGb_Wgn.js";import"./index-ORV2Hlps.js";import"./ProblemExplanationBody-CJkolFuB.js";import"./TabletSideControls-CMQBJqjl.js";import"./standards-D-5mjPXc.js";import"./DoAssignment-BVwOX72e.js";import"./Assignment-CWp0YGqJ.js";import"./StudentBeliefsSurvey-BD20dTC3.js";import"./ProblemAndChat-DIY5oHwo.js";import"./ReviewResults-CIOIq7SO.js";import"./PopupSurvey-AcNVaZSD.js";import"./ImageUpload-DqPH5CwK.js";import"./StudyTopic-Boduz5BP.js";import"./ccssCommon-DBJjAr3o.js";import"./prep_levels-DAO8iQsN.js";import"./common--UNNVOo2.js";import"./Desmos-BiFpeTKN.js";import"./styles-k-nByIpV.js";import"./file-download-ClRLabp_.js";import"./DownloadButton-Bc1hEw_Z.js";import"./index-tMgwUWAz.js";import"./csv-HrEr3YiY.js";import"./UpdatingMoment-DDtXIDyW.js";import"./Result-BZrkM40l.js";import"./TraitSelector-BlziNmM1.js";import"./AdaptiveQuestionSelector-DpwuM0RI.js";import"./AssignDiagnosticGrades-BlY8FIFL.js";import"./StackedBarChart-BGTI-dOj.js";import"./isEqual-BmUukcUB.js";import"./line-segment-DkbpBl0Y.js";import"./array--rEjq1cQ.js";import"./SortTable-D6PZB-Xi.js";import"./tableFormatters-CmNbxmO8.js";import"./WorksheetBody-CaY83JK7.js";/* empty css *//* empty css */import"./common-7mNNebyJ.js";import"./curriculum-Cz49gruj.js";import"./subjects-D-MrSF8L.js";import"./Notice-Cv-kM2M5.js";import"./bluebonnet-5UhW2wPy.js";import"./communications-CPr3N3PG.js";import"./it_onboarding-Duk6QZuq.js";import"./pd-DscbDIKQ.js";import"./sart-CWW28Bvf.js";import"./ScheduleDemo-WZnFPN75.js";import"./ContactForm-Bn5frNEy.js";import"./react-textarea-autosize.browser.esm-CEjOD1-u.js";import"./objectWithoutPropertiesLoose-Cv5OCJ0e.js";import"./Nav-5Lk6GLK7.js";import"./Avatar-CETl-ZCv.js";import"./phone_state-CTyYCEy-.js";import"./FolderActions-C7llA0gL.js";function T(){function e(){window.parent.postMessage({type:"Classroom",action:"closeIframe"},"*")}return t.jsx(W,{onUpdate:e,onEscape:e,attachmentMode:!0})}function dt(){}function pt(){}
1const lt=({attachmentParams:e})=>{const s=C().state,a=J(s==null?void 0:s.dup),i=$(),{folders:n,createFolder:u}=X();if(!a||!i)return t.jsx(b,{});function x(){R({event:"googleAddonCreate"}),window.parent.postMessage({type:"Classroom",action:"closeIframe"},"*")}return t.jsx("div",{className:"googleAttachment",children:t.jsx(K,{subjects:a,standardsData:i,persistDraft:dt,clearDraft:pt,dup:s==null?void 0:s.dup,attachmentMode:!0,attachmentParams:e,onCreate:x,folders:n,createFolder:u})})},ut=[{name:"Recent",path:"/googleAttachment",exact:!0},{name:"Folders",path:"/googleAttachment/folders"}],gt=t.jsx("div",{className:"tabNav",children:ut.map(e=>t.jsx(E,{to:e.path,end:e.exact,children:e.name},e.path))});function ht({assignments:e,fetchBusy:o,fetchMore:s,folders:a,fetchingInitial:i}){return i?et:t.jsx(st,{assignments:e,fetchBusy:o,fetchMore:s,type:"all",folders:a,noMenu:!0,pathPrefix:"/googleAttachment/view",linkState:{backLink:"/googleAttachment",newLink:"/googleAttachment/new"}})}function ft({folders:e,reloadFolders:o}){const{user:{teacher:s}}=z(),[a,i]=F.useState(!1),{folderId:n}=N(),{data:u,mutate:x}=v(n?["getFolderAssignments",n]:null,([,r])=>q(r)),A=()=>x();if(!e)return t.jsx(b,{});let p=[],c,g=0,j;if(!n)p=L(e,"asc").map(r=>t.jsx(D,{uuid:r.uuid,name:r.name,subFolders:r.folders,pathPrefix:"/googleAttachment"},r.uuid));else{let r="/googleAttachment/folders";const{folder:l,parentFolder:m,rootFolder:w,depth:y}=ot(e,n);if(j=w==null?void 0:w.uuid,g=y,m&&(r+=`/${m.uuid}`),l){c=t.jsxs("div",{className:"header",children:[t.jsx(P,{to:r,children:t.jsx("img",{src:"/back.svg",alt:"back"})}),l.name]}),u?l.folders&&p.push(...L(l.folders??[],"asc").map(d=>t.jsx(D,{uuid:d.uuid,name:d.name,subFolders:d.folders,pathPrefix:"/googleAttachment"},d.uuid))):p=t.jsx(b,{immediate:!0});const h=u==null?void 0:u.filter(d=>d.folderIds.folderId===n),S=h==null?void 0:h.some(d=>d.isGroupTemplate||d.teacher!==s.uuid);p.push(..._(h??[],"asc").map(d=>t.jsx(tt,{...d,withDraftInfo:!0,withCreatedAt:!0,reloadAssignment:A,inFolder:l,folders:e,reloadFolders:o,sharedView:S,noMenu:!0,pathPrefix:"/googleAttachment/view",linkState:{backLink:"/googleAttachment",newLink:"/googleAttachment/new"}},d.uuid)))}}return p.length===0&&(p=t.jsxs("div",{className:"empty",children:["No ",n?"items":"folders"]})),t.jsxs("div",{className:"googleAttachmentFolders",children:[c,t.jsx("div",{className:"groupDirectory card assignmentRows",children:p}),g<2&&t.jsx("button",{className:"bbwrap createNewFolder medium white button",onClick:()=>i(!0),children:"Create new folder"}),a&&t.jsx(at,{create:r=>V("me",{name:r,folderId:n,rootFolderId:j}),onDone:o,onEscape:()=>i(!1)})]})}function xt({folders:e}){const{user:{teacher:o}}=z(),s=o.plusLevel,{folderId:a}=N(),{assignments:i,fetchMore:n,fetchBusy:u,fetchingInitial:x}=Z("all",null),{data:A,mutate:p}=v(["getTeacherFolders"],()=>M()),[c,g]=F.useState(!1);F.useEffect(()=>{R({event:"googleAddonTeacherHome"})},[]);const j={pathname:"/googleAttachment/new"};let r;if(e)r=t.jsx(ft,{folders:A,reloadFolders:()=>p()});else{let m;s?m=t.jsxs(P,{className:"newButton",to:j,state:{dup:{format:"adaptive"}},children:[t.jsx(k,{format:"adaptive",size:24,title:"Practice"})," Create new Practice"]}):m=t.jsxs("button",{className:"bbwrap newButton",onClick:()=>g(!0),children:[t.jsx(k,{format:"adaptive",size:24,title:"Practice"})," Create new Practice"]});const h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][new Date().getDay()],S=t.jsxs("div",{className:"greeting",children:["Happy ",h,", ",o.name,"!"]});r=t.jsxs("div",{className:"recentContent",children:[S,t.jsxs("div",{className:"newButtons",children:[t.jsxs(P,{className:"newButton",to:j,state:{dup:{format:"quiz"}},children:[t.jsx(k,{format:"quiz",size:24,title:"Quiz"})," Create new Quiz"]}),m]}),t.jsx("div",{className:"header",children:"Recent"}),t.jsx(ht,{assignments:i,folders:A,fetchMore:n,fetchBusy:u,fetchingInitial:x})]})}let l;return c&&(l=t.jsx(Y,{onEscape:()=>g(!1),newTab:!0})),t.jsxs("div",{className:"googleAttachmentLanding",children:[!a&>,r,l]})}function I({attachmentParams:e,folders:o}
1){return e.attachmentId?t.jsx(rt,{attachmentParams:e}):t.jsx(xt,{folders:o})}function jt(){var l;const{assignmentId:e,studentId:o}=N(),{data:s}=v(["getStudent",o],([,m])=>G(m)),{data:a}=v(["getAssignment",e],([,m])=>B(m)),{data:i,mutate:n}=v(["getStudentProblems",e,o],([,...m])=>nt(...m)),[u,x]=F.useState(0),A=async function(m,w,y,h){await it(e,m,w===void 0?0:w,y,h),await n()};async function p(){await n()}if(!a||!i||!s)return t.jsx(b,{});const c=a.assignment,g=(l=c.students)==null?void 0:l[o],{completed:j,grade:r}=mt(c,o,g);return t.jsx(O,{assignmentId:c.uuid,questions:c.questions,activityLog:c.activityLog,calculator:c.calculator,student:s.student,resp:i,format:c.format,attempt:u,setAttempt:x,changeCredit:A,grade:j&&r,completedDate:g&&g.completedDate,onDelete:p})}function wt(){const o=C().state,{assignmentId:s}=N(),{data:a}=v(["getAssignment",s],([,n])=>B(n)),i=ct(a==null?void 0:a.assignment.questions);return!a||!i?t.jsx(b,{}):t.jsx(Q,{subjects:i,assignment:a.assignment,back:o&&o.backLink,newLink:"/googleAttachment/new"})}const xs=()=>{const e=C(),o=U.parse(e.search.slice(1)),[s]=F.useState(o);return t.jsxs(H,{children:[t.jsx(f,{path:"new",element:t.jsx(lt,{attachmentParams:s})}),t.jsx(f,{path:"folders/:folderId",element:t.jsx(I,{attachmentParams:s,folders:!0})}),t.jsx(f,{path:"folders",element:t.jsx(I,{attachmentParams:s,folders:!0})}),t.jsx(f,{path:"view/:assignmentId",element:t.jsx(wt,{})}),t.jsx(f,{path:":assignmentId/review/:studentId",element:t.jsx(jt,{attachmentParams:s})}),t.jsx(f,{path:":assignmentId/:tab",element:t.jsx(T,{attachmentParams:s})}),t.jsx(f,{path:":assignmentId",element:t.jsx(T,{attachmentParams:s})}),t.jsx(f,{path:"*",element:t.jsx(I,{attachmentParams:s})})]})};export{xs as default}; 2//# sourceMappingURL=index-DsmsewfP.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.