@saasquatch/mint-components 1.5.0-9 → 1.5.0-93

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 (802) hide show
  1. package/CHANGELOG.md +156 -24
  2. package/dist/cjs/GenericTableView-8e84d356.js +115 -0
  3. package/dist/cjs/{jss-preset-default.esm-6304d24f.js → JSS-c65a40f1.js} +5 -3
  4. package/dist/cjs/ShadowViewAddon-afd1f678.js +2619 -0
  5. package/dist/cjs/extends-08099afd.js +21 -0
  6. package/dist/cjs/{global-89f66e76.js → global-4c495d76.js} +80 -140
  7. package/dist/cjs/{index.module-c0bf9df0.js → index.module-54724339.js} +51 -50
  8. package/dist/cjs/loader.cjs.js +6 -5
  9. package/dist/cjs/luxon-59ca7d19.js +8348 -0
  10. package/dist/cjs/mint-components.cjs.js +6 -5
  11. package/dist/cjs/{re-render-124b56ee.js → re-render-2f8d0f37.js} +7 -7
  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_29.cjs.entry.js +7294 -0
  17. package/dist/cjs/sqm-empty_5.cjs.entry.js +214 -0
  18. package/dist/cjs/sqm-form-message.cjs.entry.js +31 -0
  19. package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +9 -8
  20. package/dist/cjs/{sqm-hero-view-bb3d00a1.js → sqm-hero-view-a13795c0.js} +6 -7
  21. package/dist/cjs/sqm-hero.cjs.entry.js +7 -6
  22. package/dist/cjs/sqm-leaderboard-rank-view-35015d30.js +10 -0
  23. package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +11 -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-1552442a.js} +5 -6
  34. package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +23 -15
  35. package/dist/cjs/{sqm-portal-footer-view-03408484.js → sqm-portal-footer-view-15ce261b.js} +3 -4
  36. package/dist/cjs/sqm-portal-footer.cjs.entry.js +9 -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-659635e9.js} +5 -6
  41. package/dist/cjs/sqm-portal-profile.cjs.entry.js +19 -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 +884 -0
  49. package/dist/cjs/sqm-refresh-button.cjs.entry.js +54 -0
  50. package/dist/cjs/sqm-rewards-table-customer-note-cell.cjs.entry.js +26 -0
  51. package/dist/cjs/sqm-rewards-table-customer-note-column.cjs.entry.js +38 -0
  52. package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +956 -0
  53. package/dist/cjs/{sqm-stat-container-view-ee7b00ff.js → sqm-stat-container-view-5b2db929.js} +3 -4
  54. package/dist/cjs/sqm-stat-container.cjs.entry.js +6 -5
  55. package/dist/cjs/sqm-stencilbook.cjs.entry.js +14442 -0
  56. package/dist/cjs/sqm-tab.cjs.entry.js +20 -0
  57. package/dist/cjs/sqm-tabs.cjs.entry.js +89 -0
  58. package/dist/cjs/{sqm-text-span-view-b5ae787b.js → sqm-text-span-view-f101dedf.js} +2 -3
  59. package/dist/cjs/sqm-text-span.cjs.entry.js +5 -4
  60. package/dist/cjs/{extends-0302d27d.js → stencil-hooks.module-87a1f4f7.js} +0 -19
  61. package/dist/cjs/use-callback-e754042f.js +7 -0
  62. package/dist/cjs/useChildElements-a68699b4.js +21 -0
  63. package/dist/cjs/{useDemoBigStat-5d71bbdf.js → useDemoBigStat-426e3319.js} +22 -48
  64. package/dist/cjs/useReferralTable-273bb515.js +355 -0
  65. package/dist/cjs/{utils-95e5317c.js → utils-01dbfd4a.js} +9 -0
  66. package/dist/collection/collection-manifest.json +47 -5
  67. package/dist/collection/components/sqm-asset-card/sqm-asset-card-view.js +2 -4
  68. package/dist/collection/components/sqm-big-stat/BigStat.stories.js +12 -1
  69. package/dist/collection/components/sqm-big-stat/sqm-big-stat-view.js +2 -4
  70. package/dist/collection/components/sqm-big-stat/sqm-big-stat.js +21 -1
  71. package/dist/collection/components/sqm-big-stat/useBigStat.js +14 -4
  72. package/dist/collection/components/sqm-big-stat/useDemoBigStat.js +2 -0
  73. package/dist/collection/components/sqm-brand/SqmBrand.stories.js +19 -0
  74. package/dist/collection/components/sqm-brand/sqm-brand.js +34 -4
  75. package/dist/collection/components/sqm-card-feed/CardFeed.stories.js +185 -0
  76. package/dist/collection/components/sqm-card-feed/sqm-card-feed-view.js +27 -0
  77. package/dist/collection/components/sqm-card-feed/sqm-card-feed.js +79 -0
  78. package/dist/collection/components/sqm-divided-layout/sqm-divided-layout-view.js +2 -4
  79. package/dist/collection/components/sqm-empty/sqm-empty-view.js +10 -0
  80. package/dist/collection/components/sqm-empty/sqm-empty.js +98 -0
  81. package/dist/collection/components/sqm-hero/sqm-hero-view.js +2 -4
  82. package/dist/collection/components/sqm-hero-image/HeroImage.stories.js +56 -0
  83. package/dist/collection/components/sqm-hero-image/sqm-hero-image-view.js +130 -0
  84. package/dist/collection/components/sqm-hero-image/sqm-hero-image.js +453 -0
  85. package/dist/collection/components/sqm-image/Image.stories.js +26 -0
  86. package/dist/collection/components/sqm-image/sqm-image-view.js +30 -0
  87. package/dist/collection/components/sqm-image/sqm-image.js +116 -0
  88. package/dist/collection/components/sqm-leaderboard/Leaderboard.stories.js +527 -9
  89. package/dist/collection/components/sqm-leaderboard/UseLeaderboard.stories.js +62 -8
  90. package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +87 -11
  91. package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.js +113 -20
  92. package/dist/collection/components/sqm-leaderboard/useLeaderboard.js +31 -3
  93. package/dist/collection/components/sqm-leaderboard-rank/sqm-leaderboard-rank.js +1 -4
  94. package/dist/collection/components/sqm-leaderboard-rank/useLeaderboardRank.js +1 -1
  95. package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +2 -4
  96. package/dist/collection/components/sqm-navigation-sidebar/sqm-navigation-sidebar-view.js +2 -4
  97. package/dist/collection/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item-view.js +5 -5
  98. package/dist/collection/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item.js +1 -1
  99. package/dist/collection/components/sqm-password-field/passwordValidation.js +2 -4
  100. package/dist/collection/components/sqm-password-field/sqm-password-field-view.js +2 -4
  101. package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password-view.js +2 -4
  102. package/dist/collection/components/sqm-portal-container/PortalContainer.stories.js +47 -0
  103. package/dist/collection/components/sqm-portal-container/sqm-portal-container-view.js +9 -6
  104. package/dist/collection/components/sqm-portal-container/sqm-portal-container.js +78 -0
  105. package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification-view.js +4 -6
  106. package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification.js +27 -0
  107. package/dist/collection/components/sqm-portal-email-verification/usePortalEmailVerification.js +2 -1
  108. package/dist/collection/components/sqm-portal-footer/sqm-portal-footer-view.js +2 -4
  109. package/dist/collection/components/sqm-portal-forgot-password/PortalForgotPassword.stories.js +4 -0
  110. package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.js +2 -4
  111. package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password.js +55 -3
  112. package/dist/collection/components/sqm-portal-forgot-password/usePortalForgotPassword.js +4 -2
  113. package/dist/collection/components/sqm-portal-frame/sqm-portal-frame-view.js +2 -4
  114. package/dist/collection/components/sqm-portal-login/PortalLogin.stories.js +6 -0
  115. package/dist/collection/components/sqm-portal-login/sqm-portal-login-view.js +3 -5
  116. package/dist/collection/components/sqm-portal-login/sqm-portal-login.js +59 -4
  117. package/dist/collection/components/sqm-portal-login/usePortalLogin.js +4 -2
  118. package/dist/collection/components/sqm-portal-profile/PortalProfile.stories.js +1 -7
  119. package/dist/collection/components/sqm-portal-profile/sqm-portal-profile-view.js +2 -4
  120. package/dist/collection/components/sqm-portal-register/PortalRegister.stories.js +12 -0
  121. package/dist/collection/components/sqm-portal-register/sqm-portal-register-view.js +3 -4
  122. package/dist/collection/components/sqm-portal-register/sqm-portal-register.js +56 -2
  123. package/dist/collection/components/sqm-portal-register/usePortalRegister.js +3 -0
  124. package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password-view.js +3 -5
  125. package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password.js +30 -1
  126. package/dist/collection/components/sqm-portal-reset-password/usePortalResetPassword.js +1 -1
  127. package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email-view.js +2 -4
  128. package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email.js +30 -1
  129. package/dist/collection/components/sqm-portal-verify-email/usePortalVerifyEmail.js +2 -2
  130. package/dist/collection/components/sqm-program-explainer/ProgramExplainer.stories.js +14 -45
  131. package/dist/collection/components/sqm-program-explainer/sqm-program-explainer-view.js +31 -34
  132. package/dist/collection/components/sqm-program-explainer/sqm-program-explainer.js +4 -90
  133. package/dist/collection/components/sqm-program-explainer-step/ProgramExplainerStep.stories.js +9 -10
  134. package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js +36 -43
  135. package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step.js +33 -10
  136. package/dist/collection/components/sqm-referral-card/ReferralCard.stories.js +62 -0
  137. package/dist/collection/components/sqm-referral-card/sqm-referral-card-view.js +52 -0
  138. package/dist/collection/components/sqm-referral-card/sqm-referral-card.js +62 -0
  139. package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe-view.js +2 -4
  140. package/dist/collection/components/sqm-referral-table/ReferralTable.stories.js +104 -68
  141. package/dist/collection/components/sqm-referral-table/ReferralTableCell.stories.js +10 -1
  142. package/dist/collection/components/sqm-referral-table/ReferralTableRewardsCell.stories.js +34 -25
  143. package/dist/collection/components/sqm-referral-table/UseReferralTable.stories.js +149 -0
  144. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-date-cell.js +23 -5
  145. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +197 -26
  146. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-status-cell.js +14 -1
  147. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-user-cell.js +2 -3
  148. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-date-column.js +35 -5
  149. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.js +182 -3
  150. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-status-column.js +29 -0
  151. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-user-column.js +45 -4
  152. package/dist/collection/components/sqm-referral-table/mockReferralData.js +314 -0
  153. package/dist/collection/components/sqm-referral-table/sqm-referral-table-view.js +3 -7
  154. package/dist/collection/components/sqm-referral-table/sqm-referral-table.js +149 -25
  155. package/dist/collection/components/sqm-referral-table/useReferralTable.js +50 -22
  156. package/dist/collection/components/sqm-refresh-button/RefreshButtonView.js +8 -0
  157. package/dist/collection/components/sqm-refresh-button/sqm-refresh-button.js +66 -0
  158. package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeList.stories.js +15 -8
  159. package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeListData.js +166 -41
  160. package/dist/collection/components/sqm-reward-exchange-list/assets/Reward-image.png +0 -0
  161. package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +321 -205
  162. package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list.js +258 -14
  163. package/dist/collection/components/sqm-reward-exchange-list/useRewardExchangeList.js +20 -8
  164. package/dist/collection/components/sqm-rewards-table/RewardsTable.stories.js +118 -0
  165. package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +231 -0
  166. package/dist/collection/components/sqm-rewards-table/UseRewardsTable.stories.js +94 -1
  167. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-customer-note-cell.js +58 -0
  168. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-date-cell.js +22 -3
  169. package/dist/collection/components/sqm-rewards-table/cells/{sqm-rewards-table-rewards-cell.js → sqm-rewards-table-reward-cell.js} +89 -53
  170. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-source-cell.js +142 -30
  171. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.js +155 -2
  172. package/dist/collection/components/sqm-rewards-table/columns/sqm-customer-note-column.js +98 -0
  173. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-date-column.js +8 -4
  174. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.js +42 -16
  175. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.js +83 -3
  176. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.js +34 -6
  177. package/dist/collection/components/sqm-rewards-table/mockRewardData.js +166 -0
  178. package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +120 -24
  179. package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +32 -20
  180. package/dist/collection/components/sqm-scroll/Scroll.stories.js +50 -0
  181. package/dist/collection/components/sqm-scroll/sqm-scroll.js +111 -0
  182. package/dist/collection/components/sqm-scroll/useScroll.js +18 -0
  183. package/dist/collection/components/sqm-share-button/ShareButton.stories.js +63 -6
  184. package/dist/collection/components/sqm-share-button/sqm-share-button-view.js +67 -11
  185. package/dist/collection/components/sqm-share-button/sqm-share-button.js +71 -13
  186. package/dist/collection/components/sqm-share-button/useShareButton.js +1 -1
  187. package/dist/collection/components/sqm-share-code/ShareCode.stories.js +17 -0
  188. package/dist/collection/components/sqm-share-code/sqm-share-code.js +1 -1
  189. package/dist/collection/components/sqm-share-link/ShareLink.stories.js +4 -0
  190. package/dist/collection/components/sqm-share-link/sqm-share-link-view.js +2 -4
  191. package/dist/collection/components/sqm-stat-container/sqm-stat-container-view.js +3 -5
  192. package/dist/collection/components/sqm-stencilbook/AutoColor.js +10 -10
  193. package/dist/collection/components/sqm-stencilbook/Resizer.js +1 -0
  194. package/dist/collection/components/sqm-stencilbook/Themes.js +0 -1
  195. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +27 -1
  196. package/dist/collection/components/sqm-tab/sqm-tab-view.js +4 -0
  197. package/dist/collection/components/sqm-tab/sqm-tab.js +28 -0
  198. package/dist/collection/{tables → components/sqm-table-cell}/sqm-table-cell.js +0 -0
  199. package/dist/collection/{tables → components/sqm-table-row}/sqm-table-row.js +0 -0
  200. package/dist/collection/components/sqm-tabs/Tabs.stories.js +150 -0
  201. package/dist/collection/components/sqm-tabs/sqm-tabs-view.js +27 -0
  202. package/dist/collection/components/sqm-tabs/sqm-tabs.js +50 -0
  203. package/dist/collection/components/sqm-tabs/useTabs.js +39 -0
  204. package/dist/collection/components/sqm-task-card/DetailsView.js +53 -0
  205. package/dist/collection/components/sqm-task-card/TaskCard.stories.js +169 -164
  206. package/dist/collection/components/sqm-task-card/UseTaskCard.stories.js +28 -2
  207. package/dist/collection/components/sqm-task-card/progress-bar/SVGs.js +1 -1
  208. package/dist/collection/components/sqm-task-card/progress-bar/progress-bar-view.js +349 -319
  209. package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +247 -205
  210. package/dist/collection/components/sqm-task-card/sqm-task-card.js +227 -25
  211. package/dist/collection/components/sqm-task-card/useTaskCard.js +43 -0
  212. package/dist/collection/components/sqm-text/sqm-text.js +30 -29
  213. package/dist/collection/components/sqm-text-span/sqm-text-span-view.js +2 -4
  214. package/dist/collection/components/sqm-timeline/SVGs.js +10 -0
  215. package/dist/collection/components/sqm-timeline/Timeline.stories.js +70 -0
  216. package/dist/collection/components/sqm-timeline/sqm-timeline-entry.js +203 -0
  217. package/dist/collection/components/sqm-timeline/sqm-timeline.js +118 -0
  218. package/dist/collection/components/sqm-titled-section/TitledSection.stories.js +237 -0
  219. package/dist/collection/components/sqm-titled-section/sqm-portal-section-view.js +4 -7
  220. package/dist/collection/components/sqm-titled-section/sqm-titled-section.js +39 -3
  221. package/dist/collection/components/sqm-user-name/sqm-user-name.js +1 -1
  222. package/dist/collection/components/sqm-user-name/useUserName.js +1 -1
  223. package/dist/collection/global/global.js +1 -1
  224. package/dist/collection/global/styles.js +14 -72
  225. package/dist/collection/global/styles.ts +14 -72
  226. package/dist/collection/stories/NewPortal.stories.js +17 -19
  227. package/dist/collection/styling/JSS.js +9 -0
  228. package/dist/collection/tables/GenericTableView.js +96 -37
  229. package/dist/collection/tables/TableSlots.js +9 -1
  230. package/dist/collection/utils/RequiredPropsError.js +2 -4
  231. package/dist/collection/utils/utils.js +8 -0
  232. package/dist/esm/GenericTableView-4a1292db.js +113 -0
  233. package/dist/esm/{jss-preset-default.esm-71fae192.js → JSS-96eeab98.js} +5 -2
  234. package/dist/esm/ShadowViewAddon-44cb77bd.js +2583 -0
  235. package/dist/esm/extends-c31f1eff.js +19 -0
  236. package/dist/esm/{global-e0e25c22.js → global-a8e9f822.js} +19 -77
  237. package/dist/esm/{index.module-eb50a8d2.js → index.module-2821f17d.js} +11 -10
  238. package/dist/esm/loader.js +6 -5
  239. package/dist/esm/luxon-f44215d9.js +8346 -0
  240. package/dist/esm/mint-components.js +6 -5
  241. package/dist/esm/{re-render-6d5b856e.js → re-render-07721d1b.js} +5 -5
  242. package/dist/esm/{sqm-asset-card-view-6f360937.js → sqm-asset-card-view-f9ca5345.js} +2 -3
  243. package/dist/esm/sqm-asset-card.entry.js +7 -6
  244. package/dist/esm/sqm-big-stat-view-309f7c1f.js +38 -0
  245. package/dist/esm/sqm-big-stat.entry.js +8 -6
  246. package/dist/esm/sqm-brand_29.entry.js +7262 -0
  247. package/dist/esm/sqm-empty_5.entry.js +206 -0
  248. package/dist/esm/sqm-form-message.entry.js +27 -0
  249. package/dist/esm/sqm-graphql-client-provider.entry.js +7 -6
  250. package/dist/esm/{sqm-hero-view-bfd8abd1.js → sqm-hero-view-5ea17052.js} +4 -5
  251. package/dist/esm/sqm-hero.entry.js +6 -5
  252. package/dist/esm/sqm-leaderboard-rank-view-da91f5f3.js +8 -0
  253. package/dist/esm/sqm-leaderboard-rank.entry.js +9 -11
  254. package/dist/esm/{sqm-name-fields-view-4162fb7b.js → sqm-name-fields-view-69b1583f.js} +2 -3
  255. package/dist/esm/sqm-name-fields.entry.js +7 -6
  256. package/dist/esm/{sqm-navigation-sidebar-item-view-2d8c368c.js → sqm-navigation-sidebar-item-view-9380a346.js} +7 -6
  257. package/dist/esm/sqm-navigation-sidebar-item.entry.js +9 -8
  258. package/dist/esm/{sqm-navigation-sidebar-view-2242502c.js → sqm-navigation-sidebar-view-816558e3.js} +2 -3
  259. package/dist/esm/sqm-navigation-sidebar.entry.js +4 -3
  260. package/dist/esm/sqm-password-field.entry.js +577 -0
  261. package/dist/esm/sqm-popup-container.entry.js +5 -4
  262. package/dist/esm/{sqm-portal-container-view-73757ca5.js → sqm-portal-container-view-f74db584.js} +9 -5
  263. package/dist/esm/{sqm-portal-email-verification-view-2af31979.js → sqm-portal-email-verification-view-cf3a4840.js} +5 -6
  264. package/dist/esm/sqm-portal-email-verification.entry.js +18 -10
  265. package/dist/esm/{sqm-portal-footer-view-60cd9ae5.js → sqm-portal-footer-view-ba9892f9.js} +4 -5
  266. package/dist/esm/sqm-portal-footer.entry.js +8 -7
  267. package/dist/esm/{sqm-portal-forgot-password-view-e3a6a716.js → sqm-portal-forgot-password-view-fa088f83.js} +3 -4
  268. package/dist/esm/sqm-portal-forgot-password.entry.js +25 -12
  269. package/dist/esm/sqm-portal-logout.entry.js +6 -5
  270. package/dist/esm/{sqm-portal-profile-view-f1deea0f.js → sqm-portal-profile-view-f795d0cd.js} +5 -6
  271. package/dist/esm/sqm-portal-profile.entry.js +12 -11
  272. package/dist/esm/sqm-portal-protected-route.entry.js +8 -7
  273. package/dist/esm/{sqm-portal-reset-password-view-a4e50da2.js → sqm-portal-reset-password-view-73e14282.js} +3 -4
  274. package/dist/esm/sqm-portal-reset-password.entry.js +23 -14
  275. package/dist/esm/{sqm-portal-section-view-f0876545.js → sqm-portal-section-view-88a80af9.js} +4 -6
  276. package/dist/esm/{sqm-portal-verify-email-view-6f18bac2.js → sqm-portal-verify-email-view-cbf1cfdc.js} +3 -4
  277. package/dist/esm/sqm-portal-verify-email.entry.js +21 -12
  278. package/dist/esm/sqm-referral-table_11.entry.js +870 -0
  279. package/dist/esm/sqm-refresh-button.entry.js +50 -0
  280. package/dist/esm/sqm-rewards-table-customer-note-cell.entry.js +22 -0
  281. package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +34 -0
  282. package/dist/esm/sqm-rewards-table_9.entry.js +944 -0
  283. package/dist/esm/{sqm-stat-container-view-4133feb6.js → sqm-stat-container-view-8a565c5a.js} +3 -4
  284. package/dist/esm/sqm-stat-container.entry.js +5 -4
  285. package/dist/esm/sqm-stencilbook.entry.js +14438 -0
  286. package/dist/esm/sqm-tab.entry.js +16 -0
  287. package/dist/esm/sqm-tabs.entry.js +85 -0
  288. package/dist/esm/{sqm-text-span-view-1781df94.js → sqm-text-span-view-7e61c95c.js} +2 -3
  289. package/dist/esm/sqm-text-span.entry.js +4 -3
  290. package/dist/esm/{extends-3a3f9fe2.js → stencil-hooks.module-acc8a613.js} +2 -20
  291. package/dist/esm/{use-callback-b38a1523.js → use-callback-7e0bfd3b.js} +1 -1
  292. package/dist/esm/useChildElements-62af7349.js +19 -0
  293. package/dist/esm/{useDemoBigStat-d227b2f9.js → useDemoBigStat-b5a22d26.js} +20 -45
  294. package/dist/esm/useReferralTable-43a3a215.js +351 -0
  295. package/dist/esm/{utils-454405f5.js → utils-1d345130.js} +9 -1
  296. package/dist/esm-es5/GenericTableView-4a1292db.js +1 -0
  297. package/dist/esm-es5/{jss-preset-default.esm-71fae192.js → JSS-96eeab98.js} +2 -2
  298. package/dist/esm-es5/ShadowViewAddon-44cb77bd.js +1 -0
  299. package/dist/esm-es5/extends-c31f1eff.js +1 -0
  300. package/dist/esm-es5/{global-e0e25c22.js → global-a8e9f822.js} +2 -2
  301. package/dist/esm-es5/index.module-2821f17d.js +1 -0
  302. package/dist/esm-es5/loader.js +1 -1
  303. package/dist/esm-es5/luxon-f44215d9.js +1 -0
  304. package/dist/esm-es5/mint-components.js +1 -1
  305. package/dist/esm-es5/re-render-07721d1b.js +1 -0
  306. package/dist/esm-es5/sqm-asset-card-view-f9ca5345.js +1 -0
  307. package/dist/esm-es5/sqm-asset-card.entry.js +1 -1
  308. package/dist/esm-es5/sqm-big-stat-view-309f7c1f.js +1 -0
  309. package/dist/esm-es5/sqm-big-stat.entry.js +1 -1
  310. package/dist/esm-es5/sqm-brand_29.entry.js +1 -0
  311. package/dist/esm-es5/sqm-empty_5.entry.js +1 -0
  312. package/dist/esm-es5/sqm-form-message.entry.js +1 -0
  313. package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
  314. package/dist/esm-es5/sqm-hero-view-5ea17052.js +1 -0
  315. package/dist/esm-es5/sqm-hero.entry.js +1 -1
  316. package/dist/esm-es5/sqm-leaderboard-rank-view-da91f5f3.js +1 -0
  317. package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
  318. package/dist/esm-es5/sqm-name-fields-view-69b1583f.js +1 -0
  319. package/dist/esm-es5/sqm-name-fields.entry.js +1 -1
  320. package/dist/esm-es5/sqm-navigation-sidebar-item-view-9380a346.js +1 -0
  321. package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
  322. package/dist/esm-es5/sqm-navigation-sidebar-view-816558e3.js +1 -0
  323. package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
  324. package/dist/esm-es5/sqm-password-field.entry.js +1 -0
  325. package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
  326. package/dist/esm-es5/sqm-portal-container-view-f74db584.js +1 -0
  327. package/dist/esm-es5/sqm-portal-email-verification-view-cf3a4840.js +1 -0
  328. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  329. package/dist/esm-es5/sqm-portal-footer-view-ba9892f9.js +1 -0
  330. package/dist/esm-es5/sqm-portal-footer.entry.js +1 -1
  331. package/dist/esm-es5/sqm-portal-forgot-password-view-fa088f83.js +1 -0
  332. package/dist/esm-es5/sqm-portal-forgot-password.entry.js +1 -1
  333. package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
  334. package/dist/esm-es5/sqm-portal-profile-view-f795d0cd.js +1 -0
  335. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  336. package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
  337. package/dist/esm-es5/sqm-portal-reset-password-view-73e14282.js +1 -0
  338. package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
  339. package/dist/esm-es5/sqm-portal-section-view-88a80af9.js +1 -0
  340. package/dist/esm-es5/sqm-portal-verify-email-view-cbf1cfdc.js +1 -0
  341. package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
  342. package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -0
  343. package/dist/esm-es5/sqm-refresh-button.entry.js +1 -0
  344. package/dist/esm-es5/sqm-rewards-table-customer-note-cell.entry.js +1 -0
  345. package/dist/esm-es5/{sqm-referral-table-column.entry.js → sqm-rewards-table-customer-note-column.entry.js} +1 -1
  346. package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -0
  347. package/dist/esm-es5/sqm-stat-container-view-8a565c5a.js +1 -0
  348. package/dist/esm-es5/sqm-stat-container.entry.js +1 -1
  349. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -0
  350. package/dist/esm-es5/sqm-tab.entry.js +1 -0
  351. package/dist/esm-es5/sqm-tabs.entry.js +1 -0
  352. package/dist/esm-es5/sqm-text-span-view-7e61c95c.js +1 -0
  353. package/dist/esm-es5/sqm-text-span.entry.js +1 -1
  354. package/dist/esm-es5/{extends-3a3f9fe2.js → stencil-hooks.module-acc8a613.js} +2 -2
  355. package/dist/esm-es5/use-callback-7e0bfd3b.js +1 -0
  356. package/dist/esm-es5/useChildElements-62af7349.js +1 -0
  357. package/dist/esm-es5/useDemoBigStat-b5a22d26.js +1 -0
  358. package/dist/esm-es5/useReferralTable-43a3a215.js +1 -0
  359. package/dist/esm-es5/utils-1d345130.js +1 -0
  360. package/dist/mint-components/assets/Reward-image.png +0 -0
  361. package/dist/mint-components/global/styles.ts +14 -72
  362. package/dist/mint-components/mint-components.esm.js +1 -1
  363. package/dist/mint-components/mint-components.js +1 -1
  364. package/dist/mint-components/p-030f89b3.entry.js +1 -0
  365. package/dist/mint-components/p-06763d29.entry.js +1 -0
  366. package/dist/mint-components/p-0682e2b9.system.entry.js +1 -0
  367. package/dist/mint-components/p-09fbcba5.js +1 -0
  368. package/dist/mint-components/p-0e8166ff.system.entry.js +1 -0
  369. package/dist/mint-components/p-1122f7df.system.js +1 -0
  370. package/dist/mint-components/p-147440c3.js +1 -0
  371. package/dist/mint-components/p-1703d3c0.system.entry.js +1 -0
  372. package/dist/mint-components/p-179988b5.js +1 -0
  373. package/dist/mint-components/p-192f4931.system.entry.js +1 -0
  374. package/dist/mint-components/p-1959da16.system.js +1 -0
  375. package/dist/mint-components/p-19822c1b.entry.js +1 -0
  376. package/dist/mint-components/p-198409c1.entry.js +1 -0
  377. package/dist/mint-components/p-1af65647.js +239 -0
  378. package/dist/mint-components/p-1c17892a.system.js +1 -0
  379. package/dist/mint-components/p-1d1e9197.js +1 -0
  380. package/dist/mint-components/p-204fd08c.js +1 -0
  381. package/dist/mint-components/p-250d40f6.system.entry.js +1 -0
  382. package/dist/mint-components/p-266268d2.system.js +1 -0
  383. package/dist/mint-components/{p-44578b22.js → p-27455c4c.js} +2 -2
  384. package/dist/mint-components/p-373fa002.js +1 -0
  385. package/dist/mint-components/p-3a0e33b9.entry.js +13 -0
  386. package/dist/mint-components/p-3a349873.entry.js +1 -0
  387. package/dist/mint-components/{p-1b7d89a7.system.js → p-3bbb90a9.system.js} +2 -2
  388. package/dist/mint-components/p-3e556042.js +1 -0
  389. package/dist/mint-components/p-3e65453b.system.js +1 -0
  390. package/dist/mint-components/p-403e84cc.system.entry.js +1 -0
  391. package/dist/mint-components/p-4063dca2.js +1 -0
  392. package/dist/mint-components/p-41a87a92.entry.js +1 -0
  393. package/dist/mint-components/p-4279da4b.system.js +1 -0
  394. package/dist/mint-components/p-48b4104d.entry.js +1 -0
  395. package/dist/mint-components/{p-015b683f.system.js → p-48ec6605.system.js} +2 -2
  396. package/dist/mint-components/p-4a1b7d35.js +1 -0
  397. package/dist/mint-components/p-4b60eb5d.entry.js +1 -0
  398. package/dist/mint-components/{p-0e8ae7e3.system.js → p-4ceaa514.system.js} +11 -11
  399. package/dist/mint-components/p-4e05c65a.js +1 -0
  400. package/dist/mint-components/p-4e4b69c2.system.entry.js +1 -0
  401. package/dist/mint-components/p-4f4bdfad.system.entry.js +1 -0
  402. package/dist/mint-components/p-505d8965.system.entry.js +1 -0
  403. package/dist/mint-components/p-53af4433.system.js +1 -0
  404. package/dist/mint-components/p-59afa159.entry.js +1 -0
  405. package/dist/mint-components/p-59e4405d.system.js +1 -0
  406. package/dist/mint-components/p-5c75acad.js +1 -0
  407. package/dist/mint-components/p-5da31edf.system.entry.js +1 -0
  408. package/dist/mint-components/p-5e10c310.entry.js +9 -0
  409. package/dist/mint-components/p-62dd50b3.js +167 -0
  410. package/dist/mint-components/p-66fc28d0.js +1 -0
  411. package/dist/mint-components/p-67749aab.system.entry.js +1 -0
  412. package/dist/mint-components/p-6b43e4cc.system.js +1 -0
  413. package/dist/mint-components/p-6cb25b8b.entry.js +1 -0
  414. package/dist/mint-components/p-6cc350b9.entry.js +1 -0
  415. package/dist/mint-components/p-6e5f2f7c.entry.js +93 -0
  416. package/dist/mint-components/p-71ecbb3b.system.js +1 -0
  417. package/dist/mint-components/p-73d5306f.js +1 -0
  418. package/dist/mint-components/p-75a78c16.system.entry.js +1 -0
  419. package/dist/mint-components/p-7794c289.js +1 -0
  420. package/dist/mint-components/p-77c4071b.entry.js +1 -0
  421. package/dist/mint-components/p-7b854fc1.system.entry.js +1 -0
  422. package/dist/mint-components/p-7e89b7ed.js +1 -0
  423. package/dist/mint-components/p-81f34787.js +1 -0
  424. package/dist/mint-components/p-838242f3.system.js +1 -0
  425. package/dist/mint-components/p-8a8d0514.system.js +1 -0
  426. package/dist/mint-components/p-8b4b71d3.system.entry.js +1 -0
  427. package/dist/mint-components/p-8bcaafaf.system.js +1 -0
  428. package/dist/mint-components/p-91d119ad.system.js +1 -0
  429. package/dist/mint-components/p-95a89867.js +1 -0
  430. package/dist/mint-components/p-975d4358.js +1 -0
  431. package/dist/mint-components/p-982ad256.js +1 -0
  432. package/dist/mint-components/p-996e20c4.entry.js +1 -0
  433. package/dist/mint-components/p-999a46af.entry.js +1 -0
  434. package/dist/mint-components/p-9b48d01e.js +1 -0
  435. package/dist/mint-components/p-9d467470.system.js +1 -0
  436. package/dist/mint-components/p-9e2168f7.system.entry.js +1 -0
  437. package/dist/mint-components/p-9f0d9dfc.system.entry.js +1 -0
  438. package/dist/mint-components/p-9fd88e79.entry.js +1 -0
  439. package/dist/mint-components/p-a09e3176.system.js +1 -0
  440. package/dist/mint-components/p-a13b5757.system.js +1 -0
  441. package/dist/mint-components/p-a62a0cf6.system.entry.js +1 -0
  442. package/dist/mint-components/p-a6d4cffd.system.entry.js +1 -0
  443. package/dist/mint-components/p-aa09f12b.system.js +1 -0
  444. package/dist/mint-components/p-b1df53ce.system.js +1 -0
  445. package/dist/mint-components/p-b3af1c6f.js +1 -0
  446. package/dist/mint-components/p-b5c6ff52.system.entry.js +1 -0
  447. package/dist/mint-components/p-b7e5ba0d.system.entry.js +1 -0
  448. package/dist/mint-components/p-b8434fc0.system.js +1 -0
  449. package/dist/mint-components/p-bbf96ff3.system.js +1 -0
  450. package/dist/mint-components/p-bc19e1c2.system.js +1 -0
  451. package/dist/mint-components/p-bca007f0.entry.js +1 -0
  452. package/dist/mint-components/p-be02b2a2.system.entry.js +1 -0
  453. package/dist/mint-components/p-bf055b6c.system.js +1 -0
  454. package/dist/mint-components/p-c00fd233.system.entry.js +1 -0
  455. package/dist/mint-components/p-c0693ddc.entry.js +1 -0
  456. package/dist/mint-components/p-c3f300e8.system.js +1 -0
  457. package/dist/mint-components/p-c5037c05.system.entry.js +1 -0
  458. package/dist/mint-components/p-c5a656af.system.entry.js +1 -0
  459. package/dist/mint-components/p-c5ce6c37.system.js +1 -0
  460. package/dist/mint-components/p-c7f81b0e.system.entry.js +1 -0
  461. package/dist/mint-components/p-cae3aef5.entry.js +150 -0
  462. package/dist/mint-components/{p-e608f340.entry.js → p-cd69d4f6.entry.js} +2 -2
  463. package/dist/mint-components/p-cdebf9f7.system.entry.js +1 -0
  464. package/dist/mint-components/p-ce0ec1c4.system.js +1 -0
  465. package/dist/mint-components/{p-03e93c82.system.js → p-cf9c3022.system.js} +1 -1
  466. package/dist/mint-components/p-cf9cfac0.entry.js +1 -0
  467. package/dist/mint-components/p-d0c09868.js +1 -0
  468. package/dist/mint-components/p-d13b1d06.entry.js +1 -0
  469. package/dist/mint-components/p-d1ffec5b.entry.js +1 -0
  470. package/dist/mint-components/p-d33eb961.js +1 -0
  471. package/dist/mint-components/p-d42442f4.system.entry.js +1 -0
  472. package/dist/mint-components/p-d6e7f685.system.entry.js +1 -0
  473. package/dist/mint-components/p-d98083fb.entry.js +1 -0
  474. package/dist/mint-components/p-db9e20a0.entry.js +1 -0
  475. package/dist/mint-components/p-de2e871a.js +1 -0
  476. package/dist/mint-components/p-dec7a657.entry.js +1 -0
  477. package/dist/mint-components/p-e08f5f8e.js +1 -0
  478. package/dist/mint-components/{p-61acba7a.js → p-e15e8e89.js} +1 -1
  479. package/dist/mint-components/p-e1d1bbdc.system.entry.js +1 -0
  480. package/dist/mint-components/p-e6fac878.entry.js +1 -0
  481. package/dist/mint-components/p-e89b298a.system.entry.js +1 -0
  482. package/dist/mint-components/p-ea110693.system.js +1 -0
  483. package/dist/mint-components/{p-8fd8682c.js → p-ef030fdf.js} +153 -153
  484. package/dist/mint-components/p-f6855b3f.system.entry.js +1 -0
  485. package/dist/mint-components/p-f94c4847.entry.js +1 -0
  486. package/dist/mint-components/p-f983083d.system.js +1 -0
  487. package/dist/mint-components/p-fdae4632.js +30 -0
  488. package/dist/mint-components/p-fe0d7472.entry.js +1 -0
  489. package/dist/types/components/sqm-big-stat/BigStat.stories.d.ts +3 -0
  490. package/dist/types/components/sqm-big-stat/sqm-big-stat-view.d.ts +1 -0
  491. package/dist/types/components/sqm-big-stat/sqm-big-stat.d.ts +6 -0
  492. package/dist/types/components/sqm-big-stat/useBigStat.d.ts +1 -0
  493. package/dist/types/components/sqm-brand/SqmBrand.stories.d.ts +4 -0
  494. package/dist/types/components/sqm-brand/sqm-brand.d.ts +8 -0
  495. package/dist/types/components/sqm-card-feed/CardFeed.stories.d.ts +12 -0
  496. package/dist/types/components/sqm-card-feed/sqm-card-feed-view.d.ts +6 -0
  497. package/dist/types/components/sqm-card-feed/sqm-card-feed.d.ts +18 -0
  498. package/dist/types/components/sqm-empty/sqm-empty-view.d.ts +7 -0
  499. package/dist/types/components/sqm-empty/sqm-empty.d.ts +18 -0
  500. package/dist/types/components/sqm-hero-image/HeroImage.stories.d.ts +23 -0
  501. package/dist/types/components/sqm-hero-image/sqm-hero-image-view.d.ts +21 -0
  502. package/dist/types/components/sqm-hero-image/sqm-hero-image.d.ts +88 -0
  503. package/dist/types/components/sqm-image/Image.stories.d.ts +13 -0
  504. package/dist/types/components/sqm-image/sqm-image-view.d.ts +10 -0
  505. package/dist/types/components/sqm-image/sqm-image.d.ts +27 -0
  506. package/dist/types/components/sqm-leaderboard/Leaderboard.stories.d.ts +7 -1
  507. package/dist/types/components/sqm-leaderboard/UseLeaderboard.stories.d.ts +6 -0
  508. package/dist/types/components/sqm-leaderboard/sqm-leaderboard-view.d.ts +10 -0
  509. package/dist/types/components/sqm-leaderboard/sqm-leaderboard.d.ts +12 -2
  510. package/dist/types/components/sqm-leaderboard/useLeaderboard.d.ts +3 -0
  511. package/dist/types/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item.d.ts +2 -0
  512. package/dist/types/components/sqm-portal-container/PortalContainer.stories.d.ts +15 -0
  513. package/dist/types/components/sqm-portal-container/sqm-portal-container-view.d.ts +3 -0
  514. package/dist/types/components/sqm-portal-container/sqm-portal-container.d.ts +14 -0
  515. package/dist/types/components/sqm-portal-email-verification/sqm-portal-email-verification.d.ts +6 -0
  516. package/dist/types/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.d.ts +1 -0
  517. package/dist/types/components/sqm-portal-forgot-password/sqm-portal-forgot-password.d.ts +10 -0
  518. package/dist/types/components/sqm-portal-forgot-password/usePortalForgotPassword.d.ts +3 -1
  519. package/dist/types/components/sqm-portal-login/sqm-portal-login-view.d.ts +2 -0
  520. package/dist/types/components/sqm-portal-login/sqm-portal-login.d.ts +8 -0
  521. package/dist/types/components/sqm-portal-login/usePortalLogin.d.ts +3 -3
  522. package/dist/types/components/sqm-portal-register/PortalRegister.stories.d.ts +1 -0
  523. package/dist/types/components/sqm-portal-register/sqm-portal-register-view.d.ts +6 -3
  524. package/dist/types/components/sqm-portal-register/sqm-portal-register.d.ts +10 -0
  525. package/dist/types/components/sqm-portal-register/usePortalRegister.d.ts +1 -0
  526. package/dist/types/components/sqm-portal-reset-password/sqm-portal-reset-password.d.ts +8 -0
  527. package/dist/types/components/sqm-portal-verify-email/sqm-portal-verify-email.d.ts +8 -0
  528. package/dist/types/components/sqm-portal-verify-email/usePortalVerifyEmail.d.ts +2 -1
  529. package/dist/types/components/sqm-program-explainer/ProgramExplainer.stories.d.ts +4 -2
  530. package/dist/types/components/sqm-program-explainer/sqm-program-explainer-view.d.ts +2 -6
  531. package/dist/types/components/sqm-program-explainer/sqm-program-explainer.d.ts +2 -20
  532. package/dist/types/components/sqm-program-explainer-step/ProgramExplainerStep.stories.d.ts +5 -1
  533. package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step-view.d.ts +5 -4
  534. package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step.d.ts +15 -6
  535. package/dist/types/components/sqm-referral-card/ReferralCard.stories.d.ts +15 -0
  536. package/dist/types/components/sqm-referral-card/sqm-referral-card-view.d.ts +9 -0
  537. package/dist/types/components/sqm-referral-card/sqm-referral-card.d.ts +15 -0
  538. package/dist/types/components/sqm-referral-table/ReferralTable.stories.d.ts +4 -0
  539. package/dist/types/components/sqm-referral-table/ReferralTableCell.stories.d.ts +3 -0
  540. package/dist/types/components/sqm-referral-table/ReferralTableRewardsCell.stories.d.ts +3 -0
  541. package/dist/types/components/sqm-referral-table/UseReferralTable.stories.d.ts +40 -0
  542. package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-date-cell.d.ts +2 -1
  543. package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.d.ts +7 -0
  544. package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-user-cell.d.ts +1 -1
  545. package/dist/types/components/sqm-referral-table/columns/ReferralTableColumn.d.ts +1 -1
  546. package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-date-column.d.ts +2 -1
  547. package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.d.ts +26 -1
  548. package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-status-column.d.ts +1 -0
  549. package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-user-column.d.ts +1 -0
  550. package/dist/types/components/sqm-referral-table/mockReferralData.d.ts +83 -0
  551. package/dist/types/components/sqm-referral-table/sqm-referral-table-view.d.ts +1 -1
  552. package/dist/types/components/sqm-referral-table/sqm-referral-table.d.ts +8 -2
  553. package/dist/types/components/sqm-referral-table/useReferralTable.d.ts +5 -2
  554. package/dist/types/components/sqm-refresh-button/RefreshButtonView.d.ts +15 -0
  555. package/dist/types/components/sqm-refresh-button/sqm-refresh-button.d.ts +12 -0
  556. package/dist/types/components/sqm-reward-exchange-list/RewardExchangeList.stories.d.ts +12 -4
  557. package/dist/types/components/sqm-reward-exchange-list/RewardExchangeListData.d.ts +506 -73
  558. package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.d.ts +3 -0
  559. package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list.d.ts +47 -0
  560. package/dist/types/components/sqm-reward-exchange-list/useRewardExchangeList.d.ts +0 -1
  561. package/dist/types/components/sqm-rewards-table/RewardsTable.stories.d.ts +14 -0
  562. package/dist/types/components/sqm-rewards-table/RewardsTableCell.stories.d.ts +34 -0
  563. package/dist/types/components/sqm-rewards-table/UseRewardsTable.stories.d.ts +24 -0
  564. package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-customer-note-cell.d.ts +8 -0
  565. package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-date-cell.d.ts +1 -0
  566. package/dist/types/components/sqm-rewards-table/cells/{sqm-rewards-table-rewards-cell.d.ts → sqm-rewards-table-reward-cell.d.ts} +3 -1
  567. package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-source-cell.d.ts +6 -0
  568. package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.d.ts +6 -1
  569. package/dist/types/components/sqm-rewards-table/columns/RewardTableColumn.d.ts +1 -1
  570. package/dist/types/components/sqm-rewards-table/columns/sqm-customer-note-column.d.ts +15 -0
  571. package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-date-column.d.ts +1 -1
  572. package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.d.ts +9 -5
  573. package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.d.ts +15 -1
  574. package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.d.ts +6 -2
  575. package/dist/types/components/sqm-rewards-table/mockRewardData.d.ts +45 -0
  576. package/dist/types/components/sqm-rewards-table/sqm-rewards-table.d.ts +6 -2
  577. package/dist/types/components/sqm-rewards-table/useRewardsTable.d.ts +1 -0
  578. package/dist/types/components/sqm-scroll/Scroll.stories.d.ts +7 -0
  579. package/dist/types/components/sqm-scroll/sqm-scroll.d.ts +11 -0
  580. package/dist/types/components/sqm-scroll/useScroll.d.ts +6 -0
  581. package/dist/types/components/sqm-share-button/ShareButton.stories.d.ts +8 -1
  582. package/dist/types/components/sqm-share-button/sqm-share-button-view.d.ts +3 -0
  583. package/dist/types/components/sqm-share-button/sqm-share-button.d.ts +18 -2
  584. package/dist/types/components/sqm-share-code/ShareCode.stories.d.ts +10 -0
  585. package/dist/types/components/sqm-share-link/ShareLink.stories.d.ts +3 -0
  586. package/dist/types/components/sqm-stencilbook/Resizer.d.ts +1 -1
  587. package/dist/types/components/sqm-tab/sqm-tab-view.d.ts +4 -0
  588. package/dist/types/components/sqm-tab/sqm-tab.d.ts +4 -0
  589. package/dist/types/{tables → components/sqm-table-cell}/sqm-table-cell.d.ts +0 -0
  590. package/dist/types/{tables → components/sqm-table-row}/sqm-table-row.d.ts +0 -0
  591. package/dist/types/components/sqm-tabs/Tabs.stories.d.ts +15 -0
  592. package/dist/types/components/sqm-tabs/sqm-tabs-view.d.ts +9 -0
  593. package/dist/types/components/sqm-tabs/sqm-tabs.d.ts +16 -0
  594. package/dist/types/components/sqm-tabs/useTabs.d.ts +9 -0
  595. package/dist/types/components/sqm-task-card/DetailsView.d.ts +41 -0
  596. package/dist/types/components/sqm-task-card/UseTaskCard.stories.d.ts +6 -0
  597. package/dist/types/components/sqm-task-card/progress-bar/SVGs.d.ts +1 -1
  598. package/dist/types/components/sqm-task-card/sqm-task-card-view.d.ts +32 -15
  599. package/dist/types/components/sqm-task-card/sqm-task-card.d.ts +49 -5
  600. package/dist/types/components/sqm-task-card/useTaskCard.d.ts +11 -0
  601. package/dist/types/components/sqm-timeline/SVGs.d.ts +3 -0
  602. package/dist/types/components/sqm-timeline/Timeline.stories.d.ts +11 -0
  603. package/dist/types/components/sqm-timeline/sqm-timeline-entry.d.ts +31 -0
  604. package/dist/types/components/sqm-timeline/sqm-timeline.d.ts +15 -0
  605. package/dist/types/components/sqm-titled-section/TitledSection.stories.d.ts +12 -0
  606. package/dist/types/components/sqm-titled-section/sqm-portal-section-view.d.ts +1 -0
  607. package/dist/types/components/sqm-titled-section/sqm-titled-section.d.ts +12 -1
  608. package/dist/types/components/sqm-user-name/sqm-user-name.d.ts +1 -1
  609. package/dist/types/components.d.ts +1180 -121
  610. package/dist/types/global/styles.d.ts +1 -1
  611. package/dist/types/saasquatch.d.ts +6 -0
  612. package/dist/types/styling/JSS.d.ts +7 -0
  613. package/dist/types/tables/GenericTableView.d.ts +4 -1
  614. package/dist/types/tables/TableSlots.d.ts +1 -0
  615. package/dist/types/utils/utils.d.ts +1 -0
  616. package/grapesjs/grapesjs.js +1 -1
  617. package/package.json +10 -11
  618. package/dist/cjs/ShadowViewAddon-475e00d3.js +0 -127
  619. package/dist/cjs/sqm-brand_38.cjs.entry.js +0 -29924
  620. package/dist/cjs/sqm-leaderboard-rank-view-510f16d3.js +0 -131
  621. package/dist/cjs/sqm-leaderboard.cjs.entry.js +0 -69
  622. package/dist/cjs/sqm-portal-container.cjs.entry.js +0 -35
  623. package/dist/cjs/sqm-program-explainer-step-view-f8e1cd12.js +0 -82
  624. package/dist/cjs/sqm-program-explainer-step.cjs.entry.js +0 -22
  625. package/dist/cjs/sqm-program-explainer-view-512737f3.js +0 -51
  626. package/dist/cjs/sqm-program-explainer.cjs.entry.js +0 -23
  627. package/dist/cjs/sqm-referral-table-column.cjs.entry.js +0 -30
  628. package/dist/cjs/sqm-referral-table-date-column.cjs.entry.js +0 -47
  629. package/dist/cjs/sqm-referral-table-rewards-column.cjs.entry.js +0 -38
  630. package/dist/cjs/sqm-referral-table-status-column.cjs.entry.js +0 -45
  631. package/dist/cjs/sqm-referral-table-user-column.cjs.entry.js +0 -57
  632. package/dist/cjs/sqm-share-code.cjs.entry.js +0 -106
  633. package/dist/cjs/sqm-share-link-view-a935d07e.js +0 -24
  634. package/dist/cjs/sqm-titled-section.cjs.entry.js +0 -36
  635. package/dist/cjs/use-callback-fadb2643.js +0 -7
  636. package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.css +0 -37
  637. package/dist/collection/components/sqm-reward-exchange-list/assets/placeholder.png +0 -0
  638. package/dist/esm/ShadowViewAddon-558fabb7.js +0 -122
  639. package/dist/esm/sqm-brand_38.entry.js +0 -29883
  640. package/dist/esm/sqm-leaderboard-rank-view-cd1e8962.js +0 -128
  641. package/dist/esm/sqm-leaderboard.entry.js +0 -65
  642. package/dist/esm/sqm-portal-container.entry.js +0 -31
  643. package/dist/esm/sqm-program-explainer-step-view-987e4747.js +0 -80
  644. package/dist/esm/sqm-program-explainer-step.entry.js +0 -18
  645. package/dist/esm/sqm-program-explainer-view-c0cda03a.js +0 -49
  646. package/dist/esm/sqm-program-explainer.entry.js +0 -19
  647. package/dist/esm/sqm-referral-table-column.entry.js +0 -26
  648. package/dist/esm/sqm-referral-table-date-column.entry.js +0 -43
  649. package/dist/esm/sqm-referral-table-rewards-column.entry.js +0 -34
  650. package/dist/esm/sqm-referral-table-status-column.entry.js +0 -41
  651. package/dist/esm/sqm-referral-table-user-column.entry.js +0 -53
  652. package/dist/esm/sqm-share-code.entry.js +0 -102
  653. package/dist/esm/sqm-share-link-view-9282b8e8.js +0 -22
  654. package/dist/esm/sqm-titled-section.entry.js +0 -32
  655. package/dist/esm-es5/ShadowViewAddon-558fabb7.js +0 -1
  656. package/dist/esm-es5/index.module-eb50a8d2.js +0 -1
  657. package/dist/esm-es5/re-render-6d5b856e.js +0 -1
  658. package/dist/esm-es5/sqm-asset-card-view-6f360937.js +0 -1
  659. package/dist/esm-es5/sqm-brand_38.entry.js +0 -1
  660. package/dist/esm-es5/sqm-hero-view-bfd8abd1.js +0 -1
  661. package/dist/esm-es5/sqm-leaderboard-rank-view-cd1e8962.js +0 -1
  662. package/dist/esm-es5/sqm-leaderboard.entry.js +0 -1
  663. package/dist/esm-es5/sqm-name-fields-view-4162fb7b.js +0 -1
  664. package/dist/esm-es5/sqm-navigation-sidebar-item-view-2d8c368c.js +0 -1
  665. package/dist/esm-es5/sqm-navigation-sidebar-view-2242502c.js +0 -1
  666. package/dist/esm-es5/sqm-portal-container-view-73757ca5.js +0 -1
  667. package/dist/esm-es5/sqm-portal-container.entry.js +0 -1
  668. package/dist/esm-es5/sqm-portal-email-verification-view-2af31979.js +0 -1
  669. package/dist/esm-es5/sqm-portal-footer-view-60cd9ae5.js +0 -1
  670. package/dist/esm-es5/sqm-portal-forgot-password-view-e3a6a716.js +0 -1
  671. package/dist/esm-es5/sqm-portal-profile-view-f1deea0f.js +0 -1
  672. package/dist/esm-es5/sqm-portal-reset-password-view-a4e50da2.js +0 -1
  673. package/dist/esm-es5/sqm-portal-section-view-f0876545.js +0 -1
  674. package/dist/esm-es5/sqm-portal-verify-email-view-6f18bac2.js +0 -1
  675. package/dist/esm-es5/sqm-program-explainer-step-view-987e4747.js +0 -1
  676. package/dist/esm-es5/sqm-program-explainer-step.entry.js +0 -1
  677. package/dist/esm-es5/sqm-program-explainer-view-c0cda03a.js +0 -1
  678. package/dist/esm-es5/sqm-program-explainer.entry.js +0 -1
  679. package/dist/esm-es5/sqm-referral-table-date-column.entry.js +0 -1
  680. package/dist/esm-es5/sqm-referral-table-rewards-column.entry.js +0 -1
  681. package/dist/esm-es5/sqm-referral-table-status-column.entry.js +0 -1
  682. package/dist/esm-es5/sqm-referral-table-user-column.entry.js +0 -1
  683. package/dist/esm-es5/sqm-share-code.entry.js +0 -1
  684. package/dist/esm-es5/sqm-share-link-view-9282b8e8.js +0 -1
  685. package/dist/esm-es5/sqm-stat-container-view-4133feb6.js +0 -1
  686. package/dist/esm-es5/sqm-text-span-view-1781df94.js +0 -1
  687. package/dist/esm-es5/sqm-titled-section.entry.js +0 -1
  688. package/dist/esm-es5/use-callback-b38a1523.js +0 -1
  689. package/dist/esm-es5/useDemoBigStat-d227b2f9.js +0 -1
  690. package/dist/esm-es5/utils-454405f5.js +0 -1
  691. package/dist/mint-components/assets/placeholder.png +0 -0
  692. package/dist/mint-components/p-02dc36a4.system.js +0 -1
  693. package/dist/mint-components/p-0a39b23c.system.entry.js +0 -1
  694. package/dist/mint-components/p-0bcefa93.entry.js +0 -1
  695. package/dist/mint-components/p-0d8b2757.system.entry.js +0 -1
  696. package/dist/mint-components/p-1575e8a3.system.js +0 -1
  697. package/dist/mint-components/p-1705e549.entry.js +0 -1
  698. package/dist/mint-components/p-1e182e88.system.js +0 -1
  699. package/dist/mint-components/p-1f95b411.js +0 -1
  700. package/dist/mint-components/p-2027edc0.system.entry.js +0 -1
  701. package/dist/mint-components/p-20c95798.entry.js +0 -1
  702. package/dist/mint-components/p-21b4044a.entry.js +0 -1
  703. package/dist/mint-components/p-221bd06e.js +0 -1
  704. package/dist/mint-components/p-22e6aad3.entry.js +0 -1
  705. package/dist/mint-components/p-2338162a.entry.js +0 -1
  706. package/dist/mint-components/p-24fa8920.system.entry.js +0 -1
  707. package/dist/mint-components/p-282ed862.js +0 -1
  708. package/dist/mint-components/p-29ee7d11.system.entry.js +0 -1
  709. package/dist/mint-components/p-2b2579e3.js +0 -1
  710. package/dist/mint-components/p-2e63dcfd.system.js +0 -1
  711. package/dist/mint-components/p-2eadaa18.entry.js +0 -1
  712. package/dist/mint-components/p-3137ca42.entry.js +0 -372
  713. package/dist/mint-components/p-3143cce4.entry.js +0 -1
  714. package/dist/mint-components/p-33007a9d.system.entry.js +0 -1
  715. package/dist/mint-components/p-34112d74.entry.js +0 -1
  716. package/dist/mint-components/p-34696973.system.js +0 -1
  717. package/dist/mint-components/p-35476f7e.system.js +0 -1
  718. package/dist/mint-components/p-40e83a85.system.js +0 -1
  719. package/dist/mint-components/p-412d31b1.js +0 -1
  720. package/dist/mint-components/p-46493de5.system.entry.js +0 -1
  721. package/dist/mint-components/p-4658d225.system.entry.js +0 -1
  722. package/dist/mint-components/p-4b719313.js +0 -1
  723. package/dist/mint-components/p-509dda90.js +0 -1
  724. package/dist/mint-components/p-53b0c355.system.js +0 -1
  725. package/dist/mint-components/p-53e51b3f.entry.js +0 -1
  726. package/dist/mint-components/p-53ec4863.entry.js +0 -1
  727. package/dist/mint-components/p-547a0354.system.js +0 -1
  728. package/dist/mint-components/p-55f8387d.system.js +0 -1
  729. package/dist/mint-components/p-562199e3.system.js +0 -1
  730. package/dist/mint-components/p-5939212e.system.entry.js +0 -1
  731. package/dist/mint-components/p-5d925bb6.js +0 -1
  732. package/dist/mint-components/p-5e4e7f01.system.js +0 -1
  733. package/dist/mint-components/p-60ae1ec5.system.js +0 -1
  734. package/dist/mint-components/p-65c79eec.entry.js +0 -1
  735. package/dist/mint-components/p-69f28472.system.js +0 -1
  736. package/dist/mint-components/p-6d27cd05.system.entry.js +0 -1
  737. package/dist/mint-components/p-739b3032.js +0 -1
  738. package/dist/mint-components/p-759d3800.entry.js +0 -13
  739. package/dist/mint-components/p-760762d3.entry.js +0 -13
  740. package/dist/mint-components/p-7cdbe82a.entry.js +0 -1
  741. package/dist/mint-components/p-7ff22998.system.entry.js +0 -1
  742. package/dist/mint-components/p-85efd952.entry.js +0 -1
  743. package/dist/mint-components/p-86255b95.entry.js +0 -1
  744. package/dist/mint-components/p-88fdfd94.system.entry.js +0 -1
  745. package/dist/mint-components/p-8c77a66a.system.js +0 -1
  746. package/dist/mint-components/p-900d4192.system.js +0 -1
  747. package/dist/mint-components/p-952ed169.js +0 -1
  748. package/dist/mint-components/p-97b946c2.system.entry.js +0 -1
  749. package/dist/mint-components/p-99f1208f.js +0 -1
  750. package/dist/mint-components/p-9b4f2af6.js +0 -1
  751. package/dist/mint-components/p-9be0cb19.entry.js +0 -1
  752. package/dist/mint-components/p-9c79643f.system.js +0 -1
  753. package/dist/mint-components/p-a0a26fc5.system.entry.js +0 -1
  754. package/dist/mint-components/p-a355eeaf.system.entry.js +0 -1
  755. package/dist/mint-components/p-a565e753.entry.js +0 -1
  756. package/dist/mint-components/p-a731e752.js +0 -1
  757. package/dist/mint-components/p-a8246a50.system.entry.js +0 -1
  758. package/dist/mint-components/p-a831de18.entry.js +0 -1
  759. package/dist/mint-components/p-a833dbb3.js +0 -1
  760. package/dist/mint-components/p-a88a08bb.system.js +0 -1
  761. package/dist/mint-components/p-a8b913a8.js +0 -1
  762. package/dist/mint-components/p-a9a6f205.entry.js +0 -1
  763. package/dist/mint-components/p-aaf68d9d.system.js +0 -1
  764. package/dist/mint-components/p-aee83885.system.entry.js +0 -1
  765. package/dist/mint-components/p-b86cbac3.system.entry.js +0 -1
  766. package/dist/mint-components/p-ba505a8c.js +0 -1
  767. package/dist/mint-components/p-bb76c6f3.system.js +0 -1
  768. package/dist/mint-components/p-bd903567.js +0 -1
  769. package/dist/mint-components/p-be3a0cc4.system.js +0 -1
  770. package/dist/mint-components/p-c0f9d0b1.entry.js +0 -1
  771. package/dist/mint-components/p-c3bf9440.entry.js +0 -1
  772. package/dist/mint-components/p-c65cfc9d.system.js +0 -1
  773. package/dist/mint-components/p-c6e6c96c.system.entry.js +0 -1
  774. package/dist/mint-components/p-ca40dbaa.system.entry.js +0 -1
  775. package/dist/mint-components/p-cc189fc4.system.js +0 -1
  776. package/dist/mint-components/p-cc652a53.entry.js +0 -1
  777. package/dist/mint-components/p-d19d6012.js +0 -235
  778. package/dist/mint-components/p-d3c7dbfc.entry.js +0 -1
  779. package/dist/mint-components/p-d4a1bce9.system.entry.js +0 -1
  780. package/dist/mint-components/p-d653e004.system.entry.js +0 -1
  781. package/dist/mint-components/p-d68f6b64.system.entry.js +0 -1
  782. package/dist/mint-components/p-d7d6bf44.system.js +0 -1
  783. package/dist/mint-components/p-db5a1e78.js +0 -1
  784. package/dist/mint-components/p-e069bc2d.entry.js +0 -1
  785. package/dist/mint-components/p-e14c15ca.system.entry.js +0 -1
  786. package/dist/mint-components/p-e36ff7fa.entry.js +0 -1
  787. package/dist/mint-components/p-e426715b.js +0 -1
  788. package/dist/mint-components/p-e43cc1f8.system.entry.js +0 -1
  789. package/dist/mint-components/p-e7cb4274.system.entry.js +0 -1
  790. package/dist/mint-components/p-ebcd8a59.js +0 -1
  791. package/dist/mint-components/p-ef7f70f2.system.entry.js +0 -1
  792. package/dist/mint-components/p-f20d9204.system.entry.js +0 -1
  793. package/dist/mint-components/p-f7f87338.js +0 -1
  794. package/dist/mint-components/p-f85f36c6.system.entry.js +0 -1
  795. package/dist/mint-components/p-f9ada3d7.system.js +0 -1
  796. package/dist/mint-components/p-f9cb55dc.entry.js +0 -1
  797. package/dist/mint-components/p-faf66fdb.js +0 -17
  798. package/dist/mint-components/p-fb1b6fdf.js +0 -1
  799. package/dist/mint-components/p-fcd03042.entry.js +0 -1
  800. package/dist/mint-components/p-fd281e6b.system.entry.js +0 -1
  801. package/dist/mint-components/p-fee468b7.system.entry.js +0 -1
  802. package/dist/mint-components/p-fee6801c.js +0 -1
