@hydralms/components 0.1.3 → 0.3.0

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.
Files changed (344) hide show
  1. package/dist/StudentProfile-BVfZMbnV.cjs +1 -0
  2. package/dist/StudentProfile-DeMxdrL3.js +3275 -0
  3. package/dist/assessment-toolbar/assessment-toolbar.d.ts +1 -1
  4. package/dist/assessment-toolbar/index.d.ts +5 -1
  5. package/dist/assessment-toolbar/question-header-bar.d.ts +2 -0
  6. package/dist/assessment-toolbar/question-materials-drawer.d.ts +2 -0
  7. package/dist/assessment-toolbar/question-navigator.d.ts +1 -1
  8. package/dist/assessment-toolbar/timer-display.d.ts +1 -1
  9. package/dist/assessment-toolbar/types.d.ts +52 -4
  10. package/dist/assessment-toolbar/use-countdown.d.ts +43 -0
  11. package/dist/common/index.d.ts +3 -1
  12. package/dist/common/pagination.d.ts +26 -0
  13. package/dist/common/stepper.d.ts +6 -0
  14. package/dist/common/types.d.ts +38 -0
  15. package/dist/components.css +1 -1
  16. package/dist/content/attachment-list.d.ts +6 -0
  17. package/dist/content/audio-player.d.ts +22 -0
  18. package/dist/content/code-block.d.ts +30 -0
  19. package/dist/content/content-block.d.ts +1 -1
  20. package/dist/content/embed-block.d.ts +28 -0
  21. package/dist/content/index.d.ts +8 -1
  22. package/dist/content/types.d.ts +63 -0
  23. package/dist/curriculum/course-card.d.ts +51 -0
  24. package/dist/curriculum/curriculum-item.d.ts +1 -1
  25. package/dist/curriculum/index.d.ts +2 -0
  26. package/dist/curriculum/types.d.ts +2 -2
  27. package/dist/index.cjs +1 -1
  28. package/dist/index.d.ts +1 -0
  29. package/dist/index.js +597 -308
  30. package/dist/license/HydraContext.d.ts +16 -0
  31. package/dist/license/ProBadge.d.ts +6 -0
  32. package/dist/license/index.d.ts +7 -0
  33. package/dist/license/tiers.d.ts +3 -0
  34. package/dist/license/useHydraLicense.d.ts +6 -0
  35. package/dist/license/validate.d.ts +13 -0
  36. package/dist/license/withProGate.d.ts +6 -0
  37. package/dist/modules/AssignmentModule/AssignmentModule.d.ts +5 -0
  38. package/dist/modules/AssignmentModule/types.d.ts +69 -0
  39. package/dist/modules/CertificateModule/CertificateModule.d.ts +5 -0
  40. package/dist/modules/CertificateModule/types.d.ts +51 -0
  41. package/dist/modules/CourseCatalogModule/CourseCatalogModule.d.ts +5 -0
  42. package/dist/modules/CourseCatalogModule/types.d.ts +43 -0
  43. package/dist/modules/CoursePlayer/CoursePlayer.d.ts +4 -1
  44. package/dist/modules/DiscussionModule/DiscussionModule.d.ts +5 -0
  45. package/dist/modules/DiscussionModule/types.d.ts +47 -0
  46. package/dist/modules/ExamModule/ExamModule.d.ts +5 -0
  47. package/dist/modules/ExamModule/types.d.ts +55 -0
  48. package/dist/modules/FlashcardLab/FlashcardLab.d.ts +4 -1
  49. package/dist/modules/FlashcardLab/types.d.ts +2 -0
  50. package/dist/modules/GradeCenterModule/GradeCenterModule.d.ts +5 -0
  51. package/dist/modules/GradeCenterModule/types.d.ts +56 -0
  52. package/dist/modules/QuizModule/QuizModule.d.ts +4 -1
  53. package/dist/modules/QuizModule/types.d.ts +10 -14
  54. package/dist/modules/StudentDashboardModule/StudentDashboardModule.d.ts +5 -0
  55. package/dist/modules/StudentDashboardModule/types.d.ts +54 -0
  56. package/dist/modules/StudentProfileModule/StudentProfileModule.d.ts +5 -0
  57. package/dist/modules/StudentProfileModule/types.d.ts +43 -0
  58. package/dist/modules/SurveyModule/SurveyModule.d.ts +5 -0
  59. package/dist/modules/SurveyModule/types.d.ts +51 -0
  60. package/dist/modules/_shared/assessment-intro.d.ts +16 -0
  61. package/dist/modules/_shared/assessment-results.d.ts +23 -0
  62. package/dist/modules/_shared/types.d.ts +10 -0
  63. package/dist/modules/_shared/use-timer.d.ts +9 -0
  64. package/dist/modules/index.d.ts +18 -0
  65. package/dist/modules.cjs +1 -0
  66. package/dist/modules.js +1834 -0
  67. package/dist/progress/achievement-badge.d.ts +6 -0
  68. package/dist/progress/activity-timeline.d.ts +6 -0
  69. package/dist/progress/index.d.ts +4 -1
  70. package/dist/progress/stat-card.d.ts +1 -1
  71. package/dist/progress/streak-badge.d.ts +6 -0
  72. package/dist/progress/types.d.ts +99 -0
  73. package/dist/provider/HydraProvider.d.ts +5 -1
  74. package/dist/questions/choice.d.ts +1 -1
  75. package/dist/questions/confidence-indicator.d.ts +37 -0
  76. package/dist/questions/essay.d.ts +2 -2
  77. package/dist/questions/fill-in-the-blank.d.ts +1 -1
  78. package/dist/questions/hotspot.d.ts +21 -0
  79. package/dist/questions/index.d.ts +11 -1
  80. package/dist/questions/inline-choice.d.ts +21 -0
  81. package/dist/questions/matching.d.ts +22 -0
  82. package/dist/questions/multiple-choice.d.ts +1 -1
  83. package/dist/questions/numeric.d.ts +11 -0
  84. package/dist/questions/ordering.d.ts +12 -0
  85. package/dist/questions/question-renderer.d.ts +1 -1
  86. package/dist/questions/scenario.d.ts +23 -0
  87. package/dist/questions/scoring.d.ts +22 -0
  88. package/dist/questions/spreadsheet.d.ts +29 -0
  89. package/dist/questions/true-false.d.ts +1 -1
  90. package/dist/questions/types.d.ts +106 -1
  91. package/dist/questions/use-drag-reorder.d.ts +17 -0
  92. package/dist/sections/AnnouncementFeed/AnnouncementFeed.d.ts +1 -1
  93. package/dist/sections/AnnouncementFeed/types.d.ts +15 -1
  94. package/dist/sections/AssessmentReview/AssessmentReview.d.ts +1 -1
  95. package/dist/sections/AssessmentReview/types.d.ts +6 -0
  96. package/dist/sections/AssignmentSubmission/AssignmentSubmission.d.ts +1 -1
  97. package/dist/sections/AssignmentSubmission/types.d.ts +6 -0
  98. package/dist/sections/CertificateViewer/CertificateViewer.d.ts +1 -1
  99. package/dist/sections/CertificateViewer/certificate-variants.d.ts +42 -0
  100. package/dist/sections/CertificateViewer/types.d.ts +13 -5
  101. package/dist/sections/CourseCatalog/CourseCatalog.d.ts +2 -0
  102. package/dist/sections/CourseCatalog/types.d.ts +80 -0
  103. package/dist/sections/CourseOutline/CourseOutline.d.ts +1 -1
  104. package/dist/sections/CourseOutline/types.d.ts +6 -0
  105. package/dist/sections/DiscussionThread/DiscussionThread.d.ts +1 -1
  106. package/dist/sections/DiscussionThread/types.d.ts +6 -0
  107. package/dist/sections/EnrollmentWizard/EnrollmentWizard.d.ts +2 -0
  108. package/dist/sections/EnrollmentWizard/types.d.ts +66 -0
  109. package/dist/sections/ExamSession/ExamSession.d.ts +1 -1
  110. package/dist/sections/ExamSession/types.d.ts +12 -1
  111. package/dist/sections/FlashcardStudySession/FlashcardStudySession.d.ts +1 -1
  112. package/dist/sections/FlashcardStudySession/types.d.ts +6 -0
  113. package/dist/sections/ForumBoard/ForumBoard.d.ts +8 -0
  114. package/dist/sections/ForumBoard/types.d.ts +78 -0
  115. package/dist/sections/GradebookTable/GradebookTable.d.ts +1 -1
  116. package/dist/sections/GradebookTable/types.d.ts +14 -0
  117. package/dist/sections/LecturePlayer/LecturePlayer.d.ts +1 -1
  118. package/dist/sections/LecturePlayer/types.d.ts +8 -0
  119. package/dist/sections/LessonPage/LessonPage.d.ts +1 -1
  120. package/dist/sections/LessonPage/types.d.ts +6 -0
  121. package/dist/sections/PracticeQuiz/PracticeQuiz.d.ts +1 -1
  122. package/dist/sections/PracticeQuiz/types.d.ts +6 -0
  123. package/dist/sections/ProgressDashboard/ProgressDashboard.d.ts +1 -1
  124. package/dist/sections/ProgressDashboard/types.d.ts +6 -0
  125. package/dist/sections/QuizSession/QuizSession.d.ts +1 -1
  126. package/dist/sections/QuizSession/types.d.ts +12 -1
  127. package/dist/sections/RequirementsChecklist/RequirementsChecklist.d.ts +8 -0
  128. package/dist/sections/RequirementsChecklist/types.d.ts +43 -0
  129. package/dist/sections/ResourceLibrary/ResourceLibrary.d.ts +1 -1
  130. package/dist/sections/ResourceLibrary/types.d.ts +15 -1
  131. package/dist/sections/RubricView/RubricView.d.ts +9 -0
  132. package/dist/sections/RubricView/types.d.ts +56 -0
  133. package/dist/sections/ScrollableQuiz/ScrollableQuiz.d.ts +1 -1
  134. package/dist/sections/ScrollableQuiz/types.d.ts +6 -0
  135. package/dist/sections/StudentProfile/StudentProfile.d.ts +2 -0
  136. package/dist/sections/StudentProfile/types.d.ts +98 -0
  137. package/dist/sections/SurveyForm/SurveyForm.d.ts +1 -1
  138. package/dist/sections/SurveyForm/types.d.ts +6 -0
  139. package/dist/sections/_shared/merge-answers.d.ts +9 -0
  140. package/dist/sections/_shared/section-shell.d.ts +20 -0
  141. package/dist/sections/_shared/use-assessment-session.d.ts +30 -0
  142. package/dist/sections/index.d.ts +13 -1
  143. package/dist/sections.cjs +1 -1
  144. package/dist/sections.js +282 -1786
  145. package/dist/social/post-card.d.ts +1 -1
  146. package/dist/tabs-BsfVo2Bl.cjs +173 -0
  147. package/dist/tabs-BuY1iNJE.js +22305 -0
  148. package/dist/ui/alert.d.ts +1 -1
  149. package/dist/ui/badge.d.ts +1 -1
  150. package/dist/ui/button.d.ts +1 -1
  151. package/dist/ui/drawer.d.ts +84 -0
  152. package/dist/ui/index.d.ts +5 -0
  153. package/dist/ui/progress.d.ts +1 -1
  154. package/dist/ui/rich-text-editor.d.ts +32 -0
  155. package/dist/ui/rich-text-toolbar.d.ts +8 -0
  156. package/dist/ui/toast.d.ts +43 -0
  157. package/dist/utils/array-utils.d.ts +4 -0
  158. package/dist/utils/debounce.d.ts +5 -1
  159. package/dist/utils/flatten-leaves.d.ts +6 -0
  160. package/dist/utils/format-file-size.d.ts +1 -0
  161. package/dist/utils/format-timestamp.d.ts +1 -0
  162. package/dist/utils/is-empty-html.d.ts +5 -0
  163. package/dist/utils/pick-palette-color.d.ts +19 -0
  164. package/dist/utils/shuffle.d.ts +1 -0
  165. package/dist/utils/string-utils.d.ts +12 -0
  166. package/dist/video/types.d.ts +15 -0
  167. package/dist/video/video-bookmark.d.ts +1 -1
  168. package/dist/video/video-player.d.ts +1 -1
  169. package/dist/video/video-playlist-item.d.ts +1 -1
  170. package/dist/withProGate-BWqcKdPM.js +137 -0
  171. package/dist/withProGate-DX6XqKLp.cjs +1 -0
  172. package/package.json +40 -137
  173. package/src/assessment-toolbar/assessment-toolbar.tsx +54 -49
  174. package/src/assessment-toolbar/index.ts +6 -0
  175. package/src/assessment-toolbar/question-header-bar.tsx +61 -0
  176. package/src/assessment-toolbar/question-materials-drawer.tsx +55 -0
  177. package/src/assessment-toolbar/question-navigator.tsx +13 -36
  178. package/src/assessment-toolbar/timer-display.tsx +6 -5
  179. package/src/assessment-toolbar/types.ts +54 -4
  180. package/src/assessment-toolbar/use-countdown.ts +153 -0
  181. package/src/common/empty-state.tsx +1 -0
  182. package/src/common/index.ts +5 -0
  183. package/src/common/pagination.tsx +135 -0
  184. package/src/common/search-input.tsx +8 -6
  185. package/src/common/stepper.tsx +100 -0
  186. package/src/common/types.ts +41 -0
  187. package/src/content/attachment-list.tsx +92 -0
  188. package/src/content/audio-player.tsx +196 -0
  189. package/src/content/code-block.tsx +113 -0
  190. package/src/content/content-block.tsx +68 -2
  191. package/src/content/embed-block.tsx +78 -0
  192. package/src/content/file-upload-zone.tsx +11 -6
  193. package/src/content/index.ts +9 -0
  194. package/src/content/types.ts +46 -0
  195. package/src/curriculum/course-card.tsx +199 -0
  196. package/src/curriculum/curriculum-item.tsx +9 -5
  197. package/src/curriculum/curriculum-tree.tsx +20 -13
  198. package/src/curriculum/index.ts +2 -0
  199. package/src/curriculum/types.ts +2 -2
  200. package/src/feedback/feedback-banner.tsx +12 -14
  201. package/src/flashcards/flashcard-deck.tsx +1 -9
  202. package/src/flashcards/flashcard.tsx +29 -9
  203. package/src/index.ts +3 -0
  204. package/src/license/HydraContext.tsx +62 -0
  205. package/src/license/ProBadge.tsx +43 -0
  206. package/src/license/index.ts +7 -0
  207. package/src/license/tiers.ts +24 -0
  208. package/src/license/useHydraLicense.ts +10 -0
  209. package/src/license/validate.ts +90 -0
  210. package/src/license/withProGate.tsx +21 -0
  211. package/src/modules/AssignmentModule/AssignmentModule.tsx +314 -0
  212. package/src/modules/AssignmentModule/types.ts +77 -0
  213. package/src/modules/CertificateModule/CertificateModule.tsx +173 -0
  214. package/src/modules/CertificateModule/types.ts +49 -0
  215. package/src/modules/CourseCatalogModule/CourseCatalogModule.tsx +126 -0
  216. package/src/modules/CourseCatalogModule/types.ts +47 -0
  217. package/src/modules/CoursePlayer/CoursePlayer.tsx +80 -69
  218. package/src/modules/DiscussionModule/DiscussionModule.tsx +145 -0
  219. package/src/modules/DiscussionModule/types.ts +54 -0
  220. package/src/modules/ExamModule/ExamModule.tsx +151 -0
  221. package/src/modules/ExamModule/types.ts +57 -0
  222. package/src/modules/FlashcardLab/FlashcardLab.tsx +39 -21
  223. package/src/modules/FlashcardLab/types.ts +2 -0
  224. package/src/modules/GradeCenterModule/GradeCenterModule.tsx +174 -0
  225. package/src/modules/GradeCenterModule/types.ts +65 -0
  226. package/src/modules/QuizModule/QuizModule.tsx +58 -178
  227. package/src/modules/QuizModule/types.ts +10 -15
  228. package/src/modules/StudentDashboardModule/StudentDashboardModule.tsx +117 -0
  229. package/src/modules/StudentDashboardModule/types.ts +56 -0
  230. package/src/modules/StudentProfileModule/StudentProfileModule.tsx +289 -0
  231. package/src/modules/StudentProfileModule/types.ts +45 -0
  232. package/src/modules/SurveyModule/SurveyModule.tsx +185 -0
  233. package/src/modules/SurveyModule/types.ts +53 -0
  234. package/src/modules/_shared/assessment-intro.tsx +75 -0
  235. package/src/modules/_shared/assessment-results.tsx +133 -0
  236. package/src/modules/_shared/types.ts +11 -0
  237. package/src/modules/_shared/use-timer.ts +49 -0
  238. package/src/modules/index.ts +33 -0
  239. package/src/progress/achievement-badge.tsx +52 -0
  240. package/src/progress/activity-timeline.tsx +84 -0
  241. package/src/progress/grade-indicator.tsx +9 -1
  242. package/src/progress/index.ts +7 -0
  243. package/src/progress/progress-ring.tsx +2 -1
  244. package/src/progress/stat-card.tsx +37 -18
  245. package/src/progress/streak-badge.tsx +35 -0
  246. package/src/progress/types.ts +103 -0
  247. package/src/provider/HydraProvider.tsx +15 -6
  248. package/src/questions/choice.tsx +19 -14
  249. package/src/questions/confidence-indicator.tsx +107 -0
  250. package/src/questions/essay.tsx +28 -28
  251. package/src/questions/fill-in-the-blank.tsx +20 -19
  252. package/src/questions/hotspot.tsx +154 -0
  253. package/src/questions/index.ts +18 -0
  254. package/src/questions/inline-choice.tsx +152 -0
  255. package/src/questions/matching.tsx +229 -0
  256. package/src/questions/multiple-choice.tsx +19 -14
  257. package/src/questions/numeric.tsx +106 -0
  258. package/src/questions/ordering.tsx +167 -0
  259. package/src/questions/question-renderer.tsx +24 -2
  260. package/src/questions/scenario.tsx +140 -0
  261. package/src/questions/scoring.ts +201 -0
  262. package/src/questions/spreadsheet.tsx +260 -0
  263. package/src/questions/true-false.tsx +19 -14
  264. package/src/questions/types.ts +123 -1
  265. package/src/questions/use-drag-reorder.ts +80 -0
  266. package/src/sections/AnnouncementFeed/AnnouncementFeed.tsx +66 -23
  267. package/src/sections/AnnouncementFeed/types.ts +15 -1
  268. package/src/sections/AssessmentReview/AssessmentReview.tsx +50 -2
  269. package/src/sections/AssessmentReview/types.ts +6 -0
  270. package/src/sections/AssignmentSubmission/AssignmentSubmission.tsx +44 -6
  271. package/src/sections/AssignmentSubmission/types.ts +6 -0
  272. package/src/sections/CertificateViewer/CertificateViewer.tsx +215 -60
  273. package/src/sections/CertificateViewer/certificate-variants.tsx +170 -0
  274. package/src/sections/CertificateViewer/types.ts +19 -5
  275. package/src/sections/CourseCatalog/CourseCatalog.tsx +220 -0
  276. package/src/sections/CourseCatalog/types.ts +76 -0
  277. package/src/sections/CourseOutline/CourseOutline.tsx +45 -14
  278. package/src/sections/CourseOutline/types.ts +6 -0
  279. package/src/sections/DiscussionThread/DiscussionThread.tsx +55 -11
  280. package/src/sections/DiscussionThread/types.ts +6 -0
  281. package/src/sections/EnrollmentWizard/EnrollmentWizard.tsx +343 -0
  282. package/src/sections/EnrollmentWizard/types.ts +65 -0
  283. package/src/sections/ExamSession/ExamSession.tsx +125 -82
  284. package/src/sections/ExamSession/types.ts +12 -1
  285. package/src/sections/FlashcardStudySession/FlashcardStudySession.tsx +53 -36
  286. package/src/sections/FlashcardStudySession/types.ts +6 -0
  287. package/src/sections/ForumBoard/ForumBoard.tsx +342 -0
  288. package/src/sections/ForumBoard/types.ts +81 -0
  289. package/src/sections/GradebookTable/GradebookTable.tsx +55 -2
  290. package/src/sections/GradebookTable/types.ts +14 -0
  291. package/src/sections/LecturePlayer/LecturePlayer.tsx +63 -37
  292. package/src/sections/LecturePlayer/types.ts +8 -0
  293. package/src/sections/LessonPage/LessonPage.tsx +40 -13
  294. package/src/sections/LessonPage/types.ts +6 -0
  295. package/src/sections/PracticeQuiz/PracticeQuiz.tsx +119 -98
  296. package/src/sections/PracticeQuiz/types.ts +6 -0
  297. package/src/sections/ProgressDashboard/ProgressDashboard.tsx +121 -67
  298. package/src/sections/ProgressDashboard/types.ts +6 -0
  299. package/src/sections/QuizSession/QuizSession.tsx +115 -67
  300. package/src/sections/QuizSession/types.ts +12 -1
  301. package/src/sections/RequirementsChecklist/RequirementsChecklist.tsx +147 -0
  302. package/src/sections/RequirementsChecklist/types.ts +44 -0
  303. package/src/sections/ResourceLibrary/ResourceLibrary.tsx +68 -17
  304. package/src/sections/ResourceLibrary/types.ts +15 -1
  305. package/src/sections/RubricView/RubricView.tsx +174 -0
  306. package/src/sections/RubricView/types.ts +58 -0
  307. package/src/sections/ScrollableQuiz/ScrollableQuiz.tsx +58 -23
  308. package/src/sections/ScrollableQuiz/types.ts +6 -0
  309. package/src/sections/StudentProfile/StudentProfile.tsx +279 -0
  310. package/src/sections/StudentProfile/types.ts +99 -0
  311. package/src/sections/SurveyForm/SurveyForm.tsx +40 -10
  312. package/src/sections/SurveyForm/types.ts +6 -0
  313. package/src/sections/_shared/merge-answers.ts +22 -0
  314. package/src/sections/_shared/section-shell.tsx +64 -0
  315. package/src/sections/_shared/use-assessment-session.ts +125 -0
  316. package/src/sections/index.ts +42 -1
  317. package/src/social/post-card.tsx +8 -19
  318. package/src/social/user-avatar.tsx +10 -5
  319. package/src/styles/globals.css +52 -41
  320. package/src/ui/badge.tsx +8 -0
  321. package/src/ui/drawer.tsx +600 -0
  322. package/src/ui/index.ts +21 -0
  323. package/src/ui/progress.tsx +4 -0
  324. package/src/ui/rich-text-editor.tsx +119 -0
  325. package/src/ui/rich-text-toolbar.tsx +157 -0
  326. package/src/ui/toast.tsx +170 -0
  327. package/src/utils/array-utils.ts +17 -0
  328. package/src/utils/debounce.ts +8 -2
  329. package/src/utils/flatten-leaves.ts +17 -0
  330. package/src/utils/format-file-size.ts +5 -0
  331. package/src/utils/format-timestamp.ts +13 -0
  332. package/src/utils/is-empty-html.ts +7 -0
  333. package/src/utils/pick-palette-color.ts +33 -0
  334. package/src/utils/shuffle.ts +8 -0
  335. package/src/utils/string-utils.ts +30 -0
  336. package/src/video/types.ts +16 -0
  337. package/src/video/video-bookmark.tsx +4 -3
  338. package/src/video/video-chapter-list.tsx +9 -4
  339. package/src/video/video-player.tsx +24 -5
  340. package/src/video/video-playlist-item.tsx +8 -3
  341. package/src/video/video-thumbnail-card.tsx +4 -0
  342. package/src/video/video-transcript.tsx +8 -5
  343. package/dist/table-BrS5cDQu.js +0 -2510
  344. package/dist/table-D6AkBBEo.cjs +0 -1
