@cuemath/leap 2.8.25-rj-5 → 2.8.26

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 (263) hide show
  1. package/dist/assets/lottie/lottie.js +61 -0
  2. package/dist/assets/lottie/lottie.js.map +1 -0
  3. package/dist/features/analytics-events/platform-events-student.js +5 -6
  4. package/dist/features/analytics-events/platform-events-student.js.map +1 -1
  5. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js +81 -79
  6. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js.map +1 -1
  7. package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js +16 -17
  8. package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js.map +1 -1
  9. package/dist/features/circle-games/game-launcher/game-launcher.js +61 -65
  10. package/dist/features/circle-games/game-launcher/game-launcher.js.map +1 -1
  11. package/dist/features/circle-games/games/web-view/web-view-types.js.map +1 -1
  12. package/dist/features/circle-games/leaderboard/comps/banner/banner.js +35 -53
  13. package/dist/features/circle-games/leaderboard/comps/banner/banner.js.map +1 -1
  14. package/dist/features/circle-games/leaderboard/leaderboard-styled.js +16 -20
  15. package/dist/features/circle-games/leaderboard/leaderboard-styled.js.map +1 -1
  16. package/dist/features/circle-games/leaderboard/leaderboard.js +77 -131
  17. package/dist/features/circle-games/leaderboard/leaderboard.js.map +1 -1
  18. package/dist/features/circle-games/sign-up/comp/circular-steps/circular-steps.js +40 -41
  19. package/dist/features/circle-games/sign-up/comp/circular-steps/circular-steps.js.map +1 -1
  20. package/dist/features/circle-games/sign-up/comp/spinner/spinner-styled.js +4 -8
  21. package/dist/features/circle-games/sign-up/comp/spinner/spinner-styled.js.map +1 -1
  22. package/dist/features/circle-games/sign-up/comp/spinner/spinner.js +6 -23
  23. package/dist/features/circle-games/sign-up/comp/spinner/spinner.js.map +1 -1
  24. package/dist/features/circle-games/sign-up/comp/splash-screen/splash-screen.js +40 -35
  25. package/dist/features/circle-games/sign-up/comp/splash-screen/splash-screen.js.map +1 -1
  26. package/dist/features/journey/journey-id/journey-id-student.js +1 -1
  27. package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
  28. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/difficulty-and-duration-selection/difficulty-and-duration-selection.js +2 -2
  29. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/difficulty-and-duration-selection/test-radio-card/test-card-lottie-animation.js +8 -23
  30. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/difficulty-and-duration-selection/test-radio-card/test-card-lottie-animation.js.map +1 -1
  31. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/difficulty-and-duration-selection/test-radio-card/test-radio-card.js +11 -11
  32. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/difficulty-and-duration-selection/test-radio-card/test-radio-card.js.map +1 -1
  33. package/dist/features/milestone/milestone-tests/tests-creation/utils/index.js +37 -43
  34. package/dist/features/milestone/milestone-tests/tests-creation/utils/index.js.map +1 -1
  35. package/dist/features/post-game-stats/accuracy/accuracy.js +38 -34
  36. package/dist/features/post-game-stats/accuracy/accuracy.js.map +1 -1
  37. package/dist/features/post-game-stats/clock/clock.js +43 -39
  38. package/dist/features/post-game-stats/clock/clock.js.map +1 -1
  39. package/dist/features/post-game-stats/points/points.js +43 -44
  40. package/dist/features/post-game-stats/points/points.js.map +1 -1
  41. package/dist/features/post-game-stats/streak/streak.js +30 -28
  42. package/dist/features/post-game-stats/streak/streak.js.map +1 -1
  43. package/dist/features/trial-session/comps/av-panels/teacher-av-panel/teacher-av-panel.js +56 -54
  44. package/dist/features/trial-session/comps/av-panels/teacher-av-panel/teacher-av-panel.js.map +1 -1
  45. package/dist/features/trial-session/comps/parent-app/parent-app.js +25 -20
  46. package/dist/features/trial-session/comps/parent-app/parent-app.js.map +1 -1
  47. package/dist/features/trial-session/comps/school-goals/school-goals-view.js +4 -4
  48. package/dist/features/trial-session/comps/school-goals/school-goals-view.js.map +1 -1
  49. package/dist/features/trial-session/comps/session-insights/session-insights.js +40 -39
  50. package/dist/features/trial-session/comps/session-insights/session-insights.js.map +1 -1
  51. package/dist/features/trial-session/comps/trial-circle-game/trial-circle-game.js +38 -39
  52. package/dist/features/trial-session/comps/trial-circle-game/trial-circle-game.js.map +1 -1
  53. package/dist/features/trial-session/trial-session-types.js.map +1 -1
  54. package/dist/features/trial-session/trial-session-view.js +95 -81
  55. package/dist/features/trial-session/trial-session-view.js.map +1 -1
  56. package/dist/features/ui/loader/circular-loader/circular-loader.js +16 -20
  57. package/dist/features/ui/loader/circular-loader/circular-loader.js.map +1 -1
  58. package/dist/features/ui/lottie-animation/helper.js +13 -0
  59. package/dist/features/ui/lottie-animation/helper.js.map +1 -0
  60. package/dist/features/ui/lottie-animation/lottie-animation.js +37 -0
  61. package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -0
  62. package/dist/features/ui/nudge/nudge-styled.js +4 -8
  63. package/dist/features/ui/nudge/nudge-styled.js.map +1 -1
  64. package/dist/features/ui/nudge/nudge.js +13 -30
  65. package/dist/features/ui/nudge/nudge.js.map +1 -1
  66. package/dist/features/ui/perfect-hits/perfect-hits-helpers.js +22 -20
  67. package/dist/features/ui/perfect-hits/perfect-hits-helpers.js.map +1 -1
  68. package/dist/features/worksheet/constants/events.js +2 -1
  69. package/dist/features/worksheet/constants/events.js.map +1 -1
  70. package/dist/features/worksheet/worksheet/worksheet-permissions/error.js +25 -48
  71. package/dist/features/worksheet/worksheet/worksheet-permissions/error.js.map +1 -1
  72. package/dist/features/worksheet/worksheet/worksheet-question/header/validated-animation.js +12 -26
  73. package/dist/features/worksheet/worksheet/worksheet-question/header/validated-animation.js.map +1 -1
  74. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +4 -0
  75. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
  76. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +250 -219
  77. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
  78. package/dist/features/worksheet/worksheet/worksheet.js +33 -32
  79. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  80. package/dist/index.d.ts +62 -17
  81. package/dist/index.js +313 -313
  82. package/dist/static/accuracy-meter.99585cba.json +4218 -0
  83. package/dist/static/accuracy-needle.cd6e63ac.json +618 -0
  84. package/dist/static/beginner1x.489908a7.json +3508 -0
  85. package/dist/static/bronze-1.da4e4b5f.json +4176 -0
  86. package/dist/static/bronze-2.97f9c639.json +4433 -0
  87. package/dist/static/bronze-3.6a433ebd.json +4786 -0
  88. package/dist/static/circular-loader.a5a1a0a6.json +238 -0
  89. package/dist/static/clock-30min.eae818b8.json +1197 -0
  90. package/dist/static/clock-45min.df8adf51.json +1197 -0
  91. package/dist/static/clock-60min.2b48d875.json +1197 -0
  92. package/dist/static/clock-90min.3e557ed7.json +1407 -0
  93. package/dist/static/color-1.45101b9a.json +4545 -0
  94. package/dist/static/color-2.ccdc7d0a.json +4828 -0
  95. package/dist/static/color-3.5e8e1422.json +5273 -0
  96. package/dist/static/difficult.6846c064.json +2755 -0
  97. package/dist/static/easy-rescheduling-lottie.28026af9.json +9301 -0
  98. package/dist/static/easy.68242ddd.json +2658 -0
  99. package/dist/static/elite-circle.3df58972.json +6876 -0
  100. package/dist/static/error-lottie.b3507a4b.json +5255 -0
  101. package/dist/static/familiar1x.7c9c7f15.json +3046 -0
  102. package/dist/static/fifteen-min-clock.0af4e303.json +715 -0
  103. package/dist/static/five-min-clock.6be5cc41.json +721 -0
  104. package/dist/static/gold-1.ab2489fe.json +4176 -0
  105. package/dist/static/gold-2.34045826.json +4441 -0
  106. package/dist/static/gold-3.d704698b.json +4810 -0
  107. package/dist/static/levelup-rings.b1055283.json +549 -0
  108. package/dist/static/medium.94c3829b.json +2289 -0
  109. package/dist/static/nudge-tap.5cb30093.json +1057 -0
  110. package/dist/static/point1.b53831de.json +2942 -0
  111. package/dist/static/point10.7b5e536d.json +3179 -0
  112. package/dist/static/point100.1df16f82.json +3196 -0
  113. package/dist/static/point15.fea00c32.json +3179 -0
  114. package/dist/static/point20.c88d776d.json +3178 -0
  115. package/dist/static/point25.a18c346a.json +3178 -0
  116. package/dist/static/point30.c5224b0b.json +3202 -0
  117. package/dist/static/point35.fad343dd.json +3058 -0
  118. package/dist/static/point40.10a16f72.json +3082 -0
  119. package/dist/static/point45.2ad7561f.json +3082 -0
  120. package/dist/static/point5.da40ed1f.json +2948 -0
  121. package/dist/static/point50.5718cb3d.json +3046 -0
  122. package/dist/static/point60.17380d9f.json +3076 -0
  123. package/dist/static/proficient1x.fa6e7b80.json +3430 -0
  124. package/dist/static/silver-1.0396328a.json +4168 -0
  125. package/dist/static/silver-2.bf50615f.json +4433 -0
  126. package/dist/static/silver-3.13d66b84.json +4810 -0
  127. package/dist/static/sleepy-boi.031a1165.json +1008 -0
  128. package/dist/static/spinner-white.639e0d87.json +122 -0
  129. package/dist/static/splash-screen.bbf567ce.json +2411 -0
  130. package/dist/static/stay-connected-lottie.111439b3.json +3547 -0
  131. package/dist/static/teacher-validation.7577ecdc.json +245 -0
  132. package/dist/static/total-streak.d5ce7669.json +842 -0
  133. package/dist/static/total-time-spent.434005d3.json +200 -0
  134. package/dist/static/total-time.d979cbb9.json +24383 -0
  135. package/dist/static/tournament-ripple.e5c239a5.json +1047 -0
  136. package/dist/static/track-progress-lottie.422108cf.json +2972 -0
  137. package/package.json +1 -1
  138. package/dist/assets/lotties/circle/100pts.json.js +0 -7957
  139. package/dist/assets/lotties/circle/100pts.json.js.map +0 -1
  140. package/dist/assets/lotties/circle/10pts.json.js +0 -7753
  141. package/dist/assets/lotties/circle/10pts.json.js.map +0 -1
  142. package/dist/assets/lotties/circle/15pts.json.js +0 -7879
  143. package/dist/assets/lotties/circle/15pts.json.js.map +0 -1
  144. package/dist/assets/lotties/circle/1pts.json.js +0 -7257
  145. package/dist/assets/lotties/circle/1pts.json.js.map +0 -1
  146. package/dist/assets/lotties/circle/20pts.json.js +0 -7845
  147. package/dist/assets/lotties/circle/20pts.json.js.map +0 -1
  148. package/dist/assets/lotties/circle/25pts.json.js +0 -7971
  149. package/dist/assets/lotties/circle/25pts.json.js.map +0 -1
  150. package/dist/assets/lotties/circle/30pts.json.js +0 -7941
  151. package/dist/assets/lotties/circle/30pts.json.js.map +0 -1
  152. package/dist/assets/lotties/circle/35pts.json.js +0 -7881
  153. package/dist/assets/lotties/circle/35pts.json.js.map +0 -1
  154. package/dist/assets/lotties/circle/40pts.json.js +0 -7725
  155. package/dist/assets/lotties/circle/40pts.json.js.map +0 -1
  156. package/dist/assets/lotties/circle/45pts.json.js +0 -7851
  157. package/dist/assets/lotties/circle/45pts.json.js.map +0 -1
  158. package/dist/assets/lotties/circle/50pts.json.js +0 -7707
  159. package/dist/assets/lotties/circle/50pts.json.js.map +0 -1
  160. package/dist/assets/lotties/circle/5pts.json.js +0 -7420
  161. package/dist/assets/lotties/circle/5pts.json.js.map +0 -1
  162. package/dist/assets/lotties/circle/60pts.json.js +0 -7701
  163. package/dist/assets/lotties/circle/60pts.json.js.map +0 -1
  164. package/dist/assets/lotties/circle/accuracy-meter-lottie.json.js +0 -6811
  165. package/dist/assets/lotties/circle/accuracy-meter-lottie.json.js.map +0 -1
  166. package/dist/assets/lotties/circle/accuracy-needle-lottie.json.js +0 -1503
  167. package/dist/assets/lotties/circle/accuracy-needle-lottie.json.js.map +0 -1
  168. package/dist/assets/lotties/circle/circular-loader.json.js +0 -635
  169. package/dist/assets/lotties/circle/circular-loader.json.js.map +0 -1
  170. package/dist/assets/lotties/circle/elite-circle-lottie.json.js +0 -12079
  171. package/dist/assets/lotties/circle/elite-circle-lottie.json.js.map +0 -1
  172. package/dist/assets/lotties/circle/levelup-rings-lottie.json.js +0 -1412
  173. package/dist/assets/lotties/circle/levelup-rings-lottie.json.js.map +0 -1
  174. package/dist/assets/lotties/circle/sleepy-boi-lottie.json.js +0 -2632
  175. package/dist/assets/lotties/circle/sleepy-boi-lottie.json.js.map +0 -1
  176. package/dist/assets/lotties/circle/spinner-white.json.js +0 -316
  177. package/dist/assets/lotties/circle/spinner-white.json.js.map +0 -1
  178. package/dist/assets/lotties/circle/splash-screen.json.js +0 -5864
  179. package/dist/assets/lotties/circle/splash-screen.json.js.map +0 -1
  180. package/dist/assets/lotties/circle/total-streak-lottie.json.js +0 -2103
  181. package/dist/assets/lotties/circle/total-streak-lottie.json.js.map +0 -1
  182. package/dist/assets/lotties/circle/total-time-lottie.json.js +0 -33016
  183. package/dist/assets/lotties/circle/total-time-lottie.json.js.map +0 -1
  184. package/dist/assets/lotties/circle/total-time-spent-lottie.json.js +0 -260
  185. package/dist/assets/lotties/circle/total-time-spent-lottie.json.js.map +0 -1
  186. package/dist/assets/lotties/circle/tournament-ripple-lottie.json.js +0 -1563
  187. package/dist/assets/lotties/circle/tournament-ripple-lottie.json.js.map +0 -1
  188. package/dist/assets/lotties/common/nudge-tap.json.js +0 -3597
  189. package/dist/assets/lotties/common/nudge-tap.json.js.map +0 -1
  190. package/dist/assets/lotties/error-lottie.json.js +0 -12755
  191. package/dist/assets/lotties/error-lottie.json.js.map +0 -1
  192. package/dist/assets/lotties/perfect-hits/bronze-1.json.js +0 -10871
  193. package/dist/assets/lotties/perfect-hits/bronze-1.json.js.map +0 -1
  194. package/dist/assets/lotties/perfect-hits/bronze-2.json.js +0 -11389
  195. package/dist/assets/lotties/perfect-hits/bronze-2.json.js.map +0 -1
  196. package/dist/assets/lotties/perfect-hits/bronze-3.json.js +0 -12169
  197. package/dist/assets/lotties/perfect-hits/bronze-3.json.js.map +0 -1
  198. package/dist/assets/lotties/perfect-hits/color-1.json.js +0 -12348
  199. package/dist/assets/lotties/perfect-hits/color-1.json.js.map +0 -1
  200. package/dist/assets/lotties/perfect-hits/color-2.json.js +0 -12941
  201. package/dist/assets/lotties/perfect-hits/color-2.json.js.map +0 -1
  202. package/dist/assets/lotties/perfect-hits/color-3.json.js +0 -14034
  203. package/dist/assets/lotties/perfect-hits/color-3.json.js.map +0 -1
  204. package/dist/assets/lotties/perfect-hits/gold-1.json.js +0 -10871
  205. package/dist/assets/lotties/perfect-hits/gold-1.json.js.map +0 -1
  206. package/dist/assets/lotties/perfect-hits/gold-2.json.js +0 -11389
  207. package/dist/assets/lotties/perfect-hits/gold-2.json.js.map +0 -1
  208. package/dist/assets/lotties/perfect-hits/gold-3.json.js +0 -12169
  209. package/dist/assets/lotties/perfect-hits/gold-3.json.js.map +0 -1
  210. package/dist/assets/lotties/perfect-hits/silver-1.json.js +0 -10871
  211. package/dist/assets/lotties/perfect-hits/silver-1.json.js.map +0 -1
  212. package/dist/assets/lotties/perfect-hits/silver-2.json.js +0 -11389
  213. package/dist/assets/lotties/perfect-hits/silver-2.json.js.map +0 -1
  214. package/dist/assets/lotties/perfect-hits/silver-3.json.js +0 -12169
  215. package/dist/assets/lotties/perfect-hits/silver-3.json.js.map +0 -1
  216. package/dist/assets/lotties/teacher-validation.json.js +0 -649
  217. package/dist/assets/lotties/teacher-validation.json.js.map +0 -1
  218. package/dist/assets/lotties/tests-creation/clock_30_min.json.js +0 -2857
  219. package/dist/assets/lotties/tests-creation/clock_30_min.json.js.map +0 -1
  220. package/dist/assets/lotties/tests-creation/clock_45_min.json.js +0 -2857
  221. package/dist/assets/lotties/tests-creation/clock_45_min.json.js.map +0 -1
  222. package/dist/assets/lotties/tests-creation/clock_60_min.json.js +0 -2857
  223. package/dist/assets/lotties/tests-creation/clock_60_min.json.js.map +0 -1
  224. package/dist/assets/lotties/tests-creation/clock_90_min.json.js +0 -3345
  225. package/dist/assets/lotties/tests-creation/clock_90_min.json.js.map +0 -1
  226. package/dist/assets/lotties/tests-creation/difficult.json.js +0 -6713
  227. package/dist/assets/lotties/tests-creation/difficult.json.js.map +0 -1
  228. package/dist/assets/lotties/tests-creation/easy.json.js +0 -6525
  229. package/dist/assets/lotties/tests-creation/easy.json.js.map +0 -1
  230. package/dist/assets/lotties/tests-creation/medium.json.js +0 -5603
  231. package/dist/assets/lotties/tests-creation/medium.json.js.map +0 -1
  232. package/dist/assets/lotties/trial-v3/15min-clock.json.js +0 -2037
  233. package/dist/assets/lotties/trial-v3/15min-clock.json.js.map +0 -1
  234. package/dist/assets/lotties/trial-v3/5min-clock.json.js +0 -2062
  235. package/dist/assets/lotties/trial-v3/5min-clock.json.js.map +0 -1
  236. package/dist/assets/lotties/trial-v3/insight/beginner1x.json.js +0 -8517
  237. package/dist/assets/lotties/trial-v3/insight/beginner1x.json.js.map +0 -1
  238. package/dist/assets/lotties/trial-v3/insight/familiar1x.json.js +0 -7396
  239. package/dist/assets/lotties/trial-v3/insight/familiar1x.json.js.map +0 -1
  240. package/dist/assets/lotties/trial-v3/insight/proficient1x.json.js +0 -8559
  241. package/dist/assets/lotties/trial-v3/insight/proficient1x.json.js.map +0 -1
  242. package/dist/assets/lotties/trial-v3/parent-app/easy-rescheduling-lottie.json.js +0 -23284
  243. package/dist/assets/lotties/trial-v3/parent-app/easy-rescheduling-lottie.json.js.map +0 -1
  244. package/dist/assets/lotties/trial-v3/parent-app/stay-connected-lottie.json.js +0 -9090
  245. package/dist/assets/lotties/trial-v3/parent-app/stay-connected-lottie.json.js.map +0 -1
  246. package/dist/assets/lotties/trial-v3/parent-app/track-progress-lottie.json.js +0 -8675
  247. package/dist/assets/lotties/trial-v3/parent-app/track-progress-lottie.json.js.map +0 -1
  248. package/dist/features/circle-games/enum/circle-action-ids.js +0 -5
  249. package/dist/features/circle-games/enum/circle-action-ids.js.map +0 -1
  250. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/fetch-lottie.js +0 -13
  251. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/fetch-lottie.js.map +0 -1
  252. package/dist/features/circle-games/game-launcher/game-launcher-styled.js +0 -10
  253. package/dist/features/circle-games/game-launcher/game-launcher-styled.js.map +0 -1
  254. package/dist/features/circle-games/leaderboard/comps/info-bar/info-bar-styled.js +0 -12
  255. package/dist/features/circle-games/leaderboard/comps/info-bar/info-bar-styled.js.map +0 -1
  256. package/dist/features/circle-games/leaderboard/comps/info-bar/info-bar.js +0 -30
  257. package/dist/features/circle-games/leaderboard/comps/info-bar/info-bar.js.map +0 -1
  258. package/dist/features/post-game-stats/points/points-styled.js +0 -10
  259. package/dist/features/post-game-stats/points/points-styled.js.map +0 -1
  260. package/dist/features/trial-session/comps/render-lottie/index.js +0 -26
  261. package/dist/features/trial-session/comps/render-lottie/index.js.map +0 -1
  262. package/dist/features/ui/loader/circular-loader/circular-loader-styled.js +0 -17
  263. package/dist/features/ui/loader/circular-loader/circular-loader-styled.js.map +0 -1
