@cuemath/leap 2.9.9-as6 → 2.9.10

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 (307) hide show
  1. package/dist/assets/illustrations/illustrations.js +0 -9
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/line-icons/icons/bin2.js +8 -7
  4. package/dist/assets/line-icons/icons/bin2.js.map +1 -1
  5. package/dist/assets/line-icons/icons/chevron-left.js.map +1 -1
  6. package/dist/assets/lottie/lottie.js +1 -9
  7. package/dist/assets/lottie/lottie.js.map +1 -1
  8. package/dist/constants/api.js +2 -3
  9. package/dist/constants/api.js.map +1 -1
  10. package/dist/features/analytics-events/platform-events-student.js +3 -3
  11. package/dist/features/analytics-events/platform-events-student.js.map +1 -1
  12. package/dist/features/analytics-events/whitelist-events.js +11 -13
  13. package/dist/features/analytics-events/whitelist-events.js.map +1 -1
  14. package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js +33 -99
  15. package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js.map +1 -1
  16. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js +49 -92
  17. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js.map +1 -1
  18. package/dist/features/chapters/chapters-list/chapters-list-styled.js +5 -5
  19. package/dist/features/chapters/chapters-list/chapters-list-styled.js.map +1 -1
  20. package/dist/features/chapters/chapters-list/chapters-list.js +70 -64
  21. package/dist/features/chapters/chapters-list/chapters-list.js.map +1 -1
  22. package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js +104 -74
  23. package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js.map +1 -1
  24. package/dist/features/circle-games/sign-up/comp/circular-steps/circular-steps-styled.js +4 -4
  25. package/dist/features/circle-games/sign-up/comp/circular-steps/circular-steps-styled.js.map +1 -1
  26. package/dist/features/circle-games/sign-up/constants.js +7 -7
  27. package/dist/features/circle-games/sign-up/constants.js.map +1 -1
  28. package/dist/features/communication/pub-sub/constants.js +6 -12
  29. package/dist/features/communication/pub-sub/constants.js.map +1 -1
  30. package/dist/features/journey/comps/coachmark/coachmark-styled.js +8 -26
  31. package/dist/features/journey/comps/coachmark/coachmark-styled.js.map +1 -1
  32. package/dist/features/journey/comps/coachmark/coachmark.js +24 -24
  33. package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
  34. package/dist/features/journey/journey-id/journey-id-student.js +1 -1
  35. package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
  36. package/dist/features/journey/use-journey/journey-context-provider.js +28 -36
  37. package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
  38. package/dist/features/journey/use-journey/journey-styled.js +5 -10
  39. package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
  40. package/dist/features/milestone/create/api/goal-submit.js +1 -1
  41. package/dist/features/milestone/create/api/goal-submit.js.map +1 -1
  42. package/dist/features/milestone/create/comps/chapter-item/chapter-item.js +49 -42
  43. package/dist/features/milestone/create/comps/chapter-item/chapter-item.js.map +1 -1
  44. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js +4 -12
  45. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js.map +1 -1
  46. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js +105 -128
  47. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js.map +1 -1
  48. package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js +92 -0
  49. package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js.map +1 -0
  50. package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js +25 -0
  51. package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js.map +1 -0
  52. package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js +20 -14
  53. package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js.map +1 -1
  54. package/dist/features/milestone/create/comps/sheets-list/sheets-list.js +50 -26
  55. package/dist/features/milestone/create/comps/sheets-list/sheets-list.js.map +1 -1
  56. package/dist/features/milestone/create/milestone-create.js +43 -49
  57. package/dist/features/milestone/create/milestone-create.js.map +1 -1
  58. package/dist/features/milestone/create/utils/index.js +38 -33
  59. package/dist/features/milestone/create/utils/index.js.map +1 -1
  60. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js +1 -1
  61. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js.map +1 -1
  62. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.js +1 -1
  63. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.js.map +1 -1
  64. package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js +53 -51
  65. package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js.map +1 -1
  66. package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js +40 -42
  67. package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js.map +1 -1
  68. package/dist/features/milestone/edit/goal-edit-container.js +62 -64
  69. package/dist/features/milestone/edit/goal-edit-container.js.map +1 -1
  70. package/dist/features/milestone/edit/goal-edit-helpers.js +53 -50
  71. package/dist/features/milestone/edit/goal-edit-helpers.js.map +1 -1
  72. package/dist/features/milestone/edit/milestone-edit-container.js +52 -54
  73. package/dist/features/milestone/edit/milestone-edit-container.js.map +1 -1
  74. package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js +1 -1
  75. package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js.map +1 -1
  76. package/dist/features/milestone/milestone-list-container/api/get-milestones.js +17 -9
  77. package/dist/features/milestone/milestone-list-container/api/get-milestones.js.map +1 -1
  78. package/dist/features/milestone/milestone-list-container/api/get-tests-list.js +1 -1
  79. package/dist/features/milestone/milestone-list-container/api/get-tests-list.js.map +1 -1
  80. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +105 -138
  81. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
  82. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js +13 -0
  83. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js.map +1 -0
  84. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js +38 -0
  85. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js.map +1 -0
  86. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js +123 -107
  87. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js.map +1 -1
  88. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js +176 -157
  89. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js.map +1 -1
  90. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js +10 -24
  91. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js.map +1 -1
  92. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js +86 -80
  93. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js.map +1 -1
  94. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-utils.js +22 -10
  95. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-utils.js.map +1 -1
  96. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js +53 -0
  97. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js.map +1 -0
  98. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js +37 -70
  99. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js.map +1 -1
  100. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js +176 -114
  101. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js.map +1 -1
  102. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js +25 -0
  103. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js.map +1 -0
  104. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js +16 -29
  105. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js.map +1 -1
  106. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js +25 -17
  107. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js.map +1 -1
  108. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome.js +35 -23
  109. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome.js.map +1 -1
  110. package/dist/features/milestone/milestone-list-container/milestone-list-container.js +113 -110
  111. package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
  112. package/dist/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.js +1 -1
  113. package/dist/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.js.map +1 -1
  114. package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js +8 -8
  115. package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js.map +1 -1
  116. package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js +1 -1
  117. package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js.map +1 -1
  118. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js +113 -116
  119. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
  120. package/dist/features/milestone/milestone-tests/tests-creation/api/test-sheet-assign.js +5 -5
  121. package/dist/features/milestone/milestone-tests/tests-creation/api/test-sheet-assign.js.map +1 -1
  122. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/chapter-selection/chapter-item/chapter-item.js.map +1 -1
  123. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js +50 -46
  124. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js.map +1 -1
  125. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js +71 -0
  126. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js.map +1 -0
  127. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js +31 -0
  128. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js.map +1 -0
  129. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js +38 -0
  130. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js.map +1 -0
  131. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js +79 -0
  132. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js.map +1 -0
  133. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js +18 -0
  134. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js.map +1 -0
  135. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js +51 -0
  136. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js.map +1 -0
  137. package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js +11 -0
  138. package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js.map +1 -0
  139. package/dist/features/milestone/milestone-tests/tests-list/tests-list.js +135 -0
  140. package/dist/features/milestone/milestone-tests/tests-list/tests-list.js.map +1 -0
  141. package/dist/features/sheets/resources-list/resource-item/styled.js +1 -1
  142. package/dist/features/sheets/resources-list/resource-item/styled.js.map +1 -1
  143. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js +3 -4
  144. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js.map +1 -1
  145. package/dist/features/trial-session/comps/learning-plan/index.js.map +1 -1
  146. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +29 -30
  147. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
  148. package/dist/features/ui/constants/z-index.js +1 -1
  149. package/dist/features/ui/constants/z-index.js.map +1 -1
  150. package/dist/features/ui/context-menu/context-menu-styled.js +14 -28
  151. package/dist/features/ui/context-menu/context-menu-styled.js.map +1 -1
  152. package/dist/features/ui/context-menu/context-menu.js +15 -30
  153. package/dist/features/ui/context-menu/context-menu.js.map +1 -1
  154. package/dist/features/ui/lottie-animation/lottie-animation.js +13 -19
  155. package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
  156. package/dist/features/ui/theme/button.js +107 -22
  157. package/dist/features/ui/theme/button.js.map +1 -1
  158. package/dist/features/worksheet/worksheet/hooks/use-create-imperative-handle.js +96 -78
  159. package/dist/features/worksheet/worksheet/hooks/use-create-imperative-handle.js.map +1 -1
  160. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +79 -47
  161. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
  162. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +150 -147
  163. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
  164. package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
  165. package/dist/features/worksheet/worksheet/worksheet.js +325 -300
  166. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  167. package/dist/index.d.ts +46 -351
  168. package/dist/index.js +471 -503
  169. package/dist/index.js.map +1 -1
  170. package/package.json +1 -1
  171. package/dist/assets/line-icons/icons/alarm.js +0 -41
  172. package/dist/assets/line-icons/icons/alarm.js.map +0 -1
  173. package/dist/assets/line-icons/icons/dart.js +0 -23
  174. package/dist/assets/line-icons/icons/dart.js.map +0 -1
  175. package/dist/assets/line-icons/icons/exclamation.js +0 -26
  176. package/dist/assets/line-icons/icons/exclamation.js.map +0 -1
  177. package/dist/assets/line-icons/icons/home2.js +0 -25
  178. package/dist/assets/line-icons/icons/home2.js.map +0 -1
  179. package/dist/assets/line-icons/icons/important.js +0 -23
  180. package/dist/assets/line-icons/icons/important.js.map +0 -1
  181. package/dist/assets/line-icons/icons/puzzle.js +0 -25
  182. package/dist/assets/line-icons/icons/puzzle.js.map +0 -1
  183. package/dist/assets/line-icons/icons/recap.js +0 -32
  184. package/dist/assets/line-icons/icons/recap.js.map +0 -1
  185. package/dist/assets/line-icons/icons/skip-colored.js +0 -43
  186. package/dist/assets/line-icons/icons/skip-colored.js.map +0 -1
  187. package/dist/assets/line-icons/icons/status.js +0 -41
  188. package/dist/assets/line-icons/icons/status.js.map +0 -1
  189. package/dist/assets/line-icons/icons/testtube.js +0 -33
  190. package/dist/assets/line-icons/icons/testtube.js.map +0 -1
  191. package/dist/features/chapters-v2/api/chapter.js +0 -10
  192. package/dist/features/chapters-v2/api/chapter.js.map +0 -1
  193. package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +0 -112
  194. package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js.map +0 -1
  195. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js +0 -35
  196. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js.map +0 -1
  197. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +0 -83
  198. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +0 -1
  199. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js +0 -90
  200. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js.map +0 -1
  201. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js +0 -98
  202. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js.map +0 -1
  203. package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js +0 -51
  204. package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js.map +0 -1
  205. package/dist/features/chapters-v2/chapter-details/chapter-details.js +0 -129
  206. package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +0 -1
  207. package/dist/features/chapters-v2/comps/node-card/border-path-animation.js +0 -13
  208. package/dist/features/chapters-v2/comps/node-card/border-path-animation.js.map +0 -1
  209. package/dist/features/chapters-v2/comps/node-card/node-card-styled.js +0 -159
  210. package/dist/features/chapters-v2/comps/node-card/node-card-styled.js.map +0 -1
  211. package/dist/features/chapters-v2/comps/node-card/node-card-tags.js +0 -16
  212. package/dist/features/chapters-v2/comps/node-card/node-card-tags.js.map +0 -1
  213. package/dist/features/chapters-v2/comps/node-card/node-card.js +0 -12
  214. package/dist/features/chapters-v2/comps/node-card/node-card.js.map +0 -1
  215. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-option.js +0 -30
  216. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-option.js.map +0 -1
  217. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js +0 -32
  218. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js.map +0 -1
  219. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js +0 -9
  220. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js.map +0 -1
  221. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +0 -189
  222. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +0 -1
  223. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js +0 -194
  224. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +0 -1
  225. package/dist/features/chapters-v2/comps/tag/tag-styled.js +0 -13
  226. package/dist/features/chapters-v2/comps/tag/tag-styled.js.map +0 -1
  227. package/dist/features/chapters-v2/comps/tag/tag.js +0 -28
  228. package/dist/features/chapters-v2/comps/tag/tag.js.map +0 -1
  229. package/dist/features/chapters-v2/constants/block-constants.js +0 -20
  230. package/dist/features/chapters-v2/constants/block-constants.js.map +0 -1
  231. package/dist/features/chapters-v2/constants/node-constants.js +0 -14
  232. package/dist/features/chapters-v2/constants/node-constants.js.map +0 -1
  233. package/dist/features/chapters-v2/utils/index.js +0 -38
  234. package/dist/features/chapters-v2/utils/index.js.map +0 -1
  235. package/dist/features/chapters-v2/utils/node-card-utils.js +0 -177
  236. package/dist/features/chapters-v2/utils/node-card-utils.js.map +0 -1
  237. package/dist/features/homework/card-menu-option.js +0 -28
  238. package/dist/features/homework/card-menu-option.js.map +0 -1
  239. package/dist/features/homework/card-menu-options.js +0 -22
  240. package/dist/features/homework/card-menu-options.js.map +0 -1
  241. package/dist/features/homework/card-title.js +0 -16
  242. package/dist/features/homework/card-title.js.map +0 -1
  243. package/dist/features/homework/homework-analytics-events.js +0 -10
  244. package/dist/features/homework/homework-analytics-events.js.map +0 -1
  245. package/dist/features/homework/homework-card-view.js +0 -143
  246. package/dist/features/homework/homework-card-view.js.map +0 -1
  247. package/dist/features/homework/homework-card.js +0 -245
  248. package/dist/features/homework/homework-card.js.map +0 -1
  249. package/dist/features/homework/hw-card-list/api/get-homeworks.js +0 -10
  250. package/dist/features/homework/hw-card-list/api/get-homeworks.js.map +0 -1
  251. package/dist/features/homework/hw-card-list/hw-card-list-styled.js +0 -63
  252. package/dist/features/homework/hw-card-list/hw-card-list-styled.js.map +0 -1
  253. package/dist/features/homework/hw-card-list/hw-card-list-view.js +0 -157
  254. package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +0 -1
  255. package/dist/features/homework/hw-card-list/hw-card-list.js +0 -67
  256. package/dist/features/homework/hw-card-list/hw-card-list.js.map +0 -1
  257. package/dist/features/homework/node-progress.js +0 -29
  258. package/dist/features/homework/node-progress.js.map +0 -1
  259. package/dist/features/homework/styles.js +0 -130
  260. package/dist/features/homework/styles.js.map +0 -1
  261. package/dist/features/homework/utils.js +0 -48
  262. package/dist/features/homework/utils.js.map +0 -1
  263. package/dist/features/journey/hooks/use-chapter-journey.js +0 -194
  264. package/dist/features/journey/hooks/use-chapter-journey.js.map +0 -1
  265. package/dist/features/journey/hooks/use-home-page-journey.js +0 -279
  266. package/dist/features/journey/hooks/use-home-page-journey.js.map +0 -1
  267. package/dist/features/journey/journey-id/journey-id-teacher.js +0 -5
  268. package/dist/features/journey/journey-id/journey-id-teacher.js.map +0 -1
  269. package/dist/features/journey/mocks/chapter-page-journey-mock-data.js +0 -587
  270. package/dist/features/journey/mocks/chapter-page-journey-mock-data.js.map +0 -1
  271. package/dist/features/journey/mocks/home-page-homwworks-mock.js +0 -268
  272. package/dist/features/journey/mocks/home-page-homwworks-mock.js.map +0 -1
  273. package/dist/features/journey/mocks/recent-chapters-mock.js +0 -531
  274. package/dist/features/journey/mocks/recent-chapters-mock.js.map +0 -1
  275. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +0 -165
  276. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +0 -1
  277. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js +0 -25
  278. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js.map +0 -1
  279. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +0 -87
  280. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +0 -1
  281. package/dist/features/recent-chapters/api/get-recent-chapters.js +0 -9
  282. package/dist/features/recent-chapters/api/get-recent-chapters.js.map +0 -1
  283. package/dist/features/recent-chapters/recent-chapters-styled.js +0 -16
  284. package/dist/features/recent-chapters/recent-chapters-styled.js.map +0 -1
  285. package/dist/features/recent-chapters/recent-chapters.js +0 -39
  286. package/dist/features/recent-chapters/recent-chapters.js.map +0 -1
  287. package/dist/features/sheet-v2/resource-list/resource-list.js +0 -45
  288. package/dist/features/sheet-v2/resource-list/resource-list.js.map +0 -1
  289. package/dist/node_modules/date-fns/differenceInDays.js +0 -17
  290. package/dist/node_modules/date-fns/differenceInDays.js.map +0 -1
  291. package/dist/static/chapter-header-bg-2.c8d96894.svg +0 -1
  292. package/dist/static/competitive-arena.b9c40801.json +0 -1
  293. package/dist/static/learn.71b13323.json +0 -1
  294. package/dist/static/node-custom-test-bg.d3b757be.svg +0 -1
  295. package/dist/static/node-learn-bg.b61f815c.svg +0 -1
  296. package/dist/static/node-practice-bg.16cbaf2a.svg +0 -1
  297. package/dist/static/node-project-bg.e6a33e28.svg +0 -1
  298. package/dist/static/node-puzzle-bg.3422135c.svg +0 -1
  299. package/dist/static/node-recap-bg.546154e4.svg +0 -1
  300. package/dist/static/node-test-prep-bg.42c0b9c4.svg +0 -1
  301. package/dist/static/node-video-bg.3df3f73a.svg +0 -1
  302. package/dist/static/practice.158dd488.json +0 -1
  303. package/dist/static/project.eb665827.json +0 -1
  304. package/dist/static/puzzle.b298c7e4.json +0 -1
  305. package/dist/static/recap.0dd2c1e2.json +0 -1
  306. package/dist/static/test.803d6036.json +0 -1
  307. package/dist/static/video.b41451e2.json +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"use-circle-sounds.js","sources":["../../../../../src/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.ts"],"sourcesContent":["import { useCallback } from 'react';\n\nimport { CircleSoundKeyMapper, SWIPE_SOUND_ORDER } from './constants';\nimport { CircleSoundKey } from './use-circle-sounds-enums';\n\nlet swipeSoundIndex = 0;\n\nexport const soundMapper: Record<keyof typeof CircleSoundKeyMapper, null | HTMLAudioElement> = {\n [CircleSoundKey.BACKGROUND]: null,\n [CircleSoundKey.BACKGROUND_RUSHHOUR]: null,\n [CircleSoundKey.TUTORIAL]: null,\n [CircleSoundKey.SWIPE_01]: null,\n [CircleSoundKey.SWIPE_02]: null,\n [CircleSoundKey.SWIPE_03]: null,\n [CircleSoundKey.SWIPE_04]: null,\n [CircleSoundKey.SWIPE_DOWN]: null,\n [CircleSoundKey.TOGGLE]: null,\n [CircleSoundKey.POINTS_AWARDED]: null,\n [CircleSoundKey.POINTS_ADDED]: null,\n [CircleSoundKey.GAME_CARD_CLICK]: null,\n [CircleSoundKey.CLOCK_IN]: null,\n [CircleSoundKey.CLOCK_OUT]: null,\n [CircleSoundKey.ACCURACY_IN]: null,\n [CircleSoundKey.ACCURACY_OUT]: null,\n [CircleSoundKey.STREAK_IN]: null,\n [CircleSoundKey.STREAK_OUT]: null,\n [CircleSoundKey.ACCURACY_INTRO]: null,\n [CircleSoundKey.ACCURACY_TARGET]: null,\n [CircleSoundKey.TIME_INTRO]: null,\n [CircleSoundKey.TIME_TARGET]: null,\n [CircleSoundKey.METER_FILL]: null,\n};\n\nconst soundInstancePromise: Partial<Record<keyof typeof CircleSoundKeyMapper, Promise<void>>> = {};\n\nexport const useCircleSounds = () => {\n const loadSound = useCallback((key: CircleSoundKey) => {\n if (!soundMapper[key]) {\n const loadedSound = new Audio(CircleSoundKeyMapper[key]);\n\n soundMapper[key] = loadedSound;\n }\n }, []);\n\n const playSwipSound = useCallback(() => {\n SWIPE_SOUND_ORDER.forEach(key => {\n loadSound(key);\n });\n\n const key = SWIPE_SOUND_ORDER[swipeSoundIndex] || CircleSoundKey.SWIPE_01;\n\n if (swipeSoundIndex < SWIPE_SOUND_ORDER.length - 1) {\n swipeSoundIndex++;\n } else {\n swipeSoundIndex = 0;\n }\n soundMapper[key]?.play();\n }, [loadSound]);\n\n const playButtonSound = useCallback(() => {\n loadSound(CircleSoundKey.TOGGLE);\n const sound = soundMapper[CircleSoundKey.TOGGLE]?.play();\n\n return sound;\n }, [loadSound]);\n\n const play = useCallback(\n (key: CircleSoundKey, immediately: boolean = true, loop = false) => {\n loadSound(key);\n const soundInstance = soundMapper[key];\n\n if (!soundInstance) return;\n\n soundInstance.loop = loop;\n if (immediately) {\n soundInstance.volume = 1;\n const promise = soundInstance.play();\n\n soundInstancePromise[key] = promise;\n\n return;\n }\n\n soundInstance.volume = 0;\n const promise = soundInstance.play();\n\n soundInstancePromise[key] = promise;\n\n const intervalId = setInterval(() => {\n if (!soundInstance) return;\n\n const vol = 0;\n\n if (vol < 1) {\n soundInstance.volume = vol + 0.1;\n } else {\n clearInterval(intervalId);\n }\n }, 100);\n\n return soundInstance;\n },\n [loadSound],\n );\n\n const stop = useCallback((key: CircleSoundKey, immediately: boolean = true) => {\n const soundInstance = soundMapper[key];\n\n // check if the sound is playing as the play() return a promise\n if (soundInstancePromise[key] !== undefined) {\n soundInstancePromise[key]\n ?.then(() => {\n if (immediately) {\n soundInstance?.pause();\n\n return;\n }\n\n const intervalId = setInterval(() => {\n if (!soundInstance) return;\n\n const vol = soundInstance.volume || 0;\n\n if (vol - 0.1 <= 0) {\n soundInstance.volume = 0;\n soundInstance.pause();\n clearInterval(intervalId);\n } else {\n soundInstance.volume = vol - 0.1;\n }\n }, 100);\n })\n .catch(err => {\n // eslint-disable-next-line no-console\n console.log('sound not playing', err);\n });\n }\n }, []);\n\n return { playSwipSound, play, stop, playButtonSound };\n};\n"],"names":["swipeSoundIndex","soundMapper","CircleSoundKey","soundInstancePromise","useCircleSounds","loadSound","useCallback","key","loadedSound","CircleSoundKeyMapper","playSwipSound","SWIPE_SOUND_ORDER","_a","playButtonSound","play","immediately","loop","soundInstance","promise","vol","stop","intervalId","err"],"mappings":";;;AAKA,IAAIA,IAAkB;AAEf,MAAMC,IAAkF;AAAA,EAC7F,CAACC,EAAe,UAAU,GAAG;AAAA,EAC7B,CAACA,EAAe,mBAAmB,GAAG;AAAA,EACtC,CAACA,EAAe,QAAQ,GAAG;AAAA,EAC3B,CAACA,EAAe,QAAQ,GAAG;AAAA,EAC3B,CAACA,EAAe,QAAQ,GAAG;AAAA,EAC3B,CAACA,EAAe,QAAQ,GAAG;AAAA,EAC3B,CAACA,EAAe,QAAQ,GAAG;AAAA,EAC3B,CAACA,EAAe,UAAU,GAAG;AAAA,EAC7B,CA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1
