@saasquatch/mint-components 2.2.0 → 2.3.0-2

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 (375) hide show
  1. package/dist/cjs/{data-8c8a08f6.js → data-89ac73dd.js} +2 -90
  2. package/dist/cjs/eventKeys-7af4df4d.js +5 -0
  3. package/dist/cjs/{keys-cff24974.js → keys-5a2c9ed2.js} +4 -0
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/mint-components.cjs.js +1 -1
  6. package/dist/cjs/parseStates-d1effc19.js +16 -0
  7. package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +461 -339
  8. package/dist/cjs/{sqm-big-stat_46.cjs.entry.js → sqm-big-stat_47.cjs.entry.js} +450 -16
  9. package/dist/cjs/sqm-code-verification.cjs.entry.js +4 -5
  10. package/dist/cjs/sqm-email-verification_2.cjs.entry.js +893 -0
  11. package/dist/cjs/sqm-partner-info-modal-view-f6faecf5.js +149 -0
  12. package/dist/cjs/sqm-referral-table_11.cjs.entry.js +27 -9
  13. package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +30 -9
  14. package/dist/cjs/sqm-stencilbook.cjs.entry.js +732 -326
  15. package/dist/cjs/{sqm-user-info-form-view-53306f6e.js → sqm-user-info-form-view-0e1ddbe4.js} +34 -426
  16. package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +1 -1
  17. package/dist/cjs/{usePayoutStatus-0192fccd.js → useIndirectTaxForm-c3c1ec56.js} +294 -5
  18. package/dist/cjs/utils-a3b3d05b.js +478 -0
  19. package/dist/collection/collection-manifest.json +1 -0
  20. package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +171 -0
  21. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +143 -0
  22. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +670 -0
  23. package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +276 -0
  24. package/dist/collection/components/sqm-referral-table/ReferralTable.stories.js +1 -0
  25. package/dist/collection/components/sqm-referral-table/ReferralTableRewardsCell.stories.js +1 -0
  26. package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTable.stories.js +2 -2
  27. package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.js +209 -145
  28. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +30 -10
  29. package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +1 -0
  30. package/dist/collection/components/sqm-rewards-table/TaxAndCashRewardsTable.stories.js +2 -2
  31. package/dist/collection/components/sqm-rewards-table/TaxAndCashRewardsTableCell.stories.js +223 -137
  32. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.js +30 -10
  33. package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +1 -0
  34. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +4 -0
  35. package/dist/collection/components/sqm-widget-verification/WidgetVerification.stories.js +16 -0
  36. package/dist/collection/components/sqm-widget-verification/keys.js +2 -0
  37. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.js +3 -4
  38. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.js +0 -2
  39. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/useEmailVerification.js +19 -9
  40. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +486 -46
  41. package/dist/collection/components/sqm-widget-verification/useWidgetVerification.js +43 -11
  42. package/dist/collection/components/tax-and-cash/data.js +2 -0
  43. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +93 -37
  44. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +738 -13
  45. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +95 -1
  46. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +51 -12
  47. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +59 -30
  48. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +51 -2
  49. package/dist/collection/components/tax-and-cash/sqm-user-info-form/UserInfoFormView.stories.js +0 -1
  50. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +10 -18
  51. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +0 -25
  52. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +34 -17
  53. package/dist/esm/{ShadowViewAddon-0b980200.js → ShadowViewAddon-e115fa1c.js} +5 -5
  54. package/dist/{mint-components/p-0c0d4065.js → esm/data-8698cbc6.js} +25 -5
  55. package/dist/esm/eventKeys-f76b6a03.js +3 -0
  56. package/dist/esm/{global-96c14d63.js → global-75e96214.js} +1 -1
  57. package/dist/esm/{index.module-b23fdad8.js → index.module-02cb914c.js} +1 -1
  58. package/dist/esm/keys-1054056a.js +8 -0
  59. package/dist/esm/loader.js +3 -3
  60. package/dist/esm/mint-components.js +3 -3
  61. package/dist/esm/parseStates-ed75e224.js +14 -0
  62. package/dist/esm/{re-render-f30aeb6b.js → re-render-bf46ba54.js} +1 -1
  63. package/dist/esm/sqm-banking-info-form_10.entry.js +448 -326
  64. package/dist/esm/{sqm-big-stat_46.entry.js → sqm-big-stat_47.entry.js} +454 -21
  65. package/dist/esm/sqm-close-button.entry.js +1 -1
  66. package/dist/esm/sqm-code-verification.entry.js +7 -8
  67. package/dist/esm/sqm-context-router.entry.js +1 -1
  68. package/dist/esm/sqm-email-verification_2.entry.js +888 -0
  69. package/dist/esm/sqm-empty_4.entry.js +2 -2
  70. package/dist/esm/sqm-google-sign-in.entry.js +1 -1
  71. package/dist/esm/sqm-graphql-client-provider.entry.js +1 -1
  72. package/dist/esm/sqm-instant-access-registration.entry.js +3 -3
  73. package/dist/esm/{sqm-lead-checkbox-field-view-7928db07.js → sqm-lead-checkbox-field-view-bfafee56.js} +1 -1
  74. package/dist/esm/sqm-lead-checkbox-field.entry.js +4 -4
  75. package/dist/esm/{sqm-lead-input-field-view-d1b91650.js → sqm-lead-input-field-view-b945edf4.js} +1 -1
  76. package/dist/esm/sqm-lead-input-field.entry.js +4 -4
  77. package/dist/esm/sqm-leaderboard-rank.entry.js +2 -2
  78. package/dist/esm/sqm-logout-current-user.entry.js +1 -1
  79. package/dist/esm/{sqm-navigation-sidebar-item-view-b3beac5a.js → sqm-navigation-sidebar-item-view-8d98fcf3.js} +1 -1
  80. package/dist/esm/sqm-navigation-sidebar-item.entry.js +2 -2
  81. package/dist/esm/sqm-navigation-sidebar.entry.js +1 -1
  82. package/dist/esm/sqm-pagination_3.entry.js +3 -3
  83. package/dist/esm/sqm-partner-info-modal-view-d6f3a215.js +146 -0
  84. package/dist/esm/sqm-password-field.entry.js +2 -2
  85. package/dist/esm/sqm-popup-container.entry.js +1 -1
  86. package/dist/esm/{sqm-portal-email-verification-view-04528277.js → sqm-portal-email-verification-view-fde1eb35.js} +1 -1
  87. package/dist/esm/sqm-portal-email-verification.entry.js +3 -3
  88. package/dist/esm/sqm-portal-forgot-password_6.entry.js +4 -4
  89. package/dist/esm/sqm-portal-logout.entry.js +1 -1
  90. package/dist/esm/{sqm-portal-profile-view-b5ea620f.js → sqm-portal-profile-view-2018590a.js} +1 -1
  91. package/dist/esm/sqm-portal-profile.entry.js +4 -4
  92. package/dist/esm/sqm-portal-protected-route.entry.js +1 -1
  93. package/dist/esm/sqm-portal-reset-password.entry.js +1 -1
  94. package/dist/esm/{sqm-portal-verify-email-view-c61536b7.js → sqm-portal-verify-email-view-590f964b.js} +1 -1
  95. package/dist/esm/sqm-qr-code.entry.js +2 -2
  96. package/dist/esm/sqm-referral-table_11.entry.js +32 -14
  97. package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +2 -2
  98. package/dist/esm/sqm-rewards-table_9.entry.js +35 -14
  99. package/dist/esm/sqm-stencilbook.entry.js +708 -302
  100. package/dist/esm/sqm-tab.entry.js +2 -2
  101. package/dist/esm/sqm-tabs.entry.js +3 -3
  102. package/dist/esm/{sqm-user-info-form-view-19d81a2b.js → sqm-user-info-form-view-e1ba6009.js} +14 -403
  103. package/dist/esm/sqm-widget-verification-controller.entry.js +2 -2
  104. package/dist/esm/{useChildElements-9bccfb72.js → useChildElements-06937df7.js} +1 -1
  105. package/dist/esm/{usePayoutStatus-46c0c289.js → useIndirectTaxForm-b2888ea5.js} +292 -5
  106. package/dist/esm/{useInstantAccessRegistration-69fefed0.js → useInstantAccessRegistration-69c9ffe0.js} +2 -2
  107. package/dist/esm/{useLeadFormState-dd4e8b08.js → useLeadFormState-332b2796.js} +2 -2
  108. package/dist/esm/{usePortalRegistrationForm-62de6fb1.js → usePortalRegistrationForm-3a1f36a2.js} +2 -2
  109. package/dist/esm/{useReferralCodes-52ca720f.js → useReferralCodes-25f8b792.js} +1 -1
  110. package/dist/esm/{useReferralTable-92af4133.js → useReferralTable-03d32c6f.js} +3 -3
  111. package/dist/esm/{useRegistrationFormState-2c090c38.js → useRegistrationFormState-aa44cfff.js} +1 -1
  112. package/dist/esm/{useVerificationEmail-c13c3b51.js → useVerificationEmail-9f2c0bab.js} +1 -1
  113. package/dist/esm/{utilities-77b1e0cc.js → utilities-cbd8f2eb.js} +1 -1
  114. package/dist/esm/utils-4f5cd04c.js +467 -0
  115. package/dist/esm-es5/{ShadowViewAddon-0b980200.js → ShadowViewAddon-e115fa1c.js} +1 -1
  116. package/dist/esm-es5/data-8698cbc6.js +1 -0
  117. package/dist/esm-es5/eventKeys-f76b6a03.js +1 -0
  118. package/dist/esm-es5/{global-96c14d63.js → global-75e96214.js} +1 -1
  119. package/dist/esm-es5/{index.module-b23fdad8.js → index.module-02cb914c.js} +1 -1
  120. package/dist/esm-es5/keys-1054056a.js +1 -0
  121. package/dist/esm-es5/loader.js +1 -1
  122. package/dist/esm-es5/mint-components.js +1 -1
  123. package/dist/esm-es5/parseStates-ed75e224.js +1 -0
  124. package/dist/esm-es5/{re-render-f30aeb6b.js → re-render-bf46ba54.js} +1 -1
  125. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  126. package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -0
  127. package/dist/esm-es5/sqm-close-button.entry.js +1 -1
  128. package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
  129. package/dist/esm-es5/sqm-context-router.entry.js +1 -1
  130. package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -0
  131. package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
  132. package/dist/esm-es5/sqm-google-sign-in.entry.js +1 -1
  133. package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
  134. package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
  135. package/dist/esm-es5/{sqm-lead-checkbox-field-view-7928db07.js → sqm-lead-checkbox-field-view-bfafee56.js} +1 -1
  136. package/dist/esm-es5/sqm-lead-checkbox-field.entry.js +1 -1
  137. package/dist/esm-es5/{sqm-lead-input-field-view-d1b91650.js → sqm-lead-input-field-view-b945edf4.js} +1 -1
  138. package/dist/esm-es5/sqm-lead-input-field.entry.js +1 -1
  139. package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
  140. package/dist/esm-es5/sqm-logout-current-user.entry.js +1 -1
  141. package/dist/esm-es5/{sqm-navigation-sidebar-item-view-b3beac5a.js → sqm-navigation-sidebar-item-view-8d98fcf3.js} +1 -1
  142. package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
  143. package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
  144. package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
  145. package/dist/esm-es5/sqm-partner-info-modal-view-d6f3a215.js +1 -0
  146. package/dist/esm-es5/sqm-password-field.entry.js +1 -1
  147. package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
  148. package/dist/esm-es5/{sqm-portal-email-verification-view-04528277.js → sqm-portal-email-verification-view-fde1eb35.js} +1 -1
  149. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  150. package/dist/esm-es5/sqm-portal-forgot-password_6.entry.js +1 -1
  151. package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
  152. package/dist/esm-es5/{sqm-portal-profile-view-b5ea620f.js → sqm-portal-profile-view-2018590a.js} +1 -1
  153. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  154. package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
  155. package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
  156. package/dist/esm-es5/{sqm-portal-verify-email-view-c61536b7.js → sqm-portal-verify-email-view-590f964b.js} +1 -1
  157. package/dist/esm-es5/sqm-qr-code.entry.js +1 -1
  158. package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
  159. package/dist/esm-es5/sqm-rewards-table-customer-note-column.entry.js +1 -1
  160. package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
  161. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  162. package/dist/esm-es5/sqm-tab.entry.js +1 -1
  163. package/dist/esm-es5/sqm-tabs.entry.js +1 -1
  164. package/dist/esm-es5/sqm-user-info-form-view-e1ba6009.js +1 -0
  165. package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
  166. package/dist/esm-es5/{useChildElements-9bccfb72.js → useChildElements-06937df7.js} +1 -1
  167. package/dist/esm-es5/useIndirectTaxForm-b2888ea5.js +6 -0
  168. package/dist/esm-es5/{useInstantAccessRegistration-69fefed0.js → useInstantAccessRegistration-69c9ffe0.js} +1 -1
  169. package/dist/esm-es5/{useLeadFormState-dd4e8b08.js → useLeadFormState-332b2796.js} +1 -1
  170. package/dist/esm-es5/{usePortalRegistrationForm-62de6fb1.js → usePortalRegistrationForm-3a1f36a2.js} +1 -1
  171. package/dist/esm-es5/{useReferralCodes-52ca720f.js → useReferralCodes-25f8b792.js} +1 -1
  172. package/dist/esm-es5/{useReferralTable-92af4133.js → useReferralTable-03d32c6f.js} +1 -1
  173. package/dist/esm-es5/{useRegistrationFormState-2c090c38.js → useRegistrationFormState-aa44cfff.js} +1 -1
  174. package/dist/esm-es5/{useVerificationEmail-c13c3b51.js → useVerificationEmail-9f2c0bab.js} +1 -1
  175. package/dist/esm-es5/{utilities-77b1e0cc.js → utilities-cbd8f2eb.js} +1 -1
  176. package/dist/esm-es5/utils-4f5cd04c.js +1 -0
  177. package/dist/mint-components/mint-components.esm.js +1 -1
  178. package/dist/mint-components/mint-components.js +1 -1
  179. package/dist/mint-components/{p-626b31cb.system.entry.js → p-025ddad2.system.entry.js} +1 -1
  180. package/dist/mint-components/{p-5b871e38.system.entry.js → p-02c0f88e.system.entry.js} +1 -1
  181. package/dist/mint-components/{p-f55ecf35.system.js → p-02e2b13b.system.js} +1 -1
  182. package/dist/mint-components/{p-a4f8abad.js → p-0766438e.js} +1 -1
  183. package/dist/mint-components/{p-205cfdcd.system.js → p-0815b973.system.js} +1 -1
  184. package/dist/mint-components/{p-db0a2afd.entry.js → p-092c2606.entry.js} +1 -1
  185. package/dist/mint-components/{p-fe1d3cf8.system.entry.js → p-099ce3d5.system.entry.js} +1 -1
  186. package/dist/mint-components/p-0a6489fa.entry.js +1 -0
  187. package/dist/mint-components/p-0afa6148.js +1 -0
  188. package/dist/mint-components/{p-fc284f91.system.entry.js → p-0b32e1d4.system.entry.js} +1 -1
  189. package/dist/mint-components/p-115dfc03.system.js +1 -0
  190. package/dist/mint-components/{p-7b59e13c.system.js → p-1317cc92.system.js} +1 -1
  191. package/dist/mint-components/{p-2b4af8e8.system.entry.js → p-13bb56a8.system.entry.js} +1 -1
  192. package/dist/mint-components/{p-f8a09b0f.js → p-13d8ecad.js} +1 -1
  193. package/dist/mint-components/p-13f3a647.js +1 -0
  194. package/dist/mint-components/{p-61897e72.entry.js → p-14183edc.entry.js} +1 -1
  195. package/dist/mint-components/{p-8f2d03c7.entry.js → p-1599a178.entry.js} +1 -1
  196. package/dist/mint-components/{p-02499e08.entry.js → p-1b0326d1.entry.js} +1 -1
  197. package/dist/mint-components/p-1d398dbc.entry.js +11 -0
  198. package/dist/mint-components/p-1d86895f.system.js +1 -0
  199. package/dist/mint-components/p-1e6a2945.js +1 -0
  200. package/dist/mint-components/{p-c8a3f3b0.js → p-1efb42e2.js} +1 -1
  201. package/dist/mint-components/p-1f387c7b.system.js +1 -0
  202. package/dist/mint-components/{p-a96c9bbb.system.entry.js → p-209157a9.system.entry.js} +1 -1
  203. package/dist/mint-components/{p-30c1ef36.system.js → p-2190dc73.system.js} +1 -1
  204. package/dist/mint-components/{p-80e116ec.system.entry.js → p-24f1d342.system.entry.js} +1 -1
  205. package/dist/mint-components/{p-6668f9f0.entry.js → p-27daf264.entry.js} +1 -1
  206. package/dist/mint-components/p-28ed2ae9.js +1 -0
  207. package/dist/mint-components/{p-09f7aacd.entry.js → p-29bc5f50.entry.js} +2 -2
  208. package/dist/mint-components/{p-738dce27.system.entry.js → p-2d3f7b76.system.entry.js} +1 -1
  209. package/dist/mint-components/p-2ed13619.entry.js +1 -0
  210. package/dist/mint-components/{p-c45a929a.system.entry.js → p-30cfe3e3.system.entry.js} +1 -1
  211. package/dist/mint-components/{p-d55c50af.system.js → p-31815fb6.system.js} +1 -1
  212. package/dist/mint-components/{p-c8bcbf8b.system.entry.js → p-3354cc75.system.entry.js} +1 -1
  213. package/dist/mint-components/{p-5bc5c61e.entry.js → p-335a5736.entry.js} +1 -1
  214. package/dist/mint-components/{p-e9485160.system.entry.js → p-33ca28ba.system.entry.js} +1 -1
  215. package/dist/mint-components/p-3596e241.entry.js +116 -0
  216. package/dist/mint-components/{p-8583ce0c.system.js → p-376c7608.system.js} +1 -1
  217. package/dist/mint-components/p-37e24621.system.entry.js +1 -0
  218. package/dist/mint-components/{p-95510f27.entry.js → p-38d04e4b.entry.js} +1 -1
  219. package/dist/mint-components/{p-e84b874c.js → p-3a41b39c.js} +1 -1
  220. package/dist/mint-components/{p-e5ea43b1.entry.js → p-3bbc0db2.entry.js} +2 -2
  221. package/dist/mint-components/{p-982d1f6f.entry.js → p-432a44de.entry.js} +3 -2
  222. package/dist/mint-components/{p-bab4929e.js → p-45230a44.js} +1 -1
  223. package/dist/mint-components/p-4691e9d5.system.js +1 -0
  224. package/dist/mint-components/{p-1d92c169.entry.js → p-4d73a616.entry.js} +1 -1
  225. package/dist/mint-components/{p-3bc62ca6.entry.js → p-4e3db52b.entry.js} +1 -1
  226. package/dist/mint-components/{p-3286ef38.js → p-4eaa3eb7.js} +1 -1
  227. package/dist/mint-components/{p-013564b3.entry.js → p-4eadbd5b.entry.js} +1 -1
  228. package/dist/mint-components/p-4f9dc974.js +1 -0
  229. package/dist/mint-components/{p-f7ca4cc4.system.entry.js → p-51ae6716.system.entry.js} +1 -1
  230. package/dist/mint-components/p-56b33268.system.entry.js +1 -0
  231. package/dist/mint-components/p-58c24352.system.js +6 -0
  232. package/dist/mint-components/p-5c52100b.js +117 -0
  233. package/dist/mint-components/{p-77b9cde8.system.js → p-5fdf0286.system.js} +1 -1
  234. package/dist/mint-components/{p-09348341.entry.js → p-60b1f3d9.entry.js} +1 -1
  235. package/dist/mint-components/{p-d005df28.system.entry.js → p-623a0a0b.system.entry.js} +1 -1
  236. package/dist/mint-components/{p-c30d0049.system.entry.js → p-6b4e5d94.system.entry.js} +1 -1
  237. package/dist/mint-components/{p-f4e36adf.system.entry.js → p-6f6c3ac6.system.entry.js} +1 -1
  238. package/dist/mint-components/p-6f8dde97.system.js +1 -0
  239. package/dist/mint-components/{p-43c31fd5.system.js → p-7628e56f.system.js} +1 -1
  240. package/dist/mint-components/{p-653db72e.entry.js → p-78e6dc8d.entry.js} +1 -1
  241. package/dist/mint-components/{p-f581aac7.js → p-7a091fa7.js} +1 -1
  242. package/dist/mint-components/{p-40bad95a.entry.js → p-7cbdf341.entry.js} +2 -2
  243. package/dist/mint-components/{p-044f930a.system.js → p-7d2d9ef9.system.js} +1 -1
  244. package/dist/mint-components/{p-5c4ba8a0.entry.js → p-7ea3f49c.entry.js} +1 -1
  245. package/dist/mint-components/{p-5ce78407.system.entry.js → p-81bc6dca.system.entry.js} +1 -1
  246. package/dist/mint-components/{p-f6528f8a.entry.js → p-84495fb8.entry.js} +1 -1
  247. package/dist/mint-components/{p-b96e90a2.system.entry.js → p-86d20b47.system.entry.js} +1 -1
  248. package/dist/mint-components/p-87f86492.js +1 -0
  249. package/dist/mint-components/{p-d0993bb9.js → p-8a6531d2.js} +1 -1
  250. package/dist/mint-components/p-8ae8968c.js +1 -0
  251. package/dist/mint-components/{p-7265bbcb.system.js → p-8e148cb0.system.js} +1 -1
  252. package/dist/mint-components/p-8f15bf17.entry.js +1 -0
  253. package/dist/mint-components/{p-b66f45d1.entry.js → p-921eb024.entry.js} +1 -1
  254. package/dist/mint-components/{p-f1374258.system.entry.js → p-925aa740.system.entry.js} +1 -1
  255. package/dist/mint-components/p-99eecdcb.system.entry.js +1 -0
  256. package/dist/mint-components/{p-e12754f5.system.entry.js → p-9a15cd5a.system.entry.js} +1 -1
  257. package/dist/mint-components/p-9c1f5317.system.js +1 -0
  258. package/dist/mint-components/{p-832aea99.js → p-9f48640d.js} +1 -1
  259. package/dist/mint-components/p-a38eece5.system.entry.js +1 -0
  260. package/dist/mint-components/p-a49d9288.entry.js +1 -0
  261. package/dist/mint-components/{p-90833864.system.entry.js → p-ab59c5eb.system.entry.js} +1 -1
  262. package/dist/mint-components/{p-e6240c72.js → p-abd717d4.js} +1 -1
  263. package/dist/mint-components/p-abe9f5b1.js +99 -0
  264. package/dist/mint-components/p-ae2f610e.system.js +1 -0
  265. package/dist/mint-components/p-b222bace.system.entry.js +1 -0
  266. package/dist/mint-components/{p-19c441b2.system.js → p-b2ad3fca.system.js} +1 -1
  267. package/dist/mint-components/{p-c8a8d231.entry.js → p-b3309d9b.entry.js} +2 -2
  268. package/dist/mint-components/p-b419f9ac.entry.js +299 -0
  269. package/dist/mint-components/{p-8962e023.js → p-b871d158.js} +1 -1
  270. package/dist/mint-components/p-b96ed8eb.js +1 -0
  271. package/dist/mint-components/p-badf28bb.system.js +1 -0
  272. package/dist/mint-components/{p-035d9b65.js → p-bb0b5e4b.js} +1 -1
  273. package/dist/mint-components/{p-52674798.entry.js → p-bcfdb510.entry.js} +1 -1
  274. package/dist/mint-components/p-be6a0dee.system.js +1 -0
  275. package/dist/mint-components/{p-642f2c89.js → p-bf9ab2d3.js} +1 -1
  276. package/dist/mint-components/{p-bc386a7b.js → p-c0a85e22.js} +1 -1
  277. package/dist/mint-components/p-c0f8f977.system.entry.js +1 -0
  278. package/dist/mint-components/p-c41d536d.entry.js +1 -0
  279. package/dist/mint-components/{p-a0c5631b.system.js → p-c66e5217.system.js} +1 -1
  280. package/dist/mint-components/p-cdabd9de.system.js +1 -0
  281. package/dist/mint-components/p-cfc35705.system.entry.js +1 -0
  282. package/dist/mint-components/{p-0d83907e.js → p-cfea215d.js} +1 -1
  283. package/dist/mint-components/p-d08408b3.entry.js +1 -0
  284. package/dist/mint-components/{p-172675ca.system.js → p-d284ae70.system.js} +1 -1
  285. package/dist/mint-components/{p-027fc3be.system.entry.js → p-d34564f8.system.entry.js} +1 -1
  286. package/dist/mint-components/{p-1021a49f.system.entry.js → p-db6bf7cf.system.entry.js} +1 -1
  287. package/dist/mint-components/{p-4da5a3fe.system.entry.js → p-df897432.system.entry.js} +1 -1
  288. package/dist/mint-components/{p-036a2617.system.js → p-e651593c.system.js} +1 -1
  289. package/dist/mint-components/{p-f39cf252.system.entry.js → p-e6de31a7.system.entry.js} +1 -1
  290. package/dist/mint-components/{p-2668335b.js → p-e8e7af06.js} +1 -1
  291. package/dist/mint-components/{p-85721089.system.js → p-e920c95c.system.js} +1 -1
  292. package/dist/mint-components/{p-3366b81e.js → p-eae44b42.js} +2 -2
  293. package/dist/mint-components/p-ebc519bc.system.js +1 -0
  294. package/dist/mint-components/{p-af407cce.entry.js → p-ef32fa8f.entry.js} +1 -1
  295. package/dist/mint-components/{p-7efb8782.system.js → p-f32050f6.system.js} +1 -1
  296. package/dist/mint-components/{p-782af7ae.system.entry.js → p-f6de2e5c.system.entry.js} +1 -1
  297. package/dist/mint-components/{p-9390586b.system.entry.js → p-fa85ea51.system.entry.js} +1 -1
  298. package/dist/mint-components/p-ff013776.entry.js +9 -0
  299. package/dist/mint-components/p-ffcebe78.entry.js +83 -0
  300. package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +15 -0
  301. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +50 -0
  302. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +123 -0
  303. package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +17 -0
  304. package/dist/types/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.d.ts +18 -1
  305. package/dist/types/components/sqm-rewards-table/TaxAndCashRewardsTableCell.stories.d.ts +19 -7
  306. package/dist/types/components/sqm-widget-verification/WidgetVerification.stories.d.ts +8 -0
  307. package/dist/types/components/sqm-widget-verification/keys.d.ts +2 -0
  308. package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +75 -7
  309. package/dist/types/components/sqm-widget-verification/useWidgetVerification.d.ts +2 -0
  310. package/dist/types/components/tax-and-cash/data.d.ts +3 -0
  311. package/dist/types/components/tax-and-cash/sqm-banking-info-form/formDefinitions.d.ts +8 -0
  312. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +4 -0
  313. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.d.ts +173 -0
  314. package/dist/types/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.d.ts +2 -0
  315. package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +7 -0
  316. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +10 -5
  317. package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.d.ts +0 -1
  318. package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.d.ts +0 -4
  319. package/dist/types/components.d.ts +644 -32
  320. package/dist/types/saasquatch.d.ts +2 -0
  321. package/docs/docs.docx +0 -0
  322. package/docs/raisins.json +1 -1
  323. package/grapesjs/grapesjs.js +1 -1
  324. package/package.json +2 -4
  325. package/dist/cjs/extractProps-e9c55ba8.js +0 -35
  326. package/dist/cjs/sqm-email-verification.cjs.entry.js +0 -418
  327. package/dist/cjs/sqm-widget-verification.cjs.entry.js +0 -214
  328. package/dist/esm/data-12e6aae1.js +0 -216
  329. package/dist/esm/extractProps-54064fb0.js +0 -32
  330. package/dist/esm/keys-406491dc.js +0 -6
  331. package/dist/esm/sqm-email-verification.entry.js +0 -414
  332. package/dist/esm/sqm-widget-verification.entry.js +0 -210
  333. package/dist/esm-es5/data-12e6aae1.js +0 -1
  334. package/dist/esm-es5/extractProps-54064fb0.js +0 -1
  335. package/dist/esm-es5/keys-406491dc.js +0 -1
  336. package/dist/esm-es5/sqm-big-stat_46.entry.js +0 -1
  337. package/dist/esm-es5/sqm-email-verification.entry.js +0 -1
  338. package/dist/esm-es5/sqm-user-info-form-view-19d81a2b.js +0 -1
  339. package/dist/esm-es5/sqm-widget-verification.entry.js +0 -1
  340. package/dist/esm-es5/usePayoutStatus-46c0c289.js +0 -6
  341. package/dist/mint-components/p-00b235c5.system.entry.js +0 -1
  342. package/dist/mint-components/p-0706cf9e.system.entry.js +0 -1
  343. package/dist/mint-components/p-0797a946.js +0 -1
  344. package/dist/mint-components/p-13292317.entry.js +0 -11
  345. package/dist/mint-components/p-2d5c2bd4.system.entry.js +0 -1
  346. package/dist/mint-components/p-38c7775a.js +0 -1
  347. package/dist/mint-components/p-3adbfd0b.system.js +0 -6
  348. package/dist/mint-components/p-3af3e2c1.entry.js +0 -25
  349. package/dist/mint-components/p-5492dd51.system.entry.js +0 -1
  350. package/dist/mint-components/p-57dd28bd.system.js +0 -1
  351. package/dist/mint-components/p-5b1d2866.system.js +0 -1
  352. package/dist/mint-components/p-6c4ad51a.js +0 -1
  353. package/dist/mint-components/p-77fa2383.entry.js +0 -1
  354. package/dist/mint-components/p-7939e4af.entry.js +0 -1
  355. package/dist/mint-components/p-8285869e.entry.js +0 -9
  356. package/dist/mint-components/p-892797eb.system.entry.js +0 -1
  357. package/dist/mint-components/p-91a96e98.entry.js +0 -1
  358. package/dist/mint-components/p-b2b85238.entry.js +0 -1
  359. package/dist/mint-components/p-b395470f.entry.js +0 -16
  360. package/dist/mint-components/p-bba16a46.system.entry.js +0 -1
  361. package/dist/mint-components/p-be12607e.entry.js +0 -281
  362. package/dist/mint-components/p-bf188b72.system.entry.js +0 -1
  363. package/dist/mint-components/p-ca098be1.system.js +0 -1
  364. package/dist/mint-components/p-d18dedd4.js +0 -1
  365. package/dist/mint-components/p-d4f332a7.entry.js +0 -106
  366. package/dist/mint-components/p-d6193876.system.js +0 -1
  367. package/dist/mint-components/p-de0d6fd7.js +0 -49
  368. package/dist/mint-components/p-e00ec007.js +0 -1
  369. package/dist/mint-components/p-e55aafe9.system.js +0 -1
  370. package/dist/mint-components/p-ea03e50e.system.js +0 -1
  371. package/dist/mint-components/p-ec0b649a.entry.js +0 -1
  372. package/dist/mint-components/p-f8026ed6.system.js +0 -1
  373. package/dist/mint-components/p-fb804001.system.entry.js +0 -1
  374. package/dist/mint-components/p-fe70e20c.entry.js +0 -1
  375. package/dist/mint-components/p-ff118a19.system.js +0 -1
