@cuemath/leap 3.4.8 → 3.4.9-akm-2

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 (209) hide show
  1. package/dist/assets/illustrations/illustrations.js +7 -0
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/lottie/lottie.js +3 -0
  4. package/dist/assets/lottie/lottie.js.map +1 -1
  5. package/dist/features/analytics-events/platform-events-student.js +1 -1
  6. package/dist/features/analytics-events/platform-events-student.js.map +1 -1
  7. package/dist/features/analytics-events/whitelist-events.js +1 -1
  8. package/dist/features/analytics-events/whitelist-events.js.map +1 -1
  9. package/dist/features/auth/comps/tabs/tab-tem/tab-item.js +31 -16
  10. package/dist/features/auth/comps/tabs/tab-tem/tab-item.js.map +1 -1
  11. package/dist/features/auth/comps/tabs/tabs.js +22 -5
  12. package/dist/features/auth/comps/tabs/tabs.js.map +1 -1
  13. package/dist/features/circle-games/{game-launcher → game-launcher-v2}/api/get-content-for-today/constants.js +1 -1
  14. package/dist/features/circle-games/game-launcher-v2/api/get-content-for-today/constants.js.map +1 -0
  15. package/dist/features/circle-games/game-launcher-v2/api/get-content-for-today/get-circle-home-api.js.map +1 -0
  16. package/dist/features/circle-games/game-launcher-v2/comps/card-container/card-container-styled.js.map +1 -0
  17. package/dist/features/circle-games/game-launcher-v2/comps/card-container/card-container.js.map +1 -0
  18. package/dist/features/circle-games/game-launcher-v2/comps/card-container/constants.js +11 -0
  19. package/dist/features/circle-games/game-launcher-v2/comps/card-container/constants.js.map +1 -0
  20. package/dist/features/circle-games/game-launcher-v2/comps/carousel/carousel-styled.js +121 -0
  21. package/dist/features/circle-games/game-launcher-v2/comps/carousel/carousel-styled.js.map +1 -0
  22. package/dist/features/circle-games/game-launcher-v2/comps/carousel/carousel.js +106 -0
  23. package/dist/features/circle-games/game-launcher-v2/comps/carousel/carousel.js.map +1 -0
  24. package/dist/features/circle-games/game-launcher-v2/comps/carousel/constants.js +9 -0
  25. package/dist/features/circle-games/game-launcher-v2/comps/carousel/constants.js.map +1 -0
  26. package/dist/features/circle-games/game-launcher-v2/comps/carousel-badge/carousel-badge-style.js +20 -0
  27. package/dist/features/circle-games/game-launcher-v2/comps/carousel-badge/carousel-badge-style.js.map +1 -0
  28. package/dist/features/circle-games/game-launcher-v2/comps/carousel-badge/carousel-badge.js +17 -0
  29. package/dist/features/circle-games/game-launcher-v2/comps/carousel-badge/carousel-badge.js.map +1 -0
  30. package/dist/features/circle-games/game-launcher-v2/comps/carousel-badge/carousel-single-badge.js +20 -0
  31. package/dist/features/circle-games/game-launcher-v2/comps/carousel-badge/carousel-single-badge.js.map +1 -0
  32. package/dist/features/circle-games/game-launcher-v2/comps/circular-game-card/circular-game-card-styled.js +66 -0
  33. package/dist/features/circle-games/game-launcher-v2/comps/circular-game-card/circular-game-card-styled.js.map +1 -0
  34. package/dist/features/circle-games/game-launcher-v2/comps/circular-game-card/circular-game-card.js +81 -0
  35. package/dist/features/circle-games/game-launcher-v2/comps/circular-game-card/circular-game-card.js.map +1 -0
  36. package/dist/features/circle-games/game-launcher-v2/comps/circular-game-card/constants.js +8 -0
  37. package/dist/features/circle-games/game-launcher-v2/comps/circular-game-card/constants.js.map +1 -0
  38. package/dist/features/circle-games/game-launcher-v2/comps/game-card-content/constants.js +6 -0
  39. package/dist/features/circle-games/game-launcher-v2/comps/game-card-content/constants.js.map +1 -0
  40. package/dist/features/circle-games/game-launcher-v2/comps/game-card-content/game-card-content-styled.js +57 -0
  41. package/dist/features/circle-games/game-launcher-v2/comps/game-card-content/game-card-content-styled.js.map +1 -0
  42. package/dist/features/circle-games/game-launcher-v2/comps/game-card-content/game-card-content.js +9 -0
  43. package/dist/features/circle-games/game-launcher-v2/comps/game-card-content/game-card-content.js.map +1 -0
  44. package/dist/features/circle-games/game-launcher-v2/comps/segmented-game-card/constants.js +7 -0
  45. package/dist/features/circle-games/game-launcher-v2/comps/segmented-game-card/constants.js.map +1 -0
  46. package/dist/features/circle-games/game-launcher-v2/comps/swipable-card/swipeable-card-styled.js +14 -0
  47. package/dist/features/circle-games/game-launcher-v2/comps/swipable-card/swipeable-card-styled.js.map +1 -0
  48. package/dist/features/circle-games/game-launcher-v2/comps/swipable-card/swipeable-card.js +24 -0
  49. package/dist/features/circle-games/game-launcher-v2/comps/swipable-card/swipeable-card.js.map +1 -0
  50. package/dist/features/circle-games/game-launcher-v2/comps/tables-card/constants.js.map +1 -0
  51. package/dist/features/circle-games/game-launcher-v2/comps/tables-card/infinite-button/infinite-mode-launcher-button.js.map +1 -0
  52. package/dist/features/circle-games/game-launcher-v2/comps/tables-card/spl-events-text/constants.js.map +1 -0
  53. package/dist/features/circle-games/game-launcher-v2/comps/tables-card/spl-events-text/spl-events-text-style.js.map +1 -0
  54. package/dist/features/circle-games/game-launcher-v2/comps/tables-card/spl-events-text/spl-events-text-types.js.map +1 -0
  55. package/dist/features/circle-games/game-launcher-v2/comps/tables-card/spl-events-text/spl-events-text.js.map +1 -0
  56. package/dist/features/circle-games/game-launcher-v2/comps/tables-card/table-mode/table-mode-styled.js.map +1 -0
  57. package/dist/features/circle-games/game-launcher-v2/comps/tables-card/table-mode/table-mode.js.map +1 -0
  58. package/dist/features/circle-games/game-launcher-v2/comps/tables-card/table-mode-star/constants.js.map +1 -0
  59. package/dist/features/circle-games/game-launcher-v2/comps/tables-card/table-mode-star/table-mode-star-styled.js.map +1 -0
  60. package/dist/features/circle-games/game-launcher-v2/comps/tables-card/table-mode-star/table-mode-star.js.map +1 -0
  61. package/dist/features/circle-games/game-launcher-v2/comps/tables-card/table-segment-star/table-segment-star-styled.js.map +1 -0
  62. package/dist/features/circle-games/game-launcher-v2/comps/tables-card/table-segment-star/table-segment-star.js.map +1 -0
  63. package/dist/features/circle-games/game-launcher-v2/comps/tables-card/tables-card-styled.js.map +1 -0
  64. package/dist/features/circle-games/game-launcher-v2/comps/tables-card/tables-card.js.map +1 -0
  65. package/dist/features/circle-games/game-launcher-v2/dal/use-get-circle-home-details-dal/helper.js +94 -0
  66. package/dist/features/circle-games/game-launcher-v2/dal/use-get-circle-home-details-dal/helper.js.map +1 -0
  67. package/dist/features/circle-games/game-launcher-v2/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js.map +1 -0
  68. package/dist/features/circle-games/game-launcher-v2/game-launcher-analytics-events.js +13 -0
  69. package/dist/features/circle-games/game-launcher-v2/game-launcher-analytics-events.js.map +1 -0
  70. package/dist/features/circle-games/game-launcher-v2/game-launcher-v2.js +321 -0
  71. package/dist/features/circle-games/game-launcher-v2/game-launcher-v2.js.map +1 -0
  72. package/dist/features/circle-games/game-launcher-v2/helpers.js +8 -0
  73. package/dist/features/circle-games/game-launcher-v2/helpers.js.map +1 -0
  74. package/dist/features/circle-games/game-launcher-v2/hooks/use-game-launcher-journey/constants.js +6 -0
  75. package/dist/features/circle-games/game-launcher-v2/hooks/use-game-launcher-journey/constants.js.map +1 -0
  76. package/dist/features/circle-games/game-launcher-v2/hooks/use-game-launcher-journey/use-game-launcher-journey.js +160 -0
  77. package/dist/features/circle-games/game-launcher-v2/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -0
  78. package/dist/features/circle-games/game-launcher-v2/hooks/use-table-infinite-launcher-journey/constants.js +5 -0
  79. package/dist/features/circle-games/game-launcher-v2/hooks/use-table-infinite-launcher-journey/constants.js.map +1 -0
  80. package/dist/features/circle-games/game-launcher-v2/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js +92 -0
  81. package/dist/features/circle-games/game-launcher-v2/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js.map +1 -0
  82. package/dist/features/circle-games/game-launcher-v2/hooks/use-table-launcher-journey/constants.js +10 -0
  83. package/dist/features/circle-games/game-launcher-v2/hooks/use-table-launcher-journey/constants.js.map +1 -0
  84. package/dist/features/circle-games/game-launcher-v2/hooks/use-table-launcher-journey/use-table-launcher-journey.js +159 -0
  85. package/dist/features/circle-games/game-launcher-v2/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +1 -0
  86. package/dist/features/circle-games/games/tutorial/tutorial-styled.js +13 -10
  87. package/dist/features/circle-games/games/tutorial/tutorial-styled.js.map +1 -1
  88. package/dist/features/circle-games/games/tutorial/tutorial.js +53 -65
  89. package/dist/features/circle-games/games/tutorial/tutorial.js.map +1 -1
  90. package/dist/features/journey/journey-id/journey-id-student.js +1 -1
  91. package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
  92. package/dist/features/journey/use-journey/constants.js +7 -5
  93. package/dist/features/journey/use-journey/constants.js.map +1 -1
  94. package/dist/features/journey/use-journey/journey-context-provider.js +84 -72
  95. package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
  96. package/dist/features/post-game-stats/accuracy/accuracy-styled.js +2 -2
  97. package/dist/features/post-game-stats/accuracy/accuracy-styled.js.map +1 -1
  98. package/dist/features/post-game-stats/clock/clock-styled.js +2 -2
  99. package/dist/features/post-game-stats/clock/clock-styled.js.map +1 -1
  100. package/dist/features/post-game-stats/digital-meter/constants.js +1 -1
  101. package/dist/features/post-game-stats/digital-meter/constants.js.map +1 -1
  102. package/dist/features/post-game-stats/digital-meter/digital-meter-styled.js +1 -1
  103. package/dist/features/post-game-stats/digital-meter/digital-meter-styled.js.map +1 -1
  104. package/dist/features/post-game-stats/digital-meter/digital-meter.js +1 -1
  105. package/dist/features/post-game-stats/digital-meter/digital-meter.js.map +1 -1
  106. package/dist/features/post-game-stats/points/points.js +5 -4
  107. package/dist/features/post-game-stats/points/points.js.map +1 -1
  108. package/dist/features/post-game-stats/post-game-stats-styled.js +9 -8
  109. package/dist/features/post-game-stats/post-game-stats-styled.js.map +1 -1
  110. package/dist/features/post-game-stats/post-game-stats.js +107 -105
  111. package/dist/features/post-game-stats/post-game-stats.js.map +1 -1
  112. package/dist/features/post-game-stats/score/score-styled.js +2 -2
  113. package/dist/features/post-game-stats/score/score-styled.js.map +1 -1
  114. package/dist/features/post-game-stats/streak/constants.js +1 -1
  115. package/dist/features/post-game-stats/streak/constants.js.map +1 -1
  116. package/dist/features/post-game-stats/streak/streak-styled.js +2 -2
  117. package/dist/features/post-game-stats/streak/streak-styled.js.map +1 -1
  118. package/dist/features/ui/nudge/nudge.js +14 -13
  119. package/dist/features/ui/nudge/nudge.js.map +1 -1
  120. package/dist/index.d.ts +69 -7
  121. package/dist/index.js +5 -5
  122. package/dist/static/accuracy-badge.2e161f00.svg +1 -0
  123. package/dist/static/clock-badge.0adb4ba6.svg +1 -0
  124. package/dist/static/daily-work-out-complete.eaffdd2b.json +1 -0
  125. package/dist/static/down-arrow-badge.f462f615.svg +1 -0
  126. package/dist/static/green-tick.43b94c3a.svg +1 -0
  127. package/dist/static/nudge-swipe.3b97c01a.json +1 -0
  128. package/dist/static/pill-tick.c06f606d.json +1 -0
  129. package/dist/static/points-badge.96bdecc9.svg +1 -0
  130. package/dist/static/star-badge.5450c267.svg +1 -0
  131. package/dist/static/up-arrow-badge.71fe7ad1.svg +1 -0
  132. package/package.json +1 -1
  133. package/dist/assets/line-icons/icons/carat-left.js +0 -26
  134. package/dist/assets/line-icons/icons/carat-left.js.map +0 -1
  135. package/dist/assets/line-icons/icons/carat-right.js +0 -26
  136. package/dist/assets/line-icons/icons/carat-right.js.map +0 -1
  137. package/dist/features/circle-games/game-launcher/api/get-content-for-today/constants.js.map +0 -1
  138. package/dist/features/circle-games/game-launcher/api/get-content-for-today/get-circle-home-api.js.map +0 -1
  139. package/dist/features/circle-games/game-launcher/comps/card-container/card-container-styled.js.map +0 -1
  140. package/dist/features/circle-games/game-launcher/comps/card-container/card-container.js.map +0 -1
  141. package/dist/features/circle-games/game-launcher/comps/card-container/constants.js +0 -7
  142. package/dist/features/circle-games/game-launcher/comps/card-container/constants.js.map +0 -1
  143. package/dist/features/circle-games/game-launcher/comps/carousel/carousel-styled.js +0 -39
  144. package/dist/features/circle-games/game-launcher/comps/carousel/carousel-styled.js.map +0 -1
  145. package/dist/features/circle-games/game-launcher/comps/carousel/carousel.js +0 -85
  146. package/dist/features/circle-games/game-launcher/comps/carousel/carousel.js.map +0 -1
  147. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/constants.js +0 -12
  148. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/constants.js.map +0 -1
  149. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card-styled.js +0 -138
  150. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card-styled.js.map +0 -1
  151. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js +0 -105
  152. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js.map +0 -1
  153. package/dist/features/circle-games/game-launcher/comps/tables-card/constants.js.map +0 -1
  154. package/dist/features/circle-games/game-launcher/comps/tables-card/infinite-button/infinite-mode-launcher-button.js.map +0 -1
  155. package/dist/features/circle-games/game-launcher/comps/tables-card/spl-events-text/constants.js.map +0 -1
  156. package/dist/features/circle-games/game-launcher/comps/tables-card/spl-events-text/spl-events-text-style.js.map +0 -1
  157. package/dist/features/circle-games/game-launcher/comps/tables-card/spl-events-text/spl-events-text-types.js.map +0 -1
  158. package/dist/features/circle-games/game-launcher/comps/tables-card/spl-events-text/spl-events-text.js.map +0 -1
  159. package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode-styled.js.map +0 -1
  160. package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode.js.map +0 -1
  161. package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode-star/constants.js.map +0 -1
  162. package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode-star/table-mode-star-styled.js.map +0 -1
  163. package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode-star/table-mode-star.js.map +0 -1
  164. package/dist/features/circle-games/game-launcher/comps/tables-card/table-segment-star/table-segment-star-styled.js.map +0 -1
  165. package/dist/features/circle-games/game-launcher/comps/tables-card/table-segment-star/table-segment-star.js.map +0 -1
  166. package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js.map +0 -1
  167. package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js.map +0 -1
  168. package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/helper.js +0 -73
  169. package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/helper.js.map +0 -1
  170. package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js.map +0 -1
  171. package/dist/features/circle-games/game-launcher/game-launcher-analytics-events.js +0 -12
  172. package/dist/features/circle-games/game-launcher/game-launcher-analytics-events.js.map +0 -1
  173. package/dist/features/circle-games/game-launcher/game-launcher.js +0 -219
  174. package/dist/features/circle-games/game-launcher/game-launcher.js.map +0 -1
  175. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/constants.js +0 -8
  176. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/constants.js.map +0 -1
  177. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +0 -286
  178. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +0 -1
  179. package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/constants.js +0 -10
  180. package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/constants.js.map +0 -1
  181. package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey-styled.js +0 -13
  182. package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey-styled.js.map +0 -1
  183. package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js +0 -137
  184. package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js.map +0 -1
  185. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/constants.js +0 -14
  186. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/constants.js.map +0 -1
  187. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey-styled.js +0 -13
  188. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey-styled.js.map +0 -1
  189. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js +0 -230
  190. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +0 -1
  191. /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/api/get-content-for-today/get-circle-home-api.js +0 -0
  192. /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/card-container/card-container-styled.js +0 -0
  193. /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/card-container/card-container.js +0 -0
  194. /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/constants.js +0 -0
  195. /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/infinite-button/infinite-mode-launcher-button.js +0 -0
  196. /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/spl-events-text/constants.js +0 -0
  197. /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/spl-events-text/spl-events-text-style.js +0 -0
  198. /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/spl-events-text/spl-events-text-types.js +0 -0
  199. /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/spl-events-text/spl-events-text.js +0 -0
  200. /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/table-mode/table-mode-styled.js +0 -0
  201. /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/table-mode/table-mode.js +0 -0
  202. /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/table-mode-star/constants.js +0 -0
  203. /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/table-mode-star/table-mode-star-styled.js +0 -0
  204. /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/table-mode-star/table-mode-star.js +0 -0
  205. /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/table-segment-star/table-segment-star-styled.js +0 -0
  206. /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/table-segment-star/table-segment-star.js +0 -0
  207. /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/tables-card-styled.js +0 -0
  208. /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/comps/tables-card/tables-card.js +0 -0
  209. /package/dist/features/circle-games/{game-launcher → game-launcher-v2}/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js +0 -0
