openlearn-next 0.7.5 → 0.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/assets/{ActivityWorkspaceWidget-Dq4kjBS2.js → ActivityWorkspaceWidget-0DUqiqFK.js} +1 -1
- package/dist/assets/{AdminDirectoryView-B6OAs5Rj.js → AdminDirectoryView-DL9zZi-_.js} +1 -1
- package/dist/assets/{AssessmentCenter-B3f1DxSG.js → AssessmentCenter-B2JzXBGe.js} +1 -1
- package/dist/assets/{AssignmentFilePreview-DQbvbgnd.js → AssignmentFilePreview-Bk751Blz.js} +1 -1
- package/dist/assets/{BatchPickerModal-CoOWloSS.js → BatchPickerModal-9ekXDUUj.js} +1 -1
- package/dist/assets/{ClassesView-Q56Kf4eL.js → ClassesView-PCt8I3MU.js} +1 -1
- package/dist/assets/{ClassroomCountdownWidget-C6luhy8P.js → ClassroomCountdownWidget-HxelcHUp.js} +1 -1
- package/dist/assets/{CloudDriveModal-DLf4fbKR.js → CloudDriveModal-Mp59sr-C.js} +1 -1
- package/dist/assets/{ComputerLabView-D9-Tk7yA.js → ComputerLabView-FStILvFC.js} +1 -1
- package/dist/assets/{CourseManagement-DNSfyre-.js → CourseManagement-BQw2idgZ.js} +1 -1
- package/dist/assets/{CourseWizardModal-DAueHXcl.js → CourseWizardModal-B7-e8otR.js} +1 -1
- package/dist/assets/{Dashboard-qMVadkd2.js → Dashboard-D3LXLQNC.js} +1 -1
- package/dist/assets/{ExportWeightModal-Dkh7OC8U.js → ExportWeightModal-vd7XgaJ0.js} +1 -1
- package/dist/assets/{HelpView-CTF6B9ml.js → HelpView-C4BHoNqR.js} +1 -1
- package/dist/assets/{ImportLessonsModal-Ra-OF_Vo.js → ImportLessonsModal-Y6uIIemO.js} +1 -1
- package/dist/assets/{InteractiveCoursewareViewer-BfHEDrCf.js → InteractiveCoursewareViewer-D9GzG28E.js} +1 -1
- package/dist/assets/{InteractiveWhiteboard-KBzmiNBG.js → InteractiveWhiteboard-DswIV-ES.js} +1 -1
- package/dist/assets/{LazyCourseware-BaZS8-i1.js → LazyCourseware-BEoTTg5h.js} +2 -2
- package/dist/assets/{LazyWhiteboard-DGyln3JC.js → LazyWhiteboard-CMBBxnFX.js} +2 -2
- package/dist/assets/{LessonEditorView-B5JXYyup.js → LessonEditorView-BgJtG8Ks.js} +1 -1
- package/dist/assets/{LiveClassroomView-DezAlve2.js → LiveClassroomView-Czwt5WW-.js} +1 -1
- package/dist/assets/{NotificationDetailModal-DbMMrIHQ.js → NotificationDetailModal-D42vEs3S.js} +1 -1
- package/dist/assets/{PluginView-CvIr-ANj.js → PluginView-BcOWIjLu.js} +1 -1
- package/dist/assets/{QuizGeneratorModal-CTj2moWM.js → QuizGeneratorModal-DiItok6z.js} +1 -1
- package/dist/assets/{StudentAssignmentEvalPanel-DrfZT8Lr.js → StudentAssignmentEvalPanel-DHoZc3g0.js} +1 -1
- package/dist/assets/{StudentAssignmentView-D_EhblVQ.js → StudentAssignmentView-UK_7_MF3.js} +1 -1
- package/dist/assets/{StudentLessonView-BHG50-4M.js → StudentLessonView-C11Qkdi_.js} +1 -1
- package/dist/assets/{StudentView-DKDhnJQx.js → StudentView-j0hx3IOi.js} +2 -2
- package/dist/assets/{SystemResourceLibraryModal-C5y8H5Pf.js → SystemResourceLibraryModal-dEdNKbk2.js} +1 -1
- package/dist/assets/{TeacherView-CWDK3DOe.js → TeacherView-COZw2tFl.js} +2 -2
- package/dist/assets/{TimetableView-C8kdJlf7.js → TimetableView-AkReskNG.js} +1 -1
- package/dist/assets/{index-BBznBaN5.js → index-DN3E-Fmw.js} +4 -4
- package/dist/assets/{pluginParsers-DkiO-BBu.js → pluginParsers-k90WUDrU.js} +1 -1
- package/dist/assets/{student-workspace-1yVTbWHC.js → student-workspace-BDw1i4Vl.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/server.cjs +65 -27
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as y,j as e}from"./vendor-react-Kv_JATwr.js";import{u as X}from"./StudentView-DKDhnJQx.js";import{L as V,f as Z,B as ee,l as te,m as se,q as K,aY as de,ao as ce,X as me,a3 as ue,c as xe,aA as he,b3 as be,e as ge}from"./vendor-icons-hc6MjYFv.js";import{E as _,M as fe,i as Q}from"./index-BBznBaN5.js";import{L as pe}from"./LazyWhiteboard-DGyln3JC.js";import{L as ke}from"./LazyCourseware-BaZS8-i1.js";import{S as ye}from"./StudentAssignmentEvalPanel-DrfZT8Lr.js";import"./vendor-utils-aM7aYvPP.js";import"./vendor-pdf-By0fofA0.js";import"./vendor-motion-BFAPOs-b.js";import"./vendor-charts-SrpBsvM3.js";import"./AssignmentFilePreview-DQbvbgnd.js";function ve({lessonId:c,lang:t,addToast:m}){const[i,x]=y.useState(""),[s,l]=y.useState("idle"),[h,b]=y.useState("");if(y.useEffect(()=>{x(""),l("idle"),b("")},[c]),!c)return null;const n=async()=>{const a=i.trim();if(!a){l("error"),b(t==="zh"?"请先输入签到码":"Enter the check-in code first");return}l("submitting"),b("");try{const p=await fetch(`/api/classroom/sessions/${encodeURIComponent(c)}/checkin`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:a})}),u=await p.json().catch(()=>({}));if(!p.ok||!u.success){l("error");const d=u.error==="Invalid checkin code"?t==="zh"?"签到码不正确,请核对大屏后重试":"Wrong code, check the stage display and retry":u.error||(t==="zh"?"签到失败,请稍后重试":"Check-in failed, retry later");b(d);return}l("done");const v=u.attendanceScheduled!==!1;b(v?t==="zh"?"签到成功,出勤已记录":"Checked in, attendance recorded":t==="zh"?"签到成功(本课节未关联排课,未计入正式出勤)":"Checked in (no schedule linked; not counted in official attendance)"),m(t==="zh"?"签到成功":"Checked in",v?t==="zh"?"出勤已记录":"Attendance recorded":t==="zh"?"会话级签到,未计入正式出勤":"Session-level check-in only","success")}catch{l("error"),b(t==="zh"?"网络异常,请稍后重试":"Network error, retry later")}};return e.jsxs("div",{className:"flex flex-wrap items-center gap-2 bg-surface border border-theme rounded-xl px-3 py-2 shadow-sm text-main",children:[e.jsx("span",{className:"text-xs font-bold",children:t==="zh"?"课堂签到":"Check-in"}),s==="done"?e.jsxs("span",{className:"text-xs font-bold text-emerald-600",children:["✓ ",h]}):e.jsxs(e.Fragment,{children:[e.jsx("input",{value:i,onChange:a=>x(a.target.value.replace(/\s/g,"").slice(0,12)),onKeyDown:a=>{a.key==="Enter"&&n()},placeholder:t==="zh"?"输入大屏 4 位签到码":"4-digit code on stage display",inputMode:"numeric","aria-label":t==="zh"?"课堂签到码":"Class check-in code",className:"w-44 px-2 py-1 text-sm font-mono tracking-widest border border-theme rounded-lg bg-transparent"}),e.jsx("button",{type:"button",onClick:()=>void n(),disabled:s==="submitting",className:"px-3 py-1 text-xs font-bold rounded-lg bg-indigo-600 text-white hover:bg-indigo-700 disabled:opacity-50 cursor-pointer",children:s==="submitting"?t==="zh"?"提交中…":"Submitting…":t==="zh"?"签到":"Check in"})]}),s==="error"&&h&&e.jsx("span",{className:"text-xs text-rose-600",children:h})]})}function je(c){const{students:t,activeStudentId:m,isStudentLocked:i=!1,lockMode:x,setStudentViewStatus:s,setSelectedLesson:l,lessons:h,selectedLesson:b,lang:n="zh",addToast:a,onOpenIcebreaker:p}=c,u=X(w=>w.activeSession),v=t.find(w=>w.id===m),d=i||!!v?.locked_lesson_id,k=(x||v?.lock_mode||"full")==="navigation";return e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d?k?e.jsxs("div",{className:"text-amber-800 font-semibold text-sm flex items-center gap-2 px-3 py-1.5 rounded-lg bg-amber-50 border border-amber-200 shadow-3xs select-none",role:"status",title:n==="zh"?"答题锁定中 · 请完成作答后提交,暂时无法离开本页":"Answer Locked · Complete and submit your work before leaving",children:[e.jsx(V,{size:15,className:"text-amber-600 shrink-0"}),n==="zh"?"答题锁定中 · 请完成作答后提交,暂时无法离开本页":"Answer Locked · Complete and submit work"]}):e.jsxs("div",{className:"text-indigo-700 font-semibold text-sm flex items-center gap-2 px-3 py-1.5 rounded-lg bg-indigo-50 border border-indigo-200 shadow-3xs select-none",role:"status",title:n==="zh"?"老师已开启全班专注锁定,您暂时无法切换页面":"The teacher locked the class focus. Navigating away is disabled.",children:[e.jsx(V,{size:15,className:"text-indigo-600 shrink-0"}),n==="zh"?"全班专注锁定 · 跟随教师授课":"Class Focus Locked · Following Teacher"]}):e.jsxs("button",{onClick:()=>{s("dashboard"),l(null),u&&a?.(n==="zh"?"课堂仍在进行":"Class still in progress",n==="zh"?`可随时从看板顶部的「${u.lessonTitle} · 返回课堂」回到课堂。`:"You can return anytime via the banner at the top of your dashboard.","info")},className:"flex items-center gap-2 text-indigo-600 hover:text-indigo-800 transition-colors font-medium text-sm cursor-pointer",children:[e.jsx(Z,{className:"rotate-180",size:16})," Back to Dashboard"]}),e.jsxs("div",{className:"flex items-center gap-3",children:[p&&e.jsxs("button",{type:"button","data-testid":"open-icebreaker-btn",onClick:p,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-amber-200 dark:border-amber-800/60 bg-amber-50/80 hover:bg-amber-100/80 dark:bg-amber-950/30 dark:hover:bg-amber-950/50 text-amber-900 dark:text-amber-200 text-xs font-semibold shadow-3xs transition-colors cursor-pointer",title:n==="zh"?"课前破冰心情打卡":"Pre-class Icebreaker Check-in",children:[e.jsx("span",{children:"✨"}),e.jsx("span",{children:n==="zh"?"心情打卡":"Mood Check-in"})]}),e.jsx("h2",{className:"text-xl font-bold text-gray-800 dark:text-gray-100",children:h.find(w=>w.id===b)?.title})]})]})}function we(c){const{students:t,activeStudentId:m,isStudentLocked:i=!1,studentFullscreenPanel:x,setStudentFullscreenPanel:s,timelineSegments:l,lang:h,activeSegmentId:b,localProgressPercent:n,setLocalProgressPercent:a,updateStudentProgress:p,selectedLesson:u,lessons:v,isStudentLessonContentCollapsed:d,addToast:g,segmentAccess:k}=c,w=r=>{if(!r?.id||b===r.id)return;g?.(h==="zh"?"请跟随课堂":"Follow the class",h==="zh"?"请跟随课堂当前环节":"Please follow the current class segment","warning")};return e.jsxs("div",{className:`${d?"hidden":x==="left"?"w-full":"w-1/3 md:block hidden"} border-gray-100 pr-4 overflow-y-auto ${x==="right"?"hidden":""} ${x==="left"?"":"border-r"} transition-all duration-300`,children:[e.jsxs("div",{className:"text-xs font-semibold uppercase tracking-wider text-gray-400 mb-4 flex items-center justify-between pointer-events-auto shrink-0 select-none border-b border-gray-100 pb-2",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ee,{size:14,className:"text-indigo-500"})," Lesson Content (课程内容)"]}),e.jsx("button",{onClick:()=>s(r=>r==="left"?"none":"left"),className:"p-1 hover:bg-gray-100 text-subtle hover:text-main rounded transition-colors cursor-pointer flex items-center gap-1",title:x==="left"?"退出全屏":"全屏",children:x==="left"?e.jsxs(e.Fragment,{children:[e.jsx(te,{size:13}),e.jsx("span",{className:"text-xs font-medium",children:"退出全屏"})]}):e.jsxs(e.Fragment,{children:[e.jsx(se,{size:13}),e.jsx("span",{className:"text-xs font-medium",children:"全屏"})]})})]}),e.jsxs("div",{className:"prose prose-sm prose-indigo max-w-none",children:[!i&&!t.find(r=>r.id===m)?.locked_lesson_id&&l.length>0&&e.jsxs("div",{className:"mb-4 flex flex-col gap-2 p-3 bg-slate-50/70 border border-slate-200/50 rounded-xl shadow-3xs text-left",onClick:r=>r.stopPropagation(),children:[e.jsxs("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider flex items-center gap-1.5 mb-1 select-none",children:[e.jsx(K,{size:12,className:"text-indigo-500"}),h==="zh"?"教学环节 (点击切换)":"Timeline Segments"]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:l.map((r,f)=>{const j=b===r.id,S=j&&k?.status==="locked";return e.jsxs("button",{onClick:()=>w(r),title:S?k?.reason||"未满足进入条件":void 0,className:`px-2.5 py-1 text-xs font-semibold rounded-lg border transition-all cursor-pointer shadow-3xs flex items-center gap-1.5 ${r.color} ${j?"ring-2 ring-indigo-500 scale-[1.02] shadow-sm border-indigo-400 font-bold":"opacity-85 hover:opacity-100"}`,children:[S&&e.jsx(V,{size:11,className:"text-amber-600 shrink-0"}),e.jsxs("span",{children:[r.title," (",r.duration,")"]}),e.jsx(_,{slot:"student.segment.badge",slotProps:{segment:r,idx:f,isActive:j,isLocked:!!S,studentId:m,lessonId:u,lang:h}})]},r.id||f)})})]}),e.jsxs("div",{className:"mb-4 bg-slate-50 p-2.5 rounded-xl border border-slate-200/60 shadow-3xs flex flex-col gap-1.5 text-left select-none",children:[e.jsxs("div",{className:"flex justify-between items-center text-xs font-bold text-gray-500",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(K,{size:12,className:"text-indigo-500 animate-pulse"}),h==="zh"?"自主学习进度(教师确认后计入成绩)":"Learning Progress (graded after teacher verification)"]}),e.jsxs("span",{className:"font-mono text-indigo-600 font-extrabold",children:[n,"%"]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("input",{type:"range",min:"0",max:"100",value:n,onChange:r=>{const f=parseInt(r.target.value);a(f)},onMouseUp:()=>p(n),onTouchEnd:()=>p(n),className:"flex-grow h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-indigo-600"}),e.jsx("button",{onClick:()=>{a(100),p(100)},className:`text-xs font-bold rounded-lg px-2 py-1 transition-all ${n===100?"bg-emerald-100 text-emerald-700 border border-emerald-200":"bg-white hover:bg-slate-50 text-slate-650 border border-slate-200 hover:border-indigo-200 shadow-3xs cursor-pointer"}`,children:h==="zh"?"已完成":"Done"})]})]}),e.jsx(fe,{children:v.find(r=>r.id===u)?.content||""})]})]})}function Ne(c){const{isStudentLocked:t=!1,isNavigationLocked:m,isInteractionLocked:i,lockMode:x,studentLessonTab:s,setStudentLessonTab:l,isStudentLessonContentCollapsed:h,setIsStudentLessonContentCollapsed:b,lang:n,studentFullscreenPanel:a,setStudentFullscreenPanel:p,selectedLesson:u,elements:v,activeRole:d,activeSegmentId:g,contentSegmentId:k,blockSegmentContent:w=!1,setActiveSegmentId:r,fetchElements:f,currentVfsParent:j,setCurrentVfsParent:S,vfsNodes:z,studentSelectedCourseware:M,setStudentSelectedCourseware:F,activeStudentId:P,addToast:B}=c,L=m??t,I=i??(x==="navigation"?!1:t),$=(x||(!I&&L?"navigation":"full"))==="navigation",T=o=>{if(L){o!==s&&B(n==="zh"?$?"🔒 答题锁定":"🔒 全班专注锁定":$?"🔒 Answer Locked":"🔒 Class Focus Locked",n==="zh"?$?"答题锁定中,请在当前页面完成作答并提交。":"锁定期间无法切换标签页,请跟随教师当前授课内容。":$?"Answer lock active. Complete your work on this page.":"Switching tabs is disabled while the class is locked.","warning");return}l(o)},D=k||g,C=w,N=o=>`px-3 py-1.5 text-xs font-medium rounded-md transition-colors ${s===o?"bg-primary-theme/10 text-primary-theme shadow-sm font-bold":"text-muted hover:bg-surface-secondary"} ${L&&s!==o?"opacity-50 cursor-not-allowed":"cursor-pointer"}`;return e.jsxs("div",{className:`${h||a==="right"?"w-full flex-grow":"flex-grow flex-1"} relative flex flex-col min-h-0 ${a==="left"?"hidden":""} transition-all duration-300`,children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:()=>b(!h),className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-bold bg-primary-theme/10 text-primary-theme rounded-lg hover:bg-primary-theme/20 transition-colors border border-primary-theme/20 cursor-pointer shadow-3xs",title:h?"展开课程内容":"折叠课程内容",children:[e.jsx(ee,{size:13,className:"text-primary-theme"}),e.jsx("span",{children:h?n==="zh"?"展开课程内容":"Expand Content":n==="zh"?"折叠课程内容":"Collapse Content"})]}),e.jsxs("button",{onClick:()=>T("whiteboard"),className:N("whiteboard"),title:I&&n==="zh"?"锁定中:白板为只读跟随模式":L&&n==="zh"?"答题锁定中:请在此页面完成作答":void 0,children:["Interactive Whiteboard",I&&s==="whiteboard"&&e.jsxs("span",{className:"ml-1.5 text-xs font-bold text-indigo-500",children:["🔒 ",n==="zh"?"只读":"RO"]}),!I&&L&&s==="whiteboard"&&e.jsxs("span",{className:"ml-1.5 text-xs font-bold text-amber-600",children:["✏️ ",n==="zh"?"答题锁定":"Answering"]})]}),e.jsx("button",{onClick:()=>T("courseware"),className:N("courseware"),children:"Interactive Courseware Viewer"}),e.jsx("button",{onClick:()=>T("assignment"),className:N("assignment"),children:n==="zh"?"作业提交与互评":"Assignments & Peer Reviews"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{slot:"student.lesson.tool",slotProps:{lessonId:u,studentId:P,activeSegmentId:g,lang:n}}),e.jsx("button",{onClick:()=>p(o=>o==="right"?"none":"right"),className:"p-1 hover:bg-gray-100 text-subtle hover:text-main rounded transition-colors cursor-pointer flex items-center gap-1",title:a==="right"?"退出全屏":"全屏",children:a==="right"?e.jsxs(e.Fragment,{children:[e.jsx(te,{size:13}),e.jsx("span",{className:"text-xs font-medium",children:"退出全屏"})]}):e.jsxs(e.Fragment,{children:[e.jsx(se,{size:13}),e.jsx("span",{className:"text-xs font-medium",children:"全屏"})]})})]})]}),C?e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-amber-800 bg-amber-50/60 rounded-xl border border-amber-200 gap-3",children:[e.jsxs("div",{className:"text-sm font-semibold flex items-center gap-2",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-amber-500 animate-pulse"}),e.jsx("span",{children:n==="zh"?"本教学环节尚未解锁":"This segment is not unlocked yet"})]}),e.jsx("p",{className:"text-xs text-amber-700 dark:text-amber-400 max-w-md text-center",children:n==="zh"?"您尚未满足本教学环节的进入门禁条件,请完成前置任务或等待教师统一推进。":"You have not met the gate conditions for this segment yet. Please complete prerequisites or wait for the teacher."}),e.jsx(_,{slot:"student.segment.gate_fallback",slotProps:{lessonId:u,activeSegmentId:g,studentId:P,contentSegmentId:k,lang:n}})]}):null,!C&&s==="whiteboard"&&e.jsx(pe,{lessonId:u,elements:v,userRole:d,readOnly:I,followRemoteFullscreen:!0,activeSegmentId:D,onSegmentSync:o=>{k!==void 0&&k!==g||r(o)},onElementUpdate:async()=>{},onElementDelete:async o=>{I||u&&(await fetch(`/api/lessons/${u}/whiteboard/${o}`,{method:"DELETE"}),f(u))},onClearBoard:async()=>{I||u&&(await fetch(`/api/lessons/${u}/whiteboard`,{method:"DELETE"}),f(u))},onElementAdd:async()=>{},onRefresh:()=>{u&&f(u)}}),!C&&s==="courseware"&&e.jsxs("div",{className:"flex-1 flex gap-4 min-h-0",children:[e.jsxs("div",{className:"w-48 flex-shrink-0 bg-gray-50 border border-gray-200 rounded-lg p-3 flex flex-col min-h-0",children:[e.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-gray-500 mb-2 border-b border-gray-200 pb-2",children:"Cloud Apps"}),e.jsxs("div",{className:"flex-1 overflow-y-auto space-y-1",children:[j!==null&&e.jsxs("button",{onClick:()=>S(null),className:"flex items-center gap-2 p-1.5 text-xs text-indigo-600 w-full hover:bg-gray-200 rounded mb-1 font-medium",children:[e.jsx(Z,{className:"rotate-180",size:14})," Back to Root"]}),z.filter(o=>o.type==="dir").map(o=>e.jsxs("button",{onClick:()=>S(o.id),className:"w-full text-left p-1.5 rounded text-xs text-gray-700 hover:bg-gray-200 flex items-center gap-2 group truncate",title:o.name,children:[e.jsx(de,{size:14,className:"text-indigo-400 shrink-0 group-hover:text-indigo-600"}),e.jsx("span",{className:"truncate",children:o.name})]},o.id)),z.filter(o=>o.type==="file"&&(o.name.endsWith(".html")||o.name.endsWith(".htm")||o.content?.includes("<html"))).length===0?e.jsx("div",{className:"text-xs text-center text-gray-400 italic py-4",children:"No interactive HTML apps found."}):z.filter(o=>o.type==="file"&&(o.name.endsWith(".html")||o.name.endsWith(".htm")||o.content?.includes("<html"))).map(o=>e.jsxs("button",{onClick:()=>F(o.id),className:`w-full text-left p-2 rounded text-xs flex items-center gap-2 truncate transition-colors ${M===o.id?"bg-indigo-100 text-indigo-700 font-medium":"text-gray-600 hover:bg-gray-100"}`,title:o.name,children:[e.jsx(ce,{size:14,className:"shrink-0"}),e.jsx("span",{className:"truncate",children:o.name})]},o.id))]}),e.jsx("div",{className:"mt-2 text-xs text-gray-400 leading-tight",children:"Note: Showing HTML courseware from current OS drive directory. Ask agent to generate courseware."})]}),e.jsx("div",{className:"flex-1 relative bg-white min-h-0",children:e.jsx(ke,{coursewareId:M,onClose:()=>F(null)})})]}),!C&&s==="assignment"&&u&&P&&e.jsx(ye,{lessonId:u,studentId:P,lang:n,addToast:B})]})}function Se({access:c,lang:t}){if(!c.segmentId)return null;if(c.status==="loading"||c.status==="idle")return e.jsx("div",{className:"rounded-xl border border-slate-200 bg-slate-50 px-3 py-2 text-xs text-slate-600",role:"status",children:t==="zh"?"正在核对进入条件":"Checking entry conditions"});if(c.status!=="locked")return null;const m=c.gates.filter(i=>!i.allowed);return e.jsx("div",{"data-testid":"segment-gate-lock",role:"status",className:"rounded-xl border border-amber-300 bg-amber-50 px-3 py-2.5 text-xs text-amber-900",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(V,{size:14,className:"mt-0.5 shrink-0 text-amber-700"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"font-bold",children:t==="zh"?"本环节尚未解锁":"This segment is locked"}),e.jsx("p",{className:"mt-0.5 leading-snug",children:c.reason||(t==="zh"?"未满足进入条件":"Conditions not met")}),m.length>0&&e.jsx("ul",{className:"mt-1.5 space-y-0.5",children:m.map(i=>e.jsxs("li",{children:[i.reason||i.type,i.progress?`(${i.progress.current}/${i.progress.target}${i.progress.unit||""})`:""]},`${i.type}-${i.reason||""}`))})]})]})})}const q={status:"idle",allowed:!0,gates:[],visibleSegmentId:null,segmentId:null};function G(c,t){return{status:"locked",allowed:!1,reason:t,gates:[],visibleSegmentId:null,segmentId:c}}function Ce(c,t){const[m,i]=y.useState(q),x=y.useCallback(async()=>{if(!c||!t){i(q);return}i(s=>s.segmentId===t&&(s.status==="open"||s.status==="locked")?s:{...s,status:"loading",segmentId:t});try{const s=await fetch(`/api/lessons/${encodeURIComponent(c)}/segment-access`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({targetSegmentId:t})}),l=await s.json().catch(()=>null);if(typeof l?.allowed=="boolean"){const h=Array.isArray(l.gates)?l.gates:[];i({status:l.allowed?"open":"locked",allowed:l.allowed,reason:typeof l.reason=="string"?l.reason:void 0,progress:l.progress,gates:h,visibleSegmentId:typeof l.visibleSegmentId=="string"?l.visibleSegmentId:l.allowed?t:null,segmentId:t});return}i(G(t,s.ok?"进入条件返回了无法识别的结果":`进入条件暂时无法核对(HTTP ${s.status})`))}catch{i(G(t,"进入条件服务不可达,已暂时锁定"))}},[c,t]);return y.useEffect(()=>{x()},[x]),y.useEffect(()=>{const s=()=>{x()};window.addEventListener("openlearn:segment-gate-changed",s);const l=Q.subscribe("QuizSubmitted",s),h=Q.subscribe("assignment.submitted",s);return()=>{window.removeEventListener("openlearn:segment-gate-changed",s),l(),h()}},[x]),y.useEffect(()=>{if(m.status!=="locked"||!c||!t)return;const s=window.setInterval(()=>{x()},5e3);return()=>window.clearInterval(s)},[m.status,c,t,x]),m}function ze({isOpen:c,onClose:t,classId:m,lessonId:i,studentId:x,lang:s="zh",onCheckinSuccess:l,addToast:h}){const[b,n]=y.useState(null),[a,p]=y.useState(!1),[u,v]=y.useState(null),d=s==="zh";if(y.useEffect(()=>{c&&v(null)},[c]),!c)return null;const g=async r=>{const f=b;if(f){if(!m){v(d?"未检测到当前班级信息,暂时无法打卡":"No class found, unable to check in");return}p(!0),v(null);try{const j=await fetch(`/api/classes/${encodeURIComponent(m)}/checkin/icebreaker`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({mood:f,lessonId:i||void 0})});if(!j.ok){const z=await j.json().catch(()=>({}));throw new Error(z.error||`HTTP ${j.status}`)}const S=await j.json();try{const z=`icebreaker_checked_${x||"cur"}_${m}_${i||"today"}`;sessionStorage.setItem(z,f)}catch{}h&&h(d?"打卡成功!":"Check-in successful!",d?"老师已收到你的课前心态,祝本节课收获满满~":"Your mood has been shared with teacher.","success"),l&&l(S.stats),t()}catch(j){v(j.message||(d?"打卡失败,请重试":"Check-in failed, please retry"))}finally{p(!1)}}},k=()=>{try{const r=`icebreaker_skipped_${x||"cur"}_${m}_${i||"today"}`;sessionStorage.setItem(r,"1")}catch{}t()},w=[{id:"fullPower",label:d?"充满电":"Full Power",sub:d?"精力充沛,准备好迎接挑战!":"Energetic and ready to learn!",icon:e.jsx(he,{className:"w-6 h-6 text-amber-500 animate-pulse"}),color:"hover:border-amber-400 hover:bg-amber-50/50 dark:hover:bg-amber-950/20",activeBorder:"border-amber-500 ring-2 ring-amber-400/30",activeBg:"bg-amber-50/80 dark:bg-amber-950/40"},{id:"needCoffee",label:d?"需要咖啡":"Need Coffee",sub:d?"稍显疲倦,需要唤醒状态~":"A bit tired, getting warmed up~",icon:e.jsx(be,{className:"w-6 h-6 text-amber-700 dark:text-amber-300"}),color:"hover:border-amber-600 hover:bg-amber-50/50 dark:hover:bg-amber-950/20",activeBorder:"border-amber-600 ring-2 ring-amber-600/30",activeBg:"bg-amber-50/80 dark:bg-amber-950/40"},{id:"needHelp",label:d?"需要帮助":"Need Help",sub:d?"有点吃力,希望老师重点关照!":"Need support, please guide me!",icon:e.jsx(ge,{className:"w-6 h-6 text-rose-500"}),color:"hover:border-rose-400 hover:bg-rose-50/50 dark:hover:bg-rose-950/20",activeBorder:"border-rose-500 ring-2 ring-rose-400/30",activeBg:"bg-rose-50/80 dark:bg-rose-950/40"}];return e.jsx("div",{"data-testid":"student-icebreaker-modal",className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/50 backdrop-blur-xs animate-in fade-in duration-200",role:"dialog","aria-modal":"true","aria-labelledby":"icebreaker-title",children:e.jsxs("div",{className:"relative w-full max-w-md rounded-2xl bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-800 shadow-2xl p-6 overflow-hidden",children:[e.jsx("div",{className:"absolute -top-16 -right-16 w-36 h-36 bg-amber-400/10 rounded-full blur-2xl pointer-events-none"}),e.jsx("div",{className:"absolute -bottom-16 -left-16 w-36 h-36 bg-indigo-500/10 rounded-full blur-2xl pointer-events-none"}),e.jsxs("div",{className:"flex items-start justify-between pb-3 border-b border-gray-100 dark:border-gray-800/80",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xl",children:"✨"}),e.jsx("h2",{id:"icebreaker-title",className:"text-lg font-bold text-gray-900 dark:text-gray-100",children:d?"课前破冰心情打卡":"Pre-Class Icebreaker"})]}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:d?"分享你此刻的心态,帮助老师更好地调整上课节奏":"Share your status so the teacher can tailor the lesson"})]}),e.jsx("button",{type:"button",onClick:k,className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 p-1 rounded-lg transition-colors cursor-pointer","aria-label":d?"跳过":"Skip",children:e.jsx(me,{size:18})})]}),u&&e.jsxs("div",{className:"mt-3 p-2.5 rounded-lg bg-rose-50 dark:bg-rose-950/40 border border-rose-200 dark:border-rose-900/50 text-rose-700 dark:text-rose-300 text-xs flex items-center gap-2",children:[e.jsx("span",{className:"shrink-0",children:"⚠️"}),e.jsx("span",{children:u})]}),e.jsx("div",{className:"mt-4 space-y-2.5",children:w.map(r=>{const f=b===r.id;return e.jsxs("button",{type:"button","data-testid":`mood-option-${r.id}`,onClick:()=>n(r.id),className:`w-full text-left p-3.5 rounded-xl border transition-all cursor-pointer flex items-center justify-between gap-3 ${f?`${r.activeBorder} ${r.activeBg}`:`border-gray-200 dark:border-gray-800 bg-gray-50/50 dark:bg-gray-800/40 ${r.color}`}`,children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("div",{className:"shrink-0 p-2 rounded-lg bg-white dark:bg-gray-800 shadow-2xs border border-gray-100 dark:border-gray-700",children:r.icon}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:r.label}),e.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 truncate mt-0.5",children:r.sub})]})]}),f&&e.jsx(ue,{size:18,className:"shrink-0 text-indigo-600 dark:text-indigo-400"})]},r.id)})}),e.jsxs("div",{className:"mt-6 pt-3 border-t border-gray-100 dark:border-gray-800/80 flex items-center justify-between gap-3",children:[e.jsx("button",{type:"button","data-testid":"icebreaker-skip-btn",onClick:k,className:"text-xs text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 px-3 py-2 rounded-lg transition-colors cursor-pointer",children:d?"稍后再说 / 跳过":"Skip for now"}),e.jsx("button",{type:"button","data-testid":"icebreaker-submit-btn",disabled:!b||a,onClick:()=>g(),className:`inline-flex items-center justify-center gap-1.5 px-5 py-2 rounded-xl text-xs font-bold transition-all shadow-xs cursor-pointer ${!b||a?"bg-gray-200 dark:bg-gray-800 text-gray-400 cursor-not-allowed":"bg-indigo-600 hover:bg-indigo-700 text-white shadow-indigo-500/20"}`,children:a?e.jsxs(e.Fragment,{children:[e.jsx(xe,{size:14,className:"animate-spin"}),e.jsx("span",{children:d?"提交中...":"Submitting..."})]}):e.jsx("span",{children:d?"确认打卡":"Check In"})})]})]})})}function Oe(c){const{students:t,activeStudentId:m,isStudentLocked:i=!1,isNavigationLocked:x,isInteractionLocked:s,lockMode:l,setStudentViewStatus:h,setSelectedLesson:b,lessons:n,selectedLesson:a,studentFullscreenPanel:p,setStudentFullscreenPanel:u,timelineSegments:v,lang:d,activeSegmentId:g,setActiveSegmentId:k,localProgressPercent:w,setLocalProgressPercent:r,updateStudentProgress:f,isStudentLessonContentCollapsed:j,setIsStudentLessonContentCollapsed:S,studentLessonTab:z,setStudentLessonTab:M,elements:F,activeRole:P,fetchElements:B,currentVfsParent:L,setCurrentVfsParent:I,vfsNodes:$,studentSelectedCourseware:T,setStudentSelectedCourseware:D,addToast:C}=c,N=Ce(a,g),re=!!g&&(N.status==="idle"||N.status==="loading")||N.status==="locked"&&!N.visibleSegmentId,ne=N.status==="locked"&&N.visibleSegmentId?N.visibleSegmentId:g,[ae,H]=y.useState(!1),[oe,ie]=y.useState(null),U=X(E=>E.activeSession),A=oe||(U?.lessonId===a?U.classId:null);return y.useEffect(()=>{if(!(!A||!a))try{const E=`icebreaker_checked_${m||"cur"}_${A}_${a}`,R=`icebreaker_skipped_${m||"cur"}_${A}_${a}`;!sessionStorage.getItem(E)&&!sessionStorage.getItem(R)&&H(!0)}catch{}},[A,a,m]),y.useEffect(()=>{if(!a||typeof fetch!="function")return;let E=!1;const R=async()=>{try{const J=await fetch(`/api/classroom/sessions/${encodeURIComponent(a)}`,{credentials:"same-origin"});if(!J.ok||E)return;const Y=await J.json(),O=Y?.session?.current_segment_id,W=Y?.session?.class_id;W&&typeof W=="string"&&ie(W),typeof O=="string"&&O&&O!==g&&k(O)}catch{}};R();const le=window.setInterval(()=>{R()},2500);return()=>{E=!0,window.clearInterval(le)}},[a,g,k]),e.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[e.jsx(je,{students:t,activeStudentId:m,isStudentLocked:x??i,lockMode:l,setStudentViewStatus:h,setSelectedLesson:b,lessons:n,selectedLesson:a,addToast:C,lang:d,onOpenIcebreaker:()=>H(!0)}),e.jsx(ve,{lessonId:a,lang:d,addToast:C}),e.jsx(Se,{access:N,lang:d}),e.jsxs("div",{className:"flex-1 flex gap-6 min-h-0 bg-surface border border-theme rounded-xl p-4 shadow-sm text-main",children:[e.jsx(we,{students:t,activeStudentId:m,isStudentLocked:i,studentFullscreenPanel:p,setStudentFullscreenPanel:u,timelineSegments:v,lang:d,activeSegmentId:g,setActiveSegmentId:k,localProgressPercent:w,setLocalProgressPercent:r,updateStudentProgress:f,selectedLesson:a,lessons:n,isStudentLessonContentCollapsed:j,addToast:C,segmentAccess:N}),e.jsx(Ne,{isStudentLocked:i,isNavigationLocked:x,isInteractionLocked:s,lockMode:l,studentLessonTab:z,setStudentLessonTab:M,isStudentLessonContentCollapsed:j,setIsStudentLessonContentCollapsed:S,lang:d,studentFullscreenPanel:p,setStudentFullscreenPanel:u,selectedLesson:a,elements:F,activeRole:P,activeSegmentId:g,contentSegmentId:ne,blockSegmentContent:re,setActiveSegmentId:k,fetchElements:B,currentVfsParent:L,setCurrentVfsParent:I,vfsNodes:$,studentSelectedCourseware:T,setStudentSelectedCourseware:D,activeStudentId:m,addToast:C})]}),e.jsx(_,{slot:"student.lesson.notes_addon",slotProps:{lessonId:a,studentId:m,activeSegmentId:g,lang:d}}),e.jsx(_,{slot:"student.lesson.toolbox",slotProps:{lessonId:a,studentId:m,lang:d}}),e.jsx(ze,{isOpen:ae,onClose:()=>H(!1),classId:A,lessonId:a,studentId:m,lang:d,addToast:C})]})}export{Oe as StudentLessonView};
|
|
1
|
+
import{r as y,j as e}from"./vendor-react-Kv_JATwr.js";import{u as X}from"./StudentView-j0hx3IOi.js";import{L as V,f as Z,B as ee,l as te,m as se,q as K,aY as de,ao as ce,X as me,a3 as ue,c as xe,aA as he,b3 as be,e as ge}from"./vendor-icons-hc6MjYFv.js";import{E as _,M as fe,i as Q}from"./index-DN3E-Fmw.js";import{L as pe}from"./LazyWhiteboard-CMBBxnFX.js";import{L as ke}from"./LazyCourseware-BEoTTg5h.js";import{S as ye}from"./StudentAssignmentEvalPanel-DHoZc3g0.js";import"./vendor-utils-aM7aYvPP.js";import"./vendor-pdf-By0fofA0.js";import"./vendor-motion-BFAPOs-b.js";import"./vendor-charts-SrpBsvM3.js";import"./AssignmentFilePreview-Bk751Blz.js";function ve({lessonId:c,lang:t,addToast:m}){const[i,x]=y.useState(""),[s,l]=y.useState("idle"),[h,b]=y.useState("");if(y.useEffect(()=>{x(""),l("idle"),b("")},[c]),!c)return null;const n=async()=>{const a=i.trim();if(!a){l("error"),b(t==="zh"?"请先输入签到码":"Enter the check-in code first");return}l("submitting"),b("");try{const p=await fetch(`/api/classroom/sessions/${encodeURIComponent(c)}/checkin`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:a})}),u=await p.json().catch(()=>({}));if(!p.ok||!u.success){l("error");const d=u.error==="Invalid checkin code"?t==="zh"?"签到码不正确,请核对大屏后重试":"Wrong code, check the stage display and retry":u.error||(t==="zh"?"签到失败,请稍后重试":"Check-in failed, retry later");b(d);return}l("done");const v=u.attendanceScheduled!==!1;b(v?t==="zh"?"签到成功,出勤已记录":"Checked in, attendance recorded":t==="zh"?"签到成功(本课节未关联排课,未计入正式出勤)":"Checked in (no schedule linked; not counted in official attendance)"),m(t==="zh"?"签到成功":"Checked in",v?t==="zh"?"出勤已记录":"Attendance recorded":t==="zh"?"会话级签到,未计入正式出勤":"Session-level check-in only","success")}catch{l("error"),b(t==="zh"?"网络异常,请稍后重试":"Network error, retry later")}};return e.jsxs("div",{className:"flex flex-wrap items-center gap-2 bg-surface border border-theme rounded-xl px-3 py-2 shadow-sm text-main",children:[e.jsx("span",{className:"text-xs font-bold",children:t==="zh"?"课堂签到":"Check-in"}),s==="done"?e.jsxs("span",{className:"text-xs font-bold text-emerald-600",children:["✓ ",h]}):e.jsxs(e.Fragment,{children:[e.jsx("input",{value:i,onChange:a=>x(a.target.value.replace(/\s/g,"").slice(0,12)),onKeyDown:a=>{a.key==="Enter"&&n()},placeholder:t==="zh"?"输入大屏 4 位签到码":"4-digit code on stage display",inputMode:"numeric","aria-label":t==="zh"?"课堂签到码":"Class check-in code",className:"w-44 px-2 py-1 text-sm font-mono tracking-widest border border-theme rounded-lg bg-transparent"}),e.jsx("button",{type:"button",onClick:()=>void n(),disabled:s==="submitting",className:"px-3 py-1 text-xs font-bold rounded-lg bg-indigo-600 text-white hover:bg-indigo-700 disabled:opacity-50 cursor-pointer",children:s==="submitting"?t==="zh"?"提交中…":"Submitting…":t==="zh"?"签到":"Check in"})]}),s==="error"&&h&&e.jsx("span",{className:"text-xs text-rose-600",children:h})]})}function je(c){const{students:t,activeStudentId:m,isStudentLocked:i=!1,lockMode:x,setStudentViewStatus:s,setSelectedLesson:l,lessons:h,selectedLesson:b,lang:n="zh",addToast:a,onOpenIcebreaker:p}=c,u=X(w=>w.activeSession),v=t.find(w=>w.id===m),d=i||!!v?.locked_lesson_id,k=(x||v?.lock_mode||"full")==="navigation";return e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d?k?e.jsxs("div",{className:"text-amber-800 font-semibold text-sm flex items-center gap-2 px-3 py-1.5 rounded-lg bg-amber-50 border border-amber-200 shadow-3xs select-none",role:"status",title:n==="zh"?"答题锁定中 · 请完成作答后提交,暂时无法离开本页":"Answer Locked · Complete and submit your work before leaving",children:[e.jsx(V,{size:15,className:"text-amber-600 shrink-0"}),n==="zh"?"答题锁定中 · 请完成作答后提交,暂时无法离开本页":"Answer Locked · Complete and submit work"]}):e.jsxs("div",{className:"text-indigo-700 font-semibold text-sm flex items-center gap-2 px-3 py-1.5 rounded-lg bg-indigo-50 border border-indigo-200 shadow-3xs select-none",role:"status",title:n==="zh"?"老师已开启全班专注锁定,您暂时无法切换页面":"The teacher locked the class focus. Navigating away is disabled.",children:[e.jsx(V,{size:15,className:"text-indigo-600 shrink-0"}),n==="zh"?"全班专注锁定 · 跟随教师授课":"Class Focus Locked · Following Teacher"]}):e.jsxs("button",{onClick:()=>{s("dashboard"),l(null),u&&a?.(n==="zh"?"课堂仍在进行":"Class still in progress",n==="zh"?`可随时从看板顶部的「${u.lessonTitle} · 返回课堂」回到课堂。`:"You can return anytime via the banner at the top of your dashboard.","info")},className:"flex items-center gap-2 text-indigo-600 hover:text-indigo-800 transition-colors font-medium text-sm cursor-pointer",children:[e.jsx(Z,{className:"rotate-180",size:16})," Back to Dashboard"]}),e.jsxs("div",{className:"flex items-center gap-3",children:[p&&e.jsxs("button",{type:"button","data-testid":"open-icebreaker-btn",onClick:p,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-amber-200 dark:border-amber-800/60 bg-amber-50/80 hover:bg-amber-100/80 dark:bg-amber-950/30 dark:hover:bg-amber-950/50 text-amber-900 dark:text-amber-200 text-xs font-semibold shadow-3xs transition-colors cursor-pointer",title:n==="zh"?"课前破冰心情打卡":"Pre-class Icebreaker Check-in",children:[e.jsx("span",{children:"✨"}),e.jsx("span",{children:n==="zh"?"心情打卡":"Mood Check-in"})]}),e.jsx("h2",{className:"text-xl font-bold text-gray-800 dark:text-gray-100",children:h.find(w=>w.id===b)?.title})]})]})}function we(c){const{students:t,activeStudentId:m,isStudentLocked:i=!1,studentFullscreenPanel:x,setStudentFullscreenPanel:s,timelineSegments:l,lang:h,activeSegmentId:b,localProgressPercent:n,setLocalProgressPercent:a,updateStudentProgress:p,selectedLesson:u,lessons:v,isStudentLessonContentCollapsed:d,addToast:g,segmentAccess:k}=c,w=r=>{if(!r?.id||b===r.id)return;g?.(h==="zh"?"请跟随课堂":"Follow the class",h==="zh"?"请跟随课堂当前环节":"Please follow the current class segment","warning")};return e.jsxs("div",{className:`${d?"hidden":x==="left"?"w-full":"w-1/3 md:block hidden"} border-gray-100 pr-4 overflow-y-auto ${x==="right"?"hidden":""} ${x==="left"?"":"border-r"} transition-all duration-300`,children:[e.jsxs("div",{className:"text-xs font-semibold uppercase tracking-wider text-gray-400 mb-4 flex items-center justify-between pointer-events-auto shrink-0 select-none border-b border-gray-100 pb-2",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ee,{size:14,className:"text-indigo-500"})," Lesson Content (课程内容)"]}),e.jsx("button",{onClick:()=>s(r=>r==="left"?"none":"left"),className:"p-1 hover:bg-gray-100 text-subtle hover:text-main rounded transition-colors cursor-pointer flex items-center gap-1",title:x==="left"?"退出全屏":"全屏",children:x==="left"?e.jsxs(e.Fragment,{children:[e.jsx(te,{size:13}),e.jsx("span",{className:"text-xs font-medium",children:"退出全屏"})]}):e.jsxs(e.Fragment,{children:[e.jsx(se,{size:13}),e.jsx("span",{className:"text-xs font-medium",children:"全屏"})]})})]}),e.jsxs("div",{className:"prose prose-sm prose-indigo max-w-none",children:[!i&&!t.find(r=>r.id===m)?.locked_lesson_id&&l.length>0&&e.jsxs("div",{className:"mb-4 flex flex-col gap-2 p-3 bg-slate-50/70 border border-slate-200/50 rounded-xl shadow-3xs text-left",onClick:r=>r.stopPropagation(),children:[e.jsxs("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider flex items-center gap-1.5 mb-1 select-none",children:[e.jsx(K,{size:12,className:"text-indigo-500"}),h==="zh"?"教学环节 (点击切换)":"Timeline Segments"]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:l.map((r,f)=>{const j=b===r.id,S=j&&k?.status==="locked";return e.jsxs("button",{onClick:()=>w(r),title:S?k?.reason||"未满足进入条件":void 0,className:`px-2.5 py-1 text-xs font-semibold rounded-lg border transition-all cursor-pointer shadow-3xs flex items-center gap-1.5 ${r.color} ${j?"ring-2 ring-indigo-500 scale-[1.02] shadow-sm border-indigo-400 font-bold":"opacity-85 hover:opacity-100"}`,children:[S&&e.jsx(V,{size:11,className:"text-amber-600 shrink-0"}),e.jsxs("span",{children:[r.title," (",r.duration,")"]}),e.jsx(_,{slot:"student.segment.badge",slotProps:{segment:r,idx:f,isActive:j,isLocked:!!S,studentId:m,lessonId:u,lang:h}})]},r.id||f)})})]}),e.jsxs("div",{className:"mb-4 bg-slate-50 p-2.5 rounded-xl border border-slate-200/60 shadow-3xs flex flex-col gap-1.5 text-left select-none",children:[e.jsxs("div",{className:"flex justify-between items-center text-xs font-bold text-gray-500",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(K,{size:12,className:"text-indigo-500 animate-pulse"}),h==="zh"?"自主学习进度(教师确认后计入成绩)":"Learning Progress (graded after teacher verification)"]}),e.jsxs("span",{className:"font-mono text-indigo-600 font-extrabold",children:[n,"%"]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("input",{type:"range",min:"0",max:"100",value:n,onChange:r=>{const f=parseInt(r.target.value);a(f)},onMouseUp:()=>p(n),onTouchEnd:()=>p(n),className:"flex-grow h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-indigo-600"}),e.jsx("button",{onClick:()=>{a(100),p(100)},className:`text-xs font-bold rounded-lg px-2 py-1 transition-all ${n===100?"bg-emerald-100 text-emerald-700 border border-emerald-200":"bg-white hover:bg-slate-50 text-slate-650 border border-slate-200 hover:border-indigo-200 shadow-3xs cursor-pointer"}`,children:h==="zh"?"已完成":"Done"})]})]}),e.jsx(fe,{children:v.find(r=>r.id===u)?.content||""})]})]})}function Ne(c){const{isStudentLocked:t=!1,isNavigationLocked:m,isInteractionLocked:i,lockMode:x,studentLessonTab:s,setStudentLessonTab:l,isStudentLessonContentCollapsed:h,setIsStudentLessonContentCollapsed:b,lang:n,studentFullscreenPanel:a,setStudentFullscreenPanel:p,selectedLesson:u,elements:v,activeRole:d,activeSegmentId:g,contentSegmentId:k,blockSegmentContent:w=!1,setActiveSegmentId:r,fetchElements:f,currentVfsParent:j,setCurrentVfsParent:S,vfsNodes:z,studentSelectedCourseware:M,setStudentSelectedCourseware:F,activeStudentId:P,addToast:B}=c,L=m??t,I=i??(x==="navigation"?!1:t),$=(x||(!I&&L?"navigation":"full"))==="navigation",T=o=>{if(L){o!==s&&B(n==="zh"?$?"🔒 答题锁定":"🔒 全班专注锁定":$?"🔒 Answer Locked":"🔒 Class Focus Locked",n==="zh"?$?"答题锁定中,请在当前页面完成作答并提交。":"锁定期间无法切换标签页,请跟随教师当前授课内容。":$?"Answer lock active. Complete your work on this page.":"Switching tabs is disabled while the class is locked.","warning");return}l(o)},D=k||g,C=w,N=o=>`px-3 py-1.5 text-xs font-medium rounded-md transition-colors ${s===o?"bg-primary-theme/10 text-primary-theme shadow-sm font-bold":"text-muted hover:bg-surface-secondary"} ${L&&s!==o?"opacity-50 cursor-not-allowed":"cursor-pointer"}`;return e.jsxs("div",{className:`${h||a==="right"?"w-full flex-grow":"flex-grow flex-1"} relative flex flex-col min-h-0 ${a==="left"?"hidden":""} transition-all duration-300`,children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:()=>b(!h),className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-bold bg-primary-theme/10 text-primary-theme rounded-lg hover:bg-primary-theme/20 transition-colors border border-primary-theme/20 cursor-pointer shadow-3xs",title:h?"展开课程内容":"折叠课程内容",children:[e.jsx(ee,{size:13,className:"text-primary-theme"}),e.jsx("span",{children:h?n==="zh"?"展开课程内容":"Expand Content":n==="zh"?"折叠课程内容":"Collapse Content"})]}),e.jsxs("button",{onClick:()=>T("whiteboard"),className:N("whiteboard"),title:I&&n==="zh"?"锁定中:白板为只读跟随模式":L&&n==="zh"?"答题锁定中:请在此页面完成作答":void 0,children:["Interactive Whiteboard",I&&s==="whiteboard"&&e.jsxs("span",{className:"ml-1.5 text-xs font-bold text-indigo-500",children:["🔒 ",n==="zh"?"只读":"RO"]}),!I&&L&&s==="whiteboard"&&e.jsxs("span",{className:"ml-1.5 text-xs font-bold text-amber-600",children:["✏️ ",n==="zh"?"答题锁定":"Answering"]})]}),e.jsx("button",{onClick:()=>T("courseware"),className:N("courseware"),children:"Interactive Courseware Viewer"}),e.jsx("button",{onClick:()=>T("assignment"),className:N("assignment"),children:n==="zh"?"作业提交与互评":"Assignments & Peer Reviews"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{slot:"student.lesson.tool",slotProps:{lessonId:u,studentId:P,activeSegmentId:g,lang:n}}),e.jsx("button",{onClick:()=>p(o=>o==="right"?"none":"right"),className:"p-1 hover:bg-gray-100 text-subtle hover:text-main rounded transition-colors cursor-pointer flex items-center gap-1",title:a==="right"?"退出全屏":"全屏",children:a==="right"?e.jsxs(e.Fragment,{children:[e.jsx(te,{size:13}),e.jsx("span",{className:"text-xs font-medium",children:"退出全屏"})]}):e.jsxs(e.Fragment,{children:[e.jsx(se,{size:13}),e.jsx("span",{className:"text-xs font-medium",children:"全屏"})]})})]})]}),C?e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-amber-800 bg-amber-50/60 rounded-xl border border-amber-200 gap-3",children:[e.jsxs("div",{className:"text-sm font-semibold flex items-center gap-2",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-amber-500 animate-pulse"}),e.jsx("span",{children:n==="zh"?"本教学环节尚未解锁":"This segment is not unlocked yet"})]}),e.jsx("p",{className:"text-xs text-amber-700 dark:text-amber-400 max-w-md text-center",children:n==="zh"?"您尚未满足本教学环节的进入门禁条件,请完成前置任务或等待教师统一推进。":"You have not met the gate conditions for this segment yet. Please complete prerequisites or wait for the teacher."}),e.jsx(_,{slot:"student.segment.gate_fallback",slotProps:{lessonId:u,activeSegmentId:g,studentId:P,contentSegmentId:k,lang:n}})]}):null,!C&&s==="whiteboard"&&e.jsx(pe,{lessonId:u,elements:v,userRole:d,readOnly:I,followRemoteFullscreen:!0,activeSegmentId:D,onSegmentSync:o=>{k!==void 0&&k!==g||r(o)},onElementUpdate:async()=>{},onElementDelete:async o=>{I||u&&(await fetch(`/api/lessons/${u}/whiteboard/${o}`,{method:"DELETE"}),f(u))},onClearBoard:async()=>{I||u&&(await fetch(`/api/lessons/${u}/whiteboard`,{method:"DELETE"}),f(u))},onElementAdd:async()=>{},onRefresh:()=>{u&&f(u)}}),!C&&s==="courseware"&&e.jsxs("div",{className:"flex-1 flex gap-4 min-h-0",children:[e.jsxs("div",{className:"w-48 flex-shrink-0 bg-gray-50 border border-gray-200 rounded-lg p-3 flex flex-col min-h-0",children:[e.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-gray-500 mb-2 border-b border-gray-200 pb-2",children:"Cloud Apps"}),e.jsxs("div",{className:"flex-1 overflow-y-auto space-y-1",children:[j!==null&&e.jsxs("button",{onClick:()=>S(null),className:"flex items-center gap-2 p-1.5 text-xs text-indigo-600 w-full hover:bg-gray-200 rounded mb-1 font-medium",children:[e.jsx(Z,{className:"rotate-180",size:14})," Back to Root"]}),z.filter(o=>o.type==="dir").map(o=>e.jsxs("button",{onClick:()=>S(o.id),className:"w-full text-left p-1.5 rounded text-xs text-gray-700 hover:bg-gray-200 flex items-center gap-2 group truncate",title:o.name,children:[e.jsx(de,{size:14,className:"text-indigo-400 shrink-0 group-hover:text-indigo-600"}),e.jsx("span",{className:"truncate",children:o.name})]},o.id)),z.filter(o=>o.type==="file"&&(o.name.endsWith(".html")||o.name.endsWith(".htm")||o.content?.includes("<html"))).length===0?e.jsx("div",{className:"text-xs text-center text-gray-400 italic py-4",children:"No interactive HTML apps found."}):z.filter(o=>o.type==="file"&&(o.name.endsWith(".html")||o.name.endsWith(".htm")||o.content?.includes("<html"))).map(o=>e.jsxs("button",{onClick:()=>F(o.id),className:`w-full text-left p-2 rounded text-xs flex items-center gap-2 truncate transition-colors ${M===o.id?"bg-indigo-100 text-indigo-700 font-medium":"text-gray-600 hover:bg-gray-100"}`,title:o.name,children:[e.jsx(ce,{size:14,className:"shrink-0"}),e.jsx("span",{className:"truncate",children:o.name})]},o.id))]}),e.jsx("div",{className:"mt-2 text-xs text-gray-400 leading-tight",children:"Note: Showing HTML courseware from current OS drive directory. Ask agent to generate courseware."})]}),e.jsx("div",{className:"flex-1 relative bg-white min-h-0",children:e.jsx(ke,{coursewareId:M,onClose:()=>F(null)})})]}),!C&&s==="assignment"&&u&&P&&e.jsx(ye,{lessonId:u,studentId:P,lang:n,addToast:B})]})}function Se({access:c,lang:t}){if(!c.segmentId)return null;if(c.status==="loading"||c.status==="idle")return e.jsx("div",{className:"rounded-xl border border-slate-200 bg-slate-50 px-3 py-2 text-xs text-slate-600",role:"status",children:t==="zh"?"正在核对进入条件":"Checking entry conditions"});if(c.status!=="locked")return null;const m=c.gates.filter(i=>!i.allowed);return e.jsx("div",{"data-testid":"segment-gate-lock",role:"status",className:"rounded-xl border border-amber-300 bg-amber-50 px-3 py-2.5 text-xs text-amber-900",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(V,{size:14,className:"mt-0.5 shrink-0 text-amber-700"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"font-bold",children:t==="zh"?"本环节尚未解锁":"This segment is locked"}),e.jsx("p",{className:"mt-0.5 leading-snug",children:c.reason||(t==="zh"?"未满足进入条件":"Conditions not met")}),m.length>0&&e.jsx("ul",{className:"mt-1.5 space-y-0.5",children:m.map(i=>e.jsxs("li",{children:[i.reason||i.type,i.progress?`(${i.progress.current}/${i.progress.target}${i.progress.unit||""})`:""]},`${i.type}-${i.reason||""}`))})]})]})})}const q={status:"idle",allowed:!0,gates:[],visibleSegmentId:null,segmentId:null};function G(c,t){return{status:"locked",allowed:!1,reason:t,gates:[],visibleSegmentId:null,segmentId:c}}function Ce(c,t){const[m,i]=y.useState(q),x=y.useCallback(async()=>{if(!c||!t){i(q);return}i(s=>s.segmentId===t&&(s.status==="open"||s.status==="locked")?s:{...s,status:"loading",segmentId:t});try{const s=await fetch(`/api/lessons/${encodeURIComponent(c)}/segment-access`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({targetSegmentId:t})}),l=await s.json().catch(()=>null);if(typeof l?.allowed=="boolean"){const h=Array.isArray(l.gates)?l.gates:[];i({status:l.allowed?"open":"locked",allowed:l.allowed,reason:typeof l.reason=="string"?l.reason:void 0,progress:l.progress,gates:h,visibleSegmentId:typeof l.visibleSegmentId=="string"?l.visibleSegmentId:l.allowed?t:null,segmentId:t});return}i(G(t,s.ok?"进入条件返回了无法识别的结果":`进入条件暂时无法核对(HTTP ${s.status})`))}catch{i(G(t,"进入条件服务不可达,已暂时锁定"))}},[c,t]);return y.useEffect(()=>{x()},[x]),y.useEffect(()=>{const s=()=>{x()};window.addEventListener("openlearn:segment-gate-changed",s);const l=Q.subscribe("QuizSubmitted",s),h=Q.subscribe("assignment.submitted",s);return()=>{window.removeEventListener("openlearn:segment-gate-changed",s),l(),h()}},[x]),y.useEffect(()=>{if(m.status!=="locked"||!c||!t)return;const s=window.setInterval(()=>{x()},5e3);return()=>window.clearInterval(s)},[m.status,c,t,x]),m}function ze({isOpen:c,onClose:t,classId:m,lessonId:i,studentId:x,lang:s="zh",onCheckinSuccess:l,addToast:h}){const[b,n]=y.useState(null),[a,p]=y.useState(!1),[u,v]=y.useState(null),d=s==="zh";if(y.useEffect(()=>{c&&v(null)},[c]),!c)return null;const g=async r=>{const f=b;if(f){if(!m){v(d?"未检测到当前班级信息,暂时无法打卡":"No class found, unable to check in");return}p(!0),v(null);try{const j=await fetch(`/api/classes/${encodeURIComponent(m)}/checkin/icebreaker`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({mood:f,lessonId:i||void 0})});if(!j.ok){const z=await j.json().catch(()=>({}));throw new Error(z.error||`HTTP ${j.status}`)}const S=await j.json();try{const z=`icebreaker_checked_${x||"cur"}_${m}_${i||"today"}`;sessionStorage.setItem(z,f)}catch{}h&&h(d?"打卡成功!":"Check-in successful!",d?"老师已收到你的课前心态,祝本节课收获满满~":"Your mood has been shared with teacher.","success"),l&&l(S.stats),t()}catch(j){v(j.message||(d?"打卡失败,请重试":"Check-in failed, please retry"))}finally{p(!1)}}},k=()=>{try{const r=`icebreaker_skipped_${x||"cur"}_${m}_${i||"today"}`;sessionStorage.setItem(r,"1")}catch{}t()},w=[{id:"fullPower",label:d?"充满电":"Full Power",sub:d?"精力充沛,准备好迎接挑战!":"Energetic and ready to learn!",icon:e.jsx(he,{className:"w-6 h-6 text-amber-500 animate-pulse"}),color:"hover:border-amber-400 hover:bg-amber-50/50 dark:hover:bg-amber-950/20",activeBorder:"border-amber-500 ring-2 ring-amber-400/30",activeBg:"bg-amber-50/80 dark:bg-amber-950/40"},{id:"needCoffee",label:d?"需要咖啡":"Need Coffee",sub:d?"稍显疲倦,需要唤醒状态~":"A bit tired, getting warmed up~",icon:e.jsx(be,{className:"w-6 h-6 text-amber-700 dark:text-amber-300"}),color:"hover:border-amber-600 hover:bg-amber-50/50 dark:hover:bg-amber-950/20",activeBorder:"border-amber-600 ring-2 ring-amber-600/30",activeBg:"bg-amber-50/80 dark:bg-amber-950/40"},{id:"needHelp",label:d?"需要帮助":"Need Help",sub:d?"有点吃力,希望老师重点关照!":"Need support, please guide me!",icon:e.jsx(ge,{className:"w-6 h-6 text-rose-500"}),color:"hover:border-rose-400 hover:bg-rose-50/50 dark:hover:bg-rose-950/20",activeBorder:"border-rose-500 ring-2 ring-rose-400/30",activeBg:"bg-rose-50/80 dark:bg-rose-950/40"}];return e.jsx("div",{"data-testid":"student-icebreaker-modal",className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/50 backdrop-blur-xs animate-in fade-in duration-200",role:"dialog","aria-modal":"true","aria-labelledby":"icebreaker-title",children:e.jsxs("div",{className:"relative w-full max-w-md rounded-2xl bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-800 shadow-2xl p-6 overflow-hidden",children:[e.jsx("div",{className:"absolute -top-16 -right-16 w-36 h-36 bg-amber-400/10 rounded-full blur-2xl pointer-events-none"}),e.jsx("div",{className:"absolute -bottom-16 -left-16 w-36 h-36 bg-indigo-500/10 rounded-full blur-2xl pointer-events-none"}),e.jsxs("div",{className:"flex items-start justify-between pb-3 border-b border-gray-100 dark:border-gray-800/80",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xl",children:"✨"}),e.jsx("h2",{id:"icebreaker-title",className:"text-lg font-bold text-gray-900 dark:text-gray-100",children:d?"课前破冰心情打卡":"Pre-Class Icebreaker"})]}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:d?"分享你此刻的心态,帮助老师更好地调整上课节奏":"Share your status so the teacher can tailor the lesson"})]}),e.jsx("button",{type:"button",onClick:k,className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 p-1 rounded-lg transition-colors cursor-pointer","aria-label":d?"跳过":"Skip",children:e.jsx(me,{size:18})})]}),u&&e.jsxs("div",{className:"mt-3 p-2.5 rounded-lg bg-rose-50 dark:bg-rose-950/40 border border-rose-200 dark:border-rose-900/50 text-rose-700 dark:text-rose-300 text-xs flex items-center gap-2",children:[e.jsx("span",{className:"shrink-0",children:"⚠️"}),e.jsx("span",{children:u})]}),e.jsx("div",{className:"mt-4 space-y-2.5",children:w.map(r=>{const f=b===r.id;return e.jsxs("button",{type:"button","data-testid":`mood-option-${r.id}`,onClick:()=>n(r.id),className:`w-full text-left p-3.5 rounded-xl border transition-all cursor-pointer flex items-center justify-between gap-3 ${f?`${r.activeBorder} ${r.activeBg}`:`border-gray-200 dark:border-gray-800 bg-gray-50/50 dark:bg-gray-800/40 ${r.color}`}`,children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("div",{className:"shrink-0 p-2 rounded-lg bg-white dark:bg-gray-800 shadow-2xs border border-gray-100 dark:border-gray-700",children:r.icon}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:r.label}),e.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 truncate mt-0.5",children:r.sub})]})]}),f&&e.jsx(ue,{size:18,className:"shrink-0 text-indigo-600 dark:text-indigo-400"})]},r.id)})}),e.jsxs("div",{className:"mt-6 pt-3 border-t border-gray-100 dark:border-gray-800/80 flex items-center justify-between gap-3",children:[e.jsx("button",{type:"button","data-testid":"icebreaker-skip-btn",onClick:k,className:"text-xs text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 px-3 py-2 rounded-lg transition-colors cursor-pointer",children:d?"稍后再说 / 跳过":"Skip for now"}),e.jsx("button",{type:"button","data-testid":"icebreaker-submit-btn",disabled:!b||a,onClick:()=>g(),className:`inline-flex items-center justify-center gap-1.5 px-5 py-2 rounded-xl text-xs font-bold transition-all shadow-xs cursor-pointer ${!b||a?"bg-gray-200 dark:bg-gray-800 text-gray-400 cursor-not-allowed":"bg-indigo-600 hover:bg-indigo-700 text-white shadow-indigo-500/20"}`,children:a?e.jsxs(e.Fragment,{children:[e.jsx(xe,{size:14,className:"animate-spin"}),e.jsx("span",{children:d?"提交中...":"Submitting..."})]}):e.jsx("span",{children:d?"确认打卡":"Check In"})})]})]})})}function Oe(c){const{students:t,activeStudentId:m,isStudentLocked:i=!1,isNavigationLocked:x,isInteractionLocked:s,lockMode:l,setStudentViewStatus:h,setSelectedLesson:b,lessons:n,selectedLesson:a,studentFullscreenPanel:p,setStudentFullscreenPanel:u,timelineSegments:v,lang:d,activeSegmentId:g,setActiveSegmentId:k,localProgressPercent:w,setLocalProgressPercent:r,updateStudentProgress:f,isStudentLessonContentCollapsed:j,setIsStudentLessonContentCollapsed:S,studentLessonTab:z,setStudentLessonTab:M,elements:F,activeRole:P,fetchElements:B,currentVfsParent:L,setCurrentVfsParent:I,vfsNodes:$,studentSelectedCourseware:T,setStudentSelectedCourseware:D,addToast:C}=c,N=Ce(a,g),re=!!g&&(N.status==="idle"||N.status==="loading")||N.status==="locked"&&!N.visibleSegmentId,ne=N.status==="locked"&&N.visibleSegmentId?N.visibleSegmentId:g,[ae,H]=y.useState(!1),[oe,ie]=y.useState(null),U=X(E=>E.activeSession),A=oe||(U?.lessonId===a?U.classId:null);return y.useEffect(()=>{if(!(!A||!a))try{const E=`icebreaker_checked_${m||"cur"}_${A}_${a}`,R=`icebreaker_skipped_${m||"cur"}_${A}_${a}`;!sessionStorage.getItem(E)&&!sessionStorage.getItem(R)&&H(!0)}catch{}},[A,a,m]),y.useEffect(()=>{if(!a||typeof fetch!="function")return;let E=!1;const R=async()=>{try{const J=await fetch(`/api/classroom/sessions/${encodeURIComponent(a)}`,{credentials:"same-origin"});if(!J.ok||E)return;const Y=await J.json(),O=Y?.session?.current_segment_id,W=Y?.session?.class_id;W&&typeof W=="string"&&ie(W),typeof O=="string"&&O&&O!==g&&k(O)}catch{}};R();const le=window.setInterval(()=>{R()},2500);return()=>{E=!0,window.clearInterval(le)}},[a,g,k]),e.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[e.jsx(je,{students:t,activeStudentId:m,isStudentLocked:x??i,lockMode:l,setStudentViewStatus:h,setSelectedLesson:b,lessons:n,selectedLesson:a,addToast:C,lang:d,onOpenIcebreaker:()=>H(!0)}),e.jsx(ve,{lessonId:a,lang:d,addToast:C}),e.jsx(Se,{access:N,lang:d}),e.jsxs("div",{className:"flex-1 flex gap-6 min-h-0 bg-surface border border-theme rounded-xl p-4 shadow-sm text-main",children:[e.jsx(we,{students:t,activeStudentId:m,isStudentLocked:i,studentFullscreenPanel:p,setStudentFullscreenPanel:u,timelineSegments:v,lang:d,activeSegmentId:g,setActiveSegmentId:k,localProgressPercent:w,setLocalProgressPercent:r,updateStudentProgress:f,selectedLesson:a,lessons:n,isStudentLessonContentCollapsed:j,addToast:C,segmentAccess:N}),e.jsx(Ne,{isStudentLocked:i,isNavigationLocked:x,isInteractionLocked:s,lockMode:l,studentLessonTab:z,setStudentLessonTab:M,isStudentLessonContentCollapsed:j,setIsStudentLessonContentCollapsed:S,lang:d,studentFullscreenPanel:p,setStudentFullscreenPanel:u,selectedLesson:a,elements:F,activeRole:P,activeSegmentId:g,contentSegmentId:ne,blockSegmentContent:re,setActiveSegmentId:k,fetchElements:B,currentVfsParent:L,setCurrentVfsParent:I,vfsNodes:$,studentSelectedCourseware:T,setStudentSelectedCourseware:D,activeStudentId:m,addToast:C})]}),e.jsx(_,{slot:"student.lesson.notes_addon",slotProps:{lessonId:a,studentId:m,activeSegmentId:g,lang:d}}),e.jsx(_,{slot:"student.lesson.toolbox",slotProps:{lessonId:a,studentId:m,lang:d}}),e.jsx(ze,{isOpen:ae,onClose:()=>H(!1),classId:A,lessonId:a,studentId:m,lang:d,addToast:C})]})}export{Oe as StudentLessonView};
|