@saasquatch/mint-components 1.15.0-45 → 1.15.0-46

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 (270) hide show
  1. package/dist/cjs/{ShadowViewAddon-bebbd4d0.js → ShadowViewAddon-85d2eed4.js} +1056 -1056
  2. package/dist/cjs/{extractProps-e9c55ba8.js → extractProps-fd93ba62.js} +0 -14
  3. package/dist/cjs/{global-242743b1.js → global-2298fc8b.js} +58 -73
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/mint-components.cjs.js +2 -2
  6. package/dist/cjs/{sqm-banking-info-form_10.cjs.entry.js → sqm-banking-info-form_17.cjs.entry.js} +1902 -213
  7. package/dist/cjs/sqm-big-stat_42.cjs.entry.js +3 -3
  8. package/dist/cjs/sqm-email-verification.cjs.entry.js +1 -1
  9. package/dist/cjs/sqm-empty_4.cjs.entry.js +1 -1
  10. package/dist/cjs/sqm-invoice-table-view-90b2433f.js +2038 -0
  11. package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +1 -1
  12. package/dist/cjs/sqm-pagination_3.cjs.entry.js +1 -1
  13. package/dist/cjs/{sqm-portal-email-verification-view-38bfdda4.js → sqm-portal-email-verification-view-0a93a148.js} +1 -1
  14. package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +2 -2
  15. package/dist/cjs/{sqm-portal-profile-view-036d355e.js → sqm-portal-profile-view-44a83439.js} +1 -1
  16. package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
  17. package/dist/cjs/sqm-referral-table_11.cjs.entry.js +1 -1
  18. package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +5 -3
  19. package/dist/cjs/sqm-stencilbook.cjs.entry.js +13992 -15287
  20. package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +3 -11
  21. package/dist/cjs/sqm-widget-verification.cjs.entry.js +7 -17
  22. package/dist/cjs/{usePayoutStatus-3cca69e5.js → usePayoutStatus-f26f0467.js} +5 -8
  23. package/dist/collection/components/sqm-instant-access-registration/sqm-instant-access-registration.js +1 -1
  24. package/dist/collection/components/sqm-invoice-table/columns/sqm-invoice-table-data-column.js +1 -1
  25. package/dist/collection/components/sqm-invoice-table/columns/sqm-invoice-table-date-column.js +2 -3
  26. package/dist/collection/components/sqm-invoice-table/columns/sqm-invoice-table-download-column.js +1 -2
  27. package/dist/collection/components/sqm-invoice-table/sqm-invoice-table.js +1 -1
  28. package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.js +3 -3
  29. package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +2 -2
  30. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +4 -6
  31. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-status-cell.js +2 -2
  32. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-column.js +1 -1
  33. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-date-column.js +2 -2
  34. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.js +2 -2
  35. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-status-column.js +2 -2
  36. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-user-column.js +2 -2
  37. package/dist/collection/components/sqm-referral-table/sqm-referral-table.js +1 -2
  38. package/dist/collection/components/sqm-referred-registration/sqm-referred-registration.js +1 -1
  39. package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +1 -1
  40. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-reward-cell.js +3 -5
  41. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-source-cell.js +3 -5
  42. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.js +9 -11
  43. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-date-column.js +2 -2
  44. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-note-column.js +3 -3
  45. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.js +2 -2
  46. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.js +3 -3
  47. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.js +2 -2
  48. package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +1 -1
  49. package/dist/collection/components/sqm-share-button/sqm-share-button.js +3 -3
  50. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +78 -78
  51. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +2 -2
  52. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-controller.js +5 -39
  53. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +7 -42
  54. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +8 -12
  55. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +1 -1
  56. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +2 -2
  57. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +1 -1
  58. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +1 -1
  59. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.js +1 -1
  60. package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +2 -2
  61. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.js +2 -2
  62. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +2 -2
  63. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +2 -2
  64. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +1 -26
  65. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/usePayoutDetailsCard.js +2 -2
  66. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +5 -8
  67. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +28 -77
  68. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +1 -1
  69. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +4 -19
  70. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +3 -3
  71. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +5 -6
  72. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +10 -10
  73. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +3 -3
  74. package/dist/collection/global/styles.js +58 -73
  75. package/dist/collection/global/styles.ts +40 -48
  76. package/dist/esm/{ShadowViewAddon-b439f9c5.js → ShadowViewAddon-d59ef625.js} +1059 -1059
  77. package/dist/esm/{extractProps-54064fb0.js → extractProps-ae1afbb3.js} +1 -14
  78. package/dist/esm/{global-f33bb903.js → global-2da1dcec.js} +58 -73
  79. package/dist/esm/loader.js +2 -2
  80. package/dist/esm/mint-components.js +2 -2
  81. package/dist/esm/{sqm-banking-info-form_10.entry.js → sqm-banking-info-form_17.entry.js} +1819 -137
  82. package/dist/esm/sqm-big-stat_42.entry.js +3 -3
  83. package/dist/esm/sqm-email-verification.entry.js +1 -1
  84. package/dist/esm/sqm-empty_4.entry.js +1 -1
  85. package/dist/esm/sqm-invoice-table-view-df370e4a.js +2022 -0
  86. package/dist/esm/sqm-leaderboard-rank.entry.js +1 -1
  87. package/dist/esm/sqm-pagination_3.entry.js +1 -1
  88. package/dist/esm/{sqm-portal-email-verification-view-e8661ca9.js → sqm-portal-email-verification-view-e38ec8cc.js} +1 -1
  89. package/dist/esm/sqm-portal-email-verification.entry.js +2 -2
  90. package/dist/esm/{sqm-portal-profile-view-70e1a345.js → sqm-portal-profile-view-e594d1ee.js} +1 -1
  91. package/dist/esm/sqm-portal-profile.entry.js +2 -2
  92. package/dist/esm/sqm-referral-table_11.entry.js +1 -1
  93. package/dist/esm/sqm-rewards-table_9.entry.js +5 -3
  94. package/dist/esm/sqm-stencilbook.entry.js +14017 -15312
  95. package/dist/esm/sqm-widget-verification-controller.entry.js +4 -12
  96. package/dist/esm/sqm-widget-verification.entry.js +7 -17
  97. package/dist/esm/{usePayoutStatus-e92a6e43.js → usePayoutStatus-3768c8c3.js} +5 -8
  98. package/dist/esm-es5/ShadowViewAddon-d59ef625.js +1 -0
  99. package/dist/esm-es5/extractProps-ae1afbb3.js +1 -0
  100. package/dist/esm-es5/{global-f33bb903.js → global-2da1dcec.js} +4 -4
  101. package/dist/esm-es5/loader.js +1 -1
  102. package/dist/esm-es5/mint-components.js +1 -1
  103. package/dist/esm-es5/sqm-banking-info-form_17.entry.js +1 -0
  104. package/dist/esm-es5/sqm-big-stat_42.entry.js +1 -1
  105. package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
  106. package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
  107. package/dist/esm-es5/sqm-invoice-table-view-df370e4a.js +1 -0
  108. package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
  109. package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
  110. package/dist/esm-es5/{sqm-portal-email-verification-view-e8661ca9.js → sqm-portal-email-verification-view-e38ec8cc.js} +1 -1
  111. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  112. package/dist/esm-es5/{sqm-portal-profile-view-70e1a345.js → sqm-portal-profile-view-e594d1ee.js} +1 -1
  113. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  114. package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
  115. package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
  116. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  117. package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
  118. package/dist/esm-es5/sqm-widget-verification.entry.js +1 -1
  119. package/dist/esm-es5/{usePayoutStatus-e92a6e43.js → usePayoutStatus-3768c8c3.js} +2 -2
  120. package/dist/mint-components/global/styles.ts +40 -48
  121. package/dist/mint-components/mint-components.esm.js +1 -1
  122. package/dist/mint-components/mint-components.js +1 -1
  123. package/dist/mint-components/{p-b55e454d.entry.js → p-0019d57c.entry.js} +1 -1
  124. package/dist/mint-components/p-04cc08e7.system.entry.js +1 -0
  125. package/dist/mint-components/p-097a255f.js +1 -0
  126. package/dist/mint-components/p-15ad1e97.entry.js +16 -0
  127. package/dist/mint-components/p-16c55bb4.entry.js +205 -0
  128. package/dist/mint-components/{p-95ff58b2.system.entry.js → p-232996b5.system.entry.js} +1 -1
  129. package/dist/mint-components/p-26468242.js +1 -0
  130. package/dist/mint-components/{p-283848df.system.entry.js → p-28aed7f7.system.entry.js} +1 -1
  131. package/dist/mint-components/p-31b8f0ca.system.js +1 -0
  132. package/dist/mint-components/{p-a341ce23.js → p-3466bfaa.js} +2 -2
  133. package/dist/mint-components/{p-227aa136.entry.js → p-4ce7e3b1.entry.js} +1 -1
  134. package/dist/mint-components/{p-2d730bef.system.entry.js → p-5125ec72.system.entry.js} +1 -1
  135. package/dist/mint-components/{p-a44b7a52.system.js → p-5efed40f.system.js} +2 -2
  136. package/dist/mint-components/p-62d924e6.system.entry.js +1 -0
  137. package/dist/mint-components/p-6bcac9ed.system.entry.js +1 -0
  138. package/dist/mint-components/{p-44435060.entry.js → p-73069eba.entry.js} +1 -1
  139. package/dist/mint-components/{p-1f8d3b1a.entry.js → p-761ee9ea.entry.js} +2 -2
  140. package/dist/mint-components/{p-7cbbca72.entry.js → p-7953c3da.entry.js} +1 -1
  141. package/dist/mint-components/{p-9d48280a.js → p-7aba33e1.js} +1 -1
  142. package/dist/mint-components/{p-5a48bf9d.system.js → p-7ae3ec51.system.js} +1 -1
  143. package/dist/mint-components/p-7b97c0f4.system.entry.js +1 -0
  144. package/dist/mint-components/{p-c7878ec7.system.js → p-7daa731c.system.js} +1 -1
  145. package/dist/mint-components/{p-28e4b275.system.entry.js → p-7dac5a58.system.entry.js} +1 -1
  146. package/dist/mint-components/{p-e8422f7b.entry.js → p-836d3ec7.entry.js} +2 -2
  147. package/dist/mint-components/{p-5dd09973.system.entry.js → p-9fcc7901.system.entry.js} +1 -1
  148. package/dist/mint-components/{p-059ad130.system.entry.js → p-a121e5a1.system.entry.js} +1 -1
  149. package/dist/mint-components/p-a8645c1b.system.js +1 -0
  150. package/dist/mint-components/{p-a348f9b9.js → p-b090bbd2.js} +1 -1
  151. package/dist/mint-components/p-bfe08ca4.system.js +1 -0
  152. package/dist/mint-components/p-c53bd5bd.entry.js +9 -0
  153. package/dist/mint-components/{p-3bdccbc9.system.entry.js → p-cc5f9775.system.entry.js} +1 -1
  154. package/dist/mint-components/{p-10849094.system.js → p-d49373b7.system.js} +1 -1
  155. package/dist/mint-components/{p-6d23f01a.entry.js → p-d4e49019.entry.js} +2 -2
  156. package/dist/mint-components/{p-7aef9c53.entry.js → p-e1e96de9.entry.js} +1 -1
  157. package/dist/mint-components/p-e53c3c6e.system.js +1 -0
  158. package/dist/mint-components/{p-538fe844.system.entry.js → p-e70d8201.system.entry.js} +1 -1
  159. package/dist/mint-components/{p-c2e3f0f0.entry.js → p-f2c48bc8.entry.js} +1 -1
  160. package/dist/mint-components/p-f3558ef0.js +394 -0
  161. package/dist/mint-components/{p-24d6cfcd.js → p-f3a52eb6.js} +1 -1
  162. package/dist/mint-components/p-f66ccd51.entry.js +1 -0
  163. package/dist/mint-components/{p-4cfd562e.system.entry.js → p-fad1752b.system.entry.js} +1 -1
  164. package/dist/types/components/sqm-instant-access-registration/sqm-instant-access-registration.d.ts +1 -1
  165. package/dist/types/components/sqm-invoice-table/columns/InvoiceTableColumn.d.ts +0 -1
  166. package/dist/types/components/sqm-invoice-table/columns/sqm-invoice-table-data-column.d.ts +20 -0
  167. package/dist/types/components/sqm-invoice-table/columns/sqm-invoice-table-date-column.d.ts +1 -2
  168. package/dist/types/components/sqm-invoice-table/columns/sqm-invoice-table-download-column.d.ts +0 -1
  169. package/dist/types/components/sqm-invoice-table/mockInvoiceData.d.ts +0 -1
  170. package/dist/types/components/sqm-invoice-table/sqm-invoice-table.d.ts +60 -0
  171. package/dist/types/components/sqm-leaderboard/sqm-leaderboard.d.ts +3 -3
  172. package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.d.ts +0 -1
  173. package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-status-cell.d.ts +7 -0
  174. package/dist/types/components/sqm-referral-table/columns/ReferralTableColumn.d.ts +0 -1
  175. package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-column.d.ts +16 -0
  176. package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-date-column.d.ts +43 -0
  177. package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.d.ts +71 -0
  178. package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-status-column.d.ts +43 -0
  179. package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-user-column.d.ts +31 -0
  180. package/dist/types/components/sqm-referral-table/sqm-referral-table.d.ts +0 -1
  181. package/dist/types/components/sqm-referred-registration/sqm-referred-registration.d.ts +1 -1
  182. package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-reward-cell.d.ts +8 -0
  183. package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-source-cell.d.ts +11 -0
  184. package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.d.ts +24 -0
  185. package/dist/types/components/sqm-rewards-table/columns/RewardTableColumn.d.ts +0 -1
  186. package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-date-column.d.ts +31 -0
  187. package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-note-column.d.ts +20 -0
  188. package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.d.ts +32 -0
  189. package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.d.ts +50 -0
  190. package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.d.ts +104 -0
  191. package/dist/types/components/sqm-rewards-table/mockRewardData.d.ts +0 -1
  192. package/dist/types/components/sqm-rewards-table/mockTaxData.d.ts +0 -1
  193. package/dist/types/components/sqm-rewards-table/sqm-rewards-table.d.ts +48 -0
  194. package/dist/types/components/sqm-share-button/sqm-share-button.d.ts +3 -3
  195. package/dist/types/components/sqm-stencilbook/Themes.d.ts +16 -0
  196. package/dist/types/components/sqm-widget-verification/sqm-widget-verification-controller.d.ts +0 -5
  197. package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +1 -6
  198. package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +1 -0
  199. package/dist/types/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.d.ts +1 -1
  200. package/dist/types/components/tax-and-cash/sqm-docusign-form/useDocusignForm.d.ts +2 -2
  201. package/dist/types/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.d.ts +0 -4
  202. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +1 -1
  203. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +4 -10
  204. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.d.ts +1 -1
  205. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +1 -1
  206. package/dist/types/components/tax-and-cash/sqm-user-info-form/small-views/IndirectTaxDetailsView.d.ts +1 -1
  207. package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +1 -1
  208. package/dist/types/components/tax-and-cash/utils.d.ts +1 -1
  209. package/dist/types/components.d.ts +22 -66
  210. package/dist/types/global/android.d.ts +7 -0
  211. package/dist/types/global/demo.d.ts +2 -0
  212. package/dist/types/global/styles.d.ts +1 -2
  213. package/dist/types/saasquatch.d.ts +50 -106
  214. package/dist/types/stories/features.d.ts +4 -0
  215. package/dist/types/stories/templates.d.ts +4 -0
  216. package/docs/docs.docx +0 -0
  217. package/docs/raisins.json +1 -1
  218. package/grapesjs/grapesjs.js +1 -1
  219. package/package.json +1 -2
  220. package/shoelace/assets/icons/twitter-x.svg +4 -0
  221. package/dist/cjs/IndirectTaxDetailsView-81f1ce92.js +0 -646
  222. package/dist/cjs/data-68a42a7b.js +0 -137
  223. package/dist/cjs/sqm-code-verification.cjs.entry.js +0 -342
  224. package/dist/cjs/sqm-invoice-table-data-cell_5.cjs.entry.js +0 -84
  225. package/dist/cjs/sqm-tax-and-cash.cjs.entry.js +0 -1220
  226. package/dist/cjs/utils-a6957c85.js +0 -105
  227. package/dist/collection/utils/parseStates.js +0 -12
  228. package/dist/esm/IndirectTaxDetailsView-89731480.js +0 -639
  229. package/dist/esm/data-ce8ed0ae.js +0 -121
  230. package/dist/esm/sqm-code-verification.entry.js +0 -338
  231. package/dist/esm/sqm-invoice-table-data-cell_5.entry.js +0 -76
  232. package/dist/esm/sqm-tax-and-cash.entry.js +0 -1216
  233. package/dist/esm/utils-79d81bca.js +0 -97
  234. package/dist/esm-es5/IndirectTaxDetailsView-89731480.js +0 -1
  235. package/dist/esm-es5/ShadowViewAddon-b439f9c5.js +0 -1
  236. package/dist/esm-es5/data-ce8ed0ae.js +0 -1
  237. package/dist/esm-es5/extractProps-54064fb0.js +0 -1
  238. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +0 -1
  239. package/dist/esm-es5/sqm-code-verification.entry.js +0 -1
  240. package/dist/esm-es5/sqm-invoice-table-data-cell_5.entry.js +0 -1
  241. package/dist/esm-es5/sqm-tax-and-cash.entry.js +0 -1
  242. package/dist/esm-es5/utils-79d81bca.js +0 -1
  243. package/dist/mint-components/p-0768fe1d.system.js +0 -1
  244. package/dist/mint-components/p-0797a946.js +0 -1
  245. package/dist/mint-components/p-169c8564.system.js +0 -1
  246. package/dist/mint-components/p-1e79befd.entry.js +0 -1
  247. package/dist/mint-components/p-2378a0dd.entry.js +0 -16
  248. package/dist/mint-components/p-3206d0a4.js +0 -103
  249. package/dist/mint-components/p-6a4582eb.system.entry.js +0 -1
  250. package/dist/mint-components/p-6f323a9f.entry.js +0 -11
  251. package/dist/mint-components/p-7274fe6e.js +0 -1
  252. package/dist/mint-components/p-7813a75a.js +0 -1
  253. package/dist/mint-components/p-7dc10820.system.js +0 -1
  254. package/dist/mint-components/p-8c126ccb.system.entry.js +0 -1
  255. package/dist/mint-components/p-901358ee.system.entry.js +0 -1
  256. package/dist/mint-components/p-9481740a.system.entry.js +0 -1
  257. package/dist/mint-components/p-a39c3535.system.entry.js +0 -1
  258. package/dist/mint-components/p-a86635aa.system.entry.js +0 -1
  259. package/dist/mint-components/p-ae0636bb.system.js +0 -1
  260. package/dist/mint-components/p-c25b0ff4.js +0 -394
  261. package/dist/mint-components/p-e228b351.system.js +0 -1
  262. package/dist/mint-components/p-e524056f.entry.js +0 -1
  263. package/dist/mint-components/p-e55aafe9.system.js +0 -1
  264. package/dist/mint-components/p-ee17ee0b.entry.js +0 -1
  265. package/dist/mint-components/p-f2ebbbe3.system.entry.js +0 -1
  266. package/dist/mint-components/p-fba00613.entry.js +0 -93
  267. package/dist/mint-components/p-fd2ee10c.entry.js +0 -9
  268. package/dist/types/utils/parseStates.d.ts +0 -1
  269. /package/dist/collection/components/tax-and-cash/{data.js → sqm-tax-and-cash/data.js} +0 -0
  270. /package/dist/types/components/tax-and-cash/{data.d.ts → sqm-tax-and-cash/data.d.ts} +0 -0
@@ -2,7 +2,7 @@
2
2
 
3
3
  const index = require('./index-a43a63b4.js');
4
4
  const stencilHooks_module = require('./stencil-hooks.module-62264802.js');
5
- const global = require('./global-242743b1.js');
5
+ const global = require('./global-2298fc8b.js');
6
6
  const index_module = require('./index.module-39955732.js');
7
7
  const cjs = require('./cjs-1066ec21.js');
8
8
  const utils = require('./utils-6847bc06.js');
@@ -17,48 +17,6 @@ const index$1 = require('./index-8c6255f5.js');
17
17
  const utilities = require('./utilities-be3ce1f8.js');
18
18
  const sqmPortalContainerView = require('./sqm-portal-container-view-70eaf785.js');
19
19
 
20
- function BigStatView(props) {
21
- const { statvalue, flexReverse, alignment, statTextColor, statFontSize, descriptionTextColor, descriptionFontSize, statFontWeight, } = props;
22
- // Dependent on props, not feasible to move out
23
- const style = {
24
- Container: {
25
- display: "flex",
26
- // height: "inherit",
27
- // "justify-content": "space-between",
28
- "flex-direction": `${flexReverse ? "column-reverse" : "column"}`,
29
- "align-items": `${alignment === "left"
30
- ? "flex-start"
31
- : alignment === "right"
32
- ? "flex-end"
33
- : "center"}`,
34
- },
35
- Stat: {
36
- "font-size": statFontSize
37
- ? `${statFontSize}px`
38
- : "var(--sl-font-size-xx-large)",
39
- "text-align": alignment,
40
- color: statTextColor || "var(--sqm-text)",
41
- lineHeight: "35px",
42
- fontWeight: statFontWeight || "var(--sl-font-weight-normal)",
43
- },
44
- Description: {
45
- "font-size": descriptionFontSize
46
- ? `${descriptionFontSize}px`
47
- : "var(--sl-font-size-small)",
48
- "font-weight": "var(--sl-font-weight-normal)",
49
- color: descriptionTextColor || "var(--sqm-text)",
50
- "text-align": alignment,
51
- lineHeight: "20px",
52
- },
53
- };
54
- const sheet = JSS.createStyleSheet(style);
55
- const styleString = sheet.toString();
56
- return (index.h("div", { part: "stat-wrapper", class: sheet.classes.Container },
57
- index.h("style", { type: "text/css" }, styleString),
58
- index.h("div", { part: "stat-value", class: sheet.classes.Stat }, statvalue),
59
- index.h("div", { part: "stat-description", class: sheet.classes.Description }, props.labelSlot)));
60
- }
61
-
62
20
  const medium = {
63
21
  facebook: { color: "#1877f2", text: "#fff", icon: "facebook" },
64
22
  twitter: { color: "#000000", text: "#fff", icon: "twitter-x" },
@@ -135,190 +93,461 @@ function ShareButtonView(props, children) {
135
93
  !props.hidetext && children)));