@@ -1,37 +1,39 @@
1
- import i from "styled-components";
1
+ import o from "styled-components";
2
2
  import { HEADER_HEIGHT as t } from "./constants.js";
3
- const n = i.div`
3
+ const n = o.div`
4
4
  display: flex;
5
5
  flex-direction: column;
6
6
  height: 100%;
7
7
  min-height: 250px;
8
- background: ${({ theme: o }) => o.colors.BLACK_1};
8
+ background: ${({ theme: i }) => i.colors.BLACK_1};
9
9
  position: relative;
10
10
  width: inherit;
11
- `, a = i.div`
11
+ `, p = o.div`
12
+ padding: 30px 10px 10px 10px;
13
+ `, a = o.div`
12
14
  height: ${t}px;
13
15
  padding-top: ${(window.ReactNativeTopInset || 0) + 24}px;
14
16
  width: 100%;
15
- background: ${({ theme: o }) => o.colors.WHITE_T_03};
17
+ background: ${({ theme: i }) => i.colors.WHITE_T_03};
16
18
  backdrop-filter: blur(40px);
17
19
  position: relative;
18
20
  flex-shrink: 0;
19
- `, d = i.div`
21
+ `, d = o.div`
20
22
  position: absolute;
21
23
  right: 16px;
22
24
  top: ${(window.ReactNativeTopInset || 0) + 22}px;
23
25
  z-index: 1;
24
26
  &:hover {
25
- background: ${({ theme: o }) => o.colors.BLACK_4};
27
+ background: ${({ theme: i }) => i.colors.BLACK_4};
26
28
  cursor: pointer;
27
29
  }
28
- `, l = i.div`
30
+ `, l = o.div`
29
31
  display: flex;
30
32
  flex-direction: column;
31
33
  /* overflow: hidden; */
32
34
  flex-grow: 1;
33
35
  position: relative;
34
- `, p = i.div`
36
+ `, s = o.div`
35
37
  display: flex;
36
38
  justify-content: center;
37
39
  align-items: center;
@@ -50,6 +52,7 @@ export {
50
52
  a as GameTutorialHeader,
51
53
  n as GameTutorialWrapper,
52
54
  d as HeaderIconContainer,
53
- p as VideoContainer
55
+ p as TextWrapper,
56
+ s as VideoContainer
54
57
  };
