fansunited-frontend-components 0.0.31-RC3 → 0.0.31-RC5

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 (377) hide show
  1. package/ClassicQuizPlay.d.ts +4 -0
  2. package/ClassicQuizPlay.d.ts.map +1 -0
  3. package/ClassicQuizPlay.js +5 -0
  4. package/CollectLead.d.ts +4 -0
  5. package/CollectLead.d.ts.map +1 -0
  6. package/CollectLead.js +5 -0
  7. package/EventGamePlay.d.ts +4 -0
  8. package/EventGamePlay.d.ts.map +1 -0
  9. package/EventGamePlay.js +5 -0
  10. package/MatchQuizPlay.d.ts +4 -0
  11. package/MatchQuizPlay.d.ts.map +1 -0
  12. package/MatchQuizPlay.js +5 -0
  13. package/PersonalityQuizPlay.d.ts +4 -0
  14. package/PersonalityQuizPlay.d.ts.map +1 -0
  15. package/PersonalityQuizPlay.js +5 -0
  16. package/PollVote.d.ts +4 -0
  17. package/PollVote.d.ts.map +1 -0
  18. package/PollVote.js +5 -0
  19. package/_virtual/_commonjsHelpers.js +6 -0
  20. package/_virtual/index.js +4 -0
  21. package/_virtual/index2.js +4 -0
  22. package/_virtual/index3.js +4 -0
  23. package/_virtual/jsx-runtime.js +4 -0
  24. package/_virtual/react-is.development.js +4 -0
  25. package/_virtual/react-is.development2.js +4 -0
  26. package/_virtual/react-is.production.min.js +4 -0
  27. package/_virtual/react-is.production.min2.js +4 -0
  28. package/_virtual/react-jsx-runtime.development.js +4 -0
  29. package/_virtual/react-jsx-runtime.production.js +4 -0
  30. package/index.d.ts +6 -1
  31. package/index.d.ts.map +1 -1
  32. package/index.js +14 -0
  33. package/package.json +37 -4
  34. package/packages/classic-quiz-play/src/assets/default-quiz-bg-vertical.jpg.js +4 -0
  35. package/packages/classic-quiz-play/src/assets/default-quiz-bg.png.js +4 -0
  36. package/packages/classic-quiz-play/src/assets/emojis/3dicons-bookmark-fav-dynamic-color.svg.js +4 -0
  37. package/packages/classic-quiz-play/src/assets/emojis/3dicons-crow-dynamic-color.svg.js +4 -0
  38. package/packages/classic-quiz-play/src/assets/emojis/3dicons-fire-dynamic-color.svg.js +4 -0
  39. package/packages/classic-quiz-play/src/assets/emojis/3dicons-flag-dynamic-color.svg.js +4 -0
  40. package/packages/classic-quiz-play/src/assets/emojis/3dicons-medal-dynamic-color.svg.js +4 -0
  41. package/packages/classic-quiz-play/src/assets/emojis/3dicons-rocket-dynamic-color.svg.js +4 -0
  42. package/packages/classic-quiz-play/src/assets/emojis/3dicons-target-dynamic-color.svg.js +4 -0
  43. package/packages/classic-quiz-play/src/assets/emojis/3dicons-thumb-down-dynamic-color.svg.js +4 -0
  44. package/packages/classic-quiz-play/src/assets/emojis/bottle-with-popping-cork.svg.js +4 -0
  45. package/packages/classic-quiz-play/src/assets/emojis/crown.svg.js +4 -0
  46. package/packages/classic-quiz-play/src/assets/emojis/direct-hit.svg.js +4 -0
  47. package/packages/classic-quiz-play/src/assets/emojis/hundred-points.svg.js +4 -0
  48. package/packages/classic-quiz-play/src/assets/emojis/person-facepalming.svg.js +4 -0
  49. package/packages/classic-quiz-play/src/assets/emojis/sports-medal.svg.js +4 -0
  50. package/packages/classic-quiz-play/src/assets/emojis/thumbs-down.svg.js +4 -0
  51. package/packages/classic-quiz-play/src/assets/emojis/trophy.svg.js +4 -0
  52. package/packages/classic-quiz-play/src/assets/emojis/upside-down-face.svg.js +4 -0
  53. package/packages/classic-quiz-play/src/assets/hexagons/shape-hexagon-danger.svg.js +4 -0
  54. package/packages/classic-quiz-play/src/assets/hexagons/shape-hexagon-success.svg.js +4 -0
  55. package/packages/classic-quiz-play/src/assets/hexagons/shape-hexagon-warning.svg.js +4 -0
  56. package/packages/classic-quiz-play/src/assets/info.svg.js +4 -0
  57. package/packages/classic-quiz-play/src/assets/school.svg.js +4 -0
  58. package/packages/classic-quiz-play/src/assets/sports_score.svg.js +4 -0
  59. package/packages/classic-quiz-play/src/components/ClassicQuizNotFound.js +23 -0
  60. package/packages/classic-quiz-play/src/components/ClassicQuizPlay.js +353 -0
  61. package/packages/classic-quiz-play/src/components/Leads/CollectLeadWrapper.js +65 -0
  62. package/packages/classic-quiz-play/src/components/Shared/AlertMessage.js +93 -0
  63. package/packages/classic-quiz-play/src/components/Shared/Answers/Answers.js +80 -0
  64. package/packages/classic-quiz-play/src/components/Shared/Answers/Option.js +130 -0
  65. package/packages/classic-quiz-play/src/components/Shared/Button.js +67 -0
  66. package/packages/classic-quiz-play/src/components/Shared/MainCard.js +34 -0
  67. package/packages/classic-quiz-play/src/components/Shared/PresentedBy.js +122 -0
  68. package/packages/classic-quiz-play/src/components/Shared/ScoreStateWrapper.js +443 -0
  69. package/packages/classic-quiz-play/src/components/Shared/Stepper.js +59 -0
  70. package/packages/classic-quiz-play/src/components/Shared/Stopwatch.js +109 -0
  71. package/packages/classic-quiz-play/src/components/Variants/Overlay/Error/OverlayError.js +45 -0
  72. package/packages/classic-quiz-play/src/components/Variants/Overlay/LeadCollection/OverlayLeadAfterCollection.js +35 -0
  73. package/packages/classic-quiz-play/src/components/Variants/Overlay/OverlayVariant.js +170 -0
  74. package/packages/classic-quiz-play/src/components/Variants/Overlay/OverlayVariant.styles.js +190 -0
  75. package/packages/classic-quiz-play/src/components/Variants/Overlay/ScoreState/OverlayScoreState.js +177 -0
  76. package/packages/classic-quiz-play/src/components/Variants/Overlay/ScoreState/OverlayScoreState.styles.js +373 -0
  77. package/packages/classic-quiz-play/src/components/Variants/Overlay/SignIn/OverlaySignIn.js +120 -0
  78. package/packages/classic-quiz-play/src/components/Variants/Overlay/SignIn/OverlaySignIn.styles.js +42 -0
  79. package/packages/classic-quiz-play/src/components/Variants/Split/Error/SplitError.js +42 -0
  80. package/packages/classic-quiz-play/src/components/Variants/Split/LeadCollection/SplitLeadAfterCollection.js +37 -0
  81. package/packages/classic-quiz-play/src/components/Variants/Split/ScoreState/SplitScoreState.js +231 -0
  82. package/packages/classic-quiz-play/src/components/Variants/Split/ScoreState/SplitScoreState.styles.js +353 -0
  83. package/packages/classic-quiz-play/src/components/Variants/Split/SignIn/SplitSignIn.js +118 -0
  84. package/packages/classic-quiz-play/src/components/Variants/Split/SignIn/SplitSignIn.styles.js +52 -0
  85. package/packages/classic-quiz-play/src/components/Variants/Split/SplitVariant.js +183 -0
  86. package/packages/classic-quiz-play/src/components/Variants/Split/SplitVariant.styles.js +145 -0
  87. package/packages/classic-quiz-play/src/components/Variants/Standard/Error/StandardError.js +43 -0
  88. package/packages/classic-quiz-play/src/components/Variants/Standard/LeadCollection/StandardLeadAfterCollection.js +35 -0
  89. package/packages/classic-quiz-play/src/components/Variants/Standard/ScoreState/StandardScoreState.js +220 -0
  90. package/packages/classic-quiz-play/src/components/Variants/Standard/ScoreState/StandardScoreState.styles.js +347 -0
  91. package/packages/classic-quiz-play/src/components/Variants/Standard/SignIn/StandardSignIn.js +117 -0
  92. package/packages/classic-quiz-play/src/components/Variants/Standard/SignIn/StandardSignIn.styles.js +52 -0
  93. package/packages/classic-quiz-play/src/components/Variants/Standard/StandardVariant.js +209 -0
  94. package/packages/classic-quiz-play/src/components/Variants/Standard/StandardVariant.styles.js +182 -0
  95. package/packages/classic-quiz-play/src/constants/constants.js +4 -0
  96. package/packages/classic-quiz-play/src/hooks/useClassicQuizById.js +18 -0
  97. package/packages/classic-quiz-play/src/hooks/useEmbedCodeContainer.js +30 -0
  98. package/packages/classic-quiz-play/src/hooks/useMyParticipation.js +40 -0
  99. package/packages/classic-quiz-play/src/hooks/useScoreStateHelpers.js +117 -0
  100. package/packages/classic-quiz-play/src/index.js +4 -0
  101. package/packages/classic-quiz-play/src/main.js +7 -0
  102. package/packages/collect-lead/src/assets/default-quiz-bg-vertical.jpg.js +4 -0
  103. package/packages/collect-lead/src/assets/default-quiz-bg.png.js +4 -0
  104. package/packages/collect-lead/src/components/CollectLead.js +18 -0
  105. package/packages/collect-lead/src/components/Leads/CollectLeadWrapper.js +63 -0
  106. package/packages/collect-lead/src/components/Shared/MainCard.js +31 -0
  107. package/packages/collect-lead/src/components/Shared/PresentedBy.js +118 -0
  108. package/packages/collect-lead/src/components/Variants/Overlay/LeadOverlayVariant.js +72 -0
  109. package/packages/collect-lead/src/components/Variants/Overlay/LeadOverlayVariant.styles.js +187 -0
  110. package/packages/collect-lead/src/components/Variants/Split/LeadSplitVariant.js +81 -0
  111. package/packages/collect-lead/src/components/Variants/Split/LeadSplitVariant.styles.js +338 -0
  112. package/packages/collect-lead/src/components/Variants/Standard/LeadStandardVariant.js +82 -0
  113. package/packages/collect-lead/src/components/Variants/Standard/LeadStandardVariant.styles.js +313 -0
  114. package/packages/collect-lead/src/index.js +4 -0
  115. package/packages/collect-lead/src/main.js +39 -0
  116. package/packages/collect-lead/src/providers/ConfigurationProvider.js +50 -0
  117. package/packages/common/src/components/AdditionalCTA.js +24 -0
  118. package/packages/common/src/components/AlertMessage.js +88 -0
  119. package/packages/common/src/components/LeadCollection/OverlayLeadAfterCollection.js +111 -0
  120. package/packages/common/src/components/LeadCollection/SplitLeadAfterCollection.js +103 -0
  121. package/packages/common/src/components/LeadCollection/StandardLeadAfterCollection.js +101 -0
  122. package/packages/common/src/components/Leads/CollectLeadForm.js +72 -0
  123. package/packages/common/src/components/Leads/ConsentsCheckboxes.js +82 -0
  124. package/packages/common/src/components/Leads/LeadAgreementCheckbox.js +104 -0
  125. package/packages/common/src/components/Leads/LeadForm.js +498 -0
  126. package/packages/common/src/components/Portal.js +62 -0
  127. package/packages/common/src/components/Rules.js +299 -0
  128. package/packages/common/src/components/Skeletons/NotFoundSkeleton.js +83 -0
  129. package/packages/common/src/components/Skeletons/Overlay/ApiError/OverlayApiErrorSkeleton.js +80 -0
  130. package/packages/common/src/components/Skeletons/Overlay/ApiError/OverlayApiErrorSkeleton.styles.js +190 -0
  131. package/packages/common/src/components/Skeletons/Overlay/OverlaySkeleton.js +68 -0
  132. package/packages/common/src/components/Skeletons/Overlay/OverlaySkeleton.styles.js +100 -0
  133. package/packages/common/src/components/Skeletons/Overlay/ScoreState/OverlayScoreStateSkeleton.js +65 -0
  134. package/packages/common/src/components/Skeletons/Overlay/ScoreState/OverlayScoreStateSkeleton.styles.js +90 -0
  135. package/packages/common/src/components/Skeletons/Overlay/ScoreState/OverlayScoreStateWrapperSkeleton.js +34 -0
  136. package/packages/common/src/components/Skeletons/Overlay/ScoreState/OverlayScoreStateWrapperSkeleton.styles.js +55 -0
  137. package/packages/common/src/components/Skeletons/Overlay/SignIn/OverlaySignInSkeleton.js +58 -0
  138. package/packages/common/src/components/Skeletons/Overlay/SignIn/OverlaySignInSkeleton.styles.js +105 -0
  139. package/packages/common/src/components/Skeletons/Split/ApiError/SplitApiErrorSkeleton.js +98 -0
  140. package/packages/common/src/components/Skeletons/Split/ApiError/SplitApiErrorSkeleton.styles.js +167 -0
  141. package/packages/common/src/components/Skeletons/Split/ScoreState/SplitScoreStateSkeleton.js +64 -0
  142. package/packages/common/src/components/Skeletons/Split/ScoreState/SplitScoreStateSkeleton.styles.js +107 -0
  143. package/packages/common/src/components/Skeletons/Split/SignIn/SplitSignInSkeleton.js +55 -0
  144. package/packages/common/src/components/Skeletons/Split/SignIn/SplitSignInSkeleton.styles.js +94 -0
  145. package/packages/common/src/components/Skeletons/Split/SplitSkeleton.js +186 -0
  146. package/packages/common/src/components/Skeletons/Split/SplitSkeleton.styles.js +181 -0
  147. package/packages/common/src/components/Skeletons/Standard/ApiError/StandardApiErrorSkeleton.js +173 -0
  148. package/packages/common/src/components/Skeletons/Standard/ApiError/StandardApiErrorSkeleton.styles.js +275 -0
  149. package/packages/common/src/components/Skeletons/Standard/ScoreState/StandardContentSkeleton.js +23 -0
  150. package/packages/common/src/components/Skeletons/Standard/ScoreState/StandardContentSkeleton.styles.js +40 -0
  151. package/packages/common/src/components/Skeletons/Standard/ScoreState/StandardScoreStateSkeleton.js +142 -0
  152. package/packages/common/src/components/Skeletons/Standard/ScoreState/StandardScoreStateSkeleton.styles.js +203 -0
  153. package/packages/common/src/components/Skeletons/Standard/SignIn/StandardSignInSkeleton.js +157 -0
  154. package/packages/common/src/components/Skeletons/Standard/SignIn/StandardSignInSkeleton.styles.js +194 -0
  155. package/packages/common/src/components/Skeletons/Standard/StandardSkeleton.js +238 -0
  156. package/packages/common/src/components/Skeletons/Standard/StandardSkeleton.styles.js +211 -0
  157. package/packages/common/src/components/Spinner.js +36 -0
  158. package/packages/common/src/constants/constants.js +457 -0
  159. package/packages/common/src/enums/enums.js +4 -0
  160. package/packages/common/src/functions/helpers.js +58 -0
  161. package/packages/common/src/functions/i18n.js +69 -0
  162. package/packages/common/src/functions/theme.js +301 -0
  163. package/packages/common/src/hooks/useConstantContext.js +10 -0
  164. package/packages/common/src/hooks/useImageUrl.js +8 -0
  165. package/packages/common/src/hooks/useImageVariant.js +11 -0
  166. package/packages/common/src/hooks/useLeadForm.js +129 -0
  167. package/packages/common/src/hooks/useThemeMode.js +30 -0
  168. package/packages/common/src/locales/bg.json.js +363 -0
  169. package/packages/common/src/locales/de.json.js +362 -0
  170. package/packages/common/src/locales/el.json.js +362 -0
  171. package/packages/common/src/locales/en.json.js +368 -0
  172. package/packages/common/src/locales/es.json.js +362 -0
  173. package/packages/common/src/locales/fr-be.json.js +362 -0
  174. package/packages/common/src/locales/fr.json.js +362 -0
  175. package/packages/common/src/locales/it.json.js +362 -0
  176. package/packages/common/src/locales/pl.json.js +362 -0
  177. package/packages/common/src/locales/pt-br.json.js +362 -0
  178. package/packages/common/src/locales/pt.json.js +362 -0
  179. package/packages/common/src/locales/ro.json.js +362 -0
  180. package/packages/common/src/locales/sk.json.js +362 -0
  181. package/packages/common/src/locales/sr.json.js +362 -0
  182. package/packages/common/src/providers/ConstantsProvider.js +29 -0
  183. package/packages/common/src/providers/ContainerProvider.js +35 -0
  184. package/packages/common/src/providers/FontProvider.js +25 -0
  185. package/packages/common/src/providers/ThemeProvider.js +80 -0
  186. package/packages/event-game-play/src/assets/default-quiz-bg-vertical.jpg.js +4 -0
  187. package/packages/event-game-play/src/assets/default-quiz-bg.png.js +4 -0
  188. package/packages/event-game-play/src/assets/school.svg.js +4 -0
  189. package/packages/event-game-play/src/assets/sports_score.svg.js +4 -0
  190. package/packages/event-game-play/src/components/EventGameNotFound.js +23 -0
  191. package/packages/event-game-play/src/components/EventGamePlay.js +318 -0
  192. package/packages/event-game-play/src/components/Shared/AlertMessage.js +93 -0
  193. package/packages/event-game-play/src/components/Shared/Countdown.js +125 -0
  194. package/packages/event-game-play/src/components/Shared/FinishedGameWrapper/FinishedGameWrapper.js +574 -0
  195. package/packages/event-game-play/src/components/Shared/Fixtures/Boolean/BooleanFixture.js +60 -0
  196. package/packages/event-game-play/src/components/Shared/Fixtures/Boolean/BooleanFixture.styles.js +29 -0
  197. package/packages/event-game-play/src/components/Shared/Fixtures/Boolean/BooleanSelector.js +108 -0
  198. package/packages/event-game-play/src/components/Shared/Fixtures/Boolean/BooleanSelector.styles.js +44 -0
  199. package/packages/event-game-play/src/components/Shared/Fixtures/Number/NumberFixture.js +70 -0
  200. package/packages/event-game-play/src/components/Shared/Fixtures/Number/NumberFixture.styles.js +37 -0
  201. package/packages/event-game-play/src/components/Shared/Fixtures/Number/NumberSelector.js +82 -0
  202. package/packages/event-game-play/src/components/Shared/Fixtures/Number/NumberSelector.styles.js +64 -0
  203. package/packages/event-game-play/src/components/Shared/Fixtures/PointsDisplay/PointsDisplay.js +70 -0
  204. package/packages/event-game-play/src/components/Shared/Fixtures/PointsDisplay/PointsDisplay.styles.js +98 -0
  205. package/packages/event-game-play/src/components/Shared/Fixtures/Text/TextFixture.js +62 -0
  206. package/packages/event-game-play/src/components/Shared/Fixtures/Text/TextFixture.styles.js +29 -0
  207. package/packages/event-game-play/src/components/Shared/Fixtures/Text/TextSelector.js +344 -0
  208. package/packages/event-game-play/src/components/Shared/Fixtures/Text/TextSelector.styles.js +70 -0
  209. package/packages/event-game-play/src/components/Shared/Fixtures/shared.styles.js +63 -0
  210. package/packages/event-game-play/src/components/Shared/Leaderboard/LeaderboardComponent.js +220 -0
  211. package/packages/event-game-play/src/components/Shared/Leaderboard/LeaderboardPagination.js +88 -0
  212. package/packages/event-game-play/src/components/Shared/MainCard.js +34 -0
  213. package/packages/event-game-play/src/components/Shared/Notification.js +67 -0
  214. package/packages/event-game-play/src/components/Shared/Stepper.js +151 -0
  215. package/packages/event-game-play/src/components/Shared/Summary/EditPredictionModal.js +163 -0
  216. package/packages/event-game-play/src/components/Shared/Summary/EditPredictionModal.styles.js +110 -0
  217. package/packages/event-game-play/src/components/Shared/Summary/PredictionSummary.js +118 -0
  218. package/packages/event-game-play/src/components/Shared/Summary/PredictionSummary.styles.js +180 -0
  219. package/packages/event-game-play/src/components/Variants/Overlay/Error/EventGameOverlayError.js +30 -0
  220. package/packages/event-game-play/src/components/Variants/Overlay/EventGameOverlayVariant.js +348 -0
  221. package/packages/event-game-play/src/components/Variants/Overlay/EventGameOverlayVariant.styles.js +213 -0
  222. package/packages/event-game-play/src/components/Variants/Overlay/FinishedGame/EventGameOverlayFinishedGame.js +130 -0
  223. package/packages/event-game-play/src/components/Variants/Overlay/FinishedGame/EventGameOverlayFinishedGame.styles.js +712 -0
  224. package/packages/event-game-play/src/components/Variants/Overlay/ScoreState/EventGameOverlayScoreState.js +141 -0
  225. package/packages/event-game-play/src/components/Variants/Overlay/ScoreState/EventGameOverlayScoreState.styles.js +156 -0
  226. package/packages/event-game-play/src/components/Variants/Split/Error/EventGameSplitError.js +28 -0
  227. package/packages/event-game-play/src/components/Variants/Split/EventGameSplitVariant.js +347 -0
  228. package/packages/event-game-play/src/components/Variants/Split/EventGameSplitVariant.styles.js +149 -0
  229. package/packages/event-game-play/src/components/Variants/Split/FinishedGame/EventGameSplitFinishedGame.js +119 -0
  230. package/packages/event-game-play/src/components/Variants/Split/FinishedGame/EventGameSplitFinishedGame.styles.js +230 -0
  231. package/packages/event-game-play/src/components/Variants/Split/ScoreState/EventGameSplitScoreState.js +139 -0
  232. package/packages/event-game-play/src/components/Variants/Split/ScoreState/EventGameSplitScoreState.styles.js +45 -0
  233. package/packages/event-game-play/src/components/Variants/Standard/Error/EventGameStandardError.js +29 -0
  234. package/packages/event-game-play/src/components/Variants/Standard/EventGameStandardVariant.js +329 -0
  235. package/packages/event-game-play/src/components/Variants/Standard/EventGameStandardVariant.styles.js +373 -0
  236. package/packages/event-game-play/src/components/Variants/Standard/FinishedGame/EventGameStandardFinishedGame.js +219 -0
  237. package/packages/event-game-play/src/components/Variants/Standard/FinishedGame/EventGameStandardFinishedGame.styles.js +548 -0
  238. package/packages/event-game-play/src/components/Variants/Standard/ScoreState/EventGameStandardScoreState.js +117 -0
  239. package/packages/event-game-play/src/components/Variants/Standard/ScoreState/EventGameStandardScoreState.styles.js +259 -0
  240. package/packages/event-game-play/src/helpers/helpers.js +11 -0
  241. package/packages/event-game-play/src/hooks/useEventGameById.js +27 -0
  242. package/packages/event-game-play/src/hooks/useEventGamePrediction.js +54 -0
  243. package/packages/event-game-play/src/hooks/useEventRankings.js +61 -0
  244. package/packages/event-game-play/src/index.js +4 -0
  245. package/packages/event-game-play/src/main.js +7 -0
  246. package/packages/event-game-play/src/providers/ConstantsProvider.js +17 -0
  247. package/packages/match-quiz-play/src/assets/default-quiz-bg-vertical.jpg.js +4 -0
  248. package/packages/match-quiz-play/src/assets/default-quiz-bg.png.js +4 -0
  249. package/packages/match-quiz-play/src/assets/school.svg.js +4 -0
  250. package/packages/match-quiz-play/src/assets/sports_score.svg.js +4 -0
  251. package/packages/match-quiz-play/src/components/Leads/CollectLeadWrapper.js +65 -0
  252. package/packages/match-quiz-play/src/components/MatchQuizNotFound.js +23 -0
  253. package/packages/match-quiz-play/src/components/MatchQuizPlay.js +490 -0
  254. package/packages/match-quiz-play/src/components/Shared/AlertMessage.js +93 -0
  255. package/packages/match-quiz-play/src/components/Shared/Countdown.js +125 -0
  256. package/packages/match-quiz-play/src/components/Shared/FinishedGameWrapper/EarnedPointsDisplay.js +64 -0
  257. package/packages/match-quiz-play/src/components/Shared/FinishedGameWrapper/FinishedGameWrapper.js +854 -0
  258. package/packages/match-quiz-play/src/components/Shared/Fixtures/1X2/OneXTwoFixture.js +63 -0
  259. package/packages/match-quiz-play/src/components/Shared/Fixtures/1X2/OneXTwoFixture.styles.js +29 -0
  260. package/packages/match-quiz-play/src/components/Shared/Fixtures/1X2/OneXTwoSelector.js +143 -0
  261. package/packages/match-quiz-play/src/components/Shared/Fixtures/1X2/OneXTwoSelector.styles.js +101 -0
  262. package/packages/match-quiz-play/src/components/Shared/Fixtures/1X2/OneXTwoSelectorSplit.js +97 -0
  263. package/packages/match-quiz-play/src/components/Shared/Fixtures/1X2/OneXTwoSelectorSplit.styles.js +77 -0
  264. package/packages/match-quiz-play/src/components/Shared/Fixtures/Corners/CornersFixture.js +61 -0
  265. package/packages/match-quiz-play/src/components/Shared/Fixtures/Corners/CornersFixture.styles.js +29 -0
  266. package/packages/match-quiz-play/src/components/Shared/Fixtures/Corners/CornersSelector.js +63 -0
  267. package/packages/match-quiz-play/src/components/Shared/Fixtures/Corners/CornersSelector.styles.js +41 -0
  268. package/packages/match-quiz-play/src/components/Shared/Fixtures/CorrectScore/CorrectScoreFixture.js +72 -0
  269. package/packages/match-quiz-play/src/components/Shared/Fixtures/CorrectScore/CorrectScoreFixture.styles.js +30 -0
  270. package/packages/match-quiz-play/src/components/Shared/Fixtures/CorrectScore/ScoreSelector.js +179 -0
  271. package/packages/match-quiz-play/src/components/Shared/Fixtures/CorrectScore/ScoreSelector.styles.js +163 -0
  272. package/packages/match-quiz-play/src/components/Shared/Fixtures/CorrectScore/ScoreSelectorSplit.js +103 -0
  273. package/packages/match-quiz-play/src/components/Shared/Fixtures/CorrectScore/ScoreSelectorSplit.styles.js +86 -0
  274. package/packages/match-quiz-play/src/components/Shared/Fixtures/Players/PlayersFixture.js +79 -0
  275. package/packages/match-quiz-play/src/components/Shared/Fixtures/Players/PlayersFixture.styles.js +29 -0
  276. package/packages/match-quiz-play/src/components/Shared/Fixtures/Players/PlayersSelector.js +213 -0
  277. package/packages/match-quiz-play/src/components/Shared/Fixtures/Players/PlayersSelector.styles.js +293 -0
  278. package/packages/match-quiz-play/src/components/Shared/Fixtures/PointsDisplay/PointsDisplay.js +116 -0
  279. package/packages/match-quiz-play/src/components/Shared/Fixtures/PointsDisplay/PointsDisplay.styles.js +98 -0
  280. package/packages/match-quiz-play/src/components/Shared/Fixtures/YesNo/YesNoFixture.js +72 -0
  281. package/packages/match-quiz-play/src/components/Shared/Fixtures/YesNo/YesNoFixture.styles.js +29 -0
  282. package/packages/match-quiz-play/src/components/Shared/Fixtures/YesNo/YesNoSelector.js +108 -0
  283. package/packages/match-quiz-play/src/components/Shared/Fixtures/YesNo/YesNoSelector.styles.js +44 -0
  284. package/packages/match-quiz-play/src/components/Shared/Fixtures/shared.styles.js +63 -0
  285. package/packages/match-quiz-play/src/components/Shared/Leaderboard/LeaderboardComponent.js +220 -0
  286. package/packages/match-quiz-play/src/components/Shared/Leaderboard/RoundedPagination.js +207 -0
  287. package/packages/match-quiz-play/src/components/Shared/MainCard.js +34 -0
  288. package/packages/match-quiz-play/src/components/Shared/Notification.js +67 -0
  289. package/packages/match-quiz-play/src/components/Shared/PresentedBy.js +118 -0
  290. package/packages/match-quiz-play/src/components/Shared/Stepper.js +151 -0
  291. package/packages/match-quiz-play/src/components/Shared/Summary/EditPredictionModal.js +172 -0
  292. package/packages/match-quiz-play/src/components/Shared/Summary/EditPredictionModal.styles.js +109 -0
  293. package/packages/match-quiz-play/src/components/Shared/Summary/PredictionSummary.js +235 -0
  294. package/packages/match-quiz-play/src/components/Shared/Summary/PredictionSummary.styles.js +219 -0
  295. package/packages/match-quiz-play/src/components/Variants/Overlay/Error/MatchQuizOverlayError.js +45 -0
  296. package/packages/match-quiz-play/src/components/Variants/Overlay/FinishedGame/MatchQuizOverlayFinishedGame.js +157 -0
  297. package/packages/match-quiz-play/src/components/Variants/Overlay/FinishedGame/MatchQuizOverlayFinishedGame.styles.js +710 -0
  298. package/packages/match-quiz-play/src/components/Variants/Overlay/LeadCollection/OverlayLeadAfterCollection.js +35 -0
  299. package/packages/match-quiz-play/src/components/Variants/Overlay/MatchQuizOverlayVariant.js +499 -0
  300. package/packages/match-quiz-play/src/components/Variants/Overlay/MatchQuizOverlayVariant.styles.js +213 -0
  301. package/packages/match-quiz-play/src/components/Variants/Overlay/ScoreState/MatchQuizOverlayScoreState.js +178 -0
  302. package/packages/match-quiz-play/src/components/Variants/Overlay/ScoreState/MatchQuizOverlayScoreState.styles.js +128 -0
  303. package/packages/match-quiz-play/src/components/Variants/Overlay/SignIn/MatchQuizOverlaySignIn.js +120 -0
  304. package/packages/match-quiz-play/src/components/Variants/Overlay/SignIn/MatchQuizOverlaySignIn.styles.js +42 -0
  305. package/packages/match-quiz-play/src/components/Variants/Split/Error/MatchQuizSplitError.js +42 -0
  306. package/packages/match-quiz-play/src/components/Variants/Split/FinishedGame/MatchQuizSplitFinishedGame.js +185 -0
  307. package/packages/match-quiz-play/src/components/Variants/Split/FinishedGame/MatchQuizSplitFinishedGame.styles.js +233 -0
  308. package/packages/match-quiz-play/src/components/Variants/Split/LeadCollection/SplitLeadAfterCollection.js +37 -0
  309. package/packages/match-quiz-play/src/components/Variants/Split/MatchQuizSplitVariant.js +511 -0
  310. package/packages/match-quiz-play/src/components/Variants/Split/MatchQuizSplitVariant.styles.js +149 -0
  311. package/packages/match-quiz-play/src/components/Variants/Split/ScoreState/MatchQuizSplitScoreState.js +164 -0
  312. package/packages/match-quiz-play/src/components/Variants/Split/ScoreState/MatchQuizSplitScoreState.styles.js +27 -0
  313. package/packages/match-quiz-play/src/components/Variants/Split/SignIn/MatchQuizSplitSignIn.js +118 -0
  314. package/packages/match-quiz-play/src/components/Variants/Split/SignIn/MatchQuizSplitSignIn.styles.js +52 -0
  315. package/packages/match-quiz-play/src/components/Variants/Standard/Error/MatchQuizStandardError.js +43 -0
  316. package/packages/match-quiz-play/src/components/Variants/Standard/FinishedGame/MatchQuizStandardFinishedGame.js +234 -0
  317. package/packages/match-quiz-play/src/components/Variants/Standard/FinishedGame/MatchQuizStandardFinishedGame.styles.js +548 -0
  318. package/packages/match-quiz-play/src/components/Variants/Standard/LeadCollection/StandardLeadAfterCollection.js +35 -0
  319. package/packages/match-quiz-play/src/components/Variants/Standard/MatchQuizStandardVariant.js +513 -0
  320. package/packages/match-quiz-play/src/components/Variants/Standard/MatchQuizStandardVariant.styles.js +376 -0
  321. package/packages/match-quiz-play/src/components/Variants/Standard/ScoreState/MatchQuizStandardScoreState.js +135 -0
  322. package/packages/match-quiz-play/src/components/Variants/Standard/ScoreState/MatchQuizStandardScoreState.styles.js +259 -0
  323. package/packages/match-quiz-play/src/components/Variants/Standard/SignIn/MatchQuizStandardSignIn.js +129 -0
  324. package/packages/match-quiz-play/src/components/Variants/Standard/SignIn/MatchQuizStandardSignIn.styles.js +239 -0
  325. package/packages/match-quiz-play/src/helpers/helpers.js +9 -0
  326. package/packages/match-quiz-play/src/hooks/useMatchQuiz.js +42 -0
  327. package/packages/match-quiz-play/src/hooks/useMatchQuizLeaderboard.js +53 -0
  328. package/packages/match-quiz-play/src/hooks/useMatchQuizMarketsResults.js +29 -0
  329. package/packages/match-quiz-play/src/hooks/useMatchQuizPrediction.js +38 -0
  330. package/packages/match-quiz-play/src/index.js +4 -0
  331. package/packages/match-quiz-play/src/main.js +7 -0
  332. package/packages/match-quiz-play/src/providers/ConstantsProvider.js +26 -0
  333. package/packages/personality-quiz-play/dist/personality-quiz-play.es.js +39513 -0
  334. package/packages/poll-vote/src/assets/default-quiz-bg-vertical.jpg.js +4 -0
  335. package/packages/poll-vote/src/assets/default-quiz-bg.png.js +4 -0
  336. package/packages/poll-vote/src/components/Leads/CollectLeadWrapper.js +65 -0
  337. package/packages/poll-vote/src/components/PollNotFound.js +23 -0
  338. package/packages/poll-vote/src/components/PollVote.js +270 -0
  339. package/packages/poll-vote/src/components/Shared/AlertMessage.js +93 -0
  340. package/packages/poll-vote/src/components/Shared/Answers/PollOption.js +132 -0
  341. package/packages/poll-vote/src/components/Shared/Answers/PollOptions.js +82 -0
  342. package/packages/poll-vote/src/components/Shared/Button.js +76 -0
  343. package/packages/poll-vote/src/components/Shared/MainCard.js +36 -0
  344. package/packages/poll-vote/src/components/Shared/PresentedBy.js +118 -0
  345. package/packages/poll-vote/src/components/Shared/Results/PollOptionResult.js +257 -0
  346. package/packages/poll-vote/src/components/Shared/Results/PollOptionsResults.js +232 -0
  347. package/packages/poll-vote/src/components/Variants/Overlay/Error/PollOverlayError.js +45 -0
  348. package/packages/poll-vote/src/components/Variants/Overlay/LeadCollection/OverlayLeadAfterCollection.js +34 -0
  349. package/packages/poll-vote/src/components/Variants/Overlay/PollOverlayVariant.js +137 -0
  350. package/packages/poll-vote/src/components/Variants/Overlay/PollOverlayVariant.styles.js +105 -0
  351. package/packages/poll-vote/src/components/Variants/Overlay/ScoreState/PollOverlayScoreState.js +107 -0
  352. package/packages/poll-vote/src/components/Variants/Overlay/ScoreState/PollOverlayScoreState.styles.js +178 -0
  353. package/packages/poll-vote/src/components/Variants/Overlay/SignIn/PollOverlaySignIn.js +120 -0
  354. package/packages/poll-vote/src/components/Variants/Overlay/SignIn/PollOverlaySignIn.styles.js +42 -0
  355. package/packages/poll-vote/src/components/Variants/Split/Error/PollSplitError.js +42 -0
  356. package/packages/poll-vote/src/components/Variants/Split/LeadCollection/SplitLeadAfterCollection.js +36 -0
  357. package/packages/poll-vote/src/components/Variants/Split/PollSplitVariant.js +231 -0
  358. package/packages/poll-vote/src/components/Variants/Split/PollSplitVariant.styles.js +332 -0
  359. package/packages/poll-vote/src/components/Variants/Split/ScoreState/PollSplitScoreState.js +155 -0
  360. package/packages/poll-vote/src/components/Variants/Split/ScoreState/PollSplitScoreState.styles.js +156 -0
  361. package/packages/poll-vote/src/components/Variants/Split/SignIn/PollSplitSignIn.js +117 -0
  362. package/packages/poll-vote/src/components/Variants/Split/SignIn/PollSplitSignIn.styles.js +52 -0
  363. package/packages/poll-vote/src/components/Variants/Standard/Error/PollStandardError.js +43 -0
  364. package/packages/poll-vote/src/components/Variants/Standard/LeadCollection/StandardLeadAfterCollection.js +34 -0
  365. package/packages/poll-vote/src/components/Variants/Standard/PollStandardVariant.js +138 -0
  366. package/packages/poll-vote/src/components/Variants/Standard/PollStandardVariant.styles.js +92 -0
  367. package/packages/poll-vote/src/components/Variants/Standard/ScoreState/PollStandardScoreState.js +146 -0
  368. package/packages/poll-vote/src/components/Variants/Standard/ScoreState/PollStandardScoreState.styles.js +164 -0
  369. package/packages/poll-vote/src/components/Variants/Standard/SignIn/PollStandardSignIn.js +129 -0
  370. package/packages/poll-vote/src/components/Variants/Standard/SignIn/PollStandardSignIn.styles.js +248 -0
  371. package/packages/poll-vote/src/hooks/useEmbedCodeContainer.js +30 -0
  372. package/packages/poll-vote/src/hooks/useMyPollVote.js +43 -0
  373. package/packages/poll-vote/src/hooks/usePollById.js +16 -0
  374. package/packages/poll-vote/src/hooks/usePollOptionsImages.js +19 -0
  375. package/packages/poll-vote/src/index.js +4 -0
  376. package/packages/poll-vote/src/main.js +7 -0
  377. package/components.js +0 -105201