136
94
  }
137
95
 
138
- function StatContainerView(props, children) {
139
- const divideSpace = () => {
140
- const spaceValue = getComputedStyle(document.documentElement).getPropertyValue(`--sl-spacing-${props.space}`);
141
- return `${Math.floor(parseInt(spaceValue) / 2)}rem`;
142
- };
143
- // take alignment variable and convert it to CSS flexbox alignment
144
- const alignment = props.alignment === "center"
145
- ? "center"
146
- : props.alignment === "right"
147
- ? "flex-end"
148
- : "flex-start";
149
- // Dependent on props, not feasible to move out
96
+ function LeaderboardView(props) {
97
+ var _a, _b, _c;
98
+ const { states, data, elements } = props;
99
+ const { styles } = states;
150
100
  const style = {
151
- StatContainer: {
152
- width: "100%",
153
- display: "flex",
154
- flexWrap: "wrap",
155
- alignItems: "center",
156
- justifyContent: alignment,
157
- flexDirection: "row",
158
- gap: `var(--sl-spacing-${props.gap})`,
159
- // Apply border styles conditionally based on the hideBorder prop
160
- "& > *": {
161
- "border-right": props.hideBorder
162
- ? "none"
163
- : "1px solid var(--sqm-text-subdued)",
164
- "padding-right": divideSpace(),
101
+ Leaderboard: {
102
+ "& table": {
103
+ width: "100%",
104
+ borderCollapse: "collapse",
105
+ background: styles.background || "transparent",
106
+ borderRadius: styles.borderRadius ? `${styles.borderRadius}px` : "0",
165
107
  },
166
- "& > :last-child": {
167
- "border-right": "none",
108
+ "& th": {
109
+ textAlign: "left",
110
+ padding: "var(--sl-spacing-medium)",
111
+ paddingTop: "0",
112
+ fontSize: "var(--sl-font-size-medium)",
113
+ fontWeight: "var(--sl-font-weight-semibold)",
168
114
  },
169
- "& > ::slotted(*)": {
170
- "border-right": props.hideBorder
171
- ? "none"
172
- : "1px solid var(--sqm-text-subdued)",
173
- "padding-right": divideSpace(),
115
+ "& tr:not(:first-child)": {
116
+ borderTop: `var(--sqm-bordr-thickness) solid ${styles.borderColor || "var(--sqm-border-color)"}`,
174
117
  },
175
- "& > ::slotted(*:last-child)": {
176
- "border-right": "none",
118
+ "& td": {
119
+ fontSize: "var(--sl-font-size-medium)",
120
+ fontWeight: "var(--sl-font-weight-normal)",
177
121
  },
178
- "@media screen and (max-width: 430px)": {
179
- "& > ::slotted(*)": {
180
- borderRight: "none",
181
- },
122
+ "& .ellipses": {
123
+ textAlign: "left",
124
+ padding: "0",
125
+ color: styles.textColor || "var(--sqm-text)",
126
+ paddingLeft: "25%",
182
127
  },
183
- },
184
- StatFrame: {
185
- display: "flex",
186
- },
187
- BorderFix: {
188
- "border-right": "1px solid transparent",
189
- width: "0px",
190
- "margin-left": "-1px",
191
- },
192
- };
193
- const sheet = JSS.createStyleSheet(style);
194
- const styleString = sheet.toString();
195
- return (index.h("div", { class: sheet.classes.StatFrame, part: "sqm-base" },
196
- index.h("div", { class: sheet.classes.StatContainer, part: "sqm-inner-container" },
197
- index.h("style", { type: "text/css" }, styleString),
198
- children),
199
- index.h("div", { class: sheet.classes.BorderFix, part: "sqm-border" })));
200
- }
201
-
202
- function PortalChangePasswordView(props) {
203
- const { states, callbacks } = props;
204
- const style = {
205
- Dialog: {
206
- padding: "0",
207
- "&::part(panel)": {
208
- background: "var(--sqm-portal-background)",
209
- borderRadius: "var(--sqm-border-radius-normal, var(--sl-border-radius-medium))",
128
+ "& .highlight": {
129
+ background: styles.viewingUserHighlightColor ||
130
+ "var(--sqm-accent-color-background)",
131
+ "& td, th": {
132
+ color: styles.viewingUserHighlightTextColor || "var(--sqm-text)",
133
+ },
210
134
  },
211
- "&::part(close-button)": {
212
- "margin-top": "var(--sl-spacing-medium)",
135
+ "& td, th": {
136
+ color: styles.textColor || "var(--sqm-text)",
137
+ padding: "var(--sl-spacing-medium)",
213
138
  },
214
- "&::part(body)": {
215
- padding: "0 var(--sl-spacing-x-large) var(--sl-spacing-x-large) var(--sl-spacing-x-large)",
139
+ "& .User": {
140
+ width: "100%",
216
141
  },
217
- },
218
- Error: {
219
- "&::part(erroralert-base)": {
220
- "margin-bottom": "15px",
142
+ "& .Score": {
143
+ width: "auto",
144
+ whiteSpace: "nowrap",
221
145
  },
222
- },
223
- Success: {
224
- "&::part(successalert-base)": {
225
- "margin-bottom": "15px",
146
+ "& .Rank": {
147
+ whiteSpace: "nowrap",
226
148
  },
227
- },
228
- InputContainer: {
229
- "& > :not(:last-child)": {
230
- "margin-bottom": "var(--sl-spacing-x-large)",
149
+ "& .fullWidth": {
150
+ width: "100%",
231
151
  },
232
152
  },
233
- CancelButton: {
234
- margin: "var(--sl-spacing-large) auto",
235
- width: "100%",
236
- },
237
- PasswordField: {
238
- marginBottom: "var(--sl-spacing-large) !important",
239
- display: "block",
240
- },
241
- ChangePasswordButton: {
242
- paddingTop: "var(--sl-spacing-x-large)",
243
- },
244
153
  };
245
154
  const sheet = JSS.createStyleSheet(style);
246
155
  const styleString = sheet.toString();
247
- return (index.h("div", null,
248
- index.h("style", { type: "text/css" }, styleString),
249
- index.h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, "onSl-hide": () => callbacks.setOpen(false) },
250
- index.h(sqmPortalContainerView.PortalSectionView, Object.assign({}, {
251
- labelMargin: "x-large",
252
- padding: "none",
253
- label: (index.h(sqmTextSpanView.TextSpanView, Object.assign({}, { type: "h2" }), states.content.modalChangePasswordHeader)),
254
- content: (index.h(sqmPortalContainerView.PortalContainerView, Object.assign({}, { direction: "column", padding: "none", gap: "32px" }),
255
- states.error && (index.h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
256
- index.h("div", { part: "erroralert-text" }, states.error))),
257
- states.success && (index.h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
258
- index.h("div", { part: "successalert-text" }, states.content.successMessage))),
259
- index.h("sl-form", { "onSl-submit": callbacks.submit },
260
- index.h("div", { class: sheet.classes.InputContainer },
261
- index.h("sqm-password-field", { exportparts: "input-label: input-label", class: sheet.classes.PasswordField, fieldLabel: states.content.passwordFieldLabel, meetsRequirementsText: states.content.meetsRequirementsText, doesNotMeetRequirementsText: states.content.doesNotMeetRequirementsText, minErrorText: states.content.minErrorText, uppercaseErrorText: states.content.uppercaseErrorText, lowercaseErrorText: states.content.lowercaseErrorText, hasErrorText: states.content.hasErrorText }),
262
- index.h("sl-input", { exportparts: "label: input-label, base: input-base", name: "/confirmPassword", label: states.content.confirmPasswordFieldLabel, required: true, togglePassword: true, disabled: states.loading, type: "password" })),
263
- index.h(sqmPortalContainerView.PortalContainerView, Object.assign({}, { direction: "row", padding: "none", gap: "20px" }),
264
- index.h("sl-button", { class: sheet.classes.ChangePasswordButton, type: "primary", exportparts: "base: primarybutton-base", submit: true, loading: states.loading }, states.content.changePasswordButtonText),
265
- index.h("sl-button", { class: sheet.classes.CancelButton, type: "secondary", exportparts: "base: secondarybutton-base", onClick: () => callbacks.setOpen(false) }, states.content.cancelText))))),
266
- }))),
267
- index.h(sqmPortalContainerView.PortalSectionView, Object.assign({}, {
268
- labelMargin: "x-large",
269
- padding: "xxx-large",
270
- label: (index.h(sqmTextSpanView.TextSpanView, Object.assign({}, { type: "h2" }), states.content.portalChangePasswordHeader)),
271
- content: (index.h("sl-button", { type: "primary", exportparts: "base: primarybutton-base", onClick: () => callbacks.setOpen(true) }, states.content.portalChangePasswordButtonText)),
272
- }),
273
- index.h("style", { type: "text/css" }, styleString))));
274
- }
275
-
276
- function PoweredByImg({ color = "#A6A6A6", width = 120, height = 16, }) {
277
- return (index.h("svg", { width: width, height: height, viewBox: "0 0 1662 254", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
278
- index.h("path", { d: "M801.082 253.58L869.382 1.67969", stroke: color, "stroke-width": "3" }),
279
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M125.682 42.48C123.882 42.48 121.982 42.78 120.382 43.48C118.682 44.18 117.182 45.18 115.882 46.48C114.582 47.68 113.582 49.28 112.882 50.98C112.182 52.68 111.882 54.48 111.982 56.28C112.282 59.68 113.882 63.08 116.382 65.38C118.982 67.78 122.382 68.98 125.782 68.98C129.282 68.98 132.682 67.58 135.182 65.38C137.782 62.98 139.382 59.78 139.582 56.28C139.582 54.38 139.282 52.68 138.682 50.98C137.982 49.28 136.982 47.78 135.682 46.48C134.382 45.18 132.882 44.18 131.182 43.48C129.282 42.78 127.582 42.48 125.682 42.48Z", fill: color }),
280
- index.h("path", { d: "M135.882 89.2798H115.582V187.58H135.882V89.2798Z", fill: color }),
281
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M231.481 104.18C238.781 93.4799 251.181 87.3799 266.281 87.3799C290.981 87.3799 307.581 103.28 307.381 127.08V187.48H286.781V132.38C286.781 116.38 278.281 107.18 263.381 107.18C248.481 107.18 237.981 117.68 237.981 132.68V187.48H217.281V132.38C217.281 116.38 208.781 107.18 193.881 107.18C178.981 107.18 168.481 117.68 168.481 132.68V187.48H147.981V89.3799H168.681V97.8799C178.081 88.8799 190.181 87.4799 197.081 87.4799C211.881 87.4799 224.381 93.5799 231.481 104.18Z", fill: color }),
282
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M370.781 87.48C358.581 87.48 347.981 91.38 339.981 98.38V89.28H319.481V226.08H339.981V177.78C347.881 185.08 358.581 188.78 370.781 188.78C398.781 188.78 419.881 166.88 419.881 138.08C419.981 109.28 398.781 87.48 370.781 87.48ZM368.881 169.58C351.481 169.58 338.881 156.38 338.881 138.28C338.881 120.38 351.381 106.98 368.881 106.98C386.281 106.98 398.881 120.08 398.881 138.28C398.881 156.48 386.381 169.58 368.881 169.58Z", fill: color }),
283
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M701.782 169.88C707.682 169.88 714.082 167.58 719.582 163.98L721.482 162.88L731.482 178.68L729.782 179.88C721.282 186.28 710.982 189.58 700.382 189.58C678.082 189.58 665.782 176.38 665.782 152.28V108.68H645.682V89.3799H665.782V59.8799H686.482V89.2798H725.682V108.48H686.482V151.88C686.482 163.38 691.982 169.88 701.782 169.88Z", fill: color }),
284
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M551.282 239.88C549.982 239.88 548.782 240.28 547.682 240.88C546.682 241.58 545.782 242.58 545.382 243.68C544.882 244.78 544.782 246.08 545.082 247.28C545.282 248.58 545.882 249.68 546.882 250.48C547.782 251.38 548.882 251.98 550.082 252.28C551.382 252.48 552.582 252.38 553.782 251.98C554.882 251.48 555.982 250.78 556.582 249.68C557.282 248.68 557.582 247.38 557.582 246.18C557.582 244.48 556.982 242.88 555.682 241.68C554.482 240.48 552.882 239.88 551.282 239.88Z", fill: color }),
285
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M586.182 210.78C592.282 210.78 597.582 213.08 601.082 217.18L601.482 217.68L596.282 223.08L595.782 222.58C594.482 221.18 593.082 220.18 591.382 219.48C589.682 218.78 587.882 218.38 586.082 218.48C578.882 218.48 573.682 224.08 573.682 231.58C573.682 239.18 578.882 244.78 586.082 244.78C589.782 244.68 593.282 243.18 595.882 240.58L596.382 240.08L601.382 245.68L600.982 246.08C597.182 250.18 591.982 252.18 586.082 252.18C574.082 252.18 565.382 243.58 565.382 231.58C565.582 219.48 574.182 210.78 586.182 210.78Z", fill: color }),
286
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M633.782 210.78C621.682 210.78 612.582 219.68 612.582 231.38C612.582 243.08 621.682 251.98 633.782 251.98C645.882 251.98 654.882 243.08 654.882 231.38C655.082 219.78 645.982 210.78 633.782 210.78ZM633.782 244.78C626.382 244.78 620.782 239.28 620.782 231.58C620.782 223.88 626.182 218.48 633.782 218.48C641.182 218.48 646.782 224.08 646.782 231.58C646.782 238.98 641.382 244.78 633.782 244.78Z", fill: color }),
287
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M723.982 228.78C723.982 222.18 720.382 218.28 714.082 218.28C707.682 218.28 703.382 222.78 702.982 228.98V252.18H695.082V228.68C695.082 222.08 691.482 218.18 685.182 218.18C680.082 218.18 674.482 221.48 674.482 228.88V252.08H666.582V211.38H674.482V214.78L676.682 213.28C679.582 211.38 683.082 210.48 686.582 210.48C692.082 210.48 696.782 212.48 699.882 216.08L700.882 217.28L701.882 216.08C704.782 212.48 709.582 210.48 715.182 210.48C725.082 210.48 731.982 217.08 731.982 226.38V251.88H724.082V228.68H723.982V228.78Z", fill: color }),
288
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M511.681 89.4797V98.7797C503.681 91.4797 493.181 87.6797 480.981 87.6797C452.981 87.6797 431.981 109.68 431.981 138.68C431.981 167.78 453.081 189.68 480.981 189.68C493.181 189.68 503.681 185.78 511.681 178.38V187.68H532.381V89.4797H511.681ZM482.881 169.88C465.481 169.88 452.781 156.58 452.781 138.48C452.781 120.48 465.281 106.98 482.881 106.98C500.481 106.98 512.781 120.08 512.781 138.48C512.781 156.68 500.181 169.88 482.881 169.88Z", fill: color }),
289
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M595.281 107.08C604.181 107.08 611.781 110.38 618.781 116.98L620.481 118.68L633.981 104.58L632.581 102.98C623.781 92.98 610.781 87.48 595.781 87.48C565.981 87.48 544.481 109.08 544.481 138.48C544.481 167.98 565.981 189.48 595.781 189.48C610.481 189.48 623.681 183.98 632.581 174.08L633.981 172.58L620.981 158.18L619.281 159.88C612.481 166.48 603.981 169.98 595.481 169.98C578.381 169.98 565.681 156.68 565.681 138.58C565.581 120.58 577.881 107.08 595.281 107.08Z", fill: color }),
290
- index.h("path", { d: "M135.882 89.2798H115.582V187.58H135.882V89.2798Z", fill: color }),
291
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M231.481 104.18C238.781 93.4799 251.181 87.3799 266.281 87.3799C290.981 87.3799 307.581 103.28 307.381 127.08V187.48H286.781V132.38C286.781 116.38 278.281 107.18 263.381 107.18C248.481 107.18 237.981 117.68 237.981 132.68V187.48H217.281V132.38C217.281 116.38 208.781 107.18 193.881 107.18C178.981 107.18 168.481 117.68 168.481 132.68V187.48H147.981V89.3799H168.681V97.8799C178.081 88.8799 190.181 87.4799 197.081 87.4799C211.881 87.4799 224.381 93.5799 231.481 104.18Z", fill: color }),
292
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M370.781 87.48C358.581 87.48 347.981 91.38 339.981 98.38V89.28H319.481V226.08H339.981V177.78C347.881 185.08 358.581 188.78 370.781 188.78C398.781 188.78 419.881 166.88 419.881 138.08C419.981 109.28 398.781 87.48 370.781 87.48ZM368.881 169.58C351.481 169.58 338.881 156.38 338.881 138.28C338.881 120.38 351.381 106.98 368.881 106.98C386.281 106.98 398.881 120.08 398.881 138.28C398.881 156.48 386.381 169.58 368.881 169.58Z", fill: color }),
293
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M701.782 169.88C707.682 169.88 714.082 167.58 719.582 163.98L721.482 162.88L731.482 178.68L729.782 179.88C721.282 186.28 710.982 189.58 700.382 189.58C678.082 189.58 665.782 176.38 665.782 152.28V108.68H645.682V89.3799H665.782V59.8799H686.482V89.2798H725.682V108.48H686.482V151.88C686.482 163.38 691.982 169.88 701.782 169.88Z", fill: color }),
294
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M511.681 89.4797V98.7797C503.681 91.4797 493.181 87.6797 480.981 87.6797C452.981 87.6797 431.981 109.68 431.981 138.68C431.981 167.78 453.081 189.68 480.981 189.68C493.181 189.68 503.681 185.78 511.681 178.38V187.68H532.381V89.4797H511.681ZM482.881 169.88C465.481 169.88 452.781 156.58 452.781 138.48C452.781 120.48 465.281 106.98 482.881 106.98C500.481 106.98 512.781 120.08 512.781 138.48C512.781 156.68 500.181 169.88 482.881 169.88Z", fill: color }),
295
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M595.281 107.08C604.181 107.08 611.781 110.38 618.781 116.98L620.481 118.68L633.981 104.58L632.581 102.98C623.781 92.98 610.781 87.48 595.781 87.48C565.981 87.48 544.481 109.08 544.481 138.48C544.481 167.98 565.981 189.48 595.781 189.48C610.481 189.48 623.681 183.98 632.581 174.08L633.981 172.58L620.981 158.18L619.281 159.88C612.481 166.48 603.981 169.98 595.481 169.98C578.381 169.98 565.681 156.68 565.681 138.58C565.581 120.58 577.881 107.08 595.281 107.08Z", fill: color }),
296
- index.h("path", { d: "M34.6815 112.78C40.6815 112.78 46.5815 114.18 51.8815 116.68C57.2815 119.18 62.0815 122.78 65.9815 127.28C67.9815 122.68 69.0815 117.78 69.0815 112.88C69.0815 108.38 68.1815 103.88 66.4815 99.8799C64.6815 95.6799 62.1815 91.9799 58.9815 88.8799C55.7815 85.7799 51.9815 83.2799 47.7815 81.4799C43.5815 79.7799 39.0815 78.8799 34.5815 78.8799C30.0815 78.8799 25.5815 79.6799 21.3815 81.4799C17.1815 83.1799 13.3815 85.7799 10.1815 88.8799C6.98154 91.9799 4.48154 95.7799 2.68154 99.8799C0.881541 104.08 0.081543 108.38 0.081543 112.88C0.181543 117.88 1.18154 122.78 3.18154 127.28C7.08154 122.68 11.8815 119.18 17.1815 116.68C22.7815 113.98 28.7815 112.68 34.6815 112.78Z", fill: color }),
297
- index.h("path", { d: "M69.1817 153.48C69.1817 146.68 67.1817 140.18 63.2817 134.48C59.4817 128.88 54.0817 124.48 47.7817 121.88C41.4817 119.28 34.4817 118.68 27.7817 119.88C21.0817 121.28 14.8817 124.48 10.0817 129.28C5.28166 134.08 1.88166 140.08 0.681661 146.78C-0.718339 153.48 0.0816607 160.18 2.68166 166.48C5.28166 172.78 9.68166 178.08 15.4817 181.78C21.0817 185.58 27.7817 187.48 34.6817 187.48C43.7817 187.38 52.5817 183.88 59.0817 177.38C65.6817 170.98 69.1817 162.58 69.1817 153.48Z", fill: color }),
298
- index.h("path", { d: "M69.1817 34.9799C69.1817 28.1799 67.1817 21.6799 63.2817 15.9799C59.4817 10.3799 54.1817 5.9799 47.7817 3.3799C41.4817 0.779901 34.4817 0.1799 27.7817 1.3799C21.0817 2.7799 14.8817 5.97986 10.0817 10.7799C5.28166 15.5799 1.88166 21.5799 0.681661 28.2799C-0.718339 34.9799 0.0816607 41.6799 2.68166 47.9799C5.28166 54.2799 9.68166 59.5799 15.4817 63.2799C21.0817 67.0799 27.7817 68.9799 34.6817 68.9799C43.8817 68.9799 52.6817 65.3799 59.1817 58.9799C65.5817 52.6799 69.1817 43.8799 69.1817 34.9799Z", fill: color }),
299
- index.h("path", { d: "M962.664 203.95C953.044 203.95 945.244 201.285 939.264 195.955C933.284 190.495 930.294 183.41 930.294 174.7C930.294 165.08 933.739 157.605 940.629 152.275C947.649 146.945 957.464 144.28 970.074 144.28H993.864V138.43C993.864 129.72 991.589 123.09 987.039 118.54C982.619 113.86 976.184 111.52 967.734 111.52C962.014 111.52 956.749 112.885 951.939 115.615C947.129 118.345 943.229 122.18 940.239 127.12L933.999 120.295C937.639 114.575 942.384 110.22 948.234 107.23C954.214 104.11 960.974 102.55 968.514 102.55C979.694 102.55 988.404 105.605 994.644 111.715C1001.01 117.695 1004.2 126.015 1004.2 136.675V184.255C1004.2 188.805 1004.98 194.72 1006.54 202H997.569C996.399 199.14 995.554 194.07 995.034 186.79H994.644C990.874 192.25 986.259 196.475 980.799 199.465C975.339 202.455 969.294 203.95 962.664 203.95ZM962.664 195.175C968.124 195.175 973.259 194.07 978.069 191.86C982.879 189.52 986.714 186.465 989.574 182.695C992.434 178.795 993.864 174.7 993.864 170.41V152.665H969.489C960.389 152.665 953.239 154.615 948.039 158.515C942.969 162.415 940.434 167.81 940.434 174.7C940.434 180.68 942.514 185.62 946.674 189.52C950.834 193.29 956.164 195.175 962.664 195.175Z", fill: color }),
300
- index.h("path", { d: "M1067.55 203.95C1055.07 203.95 1045.25 199.27 1038.1 189.91C1030.95 180.55 1027.38 167.745 1027.38 151.495C1027.38 136.415 1031.02 124.52 1038.3 115.81C1045.71 106.97 1055.72 102.55 1068.33 102.55C1074.7 102.55 1080.55 104.045 1085.88 107.035C1091.21 110.025 1095.5 114.25 1098.75 119.71H1099.14V57.3101H1109.67V178.21C1109.67 189.13 1109.86 197.06 1110.25 202H1100.89C1100.63 197.84 1100.5 192.12 1100.5 184.84H1100.11C1097.12 190.69 1092.7 195.37 1086.85 198.88C1081 202.26 1074.57 203.95 1067.55 203.95ZM1068.13 195.175C1077.23 195.175 1084.64 192.185 1090.36 186.205C1096.21 180.225 1099.14 172.49 1099.14 163V146.815C1099.14 135.895 1096.41 127.25 1090.95 120.88C1085.49 114.38 1078.08 111.13 1068.72 111.13C1059.1 111.13 1051.49 114.77 1045.9 122.05C1040.44 129.2 1037.71 139.145 1037.71 151.885C1037.71 165.275 1040.44 175.87 1045.9 183.67C1051.36 191.34 1058.77 195.175 1068.13 195.175Z", fill: color }),
301
- index.h("path", { d: "M1208.57 104.5L1172.3 202H1161.96L1125.5 104.5H1136.61L1167.03 189.715L1197.45 104.5H1208.57Z", fill: color }),
302
- index.h("path", { d: "M1261.51 203.95C1252.54 203.95 1244.61 201.87 1237.72 197.71C1230.96 193.55 1225.7 187.635 1221.93 179.965C1218.29 172.295 1216.47 163.39 1216.47 153.25C1216.47 143.11 1218.29 134.205 1221.93 126.535C1225.7 118.865 1230.96 112.95 1237.72 108.79C1244.61 104.63 1252.54 102.55 1261.51 102.55C1270.48 102.55 1278.35 104.63 1285.11 108.79C1292 112.95 1297.33 118.865 1301.1 126.535C1304.87 134.205 1306.75 143.11 1306.75 153.25C1306.75 163.39 1304.87 172.295 1301.1 179.965C1297.33 187.635 1292 193.55 1285.11 197.71C1278.35 201.87 1270.48 203.95 1261.51 203.95ZM1261.51 195.37C1268.4 195.37 1274.45 193.615 1279.65 190.105C1284.98 186.595 1289.07 181.655 1291.93 175.285C1294.79 168.915 1296.22 161.57 1296.22 153.25C1296.22 144.93 1294.79 137.585 1291.93 131.215C1289.07 124.845 1284.98 119.905 1279.65 116.395C1274.45 112.885 1268.4 111.13 1261.51 111.13C1254.75 111.13 1248.71 112.885 1243.38 116.395C1238.18 119.905 1234.15 124.845 1231.29 131.215C1228.43 137.585 1227 144.93 1227 153.25C1227 161.57 1228.43 168.915 1231.29 175.285C1234.15 181.655 1238.18 186.595 1243.38 190.105C1248.71 193.615 1254.75 195.37 1261.51 195.37Z", fill: color }),
303
- index.h("path", { d: "M1366.03 203.95C1352.25 203.95 1341.52 199.53 1333.85 190.69C1326.31 181.72 1322.54 169.24 1322.54 153.25C1322.54 137.39 1326.38 124.975 1334.05 116.005C1341.72 107.035 1352.38 102.55 1366.03 102.55C1373.57 102.55 1380.26 104.11 1386.11 107.23C1391.96 110.22 1396.77 114.575 1400.54 120.295L1394.3 126.34C1391.31 121.66 1387.28 118.02 1382.21 115.42C1377.27 112.69 1371.88 111.325 1366.03 111.325C1355.76 111.325 1347.63 115.03 1341.65 122.44C1335.8 129.85 1332.88 140.12 1332.88 153.25C1332.88 166.38 1335.8 176.65 1341.65 184.06C1347.63 191.47 1355.76 195.175 1366.03 195.175C1371.88 195.175 1377.27 193.875 1382.21 191.275C1387.28 188.545 1391.31 184.84 1394.3 180.16L1400.54 186.205C1396.77 191.925 1391.96 196.345 1386.11 199.465C1380.26 202.455 1373.57 203.95 1366.03 203.95Z", fill: color }),
304
- index.h("path", { d: "M1446.55 203.95C1436.93 203.95 1429.13 201.285 1423.15 195.955C1417.17 190.495 1414.18 183.41 1414.18 174.7C1414.18 165.08 1417.62 157.605 1424.51 152.275C1431.53 146.945 1441.35 144.28 1453.96 144.28H1477.75V138.43C1477.75 129.72 1475.47 123.09 1470.92 118.54C1466.5 113.86 1460.07 111.52 1451.62 111.52C1445.9 111.52 1440.63 112.885 1435.82 115.615C1431.01 118.345 1427.11 122.18 1424.12 127.12L1417.88 120.295C1421.52 114.575 1426.27 110.22 1432.12 107.23C1438.1 104.11 1444.86 102.55 1452.4 102.55C1463.58 102.55 1472.29 105.605 1478.53 111.715C1484.9 117.695 1488.08 126.015 1488.08 136.675V184.255C1488.08 188.805 1488.86 194.72 1490.42 202H1481.45C1480.28 199.14 1479.44 194.07 1478.92 186.79H1478.53C1474.76 192.25 1470.14 196.475 1464.68 199.465C1459.22 202.455 1453.18 203.95 1446.55 203.95ZM1446.55 195.175C1452.01 195.175 1457.14 194.07 1461.95 191.86C1466.76 189.52 1470.6 186.465 1473.46 182.695C1476.32 178.795 1477.75 174.7 1477.75 170.41V152.665H1453.37C1444.27 152.665 1437.12 154.615 1431.92 158.515C1426.85 162.415 1424.32 167.81 1424.32 174.7C1424.32 180.68 1426.4 185.62 1430.56 189.52C1434.72 193.29 1440.05 195.175 1446.55 195.175Z", fill: color }),
305
- index.h("path", { d: "M1547.14 203.95C1539.08 203.95 1532.97 201.48 1528.81 196.54C1524.65 191.47 1522.57 184.19 1522.57 174.7V113.275H1505.02V104.5H1522.57V77.9801L1532.32 74.6651H1533.1V104.5H1560.59V113.275H1533.1V172.555C1533.1 180.355 1534.33 186.01 1536.8 189.52C1539.27 193.03 1543.17 194.785 1548.5 194.785C1553.83 194.785 1558.06 194.005 1561.18 192.445L1562.35 200.83C1558.19 202.91 1553.12 203.95 1547.14 203.95Z", fill: color }),
306
- index.h("path", { d: "M1661.53 157.54H1589.77C1590.42 169.37 1593.54 178.535 1599.13 185.035C1604.85 191.535 1612.65 194.785 1622.53 194.785C1628.51 194.785 1633.97 193.485 1638.91 190.885C1643.98 188.285 1647.95 184.645 1650.81 179.965L1657.24 186.4C1653.34 192.12 1648.4 196.475 1642.42 199.465C1636.57 202.455 1629.94 203.95 1622.53 203.95C1609.01 203.95 1598.35 199.465 1590.55 190.495C1582.88 181.525 1579.05 169.175 1579.05 153.445C1579.05 137.585 1582.82 125.17 1590.36 116.2C1597.9 107.1 1608.23 102.55 1621.36 102.55C1633.84 102.55 1643.66 106.84 1650.81 115.42C1657.96 124 1661.53 135.895 1661.53 151.105V157.54ZM1651.39 147.4C1651.39 136.48 1648.66 127.77 1643.2 121.27C1637.74 114.77 1630.46 111.52 1621.36 111.52C1611.74 111.52 1604.2 114.77 1598.74 121.27C1593.28 127.77 1590.29 137.065 1589.77 149.155H1651.39V147.4Z", fill: color })));
307
- }
308
-
309
- const debug = stencilHooks_module.browser("sq:useBigStat");
310
- const LOADING = "...";
311
- const debugQuery = (query, variables, getStat) => {
312
- const res = index_module.wn(query, variables);
313
- if (!(res === null || res === void 0 ? void 0 : res.data) && !res.loading) {
314
- console.error("issue getting stat:", res);
156
+ const vanillaStyle = `
157
+ :host{
158
+ display: block;
315
159
  }
316
- const stat = getStat(res);
317
- return { ...stat, loading: res.loading };
318
- };
319
- const referralsCountQuery = (programId,
320
- // locale
321
- _, status) => {
160
+ `;
161
+ if (states.isEssentials) {
162
+ return (index.h("sqm-empty", { "empty-state-image": "https://res.cloudinary.com/saasquatch/image/upload/v1715360191/squatch-assets/Leaderboard_Not_Available.svg", "empty-state-header": "Leaderboards aren\u2019t available on your plan", "empty-state-text": "Contact {supportText} to upgrade your plan and start leveraging gamification in your program.", "support-text": "Support" }));
163
+ }
164
+ if (states.loading) {
165
+ return (index.h("div", { class: sheet.classes.Leaderboard, style: { width: styles.width || "100%" } },
166
+ index.h("style", { type: "text/css" },
167
+ styleString,
168
+ vanillaStyle),
169
+ index.h("table", null, [...Array(10)].map(() => {
170
+ return (index.h("tr", null,
171
+ index.h("td", null,
172
+ index.h("sl-skeleton", null))));
173
+ }))));
174
+ }
175
+ if (!states.hasLeaders)
176
+ return elements.empty;
177
+ let userSeenFlag = false;
178
+ const getUsersName = (user) => {
179
+ if (!user.firstName && !user.lastInitial)
180
+ return styles.anonymousUser;
181
+ const { firstName, lastInitial } = user;
182
+ if (firstName && lastInitial)
183
+ return `${firstName} ${lastInitial}`;
184
+ if (firstName || lastInitial)
185
+ return firstName || lastInitial;
186
+ return styles.anonymousUser;
187
+ };
188
+ const getRankCellText = (userRank, isViewingUsersRow) => {
189
+ if (!userRank) {
190
+ return styles.hideNames ? `${styles.viewingUserText}` : "-";
191
+ }
192
+ const viewingUserText = ` - ${styles.viewingUserText}`;
193
+ return styles.rankSuffix
194
+ ? global.intl.formatMessage({
195
+ id: "rank",
196
+ defaultMessage: styles.rankSuffix,
197
+ }, {
198
+ rank: userRank,
199
+ }) + `${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`
200
+ : `${userRank} ${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`;
201
+ };
202
+ return (index.h("div", { class: sheet.classes.Leaderboard, part: "sqm-base", style: { width: styles.width || "100%" } },
203
+ index.h("style", { type: "text/css" },
204
+ styleString,
205
+ vanillaStyle),
206
+ index.h("table", { part: "sqm-table" },
207
+ index.h("tr", null,
208
+ styles.showRank && (index.h("th", { class: `Rank ${styles.hideNames ? "fullWidth" : ""}` }, styles.rankheading)),
209
+ !styles.hideNames && index.h("th", { class: "User" }, styles.usersheading),
210
+ index.h("th", { class: "Score" }, styles.statsheading)), (_a = data.leaderboard) === null || _a === void 0 ? void 0 :
211
+ _a.map((user) => {
212
+ var _a, _b;
213
+ if (user.rowNumber === ((_a = data.viewerRank) === null || _a === void 0 ? void 0 : _a.rowNumber))
214
+ userSeenFlag = true;
215
+ const isViewingUsersRow = !styles.hideViewer && user.rowNumber === ((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rowNumber);
216
+ return (index.h("tr", { class: isViewingUsersRow ? "highlight" : "" },
217
+ styles.showRank && (index.h("td", { class: "Rank" }, getRankCellText(user.rank, isViewingUsersRow))),
218
+ !styles.hideNames && index.h("td", { class: "User" }, getUsersName(user)),
219
+ index.h("td", { class: "Score" }, user.textValue)));
220
+ }),
221
+ !userSeenFlag && !styles.hideViewer && (index.h("tr", null,
222
+ index.h("td", { colSpan: 100, class: "ellipses" },
223
+ index.h("sl-icon", { name: "three-dots", style: { verticalAlign: "middle" } })))),
224
+ !userSeenFlag && !styles.hideViewer && (index.h("tr", { class: "highlight" },
225
+ styles.showRank && (index.h("td", { class: "Rank" }, getRankCellText((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rank, true))),
226
+ !styles.hideNames && (index.h("td", { class: "User" }, getUsersName(data.viewerRank || {}))),
227
+ index.h("td", { class: "Score" }, ((_c = data.viewerRank) === null || _c === void 0 ? void 0 : _c.textValue) || "0"))))));
228
+ }
229
+
230
+ function BigStatView(props) {
231
+ const { statvalue, flexReverse, alignment, statTextColor, statFontSize, descriptionTextColor, descriptionFontSize, statFontWeight, } = props;
232
+ // Dependent on props, not feasible to move out
233
+ const style = {
234
+ Container: {
235
+ display: "flex",
236
+ // height: "inherit",
237
+ // "justify-content": "space-between",
238
+ "flex-direction": `${flexReverse ? "column-reverse" : "column"}`,
239
+ "align-items": `${alignment === "left"
240
+ ? "flex-start"
241
+ : alignment === "right"
242
+ ? "flex-end"
243
+ : "center"}`,
244
+ },
245
+ Stat: {
246
+ "font-size": statFontSize
247
+ ? `${statFontSize}px`
248
+ : "var(--sl-font-size-xx-large)",
249
+ "text-align": alignment,
250
+ color: statTextColor || "var(--sqm-text)",
251
+ lineHeight: "35px",
252
+ fontWeight: statFontWeight || "var(--sl-font-weight-normal)",
253
+ },
254
+ Description: {
255
+ "font-size": descriptionFontSize
256
+ ? `${descriptionFontSize}px`
257
+ : "var(--sl-font-size-small)",
258
+ "font-weight": "var(--sl-font-weight-normal)",
259
+ color: descriptionTextColor || "var(--sqm-text)",
260
+ "text-align": alignment,
261
+ lineHeight: "20px",
262
+ },
263
+ };
264
+ const sheet = JSS.createStyleSheet(style);
265
+ const styleString = sheet.toString();
266
+ return (index.h("div", { part: "stat-wrapper", class: sheet.classes.Container },
267
+ index.h("style", { type: "text/css" }, styleString),
268
+ index.h("div", { part: "stat-value", class: sheet.classes.Stat }, statvalue),
269
+ index.h("div", { part: "stat-description", class: sheet.classes.Description }, props.labelSlot)));
270
+ }
271
+
272
+ function PortalFrameView(props, children) {
273
+ const { data, notFullScreen, border } = props;
274
+ const style = {
275
+ HostBlock: mixins.HostBlock,
276
+ Frame: {
277
+ display: "flex",
278
+ "flex-direction": "column",
279
+ "box-sizing": "border-box",
280
+ "&:nth-child(2)": {
281
+ background: props.backgroundColor,
282
+ },
283
+ },
284
+ FooterWrapper: {
285
+ width: "100%",
286
+ "max-width": "100%",
287
+ padding: "var(--sl-spacing-medium) var(--sl-spacing-x-large)",
288
+ background: props.headerAndFooterBackgroundColor,
289
+ display: "flex",
290
+ "justify-content": "flex-end",
291
+ "align-items": "center",
292
+ "box-sizing": "border-box",
293
+ borderTop: border,
294
+ "margin-top": "auto",
295
+ },
296
+ HeaderWrapper: {
297
+ width: "100%",
298
+ "max-width": "100%",
299
+ "box-sizing": "border-box",
300
+ display: "flex",
301
+ "justify-content": "space-between",
302
+ padding: "var(--sl-spacing-small) var(--sl-spacing-large)",
303
+ "align-items": "center",
304
+ borderBottom: border,
305
+ background: props.headerAndFooterBackgroundColor,
306
+ "@media screen and (max-width: 499px)": {
307
+ "flex-direction": "row-reverse",
308
+ "justify-content": "flex-end",
309
+ padding: "0",
310
+ },
311
+ },
312
+ };
313
+ const sheet = JSS.createStyleSheet(style);
314
+ const styleString = sheet.toString();
315
+ return (index.h("div", { style: { minHeight: notFullScreen ? "100%" : "100vh" }, class: sheet.classes.Frame, part: "sqm-base" },
316
+ index.h("style", { type: "text/css" }, styleString),
317
+ index.h("div", { class: sheet.classes.HeaderWrapper, part: "sqm-header" },
318
+ data.header,
319
+ index.h("slot", { name: "sqm-navigation-menu" })),
320
+ children,
321
+ index.h("div", { class: sheet.classes.FooterWrapper, part: "sqm-footer" }, data.footer)));
322
+ }
323
+
324
+ const EditProfileView = (props) => {
325
+ var _a, _b, _c, _d;
326
+ const { states, callbacks } = props;
327
+ const { text } = states;
328
+ const { errors } = states.formState;
329
+ if (states.showEdit) {
330
+ return (index.h("div", { class: `CardWrapper ${!states.showEdit && "ShowEdit"}`, part: "sqm-base" },
331
+ index.h("h2", { part: "sqm-header", style: {
332
+ fontSize: "var(--sl-font-size-x-large)",
333
+ margin: "0px",
334
+ textAlign: "center",
335
+ } }, text.editprofileheader),
336
+ index.h("form", { class: "FormWrapper", onSubmit: callbacks.onSubmit },
337
+ index.h("div", { class: "FormSection" },
338
+ states.formState.error && (index.h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
339
+ index.h("div", { part: "erroralert-text" }, states.formState.error))),
340
+ index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: states.formState.firstName, onInput: callbacks.onChange, label: text.firstnametext, disabled: states.loading }, (errors.firstName && errors.firstName.status !== "valid"
341
+ ? { class: "ErrorStyles", helpText: text.fieldEmptyText }
342
+ : []), { id: "firstName", name: "firstName", error: errors.firstName && errors.firstName.status !== "valid"
343
+ ? errors.firstName.message
344
+ : undefined })),
345
+ index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: states.formState.lastName, onInput: callbacks.onChange, label: text.lastnametext, disabled: states.loading, id: "lastName", name: "lastName" }, (errors.lastName && errors.lastName.status !== "valid"
346
+ ? { class: "ErrorStyles", helpText: text.fieldEmptyText }
347
+ : []), { error: errors.lastName && errors.lastName.status !== "valid"
348
+ ? errors.lastName.message
349
+ : undefined }))),
350
+ text.showregion && states.formState.currentRegion && (index.h("sl-input", { exportparts: "label: input-label, base: input-base", disabled: true, value: states.formState.currentRegion, label: text.currentregiontext, id: "currentRegion", name: "currentRegion" })),
351
+ index.h("div", { class: "ButtonWrapper" },
352
+ index.h("sl-button", { type: "primary", loading: states.loading, disabled: states.submitDisabled, onClick: (e) => {
353
+ callbacks.onSubmit(e);
354
+ }, submit: true, exportparts: "base: primarybutton-base" }, text.updatetext),
355
+ index.h("sl-button", { onClick: () => {
356
+ callbacks.setShowEdit(false);
357
+ }, type: "secondary", exportparts: "base: secondarybutton-base" }, text.canceltext)))));
358
+ }
359
+ return (index.h("div", { class: `CardWrapper FormWrapper ${!states.showEdit && "ShowEdit"}`, part: "sqm-base" },
360
+ index.h("div", { class: "FormSection" },
361
+ index.h("h2", { part: "sqm-header", style: {
362
+ fontSize: "var(--sl-font-size-x-large)",
363
+ marginBottom: "0px",
364
+ textAlign: "center",
365
+ } }, text.editprofileheader),
366
+ index.h("div", null,
367
+ index.h("p", { style: { fontSize: "var(--sl-font-size-medium)" } }, (_a = states.user) === null || _a === void 0 ? void 0 :
368
+ _a.firstName,
369
+ " ", (_b = states.user) === null || _b === void 0 ? void 0 :
370
+ _b.lastName),
371
+ index.h("p", { style: { fontSize: "var(--sl-font-size-medium)" }, title: (_c = states.user) === null || _c === void 0 ? void 0 : _c.email }, (_d = states.user) === null || _d === void 0 ? void 0 : _d.email))),
372
+ index.h("sl-button", { type: "primary", loading: states.loading, onClick: () => {
373
+ callbacks.resetForm();
374
+ callbacks.setShowEdit(true);
375
+ }, exportparts: "base: primarybutton-base" }, text.editprofiletext)));
376
+ };
377
+
378
+ const MessageLinkQuery = index_module.dist.gql `
379
+ query ($programId: ID, $engagementMedium: UserEngagementMedium!) {
380
+ user: viewer {
381
+ ... on User {
382
+ shareLink(
383
+ programId: $programId
384
+ engagementMedium: $engagementMedium
385
+ shareMedium: DIRECT
386
+ )
387
+ }
388
+ }
389
+ }
390
+ `;
391
+ const WIDGET_ENGAGEMENT_EVENT = index_module.dist.gql `
392
+ mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
393
+ createUserAnalyticsEvent(eventMeta: $eventMeta)
394
+ }
395
+ `;
396
+ function useShareLink(props) {
397
+ var _a, _b;
398
+ const { programId = index_module.H() } = props;
399
+ const user = index_module.J();
400
+ const engagementMedium = index_module.B();
401
+ const contextData = index_module.Fn(useReferralCodes.REFERRAL_CODES_NAMESPACE);
402
+ const { data } = index_module.wn(MessageLinkQuery, { programId, engagementMedium }, !(user === null || user === void 0 ? void 0 : user.jwt) || !!props.linkOverride || (contextData === null || contextData === void 0 ? void 0 : contextData.shareLink) !== undefined);
403
+ const [sendLoadEvent] = index_module.$e(WIDGET_ENGAGEMENT_EVENT);
404
+ const [setCopied, copiedRes] = index_module.$e(useReferralCodes.SET_CODE_COPIED);
405
+ const copyString = (_b = ((contextData === null || contextData === void 0 ? void 0 : contextData.shareLink) || ((_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.shareLink))) !== null && _b !== void 0 ? _b :
406
+ // Shown during loading
407
+ "...";
408
+ const [open, setOpen] = stencilHooks_module.useState(false);
409
+ async function onClick() {
410
+ if (contextData) {
411
+ await setCopied({ referralCode: contextData.referralCode });
412
+ contextData.refresh();
413
+ }
414
+ // Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
415
+ // Only if called from a user-initiated event
416
+ navigator.clipboard.writeText(copyString);
417
+ setOpen(true);
418
+ setTimeout(() => setOpen(false), props.tooltiplifespan);
419
+ sendLoadEvent({
420
+ eventMeta: {
421
+ programId,
422
+ id: user === null || user === void 0 ? void 0 : user.id,
423
+ accountId: user === null || user === void 0 ? void 0 : user.accountId,
424
+ type: "USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",
425
+ meta: {
426
+ engagementMedium,
427
+ shareMedium: "DIRECT",
428
+ },
429
+ },
430
+ });
431
+ }
432
+ return { ...props, onClick, open, copyString: copyString };
433
+ }
434
+
435
+ const MessageLinkQuery$1 = index_module.dist.gql `
436
+ query (
437
+ $programId: ID
438
+ $engagementMedium: UserEngagementMedium!
439
+ $shareMedium: ReferralShareMedium!
440
+ ) {
441
+ viewer {
442
+ ... on User {
443
+ messageLink(
444
+ programId: $programId
445
+ engagementMedium: $engagementMedium
446
+ shareMedium: $shareMedium
447
+ )
448
+ shareLink(programId: $programId, engagementMedium: $engagementMedium)
449
+ }
450
+ }
451
+ }
452
+ `;
453
+ function NativeShare(props, directLink, undefinedErrorText, unsupportedPlatformText) {
454
+ const title = props.sharetitle || "Share title";
455
+ const text = props.sharetext || "Share text";
456
+ if (directLink === "undefined") {
457
+ return alert(undefinedErrorText);
458
+ }
459
+ if (window.navigator.share) {
460
+ window.navigator
461
+ .share({
462
+ title,
463
+ text,
464
+ url: directLink,
465
+ })
466
+ .catch((error) => console.error("Error on web share", error));
467
+ }
468
+ else {
469
+ alert(unsupportedPlatformText);
470
+ }
471
+ }
472
+ function FacebookShare(directLink, messageLink, errorText) {
473
+ if (messageLink === "undefined" || directLink === "undefined") {
474
+ return alert(errorText);
475
+ }
476
+ if (typeof SquatchAndroid.shareOnFacebook !== "undefined") {
477
+ return SquatchAndroid.shareOnFacebook(directLink, messageLink);
478
+ }
479
+ else {
480
+ return GenericShare(messageLink, errorText);
481
+ }
482
+ }
483
+ function GenericShare(messageLink, errorText) {
484
+ return messageLink ? (window.location.href = messageLink) : alert(errorText);
485
+ }
486
+ function useShareButton(props) {
487
+ var _a, _b, _c, _d;
488
+ const { sharetitle, sharetext, medium } = props;
489
+ const programId = props.programId ? props.programId : index_module.H();
490
+ const user = index_module.J();
491
+ const engagementMedium = index_module.B();
492
+ const variables = {
493
+ engagementMedium,
494
+ programId: programId,
495
+ shareMedium: medium.toUpperCase(),
496
+ };
497
+ const contextData = index_module.Fn(useReferralCodes.REFERRAL_CODES_NAMESPACE);
498
+ const overrideData = contextData === null || contextData === void 0 ? void 0 : contextData[medium];
499
+ // only queries if a programId is available
500
+ const res = index_module.wn(MessageLinkQuery$1, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId || overrideData !== undefined);
501
+ const [setCopied, copiedRes] = index_module.$e(useReferralCodes.SET_CODE_COPIED);
502
+ const directLink = (overrideData === null || overrideData === void 0 ? void 0 : overrideData.shareLink) || ((_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);
503
+ const environment = index_module.getEnvironmentSDK();
504
+ const hide = (medium.toLocaleUpperCase() === "SMS" &&
505
+ window.orientation === undefined) ||
506
+ (medium.toLocaleUpperCase() === "DIRECT" && !window.navigator.share);
507
+ const messageLink = (overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink) || ((_d = (_c = res.data) === null || _c === void 0 ? void 0 : _c.viewer) === null || _d === void 0 ? void 0 : _d.messageLink);
508
+ async function onClick() {
509
+ if (overrideData) {
510
+ await setCopied({ referralCode: contextData.referralCode });
511
+ contextData.refresh();
512
+ }
513
+ if (medium.toLocaleUpperCase() === "FACEBOOK" &&
514
+ environment.type === "SquatchAndroid") {
515
+ FacebookShare(directLink, messageLink, props.errorText);
516
+ }
517
+ else if (medium.toLocaleUpperCase() === "DIRECT") {
518
+ NativeShare({ sharetitle, sharetext }, directLink, props.errorText, props.unsupportedPlatformText);
519
+ }
520
+ }
521
+ const isPlainLink = !(medium.toLocaleUpperCase() === "FACEBOOK" &&
522
+ environment.type === "SquatchAndroid") &&
523
+ medium.toLocaleUpperCase() !== "DIRECT" &&
524
+ messageLink;
525
+ const userAgent = window.navigator.userAgent.toLowerCase(), safari = /safari/.test(userAgent), ios = /iphone|ipod|ipad/.test(userAgent);
526
+ const openInSameTab = ios && !safari;
527
+ return {
528
+ ...props,
529
+ loading: res.loading && !(overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink),
530
+ messageLink,
531
+ isPlainLink,
532
+ onClick,
533
+ openInSameTab,
534
+ hide,
535
+ };
536
+ }
537
+
538
+ const debug = stencilHooks_module.browser("sq:useBigStat");
539
+ const LOADING = "...";
540
+ const debugQuery = (query, variables, getStat) => {
541
+ const res = index_module.wn(query, variables);
542
+ if (!(res === null || res === void 0 ? void 0 : res.data) && !res.loading) {
543
+ console.error("issue getting stat:", res);
544
+ }
545
+ const stat = getStat(res);
546
+ return { ...stat, loading: res.loading };
547
+ };
548
+ const referralsCountQuery = (programId,
549
+ // locale
550
+ _, status) => {
322
551
  const programFilter = programId === "classic"
323
552
  ? { programId_exists: false }
324
553
  : { programId_eq: programId };
@@ -1232,77 +1461,365 @@ function useBigStat(props) {
1232
1461
  descriptionFontSize: props.descriptionFontSize,
1233
1462
  statFontWeight: props.statFontWeight,
1234
1463
  },
1235
- label,
1464
+ label,
1465
+ };
1466
+ }
1467
+
1468
+ function useDemoBigStat(props) {
1469
+ const { statType } = props;
1470
+ const re = stencilHooks_module.useMemo(() => StatPatterns.find((re) => re.exec(statType)), [statType]);
1471
+ // triggers a re-render if the label is manually changed
1472
+ useChildElements.useChildElements();
1473
+ if (!(re === null || re === void 0 ? void 0 : re.exec(statType))) {
1474
+ return {
1475
+ props: {
1476
+ value: 0,
1477
+ statvalue: "!!!",
1478
+ loading: false,
1479
+ flexReverse: props.flexReverse,
1480
+ alignment: props.alignment,
1481
+ statTextColor: props.statTextColor,
1482
+ statFontSize: props.statFontSize,
1483
+ descriptionTextColor: props.descriptionTextColor,
1484
+ descriptionFontSize: props.descriptionFontSize,
1485
+ },
1486
+ label: "BAD PROP TYPE",
1487
+ };
1488
+ }
1489
+ const result = re.exec(statType);
1490
+ const queryName = result[1];
1491
+ const label = queries[queryName].label;
1492
+ return {
1493
+ props: cjs.cjs({
1494
+ statvalue: "12345",
1495
+ value: 0,
1496
+ flexReverse: props.flexReverse,
1497
+ alignment: props.alignment,
1498
+ statTextColor: props.statTextColor,
1499
+ statFontSize: props.statFontSize,
1500
+ descriptionTextColor: props.descriptionTextColor,
1501
+ descriptionFontSize: props.descriptionFontSize,
1502
+ statFontWeight: props.statFontWeight,
1503
+ }, props.demoData || {}, { arrayMerge: (_, a) => a }),
1504
+ label: label !== null && label !== void 0 ? label : "Demo Label",
1505
+ };
1506
+ }
1507
+
1508
+ function StatContainerView(props, children) {
1509
+ const divideSpace = () => {
1510
+ const spaceValue = getComputedStyle(document.documentElement).getPropertyValue(`--sl-spacing-${props.space}`);
1511
+ return `${Math.floor(parseInt(spaceValue) / 2)}rem`;
1512
+ };
1513
+ // take alignment variable and convert it to CSS flexbox alignment
1514
+ const alignment = props.alignment === "center"
1515
+ ? "center"
1516
+ : props.alignment === "right"
1517
+ ? "flex-end"
1518
+ : "flex-start";
1519
+ // Dependent on props, not feasible to move out
1520
+ const style = {
1521
+ StatContainer: {
1522
+ width: "100%",
1523
+ display: "flex",
1524
+ flexWrap: "wrap",
1525
+ alignItems: "center",
1526
+ justifyContent: alignment,
1527
+ flexDirection: "row",
1528
+ gap: `var(--sl-spacing-${props.gap})`,
1529
+ // Apply border styles conditionally based on the hideBorder prop
1530
+ "& > *": {
1531
+ "border-right": props.hideBorder
1532
+ ? "none"
1533
+ : "1px solid var(--sqm-text-subdued)",
1534
+ "padding-right": divideSpace(),
1535
+ },
1536
+ "& > :last-child": {
1537
+ "border-right": "none",
1538
+ },
1539
+ "& > ::slotted(*)": {
1540
+ "border-right": props.hideBorder
1541
+ ? "none"
1542
+ : "1px solid var(--sqm-text-subdued)",
1543
+ "padding-right": divideSpace(),
1544
+ },
1545
+ "& > ::slotted(*:last-child)": {
1546
+ "border-right": "none",
1547
+ },
1548
+ "@media screen and (max-width: 430px)": {
1549
+ "& > ::slotted(*)": {
1550
+ borderRight: "none",
1551
+ },
1552
+ },
1553
+ },
1554
+ StatFrame: {
1555
+ display: "flex",
1556
+ },
1557
+ BorderFix: {
1558
+ "border-right": "1px solid transparent",
1559
+ width: "0px",
1560
+ "margin-left": "-1px",
1561
+ },
1562
+ };
1563
+ const sheet = JSS.createStyleSheet(style);
1564
+ const styleString = sheet.toString();
1565
+ return (index.h("div", { class: sheet.classes.StatFrame, part: "sqm-base" },
1566
+ index.h("div", { class: sheet.classes.StatContainer, part: "sqm-inner-container" },
1567
+ index.h("style", { type: "text/css" }, styleString),
1568
+ children),
1569
+ index.h("div", { class: sheet.classes.BorderFix, part: "sqm-border" })));
1570
+ }
1571
+
1572
+ function PortalChangePasswordView(props) {
1573
+ const { states, callbacks } = props;
1574
+ const style = {
1575
+ Dialog: {
1576
+ padding: "0",
1577
+ "&::part(panel)": {
1578
+ background: "var(--sqm-portal-background)",
1579
+ borderRadius: "var(--sqm-border-radius-normal, var(--sl-border-radius-medium))",
1580
+ },
1581
+ "&::part(close-button)": {
1582
+ "margin-top": "var(--sl-spacing-medium)",
1583
+ },
1584
+ "&::part(body)": {
1585
+ padding: "0 var(--sl-spacing-x-large) var(--sl-spacing-x-large) var(--sl-spacing-x-large)",
1586
+ },
1587
+ },
1588
+ Error: {
1589
+ "&::part(erroralert-base)": {
1590
+ "margin-bottom": "15px",
1591
+ },
1592
+ },
1593
+ Success: {
1594
+ "&::part(successalert-base)": {
1595
+ "margin-bottom": "15px",
1596
+ },
1597
+ },
1598
+ InputContainer: {
1599
+ "& > :not(:last-child)": {
1600
+ "margin-bottom": "var(--sl-spacing-x-large)",
1601
+ },
1602
+ },
1603
+ CancelButton: {
1604
+ margin: "var(--sl-spacing-large) auto",
1605
+ width: "100%",
1606
+ },
1607
+ PasswordField: {
1608
+ marginBottom: "var(--sl-spacing-large) !important",
1609
+ display: "block",
1610
+ },
1611
+ ChangePasswordButton: {
1612
+ paddingTop: "var(--sl-spacing-x-large)",
1613
+ },
1236
1614
  };
1615
+ const sheet = JSS.createStyleSheet(style);
1616
+ const styleString = sheet.toString();
1617
+ return (index.h("div", null,
1618
+ index.h("style", { type: "text/css" }, styleString),
1619
+ index.h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, "onSl-hide": () => callbacks.setOpen(false) },
1620
+ index.h(sqmPortalContainerView.PortalSectionView, Object.assign({}, {
1621
+ labelMargin: "x-large",
1622
+ padding: "none",
1623
+ label: (index.h(sqmTextSpanView.TextSpanView, Object.assign({}, { type: "h2" }), states.content.modalChangePasswordHeader)),
1624
+ content: (index.h(sqmPortalContainerView.PortalContainerView, Object.assign({}, { direction: "column", padding: "none", gap: "32px" }),
1625
+ states.error && (index.h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
1626
+ index.h("div", { part: "erroralert-text" }, states.error))),
1627
+ states.success && (index.h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
1628
+ index.h("div", { part: "successalert-text" }, states.content.successMessage))),
1629
+ index.h("sl-form", { "onSl-submit": callbacks.submit },
1630
+ index.h("div", { class: sheet.classes.InputContainer },
1631
+ index.h("sqm-password-field", { exportparts: "input-label: input-label", class: sheet.classes.PasswordField, fieldLabel: states.content.passwordFieldLabel, meetsRequirementsText: states.content.meetsRequirementsText, doesNotMeetRequirementsText: states.content.doesNotMeetRequirementsText, minErrorText: states.content.minErrorText, uppercaseErrorText: states.content.uppercaseErrorText, lowercaseErrorText: states.content.lowercaseErrorText, hasErrorText: states.content.hasErrorText }),
1632
+ index.h("sl-input", { exportparts: "label: input-label, base: input-base", name: "/confirmPassword", label: states.content.confirmPasswordFieldLabel, required: true, togglePassword: true, disabled: states.loading, type: "password" })),
1633
+ index.h(sqmPortalContainerView.PortalContainerView, Object.assign({}, { direction: "row", padding: "none", gap: "20px" }),
1634
+ index.h("sl-button", { class: sheet.classes.ChangePasswordButton, type: "primary", exportparts: "base: primarybutton-base", submit: true, loading: states.loading }, states.content.changePasswordButtonText),
1635
+ index.h("sl-button", { class: sheet.classes.CancelButton, type: "secondary", exportparts: "base: secondarybutton-base", onClick: () => callbacks.setOpen(false) }, states.content.cancelText))))),
1636
+ }))),
1637
+ index.h(sqmPortalContainerView.PortalSectionView, Object.assign({}, {
1638
+ labelMargin: "x-large",
1639
+ padding: "xxx-large",
1640
+ label: (index.h(sqmTextSpanView.TextSpanView, Object.assign({}, { type: "h2" }), states.content.portalChangePasswordHeader)),
1641
+ content: (index.h("sl-button", { type: "primary", exportparts: "base: primarybutton-base", onClick: () => callbacks.setOpen(true) }, states.content.portalChangePasswordButtonText)),
1642
+ }),
1643
+ index.h("style", { type: "text/css" }, styleString))));
1237
1644
  }
1238
1645
 
1239
- function useDemoBigStat(props) {
1240
- const { statType } = props;
1241
- const re = stencilHooks_module.useMemo(() => StatPatterns.find((re) => re.exec(statType)), [statType]);
1242
- // triggers a re-render if the label is manually changed
1243
- useChildElements.useChildElements();
1244
- if (!(re === null || re === void 0 ? void 0 : re.exec(statType))) {
1245
- return {
1246
- props: {
1247
- value: 0,
1248
- statvalue: "!!!",
1249
- loading: false,
1250
- flexReverse: props.flexReverse,
1251
- alignment: props.alignment,
1252
- statTextColor: props.statTextColor,
1253
- statFontSize: props.statFontSize,
1254
- descriptionTextColor: props.descriptionTextColor,
1255
- descriptionFontSize: props.descriptionFontSize,
1256
- },
1257
- label: "BAD PROP TYPE",
1258
- };
1646
+ const style$1 = {
1647
+ Wrapper: { ...mixins.AuthWrapper, "max-width": "600px" },
1648
+ Column: mixins.AuthColumn,
1649
+ HostBlock: mixins.HostBlock,
1650
+ ":host": {
1651
+ margin: "0 auto",
1652
+ width: "100%",
1653
+ },
1654
+ ButtonsContainer: mixins.AuthButtonsContainer,
1655
+ ErrorStyle: mixins.ErrorStyles,
1656
+ };
1657
+ const vanillaStyle = `
1658
+ sqm-portal-register {
1659
+ margin: 0 auto;
1660
+ width: 100%;
1661
+ display: block;
1662
+ }
1663
+
1664
+ :host{
1665
+ display: block;
1666
+ }
1667
+
1668
+ :host([hidden]) {
1669
+ display: none;
1670
+ }
1671
+ `;
1672
+ const sheet$1 = JSS.createStyleSheet(style$1);
1673
+ const styleString$1 = sheet$1.toString();
1674
+ function PortalRegisterView(props) {
1675
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
1676
+ const { states, refs, callbacks, content } = props;
1677
+ if (states.error) {
1678
+ window.scrollTo({ top: 0, left: 0, behavior: "smooth" });
1259
1679
  }
1260
- const result = re.exec(statType);
1261
- const queryName = result[1];
1262
- const label = queries[queryName].label;
1263
- return {
1264
- props: cjs.cjs({
1265
- statvalue: "12345",
1266
- value: 0,
1267
- flexReverse: props.flexReverse,
1268
- alignment: props.alignment,
1269
- statTextColor: props.statTextColor,
1270
- statFontSize: props.statFontSize,
1271
- descriptionTextColor: props.descriptionTextColor,
1272
- descriptionFontSize: props.descriptionFontSize,
1273
- statFontWeight: props.statFontWeight,
1274
- }, props.demoData || {}, { arrayMerge: (_, a) => a }),
1275
- label: label !== null && label !== void 0 ? label : "Demo Label",
1276
- };
1680
+ return (index.h("div", { class: sheet$1.classes.Wrapper, part: "sqm-base" },
1681
+ index.h("style", { type: "text/css" },
1682
+ vanillaStyle,
1683
+ styleString$1),
1684
+ index.h(sqmTextSpanView.TextSpanView, { type: "h3" }, content.pageLabel),
1685
+ index.h("sl-form", { class: sheet$1.classes.Column, "onSl-submit": callbacks.submit, ref: (el) => (refs.formRef.current = el), novalidate: true },
1686
+ states.error && (index.h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
1687
+ index.h("div", { part: "erroralert-text" }, props.states.error))),
1688
+ content.formData,
1689
+ !states.hideInputs && (index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true, validationError: ({ value }) => {
1690
+ if (!value) {
1691
+ return content.requiredFieldErrorMessage;
1692
+ }
1693
+ // this matches shoelace validation, but could be better
1694
+ if (!value.includes("@")) {
1695
+ return content.invalidEmailErrorMessage;
1696
+ }
1697
+ } }, (((_b = (_a = states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors) === null || _b === void 0 ? void 0 : _b.email) ? {
1698
+ class: sheet$1.classes.ErrorStyle,
1699
+ helpText: ((_d = (_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.validationErrors) === null || _d === void 0 ? void 0 : _d.email) ||
1700
+ content.requiredFieldErrorMessage,
1701
+ }
1702
+ : [])))),
1703
+ !states.hideInputs && (index.h("sqm-password-field", { fieldLabel: content.passwordLabel, "disable-validation": states.disablePasswordValidation, meetsRequirementsText: content.meetsRequirementsText, doesNotMeetRequirementsText: content.doesNotMeetRequirementsText, minErrorText: content.minErrorText, uppercaseErrorText: content.uppercaseErrorText, lowercaseErrorText: content.lowercaseErrorText, hasErrorText: content.hasErrorText })),
1704
+ content.passwordField,
1705
+ !states.hideInputs && states.confirmPassword && (index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", type: "password", name: "/confirmPassword", label: content.confirmPasswordLabel, disabled: states.loading || ((_e = states.registrationFormState) === null || _e === void 0 ? void 0 : _e.disabled), required: true }, (((_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g.confirmPassword) ? {
1706
+ value: (_j = (_h = states.registrationFormState) === null || _h === void 0 ? void 0 : _h.initialData) === null || _j === void 0 ? void 0 : _j.confirmPassword,
1707
+ }
1708
+ : {}), (((_l = (_k = states.registrationFormState) === null || _k === void 0 ? void 0 : _k.validationErrors) === null || _l === void 0 ? void 0 : _l.confirmPassword) ? {
1709
+ class: sheet$1.classes.ErrorStyle,
1710
+ helpText: ((_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.validationErrors) === null || _o === void 0 ? void 0 : _o.confirmPassword) || content.requiredFieldErrorMessage,
1711
+ }
1712
+ : [])))),
1713
+ content.terms,
1714
+ index.h("div", { class: sheet$1.classes.ButtonsContainer },
1715
+ index.h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"),
1716
+ content.secondaryButton))));
1277
1717
  }