@@ -1,4 +1,4 @@
1
- import{h as t,F as e,r as a}from"./p-083180bf.js";import{i as n}from"./p-f8a09b0f.js";import{n as o,k as s}from"./p-a7fc1e02.js";import{F as r,i,d as l,H as c,J as d,B as u,w as p,$ as m}from"./p-d0993bb9.js";import{c as g}from"./p-c1086930.js";import{g as f}from"./p-9ec99ced.js";import{c as h}from"./p-cef45012.js";import{R as v,a as x,S as b,u as y}from"./p-bab4929e.js";import"./p-49b20dae.js";import{C}from"./p-d276468c.js";const T=h({Container:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"var(--sl-spacing-small)",width:"100%"},TextContainer:{display:"flex",gap:"var(--sl-spacing-xx-small)"}}),P=T.toString();function j(a){const{states:n,callbacks:o,text:s,buttonType:r}=a,{onNext:i,onPrev:l}=o,{currentPage:c,totalPages:d,loading:u}=n;return 1===d?t(e,null):t("span",{class:T.classes.Container,part:"sqm-base"},t("style",{type:"text/css"},P),!u&&t(e,null,t("sl-button",{exportparts:`base: ${r}button-base`,onClick:l,part:"sqm-pagination-button",circle:!0,disabled:1===c},t("sl-icon",{name:"chevron-left",label:"Previous Page"})),t("div",{class:T.classes.TextContainer},s.paginationText)),t("sl-button",{exportparts:`base: ${r}button-base`,onClick:i,part:"sqm-pagination-button",circle:!0,disabled:c===d},t("sl-icon",{name:"chevron-right",label:"Previous Page"})))}const k=class{constructor(t){a(this,t),this.ignored=!0,this.paginationText="{currentPage} of {totalPages}",this.buttonType="secondary",o(this)}disconnectedCallback(){}render(){const e=i()?function(t){const[e,a]=s(1);return g({states:{currentPage:e,totalPages:5,loading:!1},buttonType:t.buttonType,callbacks:{onNext:()=>a(e+1),onPrev:()=>a(e-1)},text:{paginationText:n.formatMessage({id:"paginationText",defaultMessage:t.paginationText||"{currentPage} of {totalPages}"},{currentPage:e,totalPages:5})}},t.demoData||{},{arrayMerge:(t,e)=>e})}(f(this)):function(t){var e;const a=r(v),o=a.states.currentPage+1,s=null===(e=a.states)||void 0===e?void 0:e.pageCount;return{states:{currentPage:o,totalPages:s,loading:a.states.loading},callbacks:{onNext:()=>{var t,e;return null===(t=a.callbacks)||void 0===t?void 0:t.setCurrentPage((null===(e=a.states)||void 0===e?void 0:e.currentPage)+1)},onPrev:()=>{var t,e;return null===(t=a.callbacks)||void 0===t?void 0:t.setCurrentPage((null===(e=a.states)||void 0===e?void 0:e.currentPage)-1)}},text:{paginationText:n.formatMessage({id:"paginationText",defaultMessage:t.paginationText},{currentPage:o,totalPages:s})}}}(f(this));return t(j,Object.assign({},e))}},E=l.gql`
1
+ import{h as t,F as e,r as a}from"./p-083180bf.js";import{i as n}from"./p-13d8ecad.js";import{n as o,k as s}from"./p-a7fc1e02.js";import{F as r,i,d as l,H as c,J as d,B as u,w as p,$ as m}from"./p-8a6531d2.js";import{c as g}from"./p-c1086930.js";import{g as f}from"./p-9ec99ced.js";import{c as h}from"./p-cef45012.js";import{R as v,a as x,S as y,u as b}from"./p-45230a44.js";import"./p-49b20dae.js";import{C}from"./p-d276468c.js";const T=h({Container:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"var(--sl-spacing-small)",width:"100%"},TextContainer:{display:"flex",gap:"var(--sl-spacing-xx-small)"}}),P=T.toString();function j(a){const{states:n,callbacks:o,text:s,buttonType:r}=a,{onNext:i,onPrev:l}=o,{currentPage:c,totalPages:d,loading:u}=n;return 1===d?t(e,null):t("span",{class:T.classes.Container,part:"sqm-base"},t("style",{type:"text/css"},P),!u&&t(e,null,t("sl-button",{exportparts:`base: ${r}button-base`,onClick:l,part:"sqm-pagination-button",circle:!0,disabled:1===c},t("sl-icon",{name:"chevron-left",label:"Previous Page"})),t("div",{class:T.classes.TextContainer},s.paginationText)),t("sl-button",{exportparts:`base: ${r}button-base`,onClick:i,part:"sqm-pagination-button",circle:!0,disabled:c===d},t("sl-icon",{name:"chevron-right",label:"Previous Page"})))}const k=class{constructor(t){a(this,t),this.ignored=!0,this.paginationText="{currentPage} of {totalPages}",this.buttonType="secondary",o(this)}disconnectedCallback(){}render(){const e=i()?function(t){const[e,a]=s(1);return g({states:{currentPage:e,totalPages:5,loading:!1},buttonType:t.buttonType,callbacks:{onNext:()=>a(e+1),onPrev:()=>a(e-1)},text:{paginationText:n.formatMessage({id:"paginationText",defaultMessage:t.paginationText||"{currentPage} of {totalPages}"},{currentPage:e,totalPages:5})}},t.demoData||{},{arrayMerge:(t,e)=>e})}(f(this)):function(t){var e;const a=r(v),o=a.states.currentPage+1,s=null===(e=a.states)||void 0===e?void 0:e.pageCount;return{states:{currentPage:o,totalPages:s,loading:a.states.loading},callbacks:{onNext:()=>{var t,e;return null===(t=a.callbacks)||void 0===t?void 0:t.setCurrentPage((null===(e=a.states)||void 0===e?void 0:e.currentPage)+1)},onPrev:()=>{var t,e;return null===(t=a.callbacks)||void 0===t?void 0:t.setCurrentPage((null===(e=a.states)||void 0===e?void 0:e.currentPage)-1)}},text:{paginationText:n.formatMessage({id:"paginationText",defaultMessage:t.paginationText},{currentPage:o,totalPages:s})}}}(f(this));return t(j,Object.assign({},e))}},E=l.gql`
2
2
  query getReferralCode($programId: ID) {
3
3
  user: viewer {
4
4
  ... on User {
@@ -10,4 +10,4 @@ import{h as t,F as e,r as a}from"./p-083180bf.js";import{i as n}from"./p-f8a09b0
10
10
  mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
11
11
  createUserAnalyticsEvent(eventMeta: $eventMeta)
12
12
  }
13
- `,w=class{constructor(t){a(this,t),this.tooltiptext="Copied to Clipboard",this.showNotificationText=!1,this.notificationText="You've copied this code before",this.tooltiplifespan=1e3,this.textAlign="left",this.copyButtonLabel="Copy Code",this.buttonStyle="icon",this.buttonType="primary",o(this)}disconnectedCallback(){}render(){const e=f(this),a=i()?function(t){const[e,a]=s(!1),n="REFERRALCODE001";return g({copyString:n,tooltiptext:t.tooltiptext,textAlign:t.textAlign,copyButtonLabel:t.copyButtonLabel,buttonStyle:t.buttonStyle,notificationText:t.notificationText,showNotificationText:t.showNotificationText,isCopied:t.showNotificationText,borderColor:t.borderColor,backgroundColor:t.backgroundColor,textColor:t.textColor,borderRadius:t.borderRadius,buttonType:t.buttonType,isUsed:!1,rewardStatus:"AVAILABLE",open:e,onClick:()=>{navigator.clipboard.writeText(n),a(!0),setTimeout((()=>a(!1)),t.tooltiplifespan)}},t.demoData||{},{arrayMerge:(t,e)=>e})}(e):function(t){var e,a;const{programId:n=c()}=t,o=d(),i=u(),l=r(x),{data:g}=p(E,{programId:n},!(null==o?void 0:o.jwt)||void 0!==(null==l?void 0:l.referralCode)),[f]=m(I),[h]=m(b),v=null!==(a=(null==l?void 0:l.referralCode)||(null===(e=null==g?void 0:g.user)||void 0===e?void 0:e.referralCode))&&void 0!==a?a:"...",[y,C]=s(!1);return{...t,onClick:async function(){l&&(await h({referralCode:l.referralCode}),l.refresh()),navigator.clipboard.writeText(v),C(!0),setTimeout((()=>C(!1)),t.tooltiplifespan),f({eventMeta:{programId:n,id:null==o?void 0:o.id,accountId:null==o?void 0:o.accountId,type:"USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",meta:{engagementMedium:i,shareMedium:"DIRECT"}}})},open:y,copyString:v,isCopied:null==l?void 0:l.isCopied,showNotificationText:t.showNotificationText&&!!(null==l?void 0:l.singleUse)}}(e);return t(C,Object.assign({},a))}};function q(e){const{slots:a,titleText:n,states:o,textColor:s="var(--sqm-text-subdued)"}=e,r=h({Wrapper:{width:"100%",display:"flex",alignItems:"flex-start",justifyContent:"center",flexDirection:"column",gap:"var(--sl-spacing-large)",color:s},HeaderContainer:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},ShareCodeContainer:{width:"100%",display:"flex",alignItems:"flex-start",justifyContent:"center",flexDirection:"column"},ShareButtonContainer:{width:"100%",display:"flex",alignItems:"flex-start",justifyContent:"center",flexDirection:"column"},TitleText:{fontSize:"var(--sl-font-size-large)",margin:"0"}}),i=r.toString();return t("div",{class:r.classes.Wrapper,part:"sqm-base"},t("style",{type:"text/css"},"\n :host {\n display: block;\n }\n :host([hidden]): {\n display: none;\n }\n ",i),t("div",{class:r.classes.HeaderContainer},t("h2",{class:r.classes.TitleText},n),!o.noCodes&&!o.loading&&a.pagination),(e=>e.noCodes?a.empty:e.loading?a.loading:t("div",{class:r.classes.Wrapper},t("div",{class:r.classes.ShareCodeContainer},a.shareCodes),t("div",{class:r.classes.ShareButtonContainer},a.shareButtons)))(o))}const M=class{constructor(t){a(this,t),this.titleText="Start sharing",this.emptyStateHeaderText="Your new codes and links aren’t ready yet",this.emptyStateDescriptionText="Please contact our program support team to let them know you’re out of codes.",this.emptyStateImageUrl="https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_leaderboard2.png",o(this)}disconnectedCallback(){}render(){const e=f(this),a=i()?function(t){return g({titleText:t.titleText,textColor:t.textColor,states:{noCodes:!1,loading:!1}},t.demoData||{},{arrayMerge:(t,e)=>e})}(e):y(e),n={slots:{shareButtons:t("slot",{name:"shareButtons"}),shareCodes:t("slot",{name:"shareCodes"}),pagination:t("slot",{name:"pagination"}),empty:t(R,{headerText:this.emptyStateHeaderText,descriptionText:this.emptyStateDescriptionText,imageUrl:this.emptyStateImageUrl}),loading:t(S,null)},...a,loading:a.states.loading,noCodes:a.states.noCodes};return t(q,Object.assign({},n))}};function R({headerText:e,descriptionText:a,imageUrl:n}){return t("slot",{name:"empty"},t("sqm-empty",{emptyStateHeader:e,emptyStateText:a,emptyStateImage:n}))}function S(){return t("slot",{name:"loading"},t(A,null),t(A,null),t(A,null),t(A,null))}function A(){return t("sqm-skeleton",null)}export{k as sqm_pagination,w as sqm_referral_code,M as sqm_referral_codes}
13
+ `,w=class{constructor(t){a(this,t),this.tooltiptext="Copied to Clipboard",this.showNotificationText=!1,this.notificationText="You've copied this code before",this.tooltiplifespan=1e3,this.textAlign="left",this.copyButtonLabel="Copy Code",this.buttonStyle="icon",this.buttonType="primary",o(this)}disconnectedCallback(){}render(){const e=f(this),a=i()?function(t){const[e,a]=s(!1),n="REFERRALCODE001";return g({copyString:n,tooltiptext:t.tooltiptext,textAlign:t.textAlign,copyButtonLabel:t.copyButtonLabel,buttonStyle:t.buttonStyle,notificationText:t.notificationText,showNotificationText:t.showNotificationText,isCopied:t.showNotificationText,borderColor:t.borderColor,backgroundColor:t.backgroundColor,textColor:t.textColor,borderRadius:t.borderRadius,buttonType:t.buttonType,isUsed:!1,rewardStatus:"AVAILABLE",open:e,onClick:()=>{navigator.clipboard.writeText(n),a(!0),setTimeout((()=>a(!1)),t.tooltiplifespan)}},t.demoData||{},{arrayMerge:(t,e)=>e})}(e):function(t){var e,a;const{programId:n=c()}=t,o=d(),i=u(),l=r(x),{data:g}=p(E,{programId:n},!(null==o?void 0:o.jwt)||void 0!==(null==l?void 0:l.referralCode)),[f]=m(I),[h]=m(y),v=null!==(a=(null==l?void 0:l.referralCode)||(null===(e=null==g?void 0:g.user)||void 0===e?void 0:e.referralCode))&&void 0!==a?a:"...",[b,C]=s(!1);return{...t,onClick:async function(){l&&(await h({referralCode:l.referralCode}),l.refresh()),navigator.clipboard.writeText(v),C(!0),setTimeout((()=>C(!1)),t.tooltiplifespan),f({eventMeta:{programId:n,id:null==o?void 0:o.id,accountId:null==o?void 0:o.accountId,type:"USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",meta:{engagementMedium:i,shareMedium:"DIRECT"}}})},open:b,copyString:v,isCopied:null==l?void 0:l.isCopied,showNotificationText:t.showNotificationText&&!!(null==l?void 0:l.singleUse)}}(e);return t(C,Object.assign({},a))}};function q(e){const{slots:a,titleText:n,states:o,textColor:s="var(--sqm-text-subdued)"}=e,r=h({Wrapper:{width:"100%",display:"flex",alignItems:"flex-start",justifyContent:"center",flexDirection:"column",gap:"var(--sl-spacing-large)",color:s},HeaderContainer:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},ShareCodeContainer:{width:"100%",display:"flex",alignItems:"flex-start",justifyContent:"center",flexDirection:"column"},ShareButtonContainer:{width:"100%",display:"flex",alignItems:"flex-start",justifyContent:"center",flexDirection:"column"},TitleText:{fontSize:"var(--sl-font-size-large)",margin:"0"}}),i=r.toString();return t("div",{class:r.classes.Wrapper,part:"sqm-base"},t("style",{type:"text/css"},"\n :host {\n display: block;\n }\n :host([hidden]): {\n display: none;\n }\n ",i),t("div",{class:r.classes.HeaderContainer},t("h2",{class:r.classes.TitleText},n),!o.noCodes&&!o.loading&&a.pagination),(e=>e.noCodes?a.empty:e.loading?a.loading:t("div",{class:r.classes.Wrapper},t("div",{class:r.classes.ShareCodeContainer},a.shareCodes),t("div",{class:r.classes.ShareButtonContainer},a.shareButtons)))(o))}const M=class{constructor(t){a(this,t),this.titleText="Start sharing",this.emptyStateHeaderText="Your new codes and links aren’t ready yet",this.emptyStateDescriptionText="Please contact our program support team to let them know you’re out of codes.",this.emptyStateImageUrl="https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_leaderboard2.png",o(this)}disconnectedCallback(){}render(){const e=f(this),a=i()?function(t){return g({titleText:t.titleText,textColor:t.textColor,states:{noCodes:!1,loading:!1}},t.demoData||{},{arrayMerge:(t,e)=>e})}(e):b(e),n={slots:{shareButtons:t("slot",{name:"shareButtons"}),shareCodes:t("slot",{name:"shareCodes"}),pagination:t("slot",{name:"pagination"}),empty:t(R,{headerText:this.emptyStateHeaderText,descriptionText:this.emptyStateDescriptionText,imageUrl:this.emptyStateImageUrl}),loading:t(S,null)},...a,loading:a.states.loading,noCodes:a.states.noCodes};return t(q,Object.assign({},n))}};function R({headerText:e,descriptionText:a,imageUrl:n}){return t("slot",{name:"empty"},t("sqm-empty",{emptyStateHeader:e,emptyStateText:a,emptyStateImage:n}))}function S(){return t("slot",{name:"loading"},t(A,null),t(A,null),t(A,null),t(A,null))}function A(){return t("sqm-skeleton",null)}export{k as sqm_pagination,w as sqm_referral_code,M as sqm_referral_codes}
@@ -1,4 +1,4 @@
1
- import{h as e,r as t,c as s}from"./p-083180bf.js";import{i as a}from"./p-f8a09b0f.js";import{b as r,j as i,f as l,n,u as o}from"./p-a7fc1e02.js";import{d,J as c,H as u,L as h,w as p,R as m,i as v}from"./p-d0993bb9.js";import{c as E}from"./p-c1086930.js";import{l as g}from"./p-9ec99ced.js";import{c as f}from"./p-cef45012.js";import"./p-49b20dae.js";import{G as y}from"./p-b1eb2a6a.js";import{u as w,a as b}from"./p-642f2c89.js";import{u as x}from"./p-d18dedd4.js";import{l as A}from"./p-2786819c.js";import{m as D}from"./p-11c127f5.js";import{g as N}from"./p-035d9b65.js";const R=r("sq:useRewardsTable"),P=d.gql`
1
+ import{h as e,r as t,c as s}from"./p-083180bf.js";import{i as a}from"./p-13d8ecad.js";import{b as r,j as i,f as l,n,u as o}from"./p-a7fc1e02.js";import{d,J as c,H as u,L as h,w as p,R as m,i as v}from"./p-8a6531d2.js";import{c as E}from"./p-c1086930.js";import{l as g}from"./p-9ec99ced.js";import{c as f}from"./p-cef45012.js";import"./p-49b20dae.js";import{G as y}from"./p-b1eb2a6a.js";import{u as w,a as b}from"./p-bf9ab2d3.js";import{u as x}from"./p-8ae8968c.js";import{l as A}from"./p-2786819c.js";import{m as D}from"./p-11c127f5.js";import{g as N}from"./p-bb0b5e4b.js";const R=r("sq:useRewardsTable"),P=d.gql`
2
2
  query getRewards(
3
3
  $limit: Int!
4
4
  $offset: Int!
@@ -39,6 +39,7 @@ import{h as e,r as t,c as s}from"./p-083180bf.js";import{i as a}from"./p-f8a09b0
39
39
  fuelTankCode
40
40
  fuelTankType
41
41
  currency
42
+ rewardedCash
42
43
  prettyValue(locale: $locale)
43
44
  prettyValueNumber: prettyValue(
44
45
  formatType: NUMBER_FORMATTED
@@ -144,4 +145,4 @@ import{h as e,r as t,c as s}from"./p-083180bf.js";import{i as a}from"./p-f8a09b0
144
145
  }
145
146
  }
146
147
  }