@@ -0,0 +1,1834 @@
1
+ import { jsx as e, jsxs as t, Fragment as te } from "react/jsx-runtime";
2
+ import { useState as R, useRef as U, useEffect as L, useCallback as T, useMemo as K } from "react";
3
+ import { HelpCircle as le, Clock as re, CheckCircle2 as X, Play as ae, XCircle as Te, Trophy as se, RotateCcw as ie, BookOpen as Z, Shuffle as he, Layers as Ie, ArrowLeft as J, PanelLeft as je, Check as Le, ChevronLeft as Fe, ChevronRight as Qe, ShieldCheck as $e, ClipboardList as Ye, BarChart3 as ve, FileEdit as fe, Paperclip as xe, FileText as qe, Link as Ge, Award as ee, PartyPopper as We, Bell as Ve, User as He } from "lucide-react";
4
+ import { a as be, Q as _e, F as Je, l as Ke, d as Xe, P as Ze, L as De, g as Oe, e as et, k as tt, G as st, h as we, i as pe, b as rt, R as nt, C as Se, D as lt, f as at, c as ke, A as it, E as ct, j as dt } from "./StudentProfile-DeMxdrL3.js";
5
+ import { C as I, x as j, B as q, a as ne, v as P, ak as D, aw as G, as as _, a$ as ze, c as A, M as ot, R as ut, U as mt, Y as ht, Q as ft, O as xt, a1 as ce, P as pt, d as Ce, e as ye, a8 as Ae, aI as de, aK as oe, aL as V, aJ as H, $ as ge, ax as Ne, aR as gt, b0 as Nt, A as vt } from "./tabs-BuY1iNJE.js";
6
+ import { w as Y } from "./withProGate-BWqcKdPM.js";
7
+ function Me(c) {
8
+ const [N, o] = R(0), l = U(null), f = U(null), i = U(0);
9
+ L(() => (c ? (l.current = Date.now(), f.current = setInterval(() => {
10
+ if (l.current) {
11
+ const a = Math.floor((Date.now() - l.current) / 1e3);
12
+ a !== i.current && (i.current = a, o(a));
13
+ }
14
+ }, 1e3)) : f.current && (clearInterval(f.current), f.current = null), () => {
15
+ f.current && clearInterval(f.current);
16
+ }), [c]);
17
+ const n = T(() => l.current ? Math.floor((Date.now() - l.current) / 1e3) : i.current, []), h = T(() => {
18
+ i.current = 0, o(0), l.current = null;
19
+ }, []);
20
+ return { timeElapsed: N, getFinalElapsed: n, reset: h };
21
+ }
22
+ function Ee({
23
+ icon: c,
24
+ title: N,
25
+ description: o,
26
+ questionCount: l,
27
+ timeLimitSeconds: f,
28
+ passingScore: i,
29
+ startLabel: n,
30
+ onStart: h,
31
+ children: a,
32
+ readOnly: u = !1
33
+ }) {
34
+ return /* @__PURE__ */ e(I, { children: /* @__PURE__ */ t(j, { className: "pt-8 pb-8 text-center", children: [
35
+ /* @__PURE__ */ e("div", { className: "mx-auto mb-4 w-14 h-14 rounded-full bg-primary/10 flex items-center justify-center", children: c }),
36
+ /* @__PURE__ */ e("h2", { className: "text-2xl font-bold text-foreground mb-2", children: N }),
37
+ o && /* @__PURE__ */ e("p", { className: "text-muted-foreground mb-6 max-w-md mx-auto", children: o }),
38
+ a,
39
+ /* @__PURE__ */ t("div", { className: "flex flex-wrap justify-center gap-2 mb-8", children: [
40
+ /* @__PURE__ */ t(q, { variant: "outline", className: "gap-1.5", children: [
41
+ /* @__PURE__ */ e(le, { className: "size-3.5" }),
42
+ l,
43
+ " questions"
44
+ ] }),
45
+ f != null && /* @__PURE__ */ t(q, { variant: "outline", className: "gap-1.5", children: [
46
+ /* @__PURE__ */ e(re, { className: "size-3.5" }),
47
+ ne(f),
48
+ " time limit"
49
+ ] }),
50
+ i !== void 0 && /* @__PURE__ */ t(q, { variant: "outline", className: "gap-1.5", children: [
51
+ /* @__PURE__ */ e(X, { className: "size-3.5" }),
52
+ i,
53
+ "% to pass"
54
+ ] })
55
+ ] }),
56
+ /* @__PURE__ */ t(P, { size: "lg", onClick: h, disabled: u, children: [
57
+ /* @__PURE__ */ e(ae, { className: "size-4 mr-2" }),
58
+ n
59
+ ] })
60
+ ] }) });
61
+ }
62
+ function Be({
63
+ title: c,
64
+ percentage: N,
65
+ passed: o,
66
+ correct: l,
67
+ total: f,
68
+ timeElapsedSeconds: i,
69
+ answers: n,
70
+ questions: h,
71
+ allowRetake: a,
72
+ onRetake: u,
73
+ retakeLabel: x = "Retake",
74
+ showReview: b = !0,
75
+ extraBadges: s,
76
+ readOnly: S = !1
77
+ }) {
78
+ return /* @__PURE__ */ t(te, { children: [
79
+ /* @__PURE__ */ e(I, { children: /* @__PURE__ */ t(j, { className: "pt-8 pb-8", children: [
80
+ /* @__PURE__ */ t("div", { className: "text-center mb-8", children: [
81
+ /* @__PURE__ */ e(
82
+ D,
83
+ {
84
+ value: N,
85
+ size: 140,
86
+ strokeWidth: 10,
87
+ color: o ? "var(--success)" : "var(--destructive)",
88
+ className: "mx-auto mb-4 text-foreground"
89
+ }
90
+ ),
91
+ /* @__PURE__ */ e(
92
+ q,
93
+ {
94
+ variant: o ? "success" : "destructive",
95
+ className: "text-sm px-3 py-1 mb-2",
96
+ children: o ? "Passed" : "Failed"
97
+ }
98
+ ),
99
+ s,
100
+ /* @__PURE__ */ e("h2", { className: "text-xl font-bold text-foreground", children: c })
101
+ ] }),
102
+ /* @__PURE__ */ t("div", { className: "grid grid-cols-2 sm:grid-cols-4 gap-3 mb-8", children: [
103
+ /* @__PURE__ */ e(
104
+ G,
105
+ {
106
+ icon: /* @__PURE__ */ e(X, {}),
107
+ label: "Correct",
108
+ description: "Questions answered right",
109
+ value: `${l}/${f}`,
110
+ accent: "var(--success)"
111
+ }
112
+ ),
113
+ /* @__PURE__ */ e(
114
+ G,
115
+ {
116
+ icon: /* @__PURE__ */ e(Te, {}),
117
+ label: "Incorrect",
118
+ description: "Questions to review",
119
+ value: `${f - l}/${f}`,
120
+ accent: "var(--destructive)"
121
+ }
122
+ ),
123
+ /* @__PURE__ */ e(
124
+ G,
125
+ {
126
+ icon: /* @__PURE__ */ e(se, {}),
127
+ label: "Score",
128
+ description: "Overall percentage",
129
+ value: `${N}%`,
130
+ accent: "var(--palette-3)"
131
+ }
132
+ ),
133
+ /* @__PURE__ */ e(
134
+ G,
135
+ {
136
+ icon: /* @__PURE__ */ e(re, {}),
137
+ label: "Time",
138
+ description: "Total elapsed",
139
+ value: ne(i),
140
+ accent: "var(--palette-1)"
141
+ }
142
+ )
143
+ ] }),
144
+ a && u && !S && /* @__PURE__ */ e("div", { className: "flex justify-center mb-8", children: /* @__PURE__ */ t(P, { variant: "outline", onClick: u, children: [
145
+ /* @__PURE__ */ e(ie, { className: "size-4 mr-2" }),
146
+ x
147
+ ] }) })
148
+ ] }) }),
149
+ b && /* @__PURE__ */ t(te, { children: [
150
+ /* @__PURE__ */ e(_, { className: "my-6" }),
151
+ /* @__PURE__ */ e("h3", { className: "text-lg font-semibold text-foreground mb-4", children: "Question Review" }),
152
+ /* @__PURE__ */ e(
153
+ be,
154
+ {
155
+ questions: h,
156
+ sessionAnswers: n,
157
+ showCorrectAnswers: !0
158
+ }
159
+ )
160
+ ] })
161
+ ] });
162
+ }
163
+ function bt({
164
+ title: c,
165
+ description: N,
166
+ questions: o,
167
+ timeLimitSeconds: l,
168
+ passingScore: f,
169
+ allowRetake: i = !0,
170
+ onComplete: n,
171
+ showReview: h = !0,
172
+ questionMaterials: a,
173
+ readOnly: u = !1,
174
+ className: x,
175
+ style: b
176
+ }) {
177
+ const [s, S] = R({ tag: "intro" }), m = U(null), { timeElapsed: g, getFinalElapsed: v, reset: r } = Me(s.tag === "quiz"), C = U(n);
178
+ C.current = n, L(() => {
179
+ var d;
180
+ (d = m.current) == null || d.focus({ preventScroll: !0 });
181
+ }, [s.tag]);
182
+ const M = T((d) => {
183
+ var B;
184
+ const { correct: p, total: w, percentage: k } = ze(o, d), Q = {
185
+ answers: d,
186
+ correct: p,
187
+ total: w,
188
+ percentage: k,
189
+ passed: f !== void 0 ? k >= f : !0,
190
+ timeElapsedSeconds: v()
191
+ };
192
+ S({ tag: "results", result: Q }), (B = C.current) == null || B.call(C, Q);
193
+ }, [o, f, v]), y = T(() => {
194
+ r(), S({ tag: "intro" });
195
+ }, [r]);
196
+ if (s.tag === "intro")
197
+ return /* @__PURE__ */ e("div", { ref: m, tabIndex: -1, className: A("max-w-2xl mx-auto outline-none", x), style: b, children: /* @__PURE__ */ e(
198
+ Ee,
199
+ {
200
+ icon: /* @__PURE__ */ e(se, { className: "size-7 text-primary" }),
201
+ title: c,
202
+ description: N,
203
+ questionCount: o.length,
204
+ timeLimitSeconds: l,
205
+ passingScore: f,
206
+ startLabel: "Start Quiz",
207
+ onStart: () => S({ tag: "quiz" }),
208
+ readOnly: u
209
+ }
210
+ ) });
211
+ if (s.tag === "quiz")
212
+ return /* @__PURE__ */ e("div", { ref: m, tabIndex: -1, className: A("outline-none", x), style: b, children: /* @__PURE__ */ e(
213
+ _e,
214
+ {
215
+ questions: o,
216
+ onSubmit: M,
217
+ timeElapsedSeconds: g,
218
+ timeLimitSeconds: l,
219
+ questionMaterials: a,
220
+ readOnly: u
221
+ }
222
+ ) });
223
+ const { result: E } = s;
224
+ return /* @__PURE__ */ e("div", { ref: m, tabIndex: -1, className: A("max-w-2xl mx-auto outline-none", x), style: b, children: /* @__PURE__ */ e(
225
+ Be,
226
+ {
227
+ title: c,
228
+ percentage: E.percentage,
229
+ passed: E.passed,
230
+ correct: E.correct,
231
+ total: E.total,
232
+ timeElapsedSeconds: E.timeElapsedSeconds,
233
+ answers: E.answers,
234
+ questions: o,
235
+ allowRetake: i,
236
+ onRetake: y,
237
+ retakeLabel: "Retake Quiz",
238
+ showReview: h,
239
+ readOnly: u
240
+ }
241
+ ) });
242
+ }
243
+ const $t = Y(bt, "QuizModule");
244
+ function wt({
245
+ decks: c = [],
246
+ showShuffleToggle: N = !0,
247
+ defaultShuffled: o = !1,
248
+ allowMultiSelect: l = !0,
249
+ onComplete: f,
250
+ readOnly: i = !1,
251
+ className: n,
252
+ style: h
253
+ }) {
254
+ const [a, u] = R({ tag: "setup" }), [x, b] = R(/* @__PURE__ */ new Set()), [s, S] = R(o), m = U(null), g = U(null);
255
+ L(() => {
256
+ var d;
257
+ (d = g.current) == null || d.focus({ preventScroll: !0 });
258
+ }, [a.tag]);
259
+ function v(d) {
260
+ b((p) => {
261
+ const w = new Set(p);
262
+ return w.has(d) ? w.delete(d) : (l || w.clear(), w.add(d)), w;
263
+ });
264
+ }
265
+ function r() {
266
+ const d = c.filter((w) => x.has(w.uid)), p = d.flatMap((w) => w.cards);
267
+ m.current = Date.now(), u({
268
+ tag: "study",
269
+ cards: p,
270
+ deckUids: d.map((w) => w.uid),
271
+ shuffled: s
272
+ });
273
+ }
274
+ function C() {
275
+ if (a.tag !== "study") return;
276
+ const d = m.current ? Math.floor((Date.now() - m.current) / 1e3) : 0, p = {
277
+ totalCards: a.cards.length,
278
+ decksStudied: a.deckUids.length,
279
+ deckUids: a.deckUids,
280
+ wasShuffled: a.shuffled,
281
+ timeElapsedSeconds: d
282
+ };
283
+ u({ tag: "completion", result: p }), f == null || f(p);
284
+ }
285
+ function M() {
286
+ if (a.tag !== "completion") return;
287
+ const p = c.filter((w) => a.result.deckUids.includes(w.uid)).flatMap((w) => w.cards);
288
+ m.current = Date.now(), u({
289
+ tag: "study",
290
+ cards: p,
291
+ deckUids: a.result.deckUids,
292
+ shuffled: a.result.wasShuffled
293
+ });
294
+ }
295
+ function y() {
296
+ b(/* @__PURE__ */ new Set()), S(o), u({ tag: "setup" });
297
+ }
298
+ if (a.tag === "setup")
299
+ return /* @__PURE__ */ e("div", { ref: g, tabIndex: -1, className: A("max-w-2xl mx-auto outline-none", n), style: h, children: /* @__PURE__ */ e(I, { children: /* @__PURE__ */ t(j, { className: "pt-8 pb-8", children: [
300
+ /* @__PURE__ */ t("div", { className: "text-center mb-6", children: [
301
+ /* @__PURE__ */ e("div", { className: "mx-auto mb-4 w-14 h-14 rounded-full bg-primary/10 flex items-center justify-center", children: /* @__PURE__ */ e(Z, { className: "size-7 text-primary" }) }),
302
+ /* @__PURE__ */ e("h2", { className: "text-2xl font-bold text-foreground mb-2", children: "Choose Your Decks" }),
303
+ /* @__PURE__ */ e("p", { className: "text-muted-foreground text-sm", children: l ? "Select one or more decks to study" : "Select a deck to study" })
304
+ ] }),
305
+ /* @__PURE__ */ e("div", { className: "grid sm:grid-cols-2 lg:grid-cols-3 gap-3 mb-6", children: c.map((d) => {
306
+ const p = x.has(d.uid);
307
+ return /* @__PURE__ */ e(
308
+ I,
309
+ {
310
+ className: A(
311
+ "cursor-pointer transition-all py-0",
312
+ p ? "border-primary ring-1 ring-primary" : "hover:border-muted-foreground/30"
313
+ ),
314
+ onClick: () => v(d.uid),
315
+ children: /* @__PURE__ */ t(j, { className: "py-4", children: [
316
+ /* @__PURE__ */ t("div", { className: "flex items-start justify-between mb-2", children: [
317
+ /* @__PURE__ */ e("h3", { className: "font-semibold text-foreground text-sm", children: d.title }),
318
+ /* @__PURE__ */ t(q, { variant: "secondary", className: "text-xs shrink-0", children: [
319
+ d.cards.length,
320
+ " cards"
321
+ ] })
322
+ ] }),
323
+ d.description && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground line-clamp-2", children: d.description })
324
+ ] })
325
+ },
326
+ d.uid
327
+ );
328
+ }) }),
329
+ /* @__PURE__ */ t("div", { className: "flex items-center justify-between", children: [
330
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
331
+ N && /* @__PURE__ */ t(
332
+ P,
333
+ {
334
+ variant: s ? "secondary" : "outline",
335
+ size: "sm",
336
+ className: "gap-1.5",
337
+ onClick: () => S((d) => !d),
338
+ children: [
339
+ /* @__PURE__ */ e(he, { className: "size-3.5" }),
340
+ "Shuffle"
341
+ ]
342
+ }
343
+ ),
344
+ x.size > 0 && /* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children: [
345
+ c.filter((d) => x.has(d.uid)).reduce((d, p) => d + p.cards.length, 0),
346
+ " ",
347
+ "cards selected"
348
+ ] })
349
+ ] }),
350
+ /* @__PURE__ */ e(
351
+ P,
352
+ {
353
+ onClick: r,
354
+ disabled: x.size === 0 || i,
355
+ children: "Start Studying"
356
+ }
357
+ )
358
+ ] })
359
+ ] }) }) });
360
+ if (a.tag === "study") {
361
+ const d = c.filter((p) => a.deckUids.includes(p.uid)).map((p) => p.title).join(", ");
362
+ return /* @__PURE__ */ e("div", { ref: g, tabIndex: -1, className: A("outline-none", n), style: h, children: /* @__PURE__ */ e(
363
+ Je,
364
+ {
365
+ cards: a.cards,
366
+ title: d,
367
+ shuffled: a.shuffled,
368
+ onComplete: C,
369
+ readOnly: i
370
+ }
371
+ ) });
372
+ }
373
+ const { result: E } = a;
374
+ return /* @__PURE__ */ e("div", { ref: g, tabIndex: -1, className: A("max-w-2xl mx-auto outline-none", n), style: h, children: /* @__PURE__ */ e(I, { children: /* @__PURE__ */ t(j, { className: "pt-8 pb-8", children: [
375
+ /* @__PURE__ */ t("div", { className: "text-center mb-8", children: [
376
+ /* @__PURE__ */ t("div", { className: "relative mx-auto mb-4", children: [
377
+ /* @__PURE__ */ e(
378
+ D,
379
+ {
380
+ value: 100,
381
+ size: 120,
382
+ strokeWidth: 10,
383
+ color: "var(--success)",
384
+ className: "text-foreground",
385
+ label: ""
386
+ }
387
+ ),
388
+ /* @__PURE__ */ e(X, { className: "size-8 text-success absolute inset-0 m-auto" })
389
+ ] }),
390
+ /* @__PURE__ */ e("h2", { className: "text-xl font-bold text-foreground mb-2", children: "Study Session Complete" }),
391
+ /* @__PURE__ */ e("p", { className: "text-muted-foreground text-sm", children: "Great work! Here's your session summary." })
392
+ ] }),
393
+ /* @__PURE__ */ t("div", { className: "grid grid-cols-2 sm:grid-cols-4 gap-3 mb-8", children: [
394
+ /* @__PURE__ */ e(
395
+ G,
396
+ {
397
+ icon: /* @__PURE__ */ e(Ie, {}),
398
+ label: "Cards Studied",
399
+ description: "Total cards reviewed",
400
+ value: String(E.totalCards)
401
+ }
402
+ ),
403
+ /* @__PURE__ */ e(
404
+ G,
405
+ {
406
+ icon: /* @__PURE__ */ e(Z, {}),
407
+ label: "Decks",
408
+ description: "Decks completed",
409
+ value: String(E.decksStudied)
410
+ }
411
+ ),
412
+ /* @__PURE__ */ e(
413
+ G,
414
+ {
415
+ icon: /* @__PURE__ */ e(re, {}),
416
+ label: "Time Spent",
417
+ description: "Session duration",
418
+ value: ne(E.timeElapsedSeconds)
419
+ }
420
+ ),
421
+ /* @__PURE__ */ e(
422
+ G,
423
+ {
424
+ icon: /* @__PURE__ */ e(he, {}),
425
+ label: "Shuffled",
426
+ description: "Card order randomized",
427
+ value: E.wasShuffled ? "Yes" : "No"
428
+ }
429
+ )
430
+ ] }),
431
+ /* @__PURE__ */ t("div", { className: "flex justify-center gap-3", children: [
432
+ /* @__PURE__ */ t(P, { variant: "outline", onClick: y, disabled: i, children: [
433
+ /* @__PURE__ */ e(J, { className: "size-4 mr-2" }),
434
+ "Pick New Deck"
435
+ ] }),
436
+ /* @__PURE__ */ t(P, { onClick: M, disabled: i, children: [
437
+ /* @__PURE__ */ e(ie, { className: "size-4 mr-2" }),
438
+ "Study Again"
439
+ ] })
440
+ ] })
441
+ ] }) }) });
442
+ }
443
+ const Yt = Y(wt, "FlashcardLab");
444
+ function St({
445
+ courseTitle: c,
446
+ curriculum: N,
447
+ progress: o,
448
+ items: l,
449
+ initialItemUid: f,
450
+ onItemComplete: i,
451
+ onItemChange: n,
452
+ sidebarCollapsed: h = !1,
453
+ readOnly: a = !1,
454
+ className: u,
455
+ style: x
456
+ }) {
457
+ const b = U(null), s = K(() => Ke(N), [N]), S = K(
458
+ () => new Map(l.map((z) => [z.uid, z])),
459
+ [l]
460
+ ), [m, g] = R(
461
+ f ?? s[0] ?? ""
462
+ ), [v, r] = R(!h), [C, M] = R(() => o ? new Set(
463
+ o.filter((z) => z.isCompleted).map((z) => z.resourceUid)
464
+ ) : /* @__PURE__ */ new Set()), y = s.indexOf(m), E = y > 0, d = y < s.length - 1, p = C.has(m), w = s.length > 0 ? Math.round(
465
+ s.filter((z) => C.has(z)).length / s.length * 100
466
+ ) : 0, k = S.get(m), Q = K(
467
+ () => (k == null ? void 0 : k.type) === "video" ? { src: k.src, poster: k.poster, title: k.title } : null,
468
+ [k]
469
+ );
470
+ L(() => {
471
+ var z;
472
+ (z = b.current) == null || z.focus({ preventScroll: !0 });
473
+ }, [m]);
474
+ const B = U(n);
475
+ B.current = n;
476
+ const $ = U(i);
477
+ $.current = i;
478
+ const W = T((z) => {
479
+ var F;
480
+ g(z), (F = B.current) == null || F.call(B, z);
481
+ }, []), O = T((z) => {
482
+ (!z.children || z.children.length === 0) && W(z.uid);
483
+ }, [W]), ue = T(() => {
484
+ var z;
485
+ M((F) => new Set(F).add(m)), (z = $.current) == null || z.call($, m);
486
+ }, [m]), me = T(() => {
487
+ const z = s.indexOf(m);
488
+ z < s.length - 1 && W(s[z + 1]);
489
+ }, [s, m, W]), Pe = T(() => {
490
+ const z = s.indexOf(m);
491
+ z > 0 && W(s[z - 1]);
492
+ }, [s, m, W]), Ue = K(() => {
493
+ const z = new Map(
494
+ (o ?? []).map((F) => [F.resourceUid, F])
495
+ );
496
+ for (const F of C)
497
+ z.has(F) ? z.set(F, { ...z.get(F), isCompleted: !0 }) : z.set(F, { resourceUid: F, isCompleted: !0 });
498
+ return Array.from(z.values());
499
+ }, [o, C]), Re = d ? S.get(s[y + 1]) : null;
500
+ return /* @__PURE__ */ t(
501
+ "div",
502
+ {
503
+ className: A("flex h-full overflow-hidden", u),
504
+ style: x,
505
+ children: [
506
+ /* @__PURE__ */ e(ot, { open: v, onOpenChange: r, side: "left", children: /* @__PURE__ */ t(ut, { size: "sm", scrollLock: !1, children: [
507
+ /* @__PURE__ */ t(mt, { className: "flex-row items-center justify-between", children: [
508
+ /* @__PURE__ */ e(ht, { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wide", children: "Course" }),
509
+ /* @__PURE__ */ e(ft, {})
510
+ ] }),
511
+ /* @__PURE__ */ e(xt, { className: "px-2 pb-2", children: /* @__PURE__ */ e(
512
+ Xe,
513
+ {
514
+ items: N,
515
+ progress: Ue,
516
+ courseTitle: c,
517
+ activeItemUid: m,
518
+ onItemClick: O,
519
+ readOnly: a
520
+ }
521
+ ) })
522
+ ] }) }),
523
+ /* @__PURE__ */ t("div", { className: "flex-1 flex flex-col min-w-0 overflow-hidden", children: [
524
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-2 px-4 py-2 border-b border-border bg-background shrink-0", children: [
525
+ /* @__PURE__ */ e(
526
+ P,
527
+ {
528
+ variant: "ghost",
529
+ size: "sm",
530
+ className: "size-7 p-0 mr-1",
531
+ onClick: () => r(!0),
532
+ children: /* @__PURE__ */ e(je, { className: "size-4" })
533
+ }
534
+ ),
535
+ /* @__PURE__ */ e("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ e("span", { className: "text-sm font-semibold text-foreground truncate block", children: (k == null ? void 0 : k.title) ?? "Select an item" }) }),
536
+ /* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground shrink-0", children: [
537
+ y + 1,
538
+ " / ",
539
+ s.length
540
+ ] })
541
+ ] }),
542
+ /* @__PURE__ */ e("div", { ref: b, tabIndex: -1, className: "flex-1 overflow-y-auto p-6 outline-none", children: k ? kt(k, a, ue, p, me, d, Re, Q) : /* @__PURE__ */ e(
543
+ ce,
544
+ {
545
+ title: "No content selected",
546
+ description: "Select an item from the course outline to get started."
547
+ }
548
+ ) }),
549
+ /* @__PURE__ */ e("div", { className: "shrink-0 border-t border-border bg-background px-4 py-3", children: /* @__PURE__ */ t("div", { className: "flex items-center gap-4", children: [
550
+ /* @__PURE__ */ t("div", { className: "flex-1 min-w-0", children: [
551
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-2 mb-1", children: /* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children: [
552
+ w,
553
+ "% complete"
554
+ ] }) }),
555
+ /* @__PURE__ */ e(pt, { value: w, size: "sm" })
556
+ ] }),
557
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-2 shrink-0", children: [
558
+ !p && k && /* @__PURE__ */ t(
559
+ P,
560
+ {
561
+ size: "sm",
562
+ variant: "outline",
563
+ onClick: ue,
564
+ disabled: a,
565
+ children: [
566
+ /* @__PURE__ */ e(Le, { className: "size-3.5 mr-1" }),
567
+ "Complete"
568
+ ]
569
+ }
570
+ ),
571
+ /* @__PURE__ */ e(
572
+ P,
573
+ {
574
+ size: "sm",
575
+ variant: "ghost",
576
+ onClick: Pe,
577
+ disabled: !E,
578
+ children: /* @__PURE__ */ e(Fe, { className: "size-4" })
579
+ }
580
+ ),
581
+ /* @__PURE__ */ e(
582
+ P,
583
+ {
584
+ size: "sm",
585
+ variant: "ghost",
586
+ onClick: me,
587
+ disabled: !d,
588
+ children: /* @__PURE__ */ e(Qe, { className: "size-4" })
589
+ }
590
+ )
591
+ ] })
592
+ ] }) })
593
+ ] })
594
+ ]
595
+ }
596
+ );
597
+ }
598
+ function kt(c, N, o, l, f, i, n, h) {
599
+ switch (c.type) {
600
+ case "lesson":
601
+ return /* @__PURE__ */ e(
602
+ Oe,
603
+ {
604
+ title: c.title,
605
+ blocks: c.blocks,
606
+ isCompleted: l,
607
+ onMarkComplete: o,
608
+ onNextLesson: i ? f : void 0,
609
+ nextLessonTitle: n == null ? void 0 : n.title,
610
+ readOnly: N
611
+ }
612
+ );
613
+ case "video":
614
+ return /* @__PURE__ */ e(
615
+ De,
616
+ {
617
+ video: h ?? { src: "", title: c.title },
618
+ onComplete: l ? void 0 : o
619
+ }
620
+ );
621
+ case "quiz":
622
+ return /* @__PURE__ */ e(
623
+ Ze,
624
+ {
625
+ questions: c.questions,
626
+ instantFeedback: !0,
627
+ allowRetry: !0,
628
+ readOnly: N
629
+ }
630
+ );
631
+ default:
632
+ return /* @__PURE__ */ e(
633
+ ce,
634
+ {
635
+ title: "Unknown content type",
636
+ description: "This content type is not supported."
637
+ }
638
+ );
639
+ }
640
+ }
641
+ const qt = Y(St, "CoursePlayer");
642
+ function zt({
643
+ title: c,
644
+ description: N,
645
+ instructions: o,
646
+ questions: l = [],
647
+ timeLimitSeconds: f,
648
+ passingScore: i,
649
+ allowBackNavigation: n = !0,
650
+ autoSubmitOnTimeout: h = !0,
651
+ timeWarningThreshold: a,
652
+ allowRetake: u = !1,
653
+ showReview: x = !0,
654
+ onComplete: b,
655
+ readOnly: s = !1,
656
+ className: S,
657
+ style: m
658
+ }) {
659
+ const [g, v] = R({ tag: "intro" }), r = U(null), { timeElapsed: C, reset: M } = Me(g.tag === "exam"), y = U(b);
660
+ y.current = b, L(() => {
661
+ var w;
662
+ (w = r.current) == null || w.focus({ preventScroll: !0 });
663
+ }, [g.tag]);
664
+ const E = T((w, k) => {
665
+ var O;
666
+ const { correct: Q, total: B, percentage: $ } = ze(l, w), W = {
667
+ answers: w,
668
+ correct: Q,
669
+ total: B,
670
+ percentage: $,
671
+ passed: i !== void 0 ? $ >= i : !0,
672
+ timeElapsedSeconds: k.timeElapsedSeconds,
673
+ wasAutoSubmitted: k.wasAutoSubmitted
674
+ };
675
+ v({ tag: "results", result: W }), (O = y.current) == null || O.call(y, W);
676
+ }, [l, i]), d = T(() => {
677
+ M(), v({ tag: "intro" });
678
+ }, [M]);
679
+ if (g.tag === "intro")
680
+ return /* @__PURE__ */ e("div", { ref: r, tabIndex: -1, className: A("max-w-2xl mx-auto outline-none", S), style: m, children: /* @__PURE__ */ e(
681
+ Ee,
682
+ {
683
+ icon: /* @__PURE__ */ e($e, { className: "size-7 text-primary" }),
684
+ title: c,
685
+ description: N,
686
+ questionCount: l.length,
687
+ timeLimitSeconds: f,
688
+ passingScore: i,
689
+ startLabel: "Begin Exam",
690
+ onStart: () => v({ tag: "exam" }),
691
+ readOnly: s,
692
+ children: o && /* @__PURE__ */ e(Ce, { className: "text-left mb-6", children: /* @__PURE__ */ e(ye, { children: o }) })
693
+ }
694
+ ) });
695
+ if (g.tag === "exam")
696
+ return /* @__PURE__ */ e("div", { ref: r, tabIndex: -1, className: A("outline-none", S), style: m, children: /* @__PURE__ */ e(
697
+ et,
698
+ {
699
+ questions: l,
700
+ timeLimitSeconds: f,
701
+ timeElapsedSeconds: C,
702
+ autoSubmitOnTimeout: h,
703
+ timeWarningThreshold: a,
704
+ allowBackNavigation: n,
705
+ confirmBeforeSubmit: !0,
706
+ examTitle: c,
707
+ onSubmit: E,
708
+ readOnly: s
709
+ }
710
+ ) });
711
+ const { result: p } = g;
712
+ return /* @__PURE__ */ e("div", { ref: r, tabIndex: -1, className: A("max-w-2xl mx-auto outline-none", S), style: m, children: /* @__PURE__ */ e(
713
+ Be,
714
+ {
715
+ title: c,
716
+ percentage: p.percentage,
717
+ passed: p.passed,
718
+ correct: p.correct,
719
+ total: p.total,
720
+ timeElapsedSeconds: p.timeElapsedSeconds,
721
+ answers: p.answers,
722
+ questions: l,
723
+ allowRetake: u,
724
+ onRetake: d,
725
+ retakeLabel: "Retake Exam",
726
+ showReview: x,
727
+ readOnly: s,
728
+ extraBadges: p.wasAutoSubmitted ? /* @__PURE__ */ e(q, { variant: "outline", className: "text-sm px-3 py-1 mb-2 ml-2", children: "Auto-submitted" }) : null
729
+ }
730
+ ) });
731
+ }
732
+ const Gt = Y(zt, "ExamModule");
733
+ function Ct({
734
+ title: c,
735
+ description: N,
736
+ questions: o = [],
737
+ requireAll: l = !1,
738
+ showProgress: f = !0,
739
+ thankYouTitle: i = "Thank You!",
740
+ thankYouMessage: n,
741
+ onComplete: h,
742
+ allowRestart: a = !1,
743
+ readOnly: u = !1,
744
+ className: x,
745
+ style: b
746
+ }) {
747
+ const [s, S] = R({ tag: "intro" }), m = U(null), g = U(null);
748
+ L(() => {
749
+ var y;
750
+ (y = g.current) == null || y.focus({ preventScroll: !0 });
751
+ }, [s.tag]);
752
+ function v(y) {
753
+ const E = m.current ? Math.floor((Date.now() - m.current) / 1e3) : 0, d = {
754
+ answers: y,
755
+ totalQuestions: o.length,
756
+ answeredCount: y.length,
757
+ timeElapsedSeconds: E
758
+ };
759
+ S({ tag: "thankYou", result: d }), h == null || h(d);
760
+ }
761
+ function r() {
762
+ m.current = null, S({ tag: "intro" });
763
+ }
764
+ function C() {
765
+ m.current = Date.now(), S({ tag: "survey" });
766
+ }
767
+ if (s.tag === "intro")
768
+ return /* @__PURE__ */ e(
769
+ "div",
770
+ {
771
+ ref: g,
772
+ tabIndex: -1,
773
+ className: A("max-w-2xl mx-auto outline-none", x),
774
+ style: b,
775
+ children: /* @__PURE__ */ e(I, { children: /* @__PURE__ */ t(j, { className: "pt-8 pb-8 text-center", children: [
776
+ /* @__PURE__ */ e("div", { className: "mx-auto mb-4 w-14 h-14 rounded-full bg-primary/10 flex items-center justify-center", children: /* @__PURE__ */ e(Ye, { className: "size-7 text-primary" }) }),
777
+ /* @__PURE__ */ e("h2", { className: "text-2xl font-bold text-foreground mb-2", children: c }),
778
+ N && /* @__PURE__ */ e("p", { className: "text-muted-foreground mb-6 max-w-md mx-auto", children: N }),
779
+ /* @__PURE__ */ e("div", { className: "flex flex-wrap justify-center gap-2 mb-8", children: /* @__PURE__ */ t(q, { variant: "outline", className: "gap-1.5", children: [
780
+ /* @__PURE__ */ e(le, { className: "size-3.5" }),
781
+ o.length,
782
+ " questions"
783
+ ] }) }),
784
+ /* @__PURE__ */ t(P, { size: "lg", onClick: C, disabled: u, children: [
785
+ /* @__PURE__ */ e(ae, { className: "size-4 mr-2" }),
786
+ "Begin Survey"
787
+ ] })
788
+ ] }) })
789
+ }
790
+ );
791
+ if (s.tag === "survey")
792
+ return /* @__PURE__ */ e(
793
+ "div",
794
+ {
795
+ ref: g,
796
+ tabIndex: -1,
797
+ className: A("outline-none", x),
798
+ style: b,
799
+ children: /* @__PURE__ */ e(
800
+ tt,
801
+ {
802
+ title: c,
803
+ questions: o,
804
+ requireAll: l,
805
+ showProgress: f,
806
+ onSubmit: v,
807
+ readOnly: u
808
+ }
809
+ )
810
+ }
811
+ );
812
+ const { result: M } = s;
813
+ return /* @__PURE__ */ e(
814
+ "div",
815
+ {
816
+ ref: g,
817
+ tabIndex: -1,
818
+ className: A("max-w-2xl mx-auto outline-none", x),
819
+ style: b,
820
+ children: /* @__PURE__ */ e(I, { children: /* @__PURE__ */ t(j, { className: "pt-8 pb-8 text-center", children: [
821
+ /* @__PURE__ */ e("div", { className: "mx-auto mb-4 w-14 h-14 rounded-full bg-success/10 flex items-center justify-center", children: /* @__PURE__ */ e(X, { className: "size-7 text-success" }) }),
822
+ /* @__PURE__ */ e("h2", { className: "text-2xl font-bold text-foreground mb-2", children: i }),
823
+ /* @__PURE__ */ e("p", { className: "text-muted-foreground mb-6 max-w-md mx-auto", children: n ?? "Your responses have been recorded. Thank you for your feedback!" }),
824
+ /* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-3 max-w-sm mx-auto mb-6", children: [
825
+ /* @__PURE__ */ e(
826
+ G,
827
+ {
828
+ icon: /* @__PURE__ */ e(le, {}),
829
+ label: "Answered",
830
+ description: "Questions completed",
831
+ value: `${M.answeredCount}/${M.totalQuestions}`
832
+ }
833
+ ),
834
+ /* @__PURE__ */ e(
835
+ G,
836
+ {
837
+ icon: /* @__PURE__ */ e(re, {}),
838
+ label: "Time",
839
+ description: "Total elapsed",
840
+ value: ne(M.timeElapsedSeconds)
841
+ }
842
+ )
843
+ ] }),
844
+ a && /* @__PURE__ */ t(P, { variant: "outline", onClick: r, disabled: u, children: [
845
+ /* @__PURE__ */ e(ie, { className: "size-4 mr-2" }),
846
+ "Take Again"
847
+ ] })
848
+ ] }) })
849
+ }
850
+ );
851
+ }
852
+ const Wt = Y(Ct, "SurveyModule");
853
+ function yt({
854
+ courseTitle: c,
855
+ gradeItems: N = [],
856
+ categories: o,
857
+ overallGrade: l,
858
+ showWeights: f,
859
+ progressData: i,
860
+ reviewData: n,
861
+ readOnly: h = !1,
862
+ className: a,
863
+ style: u
864
+ }) {
865
+ const [x, b] = R(null), s = U(null);
866
+ L(() => {
867
+ var r;
868
+ (r = s.current) == null || r.focus({ preventScroll: !0 });
869
+ }, [x]);
870
+ function S(r) {
871
+ n != null && n[r.uid] && b(r.uid);
872
+ }
873
+ function m() {
874
+ b(null);
875
+ }
876
+ const g = x ? N.find((r) => r.uid === x) : null, v = x ? n == null ? void 0 : n[x] : null;
877
+ return /* @__PURE__ */ t(
878
+ "div",
879
+ {
880
+ ref: s,
881
+ tabIndex: -1,
882
+ className: A("outline-none", a),
883
+ style: u,
884
+ children: [
885
+ /* @__PURE__ */ t("div", { className: "flex items-center justify-between mb-6", children: [
886
+ /* @__PURE__ */ t("div", { children: [
887
+ c && /* @__PURE__ */ e("h2", { className: "text-xl font-bold text-foreground", children: c }),
888
+ /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Grade Center" })
889
+ ] }),
890
+ l && /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
891
+ /* @__PURE__ */ e(
892
+ Ae,
893
+ {
894
+ percentage: l.percentage,
895
+ letterGrade: l.letterGrade,
896
+ size: "medium"
897
+ }
898
+ ),
899
+ /* @__PURE__ */ t("div", { className: "text-right", children: [
900
+ /* @__PURE__ */ t("div", { className: "text-sm font-medium text-foreground", children: [
901
+ l.pointsEarned,
902
+ "/",
903
+ l.pointsPossible,
904
+ " pts"
905
+ ] }),
906
+ l.letterGrade && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: l.letterGrade })
907
+ ] })
908
+ ] })
909
+ ] }),
910
+ /* @__PURE__ */ e(_, { className: "mb-6" }),
911
+ g && v ? /* @__PURE__ */ t("div", { children: [
912
+ /* @__PURE__ */ t(
913
+ P,
914
+ {
915
+ variant: "ghost",
916
+ size: "sm",
917
+ onClick: m,
918
+ className: "mb-4",
919
+ children: [
920
+ /* @__PURE__ */ e(J, { className: "size-4 mr-1.5" }),
921
+ "Back to Grades"
922
+ ]
923
+ }
924
+ ),
925
+ /* @__PURE__ */ e(I, { className: "mb-4", children: /* @__PURE__ */ t(j, { className: "py-3 px-4", children: [
926
+ /* @__PURE__ */ e("h3", { className: "font-semibold text-foreground", children: g.name }),
927
+ g.score !== null && /* @__PURE__ */ t("p", { className: "text-sm text-muted-foreground", children: [
928
+ "Score: ",
929
+ g.score,
930
+ "/",
931
+ g.maxScore,
932
+ " (",
933
+ Math.round(
934
+ g.score / g.maxScore * 100
935
+ ),
936
+ "%)"
937
+ ] })
938
+ ] }) }),
939
+ /* @__PURE__ */ e(
940
+ be,
941
+ {
942
+ questions: v.questions,
943
+ sessionAnswers: v.sessionAnswers,
944
+ score: v.score,
945
+ showCorrectAnswers: !0
946
+ }
947
+ )
948
+ ] }) : /* @__PURE__ */ t(de, { defaultValue: "grades", children: [
949
+ i && /* @__PURE__ */ t(oe, { className: "mb-6", children: [
950
+ /* @__PURE__ */ t(V, { value: "grades", children: [
951
+ /* @__PURE__ */ e(Z, { className: "size-4 mr-1.5" }),
952
+ "Grades"
953
+ ] }),
954
+ /* @__PURE__ */ t(V, { value: "progress", children: [
955
+ /* @__PURE__ */ e(ve, { className: "size-4 mr-1.5" }),
956
+ "Progress"
957
+ ] })
958
+ ] }),
959
+ /* @__PURE__ */ e(H, { value: "grades", children: /* @__PURE__ */ e(
960
+ st,
961
+ {
962
+ items: N,
963
+ categories: o,
964
+ overallGrade: l,
965
+ showWeights: f,
966
+ onItemClick: S,
967
+ readOnly: h
968
+ }
969
+ ) }),
970
+ i && /* @__PURE__ */ e(H, { value: "progress", children: /* @__PURE__ */ e(
971
+ we,
972
+ {
973
+ overallProgress: i.overallProgress,
974
+ totalTimeSpent: i.totalTimeSpent,
975
+ modules: i.modules,
976
+ recentActivity: i.recentActivity,
977
+ streak: i.streak,
978
+ achievements: i.achievements
979
+ }
980
+ ) })
981
+ ] })
982
+ ]
983
+ }
984
+ );
985
+ }
986
+ const Vt = Y(yt, "GradeCenterModule"), At = {
987
+ text: "Text Entry",
988
+ file: "File Upload",
989
+ url: "URL Submission"
990
+ };
991
+ function Mt({
992
+ title: c,
993
+ instructions: N,
994
+ dueDate: o,
995
+ maxScore: l,
996
+ submissionTypes: f = ["text", "file"],
997
+ fileConstraints: i,
998
+ rubric: n,
999
+ existingSubmission: h,
1000
+ status: a = "not_started",
1001
+ grade: u,
1002
+ onSubmit: x,
1003
+ onComplete: b,
1004
+ onSaveDraft: s,
1005
+ readOnly: S = !1,
1006
+ className: m,
1007
+ style: g
1008
+ }) {
1009
+ const v = a === "submitted" || a === "graded" ? {
1010
+ tag: "confirmation",
1011
+ submission: h ?? {}
1012
+ } : { tag: "instructions" }, [r, C] = R(v), M = U(null);
1013
+ L(() => {
1014
+ var k;
1015
+ (k = M.current) == null || k.focus({ preventScroll: !0 });
1016
+ }, [r.tag]);
1017
+ const y = K(() => Array.isArray(n) ? n.reduce(
1018
+ (k, Q) => k + Math.max(...Q.levels.map((B) => B.points)),
1019
+ 0
1020
+ ) : 0, [n]);
1021
+ function E(k) {
1022
+ x == null || x(k), b == null || b({ submission: k, status: "submitted" }), C({ tag: "confirmation", submission: k });
1023
+ }
1024
+ function d(k) {
1025
+ s == null || s(k), b == null || b({ submission: k, status: "draft" });
1026
+ }
1027
+ const p = a === "not_started" || a === "draft" || a === "resubmit";
1028
+ if (r.tag === "instructions")
1029
+ return /* @__PURE__ */ e(
1030
+ "div",
1031
+ {
1032
+ ref: M,
1033
+ tabIndex: -1,
1034
+ className: A("max-w-2xl mx-auto outline-none", m),
1035
+ style: g,
1036
+ children: /* @__PURE__ */ e(I, { children: /* @__PURE__ */ t(j, { className: "pt-8 pb-8", children: [
1037
+ /* @__PURE__ */ t("div", { className: "text-center mb-6", children: [
1038
+ /* @__PURE__ */ e("div", { className: "mx-auto mb-4 w-14 h-14 rounded-full bg-primary/10 flex items-center justify-center", children: /* @__PURE__ */ e(fe, { className: "size-7 text-primary" }) }),
1039
+ /* @__PURE__ */ e("h2", { className: "text-2xl font-bold text-foreground mb-2", children: c })
1040
+ ] }),
1041
+ /* @__PURE__ */ t("div", { className: "flex flex-wrap justify-center gap-2 mb-6", children: [
1042
+ o && /* @__PURE__ */ e(ge, { dueDate: o, size: "small" }),
1043
+ l !== void 0 && /* @__PURE__ */ t(q, { variant: "outline", className: "gap-1.5", children: [
1044
+ /* @__PURE__ */ e(X, { className: "size-3.5" }),
1045
+ l,
1046
+ " points"
1047
+ ] }),
1048
+ /* @__PURE__ */ t(q, { variant: "outline", className: "gap-1.5", children: [
1049
+ /* @__PURE__ */ e(xe, { className: "size-3.5" }),
1050
+ f.map((k) => At[k]).join(", ")
1051
+ ] }),
1052
+ /* @__PURE__ */ e(Ne, { status: a })
1053
+ ] }),
1054
+ /* @__PURE__ */ e(_, { className: "my-6" }),
1055
+ /* @__PURE__ */ e("div", { className: "prose prose-sm text-foreground mb-6", children: N }),
1056
+ Array.isArray(n) && n.length > 0 && /* @__PURE__ */ t(te, { children: [
1057
+ /* @__PURE__ */ e(_, { className: "my-6" }),
1058
+ /* @__PURE__ */ e(
1059
+ pe,
1060
+ {
1061
+ criteria: n,
1062
+ maxScore: y
1063
+ }
1064
+ )
1065
+ ] }),
1066
+ p && !S && /* @__PURE__ */ e("div", { className: "text-center mt-8", children: /* @__PURE__ */ t(
1067
+ P,
1068
+ {
1069
+ size: "lg",
1070
+ onClick: () => C({ tag: "work" }),
1071
+ disabled: S,
1072
+ children: [
1073
+ /* @__PURE__ */ e(ae, { className: "size-4 mr-2" }),
1074
+ "Start Assignment"
1075
+ ]
1076
+ }
1077
+ ) })
1078
+ ] }) })
1079
+ }
1080
+ );
1081
+ if (r.tag === "work")
1082
+ return /* @__PURE__ */ t(
1083
+ "div",
1084
+ {
1085
+ ref: M,
1086
+ tabIndex: -1,
1087
+ className: A("outline-none", m),
1088
+ style: g,
1089
+ children: [
1090
+ /* @__PURE__ */ t(
1091
+ P,
1092
+ {
1093
+ variant: "ghost",
1094
+ size: "sm",
1095
+ onClick: () => C({ tag: "instructions" }),
1096
+ className: "mb-4",
1097
+ children: [
1098
+ /* @__PURE__ */ e(J, { className: "size-4 mr-1.5" }),
1099
+ "Back to Instructions"
1100
+ ]
1101
+ }
1102
+ ),
1103
+ /* @__PURE__ */ e(
1104
+ rt,
1105
+ {
1106
+ title: c,
1107
+ instructions: N,
1108
+ dueDate: o,
1109
+ maxScore: l,
1110
+ status: a,
1111
+ submissionTypes: f,
1112
+ existingSubmission: h,
1113
+ fileConstraints: i,
1114
+ grade: u,
1115
+ onSubmit: E,
1116
+ onSaveDraft: d,
1117
+ readOnly: S
1118
+ }
1119
+ )
1120
+ ]
1121
+ }
1122
+ );
1123
+ const { submission: w } = r;
1124
+ return /* @__PURE__ */ e(
1125
+ "div",
1126
+ {
1127
+ ref: M,
1128
+ tabIndex: -1,
1129
+ className: A("max-w-2xl mx-auto outline-none", m),
1130
+ style: g,
1131
+ children: /* @__PURE__ */ e(I, { children: /* @__PURE__ */ t(j, { className: "pt-8 pb-8", children: [
1132
+ /* @__PURE__ */ t("div", { className: "text-center mb-6", children: [
1133
+ /* @__PURE__ */ e("div", { className: "mx-auto mb-4 w-14 h-14 rounded-full bg-success/10 flex items-center justify-center", children: /* @__PURE__ */ e(X, { className: "size-7 text-success" }) }),
1134
+ /* @__PURE__ */ e("h2", { className: "text-xl font-bold text-foreground mb-2", children: a === "graded" ? "Assignment Graded" : "Submission Received" }),
1135
+ /* @__PURE__ */ t("div", { className: "flex justify-center gap-2 mb-4", children: [
1136
+ /* @__PURE__ */ e(Ne, { status: a }),
1137
+ o && /* @__PURE__ */ e(ge, { dueDate: o, size: "small" })
1138
+ ] })
1139
+ ] }),
1140
+ a === "graded" && u && /* @__PURE__ */ t("div", { className: "text-center mb-6", children: [
1141
+ /* @__PURE__ */ e(
1142
+ Ae,
1143
+ {
1144
+ percentage: l ? Math.round(u.score / l * 100) : 0,
1145
+ size: "large"
1146
+ }
1147
+ ),
1148
+ /* @__PURE__ */ t("p", { className: "text-sm text-muted-foreground mt-2", children: [
1149
+ u.score,
1150
+ "/",
1151
+ l,
1152
+ " points"
1153
+ ] }),
1154
+ u.feedback && /* @__PURE__ */ e(Ce, { className: "text-left mt-4", children: /* @__PURE__ */ e(ye, { children: u.feedback }) }),
1155
+ Array.isArray(n) && u.rubricLevels && /* @__PURE__ */ t(te, { children: [
1156
+ /* @__PURE__ */ e(_, { className: "my-6" }),
1157
+ /* @__PURE__ */ e(
1158
+ pe,
1159
+ {
1160
+ criteria: n,
1161
+ selectedLevels: u.rubricLevels,
1162
+ totalScore: u.score,
1163
+ maxScore: y
1164
+ }
1165
+ )
1166
+ ] })
1167
+ ] }),
1168
+ /* @__PURE__ */ e(_, { className: "my-6" }),
1169
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-foreground mb-3", children: "What You Submitted" }),
1170
+ /* @__PURE__ */ t("div", { className: "space-y-2 text-sm text-muted-foreground", children: [
1171
+ w.textContent && /* @__PURE__ */ t("div", { className: "flex items-start gap-2", children: [
1172
+ /* @__PURE__ */ e(qe, { className: "size-4 mt-0.5 shrink-0" }),
1173
+ /* @__PURE__ */ e("span", { className: "line-clamp-2", children: w.textContent.replace(/<[^>]*>/g, "") })
1174
+ ] }),
1175
+ w.files && w.files.length > 0 && /* @__PURE__ */ t("div", { className: "flex items-start gap-2", children: [
1176
+ /* @__PURE__ */ e(xe, { className: "size-4 mt-0.5 shrink-0" }),
1177
+ /* @__PURE__ */ t("span", { children: [
1178
+ w.files.length,
1179
+ " file",
1180
+ w.files.length !== 1 ? "s" : "",
1181
+ " uploaded"
1182
+ ] })
1183
+ ] }),
1184
+ w.url && /* @__PURE__ */ t("div", { className: "flex items-start gap-2", children: [
1185
+ /* @__PURE__ */ e(Ge, { className: "size-4 mt-0.5 shrink-0" }),
1186
+ /* @__PURE__ */ e("span", { className: "truncate", children: w.url })
1187
+ ] })
1188
+ ] }),
1189
+ p && !S && /* @__PURE__ */ e("div", { className: "text-center mt-8", children: /* @__PURE__ */ t(
1190
+ P,
1191
+ {
1192
+ variant: "outline",
1193
+ onClick: () => C({ tag: "work" }),
1194
+ children: [
1195
+ /* @__PURE__ */ e(fe, { className: "size-4 mr-2" }),
1196
+ "Edit Submission"
1197
+ ]
1198
+ }
1199
+ ) })
1200
+ ] }) })
1201
+ }
1202
+ );
1203
+ }
1204
+ const Ht = Y(Mt, "AssignmentModule");
1205
+ function Et({
1206
+ courseTitle: c,
1207
+ recipientName: N,
1208
+ organizationName: o,
1209
+ organizationLogo: l,
1210
+ signatory: f,
1211
+ completionDate: i,
1212
+ certificateVariant: n = "modern",
1213
+ requirements: h,
1214
+ overallProgress: a,
1215
+ onRequirementClick: u,
1216
+ onComplete: x,
1217
+ readOnly: b = !1,
1218
+ className: s,
1219
+ style: S
1220
+ }) {
1221
+ const { allComplete: m, completedCount: g, derivedProgress: v } = K(() => {
1222
+ const p = h.filter((Q) => Q.completed).length, w = h.length, k = w > 0 ? Math.round(p / w * 100) : 0;
1223
+ return { allComplete: p === w, completedCount: p, derivedProgress: k };
1224
+ }, [h]), r = a ?? v, [C, M] = R({ tag: "requirements" }), y = U(null), E = U(!1);
1225
+ L(() => {
1226
+ var p;
1227
+ (p = y.current) == null || p.focus({ preventScroll: !0 });
1228
+ }, [C.tag]);
1229
+ const d = U(x);
1230
+ return d.current = x, L(() => {
1231
+ var p;
1232
+ C.tag === "certificate" && !E.current && (E.current = !0, (p = d.current) == null || p.call(d));
1233
+ }, [C.tag]), C.tag === "requirements" ? /* @__PURE__ */ e(
1234
+ "div",
1235
+ {
1236
+ ref: y,
1237
+ tabIndex: -1,
1238
+ className: A("max-w-2xl mx-auto outline-none", s),
1239
+ style: S,
1240
+ children: /* @__PURE__ */ e(I, { children: /* @__PURE__ */ t(j, { className: "pt-8 pb-8", children: [
1241
+ /* @__PURE__ */ t("div", { className: "text-center mb-6", children: [
1242
+ /* @__PURE__ */ e(
1243
+ D,
1244
+ {
1245
+ value: r,
1246
+ size: 100,
1247
+ strokeWidth: 8,
1248
+ color: m ? "var(--success)" : "var(--primary)",
1249
+ className: "mx-auto mb-4 text-foreground"
1250
+ }
1251
+ ),
1252
+ /* @__PURE__ */ e("h2", { className: "text-xl font-bold text-foreground mb-2", children: c }),
1253
+ /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: m ? "All requirements met — your certificate is ready!" : `${g} of ${h.length} requirements complete` })
1254
+ ] }),
1255
+ /* @__PURE__ */ e(
1256
+ nt,
1257
+ {
1258
+ requirements: h,
1259
+ onRequirementClick: b ? void 0 : u,
1260
+ className: "mb-6"
1261
+ }
1262
+ ),
1263
+ m && /* @__PURE__ */ e("div", { className: "text-center mt-6", children: /* @__PURE__ */ t(
1264
+ P,
1265
+ {
1266
+ size: "lg",
1267
+ onClick: () => M({ tag: "certificate" }),
1268
+ disabled: b,
1269
+ children: [
1270
+ /* @__PURE__ */ e(ee, { className: "size-4 mr-2" }),
1271
+ "View Certificate"
1272
+ ]
1273
+ }
1274
+ ) })
1275
+ ] }) })
1276
+ }
1277
+ ) : /* @__PURE__ */ t(
1278
+ "div",
1279
+ {
1280
+ ref: y,
1281
+ tabIndex: -1,
1282
+ className: A("outline-none", s),
1283
+ style: S,
1284
+ children: [
1285
+ /* @__PURE__ */ t(
1286
+ P,
1287
+ {
1288
+ variant: "ghost",
1289
+ size: "sm",
1290
+ onClick: () => M({ tag: "requirements" }),
1291
+ className: "mb-4",
1292
+ children: [
1293
+ /* @__PURE__ */ e(J, { className: "size-4 mr-1.5" }),
1294
+ "Back to Requirements"
1295
+ ]
1296
+ }
1297
+ ),
1298
+ /* @__PURE__ */ t("div", { className: "text-center mb-8", children: [
1299
+ /* @__PURE__ */ e("div", { className: "mx-auto mb-4 w-14 h-14 rounded-full bg-success/10 flex items-center justify-center", children: /* @__PURE__ */ e(We, { className: "size-7 text-success" }) }),
1300
+ /* @__PURE__ */ e("h2", { className: "text-2xl font-bold text-foreground mb-2", children: "Congratulations!" }),
1301
+ /* @__PURE__ */ t("p", { className: "text-muted-foreground", children: [
1302
+ "You've completed all requirements for",
1303
+ " ",
1304
+ /* @__PURE__ */ e("span", { className: "font-medium text-foreground", children: c })
1305
+ ] })
1306
+ ] }),
1307
+ /* @__PURE__ */ e(
1308
+ Se,
1309
+ {
1310
+ recipientName: N,
1311
+ courseTitle: c,
1312
+ completionDate: i ?? (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
1313
+ organizationName: o,
1314
+ organizationLogo: l,
1315
+ signatory: f,
1316
+ variant: n,
1317
+ showActions: !0
1318
+ }
1319
+ )
1320
+ ]
1321
+ }
1322
+ );
1323
+ }
1324
+ const _t = Y(Et, "CertificateModule");
1325
+ function Bt({
1326
+ forumTitle: c,
1327
+ topics: N = [],
1328
+ currentUser: o,
1329
+ threads: l = {},
1330
+ onCreateTopic: f,
1331
+ onReply: i,
1332
+ onToggleLike: n,
1333
+ onMarkAnswer: h,
1334
+ onTopicOpen: a,
1335
+ readOnly: u,
1336
+ className: x,
1337
+ style: b
1338
+ }) {
1339
+ const [s, S] = R(null), [m, g] = R(""), [v, r] = R("newest"), C = U(null);
1340
+ L(() => {
1341
+ var B;
1342
+ (B = C.current) == null || B.focus({ preventScroll: !0 });
1343
+ }, [s]);
1344
+ const M = U(a);
1345
+ M.current = a;
1346
+ const y = T((B) => {
1347
+ var $;
1348
+ S(B), ($ = M.current) == null || $.call(M, B);
1349
+ }, []), E = T(() => {
1350
+ S(null);
1351
+ }, []), d = s ? l[s] : null, p = s ? N.find((B) => B.uid === s) : null, w = T(
1352
+ (B, $) => {
1353
+ s && (i == null || i(s, B, $));
1354
+ },
1355
+ [s, i]
1356
+ ), k = T(
1357
+ (B) => {
1358
+ s && (n == null || n(s, B));
1359
+ },
1360
+ [s, n]
1361
+ ), Q = T(
1362
+ (B) => {
1363
+ s && (h == null || h(s, B));
1364
+ },
1365
+ [s, h]
1366
+ );
1367
+ return /* @__PURE__ */ e(
1368
+ "div",
1369
+ {
1370
+ ref: C,
1371
+ tabIndex: -1,
1372
+ className: A("outline-none", x),
1373
+ style: b,
1374
+ children: s && d ? (
1375
+ /* ─── Thread View ─── */
1376
+ /* @__PURE__ */ t("div", { children: [
1377
+ /* @__PURE__ */ t(
1378
+ P,
1379
+ {
1380
+ variant: "ghost",
1381
+ size: "sm",
1382
+ onClick: E,
1383
+ className: "mb-4",
1384
+ children: [
1385
+ /* @__PURE__ */ e(J, { className: "size-4 mr-1.5" }),
1386
+ "Back to Topics"
1387
+ ]
1388
+ }
1389
+ ),
1390
+ /* @__PURE__ */ e(
1391
+ lt,
1392
+ {
1393
+ title: (p == null ? void 0 : p.title) ?? "",
1394
+ rootPost: d.rootPost,
1395
+ replies: d.replies,
1396
+ currentUser: o,
1397
+ onReply: w,
1398
+ onToggleLike: n ? k : void 0,
1399
+ onMarkAnswer: h ? Q : void 0,
1400
+ readOnly: u
1401
+ }
1402
+ )
1403
+ ] })
1404
+ ) : s && !d ? (
1405
+ /* ─── Empty Thread State ─── */
1406
+ /* @__PURE__ */ t("div", { children: [
1407
+ /* @__PURE__ */ t(
1408
+ P,
1409
+ {
1410
+ variant: "ghost",
1411
+ size: "sm",
1412
+ onClick: E,
1413
+ className: "mb-4",
1414
+ children: [
1415
+ /* @__PURE__ */ e(J, { className: "size-4 mr-1.5" }),
1416
+ "Back to Topics"
1417
+ ]
1418
+ }
1419
+ ),
1420
+ /* @__PURE__ */ e(
1421
+ ce,
1422
+ {
1423
+ title: "No discussion yet",
1424
+ description: "Be the first to start this conversation."
1425
+ }
1426
+ )
1427
+ ] })
1428
+ ) : (
1429
+ /* ─── Forum Board View ─── */
1430
+ /* @__PURE__ */ e(
1431
+ at,
1432
+ {
1433
+ title: c,
1434
+ topics: N,
1435
+ currentUser: o,
1436
+ onTopicClick: y,
1437
+ onCreateTopic: f,
1438
+ sortOrder: v,
1439
+ onSortChange: r,
1440
+ searchQuery: m,
1441
+ onSearchChange: g,
1442
+ readOnly: u
1443
+ }
1444
+ )
1445
+ )
1446
+ }
1447
+ );
1448
+ }
1449
+ const Jt = Y(Bt, "DiscussionModule");
1450
+ function Pt({
1451
+ studentName: c,
1452
+ overallProgress: N,
1453
+ totalTimeSpent: o,
1454
+ modules: l,
1455
+ recentActivity: f,
1456
+ streak: i,
1457
+ achievements: n,
1458
+ enrolledCourses: h,
1459
+ onCourseClick: a,
1460
+ announcements: u = [],
1461
+ onAnnouncementSelect: x,
1462
+ onMarkRead: b,
1463
+ readOnly: s = !1,
1464
+ className: S,
1465
+ style: m
1466
+ }) {
1467
+ const g = U(null);
1468
+ L(() => {
1469
+ var r;
1470
+ (r = g.current) == null || r.focus({ preventScroll: !0 });
1471
+ }, []);
1472
+ const v = u.filter((r) => !r.isRead).length;
1473
+ return /* @__PURE__ */ t(
1474
+ "div",
1475
+ {
1476
+ ref: g,
1477
+ tabIndex: -1,
1478
+ className: A("outline-none", S),
1479
+ style: m,
1480
+ children: [
1481
+ /* @__PURE__ */ t("div", { className: "flex items-center justify-between mb-6", children: [
1482
+ /* @__PURE__ */ t("h2", { className: "text-xl font-bold text-foreground", children: [
1483
+ "Welcome back, ",
1484
+ c
1485
+ ] }),
1486
+ /* @__PURE__ */ e(D, { value: N, size: 48, strokeWidth: 4 })
1487
+ ] }),
1488
+ /* @__PURE__ */ e(_, { className: "mb-6" }),
1489
+ /* @__PURE__ */ t(de, { defaultValue: "overview", children: [
1490
+ /* @__PURE__ */ t(oe, { className: "mb-6", children: [
1491
+ /* @__PURE__ */ t(V, { value: "overview", children: [
1492
+ /* @__PURE__ */ e(ve, { className: "size-4 mr-1.5" }),
1493
+ "Overview"
1494
+ ] }),
1495
+ /* @__PURE__ */ t(V, { value: "courses", children: [
1496
+ /* @__PURE__ */ e(Z, { className: "size-4 mr-1.5" }),
1497
+ "My Courses"
1498
+ ] }),
1499
+ /* @__PURE__ */ t(V, { value: "announcements", children: [
1500
+ /* @__PURE__ */ e(Ve, { className: "size-4 mr-1.5" }),
1501
+ "Announcements",
1502
+ v > 0 && /* @__PURE__ */ e("span", { className: "ml-1.5 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground text-xs font-medium min-w-5 h-5 px-1.5", children: v })
1503
+ ] })
1504
+ ] }),
1505
+ /* @__PURE__ */ e(H, { value: "overview", children: /* @__PURE__ */ e(
1506
+ we,
1507
+ {
1508
+ overallProgress: N,
1509
+ totalTimeSpent: o,
1510
+ modules: l,
1511
+ recentActivity: f,
1512
+ streak: i,
1513
+ achievements: n
1514
+ }
1515
+ ) }),
1516
+ /* @__PURE__ */ e(H, { value: "courses", children: /* @__PURE__ */ e(
1517
+ ke,
1518
+ {
1519
+ courses: h,
1520
+ onCourseClick: (r) => !s && a(r.uid),
1521
+ showSearch: !0,
1522
+ viewMode: "grid",
1523
+ readOnly: s
1524
+ }
1525
+ ) }),
1526
+ /* @__PURE__ */ e(H, { value: "announcements", children: /* @__PURE__ */ e(
1527
+ it,
1528
+ {
1529
+ announcements: u,
1530
+ onSelect: x,
1531
+ onMarkRead: b,
1532
+ readOnly: s
1533
+ }
1534
+ ) })
1535
+ ] })
1536
+ ]
1537
+ }
1538
+ );
1539
+ }
1540
+ const Kt = Y(Pt, "StudentDashboardModule");
1541
+ function Ut({
1542
+ title: c,
1543
+ courses: N = [],
1544
+ categories: o = [],
1545
+ enrollmentData: l,
1546
+ onEnroll: f,
1547
+ onCourseOpen: i,
1548
+ readOnly: n = !1,
1549
+ className: h,
1550
+ style: a
1551
+ }) {
1552
+ var g;
1553
+ const [u, x] = R({ tag: "browse" }), b = U(null);
1554
+ L(() => {
1555
+ var v;
1556
+ (v = b.current) == null || v.focus({ preventScroll: !0 });
1557
+ }, [u.tag]);
1558
+ function s(v) {
1559
+ l != null && l[v] ? x({ tag: "enroll", courseUid: v }) : i == null || i(v);
1560
+ }
1561
+ function S() {
1562
+ x({ tag: "browse" });
1563
+ }
1564
+ function m(v) {
1565
+ f(v), x({ tag: "browse" });
1566
+ }
1567
+ return /* @__PURE__ */ t(
1568
+ "div",
1569
+ {
1570
+ ref: b,
1571
+ tabIndex: -1,
1572
+ className: A("outline-none", h),
1573
+ style: a,
1574
+ children: [
1575
+ c && u.tag === "browse" && /* @__PURE__ */ e("h2", { className: "text-xl font-bold text-foreground mb-4", children: c }),
1576
+ u.tag === "enroll" ? (
1577
+ /* --- Enrollment View --- */
1578
+ /* @__PURE__ */ t("div", { children: [
1579
+ /* @__PURE__ */ t(
1580
+ P,
1581
+ {
1582
+ variant: "ghost",
1583
+ size: "sm",
1584
+ onClick: S,
1585
+ className: "mb-4",
1586
+ children: [
1587
+ /* @__PURE__ */ e(J, { className: "size-4 mr-1.5" }),
1588
+ "Back to Catalog"
1589
+ ]
1590
+ }
1591
+ ),
1592
+ l != null && l[u.courseUid] ? /* @__PURE__ */ e(
1593
+ ct,
1594
+ {
1595
+ course: l[u.courseUid].course,
1596
+ prerequisites: l[u.courseUid].prerequisites,
1597
+ onEnroll: m,
1598
+ onCancel: S
1599
+ }
1600
+ ) : (
1601
+ /* Fallback when enrollment data is not yet available */
1602
+ /* @__PURE__ */ e(I, { children: /* @__PURE__ */ t(j, { className: "pt-6", children: [
1603
+ /* @__PURE__ */ e("h3", { className: "text-lg font-semibold text-foreground mb-2", children: ((g = N.find((v) => v.uid === u.courseUid)) == null ? void 0 : g.title) ?? "Course" }),
1604
+ /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground mb-4", children: "Enrollment details are loading. You can enroll directly below." }),
1605
+ /* @__PURE__ */ t("div", { className: "flex gap-2", children: [
1606
+ /* @__PURE__ */ e(P, { variant: "outline", onClick: S, children: "Cancel" }),
1607
+ /* @__PURE__ */ e(
1608
+ P,
1609
+ {
1610
+ onClick: () => m(u.courseUid),
1611
+ disabled: n,
1612
+ children: "Enroll Now"
1613
+ }
1614
+ )
1615
+ ] })
1616
+ ] }) })
1617
+ )
1618
+ ] })
1619
+ ) : (
1620
+ /* --- Browse View --- */
1621
+ /* @__PURE__ */ e(
1622
+ ke,
1623
+ {
1624
+ courses: N,
1625
+ categories: o,
1626
+ onCourseClick: (v) => s(v.uid),
1627
+ onEnroll: (v) => s(v.uid),
1628
+ readOnly: n
1629
+ }
1630
+ )
1631
+ )
1632
+ ]
1633
+ }
1634
+ );
1635
+ }
1636
+ const Xt = Y(Ut, "CourseCatalogModule");
1637
+ function Rt({
1638
+ student: c,
1639
+ enrolledCourses: N = [],
1640
+ achievements: o = [],
1641
+ certificates: l = [],
1642
+ stats: f,
1643
+ onCourseClick: i,
1644
+ certificateData: n,
1645
+ readOnly: h = !1,
1646
+ className: a,
1647
+ style: u
1648
+ }) {
1649
+ const [x, b] = R(null), s = U(null);
1650
+ L(() => {
1651
+ var r;
1652
+ (r = s.current) == null || r.focus({ preventScroll: !0 });
1653
+ }, [x]);
1654
+ function S(r) {
1655
+ h || n != null && n[r] && b(r);
1656
+ }
1657
+ function m() {
1658
+ b(null);
1659
+ }
1660
+ const g = x ? n == null ? void 0 : n[x] : null, v = x ? l.find((r) => r.uid === x) : null;
1661
+ return /* @__PURE__ */ t(
1662
+ "div",
1663
+ {
1664
+ ref: s,
1665
+ tabIndex: -1,
1666
+ className: A("outline-none", a),
1667
+ style: u,
1668
+ children: [
1669
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-4 mb-6", children: [
1670
+ /* @__PURE__ */ e(
1671
+ gt,
1672
+ {
1673
+ displayName: c.displayName,
1674
+ avatarUrl: c.avatarUrl,
1675
+ size: "medium"
1676
+ }
1677
+ ),
1678
+ /* @__PURE__ */ t("div", { className: "flex-1 min-w-0", children: [
1679
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-2 flex-wrap", children: [
1680
+ /* @__PURE__ */ e("h2", { className: "text-xl font-bold text-foreground", children: c.displayName }),
1681
+ c.role && /* @__PURE__ */ e(q, { variant: "secondary", children: c.role })
1682
+ ] }),
1683
+ c.email && /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: c.email })
1684
+ ] })
1685
+ ] }),
1686
+ /* @__PURE__ */ e(_, { className: "mb-6" }),
1687
+ v && g ? /* @__PURE__ */ t("div", { children: [
1688
+ /* @__PURE__ */ t(
1689
+ P,
1690
+ {
1691
+ variant: "ghost",
1692
+ size: "sm",
1693
+ onClick: m,
1694
+ className: "mb-4",
1695
+ children: [
1696
+ /* @__PURE__ */ e(J, { className: "size-4 mr-1.5" }),
1697
+ "Back to Profile"
1698
+ ]
1699
+ }
1700
+ ),
1701
+ /* @__PURE__ */ e(Se, { ...g, showActions: !0 })
1702
+ ] }) : /* @__PURE__ */ t(de, { defaultValue: "profile", children: [
1703
+ /* @__PURE__ */ t(oe, { className: "mb-6", children: [
1704
+ /* @__PURE__ */ t(V, { value: "profile", children: [
1705
+ /* @__PURE__ */ e(He, { className: "size-4 mr-1.5" }),
1706
+ "Profile"
1707
+ ] }),
1708
+ /* @__PURE__ */ t(V, { value: "courses", children: [
1709
+ /* @__PURE__ */ e(Z, { className: "size-4 mr-1.5" }),
1710
+ "Courses"
1711
+ ] }),
1712
+ /* @__PURE__ */ t(V, { value: "achievements", children: [
1713
+ /* @__PURE__ */ e(se, { className: "size-4 mr-1.5" }),
1714
+ "Achievements"
1715
+ ] }),
1716
+ /* @__PURE__ */ t(V, { value: "certificates", children: [
1717
+ /* @__PURE__ */ e(ee, { className: "size-4 mr-1.5" }),
1718
+ "Certificates"
1719
+ ] })
1720
+ ] }),
1721
+ /* @__PURE__ */ e(H, { value: "profile", children: /* @__PURE__ */ e(
1722
+ dt,
1723
+ {
1724
+ student: c,
1725
+ enrolledCourses: N,
1726
+ achievements: o,
1727
+ stats: f,
1728
+ onCourseClick: i,
1729
+ showCourses: !1,
1730
+ showAchievements: !1,
1731
+ readOnly: !0
1732
+ }
1733
+ ) }),
1734
+ /* @__PURE__ */ e(H, { value: "courses", children: N.length > 0 ? /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(j, { className: "p-0 divide-y divide-border", children: N.map((r) => /* @__PURE__ */ t(
1735
+ "div",
1736
+ {
1737
+ className: A(
1738
+ "flex items-center gap-3 px-4 py-3 transition-colors",
1739
+ i && !h && "cursor-pointer hover:bg-muted/50"
1740
+ ),
1741
+ onClick: i && !h ? () => i(r.uid) : void 0,
1742
+ children: [
1743
+ /* @__PURE__ */ e(
1744
+ D,
1745
+ {
1746
+ value: r.progress,
1747
+ size: 32,
1748
+ strokeWidth: 3
1749
+ }
1750
+ ),
1751
+ /* @__PURE__ */ t("div", { className: "flex-1 min-w-0", children: [
1752
+ /* @__PURE__ */ e("p", { className: "text-sm font-medium text-foreground truncate", children: r.title }),
1753
+ r.lastAccessedAt && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: Nt(r.lastAccessedAt) })
1754
+ ] }),
1755
+ /* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground whitespace-nowrap", children: [
1756
+ Math.round(r.progress),
1757
+ "%"
1758
+ ] })
1759
+ ]
1760
+ },
1761
+ r.uid
1762
+ )) }) }) : /* @__PURE__ */ t("div", { className: "py-12 text-center", children: [
1763
+ /* @__PURE__ */ e(Z, { className: "size-10 text-muted-foreground mx-auto mb-3" }),
1764
+ /* @__PURE__ */ e("p", { className: "text-sm font-medium text-foreground", children: "No courses yet" }),
1765
+ /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground mt-1", children: "Enrolled courses will appear here." })
1766
+ ] }) }),
1767
+ /* @__PURE__ */ e(H, { value: "achievements", children: o.length > 0 ? /* @__PURE__ */ e("div", { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-2", children: o.map((r) => /* @__PURE__ */ e(
1768
+ vt,
1769
+ {
1770
+ title: r.name,
1771
+ description: r.description,
1772
+ icon: r.iconUrl ? /* @__PURE__ */ e(
1773
+ "img",
1774
+ {
1775
+ src: r.iconUrl,
1776
+ alt: r.name,
1777
+ className: "w-12 h-12"
1778
+ }
1779
+ ) : void 0,
1780
+ earnedDate: r.earnedAt
1781
+ },
1782
+ r.uid
1783
+ )) }) : /* @__PURE__ */ t("div", { className: "py-12 text-center", children: [
1784
+ /* @__PURE__ */ e(se, { className: "size-10 text-muted-foreground mx-auto mb-3" }),
1785
+ /* @__PURE__ */ e("p", { className: "text-sm font-medium text-foreground", children: "No achievements yet" }),
1786
+ /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground mt-1", children: "Achievements will appear here as they are earned." })
1787
+ ] }) }),
1788
+ /* @__PURE__ */ e(H, { value: "certificates", children: l.length > 0 ? /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(j, { className: "p-0 divide-y divide-border", children: l.map((r) => /* @__PURE__ */ t(
1789
+ "div",
1790
+ {
1791
+ className: A(
1792
+ "flex items-center gap-3 px-4 py-3 transition-colors",
1793
+ (n == null ? void 0 : n[r.uid]) && !h && "cursor-pointer hover:bg-muted/50"
1794
+ ),
1795
+ onClick: n != null && n[r.uid] && !h ? () => S(r.uid) : void 0,
1796
+ children: [
1797
+ /* @__PURE__ */ e("div", { className: "w-9 h-9 rounded-lg bg-primary/10 flex items-center justify-center text-primary", children: /* @__PURE__ */ e(ee, { size: 20 }) }),
1798
+ /* @__PURE__ */ t("div", { className: "flex-1 min-w-0", children: [
1799
+ /* @__PURE__ */ e("p", { className: "text-sm font-medium text-foreground truncate", children: r.courseName }),
1800
+ /* @__PURE__ */ t("p", { className: "text-xs text-muted-foreground", children: [
1801
+ "Issued",
1802
+ " ",
1803
+ new Date(r.issuedAt).toLocaleDateString()
1804
+ ] })
1805
+ ] }),
1806
+ (n == null ? void 0 : n[r.uid]) && /* @__PURE__ */ e(q, { variant: "secondary", className: "text-xs", children: "View" })
1807
+ ]
1808
+ },
1809
+ r.uid
1810
+ )) }) }) : /* @__PURE__ */ t("div", { className: "py-12 text-center", children: [
1811
+ /* @__PURE__ */ e(ee, { className: "size-10 text-muted-foreground mx-auto mb-3" }),
1812
+ /* @__PURE__ */ e("p", { className: "text-sm font-medium text-foreground", children: "No certificates yet" }),
1813
+ /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground mt-1", children: "Certificates will appear here once courses are completed." })
1814
+ ] }) })
1815
+ ] })
1816
+ ]
1817
+ }
1818
+ );
1819
+ }
1820
+ const Zt = Y(Rt, "StudentProfileModule");
1821
+ export {
1822
+ Ht as AssignmentModule,
1823
+ _t as CertificateModule,
1824
+ Xt as CourseCatalogModule,
1825
+ qt as CoursePlayer,
1826
+ Jt as DiscussionModule,
1827
+ Gt as ExamModule,
1828
+ Yt as FlashcardLab,
1829
+ Vt as GradeCenterModule,
1830
+ $t as QuizModule,
1831
+ Kt as StudentDashboardModule,
1832
+ Zt as StudentProfileModule,
1833
+ Wt as SurveyModule
1834
+ };