@saasquatch/mint-components 1.5.0-7 → 1.5.0-70

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 (740) hide show
  1. package/CHANGELOG.md +156 -24
  2. package/dist/cjs/GenericTableView-2cdb4c5d.js +108 -0
  3. package/dist/cjs/{jss-preset-default.esm-6304d24f.js → JSS-c65a40f1.js} +5 -3
  4. package/dist/cjs/ShadowViewAddon-fbbacd12.js +2228 -0
  5. package/dist/cjs/extends-08099afd.js +21 -0
  6. package/dist/cjs/{global-89f66e76.js → global-58d95b21.js} +82 -185
  7. package/dist/cjs/{index.module-c0bf9df0.js → index.module-54724339.js} +51 -50
  8. package/dist/cjs/insertcss-04580cfa.js +47 -0
  9. package/dist/cjs/loader.cjs.js +7 -5
  10. package/dist/cjs/luxon-59ca7d19.js +8348 -0
  11. package/dist/cjs/mint-components.cjs.js +7 -5
  12. package/dist/cjs/{sqm-asset-card-view-07f86880.js → sqm-asset-card-view-d9ac6a95.js} +2 -3
  13. package/dist/cjs/sqm-asset-card.cjs.entry.js +8 -7
  14. package/dist/cjs/sqm-big-stat-view-e5dc0877.js +40 -0
  15. package/dist/cjs/sqm-big-stat.cjs.entry.js +10 -8
  16. package/dist/cjs/sqm-brand_28.cjs.entry.js +7267 -0
  17. package/dist/cjs/sqm-form-message.cjs.entry.js +31 -0
  18. package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +9 -8
  19. package/dist/cjs/{sqm-hero-view-bb3d00a1.js → sqm-hero-view-a13795c0.js} +6 -7
  20. package/dist/cjs/sqm-hero.cjs.entry.js +7 -6
  21. package/dist/cjs/sqm-image_4.cjs.entry.js +200 -0
  22. package/dist/cjs/sqm-leaderboard-rank-view-35015d30.js +10 -0
  23. package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +12 -13
  24. package/dist/cjs/{sqm-name-fields-view-24614ac7.js → sqm-name-fields-view-c95e4768.js} +2 -3
  25. package/dist/cjs/sqm-name-fields.cjs.entry.js +9 -8
  26. package/dist/cjs/{sqm-navigation-sidebar-item-view-a2bdcf05.js → sqm-navigation-sidebar-item-view-da648fbc.js} +7 -6
  27. package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +10 -9
  28. package/dist/cjs/{sqm-navigation-sidebar-view-d06e1885.js → sqm-navigation-sidebar-view-36632c96.js} +2 -3
  29. package/dist/cjs/sqm-navigation-sidebar.cjs.entry.js +5 -4
  30. package/dist/cjs/sqm-password-field.cjs.entry.js +581 -0
  31. package/dist/cjs/sqm-popup-container.cjs.entry.js +6 -5
  32. package/dist/cjs/{sqm-portal-container-view-d144735a.js → sqm-portal-container-view-fdfb3656.js} +9 -5
  33. package/dist/cjs/{sqm-portal-email-verification-view-5093ac20.js → sqm-portal-email-verification-view-f42557ca.js} +5 -6
  34. package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +24 -15
  35. package/dist/cjs/{sqm-portal-footer-view-03408484.js → sqm-portal-footer-view-5e6903c9.js} +3 -4
  36. package/dist/cjs/sqm-portal-footer.cjs.entry.js +10 -8
  37. package/dist/cjs/{sqm-portal-forgot-password-view-1704d285.js → sqm-portal-forgot-password-view-10c0b54f.js} +3 -4
  38. package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +30 -17
  39. package/dist/cjs/sqm-portal-logout.cjs.entry.js +7 -6
  40. package/dist/cjs/{sqm-portal-profile-view-fa2db439.js → sqm-portal-profile-view-637d2fe7.js} +5 -6
  41. package/dist/cjs/sqm-portal-profile.cjs.entry.js +20 -18
  42. package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +10 -9
  43. package/dist/cjs/{sqm-portal-reset-password-view-4d78fd6d.js → sqm-portal-reset-password-view-1fdc957e.js} +3 -4
  44. package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +27 -18
  45. package/dist/cjs/{sqm-portal-section-view-3b008930.js → sqm-portal-section-view-186a5f7e.js} +4 -6
  46. package/dist/cjs/{sqm-portal-verify-email-view-b595e302.js → sqm-portal-verify-email-view-4c78e231.js} +3 -4
  47. package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +29 -20
  48. package/dist/cjs/sqm-referral-table_11.cjs.entry.js +491 -0
  49. package/dist/cjs/sqm-refresh-button.cjs.entry.js +54 -0
  50. package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +758 -0
  51. package/dist/cjs/{sqm-stat-container-view-ee7b00ff.js → sqm-stat-container-view-5b2db929.js} +3 -4
  52. package/dist/cjs/sqm-stat-container.cjs.entry.js +6 -5
  53. package/dist/cjs/sqm-stencilbook.cjs.entry.js +14205 -0
  54. package/dist/cjs/{sqm-text-span-view-b5ae787b.js → sqm-text-span-view-f101dedf.js} +2 -3
  55. package/dist/cjs/sqm-text-span.cjs.entry.js +5 -4
  56. package/dist/cjs/{extends-0302d27d.js → stencil-hooks.module-87a1f4f7.js} +0 -19
  57. package/dist/cjs/use-callback-e754042f.js +7 -0
  58. package/dist/cjs/useChildElements-4bc9b219.js +61 -0
  59. package/dist/cjs/{useDemoBigStat-5d71bbdf.js → useDemoBigStat-426e3319.js} +22 -48
  60. package/dist/cjs/useReferralTable-e473585e.js +348 -0
  61. package/dist/cjs/{utils-95e5317c.js → utils-01dbfd4a.js} +9 -0
  62. package/dist/collection/collection-manifest.json +41 -5
  63. package/dist/collection/components/sqm-asset-card/sqm-asset-card-view.js +2 -4
  64. package/dist/collection/components/sqm-big-stat/BigStat.stories.js +8 -1
  65. package/dist/collection/components/sqm-big-stat/sqm-big-stat-view.js +2 -4
  66. package/dist/collection/components/sqm-big-stat/sqm-big-stat.js +21 -1
  67. package/dist/collection/components/sqm-big-stat/useBigStat.js +14 -4
  68. package/dist/collection/components/sqm-big-stat/useDemoBigStat.js +2 -0
  69. package/dist/collection/components/sqm-brand/sqm-brand.js +32 -2
  70. package/dist/collection/components/sqm-card-feed/CardFeed.stories.js +104 -0
  71. package/dist/collection/components/sqm-card-feed/sqm-card-feed-view.js +27 -0
  72. package/dist/collection/components/sqm-card-feed/sqm-card-feed.js +79 -0
  73. package/dist/collection/components/sqm-divided-layout/sqm-divided-layout-view.js +2 -4
  74. package/dist/collection/components/sqm-hero/sqm-hero-view.js +2 -4
  75. package/dist/collection/components/sqm-hero-image/HeroImage.stories.js +40 -0
  76. package/dist/collection/components/sqm-hero-image/sqm-hero-image-view.js +134 -0
  77. package/dist/collection/components/sqm-hero-image/sqm-hero-image.js +515 -0
  78. package/dist/collection/components/sqm-image/Image.stories.js +25 -0
  79. package/dist/collection/components/sqm-image/sqm-image-view.js +33 -0
  80. package/dist/collection/components/sqm-image/sqm-image.js +180 -0
  81. package/dist/collection/components/sqm-leaderboard/Leaderboard.stories.js +525 -11
  82. package/dist/collection/components/sqm-leaderboard/UseLeaderboard.stories.js +62 -8
  83. package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +86 -11
  84. package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.css +21 -1
  85. package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.js +168 -12
  86. package/dist/collection/components/sqm-leaderboard/useLeaderboard.js +31 -3
  87. package/dist/collection/components/sqm-leaderboard-rank/sqm-leaderboard-rank.js +1 -4
  88. package/dist/collection/components/sqm-leaderboard-rank/useLeaderboardRank.js +1 -1
  89. package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +2 -4
  90. package/dist/collection/components/sqm-navigation-sidebar/sqm-navigation-sidebar-view.js +2 -4
  91. package/dist/collection/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item-view.js +5 -5
  92. package/dist/collection/components/sqm-password-field/passwordValidation.js +2 -4
  93. package/dist/collection/components/sqm-password-field/sqm-password-field-view.js +2 -4
  94. package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password-view.js +2 -4
  95. package/dist/collection/components/sqm-portal-container/PortalContainer.stories.js +32 -0
  96. package/dist/collection/components/sqm-portal-container/sqm-portal-container-view.js +9 -6
  97. package/dist/collection/components/sqm-portal-container/sqm-portal-container.js +78 -0
  98. package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification-view.js +4 -6
  99. package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification.js +27 -0
  100. package/dist/collection/components/sqm-portal-email-verification/usePortalEmailVerification.js +2 -1
  101. package/dist/collection/components/sqm-portal-footer/sqm-portal-footer-view.js +2 -4
  102. package/dist/collection/components/sqm-portal-forgot-password/PortalForgotPassword.stories.js +4 -0
  103. package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.js +2 -4
  104. package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password.js +55 -3
  105. package/dist/collection/components/sqm-portal-forgot-password/usePortalForgotPassword.js +4 -2
  106. package/dist/collection/components/sqm-portal-frame/sqm-portal-frame-view.js +2 -4
  107. package/dist/collection/components/sqm-portal-login/PortalLogin.stories.js +6 -0
  108. package/dist/collection/components/sqm-portal-login/sqm-portal-login-view.js +3 -5
  109. package/dist/collection/components/sqm-portal-login/sqm-portal-login.js +59 -4
  110. package/dist/collection/components/sqm-portal-login/usePortalLogin.js +4 -2
  111. package/dist/collection/components/sqm-portal-profile/PortalProfile.stories.js +1 -7
  112. package/dist/collection/components/sqm-portal-profile/sqm-portal-profile-view.js +2 -4
  113. package/dist/collection/components/sqm-portal-register/PortalRegister.stories.js +12 -0
  114. package/dist/collection/components/sqm-portal-register/sqm-portal-register-view.js +3 -4
  115. package/dist/collection/components/sqm-portal-register/sqm-portal-register.js +56 -2
  116. package/dist/collection/components/sqm-portal-register/usePortalRegister.js +3 -0
  117. package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password-view.js +3 -5
  118. package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password.js +30 -1
  119. package/dist/collection/components/sqm-portal-reset-password/usePortalResetPassword.js +1 -1
  120. package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email-view.js +2 -4
  121. package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email.js +30 -1
  122. package/dist/collection/components/sqm-portal-verify-email/usePortalVerifyEmail.js +2 -2
  123. package/dist/collection/components/sqm-program-explainer/ProgramExplainer.stories.js +28 -44
  124. package/dist/collection/components/sqm-program-explainer/sqm-program-explainer-view.js +33 -30
  125. package/dist/collection/components/sqm-program-explainer/sqm-program-explainer.js +7 -47
  126. package/dist/collection/components/sqm-program-explainer-step/ProgramExplainerStep.stories.js +5 -17
  127. package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js +43 -38
  128. package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step.js +28 -8
  129. package/dist/collection/components/sqm-referral-card/ReferralCard.stories.js +78 -0
  130. package/dist/collection/components/sqm-referral-card/sqm-referral-card-view.js +52 -0
  131. package/dist/collection/components/sqm-referral-card/sqm-referral-card.js +100 -0
  132. package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe-view.js +2 -4
  133. package/dist/collection/components/sqm-referral-table/ReferralTable.stories.js +95 -66
  134. package/dist/collection/components/sqm-referral-table/ReferralTableCell.stories.js +1 -1
  135. package/dist/collection/components/sqm-referral-table/ReferralTableRewardsCell.stories.js +25 -25
  136. package/dist/collection/components/sqm-referral-table/UseReferralTable.stories.js +119 -0
  137. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-date-cell.js +23 -5
  138. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +197 -26
  139. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-status-cell.js +14 -1
  140. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-user-cell.js +2 -3
  141. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-date-column.js +9 -5
  142. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.js +156 -3
  143. package/dist/collection/components/sqm-referral-table/sqm-referral-table-view.js +3 -7
  144. package/dist/collection/components/sqm-referral-table/sqm-referral-table.js +162 -15
  145. package/dist/collection/components/sqm-referral-table/useReferralTable.js +379 -16
  146. package/dist/collection/components/sqm-refresh-button/RefreshButtonView.js +8 -0
  147. package/dist/collection/components/sqm-refresh-button/sqm-refresh-button.js +66 -0
  148. package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeList.stories.js +7 -6
  149. package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeListData.js +105 -23
  150. package/dist/collection/components/sqm-reward-exchange-list/assets/Reward-image.png +0 -0
  151. package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +320 -206
  152. package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list.js +256 -14
  153. package/dist/collection/components/sqm-reward-exchange-list/useRewardExchangeList.js +20 -8
  154. package/dist/collection/components/sqm-rewards-table/RewardsTable.stories.js +67 -0
  155. package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +207 -0
  156. package/dist/collection/components/sqm-rewards-table/UseRewardsTable.stories.js +79 -1
  157. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-date-cell.js +22 -3
  158. package/dist/collection/components/sqm-rewards-table/cells/{sqm-rewards-table-rewards-cell.js → sqm-rewards-table-reward-cell.js} +89 -53
  159. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-source-cell.js +138 -30
  160. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.js +155 -2
  161. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-date-column.js +8 -4
  162. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.js +42 -16
  163. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.js +83 -3
  164. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.js +34 -6
  165. package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +158 -16
  166. package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +25 -19
  167. package/dist/collection/components/sqm-share-button/ShareButton.stories.js +59 -6
  168. package/dist/collection/components/sqm-share-button/sqm-share-button-view.js +67 -11
  169. package/dist/collection/components/sqm-share-button/sqm-share-button.js +70 -12
  170. package/dist/collection/components/sqm-share-button/useShareButton.js +1 -1
  171. package/dist/collection/components/sqm-share-link/sqm-share-link-view.js +2 -4
  172. package/dist/collection/components/sqm-stat-container/sqm-stat-container-view.js +3 -5
  173. package/dist/collection/components/sqm-stencilbook/AutoColor.js +10 -10
  174. package/dist/collection/components/sqm-stencilbook/Themes.js +3 -11
  175. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +21 -1
  176. package/dist/collection/{tables → components/sqm-table-cell}/sqm-table-cell.js +0 -0
  177. package/dist/collection/{tables → components/sqm-table-row}/sqm-table-row.js +0 -0
  178. package/dist/collection/components/sqm-task-card/DetailsView.js +53 -0
  179. package/dist/collection/components/sqm-task-card/TaskCard.stories.js +169 -163
  180. package/dist/collection/components/sqm-task-card/UseTaskCard.stories.js +28 -2
  181. package/dist/collection/components/sqm-task-card/progress-bar/SVGs.js +1 -1
  182. package/dist/collection/components/sqm-task-card/progress-bar/progress-bar-view.js +349 -319
  183. package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +247 -205
  184. package/dist/collection/components/sqm-task-card/sqm-task-card.js +245 -11
  185. package/dist/collection/components/sqm-task-card/useTaskCard.js +43 -0
  186. package/dist/collection/components/sqm-text/sqm-text.js +18 -18
  187. package/dist/collection/components/sqm-text-span/sqm-text-span-view.js +2 -4
  188. package/dist/collection/components/sqm-timeline/SVGs.js +10 -0
  189. package/dist/collection/components/sqm-timeline/Timeline.stories.js +64 -0
  190. package/dist/collection/components/sqm-timeline/sqm-timeline-entry.js +203 -0
  191. package/dist/collection/components/sqm-timeline/sqm-timeline.js +115 -0
  192. package/dist/collection/components/sqm-titled-section/TitledSection.stories.js +233 -0
  193. package/dist/collection/components/sqm-titled-section/sqm-portal-section-view.js +4 -7
  194. package/dist/collection/components/sqm-titled-section/sqm-titled-section.js +39 -3
  195. package/dist/collection/components/sqm-user-name/sqm-user-name.js +1 -1
  196. package/dist/collection/components/sqm-user-name/useUserName.js +1 -1
  197. package/dist/collection/global/global.js +1 -1
  198. package/dist/collection/global/styles.js +14 -72
  199. package/dist/collection/global/styles.ts +14 -72
  200. package/dist/collection/stories/NewPortal.stories.js +17 -19
  201. package/dist/collection/styling/JSS.js +9 -0
  202. package/dist/collection/tables/GenericTableView.js +87 -35
  203. package/dist/collection/tables/TableSlots.js +9 -1
  204. package/dist/collection/utils/RequiredPropsError.js +2 -4
  205. package/dist/collection/utils/utils.js +8 -0
  206. package/dist/esm/GenericTableView-79b65de0.js +106 -0
  207. package/dist/esm/{jss-preset-default.esm-71fae192.js → JSS-96eeab98.js} +5 -2
  208. package/dist/esm/ShadowViewAddon-98630948.js +2209 -0
  209. package/dist/esm/extends-c31f1eff.js +19 -0
  210. package/dist/esm/{global-e0e25c22.js → global-58010a55.js} +20 -121
  211. package/dist/esm/{index.module-eb50a8d2.js → index.module-ec3dcc82.js} +11 -10
  212. package/dist/esm/insertcss-bcaf3818.js +45 -0
  213. package/dist/esm/loader.js +7 -5
  214. package/dist/esm/luxon-5fa22651.js +8346 -0
  215. package/dist/esm/mint-components.js +7 -5
  216. package/dist/esm/{sqm-asset-card-view-6f360937.js → sqm-asset-card-view-f9ca5345.js} +2 -3
  217. package/dist/esm/sqm-asset-card.entry.js +7 -6
  218. package/dist/esm/sqm-big-stat-view-309f7c1f.js +38 -0
  219. package/dist/esm/sqm-big-stat.entry.js +8 -6
  220. package/dist/esm/sqm-brand_28.entry.js +7236 -0
  221. package/dist/esm/sqm-form-message.entry.js +27 -0
  222. package/dist/esm/sqm-graphql-client-provider.entry.js +7 -6
  223. package/dist/esm/{sqm-hero-view-bfd8abd1.js → sqm-hero-view-190bc812.js} +4 -5
  224. package/dist/esm/sqm-hero.entry.js +6 -5
  225. package/dist/esm/sqm-image_4.entry.js +193 -0
  226. package/dist/esm/sqm-leaderboard-rank-view-da91f5f3.js +8 -0
  227. package/dist/esm/sqm-leaderboard-rank.entry.js +10 -11
  228. package/dist/esm/{sqm-name-fields-view-4162fb7b.js → sqm-name-fields-view-69b1583f.js} +2 -3
  229. package/dist/esm/sqm-name-fields.entry.js +7 -6
  230. package/dist/esm/{sqm-navigation-sidebar-item-view-2d8c368c.js → sqm-navigation-sidebar-item-view-a6f7f96c.js} +7 -6
  231. package/dist/esm/sqm-navigation-sidebar-item.entry.js +9 -8
  232. package/dist/esm/{sqm-navigation-sidebar-view-2242502c.js → sqm-navigation-sidebar-view-816558e3.js} +2 -3
  233. package/dist/esm/sqm-navigation-sidebar.entry.js +4 -3
  234. package/dist/esm/sqm-password-field.entry.js +577 -0
  235. package/dist/esm/sqm-popup-container.entry.js +5 -4
  236. package/dist/esm/{sqm-portal-container-view-73757ca5.js → sqm-portal-container-view-f74db584.js} +9 -5
  237. package/dist/esm/{sqm-portal-email-verification-view-2af31979.js → sqm-portal-email-verification-view-2c8bfca8.js} +5 -6
  238. package/dist/esm/sqm-portal-email-verification.entry.js +19 -10
  239. package/dist/esm/{sqm-portal-footer-view-60cd9ae5.js → sqm-portal-footer-view-a6c21fb9.js} +4 -5
  240. package/dist/esm/sqm-portal-footer.entry.js +9 -7
  241. package/dist/esm/{sqm-portal-forgot-password-view-e3a6a716.js → sqm-portal-forgot-password-view-fa088f83.js} +3 -4
  242. package/dist/esm/sqm-portal-forgot-password.entry.js +25 -12
  243. package/dist/esm/sqm-portal-logout.entry.js +6 -5
  244. package/dist/esm/{sqm-portal-profile-view-f1deea0f.js → sqm-portal-profile-view-6a4ab589.js} +5 -6
  245. package/dist/esm/sqm-portal-profile.entry.js +13 -11
  246. package/dist/esm/sqm-portal-protected-route.entry.js +8 -7
  247. package/dist/esm/{sqm-portal-reset-password-view-a4e50da2.js → sqm-portal-reset-password-view-73e14282.js} +3 -4
  248. package/dist/esm/sqm-portal-reset-password.entry.js +23 -14
  249. package/dist/esm/{sqm-portal-section-view-f0876545.js → sqm-portal-section-view-88a80af9.js} +4 -6
  250. package/dist/esm/{sqm-portal-verify-email-view-6f18bac2.js → sqm-portal-verify-email-view-cbf1cfdc.js} +3 -4
  251. package/dist/esm/sqm-portal-verify-email.entry.js +21 -12
  252. package/dist/esm/sqm-referral-table_11.entry.js +477 -0
  253. package/dist/esm/sqm-refresh-button.entry.js +50 -0
  254. package/dist/esm/sqm-rewards-table_9.entry.js +746 -0
  255. package/dist/esm/{sqm-stat-container-view-4133feb6.js → sqm-stat-container-view-8a565c5a.js} +3 -4
  256. package/dist/esm/sqm-stat-container.entry.js +5 -4
  257. package/dist/esm/sqm-stencilbook.entry.js +14201 -0
  258. package/dist/esm/{sqm-text-span-view-1781df94.js → sqm-text-span-view-7e61c95c.js} +2 -3
  259. package/dist/esm/sqm-text-span.entry.js +4 -3
  260. package/dist/esm/{extends-3a3f9fe2.js → stencil-hooks.module-2f159754.js} +1 -19
  261. package/dist/esm/{use-callback-b38a1523.js → use-callback-d8ef4b5d.js} +1 -1
  262. package/dist/esm/{re-render-6d5b856e.js → useChildElements-c11d6189.js} +21 -6
  263. package/dist/esm/{useDemoBigStat-d227b2f9.js → useDemoBigStat-022e116d.js} +20 -45
  264. package/dist/esm/useReferralTable-bccb9ac0.js +345 -0
  265. package/dist/esm/{utils-454405f5.js → utils-1d345130.js} +9 -1
  266. package/dist/esm-es5/GenericTableView-79b65de0.js +1 -0
  267. package/dist/esm-es5/{jss-preset-default.esm-71fae192.js → JSS-96eeab98.js} +2 -2
  268. package/dist/esm-es5/ShadowViewAddon-98630948.js +1 -0
  269. package/dist/esm-es5/extends-c31f1eff.js +1 -0
  270. package/dist/esm-es5/{global-e0e25c22.js → global-58010a55.js} +2 -2
  271. package/dist/esm-es5/index.module-ec3dcc82.js +1 -0
  272. package/dist/esm-es5/insertcss-bcaf3818.js +1 -0
  273. package/dist/esm-es5/loader.js +1 -1
  274. package/dist/esm-es5/luxon-5fa22651.js +1 -0
  275. package/dist/esm-es5/mint-components.js +1 -1
  276. package/dist/esm-es5/sqm-asset-card-view-f9ca5345.js +1 -0
  277. package/dist/esm-es5/sqm-asset-card.entry.js +1 -1
  278. package/dist/esm-es5/sqm-big-stat-view-309f7c1f.js +1 -0
  279. package/dist/esm-es5/sqm-big-stat.entry.js +1 -1
  280. package/dist/esm-es5/sqm-brand_28.entry.js +1 -0
  281. package/dist/esm-es5/sqm-form-message.entry.js +1 -0
  282. package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
  283. package/dist/esm-es5/sqm-hero-view-190bc812.js +1 -0
  284. package/dist/esm-es5/sqm-hero.entry.js +1 -1
  285. package/dist/esm-es5/sqm-image_4.entry.js +1 -0
  286. package/dist/esm-es5/sqm-leaderboard-rank-view-da91f5f3.js +1 -0
  287. package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
  288. package/dist/esm-es5/sqm-name-fields-view-69b1583f.js +1 -0
  289. package/dist/esm-es5/sqm-name-fields.entry.js +1 -1
  290. package/dist/esm-es5/sqm-navigation-sidebar-item-view-a6f7f96c.js +1 -0
  291. package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
  292. package/dist/esm-es5/sqm-navigation-sidebar-view-816558e3.js +1 -0
  293. package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
  294. package/dist/esm-es5/sqm-password-field.entry.js +1 -0
  295. package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
  296. package/dist/esm-es5/sqm-portal-container-view-f74db584.js +1 -0
  297. package/dist/esm-es5/sqm-portal-email-verification-view-2c8bfca8.js +1 -0
  298. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  299. package/dist/esm-es5/sqm-portal-footer-view-a6c21fb9.js +1 -0
  300. package/dist/esm-es5/sqm-portal-footer.entry.js +1 -1
  301. package/dist/esm-es5/sqm-portal-forgot-password-view-fa088f83.js +1 -0
  302. package/dist/esm-es5/sqm-portal-forgot-password.entry.js +1 -1
  303. package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
  304. package/dist/esm-es5/sqm-portal-profile-view-6a4ab589.js +1 -0
  305. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  306. package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
  307. package/dist/esm-es5/sqm-portal-reset-password-view-73e14282.js +1 -0
  308. package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
  309. package/dist/esm-es5/sqm-portal-section-view-88a80af9.js +1 -0
  310. package/dist/esm-es5/sqm-portal-verify-email-view-cbf1cfdc.js +1 -0
  311. package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
  312. package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -0
  313. package/dist/esm-es5/sqm-refresh-button.entry.js +1 -0
  314. package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -0
  315. package/dist/esm-es5/sqm-stat-container-view-8a565c5a.js +1 -0
  316. package/dist/esm-es5/sqm-stat-container.entry.js +1 -1
  317. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -0
  318. package/dist/esm-es5/sqm-text-span-view-7e61c95c.js +1 -0
  319. package/dist/esm-es5/sqm-text-span.entry.js +1 -1
  320. package/dist/esm-es5/{extends-3a3f9fe2.js → stencil-hooks.module-2f159754.js} +1 -1
  321. package/dist/esm-es5/use-callback-d8ef4b5d.js +1 -0
  322. package/dist/esm-es5/useChildElements-c11d6189.js +1 -0
  323. package/dist/esm-es5/useDemoBigStat-022e116d.js +1 -0
  324. package/dist/esm-es5/useReferralTable-bccb9ac0.js +1 -0
  325. package/dist/esm-es5/utils-1d345130.js +1 -0
  326. package/dist/mint-components/assets/Reward-image.png +0 -0
  327. package/dist/mint-components/global/styles.ts +14 -72
  328. package/dist/mint-components/mint-components.esm.js +1 -1
  329. package/dist/mint-components/mint-components.js +1 -1
  330. package/dist/mint-components/p-01748c80.system.entry.js +1 -0
  331. package/dist/mint-components/p-023dcaee.js +1 -0
  332. package/dist/mint-components/{p-0e8ae7e3.system.js → p-0988f079.system.js} +22 -22
  333. package/dist/mint-components/p-0aee946d.js +1 -0
  334. package/dist/mint-components/p-0c19f830.entry.js +1 -0
  335. package/dist/mint-components/p-0d66fc45.js +239 -0
  336. package/dist/mint-components/p-1288be55.entry.js +1 -0
  337. package/dist/mint-components/{p-24fa8920.system.entry.js → p-136e2028.system.entry.js} +1 -1
  338. package/dist/mint-components/p-14655192.js +161 -0
  339. package/dist/mint-components/p-14bd5b1e.entry.js +87 -0
  340. package/dist/mint-components/p-179988b5.js +1 -0
  341. package/dist/mint-components/p-18003e9c.system.js +1 -0
  342. package/dist/mint-components/p-1959da16.system.js +1 -0
  343. package/dist/mint-components/p-197d1027.system.entry.js +1 -0
  344. package/dist/mint-components/p-1c17892a.system.js +1 -0
  345. package/dist/mint-components/p-1d1e9197.js +1 -0
  346. package/dist/mint-components/p-204fd08c.js +1 -0
  347. package/dist/mint-components/p-232db563.system.entry.js +1 -0
  348. package/dist/mint-components/p-2454f30a.system.entry.js +1 -0
  349. package/dist/mint-components/p-27849b7e.system.entry.js +1 -0
  350. package/dist/mint-components/p-27e04aaf.entry.js +1 -0
  351. package/dist/mint-components/p-348461ec.system.entry.js +1 -0
  352. package/dist/mint-components/p-373fa002.js +1 -0
  353. package/dist/mint-components/p-382a1bca.system.js +1 -0
  354. package/dist/mint-components/p-3a374367.js +1 -0
  355. package/dist/mint-components/p-3b184c32.js +1 -0
  356. package/dist/mint-components/{p-1b7d89a7.system.js → p-3bbb90a9.system.js} +2 -2
  357. package/dist/mint-components/p-3e556042.js +1 -0
  358. package/dist/mint-components/p-408551bc.entry.js +1 -0
  359. package/dist/mint-components/p-4275c957.system.entry.js +1 -0
  360. package/dist/mint-components/p-4279da4b.system.js +1 -0
  361. package/dist/mint-components/p-4991f4c0.system.entry.js +1 -0
  362. package/dist/mint-components/p-49c9ff69.entry.js +1 -0
  363. package/dist/mint-components/p-4a1b7d35.js +1 -0
  364. package/dist/mint-components/p-4ad13646.entry.js +9 -0
  365. package/dist/mint-components/p-4dbf5bbf.system.js +1 -0
  366. package/dist/mint-components/p-4e05c65a.js +1 -0
  367. package/dist/mint-components/p-53af4433.system.js +1 -0
  368. package/dist/mint-components/p-54986541.entry.js +1 -0
  369. package/dist/mint-components/p-591de129.js +1 -0
  370. package/dist/mint-components/p-59454f33.system.js +1 -0
  371. package/dist/mint-components/{p-8fd8682c.js → p-5a2bd8cc.js} +3 -3
  372. package/dist/mint-components/p-5ab40dfa.system.js +1 -0
  373. package/dist/mint-components/p-5c75acad.js +1 -0
  374. package/dist/mint-components/p-5e3f4daa.system.entry.js +1 -0
  375. package/dist/mint-components/p-61d68133.system.entry.js +1 -0
  376. package/dist/mint-components/p-61d769e2.system.js +1 -0
  377. package/dist/mint-components/p-63a6475a.system.entry.js +1 -0
  378. package/dist/mint-components/p-6b43e4cc.system.js +1 -0
  379. package/dist/mint-components/p-71a4e832.entry.js +13 -0
  380. package/dist/mint-components/p-72a978c8.entry.js +1 -0
  381. package/dist/mint-components/p-73d5306f.js +1 -0
  382. package/dist/mint-components/p-76325d9c.system.entry.js +1 -0
  383. package/dist/mint-components/p-7a39ceff.system.entry.js +1 -0
  384. package/dist/mint-components/p-7a5c88bc.js +1 -0
  385. package/dist/mint-components/p-7d74b018.system.entry.js +1 -0
  386. package/dist/mint-components/p-81681ebd.system.entry.js +1 -0
  387. package/dist/mint-components/p-81f34787.js +1 -0
  388. package/dist/mint-components/p-871536c7.entry.js +1 -0
  389. package/dist/mint-components/p-875f46d7.system.entry.js +1 -0
  390. package/dist/mint-components/p-8a55dda8.system.js +1 -0
  391. package/dist/mint-components/p-8bcaafaf.system.js +1 -0
  392. package/dist/mint-components/p-8d74871c.system.js +1 -0
  393. package/dist/mint-components/p-91d119ad.system.js +1 -0
  394. package/dist/mint-components/{p-015b683f.system.js → p-9580888c.system.js} +2 -2
  395. package/dist/mint-components/p-95e36be8.entry.js +1 -0
  396. package/dist/mint-components/p-96c971fa.entry.js +1 -0
  397. package/dist/mint-components/p-975d4358.js +1 -0
  398. package/dist/mint-components/p-97f843f9.system.entry.js +1 -0
  399. package/dist/mint-components/p-98393bf0.entry.js +1 -0
  400. package/dist/mint-components/p-9b48d01e.js +1 -0
  401. package/dist/mint-components/p-9f65904f.entry.js +1 -0
  402. package/dist/mint-components/p-a09e3176.system.js +1 -0
  403. package/dist/mint-components/p-a2038ff2.entry.js +1 -0
  404. package/dist/mint-components/p-a674c833.system.entry.js +1 -0
  405. package/dist/mint-components/p-ac65007d.js +1 -0
  406. package/dist/mint-components/p-af7d926d.system.entry.js +1 -0
  407. package/dist/mint-components/p-b0c32d15.system.js +1 -0
  408. package/dist/mint-components/p-b0d6a380.system.js +1 -0
  409. package/dist/mint-components/p-b0e8c584.system.entry.js +1 -0
  410. package/dist/mint-components/p-b18cc44f.js +1 -0
  411. package/dist/mint-components/p-b3201e4c.entry.js +1 -0
  412. package/dist/mint-components/p-b3af1c6f.js +1 -0
  413. package/dist/mint-components/p-b69365f5.entry.js +1 -0
  414. package/dist/mint-components/{p-44578b22.js → p-b7da9a8a.js} +1 -1
  415. package/dist/mint-components/p-b8434fc0.system.js +1 -0
  416. package/dist/mint-components/p-b9974b87.entry.js +1 -0
  417. package/dist/mint-components/p-bb7cbb9d.system.entry.js +1 -0
  418. package/dist/mint-components/p-bc19e1c2.system.js +1 -0
  419. package/dist/mint-components/p-bf055b6c.system.js +1 -0
  420. package/dist/mint-components/p-c3f300e8.system.js +1 -0
  421. package/dist/mint-components/p-caad0168.entry.js +1 -0
  422. package/dist/mint-components/p-ce0ec1c4.system.js +1 -0
  423. package/dist/mint-components/p-d0acc0d5.system.js +1 -0
  424. package/dist/mint-components/p-d1520098.js +1 -0
  425. package/dist/mint-components/p-d312db42.entry.js +1 -0
  426. package/dist/mint-components/p-d33eb961.js +1 -0
  427. package/dist/mint-components/p-d6ef4765.system.entry.js +1 -0
  428. package/dist/mint-components/p-d8679c5a.entry.js +150 -0
  429. package/dist/mint-components/{p-e608f340.entry.js → p-d8a45132.entry.js} +2 -2
  430. package/dist/mint-components/p-dcff1a85.entry.js +1 -0
  431. package/dist/mint-components/p-df466813.system.js +1 -0
  432. package/dist/mint-components/p-e00e11b1.system.js +1 -0
  433. package/dist/mint-components/p-e08f5f8e.js +1 -0
  434. package/dist/mint-components/p-e1166d9b.system.entry.js +1 -0
  435. package/dist/mint-components/p-e7a29898.entry.js +1 -0
  436. package/dist/mint-components/p-e7b20665.entry.js +1 -0
  437. package/dist/mint-components/p-ea110693.system.js +1 -0
  438. package/dist/mint-components/p-ea197664.js +1 -0
  439. package/dist/mint-components/p-f11bace6.system.entry.js +1 -0
  440. package/dist/mint-components/p-f241ee8a.system.entry.js +1 -0
  441. package/dist/mint-components/p-f372c8d8.entry.js +1 -0
  442. package/dist/mint-components/p-f4c0cd0b.js +1 -0
  443. package/dist/mint-components/p-f5cba1f7.system.entry.js +1 -0
  444. package/dist/mint-components/p-f8d95abc.system.js +1 -0
  445. package/dist/mint-components/p-fc3bbee6.js +30 -0
  446. package/dist/mint-components/p-fe4d9531.system.js +1 -0
  447. package/dist/types/components/sqm-big-stat/sqm-big-stat-view.d.ts +1 -0
  448. package/dist/types/components/sqm-big-stat/sqm-big-stat.d.ts +6 -0
  449. package/dist/types/components/sqm-big-stat/useBigStat.d.ts +1 -0
  450. package/dist/types/components/sqm-brand/sqm-brand.d.ts +8 -0
  451. package/dist/types/components/sqm-card-feed/CardFeed.stories.d.ts +5 -0
  452. package/dist/types/components/sqm-card-feed/sqm-card-feed-view.d.ts +6 -0
  453. package/dist/types/components/sqm-card-feed/sqm-card-feed.d.ts +18 -0
  454. package/dist/types/components/sqm-hero-image/HeroImage.stories.d.ts +16 -0
  455. package/dist/types/components/sqm-hero-image/sqm-hero-image-view.d.ts +24 -0
  456. package/dist/types/components/sqm-hero-image/sqm-hero-image.d.ts +99 -0
  457. package/dist/types/components/sqm-image/Image.stories.d.ts +11 -0
  458. package/dist/types/components/sqm-image/sqm-image-view.d.ts +10 -0
  459. package/dist/types/components/sqm-image/sqm-image.d.ts +42 -0
  460. package/dist/types/components/sqm-leaderboard/Leaderboard.stories.d.ts +6 -3
  461. package/dist/types/components/sqm-leaderboard/UseLeaderboard.stories.d.ts +6 -0
  462. package/dist/types/components/sqm-leaderboard/sqm-leaderboard-view.d.ts +10 -0
  463. package/dist/types/components/sqm-leaderboard/sqm-leaderboard.d.ts +24 -2
  464. package/dist/types/components/sqm-leaderboard/useLeaderboard.d.ts +2 -0
  465. package/dist/types/components/sqm-portal-container/PortalContainer.stories.d.ts +12 -0
  466. package/dist/types/components/sqm-portal-container/sqm-portal-container-view.d.ts +3 -0
  467. package/dist/types/components/sqm-portal-container/sqm-portal-container.d.ts +14 -0
  468. package/dist/types/components/sqm-portal-email-verification/sqm-portal-email-verification.d.ts +6 -0
  469. package/dist/types/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.d.ts +1 -0
  470. package/dist/types/components/sqm-portal-forgot-password/sqm-portal-forgot-password.d.ts +10 -0
  471. package/dist/types/components/sqm-portal-forgot-password/usePortalForgotPassword.d.ts +3 -1
  472. package/dist/types/components/sqm-portal-login/sqm-portal-login-view.d.ts +2 -0
  473. package/dist/types/components/sqm-portal-login/sqm-portal-login.d.ts +8 -0
  474. package/dist/types/components/sqm-portal-login/usePortalLogin.d.ts +3 -3
  475. package/dist/types/components/sqm-portal-register/PortalRegister.stories.d.ts +1 -0
  476. package/dist/types/components/sqm-portal-register/sqm-portal-register-view.d.ts +6 -3
  477. package/dist/types/components/sqm-portal-register/sqm-portal-register.d.ts +10 -0
  478. package/dist/types/components/sqm-portal-register/usePortalRegister.d.ts +1 -0
  479. package/dist/types/components/sqm-portal-reset-password/sqm-portal-reset-password.d.ts +8 -0
  480. package/dist/types/components/sqm-portal-verify-email/sqm-portal-verify-email.d.ts +8 -0
  481. package/dist/types/components/sqm-portal-verify-email/usePortalVerifyEmail.d.ts +2 -1
  482. package/dist/types/components/sqm-program-explainer/ProgramExplainer.stories.d.ts +1 -2
  483. package/dist/types/components/sqm-program-explainer/sqm-program-explainer-view.d.ts +2 -4
  484. package/dist/types/components/sqm-program-explainer/sqm-program-explainer.d.ts +5 -13
  485. package/dist/types/components/sqm-program-explainer-step/ProgramExplainerStep.stories.d.ts +2 -1
  486. package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step-view.d.ts +5 -4
  487. package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step.d.ts +11 -5
  488. package/dist/types/components/sqm-referral-card/ReferralCard.stories.d.ts +16 -0
  489. package/dist/types/components/sqm-referral-card/sqm-referral-card-view.d.ts +11 -0
  490. package/dist/types/components/sqm-referral-card/sqm-referral-card.d.ts +22 -0
  491. package/dist/types/components/sqm-referral-table/UseReferralTable.stories.d.ts +28 -0
  492. package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-date-cell.d.ts +2 -1
  493. package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.d.ts +7 -0
  494. package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-user-cell.d.ts +1 -1
  495. package/dist/types/components/sqm-referral-table/columns/ReferralTableColumn.d.ts +1 -1
  496. package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-date-column.d.ts +1 -1
  497. package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.d.ts +25 -1
  498. package/dist/types/components/sqm-referral-table/sqm-referral-table-view.d.ts +1 -1
  499. package/dist/types/components/sqm-referral-table/sqm-referral-table.d.ts +14 -2
  500. package/dist/types/components/sqm-referral-table/useReferralTable.d.ts +4 -2
  501. package/dist/types/components/sqm-refresh-button/RefreshButtonView.d.ts +15 -0
  502. package/dist/types/components/sqm-refresh-button/sqm-refresh-button.d.ts +12 -0
  503. package/dist/types/components/sqm-reward-exchange-list/RewardExchangeList.stories.d.ts +5 -2
  504. package/dist/types/components/sqm-reward-exchange-list/RewardExchangeListData.d.ts +416 -7
  505. package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.d.ts +3 -0
  506. package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list.d.ts +47 -0
  507. package/dist/types/components/sqm-reward-exchange-list/useRewardExchangeList.d.ts +0 -1
  508. package/dist/types/components/sqm-rewards-table/RewardsTable.stories.d.ts +5 -0
  509. package/dist/types/components/sqm-rewards-table/RewardsTableCell.stories.d.ts +26 -0
  510. package/dist/types/components/sqm-rewards-table/UseRewardsTable.stories.d.ts +18 -0
  511. package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-date-cell.d.ts +1 -0
  512. package/dist/types/components/sqm-rewards-table/cells/{sqm-rewards-table-rewards-cell.d.ts → sqm-rewards-table-reward-cell.d.ts} +3 -1
  513. package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-source-cell.d.ts +6 -0
  514. package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.d.ts +6 -1
  515. package/dist/types/components/sqm-rewards-table/columns/RewardTableColumn.d.ts +1 -1
  516. package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-date-column.d.ts +1 -1
  517. package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.d.ts +9 -5
  518. package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.d.ts +15 -1
  519. package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.d.ts +6 -2
  520. package/dist/types/components/sqm-rewards-table/sqm-rewards-table.d.ts +12 -2
  521. package/dist/types/components/sqm-share-button/ShareButton.stories.d.ts +5 -1
  522. package/dist/types/components/sqm-share-button/sqm-share-button-view.d.ts +3 -0
  523. package/dist/types/components/sqm-share-button/sqm-share-button.d.ts +16 -2
  524. package/dist/types/components/sqm-stencilbook/Themes.d.ts +1 -1
  525. package/dist/types/{tables → components/sqm-table-cell}/sqm-table-cell.d.ts +0 -0
  526. package/dist/types/{tables → components/sqm-table-row}/sqm-table-row.d.ts +0 -0
  527. package/dist/types/components/sqm-task-card/DetailsView.d.ts +41 -0
  528. package/dist/types/components/sqm-task-card/UseTaskCard.stories.d.ts +6 -0
  529. package/dist/types/components/sqm-task-card/progress-bar/SVGs.d.ts +1 -1
  530. package/dist/types/components/sqm-task-card/sqm-task-card-view.d.ts +32 -15
  531. package/dist/types/components/sqm-task-card/sqm-task-card.d.ts +51 -3
  532. package/dist/types/components/sqm-task-card/useTaskCard.d.ts +11 -0
  533. package/dist/types/components/sqm-timeline/SVGs.d.ts +3 -0
  534. package/dist/types/components/sqm-timeline/Timeline.stories.d.ts +8 -0
  535. package/dist/types/components/sqm-timeline/sqm-timeline-entry.d.ts +31 -0
  536. package/dist/types/components/sqm-timeline/sqm-timeline.d.ts +15 -0
  537. package/dist/types/components/sqm-titled-section/TitledSection.stories.d.ts +9 -0
  538. package/dist/types/components/sqm-titled-section/sqm-portal-section-view.d.ts +1 -0
  539. package/dist/types/components/sqm-titled-section/sqm-titled-section.d.ts +12 -1
  540. package/dist/types/components/sqm-user-name/sqm-user-name.d.ts +1 -1
  541. package/dist/types/components.d.ts +1141 -88
  542. package/dist/types/global/styles.d.ts +1 -1
  543. package/dist/types/saasquatch.d.ts +2 -0
  544. package/dist/types/styling/JSS.d.ts +7 -0
  545. package/dist/types/tables/GenericTableView.d.ts +4 -1
  546. package/dist/types/tables/TableSlots.d.ts +1 -0
  547. package/dist/types/utils/utils.d.ts +1 -0
  548. package/grapesjs/grapesjs.js +1 -1
  549. package/package.json +10 -11
  550. package/dist/cjs/ShadowViewAddon-475e00d3.js +0 -127
  551. package/dist/cjs/re-render-124b56ee.js +0 -45
  552. package/dist/cjs/sqm-brand_38.cjs.entry.js +0 -29924
  553. package/dist/cjs/sqm-leaderboard-rank-view-510f16d3.js +0 -131
  554. package/dist/cjs/sqm-leaderboard.cjs.entry.js +0 -69
  555. package/dist/cjs/sqm-portal-container.cjs.entry.js +0 -35
  556. package/dist/cjs/sqm-program-explainer-step-view-6a01cda0.js +0 -70
  557. package/dist/cjs/sqm-program-explainer-step.cjs.entry.js +0 -22
  558. package/dist/cjs/sqm-program-explainer-view-8a4af972.js +0 -45
  559. package/dist/cjs/sqm-program-explainer.cjs.entry.js +0 -23
  560. package/dist/cjs/sqm-referral-table-column.cjs.entry.js +0 -30
  561. package/dist/cjs/sqm-referral-table-date-column.cjs.entry.js +0 -47
  562. package/dist/cjs/sqm-referral-table-rewards-column.cjs.entry.js +0 -38
  563. package/dist/cjs/sqm-referral-table-status-column.cjs.entry.js +0 -45
  564. package/dist/cjs/sqm-referral-table-user-column.cjs.entry.js +0 -57
  565. package/dist/cjs/sqm-share-code.cjs.entry.js +0 -106
  566. package/dist/cjs/sqm-share-link-view-a935d07e.js +0 -24
  567. package/dist/cjs/sqm-titled-section.cjs.entry.js +0 -36
  568. package/dist/cjs/use-callback-fadb2643.js +0 -7
  569. package/dist/collection/components/sqm-reward-exchange-list/assets/placeholder.png +0 -0
  570. package/dist/esm/ShadowViewAddon-558fabb7.js +0 -122
  571. package/dist/esm/sqm-brand_38.entry.js +0 -29883
  572. package/dist/esm/sqm-leaderboard-rank-view-cd1e8962.js +0 -128
  573. package/dist/esm/sqm-leaderboard.entry.js +0 -65
  574. package/dist/esm/sqm-portal-container.entry.js +0 -31
  575. package/dist/esm/sqm-program-explainer-step-view-41c1eecd.js +0 -68
  576. package/dist/esm/sqm-program-explainer-step.entry.js +0 -18
  577. package/dist/esm/sqm-program-explainer-view-098a64a9.js +0 -43
  578. package/dist/esm/sqm-program-explainer.entry.js +0 -19
  579. package/dist/esm/sqm-referral-table-column.entry.js +0 -26
  580. package/dist/esm/sqm-referral-table-date-column.entry.js +0 -43
  581. package/dist/esm/sqm-referral-table-rewards-column.entry.js +0 -34
  582. package/dist/esm/sqm-referral-table-status-column.entry.js +0 -41
  583. package/dist/esm/sqm-referral-table-user-column.entry.js +0 -53
  584. package/dist/esm/sqm-share-code.entry.js +0 -102
  585. package/dist/esm/sqm-share-link-view-9282b8e8.js +0 -22
  586. package/dist/esm/sqm-titled-section.entry.js +0 -32
  587. package/dist/esm-es5/ShadowViewAddon-558fabb7.js +0 -1
  588. package/dist/esm-es5/index.module-eb50a8d2.js +0 -1
  589. package/dist/esm-es5/re-render-6d5b856e.js +0 -1
  590. package/dist/esm-es5/sqm-asset-card-view-6f360937.js +0 -1
  591. package/dist/esm-es5/sqm-brand_38.entry.js +0 -1
  592. package/dist/esm-es5/sqm-hero-view-bfd8abd1.js +0 -1
  593. package/dist/esm-es5/sqm-leaderboard-rank-view-cd1e8962.js +0 -1
  594. package/dist/esm-es5/sqm-leaderboard.entry.js +0 -1
  595. package/dist/esm-es5/sqm-name-fields-view-4162fb7b.js +0 -1
  596. package/dist/esm-es5/sqm-navigation-sidebar-item-view-2d8c368c.js +0 -1
  597. package/dist/esm-es5/sqm-navigation-sidebar-view-2242502c.js +0 -1
  598. package/dist/esm-es5/sqm-portal-container-view-73757ca5.js +0 -1
  599. package/dist/esm-es5/sqm-portal-container.entry.js +0 -1
  600. package/dist/esm-es5/sqm-portal-email-verification-view-2af31979.js +0 -1
  601. package/dist/esm-es5/sqm-portal-footer-view-60cd9ae5.js +0 -1
  602. package/dist/esm-es5/sqm-portal-forgot-password-view-e3a6a716.js +0 -1
  603. package/dist/esm-es5/sqm-portal-profile-view-f1deea0f.js +0 -1
  604. package/dist/esm-es5/sqm-portal-reset-password-view-a4e50da2.js +0 -1
  605. package/dist/esm-es5/sqm-portal-section-view-f0876545.js +0 -1
  606. package/dist/esm-es5/sqm-portal-verify-email-view-6f18bac2.js +0 -1
  607. package/dist/esm-es5/sqm-program-explainer-step-view-41c1eecd.js +0 -1
  608. package/dist/esm-es5/sqm-program-explainer-step.entry.js +0 -1
  609. package/dist/esm-es5/sqm-program-explainer-view-098a64a9.js +0 -1
  610. package/dist/esm-es5/sqm-program-explainer.entry.js +0 -1
  611. package/dist/esm-es5/sqm-referral-table-column.entry.js +0 -1
  612. package/dist/esm-es5/sqm-referral-table-date-column.entry.js +0 -1
  613. package/dist/esm-es5/sqm-referral-table-rewards-column.entry.js +0 -1
  614. package/dist/esm-es5/sqm-referral-table-status-column.entry.js +0 -1
  615. package/dist/esm-es5/sqm-referral-table-user-column.entry.js +0 -1
  616. package/dist/esm-es5/sqm-share-code.entry.js +0 -1
  617. package/dist/esm-es5/sqm-share-link-view-9282b8e8.js +0 -1
  618. package/dist/esm-es5/sqm-stat-container-view-4133feb6.js +0 -1
  619. package/dist/esm-es5/sqm-text-span-view-1781df94.js +0 -1
  620. package/dist/esm-es5/sqm-titled-section.entry.js +0 -1
  621. package/dist/esm-es5/use-callback-b38a1523.js +0 -1
  622. package/dist/esm-es5/useDemoBigStat-d227b2f9.js +0 -1
  623. package/dist/esm-es5/utils-454405f5.js +0 -1
  624. package/dist/mint-components/assets/placeholder.png +0 -0
  625. package/dist/mint-components/p-02dc36a4.system.js +0 -1
  626. package/dist/mint-components/p-03e93c82.system.js +0 -1
  627. package/dist/mint-components/p-0a39b23c.system.entry.js +0 -1
  628. package/dist/mint-components/p-0bcefa93.entry.js +0 -1
  629. package/dist/mint-components/p-0d8b2757.system.entry.js +0 -1
  630. package/dist/mint-components/p-10103ce2.system.js +0 -1
  631. package/dist/mint-components/p-12071042.system.entry.js +0 -1
  632. package/dist/mint-components/p-1575e8a3.system.js +0 -1
  633. package/dist/mint-components/p-1705e549.entry.js +0 -1
  634. package/dist/mint-components/p-1b5b5928.system.js +0 -1
  635. package/dist/mint-components/p-1e182e88.system.js +0 -1
  636. package/dist/mint-components/p-1f95b411.js +0 -1
  637. package/dist/mint-components/p-2027edc0.system.entry.js +0 -1
  638. package/dist/mint-components/p-20c95798.entry.js +0 -1
  639. package/dist/mint-components/p-21b4044a.entry.js +0 -1
  640. package/dist/mint-components/p-21df3f85.system.entry.js +0 -1
  641. package/dist/mint-components/p-221bd06e.js +0 -1
  642. package/dist/mint-components/p-2338162a.entry.js +0 -1
  643. package/dist/mint-components/p-282ed862.js +0 -1
  644. package/dist/mint-components/p-29ee7d11.system.entry.js +0 -1
  645. package/dist/mint-components/p-2e63dcfd.system.js +0 -1
  646. package/dist/mint-components/p-3143cce4.entry.js +0 -1
  647. package/dist/mint-components/p-34112d74.entry.js +0 -1
  648. package/dist/mint-components/p-34696973.system.js +0 -1
  649. package/dist/mint-components/p-35476f7e.system.js +0 -1
  650. package/dist/mint-components/p-40e83a85.system.js +0 -1
  651. package/dist/mint-components/p-412d31b1.js +0 -1
  652. package/dist/mint-components/p-46493de5.system.entry.js +0 -1
  653. package/dist/mint-components/p-4658d225.system.entry.js +0 -1
  654. package/dist/mint-components/p-4b719313.js +0 -1
  655. package/dist/mint-components/p-509dda90.js +0 -1
  656. package/dist/mint-components/p-53b0c355.system.js +0 -1
  657. package/dist/mint-components/p-53e51b3f.entry.js +0 -1
  658. package/dist/mint-components/p-53ec4863.entry.js +0 -1
  659. package/dist/mint-components/p-547a0354.system.js +0 -1
  660. package/dist/mint-components/p-55f8387d.system.js +0 -1
  661. package/dist/mint-components/p-562199e3.system.js +0 -1
  662. package/dist/mint-components/p-5939212e.system.entry.js +0 -1
  663. package/dist/mint-components/p-5d925bb6.js +0 -1
  664. package/dist/mint-components/p-5e4e7f01.system.js +0 -1
  665. package/dist/mint-components/p-60ae1ec5.system.js +0 -1
  666. package/dist/mint-components/p-61acba7a.js +0 -1
  667. package/dist/mint-components/p-65c79eec.entry.js +0 -1
  668. package/dist/mint-components/p-69f28472.system.js +0 -1
  669. package/dist/mint-components/p-6d27cd05.system.entry.js +0 -1
  670. package/dist/mint-components/p-739b3032.js +0 -1
  671. package/dist/mint-components/p-748ad4f5.entry.js +0 -1
  672. package/dist/mint-components/p-759d3800.entry.js +0 -13
  673. package/dist/mint-components/p-760762d3.entry.js +0 -13
  674. package/dist/mint-components/p-7cdbe82a.entry.js +0 -1
  675. package/dist/mint-components/p-7ff22998.system.entry.js +0 -1
  676. package/dist/mint-components/p-81786aa0.js +0 -1
  677. package/dist/mint-components/p-85efd952.entry.js +0 -1
  678. package/dist/mint-components/p-86255b95.entry.js +0 -1
  679. package/dist/mint-components/p-88fdfd94.system.entry.js +0 -1
  680. package/dist/mint-components/p-8ec5127e.system.entry.js +0 -1
  681. package/dist/mint-components/p-952ed169.js +0 -1
  682. package/dist/mint-components/p-97b946c2.system.entry.js +0 -1
  683. package/dist/mint-components/p-99f1208f.js +0 -1
  684. package/dist/mint-components/p-9b4f2af6.js +0 -1
  685. package/dist/mint-components/p-9be0cb19.entry.js +0 -1
  686. package/dist/mint-components/p-9c79643f.system.js +0 -1
  687. package/dist/mint-components/p-a0a26fc5.system.entry.js +0 -1
  688. package/dist/mint-components/p-a355eeaf.system.entry.js +0 -1
  689. package/dist/mint-components/p-a565e753.entry.js +0 -1
  690. package/dist/mint-components/p-a8246a50.system.entry.js +0 -1
  691. package/dist/mint-components/p-a831de18.entry.js +0 -1
  692. package/dist/mint-components/p-a833dbb3.js +0 -1
  693. package/dist/mint-components/p-a88a08bb.system.js +0 -1
  694. package/dist/mint-components/p-a8b913a8.js +0 -1
  695. package/dist/mint-components/p-a9a6f205.entry.js +0 -1
  696. package/dist/mint-components/p-aaf68d9d.system.js +0 -1
  697. package/dist/mint-components/p-aee83885.system.entry.js +0 -1
  698. package/dist/mint-components/p-b86cbac3.system.entry.js +0 -1
  699. package/dist/mint-components/p-b90574e5.entry.js +0 -372
  700. package/dist/mint-components/p-ba505a8c.js +0 -1
  701. package/dist/mint-components/p-bb76c6f3.system.js +0 -1
  702. package/dist/mint-components/p-bd903567.js +0 -1
  703. package/dist/mint-components/p-be3a0cc4.system.js +0 -1
  704. package/dist/mint-components/p-c0f9d0b1.entry.js +0 -1
  705. package/dist/mint-components/p-c3bf9440.entry.js +0 -1
  706. package/dist/mint-components/p-c65cfc9d.system.js +0 -1
  707. package/dist/mint-components/p-ca40dbaa.system.entry.js +0 -1
  708. package/dist/mint-components/p-cc189fc4.system.js +0 -1
  709. package/dist/mint-components/p-cc652a53.entry.js +0 -1
  710. package/dist/mint-components/p-d19d6012.js +0 -235
  711. package/dist/mint-components/p-d3c7dbfc.entry.js +0 -1
  712. package/dist/mint-components/p-d4a1bce9.system.entry.js +0 -1
  713. package/dist/mint-components/p-d68f6b64.system.entry.js +0 -1
  714. package/dist/mint-components/p-d7d6bf44.system.js +0 -1
  715. package/dist/mint-components/p-db5a1e78.js +0 -1
  716. package/dist/mint-components/p-e069bc2d.entry.js +0 -1
  717. package/dist/mint-components/p-e14c15ca.system.entry.js +0 -1
  718. package/dist/mint-components/p-e36ff7fa.entry.js +0 -1
  719. package/dist/mint-components/p-e426715b.js +0 -1
  720. package/dist/mint-components/p-e43cc1f8.system.entry.js +0 -1
  721. package/dist/mint-components/p-e7cb4274.system.entry.js +0 -1
  722. package/dist/mint-components/p-ebcd8a59.js +0 -1
  723. package/dist/mint-components/p-ee684b5f.js +0 -1
  724. package/dist/mint-components/p-ef7f70f2.system.entry.js +0 -1
  725. package/dist/mint-components/p-f20d9204.system.entry.js +0 -1
  726. package/dist/mint-components/p-f5cfc52a.entry.js +0 -1
  727. package/dist/mint-components/p-f7f87338.js +0 -1
  728. package/dist/mint-components/p-f85f36c6.system.entry.js +0 -1
  729. package/dist/mint-components/p-f9ada3d7.system.js +0 -1
  730. package/dist/mint-components/p-f9cb55dc.entry.js +0 -1
  731. package/dist/mint-components/p-faf66fdb.js +0 -17
  732. package/dist/mint-components/p-fb1b6fdf.js +0 -1
  733. package/dist/mint-components/p-fcd03042.entry.js +0 -1
  734. package/dist/mint-components/p-fd281e6b.system.entry.js +0 -1
  735. package/dist/mint-components/p-fee468b7.system.entry.js +0 -1
  736. package/dist/mint-components/p-fee6801c.js +0 -1
  737. package/dist/types/global/android.d.ts +0 -7
  738. package/dist/types/global/demo.d.ts +0 -1
  739. package/dist/types/stories/features.d.ts +0 -4
  740. package/dist/types/stories/templates.d.ts +0 -4
