@opexa/portal-components 0.0.899 → 0.0.900

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 (299) hide show
  1. package/dist/client/hooks/useGlobalStore.d.ts +2 -0
  2. package/dist/client/hooks/useGlobalStore.js +5 -0
  3. package/dist/components/Banner/Banner.client.d.ts +12 -0
  4. package/dist/components/Banner/Banner.client.js +49 -0
  5. package/dist/components/Banner/Banner.js +1 -1
  6. package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/AurixPayQRPHDepositContext.d.ts +2 -2
  7. package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/useAurixPayQRPHDeposit.d.ts +1 -1
  8. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.d.ts +2 -2
  9. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.d.ts +1 -1
  10. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositContext.d.ts +2 -2
  11. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/useQRPHDeposit.d.ts +1 -1
  12. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositContext.d.ts +2 -2
  13. package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/useOnlineBankDeposit.d.ts +1 -1
  14. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositContext.d.ts +2 -2
  15. package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/useQRPHDeposit.d.ts +1 -1
  16. package/dist/components/DigitainLauncher/Loading.js +1 -1
  17. package/dist/components/ForgotPassword/Crazywin/ForgotPassword.module.css +42 -42
  18. package/dist/components/GameLaunch/GameLaunchTrigger.js +3 -1
  19. package/dist/components/Jackpots/Jackpots.module.css +288 -288
  20. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
  21. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
  22. package/dist/components/KYC/BasicInformation.js +1 -1
  23. package/dist/components/KYC/IdentityVerification.js +1 -1
  24. package/dist/components/KYC/KYC.lazy.js +1 -1
  25. package/dist/components/KYC/KYCDefault/KYCVerificationStatus.lazy.js +2 -2
  26. package/dist/components/KYC/KYCNonPagCor/KYCVerificationStatus.lazy.js +2 -2
  27. package/dist/components/KYC/KYCVerificationStatus.lazy.js +5 -8
  28. package/dist/components/KYC/PersonalInformation.js +1 -1
  29. package/dist/components/PortalProvider/AndroidOnlyComponents.d.ts +1 -0
  30. package/dist/components/PortalProvider/AndroidOnlyComponents.js +12 -0
  31. package/dist/components/PortalProvider/CXDTokenObserver.js +11 -11
  32. package/dist/components/PortalProvider/PortalProvider.d.ts +1 -1
  33. package/dist/components/PortalProvider/PortalProvider.js +2 -2
  34. package/dist/components/PortalProvider/Providers.d.ts +3 -2
  35. package/dist/components/PortalProvider/Providers.js +12 -1
  36. package/dist/components/Quests/Crazywin/CWDailyCheckInQuest.d.ts +15 -0
  37. package/dist/components/Quests/Crazywin/CWDailyCheckInQuest.js +116 -0
  38. package/dist/components/Quests/Crazywin/CWJourneyQuest.d.ts +18 -0
  39. package/dist/components/Quests/Crazywin/CWJourneyQuest.js +137 -0
  40. package/dist/components/Quests/Crazywin/CWOnboardingQuest.d.ts +6 -0
  41. package/dist/components/Quests/Crazywin/CWOnboardingQuest.js +81 -0
  42. package/dist/components/Quests/Crazywin/CWWageringQuestNext.d.ts +23 -0
  43. package/dist/components/Quests/Crazywin/CWWageringQuestNext.js +53 -0
  44. package/dist/components/Quests/Crazywin/components/Countdown.d.ts +7 -0
  45. package/dist/components/Quests/Crazywin/components/Countdown.js +62 -0
  46. package/dist/components/Quests/Crazywin/components/DialogCheckin.d.ts +8 -0
  47. package/dist/components/Quests/Crazywin/components/DialogCheckin.js +12 -0
  48. package/dist/components/Quests/Crazywin/components/DialogJourney.d.ts +17 -0
  49. package/dist/components/Quests/Crazywin/components/DialogJourney.js +43 -0
  50. package/dist/components/Quests/Crazywin/components/DialogOnboarding.d.ts +13 -0
  51. package/dist/components/Quests/Crazywin/components/DialogOnboarding.js +19 -0
  52. package/dist/components/Quests/Crazywin/components/DialogWagering.d.ts +9 -0
  53. package/dist/components/Quests/Crazywin/components/DialogWagering.js +22 -0
  54. package/dist/components/Quests/Crazywin/components/GameProviders.d.ts +8 -0
  55. package/dist/components/Quests/Crazywin/components/GameProviders.js +143 -0
  56. package/dist/components/Quests/Crazywin/components/ObjectiveItem.d.ts +15 -0
  57. package/dist/components/Quests/Crazywin/components/ObjectiveItem.js +8 -0
  58. package/dist/components/Quests/Crazywin/components/QuestBadge.d.ts +8 -0
  59. package/dist/components/Quests/Crazywin/components/QuestBadge.js +21 -0
  60. package/dist/components/Quests/Crazywin/components/StageItemLocked.d.ts +4 -0
  61. package/dist/components/Quests/Crazywin/components/StageItemLocked.js +6 -0
  62. package/dist/components/Quests/Crazywin/components/StageItemUnlocked.d.ts +10 -0
  63. package/dist/components/Quests/Crazywin/components/StageItemUnlocked.js +26 -0
  64. package/dist/components/Quests/Crazywin/components/index.d.ts +10 -0
  65. package/dist/components/Quests/Crazywin/components/index.js +10 -0
  66. package/dist/components/Quests/JourneyQuest.d.ts +6 -0
  67. package/dist/components/Quests/JourneyQuest.js +5 -2
  68. package/dist/components/Quests/Quests.client.d.ts +3 -0
  69. package/dist/components/Quests/Quests.client.js +30 -7
  70. package/dist/components/Quests/RemainingTime.d.ts +3 -0
  71. package/dist/components/Quests/RemainingTime.js +1 -1
  72. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
  73. package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
  74. package/dist/icons/PlusIcon.d.ts +2 -0
  75. package/dist/icons/PlusIcon.js +4 -0
  76. package/dist/images/crazywin-game-providers/alize-mobile.webp +0 -0
  77. package/dist/images/crazywin-game-providers/bigtime-gaming.webp +0 -0
  78. package/dist/images/crazywin-game-providers/bti.png +0 -0
  79. package/dist/images/crazywin-game-providers/cq9.webp +0 -0
  80. package/dist/images/crazywin-game-providers/darwin.webp +0 -0
  81. package/dist/images/crazywin-game-providers/dg.webp +0 -0
  82. package/dist/images/crazywin-game-providers/digitain.png +0 -0
  83. package/dist/images/crazywin-game-providers/drbingo.webp +0 -0
  84. package/dist/images/crazywin-game-providers/evolution.webp +0 -0
  85. package/dist/images/crazywin-game-providers/fachai.webp +0 -0
  86. package/dist/images/crazywin-game-providers/habanero.webp +0 -0
  87. package/dist/images/crazywin-game-providers/hacksaw.png +0 -0
  88. package/dist/images/crazywin-game-providers/hollywoodtv.webp +0 -0
  89. package/dist/images/crazywin-game-providers/jdb.webp +0 -0
  90. package/dist/images/crazywin-game-providers/jili.webp +0 -0
  91. package/dist/images/crazywin-game-providers/kingmidas.webp +0 -0
  92. package/dist/images/crazywin-game-providers/netent.webp +0 -0
  93. package/dist/images/crazywin-game-providers/no-limit.webp +0 -0
  94. package/dist/images/crazywin-game-providers/pg.webp +0 -0
  95. package/dist/images/crazywin-game-providers/playtech.webp +0 -0
  96. package/dist/images/crazywin-game-providers/pragmaticplay.webp +0 -0
  97. package/dist/images/crazywin-game-providers/redtiger.webp +0 -0
  98. package/dist/images/crazywin-game-providers/rtg.webp +0 -0
  99. package/dist/images/crazywin-game-providers/rubyplay.webp +0 -0
  100. package/dist/images/crazywin-game-providers/sagaming.webp +0 -0
  101. package/dist/images/crazywin-game-providers/web/alize.webp +0 -0
  102. package/dist/images/crazywin-game-providers/web/bigtimegaming.png +0 -0
  103. package/dist/images/crazywin-game-providers/web/bti.png +0 -0
  104. package/dist/images/crazywin-game-providers/web/cq9.webp +0 -0
  105. package/dist/images/crazywin-game-providers/web/darwin.webp +0 -0
  106. package/dist/images/crazywin-game-providers/web/dg-bingo.png +0 -0
  107. package/dist/images/crazywin-game-providers/web/digitain.png +0 -0
  108. package/dist/images/crazywin-game-providers/web/drbingo-bingo.png +0 -0
  109. package/dist/images/crazywin-game-providers/web/evolution.webp +0 -0
  110. package/dist/images/crazywin-game-providers/web/fachai.webp +0 -0
  111. package/dist/images/crazywin-game-providers/web/habanero.webp +0 -0
  112. package/dist/images/crazywin-game-providers/web/hacksaw.webp +0 -0
  113. package/dist/images/crazywin-game-providers/web/hollywoodtv.png +0 -0
  114. package/dist/images/crazywin-game-providers/web/jdb.webp +0 -0
  115. package/dist/images/crazywin-game-providers/web/jili.webp +0 -0
  116. package/dist/images/crazywin-game-providers/web/jili_bingo.png +0 -0
  117. package/dist/images/crazywin-game-providers/web/kingmidas.webp +0 -0
  118. package/dist/images/crazywin-game-providers/web/netent.webp +0 -0
  119. package/dist/images/crazywin-game-providers/web/nolimitcity.png +0 -0
  120. package/dist/images/crazywin-game-providers/web/pg.webp +0 -0
  121. package/dist/images/crazywin-game-providers/web/playtech.webp +0 -0
  122. package/dist/images/crazywin-game-providers/web/pragmaticplay.webp +0 -0
  123. package/dist/images/crazywin-game-providers/web/redtiger.webp +0 -0
  124. package/dist/images/crazywin-game-providers/web/rtg.webp +0 -0
  125. package/dist/images/crazywin-game-providers/web/sagaming.png +0 -0
  126. package/dist/images/crazywin-game-providers/web/yellowbat-bingo.png +0 -0
  127. package/dist/images/crazywin-game-providers/yellowbat.webp +0 -0
  128. package/dist/images/phone-icon.svg +10 -10
  129. package/dist/schemas/forgotPasswordSchema.d.ts +8 -8
  130. package/dist/services/queries.js +3339 -3339
  131. package/dist/styles/theme.css +776 -776
  132. package/dist/types/crazywinTypes.d.ts +30 -0
  133. package/dist/types/crazywinTypes.js +19 -0
  134. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  135. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  136. package/dist/ui/Menu/Menu.d.ts +198 -198
  137. package/dist/ui/Menu/menu.recipe.d.ts +11 -11
  138. package/dist/ui/Select/Select.d.ts +45 -45
  139. package/dist/ui/Select/select.recipe.d.ts +3 -3
  140. package/dist/ui/Table/Table.d.ts +21 -21
  141. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  142. package/dist/ui/Table/table.recipe.d.ts +3 -3
  143. package/dist/utils/formatter.d.ts +2 -0
  144. package/dist/utils/formatter.js +9 -0
  145. package/dist/utils/getProviderData.d.ts +2 -0
  146. package/dist/utils/getProviderData.js +310 -0
  147. package/dist/utils/withMarketId.d.ts +1 -0
  148. package/dist/utils/withMarketId.js +5 -0
  149. package/package.json +177 -177
  150. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Confirmed.d.ts +0 -1
  151. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Confirmed.js +0 -11
  152. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Failed.d.ts +0 -1
  153. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Failed.js +0 -11
  154. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Form.d.ts +0 -1
  155. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Form.js +0 -126
  156. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/GeneratingQrCode.d.ts +0 -1
  157. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/GeneratingQrCode.js +0 -10
  158. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDeposit.d.ts +0 -1
  159. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDeposit.js +0 -12
  160. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDepositContext.d.ts +0 -17
  161. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDepositContext.js +0 -2
  162. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QrCodeGenerated.d.ts +0 -1
  163. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QrCodeGenerated.js +0 -41
  164. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/useQRPHDeposit.d.ts +0 -13
  165. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/useQRPHDeposit.js +0 -91
  166. package/dist/components/Disclaimer/ResponsibleGaming.d.ts +0 -10
  167. package/dist/components/Disclaimer/ResponsibleGaming.js +0 -13
  168. package/dist/components/Disclaimer/TermsOfUse.d.ts +0 -11
  169. package/dist/components/Disclaimer/TermsOfUse.js +0 -13
  170. package/dist/components/FeatureFlag/FeatureFlag.d.ts +0 -1
  171. package/dist/components/FeatureFlag/FeatureFlag.js +0 -29
  172. package/dist/components/FeatureFlag/index.d.ts +0 -1
  173. package/dist/components/FeatureFlag/index.js +0 -1
  174. package/dist/components/KYC/AutoOpen.d.ts +0 -1
  175. package/dist/components/KYC/AutoOpen.js +0 -40
  176. package/dist/components/KYC/CaptureIdDocument.d.ts +0 -1
  177. package/dist/components/KYC/CaptureIdDocument.js +0 -219
  178. package/dist/components/KYC/CaptureSelfie.d.ts +0 -1
  179. package/dist/components/KYC/CaptureSelfie.js +0 -285
  180. package/dist/components/KYC/DisplayImage.d.ts +0 -5
  181. package/dist/components/KYC/DisplayImage.js +0 -8
  182. package/dist/components/KYC/FileUpload.d.ts +0 -10
  183. package/dist/components/KYC/FileUpload.js +0 -72
  184. package/dist/components/KYC/NoCameraError.d.ts +0 -7
  185. package/dist/components/KYC/NoCameraError.js +0 -6
  186. package/dist/components/KYC/PersonOverlayDesktop.d.ts +0 -7
  187. package/dist/components/KYC/PersonOverlayDesktop.js +0 -9
  188. package/dist/components/KYC/backup/Header.d.ts +0 -1
  189. package/dist/components/KYC/backup/Header.js +0 -8
  190. package/dist/components/KYC/backup/Indicator.d.ts +0 -1
  191. package/dist/components/KYC/backup/Indicator.js +0 -9
  192. package/dist/components/KYC/backup/KYC.d.ts +0 -1
  193. package/dist/components/KYC/backup/KYC.js +0 -14
  194. package/dist/components/KYC/backup/KYC.lazy.d.ts +0 -1
  195. package/dist/components/KYC/backup/KYC.lazy.js +0 -26
  196. package/dist/components/KYC/backup/KYCContext.d.ts +0 -6
  197. package/dist/components/KYC/backup/KYCContext.js +0 -2
  198. package/dist/components/KYC/backup/Step1.d.ts +0 -1
  199. package/dist/components/KYC/backup/Step1.js +0 -13
  200. package/dist/components/KYC/backup/Step2.d.ts +0 -1
  201. package/dist/components/KYC/backup/Step2.js +0 -13
  202. package/dist/components/KYC/backup/Step3.d.ts +0 -1
  203. package/dist/components/KYC/backup/Step3.js +0 -13
  204. package/dist/components/KYC/backup/Step4.d.ts +0 -1
  205. package/dist/components/KYC/backup/Step4.js +0 -7
  206. package/dist/components/KYC/backup/useKYC.d.ts +0 -10
  207. package/dist/components/KYC/backup/useKYC.js +0 -8
  208. package/dist/components/KYC/loadModels.d.ts +0 -1
  209. package/dist/components/KYC/loadModels.js +0 -9
  210. package/dist/components/KYC/utils.d.ts +0 -9
  211. package/dist/components/KYC/utils.js +0 -79
  212. package/dist/components/Messages/Message.d.ts +0 -1
  213. package/dist/components/Messages/Message.js +0 -35
  214. package/dist/components/Messages/MessageContext.d.ts +0 -6
  215. package/dist/components/Messages/MessageContext.js +0 -2
  216. package/dist/components/Messages/MessagePopup.d.ts +0 -1
  217. package/dist/components/Messages/MessagePopup.js +0 -20
  218. package/dist/components/Messages/MessageTrigger.d.ts +0 -8
  219. package/dist/components/Messages/MessageTrigger.js +0 -19
  220. package/dist/components/Quests/CountdownTimer.d.ts +0 -15
  221. package/dist/components/Quests/CountdownTimer.js +0 -33
  222. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +0 -4
  223. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +0 -78
  224. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +0 -8
  225. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +0 -9
  226. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +0 -4
  227. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +0 -4
  228. package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +0 -4
  229. package/dist/components/Quests/WageringQuest/WageringQuest.js +0 -20
  230. package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +0 -9
  231. package/dist/components/Quests/WageringQuest/WageringQuestModal.js +0 -9
  232. package/dist/components/SignUp/SignUp.lazy.d.ts +0 -12
  233. package/dist/components/SignUp/SignUp.lazy.js +0 -18
  234. package/dist/components/SignUp/SignUpContext.d.ts +0 -6
  235. package/dist/components/SignUp/SignUpContext.js +0 -2
  236. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.d.ts +0 -17
  237. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.js +0 -18
  238. package/dist/components/SignUp/SignUpDefault/SignUpContext.d.ts +0 -6
  239. package/dist/components/SignUp/SignUpDefault/SignUpContext.js +0 -2
  240. package/dist/components/SignUp/SignUpDefault/SignUpForm.d.ts +0 -1
  241. package/dist/components/SignUp/SignUpDefault/SignUpForm.js +0 -310
  242. package/dist/components/SignUp/SignUpForm.d.ts +0 -1
  243. package/dist/components/SignUp/SignUpForm.js +0 -284
  244. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.d.ts +0 -1
  245. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.js +0 -198
  246. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.d.ts +0 -1
  247. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.js +0 -251
  248. package/dist/components/SignUp/SignUpKYC/ImageUploader.d.ts +0 -10
  249. package/dist/components/SignUp/SignUpKYC/ImageUploader.js +0 -42
  250. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.d.ts +0 -7
  251. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.js +0 -9
  252. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.d.ts +0 -1
  253. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.js +0 -464
  254. package/dist/components/SignUp/SignUpKYC/useImageUploader.d.ts +0 -11
  255. package/dist/components/SignUp/SignUpKYC/useImageUploader.js +0 -20
  256. package/dist/components/SignUp/SignUpKYC/utils.d.ts +0 -9
  257. package/dist/components/SignUp/SignUpKYC/utils.js +0 -79
  258. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.d.ts +0 -1
  259. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.js +0 -198
  260. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.d.ts +0 -1
  261. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.js +0 -251
  262. package/dist/components/SignUp/SignUpPagcor/ImageUploader.d.ts +0 -10
  263. package/dist/components/SignUp/SignUpPagcor/ImageUploader.js +0 -41
  264. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.d.ts +0 -1
  265. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.js +0 -429
  266. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.d.ts +0 -13
  267. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.js +0 -26
  268. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.d.ts +0 -7
  269. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.js +0 -2
  270. package/dist/components/SignUp/SignUpPagcor/useImageUploader.d.ts +0 -11
  271. package/dist/components/SignUp/SignUpPagcor/useImageUploader.js +0 -20
  272. package/dist/components/shared/IdDocumentField.client.d.ts +0 -25
  273. package/dist/components/shared/IdDocumentField.client.js +0 -204
  274. package/dist/components/shared/IdDocumentField.d.ts +0 -2
  275. package/dist/components/shared/IdDocumentField.js +0 -11
  276. package/dist/components/shared/SelfieField.client.d.ts +0 -20
  277. package/dist/components/shared/SelfieField.client.js +0 -327
  278. package/dist/components/shared/SelfieField.d.ts +0 -2
  279. package/dist/components/shared/SelfieField.js +0 -11
  280. package/dist/constants/BranchCode.d.ts +0 -4
  281. package/dist/constants/BranchCode.js +0 -42
  282. package/dist/handlers/postTransformIdFrontImage.d.ts +0 -3
  283. package/dist/handlers/postTransformIdFrontImage.js +0 -67
  284. package/dist/handlers/postTransformSelfieImage.d.ts +0 -3
  285. package/dist/handlers/postTransformSelfieImage.js +0 -71
  286. package/dist/handlers.d.ts +0 -43
  287. package/dist/handlers.js +0 -297
  288. package/dist/icons/BellRingIcon.d.ts +0 -2
  289. package/dist/icons/BellRingIcon.js +0 -4
  290. package/dist/utils/dataUrlToBlob.d.ts +0 -1
  291. package/dist/utils/dataUrlToBlob.js +0 -11
  292. package/dist/utils/gamesAvailable3pmTo3am.d.ts +0 -1
  293. package/dist/utils/gamesAvailable3pmTo3am.js +0 -1
  294. package/dist/utils/getGameName.d.ts +0 -1
  295. package/dist/utils/getGameName.js +0 -6
  296. package/dist/utils/isBetween3amAnd3pm.d.ts +0 -1
  297. package/dist/utils/isBetween3amAnd3pm.js +0 -5
  298. package/dist/utils/resizeImageSize.d.ts +0 -2
  299. package/dist/utils/resizeImageSize.js +0 -11