55
58
  //# sourceMappingURL=tutorial-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tutorial-styled.js","sources":["../../../../../src/features/circle-games/games/tutorial/tutorial-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { HEADER_HEIGHT } from './constants';\n\nexport const GameTutorialWrapper = styled.div`\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 250px;\n background: ${({ theme }) => theme.colors.BLACK_1};\n position: relative;\n width: inherit;\n`;\n\nexport const GameTutorialHeader = styled.div`\n height: ${HEADER_HEIGHT}px;\n padding-top: ${(window.ReactNativeTopInset || 0) + 24}px;\n width: 100%;\n background: ${({ theme }) => theme.colors.WHITE_T_03};\n backdrop-filter: blur(40px);\n position: relative;\n flex-shrink: 0;\n`;\n\nexport const HeaderIconContainer = styled.div`\n position: absolute;\n right: 16px;\n top: ${(window.ReactNativeTopInset || 0) + 22}px;\n z-index: 1;\n &:hover {\n background: ${({ theme }) => theme.colors.BLACK_4};\n cursor: pointer;\n }\n`;\n\nexport const GameTutorialContainer = styled.div`\n display: flex;\n flex-direction: column;\n /* overflow: hidden; */\n flex-grow: 1;\n position: relative;\n`;\n\nexport const VideoContainer = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n & video {\n height: 100%;\n width: auto;\n }\n`;\n"],"names":["GameTutorialWrapper","styled","theme","GameTutorialHeader","HEADER_HEIGHT","HeaderIconContainer","GameTutorialContainer","VideoContainer"],"mappings":";;AAIO,MAAMA,IAAsBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,gBAK1B,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA,GAKtCC,IAAqBF,EAAO;AAAA,YAC7BG,CAAa;AAAA,kBACP,OAAO,uBAAuB,KAAK,EAAE;AAAA;AAAA,gBAEvC,CAAC,EAAE,OAAAF,EAAA,MAAYA,EAAM,OAAO,UAAU;AAAA;AAAA;AAAA;AAAA,GAMzCG,IAAsBJ,EAAO;AAAA;AAAA;AAAA,UAGhC,OAAO,uBAAuB,KAAK,EAAE;AAAA;AAAA;AAAA,kBAG7B,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA,GAKxCI,IAAwBL,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQ/BM,IAAiBN,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
1
+ {"version":3,"file":"tutorial-styled.js","sources":["../../../../../src/features/circle-games/games/tutorial/tutorial-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { HEADER_HEIGHT } from './constants';\n\nexport const GameTutorialWrapper = styled.div`\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 250px;\n background: ${({ theme }) => theme.colors.BLACK_1};\n position: relative;\n width: inherit;\n`;\n\nexport const TextWrapper = styled.div`\n padding: 30px 10px 10px 10px;\n`;\n\nexport const GameTutorialHeader = styled.div`\n height: ${HEADER_HEIGHT}px;\n padding-top: ${(window.ReactNativeTopInset || 0) + 24}px;\n width: 100%;\n background: ${({ theme }) => theme.colors.WHITE_T_03};\n backdrop-filter: blur(40px);\n position: relative;\n flex-shrink: 0;\n`;\n\nexport const HeaderIconContainer = styled.div`\n position: absolute;\n right: 16px;\n top: ${(window.ReactNativeTopInset || 0) + 22}px;\n z-index: 1;\n &:hover {\n background: ${({ theme }) => theme.colors.BLACK_4};\n cursor: pointer;\n }\n`;\n\nexport const GameTutorialContainer = styled.div`\n display: flex;\n flex-direction: column;\n /* overflow: hidden; */\n flex-grow: 1;\n position: relative;\n`;\n\nexport const VideoContainer = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n & video {\n height: 100%;\n width: auto;\n }\n`;\n"],"names":["GameTutorialWrapper","styled","theme","TextWrapper","GameTutorialHeader","HEADER_HEIGHT","HeaderIconContainer","GameTutorialContainer","VideoContainer"],"mappings":";;AAIO,MAAMA,IAAsBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,gBAK1B,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA,GAKtCC,IAAcF,EAAO;AAAA;AAAA,GAIrBG,IAAqBH,EAAO;AAAA,YAC7BI,CAAa;AAAA,kBACP,OAAO,uBAAuB,KAAK,EAAE;AAAA;AAAA,gBAEvC,CAAC,EAAE,OAAAH,EAAA,MAAYA,EAAM,OAAO,UAAU;AAAA;AAAA;AAAA;AAAA,GAMzCI,IAAsBL,EAAO;AAAA;AAAA;AAAA,UAGhC,OAAO,uBAAuB,KAAK,EAAE;AAAA;AAAA;AAAA,kBAG7B,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA,GAKxCK,IAAwBN,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQ/BO,IAAiBP,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
@@ -1,70 +1,58 @@
1
1
  import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
- import { useRef as m, useState as i, useCallback as f } from "react";
3
- import C from "../../../../assets/line-icons/icons/cross.js";
2
+ import { forwardRef as P, useRef as m, useState as n, useImperativeHandle as y, useCallback as f } from "react";
3
+ import A from "../../../../assets/line-icons/icons/cross.js";
4
4
  import p from "../../../ui/text/text.js";
5
- import { InfoBar as E } from "../../comps/info-bar/info-bar.js";
6
- import { GameTutorialWrapper as H, GameTutorialHeader as A, HeaderIconContainer as G, GameTutorialContainer as R, VideoContainer as U } from "./tutorial-styled.js";
7
- import { VideoProgressBar as j } from "./video-progress-bar/video-progress-bar.js";
8
- const M = ({
9
- src: h,
10
- title: t,
11
- onCross: n,
12
- showProgress: g = !0,
13
- onTutorialPlayedOnce: o,
14
- isJourneyActive: b
15
- }) => {
16
- const e = m(null), s = m(!1), [I, d] = i(0), [W, $] = i(0), [T, v] = i(null), P = f(
17
- (c) => {
18
- const x = c.target.currentTime || 0, a = c.target.duration || 1, u = x / a * 100;
19
- u >= 90 && !s.current && (s.current = !0, o == null || o()), d(u), $(a);
20
- },
21
- [o]
22
- ), V = f(() => {
23
- e.current && v(e.current.clientWidth);
24
- }, []);
25
- return /* @__PURE__ */ l(H, { children: [
26
- (t || n) && /* @__PURE__ */ l(A, { children: [
27
- t && /* @__PURE__ */ r(p, { $renderAs: "ac3", $color: "WHITE", $align: "center", children: t }),
28
- n && /* @__PURE__ */ r(G, { children: /* @__PURE__ */ r(C, { color: "#fff", onClick: n }) })
29
- ] }),
30
- b && /* @__PURE__ */ r(E, { hue: "PURPLE", children: /* @__PURE__ */ r(
31
- p,
32
- {
33
- $renderOnMobileAs: "ab3-bold",
34
- $renderAs: "ab2-bold",
35
- $color: "WHITE_T_87",
36
- $align: "center",
37
- children: "Understanding the rules is always helpful before you begin."
38
- }
39
- ) }),
40
- /* @__PURE__ */ r(R, { children: /* @__PURE__ */ r(U, { children: /* @__PURE__ */ r(
41
- "video",
42
- {
43
- ref: e,
44
- onPlay: V,
45
- loop: !0,
46
- autoPlay: !0,
47
- muted: !0,
48
- src: h,
49
- onTimeUpdate: P,
50
- disablePictureInPicture: !0,
51
- itemType: "video/mp4",
52
- playsInline: !0
53
- }
54
- ) }) }),
55
- g && e && /* @__PURE__ */ r(
56
- j,
57
- {
58
- ref: e,
59
- progress: I,
60
- duration: W,
61
- setProgress: d,
62
- videoWidth: T || 0
63
- }
64
- )
65
- ] });
66
- };
5
+ import { GameTutorialWrapper as E, GameTutorialHeader as G, HeaderIconContainer as R, GameTutorialContainer as j, VideoContainer as k, TextWrapper as w } from "./tutorial-styled.js";
6
+ import { VideoProgressBar as _ } from "./video-progress-bar/video-progress-bar.js";
7
+ const B = P(
8
+ ({ src: h, title: o, onCross: i, showProgress: g = !0, onTutorialPlayedOnce: t, isJourneyActive: T }, W) => {
9
+ const e = m(null), a = m(!1), [I, c] = n(0), [$, b] = n(0), [v, V] = n(null);
10
+ y(W, () => e.current, []);
11
+ const x = f(
12
+ (s) => {
13
+ const C = s.target.currentTime || 0, d = s.target.duration || 1, u = C / d * 100;
14
+ u >= 90 && !a.current && (a.current = !0, t == null || t()), c(u), b(d);
15
+ },
16
+ [t]
17
+ ), H = f(() => {
18
+ e.current && V(e.current.clientWidth);
19
+ }, []);
20
+ return /* @__PURE__ */ l(E, { children: [
21
+ (o || i) && /* @__PURE__ */ l(G, { children: [
22
+ o && /* @__PURE__ */ r(p, { $renderAs: "ac3", $color: "WHITE", $align: "center", children: o }),
23
+ i && /* @__PURE__ */ r(R, { children: /* @__PURE__ */ r(A, { color: "#fff", onClick: i }) })
24
+ ] }),
25
+ /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(k, { children: /* @__PURE__ */ r(
26
+ "video",
27
+ {
28
+ ref: e,
29
+ onPlay: H,
30
+ loop: !0,
31
+ autoPlay: !0,
32
+ muted: !0,
33
+ src: h,
34
+ onTimeUpdate: x,
35
+ disablePictureInPicture: !0,
36
+ itemType: "video/mp4",
37
+ playsInline: !0
38
+ }
39
+ ) }) }),
40
+ g && /* @__PURE__ */ r(
41
+ _,
42
+ {
43
+ ref: e,
44
+ progress: I,
45
+ duration: $,
46
+ setProgress: c,
47
+ videoWidth: v || 0
48
+ }
49
+ ),
50
+ T && /* @__PURE__ */ r(w, { children: /* @__PURE__ */ r(p, { $renderOnMobileAs: "ub3", $renderAs: "ub2", $color: "WHITE_T_87", $align: "center", children: "Please watch the tutorial for each activity before you start." }) })
51
+ ] });
52
+ }
53
+ );
54
+ B.displayName = "Tutorial";
67
55
  export {
68
- M as Tutorial
56
+ B as Tutorial
69
57
  };
