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

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 (238) hide show
  1. package/dist/cjs/IndirectTaxDetailsView-d0290a12.js +646 -0
  2. package/dist/cjs/{ShadowViewAddon-fcd0c52f.js → ShadowViewAddon-9cb7a310.js} +1010 -1062
  3. package/dist/cjs/data-6d96b89c.js +137 -0
  4. package/dist/cjs/{email-registration-view-37b44222.js → email-registration-view-dca94dc9.js} +1 -1
  5. package/dist/cjs/{global-a38a094f.js → global-d62c5561.js} +13 -12
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/cjs/mint-components.cjs.js +2 -2
  8. package/dist/cjs/parseStates-d1effc19.js +16 -0
  9. package/dist/cjs/{sqm-banking-info-form_17.cjs.entry.js → sqm-banking-info-form_10.cjs.entry.js} +211 -1888
  10. package/dist/cjs/{sqm-big-stat_41.cjs.entry.js → sqm-big-stat_42.cjs.entry.js} +290 -10
  11. package/dist/cjs/sqm-code-verification.cjs.entry.js +348 -0
  12. package/dist/cjs/sqm-email-verification.cjs.entry.js +1 -1
  13. package/dist/cjs/sqm-empty_4.cjs.entry.js +1 -1
  14. package/dist/cjs/sqm-instant-access-registration.cjs.entry.js +2 -2
  15. package/dist/cjs/sqm-invoice-table-data-cell_5.cjs.entry.js +84 -0
  16. package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +1 -1
  17. package/dist/cjs/sqm-pagination_3.cjs.entry.js +1 -1
  18. package/dist/cjs/{sqm-portal-email-verification-view-26c893d3.js → sqm-portal-email-verification-view-156accab.js} +1 -1
  19. package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +2 -2
  20. package/dist/cjs/{sqm-portal-profile-view-674a7543.js → sqm-portal-profile-view-f226725e.js} +1 -1
  21. package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
  22. package/dist/cjs/sqm-referral-table_11.cjs.entry.js +1 -1
  23. package/dist/cjs/sqm-referred-registration.cjs.entry.js +1 -1
  24. package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +1 -1
  25. package/dist/cjs/sqm-stencilbook.cjs.entry.js +11185 -9987
  26. package/dist/cjs/sqm-tax-and-cash.cjs.entry.js +1221 -0
  27. package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +11 -3
  28. package/dist/cjs/sqm-widget-verification.cjs.entry.js +17 -6
  29. package/dist/cjs/{usePayoutStatus-4b5894ef.js → usePayoutStatus-feeac99b.js} +8 -5
  30. package/dist/cjs/utils-ce18d1bc.js +105 -0
  31. package/dist/collection/collection-manifest.json +1 -0
  32. package/dist/collection/components/sqm-instant-access-registration/sqm-instant-access-registration.js +2 -2
  33. package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js +3 -3
  34. package/dist/collection/components/sqm-referral-card/sqm-referral-card-view.js +3 -3
  35. package/dist/collection/components/sqm-stencilbook/BrandSelector.js +179 -0
  36. package/dist/collection/components/sqm-stencilbook/Themes.js +21 -17
  37. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +82 -98
  38. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +33 -3
  39. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-controller.js +39 -5
  40. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +41 -6
  41. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +12 -8
  42. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +1 -1
  43. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +2 -2
  44. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +1 -1
  45. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +1 -1
  46. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.js +1 -1
  47. package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +2 -2
  48. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.js +2 -2
  49. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +1 -1
  50. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +2 -2
  51. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +26 -1
  52. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/usePayoutDetailsCard.js +2 -2
  53. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +8 -5
  54. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +77 -28
  55. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +1 -1
  56. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +62 -3
  57. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +3 -3
  58. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +5 -4
  59. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +49 -11
  60. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +3 -3
  61. package/dist/collection/components/views/email-registration-view.js +1 -1
  62. package/dist/collection/global/styles.js +13 -12
  63. package/dist/collection/global/styles.ts +26 -12
  64. package/dist/collection/utils/parseStates.js +12 -0
  65. package/dist/esm/IndirectTaxDetailsView-3be86bcf.js +639 -0
  66. package/dist/esm/{ShadowViewAddon-5f9b6d07.js → ShadowViewAddon-d8cfd6c7.js} +1013 -1064
  67. package/dist/esm/data-a05c78ae.js +121 -0
  68. package/dist/esm/{email-registration-view-b1c858ee.js → email-registration-view-8782c01b.js} +1 -1
  69. package/dist/esm/{global-66746c30.js → global-632fb2fa.js} +13 -12
  70. package/dist/esm/loader.js +2 -2
  71. package/dist/esm/mint-components.js +2 -2
  72. package/dist/esm/parseStates-ed75e224.js +14 -0
  73. package/dist/esm/{sqm-banking-info-form_17.entry.js → sqm-banking-info-form_10.entry.js} +135 -1805
  74. package/dist/esm/{sqm-big-stat_41.entry.js → sqm-big-stat_42.entry.js} +294 -15
  75. package/dist/esm/sqm-code-verification.entry.js +344 -0
  76. package/dist/esm/sqm-email-verification.entry.js +1 -1
  77. package/dist/esm/sqm-empty_4.entry.js +1 -1
  78. package/dist/esm/sqm-instant-access-registration.entry.js +2 -2
  79. package/dist/esm/sqm-invoice-table-data-cell_5.entry.js +76 -0
  80. package/dist/esm/sqm-leaderboard-rank.entry.js +1 -1
  81. package/dist/esm/sqm-pagination_3.entry.js +1 -1
  82. package/dist/esm/{sqm-portal-email-verification-view-00f03873.js → sqm-portal-email-verification-view-24ea7b3c.js} +1 -1
  83. package/dist/esm/sqm-portal-email-verification.entry.js +2 -2
  84. package/dist/esm/{sqm-portal-profile-view-0d45de87.js → sqm-portal-profile-view-9b4d7ec1.js} +1 -1
  85. package/dist/esm/sqm-portal-profile.entry.js +2 -2
  86. package/dist/esm/sqm-referral-table_11.entry.js +1 -1
  87. package/dist/esm/sqm-referred-registration.entry.js +1 -1
  88. package/dist/esm/sqm-rewards-table_9.entry.js +1 -1
  89. package/dist/esm/sqm-stencilbook.entry.js +12093 -10895
  90. package/dist/esm/sqm-tax-and-cash.entry.js +1217 -0
  91. package/dist/esm/sqm-widget-verification-controller.entry.js +12 -4
  92. package/dist/esm/sqm-widget-verification.entry.js +17 -6
  93. package/dist/esm/{usePayoutStatus-58aa56b4.js → usePayoutStatus-fed17fc9.js} +8 -5
  94. package/dist/esm/utils-1654e233.js +97 -0
  95. package/dist/esm-es5/IndirectTaxDetailsView-3be86bcf.js +1 -0
  96. package/dist/esm-es5/ShadowViewAddon-d8cfd6c7.js +1 -0
  97. package/dist/esm-es5/data-a05c78ae.js +1 -0
  98. package/dist/esm-es5/email-registration-view-8782c01b.js +1 -0
  99. package/dist/esm-es5/{global-66746c30.js → global-632fb2fa.js} +5 -5
  100. package/dist/esm-es5/loader.js +1 -1
  101. package/dist/esm-es5/mint-components.js +1 -1
  102. package/dist/esm-es5/parseStates-ed75e224.js +1 -0
  103. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -0
  104. package/dist/esm-es5/sqm-big-stat_42.entry.js +1 -0
  105. package/dist/esm-es5/sqm-code-verification.entry.js +1 -0
  106. package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
  107. package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
  108. package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
  109. package/dist/esm-es5/sqm-invoice-table-data-cell_5.entry.js +1 -0
  110. package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
  111. package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
  112. package/dist/esm-es5/{sqm-portal-email-verification-view-00f03873.js → sqm-portal-email-verification-view-24ea7b3c.js} +1 -1
  113. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  114. package/dist/esm-es5/{sqm-portal-profile-view-0d45de87.js → sqm-portal-profile-view-9b4d7ec1.js} +1 -1
  115. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  116. package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
  117. package/dist/esm-es5/sqm-referred-registration.entry.js +1 -1
  118. package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
  119. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  120. package/dist/esm-es5/sqm-tax-and-cash.entry.js +1 -0
  121. package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
  122. package/dist/esm-es5/sqm-widget-verification.entry.js +1 -1
  123. package/dist/esm-es5/{usePayoutStatus-58aa56b4.js → usePayoutStatus-fed17fc9.js} +2 -2
  124. package/dist/esm-es5/utils-1654e233.js +1 -0
  125. package/dist/mint-components/global/styles.ts +26 -12
  126. package/dist/mint-components/mint-components.esm.js +1 -1
  127. package/dist/mint-components/mint-components.js +1 -1
  128. package/dist/mint-components/p-06ce54e2.entry.js +258 -0
  129. package/dist/mint-components/p-0984523b.js +1 -0
  130. package/dist/mint-components/p-0a37a288.system.entry.js +1 -0
  131. package/dist/mint-components/{p-77b8a529.system.entry.js → p-0a8a6d45.system.entry.js} +1 -1
  132. package/dist/mint-components/p-115dfc03.system.js +1 -0
  133. package/dist/mint-components/{p-480e08e9.js → p-11dff275.js} +2 -2
  134. package/dist/mint-components/{p-770bba1b.system.entry.js → p-12e61414.system.entry.js} +1 -1
  135. package/dist/mint-components/p-13f3a647.js +1 -0
  136. package/dist/mint-components/p-155cf177.system.js +1 -0
  137. package/dist/mint-components/{p-dded7d43.entry.js → p-1878da9b.entry.js} +2 -2
  138. package/dist/mint-components/p-2cfe9826.system.entry.js +1 -0
  139. package/dist/mint-components/{p-210e8f49.entry.js → p-2df6ce8f.entry.js} +1 -1
  140. package/dist/mint-components/{p-cfa34cf2.system.js → p-33f640f6.system.js} +1 -1
  141. package/dist/mint-components/{p-241d68d4.system.entry.js → p-450a7705.system.entry.js} +1 -1
  142. package/dist/mint-components/p-4841c5e9.system.entry.js +1 -0
  143. package/dist/mint-components/p-4bb1c4b2.system.js +1 -0
  144. package/dist/mint-components/p-4cbd7eec.js +394 -0
  145. package/dist/mint-components/{p-9fe574ca.system.entry.js → p-51aa8c38.system.entry.js} +1 -1
  146. package/dist/mint-components/p-52d15f87.system.js +1 -0
  147. package/dist/mint-components/p-5510be1e.system.entry.js +1 -0
  148. package/dist/mint-components/{p-71f23364.entry.js → p-66d22d46.entry.js} +1 -1
  149. package/dist/mint-components/p-674b82ac.js +1 -0
  150. package/dist/mint-components/p-6ef506ba.entry.js +16 -0
  151. package/dist/mint-components/{p-c024fc32.system.entry.js → p-6fa624ff.system.entry.js} +1 -1
  152. package/dist/mint-components/{p-d932f43d.entry.js → p-704f162e.entry.js} +1 -1
  153. package/dist/mint-components/p-70fddbdd.entry.js +11 -0
  154. package/dist/mint-components/p-780b981b.entry.js +1 -0
  155. package/dist/mint-components/{p-4caaf25a.js → p-7adb141e.js} +1 -1
  156. package/dist/mint-components/p-7b731acd.entry.js +93 -0
  157. package/dist/mint-components/{p-884ac29e.system.entry.js → p-846aff6a.system.entry.js} +1 -1
  158. package/dist/mint-components/p-84a78d09.entry.js +1 -0
  159. package/dist/mint-components/{p-3f290d24.system.js → p-96e339f6.system.js} +11 -11
  160. package/dist/mint-components/p-9711efb7.entry.js +1 -0
  161. package/dist/mint-components/{p-cc7af682.system.js → p-9721a29a.system.js} +2 -2
  162. package/dist/mint-components/{p-b0d4938a.system.entry.js → p-9d41d676.system.entry.js} +1 -1
  163. package/dist/mint-components/{p-d9335f16.js → p-a1e17fd2.js} +1 -1
  164. package/dist/mint-components/p-a27a15c5.system.entry.js +1 -0
  165. package/dist/mint-components/{p-0bdeab70.system.js → p-a3383f54.system.js} +1 -1
  166. package/dist/mint-components/{p-0eb3d919.system.entry.js → p-a91e7c05.system.entry.js} +1 -1
  167. package/dist/mint-components/p-b73a4df4.entry.js +33 -0
  168. package/dist/mint-components/p-be89074c.entry.js +1 -0
  169. package/dist/mint-components/p-c0b07067.system.js +1 -0
  170. package/dist/mint-components/p-c1b1f8ae.system.entry.js +1 -0
  171. package/dist/mint-components/p-c75a3b4a.js +103 -0
  172. package/dist/mint-components/p-c9745c8f.system.js +1 -0
  173. package/dist/mint-components/{p-1abe7884.system.entry.js → p-cf157c6e.system.entry.js} +1 -1
  174. package/dist/mint-components/{p-5366850e.entry.js → p-da71337b.entry.js} +1 -1
  175. package/dist/mint-components/{p-015da96d.entry.js → p-dbb83730.entry.js} +1 -1
  176. package/dist/mint-components/{p-4f22fda2.js → p-dc293b10.js} +1 -1
  177. package/dist/mint-components/{p-8e93e590.entry.js → p-df223bff.entry.js} +1 -1
  178. package/dist/mint-components/{p-e80f9e26.system.entry.js → p-e217afd9.system.entry.js} +1 -1
  179. package/dist/mint-components/{p-fe6fe9cf.entry.js → p-e5d9e709.entry.js} +2 -2
  180. package/dist/mint-components/p-eb998f7b.entry.js +9 -0
  181. package/dist/mint-components/p-f53f5304.system.entry.js +1 -0
  182. package/dist/mint-components/p-f8175201.system.js +1 -0
  183. package/dist/mint-components/p-fb13065a.js +1 -0
  184. package/dist/mint-components/p-fda43e22.system.entry.js +1 -0
  185. package/dist/types/components/sqm-stencilbook/BrandSelector.d.ts +6 -0
  186. package/dist/types/components/sqm-stencilbook/Themes.d.ts +4 -5
  187. package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.d.ts +5 -0
  188. package/dist/types/components/sqm-widget-verification/sqm-widget-verification-controller.d.ts +5 -0
  189. package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +5 -0
  190. package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +0 -1
  191. package/dist/types/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.d.ts +1 -1
  192. package/dist/types/components/tax-and-cash/sqm-docusign-form/useDocusignForm.d.ts +2 -2
  193. package/dist/types/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.d.ts +4 -0
  194. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +1 -1
  195. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +10 -4
  196. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.d.ts +1 -1
  197. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +1 -1
  198. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +10 -0
  199. package/dist/types/components/tax-and-cash/sqm-user-info-form/small-views/IndirectTaxDetailsView.d.ts +1 -1
  200. package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.d.ts +7 -0
  201. package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +1 -1
  202. package/dist/types/components/tax-and-cash/utils.d.ts +1 -1
  203. package/dist/types/components.d.ts +107 -7
  204. package/dist/types/global/styles.d.ts +6 -1
  205. package/dist/types/saasquatch.d.ts +61 -0
  206. package/dist/types/utils/parseStates.d.ts +1 -0
  207. package/docs/docs.docx +0 -0
  208. package/docs/raisins.json +1 -1
  209. package/grapesjs/grapesjs.js +1 -1
  210. package/package.json +2 -1
  211. package/dist/cjs/sqm-invoice-table-view-19ca10fa.js +0 -2038
  212. package/dist/esm/sqm-invoice-table-view-b7e91eef.js +0 -2022
  213. package/dist/esm-es5/ShadowViewAddon-5f9b6d07.js +0 -1
  214. package/dist/esm-es5/email-registration-view-b1c858ee.js +0 -1
  215. package/dist/esm-es5/sqm-banking-info-form_17.entry.js +0 -1
  216. package/dist/esm-es5/sqm-big-stat_41.entry.js +0 -1
  217. package/dist/esm-es5/sqm-invoice-table-view-b7e91eef.js +0 -1
  218. package/dist/mint-components/p-0480b155.system.entry.js +0 -1
  219. package/dist/mint-components/p-33c96e14.entry.js +0 -16
  220. package/dist/mint-components/p-3e604cad.js +0 -1
  221. package/dist/mint-components/p-5cd684b2.entry.js +0 -9
  222. package/dist/mint-components/p-6427e963.entry.js +0 -1
  223. package/dist/mint-components/p-6798d563.system.js +0 -1
  224. package/dist/mint-components/p-693fc880.system.js +0 -1
  225. package/dist/mint-components/p-6c1d0367.entry.js +0 -33
  226. package/dist/mint-components/p-72ff8268.js +0 -1
  227. package/dist/mint-components/p-8530290b.entry.js +0 -258
  228. package/dist/mint-components/p-9cf80e85.system.entry.js +0 -1
  229. package/dist/mint-components/p-a1091368.system.js +0 -1
  230. package/dist/mint-components/p-a68932b0.system.entry.js +0 -1
  231. package/dist/mint-components/p-af96b482.entry.js +0 -205
  232. package/dist/mint-components/p-bf25f63a.js +0 -394
  233. package/dist/mint-components/p-c36506f6.system.entry.js +0 -1
  234. package/dist/mint-components/p-d0064d54.system.entry.js +0 -1
  235. package/dist/mint-components/p-d5e9906e.system.js +0 -1
  236. package/dist/mint-components/p-f0fdbd82.entry.js +0 -1
  237. /package/dist/collection/components/tax-and-cash/{sqm-tax-and-cash/data.js → data.js} +0 -0
  238. /package/dist/types/components/tax-and-cash/{sqm-tax-and-cash/data.d.ts → data.d.ts} +0 -0