@@ -0,0 +1,116 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { isEqual, startOfDay } from 'date-fns';
3
+ import { isString } from 'lodash-es';
4
+ import { useEffect, useMemo, useState } from 'react';
5
+ import { twMerge } from 'tailwind-merge';
6
+ import { useCheckInDailyCheckInQuestMutation } from '../../../client/hooks/useCheckInDailyCheckInQuestMutation.js';
7
+ import { toaster } from '../../../client/utils/toaster.js';
8
+ import { CalendarIcon } from '../../../icons/CalendarIcon.js';
9
+ import { CheckIcon } from '../../../icons/CheckIcon.js';
10
+ import { InfoCircleIcon } from '../../../icons/InfoCircleIcon.js';
11
+ import { XIcon } from '../../../icons/XIcon.js';
12
+ import { Progress } from '../../../ui/Progress/index.js';
13
+ import { useQuestContext } from '../QuestsContext.js';
14
+ import { Countdown, DialogCheckin, QuestBadge } from './components/index.js';
15
+ const CWDailyCheckInQuest = (props) => {
16
+ const { className } = props;
17
+ const classNames = isString(className) ? { root: className } : className;
18
+ const quest = useQuestContext();
19
+ const [isExpired, setIsExpired] = useState(false);
20
+ const [isOpen, setIsOpen] = useState(false);
21
+ const checkInDailyQuestMutation = useCheckInDailyCheckInQuestMutation({
22
+ onSuccess() {
23
+ toaster.success({
24
+ title: 'Check-in successful 🎉',
25
+ description: "You've successfully checked in for today! Keep it up to maintain your streak!",
26
+ });
27
+ },
28
+ onError(e) {
29
+ toaster.error({
30
+ title: 'Check-in successful 🎉',
31
+ description: e.message ?? 'Check-In Failed',
32
+ });
33
+ },
34
+ });
35
+ const handleOpenChange = (open) => {
36
+ setIsOpen(open);
37
+ };
38
+ const shouldShowBadge = useMemo(() => {
39
+ return (quest?.status === 'COMPLETED' || isExpired || quest?.status === 'FAILED');
40
+ }, [quest?.status, isExpired]);
41
+ const shouldShowCountdown = useMemo(() => {
42
+ return !shouldShowBadge;
43
+ }, [shouldShowBadge]);
44
+ const hasCheckedInToday = useMemo(() => {
45
+ const today = startOfDay(new Date());
46
+ if (!quest?.lastCheckInDate)
47
+ return false;
48
+ return isEqual(today, startOfDay(new Date(quest.lastCheckInDate)));
49
+ }, [quest?.lastCheckInDate]);
50
+ const checkedInRewards = useMemo(() => ({
51
+ 3: quest?.thirdDayBonusAmount ?? 0,
52
+ 6: quest?.sixthDayBonusAmount ?? 0,
53
+ 7: quest?.seventhDayBonusAmount ?? 0,
54
+ }), [
55
+ quest?.thirdDayBonusAmount,
56
+ quest?.sixthDayBonusAmount,
57
+ quest?.seventhDayBonusAmount,
58
+ ]);
59
+ const dailyCheckedInData = useMemo(() => Array.from({ length: 7 }, (_, i) => {
60
+ const day = i + 1;
61
+ return {
62
+ day,
63
+ reward: day in checkedInRewards
64
+ ? checkedInRewards[day]
65
+ : null,
66
+ };
67
+ }), [checkedInRewards]);
68
+ const endDate = useMemo(() => {
69
+ if (!quest?.endDateTime)
70
+ return null;
71
+ const parsed = new Date(quest.endDateTime);
72
+ return Number.isNaN(parsed.getTime()) ? null : parsed;
73
+ }, [quest?.endDateTime]);
74
+ const progressStyle = {
75
+ '--width': `${quest.progressPercentage}%`,
76
+ };
77
+ useEffect(() => {
78
+ setIsExpired(new Date(quest?.endDateTime ?? new Date()).getTime() < Date.now());
79
+ }, [quest?.endDateTime]);
80
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: twMerge('flex h-full flex-col space-y-2 rounded-2xl border border-[#373A41] bg-[#172627] p-4', classNames?.root), children: [_jsxs("div", { className: "flex items-center justify-between", children: [shouldShowCountdown && endDate && (_jsx(Countdown, { endDate: endDate, onEnd: (expired) => {
81
+ setIsExpired(expired);
82
+ } })), shouldShowBadge && (_jsx(QuestBadge, { status: quest.status, isExpired: isExpired, type: "DAILY_CHECKIN" })), _jsx("button", { className: "rounded-lg border border-[#22262F] bg-[#0C0E12] p-2", onClick: () => {
83
+ setIsOpen(true);
84
+ }, type: "button", children: _jsx(InfoCircleIcon, { className: "size-5 text-[#85888E]" }) })] }), _jsx("p", { className: "font-semibold text-xl", children: quest.name }), _jsx("p", { className: "text-[#A3A3A3] text-sm", dangerouslySetInnerHTML: { __html: quest.description } }), _jsxs("div", { className: "flex w-full flex-col space-y-2 pt-2", children: [_jsx("div", { className: "grid grid-cols-7", children: dailyCheckedInData.map((checkin, index) => {
85
+ const done = checkin.day <= (quest?.checkInStreak ?? 0);
86
+ const isFailed = checkin.day === (quest?.checkInStreak ?? 0) + 1 &&
87
+ quest?.status === 'FAILED';
88
+ let body = _jsx("span", { className: "", children: "-" });
89
+ if (isFailed) {
90
+ body = _jsx(XIcon, { className: "size-4 text-[#F04438]" });
91
+ }
92
+ else if (done) {
93
+ body = _jsx(CheckIcon, { className: "size-4 text-[#FFE5AF]" });
94
+ }
95
+ else if (checkin.reward) {
96
+ body = _jsxs("span", { className: "", children: ["+\u20B1", checkin.reward] });
97
+ }
98
+ return (_jsx("div", { className: "flex items-center justify-center text-[#85888E] text-sm", children: body }, index));
99
+ }) }), _jsx(Progress.Root, { max: 100, value: +quest.progressPercentage, className: twMerge('relative h-2 rounded-full bg-[#0C0E12]', classNames?.progressBarContainer), children: _jsx("div", { className: twMerge('h-full w-[var(--width,0)] flex-1 rounded-full bg-[#FFE5AF] transition-all duration-1000 ease-in-out', classNames?.progressBar), style: progressStyle }) })] }), _jsx("div", { className: "grid grid-cols-7 place-items-center", children: dailyCheckedInData.map((checkin, index) => {
100
+ const isDone = checkin.day <= (quest?.checkInStreak ?? 0);
101
+ return (_jsxs("div", { className: twMerge('group relative size-fit', isDone ? 'text-[#FFE5AF]' : 'text-[#85888E]', classNames?.calendarIconContainer), "data-active": isDone, children: [_jsx(CalendarIcon, { className: twMerge('h-4.5 w-auto', classNames?.calendarIcon) }), _jsx("p", { className: twMerge('-translate-x-1/2 -translate-y-1/2 absolute top-1/2 left-1/2 text-2xs leading-none', classNames?.calendarDayText), children: checkin.day })] }, index));
102
+ }) }), _jsx("div", { className: "flex h-full w-full items-end", children: _jsx("button", { type: "button", className: twMerge('mt-2 w-full rounded-md py-2 text-center font-semibold text-[#713B12] text-sm transition-colors duration-200 disabled:cursor-not-allowed disabled:opacity-50', classNames?.checkInButton), style: {
103
+ background: quest?.status === 'COMPLETED' ||
104
+ quest?.status === 'FAILED' ||
105
+ isExpired ||
106
+ hasCheckedInToday
107
+ ? 'radial-gradient(694.11% 412.88% at -117.5% -146.67%, #D4C89A 45.26%, #C4A85A 78.33%)'
108
+ : 'radial-gradient(694.11% 412.88% at -117.5% -146.67%, #FFE5AF 45.26%, #EAC467 78.33%)',
109
+ }, disabled: quest?.status === 'COMPLETED' ||
110
+ quest?.status === 'FAILED' ||
111
+ isExpired ||
112
+ hasCheckedInToday, onClick: async () => {
113
+ checkInDailyQuestMutation.mutate(quest.id);
114
+ }, children: "Check-In" }) })] }), _jsx(DialogCheckin, { isOpen: isOpen, handleOpenChange: handleOpenChange, quest: quest })] }));
115
+ };
116
+ export default CWDailyCheckInQuest;
@@ -0,0 +1,18 @@
1
+ import { type CSSProperties } from 'react';
2
+ export interface ClassNameEntries {
3
+ root?: string;
4
+ checkboxName?: string;
5
+ checkboxBonus?: string;
6
+ dialogRoot?: string;
7
+ dialogMilestone?: string;
8
+ dialogMilestoneName?: string;
9
+ dialogMilestoneDescription?: string;
10
+ dialogCompleteBadge?: string;
11
+ dialogUncompleteButton?: string;
12
+ }
13
+ export interface JourneyQuestProps {
14
+ checkboxControlStyle?: CSSProperties;
15
+ className?: string | ClassNameEntries;
16
+ }
17
+ declare const CWJourneyQuest: (props: JourneyQuestProps) => import("react/jsx-runtime").JSX.Element;
18
+ export default CWJourneyQuest;
@@ -0,0 +1,137 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { isString } from 'lodash-es';
3
+ import { useEffect, useMemo, useState } from 'react';
4
+ import { twMerge } from 'tailwind-merge';
5
+ import { useShallow } from 'zustand/shallow';
6
+ import { useFeatureFlag } from '../../../client/hooks/useFeatureFlag.js';
7
+ import { useGlobalStore } from '../../../client/hooks/useGlobalStore.js';
8
+ import { useGoogleClientIdQuery } from '../../../client/hooks/useGoogleClientIdQuery.js';
9
+ import { useMemberVerificationQuery } from '../../../client/hooks/useMemberVerificationQuery.js';
10
+ import { Progress } from '../../../ui/Progress/index.js';
11
+ import { useQuestContext } from '../QuestsContext.js';
12
+ import { Countdown, DialogJourney, ObjectiveItem, QuestBadge, } from './components/index.js';
13
+ const CWJourneyQuest = (props) => {
14
+ const quest = useQuestContext();
15
+ const featureFlag = useFeatureFlag();
16
+ const classNames = isString(props.className)
17
+ ? { root: props.className }
18
+ : props.className;
19
+ const [isOpen, setIsOpen] = useState(false);
20
+ const globalStore = useGlobalStore(useShallow((ctx) => ({
21
+ kyc: ctx.kyc,
22
+ depositWithdrawal: ctx.depositWithdrawal,
23
+ })));
24
+ const [isExpired, setIsExpired] = useState(new Date(quest?.endDateTime ?? new Date()).getTime() < Date.now());
25
+ const googleClientIdQuery = useGoogleClientIdQuery();
26
+ const googleClientId = googleClientIdQuery.data;
27
+ const memberVerificationQuery = useMemberVerificationQuery();
28
+ const verificationStatus = memberVerificationQuery.data?.status ?? 'UNVERIFIED';
29
+ const progressData = useMemo(() => {
30
+ const milestones = quest?.milestones ?? [];
31
+ const totalMilestones = milestones.length;
32
+ const clearedMilestones = milestones.filter((milestone) => milestone.cleared).length;
33
+ const progressPercentage = totalMilestones > 0
34
+ ? Math.min((clearedMilestones / totalMilestones) * 100, 100)
35
+ : 0;
36
+ return {
37
+ cleared: clearedMilestones,
38
+ total: totalMilestones,
39
+ progressPercentage,
40
+ progressText: `${clearedMilestones}/${totalMilestones}`,
41
+ };
42
+ }, [quest?.milestones]);
43
+ const shouldShowBadge = useMemo(() => {
44
+ return (quest?.status === 'COMPLETED' || isExpired || quest?.status === 'FAILED');
45
+ }, [quest?.status, isExpired]);
46
+ const shouldShowCountdown = useMemo(() => {
47
+ return !shouldShowBadge;
48
+ }, [shouldShowBadge]);
49
+ const endDate = useMemo(() => {
50
+ if (!quest?.endDateTime)
51
+ return null;
52
+ const parsed = new Date(quest.endDateTime);
53
+ return Number.isNaN(parsed.getTime()) ? null : parsed;
54
+ }, [quest?.endDateTime]);
55
+ const progressStyle = {
56
+ '--width': `${progressData.progressPercentage}%`,
57
+ };
58
+ function handleOpenChange(open) {
59
+ setIsOpen(open);
60
+ }
61
+ function getMilestoneDescription(milestone) {
62
+ if (!milestone.bonusAmount) {
63
+ return null;
64
+ }
65
+ switch (milestone.type) {
66
+ case 'REGISTRATION':
67
+ return `Register and win Php ${milestone.bonusAmount} Bonus`;
68
+ case 'ACCOUNT_VERIFICATION':
69
+ return `Verify your account and get Php ${milestone.bonusAmount} Bonus`;
70
+ case 'FIRST_DEPOSIT':
71
+ return `Make your first deposit and get Php ${milestone.bonusAmount} Bonus`;
72
+ case 'IOS_FIRST_LOGIN':
73
+ return `Login using iOS and get Php ${milestone.bonusAmount} Bonus`;
74
+ case 'ANDROID_FIRST_LOGIN':
75
+ return `Login using Android and get Php ${milestone.bonusAmount} Bonus`;
76
+ default:
77
+ return `Get Php ${milestone.bonusAmount} Bonus`;
78
+ }
79
+ }
80
+ function getCustomLinkUrl(milestone) {
81
+ const baseUrl = process.env.NODE_ENV === 'development'
82
+ ? 'https://api.trigger.development.opexa.io'
83
+ : 'https://api.trigger.opexa.io';
84
+ // const token =
85
+ // sessionQuery.data?.accessToken ?? sessionQuery.data?.refreshToken;
86
+ return `${baseUrl}/v1/quests/${quest.id}/milestones/${milestone.id}/link?token=${1}`;
87
+ }
88
+ function handleMilestoneButtonClick(milestone) {
89
+ if (milestone.type === 'ACCOUNT_VERIFICATION') {
90
+ globalStore.kyc.setOpen(true);
91
+ }
92
+ else if (milestone.type === 'FIRST_DEPOSIT') {
93
+ globalStore.depositWithdrawal.setOpen(true);
94
+ globalStore.depositWithdrawal.setTab('DEPOSIT');
95
+ }
96
+ handleOpenChange(false);
97
+ }
98
+ function loginWithFacebook() {
99
+ const currentUrl = window.location.origin;
100
+ window.open(`https://www.facebook.com/v20.0/dialog/oauth?client_id=564928586051406&state=${currentUrl},${process.env.NEXT_PUBLIC_PLATFORM_CODE}&redirect_uri=https://auth.development.opexa.io/facebook/auth`, '_self');
101
+ }
102
+ async function loginOrSignupUsingGoogle() {
103
+ const searchParams = new URLSearchParams();
104
+ if (!googleClientId)
105
+ return null;
106
+ searchParams.set('client_id', googleClientId);
107
+ searchParams.set('redirect_uri', 'https://auth.development.opexa.io/google/auth');
108
+ searchParams.set('scope', 'openid profile email phone https://www.googleapis.com/auth/user.birthday.read');
109
+ searchParams.set('response_type', 'code');
110
+ searchParams.set('state', `${window.location.origin},${process.env.NEXT_PUBLIC_PLATFORM_CODE}`);
111
+ const url = `https://accounts.google.com/o/oauth2/v2/auth?${searchParams.toString()}`;
112
+ window.open(url, '_self');
113
+ }
114
+ // optional: keep isExpired in sync when quest end time changes
115
+ useEffect(() => {
116
+ setIsExpired(new Date(quest?.endDateTime ?? new Date()).getTime() < Date.now());
117
+ }, [quest?.endDateTime]);
118
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: twMerge('flex h-full flex-col space-y-2 rounded-2xl border border-[#373A41] bg-[#172627] p-4', classNames?.root), children: [shouldShowCountdown && endDate && (_jsx(Countdown, { endDate: endDate, onEnd: (expired) => {
119
+ setIsExpired(expired);
120
+ } })), shouldShowBadge && (_jsx(QuestBadge, { status: quest.status, isExpired: isExpired, type: "JOURNEY", bonusAmount: +quest.bonus })), _jsx("p", { className: "font-semibold text-xl", children: quest?.name }), _jsxs("div", { className: "flex items-center space-x-2", children: [_jsx(Progress.Root, { max: 100, value: progressData.progressPercentage, className: "relative h-2 w-full rounded-full bg-[#0C0E12]", children: _jsx("div", { className: twMerge('h-full w-[var(--width,0)] flex-1 rounded-full bg-[#FFE5AF] transition-all duration-1000 ease-in-out'), style: progressStyle }) }), _jsx("p", { className: "text-xs", children: progressData.progressText })] }), _jsx("div", { className: "flex flex-col space-y-2", children: quest?.milestones
121
+ ?.filter((milestone) => {
122
+ if (!featureFlag.enabled) {
123
+ return (milestone.type !== 'LINK_FACEBOOK_ACCOUNT' &&
124
+ milestone.type !== 'LINK_GOOGLE_ACCOUNT');
125
+ }
126
+ return true;
127
+ })
128
+ .map((milestone) => (_jsx(ObjectiveItem, { id: milestone.id, cleared: milestone.cleared, name: milestone.name, type: "JOURNEY", bonusAmount: +milestone.bonusAmount, style: props.checkboxControlStyle, className: {
129
+ name: classNames?.checkboxName,
130
+ bonus: classNames?.checkboxBonus,
131
+ } }, milestone.id))) }), _jsx("div", { className: "flex h-full w-full items-end", children: _jsx("button", { type: "button", className: "mt-2 w-full rounded-md py-2 text-center font-semibold text-[#713B12] text-sm transition-colors duration-200", style: {
132
+ background: 'radial-gradient(694.11% 412.88% at -117.5% -146.67%, #FFE5AF 45.26%, #EAC467 78.33%)',
133
+ }, onClick: () => {
134
+ setIsOpen(true);
135
+ }, children: "View Details" }) })] }), _jsx(DialogJourney, { isOpen: isOpen, quest: quest, handleOpenChange: handleOpenChange, enabled: featureFlag.enabled, getMilestoneDescription: getMilestoneDescription, getCustomLinkUrl: getCustomLinkUrl, handleMilestoneButtonClick: handleMilestoneButtonClick, status: verificationStatus, loginWithFacebook: loginWithFacebook, loginOrSignupUsingGoogle: loginOrSignupUsingGoogle })] }));
136
+ };
137
+ export default CWJourneyQuest;
@@ -0,0 +1,6 @@
1
+ import { type CSSProperties } from 'react';
2
+ export interface OnboardingQuestProps {
3
+ checkboxControlStyle?: CSSProperties;
4
+ }
5
+ declare const CWOnboardingQuest: (props: OnboardingQuestProps) => import("react/jsx-runtime").JSX.Element;
6
+ export default CWOnboardingQuest;
@@ -0,0 +1,81 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useEffect, useMemo, useState } from 'react';
3
+ import { twMerge } from 'tailwind-merge';
4
+ import { useShallow } from 'zustand/shallow';
5
+ import { useGlobalStore } from '../../../client/hooks/useGlobalStore.js';
6
+ import { useMemberVerificationQuery } from '../../../client/hooks/useMemberVerificationQuery.js';
7
+ import { Progress } from '../../../ui/Progress/index.js';
8
+ import { useQuestContext } from '../QuestsContext.js';
9
+ import { Countdown, DialogOnboarding, ObjectiveItem, QuestBadge, } from './components/index.js';
10
+ const CWOnboardingQuest = (props) => {
11
+ const quest = useQuestContext();
12
+ const globalStore = useGlobalStore(useShallow((ctx) => ({
13
+ kyc: ctx.kyc,
14
+ depositWithdrawal: ctx.depositWithdrawal,
15
+ })));
16
+ const endDate = useMemo(() => {
17
+ if (!quest?.endDateTime)
18
+ return null;
19
+ const parsed = new Date(quest.endDateTime);
20
+ return Number.isNaN(parsed.getTime()) ? null : parsed;
21
+ }, [quest?.endDateTime]);
22
+ const [isExpired, setIsExpired] = useState(() => endDate ? endDate.getTime() < Date.now() : false);
23
+ const [isOpen, setIsOpen] = useState(false);
24
+ const memberVerificationQuery = useMemberVerificationQuery();
25
+ const verificationStatus = memberVerificationQuery.data?.status ?? 'UNVERIFIED';
26
+ const progressData = useMemo(() => {
27
+ const totalTasks = 2;
28
+ const completedTasks = [
29
+ quest?.firstDepositCompleted,
30
+ quest?.accountVerificationCompleted,
31
+ ].filter(Boolean).length;
32
+ const progressPercentage = Math.min((completedTasks / totalTasks) * 100, 100);
33
+ return {
34
+ cleared: completedTasks,
35
+ total: totalTasks,
36
+ progressPercentage,
37
+ progressText: `${completedTasks}/${totalTasks}`,
38
+ };
39
+ }, [quest?.firstDepositCompleted, quest?.accountVerificationCompleted]);
40
+ const shouldShowBadge = useMemo(() => {
41
+ return (quest?.status === 'COMPLETED' || isExpired || quest?.status === 'FAILED');
42
+ }, [quest?.status, isExpired]);
43
+ const shouldShowCountdown = useMemo(() => {
44
+ return !shouldShowBadge;
45
+ }, [shouldShowBadge]);
46
+ function handleOpenChange(open) {
47
+ setIsOpen(open);
48
+ }
49
+ function handleTaskButtonClick(taskType) {
50
+ if (taskType === 'ACCOUNT_VERIFICATION') {
51
+ globalStore.kyc.setOpen(true);
52
+ }
53
+ else if (taskType === 'FIRST_DEPOSIT') {
54
+ globalStore.depositWithdrawal.setOpen(true);
55
+ globalStore.depositWithdrawal.setTab('DEPOSIT');
56
+ }
57
+ handleOpenChange(false);
58
+ }
59
+ function getTaskDescription(taskType) {
60
+ switch (taskType) {
61
+ case 'ACCOUNT_VERIFICATION':
62
+ return 'Verify your account and get bonus';
63
+ case 'FIRST_DEPOSIT':
64
+ return 'Make your first deposit and get bonus';
65
+ default:
66
+ return '';
67
+ }
68
+ }
69
+ const progressStyle = {
70
+ '--width': `${progressData.progressPercentage}%`,
71
+ };
72
+ useEffect(() => {
73
+ setIsExpired(new Date(quest?.endDateTime ?? new Date()).getTime() < Date.now());
74
+ }, [quest?.endDateTime]);
75
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: twMerge('flex h-full flex-col space-y-2 rounded-2xl border border-[#373A41] bg-[#172627] p-4'), children: [shouldShowCountdown && endDate && (_jsx(Countdown, { endDate: endDate, onEnd: (expired) => {
76
+ setIsExpired(expired);
77
+ } })), shouldShowBadge && (_jsx(QuestBadge, { status: quest.status, isExpired: isExpired, type: "ONBOARDING" })), _jsx("p", { className: "font-semibold text-xl", children: quest.name }), _jsxs("div", { className: "flex items-center space-x-2", children: [_jsx(Progress.Root, { max: 100, value: progressData.progressPercentage, className: "relative h-2 w-full rounded-full bg-[#0C0E12]", children: _jsx("div", { className: twMerge('h-full w-[var(--width,0)] flex-1 rounded-full bg-[#FFE5AF] transition-all duration-1000 ease-in-out'), style: progressStyle }) }), _jsx("p", { className: "text-xs", children: progressData.progressText })] }), _jsxs("div", { className: "flex flex-col space-y-2", children: [_jsx(ObjectiveItem, { name: "First Deposit", id: "firstDeposit", cleared: quest?.firstDepositCompleted ?? false, type: "ONBOARDING", style: props.checkboxControlStyle }), _jsx(ObjectiveItem, { name: "Account Verification", id: "accountVerification", cleared: quest?.accountVerificationCompleted ?? false, type: "ONBOARDING", style: props.checkboxControlStyle })] }), _jsx("div", { className: "flex h-full w-full items-end", children: _jsx("button", { type: "button", className: "mt-2 w-full rounded-md py-2 text-center font-semibold text-[#713B12] text-sm transition-colors duration-200", style: {
78
+ background: 'radial-gradient(694.11% 412.88% at -117.5% -146.67%, #FFE5AF 45.26%, #EAC467 78.33%)',
79
+ }, onClick: () => setIsOpen(true), children: "View Details" }) })] }), _jsx(DialogOnboarding, { isOpen: isOpen, quest: quest, handleOpenChange: handleOpenChange, getTaskDescription: getTaskDescription, handleTaskButtonClick: handleTaskButtonClick, verificationStatus: verificationStatus })] }));
80
+ };
81
+ export default CWOnboardingQuest;
@@ -0,0 +1,23 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { StageItemLockedClassNameEntries, StageItemUnlockedClassNameEntries } from '../WageringQuest__next';
3
+ export interface ClassNameEntries {
4
+ root?: string;
5
+ stageBadge?: string;
6
+ stageBadgeIcon?: string;
7
+ stageBadgeText?: string;
8
+ progressBarContainer?: string;
9
+ progressBar?: string;
10
+ bonusText?: string;
11
+ bonusAmount?: string;
12
+ bonusContainer?: string;
13
+ stageItemUnlocked?: StageItemUnlockedClassNameEntries;
14
+ stageItemLocked?: StageItemLockedClassNameEntries;
15
+ }
16
+ declare const CWWageringQuestNext: (props: {
17
+ className?: string | ClassNameEntries;
18
+ customComplete?: ReactNode;
19
+ showTurnoverDecimals?: boolean;
20
+ gameProviderCarousel?: ReactNode;
21
+ gameProviderViewPageUrl?: string;
22
+ }) => import("react/jsx-runtime").JSX.Element;
23
+ export default CWWageringQuestNext;
@@ -0,0 +1,53 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { isString } from 'lodash-es';
3
+ import { useEffect, useMemo, useState, } from 'react';
4
+ import { twMerge } from 'tailwind-merge';
5
+ import { Flag05Icon } from '../../../icons/Flag05Icon.js';
6
+ import { PlusIcon } from '../../../icons/PlusIcon.js';
7
+ import { Progress } from '../../../ui/Progress/index.js';
8
+ import { useQuestContext } from '../QuestsContext.js';
9
+ import { Countdown, DialogWagering, QuestBadge } from './components/index.js';
10
+ const CWWageringQuestNext = (props) => {
11
+ const { className } = props;
12
+ const classNames = isString(className) ? { root: className } : className;
13
+ const quest = useQuestContext();
14
+ const [isExpired, setIsExpired] = useState(new Date(quest?.endDateTime ?? new Date()).getTime() < Date.now());
15
+ const [isOpen, setIsOpen] = useState(false);
16
+ const shouldShowBadge = useMemo(() => {
17
+ return (quest?.status === 'COMPLETED' || isExpired || quest?.status === 'FAILED');
18
+ }, [quest?.status, isExpired]);
19
+ const shouldShowCountdown = useMemo(() => {
20
+ return !shouldShowBadge;
21
+ }, [shouldShowBadge]);
22
+ function handleOpenChange(open) {
23
+ setIsOpen(open);
24
+ }
25
+ const currentStage = useMemo(() => {
26
+ if (quest.stage === null ||
27
+ quest.stage === undefined ||
28
+ quest.stage === 0) {
29
+ return (quest?.stage ?? 0) + 1;
30
+ }
31
+ return quest.stage;
32
+ }, [quest.stage]);
33
+ const endDate = useMemo(() => {
34
+ if (!quest?.endDateTime)
35
+ return null;
36
+ const parsed = new Date(quest.endDateTime);
37
+ return Number.isNaN(parsed.getTime()) ? null : parsed;
38
+ }, [quest?.endDateTime]);
39
+ const progressStyle = {
40
+ '--width': `${quest.progressPercentage}%`,
41
+ };
42
+ useEffect(() => {
43
+ setIsExpired(new Date(quest?.endDateTime ?? new Date()).getTime() < Date.now());
44
+ }, [quest?.endDateTime]);
45
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: twMerge('flex h-full flex-col space-y-2 rounded-2xl border border-[#373A41] bg-[#172627] p-4', classNames?.root), children: [_jsx("div", { className: "flex items-center justify-between", children: _jsxs("div", { className: "flex gap-2", children: [_jsxs("div", { className: twMerge('flex w-fit items-center gap-1 rounded-lg border border-[#9E165F] bg-[#4E0D30] px-2 py-0.5', classNames?.stageBadge), children: [_jsx(Flag05Icon, { className: twMerge('size-4 text-[#EE46BC]', classNames?.stageBadgeIcon) }), _jsxs("p", { className: twMerge('font-medium text-[#FAA7E0] text-sm', classNames?.stageBadgeText), children: ["Stage ", currentStage] })] }), shouldShowCountdown && endDate && (_jsx(Countdown, { endDate: endDate, onEnd: (expired) => {
46
+ setIsExpired(expired);
47
+ }, type: quest?.type })), shouldShowBadge && (_jsx(QuestBadge, { status: quest.status, isExpired: isExpired, type: "WAGERING" }))] }) }), _jsx("p", { className: "font-semibold text-xl", children: quest?.name }), _jsx("p", { className: twMerge('prose', 'prose-h1:m-0', 'prose-h2:m-0', 'prose-h3:m-0', 'prose-h4:m-0', 'prose-h5:m-0', 'prose-h6:m-0', 'prose-a:m-0', 'prose-p:m-0', 'mt-3', 'text-start', 'text-sm', 'text-[#A3A3A3]', 'lg:text-base', '*:text-inherit', '[&_strong]:text-inherit'), dangerouslySetInnerHTML: { __html: quest.description } }), _jsxs("div", { className: "flex flex-col space-y-2 pt-5", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("p", { children: ["Progress ", Math.round(+quest.progressPercentage), "%"] }), _jsxs("p", { children: [quest.turnover, _jsxs("span", { className: "text-[#94969C]", children: ["/", quest.targetTurnover, " PHP"] })] })] }), _jsx(Progress.Root, { max: 100, value: +quest.progressPercentage, className: twMerge('relative h-2 rounded-full bg-[#0C0E12] md:w-full', classNames?.progressBarContainer), children: _jsx("div", { className: twMerge('h-full w-[var(--width,0)] flex-1 rounded-full bg-[#FFE5AF] transition-all duration-1000 ease-in-out', classNames?.progressBar), style: progressStyle }) }), _jsxs("p", { className: "flex items-center justify-between", children: [_jsxs("span", { className: "tex-sm text-[#F5F5F6]", children: ["Stage ", currentStage, " of ", quest?.program.stages?.length] }), _jsxs("span", { className: "flex items-center justify-between gap-xs rounded-md border border-[#333741] bg-[#0C111D] px-[0.375rem] py-[0.125rem] font-medium text-[#CECFD2] text-xs", children: [_jsx(PlusIcon, { className: "size-3 stroke-[2.5px]" }), " \u20B1", quest.bonus, "Bonus"] })] })] }), quest?.status === 'IN_PROGRESS' && (_jsx("div", { className: "flex h-full w-full items-end", children: _jsx("button", { type: "button", className: "mt-2 w-full rounded-md py-2 text-center font-semibold text-[#713B12] text-sm transition-colors duration-200", style: {
48
+ background: 'radial-gradient(694.11% 412.88% at -117.5% -146.67%, #FFE5AF 45.26%, #EAC467 78.33%)',
49
+ }, onClick: () => {
50
+ setIsOpen(true);
51
+ }, children: "View Details" }) }))] }), _jsx(DialogWagering, { quest: quest, isOpen: isOpen, handleOpenChange: handleOpenChange, currentStage: currentStage })] }));
52
+ };
53
+ export default CWWageringQuestNext;
@@ -0,0 +1,7 @@
1
+ type Props = {
2
+ endDate: Date;
3
+ onEnd: (value: boolean) => void;
4
+ type?: string;
5
+ };
6
+ declare const Countdown: ({ endDate, onEnd, type }: Props) => import("react/jsx-runtime").JSX.Element;
7
+ export default Countdown;
@@ -0,0 +1,62 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { endOfDay } from 'date-fns';
3
+ import { useEffect, useState } from 'react';
4
+ import { ClockStopWatchIcon } from '../../../../icons/ClockStopWatchIcon.js';
5
+ const Countdown = ({ endDate, onEnd, type }) => {
6
+ const [time, setTime] = useState({
7
+ days: '00',
8
+ hours: '00',
9
+ minutes: '00',
10
+ seconds: '00',
11
+ });
12
+ useEffect(() => {
13
+ let intervalId = null;
14
+ const calculateTimeRemaining = () => {
15
+ const endOfDayTime = endOfDay(endDate);
16
+ let end;
17
+ if (type === 'WAGERING') {
18
+ end = endDate.getTime();
19
+ }
20
+ else {
21
+ end = endOfDayTime.getTime();
22
+ }
23
+ const now = new Date().getTime();
24
+ const distance = end - now;
25
+ if (distance < 0) {
26
+ setTime({
27
+ days: '00',
28
+ hours: '00',
29
+ minutes: '00',
30
+ seconds: '00',
31
+ });
32
+ if (intervalId !== null) {
33
+ clearInterval(intervalId);
34
+ onEnd(true);
35
+ }
36
+ return;
37
+ }
38
+ const d = Math.floor(distance / (1000 * 60 * 60 * 24));
39
+ const h = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
40
+ const m = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
41
+ const s = Math.floor((distance % (1000 * 60)) / 1000);
42
+ const removeLeadingZeros = (value) => value === 0 ? '0' : value.toString().replace(/^0+/, '');
43
+ setTime({
44
+ days: removeLeadingZeros(d),
45
+ hours: removeLeadingZeros(h),
46
+ minutes: removeLeadingZeros(m),
47
+ seconds: removeLeadingZeros(s),
48
+ });
49
+ };
50
+ // Initial calculation
51
+ onEnd(false);
52
+ calculateTimeRemaining();
53
+ intervalId = window.setInterval(calculateTimeRemaining, 1000);
54
+ return () => {
55
+ if (intervalId !== null) {
56
+ clearInterval(intervalId);
57
+ }
58
+ };
59
+ }, [endDate, onEnd, type]);
60
+ return (_jsx("div", { className: "flex items-center gap-1 md:gap-2", children: _jsxs("div", { className: "flex items-center rounded-[4px] border border-[#854A0E] bg-[#542C0D] px-2 py-[2px] text-xs md:text-sm", children: [_jsx(ClockStopWatchIcon, { className: "mx-1 h-3.5 w-3.5 stroke-[2.5] text-[#FDE272]" }), _jsx("span", { className: "font-semibold text-[#FDE272]", children: `${time.days}d` }), _jsx("span", { className: "mx-1 md:block", children: ":" }), _jsx("span", { className: "font-semibold text-[#FDE272]", children: `${time.hours}h` }), _jsx("span", { className: "mx-1", children: ":" }), _jsx("span", { className: "font-semibold text-[#FDE272]", children: `${time.minutes}m` }), _jsx("span", { className: "mx-1", children: ":" }), _jsx("span", { className: "font-semibold text-[#FDE272]", children: `${time.seconds}s` })] }) }));
61
+ };
62
+ export default Countdown;
@@ -0,0 +1,8 @@
1
+ import type { QuestContextType } from '../../QuestsContext';
2
+ type Props = {
3
+ isOpen: boolean;
4
+ quest: QuestContextType;
5
+ handleOpenChange: (open: boolean) => void;
6
+ };
7
+ declare const DialogCheckin: ({ isOpen, quest, handleOpenChange }: Props) => import("react/jsx-runtime").JSX.Element;
8
+ export default DialogCheckin;
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { XIcon } from '../../../../icons/XIcon.js';
3
+ import { Dialog } from '../../../../ui/Dialog/index.js';
4
+ import { Portal } from '../../../../ui/Portal/index.js';
5
+ const DialogCheckin = ({ isOpen, quest, handleOpenChange }) => {
6
+ return (_jsx(Dialog.Root, { open: isOpen, onOpenChange: (details) => {
7
+ handleOpenChange(details.open);
8
+ }, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "z-tooltip flex items-center justify-center p-6", children: _jsx(Dialog.Content, { className: "", children: _jsxs("div", { className: "overflow-y-invisible mx-auto flex h-full w-full flex-col bg-[#0C0E12] px-4 py-5 lg:h-auto lg:rounded-xl", children: [_jsx("div", { className: "relative w-full p-4", children: _jsxs("div", { className: "flex w-full items-center justify-between", children: [_jsxs("h2", { className: "font-semibold text-xl", children: [quest?.name, " Rules"] }), _jsx(Dialog.CloseTrigger, { className: "relative top-0 right-0", children: _jsx(XIcon, {}) })] }) }), _jsxs("div", { className: "mx-auto flex flex-col space-y-5 p-5 lg:max-w-[400px]", children: [_jsxs("ol", { className: "group list-disc text-wrap pl-4 font-normal text-[#CECFD2]", children: [_jsx("li", { children: "Earn rewards just for checking in each day!" }), _jsx("li", { children: "Stay consistent to unlock special rewards on the 3rd, 5th, and 7th day." }), _jsx("li", { children: "Missing a day will reset your streak, starting again from Day 1." }), _jsx("li", { children: "Each check-in unlocks the next one on the following day." }), _jsx("li", { children: "Successfully check in for 7 consecutive days to complete the quest and reset the cycle." })] }), _jsx("button", { type: "button", className: "mt-2 w-full rounded-md py-2 text-center font-semibold text-[#713B12] text-sm transition-colors duration-200", style: {
9
+ background: 'radial-gradient(694.11% 412.88% at -117.5% -146.67%, #FFE5AF 45.26%, #EAC467 78.33%)',
10
+ }, onClick: () => handleOpenChange(false), children: "Ok" })] })] }) }) })] }) }));
11
+ };
12
+ export default DialogCheckin;
@@ -0,0 +1,17 @@
1
+ import type { JourneyQuestMilestone, MemberVerificationStatus } from '../../../../types';
2
+ import type { QuestContextType } from '../../QuestsContext';
3
+ type Fn<T> = (milestone: JourneyQuestMilestone) => T;
4
+ type Props = {
5
+ isOpen: boolean;
6
+ quest: QuestContextType;
7
+ handleOpenChange: (open: boolean) => void;
8
+ enabled: boolean;
9
+ getMilestoneDescription: Fn<string | null>;
10
+ getCustomLinkUrl: Fn<string>;
11
+ handleMilestoneButtonClick: Fn<void>;
12
+ status: MemberVerificationStatus;
13
+ loginWithFacebook: () => void;
14
+ loginOrSignupUsingGoogle: () => void;
15
+ };
16
+ declare const DialogJourney: ({ isOpen, quest, handleOpenChange, enabled, getMilestoneDescription, getCustomLinkUrl, handleMilestoneButtonClick, status, loginWithFacebook, loginOrSignupUsingGoogle, }: Props) => import("react/jsx-runtime").JSX.Element;
17
+ export default DialogJourney;
@@ -0,0 +1,43 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { twMerge } from 'tailwind-merge';
3
+ import { CoinsHandIcon } from '../../../../icons/CoinsHandIcon.js';
4
+ import { File02Icon } from '../../../../icons/File02Icon.js';
5
+ import { Link01Icon } from '../../../../icons/Link01Icon.js';
6
+ import { XIcon } from '../../../../icons/XIcon.js';
7
+ import { Dialog } from '../../../../ui/Dialog/index.js';
8
+ import { Portal } from '../../../../ui/Portal/index.js';
9
+ const DialogJourney = ({ isOpen, quest, handleOpenChange, enabled, getMilestoneDescription, getCustomLinkUrl, handleMilestoneButtonClick, status, loginWithFacebook, loginOrSignupUsingGoogle, }) => {
10
+ return (_jsx(Dialog.Root, { open: isOpen, onOpenChange: (details) => {
11
+ handleOpenChange(details.open);
12
+ }, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "z-tooltip flex items-center justify-center", children: _jsx(Dialog.Content, { className: "", children: _jsxs("div", { className: "overflow-y-invisible mx-auto flex h-full w-full max-w-[400px] flex-col bg-[#0C0E12] px-4 py-5 lg:h-auto lg:rounded-xl", children: [_jsx("div", { className: "relative w-full p-4", children: _jsxs("div", { className: "flex w-full items-center justify-between", children: [_jsx("h2", { className: "font-semibold text-xl", children: quest?.name }), _jsx(Dialog.CloseTrigger, { className: "relative top-0 right-0", children: _jsx(XIcon, {}) })] }) }), _jsx("div", { className: "text-[#CECFD2] text-sm", dangerouslySetInnerHTML: { __html: quest.description } }), _jsx("div", { className: "mt-4 flex w-full flex-col space-y-4", children: quest?.milestones
13
+ ?.filter((milestone) => {
14
+ if (!enabled) {
15
+ return (milestone.type !== 'LINK_FACEBOOK_ACCOUNT' &&
16
+ milestone.type !== 'LINK_GOOGLE_ACCOUNT');
17
+ }
18
+ return true;
19
+ })
20
+ .map((milestone) => {
21
+ return (_jsxs("div", { className: "flex flex-col space-y-2.5 rounded-xl bg-[#0D1217] py-3", children: [_jsxs("div", { className: "flex w-full items-center justify-between px-3", children: [_jsx("p", { className: "font-medium text-base", children: milestone.name }), milestone.cleared && (_jsx("div", { className: "rounded-full border border-[#085D3A] bg-[#053321] px-2 py-0.5", children: _jsx("p", { className: "font-medium text-[#75E0A7] text-xs", children: "Completed" }) }))] }), getMilestoneDescription(milestone) && (_jsx("p", { className: "px-4 font-normal text-[#94969C] text-sm", children: getMilestoneDescription(milestone) })), milestone.type?.includes('CUSTOM') &&
22
+ milestone?.description && (_jsxs("div", { className: "px-4", children: [_jsx("p", { className: twMerge('prose', 'prose-h1:m-0', 'prose-h2:m-0', 'prose-h3:m-0', 'prose-h4:m-0', 'prose-h5:m-0', 'prose-h6:m-0', 'prose-a:m-0', 'prose-p:m-0', 'mt-3', 'space-y-6', 'text-start', 'text-sm', 'text-[#94969C]', 'lg:text-base', '*:block'), dangerouslySetInnerHTML: {
23
+ __html: milestone.description,
24
+ } }), !milestone.cleared &&
25
+ milestone.type === 'CUSTOM_LINK' && (_jsxs("a", { className: "mt-2 flex w-full items-center justify-center gap-1 rounded-md py-2 text-center font-semibold text-[#713B12] text-sm transition-colors duration-200", style: {
26
+ background: 'radial-gradient(694.11% 412.88% at -117.5% -146.67%, #FFE5AF 45.26%, #EAC467 78.33%)',
27
+ }, href: getCustomLinkUrl(milestone), target: "_blank", rel: "noopener noreferrer", children: ["Click Here ", _jsx(Link01Icon, { className: "size-5" })] }))] })), !milestone.cleared &&
28
+ (milestone.type === 'ACCOUNT_VERIFICATION' ||
29
+ milestone.type === 'FIRST_DEPOSIT') && (_jsx("div", { className: "px-4", children: _jsxs("button", { type: "button", className: "mt-2 w-full rounded-md py-2 text-center font-semibold text-[#713B12] text-sm transition-colors duration-200", style: {
30
+ background: 'radial-gradient(694.11% 412.88% at -117.5% -146.67%, #FFE5AF 45.26%, #EAC467 78.33%)',
31
+ }, onClick: () => handleMilestoneButtonClick(milestone), disabled: status === 'PENDING' || status === 'VERIFIED', children: [milestone.type === 'ACCOUNT_VERIFICATION' && (_jsx(File02Icon, { className: "mr-1 inline size-5" })), milestone.type === 'FIRST_DEPOSIT' && (_jsx(CoinsHandIcon, { className: "mr-1 inline size-5" })), milestone.type === 'ACCOUNT_VERIFICATION'
32
+ ? 'Verify Account'
33
+ : 'Deposit'] }) })), milestone.type === 'LINK_FACEBOOK_ACCOUNT' && (_jsx("div", { className: "px-4", children: _jsxs("button", { type: "button", className: "mt-2 flex w-full items-center justify-center gap-1 rounded-md py-2 text-center font-semibold text-[#713B12] text-sm transition-colors duration-200", style: {
34
+ background: 'radial-gradient(694.11% 412.88% at -117.5% -146.67%, #FFE5AF 45.26%, #EAC467 78.33%)',
35
+ }, onClick: loginWithFacebook, children: [_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", viewBox: "0 0 256 256", className: "size-6", children: [_jsx("path", { fill: "#1877F2", d: "M256 128C256 57.308 198.692 0 128 0S0 57.308 0 128c0 63.888 46.808 116.843 108 126.445V165H75.5v-37H108V99.8c0-32.08 19.11-49.8 48.348-49.8C170.352 50 185 52.5 185 52.5V84h-16.14C152.959 84 148 93.867 148 103.99V128h35.5l-5.675 37H148v89.445c61.192-9.602 108-62.556 108-126.445" }), _jsx("path", { fill: "#FFF", d: "m177.825 165l5.675-37H148v-24.01C148 93.866 152.959 84 168.86 84H185V52.5S170.352 50 156.347 50C127.11 50 108 67.72 108 99.8V128H75.5v37H108v89.445A129 129 0 0 0 128 256a129 129 0 0 0 20-1.555V165z" })] }), "Link Facebook Account"] }) })), milestone.type === 'LINK_GOOGLE_ACCOUNT' && (_jsx("div", { className: "px-4", children: _jsxs("button", { type: "button", className: "mt-2 flex w-full items-center justify-center gap-1 rounded-md py-2 text-center font-semibold text-[#713B12] text-sm transition-colors duration-200", style: {
36
+ background: 'radial-gradient(694.11% 412.88% at -117.5% -146.67%, #FFE5AF 45.26%, #EAC467 78.33%)',
37
+ }, onClick: loginOrSignupUsingGoogle, children: [_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "31.27", height: "32", viewBox: "0 0 256 262", className: "size-6", children: [_jsx("path", { fill: "#4285F4", d: "M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.90 42.356l-.244 1.622l38.755 30.023l2.685.268c24.659-22.774 38.875-56.282 38.875-96.027" }), _jsx("path", { fill: "#34A853", d: "M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055c-34.523 0-63.824-22.773-74.269-54.25l-1.531.13l-40.298 31.187l-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1" }), _jsx("path", { fill: "#FBBC05", d: "M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82c0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602z" }), _jsx("path", { fill: "#EB4335", d: "M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0C79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251" })] }), "Link Google Account"] }) }))] }, milestone.id));
38
+ }) }), quest.bonus &&
39
+ quest.milestones?.every((milestone) => milestone.cleared) ? (_jsx("div", { className: "mt-4", children: _jsx("button", { type: "button", className: "mt-2 w-full rounded-md py-2 text-center font-semibold text-[#713B12] text-sm transition-colors duration-200", style: {
40
+ background: 'radial-gradient(694.11% 412.88% at -117.5% -146.67%, #FFE5AF 45.26%, #EAC467 78.33%)',
41
+ }, onClick: () => handleOpenChange(false), children: "Close" }) })) : (_jsx("div", { className: "mt-6 w-full rounded-lg border border-[#22262F] bg-[#13161B] px-3.5 py-2.5 text-center", children: _jsxs("p", { className: "text-sm", children: ["Complete to get", ' ', _jsxs("span", { className: "font-semibold text-[#FFE5AF]", children: ["\u20B1", quest.bonus] }), ' ', "bonus!"] }) }))] }) }) })] }) }));
42
+ };
43
+ export default DialogJourney;