70
58
  //# sourceMappingURL=tutorial.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tutorial.js","sources":["../../../../../src/features/circle-games/games/tutorial/tutorial.tsx"],"sourcesContent":["import type { ChangeEvent } from 'react';\nimport { useCallback, useRef, useState } from 'react';\n\nimport CrossIcon from '../../../../assets/line-icons/icons/cross';\nimport Text from '../../../ui/text/text';\nimport { InfoBar } from '../../comps/info-bar/info-bar';\nimport * as Styled from './tutorial-styled';\nimport type { ITutorialProps } from './tutorial-types';\nimport { VideoProgressBar } from './video-progress-bar/video-progress-bar';\n\nexport const Tutorial = ({\n src,\n title,\n onCross,\n showProgress = true,\n onTutorialPlayedOnce,\n isJourneyActive,\n}: ITutorialProps) => {\n const videoRef = useRef<HTMLVideoElement | null>(null);\n const hasVideoEnded = useRef(false);\n const [progress, setProgress] = useState(0);\n const [duration, setDuration] = useState(0);\n const [videoWidth, setVideoWidth] = useState<number | null>(null);\n\n const onProgress = useCallback(\n (e: ChangeEvent<HTMLVideoElement>) => {\n const current = e.target.currentTime || 0;\n const dur = e.target.duration || 1;\n const p = (current / dur) * 100;\n\n if (p >= 90 && !hasVideoEnded.current) {\n hasVideoEnded.current = true;\n onTutorialPlayedOnce?.();\n }\n\n setProgress(p);\n setDuration(dur);\n },\n [onTutorialPlayedOnce],\n );\n\n const onVideoPlay = useCallback(() => {\n if (videoRef.current) {\n setVideoWidth(videoRef.current.clientWidth);\n }\n }, []);\n\n return (\n <Styled.GameTutorialWrapper>\n {(title || onCross) && (\n <Styled.GameTutorialHeader>\n {title && (\n <Text $renderAs=\"ac3\" $color=\"WHITE\" $align=\"center\">\n {title}\n </Text>\n )}\n {onCross && (\n <Styled.HeaderIconContainer>\n <CrossIcon color=\"#fff\" onClick={onCross} />\n </Styled.HeaderIconContainer>\n )}\n </Styled.GameTutorialHeader>\n )}\n\n {isJourneyActive && (\n <InfoBar hue=\"PURPLE\">\n <Text\n $renderOnMobileAs=\"ab3-bold\"\n $renderAs=\"ab2-bold\"\n $color=\"WHITE_T_87\"\n $align=\"center\"\n >\n Understanding the rules is always helpful before you begin.\n </Text>\n </InfoBar>\n )}\n\n <Styled.GameTutorialContainer>\n <Styled.VideoContainer>\n <video\n ref={videoRef}\n onPlay={onVideoPlay}\n loop={true}\n autoPlay={true}\n muted={true}\n src={src}\n onTimeUpdate={onProgress}\n disablePictureInPicture={true}\n itemType=\"video/mp4\"\n playsInline\n />\n </Styled.VideoContainer>\n </Styled.GameTutorialContainer>\n\n {showProgress && videoRef && (\n <VideoProgressBar\n ref={videoRef}\n progress={progress}\n duration={duration}\n setProgress={setProgress}\n videoWidth={videoWidth || 0}\n />\n )}\n </Styled.GameTutorialWrapper>\n );\n};\n"],"names":["Tutorial","src","title","onCross","showProgress","onTutorialPlayedOnce","isJourneyActive","videoRef","useRef","hasVideoEnded","progress","setProgress","useState","duration","setDuration","videoWidth","setVideoWidth","onProgress","useCallback","e","current","dur","p","onVideoPlay","jsxs","Styled.GameTutorialWrapper","Styled.GameTutorialHeader","jsx","Text","Styled.HeaderIconContainer","CrossIcon","InfoBar","Styled.GameTutorialContainer","Styled.VideoContainer","VideoProgressBar"],"mappings":";;;;;;;AAUO,MAAMA,IAAW,CAAC;AAAA,EACvB,KAAAC;AAAA,EACA,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,sBAAAC;AAAA,EACA,iBAAAC;AACF,MAAsB;AACd,QAAAC,IAAWC,EAAgC,IAAI,GAC/CC,IAAgBD,EAAO,EAAK,GAC5B,CAACE,GAAUC,CAAW,IAAIC,EAAS,CAAC,GACpC,CAACC,GAAUC,CAAW,IAAIF,EAAS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,KAAAtB;AAAA,QACA,cAAcgB;AAAA,QACd,yBAAyB;AAAA,QACzB,UAAS;AAAA,QACT,aAAW;AAAA,MAAA;AAAA,OAEf,EACF,CAAA;AAAA,IAECb,KAAgBG,KACf,gBAAAoB;AAAA,MAACO;AAAA,MAAA;AAAA,QACC,KAAK3B;AAAA,QACL,UAAAG;AAAA,QACA,UAAAG;AAAA,QACA,aAAAF;AAAA,QACA,YAAYI,KAAc;AAAA,MAAA;AAAA,IAC5B;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"tutorial.js","sources":["../../../../../src/features/circle-games/games/tutorial/tutorial.tsx"],"sourcesContent":["import type { ChangeEvent, ForwardedRef } from 'react';\nimport { forwardRef, useCallback, useRef, useState, useImperativeHandle } from 'react';\n\nimport CrossIcon from '../../../../assets/line-icons/icons/cross';\nimport Text from '../../../ui/text/text';\nimport * as Styled from './tutorial-styled';\nimport type { ITutorialProps } from './tutorial-types';\nimport { VideoProgressBar } from './video-progress-bar/video-progress-bar';\n\nexport const Tutorial = forwardRef<HTMLVideoElement, ITutorialProps>(\n (\n { src, title, onCross, showProgress = true, onTutorialPlayedOnce, isJourneyActive },\n ref: ForwardedRef<HTMLVideoElement>,\n ) => {\n const internalVideoRef = useRef<HTMLVideoElement | null>(null);\n const hasVideoEnded = useRef(false);\n const [progress, setProgress] = useState(0);\n const [duration, setDuration] = useState(0);\n const [videoWidth, setVideoWidth] = useState<number | null>(null);\n\n // Forward the internal ref to the outside\n useImperativeHandle(ref, () => internalVideoRef.current as HTMLVideoElement, []);\n\n const onProgress = useCallback(\n (e: ChangeEvent<HTMLVideoElement>) => {\n const current = e.target.currentTime || 0;\n const dur = e.target.duration || 1;\n const p = (current / dur) * 100;\n\n if (p >= 90 && !hasVideoEnded.current) {\n hasVideoEnded.current = true;\n onTutorialPlayedOnce?.();\n }\n\n setProgress(p);\n setDuration(dur);\n },\n [onTutorialPlayedOnce],\n );\n\n const onVideoPlay = useCallback(() => {\n if (internalVideoRef.current) {\n setVideoWidth(internalVideoRef.current.clientWidth);\n }\n }, []);\n\n return (\n <Styled.GameTutorialWrapper>\n {(title || onCross) && (\n <Styled.GameTutorialHeader>\n {title && (\n <Text $renderAs=\"ac3\" $color=\"WHITE\" $align=\"center\">\n {title}\n </Text>\n )}\n {onCross && (\n <Styled.HeaderIconContainer>\n <CrossIcon color=\"#fff\" onClick={onCross} />\n </Styled.HeaderIconContainer>\n )}\n </Styled.GameTutorialHeader>\n )}\n\n <Styled.GameTutorialContainer>\n <Styled.VideoContainer>\n <video\n ref={internalVideoRef}\n onPlay={onVideoPlay}\n loop\n autoPlay\n muted\n src={src}\n onTimeUpdate={onProgress}\n disablePictureInPicture\n itemType=\"video/mp4\"\n playsInline\n />\n </Styled.VideoContainer>\n </Styled.GameTutorialContainer>\n {showProgress && (\n <VideoProgressBar\n ref={internalVideoRef}\n progress={progress}\n duration={duration}\n setProgress={setProgress}\n videoWidth={videoWidth || 0}\n />\n )}\n\n {isJourneyActive && (\n <Styled.TextWrapper>\n <Text $renderOnMobileAs=\"ub3\" $renderAs=\"ub2\" $color=\"WHITE_T_87\" $align=\"center\">\n Please watch the tutorial for each activity before you start.\n </Text>\n </Styled.TextWrapper>\n )}\n </Styled.GameTutorialWrapper>\n );\n },\n);\n\nTutorial.displayName = 'Tutorial';\n"],"names":["Tutorial","forwardRef","src","title","onCross","showProgress","onTutorialPlayedOnce","isJourneyActive","ref","internalVideoRef","useRef","hasVideoEnded","progress","setProgress","useState","duration","setDuration","videoWidth","setVideoWidth","useImperativeHandle","onProgress","useCallback","e","current","dur","p","onVideoPlay","jsxs","Styled.GameTutorialWrapper","Styled.GameTutorialHeader","jsx","Text","Styled.HeaderIconContainer","CrossIcon","Styled.GameTutorialContainer","Styled.VideoContainer","VideoProgressBar","Styled.TextWrapper"],"mappings":";;;;;;AASO,MAAMA,IAAWC;AAAA,EACtB,CACE,EAAE,KAAAC,GAAK,OAAAC,GAAO,SAAAC,GAAS,cAAAC,I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AA,UACR,MAAI;AAAA,UACJ,UAAQ;AAAA,UACR,OAAK;AAAA,UACL,KAAAxB;AAAA,UACA,cAAckB;AAAA,UACd,yBAAuB;AAAA,UACvB,UAAS;AAAA,UACT,aAAW;AAAA,QAAA;AAAA,SAEf,EACF,CAAA;AAAA,MACCf,KACC,gBAAAyB;AAAA,QAACM;AAAA,QAAA;AAAA,UACC,KAAK3B;AAAA,UACL,UAAAG;AAAA,UACA,UAAAG;AAAA,UACA,aAAAF;AAAA,UACA,YAAYI,KAAc;AAAA,QAAA;AAAA,MAC5B;AAAA,MAGDV,KACE,gBAAAuB,EAAAO,GAAA,EACC,4BAACN,GAAK,EAAA,mBAAkB,OAAM,WAAU,OAAM,QAAO,cAAa,QAAO,UAAS,0EAElF,CAAA,GACF;AAAA,IAEJ,EAAA,CAAA;AAAA,EAEJ;AACF;AAEA/B,EAAS,cAAc;"}