1278
1718
 
1279
- function CardFeedView(props, children) {
1280
- // Dependent on props, not feasiable to move out
1719
+ const style$2 = {
1720
+ ErrorStyle: {
1721
+ "&::part(control)": {
1722
+ background: "var(--sl-color-danger-10)",
1723
+ borderColor: "var(--sl-color-danger-500)",
1724
+ outline: "var(--sl-color-danger-500)",
1725
+ },
1726
+ "&:host": {
1727
+ "--focus-ring": "0 0 0 var(--sl-focus-ring-width) red !important",
1728
+ },
1729
+ },
1730
+ ErrorMessageStyle: {
1731
+ margin: 0,
1732
+ marginTop: "5px",
1733
+ color: "var(--sl-color-danger-500)",
1734
+ fontSize: "var(--sl-input-help-text-font-size-medium)",
1735
+ fontFamily: "var(--sl-font-sans)",
1736
+ fontWeight: "var(--sl-font-weight-normal)",
1737
+ },
1738
+ FieldContainer: {
1739
+ "margin-bottom": "var(--sl-spacing-large)",
1740
+ },
1741
+ };
1742
+ const vanillaStyle$1 = `
1743
+ :host {
1744
+ margin: 0 auto;
1745
+ width: 100%;
1746
+ display: block;
1747
+ }
1748
+ sl-checkbox::part(label){
1749
+ font-size: var(--sl-input-label-font-size-small);
1750
+ font-weight: var(--sl-font-weight-normal);
1751
+ line-height: 20px;
1752
+ }
1753
+ sl-checkbox::part(base){
1754
+ align-items: start;
1755
+ }
1756
+ `;
1757
+ JSS.jss.setup(JSS.create());
1758
+ const sheet$2 = JSS.jss.createStyleSheet(style$2);
1759
+ const styleString$2 = sheet$2.toString();
1760
+ function CheckboxFieldView(props) {
1761
+ var _b, _c;
1762
+ const { states, content, callbacks } = props;
1763
+ return (index.h("div", { class: sheet$2.classes.FieldContainer, part: "sqm-base" },
1764
+ index.h("style", { type: "text/css" },
1765
+ vanillaStyle$1,
1766
+ styleString$2),
1767
+ index.h("sl-checkbox", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.checkboxName}`, checked: states.checked, "onSl-change": (e) => {
1768
+ e.target.value = e.target.checked;
1769
+ callbacks.setChecked(e.target.value);
1770
+ } }, (!content.checkboxOptional ? { required: false } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled), required: false }), global.intl.formatMessage({
1771
+ id: content.checkboxName + "-message",
1772
+ defaultMessage: content.checkboxLabel,
1773
+ }, {
1774
+ labelLink: (index.h("a", { href: content.checkboxLabelLink, target: "_blank" }, content.checkboxLabelLinkText || content.checkboxLabelLink)),
1775
+ }))));
1776
+ }
1777
+
1778
+ function ChangeMarktingView(props) {
1779
+ const { states, callbacks } = props;
1780
+ const { text, formState } = states;
1781
+ const { error } = formState;
1281
1782
  const style = {
1282
1783
  Container: {
1283
- columnGap: props.gap + "px",
1284
- columnWidth: props.width + "px",
1285
- "& > div": {
1286
- marginBottom: "24px",
1784
+ display: "flex",
1785
+ flexDirection: "column",
1786
+ gap: "var(--sl-spacing-x-small)",
1787
+ padding: "0 var(--sl-spacing-xxx-large) var(--sl-spacing-xxx-large)",
1788
+ },
1789
+ SubmitButton: { marginBottom: "var(--sl-spacing-medium)" },
1790
+ Error: {
1791
+ "&::part(erroralert-base)": {
1792
+ "margin-bottom": "15px",
1793
+ },
1794
+ },
1795
+ Success: {
1796
+ "&::part(successalert-base)": {
1797
+ "margin-bottom": "15px",
1287
1798
  },
1288
1799
  },
1289
1800
  };
1290
1801
  const sheet = JSS.createStyleSheet(style);
1291
1802
  const styleString = sheet.toString();
1292
- const vanillaStyle = `
1293
- :host{
1294
- display: block;
1295
- }
1296
-
1297
- `;
1298
- return (index.h("div", null,
1299
- index.h("style", { type: "text/css" },
1300
- styleString,
1301
- vanillaStyle),
1302
- index.h("div", { class: sheet.classes.Container, part: "sqm-base" }, children)));
1803
+ return (index.h("div", { class: sheet.classes.Container, part: "sqm-base" },
1804
+ index.h("style", { type: "text/css" }, styleString),
1805
+ index.h(sqmTextSpanView.TextSpanView, Object.assign({}, { type: "h2" }), text.emailPreferencesHeader),
1806
+ index.h("sl-form", { "onSl-submit": callbacks.onSubmit },
1807
+ index.h(CheckboxFieldView, { states: {
1808
+ checked: states.formState.marketingEmailOptIn,
1809
+ }, content: {
1810
+ checkboxLabel: text.marketingCheckboxLabel,
1811
+ checkboxName: "marketingEmailOptIn",
1812
+ }, callbacks: {
1813
+ setChecked: callbacks.setChecked,
1814
+ } }),
1815
+ index.h("sl-button", { class: sheet.classes.SubmitButton, type: "primary", submit: true, loading: states.loading, disabled: states.submitDisabled }, text.submitChangeButtonText),
1816
+ error && (index.h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
1817
+ index.h("div", { part: "erroralert-text" }, error))),
1818
+ states.success && (index.h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
1819
+ index.h("div", { part: "successalert-text" }, states.text.successMessage))))));
1303
1820
  }
1304
1821
 
1305
- const style$1 = {
1822
+ const style$3 = {
1306
1823
  Description: {
1307
1824
  "& .icon": {
1308
1825
  color: "var(--sqm-text)",
@@ -1347,13 +1864,13 @@ const style$1 = {
1347
1864
  },
1348
1865
  },
1349
1866
  };
1350
- const sheet$1 = JSS.createStyleSheet(style$1);
1351
- const styleString$1 = sheet$1.toString();
1867
+ const sheet$3 = JSS.createStyleSheet(style$3);
1868
+ const styleString$3 = sheet$3.toString();
1352
1869
  function Details(props) {
1353
1870
  const rid = Math.random().toString(36).slice(2);
1354
1871
  return (index.h("div", { style: { opacity: props.opacity } },
1355
- index.h("style", { type: "text/css" }, styleString$1),
1356
- index.h("span", { class: sheet$1.classes.Description },
1872
+ index.h("style", { type: "text/css" }, styleString$3),
1873
+ index.h("span", { class: sheet$3.classes.Description },
1357
1874
  index.h("input", { type: "checkbox", id: "details-" + rid }),
1358
1875
  index.h("label", { class: "details", htmlFor: "details-" + rid },
1359
1876
  index.h("sl-icon", { class: "icon", exportparts: "base: chevron-icon", name: "chevron-down" })),
@@ -1375,7 +1892,7 @@ const GreyGift = () => {
1375
1892
  index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M14 2.70949C14 3.59565 12.6694 4.93746 12 5H9V16H7.00179V5H4.58792C3.21247 4.70182 2 3.64537 2 2.52072C2 1.42474 2.47603 0.556701 3.34184 0.182041C4.16921 -0.175986 5.12452 0.0203328 5.87976 0.544666C6.80676 1.18825 7.32679 2.3963 7.79856 3.49226C7.83996 3.58845 7.88099 3.68378 7.9219 3.77778C7.96173 3.68865 8.00186 3.59793 8.0425 3.50608C8.50995 2.44948 9.04359 1.24325 9.9404 0.59563C10.7332 0.0231438 11.741 -0.193157 12.6121 0.198945C13.5129 0.604397 14 1.53453 14 2.70949ZM10.6123 1.5C11.0928 1.15305 11.668 1.09012 12.1597 1.5C12.5879 1.85694 12.6108 2.02497 12.6658 2.42926L12.6755 2.5C12.6755 3.09851 12.1597 4 11.6439 4C11.2785 4 10.9914 3.99691 10.7224 3.99402C10.2319 3.98875 9.80131 3.98412 9.06496 4C9.20533 3.72786 9.31743 3.46669 9.42434 3.21761C9.71026 2.55143 9.95907 1.97176 10.6123 1.5ZM4.93861 1.5C4.70607 1.33855 4.17281 1.4106 3.95166 1.5063C3.76894 1.58537 3.49602 1.82658 3.49602 2.52072C3.49602 3.19524 4.58792 3.77778 4.58792 3.77778C4.58792 3.77778 5.45441 4 7.00179 4C6.47506 2.69451 5.7289 2.04867 4.93861 1.5Z", fill: "#828282" })));
1376
1893
  };
1377
1894
 
1378
- const style$2 = {
1895
+ const style$4 = {
1379
1896
  ProgressBar: {
1380
1897
  "& .progress-bar": {
1381
1898
  height: "0",
@@ -1488,14 +2005,14 @@ const style$2 = {
1488
2005
  },
1489
2006
  },
1490
2007
  };
1491
- const sheet$2 = JSS.createStyleSheet(style$2, { classNamePrefix: "sqm-prog-bar" });
1492
- const styleString$2 = sheet$2.toString();
2008
+ const sheet$4 = JSS.createStyleSheet(style$4, { classNamePrefix: "sqm-prog-bar" });
2009
+ const styleString$4 = sheet$4.toString();
1493
2010
  function ProgressBarView(props) {
1494
2011
  const { progress = 0, goal = 1, steps = false, progressBarUnit = "", repeatable = false, complete = false, expired = false, finite = 0, opacity = "1", } = props;
1495
2012
  let aggregate = buildProgressBar(repeatable, steps, props);
1496
2013
  const { columns, items } = aggregate;
1497
- return (index.h("div", { class: sheet$2.classes.ProgressBar, "data-expired": expired, "data-complete": complete, "data-steps": steps, "data-done": goal <= progress, style: { opacity: opacity } },
1498
- index.h("style", { type: "text/css" }, styleString$2),
2014
+ return (index.h("div", { class: sheet$4.classes.ProgressBar, "data-expired": expired, "data-complete": complete, "data-steps": steps, "data-done": goal <= progress, style: { opacity: opacity } },
2015
+ index.h("style", { type: "text/css" }, styleString$4),
1499
2016
  index.h("div", { class: (!Boolean(finite) && progress >= 2 * goal) ||
1500
2017
  (Boolean(finite) && progress > 2 * goal)
1501
2018
  ? "progress-bar repeatable-steps"
@@ -2048,402 +2565,109 @@ function TaskCardView(props) {
2048
2565
  } }, content.buttonText)))))))));
2049
2566
  }
2050
2567
 
2051
- const style$3 = {
2052
- Wrapper: { ...mixins.AuthWrapper, "max-width": "600px" },
2053
- Column: mixins.AuthColumn,
2054
- HostBlock: mixins.HostBlock,
2055
- ":host": {
2056
- margin: "0 auto",
2057
- width: "100%",
2058
- },
2059
- ButtonsContainer: mixins.AuthButtonsContainer,
2060
- ErrorStyle: mixins.ErrorStyles,
2061
- };
2062
- const vanillaStyle = `
2063
- sqm-portal-register {
2064
- margin: 0 auto;
2065
- width: 100%;
2066
- display: block;
2067
- }
2068
-
2069
- :host{
2070
- display: block;
2071
- }
2072
-
2073
- :host([hidden]) {
2074
- display: none;
2075
- }
2076
- `;
2077
- const sheet$3 = JSS.createStyleSheet(style$3);
2078
- const styleString$3 = sheet$3.toString();
2079
- function PortalRegisterView(props) {
2080
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
2081
- const { states, refs, callbacks, content } = props;
2082
- if (states.error) {
2083
- window.scrollTo({ top: 0, left: 0, behavior: "smooth" });
2084
- }
2085
- return (index.h("div", { class: sheet$3.classes.Wrapper, part: "sqm-base" },
2086
- index.h("style", { type: "text/css" },
2087
- vanillaStyle,
2088
- styleString$3),
2089
- index.h(sqmTextSpanView.TextSpanView, { type: "h3" }, content.pageLabel),
2090
- index.h("sl-form", { class: sheet$3.classes.Column, "onSl-submit": callbacks.submit, ref: (el) => (refs.formRef.current = el), novalidate: true },
2091
- states.error && (index.h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
2092
- index.h("div", { part: "erroralert-text" }, props.states.error))),
2093
- content.formData,
2094
- !states.hideInputs && (index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true, validationError: ({ value }) => {
2095
- if (!value) {
2096
- return content.requiredFieldErrorMessage;
2097
- }
2098
- // this matches shoelace validation, but could be better
2099
- if (!value.includes("@")) {
2100
- return content.invalidEmailErrorMessage;
2101
- }
2102
- } }, (((_b = (_a = states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors) === null || _b === void 0 ? void 0 : _b.email) ? {
2103
- class: sheet$3.classes.ErrorStyle,
2104
- helpText: ((_d = (_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.validationErrors) === null || _d === void 0 ? void 0 : _d.email) ||
2105
- content.requiredFieldErrorMessage,
2106
- }
2107
- : [])))),
2108
- !states.hideInputs && (index.h("sqm-password-field", { fieldLabel: content.passwordLabel, "disable-validation": states.disablePasswordValidation, meetsRequirementsText: content.meetsRequirementsText, doesNotMeetRequirementsText: content.doesNotMeetRequirementsText, minErrorText: content.minErrorText, uppercaseErrorText: content.uppercaseErrorText, lowercaseErrorText: content.lowercaseErrorText, hasErrorText: content.hasErrorText })),
2109
- content.passwordField,
2110
- !states.hideInputs && states.confirmPassword && (index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", type: "password", name: "/confirmPassword", label: content.confirmPasswordLabel, disabled: states.loading || ((_e = states.registrationFormState) === null || _e === void 0 ? void 0 : _e.disabled), required: true }, (((_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g.confirmPassword) ? {
2111
- value: (_j = (_h = states.registrationFormState) === null || _h === void 0 ? void 0 : _h.initialData) === null || _j === void 0 ? void 0 : _j.confirmPassword,
2112
- }
2113
- : {}), (((_l = (_k = states.registrationFormState) === null || _k === void 0 ? void 0 : _k.validationErrors) === null || _l === void 0 ? void 0 : _l.confirmPassword) ? {
2114
- class: sheet$3.classes.ErrorStyle,
2115
- helpText: ((_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.validationErrors) === null || _o === void 0 ? void 0 : _o.confirmPassword) || content.requiredFieldErrorMessage,
2116
- }
2117
- : [])))),
2118
- content.terms,
2119
- index.h("div", { class: sheet$3.classes.ButtonsContainer },
2120
- index.h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"),
2121
- content.secondaryButton))));
2122
- }
2123
-
2124
- const style$4 = {
2125
- ErrorStyle: {
2126
- "&::part(control)": {
2127
- background: "var(--sl-color-danger-10)",
2128
- borderColor: "var(--sl-color-danger-500)",
2129
- outline: "var(--sl-color-danger-500)",
2130
- },
2131
- "&:host": {
2132
- "--focus-ring": "0 0 0 var(--sl-focus-ring-width) red !important",
2133
- },
2134
- },
2135
- ErrorMessageStyle: {
2136
- margin: 0,
2137
- marginTop: "5px",
2138
- color: "var(--sl-color-danger-500)",
2139
- fontSize: "var(--sl-input-help-text-font-size-medium)",
2140
- fontFamily: "var(--sl-font-sans)",
2141
- fontWeight: "var(--sl-font-weight-normal)",
2142
- },
2143
- FieldContainer: {
2144
- "margin-bottom": "var(--sl-spacing-large)",
2145
- },
2146
- };
2147
- const vanillaStyle$1 = `
2148
- :host {
2149
- margin: 0 auto;
2150
- width: 100%;
2151
- display: block;
2152
- }
2153
- sl-checkbox::part(label){
2154
- font-size: var(--sl-input-label-font-size-small);
2155
- font-weight: var(--sl-font-weight-normal);
2156
- line-height: 20px;
2157
- }
2158
- sl-checkbox::part(base){
2159
- align-items: start;
2160
- }
2161
- `;
2162
- JSS.jss.setup(JSS.create());
2163
- const sheet$4 = JSS.jss.createStyleSheet(style$4);
2164
- const styleString$4 = sheet$4.toString();
2165
- function CheckboxFieldView(props) {
2166
- var _b, _c;
2167
- const { states, content, callbacks } = props;
2168
- return (index.h("div", { class: sheet$4.classes.FieldContainer, part: "sqm-base" },
2169
- index.h("style", { type: "text/css" },
2170
- vanillaStyle$1,
2171
- styleString$4),
2172
- index.h("sl-checkbox", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.checkboxName}`, checked: states.checked, "onSl-change": (e) => {
2173
- e.target.value = e.target.checked;
2174
- callbacks.setChecked(e.target.value);
2175
- } }, (!content.checkboxOptional ? { required: false } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled), required: false }), global.intl.formatMessage({
2176
- id: content.checkboxName + "-message",
2177
- defaultMessage: content.checkboxLabel,
2178
- }, {
2179
- labelLink: (index.h("a", { href: content.checkboxLabelLink, target: "_blank" }, content.checkboxLabelLinkText || content.checkboxLabelLink)),
2180
- }))));
2181
- }
2182
-
2183
- function CouponCodeView(props) {
2184
- const error = !props.loading && props.error;
2185
- const style = {
2186
- HostBlock: mixins.HostBlock,
2187
- couponCodeLabel: {
2188
- margin: "var(--sl-spacing-x-small) 0",
2189
- color: props.textColor || "var(--sqm-text-subdued)",
2190
- fontSize: "var(--sl-font-size-small)",
2191
- },
2192
- };
2193
- const vanillaStyle = `
2194
- :host{
2195
- display: block;
2196
- width: 100%;
2197
- }
2198
- `;
2199
- const sheet = JSS.createStyleSheet(style);
2200
- const styleString = sheet.toString();
2201
- return (index.h("div", null,
2202
- index.h("style", { type: "text/css" },
2203
- styleString,
2204
- vanillaStyle),
2205
- index.h("p", { class: sheet.classes.couponCodeLabel, style: { textAlign: props.textAlign } }, props.couponCodeLabel),
2206
- error ? (index.h("sqm-form-message", { type: props.errorType, exportparts: "erroralert-icon" },
2207
- index.h("div", { part: "erroralert-text" }, props.errorText))) : (index.h(copyTextView.CopyTextView, Object.assign({}, props)))));
2208
- }
2209
-
2210
- const style$5 = {
2211
- ErrorStyle: {
2212
- "--sl-input-border-color": "var(--sl-color-danger-500)",
2213
- "--sl-input-background-color": "var(--sl-color-danger-10)",
2214
- "--sl-input-border-color-focus": "var(--sl-color-danger-500)",
2215
- "--sl-input-border-color-hover": "var(--sl-color-danger-500)",
2216
- },
2217
- ErrorMessageStyle: {
2218
- margin: 0,
2219
- color: "var(--sl-color-danger-500)",
2220
- fontSize: "var(--sl-input-help-text-font-size-medium)",
2221
- },
2222
- FieldContainer: {
2223
- "margin-bottom": "var(--sl-spacing-large)",
2224
- },
2225
- };
2226
- const vanillaStyle$2 = `
2227
- :host {
2228
- margin: 0 auto;
2229
- width: 100%;
2230
- display: block;
2231
- }
2232
- sl-select::part(label){
2233
- font-size: var(--sl-input-label-font-size-small);
2234
- font-weight: var(--sl-font-weight-semibold);
2235
- }
2236
- `;
2237
- JSS.jss.setup(JSS.create());
2238
- const sheet$5 = JSS.jss.createStyleSheet(style$5);
2239
- const styleString$5 = sheet$5.toString();
2240
- function DropdownFieldView(props) {
2241
- var _a, _b, _c, _d, _e, _f, _g;
2242
- const { states, content } = props;
2243
- const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
2244
- return (index.h("div", { class: sheet$5.classes.FieldContainer, part: "sqm-base" },
2245
- index.h("style", { type: "text/css" },
2246
- vanillaStyle$2,
2247
- styleString$5),
2248
- index.h("sl-select", Object.assign({ exportparts: "label: input-label, base: input-base", label: content.dropdownLabel, name: `/${content.dropdownName}` }, (!content.dropdownOptional ? { required: true } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e[content.dropdownName]) ? {
2249
- value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.dropdownName],
2250
- }
2251
- : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) ? {
2252
- class: sheet$5.classes.ErrorStyle,
2253
- }
2254
- : [])), content.selectOptions),
2255
- (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) && (index.h("p", { class: sheet$5.classes.ErrorMessageStyle }, global.intl.formatMessage({
2256
- id: `errorMessage-${content.dropdownName}`,
2257
- defaultMessage: content.errorMessage,
2258
- })))));
2259
- }
2260
-
2261
- const EditProfileView = (props) => {
2262
- var _a, _b, _c, _d;
2263
- const { states, callbacks } = props;
2264
- const { text } = states;
2265
- const { errors } = states.formState;
2266
- if (states.showEdit) {
2267
- return (index.h("div", { class: `CardWrapper ${!states.showEdit && "ShowEdit"}`, part: "sqm-base" },
2268
- index.h("h2", { part: "sqm-header", style: {
2269
- fontSize: "var(--sl-font-size-x-large)",
2270
- margin: "0px",
2271
- textAlign: "center",
2272
- } }, text.editprofileheader),
2273
- index.h("form", { class: "FormWrapper", onSubmit: callbacks.onSubmit },
2274
- index.h("div", { class: "FormSection" },
2275
- states.formState.error && (index.h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
2276
- index.h("div", { part: "erroralert-text" }, states.formState.error))),
2277
- index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: states.formState.firstName, onInput: callbacks.onChange, label: text.firstnametext, disabled: states.loading }, (errors.firstName && errors.firstName.status !== "valid"
2278
- ? { class: "ErrorStyles", helpText: text.fieldEmptyText }
2279
- : []), { id: "firstName", name: "firstName", error: errors.firstName && errors.firstName.status !== "valid"
2280
- ? errors.firstName.message
2281
- : undefined })),
2282
- index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: states.formState.lastName, onInput: callbacks.onChange, label: text.lastnametext, disabled: states.loading, id: "lastName", name: "lastName" }, (errors.lastName && errors.lastName.status !== "valid"
2283
- ? { class: "ErrorStyles", helpText: text.fieldEmptyText }
2284
- : []), { error: errors.lastName && errors.lastName.status !== "valid"
2285
- ? errors.lastName.message
2286
- : undefined }))),
2287
- text.showregion && states.formState.currentRegion && (index.h("sl-input", { exportparts: "label: input-label, base: input-base", disabled: true, value: states.formState.currentRegion, label: text.currentregiontext, id: "currentRegion", name: "currentRegion" })),
2288
- index.h("div", { class: "ButtonWrapper" },
2289
- index.h("sl-button", { type: "primary", loading: states.loading, disabled: states.submitDisabled, onClick: (e) => {
2290
- callbacks.onSubmit(e);
2291
- }, submit: true, exportparts: "base: primarybutton-base" }, text.updatetext),
2292
- index.h("sl-button", { onClick: () => {
2293
- callbacks.setShowEdit(false);
2294
- }, type: "secondary", exportparts: "base: secondarybutton-base" }, text.canceltext)))));
2295
- }
2296
- return (index.h("div", { class: `CardWrapper FormWrapper ${!states.showEdit && "ShowEdit"}`, part: "sqm-base" },
2297
- index.h("div", { class: "FormSection" },
2298
- index.h("h2", { part: "sqm-header", style: {
2299
- fontSize: "var(--sl-font-size-x-large)",
2300
- marginBottom: "0px",
2301
- textAlign: "center",
2302
- } }, text.editprofileheader),
2303
- index.h("div", null,
2304
- index.h("p", { style: { fontSize: "var(--sl-font-size-medium)" } }, (_a = states.user) === null || _a === void 0 ? void 0 :
2305
- _a.firstName,
2306
- " ", (_b = states.user) === null || _b === void 0 ? void 0 :
2307
- _b.lastName),
2308
- index.h("p", { style: { fontSize: "var(--sl-font-size-medium)" }, title: (_c = states.user) === null || _c === void 0 ? void 0 : _c.email }, (_d = states.user) === null || _d === void 0 ? void 0 : _d.email))),
2309
- index.h("sl-button", { type: "primary", loading: states.loading, onClick: () => {
2310
- callbacks.resetForm();
2311
- callbacks.setShowEdit(true);
2312
- }, exportparts: "base: primarybutton-base" }, text.editprofiletext)));
2313
- };
2568
+ function PoweredByImg({ color = "#A6A6A6", width = 120, height = 16, }) {
2569
+ return (index.h("svg", { width: width, height: height, viewBox: "0 0 1662 254", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
2570
+ index.h("path", { d: "M801.082 253.58L869.382 1.67969", stroke: color, "stroke-width": "3" }),
2571
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M125.682 42.48C123.882 42.48 121.982 42.78 120.382 43.48C118.682 44.18 117.182 45.18 115.882 46.48C114.582 47.68 113.582 49.28 112.882 50.98C112.182 52.68 111.882 54.48 111.982 56.28C112.282 59.68 113.882 63.08 116.382 65.38C118.982 67.78 122.382 68.98 125.782 68.98C129.282 68.98 132.682 67.58 135.182 65.38C137.782 62.98 139.382 59.78 139.582 56.28C139.582 54.38 139.282 52.68 138.682 50.98C137.982 49.28 136.982 47.78 135.682 46.48C134.382 45.18 132.882 44.18 131.182 43.48C129.282 42.78 127.582 42.48 125.682 42.48Z", fill: color }),
2572
+ index.h("path", { d: "M135.882 89.2798H115.582V187.58H135.882V89.2798Z", fill: color }),
2573
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M231.481 104.18C238.781 93.4799 251.181 87.3799 266.281 87.3799C290.981 87.3799 307.581 103.28 307.381 127.08V187.48H286.781V132.38C286.781 116.38 278.281 107.18 263.381 107.18C248.481 107.18 237.981 117.68 237.981 132.68V187.48H217.281V132.38C217.281 116.38 208.781 107.18 193.881 107.18C178.981 107.18 168.481 117.68 168.481 132.68V187.48H147.981V89.3799H168.681V97.8799C178.081 88.8799 190.181 87.4799 197.081 87.4799C211.881 87.4799 224.381 93.5799 231.481 104.18Z", fill: color }),
2574
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M370.781 87.48C358.581 87.48 347.981 91.38 339.981 98.38V89.28H319.481V226.08H339.981V177.78C347.881 185.08 358.581 188.78 370.781 188.78C398.781 188.78 419.881 166.88 419.881 138.08C419.981 109.28 398.781 87.48 370.781 87.48ZM368.881 169.58C351.481 169.58 338.881 156.38 338.881 138.28C338.881 120.38 351.381 106.98 368.881 106.98C386.281 106.98 398.881 120.08 398.881 138.28C398.881 156.48 386.381 169.58 368.881 169.58Z", fill: color }),
2575
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M701.782 169.88C707.682 169.88 714.082 167.58 719.582 163.98L721.482 162.88L731.482 178.68L729.782 179.88C721.282 186.28 710.982 189.58 700.382 189.58C678.082 189.58 665.782 176.38 665.782 152.28V108.68H645.682V89.3799H665.782V59.8799H686.482V89.2798H725.682V108.48H686.482V151.88C686.482 163.38 691.982 169.88 701.782 169.88Z", fill: color }),
2576
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M551.282 239.88C549.982 239.88 548.782 240.28 547.682 240.88C546.682 241.58 545.782 242.58 545.382 243.68C544.882 244.78 544.782 246.08 545.082 247.28C545.282 248.58 545.882 249.68 546.882 250.48C547.782 251.38 548.882 251.98 550.082 252.28C551.382 252.48 552.582 252.38 553.782 251.98C554.882 251.48 555.982 250.78 556.582 249.68C557.282 248.68 557.582 247.38 557.582 246.18C557.582 244.48 556.982 242.88 555.682 241.68C554.482 240.48 552.882 239.88 551.282 239.88Z", fill: color }),
2577
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M586.182 210.78C592.282 210.78 597.582 213.08 601.082 217.18L601.482 217.68L596.282 223.08L595.782 222.58C594.482 221.18 593.082 220.18 591.382 219.48C589.682 218.78 587.882 218.38 586.082 218.48C578.882 218.48 573.682 224.08 573.682 231.58C573.682 239.18 578.882 244.78 586.082 244.78C589.782 244.68 593.282 243.18 595.882 240.58L596.382 240.08L601.382 245.68L600.982 246.08C597.182 250.18 591.982 252.18 586.082 252.18C574.082 252.18 565.382 243.58 565.382 231.58C565.582 219.48 574.182 210.78 586.182 210.78Z", fill: color }),
2578
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M633.782 210.78C621.682 210.78 612.582 219.68 612.582 231.38C612.582 243.08 621.682 251.98 633.782 251.98C645.882 251.98 654.882 243.08 654.882 231.38C655.082 219.78 645.982 210.78 633.782 210.78ZM633.782 244.78C626.382 244.78 620.782 239.28 620.782 231.58C620.782 223.88 626.182 218.48 633.782 218.48C641.182 218.48 646.782 224.08 646.782 231.58C646.782 238.98 641.382 244.78 633.782 244.78Z", fill: color }),
2579
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M723.982 228.78C723.982 222.18 720.382 218.28 714.082 218.28C707.682 218.28 703.382 222.78 702.982 228.98V252.18H695.082V228.68C695.082 222.08 691.482 218.18 685.182 218.18C680.082 218.18 674.482 221.48 674.482 228.88V252.08H666.582V211.38H674.482V214.78L676.682 213.28C679.582 211.38 683.082 210.48 686.582 210.48C692.082 210.48 696.782 212.48 699.882 216.08L700.882 217.28L701.882 216.08C704.782 212.48 709.582 210.48 715.182 210.48C725.082 210.48 731.982 217.08 731.982 226.38V251.88H724.082V228.68H723.982V228.78Z", fill: color }),
2580
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M511.681 89.4797V98.7797C503.681 91.4797 493.181 87.6797 480.981 87.6797C452.981 87.6797 431.981 109.68 431.981 138.68C431.981 167.78 453.081 189.68 480.981 189.68C493.181 189.68 503.681 185.78 511.681 178.38V187.68H532.381V89.4797H511.681ZM482.881 169.88C465.481 169.88 452.781 156.58 452.781 138.48C452.781 120.48 465.281 106.98 482.881 106.98C500.481 106.98 512.781 120.08 512.781 138.48C512.781 156.68 500.181 169.88 482.881 169.88Z", fill: color }),
2581
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M595.281 107.08C604.181 107.08 611.781 110.38 618.781 116.98L620.481 118.68L633.981 104.58L632.581 102.98C623.781 92.98 610.781 87.48 595.781 87.48C565.981 87.48 544.481 109.08 544.481 138.48C544.481 167.98 565.981 189.48 595.781 189.48C610.481 189.48 623.681 183.98 632.581 174.08L633.981 172.58L620.981 158.18L619.281 159.88C612.481 166.48 603.981 169.98 595.481 169.98C578.381 169.98 565.681 156.68 565.681 138.58C565.581 120.58 577.881 107.08 595.281 107.08Z", fill: color }),
2582
+ index.h("path", { d: "M135.882 89.2798H115.582V187.58H135.882V89.2798Z", fill: color }),
2583
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M231.481 104.18C238.781 93.4799 251.181 87.3799 266.281 87.3799C290.981 87.3799 307.581 103.28 307.381 127.08V187.48H286.781V132.38C286.781 116.38 278.281 107.18 263.381 107.18C248.481 107.18 237.981 117.68 237.981 132.68V187.48H217.281V132.38C217.281 116.38 208.781 107.18 193.881 107.18C178.981 107.18 168.481 117.68 168.481 132.68V187.48H147.981V89.3799H168.681V97.8799C178.081 88.8799 190.181 87.4799 197.081 87.4799C211.881 87.4799 224.381 93.5799 231.481 104.18Z", fill: color }),
2584
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M370.781 87.48C358.581 87.48 347.981 91.38 339.981 98.38V89.28H319.481V226.08H339.981V177.78C347.881 185.08 358.581 188.78 370.781 188.78C398.781 188.78 419.881 166.88 419.881 138.08C419.981 109.28 398.781 87.48 370.781 87.48ZM368.881 169.58C351.481 169.58 338.881 156.38 338.881 138.28C338.881 120.38 351.381 106.98 368.881 106.98C386.281 106.98 398.881 120.08 398.881 138.28C398.881 156.48 386.381 169.58 368.881 169.58Z", fill: color }),
2585
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M701.782 169.88C707.682 169.88 714.082 167.58 719.582 163.98L721.482 162.88L731.482 178.68L729.782 179.88C721.282 186.28 710.982 189.58 700.382 189.58C678.082 189.58 665.782 176.38 665.782 152.28V108.68H645.682V89.3799H665.782V59.8799H686.482V89.2798H725.682V108.48H686.482V151.88C686.482 163.38 691.982 169.88 701.782 169.88Z", fill: color }),
2586
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M511.681 89.4797V98.7797C503.681 91.4797 493.181 87.6797 480.981 87.6797C452.981 87.6797 431.981 109.68 431.981 138.68C431.981 167.78 453.081 189.68 480.981 189.68C493.181 189.68 503.681 185.78 511.681 178.38V187.68H532.381V89.4797H511.681ZM482.881 169.88C465.481 169.88 452.781 156.58 452.781 138.48C452.781 120.48 465.281 106.98 482.881 106.98C500.481 106.98 512.781 120.08 512.781 138.48C512.781 156.68 500.181 169.88 482.881 169.88Z", fill: color }),
2587
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M595.281 107.08C604.181 107.08 611.781 110.38 618.781 116.98L620.481 118.68L633.981 104.58L632.581 102.98C623.781 92.98 610.781 87.48 595.781 87.48C565.981 87.48 544.481 109.08 544.481 138.48C544.481 167.98 565.981 189.48 595.781 189.48C610.481 189.48 623.681 183.98 632.581 174.08L633.981 172.58L620.981 158.18L619.281 159.88C612.481 166.48 603.981 169.98 595.481 169.98C578.381 169.98 565.681 156.68 565.681 138.58C565.581 120.58 577.881 107.08 595.281 107.08Z", fill: color }),
2588
+ index.h("path", { d: "M34.6815 112.78C40.6815 112.78 46.5815 114.18 51.8815 116.68C57.2815 119.18 62.0815 122.78 65.9815 127.28C67.9815 122.68 69.0815 117.78 69.0815 112.88C69.0815 108.38 68.1815 103.88 66.4815 99.8799C64.6815 95.6799 62.1815 91.9799 58.9815 88.8799C55.7815 85.7799 51.9815 83.2799 47.7815 81.4799C43.5815 79.7799 39.0815 78.8799 34.5815 78.8799C30.0815 78.8799 25.5815 79.6799 21.3815 81.4799C17.1815 83.1799 13.3815 85.7799 10.1815 88.8799C6.98154 91.9799 4.48154 95.7799 2.68154 99.8799C0.881541 104.08 0.081543 108.38 0.081543 112.88C0.181543 117.88 1.18154 122.78 3.18154 127.28C7.08154 122.68 11.8815 119.18 17.1815 116.68C22.7815 113.98 28.7815 112.68 34.6815 112.78Z", fill: color }),
2589
+ index.h("path", { d: "M69.1817 153.48C69.1817 146.68 67.1817 140.18 63.2817 134.48C59.4817 128.88 54.0817 124.48 47.7817 121.88C41.4817 119.28 34.4817 118.68 27.7817 119.88C21.0817 121.28 14.8817 124.48 10.0817 129.28C5.28166 134.08 1.88166 140.08 0.681661 146.78C-0.718339 153.48 0.0816607 160.18 2.68166 166.48C5.28166 172.78 9.68166 178.08 15.4817 181.78C21.0817 185.58 27.7817 187.48 34.6817 187.48C43.7817 187.38 52.5817 183.88 59.0817 177.38C65.6817 170.98 69.1817 162.58 69.1817 153.48Z", fill: color }),
2590
+ index.h("path", { d: "M69.1817 34.9799C69.1817 28.1799 67.1817 21.6799 63.2817 15.9799C59.4817 10.3799 54.1817 5.9799 47.7817 3.3799C41.4817 0.779901 34.4817 0.1799 27.7817 1.3799C21.0817 2.7799 14.8817 5.97986 10.0817 10.7799C5.28166 15.5799 1.88166 21.5799 0.681661 28.2799C-0.718339 34.9799 0.0816607 41.6799 2.68166 47.9799C5.28166 54.2799 9.68166 59.5799 15.4817 63.2799C21.0817 67.0799 27.7817 68.9799 34.6817 68.9799C43.8817 68.9799 52.6817 65.3799 59.1817 58.9799C65.5817 52.6799 69.1817 43.8799 69.1817 34.9799Z", fill: color }),
2591
+ index.h("path", { d: "M962.664 203.95C953.044 203.95 945.244 201.285 939.264 195.955C933.284 190.495 930.294 183.41 930.294 174.7C930.294 165.08 933.739 157.605 940.629 152.275C947.649 146.945 957.464 144.28 970.074 144.28H993.864V138.43C993.864 129.72 991.589 123.09 987.039 118.54C982.619 113.86 976.184 111.52 967.734 111.52C962.014 111.52 956.749 112.885 951.939 115.615C947.129 118.345 943.229 122.18 940.239 127.12L933.999 120.295C937.639 114.575 942.384 110.22 948.234 107.23C954.214 104.11 960.974 102.55 968.514 102.55C979.694 102.55 988.404 105.605 994.644 111.715C1001.01 117.695 1004.2 126.015 1004.2 136.675V184.255C1004.2 188.805 1004.98 194.72 1006.54 202H997.569C996.399 199.14 995.554 194.07 995.034 186.79H994.644C990.874 192.25 986.259 196.475 980.799 199.465C975.339 202.455 969.294 203.95 962.664 203.95ZM962.664 195.175C968.124 195.175 973.259 194.07 978.069 191.86C982.879 189.52 986.714 186.465 989.574 182.695C992.434 178.795 993.864 174.7 993.864 170.41V152.665H969.489C960.389 152.665 953.239 154.615 948.039 158.515C942.969 162.415 940.434 167.81 940.434 174.7C940.434 180.68 942.514 185.62 946.674 189.52C950.834 193.29 956.164 195.175 962.664 195.175Z", fill: color }),
2592
+ index.h("path", { d: "M1067.55 203.95C1055.07 203.95 1045.25 199.27 1038.1 189.91C1030.95 180.55 1027.38 167.745 1027.38 151.495C1027.38 136.415 1031.02 124.52 1038.3 115.81C1045.71 106.97 1055.72 102.55 1068.33 102.55C1074.7 102.55 1080.55 104.045 1085.88 107.035C1091.21 110.025 1095.5 114.25 1098.75 119.71H1099.14V57.3101H1109.67V178.21C1109.67 189.13 1109.86 197.06 1110.25 202H1100.89C1100.63 197.84 1100.5 192.12 1100.5 184.84H1100.11C1097.12 190.69 1092.7 195.37 1086.85 198.88C1081 202.26 1074.57 203.95 1067.55 203.95ZM1068.13 195.175C1077.23 195.175 1084.64 192.185 1090.36 186.205C1096.21 180.225 1099.14 172.49 1099.14 163V146.815C1099.14 135.895 1096.41 127.25 1090.95 120.88C1085.49 114.38 1078.08 111.13 1068.72 111.13C1059.1 111.13 1051.49 114.77 1045.9 122.05C1040.44 129.2 1037.71 139.145 1037.71 151.885C1037.71 165.275 1040.44 175.87 1045.9 183.67C1051.36 191.34 1058.77 195.175 1068.13 195.175Z", fill: color }),
2593
+ index.h("path", { d: "M1208.57 104.5L1172.3 202H1161.96L1125.5 104.5H1136.61L1167.03 189.715L1197.45 104.5H1208.57Z", fill: color }),
2594
+ index.h("path", { d: "M1261.51 203.95C1252.54 203.95 1244.61 201.87 1237.72 197.71C1230.96 193.55 1225.7 187.635 1221.93 179.965C1218.29 172.295 1216.47 163.39 1216.47 153.25C1216.47 143.11 1218.29 134.205 1221.93 126.535C1225.7 118.865 1230.96 112.95 1237.72 108.79C1244.61 104.63 1252.54 102.55 1261.51 102.55C1270.48 102.55 1278.35 104.63 1285.11 108.79C1292 112.95 1297.33 118.865 1301.1 126.535C1304.87 134.205 1306.75 143.11 1306.75 153.25C1306.75 163.39 1304.87 172.295 1301.1 179.965C1297.33 187.635 1292 193.55 1285.11 197.71C1278.35 201.87 1270.48 203.95 1261.51 203.95ZM1261.51 195.37C1268.4 195.37 1274.45 193.615 1279.65 190.105C1284.98 186.595 1289.07 181.655 1291.93 175.285C1294.79 168.915 1296.22 161.57 1296.22 153.25C1296.22 144.93 1294.79 137.585 1291.93 131.215C1289.07 124.845 1284.98 119.905 1279.65 116.395C1274.45 112.885 1268.4 111.13 1261.51 111.13C1254.75 111.13 1248.71 112.885 1243.38 116.395C1238.18 119.905 1234.15 124.845 1231.29 131.215C1228.43 137.585 1227 144.93 1227 153.25C1227 161.57 1228.43 168.915 1231.29 175.285C1234.15 181.655 1238.18 186.595 1243.38 190.105C1248.71 193.615 1254.75 195.37 1261.51 195.37Z", fill: color }),
2595
+ index.h("path", { d: "M1366.03 203.95C1352.25 203.95 1341.52 199.53 1333.85 190.69C1326.31 181.72 1322.54 169.24 1322.54 153.25C1322.54 137.39 1326.38 124.975 1334.05 116.005C1341.72 107.035 1352.38 102.55 1366.03 102.55C1373.57 102.55 1380.26 104.11 1386.11 107.23C1391.96 110.22 1396.77 114.575 1400.54 120.295L1394.3 126.34C1391.31 121.66 1387.28 118.02 1382.21 115.42C1377.27 112.69 1371.88 111.325 1366.03 111.325C1355.76 111.325 1347.63 115.03 1341.65 122.44C1335.8 129.85 1332.88 140.12 1332.88 153.25C1332.88 166.38 1335.8 176.65 1341.65 184.06C1347.63 191.47 1355.76 195.175 1366.03 195.175C1371.88 195.175 1377.27 193.875 1382.21 191.275C1387.28 188.545 1391.31 184.84 1394.3 180.16L1400.54 186.205C1396.77 191.925 1391.96 196.345 1386.11 199.465C1380.26 202.455 1373.57 203.95 1366.03 203.95Z", fill: color }),
2596
+ index.h("path", { d: "M1446.55 203.95C1436.93 203.95 1429.13 201.285 1423.15 195.955C1417.17 190.495 1414.18 183.41 1414.18 174.7C1414.18 165.08 1417.62 157.605 1424.51 152.275C1431.53 146.945 1441.35 144.28 1453.96 144.28H1477.75V138.43C1477.75 129.72 1475.47 123.09 1470.92 118.54C1466.5 113.86 1460.07 111.52 1451.62 111.52C1445.9 111.52 1440.63 112.885 1435.82 115.615C1431.01 118.345 1427.11 122.18 1424.12 127.12L1417.88 120.295C1421.52 114.575 1426.27 110.22 1432.12 107.23C1438.1 104.11 1444.86 102.55 1452.4 102.55C1463.58 102.55 1472.29 105.605 1478.53 111.715C1484.9 117.695 1488.08 126.015 1488.08 136.675V184.255C1488.08 188.805 1488.86 194.72 1490.42 202H1481.45C1480.28 199.14 1479.44 194.07 1478.92 186.79H1478.53C1474.76 192.25 1470.14 196.475 1464.68 199.465C1459.22 202.455 1453.18 203.95 1446.55 203.95ZM1446.55 195.175C1452.01 195.175 1457.14 194.07 1461.95 191.86C1466.76 189.52 1470.6 186.465 1473.46 182.695C1476.32 178.795 1477.75 174.7 1477.75 170.41V152.665H1453.37C1444.27 152.665 1437.12 154.615 1431.92 158.515C1426.85 162.415 1424.32 167.81 1424.32 174.7C1424.32 180.68 1426.4 185.62 1430.56 189.52C1434.72 193.29 1440.05 195.175 1446.55 195.175Z", fill: color }),
2597
+ index.h("path", { d: "M1547.14 203.95C1539.08 203.95 1532.97 201.48 1528.81 196.54C1524.65 191.47 1522.57 184.19 1522.57 174.7V113.275H1505.02V104.5H1522.57V77.9801L1532.32 74.6651H1533.1V104.5H1560.59V113.275H1533.1V172.555C1533.1 180.355 1534.33 186.01 1536.8 189.52C1539.27 193.03 1543.17 194.785 1548.5 194.785C1553.83 194.785 1558.06 194.005 1561.18 192.445L1562.35 200.83C1558.19 202.91 1553.12 203.95 1547.14 203.95Z", fill: color }),
2598
+ index.h("path", { d: "M1661.53 157.54H1589.77C1590.42 169.37 1593.54 178.535 1599.13 185.035C1604.85 191.535 1612.65 194.785 1622.53 194.785C1628.51 194.785 1633.97 193.485 1638.91 190.885C1643.98 188.285 1647.95 184.645 1650.81 179.965L1657.24 186.4C1653.34 192.12 1648.4 196.475 1642.42 199.465C1636.57 202.455 1629.94 203.95 1622.53 203.95C1609.01 203.95 1598.35 199.465 1590.55 190.495C1582.88 181.525 1579.05 169.175 1579.05 153.445C1579.05 137.585 1582.82 125.17 1590.36 116.2C1597.9 107.1 1608.23 102.55 1621.36 102.55C1633.84 102.55 1643.66 106.84 1650.81 115.42C1657.96 124 1661.53 135.895 1661.53 151.105V157.54ZM1651.39 147.4C1651.39 136.48 1648.66 127.77 1643.2 121.27C1637.74 114.77 1630.46 111.52 1621.36 111.52C1611.74 111.52 1604.2 114.77 1598.74 121.27C1593.28 127.77 1590.29 137.065 1589.77 149.155H1651.39V147.4Z", fill: color })));
2599
+ }
2314
2600
 
2315
- function LeaderboardView(props) {
2316
- var _a, _b, _c;
2317
- const { states, data, elements } = props;
2318
- const { styles } = states;
2601
+ const vanillaStyle$2 = `
2602
+ :host{
2603
+ margin: 0 auto;
2604
+ width: 100%;
2605
+ }
2606
+ a{
2607
+ cursor:pointer;
2608
+ color: var(--sqm-text-subdued);
2609
+ text-decoration: none ;
2610
+ }
2611
+ `;
2612
+ function PortalFooterView(props) {
2319
2613
  const style = {
2320
- Leaderboard: {
2321
- "& table": {
2322
- width: "100%",
2323
- borderCollapse: "collapse",
2324
- background: styles.background || "transparent",
2325
- borderRadius: styles.borderRadius ? `${styles.borderRadius}px` : "0",
2326
- },
2327
- "& th": {
2328
- textAlign: "left",
2329
- padding: "var(--sl-spacing-medium)",
2330
- paddingTop: "0",
2331
- fontSize: "var(--sl-font-size-medium)",
2332
- fontWeight: "var(--sl-font-weight-semibold)",
2333
- },
2334
- "& tr:not(:first-child)": {
2335
- borderTop: `var(--sqm-bordr-thickness) solid ${styles.borderColor || "var(--sqm-border-color)"}`,
2336
- },
2337
- "& td": {
2338
- fontSize: "var(--sl-font-size-medium)",
2339
- fontWeight: "var(--sl-font-weight-normal)",
2340
- },
2341
- "& .ellipses": {
2342
- textAlign: "left",
2343
- padding: "0",
2344
- color: styles.textColor || "var(--sqm-text)",
2345
- paddingLeft: "25%",
2346
- },
2347
- "& .highlight": {
2348
- background: styles.viewingUserHighlightColor ||
2349
- "var(--sqm-accent-color-background)",
2350
- "& td, th": {
2351
- color: styles.viewingUserHighlightTextColor || "var(--sqm-text)",
2352
- },
2353
- },
2354
- "& td, th": {
2355
- color: styles.textColor || "var(--sqm-text)",
2356
- padding: "var(--sl-spacing-medium)",
2357
- },
2358
- "& .User": {
2359
- width: "100%",
2614
+ RowContainer: {
2615
+ display: "flex",
2616
+ "& > :not(:last-child)": {
2617
+ "margin-right": "var(--sl-spacing-large)",
2360
2618
  },
2361
- "& .Score": {
2362
- width: "auto",
2363
- whiteSpace: "nowrap",
2619
+ },
2620
+ Container: {
2621
+ display: "flex",
2622
+ "flex-direction": "column",
2623
+ "align-items": "center",
2624
+ "font-size": "var(--sl-font-size-small)",
2625
+ color: "var(--sqm-text-subdued)",
2626
+ "padding-top": `var(--sl-spacing-${props.paddingTop})`,
2627
+ "padding-right": `var(--sl-spacing-${props.paddingRight})`,
2628
+ "padding-bottom": `var(--sl-spacing-${props.paddingBottom})`,
2629
+ "padding-left": `var(--sl-spacing-${props.paddingLeft})`,
2630
+ "row-gap": `var(--sl-spacing-small)`,
2631
+ "& a:hover": {
2632
+ color: "var(--sqm-text)",
2364
2633
  },
2365
- "& .Rank": {
2366
- whiteSpace: "nowrap",
2634
+ },
2635
+ SupportText: {
2636
+ textAlign: "center",
2637
+ margin: 0,
2638
+ },
2639
+ PoweredByLink: {
2640
+ color: "var(--sqm-text-subdued)",
2641
+ "font-size": "var(--sl-font-size-small)",
2642
+ display: "flex",
2643
+ alignItems: "center",
2644
+ svg: {
2645
+ marginTop: "2px",
2646
+ shapeRendering: "geometricprecision",
2367
2647
  },
2368
- "& .fullWidth": {
2369
- width: "100%",
2648
+ "&:hover, &:hover *": {
2649
+ color: "var(--sqm-text)",
2370
2650
  },
2371
2651
  },
2372
2652
  };
2373
2653
  const sheet = JSS.createStyleSheet(style);
2374
2654
  const styleString = sheet.toString();
2375
- const vanillaStyle = `
2376
- :host{
2377
- display: block;
2378
- }
2379
- `;
2380
- if (states.isEssentials) {
2381
- return (index.h("sqm-empty", { "empty-state-image": "https://res.cloudinary.com/saasquatch/image/upload/v1715360191/squatch-assets/Leaderboard_Not_Available.svg", "empty-state-header": "Leaderboards aren\u2019t available on your plan", "empty-state-text": "Contact {supportText} to upgrade your plan and start leveraging gamification in your program.", "support-text": "Support" }));
2382
- }
2383
- if (states.loading) {
2384
- return (index.h("div", { class: sheet.classes.Leaderboard, style: { width: styles.width || "100%" } },
2385
- index.h("style", { type: "text/css" },
2386
- styleString,
2387
- vanillaStyle),
2388
- index.h("table", null, [...Array(10)].map(() => {
2389
- return (index.h("tr", null,
2390
- index.h("td", null,
2391
- index.h("sl-skeleton", null))));
2392
- }))));
2393
- }
2394
- if (!states.hasLeaders)
2395
- return elements.empty;
2396
- let userSeenFlag = false;
2397
- const getUsersName = (user) => {
2398
- if (!user.firstName && !user.lastInitial)
2399
- return styles.anonymousUser;
2400
- const { firstName, lastInitial } = user;
2401
- if (firstName && lastInitial)
2402
- return `${firstName} ${lastInitial}`;
2403
- if (firstName || lastInitial)
2404
- return firstName || lastInitial;
2405
- return styles.anonymousUser;
2406
- };
2407
- const getRankCellText = (userRank, isViewingUsersRow) => {
2408
- if (!userRank) {
2409
- return styles.hideNames ? `${styles.viewingUserText}` : "-";
2410
- }
2411
- const viewingUserText = ` - ${styles.viewingUserText}`;
2412
- return styles.rankSuffix
2413
- ? global.intl.formatMessage({
2414
- id: "rank",
2415
- defaultMessage: styles.rankSuffix,
2416
- }, {
2417
- rank: userRank,
2418
- }) + `${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`
2419
- : `${userRank} ${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`;
2420
- };
2421
- return (index.h("div", { class: sheet.classes.Leaderboard, part: "sqm-base", style: { width: styles.width || "100%" } },
2655
+ return (index.h("div", { class: sheet.classes.Container, part: "sqm-base" },
2422
2656
  index.h("style", { type: "text/css" },
2423
- styleString,
2424
- vanillaStyle),
2425
- index.h("table", { part: "sqm-table" },
2426
- index.h("tr", null,
2427
- styles.showRank && (index.h("th", { class: `Rank ${styles.hideNames ? "fullWidth" : ""}` }, styles.rankheading)),
2428
- !styles.hideNames && index.h("th", { class: "User" }, styles.usersheading),
2429
- index.h("th", { class: "Score" }, styles.statsheading)), (_a = data.leaderboard) === null || _a === void 0 ? void 0 :
2430
- _a.map((user) => {
2431
- var _a, _b;
2432
- if (user.rowNumber === ((_a = data.viewerRank) === null || _a === void 0 ? void 0 : _a.rowNumber))
2433
- userSeenFlag = true;
2434
- const isViewingUsersRow = !styles.hideViewer && user.rowNumber === ((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rowNumber);
2435
- return (index.h("tr", { class: isViewingUsersRow ? "highlight" : "" },
2436
- styles.showRank && (index.h("td", { class: "Rank" }, getRankCellText(user.rank, isViewingUsersRow))),
2437
- !styles.hideNames && index.h("td", { class: "User" }, getUsersName(user)),
2438
- index.h("td", { class: "Score" }, user.textValue)));
2439
- }),
2440
- !userSeenFlag && !styles.hideViewer && (index.h("tr", null,
2441
- index.h("td", { colSpan: 100, class: "ellipses" },
2442
- index.h("sl-icon", { name: "three-dots", style: { verticalAlign: "middle" } })))),
2443
- !userSeenFlag && !styles.hideViewer && (index.h("tr", { class: "highlight" },
2444
- styles.showRank && (index.h("td", { class: "Rank" }, getRankCellText((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rank, true))),
2445
- !styles.hideNames && (index.h("td", { class: "User" }, getUsersName(data.viewerRank || {}))),
2446
- index.h("td", { class: "Score" }, ((_c = data.viewerRank) === null || _c === void 0 ? void 0 : _c.textValue) || "0"))))));
2657
+ vanillaStyle$2,
2658
+ styleString),
2659
+ index.h("div", { class: sheet.classes.RowContainer },
2660
+ props.faqLink && (index.h("a", { target: "_blank", href: props.faqLink }, props.faqText)),
2661
+ props.termsLink && (index.h("a", { target: "_blank", href: props.termsLink }, props.termsText))),
2662
+ !props.hideSupportText && (index.h("p", { class: sheet.classes.SupportText }, global.intl.formatMessage({
2663
+ id: "supportFooter",
2664
+ defaultMessage: props.supportText,
2665
+ }, {
2666
+ email: (index.h("a", { target: "_blank", href: `mailto:${props.supportEmail}` }, props.supportEmail)),
2667
+ }))),
2668
+ !props.hidePoweredBy && (index.h("a", { class: sheet.classes.PoweredByLink, target: "_blank", href: props.poweredByLink },
2669
+ "Powered by ",
2670
+ index.h(PoweredByImg, { color: "currentColor" })))));
2447
2671
  }
2448
2672
 
2449
2673
  const paddingList = [
@@ -2564,54 +2788,45 @@ function HeroView(props) {
2564
2788
  }
2565
2789
 
2566
2790
  `;
2567
- // NOTE: Spacing on the columns is controlled on the slots itself. For example using inline styling
2568
- return (index.h("div", { class: sheet.classes.Container, part: "sqm-base" },
2569
- index.h("style", { type: "text/css" },
2570
- vanillaStyle,
2571
- styleString),
2572
- states.columns == 2 ? (index.h("div", { class: sheet.classes.TwoColumnContainer, part: "sqm-two-col-container" },
2573
- index.h("div", { part: "sqm-two-col-primary-col", class: `${sheet.classes.ColumnWrapper} ${sheet.classes.ColumnPadding}` }, content.primaryColumn),
2574
- index.h("div", { part: "sqm-two-col-secondary-col", class: `${sheet.classes.ColumnWrapper} ${sheet.classes.ColumnPadding}` }, content.secondaryColumn))) : (index.h("div", { part: "sqm-single-col", class: `${sheet.classes.SingleColumnContainer} ${sheet.classes.ColumnPadding}` }, content.primaryColumn))));
2575
- }
2576
-
2577
- const style$6 = {
2578
- ErrorStyle: mixins.ErrorStyles,
2579
- FieldContainer: {
2580
- "margin-bottom": "var(--sl-spacing-large)",
2581
- },
2582
- };
2583
- const vanillaStyle$3 = `
2584
- :host {
2585
- margin: 0 auto;
2586
- width: 100%;
2587
- display: block;
2588
- }
2589
- `;
2590
- JSS.jss.setup(JSS.create());
2591
- const sheet$6 = JSS.jss.createStyleSheet(style$6);
2592
- const styleString$6 = sheet$6.toString();
2593
- function InputFieldView(props) {
2594
- var _a, _b, _c, _d, _e, _f, _g;
2595
- const { states, content } = props;
2596
- const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
2597
- return (index.h("div", { class: sheet$6.classes.FieldContainer, part: "sqm-base" },
2598
- index.h("style", { type: "text/css" },
2599
- vanillaStyle$3,
2600
- styleString$6),
2601
- index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.fieldName}`, type: content.fieldType, label: content.fieldLabel }, (!content.fieldOptional ? { required: true } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e[content.fieldName]) ? {
2602
- value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.fieldName],
2603
- }
2604
- : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]) ? {
2605
- class: sheet$6.classes.ErrorStyle,
2606
- helpText: global.intl.formatMessage({
2607
- id: `errorMessage-${content.fieldName}`,
2608
- defaultMessage: content.errorMessage || (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]),
2609
- }),
2610
- }
2611
- : [])))));
2791
+ // NOTE: Spacing on the columns is controlled on the slots itself. For example using inline styling
2792
+ return (index.h("div", { class: sheet.classes.Container, part: "sqm-base" },
2793
+ index.h("style", { type: "text/css" },
2794
+ vanillaStyle,
2795
+ styleString),
2796
+ states.columns == 2 ? (index.h("div", { class: sheet.classes.TwoColumnContainer, part: "sqm-two-col-container" },
2797
+ index.h("div", { part: "sqm-two-col-primary-col", class: `${sheet.classes.ColumnWrapper} ${sheet.classes.ColumnPadding}` }, content.primaryColumn),
2798
+ index.h("div", { part: "sqm-two-col-secondary-col", class: `${sheet.classes.ColumnWrapper} ${sheet.classes.ColumnPadding}` }, content.secondaryColumn))) : (index.h("div", { part: "sqm-single-col", class: `${sheet.classes.SingleColumnContainer} ${sheet.classes.ColumnPadding}` }, content.primaryColumn))));
2612
2799
  }
