@saasquatch/mint-components 1.15.0-40 → 1.15.0-42

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 (524) hide show
  1. package/dist/cjs/{ErrorView-b2fcf954.js → ErrorView-5504c2b6.js} +1 -1
  2. package/dist/cjs/{GenericTableView-a9d0b798.js → GenericTableView-107ade89.js} +1 -1
  3. package/dist/cjs/{ShadowViewAddon-fcd0c52f.js → ShadowViewAddon-42af4b57.js} +17 -69
  4. package/dist/cjs/{copy-text-view-ee147291.js → copy-text-view-af017955.js} +1 -1
  5. package/dist/cjs/{email-registration-view-37b44222.js → email-registration-view-996fb438.js} +2 -2
  6. package/dist/cjs/{global-a38a094f.js → global-b34bf5f2.js} +99 -105
  7. package/dist/cjs/{index-a29c60ef.js → index-a43a63b4.js} +4 -0
  8. package/dist/cjs/{index.module-ee84433d.js → index.module-39955732.js} +1 -1
  9. package/dist/cjs/loader.cjs.js +5 -5
  10. package/dist/cjs/{luxon-2926d85f.js → luxon-3b809948.js} +1 -1
  11. package/dist/cjs/mint-components.cjs.js +5 -5
  12. package/dist/cjs/{mockRewardData-272e22d6.js → mockRewardData-6e4a90f9.js} +1 -1
  13. package/dist/cjs/raisins-plop-target.cjs.entry.js +1 -1
  14. package/dist/cjs/{re-render-b324deab.js → re-render-28fed959.js} +2 -2
  15. package/dist/cjs/sqm-banking-info-form_17.cjs.entry.js +19 -17
  16. package/dist/cjs/{sqm-base-registration-form-view-1c5094d3.js → sqm-base-registration-form-view-8847804c.js} +2 -2
  17. package/dist/cjs/{sqm-big-stat_41.cjs.entry.js → sqm-big-stat_42.cjs.entry.js} +598 -33
  18. package/dist/cjs/{sqm-close-button-view-b297e933.js → sqm-close-button-view-5e85ac51.js} +1 -1
  19. package/dist/cjs/sqm-close-button.cjs.entry.js +4 -4
  20. package/dist/cjs/sqm-context-router.cjs.entry.js +3 -3
  21. package/dist/cjs/sqm-email-verification.cjs.entry.js +6 -6
  22. package/dist/cjs/sqm-empty_4.cjs.entry.js +5 -5
  23. package/dist/cjs/sqm-form-message.cjs.entry.js +2 -2
  24. package/dist/cjs/sqm-google-sign-in.cjs.entry.js +3 -3
  25. package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +3 -3
  26. package/dist/cjs/sqm-header-logo.cjs.entry.js +2 -2
  27. package/dist/cjs/sqm-instant-access-registration.cjs.entry.js +7 -7
  28. package/dist/cjs/{sqm-invoice-table-view-19ca10fa.js → sqm-invoice-table-view-deaf0385.js} +3 -3
  29. package/dist/cjs/{sqm-leaderboard-rank-view-7c6cebe3.js → sqm-leaderboard-rank-view-6a1e63de.js} +1 -1
  30. package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +5 -5
  31. package/dist/cjs/{sqm-logout-current-user-view-11d57c12.js → sqm-logout-current-user-view-b61c8bdf.js} +1 -1
  32. package/dist/cjs/sqm-logout-current-user.cjs.entry.js +4 -4
  33. package/dist/cjs/{sqm-navigation-sidebar-item-view-10b62df1.js → sqm-navigation-sidebar-item-view-06eb9721.js} +2 -2
  34. package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +4 -4
  35. package/dist/cjs/{sqm-navigation-sidebar-view-38a5227a.js → sqm-navigation-sidebar-view-50ee8796.js} +1 -1
  36. package/dist/cjs/sqm-navigation-sidebar.cjs.entry.js +4 -4
  37. package/dist/cjs/sqm-pagination_3.cjs.entry.js +6 -6
  38. package/dist/cjs/sqm-password-field.cjs.entry.js +4 -4
  39. package/dist/cjs/sqm-popup-container.cjs.entry.js +3 -3
  40. package/dist/cjs/{sqm-portal-container-view-4f15143a.js → sqm-portal-container-view-70eaf785.js} +1 -1
  41. package/dist/cjs/{sqm-portal-email-verification-view-26c893d3.js → sqm-portal-email-verification-view-4100f28c.js} +3 -3
  42. package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +6 -6
  43. package/dist/cjs/{sqm-portal-forgot-password-view-fdd97c18.js → sqm-portal-forgot-password-view-ba34601e.js} +3 -3
  44. package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +5 -5
  45. package/dist/cjs/sqm-portal-google-login.cjs.entry.js +6 -7
  46. package/dist/cjs/sqm-portal-google-registration-form.cjs.entry.js +8 -8
  47. package/dist/cjs/sqm-portal-logout.cjs.entry.js +3 -3
  48. package/dist/cjs/{sqm-portal-profile-view-674a7543.js → sqm-portal-profile-view-1fc7fb29.js} +3 -3
  49. package/dist/cjs/sqm-portal-profile.cjs.entry.js +7 -7
  50. package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +3 -3
  51. package/dist/cjs/{sqm-portal-registration-form-view-399f4eaf.js → sqm-portal-registration-form-view-5a96c2f5.js} +2 -2
  52. package/dist/cjs/sqm-portal-registration-form.cjs.entry.js +7 -7
  53. package/dist/cjs/{sqm-portal-reset-password-view-0439a9e5.js → sqm-portal-reset-password-view-25eb2099.js} +2 -2
  54. package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +5 -5
  55. package/dist/cjs/{sqm-portal-verify-email-view-05f72dec.js → sqm-portal-verify-email-view-1c4e781f.js} +2 -2
  56. package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +5 -5
  57. package/dist/cjs/{sqm-qr-code-view-7ee9fa56.js → sqm-qr-code-view-b18b42a8.js} +2 -2
  58. package/dist/cjs/sqm-qr-code.cjs.entry.js +6 -6
  59. package/dist/cjs/sqm-referral-table_11.cjs.entry.js +19 -19
  60. package/dist/cjs/sqm-referred-registration.cjs.entry.js +6 -6
  61. package/dist/cjs/sqm-rewards-table-customer-note-cell.cjs.entry.js +3 -3
  62. package/dist/cjs/sqm-rewards-table-customer-note-column.cjs.entry.js +4 -4
  63. package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +14 -14
  64. package/dist/cjs/sqm-route.cjs.entry.js +1 -1
  65. package/dist/cjs/sqm-scroll.cjs.entry.js +2 -2
  66. package/dist/cjs/sqm-stencilbook.cjs.entry.js +73 -205
  67. package/dist/cjs/sqm-tab.cjs.entry.js +4 -4
  68. package/dist/cjs/sqm-tabs.cjs.entry.js +5 -5
  69. package/dist/cjs/{sqm-text-span-view-ce4c0178.js → sqm-text-span-view-7a61ae4c.js} +1 -1
  70. package/dist/cjs/sqm-text-span.cjs.entry.js +3 -3
  71. package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +3 -3
  72. package/dist/cjs/sqm-widget-verification.cjs.entry.js +3 -3
  73. package/dist/cjs/{stencil-hooks.module-3a336b0f.js → stencil-hooks.module-62264802.js} +1 -1
  74. package/dist/cjs/{useChildElements-1b35d945.js → useChildElements-e5fa605c.js} +2 -2
  75. package/dist/cjs/{useInstantAccessRegistration-0537e28e.js → useInstantAccessRegistration-86b7164c.js} +3 -3
  76. package/dist/cjs/{usePayoutStatus-4b5894ef.js → usePayoutStatus-f26f0467.js} +2 -2
  77. package/dist/cjs/{usePortalLogin-63d896d1.js → usePortalLogin-bd975a79.js} +57 -2
  78. package/dist/cjs/{usePortalRegistrationForm-f25d89e7.js → usePortalRegistrationForm-d28621de.js} +3 -3
  79. package/dist/cjs/{useReferralCodes-82e8797b.js → useReferralCodes-a47dcbc2.js} +2 -2
  80. package/dist/cjs/{useReferralTable-7c3f9600.js → useReferralTable-19e7523a.js} +5 -5
  81. package/dist/cjs/{useRegistrationFormState-7b820f0c.js → useRegistrationFormState-5f44ca80.js} +2 -2
  82. package/dist/cjs/{useVerificationEmail-95a82767.js → useVerificationEmail-1496b993.js} +2 -2
  83. package/dist/cjs/{utilities-78f5e169.js → utilities-be3ce1f8.js} +2 -2
  84. package/dist/collection/collection-manifest.json +1 -1
  85. package/dist/collection/components/sqm-edit-profile/sqm-edit-profile-view.js +1 -1
  86. package/dist/collection/components/sqm-instant-access-registration/sqm-instant-access-registration.js +2 -2
  87. package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +1 -1
  88. package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password-view.js +2 -2
  89. package/dist/collection/components/sqm-portal-login/PortalLogin.stories.js +9 -6
  90. package/dist/collection/components/sqm-portal-login/sqm-portal-login.js +1 -1
  91. package/dist/collection/components/sqm-portal-register/sqm-portal-register.js +1 -2
  92. package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js +3 -3
  93. package/dist/collection/components/sqm-referral-card/sqm-referral-card-view.js +3 -3
  94. package/dist/collection/components/sqm-referral-card/sqm-referral-card.js +2 -9
  95. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +4 -4
  96. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-status-cell.js +4 -4
  97. package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +1 -1
  98. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.js +4 -4
  99. package/dist/collection/components/sqm-stencilbook/BrandSelector.js +196 -0
  100. package/dist/collection/components/sqm-stencilbook/Themes.js +311 -32
  101. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +2 -20
  102. package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +1 -1
  103. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +5 -3
  104. package/dist/collection/components/views/email-registration-view.js +1 -1
  105. package/dist/collection/global/styles.js +97 -103
  106. package/dist/collection/global/styles.ts +200 -106
  107. package/dist/esm/{ErrorView-48e2b969.js → ErrorView-eaafd6f5.js} +1 -1
  108. package/dist/esm/{GenericTableView-3b6f9ccc.js → GenericTableView-dd9be3ea.js} +1 -1
  109. package/dist/esm/{ShadowViewAddon-5f9b6d07.js → ShadowViewAddon-173ce794.js} +18 -69
  110. package/dist/esm/{copy-text-view-4a207b17.js → copy-text-view-38c7c3d5.js} +1 -1
  111. package/dist/esm/{email-registration-view-b1c858ee.js → email-registration-view-db81655f.js} +2 -2
  112. package/dist/esm/{global-66746c30.js → global-16971a34.js} +99 -105
  113. package/dist/esm/{index-91e7729f.js → index-b3a06de8.js} +4 -0
  114. package/dist/esm/{index.module-89a79f66.js → index.module-d49ae5e7.js} +1 -1
  115. package/dist/esm/loader.js +5 -5
  116. package/dist/esm/{luxon-8d51c92b.js → luxon-793b7f13.js} +1 -1
  117. package/dist/esm/mint-components.js +5 -5
  118. package/dist/esm/{mockRewardData-8bd1b356.js → mockRewardData-bdc54f2e.js} +1 -1
  119. package/dist/esm/raisins-plop-target.entry.js +1 -1
  120. package/dist/esm/{re-render-cc945f38.js → re-render-789f9123.js} +2 -2
  121. package/dist/esm/sqm-banking-info-form_17.entry.js +19 -17
  122. package/dist/esm/{sqm-base-registration-form-view-d732a5df.js → sqm-base-registration-form-view-193f1721.js} +2 -2
  123. package/dist/esm/{sqm-big-stat_41.entry.js → sqm-big-stat_42.entry.js} +600 -36
  124. package/dist/esm/{sqm-close-button-view-bc2bc10e.js → sqm-close-button-view-2fa57229.js} +1 -1
  125. package/dist/esm/sqm-close-button.entry.js +4 -4
  126. package/dist/esm/sqm-context-router.entry.js +3 -3
  127. package/dist/esm/sqm-email-verification.entry.js +6 -6
  128. package/dist/esm/sqm-empty_4.entry.js +5 -5
  129. package/dist/esm/sqm-form-message.entry.js +2 -2
  130. package/dist/esm/sqm-google-sign-in.entry.js +3 -3
  131. package/dist/esm/sqm-graphql-client-provider.entry.js +3 -3
  132. package/dist/esm/sqm-header-logo.entry.js +2 -2
  133. package/dist/esm/sqm-instant-access-registration.entry.js +7 -7
  134. package/dist/esm/{sqm-invoice-table-view-b7e91eef.js → sqm-invoice-table-view-e43241aa.js} +3 -3
  135. package/dist/esm/{sqm-leaderboard-rank-view-84b3c539.js → sqm-leaderboard-rank-view-18baae5b.js} +1 -1
  136. package/dist/esm/sqm-leaderboard-rank.entry.js +5 -5
  137. package/dist/esm/{sqm-logout-current-user-view-8ef8180f.js → sqm-logout-current-user-view-f21e54e3.js} +1 -1
  138. package/dist/esm/sqm-logout-current-user.entry.js +4 -4
  139. package/dist/esm/{sqm-navigation-sidebar-item-view-6e046743.js → sqm-navigation-sidebar-item-view-48b224fa.js} +2 -2
  140. package/dist/esm/sqm-navigation-sidebar-item.entry.js +4 -4
  141. package/dist/esm/{sqm-navigation-sidebar-view-f898265a.js → sqm-navigation-sidebar-view-6c13798c.js} +1 -1
  142. package/dist/esm/sqm-navigation-sidebar.entry.js +4 -4
  143. package/dist/esm/sqm-pagination_3.entry.js +6 -6
  144. package/dist/esm/sqm-password-field.entry.js +4 -4
  145. package/dist/esm/sqm-popup-container.entry.js +3 -3
  146. package/dist/esm/{sqm-portal-container-view-1683ae32.js → sqm-portal-container-view-f0b1ccfc.js} +1 -1
  147. package/dist/esm/{sqm-portal-email-verification-view-00f03873.js → sqm-portal-email-verification-view-7ac99890.js} +3 -3
  148. package/dist/esm/sqm-portal-email-verification.entry.js +6 -6
  149. package/dist/esm/{sqm-portal-forgot-password-view-55fc0873.js → sqm-portal-forgot-password-view-2628bc62.js} +3 -3
  150. package/dist/esm/sqm-portal-forgot-password.entry.js +5 -5
  151. package/dist/esm/sqm-portal-google-login.entry.js +5 -6
  152. package/dist/esm/sqm-portal-google-registration-form.entry.js +8 -8
  153. package/dist/esm/sqm-portal-logout.entry.js +3 -3
  154. package/dist/esm/{sqm-portal-profile-view-0d45de87.js → sqm-portal-profile-view-c68753ea.js} +3 -3
  155. package/dist/esm/sqm-portal-profile.entry.js +7 -7
  156. package/dist/esm/sqm-portal-protected-route.entry.js +3 -3
  157. package/dist/esm/{sqm-portal-registration-form-view-5d651c04.js → sqm-portal-registration-form-view-8bdc3804.js} +2 -2
  158. package/dist/esm/sqm-portal-registration-form.entry.js +7 -7
  159. package/dist/esm/{sqm-portal-reset-password-view-6903828e.js → sqm-portal-reset-password-view-abef7286.js} +2 -2
  160. package/dist/esm/sqm-portal-reset-password.entry.js +5 -5
  161. package/dist/esm/{sqm-portal-verify-email-view-01ac711f.js → sqm-portal-verify-email-view-33805220.js} +2 -2
  162. package/dist/esm/sqm-portal-verify-email.entry.js +5 -5
  163. package/dist/esm/{sqm-qr-code-view-62c10948.js → sqm-qr-code-view-358607d1.js} +2 -2
  164. package/dist/esm/sqm-qr-code.entry.js +6 -6
  165. package/dist/esm/sqm-referral-table_11.entry.js +19 -19
  166. package/dist/esm/sqm-referred-registration.entry.js +6 -6
  167. package/dist/esm/sqm-rewards-table-customer-note-cell.entry.js +3 -3
  168. package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +4 -4
  169. package/dist/esm/sqm-rewards-table_9.entry.js +14 -14
  170. package/dist/esm/sqm-route.entry.js +1 -1
  171. package/dist/esm/sqm-scroll.entry.js +2 -2
  172. package/dist/esm/sqm-stencilbook.entry.js +73 -205
  173. package/dist/esm/sqm-tab.entry.js +4 -4
  174. package/dist/esm/sqm-tabs.entry.js +5 -5
  175. package/dist/esm/{sqm-text-span-view-cd3902e5.js → sqm-text-span-view-4c17b8c9.js} +1 -1
  176. package/dist/esm/sqm-text-span.entry.js +3 -3
  177. package/dist/esm/sqm-widget-verification-controller.entry.js +3 -3
  178. package/dist/esm/sqm-widget-verification.entry.js +3 -3
  179. package/dist/esm/{stencil-hooks.module-4bc38af4.js → stencil-hooks.module-20ad2b5f.js} +1 -1
  180. package/dist/esm/{useChildElements-7945ae56.js → useChildElements-0ca9a015.js} +2 -2
  181. package/dist/esm/{useInstantAccessRegistration-dc4ad9f2.js → useInstantAccessRegistration-b224f3ce.js} +3 -3
  182. package/dist/esm/{usePayoutStatus-58aa56b4.js → usePayoutStatus-3768c8c3.js} +2 -2
  183. package/dist/esm/{usePortalLogin-ef647a50.js → usePortalLogin-2b813acc.js} +57 -3
  184. package/dist/esm/{usePortalRegistrationForm-4b35a357.js → usePortalRegistrationForm-61bf948d.js} +3 -3
  185. package/dist/esm/{useReferralCodes-8f75921a.js → useReferralCodes-0b798295.js} +2 -2
  186. package/dist/esm/{useReferralTable-b3876ed6.js → useReferralTable-c1511d9d.js} +5 -5
  187. package/dist/esm/{useRegistrationFormState-d6f33135.js → useRegistrationFormState-2db047e9.js} +2 -2
  188. package/dist/esm/{useVerificationEmail-edc318cb.js → useVerificationEmail-085eda87.js} +2 -2
  189. package/dist/esm/{utilities-5b0ca040.js → utilities-6341d9fd.js} +2 -2
  190. package/dist/esm-es5/{ErrorView-48e2b969.js → ErrorView-eaafd6f5.js} +1 -1
  191. package/dist/esm-es5/{GenericTableView-3b6f9ccc.js → GenericTableView-dd9be3ea.js} +1 -1
  192. package/dist/esm-es5/ShadowViewAddon-173ce794.js +1 -0
  193. package/dist/esm-es5/{copy-text-view-4a207b17.js → copy-text-view-38c7c3d5.js} +1 -1
  194. package/dist/esm-es5/email-registration-view-db81655f.js +1 -0
  195. package/dist/esm-es5/{global-66746c30.js → global-16971a34.js} +5 -5
  196. package/dist/esm-es5/{index-91e7729f.js → index-b3a06de8.js} +1 -1
  197. package/dist/esm-es5/{index.module-89a79f66.js → index.module-d49ae5e7.js} +1 -1
  198. package/dist/esm-es5/loader.js +1 -1
  199. package/dist/esm-es5/{luxon-8d51c92b.js → luxon-793b7f13.js} +1 -1
  200. package/dist/esm-es5/mint-components.js +1 -1
  201. package/dist/esm-es5/{mockRewardData-8bd1b356.js → mockRewardData-bdc54f2e.js} +1 -1
  202. package/dist/esm-es5/raisins-plop-target.entry.js +1 -1
  203. package/dist/esm-es5/{re-render-cc945f38.js → re-render-789f9123.js} +1 -1
  204. package/dist/esm-es5/sqm-banking-info-form_17.entry.js +1 -1
  205. package/dist/esm-es5/{sqm-base-registration-form-view-d732a5df.js → sqm-base-registration-form-view-193f1721.js} +1 -1
  206. package/dist/esm-es5/sqm-big-stat_42.entry.js +1 -0
  207. package/dist/esm-es5/{sqm-close-button-view-bc2bc10e.js → sqm-close-button-view-2fa57229.js} +1 -1
  208. package/dist/esm-es5/sqm-close-button.entry.js +1 -1
  209. package/dist/esm-es5/sqm-context-router.entry.js +1 -1
  210. package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
  211. package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
  212. package/dist/esm-es5/sqm-form-message.entry.js +1 -1
  213. package/dist/esm-es5/sqm-google-sign-in.entry.js +1 -1
  214. package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
  215. package/dist/esm-es5/sqm-header-logo.entry.js +1 -1
  216. package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
  217. package/dist/esm-es5/{sqm-invoice-table-view-b7e91eef.js → sqm-invoice-table-view-e43241aa.js} +1 -1
  218. package/dist/esm-es5/{sqm-leaderboard-rank-view-84b3c539.js → sqm-leaderboard-rank-view-18baae5b.js} +1 -1
  219. package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
  220. package/dist/esm-es5/{sqm-logout-current-user-view-8ef8180f.js → sqm-logout-current-user-view-f21e54e3.js} +1 -1
  221. package/dist/esm-es5/sqm-logout-current-user.entry.js +1 -1
  222. package/dist/esm-es5/{sqm-navigation-sidebar-item-view-6e046743.js → sqm-navigation-sidebar-item-view-48b224fa.js} +1 -1
  223. package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
  224. package/dist/esm-es5/{sqm-navigation-sidebar-view-f898265a.js → sqm-navigation-sidebar-view-6c13798c.js} +1 -1
  225. package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
  226. package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
  227. package/dist/esm-es5/sqm-password-field.entry.js +1 -1
  228. package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
  229. package/dist/esm-es5/{sqm-portal-container-view-1683ae32.js → sqm-portal-container-view-f0b1ccfc.js} +1 -1
  230. package/dist/esm-es5/{sqm-portal-email-verification-view-00f03873.js → sqm-portal-email-verification-view-7ac99890.js} +1 -1
  231. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  232. package/dist/esm-es5/{sqm-portal-forgot-password-view-55fc0873.js → sqm-portal-forgot-password-view-2628bc62.js} +1 -1
  233. package/dist/esm-es5/sqm-portal-forgot-password.entry.js +1 -1
  234. package/dist/esm-es5/sqm-portal-google-login.entry.js +1 -1
  235. package/dist/esm-es5/sqm-portal-google-registration-form.entry.js +1 -1
  236. package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
  237. package/dist/esm-es5/{sqm-portal-profile-view-0d45de87.js → sqm-portal-profile-view-c68753ea.js} +1 -1
  238. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  239. package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
  240. package/dist/esm-es5/{sqm-portal-registration-form-view-5d651c04.js → sqm-portal-registration-form-view-8bdc3804.js} +1 -1
  241. package/dist/esm-es5/sqm-portal-registration-form.entry.js +1 -1
  242. package/dist/esm-es5/{sqm-portal-reset-password-view-6903828e.js → sqm-portal-reset-password-view-abef7286.js} +1 -1
  243. package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
  244. package/dist/esm-es5/{sqm-portal-verify-email-view-01ac711f.js → sqm-portal-verify-email-view-33805220.js} +1 -1
  245. package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
  246. package/dist/esm-es5/{sqm-qr-code-view-62c10948.js → sqm-qr-code-view-358607d1.js} +1 -1
  247. package/dist/esm-es5/sqm-qr-code.entry.js +1 -1
  248. package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
  249. package/dist/esm-es5/sqm-referred-registration.entry.js +1 -1
  250. package/dist/esm-es5/sqm-rewards-table-customer-note-cell.entry.js +1 -1
  251. package/dist/esm-es5/sqm-rewards-table-customer-note-column.entry.js +1 -1
  252. package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
  253. package/dist/esm-es5/sqm-route.entry.js +1 -1
  254. package/dist/esm-es5/sqm-scroll.entry.js +1 -1
  255. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  256. package/dist/esm-es5/sqm-tab.entry.js +1 -1
  257. package/dist/esm-es5/sqm-tabs.entry.js +1 -1
  258. package/dist/esm-es5/{sqm-text-span-view-cd3902e5.js → sqm-text-span-view-4c17b8c9.js} +1 -1
  259. package/dist/esm-es5/sqm-text-span.entry.js +1 -1
  260. package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
  261. package/dist/esm-es5/sqm-widget-verification.entry.js +1 -1
  262. package/dist/esm-es5/{stencil-hooks.module-4bc38af4.js → stencil-hooks.module-20ad2b5f.js} +1 -1
  263. package/dist/esm-es5/{useChildElements-7945ae56.js → useChildElements-0ca9a015.js} +1 -1
  264. package/dist/esm-es5/{useInstantAccessRegistration-dc4ad9f2.js → useInstantAccessRegistration-b224f3ce.js} +1 -1
  265. package/dist/esm-es5/{usePayoutStatus-58aa56b4.js → usePayoutStatus-3768c8c3.js} +1 -1
  266. package/dist/esm-es5/usePortalLogin-2b813acc.js +1 -0
  267. package/dist/esm-es5/{usePortalRegistrationForm-4b35a357.js → usePortalRegistrationForm-61bf948d.js} +1 -1
  268. package/dist/esm-es5/{useReferralCodes-8f75921a.js → useReferralCodes-0b798295.js} +1 -1
  269. package/dist/esm-es5/{useReferralTable-b3876ed6.js → useReferralTable-c1511d9d.js} +1 -1
  270. package/dist/esm-es5/{useRegistrationFormState-d6f33135.js → useRegistrationFormState-2db047e9.js} +1 -1
  271. package/dist/esm-es5/{useVerificationEmail-edc318cb.js → useVerificationEmail-085eda87.js} +1 -1
  272. package/dist/esm-es5/{utilities-5b0ca040.js → utilities-6341d9fd.js} +1 -1
  273. package/dist/mint-components/global/styles.ts +200 -106
  274. package/dist/mint-components/mint-components.esm.js +1 -1
  275. package/dist/mint-components/mint-components.js +1 -1
  276. package/dist/mint-components/p-00673c96.js +1 -0
  277. package/dist/mint-components/{p-266a8b4d.js → p-00791abc.js} +1 -1
  278. package/dist/mint-components/p-0126962c.entry.js +1 -0
  279. package/dist/mint-components/p-01dd6b18.system.js +1 -0
  280. package/dist/mint-components/{p-71f23364.entry.js → p-028d61de.entry.js} +1 -1
  281. package/dist/mint-components/{p-6d9e52c7.system.js → p-02c92db1.system.js} +1 -1
  282. package/dist/mint-components/{p-6d2f5a1d.js → p-037da77e.js} +2 -2
  283. package/dist/mint-components/{p-8175e85f.system.js → p-04007292.system.js} +1 -1
  284. package/dist/mint-components/{p-1fa9ed0d.system.entry.js → p-055e6ebd.system.entry.js} +1 -1
  285. package/dist/mint-components/p-0592dc0b.system.js +1 -0
  286. package/dist/mint-components/{p-d12e9cfd.system.entry.js → p-0714554e.system.entry.js} +1 -1
  287. package/dist/mint-components/{p-e518a60d.js → p-07dc6d68.js} +1 -1
  288. package/dist/mint-components/{p-9fe574ca.system.entry.js → p-0a1666ef.system.entry.js} +1 -1
  289. package/dist/mint-components/{p-af96b482.entry.js → p-0bf0409f.entry.js} +7 -7
  290. package/dist/mint-components/p-0c327ec3.entry.js +1 -0
  291. package/dist/mint-components/{p-015da96d.entry.js → p-0d3e4788.entry.js} +1 -1
  292. package/dist/mint-components/p-0e532b53.entry.js +1 -0
  293. package/dist/mint-components/{p-ca9e0322.system.js → p-0e73c48c.system.js} +1 -1
  294. package/dist/mint-components/{p-3c3aab4c.system.js → p-10c2a48c.system.js} +1 -1
  295. package/dist/mint-components/{p-4f22fda2.js → p-1238fbd0.js} +27 -27
  296. package/dist/mint-components/{p-3a62a7e2.system.js → p-12fd7ee9.system.js} +1 -1
  297. package/dist/mint-components/{p-33c96e14.entry.js → p-15ad1e97.entry.js} +1 -1
  298. package/dist/mint-components/{p-7c2b9fe4.system.js → p-167be4b9.system.js} +1 -1
  299. package/dist/mint-components/{p-4caaf25a.js → p-16dbd9cb.js} +1 -1
  300. package/dist/mint-components/p-1bdc4f94.system.entry.js +1 -0
  301. package/dist/mint-components/{p-b7d1469d.system.entry.js → p-1d46f8fa.system.entry.js} +1 -1
  302. package/dist/mint-components/{p-cfa34cf2.system.js → p-1e07c5b4.system.js} +1 -1
  303. package/dist/mint-components/{p-3e604cad.js → p-1f6cfd37.js} +1 -1
  304. package/dist/mint-components/{p-41d051b1.system.entry.js → p-1f82181b.system.entry.js} +1 -1
  305. package/dist/mint-components/{p-e309a219.js → p-204861a6.js} +1 -1
  306. package/dist/mint-components/{p-c0f19490.js → p-20b2f691.js} +1 -1
  307. package/dist/mint-components/p-22405668.entry.js +1 -0
  308. package/dist/mint-components/{p-a60d5315.entry.js → p-238fcec6.entry.js} +1 -1
  309. package/dist/mint-components/p-2403c6e1.system.js +1 -0
  310. package/dist/mint-components/p-24af584d.js +1 -0
  311. package/dist/mint-components/{p-3f290d24.system.js → p-27201067.system.js} +21 -21
  312. package/dist/mint-components/{p-8e93e590.entry.js → p-27903fca.entry.js} +1 -1
  313. package/dist/mint-components/{p-da7708a7.entry.js → p-27bb9d05.entry.js} +1 -1
  314. package/dist/mint-components/{p-210e8f49.entry.js → p-29e61db2.entry.js} +2 -2
  315. package/dist/mint-components/p-2c227f02.js +394 -0
  316. package/dist/mint-components/p-2c637c26.system.js +1 -0
  317. package/dist/mint-components/{p-a71b9154.system.js → p-2f2bced4.system.js} +1 -1
  318. package/dist/mint-components/{p-d5b3397c.system.entry.js → p-30826d8f.system.entry.js} +1 -1
  319. package/dist/mint-components/p-3168fa90.js +1 -0
  320. package/dist/mint-components/p-3174c756.entry.js +1 -0
  321. package/dist/mint-components/{p-865f812e.entry.js → p-322c1e5e.entry.js} +1 -1
  322. package/dist/mint-components/p-32e6850d.entry.js +13 -0
  323. package/dist/mint-components/{p-3e4e74a2.system.entry.js → p-33b13e55.system.entry.js} +1 -1
  324. package/dist/mint-components/{p-480e08e9.js → p-3466bfaa.js} +1 -1
  325. package/dist/mint-components/{p-54b0b768.system.js → p-34b652a9.system.js} +1 -1
  326. package/dist/mint-components/{p-cd651f81.js → p-35b2fde0.js} +1 -1
  327. package/dist/mint-components/p-36bbd4de.entry.js +1 -0
  328. package/dist/mint-components/{p-5ef6de10.entry.js → p-37c4ae42.entry.js} +1 -1
  329. package/dist/mint-components/p-37e58170.system.entry.js +1 -0
  330. package/dist/mint-components/{p-c024fc32.system.entry.js → p-3b7c875b.system.entry.js} +1 -1
  331. package/dist/mint-components/{p-82113e37.js → p-3eba9036.js} +1 -1
  332. package/dist/mint-components/{p-457962b7.system.entry.js → p-4115e328.system.entry.js} +1 -1
  333. package/dist/mint-components/{p-4b6dc0e5.entry.js → p-4204a6e3.entry.js} +1 -1
  334. package/dist/mint-components/{p-726a9924.js → p-4254a9b6.js} +1 -1
  335. package/dist/mint-components/{p-6a8d9def.system.entry.js → p-42b62299.system.entry.js} +1 -1
  336. package/dist/mint-components/{p-faba3198.entry.js → p-43ce09f0.entry.js} +1 -1
  337. package/dist/mint-components/{p-9f2edf59.system.js → p-470c9c64.system.js} +1 -1
  338. package/dist/mint-components/p-490864af.entry.js +258 -0
  339. package/dist/mint-components/p-492d810b.js +1 -0
  340. package/dist/mint-components/{p-4e451f75.js → p-4b12067f.js} +1 -1
  341. package/dist/mint-components/{p-7dabdca6.system.entry.js → p-4d8e3766.system.entry.js} +1 -1
  342. package/dist/mint-components/{p-f4a72903.system.entry.js → p-4e5dff09.system.entry.js} +1 -1
  343. package/dist/mint-components/{p-af516659.system.entry.js → p-4edcf988.system.entry.js} +1 -1
  344. package/dist/mint-components/{p-1abe7884.system.entry.js → p-4fc78f20.system.entry.js} +1 -1
  345. package/dist/mint-components/p-50bfb01f.system.entry.js +1 -0
  346. package/dist/mint-components/{p-fb584d7a.js → p-5500bd38.js} +1 -1
  347. package/dist/mint-components/{p-a9f4ddb1.js → p-572ec8d4.js} +1 -1
  348. package/dist/mint-components/p-59b028db.system.js +1 -0
  349. package/dist/mint-components/{p-6a49b077.system.entry.js → p-5cd3030b.system.entry.js} +1 -1
  350. package/dist/mint-components/{p-d6352d15.js → p-5cff2ac4.js} +1 -1
  351. package/dist/mint-components/{p-cc7af682.system.js → p-5efed40f.system.js} +1 -1
  352. package/dist/mint-components/{p-bb6e411d.system.entry.js → p-5fbbc259.system.entry.js} +1 -1
  353. package/dist/mint-components/{p-223dd3f7.system.js → p-64997b59.system.js} +1 -1
  354. package/dist/mint-components/{p-6a5f57d7.entry.js → p-64e3e87a.entry.js} +3 -3
  355. package/dist/mint-components/{p-505951d2.system.js → p-6578ea31.system.js} +1 -1
  356. package/dist/mint-components/{p-94a876b9.js → p-66ac6bed.js} +1 -1
  357. package/dist/mint-components/p-676ca2c0.system.js +1 -0
  358. package/dist/mint-components/{p-74afdafb.system.js → p-67ad2252.system.js} +1 -1
  359. package/dist/mint-components/{p-36ffebd8.system.entry.js → p-67ca8443.system.entry.js} +1 -1
  360. package/dist/mint-components/{p-057f5402.js → p-68043f30.js} +1 -1
  361. package/dist/mint-components/{p-770bba1b.system.entry.js → p-692e8ff2.system.entry.js} +1 -1
  362. package/dist/mint-components/{p-bdd80fce.js → p-69e77f43.js} +1 -1
  363. package/dist/mint-components/p-6b166700.system.entry.js +1 -0
  364. package/dist/mint-components/{p-9cf80e85.system.entry.js → p-6bcac9ed.system.entry.js} +1 -1
  365. package/dist/mint-components/{p-dbc0e4f8.system.js → p-6c0c466f.system.js} +1 -1
  366. package/dist/mint-components/{p-8413ade9.system.js → p-6cff599f.system.js} +1 -1
  367. package/dist/mint-components/{p-fbef4ecb.system.js → p-71271fbd.system.js} +1 -1
  368. package/dist/mint-components/{p-b6761073.entry.js → p-71a0adcf.entry.js} +1 -1
  369. package/dist/mint-components/p-7371218f.system.entry.js +1 -0
  370. package/dist/mint-components/{p-77b8a529.system.entry.js → p-73b3e5a9.system.entry.js} +1 -1
  371. package/dist/mint-components/{p-d6831af5.js → p-73feb66f.js} +2 -2
  372. package/dist/mint-components/{p-3f7b81b8.js → p-74eaa3c0.js} +2 -2
  373. package/dist/mint-components/p-799d62fe.entry.js +1 -0
  374. package/dist/mint-components/p-7b4f0dbc.js +1 -0
  375. package/dist/mint-components/{p-c36506f6.system.entry.js → p-7b97c0f4.system.entry.js} +1 -1
  376. package/dist/mint-components/{p-8362cb4c.system.entry.js → p-7d456d0a.system.entry.js} +1 -1
  377. package/dist/mint-components/{p-13ed8586.system.js → p-7f499d2f.system.js} +1 -1
  378. package/dist/mint-components/{p-44891949.entry.js → p-8278225e.entry.js} +1 -1
  379. package/dist/mint-components/{p-2ae0e06a.entry.js → p-84079726.entry.js} +1 -1
  380. package/dist/mint-components/{p-cd0ee247.entry.js → p-8408b84b.entry.js} +1 -1
  381. package/dist/mint-components/{p-0bdeab70.system.js → p-84f3732f.system.js} +1 -1
  382. package/dist/mint-components/{p-48135f99.system.js → p-88e32c4a.system.js} +1 -1
  383. package/dist/mint-components/{p-042642d3.entry.js → p-88e3b87a.entry.js} +1 -1
  384. package/dist/mint-components/p-8caef004.js +1 -0
  385. package/dist/mint-components/{p-884ac29e.system.entry.js → p-8f6e124b.system.entry.js} +1 -1
  386. package/dist/mint-components/{p-241d68d4.system.entry.js → p-968e5a9e.system.entry.js} +1 -1
  387. package/dist/mint-components/p-96c0860e.system.js +1 -0
  388. package/dist/mint-components/p-96d3900f.entry.js +1 -0
  389. package/dist/mint-components/{p-2bbff88f.entry.js → p-9713e9a9.entry.js} +1 -1
  390. package/dist/mint-components/{p-9acf0b39.system.entry.js → p-99a82e5a.system.entry.js} +1 -1
  391. package/dist/mint-components/{p-66a2b1a4.js → p-99fb2a50.js} +1 -1
  392. package/dist/mint-components/{p-284e4ed5.entry.js → p-9cc40be1.entry.js} +1 -1
  393. package/dist/mint-components/p-9daf835f.system.js +1 -0
  394. package/dist/mint-components/p-a09b2393.entry.js +9 -0
  395. package/dist/mint-components/p-a255bf0e.entry.js +1 -0
  396. package/dist/mint-components/{p-d1ae7a2d.js → p-a45680fe.js} +1 -1
  397. package/dist/mint-components/{p-1b3ab15a.system.entry.js → p-a9be22a6.system.entry.js} +1 -1
  398. package/dist/mint-components/p-ac71b501.js +1 -0
  399. package/dist/mint-components/{p-de136dd3.js → p-b1ddc706.js} +1 -1
  400. package/dist/mint-components/p-b4638167.entry.js +1 -0
  401. package/dist/mint-components/{p-0df294ad.system.js → p-b6911812.system.js} +1 -1
  402. package/dist/mint-components/p-b6bdf89e.entry.js +1 -0
  403. package/dist/mint-components/{p-fa37513e.system.entry.js → p-bdb9e05a.system.entry.js} +1 -1
  404. package/dist/mint-components/{p-e1e62d55.entry.js → p-be725c96.entry.js} +1 -1
  405. package/dist/mint-components/p-be88596c.system.js +1 -0
  406. package/dist/mint-components/{p-a3e68251.entry.js → p-c1821c6d.entry.js} +1 -1
  407. package/dist/mint-components/{p-96431b4f.system.entry.js → p-c3dce602.system.entry.js} +1 -1
  408. package/dist/mint-components/{p-5366850e.entry.js → p-c67034c1.entry.js} +1 -1
  409. package/dist/mint-components/p-c7c11325.js +1 -0
  410. package/dist/mint-components/{p-3a21f8f9.system.entry.js → p-c9592908.system.entry.js} +1 -1
  411. package/dist/mint-components/{p-b0d4938a.system.entry.js → p-cfa40c9b.system.entry.js} +1 -1
  412. package/dist/mint-components/{p-6798d563.system.js → p-d0de4b73.system.js} +1 -1
  413. package/dist/mint-components/{p-d9335f16.js → p-d2066cb0.js} +1 -1
  414. package/dist/mint-components/{p-a572db9b.system.entry.js → p-d533917f.system.entry.js} +1 -1
  415. package/dist/mint-components/{p-731d06a9.entry.js → p-d54fa68e.entry.js} +1 -1
  416. package/dist/mint-components/{p-dded7d43.entry.js → p-d63e5657.entry.js} +2 -2
  417. package/dist/mint-components/p-d6c151e3.system.js +1 -0
  418. package/dist/mint-components/p-db86c62e.system.entry.js +1 -0
  419. package/dist/mint-components/{p-767485b8.system.js → p-dbaab44b.system.js} +1 -1
  420. package/dist/mint-components/{p-18425f38.system.entry.js → p-dccfe305.system.entry.js} +1 -1
  421. package/dist/mint-components/p-dddac0ee.system.entry.js +1 -0
  422. package/dist/mint-components/{p-c96a25c6.js → p-ddf3c05e.js} +1 -1
  423. package/dist/mint-components/{p-5bedb58c.js → p-de3ef27e.js} +1 -1
  424. package/dist/mint-components/{p-c2fdd608.system.entry.js → p-df34f189.system.entry.js} +1 -1
  425. package/dist/mint-components/p-e13ed54a.entry.js +1 -0
  426. package/dist/mint-components/p-e523b22e.entry.js +11 -0
  427. package/dist/mint-components/p-e72c2b09.entry.js +33 -0
  428. package/dist/mint-components/{p-59274a91.system.js → p-e7aa4f3b.system.js} +1 -1
  429. package/dist/mint-components/{p-98698131.js → p-ea1eed5d.js} +1 -1
  430. package/dist/mint-components/p-ecf91505.system.js +1 -0
  431. package/dist/mint-components/{p-d94a4d50.system.entry.js → p-edf6bf2e.system.entry.js} +1 -1
  432. package/dist/mint-components/{p-9b6a0152.system.entry.js → p-efd2b6ec.system.entry.js} +1 -1
  433. package/dist/mint-components/p-f5a7697e.system.entry.js +1 -0
  434. package/dist/mint-components/{p-6427e963.entry.js → p-f66ccd51.entry.js} +1 -1
  435. package/dist/mint-components/p-f6baa0c9.system.js +1 -0
  436. package/dist/mint-components/p-f8df914b.system.js +1 -0
  437. package/dist/mint-components/{p-6cd4f2b1.system.js → p-fca47a45.system.js} +1 -1
  438. package/dist/mint-components/p-ff3c651c.js +1 -0
  439. package/dist/types/components/sqm-popup-container/usePopupContainer.d.ts +2 -2
  440. package/dist/types/components/sqm-referral-card/sqm-referral-card.d.ts +1 -1
  441. package/dist/types/components/sqm-stencilbook/BrandSelector.d.ts +9 -0
  442. package/dist/types/components/sqm-stencilbook/Themes.d.ts +5 -6
  443. package/dist/types/components.d.ts +14 -41
  444. package/dist/types/global/styles.d.ts +6 -1
  445. package/dist/types/saasquatch.d.ts +79 -0
  446. package/docs/docs.docx +0 -0
  447. package/docs/raisins.json +1 -1
  448. package/grapesjs/grapesjs.js +1 -1
  449. package/package.json +1 -1
  450. package/dist/cjs/sqm-asset-card-view-21ddf04f.js +0 -51
  451. package/dist/cjs/sqm-asset-card.cjs.entry.js +0 -45
  452. package/dist/cjs/sqm-portal-login-view-0fbbda1b.js +0 -58
  453. package/dist/collection/components/sqm-asset-card/AssetCard.stories.js +0 -29
  454. package/dist/collection/components/sqm-asset-card/sqm-asset-card-view.js +0 -46
  455. package/dist/collection/components/sqm-asset-card/sqm-asset-card.js +0 -107
  456. package/dist/collection/components/sqm-asset-card/useAssetCard.js +0 -9
  457. package/dist/esm/sqm-asset-card-view-fe5db3c0.js +0 -49
  458. package/dist/esm/sqm-asset-card.entry.js +0 -41
  459. package/dist/esm/sqm-portal-login-view-e870b4b0.js +0 -56
  460. package/dist/esm-es5/ShadowViewAddon-5f9b6d07.js +0 -1
  461. package/dist/esm-es5/email-registration-view-b1c858ee.js +0 -1
  462. package/dist/esm-es5/sqm-asset-card-view-fe5db3c0.js +0 -1
  463. package/dist/esm-es5/sqm-asset-card.entry.js +0 -1
  464. package/dist/esm-es5/sqm-big-stat_41.entry.js +0 -1
  465. package/dist/esm-es5/sqm-portal-login-view-e870b4b0.js +0 -1
  466. package/dist/esm-es5/usePortalLogin-ef647a50.js +0 -1
  467. package/dist/mint-components/p-0480b155.system.entry.js +0 -1
  468. package/dist/mint-components/p-04a6e457.entry.js +0 -1
  469. package/dist/mint-components/p-05f29f64.js +0 -1
  470. package/dist/mint-components/p-0b3218a5.entry.js +0 -1
  471. package/dist/mint-components/p-0e32981f.js +0 -1
  472. package/dist/mint-components/p-0eb3d919.system.entry.js +0 -1
  473. package/dist/mint-components/p-127e66c2.system.js +0 -1
  474. package/dist/mint-components/p-1513309d.entry.js +0 -1
  475. package/dist/mint-components/p-19ccb4ce.js +0 -1
  476. package/dist/mint-components/p-229f797b.js +0 -1
  477. package/dist/mint-components/p-275b4767.entry.js +0 -1
  478. package/dist/mint-components/p-2d52e2d7.system.js +0 -1
  479. package/dist/mint-components/p-301ddcaa.system.entry.js +0 -1
  480. package/dist/mint-components/p-32a47b41.system.js +0 -1
  481. package/dist/mint-components/p-38fc919b.entry.js +0 -1
  482. package/dist/mint-components/p-46a672e4.entry.js +0 -1
  483. package/dist/mint-components/p-4b42b756.entry.js +0 -1
  484. package/dist/mint-components/p-4b9789a2.system.js +0 -1
  485. package/dist/mint-components/p-4d478108.system.entry.js +0 -1
  486. package/dist/mint-components/p-4e526a94.js +0 -1
  487. package/dist/mint-components/p-527216de.system.js +0 -1
  488. package/dist/mint-components/p-5488fdd9.system.js +0 -1
  489. package/dist/mint-components/p-5c5964e0.js +0 -1
  490. package/dist/mint-components/p-5cd684b2.entry.js +0 -9
  491. package/dist/mint-components/p-5d407714.system.entry.js +0 -1
  492. package/dist/mint-components/p-65ba9e94.entry.js +0 -1
  493. package/dist/mint-components/p-6798cad1.system.js +0 -1
  494. package/dist/mint-components/p-693fc880.system.js +0 -1
  495. package/dist/mint-components/p-6b7a595f.system.js +0 -1
  496. package/dist/mint-components/p-6c1d0367.entry.js +0 -33
  497. package/dist/mint-components/p-6eaf9c57.entry.js +0 -1
  498. package/dist/mint-components/p-72ff8268.js +0 -1
  499. package/dist/mint-components/p-8530290b.entry.js +0 -258
  500. package/dist/mint-components/p-8abfeff8.entry.js +0 -1
  501. package/dist/mint-components/p-8c23d1b8.js +0 -1
  502. package/dist/mint-components/p-8d9d04b7.system.entry.js +0 -1
  503. package/dist/mint-components/p-8feb4180.entry.js +0 -1
  504. package/dist/mint-components/p-97d4d651.system.js +0 -1
  505. package/dist/mint-components/p-9acb5038.js +0 -1
  506. package/dist/mint-components/p-a1091368.system.js +0 -1
  507. package/dist/mint-components/p-a68932b0.system.entry.js +0 -1
  508. package/dist/mint-components/p-b637f1e4.js +0 -1
  509. package/dist/mint-components/p-bf25f63a.js +0 -394
  510. package/dist/mint-components/p-bfc7cfc0.system.js +0 -1
  511. package/dist/mint-components/p-d0064d54.system.entry.js +0 -1
  512. package/dist/mint-components/p-d5e9906e.system.js +0 -1
  513. package/dist/mint-components/p-d932f43d.entry.js +0 -1
  514. package/dist/mint-components/p-e2705fbe.system.js +0 -1
  515. package/dist/mint-components/p-e80f9e26.system.entry.js +0 -1
  516. package/dist/mint-components/p-e8ffcc68.entry.js +0 -11
  517. package/dist/mint-components/p-f0fdbd82.entry.js +0 -1
  518. package/dist/mint-components/p-f26aedcd.system.js +0 -1
  519. package/dist/mint-components/p-f708da7b.js +0 -1
  520. package/dist/mint-components/p-fe6fe9cf.entry.js +0 -13
  521. package/dist/types/components/sqm-asset-card/AssetCard.stories.d.ts +0 -7
  522. package/dist/types/components/sqm-asset-card/sqm-asset-card-view.d.ts +0 -8
  523. package/dist/types/components/sqm-asset-card/sqm-asset-card.d.ts +0 -24
  524. package/dist/types/components/sqm-asset-card/useAssetCard.d.ts +0 -7
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,o,r){function n(t){return t instanceof o?t:new o((function(e){e(t)}))}return new(o||(o=Promise))((function(o,s){function a(t){try{l(r.next(t))}catch(t){s(t)}}function i(t){try{l(r["throw"](t))}catch(t){s(t)}}function l(t){t.done?o(t.value):n(t.value).then(a,i)}l((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,n,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(t){return function(e){return l([t,e])}}function l(a){if(r)throw new TypeError("Generator is already executing.");while(o)try{if(r=1,n&&(s=a[0]&2?n["return"]:a[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,a[1])).done)return s;if(n=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;n=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(s=o.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(a[0]===6&&o.label<s[1]){o.label=s[1];s=a;break}if(s&&o.label<s[2]){o.label=s[2];o.ops.push(a);break}if(s[2])o.ops.pop();o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t];n=0}finally{r=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,h as h$1}from"./index-91e7729f.js";import{n as h}from"./stencil-hooks.module-4bc38af4.js";import{i as isDemo,j as jn}from"./index.module-89a79f66.js";import"./jsonpointer-388a7082.js";import{c as cjs}from"./cjs-bdfb4486.js";import"./utils-334c1e34.js";import{c as createStyleSheet}from"./JSS-67b5cff8.js";import"./mixins-f750863a.js";import"./sqm-text-span-view-cd3902e5.js";import{P as PortalLoginView}from"./sqm-portal-login-view-e870b4b0.js";import{u as usePortalLogin}from"./usePortalLogin-ef647a50.js";var PortalGoogleLogin=function(){function t(t){registerInstance(this,t);this.ignored=true;this.nextPage="/";this.emailLabel="Email";this.passwordLabel="Password";this.submitLabel="Sign In";this.forgotPasswordPath="/forgotPassword";this.forgotPasswordLabel="Forgot Password?";this.registerLabel="Register";this.registerPath="/register";this.pageLabel="Sign in to your account";this.networkErrorMessage="An error occurred while logging you in. Please refresh the page and try again.";this.googleUserNotRegisteredError="Your Google account has not registered on our platform. Please complete the registration process with your Google account.";this.registerCTA="Don't have an account?";h(this)}t.prototype.disconnectedCallback=function(){};t.prototype.render=function(){var t=isDemo()?useLoginDemo(this):usePortalLogin(this),e=t.states,o=t.callbacks;var r={RegisterButton:{"&::part(label)":{padding:"0"}}};var n=createStyleSheet(r);var s=n.toString();var a={forgotPasswordButton:h$1("slot",{name:"forgotPassword"},h$1("a",{onClick:function(){return jn.push(e.forgotPasswordPath)}},this.forgotPasswordLabel)),googleButton:h$1("sqm-google-sign-in",{onInitComplete:o.googleSubmit}),secondaryButton:h$1("slot",{name:"secondaryButton"},h$1("style",null,s),h$1("span",null,this.registerCTA," ",h$1("sl-button",{size:"large",type:"text",disabled:e.loading,onClick:function(){return jn.push(e.registerPath)},className:n.classes.RegisterButton},this.registerLabel))),emailLabel:this.emailLabel,passwordLabel:this.passwordLabel,submitLabel:this.submitLabel,pageLabel:this.pageLabel};return h$1(PortalLoginView,{states:e,callbacks:o,content:a})};return t}();function useLoginDemo(t){var e=this;return cjs({states:{error:"",loading:false,forgotPasswordPath:"/forgotPassword",registerPath:"/register",showLoginForm:"manual"},callbacks:{googleSubmit:function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(t){console.log("google submit");return[2]}))}))},submit:function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(t){console.log("submit");return[2]}))}))}},content:{googleButton:null}},t.demoData||{},{arrayMerge:function(t,e){return e}})}export{PortalGoogleLogin as sqm_portal_google_login};
1
+ var __awaiter=this&&this.__awaiter||function(t,e,o,r){function n(t){return t instanceof o?t:new o((function(e){e(t)}))}return new(o||(o=Promise))((function(o,s){function a(t){try{l(r.next(t))}catch(t){s(t)}}function i(t){try{l(r["throw"](t))}catch(t){s(t)}}function l(t){t.done?o(t.value):n(t.value).then(a,i)}l((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,n,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(t){return function(e){return l([t,e])}}function l(a){if(r)throw new TypeError("Generator is already executing.");while(o)try{if(r=1,n&&(s=a[0]&2?n["return"]:a[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,a[1])).done)return s;if(n=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;n=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(s=o.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(a[0]===6&&o.label<s[1]){o.label=s[1];s=a;break}if(s&&o.label<s[2]){o.label=s[2];o.ops.push(a);break}if(s[2])o.ops.pop();o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t];n=0}finally{r=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,h as h$1}from"./index-b3a06de8.js";import{n as h}from"./stencil-hooks.module-20ad2b5f.js";import{i as isDemo,j as jn}from"./index.module-d49ae5e7.js";import"./jsonpointer-388a7082.js";import{c as cjs}from"./cjs-bdfb4486.js";import"./utils-334c1e34.js";import{c as createStyleSheet}from"./JSS-67b5cff8.js";import"./mixins-f750863a.js";import"./sqm-text-span-view-4c17b8c9.js";import{u as usePortalLogin,P as PortalLoginView}from"./usePortalLogin-2b813acc.js";var PortalGoogleLogin=function(){function t(t){registerInstance(this,t);this.ignored=true;this.nextPage="/";this.emailLabel="Email";this.passwordLabel="Password";this.submitLabel="Sign In";this.forgotPasswordPath="/forgotPassword";this.forgotPasswordLabel="Forgot Password?";this.registerLabel="Register";this.registerPath="/register";this.pageLabel="Sign in to your account";this.networkErrorMessage="An error occurred while logging you in. Please refresh the page and try again.";this.googleUserNotRegisteredError="Your Google account has not registered on our platform. Please complete the registration process with your Google account.";this.registerCTA="Don't have an account?";h(this)}t.prototype.disconnectedCallback=function(){};t.prototype.render=function(){var t=isDemo()?useLoginDemo(this):usePortalLogin(this),e=t.states,o=t.callbacks;var r={RegisterButton:{"&::part(label)":{padding:"0"}}};var n=createStyleSheet(r);var s=n.toString();var a={forgotPasswordButton:h$1("slot",{name:"forgotPassword"},h$1("a",{onClick:function(){return jn.push(e.forgotPasswordPath)}},this.forgotPasswordLabel)),googleButton:h$1("sqm-google-sign-in",{onInitComplete:o.googleSubmit}),secondaryButton:h$1("slot",{name:"secondaryButton"},h$1("style",null,s),h$1("span",null,this.registerCTA," ",h$1("sl-button",{size:"large",type:"text",disabled:e.loading,onClick:function(){return jn.push(e.registerPath)},className:n.classes.RegisterButton},this.registerLabel))),emailLabel:this.emailLabel,passwordLabel:this.passwordLabel,submitLabel:this.submitLabel,pageLabel:this.pageLabel};return h$1(PortalLoginView,{states:e,callbacks:o,content:a})};return t}();function useLoginDemo(t){var e=this;return cjs({states:{error:"",loading:false,forgotPasswordPath:"/forgotPassword",registerPath:"/register",showLoginForm:"manual"},callbacks:{googleSubmit:function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(t){console.log("google submit");return[2]}))}))},submit:function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(t){console.log("submit");return[2]}))}))}},content:{googleButton:null}},t.demoData||{},{arrayMerge:function(t,e){return e}})}export{PortalGoogleLogin as sqm_portal_google_login};
@@ -1 +1 @@
1
- var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return e(t,r)};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++){t=arguments[r];for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a))e[a]=t[a]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,r,o){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function s(e){try{l(o.next(e))}catch(e){i(e)}}function n(e){try{l(o["throw"](e))}catch(e){i(e)}}function l(e){e.done?r(e.value):a(e.value).then(s,n)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,a,i,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(e){return function(t){return l([e,t])}}function l(s){if(o)throw new TypeError("Generator is already executing.");while(r)try{if(o=1,a&&(i=s[0]&2?a["return"]:s[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,s[1])).done)return i;if(a=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;a=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];a=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,h as h$1}from"./index-91e7729f.js";import{k as useState,n as h}from"./stencil-hooks.module-4bc38af4.js";import{i as isDemo,j as jn}from"./index.module-89a79f66.js";import{j as jsonpointer}from"./jsonpointer-388a7082.js";import{c as cjs}from"./cjs-bdfb4486.js";import{c as createStyleSheet}from"./JSS-67b5cff8.js";import"./mixins-f750863a.js";import"./sqm-text-span-view-cd3902e5.js";import{a as useRegistrationForm}from"./useRegistrationFormState-d6f33135.js";import{B as BaseRegistrationFormView}from"./sqm-base-registration-form-view-d732a5df.js";import{P as PortalRegistrationFormView}from"./sqm-portal-registration-form-view-5d651c04.js";import"./AsYouType-46f67d0d.js";import{u as usePortalRegistrationForm}from"./usePortalRegistrationForm-4b35a357.js";var InvalidTokenError=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Error);InvalidTokenError.prototype.name="InvalidTokenError";function b64DecodeUnicode(e){return decodeURIComponent(atob(e).replace(/(.)/g,(function(e,t){var r=t.charCodeAt(0).toString(16).toUpperCase();if(r.length<2){r="0"+r}return"%"+r})))}function base64UrlDecode(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return b64DecodeUnicode(t)}catch(e){return atob(t)}}function jwtDecode(e,t){if(typeof e!=="string"){throw new InvalidTokenError("Invalid token specified: must be a string")}t||(t={});var r=t.header===true?0:1;var o=e.split(".")[r];if(typeof o!=="string"){throw new InvalidTokenError("Invalid token specified: missing part #"+(r+1))}var a;try{a=base64UrlDecode(o)}catch(e){throw new InvalidTokenError("Invalid token specified: invalid base64 for part #"+(r+1)+" ("+e.message+")")}try{return JSON.parse(a)}catch(e){throw new InvalidTokenError("Invalid token specified: invalid json for part #"+(r+1)+" ("+e.message+")")}}function usePortalGoogleRegistrationForm(e){var t=this;var r=useState(null),o=r[0],a=r[1];var i=useRegistrationForm(),s=i[0],n=i[1];var l=useState({mode:"base"}),u=l[0],c=l[1];var m=function(r){return __awaiter(t,void 0,void 0,(function(){var t,o,i;return __generator(this,(function(l){t=r.target.getFormControls();o={};i=null;t.forEach((function(t){if(!t.name||t.name!=="/email")return;jsonpointer.set(o,t.name,t.value);if(t.required&&!t.value)i=e.requiredFieldErrorMessage;if(typeof t.validationError==="function"){var r=t.validationError;var a=r({control:t,key:"email",value:t.value});if(a)i=a}}));if(i){a(i);return[2]}n(__assign(__assign({},s),{initialData:__assign(__assign({},s===null||s===void 0?void 0:s.initialData),o)}));c({mode:"manual"});return[2]}))}))};var d=function(e){var t;if(!((t=e.detail)===null||t===void 0?void 0:t.credential))return;try{var r=jwtDecode(e.detail.credential);n(__assign(__assign({},s),{_googleOAuthIdToken:e.detail.credential,initialData:{email:r.email,firstName:r.given_name,lastName:r.family_name}}));c({mode:"google"})}catch(e){console.error("Failed to decode Google Sign In credential JWT:",e)}};return{showRegistrationForm:u,emailValidationError:o,handleGoogleInit:d,handleEmailSubmit:m}}var PortalGoogleRegistrationForm=function(){function e(e){registerInstance(this,e);this.ignored=true;this.nextPage="/";this.redirectPath="/verifyEmail";this.emailLabel="Email";this.passwordLabel="Password";this.submitLabel="Register";this.loginLabel="Sign in";this.confirmPasswordLabel="Confirm Password";this.confirmPassword=false;this.disablePasswordValidation=false;this.hideInputs=false;this.pageLabel="Register";this.loginPath="/login";this.loginCTA="Already have an account?";this.requiredFieldErrorMessage="Cannot be empty";this.networkErrorMessage="Network request failed.";this.passwordMismatchErrorMessage="Passwords do not match.";this.invalidEmailErrorMessage="Must be a valid email address";this.formDisabledErrorMessage="The registration form is currently disabled.";this.meetsRequirementsText="Password has met all requirements";this.doesNotMeetRequirementsText="Password must meet the following requirements:";this.minErrorText="be a minimum of 8 characters";this.uppercaseErrorText="contain at least 1 uppercase character";this.lowercaseErrorText="contain at least 1 lowercase character";this.hasErrorText="contain at least 1 number or symbol";this.googleButtonText="signup_with";h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=isDemo()?useRegisterDemo(this):usePortalRegistrationForm(this),t=e.states,r=e.callbacks,o=e.refs;var a={LoginButton:{"&::part(label)":{padding:"0"}}};var i=createStyleSheet(a);var s=i.toString();var n=isDemo()?useGoogleDemo(this):usePortalGoogleRegistrationForm(this),l=n.handleGoogleInit,u=n.handleEmailSubmit,c=n.showRegistrationForm,m=n.emailValidationError;var d={formData:h$1("slot",{name:"formData"}),googleButton:h$1("sqm-google-sign-in",{text:this.googleButtonText,onInitComplete:l}),secondaryButton:h$1("slot",{name:"secondaryButton"},h$1("style",null,s),h$1("span",null,this.loginCTA," ",h$1("sl-button",{size:"large",type:"text",disabled:t.loading,onClick:function(){return jn.push(t.loginPath)},className:i.classes.LoginButton},this.loginLabel)," ")),terms:h$1("slot",{name:"terms"}),emailLabel:this.emailLabel,passwordLabel:this.passwordLabel,submitLabel:this.submitLabel,pageLabel:this.pageLabel,confirmPasswordLabel:this.confirmPasswordLabel,networkErrorMessage:this.networkErrorMessage,passwordMismatchErrorMessage:this.passwordMismatchErrorMessage,invalidEmailErrorMessage:this.invalidEmailErrorMessage,formDisabledErrorMessage:this.formDisabledErrorMessage,requiredFieldErrorMessage:this.requiredFieldErrorMessage,meetsRequirementsText:this.meetsRequirementsText,doesNotMeetRequirementsText:this.doesNotMeetRequirementsText,minErrorText:this.minErrorText,uppercaseErrorText:this.uppercaseErrorText,lowercaseErrorText:this.lowercaseErrorText,hasErrorText:this.hasErrorText};if(c.mode==="base"){return h$1(BaseRegistrationFormView,{states:{error:m},callbacks:{handleEmailSubmit:u},content:d})}return h$1(PortalRegistrationFormView,{states:__assign(__assign({},t),{emailDisabled:true,hidePasswords:c.mode==="google"}),callbacks:r,content:__assign({},d),refs:o})};return e}();function useRegisterDemo(e){var t=this;return cjs({states:{error:"",loading:false,confirmPassword:e.confirmPassword,hideInputs:e.hideInputs||false,customPasswordField:false,loginPath:"/login"},callbacks:{handleGoogleInit:function(){},setShowRegistrationForm:function(){},submit:function(e){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){console.log("submit");return[2]}))}))},inputFunction:function(){}},content:{pageLabel:"Register",formData:null,passwordField:null},refs:{formRef:{}}},e.demoData||{},{arrayMerge:function(e,t){return t}})}function useGoogleDemo(e){var t=useState({mode:"base"}),r=t[0],o=t[1];return cjs({emailValidationError:true,handleEmailSubmit:function(){return o({mode:"manual"})},showRegistrationForm:r,handleGoogleInit:function(){return o({mode:"google"})}},e.demoGoogleData||{},{arrayMerge:function(e,t){return t}})}export{PortalGoogleRegistrationForm as sqm_portal_google_registration_form};
1
+ var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return e(t,r)};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++){t=arguments[r];for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a))e[a]=t[a]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,r,o){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function s(e){try{l(o.next(e))}catch(e){i(e)}}function n(e){try{l(o["throw"](e))}catch(e){i(e)}}function l(e){e.done?r(e.value):a(e.value).then(s,n)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,a,i,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(e){return function(t){return l([e,t])}}function l(s){if(o)throw new TypeError("Generator is already executing.");while(r)try{if(o=1,a&&(i=s[0]&2?a["return"]:s[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,s[1])).done)return i;if(a=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;a=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];a=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,h as h$1}from"./index-b3a06de8.js";import{k as useState,n as h}from"./stencil-hooks.module-20ad2b5f.js";import{i as isDemo,j as jn}from"./index.module-d49ae5e7.js";import{j as jsonpointer}from"./jsonpointer-388a7082.js";import{c as cjs}from"./cjs-bdfb4486.js";import{c as createStyleSheet}from"./JSS-67b5cff8.js";import"./mixins-f750863a.js";import"./sqm-text-span-view-4c17b8c9.js";import{a as useRegistrationForm}from"./useRegistrationFormState-2db047e9.js";import{B as BaseRegistrationFormView}from"./sqm-base-registration-form-view-193f1721.js";import{P as PortalRegistrationFormView}from"./sqm-portal-registration-form-view-8bdc3804.js";import"./AsYouType-46f67d0d.js";import{u as usePortalRegistrationForm}from"./usePortalRegistrationForm-61bf948d.js";var InvalidTokenError=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Error);InvalidTokenError.prototype.name="InvalidTokenError";function b64DecodeUnicode(e){return decodeURIComponent(atob(e).replace(/(.)/g,(function(e,t){var r=t.charCodeAt(0).toString(16).toUpperCase();if(r.length<2){r="0"+r}return"%"+r})))}function base64UrlDecode(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return b64DecodeUnicode(t)}catch(e){return atob(t)}}function jwtDecode(e,t){if(typeof e!=="string"){throw new InvalidTokenError("Invalid token specified: must be a string")}t||(t={});var r=t.header===true?0:1;var o=e.split(".")[r];if(typeof o!=="string"){throw new InvalidTokenError("Invalid token specified: missing part #"+(r+1))}var a;try{a=base64UrlDecode(o)}catch(e){throw new InvalidTokenError("Invalid token specified: invalid base64 for part #"+(r+1)+" ("+e.message+")")}try{return JSON.parse(a)}catch(e){throw new InvalidTokenError("Invalid token specified: invalid json for part #"+(r+1)+" ("+e.message+")")}}function usePortalGoogleRegistrationForm(e){var t=this;var r=useState(null),o=r[0],a=r[1];var i=useRegistrationForm(),s=i[0],n=i[1];var l=useState({mode:"base"}),u=l[0],c=l[1];var m=function(r){return __awaiter(t,void 0,void 0,(function(){var t,o,i;return __generator(this,(function(l){t=r.target.getFormControls();o={};i=null;t.forEach((function(t){if(!t.name||t.name!=="/email")return;jsonpointer.set(o,t.name,t.value);if(t.required&&!t.value)i=e.requiredFieldErrorMessage;if(typeof t.validationError==="function"){var r=t.validationError;var a=r({control:t,key:"email",value:t.value});if(a)i=a}}));if(i){a(i);return[2]}n(__assign(__assign({},s),{initialData:__assign(__assign({},s===null||s===void 0?void 0:s.initialData),o)}));c({mode:"manual"});return[2]}))}))};var d=function(e){var t;if(!((t=e.detail)===null||t===void 0?void 0:t.credential))return;try{var r=jwtDecode(e.detail.credential);n(__assign(__assign({},s),{_googleOAuthIdToken:e.detail.credential,initialData:{email:r.email,firstName:r.given_name,lastName:r.family_name}}));c({mode:"google"})}catch(e){console.error("Failed to decode Google Sign In credential JWT:",e)}};return{showRegistrationForm:u,emailValidationError:o,handleGoogleInit:d,handleEmailSubmit:m}}var PortalGoogleRegistrationForm=function(){function e(e){registerInstance(this,e);this.ignored=true;this.nextPage="/";this.redirectPath="/verifyEmail";this.emailLabel="Email";this.passwordLabel="Password";this.submitLabel="Register";this.loginLabel="Sign in";this.confirmPasswordLabel="Confirm Password";this.confirmPassword=false;this.disablePasswordValidation=false;this.hideInputs=false;this.pageLabel="Register";this.loginPath="/login";this.loginCTA="Already have an account?";this.requiredFieldErrorMessage="Cannot be empty";this.networkErrorMessage="Network request failed.";this.passwordMismatchErrorMessage="Passwords do not match.";this.invalidEmailErrorMessage="Must be a valid email address";this.formDisabledErrorMessage="The registration form is currently disabled.";this.meetsRequirementsText="Password has met all requirements";this.doesNotMeetRequirementsText="Password must meet the following requirements:";this.minErrorText="be a minimum of 8 characters";this.uppercaseErrorText="contain at least 1 uppercase character";this.lowercaseErrorText="contain at least 1 lowercase character";this.hasErrorText="contain at least 1 number or symbol";this.googleButtonText="signup_with";h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=isDemo()?useRegisterDemo(this):usePortalRegistrationForm(this),t=e.states,r=e.callbacks,o=e.refs;var a={LoginButton:{"&::part(label)":{padding:"0"}}};var i=createStyleSheet(a);var s=i.toString();var n=isDemo()?useGoogleDemo(this):usePortalGoogleRegistrationForm(this),l=n.handleGoogleInit,u=n.handleEmailSubmit,c=n.showRegistrationForm,m=n.emailValidationError;var d={formData:h$1("slot",{name:"formData"}),googleButton:h$1("sqm-google-sign-in",{text:this.googleButtonText,onInitComplete:l}),secondaryButton:h$1("slot",{name:"secondaryButton"},h$1("style",null,s),h$1("span",null,this.loginCTA," ",h$1("sl-button",{size:"large",type:"text",disabled:t.loading,onClick:function(){return jn.push(t.loginPath)},className:i.classes.LoginButton},this.loginLabel)," ")),terms:h$1("slot",{name:"terms"}),emailLabel:this.emailLabel,passwordLabel:this.passwordLabel,submitLabel:this.submitLabel,pageLabel:this.pageLabel,confirmPasswordLabel:this.confirmPasswordLabel,networkErrorMessage:this.networkErrorMessage,passwordMismatchErrorMessage:this.passwordMismatchErrorMessage,invalidEmailErrorMessage:this.invalidEmailErrorMessage,formDisabledErrorMessage:this.formDisabledErrorMessage,requiredFieldErrorMessage:this.requiredFieldErrorMessage,meetsRequirementsText:this.meetsRequirementsText,doesNotMeetRequirementsText:this.doesNotMeetRequirementsText,minErrorText:this.minErrorText,uppercaseErrorText:this.uppercaseErrorText,lowercaseErrorText:this.lowercaseErrorText,hasErrorText:this.hasErrorText};if(c.mode==="base"){return h$1(BaseRegistrationFormView,{states:{error:m},callbacks:{handleEmailSubmit:u},content:d})}return h$1(PortalRegistrationFormView,{states:__assign(__assign({},t),{emailDisabled:true,hidePasswords:c.mode==="google"}),callbacks:r,content:__assign({},d),refs:o})};return e}();function useRegisterDemo(e){var t=this;return cjs({states:{error:"",loading:false,confirmPassword:e.confirmPassword,hideInputs:e.hideInputs||false,customPasswordField:false,loginPath:"/login"},callbacks:{handleGoogleInit:function(){},setShowRegistrationForm:function(){},submit:function(e){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){console.log("submit");return[2]}))}))},inputFunction:function(){}},content:{pageLabel:"Register",formData:null,passwordField:null},refs:{formRef:{}}},e.demoData||{},{arrayMerge:function(e,t){return t}})}function useGoogleDemo(e){var t=useState({mode:"base"}),r=t[0],o=t[1];return cjs({emailValidationError:true,handleEmailSubmit:function(){return o({mode:"manual"})},showRegistrationForm:r,handleGoogleInit:function(){return o({mode:"google"})}},e.demoGoogleData||{},{arrayMerge:function(e,t){return t}})}export{PortalGoogleRegistrationForm as sqm_portal_google_registration_form};
@@ -1 +1 @@
1
- import{r as registerInstance}from"./index-91e7729f.js";import{n as h}from"./stencil-hooks.module-4bc38af4.js";import{b as setUserIdentity,j as jn,i as isDemo}from"./index.module-89a79f66.js";function usePortalLogout(t){var o=t.nextPage;setUserIdentity(undefined);jn.push({pathname:o,search:""})}var PortalLogout=function(){function t(t){registerInstance(this,t);this.ignored=true;this.nextPage="/";h(this)}t.prototype.disconnectedCallback=function(){};t.prototype.render=function(){isDemo()?useLogoutDemo():usePortalLogout(this)};return t}();function useLogoutDemo(t){}export{PortalLogout as sqm_portal_logout};
1
+ import{r as registerInstance}from"./index-b3a06de8.js";import{n as h}from"./stencil-hooks.module-20ad2b5f.js";import{b as setUserIdentity,j as jn,i as isDemo}from"./index.module-d49ae5e7.js";function usePortalLogout(t){var e=t.nextPage;setUserIdentity(undefined);jn.push({pathname:e,search:""})}var PortalLogout=function(){function t(t){registerInstance(this,t);this.ignored=true;this.nextPage="/";h(this)}t.prototype.disconnectedCallback=function(){};t.prototype.render=function(){isDemo()?useLogoutDemo():usePortalLogout(this)};return t}();function useLogoutDemo(t){}export{PortalLogout as sqm_portal_logout};
@@ -1 +1 @@
1
- import{h}from"./index-91e7729f.js";import{i as intl}from"./global-66746c30.js";import{c as createStyleSheet}from"./JSS-67b5cff8.js";import{T as TextSpanView}from"./sqm-text-span-view-cd3902e5.js";function PortalProfileView(e){var a,t,s,i,l;var r=e.states,o=e.callbacks;var n=r.text,d=r.formState;var m=d.errors,u=d.error;var p={Container:{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-xxx-large)",padding:"var(--sl-spacing-xxx-large)"},FormStyle:{width:"100%",minWidth:"700px","& >*:not(:last-child)":{"margin-bottom":"32px"},"@media screen and (max-width: 1100px)":{minWidth:"100%"}},Error:{"&::part(erroralert-base)":{"margin-bottom":"32px"}},Success:{"&::part(successalert-base)":{"margin-bottom":"32px"}},NameInputStyle:{width:"50%","@media screen and (max-width: 860px)":{width:"100%","margin-right":"0"}},NameInputContainer:{display:"flex",gap:"32px",width:"100%","@media screen and (max-width: 860px)":{flexDirection:"column"}}};var c=createStyleSheet(p);var v=c.toString();var b=((a=r.user)===null||a===void 0?void 0:a.countryCode)?intl.formatDisplayName((t=r.user)===null||t===void 0?void 0:t.countryCode,{type:"region"}):"";return h("div",{class:c.classes.Container,part:"sqm-base"},h("style",{type:"text/css"},v),h(TextSpanView,Object.assign({},{type:"h1"}),n.editProfileHeader),h(TextSpanView,Object.assign({},{type:"h2"}),n.editProfileSubHeader),h("form",{class:c.classes.FormStyle,onSubmit:o.onSubmit},r.success&&h("sqm-form-message",{class:c.classes.Success,exportparts:"success-icon"},h("div",{part:"successalert-text"},n.submissionSuccessText)),u&&h("sqm-form-message",{class:c.classes.Error,type:"error",exportparts:"erroralert-icon"},h("div",{part:"erroralert-text"},u)),h("div",{class:c.classes.NameInputContainer},h("sl-input",Object.assign({class:c.classes.NameInputStyle,exportparts:"label: input-label, base: input-base",value:(s=r.user)===null||s===void 0?void 0:s.firstName,onInput:o.onChange,label:n.firstnametext,disabled:r.loading},(m===null||m===void 0?void 0:m.firstName)&&(m===null||m===void 0?void 0:m.firstName.status)!=="valid"?{class:"ErrorStyles",helpText:n.fieldEmptyText}:[],{id:"firstName",name:"firstName",error:(m===null||m===void 0?void 0:m.firstName)&&(m===null||m===void 0?void 0:m.firstName.status)!=="valid"?m===null||m===void 0?void 0:m.firstName.message:undefined})),h("sl-input",Object.assign({class:c.classes.NameInputStyle,exportparts:"label: input-label, base: input-base",value:(i=r.user)===null||i===void 0?void 0:i.lastName,onInput:o.onChange,label:n.lastnametext,disabled:r.loading,id:"lastName",name:"lastName"},(m===null||m===void 0?void 0:m.lastName)&&(m===null||m===void 0?void 0:m.lastName.status)!=="valid"?{class:"ErrorStyles",helpText:n.fieldEmptyText}:[],{error:(m===null||m===void 0?void 0:m.lastName)&&(m===null||m===void 0?void 0:m.lastName.status)!=="valid"?m===null||m===void 0?void 0:m.lastName.message:undefined}))),h("sl-input",{label:n.emailtext,value:(l=r.user)===null||l===void 0?void 0:l.email,exportparts:"label: input-label, base: input-base",disabled:true}),r.showCountry&&h("sl-input",{label:n.countrytext,value:b,exportparts:"label: input-label, base: input-base",disabled:true}),h("sl-button",{type:"primary",exportparts:"base: primarybutton-base",loading:r.loading,disabled:r.submitDisabled,onClick:function(e){o.onSubmit(e)},submit:true},n.submitChangeButtonText)))}export{PortalProfileView as P};
1
+ import{h}from"./index-b3a06de8.js";import{i as intl}from"./global-16971a34.js";import{c as createStyleSheet}from"./JSS-67b5cff8.js";import{T as TextSpanView}from"./sqm-text-span-view-4c17b8c9.js";function PortalProfileView(e){var a,t,s,i,l;var r=e.states,o=e.callbacks;var n=r.text,d=r.formState;var m=d.errors,u=d.error;var p={Container:{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-xxx-large)",padding:"var(--sl-spacing-xxx-large)"},FormStyle:{width:"100%",minWidth:"700px","& >*:not(:last-child)":{"margin-bottom":"32px"},"@media screen and (max-width: 1100px)":{minWidth:"100%"}},Error:{"&::part(erroralert-base)":{"margin-bottom":"32px"}},Success:{"&::part(successalert-base)":{"margin-bottom":"32px"}},NameInputStyle:{width:"50%","@media screen and (max-width: 860px)":{width:"100%","margin-right":"0"}},NameInputContainer:{display:"flex",gap:"32px",width:"100%","@media screen and (max-width: 860px)":{flexDirection:"column"}}};var c=createStyleSheet(p);var b=c.toString();var v=((a=r.user)===null||a===void 0?void 0:a.countryCode)?intl.formatDisplayName((t=r.user)===null||t===void 0?void 0:t.countryCode,{type:"region"}):"";return h("div",{class:c.classes.Container,part:"sqm-base"},h("style",{type:"text/css"},b),h(TextSpanView,Object.assign({},{type:"h1"}),n.editProfileHeader),h(TextSpanView,Object.assign({},{type:"h2"}),n.editProfileSubHeader),h("form",{class:c.classes.FormStyle,onSubmit:o.onSubmit},r.success&&h("sqm-form-message",{class:c.classes.Success,exportparts:"success-icon"},h("div",{part:"successalert-text"},n.submissionSuccessText)),u&&h("sqm-form-message",{class:c.classes.Error,type:"error",exportparts:"erroralert-icon"},h("div",{part:"erroralert-text"},u)),h("div",{class:c.classes.NameInputContainer},h("sl-input",Object.assign({class:c.classes.NameInputStyle,exportparts:"label: input-label, base: input-base",value:(s=r.user)===null||s===void 0?void 0:s.firstName,onInput:o.onChange,label:n.firstnametext,disabled:r.loading},(m===null||m===void 0?void 0:m.firstName)&&(m===null||m===void 0?void 0:m.firstName.status)!=="valid"?{class:"ErrorStyles",helpText:n.fieldEmptyText}:[],{id:"firstName",name:"firstName",error:(m===null||m===void 0?void 0:m.firstName)&&(m===null||m===void 0?void 0:m.firstName.status)!=="valid"?m===null||m===void 0?void 0:m.firstName.message:undefined})),h("sl-input",Object.assign({class:c.classes.NameInputStyle,exportparts:"label: input-label, base: input-base",value:(i=r.user)===null||i===void 0?void 0:i.lastName,onInput:o.onChange,label:n.lastnametext,disabled:r.loading,id:"lastName",name:"lastName"},(m===null||m===void 0?void 0:m.lastName)&&(m===null||m===void 0?void 0:m.lastName.status)!=="valid"?{class:"ErrorStyles",helpText:n.fieldEmptyText}:[],{error:(m===null||m===void 0?void 0:m.lastName)&&(m===null||m===void 0?void 0:m.lastName.status)!=="valid"?m===null||m===void 0?void 0:m.lastName.message:undefined}))),h("sl-input",{label:n.emailtext,value:(l=r.user)===null||l===void 0?void 0:l.email,exportparts:"label: input-label, base: input-base",disabled:true}),r.showCountry&&h("sl-input",{label:n.countrytext,value:v,exportparts:"label: input-label, base: input-base",disabled:true}),h("sl-button",{type:"primary",exportparts:"base: primarybutton-base",loading:r.loading,disabled:r.submitDisabled,onClick:function(e){o.onSubmit(e)},submit:true},n.submitChangeButtonText)))}export{PortalProfileView as P};
@@ -1 +1 @@
1
- var __makeTemplateObject=this&&this.__makeTemplateObject||function(e,t){if(Object.defineProperty){Object.defineProperty(e,"raw",{value:t})}else{e.raw=t}return e};var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++){t=arguments[r];for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]}return e};return __assign.apply(this,arguments)};import{r as registerInstance,h as h$1}from"./index-91e7729f.js";import{k as useState,f as useEffect,n as h}from"./stencil-hooks.module-4bc38af4.js";import"./global-66746c30.js";import{d as dist,J,w as wn,$ as $e,i as isDemo}from"./index.module-89a79f66.js";import{c as cjs}from"./cjs-bdfb4486.js";import{g as getProps}from"./utils-334c1e34.js";import"./JSS-67b5cff8.js";import"./sqm-text-span-view-cd3902e5.js";import{P as PortalProfileView}from"./sqm-portal-profile-view-0d45de87.js";import{i as isEmpty}from"./utilities-5b0ca040.js";var GET_USER=dist.gql(templateObject_1||(templateObject_1=__makeTemplateObject(["\n query {\n viewer {\n ... on User {\n id\n accountId\n firstName\n lastName\n email\n countryCode\n }\n }\n }\n"],["\n query {\n viewer {\n ... on User {\n id\n accountId\n firstName\n lastName\n email\n countryCode\n }\n }\n }\n"])));var UPSERT_USER=dist.gql(templateObject_2||(templateObject_2=__makeTemplateObject(["\n mutation (\n $id: String!\n $accountId: String!\n $firstName: String!\n $lastName: String!\n ) {\n upsertUser(\n userInput: {\n id: $id\n accountId: $accountId\n firstName: $firstName\n lastName: $lastName\n }\n ) {\n firstName\n lastName\n }\n }\n"],["\n mutation (\n $id: String!\n $accountId: String!\n $firstName: String!\n $lastName: String!\n ) {\n upsertUser(\n userInput: {\n id: $id\n accountId: $accountId\n firstName: $firstName\n lastName: $lastName\n }\n ) {\n firstName\n lastName\n }\n }\n"])));var defaultFormState={country:"",email:"",firstName:"",lastName:"",errors:{},error:""};function usePortalProfile(e){var t=J();var r=useState(false),i=r[0],n=r[1];var a=useState(undefined),s=a[0],o=a[1];var l=useState(defaultFormState),u=l[0],d=l[1];var m=wn(GET_USER,{},!(t===null||t===void 0?void 0:t.jwt));var f=$e(UPSERT_USER),c=f[0],v=f[1];useEffect((function(){if(v===null||v===void 0?void 0:v.loading)return;if(v===null||v===void 0?void 0:v.errors){d((function(e){var t,r,i;return __assign(__assign({},e),{error:(i=(r=(t=v===null||v===void 0?void 0:v.errors)===null||t===void 0?void 0:t.response)===null||r===void 0?void 0:r.errors)===null||i===void 0?void 0:i[0].message})}))}else{o((function(e){var t;return __assign(__assign({},e),(t=v===null||v===void 0?void 0:v.data)===null||t===void 0?void 0:t.upsertUser)}));if(v===null||v===void 0?void 0:v.data)n(true)}}),[v===null||v===void 0?void 0:v.loading]);useEffect((function(){var e,t;o((function(e){var t;return __assign(__assign({},e),(t=m===null||m===void 0?void 0:m.data)===null||t===void 0?void 0:t.viewer)}));d(__assign(__assign(__assign({},defaultFormState),(e=m.data)===null||e===void 0?void 0:e.viewer),(t=v.data)===null||t===void 0?void 0:t.upsertUser))}),[m===null||m===void 0?void 0:m.data]);useEffect((function(){var t,r;if((t=v===null||v===void 0?void 0:v.errors)===null||t===void 0?void 0:t.message){d(__assign(__assign({},(r=m.data)===null||r===void 0?void 0:r.viewer),{error:e.networkRequestMessage}))}}),[v===null||v===void 0?void 0:v.errors]);var g=function(){n(false);if(u.firstName&&u.lastName){c({id:t===null||t===void 0?void 0:t.id,accountId:t===null||t===void 0?void 0:t.accountId,firstName:u.firstName,lastName:u.lastName});d((function(e){return __assign(__assign({},e),{errors:{},error:""})}));return}var r={};if(!u.firstName){r["firstName"]={message:e.fieldEmptyText}}if(!u.lastName){r["lastName"]={message:e.fieldEmptyText}}if(!isEmpty(r)){d((function(t){return __assign(__assign({},t),{error:e.formErrorText})}))}d((function(e){return __assign(__assign({},e),{errors:r})}))};return{states:{success:i,loading:(m===null||m===void 0?void 0:m.loading)||v.loading,submitDisabled:false,showCountry:!e.hideCountry,formState:u,user:s,text:{firstnametext:e.firstnametext,lastnametext:e.lastnametext,countrytext:e.countrytext,emailtext:e.emailtext,editProfileHeader:e.editProfileHeader,editProfileSubHeader:e.editProfileSubHeader,submitChangeButtonText:e.submitChangeButtonText}},callbacks:{onSubmit:g,onChange:function(e){var t=e.target,r=t.name,i=t.value;d((function(e){var t;return __assign(__assign({},e),(t={},t[r]=i,t))}))}}}}var PortalProfile=function(){function e(e){registerInstance(this,e);this.ignored=true;this.firstnametext="First Name";this.lastnametext="Last Name";this.emailtext="Email";this.countrytext="Country";this.editProfileHeader="Edit your profile";this.editProfileSubHeader="Personal Information";this.submitChangeButtonText="Submit Changes";this.hideCountry=false;this.networkRequestMessage="An error occurred while loading this page. Please refresh the page.";this.fieldEmptyText="Field is required";this.formErrorText="Please correct the errors below to update your profile.";this.submissionSuccessText="Your profile has been successfully updated.";h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=isDemo()?usePortalProfileDemo(getProps(this)):usePortalProfile(getProps(this));return h$1(PortalProfileView,Object.assign({},e))};return e}();function usePortalProfileDemo(e){return cjs({states:{success:false,loading:false,submitDisabled:false,showCountry:!e.hideCountry,user:{id:"01",accountId:"111100000",firstName:"Joe",lastName:"Smith",email:"jsmith@gmail.com",countryCode:"CA"},text:{firstnametext:e.firstnametext,lastnametext:e.lastnametext,emailtext:e.emailtext,countrytext:e.countrytext,editProfileHeader:e.editProfileHeader,editProfileSubHeader:e.editProfileSubHeader,submitChangeButtonText:e.submitChangeButtonText,submissionSuccessText:e.submissionSuccessText,fieldEmptyText:e.fieldEmptyText},formState:{country:"Canada",firstName:"Joe",lastName:"Smith",errors:null,error:""}},callbacks:{onSubmit:function(e){return console.log(e)},onChange:function(e){return console.log(e)}}},e.demoData||{},{arrayMerge:function(e,t){return t}})}export{PortalProfile as sqm_portal_profile};var templateObject_1,templateObject_2;
1
+ var __makeTemplateObject=this&&this.__makeTemplateObject||function(e,t){if(Object.defineProperty){Object.defineProperty(e,"raw",{value:t})}else{e.raw=t}return e};var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++){t=arguments[r];for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a))e[a]=t[a]}return e};return __assign.apply(this,arguments)};import{r as registerInstance,h as h$1}from"./index-b3a06de8.js";import{k as useState,f as useEffect,n as h}from"./stencil-hooks.module-20ad2b5f.js";import"./global-16971a34.js";import{d as dist,J,w as wn,$ as $e,i as isDemo}from"./index.module-d49ae5e7.js";import{c as cjs}from"./cjs-bdfb4486.js";import{g as getProps}from"./utils-334c1e34.js";import"./JSS-67b5cff8.js";import"./sqm-text-span-view-4c17b8c9.js";import{P as PortalProfileView}from"./sqm-portal-profile-view-c68753ea.js";import{i as isEmpty}from"./utilities-6341d9fd.js";var GET_USER=dist.gql(templateObject_1||(templateObject_1=__makeTemplateObject(["\n query {\n viewer {\n ... on User {\n id\n accountId\n firstName\n lastName\n email\n countryCode\n }\n }\n }\n"],["\n query {\n viewer {\n ... on User {\n id\n accountId\n firstName\n lastName\n email\n countryCode\n }\n }\n }\n"])));var UPSERT_USER=dist.gql(templateObject_2||(templateObject_2=__makeTemplateObject(["\n mutation (\n $id: String!\n $accountId: String!\n $firstName: String!\n $lastName: String!\n ) {\n upsertUser(\n userInput: {\n id: $id\n accountId: $accountId\n firstName: $firstName\n lastName: $lastName\n }\n ) {\n firstName\n lastName\n }\n }\n"],["\n mutation (\n $id: String!\n $accountId: String!\n $firstName: String!\n $lastName: String!\n ) {\n upsertUser(\n userInput: {\n id: $id\n accountId: $accountId\n firstName: $firstName\n lastName: $lastName\n }\n ) {\n firstName\n lastName\n }\n }\n"])));var defaultFormState={country:"",email:"",firstName:"",lastName:"",errors:{},error:""};function usePortalProfile(e){var t=J();var r=useState(false),i=r[0],a=r[1];var n=useState(undefined),s=n[0],o=n[1];var l=useState(defaultFormState),u=l[0],d=l[1];var m=wn(GET_USER,{},!(t===null||t===void 0?void 0:t.jwt));var f=$e(UPSERT_USER),c=f[0],v=f[1];useEffect((function(){if(v===null||v===void 0?void 0:v.loading)return;if(v===null||v===void 0?void 0:v.errors){d((function(e){var t,r,i;return __assign(__assign({},e),{error:(i=(r=(t=v===null||v===void 0?void 0:v.errors)===null||t===void 0?void 0:t.response)===null||r===void 0?void 0:r.errors)===null||i===void 0?void 0:i[0].message})}))}else{o((function(e){var t;return __assign(__assign({},e),(t=v===null||v===void 0?void 0:v.data)===null||t===void 0?void 0:t.upsertUser)}));if(v===null||v===void 0?void 0:v.data)a(true)}}),[v===null||v===void 0?void 0:v.loading]);useEffect((function(){var e,t;o((function(e){var t;return __assign(__assign({},e),(t=m===null||m===void 0?void 0:m.data)===null||t===void 0?void 0:t.viewer)}));d(__assign(__assign(__assign({},defaultFormState),(e=m.data)===null||e===void 0?void 0:e.viewer),(t=v.data)===null||t===void 0?void 0:t.upsertUser))}),[m===null||m===void 0?void 0:m.data]);useEffect((function(){var t,r;if((t=v===null||v===void 0?void 0:v.errors)===null||t===void 0?void 0:t.message){d(__assign(__assign({},(r=m.data)===null||r===void 0?void 0:r.viewer),{error:e.networkRequestMessage}))}}),[v===null||v===void 0?void 0:v.errors]);var g=function(){a(false);if(u.firstName&&u.lastName){c({id:t===null||t===void 0?void 0:t.id,accountId:t===null||t===void 0?void 0:t.accountId,firstName:u.firstName,lastName:u.lastName});d((function(e){return __assign(__assign({},e),{errors:{},error:""})}));return}var r={};if(!u.firstName){r["firstName"]={message:e.fieldEmptyText}}if(!u.lastName){r["lastName"]={message:e.fieldEmptyText}}if(!isEmpty(r)){d((function(t){return __assign(__assign({},t),{error:e.formErrorText})}))}d((function(e){return __assign(__assign({},e),{errors:r})}))};return{states:{success:i,loading:(m===null||m===void 0?void 0:m.loading)||v.loading,submitDisabled:false,showCountry:!e.hideCountry,formState:u,user:s,text:{firstnametext:e.firstnametext,lastnametext:e.lastnametext,countrytext:e.countrytext,emailtext:e.emailtext,editProfileHeader:e.editProfileHeader,editProfileSubHeader:e.editProfileSubHeader,submitChangeButtonText:e.submitChangeButtonText}},callbacks:{onSubmit:g,onChange:function(e){var t=e.target,r=t.name,i=t.value;d((function(e){var t;return __assign(__assign({},e),(t={},t[r]=i,t))}))}}}}var PortalProfile=function(){function e(e){registerInstance(this,e);this.ignored=true;this.firstnametext="First Name";this.lastnametext="Last Name";this.emailtext="Email";this.countrytext="Country";this.editProfileHeader="Edit your profile";this.editProfileSubHeader="Personal Information";this.submitChangeButtonText="Submit Changes";this.hideCountry=false;this.networkRequestMessage="An error occurred while loading this page. Please refresh the page.";this.fieldEmptyText="Field is required";this.formErrorText="Please correct the errors below to update your profile.";this.submissionSuccessText="Your profile has been successfully updated.";h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=isDemo()?usePortalProfileDemo(getProps(this)):usePortalProfile(getProps(this));return h$1(PortalProfileView,Object.assign({},e))};return e}();function usePortalProfileDemo(e){return cjs({states:{success:false,loading:false,submitDisabled:false,showCountry:!e.hideCountry,user:{id:"01",accountId:"111100000",firstName:"Joe",lastName:"Smith",email:"jsmith@gmail.com",countryCode:"CA"},text:{firstnametext:e.firstnametext,lastnametext:e.lastnametext,emailtext:e.emailtext,countrytext:e.countrytext,editProfileHeader:e.editProfileHeader,editProfileSubHeader:e.editProfileSubHeader,submitChangeButtonText:e.submitChangeButtonText,submissionSuccessText:e.submissionSuccessText,fieldEmptyText:e.fieldEmptyText},formState:{country:"Canada",firstName:"Joe",lastName:"Smith",errors:null,error:""}},callbacks:{onSubmit:function(e){return console.log(e)},onChange:function(e){return console.log(e)}}},e.demoData||{},{arrayMerge:function(e,t){return t}})}export{PortalProfile as sqm_portal_profile};var templateObject_1,templateObject_2;
@@ -1 +1 @@
1
- import{r as registerInstance,h as h$1,c as Host}from"./index-91e7729f.js";import{f as useEffect,n as h}from"./stencil-hooks.module-4bc38af4.js";import{J,k as kn,j as jn,i as isDemo}from"./index.module-89a79f66.js";function usePortalProtectedRoute(e){var t=e.requireEmailVerification,r=e.redirectTo,o=e.redirectToUnverified;var i;var n=J();var a=!!(n===null||n===void 0?void 0:n.jwt);var s=(i=n===null||n===void 0?void 0:n.managedIdentity)===null||i===void 0?void 0:i.emailVerified;var u=kn(),c=u.pathname,d=u.search;var l=new URLSearchParams;l.append("nextPage",""+c+d);useEffect((function(){if(!a){return jn.push({pathname:r,search:"?"+l.toString()})}if(t&&!s){return jn.push({pathname:o||r,search:"?"+l.toString()})}}),[]);return!!n}var PortalProtectedRoute=function(){function e(e){registerInstance(this,e);this.ignored=true;this.redirectTo="/";this.requireEmailVerification=false;this.redirectToUnverified="/emailVerification";h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=isDemo()?usePortalProtectedRouteDemo():usePortalProtectedRoute(this);return h$1(Host,{style:{display:e?"contents":"none"}},h$1("slot",null))};return e}();function usePortalProtectedRouteDemo(e){return true}export{PortalProtectedRoute as sqm_portal_protected_route};
1
+ import{r as registerInstance,h as h$1,c as Host}from"./index-b3a06de8.js";import{f as useEffect,n as h}from"./stencil-hooks.module-20ad2b5f.js";import{J,k as kn,j as jn,i as isDemo}from"./index.module-d49ae5e7.js";function usePortalProtectedRoute(e){var t=e.requireEmailVerification,r=e.redirectTo,o=e.redirectToUnverified;var i;var n=J();var a=!!(n===null||n===void 0?void 0:n.jwt);var s=(i=n===null||n===void 0?void 0:n.managedIdentity)===null||i===void 0?void 0:i.emailVerified;var u=kn(),c=u.pathname,d=u.search;var l=new URLSearchParams;l.append("nextPage",""+c+d);useEffect((function(){if(!a){return jn.push({pathname:r,search:"?"+l.toString()})}if(t&&!s){return jn.push({pathname:o||r,search:"?"+l.toString()})}}),[]);return!!n}var PortalProtectedRoute=function(){function e(e){registerInstance(this,e);this.ignored=true;this.redirectTo="/";this.requireEmailVerification=false;this.redirectToUnverified="/emailVerification";h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=isDemo()?usePortalProtectedRouteDemo():usePortalProtectedRoute(this);return h$1(Host,{style:{display:e?"contents":"none"}},h$1("slot",null))};return e}();function usePortalProtectedRouteDemo(e){return true}export{PortalProtectedRoute as sqm_portal_protected_route};
@@ -1 +1 @@
1
- import{h}from"./index-91e7729f.js";import{c as createStyleSheet}from"./JSS-67b5cff8.js";import{A as AuthWrapper,a as AuthColumn,H as HostBlock,b as AuthButtonsContainer,E as ErrorStyles}from"./mixins-f750863a.js";import{T as TextSpanView}from"./sqm-text-span-view-cd3902e5.js";var style={Wrapper:AuthWrapper,Column:AuthColumn,HostBlock:HostBlock,":host":{margin:"0 auto",width:"100%"},ButtonsContainer:AuthButtonsContainer,ErrorStyle:ErrorStyles};var vanillaStyle="\nsqm-portal-register {\n margin: 0 auto;\n width: 100%;\n display: block;\n}\n\n:host{\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n";var sheet=createStyleSheet(style);var styleString=sheet.toString();function PortalRegistrationFormView(e){var r,t,a,i,o,s,l,n,d,m,u,v,p,c,b,g,f,S,x,y;var w=e.states,E=e.refs,F=e.callbacks,T=e.content;if(w.error){window.scrollTo({top:0,left:0,behavior:"smooth"})}return h("div",{class:sheet.classes.Wrapper,part:"sqm-base"},h("style",{type:"text/css"},vanillaStyle,styleString),h(TextSpanView,{type:"h3"},T.pageLabel),h("sl-form",{class:sheet.classes.Column,"onSl-submit":F.submit,ref:function(e){return E.formRef.current=e},novalidate:true},((r=w.registrationFormState)===null||r===void 0?void 0:r.disabled)?h("sqm-form-message",{type:"error",exportparts:"erroralert-icon"},h("div",{part:"erroralert-text"},w.registrationFormState.disabledMessage)):w.error&&h("sqm-form-message",{type:"error",exportparts:"erroralert-icon"},h("div",{part:"erroralert-text"},e.states.error)),T.formData,!w.hideInputs&&h("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",type:"email",name:"/email",label:T.emailLabel||"Email",disabled:w.loading||((t=w.registrationFormState)===null||t===void 0?void 0:t.disabled)||w.emailDisabled,required:true,validationError:function(e){var r=e.value;if(!r){return T.requiredFieldErrorMessage}if(!r.includes("@")){return T.invalidEmailErrorMessage}}},((i=(a=w.registrationFormState)===null||a===void 0?void 0:a.initialData)===null||i===void 0?void 0:i.email)?{value:(s=(o=w.registrationFormState)===null||o===void 0?void 0:o.initialData)===null||s===void 0?void 0:s.email}:{},((n=(l=w.registrationFormState)===null||l===void 0?void 0:l.validationErrors)===null||n===void 0?void 0:n.email)?{class:sheet.classes.ErrorStyle,helpText:((m=(d=w.registrationFormState)===null||d===void 0?void 0:d.validationErrors)===null||m===void 0?void 0:m.email)||T.requiredFieldErrorMessage}:[])),!(w.hideInputs||w.hidePasswords)&&h("sqm-password-field",{fieldLabel:T.passwordLabel,"disable-validation":!w.enablePasswordValidation,meetsRequirementsText:T.meetsRequirementsText,doesNotMeetRequirementsText:T.doesNotMeetRequirementsText,minErrorText:T.minErrorText,uppercaseErrorText:T.uppercaseErrorText,lowercaseErrorText:T.lowercaseErrorText,hasErrorText:T.hasErrorText}),T.passwordField,!(w.hideInputs||w.hidePasswords)&&w.confirmPassword&&h("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",type:"password",name:"/confirmPassword",label:T.confirmPasswordLabel,disabled:w.loading||((u=w.registrationFormState)===null||u===void 0?void 0:u.disabled),required:true},((p=(v=w.registrationFormState)===null||v===void 0?void 0:v.initialData)===null||p===void 0?void 0:p.confirmPassword)?{value:(b=(c=w.registrationFormState)===null||c===void 0?void 0:c.initialData)===null||b===void 0?void 0:b.confirmPassword}:{},((f=(g=w.registrationFormState)===null||g===void 0?void 0:g.validationErrors)===null||f===void 0?void 0:f.confirmPassword)?{class:sheet.classes.ErrorStyle,helpText:((x=(S=w.registrationFormState)===null||S===void 0?void 0:S.validationErrors)===null||x===void 0?void 0:x.confirmPassword)||T.requiredFieldErrorMessage}:[])),T.emailOptIn,T.terms,h("div",{class:sheet.classes.ButtonsContainer},h("sl-button",{submit:true,loading:w.loading,disabled:(y=w.registrationFormState)===null||y===void 0?void 0:y.disabled,exportparts:"base: primarybutton-base",type:"primary"},T.submitLabel||"Register"),T.secondaryButton)))}export{PortalRegistrationFormView as P};
1
+ import{h}from"./index-b3a06de8.js";import{c as createStyleSheet}from"./JSS-67b5cff8.js";import{A as AuthWrapper,a as AuthColumn,H as HostBlock,b as AuthButtonsContainer,E as ErrorStyles}from"./mixins-f750863a.js";import{T as TextSpanView}from"./sqm-text-span-view-4c17b8c9.js";var style={Wrapper:AuthWrapper,Column:AuthColumn,HostBlock:HostBlock,":host":{margin:"0 auto",width:"100%"},ButtonsContainer:AuthButtonsContainer,ErrorStyle:ErrorStyles};var vanillaStyle="\nsqm-portal-register {\n margin: 0 auto;\n width: 100%;\n display: block;\n}\n\n:host{\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n";var sheet=createStyleSheet(style);var styleString=sheet.toString();function PortalRegistrationFormView(e){var r,t,a,i,o,s,l,n,d,m,u,v,p,c,b,g,S,f,x,y;var w=e.states,E=e.refs,F=e.callbacks,T=e.content;if(w.error){window.scrollTo({top:0,left:0,behavior:"smooth"})}return h("div",{class:sheet.classes.Wrapper,part:"sqm-base"},h("style",{type:"text/css"},vanillaStyle,styleString),h(TextSpanView,{type:"h3"},T.pageLabel),h("sl-form",{class:sheet.classes.Column,"onSl-submit":F.submit,ref:function(e){return E.formRef.current=e},novalidate:true},((r=w.registrationFormState)===null||r===void 0?void 0:r.disabled)?h("sqm-form-message",{type:"error",exportparts:"erroralert-icon"},h("div",{part:"erroralert-text"},w.registrationFormState.disabledMessage)):w.error&&h("sqm-form-message",{type:"error",exportparts:"erroralert-icon"},h("div",{part:"erroralert-text"},e.states.error)),T.formData,!w.hideInputs&&h("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",type:"email",name:"/email",label:T.emailLabel||"Email",disabled:w.loading||((t=w.registrationFormState)===null||t===void 0?void 0:t.disabled)||w.emailDisabled,required:true,validationError:function(e){var r=e.value;if(!r){return T.requiredFieldErrorMessage}if(!r.includes("@")){return T.invalidEmailErrorMessage}}},((i=(a=w.registrationFormState)===null||a===void 0?void 0:a.initialData)===null||i===void 0?void 0:i.email)?{value:(s=(o=w.registrationFormState)===null||o===void 0?void 0:o.initialData)===null||s===void 0?void 0:s.email}:{},((n=(l=w.registrationFormState)===null||l===void 0?void 0:l.validationErrors)===null||n===void 0?void 0:n.email)?{class:sheet.classes.ErrorStyle,helpText:((m=(d=w.registrationFormState)===null||d===void 0?void 0:d.validationErrors)===null||m===void 0?void 0:m.email)||T.requiredFieldErrorMessage}:[])),!(w.hideInputs||w.hidePasswords)&&h("sqm-password-field",{fieldLabel:T.passwordLabel,"disable-validation":!w.enablePasswordValidation,meetsRequirementsText:T.meetsRequirementsText,doesNotMeetRequirementsText:T.doesNotMeetRequirementsText,minErrorText:T.minErrorText,uppercaseErrorText:T.uppercaseErrorText,lowercaseErrorText:T.lowercaseErrorText,hasErrorText:T.hasErrorText}),T.passwordField,!(w.hideInputs||w.hidePasswords)&&w.confirmPassword&&h("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",type:"password",name:"/confirmPassword",label:T.confirmPasswordLabel,disabled:w.loading||((u=w.registrationFormState)===null||u===void 0?void 0:u.disabled),required:true},((p=(v=w.registrationFormState)===null||v===void 0?void 0:v.initialData)===null||p===void 0?void 0:p.confirmPassword)?{value:(b=(c=w.registrationFormState)===null||c===void 0?void 0:c.initialData)===null||b===void 0?void 0:b.confirmPassword}:{},((S=(g=w.registrationFormState)===null||g===void 0?void 0:g.validationErrors)===null||S===void 0?void 0:S.confirmPassword)?{class:sheet.classes.ErrorStyle,helpText:((x=(f=w.registrationFormState)===null||f===void 0?void 0:f.validationErrors)===null||x===void 0?void 0:x.confirmPassword)||T.requiredFieldErrorMessage}:[])),T.emailOptIn,T.terms,h("div",{class:sheet.classes.ButtonsContainer},h("sl-button",{submit:true,loading:w.loading,disabled:(y=w.registrationFormState)===null||y===void 0?void 0:y.disabled,exportparts:"base: primarybutton-base",type:"primary"},T.submitLabel||"Register"),T.secondaryButton)))}export{PortalRegistrationFormView as P};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,r,t,s){function i(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,a){function o(e){try{l(s.next(e))}catch(e){a(e)}}function n(e){try{l(s["throw"](e))}catch(e){a(e)}}function l(e){e.done?t(e.value):i(e.value).then(o,n)}l((s=s.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},s,i,a,o;return o={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function n(e){return function(r){return l([e,r])}}function l(o){if(s)throw new TypeError("Generator is already executing.");while(t)try{if(s=1,i&&(a=o[0]&2?i["return"]:o[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;if(i=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:t.label++;return{value:o[1],done:false};case 5:t.label++;i=o[1];o=[0];continue;case 7:o=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){t.label=o[1];break}if(o[0]===6&&t.label<a[1]){t.label=a[1];a=o;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(o);break}if(a[2])t.ops.pop();t.trys.pop();continue}o=r.call(e,t)}catch(e){o=[6,e];i=0}finally{s=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,h as h$1}from"./index-91e7729f.js";import{n as h}from"./stencil-hooks.module-4bc38af4.js";import{i as isDemo,j as jn}from"./index.module-89a79f66.js";import"./jsonpointer-388a7082.js";import{c as cjs}from"./cjs-bdfb4486.js";import"./JSS-67b5cff8.js";import"./mixins-f750863a.js";import"./sqm-text-span-view-cd3902e5.js";import"./useRegistrationFormState-d6f33135.js";import{P as PortalRegistrationFormView}from"./sqm-portal-registration-form-view-5d651c04.js";import"./AsYouType-46f67d0d.js";import{u as usePortalRegistrationForm}from"./usePortalRegistrationForm-4b35a357.js";var PortalRegistrationForm=function(){function e(e){registerInstance(this,e);this.ignored=true;this.nextPage="/";this.redirectPath="/verifyEmail";this.emailLabel="Email";this.passwordLabel="Password";this.submitLabel="Register";this.loginLabel="Sign in";this.confirmPasswordLabel="Confirm Password";this.confirmPassword=false;this.disablePasswordValidation=false;this.hideInputs=false;this.pageLabel="Register";this.loginPath="/login";this.requiredFieldErrorMessage="Cannot be empty";this.networkErrorMessage="Network request failed.";this.passwordMismatchErrorMessage="Passwords do not match.";this.invalidEmailErrorMessage="Must be a valid email address";this.formDisabledErrorMessage="The registration form is currently disabled.";this.meetsRequirementsText="Password has met all requirements";this.doesNotMeetRequirementsText="Password must meet the following requirements:";this.minErrorText="be a minimum of 8 characters";this.uppercaseErrorText="contain at least 1 uppercase character";this.lowercaseErrorText="contain at least 1 lowercase character";this.hasErrorText="contain at least 1 number or symbol";h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=isDemo()?useRegisterDemo(this):usePortalRegistrationForm(this),r=e.states,t=e.callbacks,s=e.refs;var i={formData:h$1("slot",{name:"formData"}),secondaryButton:h$1("slot",{name:"secondaryButton"},h$1("sl-button",{type:"text",disabled:r.loading,onClick:function(){return jn.push(r.loginPath)}},this.loginLabel)),terms:h$1("slot",{name:"terms"}),emailOptIn:h$1("slot",{name:"emailOptIn"}),emailLabel:this.emailLabel,passwordLabel:this.passwordLabel,submitLabel:this.submitLabel,pageLabel:this.pageLabel,confirmPasswordLabel:this.confirmPasswordLabel,networkErrorMessage:this.networkErrorMessage,passwordMismatchErrorMessage:this.passwordMismatchErrorMessage,invalidEmailErrorMessage:this.invalidEmailErrorMessage,formDisabledErrorMessage:this.formDisabledErrorMessage,requiredFieldErrorMessage:this.requiredFieldErrorMessage,meetsRequirementsText:this.meetsRequirementsText,doesNotMeetRequirementsText:this.doesNotMeetRequirementsText,minErrorText:this.minErrorText,uppercaseErrorText:this.uppercaseErrorText,lowercaseErrorText:this.lowercaseErrorText,hasErrorText:this.hasErrorText};return h$1(PortalRegistrationFormView,{states:r,callbacks:t,content:i,refs:s})};return e}();function useRegisterDemo(e){var r=this;return cjs({states:{error:"",loading:false,confirmPassword:e.confirmPassword,hideInputs:e.hideInputs||false,customPasswordField:false,loginPath:"/login"},callbacks:{submit:function(e){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(e){console.log("submit");return[2]}))}))},inputFunction:function(){}},refs:{formRef:{}}},e.demoData||{},{arrayMerge:function(e,r){return r}})}export{PortalRegistrationForm as sqm_portal_registration_form};
1
+ var __awaiter=this&&this.__awaiter||function(e,r,t,s){function i(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,a){function o(e){try{l(s.next(e))}catch(e){a(e)}}function n(e){try{l(s["throw"](e))}catch(e){a(e)}}function l(e){e.done?t(e.value):i(e.value).then(o,n)}l((s=s.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},s,i,a,o;return o={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function n(e){return function(r){return l([e,r])}}function l(o){if(s)throw new TypeError("Generator is already executing.");while(t)try{if(s=1,i&&(a=o[0]&2?i["return"]:o[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;if(i=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:t.label++;return{value:o[1],done:false};case 5:t.label++;i=o[1];o=[0];continue;case 7:o=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){t.label=o[1];break}if(o[0]===6&&t.label<a[1]){t.label=a[1];a=o;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(o);break}if(a[2])t.ops.pop();t.trys.pop();continue}o=r.call(e,t)}catch(e){o=[6,e];i=0}finally{s=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,h as h$1}from"./index-b3a06de8.js";import{n as h}from"./stencil-hooks.module-20ad2b5f.js";import{i as isDemo,j as jn}from"./index.module-d49ae5e7.js";import"./jsonpointer-388a7082.js";import{c as cjs}from"./cjs-bdfb4486.js";import"./JSS-67b5cff8.js";import"./mixins-f750863a.js";import"./sqm-text-span-view-4c17b8c9.js";import"./useRegistrationFormState-2db047e9.js";import{P as PortalRegistrationFormView}from"./sqm-portal-registration-form-view-8bdc3804.js";import"./AsYouType-46f67d0d.js";import{u as usePortalRegistrationForm}from"./usePortalRegistrationForm-61bf948d.js";var PortalRegistrationForm=function(){function e(e){registerInstance(this,e);this.ignored=true;this.nextPage="/";this.redirectPath="/verifyEmail";this.emailLabel="Email";this.passwordLabel="Password";this.submitLabel="Register";this.loginLabel="Sign in";this.confirmPasswordLabel="Confirm Password";this.confirmPassword=false;this.disablePasswordValidation=false;this.hideInputs=false;this.pageLabel="Register";this.loginPath="/login";this.requiredFieldErrorMessage="Cannot be empty";this.networkErrorMessage="Network request failed.";this.passwordMismatchErrorMessage="Passwords do not match.";this.invalidEmailErrorMessage="Must be a valid email address";this.formDisabledErrorMessage="The registration form is currently disabled.";this.meetsRequirementsText="Password has met all requirements";this.doesNotMeetRequirementsText="Password must meet the following requirements:";this.minErrorText="be a minimum of 8 characters";this.uppercaseErrorText="contain at least 1 uppercase character";this.lowercaseErrorText="contain at least 1 lowercase character";this.hasErrorText="contain at least 1 number or symbol";h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=isDemo()?useRegisterDemo(this):usePortalRegistrationForm(this),r=e.states,t=e.callbacks,s=e.refs;var i={formData:h$1("slot",{name:"formData"}),secondaryButton:h$1("slot",{name:"secondaryButton"},h$1("sl-button",{type:"text",disabled:r.loading,onClick:function(){return jn.push(r.loginPath)}},this.loginLabel)),terms:h$1("slot",{name:"terms"}),emailOptIn:h$1("slot",{name:"emailOptIn"}),emailLabel:this.emailLabel,passwordLabel:this.passwordLabel,submitLabel:this.submitLabel,pageLabel:this.pageLabel,confirmPasswordLabel:this.confirmPasswordLabel,networkErrorMessage:this.networkErrorMessage,passwordMismatchErrorMessage:this.passwordMismatchErrorMessage,invalidEmailErrorMessage:this.invalidEmailErrorMessage,formDisabledErrorMessage:this.formDisabledErrorMessage,requiredFieldErrorMessage:this.requiredFieldErrorMessage,meetsRequirementsText:this.meetsRequirementsText,doesNotMeetRequirementsText:this.doesNotMeetRequirementsText,minErrorText:this.minErrorText,uppercaseErrorText:this.uppercaseErrorText,lowercaseErrorText:this.lowercaseErrorText,hasErrorText:this.hasErrorText};return h$1(PortalRegistrationFormView,{states:r,callbacks:t,content:i,refs:s})};return e}();function useRegisterDemo(e){var r=this;return cjs({states:{error:"",loading:false,confirmPassword:e.confirmPassword,hideInputs:e.hideInputs||false,customPasswordField:false,loginPath:"/login"},callbacks:{submit:function(e){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(e){console.log("submit");return[2]}))}))},inputFunction:function(){}},refs:{formRef:{}}},e.demoData||{},{arrayMerge:function(e,r){return r}})}export{PortalRegistrationForm as sqm_portal_registration_form};
@@ -1 +1 @@
1
- import{h}from"./index-91e7729f.js";import{c as createStyleSheet}from"./JSS-67b5cff8.js";import{A as AuthWrapper,a as AuthColumn,b as AuthButtonsContainer}from"./mixins-f750863a.js";import{T as TextSpanView}from"./sqm-text-span-view-cd3902e5.js";var style={Wrapper:AuthWrapper,Column:AuthColumn,ButtonsContainer:AuthButtonsContainer,Banner:{"&::part(erroralert-base)":{margin:"15px 0px"}},CodeError:{"&::part(erroralert-base)":{"margin-bottom":"15px"}},CodeSuccess:{"&::part(successalert-base)":{"margin-bottom":"15px"}},ContinueButton:{width:"100%"}};var vanillaStyle="\n:host {\n display: block;\n}\n:host([hidden]): {\n display: none;\n}\n";var sheet=createStyleSheet(style);var styleString=sheet.toString();function PortalResetPasswordView(e){var t=e.states,s=e.callbacks;if(t.reset){return h("div",{class:sheet.classes.Wrapper+" "+sheet.classes.Column},h("style",{type:"text/css"},styleString),h(TextSpanView,{type:"h3"},t.content.resetPasswordHeader),h("sqm-form-message",{class:sheet.classes.CodeSuccess,exportparts:"success-icon"},h("div",{part:"successalert-text"},t.content.resetSuccessText)),h("div",null,h("sl-button",{class:sheet.classes.ContinueButton,onClick:s.gotoNextPage,loading:t.loading,exportparts:"base: primarybutton-base",type:"primary"},t.content.continueButtonText)))}if(t.oobCodeValidating){return h("div",null)}if(!t.oobCodeValid){return h("div",{class:sheet.classes.Wrapper+" "+sheet.classes.Column},h("style",{type:"text/css"},styleString),h("sqm-form-message",{class:sheet.classes.CodeError,type:"error",exportparts:"erroralert-icon"},h("div",{part:"erroralert-text"},t.content.codeInvalidText)),h("div",null,h("sl-button",{class:sheet.classes.ContinueButton,onClick:s.failed,exportparts:"base: primarybutton-base",type:"primary"},t.content.continueButtonText)))}return h("div",{class:sheet.classes.Wrapper},h("style",{type:"text/css"},vanillaStyle,styleString),h(TextSpanView,{type:"h2"},t.reset?t.content.passwordResetHeader:t.content.resetPasswordHeader),h("sl-form",{class:sheet.classes.Column,"onSl-submit":s.submit},e.states.error&&h("sqm-form-message",{type:"error",class:sheet.classes.Banner,exportparts:"erroralert-icon"},h("div",{part:"erroralert-text"},e.states.error)),!t.reset&&h("sqm-password-field",{fieldLabel:t.content.passwordFieldLabel,demoData:t.passwordDemoData,meetsRequirementsText:t.content.meetsRequirementsText,doesNotMeetRequirementsText:t.content.doesNotMeetRequirementsText,minErrorText:t.content.minErrorText,uppercaseErrorText:t.content.uppercaseErrorText,lowercaseErrorText:t.content.lowercaseErrorText,hasErrorText:t.content.hasErrorText}),!t.reset&&t.confirmPassword&&h("sl-input",{exportparts:"label: input-label, base: input-base",type:"password",name:"/confirmPassword",label:t.content.confirmPasswordFieldLabel,disabled:t.loading,required:true}),h("div",{class:sheet.classes.ButtonsContainer},h("sl-button",{class:sheet.classes.ContinueButton,submit:true,loading:t.loading,exportparts:"base: primarybutton-base",type:"primary"},t.reset?t.content.continueButtonText:t.content.resetPasswordButtonText))))}export{PortalResetPasswordView as P};
1
+ import{h}from"./index-b3a06de8.js";import{c as createStyleSheet}from"./JSS-67b5cff8.js";import{A as AuthWrapper,a as AuthColumn,b as AuthButtonsContainer}from"./mixins-f750863a.js";import{T as TextSpanView}from"./sqm-text-span-view-4c17b8c9.js";var style={Wrapper:AuthWrapper,Column:AuthColumn,ButtonsContainer:AuthButtonsContainer,Banner:{"&::part(erroralert-base)":{margin:"15px 0px"}},CodeError:{"&::part(erroralert-base)":{"margin-bottom":"15px"}},CodeSuccess:{"&::part(successalert-base)":{"margin-bottom":"15px"}},ContinueButton:{width:"100%"}};var vanillaStyle="\n:host {\n display: block;\n}\n:host([hidden]): {\n display: none;\n}\n";var sheet=createStyleSheet(style);var styleString=sheet.toString();function PortalResetPasswordView(e){var t=e.states,s=e.callbacks;if(t.reset){return h("div",{class:sheet.classes.Wrapper+" "+sheet.classes.Column},h("style",{type:"text/css"},styleString),h(TextSpanView,{type:"h3"},t.content.resetPasswordHeader),h("sqm-form-message",{class:sheet.classes.CodeSuccess,exportparts:"success-icon"},h("div",{part:"successalert-text"},t.content.resetSuccessText)),h("div",null,h("sl-button",{class:sheet.classes.ContinueButton,onClick:s.gotoNextPage,loading:t.loading,exportparts:"base: primarybutton-base",type:"primary"},t.content.continueButtonText)))}if(t.oobCodeValidating){return h("div",null)}if(!t.oobCodeValid){return h("div",{class:sheet.classes.Wrapper+" "+sheet.classes.Column},h("style",{type:"text/css"},styleString),h("sqm-form-message",{class:sheet.classes.CodeError,type:"error",exportparts:"erroralert-icon"},h("div",{part:"erroralert-text"},t.content.codeInvalidText)),h("div",null,h("sl-button",{class:sheet.classes.ContinueButton,onClick:s.failed,exportparts:"base: primarybutton-base",type:"primary"},t.content.continueButtonText)))}return h("div",{class:sheet.classes.Wrapper},h("style",{type:"text/css"},vanillaStyle,styleString),h(TextSpanView,{type:"h2"},t.reset?t.content.passwordResetHeader:t.content.resetPasswordHeader),h("sl-form",{class:sheet.classes.Column,"onSl-submit":s.submit},e.states.error&&h("sqm-form-message",{type:"error",class:sheet.classes.Banner,exportparts:"erroralert-icon"},h("div",{part:"erroralert-text"},e.states.error)),!t.reset&&h("sqm-password-field",{fieldLabel:t.content.passwordFieldLabel,demoData:t.passwordDemoData,meetsRequirementsText:t.content.meetsRequirementsText,doesNotMeetRequirementsText:t.content.doesNotMeetRequirementsText,minErrorText:t.content.minErrorText,uppercaseErrorText:t.content.uppercaseErrorText,lowercaseErrorText:t.content.lowercaseErrorText,hasErrorText:t.content.hasErrorText}),!t.reset&&t.confirmPassword&&h("sl-input",{exportparts:"label: input-label, base: input-base",type:"password",name:"/confirmPassword",label:t.content.confirmPasswordFieldLabel,disabled:t.loading,required:true}),h("div",{class:sheet.classes.ButtonsContainer},h("sl-button",{class:sheet.classes.ContinueButton,submit:true,loading:t.loading,exportparts:"base: primarybutton-base",type:"primary"},t.reset?t.content.continueButtonText:t.content.resetPasswordButtonText))))}export{PortalResetPasswordView as P};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,r,t,s){function o(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,a){function n(e){try{d(s.next(e))}catch(e){a(e)}}function i(e){try{d(s["throw"](e))}catch(e){a(e)}}function d(e){e.done?t(e.value):o(e.value).then(n,i)}d((s=s.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},s,o,a,n;return n={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function i(e){return function(r){return d([e,r])}}function d(n){if(s)throw new TypeError("Generator is already executing.");while(t)try{if(s=1,o&&(a=n[0]&2?o["return"]:n[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;if(o=0,a)n=[n[0]&2,a.value];switch(n[0]){case 0:case 1:a=n;break;case 4:t.label++;return{value:n[1],done:false};case 5:t.label++;o=n[1];n=[0];continue;case 7:n=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(n[0]===6||n[0]===2)){t=0;continue}if(n[0]===3&&(!a||n[1]>a[0]&&n[1]<a[3])){t.label=n[1];break}if(n[0]===6&&t.label<a[1]){t.label=a[1];a=n;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(n);break}if(a[2])t.ops.pop();t.trys.pop();continue}n=r.call(e,t)}catch(e){n=[6,e];o=0}finally{s=a=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};import{r as registerInstance,h as h$1}from"./index-91e7729f.js";import{k as useState,f as useEffect,n as h}from"./stencil-hooks.module-4bc38af4.js";import{f as Je,T as Te,j as jn,i as isDemo}from"./index.module-89a79f66.js";import{j as jsonpointer}from"./jsonpointer-388a7082.js";import{c as cjs}from"./cjs-bdfb4486.js";import{s as sanitizeUrlPath}from"./utils-334c1e34.js";import"./JSS-67b5cff8.js";import"./mixins-f750863a.js";import"./sqm-text-span-view-cd3902e5.js";import{P as PortalResetPasswordView}from"./sqm-portal-reset-password-view-6903828e.js";function usePortalResetPassword(e){var r=this;var t,s,o,a,n,i,d,c,u,l;var f=useState(false),w=f[0],h=f[1];var m=useState(""),p=m[0],x=m[1];var v=Je(),T=v[0],P=v[1];var b=Te(),g=b[0],E=b[1];var y=new URLSearchParams(jn.location.search);var R=y.get("oobCode");y.delete("oobCode");var _=y.get("nextPage");var j=function(){return __awaiter(r,void 0,void 0,(function(){var r;return __generator(this,(function(t){switch(t.label){case 0:return[4,T({oobCode:R})];case 1:r=t.sent();if(r instanceof Error){x(e.networkErrorMessage)}return[2]}}))}))};useEffect((function(){j()}),[]);var M=function(t){return __awaiter(r,void 0,void 0,(function(){var r,s,o;return __generator(this,(function(a){switch(a.label){case 0:x("");r=t.detail.formData;r===null||r===void 0?void 0:r.forEach((function(e,t){jsonpointer.set(r,t,e)}));s={oobCode:R,password:r.password};if(r.password!==r.confirmPassword){x(e.passwordMismatchText);return[2]}return[4,g(s)];case 1:o=a.sent();if(o instanceof Error){return[2,x(e.networkErrorMessage)]}if(o.resetManagedIdentityPassword){h(true);setTimeout((function(){k()}),5e3)}return[2]}}))}))};var k=function(){y.delete("nextPage");var r=sanitizeUrlPath(_||e.nextPage);jn.push(r.href)};var q=function(){jn.push({pathname:e.failedPage,search:y.toString()&&"?"+y.toString()})};return{states:{loading:E.loading,reset:w,confirmPassword:e.confirmPassword,error:((n=(a=(o=(s=(t=E.errors)===null||t===void 0?void 0:t.response)===null||s===void 0?void 0:s.errors)===null||o===void 0?void 0:o[0])===null||a===void 0?void 0:a.extensions)===null||n===void 0?void 0:n.message)||((u=(c=(d=(i=E.errors)===null||i===void 0?void 0:i.response)===null||d===void 0?void 0:d.errors)===null||c===void 0?void 0:c[0])===null||u===void 0?void 0:u.message)||p,oobCodeValidating:P.loading,oobCodeValid:(l=P.data)===null||l===void 0?void 0:l.verifyManagedIdentityPasswordResetCode.success,content:{passwordResetHeader:e.passwordResetHeader,resetPasswordHeader:e.resetPasswordHeader,continueButtonText:e.continueButtonText,resetPasswordButtonText:e.resetPasswordButtonText,confirmPasswordFieldLabel:e.confirmPasswordFieldLabel,passwordFieldLabel:e.passwordFieldLabel,meetsRequirementsText:e.meetsRequirementsText,doesNotMeetRequirementsText:e.doesNotMeetRequirementsText,minErrorText:e.minErrorText,uppercaseErrorText:e.uppercaseErrorText,lowercaseErrorText:e.lowercaseErrorText,hasErrorText:e.hasErrorText,passwordMismatchText:e.passwordMismatchText,codeInvalidText:e.codeInvalidText,resetSuccessText:e.resetSuccessText}},callbacks:{submit:M,failed:q,gotoNextPage:k}}}var PortalResetPassword=function(){function e(e){registerInstance(this,e);this.ignored=true;this.nextPage="/";this.failedPage="/";this.confirmPassword=false;this.resetPasswordHeader="Reset your password";this.passwordResetHeader="Password reset";this.resetPasswordButtonText="Reset Password";this.continueButtonText="Continue";this.confirmPasswordFieldLabel="Confirm Password";this.passwordFieldLabel="New Password";this.meetsRequirementsText="Password has met all requirements";this.doesNotMeetRequirementsText="Password must meet the following requirements:";this.minErrorText="be a minimum of 8 characters";this.uppercaseErrorText="contain at least 1 uppercase character";this.lowercaseErrorText="contain at least 1 lowercase character";this.hasErrorText="contain at least 1 number or symbol";this.passwordMismatchText="Passwords do not match.";this.codeInvalidText="The password reset code is invalid or has expired, please try again.";this.resetSuccessText="Your password has been reset and you are being redirected. If you are not redirected, please click Continue.";this.networkErrorMessage="An error occurred while resetting your password. Please refresh the page and try again.";h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=isDemo()?usePortalResetPasswordDemo(this):usePortalResetPassword(this),r=e.states,t=e.callbacks;return h$1(PortalResetPasswordView,{states:r,callbacks:t})};return e}();function usePortalResetPasswordDemo(e){var r=this;return cjs({states:{error:"",loading:false,reset:false,confirmPassword:e.confirmPassword,oobCodeValidating:false,oobCodeValid:true,content:{passwordResetHeader:e.passwordResetHeader,resetPasswordHeader:e.resetPasswordHeader,continueButtonText:e.continueButtonText,resetPasswordButtonText:e.resetPasswordButtonText,confirmPasswordFieldLabel:e.confirmPasswordFieldLabel,passwordFieldLabel:e.passwordFieldLabel,meetsRequirementsText:e.meetsRequirementsText,doesNotMeetRequirementsText:e.doesNotMeetRequirementsText,minErrorText:e.minErrorText,uppercaseErrorText:e.uppercaseErrorText,lowercaseErrorText:e.lowercaseErrorText,hasErrorText:e.hasErrorText,passwordMismatchText:e.passwordMismatchText,codeInvalidText:e.codeInvalidText,resetSuccessText:e.resetSuccessText}},callbacks:{submit:function(e){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(e){console.log("submit");return[2]}))}))},failed:function(){},gotoNextPage:function(){}}},e.demoData||{},{arrayMerge:function(e,r){return r}})}export{PortalResetPassword as sqm_portal_reset_password};
1
+ var __awaiter=this&&this.__awaiter||function(e,r,t,s){function o(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,a){function n(e){try{d(s.next(e))}catch(e){a(e)}}function i(e){try{d(s["throw"](e))}catch(e){a(e)}}function d(e){e.done?t(e.value):o(e.value).then(n,i)}d((s=s.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},s,o,a,n;return n={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function i(e){return function(r){return d([e,r])}}function d(n){if(s)throw new TypeError("Generator is already executing.");while(t)try{if(s=1,o&&(a=n[0]&2?o["return"]:n[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;if(o=0,a)n=[n[0]&2,a.value];switch(n[0]){case 0:case 1:a=n;break;case 4:t.label++;return{value:n[1],done:false};case 5:t.label++;o=n[1];n=[0];continue;case 7:n=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(n[0]===6||n[0]===2)){t=0;continue}if(n[0]===3&&(!a||n[1]>a[0]&&n[1]<a[3])){t.label=n[1];break}if(n[0]===6&&t.label<a[1]){t.label=a[1];a=n;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(n);break}if(a[2])t.ops.pop();t.trys.pop();continue}n=r.call(e,t)}catch(e){n=[6,e];o=0}finally{s=a=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};import{r as registerInstance,h as h$1}from"./index-b3a06de8.js";import{k as useState,f as useEffect,n as h}from"./stencil-hooks.module-20ad2b5f.js";import{f as Je,T as Te,j as jn,i as isDemo}from"./index.module-d49ae5e7.js";import{j as jsonpointer}from"./jsonpointer-388a7082.js";import{c as cjs}from"./cjs-bdfb4486.js";import{s as sanitizeUrlPath}from"./utils-334c1e34.js";import"./JSS-67b5cff8.js";import"./mixins-f750863a.js";import"./sqm-text-span-view-4c17b8c9.js";import{P as PortalResetPasswordView}from"./sqm-portal-reset-password-view-abef7286.js";function usePortalResetPassword(e){var r=this;var t,s,o,a,n,i,d,c,u,l;var f=useState(false),w=f[0],h=f[1];var m=useState(""),p=m[0],x=m[1];var v=Je(),T=v[0],P=v[1];var b=Te(),g=b[0],E=b[1];var y=new URLSearchParams(jn.location.search);var R=y.get("oobCode");y.delete("oobCode");var _=y.get("nextPage");var j=function(){return __awaiter(r,void 0,void 0,(function(){var r;return __generator(this,(function(t){switch(t.label){case 0:return[4,T({oobCode:R})];case 1:r=t.sent();if(r instanceof Error){x(e.networkErrorMessage)}return[2]}}))}))};useEffect((function(){j()}),[]);var M=function(t){return __awaiter(r,void 0,void 0,(function(){var r,s,o;return __generator(this,(function(a){switch(a.label){case 0:x("");r=t.detail.formData;r===null||r===void 0?void 0:r.forEach((function(e,t){jsonpointer.set(r,t,e)}));s={oobCode:R,password:r.password};if(r.password!==r.confirmPassword){x(e.passwordMismatchText);return[2]}return[4,g(s)];case 1:o=a.sent();if(o instanceof Error){return[2,x(e.networkErrorMessage)]}if(o.resetManagedIdentityPassword){h(true);setTimeout((function(){k()}),5e3)}return[2]}}))}))};var k=function(){y.delete("nextPage");var r=sanitizeUrlPath(_||e.nextPage);jn.push(r.href)};var q=function(){jn.push({pathname:e.failedPage,search:y.toString()&&"?"+y.toString()})};return{states:{loading:E.loading,reset:w,confirmPassword:e.confirmPassword,error:((n=(a=(o=(s=(t=E.errors)===null||t===void 0?void 0:t.response)===null||s===void 0?void 0:s.errors)===null||o===void 0?void 0:o[0])===null||a===void 0?void 0:a.extensions)===null||n===void 0?void 0:n.message)||((u=(c=(d=(i=E.errors)===null||i===void 0?void 0:i.response)===null||d===void 0?void 0:d.errors)===null||c===void 0?void 0:c[0])===null||u===void 0?void 0:u.message)||p,oobCodeValidating:P.loading,oobCodeValid:(l=P.data)===null||l===void 0?void 0:l.verifyManagedIdentityPasswordResetCode.success,content:{passwordResetHeader:e.passwordResetHeader,resetPasswordHeader:e.resetPasswordHeader,continueButtonText:e.continueButtonText,resetPasswordButtonText:e.resetPasswordButtonText,confirmPasswordFieldLabel:e.confirmPasswordFieldLabel,passwordFieldLabel:e.passwordFieldLabel,meetsRequirementsText:e.meetsRequirementsText,doesNotMeetRequirementsText:e.doesNotMeetRequirementsText,minErrorText:e.minErrorText,uppercaseErrorText:e.uppercaseErrorText,lowercaseErrorText:e.lowercaseErrorText,hasErrorText:e.hasErrorText,passwordMismatchText:e.passwordMismatchText,codeInvalidText:e.codeInvalidText,resetSuccessText:e.resetSuccessText}},callbacks:{submit:M,failed:q,gotoNextPage:k}}}var PortalResetPassword=function(){function e(e){registerInstance(this,e);this.ignored=true;this.nextPage="/";this.failedPage="/";this.confirmPassword=false;this.resetPasswordHeader="Reset your password";this.passwordResetHeader="Password reset";this.resetPasswordButtonText="Reset Password";this.continueButtonText="Continue";this.confirmPasswordFieldLabel="Confirm Password";this.passwordFieldLabel="New Password";this.meetsRequirementsText="Password has met all requirements";this.doesNotMeetRequirementsText="Password must meet the following requirements:";this.minErrorText="be a minimum of 8 characters";this.uppercaseErrorText="contain at least 1 uppercase character";this.lowercaseErrorText="contain at least 1 lowercase character";this.hasErrorText="contain at least 1 number or symbol";this.passwordMismatchText="Passwords do not match.";this.codeInvalidText="The password reset code is invalid or has expired, please try again.";this.resetSuccessText="Your password has been reset and you are being redirected. If you are not redirected, please click Continue.";this.networkErrorMessage="An error occurred while resetting your password. Please refresh the page and try again.";h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=isDemo()?usePortalResetPasswordDemo(this):usePortalResetPassword(this),r=e.states,t=e.callbacks;return h$1(PortalResetPasswordView,{states:r,callbacks:t})};return e}();function usePortalResetPasswordDemo(e){var r=this;return cjs({states:{error:"",loading:false,reset:false,confirmPassword:e.confirmPassword,oobCodeValidating:false,oobCodeValid:true,content:{passwordResetHeader:e.passwordResetHeader,resetPasswordHeader:e.resetPasswordHeader,continueButtonText:e.continueButtonText,resetPasswordButtonText:e.resetPasswordButtonText,confirmPasswordFieldLabel:e.confirmPasswordFieldLabel,passwordFieldLabel:e.passwordFieldLabel,meetsRequirementsText:e.meetsRequirementsText,doesNotMeetRequirementsText:e.doesNotMeetRequirementsText,minErrorText:e.minErrorText,uppercaseErrorText:e.uppercaseErrorText,lowercaseErrorText:e.lowercaseErrorText,hasErrorText:e.hasErrorText,passwordMismatchText:e.passwordMismatchText,codeInvalidText:e.codeInvalidText,resetSuccessText:e.resetSuccessText}},callbacks:{submit:function(e){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(e){console.log("submit");return[2]}))}))},failed:function(){},gotoNextPage:function(){}}},e.demoData||{},{arrayMerge:function(e,r){return r}})}export{PortalResetPassword as sqm_portal_reset_password};
@@ -1 +1 @@
1
- import{h}from"./index-91e7729f.js";import{c as createStyleSheet}from"./JSS-67b5cff8.js";import{A as AuthWrapper,a as AuthColumn}from"./mixins-f750863a.js";import{T as TextSpanView}from"./sqm-text-span-view-cd3902e5.js";var style={Wrapper:AuthWrapper,Column:AuthColumn,ContinueButton:{width:"100%"}};var vanillaStyle="\n:host {\n display: block;\n}\n:host([hidden]): {\n display: none;\n}\n";var sheet=createStyleSheet(style);var styleString=sheet.toString();function PortalVerifyEmailView(e){var t=e.states,s=e.data,r=e.callbacks,a=e.content;if(t.loading)return;if(t.success){return h("div",{class:sheet.classes.Wrapper,part:"sqm-base"},h("style",{type:"text/css"},vanillaStyle,styleString),h(TextSpanView,{type:"h3"},a.verifyEmailText),h("sqm-form-message",{exportparts:"success-icon"},h("div",{part:"successalert-text"},a.verifySuccessText)),h("sl-button",{class:sheet.classes.ContinueButton,onClick:r.gotoNextPage,loading:t.loading,exportparts:"base: primarybutton-base",type:"primary"},a.continueText))}if(t.error||!s.oobCode){return h("div",{class:sheet.classes.Wrapper,part:"sqm-base"},h("style",{type:"text/css"},styleString),h(TextSpanView,{type:"h3"},a.verifyEmailText),h("sqm-form-message",{type:"error",exportparts:"erroralert-icon"},h("div",{part:"erroralert-text"},a.verifyInvalidText)),h("sl-button",{class:sheet.classes.ContinueButton,onClick:r.failed,disabled:t.loading,exportparts:"base: primarybutton-base",type:"primary"},a.continueText))}}export{PortalVerifyEmailView as P};
1
+ import{h}from"./index-b3a06de8.js";import{c as createStyleSheet}from"./JSS-67b5cff8.js";import{A as AuthWrapper,a as AuthColumn}from"./mixins-f750863a.js";import{T as TextSpanView}from"./sqm-text-span-view-4c17b8c9.js";var style={Wrapper:AuthWrapper,Column:AuthColumn,ContinueButton:{width:"100%"}};var vanillaStyle="\n:host {\n display: block;\n}\n:host([hidden]): {\n display: none;\n}\n";var sheet=createStyleSheet(style);var styleString=sheet.toString();function PortalVerifyEmailView(e){var t=e.states,s=e.data,r=e.callbacks,a=e.content;if(t.loading)return;if(t.success){return h("div",{class:sheet.classes.Wrapper,part:"sqm-base"},h("style",{type:"text/css"},vanillaStyle,styleString),h(TextSpanView,{type:"h3"},a.verifyEmailText),h("sqm-form-message",{exportparts:"success-icon"},h("div",{part:"successalert-text"},a.verifySuccessText)),h("sl-button",{class:sheet.classes.ContinueButton,onClick:r.gotoNextPage,loading:t.loading,exportparts:"base: primarybutton-base",type:"primary"},a.continueText))}if(t.error||!s.oobCode){return h("div",{class:sheet.classes.Wrapper,part:"sqm-base"},h("style",{type:"text/css"},styleString),h(TextSpanView,{type:"h3"},a.verifyEmailText),h("sqm-form-message",{type:"error",exportparts:"erroralert-icon"},h("div",{part:"erroralert-text"},a.verifyInvalidText)),h("sl-button",{class:sheet.classes.ContinueButton,onClick:r.failed,disabled:t.loading,exportparts:"base: primarybutton-base",type:"primary"},a.continueText))}}export{PortalVerifyEmailView as P};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,i,r){function n(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r["throw"](e))}catch(e){a(e)}}function l(e){e.done?i(e.value):n(e.value).then(o,s)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,n,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return l([e,t])}}function l(o){if(r)throw new TypeError("Generator is already executing.");while(i)try{if(r=1,n&&(a=o[0]&2?n["return"]:o[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;if(n=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;n=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(o[0]===6&&i.label<a[1]){i.label=a[1];a=o;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(o);break}if(a[2])i.ops.pop();i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e];n=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,h as h$1}from"./index-91e7729f.js";import{k as useState,f as useEffect,n as h}from"./stencil-hooks.module-4bc38af4.js";import{J,o as an,j as jn,b as setUserIdentity,i as isDemo}from"./index.module-89a79f66.js";import{c as cjs}from"./cjs-bdfb4486.js";import{s as sanitizeUrlPath,g as getProps}from"./utils-334c1e34.js";import"./JSS-67b5cff8.js";import"./mixins-f750863a.js";import"./sqm-text-span-view-cd3902e5.js";import{P as PortalVerifyEmailView}from"./sqm-portal-verify-email-view-01ac711f.js";var globalPromise=null;function usePortalVerifyEmail(e){var t=this;var i=e.nextPage,r=e.failedPage,n=e.verifySuccessText,a=e.verifyEmailText,o=e.verifyInvalidText,s=e.networkErrorMessage,l=e.continueText;var u,c,f,d,v,m,y,h,g,p;var x=useState(false),b=x[0],P=x[1];var T=useState(false),w=T[0],E=T[1];var j=J();var S=an(),_=S[0],k=S[1],I=k.loading,V=k.data,C=k.errors;var D=new URLSearchParams(jn.location.search);var M=D.get("oobCode");var U=D.get("email");var q=D.get("nextPage");var z=V===undefined&&C===undefined&&!!M;var N=!!(((u=j===null||j===void 0?void 0:j.managedIdentity)===null||u===void 0?void 0:u.emailVerified)||((c=V===null||V===void 0?void 0:V.verifyManagedIdentityEmail)===null||c===void 0?void 0:c.success)||w);var $=((f=j===null||j===void 0?void 0:j.managedIdentity)===null||f===void 0?void 0:f.email)===U;var A=function(){return jn.push({pathname:r,search:D.toString()&&"?"+D.toString()})};var G=function(){D.delete("nextPage");var e=sanitizeUrlPath(q||i);jn.push(e.href)};var L=function(){setTimeout((function(){setUserIdentity(undefined);G()}),3e3)};var R=function(){setTimeout(G,3e3)};useEffect((function(){var e=function(){return __awaiter(t,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:if(!globalPromise)globalPromise=_({oobCode:M});return[4,globalPromise];case 1:e=t.sent();if(!(e instanceof Error)&&e.verifyManagedIdentityEmail.success){E(true)}P(true);return[2]}}))}))};e()}),[]);useEffect((function(){if(!b)return;if(N&&$)R();else L()}),[b,N]);return{states:{loading:I||!b,disableContinue:z,error:((y=(m=(v=(d=C===null||C===void 0?void 0:C.response)===null||d===void 0?void 0:d.errors)===null||v===void 0?void 0:v[0])===null||m===void 0?void 0:m.extensions)===null||y===void 0?void 0:y.message)||((p=(g=(h=C===null||C===void 0?void 0:C.response)===null||h===void 0?void 0:h.errors)===null||g===void 0?void 0:g[0])===null||p===void 0?void 0:p.message)||((C===null||C===void 0?void 0:C.message)||!$)&&s,success:b&&(N||$)},data:{oobCode:M},callbacks:{failed:A,gotoNextPage:G},content:{verifySuccessText:n,verifyEmailText:a,verifyInvalidText:o,continueText:l}}}var PortalVerifyEmail=function(){function e(e){registerInstance(this,e);this.ignored=true;this.nextPage="/";this.failedPage="/";this.verifyEmailText="Verify your email";this.verifySuccessText="Your email has been verified and you are being redirected. If you are not redirected, please click Continue.";this.verifyInvalidText="The email verification code is invalid or has expired, please try again.";this.continueText="Continue";this.networkErrorMessage="An error occurred while verifying your email. Please refresh the page and try again.";h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=isDemo()?usePortalVerifyEmailDemo(getProps(this)):usePortalVerifyEmail(getProps(this)),t=e.states,i=e.data,r=e.callbacks,n=e.content;return h$1(PortalVerifyEmailView,{states:t,data:i,callbacks:r,content:n})};return e}();function usePortalVerifyEmailDemo(e){return cjs({states:{error:"",loading:false,success:true},data:{oobCode:"code"},callbacks:{failed:function(){console.log("failed")},gotoNextPage:function(){}},content:{verifySuccessText:e.verifySuccessText,verifyEmailText:e.verifyEmailText,verifyInvalidText:e.verifyInvalidText,continueText:e.continueText}},e.demoData||{},{arrayMerge:function(e,t){return t}})}export{PortalVerifyEmail as sqm_portal_verify_email};
1
+ var __awaiter=this&&this.__awaiter||function(e,t,i,r){function n(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r["throw"](e))}catch(e){a(e)}}function l(e){e.done?i(e.value):n(e.value).then(o,s)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,n,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return l([e,t])}}function l(o){if(r)throw new TypeError("Generator is already executing.");while(i)try{if(r=1,n&&(a=o[0]&2?n["return"]:o[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;if(n=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;n=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(o[0]===6&&i.label<a[1]){i.label=a[1];a=o;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(o);break}if(a[2])i.ops.pop();i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e];n=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,h as h$1}from"./index-b3a06de8.js";import{k as useState,f as useEffect,n as h}from"./stencil-hooks.module-20ad2b5f.js";import{J,o as an,j as jn,b as setUserIdentity,i as isDemo}from"./index.module-d49ae5e7.js";import{c as cjs}from"./cjs-bdfb4486.js";import{s as sanitizeUrlPath,g as getProps}from"./utils-334c1e34.js";import"./JSS-67b5cff8.js";import"./mixins-f750863a.js";import"./sqm-text-span-view-4c17b8c9.js";import{P as PortalVerifyEmailView}from"./sqm-portal-verify-email-view-33805220.js";var globalPromise=null;function usePortalVerifyEmail(e){var t=this;var i=e.nextPage,r=e.failedPage,n=e.verifySuccessText,a=e.verifyEmailText,o=e.verifyInvalidText,s=e.networkErrorMessage,l=e.continueText;var u,c,f,d,v,m,y,h,g,p;var b=useState(false),x=b[0],P=b[1];var T=useState(false),w=T[0],E=T[1];var j=J();var S=an(),_=S[0],k=S[1],I=k.loading,V=k.data,C=k.errors;var D=new URLSearchParams(jn.location.search);var M=D.get("oobCode");var U=D.get("email");var q=D.get("nextPage");var z=V===undefined&&C===undefined&&!!M;var N=!!(((u=j===null||j===void 0?void 0:j.managedIdentity)===null||u===void 0?void 0:u.emailVerified)||((c=V===null||V===void 0?void 0:V.verifyManagedIdentityEmail)===null||c===void 0?void 0:c.success)||w);var $=((f=j===null||j===void 0?void 0:j.managedIdentity)===null||f===void 0?void 0:f.email)===U;var A=function(){return jn.push({pathname:r,search:D.toString()&&"?"+D.toString()})};var G=function(){D.delete("nextPage");var e=sanitizeUrlPath(q||i);jn.push(e.href)};var L=function(){setTimeout((function(){setUserIdentity(undefined);G()}),3e3)};var R=function(){setTimeout(G,3e3)};useEffect((function(){var e=function(){return __awaiter(t,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:if(!globalPromise)globalPromise=_({oobCode:M});return[4,globalPromise];case 1:e=t.sent();if(!(e instanceof Error)&&e.verifyManagedIdentityEmail.success){E(true)}P(true);return[2]}}))}))};e()}),[]);useEffect((function(){if(!x)return;if(N&&$)R();else L()}),[x,N]);return{states:{loading:I||!x,disableContinue:z,error:((y=(m=(v=(d=C===null||C===void 0?void 0:C.response)===null||d===void 0?void 0:d.errors)===null||v===void 0?void 0:v[0])===null||m===void 0?void 0:m.extensions)===null||y===void 0?void 0:y.message)||((p=(g=(h=C===null||C===void 0?void 0:C.response)===null||h===void 0?void 0:h.errors)===null||g===void 0?void 0:g[0])===null||p===void 0?void 0:p.message)||((C===null||C===void 0?void 0:C.message)||!$)&&s,success:x&&(N||$)},data:{oobCode:M},callbacks:{failed:A,gotoNextPage:G},content:{verifySuccessText:n,verifyEmailText:a,verifyInvalidText:o,continueText:l}}}var PortalVerifyEmail=function(){function e(e){registerInstance(this,e);this.ignored=true;this.nextPage="/";this.failedPage="/";this.verifyEmailText="Verify your email";this.verifySuccessText="Your email has been verified and you are being redirected. If you are not redirected, please click Continue.";this.verifyInvalidText="The email verification code is invalid or has expired, please try again.";this.continueText="Continue";this.networkErrorMessage="An error occurred while verifying your email. Please refresh the page and try again.";h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=isDemo()?usePortalVerifyEmailDemo(getProps(this)):usePortalVerifyEmail(getProps(this)),t=e.states,i=e.data,r=e.callbacks,n=e.content;return h$1(PortalVerifyEmailView,{states:t,data:i,callbacks:r,content:n})};return e}();function usePortalVerifyEmailDemo(e){return cjs({states:{error:"",loading:false,success:true},data:{oobCode:"code"},callbacks:{failed:function(){console.log("failed")},gotoNextPage:function(){}},content:{verifySuccessText:e.verifySuccessText,verifyEmailText:e.verifyEmailText,verifyInvalidText:e.verifyInvalidText,continueText:e.continueText}},e.demoData||{},{arrayMerge:function(e,t){return t}})}export{PortalVerifyEmail as sqm_portal_verify_email};
@@ -1 +1 @@
1
- import{h}from"./index-91e7729f.js";import{c as createStyleSheet}from"./JSS-67b5cff8.js";import{E as ErrorView}from"./ErrorView-48e2b969.js";var style={DialogContainer:{maxWidth:"390px !important"},Container:{width:"100%",display:"flex",flexDirection:"row",gap:"var(--sl-spacing-small)"},TextContainer:{display:"flex",gap:"var(--sl-spacing-medium)",flexDirection:"column",alignItems:"center"},ButtonContainer:{display:"flex",gap:"var(--sl-spacing-medium)"},FooterContainer:{textAlign:"left",display:"flex",flexDirection:"column",gap:"var(--sl-spacing-medium)"},CodeContainer:{display:"flex",width:"100%",alignItems:"center",justifyContent:"center"},Code:{width:"100%",height:"100%",maxWidth:"335px"},LoadingSkeleton:{"&::part(indicator)":{borderRadius:"0px !important"}}};var sheet=createStyleSheet(style);var styleString=sheet.toString();var vanillaStyle="\n :host{\n display: flex;\n width: 100%;\n }\n @media (max-width: 499px) {\n :host{\n display: block;\n }\n\n }";function QrCodeView(e){var t=e.error,r=e.qrLink,i=e.titleText,a=e.downloadCodeText,n=e.printCodeText,l=e.errorHeaderText,s=e.errorDescriptionText,o=e.createDownloadable,d=e.createPrintable,p=e.hideTitle,c=e.alignment,m=e.loading;var x=c==="left"?"flex-start":c==="right"?"flex-end":"center";var f=function(e,t,r){if(e){return h(ErrorView,{loadingErrorAlertDescription:l,loadingErrorAlertHeader:s})}else if(r){return h("sl-skeleton",{className:sheet.classes.LoadingSkeleton,effect:"sheen",style:{width:"100px",height:"100px",borderRadius:"0px !important"}})}else if(t){return h("svg",{width:"100",height:"100"},h("image",{href:t,width:"100",height:"100"}))}return null};var g=f(t,r,m);return h("div",{class:sheet.classes.Container,style:{justifyContent:x},part:"sqm-base"},h("style",null,vanillaStyle),h("style",null,styleString),h("div",{class:sheet.classes.TextContainer,style:{alignItems:x}},!p&&h("span",{part:"sqm-title"},i),g,h("div",{class:sheet.classes.ButtonContainer},h("sl-button",{size:"small",exportparts:"base: primarybutton-base",type:"primary",onClick:o},a),h("sl-button",{size:"small",exportparts:"base: tertiarybutton-base",type:"text",onClick:d},n))))}export{QrCodeView as Q};
1
+ import{h}from"./index-b3a06de8.js";import{c as createStyleSheet}from"./JSS-67b5cff8.js";import{E as ErrorView}from"./ErrorView-eaafd6f5.js";var style={DialogContainer:{maxWidth:"390px !important"},Container:{width:"100%",display:"flex",flexDirection:"row",gap:"var(--sl-spacing-small)"},TextContainer:{display:"flex",gap:"var(--sl-spacing-medium)",flexDirection:"column",alignItems:"center"},ButtonContainer:{display:"flex",gap:"var(--sl-spacing-medium)"},FooterContainer:{textAlign:"left",display:"flex",flexDirection:"column",gap:"var(--sl-spacing-medium)"},CodeContainer:{display:"flex",width:"100%",alignItems:"center",justifyContent:"center"},Code:{width:"100%",height:"100%",maxWidth:"335px"},LoadingSkeleton:{"&::part(indicator)":{borderRadius:"0px !important"}}};var sheet=createStyleSheet(style);var styleString=sheet.toString();var vanillaStyle="\n :host{\n display: flex;\n width: 100%;\n }\n @media (max-width: 499px) {\n :host{\n display: block;\n }\n\n }";function QrCodeView(e){var t=e.error,r=e.qrLink,i=e.titleText,a=e.downloadCodeText,n=e.printCodeText,l=e.errorHeaderText,s=e.errorDescriptionText,o=e.createDownloadable,d=e.createPrintable,p=e.hideTitle,c=e.alignment,m=e.loading;var x=c==="left"?"flex-start":c==="right"?"flex-end":"center";var f=function(e,t,r){if(e){return h(ErrorView,{loadingErrorAlertDescription:l,loadingErrorAlertHeader:s})}else if(r){return h("sl-skeleton",{className:sheet.classes.LoadingSkeleton,effect:"sheen",style:{width:"100px",height:"100px",borderRadius:"0px !important"}})}else if(t){return h("svg",{width:"100",height:"100"},h("image",{href:t,width:"100",height:"100"}))}return null};var g=f(t,r,m);return h("div",{class:sheet.classes.Container,style:{justifyContent:x},part:"sqm-base"},h("style",null,vanillaStyle),h("style",null,styleString),h("div",{class:sheet.classes.TextContainer,style:{alignItems:x}},!p&&h("span",{part:"sqm-title"},i),g,h("div",{class:sheet.classes.ButtonContainer},h("sl-button",{size:"small",exportparts:"base: primarybutton-base",type:"primary",onClick:o},a),h("sl-button",{size:"small",exportparts:"base: tertiarybutton-base",type:"text",onClick:d},n))))}export{QrCodeView as Q};
@@ -1 +1 @@
1
- var __makeTemplateObject=this&&this.__makeTemplateObject||function(e,t){if(Object.defineProperty){Object.defineProperty(e,"raw",{value:t})}else{e.raw=t}return e};var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a))e[a]=t[a]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,r,n){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function i(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n["throw"](e))}catch(e){o(e)}}function c(e){e.done?r(e.value):a(e.value).then(i,s)}c((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,a,o,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(e){return function(t){return c([e,t])}}function c(i){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,a&&(o=i[0]&2?a["return"]:i[0]?a["throw"]||((o=a["return"])&&o.call(a),0):a.next)&&!(o=o.call(a,i[1])).done)return o;if(a=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:r.label++;return{value:i[1],done:false};case 5:r.label++;a=i[1];i=[0];continue;case 7:i=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){r.label=i[1];break}if(i[0]===6&&r.label<o[1]){r.label=o[1];o=i;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(i);break}if(o[2])r.ops.pop();r.trys.pop();continue}i=t.call(e,r)}catch(e){i=[6,e];a=0}finally{n=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};import{r as registerInstance,h as h$1}from"./index-91e7729f.js";import{k as useState,f as useEffect,n as h}from"./stencil-hooks.module-4bc38af4.js";import{d as dist,H,J,F as Fn,w as wn,$ as $e,B,i as isDemo}from"./index.module-89a79f66.js";import{c as cjs}from"./cjs-bdfb4486.js";import{g as getProps}from"./utils-334c1e34.js";import"./JSS-67b5cff8.js";import{a as REFERRAL_CODES_NAMESPACE}from"./useReferralCodes-8f75921a.js";import"./ErrorView-48e2b969.js";import{Q as QrCodeView}from"./sqm-qr-code-view-62c10948.js";var ShareLinkQuery=dist.gql(templateObject_1||(templateObject_1=__makeTemplateObject(["\n query shareLink($programId: ID, $engagementMedium: UserEngagementMedium!) {\n user: viewer {\n ... on User {\n shareLink(\n programId: $programId\n engagementMedium: $engagementMedium\n shareMedium: DIRECT\n )\n }\n }\n }\n"],["\n query shareLink($programId: ID, $engagementMedium: UserEngagementMedium!) {\n user: viewer {\n ... on User {\n shareLink(\n programId: $programId\n engagementMedium: $engagementMedium\n shareMedium: DIRECT\n )\n }\n }\n }\n"])));var WIDGET_ENGAGEMENT_EVENT=dist.gql(templateObject_2||(templateObject_2=__makeTemplateObject(["\n mutation loadEvent($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"],["\n mutation loadEvent($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"])));function useQRCode(e){var t=this;var r;var n=H();var a=J();var o=B();var i=Fn(REFERRAL_CODES_NAMESPACE);var s=useState(null),c=s[0],u=s[1];var d=useState(false),l=d[0],f=d[1];var m=useState(false),v=m[0],h=m[1];var g=wn(ShareLinkQuery,{programId:n,engagementMedium:o},!(a===null||a===void 0?void 0:a.jwt)||(i===null||i===void 0?void 0:i.shareLink)!==undefined),p=g.data,_=g.errors,b=g.loading;var w=$e(WIDGET_ENGAGEMENT_EVENT)[0];var E=(r=p===null||p===void 0?void 0:p.user)===null||r===void 0?void 0:r.shareLink;var C=E+"?qrCode";var y=b||v;useEffect((function(){if(!E)return;var e=function(){return __awaiter(t,void 0,void 0,(function(){var e,t,r,n;return __generator(this,(function(a){switch(a.label){case 0:h(true);a.label=1;case 1:a.trys.push([1,4,5,6]);return[4,fetch(E+"?qrCode&qrCodeImageFormat=svg&qrCodeQuietZoneSize=0")];case 2:e=a.sent();return[4,e.blob()];case 3:t=a.sent();r=URL.createObjectURL(t);u(r);return[3,6];case 4:n=a.sent();f(true);return[3,6];case 5:h(false);return[7];case 6:return[2]}}))}))};e()}),[E]);var R=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){w({eventMeta:{programId:n,id:a===null||a===void 0?void 0:a.id,accountId:a===null||a===void 0?void 0:a.accountId,type:"USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",meta:{engagementMedium:o,shareMedium:"DIRECT"}}});return[2]}))}))};var T=function(){return __awaiter(t,void 0,void 0,(function(){var e,t,r,n,a;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,3,,4]);return[4,fetch(C+"&qrCodeSize=800&qrCodeImageFormat=png")];case 1:e=o.sent();return[4,e.blob()];case 2:t=o.sent();r=URL.createObjectURL(t);if(t)R();n=document.createElement("a");n.href=r;n.download="qrCode.png";document.body.appendChild(n);n.click();document.body.removeChild(n);return[3,4];case 3:a=o.sent();console.error("Failed to fetch QR code:",a);f(true);return[3,4];case 4:return[2]}}))}))};var j=function(){return __awaiter(t,void 0,void 0,(function(){var e,t,r,n,a,o;return __generator(this,(function(i){switch(i.label){case 0:i.trys.push([0,3,,4]);return[4,fetch(C+"&qrCodeSize=1000&qrCodeImageFormat=png&qrCodeErrorCorrectionLevel=H")];case 1:e=i.sent();return[4,e.blob()];case 2:t=i.sent();r=URL.createObjectURL(t);if(t)R();n=window.open("about:blank","_new");a=n.document.createElement("img");a.src=r;a.onload=function(){n.print();n.close()};n.document.body.appendChild(a);return[3,4];case 3:o=i.sent();console.error("Failed to fetch QR code: ",o);f(true);return[3,4];case 4:return[2]}}))}))};return __assign(__assign({},e),{loading:y,qrLink:c,error:l,createDownloadable:T,createPrintable:j})}var QrCode=function(){function e(e){registerInstance(this,e);this.titleText="Share your QR code";this.viewCodeText="View QR code";this.downloadCodeText="Download";this.printCodeText="Print";this.errorHeaderText="There was an error loading your QR code";this.errorDescriptionText="Please refresh this page and try again";this.hideTitle=false;this.alignment="center";h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=getProps(this);var t=isDemo()?useDemoQRCode(e):useQRCode(e);return h$1(QrCodeView,Object.assign({},t))};return e}();function useDemoQRCode(e){var t=this;var r=useState(false),n=r[0],a=r[1];return cjs({dialogIsOpen:n,hideTitle:e.hideTitle,showDialog:function(){return a(true)},hideDialog:function(){return a(false)},titleText:e.titleText,viewCodeText:e.viewCodeText,downloadCodeText:e.downloadCodeText,printCodeText:e.printCodeText,alignment:e.alignment,qrLink:"https://media.istockphoto.com/id/1251071788/vector/qr-code-bar-code-black-icon-digital-technology.jpg?s=612x612&w=0&k=20&c=maw4OqMSEegAdSo8Drm9HO7i1ddddvP2YaL1UuWbRig=",fireViewQrEvent:function(){console.log("View QR Code clicked")},createDownloadable:function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){console.log("Download QR Code clicked");return[2]}))}))},createPrintable:function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){console.log("Print QR Code clicked");return[2]}))}))}},e.demoData||{},{arrayMerge:function(e,t){return t}})}export{QrCode as sqm_qr_code};var templateObject_1,templateObject_2;
1
+ var __makeTemplateObject=this&&this.__makeTemplateObject||function(e,t){if(Object.defineProperty){Object.defineProperty(e,"raw",{value:t})}else{e.raw=t}return e};var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a))e[a]=t[a]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,r,n){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function i(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n["throw"](e))}catch(e){o(e)}}function c(e){e.done?r(e.value):a(e.value).then(i,s)}c((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,a,o,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(e){return function(t){return c([e,t])}}function c(i){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,a&&(o=i[0]&2?a["return"]:i[0]?a["throw"]||((o=a["return"])&&o.call(a),0):a.next)&&!(o=o.call(a,i[1])).done)return o;if(a=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:r.label++;return{value:i[1],done:false};case 5:r.label++;a=i[1];i=[0];continue;case 7:i=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){r.label=i[1];break}if(i[0]===6&&r.label<o[1]){r.label=o[1];o=i;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(i);break}if(o[2])r.ops.pop();r.trys.pop();continue}i=t.call(e,r)}catch(e){i=[6,e];a=0}finally{n=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};import{r as registerInstance,h as h$1}from"./index-b3a06de8.js";import{k as useState,f as useEffect,n as h}from"./stencil-hooks.module-20ad2b5f.js";import{d as dist,H,J,F as Fn,w as wn,$ as $e,B,i as isDemo}from"./index.module-d49ae5e7.js";import{c as cjs}from"./cjs-bdfb4486.js";import{g as getProps}from"./utils-334c1e34.js";import"./JSS-67b5cff8.js";import{a as REFERRAL_CODES_NAMESPACE}from"./useReferralCodes-0b798295.js";import"./ErrorView-eaafd6f5.js";import{Q as QrCodeView}from"./sqm-qr-code-view-358607d1.js";var ShareLinkQuery=dist.gql(templateObject_1||(templateObject_1=__makeTemplateObject(["\n query shareLink($programId: ID, $engagementMedium: UserEngagementMedium!) {\n user: viewer {\n ... on User {\n shareLink(\n programId: $programId\n engagementMedium: $engagementMedium\n shareMedium: DIRECT\n )\n }\n }\n }\n"],["\n query shareLink($programId: ID, $engagementMedium: UserEngagementMedium!) {\n user: viewer {\n ... on User {\n shareLink(\n programId: $programId\n engagementMedium: $engagementMedium\n shareMedium: DIRECT\n )\n }\n }\n }\n"])));var WIDGET_ENGAGEMENT_EVENT=dist.gql(templateObject_2||(templateObject_2=__makeTemplateObject(["\n mutation loadEvent($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"],["\n mutation loadEvent($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"])));function useQRCode(e){var t=this;var r;var n=H();var a=J();var o=B();var i=Fn(REFERRAL_CODES_NAMESPACE);var s=useState(null),c=s[0],u=s[1];var d=useState(false),l=d[0],f=d[1];var m=useState(false),v=m[0],h=m[1];var g=wn(ShareLinkQuery,{programId:n,engagementMedium:o},!(a===null||a===void 0?void 0:a.jwt)||(i===null||i===void 0?void 0:i.shareLink)!==undefined),p=g.data,_=g.errors,b=g.loading;var w=$e(WIDGET_ENGAGEMENT_EVENT)[0];var E=(r=p===null||p===void 0?void 0:p.user)===null||r===void 0?void 0:r.shareLink;var C=E+"?qrCode";var y=b||v;useEffect((function(){if(!E)return;var e=function(){return __awaiter(t,void 0,void 0,(function(){var e,t,r,n;return __generator(this,(function(a){switch(a.label){case 0:h(true);a.label=1;case 1:a.trys.push([1,4,5,6]);return[4,fetch(E+"?qrCode&qrCodeImageFormat=svg&qrCodeQuietZoneSize=0")];case 2:e=a.sent();return[4,e.blob()];case 3:t=a.sent();r=URL.createObjectURL(t);u(r);return[3,6];case 4:n=a.sent();f(true);return[3,6];case 5:h(false);return[7];case 6:return[2]}}))}))};e()}),[E]);var R=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){w({eventMeta:{programId:n,id:a===null||a===void 0?void 0:a.id,accountId:a===null||a===void 0?void 0:a.accountId,type:"USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",meta:{engagementMedium:o,shareMedium:"DIRECT"}}});return[2]}))}))};var T=function(){return __awaiter(t,void 0,void 0,(function(){var e,t,r,n,a;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,3,,4]);return[4,fetch(C+"&qrCodeSize=800&qrCodeImageFormat=png")];case 1:e=o.sent();return[4,e.blob()];case 2:t=o.sent();r=URL.createObjectURL(t);if(t)R();n=document.createElement("a");n.href=r;n.download="qrCode.png";document.body.appendChild(n);n.click();document.body.removeChild(n);return[3,4];case 3:a=o.sent();console.error("Failed to fetch QR code:",a);f(true);return[3,4];case 4:return[2]}}))}))};var j=function(){return __awaiter(t,void 0,void 0,(function(){var e,t,r,n,a,o;return __generator(this,(function(i){switch(i.label){case 0:i.trys.push([0,3,,4]);return[4,fetch(C+"&qrCodeSize=1000&qrCodeImageFormat=png&qrCodeErrorCorrectionLevel=H")];case 1:e=i.sent();return[4,e.blob()];case 2:t=i.sent();r=URL.createObjectURL(t);if(t)R();n=window.open("about:blank","_new");a=n.document.createElement("img");a.src=r;a.onload=function(){n.print();n.close()};n.document.body.appendChild(a);return[3,4];case 3:o=i.sent();console.error("Failed to fetch QR code: ",o);f(true);return[3,4];case 4:return[2]}}))}))};return __assign(__assign({},e),{loading:y,qrLink:c,error:l,createDownloadable:T,createPrintable:j})}var QrCode=function(){function e(e){registerInstance(this,e);this.titleText="Share your QR code";this.viewCodeText="View QR code";this.downloadCodeText="Download";this.printCodeText="Print";this.errorHeaderText="There was an error loading your QR code";this.errorDescriptionText="Please refresh this page and try again";this.hideTitle=false;this.alignment="center";h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=getProps(this);var t=isDemo()?useDemoQRCode(e):useQRCode(e);return h$1(QrCodeView,Object.assign({},t))};return e}();function useDemoQRCode(e){var t=this;var r=useState(false),n=r[0],a=r[1];return cjs({dialogIsOpen:n,hideTitle:e.hideTitle,showDialog:function(){return a(true)},hideDialog:function(){return a(false)},titleText:e.titleText,viewCodeText:e.viewCodeText,downloadCodeText:e.downloadCodeText,printCodeText:e.printCodeText,alignment:e.alignment,qrLink:"https://media.istockphoto.com/id/1251071788/vector/qr-code-bar-code-black-icon-digital-technology.jpg?s=612x612&w=0&k=20&c=maw4OqMSEegAdSo8Drm9HO7i1ddddvP2YaL1UuWbRig=",fireViewQrEvent:function(){console.log("View QR Code clicked")},createDownloadable:function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){console.log("Download QR Code clicked");return[2]}))}))},createPrintable:function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){console.log("Print QR Code clicked");return[2]}))}))}},e.demoData||{},{arrayMerge:function(e,t){return t}})}export{QrCode as sqm_qr_code};var templateObject_1,templateObject_2;
@@ -1 +1 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++){t=arguments[r];for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,r,a){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function l(e){try{o(a.next(e))}catch(e){i(e)}}function s(e){try{o(a["throw"](e))}catch(e){i(e)}}function o(e){e.done?r(e.value):n(e.value).then(l,s)}o((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,n,i,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(e){return function(t){return o([e,t])}}function o(l){if(a)throw new TypeError("Generator is already executing.");while(r)try{if(a=1,n&&(i=l[0]&2?n["return"]:l[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;if(n=0,i)l=[l[0]&2,i.value];switch(l[0]){case 0:case 1:i=l;break;case 4:r.label++;return{value:l[1],done:false};case 5:r.label++;n=l[1];l=[0];continue;case 7:l=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){r.label=l[1];break}if(l[0]===6&&r.label<i[1]){r.label=i[1];i=l;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(l);break}if(i[2])r.ops.pop();r.trys.pop();continue}l=t.call(e,r)}catch(e){l=[6,e];n=0}finally{a=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};var __spreadArrays=this&&this.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var a=Array(e),n=0,t=0;t<r;t++)for(var i=arguments[t],l=0,s=i.length;l<s;l++,n++)a[n]=i[l];return a};import{r as registerInstance,h as h$1,g as getElement,c as Host}from"./index-91e7729f.js";import{n as h,j as useReducer,u as useMemo,f as useEffect}from"./stencil-hooks.module-4bc38af4.js";import{i as intl}from"./global-66746c30.js";import{i as isDemo}from"./index.module-89a79f66.js";import{c as cjs}from"./cjs-bdfb4486.js";import{l as luxonLocale}from"./utils-334c1e34.js";import{c as createStyleSheet}from"./JSS-67b5cff8.js";import"./mixins-f750863a.js";import{G as GenericTableView}from"./GenericTableView-3b6f9ccc.js";import{a as useRequestRerender,u as useRerenderListener}from"./re-render-cc945f38.js";import{u as useChildElements}from"./useChildElements-7945ae56.js";import{l as luxon}from"./luxon-8d51c92b.js";import{g as getPaypalMeta}from"./mockRewardData-8bd1b356.js";import{u as useReferralTable,t as tryMethod}from"./useReferralTable-b3876ed6.js";import{T as TextSpanView}from"./sqm-text-span-view-cd3902e5.js";var mockReferralData=function(e){if(e===void 0){e=4}var t=__spreadArrays(Array(e)).map((function(){return getMockData()}));return{totalCount:6,count:e,referredByReferral:{dateConverted:null,dateReferralStarted:1643912659850,referrerUser:{firstName:"John",lastName:"Snow",rewards:[]}},data:t}};var statuses=[["AVAILABLE"],["PENDING"],["CANCELLED"],["EXPIRED"],["REDEEMED"]];var firstNames=["Rajesh","Pierre","Ji-Ho","Chinua","Charleston","Sally","Gael","Jill","Jane","Khadija"];var lastNames=["Smith","Parker","Kent","Chew","Stark","Banner","Jones","Odinson","Pym","Rogers"];var getMockData=function(){return{id:"5cae6b0fcc540e209db45b53",referredUser:{id:"5cae6b0ce4b0d81c67b78e82",accountId:"SPX1MZBIPTFL3E1H",firstName:firstNames[Math.floor(Math.random()*firstNames.length)],lastName:lastNames[Math.floor(Math.random()*lastNames.length)],email:"example.uexwltgh@mailosaur.io",programGoals:[]},shareLinkUsed:null,referralCodeUsed:"JIMBONEUTRON2",moderationStatus:"PENDING",dateConverted:Math.floor(Math.random()*10)>=5?luxon.DateTime.now().minus({days:6}).toMillis():null,dateFraudChecksCompleted:null,dateModerated:1558730033306,dateModified:1554934543447,dateReferralEnded:null,dateReferralPaid:null,dateReferralStarted:luxon.DateTime.now().minus({days:8}).toMillis(),dateUserModified:null,programId:"sam-partner-test-2",program:{id:"sam-partner-test-2",name:"Partner Program 2.0"},rewards:Math.floor(Math.random()*10)>=5?[{id:"5cae6b16cc540e209db45cfa",type:"CREDIT",value:1,unit:"POINT",name:"Partner Reward",dateGiven:1554934550726,dateExpires:null,dateCancelled:null,dateRedeemed:1637004373582,dateScheduledFor:null,fuelTankCode:null,fuelTankType:null,currency:null,prettyValue:"1 Point",statuses:statuses[Math.floor(Math.random()*statuses.length)],globalRewardKey:null,programRewardKey:"partnerReward",meta:__assign({},getPaypalMeta()),rewardRedemptionTransactions:{data:[{exchangedRewards:{data:[{prettyValue:"CAD10.00 Visa* Prepaid Card CAD",type:"INTEGRATION",fuelTankCode:null,globalRewardKey:"gc1"}]}}]}}]:[],childNodes:{data:[{data:{id:"5cae6b16cc540e209db45cb3",statuses:statuses[Math.floor(Math.random()*statuses.length)],type:"PCT_DISCOUNT",value:50},depth:1},{data:{id:"5cae6b16cc540e209db45cfa",statuses:statuses[Math.floor(Math.random()*statuses.length)],type:"CREDIT",value:1},depth:1}]}}};var ReferralTable=function(){function e(e){registerInstance(this,e);this.perPage=4;this.hideLabels=false;this.prevLabel="Prev";this.moreLabel="Next";this.showReferrer=false;this.hiddenColumns="0";this.smBreakpoint=599;this.mdBreakpoint=799;h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=h$1(EmptySlot,null);var t=h$1(LoadingSlot,null);var r=isDemo()?useReferralTableDemo(this,e,t):useReferralTable(this,e,t),a=r.states,n=r.data,i=r.callbacks,l=r.elements;useRequestRerender([this.showReferrer,this.perPage]);return h$1(GenericTableView,{states:a,data:n,callbacks:i,elements:l})};return e}();function EmptySlot(){return h$1("slot",{name:"empty"},h$1("sqm-empty",{"empty-state-image":"https://res.cloudinary.com/saasquatch/image/upload/v1644000223/squatch-assets/empty_referral2.png","empty-state-header":"View your referral details","empty-state-text":"Refer a friend to view the status of your referrals and rewards earned"}))}function LoadingSlot(){return h$1("slot",{name:"loading"},h$1(LoadingRow,null),h$1(LoadingRow,null),h$1(LoadingRow,null),h$1(LoadingRow,null))}function LoadingRow(){return h$1("sqm-table-row",null,h$1("sqm-table-cell",{colspan:5},h$1("sl-skeleton",null)))}function useReferralTableDemo(e,t,r){var a=useReducer((function(e,t){return __assign(__assign({},e),t)}),{columns:[],rows:[],loading:false,page:0}),n=a[0],i=a[1];var l=useRerenderListener();var s=useMemo((function(){var t;return((t=e.demoData)===null||t===void 0?void 0:t.mockData)||mockReferralData(e.perPage)}),[e.perPage]);var o=useChildElements();function u(t){return __awaiter(this,void 0,void 0,(function(){var r,a,n,l,o,u,d,c,f,h,p,v,m,E;var g=this;return __generator(this,(function(_){switch(_.label){case 0:n=s===null||s===void 0?void 0:s.referredByReferral;l=e.showReferrer&&!!((r=s===null||s===void 0?void 0:s.referredByReferral)===null||r===void 0?void 0:r.dateReferralStarted);if(l){a=s.data.slice(0,e.perPage-1)}else{a=s.data.slice(0,e.perPage)}o=t.filter((function(e){var t,r;return e.slot!=="loading"&&e.slot!=="empty"&&((t=e===null||e===void 0?void 0:e.firstElementChild)===null||t===void 0?void 0:t.getAttribute("slot"))!=="loading"&&((r=e===null||e===void 0?void 0:e.firstElementChild)===null||r===void 0?void 0:r.getAttribute("slot"))!=="empty"}));u=o===null||o===void 0?void 0:o.map((function(e,t){return __awaiter(g,void 0,void 0,(function(){var r,a,n;return __generator(this,(function(i){a=(r=e===null||e===void 0?void 0:e.firstElementChild)===null||r===void 0?void 0:r.getAttribute("slot");if(e.tagName==="RAISINS-PLOP-TARGET"&&a!=="loading"&&a!=="empty"){e.setAttribute("slot","column-"+t);e.style.position="absolute";n=e.firstElementChild.childNodes[1];n.innerHTML="+";n.style.lineHeight="20px";return[2,tryMethod(e,(function(){return e.renderLabel(t)}))]}return[2,tryMethod(e,(function(){return e.renderLabel()}))]}))}))}));if(!l)return[3,2];c=o===null||o===void 0?void 0:o.map((function(e){return __awaiter(g,void 0,void 0,(function(){return __generator(this,(function(t){return[2,tryMethod(e,(function t(){return e.renderCell(n,e)}))]}))}))}));return[4,Promise.all(c)];case 1:d=_.sent();_.label=2;case 2:f=a===null||a===void 0?void 0:a.map((function(e){return __awaiter(g,void 0,void 0,(function(){var t,r;var a=this;return __generator(this,(function(n){switch(n.label){case 0:t=o===null||o===void 0?void 0:o.map((function(t){return __awaiter(a,void 0,void 0,(function(){return __generator(this,(function(r){return[2,tryMethod(t,(function(){return t.renderCell(e,undefined)}))]}))}))}));return[4,Promise.all(t)];case 1:r=n.sent();return[2,r]}}))}))}));p=f;if(!p)return[3,4];v=[[d]];return[4,Promise.all(f)];case 3:p=__spreadArrays.apply(void 0,v.concat([_.sent()])).filter((function(e){return e}));_.label=4;case 4:h=p;i({rows:h});E=u;if(!E)return[3,6];return[4,Promise.all(u)];case 5:E=_.sent();_.label=6;case 6:m=E;i({columns:m,loading:false,page:0});return[2]}}))}))}useEffect((function(){i({loading:true});(s===null||s===void 0?void 0:s.data)&&u(o)}),[s===null||s===void 0?void 0:s.data,o,l]);var d=cjs({states:{hasPrev:false,hasNext:false,loading:false,show:"rows"},callbacks:{prevPage:function(){return console.log("Prev")},nextPage:function(){return console.log("Next")}},data:{textOverrides:{showLabels:!e.hideLabels,prevLabel:e.prevLabel,moreLabel:e.moreLabel},hiddenColumns:e.hiddenColumns,referralData:[],mdBreakpoint:799,smBreakpoint:599},elements:{columns:n.columns,rows:n.rows,emptyElement:t,loadingElement:r}},e.demoData||{},{arrayMerge:function(e,t){return t}});return d}var ReferralTableCell=function(){function e(e){registerInstance(this,e);this.ignored=true;h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){return h$1("div",{innerHTML:this.innerTemplate})};return e}();var ReferralTableGenericColumn=function(){function e(e){registerInstance(this,e);h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.renderCell=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,h$1("sqm-referral-table-cell",{"inner-template":getElement(this).innerHTML})]}))}))};e.prototype.renderLabel=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,Promise.resolve(this.columnTitle)]}))}))};e.prototype.render=function(){useRequestRerender([this.columnTitle]);return h$1(Host,{style:{display:"none"}},h$1("slot",null))};return e}();var ReferralTableDateCell=function(){function e(e){registerInstance(this,e);this.ignored=true;this.locale="en";h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e;var t=!this.date?"-":(e=luxon.DateTime.fromMillis(this.date))===null||e===void 0?void 0:e.setLocale(luxonLocale(this.locale)).toLocaleString(luxon.DateTime.DATE_MED);return t};return e}();var ReferralTableDateColumn=function(){function e(e){registerInstance(this,e);this.columnTitle="Date converted";this.dateShown="dateConverted";h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.renderCell=function(e,t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){return[2,h$1("sqm-referral-table-date-cell",{date:e[this.dateShown],locale:t===null||t===void 0?void 0:t.locale})]}))}))};e.prototype.renderLabel=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.columnTitle]}))}))};e.prototype.renderReferrerCell=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,h$1("sqm-referral-table-date-cell",{date:e[this.dateShown]})]}))}))};e.prototype.render=function(){useRequestRerender([this.dateShown,this.columnTitle]);return h$1(Host,{style:{display:"none"}})};return e}();var ReferralTableRewardsCell=function(){function e(e){registerInstance(this,e);this.statusText="{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} PAYOUT_FAILED {Payout Failed} PAYOUT_CANCELLED {Payout Cancelled} PENDING_TAX_REVIEW {Pending} PENDING_NEW_TAX_FORM {Pending} PENDING_TAX_SUBMISSION {Pending} PENDING_PARTNER_CREATION {Pending} DENIED {Denied} EXPIRED {Expired} REDEEMED {Redeemed} other {Not available} }";this.statusLongText="{status, select, AVAILABLE {Reward expiring on} CANCELLED {Reward cancelled on} PENDING {Available on} PENDING_REVIEW {Pending since} PAYOUT_APPROVED {Reward approved for payout and was scheduled for payment based on your settings.} PAYOUT_FAILED {Payout failed due to a fulfillment issue and is currently being retried.} PAYOUT_CANCELLED {If you think this is a mistake, contact our Support team.} PENDING_TAX_REVIEW {Awaiting tax form review} PENDING_NEW_TAX_FORM {Invalid tax form. Submit a new form to receive your rewards.} PENDING_TAX_SUBMISSION {Submit your tax documents to receive your rewards} PENDING_PARTNER_CREATION {Complete your tax and cash payout setup to receive your rewards} DENIED {Denied on} EXPIRED {Reward expired on} other {Not available} }";this.locale="en"}e.prototype.render=function(){var e=this;var t;intl.locale=this.locale;var r={"@keyframes slideRight":{from:{opacity:0},to:{opacity:1}},DetailsContainer:{width:"100%",display:"flex","align-items":"center","justify-content":"space-between","margin-right":"var(--sl-spacing-small)","flex-wrap":"wrap"},Details:{"max-width":"500px","&::part(header)":{padding:"var(--sl-spacing-x-small)",cursor:""+(this.hideDetails?"default":"pointer")},"&::part(content)":{padding:"var(--sl-spacing-x-small) var(--sl-spacing-medium)"},"&::part(base)":{border:"1px solid var(--sqm-border-color)",opacity:"1"},"&::part(summary-icon)":{display:""+(this.hideDetails?"none":"flex")},"&::part(summary-icon[open])":{transform:"rotate(-90deg)"}},BadgeContainer:{"& > :not(:last-child)":{"margin-right":"var(--sl-spacing-x-small)"}},BoldText:{"font-weight":"var(--sl-font-weight-semibold)"},RedeemBadge:{paddingLeft:"var(--sl-spacing-xxx-small)","&::part(base)":{textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-informative-color-background)",color:"var(--sqm-informative-color-text)"}},DangerBadge:{paddingLeft:"var(--sl-spacing-xxx-small)","&::part(base)":{textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-danger-color-background)",color:"var(--sqm-danger-color-text)"}},WarningBadge:{paddingLeft:"var(--sl-spacing-xxx-small)","&::part(base)":{textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-warning-color-background)",color:"var(--sqm-warning-color-text)"}},SuccessBadge:{paddingLeft:"var(--sl-spacing-xxx-small)","&::part(base)":{textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-success-color-background)",color:"var(--sqm-success-color-text)"}}};var a=createStyleSheet(r);var n=a.toString();var i=function(e){switch(e){case"primary":return a.classes.RedeemBadge;case"danger":return a.classes.DangerBadge;case"success":return a.classes.SuccessBadge;case"warning":case"info":return a.classes.WarningBadge;default:return a.classes.WarningBadge}};var l=function(e,t){var r,a,n,i,l,s,o,u,d,c,f,h;var p=["REDEEMED","CANCELLED","EXPIRED","PENDING","AVAILABLE","PENDING_REVIEW","DENIED","PAYOUT_APPROVED","PAYOUT_CANCELLED","PAYOUT_FAILED","PENDING_TAX_REVIEW","PENDING_NEW_TAX_FORM","PENDING_TAX_SUBMISSION","PENDING_PARTNER_CREATION"];if(((a=(r=e.referral)===null||r===void 0?void 0:r.fraudData)===null||a===void 0?void 0:a.moderationStatus)!=="APPROVED"){if(((i=(n=e.referral)===null||n===void 0?void 0:n.fraudData)===null||i===void 0?void 0:i.moderationStatus)==="PENDING")return"PENDING_REVIEW";if(((s=(l=e.referral)===null||l===void 0?void 0:l.fraudData)===null||s===void 0?void 0:s.moderationStatus)==="DENIED")return"DENIED"}var v=(o=e.partnerFundsTransfer)===null||o===void 0?void 0:o.status;if(v==="NOT_YET_DUE"||v==="TRANSFERRED"){return"PAYOUT_APPROVED"}else if(v==="OVERDUE")return"PAYOUT_FAILED";else if(v==="REVERSED")return"PAYOUT_CANCELLED";if((u=e===null||e===void 0?void 0:e.pendingReasons)===null||u===void 0?void 0:u.includes("US_TAX")){if(!(t===null||t===void 0?void 0:t.taxHandlingEnabled))return"PENDING";if(!(t===null||t===void 0?void 0:t.connected))return"PENDING_PARTNER_CREATION";if((d=t===null||t===void 0?void 0:t.publisher)===null||d===void 0?void 0:d.requiredTaxDocumentType){if(!((c=t===null||t===void 0?void 0:t.publisher)===null||c===void 0?void 0:c.currentTaxDocument))return"PENDING_TAX_SUBMISSION";var m=t.publisher.currentTaxDocument.status;if(m==="INACTIVE")return"PENDING_NEW_TAX_FORM";if(m==="NOT_VERIFIED")return"PENDING_TAX_REVIEW"}if(!((f=t===null||t===void 0?void 0:t.publisher)===null||f===void 0?void 0:f.withdrawalSettings))return"PENDING_PARTNER_CREATION"}if((h=e===null||e===void 0?void 0:e.pendingReasons)===null||h===void 0?void 0:h.includes("PAYOUT_CONFIGURATION_MISSING")){return"PENDING_PARTNER_CREATION"}if(e.statuses.length===1)return e.statuses[0];return p.find((function(t){return e.statuses.includes(t)&&t}))};var s=function(e){switch(e){case"REDEEMED":case"PAYOUT_APPROVED":return"primary";case"DENIED":case"EXPIRED":case"CANCELLED":case"PAYOUT_FAILED":case"PAYOUT_CANCELLED":return"danger";case"PENDING":case"PENDING_REVIEW":case"PENDING_TAX_REVIEW":case"PENDING_NEW_TAX_FORM":case"PENDING_TAX_SUBMISSION":case"PENDING_PARTNER_CREATION":return"warning";case"AVAILABLE":return"success"}};var o=function(t){return luxon.DateTime.fromMillis(t).setLocale(luxonLocale(e.locale)).toRelative().replace("in","").trim()};return(t=this.rewards)===null||t===void 0?void 0:t.map((function(t){var r,u;var d=l(t,e.taxConnection);var c=s(d);var f=intl.formatMessage({id:"statusShortMessage",defaultMessage:e.statusText},{status:d});var h=intl.formatMessage({id:"statusLongMessage",defaultMessage:e.statusLongText},{status:d});return h$1("sl-details",{class:a.classes.Details,disabled:e.hideDetails},h$1("style",{type:"text/css"},n),h$1("div",{slot:"summary",class:a.classes.DetailsContainer},h$1(TextSpanView,{type:"p"},h$1("span",{part:"sqm-cell-value",class:a.classes.BoldText},t.prettyValue)),h$1("div",{class:a.classes.BadgeContainer},d==="PENDING"&&t.dateScheduledFor?h$1("sl-badge",{class:i(c),type:c,pill:true},intl.formatMessage({id:"pendingForText",defaultMessage:e.pendingForText},{status:f,date:o(t.dateScheduledFor)})):h$1("sl-badge",{class:i(c),type:c,pill:true},f),t.dateExpires&&d==="AVAILABLE"&&h$1("sl-badge",{class:i(c),type:"info",pill:true},e.expiringText," "+o(t.dateExpires)))),h$1("div",null,d==="PENDING_REVIEW"&&((r=t.referral)===null||r===void 0?void 0:r.dateModerated)&&h$1("div",null,h$1(TextSpanView,{type:"p"},h," ",h$1("span",{class:a.classes.BoldText,part:"sqm-cell-value"},luxon.DateTime.fromMillis(t.referral.dateModerated).setLocale(luxonLocale(e.locale)).toLocaleString(luxon.DateTime.DATE_MED)))),d==="PAYOUT_APPROVED"&&h$1("div",null,h$1(TextSpanView,{type:"p"},h)),d==="PAYOUT_FAILED"&&h$1("div",null,h$1(TextSpanView,{type:"p"},h)),d==="PAYOUT_CANCELLED"&&h$1("div",null,h$1(TextSpanView,{type:"p"},h)),d==="PENDING_TAX_REVIEW"&&h$1("div",null,h$1(TextSpanView,{type:"p"},h)),d==="PENDING_NEW_TAX_FORM"&&h$1("div",null,h$1(TextSpanView,{type:"p"},h)),d==="PENDING_TAX_SUBMISSION"&&h$1("div",null,h$1(TextSpanView,{type:"p"},h)),d==="PENDING_PARTNER_CREATION"&&h$1("div",null,h$1(TextSpanView,{type:"p"},h)),d==="DENIED"&&((u=t.referral)===null||u===void 0?void 0:u.dateModerated)&&h$1("div",null,h$1(TextSpanView,{type:"p"},h," ",h$1("span",{class:a.classes.BoldText,part:"sqm-cell-value"},luxon.DateTime.fromMillis(t.referral.dateModerated).setLocale(luxonLocale(e.locale)).toLocaleString(luxon.DateTime.DATE_MED)),".",e.deniedHelpText?" "+e.deniedHelpText:"")),t.dateGiven&&h$1("div",null,h$1(TextSpanView,{type:"p"},e.rewardReceivedText," ",h$1("span",{class:a.classes.BoldText,part:"sqm-cell-value"},luxon.DateTime.fromMillis(t.dateGiven).setLocale(luxonLocale(e.locale)).toLocaleString(luxon.DateTime.DATE_MED)))),d==="EXPIRED"&&t.dateExpires&&h$1("div",null,h$1(TextSpanView,{type:"p"},h," ",h$1("span",{class:a.classes.BoldText,part:"sqm-cell-value"},luxon.DateTime.fromMillis(t.dateExpires).setLocale(luxonLocale(e.locale)).toLocaleString(luxon.DateTime.DATE_MED)))),d==="CANCELLED"&&t.dateCancelled&&h$1("div",null,h$1(TextSpanView,{type:"p"},h," ",h$1("span",{class:a.classes.BoldText,part:"sqm-cell-value"},luxon.DateTime.fromMillis(t.dateCancelled).setLocale(luxonLocale(e.locale)).toLocaleString(luxon.DateTime.DATE_MED)))),d==="PENDING"&&t.dateScheduledFor&&h$1("div",null,h$1(TextSpanView,{type:"p"},h," ",h$1("span",{class:a.classes.BoldText,part:"sqm-cell-value"},luxon.DateTime.fromMillis(t.dateScheduledFor).setLocale(luxonLocale(e.locale)).toLocaleString(luxon.DateTime.DATE_MED))))," ",d==="AVAILABLE"&&t.dateExpires&&h$1("div",null,h$1(TextSpanView,{type:"p"},h," ",h$1("span",{class:a.classes.BoldText,part:"sqm-cell-value"},luxon.DateTime.fromMillis(t.dateExpires).setLocale(luxonLocale(e.locale)).toLocaleString(luxon.DateTime.DATE_MED)))),t.fuelTankCode&&h$1("div",null,e.fuelTankText," ",h$1("span",{class:a.classes.BoldText,part:"sqm-cell-value"},t.fuelTankCode))))}))};return e}();var ReferralTableRewardsColumn=function(){function e(e){registerInstance(this,e);this.columnTitle="Rewards";this.statusText="{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} PAYOUT_FAILED {Payout Failed} PAYOUT_CANCELLED {Payout Cancelled} PENDING_TAX_REVIEW {Pending} PENDING_NEW_TAX_FORM {Pending} PENDING_TAX_SUBMISSION {Pending} PENDING_PARTNER_CREATION {Pending} DENIED {Denied} EXPIRED {Expired} REDEEMED {Redeemed} other {Not available} }";this.statusLongText="{status, select, AVAILABLE {Reward expiring on} CANCELLED {Reward cancelled on} PENDING {Available on} PENDING_REVIEW {Pending since} PAYOUT_APPROVED {Reward approved for payout and was scheduled for payment based on your settings.} PAYOUT_FAILED {Payout failed due to a fulfillment issue and is currently being retried.} PAYOUT_CANCELLED {If you think this is a mistake, contact our Support team.} PENDING_TAX_REVIEW {Awaiting tax form review} PENDING_NEW_TAX_FORM {Invalid tax form. Submit a new form to receive your rewards.} PENDING_TAX_SUBMISSION {Submit your tax documents to receive your rewards} PENDING_PARTNER_CREATION {Complete your tax and cash payout setup to receive your rewards} DENIED {Denied on} EXPIRED {Reward expired on} other {Not available} }";this.fuelTankText="Your code is";this.rewardReceivedText="Reward received on";this.expiringText="Expiring in";this.pendingForText="{status} for {date}";this.deniedHelpText="Contact support if you think this is a mistake.";this.hideDetails=false;h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.renderCell=function(e,t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){return[2,h$1("sqm-referral-table-rewards-cell",{rewards:e.rewards,taxConnection:t===null||t===void 0?void 0:t.taxConnection,statusText:this.statusText,statusLongText:this.statusLongText,fuelTankText:this.fuelTankText,rewardReceivedText:this.rewardReceivedText,expiringText:this.expiringText,pendingForText:this.pendingForText,hideDetails:this.hideDetails,deniedHelpText:this.deniedHelpText,locale:t===null||t===void 0?void 0:t.locale,exportparts:"sqm-cell-value"})]}))}))};e.prototype.renderLabel=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.columnTitle]}))}))};e.prototype.renderReferrerCell=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,h$1("sqm-referral-table-rewards-cell",{rewards:e.rewards,exportparts:"sqm-cell-value"})]}))}))};e.prototype.render=function(){useRequestRerender([this.columnTitle,this.statusText,this.statusLongText,this.fuelTankText,this.rewardReceivedText,this.expiringText,this.pendingForText,this.hideDetails]);return h$1(Host,{style:{display:"none"}})};return e}();var style={SubText:{fontSize:"var(--sl-font-size-small)",color:"var(--sqm-text-subdued)",margin:"0"},RedeemBadge:{"&::part(base)":{fontSize:"var(--sl-font-size-small)",padding:"4px 8px",textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-informative-color-background)",color:"var(--sqm-informative-color-text)"}},DangerBadge:{"&::part(base)":{fontSize:"var(--sl-font-size-small)",padding:"4px 8px",textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-danger-color-background)",color:"var(--sqm-danger-color-text)"}},WarningBadge:{"&::part(base)":{fontSize:"var(--sl-font-size-small)",padding:"4px 8px",textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-warning-color-background)",color:"var(--sqm-warning-color-text)"}},SuccessBadge:{"&::part(base)":{fontSize:"var(--sl-font-size-small)",padding:"4px 8px",textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-success-color-background)",color:"var(--sqm-success-color-text)"}}};var sheet=createStyleSheet(style);var styleString=sheet.toString();var ReferralTableStatusCell=function(){function e(e){registerInstance(this,e)}e.prototype.render=function(){var e=this;var t=createStyleSheet(style);var r=t.toString();var a=function(t){if(t==="PENDING")return"warning";if(t==="DENIED")return"danger";if(e.converted)return"success";return"warning"};var n=function(e){switch(e){case"primary":return t.classes.RedeemBadge;case"danger":return t.classes.DangerBadge;case"success":return t.classes.SuccessBadge;case"warning":case"info":return t.classes.WarningBadge;default:return t.classes.WarningBadge}};return h$1("div",null,h$1("style",{type:"text/css"},r),h$1("sl-badge",{pill:true,type:a(this.fraudStatus),class:n(a(this.fraudStatus))},this.statusText),this.statusSubText?h$1("p",{class:t.classes.SubText},this.statusSubText):null)};return e}();var ReferralTableStatusColumn=function(){function e(e){registerInstance(this,e);this.columnTitle="Status";this.convertedStatusText="Converted";this.inProgressStatusText="In Progress";this.pendingReviewStatusText="Pending";this.deniedStatusText="Denied";this.pendingReviewStatusSubText="Awaiting review";this.deniedStatusSubText="Detected self-referral";h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.renderCell=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,a,n;return __generator(this,(function(i){n=(t=e===null||e===void 0?void 0:e.fraudData)===null||t===void 0?void 0:t.moderationStatus;if(n==="DENIED"){r=this.deniedStatusText;a=this.deniedStatusSubText}else if(n==="PENDING"){r=this.pendingReviewStatusText;a=this.pendingReviewStatusSubText}else{r=e.dateConverted?this.convertedStatusText:this.inProgressStatusText}return[2,h$1("sqm-referral-table-status-cell",{"status-text":r,"status-sub-text":a,"fraud-status":n,converted:e.dateConverted?true:false})]}))}))};e.prototype.renderLabel=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.columnTitle]}))}))};e.prototype.renderReferrerCell=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(r){t=e.dateConverted?this.convertedStatusText:this.inProgressStatusText;return[2,h$1("sqm-referral-table-status-cell",{"status-text":t,converted:e.dateConverted?true:false})]}))}))};e.prototype.render=function(){useRequestRerender([this.columnTitle,this.convertedStatusText,this.inProgressStatusText]);return h$1(Host,{style:{display:"none"}})};return e}();var ReferralTableUserCell=function(){function e(e){registerInstance(this,e)}e.prototype.render=function(){return this.name};return e}();var ReferralTableUserColumn=function(){function e(e){registerInstance(this,e);this.columnTitle="Customer";this.anonymousUser="Anonymous User";this.deletedUser="Deleted User";h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.renderCell=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,a,n,i,l,s,o,u;return __generator(this,(function(d){if(!(e===null||e===void 0?void 0:e.referredUser)&&!(e===null||e===void 0?void 0:e.referrerUser)){u=this.deletedUser}else if(!((t=e===null||e===void 0?void 0:e.referredUser)===null||t===void 0?void 0:t.firstName)&&!((r=e===null||e===void 0?void 0:e.referredUser)===null||r===void 0?void 0:r.lastName)&&!((a=e===null||e===void 0?void 0:e.referrerUser)===null||a===void 0?void 0:a.firstName)&&!((n=e===null||e===void 0?void 0:e.referrerUser)===null||n===void 0?void 0:n.lastName)){u=this.anonymousUser}else if(e===null||e===void 0?void 0:e.referrerUser){u=((i=e===null||e===void 0?void 0:e.referrerUser)===null||i===void 0?void 0:i.firstName)+" "+((l=e===null||e===void 0?void 0:e.referrerUser)===null||l===void 0?void 0:l.lastName)}else{u=((s=e===null||e===void 0?void 0:e.referredUser)===null||s===void 0?void 0:s.firstName)+" "+((o=e===null||e===void 0?void 0:e.referredUser)===null||o===void 0?void 0:o.lastName)}return[2,h$1("sqm-referral-table-user-cell",{name:u})]}))}))};e.prototype.renderLabel=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.columnTitle]}))}))};e.prototype.renderReferrerCell=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,a,n,i;return __generator(this,(function(l){if(!e){i=this.deletedUser}else if(!((t=e===null||e===void 0?void 0:e.referrerUser)===null||t===void 0?void 0:t.firstName)&&!((r=e.referrerUser)===null||r===void 0?void 0:r.lastName)){i=this.anonymousUser}else{i=((a=e===null||e===void 0?void 0:e.referrerUser)===null||a===void 0?void 0:a.firstName)+" "+((n=e===null||e===void 0?void 0:e.referrerUser)===null||n===void 0?void 0:n.lastName)}return[2,h$1("sqm-referral-table-user-cell",{name:i})]}))}))};e.prototype.render=function(){useRequestRerender([this.deletedUser,this.anonymousUser,this.columnTitle]);return h$1(Host,{style:{display:"none"}})};return e}();export{ReferralTable as sqm_referral_table,ReferralTableCell as sqm_referral_table_cell,ReferralTableGenericColumn as sqm_referral_table_column,ReferralTableDateCell as sqm_referral_table_date_cell,ReferralTableDateColumn as sqm_referral_table_date_column,ReferralTableRewardsCell as sqm_referral_table_rewards_cell,ReferralTableRewardsColumn as sqm_referral_table_rewards_column,ReferralTableStatusCell as sqm_referral_table_status_cell,ReferralTableStatusColumn as sqm_referral_table_status_column,ReferralTableUserCell as sqm_referral_table_user_cell,ReferralTableUserColumn as sqm_referral_table_user_column};
1
+ var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++){t=arguments[r];for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,r,a){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function l(e){try{o(a.next(e))}catch(e){i(e)}}function s(e){try{o(a["throw"](e))}catch(e){i(e)}}function o(e){e.done?r(e.value):n(e.value).then(l,s)}o((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,n,i,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(e){return function(t){return o([e,t])}}function o(l){if(a)throw new TypeError("Generator is already executing.");while(r)try{if(a=1,n&&(i=l[0]&2?n["return"]:l[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;if(n=0,i)l=[l[0]&2,i.value];switch(l[0]){case 0:case 1:i=l;break;case 4:r.label++;return{value:l[1],done:false};case 5:r.label++;n=l[1];l=[0];continue;case 7:l=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){r.label=l[1];break}if(l[0]===6&&r.label<i[1]){r.label=i[1];i=l;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(l);break}if(i[2])r.ops.pop();r.trys.pop();continue}l=t.call(e,r)}catch(e){l=[6,e];n=0}finally{a=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};var __spreadArrays=this&&this.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var a=Array(e),n=0,t=0;t<r;t++)for(var i=arguments[t],l=0,s=i.length;l<s;l++,n++)a[n]=i[l];return a};import{r as registerInstance,h as h$1,g as getElement,c as Host}from"./index-b3a06de8.js";import{n as h,j as useReducer,u as useMemo,f as useEffect}from"./stencil-hooks.module-20ad2b5f.js";import{i as intl}from"./global-16971a34.js";import{i as isDemo}from"./index.module-d49ae5e7.js";import{c as cjs}from"./cjs-bdfb4486.js";import{l as luxonLocale}from"./utils-334c1e34.js";import{c as createStyleSheet}from"./JSS-67b5cff8.js";import"./mixins-f750863a.js";import{G as GenericTableView}from"./GenericTableView-dd9be3ea.js";import{a as useRequestRerender,u as useRerenderListener}from"./re-render-789f9123.js";import{u as useChildElements}from"./useChildElements-0ca9a015.js";import{l as luxon}from"./luxon-793b7f13.js";import{g as getPaypalMeta}from"./mockRewardData-bdc54f2e.js";import{u as useReferralTable,t as tryMethod}from"./useReferralTable-c1511d9d.js";import{T as TextSpanView}from"./sqm-text-span-view-4c17b8c9.js";var mockReferralData=function(e){if(e===void 0){e=4}var t=__spreadArrays(Array(e)).map((function(){return getMockData()}));return{totalCount:6,count:e,referredByReferral:{dateConverted:null,dateReferralStarted:1643912659850,referrerUser:{firstName:"John",lastName:"Snow",rewards:[]}},data:t}};var statuses=[["AVAILABLE"],["PENDING"],["CANCELLED"],["EXPIRED"],["REDEEMED"]];var firstNames=["Rajesh","Pierre","Ji-Ho","Chinua","Charleston","Sally","Gael","Jill","Jane","Khadija"];var lastNames=["Smith","Parker","Kent","Chew","Stark","Banner","Jones","Odinson","Pym","Rogers"];var getMockData=function(){return{id:"5cae6b0fcc540e209db45b53",referredUser:{id:"5cae6b0ce4b0d81c67b78e82",accountId:"SPX1MZBIPTFL3E1H",firstName:firstNames[Math.floor(Math.random()*firstNames.length)],lastName:lastNames[Math.floor(Math.random()*lastNames.length)],email:"example.uexwltgh@mailosaur.io",programGoals:[]},shareLinkUsed:null,referralCodeUsed:"JIMBONEUTRON2",moderationStatus:"PENDING",dateConverted:Math.floor(Math.random()*10)>=5?luxon.DateTime.now().minus({days:6}).toMillis():null,dateFraudChecksCompleted:null,dateModerated:1558730033306,dateModified:1554934543447,dateReferralEnded:null,dateReferralPaid:null,dateReferralStarted:luxon.DateTime.now().minus({days:8}).toMillis(),dateUserModified:null,programId:"sam-partner-test-2",program:{id:"sam-partner-test-2",name:"Partner Program 2.0"},rewards:Math.floor(Math.random()*10)>=5?[{id:"5cae6b16cc540e209db45cfa",type:"CREDIT",value:1,unit:"POINT",name:"Partner Reward",dateGiven:1554934550726,dateExpires:null,dateCancelled:null,dateRedeemed:1637004373582,dateScheduledFor:null,fuelTankCode:null,fuelTankType:null,currency:null,prettyValue:"1 Point",statuses:statuses[Math.floor(Math.random()*statuses.length)],globalRewardKey:null,programRewardKey:"partnerReward",meta:__assign({},getPaypalMeta()),rewardRedemptionTransactions:{data:[{exchangedRewards:{data:[{prettyValue:"CAD10.00 Visa* Prepaid Card CAD",type:"INTEGRATION",fuelTankCode:null,globalRewardKey:"gc1"}]}}]}}]:[],childNodes:{data:[{data:{id:"5cae6b16cc540e209db45cb3",statuses:statuses[Math.floor(Math.random()*statuses.length)],type:"PCT_DISCOUNT",value:50},depth:1},{data:{id:"5cae6b16cc540e209db45cfa",statuses:statuses[Math.floor(Math.random()*statuses.length)],type:"CREDIT",value:1},depth:1}]}}};var ReferralTable=function(){function e(e){registerInstance(this,e);this.perPage=4;this.hideLabels=false;this.prevLabel="Prev";this.moreLabel="Next";this.showReferrer=false;this.hiddenColumns="0";this.smBreakpoint=599;this.mdBreakpoint=799;h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=h$1(EmptySlot,null);var t=h$1(LoadingSlot,null);var r=isDemo()?useReferralTableDemo(this,e,t):useReferralTable(this,e,t),a=r.states,n=r.data,i=r.callbacks,l=r.elements;useRequestRerender([this.showReferrer,this.perPage]);return h$1(GenericTableView,{states:a,data:n,callbacks:i,elements:l})};return e}();function EmptySlot(){return h$1("slot",{name:"empty"},h$1("sqm-empty",{"empty-state-image":"https://res.cloudinary.com/saasquatch/image/upload/v1644000223/squatch-assets/empty_referral2.png","empty-state-header":"View your referral details","empty-state-text":"Refer a friend to view the status of your referrals and rewards earned"}))}function LoadingSlot(){return h$1("slot",{name:"loading"},h$1(LoadingRow,null),h$1(LoadingRow,null),h$1(LoadingRow,null),h$1(LoadingRow,null))}function LoadingRow(){return h$1("sqm-table-row",null,h$1("sqm-table-cell",{colspan:5},h$1("sl-skeleton",null)))}function useReferralTableDemo(e,t,r){var a=useReducer((function(e,t){return __assign(__assign({},e),t)}),{columns:[],rows:[],loading:false,page:0}),n=a[0],i=a[1];var l=useRerenderListener();var s=useMemo((function(){var t;return((t=e.demoData)===null||t===void 0?void 0:t.mockData)||mockReferralData(e.perPage)}),[e.perPage]);var o=useChildElements();function d(t){return __awaiter(this,void 0,void 0,(function(){var r,a,n,l,o,d,u,c,f,h,p,v,m,E;var g=this;return __generator(this,(function(_){switch(_.label){case 0:n=s===null||s===void 0?void 0:s.referredByReferral;l=e.showReferrer&&!!((r=s===null||s===void 0?void 0:s.referredByReferral)===null||r===void 0?void 0:r.dateReferralStarted);if(l){a=s.data.slice(0,e.perPage-1)}else{a=s.data.slice(0,e.perPage)}o=t.filter((function(e){var t,r;return e.slot!=="loading"&&e.slot!=="empty"&&((t=e===null||e===void 0?void 0:e.firstElementChild)===null||t===void 0?void 0:t.getAttribute("slot"))!=="loading"&&((r=e===null||e===void 0?void 0:e.firstElementChild)===null||r===void 0?void 0:r.getAttribute("slot"))!=="empty"}));d=o===null||o===void 0?void 0:o.map((function(e,t){return __awaiter(g,void 0,void 0,(function(){var r,a,n;return __generator(this,(function(i){a=(r=e===null||e===void 0?void 0:e.firstElementChild)===null||r===void 0?void 0:r.getAttribute("slot");if(e.tagName==="RAISINS-PLOP-TARGET"&&a!=="loading"&&a!=="empty"){e.setAttribute("slot","column-"+t);e.style.position="absolute";n=e.firstElementChild.childNodes[1];n.innerHTML="+";n.style.lineHeight="20px";return[2,tryMethod(e,(function(){return e.renderLabel(t)}))]}return[2,tryMethod(e,(function(){return e.renderLabel()}))]}))}))}));if(!l)return[3,2];c=o===null||o===void 0?void 0:o.map((function(e){return __awaiter(g,void 0,void 0,(function(){return __generator(this,(function(t){return[2,tryMethod(e,(function t(){return e.renderCell(n,e)}))]}))}))}));return[4,Promise.all(c)];case 1:u=_.sent();_.label=2;case 2:f=a===null||a===void 0?void 0:a.map((function(e){return __awaiter(g,void 0,void 0,(function(){var t,r;var a=this;return __generator(this,(function(n){switch(n.label){case 0:t=o===null||o===void 0?void 0:o.map((function(t){return __awaiter(a,void 0,void 0,(function(){return __generator(this,(function(r){return[2,tryMethod(t,(function(){return t.renderCell(e,undefined)}))]}))}))}));return[4,Promise.all(t)];case 1:r=n.sent();return[2,r]}}))}))}));p=f;if(!p)return[3,4];v=[[u]];return[4,Promise.all(f)];case 3:p=__spreadArrays.apply(void 0,v.concat([_.sent()])).filter((function(e){return e}));_.label=4;case 4:h=p;i({rows:h});E=d;if(!E)return[3,6];return[4,Promise.all(d)];case 5:E=_.sent();_.label=6;case 6:m=E;i({columns:m,loading:false,page:0});return[2]}}))}))}useEffect((function(){i({loading:true});(s===null||s===void 0?void 0:s.data)&&d(o)}),[s===null||s===void 0?void 0:s.data,o,l]);var u=cjs({states:{hasPrev:false,hasNext:false,loading:false,show:"rows"},callbacks:{prevPage:function(){return console.log("Prev")},nextPage:function(){return console.log("Next")}},data:{textOverrides:{showLabels:!e.hideLabels,prevLabel:e.prevLabel,moreLabel:e.moreLabel},hiddenColumns:e.hiddenColumns,referralData:[],mdBreakpoint:799,smBreakpoint:599},elements:{columns:n.columns,rows:n.rows,emptyElement:t,loadingElement:r}},e.demoData||{},{arrayMerge:function(e,t){return t}});return u}var ReferralTableCell=function(){function e(e){registerInstance(this,e);this.ignored=true;h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){return h$1("div",{innerHTML:this.innerTemplate})};return e}();var ReferralTableGenericColumn=function(){function e(e){registerInstance(this,e);h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.renderCell=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,h$1("sqm-referral-table-cell",{"inner-template":getElement(this).innerHTML})]}))}))};e.prototype.renderLabel=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,Promise.resolve(this.columnTitle)]}))}))};e.prototype.render=function(){useRequestRerender([this.columnTitle]);return h$1(Host,{style:{display:"none"}},h$1("slot",null))};return e}();var ReferralTableDateCell=function(){function e(e){registerInstance(this,e);this.ignored=true;this.locale="en";h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e;var t=!this.date?"-":(e=luxon.DateTime.fromMillis(this.date))===null||e===void 0?void 0:e.setLocale(luxonLocale(this.locale)).toLocaleString(luxon.DateTime.DATE_MED);return t};return e}();var ReferralTableDateColumn=function(){function e(e){registerInstance(this,e);this.columnTitle="Date converted";this.dateShown="dateConverted";h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.renderCell=function(e,t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){return[2,h$1("sqm-referral-table-date-cell",{date:e[this.dateShown],locale:t===null||t===void 0?void 0:t.locale})]}))}))};e.prototype.renderLabel=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.columnTitle]}))}))};e.prototype.renderReferrerCell=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,h$1("sqm-referral-table-date-cell",{date:e[this.dateShown]})]}))}))};e.prototype.render=function(){useRequestRerender([this.dateShown,this.columnTitle]);return h$1(Host,{style:{display:"none"}})};return e}();var ReferralTableRewardsCell=function(){function e(e){registerInstance(this,e);this.statusText="{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} PAYOUT_FAILED {Payout Failed} PAYOUT_CANCELLED {Payout Cancelled} PENDING_TAX_REVIEW {Pending} PENDING_NEW_TAX_FORM {Pending} PENDING_TAX_SUBMISSION {Pending} PENDING_PARTNER_CREATION {Pending} DENIED {Denied} EXPIRED {Expired} REDEEMED {Redeemed} other {Not available} }";this.statusLongText="{status, select, AVAILABLE {Reward expiring on} CANCELLED {Reward cancelled on} PENDING {Available on} PENDING_REVIEW {Pending since} PAYOUT_APPROVED {Reward approved for payout and was scheduled for payment based on your settings.} PAYOUT_FAILED {Payout failed due to a fulfillment issue and is currently being retried.} PAYOUT_CANCELLED {If you think this is a mistake, contact our Support team.} PENDING_TAX_REVIEW {Awaiting tax form review} PENDING_NEW_TAX_FORM {Invalid tax form. Submit a new form to receive your rewards.} PENDING_TAX_SUBMISSION {Submit your tax documents to receive your rewards} PENDING_PARTNER_CREATION {Complete your tax and cash payout setup to receive your rewards} DENIED {Denied on} EXPIRED {Reward expired on} other {Not available} }";this.locale="en"}e.prototype.render=function(){var e=this;var t;intl.locale=this.locale;var r={"@keyframes slideRight":{from:{opacity:0},to:{opacity:1}},DetailsContainer:{width:"100%",display:"flex","align-items":"center","justify-content":"space-between","margin-right":"var(--sl-spacing-small)","flex-wrap":"wrap"},Details:{"max-width":"500px","&::part(header)":{padding:"var(--sl-spacing-x-small)",cursor:""+(this.hideDetails?"default":"pointer")},"&::part(content)":{padding:"var(--sl-spacing-x-small) var(--sl-spacing-medium)"},"&::part(base)":{border:"1px solid var(--sqm-border-color)",opacity:"1"},"&::part(summary-icon)":{display:""+(this.hideDetails?"none":"flex")},"&::part(summary-icon[open])":{transform:"rotate(-90deg)"}},BadgeContainer:{"& > :not(:last-child)":{"margin-right":"var(--sl-spacing-x-small)"}},BoldText:{"font-weight":"var(--sl-font-weight-semibold)"},RedeemBadge:{paddingLeft:"var(--sl-spacing-xxx-small)","&::part(base)":{textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-informative-color-icon)",color:"var(--sqm-informative-color-text)"}},DangerBadge:{paddingLeft:"var(--sl-spacing-xxx-small)","&::part(base)":{textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-danger-color-icon)",color:"var(--sqm-danger-color-text)"}},WarningBadge:{paddingLeft:"var(--sl-spacing-xxx-small)","&::part(base)":{textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-warning-color-icon)",color:"var(--sqm-warning-color-text)"}},SuccessBadge:{paddingLeft:"var(--sl-spacing-xxx-small)","&::part(base)":{textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-success-color-icon)",color:"var(--sqm-success-color-text)"}}};var a=createStyleSheet(r);var n=a.toString();var i=function(e){switch(e){case"primary":return a.classes.RedeemBadge;case"danger":return a.classes.DangerBadge;case"success":return a.classes.SuccessBadge;case"warning":case"info":return a.classes.WarningBadge;default:return a.classes.WarningBadge}};var l=function(e,t){var r,a,n,i,l,s,o,d,u,c,f,h;var p=["REDEEMED","CANCELLED","EXPIRED","PENDING","AVAILABLE","PENDING_REVIEW","DENIED","PAYOUT_APPROVED","PAYOUT_CANCELLED","PAYOUT_FAILED","PENDING_TAX_REVIEW","PENDING_NEW_TAX_FORM","PENDING_TAX_SUBMISSION","PENDING_PARTNER_CREATION"];if(((a=(r=e.referral)===null||r===void 0?void 0:r.fraudData)===null||a===void 0?void 0:a.moderationStatus)!=="APPROVED"){if(((i=(n=e.referral)===null||n===void 0?void 0:n.fraudData)===null||i===void 0?void 0:i.moderationStatus)==="PENDING")return"PENDING_REVIEW";if(((s=(l=e.referral)===null||l===void 0?void 0:l.fraudData)===null||s===void 0?void 0:s.moderationStatus)==="DENIED")return"DENIED"}var v=(o=e.partnerFundsTransfer)===null||o===void 0?void 0:o.status;if(v==="NOT_YET_DUE"||v==="TRANSFERRED"){return"PAYOUT_APPROVED"}else if(v==="OVERDUE")return"PAYOUT_FAILED";else if(v==="REVERSED")return"PAYOUT_CANCELLED";if((d=e===null||e===void 0?void 0:e.pendingReasons)===null||d===void 0?void 0:d.includes("US_TAX")){if(!(t===null||t===void 0?void 0:t.taxHandlingEnabled))return"PENDING";if(!(t===null||t===void 0?void 0:t.connected))return"PENDING_PARTNER_CREATION";if((u=t===null||t===void 0?void 0:t.publisher)===null||u===void 0?void 0:u.requiredTaxDocumentType){if(!((c=t===null||t===void 0?void 0:t.publisher)===null||c===void 0?void 0:c.currentTaxDocument))return"PENDING_TAX_SUBMISSION";var m=t.publisher.currentTaxDocument.status;if(m==="INACTIVE")return"PENDING_NEW_TAX_FORM";if(m==="NOT_VERIFIED")return"PENDING_TAX_REVIEW"}if(!((f=t===null||t===void 0?void 0:t.publisher)===null||f===void 0?void 0:f.withdrawalSettings))return"PENDING_PARTNER_CREATION"}if((h=e===null||e===void 0?void 0:e.pendingReasons)===null||h===void 0?void 0:h.includes("PAYOUT_CONFIGURATION_MISSING")){return"PENDING_PARTNER_CREATION"}if(e.statuses.length===1)return e.statuses[0];return p.find((function(t){return e.statuses.includes(t)&&t}))};var s=function(e){switch(e){case"REDEEMED":case"PAYOUT_APPROVED":return"primary";case"DENIED":case"EXPIRED":case"CANCELLED":case"PAYOUT_FAILED":case"PAYOUT_CANCELLED":return"danger";case"PENDING":case"PENDING_REVIEW":case"PENDING_TAX_REVIEW":case"PENDING_NEW_TAX_FORM":case"PENDING_TAX_SUBMISSION":case"PENDING_PARTNER_CREATION":return"warning";case"AVAILABLE":return"success"}};var o=function(t){return luxon.DateTime.fromMillis(t).setLocale(luxonLocale(e.locale)).toRelative().replace("in","").trim()};return(t=this.rewards)===null||t===void 0?void 0:t.map((function(t){var r,d;var u=l(t,e.taxConnection);var c=s(u);var f=intl.formatMessage({id:"statusShortMessage",defaultMessage:e.statusText},{status:u});var h=intl.formatMessage({id:"statusLongMessage",defaultMessage:e.statusLongText},{status:u});return h$1("sl-details",{class:a.classes.Details,disabled:e.hideDetails},h$1("style",{type:"text/css"},n),h$1("div",{slot:"summary",class:a.classes.DetailsContainer},h$1(TextSpanView,{type:"p"},h$1("span",{part:"sqm-cell-value",class:a.classes.BoldText},t.prettyValue)),h$1("div",{class:a.classes.BadgeContainer},u==="PENDING"&&t.dateScheduledFor?h$1("sl-badge",{class:i(c),type:c,pill:true},intl.formatMessage({id:"pendingForText",defaultMessage:e.pendingForText},{status:f,date:o(t.dateScheduledFor)})):h$1("sl-badge",{class:i(c),type:c,pill:true},f),t.dateExpires&&u==="AVAILABLE"&&h$1("sl-badge",{class:i(c),type:"info",pill:true},e.expiringText," "+o(t.dateExpires)))),h$1("div",null,u==="PENDING_REVIEW"&&((r=t.referral)===null||r===void 0?void 0:r.dateModerated)&&h$1("div",null,h$1(TextSpanView,{type:"p"},h," ",h$1("span",{class:a.classes.BoldText,part:"sqm-cell-value"},luxon.DateTime.fromMillis(t.referral.dateModerated).setLocale(luxonLocale(e.locale)).toLocaleString(luxon.DateTime.DATE_MED)))),u==="PAYOUT_APPROVED"&&h$1("div",null,h$1(TextSpanView,{type:"p"},h)),u==="PAYOUT_FAILED"&&h$1("div",null,h$1(TextSpanView,{type:"p"},h)),u==="PAYOUT_CANCELLED"&&h$1("div",null,h$1(TextSpanView,{type:"p"},h)),u==="PENDING_TAX_REVIEW"&&h$1("div",null,h$1(TextSpanView,{type:"p"},h)),u==="PENDING_NEW_TAX_FORM"&&h$1("div",null,h$1(TextSpanView,{type:"p"},h)),u==="PENDING_TAX_SUBMISSION"&&h$1("div",null,h$1(TextSpanView,{type:"p"},h)),u==="PENDING_PARTNER_CREATION"&&h$1("div",null,h$1(TextSpanView,{type:"p"},h)),u==="DENIED"&&((d=t.referral)===null||d===void 0?void 0:d.dateModerated)&&h$1("div",null,h$1(TextSpanView,{type:"p"},h," ",h$1("span",{class:a.classes.BoldText,part:"sqm-cell-value"},luxon.DateTime.fromMillis(t.referral.dateModerated).setLocale(luxonLocale(e.locale)).toLocaleString(luxon.DateTime.DATE_MED)),".",e.deniedHelpText?" "+e.deniedHelpText:"")),t.dateGiven&&h$1("div",null,h$1(TextSpanView,{type:"p"},e.rewardReceivedText," ",h$1("span",{class:a.classes.BoldText,part:"sqm-cell-value"},luxon.DateTime.fromMillis(t.dateGiven).setLocale(luxonLocale(e.locale)).toLocaleString(luxon.DateTime.DATE_MED)))),u==="EXPIRED"&&t.dateExpires&&h$1("div",null,h$1(TextSpanView,{type:"p"},h," ",h$1("span",{class:a.classes.BoldText,part:"sqm-cell-value"},luxon.DateTime.fromMillis(t.dateExpires).setLocale(luxonLocale(e.locale)).toLocaleString(luxon.DateTime.DATE_MED)))),u==="CANCELLED"&&t.dateCancelled&&h$1("div",null,h$1(TextSpanView,{type:"p"},h," ",h$1("span",{class:a.classes.BoldText,part:"sqm-cell-value"},luxon.DateTime.fromMillis(t.dateCancelled).setLocale(luxonLocale(e.locale)).toLocaleString(luxon.DateTime.DATE_MED)))),u==="PENDING"&&t.dateScheduledFor&&h$1("div",null,h$1(TextSpanView,{type:"p"},h," ",h$1("span",{class:a.classes.BoldText,part:"sqm-cell-value"},luxon.DateTime.fromMillis(t.dateScheduledFor).setLocale(luxonLocale(e.locale)).toLocaleString(luxon.DateTime.DATE_MED))))," ",u==="AVAILABLE"&&t.dateExpires&&h$1("div",null,h$1(TextSpanView,{type:"p"},h," ",h$1("span",{class:a.classes.BoldText,part:"sqm-cell-value"},luxon.DateTime.fromMillis(t.dateExpires).setLocale(luxonLocale(e.locale)).toLocaleString(luxon.DateTime.DATE_MED)))),t.fuelTankCode&&h$1("div",null,e.fuelTankText," ",h$1("span",{class:a.classes.BoldText,part:"sqm-cell-value"},t.fuelTankCode))))}))};return e}();var ReferralTableRewardsColumn=function(){function e(e){registerInstance(this,e);this.columnTitle="Rewards";this.statusText="{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} PAYOUT_FAILED {Payout Failed} PAYOUT_CANCELLED {Payout Cancelled} PENDING_TAX_REVIEW {Pending} PENDING_NEW_TAX_FORM {Pending} PENDING_TAX_SUBMISSION {Pending} PENDING_PARTNER_CREATION {Pending} DENIED {Denied} EXPIRED {Expired} REDEEMED {Redeemed} other {Not available} }";this.statusLongText="{status, select, AVAILABLE {Reward expiring on} CANCELLED {Reward cancelled on} PENDING {Available on} PENDING_REVIEW {Pending since} PAYOUT_APPROVED {Reward approved for payout and was scheduled for payment based on your settings.} PAYOUT_FAILED {Payout failed due to a fulfillment issue and is currently being retried.} PAYOUT_CANCELLED {If you think this is a mistake, contact our Support team.} PENDING_TAX_REVIEW {Awaiting tax form review} PENDING_NEW_TAX_FORM {Invalid tax form. Submit a new form to receive your rewards.} PENDING_TAX_SUBMISSION {Submit your tax documents to receive your rewards} PENDING_PARTNER_CREATION {Complete your tax and cash payout setup to receive your rewards} DENIED {Denied on} EXPIRED {Reward expired on} other {Not available} }";this.fuelTankText="Your code is";this.rewardReceivedText="Reward received on";this.expiringText="Expiring in";this.pendingForText="{status} for {date}";this.deniedHelpText="Contact support if you think this is a mistake.";this.hideDetails=false;h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.renderCell=function(e,t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){return[2,h$1("sqm-referral-table-rewards-cell",{rewards:e.rewards,taxConnection:t===null||t===void 0?void 0:t.taxConnection,statusText:this.statusText,statusLongText:this.statusLongText,fuelTankText:this.fuelTankText,rewardReceivedText:this.rewardReceivedText,expiringText:this.expiringText,pendingForText:this.pendingForText,hideDetails:this.hideDetails,deniedHelpText:this.deniedHelpText,locale:t===null||t===void 0?void 0:t.locale,exportparts:"sqm-cell-value"})]}))}))};e.prototype.renderLabel=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.columnTitle]}))}))};e.prototype.renderReferrerCell=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,h$1("sqm-referral-table-rewards-cell",{rewards:e.rewards,exportparts:"sqm-cell-value"})]}))}))};e.prototype.render=function(){useRequestRerender([this.columnTitle,this.statusText,this.statusLongText,this.fuelTankText,this.rewardReceivedText,this.expiringText,this.pendingForText,this.hideDetails]);return h$1(Host,{style:{display:"none"}})};return e}();var style={SubText:{fontSize:"var(--sl-font-size-small)",color:"var(--sqm-text-subdued)",margin:"0"},RedeemBadge:{"&::part(base)":{fontSize:"var(--sl-font-size-small)",padding:"4px 8px",textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-informative-color-icon)",color:"var(--sqm-informative-color-text)"}},DangerBadge:{"&::part(base)":{fontSize:"var(--sl-font-size-small)",padding:"4px 8px",textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-danger-color-icon)",color:"var(--sqm-danger-color-text)"}},WarningBadge:{"&::part(base)":{fontSize:"var(--sl-font-size-small)",padding:"4px 8px",textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-warning-color-icon)",color:"var(--sqm-warning-color-text)"}},SuccessBadge:{"&::part(base)":{fontSize:"var(--sl-font-size-small)",padding:"4px 8px",textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-success-color-icon)",color:"var(--sqm-success-color-text)"}}};var sheet=createStyleSheet(style);var styleString=sheet.toString();var ReferralTableStatusCell=function(){function e(e){registerInstance(this,e)}e.prototype.render=function(){var e=this;var t=createStyleSheet(style);var r=t.toString();var a=function(t){if(t==="PENDING")return"warning";if(t==="DENIED")return"danger";if(e.converted)return"success";return"warning"};var n=function(e){switch(e){case"primary":return t.classes.RedeemBadge;case"danger":return t.classes.DangerBadge;case"success":return t.classes.SuccessBadge;case"warning":case"info":return t.classes.WarningBadge;default:return t.classes.WarningBadge}};return h$1("div",null,h$1("style",{type:"text/css"},r),h$1("sl-badge",{pill:true,type:a(this.fraudStatus),class:n(a(this.fraudStatus))},this.statusText),this.statusSubText?h$1("p",{class:t.classes.SubText},this.statusSubText):null)};return e}();var ReferralTableStatusColumn=function(){function e(e){registerInstance(this,e);this.columnTitle="Status";this.convertedStatusText="Converted";this.inProgressStatusText="In Progress";this.pendingReviewStatusText="Pending";this.deniedStatusText="Denied";this.pendingReviewStatusSubText="Awaiting review";this.deniedStatusSubText="Detected self-referral";h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.renderCell=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,a,n;return __generator(this,(function(i){n=(t=e===null||e===void 0?void 0:e.fraudData)===null||t===void 0?void 0:t.moderationStatus;if(n==="DENIED"){r=this.deniedStatusText;a=this.deniedStatusSubText}else if(n==="PENDING"){r=this.pendingReviewStatusText;a=this.pendingReviewStatusSubText}else{r=e.dateConverted?this.convertedStatusText:this.inProgressStatusText}return[2,h$1("sqm-referral-table-status-cell",{"status-text":r,"status-sub-text":a,"fraud-status":n,converted:e.dateConverted?true:false})]}))}))};e.prototype.renderLabel=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.columnTitle]}))}))};e.prototype.renderReferrerCell=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(r){t=e.dateConverted?this.convertedStatusText:this.inProgressStatusText;return[2,h$1("sqm-referral-table-status-cell",{"status-text":t,converted:e.dateConverted?true:false})]}))}))};e.prototype.render=function(){useRequestRerender([this.columnTitle,this.convertedStatusText,this.inProgressStatusText]);return h$1(Host,{style:{display:"none"}})};return e}();var ReferralTableUserCell=function(){function e(e){registerInstance(this,e)}e.prototype.render=function(){return this.name};return e}();var ReferralTableUserColumn=function(){function e(e){registerInstance(this,e);this.columnTitle="Customer";this.anonymousUser="Anonymous User";this.deletedUser="Deleted User";h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.renderCell=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,a,n,i,l,s,o,d;return __generator(this,(function(u){if(!(e===null||e===void 0?void 0:e.referredUser)&&!(e===null||e===void 0?void 0:e.referrerUser)){d=this.deletedUser}else if(!((t=e===null||e===void 0?void 0:e.referredUser)===null||t===void 0?void 0:t.firstName)&&!((r=e===null||e===void 0?void 0:e.referredUser)===null||r===void 0?void 0:r.lastName)&&!((a=e===null||e===void 0?void 0:e.referrerUser)===null||a===void 0?void 0:a.firstName)&&!((n=e===null||e===void 0?void 0:e.referrerUser)===null||n===void 0?void 0:n.lastName)){d=this.anonymousUser}else if(e===null||e===void 0?void 0:e.referrerUser){d=((i=e===null||e===void 0?void 0:e.referrerUser)===null||i===void 0?void 0:i.firstName)+" "+((l=e===null||e===void 0?void 0:e.referrerUser)===null||l===void 0?void 0:l.lastName)}else{d=((s=e===null||e===void 0?void 0:e.referredUser)===null||s===void 0?void 0:s.firstName)+" "+((o=e===null||e===void 0?void 0:e.referredUser)===null||o===void 0?void 0:o.lastName)}return[2,h$1("sqm-referral-table-user-cell",{name:d})]}))}))};e.prototype.renderLabel=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.columnTitle]}))}))};e.prototype.renderReferrerCell=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,a,n,i;return __generator(this,(function(l){if(!e){i=this.deletedUser}else if(!((t=e===null||e===void 0?void 0:e.referrerUser)===null||t===void 0?void 0:t.firstName)&&!((r=e.referrerUser)===null||r===void 0?void 0:r.lastName)){i=this.anonymousUser}else{i=((a=e===null||e===void 0?void 0:e.referrerUser)===null||a===void 0?void 0:a.firstName)+" "+((n=e===null||e===void 0?void 0:e.referrerUser)===null||n===void 0?void 0:n.lastName)}return[2,h$1("sqm-referral-table-user-cell",{name:i})]}))}))};e.prototype.render=function(){useRequestRerender([this.deletedUser,this.anonymousUser,this.columnTitle]);return h$1(Host,{style:{display:"none"}})};return e}();export{ReferralTable as sqm_referral_table,ReferralTableCell as sqm_referral_table_cell,ReferralTableGenericColumn as sqm_referral_table_column,ReferralTableDateCell as sqm_referral_table_date_cell,ReferralTableDateColumn as sqm_referral_table_date_column,ReferralTableRewardsCell as sqm_referral_table_rewards_cell,ReferralTableRewardsColumn as sqm_referral_table_rewards_column,ReferralTableStatusCell as sqm_referral_table_status_cell,ReferralTableStatusColumn as sqm_referral_table_status_column,ReferralTableUserCell as sqm_referral_table_user_cell,ReferralTableUserColumn as sqm_referral_table_user_column};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,r,i){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function o(e){try{l(i.next(e))}catch(e){s(e)}}function n(e){try{l(i["throw"](e))}catch(e){s(e)}}function l(e){e.done?r(e.value):a(e.value).then(o,n)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,a,s,o;return o={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function n(e){return function(t){return l([e,t])}}function l(o){if(i)throw new TypeError("Generator is already executing.");while(r)try{if(i=1,a&&(s=o[0]&2?a["return"]:o[0]?a["throw"]||((s=a["return"])&&s.call(a),0):a.next)&&!(s=s.call(a,o[1])).done)return s;if(a=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;a=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){r.label=o[1];break}if(o[0]===6&&r.label<s[1]){r.label=s[1];s=o;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(o);break}if(s[2])r.ops.pop();r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e];a=0}finally{i=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,h as h$1}from"./index-91e7729f.js";import{n as h}from"./stencil-hooks.module-4bc38af4.js";import{i as isDemo,b as setUserIdentity}from"./index.module-89a79f66.js";import"./jsonpointer-388a7082.js";import{c as cjs}from"./cjs-bdfb4486.js";import"./JSS-67b5cff8.js";import"./mixins-f750863a.js";import{E as EmailRegistrationView}from"./email-registration-view-b1c858ee.js";import"./useRegistrationFormState-d6f33135.js";import{u as useInstantAccessRegistration}from"./useInstantAccessRegistration-dc4ad9f2.js";var ReferredRegistration=function(){function e(e){registerInstance(this,e);this.ignored=true;this.emailLabel="Email";this.firstNameLabel="First Name";this.lastNameLabel="Last Name";this.registerLabel="Start Referring";this.includeName=false;this.hideBorder=false;this.requiredFieldErrorMessage="Cannot be empty";this.invalidEmailErrorMessage="Please enter a valid email address";this.networkErrorMessage="There was a problem signing you in. Please wait a moment and try again. If this problem continues, contact Support for help resolving this issue.";this.fraudErrorMessage="Our team will review this referral. If approved, you and your friend will receive your rewards. Need help? Reach out to our Support team.";this.fraudErrorMessageTitle="Looks like you tried referring yourself";this.paddingTop="large";this.paddingRight="large";this.paddingBottom="large";this.paddingLeft="large";this.backgroundColor="#ffffff";this.includeCookies=true;h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=isDemo()?useRegistrationDemo(this):useInstantAccessRegistration(this),t=e.states,r=e.callbacks;var i={fraudErrorMessage:this.fraudErrorMessage,fraudErrorMessageTitle:this.fraudErrorMessageTitle,emailLabel:this.emailLabel,registerLabel:this.registerLabel,firstNameLabel:this.firstNameLabel,lastNameLabel:this.lastNameLabel,includeName:this.includeName,hideBorder:this.hideBorder,invalidEmailErrorMessage:this.invalidEmailErrorMessage,requiredFieldErrorMessage:this.requiredFieldErrorMessage,paddingTop:this.paddingTop,paddingBottom:this.paddingBottom,paddingLeft:this.paddingLeft,paddingRight:this.paddingRight,backgroundColor:this.backgroundColor,topSlot:h$1("slot",{name:"top"}),bottomSlot:h$1("slot",{name:"bottom"})};return h$1(EmailRegistrationView,{states:t,callbacks:r,content:i})};return e}();function useRegistrationDemo(e){var t=this;var r=function(){setUserIdentity({id:"referrer@example.com",accountId:"referrer@example.com",jwt:"eyJraWQiOiJlNjI2NzQxNy1jMzZlLTRlM2EtYjM5NS1lYTFmY2YyNmU3YzIiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJjbVZtWlhKeVpYSkFaWGhoYlhCc1pTNWpiMjA9OmNtVm1aWEp5WlhKQVpYaGhiWEJzWlM1amIyMD1AdGVzdF9heGJndGF0dzF0Y2NwOnVzZXJzIiwicGFzc3dvcmRsZXNzIjp0cnVlLCJpc3MiOiJodHRwczovL3N0YWdpbmcucmVmZXJyYWxzYWFzcXVhdGNoLmNvbS8iLCJleHAiOjE2ODA4ODU5MTksImlhdCI6MTY4MDc5OTUxOX0.kjmTVVf_BTb-uMNKnadLyNLxMFwpkefsY02O3iAfBVIJJZZfeZMwunPlKsS3Vbp28aYRClBjH5Wj4pYxDn23D0CdZx8KNCqiJ8yF6149O9SPMkRseoJkliqS6LyvMOEDjGDkuLfcC8_hq1AHBXFt5BdCtWOk1gwf_5R9A0w5gXEIvprBzbNDLbuo88bVAlrmFNvfttXXryrpUeruMal7cBKuy02YblBrB4kKoyJiprU5GLEjciBA4A56u8TwQc0kbsPf2YcQaJsY_IvkC7S1u4sPyObpq6iF6Ed8UYHAo6nU5KjZXyVtoUyeIS11mf_6OtDO6LyMNHV2FtEUUDdPCg"})};return cjs({states:{error:"",loading:false},callbacks:{submit:function(e){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){r();return[2]}))}))}}},e.demoData||{},{arrayMerge:function(e,t){return t}})}export{ReferredRegistration as sqm_referred_registration};
1
+ var __awaiter=this&&this.__awaiter||function(e,t,r,i){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function o(e){try{l(i.next(e))}catch(e){s(e)}}function n(e){try{l(i["throw"](e))}catch(e){s(e)}}function l(e){e.done?r(e.value):a(e.value).then(o,n)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,a,s,o;return o={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function n(e){return function(t){return l([e,t])}}function l(o){if(i)throw new TypeError("Generator is already executing.");while(r)try{if(i=1,a&&(s=o[0]&2?a["return"]:o[0]?a["throw"]||((s=a["return"])&&s.call(a),0):a.next)&&!(s=s.call(a,o[1])).done)return s;if(a=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;a=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){r.label=o[1];break}if(o[0]===6&&r.label<s[1]){r.label=s[1];s=o;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(o);break}if(s[2])r.ops.pop();r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e];a=0}finally{i=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,h as h$1}from"./index-b3a06de8.js";import{n as h}from"./stencil-hooks.module-20ad2b5f.js";import{i as isDemo,b as setUserIdentity}from"./index.module-d49ae5e7.js";import"./jsonpointer-388a7082.js";import{c as cjs}from"./cjs-bdfb4486.js";import"./JSS-67b5cff8.js";import"./mixins-f750863a.js";import{E as EmailRegistrationView}from"./email-registration-view-db81655f.js";import"./useRegistrationFormState-2db047e9.js";import{u as useInstantAccessRegistration}from"./useInstantAccessRegistration-b224f3ce.js";var ReferredRegistration=function(){function e(e){registerInstance(this,e);this.ignored=true;this.emailLabel="Email";this.firstNameLabel="First Name";this.lastNameLabel="Last Name";this.registerLabel="Start Referring";this.includeName=false;this.hideBorder=false;this.requiredFieldErrorMessage="Cannot be empty";this.invalidEmailErrorMessage="Please enter a valid email address";this.networkErrorMessage="There was a problem signing you in. Please wait a moment and try again. If this problem continues, contact Support for help resolving this issue.";this.fraudErrorMessage="Our team will review this referral. If approved, you and your friend will receive your rewards. Need help? Reach out to our Support team.";this.fraudErrorMessageTitle="Looks like you tried referring yourself";this.paddingTop="large";this.paddingRight="large";this.paddingBottom="large";this.paddingLeft="large";this.backgroundColor="#ffffff";this.includeCookies=true;h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=isDemo()?useRegistrationDemo(this):useInstantAccessRegistration(this),t=e.states,r=e.callbacks;var i={fraudErrorMessage:this.fraudErrorMessage,fraudErrorMessageTitle:this.fraudErrorMessageTitle,emailLabel:this.emailLabel,registerLabel:this.registerLabel,firstNameLabel:this.firstNameLabel,lastNameLabel:this.lastNameLabel,includeName:this.includeName,hideBorder:this.hideBorder,invalidEmailErrorMessage:this.invalidEmailErrorMessage,requiredFieldErrorMessage:this.requiredFieldErrorMessage,paddingTop:this.paddingTop,paddingBottom:this.paddingBottom,paddingLeft:this.paddingLeft,paddingRight:this.paddingRight,backgroundColor:this.backgroundColor,topSlot:h$1("slot",{name:"top"}),bottomSlot:h$1("slot",{name:"bottom"})};return h$1(EmailRegistrationView,{states:t,callbacks:r,content:i})};return e}();function useRegistrationDemo(e){var t=this;var r=function(){setUserIdentity({id:"referrer@example.com",accountId:"referrer@example.com",jwt:"eyJraWQiOiJlNjI2NzQxNy1jMzZlLTRlM2EtYjM5NS1lYTFmY2YyNmU3YzIiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJjbVZtWlhKeVpYSkFaWGhoYlhCc1pTNWpiMjA9OmNtVm1aWEp5WlhKQVpYaGhiWEJzWlM1amIyMD1AdGVzdF9heGJndGF0dzF0Y2NwOnVzZXJzIiwicGFzc3dvcmRsZXNzIjp0cnVlLCJpc3MiOiJodHRwczovL3N0YWdpbmcucmVmZXJyYWxzYWFzcXVhdGNoLmNvbS8iLCJleHAiOjE2ODA4ODU5MTksImlhdCI6MTY4MDc5OTUxOX0.kjmTVVf_BTb-uMNKnadLyNLxMFwpkefsY02O3iAfBVIJJZZfeZMwunPlKsS3Vbp28aYRClBjH5Wj4pYxDn23D0CdZx8KNCqiJ8yF6149O9SPMkRseoJkliqS6LyvMOEDjGDkuLfcC8_hq1AHBXFt5BdCtWOk1gwf_5R9A0w5gXEIvprBzbNDLbuo88bVAlrmFNvfttXXryrpUeruMal7cBKuy02YblBrB4kKoyJiprU5GLEjciBA4A56u8TwQc0kbsPf2YcQaJsY_IvkC7S1u4sPyObpq6iF6Ed8UYHAo6nU5KjZXyVtoUyeIS11mf_6OtDO6LyMNHV2FtEUUDdPCg"})};return cjs({states:{error:"",loading:false},callbacks:{submit:function(e){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){r();return[2]}))}))}}},e.demoData||{},{arrayMerge:function(e,t){return t}})}export{ReferredRegistration as sqm_referred_registration};
@@ -1 +1 @@
1
- import{r as registerInstance,h as h$1}from"./index-91e7729f.js";import{n as h}from"./stencil-hooks.module-4bc38af4.js";import"./JSS-67b5cff8.js";import{T as TextSpanView}from"./sqm-text-span-view-cd3902e5.js";var RewardTableCustomerNoteCell=function(){function e(e){registerInstance(this,e);this.ignored=true;this.locale="en";h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=this.note;return h$1(TextSpanView,{type:"p"},e)};return e}();export{RewardTableCustomerNoteCell as sqm_rewards_table_customer_note_cell};
1
+ import{r as registerInstance,h as h$1}from"./index-b3a06de8.js";import{n as h}from"./stencil-hooks.module-20ad2b5f.js";import"./JSS-67b5cff8.js";import{T as TextSpanView}from"./sqm-text-span-view-4c17b8c9.js";var RewardTableCustomerNoteCell=function(){function e(e){registerInstance(this,e);this.ignored=true;this.locale="en";h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=this.note;return h$1(TextSpanView,{type:"p"},e)};return e}();export{RewardTableCustomerNoteCell as sqm_rewards_table_customer_note_cell};