+ {"version":3,"file":"use-circle-sounds.js","sources":["../../../../../src/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.ts"],"sourcesContent":["import type { TimeoutMap } from './use-circle-sound-types';\n\nimport { useCallback, useEffect, useRef } from 'react';\n\nimport { CircleSoundKeyMapper, SWIPE_SOUND_ORDER } from './constants';\nimport { CircleSoundKey } from './use-circle-sounds-enums';\n\nlet swipeSoundIndex = 0;\n\nexport const soundMapper: Record<keyof typeof CircleSoundKeyMapper, null | HTMLAudioElement> = {\n [CircleSoundKey.BACKGROUND]: null,\n [CircleSoundKey.BACKGROUND_RUSHHOUR]: null,\n [CircleSoundKey.TUTORIAL]: null,\n [CircleSoundKey.SWIPE_01]: null,\n [CircleSoundKey.SWIPE_02]: null,\n [CircleSoundKey.SWIPE_03]: null,\n [CircleSoundKey.SWIPE_04]: null,\n [CircleSoundKey.SWIPE_DOWN]: null,\n [CircleSoundKey.TOGGLE]: null,\n [CircleSoundKey.POINTS_AWARDED]: null,\n [CircleSoundKey.POINTS_ADDED]: null,\n [CircleSoundKey.GAME_CARD_CLICK]: null,\n [CircleSoundKey.CLOCK_IN]: null,\n [CircleSoundKey.CLOCK_OUT]: null,\n [CircleSoundKey.ACCURACY_IN]: null,\n [CircleSoundKey.ACCURACY_OUT]: null,\n [CircleSoundKey.STREAK_IN]: null,\n [CircleSoundKey.STREAK_OUT]: null,\n [CircleSoundKey.ACCURACY_INTRO]: null,\n [CircleSoundKey.ACCURACY_TARGET]: null,\n [CircleSoundKey.TIME_INTRO]: null,\n [CircleSoundKey.TIME_TARGET]: null,\n [CircleSoundKey.METER_FILL]: null,\n};\n\nconst soundInstancePromise: Partial<Record<keyof typeof CircleSoundKeyMapper, Promise<void>>> = {};\n\nexport const useCircleSounds = () => {\n const loadSound = useCallback((key: CircleSoundKey) => {\n if (!soundMapper[key]) {\n const loadedSound = new Audio(CircleSoundKeyMapper[key]);\n\n soundMapper[key] = loadedSound;\n }\n }, []);\n\n const pausedSoundsRef = useRef<Set<CircleSoundKey>>(new Set());\n const timeoutRefs = useRef<TimeoutMap>({});\n\n const handleVisibilityChange = useCallback(() => {\n if (document.visibilityState === 'hidden') {\n (Object.keys(soundMapper) as CircleSoundKey[]).forEach(key => {\n const sound = soundMapper[key];\n\n if (sound && !sound.paused) {\n sound.pause();\n pausedSoundsRef.current.add(key);\n }\n });\n } else if (document.visibilityState === 'visible') {\n pausedSoundsRef.current.forEach(key => {\n const sound = soundMapper[key];\n\n sound?.play();\n });\n pausedSoundsRef.current.clear();\n }\n }, []);\n\n useEffect(() => {\n document.addEventListener('visibilitychange', handleVisibilityChange);\n const timeouts = timeoutRefs.current;\n\n return () => {\n document.removeEventListener('visibilitychange', handleVisibilityChange);\n for (const id of Object.values(timeouts)) {\n if (id != null) clearInterval(id);\n }\n };\n }, [handleVisibilityChange]);\n\n const playSwipSound = useCallback(() => {\n SWIPE_SOUND_ORDER.forEach(key => {\n loadSound(key);\n });\n\n const key = SWIPE_SOUND_ORDER[swipeSoundIndex] || CircleSoundKey.SWIPE_01;\n\n if (swipeSoundIndex < SWIPE_SOUND_ORDER.length - 1) {\n swipeSoundIndex++;\n } else {\n swipeSoundIndex = 0;\n }\n soundMapper[key]?.play();\n }, [loadSound]);\n\n const playButtonSound = useCallback(() => {\n loadSound(CircleSoundKey.TOGGLE);\n const sound = soundMapper[CircleSoundKey.TOGGLE]?.play();\n\n return sound;\n }, [loadSound]);\n\n const play = useCallback(\n (key: CircleSoundKey, immediately: boolean = true, loop = false) => {\n loadSound(key);\n const soundInstance = soundMapper[key];\n\n if (!soundInstance) return;\n\n if (!soundInstance.paused && soundInstance.currentTime > 0 && !soundInstance.ended) {\n return soundInstance;\n }\n\n soundInstance.loop = loop;\n if (immediately) {\n soundInstance.volume = 1;\n const promise = soundInstance.play();\n\n soundInstancePromise[key] = promise;\n\n return;\n }\n\n soundInstance.volume = 0;\n const promise = soundInstance.play();\n\n soundInstancePromise[key] = promise;\n\n const intervalId = setInterval(() => {\n if (!soundInstance) {\n clearInterval(intervalId);\n\n return;\n }\n\n const vol = soundInstance.volume || 0;\n\n if (vol < 1) {\n soundInstance.volume = Math.min(vol + 0.1, 1);\n } else {\n clearInterval(intervalId);\n }\n }, 100);\n\n timeoutRefs.current[key] = intervalId;\n\n return soundInstance;\n },\n [loadSound],\n );\n\n const stop = useCallback((key: CircleSoundKey, immediately: boolean = true) => {\n const soundInstance = soundMapper[key];\n\n if (soundInstancePromise[key] !== undefined) {\n soundInstancePromise[key]\n ?.then(() => {\n if (!soundInstance) return;\n\n if (immediately) {\n soundInstance.pause();\n\n return;\n }\n\n const intervalId = setInterval(() => {\n if (!soundInstance) {\n clearInterval(intervalId);\n\n return;\n }\n\n const vol = soundInstance.volume || 0;\n\n if (vol - 0.1 <= 0) {\n soundInstance.volume = 0;\n soundInstance.pause();\n clearInterval(intervalId);\n } else {\n soundInstance.volume = vol - 0.1;\n }\n }, 100);\n\n timeoutRefs.current[key] = intervalId;\n })\n .catch(err => {\n // eslint-disable-next-line no-console\n console.log('sound not playing', err);\n });\n }\n }, []);\n\n return { playSwipSound, play, stop, playButtonSound };\n};\n"],"names":["swipeSoundIndex","soundMapper","CircleSoundKey","soundInstancePromise","useCircleSounds","loadSound","useCallback","key","loadedSound","CircleSoundKeyMapper","pausedSoundsRef","useRef","timeoutRefs","handleVisibilityChange","sound","useEffect","timeouts","id","playSwipSound","SWIPE_SOUND_ORDER","_a","playButtonSound","play","immediately","loop","soundInstance","promise","intervalId","vol","stop","err"],"mappings":";;;AAOA,IAAIA,IAAkB;AAEf,MAAMC,IAAkF;AAAA,EAC7F,CAACC,EAAe,UAAU,GAAG;AAAA,EAC7B,CAACA,EAAe,mBAAmB,GAAG;AAAA,EACtC,CAACA,EAAe,QAAQ,GAAG;AAAA,EAC3B,CAACA,EAAe,QAAQ,GAAG;AAAA,EAC3B,CAACA,EAAe,QAAQ,GAAG;AAAA,EAC3B,CAACA,EAAe,QAAQ,GAAG;AAAA,EAC3B,CAACA,EAAe,QAAQ,GA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const c = i.div`
77
77
  align-items: center;
78
78
  left: 0;
79
79
  right: 0;
80
- bottom: ${window.ReactNativeBottomInset || 0}px;
81
- `, v = i.button`
80
+ bottom: 0px;
81
+ `, f = i.button`
82
82
  position: absolute;
83
- top: ${(window.ReactNativeTopInset || 0) + 20}px;
83
+ top: 20px;
84
84
  left: 16px;
85
85
  outline: none;
86
86
  border: none;
@@ -98,6 +98,6 @@ export {
98
98
  g as CustomDataContainer,
99
99
  x as Label,
100
100
  a as ScreenWrapper,
101
- v as TransparentIconButton
101
+ f as TransparentIconButton
102
102
  };
103
103
  //# sourceMappingURL=circular-steps-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"circular-steps-styled.js","sources":["../../../../../../src/features/circle-games/sign-up/comp/circular-steps/circular-steps-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { CIRCLE_SIZE_GUTTER, CIRCULAR_STEP_TOP_DISTANCE } from './constants';\n\ninterface ICircularStepsContainerProps {\n width: number;\n height: number;\n}\n\ninterface IBlurGameContainerProps {\n blurType: 'light' | 'dark';\n blurAmount: number;\n}\n\nexport const ScreenWrapper = styled.div<ICircularStepsContainerProps>`\n position: relative;\n width: ${({ width }) => `${width}px`};\n height: ${({ height }) => `${height}px`};\n`;\n\nexport const CircularStepsContainer = styled.div`\n display: flex;\n position: relative;\n height: inherit;\n width: inherit;\n margin: 0px auto;\n`;\n\nexport const CircularStepsWrapper = styled.div`\n display: flex;\n flex-direction: column;\n flex: 1;\n align-items: center;\n width: 100%;\n height: 100%;\n position: relative;\n`;\n\nexport const BackgroundImage = styled.div`\n position: absolute;\n z-index: -1;\n top: 0;\n left: 0;\n bottom: 0px;\n right: 0;\n background-size: contain;\n`;\n\nexport const BlurredContainerWrapper = styled.div`\n position: absolute;\n width: 100%;\n height: 100%;\n overflow: hidden;\n`;\n\nexport const BlurredGameContainer = styled.div<IBlurGameContainerProps>`\n height: 100%;\n width: 100%;\n background-color: ${({ blurType }) =>\n blurType === 'dark' ? 'rgba(0, 0, 0, 0.5)' : ({ theme }) => theme.colors.WHITE};\n backdrop-filter: ${({ blurAmount }) => `blur(${blurAmount}px)`};\n`;\n\nexport const CustEleContainer = styled.div`\n position: relative;\n top: 10px;\n left: 0;\n right: 0;\n z-index: 2;\n margin: 16px;\n`;\n\nexport const CircularProgressContainer = styled.div<{\n isVerticallyCentered?: boolean;\n width: number;\n height: number;\n}>`\n margin-top: ${({ height }) => (height * CIRCULAR_STEP_TOP_DISTANCE) / 100}px;\n width: ${({ width }) => width * CIRCLE_SIZE_GUTTER}px;\n height: ${({ width }) => width * CIRCLE_SIZE_GUTTER}px;\n position: relative;\n overflow: hidden;\n background: ${({ theme }) => theme.colors.BLACK_2};\n border-radius: 100%;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ${({ theme }) => theme.colors.WHITE};\n`;\n\nexport const Label = styled.div`\n position: absolute;\n transform: translateY(-55px);\n z-index: 3;\n`;\n\nexport const CircularProgress = styled.div`\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 2;\n transform: scale(1.175);\n pointer-events: none;\n`;\n\nexport const CustomDataContainer = styled.div`\n position: absolute;\n display: flex;\n flex-direction: column;\n align-items: center;\n left: 0;\n right: 0;\n bottom: ${window.ReactNativeBottomInset || 0}px;\n`;\n\nexport const TransparentIconButton = styled.button`\n position: absolute;\n top: ${(window.ReactNativeTopInset || 0) + 20}px;\n left: 16px;\n outline: none;\n border: none;\n background: transparent;\n cursor: pointer;\n z-index: 1;\n`;\n"],"names":["ScreenWrapper","styled","width","height","CircularStepsContainer","CircularStepsWrapper","BackgroundImage","blurType","theme","blurAmount","CustEleContainer","CircularProgressContainer","CIRCULAR_STEP_TOP_DISTANCE","CIRCLE_SIZE_GUTTER","Label","CircularProgress","CustomDataContainer","TransparentIconButton"],"mappings":";;AAcO,MAAMA,IAAgBC,EAAO;AAAA;AAAA,WAEzB,CAAC,EAAE,OAAAC,EAAY,MAAA,GAAGA,CAAK,IAAI;AAAA,Y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EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
1
+ {"version":3,"file":"circular-steps-styled.js","sources":["../../../../../../src/features/circle-games/sign-up/comp/circular-steps/circular-steps-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { CIRCLE_SIZE_GUTTER, CIRCULAR_STEP_TOP_DISTANCE } from './constants';\n\ninterface ICircularStepsContainerProps {\n width: number;\n height: number;\n}\n\ninterface IBlurGameContainerProps {\n blurType: 'light' | 'dark';\n blurAmount: number;\n}\n\nexport const ScreenWrapper = styled.div<ICircularStepsContainerProps>`\n position: relative;\n width: ${({ width }) => `${width}px`};\n height: ${({ height }) => `${height}px`};\n`;\n\nexport const CircularStepsContainer = styled.div`\n display: flex;\n position: relative;\n height: inherit;\n width: inherit;\n margin: 0px auto;\n`;\n\nexport const CircularStepsWrapper = styled.div`\n display: flex;\n flex-direction: column;\n flex: 1;\n align-items: center;\n width: 100%;\n height: 100%;\n position: relative;\n`;\n\nexport const BackgroundImage = styled.div`\n position: absolute;\n z-index: -1;\n top: 0;\n left: 0;\n bottom: 0px;\n right: 0;\n background-size: contain;\n`;\n\nexport const BlurredContainerWrapper = styled.div`\n position: absolute;\n width: 100%;\n height: 100%;\n overflow: hidden;\n`;\n\nexport const BlurredGameContainer = styled.div<IBlurGameContainerProps>`\n height: 100%;\n width: 100%;\n background-color: ${({ blurType }) =>\n blurType === 'dark' ? 'rgba(0, 0, 0, 0.5)' : ({ theme }) => theme.colors.WHITE};\n backdrop-filter: ${({ blurAmount }) => `blur(${blurAmount}px)`};\n`;\n\nexport const CustEleContainer = styled.div`\n position: relative;\n top: 10px;\n left: 0;\n right: 0;\n z-index: 2;\n margin: 16px;\n`;\n\nexport const CircularProgressContainer = styled.div<{\n isVerticallyCentered?: boolean;\n width: number;\n height: number;\n}>`\n margin-top: ${({ height }) => (height * CIRCULAR_STEP_TOP_DISTANCE) / 100}px;\n width: ${({ width }) => width * CIRCLE_SIZE_GUTTER}px;\n height: ${({ width }) => width * CIRCLE_SIZE_GUTTER}px;\n position: relative;\n overflow: hidden;\n background: ${({ theme }) => theme.colors.BLACK_2};\n border-radius: 100%;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ${({ theme }) => theme.colors.WHITE};\n`;\n\nexport const Label = styled.div`\n position: absolute;\n transform: translateY(-55px);\n z-index: 3;\n`;\n\nexport const CircularProgress = styled.div`\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 2;\n transform: scale(1.175);\n pointer-events: none;\n`;\n\nexport const CustomDataContainer = styled.div`\n position: absolute;\n display: flex;\n flex-direction: column;\n align-items: center;\n left: 0;\n right: 0;\n bottom: 0px;\n`;\n\nexport const TransparentIconButton = styled.button`\n position: absolute;\n top: 20px;\n left: 16px;\n outline: none;\n border: none;\n background: transparent;\n cursor: pointer;\n z-index: 1;\n`;\n"],"names":["ScreenWrapper","styled","width","height","CircularStepsContainer","CircularStepsWrapper","BackgroundImage","blurType","theme","blurAmount","CustEleContainer","CircularProgressContainer","CIRCULAR_STEP_TOP_DISTANCE","CIRCLE_SIZE_GUTTER","Label","CircularProgress","CustomDataContainer","TransparentIconButton"],"mappings":";;AAcO,MAAMA,IAAgBC,EAAO;AAAA;AAAA,WAEzB,CAAC,EAAE,OAAAC,EAAY,MAAA,GAAGA,CAAK,IAAI;AAAA,YAC1B,CAAC,EAAE,QAAAC,EAAa,MAAA,GAAGA,CAAM,IAAI;AAAA,GAG5BC,IAAyBH,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQhCI,IAAuBJ,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAU9BK,IAAkBL,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUCA,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAOVA,EAAO;AAAA;AAAA;AAAA,sBAGrB,CAAC,EAAE,UAAAM,QACrBA,MAAa,SAAS,uBAAuB,CAAC,EAAE,OAAAC,EAAY,MAAAA,EAAM,OAAO,KAAK;AAAA,qBAC7D,CAAC,EAAE,YAAAC,EAAiB,MAAA,QAAQA,CAAU,KAAK;AAAA;AAGzD,MAAMC,IAAmBT,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAS1BU,IAA4BV,EAAO;AAAA,gBAKhC,CAAC,EAAE,QAAAE,EAAA,MAAcA,IAASS,IAA8B,GAAG;AAAA,WAChE,CAAC,EAAE,OAAAV,QAAYA,IAAQW,CAAkB;AAAA,YACxC,CAAC,EAAE,OAAAX,QAAYA,IAAQW,CAAkB;AAAA;AAAA;AAAA,gBAGrC,CAAC,EAAE,OAAAL,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAMxC,CAAC,EAAE,OAAAA,EAAA,MAAYA,EAAM,OAAO,KAAK;AAAA,GAG/BM,IAAQb,EAAO;AAAA;AAAA;AAAA;AAAA,GAMfc,IAAmBd,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAS1Be,IAAsBf,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAU7BgB,IAAwBhB,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
@@ -1,5 +1,5 @@
1
1
  import { State as e } from "./sign-up-types.js";
2
- const a = [e.ACTIVE, e.PAUSED, e.PAID], i = [e.TRIAL, e.DEMO], o = [
2
+ const h = [e.ACTIVE, e.PAUSED, e.PAID], i = [e.TRIAL, e.DEMO], p = [
3
3
  { label: "2", key: "2", sup: "nd" },
4
4
  { label: "3", key: "3", sup: "rd" },
5
5
  { label: "4", key: "4", sup: "th" },
@@ -11,14 +11,14 @@ const a = [e.ACTIVE, e.PAUSED, e.PAID], i = [e.TRIAL, e.DEMO], o = [
11
11
  { label: "10", key: "10", sup: "th" },
12
12
  { label: "11", key: "11", sup: "th" },
13
13
  { label: "12", key: "12", sup: "th" }
14
- ], s = 440, t = 640, l = window.innerHeight / t, h = window.ReactNativeWebView ? window.innerHeight : Math.min(t * l, t), b = window.ReactNativeWebView ? window.innerWidth : Math.min(s * l, s);
14
+ ], t = 440, s = 640, n = window.innerWidth / t, a = window.innerHeight / s, l = Math.min(n, a), u = Math.min(s * l, s), b = Math.min(t * l, t);
15
15
  export {
16
- t as ACTUAL_HEIGHT,
17
- s as ACTUAL_WIDTH,
18
- h as CONTAINER_HEIGHT,
16
+ s as ACTUAL_HEIGHT,
17
+ t as ACTUAL_WIDTH,
18
+ u as CONTAINER_HEIGHT,
19
19
  b as CONTAINER_WIDTH,
20
- o as GRADES,
21
- a as userIsEnrolledCases,
20
+ p as GRADES,
21
+ h as userIsEnrolledCases,
22
22
  i as userIsOnTrialCases
23
23
  };
24
24
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../../src/features/circle-games/sign-up/constants.ts"],"sourcesContent":["import type { Grade } from './comp/grade-input/grade-input-types';\n\nimport { State } from './sign-up-types';\n\nexport const userIsEnrolledCases = [State.ACTIVE, State.PAUSED, State.PAID];\nexport const userIsOnTrialCases = [State.TRIAL, State.DEMO];\n\nexport const GRADES: Grade[] = [\n { label: '2', key: '2', sup: 'nd' },\n { label: '3', key: '3', sup: 'rd' },\n { label: '4', key: '4', sup: 'th' },\n { label: '5', key: '5', sup: 'th' },\n { label: '6', key: '6', sup: 'th' },\n { label: '7', key: '7', sup: 'th' },\n { label: '8', key: '8', sup: 'th' },\n { label: '9', key: '9', sup: 'th' },\n { label: '10', key: '10', sup: 'th' },\n { label: '11', key: '11', sup: 'th' },\n { label: '12', key: '12', sup: 'th' },\n];\n\nexport const MIN_HEIGHT_TO_SUPPORT = 540;\nexport const ACTUAL_WIDTH = 440;\nexport const ACTUAL_HEIGHT = 640;\n\nconst ratio = window.innerHeight / ACTUAL_HEIGHT;\n\nexport const CONTAINER_HEIGHT = window.ReactNativeWebView\n ? window.innerHeight\n : Math.min(ACTUAL_HEIGHT * ratio, ACTUAL_HEIGHT);\nexport const CONTAINER_WIDTH = window.ReactNativeWebView\n ? window.innerWidth\n : Math.min(ACTUAL_WIDTH * ratio, ACTUAL_WIDTH);\n"],"names":["userIsEnrolledCases","State","userIsOnTrialCases","GRADES","ACTUAL_WIDTH","ACTUAL_HEIGHT","ratio","CONTAINER_HEIGHT","CONTAINER_WIDTH"],"mappings":";AAIO,MAAMA,IAAsB,CAACC,EAAM,QAAQA,EAAM,QAAQA,EAAM,IAAI,GAC7DC,IAAqB,CAACD,EAAM,OAAOA,EAAM,IAAI,GAE7CE,IAAkB;AAAA,EAC7B,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,MAAM,KAAK,MAAM,KAAK,KAAK;AAAA,EACpC,EAAE,OAAO,MAAM,KAAK,MAAM,KAAK,KAAK;AAAA,EACpC,EAAE,OAAO,MAAM,KAAK,MAAM,KAAK,KAAK;AACtC,GAGaC,IAAe,KACfC,IAAgB,KAEvBC,IAAQ,OAAO,cAAcD,GAEtBE,IAAmB,OAAO,qBACnC,OAAO,cACP,KAAK,IAAIF,IAAgBC,GAAOD,CAAa,GACpCG,IAAkB,OAAO,qBAClC,OAAO,aACP,KAAK,IAAIJ,IAAeE,GAAOF,CAAY;"}
1
+ {"version":3,"file":"constants.js","sources":["../../../../src/features/circle-games/sign-up/constants.ts"],"sourcesContent":["import type { Grade } from './comp/grade-input/grade-input-types';\n\nimport { State } from './sign-up-types';\n\nexport const userIsEnrolledCases = [State.ACTIVE, State.PAUSED, State.PAID];\nexport const userIsOnTrialCases = [State.TRIAL, State.DEMO];\n\nexport const GRADES: Grade[] = [\n { label: '2', key: '2', sup: 'nd' },\n { label: '3', key: '3', sup: 'rd' },\n { label: '4', key: '4', sup: 'th' },\n { label: '5', key: '5', sup: 'th' },\n { label: '6', key: '6', sup: 'th' },\n { label: '7', key: '7', sup: 'th' },\n { label: '8', key: '8', sup: 'th' },\n { label: '9', key: '9', sup: 'th' },\n { label: '10', key: '10', sup: 'th' },\n { label: '11', key: '11', sup: 'th' },\n { label: '12', key: '12', sup: 'th' },\n];\n\nexport const MIN_HEIGHT_TO_SUPPORT = 540;\nexport const ACTUAL_WIDTH = 440;\nexport const ACTUAL_HEIGHT = 640;\n\nconst widthRatio = window.innerWidth / ACTUAL_WIDTH;\nconst heightRatio = window.innerHeight / ACTUAL_HEIGHT;\nconst ratio = Math.min(widthRatio, heightRatio);\n\nexport const CONTAINER_HEIGHT = Math.min(ACTUAL_HEIGHT * ratio, ACTUAL_HEIGHT);\nexport const CONTAINER_WIDTH = Math.min(ACTUAL_WIDTH * ratio, ACTUAL_WIDTH);\n"],"names":["userIsEnrolledCases","State","userIsOnTrialCases","GRADES","ACTUAL_WIDTH","ACTUAL_HEIGHT","widthRatio","heightRatio","ratio","CONTAINER_HEIGHT","CONTAINER_WIDTH"],"mappings":";AAIO,MAAMA,IAAsB,CAACC,EAAM,QAAQA,EAAM,QAAQA,EAAM,IAAI,GAC7DC,IAAqB,CAACD,EAAM,OAAOA,EAAM,IAAI,GAE7CE,IAAkB;AAAA,EAC7B,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,MAAM,KAAK,MAAM,KAAK,KAAK;AAAA,EACpC,EAAE,OAAO,MAAM,KAAK,MAAM,KAAK,KAAK;AAAA,EACpC,EAAE,OAAO,MAAM,KAAK,MAAM,KAAK,KAAK;AACtC,GAGaC,IAAe,KACfC,IAAgB,KAEvBC,IAAa,OAAO,aAAaF,GACjCG,IAAc,OAAO,cAAcF,GACnCG,IAAQ,KAAK,IAAIF,GAAYC,CAAW,GAEjCE,IAAmB,KAAK,IAAIJ,IAAgBG,GAAOH,CAAa,GAChEK,IAAkB,KAAK,IAAIN,IAAeI,GAAOJ,CAAY;"}
@@ -7,15 +7,13 @@ const E = {
7
7
  EXTRA_PRACTICE_ASSIGNED: "EXTRA_PRACTICE_ASSIGNED",
8
8
  CHANGE_LOCATION: "CHANGE_LOCATION",
9
9
  SHEET_STARTED: "SHEET_STARTED",
10
- SHEET_UNASSIGNED: "SHEET_UNASSIGNED",
11
- SHEET_REATTEMPTED: "SHEET_REATTEMPTED",
12
- INVALIDATE_CHAPTER_ON_CHANGE_ATTEMPT_LOCATION: "INVALIDATE_CHAPTER_ON_CHANGE_ATTEMPT_LOCATION"
10
+ SHEET_UNASSIGNED: "SHEET_UNASSIGNED"
13
11
  }, S = {
14
12
  GOAL_CREATED: "GOAL_CREATED",
15
13
  GOAL_EDITED: "GOAL_EDITED",
16
14
  GOAL_DELETED: "GOAL_DELETED",
17
15
  GOAL_OUTCOME_ADDED: "GOAL_OUTCOME_ADDED"
18
- }, T = {
16
+ }, _ = {
19
17
  MILESTONE_NAME_UPDATED: "MILESTONE_NAME_UPDATED",
20
18
  MILESTONE_DATE_UPDATED: "MILESTONE_DATE_UPDATED",
21
19
  MILESTONE_DELETED: "MILESTONE_DELETED",
@@ -25,16 +23,12 @@ const E = {
25
23
  MILESTONE_RESOURCE_RESET: "MILESTONE_RESOURCE_RESET",
26
24
  PAST_MILESTONE_OUTCOME_ADDED: "PAST_MILESTONE_OUTCOME_ADDED",
27
25
  MILESTONE_TEST_ASSIGNED: "MILESTONE_TEST_ASSIGNED"
28
- }, _ = {
29
- HOMEWORK_UNASSIGN: "HOMEWORK_UNASSIGN",
30
- INVALIDATE_HOMEWORK: "INVALIDATE_HOMEWORK"
31
- }, A = {
26
+ }, T = {
32
27
  ...E,
33
- ...T,
34
- ...S,
35
- ..._
28
+ ..._,
29
+ ...S
36
30
  };
37
31
  export {
38
- A as EVENTS
32
+ T as EVENTS
39
33
  };
40
34
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../../src/features/communication/pub-sub/constants.ts"],"sourcesContent":["const CHAPTER_SHEET_EVENTS = {\n CHAPTER_UPDATED: 'CHAPTER_UPDATED',\n LESSONS_MARKED_AS_FAMILIAR: 'LESSONS_MARKED_AS_FAMILIAR',\n LESSONS_MARKED_AS_IRRELEVANT: 'LESSONS_MARKED_AS_IRRELEVANT',\n LESSONS_PROGRESS_RESET: 'LESSONS_PROGRESS_RESET',\n UNLOCK_SHEETS: 'UNLOCK_SHEETS',\n EXTRA_PRACTICE_ASSIGNED: 'EXTRA_PRACTICE_ASSIGNED',\n CHANGE_LOCATION: 'CHANGE_LOCATION',\n SHEET_STARTED: 'SHEET_STARTED',\n SHEET_UNASSIGNED: 'SHEET_UNASSIGNED',\n SHEET_REATTEMPTED: 'SHEET_REATTEMPTED',\n INVALIDATE_CHAPTER_ON_CHANGE_ATTEMPT_LOCATION: 'INVALIDATE_CHAPTER_ON_CHANGE_ATTEMPT_LOCATION',\n} as const;\n\nconst GOAL_EVENTS = {\n GOAL_CREATED: 'GOAL_CREATED',\n GOAL_EDITED: 'GOAL_EDITED',\n GOAL_DELETED: 'GOAL_DELETED',\n GOAL_OUTCOME_ADDED: 'GOAL_OUTCOME_ADDED',\n} as const;\n\nconst MILESTONE_EVENTS = {\n MILESTONE_NAME_UPDATED: 'MILESTONE_NAME_UPDATED',\n MILESTONE_DATE_UPDATED: 'MILESTONE_DATE_UPDATED',\n MILESTONE_DELETED: 'MILESTONE_DELETED',\n MILESTONE_EDITED: 'MILESTONE_EDITED',\n MILESTONE_RESOURCE_ASSIGNED: 'MILESTONE_RESOURCE_ASSIGNED',\n MILESTONE_RESOURCE_UNASSIGNED: 'MILESTONE_RESOURCE_UNASSIGNED',\n MILESTONE_RESOURCE_RESET: 'MILESTONE_RESOURCE_RESET',\n PAST_MILESTONE_OUTCOME_ADDED: 'PAST_MILESTONE_OUTCOME_ADDED',\n MILESTONE_TEST_ASSIGNED: 'MILESTONE_TEST_ASSIGNED',\n} as const;\n\nconst HOMEWORK_EVENTS = {\n HOMEWORK_UNASSIGN: 'HOMEWORK_UNASSIGN',\n INVALIDATE_HOMEWORK: 'INVALIDATE_HOMEWORK',\n} as const;\n\nconst EVENTS = {\n ...CHAPTER_SHEET_EVENTS,\n ...MILESTONE_EVENTS,\n ...GOAL_EVENTS,\n ...HOMEWORK_EVENTS,\n};\n\nexport { EVENTS };\n"],"names":["CHAPTER_SHEET_EVENTS","GOAL_EVENTS","MILESTONE_EVENTS","HOMEWORK_EVENTS","EVENTS"],"mappings":"AAAA,MAAMA,IAAuB;AAAA,EAC3B,iBAAiB;AAAA,EACjB,4BAA4B;AAAA,EAC5B,8BAA8B;AAAA,EAC9B,wBAAwB;AAAA,EACxB,eAAe;AAAA,EACf,yBAAyB;AAAA,EACzB,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,+CAA+C;AACjD,GAEMC,IAAc;AAAA,EAClB,cAAc;AAAA,EACd,aAAa;AAAA,EACb,cAAc;AAAA,EACd,oBAAoB;AACtB,GAEMC,IAAmB;AAAA,EACvB,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,EACxB,mBAAmB;AAAA,EACnB,kBAAkB;AAAA,EAClB,6BAA6B;AAAA,EAC7B,+BAA+B;AAAA,EAC/B,0BAA0B;AAAA,EAC1B,8BAA8B;AAAA,EAC9B,yBAAyB;AAC3B,GAEMC,IAAkB;AAAA,EACtB,mBAAmB;AAAA,EACnB,qBAAqB;AACvB,GAEMC,IAAS;AAAA,EACb,GAAGJ;AAAA,EACH,GAAGE;AAAA,EACH,GAAGD;AAAA,EACH,GAAGE;AACL;"}
1
+ {"version":3,"file":"constants.js","sources":["../../../../src/features/communication/pub-sub/constants.ts"],"sourcesContent":["const CHAPTER_SHEET_EVENTS = {\n CHAPTER_UPDATED: 'CHAPTER_UPDATED',\n LESSONS_MARKED_AS_FAMILIAR: 'LESSONS_MARKED_AS_FAMILIAR',\n LESSONS_MARKED_AS_IRRELEVANT: 'LESSONS_MARKED_AS_IRRELEVANT',\n LESSONS_PROGRESS_RESET: 'LESSONS_PROGRESS_RESET',\n UNLOCK_SHEETS: 'UNLOCK_SHEETS',\n EXTRA_PRACTICE_ASSIGNED: 'EXTRA_PRACTICE_ASSIGNED',\n CHANGE_LOCATION: 'CHANGE_LOCATION',\n SHEET_STARTED: 'SHEET_STARTED',\n SHEET_UNASSIGNED: 'SHEET_UNASSIGNED',\n} as const;\n\nconst GOAL_EVENTS = {\n GOAL_CREATED: 'GOAL_CREATED',\n GOAL_EDITED: 'GOAL_EDITED',\n GOAL_DELETED: 'GOAL_DELETED',\n GOAL_OUTCOME_ADDED: 'GOAL_OUTCOME_ADDED',\n} as const;\n\nconst MILESTONE_EVENTS = {\n MILESTONE_NAME_UPDATED: 'MILESTONE_NAME_UPDATED',\n MILESTONE_DATE_UPDATED: 'MILESTONE_DATE_UPDATED',\n MILESTONE_DELETED: 'MILESTONE_DELETED',\n MILESTONE_EDITED: 'MILESTONE_EDITED',\n MILESTONE_RESOURCE_ASSIGNED: 'MILESTONE_RESOURCE_ASSIGNED',\n MILESTONE_RESOURCE_UNASSIGNED: 'MILESTONE_RESOURCE_UNASSIGNED',\n MILESTONE_RESOURCE_RESET: 'MILESTONE_RESOURCE_RESET',\n PAST_MILESTONE_OUTCOME_ADDED: 'PAST_MILESTONE_OUTCOME_ADDED',\n MILESTONE_TEST_ASSIGNED: 'MILESTONE_TEST_ASSIGNED',\n} as const;\n\nconst EVENTS = {\n ...CHAPTER_SHEET_EVENTS,\n ...MILESTONE_EVENTS,\n ...GOAL_EVENTS,\n};\n\nexport { EVENTS };\n"],"names":["CHAPTER_SHEET_EVENTS","GOAL_EVENTS","MILESTONE_EVENTS","EVENTS"],"mappings":"AAAA,MAAMA,IAAuB;AAAA,EAC3B,iBAAiB;AAAA,EACjB,4BAA4B;AAAA,EAC5B,8BAA8B;AAAA,EAC9B,wBAAwB;AAAA,EACxB,eAAe;AAAA,EACf,yBAAyB;AAAA,EACzB,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,kBAAkB;AACpB,GAEMC,IAAc;AAAA,EAClB,cAAc;AAAA,EACd,aAAa;AAAA,EACb,cAAc;AAAA,EACd,oBAAoB;AACtB,GAEMC,IAAmB;AAAA,EACvB,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,EACxB,mBAAmB;AAAA,EACnB,kBAAkB;AAAA,EAClB,6BAA6B;AAAA,EAC7B,+BAA+B;AAAA,EAC/B,0BAA0B;AAAA,EAC1B,8BAA8B;AAAA,EAC9B,yBAAyB;AAC3B,GAEMC,IAAS;AAAA,EACb,GAAGH;AAAA,EACH,GAAGE;AAAA,EACH,GAAGD;AACL;"}
@@ -1,35 +1,17 @@
1
1
  import e from "styled-components";
2
- import n from "../../../ui/layout/flex-view.js";
3
- const d = e(n)`
4
- top: ${({ $top: r }) => r}px;
5
- left: ${({ $left: r }) => r}px;
6
- `, i = e(n)(({ theme: r }) => {
7
- const { gutter: t } = r.layout;
2
+ import p from "../../../ui/layout/flex-view.js";
3
+ const d = e(p)`
4
+ top: ${({ $top: t }) => t}px;
5
+ left: ${({ $left: t }) => t}px;
6
+ `, l = e(p)(({ theme: t }) => {
7
+ const { gutter: o } = t.layout;
8
8
  return `
9
9
  width: 100%;
10
- padding: ${t * 0.75}px ${t * 0.5}px;
11
- `;
12
- }), s = e.div`
13
- pointer-events: none;
14
- width: 720px;
15
- overflow: hidden;
16
- padding: 30px;
17
- background-color: transparent;
18
- `, c = e.div(({ theme: r }) => {
19
- const { WHITE_5: t, WHITE_2: p } = r.colors;
20
- return `
21
- display: grid;
22
- grid-template-columns: repeat(4, 1fr);
23
- align-content: start;
24
- background: ${p};
25
- background-image: linear-gradient(${t} 0.5px, transparent 0.5px), linear-gradient(90deg, ${t} 0.5px, transparent 0.5px);
26
- background-size: 45px 45px;
10
+ padding: ${o * 0.75}px ${o * 0.5}px;
27
11
  `;
28
12
  });
29
13
  export {
30
- c as ChaptersWrapper,
31
14
  d as ClonedElementWrapper,
32
- i as CoachmarkBody,
33
- s as ELementWrapper
15
+ l as CoachmarkBody
34
16
  };
35
17
  //# sourceMappingURL=coachmark-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"coachmark-styled.js","sources":["../../../../../src/features/journey/comps/coachmark/coachmark-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nexport const ClonedElementWrapper = styled(FlexView)<{\n $top: number;\n $left: number;\n}>`\n top: ${({ $top }) => $top}px;\n left: ${({ $left }) => $left}px;\n`;\n\nexport const CoachmarkBody = styled(FlexView)(({ theme }) => {\n const { gutter } = theme.layout;\n\n return `\n width: 100%;\n padding: ${gutter * 0.75}px ${gutter * 0.5}px;\n `;\n});\n\nexport const ELementWrapper = styled.div`\n pointer-events: none;\n width: 720px;\n overflow: hidden;\n padding: 30px;\n background-color: transparent;\n`;\n\nexport const ChaptersWrapper = styled.div(({ theme }) => {\n const { WHITE_5, WHITE_2 } = theme.colors;\n\n return `\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n align-content: start;\n background: ${WHITE_2};\n background-image: linear-gradient(${WHITE_5} 0.5px, transparent 0.5px), linear-gradient(90deg, ${WHITE_5} 0.5px, transparent 0.5px);\n background-size: 45px 45px;\n `;\n});\n"],"names":["ClonedElementWrapper","styled","FlexView","$top","$left","CoachmarkBody","theme","gutter","ELementWrapper","ChaptersWrapper","WHITE_5","WHITE_2"],"mappings":";;AAIa,MAAAA,IAAuBC,EAAOC,CAAQ;AAAA,SAI1C,CAAC,EAAE,MAAAC,EAAK,MAAMA,CAAI;AAAA,UACjB,CAAC,EAAE,OAAAC,EAAM,MAAMA,CAAK;AAAA,GAGjBC,IAAgBJ,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAI,QAAY;AACrD,QAAA,EAAE,QAAAC,EAAO,IAAID,EAAM;AAElB,SAAA;AAAA;AAAA,eAEMC,IAAS,IAAI,MAAMA,IAAS,GAAG;AAAA;AAE9C,CAAC,GAEYC,IAAiBP,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQxBQ,IAAkBR,EAAO,IAAI,CAAC,EAAE,OAAAK,QAAY;AACvD,QAAM,EAAE,SAAAI,GAAS,SAAAC,MAAYL,EAAM;AAE5B,SAAA;AAAA;AAAA;AAAA;AAAA,kBAISK,CAAO;AAAA,wCACeD,CAAO,sDAAsDA,CAAO;AAAA;AAAA;AAG5G,CAAC;"}
1
+ {"version":3,"file":"coachmark-styled.js","sources":["../../../../../src/features/journey/comps/coachmark/coachmark-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nexport const ClonedElementWrapper = styled(FlexView)<{\n $top: number;\n $left: number;\n}>`\n top: ${({ $top }) => $top}px;\n left: ${({ $left }) => $left}px;\n`;\n\nexport const CoachmarkBody = styled(FlexView)(({ theme }) => {\n const { gutter } = theme.layout;\n\n return `\n width: 100%;\n padding: ${gutter * 0.75}px ${gutter * 0.5}px;\n `;\n});\n"],"names":["ClonedElementWrapper","styled","FlexView","$top","$left","CoachmarkBody","theme","gutter"],"mappings":";;AAIa,MAAAA,IAAuBC,EAAOC,CAAQ;AAAA,SAI1C,CAAC,EAAE,MAAAC,EAAK,MAAMA,CAAI;AAAA,UACjB,CAAC,EAAE,OAAAC,EAAM,MAAMA,CAAK;AAAA,GAGjBC,IAAgBJ,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAI,QAAY;AACrD,QAAA,EAAE,QAAAC,EAAO,IAAID,EAAM;AAElB,SAAA;AAAA;AAAA,eAEMC,IAAS,IAAI,MAAMA,IAAS,GAAG;AAAA;AAE9C,CAAC;"}
@@ -1,43 +1,43 @@
1
- import { jsx as e, jsxs as g, Fragment as f } from "react/jsx-runtime";
2
- import { useMemo as d } from "react";
1
+ import { jsx as o, jsxs as g, Fragment as f } from "react/jsx-runtime";
2
+ import { useMemo as p } from "react";
3
3
  import m from "../../../ui/arrow-tooltip/arrow-tooltip.js";
4
- import b from "../../../ui/nudge/nudge.js";
5
- import { BLUR_OVERLAY_Z_INDEX as T, IndicatorType as p } from "../../use-journey/constants.js";
6
- import { CoachmarkBody as w, ClonedElementWrapper as s } from "./coachmark-styled.js";
7
- import { toolTipGetXCoordinates as y } from "./coachmark-utils.js";
4
+ import y from "../../../ui/nudge/nudge.js";
5
+ import { BLUR_OVERLAY_Z_INDEX as T, IndicatorType as d } from "../../use-journey/constants.js";
6
+ import { CoachmarkBody as P, ClonedElementWrapper as s } from "./coachmark-styled.js";
7
+ import { toolTipGetXCoordinates as $ } from "./coachmark-utils.js";
8
8
  const H = ({ coachmark: t }) => {
9
- const i = t.originalElementToHighlightRef.current, { top: r = 0, left: n = 0, height: h = 0, width: C = 0 } = (i == null ? void 0 : i.getBoundingClientRect()) || {}, l = d(() => () => i ? window.getComputedStyle(i).position === "absolute" : !1, [i]), u = d(() => {
10
- const o = t.indicator;
9
+ const i = t.originalElementToHighlightRef.current, { top: r = 0, left: n = 0, height: h = 0, width: C = 0 } = (i == null ? void 0 : i.getBoundingClientRect()) || {}, l = p(() => () => i ? window.getComputedStyle(i).position === "absolute" : !1, [i]), u = p(() => {
10
+ const e = t.indicator;
11
11
  return {
12
12
  width: 264,
13
13
  // Can be over ridden
14
- tooltipXCoOrdinates: y(o.position) + (o.tooltipXCoOrdinates ?? 0),
14
+ tooltipXCoOrdinates: $(e.position) + (e.tooltipXCoOrdinates ?? 0),
15
15
  // For absolutely positioned elements
16
16
  zIndex: T + 1,
17
- ...o,
18
- tooltipItem: /* @__PURE__ */ e(w, { children: o.tooltipItem }),
17
+ ...e,
18
+ tooltipItem: /* @__PURE__ */ o(P, { children: e.tooltipItem }),
19
19
  alwaysVisible: !0,
20
20
  renderAs: "primary",
21
21
  // Deprecate this
22
22
  borderWidth: 1,
23
- arrowColor: o.arrowColor || "WHITE",
24
- borderColor: o.borderColor || "WHITE",
25
- type: p.TOOLTIP,
23
+ arrowColor: "WHITE",
24
+ borderColor: "WHITE",
25
+ type: d.TOOLTIP,
26
26
  isAnimated: !0
27
27
  };
28
- }, [t.indicator]), I = d(() => {
29
- const o = t.indicator;
28
+ }, [t.indicator]), I = p(() => {
29
+ const e = t.indicator;
30
30
  return {
31
- ...o,
32
- nudgePointerX: n + (o.nudgePointerX ?? 0),
33
- nudgePointerY: r + (o.nudgePointerY ?? 0)
31
+ ...e,
32
+ nudgePointerX: n + (e.nudgePointerX ?? 0),
33
+ nudgePointerY: r + (e.nudgePointerY ?? 0)
34
34
  };
35
35
  }, [t.indicator, n, r]);
36
- return !i || !t.isActive ? null : t.type === p.TOOLTIP ? l() ? /* @__PURE__ */ g(f, { children: [
36
+ return !i || !t.isActive ? null : t.type === d.TOOLTIP ? l() ? /* @__PURE__ */ g(f, { children: [
37
37
  t.elementToHighlight,
38
- /* @__PURE__ */ e(s, { $position: "absolute", $top: r, $left: n, children: /* @__PURE__ */ e(m, { ...u, children: /* @__PURE__ */ e("div", { style: { height: h, width: C } }) }) })
39
- ] }) : /* @__PURE__ */ e(s, { $position: "absolute", $top: r, $left: n, children: /* @__PURE__ */ e(m, { ...u, children: t.elementToHighlight }) }) : t.type === p.NUDGE ? /* @__PURE__ */ g(f, { children: [
40
- /* @__PURE__ */ e(
38
+ /* @__PURE__ */ o(s, { $position: "absolute", $top: r, $left: n, children: /* @__PURE__ */ o(m, { ...u, children: /* @__PURE__ */ o("div", { style: { height: h, width: C } }) }) })
39
+ ] }) : /* @__PURE__ */ o(s, { $position: "absolute", $top: r, $left: n, children: /* @__PURE__ */ o(m, { ...u, children: t.elementToHighlight }) }) : t.type === d.NUDGE ? /* @__PURE__ */ g(f, { children: [
40
+ /* @__PURE__ */ o(
41
41
  s,
42
42
  {
43
43
  $top: l() ? 0 : r,
@@ -46,7 +46,7 @@ const H = ({ coachmark: t }) => {
46
46
  children: t.elementToHighlight
47
47
  }
48
48
  ),
49
- /* @__PURE__ */ e(b, { zIndex: T + 1, ...I })
49
+ /* @__PURE__ */ o(y, { zIndex: T + 1, ...I })
50
50
  ] }) : null;
51
51
  };
52
52
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"coachmark.js","sources":["../../../../../src/features/journey/comps/coachmark/coachmark.tsx"],"sourcesContent":["import type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { INudgeProps } from '../../../ui/nudge/nudge-types';\nimport type { ICoachmarkProps } from '../../use-journey/journey-context-types';\n\nimport React, { useMemo } from 'react';\n\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport Nudge from '../../../ui/nudge/nudge';\nimport { BLUR_OVERLAY_Z_INDEX, IndicatorType } from '../../use-journey/constants';\nimport * as S from './coachmark-styled';\nimport { toolTipGetXCoordinates } from './coachmark-utils';\n\nexport const Coachmark: React.FC<{ coachmark: ICoachmarkProps }> = ({ coachmark }) => {\n const targetElement = coachmark.originalElementToHighlightRef.current;\n const { top = 0, left = 0, height = 0, width = 0 } = targetElement?.getBoundingClientRect() || {};\n\n const isAbsolute = useMemo(() => {\n return () => {\n if (!targetElement) return false;\n\n return window.getComputedStyle(targetElement).position === 'absolute';\n };\n }, [targetElement]);\n\n const tooltipProps = useMemo(() => {\n const arrowToolTipProps = coachmark.indicator as IArrowTooltipProps;\n\n return {\n width: 264, // Can be over ridden\n tooltipXCoOrdinates:\n toolTipGetXCoordinates(arrowToolTipProps.position) +\n (arrowToolTipProps.tooltipXCoOrdinates ?? 0), // For absolutely positioned elements\n zIndex: BLUR_OVERLAY_Z_INDEX + 1,\n ...arrowToolTipProps,\n tooltipItem: <S.CoachmarkBody>{arrowToolTipProps.tooltipItem}</S.CoachmarkBody>,\n alwaysVisible: true,\n renderAs: 'primary', // Deprecate this\n borderWidth: 1,\n arrowColor: arrowToolTipProps.arrowColor || 'WHITE',\n borderColor: arrowToolTipProps.borderColor || 'WHITE',\n type: IndicatorType.TOOLTIP,\n isAnimated: true,\n } as IArrowTooltipProps;\n }, [coachmark.indicator]);\n\n const nudgeProps = useMemo(() => {\n const props: INudgeProps = coachmark.indicator as INudgeProps;\n\n return {\n ...props,\n nudgePointerX: left + (props.nudgePointerX ?? 0),\n nudgePointerY: top + (props.nudgePointerY ?? 0),\n };\n }, [coachmark.indicator, left, top]);\n\n if (!targetElement || !coachmark.isActive) {\n return null;\n }\n\n if (coachmark.type === IndicatorType.TOOLTIP) {\n if (isAbsolute()) {\n return (\n <>\n {coachmark.elementToHighlight}\n <S.ClonedElementWrapper $position=\"absolute\" $top={top} $left={left}>\n <ArrowTooltip {...tooltipProps}>\n <div style={{ height, width }} />\n </ArrowTooltip>\n </S.ClonedElementWrapper>\n </>\n );\n }\n\n return (\n <S.ClonedElementWrapper $position=\"absolute\" $top={top} $left={left}>\n <ArrowTooltip {...tooltipProps}>{coachmark.elementToHighlight}</ArrowTooltip>\n </S.ClonedElementWrapper>\n );\n }\n\n if (coachmark.type === IndicatorType.NUDGE) {\n return (\n <>\n <S.ClonedElementWrapper\n $top={isAbsolute() ? 0 : top}\n $left={isAbsolute() ? 0 : left}\n $position={isAbsolute() ? 'relative' : 'absolute'}\n >\n {coachmark.elementToHighlight}\n </S.ClonedElementWrapper>\n <Nudge zIndex={BLUR_OVERLAY_Z_INDEX + 1} {...nudgeProps} />\n </>\n );\n }\n\n return null;\n};\n"],"names":["Coachmark","coachmark","targetElement","top","left","height","width","isAbsolute","useMemo","tooltipProps","arrowToolTipProps","toolTipGetXCoordinates","BLUR_OVERLAY_Z_INDEX","jsx","S.CoachmarkBody","IndicatorType","nudgeProps","props","jsxs","Fragment","S.ClonedElementWrapper","ArrowTooltip","Nudge"],"mappings":";;;;;;;AAYO,MAAMA,IAAsD,CAAC,EAAE,WAAAC,QAAgB;AAC9E,QAAAC,IAAgBD,EAAU,8BAA8B,SACxD,EAAE,KAAAE,IAAM,GAAG,MAAAC,IAAO,GAAG,QAAAC,IAAS,GAAG,OAAAC,IAAQ,EAAE,KAAIJ,KAAA,gBAAAA,EAAe,4BAA2B,CAAA,GAEzFK,IAAaC,EAAQ,MAClB,MACAN,IAEE,OAAO,iBAAiBA,CAAa,EAAE,aAAa,aAFhC,IAI5B,CAACA,CAAa,CAAC,GAEZO,IAAeD,EAAQ,MAAM;AACjC,UAAME,IAAoBT,EAAU;AAE7B,WAAA;AAAA,MACL,OAAO;AAAA;AAAA,MACP,qBACEU,EAAuBD,EAAkB,QAAQ,KAChDA,EAAkB,uBAAuB;AAAA;AAAA,MAC5C,QAAQE,IAAuB;AAAA,MAC/B,GAAGF;AAAA,MACH,aAAc,gBAAAG,EAAAC,GAAA,EAAiB,YAAkB,aAAY;AAAA,MAC7D,eAAe;AAAA,MACf,UAAU;AAAA;AAAA,MACV,aAAa;AAAA,MACb,YAAYJ,EAAkB,cAAc;AAAA,MAC5C,aAAaA,EAAkB,eAAe;AAAA,MAC9C,MAAMK,EAAc;AAAA,MACpB,YAAY;AAAA,IAAA;AAAA,EACd,GACC,CAACd,EAAU,SAAS,CAAC,GAElBe,IAAaR,EAAQ,MAAM;AAC/B,UAAMS,IAAqBhB,EAAU;AAE9B,WAAA;AAAA,MACL,GAAGgB;AAAA,MACH,eAAeb,KAAQa,EAAM,iBAAiB;AAAA,MAC9C,eAAed,KAAOc,EAAM,iBAAiB;AAAA,IAAA;AAAA,KAE9C,CAAChB,EAAU,WAAWG,GAAMD,CAAG,CAAC;AAEnC,SAAI,CAACD,KAAiB,CAACD,EAAU,WACxB,OAGLA,EAAU,SAASc,EAAc,UAC/BR,MAGG,gBAAAW,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAUlB,EAAA;AAAA,IACX,gBAAAY,EAACO,GAAA,EAAuB,WAAU,YAAW,MAAMjB,GAAK,OAAOC,GAC7D,UAAA,gBAAAS,EAACQ,KAAc,GAAGZ,GAChB,4BAAC,OAAI,EAAA,OAAO,EAAE,QAAAJ,GAAQ,OAAAC,EAAA,GAAS,EAAA,CACjC,EACF,CAAA;AAAA,EACF,EAAA,CAAA,sBAKDc,GAAA,EAAuB,WAAU,YAAW,MAAMjB,GAAK,OAAOC,GAC7D,4BAACiB,GAAc,EAAA,GAAGZ,GAAe,UAAAR,EAAU,oBAAmB,EAChE,CAAA,IAIAA,EAAU,SAASc,EAAc,QAG/B,gBAAAG,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAN;AAAA,MAACO;AAAAA,MAAA;AAAA,QACC,MAAMb,MAAe,IAAIJ;AAAA,QACzB,OAAOI,MAAe,IAAIH;AAAA,QAC1B,WAAWG,MAAe,aAAa;AAAA,QAEtC,UAAUN,EAAA;AAAA,MAAA;AAAA,IACb;AAAA,sBACCqB,GAAM,EAAA,QAAQV,IAAuB,GAAI,GAAGI,GAAY;AAAA,EAC3D,EAAA,CAAA,IAIG;AACT;"}
1
+ {"version":3,"file":"coachmark.js","sources":["../../../../../src/features/journey/comps/coachmark/coachmark.tsx"],"sourcesContent":["import type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { INudgeProps } from '../../../ui/nudge/nudge-types';\nimport type { ICoachmarkProps } from '../../use-journey/journey-context-types';\n\nimport React, { useMemo } from 'react';\n\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport Nudge from '../../../ui/nudge/nudge';\nimport { BLUR_OVERLAY_Z_INDEX, IndicatorType } from '../../use-journey/constants';\nimport * as S from './coachmark-styled';\nimport { toolTipGetXCoordinates } from './coachmark-utils';\n\nexport const Coachmark: React.FC<{ coachmark: ICoachmarkProps }> = ({ coachmark }) => {\n const targetElement = coachmark.originalElementToHighlightRef.current;\n const { top = 0, left = 0, height = 0, width = 0 } = targetElement?.getBoundingClientRect() || {};\n\n const isAbsolute = useMemo(() => {\n return () => {\n if (!targetElement) return false;\n\n return window.getComputedStyle(targetElement).position === 'absolute';\n };\n }, [targetElement]);\n\n const tooltipProps = useMemo(() => {\n const arrowToolTipProps = coachmark.indicator as IArrowTooltipProps;\n\n return {\n width: 264, // Can be over ridden\n tooltipXCoOrdinates:\n toolTipGetXCoordinates(arrowToolTipProps.position) +\n (arrowToolTipProps.tooltipXCoOrdinates ?? 0), // For absolutely positioned elements\n zIndex: BLUR_OVERLAY_Z_INDEX + 1,\n ...arrowToolTipProps,\n tooltipItem: <S.CoachmarkBody>{arrowToolTipProps.tooltipItem}</S.CoachmarkBody>,\n alwaysVisible: true,\n renderAs: 'primary', // Deprecate this\n borderWidth: 1,\n arrowColor: 'WHITE',\n borderColor: 'WHITE',\n type: IndicatorType.TOOLTIP,\n isAnimated: true,\n } as IArrowTooltipProps;\n }, [coachmark.indicator]);\n\n const nudgeProps = useMemo(() => {\n const props: INudgeProps = coachmark.indicator as INudgeProps;\n\n return {\n ...props,\n nudgePointerX: left + (props.nudgePointerX ?? 0),\n nudgePointerY: top + (props.nudgePointerY ?? 0),\n };\n }, [coachmark.indicator, left, top]);\n\n if (!targetElement || !coachmark.isActive) {\n return null;\n }\n\n if (coachmark.type === IndicatorType.TOOLTIP) {\n if (isAbsolute()) {\n return (\n <>\n {coachmark.elementToHighlight}\n <S.ClonedElementWrapper $position=\"absolute\" $top={top} $left={left}>\n <ArrowTooltip {...tooltipProps}>\n <div style={{ height, width }} />\n </ArrowTooltip>\n </S.ClonedElementWrapper>\n </>\n );\n }\n\n return (\n <S.ClonedElementWrapper $position=\"absolute\" $top={top} $left={left}>\n <ArrowTooltip {...tooltipProps}>{coachmark.elementToHighlight}</ArrowTooltip>\n </S.ClonedElementWrapper>\n );\n }\n\n if (coachmark.type === IndicatorType.NUDGE) {\n return (\n <>\n <S.ClonedElementWrapper\n $top={isAbsolute() ? 0 : top}\n $left={isAbsolute() ? 0 : left}\n $position={isAbsolute() ? 'relative' : 'absolute'}\n >\n {coachmark.elementToHighlight}\n </S.ClonedElementWrapper>\n <Nudge zIndex={BLUR_OVERLAY_Z_INDEX + 1} {...nudgeProps} />\n </>\n );\n }\n\n return null;\n};\n"],"names":["Coachmark","coachmark","targetElement","top","left","height","width","isAbsolute","useMemo","tooltipProps","arrowToolTipProps","toolTipGetXCoordinates","BLUR_OVERLAY_Z_INDEX","jsx","S.CoachmarkBody","IndicatorType","nudgeProps","props","jsxs","Fragment","S.ClonedElementWrapper","ArrowTooltip","Nudge"],"mappings":";;;;;;;AAYO,MAAMA,IAAsD,CAAC,EAAE,WAAAC,QAAgB;AAC9E,QAAAC,IAAgBD,EAAU,8BAA8B,SACxD,EAAE,KAAAE,IAAM,GAAG,MAAAC,IAAO,GAAG,QAAAC,IAAS,GAAG,OAAAC,IAAQ,EAAE,KAAIJ,KAAA,gBAAAA,EAAe,4BAA2B,CAAA,GAEzFK,IAAaC,EAAQ,MAClB,MACAN,IAEE,OAAO,iBAAiBA,CAAa,EAAE,aAAa,aAFhC,IAI5B,CAACA,CAAa,CAAC,GAEZO,IAAeD,EAAQ,MAAM;AACjC,UAAME,IAAoBT,EAAU;AAE7B,WAAA;AAAA,MACL,OAAO;AAAA;AAAA,MACP,qBACEU,EAAuBD,EAAkB,QAAQ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e,IAAIH;AAAA,QAC1B,WAAWG,MAAe,aAAa;AAAA,QAEtC,UAAUN,EAAA;AAAA,MAAA;AAAA,IACb;AAAA,sBACCqB,GAAM,EAAA,QAAQV,IAAuB,GAAI,GAAGI,GAAY;AAAA,EAC3D,EAAA,CAAA,IAIG;AACT;"}
@@ -1,4 +1,4 @@
1
- var E = /* @__PURE__ */ ((R) => (R.CIRCLE_ACTIVITIES_INTRO_JOURNEY = "CIRCLE_ACTIVITIES_INTRO_JOURNEY", R.CIRCLE_LEADERBOARD_INTRO_JOURNEY = "CIRCLE_LEADERBOARD_INTRO_JOURNEY", R.CIRCLE_POINTS_REWARD_JOURNEY = "CIRCLE_POINTS_REWARD_JOURNEY", R.CIRCLE_STREAK_UPDATE_JOURNEY = "CIRCLE_STREAK_UPDATE_JOURNEY", R.CIRCLE_TUTORIAL_JOURNEY = "CIRCLE_TUTORIAL_JOURNEY", R.CIRCLE_TABLES_INTRO_JOURNEY = "CIRCLE_TABLES_INTRO_JOURNEY", R.CIRCLE_STREAK_REDUCTION_JOURNEY = "CIRCLE_STREAK_REDUCTION_JOURNEY", R.HOMEPAGE_JOURNEY = "HOMEPAGE_JOURNEY", R.CHAPTER_PAGE_JOURNEY = "CHAPTER_PAGE_JOURNEY", R))(E || {});
1
+ var E = /* @__PURE__ */ ((R) => (R.CIRCLE_ACTIVITIES_INTRO_JOURNEY = "CIRCLE_ACTIVITIES_INTRO_JOURNEY", R.CIRCLE_LEADERBOARD_INTRO_JOURNEY = "CIRCLE_LEADERBOARD_INTRO_JOURNEY", R.CIRCLE_POINTS_REWARD_JOURNEY = "CIRCLE_POINTS_REWARD_JOURNEY", R.CIRCLE_STREAK_UPDATE_JOURNEY = "CIRCLE_STREAK_UPDATE_JOURNEY", R.CIRCLE_TUTORIAL_JOURNEY = "CIRCLE_TUTORIAL_JOURNEY", R.CIRCLE_TABLES_INTRO_JOURNEY = "CIRCLE_TABLES_INTRO_JOURNEY", R.CIRCLE_STREAK_REDUCTION_JOURNEY = "CIRCLE_STREAK_REDUCTION_JOURNEY", R))(E || {});
2
2
  export {
3
3
  E as JOURNEY_ID_STUDENT
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"journey-id-student.js","sources":["../../../../src/features/journey/journey-id/journey-id-student.ts"],"sourcesContent":["export enum JOURNEY_ID_STUDENT {\n CIRCLE_ACTIVITIES_INTRO_JOURNEY = 'CIRCLE_ACTIVITIES_INTRO_JOURNEY',\n CIRCLE_LEADERBOARD_INTRO_JOURNEY = 'CIRCLE_LEADERBOARD_INTRO_JOURNEY',\n CIRCLE_POINTS_REWARD_JOURNEY = 'CIRCLE_POINTS_REWARD_JOURNEY',\n CIRCLE_STREAK_UPDATE_JOURNEY = 'CIRCLE_STREAK_UPDATE_JOURNEY',\n CIRCLE_TUTORIAL_JOURNEY = 'CIRCLE_TUTORIAL_JOURNEY',\n CIRCLE_TABLES_INTRO_JOURNEY = 'CIRCLE_TABLES_INTRO_JOURNEY',\n\n // TODO: Deprecate bottom journeys, they are not actually journeys\n CIRCLE_STREAK_REDUCTION_JOURNEY = 'CIRCLE_STREAK_REDUCTION_JOURNEY',\n HOMEPAGE_JOURNEY = 'HOMEPAGE_JOURNEY',\n CHAPTER_PAGE_JOURNEY = 'CHAPTER_PAGE_JOURNEY',\n}\n"],"names":["JOURNEY_ID_STUDENT"],"mappings":"AAAY,IAAAA,sBAAAA,OACVA,EAAA,kCAAkC,mCAClCA,EAAA,mCAAmC,oCACnCA,EAAA,+BAA+B,gCAC/BA,EAAA,+BAA+B,gCAC/BA,EAAA,0BAA0B,2BAC1BA,EAAA,8BAA8B,+BAG9BA,EAAA,kCAAkC,mCAClCA,EAAA,mBAAmB,oBACnBA,EAAA,uBAAuB,wBAXbA,IAAAA,KAAA,CAAA,CAAA;"}
1
+ {"version":3,"file":"journey-id-student.js","sources":["../../../../src/features/journey/journey-id/journey-id-student.ts"],"sourcesContent":["export enum JOURNEY_ID_STUDENT {\n CIRCLE_ACTIVITIES_INTRO_JOURNEY = 'CIRCLE_ACTIVITIES_INTRO_JOURNEY',\n CIRCLE_LEADERBOARD_INTRO_JOURNEY = 'CIRCLE_LEADERBOARD_INTRO_JOURNEY',\n CIRCLE_POINTS_REWARD_JOURNEY = 'CIRCLE_POINTS_REWARD_JOURNEY',\n CIRCLE_STREAK_UPDATE_JOURNEY = 'CIRCLE_STREAK_UPDATE_JOURNEY',\n CIRCLE_TUTORIAL_JOURNEY = 'CIRCLE_TUTORIAL_JOURNEY',\n CIRCLE_TABLES_INTRO_JOURNEY = 'CIRCLE_TABLES_INTRO_JOURNEY',\n\n // TODO: Deprecate bottom journeys, they are not actually journeys\n CIRCLE_STREAK_REDUCTION_JOURNEY = 'CIRCLE_STREAK_REDUCTION_JOURNEY',\n}\n"],"names":["JOURNEY_ID_STUDENT"],"mappings":"AAAY,IAAAA,sBAAAA,OACVA,EAAA,kCAAkC,mCAClCA,EAAA,mCAAmC,oCACnCA,EAAA,+BAA+B,gCAC/BA,EAAA,+BAA+B,gCAC/BA,EAAA,0BAA0B,2BAC1BA,EAAA,8BAA8B,+BAG9BA,EAAA,kCAAkC,mCATxBA,IAAAA,KAAA,CAAA,CAAA;"}
@@ -1,10 +1,10 @@
1
- import { jsxs as D, jsx as w } from "react/jsx-runtime";
2
- import { createContext as L, useState as J, useRef as k, useCallback as l, useMemo as N, useEffect as R } from "react";
3
- import { Coachmark as B } from "../comps/coachmark/coachmark.js";
4
- import { usePostUserJourney as M, useGetUserJourney as z } from "../user-journey-api/user-journey-api.js";
5
- import { Overlay as G } from "./journey-styled.js";
6
- const S = L(null), W = ({ children: T, appId: s, userId: o }) => {
7
- const [b, O] = J(!1), [x, p] = J(null), [c, a] = J([]), [d, v] = J(!1), y = k(-1), t = k(), f = k([]), { post: _ } = M(), { data: C = null, get: g } = z(), A = l(
1
+ import { jsxs as O, jsx as w } from "react/jsx-runtime";
2
+ import { createContext as U, useState as h, useRef as k, useCallback as l, useMemo as q, useEffect as R } from "react";
3
+ import { Coachmark as D } from "../comps/coachmark/coachmark.js";
4
+ import { usePostUserJourney as L, useGetUserJourney as N } from "../user-journey-api/user-journey-api.js";
5
+ import { Overlay as M } from "./journey-styled.js";
6
+ const z = U(null), H = ({ children: T, appId: s, userId: o }) => {
7
+ const [x, p] = h(null), [c, a] = h([]), [J, v] = h(!1), m = k(-1), t = k(), d = k([]), { post: _ } = L(), { data: f = null, get: g } = N(), A = l(
8
8
  (e, r) => {
9
9
  if (c.length > 0) {
10
10
  console.error(
@@ -12,13 +12,13 @@ const S = L(null), W = ({ children: T, appId: s, userId: o }) => {
12
12
  );
13
13
  return;
14
14
  }
15
- v(!0), t.current = e, y.current = -1, a([...r]);
15
+ v(!0), t.current = e, m.current = -1, a([...r]);
16
16
  },
17
17
  [c.length]
18
18
  ), u = l(() => {
19
- f.current.forEach((e) => {
19
+ d.current.forEach((e) => {
20
20
  clearTimeout(e);
21
- }), f.current = [], t.current = void 0, y.current = -1, a([]), v(!1);
21
+ }), d.current = [], t.current = void 0, m.current = -1, a([]), v(!1);
22
22
  }, []), $ = l(
23
23
  (e) => {
24
24
  u(), p((r) => r && !r.includes(e) ? [...r, e] : r), _({
@@ -36,31 +36,31 @@ const S = L(null), W = ({ children: T, appId: s, userId: o }) => {
36
36
  );
37
37
  return;
38
38
  }
39
- a((m) => [...m, r]);
39
+ a((y) => [...y, r]);
40
40
  }, []), P = l(
41
- (e, r = !1, m = 0, q = !1) => {
41
+ (e, r = !1, y = 0) => {
42
42
  if (!t.current || e !== t.current) {
43
43
  console.error(
44
44
  t.current ? "nextCoachmark was called before setJourney" : `A Journey is already active, Current Journey: ${t.current}, New Journey Request: ${e}`
45
45
  );
46
46
  return;
47
47
  }
48
- O(q), m !== 0 && a((n) => n.map((i) => ({ ...i, isActive: !1 })));
48
+ y !== 0 && a((n) => n.map((i) => ({ ...i, isActive: !1 })));
49
49
  const j = setTimeout(() => {
50
50
  clearTimeout(j);
51
- const n = y.current + 1;
51
+ const n = m.current + 1;
52
52
  a((i) => {
53
53
  if (n >= i.length || i.length === 0)
54
54
  return u(), [];
55
- y.current = n;
56
- const h = [...i];
57
- return h[n].isActive = !0, n > 0 && (h[n - 1].isActive = r), h;
55
+ m.current = n;
56
+ const C = [...i];
57
+ return C[n].isActive = !0, n > 0 && (C[n - 1].isActive = r), C;
58
58
  });
59
- }, m);
60
- f.current.push(j);
59
+ }, y);
60
+ d.current.push(j);
61
61
  },
62
62
  [u]
63
- ), U = N(
63
+ ), b = q(
64
64
  () => ({
65
65
  nextCoachmark: P,
66
66
  setJourney: A,
@@ -69,7 +69,7 @@ const S = L(null), W = ({ children: T, appId: s, userId: o }) => {
69
69
  endJourney: $,
70
70
  coachmarks: c,
71
71
  userCompletedJourneyIds: x,
72
- isJourneyActive: d
72
+ isJourneyActive: J
73
73
  }),
74
74
  [
75
75
  P,
@@ -79,7 +79,7 @@ const S = L(null), W = ({ children: T, appId: s, userId: o }) => {
79
79
  $,
80
80
  c,
81
81
  x,
82
- d
82
+ J
83
83
  ]
84
84
  );
85
85
  return R(() => {
@@ -89,25 +89,17 @@ const S = L(null), W = ({ children: T, appId: s, userId: o }) => {
89
89
  journey_status: "COMPLETED"
90
90
  });
91
91
  }, [s, g, o]), R(() => {
92
- if (C) {
93
- const e = C.map((r) => r.journey_id);
92
+ if (f) {
93
+ const e = f.map((r) => r.journey_id);
94
94
  p(e);
95
95
  }
96
- }, [C]), /* @__PURE__ */ D(S.Provider, { value: U, children: [
97
- d && /* @__PURE__ */ w(
98
- G,
99
- {
100
- about: "journey-overlay",
101
- isJourneyBlurred: b,
102
- "data-testid": t.current,
103
- children: c.map((e, r) => /* @__PURE__ */ w(B, { coachmark: e }, `coachmark-${r}`))
104
- }
105
- ),
96
+ }, [f]), /* @__PURE__ */ O(z.Provider, { value: b, children: [
97
+ J && /* @__PURE__ */ w(M, { about: "journey-overlay", "data-testid": t.current, children: c.map((e, r) => /* @__PURE__ */ w(D, { coachmark: e }, `coachmark-${r}`)) }),
106
98
  T
107
99
  ] });
108
100
  };
109
101
  export {
110
- S as JourneyContext,
111
- W as JourneyProvider
102
+ z as JourneyContext,
103
+ H as JourneyProvider
112
104
  };
113
105
  //# sourceMappingURL=journey-context-provider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"journey-context-provider.js","sources":["../../../../src/features/journey/use-journey/journey-context-provider.tsx"],"sourcesContent":["/* eslint-disable no-console */\nimport type { TJourneyId } from '../journey-id/journey-id-types';\nimport type {\n ICoachmarkProps,\n IJourneyContext,\n IJourneyProviderProps,\n} from './journey-context-types';\nimport type { FC } from 'react';\n\nimport { createContext, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { Coachmark } from '../comps/coachmark/coachmark';\nimport { useGetUserJourney, usePostUserJourney } from '../user-journey-api/user-journey-api';\nimport * as S from './journey-styled';\n\nexport const JourneyContext = createContext<IJourneyContext | null>(null);\n\nexport const JourneyProvider: FC<IJourneyProviderProps> = ({ children, appId, userId }) => {\n const [isJourneyBlurred, setIsJourneyBlurred] = useState<boolean>(false);\n const [userCompletedJourneyIds, setUserCompletedJourneyIds] = useState<TJourneyId[] | null>(null);\n const [coachmarkList, setCoachmarkList] = useState<ICoachmarkProps[]>([]);\n const [isJourneyActive, setIsJourneyActive] = useState(false);\n const currentIndex = useRef(-1);\n const currentJourneyId = useRef<TJourneyId | undefined>();\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { post: postJourneyCompletion } = usePostUserJourney();\n const { data: userCompletedJourneys = null, get: getJourneyProgress } = useGetUserJourney();\n\n const setJourney = useCallback(\n (id: TJourneyId, coachmarks: ICoachmarkProps[]) => {\n if (coachmarkList.length > 0) {\n console.error(\n `setJourney: Other Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`,\n );\n\n return;\n }\n setIsJourneyActive(true);\n currentJourneyId.current = id;\n currentIndex.current = -1;\n setCoachmarkList([...coachmarks]);\n },\n [coachmarkList.length],\n );\n\n const clearJourney = useCallback(() => {\n // Clear all timers\n timerRefs.current.forEach(timer => {\n clearTimeout(timer);\n });\n timerRefs.current = [];\n currentJourneyId.current = undefined;\n currentIndex.current = -1;\n setCoachmarkList([]);\n setIsJourneyActive(false);\n }, []);\n\n const endJourney = useCallback(\n (journeyId: TJourneyId) => {\n clearJourney();\n setUserCompletedJourneyIds(prev => {\n if (prev && !prev.includes(journeyId)) {\n return [...prev, journeyId];\n }\n\n return prev;\n });\n // fire the API (doesn’t block the UI)\n postJourneyCompletion({\n app_id: appId,\n user_id: userId,\n journey_id: journeyId,\n journey_status: 'COMPLETED',\n });\n },\n [appId, clearJourney, postJourneyCompletion, userId],\n );\n\n const addCoachmark = useCallback((id: TJourneyId, coachmark: ICoachmarkProps) => {\n if (!currentJourneyId.current || id !== currentJourneyId.current) {\n console.error(\n currentJourneyId.current\n ? `A Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`\n : `addCoachmark was called before setJourney and Journey ID is undefined`,\n );\n\n return;\n }\n\n setCoachmarkList(prev => [...prev, coachmark]);\n }, []);\n\n const nextCoachmark = useCallback(\n (\n id: TJourneyId,\n keepPrevActive: boolean = false,\n delayInMs: number = 0,\n shouldBlurNextJourney: boolean = false,\n ) => {\n if (!currentJourneyId.current || id !== currentJourneyId.current) {\n console.error(\n currentJourneyId.current\n ? `nextCoachmark was called before setJourney`\n : `A Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`,\n );\n\n return;\n }\n\n setIsJourneyBlurred(shouldBlurNextJourney);\n\n if (delayInMs !== 0) {\n // If delay is not 0, we will hide all them coachmarks and reveal only after the delay\n setCoachmarkList(prevList => {\n return prevList.map((item: ICoachmarkProps) => {\n return { ...item, isActive: false };\n });\n });\n }\n\n const timer = setTimeout(() => {\n clearTimeout(timer);\n const currIndex = currentIndex.current + 1;\n\n setCoachmarkList(prevList => {\n // Finish onboarding\n if (currIndex >= prevList.length || prevList.length === 0) {\n clearJourney();\n\n return [];\n }\n\n currentIndex.current = currIndex;\n const updatedCoachmarkList = [...prevList];\n\n (updatedCoachmarkList[currIndex] as ICoachmarkProps).isActive = true;\n\n if (currIndex > 0) {\n (updatedCoachmarkList[currIndex - 1] as ICoachmarkProps).isActive = keepPrevActive;\n }\n\n return updatedCoachmarkList;\n });\n }, delayInMs);\n\n timerRefs.current.push(timer);\n },\n [clearJourney],\n );\n\n const memoizedContextValue: IJourneyContext = useMemo(\n () => ({\n nextCoachmark,\n setJourney,\n addCoachmark,\n clearJourney,\n endJourney,\n coachmarks: coachmarkList,\n userCompletedJourneyIds,\n isJourneyActive,\n }),\n [\n nextCoachmark,\n setJourney,\n addCoachmark,\n clearJourney,\n endJourney,\n coachmarkList,\n userCompletedJourneyIds,\n isJourneyActive,\n ],\n );\n\n // Get the initial state of incompleteJourneys\n useEffect(() => {\n if (appId && userId) {\n getJourneyProgress(userId, {\n app_id: appId,\n user_id: userId,\n journey_status: 'COMPLETED',\n });\n }\n }, [appId, getJourneyProgress, userId]);\n\n // Set the data to context state initially\n useEffect(() => {\n if (userCompletedJourneys) {\n const completedUserJourneysIds = userCompletedJourneys.map(journey => journey.journey_id);\n\n setUserCompletedJourneyIds(completedUserJourneysIds);\n }\n }, [userCompletedJourneys]);\n\n return (\n <JourneyContext.Provider value={memoizedContextValue}>\n {isJourneyActive && (\n <S.Overlay\n about=\"journey-overlay\"\n isJourneyBlurred={isJourneyBlurred}\n data-testid={currentJourneyId.current}\n >\n {coachmarkList.map((coachmark, index) => (\n <Coachmark key={`coachmark-${index}`} coachmark={coachmark} />\n ))}\n </S.Overlay>\n )}\n {children}\n </JourneyContext.Provider>\n );\n};\n"],"names":["JourneyContext","createContext","JourneyProvider","children","appId","userId","isJourneyBlurred","setIsJourneyBlurred","useState","userCompletedJourneyIds","setUserCompletedJourneyIds","coachmarkList","setCoachmarkList","isJourneyActive","setIsJourneyActive","currentIndex","useRef","currentJourneyId","timerRefs","postJourneyCompletion","usePostUserJourney","userCompletedJourneys","getJourneyProgress","useGetUserJourney","setJourney","useCallback","id","coachmarks","clearJourney","timer","endJourney","journeyId","prev","addCoachmark","coachmark","nextCoachmark","keepPrevActive","delayInMs","shouldBlurNextJourney","prevList","item","currIndex","updatedCoachmarkList","memoizedContextValue","useMemo","useEffect","completedUserJourneysIds","journey","jsxs","jsx","S.Overlay","index","Coachmark"],"mappings":";;;;;AAea,MAAAA,IAAiBC,EAAsC,IAAI,GAE3DC,IAA6C,CAAC,EAAE,UAAAC,GAAU,OAAAC,GAAO,QAAAC,QAAa;AACzF,QAAM,CAACC,GAAkBC,CAAmB,IAAIC,EAAkB,EAAK,GACjE,CAACC,GAAyBC,CAA0B,IAAIF,EAA8B,IAAI,GAC1F,CAACG,GAAeC,CAAgB,IAAIJ,EAA4B,CAAE,CAAA,GAClE,CAACK,GAAiBC,CAAkB,IAAIN,EAAS,EAAK,GACtDO,IAAeC,EAAO,EAAE,GACxBC,IAAmBD,KACnBE,IAAYF,EAAwC,CAAA,CAAE,GAEtD,EAAE,MAAMG,EAAsB,IAAIC,EAAmB,GACrD,EAAE,MAAMC,IAAwB,MAAM,KAAKC,EAAA,IAAuBC,KAElEC,IAAaC;AAAA,IACjB,CAACC,GAAgBC,MAAkC;AAC7C,UAAAhB,EAAc,SAAS,GAAG;AACpB,gBAAA;AAAA,UACN,iEAAiEM,EAAiB,OAAO,0BAA0BS,CAAE;AAAA,QAAA;AAGvH;AAAA,MACF;AACA,MAAAZ,EAAmB,EAAI,GACvBG,EAAiB,UAAUS,GAC3BX,EAAa,UAAU,IACNH,EAAA,CAAC,GAAGe,CAAU,CAAC;AAAA,IAClC;AAAA,IACA,CAAChB,EAAc,MAAM;AAAA,EAAA,GAGjBiB,IAAeH,EAAY,MAAM;AAE3B,IAAAP,EAAA,QAAQ,QAAQ,CAASW,MAAA;AACjC,mBAAaA,CAAK;AAAA,IAAA,CACnB,GACDX,EAAU,UAAU,IACpBD,EAAiB,UAAU,QAC3BF,EAAa,UAAU,IACvBH,EAAiB,CAAE,CAAA,GACnBE,EAAmB,EAAK;AAAA,EAC1B,GAA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EAAc,IAAI,CAACuB,GAAWiB,MAC5B,gBAAAF,EAAAG,GAAA,EAAqC,WAAAlB,EAAtB,GAAA,aAAaiB,CAAK,EAA0B,CAC7D;AAAA,MAAA;AAAA,IACH;AAAA,IAEDhD;AAAA,EACH,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"journey-context-provider.js","sources":["../../../../src/features/journey/use-journey/journey-context-provider.tsx"],"sourcesContent":["/* eslint-disable no-console */\nimport type { TJourneyId } from '../journey-id/journey-id-types';\nimport type {\n ICoachmarkProps,\n IJourneyContext,\n IJourneyProviderProps,\n} from './journey-context-types';\nimport type { FC } from 'react';\n\nimport { createContext, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { Coachmark } from '../comps/coachmark/coachmark';\nimport { useGetUserJourney, usePostUserJourney } from '../user-journey-api/user-journey-api';\nimport * as S from './journey-styled';\n\nexport const JourneyContext = createContext<IJourneyContext | null>(null);\n\nexport const JourneyProvider: FC<IJourneyProviderProps> = ({ children, appId, userId }) => {\n const [userCompletedJourneyIds, setUserCompletedJourneyIds] = useState<TJourneyId[] | null>(null);\n const [coachmarkList, setCoachmarkList] = useState<ICoachmarkProps[]>([]);\n const [isJourneyActive, setIsJourneyActive] = useState(false);\n const currentIndex = useRef(-1);\n const currentJourneyId = useRef<TJourneyId | undefined>();\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { post: postJourneyCompletion } = usePostUserJourney();\n const { data: userCompletedJourneys = null, get: getJourneyProgress } = useGetUserJourney();\n\n const setJourney = useCallback(\n (id: TJourneyId, coachmarks: ICoachmarkProps[]) => {\n if (coachmarkList.length > 0) {\n console.error(\n `setJourney: Other Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`,\n );\n\n return;\n }\n setIsJourneyActive(true);\n currentJourneyId.current = id;\n currentIndex.current = -1;\n setCoachmarkList([...coachmarks]);\n },\n [coachmarkList.length],\n );\n\n const clearJourney = useCallback(() => {\n // Clear all timers\n timerRefs.current.forEach(timer => {\n clearTimeout(timer);\n });\n timerRefs.current = [];\n currentJourneyId.current = undefined;\n currentIndex.current = -1;\n setCoachmarkList([]);\n setIsJourneyActive(false);\n }, []);\n\n const endJourney = useCallback(\n (journeyId: TJourneyId) => {\n clearJourney();\n setUserCompletedJourneyIds(prev => {\n if (prev && !prev.includes(journeyId)) {\n return [...prev, journeyId];\n }\n\n return prev;\n });\n // fire the API (doesn’t block the UI)\n postJourneyCompletion({\n app_id: appId,\n user_id: userId,\n journey_id: journeyId,\n journey_status: 'COMPLETED',\n });\n },\n [appId, clearJourney, postJourneyCompletion, userId],\n );\n\n const addCoachmark = useCallback((id: TJourneyId, coachmark: ICoachmarkProps) => {\n if (!currentJourneyId.current || id !== currentJourneyId.current) {\n console.error(\n currentJourneyId.current\n ? `A Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`\n : `addCoachmark was called before setJourney and Journey ID is undefined`,\n );\n\n return;\n }\n\n setCoachmarkList(prev => [...prev, coachmark]);\n }, []);\n\n const nextCoachmark = useCallback(\n (id: TJourneyId, keepPrevActive: boolean = false, delayInMs: number = 0) => {\n if (!currentJourneyId.current || id !== currentJourneyId.current) {\n console.error(\n currentJourneyId.current\n ? `nextCoachmark was called before setJourney`\n : `A Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`,\n );\n\n return;\n }\n\n if (delayInMs !== 0) {\n // If delay is not 0, we will hide all them coachmarks and reveal only after the delay\n setCoachmarkList(prevList => {\n return prevList.map((item: ICoachmarkProps) => {\n return { ...item, isActive: false };\n });\n });\n }\n\n const timer = setTimeout(() => {\n clearTimeout(timer);\n const currIndex = currentIndex.current + 1;\n\n setCoachmarkList(prevList => {\n // Finish onboarding\n if (currIndex >= prevList.length || prevList.length === 0) {\n clearJourney();\n\n return [];\n }\n\n currentIndex.current = currIndex;\n const updatedCoachmarkList = [...prevList];\n\n (updatedCoachmarkList[currIndex] as ICoachmarkProps).isActive = true;\n\n if (currIndex > 0) {\n (updatedCoachmarkList[currIndex - 1] as ICoachmarkProps).isActive = keepPrevActive;\n }\n\n return updatedCoachmarkList;\n });\n }, delayInMs);\n\n timerRefs.current.push(timer);\n },\n [clearJourney],\n );\n\n const memoizedContextValue: IJourneyContext = useMemo(\n () => ({\n nextCoachmark,\n setJourney,\n addCoachmark,\n clearJourney,\n endJourney,\n coachmarks: coachmarkList,\n userCompletedJourneyIds,\n isJourneyActive,\n }),\n [\n nextCoachmark,\n setJourney,\n addCoachmark,\n clearJourney,\n endJourney,\n coachmarkList,\n userCompletedJourneyIds,\n isJourneyActive,\n ],\n );\n\n // Get the initial state of incompleteJourneys\n useEffect(() => {\n if (appId && userId) {\n getJourneyProgress(userId, {\n app_id: appId,\n user_id: userId,\n journey_status: 'COMPLETED',\n });\n }\n }, [appId, getJourneyProgress, userId]);\n\n // Set the data to context state initially\n useEffect(() => {\n if (userCompletedJourneys) {\n const completedUserJourneysIds = userCompletedJourneys.map(journey => journey.journey_id);\n\n setUserCompletedJourneyIds(completedUserJourneysIds);\n }\n }, [userCompletedJourneys]);\n\n return (\n <JourneyContext.Provider value={memoizedContextValue}>\n {isJourneyActive && (\n <S.Overlay about=\"journey-overlay\" data-testid={currentJourneyId.current}>\n {coachmarkList.map((coachmark, index) => (\n <Coachmark key={`coachmark-${index}`} coachmark={coachmark} />\n ))}\n </S.Overlay>\n )}\n {children}\n </JourneyContext.Provider>\n );\n};\n"],"names":["JourneyContext","createContext","JourneyProvider","children","appId","userId","userCompletedJourneyIds","setUserCompletedJourneyIds","useState","coachmarkList","setCoachmarkList","isJourneyActive","setIsJourneyActive","currentIndex","useRef","currentJourneyId","timerRefs","postJourneyCompletion","usePostUserJourney","userCompletedJourneys","getJourneyProgress","useGetUserJourney","setJourney","useCallback","id","coachmarks","clearJourney","timer","endJourney","journeyId","prev","addCoachmark","coachmark","nextCoachmark","keepPrevActive","delayInMs","prevList","item","currIndex","updatedCoachmarkList","memoizedContextValue","useMemo","useEffect","completedUserJourneysI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,CAAS;AAEF,MAAAnB,EAAA,QAAQ,KAAKW,CAAK;AAAA,IAC9B;AAAA,IACA,CAACD,CAAY;AAAA,EAAA,GAGTc,IAAwCC;AAAA,IAC5C,OAAO;AAAA,MACL,eAAAR;AAAA,MACA,YAAAX;AAAA,MACA,cAAAS;AAAA,MACA,cAAAL;AAAA,MACA,YAAAE;AAAA,MACA,YAAYnB;AAAA,MACZ,yBAAAH;AAAA,MACA,iBAAAK;AAAA,IAAA;AAAA,IAEF;AAAA,MACEsB;AAAA,MACAX;AAAA,MACAS;AAAA,MACAL;AAAA,MACAE;AAAA,MACAnB;AAAA,MACAH;AAAA,MACAK;AAAA,IACF;AAAA,EAAA;AAIF,SAAA+B,EAAU,MAAM;AACd,IAAItC,KAASC,KACXe,EAAmBf,GAAQ;AAAA,MACzB,QAAQD;AAAA,MACR,SAASC;AAAA,MACT,gBAAgB;AAAA,IAAA,CACjB;AAAA,EAEF,GAAA,CAACD,GAAOgB,GAAoBf,CAAM,CAAC,GAGtCqC,EAAU,MAAM;AACd,QAAIvB,GAAuB;AACzB,YAAMwB,IAA2BxB,EAAsB,IAAI,CAAAyB,MAAWA,EAAQ,UAAU;AAExF,MAAArC,EAA2BoC,CAAwB;AAAA,IACrD;AAAA,EAAA,GACC,CAACxB,CAAqB,CAAC,GAGvB,gBAAA0B,EAAA7C,EAAe,UAAf,EAAwB,OAAOwC,GAC7B,UAAA;AAAA,IACC7B,KAAA,gBAAAmC,EAACC,GAAA,EAAU,OAAM,mBAAkB,eAAahC,EAAiB,SAC9D,UAAAN,EAAc,IAAI,CAACuB,GAAWgB,MAC5B,gBAAAF,EAAAG,GAAA,EAAqC,WAAAjB,KAAtB,aAAagB,CAAK,EAA0B,CAC7D,EACH,CAAA;AAAA,IAED7C;AAAA,EACH,EAAA,CAAA;AAEJ;"}
@@ -1,19 +1,14 @@
1
- import t, { css as i } from "styled-components";
2
- import { BLUR_OVERLAY_Z_INDEX as e } from "./constants.js";
3
- const b = t.div`
1
+ import o from "styled-components";
2
+ import { BLUR_OVERLAY_Z_INDEX as t } from "./constants.js";
3
+ const e = o.div`
4
4
  position: fixed;
5
5
  top: 0;
6
6
  right: 0;
7
7
  bottom: 0;
8
8
  left: 0;
9
- z-index: ${e};
10
- ${({ isJourneyBlurred: o, theme: r }) => o && i`
11
- background: ${r.colors.BLACK_T_38};
12
- backdrop-filter: blur(80px);
13
- -webkit-backdrop-filter: blur(80px);
14
- `}
9
+ z-index: ${t};
15
10
  `;
16
11
  export {
17
- b as Overlay
12
+ e as Overlay
18
13
  };
19
14
  //# sourceMappingURL=journey-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"journey-styled.js","sources":["../../../../src/features/journey/use-journey/journey-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { css } from 'styled-components';\n\nimport { BLUR_OVERLAY_Z_INDEX } from './constants';\n\nexport const Overlay = styled.div<{ isJourneyBlurred: boolean }>`\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: ${BLUR_OVERLAY_Z_INDEX};\n ${({ isJourneyBlurred, theme }) =>\n isJourneyBlurred &&\n css`\n background: ${theme.colors.BLACK_T_38};\n backdrop-filter: blur(80px);\n -webkit-backdrop-filter: blur(80px);\n `}\n`;\n``;\n"],"names":["Overlay","styled","BLUR_OVERLAY_Z_INDEX","isJourneyBlurred","theme","css"],"mappings":";;AAKO,MAAMA,IAAUC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAMjBC,CAAoB;AAAA,IAC7B,CAAC,EAAE,kBAAAC,GAAkB,OAAAC,EAAA,MACrBD,KACAE;AAAA,oBACgBD,EAAM,OAAO,UAAU;AAAA;AAAA;AAAA,KAGtC;AAAA;"}
1
+ {"version":3,"file":"journey-styled.js","sources":["../../../../src/features/journey/use-journey/journey-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { BLUR_OVERLAY_Z_INDEX } from './constants';\n\nexport const Overlay = styled.div`\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: ${BLUR_OVERLAY_Z_INDEX};\n`;\n"],"names":["Overlay","styled","BLUR_OVERLAY_Z_INDEX"],"mappings":";;AAIO,MAAMA,IAAUC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAMjBC,CAAoB;AAAA;"}
@@ -1,5 +1,5 @@
1
1
  import { createPostAPI as t } from "@cuemath/rest-api";
2
- import { BASE_URL_V3_2 as e } from "../../../../constants/api.js";
2
+ import { BASE_URL_V3_1 as e } from "../../../../constants/api.js";
3
3
  const { usePost: i } = t({
4
4
  getURL: (s, { studentId: o }) => `${e}/users/${o}/milestones/`
5
5
  });
@@ -1 +1 @@
1
- {"version":3,"file":"goal-submit.js","sources":["../../../../../src/features/milestone/create/api/goal-submit.ts"],"sourcesContent":["import type { TMilestonePayload } from '../milestone-create-types';\n\nimport { createPostAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3_2 } from '../../../../constants/api';\n\nconst { usePost: useGoalCreationPost } = createPostAPI<\n { id: string },\n TMilestonePayload,\n { studentId: string }\n>({\n getURL: (_, { studentId }) => `${BASE_URL_V3_2}/users/${studentId}/milestones/`,\n});\n\nexport { useGoalCreationPost };\n"],"names":["useGoalCreationPost","createPostAPI","_","studentId","BASE_URL_V3_2"],"mappings":";;AAMA,MAAM,EAAE,SAASA,EAAoB,IAAIC,EAIvC;AAAA,EACA,QAAQ,CAACC,GAAG,EAAE,WAAAC,EAAgB,MAAA,GAAGC,CAAa,UAAUD,CAAS;AACnE,CAAC;"}
1
+ {"version":3,"file":"goal-submit.js","sources":["../../../../../src/features/milestone/create/api/goal-submit.ts"],"sourcesContent":["import type { TMilestonePayload } from '../milestone-create-types';\n\nimport { createPostAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3_1 } from '../../../../constants/api';\n\nconst { usePost: useGoalCreationPost } = createPostAPI<\n { id: string },\n TMilestonePayload,\n { studentId: string }\n>({\n getURL: (_, { studentId }) => `${BASE_URL_V3_1}/users/${studentId}/milestones/`,\n});\n\nexport { useGoalCreationPost };\n"],"names":["useGoalCreationPost","createPostAPI","_","studentId","BASE_URL_V3_1"],"mappings":";;AAMA,MAAM,EAAE,SAASA,EAAoB,IAAIC,EAIvC;AAAA,EACA,QAAQ,CAACC,GAAG,EAAE,WAAAC,EAAgB,MAAA,GAAGC,CAAa,UAAUD,CAAS;AACnE,CAAC;"}