@@ -0,0 +1,2228 @@
1
+ 'use strict';
2
+
3
+ const index = require('./index-b0129cd6.js');
4
+ const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
5
+ const global = require('./global-58d95b21.js');
6
+ const index_module = require('./index.module-54724339.js');
7
+ const mixins = require('./mixins-7b7c59fe.js');
8
+ const JSS = require('./JSS-c65a40f1.js');
9
+ const luxon = require('./luxon-59ca7d19.js');
10
+ const utils = require('./utils-01dbfd4a.js');
11
+ const sqmTextSpanView = require('./sqm-text-span-view-f101dedf.js');
12
+ const sqmPortalContainerView = require('./sqm-portal-container-view-fdfb3656.js');
13
+ const sqmPortalSectionView = require('./sqm-portal-section-view-186a5f7e.js');
14
+
15
+ const medium = {
16
+ facebook: { color: "#1877f2", text: "#fff", icon: "facebook" },
17
+ twitter: { color: "#1da1f2", text: "#fff", icon: "twitter" },
18
+ email: { color: "#666666", text: "#fff", icon: "envelope" },
19
+ direct: { color: "var(--sl-color-primary-500)", text: "#fff", icon: "send" },
20
+ linkedin: { color: "#0077b5", text: "#fff", icon: "linkedin" },
21
+ sms: { color: "#34DA50", text: "#fff", icon: "chat" },
22
+ fbmessenger: { color: "#0084ff", text: "#fff", icon: "messenger" },
23
+ whatsapp: { color: "#25d366", text: "#fff", icon: "whatsapp" },
24
+ linemessenger: { color: "#00B300", text: "#fff", icon: "line" },
25
+ pinterest: { color: "#e60023", text: "#fff", icon: "pinterest" },
26
+ };
27
+ function ShareButtonView(props, children) {
28
+ const vanillaStyle = `
29
+ *::part(base) {
30
+ --sl-focus-ring-color-primary: ${props.backgroundcolor
31
+ ? props.backgroundcolor
32
+ : props.medium
33
+ ? medium[props.medium].color
34
+ : ""}80!important;
35
+
36
+ background: ${props.backgroundcolor
37
+ ? props.backgroundcolor
38
+ : props.medium
39
+ ? medium[props.medium].color
40
+ : ""};
41
+ color: ${props.textcolor
42
+ ? props.textcolor
43
+ : props.medium
44
+ ? medium[props.medium].text
45
+ : ""};
46
+ border-radius: ${props.borderradius ? props.borderradius + "px" : ""};
47
+ }
48
+
49
+ *::part(base):hover {
50
+ border-color: ${props.backgroundcolor
51
+ ? props.backgroundcolor
52
+ : props.medium
53
+ ? medium[props.medium].color
54
+ : ""}D1!important;
55
+ }
56
+
57
+ *::part(base):focus {
58
+ border-color: ${props.backgroundcolor
59
+ ? props.backgroundcolor
60
+ : props.medium
61
+ ? medium[props.medium].color
62
+ : ""}D1!important;
63
+ }
64
+
65
+ *::part(label) {
66
+ position: relative;
67
+ top: 2%;
68
+ }
69
+ `;
70
+ const style = {
71
+ HostBlock: mixins.HostBlock,
72
+ buttonStyle: {
73
+ display: "flex",
74
+ alignItems: "center",
75
+ justifyContent: "center",
76
+ lineHeight: "0",
77
+ },
78
+ };
79
+ const sheet = JSS.createStyleSheet(style);
80
+ const styleString = sheet.toString();
81
+ return props.hide ? (index.h(index.Host, { style: { display: "none" } })) : (index.h("div", null,
82
+ index.h("style", { type: "text/css" }, styleString),
83
+ index.h("style", { type: "text/css" }, vanillaStyle),
84
+ index.h("sl-button", { class: sheet.classes.buttonStyle, loading: props.loading, disabled: props.disabled, pill: props.pill, size: props.size, type: props.type, onClick: props.onClick, exportparts: `base: ${props.type}sharebutton-base` },
85
+ !props.hideicon && (index.h("sl-icon", { slot: props.iconslot || "prefix", name: props.icon ? props.icon : medium[props.medium].icon, exportparts: "icon" })),
86
+ !props.hidetext && children)));
87
+ }
88
+
89
+ const style = {
90
+ HostBlock: mixins.HostBlock,
91
+ inputStyle: {
92
+ "&::part(base)": { background: "white", opacity: "1", cursor: "pointer" },
93
+ },
94
+ };
95
+ const sheet = JSS.createStyleSheet(style);
96
+ const styleString = sheet.toString();
97
+ function ShareLinkView(props) {
98
+ return (index.h("div", null,
99
+ index.h("style", { type: "text/css" }, styleString),
100
+ index.h("sl-tooltip", { trigger: "manual", content: props.tooltiptext, placement: "top-end", disabled: props.disabled, open: props.open },
101
+ index.h("sl-input", { class: sheet.classes.inputStyle, exportparts: "label: input-label", value: props.shareString, readonly: true },
102
+ index.h("sl-icon-button", { onClick: () => { var _a; return (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props); }, slot: "suffix", name: "files", disabled: props.disabled })))));
103
+ }
104
+
105
+ const style$1 = {
106
+ Leaderboard: {
107
+ "& table": {
108
+ width: "100%",
109
+ borderCollapse: "collapse",
110
+ },
111
+ "& th": {
112
+ textAlign: "left",
113
+ padding: "var(--sl-spacing-medium)",
114
+ paddingTop: "0",
115
+ fontSize: "var(--sl-font-size-medium)",
116
+ fontWeight: "var(--sl-font-weight-semibold)",
117
+ },
118
+ "& tr:not(:first-child)": {
119
+ borderTop: "1px solid var(--sl-color-neutral-200)",
120
+ },
121
+ "& td": {
122
+ fontSize: "var(--sl-font-size-medium)",
123
+ fontWeight: "var(--sl-font-weight-normal)",
124
+ },
125
+ "& .ellipses": {
126
+ textAlign: "center",
127
+ padding: "0",
128
+ color: "var(--sl-color-neutral-500)",
129
+ },
130
+ "& .highlight": {
131
+ background: "var(--sl-color-primary-50)",
132
+ },
133
+ "& td, th": {
134
+ color: "var(--sl-color-gray-800)",
135
+ padding: "var(--sl-spacing-medium)",
136
+ },
137
+ "& .User": {
138
+ width: "100%",
139
+ },
140
+ "& .Score": {
141
+ width: "auto",
142
+ whiteSpace: "nowrap",
143
+ },
144
+ },
145
+ };
146
+ const sheet$1 = JSS.createStyleSheet(style$1);
147
+ const styleString$1 = sheet$1.toString();
148
+ const vanillaStyle = `
149
+ :host{
150
+ display: block;
151
+ }
152
+ `;
153
+ function LeaderboardView(props) {
154
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
155
+ const { states, data, elements } = props;
156
+ const { styles } = states;
157
+ if (states.loading)
158
+ return (index.h("div", { class: sheet$1.classes.Leaderboard },
159
+ index.h("style", { type: "text/css" },
160
+ styleString$1,
161
+ vanillaStyle),
162
+ elements.loadingstate));
163
+ let userSeenFlag = false;
164
+ return (index.h("div", { class: sheet$1.classes.Leaderboard },
165
+ index.h("style", { type: "text/css" },
166
+ styleString$1,
167
+ vanillaStyle),
168
+ index.h("table", null,
169
+ index.h("tr", null,
170
+ styles.showRank && index.h("th", { class: "Rank" }, styles.rankheading),
171
+ index.h("th", { class: "User" }, styles.usersheading),
172
+ index.h("th", { class: "Score" }, styles.statsheading)),
173
+ !states.hasLeaders && (index.h("tr", null,
174
+ index.h("td", { colSpan: 100 }, elements.empty))), (_a = data.leaderboard) === null || _a === void 0 ? void 0 :
175
+ _a.map((user) => {
176
+ var _a, _b;
177
+ if (user.rowNumber === ((_a = data.userRank) === null || _a === void 0 ? void 0 : _a.rowNumber))
178
+ userSeenFlag = true;
179
+ return (index.h("tr", { class: user.rowNumber === ((_b = data.userRank) === null || _b === void 0 ? void 0 : _b.rowNumber) ? "highlight" : "" },
180
+ styles.showRank && index.h("td", { class: "Rank" }, user.rank),
181
+ index.h("td", { class: "User" }, user.firstName && user.lastInitial
182
+ ? user.firstName + " " + user.lastInitial
183
+ : user.firstName || user.lastInitial
184
+ ? user.firstName || user.lastInitial
185
+ : styles.anonymousUser || "Anonymous User"),
186
+ index.h("td", { class: "Score" }, user.value)));
187
+ }),
188
+ states.hasLeaders && !userSeenFlag && data.showUser && (index.h("tr", null,
189
+ index.h("td", { colSpan: 100, class: "ellipses" },
190
+ index.h("sl-icon", { name: "three-dots", style: { verticalAlign: "middle" } })))),
191
+ states.hasLeaders && !userSeenFlag && data.showUser && (index.h("tr", { class: "highlight" },
192
+ styles.showRank && (index.h("td", { class: "Rank" }, ((_b = data.userRank) === null || _b === void 0 ? void 0 : _b.rank) || "-")),
193
+ index.h("td", { class: "User" }, ((_c = data.userRank) === null || _c === void 0 ? void 0 : _c.firstName) && ((_d = data.userRank) === null || _d === void 0 ? void 0 : _d.lastInitial)
194
+ ? ((_e = data.userRank) === null || _e === void 0 ? void 0 : _e.firstName) + " " + ((_f = data.userRank) === null || _f === void 0 ? void 0 : _f.lastInitial)
195
+ : ((_g = data.userRank) === null || _g === void 0 ? void 0 : _g.firstName) || ((_h = data.userRank) === null || _h === void 0 ? void 0 : _h.lastInitial)
196
+ ? ((_j = data.userRank) === null || _j === void 0 ? void 0 : _j.firstName) || ((_k = data.userRank) === null || _k === void 0 ? void 0 : _k.lastInitial)
197
+ : styles.anonymousUser || "Anonymous User"),
198
+ index.h("td", { class: "Score" }, ((_l = data.userRank) === null || _l === void 0 ? void 0 : _l.value) || "0"))))));
199
+ }
200
+
201
+ const style$2 = {
202
+ HostBlock: mixins.HostBlock,
203
+ ":host": {
204
+ "min-height": "100vh",
205
+ },
206
+ Frame: {
207
+ "min-height": "100vh",
208
+ display: "flex",
209
+ "flex-direction": "column",
210
+ "box-sizing": "border-box",
211
+ },
212
+ FooterWrapper: {
213
+ width: "100%",
214
+ "max-width": "100%",
215
+ padding: "var(--sl-spacing-medium) var(--sl-spacing-x-large)",
216
+ background: "var(--sqm-footer-background)",
217
+ display: "flex",
218
+ "justify-content": "flex-end",
219
+ "align-items": "center",
220
+ "box-sizing": "border-box",
221
+ "margin-top": "auto",
222
+ },
223
+ HeaderWrapper: {
224
+ width: "100%",
225
+ "max-width": "100%",
226
+ "box-sizing": "border-box",
227
+ display: "flex",
228
+ "justify-content": "space-between",
229
+ padding: "var(--sl-spacing-small) var(--sl-spacing-large)",
230
+ "align-items": "center",
231
+ "background-color": "var(--sqm-header-background)",
232
+ "@media screen and (max-width: 499px)": {
233
+ "flex-direction": "row-reverse",
234
+ "justify-content": "flex-end",
235
+ padding: "0",
236
+ },
237
+ },
238
+ };
239
+ const sheet$2 = JSS.createStyleSheet(style$2);
240
+ const styleString$2 = sheet$2.toString();
241
+ function PortalFrameView(props, children) {
242
+ const { data } = props;
243
+ return (index.h("div", { class: sheet$2.classes.Frame },
244
+ index.h("style", { type: "text/css" }, styleString$2),
245
+ index.h("div", { class: sheet$2.classes.HeaderWrapper },
246
+ data.header,
247
+ index.h("slot", { name: "sqm-navigation-menu" })),
248
+ children,
249
+ index.h("div", { class: sheet$2.classes.FooterWrapper }, data.footer)));
250
+ }
251
+
252
+ const EditProfileView = (props) => {
253
+ var _a, _b, _c, _d;
254
+ const { states, callbacks } = props;
255
+ const { text } = states;
256
+ const { errors } = states.formState;
257
+ if (states.showEdit) {
258
+ return (index.h("div", { class: `CardWrapper ${!states.showEdit && "ShowEdit"}` },
259
+ index.h("h2", { style: {
260
+ fontSize: "var(--sl-font-size-x-large)",
261
+ margin: "0px",
262
+ textAlign: "center",
263
+ } }, text.editprofileheader),
264
+ index.h("form", { class: "FormWrapper", onSubmit: callbacks.onSubmit },
265
+ index.h("div", { class: "FormSection" },
266
+ states.formState.error && (index.h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
267
+ index.h("div", { part: "erroralert-text" }, states.formState.error))),
268
+ index.h("sl-input", Object.assign({ exportparts: "label: input-label", value: states.formState.firstName, onInput: callbacks.onChange, label: text.firstnametext, disabled: states.loading }, (errors.firstName && errors.firstName.status !== "valid"
269
+ ? { class: "ErrorStyles", helpText: "Cannot be empty" }
270
+ : []), { id: "firstName", name: "firstName", error: errors.firstName && errors.firstName.status !== "valid"
271
+ ? errors.firstName.message
272
+ : undefined })),
273
+ index.h("sl-input", Object.assign({ exportparts: "label: input-label", value: states.formState.lastName, onInput: callbacks.onChange, label: text.lastnametext, disabled: states.loading, id: "lastName", name: "lastName" }, (errors.lastName && errors.lastName.status !== "valid"
274
+ ? { class: "ErrorStyles", helpText: "Cannot be empty" }
275
+ : []), { error: errors.lastName && errors.lastName.status !== "valid"
276
+ ? errors.lastName.message
277
+ : undefined }))),
278
+ text.showregion && states.formState.currentRegion && (index.h("sl-input", { exportparts: "label: input-label", disabled: true, value: states.formState.currentRegion, label: text.currentregiontext, id: "currentRegion", name: "currentRegion" })),
279
+ index.h("div", { class: "ButtonWrapper" },
280
+ index.h("sl-button", { onClick: () => {
281
+ callbacks.setShowEdit(false);
282
+ }, exportparts: "base: defaultbutton-base" }, text.canceltext),
283
+ index.h("sl-button", { type: "primary", loading: states.loading, disabled: states.submitDisabled, onClick: (e) => {
284
+ callbacks.onSubmit(e);
285
+ }, submit: true, exportparts: "base: primarybutton-base" }, text.updatetext)))));
286
+ }
287
+ return (index.h("div", { class: `CardWrapper FormWrapper ${!states.showEdit && "ShowEdit"}` },
288
+ index.h("div", { class: "FormSection" },
289
+ index.h("h2", { style: {
290
+ fontSize: "var(--sl-font-size-x-large",
291
+ marginBottom: "0px",
292
+ textAlign: "center",
293
+ } }, text.editprofileheader),
294
+ index.h("div", null,
295
+ index.h("p", { style: { fontSize: "var(--sl-font-size-medium)" } }, (_a = states.user) === null || _a === void 0 ? void 0 :
296
+ _a.firstName,
297
+ " ", (_b = states.user) === null || _b === void 0 ? void 0 :
298
+ _b.lastName),
299
+ index.h("p", { style: { fontSize: "var(--sl-font-size-medium)" }, title: (_c = states.user) === null || _c === void 0 ? void 0 : _c.email }, (_d = states.user) === null || _d === void 0 ? void 0 : _d.email))),
300
+ index.h("sl-button", { type: "primary", loading: states.loading, onClick: () => {
301
+ callbacks.resetForm();
302
+ callbacks.setShowEdit(true);
303
+ }, exportparts: "base: primarybutton-base" }, text.editprofiletext)));
304
+ };
305
+
306
+ const MessageLinkQuery = index_module.dist.gql `
307
+ query ($programId: ID) {
308
+ user: viewer {
309
+ ... on User {
310
+ shareLink(programId: $programId)
311
+ }
312
+ }
313
+ }
314
+ `;
315
+ const WIDGET_ENGAGEMENT_EVENT = index_module.dist.gql `
316
+ mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
317
+ createUserAnalyticsEvent(eventMeta: $eventMeta)
318
+ }
319
+ `;
320
+ function useShareLink(props) {
321
+ var _a, _b;
322
+ const { programId = index_module.M() } = props;
323
+ const user = index_module.ne();
324
+ const engagementMedium = index_module.x();
325
+ const { data } = index_module.mn(MessageLinkQuery, { programId }, !(user === null || user === void 0 ? void 0 : user.jwt));
326
+ const [sendLoadEvent] = index_module.De(WIDGET_ENGAGEMENT_EVENT);
327
+ const shareString = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.shareLink) !== null && _b !== void 0 ? _b :
328
+ // Shown during loading
329
+ "...";
330
+ const [open, setOpen] = stencilHooks_module.useState(false);
331
+ function onClick() {
332
+ // Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
333
+ // Only if called from a user-initiated event
334
+ navigator.clipboard.writeText(shareString);
335
+ setOpen(true);
336
+ setTimeout(() => setOpen(false), props.tooltiplifespan);
337
+ sendLoadEvent({
338
+ eventMeta: {
339
+ programId,
340
+ id: user === null || user === void 0 ? void 0 : user.id,
341
+ accountId: user === null || user === void 0 ? void 0 : user.accountId,
342
+ type: "USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",
343
+ meta: {
344
+ engagementMedium,
345
+ shareMedium: "DIRECT",
346
+ },
347
+ },
348
+ });
349
+ }
350
+ return { ...props, onClick, open, shareString };
351
+ }
352
+
353
+ const MessageLinkQuery$1 = index_module.dist.gql `
354
+ query (
355
+ $programId: ID
356
+ $engagementMedium: UserEngagementMedium!
357
+ $shareMedium: ReferralShareMedium!
358
+ ) {
359
+ viewer {
360
+ ... on User {
361
+ messageLink(
362
+ programId: $programId
363
+ engagementMedium: $engagementMedium
364
+ shareMedium: $shareMedium
365
+ )
366
+ shareLink(programId: $programId, engagementMedium: $engagementMedium)
367
+ }
368
+ }
369
+ }
370
+ `;
371
+ function NativeShare(props, directLink) {
372
+ const title = props.sharetitle || "Share title";
373
+ const text = props.sharetext || "Share text";
374
+ if (directLink === "undefined") {
375
+ return alert("error: message link undefined!");
376
+ }
377
+ if (window.navigator.share) {
378
+ window.navigator
379
+ .share({
380
+ title,
381
+ text,
382
+ url: directLink,
383
+ })
384
+ .catch((error) => console.error("Error on web share", error));
385
+ }
386
+ else {
387
+ alert("Not on a supported device");
388
+ }
389
+ }
390
+ function FacebookShare(directLink, res) {
391
+ var _a, _b;
392
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.messageLink) === "undefined" ||
393
+ directLink === "undefined") {
394
+ return alert("error: message link undefined!");
395
+ }
396
+ if (typeof SquatchAndroid.shareOnFacebook !== "undefined") {
397
+ return SquatchAndroid.shareOnFacebook(directLink, res.data.viewer.messageLink);
398
+ }
399
+ else {
400
+ return GenericShare(res);
401
+ }
402
+ }
403
+ function GenericShare(res) {
404
+ var _a, _b;
405
+ return ((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.messageLink) ? window.open(res.data.viewer.messageLink)
406
+ : alert("error: message link undefined!");
407
+ }
408
+ function useShareButton(props) {
409
+ var _a, _b;
410
+ const { sharetitle, sharetext, medium } = props;
411
+ const programId = props.programId ? props.programId : index_module.M();
412
+ const user = index_module.ne();
413
+ const variables = {
414
+ engagementMedium: index_module.x(),
415
+ programId: programId,
416
+ shareMedium: medium.toUpperCase(),
417
+ };
418
+ // only queries if a programId is available
419
+ const res = index_module.mn(MessageLinkQuery$1, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId);
420
+ const directLink = (_b = (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.shareLink;
421
+ const environment = index_module.D();
422
+ const hide = (medium.toLocaleUpperCase() === "SMS" &&
423
+ window.orientation === undefined) ||
424
+ (medium.toLocaleUpperCase() === "DIRECT" && !window.navigator.share);
425
+ function onClick() {
426
+ if (medium.toLocaleUpperCase() === "FACEBOOK" &&
427
+ environment.type === "SquatchAndroid") {
428
+ FacebookShare(directLink, res);
429
+ }
430
+ else if (medium.toLocaleUpperCase() === "DIRECT") {
431
+ NativeShare({ sharetitle, sharetext }, directLink);
432
+ }
433
+ else {
434
+ GenericShare(res);
435
+ }
436
+ }
437
+ return { ...props, loading: res.loading, onClick, hide };
438
+ }
439
+
440
+ function PortalChangePasswordView(props) {
441
+ const { states, callbacks } = props;
442
+ const style = {
443
+ Dialog: {
444
+ padding: "0",
445
+ "&::part(close-button)": {
446
+ "margin-top": "var(--sl-spacing-medium)",
447
+ },
448
+ "&::part(body)": {
449
+ padding: "0 var(--sl-spacing-x-large) var(--sl-spacing-x-large) var(--sl-spacing-x-large)",
450
+ },
451
+ },
452
+ Error: {
453
+ "&::part(erroralert-base)": {
454
+ "margin-bottom": "15px",
455
+ },
456
+ },
457
+ Success: {
458
+ "&::part(successalert-base)": {
459
+ "margin-bottom": "15px",
460
+ },
461
+ },
462
+ InputContainer: {
463
+ "& > :not(:last-child)": {
464
+ "margin-bottom": "var(--sl-spacing-x-large)",
465
+ },
466
+ },
467
+ CancelButton: {
468
+ width: "25%",
469
+ margin: "var(--sl-spacing-large) auto",
470
+ },
471
+ PasswordField: {
472
+ marginBottom: "var(--sl-spacing-large) !important",
473
+ display: "block",
474
+ },
475
+ ChangePasswordButton: {
476
+ paddingTop: "var(--sl-spacing-x-large)",
477
+ },
478
+ };
479
+ const sheet = JSS.createStyleSheet(style);
480
+ const styleString = sheet.toString();
481
+ return (index.h("div", null,
482
+ index.h("style", { type: "text/css" }, styleString),
483
+ index.h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, "onSl-hide": () => callbacks.setOpen(false) },
484
+ index.h(sqmPortalSectionView.PortalSectionView, Object.assign({}, {
485
+ labelMargin: "x-large",
486
+ padding: "none",
487
+ label: (index.h(sqmTextSpanView.TextSpanView, Object.assign({}, { type: "h2" }), states.content.modalChangePasswordHeader)),
488
+ content: (index.h(sqmPortalContainerView.PortalContainerView, Object.assign({}, { direction: "column", padding: "none", gap: "32px" }),
489
+ states.error && (index.h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
490
+ index.h("div", { part: "erroralert-text" }, states.error))),
491
+ states.success && (index.h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
492
+ index.h("div", { part: "successalert-text" }, states.content.successMessage))),
493
+ index.h("sl-form", { "onSl-submit": callbacks.submit },
494
+ index.h("div", { class: sheet.classes.InputContainer },
495
+ index.h("sqm-password-field", { exportparts: "input-label: input-label", class: sheet.classes.PasswordField, fieldLabel: states.content.passwordFieldLabel }),
496
+ index.h("sl-input", { exportparts: "label: input-label", name: "/confirmPassword", label: states.content.confirmPasswordFieldLabel, required: true, togglePassword: true, disabled: states.loading, type: "password" })),
497
+ index.h(sqmPortalContainerView.PortalContainerView, Object.assign({}, { direction: "row", padding: "none", gap: "20px" }),
498
+ index.h("sl-button", { class: sheet.classes.ChangePasswordButton, type: "primary", submit: true, loading: states.loading }, states.content.changePasswordButtonText),
499
+ index.h("sl-button", { class: sheet.classes.CancelButton, type: "text", onClick: () => callbacks.setOpen(false) }, states.content.cancelText))))),
500
+ }))),
501
+ index.h(sqmPortalSectionView.PortalSectionView, Object.assign({}, {
502
+ labelMargin: "x-large",
503
+ padding: "xxx-large",
504
+ label: (index.h(sqmTextSpanView.TextSpanView, Object.assign({}, { type: "h2" }), states.content.portalChangePasswordHeader)),
505
+ content: (index.h("sl-button", { onClick: () => callbacks.setOpen(true) }, states.content.portalChangePasswordButtonText)),
506
+ }),
507
+ index.h("style", { type: "text/css" }, styleString))));
508
+ }
509
+
510
+ const style$3 = {
511
+ Wrapper: mixins.AuthWrapper,
512
+ Column: mixins.AuthColumn,
513
+ ForgotButtonContainer: {
514
+ display: "inline",
515
+ cursor: "pointer",
516
+ "font-size": "13px",
517
+ "font-weight": "600",
518
+ color: "#AAAAAA",
519
+ margin: "0",
520
+ },
521
+ ButtonsContainer: mixins.AuthButtonsContainer,
522
+ };
523
+ const vanillaStyle$1 = `
524
+ :host {
525
+ display: block;
526
+ }
527
+ :host([hidden]): {
528
+ display: none;
529
+ }
530
+ `;
531
+ const sheet$3 = JSS.createStyleSheet(style$3);
532
+ const styleString$3 = sheet$3.toString();
533
+ function PortalLoginView(props) {
534
+ const { states, callbacks, content } = props;
535
+ return (index.h("div", { class: sheet$3.classes.Wrapper },
536
+ index.h("style", { type: "text/css" },
537
+ vanillaStyle$1,
538
+ styleString$3),
539
+ index.h(sqmTextSpanView.TextSpanView, { type: "h3" }, content.pageLabel),
540
+ index.h("sl-form", { class: sheet$3.classes.Column, "onSl-submit": callbacks.submit },
541
+ props.states.error && (index.h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
542
+ index.h("div", { part: "erroralert-text" }, props.states.error))),
543
+ index.h("sl-input", { exportparts: "label: input-label", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true }),
544
+ index.h("div", null,
545
+ index.h("sl-input", { exportparts: "label: input-label", type: "password", name: "/password", label: content.passwordLabel || "Password", disabled: states.loading, required: true }),
546
+ index.h("div", { class: sheet$3.classes.ForgotButtonContainer }, content.forgotPasswordButton)),
547
+ index.h("div", { class: sheet$3.classes.ButtonsContainer },
548
+ index.h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Login"),
549
+ content.secondaryButton))));
550
+ }
551
+
552
+ const style$4 = {
553
+ Wrapper: { ...mixins.AuthWrapper, "max-width": "600px" },
554
+ Column: mixins.AuthColumn,
555
+ HostBlock: mixins.HostBlock,
556
+ ":host": {
557
+ margin: "0 auto",
558
+ width: "100%",
559
+ },
560
+ ButtonsContainer: mixins.AuthButtonsContainer,
561
+ ErrorStyle: mixins.ErrorStyles,
562
+ };
563
+ const vanillaStyle$2 = `
564
+ sqm-portal-register {
565
+ margin: 0 auto;
566
+ width: 100%;
567
+ display: block;
568
+ }
569
+
570
+ :host{
571
+ display: block;
572
+ }
573
+
574
+ :host([hidden]) {
575
+ display: none;
576
+ }
577
+ `;
578
+ const sheet$4 = JSS.createStyleSheet(style$4);
579
+ const styleString$4 = sheet$4.toString();
580
+ function PortalRegisterView(props) {
581
+ var _a, _b, _c, _d, _e, _f, _g, _h;
582
+ const { states, refs, callbacks, content } = props;
583
+ if (states.error) {
584
+ window.scrollTo({ top: 0, left: 0, behavior: "smooth" });
585
+ }
586
+ return (index.h("div", { class: sheet$4.classes.Wrapper },
587
+ index.h("style", { type: "text/css" },
588
+ vanillaStyle$2,
589
+ styleString$4),
590
+ index.h(sqmTextSpanView.TextSpanView, { type: "h3" }, content.pageLabel),
591
+ index.h("sl-form", { class: sheet$4.classes.Column, "onSl-submit": callbacks.submit, ref: (el) => (refs.formRef.current = el), novalidate: true },
592
+ states.error && (index.h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
593
+ index.h("div", { part: "erroralert-text" }, props.states.error))),
594
+ content.formData,
595
+ !states.hideInputs && (index.h("sl-input", Object.assign({ exportparts: "label: input-label", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true, validationError: ({ value }) => {
596
+ if (!value) {
597
+ return "Cannot be empty";
598
+ }
599
+ // this matches shoelace validation, but could be better
600
+ if (!value.includes("@")) {
601
+ return "Must be a valid email address";
602
+ }
603
+ } }, (((_b = (_a = states.validationState) === null || _a === void 0 ? void 0 : _a.validationErrors) === null || _b === void 0 ? void 0 : _b.email) ? {
604
+ class: sheet$4.classes.ErrorStyle,
605
+ helpText: ((_d = (_c = states.validationState) === null || _c === void 0 ? void 0 : _c.validationErrors) === null || _d === void 0 ? void 0 : _d.email) ||
606
+ "Cannot be empty",
607
+ }
608
+ : [])))),
609
+ !states.hideInputs && (index.h("sqm-password-field", { fieldLabel: content.passwordLabel, "enable-validation": states.enablePasswordValidation })),
610
+ content.passwordField,
611
+ !states.hideInputs && states.confirmPassword && (index.h("sl-input", Object.assign({ exportparts: "label: input-label", type: "password", name: "/confirmPassword", label: content.confirmPasswordLabel, disabled: states.loading, required: true }, (((_f = (_e = states.validationState) === null || _e === void 0 ? void 0 : _e.validationErrors) === null || _f === void 0 ? void 0 : _f.confirmPassword) ? {
612
+ class: sheet$4.classes.ErrorStyle,
613
+ helpText: ((_h = (_g = states.validationState) === null || _g === void 0 ? void 0 : _g.validationErrors) === null || _h === void 0 ? void 0 : _h.confirmPassword) ||
614
+ "Cannot be empty",
615
+ }
616
+ : [])))),
617
+ content.terms,
618
+ index.h("div", { class: sheet$4.classes.ButtonsContainer },
619
+ index.h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"),
620
+ content.secondaryButton))));
621
+ }
622
+
623
+ const style$5 = {
624
+ Description: {
625
+ "& input[type=checkbox]": {
626
+ display: "none",
627
+ },
628
+ "& input:checked ~ .details": {
629
+ transform: "rotate(-180deg)",
630
+ },
631
+ "& .details": {
632
+ position: "absolute",
633
+ top: "var(--sl-spacing-medium)",
634
+ right: "var(--sl-spacing-medium)",
635
+ color: "var(--sl-color-neutral-700)",
636
+ fontSize: "var(--sl-font-size-large)",
637
+ "& :hover": {
638
+ color: "var(--sl-color-primary-700)",
639
+ },
640
+ transformOrigin: "50% 37%",
641
+ transition: "transform var(--sl-transition-medium) ease",
642
+ cursor: "pointer",
643
+ },
644
+ "& input:checked ~ .summary": {
645
+ transition: "all var(--sl-transition-medium) ease",
646
+ maxHeight: "300px",
647
+ marginBottom: "var(--sl-spacing-x-large)",
648
+ },
649
+ "& input:checked ~ .summary[progress-bar]": {
650
+ marginBottom: "var(--sl-spacing-xx-large)",
651
+ },
652
+ "& .summary": {
653
+ display: "block",
654
+ overflow: "hidden",
655
+ fontSize: "var(--sl-font-size-small)",
656
+ maxHeight: "0px",
657
+ transition: "all var(--sl-transition-fast) ease-out",
658
+ marginBottom: "var(--sl-spacing-medium)",
659
+ },
660
+ },
661
+ };
662
+ const sheet$5 = JSS.createStyleSheet(style$5);
663
+ const styleString$5 = sheet$5.toString();
664
+ function Details(props) {
665
+ const rid = Math.random().toString(36).slice(2);
666
+ return (index.h("div", null,
667
+ index.h("style", { type: "text/css" }, styleString$5),
668
+ index.h("span", { class: sheet$5.classes.Description },
669
+ index.h("input", { type: "checkbox", id: "details-" + rid }),
670
+ index.h("label", { class: "details", htmlFor: "details-" + rid },
671
+ index.h("sl-icon", { name: "chevron-down" })),
672
+ index.h("span", { class: "summary", "progress-bar": props.progressBar }, props.content.description))));
673
+ }
674
+
675
+ const Gift = () => {
676
+ return (index.h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
677
+ index.h("path", { d: "M15 5H12.4508H9V16H13.5C14.0523 16 14.5 15.5523 14.5 15V9H15C15.5523 9 16 8.55228 16 8V6C16 5.44772 15.5523 5 15 5Z", fill: "#F2C94C" }),
678
+ index.h("path", { d: "M1.5 9V15C1.5 15.5523 1.94772 16 2.5 16H7V5H4.64242H1C0.447715 5 0 5.44772 0 6V8C0 8.55228 0.447715 9 1 9H1.5Z", fill: "#F2C94C" }),
679
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M1.5 9V10H14.5V9H1.5Z", fill: "#BE9720" }),
680
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M14 2.70949C14 3.59565 12.6694 4.93746 12 5H9V16H7.00179V5H4.58792C3.21247 4.70182 2 3.64537 2 2.52072C2 1.42474 2.47603 0.556701 3.34184 0.182041C4.16921 -0.175986 5.12452 0.0203328 5.87976 0.544666C6.80676 1.18825 7.32679 2.3963 7.79856 3.49226C7.83996 3.58845 7.88099 3.68378 7.9219 3.77778C7.96173 3.68865 8.00186 3.59793 8.0425 3.50608C8.50995 2.44948 9.04359 1.24325 9.9404 0.59563C10.7332 0.0231438 11.741 -0.193157 12.6121 0.198945C13.5129 0.604397 14 1.53453 14 2.70949ZM10.6123 1.5C11.0928 1.15305 11.668 1.09012 12.1597 1.5C12.5879 1.85694 12.6108 2.02497 12.6658 2.42926L12.6755 2.5C12.6755 3.09851 12.1597 4 11.6439 4C11.2785 4 10.9914 3.99691 10.7224 3.99402C10.2319 3.98875 9.80131 3.98412 9.06496 4C9.20533 3.72786 9.31743 3.46669 9.42434 3.21761C9.71026 2.55143 9.95907 1.97176 10.6123 1.5ZM4.93861 1.5C4.70607 1.33855 4.17281 1.4106 3.95166 1.5063C3.76894 1.58537 3.49602 1.82658 3.49602 2.52072C3.49602 3.19524 4.58792 3.77778 4.58792 3.77778C4.58792 3.77778 5.45441 4 7.00179 4C6.47506 2.69451 5.7289 2.04867 4.93861 1.5Z", fill: "#EB5757" })));
681
+ };
682
+
683
+ const style$6 = {
684
+ ProgressBar: {
685
+ "& .progress-bar": {
686
+ height: "0",
687
+ marginTop: "var(--sl-spacing-large)",
688
+ marginBottom: "var(--sl-spacing-xxx-large)",
689
+ marginRight: "var(--sl-spacing-x-small)",
690
+ fontSize: "var(--sl-font-size-x-small)",
691
+ display: "grid",
692
+ lineHeight: "45px",
693
+ userSelect: "none",
694
+ },
695
+ "&[data-steps]": {
696
+ marginTop: "calc(-1*var(--sl-spacing-x-small))",
697
+ },
698
+ "&[data-steps] .progress-bar": {
699
+ marginTop: "var(--sl-spacing-medium)",
700
+ },
701
+ "&[data-expired] .progress-bar": {
702
+ filter: "grayscale(1)",
703
+ },
704
+ "& .progress-bar.repeatable-steps": {
705
+ marginLeft: "var(--sl-spacing-x-small)",
706
+ },
707
+ "& .filled:after": {
708
+ content: '""',
709
+ display: "flex",
710
+ width: "100%",
711
+ height: "4px",
712
+ borderRadius: "4px",
713
+ backgroundColor: "var(--sl-color-primary-300)",
714
+ },
715
+ "& .progress": {
716
+ display: "block",
717
+ textAlign: "center",
718
+ marginLeft: "-100px",
719
+ marginRight: "-100px",
720
+ },
721
+ "& .progress::after": {
722
+ content: '""',
723
+ width: "12px",
724
+ height: "12px",
725
+ display: "flex",
726
+ backgroundColor: "var(--sl-color-primary-300)",
727
+ borderRadius: "50%",
728
+ position: "relative",
729
+ left: "47%",
730
+ top: "-85%",
731
+ },
732
+ "& .progress.bg:after": {
733
+ width: "0",
734
+ height: "0",
735
+ border: "none",
736
+ },
737
+ "& .progress.top": {
738
+ position: "relative",
739
+ top: "-40px",
740
+ },
741
+ "& .progress.top:after": {
742
+ top: "-16%",
743
+ },
744
+ "& .empty": {
745
+ display: "block",
746
+ textAlign: "center",
747
+ marginLeft: "-100px",
748
+ marginRight: "-100px",
749
+ },
750
+ "& .empty::after": {
751
+ content: '""',
752
+ width: "12px",
753
+ height: "12px",
754
+ border: "2px solid #E0E0E0",
755
+ margin: "-2px",
756
+ display: "flex",
757
+ backgroundColor: "white",
758
+ borderRadius: "50%",
759
+ position: "relative",
760
+ left: "47%",
761
+ top: "-85%",
762
+ },
763
+ "& .empty.bg:after": {
764
+ width: "0",
765
+ height: "0",
766
+ border: "none",
767
+ },
768
+ "& .remain:after": {
769
+ content: '""',
770
+ display: "flex",
771
+ width: "100%",
772
+ height: "4px",
773
+ borderRadius: "4px",
774
+ backgroundColor: "#E0E0E0",
775
+ },
776
+ "& .gift.bw": {
777
+ filter: "grayscale(100%)",
778
+ },
779
+ "& .gift.start": {
780
+ transform: "scale(80%)",
781
+ top: "-20px",
782
+ },
783
+ "& .gift": {
784
+ textAlign: "center",
785
+ marginLeft: "-100px",
786
+ marginRight: "-100px",
787
+ position: "relative",
788
+ top: "-18px",
789
+ },
790
+ },
791
+ };
792
+ const sheet$6 = JSS.createStyleSheet(style$6, { classNamePrefix: "sqm-prog-bar" });
793
+ const styleString$6 = sheet$6.toString();
794
+ function ProgressBarView(props) {
795
+ var _a;
796
+ const { progress = 0, goal = 1, steps = false, progressBarUnit = "", repeatable = false, expired = false, finite = 0, } = props;
797
+ let aggregate = buildProgressBar(repeatable, steps, props);
798
+ const { columns, items } = aggregate;
799
+ //@ts-ignore
800
+ console.log("PROGRESS BAR PROPS " + ((_a = props === null || props === void 0 ? void 0 : props.content) === null || _a === void 0 ? void 0 : _a.cardTitle));
801
+ console.log({ props });
802
+ return (index.h("div", { class: sheet$6.classes.ProgressBar, "data-expired": expired, "data-steps": steps, "data-done": goal <= progress },
803
+ index.h("style", { type: "text/css" }, styleString$6),
804
+ index.h("div", { class: (!Boolean(finite) && progress >= 2 * goal) ||
805
+ (Boolean(finite) && progress > 2 * goal)
806
+ ? "progress-bar repeatable-steps"
807
+ : "progress-bar", style: {
808
+ gridTemplateColumns: columns,
809
+ marginLeft: progress === 0 && !steps ? "var(--sl-spacing-x-small)" : "",
810
+ } }, items)));
811
+ }
812
+ function buildProgressBar(repeatable, steps, props) {
813
+ if (repeatable) {
814
+ if (steps) {
815
+ return addStepsRepeatable(props);
816
+ }
817
+ else {
818
+ return addLinearRepeatable(props);
819
+ }
820
+ }
821
+ // non repeatable
822
+ else {
823
+ if (steps) {
824
+ return addSteps(props);
825
+ }
826
+ else {
827
+ return addLinear(props);
828
+ }
829
+ }
830
+ }
831
+ function addSteps({ progress, goal }) {
832
+ const items = [];
833
+ const columns = [];
834
+ let ratio = 1 / goal;
835
+ for (let i = 1; i < goal; i++) {
836
+ columns.push(ratio + "fr");
837
+ columns.push("0fr");
838
+ if (i > progress) {
839
+ items.push(index.h("div", { class: "remain" }));
840
+ items.push(index.h("div", { class: "empty" }, i));
841
+ }
842
+ else {
843
+ items.push(index.h("div", { class: "filled" }));
844
+ items.push(index.h("div", { class: "progress" }, i));
845
+ }
846
+ }
847
+ columns.push(ratio + "fr");
848
+ columns.push("0fr");
849
+ // reward success
850
+ if (goal <= progress) {
851
+ columns.push("0fr");
852
+ items.push(index.h("div", { class: "filled" }));
853
+ items.push(index.h("div", { class: "progress bg" }, goal));
854
+ items.push(index.h("div", { class: "gift" }, index.h(Gift, null)));
855
+ }
856
+ // reward fail
857
+ else {
858
+ columns.push("0fr");
859
+ items.push(index.h("div", { class: "remain" }));
860
+ items.push(index.h("div", { class: "empty bg" }, goal));
861
+ items.push(index.h("div", { class: "gift bw" }, index.h(Gift, null)));
862
+ }
863
+ return {
864
+ items,
865
+ columns: columns.join(" "),
866
+ };
867
+ }
868
+ function addLinearRepeatable({ progress, goal, progressBarUnit, finite, }) {
869
+ let repetitions = Math.floor(progress / goal);
870
+ let ratio = ((progress % goal) / goal) * 0.5;
871
+ const items = [];
872
+ let columns = "";
873
+ // 0 repetition
874
+ if (repetitions == 0) {
875
+ columns = ratio + "fr 0fr " + (0.5 - ratio) + "fr 0fr 0fr 0.5fr 0fr 0fr";
876
+ items.push(index.h("div", { class: "filled" }));
877
+ items.push(index.h("div", { class: progress == goal ? "progress top bg" : "progress top" }, progressBarUnit + progress));
878
+ items.push(index.h("div", { class: "remain" }));
879
+ items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal));
880
+ items.push(index.h("div", { class: progress == goal ? "gift" : "gift bw" },
881
+ index.h(Gift, null)));
882
+ items.push(index.h("div", { class: "remain" }));
883
+ items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal * 2));
884
+ items.push(index.h("div", { class: "gift bw" }, index.h(Gift, null)));
885
+ }
886
+ // single repetition
887
+ else if (repetitions == 1) {
888
+ columns =
889
+ "0.5fr 0fr 0fr " + ratio + "fr 0fr " + (0.5 - ratio) + "fr 0fr 0fr";
890
+ items.push(index.h("div", { class: "filled" }));
891
+ items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal));
892
+ items.push(index.h("div", { class: "gift" }, index.h(Gift, null)));
893
+ items.push(index.h("div", { class: "filled" }));
894
+ items.push(index.h("div", { class: progress == goal ? "progress top bg" : "progress top" }, progress == goal ? "" : progressBarUnit + progress));
895
+ items.push(index.h("div", { class: "remain" }));
896
+ items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal * 2));
897
+ items.push(index.h("div", { class: "gift bw" }, index.h(Gift, null)));
898
+ }
899
+ // finite repetition hit
900
+ else if (finite && repetitions >= finite) {
901
+ if (repetitions > 2) {
902
+ items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal * (finite - 2)));
903
+ items.push(index.h("div", { class: "gift start" }, index.h(Gift, null)));
904
+ columns = "0fr 0fr 0.5fr 0fr 0fr 0.5fr 0fr 0fr";
905
+ }
906
+ else {
907
+ columns = "0.5fr 0fr 0fr 0.5fr 0fr 0fr";
908
+ }
909
+ items.push(index.h("div", { class: "filled" }));
910
+ items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal * (finite - 1)));
911
+ items.push(index.h("div", { class: "gift" }, index.h(Gift, null)));
912
+ items.push(index.h("div", { class: "filled" }));
913
+ items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal * finite));
914
+ items.push(index.h("div", { class: "gift" }, index.h(Gift, null)));
915
+ }
916
+ // multiple repetitions
917
+ else {
918
+ columns =
919
+ "0fr 0fr 0.5fr 0fr 0fr " +
920
+ ratio +
921
+ "fr 0fr " +
922
+ (0.5 - ratio) +
923
+ "fr 0fr 0fr";
924
+ items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal * (repetitions - 1)));
925
+ items.push(index.h("div", { class: "gift start" }, index.h(Gift, null)));
926
+ items.push(index.h("div", { class: "filled" }));
927
+ items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal * repetitions));
928
+ items.push(index.h("div", { class: "gift" }, index.h(Gift, null)));
929
+ items.push(index.h("div", { class: "filled" }));
930
+ items.push(index.h("div", { class: progress == goal * repetitions ? "progress top bg" : "progress top" }, progress == goal * repetitions ? "" : progressBarUnit + progress));
931
+ items.push(index.h("div", { class: "remain" }));
932
+ items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal * (repetitions + 1)));
933
+ items.push(index.h("div", { class: "gift bw" }, index.h(Gift, null)));
934
+ }
935
+ return { items, columns };
936
+ }
937
+ function addStepsRepeatable({ progress, goal, finite, }) {
938
+ const items = [];
939
+ const columns = [];
940
+ let repetitions = Math.floor(progress / goal);
941
+ // no or single repetition
942
+ if (repetitions < 2) {
943
+ let ratio = 1 / goal;
944
+ for (let i = 1; i < goal * 2 + 1; i++) {
945
+ columns.push(ratio + "fr");
946
+ columns.push("0fr");
947
+ if (i > progress) {
948
+ if (i == goal) {
949
+ columns.push("0fr");
950
+ items.push(index.h("div", { class: "remain" }));
951
+ items.push(index.h("div", { class: "empty bg" }, goal));
952
+ items.push(index.h("div", { class: "gift bw" }, index.h(Gift, null)));
953
+ }
954
+ else if (i == goal * 2) {
955
+ columns.push("0fr");
956
+ columns.push("0fr");
957
+ items.push(index.h("div", { class: "remain" }));
958
+ items.push(index.h("div", { class: "empty bg" }, goal * 2));
959
+ items.push(index.h("div", { class: "gift bw" }, index.h(Gift, null)));
960
+ }
961
+ else {
962
+ items.push(index.h("div", { class: "remain" }));
963
+ items.push(index.h("div", { class: "empty" }, i));
964
+ }
965
+ }
966
+ else if (i == goal) {
967
+ columns.push("0fr");
968
+ items.push(index.h("div", { class: "filled" }));
969
+ items.push(index.h("div", { class: "progress bg" }, i));
970
+ items.push(index.h("div", { class: "gift" }, index.h(Gift, null)));
971
+ }
972
+ else {
973
+ items.push(index.h("div", { class: "filled" }));
974
+ items.push(index.h("div", { class: "progress" }, i));
975
+ }
976
+ }
977
+ }
978
+ // finite repetition hit
979
+ else if (finite && repetitions >= finite) {
980
+ let ratio = 1 / goal;
981
+ if (repetitions > 2) {
982
+ columns.push("0fr");
983
+ columns.push("0fr");
984
+ items.push(index.h("div", { class: "progress bg" }, goal * (finite - 2)));
985
+ items.push(index.h("div", { class: "gift start" }, index.h(Gift, null)));
986
+ }
987
+ for (let i = 1; i < goal * 2 + 1; i++) {
988
+ columns.push(ratio + "fr");
989
+ columns.push("0fr");
990
+ if (i > progress) {
991
+ if (i == goal) {
992
+ columns.push("0fr");
993
+ items.push(index.h("div", { class: "remain" }));
994
+ items.push(index.h("div", { class: "progress bg" }, goal * (finite - 1)));
995
+ items.push(index.h("div", { class: "gift bw" }, index.h(Gift, null)));
996
+ }
997
+ }
998
+ else if (i == goal) {
999
+ columns.push("0fr");
1000
+ items.push(index.h("div", { class: "filled" }));
1001
+ items.push(index.h("div", { class: "progress bg" }, goal * (finite - 1)));
1002
+ items.push(index.h("div", { class: "gift" }, index.h(Gift, null)));
1003
+ }
1004
+ else if (i == goal * 2) {
1005
+ columns.push("0fr");
1006
+ columns.push("0fr");
1007
+ items.push(index.h("div", { class: "filled" }));
1008
+ items.push(index.h("div", { class: "progress bg" }, goal * finite));
1009
+ items.push(index.h("div", { class: "gift" }, index.h(Gift, null)));
1010
+ }
1011
+ else {
1012
+ items.push(index.h("div", { class: "filled" }));
1013
+ items.push(index.h("div", { class: "progress" }, i + goal * (finite - 2)));
1014
+ }
1015
+ }
1016
+ }
1017
+ // case repetition many
1018
+ else {
1019
+ let position = (progress % goal) + goal;
1020
+ let ratio = 1 / goal;
1021
+ columns.push("0fr");
1022
+ columns.push("0fr");
1023
+ items.push(index.h("div", { class: "progress bg" }, goal * (repetitions - 1)));
1024
+ items.push(index.h("div", { class: "gift start" }, index.h(Gift, null)));
1025
+ for (let i = 1; i < goal * 2 + 1; i++) {
1026
+ columns.push(ratio + "fr");
1027
+ columns.push("0fr");
1028
+ if (i <= goal) {
1029
+ if (i == goal) {
1030
+ columns.push("0fr");
1031
+ items.push(index.h("div", { class: "filled" }));
1032
+ items.push(index.h("div", { class: "progress bg" }, i + goal * (repetitions - 1)));
1033
+ items.push(index.h("div", { class: "gift" }, index.h(Gift, null)));
1034
+ }
1035
+ else {
1036
+ items.push(index.h("div", { class: "filled" }));
1037
+ items.push(index.h("div", { class: "progress" }, i + goal * (repetitions - 1)));
1038
+ }
1039
+ }
1040
+ else if (i > position) {
1041
+ if (i == goal * 2) {
1042
+ columns.push("0fr");
1043
+ columns.push("0fr");
1044
+ items.push(index.h("div", { class: "remain" }));
1045
+ items.push(index.h("div", { class: "empty bg" }, i + goal * (repetitions - 1)));
1046
+ items.push(index.h("div", { class: "gift bw" }, index.h(Gift, null)));
1047
+ }
1048
+ else {
1049
+ items.push(index.h("div", { class: "remain" }));
1050
+ items.push(index.h("div", { class: "empty" }, i + goal * (repetitions - 1)));
1051
+ }
1052
+ }
1053
+ else {
1054
+ items.push(index.h("div", { class: "filled" }));
1055
+ items.push(index.h("div", { class: "progress" }, i + goal * (repetitions - 1)));
1056
+ }
1057
+ }
1058
+ }
1059
+ return { items, columns: columns.join(" ") };
1060
+ }
1061
+ function addLinear({ progress, goal, progressBarUnit, }) {
1062
+ const items = [];
1063
+ let columns = "";
1064
+ const ratio = progress / goal;
1065
+ columns =
1066
+ clamp(ratio, 0, 1) + "fr 0fr " + clamp(1 - ratio, 0, 1) + "fr 0fr 0fr";
1067
+ items.push(index.h("div", { class: "filled" }));
1068
+ items.push(index.h("div", { class: clamp(progress, 0, goal) == goal ? "progress top bg" : "progress top" }, clamp(progress, 0, goal) == goal
1069
+ ? ""
1070
+ : progressBarUnit + clamp(progress, 0, goal)));
1071
+ items.push(index.h("div", { class: "remain" }));
1072
+ items.push(index.h("div", { class: "progress bg" }, progressBarUnit + goal));
1073
+ items.push(index.h("div", { class: clamp(progress, 0, goal) == goal ? "gift" : "gift bw" },
1074
+ index.h(Gift, null)));
1075
+ return { items, columns };
1076
+ }
1077
+ function clamp(x, min, max) {
1078
+ return Math.min(Math.max(x, min), max);
1079
+ }
1080
+
1081
+ const checkmark_circle = () => {
1082
+ return (index.h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1083
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M1.81818 10C1.81818 5.48131 5.48131 1.81818 10 1.81818C14.5187 1.81818 18.1818 5.48131 18.1818 10C18.1818 14.5187 14.5187 18.1818 10 18.1818C5.48131 18.1818 1.81818 14.5187 1.81818 10ZM10 0C4.47715 0 0 4.47715 0 10C0 15.5228 4.47715 20 10 20C15.5228 20 20 15.5228 20 10C20 4.47715 15.5228 0 10 0ZM15.7692 6.96189C16.1398 6.48683 16.0551 5.80132 15.58 5.43077C15.1049 5.06022 14.4194 5.14495 14.0489 5.62001L8.72994 12.4391L5.86229 9.5715C5.43627 9.14548 4.74554 9.14548 4.31952 9.5715C3.89349 9.99752 3.89349 10.6882 4.31952 11.1143L8.05976 14.8545C8.28083 15.0756 8.58613 15.1912 8.89818 15.172C9.21023 15.1528 9.49905 15.0006 9.69133 14.7541L15.7692 6.96189Z", fill: "currentColor" })));
1084
+ };
1085
+ const checkmark_filled = () => {
1086
+ return (index.h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1087
+ index.h("circle", { cx: "10", cy: "10", r: "10", fill: "currentColor" }),
1088
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M14.65 6.19231C15.0459 6.5011 15.1165 7.07236 14.8077 7.46825L9.74277 13.9617C9.58254 14.1672 9.34186 14.294 9.08182 14.31C8.82178 14.326 8.56736 14.2297 8.38314 14.0454L5.26627 10.9286C4.91124 10.5735 4.91124 9.99794 5.26627 9.64292C5.62129 9.2879 6.19689 9.2879 6.55191 9.64292L8.94162 12.0326L13.3741 6.35001C13.6828 5.95412 14.2541 5.88352 14.65 6.19231Z", fill: "white" })));
1089
+ };
1090
+ const arrow_left_right = () => {
1091
+ return (index.h("svg", { width: 11, height: 12, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1092
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10.265 2.789a.346.346 0 000-.489L8.066.101a.346.346 0 10-.489.489l1.61 1.609H2.073a.691.691 0 00-.69.691v1.728a.346.346 0 00.69 0V2.89h7.114L7.577 4.5a.346.346 0 10.49.488l2.198-2.2zM.101 9.21a.346.346 0 000 .489l2.2 2.199a.346.346 0 00.488-.489l-1.61-1.609h7.114c.382 0 .691-.31.691-.691V7.382a.346.346 0 00-.691 0V9.11H1.18L2.789 7.5a.346.346 0 10-.489-.488l-2.199 2.2z", fill: "currentColor" })));
1093
+ };
1094
+
1095
+ const style$7 = {
1096
+ TaskCard: {
1097
+ display: "inline-block",
1098
+ width: "100%",
1099
+ "& .main": {
1100
+ position: "relative",
1101
+ boxSizing: "border-box",
1102
+ background: "var(--sl-color-neutral-0)",
1103
+ border: "1px solid var(--sl-color-neutral-200)",
1104
+ borderRadius: "var(--sl-border-radius-medium)",
1105
+ boxShadow: "1px 2px 4px rgba(211, 211, 211, 0.2)",
1106
+ fontSize: "var(--sl-font-size-small)",
1107
+ lineHeight: "var(--sl-line-height-dense)",
1108
+ color: "var(--sl-color-neutral-600)",
1109
+ },
1110
+ "& .main.complete": {
1111
+ background: "var(--sl-color-primary-50)",
1112
+ borderColor: "var(--sl-color-primary-500)",
1113
+ },
1114
+ "& .main.expired": {
1115
+ color: "var(--sl-color-neutral-600)",
1116
+ background: "var(--sl-color-neutral-50)",
1117
+ },
1118
+ "& .title": {
1119
+ fontSize: "var(--sl-font-size-medium)",
1120
+ color: "var(--sl-color-neutral-950)",
1121
+ },
1122
+ "& .container": {
1123
+ margin: "var(--sl-spacing-medium)",
1124
+ },
1125
+ "& .container.subdued": {
1126
+ opacity: "0.45",
1127
+ },
1128
+ "& .container > div": {
1129
+ margin: "var(--sl-spacing-medium) 0",
1130
+ },
1131
+ },
1132
+ NotStarted: {
1133
+ fontSize: "var(--sl-font-size-small)",
1134
+ padding: "var(--sl-spacing-medium)",
1135
+ color: "var(--sl-color-primary-600)",
1136
+ border: "1px solid var(--sl-color-neutral-200)",
1137
+ borderRadius: "var(--sl-border-radius-medium) var(--sl-border-radius-medium) 0 0",
1138
+ borderBottom: "none",
1139
+ background: "var(--sl-color-primary-50)",
1140
+ fontWeight: "var(--sl-font-weight-semibold)",
1141
+ lineHeight: "var(--sl-line-height-dense)",
1142
+ "& .icon": {
1143
+ position: "relative",
1144
+ top: "0.1em",
1145
+ marginRight: "var(--sl-spacing-small)",
1146
+ color: "var(--sl-color-primary-500)",
1147
+ },
1148
+ },
1149
+ Ended: {
1150
+ fontSize: "var(--sl-font-size-small)",
1151
+ padding: "var(--sl-spacing-medium)",
1152
+ color: "var(--sl-color-warning-600)",
1153
+ border: "1px solid var(--sl-color-neutral-200)",
1154
+ borderRadius: "var(--sl-border-radius-medium) var(--sl-border-radius-medium) 0 0",
1155
+ borderBottom: "none",
1156
+ background: "var(--sl-color-warning-50)",
1157
+ fontWeight: "var(--sl-font-weight-semibold)",
1158
+ lineHeight: "var(--sl-line-height-dense)",
1159
+ "& .icon": {
1160
+ position: "relative",
1161
+ top: "0.1em",
1162
+ marginRight: "var(--sl-spacing-small)",
1163
+ color: "var(--sl-color-warning-500)",
1164
+ },
1165
+ },
1166
+ Header: {
1167
+ display: "flex",
1168
+ "& .icon": {
1169
+ position: "relative",
1170
+ top: "5%",
1171
+ alignSelf: "center",
1172
+ lineHeight: "0",
1173
+ color: "var(--sl-color-primary-400)",
1174
+ fontSize: "var(--sl-font-size-large)",
1175
+ marginRight: "var(--sl-spacing-x-small)",
1176
+ },
1177
+ "& .value": {
1178
+ alignSelf: "center",
1179
+ fontSize: "var(--sl-font-size-x-large)",
1180
+ fontWeight: "var(--sl-font-weight-semibold)",
1181
+ color: "var(--sl-color-neutral-950)",
1182
+ lineHeight: "100%",
1183
+ marginRight: "var(--sl-spacing-xx-small)",
1184
+ },
1185
+ "& .text": {
1186
+ alignSelf: "end",
1187
+ textTransform: "uppercase",
1188
+ fontSize: "var(--sl-font-size-x-small)",
1189
+ color: "var(--sl-color-neutral-950)",
1190
+ lineHeight: "var(--sl-font-size-medium)",
1191
+ marginRight: "var(--sl-spacing-xx-small)",
1192
+ },
1193
+ "& .end": {
1194
+ color: "var(--sl-color-warning-500)",
1195
+ fontWeight: "var(--sl-font-weight-semibold)",
1196
+ marginBottom: "var(--sl-spacing-xx-small)",
1197
+ },
1198
+ "& .neutral": {
1199
+ color: "var(--sl-color-neutral-400)",
1200
+ },
1201
+ },
1202
+ Footer: {
1203
+ display: "flex",
1204
+ "& .icon": {
1205
+ fontSize: "var(--sl-font-size-xx-small)",
1206
+ marginRight: "var(--sl-spacing-xx-small)",
1207
+ verticalAlign: "middle",
1208
+ },
1209
+ "& .text": {
1210
+ marginTop: "auto",
1211
+ verticalAlign: "text-bottom",
1212
+ fontSize: "var(--sl-font-size-x-small)",
1213
+ color: "var(--sl-color-neutral-400)",
1214
+ },
1215
+ "& .success": {
1216
+ color: "var(--sl-color-primary-500)",
1217
+ fontWeight: "var(--sl-font-weight-semibold)",
1218
+ },
1219
+ "& .action": {
1220
+ marginTop: "auto",
1221
+ marginLeft: "auto",
1222
+ "&::part(base)": {
1223
+ color: "var(--sl-color-neutral-0)",
1224
+ borderRadius: "var(--sl-border-radius-medium)",
1225
+ },
1226
+ "&.disabled::part(base)": {
1227
+ border: "1px solid var(--sl-color-primary-400)",
1228
+ background: "var(--sl-color-primary-400)",
1229
+ },
1230
+ "&.neutral::part(base)": {
1231
+ border: "1px solid var(--sl-color-neutral-400)",
1232
+ background: "var(--sl-color-neutral-400)",
1233
+ },
1234
+ },
1235
+ "& .neutral": {
1236
+ color: "var(--sl-color-neutral-400)",
1237
+ },
1238
+ "& .datetime": {
1239
+ display: "block",
1240
+ marginTop: "var(--sl-spacing-xx-small)",
1241
+ color: "var(--sl-color-neutral-400)",
1242
+ },
1243
+ },
1244
+ };
1245
+ const sheet$7 = JSS.createStyleSheet(style$7);
1246
+ const styleString$7 = sheet$7.toString();
1247
+ function TaskCardView(props) {
1248
+ var _a, _b, _c;
1249
+ console.log("TASK CARD PROPS " + ((_a = props === null || props === void 0 ? void 0 : props.content) === null || _a === void 0 ? void 0 : _a.cardTitle));
1250
+ console.log({ props });
1251
+ const { callbacks, states, content } = props;
1252
+ const dateStart = content.rewardDuration &&
1253
+ luxon.luxon.DateTime.fromISO(content.rewardDuration.split("/")[0]);
1254
+ const dateEnd = content.rewardDuration &&
1255
+ luxon.luxon.DateTime.fromISO(content.rewardDuration.split("/")[1]);
1256
+ const dateToday = luxon.luxon.DateTime.now();
1257
+ if (content.displayDuration) {
1258
+ const start = (_b = content.displayDuration.split("/")) === null || _b === void 0 ? void 0 : _b[0];
1259
+ const end = (_c = content.displayDuration.split("/")) === null || _c === void 0 ? void 0 : _c[1];
1260
+ const displayDateStart = start ? luxon.luxon.DateTime.fromISO(start) : dateToday;
1261
+ const displayDateEnd = end ? luxon.luxon.DateTime.fromISO(end) : dateToday;
1262
+ console.log({ displayDateStart, dateToday, displayDateEnd });
1263
+ if (dateToday < displayDateStart || dateToday > displayDateEnd)
1264
+ return index.h("span", null);
1265
+ }
1266
+ const checkmark_circle$1 = checkmark_circle();
1267
+ const checkmark_filled$1 = checkmark_filled();
1268
+ const arrow_left_right$1 = arrow_left_right();
1269
+ const showComplete = states.progress >= content.goal;
1270
+ const repetitions = content.showProgressBar
1271
+ ? Math.floor(states.progress / content.goal)
1272
+ : states.progress;
1273
+ const taskComplete = (showComplete && content.repeatable === false) ||
1274
+ (content.finite && states.progress >= content.finite * content.goal);
1275
+ const taskEnded = content.rewardDuration && dateEnd <= dateToday;
1276
+ const taskNotStarted = content.rewardDuration && dateToday <= dateStart;
1277
+ const taskUnavailable = taskEnded || taskNotStarted;
1278
+ const vanillaStyle = `
1279
+ :host{
1280
+ display: block;
1281
+ margin-bottom: var(--sl-spacing-large);
1282
+ }
1283
+ `;
1284
+ return (index.h("div", { class: sheet$7.classes.TaskCard },
1285
+ index.h("style", { type: "text/css" },
1286
+ styleString$7,
1287
+ vanillaStyle),
1288
+ !states.loading && taskNotStarted && (index.h("div", { class: sheet$7.classes.NotStarted },
1289
+ index.h("span", { class: "icon" },
1290
+ index.h("sl-icon", { name: "info-circle-fill" })),
1291
+ global.intl.formatMessage({
1292
+ id: "startsOnMessage",
1293
+ defaultMessage: content.startsOnMessage,
1294
+ }, {
1295
+ startDate: dateStart
1296
+ .setLocale(utils.luxonLocale(states.locale))
1297
+ .toLocaleString(luxon.luxon.DateTime.DATETIME_MED),
1298
+ }))),
1299
+ !states.loading && taskEnded && (index.h("div", { class: sheet$7.classes.Ended },
1300
+ index.h("span", { class: "icon" },
1301
+ index.h("sl-icon", { name: "exclamation-triangle-fill" })),
1302
+ global.intl.formatMessage({
1303
+ id: "endedMessage",
1304
+ defaultMessage: content.endedMessage,
1305
+ }, {
1306
+ endDate: dateEnd
1307
+ .setLocale(utils.luxonLocale(states.locale))
1308
+ .toLocaleString(luxon.luxon.DateTime.DATETIME_MED),
1309
+ }))),
1310
+ index.h("div", { style: {
1311
+ borderRadius: taskUnavailable &&
1312
+ "0 0 var(--sl-border-radius-medium) var(--sl-border-radius-medium)",
1313
+ }, class: taskUnavailable
1314
+ ? "main expired"
1315
+ : taskComplete
1316
+ ? "main complete"
1317
+ : "main" },
1318
+ index.h("div", { class: taskComplete || taskUnavailable ? "container subdued" : "container" },
1319
+ index.h("div", { class: sheet$7.classes.Header }, states.loading ? (index.h("sl-skeleton", { style: { width: "22%", margin: "0" } })) : (index.h("div", null,
1320
+ showComplete && (index.h("span", { class: taskUnavailable ? "icon neutral" : "icon" }, taskComplete ? checkmark_filled$1 : checkmark_circle$1)),
1321
+ index.h("span", { class: "value" }, content.rewardAmount),
1322
+ index.h("span", { class: "text" }, content.rewardUnit)))),
1323
+ states.loading ? (index.h("sl-skeleton", { style: { width: "42%", margin: "var(--sl-spacing-medium) 0" } })) : (index.h("div", { class: "title", style: {
1324
+ marginBottom: !content.description
1325
+ ? content.steps
1326
+ ? "var(--sl-spacing-x-large)"
1327
+ : content.showProgressBar
1328
+ ? "var(--sl-spacing-xx-large)"
1329
+ : ""
1330
+ : "",
1331
+ } }, content.cardTitle)),
1332
+ states.loading ? (index.h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.description && index.h(Details, Object.assign({}, props))),
1333
+ content.showProgressBar && states.loading ? (index.h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.showProgressBar && (index.h(ProgressBarView, Object.assign({}, props.content, props.states, { complete: taskComplete, expired: taskUnavailable })))),
1334
+ index.h("div", { class: sheet$7.classes.Footer }, states.loading ? (index.h("sl-skeleton", { style: { width: "25%", marginLeft: "auto" } })) : (index.h("div", { style: { display: "contents" } },
1335
+ index.h("span", { class: "text" },
1336
+ content.repeatable && (index.h("div", null,
1337
+ index.h("span", { class: repetitions > 0
1338
+ ? taskUnavailable
1339
+ ? "icon neutral"
1340
+ : "icon success"
1341
+ : "icon" }, arrow_left_right$1),
1342
+ index.h("span", { class: repetitions > 0
1343
+ ? taskUnavailable
1344
+ ? "neutral"
1345
+ : "success"
1346
+ : "" }, global.intl.formatMessage({
1347
+ id: "completedMessage",
1348
+ defaultMessage: content.completedText,
1349
+ }, {
1350
+ finite: content.finite,
1351
+ count: content.finite
1352
+ ? Math.min(repetitions, content.finite)
1353
+ : repetitions,
1354
+ })))),
1355
+ dateEnd && !taskUnavailable && (index.h("span", { class: "datetime" }, global.intl.formatMessage({
1356
+ id: "expiryMessage",
1357
+ defaultMessage: content.expiryMessage,
1358
+ }, {
1359
+ endDate: dateEnd
1360
+ .setLocale(utils.luxonLocale(states.locale))
1361
+ .toLocaleString(luxon.luxon.DateTime.DATETIME_MED),
1362
+ })))),
1363
+ index.h("sl-button", { class: taskUnavailable
1364
+ ? "action neutral"
1365
+ : taskComplete
1366
+ ? "action disabled"
1367
+ : "action", type: "primary", size: "small", onClick: callbacks.onClick, loading: states.loadingEvent, disabled: taskComplete || taskUnavailable }, content.buttonText))))))));
1368
+ }
1369
+
1370
+ function ReferralIframeView(props) {
1371
+ const { states, data } = props;
1372
+ const { content } = states;
1373
+ const style = {
1374
+ Container: {
1375
+ position: "relative",
1376
+ width: content.iframeWidth,
1377
+ height: content.iframeHeight,
1378
+ },
1379
+ IFrame: {
1380
+ position: "absolute",
1381
+ width: "100%",
1382
+ height: "100%",
1383
+ border: "0",
1384
+ top: "0",
1385
+ left: "0",
1386
+ right: "0",
1387
+ },
1388
+ };
1389
+ // JSS config
1390
+ const sheet = JSS.createStyleSheet(style);
1391
+ const styleString = sheet.toString();
1392
+ return (index.h("div", { class: sheet.classes.Container },
1393
+ index.h("style", { type: "text/css" }, styleString),
1394
+ index.h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?rsCode=${data.shareCode}` })));
1395
+ }
1396
+
1397
+ const CheckMark = () => (index.h("svg", { width: 12, height: 10, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1398
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.58.23c.475.371.56 1.057.19 1.532L5.69 9.554a1.091 1.091 0 0 1-1.631.1L.32 5.915a1.09 1.09 0 1 1 1.542-1.542L4.73 7.239 10.049.42A1.09 1.09 0 0 1 11.58.23Z", fill: "#fff" })));
1399
+ const CheckmarkFilled = () => (index.h("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1400
+ index.h("path", { d: "M0 9C0 4.02944 4.02944 0 9 0C13.9706 0 18 4.02944 18 9C18 13.9706 13.9706 18 9 18C4.02944 18 0 13.9706 0 9Z", fill: "currentColor" }),
1401
+ index.h("path", { d: "M5.68394 8.77046C5.28103 8.39273 4.64819 8.41315 4.27046 8.81606C3.89273 9.21897 3.91315 9.85181 4.31606 10.2295L5.68394 8.77046ZM7.66667 12L6.98273 12.7295C7.36738 13.0902 7.96595 13.0902 8.35061 12.7295L7.66667 12ZM13.6839 7.72954C14.0869 7.35181 14.1073 6.71897 13.7295 6.31606C13.3518 5.91315 12.719 5.89273 12.3161 6.27046L13.6839 7.72954ZM4.31606 10.2295L6.98273 12.7295L8.35061 11.2705L5.68394 8.77046L4.31606 10.2295ZM8.35061 12.7295L13.6839 7.72954L12.3161 6.27046L6.98273 11.2705L8.35061 12.7295Z", fill: "white" })));
1402
+ const Gift$1 = () => (index.h("svg", { width: 156, height: 157, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1403
+ index.h("path", { d: "M40.18 126h83.663a3 3 0 0 0 3-3V73.966a3 3 0 0 0-3-3H40.18a3 3 0 0 0-3 3V123a3 3 0 0 0 3 3Z", fill: "#FFD34F" }),
1404
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M37.18 73.862v7.966h89.663v-7.966H37.18Z", fill: "#E9BB30" }),
1405
+ index.h("path", { d: "M133.039 74.224a2.18 2.18 0 0 0 2.187-2.172v-19.19c0-1.2-.98-2.172-2.187-2.172H31.347a2.18 2.18 0 0 0-2.187 2.172v19.19c0 1.2.98 2.172 2.187 2.172H133.04Z", fill: "#FFC000" }),
1406
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M123.287 35.172c0 6.056-9.155 15.226-13.76 15.654H88.888V126H75.141V50.826H58.534c-9.462-2.038-17.803-9.258-17.803-16.944 0-7.49 3.274-13.422 9.23-15.983 5.693-2.446 12.265-1.105 17.46 2.479 6.378 4.398 9.956 12.654 13.202 20.144.284.657.567 1.308.848 1.95.274-.608.55-1.228.83-1.856 3.216-7.22 6.887-15.464 13.057-19.89 5.454-3.913 12.387-5.39 18.38-2.711 6.197 2.77 9.549 9.127 9.549 17.157Zm-23.306-8.266c3.305-2.37 7.262-2.8 10.645 0 2.946 2.44 3.103 3.588 3.482 6.351l.067.483c0 4.09-3.549 10.252-7.097 10.252-2.515 0-4.489-.022-6.34-.041-3.375-.036-6.337-.068-11.403.04.966-1.86 1.737-3.644 2.473-5.346 1.967-4.553 3.678-8.515 8.173-11.739Zm-39.034 0c-1.6-1.103-5.268-.61-6.79.043-1.257.54-3.134 2.19-3.134 6.933 0 4.61 7.511 8.59 7.511 8.59s5.962 1.52 16.607 1.52c-3.624-8.922-8.757-13.336-14.194-17.086Z", fill: "#EB5757" }),
1407
+ index.h("path", { d: "M75.086 74.224h13.85v7.604h-13.85v-7.604Z", fill: "#DD4747" }),
1408
+ index.h("g", { filter: "url(#a)" },
1409
+ index.h("ellipse", { cx: 82.008, cy: 141.207, rx: 36.813, ry: 5.793, fill: "#E0DDDD", "fill-opacity": 0.8 })),
1410
+ index.h("path", { d: "M150.446 79.134a.5.5 0 0 1 .9 0l1.133 2.336c.05.102.132.184.234.233l2.344 1.122a.5.5 0 0 1 0 .902l-2.344 1.122a.503.503 0 0 0-.234.233l-1.133 2.336a.5.5 0 0 1-.9 0l-1.134-2.336a.499.499 0 0 0-.234-.233l-2.343-1.122a.5.5 0 0 1 0-.902l2.343-1.122a.499.499 0 0 0 .234-.233l1.134-2.336Z", fill: "#FAB6B6" }),
1411
+ index.h("path", { d: "M14.86 29.168a.5.5 0 0 1 .9 0l1.133 2.336a.5.5 0 0 0 .234.233l2.344 1.122a.5.5 0 0 1 0 .902l-2.344 1.122a.5.5 0 0 0-.234.233l-1.133 2.336a.5.5 0 0 1-.9 0l-1.134-2.336a.5.5 0 0 0-.234-.233l-2.343-1.122a.5.5 0 0 1 0-.902l2.344-1.122a.5.5 0 0 0 .233-.233l1.134-2.336Z", fill: "#F4EFBC" }),
1412
+ index.h("path", { d: "m125.382 0 .712 1.466 1.475.706-1.475.707-.712 1.466-.711-1.466-1.476-.707 1.476-.706.711-1.466Z", fill: "#FDA802" }),
1413
+ index.h("path", { d: "m2.187 103.552.711 1.466 1.476.706-1.476.707-.711 1.466-.711-1.466L0 105.724l1.476-.706.71-1.466Z", fill: "#E4599C" }),
1414
+ index.h("defs", null,
1415
+ index.h("filter", { id: "a", x: 35.195, y: 125.414, width: 93.625, height: 31.586, filterUnits: "userSpaceOnUse", "color-interpolation-filters": "s-rGB" },
1416
+ index.h("feFlood", { "flood-opacity": 0, result: "BackgroundImageFix" }),
1417
+ index.h("feBlend", { in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
1418
+ index.h("feGaussianBlur", { stdDeviation: 5, result: "effect1_foregroundBlur_653_17907" })))));
1419
+
1420
+ function Dot({ active, completed, incomplete, stage, }) {
1421
+ return (index.h("div", { style: {
1422
+ display: "flex",
1423
+ } },
1424
+ index.h("div", { style: {
1425
+ backgroundColor: completed
1426
+ ? "var(--sl-color-success-500)"
1427
+ : incomplete
1428
+ ? "var(--sl-color-neutral-200)"
1429
+ : "var(--sl-color-neutral-0)",
1430
+ border: active
1431
+ ? "1px solid var(--sl-color-success-500)"
1432
+ : incomplete
1433
+ ? "1px solid var(--sl-color-neutral-200)"
1434
+ : "1px solid var(--sl-color-success-500)",
1435
+ borderRadius: "50%",
1436
+ width: "23px",
1437
+ height: "23px",
1438
+ margin: "-11px",
1439
+ zIndex: "1",
1440
+ boxSizing: "content-box",
1441
+ } }, completed ? (index.h("div", { style: { top: "-10.5%", left: "23.5%", position: "relative" } },
1442
+ index.h(CheckMark, null))) : (index.h("div", { style: {
1443
+ color: active
1444
+ ? "var(--sl-color-success-500)"
1445
+ : "var(--sl-color-neutral-50)",
1446
+ width: "23px",
1447
+ lineHeight: "24px",
1448
+ textAlign: "center",
1449
+ position: "relative",
1450
+ } }, stage + 1)))));
1451
+ }
1452
+ function ProgressLine({ incomplete = false, active = false, invisible = false, }) {
1453
+ return (index.h("div", { style: {
1454
+ content: "''",
1455
+ flex: "0.5 0.5 0",
1456
+ height: "4px",
1457
+ borderRadius: "4px",
1458
+ background: incomplete || active
1459
+ ? "var(--sl-color-neutral-200)"
1460
+ : "var(--sl-color-success-500)",
1461
+ position: "relative",
1462
+ bottom: "0",
1463
+ left: "0",
1464
+ display: "flex",
1465
+ justifyContent: "center",
1466
+ columnGap: "50px",
1467
+ marginRight: "-2px",
1468
+ boxSizing: "content-box",
1469
+ opacity: invisible ? "0" : "1",
1470
+ } }));
1471
+ }
1472
+ function Progress({ active, completed, incomplete, stage }) {
1473
+ return [
1474
+ index.h(ProgressLine, { incomplete: incomplete, invisible: stage === 0 }),
1475
+ index.h(Dot, { active: active, completed: completed, incomplete: incomplete, stage: stage }),
1476
+ index.h(ProgressLine, { incomplete: incomplete, active: active, invisible: stage === 2 }),
1477
+ ];
1478
+ }
1479
+ function ProgressBar({ stageCount, currentStage, }) {
1480
+ return (index.h("div", { style: { display: "flex", columnGap: "-2px" } }, Array.from(Array(stageCount).keys()).map((stage) => (index.h(Progress, { active: currentStage === stage, completed: currentStage > stage, incomplete: currentStage < stage, stage: stage })))));
1481
+ }
1482
+
1483
+ const stageList = ["chooseReward", "chooseAmount", "confirmation", "success"];
1484
+ function RewardExchangeView(props) {
1485
+ const { states, data, callbacks, refs } = props;
1486
+ const { selectedItem, selectedStep } = states;
1487
+ const stageProgressList = {
1488
+ chooseReward: states.content.text.chooseRewardTitle,
1489
+ chooseAmount: states.content.text.chooseAmountTitle,
1490
+ confirmation: states.content.text.confirmationTitle,
1491
+ };
1492
+ const style = {
1493
+ HostBlock: mixins.HostBlock,
1494
+ Container: {
1495
+ minWidth: "300px",
1496
+ position: "relative",
1497
+ },
1498
+ FullImage: {
1499
+ objectFit: "contain",
1500
+ maxWidth: "100%",
1501
+ height: "250px",
1502
+ display: "flex",
1503
+ margin: "0 auto",
1504
+ },
1505
+ Select: {
1506
+ "&::part(label)": {
1507
+ color: "var(--sl-color-primary-500)",
1508
+ },
1509
+ "&::part(menu)": {
1510
+ maxHeight: "50vh",
1511
+ },
1512
+ "& sl-menu-item::part(checked-icon)": {
1513
+ top: "8px",
1514
+ },
1515
+ "& sl-menu-item::part(base)": {
1516
+ flexDirection: "column",
1517
+ },
1518
+ "& sl-menu-item::part(base):focus": {
1519
+ background: "transparent",
1520
+ color: "var(--sl-color-gray-700)",
1521
+ },
1522
+ },
1523
+ ProgressBar: {
1524
+ maxWidth: "350px",
1525
+ width: "100%",
1526
+ margin: "auto",
1527
+ marginBottom: "var(--sl-spacing-xxx-large)",
1528
+ "& .text-area": {
1529
+ marginTop: "5px",
1530
+ display: "flex",
1531
+ justifyContent: "center",
1532
+ textAlign: "center",
1533
+ whiteSpace: "nowrap",
1534
+ marginBottom: "6px",
1535
+ "& .text": {
1536
+ marginBottom: "var(--sl-spacing-x-small)",
1537
+ flex: "1 1 0",
1538
+ },
1539
+ "& .text.subdued": {
1540
+ color: "var(--sl-color-neutral-200)",
1541
+ },
1542
+ },
1543
+ },
1544
+ CardLayout: {
1545
+ display: "flex",
1546
+ width: "100%",
1547
+ borderRadius: "3px",
1548
+ background: "rgba(0, 0, 0, 0)",
1549
+ },
1550
+ Card: {
1551
+ display: "flex",
1552
+ userSelect: "none",
1553
+ height: "120px",
1554
+ "&::part(base)": {
1555
+ boxShadow: "none",
1556
+ width: "100%",
1557
+ },
1558
+ "&::part(body)": {
1559
+ display: "flex",
1560
+ padding: 0,
1561
+ },
1562
+ "& .selected": {
1563
+ position: "relative",
1564
+ top: "-2%",
1565
+ left: "100%",
1566
+ color: "var(--sl-color-primary-500)",
1567
+ margin: "-9px",
1568
+ },
1569
+ },
1570
+ Image: {
1571
+ padding: "var(--sl-spacing-small)",
1572
+ minWidth: "96px",
1573
+ maxWidth: "96px",
1574
+ "& .image": {
1575
+ width: "100%",
1576
+ height: "100%",
1577
+ objectFit: "contain",
1578
+ borderRadius: "4px",
1579
+ },
1580
+ "& .image.subdued": {
1581
+ filter: "brightness(0.95)",
1582
+ opacity: "0.5",
1583
+ },
1584
+ },
1585
+ Square: {
1586
+ width: "120px",
1587
+ height: "118px",
1588
+ borderRadius: "3px 0 0 3px",
1589
+ "& .image": {
1590
+ width: "100%",
1591
+ height: "100%",
1592
+ objectFit: "contain",
1593
+ borderRadius: "inherit",
1594
+ },
1595
+ },
1596
+ TextArea: {
1597
+ textAlign: "left",
1598
+ padding: "var(--sl-spacing-small)",
1599
+ paddingLeft: "0",
1600
+ "& .title": {
1601
+ fontSize: "var(--sl-font-size-medium)",
1602
+ lineHeight: "var(--sl-line-height-dense)",
1603
+ fontWeight: "600",
1604
+ color: "var(--sl-color-neutral-1000)",
1605
+ display: "-webkit-box",
1606
+ "-webkit-line-clamp": "1",
1607
+ "-webkit-box-orient": "vertical",
1608
+ overflow: "hidden",
1609
+ },
1610
+ "& .amount": {
1611
+ fontSize: "var(--sl-font-size-small)",
1612
+ lineHeight: "var(--sl-line-height-dense)",
1613
+ marginTop: "var(--sl-spacing-x-small)",
1614
+ color: "var(--sl-color-neutral-500)",
1615
+ display: "-webkit-box",
1616
+ "-webkit-line-clamp": "1",
1617
+ "-webkit-box-orient": "vertical",
1618
+ overflow: "hidden",
1619
+ },
1620
+ "& .error": {
1621
+ fontSize: "var(--sl-font-size-small)",
1622
+ lineHeight: "var(--sl-line-height-dense)",
1623
+ marginTop: "var(--sl-spacing-x-small)",
1624
+ fontWeight: "600",
1625
+ color: "var(--sl-color-warning-600)",
1626
+ display: "-webkit-box",
1627
+ "-webkit-line-clamp": "1",
1628
+ "-webkit-box-orient": "vertical",
1629
+ overflow: "hidden",
1630
+ "& .icon": {
1631
+ position: "relative",
1632
+ top: "0.1em",
1633
+ marginRight: "var(--sl-spacing-xx-small)",
1634
+ },
1635
+ },
1636
+ },
1637
+ ChooseAmount: {
1638
+ display: "flex",
1639
+ alignItems: "center",
1640
+ justifyContent: "center",
1641
+ margin: "var(--sl-spacing-medium) 0",
1642
+ "& .wrapper": {
1643
+ display: "flex",
1644
+ justifyContent: "center",
1645
+ alignItems: "center",
1646
+ gap: "var(--sl-spacing-xx-large)",
1647
+ "@media (max-width: 799px)": {
1648
+ flexDirection: "column",
1649
+ },
1650
+ },
1651
+ "& .image": {
1652
+ width: "50%",
1653
+ objectFit: "contain",
1654
+ maxWidth: "100%",
1655
+ height: "250px",
1656
+ display: "flex",
1657
+ "@media (max-width: 799px)": {
1658
+ width: "auto",
1659
+ },
1660
+ },
1661
+ "& .text": {
1662
+ width: "50%",
1663
+ maxWidth: "400px",
1664
+ "@media (max-width: 799px)": {
1665
+ width: "auto",
1666
+ margin: "auto",
1667
+ },
1668
+ },
1669
+ "& .title": {
1670
+ fontSize: "var(--sl-font-size-large)",
1671
+ fontWeight: "var(--sl-font-weight-semibold)",
1672
+ color: "var(--sl-color-neutral-1000)",
1673
+ },
1674
+ "& .points": {
1675
+ fontSize: "var(--sl-font-size-large)",
1676
+ fontWeight: "var(--sl-font-weight-semibold)",
1677
+ color: "var(--sl-color-primary-500)",
1678
+ },
1679
+ "& .description": {
1680
+ fontSize: "var(--sl-font-size-medium)",
1681
+ fontWeight: "var(--sl-font-weight-normal)",
1682
+ color: "var(--sl-color-neutral-500)",
1683
+ margin: "var(--sl-spacing-medium) 0",
1684
+ lineHeight: "var(--sl-line-height-dense)",
1685
+ marginTop: "var(--sl-spacing-xx-small)",
1686
+ },
1687
+ "& .space": {
1688
+ marginBottom: "var(--sl-spacing-xxx-large)",
1689
+ },
1690
+ "& sl-menu-item[disabled]::part(label)": {
1691
+ color: "var(--sl-color-neutral-200)",
1692
+ },
1693
+ "& sl-menu-item[disabled]": {
1694
+ "& .step-cost": {
1695
+ color: "var(--sl-color-neutral-200)",
1696
+ },
1697
+ },
1698
+ },
1699
+ SelectItem: {
1700
+ display: "flex",
1701
+ flexDirection: "column",
1702
+ "& > .step-cost": {
1703
+ color: "var(--sl-color-neutral-400)",
1704
+ height: "0",
1705
+ marginBottom: "5px",
1706
+ },
1707
+ "& > .step-value": {
1708
+ margin: "0",
1709
+ },
1710
+ },
1711
+ Success: {
1712
+ textAlign: "center",
1713
+ "& .title": {
1714
+ fontSize: "var(--sl-font-size-large)",
1715
+ fontWeight: "var(--sl-font-weight-semibold)",
1716
+ color: "var(--sl-color-neutral-1000)",
1717
+ },
1718
+ "& .description": {
1719
+ color: "var(--sl-color-neutral-400)",
1720
+ width: "100%",
1721
+ maxWidth: "350px",
1722
+ margin: "0 auto",
1723
+ lineHeight: "var(--sl-line-height-dense)",
1724
+ marginBottom: "var(--sl-spacing-xx-large)",
1725
+ marginTop: "var(--sl-spacing-xx-small)",
1726
+ },
1727
+ },
1728
+ Grid: {
1729
+ display: "grid",
1730
+ justifyContent: "center",
1731
+ gap: "20px",
1732
+ gridTemplateColumns: "repeat(auto-fill, minmax(300px, 1fr))",
1733
+ },
1734
+ Confirmation: {
1735
+ maxWidth: "800px",
1736
+ margin: "auto",
1737
+ "& .wrapper": {
1738
+ display: "flex",
1739
+ "@media (max-width: 499px)": {
1740
+ flexDirection: "column",
1741
+ },
1742
+ },
1743
+ "& .reward-item-container": {
1744
+ "@media (max-width: 499px)": {
1745
+ display: "flex",
1746
+ flexDirection: "row-reverse",
1747
+ justifyContent: "flex-end",
1748
+ alignItems: "center",
1749
+ },
1750
+ },
1751
+ "& .reward-item-container .reward-title": {
1752
+ paddingBottom: "var(--sl-spacing-medium)",
1753
+ lineHeight: "20px",
1754
+ "@media (max-width: 499px)": {
1755
+ paddingBottom: "none",
1756
+ paddingLeft: "var(--sl-spacing-small)",
1757
+ },
1758
+ },
1759
+ "& .padding": {
1760
+ padding: "var(--sl-spacing-medium) 0",
1761
+ "@media (max-width: 499px)": {
1762
+ padding: "var(--sl-spacing-small) 0",
1763
+ },
1764
+ },
1765
+ "& .field": {
1766
+ width: "30%",
1767
+ textTransform: "uppercase",
1768
+ fontSize: "var(--sl-font-size-medium)",
1769
+ fontWeight: "var(--sl-font-weight-normal)",
1770
+ color: "var(--sl-color-neutral-400)",
1771
+ textAlign: "left",
1772
+ paddingRight: "var(--sl-spacing-xxx-large)",
1773
+ "@media (max-width: 499px)": {
1774
+ width: "100%",
1775
+ paddingRight: "0",
1776
+ paddingBottom: "0",
1777
+ },
1778
+ },
1779
+ "& .value": {
1780
+ fontSize: "var(--sl-font-size-large)",
1781
+ fontWeight: "var(--sl-font-weight-semibold)",
1782
+ },
1783
+ "& .top-border": {
1784
+ borderTop: "1px solid var(--sl-color-neutral-200)",
1785
+ },
1786
+ "& .image": {
1787
+ width: "200px",
1788
+ "@media (max-width: 499px)": {
1789
+ width: "100px",
1790
+ },
1791
+ },
1792
+ },
1793
+ Button: {
1794
+ display: "flex",
1795
+ flexWrap: "wrap-reverse",
1796
+ margin: "var(--sl-spacing-medium) 0",
1797
+ "& .cancel": {
1798
+ marginLeft: "auto",
1799
+ marginRight: "var(--sl-spacing-medium)",
1800
+ "&::part(base)": {
1801
+ fontWeight: "var(--sl-font-weight-normal)",
1802
+ color: "var(--sl-color-neutral-1000)",
1803
+ },
1804
+ "@media (max-width: 499px)": {
1805
+ width: "100%",
1806
+ marginRight: "0",
1807
+ marginTop: "var(--sl-spacing-small)",
1808
+ },
1809
+ },
1810
+ "& .continue": {
1811
+ "&::part(base)": {
1812
+ background: "var(--sl-color-primary-500)",
1813
+ borderColor: "var(--sl-color-primary-500)",
1814
+ fontWeight: "var(--sl-font-weight-normal)",
1815
+ color: "var(--sl-color-neutral-0)",
1816
+ },
1817
+ "@media (max-width: 499px)": {
1818
+ width: "100%",
1819
+ },
1820
+ },
1821
+ "& .continue.right": {
1822
+ marginLeft: "auto",
1823
+ },
1824
+ "& .continue.center": {
1825
+ margin: "0 auto",
1826
+ },
1827
+ },
1828
+ Confetti: {
1829
+ pointerEvents: "none",
1830
+ position: "absolute",
1831
+ width: "100%",
1832
+ height: "100%",
1833
+ top: "0%",
1834
+ left: "0%",
1835
+ zIndex: "1",
1836
+ },
1837
+ };
1838
+ // JSS config
1839
+ const sheet = JSS.createStyleSheet(style);
1840
+ const styleString = sheet.toString();
1841
+ function getInput() {
1842
+ var _a, _b, _c;
1843
+ const item = states.selectedItem;
1844
+ if (!item || (item === null || item === void 0 ? void 0 : item.ruleType) === "FIXED_GLOBAL_REWARD")
1845
+ return index.h("span", null, item === null || item === void 0 ? void 0 : item.prettySourceValue);
1846
+ if (!((_a = item.steps) === null || _a === void 0 ? void 0 : _a.length)) {
1847
+ return (index.h("p", null, global.intl.formatMessage({
1848
+ id: "notEnoughError",
1849
+ defaultMessage: states.content.text.notEnoughError,
1850
+ }, {
1851
+ sourceUnit: item.sourceUnit,
1852
+ })));
1853
+ }
1854
+ console.log("SELECTED ITEM ", states.selectedStep);
1855
+ console.log("CALLBACKS ", callbacks);
1856
+ return (index.h("sl-select", { style: { width: "auto" }, label: (_b = states === null || states === void 0 ? void 0 : states.content) === null || _b === void 0 ? void 0 : _b.text.selectText, class: sheet.classes.Select, value: states.selectedStep, "onSl-select": (e) => {
1857
+ var _a, _b, _c, _d, _e;
1858
+ return callbacks.setExchangeState({
1859
+ amount: (_c = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.value) === null || _c === void 0 ? void 0 : _c.sourceValue,
1860
+ selectedStep: (_e = (_d = e.detail) === null || _d === void 0 ? void 0 : _d.item) === null || _e === void 0 ? void 0 : _e.value,
1861
+ });
1862
+ } }, (_c = item.steps) === null || _c === void 0 ? void 0 : _c.map((step) => {
1863
+ var _a, _b;
1864
+ console.log(item.steps);
1865
+ return (index.h("sl-menu-item", { value: step.prettyDestinationValue, disabled: !step.available },
1866
+ step.prettyDestinationValue,
1867
+ " ",
1868
+ index.h("br", null),
1869
+ step.unavailableReasonCode && (index.h("p", { style: {
1870
+ fontSize: "var(--sl-font-size-small)",
1871
+ color: "var(--sl-color-warning-500)",
1872
+ margin: "0",
1873
+ } }, global.intl.formatMessage({
1874
+ id: "unavailableCode",
1875
+ defaultMessage: (_b = (_a = states.content) === null || _a === void 0 ? void 0 : _a.text) === null || _b === void 0 ? void 0 : _b.notAvailableError,
1876
+ }, {
1877
+ unavailableReasonCode: step.unavailableReasonCode,
1878
+ sourceUnit: item.sourceUnit,
1879
+ sourceValue: step.prettySourceValue || item.prettySourceMinValue,
1880
+ }))),
1881
+ index.h("div", { class: "step-cost", slot: "suffix" }, step.prettySourceValue)));
1882
+ })));
1883
+ }
1884
+ function chooseReward() {
1885
+ var _a;
1886
+ return [
1887
+ index.h("div", null,
1888
+ index.h("h2", { style: { margin: "var(--sl-spacing-large) 0" } }, states.content.text.rewardTitle),
1889
+ states.loading ? (loading()) : (index.h("div", { class: sheet.classes.Grid }, (_a = data.exchangeList) === null || _a === void 0 ? void 0 : _a.map((item) => {
1890
+ var _a, _b, _c, _d, _e;
1891
+ const style = {
1892
+ boxShadow: item.key === (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.key)
1893
+ ? "0 0 0 2px var(--sl-color-primary-500)"
1894
+ : "none",
1895
+ borderRadius: "4px",
1896
+ };
1897
+ return (index.h("div", { key: item.key, style: style },
1898
+ index.h("sl-card", { class: sheet.classes.Card, style: {
1899
+ cursor: item.unavailableReasonCode
1900
+ ? "not-allowed"
1901
+ : "pointer",
1902
+ }, onClick: () => item.available &&
1903
+ callbacks.setExchangeState({ selectedItem: item }) },
1904
+ item.key === (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.key) && (index.h("div", { class: "selected" },
1905
+ index.h(CheckmarkFilled, null))),
1906
+ index.h("div", { style: {
1907
+ display: "flex",
1908
+ width: "100%",
1909
+ height: "120px",
1910
+ borderRadius: "3px",
1911
+ background: item.unavailableReasonCode
1912
+ ? "rgba(0, 0, 0, 0.05)"
1913
+ : "rgba(0, 0, 0, 0)",
1914
+ } },
1915
+ index.h("div", { class: sheet.classes.Image, style: {
1916
+ opacity: item.unavailableReasonCode ? "0.5" : "1",
1917
+ } },
1918
+ index.h("img", { class: item.unavailableReasonCode
1919
+ ? "image subdued"
1920
+ : "image", src: (item === null || item === void 0 ? void 0 : item.imageUrl) ||
1921
+ index.getAssetPath("./assets/Reward-image.png") })),
1922
+ index.h("div", { class: sheet.classes.TextArea, style: {
1923
+ opacity: item.unavailableReasonCode ? "0.5" : "1",
1924
+ } },
1925
+ index.h("div", { class: "title", style: {
1926
+ "-webkit-line-clamp": item.unavailableReasonCode
1927
+ ? "1"
1928
+ : "2",
1929
+ } }, (_a = item.name) !== null && _a !== void 0 ? _a : ""),
1930
+ index.h("div", { class: "amount", style: {
1931
+ "-webkit-line-clamp": item.unavailableReasonCode
1932
+ ? "1"
1933
+ : "2",
1934
+ } }, global.intl.formatMessage({
1935
+ id: "sourceAmountMessage",
1936
+ defaultMessage: (_c = (_b = states.content) === null || _b === void 0 ? void 0 : _b.text) === null || _c === void 0 ? void 0 : _c.sourceAmountMessage,
1937
+ }, {
1938
+ ruleType: item.ruleType,
1939
+ sourceValue: item.prettySourceValue,
1940
+ sourceMinValue: item.prettySourceMinValue,
1941
+ sourceMaxValue: item.prettySourceMaxValue,
1942
+ })),
1943
+ item.unavailableReasonCode && (index.h("div", { class: "error" },
1944
+ index.h("sl-icon", { class: "icon", name: "exclamation-triangle-fill" }),
1945
+ global.intl.formatMessage({
1946
+ id: "unavailableCode",
1947
+ defaultMessage: (_e = (_d = states.content) === null || _d === void 0 ? void 0 : _d.text) === null || _e === void 0 ? void 0 : _e.notAvailableError,
1948
+ }, {
1949
+ unavailableReasonCode: item.unavailableReasonCode,
1950
+ sourceUnit: item.sourceUnit,
1951
+ sourceValue: item.prettySourceValue ||
1952
+ item.prettySourceMinValue,
1953
+ }))))))));
1954
+ }))),
1955
+ index.h("div", { class: sheet.classes.Button },
1956
+ index.h("sl-button", { class: "continue right", size: "large", onClick: () => callbacks.setStage("chooseAmount"), loading: states.loading, disabled: !states.selectedItem }, states.content.text.continueText))),
1957
+ ];
1958
+ }
1959
+ function chooseAmount() {
1960
+ var _a, _b, _c, _d;
1961
+ const input = getInput();
1962
+ const isDisabled = ((_a = states.selectedItem) === null || _a === void 0 ? void 0 : _a.ruleType) === "FIXED_GLOBAL_REWARD"
1963
+ ? false
1964
+ : input && !states.amount;
1965
+ return (index.h("div", null,
1966
+ index.h("div", { class: sheet.classes.ChooseAmount },
1967
+ index.h("div", { class: "wrapper" },
1968
+ index.h("img", { class: "image", src: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) ||
1969
+ index.getAssetPath("./assets/Reward-image.png") }),
1970
+ index.h("div", { class: "text" },
1971
+ index.h("div", { class: "title" }, (_b = selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.name) !== null && _b !== void 0 ? _b : ""),
1972
+ ((_c = states.selectedItem) === null || _c === void 0 ? void 0 : _c.ruleType) === "FIXED_GLOBAL_REWARD" ? (index.h("div", { class: "points" }, input)) : (index.h("div", { class: "description" }, selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.description)),
1973
+ ((_d = states.selectedItem) === null || _d === void 0 ? void 0 : _d.ruleType) === "FIXED_GLOBAL_REWARD" ? (index.h("div", { class: "description" }, selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.description)) : (index.h("div", { class: "points" }, input)),
1974
+ index.h("div", { class: "space" }),
1975
+ index.h("div", { class: sheet.classes.Button },
1976
+ index.h("sl-button", { class: "cancel", size: "large", type: "text", onClick: () => callbacks.resetState() }, states.content.text.cancelText),
1977
+ index.h("sl-button", { class: "continue", size: "large", onClick: () => callbacks.setStage("confirmation"), disabled: isDisabled }, states.content.text.continueToConfirmationText)))))));
1978
+ }
1979
+ function confirmation() {
1980
+ console.log(selectedItem);
1981
+ console.log(selectedStep);
1982
+ const cost = (selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettySourceValue) || selectedItem.prettySourceValue;
1983
+ const amount = selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettyDestinationValue;
1984
+ return (index.h("div", null,
1985
+ index.h("h2", { style: { margin: "var(--sl-spacing-large) 0", textAlign: "center" } }, states.content.text.redeemTitle),
1986
+ index.h("div", { class: sheet.classes.Confirmation },
1987
+ index.h("div", { class: "wrapper" },
1988
+ index.h("div", { class: "field" }, states.content.text.rewardNameTitle),
1989
+ index.h("div", { class: "reward-item-container" },
1990
+ index.h("div", { class: "reward-title" }, selectedItem.name),
1991
+ index.h("img", { class: "image", src: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) ||
1992
+ index.getAssetPath("./assets/Reward-image.png") }))),
1993
+ index.h("div", { class: "wrapper padding" },
1994
+ index.h("div", { class: "field" })),
1995
+ amount && (index.h("div", { class: "wrapper top-border padding" },
1996
+ index.h("div", { class: "field" }, states.content.text.rewardAmountTitle),
1997
+ index.h("div", null, amount))),
1998
+ index.h("div", { class: "wrapper top-border padding" },
1999
+ index.h("div", { class: "field" }, states.content.text.costTitle),
2000
+ index.h("div", { class: "value" }, cost)),
2001
+ index.h("div", { class: sheet.classes.Button },
2002
+ index.h("sl-button", { class: "cancel", type: "text", size: "large", onClick: () => callbacks.setStage("chooseAmount") }, states.content.text.backText),
2003
+ index.h("sl-button", { class: "continue", size: "large", loading: states.loading, onClick: callbacks.exchangeReward }, states.content.text.redeemText)))));
2004
+ }
2005
+ function success() {
2006
+ var _a, _b, _c, _d, _e;
2007
+ console.log("success");
2008
+ return (index.h("div", { class: sheet.classes.Success },
2009
+ index.h(Gift$1, null),
2010
+ index.h(Confetti, null),
2011
+ index.h("div", { class: "title" }, states.content.text.rewardRedeemedText),
2012
+ index.h("div", { class: "description" }, global.intl.formatMessage({
2013
+ id: "successMessage",
2014
+ defaultMessage: states.content.text.redemptionSuccessText,
2015
+ }, {
2016
+ sourceValue: (_a = states.selectedItem.prettySourceValue) !== null && _a !== void 0 ? _a : (_b = states.selectedStep) === null || _b === void 0 ? void 0 : _b.prettySourceValue,
2017
+ destinationValue: ((_c = states.selectedStep) === null || _c === void 0 ? void 0 : _c.prettyDestinationValue) || ((_d = states.selectedItem) === null || _d === void 0 ? void 0 : _d.name) ||
2018
+ states.selectedItem.globalRewardKey,
2019
+ })),
2020
+ (data === null || data === void 0 ? void 0 : data.fuelTankCode) && (index.h("div", { style: {
2021
+ width: "40%",
2022
+ margin: "-30px auto var(--sl-spacing-xxx-large) auto",
2023
+ textAlign: "left",
2024
+ color: "var(--sl-color-neutral-700)",
2025
+ } },
2026
+ states.content.text.promoCode,
2027
+ index.h(ShareLinkView, { shareString: data.fuelTankCode, tooltiptext: (_e = states === null || states === void 0 ? void 0 : states.content) === null || _e === void 0 ? void 0 : _e.text.toopTipText, open: states.open, onClick: callbacks.copyFuelTankCode }))),
2028
+ index.h("div", { class: sheet.classes.Button },
2029
+ index.h("sl-button", { class: "continue center", type: "primary", size: "large", onClick: () => callbacks.resetState(true) }, states.content.text.doneText))));
2030
+ }
2031
+ const stages = {
2032
+ chooseReward: () => chooseReward(),
2033
+ chooseAmount: () => chooseAmount(),
2034
+ confirmation: () => confirmation(),
2035
+ success: () => success(),
2036
+ };
2037
+ const currentStage = stages[states.redeemStage];
2038
+ function stageMap() {
2039
+ const stageNumber = stageList.indexOf(states.redeemStage);
2040
+ return (index.h("div", { class: sheet.classes.ProgressBar },
2041
+ index.h("div", { class: "text-area" }, Object.keys(stageProgressList).map((stage) => {
2042
+ if (stageList.indexOf(stage) <= stageNumber) {
2043
+ return index.h("span", { class: "text" }, stageProgressList[stage]);
2044
+ }
2045
+ else {
2046
+ return (index.h("span", { class: "text subdued" }, stageProgressList[stage]));
2047
+ }
2048
+ })),
2049
+ index.h(ProgressBar, { stageCount: 3, currentStage: stageNumber })));
2050
+ }
2051
+ function loading() {
2052
+ return (index.h("div", { class: sheet.classes.Grid }, [...Array(states.content.text.skeletonCardNum)].map(() => {
2053
+ return (index.h("div", null,
2054
+ index.h("sl-card", { class: sheet.classes.Card },
2055
+ index.h("div", { class: sheet.classes.CardLayout },
2056
+ index.h("div", null,
2057
+ index.h("sl-skeleton", { style: {
2058
+ width: "100px",
2059
+ height: "100px",
2060
+ margin: "9px",
2061
+ "--border-radius": "4px",
2062
+ } })),
2063
+ index.h("div", { style: {
2064
+ margin: "var(--sl-spacing-small) var(--sl-spacing-small) 0 0",
2065
+ width: "100%",
2066
+ } },
2067
+ index.h("sl-skeleton", { style: { marginBottom: "var(--sl-spacing-small)" } }),
2068
+ index.h("sl-skeleton", { style: { marginBottom: "var(--sl-spacing-small)" } }),
2069
+ index.h("sl-skeleton", { style: { width: "45%" } }))))));
2070
+ })));
2071
+ }
2072
+ function errorMessage() {
2073
+ return (index.h("sl-alert", { type: "danger", open: true },
2074
+ index.h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
2075
+ states.content.text.redemptionError));
2076
+ }
2077
+ function queryErrorMessage() {
2078
+ return (index.h("sl-alert", { type: "danger", open: true },
2079
+ index.h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
2080
+ states.content.text.queryError));
2081
+ }
2082
+ function Confetti() {
2083
+ return (index.h("canvas", { ref: (canvas) => {
2084
+ if (!(refs === null || refs === void 0 ? void 0 : refs.canvasRef))
2085
+ return;
2086
+ refs.canvasRef.current = canvas;
2087
+ }, id: "my-canvas", class: sheet.classes.Confetti }));
2088
+ }
2089
+ return (index.h("div", { class: sheet.classes.Container },
2090
+ index.h("style", { type: "text/css" }, styleString),
2091
+ index.h("div", null,
2092
+ console.log(props),
2093
+ stageMap(),
2094
+ states.exchangeError && errorMessage(),
2095
+ states.queryError && queryErrorMessage(),
2096
+ currentStage && currentStage(),
2097
+ states.redeemStage === "success")));
2098
+ }
2099
+
2100
+ function CardFeedView(props, children) {
2101
+ const style = {
2102
+ Container: {
2103
+ columnGap: props.gap + "px",
2104
+ columnWidth: props.width + "px",
2105
+ "& > div": {
2106
+ marginBottom: "24px",
2107
+ },
2108
+ },
2109
+ };
2110
+ const sheet = JSS.createStyleSheet(style);
2111
+ const styleString = sheet.toString();
2112
+ console.log(props);
2113
+ const vanillaStyle = `
2114
+ :host{
2115
+ display: block;
2116
+ }
2117
+
2118
+ `;
2119
+ return (index.h("div", null,
2120
+ index.h("style", { type: "text/css" },
2121
+ styleString,
2122
+ vanillaStyle),
2123
+ index.h("div", { class: sheet.classes.Container }, children)));
2124
+ }
2125
+
2126
+ function t(t,n,r){return Math.min(Math.max(t,r),n)}class n extends Error{constructor(t){super(`Failed to parse color: "${t}"`);}}function r(r){if("string"!=typeof r)throw new n(r);if("transparent"===r.trim().toLowerCase())return [0,0,0,0];let e=r.trim();e=u.test(r)?function(t){const r=t.toLowerCase().trim(),e=o[function(t){let n=5381,r=t.length;for(;r;)n=33*n^t.charCodeAt(--r);return (n>>>0)%2341}(r)];if(!e)throw new n(t);return `#${e}`}(r):r;const f=s.exec(e);if(f){const t=Array.from(f).slice(1);return [...t.slice(0,3).map(t=>parseInt(_(t,2),16)),parseInt(_(t[3]||"f",2),16)/255]}const p=i.exec(e);if(p){const t=Array.from(p).slice(1);return [...t.slice(0,3).map(t=>parseInt(t,16)),parseInt(t[3]||"ff",16)/255]}const z=a.exec(e);if(z){const t=Array.from(z).slice(1);return [...t.slice(0,3).map(t=>parseInt(t,10)),parseFloat(t[3]||"1")]}const h=c.exec(e);if(h){const[e,o,_,s]=Array.from(h).slice(1).map(parseFloat);if(t(0,100,o)!==o)throw new n(r);if(t(0,100,_)!==_)throw new n(r);return [...l(e,o,_),s||1]}throw new n(r)}const e=t=>parseInt(t.replace(/_/g,""),36),o="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((t,n)=>{const r=e(n.substring(0,3)),o=e(n.substring(3)).toString(16);let _="";for(let t=0;t<6-o.length;t++)_+="0";return t[r]=`${_}${o}`,t},{}),_=(t,n)=>Array.from(Array(n)).map(()=>t).join(""),s=new RegExp(`^#${_("([a-f0-9])",3)}([a-f0-9])?$`,"i"),i=new RegExp(`^#${_("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),a=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${_(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),c=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,u=/^[a-z]+$/i,f=t=>Math.round(255*t),l=(t,n,r)=>{let e=r/100;if(0===n)return [e,e,e].map(f);const o=(t%360+360)%360/60,_=(1-Math.abs(2*e-1))*(n/100),s=_*(1-Math.abs(o%2-1));let i=0,a=0,c=0;o>=0&&o<1?(i=_,a=s):o>=1&&o<2?(i=s,a=_):o>=2&&o<3?(a=_,c=s):o>=3&&o<4?(a=s,c=_):o>=4&&o<5?(i=s,c=_):o>=5&&o<6&&(i=_,c=s);const u=e-_/2;return [i+u,a+u,c+u].map(f)};function p(t){const[n,e,o,_]=r(t).map((t,n)=>3===n?t:t/255),s=Math.max(n,e,o),i=Math.min(n,e,o),a=(s+i)/2;if(s===i)return [0,0,a,_];const c=s-i;return [60*(n===s?(e-o)/c+(e<o?6:0):e===s?(o-n)/c+2:(n-e)/c+4),a>.5?c/(2-s-i):c/(s+i),a,_]}function z(n,r,e,o){return `hsla(${(n%360).toFixed()}, ${t(0,100,100*r).toFixed()}%, ${t(0,100,100*e).toFixed()}%, ${parseFloat(t(0,1,o).toFixed(3))})`}
2127
+
2128
+ const colorScale = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
2129
+ const lScale = [
2130
+ 0.95,
2131
+ 0.86,
2132
+ 0.76,
2133
+ 0.66,
2134
+ 0.56,
2135
+ 0.46,
2136
+ 0.39,
2137
+ 0.32,
2138
+ 0.25,
2139
+ 0.18,
2140
+ 0.15,
2141
+ ];
2142
+ // https://github.com/ricokahler/color2k/blob/main/src/parseToRgba.ts
2143
+ const hslaRegex = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i;
2144
+ function niceParseToHsla(color) {
2145
+ const normalizedColor = color.trim();
2146
+ const hslaMatch = hslaRegex.exec(normalizedColor);
2147
+ if (hslaMatch) {
2148
+ const [h, s, l, a] = Array.from(hslaMatch).slice(1).map(parseFloat);
2149
+ if (t(0, 100, s) !== s)
2150
+ throw new n(color);
2151
+ if (t(0, 100, l) !== l)
2152
+ throw new n(color);
2153
+ return [h, s / 100, l, a || 1];
2154
+ }
2155
+ // Warning -- converts to RGB first, so is lossy
2156
+ return p(color);
2157
+ }
2158
+ function generateScale(color, name = "primary") {
2159
+ const [h, s, l, a] = niceParseToHsla(color);
2160
+ return lScale
2161
+ .map((l) => z(h, s, l, a))
2162
+ .map((color, index) => {
2163
+ return `--sl-color-${name}-${colorScale[index]}: ${color};\n`;
2164
+ });
2165
+ }
2166
+ /**
2167
+ * Generated a Shoelace color scale css string from a base color
2168
+ *
2169
+ * @param color
2170
+ * @param name
2171
+ * @returns
2172
+ */
2173
+ function autoColorScaleCss(color, name = "primary") {
2174
+ return generateScale(color, name).join("\n");
2175
+ }
2176
+
2177
+ const map = new Map();
2178
+ function withShadowView(component) {
2179
+ // TODO: Could only do this if rendered in a Stencilbook environment to prevent unintended side-effects
2180
+ const element = index.getElement(component);
2181
+ let renderFn = component["render"].bind(component);
2182
+ const newRenderFn = () => {
2183
+ const key = element.getAttribute("stencilbook-shadow-view");
2184
+ if (key) {
2185
+ const value = map.get(key);
2186
+ if (value) {
2187
+ return value;
2188
+ }
2189
+ }
2190
+ return renderFn();
2191
+ };
2192
+ component["render"] = newRenderFn;
2193
+ }
2194
+ /**
2195
+ * Any story that defines `parameters.tagname` will be used as a wrapper component around the view
2196
+ */
2197
+ const ShadowViewAddon = ({ story }, children) => {
2198
+ var _a;
2199
+ let TagName = (_a = story.parent.parameters) === null || _a === void 0 ? void 0 : _a.tagname;
2200
+ if (!TagName)
2201
+ return children;
2202
+ const randomInt = Math.round(Math.random() * 100000);
2203
+ map.set(randomInt + "", children);
2204
+ const RandomTagName = "stencilbook-shawdow-view-" + randomInt;
2205
+ // This will only re-render when the tag name changes, so we use a random tag name every time.
2206
+ // Altneratively we could try to trick Stencil to call `forceUpdate` every time.
2207
+ return (index.h(RandomTagName, null,
2208
+ index.h(TagName, { "stencilbook-shadow-view": randomInt })));
2209
+ };
2210
+
2211
+ exports.CardFeedView = CardFeedView;
2212
+ exports.EditProfileView = EditProfileView;
2213
+ exports.LeaderboardView = LeaderboardView;
2214
+ exports.PortalChangePasswordView = PortalChangePasswordView;
2215
+ exports.PortalFrameView = PortalFrameView;
2216
+ exports.PortalLoginView = PortalLoginView;
2217
+ exports.PortalRegisterView = PortalRegisterView;
2218
+ exports.ProgressBarView = ProgressBarView;
2219
+ exports.ReferralIframeView = ReferralIframeView;
2220
+ exports.RewardExchangeView = RewardExchangeView;
2221
+ exports.ShadowViewAddon = ShadowViewAddon;
2222
+ exports.ShareButtonView = ShareButtonView;
2223
+ exports.ShareLinkView = ShareLinkView;
2224
+ exports.TaskCardView = TaskCardView;
2225
+ exports.autoColorScaleCss = autoColorScaleCss;
2226
+ exports.useShareButton = useShareButton;
2227
+ exports.useShareLink = useShareLink;
2228
+ exports.withShadowView = withShadowView;