@@ -1,4 +1,4 @@
1
- var R = /* @__PURE__ */ ((E) => (E.CIRCLE_ACTIVITIES_INTRO_JOURNEY = "CIRCLE_ACTIVITIES_INTRO_JOURNEY", E.CIRCLE_LEADERBOARD_INTRO_JOURNEY = "CIRCLE_LEADERBOARD_INTRO_JOURNEY", E.CIRCLE_POINTS_REWARD_JOURNEY = "CIRCLE_POINTS_REWARD_JOURNEY", E.CIRCLE_STREAK_UPDATE_JOURNEY = "CIRCLE_STREAK_UPDATE_JOURNEY", E.CIRCLE_TUTORIAL_JOURNEY = "CIRCLE_TUTORIAL_JOURNEY", E.CIRCLE_TABLES_INTRO_JOURNEY = "CIRCLE_TABLES_INTRO_JOURNEY", E.CIRCLE_TABLES_INFINTE_JOURNEY = "CIRCLE_TABLES_INFINITE_JOURNEY", E.CIRCLE_LESSONS_K_1_INTRO_JOURNEY = "CIRCLE_LESSONS_K_1_INTRO_JOURNEY", E.PLA_SWITCH_USER_JOURNEY = "PLA_SWITCH_USER_JOURNEY", E.HOMEPAGE_JOURNEY = "HOMEPAGE_JOURNEY", E.CHAPTER_PAGE_JOURNEY = "CHAPTER_PAGE_JOURNEY", E.PUZZLE_ATTEMPT_JOURNEY = "PUZZLE_ATTEMPT_JOURNEY", E.CHALLENGE_ARENA_JOURNEY = "CHALLENGE_ARENA_JOURNEY", E.DOWNLOAD_NODE_JOURNEY = "DOWNLOAD_NODE_JOURNEY", E.DOWNLOAD_BLOCK_JOURNEY = "DOWNLOAD_BLOCK_JOURNEY", E.PUZZLE_ASSIGNED_JOURNEY = "PUZZLE_ASSIGNED_JOURNEY", E.PUZZLE_DASHBOARD_JOURNEY = "PUZZLE_DASHBOARD_JOURNEY", E))(R || {});
1
+ var R = /* @__PURE__ */ ((E) => (E.CIRCLE_ACTIVITIES_INTRO_JOURNEY = "CIRCLE_ACTIVITIES_INTRO_JOURNEY", E.CIRCLE_ACTIVITIES_INTRO_JOURNEY_V2 = "CIRCLE_ACTIVITIES_INTRO_JOURNEY_V2", E.CIRCLE_LEADERBOARD_INTRO_JOURNEY = "CIRCLE_LEADERBOARD_INTRO_JOURNEY", E.CIRCLE_POINTS_REWARD_JOURNEY = "CIRCLE_POINTS_REWARD_JOURNEY", E.CIRCLE_STREAK_UPDATE_JOURNEY = "CIRCLE_STREAK_UPDATE_JOURNEY", E.CIRCLE_TUTORIAL_JOURNEY = "CIRCLE_TUTORIAL_JOURNEY", E.CIRCLE_TABLES_INTRO_JOURNEY = "CIRCLE_TABLES_INTRO_JOURNEY", E.CIRCLE_TABLES_INFINTE_JOURNEY = "CIRCLE_TABLES_INFINITE_JOURNEY", E.CIRCLE_LESSONS_K_1_INTRO_JOURNEY = "CIRCLE_LESSONS_K_1_INTRO_JOURNEY", E.CIRCLE_LESSONS_K_1_INTRO_JOURNEY_V2 = "CIRCLE_LESSONS_K_1_INTRO_JOURNEY_V2", E.PLA_SWITCH_USER_JOURNEY = "PLA_SWITCH_USER_JOURNEY", E.HOMEPAGE_JOURNEY = "HOMEPAGE_JOURNEY", E.CHAPTER_PAGE_JOURNEY = "CHAPTER_PAGE_JOURNEY", E.PUZZLE_ATTEMPT_JOURNEY = "PUZZLE_ATTEMPT_JOURNEY", E.CHALLENGE_ARENA_JOURNEY = "CHALLENGE_ARENA_JOURNEY", E.DOWNLOAD_NODE_JOURNEY = "DOWNLOAD_NODE_JOURNEY", E.DOWNLOAD_BLOCK_JOURNEY = "DOWNLOAD_BLOCK_JOURNEY", E.PUZZLE_ASSIGNED_JOURNEY = "PUZZLE_ASSIGNED_JOURNEY", E.PUZZLE_DASHBOARD_JOURNEY = "PUZZLE_DASHBOARD_JOURNEY", E))(R || {});
2
2
  export {
3
3
  R 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 CIRCLE_TABLES_INFINTE_JOURNEY = 'CIRCLE_TABLES_INFINITE_JOURNEY',\n CIRCLE_LESSONS_K_1_INTRO_JOURNEY = 'CIRCLE_LESSONS_K_1_INTRO_JOURNEY',\n PLA_SWITCH_USER_JOURNEY = 'PLA_SWITCH_USER_JOURNEY',\n\n // TODO: Deprecate bottom journeys, they are not actually journeys\n HOMEPAGE_JOURNEY = 'HOMEPAGE_JOURNEY',\n CHAPTER_PAGE_JOURNEY = 'CHAPTER_PAGE_JOURNEY',\n PUZZLE_ATTEMPT_JOURNEY = 'PUZZLE_ATTEMPT_JOURNEY',\n CHALLENGE_ARENA_JOURNEY = 'CHALLENGE_ARENA_JOURNEY',\n DOWNLOAD_NODE_JOURNEY = 'DOWNLOAD_NODE_JOURNEY',\n DOWNLOAD_BLOCK_JOURNEY = 'DOWNLOAD_BLOCK_JOURNEY',\n PUZZLE_ASSIGNED_JOURNEY = 'PUZZLE_ASSIGNED_JOURNEY',\n PUZZLE_DASHBOARD_JOURNEY = 'PUZZLE_DASHBOARD_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,+BAC9BA,EAAA,gCAAgC,kCAChCA,EAAA,mCAAmC,oCACnCA,EAAA,0BAA0B,2BAG1BA,EAAA,mBAAmB,oBACnBA,EAAA,uBAAuB,wBACvBA,EAAA,yBAAyB,0BACzBA,EAAA,0BAA0B,2BAC1BA,EAAA,wBAAwB,yBACxBA,EAAA,yBAAyB,0BACzBA,EAAA,0BAA0B,2BAC1BA,EAAA,2BAA2B,4BAnBjBA,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_ACTIVITIES_INTRO_JOURNEY_V2 = 'CIRCLE_ACTIVITIES_INTRO_JOURNEY_V2',\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 CIRCLE_TABLES_INFINTE_JOURNEY = 'CIRCLE_TABLES_INFINITE_JOURNEY',\n CIRCLE_LESSONS_K_1_INTRO_JOURNEY = 'CIRCLE_LESSONS_K_1_INTRO_JOURNEY',\n CIRCLE_LESSONS_K_1_INTRO_JOURNEY_V2 = 'CIRCLE_LESSONS_K_1_INTRO_JOURNEY_V2',\n PLA_SWITCH_USER_JOURNEY = 'PLA_SWITCH_USER_JOURNEY',\n\n // TODO: Deprecate bottom journeys, they are not actually journeys\n HOMEPAGE_JOURNEY = 'HOMEPAGE_JOURNEY',\n CHAPTER_PAGE_JOURNEY = 'CHAPTER_PAGE_JOURNEY',\n PUZZLE_ATTEMPT_JOURNEY = 'PUZZLE_ATTEMPT_JOURNEY',\n CHALLENGE_ARENA_JOURNEY = 'CHALLENGE_ARENA_JOURNEY',\n DOWNLOAD_NODE_JOURNEY = 'DOWNLOAD_NODE_JOURNEY',\n DOWNLOAD_BLOCK_JOURNEY = 'DOWNLOAD_BLOCK_JOURNEY',\n PUZZLE_ASSIGNED_JOURNEY = 'PUZZLE_ASSIGNED_JOURNEY',\n PUZZLE_DASHBOARD_JOURNEY = 'PUZZLE_DASHBOARD_JOURNEY',\n}\n"],"names":["JOURNEY_ID_STUDENT"],"mappings":"AAAY,IAAAA,sBAAAA,OACVA,EAAA,kCAAkC,mCAClCA,EAAA,qCAAqC,sCACrCA,EAAA,mCAAmC,oCACnCA,EAAA,+BAA+B,gCAC/BA,EAAA,+BAA+B,gCAC/BA,EAAA,0BAA0B,2BAC1BA,EAAA,8BAA8B,+BAC9BA,EAAA,gCAAgC,kCAChCA,EAAA,mCAAmC,oCACnCA,EAAA,sCAAsC,uCACtCA,EAAA,0BAA0B,2BAG1BA,EAAA,mBAAmB,oBACnBA,EAAA,uBAAuB,wBACvBA,EAAA,yBAAyB,0BACzBA,EAAA,0BAA0B,2BAC1BA,EAAA,wBAAwB,yBACxBA,EAAA,yBAAyB,0BACzBA,EAAA,0BAA0B,2BAC1BA,EAAA,2BAA2B,4BArBjBA,IAAAA,KAAA,CAAA,CAAA;"}
@@ -1,5 +1,5 @@
1
- var o = /* @__PURE__ */ ((e) => (e.TOOLTIP = "tooltip", e.NUDGE = "nudge", e))(o || {});
2
- const r = {
1
+ var r = /* @__PURE__ */ ((e) => (e.TOOLTIP = "tooltip", e.NUDGE = "nudge", e))(r || {});
2
+ const o = {
3
3
  nextCoachmark: () => {
4
4
  },
5
5
  setJourney: () => {
@@ -12,10 +12,12 @@ const r = {
12
12
  },
13
13
  coachmarks: [],
14
14
  userCompletedJourneyIds: [],
15
- isJourneyActive: !1
15
+ isJourneyActive: !1,
16
+ trackView: () => {
17
+ }
16
18
  };
17
19
  export {
18
- o as IndicatorType,
19
- r as baseJourneyContext
20
+ r as IndicatorType,
21
+ o as baseJourneyContext
20
22
  };
21
23
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../../src/features/journey/use-journey/constants.ts"],"sourcesContent":["import type { IJourneyContext } from './journey-context-types';\n\nexport enum IndicatorType {\n TOOLTIP = 'tooltip',\n NUDGE = 'nudge',\n}\n\nexport const baseJourneyContext: IJourneyContext = {\n nextCoachmark: () => {},\n setJourney: () => {},\n addCoachmark: () => {},\n clearJourney: () => {},\n endJourney: () => {},\n coachmarks: [],\n userCompletedJourneyIds: [],\n isJourneyActive: false,\n};\n"],"names":["IndicatorType","baseJourneyContext"],"mappings":"AAEY,IAAAA,sBAAAA,OACVA,EAAA,UAAU,WACVA,EAAA,QAAQ,SAFEA,IAAAA,KAAA,CAAA,CAAA;AAKL,MAAMC,IAAsC;AAAA,EACjD,eAAe,MAAM;AAAA,EAAC;AAAA,EACtB,YAAY,MAAM;AAAA,EAAC;AAAA,EACnB,cAAc,MAAM;AAAA,EAAC;AAAA,EACrB,cAAc,MAAM;AAAA,EAAC;AAAA,EACrB,YAAY,MAAM;AAAA,EAAC;AAAA,EACnB,YAAY,CAAC;AAAA,EACb,yBAAyB,CAAC;AAAA,EAC1B,iBAAiB;AACnB;"}
1
+ {"version":3,"file":"constants.js","sources":["../../../../src/features/journey/use-journey/constants.ts"],"sourcesContent":["import type { IJourneyContext } from './journey-context-types';\n\nexport enum IndicatorType {\n TOOLTIP = 'tooltip',\n NUDGE = 'nudge',\n}\n\nexport const baseJourneyContext: IJourneyContext = {\n nextCoachmark: () => {},\n setJourney: () => {},\n addCoachmark: () => {},\n clearJourney: () => {},\n endJourney: () => {},\n coachmarks: [],\n userCompletedJourneyIds: [],\n isJourneyActive: false,\n trackView: () => {},\n};\n"],"names":["IndicatorType","baseJourneyContext"],"mappings":"AAEY,IAAAA,sBAAAA,OACVA,EAAA,UAAU,WACVA,EAAA,QAAQ,SAFEA,IAAAA,KAAA,CAAA,CAAA;AAKL,MAAMC,IAAsC;AAAA,EACjD,eAAe,MAAM;AAAA,EAAC;AAAA,EACtB,YAAY,MAAM;AAAA,EAAC;AAAA,EACnB,cAAc,MAAM;AAAA,EAAC;AAAA,EACrB,cAAc,MAAM;AAAA,EAAC;AAAA,EACrB,YAAY,MAAM;AAAA,EAAC;AAAA,EACnB,YAAY,CAAC;AAAA,EACb,yBAAyB,CAAC;AAAA,EAC1B,iBAAiB;AAAA,EACjB,WAAW,MAAM;AAAA,EAAC;AACpB;"}
@@ -1,55 +1,60 @@
1
- import { jsxs as R, jsx as j } from "react/jsx-runtime";
2
- import { createContext as W, useState as s, useRef as k, useCallback as h, useMemo as M, useEffect as O } from "react";
3
- import { Coachmark as V } from "../comps/coachmark/coachmark.js";
4
- import { usePostUserJourney as G, useGetUserJourney as F } from "../user-journey-api/user-journey-api.js";
5
- import { Overlay as I } from "./journey-styled.js";
6
- const K = W(null), re = ({ children: T, appId: a, userId: c }) => {
7
- const [b, U] = s(!0), [q, z] = s(!1), [v, p] = s(null), [l, y] = s([]), [J, x] = s(!1), m = k(-1), t = k(void 0), f = k([]), [D, H] = s(!1), [A, L] = s({
1
+ import { jsxs as W, jsx as T } from "react/jsx-runtime";
2
+ import { createContext as M, useState as s, useRef as v, useCallback as c, useMemo as G, useEffect as b } from "react";
3
+ import { Coachmark as F } from "../comps/coachmark/coachmark.js";
4
+ import { usePostUserJourney as I, useGetUserJourney as K } from "../user-journey-api/user-journey-api.js";
5
+ import { Overlay as Q } from "./journey-styled.js";
6
+ const X = M(null), ne = ({ children: U, appId: l, userId: i }) => {
7
+ const [q, z] = s(!0), [D, H] = s(!1), [p, x] = s(null), [y, d] = s([]), [f, A] = s(!1), m = v(-1), t = v(void 0), w = v([]), [L, N] = s(!1), [$, R] = s({
8
8
  height: window.innerHeight,
9
9
  width: window.innerWidth
10
- }), { post: $ } = G(), { data: w = null, get: _ } = F(), B = h(
10
+ }), { post: _ } = I(), { data: g = null, get: P } = K(), J = c(
11
+ (e) => {
12
+ _({
13
+ app_id: l,
14
+ user_id: i,
15
+ journey_id: e,
16
+ journey_status: "COMPLETED"
17
+ });
18
+ },
19
+ [l, _, i]
20
+ ), B = c(
11
21
  (e, r, o, C = !0) => {
12
- var d, n;
13
- if (l.length > 0) {
22
+ var h, n;
23
+ if (y.length > 0) {
14
24
  console.error(
15
25
  `setJourney: Other Journey is already active, Current Journey: ${t.current}, New Journey Request: ${e}`
16
26
  );
17
27
  return;
18
28
  }
19
- x(!0), U(C), t.current = e, m.current = -1, y(
29
+ A(!0), z(C), t.current = e, m.current = -1, d(
20
30
  r.map((u) => ({
21
31
  ...u,
22
32
  isActive: !1
23
33
  // New coachmarks are inactive by default
24
34
  }))
25
- ), o && (L({
26
- height: ((d = o.current) == null ? void 0 : d.clientHeight) || window.innerHeight,
35
+ ), o && (R({
36
+ height: ((h = o.current) == null ? void 0 : h.clientHeight) || window.innerHeight,
27
37
  width: ((n = o.current) == null ? void 0 : n.clientWidth) || window.innerWidth
28
- }), H(!0));
38
+ }), N(!0));
29
39
  },
30
- [l.length]
31
- ), i = h(() => {
32
- f.current.forEach((e) => {
40
+ [y.length]
41
+ ), a = c(() => {
42
+ w.current.forEach((e) => {
33
43
  clearTimeout(e);
34
- }), f.current = [], t.current = void 0, m.current = -1, y([]), x(!1);
35
- }, []), E = h(
44
+ }), w.current = [], t.current = void 0, m.current = -1, d([]), A(!1);
45
+ }, []), E = c(
36
46
  (e) => {
37
- i(), p((r) => r && !r.includes(e) ? [...r, e] : r), $({
38
- app_id: a,
39
- user_id: c,
40
- journey_id: e,
41
- journey_status: "COMPLETED"
42
- });
47
+ a(), x((r) => r && !r.includes(e) ? [...r, e] : r), J(e);
43
48
  },
44
- [a, i, $, c]
45
- ), P = h((e, r) => {
49
+ [a, J]
50
+ ), S = c((e, r) => {
46
51
  if (!t.current || e !== t.current) {
47
52
  console.error(
48
53
  t.current ? `A Journey is already active, Current Journey: ${t.current}, New Journey Request: ${e}` : "addCoachmark was called before setJourney and Journey ID is undefined"
49
54
  );
50
55
  return;
51
56
  }
52
- y((o) => [
57
+ d((o) => [
53
58
  ...o,
54
59
  {
55
60
  ...r,
@@ -57,7 +62,7 @@ const K = W(null), re = ({ children: T, appId: a, userId: c }) => {
57
62
  // New coachmarks are inactive by default
58
63
  }
59
64
  ]);
60
- }, []), S = h(
65
+ }, []), j = c(
61
66
  (e, r = !1, o = 0, C = !1) => {
62
67
  if (!t.current || e !== t.current) {
63
68
  console.error(
@@ -65,79 +70,86 @@ const K = W(null), re = ({ children: T, appId: a, userId: c }) => {
65
70
  );
66
71
  return;
67
72
  }
68
- z(C), o !== 0 && y((n) => n.map((u) => ({ ...u, isActive: !1 })));
69
- const d = setTimeout(() => {
70
- clearTimeout(d);
73
+ H(C), o !== 0 && d((n) => n.map((u) => ({ ...u, isActive: !1 })));
74
+ const h = setTimeout(() => {
75
+ clearTimeout(h);
71
76
  const n = m.current + 1;
72
- y((u) => {
77
+ d((u) => {
73
78
  if (n >= u.length || u.length === 0)
74
- return i(), [];
79
+ return a(), [];
75
80
  m.current = n;
76
- const g = [...u];
77
- return g[n].isActive = !0, n > 0 && (g[n - 1].isActive = r), g;
81
+ const k = [...u];
82
+ return k[n].isActive = !0, n > 0 && (k[n - 1].isActive = r), k;
78
83
  });
79
84
  }, o);
80
- f.current.push(d);
85
+ w.current.push(h);
86
+ },
87
+ [a]
88
+ ), O = c(
89
+ (e) => {
90
+ J(e);
81
91
  },
82
- [i]
83
- ), N = M(
92
+ [J]
93
+ ), V = G(
84
94
  () => ({
85
- nextCoachmark: S,
95
+ nextCoachmark: j,
86
96
  setJourney: B,
87
- addCoachmark: P,
88
- clearJourney: i,
97
+ addCoachmark: S,
98
+ clearJourney: a,
89
99
  endJourney: E,
90
- coachmarks: l,
91
- userCompletedJourneyIds: v,
92
- isJourneyActive: J
100
+ coachmarks: y,
101
+ userCompletedJourneyIds: p,
102
+ isJourneyActive: f,
103
+ trackView: O
93
104
  }),
94
105
  [
95
- S,
106
+ j,
96
107
  B,
97
- P,
98
- i,
108
+ S,
109
+ a,
99
110
  E,
100
- l,
101
- v,
102
- J
111
+ y,
112
+ p,
113
+ f,
114
+ O
103
115
  ]
104
116
  );
105
- return O(() => {
106
- a && c && _(c, {
107
- app_id: a,
108
- user_id: c,
117
+ return b(() => {
118
+ l && i && P(i, {
119
+ app_id: l,
120
+ user_id: i,
109
121
  journey_status: "COMPLETED"
110
122
  });
111
- }, [a, _, c]), O(() => {
112
- if (w) {
113
- const e = w.map((r) => r.journey_id);
114
- p(e);
123
+ }, [l, P, i]), b(() => {
124
+ if (g) {
125
+ const e = g.map((r) => r.journey_id);
126
+ x(e);
115
127
  }
116
- }, [w]), /* @__PURE__ */ R(K.Provider, { value: N, children: [
117
- J && /* @__PURE__ */ j(
118
- I,
128
+ }, [g]), /* @__PURE__ */ W(X.Provider, { value: V, children: [
129
+ f && /* @__PURE__ */ T(
130
+ Q,
119
131
  {
120
132
  about: "journey-overlay",
121
- height: A.height,
122
- width: A.width,
123
- $isJourneyBlurred: q,
124
- $isBlockingJourney: b,
133
+ height: $.height,
134
+ width: $.width,
135
+ $isJourneyBlurred: D,
136
+ $isBlockingJourney: q,
125
137
  "data-testid": t.current,
126
- children: l.map((e, r) => /* @__PURE__ */ j(
127
- V,
138
+ children: y.map((e, r) => /* @__PURE__ */ T(
139
+ F,
128
140
  {
129
141
  coachmark: e,
130
- isInsideScrollView: D
142
+ isInsideScrollView: L
131
143
  },
132
144
  `coachmark-${r}`
133
145
  ))
134
146
  }
135
147
  ),
136
- T
148
+ U
137
149
  ] });
138
150
  };
139
151
  export {
140
- K as JourneyContext,
141
- re as JourneyProvider
152
+ X as JourneyContext,
153
+ ne as JourneyProvider
142
154
  };
143
155
  //# 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 { FC, RefObject } from 'react';\nimport { createContext, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { Coachmark } from '../comps/coachmark/coachmark';\nimport type { TJourneyId } from '../journey-id/journey-id-types';\nimport { useGetUserJourney, usePostUserJourney } from '../user-journey-api/user-journey-api';\nimport type {\n ICoachmarkProps,\n IJourneyContext,\n IJourneyProviderProps,\n TCoachmarkJourneyProps,\n} from './journey-context-types';\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 [isBlockingJourney, setIsBlockingJourney] = useState<boolean>(true);\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>(undefined);\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const [isScrollableJourney, setIsScrollableJourney] = useState<boolean>(false);\n const [overlaySize, setOverlaySize] = useState({\n height: window.innerHeight,\n width: window.innerWidth,\n });\n\n const { post: postJourneyCompletion } = usePostUserJourney();\n const { data: userCompletedJourneys = null, get: getJourneyProgress } = useGetUserJourney();\n\n const setJourney = useCallback(\n (\n id: TJourneyId,\n coachmarks: TCoachmarkJourneyProps[],\n scrollableContRef?: RefObject<HTMLDivElement | null>,\n isBlocking: boolean = true,\n ) => {\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 setIsBlockingJourney(isBlocking);\n currentJourneyId.current = id;\n currentIndex.current = -1;\n setCoachmarkList(\n coachmarks.map((item: TCoachmarkJourneyProps) => {\n return {\n ...item,\n isActive: false, // New coachmarks are inactive by default\n } as ICoachmarkProps;\n }),\n );\n if (scrollableContRef) {\n setOverlaySize({\n height: scrollableContRef.current?.clientHeight || window.innerHeight,\n width: scrollableContRef.current?.clientWidth || window.innerWidth,\n });\n setIsScrollableJourney(true);\n }\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: TCoachmarkJourneyProps) => {\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 => [\n ...prev,\n {\n ...coachmark,\n isActive: false, // New coachmarks are inactive by default\n } as ICoachmarkProps,\n ]);\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: TCoachmarkJourneyProps) => {\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 height={overlaySize.height}\n width={overlaySize.width}\n $isJourneyBlurred={isJourneyBlurred}\n $isBlockingJourney={isBlockingJourney}\n data-testid={currentJourneyId.current}\n >\n {coachmarkList.map((coachmark, index) => (\n <Coachmark\n key={`coachmark-${index}`}\n coachmark={coachmark}\n isInsideScrollView={isScrollableJourney}\n />\n ))}\n </S.Overlay>\n )}\n {children}\n </JourneyContext.Provider>\n );\n};\n"],"names":["JourneyContext","createContext","JourneyProvider","children","appId","userId","isBlockingJourney","setIsBlockingJourney","useState","isJourneyBlurred","setIsJourneyBlurred","userCompletedJourneyIds","setUserCompletedJourneyIds","coachmarkList","setCoachmarkList","isJourneyActive","setIsJourneyActive","currentIndex","useRef","currentJourneyId","timerRefs","isScrollableJourney","setIsScrollableJourney","overlaySize","setOverlaySize","postJourneyCompletion","usePostUserJourney","userCompletedJourneys","getJourneyProgress","useGetUserJourney","setJourney","useCallback","id","coachmarks","scrollableContRef","isBlocking","item","_a","_b","clearJourney","timer","endJourney","journeyId","prev","addCoachmark","coachmark","nextCoachmark","keepPrevActive","delayInMs","shouldBlurNextJourney","prevList","currIndex","updatedCoachmarkList","memoizedContextValue","useMemo","useEffect","completedUserJourneysIds","journey","jsxs","jsx","S.Overl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AA,IAAA,CACjB;AAAA,EAEF,GAAA,CAACD,GAAOwB,GAAoBvB,CAAM,CAAC,GAGtCkD,EAAU,MAAM;AACd,QAAI5B,GAAuB;AACzB,YAAM6B,IAA2B7B,EAAsB,IAAI,CAAA8B,MAAWA,EAAQ,UAAU;AAExF,MAAA7C,EAA2B4C,CAAwB;AAAA,IACrD;AAAA,EAAA,GACC,CAAC7B,CAAqB,CAAC,GAGvB,gBAAA+B,EAAA1D,EAAe,UAAf,EAAwB,OAAOqD,GAC7B,UAAA;AAAA,IACCtC,KAAA,gBAAA4C;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,QAAQrC,EAAY;AAAA,QACpB,OAAOA,EAAY;AAAA,QACnB,mBAAmBd;AAAA,QACnB,oBAAoBH;AAAA,QACpB,eAAaa,EAAiB;AAAA,QAE7B,UAAcN,EAAA,IAAI,CAACgC,GAAWgB,MAC7B,gBAAAF;AAAA,UAACG;AAAA,UAAA;AAAA,YAEC,WAAAjB;AAAA,YACA,oBAAoBxB;AAAA,UAAA;AAAA,UAFf,aAAawC,CAAK;AAAA,QAAA,CAI1B;AAAA,MAAA;AAAA,IACH;AAAA,IAED1D;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 { FC, RefObject } from 'react';\nimport { createContext, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { Coachmark } from '../comps/coachmark/coachmark';\nimport type { TJourneyId } from '../journey-id/journey-id-types';\nimport type { TTrackingId } from '../tracking-id/tracking-id-types';\nimport { useGetUserJourney, usePostUserJourney } from '../user-journey-api/user-journey-api';\nimport type {\n ICoachmarkProps,\n IJourneyContext,\n IJourneyProviderProps,\n TCoachmarkJourneyProps,\n} from './journey-context-types';\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 [isBlockingJourney, setIsBlockingJourney] = useState<boolean>(true);\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>(undefined);\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const [isScrollableJourney, setIsScrollableJourney] = useState<boolean>(false);\n const [overlaySize, setOverlaySize] = useState({\n height: window.innerHeight,\n width: window.innerWidth,\n });\n\n const { post: postJourneyCompletion } = usePostUserJourney();\n const { data: userCompletedJourneys = null, get: getJourneyProgress } = useGetUserJourney();\n\n const saveProgress = useCallback(\n (journeyId: TJourneyId | TTrackingId) => {\n postJourneyCompletion({\n app_id: appId,\n user_id: userId,\n journey_id: journeyId,\n journey_status: 'COMPLETED',\n });\n },\n [appId, postJourneyCompletion, userId],\n );\n\n const setJourney = useCallback(\n (\n id: TJourneyId,\n coachmarks: TCoachmarkJourneyProps[],\n scrollableContRef?: RefObject<HTMLDivElement | null>,\n isBlocking: boolean = true,\n ) => {\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 setIsBlockingJourney(isBlocking);\n currentJourneyId.current = id;\n currentIndex.current = -1;\n setCoachmarkList(\n coachmarks.map((item: TCoachmarkJourneyProps) => {\n return {\n ...item,\n isActive: false, // New coachmarks are inactive by default\n } as ICoachmarkProps;\n }),\n );\n if (scrollableContRef) {\n setOverlaySize({\n height: scrollableContRef.current?.clientHeight || window.innerHeight,\n width: scrollableContRef.current?.clientWidth || window.innerWidth,\n });\n setIsScrollableJourney(true);\n }\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 saveProgress(journeyId);\n },\n [clearJourney, saveProgress],\n );\n\n const addCoachmark = useCallback((id: TJourneyId, coachmark: TCoachmarkJourneyProps) => {\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 => [\n ...prev,\n {\n ...coachmark,\n isActive: false, // New coachmarks are inactive by default\n } as ICoachmarkProps,\n ]);\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: TCoachmarkJourneyProps) => {\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 trackView = useCallback(\n (viewId: TTrackingId) => {\n saveProgress(viewId);\n },\n [saveProgress],\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 trackView,\n }),\n [\n nextCoachmark,\n setJourney,\n addCoachmark,\n clearJourney,\n endJourney,\n coachmarkList,\n userCompletedJourneyIds,\n isJourneyActive,\n trackView,\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 height={overlaySize.height}\n width={overlaySize.width}\n $isJourneyBlurred={isJourneyBlurred}\n $isBlockingJourney={isBlockingJourney}\n data-testid={currentJourneyId.current}\n >\n {coachmarkList.map((coachmark, index) => (\n <Coachmark\n key={`coachmark-${index}`}\n coachmark={coachmark}\n isInsideScrollView={isScrollableJourney}\n />\n ))}\n </S.Overlay>\n )}\n {children}\n </JourneyContext.Provider>\n );\n};\n"],"names":["JourneyContext","createContext","JourneyProvider","children","appId","userId","isBlockingJourney","setIsBlockingJourney","useState","isJourneyBlurred","setIsJourneyBlurred","userCompletedJourneyIds","setUserCompletedJourneyIds","coachmarkList","setCoachmarkList","isJourneyActive","setIsJourneyActive","currentIndex","useRef","currentJourneyId","timerRefs","isScrollableJourney","setIsScrollableJourney","overlaySize","setOverlaySize","postJourneyCompletion","usePostUserJourney","userCompletedJourneys","getJourneyProgress","useGetUserJourney","saveProgress","useCallback","journeyId","setJourney","id","coachmarks","scrollableContRef","isBlocking","item","_a","_b","clearJourney","timer","endJourney","prev","addCoachmark","coachmark","nextCoachmark","keepPrevActive","delayInMs","shouldBlurNextJourney","prevList","currIndex","updatedCoachmarkList","trackView","viewId","memoizedContextValue","useMemo","useEffect","completedUserJourneysIds","journey","jsxs","jsx","S.Overlay","index","Coachmark"],"mappings":";;;;;AAgBa,MAAAA,IAAiBC,EAAsC,IAAI,GAE3DC,KAA6C,CAAC,EAAE,UAAAC,GAAU,OAAAC,GAAO,QAAAC,QAAa;AACzF,QAAM,CAACC,GAAmBC,CAAoB,IAAIC,EAAkB,EAAI,GAClE,CAACC,GAAkBC,CAAmB,IAAIF,EAAkB,EAAK,GACjE,CAACG,GAAyBC,CAA0B,IAAIJ,EAA8B,IAAI,GAC1F,CAACK,GAAeC,CAAgB,IAAIN,EAA4B,CAAE,CAAA,GAClE,CAACO,GAAiBC,CAAkB,IAAIR,EAAS,EAAK,GACtDS,IAAeC,EAAO,EAAE,GACxBC,IAAmBD,EAA+B,MAAS,GAC3DE,IAAYF,EAAwC,CAAA,CAAE,GAEtD,CAACG,GAAqBC,CAAsB,IAAId,EAAkB,EAAK,GACvE,CAACe,GAAaC,CAAc,IAAIhB,EAAS;AAAA,IAC7C,QAAQ,OAAO;AAAA,IACf,OAAO,OAAO;AAAA,EAAA,CACf,GAEK,EAAE,MAAMiB,EAAsB,IAAIC,EAAmB,GACrD,EAAE,MAAMC,IAAwB,MAAM,KAAKC,EAAA,IAAuBC,KAElEC,IAAeC;AAAA,IACnB,CAACC,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AAA,QACpB,eAAaa,EAAiB;AAAA,QAE7B,UAAcN,EAAA,IAAI,CAACiC,GAAWkB,MAC7B,gBAAAF;AAAA,UAACG;AAAA,UAAA;AAAA,YAEC,WAAAnB;AAAA,YACA,oBAAoBzB;AAAA,UAAA;AAAA,UAFf,aAAa2C,CAAK;AAAA,QAAA,CAI1B;AAAA,MAAA;AAAA,IACH;AAAA,IAED7D;AAAA,EACH,EAAA,CAAA;AAEJ;"}
@@ -1,6 +1,6 @@
1
1
  import o, { keyframes as r, css as s } from "styled-components";
2
- import { GAME_LAUNCHER_SIZE as t } from "../../circle-games/game-launcher/comps/card-container/constants.js";
3
- import { GAME_LAUNCHER_ASSET_PADDING as a } from "../../circle-games/game-launcher/comps/segmented-game-card/constants.js";
2
+ import { GAME_LAUNCHER_SIZE as t } from "../../circle-games/game-launcher-v2/comps/card-container/constants.js";
3
+ import { GAME_LAUNCHER_ASSET_PADDING as a } from "../../circle-games/game-launcher-v2/comps/circular-game-card/constants.js";
4
4
  const p = 50 * 84 / 100, c = r`
5
5
  0%{
6
6
  opacity: 0;
@@ -1 +1 @@
1
- {"version":3,"file":"accuracy-styled.js","sources":["../../../../src/features/post-game-stats/accuracy/accuracy-styled.tsx"],"sourcesContent":["import styled, { keyframes, css } from 'styled-components';\n\nimport { GAME_LAUNCHER_SIZE } from '../../circle-games/game-launcher/comps/card-container/constants';\nimport { GAME_LAUNCHER_ASSET_PADDING } from '../../circle-games/game-launcher/comps/segmented-game-card/constants';\n\nconst MASK_PADDING = (50 * 84) / 100;\n\nconst fadeIn = keyframes`\n 0%{\n opacity: 0;\n }\n 100%{\n opacity: 1;\n }\n`;\n\nconst fadeOut = keyframes`\n 0%{\n opacity: 1;\n }\n 100%{\n opacity: 0;\n }\n`;\n\nexport const Accuracy = styled.div`\n height: ${GAME_LAUNCHER_SIZE}px;\n width: ${GAME_LAUNCHER_SIZE}px;\n background: transparent;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n`;\n\nexport const AccuracyMeterLottie = styled.div`\n height: ${GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING}px;\n width: ${GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING}px;\n position: absolute;\n flex: 1;\n z-index: 1;\n`;\n\nexport const AnimatedAccuracyNeedleContainer = styled.div<{\n $translateX?: number;\n $translateY?: number;\n $rotate?: number;\n}>`\n height: ${GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING}px;\n width: ${GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING}px;\n position: absolute;\n z-index: 2;\n transform: ${({ $translateX = 0, $translateY = 0, $rotate = 0 }) =>\n `translateX(${$translateX}px) translateY(${$translateY}px) rotate(${$rotate}deg)`};\n`;\n\nexport const AccuracyNeedleLottie = styled.div`\n height: 100%;\n width: 100%;\n`;\n\nexport const TextWrapper = styled.div<{\n $duration: number;\n $delay: number;\n $animationType: 'fadein' | 'fadeout';\n}>`\n z-index: 2;\n opacity: 0;\n position: absolute;\n animation: ${({ $animationType, $duration, $delay }) => css`\n ${$animationType === 'fadein' ? fadeIn : fadeOut} ${$duration}ms ${$delay}ms ease forwards\n `};\n transform: translateY(${((GAME_LAUNCHER_SIZE + MASK_PADDING) * 84) / 200 + 25}px);\n`;\n\nexport const PercentTextWrapper = styled.div<{\n $animationType?: 'fadein' | 'fadeout';\n $duration?: number;\n}>`\n position: absolute;\n z-index: 20;\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n\n ${({ $animationType, $duration }) =>\n $animationType &&\n $duration &&\n css`\n animation: ${$animationType === 'fadein' ? fadeIn : fadeOut} ${$duration}ms linear forwards;\n `}\n`;\n"],"names":["MASK_PADDING","fadeIn","keyframes","fadeOut","Accuracy","styled","GAME_LAUNCHER_SIZE","AccuracyMeterLottie","GAME_LAUNCHER_ASSET_PADDING","AnimatedAccuracyNeedleContainer","$translateX","$translateY","$rotate","AccuracyNeedleLottie","TextWrapper","$animationType","$duration","$delay","css","PercentTextWrapper"],"mappings":";;;AAKA,MAAMA,IAAgB,KAAK,KAAM,KAE3BC,IAASC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASTC,IAAUD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASHE,IAAWC,EAAO;AAAA,YACnBC,CAAkB;AAAA,WACnBA,CAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQhBC,IAAsBF,EAAO;AAAA,YAC9BC,IAAqBE,CAA2B;AAAA,WACjDF,IAAqBE,CAA2B;AAAA;AAAA;AAAA;AAAA,GAM9CC,IAAkCJ,EAAO;AAAA,YAK1CC,IAAqBE,CAA2B;AAAA,WACjDF,IAAqBE,CAA2B;AAAA;AAAA;AAAA,eAG5C,CAAC,EAAE,aAAAE,IAAc,GAAG,aAAAC,IAAc,GAAG,SAAAC,IAAU,EAAE,MAC5D,cAAcF,CAAW,kBAAkBC,CAAW,cAAcC,CAAO,MAAM;AAAA,GAGxEC,IAAuBR,EAAO;AAAA;AAAA;AAAA,GAK9BS,IAAcT,EAAO;AAAA;AAAA;AAAA;AAAA,eAQnB,CAAC,EAAE,gBAAAU,GAAgB,WAAAC,GAAW,QAAAC,QAAaC;AAAA,MACpDH,MAAmB,WAAWd,IAASE,CAAO,IAAIa,CAAS,MAAMC,CAAM;AAAA,GAC1E;AAAA,2BACyBX,IAAqBN,KAAgB,KAAM,MAAM,EAAE;AAAA,GAGlEmB,IAAqBd,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUrC,CAAC,EAAE,gBAAAU,GAAgB,WAAAC,EAAU,MAC7BD,KACAC,KACAE;AAAA,mBACeH,MAAmB,WAAWd,IAASE,CAAO,IAAIa,CAAS;AAAA,KACzE;AAAA;"}
1
+ {"version":3,"file":"accuracy-styled.js","sources":["../../../../src/features/post-game-stats/accuracy/accuracy-styled.tsx"],"sourcesContent":["import styled, { keyframes, css } from 'styled-components';\n\nimport { GAME_LAUNCHER_SIZE } from '../../circle-games/game-launcher-v2/comps/card-container/constants';\nimport { GAME_LAUNCHER_ASSET_PADDING } from '../../circle-games/game-launcher-v2/comps/circular-game-card/constants';\n\nconst MASK_PADDING = (50 * 84) / 100;\n\nconst fadeIn = keyframes`\n 0%{\n opacity: 0;\n }\n 100%{\n opacity: 1;\n }\n`;\n\nconst fadeOut = keyframes`\n 0%{\n opacity: 1;\n }\n 100%{\n opacity: 0;\n }\n`;\n\nexport const Accuracy = styled.div`\n height: ${GAME_LAUNCHER_SIZE}px;\n width: ${GAME_LAUNCHER_SIZE}px;\n background: transparent;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n`;\n\nexport const AccuracyMeterLottie = styled.div`\n height: ${GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING}px;\n width: ${GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING}px;\n position: absolute;\n flex: 1;\n z-index: 1;\n`;\n\nexport const AnimatedAccuracyNeedleContainer = styled.div<{\n $translateX?: number;\n $translateY?: number;\n $rotate?: number;\n}>`\n height: ${GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING}px;\n width: ${GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING}px;\n position: absolute;\n z-index: 2;\n transform: ${({ $translateX = 0, $translateY = 0, $rotate = 0 }) =>\n `translateX(${$translateX}px) translateY(${$translateY}px) rotate(${$rotate}deg)`};\n`;\n\nexport const AccuracyNeedleLottie = styled.div`\n height: 100%;\n width: 100%;\n`;\n\nexport const TextWrapper = styled.div<{\n $duration: number;\n $delay: number;\n $animationType: 'fadein' | 'fadeout';\n}>`\n z-index: 2;\n opacity: 0;\n position: absolute;\n animation: ${({ $animationType, $duration, $delay }) => css`\n ${$animationType === 'fadein' ? fadeIn : fadeOut} ${$duration}ms ${$delay}ms ease forwards\n `};\n transform: translateY(${((GAME_LAUNCHER_SIZE + MASK_PADDING) * 84) / 200 + 25}px);\n`;\n\nexport const PercentTextWrapper = styled.div<{\n $animationType?: 'fadein' | 'fadeout';\n $duration?: number;\n}>`\n position: absolute;\n z-index: 20;\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n\n ${({ $animationType, $duration }) =>\n $animationType &&\n $duration &&\n css`\n animation: ${$animationType === 'fadein' ? fadeIn : fadeOut} ${$duration}ms linear forwards;\n `}\n`;\n"],"names":["MASK_PADDING","fadeIn","keyframes","fadeOut","Accuracy","styled","GAME_LAUNCHER_SIZE","AccuracyMeterLottie","GAME_LAUNCHER_ASSET_PADDING","AnimatedAccuracyNeedleContainer","$translateX","$translateY","$rotate","AccuracyNeedleLottie","TextWrapper","$animationType","$duration","$delay","css","PercentTextWrapper"],"mappings":";;;AAKA,MAAMA,IAAgB,KAAK,KAAM,KAE3BC,IAASC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASTC,IAAUD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASHE,IAAWC,EAAO;AAAA,YACnBC,CAAkB;AAAA,WACnBA,CAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQhBC,IAAsBF,EAAO;AAAA,YAC9BC,IAAqBE,CAA2B;AAAA,WACjDF,IAAqBE,CAA2B;AAAA;AAAA;AAAA;AAAA,GAM9CC,IAAkCJ,EAAO;AAAA,YAK1CC,IAAqBE,CAA2B;AAAA,WACjDF,IAAqBE,CAA2B;AAAA;AAAA;AAAA,eAG5C,CAAC,EAAE,aAAAE,IAAc,GAAG,aAAAC,IAAc,GAAG,SAAAC,IAAU,EAAE,MAC5D,cAAcF,CAAW,kBAAkBC,CAAW,cAAcC,CAAO,MAAM;AAAA,GAGxEC,IAAuBR,EAAO;AAAA;AAAA;AAAA,GAK9BS,IAAcT,EAAO;AAAA;AAAA;AAAA;AAAA,eAQnB,CAAC,EAAE,gBAAAU,GAAgB,WAAAC,GAAW,QAAAC,QAAaC;AAAA,MACpDH,MAAmB,WAAWd,IAASE,CAAO,IAAIa,CAAS,MAAMC,CAAM;AAAA,GAC1E;AAAA,2BACyBX,IAAqBN,KAAgB,KAAM,MAAM,EAAE;AAAA,GAGlEmB,IAAqBd,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUrC,CAAC,EAAE,gBAAAU,GAAgB,WAAAC,EAAU,MAC7BD,KACAC,KACAE;AAAA,mBACeH,MAAmB,WAAWd,IAASE,CAAO,IAAIa,CAAS;AAAA,KACzE;AAAA;"}