@@ -1 +1 @@
1
- import{r as e,h as t,g as a,c as r}from"./p-f708da7b.js";import{n as s,j as l,u as n,f as i}from"./p-cd651f81.js";import{i as o}from"./p-4f22fda2.js";import{i as d}from"./p-94a876b9.js";import{c}from"./p-c1086930.js";import{l as u}from"./p-9ec99ced.js";import{c as E}from"./p-cef45012.js";import"./p-49b20dae.js";import{G as p}from"./p-de136dd3.js";import{a as v,u as h}from"./p-4e451f75.js";import{u as m}from"./p-19ccb4ce.js";import{l as N}from"./p-5bedb58c.js";import{g as P}from"./p-726a9924.js";import{u as I,t as A}from"./p-c0f19490.js";import{T as _}from"./p-e309a219.js";const f=[["AVAILABLE"],["PENDING"],["CANCELLED"],["EXPIRED"],["REDEEMED"]],D=["Rajesh","Pierre","Ji-Ho","Chinua","Charleston","Sally","Gael","Jill","Jane","Khadija"],g=["Smith","Parker","Kent","Chew","Stark","Banner","Jones","Odinson","Pym","Rogers"],y=class{constructor(t){e(this,t),this.perPage=4,this.hideLabels=!1,this.prevLabel="Prev",this.moreLabel="Next",this.showReferrer=!1,this.hiddenColumns="0",this.smBreakpoint=599,this.mdBreakpoint=799,s(this)}disconnectedCallback(){}render(){const e=t(R,null),a=t(b,null),{states:r,data:s,callbacks:o,elements:u}=d()?function(e,t,a){const[r,s]=l(((e,t)=>({...e,...t})),{columns:[],rows:[],loading:!1,page:0}),o=h(),d=n((()=>{var t;return(null===(t=e.demoData)||void 0===t?void 0:t.mockData)||((e=4)=>({totalCount:6,count:e,referredByReferral:{dateConverted:null,dateReferralStarted:1643912659850,referrerUser:{firstName:"John",lastName:"Snow",rewards:[]}},data:[...Array(e)].map((()=>({id:"5cae6b0fcc540e209db45b53",referredUser:{id:"5cae6b0ce4b0d81c67b78e82",accountId:"SPX1MZBIPTFL3E1H",firstName:D[Math.floor(Math.random()*D.length)],lastName:g[Math.floor(Math.random()*g.length)],email:"example.uexwltgh@mailosaur.io",programGoals:[]},shareLinkUsed:null,referralCodeUsed:"JIMBONEUTRON2",moderationStatus:"PENDING",dateConverted:Math.floor(10*Math.random())>=5?N.DateTime.now().minus({days:6}).toMillis():null,dateFraudChecksCompleted:null,dateModerated:1558730033306,dateModified:1554934543447,dateReferralEnded:null,dateReferralPaid:null,dateReferralStarted:N.DateTime.now().minus({days:8}).toMillis(),dateUserModified:null,programId:"sam-partner-test-2",program:{id:"sam-partner-test-2",name:"Partner Program 2.0"},rewards:Math.floor(10*Math.random())>=5?[{id:"5cae6b16cc540e209db45cfa",type:"CREDIT",value:1,unit:"POINT",name:"Partner Reward",dateGiven:1554934550726,dateExpires:null,dateCancelled:null,dateRedeemed:1637004373582,dateScheduledFor:null,fuelTankCode:null,fuelTankType:null,currency:null,prettyValue:"1 Point",statuses:f[Math.floor(Math.random()*f.length)],globalRewardKey:null,programRewardKey:"partnerReward",meta:{...P()},rewardRedemptionTransactions:{data:[{exchangedRewards:{data:[{prettyValue:"CAD10.00 Visa* Prepaid Card CAD",type:"INTEGRATION",fuelTankCode:null,globalRewardKey:"gc1"}]}}]}}]:[],childNodes:{data:[{data:{id:"5cae6b16cc540e209db45cb3",statuses:f[Math.floor(Math.random()*f.length)],type:"PCT_DISCOUNT",value:50},depth:1},{data:{id:"5cae6b16cc540e209db45cfa",statuses:f[Math.floor(Math.random()*f.length)],type:"CREDIT",value:1},depth:1}]}})))}))(e.perPage)}),[e.perPage]),u=m();return i((()=>{s({loading:!0}),(null==d?void 0:d.data)&&async function(t){var a;let r;const l=null==d?void 0:d.referredByReferral,n=e.showReferrer&&!!(null===(a=null==d?void 0:d.referredByReferral)||void 0===a?void 0:a.dateReferralStarted);r=d.data.slice(0,n?e.perPage-1:e.perPage);const i=t.filter((e=>{var t,a;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===(a=null==e?void 0:e.firstElementChild)||void 0===a?void 0:a.getAttribute("slot"))})),o=null==i?void 0:i.map((async(e,t)=>{var a;const r=null===(a=null==e?void 0:e.firstElementChild)||void 0===a?void 0:a.getAttribute("slot");if("RAISINS-PLOP-TARGET"===e.tagName&&"loading"!==r&&"empty"!==r){e.setAttribute("slot","column-"+t),e.style.position="absolute";const a=e.firstElementChild.childNodes[1];return a.innerHTML="+",a.style.lineHeight="20px",A(e,(()=>e.renderLabel(t)))}return A(e,(()=>e.renderLabel()))}));let c;if(n){const e=null==i?void 0:i.map((async e=>A(e,(function(){return e.renderCell(l,e)}))));c=await Promise.all(e)}const u=null==r?void 0:r.map((async e=>{const t=null==i?void 0:i.map((async t=>A(t,(()=>t.renderCell(e,void 0)))));return await Promise.all(t)})),E=u&&[c,...await Promise.all(u)].filter((e=>e));s({rows:E});const p=o&&await Promise.all(o);s({columns:p,loading:!1,page:0})}(u)}),[null==d?void 0:d.data,u,o]),c({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},hiddenColumns:e.hiddenColumns,referralData:[],mdBreakpoint:799,smBreakpoint:599},elements:{columns:r.columns,rows:r.rows,emptyElement:t,loadingElement:a}},e.demoData||{},{arrayMerge:(e,t)=>t})}(this,e,a):I(this,e,a);return v([this.showReferrer,this.perPage]),t(p,{states:r,data:s,callbacks:o,elements:u})}};function R(){return t("slot",{name:"empty"},t("sqm-empty",{"empty-state-image":"https://res.cloudinary.com/saasquatch/image/upload/v1644000223/squatch-assets/empty_referral2.png","empty-state-header":"View your referral details","empty-state-text":"Refer a friend to view the status of your referrals and rewards earned"}))}function b(){return t("slot",{name:"loading"},t(x,null),t(x,null),t(x,null),t(x,null))}function x(){return t("sqm-table-row",null,t("sqm-table-cell",{colspan:5},t("sl-skeleton",null)))}const T=class{constructor(t){e(this,t),this.ignored=!0,s(this)}disconnectedCallback(){}render(){return t("div",{innerHTML:this.innerTemplate})}},C=class{constructor(t){e(this,t),s(this)}disconnectedCallback(){}async renderCell(e){return t("sqm-referral-table-cell",{"inner-template":a(this).innerHTML})}async renderLabel(){return Promise.resolve(this.columnTitle)}render(){return v([this.columnTitle]),t(r,{style:{display:"none"}},t("slot",null))}},w=class{constructor(t){e(this,t),this.ignored=!0,this.locale="en",s(this)}disconnectedCallback(){}render(){var e;return this.date?null===(e=N.DateTime.fromMillis(this.date))||void 0===e?void 0:e.setLocale(u(this.locale)).toLocaleString(N.DateTime.DATE_MED):"-"}},L=class{constructor(t){e(this,t),this.columnTitle="Date converted",this.dateShown="dateConverted",s(this)}disconnectedCallback(){}async renderCell(e,a){return t("sqm-referral-table-date-cell",{date:e[this.dateShown],locale:null==a?void 0:a.locale})}async renderLabel(){return this.columnTitle}async renderReferrerCell(e){return t("sqm-referral-table-date-cell",{date:e[this.dateShown]})}render(){return v([this.dateShown,this.columnTitle]),t(r,{style:{display:"none"}})}},O=class{constructor(t){e(this,t),this.statusText="{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} PAYOUT_FAILED {Payout Failed} PAYOUT_CANCELLED {Payout Cancelled} PENDING_TAX_REVIEW {Pending} PENDING_NEW_TAX_FORM {Pending} PENDING_TAX_SUBMISSION {Pending} PENDING_PARTNER_CREATION {Pending} DENIED {Denied} EXPIRED {Expired} REDEEMED {Redeemed} other {Not available} }",this.statusLongText="{status, select, AVAILABLE {Reward expiring on} CANCELLED {Reward cancelled on} PENDING {Available on} PENDING_REVIEW {Pending since} PAYOUT_APPROVED {Reward approved for payout and was scheduled for payment based on your settings.} PAYOUT_FAILED {Payout failed due to a fulfillment issue and is currently being retried.} PAYOUT_CANCELLED {If you think this is a mistake, contact our Support team.} PENDING_TAX_REVIEW {Awaiting tax form review} PENDING_NEW_TAX_FORM {Invalid tax form. Submit a new form to receive your rewards.} PENDING_TAX_SUBMISSION {Submit your tax documents to receive your rewards} PENDING_PARTNER_CREATION {Complete your tax and cash payout setup to receive your rewards} DENIED {Denied on} EXPIRED {Reward expired on} other {Not available} }",this.locale="en"}render(){var e;o.locale=this.locale;const a=E({"@keyframes slideRight":{from:{opacity:0},to:{opacity:1}},DetailsContainer:{width:"100%",display:"flex","align-items":"center","justify-content":"space-between","margin-right":"var(--sl-spacing-small)","flex-wrap":"wrap"},Details:{"max-width":"500px","&::part(header)":{padding:"var(--sl-spacing-x-small)",cursor:this.hideDetails?"default":"pointer"},"&::part(content)":{padding:"var(--sl-spacing-x-small) var(--sl-spacing-medium)"},"&::part(base)":{border:"1px solid var(--sqm-border-color)",opacity:"1"},"&::part(summary-icon)":{display:this.hideDetails?"none":"flex"},"&::part(summary-icon[open])":{transform:"rotate(-90deg)"}},BadgeContainer:{"& > :not(:last-child)":{"margin-right":"var(--sl-spacing-x-small)"}},BoldText:{"font-weight":"var(--sl-font-weight-semibold)"},RedeemBadge:{paddingLeft:"var(--sl-spacing-xxx-small)","&::part(base)":{textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-informative-color-background)",color:"var(--sqm-informative-color-text)"}},DangerBadge:{paddingLeft:"var(--sl-spacing-xxx-small)","&::part(base)":{textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-danger-color-background)",color:"var(--sqm-danger-color-text)"}},WarningBadge:{paddingLeft:"var(--sl-spacing-xxx-small)","&::part(base)":{textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-warning-color-background)",color:"var(--sqm-warning-color-text)"}},SuccessBadge:{paddingLeft:"var(--sl-spacing-xxx-small)","&::part(base)":{textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-success-color-background)",color:"var(--sqm-success-color-text)"}}}),r=a.toString(),s=e=>{switch(e){case"primary":return a.classes.RedeemBadge;case"danger":return a.classes.DangerBadge;case"success":return a.classes.SuccessBadge;case"warning":case"info":default:return a.classes.WarningBadge}},l=e=>N.DateTime.fromMillis(e).setLocale(u(this.locale)).toRelative().replace("in","").trim();return null===(e=this.rewards)||void 0===e?void 0:e.map((e=>{var n,i;const d=((e,t)=>{var a,r,s,l,n,i,o,d,c,u,E,p;if("APPROVED"!==(null===(r=null===(a=e.referral)||void 0===a?void 0:a.fraudData)||void 0===r?void 0:r.moderationStatus)){if("PENDING"===(null===(l=null===(s=e.referral)||void 0===s?void 0:s.fraudData)||void 0===l?void 0:l.moderationStatus))return"PENDING_REVIEW";if("DENIED"===(null===(i=null===(n=e.referral)||void 0===n?void 0:n.fraudData)||void 0===i?void 0:i.moderationStatus))return"DENIED"}const v=null===(o=e.partnerFundsTransfer)||void 0===o?void 0:o.status;if("NOT_YET_DUE"===v||"TRANSFERRED"===v)return"PAYOUT_APPROVED";if("OVERDUE"===v)return"PAYOUT_FAILED";if("REVERSED"===v)return"PAYOUT_CANCELLED";if(null===(d=null==e?void 0:e.pendingReasons)||void 0===d?void 0:d.includes("US_TAX")){if(!(null==t?void 0:t.taxHandlingEnabled))return"PENDING";if(!(null==t?void 0:t.connected))return"PENDING_PARTNER_CREATION";if(null===(c=null==t?void 0:t.publisher)||void 0===c?void 0:c.requiredTaxDocumentType){if(!(null===(u=null==t?void 0:t.publisher)||void 0===u?void 0:u.currentTaxDocument))return"PENDING_TAX_SUBMISSION";const e=t.publisher.currentTaxDocument.status;if("INACTIVE"===e)return"PENDING_NEW_TAX_FORM";if("NOT_VERIFIED"===e)return"PENDING_TAX_REVIEW"}if(!(null===(E=null==t?void 0:t.publisher)||void 0===E?void 0:E.withdrawalSettings))return"PENDING_PARTNER_CREATION"}return(null===(p=null==e?void 0:e.pendingReasons)||void 0===p?void 0:p.includes("PAYOUT_CONFIGURATION_MISSING"))?"PENDING_PARTNER_CREATION":1===e.statuses.length?e.statuses[0]:["REDEEMED","CANCELLED","EXPIRED","PENDING","AVAILABLE","PENDING_REVIEW","DENIED","PAYOUT_APPROVED","PAYOUT_CANCELLED","PAYOUT_FAILED","PENDING_TAX_REVIEW","PENDING_NEW_TAX_FORM","PENDING_TAX_SUBMISSION","PENDING_PARTNER_CREATION"].find((t=>e.statuses.includes(t)&&t))})(e,this.taxConnection),c=(e=>{switch(e){case"REDEEMED":case"PAYOUT_APPROVED":return"primary";case"DENIED":case"EXPIRED":case"CANCELLED":case"PAYOUT_FAILED":case"PAYOUT_CANCELLED":return"danger";case"PENDING":case"PENDING_REVIEW":case"PENDING_TAX_REVIEW":case"PENDING_NEW_TAX_FORM":case"PENDING_TAX_SUBMISSION":case"PENDING_PARTNER_CREATION":return"warning";case"AVAILABLE":return"success"}})(d),E=o.formatMessage({id:"statusShortMessage",defaultMessage:this.statusText},{status:d}),p=o.formatMessage({id:"statusLongMessage",defaultMessage:this.statusLongText},{status:d});return t("sl-details",{class:a.classes.Details,disabled:this.hideDetails},t("style",{type:"text/css"},r),t("div",{slot:"summary",class:a.classes.DetailsContainer},t(_,{type:"p"},t("span",{part:"sqm-cell-value",class:a.classes.BoldText},e.prettyValue)),t("div",{class:a.classes.BadgeContainer},t("sl-badge",{class:s(c),type:c,pill:!0},"PENDING"===d&&e.dateScheduledFor?o.formatMessage({id:"pendingForText",defaultMessage:this.pendingForText},{status:E,date:l(e.dateScheduledFor)}):E),e.dateExpires&&"AVAILABLE"===d&&t("sl-badge",{class:s(c),type:"info",pill:!0},this.expiringText,` ${l(e.dateExpires)}`))),t("div",null,"PENDING_REVIEW"===d&&(null===(n=e.referral)||void 0===n?void 0:n.dateModerated)&&t("div",null,t(_,{type:"p"},p," ",t("span",{class:a.classes.BoldText,part:"sqm-cell-value"},N.DateTime.fromMillis(e.referral.dateModerated).setLocale(u(this.locale)).toLocaleString(N.DateTime.DATE_MED)))),"PAYOUT_APPROVED"===d&&t("div",null,t(_,{type:"p"},p)),"PAYOUT_FAILED"===d&&t("div",null,t(_,{type:"p"},p)),"PAYOUT_CANCELLED"===d&&t("div",null,t(_,{type:"p"},p)),"PENDING_TAX_REVIEW"===d&&t("div",null,t(_,{type:"p"},p)),"PENDING_NEW_TAX_FORM"===d&&t("div",null,t(_,{type:"p"},p)),"PENDING_TAX_SUBMISSION"===d&&t("div",null,t(_,{type:"p"},p)),"PENDING_PARTNER_CREATION"===d&&t("div",null,t(_,{type:"p"},p)),"DENIED"===d&&(null===(i=e.referral)||void 0===i?void 0:i.dateModerated)&&t("div",null,t(_,{type:"p"},p," ",t("span",{class:a.classes.BoldText,part:"sqm-cell-value"},N.DateTime.fromMillis(e.referral.dateModerated).setLocale(u(this.locale)).toLocaleString(N.DateTime.DATE_MED)),".",this.deniedHelpText?` ${this.deniedHelpText}`:"")),e.dateGiven&&t("div",null,t(_,{type:"p"},this.rewardReceivedText," ",t("span",{class:a.classes.BoldText,part:"sqm-cell-value"},N.DateTime.fromMillis(e.dateGiven).setLocale(u(this.locale)).toLocaleString(N.DateTime.DATE_MED)))),"EXPIRED"===d&&e.dateExpires&&t("div",null,t(_,{type:"p"},p," ",t("span",{class:a.classes.BoldText,part:"sqm-cell-value"},N.DateTime.fromMillis(e.dateExpires).setLocale(u(this.locale)).toLocaleString(N.DateTime.DATE_MED)))),"CANCELLED"===d&&e.dateCancelled&&t("div",null,t(_,{type:"p"},p," ",t("span",{class:a.classes.BoldText,part:"sqm-cell-value"},N.DateTime.fromMillis(e.dateCancelled).setLocale(u(this.locale)).toLocaleString(N.DateTime.DATE_MED)))),"PENDING"===d&&e.dateScheduledFor&&t("div",null,t(_,{type:"p"},p," ",t("span",{class:a.classes.BoldText,part:"sqm-cell-value"},N.DateTime.fromMillis(e.dateScheduledFor).setLocale(u(this.locale)).toLocaleString(N.DateTime.DATE_MED))))," ","AVAILABLE"===d&&e.dateExpires&&t("div",null,t(_,{type:"p"},p," ",t("span",{class:a.classes.BoldText,part:"sqm-cell-value"},N.DateTime.fromMillis(e.dateExpires).setLocale(u(this.locale)).toLocaleString(N.DateTime.DATE_MED)))),e.fuelTankCode&&t("div",null,this.fuelTankText," ",t("span",{class:a.classes.BoldText,part:"sqm-cell-value"},e.fuelTankCode))))}))}},S=class{constructor(t){e(this,t),this.columnTitle="Rewards",this.statusText="{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} PAYOUT_FAILED {Payout Failed} PAYOUT_CANCELLED {Payout Cancelled} PENDING_TAX_REVIEW {Pending} PENDING_NEW_TAX_FORM {Pending} PENDING_TAX_SUBMISSION {Pending} PENDING_PARTNER_CREATION {Pending} DENIED {Denied} EXPIRED {Expired} REDEEMED {Redeemed} other {Not available} }",this.statusLongText="{status, select, AVAILABLE {Reward expiring on} CANCELLED {Reward cancelled on} PENDING {Available on} PENDING_REVIEW {Pending since} PAYOUT_APPROVED {Reward approved for payout and was scheduled for payment based on your settings.} PAYOUT_FAILED {Payout failed due to a fulfillment issue and is currently being retried.} PAYOUT_CANCELLED {If you think this is a mistake, contact our Support team.} PENDING_TAX_REVIEW {Awaiting tax form review} PENDING_NEW_TAX_FORM {Invalid tax form. Submit a new form to receive your rewards.} PENDING_TAX_SUBMISSION {Submit your tax documents to receive your rewards} PENDING_PARTNER_CREATION {Complete your tax and cash payout setup to receive your rewards} DENIED {Denied on} EXPIRED {Reward expired on} other {Not available} }",this.fuelTankText="Your code is",this.rewardReceivedText="Reward received on",this.expiringText="Expiring in",this.pendingForText="{status} for {date}",this.deniedHelpText="Contact support if you think this is a mistake.",this.hideDetails=!1,s(this)}disconnectedCallback(){}async renderCell(e,a){return t("sqm-referral-table-rewards-cell",{rewards:e.rewards,taxConnection:null==a?void 0:a.taxConnection,statusText:this.statusText,statusLongText:this.statusLongText,fuelTankText:this.fuelTankText,rewardReceivedText:this.rewardReceivedText,expiringText:this.expiringText,pendingForText:this.pendingForText,hideDetails:this.hideDetails,deniedHelpText:this.deniedHelpText,locale:null==a?void 0:a.locale,exportparts:"sqm-cell-value"})}async renderLabel(){return this.columnTitle}async renderReferrerCell(e){return t("sqm-referral-table-rewards-cell",{rewards:e.rewards,exportparts:"sqm-cell-value"})}render(){return v([this.columnTitle,this.statusText,this.statusLongText,this.fuelTankText,this.rewardReceivedText,this.expiringText,this.pendingForText,this.hideDetails]),t(r,{style:{display:"none"}})}},G={SubText:{fontSize:"var(--sl-font-size-small)",color:"var(--sqm-text-subdued)",margin:"0"},RedeemBadge:{"&::part(base)":{fontSize:"var(--sl-font-size-small)",padding:"4px 8px",textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-informative-color-background)",color:"var(--sqm-informative-color-text)"}},DangerBadge:{"&::part(base)":{fontSize:"var(--sl-font-size-small)",padding:"4px 8px",textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-danger-color-background)",color:"var(--sqm-danger-color-text)"}},WarningBadge:{"&::part(base)":{fontSize:"var(--sl-font-size-small)",padding:"4px 8px",textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-warning-color-background)",color:"var(--sqm-warning-color-text)"}},SuccessBadge:{"&::part(base)":{fontSize:"var(--sl-font-size-small)",padding:"4px 8px",textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-success-color-background)",color:"var(--sqm-success-color-text)"}}},q=(E(G).toString(),class{constructor(t){e(this,t)}render(){const e=E(G),a=e.toString(),r=e=>"PENDING"===e?"warning":"DENIED"===e?"danger":this.converted?"success":"warning";return t("div",null,t("style",{type:"text/css"},a),t("sl-badge",{pill:!0,type:r(this.fraudStatus),class:(t=>{switch(t){case"primary":return e.classes.RedeemBadge;case"danger":return e.classes.DangerBadge;case"success":return e.classes.SuccessBadge;case"warning":case"info":default:return e.classes.WarningBadge}})(r(this.fraudStatus))},this.statusText),this.statusSubText?t("p",{class:e.classes.SubText},this.statusSubText):null)}}),M=class{constructor(t){e(this,t),this.columnTitle="Status",this.convertedStatusText="Converted",this.inProgressStatusText="In Progress",this.pendingReviewStatusText="Pending",this.deniedStatusText="Denied",this.pendingReviewStatusSubText="Awaiting review",this.deniedStatusSubText="Detected self-referral",s(this)}disconnectedCallback(){}async renderCell(e){var a;let r,s;const l=null===(a=null==e?void 0:e.fraudData)||void 0===a?void 0:a.moderationStatus;return"DENIED"===l?(r=this.deniedStatusText,s=this.deniedStatusSubText):"PENDING"===l?(r=this.pendingReviewStatusText,s=this.pendingReviewStatusSubText):r=e.dateConverted?this.convertedStatusText:this.inProgressStatusText,t("sqm-referral-table-status-cell",{"status-text":r,"status-sub-text":s,"fraud-status":l,converted:!!e.dateConverted})}async renderLabel(){return this.columnTitle}async renderReferrerCell(e){return t("sqm-referral-table-status-cell",{"status-text":e.dateConverted?this.convertedStatusText:this.inProgressStatusText,converted:!!e.dateConverted})}render(){return v([this.columnTitle,this.convertedStatusText,this.inProgressStatusText]),t(r,{style:{display:"none"}})}},U=class{constructor(t){e(this,t)}render(){return this.name}},k=class{constructor(t){e(this,t),this.columnTitle="Customer",this.anonymousUser="Anonymous User",this.deletedUser="Deleted User",s(this)}disconnectedCallback(){}async renderCell(e){var a,r,s,l,n,i,o,d;let c;return c=(null==e?void 0:e.referredUser)||(null==e?void 0:e.referrerUser)?(null===(a=null==e?void 0:e.referredUser)||void 0===a?void 0:a.firstName)||(null===(r=null==e?void 0:e.referredUser)||void 0===r?void 0:r.lastName)||(null===(s=null==e?void 0:e.referrerUser)||void 0===s?void 0:s.firstName)||(null===(l=null==e?void 0:e.referrerUser)||void 0===l?void 0:l.lastName)?(null==e?void 0:e.referrerUser)?`${null===(n=null==e?void 0:e.referrerUser)||void 0===n?void 0:n.firstName} ${null===(i=null==e?void 0:e.referrerUser)||void 0===i?void 0:i.lastName}`:`${null===(o=null==e?void 0:e.referredUser)||void 0===o?void 0:o.firstName} ${null===(d=null==e?void 0:e.referredUser)||void 0===d?void 0:d.lastName}`:this.anonymousUser:this.deletedUser,t("sqm-referral-table-user-cell",{name:c})}async renderLabel(){return this.columnTitle}async renderReferrerCell(e){var a,r,s,l;let n;return n=e?(null===(a=null==e?void 0:e.referrerUser)||void 0===a?void 0:a.firstName)||(null===(r=e.referrerUser)||void 0===r?void 0:r.lastName)?`${null===(s=null==e?void 0:e.referrerUser)||void 0===s?void 0:s.firstName} ${null===(l=null==e?void 0:e.referrerUser)||void 0===l?void 0:l.lastName}`:this.anonymousUser:this.deletedUser,t("sqm-referral-table-user-cell",{name:n})}render(){return v([this.deletedUser,this.anonymousUser,this.columnTitle]),t(r,{style:{display:"none"}})}};export{y as sqm_referral_table,T as sqm_referral_table_cell,C as sqm_referral_table_column,w as sqm_referral_table_date_cell,L as sqm_referral_table_date_column,O as sqm_referral_table_rewards_cell,S as sqm_referral_table_rewards_column,q as sqm_referral_table_status_cell,M as sqm_referral_table_status_column,U as sqm_referral_table_user_cell,k as sqm_referral_table_user_column}
1
+ import{r as e,h as t,g as a,c as r}from"./p-f708da7b.js";import{n as s,j as l,u as n,f as i}from"./p-cd651f81.js";import{i as o}from"./p-dc293b10.js";import{i as d}from"./p-94a876b9.js";import{c}from"./p-c1086930.js";import{l as u}from"./p-9ec99ced.js";import{c as E}from"./p-cef45012.js";import"./p-49b20dae.js";import{G as p}from"./p-de136dd3.js";import{a as v,u as h}from"./p-4e451f75.js";import{u as m}from"./p-19ccb4ce.js";import{l as N}from"./p-5bedb58c.js";import{g as P}from"./p-726a9924.js";import{u as I,t as A}from"./p-c0f19490.js";import{T as _}from"./p-e309a219.js";const D=[["AVAILABLE"],["PENDING"],["CANCELLED"],["EXPIRED"],["REDEEMED"]],f=["Rajesh","Pierre","Ji-Ho","Chinua","Charleston","Sally","Gael","Jill","Jane","Khadija"],g=["Smith","Parker","Kent","Chew","Stark","Banner","Jones","Odinson","Pym","Rogers"],y=class{constructor(t){e(this,t),this.perPage=4,this.hideLabels=!1,this.prevLabel="Prev",this.moreLabel="Next",this.showReferrer=!1,this.hiddenColumns="0",this.smBreakpoint=599,this.mdBreakpoint=799,s(this)}disconnectedCallback(){}render(){const e=t(R,null),a=t(b,null),{states:r,data:s,callbacks:o,elements:u}=d()?function(e,t,a){const[r,s]=l(((e,t)=>({...e,...t})),{columns:[],rows:[],loading:!1,page:0}),o=h(),d=n((()=>{var t;return(null===(t=e.demoData)||void 0===t?void 0:t.mockData)||((e=4)=>({totalCount:6,count:e,referredByReferral:{dateConverted:null,dateReferralStarted:1643912659850,referrerUser:{firstName:"John",lastName:"Snow",rewards:[]}},data:[...Array(e)].map((()=>({id:"5cae6b0fcc540e209db45b53",referredUser:{id:"5cae6b0ce4b0d81c67b78e82",accountId:"SPX1MZBIPTFL3E1H",firstName:f[Math.floor(Math.random()*f.length)],lastName:g[Math.floor(Math.random()*g.length)],email:"example.uexwltgh@mailosaur.io",programGoals:[]},shareLinkUsed:null,referralCodeUsed:"JIMBONEUTRON2",moderationStatus:"PENDING",dateConverted:Math.floor(10*Math.random())>=5?N.DateTime.now().minus({days:6}).toMillis():null,dateFraudChecksCompleted:null,dateModerated:1558730033306,dateModified:1554934543447,dateReferralEnded:null,dateReferralPaid:null,dateReferralStarted:N.DateTime.now().minus({days:8}).toMillis(),dateUserModified:null,programId:"sam-partner-test-2",program:{id:"sam-partner-test-2",name:"Partner Program 2.0"},rewards:Math.floor(10*Math.random())>=5?[{id:"5cae6b16cc540e209db45cfa",type:"CREDIT",value:1,unit:"POINT",name:"Partner Reward",dateGiven:1554934550726,dateExpires:null,dateCancelled:null,dateRedeemed:1637004373582,dateScheduledFor:null,fuelTankCode:null,fuelTankType:null,currency:null,prettyValue:"1 Point",statuses:D[Math.floor(Math.random()*D.length)],globalRewardKey:null,programRewardKey:"partnerReward",meta:{...P()},rewardRedemptionTransactions:{data:[{exchangedRewards:{data:[{prettyValue:"CAD10.00 Visa* Prepaid Card CAD",type:"INTEGRATION",fuelTankCode:null,globalRewardKey:"gc1"}]}}]}}]:[],childNodes:{data:[{data:{id:"5cae6b16cc540e209db45cb3",statuses:D[Math.floor(Math.random()*D.length)],type:"PCT_DISCOUNT",value:50},depth:1},{data:{id:"5cae6b16cc540e209db45cfa",statuses:D[Math.floor(Math.random()*D.length)],type:"CREDIT",value:1},depth:1}]}})))}))(e.perPage)}),[e.perPage]),u=m();return i((()=>{s({loading:!0}),(null==d?void 0:d.data)&&async function(t){var a;let r;const l=null==d?void 0:d.referredByReferral,n=e.showReferrer&&!!(null===(a=null==d?void 0:d.referredByReferral)||void 0===a?void 0:a.dateReferralStarted);r=d.data.slice(0,n?e.perPage-1:e.perPage);const i=t.filter((e=>{var t,a;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===(a=null==e?void 0:e.firstElementChild)||void 0===a?void 0:a.getAttribute("slot"))})),o=null==i?void 0:i.map((async(e,t)=>{var a;const r=null===(a=null==e?void 0:e.firstElementChild)||void 0===a?void 0:a.getAttribute("slot");if("RAISINS-PLOP-TARGET"===e.tagName&&"loading"!==r&&"empty"!==r){e.setAttribute("slot","column-"+t),e.style.position="absolute";const a=e.firstElementChild.childNodes[1];return a.innerHTML="+",a.style.lineHeight="20px",A(e,(()=>e.renderLabel(t)))}return A(e,(()=>e.renderLabel()))}));let c;if(n){const e=null==i?void 0:i.map((async e=>A(e,(function(){return e.renderCell(l,e)}))));c=await Promise.all(e)}const u=null==r?void 0:r.map((async e=>{const t=null==i?void 0:i.map((async t=>A(t,(()=>t.renderCell(e,void 0)))));return await Promise.all(t)})),E=u&&[c,...await Promise.all(u)].filter((e=>e));s({rows:E});const p=o&&await Promise.all(o);s({columns:p,loading:!1,page:0})}(u)}),[null==d?void 0:d.data,u,o]),c({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},hiddenColumns:e.hiddenColumns,referralData:[],mdBreakpoint:799,smBreakpoint:599},elements:{columns:r.columns,rows:r.rows,emptyElement:t,loadingElement:a}},e.demoData||{},{arrayMerge:(e,t)=>t})}(this,e,a):I(this,e,a);return v([this.showReferrer,this.perPage]),t(p,{states:r,data:s,callbacks:o,elements:u})}};function R(){return t("slot",{name:"empty"},t("sqm-empty",{"empty-state-image":"https://res.cloudinary.com/saasquatch/image/upload/v1644000223/squatch-assets/empty_referral2.png","empty-state-header":"View your referral details","empty-state-text":"Refer a friend to view the status of your referrals and rewards earned"}))}function b(){return t("slot",{name:"loading"},t(x,null),t(x,null),t(x,null),t(x,null))}function x(){return t("sqm-table-row",null,t("sqm-table-cell",{colspan:5},t("sl-skeleton",null)))}const T=class{constructor(t){e(this,t),this.ignored=!0,s(this)}disconnectedCallback(){}render(){return t("div",{innerHTML:this.innerTemplate})}},C=class{constructor(t){e(this,t),s(this)}disconnectedCallback(){}async renderCell(e){return t("sqm-referral-table-cell",{"inner-template":a(this).innerHTML})}async renderLabel(){return Promise.resolve(this.columnTitle)}render(){return v([this.columnTitle]),t(r,{style:{display:"none"}},t("slot",null))}},w=class{constructor(t){e(this,t),this.ignored=!0,this.locale="en",s(this)}disconnectedCallback(){}render(){var e;return this.date?null===(e=N.DateTime.fromMillis(this.date))||void 0===e?void 0:e.setLocale(u(this.locale)).toLocaleString(N.DateTime.DATE_MED):"-"}},L=class{constructor(t){e(this,t),this.columnTitle="Date converted",this.dateShown="dateConverted",s(this)}disconnectedCallback(){}async renderCell(e,a){return t("sqm-referral-table-date-cell",{date:e[this.dateShown],locale:null==a?void 0:a.locale})}async renderLabel(){return this.columnTitle}async renderReferrerCell(e){return t("sqm-referral-table-date-cell",{date:e[this.dateShown]})}render(){return v([this.dateShown,this.columnTitle]),t(r,{style:{display:"none"}})}},O=class{constructor(t){e(this,t),this.statusText="{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} PAYOUT_FAILED {Payout Failed} PAYOUT_CANCELLED {Payout Cancelled} PENDING_TAX_REVIEW {Pending} PENDING_NEW_TAX_FORM {Pending} PENDING_TAX_SUBMISSION {Pending} PENDING_PARTNER_CREATION {Pending} DENIED {Denied} EXPIRED {Expired} REDEEMED {Redeemed} other {Not available} }",this.statusLongText="{status, select, AVAILABLE {Reward expiring on} CANCELLED {Reward cancelled on} PENDING {Available on} PENDING_REVIEW {Pending since} PAYOUT_APPROVED {Reward approved for payout and was scheduled for payment based on your settings.} PAYOUT_FAILED {Payout failed due to a fulfillment issue and is currently being retried.} PAYOUT_CANCELLED {If you think this is a mistake, contact our Support team.} PENDING_TAX_REVIEW {Awaiting tax form review} PENDING_NEW_TAX_FORM {Invalid tax form. Submit a new form to receive your rewards.} PENDING_TAX_SUBMISSION {Submit your tax documents to receive your rewards} PENDING_PARTNER_CREATION {Complete your tax and cash payout setup to receive your rewards} DENIED {Denied on} EXPIRED {Reward expired on} other {Not available} }",this.locale="en"}render(){var e;o.locale=this.locale;const a=E({"@keyframes slideRight":{from:{opacity:0},to:{opacity:1}},DetailsContainer:{width:"100%",display:"flex","align-items":"center","justify-content":"space-between","margin-right":"var(--sl-spacing-small)","flex-wrap":"wrap"},Details:{"max-width":"500px","&::part(header)":{padding:"var(--sl-spacing-x-small)",cursor:this.hideDetails?"default":"pointer"},"&::part(content)":{padding:"var(--sl-spacing-x-small) var(--sl-spacing-medium)"},"&::part(base)":{border:"1px solid var(--sqm-border-color)",opacity:"1"},"&::part(summary-icon)":{display:this.hideDetails?"none":"flex"},"&::part(summary-icon[open])":{transform:"rotate(-90deg)"}},BadgeContainer:{"& > :not(:last-child)":{"margin-right":"var(--sl-spacing-x-small)"}},BoldText:{"font-weight":"var(--sl-font-weight-semibold)"},RedeemBadge:{paddingLeft:"var(--sl-spacing-xxx-small)","&::part(base)":{textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-informative-color-background)",color:"var(--sqm-informative-color-text)"}},DangerBadge:{paddingLeft:"var(--sl-spacing-xxx-small)","&::part(base)":{textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-danger-color-background)",color:"var(--sqm-danger-color-text)"}},WarningBadge:{paddingLeft:"var(--sl-spacing-xxx-small)","&::part(base)":{textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-warning-color-background)",color:"var(--sqm-warning-color-text)"}},SuccessBadge:{paddingLeft:"var(--sl-spacing-xxx-small)","&::part(base)":{textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-success-color-background)",color:"var(--sqm-success-color-text)"}}}),r=a.toString(),s=e=>{switch(e){case"primary":return a.classes.RedeemBadge;case"danger":return a.classes.DangerBadge;case"success":return a.classes.SuccessBadge;case"warning":case"info":default:return a.classes.WarningBadge}},l=e=>N.DateTime.fromMillis(e).setLocale(u(this.locale)).toRelative().replace("in","").trim();return null===(e=this.rewards)||void 0===e?void 0:e.map((e=>{var n,i;const d=((e,t)=>{var a,r,s,l,n,i,o,d,c,u,E,p;if("APPROVED"!==(null===(r=null===(a=e.referral)||void 0===a?void 0:a.fraudData)||void 0===r?void 0:r.moderationStatus)){if("PENDING"===(null===(l=null===(s=e.referral)||void 0===s?void 0:s.fraudData)||void 0===l?void 0:l.moderationStatus))return"PENDING_REVIEW";if("DENIED"===(null===(i=null===(n=e.referral)||void 0===n?void 0:n.fraudData)||void 0===i?void 0:i.moderationStatus))return"DENIED"}const v=null===(o=e.partnerFundsTransfer)||void 0===o?void 0:o.status;if("NOT_YET_DUE"===v||"TRANSFERRED"===v)return"PAYOUT_APPROVED";if("OVERDUE"===v)return"PAYOUT_FAILED";if("REVERSED"===v)return"PAYOUT_CANCELLED";if(null===(d=null==e?void 0:e.pendingReasons)||void 0===d?void 0:d.includes("US_TAX")){if(!(null==t?void 0:t.taxHandlingEnabled))return"PENDING";if(!(null==t?void 0:t.connected))return"PENDING_PARTNER_CREATION";if(null===(c=null==t?void 0:t.publisher)||void 0===c?void 0:c.requiredTaxDocumentType){if(!(null===(u=null==t?void 0:t.publisher)||void 0===u?void 0:u.currentTaxDocument))return"PENDING_TAX_SUBMISSION";const e=t.publisher.currentTaxDocument.status;if("INACTIVE"===e)return"PENDING_NEW_TAX_FORM";if("NOT_VERIFIED"===e)return"PENDING_TAX_REVIEW"}if(!(null===(E=null==t?void 0:t.publisher)||void 0===E?void 0:E.withdrawalSettings))return"PENDING_PARTNER_CREATION"}return(null===(p=null==e?void 0:e.pendingReasons)||void 0===p?void 0:p.includes("PAYOUT_CONFIGURATION_MISSING"))?"PENDING_PARTNER_CREATION":1===e.statuses.length?e.statuses[0]:["REDEEMED","CANCELLED","EXPIRED","PENDING","AVAILABLE","PENDING_REVIEW","DENIED","PAYOUT_APPROVED","PAYOUT_CANCELLED","PAYOUT_FAILED","PENDING_TAX_REVIEW","PENDING_NEW_TAX_FORM","PENDING_TAX_SUBMISSION","PENDING_PARTNER_CREATION"].find((t=>e.statuses.includes(t)&&t))})(e,this.taxConnection),c=(e=>{switch(e){case"REDEEMED":case"PAYOUT_APPROVED":return"primary";case"DENIED":case"EXPIRED":case"CANCELLED":case"PAYOUT_FAILED":case"PAYOUT_CANCELLED":return"danger";case"PENDING":case"PENDING_REVIEW":case"PENDING_TAX_REVIEW":case"PENDING_NEW_TAX_FORM":case"PENDING_TAX_SUBMISSION":case"PENDING_PARTNER_CREATION":return"warning";case"AVAILABLE":return"success"}})(d),E=o.formatMessage({id:"statusShortMessage",defaultMessage:this.statusText},{status:d}),p=o.formatMessage({id:"statusLongMessage",defaultMessage:this.statusLongText},{status:d});return t("sl-details",{class:a.classes.Details,disabled:this.hideDetails},t("style",{type:"text/css"},r),t("div",{slot:"summary",class:a.classes.DetailsContainer},t(_,{type:"p"},t("span",{part:"sqm-cell-value",class:a.classes.BoldText},e.prettyValue)),t("div",{class:a.classes.BadgeContainer},t("sl-badge",{class:s(c),type:c,pill:!0},"PENDING"===d&&e.dateScheduledFor?o.formatMessage({id:"pendingForText",defaultMessage:this.pendingForText},{status:E,date:l(e.dateScheduledFor)}):E),e.dateExpires&&"AVAILABLE"===d&&t("sl-badge",{class:s(c),type:"info",pill:!0},this.expiringText,` ${l(e.dateExpires)}`))),t("div",null,"PENDING_REVIEW"===d&&(null===(n=e.referral)||void 0===n?void 0:n.dateModerated)&&t("div",null,t(_,{type:"p"},p," ",t("span",{class:a.classes.BoldText,part:"sqm-cell-value"},N.DateTime.fromMillis(e.referral.dateModerated).setLocale(u(this.locale)).toLocaleString(N.DateTime.DATE_MED)))),"PAYOUT_APPROVED"===d&&t("div",null,t(_,{type:"p"},p)),"PAYOUT_FAILED"===d&&t("div",null,t(_,{type:"p"},p)),"PAYOUT_CANCELLED"===d&&t("div",null,t(_,{type:"p"},p)),"PENDING_TAX_REVIEW"===d&&t("div",null,t(_,{type:"p"},p)),"PENDING_NEW_TAX_FORM"===d&&t("div",null,t(_,{type:"p"},p)),"PENDING_TAX_SUBMISSION"===d&&t("div",null,t(_,{type:"p"},p)),"PENDING_PARTNER_CREATION"===d&&t("div",null,t(_,{type:"p"},p)),"DENIED"===d&&(null===(i=e.referral)||void 0===i?void 0:i.dateModerated)&&t("div",null,t(_,{type:"p"},p," ",t("span",{class:a.classes.BoldText,part:"sqm-cell-value"},N.DateTime.fromMillis(e.referral.dateModerated).setLocale(u(this.locale)).toLocaleString(N.DateTime.DATE_MED)),".",this.deniedHelpText?` ${this.deniedHelpText}`:"")),e.dateGiven&&t("div",null,t(_,{type:"p"},this.rewardReceivedText," ",t("span",{class:a.classes.BoldText,part:"sqm-cell-value"},N.DateTime.fromMillis(e.dateGiven).setLocale(u(this.locale)).toLocaleString(N.DateTime.DATE_MED)))),"EXPIRED"===d&&e.dateExpires&&t("div",null,t(_,{type:"p"},p," ",t("span",{class:a.classes.BoldText,part:"sqm-cell-value"},N.DateTime.fromMillis(e.dateExpires).setLocale(u(this.locale)).toLocaleString(N.DateTime.DATE_MED)))),"CANCELLED"===d&&e.dateCancelled&&t("div",null,t(_,{type:"p"},p," ",t("span",{class:a.classes.BoldText,part:"sqm-cell-value"},N.DateTime.fromMillis(e.dateCancelled).setLocale(u(this.locale)).toLocaleString(N.DateTime.DATE_MED)))),"PENDING"===d&&e.dateScheduledFor&&t("div",null,t(_,{type:"p"},p," ",t("span",{class:a.classes.BoldText,part:"sqm-cell-value"},N.DateTime.fromMillis(e.dateScheduledFor).setLocale(u(this.locale)).toLocaleString(N.DateTime.DATE_MED))))," ","AVAILABLE"===d&&e.dateExpires&&t("div",null,t(_,{type:"p"},p," ",t("span",{class:a.classes.BoldText,part:"sqm-cell-value"},N.DateTime.fromMillis(e.dateExpires).setLocale(u(this.locale)).toLocaleString(N.DateTime.DATE_MED)))),e.fuelTankCode&&t("div",null,this.fuelTankText," ",t("span",{class:a.classes.BoldText,part:"sqm-cell-value"},e.fuelTankCode))))}))}},S=class{constructor(t){e(this,t),this.columnTitle="Rewards",this.statusText="{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} PAYOUT_FAILED {Payout Failed} PAYOUT_CANCELLED {Payout Cancelled} PENDING_TAX_REVIEW {Pending} PENDING_NEW_TAX_FORM {Pending} PENDING_TAX_SUBMISSION {Pending} PENDING_PARTNER_CREATION {Pending} DENIED {Denied} EXPIRED {Expired} REDEEMED {Redeemed} other {Not available} }",this.statusLongText="{status, select, AVAILABLE {Reward expiring on} CANCELLED {Reward cancelled on} PENDING {Available on} PENDING_REVIEW {Pending since} PAYOUT_APPROVED {Reward approved for payout and was scheduled for payment based on your settings.} PAYOUT_FAILED {Payout failed due to a fulfillment issue and is currently being retried.} PAYOUT_CANCELLED {If you think this is a mistake, contact our Support team.} PENDING_TAX_REVIEW {Awaiting tax form review} PENDING_NEW_TAX_FORM {Invalid tax form. Submit a new form to receive your rewards.} PENDING_TAX_SUBMISSION {Submit your tax documents to receive your rewards} PENDING_PARTNER_CREATION {Complete your tax and cash payout setup to receive your rewards} DENIED {Denied on} EXPIRED {Reward expired on} other {Not available} }",this.fuelTankText="Your code is",this.rewardReceivedText="Reward received on",this.expiringText="Expiring in",this.pendingForText="{status} for {date}",this.deniedHelpText="Contact support if you think this is a mistake.",this.hideDetails=!1,s(this)}disconnectedCallback(){}async renderCell(e,a){return t("sqm-referral-table-rewards-cell",{rewards:e.rewards,taxConnection:null==a?void 0:a.taxConnection,statusText:this.statusText,statusLongText:this.statusLongText,fuelTankText:this.fuelTankText,rewardReceivedText:this.rewardReceivedText,expiringText:this.expiringText,pendingForText:this.pendingForText,hideDetails:this.hideDetails,deniedHelpText:this.deniedHelpText,locale:null==a?void 0:a.locale,exportparts:"sqm-cell-value"})}async renderLabel(){return this.columnTitle}async renderReferrerCell(e){return t("sqm-referral-table-rewards-cell",{rewards:e.rewards,exportparts:"sqm-cell-value"})}render(){return v([this.columnTitle,this.statusText,this.statusLongText,this.fuelTankText,this.rewardReceivedText,this.expiringText,this.pendingForText,this.hideDetails]),t(r,{style:{display:"none"}})}},G={SubText:{fontSize:"var(--sl-font-size-small)",color:"var(--sqm-text-subdued)",margin:"0"},RedeemBadge:{"&::part(base)":{fontSize:"var(--sl-font-size-small)",padding:"4px 8px",textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-informative-color-background)",color:"var(--sqm-informative-color-text)"}},DangerBadge:{"&::part(base)":{fontSize:"var(--sl-font-size-small)",padding:"4px 8px",textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-danger-color-background)",color:"var(--sqm-danger-color-text)"}},WarningBadge:{"&::part(base)":{fontSize:"var(--sl-font-size-small)",padding:"4px 8px",textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-warning-color-background)",color:"var(--sqm-warning-color-text)"}},SuccessBadge:{"&::part(base)":{fontSize:"var(--sl-font-size-small)",padding:"4px 8px",textAlign:"center",maxWidth:"170px",whiteSpace:"pre-line",background:"var(--sqm-success-color-background)",color:"var(--sqm-success-color-text)"}}},q=(E(G).toString(),class{constructor(t){e(this,t)}render(){const e=E(G),a=e.toString(),r=e=>"PENDING"===e?"warning":"DENIED"===e?"danger":this.converted?"success":"warning";return t("div",null,t("style",{type:"text/css"},a),t("sl-badge",{pill:!0,type:r(this.fraudStatus),class:(t=>{switch(t){case"primary":return e.classes.RedeemBadge;case"danger":return e.classes.DangerBadge;case"success":return e.classes.SuccessBadge;case"warning":case"info":default:return e.classes.WarningBadge}})(r(this.fraudStatus))},this.statusText),this.statusSubText?t("p",{class:e.classes.SubText},this.statusSubText):null)}}),M=class{constructor(t){e(this,t),this.columnTitle="Status",this.convertedStatusText="Converted",this.inProgressStatusText="In Progress",this.pendingReviewStatusText="Pending",this.deniedStatusText="Denied",this.pendingReviewStatusSubText="Awaiting review",this.deniedStatusSubText="Detected self-referral",s(this)}disconnectedCallback(){}async renderCell(e){var a;let r,s;const l=null===(a=null==e?void 0:e.fraudData)||void 0===a?void 0:a.moderationStatus;return"DENIED"===l?(r=this.deniedStatusText,s=this.deniedStatusSubText):"PENDING"===l?(r=this.pendingReviewStatusText,s=this.pendingReviewStatusSubText):r=e.dateConverted?this.convertedStatusText:this.inProgressStatusText,t("sqm-referral-table-status-cell",{"status-text":r,"status-sub-text":s,"fraud-status":l,converted:!!e.dateConverted})}async renderLabel(){return this.columnTitle}async renderReferrerCell(e){return t("sqm-referral-table-status-cell",{"status-text":e.dateConverted?this.convertedStatusText:this.inProgressStatusText,converted:!!e.dateConverted})}render(){return v([this.columnTitle,this.convertedStatusText,this.inProgressStatusText]),t(r,{style:{display:"none"}})}},U=class{constructor(t){e(this,t)}render(){return this.name}},k=class{constructor(t){e(this,t),this.columnTitle="Customer",this.anonymousUser="Anonymous User",this.deletedUser="Deleted User",s(this)}disconnectedCallback(){}async renderCell(e){var a,r,s,l,n,i,o,d;let c;return c=(null==e?void 0:e.referredUser)||(null==e?void 0:e.referrerUser)?(null===(a=null==e?void 0:e.referredUser)||void 0===a?void 0:a.firstName)||(null===(r=null==e?void 0:e.referredUser)||void 0===r?void 0:r.lastName)||(null===(s=null==e?void 0:e.referrerUser)||void 0===s?void 0:s.firstName)||(null===(l=null==e?void 0:e.referrerUser)||void 0===l?void 0:l.lastName)?(null==e?void 0:e.referrerUser)?`${null===(n=null==e?void 0:e.referrerUser)||void 0===n?void 0:n.firstName} ${null===(i=null==e?void 0:e.referrerUser)||void 0===i?void 0:i.lastName}`:`${null===(o=null==e?void 0:e.referredUser)||void 0===o?void 0:o.firstName} ${null===(d=null==e?void 0:e.referredUser)||void 0===d?void 0:d.lastName}`:this.anonymousUser:this.deletedUser,t("sqm-referral-table-user-cell",{name:c})}async renderLabel(){return this.columnTitle}async renderReferrerCell(e){var a,r,s,l;let n;return n=e?(null===(a=null==e?void 0:e.referrerUser)||void 0===a?void 0:a.firstName)||(null===(r=e.referrerUser)||void 0===r?void 0:r.lastName)?`${null===(s=null==e?void 0:e.referrerUser)||void 0===s?void 0:s.firstName} ${null===(l=null==e?void 0:e.referrerUser)||void 0===l?void 0:l.lastName}`:this.anonymousUser:this.deletedUser,t("sqm-referral-table-user-cell",{name:n})}render(){return v([this.deletedUser,this.anonymousUser,this.columnTitle]),t(r,{style:{display:"none"}})}};export{y as sqm_referral_table,T as sqm_referral_table_cell,C as sqm_referral_table_column,w as sqm_referral_table_date_cell,L as sqm_referral_table_date_column,O as sqm_referral_table_rewards_cell,S as sqm_referral_table_rewards_column,q as sqm_referral_table_status_cell,M as sqm_referral_table_status_column,U as sqm_referral_table_user_cell,k as sqm_referral_table_user_column}
@@ -0,0 +1,11 @@
1
+ import{h as e,r as s}from"./p-f708da7b.js";import{l as t,k as i,f as a,n as r}from"./p-cd651f81.js";import{i as n}from"./p-dc293b10.js";import{d as o,t as l,F as c,i as d,q as p}from"./p-94a876b9.js";import{c as m}from"./p-c1086930.js";import{g as u}from"./p-9ec99ced.js";import{c as f}from"./p-cef45012.js";import{E as h}from"./p-49b20dae.js";import{T as g}from"./p-e309a219.js";import{p as y}from"./p-13f3a647.js";import{V as x,S as v,a as b}from"./p-38c7775a.js";import{u as C}from"./p-d6831af5.js";const k=f({Wrapper:{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-medium)",maxWidth:"550px"},HeaderContainer:{display:"flex",flexDirection:"column"},InputsContainer:{display:"flex",gap:"var(--sl-spacing-medium)",position:"relative",flexDirection:"column"},CodeInputContainer:{display:"flex",gap:"var(--sl-spacing-medium)"},CodeInput:{maxWidth:"40px","&::part(input)":{margin:"0",padding:"0 var(--sl-input-spacing-small)",fontSize:"var(--sl-font-size-large)"}},CodeInputError:{...h,maxWidth:"40px","&::part(input)":{margin:"0",padding:"0 var(--sl-input-spacing-small)",fontSize:"var(--sl-font-size-large)"}},ErrorText:{color:"var(--sl-color-danger-500)",fontSize:"var(--sl-font-size-small)",margin:"0"},ContinueButton:{width:"100%",maxWidth:"100px"},FooterContainer:{display:"flex",flexDirection:"column"},SkeletonOne:{width:"50%",height:"16px"},SkeletonTwo:{width:"30%",height:"34px"},SkeletonThree:{width:"15%",height:"24px"}}),j=k.toString();function E(s){const{states:t,refs:i,callbacks:a,text:r}=s,o=n.formatMessage({id:"resendCodeText",defaultMessage:r.resendCodeText},{resendCodeLink:e("a",{href:"",style:{textDecoration:"none"},onClick:e=>{e.preventDefault(),a.resendEmail()}},r.resendCodeLabel)}),l=n.formatMessage({id:"codeResentSuccessfully",defaultMessage:r.codeResentSuccessfullyText},{email:t.email}),c=t.verifyFailed?k.classes.CodeInputError:k.classes.CodeInput;return e("div",{part:"sqm-base"},e("style",{type:"text/css"},"\n:host {\n display: block;\n}\n:host([hidden]): {\n display: none;\n}\n\n\n",j),e("div",{class:k.classes.Wrapper},e("div",{class:k.classes.HeaderContainer},e(g,{type:"p"},n.formatMessage({id:"emailHeaderText",defaultMessage:t.verifyFailed?r.reverifyCodeHeaderText:r.verifyCodeHeaderText},{email:t.email}))),t.emailResent&&e("sqm-form-message",{type:"success",exportparts:"successalert-icon"},e("b",null,l)),e("div",{class:k.classes.InputsContainer},e("div",{ref:i.codeWrapperRef,class:k.classes.CodeInputContainer},e("sl-input",{class:c,name:"code"}),e("sl-input",{class:c,name:"code"}),e("sl-input",{class:c,name:"code"}),e("sl-input",{class:c,name:"code"}),e("sl-input",{class:c,name:"code"}),e("sl-input",{class:c,name:"code"})),t.verifyFailed&&e("p",{class:k.classes.ErrorText},r.invalidCodeText),e("sl-button",{class:k.classes.ContinueButton,onClick:a.submitCode,disabled:t.loading||t.initialiseLoading,loading:t.loading||t.initialiseLoading,exportparts:"base: primarybutton-base",type:"primary"},r.verifyText)),e("div",{class:k.classes.FooterContainer},e(g,{type:"p"},o))))}o.gql`
2
+ mutation submitImpactPublisherEmail2FACode(
3
+ $user: UserIdInput!
4
+ $code: String!
5
+ ) {
6
+ submitImpactPublisherEmail2FACode(user: $user, code: $code) {
7
+ verifiedEmail
8
+ accessKey
9
+ }
10
+ }
11
+ `;const w=class{constructor(e){s(this,e),this.verifyCodeHeaderText="Enter the code sent to {email} from our referral provider, impact.com.",this.reverifyCodeHeaderText="Enter the code sent to {email} from our referral provider, impact.com.",this.resendCodeText="Didn't receive your code? {resendCodeLink}",this.resendCodeLabel="Resend code",this.codeResentSuccessfullyText="Another code has been sent to {email}",this.invalidCodeText="Please check your code and try again. If you’re still having trouble, try resending your code.",this.verifyText="Verify",this.networkErrorMessage="An error occurred while verifying your email. Please refresh the page and try again.",this.stateController="{}",r(this)}disconnectedCallback(){}getTextProps(){return u(this)}render(){const s=d()?function(e){const[s,t]=i(!1),a=p(b);return m({states:{initialiseLoading:!1,loading:!1,email:"test@example.com",emailResent:s,verifyFailed:!1},refs:{codeWrapperRef:()=>{}},callbacks:{resendEmail:async()=>t(!0),submitCode:async()=>a(!0)},text:e.getTextProps()},e.demoData||y(e.stateController)||{},{arrayMerge:(e,s)=>s})}(this):function(e){t();const[s,r]=l(v),n=c(x),[o,d]=i(!1),[p,m]=i(!1),[u,f]=i(null),[h,g]=i(!1),[y,b]=i(!1),{initialized:k,verificationEmail:j,send:[E,{loading:w,errors:I}],verify:[S,{loading:T,errors:z}]}=C();a((()=>{if(!u)return;const e=u.querySelectorAll("sl-input"),s=Array.from(e).map((e=>e.shadowRoot.querySelector('input[name="code"]')));s.forEach(((e,t)=>{e.addEventListener("focus",(e=>{e.target.select()})),e.addEventListener("keydown",(e=>{"Backspace"===e.key&&""===e.target.value&&s[Math.max(0,t-1)].focus()})),e.addEventListener("input",(e=>{const i=e.data;if(i)if(t!==s.length-1){if(i.length>1){const a=i.slice(1);e.target.value=i.slice(0,1),s[t+1].dispatchEvent(new InputEvent("input",{inputType:"insertFromPaste",data:a}))}s[t+1].focus()}else e.target.value=i.slice(0,1)}))}))}),[u]);const F=async()=>{k&&(await E()?(o&&m(!0),d(!0)):b(!0))};return a((()=>{k&&(n?d(!0):F())}),[k]),{refs:{codeWrapperRef:f},states:{email:j,emailResent:p,resendError:I||z,initialiseLoading:!k,loading:w||T,verifyFailed:!!h},callbacks:{resendEmail:F,submitCode:async()=>{const s=u.querySelectorAll("sl-input"),t=Array.from(s).map((e=>e.shadowRoot.querySelector('input[name="code"]')));if(t.find((e=>!e.value)))return void g(!0);let i="";if(t.forEach((e=>{i=`${i}${e.value}`})),!k)return;g(!1);const a=await S(i);(null==a?void 0:a.success)?(e.onVerification(a.accessKey),r(!1),g(!1)):g(!0)}},text:e.getTextProps()}}(this);return e(E,Object.assign({},s))}};export{w as sqm_code_verification}
@@ -0,0 +1 @@
1
+ import{r as t,h as e}from"./p-f708da7b.js";import{u as i,f as r,n as o}from"./p-cd651f81.js";import"./p-dc293b10.js";import{M as a,_ as s,J as n,L as u,I as h,S as c,i as d}from"./p-94a876b9.js";import{c as m}from"./p-c1086930.js";import{g as l}from"./p-9ec99ced.js";import"./p-cef45012.js";import{E as p}from"./p-9acb5038.js";import{g as y,L as f}from"./p-0984523b.js";import{p as v}from"./p-13f3a647.js";import{T as b,a as g,U as x,C as T,b as S,S as w,c as P,G as k,d as I,e as C,F as A,f as B,g as N,h as V}from"./p-c75a3b4a.js";import{e as q}from"./p-26468242.js";const j=class{constructor(e){t(this,e),this.step1_firstName="First name",this.step1_lastName="Last name",this.step1_email="Email",this.step1_country="Country",this.step1_phoneNumber="Phone number",this.step1_address="Address",this.step1_city="City",this.step1_state="State",this.step1_province="Province",this.step1_region="Region",this.step1_postalCode="Postal code",this.step1_currency="Currency",this.step1_currencyHelpText="Choose your preferred payout currency",this.step1_allowBankingCollection="I have read the {termsAndConditionsLink} and allow impact.com to collect my tax and banking information",this.step1_personalInformation="Personal Information",this.step1_termsAndConditionsLabel="terms and conditions",this.step1_termsAndConditionsLink="https://terms.advocate.impact.com/PayoutTermsAndConditions.html",this.step1_searchForCurrencyText="Search for currency..",this.step2_indirectTax="Indirect Tax",this.step2_indirectTaxDescription="Indirect taxes (e.g. VAT, HST, GST) are transaction based taxes often applied to goods and services. Service providers are typically required to register with their tax authority and collect these taxes on behalf governments.",this.step2_indirectTaxDetails="Indirect tax details",this.step2_otherRegion="Registered for indirect tax",this.step2_otherRegionSubtext="If you’ve registered with your tax authority, add your information to stay tax compliant.",this.step2_notRegistered="Not registered for indirect tax",this.step2_notRegisteredSubtext="If you’ve never set up indirect tax with your tax authority, then you’re likely not considered registered.",this.step2_selectedRegion="Country / region of indirect tax",this.step2_indirectTaxNumber="{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}}",this.step2_province="Province",this.step2_indirectTaxNumberError="{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}} is required",this.step2_qstNumber="QST number",this.step2_isRegisteredQST="I am registered for QST Tax",this.step2_isRegisteredSubRegionIncomeTax="I am an individual registered for Income Tax purposes in Spain, and withholding tax will apply to any payments made to me.",this.step2_subRegion="Sub-region",this.step2_subRegionTaxNumberLabel="Income Tax Number",this.step2_cannotChangeInfoAlert="Changes to your personal and indirect tax information can only be made through our {supportLink} after you complete this step. Make sure these are correct before continuing.",this.step3_taxForm="Tax form",this.step3_taxFormLabel="{documentType} Tax Form",this.step3_participantType="Participant type",this.step3_businessEntity="I represent a business",this.step3_individualParticipant="I am an individual participant",this.step3_taxFormDescription="Participants based in the US need to submit a {documentType} form.",this.step3_taxFormDescriptionIndividualParticipant="Participants residing outside of the US, joining the referral program of a US-based company, need to submit a {documentType} form.",this.step3_taxFormDescriptionBusinessEntity="Participants residing outside of the US who represent a business entity need to submit a {documentType} form.",this.step3_docusignExpired="For your security and privacy, we automatically end your session after 20 minutes of inactivity. Please refresh and re-enter your tax information to continue.",this.step3_docusignSessionWarning="For your security, we automatically end your session when you have not interacted with the form after 20 minutes.",this.step3_docusignError="There was a problem displaying this form. Please refresh the page. If this problem continues, contact our {supportLink}.",this.step3_refreshButton="Refresh Page",this.step3_exitButton="Exit",this.step4_taxAndPayouts="Payouts",this.step4_directlyToBankAccount="Directly to my bank account",this.step4_toPayPalAccount="PayPal (2% processing fee capped to {feeCap})",this.step4_paymentScheduleBalanceThreshold="Pay me when my balance reaches a threshold",this.step4_paymentScheduleFixedDay="Pay me on a fixed day of the month",this.step4_paymentDaySelectLabel="Payment Day",this.step4_paymentThresholdSelectLabel="Payment threshold",this.step4_paymentDayFirstOfMonthLabelText="1st of the month",this.step4_paymentDayFifteenthOfMonthLabelText="15th of the month",this.step4_paymentMethod="Payment method",this.step4_paymentSchedule="Payment schedule",this.step4_paymentMethodSubtext="Payouts will be sent from our referral program provider, impact.com.",this.step4_payPalInputLabel="PayPal email",this.step4_bankLocationLabel="Bank country location",this.step4_beneficiaryAccountNameLabel="Beneficiary account name",this.step4_bankAccountTypeLabel="Bank account type",this.step4_checkingSelectItemLabel="Checking",this.step4_savingsSelectItemLabel="Savings",this.step4_bankAccountNumberLabel="Bank account number",this.step4_ibanLabel="IBAN",this.step4_swiftCodeLabel="SWIFT code",this.step4_routingCodeLabel="{bankCountry, select, AU {BSB number} CA {Routing number} CZ {Bank code} HK {Clearing code} SG {Clearing code} US {ABA routing number} NZ {BSB number} ZA {Bank/Branch number} IN {IFSC} CNY {CNAPS} other {Routing code} }",this.step4_bankNameLabel="Bank name",this.step4_classificationEntityLabel="Classification entity",this.step4_businessSelectItemLabel="Business",this.step4_individualSelectItemLabel="Individual",this.step4_foreignSelectItemLabel="Foreign",this.step4_classificationCPFLabel="Classification CPF",this.step4_patronymicNameLabel="Patronymic name",this.step4_voCodeLabel="VO code",this.step4_agencyCodeLabel="Agency code",this.step4_branchCodeLabel="Branch code",this.step4_classificationLabel="Classification",this.step4_taxPayerIdLabel="Beneficiary INN",this.step4_bankAddressLabel="Bank address",this.step4_bankCityLabel="Bank city",this.step4_bankStateLabel="Bank Province / State",this.step4_bankPostalCodeLabel="Bank postal code",this.step4_eftWithdrawalLabel="EFT Withdrawal (free)",this.step4_fxWireProcessingFeeLabel="FX Wire (Processing Fee {currency}{defaultFxFee}.00)",this.step4_verifyEmailHeaderText="Verify your email",this.step4_verifyEmailDescriptionText="Verify your email to update your payment settings. Enter the code sent to {email} from our referral provider, impact.com.",this.dashboard_statusTextActive="Active",this.dashboard_statusTextNotActive="Invalid Tax Form",this.dashboard_statusTextNotVerified="Not Verified",this.dashboard_badgeTextSubmittedOn="Submitted on {dateSubmitted}.",this.dashboard_badgeTextSubmittedOnW8="Submitted on {dateSubmitted}. Valid for three years after submission.",this.dashboard_badgeTextAwaitingReview="Awaiting review. Submitted on {dateSubmitted}.",this.dashboard_taxAlertHeaderNotActiveW9="Your W9 tax form has personal information that doesn’t match your profile",this.dashboard_taxAlertHeaderNotActiveW8="{documentType} tax form is invalid",this.dashboard_taxAlertNotActiveMessageW9="Please resubmit a new {documentType} form.",this.dashboard_taxAlertNotActiveMessageW8="Your tax form may have expired or has personal information that doesn’t match your profile. Please submit a new {documentType} form.",this.dashboard_invalidForm="Make sure your information is correct and submit new form.",this.dashboard_bankingInformationSectionHeader="Payout Information",this.dashboard_taxDocumentSectionHeader="Tax documents",this.dashboard_taxDocumentSectionSubHeader="{documentType} tax form",this.dashboard_noFormNeededSubtext="Tax documents are only required if you are based in the US or joining the referral program of a US based brand.",this.dashboard_indirectTaxInfoSectionHeader="Indirect tax",this.dashboard_indirectTaxInfoCanada="Registered in {province}, {country}",this.dashboard_indirectTaxInfoOtherCountry="Registered in {country}",this.dashboard_indirectTaxInfoSpain="Registered in {country}, {subRegion}",this.dashboard_indirectTaxTooltipSupport="To make changes to your indirect tax information, please contact our {supportLink}.",this.dashboard_indirectTaxDetails="{indirectTaxType} number: {indirectTaxNumber}",this.dashboard_newFormButton="Submit new form",this.dashboard_editPaymentInformationButton="Edit Payout Information",this.dashboard_notRegisteredForTax="Not registered for indirect tax. If you’ve previously registered with your tax authority, contact our {supportLink} to add your information to stay tax compliant.",this.dashboard_qstNumber="QST number: {qstNumber}",this.dashboard_subRegionTaxNumber="Income tax number: {subRegionTaxNumber}",this.dashboard_statusBadgeText="{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }",this.dashboard_thresholdPayoutText="Next payout occurs when balance is {thresholdBalance}",this.dashboard_accountText="Account",this.dashboard_invoiceColumnTitle="Invoice",this.dashboard_dateColumnTitle="Date",this.dashboard_earningsColumnTitle="Earnings",this.dashboard_indirectTaxColumnTitle="Indirect tax",this.dashboard_payoutFromImpact="Your balance may take up to 24 hours to update. Payouts will be sent from our referral program provider, impact.com.",this.dashboard_earningsAfterTaxColumnTitle="Earnings after tax",this.dashboard_payoutHoldAlertHeader="Your payout is on hold",this.dashboard_payoutHoldAlertDescription="Please contact our {supportLink} or check your inbox for an email from our referral program provider, impact.com.",this.dashboard_payoutMissingInformationText="Missing banking information, go to Impact.com to resolve.",this.dashboard_invoiceDescription="View and download your invoices to report your earnings and stay tax compliant.",this.dashboard_invoicePrevLabel="Prev",this.dashboard_invoiceMoreLabel="Next",this.dashboard_invoiceHeader="Invoices",this.dashboard_invoiceEmptyStateHeader="View your invoice details",this.dashboard_invoiceEmptyStateText="Refer a friend to view the status of your invoices and rewards earned",this.dashboard_replaceTaxFormModalHeader="Replace existing tax form",this.dashboard_replaceTaxFormModalBodyText="Submitting a new tax form will remove your existing form. Make sure to sign and complete your new tax form to prevent any issues with your next payout.",this.dashboard_verificationRequiredHeader="Verify your identity",this.dashboard_verificationRequiredDescription="Complete your verification to start receiving your cash rewards. It should only take a few minutes verify. If you run in to an issue verifying your identity contact our {supportLink}.",this.dashboard_verificationRequiredInternalHeader="Identity Verification in Progress",this.dashboard_verificationRequiredInternalDescription="Identity verification submission has been received. Our system is currently performing additional checks and analyzing the results. You will be updated shortly. If you don't hear from us contact our {supportLink}.",this.dashboard_verificationReviewInternalHeader="Identity Verification Under Review",this.dashboard_verificationReviewInternalDescription="Identity verification requires further review due to a potential error. Our team is reviewing the information and will update you shortly. If you don't hear from us contact our {supportLink}.",this.dashboard_verificationFailedInternalHeader="Identity Verification Unsuccessful",this.dashboard_verificationFailedInternalDescription="Identity verification has failed. Our team is reviewing the report and will contact you with further information. If you don't hear from us contact our {supportLink}.",this.dashboard_verificationRequiredButtonText="Start Verification",this.formStep="Step {step} of {count}",this.generalErrorTitle="There was a problem submitting your information",this.generalErrorDescription="Please review your information and try again. If this problem continues, contact our {supportLink}.",this.fieldRequiredError="{fieldName} is required",this.invalidCharacterError="{fieldName} includes characters that aren't supported.",this.fieldInvalidError="{fieldName} is invalid",this.continueButton="Continue",this.backButton="Back",this.cancelButton="Cancel",this.isPartnerAlertHeader="An account with this email already exists with our referral program provider, impact.com",this.isPartnerAlertDescription="If you don’t recognize this referral program provider or believe this is a mistake, please contact our {supportLink} or sign up for this referral program with a different email.",this.searchForCountryText="Search for country..",this.loadingErrorAlertHeader="There was a problem loading your form",this.loadingErrorAlertDescription="Please refresh the page and try again. If this problem continues, contact our {supportLink}.",this.taxAndPayoutsDescription="Submit your tax documents and add your banking information to receive your rewards.",this.supportLink="support team",this.stateController="{}",o(this)}disconnectedCallback(){}getGeneralStepTextProps(t){const e=l(this);return{...q(e,t),generalErrorTitle:e.generalErrorTitle,generalErrorDescription:e.generalErrorDescription,fieldRequiredError:e.fieldRequiredError,invalidCharacterError:e.invalidCharacterError,fieldInvalidError:e.fieldInvalidError,continueButton:e.continueButton,backButton:e.backButton,cancelButton:e.cancelButton,isPartnerAlertHeader:e.isPartnerAlertHeader,isPartnerAlertDescription:e.isPartnerAlertDescription,loadingErrorAlertHeader:e.loadingErrorAlertHeader,loadingErrorAlertDescription:e.loadingErrorAlertDescription,taxAndPayoutsDescription:e.taxAndPayoutsDescription,searchForCountryText:e.searchForCountryText,formStep:e.formStep,supportLink:e.supportLink}}render(){var t,o;const j=d()?function(t){const[e,i]=h({namespace:b,initialValue:"/1"});console.log("PROPS",t);const r=v(t.stateController),o=Object.keys(r).reduce(((t,e)=>"sqm-tax-and-cash"===e?{...t,...r[e]}:{...t,[`${e}_stateController`]:r[e]}),{});return m({step:e,setStep:i},t.demoData||o||{},{arrayMerge:(t,e)=>e})}(this):function(){var t,e,o,d,m;const l=s(),p=n(),f=u(),[v,q]=h({namespace:b,initialValue:"/loading"}),[j,E]=h({namespace:g,initialValue:{}}),[L,R]=h({namespace:x,initialValue:{firstName:void 0,lastName:void 0,email:void 0,countryCode:void 0,currency:void 0}}),[F,_]=h({namespace:T,initialValue:[]}),[O,U]=h({namespace:S,initialValue:[]}),[D,G]=h({namespace:w,initialValue:[]}),{data:H,errors:M}=c({namespace:P,query:k,skip:!p,options:{batch:!1}}),Y=(null===(o=null===(e=null===(t=null==H?void 0:H.user)||void 0===t?void 0:t.impactConnection)||void 0===e?void 0:e.publisher)||void 0===o?void 0:o.countryCode)||L.countryCode;c({namespace:I,query:C,skip:!p});const{data:W}=c({namespace:A,query:B,skip:!p,variables:{filter:function(){var t,e,i;return"/1"===v?{}:"/4"===v?{currency_eq:null===(i=null===(e=null===(t=null==H?void 0:H.user)||void 0===t?void 0:t.impactConnection)||void 0===e?void 0:e.publisher)||void 0===i?void 0:i.currency}:Y?{countryCode_eq:Y}:{}}()}}),{data:Q}=c({namespace:N,query:V,skip:!p,variables:{locale:f}}),Z=i((()=>{var t,e;return null===(e=null===(t=null==W?void 0:W.impactFinanceNetworkSettings)||void 0===t?void 0:t.data)||void 0===e?void 0:e.reduce(((t,e)=>{var i,r;const o=null===(r=null===(i=null==Q?void 0:Q.currencies)||void 0===i?void 0:i.data)||void 0===r?void 0:r.find((t=>t.currencyCode===e.currency));return o?t.find((t=>t.currencyCode===e.currency))||L.countryCode&&e.countryCode!==Y?t:[...t,o]:t}),[])}),[W,Y]),z=(null==f?void 0:f.replace("_","-"))||"en",K=(t,e)=>t.displayName<e.displayName?-1:1,X=null===(d=null==W?void 0:W.impactFinanceNetworkSettings)||void 0===d?void 0:d.data,$=i((()=>new Set(null==X?void 0:X.map((t=>t.countryCode)).filter((t=>t)))),[X]),J=["CA","GB","US"],tt=i((()=>Array.from($).map((t=>y({countryCode:t,locale:z}))).sort(K).reduce(((t,e)=>J.includes(e.countryCode)?[e,...t]:[...t,e]),[])),[$]);return r((()=>{tt&&G(tt)}),[tt]),r((()=>{Z&&_(Z)}),[Z]),r((()=>{if(M)q("/error");else if(l&&p&&H){const t=null==H?void 0:H.user;if(!t||"/loading"!==v)return;const e=function(t){var e,i;if(!(null===(e=t.impactConnection)||void 0===e?void 0:e.connected)||!(null===(i=t.impactConnection)||void 0===i?void 0:i.publisher))return"/1";const{requiredTaxDocumentType:r,currentTaxDocument:o,withdrawalSettings:a,brandedSignup:s}=t.impactConnection.publisher;return r&&!o?"/3":!a&&s?"/4":"/dashboard"}(t);q(e)}}),[l,p,null===(m=null==H?void 0:H.user)||void 0===m?void 0:m.email,M]),{step:v,setStep:q,context:j,namespace:a(b),loading:"/loading"===v}}();if(null===(t=this.demoData)||void 0===t?void 0:t.showTextProps){const t=l(this);return e("div",null,null===(o=Object.keys(t))||void 0===o?void 0:o.map((t=>{if("demoData"!==t)return e("div",null,e("b",null,t,":")," ",this[t],e("hr",null))})))}return(()=>{switch(j.step){case"/1":return e("sqm-user-info-form",Object.assign({},this.getGeneralStepTextProps("step1_"),q(j,"sqm-user-info-form_")));case"/2":return e("sqm-indirect-tax-form",Object.assign({},this.getGeneralStepTextProps("step2_")));case"/3":return e("sqm-docusign-form",Object.assign({},this.getGeneralStepTextProps("step3_")));case"/4":return e("sqm-banking-info-form",Object.assign({},this.getGeneralStepTextProps("step4_")));case"/dashboard":return e("sqm-tax-and-cash-dashboard",Object.assign({},this.getGeneralStepTextProps("dashboard_"),q(j,"sqm-tax-and-cash-dashboard_")));case"/error":return e(p,{loadingErrorAlertHeader:this.loadingErrorAlertHeader,loadingErrorAlertDescription:this.loadingErrorAlertDescription})}})()||e(f,null)}};export{j as sqm_tax_and_cash}
@@ -1 +1 @@
1
- import{h as e}from"./p-f708da7b.js";import{i as t}from"./p-4f22fda2.js";import{c as o}from"./p-cef45012.js";import{A as s,a as r}from"./p-49b20dae.js";import{T as a}from"./p-e309a219.js";const i=o({Wrapper:s,Column:{...r},ButtonLink:{fontSize:"14px",color:"var(--sl-color-primary-500)",display:"inline-block !important","&:hover":{cursor:"pointer",textDecoration:"underline"}},ButtonLinkLoading:{fontSize:"14px",color:"var(--sl-color-gray-500)",opacity:"0.6",display:"inline-block !important",textDecoration:"underline","&:hover":{cursor:"not-allowed"}}}),n=i.toString();function l(o){const{states:s,callbacks:r,content:{email:l,verifyMessage:c,emailVerificationHeader:p,resendEmailButtonText:f,verificationStatusMessage:m,verificationLoadingMessage:d,verificationResentMessage:u}}=o;return e("div",{class:i.classes.Wrapper},e("style",{type:"text/css"},"\n:host {\n display: block;\n}\n:host([hidden]): {\n display: none;\n}\n",n),e(a,{type:"h3"},p),e("sl-form",{class:i.classes.Column,"onSl-submit":r.submit},o.states.error&&e("sqm-form-message",{type:"error",exportparts:"erroralert-icon"},e("div",{part:"erroralert-text"},o.states.error)),o.states.success&&e("sqm-form-message",{type:"success",exportparts:"successalert-icon"},e("div",{part:"successalert-text"},u)),e(a,{type:"p"},t.formatMessage({id:"verifyMessage",defaultMessage:c},{email:e("span",{style:{fontWeight:"var(--sl-font-weight-semibold)"}},l)})),e("p",{style:{color:"var(--sl-color-gray-500)",fontSize:"14px"}},t.formatMessage({id:"verificationStatus",defaultMessage:s.loadingVerification?d+" {countdown}":m},{countdown:s.loadingVerification?e("sl-spinner",null):s.countdown})),e("a",{class:s.loading?i.classes.ButtonLinkLoading:i.classes.ButtonLink,onClick:r.submit},f)))}export{l as P}
1
+ import{h as e}from"./p-f708da7b.js";import{i as t}from"./p-dc293b10.js";import{c as o}from"./p-cef45012.js";import{A as s,a as r}from"./p-49b20dae.js";import{T as a}from"./p-e309a219.js";const i=o({Wrapper:s,Column:{...r},ButtonLink:{fontSize:"14px",color:"var(--sl-color-primary-500)",display:"inline-block !important","&:hover":{cursor:"pointer",textDecoration:"underline"}},ButtonLinkLoading:{fontSize:"14px",color:"var(--sl-color-gray-500)",opacity:"0.6",display:"inline-block !important",textDecoration:"underline","&:hover":{cursor:"not-allowed"}}}),n=i.toString();function l(o){const{states:s,callbacks:r,content:{email:l,verifyMessage:c,emailVerificationHeader:p,resendEmailButtonText:m,verificationStatusMessage:d,verificationLoadingMessage:f,verificationResentMessage:u}}=o;return e("div",{class:i.classes.Wrapper},e("style",{type:"text/css"},"\n:host {\n display: block;\n}\n:host([hidden]): {\n display: none;\n}\n",n),e(a,{type:"h3"},p),e("sl-form",{class:i.classes.Column,"onSl-submit":r.submit},o.states.error&&e("sqm-form-message",{type:"error",exportparts:"erroralert-icon"},e("div",{part:"erroralert-text"},o.states.error)),o.states.success&&e("sqm-form-message",{type:"success",exportparts:"successalert-icon"},e("div",{part:"successalert-text"},u)),e(a,{type:"p"},t.formatMessage({id:"verifyMessage",defaultMessage:c},{email:e("span",{style:{fontWeight:"var(--sl-font-weight-semibold)"}},l)})),e("p",{style:{color:"var(--sl-color-gray-500)",fontSize:"14px"}},t.formatMessage({id:"verificationStatus",defaultMessage:s.loadingVerification?f+" {countdown}":d},{countdown:s.loadingVerification?e("sl-spinner",null):s.countdown})),e("a",{class:s.loading?i.classes.ButtonLinkLoading:i.classes.ButtonLink,onClick:r.submit},m)))}export{l as P}