2613
2800
 
2614
- const style$7 = {
2801
+ function ReferralIframeView(props) {
2802
+ const { states, data } = props;
2803
+ const { content } = states;
2804
+ // dependent on props
2805
+ const style = {
2806
+ Container: {
2807
+ position: "relative",
2808
+ width: content.iframeWidth,
2809
+ height: content.iframeHeight,
2810
+ },
2811
+ IFrame: {
2812
+ position: "absolute",
2813
+ width: "100%",
2814
+ height: "100%",
2815
+ border: "0",
2816
+ top: "0",
2817
+ left: "0",
2818
+ right: "0",
2819
+ },
2820
+ };
2821
+ // JSS config
2822
+ const sheet = JSS.createStyleSheet(style);
2823
+ const styleString = sheet.toString();
2824
+ return (index.h("div", { class: sheet.classes.Container },
2825
+ index.h("style", { type: "text/css" }, styleString),
2826
+ index.h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?rsCode=${data.shareCode}` })));
2827
+ }
2828
+
2829
+ const style$5 = {
2615
2830
  ErrorStyle: mixins.ErrorStyles,
2616
2831
  FieldsContainer: {
2617
2832
  "& sl-input": {
@@ -2619,7 +2834,7 @@ const style$7 = {
2619
2834
  },
2620
2835
  },
2621
2836
  };
2622
- const vanillaStyle$4 = `
2837
+ const vanillaStyle$3 = `
2623
2838
  :host {
2624
2839
  margin: 0 auto;
2625
2840
  width: 100%;
@@ -2636,7 +2851,7 @@ const vanillaStyle$4 = `
2636
2851
  background-color: var(--sqm-input-background, #fff);
2637
2852
  border-radius: var(--sqm-input-border-radius, var(--sl-input-border-radius-large), 0.25rem);
2638
2853
  color: var(--sqm-input-color, white);
2639
- border-width: var(--sqm-border-thickness, 1px);
2854
+ border-width: var(--sqm-border-width, 1px);
2640
2855
  }
2641
2856
 
2642
2857
  sl-input::part(base):focus,
@@ -2656,21 +2871,21 @@ sl-input {
2656
2871
  }
2657
2872
 
2658
2873
  `;
2659
- const sheet$7 = JSS.createStyleSheet(style$7);
2660
- const styleString$7 = sheet$7.toString();
2874
+ const sheet$5 = JSS.createStyleSheet(style$5);
2875
+ const styleString$5 = sheet$5.toString();
2661
2876
  function NameFieldsView(props) {
2662
2877
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
2663
2878
  const { states } = props;
2664
2879
  const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
2665
- return (index.h("div", { class: sheet$7.classes.FieldsContainer },
2880
+ return (index.h("div", { class: sheet$5.classes.FieldsContainer },
2666
2881
  index.h("style", { type: "text/css" },
2667
- vanillaStyle$4,
2668
- styleString$7),
2882
+ vanillaStyle$3,
2883
+ styleString$5),
2669
2884
  index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: "/firstName", type: "text", label: states.content.firstNameLabel, required: true, disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e.firstName) ? {
2670
2885
  value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g.firstName,
2671
2886
  }
2672
2887
  : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) ? {
2673
- class: sheet$7.classes.ErrorStyle,
2888
+ class: sheet$5.classes.ErrorStyle,
2674
2889
  helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) || "Cannot be empty",
2675
2890
  }
2676
2891
  : []))),
@@ -2678,206 +2893,98 @@ function NameFieldsView(props) {
2678
2893
  value: (_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.initialData) === null || _o === void 0 ? void 0 : _o.lastName,
2679
2894
  }
2680
2895
  : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) ? {
2681
- class: sheet$7.classes.ErrorStyle,
2896
+ class: sheet$5.classes.ErrorStyle,
2682
2897
  helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) || "Cannot be empty",
2683
2898
  }
2684
2899
  : [])))));
2685
2900
  }
2686
2901
 
2687
- function ChangeMarktingView(props) {
2688
- const { states, callbacks } = props;
2689
- const { text, formState } = states;
2690
- const { error } = formState;
2691
- const style = {
2692
- Container: {
2693
- display: "flex",
2694
- flexDirection: "column",
2695
- gap: "var(--sl-spacing-x-small)",
2696
- padding: "0 var(--sl-spacing-xxx-large) var(--sl-spacing-xxx-large)",
2697
- },
2698
- SubmitButton: { marginBottom: "var(--sl-spacing-medium)" },
2699
- Error: {
2700
- "&::part(erroralert-base)": {
2701
- "margin-bottom": "15px",
2702
- },
2703
- },
2704
- Success: {
2705
- "&::part(successalert-base)": {
2706
- "margin-bottom": "15px",
2707
- },
2708
- },
2709
- };
2710
- const sheet = JSS.createStyleSheet(style);
2711
- const styleString = sheet.toString();
2712
- return (index.h("div", { class: sheet.classes.Container, part: "sqm-base" },
2713
- index.h("style", { type: "text/css" }, styleString),
2714
- index.h(sqmTextSpanView.TextSpanView, Object.assign({}, { type: "h2" }), text.emailPreferencesHeader),
2715
- index.h("sl-form", { "onSl-submit": callbacks.onSubmit },
2716
- index.h(CheckboxFieldView, { states: {
2717
- checked: states.formState.marketingEmailOptIn,
2718
- }, content: {
2719
- checkboxLabel: text.marketingCheckboxLabel,
2720
- checkboxName: "marketingEmailOptIn",
2721
- }, callbacks: {
2722
- setChecked: callbacks.setChecked,
2723
- } }),
2724
- index.h("sl-button", { class: sheet.classes.SubmitButton, type: "primary", submit: true, loading: states.loading, disabled: states.submitDisabled }, text.submitChangeButtonText),
2725
- error && (index.h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
2726
- index.h("div", { part: "erroralert-text" }, error))),
2727
- states.success && (index.h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
2728
- index.h("div", { part: "successalert-text" }, states.text.successMessage))))));
2902
+ const style$6 = {
2903
+ ErrorStyle: {
2904
+ "--sl-input-border-color": "var(--sl-color-danger-500)",
2905
+ "--sl-input-background-color": "var(--sl-color-danger-10)",
2906
+ "--sl-input-border-color-focus": "var(--sl-color-danger-500)",
2907
+ "--sl-input-border-color-hover": "var(--sl-color-danger-500)",
2908
+ },
2909
+ ErrorMessageStyle: {
2910
+ margin: 0,
2911
+ color: "var(--sl-color-danger-500)",
2912
+ fontSize: "var(--sl-input-help-text-font-size-medium)",
2913
+ },
2914
+ FieldContainer: {
2915
+ "margin-bottom": "var(--sl-spacing-large)",
2916
+ },
2917
+ };
2918
+ const vanillaStyle$4 = `
2919
+ :host {
2920
+ margin: 0 auto;
2921
+ width: 100%;
2922
+ display: block;
2923
+ }
2924
+ sl-select::part(label){
2925
+ font-size: var(--sl-input-label-font-size-small);
2926
+ font-weight: var(--sl-font-weight-semibold);
2729
2927
  }
2730
-
2731
- const vanillaStyle$5 = `
2732
- :host{
2733
- margin: 0 auto;
2734
- width: 100%;
2735
- }
2736
- a{
2737
- cursor:pointer;
2738
- color: var(--sqm-text-subdued);
2739
- text-decoration: none ;
2740
- }
2741
2928
  `;
2742
- function PortalFooterView(props) {
2743
- const style = {
2744
- RowContainer: {
2745
- display: "flex",
2746
- "& > :not(:last-child)": {
2747
- "margin-right": "var(--sl-spacing-large)",
2748
- },
2749
- },
2750
- Container: {
2751
- display: "flex",
2752
- "flex-direction": "column",
2753
- "align-items": "center",
2754
- "font-size": "var(--sl-font-size-small)",
2755
- color: "var(--sqm-text-subdued)",
2756
- "padding-top": `var(--sl-spacing-${props.paddingTop})`,
2757
- "padding-right": `var(--sl-spacing-${props.paddingRight})`,
2758
- "padding-bottom": `var(--sl-spacing-${props.paddingBottom})`,
2759
- "padding-left": `var(--sl-spacing-${props.paddingLeft})`,
2760
- "row-gap": `var(--sl-spacing-small)`,
2761
- "& a:hover": {
2762
- color: "var(--sqm-text)",
2763
- },
2764
- },
2765
- SupportText: {
2766
- textAlign: "center",
2767
- margin: 0,
2768
- },
2769
- PoweredByLink: {
2770
- color: "var(--sqm-text-subdued)",
2771
- "font-size": "var(--sl-font-size-small)",
2772
- display: "flex",
2773
- alignItems: "center",
2774
- svg: {
2775
- marginTop: "2px",
2776
- shapeRendering: "geometricprecision",
2777
- },
2778
- "&:hover, &:hover *": {
2779
- color: "var(--sqm-text)",
2780
- },
2781
- },
2782
- };
2783
- const sheet = JSS.createStyleSheet(style);
2784
- const styleString = sheet.toString();
2785
- return (index.h("div", { class: sheet.classes.Container, part: "sqm-base" },
2929
+ JSS.jss.setup(JSS.create());
2930
+ const sheet$6 = JSS.jss.createStyleSheet(style$6);
2931
+ const styleString$6 = sheet$6.toString();
2932
+ function DropdownFieldView(props) {
2933
+ var _a, _b, _c, _d, _e, _f, _g;
2934
+ const { states, content } = props;
2935
+ const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
2936
+ return (index.h("div", { class: sheet$6.classes.FieldContainer, part: "sqm-base" },
2786
2937
  index.h("style", { type: "text/css" },
2787
- vanillaStyle$5,
2788
- styleString),
2789
- index.h("div", { class: sheet.classes.RowContainer },
2790
- props.faqLink && (index.h("a", { target: "_blank", href: props.faqLink }, props.faqText)),
2791
- props.termsLink && (index.h("a", { target: "_blank", href: props.termsLink }, props.termsText))),
2792
- !props.hideSupportText && (index.h("p", { class: sheet.classes.SupportText }, global.intl.formatMessage({
2793
- id: "supportFooter",
2794
- defaultMessage: props.supportText,
2795
- }, {
2796
- email: (index.h("a", { target: "_blank", href: `mailto:${props.supportEmail}` }, props.supportEmail)),
2797
- }))),
2798
- !props.hidePoweredBy && (index.h("a", { class: sheet.classes.PoweredByLink, target: "_blank", href: props.poweredByLink },
2799
- "Powered by ",
2800
- index.h(PoweredByImg, { color: "currentColor" })))));
2801
- }
2802
-
2803
- function PortalFrameView(props, children) {
2804
- const { data, notFullScreen, border } = props;
2805
- const style = {
2806
- HostBlock: mixins.HostBlock,
2807
- Frame: {
2808
- display: "flex",
2809
- "flex-direction": "column",
2810
- "box-sizing": "border-box",
2811
- "&:nth-child(2)": {
2812
- background: props.backgroundColor,
2813
- },
2814
- },
2815
- FooterWrapper: {
2816
- width: "100%",
2817
- "max-width": "100%",
2818
- padding: "var(--sl-spacing-medium) var(--sl-spacing-x-large)",
2819
- background: props.headerAndFooterBackgroundColor,
2820
- display: "flex",
2821
- "justify-content": "flex-end",
2822
- "align-items": "center",
2823
- "box-sizing": "border-box",
2824
- borderTop: border,
2825
- "margin-top": "auto",
2826
- },
2827
- HeaderWrapper: {
2828
- width: "100%",
2829
- "max-width": "100%",
2830
- "box-sizing": "border-box",
2831
- display: "flex",
2832
- "justify-content": "space-between",
2833
- padding: "var(--sl-spacing-small) var(--sl-spacing-large)",
2834
- "align-items": "center",
2835
- borderBottom: border,
2836
- background: props.headerAndFooterBackgroundColor,
2837
- "@media screen and (max-width: 499px)": {
2838
- "flex-direction": "row-reverse",
2839
- "justify-content": "flex-end",
2840
- padding: "0",
2841
- },
2842
- },
2843
- };
2844
- const sheet = JSS.createStyleSheet(style);
2845
- const styleString = sheet.toString();
2846
- return (index.h("div", { style: { minHeight: notFullScreen ? "100%" : "100vh" }, class: sheet.classes.Frame, part: "sqm-base" },
2847
- index.h("style", { type: "text/css" }, styleString),
2848
- index.h("div", { class: sheet.classes.HeaderWrapper, part: "sqm-header" },
2849
- data.header,
2850
- index.h("slot", { name: "sqm-navigation-menu" })),
2851
- children,
2852
- index.h("div", { class: sheet.classes.FooterWrapper, part: "sqm-footer" }, data.footer)));
2938
+ vanillaStyle$4,
2939
+ styleString$6),
2940
+ index.h("sl-select", Object.assign({ exportparts: "label: input-label, base: input-base", label: content.dropdownLabel, name: `/${content.dropdownName}` }, (!content.dropdownOptional ? { required: true } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e[content.dropdownName]) ? {
2941
+ value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.dropdownName],
2942
+ }
2943
+ : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) ? {
2944
+ class: sheet$6.classes.ErrorStyle,
2945
+ }
2946
+ : [])), content.selectOptions),
2947
+ (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) && (index.h("p", { class: sheet$6.classes.ErrorMessageStyle }, global.intl.formatMessage({
2948
+ id: `errorMessage-${content.dropdownName}`,
2949
+ defaultMessage: content.errorMessage,
2950
+ })))));
2853
2951
  }
2854
2952
 
2855
- function ReferralIframeView(props) {
2856
- const { states, data } = props;
2857
- const { content } = states;
2858
- // dependent on props
2859
- const style = {
2860
- Container: {
2861
- position: "relative",
2862
- width: content.iframeWidth,
2863
- height: content.iframeHeight,
2864
- },
2865
- IFrame: {
2866
- position: "absolute",
2867
- width: "100%",
2868
- height: "100%",
2869
- border: "0",
2870
- top: "0",
2871
- left: "0",
2872
- right: "0",
2873
- },
2874
- };
2875
- // JSS config
2876
- const sheet = JSS.createStyleSheet(style);
2877
- const styleString = sheet.toString();
2878
- return (index.h("div", { class: sheet.classes.Container },
2879
- index.h("style", { type: "text/css" }, styleString),
2880
- index.h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?rsCode=${data.shareCode}` })));
2953
+ const style$7 = {
2954
+ ErrorStyle: mixins.ErrorStyles,
2955
+ FieldContainer: {
2956
+ "margin-bottom": "var(--sl-spacing-large)",
2957
+ },
2958
+ };
2959
+ const vanillaStyle$5 = `
2960
+ :host {
2961
+ margin: 0 auto;
2962
+ width: 100%;
2963
+ display: block;
2964
+ }
2965
+ `;
2966
+ JSS.jss.setup(JSS.create());
2967
+ const sheet$7 = JSS.jss.createStyleSheet(style$7);
2968
+ const styleString$7 = sheet$7.toString();
2969
+ function InputFieldView(props) {
2970
+ var _a, _b, _c, _d, _e, _f, _g;
2971
+ const { states, content } = props;
2972
+ const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
2973
+ return (index.h("div", { class: sheet$7.classes.FieldContainer, part: "sqm-base" },
2974
+ index.h("style", { type: "text/css" },
2975
+ vanillaStyle$5,
2976
+ styleString$7),
2977
+ index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.fieldName}`, type: content.fieldType, label: content.fieldLabel }, (!content.fieldOptional ? { required: true } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e[content.fieldName]) ? {
2978
+ value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.fieldName],
2979
+ }
2980
+ : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]) ? {
2981
+ class: sheet$7.classes.ErrorStyle,
2982
+ helpText: global.intl.formatMessage({
2983
+ id: `errorMessage-${content.fieldName}`,
2984
+ defaultMessage: content.errorMessage || (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]),
2985
+ }),
2986
+ }
2987
+ : [])))));
2881
2988
  }