@@ -0,0 +1,2583 @@
1
+ import { h, c as Host, d as getAssetPath, g as getElement } from './index-17b4da69.js';
2
+ import { k as useState } from './stencil-hooks.module-acc8a613.js';
3
+ import { i as intl } from './global-a8e9f822.js';
4
+ import { d as dist, M, n as ne, x, b as mn, D as De, f as D } from './index.module-2821f17d.js';
5
+ import { H as HostBlock, A as AuthWrapper, a as AuthColumn, b as AuthButtonsContainer, E as ErrorStyles } from './mixins-10353a39.js';
6
+ import { c as createStyleSheet } from './JSS-96eeab98.js';
7
+ import { l as luxon } from './luxon-f44215d9.js';
8
+ import { l as luxonLocale } from './utils-1d345130.js';
9
+ import { T as TextSpanView } from './sqm-text-span-view-7e61c95c.js';
10
+ import { P as PortalContainerView } from './sqm-portal-container-view-f74db584.js';
11
+ import { P as PortalSectionView } from './sqm-portal-section-view-88a80af9.js';
12
+
13
+ const medium = {
14
+ facebook: { color: "#1877f2", text: "#fff", icon: "facebook" },
15
+ twitter: { color: "#1da1f2", text: "#fff", icon: "twitter" },
16
+ email: { color: "#666666", text: "#fff", icon: "envelope" },
17
+ direct: { color: "var(--sl-color-primary-500)", text: "#fff", icon: "send" },
18
+ linkedin: { color: "#0077b5", text: "#fff", icon: "linkedin" },
19
+ sms: { color: "#34DA50", text: "#fff", icon: "chat" },
20
+ fbmessenger: { color: "#0084ff", text: "#fff", icon: "messenger" },
21
+ whatsapp: { color: "#25d366", text: "#fff", icon: "whatsapp" },
22
+ linemessenger: { color: "#00B300", text: "#fff", icon: "line" },
23
+ pinterest: { color: "#e60023", text: "#fff", icon: "pinterest" },
24
+ };
25
+ function ShareButtonView(props, children) {
26
+ const vanillaStyle = `
27
+ *::part(base) {
28
+ --sl-focus-ring-color-primary: ${props.backgroundcolor
29
+ ? props.backgroundcolor
30
+ : props.medium
31
+ ? medium[props.medium].color
32
+ : ""}80!important;
33
+
34
+ background: ${props.backgroundcolor
35
+ ? props.backgroundcolor
36
+ : props.medium
37
+ ? medium[props.medium].color
38
+ : ""};
39
+ color: ${props.textcolor
40
+ ? props.textcolor
41
+ : props.medium
42
+ ? medium[props.medium].text
43
+ : ""};
44
+ border-radius: ${props.borderradius ? props.borderradius + "px" : ""};
45
+ }
46
+
47
+ *::part(base):hover {
48
+ border-color: ${props.backgroundcolor
49
+ ? props.backgroundcolor
50
+ : props.medium
51
+ ? medium[props.medium].color
52
+ : ""}D1!important;
53
+ }
54
+
55
+ *::part(base):focus {
56
+ border-color: ${props.backgroundcolor
57
+ ? props.backgroundcolor
58
+ : props.medium
59
+ ? medium[props.medium].color
60
+ : ""}D1!important;
61
+ }
62
+
63
+ *::part(label) {
64
+ position: relative;
65
+ top: 2%;
66
+ }
67
+ `;
68
+ const style = {
69
+ HostBlock: HostBlock,
70
+ buttonStyle: {
71
+ display: "flex",
72
+ alignItems: "center",
73
+ justifyContent: "center",
74
+ lineHeight: "0",
75
+ },
76
+ };
77
+ const sheet = createStyleSheet(style);
78
+ const styleString = sheet.toString();
79
+ return props.hide ? (h(Host, { style: { display: "none" } })) : (h("div", null,
80
+ h("style", { type: "text/css" }, styleString),
81
+ h("style", { type: "text/css" }, vanillaStyle),
82
+ 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` },
83
+ !props.hideicon && (h("sl-icon", { slot: props.iconslot || "prefix", name: props.icon ? props.icon : medium[props.medium].icon, exportparts: "icon" })),
84
+ !props.hidetext && children)));
85
+ }
86
+
87
+ const style = {
88
+ HostBlock: HostBlock,
89
+ inputStyle: {
90
+ "&::part(base)": { background: "white", opacity: "1", cursor: "pointer" },
91
+ },
92
+ };
93
+ const sheet = createStyleSheet(style);
94
+ const styleString = sheet.toString();
95
+ function ShareLinkView(props) {
96
+ return (h("div", null,
97
+ h("style", { type: "text/css" }, styleString),
98
+ h("sl-tooltip", { trigger: "manual", content: props.tooltiptext, placement: "top-end", disabled: props.disabled, open: props.open },
99
+ h("sl-input", { class: sheet.classes.inputStyle, exportparts: "label: input-label", value: props.shareString, readonly: true },
100
+ 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 })))));
101
+ }
102
+
103
+ const style$1 = {
104
+ Leaderboard: {
105
+ "& table": {
106
+ width: "100%",
107
+ borderCollapse: "collapse",
108
+ },
109
+ "& th": {
110
+ textAlign: "left",
111
+ padding: "var(--sl-spacing-medium)",
112
+ paddingTop: "0",
113
+ fontSize: "var(--sl-font-size-medium)",
114
+ fontWeight: "var(--sl-font-weight-semibold)",
115
+ },
116
+ "& tr:not(:first-child)": {
117
+ borderTop: "1px solid var(--sl-color-neutral-200)",
118
+ },
119
+ "& td": {
120
+ fontSize: "var(--sl-font-size-medium)",
121
+ fontWeight: "var(--sl-font-weight-normal)",
122
+ },
123
+ "& .ellipses": {
124
+ textAlign: "center",
125
+ padding: "0",
126
+ color: "var(--sl-color-neutral-500)",
127
+ },
128
+ "& .highlight": {
129
+ background: "var(--sl-color-primary-50)",
130
+ },
131
+ "& td, th": {
132
+ color: "var(--sl-color-gray-800)",
133
+ padding: "var(--sl-spacing-medium)",
134
+ },
135
+ "& .User": {
136
+ width: "100%",
137
+ },
138
+ "& .Score": {
139
+ width: "auto",
140
+ whiteSpace: "nowrap",
141
+ },
142
+ },
143
+ };
144
+ const sheet$1 = createStyleSheet(style$1);
145
+ const styleString$1 = sheet$1.toString();
146
+ const vanillaStyle = `
147
+ :host{
148
+ display: block;
149
+ }
150
+ `;
151
+ function LeaderboardView(props) {
152
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
153
+ const { states, data, elements } = props;
154
+ const { styles } = states;
155
+ console.log("LEADERBOARD PROPS", props);
156
+ if (states.loading)
157
+ return (h("div", { class: sheet$1.classes.Leaderboard },
158
+ h("style", { type: "text/css" },
159
+ styleString$1,
160
+ vanillaStyle),
161
+ elements.loadingstate));
162
+ let userSeenFlag = false;
163
+ return (h("div", { class: sheet$1.classes.Leaderboard },
164
+ h("style", { type: "text/css" },
165
+ styleString$1,
166
+ vanillaStyle),
167
+ h("table", null,
168
+ h("tr", null,
169
+ styles.showRank && h("th", { class: "Rank" }, styles.rankheading),
170
+ h("th", { class: "User" }, styles.usersheading),
171
+ h("th", { class: "Score" }, styles.statsheading)),
172
+ !states.hasLeaders && (h("tr", null,
173
+ h("td", { colSpan: 100 }, elements.empty))), (_a = data.leaderboard) === null || _a === void 0 ? void 0 :
174
+ _a.map((user) => {
175
+ var _a, _b;
176
+ if (user.rowNumber === ((_a = data.userRank) === null || _a === void 0 ? void 0 : _a.rowNumber))
177
+ userSeenFlag = true;
178
+ return (h("tr", { class: user.rowNumber === ((_b = data.userRank) === null || _b === void 0 ? void 0 : _b.rowNumber) ? "highlight" : "" },
179
+ styles.showRank && h("td", { class: "Rank" }, user.rank),
180
+ h("td", { class: "User" }, user.firstName && user.lastInitial
181
+ ? user.firstName + " " + user.lastInitial
182
+ : user.firstName || user.lastInitial
183
+ ? user.firstName || user.lastInitial
184
+ : styles.anonymousUser || "Anonymous User"),
185
+ h("td", { class: "Score" }, user.value)));
186
+ }),
187
+ states.hasLeaders && !userSeenFlag && data.showUser && (h("tr", null,
188
+ h("td", { colSpan: 100, class: "ellipses" },
189
+ h("sl-icon", { name: "three-dots", style: { verticalAlign: "middle" } })))),
190
+ states.hasLeaders && !userSeenFlag && data.showUser && (h("tr", { class: "highlight" },
191
+ styles.showRank && (h("td", { class: "Rank" }, ((_b = data.userRank) === null || _b === void 0 ? void 0 : _b.rank) || "-")),
192
+ 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)
193
+ ? ((_e = data.userRank) === null || _e === void 0 ? void 0 : _e.firstName) + " " + ((_f = data.userRank) === null || _f === void 0 ? void 0 : _f.lastInitial)
194
+ : ((_g = data.userRank) === null || _g === void 0 ? void 0 : _g.firstName) || ((_h = data.userRank) === null || _h === void 0 ? void 0 : _h.lastInitial)
195
+ ? ((_j = data.userRank) === null || _j === void 0 ? void 0 : _j.firstName) || ((_k = data.userRank) === null || _k === void 0 ? void 0 : _k.lastInitial)
196
+ : styles.anonymousUser || "Anonymous User"),
197
+ h("td", { class: "Score" }, ((_l = data.userRank) === null || _l === void 0 ? void 0 : _l.value) || "0"))))));
198
+ }
199
+
200
+ const style$2 = {
201
+ HostBlock: HostBlock,
202
+ ":host": {
203
+ "min-height": "100vh",
204
+ },
205
+ Frame: {
206
+ "min-height": "100vh",
207
+ display: "flex",
208
+ "flex-direction": "column",
209
+ "box-sizing": "border-box",
210
+ },
211
+ FooterWrapper: {
212
+ width: "100%",
213
+ "max-width": "100%",
214
+ padding: "var(--sl-spacing-medium) var(--sl-spacing-x-large)",
215
+ background: "var(--sqm-footer-background)",
216
+ display: "flex",
217
+ "justify-content": "flex-end",
218
+ "align-items": "center",
219
+ "box-sizing": "border-box",
220
+ "margin-top": "auto",
221
+ },
222
+ HeaderWrapper: {
223
+ width: "100%",
224
+ "max-width": "100%",
225
+ "box-sizing": "border-box",
226
+ display: "flex",
227
+ "justify-content": "space-between",
228
+ padding: "var(--sl-spacing-small) var(--sl-spacing-large)",
229
+ "align-items": "center",
230
+ "background-color": "var(--sqm-header-background)",
231
+ "@media screen and (max-width: 499px)": {
232
+ "flex-direction": "row-reverse",
233
+ "justify-content": "flex-end",
234
+ padding: "0",
235
+ },
236
+ },
237
+ };
238
+ const sheet$2 = createStyleSheet(style$2);
239
+ const styleString$2 = sheet$2.toString();
240
+ function PortalFrameView(props, children) {
241
+ const { data } = props;
242
+ return (h("div", { class: sheet$2.classes.Frame },
243
+ h("style", { type: "text/css" }, styleString$2),
244
+ h("div", { class: sheet$2.classes.HeaderWrapper },
245
+ data.header,
246
+ h("slot", { name: "sqm-navigation-menu" })),
247
+ children,
248
+ h("div", { class: sheet$2.classes.FooterWrapper }, data.footer)));
249
+ }
250
+
251
+ const EditProfileView = (props) => {
252
+ var _a, _b, _c, _d;
253
+ const { states, callbacks } = props;
254
+ const { text } = states;
255
+ const { errors } = states.formState;
256
+ if (states.showEdit) {
257
+ return (h("div", { class: `CardWrapper ${!states.showEdit && "ShowEdit"}` },
258
+ h("h2", { style: {
259
+ fontSize: "var(--sl-font-size-x-large)",
260
+ margin: "0px",
261
+ textAlign: "center",
262
+ } }, text.editprofileheader),
263
+ h("form", { class: "FormWrapper", onSubmit: callbacks.onSubmit },
264
+ h("div", { class: "FormSection" },
265
+ states.formState.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
266
+ h("div", { part: "erroralert-text" }, states.formState.error))),
267
+ 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"
268
+ ? { class: "ErrorStyles", helpText: "Cannot be empty" }
269
+ : []), { id: "firstName", name: "firstName", error: errors.firstName && errors.firstName.status !== "valid"
270
+ ? errors.firstName.message
271
+ : undefined })),
272
+ 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"
273
+ ? { class: "ErrorStyles", helpText: "Cannot be empty" }
274
+ : []), { error: errors.lastName && errors.lastName.status !== "valid"
275
+ ? errors.lastName.message
276
+ : undefined }))),
277
+ text.showregion && states.formState.currentRegion && (h("sl-input", { exportparts: "label: input-label", disabled: true, value: states.formState.currentRegion, label: text.currentregiontext, id: "currentRegion", name: "currentRegion" })),
278
+ h("div", { class: "ButtonWrapper" },
279
+ h("sl-button", { onClick: () => {
280
+ callbacks.setShowEdit(false);
281
+ }, exportparts: "base: defaultbutton-base" }, text.canceltext),
282
+ h("sl-button", { type: "primary", loading: states.loading, disabled: states.submitDisabled, onClick: (e) => {
283
+ callbacks.onSubmit(e);
284
+ }, submit: true, exportparts: "base: primarybutton-base" }, text.updatetext)))));
285
+ }
286
+ return (h("div", { class: `CardWrapper FormWrapper ${!states.showEdit && "ShowEdit"}` },
287
+ h("div", { class: "FormSection" },
288
+ h("h2", { style: {
289
+ fontSize: "var(--sl-font-size-x-large",
290
+ marginBottom: "0px",
291
+ textAlign: "center",
292
+ } }, text.editprofileheader),
293
+ h("div", null,
294
+ h("p", { style: { fontSize: "var(--sl-font-size-medium)" } }, (_a = states.user) === null || _a === void 0 ? void 0 :
295
+ _a.firstName,
296
+ " ", (_b = states.user) === null || _b === void 0 ? void 0 :
297
+ _b.lastName),
298
+ 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))),
299
+ h("sl-button", { type: "primary", loading: states.loading, onClick: () => {
300
+ callbacks.resetForm();
301
+ callbacks.setShowEdit(true);
302
+ }, exportparts: "base: primarybutton-base" }, text.editprofiletext)));
303
+ };
304
+
305
+ const MessageLinkQuery = dist.gql `
306
+ query ($programId: ID) {
307
+ user: viewer {
308
+ ... on User {
309
+ shareLink(programId: $programId)
310
+ }
311
+ }
312
+ }
313
+ `;
314
+ const WIDGET_ENGAGEMENT_EVENT = dist.gql `
315
+ mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
316
+ createUserAnalyticsEvent(eventMeta: $eventMeta)
317
+ }
318
+ `;
319
+ function useShareLink(props) {
320
+ var _a, _b;
321
+ const { programId = M() } = props;
322
+ const user = ne();
323
+ const engagementMedium = x();
324
+ const { data } = mn(MessageLinkQuery, { programId }, !(user === null || user === void 0 ? void 0 : user.jwt));
325
+ const [sendLoadEvent] = De(WIDGET_ENGAGEMENT_EVENT);
326
+ 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 :
327
+ // Shown during loading
328
+ "...";
329
+ const [open, setOpen] = useState(false);
330
+ function onClick() {
331
+ // Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
332
+ // Only if called from a user-initiated event
333
+ navigator.clipboard.writeText(shareString);
334
+ setOpen(true);
335
+ setTimeout(() => setOpen(false), props.tooltiplifespan);
336
+ sendLoadEvent({
337
+ eventMeta: {
338
+ programId,
339
+ id: user === null || user === void 0 ? void 0 : user.id,
340
+ accountId: user === null || user === void 0 ? void 0 : user.accountId,
341
+ type: "USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",
342
+ meta: {
343
+ engagementMedium,
344
+ shareMedium: "DIRECT",
345
+ },
346
+ },
347
+ });
348
+ }
349
+ return { ...props, onClick, open, shareString };
350
+ }
351
+
352
+ const MessageLinkQuery$1 = dist.gql `
353
+ query (
354
+ $programId: ID
355
+ $engagementMedium: UserEngagementMedium!
356
+ $shareMedium: ReferralShareMedium!
357
+ ) {
358
+ viewer {
359
+ ... on User {
360
+ messageLink(
361
+ programId: $programId
362
+ engagementMedium: $engagementMedium
363
+ shareMedium: $shareMedium
364
+ )
365
+ shareLink(programId: $programId, engagementMedium: $engagementMedium)
366
+ }
367
+ }
368
+ }
369
+ `;
370
+ function NativeShare(props, directLink) {
371
+ const title = props.sharetitle || "Share title";
372
+ const text = props.sharetext || "Share text";
373
+ if (directLink === "undefined") {
374
+ return alert("error: message link undefined!");
375
+ }
376
+ if (window.navigator.share) {
377
+ window.navigator
378
+ .share({
379
+ title,
380
+ text,
381
+ url: directLink,
382
+ })
383
+ .catch((error) => console.error("Error on web share", error));
384
+ }
385
+ else {
386
+ alert("Not on a supported device");
387
+ }
388
+ }
389
+ function FacebookShare(directLink, res) {
390
+ var _a, _b;
391
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.messageLink) === "undefined" ||
392
+ directLink === "undefined") {
393
+ return alert("error: message link undefined!");
394
+ }
395
+ if (typeof SquatchAndroid.shareOnFacebook !== "undefined") {
396
+ return SquatchAndroid.shareOnFacebook(directLink, res.data.viewer.messageLink);
397
+ }
398
+ else {
399
+ return GenericShare(res);
400
+ }
401
+ }
402
+ function GenericShare(res) {
403
+ var _a, _b;
404
+ 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)
405
+ : alert("error: message link undefined!");
406
+ }
407
+ function useShareButton(props) {
408
+ var _a, _b;
409
+ const { sharetitle, sharetext, medium } = props;
410
+ const programId = props.programId ? props.programId : M();
411
+ const user = ne();
412
+ const variables = {
413
+ engagementMedium: x(),
414
+ programId: programId,
415
+ shareMedium: medium.toUpperCase(),
416
+ };
417
+ // only queries if a programId is available
418
+ const res = mn(MessageLinkQuery$1, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId);
419
+ 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;
420
+ const environment = D();
421
+ const hide = (medium.toLocaleUpperCase() === "SMS" &&
422
+ window.orientation === undefined) ||
423
+ (medium.toLocaleUpperCase() === "DIRECT" && !window.navigator.share);
424
+ function onClick() {
425
+ if (medium.toLocaleUpperCase() === "FACEBOOK" &&
426
+ environment.type === "SquatchAndroid") {
427
+ FacebookShare(directLink, res);
428
+ }
429
+ else if (medium.toLocaleUpperCase() === "DIRECT") {
430
+ NativeShare({ sharetitle, sharetext }, directLink);
431
+ }
432
+ else {
433
+ GenericShare(res);
434
+ }
435
+ }
436
+ return { ...props, loading: res.loading, onClick, hide };
437
+ }
438
+
439
+ function PortalChangePasswordView(props) {
440
+ const { states, callbacks } = props;
441
+ const style = {
442
+ Dialog: {
443
+ padding: "0",
444
+ "&::part(close-button)": {
445
+ "margin-top": "var(--sl-spacing-medium)",
446
+ },
447
+ "&::part(body)": {
448
+ padding: "0 var(--sl-spacing-x-large) var(--sl-spacing-x-large) var(--sl-spacing-x-large)",
449
+ },
450
+ },
451
+ Error: {
452
+ "&::part(erroralert-base)": {
453
+ "margin-bottom": "15px",
454
+ },
455
+ },
456
+ Success: {
457
+ "&::part(successalert-base)": {
458
+ "margin-bottom": "15px",
459
+ },
460
+ },
461
+ InputContainer: {
462
+ "& > :not(:last-child)": {
463
+ "margin-bottom": "var(--sl-spacing-x-large)",
464
+ },
465
+ },
466
+ CancelButton: {
467
+ width: "25%",
468
+ margin: "var(--sl-spacing-large) auto",
469
+ },
470
+ PasswordField: {
471
+ marginBottom: "var(--sl-spacing-large) !important",
472
+ display: "block",
473
+ },
474
+ ChangePasswordButton: {
475
+ paddingTop: "var(--sl-spacing-x-large)",
476
+ },
477
+ };
478
+ const sheet = createStyleSheet(style);
479
+ const styleString = sheet.toString();
480
+ return (h("div", null,
481
+ h("style", { type: "text/css" }, styleString),
482
+ h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, "onSl-hide": () => callbacks.setOpen(false) },
483
+ h(PortalSectionView, Object.assign({}, {
484
+ labelMargin: "x-large",
485
+ padding: "none",
486
+ label: (h(TextSpanView, Object.assign({}, { type: "h2" }), states.content.modalChangePasswordHeader)),
487
+ content: (h(PortalContainerView, Object.assign({}, { direction: "column", padding: "none", gap: "32px" }),
488
+ states.error && (h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
489
+ h("div", { part: "erroralert-text" }, states.error))),
490
+ states.success && (h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
491
+ h("div", { part: "successalert-text" }, states.content.successMessage))),
492
+ h("sl-form", { "onSl-submit": callbacks.submit },
493
+ h("div", { class: sheet.classes.InputContainer },
494
+ h("sqm-password-field", { exportparts: "input-label: input-label", class: sheet.classes.PasswordField, fieldLabel: states.content.passwordFieldLabel }),
495
+ h("sl-input", { exportparts: "label: input-label", name: "/confirmPassword", label: states.content.confirmPasswordFieldLabel, required: true, togglePassword: true, disabled: states.loading, type: "password" })),
496
+ h(PortalContainerView, Object.assign({}, { direction: "row", padding: "none", gap: "20px" }),
497
+ h("sl-button", { class: sheet.classes.ChangePasswordButton, type: "primary", submit: true, loading: states.loading }, states.content.changePasswordButtonText),
498
+ h("sl-button", { class: sheet.classes.CancelButton, type: "text", onClick: () => callbacks.setOpen(false) }, states.content.cancelText))))),
499
+ }))),
500
+ h(PortalSectionView, Object.assign({}, {
501
+ labelMargin: "x-large",
502
+ padding: "xxx-large",
503
+ label: (h(TextSpanView, Object.assign({}, { type: "h2" }), states.content.portalChangePasswordHeader)),
504
+ content: (h("sl-button", { onClick: () => callbacks.setOpen(true) }, states.content.portalChangePasswordButtonText)),
505
+ }),
506
+ h("style", { type: "text/css" }, styleString))));
507
+ }
508
+
509
+ const style$3 = {
510
+ Wrapper: AuthWrapper,
511
+ Column: AuthColumn,
512
+ ForgotButtonContainer: {
513
+ display: "inline",
514
+ cursor: "pointer",
515
+ "font-size": "13px",
516
+ "font-weight": "600",
517
+ color: "#AAAAAA",
518
+ margin: "0",
519
+ },
520
+ ButtonsContainer: AuthButtonsContainer,
521
+ };
522
+ const vanillaStyle$1 = `
523
+ :host {
524
+ display: block;
525
+ }
526
+ :host([hidden]): {
527
+ display: none;
528
+ }
529
+ `;
530
+ const sheet$3 = createStyleSheet(style$3);
531
+ const styleString$3 = sheet$3.toString();
532
+ function PortalLoginView(props) {
533
+ const { states, callbacks, content } = props;
534
+ return (h("div", { class: sheet$3.classes.Wrapper },
535
+ h("style", { type: "text/css" },
536
+ vanillaStyle$1,
537
+ styleString$3),
538
+ h(TextSpanView, { type: "h3" }, content.pageLabel),
539
+ h("sl-form", { class: sheet$3.classes.Column, "onSl-submit": callbacks.submit },
540
+ props.states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
541
+ h("div", { part: "erroralert-text" }, props.states.error))),
542
+ h("sl-input", { exportparts: "label: input-label", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true }),
543
+ h("div", null,
544
+ h("sl-input", { exportparts: "label: input-label", type: "password", name: "/password", label: content.passwordLabel || "Password", disabled: states.loading, required: true }),
545
+ h("div", { class: sheet$3.classes.ForgotButtonContainer }, content.forgotPasswordButton)),
546
+ h("div", { class: sheet$3.classes.ButtonsContainer },
547
+ h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Login"),
548
+ content.secondaryButton))));
549
+ }
550
+
551
+ const style$4 = {
552
+ Wrapper: { ...AuthWrapper, "max-width": "600px" },
553
+ Column: AuthColumn,
554
+ HostBlock: HostBlock,
555
+ ":host": {
556
+ margin: "0 auto",
557
+ width: "100%",
558
+ },
559
+ ButtonsContainer: AuthButtonsContainer,
560
+ ErrorStyle: ErrorStyles,
561
+ };
562
+ const vanillaStyle$2 = `
563
+ sqm-portal-register {
564
+ margin: 0 auto;
565
+ width: 100%;
566
+ display: block;
567
+ }
568
+
569
+ :host{
570
+ display: block;
571
+ }
572
+
573
+ :host([hidden]) {
574
+ display: none;
575
+ }
576
+ `;
577
+ const sheet$4 = createStyleSheet(style$4);
578
+ const styleString$4 = sheet$4.toString();
579
+ function PortalRegisterView(props) {
580
+ var _a, _b, _c, _d, _e, _f, _g, _h;
581
+ const { states, refs, callbacks, content } = props;
582
+ if (states.error) {
583
+ window.scrollTo({ top: 0, left: 0, behavior: "smooth" });
584
+ }
585
+ return (h("div", { class: sheet$4.classes.Wrapper },
586
+ h("style", { type: "text/css" },
587
+ vanillaStyle$2,
588
+ styleString$4),
589
+ h(TextSpanView, { type: "h3" }, content.pageLabel),
590
+ h("sl-form", { class: sheet$4.classes.Column, "onSl-submit": callbacks.submit, ref: (el) => (refs.formRef.current = el), novalidate: true },
591
+ states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
592
+ h("div", { part: "erroralert-text" }, props.states.error))),
593
+ content.formData,
594
+ !states.hideInputs && (h("sl-input", Object.assign({ exportparts: "label: input-label", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true, validationError: ({ value }) => {
595
+ if (!value) {
596
+ return "Cannot be empty";
597
+ }
598
+ // this matches shoelace validation, but could be better
599
+ if (!value.includes("@")) {
600
+ return "Must be a valid email address";
601
+ }
602
+ } }, (((_b = (_a = states.validationState) === null || _a === void 0 ? void 0 : _a.validationErrors) === null || _b === void 0 ? void 0 : _b.email) ? {
603
+ class: sheet$4.classes.ErrorStyle,
604
+ helpText: ((_d = (_c = states.validationState) === null || _c === void 0 ? void 0 : _c.validationErrors) === null || _d === void 0 ? void 0 : _d.email) ||
605
+ "Cannot be empty",
606
+ }
607
+ : [])))),
608
+ !states.hideInputs && (h("sqm-password-field", { fieldLabel: content.passwordLabel, "enable-validation": states.enablePasswordValidation })),
609
+ content.passwordField,
610
+ !states.hideInputs && states.confirmPassword && (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) ? {
611
+ class: sheet$4.classes.ErrorStyle,
612
+ helpText: ((_h = (_g = states.validationState) === null || _g === void 0 ? void 0 : _g.validationErrors) === null || _h === void 0 ? void 0 : _h.confirmPassword) ||
613
+ "Cannot be empty",
614
+ }
615
+ : [])))),
616
+ content.terms,
617
+ h("div", { class: sheet$4.classes.ButtonsContainer },
618
+ h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"),
619
+ content.secondaryButton))));
620
+ }
621
+
622
+ const style$5 = {
623
+ Description: {
624
+ "& input[type=checkbox]": {
625
+ display: "none",
626
+ },
627
+ "& input:checked ~ .details": {
628
+ transform: "rotate(-180deg)",
629
+ },
630
+ "& .details": {
631
+ position: "absolute",
632
+ top: "var(--sl-spacing-medium)",
633
+ right: "var(--sl-spacing-medium)",
634
+ color: "var(--sl-color-neutral-700)",
635
+ fontSize: "var(--sl-font-size-large)",
636
+ "& :hover": {
637
+ color: "var(--sl-color-primary-700)",
638
+ },
639
+ transformOrigin: "50% 37%",
640
+ transition: "transform var(--sl-transition-medium) ease",
641
+ cursor: "pointer",
642
+ },
643
+ "& input:checked ~ .summary": {
644
+ transition: "all var(--sl-transition-medium) ease",
645
+ maxHeight: "300px",
646
+ marginBottom: "var(--sl-spacing-x-large)",
647
+ },
648
+ "& input:checked ~ .summary[progress-bar]": {
649
+ marginBottom: "var(--sl-spacing-xx-large)",
650
+ },
651
+ "& .summary": {
652
+ display: "block",
653
+ overflow: "hidden",
654
+ fontSize: "var(--sl-font-size-small)",
655
+ maxHeight: "0px",
656
+ transition: "all var(--sl-transition-fast) ease-out",
657
+ marginBottom: "var(--sl-spacing-medium)",
658
+ },
659
+ },
660
+ };
661
+ const sheet$5 = createStyleSheet(style$5);
662
+ const styleString$5 = sheet$5.toString();
663
+ function Details(props) {
664
+ const rid = Math.random().toString(36).slice(2);
665
+ return (h("div", null,
666
+ h("style", { type: "text/css" }, styleString$5),
667
+ h("span", { class: sheet$5.classes.Description },
668
+ h("input", { type: "checkbox", id: "details-" + rid }),
669
+ h("label", { class: "details", htmlFor: "details-" + rid },
670
+ h("sl-icon", { name: "chevron-down" })),
671
+ h("span", { class: "summary", "progress-bar": props.progressBar }, props.content.description))));
672
+ }
673
+
674
+ const Gift = () => {
675
+ return (h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
676
+ 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" }),
677
+ 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" }),
678
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M1.5 9V10H14.5V9H1.5Z", fill: "#BE9720" }),
679
+ 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" })));
680
+ };
681
+
682
+ const style$6 = {
683
+ ProgressBar: {
684
+ "& .progress-bar": {
685
+ height: "0",
686
+ marginTop: "var(--sl-spacing-large)",
687
+ marginBottom: "var(--sl-spacing-xxx-large)",
688
+ marginRight: "var(--sl-spacing-x-small)",
689
+ fontSize: "var(--sl-font-size-x-small)",
690
+ display: "grid",
691
+ lineHeight: "45px",
692
+ userSelect: "none",
693
+ },
694
+ "&[data-steps]": {
695
+ marginTop: "calc(-1*var(--sl-spacing-x-small))",
696
+ },
697
+ "&[data-steps] .progress-bar": {
698
+ marginTop: "var(--sl-spacing-medium)",
699
+ },
700
+ "&[data-expired] .progress-bar": {
701
+ filter: "grayscale(1)",
702
+ },
703
+ "& .progress-bar.repeatable-steps": {
704
+ marginLeft: "var(--sl-spacing-x-small)",
705
+ },
706
+ "& .filled:after": {
707
+ content: '""',
708
+ display: "flex",
709
+ width: "100%",
710
+ height: "4px",
711
+ borderRadius: "4px",
712
+ backgroundColor: "var(--sl-color-primary-300)",
713
+ },
714
+ "& .progress": {
715
+ display: "block",
716
+ textAlign: "center",
717
+ marginLeft: "-100px",
718
+ marginRight: "-100px",
719
+ },
720
+ "& .progress::after": {
721
+ content: '""',
722
+ width: "12px",
723
+ height: "12px",
724
+ display: "flex",
725
+ backgroundColor: "var(--sl-color-primary-300)",
726
+ borderRadius: "50%",
727
+ position: "relative",
728
+ left: "47%",
729
+ top: "-85%",
730
+ },
731
+ "& .progress.bg:after": {
732
+ width: "0",
733
+ height: "0",
734
+ border: "none",
735
+ },
736
+ "& .progress.top": {
737
+ position: "relative",
738
+ top: "-40px",
739
+ },
740
+ "& .progress.top:after": {
741
+ top: "-16%",
742
+ },
743
+ "& .empty": {
744
+ display: "block",
745
+ textAlign: "center",
746
+ marginLeft: "-100px",
747
+ marginRight: "-100px",
748
+ },
749
+ "& .empty::after": {
750
+ content: '""',
751
+ width: "12px",
752
+ height: "12px",
753
+ border: "2px solid #E0E0E0",
754
+ margin: "-2px",
755
+ display: "flex",
756
+ backgroundColor: "white",
757
+ borderRadius: "50%",
758
+ position: "relative",
759
+ left: "47%",
760
+ top: "-85%",
761
+ },
762
+ "& .empty.bg:after": {
763
+ width: "0",
764
+ height: "0",
765
+ border: "none",
766
+ },
767
+ "& .remain:after": {
768
+ content: '""',
769
+ display: "flex",
770
+ width: "100%",
771
+ height: "4px",
772
+ borderRadius: "4px",
773
+ backgroundColor: "#E0E0E0",
774
+ },
775
+ "& .gift.bw": {
776
+ filter: "grayscale(100%)",
777
+ },
778
+ "& .gift.start": {
779
+ transform: "scale(80%)",
780
+ top: "-20px",
781
+ },
782
+ "& .gift": {
783
+ textAlign: "center",
784
+ marginLeft: "-100px",
785
+ marginRight: "-100px",
786
+ position: "relative",
787
+ top: "-18px",
788
+ },
789
+ },
790
+ };
791
+ const sheet$6 = createStyleSheet(style$6, { classNamePrefix: "sqm-prog-bar" });
792
+ const styleString$6 = sheet$6.toString();
793
+ function ProgressBarView(props) {
794
+ var _a;
795
+ const { progress = 0, goal = 1, steps = false, progressBarUnit = "", repeatable = false, expired = false, finite = 0, } = props;
796
+ let aggregate = buildProgressBar(repeatable, steps, props);
797
+ const { columns, items } = aggregate;
798
+ //@ts-ignore
799
+ console.log("PROGRESS BAR PROPS " + ((_a = props === null || props === void 0 ? void 0 : props.content) === null || _a === void 0 ? void 0 : _a.cardTitle));
800
+ console.log({ props });
801
+ return (h("div", { class: sheet$6.classes.ProgressBar, "data-expired": expired, "data-steps": steps, "data-done": goal <= progress },
802
+ h("style", { type: "text/css" }, styleString$6),
803
+ h("div", { class: (!Boolean(finite) && progress >= 2 * goal) ||
804
+ (Boolean(finite) && progress > 2 * goal)
805
+ ? "progress-bar repeatable-steps"
806
+ : "progress-bar", style: {
807
+ gridTemplateColumns: columns,
808
+ marginLeft: progress === 0 && !steps ? "var(--sl-spacing-x-small)" : "",
809
+ } }, items)));
810
+ }
811
+ function buildProgressBar(repeatable, steps, props) {
812
+ if (repeatable) {
813
+ if (steps) {
814
+ return addStepsRepeatable(props);
815
+ }
816
+ else {
817
+ return addLinearRepeatable(props);
818
+ }
819
+ }
820
+ // non repeatable
821
+ else {
822
+ if (steps) {
823
+ return addSteps(props);
824
+ }
825
+ else {
826
+ return addLinear(props);
827
+ }
828
+ }
829
+ }
830
+ function addSteps({ progress, goal }) {
831
+ const items = [];
832
+ const columns = [];
833
+ let ratio = 1 / goal;
834
+ for (let i = 1; i < goal; i++) {
835
+ columns.push(ratio + "fr");
836
+ columns.push("0fr");
837
+ if (i > progress) {
838
+ items.push(h("div", { class: "remain" }));
839
+ items.push(h("div", { class: "empty" }, i));
840
+ }
841
+ else {
842
+ items.push(h("div", { class: "filled" }));
843
+ items.push(h("div", { class: "progress" }, i));
844
+ }
845
+ }
846
+ columns.push(ratio + "fr");
847
+ columns.push("0fr");
848
+ // reward success
849
+ if (goal <= progress) {
850
+ columns.push("0fr");
851
+ items.push(h("div", { class: "filled" }));
852
+ items.push(h("div", { class: "progress bg" }, goal));
853
+ items.push(h("div", { class: "gift" }, h(Gift, null)));
854
+ }
855
+ // reward fail
856
+ else {
857
+ columns.push("0fr");
858
+ items.push(h("div", { class: "remain" }));
859
+ items.push(h("div", { class: "empty bg" }, goal));
860
+ items.push(h("div", { class: "gift bw" }, h(Gift, null)));
861
+ }
862
+ return {
863
+ items,
864
+ columns: columns.join(" "),
865
+ };
866
+ }
867
+ function addLinearRepeatable({ progress, goal, progressBarUnit, finite, }) {
868
+ let repetitions = Math.floor(progress / goal);
869
+ let ratio = ((progress % goal) / goal) * 0.5;
870
+ const items = [];
871
+ let columns = "";
872
+ // 0 repetition
873
+ if (repetitions == 0) {
874
+ columns = ratio + "fr 0fr " + (0.5 - ratio) + "fr 0fr 0fr 0.5fr 0fr 0fr";
875
+ items.push(h("div", { class: "filled" }));
876
+ items.push(h("div", { class: progress == goal ? "progress top bg" : "progress top" }, progressBarUnit + progress));
877
+ items.push(h("div", { class: "remain" }));
878
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal));
879
+ items.push(h("div", { class: progress == goal ? "gift" : "gift bw" },
880
+ h(Gift, null)));
881
+ items.push(h("div", { class: "remain" }));
882
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * 2));
883
+ items.push(h("div", { class: "gift bw" }, h(Gift, null)));
884
+ }
885
+ // single repetition
886
+ else if (repetitions == 1) {
887
+ columns =
888
+ "0.5fr 0fr 0fr " + ratio + "fr 0fr " + (0.5 - ratio) + "fr 0fr 0fr";
889
+ items.push(h("div", { class: "filled" }));
890
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal));
891
+ items.push(h("div", { class: "gift" }, h(Gift, null)));
892
+ items.push(h("div", { class: "filled" }));
893
+ items.push(h("div", { class: progress == goal ? "progress top bg" : "progress top" }, progress == goal ? "" : progressBarUnit + progress));
894
+ items.push(h("div", { class: "remain" }));
895
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * 2));
896
+ items.push(h("div", { class: "gift bw" }, h(Gift, null)));
897
+ }
898
+ // finite repetition hit
899
+ else if (finite && repetitions >= finite) {
900
+ if (repetitions > 2) {
901
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * (finite - 2)));
902
+ items.push(h("div", { class: "gift start" }, h(Gift, null)));
903
+ columns = "0fr 0fr 0.5fr 0fr 0fr 0.5fr 0fr 0fr";
904
+ }
905
+ else {
906
+ columns = "0.5fr 0fr 0fr 0.5fr 0fr 0fr";
907
+ }
908
+ items.push(h("div", { class: "filled" }));
909
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * (finite - 1)));
910
+ items.push(h("div", { class: "gift" }, h(Gift, null)));
911
+ items.push(h("div", { class: "filled" }));
912
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * finite));
913
+ items.push(h("div", { class: "gift" }, h(Gift, null)));
914
+ }
915
+ // multiple repetitions
916
+ else {
917
+ columns =
918
+ "0fr 0fr 0.5fr 0fr 0fr " +
919
+ ratio +
920
+ "fr 0fr " +
921
+ (0.5 - ratio) +
922
+ "fr 0fr 0fr";
923
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * (repetitions - 1)));
924
+ items.push(h("div", { class: "gift start" }, h(Gift, null)));
925
+ items.push(h("div", { class: "filled" }));
926
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * repetitions));
927
+ items.push(h("div", { class: "gift" }, h(Gift, null)));
928
+ items.push(h("div", { class: "filled" }));
929
+ items.push(h("div", { class: progress == goal * repetitions ? "progress top bg" : "progress top" }, progress == goal * repetitions ? "" : progressBarUnit + progress));
930
+ items.push(h("div", { class: "remain" }));
931
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * (repetitions + 1)));
932
+ items.push(h("div", { class: "gift bw" }, h(Gift, null)));
933
+ }
934
+ return { items, columns };
935
+ }
936
+ function addStepsRepeatable({ progress, goal, finite, }) {
937
+ const items = [];
938
+ const columns = [];
939
+ let repetitions = Math.floor(progress / goal);
940
+ // no or single repetition
941
+ if (repetitions < 2) {
942
+ let ratio = 1 / goal;
943
+ for (let i = 1; i < goal * 2 + 1; i++) {
944
+ columns.push(ratio + "fr");
945
+ columns.push("0fr");
946
+ if (i > progress) {
947
+ if (i == goal) {
948
+ columns.push("0fr");
949
+ items.push(h("div", { class: "remain" }));
950
+ items.push(h("div", { class: "empty bg" }, goal));
951
+ items.push(h("div", { class: "gift bw" }, h(Gift, null)));
952
+ }
953
+ else if (i == goal * 2) {
954
+ columns.push("0fr");
955
+ columns.push("0fr");
956
+ items.push(h("div", { class: "remain" }));
957
+ items.push(h("div", { class: "empty bg" }, goal * 2));
958
+ items.push(h("div", { class: "gift bw" }, h(Gift, null)));
959
+ }
960
+ else {
961
+ items.push(h("div", { class: "remain" }));
962
+ items.push(h("div", { class: "empty" }, i));
963
+ }
964
+ }
965
+ else if (i == goal) {
966
+ columns.push("0fr");
967
+ items.push(h("div", { class: "filled" }));
968
+ items.push(h("div", { class: "progress bg" }, i));
969
+ items.push(h("div", { class: "gift" }, h(Gift, null)));
970
+ }
971
+ else {
972
+ items.push(h("div", { class: "filled" }));
973
+ items.push(h("div", { class: "progress" }, i));
974
+ }
975
+ }
976
+ }
977
+ // finite repetition hit
978
+ else if (finite && repetitions >= finite) {
979
+ let ratio = 1 / goal;
980
+ if (repetitions > 2) {
981
+ columns.push("0fr");
982
+ columns.push("0fr");
983
+ items.push(h("div", { class: "progress bg" }, goal * (finite - 2)));
984
+ items.push(h("div", { class: "gift start" }, h(Gift, null)));
985
+ }
986
+ for (let i = 1; i < goal * 2 + 1; i++) {
987
+ columns.push(ratio + "fr");
988
+ columns.push("0fr");
989
+ if (i > progress) {
990
+ if (i == goal) {
991
+ columns.push("0fr");
992
+ items.push(h("div", { class: "remain" }));
993
+ items.push(h("div", { class: "progress bg" }, goal * (finite - 1)));
994
+ items.push(h("div", { class: "gift bw" }, h(Gift, null)));
995
+ }
996
+ }
997
+ else if (i == goal) {
998
+ columns.push("0fr");
999
+ items.push(h("div", { class: "filled" }));
1000
+ items.push(h("div", { class: "progress bg" }, goal * (finite - 1)));
1001
+ items.push(h("div", { class: "gift" }, h(Gift, null)));
1002
+ }
1003
+ else if (i == goal * 2) {
1004
+ columns.push("0fr");
1005
+ columns.push("0fr");
1006
+ items.push(h("div", { class: "filled" }));
1007
+ items.push(h("div", { class: "progress bg" }, goal * finite));
1008
+ items.push(h("div", { class: "gift" }, h(Gift, null)));
1009
+ }
1010
+ else {
1011
+ items.push(h("div", { class: "filled" }));
1012
+ items.push(h("div", { class: "progress" }, i + goal * (finite - 2)));
1013
+ }
1014
+ }
1015
+ }
1016
+ // case repetition many
1017
+ else {
1018
+ let position = (progress % goal) + goal;
1019
+ let ratio = 1 / goal;
1020
+ columns.push("0fr");
1021
+ columns.push("0fr");
1022
+ items.push(h("div", { class: "progress bg" }, goal * (repetitions - 1)));
1023
+ items.push(h("div", { class: "gift start" }, h(Gift, null)));
1024
+ for (let i = 1; i < goal * 2 + 1; i++) {
1025
+ columns.push(ratio + "fr");
1026
+ columns.push("0fr");
1027
+ if (i <= goal) {
1028
+ if (i == goal) {
1029
+ columns.push("0fr");
1030
+ items.push(h("div", { class: "filled" }));
1031
+ items.push(h("div", { class: "progress bg" }, i + goal * (repetitions - 1)));
1032
+ items.push(h("div", { class: "gift" }, h(Gift, null)));
1033
+ }
1034
+ else {
1035
+ items.push(h("div", { class: "filled" }));
1036
+ items.push(h("div", { class: "progress" }, i + goal * (repetitions - 1)));
1037
+ }
1038
+ }
1039
+ else if (i > position) {
1040
+ if (i == goal * 2) {
1041
+ columns.push("0fr");
1042
+ columns.push("0fr");
1043
+ items.push(h("div", { class: "remain" }));
1044
+ items.push(h("div", { class: "empty bg" }, i + goal * (repetitions - 1)));
1045
+ items.push(h("div", { class: "gift bw" }, h(Gift, null)));
1046
+ }
1047
+ else {
1048
+ items.push(h("div", { class: "remain" }));
1049
+ items.push(h("div", { class: "empty" }, i + goal * (repetitions - 1)));
1050
+ }
1051
+ }
1052
+ else {
1053
+ items.push(h("div", { class: "filled" }));
1054
+ items.push(h("div", { class: "progress" }, i + goal * (repetitions - 1)));
1055
+ }
1056
+ }
1057
+ }
1058
+ return { items, columns: columns.join(" ") };
1059
+ }
1060
+ function addLinear({ progress, goal, progressBarUnit, }) {
1061
+ const items = [];
1062
+ let columns = "";
1063
+ const ratio = progress / goal;
1064
+ columns =
1065
+ clamp(ratio, 0, 1) + "fr 0fr " + clamp(1 - ratio, 0, 1) + "fr 0fr 0fr";
1066
+ items.push(h("div", { class: "filled" }));
1067
+ items.push(h("div", { class: clamp(progress, 0, goal) == goal ? "progress top bg" : "progress top" }, clamp(progress, 0, goal) == goal
1068
+ ? ""
1069
+ : progressBarUnit + clamp(progress, 0, goal)));
1070
+ items.push(h("div", { class: "remain" }));
1071
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal));
1072
+ items.push(h("div", { class: clamp(progress, 0, goal) == goal ? "gift" : "gift bw" },
1073
+ h(Gift, null)));
1074
+ return { items, columns };
1075
+ }
1076
+ function clamp(x, min, max) {
1077
+ return Math.min(Math.max(x, min), max);
1078
+ }
1079
+
1080
+ const checkmark_circle = () => {
1081
+ return (h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1082
+ 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" })));
1083
+ };
1084
+ const checkmark_filled = () => {
1085
+ return (h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1086
+ h("circle", { cx: "10", cy: "10", r: "10", fill: "currentColor" }),
1087
+ 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" })));
1088
+ };
1089
+ const arrow_left_right = () => {
1090
+ return (h("svg", { width: 11, height: 12, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1091
+ 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" })));
1092
+ };
1093
+
1094
+ const style$7 = {
1095
+ TaskCard: {
1096
+ display: "inline-block",
1097
+ width: "100%",
1098
+ "& .main": {
1099
+ position: "relative",
1100
+ boxSizing: "border-box",
1101
+ background: "var(--sl-color-neutral-0)",
1102
+ border: "1px solid var(--sl-color-neutral-200)",
1103
+ borderRadius: "var(--sl-border-radius-medium)",
1104
+ boxShadow: "1px 2px 4px rgba(211, 211, 211, 0.2)",
1105
+ fontSize: "var(--sl-font-size-small)",
1106
+ lineHeight: "var(--sl-line-height-dense)",
1107
+ color: "var(--sl-color-neutral-600)",
1108
+ },
1109
+ "& .main.complete": {
1110
+ background: "var(--sl-color-primary-50)",
1111
+ borderColor: "var(--sl-color-primary-500)",
1112
+ },
1113
+ "& .main.expired": {
1114
+ color: "var(--sl-color-neutral-600)",
1115
+ background: "var(--sl-color-neutral-50)",
1116
+ },
1117
+ "& .title": {
1118
+ fontSize: "var(--sl-font-size-medium)",
1119
+ color: "var(--sl-color-neutral-950)",
1120
+ },
1121
+ "& .container": {
1122
+ margin: "var(--sl-spacing-medium)",
1123
+ },
1124
+ "& .container.subdued": {
1125
+ opacity: "0.45",
1126
+ },
1127
+ "& .container > div": {
1128
+ margin: "var(--sl-spacing-medium) 0",
1129
+ },
1130
+ },
1131
+ NotStarted: {
1132
+ fontSize: "var(--sl-font-size-small)",
1133
+ padding: "var(--sl-spacing-medium)",
1134
+ color: "var(--sl-color-primary-600)",
1135
+ border: "1px solid var(--sl-color-neutral-200)",
1136
+ borderRadius: "var(--sl-border-radius-medium) var(--sl-border-radius-medium) 0 0",
1137
+ borderBottom: "none",
1138
+ background: "var(--sl-color-primary-50)",
1139
+ fontWeight: "var(--sl-font-weight-semibold)",
1140
+ lineHeight: "var(--sl-line-height-dense)",
1141
+ "& .icon": {
1142
+ position: "relative",
1143
+ top: "0.1em",
1144
+ marginRight: "var(--sl-spacing-small)",
1145
+ color: "var(--sl-color-primary-500)",
1146
+ },
1147
+ },
1148
+ Ended: {
1149
+ fontSize: "var(--sl-font-size-small)",
1150
+ padding: "var(--sl-spacing-medium)",
1151
+ color: "var(--sl-color-warning-600)",
1152
+ border: "1px solid var(--sl-color-neutral-200)",
1153
+ borderRadius: "var(--sl-border-radius-medium) var(--sl-border-radius-medium) 0 0",
1154
+ borderBottom: "none",
1155
+ background: "var(--sl-color-warning-50)",
1156
+ fontWeight: "var(--sl-font-weight-semibold)",
1157
+ lineHeight: "var(--sl-line-height-dense)",
1158
+ "& .icon": {
1159
+ position: "relative",
1160
+ top: "0.1em",
1161
+ marginRight: "var(--sl-spacing-small)",
1162
+ color: "var(--sl-color-warning-500)",
1163
+ },
1164
+ },
1165
+ Header: {
1166
+ display: "flex",
1167
+ "& .icon": {
1168
+ position: "relative",
1169
+ top: "5%",
1170
+ alignSelf: "center",
1171
+ lineHeight: "0",
1172
+ color: "var(--sl-color-primary-400)",
1173
+ fontSize: "var(--sl-font-size-large)",
1174
+ marginRight: "var(--sl-spacing-x-small)",
1175
+ },
1176
+ "& .value": {
1177
+ alignSelf: "center",
1178
+ fontSize: "var(--sl-font-size-x-large)",
1179
+ fontWeight: "var(--sl-font-weight-semibold)",
1180
+ color: "var(--sl-color-neutral-950)",
1181
+ lineHeight: "100%",
1182
+ marginRight: "var(--sl-spacing-xx-small)",
1183
+ },
1184
+ "& .text": {
1185
+ alignSelf: "end",
1186
+ textTransform: "uppercase",
1187
+ fontSize: "var(--sl-font-size-x-small)",
1188
+ color: "var(--sl-color-neutral-950)",
1189
+ lineHeight: "var(--sl-font-size-medium)",
1190
+ marginRight: "var(--sl-spacing-xx-small)",
1191
+ },
1192
+ "& .end": {
1193
+ color: "var(--sl-color-warning-500)",
1194
+ fontWeight: "var(--sl-font-weight-semibold)",
1195
+ marginBottom: "var(--sl-spacing-xx-small)",
1196
+ },
1197
+ "& .neutral": {
1198
+ color: "var(--sl-color-neutral-400)",
1199
+ },
1200
+ },
1201
+ Footer: {
1202
+ display: "flex",
1203
+ "& .icon": {
1204
+ fontSize: "var(--sl-font-size-xx-small)",
1205
+ marginRight: "var(--sl-spacing-xx-small)",
1206
+ verticalAlign: "middle",
1207
+ },
1208
+ "& .text": {
1209
+ marginTop: "auto",
1210
+ verticalAlign: "text-bottom",
1211
+ fontSize: "var(--sl-font-size-x-small)",
1212
+ color: "var(--sl-color-neutral-400)",
1213
+ },
1214
+ "& .success": {
1215
+ color: "var(--sl-color-primary-500)",
1216
+ fontWeight: "var(--sl-font-weight-semibold)",
1217
+ },
1218
+ "& .action": {
1219
+ marginTop: "auto",
1220
+ marginLeft: "auto",
1221
+ "&::part(base)": {
1222
+ color: "var(--sl-color-neutral-0)",
1223
+ borderRadius: "var(--sl-border-radius-medium)",
1224
+ },
1225
+ "&.disabled::part(base)": {
1226
+ border: "1px solid var(--sl-color-primary-400)",
1227
+ background: "var(--sl-color-primary-400)",
1228
+ },
1229
+ "&.neutral::part(base)": {
1230
+ border: "1px solid var(--sl-color-neutral-400)",
1231
+ background: "var(--sl-color-neutral-400)",
1232
+ },
1233
+ },
1234
+ "& .neutral": {
1235
+ color: "var(--sl-color-neutral-400)",
1236
+ },
1237
+ "& .datetime": {
1238
+ display: "block",
1239
+ marginTop: "var(--sl-spacing-xx-small)",
1240
+ color: "var(--sl-color-neutral-400)",
1241
+ },
1242
+ },
1243
+ };
1244
+ const sheet$7 = createStyleSheet(style$7);
1245
+ const styleString$7 = sheet$7.toString();
1246
+ function TaskCardView(props) {
1247
+ var _a, _b, _c;
1248
+ console.log("TASK CARD PROPS " + ((_a = props === null || props === void 0 ? void 0 : props.content) === null || _a === void 0 ? void 0 : _a.cardTitle));
1249
+ console.log({ props });
1250
+ const { callbacks, states, content } = props;
1251
+ const dateStart = content.rewardDuration &&
1252
+ luxon.DateTime.fromISO(content.rewardDuration.split("/")[0]);
1253
+ const dateEnd = content.rewardDuration &&
1254
+ luxon.DateTime.fromISO(content.rewardDuration.split("/")[1]);
1255
+ const dateToday = luxon.DateTime.now();
1256
+ if (content.displayDuration) {
1257
+ const start = (_b = content.displayDuration.split("/")) === null || _b === void 0 ? void 0 : _b[0];
1258
+ const end = (_c = content.displayDuration.split("/")) === null || _c === void 0 ? void 0 : _c[1];
1259
+ const displayDateStart = start ? luxon.DateTime.fromISO(start) : dateToday;
1260
+ const displayDateEnd = end ? luxon.DateTime.fromISO(end) : dateToday;
1261
+ console.log({ displayDateStart, dateToday, displayDateEnd });
1262
+ if (dateToday < displayDateStart || dateToday > displayDateEnd)
1263
+ return h("span", null);
1264
+ }
1265
+ const checkmark_circle$1 = checkmark_circle();
1266
+ const checkmark_filled$1 = checkmark_filled();
1267
+ const arrow_left_right$1 = arrow_left_right();
1268
+ const showComplete = states.progress >= content.goal;
1269
+ const repetitions = content.showProgressBar
1270
+ ? Math.floor(states.progress / content.goal)
1271
+ : states.progress;
1272
+ const taskComplete = (showComplete && content.repeatable === false) ||
1273
+ (content.finite && states.progress >= content.finite * content.goal);
1274
+ const taskEnded = content.rewardDuration && dateEnd <= dateToday;
1275
+ const taskNotStarted = content.rewardDuration && dateToday <= dateStart;
1276
+ const taskUnavailable = taskEnded || taskNotStarted;
1277
+ const vanillaStyle = `
1278
+ :host{
1279
+ display: block;
1280
+ margin-bottom: var(--sl-spacing-large);
1281
+ }
1282
+ `;
1283
+ return (h("div", { class: sheet$7.classes.TaskCard },
1284
+ h("style", { type: "text/css" },
1285
+ styleString$7,
1286
+ vanillaStyle),
1287
+ !states.loading && taskNotStarted && (h("div", { class: sheet$7.classes.NotStarted },
1288
+ h("span", { class: "icon" },
1289
+ h("sl-icon", { name: "info-circle-fill" })),
1290
+ intl.formatMessage({
1291
+ id: "startsOnMessage",
1292
+ defaultMessage: content.startsOnMessage,
1293
+ }, {
1294
+ startDate: dateStart
1295
+ .setLocale(luxonLocale(states.locale))
1296
+ .toLocaleString(luxon.DateTime.DATETIME_MED),
1297
+ }))),
1298
+ !states.loading && taskEnded && (h("div", { class: sheet$7.classes.Ended },
1299
+ h("span", { class: "icon" },
1300
+ h("sl-icon", { name: "exclamation-triangle-fill" })),
1301
+ intl.formatMessage({
1302
+ id: "endedMessage",
1303
+ defaultMessage: content.endedMessage,
1304
+ }, {
1305
+ endDate: dateEnd
1306
+ .setLocale(luxonLocale(states.locale))
1307
+ .toLocaleString(luxon.DateTime.DATETIME_MED),
1308
+ }))),
1309
+ h("div", { style: {
1310
+ borderRadius: taskUnavailable &&
1311
+ "0 0 var(--sl-border-radius-medium) var(--sl-border-radius-medium)",
1312
+ }, class: taskUnavailable
1313
+ ? "main expired"
1314
+ : taskComplete
1315
+ ? "main complete"
1316
+ : "main" },
1317
+ h("div", { class: taskComplete || taskUnavailable ? "container subdued" : "container" },
1318
+ h("div", { class: sheet$7.classes.Header }, states.loading ? (h("sl-skeleton", { style: { width: "22%", margin: "0" } })) : (h("div", null,
1319
+ showComplete && (h("span", { class: taskUnavailable ? "icon neutral" : "icon" }, taskComplete ? checkmark_filled$1 : checkmark_circle$1)),
1320
+ h("span", { class: "value" }, content.rewardAmount),
1321
+ h("span", { class: "text" }, content.rewardUnit)))),
1322
+ states.loading ? (h("sl-skeleton", { style: { width: "42%", margin: "var(--sl-spacing-medium) 0" } })) : (h("div", { class: "title", style: {
1323
+ marginBottom: !content.description
1324
+ ? content.steps
1325
+ ? "var(--sl-spacing-x-large)"
1326
+ : content.showProgressBar
1327
+ ? "var(--sl-spacing-xx-large)"
1328
+ : ""
1329
+ : "",
1330
+ } }, content.cardTitle)),
1331
+ states.loading ? (h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.description && h(Details, Object.assign({}, props))),
1332
+ content.showProgressBar && states.loading ? (h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.showProgressBar && (h(ProgressBarView, Object.assign({}, props.content, props.states, { complete: taskComplete, expired: taskUnavailable })))),
1333
+ h("div", { class: sheet$7.classes.Footer }, states.loading ? (h("sl-skeleton", { style: { width: "25%", marginLeft: "auto" } })) : (h("div", { style: { display: "contents" } },
1334
+ h("span", { class: "text" },
1335
+ content.repeatable && (h("div", null,
1336
+ h("span", { class: repetitions > 0
1337
+ ? taskUnavailable
1338
+ ? "icon neutral"
1339
+ : "icon success"
1340
+ : "icon" }, arrow_left_right$1),
1341
+ h("span", { class: repetitions > 0
1342
+ ? taskUnavailable
1343
+ ? "neutral"
1344
+ : "success"
1345
+ : "" }, intl.formatMessage({
1346
+ id: "completedMessage",
1347
+ defaultMessage: content.completedText,
1348
+ }, {
1349
+ finite: content.finite,
1350
+ count: content.finite
1351
+ ? Math.min(repetitions, content.finite)
1352
+ : repetitions,
1353
+ })))),
1354
+ dateEnd && !taskUnavailable && (h("span", { class: "datetime" }, intl.formatMessage({
1355
+ id: "expiryMessage",
1356
+ defaultMessage: content.expiryMessage,
1357
+ }, {
1358
+ endDate: dateEnd
1359
+ .setLocale(luxonLocale(states.locale))
1360
+ .toLocaleString(luxon.DateTime.DATETIME_MED),
1361
+ })))),
1362
+ h("sl-button", { class: taskUnavailable
1363
+ ? "action neutral"
1364
+ : taskComplete
1365
+ ? "action disabled"
1366
+ : "action", type: "primary", size: "small", onClick: callbacks.onClick, loading: states.loadingEvent, disabled: taskComplete || taskUnavailable }, content.buttonText))))))));
1367
+ }
1368
+
1369
+ function ReferralIframeView(props) {
1370
+ const { states, data } = props;
1371
+ const { content } = states;
1372
+ const style = {
1373
+ Container: {
1374
+ position: "relative",
1375
+ width: content.iframeWidth,
1376
+ height: content.iframeHeight,
1377
+ },
1378
+ IFrame: {
1379
+ position: "absolute",
1380
+ width: "100%",
1381
+ height: "100%",
1382
+ border: "0",
1383
+ top: "0",
1384
+ left: "0",
1385
+ right: "0",
1386
+ },
1387
+ };
1388
+ // JSS config
1389
+ const sheet = createStyleSheet(style);
1390
+ const styleString = sheet.toString();
1391
+ return (h("div", { class: sheet.classes.Container },
1392
+ h("style", { type: "text/css" }, styleString),
1393
+ h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?rsCode=${data.shareCode}` })));
1394
+ }
1395
+
1396
+ const CheckMark = () => (h("svg", { width: 12, height: 10, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1397
+ 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" })));
1398
+ const CheckmarkFilled = () => (h("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1399
+ 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" }),
1400
+ 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" })));
1401
+ const Gift$1 = () => (h("svg", { width: 156, height: 157, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1402
+ 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" }),
1403
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M37.18 73.862v7.966h89.663v-7.966H37.18Z", fill: "#E9BB30" }),
1404
+ 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" }),
1405
+ 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" }),
1406
+ h("path", { d: "M75.086 74.224h13.85v7.604h-13.85v-7.604Z", fill: "#DD4747" }),
1407
+ h("g", { filter: "url(#a)" },
1408
+ h("ellipse", { cx: 82.008, cy: 141.207, rx: 36.813, ry: 5.793, fill: "#E0DDDD", "fill-opacity": 0.8 })),
1409
+ 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" }),
1410
+ 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" }),
1411
+ 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" }),
1412
+ 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" }),
1413
+ h("defs", null,
1414
+ h("filter", { id: "a", x: 35.195, y: 125.414, width: 93.625, height: 31.586, filterUnits: "userSpaceOnUse", "color-interpolation-filters": "s-rGB" },
1415
+ h("feFlood", { "flood-opacity": 0, result: "BackgroundImageFix" }),
1416
+ h("feBlend", { in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
1417
+ h("feGaussianBlur", { stdDeviation: 5, result: "effect1_foregroundBlur_653_17907" })))));
1418
+
1419
+ function Dot({ active, completed, incomplete, stage, }) {
1420
+ return (h("div", { style: {
1421
+ display: "flex",
1422
+ } },
1423
+ h("div", { style: {
1424
+ backgroundColor: completed
1425
+ ? "var(--sl-color-success-500)"
1426
+ : incomplete
1427
+ ? "var(--sl-color-neutral-200)"
1428
+ : "var(--sl-color-neutral-0)",
1429
+ border: active
1430
+ ? "1px solid var(--sl-color-success-500)"
1431
+ : incomplete
1432
+ ? "1px solid var(--sl-color-neutral-200)"
1433
+ : "1px solid var(--sl-color-success-500)",
1434
+ borderRadius: "50%",
1435
+ width: "23px",
1436
+ height: "23px",
1437
+ margin: "-11px",
1438
+ zIndex: "1",
1439
+ boxSizing: "content-box",
1440
+ } }, completed ? (h("div", { style: { top: "-10.5%", left: "23.5%", position: "relative" } },
1441
+ h(CheckMark, null))) : (h("div", { style: {
1442
+ color: active
1443
+ ? "var(--sl-color-success-500)"
1444
+ : "var(--sl-color-neutral-50)",
1445
+ width: "23px",
1446
+ lineHeight: "24px",
1447
+ textAlign: "center",
1448
+ position: "relative",
1449
+ } }, stage + 1)))));
1450
+ }
1451
+ function ProgressLine({ incomplete = false, active = false, invisible = false, }) {
1452
+ return (h("div", { style: {
1453
+ content: "''",
1454
+ flex: "0.5 0.5 0",
1455
+ height: "4px",
1456
+ borderRadius: "4px",
1457
+ background: incomplete || active
1458
+ ? "var(--sl-color-neutral-200)"
1459
+ : "var(--sl-color-success-500)",
1460
+ position: "relative",
1461
+ bottom: "0",
1462
+ left: "0",
1463
+ display: "flex",
1464
+ justifyContent: "center",
1465
+ columnGap: "50px",
1466
+ marginRight: "-2px",
1467
+ boxSizing: "content-box",
1468
+ opacity: invisible ? "0" : "1",
1469
+ } }));
1470
+ }
1471
+ function Progress({ active, completed, incomplete, stage }) {
1472
+ return [
1473
+ h(ProgressLine, { incomplete: incomplete, invisible: stage === 0 }),
1474
+ h(Dot, { active: active, completed: completed, incomplete: incomplete, stage: stage }),
1475
+ h(ProgressLine, { incomplete: incomplete, active: active, invisible: stage === 2 }),
1476
+ ];
1477
+ }
1478
+ function ProgressBar({ stageCount, currentStage, }) {
1479
+ return (h("div", { style: { display: "flex", columnGap: "-2px" } }, Array.from(Array(stageCount).keys()).map((stage) => (h(Progress, { active: currentStage === stage, completed: currentStage > stage, incomplete: currentStage < stage, stage: stage })))));
1480
+ }
1481
+
1482
+ const stageList = ["chooseReward", "chooseAmount", "confirmation", "success"];
1483
+ function RewardExchangeView(props) {
1484
+ const { states, data, callbacks, refs } = props;
1485
+ const { selectedItem, selectedStep } = states;
1486
+ const stageProgressList = {
1487
+ chooseReward: states.content.text.chooseRewardTitle,
1488
+ chooseAmount: states.content.text.chooseAmountTitle,
1489
+ confirmation: states.content.text.confirmationTitle,
1490
+ };
1491
+ const style = {
1492
+ HostBlock: HostBlock,
1493
+ Container: {
1494
+ minWidth: "300px",
1495
+ position: "relative",
1496
+ },
1497
+ FullImage: {
1498
+ objectFit: "contain",
1499
+ maxWidth: "100%",
1500
+ height: "250px",
1501
+ display: "flex",
1502
+ margin: "0 auto",
1503
+ },
1504
+ Select: {
1505
+ "&::part(label)": {
1506
+ color: "var(--sl-color-primary-500)",
1507
+ },
1508
+ "&::part(menu)": {
1509
+ maxHeight: "50vh",
1510
+ },
1511
+ "& sl-menu-item::part(checked-icon)": {
1512
+ top: "8px",
1513
+ },
1514
+ "& sl-menu-item::part(base)": {
1515
+ flexDirection: "column",
1516
+ },
1517
+ "& sl-menu-item::part(base):focus": {
1518
+ background: "transparent",
1519
+ color: "var(--sl-color-gray-700)",
1520
+ },
1521
+ },
1522
+ ProgressBar: {
1523
+ maxWidth: "350px",
1524
+ width: "100%",
1525
+ margin: "auto",
1526
+ marginBottom: "var(--sl-spacing-xxx-large)",
1527
+ "& .text-area": {
1528
+ marginTop: "5px",
1529
+ display: "flex",
1530
+ justifyContent: "center",
1531
+ textAlign: "center",
1532
+ whiteSpace: "nowrap",
1533
+ marginBottom: "6px",
1534
+ "& .text": {
1535
+ marginBottom: "var(--sl-spacing-x-small)",
1536
+ flex: "1 1 0",
1537
+ },
1538
+ "& .text.subdued": {
1539
+ color: "var(--sl-color-neutral-200)",
1540
+ },
1541
+ },
1542
+ },
1543
+ CardLayout: {
1544
+ display: "flex",
1545
+ width: "100%",
1546
+ borderRadius: "3px",
1547
+ background: "rgba(0, 0, 0, 0)",
1548
+ },
1549
+ Card: {
1550
+ display: "flex",
1551
+ userSelect: "none",
1552
+ height: "120px",
1553
+ "&::part(base)": {
1554
+ boxShadow: "none",
1555
+ width: "100%",
1556
+ },
1557
+ "&::part(body)": {
1558
+ display: "flex",
1559
+ padding: 0,
1560
+ },
1561
+ "& .selected": {
1562
+ position: "relative",
1563
+ top: "-2%",
1564
+ left: "100%",
1565
+ color: "var(--sl-color-primary-500)",
1566
+ margin: "-9px",
1567
+ },
1568
+ },
1569
+ Image: {
1570
+ padding: "var(--sl-spacing-small)",
1571
+ minWidth: "96px",
1572
+ maxWidth: "96px",
1573
+ "& .image": {
1574
+ width: "100%",
1575
+ height: "100%",
1576
+ objectFit: "contain",
1577
+ borderRadius: "4px",
1578
+ },
1579
+ "& .image.subdued": {
1580
+ filter: "brightness(0.95)",
1581
+ opacity: "0.5",
1582
+ },
1583
+ },
1584
+ Square: {
1585
+ width: "120px",
1586
+ height: "118px",
1587
+ borderRadius: "3px 0 0 3px",
1588
+ "& .image": {
1589
+ width: "100%",
1590
+ height: "100%",
1591
+ objectFit: "contain",
1592
+ borderRadius: "inherit",
1593
+ },
1594
+ },
1595
+ TextArea: {
1596
+ textAlign: "left",
1597
+ padding: "var(--sl-spacing-small)",
1598
+ paddingLeft: "0",
1599
+ "& .title": {
1600
+ fontSize: "var(--sl-font-size-medium)",
1601
+ lineHeight: "var(--sl-line-height-dense)",
1602
+ fontWeight: "600",
1603
+ color: "var(--sl-color-neutral-1000)",
1604
+ display: "-webkit-box",
1605
+ "-webkit-line-clamp": "1",
1606
+ "-webkit-box-orient": "vertical",
1607
+ overflow: "hidden",
1608
+ },
1609
+ "& .amount": {
1610
+ fontSize: "var(--sl-font-size-small)",
1611
+ lineHeight: "var(--sl-line-height-dense)",
1612
+ marginTop: "var(--sl-spacing-x-small)",
1613
+ color: "var(--sl-color-neutral-500)",
1614
+ display: "-webkit-box",
1615
+ "-webkit-line-clamp": "1",
1616
+ "-webkit-box-orient": "vertical",
1617
+ overflow: "hidden",
1618
+ },
1619
+ "& .error": {
1620
+ fontSize: "var(--sl-font-size-small)",
1621
+ lineHeight: "var(--sl-line-height-dense)",
1622
+ marginTop: "var(--sl-spacing-x-small)",
1623
+ fontWeight: "600",
1624
+ color: "var(--sl-color-warning-600)",
1625
+ display: "-webkit-box",
1626
+ "-webkit-line-clamp": "1",
1627
+ "-webkit-box-orient": "vertical",
1628
+ overflow: "hidden",
1629
+ "& .icon": {
1630
+ position: "relative",
1631
+ top: "0.1em",
1632
+ marginRight: "var(--sl-spacing-xx-small)",
1633
+ },
1634
+ },
1635
+ },
1636
+ ChooseAmount: {
1637
+ display: "flex",
1638
+ alignItems: "center",
1639
+ justifyContent: "center",
1640
+ margin: "var(--sl-spacing-medium) 0",
1641
+ "& .wrapper": {
1642
+ display: "flex",
1643
+ justifyContent: "center",
1644
+ alignItems: "center",
1645
+ gap: "var(--sl-spacing-xx-large)",
1646
+ "@media (max-width: 799px)": {
1647
+ flexDirection: "column",
1648
+ },
1649
+ },
1650
+ "& .image": {
1651
+ width: "50%",
1652
+ objectFit: "contain",
1653
+ maxWidth: "100%",
1654
+ height: "250px",
1655
+ display: "flex",
1656
+ "@media (max-width: 799px)": {
1657
+ width: "auto",
1658
+ },
1659
+ },
1660
+ "& .text": {
1661
+ width: "50%",
1662
+ maxWidth: "400px",
1663
+ minWidth: "330px",
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 = 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 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 (h("p", null, 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 (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
+ // console.log(item.steps);
1864
+ var _a, _b;
1865
+ return (h("sl-menu-item", { value: step, disabled: !step.available },
1866
+ step.prettyDestinationValue,
1867
+ " ",
1868
+ h("br", null),
1869
+ step.unavailableReasonCode && (h("p", { style: {
1870
+ fontSize: "var(--sl-font-size-small)",
1871
+ color: "var(--sl-color-warning-500)",
1872
+ margin: "0",
1873
+ } }, 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
+ h("div", { class: "step-cost", slot: "suffix" }, step.prettySourceValue)));
1882
+ })));
1883
+ }
1884
+ function chooseReward() {
1885
+ var _a;
1886
+ return [
1887
+ h("div", null,
1888
+ h("h2", { style: { margin: "var(--sl-spacing-large) 0" } }, states.content.text.rewardTitle),
1889
+ states.loading ? (loading()) : (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 (h("div", { key: item.key, style: style },
1898
+ 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) && (h("div", { class: "selected" },
1905
+ h(CheckmarkFilled, null))),
1906
+ 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
+ h("div", { class: sheet.classes.Image, style: {
1916
+ opacity: item.unavailableReasonCode ? "0.5" : "1",
1917
+ } },
1918
+ h("img", { class: item.unavailableReasonCode
1919
+ ? "image subdued"
1920
+ : "image", src: (item === null || item === void 0 ? void 0 : item.imageUrl) ||
1921
+ getAssetPath("./assets/Reward-image.png") })),
1922
+ h("div", { class: sheet.classes.TextArea, style: {
1923
+ opacity: item.unavailableReasonCode ? "0.5" : "1",
1924
+ } },
1925
+ 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
+ h("div", { class: "amount", style: {
1931
+ "-webkit-line-clamp": item.unavailableReasonCode
1932
+ ? "1"
1933
+ : "2",
1934
+ } }, 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 && (h("div", { class: "error" },
1944
+ h("sl-icon", { class: "icon", name: "exclamation-triangle-fill" }),
1945
+ 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
+ h("div", { class: sheet.classes.Button },
1956
+ 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
+ console.log("input", input);
1966
+ console.log(states.amount);
1967
+ return (h("div", null,
1968
+ h("div", { class: sheet.classes.ChooseAmount },
1969
+ h("div", { class: "wrapper" },
1970
+ h("img", { class: "image", src: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) ||
1971
+ getAssetPath("./assets/Reward-image.png") }),
1972
+ h("div", { class: "text" },
1973
+ h("div", { class: "title" }, (_b = selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.name) !== null && _b !== void 0 ? _b : ""),
1974
+ ((_c = states.selectedItem) === null || _c === void 0 ? void 0 : _c.ruleType) === "FIXED_GLOBAL_REWARD" ? (h("div", { class: "points" }, input)) : (h("div", { class: "description" }, selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.description)),
1975
+ ((_d = states.selectedItem) === null || _d === void 0 ? void 0 : _d.ruleType) === "FIXED_GLOBAL_REWARD" ? (h("div", { class: "description" }, selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.description)) : (h("div", { class: "points" }, input)),
1976
+ h("div", { class: "space" }),
1977
+ h("div", { class: sheet.classes.Button },
1978
+ h("sl-button", { class: "cancel", size: "large", type: "text", onClick: () => callbacks.resetState() }, states.content.text.cancelText),
1979
+ h("sl-button", { class: "continue", size: "large", onClick: () => callbacks.setStage("confirmation"), disabled: isDisabled }, states.content.text.continueToConfirmationText)))))));
1980
+ }
1981
+ function confirmation() {
1982
+ // console.log(selectedItem);
1983
+ // console.log(selectedStep);
1984
+ const cost = (selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettySourceValue) || selectedItem.prettySourceValue;
1985
+ const amount = selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettyDestinationValue;
1986
+ return (h("div", null,
1987
+ h("h2", { style: { margin: "var(--sl-spacing-large) 0", textAlign: "center" } }, states.content.text.redeemTitle),
1988
+ h("div", { class: sheet.classes.Confirmation },
1989
+ h("div", { class: "wrapper" },
1990
+ h("div", { class: "field" }, states.content.text.rewardNameTitle),
1991
+ h("div", { class: "reward-item-container" },
1992
+ h("div", { class: "reward-title" }, selectedItem.name),
1993
+ h("img", { class: "image", src: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) ||
1994
+ getAssetPath("./assets/Reward-image.png") }))),
1995
+ h("div", { class: "wrapper padding" },
1996
+ h("div", { class: "field" })),
1997
+ amount && (h("div", { class: "wrapper top-border padding" },
1998
+ h("div", { class: "field" }, states.content.text.rewardAmountTitle),
1999
+ h("div", null, amount))),
2000
+ h("div", { class: "wrapper top-border padding" },
2001
+ h("div", { class: "field" }, states.content.text.costTitle),
2002
+ h("div", { class: "value" }, cost)),
2003
+ h("div", { class: sheet.classes.Button },
2004
+ h("sl-button", { class: "cancel", type: "text", size: "large", onClick: () => callbacks.setStage("chooseAmount") }, states.content.text.backText),
2005
+ h("sl-button", { class: "continue", size: "large", loading: states.loading, onClick: callbacks.exchangeReward }, states.content.text.redeemText)))));
2006
+ }
2007
+ function success() {
2008
+ var _a, _b, _c, _d, _e;
2009
+ // console.log("success");
2010
+ return (h("div", { class: sheet.classes.Success },
2011
+ h(Gift$1, null),
2012
+ h(Confetti, null),
2013
+ h("div", { class: "title" }, states.content.text.rewardRedeemedText),
2014
+ h("div", { class: "description" }, intl.formatMessage({
2015
+ id: "successMessage",
2016
+ defaultMessage: states.content.text.redemptionSuccessText,
2017
+ }, {
2018
+ sourceValue: (_a = states.selectedItem.prettySourceValue) !== null && _a !== void 0 ? _a : (_b = states.selectedStep) === null || _b === void 0 ? void 0 : _b.prettySourceValue,
2019
+ destinationValue: ((_c = states.selectedStep) === null || _c === void 0 ? void 0 : _c.prettyDestinationValue) || ((_d = states.selectedItem) === null || _d === void 0 ? void 0 : _d.name) ||
2020
+ states.selectedItem.globalRewardKey,
2021
+ })),
2022
+ (data === null || data === void 0 ? void 0 : data.fuelTankCode) && (h("div", { style: {
2023
+ width: "40%",
2024
+ margin: "-30px auto var(--sl-spacing-xxx-large) auto",
2025
+ textAlign: "left",
2026
+ color: "var(--sl-color-neutral-700)",
2027
+ } },
2028
+ states.content.text.promoCode,
2029
+ 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 }))),
2030
+ h("div", { class: sheet.classes.Button },
2031
+ h("sl-button", { class: "continue center", type: "primary", size: "large", onClick: () => callbacks.resetState(true) }, states.content.text.doneText))));
2032
+ }
2033
+ const stages = {
2034
+ chooseReward: () => chooseReward(),
2035
+ chooseAmount: () => chooseAmount(),
2036
+ confirmation: () => confirmation(),
2037
+ success: () => success(),
2038
+ };
2039
+ const currentStage = stages[states.redeemStage];
2040
+ function stageMap() {
2041
+ const stageNumber = stageList.indexOf(states.redeemStage);
2042
+ return (h("div", { class: sheet.classes.ProgressBar },
2043
+ h("div", { class: "text-area" }, Object.keys(stageProgressList).map((stage) => {
2044
+ if (stageList.indexOf(stage) <= stageNumber) {
2045
+ return h("span", { class: "text" }, stageProgressList[stage]);
2046
+ }
2047
+ else {
2048
+ return (h("span", { class: "text subdued" }, stageProgressList[stage]));
2049
+ }
2050
+ })),
2051
+ h(ProgressBar, { stageCount: 3, currentStage: stageNumber })));
2052
+ }
2053
+ function loading() {
2054
+ return (h("div", { class: sheet.classes.Grid }, [...Array(states.content.text.skeletonCardNum)].map(() => {
2055
+ return (h("div", null,
2056
+ h("sl-card", { class: sheet.classes.Card },
2057
+ h("div", { class: sheet.classes.CardLayout },
2058
+ h("div", null,
2059
+ h("sl-skeleton", { style: {
2060
+ width: "100px",
2061
+ height: "100px",
2062
+ margin: "9px",
2063
+ "--border-radius": "4px",
2064
+ } })),
2065
+ h("div", { style: {
2066
+ margin: "var(--sl-spacing-small) var(--sl-spacing-small) 0 0",
2067
+ width: "100%",
2068
+ } },
2069
+ h("sl-skeleton", { style: { marginBottom: "var(--sl-spacing-small)" } }),
2070
+ h("sl-skeleton", { style: { marginBottom: "var(--sl-spacing-small)" } }),
2071
+ h("sl-skeleton", { style: { width: "45%" } }))))));
2072
+ })));
2073
+ }
2074
+ function errorMessage() {
2075
+ return (h("sl-alert", { type: "danger", open: true },
2076
+ h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
2077
+ states.content.text.redemptionError));
2078
+ }
2079
+ function queryErrorMessage() {
2080
+ return (h("sl-alert", { type: "danger", open: true },
2081
+ h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
2082
+ states.content.text.queryError));
2083
+ }
2084
+ function Confetti() {
2085
+ return (h("canvas", { ref: (canvas) => {
2086
+ if (!(refs === null || refs === void 0 ? void 0 : refs.canvasRef))
2087
+ return;
2088
+ refs.canvasRef.current = canvas;
2089
+ }, id: "my-canvas", class: sheet.classes.Confetti }));
2090
+ }
2091
+ return (h("div", { class: sheet.classes.Container },
2092
+ h("style", { type: "text/css" }, styleString),
2093
+ h("div", null,
2094
+ stageMap(),
2095
+ states.exchangeError && errorMessage(),
2096
+ states.queryError && queryErrorMessage(),
2097
+ currentStage && currentStage(),
2098
+ states.redeemStage === "success")));
2099
+ }
2100
+
2101
+ const baseResponse = (data, stage = "chooseReward", selectedItem = null, selectedStep = null, error = false, loading = false, fueltank = null) => ({
2102
+ states: {
2103
+ content: {
2104
+ text: {
2105
+ buttonText: "Exchange Rewards",
2106
+ notAvailableError: "{unavailableReasonCode, select, NOT_CHAMPION {CUSTOM ERROR MESSAGE } US_TAX {Exceeds tax limit for this year} INSUFFICIENT_REDEEMABLE_CREDIT {{sourceValue} required} AVAILABILITY_PREDICATE {Not available} other {unavailableReasonCode} }",
2107
+ chooseRewardTitle: "Rewards",
2108
+ chooseAmountTitle: "Select",
2109
+ confirmationTitle: "Confirm",
2110
+ rewardTitle: "Choose a reward",
2111
+ cancelText: "Cancel",
2112
+ backText: "Back",
2113
+ continueText: "Continue",
2114
+ continueToConfirmationText: "Continue to confirmation",
2115
+ redeemText: "Redeem",
2116
+ redeemTitle: "Confirm and redeem",
2117
+ redemptionSuccessText: "Redeemed {sourceValue} for {destinationValue}",
2118
+ doneText: "Done",
2119
+ toolTipText: "Copied!",
2120
+ selectText: "Select amount to receive",
2121
+ sourceAmountMessage: "{ruleType, select, FIXED_GLOBAL_REWARD {{sourceValue}} other {{sourceMinValue} to {sourceMaxValue}}}",
2122
+ rewardRedeemedText: "Reward redeemed",
2123
+ redemptionError: "An error occured trying to redeem this reward. Please try again",
2124
+ promoCode: "Promo code",
2125
+ skeletonCardNum: 8,
2126
+ rewardNameTitle: "Reward Name",
2127
+ rewardAmountTitle: "Reward Amount",
2128
+ costTitle: "Cost",
2129
+ },
2130
+ },
2131
+ redeemStage: stage,
2132
+ amount: 0,
2133
+ exchangeError: error,
2134
+ loading: loading,
2135
+ selectedItem: selectedItem,
2136
+ selectedStep: selectedStep,
2137
+ open: false,
2138
+ },
2139
+ data: {
2140
+ exchangeList: data,
2141
+ fuelTankCode: fueltank,
2142
+ },
2143
+ callbacks: {
2144
+ exchangeReward: null,
2145
+ resetState: null,
2146
+ setStage: null,
2147
+ setExchangeState: null,
2148
+ copyFuelTankCode: null,
2149
+ refs: null,
2150
+ },
2151
+ refs: null,
2152
+ });
2153
+ const baseReward = {
2154
+ key: "",
2155
+ name: "",
2156
+ description: "Description of reward. Lorem ipsum dolor sit amet, consectetur adipiscing. Id nec semper sapien dignissim rhoncus nunc.",
2157
+ imageUrl: "",
2158
+ available: true,
2159
+ unavailableReasonCode: null,
2160
+ ruleType: "FIXED_GLOBAL_REWARD",
2161
+ sourceUnit: "POINT",
2162
+ sourceValue: 10,
2163
+ prettySourceValue: "10 SaaSquatch Points",
2164
+ sourceMinValue: null,
2165
+ prettySourceMinValue: null,
2166
+ sourceMaxValue: null,
2167
+ prettySourceMaxValue: null,
2168
+ destinationMinValue: null,
2169
+ prettyDestinationMinValue: null,
2170
+ destinationMaxValue: null,
2171
+ prettyDestinationMaxValue: null,
2172
+ globalRewardKey: "",
2173
+ destinationUnit: null,
2174
+ steps: [],
2175
+ };
2176
+ const notEnoughPoints = {
2177
+ available: false,
2178
+ unavailableReasonCode: "INSUFFICIENT_REDEEMABLE_CREDIT",
2179
+ };
2180
+ const usTax = {
2181
+ available: false,
2182
+ unavailableReasonCode: "US_TAX",
2183
+ };
2184
+ const customError = {
2185
+ available: false,
2186
+ unavailableReasonCode: "NOT_CHAMPION",
2187
+ };
2188
+ const selected = {
2189
+ key: "r1",
2190
+ };
2191
+ const imageUrl = (props) => ({
2192
+ imageUrl: props,
2193
+ });
2194
+ const name = (props) => ({
2195
+ name: props,
2196
+ });
2197
+ const description = (props) => ({
2198
+ description: props,
2199
+ });
2200
+ const fixedValue = (props) => ({
2201
+ prettySourceValue: props,
2202
+ });
2203
+ const variableValue = (min, max, unit) => ({
2204
+ ruleType: "VARIABLE_CREDIT_REWARD",
2205
+ sourceMinValue: min,
2206
+ prettySourceMinValue: min + " " + unit,
2207
+ sourceMaxValue: max,
2208
+ prettySourceMaxValue: max + " " + unit,
2209
+ });
2210
+ const demoData = [
2211
+ {
2212
+ ...baseReward,
2213
+ ...name("Free swag with a promo code"),
2214
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1643653103/squatch-assets/default_rewards_1.png"),
2215
+ ...fixedValue("40 Points"),
2216
+ },
2217
+ {
2218
+ ...baseReward,
2219
+ ...selected,
2220
+ ...name("Visa® Prepaid Card USD"),
2221
+ ...imageUrl("https://res.cloudinary.com/saasquatch-staging/image/upload/v1643829161/tenant_test_a7iws76wkk4az/lmzj1rtxchiyquvazo5k.png"),
2222
+ ...variableValue(20, 80, "Points"),
2223
+ },
2224
+ {
2225
+ ...baseReward,
2226
+ ...name("$50 Store credit"),
2227
+ ...imageUrl("https://res.cloudinary.com/saasquatch-staging/image/upload/v1643829222/tenant_test_a7iws76wkk4az/wvxtrsytmr4h1ozhxspv.png"),
2228
+ ...fixedValue("100 Points"),
2229
+ },
2230
+ {
2231
+ ...baseReward,
2232
+ ...name("Variable amount of store credit"),
2233
+ ...imageUrl("https://res.cloudinary.com/saasquatch-staging/image/upload/v1643829263/tenant_test_a7iws76wkk4az/dbo8tb4qpwmhg5iudviq.png"),
2234
+ ...variableValue(20, 100, "Points"),
2235
+ },
2236
+ ];
2237
+ const data = [
2238
+ {
2239
+ ...baseReward,
2240
+ ...name("Free swag with a promo code"),
2241
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1643653103/squatch-assets/default_rewards_1.png"),
2242
+ ...fixedValue("40 SaaSquatch Points"),
2243
+ },
2244
+ {
2245
+ ...baseReward,
2246
+ ...selected,
2247
+ ...name("Visa® Prepaid Card USD"),
2248
+ ...imageUrl("https://res.cloudinary.com/saasquatch-staging/image/upload/v1643829161/tenant_test_a7iws76wkk4az/lmzj1rtxchiyquvazo5k.png"),
2249
+ ...variableValue(20, 80, "Points"),
2250
+ },
2251
+ {
2252
+ ...baseReward,
2253
+ ...name("A very exclusive gift box"),
2254
+ ...imageUrl("https://res.cloudinary.com/saasquatch-staging/image/upload/v1643829284/tenant_test_a7iws76wkk4az/cognmlwma874b5q94hqv.png"),
2255
+ ...fixedValue("30 SaaSquatch Points"),
2256
+ },
2257
+ {
2258
+ ...baseReward,
2259
+ ...name("$50 Store credit"),
2260
+ ...imageUrl("https://res.cloudinary.com/saasquatch-staging/image/upload/v1643829222/tenant_test_a7iws76wkk4az/wvxtrsytmr4h1ozhxspv.png"),
2261
+ ...fixedValue("100 SaaSquatch Points"),
2262
+ },
2263
+ {
2264
+ ...baseReward,
2265
+ ...name("Variable amount of store credit"),
2266
+ ...imageUrl("https://res.cloudinary.com/saasquatch-staging/image/upload/v1643829263/tenant_test_a7iws76wkk4az/dbo8tb4qpwmhg5iudviq.png"),
2267
+ ...variableValue(20, 100, "Points"),
2268
+ },
2269
+ {
2270
+ ...baseReward,
2271
+ ...notEnoughPoints,
2272
+ ...name("A very rare cactus"),
2273
+ ...imageUrl("https://res.cloudinary.com/saasquatch-staging/image/upload/v1643829341/tenant_test_a7iws76wkk4az/lgrlweifpsekh2y4zjih.png"),
2274
+ ...fixedValue("2000 SaaSquatch Points"),
2275
+ },
2276
+ {
2277
+ ...baseReward,
2278
+ ...usTax,
2279
+ ...name("$1000 Store credit with a really super long name in the front page"),
2280
+ ...imageUrl("https://res.cloudinary.com/saasquatch-staging/image/upload/v1643829384/tenant_test_a7iws76wkk4az/f0dzeyrx3hojncbgim8y.png"),
2281
+ ...fixedValue("2000 SaaSquatch Long Points"),
2282
+ },
2283
+ {
2284
+ ...baseReward,
2285
+ ...notEnoughPoints,
2286
+ ...name("A holiday gift box"),
2287
+ ...imageUrl("https://res.cloudinary.com/saasquatch-staging/image/upload/v1643829450/tenant_test_a7iws76wkk4az/ujzfhfkvwqb02dlgjx6q.png"),
2288
+ ...fixedValue("100 SaaSquatch Points"),
2289
+ },
2290
+ ];
2291
+ const rewardExchange = {
2292
+ ...baseResponse(data),
2293
+ };
2294
+ const demoRewardExchange = {
2295
+ ...baseResponse(demoData),
2296
+ };
2297
+ const rewardExchangeLongText = {
2298
+ ...baseResponse([
2299
+ {
2300
+ ...baseReward,
2301
+ ...notEnoughPoints,
2302
+ ...name("Lorem ipsum dolor sit amet consectetur adipisicing elit. Sunt ratione a itaque non obcaecati iste, amet repudiandae at consequatur adipisci culpa nam, incidunt exercitationem aliquid."),
2303
+ ...imageUrl("https://res.cloudinary.com/saasquatch-staging/image/upload/v1643829450/tenant_test_a7iws76wkk4az/ujzfhfkvwqb02dlgjx6q.png"),
2304
+ ...fixedValue("Lorem ipsum dolor sit amet consectetur adipisicing elit. Sunt ratione a itaque non obcaecati iste, amet repudiandae at consequatur adipisci culpa nam, incidunt exercitationem aliquid."),
2305
+ },
2306
+ {
2307
+ ...baseReward,
2308
+ ...name("Lorem ipsum dolor sit amet consectetur adipisicing elit. Sunt ratione a itaque non obcaecati iste, amet repudiandae at consequatur adipisci culpa nam, incidunt exercitationem aliquid."),
2309
+ ...imageUrl("https://res.cloudinary.com/saasquatch-staging/image/upload/v1643829384/tenant_test_a7iws76wkk4az/f0dzeyrx3hojncbgim8y.png"),
2310
+ ...fixedValue("Lorem ipsum dolor sit amet consectetur adipisicing elit. Sunt ratione a itaque non obcaecati iste, amet repudiandae at consequatur adipisci culpa nam, incidunt exercitationem aliquid."),
2311
+ },
2312
+ {
2313
+ ...baseReward,
2314
+ ...name("Suuuuuuuuper aweeeeesssssoooommme reward!!!!!!"),
2315
+ ...imageUrl("https://res.cloudinary.com/saasquatch-staging/image/upload/v1643829222/tenant_test_a7iws76wkk4az/wvxtrsytmr4h1ozhxspv.png"),
2316
+ ...fixedValue("Lorem ipsum dolor sit amet consectetur adipisicing elit. Sunt ratione a itaque non obcaecati iste, amet repudiandae at consequatur adipisci culpa nam, incidunt exercitationem aliquid."),
2317
+ },
2318
+ ...data,
2319
+ ]),
2320
+ };
2321
+ const rewardExchangeCustomErrorMsg = {
2322
+ ...baseResponse([
2323
+ {
2324
+ ...baseReward,
2325
+ ...customError,
2326
+ ...name("A very rare cactus"),
2327
+ ...imageUrl("https://res.cloudinary.com/saasquatch-staging/image/upload/v1643829341/tenant_test_a7iws76wkk4az/lgrlweifpsekh2y4zjih.png"),
2328
+ ...fixedValue("2000 SaaSquatch Points"),
2329
+ },
2330
+ ...data,
2331
+ ]),
2332
+ };
2333
+ const rewardExchangeSelected = {
2334
+ ...baseResponse(data, "chooseReward", {
2335
+ ...baseReward,
2336
+ ...selected,
2337
+ ...name("Visa® Prepaid Card USD"),
2338
+ ...imageUrl("https://res.cloudinary.com/saasquatch-staging/image/upload/v1643829161/tenant_test_a7iws76wkk4az/lmzj1rtxchiyquvazo5k.png"),
2339
+ ...variableValue(20, 80, "Points"),
2340
+ }),
2341
+ };
2342
+ const baseStep = (dst, dstUnit, src, srcUnit, available = true, unavailableReason = null) => ({
2343
+ destinationValue: dst,
2344
+ prettyDestinationValue: dstUnit + dst,
2345
+ sourceValue: src,
2346
+ prettySourceValue: src + " " + srcUnit,
2347
+ available: available,
2348
+ unavailableReasonCode: unavailableReason,
2349
+ });
2350
+ const chooseAmountVariable = {
2351
+ ...baseResponse(data, "chooseAmount", {
2352
+ ...baseReward,
2353
+ ...name("Visa® Prepaid Card USD"),
2354
+ ...imageUrl("https://res.cloudinary.com/saasquatch-staging/image/upload/v1643829161/tenant_test_a7iws76wkk4az/lmzj1rtxchiyquvazo5k.png"),
2355
+ ...variableValue(20, 80, "Points"),
2356
+ steps: [
2357
+ baseStep(20, "$", 40, "Points"),
2358
+ baseStep(30, "$", 60, "Points"),
2359
+ baseStep(40, "$", 80, "Points"),
2360
+ baseStep(50, "$", 100, "Points"),
2361
+ baseStep(60, "$", 120, "Points"),
2362
+ ],
2363
+ }),
2364
+ };
2365
+ const chooseAmountVariableNoDescription = {
2366
+ ...baseResponse(data, "chooseAmount", {
2367
+ ...baseReward,
2368
+ ...name("Visa® Prepaid Card USD"),
2369
+ ...description(""),
2370
+ ...imageUrl("https://i.imgur.com/veHErQX.png"),
2371
+ ...variableValue(20, 80, "Points"),
2372
+ steps: [
2373
+ baseStep(20, "$", 40, "Points"),
2374
+ baseStep(30, "$", 60, "Points"),
2375
+ baseStep(40, "$", 80, "Points"),
2376
+ baseStep(50, "$", 100, "Points"),
2377
+ baseStep(60, "$", 120, "Points"),
2378
+ ],
2379
+ }),
2380
+ };
2381
+ const chooseAmountVariableDisabled = {
2382
+ ...baseResponse(data, "chooseAmount", {
2383
+ ...baseReward,
2384
+ ...name("Visa® Prepaid Card USD"),
2385
+ ...imageUrl("https://res.cloudinary.com/saasquatch-staging/image/upload/v1643829161/tenant_test_a7iws76wkk4az/lmzj1rtxchiyquvazo5k.png"),
2386
+ ...variableValue(20, 80, "Points"),
2387
+ steps: [
2388
+ baseStep(20, "$", 40, "Points"),
2389
+ baseStep(30, "$", 60, "Points"),
2390
+ baseStep(40, "$", 80, "Points", false, "INSUFFICIENT_REDEEMABLE_CREDIT"),
2391
+ baseStep(50, "$", 100, "Points", false, "INSUFFICIENT_REDEEMABLE_CREDIT"),
2392
+ baseStep(60, "$", 120, "Points", false, "INSUFFICIENT_REDEEMABLE_CREDIT"),
2393
+ ],
2394
+ }),
2395
+ };
2396
+ const chooseAmountVariableUnavailable = {
2397
+ ...baseResponse(data, "chooseAmount", {
2398
+ ...baseReward,
2399
+ ...name("Visa® Prepaid Card USD"),
2400
+ ...imageUrl("https://res.cloudinary.com/saasquatch-staging/image/upload/v1643829161/tenant_test_a7iws76wkk4az/lmzj1rtxchiyquvazo5k.png"),
2401
+ ...variableValue(20, 80, "Points"),
2402
+ steps: [
2403
+ baseStep(20, "$", 40, "Points"),
2404
+ baseStep(30, "$", 60, "Points"),
2405
+ baseStep(40, "$", 80, "Points", false, "US_TAX"),
2406
+ baseStep(50, "$", 100, "Points", false, "US_TAX"),
2407
+ baseStep(60, "$", 120, "Points", false, "US_TAX"),
2408
+ ],
2409
+ }),
2410
+ };
2411
+ const chooseAmountFixed = {
2412
+ ...baseResponse(data, "chooseAmount", {
2413
+ ...baseReward,
2414
+ ...name("Free swag with a promo code"),
2415
+ ...imageUrl("https://res.cloudinary.com/saasquatch-staging/image/upload/v1643829486/tenant_test_a7iws76wkk4az/xtptk0dynrxxlkg0dctb.png"),
2416
+ ...fixedValue("40 SaaSquatch Points"),
2417
+ }),
2418
+ };
2419
+ const chooseAmountFixedNoDescription = {
2420
+ ...baseResponse(data, "chooseAmount", {
2421
+ ...baseReward,
2422
+ ...description(""),
2423
+ ...name("Free swag with a promo code"),
2424
+ ...imageUrl("https://i.imgur.com/n7vC4BR.png"),
2425
+ ...fixedValue("40 SaaSquatch Points"),
2426
+ }),
2427
+ };
2428
+ const confirmFixed = {
2429
+ ...baseResponse(data, "confirmation", {
2430
+ ...baseReward,
2431
+ ...name("Free swag with a promo code"),
2432
+ ...imageUrl("https://res.cloudinary.com/saasquatch-staging/image/upload/v1643829486/tenant_test_a7iws76wkk4az/xtptk0dynrxxlkg0dctb.png"),
2433
+ ...fixedValue("40 SaaSquatch Points"),
2434
+ }),
2435
+ };
2436
+ const confirmVariable = {
2437
+ ...baseResponse(data, "confirmation", {
2438
+ ...baseReward,
2439
+ ...name("Visa® Prepaid Card USD"),
2440
+ ...imageUrl("https://res.cloudinary.com/saasquatch-staging/image/upload/v1643829161/tenant_test_a7iws76wkk4az/lmzj1rtxchiyquvazo5k.png"),
2441
+ ...variableValue(20, 80, "Points"),
2442
+ }, baseStep(20, "$", 40, "Points")),
2443
+ };
2444
+ const error = {
2445
+ ...baseResponse(data, "confirmation", {
2446
+ ...baseReward,
2447
+ ...name("Visa® Prepaid Card USD"),
2448
+ ...imageUrl("https://res.cloudinary.com/saasquatch-staging/image/upload/v1643829161/tenant_test_a7iws76wkk4az/lmzj1rtxchiyquvazo5k.png"),
2449
+ ...variableValue(20, 80, "Points"),
2450
+ }, baseStep(20, "$", 40, "Points"), true),
2451
+ };
2452
+ const success = {
2453
+ ...baseResponse(data, "success", {
2454
+ ...baseReward,
2455
+ ...name("Free swag with a promo code"),
2456
+ ...imageUrl("https://res.cloudinary.com/saasquatch-staging/image/upload/v1643829486/tenant_test_a7iws76wkk4az/xtptk0dynrxxlkg0dctb.png"),
2457
+ ...fixedValue("40 SaaSquatch Points"),
2458
+ }, undefined, undefined, undefined, "4ah2-hh46-gk7r"),
2459
+ };
2460
+ const successVariable = {
2461
+ ...baseResponse(data, "success", {
2462
+ ...baseReward,
2463
+ ...name("Visa® Prepaid Card USD"),
2464
+ ...imageUrl("https://res.cloudinary.com/saasquatch-staging/image/upload/v1643829284/tenant_test_a7iws76wkk4az/cognmlwma874b5q94hqv.png"),
2465
+ ...variableValue(20, 80, "Points"),
2466
+ }, baseStep(20, "$", 40, "Points")),
2467
+ };
2468
+ const loading = {
2469
+ ...baseResponse(null, "chooseReward", null, null, false, true),
2470
+ };
2471
+
2472
+ function CardFeedView(props, children) {
2473
+ const style = {
2474
+ Container: {
2475
+ columnGap: props.gap + "px",
2476
+ columnWidth: props.width + "px",
2477
+ "& > div": {
2478
+ marginBottom: "24px",
2479
+ },
2480
+ },
2481
+ };
2482
+ const sheet = createStyleSheet(style);
2483
+ const styleString = sheet.toString();
2484
+ console.log(props);
2485
+ const vanillaStyle = `
2486
+ :host{
2487
+ display: block;
2488
+ }
2489
+
2490
+ `;
2491
+ return (h("div", null,
2492
+ h("style", { type: "text/css" },
2493
+ styleString,
2494
+ vanillaStyle),
2495
+ h("div", { class: sheet.classes.Container }, children)));
2496
+ }
2497
+
2498
+ 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))})`}
2499
+
2500
+ const colorScale = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
2501
+ const lScale = [
2502
+ 0.95,
2503
+ 0.86,
2504
+ 0.76,
2505
+ 0.66,
2506
+ 0.56,
2507
+ 0.46,
2508
+ 0.39,
2509
+ 0.32,
2510
+ 0.25,
2511
+ 0.18,
2512
+ 0.15,
2513
+ ];
2514
+ // https://github.com/ricokahler/color2k/blob/main/src/parseToRgba.ts
2515
+ const hslaRegex = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i;
2516
+ function niceParseToHsla(color) {
2517
+ const normalizedColor = color.trim();
2518
+ const hslaMatch = hslaRegex.exec(normalizedColor);
2519
+ if (hslaMatch) {
2520
+ const [h, s, l, a] = Array.from(hslaMatch).slice(1).map(parseFloat);
2521
+ if (t(0, 100, s) !== s)
2522
+ throw new n(color);
2523
+ if (t(0, 100, l) !== l)
2524
+ throw new n(color);
2525
+ return [h, s / 100, l, a || 1];
2526
+ }
2527
+ // Warning -- converts to RGB first, so is lossy
2528
+ return p(color);
2529
+ }
2530
+ function generateScale(color, name = "primary") {
2531
+ const [h, s, l, a] = niceParseToHsla(color);
2532
+ return lScale
2533
+ .map((l) => z(h, s, l, a))
2534
+ .map((color, index) => {
2535
+ return `--sl-color-${name}-${colorScale[index]}: ${color};\n`;
2536
+ });
2537
+ }
2538
+ /**
2539
+ * Generated a Shoelace color scale css string from a base color
2540
+ *
2541
+ * @param color
2542
+ * @param name
2543
+ * @returns
2544
+ */
2545
+ function autoColorScaleCss(color, name = "primary") {
2546
+ return generateScale(color, name).join("\n");
2547
+ }
2548
+
2549
+ const map = new Map();
2550
+ function withShadowView(component) {
2551
+ // TODO: Could only do this if rendered in a Stencilbook environment to prevent unintended side-effects
2552
+ const element = getElement(component);
2553
+ let renderFn = component["render"].bind(component);
2554
+ const newRenderFn = () => {
2555
+ const key = element.getAttribute("stencilbook-shadow-view");
2556
+ if (key) {
2557
+ const value = map.get(key);
2558
+ if (value) {
2559
+ return value;
2560
+ }
2561
+ }
2562
+ return renderFn();
2563
+ };
2564
+ component["render"] = newRenderFn;
2565
+ }
2566
+ /**
2567
+ * Any story that defines `parameters.tagname` will be used as a wrapper component around the view
2568
+ */
2569
+ const ShadowViewAddon = ({ story }, children) => {
2570
+ var _a;
2571
+ let TagName = (_a = story.parent.parameters) === null || _a === void 0 ? void 0 : _a.tagname;
2572
+ if (!TagName)
2573
+ return children;
2574
+ const randomInt = Math.round(Math.random() * 100000);
2575
+ map.set(randomInt + "", children);
2576
+ const RandomTagName = "stencilbook-shawdow-view-" + randomInt;
2577
+ // This will only re-render when the tag name changes, so we use a random tag name every time.
2578
+ // Altneratively we could try to trick Stencil to call `forceUpdate` every time.
2579
+ return (h(RandomTagName, null,
2580
+ h(TagName, { "stencilbook-shadow-view": randomInt })));
2581
+ };
2582
+
2583
+ export { withShadowView as A, demoRewardExchange as B, CardFeedView as C, EditProfileView as E, LeaderboardView as L, PortalFrameView as P, ReferralIframeView as R, ShareButtonView as S, TaskCardView as T, ShareLinkView as a, useShareButton as b, PortalChangePasswordView as c, PortalLoginView as d, PortalRegisterView as e, ProgressBarView as f, RewardExchangeView as g, rewardExchangeLongText as h, rewardExchangeSelected as i, chooseAmountFixed as j, chooseAmountFixedNoDescription as k, chooseAmountVariable as l, chooseAmountVariableNoDescription as m, chooseAmountVariableDisabled as n, chooseAmountVariableUnavailable as o, confirmFixed as p, confirmVariable as q, rewardExchangeCustomErrorMsg as r, error as s, success as t, useShareLink as u, successVariable as v, loading as w, rewardExchange as x, autoColorScaleCss as y, ShadowViewAddon as z };