@@ -1,311 +1,342 @@
1
- import { jsxs as M, jsx as i, Fragment as Ot } from "react/jsx-runtime";
2
- import { memo as Tt, useMemo as p, useState as W, useRef as pt, useCallback as Nt, useEffect as $, useLayoutEffect as Qt } from "react";
3
- import { IMAGES as Ft } from "../../../../assets/images/images.js";
4
- import Ut from "../../../cue-canvas/cue-canvas.js";
5
- import zt from "../../../pointer-sync/pointer.js";
6
- import $t from "../../../ui/layout/flex-view.js";
7
- import { QUESTIONS_GAP as Xt, LEARNOSITY_KEYBOARD_HEIGHT as Et } from "../constants.js";
8
- import { getPaperColorByQuestion as Dt, isConceptIntroWidget as Kt, scrollToQuestion as Rt } from "../worksheet-helpers.js";
9
- import Pt from "./header/header.js";
10
- import jt from "./learnosity-question.js";
11
- import Vt from "./question-backdrop/question-backdrop.js";
12
- import Yt from "./subjective-review.js";
13
- import Gt from "./system-intros/advanced-practice-intro.js";
14
- import Zt from "./system-intros/basic-practice-intro.js";
15
- import Jt from "./system-intros/exit-ticket-intro.js";
16
- import kt from "./system-intros/regular-practice-intro.js";
17
- import { QuestionContainerWrapper as qt, StimulusReview as to, QuestionContainer as oo, QuestionWrapper as io, LessonOverviewBanner as ro, CueCanvasWrapper as eo, Hint as no, Solution as co } from "./worksheet-question-styled.js";
18
- const So = Tt(
1
+ import { jsxs as I, jsx as r, Fragment as Dt } from "react/jsx-runtime";
2
+ import { memo as Ut, useMemo as p, useState as A, useRef as z, useCallback as zt, useEffect as d, useLayoutEffect as Kt } from "react";
3
+ import { IMAGES as Vt } from "../../../../assets/images/images.js";
4
+ import Xt from "../../../cue-canvas/cue-canvas.js";
5
+ import Pt from "../../../pointer-sync/pointer.js";
6
+ import wt from "../../../ui/layout/flex-view.js";
7
+ import jt from "../../constants/events.js";
8
+ import { QUESTIONS_GAP as Gt, LEARNOSITY_KEYBOARD_HEIGHT as Ht } from "../constants.js";
9
+ import { getPaperColorByQuestion as Yt, isConceptIntroWidget as Zt, scrollToQuestion as St } from "../worksheet-helpers.js";
10
+ import Jt from "./header/header.js";
11
+ import qt from "./learnosity-question.js";
12
+ import kt from "./question-backdrop/question-backdrop.js";
13
+ import te from "./subjective-review.js";
14
+ import ee from "./system-intros/advanced-practice-intro.js";
15
+ import re from "./system-intros/basic-practice-intro.js";
16
+ import oe from "./system-intros/exit-ticket-intro.js";
17
+ import ie from "./system-intros/regular-practice-intro.js";
18
+ import { QuestionContainerWrapper as ne, StimulusReview as ce, QuestionContainer as ae, QuestionWrapper as se, LessonOverviewBanner as le, CueCanvasWrapper as me, Hint as ue, Solution as fe } from "./worksheet-question-styled.js";
19
+ const Le = Ut(
19
20
  ({
20
- userType: e,
21
- signedRequest: _t,
21
+ userType: c,
22
+ signedRequest: bt,
22
23
  worksheetCompleted: m,
23
- question: r,
24
- response: o,
25
- nextQuestionId: E,
24
+ question: n,
25
+ response: e,
26
+ nextQuestionId: _,
26
27
  isActive: R,
27
- isHidden: A,
28
- canRender: Q,
29
- appended: c,
30
- maxQuestionWidth: F,
31
- behavior: U,
32
- layout: z,
33
- actionbarHeight: vt,
34
- learnosity: _,
35
- intersectionObserver: X,
36
- background: D = "paper",
37
- onMarkForReview: wt,
38
- userId: Ht,
39
- onPublishStrokes: K,
40
- onReceiveStrokes: P,
41
- isScribblingEnabled: j,
42
- initialStrokesData: O,
43
- isCanvasEnabled: V,
44
- onPublishMouseMove: Y,
45
- onSubscribeMouseMove: G,
46
- setActiveQuestionId: Z,
47
- canResolveDoubt: Ct,
48
- onResolveDoubt: St,
49
- studentId: bt,
50
- responses: Bt,
51
- subjectiveProps: J
28
+ isHidden: M,
29
+ canRender: K,
30
+ loggerRef: O,
31
+ appended: a,
32
+ maxQuestionWidth: V,
33
+ behavior: X,
34
+ layout: P,
35
+ actionbarHeight: Ct,
36
+ learnosity: v,
37
+ intersectionObserver: j,
38
+ background: G = "paper",
39
+ onMarkForReview: Bt,
40
+ userId: Wt,
41
+ onPublishStrokes: Y,
42
+ onReceiveStrokes: Z,
43
+ isScribblingEnabled: J,
44
+ initialStrokesData: N,
45
+ isCanvasEnabled: q,
46
+ onPublishMouseMove: k,
47
+ onSubscribeMouseMove: tt,
48
+ setActiveQuestionId: et,
49
+ canResolveDoubt: yt,
50
+ onResolveDoubt: xt,
51
+ studentId: Lt,
52
+ responses: Tt,
53
+ subjectiveProps: rt
52
54
  }) => {
53
55
  const C = p(
54
- () => D === "paper" ? Dt(r) : void 0,
55
- [D, r]
56
- ), [S, xt] = W(), [k, yt] = W(), {
57
- validation: q,
58
- review: T,
59
- maximumAttempts: tt,
60
- canExceedAttempts: ot,
61
- teacherValidationEnabled: v,
62
- solutionHidden: it
63
- } = U, { minQuestionHeight: Lt, topOffset: rt, questionsScrollable: b } = z, {
64
- type: B,
65
- response_id: a,
66
- stimulus_review: u,
67
- item_type: l,
68
- instructor_stimulus: et,
69
- metadata: { hints: h, solution: w }
70
- } = r, nt = !!u, x = l === "overview", f = Kt(et), H = et === "SystemIntro", ct = f || H, at = o == null ? void 0 : o.responseEdited, It = p(() => {
56
+ () => G === "paper" ? Yt(n) : void 0,
57
+ [G, n]
58
+ ), [B, It] = A(), [ot, At] = A(), {
59
+ validation: it,
60
+ review: Q,
61
+ maximumAttempts: nt,
62
+ canExceedAttempts: ct,
63
+ teacherValidationEnabled: w,
64
+ solutionHidden: at
65
+ } = X, { minQuestionHeight: Mt, topOffset: st, questionsScrollable: W } = P, {
66
+ type: g,
67
+ response_id: o,
68
+ stimulus_review: E,
69
+ item_type: u,
70
+ instructor_stimulus: lt,
71
+ metadata: { hints: f, solution: H, widget_reference: mt },
72
+ item_reference: ut,
73
+ question_number: ft
74
+ } = n, ht = !!E, y = u === "overview", h = Zt(lt), S = lt === "SystemIntro", dt = h || S, gt = e == null ? void 0 : e.responseEdited, Ot = p(() => {
71
75
  const t = [];
72
- return at && e === "TEACHER" && t.push("attempting"), c || t.push("hidden"), B === "hotspot" && t.push("correct-answers-hidden"), c && v && B === "clozetext" && (!f || e === "STUDENT" ? t.push("response-hidden") : t.push("response-code-hidden")), x && t.push("lesson-overview"), f && t.push("concept-intro"), H && t.push("system-intro"), t.join(" ");
76
+ return gt && c === "TEACHER" && t.push("attempting"), a || t.push("hidden"), g === "hotspot" && t.push("correct-answers-hidden"), a && w && g === "clozetext" && (!h || c === "STUDENT" ? t.push("response-hidden") : t.push("response-code-hidden")), y && t.push("lesson-overview"), h && t.push("concept-intro"), S && t.push("system-intro"), t.join(" ");
73
77
  }, [
74
- c,
75
- f,
76
- x,
77
- H,
78
- B,
79
- at,
80
- v,
81
- e
82
- ]), y = (o == null ? void 0 : o.hintsUsed) ?? 0, [st] = W((o == null ? void 0 : o.validatedByTeacher) ?? !1), L = pt(null), mt = pt(null), N = p(() => h == null ? void 0 : h.slice(0, y), [h, y]), lt = p(() => e === "TEACHER" || m ? !0 : !o || !o.response || o.responseEdited ? !1 : q, [o, e, q, m]), ht = p(() => {
83
- if (e === "TEACHER") return !0;
84
- if (T) {
85
- const { attemptsHistory: t } = o ?? {};
86
- return ((t == null ? void 0 : t.length) ?? 0) >= tt && !ot;
78
+ a,
79
+ h,
80
+ y,
81
+ S,
82
+ g,
83
+ gt,
84
+ w,
85
+ c
86
+ ]), F = z({}), x = (e == null ? void 0 : e.hintsUsed) ?? 0, [Et] = A((e == null ? void 0 : e.validatedByTeacher) ?? !1), L = z(null), D = z(null), U = p(() => f == null ? void 0 : f.slice(0, x), [f, x]), $t = p(() => c === "TEACHER" || m ? !0 : !e || !e.response || e.responseEdited ? !1 : it, [e, c, it, m]), pt = p(() => {
87
+ if (c === "TEACHER") return !0;
88
+ if (Q) {
89
+ const { attemptsHistory: t } = e ?? {};
90
+ return ((t == null ? void 0 : t.length) ?? 0) >= nt && !ct;
87
91
  }
88
92
  return !1;
89
- }, [ot, tt, o, T, e]), Mt = p(
90
- () => w && m && !it,
91
- [it, w, m]
92
- ), [ft, Wt] = W({
93
+ }, [ct, nt, e, Q, c]), Nt = p(
94
+ () => H && m && !at,
95
+ [at, H, m]
96
+ ), [_t, Qt] = A({
93
97
  width: 0,
94
98
  height: 0
95
- }), At = Nt((t) => {
96
- yt(t);
99
+ }), Ft = zt((t) => {
100
+ At(t);
97
101
  }, []);
98
- return $(() => {
99
- L.current && X.observe(L.current);
100
- }, [X]), $(() => {
101
- if (c && (r.type === "clozeassociation" || r.type === "association" || r.type === "clozeformula")) {
102
+ return d(() => {
103
+ L.current && j.observe(L.current);
104
+ }, [j]), d(() => {
105
+ if (a && (n.type === "clozeassociation" || n.type === "association" || n.type === "clozeformula")) {
102
106
  const t = document.querySelectorAll(
103
- `.widget-${r.response_id} .lrn_draggable`
107
+ `.widget-${n.response_id} .lrn_draggable`
104
108
  );
105
- let s = 0, n = 0;
106
- t.forEach((d) => {
107
- s = Math.max(s, d.clientWidth + 33), n = Math.max(n, d.clientHeight + 1);
108
- }), Wt({
109
- width: r.type !== "association" ? s : 0,
110
- height: n
109
+ let s = 0, i = 0;
110
+ t.forEach((l) => {
111
+ s = Math.max(s, l.clientWidth + 33), i = Math.max(i, l.clientHeight + 1);
112
+ }), Qt({
113
+ width: n.type !== "association" ? s : 0,
114
+ height: i
111
115
  });
112
116
  }
113
- }, [c, r.response_id, r.type]), $(() => {
114
- if (c && lt) {
115
- const t = _.question(a);
117
+ }, [a, n.response_id, n.type]), d(() => {
118
+ if (a && $t) {
119
+ const t = v.question(o);
116
120
  t && t.validate({
117
- showCorrectAnswers: ht
121
+ showCorrectAnswers: pt
118
122
  });
119
123
  }
120
- }, [c, _, a, T, ht, e, lt]), $(() => {
121
- const t = L.current, s = (n) => {
122
- const d = n.querySelector(".lrn_response_wrapper");
123
- if (!d)
124
+ }, [a, v, o, Q, pt, c, $t]), d(() => {
125
+ const t = D.current;
126
+ if (a && t && O.current && F.current[o] === void 0) {
127
+ const s = t.clientWidth, i = t.querySelectorAll("*");
128
+ for (let l = 0; l < i.length; l++) {
129
+ const b = i[l];
130
+ if (b && b.clientWidth > s) {
131
+ F.current[o] = !0, O.current(jt.WORKSHEET_V3_GREATER_WIDTH_ELEMENT, {
132
+ item_reference: ut,
133
+ widget_reference: mt,
134
+ question_type: g,
135
+ question_number: ft,
136
+ responseId: o
137
+ });
138
+ break;
139
+ }
140
+ }
141
+ F.current[o] = !1;
142
+ }
143
+ }, [
144
+ a,
145
+ ut,
146
+ O,
147
+ g,
148
+ ft,
149
+ o,
150
+ mt
151
+ ]), d(() => {
152
+ const t = L.current, s = (i) => {
153
+ const l = i.querySelector(".lrn_response_wrapper");
154
+ if (!l)
124
155
  return 0;
125
- const ut = n.getBoundingClientRect().bottom, I = d.getBoundingClientRect().bottom, g = Math.abs(ut - I);
126
- return g < Et ? Et - g : 0;
156
+ const b = i.getBoundingClientRect().bottom, T = l.getBoundingClientRect().bottom, $ = Math.abs(b - T);
157
+ return $ < Ht ? Ht - $ : 0;
127
158
  };
128
- c && t && xt((n) => {
129
- var gt;
130
- const I = ((gt = r.ui_style) == null ? void 0 : gt.type) === "floating-keyboard" && !(v && B === "clozetext"), g = t.clientHeight;
131
- if (g === 0)
132
- return n;
133
- if (!n)
159
+ a && t && It((i) => {
160
+ var vt;
161
+ const T = ((vt = n.ui_style) == null ? void 0 : vt.type) === "floating-keyboard" && !(w && g === "clozetext"), $ = t.clientHeight;
162
+ if ($ === 0)
163
+ return i;
164
+ if (!i)
134
165
  return Math.ceil(
135
- g + (I ? s(t) : 0)
166
+ $ + (T ? s(t) : 0)
136
167
  );
137
- const dt = Math.ceil(
138
- g + (I ? s(t) : 0)
168
+ const Rt = Math.ceil(
169
+ $ + (T ? s(t) : 0)
139
170
  );
140
- return Math.abs(dt - n) > 4 ? dt : n;
171
+ return Math.abs(Rt - i) > 4 ? Rt : i;
141
172
  });
142
- }), Qt(() => {
143
- !b && !A && Rt(a);
144
- }, [A, b, a, rt]), $(() => {
145
- (y || nt || w && m) && _.renderMath("mathjax");
146
- }, [nt, y, _, w, m]), $(() => {
147
- if (v && E && !st && (o != null && o.validatedByTeacher)) {
173
+ }), Kt(() => {
174
+ !W && !M && St(o);
175
+ }, [M, W, o, st]), d(() => {
176
+ (x || ht || H && m) && v.renderMath("mathjax");
177
+ }, [ht, x, v, H, m]), d(() => {
178
+ if (w && _ && !Et && (e != null && e.validatedByTeacher)) {
148
179
  const t = setTimeout(() => {
149
- b ? Rt(E) : Z(E);
180
+ W ? St(_) : et(_);
150
181
  }, 1e3);
151
182
  return () => {
152
183
  clearTimeout(t);
153
184
  };
154
185
  }
155
186
  }, [
156
- E,
157
- v,
158
- st,
159
- b,
160
- Z,
161
- o == null ? void 0 : o.validatedByTeacher
162
- ]), /* @__PURE__ */ M(
163
- qt,
187
+ _,
188
+ w,
189
+ Et,
190
+ W,
191
+ et,
192
+ e == null ? void 0 : e.validatedByTeacher
193
+ ]), /* @__PURE__ */ I(
194
+ ne,
164
195
  {
165
- "data-response-id": a,
166
- className: `widget-${a}`,
196
+ "data-response-id": o,
197
+ className: `widget-${o}`,
167
198
  ref: L,
168
- $topOffset: rt,
169
- $flexDirection: u ? "row" : "column",
170
- $alignItems: u ? "flex-start" : "center",
171
- $hidden: A,
172
- $marginBottom: Xt,
199
+ $topOffset: st,
200
+ $flexDirection: E ? "row" : "column",
201
+ $alignItems: E ? "flex-start" : "center",
202
+ $hidden: M,
203
+ $marginBottom: Gt,
173
204
  children: [
174
- u && /* @__PURE__ */ i(
175
- to,
205
+ E && /* @__PURE__ */ r(
206
+ ce,
176
207
  {
177
208
  dangerouslySetInnerHTML: {
178
- __html: u
209
+ __html: E
179
210
  }
180
211
  }
181
212
  ),
182
- /* @__PURE__ */ M(
183
- oo,
213
+ /* @__PURE__ */ I(
214
+ ae,
184
215
  {
185
- ref: mt,
186
- $width: u ? "50%" : `${F}px`,
187
- $minHeight: S ? Math.max(S - 72, k ?? 0) : Lt,
216
+ ref: D,
217
+ $width: E ? "50%" : `${V}px`,
218
+ $minHeight: B ? Math.max(B - 72, ot ?? 0) : Mt,
188
219
  $isActive: R,
189
220
  $paperColor: C,
190
221
  $opacity: R ? 1 : 0.2,
191
222
  children: [
192
- R && !!Y && !!G && V && /* @__PURE__ */ i(
193
- zt,
223
+ R && !!k && !!tt && q && /* @__PURE__ */ r(
224
+ Pt,
194
225
  {
195
- containerRef: mt,
196
- onPublish: Y,
197
- onSubscribe: G,
198
- responseId: a
226
+ containerRef: D,
227
+ onPublish: k,
228
+ onSubscribe: tt,
229
+ responseId: o
199
230
  }
200
231
  ),
201
- /* @__PURE__ */ M(
202
- io,
232
+ /* @__PURE__ */ I(
233
+ se,
203
234
  {
204
- className: It,
205
- $dropzoneMinWidth: ft.width,
206
- $dropzoneMinHeight: ft.height,
235
+ className: Ot,
236
+ $dropzoneMinWidth: _t.width,
237
+ $dropzoneMinHeight: _t.height,
207
238
  children: [
208
- !(x || f || H) && /* @__PURE__ */ i(
209
- Pt,
239
+ !(y || h || S) && /* @__PURE__ */ r(
240
+ Jt,
210
241
  {
211
- userType: e,
212
- question: r,
213
- response: o,
214
- behavior: U,
215
- layout: z,
242
+ userType: c,
243
+ question: n,
244
+ response: e,
245
+ behavior: X,
246
+ layout: P,
216
247
  paperColor: C,
217
- onMarkForReview: wt,
218
- actionbarHeight: vt,
219
- canResolveDoubt: Ct,
220
- onResolveDoubt: St,
248
+ onMarkForReview: Bt,
249
+ actionbarHeight: Ct,
250
+ canResolveDoubt: yt,
251
+ onResolveDoubt: xt,
221
252
  worksheetCompleted: m
222
253
  }
223
254
  ),
224
- x && /* @__PURE__ */ i(ro, { src: Ft.LESSON_OVERVIEW_BANNER }),
225
- f && C && /* @__PURE__ */ i(Vt, { paperColor: C }),
226
- H ? /* @__PURE__ */ M(Ot, { children: [
227
- l === "practice-basic" && /* @__PURE__ */ i(Zt, {}),
228
- l === "practice-regular" && /* @__PURE__ */ i(kt, {}),
229
- l === "exit-ticket" && /* @__PURE__ */ i(Jt, {}),
230
- (l == null ? void 0 : l.startsWith("advanced-")) && /* @__PURE__ */ i(Gt, {})
255
+ y && /* @__PURE__ */ r(le, { src: Vt.LESSON_OVERVIEW_BANNER }),
256
+ h && C && /* @__PURE__ */ r(kt, { paperColor: C }),
257
+ S ? /* @__PURE__ */ I(Dt, { children: [
258
+ u === "practice-basic" && /* @__PURE__ */ r(re, {}),
259
+ u === "practice-regular" && /* @__PURE__ */ r(ie, {}),
260
+ u === "exit-ticket" && /* @__PURE__ */ r(oe, {}),
261
+ (u == null ? void 0 : u.startsWith("advanced-")) && /* @__PURE__ */ r(ee, {})
231
262
  ] }) : void 0,
232
- /* @__PURE__ */ i(
233
- jt,
263
+ /* @__PURE__ */ r(
264
+ qt,
234
265
  {
235
- signedRequest: _t,
236
- appended: c,
237
- question: r,
238
- response: o == null ? void 0 : o.response,
239
- canRender: Q || R,
240
- learnosity: _,
241
- canForceAppend: e === "TEACHER",
242
- isConceptIntro: f
266
+ signedRequest: bt,
267
+ appended: a,
268
+ question: n,
269
+ response: e == null ? void 0 : e.response,
270
+ canRender: K || R,
271
+ learnosity: v,
272
+ canForceAppend: c === "TEACHER",
273
+ isConceptIntro: h
243
274
  }
244
275
  ),
245
- !ct && V && K && P && S !== void 0 && /* @__PURE__ */ i(eo, { $canScribble: j, children: /* @__PURE__ */ i(
246
- Ut,
276
+ !dt && q && Y && Z && B !== void 0 && /* @__PURE__ */ r(me, { $canScribble: J, children: /* @__PURE__ */ r(
277
+ Xt,
247
278
  {
248
- canRender: Q,
249
- canScribble: j && R,
250
- appended: c,
251
- responseId: a,
252
- width: F,
253
- height: Math.max(S, k ?? 0),
254
- onUpdateHeight: At,
255
- onPublish: K,
256
- onSubscribe: P,
257
- userId: Ht,
258
- initialData: O == null ? void 0 : O[a],
259
- userType: e
279
+ canRender: K,
280
+ canScribble: J && R,
281
+ appended: a,
282
+ responseId: o,
283
+ width: V,
284
+ height: Math.max(B, ot ?? 0),
285
+ onUpdateHeight: Ft,
286
+ onPublish: Y,
287
+ onSubscribe: Z,
288
+ userId: Wt,
289
+ initialData: N == null ? void 0 : N[o],
290
+ userType: c
260
291
  }
261
292
  ) }),
262
- !ct && N && N.length > 0 && /* @__PURE__ */ i(
263
- $t,
293
+ !dt && U && U.length > 0 && /* @__PURE__ */ r(
294
+ wt,
264
295
  {
265
296
  $background: "BLUE_1",
266
297
  $gutterX: 1,
267
298
  $gapX: 0.5,
268
299
  $borderRadiusX: 0,
269
300
  $borderColor: "BLUE_2",
270
- children: N.map((t, s) => /* @__PURE__ */ i(
271
- no,
301
+ children: U.map((t, s) => /* @__PURE__ */ r(
302
+ ue,
272
303
  {
273
304
  dangerouslySetInnerHTML: {
274
- __html: `<span style="color: #DA5107; font-weight: 600;">Hint${((h == null ? void 0 : h.length) ?? 0) > 1 ? ` ${s + 1}` : ""}:</span>&nbsp;${t}`
305
+ __html: `<span style="color: #DA5107; font-weight: 600;">Hint${((f == null ? void 0 : f.length) ?? 0) > 1 ? ` ${s + 1}` : ""}:</span>&nbsp;${t}`
275
306
  }
276
307
  },
277
308
  t
278
309
  ))
279
310
  }
280
311
  ),
281
- Mt && /* @__PURE__ */ i(
282
- $t,
312
+ Nt && /* @__PURE__ */ r(
313
+ wt,
283
314
  {
284
315
  $background: "YELLOW_1",
285
316
  $gutterX: 1,
286
317
  $gapX: 0.875,
287
318
  $borderRadiusX: 0,
288
319
  $borderColor: "YELLOW_2",
289
- children: /* @__PURE__ */ i(
290
- co,
320
+ children: /* @__PURE__ */ r(
321
+ fe,
291
322
  {
292
323
  dangerouslySetInnerHTML: {
293
- __html: `<div style="color: #DA5107; font-weight: 600;">Solution:</div>${w}`
324
+ __html: `<div style="color: #DA5107; font-weight: 600;">Solution:</div>${H}`
294
325
  }
295
326
  }
296
327
  )
297
328
  }
298
329
  ),
299
- !!J && /* @__PURE__ */ i(
300
- Yt,
330
+ !!rt && /* @__PURE__ */ r(
331
+ te,
301
332
  {
302
- responses: Bt,
303
- response: o,
304
- nextQuestionId: E,
305
- responseId: a,
306
- studentId: bt,
307
- userType: e,
308
- ...J
333
+ responses: Tt,
334
+ response: e,
335
+ nextQuestionId: _,
336
+ responseId: o,
337
+ studentId: Lt,
338
+ userType: c,
339
+ ...rt
309
340
  }
310
341
  )
311
342
  ]
@@ -320,6 +351,6 @@ const So = Tt(
320
351
  }
321
352
  );
322
353
  export {
323
- So as default
354
+ Le as default
324
355
  };
325
356
  //# sourceMappingURL=worksheet-question.js.map