147
- `;async function T(t,s){const a=t.tagName.toLowerCase();let r;await customElements.whenDefined(a);try{r=s()}catch(t){return R("label promise failed",t),e("span",null)}try{return await r}catch(t){R("Error rendering label",t);const s=N(t);return e("details",null,e("summary",null,"Error"),s)}}const S=class{constructor(e){t(this,e),this.perPage=4,this.hideLabels=!1,this.prevLabel="Prev",this.moreLabel="Next",this.hiddenColumns="0",this.smBreakpoint=599,this.mdBreakpoint=799,n(this)}disconnectedCallback(){}render(){const t=e(_,null),s=e(C,null),{states:a,data:r,callbacks:n,elements:d}=v()?function(e,t,s){const[a,r]=i(((e,t)=>({...e,...t})),{columns:[],rows:[],loading:!1,page:0}),n=w(),{data:d}=o((()=>{var t;return(null===(t=e.demoData)||void 0===t?void 0:t.mockData)||D(e.perPage)}),[e.perPage]),c=x();return l((()=>{r({loading:!0}),d&&async function(t){let s=d;s=d.slice(0,e.perPage);const a=t.filter((e=>{var t,s;return"loading"!==e.slot&&"empty"!==e.slot&&"loading"!==(null===(t=null==e?void 0:e.firstElementChild)||void 0===t?void 0:t.getAttribute("slot"))&&"empty"!==(null===(s=null==e?void 0:e.firstElementChild)||void 0===s?void 0:s.getAttribute("slot"))})),i=null==a?void 0:a.map((async(e,t)=>{var s;const a=null===(s=null==e?void 0:e.firstElementChild)||void 0===s?void 0:s.getAttribute("slot");if("RAISINS-PLOP-TARGET"===e.tagName&&"loading"!==a&&"empty"!==a){e.style.position="absolute",e.setAttribute("slot","column-"+t);const s=e.firstElementChild.childNodes[1];return s.innerHTML="+",s.style.lineHeight="20px",T(e,(()=>e.renderLabel(t)))}return T(e,(()=>e.renderLabel()))})),l=null==s?void 0:s.map((async e=>{const t=null==a?void 0:a.map((async t=>T(t,(()=>t.renderCell(e,void 0,{})))));return await Promise.all(t)})),n=l&&(await Promise.all(l)).filter((e=>e));r({rows:n});const o=i&&await Promise.all(i);r({columns:o,loading:!1,page:0})}(c)}),[d,c,n]),E({states:{hasPrev:!1,hasNext:!1,loading:!1,show:"rows"},callbacks:{prevPage:()=>console.log("Prev"),nextPage:()=>console.log("Next")},data:{textOverrides:{showLabels:!e.hideLabels,prevLabel:e.prevLabel,moreLabel:e.moreLabel},referralData:[],mdBreakpoint:799,smBreakpoint:599},elements:{columns:a.columns,rows:a.rows,emptyElement:t,loadingElement:s}},e.demoData||{},{arrayMerge:(e,t)=>t})}(this,t,s):function(t,s,a){var r,n,o;const d=c(),v=u(),E=h(),g=null!==(r=t.programId)&&void 0!==r?r:v,f="GLOBAL"===g?null:g,y={userId_eq:null==d?void 0:d.id,accountId_eq:null==d?void 0:d.accountId,...f?"classic"===f?{programId_exists:!1}:{programId_eq:f}:{}},[b,A]=i(((e,t)=>({...e,...t})),{columns:[],rows:[],loading:!1,page:0}),{data:D,loading:N}=p(I,{},!(null==d?void 0:d.jwt)),{envelope:R,states:S,callbacks:_}=m(P,(e=>{var t;return null===(t=null==e?void 0:e.viewer)||void 0===t?void 0:t.rewards}),{limit:t.perPage,offset:0},{rewardFilter:y,locale:E},!(null==d?void 0:d.jwt)),C=w(),L=x(),q=null==R?void 0:R.data,U=null===(n=null==D?void 0:D.viewer)||void 0===n?void 0:n.impactConnection;l((()=>{A({loading:!0}),R&&async function(t){const s=t.filter((e=>"loading"!==e.slot&&"empty"!==e.slot)),a=null==s?void 0:s.map((async e=>T(e,(()=>e.renderLabel())))),r=null==q?void 0:q.map((async t=>{const a=null==s?void 0:s.map((async s=>T(s,(()=>s.renderCell(t,{locale:E,taxConnection:U},e)))));return await Promise.all(a)})),i=r&&(await Promise.all(r)).filter((e=>e));A({rows:i});const l=a&&await Promise.all(a);A({columns:l,loading:!1,page:S.currentPage})}(L)}),[R,L,C]);const O=!(null===(o=null==b?void 0:b.rows)||void 0===o?void 0:o.length)&&!(null==q?void 0:q.length);return{states:{hasNext:S.currentPage<S.pageCount-1,hasPrev:S.currentPage>0,show:S.loading||b.loading||N?"loading":O?"empty":"rows",namespace:"sqm-rewards-table"},data:{textOverrides:{showLabels:!t.hideLabels,prevLabel:t.prevLabel,moreLabel:t.moreLabel},hiddenColumns:t.hiddenColumns,smBreakpoint:t.smBreakpoint,mdBreakpoint:t.mdBreakpoint},elements:{columns:b.columns,rows:b.rows,emptyElement:s,loadingElement:a},callbacks:{nextPage:()=>{_.setCurrentPage(S.currentPage+1)},prevPage:()=>{_.setCurrentPage(S.currentPage-1)}}}}(this,t,s);return b([this.perPage]),e(y,{states:a,data:r,callbacks:n,elements:d})}};function _(){return e("slot",{name:"empty"},e("sqm-empty",{"empty-state-image":"https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_reward2.png","empty-state-header":"View your rewards","empty-state-text":"Refer friends and complete tasks to view the details of your rewards"}))}function C(){return e("slot",{name:"loading"},e(L,null),e(L,null),e(L,null),e(L,null))}function L(){return e("sqm-table-row",null,e("sqm-table-cell",{colspan:5},e("sqm-skeleton",null)))}const q=class{constructor(e){t(this,e),this.ignored=!0,this.locale="en",n(this)}disconnectedCallback(){}render(){var e,t;return this.date?null===(t=null===(e=A.DateTime.fromMillis(this.date))||void 0===e?void 0:e.setLocale(g(this.locale)))||void 0===t?void 0:t.toLocaleString(A.DateTime.DATE_MED):"-"}},U=class{constructor(e){t(this,e),this.columnTitle="Date received",this.dateShown="dateGiven",n(this)}disconnectedCallback(){}async renderCell(t,s){return e("sqm-rewards-table-date-cell",{date:t[this.dateShown],locale:null==s?void 0:s.locale})}async renderLabel(){return this.columnTitle}render(){return b([this.dateShown,this.columnTitle]),e(s,{style:{display:"none"}})}},O=f({DetailsContainer:{width:"100%",display:"flex","align-items":"center","justify-content":"space-between","margin-right":"var(--sl-spacing-small)","flex-wrap":"wrap"},Details:{"padding-bottom":"var(--sl-spacing-small)","max-width":"500px","padding-right":"var(--sl-spacing-x-small)","&::part(header)":{padding:"var(--sl-spacing-x-small)",cursor:"default"},"&::part(content)":{padding:"var(--sl-spacing-x-small) var(--sl-spacing-medium)"},"&::part(base)":{opacity:"1"},"&::part(summary-icon)":{display:"flex"}},BadgeContainer:{"& > :not(:last-child)":{"margin-right":"var(--sl-spacing-x-small)"}},BoldText:{"font-weight":"var(--sl-font-weight-semibold)"},StatusBadge:{paddingLeft:"var(--sl-spacing-xxx-small)","&::part(base)":{textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line"}},Fueltank:{"& .code":{display:"flex",cursor:"pointer",userSelect:"none",color:"var(--sl-color-neutral-500)","&:hover":{color:"var(--sl-color-sky-500)"}},"& .text":{maxWidth:"90%",overflow:"hidden",textOverflow:"ellipsis",color:"inherit",fontSize:"var(--sl-font-size-small)",fontWeight:"var(--sl-font-weight-bold)"},"& .icon":{position:"relative",top:"1px",marginLeft:"var(--sl-spacing-x-small)",color:"inherit"}}}),k=O.toString(),G=class{constructor(e){t(this,e)}render(){return a.locale=this.locale,e("div",{style:{display:"contents"}},e("style",{type:"text/css"},k),e((({reward:t})=>{var s;const r="CENTS"===t.unit?t.prettyValue.replace(/USD/gi,"$"):null!==(s=t.prettyValue)&&void 0!==s?s:"-",i="1"===t.prettyValueNumber||t.dateRedeemed&&"0"===t.prettyAvailableNumber;if("FUELTANK"===t.type)return e("div",{class:O.classes.Fueltank},t.prettyValue,t.fuelTankCode&&e("div",{class:"code",onClick:()=>navigator.clipboard.writeText(t.fuelTankCode)},e("sl-tooltip",{trigger:"click",placement:"top",distance:5,skidding:11,content:this.copyText,"onSl-show":e=>setTimeout((()=>e.path[0].hide()),1e3)},e("span",{class:"text"},t.fuelTankCode),e("span",{class:"icon"},e("sl-icon",{name:"files"})))));if("CREDIT"===t.type&&!i){const s=parseFloat(t.prettyValueNumber)-parseFloat(t.prettyRedeemedNumber),i=Math.round(s/parseFloat(t.prettyValueNumber)*100),l=t.statuses.includes("EXPIRED")||t.statuses.includes("CANCELLED")?e("div",null,a.formatMessage({id:"redeemedText",defaultMessage:this.redeemedText},{redeemedAmount:t.prettyRedeemedCredit})):e("div",null,a.formatMessage({id:"availableText",defaultMessage:this.availableText},{availableAmount:t.statuses.includes("PENDING")?t.prettyAssignedCredit:t.prettyAvailableValue})),n=f({Progress:{height:"3px",width:"100%",margin:"var(--sl-spacing-xx-small) 0",background:"var(--sqm-border-color)","&:after":{content:'""',display:"block",background:"var(--sqm-accent-color-icon)",borderRadius:"100px",width:`${i}%`,height:"100%"}},Container:{display:"inline-block",verticalAlign:"top",width:"150px",whiteSpace:"break",overflow:"hidden",textOverflow:"ellipsis"},Text:{fontSize:"var(--sl-font-size-medium)",color:"var(--sqm-text)"},Subtext:{fontSize:"var(--sl-font-size-small)",color:"var(--sqm-text-subdued)"}}),o=n.toString();return e("div",null,e("style",{type:"text/css"},o),e("div",{class:n.classes.Container},e("span",{part:"sqm-reward-cell-value"},r+" "),e("br",null)," ",e("div",{part:"sqm-reward-cell-progress",class:n.classes.Progress}),e("span",{part:"sqm-reward-cell-subtext",class:n.classes.Subtext},l)))}return e("div",null,r)}),{reward:this.reward}))}},F=class{constructor(e){t(this,e),this.columnTitle="Reward",this.redeemedText="{redeemedAmount} redeemed",this.availableText="{availableAmount} remaining",this.copyText="Copied!",n(this)}disconnectedCallback(){}async renderCell(t,s){return e("sqm-rewards-table-reward-cell",{reward:t,redeemedText:this.redeemedText,availableText:this.availableText,copyText:this.copyText,locale:null==s?void 0:s.locale,exportparts:"sqm-rewards-cell-value, sqm-rewards-cell-progress-bar, sqm-rewards-cell-subtext"})}async renderLabel(){return this.columnTitle}render(){return b([this.columnTitle,this.redeemedText,this.availableText,this.copyText]),e(s,{style:{display:"none"}})}},V=class{constructor(e){t(this,e),this.locale="en"}render(){a.locale=this.locale;const t=({reward:t})=>{var s;return e("span",null,a.formatMessage({id:"rewardSourceText",defaultMessage:this.rewardSourceText},{rewardSource:t.rewardSource,programName:null===(s=null==t?void 0:t.program)||void 0===s?void 0:s.name}))},s=({reward:t})=>{var s;const a=e("div",null,e("span",{style:{fontSize:"var(--sl-font-size-small)",color:"var(--sqm-text-subdued)"}},this.rewardExchangeText),e("br",null),null===(s=t.exchangedRewardRedemptionTransaction)||void 0===s?void 0:s.prettyRedeemedCredit," → ",t.prettyValue);return t.exchangedRewardRedemptionTransaction.prettyRedeemedCredit.length+t.prettyValue.length<21?a:e("div",{style:{display:"inline-block",verticalAlign:"top"}},a)},r=e=>e?e.firstName||e.lastName?e.firstName?e.lastName?`${e.firstName} ${e.lastName}`:`${e.firstName}`:`${e.lastName}`:this.anonymousUserText:this.deletedUserText;return e((()=>"FRIEND_SIGNUP"===this.reward.rewardSource||"REFERRED"===this.reward.rewardSource?null===this.reward.referral?e("p",{style:{color:"var(--sqm-text-subdued)"}},this.deletedReferralText):e("div",null,e("div",{style:{fontSize:"var(--sl-font-size-small)",color:"var(--sqm-text-subdued)"}},a.formatMessage({id:"referralText",defaultMessage:this.referralText},{rewardSource:this.reward.rewardSource})),e("div",null,r("FRIEND_SIGNUP"==this.reward.rewardSource?this.reward.referral.referredUser:this.reward.referral.referrerUser))):e(this.reward.exchangedRewardRedemptionTransaction?s:t,{reward:this.reward})),null)}},M=class{constructor(e){t(this,e),this.columnTitle="Source",this.anonymousUser="Your Friend",this.deletedUser="Deleted User",this.rewardExchangeText="Reward Exchange",this.referralText="{rewardSource, select, FRIEND_SIGNUP {Referral to} REFERRED {Referred by} other {}}",this.rewardSourceText="{rewardSource, select, MANUAL {Manual} AUTOMATED {{programName}} other {}}",n(this)}disconnectedCallback(){}async renderCell(t,s){return e("sqm-rewards-table-source-cell",{reward:t,anonymousUserText:this.anonymousUser,deletedUserText:this.deletedUser,rewardExchangeText:this.rewardExchangeText,referralText:this.referralText,rewardSourceText:this.rewardSourceText,locale:null==s?void 0:s.locale})}async renderLabel(){return this.columnTitle}render(){return b([this.deletedUser,this.anonymousUser,this.columnTitle,this.rewardExchangeText,this.referralText,this.rewardSourceText]),e(s,{style:{display:"none"}})}},B=f({Badge:{"&::part(base)":{fontSize:"var(--sl-font-size-small)",padding:"4px 8px",paddingLeft:"10px",whiteSpace:"pre-line"}},RedeemBadge:{"&::part(base)":{padding:"4px 8px",fontSize:"var(--sl-font-size-small)",textAlign:"center",whiteSpace:"pre-line",background:"var(--sqm-informative-color-icon)",color:"var(--sl-color-white)"}},DangerBadge:{"&::part(base)":{padding:"4px 8px",fontSize:"var(--sl-font-size-small)",textAlign:"center",whiteSpace:"pre-line",background:"var(--sqm-danger-color-icon)",color:"var(--sl-color-white)"}},WarningBadge:{"&::part(base)":{padding:"4px 8px",fontSize:"var(--sl-font-size-small)",textAlign:"center",whiteSpace:"pre-line",background:"var(--sqm-warning-color-icon)",color:"var(--sl-color-white)"}},SuccessBadge:{"&::part(base)":{padding:"4px 8px",fontSize:"var(--sl-font-size-small)",textAlign:"center",whiteSpace:"pre-line",background:"var(--sqm-success-color-icon)",color:"var(--sl-color-white)"}},Date:{fontSize:"var(--sl-font-size-small)",color:"var(--sqm-text-subdued)",margin:"0"}}),$=B.toString(),z=class{constructor(e){t(this,e),this.expiryText="Expires",this.locale="en",this.pendingUsTax="W-9 required",this.pendingTaxReview="Awaiting tax form review.",this.pendingNewTaxForm="Invalid tax form. Submit a new form to receive your rewards.",this.pendingTaxSubmission="Submit your tax documents to receive your rewards.",this.pendingPartnerCreation="Complete your tax and cash payout setup to receive your rewards.",this.pendingScheduled="Until",this.pendingUnhandled="Fulfillment error",this.pendingReviewText="Awaiting review",this.deniedText="Detected self-referral",this.payoutFailed="Payout failed due to a fulfillment issue and is currently being retried.",this.payoutApproved="Payout approved and scheduled for payment based on your settings.",this.payoutCancelled="If you think this is a mistake, contact our Support team.",this.payoutProcessing="Processing until {date}. Payout is then scheduled based on your settings."}rewardStatus(e){var t,s,a,r,i,l,n,o,d;const c=null===(t=e.statuses)||void 0===t?void 0:t.includes("EXPIRED"),u=null===(s=e.statuses)||void 0===s?void 0:s.includes("PENDING"),h="INTEGRATION"===e.type||"FUELTANK"===e.type,p=null===(r=null===(a=e.referral)||void 0===a?void 0:a.fraudData)||void 0===r?void 0:r.moderationStatus;if("DENIED"===p)return"DENIED";if("PENDING"===p)return"PENDING_REVIEW";const m=null===(i=e.partnerFundsTransfer)||void 0===i?void 0:i.status;if(e.partnerFundsTransfer){if("REVERSED"===m)return"PAYOUT_CANCELLED";if("OVERDUE"===m)return"PAYOUT_FAILED";if(e.partnerFundsTransfer.dateScheduled&&e.partnerFundsTransfer.dateScheduled>Date.now())return"PROCESSING";if("TRANSFERRED"===m||"NOT_YET_DUE"===m||e.partnerFundsTransfer.dateScheduled&&e.partnerFundsTransfer.dateScheduled<Date.now()&&"OVERDUE"!==m&&"REVERSED"!==m)return"PAYOUT_APPROVED"}return e.dateCancelled?"CANCELLED":c?"EXPIRED":u?"PENDING":"CREDIT"===e.type?(null===(l=e.statuses)||void 0===l?void 0:l.includes("REDEEMED"))?"REDEEMED":"AVAILABLE":"PCT_DISCOUNT"===e.type&&(null===(n=e.statuses)||void 0===n?void 0:n.includes("AVAILABLE"))?"AVAILABLE":h&&u?"PENDING":h&&(null===(o=e.statuses)||void 0===o?void 0:o.includes("CANCELLED"))?"CANCELLED":h&&(null===(d=e.statuses)||void 0===d?void 0:d.includes("AVAILABLE"))?"AVAILABLE":""}getTaxPendingReasons(e,t){var s,a,r,i,l;if(null===(s=null==e?void 0:e.pendingReasons)||void 0===s?void 0:s.includes("US_TAX")){if(!(null==t?void 0:t.taxHandlingEnabled))return this.pendingUsTax;if(!(null==t?void 0:t.connected))return this.pendingPartnerCreation;if(null===(a=null==t?void 0:t.publisher)||void 0===a?void 0:a.requiredTaxDocumentType){if(!(null===(r=null==t?void 0:t.publisher)||void 0===r?void 0:r.currentTaxDocument))return this.pendingTaxSubmission;const e=t.publisher.currentTaxDocument.status;if("INACTIVE"===e)return this.pendingNewTaxForm;if("NOT_VERIFIED"===e)return this.pendingTaxReview}if(!(null===(i=null==t?void 0:t.publisher)||void 0===i?void 0:i.withdrawalSettings))return this.pendingPartnerCreation}return(null===(l=null==e?void 0:e.pendingReasons)||void 0===l?void 0:l.includes("MISSING_PAYOUT_CONFIGURATION"))?this.pendingPartnerCreation:""}getBadgeType(e){switch(e){case"AVAILABLE":return"success";case"REDEEMED":case"PAYOUT_APPROVED":return"primary";case"PENDING":case"PENDING_REVIEW":case"PROCESSING":return"warning";default:return"danger"}}getPayoutStatusText(e){var t;switch(e){case"US_TAX":return this.pendingUsTax;case"PAYOUT_APPROVED":return this.payoutApproved;case"PAYOUT_FAILED":return this.payoutFailed;case"PAYOUT_CANCELLED":return this.payoutCancelled;case"PENDING_TAX_REVIEW":return this.pendingTaxReview;case"PENDING_NEW_TAX_FORM":return this.pendingNewTaxForm;case"PENDING_TAX_SUBMISSION":return this.pendingTaxSubmission;case"PENDING_PARTNER_CREATION":return this.pendingPartnerCreation;case"PROCESSING":return a.formatMessage({id:"payoutProcessingText",defaultMessage:this.payoutProcessing},{date:null===(t=A.DateTime.fromMillis(this.reward.partnerFundsTransfer.dateScheduled))||void 0===t?void 0:t.setLocale(g(this.locale)).toLocaleString(A.DateTime.DATE_MED)})}}render(){var t;a.locale=this.locale;const s=this.rewardStatus(this.reward),r=a.formatMessage({id:"statusMessage",defaultMessage:this.statusText},{status:s}),i=this.getBadgeType(s),l=this.reward.dateCancelled||this.reward.dateExpires||this.reward.dateRedeemed||"",n=l&&`${"AVAILABLE"===s&&this.reward.dateExpires?this.expiryText+" ":""}${null===(t=A.DateTime.fromMillis(l))||void 0===t?void 0:t.setLocale(g(g(this.locale))).toLocaleString(A.DateTime.DATE_MED)}`,o="PENDING"===s?this.getTaxPendingReasons(this.reward,this.taxConnection)||function(e){var t;const s={SCHEDULED:e.reward.dateScheduledFor&&e.pendingScheduled+" "+(null===(t=A.DateTime.fromMillis(e.reward.dateScheduledFor))||void 0===t?void 0:t.setLocale(g(g(e.locale||"en"))).toLocaleString(A.DateTime.DATE_MED)),UNHANDLED_ERROR:e.pendingUnhandled,SUSPECTED_FRAUD:e.pendingReview},a=e.getTaxPendingReasons(e.reward,e.taxConnection);return[...a?[a]:[],...e.reward.pendingReasons.map((e=>{var t;return null!==(t=s[e])&&void 0!==t?t:e}))].join(", ")}(this):null,d="PENDING_REVIEW"===s?this.pendingReviewText:"DENIED"===s?this.deniedText:null,c=(()=>{switch(s){case"AVAILABLE":return B.classes.SuccessBadge;case"REDEEMED":case"PAYOUT_APPROVED":return B.classes.RedeemBadge;case"PENDING":case"PENDING_REVIEW":case"PROCESSING":return B.classes.WarningBadge;default:return B.classes.DangerBadge}})();return e("div",{style:{display:"contents"}},e("style",{type:"text/css"},$),e("sl-badge",{type:i,pill:!0,class:c},r),e("p",{class:B.classes.Date},d||o||this.getPayoutStatusText(s)||n))}},j=class{constructor(e){t(this,e),this.columnTitle="Status",this.statusText="{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} PROCESSING {Payment Processing} PAYOUT_CANCELLED {Payout Cancelled} PAYOUT_FAILED {Payout Failed} EXPIRED {Expired} REDEEMED {Redeemed} DENIED {Denied} other {Not available} }",this.expiryText="Expires on ",this.pendingUsTax="W-9 required",this.pendingScheduled="Until",this.pendingUnhandled="Fulfillment error",this.pendingReviewText="Awaiting review",this.deniedText="Detected self-referral",this.pendingTaxReview="Awaiting tax form review.",this.pendingNewTaxForm="Invalid tax form. Submit a new form to receive your rewards.",this.pendingTaxSubmission="Submit your tax documents to receive your rewards.",this.pendingPartnerCreation="Complete your tax and cash payout setup to receive your rewards.",this.payoutFailed="Payout failed due to a fulfillment issue and is currently being retried.",this.payoutProcessing="Processing until {date}. Payout is then scheduled based on your settings.",this.payoutCancelled="If you think this is a mistake, contact our Support team.",this.payoutApproved="Reward was scheduled for payment based on your settings, barring any account holds.",n(this)}disconnectedCallback(){}async renderCell(t,s){return e("sqm-rewards-table-status-cell",{statusText:this.statusText,reward:t,taxConnection:null==s?void 0:s.taxConnection,expiryText:this.expiryText,pendingScheduled:this.pendingScheduled,pendingUsTax:this.pendingUsTax,pendingUnhandled:this.pendingUnhandled,pendingReviewText:this.pendingReviewText,payoutFailed:this.payoutFailed,payoutApproved:this.payoutApproved,payoutProcessing:this.payoutProcessing,payoutCancelled:this.payoutCancelled,deniedText:this.deniedText,locale:null==s?void 0:s.locale})}async renderLabel(){return this.columnTitle}render(){return b([this.columnTitle,this.statusText,this.expiryText,this.pendingReviewText,this.pendingScheduled,this.pendingUsTax,this.pendingUnhandled]),e(s,{style:{display:"none"}})}};export{S as sqm_rewards_table,q as sqm_rewards_table_date_cell,U as sqm_rewards_table_date_column,G as sqm_rewards_table_reward_cell,F as sqm_rewards_table_reward_column,V as sqm_rewards_table_source_cell,M as sqm_rewards_table_source_column,z as sqm_rewards_table_status_cell,j as sqm_rewards_table_status_column}
148
+ `;async function T(t,s){const a=t.tagName.toLowerCase();let r;await customElements.whenDefined(a);try{r=s()}catch(t){return R("label promise failed",t),e("span",null)}try{return await r}catch(t){R("Error rendering label",t);const s=N(t);return e("details",null,e("summary",null,"Error"),s)}}const S=class{constructor(e){t(this,e),this.perPage=4,this.hideLabels=!1,this.prevLabel="Prev",this.moreLabel="Next",this.hiddenColumns="0",this.smBreakpoint=599,this.mdBreakpoint=799,n(this)}disconnectedCallback(){}render(){const t=e(_,null),s=e(C,null),{states:a,data:r,callbacks:n,elements:d}=v()?function(e,t,s){const[a,r]=i(((e,t)=>({...e,...t})),{columns:[],rows:[],loading:!1,page:0}),n=w(),{data:d}=o((()=>{var t;return(null===(t=e.demoData)||void 0===t?void 0:t.mockData)||D(e.perPage)}),[e.perPage]),c=x();return l((()=>{r({loading:!0}),d&&async function(t){let s=d;s=d.slice(0,e.perPage);const a=t.filter((e=>{var t,s;return"loading"!==e.slot&&"empty"!==e.slot&&"loading"!==(null===(t=null==e?void 0:e.firstElementChild)||void 0===t?void 0:t.getAttribute("slot"))&&"empty"!==(null===(s=null==e?void 0:e.firstElementChild)||void 0===s?void 0:s.getAttribute("slot"))})),i=null==a?void 0:a.map((async(e,t)=>{var s;const a=null===(s=null==e?void 0:e.firstElementChild)||void 0===s?void 0:s.getAttribute("slot");if("RAISINS-PLOP-TARGET"===e.tagName&&"loading"!==a&&"empty"!==a){e.style.position="absolute",e.setAttribute("slot","column-"+t);const s=e.firstElementChild.childNodes[1];return s.innerHTML="+",s.style.lineHeight="20px",T(e,(()=>e.renderLabel(t)))}return T(e,(()=>e.renderLabel()))})),l=null==s?void 0:s.map((async e=>{const t=null==a?void 0:a.map((async t=>T(t,(()=>t.renderCell(e,void 0,{})))));return await Promise.all(t)})),n=l&&(await Promise.all(l)).filter((e=>e));r({rows:n});const o=i&&await Promise.all(i);r({columns:o,loading:!1,page:0})}(c)}),[d,c,n]),E({states:{hasPrev:!1,hasNext:!1,loading:!1,show:"rows"},callbacks:{prevPage:()=>console.log("Prev"),nextPage:()=>console.log("Next")},data:{textOverrides:{showLabels:!e.hideLabels,prevLabel:e.prevLabel,moreLabel:e.moreLabel},referralData:[],mdBreakpoint:799,smBreakpoint:599},elements:{columns:a.columns,rows:a.rows,emptyElement:t,loadingElement:s}},e.demoData||{},{arrayMerge:(e,t)=>t})}(this,t,s):function(t,s,a){var r,n,o;const d=c(),v=u(),E=h(),g=null!==(r=t.programId)&&void 0!==r?r:v,f="GLOBAL"===g?null:g,y={userId_eq:null==d?void 0:d.id,accountId_eq:null==d?void 0:d.accountId,...f?"classic"===f?{programId_exists:!1}:{programId_eq:f}:{}},[b,A]=i(((e,t)=>({...e,...t})),{columns:[],rows:[],loading:!1,page:0}),{data:D,loading:N}=p(I,{},!(null==d?void 0:d.jwt)),{envelope:R,states:S,callbacks:_}=m(P,(e=>{var t;return null===(t=null==e?void 0:e.viewer)||void 0===t?void 0:t.rewards}),{limit:t.perPage,offset:0},{rewardFilter:y,locale:E},!(null==d?void 0:d.jwt)),C=w(),L=x(),q=null==R?void 0:R.data,U=null===(n=null==D?void 0:D.viewer)||void 0===n?void 0:n.impactConnection;l((()=>{A({loading:!0}),R&&async function(t){const s=t.filter((e=>"loading"!==e.slot&&"empty"!==e.slot)),a=null==s?void 0:s.map((async e=>T(e,(()=>e.renderLabel())))),r=null==q?void 0:q.map((async t=>{const a=null==s?void 0:s.map((async s=>T(s,(()=>s.renderCell(t,{locale:E,taxConnection:U},e)))));return await Promise.all(a)})),i=r&&(await Promise.all(r)).filter((e=>e));A({rows:i});const l=a&&await Promise.all(a);A({columns:l,loading:!1,page:S.currentPage})}(L)}),[R,L,C]);const O=!(null===(o=null==b?void 0:b.rows)||void 0===o?void 0:o.length)&&!(null==q?void 0:q.length);return{states:{hasNext:S.currentPage<S.pageCount-1,hasPrev:S.currentPage>0,show:S.loading||b.loading||N?"loading":O?"empty":"rows",namespace:"sqm-rewards-table"},data:{textOverrides:{showLabels:!t.hideLabels,prevLabel:t.prevLabel,moreLabel:t.moreLabel},hiddenColumns:t.hiddenColumns,smBreakpoint:t.smBreakpoint,mdBreakpoint:t.mdBreakpoint},elements:{columns:b.columns,rows:b.rows,emptyElement:s,loadingElement:a},callbacks:{nextPage:()=>{_.setCurrentPage(S.currentPage+1)},prevPage:()=>{_.setCurrentPage(S.currentPage-1)}}}}(this,t,s);return b([this.perPage]),e(y,{states:a,data:r,callbacks:n,elements:d})}};function _(){return e("slot",{name:"empty"},e("sqm-empty",{"empty-state-image":"https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_reward2.png","empty-state-header":"View your rewards","empty-state-text":"Refer friends and complete tasks to view the details of your rewards"}))}function C(){return e("slot",{name:"loading"},e(L,null),e(L,null),e(L,null),e(L,null))}function L(){return e("sqm-table-row",null,e("sqm-table-cell",{colspan:5},e("sqm-skeleton",null)))}const q=class{constructor(e){t(this,e),this.ignored=!0,this.locale="en",n(this)}disconnectedCallback(){}render(){var e,t;return this.date?null===(t=null===(e=A.DateTime.fromMillis(this.date))||void 0===e?void 0:e.setLocale(g(this.locale)))||void 0===t?void 0:t.toLocaleString(A.DateTime.DATE_MED):"-"}},U=class{constructor(e){t(this,e),this.columnTitle="Date received",this.dateShown="dateGiven",n(this)}disconnectedCallback(){}async renderCell(t,s){return e("sqm-rewards-table-date-cell",{date:t[this.dateShown],locale:null==s?void 0:s.locale})}async renderLabel(){return this.columnTitle}render(){return b([this.dateShown,this.columnTitle]),e(s,{style:{display:"none"}})}},O=f({DetailsContainer:{width:"100%",display:"flex","align-items":"center","justify-content":"space-between","margin-right":"var(--sl-spacing-small)","flex-wrap":"wrap"},Details:{"padding-bottom":"var(--sl-spacing-small)","max-width":"500px","padding-right":"var(--sl-spacing-x-small)","&::part(header)":{padding:"var(--sl-spacing-x-small)",cursor:"default"},"&::part(content)":{padding:"var(--sl-spacing-x-small) var(--sl-spacing-medium)"},"&::part(base)":{opacity:"1"},"&::part(summary-icon)":{display:"flex"}},BadgeContainer:{"& > :not(:last-child)":{"margin-right":"var(--sl-spacing-x-small)"}},BoldText:{"font-weight":"var(--sl-font-weight-semibold)"},StatusBadge:{paddingLeft:"var(--sl-spacing-xxx-small)","&::part(base)":{textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line"}},Fueltank:{"& .code":{display:"flex",cursor:"pointer",userSelect:"none",color:"var(--sl-color-neutral-500)","&:hover":{color:"var(--sl-color-sky-500)"}},"& .text":{maxWidth:"90%",overflow:"hidden",textOverflow:"ellipsis",color:"inherit",fontSize:"var(--sl-font-size-small)",fontWeight:"var(--sl-font-weight-bold)"},"& .icon":{position:"relative",top:"1px",marginLeft:"var(--sl-spacing-x-small)",color:"inherit"}}}),k=O.toString(),G=class{constructor(e){t(this,e)}render(){return a.locale=this.locale,e("div",{style:{display:"contents"}},e("style",{type:"text/css"},k),e((({reward:t})=>{var s;const r="CENTS"===t.unit?t.prettyValue.replace(/USD/gi,"$"):null!==(s=t.prettyValue)&&void 0!==s?s:"-",i="1"===t.prettyValueNumber||t.dateRedeemed&&"0"===t.prettyAvailableNumber;if("FUELTANK"===t.type)return e("div",{class:O.classes.Fueltank},t.prettyValue,t.fuelTankCode&&e("div",{class:"code",onClick:()=>navigator.clipboard.writeText(t.fuelTankCode)},e("sl-tooltip",{trigger:"click",placement:"top",distance:5,skidding:11,content:this.copyText,"onSl-show":e=>setTimeout((()=>e.path[0].hide()),1e3)},e("span",{class:"text"},t.fuelTankCode),e("span",{class:"icon"},e("sl-icon",{name:"files"})))));if("CREDIT"===t.type&&!i){const s=parseFloat(t.prettyValueNumber)-parseFloat(t.prettyRedeemedNumber),i=Math.round(s/parseFloat(t.prettyValueNumber)*100),l=t.statuses.includes("EXPIRED")||t.statuses.includes("CANCELLED")?e("div",null,a.formatMessage({id:"redeemedText",defaultMessage:this.redeemedText},{redeemedAmount:t.prettyRedeemedCredit})):e("div",null,a.formatMessage({id:"availableText",defaultMessage:this.availableText},{availableAmount:t.statuses.includes("PENDING")?t.prettyAssignedCredit:t.prettyAvailableValue})),n=f({Progress:{height:"3px",width:"100%",margin:"var(--sl-spacing-xx-small) 0",background:"var(--sqm-border-color)","&:after":{content:'""',display:"block",background:"var(--sqm-accent-color-icon)",borderRadius:"100px",width:`${i}%`,height:"100%"}},Container:{display:"inline-block",verticalAlign:"top",width:"150px",whiteSpace:"break",overflow:"hidden",textOverflow:"ellipsis"},Text:{fontSize:"var(--sl-font-size-medium)",color:"var(--sqm-text)"},Subtext:{fontSize:"var(--sl-font-size-small)",color:"var(--sqm-text-subdued)"}}),o=n.toString();return e("div",null,e("style",{type:"text/css"},o),e("div",{class:n.classes.Container},e("span",{part:"sqm-reward-cell-value"},r+" "),e("br",null)," ",e("div",{part:"sqm-reward-cell-progress",class:n.classes.Progress}),e("span",{part:"sqm-reward-cell-subtext",class:n.classes.Subtext},l)))}return e("div",null,r)}),{reward:this.reward}))}},F=class{constructor(e){t(this,e),this.columnTitle="Reward",this.redeemedText="{redeemedAmount} redeemed",this.availableText="{availableAmount} remaining",this.copyText="Copied!",n(this)}disconnectedCallback(){}async renderCell(t,s){return e("sqm-rewards-table-reward-cell",{reward:t,redeemedText:this.redeemedText,availableText:this.availableText,copyText:this.copyText,locale:null==s?void 0:s.locale,exportparts:"sqm-rewards-cell-value, sqm-rewards-cell-progress-bar, sqm-rewards-cell-subtext"})}async renderLabel(){return this.columnTitle}render(){return b([this.columnTitle,this.redeemedText,this.availableText,this.copyText]),e(s,{style:{display:"none"}})}},V=class{constructor(e){t(this,e),this.locale="en"}render(){a.locale=this.locale;const t=({reward:t})=>{var s;return e("span",null,a.formatMessage({id:"rewardSourceText",defaultMessage:this.rewardSourceText},{rewardSource:t.rewardSource,programName:null===(s=null==t?void 0:t.program)||void 0===s?void 0:s.name}))},s=({reward:t})=>{var s;const a=e("div",null,e("span",{style:{fontSize:"var(--sl-font-size-small)",color:"var(--sqm-text-subdued)"}},this.rewardExchangeText),e("br",null),null===(s=t.exchangedRewardRedemptionTransaction)||void 0===s?void 0:s.prettyRedeemedCredit," → ",t.prettyValue);return t.exchangedRewardRedemptionTransaction.prettyRedeemedCredit.length+t.prettyValue.length<21?a:e("div",{style:{display:"inline-block",verticalAlign:"top"}},a)},r=e=>e?e.firstName||e.lastName?e.firstName?e.lastName?`${e.firstName} ${e.lastName}`:`${e.firstName}`:`${e.lastName}`:this.anonymousUserText:this.deletedUserText;return e((()=>"FRIEND_SIGNUP"===this.reward.rewardSource||"REFERRED"===this.reward.rewardSource?null===this.reward.referral?e("p",{style:{color:"var(--sqm-text-subdued)"}},this.deletedReferralText):e("div",null,e("div",{style:{fontSize:"var(--sl-font-size-small)",color:"var(--sqm-text-subdued)"}},a.formatMessage({id:"referralText",defaultMessage:this.referralText},{rewardSource:this.reward.rewardSource})),e("div",null,r("FRIEND_SIGNUP"==this.reward.rewardSource?this.reward.referral.referredUser:this.reward.referral.referrerUser))):e(this.reward.exchangedRewardRedemptionTransaction?s:t,{reward:this.reward})),null)}},M=class{constructor(e){t(this,e),this.columnTitle="Source",this.anonymousUser="Your Friend",this.deletedUser="Deleted User",this.rewardExchangeText="Reward Exchange",this.referralText="{rewardSource, select, FRIEND_SIGNUP {Referral to} REFERRED {Referred by} other {}}",this.rewardSourceText="{rewardSource, select, MANUAL {Manual} AUTOMATED {{programName}} other {}}",n(this)}disconnectedCallback(){}async renderCell(t,s){return e("sqm-rewards-table-source-cell",{reward:t,anonymousUserText:this.anonymousUser,deletedUserText:this.deletedUser,rewardExchangeText:this.rewardExchangeText,referralText:this.referralText,rewardSourceText:this.rewardSourceText,locale:null==s?void 0:s.locale})}async renderLabel(){return this.columnTitle}render(){return b([this.deletedUser,this.anonymousUser,this.columnTitle,this.rewardExchangeText,this.referralText,this.rewardSourceText]),e(s,{style:{display:"none"}})}},B=f({Badge:{"&::part(base)":{fontSize:"var(--sl-font-size-small)",padding:"4px 8px",paddingLeft:"10px",whiteSpace:"pre-line"}},RedeemBadge:{"&::part(base)":{padding:"4px 8px",fontSize:"var(--sl-font-size-small)",textAlign:"center",whiteSpace:"pre-line",background:"var(--sqm-informative-color-icon)",color:"var(--sl-color-white)"}},DangerBadge:{"&::part(base)":{padding:"4px 8px",fontSize:"var(--sl-font-size-small)",textAlign:"center",whiteSpace:"pre-line",background:"var(--sqm-danger-color-icon)",color:"var(--sl-color-white)"}},WarningBadge:{"&::part(base)":{padding:"4px 8px",fontSize:"var(--sl-font-size-small)",textAlign:"center",whiteSpace:"pre-line",background:"var(--sqm-warning-color-icon)",color:"var(--sl-color-white)"}},SuccessBadge:{"&::part(base)":{padding:"4px 8px",fontSize:"var(--sl-font-size-small)",textAlign:"center",whiteSpace:"pre-line",background:"var(--sqm-success-color-icon)",color:"var(--sl-color-white)"}},Date:{fontSize:"var(--sl-font-size-small)",color:"var(--sqm-text-subdued)",margin:"0"}}),$=B.toString(),z=class{constructor(e){t(this,e),this.expiryText="Expires",this.locale="en",this.pendingUsTax="W-9 required",this.pendingTaxReview="Awaiting tax form review.",this.pendingNewTaxForm="Invalid tax form. Submit a new form to receive your rewards.",this.pendingTaxSubmission="Submit your tax documents to receive your rewards.",this.pendingPartnerCreation="Complete your cash payout setup to receive your rewards.",this.pendingScheduled="Until",this.pendingUnhandled="Fulfillment error",this.pendingReviewText="Awaiting review",this.deniedText="Detected self-referral",this.payoutFailed="Payout failed due to a fulfillment issue and is currently being retried.",this.payoutApproved="Payout approved and scheduled for payment based on your settings.",this.payoutCancelled="If you think this is a mistake, contact our Support team.",this.payoutProcessing="Processing until {date}. Payout is then scheduled based on your settings."}rewardStatus(e){var t,s,a,r,i,l,n,o,d,c,u,h,p;const m=null===(t=e.statuses)||void 0===t?void 0:t.includes("EXPIRED"),v=null===(s=e.statuses)||void 0===s?void 0:s.includes("PENDING"),E="INTEGRATION"===e.type||"FUELTANK"===e.type,g=null===(r=null===(a=e.referral)||void 0===a?void 0:a.fraudData)||void 0===r?void 0:r.moderationStatus;if("DENIED"===g)return"DENIED";if("PENDING"===g)return"PENDING_REVIEW";const f=e.rewardedCash;if(console.log(this.reward,"reward in status cell"),f&&(!(null===(i=this.taxConnection)||void 0===i?void 0:i.connected)||(null===(l=this.taxConnection)||void 0===l?void 0:l.connected)&&!(null===(o=null===(n=this.taxConnection)||void 0===n?void 0:n.publisher)||void 0===o?void 0:o.withdrawalSettings)))return"PENDING";const y=null===(d=e.partnerFundsTransfer)||void 0===d?void 0:d.status;if(e.partnerFundsTransfer){if("REVERSED"===y)return"PAYOUT_CANCELLED";if("OVERDUE"===y)return"PAYOUT_FAILED";if(e.partnerFundsTransfer.dateScheduled&&e.partnerFundsTransfer.dateScheduled>Date.now())return"PROCESSING";if("TRANSFERRED"===y||"NOT_YET_DUE"===y||e.partnerFundsTransfer.dateScheduled&&e.partnerFundsTransfer.dateScheduled<Date.now()&&"OVERDUE"!==y&&"REVERSED"!==y)return"PAYOUT_APPROVED"}return e.dateCancelled?"CANCELLED":m?"EXPIRED":v?"PENDING":"CREDIT"===e.type?(null===(c=e.statuses)||void 0===c?void 0:c.includes("REDEEMED"))?"REDEEMED":"AVAILABLE":"PCT_DISCOUNT"===e.type&&(null===(u=e.statuses)||void 0===u?void 0:u.includes("AVAILABLE"))?"AVAILABLE":E&&v?"PENDING":E&&(null===(h=e.statuses)||void 0===h?void 0:h.includes("CANCELLED"))?"CANCELLED":E&&(null===(p=e.statuses)||void 0===p?void 0:p.includes("AVAILABLE"))?"AVAILABLE":""}getTaxPendingReasons(e,t){var s,a,r,i,l,n;if(null===(s=null==e?void 0:e.pendingReasons)||void 0===s?void 0:s.includes("US_TAX")){if(!(null==t?void 0:t.taxHandlingEnabled))return this.pendingUsTax;if(!(null==t?void 0:t.connected))return this.pendingPartnerCreation;if(null===(a=null==t?void 0:t.publisher)||void 0===a?void 0:a.requiredTaxDocumentType){if(!(null===(r=null==t?void 0:t.publisher)||void 0===r?void 0:r.currentTaxDocument))return this.pendingTaxSubmission;const e=t.publisher.currentTaxDocument.status;if("INACTIVE"===e)return this.pendingNewTaxForm;if("NOT_VERIFIED"===e)return this.pendingTaxReview}if(!(null===(i=null==t?void 0:t.publisher)||void 0===i?void 0:i.withdrawalSettings))return this.pendingPartnerCreation}return(null===(l=null==e?void 0:e.pendingReasons)||void 0===l?void 0:l.includes("MISSING_PAYOUT_CONFIGURATION"))||e.rewardedCash&&(!(null==t?void 0:t.connected)||(null==t?void 0:t.connected)&&!(null===(n=null==t?void 0:t.publisher)||void 0===n?void 0:n.withdrawalSettings))?this.pendingPartnerCreation:""}getBadgeType(e){switch(e){case"AVAILABLE":return"success";case"REDEEMED":case"PAYOUT_APPROVED":return"primary";case"PENDING":case"PENDING_REVIEW":case"PROCESSING":return"warning";default:return"danger"}}getPayoutStatusText(e){var t;switch(e){case"US_TAX":return this.pendingUsTax;case"PAYOUT_APPROVED":return this.payoutApproved;case"PAYOUT_FAILED":return this.payoutFailed;case"PAYOUT_CANCELLED":return this.payoutCancelled;case"PENDING_TAX_REVIEW":return this.pendingTaxReview;case"PENDING_NEW_TAX_FORM":return this.pendingNewTaxForm;case"PENDING_TAX_SUBMISSION":return this.pendingTaxSubmission;case"PENDING_PARTNER_CREATION":return this.pendingPartnerCreation;case"PROCESSING":return a.formatMessage({id:"payoutProcessingText",defaultMessage:this.payoutProcessing},{date:null===(t=A.DateTime.fromMillis(this.reward.partnerFundsTransfer.dateScheduled))||void 0===t?void 0:t.setLocale(g(this.locale)).toLocaleString(A.DateTime.DATE_MED)})}}render(){var t;a.locale=this.locale;const s=this.rewardStatus(this.reward),r=a.formatMessage({id:"statusMessage",defaultMessage:this.statusText},{status:s}),i=this.getBadgeType(s),l=this.reward.dateCancelled||this.reward.dateExpires||this.reward.dateRedeemed||"",n=l&&`${"AVAILABLE"===s&&this.reward.dateExpires?this.expiryText+" ":""}${null===(t=A.DateTime.fromMillis(l))||void 0===t?void 0:t.setLocale(g(g(this.locale))).toLocaleString(A.DateTime.DATE_MED)}`,o="PENDING"===s?this.getTaxPendingReasons(this.reward,this.taxConnection)||function(e){var t;const s={SCHEDULED:e.reward.dateScheduledFor&&e.pendingScheduled+" "+(null===(t=A.DateTime.fromMillis(e.reward.dateScheduledFor))||void 0===t?void 0:t.setLocale(g(g(e.locale||"en"))).toLocaleString(A.DateTime.DATE_MED)),UNHANDLED_ERROR:e.pendingUnhandled,SUSPECTED_FRAUD:e.pendingReview},a=e.getTaxPendingReasons(e.reward,e.taxConnection);return[...a?[a]:[],...e.reward.pendingReasons.map((e=>{var t;return null!==(t=s[e])&&void 0!==t?t:e}))].join(", ")}(this):null,d="PENDING_REVIEW"===s?this.pendingReviewText:"DENIED"===s?this.deniedText:null,c=(()=>{switch(s){case"AVAILABLE":return B.classes.SuccessBadge;case"REDEEMED":case"PAYOUT_APPROVED":return B.classes.RedeemBadge;case"PENDING":case"PENDING_REVIEW":case"PROCESSING":return B.classes.WarningBadge;default:return B.classes.DangerBadge}})();return e("div",{style:{display:"contents"}},e("style",{type:"text/css"},$),e("sl-badge",{type:i,pill:!0,class:c},r),e("p",{class:B.classes.Date},d||o||this.getPayoutStatusText(s)||n))}},j=class{constructor(e){t(this,e),this.columnTitle="Status",this.statusText="{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} PROCESSING {Payment Processing} PAYOUT_CANCELLED {Payout Cancelled} PAYOUT_FAILED {Payout Failed} EXPIRED {Expired} REDEEMED {Redeemed} DENIED {Denied} other {Not available} }",this.expiryText="Expires on ",this.pendingUsTax="W-9 required",this.pendingScheduled="Until",this.pendingUnhandled="Fulfillment error",this.pendingReviewText="Awaiting review",this.deniedText="Detected self-referral",this.pendingTaxReview="Awaiting tax form review.",this.pendingNewTaxForm="Invalid tax form. Submit a new form to receive your rewards.",this.pendingTaxSubmission="Submit your tax documents to receive your rewards.",this.pendingPartnerCreation="Complete your tax and cash payout setup to receive your rewards.",this.payoutFailed="Payout failed due to a fulfillment issue and is currently being retried.",this.payoutProcessing="Processing until {date}. Payout is then scheduled based on your settings.",this.payoutCancelled="If you think this is a mistake, contact our Support team.",this.payoutApproved="Reward was scheduled for payment based on your settings, barring any account holds.",n(this)}disconnectedCallback(){}async renderCell(t,s){return e("sqm-rewards-table-status-cell",{statusText:this.statusText,reward:t,taxConnection:null==s?void 0:s.taxConnection,expiryText:this.expiryText,pendingScheduled:this.pendingScheduled,pendingUsTax:this.pendingUsTax,pendingUnhandled:this.pendingUnhandled,pendingReviewText:this.pendingReviewText,payoutFailed:this.payoutFailed,payoutApproved:this.payoutApproved,payoutProcessing:this.payoutProcessing,payoutCancelled:this.payoutCancelled,deniedText:this.deniedText,locale:null==s?void 0:s.locale})}async renderLabel(){return this.columnTitle}render(){return b([this.columnTitle,this.statusText,this.expiryText,this.pendingReviewText,this.pendingScheduled,this.pendingUsTax,this.pendingUnhandled]),e(s,{style:{display:"none"}})}};export{S as sqm_rewards_table,q as sqm_rewards_table_date_cell,U as sqm_rewards_table_date_column,G as sqm_rewards_table_reward_cell,F as sqm_rewards_table_reward_column,V as sqm_rewards_table_source_cell,M as sqm_rewards_table_source_column,z as sqm_rewards_table_status_cell,j as sqm_rewards_table_status_column}
@@ -1,4 +1,4 @@
1
- import{f as e}from"./p-a7fc1e02.js";import{d as i,J as a,B as s,H as l,Q as d,R as r,I as o}from"./p-d0993bb9.js";const n=i.gql`
1
+ import{f as e}from"./p-a7fc1e02.js";import{d as i,J as a,B as s,H as l,Q as d,R as r,I as o}from"./p-8a6531d2.js";const n=i.gql`
2
2
  query getCodes(
3
3
  $engagementMedium: UserEngagementMedium!
4
4
  $limit: Int!
@@ -0,0 +1 @@
1
+ System.register([],(function(e){"use strict";return{execute:function(){var r=e("S","sq:code-verification");var i=e("b","sq:show-partner-modal");var t=e("P","sq:partner-created");var a=e("a","sq:verification-email");var c=e("V","sq:verification-context");var n=e("c","sq:code-verified")}}}));
@@ -1 +1 @@
1
- import{r as e,h as i}from"./p-083180bf.js";import"./p-f8a09b0f.js";import{k as a,m as t,f as s,n}from"./p-a7fc1e02.js";import{l as r,n as o,J as l,j as c,b as d,i as v}from"./p-d0993bb9.js";import{c as u}from"./p-c1086930.js";import"./p-cef45012.js";import"./p-49b20dae.js";import"./p-c813ec64.js";import{P as m}from"./p-2668335b.js";const f=class{constructor(i){e(this,i),this.ignored=!0,this.redirectPath="/verifyEmail",this.emailVerificationHeader="Verify your email",this.resendEmailButtonText="Re-send Email",this.verifyMessage="A verification email was sent to {email}. Please verify your email to continue to the portal. Resending an email will invalidate the previous email.",this.verificationStatusMessage="Checking verification status in {countdown}",this.verificationLoadingMessage="Checking verification status",this.verificationResentMessage="Your verification email has been resent successfully",this.networkErrorMessage="An error occurred while verifying your password. Please refresh the page.",n(this)}disconnectedCallback(){}render(){const{states:e,callbacks:n,content:f}=v()?u({states:{error:"",loading:!1,success:!1,countdown:10},callbacks:{submit:async()=>{}},content:{email:"test@example.com",verifyMessage:(h=this).verifyMessage,emailVerificationHeader:h.emailVerificationHeader,resendEmailButtonText:h.resendEmailButtonText,verificationLoadingMessage:h.verificationLoadingMessage,verificationStatusMessage:h.verificationStatusMessage,verificationResentMessage:h.verificationResentMessage,networkErrorMessage:h.networkErrorMessage}},h.demoData||{},{arrayMerge:(e,i)=>i}):function(e){var i,n,v,u,m,f,h,g,p;const[b,{loading:y,errors:w}]=r(),[M,{data:j,loading:k}]=o(),I=l(),P=null===(i=null==I?void 0:I.managedIdentity)||void 0===i?void 0:i.email,E=new URLSearchParams(c.location.search),x=E.get("nextPage"),[R,V]=a(!1),[C,L]=a(""),[S,_]=a(10),A=t(void 0),B=t(void 0);async function H(){var i;const a=await M();if(null===(i=null==a?void 0:a.managedIdentitySession)||void 0===i?void 0:i.emailVerified)return clearInterval(A.current),c.push({pathname:e.redirectPath,search:E.toString()&&"?"+E.toString()});U(10)}const T=(e=1e4)=>setInterval(H,e),q=e=>setInterval((()=>_(e)),1e3);function U(e){if(clearInterval(B.current),clearInterval(A.current),"hidden"===document.visibilityState)return;e&&_(e);let i=S||10;B.current=q(e-1||i-1),A.current=T(1e3*e||1e3*i)}const Y=d((()=>U()),[S]);return s((()=>(A.current||(H(),A.current=T()),()=>{clearInterval(A.current)})),[]),s((()=>(S>0&&(clearInterval(B.current),B.current=q(S-1)),document.addEventListener("visibilitychange",Y),()=>{clearInterval(B.current),document.removeEventListener("visibilitychange",Y)})),[S]),{states:{loading:y,error:(null===(m=null===(u=null===(v=null===(n=null==w?void 0:w.response)||void 0===n?void 0:n.errors)||void 0===v?void 0:v[0])||void 0===u?void 0:u.extensions)||void 0===m?void 0:m.message)||(null===(g=null===(h=null===(f=null==w?void 0:w.response)||void 0===f?void 0:f.errors)||void 0===h?void 0:h[0])||void 0===g?void 0:g.message)||C,success:R,loadingVerification:k,isVerified:!!(null===(p=null==j?void 0:j.managedIdentitySession)||void 0===p?void 0:p.emailVerified),countdown:S},callbacks:{submit:async()=>{var i;if(!P)return;L(""),V(!1);const a={email:P,urlParams:x?{nextPage:x}:null,redirectPath:e.redirectPath},t=await b(a);t instanceof Error?t.message&&L(e.networkErrorMessage):(null===(i=t.requestManagedIdentityVerificationEmail)||void 0===i?void 0:i.success)&&V(!0)}},content:{email:P,verifyMessage:e.verifyMessage,emailVerificationHeader:e.emailVerificationHeader,resendEmailButtonText:e.resendEmailButtonText,verificationLoadingMessage:e.verificationLoadingMessage,verificationStatusMessage:e.verificationStatusMessage,verificationResentMessage:e.verificationResentMessage,networkErrorMessage:e.networkErrorMessage}}}(this);var h;return i(m,{states:e,callbacks:n,content:f})}};export{f as sqm_portal_email_verification}
1
+ import{r as e,h as i}from"./p-083180bf.js";import"./p-13d8ecad.js";import{k as a,m as t,f as s,n}from"./p-a7fc1e02.js";import{l as r,n as o,J as l,j as c,b as d,i as v}from"./p-8a6531d2.js";import{c as u}from"./p-c1086930.js";import"./p-cef45012.js";import"./p-49b20dae.js";import"./p-c813ec64.js";import{P as m}from"./p-e8e7af06.js";const f=class{constructor(i){e(this,i),this.ignored=!0,this.redirectPath="/verifyEmail",this.emailVerificationHeader="Verify your email",this.resendEmailButtonText="Re-send Email",this.verifyMessage="A verification email was sent to {email}. Please verify your email to continue to the portal. Resending an email will invalidate the previous email.",this.verificationStatusMessage="Checking verification status in {countdown}",this.verificationLoadingMessage="Checking verification status",this.verificationResentMessage="Your verification email has been resent successfully",this.networkErrorMessage="An error occurred while verifying your password. Please refresh the page.",n(this)}disconnectedCallback(){}render(){const{states:e,callbacks:n,content:f}=v()?u({states:{error:"",loading:!1,success:!1,countdown:10},callbacks:{submit:async()=>{}},content:{email:"test@example.com",verifyMessage:(h=this).verifyMessage,emailVerificationHeader:h.emailVerificationHeader,resendEmailButtonText:h.resendEmailButtonText,verificationLoadingMessage:h.verificationLoadingMessage,verificationStatusMessage:h.verificationStatusMessage,verificationResentMessage:h.verificationResentMessage,networkErrorMessage:h.networkErrorMessage}},h.demoData||{},{arrayMerge:(e,i)=>i}):function(e){var i,n,v,u,m,f,h,g,p;const[y,{loading:b,errors:w}]=r(),[M,{data:j,loading:k}]=o(),I=l(),P=null===(i=null==I?void 0:I.managedIdentity)||void 0===i?void 0:i.email,E=new URLSearchParams(c.location.search),x=E.get("nextPage"),[R,V]=a(!1),[C,L]=a(""),[S,_]=a(10),A=t(void 0),B=t(void 0);async function H(){var i;const a=await M();if(null===(i=null==a?void 0:a.managedIdentitySession)||void 0===i?void 0:i.emailVerified)return clearInterval(A.current),c.push({pathname:e.redirectPath,search:E.toString()&&"?"+E.toString()});U(10)}const T=(e=1e4)=>setInterval(H,e),q=e=>setInterval((()=>_(e)),1e3);function U(e){if(clearInterval(B.current),clearInterval(A.current),"hidden"===document.visibilityState)return;e&&_(e);let i=S||10;B.current=q(e-1||i-1),A.current=T(1e3*e||1e3*i)}const Y=d((()=>U()),[S]);return s((()=>(A.current||(H(),A.current=T()),()=>{clearInterval(A.current)})),[]),s((()=>(S>0&&(clearInterval(B.current),B.current=q(S-1)),document.addEventListener("visibilitychange",Y),()=>{clearInterval(B.current),document.removeEventListener("visibilitychange",Y)})),[S]),{states:{loading:b,error:(null===(m=null===(u=null===(v=null===(n=null==w?void 0:w.response)||void 0===n?void 0:n.errors)||void 0===v?void 0:v[0])||void 0===u?void 0:u.extensions)||void 0===m?void 0:m.message)||(null===(g=null===(h=null===(f=null==w?void 0:w.response)||void 0===f?void 0:f.errors)||void 0===h?void 0:h[0])||void 0===g?void 0:g.message)||C,success:R,loadingVerification:k,isVerified:!!(null===(p=null==j?void 0:j.managedIdentitySession)||void 0===p?void 0:p.emailVerified),countdown:S},callbacks:{submit:async()=>{var i;if(!P)return;L(""),V(!1);const a={email:P,urlParams:x?{nextPage:x}:null,redirectPath:e.redirectPath},t=await y(a);t instanceof Error?t.message&&L(e.networkErrorMessage):(null===(i=t.requestManagedIdentityVerificationEmail)||void 0===i?void 0:i.success)&&V(!0)}},content:{email:P,verifyMessage:e.verifyMessage,emailVerificationHeader:e.emailVerificationHeader,resendEmailButtonText:e.resendEmailButtonText,verificationLoadingMessage:e.verificationLoadingMessage,verificationStatusMessage:e.verificationStatusMessage,verificationResentMessage:e.verificationResentMessage,networkErrorMessage:e.networkErrorMessage}}}(this);var h;return i(m,{states:e,callbacks:n,content:f})}};export{f as sqm_portal_email_verification}
@@ -1 +1 @@
1
- import{r as s,h as o}from"./p-083180bf.js";import{n as r,k as t,f as n}from"./p-a7fc1e02.js";import{i,k as e,H as a}from"./p-d0993bb9.js";import{c}from"./p-c1086930.js";import{N as m}from"./p-88e16945.js";const f=class{constructor(o){s(this,o),this.ignored=!0,this.mobileMenuColor="var(--sqm-text, #444445)",r(this)}disconnectedCallback(){}render(){const s=i()?function(s){return c({mobileMenuColor:s.mobileMenuColor},s.demoData||{},{arrayMerge:(s,o)=>o})}(this):function(s){const o=e(),r=a(),[i,c]=t(!1);return n((()=>{c(!1)}),[o.pathname,r]),{mobileMenuColor:s.mobileMenuColor,checked:i,onClick:function(s){c(s.target.checked)}}}(this);return o(m,Object.assign({},s),o("slot",null))}};export{f as sqm_navigation_sidebar}
1
+ import{r as s,h as o}from"./p-083180bf.js";import{n as r,k as t,f as n}from"./p-a7fc1e02.js";import{i,k as a,H as e}from"./p-8a6531d2.js";import{c}from"./p-c1086930.js";import{N as m}from"./p-88e16945.js";const f=class{constructor(o){s(this,o),this.ignored=!0,this.mobileMenuColor="var(--sqm-text, #444445)",r(this)}disconnectedCallback(){}render(){const s=i()?function(s){return c({mobileMenuColor:s.mobileMenuColor},s.demoData||{},{arrayMerge:(s,o)=>o})}(this):function(s){const o=a(),r=e(),[i,c]=t(!1);return n((()=>{c(!1)}),[o.pathname,r]),{mobileMenuColor:s.mobileMenuColor,checked:i,onClick:function(s){c(s.target.checked)}}}(this);return o(m,Object.assign({},s),o("slot",null))}};export{f as sqm_navigation_sidebar}
@@ -1 +1 @@
1
- import{h as e}from"./p-083180bf.js";import{i as a}from"./p-f8a09b0f.js";import{j as l,a as o}from"./p-cef45012.js";l.setup(o());const r=l.createStyleSheet({ErrorStyle:{"&::part(control)":{borderColor:"var(--sl-color-danger-500)",outline:"var(--sl-color-danger-500)"},"&:host":{"--focus-ring":"0 0 0 var(--sl-focus-ring-width) red !important"}},ErrorMessageStyle:{margin:0,marginTop:"5px",color:"var(--sl-color-danger-500)",fontSize:"var(--sl-input-help-text-font-size-medium)",fontFamily:"var(--sl-font-sans)",fontWeight:"var(--sl-font-weight-normal)"},FieldContainer:{"margin-bottom":"var(--sl-spacing-large)"}}),n=r.toString();function t(l){var o,t,s,i,c;const{states:d,content:b}=l,p=null===(o=null==d?void 0:d.leadFormState)||void 0===o?void 0:o.validationErrors,v=({checkboxLabel:e})=>a.formatMessage({id:`requiredFieldErrorMessage-${e}`,defaultMessage:b.errorMessage},{checkboxLabel:e});return e("div",{class:r.classes.FieldContainer,part:"sqm-base"},e("style",{type:"text/css"},"\n:host {\n margin: 0 auto;\n width: 100%;\n display: block;\n}\nsl-checkbox::part(label){\n font-size: var(--sl-input-label-font-size-small);\n font-weight: var(--sl-font-weight-normal);\n line-height: 20px;\n}\nsl-checkbox::part(base){\n align-items: start;\n}\n",n),e("sl-checkbox",Object.assign({exportparts:"label: input-label, base: input-base",name:`/${b.checkboxName}`,"onSl-change":e=>{e.target.value=e.target.checked}},b.checkboxOptional?[]:{required:!1},{disabled:(null===(t=d.leadFormState)||void 0===t?void 0:t.loading)||(null===(s=d.leadFormState)||void 0===s?void 0:s.disabled),validationError:({value:e})=>{if(!e&&!b.checkboxOptional)return v({checkboxLabel:b.checkboxLabel})}},(null===(c=null===(i=d.leadFormState)||void 0===i?void 0:i.validationErrors)||void 0===c?void 0:c[b.checkboxName])?{class:r.classes.ErrorStyle}:[]),a.formatMessage({id:b.checkboxName+"-message",defaultMessage:b.checkboxLabel},{labelLink:e("a",{href:b.checkboxLabelLink,target:"_blank"},b.checkboxLabelLinkText||b.checkboxLabelLink)})),(null==p?void 0:p[b.checkboxName])&&e("p",{class:r.classes.ErrorMessageStyle},v({checkboxLabel:b.checkboxLabel})))}export{t as L}
1
+ import{h as e}from"./p-083180bf.js";import{i as a}from"./p-13d8ecad.js";import{j as l,a as o}from"./p-cef45012.js";l.setup(o());const r=l.createStyleSheet({ErrorStyle:{"&::part(control)":{borderColor:"var(--sl-color-danger-500)",outline:"var(--sl-color-danger-500)"},"&:host":{"--focus-ring":"0 0 0 var(--sl-focus-ring-width) red !important"}},ErrorMessageStyle:{margin:0,marginTop:"5px",color:"var(--sl-color-danger-500)",fontSize:"var(--sl-input-help-text-font-size-medium)",fontFamily:"var(--sl-font-sans)",fontWeight:"var(--sl-font-weight-normal)"},FieldContainer:{"margin-bottom":"var(--sl-spacing-large)"}}),n=r.toString();function t(l){var o,t,s,i,c;const{states:d,content:b}=l,p=null===(o=null==d?void 0:d.leadFormState)||void 0===o?void 0:o.validationErrors,v=({checkboxLabel:e})=>a.formatMessage({id:`requiredFieldErrorMessage-${e}`,defaultMessage:b.errorMessage},{checkboxLabel:e});return e("div",{class:r.classes.FieldContainer,part:"sqm-base"},e("style",{type:"text/css"},"\n:host {\n margin: 0 auto;\n width: 100%;\n display: block;\n}\nsl-checkbox::part(label){\n font-size: var(--sl-input-label-font-size-small);\n font-weight: var(--sl-font-weight-normal);\n line-height: 20px;\n}\nsl-checkbox::part(base){\n align-items: start;\n}\n",n),e("sl-checkbox",Object.assign({exportparts:"label: input-label, base: input-base",name:`/${b.checkboxName}`,"onSl-change":e=>{e.target.value=e.target.checked}},b.checkboxOptional?[]:{required:!1},{disabled:(null===(t=d.leadFormState)||void 0===t?void 0:t.loading)||(null===(s=d.leadFormState)||void 0===s?void 0:s.disabled),validationError:({value:e})=>{if(!e&&!b.checkboxOptional)return v({checkboxLabel:b.checkboxLabel})}},(null===(c=null===(i=d.leadFormState)||void 0===i?void 0:i.validationErrors)||void 0===c?void 0:c[b.checkboxName])?{class:r.classes.ErrorStyle}:[]),a.formatMessage({id:b.checkboxName+"-message",defaultMessage:b.checkboxLabel},{labelLink:e("a",{href:b.checkboxLabelLink,target:"_blank"},b.checkboxLabelLinkText||b.checkboxLabelLink)})),(null==p?void 0:p[b.checkboxName])&&e("p",{class:r.classes.ErrorMessageStyle},v({checkboxLabel:b.checkboxLabel})))}export{t as L}
@@ -1 +1 @@
1
- import{h as t,r as s}from"./p-083180bf.js";import{i,k as n,n as e}from"./p-a7fc1e02.js";import{i as r}from"./p-d0993bb9.js";import{c as l}from"./p-c1086930.js";import{g as o}from"./p-9ec99ced.js";import{c as a}from"./p-cef45012.js";import{E as u}from"./p-49b20dae.js";import{R as c}from"./p-e00ec007.js";var h="(\\d.*)",d="([a-zA-Z].*)",p="([`~\\!@#\\$%\\^\\&\\*\\(\\)\\-_\\=\\+\\[\\{\\}\\]\\\\|;:\\'\",<.>\\/\\?€£¥₹§±].*)",v="([\\s].*)";function m(t,s){if(s&&s>1){const i=parseInt(s,10);return new RegExp(t+"{"+i+",}").test(this.password)===this.positive}return new RegExp(t).test(this.password)===this.positive}var f={not:function(t){return this.positive=!1,!t||m.call(this,t)},has:function(t){return this.positive=!0,!t||m.call(this,t)},is:function(){return this.positive=!0,!0},min:function(t){return this.password.length>=t},max:function(t){return this.password.length<=t},digits:function(t){return m.call(this,h,t)},letters:function(t){return m.call(this,d,t)},uppercase:function(t){if(t&&t>1){let s=0,i=0;for(;i<t&&s<this.password.length;){const t=this.password.charAt(s);t!==t.toLowerCase()&&i++,s++}return i===t===this.positive}return this.password!==this.password.toLowerCase()===this.positive},lowercase:function(t){if(t&&t>1){let s=0,i=0;for(;i<t&&s<this.password.length;){const t=this.password.charAt(s);t!==t.toUpperCase()&&i++,s++}return i===t===this.positive}return this.password!==this.password.toUpperCase()===this.positive},symbols:function(t){return m.call(this,p,t)},spaces:function(t){return m.call(this,v,t)},oneOf:function(t){return t.indexOf(this.password)>=0===this.positive}},g="Length should be a valid positive number";function b(t){const s=Number(t);if(isNaN(s)||!Number.isInteger(s)||s<1)throw new Error(g)}function w(t){return f[t.method].apply(this,t.arguments)}function y(t,s){return this.properties.push({method:t,arguments:s}),this}const x=(new class{constructor(){this.properties=[]}validate(t,s){return this.list=Boolean(s&&s.list),this.password=String(t),this.positive=!0,this.list?this.properties.reduce(((t,s)=>w.call(this,s)?t:t.concat(s.method)),[]):this.properties.every(w.bind(this))}letters(t){return t&&b(t),y.call(this,"letters",arguments)}digits(t){return t&&b(t),y.call(this,"digits",arguments)}symbols(t){return t&&b(t),y.call(this,"symbols",arguments)}min(t){return b(t),y.call(this,"min",arguments)}max(t){return b(t),y.call(this,"max",arguments)}lowercase(t){return t&&b(t),y.call(this,"lowercase",arguments)}uppercase(t){return t&&b(t),y.call(this,"uppercase",arguments)}spaces(t){return t&&b(t),y.call(this,"spaces",arguments)}has(){return y.call(this,"has",arguments)}not(){return y.call(this,"not",arguments)}is(){return y.call(this,"is",arguments)}oneOf(){return y.call(this,"oneOf",arguments)}}).is().min(8).has().uppercase().has().lowercase().has(/([\d`~\!@#\$%\^\&\*\(\)\-_\=\+\[\{\}\]\\\|;:'",<.>\/\?€£¥₹§±].*){1,}/),C=(t,s)=>{const i=x.validate(t,{list:!0});return E(i,t,s)},L=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},t("path",{d:"M6 0C2.688 0 0 2.688 0 6C0 9.312 2.688 12 6 12C9.312 12 12 9.312 12 6C12 2.688 9.312 0 6 0ZM4.8 9L1.8 6L2.646 5.154L4.8 7.302L9.354 2.748L10.2 3.6L4.8 9Z",fill:"#259053"})),j=()=>t("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M6 0C2.688 0 0 2.688 0 6C0 9.312 2.688 12 6 12C9.312 12 12 9.312 12 6C12 2.688 9.312 0 6 0ZM6 10.8C3.354 10.8 1.2 8.646 1.2 6C1.2 3.354 3.354 1.2 6 1.2C8.646 1.2 10.8 3.354 10.8 6C10.8 8.646 8.646 10.8 6 10.8ZM8.754 3.348L4.8 7.302L3.246 5.754L2.4 6.6L4.8 9L9.6 4.2L8.754 3.348Z",fill:"#555555"})),I={display:"flex",alignItems:"center",fontSize:"var(--sl-font-size-small)","& > :not(:last-child)":{"margin-right":"var(--sl-spacing-x-small)"}},k=a({Base:{fontSize:"var(--sl-font-size-small)"},ValidationList:{"list-style-type":"none",paddingRight:"var(--sl-spacing-large)",margin:"var(--sl-spacing-small) 0 var(--sl-spacing-x-large)","& > :not(:last-child)":{"margin-bottom":"var(--sl-spacing-xx-small)"},"& *":{"line-height":"var(--sl-line-height-dense)"}},ValidationItemValid:{...I,color:"var(--sl-color-success-600)"},ValidationItemInvalid:{...I}}),V=k.toString(),E=(s,i,n)=>{const e={min:n.minErrorText,uppercase:n.uppercaseErrorText,lowercase:n.lowercaseErrorText,has:n.hasErrorText};return!s.length&&i?t("div",{class:k.classes.ValidationItemValid,style:{paddingBottom:"var(--sl-spacing-x-large)"}},t("style",{type:"text/css"},V),t(L,null)," ",t("span",null,n.meetsRequirementsText)):t("div",{class:k.classes.Base},t("style",{type:"text/css"},V),n.doesNotMeetRequirementsText,t("ul",{class:k.classes.ValidationList},Object.keys(e).map((i=>s.includes(i)?t("li",{class:k.classes.ValidationItemInvalid},t(j,null)," ",t("span",null,e[i])):t("li",{class:k.classes.ValidationItemValid},t(L,null)," ",t("span",null,e[i]))))))},M=a({InputContainer:{"& > :not(:last-child)":{"margin-bottom":"20px"}},ErrorStyle:u}),S=M.toString();function Z(s){var i,n,e,r,l,o,a,u,c,h;const{states:d,callbacks:p}=s;return t("div",{class:M.classes.InputContainer,part:"sqm-base"},t("style",{type:"text/css"},"\n:host {\n margin: 0 auto;\n width: 100%;\n display: block;\n}\n:host([hidden]): {\n display: none;\n}\n",S),t("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",type:"password",name:"/password",label:d.content.fieldLabel||"Password",required:!0,disabled:(null===(i=d.registrationFormState)||void 0===i?void 0:i.loading)||(null===(n=d.registrationFormState)||void 0===n?void 0:n.disabled),validationError:({value:t})=>{if(!t)return"Cannot be empty"}},(null===(r=null===(e=d.registrationFormState)||void 0===e?void 0:e.initialData)||void 0===r?void 0:r.password)?{value:null===(o=null===(l=d.registrationFormState)||void 0===l?void 0:l.initialData)||void 0===o?void 0:o.password}:{},(null===(u=null===(a=d.registrationFormState)||void 0===a?void 0:a.validationErrors)||void 0===u?void 0:u.password)?{class:M.classes.ErrorStyle,helpText:(null===(h=null===(c=d.registrationFormState)||void 0===c?void 0:c.validationErrors)||void 0===h?void 0:h.password)||"Cannot be empty"}:[],{onInput:t=>d.enableValidation&&p.onInput(t)})),d.dynamicValidation)}const q=class{constructor(t){s(this,t),this.ignored=!0,this.fieldLabel="Password",this.disableValidation=!1,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",e(this)}disconnectedCallback(){}render(){const{states:s,callbacks:e}=r()?function(t){var s,i,e,r,o,a,u;const[c,h]=n(""),[d,p]=n("");if(t.demoData&&d!=(null===(s=null==t?void 0:t.demoData)||void 0===s?void 0:s.initValue)){const s=C((null===(i=null==t?void 0:t.demoData)||void 0===i?void 0:i.initValue)||"",t);h(""===(null===(e=null==t?void 0:t.demoData)||void 0===e?void 0:e.initValue)?"":s),p(null===(r=null==t?void 0:t.demoData)||void 0===r?void 0:r.initValue)}return l({states:{enableValidation:!t.disableValidation,dynamicValidation:c,registrationFormState:(null===(a=null===(o=null==t?void 0:t.demoData)||void 0===o?void 0:o.states)||void 0===a?void 0:a.registrationFormState)||{},content:{fieldLabel:t.fieldLabel}},callbacks:{onInput:function(s){const i=C(s.target.value,t);h(i)}}},(null===(u=null==t?void 0:t.demoData)||void 0===u?void 0:u.states)||{},{arrayMerge:(t,s)=>s})}(o(this)):function(t){const s=i(c),[e,r]=n("");return{states:{enableValidation:!t.disableValidation,dynamicValidation:e,registrationFormState:s,content:{fieldLabel:t.fieldLabel}},callbacks:{onInput:function(s){const i=C(s.target.value,t);r(i)}}}}(o(this));return t(Z,{states:s,callbacks:e})}};export{q as sqm_password_field}
1
+ import{h as t,r as s}from"./p-083180bf.js";import{i,k as n,n as e}from"./p-a7fc1e02.js";import{i as r}from"./p-8a6531d2.js";import{c as l}from"./p-c1086930.js";import{g as a}from"./p-9ec99ced.js";import{c as o}from"./p-cef45012.js";import{E as u}from"./p-49b20dae.js";import{R as c}from"./p-87f86492.js";var h="(\\d.*)",d="([a-zA-Z].*)",p="([`~\\!@#\\$%\\^\\&\\*\\(\\)\\-_\\=\\+\\[\\{\\}\\]\\\\|;:\\'\",<.>\\/\\?€£¥₹§±].*)",v="([\\s].*)";function m(t,s){if(s&&s>1){const i=parseInt(s,10);return new RegExp(t+"{"+i+",}").test(this.password)===this.positive}return new RegExp(t).test(this.password)===this.positive}var f={not:function(t){return this.positive=!1,!t||m.call(this,t)},has:function(t){return this.positive=!0,!t||m.call(this,t)},is:function(){return this.positive=!0,!0},min:function(t){return this.password.length>=t},max:function(t){return this.password.length<=t},digits:function(t){return m.call(this,h,t)},letters:function(t){return m.call(this,d,t)},uppercase:function(t){if(t&&t>1){let s=0,i=0;for(;i<t&&s<this.password.length;){const t=this.password.charAt(s);t!==t.toLowerCase()&&i++,s++}return i===t===this.positive}return this.password!==this.password.toLowerCase()===this.positive},lowercase:function(t){if(t&&t>1){let s=0,i=0;for(;i<t&&s<this.password.length;){const t=this.password.charAt(s);t!==t.toUpperCase()&&i++,s++}return i===t===this.positive}return this.password!==this.password.toUpperCase()===this.positive},symbols:function(t){return m.call(this,p,t)},spaces:function(t){return m.call(this,v,t)},oneOf:function(t){return t.indexOf(this.password)>=0===this.positive}},g="Length should be a valid positive number";function b(t){const s=Number(t);if(isNaN(s)||!Number.isInteger(s)||s<1)throw new Error(g)}function w(t){return f[t.method].apply(this,t.arguments)}function y(t,s){return this.properties.push({method:t,arguments:s}),this}const x=(new class{constructor(){this.properties=[]}validate(t,s){return this.list=Boolean(s&&s.list),this.password=String(t),this.positive=!0,this.list?this.properties.reduce(((t,s)=>w.call(this,s)?t:t.concat(s.method)),[]):this.properties.every(w.bind(this))}letters(t){return t&&b(t),y.call(this,"letters",arguments)}digits(t){return t&&b(t),y.call(this,"digits",arguments)}symbols(t){return t&&b(t),y.call(this,"symbols",arguments)}min(t){return b(t),y.call(this,"min",arguments)}max(t){return b(t),y.call(this,"max",arguments)}lowercase(t){return t&&b(t),y.call(this,"lowercase",arguments)}uppercase(t){return t&&b(t),y.call(this,"uppercase",arguments)}spaces(t){return t&&b(t),y.call(this,"spaces",arguments)}has(){return y.call(this,"has",arguments)}not(){return y.call(this,"not",arguments)}is(){return y.call(this,"is",arguments)}oneOf(){return y.call(this,"oneOf",arguments)}}).is().min(8).has().uppercase().has().lowercase().has(/([\d`~\!@#\$%\^\&\*\(\)\-_\=\+\[\{\}\]\\\|;:'",<.>\/\?€£¥₹§±].*){1,}/),C=(t,s)=>{const i=x.validate(t,{list:!0});return E(i,t,s)},L=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},t("path",{d:"M6 0C2.688 0 0 2.688 0 6C0 9.312 2.688 12 6 12C9.312 12 12 9.312 12 6C12 2.688 9.312 0 6 0ZM4.8 9L1.8 6L2.646 5.154L4.8 7.302L9.354 2.748L10.2 3.6L4.8 9Z",fill:"#259053"})),j=()=>t("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M6 0C2.688 0 0 2.688 0 6C0 9.312 2.688 12 6 12C9.312 12 12 9.312 12 6C12 2.688 9.312 0 6 0ZM6 10.8C3.354 10.8 1.2 8.646 1.2 6C1.2 3.354 3.354 1.2 6 1.2C8.646 1.2 10.8 3.354 10.8 6C10.8 8.646 8.646 10.8 6 10.8ZM8.754 3.348L4.8 7.302L3.246 5.754L2.4 6.6L4.8 9L9.6 4.2L8.754 3.348Z",fill:"#555555"})),I={display:"flex",alignItems:"center",fontSize:"var(--sl-font-size-small)","& > :not(:last-child)":{"margin-right":"var(--sl-spacing-x-small)"}},k=o({Base:{fontSize:"var(--sl-font-size-small)"},ValidationList:{"list-style-type":"none",paddingRight:"var(--sl-spacing-large)",margin:"var(--sl-spacing-small) 0 var(--sl-spacing-x-large)","& > :not(:last-child)":{"margin-bottom":"var(--sl-spacing-xx-small)"},"& *":{"line-height":"var(--sl-line-height-dense)"}},ValidationItemValid:{...I,color:"var(--sl-color-success-600)"},ValidationItemInvalid:{...I}}),V=k.toString(),E=(s,i,n)=>{const e={min:n.minErrorText,uppercase:n.uppercaseErrorText,lowercase:n.lowercaseErrorText,has:n.hasErrorText};return!s.length&&i?t("div",{class:k.classes.ValidationItemValid,style:{paddingBottom:"var(--sl-spacing-x-large)"}},t("style",{type:"text/css"},V),t(L,null)," ",t("span",null,n.meetsRequirementsText)):t("div",{class:k.classes.Base},t("style",{type:"text/css"},V),n.doesNotMeetRequirementsText,t("ul",{class:k.classes.ValidationList},Object.keys(e).map((i=>s.includes(i)?t("li",{class:k.classes.ValidationItemInvalid},t(j,null)," ",t("span",null,e[i])):t("li",{class:k.classes.ValidationItemValid},t(L,null)," ",t("span",null,e[i]))))))},M=o({InputContainer:{"& > :not(:last-child)":{"margin-bottom":"20px"}},ErrorStyle:u}),S=M.toString();function Z(s){var i,n,e,r,l,a,o,u,c,h;const{states:d,callbacks:p}=s;return t("div",{class:M.classes.InputContainer,part:"sqm-base"},t("style",{type:"text/css"},"\n:host {\n margin: 0 auto;\n width: 100%;\n display: block;\n}\n:host([hidden]): {\n display: none;\n}\n",S),t("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",type:"password",name:"/password",label:d.content.fieldLabel||"Password",required:!0,disabled:(null===(i=d.registrationFormState)||void 0===i?void 0:i.loading)||(null===(n=d.registrationFormState)||void 0===n?void 0:n.disabled),validationError:({value:t})=>{if(!t)return"Cannot be empty"}},(null===(r=null===(e=d.registrationFormState)||void 0===e?void 0:e.initialData)||void 0===r?void 0:r.password)?{value:null===(a=null===(l=d.registrationFormState)||void 0===l?void 0:l.initialData)||void 0===a?void 0:a.password}:{},(null===(u=null===(o=d.registrationFormState)||void 0===o?void 0:o.validationErrors)||void 0===u?void 0:u.password)?{class:M.classes.ErrorStyle,helpText:(null===(h=null===(c=d.registrationFormState)||void 0===c?void 0:c.validationErrors)||void 0===h?void 0:h.password)||"Cannot be empty"}:[],{onInput:t=>d.enableValidation&&p.onInput(t)})),d.dynamicValidation)}const q=class{constructor(t){s(this,t),this.ignored=!0,this.fieldLabel="Password",this.disableValidation=!1,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",e(this)}disconnectedCallback(){}render(){const{states:s,callbacks:e}=r()?function(t){var s,i,e,r,a,o,u;const[c,h]=n(""),[d,p]=n("");if(t.demoData&&d!=(null===(s=null==t?void 0:t.demoData)||void 0===s?void 0:s.initValue)){const s=C((null===(i=null==t?void 0:t.demoData)||void 0===i?void 0:i.initValue)||"",t);h(""===(null===(e=null==t?void 0:t.demoData)||void 0===e?void 0:e.initValue)?"":s),p(null===(r=null==t?void 0:t.demoData)||void 0===r?void 0:r.initValue)}return l({states:{enableValidation:!t.disableValidation,dynamicValidation:c,registrationFormState:(null===(o=null===(a=null==t?void 0:t.demoData)||void 0===a?void 0:a.states)||void 0===o?void 0:o.registrationFormState)||{},content:{fieldLabel:t.fieldLabel}},callbacks:{onInput:function(s){const i=C(s.target.value,t);h(i)}}},(null===(u=null==t?void 0:t.demoData)||void 0===u?void 0:u.states)||{},{arrayMerge:(t,s)=>s})}(a(this)):function(t){const s=i(c),[e,r]=n("");return{states:{enableValidation:!t.disableValidation,dynamicValidation:e,registrationFormState:s,content:{fieldLabel:t.fieldLabel}},callbacks:{onInput:function(s){const i=C(s.target.value,t);r(i)}}}}(a(this));return t(Z,{states:s,callbacks:e})}};export{q as sqm_password_field}
@@ -0,0 +1 @@
1
+ const a="sq:code-verification",e="sq:show-partner-modal",s="sq:partner-created",i="sq:verification-email",o="sq:verification-context",r="sq:code-verified";export{s as P,a as S,o as V,i as a,e as b,r as c}
@@ -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,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]}return e};return __assign.apply(this,arguments)};System.register(["./p-641f968d.system.js","./p-7265bbcb.system.js","./p-b6504987.system.js","./p-30c1ef36.system.js","./p-4bd679a7.system.js","./p-6333265f.system.js","./p-1a673057.system.js","./p-7562cd98.system.js","./p-43c31fd5.system.js","./p-5b1d2866.system.js"],(function(e){"use strict";var t,n,i,r,s,a,o,u,l,d,m,f,c,v;return{setters:[function(e){t=e.r;n=e.h},function(){},function(e){i=e.k;r=e.f;s=e.n},function(e){a=e.d;o=e.J;u=e.w;l=e.$;d=e.i},function(e){m=e.c},function(e){f=e.g},function(){},function(){},function(e){c=e.P},function(e){v=e.i}],execute:function(){var g=a.gql(__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 _=a.gql(__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 h={country:"",email:"",firstName:"",lastName:"",errors:{},error:""};function p(e){var t=o();var n=i(false),s=n[0],a=n[1];var d=i(undefined),m=d[0],f=d[1];var c=i(h),p=c[0],y=c[1];var b=u(g,{},!(t===null||t===void 0?void 0:t.jwt));var x=l(_),N=x[0],S=x[1];r((function(){if(S===null||S===void 0?void 0:S.loading)return;if(S===null||S===void 0?void 0:S.errors){y((function(e){var t,n,i;return __assign(__assign({},e),{error:(i=(n=(t=S===null||S===void 0?void 0:S.errors)===null||t===void 0?void 0:t.response)===null||n===void 0?void 0:n.errors)===null||i===void 0?void 0:i[0].message})}))}else{f((function(e){var t;return __assign(__assign({},e),(t=S===null||S===void 0?void 0:S.data)===null||t===void 0?void 0:t.upsertUser)}));if(S===null||S===void 0?void 0:S.data)a(true)}}),[S===null||S===void 0?void 0:S.loading]);r((function(){var e,t;f((function(e){var t;return __assign(__assign({},e),(t=b===null||b===void 0?void 0:b.data)===null||t===void 0?void 0:t.viewer)}));y(__assign(__assign(__assign({},h),(e=b.data)===null||e===void 0?void 0:e.viewer),(t=S.data)===null||t===void 0?void 0:t.upsertUser))}),[b===null||b===void 0?void 0:b.data]);r((function(){var t,n;if((t=S===null||S===void 0?void 0:S.errors)===null||t===void 0?void 0:t.message){y(__assign(__assign({},(n=b.data)===null||n===void 0?void 0:n.viewer),{error:e.networkRequestMessage}))}}),[S===null||S===void 0?void 0:S.errors]);var j=function(){a(false);if(p.firstName&&p.lastName){N({id:t===null||t===void 0?void 0:t.id,accountId:t===null||t===void 0?void 0:t.accountId,firstName:p.firstName,lastName:p.lastName});y((function(e){return __assign(__assign({},e),{errors:{},error:""})}));return}var n={};if(!p.firstName){n["firstName"]={message:e.fieldEmptyText}}if(!p.lastName){n["lastName"]={message:e.fieldEmptyText}}if(!v(n)){y((function(t){return __assign(__assign({},t),{error:e.formErrorText})}))}y((function(e){return __assign(__assign({},e),{errors:n})}))};return{states:{success:s,loading:(b===null||b===void 0?void 0:b.loading)||S.loading,submitDisabled:false,showCountry:!e.hideCountry,formState:p,user:m,text:{firstnametext:e.firstnametext,lastnametext:e.lastnametext,countrytext:e.countrytext,emailtext:e.emailtext,editProfileHeader:e.editProfileHeader,editProfileSubHeader:e.editProfileSubHeader,submitChangeButtonText:e.submitChangeButtonText}},callbacks:{onSubmit:j,onChange:function(e){var t=e.target,n=t.name,i=t.value;y((function(e){var t;return __assign(__assign({},e),(t={},t[n]=i,t))}))}}}}var y=e("sqm_portal_profile",function(){function e(e){t(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.";s(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=d()?b(f(this)):p(f(this));return n(c,Object.assign({},e))};return e}());function b(e){return m({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}})}}}}));
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,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]}return e};return __assign.apply(this,arguments)};System.register(["./p-641f968d.system.js","./p-8e148cb0.system.js","./p-b6504987.system.js","./p-2190dc73.system.js","./p-4bd679a7.system.js","./p-6333265f.system.js","./p-1a673057.system.js","./p-7562cd98.system.js","./p-7628e56f.system.js","./p-badf28bb.system.js"],(function(e){"use strict";var t,n,i,r,s,a,o,u,l,d,m,f,c,v;return{setters:[function(e){t=e.r;n=e.h},function(){},function(e){i=e.k;r=e.f;s=e.n},function(e){a=e.d;o=e.J;u=e.w;l=e.$;d=e.i},function(e){m=e.c},function(e){f=e.g},function(){},function(){},function(e){c=e.P},function(e){v=e.i}],execute:function(){var g=a.gql(__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 _=a.gql(__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 h={country:"",email:"",firstName:"",lastName:"",errors:{},error:""};function p(e){var t=o();var n=i(false),s=n[0],a=n[1];var d=i(undefined),m=d[0],f=d[1];var c=i(h),p=c[0],y=c[1];var b=u(g,{},!(t===null||t===void 0?void 0:t.jwt));var x=l(_),N=x[0],S=x[1];r((function(){if(S===null||S===void 0?void 0:S.loading)return;if(S===null||S===void 0?void 0:S.errors){y((function(e){var t,n,i;return __assign(__assign({},e),{error:(i=(n=(t=S===null||S===void 0?void 0:S.errors)===null||t===void 0?void 0:t.response)===null||n===void 0?void 0:n.errors)===null||i===void 0?void 0:i[0].message})}))}else{f((function(e){var t;return __assign(__assign({},e),(t=S===null||S===void 0?void 0:S.data)===null||t===void 0?void 0:t.upsertUser)}));if(S===null||S===void 0?void 0:S.data)a(true)}}),[S===null||S===void 0?void 0:S.loading]);r((function(){var e,t;f((function(e){var t;return __assign(__assign({},e),(t=b===null||b===void 0?void 0:b.data)===null||t===void 0?void 0:t.viewer)}));y(__assign(__assign(__assign({},h),(e=b.data)===null||e===void 0?void 0:e.viewer),(t=S.data)===null||t===void 0?void 0:t.upsertUser))}),[b===null||b===void 0?void 0:b.data]);r((function(){var t,n;if((t=S===null||S===void 0?void 0:S.errors)===null||t===void 0?void 0:t.message){y(__assign(__assign({},(n=b.data)===null||n===void 0?void 0:n.viewer),{error:e.networkRequestMessage}))}}),[S===null||S===void 0?void 0:S.errors]);var j=function(){a(false);if(p.firstName&&p.lastName){N({id:t===null||t===void 0?void 0:t.id,accountId:t===null||t===void 0?void 0:t.accountId,firstName:p.firstName,lastName:p.lastName});y((function(e){return __assign(__assign({},e),{errors:{},error:""})}));return}var n={};if(!p.firstName){n["firstName"]={message:e.fieldEmptyText}}if(!p.lastName){n["lastName"]={message:e.fieldEmptyText}}if(!v(n)){y((function(t){return __assign(__assign({},t),{error:e.formErrorText})}))}y((function(e){return __assign(__assign({},e),{errors:n})}))};return{states:{success:s,loading:(b===null||b===void 0?void 0:b.loading)||S.loading,submitDisabled:false,showCountry:!e.hideCountry,formState:p,user:m,text:{firstnametext:e.firstnametext,lastnametext:e.lastnametext,countrytext:e.countrytext,emailtext:e.emailtext,editProfileHeader:e.editProfileHeader,editProfileSubHeader:e.editProfileSubHeader,submitChangeButtonText:e.submitChangeButtonText}},callbacks:{onSubmit:j,onChange:function(e){var t=e.target,n=t.name,i=t.value;y((function(e){var t;return __assign(__assign({},e),(t={},t[n]=i,t))}))}}}}var y=e("sqm_portal_profile",function(){function e(e){t(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.";s(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=d()?b(f(this)):p(f(this));return n(c,Object.assign({},e))};return e}());function b(e){return m({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}})}}}}));