2882
2989
 
2883
2990
  const CheckMark = () => (index.h("svg", { width: 12, height: 10, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
@@ -3954,164 +4061,57 @@ const empty = {
3954
4061
  ...baseResponse(null, "chooseReward", null, null, false, false, null, true),
3955
4062
  };
3956
4063
 
3957
- const MessageLinkQuery = index_module.dist.gql `
3958
- query (
3959
- $programId: ID
3960
- $engagementMedium: UserEngagementMedium!
3961
- $shareMedium: ReferralShareMedium!
3962
- ) {
3963
- viewer {
3964
- ... on User {
3965
- messageLink(
3966
- programId: $programId
3967
- engagementMedium: $engagementMedium
3968
- shareMedium: $shareMedium
3969
- )
3970
- shareLink(programId: $programId, engagementMedium: $engagementMedium)
3971
- }
3972
- }
3973
- }
3974
- `;
3975
- function NativeShare(props, directLink, undefinedErrorText, unsupportedPlatformText) {
3976
- const title = props.sharetitle || "Share title";
3977
- const text = props.sharetext || "Share text";
3978
- if (directLink === "undefined") {
3979
- return alert(undefinedErrorText);
3980
- }
3981
- if (window.navigator.share) {
3982
- window.navigator
3983
- .share({
3984
- title,
3985
- text,
3986
- url: directLink,
3987
- })
3988
- .catch((error) => console.error("Error on web share", error));
3989
- }
3990
- else {
3991
- alert(unsupportedPlatformText);
3992
- }
3993
- }
3994
- function FacebookShare(directLink, messageLink, errorText) {
3995
- if (messageLink === "undefined" || directLink === "undefined") {
3996
- return alert(errorText);
3997
- }
3998
- if (typeof SquatchAndroid.shareOnFacebook !== "undefined") {
3999
- return SquatchAndroid.shareOnFacebook(directLink, messageLink);
4000
- }
4001
- else {
4002
- return GenericShare(messageLink, errorText);
4003
- }
4004
- }
4005
- function GenericShare(messageLink, errorText) {
4006
- return messageLink ? (window.location.href = messageLink) : alert(errorText);
4007
- }
4008
- function useShareButton(props) {
4009
- var _a, _b, _c, _d;
4010
- const { sharetitle, sharetext, medium } = props;
4011
- const programId = props.programId ? props.programId : index_module.H();
4012
- const user = index_module.J();
4013
- const engagementMedium = index_module.B();
4014
- const variables = {
4015
- engagementMedium,
4016
- programId: programId,
4017
- shareMedium: medium.toUpperCase(),
4064
+ function CardFeedView(props, children) {
4065
+ // Dependent on props, not feasiable to move out
4066
+ const style = {
4067
+ Container: {
4068
+ columnGap: props.gap + "px",
4069
+ columnWidth: props.width + "px",
4070
+ "& > div": {
4071
+ marginBottom: "24px",
4072
+ },
4073
+ },
4018
4074
  };
4019
- const contextData = index_module.Fn(useReferralCodes.REFERRAL_CODES_NAMESPACE);
4020
- const overrideData = contextData === null || contextData === void 0 ? void 0 : contextData[medium];
4021
- // only queries if a programId is available
4022
- const res = index_module.wn(MessageLinkQuery, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId || overrideData !== undefined);
4023
- const [setCopied, copiedRes] = index_module.$e(useReferralCodes.SET_CODE_COPIED);
4024
- const directLink = (overrideData === null || overrideData === void 0 ? void 0 : overrideData.shareLink) || ((_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);
4025
- const environment = index_module.getEnvironmentSDK();
4026
- const hide = (medium.toLocaleUpperCase() === "SMS" &&
4027
- window.orientation === undefined) ||
4028
- (medium.toLocaleUpperCase() === "DIRECT" && !window.navigator.share);
4029
- const messageLink = (overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink) || ((_d = (_c = res.data) === null || _c === void 0 ? void 0 : _c.viewer) === null || _d === void 0 ? void 0 : _d.messageLink);
4030
- async function onClick() {
4031
- if (overrideData) {
4032
- await setCopied({ referralCode: contextData.referralCode });
4033
- contextData.refresh();
4034
- }
4035
- if (medium.toLocaleUpperCase() === "FACEBOOK" &&
4036
- environment.type === "SquatchAndroid") {
4037
- FacebookShare(directLink, messageLink, props.errorText);
4038
- }
4039
- else if (medium.toLocaleUpperCase() === "DIRECT") {
4040
- NativeShare({ sharetitle, sharetext }, directLink, props.errorText, props.unsupportedPlatformText);
4075
+ const sheet = JSS.createStyleSheet(style);
4076
+ const styleString = sheet.toString();
4077
+ const vanillaStyle = `
4078
+ :host{
4079
+ display: block;
4041
4080
  }
4042
- }
4043
- const isPlainLink = !(medium.toLocaleUpperCase() === "FACEBOOK" &&
4044
- environment.type === "SquatchAndroid") &&
4045
- medium.toLocaleUpperCase() !== "DIRECT" &&
4046
- messageLink;
4047
- const userAgent = window.navigator.userAgent.toLowerCase(), safari = /safari/.test(userAgent), ios = /iphone|ipod|ipad/.test(userAgent);
4048
- const openInSameTab = ios && !safari;
4049
- return {
4050
- ...props,
4051
- loading: res.loading && !(overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink),
4052
- messageLink,
4053
- isPlainLink,
4054
- onClick,
4055
- openInSameTab,
4056
- hide,
4057
- };
4081
+
4082
+ `;
4083
+ return (index.h("div", null,
4084
+ index.h("style", { type: "text/css" },
4085
+ styleString,
4086
+ vanillaStyle),
4087
+ index.h("div", { class: sheet.classes.Container, part: "sqm-base" }, children)));
4058
4088
  }
4059
4089
 
4060
- const MessageLinkQuery$1 = index_module.dist.gql `
4061
- query ($programId: ID, $engagementMedium: UserEngagementMedium!) {
4062
- user: viewer {
4063
- ... on User {
4064
- shareLink(
4065
- programId: $programId
4066
- engagementMedium: $engagementMedium
4067
- shareMedium: DIRECT
4068
- )
4069
- }
4070
- }
4071
- }
4072
- `;
4073
- const WIDGET_ENGAGEMENT_EVENT = index_module.dist.gql `
4074
- mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
4075
- createUserAnalyticsEvent(eventMeta: $eventMeta)
4090
+ function CouponCodeView(props) {
4091
+ const error = !props.loading && props.error;
4092
+ const style = {
4093
+ HostBlock: mixins.HostBlock,
4094
+ couponCodeLabel: {
4095
+ margin: "var(--sl-spacing-x-small) 0",
4096
+ color: props.textColor || "var(--sqm-text-subdued)",
4097
+ fontSize: "var(--sl-font-size-small)",
4098
+ },
4099
+ };
4100
+ const vanillaStyle = `
4101
+ :host{
4102
+ display: block;
4103
+ width: 100%;
4076
4104
  }
4077
4105
  `;
4078
- function useShareLink(props) {
4079
- var _a, _b;
4080
- const { programId = index_module.H() } = props;
4081
- const user = index_module.J();
4082
- const engagementMedium = index_module.B();
4083
- const contextData = index_module.Fn(useReferralCodes.REFERRAL_CODES_NAMESPACE);
4084
- const { data } = index_module.wn(MessageLinkQuery$1, { programId, engagementMedium }, !(user === null || user === void 0 ? void 0 : user.jwt) || !!props.linkOverride || (contextData === null || contextData === void 0 ? void 0 : contextData.shareLink) !== undefined);
4085
- const [sendLoadEvent] = index_module.$e(WIDGET_ENGAGEMENT_EVENT);
4086
- const [setCopied, copiedRes] = index_module.$e(useReferralCodes.SET_CODE_COPIED);
4087
- const copyString = (_b = ((contextData === null || contextData === void 0 ? void 0 : contextData.shareLink) || ((_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.shareLink))) !== null && _b !== void 0 ? _b :
4088
- // Shown during loading
4089
- "...";
4090
- const [open, setOpen] = stencilHooks_module.useState(false);
4091
- async function onClick() {
4092
- if (contextData) {
4093
- await setCopied({ referralCode: contextData.referralCode });
4094
- contextData.refresh();
4095
- }
4096
- // Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
4097
- // Only if called from a user-initiated event
4098
- navigator.clipboard.writeText(copyString);
4099
- setOpen(true);
4100
- setTimeout(() => setOpen(false), props.tooltiplifespan);
4101
- sendLoadEvent({
4102
- eventMeta: {
4103
- programId,
4104
- id: user === null || user === void 0 ? void 0 : user.id,
4105
- accountId: user === null || user === void 0 ? void 0 : user.accountId,
4106
- type: "USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",
4107
- meta: {
4108
- engagementMedium,
4109
- shareMedium: "DIRECT",
4110
- },
4111
- },
4112
- });
4113
- }
4114
- return { ...props, onClick, open, copyString: copyString };
4106
+ const sheet = JSS.createStyleSheet(style);
4107
+ const styleString = sheet.toString();
4108
+ return (index.h("div", null,
4109
+ index.h("style", { type: "text/css" },
4110
+ styleString,
4111
+ vanillaStyle),
4112
+ index.h("p", { class: sheet.classes.couponCodeLabel, style: { textAlign: props.textAlign } }, props.couponCodeLabel),
4113
+ error ? (index.h("sqm-form-message", { type: props.errorType, exportparts: "erroralert-icon" },
4114
+ index.h("div", { part: "erroralert-text" }, props.errorText))) : (index.h(copyTextView.CopyTextView, Object.assign({}, props)))));
4115
4115
  }
4116
4116
 
4117
4117
  const map = new Map();