@@ -0,0 +1,151 @@
1
+ import { j as o } from "../../../../../node_modules/react/jsx-runtime.js";
2
+ import { Box as i, Typography as u } from "@mui/joy";
3
+ import { useColors as C, useCornerRadius as y, isMobile as f, getSpacing as j } from "../../../../common/src/functions/theme.js";
4
+ import "../../../../../node_modules/i18next/dist/esm/i18next.js";
5
+ import "../../../../../node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js";
6
+ import "react";
7
+ import "../../../../common/src/providers/ConstantsProvider.js";
8
+ import "../../../../common/src/providers/ContainerProvider.js";
9
+ const z = (e) => {
10
+ const r = C(), p = y(), m = f(), g = () => {
11
+ const c = p.full, a = e.brandingPrimaryColor || r.palette.primary.plainColor, l = e.brandingPrimaryColor || r.palette.primary.outlinedBorder, n = "#FFFFFF", t = r.outlineEnabledBorder;
12
+ return /* @__PURE__ */ o.jsxs(
13
+ i,
14
+ {
15
+ sx: {
16
+ display: "flex",
17
+ alignItems: "center",
18
+ justifyContent: "center",
19
+ width: "100%"
20
+ },
21
+ children: [
22
+ /* @__PURE__ */ o.jsx(
23
+ i,
24
+ {
25
+ sx: {
26
+ flex: 1,
27
+ height: "3px",
28
+ backgroundColor: t,
29
+ borderRadius: "1px"
30
+ }
31
+ }
32
+ ),
33
+ /* @__PURE__ */ o.jsx(
34
+ i,
35
+ {
36
+ sx: {
37
+ width: "32px",
38
+ height: "32px",
39
+ borderRadius: c,
40
+ backgroundColor: a,
41
+ border: `1px solid ${l}`,
42
+ display: "flex",
43
+ alignItems: "center",
44
+ justifyContent: "center",
45
+ transition: "background-color 0.3s ease",
46
+ mx: 1.5
47
+ // Add margin between lines and circle
48
+ },
49
+ children: /* @__PURE__ */ o.jsx(
50
+ u,
51
+ {
52
+ sx: {
53
+ fontSize: "14px",
54
+ fontWeight: 600,
55
+ color: n,
56
+ lineHeight: 1
57
+ },
58
+ children: e.currentStep
59
+ }
60
+ )
61
+ }
62
+ ),
63
+ /* @__PURE__ */ o.jsx(
64
+ i,
65
+ {
66
+ sx: {
67
+ flex: 1,
68
+ height: "3px",
69
+ backgroundColor: t,
70
+ borderRadius: "1px"
71
+ }
72
+ }
73
+ )
74
+ ]
75
+ }
76
+ );
77
+ }, b = () => {
78
+ const c = p.full, a = e.totalSteps || e.matchQuiz.fixtures.length, l = [];
79
+ for (let n = 0; n < a; n++) {
80
+ const t = n + 1;
81
+ let s, d, x;
82
+ if (t < e.currentStep ? (s = e.brandingPrimaryColor || r.palette.primary.plainColor, d = e.brandingPrimaryColor || r.palette.primary.outlinedBorder, x = "#FFFFFF") : t === e.currentStep ? (s = e.brandingPrimaryColor || r.palette.primary.plainColor, d = e.brandingPrimaryColor || r.palette.primary.outlinedBorder, x = r.palette.primary.onPrimary) : (s = r.palette.neutral.softBg, d = r.outlineEnabledBorder, x = r.textColor), l.push(
83
+ /* @__PURE__ */ o.jsx(
84
+ i,
85
+ {
86
+ sx: {
87
+ width: "32px",
88
+ height: "32px",
89
+ borderRadius: c,
90
+ backgroundColor: s,
91
+ border: `1px solid ${d}`,
92
+ display: "flex",
93
+ alignItems: "center",
94
+ justifyContent: "center",
95
+ transition: "background-color 0.3s ease",
96
+ position: "relative"
97
+ },
98
+ children: /* @__PURE__ */ o.jsx(
99
+ u,
100
+ {
101
+ sx: {
102
+ fontSize: "14px",
103
+ fontWeight: 600,
104
+ color: x,
105
+ lineHeight: 1
106
+ },
107
+ children: t
108
+ }
109
+ )
110
+ },
111
+ `step-${t}`
112
+ )
113
+ ), n < a - 1) {
114
+ const h = t < e.currentStep ? e.brandingPrimaryColor || r.palette.primary.plainColor : r.outlineEnabledBorder;
115
+ l.push(
116
+ /* @__PURE__ */ o.jsx(
117
+ i,
118
+ {
119
+ sx: {
120
+ width: "32px",
121
+ height: "3px",
122
+ backgroundColor: h,
123
+ transition: "background-color 0.3s ease",
124
+ borderRadius: "2px"
125
+ }
126
+ },
127
+ `line-${t}`
128
+ )
129
+ );
130
+ }
131
+ }
132
+ return l;
133
+ };
134
+ return /* @__PURE__ */ o.jsx(
135
+ i,
136
+ {
137
+ sx: {
138
+ display: "flex",
139
+ alignItems: "center",
140
+ justifyContent: "center",
141
+ py: j("xs"),
142
+ width: "100%",
143
+ zIndex: 1
144
+ },
145
+ children: m || e.isSplitVariant ? g() : b()
146
+ }
147
+ );
148
+ };
149
+ export {
150
+ z as default
151
+ };
@@ -0,0 +1,172 @@
1
+ import { j as i } from "../../../../../../node_modules/react/jsx-runtime.js";
2
+ import { useState as E } from "react";
3
+ import { Modal as j, ModalDialog as k, IconButton as F, DialogContent as T, DialogActions as _, Button as y } from "@mui/joy";
4
+ import w from "../../../../../../node_modules/@mui/icons-material/esm/Close.js";
5
+ import { useColors as M, useCornerRadius as O, useFontFamily as A, useSpacingScale as D } from "../../../../../common/src/functions/theme.js";
6
+ import "../../../../../../node_modules/i18next/dist/esm/i18next.js";
7
+ import "../../../../../../node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js";
8
+ import { useConstantContext as H } from "../../../../../common/src/hooks/useConstantContext.js";
9
+ import { ConstantsContext as I } from "../../../../../common/src/providers/ConstantsProvider.js";
10
+ import "../../../../../common/src/providers/ContainerProvider.js";
11
+ import { MarketEnum as l } from "fansunited-sdk-esm";
12
+ import { createStyles as N } from "./EditPredictionModal.styles.js";
13
+ import B from "../Fixtures/CorrectScore/CorrectScoreFixture.js";
14
+ import V from "../Fixtures/1X2/OneXTwoFixture.js";
15
+ import X from "../Fixtures/Corners/CornersFixture.js";
16
+ import p from "../Fixtures/YesNo/YesNoFixture.js";
17
+ import z from "../Fixtures/Players/PlayersFixture.js";
18
+ import { isPlayersMarket as Q } from "../../../helpers/helpers.js";
19
+ import { useTranslation as Y } from "../../../../../../node_modules/react-i18next/dist/es/useTranslation.js";
20
+ const mo = (o) => {
21
+ const { t: m } = Y(), { shadowRootElement: x } = H(I), n = M(), h = O(), d = A(), S = D(), [u, C] = E(!1), f = N({
22
+ spacingScale: S,
23
+ borderRadius: h,
24
+ fontFamilyPrimary: d.primary,
25
+ fontFamilySecondary: d.secondary,
26
+ textPrimary: n.textPrimary,
27
+ textSecondary: n.textSecondary,
28
+ primaryColor: o.brandingPrimaryColor || n.palette.primary.plainColor,
29
+ surface: n.surface
30
+ }), r = o.prediction.fixtures.find(
31
+ (e) => e.market === o.fixture.market
32
+ ), s = (e) => {
33
+ const a = { ...o.prediction }, t = a.fixtures.findIndex(
34
+ (c) => c.market === o.fixture.market
35
+ );
36
+ t !== -1 && (a.fixtures[t] = {
37
+ ...a.fixtures[t],
38
+ prediction: e
39
+ }), o.onPredictionUpdate(a);
40
+ }, g = async () => {
41
+ C(!0);
42
+ try {
43
+ await o.play(), o.onPlayResult && o.onPlayResult({ success: !0 }), o.onClose();
44
+ } catch (e) {
45
+ console.error("Failed to save prediction:", e), o.onPlayResult && o.onPlayResult({ success: !1, error: e }), o.view !== "score" && o.onClose();
46
+ } finally {
47
+ C(!1);
48
+ }
49
+ }, R = () => {
50
+ const e = o.fixture.market, a = o.fixture.matchModel;
51
+ if (e === l.CORRECT_SCORE || e === l.CORRECT_SCORE_HT || e === l.CORRECT_SCORE_ADVANCED) {
52
+ const t = (r == null ? void 0 : r.prediction.value) || "0:0", [c, v] = t.split(":").map(Number);
53
+ return /* @__PURE__ */ i.jsx(
54
+ B,
55
+ {
56
+ matchModel: a,
57
+ market: e,
58
+ onScoreChange: (P, b) => {
59
+ s({ value: `${P}:${b}` });
60
+ },
61
+ initialHomeScore: c,
62
+ initialAwayScore: v,
63
+ showPoints: !1
64
+ }
65
+ );
66
+ }
67
+ return e === l.FT_1X2 || e === l.HT_1X2 ? /* @__PURE__ */ i.jsx(
68
+ V,
69
+ {
70
+ matchModel: a,
71
+ market: e,
72
+ onSelectionChange: (t) => {
73
+ s({ value: t });
74
+ },
75
+ brandingPrimaryColor: o.brandingPrimaryColor,
76
+ prediction: r == null ? void 0 : r.prediction.value,
77
+ showPoints: !1
78
+ }
79
+ ) : e === l.CORNERS_MATCH ? /* @__PURE__ */ i.jsx(
80
+ X,
81
+ {
82
+ matchModel: a,
83
+ market: l.CORNERS_MATCH,
84
+ prediction: r == null ? void 0 : r.prediction.value,
85
+ onCornersChange: (t) => {
86
+ s({ value: t });
87
+ },
88
+ showPoints: !1
89
+ }
90
+ ) : Q(e) ? /* @__PURE__ */ i.jsx(
91
+ z,
92
+ {
93
+ matchModel: a,
94
+ prediction: r == null ? void 0 : r.prediction.playerId,
95
+ market: e,
96
+ onPlayerSelection: (t) => {
97
+ s({ playerId: t, value: !0 });
98
+ },
99
+ brandingPrimaryColor: o.brandingPrimaryColor,
100
+ showPoints: !1
101
+ }
102
+ ) : e === l.PENALTY_MATCH || e === l.RED_CARD_MATCH || e.includes("OVER_") ? /* @__PURE__ */ i.jsx(
103
+ p,
104
+ {
105
+ matchModel: a,
106
+ market: e,
107
+ onSelectionChange: (t) => {
108
+ s({ value: t });
109
+ },
110
+ brandingPrimaryColor: o.brandingPrimaryColor,
111
+ prediction: r == null ? void 0 : r.prediction.value,
112
+ showPoints: !1
113
+ }
114
+ ) : null;
115
+ };
116
+ return /* @__PURE__ */ i.jsx(
117
+ j,
118
+ {
119
+ open: o.isOpen,
120
+ onClose: o.onClose,
121
+ container: x,
122
+ children: /* @__PURE__ */ i.jsxs(k, { sx: f.modalDialog, children: [
123
+ /* @__PURE__ */ i.jsx(F, { onClick: o.onClose, sx: f.closeButton, children: /* @__PURE__ */ i.jsx(w, {}) }),
124
+ /* @__PURE__ */ i.jsx(T, { children: R() }),
125
+ o.view === "score" && /* @__PURE__ */ i.jsxs(_, { children: [
126
+ /* @__PURE__ */ i.jsx(
127
+ y,
128
+ {
129
+ variant: "solid",
130
+ onClick: g,
131
+ loading: u,
132
+ sx: {
133
+ backgroundColor: o.brandingPrimaryColor || void 0,
134
+ "&:hover": {
135
+ backgroundColor: o.brandingPrimaryColor || void 0,
136
+ opacity: 0.8
137
+ }
138
+ },
139
+ children: m("matchQuiz.buttons.save")
140
+ }
141
+ ),
142
+ /* @__PURE__ */ i.jsx(
143
+ y,
144
+ {
145
+ variant: "outlined",
146
+ onClick: o.onClose,
147
+ disabled: u,
148
+ sx: {
149
+ borderColor: n.secondaryContainer,
150
+ color: n.secondaryContainer,
151
+ "&:hover": {
152
+ borderColor: n.textPrimary,
153
+ color: n.textPrimary,
154
+ backgroundColor: n.surfaceVariant
155
+ },
156
+ "&:disabled": {
157
+ borderColor: n.secondaryContainer,
158
+ color: n.secondaryContainer,
159
+ opacity: 0.5
160
+ }
161
+ },
162
+ children: m("matchQuiz.buttons.close")
163
+ }
164
+ )
165
+ ] })
166
+ ] })
167
+ }
168
+ );
169
+ };
170
+ export {
171
+ mo as default
172
+ };
@@ -0,0 +1,109 @@
1
+ import { isMobile as o } from "../../../../../common/src/functions/theme.js";
2
+ import "../../../../../../node_modules/i18next/dist/esm/i18next.js";
3
+ import "../../../../../../node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js";
4
+ import "../../../../../../node_modules/react/jsx-runtime.js";
5
+ import "@mui/joy";
6
+ import "react";
7
+ import "../../../../../common/src/providers/ConstantsProvider.js";
8
+ import "../../../../../common/src/providers/ContainerProvider.js";
9
+ const g = (t) => {
10
+ const e = o();
11
+ return {
12
+ modalDialog: {
13
+ width: "100%",
14
+ maxWidth: e ? "90vw" : "600px",
15
+ maxHeight: e ? "90vh" : "80vh",
16
+ overflow: "auto",
17
+ p: e ? 2 : 3,
18
+ borderRadius: t.borderRadius.md,
19
+ backgroundColor: t.surface
20
+ },
21
+ content: {
22
+ display: "flex",
23
+ flexDirection: "column",
24
+ gap: t.spacingScale.md
25
+ },
26
+ title: {
27
+ fontFamily: t.fontFamilyPrimary,
28
+ fontWeight: 600,
29
+ fontSize: e ? "1.25em" : "1.5em",
30
+ lineHeight: 1.2,
31
+ color: t.textPrimary,
32
+ textAlign: "center",
33
+ marginBottom: t.spacingScale.sm
34
+ },
35
+ questionText: {
36
+ fontFamily: t.fontFamilySecondary,
37
+ fontWeight: 500,
38
+ fontSize: e ? "1em" : "1.125em",
39
+ lineHeight: 1.3,
40
+ color: t.textSecondary,
41
+ textAlign: "center",
42
+ marginBottom: t.spacingScale.md
43
+ },
44
+ buttonContainer: {
45
+ marginTop: t.spacingScale.lg,
46
+ justifyContent: "center",
47
+ alignItems: "center"
48
+ },
49
+ cancelButton: {
50
+ fontFamily: t.fontFamilySecondary,
51
+ fontWeight: 500,
52
+ fontSize: "0.875em",
53
+ borderRadius: t.borderRadius.sm,
54
+ padding: `${t.spacingScale.sm} ${t.spacingScale.md}`,
55
+ minWidth: e ? "100px" : "120px",
56
+ borderColor: t.primaryColor,
57
+ color: t.primaryColor,
58
+ "&:hover": {
59
+ backgroundColor: `${t.primaryColor}10`,
60
+ borderColor: t.primaryColor
61
+ }
62
+ },
63
+ saveButton: {
64
+ fontFamily: t.fontFamilySecondary,
65
+ fontWeight: 500,
66
+ fontSize: "0.875em",
67
+ borderRadius: t.borderRadius.sm,
68
+ padding: `${t.spacingScale.sm} ${t.spacingScale.md}`,
69
+ minWidth: e ? "100px" : "120px",
70
+ backgroundColor: t.primaryColor,
71
+ color: "#ffffff",
72
+ "&:hover": {
73
+ backgroundColor: t.primaryColor,
74
+ opacity: 0.9
75
+ }
76
+ },
77
+ closeButton: {
78
+ position: "absolute",
79
+ top: t.spacingScale.sm,
80
+ right: t.spacingScale.sm,
81
+ backgroundColor: "transparent",
82
+ color: t.textSecondary,
83
+ border: "none",
84
+ borderRadius: "50%",
85
+ width: "32px",
86
+ height: "32px",
87
+ minHeight: "32px",
88
+ minWidth: "32px",
89
+ padding: 0,
90
+ display: "flex",
91
+ alignItems: "center",
92
+ justifyContent: "center",
93
+ cursor: "pointer",
94
+ transition: "all 0.2s ease-in-out",
95
+ zIndex: 1e3,
96
+ "&:hover": {
97
+ backgroundColor: `${t.textSecondary}15`,
98
+ color: t.textPrimary,
99
+ transform: "scale(1.05)"
100
+ },
101
+ "& svg": {
102
+ fontSize: "1.25em"
103
+ }
104
+ }
105
+ };
106
+ };
107
+ export {
108
+ g as createStyles
109
+ };
@@ -0,0 +1,235 @@
1
+ import { j as e } from "../../../../../../node_modules/react/jsx-runtime.js";
2
+ import { useState as O } from "react";
3
+ import { Box as c, Typography as m, Sheet as v, Table as H, IconButton as Y } from "@mui/joy";
4
+ import { useColors as D, useCornerRadius as I, useFontFamily as V, useSpacingScale as N, isMobile as G } from "../../../../../common/src/functions/theme.js";
5
+ import "../../../../../../node_modules/i18next/dist/esm/i18next.js";
6
+ import "../../../../../../node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js";
7
+ import { useConstantContext as k } from "../../../../../common/src/hooks/useConstantContext.js";
8
+ import "../../../../../common/src/providers/ConstantsProvider.js";
9
+ import "../../../../../common/src/providers/ContainerProvider.js";
10
+ import { createStyles as X } from "./PredictionSummary.styles.js";
11
+ import { MarketEnum as i } from "fansunited-sdk-esm";
12
+ import U from "../../../../../../node_modules/@mui/icons-material/esm/Edit.js";
13
+ import W from "../../../../../../node_modules/@mui/icons-material/esm/PersonOutline.js";
14
+ import q from "./EditPredictionModal.js";
15
+ import { MatchQuizConstantsContext as $ } from "../../../providers/ConstantsProvider.js";
16
+ import { useTranslation as K } from "../../../../../../node_modules/react-i18next/dist/es/useTranslation.js";
17
+ const he = (d) => {
18
+ const { t: r } = K(), h = D(), A = I(), T = V(), F = N(), g = G(), { squads: P } = k($), [z, f] = O(!1), [C, R] = O(null), t = X({
19
+ spacingScale: F,
20
+ borderRadius: A,
21
+ fontFamilyPrimary: T.primary,
22
+ fontFamilySecondary: T.secondary,
23
+ textPrimary: h.textPrimary,
24
+ textSecondary: h.textSecondary,
25
+ primaryColor: d.brandingPrimaryColor || h.palette.primary.plainColor,
26
+ surfaceVariant: h.surfaceVariant,
27
+ outlineEnabledBorder: h.outlineEnabledBorder,
28
+ outlinedBorder: h.palette.neutral.outlinedBorder,
29
+ neutralSoftBg: h.palette.neutral.softBg,
30
+ isMobile: g,
31
+ isSplitVariant: d.isSplitVariant || !1
32
+ }), Q = (s) => {
33
+ const o = d.fixtures[s];
34
+ R(o), f(!0);
35
+ }, b = () => {
36
+ f(!1), R(null);
37
+ }, w = (s) => {
38
+ d.onPredictionUpdate(s);
39
+ }, L = (s) => {
40
+ switch (s) {
41
+ case i.CORRECT_SCORE:
42
+ case i.CORRECT_SCORE_ADVANCED:
43
+ return r("matchQuiz.fixtures.correctScoreFixtureTitle");
44
+ case i.CORRECT_SCORE_HT:
45
+ return r("matchQuiz.fixtures.correctScoreFixtureTitleHT");
46
+ case i.FT_1X2:
47
+ return r("matchQuiz.fixtures.oneXTwoFixtureTitle");
48
+ case i.HT_1X2:
49
+ return r("matchQuiz.fixtures.oneXTwoFixtureTitleHT");
50
+ case i.CORNERS_MATCH:
51
+ return r("matchQuiz.fixtures.cornersFixtureTitle");
52
+ case i.PLAYER_SCORE_FIRST_GOAL:
53
+ return r("matchQuiz.fixtures.playerScoreFirstGoalFixtureTitle");
54
+ case i.PLAYER_SCORE:
55
+ return r("matchQuiz.fixtures.playerScoreFixtureTitle");
56
+ case i.PLAYER_YELLOW_CARD:
57
+ return r("matchQuiz.fixtures.playerYellowCardFixtureTitle");
58
+ case i.PLAYER_RED_CARD:
59
+ return r("matchQuiz.fixtures.playerRedCardFixtureTitle");
60
+ case i.PLAYER_SCORE_HATTRICK:
61
+ return r("matchQuiz.fixtures.playerScoreHattrickFixtureTitle");
62
+ case i.PLAYER_SCORE_TWICE:
63
+ return r("matchQuiz.fixtures.playerScoreTwiceFixtureTitle");
64
+ case i.PENALTY_MATCH:
65
+ return r("matchQuiz.fixtures.penaltyFixtureTitle");
66
+ case i.RED_CARD_MATCH:
67
+ return r("matchQuiz.fixtures.redCardFixtureTitle");
68
+ default:
69
+ if (s.includes("OVER_GOALS")) {
70
+ const o = s.replace("OVER_GOALS_", "").replace("_", "."), n = Math.floor(parseFloat(o));
71
+ return r("matchQuiz.fixtures.overGoalsFixtureTitle", { threshold: n });
72
+ }
73
+ if (s.includes("OVER_CORNERS")) {
74
+ const o = s.replace("OVER_CORNERS_", "").replace("_", "."), n = Math.floor(parseFloat(o));
75
+ return r("matchQuiz.fixtures.overCornersFixtureTitle", { threshold: n });
76
+ }
77
+ return "";
78
+ }
79
+ }, B = (s) => {
80
+ for (const [, o] of P.entries()) {
81
+ const n = o.find((u) => u.id === s);
82
+ if (n)
83
+ return n;
84
+ }
85
+ return null;
86
+ }, M = (s) => {
87
+ var p, y, E, j, _, S;
88
+ const o = (p = d.prediction.fixtures) == null ? void 0 : p.find(
89
+ (a) => a.market === s.market
90
+ );
91
+ if (!o) return null;
92
+ const n = s.market, u = s.matchModel;
93
+ if (n === i.CORRECT_SCORE || n === i.CORRECT_SCORE_HT || n === i.CORRECT_SCORE_ADVANCED) {
94
+ const a = o.prediction.value || "0:0", [l, x] = a.split(":");
95
+ return /* @__PURE__ */ e.jsxs(c, { sx: t.predictionBox, children: [
96
+ ((y = u.homeTeam.assets) == null ? void 0 : y.logo) && /* @__PURE__ */ e.jsx(c, { sx: t.teamLogo, children: /* @__PURE__ */ e.jsx(
97
+ "img",
98
+ {
99
+ src: u.homeTeam.assets.logo,
100
+ alt: u.homeTeam.name,
101
+ style: {
102
+ width: "100%",
103
+ height: "100%",
104
+ borderRadius: "50%",
105
+ objectFit: "cover"
106
+ }
107
+ }
108
+ ) }),
109
+ /* @__PURE__ */ e.jsxs(m, { sx: t.selectionText, children: [
110
+ l,
111
+ ":",
112
+ x
113
+ ] }),
114
+ ((E = u.awayTeam.assets) == null ? void 0 : E.logo) && /* @__PURE__ */ e.jsx(c, { sx: t.teamLogo, children: /* @__PURE__ */ e.jsx(
115
+ "img",
116
+ {
117
+ src: u.awayTeam.assets.logo,
118
+ alt: u.awayTeam.name,
119
+ style: {
120
+ width: "100%",
121
+ height: "100%",
122
+ borderRadius: "50%",
123
+ objectFit: "cover"
124
+ }
125
+ }
126
+ ) })
127
+ ] });
128
+ }
129
+ if (n === i.FT_1X2 || n === i.HT_1X2) {
130
+ const a = o.prediction.value;
131
+ let l = "", x = null;
132
+ return a === "1" ? (l = u.homeTeam.name, x = (j = u.homeTeam.assets) == null ? void 0 : j.logo) : a === "x" ? l = r("matchQuiz.fixtures.draw") : a === "2" && (l = u.awayTeam.name, x = (_ = u.awayTeam.assets) == null ? void 0 : _.logo), /* @__PURE__ */ e.jsxs(c, { sx: t.predictionBox, children: [
133
+ x && /* @__PURE__ */ e.jsx(c, { sx: t.teamLogo, children: /* @__PURE__ */ e.jsx(
134
+ "img",
135
+ {
136
+ src: x,
137
+ alt: l,
138
+ style: {
139
+ width: "100%",
140
+ height: "100%",
141
+ borderRadius: "50%",
142
+ objectFit: "cover"
143
+ }
144
+ }
145
+ ) }),
146
+ /* @__PURE__ */ e.jsx(m, { sx: t.selectionText, children: l })
147
+ ] });
148
+ }
149
+ if (n.includes("PLAYER_")) {
150
+ const a = o.prediction.playerId;
151
+ if (!a)
152
+ return /* @__PURE__ */ e.jsx(c, { sx: t.predictionBox, children: /* @__PURE__ */ e.jsx(m, { sx: t.selectionText, children: r("matchQuiz.fixtures.noGoalWillBeScored") }) });
153
+ if (a === "OWN_GOAL")
154
+ return /* @__PURE__ */ e.jsx(c, { sx: t.predictionBox, children: /* @__PURE__ */ e.jsx(m, { sx: t.selectionText, children: r("matchQuiz.fixtures.ownGoal") }) });
155
+ const l = B(a), x = (l == null ? void 0 : l.name) || "Unknown Player";
156
+ return /* @__PURE__ */ e.jsxs(c, { sx: t.predictionBox, children: [
157
+ /* @__PURE__ */ e.jsx(c, { sx: t.playerAvatar, children: (S = l == null ? void 0 : l.assets) != null && S.headshot ? /* @__PURE__ */ e.jsx(
158
+ "img",
159
+ {
160
+ src: l.assets.headshot,
161
+ alt: x,
162
+ style: {
163
+ width: "100%",
164
+ height: "100%",
165
+ objectFit: "cover",
166
+ borderRadius: "50%"
167
+ }
168
+ }
169
+ ) : /* @__PURE__ */ e.jsx(W, { sx: t.playerAvatarIcon }) }),
170
+ /* @__PURE__ */ e.jsx(m, { sx: t.selectionText, children: x })
171
+ ] });
172
+ }
173
+ if (n === i.PENALTY_MATCH || n === i.RED_CARD_MATCH || n.includes("OVER_")) {
174
+ const a = o.prediction.value === !0;
175
+ return /* @__PURE__ */ e.jsx(c, { sx: t.predictionBox, children: /* @__PURE__ */ e.jsx(m, { sx: t.selectionText, children: r(a ? "matchQuiz.fixtures.yes" : "matchQuiz.fixtures.no") }) });
176
+ }
177
+ if (n === i.CORNERS_MATCH) {
178
+ const a = o.prediction.value || 6;
179
+ return /* @__PURE__ */ e.jsx(c, { sx: t.predictionBox, children: /* @__PURE__ */ e.jsx(m, { sx: t.selectionText, children: a }) });
180
+ }
181
+ return null;
182
+ };
183
+ return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(c, { sx: t.container, children: [
184
+ /* @__PURE__ */ e.jsx(m, { sx: t.title, children: r("matchQuiz.summary.title") }),
185
+ /* @__PURE__ */ e.jsx(v, { sx: t.tableContainer, children: /* @__PURE__ */ e.jsxs(
186
+ H,
187
+ {
188
+ variant: "outlined",
189
+ hoverRow: !1,
190
+ borderAxis: "bothBetween",
191
+ size: "sm",
192
+ sx: t.table,
193
+ children: [
194
+ /* @__PURE__ */ e.jsx("thead", { children: /* @__PURE__ */ e.jsxs("tr", { children: [
195
+ /* @__PURE__ */ e.jsx("th", { style: t.headerCell, children: r("matchQuiz.summary.prediction") }),
196
+ /* @__PURE__ */ e.jsx("th", { style: t.headerCellAction })
197
+ ] }) }),
198
+ /* @__PURE__ */ e.jsx("tbody", { children: d.fixtures.map((s, o) => /* @__PURE__ */ e.jsxs("tr", { children: [
199
+ /* @__PURE__ */ e.jsx("td", { style: t.predictionCell, children: /* @__PURE__ */ e.jsxs(c, { sx: t.predictionContent, children: [
200
+ /* @__PURE__ */ e.jsx(m, { sx: t.questionText, children: L(s.market) }),
201
+ M(s)
202
+ ] }) }),
203
+ /* @__PURE__ */ e.jsx("td", { style: t.actionCell, children: /* @__PURE__ */ e.jsx(
204
+ Y,
205
+ {
206
+ variant: "plain",
207
+ size: "sm",
208
+ sx: t.editIconButton,
209
+ onClick: () => Q(o),
210
+ children: /* @__PURE__ */ e.jsx(U, {})
211
+ }
212
+ ) })
213
+ ] }, `${s.market}-${o}`)) })
214
+ ]
215
+ }
216
+ ) }),
217
+ C && /* @__PURE__ */ e.jsx(
218
+ q,
219
+ {
220
+ isOpen: z,
221
+ onClose: b,
222
+ fixture: C,
223
+ prediction: d.prediction,
224
+ brandingPrimaryColor: d.brandingPrimaryColor,
225
+ onPredictionUpdate: w,
226
+ play: d.play,
227
+ view: d.view,
228
+ onPlayResult: d.onPlayResult
229
+ }
230
+ )
231
+ ] }) });
232
+ };
233
+ export {
234
+ he as default
235
+ };