@justifi/webcomponents 6.6.0 → 6.7.0

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 (555) hide show
  1. package/dist/cjs/{Refund-BX0mjsAQ.js → GooglePay-BwiJ_80p.js} +415 -0
  2. package/dist/cjs/additional-questions-details_5.cjs.entry.js +2 -2
  3. package/dist/cjs/{badge-_nY1l5Rq.js → badge-Cc87HAsf.js} +1 -1
  4. package/dist/cjs/bank-account-document-form-inputs_8.cjs.entry.js +9 -8
  5. package/dist/cjs/bank-account-form.cjs.entry.js +4 -4
  6. package/dist/cjs/business-details-core.cjs.entry.js +3 -3
  7. package/dist/cjs/{business.service-Dffp64u6.js → business.service-q93NsTG_.js} +1 -1
  8. package/dist/cjs/{button-CARQPDm-.js → button-fUPGXjU_.js} +1 -1
  9. package/dist/cjs/card-form.cjs.entry.js +4 -4
  10. package/dist/cjs/{check-pkg-version-DZC7jOGP.js → check-pkg-version-nSgWWvdw.js} +2 -2
  11. package/dist/cjs/{checkout.service-C1HcsrjQ.js → checkout.service-CwelwhrT.js} +1 -1
  12. package/dist/cjs/checkouts-list-core.cjs.entry.js +8 -7
  13. package/dist/cjs/{checkouts-table-Bgqkaez4.js → checkouts-table-BBtqxG2F.js} +2 -2
  14. package/dist/cjs/custom-popper_2.cjs.entry.js +3 -3
  15. package/dist/cjs/{dispute.service-CJsWYMYk.js → dispute.service-q5ha39uN.js} +1 -1
  16. package/dist/cjs/form-alert_5.cjs.entry.js +1 -1
  17. package/dist/cjs/form-control-checkbox.cjs.entry.js +5 -5
  18. package/dist/cjs/form-control-date.cjs.entry.js +4 -4
  19. package/dist/cjs/{form-control-error-text-mhOq2Edp.js → form-control-error-text-Dg_65HGK.js} +1 -1
  20. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +5 -5
  21. package/dist/cjs/{form-control-help-text-BoRpAoX6.js → form-control-help-text-tB5u1-5M.js} +1 -1
  22. package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +3 -3
  23. package/dist/cjs/form-control-monetary.cjs.entry.js +5 -5
  24. package/dist/cjs/form-control-number-masked_3.cjs.entry.js +4 -4
  25. package/dist/cjs/form-control-number.cjs.entry.js +5 -5
  26. package/dist/cjs/form-control-radio.cjs.entry.js +3 -3
  27. package/dist/cjs/form-control-select_2.cjs.entry.js +6 -6
  28. package/dist/cjs/{get-payment-details-BblcGN2B.js → get-payment-details-DidIAK2i.js} +2 -2
  29. package/dist/cjs/{get-subaccounts-z4dNQDjx.js → get-subaccounts-BE_wcfM7.js} +2 -2
  30. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +4 -4
  31. package/dist/cjs/{header-1-CBO8uDuZ.js → header-1-Bqejh9no.js} +1 -1
  32. package/dist/cjs/{header-3-CPWtI1t0.js → header-3-DQ649Me2.js} +1 -1
  33. package/dist/cjs/hidden-input_2.cjs.entry.js +7 -7
  34. package/dist/cjs/{index-C2ITzalN.js → index-CajjbB9t.js} +1 -0
  35. package/dist/cjs/index.cjs.js +1 -1
  36. package/dist/cjs/{insurance-state-BMHITXoD.js → insurance-state-DsGnIHMM.js} +1 -1
  37. package/dist/cjs/internal-tokenize-payment-method_7.cjs.entry.js +25 -26
  38. package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +12 -11
  39. package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +9 -9
  40. package/dist/cjs/{justifi-apple-pay_7.cjs.entry.js → justifi-apple-pay_8.cjs.entry.js} +904 -258
  41. package/dist/cjs/justifi-bank-account-billing-form-simple_3.cjs.entry.js +4 -4
  42. package/dist/cjs/justifi-business-details.cjs.entry.js +7 -6
  43. package/dist/cjs/justifi-business-form.cjs.entry.js +9 -8
  44. package/dist/cjs/justifi-checkout.cjs.entry.js +15 -16
  45. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +26 -12
  46. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +11 -10
  47. package/dist/cjs/justifi-details.cjs.entry.js +2 -2
  48. package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +1 -1
  49. package/dist/cjs/justifi-dispute-management.cjs.entry.js +6 -5
  50. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +12 -11
  51. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +6 -5
  52. package/dist/cjs/justifi-order-terminals.cjs.entry.js +12 -11
  53. package/dist/cjs/justifi-payment-details.cjs.entry.js +8 -7
  54. package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +2 -2
  55. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +5 -4
  56. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +10 -9
  57. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +3 -3
  58. package/dist/cjs/justifi-payments-list.cjs.entry.js +11 -10
  59. package/dist/cjs/justifi-payout-details.cjs.entry.js +8 -7
  60. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +10 -9
  61. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +3 -3
  62. package/dist/cjs/justifi-payouts-list.cjs.entry.js +12 -11
  63. package/dist/cjs/justifi-refund-payment.cjs.entry.js +13 -12
  64. package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +2 -2
  65. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +10 -11
  66. package/dist/cjs/justifi-skeleton.cjs.entry.js +3 -3
  67. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +13 -12
  68. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +9 -8
  69. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +9 -8
  70. package/dist/cjs/justifi-terminals-list.cjs.entry.js +11 -10
  71. package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +1 -1
  72. package/dist/cjs/loader.cjs.js +1 -1
  73. package/dist/cjs/owner-form-core_2.cjs.entry.js +2 -2
  74. package/dist/cjs/{package-CkO7M9IQ.js → package-B8gOzTFM.js} +1 -1
  75. package/dist/cjs/pagination-menu.cjs.entry.js +1 -1
  76. package/dist/cjs/{parts-Pb06tUMp.js → parts-BVbaniVM.js} +6 -0
  77. package/dist/cjs/payment-details-core.cjs.entry.js +16 -15
  78. package/dist/cjs/payment-method-option.cjs.entry.js +2 -2
  79. package/dist/cjs/{payment.service-BZatGHKc.js → payment.service-CyHFdJ7n.js} +1 -1
  80. package/dist/cjs/payments-list-core.cjs.entry.js +9 -8
  81. package/dist/cjs/{payments-status-t4fVj8f9.js → payments-status-BP4u31jU.js} +1 -1
  82. package/dist/cjs/{payments-table-CaJt-yMH.js → payments-table-CWXVhECV.js} +2 -2
  83. package/dist/cjs/payout-details-core.cjs.entry.js +9 -9
  84. package/dist/cjs/{payout.service-DbgLWhwh.js → payout.service-Half-hdB.js} +1 -1
  85. package/dist/cjs/payouts-list-core.cjs.entry.js +9 -8
  86. package/dist/cjs/{payouts-status-pIO9qZG6.js → payouts-status-CM5Zy-0J.js} +1 -1
  87. package/dist/cjs/{payouts-table-DZv0WnTS.js → payouts-table-ZLTcfkUm.js} +2 -2
  88. package/dist/cjs/{skeleton-BF3HGL9X.js → skeleton-B8dzxFFr.js} +1 -1
  89. package/dist/cjs/{spinner-BBdv3Iq1.js → spinner-jHyLNCGO.js} +1 -1
  90. package/dist/cjs/{table-CfBpaApw.js → table-CrtpRwGN.js} +2 -2
  91. package/dist/cjs/table-filters-menu.cjs.entry.js +3 -3
  92. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +8 -7
  93. package/dist/cjs/{terminal-orders-table-F-ZFUBwH.js → terminal-orders-table-DT53anT3.js} +5 -5
  94. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +2 -2
  95. package/dist/cjs/{terminal.service-KC8wBTJJ.js → terminal.service-CFt55QNO.js} +1 -1
  96. package/dist/cjs/terminals-list-core.cjs.entry.js +8 -7
  97. package/dist/cjs/{terminals-table-D7sf_DBN.js → terminals-table-DahpSz98.js} +2 -2
  98. package/dist/cjs/{utils-Cjq3ZCad.js → utils-CMiA4X7s.js} +1 -1
  99. package/dist/cjs/webcomponents.cjs.js +1 -1
  100. package/dist/collection/api/GooglePay.js +181 -0
  101. package/dist/collection/api/index.js +2 -0
  102. package/dist/collection/api/services/google-pay.service.js +240 -0
  103. package/dist/collection/collection-manifest.json +1 -0
  104. package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +2 -2
  105. package/dist/collection/components/checkout/card-form/card-form.js +2 -2
  106. package/dist/collection/components/checkout/checkout.js +2 -2
  107. package/dist/collection/components/checkout/save-new-payment-method.js +1 -1
  108. package/dist/collection/components/checkout/saved-payment-method.js +1 -1
  109. package/dist/collection/components/checkouts-list/checkouts-list-core.js +1 -1
  110. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +72 -2
  111. package/dist/collection/components/checkouts-list/checkouts-list.js +1 -1
  112. package/dist/collection/components/dispute-management/dispute-management-core.js +1 -1
  113. package/dist/collection/components/dispute-management/dispute-management.js +1 -1
  114. package/dist/collection/components/dispute-management/dispute-notification.js +2 -2
  115. package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +1 -1
  116. package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +1 -1
  117. package/dist/collection/components/dispute-management/dispute-response/customer-details.js +1 -1
  118. package/dist/collection/components/dispute-management/dispute-response/dispute-response-core.js +1 -1
  119. package/dist/collection/components/dispute-management/dispute-response/dispute-response.js +1 -1
  120. package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +1 -1
  121. package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +1 -1
  122. package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +1 -1
  123. package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +1 -1
  124. package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +1 -1
  125. package/dist/collection/components/filters/table-filters-menu.js +1 -1
  126. package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +1 -1
  127. package/dist/collection/components/modular-checkout/ModularCheckout.js +1 -0
  128. package/dist/collection/components/modular-checkout/modular-checkout.js +44 -6
  129. package/dist/collection/components/modular-checkout/sub-components/bank-account-billing-form-simple.js +1 -1
  130. package/dist/collection/components/modular-checkout/sub-components/bank-account.js +2 -2
  131. package/dist/collection/components/modular-checkout/sub-components/card-billing-form-simple.js +1 -1
  132. package/dist/collection/components/modular-checkout/sub-components/card-form.js +2 -2
  133. package/dist/collection/components/modular-checkout/sub-components/google-pay-skeleton.js +10 -0
  134. package/dist/collection/components/modular-checkout/sub-components/google-pay.js +609 -0
  135. package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
  136. package/dist/collection/components/modular-checkout/sub-components/summary.js +1 -1
  137. package/dist/collection/components/order-terminals/order-terminals.js +1 -1
  138. package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
  139. package/dist/collection/components/payment-details/payment-details-core.js +8 -8
  140. package/dist/collection/components/payment-transactions-list/payment-transactions-list.js +1 -1
  141. package/dist/collection/components/payments-list/payments-list-core.js +1 -1
  142. package/dist/collection/components/payments-list/payments-list-filters.js +2 -2
  143. package/dist/collection/components/payments-list/payments-list.js +1 -1
  144. package/dist/collection/components/payout-details/payout-details-core.js +3 -3
  145. package/dist/collection/components/payout-transactions-list/payout-transactions-list.js +1 -1
  146. package/dist/collection/components/payouts-list/payouts-list-core.js +1 -1
  147. package/dist/collection/components/payouts-list/payouts-list-filters.js +2 -2
  148. package/dist/collection/components/payouts-list/payouts-list.js +1 -1
  149. package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +1 -1
  150. package/dist/collection/components/terminal-orders-list/terminal-orders-list-filters.js +2 -2
  151. package/dist/collection/components/terminal-orders-list/terminal-orders-list.js +1 -1
  152. package/dist/collection/components/terminals-list/terminals-list-core.js +1 -1
  153. package/dist/collection/components/terminals-list/terminals-list-filters.js +1 -1
  154. package/dist/collection/components/terminals-list/terminals-list.js +1 -1
  155. package/dist/collection/components/tokenize-payment-method/internal-tokenize-payment-method.js +1 -1
  156. package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +1 -1
  157. package/dist/collection/store/checkout.store.js +4 -0
  158. package/dist/collection/styles/parts.js +3 -0
  159. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  160. package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
  161. package/dist/collection/ui-components/form/form-control-date.js +2 -2
  162. package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
  163. package/dist/collection/ui-components/form/form-control-file.js +2 -2
  164. package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
  165. package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
  166. package/dist/collection/ui-components/form/form-control-number.js +2 -2
  167. package/dist/collection/ui-components/form/form-control-radio.js +2 -2
  168. package/dist/collection/ui-components/form/form-control-select.js +2 -2
  169. package/dist/collection/ui-components/form/form-control-text.js +2 -2
  170. package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
  171. package/dist/collection/ui-components/form/hidden-input.js +1 -1
  172. package/dist/collection/ui-components/form/iframe-input.js +3 -3
  173. package/dist/collection/ui-components/google-pay-button.js +251 -0
  174. package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
  175. package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
  176. package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
  177. package/dist/docs.json +727 -102
  178. package/dist/esm/{Refund-DDWRtCuX.js → GooglePay-NNHE-OLJ.js} +405 -1
  179. package/dist/esm/additional-questions-details_5.entry.js +2 -2
  180. package/dist/esm/{badge-BWd10d-w.js → badge-DtrH25ss.js} +1 -1
  181. package/dist/esm/bank-account-document-form-inputs_8.entry.js +8 -7
  182. package/dist/esm/bank-account-form.entry.js +4 -4
  183. package/dist/esm/business-details-core.entry.js +3 -3
  184. package/dist/esm/{business.service-CmSijtcP.js → business.service-BrUSam2T.js} +1 -1
  185. package/dist/esm/{button-BDwVDLs-.js → button-Bpf3VX8Q.js} +1 -1
  186. package/dist/esm/card-form.entry.js +4 -4
  187. package/dist/esm/{check-pkg-version-B83yUQEx.js → check-pkg-version-CmkUoEAo.js} +2 -2
  188. package/dist/esm/{checkout.service-E60GnrZv.js → checkout.service-Bxt1qPaY.js} +1 -1
  189. package/dist/esm/checkouts-list-core.entry.js +8 -7
  190. package/dist/esm/{checkouts-table-BVWL1wN9.js → checkouts-table-CB4GdlcZ.js} +2 -2
  191. package/dist/esm/custom-popper_2.entry.js +3 -3
  192. package/dist/esm/{dispute.service-CAZJigrO.js → dispute.service-DYRYxxaT.js} +1 -1
  193. package/dist/esm/form-alert_5.entry.js +1 -1
  194. package/dist/esm/form-control-checkbox.entry.js +5 -5
  195. package/dist/esm/form-control-date.entry.js +4 -4
  196. package/dist/esm/{form-control-error-text-BYooqu0N.js → form-control-error-text-BZYykCDp.js} +1 -1
  197. package/dist/esm/form-control-file-v2_2.entry.js +5 -5
  198. package/dist/esm/{form-control-help-text-CF1UA5Sl.js → form-control-help-text-D-p66Yxr.js} +1 -1
  199. package/dist/esm/form-control-monetary-provisioning.entry.js +3 -3
  200. package/dist/esm/form-control-monetary.entry.js +5 -5
  201. package/dist/esm/form-control-number-masked_3.entry.js +4 -4
  202. package/dist/esm/form-control-number.entry.js +5 -5
  203. package/dist/esm/form-control-radio.entry.js +3 -3
  204. package/dist/esm/form-control-select_2.entry.js +6 -6
  205. package/dist/esm/{get-payment-details-Dg5WRkOM.js → get-payment-details-BJ1PLhJZ.js} +1 -1
  206. package/dist/esm/{get-subaccounts-CbxzednA.js → get-subaccounts-CzGHjlUF.js} +1 -1
  207. package/dist/esm/gross-payment-chart-core.entry.js +4 -4
  208. package/dist/esm/{header-1-CzkA4zNY.js → header-1-WwkF5F9y.js} +1 -1
  209. package/dist/esm/{header-3-eIE1RpMN.js → header-3-C5jS39cE.js} +1 -1
  210. package/dist/esm/hidden-input_2.entry.js +7 -7
  211. package/dist/esm/{index-DCIW8z1f.js → index-DkoufM1t.js} +1 -0
  212. package/dist/esm/index.js +1 -1
  213. package/dist/esm/{insurance-state-By2QaBZo.js → insurance-state-C11WKZU6.js} +1 -1
  214. package/dist/esm/internal-tokenize-payment-method_7.entry.js +14 -15
  215. package/dist/esm/justifi-additional-questions-form-step_9.entry.js +6 -5
  216. package/dist/esm/justifi-additional-statement_8.entry.js +9 -9
  217. package/dist/esm/{justifi-apple-pay_7.entry.js → justifi-apple-pay_8.entry.js} +787 -142
  218. package/dist/esm/justifi-bank-account-billing-form-simple_3.entry.js +4 -4
  219. package/dist/esm/justifi-business-details.entry.js +7 -6
  220. package/dist/esm/justifi-business-form.entry.js +9 -8
  221. package/dist/esm/justifi-checkout.entry.js +8 -9
  222. package/dist/esm/justifi-checkouts-list-filters.entry.js +19 -5
  223. package/dist/esm/justifi-checkouts-list.entry.js +10 -9
  224. package/dist/esm/justifi-details.entry.js +2 -2
  225. package/dist/esm/justifi-dispute-management-core.entry.js +1 -1
  226. package/dist/esm/justifi-dispute-management.entry.js +6 -5
  227. package/dist/esm/justifi-dispute-notification_3.entry.js +12 -11
  228. package/dist/esm/justifi-gross-payment-chart.entry.js +6 -5
  229. package/dist/esm/justifi-order-terminals.entry.js +9 -8
  230. package/dist/esm/justifi-payment-details.entry.js +8 -7
  231. package/dist/esm/justifi-payment-provisioning-core.entry.js +2 -2
  232. package/dist/esm/justifi-payment-provisioning.entry.js +5 -4
  233. package/dist/esm/justifi-payment-transactions-list.entry.js +9 -8
  234. package/dist/esm/justifi-payments-list-filters.entry.js +3 -3
  235. package/dist/esm/justifi-payments-list.entry.js +10 -9
  236. package/dist/esm/justifi-payout-details.entry.js +7 -6
  237. package/dist/esm/justifi-payout-transactions-list.entry.js +9 -8
  238. package/dist/esm/justifi-payouts-list-filters.entry.js +3 -3
  239. package/dist/esm/justifi-payouts-list.entry.js +11 -10
  240. package/dist/esm/justifi-refund-payment.entry.js +9 -8
  241. package/dist/esm/justifi-saved-payment-method.entry.js +2 -2
  242. package/dist/esm/justifi-season-interruption-insurance.entry.js +7 -8
  243. package/dist/esm/justifi-skeleton.entry.js +3 -3
  244. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +5 -4
  245. package/dist/esm/justifi-terminal-orders-list.entry.js +8 -7
  246. package/dist/esm/justifi-terminals-list-filters.entry.js +4 -3
  247. package/dist/esm/justifi-terminals-list.entry.js +10 -9
  248. package/dist/esm/justifi-tokenize-payment-method.entry.js +1 -1
  249. package/dist/esm/loader.js +1 -1
  250. package/dist/esm/owner-form-core_2.entry.js +2 -2
  251. package/dist/esm/{package-CdVle3mx.js → package-CsRppqXL.js} +1 -1
  252. package/dist/esm/pagination-menu.entry.js +1 -1
  253. package/dist/esm/{parts-QmGrQis7.js → parts-sA8HBfkI.js} +4 -1
  254. package/dist/esm/payment-details-core.entry.js +15 -14
  255. package/dist/esm/payment-method-option.entry.js +2 -2
  256. package/dist/esm/{payment.service-CWc5BPv-.js → payment.service-BoGemgMw.js} +1 -1
  257. package/dist/esm/payments-list-core.entry.js +9 -8
  258. package/dist/esm/{payments-status-BdCVusHE.js → payments-status-CADg1cD0.js} +1 -1
  259. package/dist/esm/{payments-table-9rC3BvV0.js → payments-table-C6zHWwGO.js} +2 -2
  260. package/dist/esm/payout-details-core.entry.js +9 -9
  261. package/dist/esm/{payout.service-iBVqRzf_.js → payout.service-BSG50wqN.js} +1 -1
  262. package/dist/esm/payouts-list-core.entry.js +9 -8
  263. package/dist/esm/{payouts-status-DhowllYh.js → payouts-status-4VDQvaYV.js} +1 -1
  264. package/dist/esm/{payouts-table-Ci_J6mmU.js → payouts-table-BU5XbzB9.js} +2 -2
  265. package/dist/esm/{skeleton-BX70wCwq.js → skeleton-Dtt56Fl3.js} +1 -1
  266. package/dist/esm/{spinner-CcDNFgNu.js → spinner-DikooWuI.js} +1 -1
  267. package/dist/esm/{table-KZoMaoUh.js → table-1hqe6s5m.js} +2 -2
  268. package/dist/esm/table-filters-menu.entry.js +3 -3
  269. package/dist/esm/terminal-orders-list-core.entry.js +8 -7
  270. package/dist/esm/{terminal-orders-table-BGiWS5cM.js → terminal-orders-table-BsVBelxB.js} +3 -3
  271. package/dist/esm/terminal-quantity-selector.entry.js +2 -2
  272. package/dist/esm/{terminal.service-CxSKhtwB.js → terminal.service-YKfi6Mr9.js} +1 -1
  273. package/dist/esm/terminals-list-core.entry.js +8 -7
  274. package/dist/esm/{terminals-table-DROFEdyn.js → terminals-table-CXJTn-0I.js} +2 -2
  275. package/dist/esm/{utils-C1PX_3uA.js → utils-CgFsPVsv.js} +1 -1
  276. package/dist/esm/webcomponents.js +1 -1
  277. package/dist/module/Analytics.js +2 -0
  278. package/dist/module/ApplePay.js +121 -0
  279. package/dist/module/GooglePay.js +184 -0
  280. package/dist/module/ModularCheckout.js +1 -0
  281. package/dist/module/additional-statement.js +1 -1
  282. package/dist/module/apple-pay.js +1 -120
  283. package/dist/module/bank-account-billing-form-simple.js +1 -1
  284. package/dist/module/bank-account-document-inputs.js +2 -0
  285. package/dist/module/bank-account-form.js +2 -2
  286. package/dist/module/bank-account.js +2 -2
  287. package/dist/module/business-bank-account-form-step.js +2 -0
  288. package/dist/module/business-terms-conditions-form-step.js +2 -0
  289. package/dist/module/business.service.js +2 -0
  290. package/dist/module/cancellation-policy.js +1 -1
  291. package/dist/module/card-billing-form-simple.js +1 -1
  292. package/dist/module/card-form.js +2 -2
  293. package/dist/module/card-form2.js +2 -2
  294. package/dist/module/checkout.service.js +2 -0
  295. package/dist/module/checkout.store.js +4 -0
  296. package/dist/module/checkouts-list-core2.js +4 -2
  297. package/dist/module/custom-popper2.js +2 -2
  298. package/dist/module/customer-details.js +1 -1
  299. package/dist/module/dispute-management-core.js +1 -1
  300. package/dist/module/dispute-notification.js +2 -2
  301. package/dist/module/dispute-response-actions.js +2 -0
  302. package/dist/module/dispute-response-core.js +1 -1
  303. package/dist/module/dispute-response.js +1 -1
  304. package/dist/module/duplicate-charge.js +1 -1
  305. package/dist/module/electronic-evidence.js +1 -1
  306. package/dist/module/form-control-checkbox2.js +2 -2
  307. package/dist/module/form-control-date2.js +2 -2
  308. package/dist/module/form-control-file-v22.js +1 -1
  309. package/dist/module/form-control-file2.js +2 -2
  310. package/dist/module/form-control-monetary2.js +2 -2
  311. package/dist/module/form-control-number-masked2.js +2 -2
  312. package/dist/module/form-control-number.js +2 -2
  313. package/dist/module/form-control-radio2.js +2 -2
  314. package/dist/module/form-control-select2.js +2 -2
  315. package/dist/module/form-control-text2.js +2 -2
  316. package/dist/module/form-control-textarea2.js +2 -2
  317. package/dist/module/get-payment-details.js +2 -0
  318. package/dist/module/get-subaccounts.js +2 -0
  319. package/dist/module/google-pay.js +781 -0
  320. package/dist/module/gross-payment-chart-core2.js +1 -1
  321. package/dist/module/hidden-input2.js +1 -1
  322. package/dist/module/iframe-input2.js +3 -3
  323. package/dist/module/internal-tokenize-payment-method2.js +3 -1
  324. package/dist/module/justifi-business-form.js +2 -0
  325. package/dist/module/justifi-button2.js +1 -1
  326. package/dist/module/justifi-checkout.js +46 -40
  327. package/dist/module/justifi-checkouts-list-filters.js +37 -8
  328. package/dist/module/justifi-checkouts-list.js +3 -1
  329. package/dist/module/justifi-dispute-management.js +1 -1
  330. package/dist/module/justifi-google-pay.d.ts +11 -0
  331. package/dist/module/justifi-google-pay.js +6 -0
  332. package/dist/module/justifi-gross-payment-chart.js +2 -0
  333. package/dist/module/justifi-header2.js +1 -1
  334. package/dist/module/justifi-order-terminals.js +3 -1
  335. package/dist/module/justifi-payment-provisioning.js +2 -0
  336. package/dist/module/justifi-payment-transactions-list.js +5 -3
  337. package/dist/module/justifi-payments-list-filters.js +4 -4
  338. package/dist/module/justifi-payments-list.js +3 -1
  339. package/dist/module/justifi-payout-details.js +2 -0
  340. package/dist/module/justifi-payout-transactions-list.js +5 -3
  341. package/dist/module/justifi-payouts-list-filters.js +4 -4
  342. package/dist/module/justifi-payouts-list.js +3 -1
  343. package/dist/module/justifi-refund-payment.js +2 -0
  344. package/dist/module/justifi-saved-payment-method.js +1 -1
  345. package/dist/module/justifi-season-interruption-insurance.js +2 -0
  346. package/dist/module/justifi-skeleton.js +1 -1
  347. package/dist/module/justifi-terminal-orders-list-filters.js +6 -4
  348. package/dist/module/justifi-terminal-orders-list.js +3 -1
  349. package/dist/module/justifi-terminals-list-filters.js +4 -2
  350. package/dist/module/justifi-terminals-list.js +3 -1
  351. package/dist/module/justifi-tokenize-payment-method.js +1 -1
  352. package/dist/module/modular-checkout.js +46 -6
  353. package/dist/module/package.js +1 -1
  354. package/dist/module/parts.js +4 -1
  355. package/dist/module/payment-details-core2.js +10 -8
  356. package/dist/module/payment-method-option.js +1 -1
  357. package/dist/module/payment.service.js +2 -0
  358. package/dist/module/payments-list-core2.js +5 -3
  359. package/dist/module/payout-details-core2.js +3 -3
  360. package/dist/module/payout.service.js +2 -0
  361. package/dist/module/payouts-list-core2.js +5 -3
  362. package/dist/module/plaid.service.js +2 -0
  363. package/dist/module/product-or-service.js +1 -1
  364. package/dist/module/refund-policy.js +1 -1
  365. package/dist/module/save-new-payment-method.js +1 -1
  366. package/dist/module/shipping-details.js +1 -1
  367. package/dist/module/summary.js +1 -1
  368. package/dist/module/table-filters-menu2.js +2 -2
  369. package/dist/module/table.js +1 -1
  370. package/dist/module/terminal-orders-list-core2.js +5 -3
  371. package/dist/module/terminal-quantity-selector2.js +1 -1
  372. package/dist/module/terminal.service.js +2 -0
  373. package/dist/module/terminals-list-core2.js +4 -2
  374. package/dist/module/utils2.js +1 -1
  375. package/dist/types/api/Checkout.d.ts +5 -0
  376. package/dist/types/api/GooglePay.d.ts +271 -0
  377. package/dist/types/api/index.d.ts +2 -0
  378. package/dist/types/api/services/google-pay.service.d.ts +60 -0
  379. package/dist/types/components/checkout/checkout.d.ts +1 -0
  380. package/dist/types/components/checkouts-list/checkouts-list-filters.d.ts +5 -0
  381. package/dist/types/components/modular-checkout/ModularCheckout.d.ts +2 -1
  382. package/dist/types/components/modular-checkout/modular-checkout.d.ts +5 -0
  383. package/dist/types/components/modular-checkout/sub-components/google-pay-skeleton.d.ts +6 -0
  384. package/dist/types/components/modular-checkout/sub-components/google-pay.d.ts +59 -0
  385. package/dist/types/components.d.ts +146 -0
  386. package/dist/types/store/checkout.store.d.ts +1 -0
  387. package/dist/types/styles/parts.d.ts +3 -0
  388. package/dist/types/ui-components/google-pay-button.d.ts +18 -0
  389. package/dist/webcomponents/index.esm.js +1 -1
  390. package/dist/webcomponents/p-016b3e4c.entry.js +1 -0
  391. package/dist/webcomponents/p-04ec17bb.entry.js +1 -0
  392. package/dist/webcomponents/p-06cae9e2.entry.js +1 -0
  393. package/dist/webcomponents/p-06f81525.entry.js +1 -0
  394. package/dist/webcomponents/p-095cedc5.entry.js +1 -0
  395. package/dist/webcomponents/{p-3482ab40.entry.js → p-0b7c4ed5.entry.js} +1 -1
  396. package/dist/webcomponents/{p-9c7c60f3.entry.js → p-0bb616fc.entry.js} +1 -1
  397. package/dist/webcomponents/p-0e981c28.entry.js +1 -0
  398. package/dist/webcomponents/p-1575ca68.entry.js +1 -0
  399. package/dist/webcomponents/p-15ceeea7.entry.js +1 -0
  400. package/dist/webcomponents/{p-8740871d.entry.js → p-1a327b0e.entry.js} +1 -1
  401. package/dist/webcomponents/p-1e761d96.entry.js +1 -0
  402. package/dist/webcomponents/{p-0eb7abed.entry.js → p-20e85114.entry.js} +1 -1
  403. package/dist/webcomponents/{p-5490e39c.entry.js → p-368b37ad.entry.js} +1 -1
  404. package/dist/webcomponents/{p-d41ad7a8.entry.js → p-36a0af30.entry.js} +1 -1
  405. package/dist/webcomponents/p-3a3935a3.entry.js +1 -0
  406. package/dist/webcomponents/p-4d2589b2.entry.js +1 -0
  407. package/dist/webcomponents/{p-fdcb24aa.entry.js → p-50400c5e.entry.js} +1 -1
  408. package/dist/webcomponents/{p-99c1059c.entry.js → p-511e80a4.entry.js} +1 -1
  409. package/dist/webcomponents/p-5996879d.entry.js +1 -0
  410. package/dist/webcomponents/p-5a748e49.entry.js +1 -0
  411. package/dist/webcomponents/p-6454626a.entry.js +1 -0
  412. package/dist/webcomponents/p-66713269.entry.js +1 -0
  413. package/dist/webcomponents/p-679b36b5.entry.js +1 -0
  414. package/dist/webcomponents/{p-c9920e22.entry.js → p-725319f3.entry.js} +1 -1
  415. package/dist/webcomponents/p-74fea39c.entry.js +1 -0
  416. package/dist/webcomponents/p-77754a65.entry.js +1 -0
  417. package/dist/webcomponents/p-87988b4d.entry.js +1 -0
  418. package/dist/webcomponents/p-88a8741b.entry.js +1 -0
  419. package/dist/webcomponents/{p-c3a625ec.entry.js → p-897b794b.entry.js} +4 -4
  420. package/dist/webcomponents/p-899b981b.entry.js +1 -0
  421. package/dist/webcomponents/p-8c4b502d.entry.js +1 -0
  422. package/dist/webcomponents/p-8df30672.entry.js +1 -0
  423. package/dist/webcomponents/p-911b3d63.entry.js +1 -0
  424. package/dist/webcomponents/p-97b8bf5c.entry.js +1 -0
  425. package/dist/webcomponents/p-9b74a642.entry.js +1 -0
  426. package/dist/webcomponents/p-9b8aee30.entry.js +1 -0
  427. package/dist/webcomponents/p-9c1aa22d.entry.js +1 -0
  428. package/dist/webcomponents/p-9e94c9ef.entry.js +1 -0
  429. package/dist/webcomponents/{p-B69TWr1K.js → p-B4xdk4mG.js} +1 -1
  430. package/dist/webcomponents/{p-gcRtE71H.js → p-BMJe4lzg.js} +1 -1
  431. package/dist/webcomponents/p-BhqSAzpT.js +1 -0
  432. package/dist/webcomponents/p-BrRsgB8S.js +1 -0
  433. package/dist/webcomponents/{p-DUQxAYW4.js → p-C2Senazf.js} +1 -1
  434. package/dist/webcomponents/p-C9VmfRis.js +1 -0
  435. package/dist/webcomponents/{p-BDRSfgZJ.js → p-CBbwdoSa.js} +1 -1
  436. package/dist/webcomponents/{p-C0FpWzgU.js → p-CCxsFwC4.js} +1 -1
  437. package/dist/webcomponents/p-CK_XkZku.js +1 -0
  438. package/dist/webcomponents/p-CQGIjIgZ.js +1 -0
  439. package/dist/webcomponents/{p-Qmo430x1.js → p-CV8xqdt6.js} +1 -1
  440. package/dist/webcomponents/p-CZ3F1ZAT.js +1 -0
  441. package/dist/webcomponents/p-CgiDds_u.js +1 -0
  442. package/dist/webcomponents/p-CsRppqXL.js +1 -0
  443. package/dist/webcomponents/p-CsgUIrv8.js +1 -0
  444. package/dist/webcomponents/{p-BIzMmHpn.js → p-D6bKoyRc.js} +1 -1
  445. package/dist/webcomponents/{p-E8uzhk39.js → p-DATDsXcA.js} +1 -1
  446. package/dist/webcomponents/{p-H_emngUs.js → p-DGGjRqDa.js} +1 -1
  447. package/dist/webcomponents/{p-MFnmyvti.js → p-DISrhs4v.js} +1 -1
  448. package/dist/webcomponents/{p-CJ4viNrp.js → p-DUmUUj9r.js} +1 -1
  449. package/dist/webcomponents/p-DY_3dcgR.js +1 -0
  450. package/dist/webcomponents/{p-DircQtPA.js → p-Dit3fZpU.js} +1 -1
  451. package/dist/webcomponents/p-DkoufM1t.js +1 -0
  452. package/dist/webcomponents/{p-DcHTywGe.js → p-Dlrq1iZf.js} +1 -1
  453. package/dist/webcomponents/p-DmdEjScI.js +1 -0
  454. package/dist/webcomponents/p-RTAZ4tdd.js +1 -0
  455. package/dist/webcomponents/p-Ty7R7tsw.js +1 -0
  456. package/dist/webcomponents/{p-CYz0Hubu.js → p-U3nU15el.js} +1 -1
  457. package/dist/webcomponents/{p-CjfgyxBN.js → p-VRubcA-q.js} +1 -1
  458. package/dist/webcomponents/{p-KS3Bf_2D.js → p-W9WWoLzT.js} +1 -1
  459. package/dist/webcomponents/p-a0b4c42b.entry.js +1 -0
  460. package/dist/webcomponents/p-aa145996.entry.js +1 -0
  461. package/dist/webcomponents/p-b0f0d53c.entry.js +1 -0
  462. package/dist/webcomponents/p-b2a0cbad.entry.js +1 -0
  463. package/dist/webcomponents/p-b5b49e86.entry.js +1 -0
  464. package/dist/webcomponents/p-c0bd4e9a.entry.js +1 -0
  465. package/dist/webcomponents/p-c4585b68.entry.js +1 -0
  466. package/dist/webcomponents/p-c920dc54.entry.js +1 -0
  467. package/dist/webcomponents/{p-b31bf32a.entry.js → p-cdf1e61c.entry.js} +1 -1
  468. package/dist/webcomponents/{p-d79f9a54.entry.js → p-d0c4b0ea.entry.js} +1 -1
  469. package/dist/webcomponents/p-d2981754.entry.js +1 -0
  470. package/dist/webcomponents/p-d9cdd873.entry.js +1 -0
  471. package/dist/webcomponents/{p-dd0c456f.entry.js → p-e4335938.entry.js} +1 -1
  472. package/dist/webcomponents/{p-c8bd7e0d.entry.js → p-e805b011.entry.js} +1 -1
  473. package/dist/webcomponents/p-eada0422.entry.js +1 -0
  474. package/dist/webcomponents/p-ef04f334.entry.js +1 -0
  475. package/dist/webcomponents/p-f23428da.entry.js +1 -0
  476. package/dist/webcomponents/p-f30c939f.entry.js +1 -0
  477. package/dist/webcomponents/p-f5dd3fa4.entry.js +1 -0
  478. package/dist/webcomponents/{p-50308873.entry.js → p-f99403d8.entry.js} +1 -1
  479. package/dist/webcomponents/p-fb644da6.entry.js +1 -0
  480. package/dist/webcomponents/p-fc4b27ec.entry.js +1 -0
  481. package/dist/webcomponents/p-fc8f55d7.entry.js +1 -0
  482. package/dist/webcomponents/p-fe43449c.entry.js +1 -0
  483. package/dist/webcomponents/p-fe73b09b.entry.js +1 -0
  484. package/dist/webcomponents/p-ff5981fb.entry.js +1 -0
  485. package/dist/webcomponents/p-sA8HBfkI.js +1 -0
  486. package/dist/webcomponents/webcomponents.esm.js +1 -1
  487. package/package.json +1 -1
  488. package/dist/cjs/checkout.store-BA6h-dp2.js +0 -107
  489. package/dist/esm/checkout.store-CaS_htQd.js +0 -101
  490. package/dist/webcomponents/p-0867547d.entry.js +0 -1
  491. package/dist/webcomponents/p-091d6a7e.entry.js +0 -1
  492. package/dist/webcomponents/p-0d4bea62.entry.js +0 -1
  493. package/dist/webcomponents/p-1634262a.entry.js +0 -1
  494. package/dist/webcomponents/p-1a4d0ad6.entry.js +0 -1
  495. package/dist/webcomponents/p-25e3cb85.entry.js +0 -1
  496. package/dist/webcomponents/p-278988e8.entry.js +0 -1
  497. package/dist/webcomponents/p-3b5a9e94.entry.js +0 -1
  498. package/dist/webcomponents/p-44efe4ca.entry.js +0 -1
  499. package/dist/webcomponents/p-49a0ef9d.entry.js +0 -1
  500. package/dist/webcomponents/p-4bff1285.entry.js +0 -1
  501. package/dist/webcomponents/p-4d87be74.entry.js +0 -1
  502. package/dist/webcomponents/p-51107c8f.entry.js +0 -1
  503. package/dist/webcomponents/p-51d7b9f7.entry.js +0 -1
  504. package/dist/webcomponents/p-5c60ba00.entry.js +0 -1
  505. package/dist/webcomponents/p-5d56a293.entry.js +0 -1
  506. package/dist/webcomponents/p-654d91d7.entry.js +0 -1
  507. package/dist/webcomponents/p-68c2ce90.entry.js +0 -1
  508. package/dist/webcomponents/p-69b0be17.entry.js +0 -1
  509. package/dist/webcomponents/p-6e99cd4c.entry.js +0 -1
  510. package/dist/webcomponents/p-7e4bfba1.entry.js +0 -1
  511. package/dist/webcomponents/p-87d23cf8.entry.js +0 -1
  512. package/dist/webcomponents/p-9065f077.entry.js +0 -1
  513. package/dist/webcomponents/p-908f6b79.entry.js +0 -1
  514. package/dist/webcomponents/p-93d98b07.entry.js +0 -1
  515. package/dist/webcomponents/p-94b2d6a1.entry.js +0 -1
  516. package/dist/webcomponents/p-980db13b.entry.js +0 -1
  517. package/dist/webcomponents/p-B10U2_Sw.js +0 -1
  518. package/dist/webcomponents/p-BqXh8qSb.js +0 -1
  519. package/dist/webcomponents/p-CA9okQxT.js +0 -1
  520. package/dist/webcomponents/p-CMTxbXEr.js +0 -1
  521. package/dist/webcomponents/p-CdVle3mx.js +0 -1
  522. package/dist/webcomponents/p-CiMKKjGV.js +0 -1
  523. package/dist/webcomponents/p-CjxyejYl.js +0 -1
  524. package/dist/webcomponents/p-CpP3EZBK.js +0 -1
  525. package/dist/webcomponents/p-DCIW8z1f.js +0 -1
  526. package/dist/webcomponents/p-DQKNMVh7.js +0 -1
  527. package/dist/webcomponents/p-DU8dqq9U.js +0 -1
  528. package/dist/webcomponents/p-Dp2W4Eq3.js +0 -1
  529. package/dist/webcomponents/p-GenVH2BR.js +0 -1
  530. package/dist/webcomponents/p-InCWAej0.js +0 -1
  531. package/dist/webcomponents/p-QmGrQis7.js +0 -1
  532. package/dist/webcomponents/p-VodztElu.js +0 -1
  533. package/dist/webcomponents/p-a4a647bd.entry.js +0 -1
  534. package/dist/webcomponents/p-abcbfb22.entry.js +0 -1
  535. package/dist/webcomponents/p-af29e819.entry.js +0 -1
  536. package/dist/webcomponents/p-b6286d7b.entry.js +0 -1
  537. package/dist/webcomponents/p-b8c816fe.entry.js +0 -1
  538. package/dist/webcomponents/p-bcec4201.entry.js +0 -1
  539. package/dist/webcomponents/p-c6ee5aa7.entry.js +0 -1
  540. package/dist/webcomponents/p-c900ccca.entry.js +0 -1
  541. package/dist/webcomponents/p-ca3733e5.entry.js +0 -1
  542. package/dist/webcomponents/p-cb61af93.entry.js +0 -1
  543. package/dist/webcomponents/p-d29ce58e.entry.js +0 -1
  544. package/dist/webcomponents/p-d34f5a20.entry.js +0 -1
  545. package/dist/webcomponents/p-d8ec7cfc.entry.js +0 -1
  546. package/dist/webcomponents/p-dda50611.entry.js +0 -1
  547. package/dist/webcomponents/p-df7e2530.entry.js +0 -1
  548. package/dist/webcomponents/p-e4a43e31.entry.js +0 -1
  549. package/dist/webcomponents/p-ea75759b.entry.js +0 -1
  550. package/dist/webcomponents/p-edcb6de1.entry.js +0 -1
  551. package/dist/webcomponents/p-faaba66d.entry.js +0 -1
  552. package/dist/webcomponents/p-fc680b08.entry.js +0 -1
  553. package/dist/webcomponents/p-fcaaed23.entry.js +0 -1
  554. package/dist/webcomponents/p-fefc4dea.entry.js +0 -1
  555. package/dist/webcomponents/p-ff1bc3de.entry.js +0 -1
@@ -0,0 +1 @@
1
+ import{h as s,r as t,c as e,H as i}from"./p-DwYM91AU.js";import{C as r,a as n}from"./p-Cjcsf8ku.js";import{m as o,b as a,f as h,g as c}from"./p-5aA7gjr5.js";import{B as d,a as l,D as u}from"./p-Dlrq1iZf.js";import{a as m,c as p,b as f}from"./p-giyZ3C4E.js";import{F as b,c as v,a as y,b as g,d as w}from"./p-DiJD6Iqx.js";import{A as k,C as _,e as j,R as C,f as T}from"./p-B5rtFhtR.js";import{C as x,P as O}from"./p-CVaOFfrI.js";import{J as S,ah as A,l as I,X as L}from"./p-sA8HBfkI.js";import{S as B}from"./p-CsgUIrv8.js";import"./p-CZfYo5-1.js";import{b as D,c as E}from"./p-CPpUGsw5.js";import{a as P,B as H}from"./p-XYgDHrVL.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{E as V,m as F,n as W}from"./p-BrRsgB8S.js";import"./p-CLHwhyvu.js";import"./p-BH0Xfn-F.js";import{z as q,A as R,u as M,B as U,C as Y,D as z,E as X}from"./p-D032AB34.js";import{B as N}from"./p-Ty7R7tsw.js";import{c as G}from"./p-DfKxeSrC.js";import{i as J,e as Z}from"./p-DOcRWTul.js";import{A as K}from"./p-yyedWKWX.js";import"./p-D2muobcE.js";import"./p-BFTU3MAI.js";import"./p-BYsgavgS.js";import"./p-B09GVew-.js";import"./p-DkoufM1t.js";class ${constructor(s){this.id=s.id,this.account_owner_name=s.account_owner_name,this.full_name=s.full_name,this.account_type=s.account_type,this.account_number=s.account_number,this.acct_last_four=s.acct_last_four,this.account_number_last4=s.account_number_last4,this.routing_number=s.routing_number,this.institution_number=s.institution_number,this.transit_number=s.transit_number,this.bank_name=s.bank_name,this.country=s.country,this.currency=s.currency,this.nickname=s.nickname,this.metadata=s.metadata,this.business_id=s.business_id,this.platform_account_id=s.platform_account_id,this.created_at=s.created_at,this.updated_at=s.updated_at}get payload(){return{account_owner_name:this.account_owner_name||"",account_type:this.account_type||"",account_number:this.account_number||"",routing_number:this.routing_number||"",institution_number:this.institution_number||"",transit_number:this.transit_number||"",bank_name:this.bank_name||"",nickname:this.nickname||"",business_id:this.business_id||""}}}const Q=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(B,{width:"25%"})),s("div",{class:"col-12"},s(B,{width:"100%"})),s("div",{class:"col-12 d-flex gap-3"},s(B,{width:"50%"}),s(B,{width:"50%"})),s("div",{class:"col-12 d-flex gap-3"},s(B,{width:"65%"}),s(B,{width:"35%"}))),ss=()=>s("div",{class:"row gap-5"},s("div",{class:"col-12"},s(B,{width:"40%",height:"40px"})),s(Q,null),s(Q,null),s(Q,null)),ts=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event"),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.additional_questions={},this.recurringPayments=!1,this.isLoading=!1,this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.additional_questions=new k(s.data.additional_questions||{}),this.formController.setInitialValues(Object.assign({},this.additional_questions))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:P.additionalQuestions}),this.formLoading.emit(!1)}})},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t})),this.additional_questions=new k(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))}}propChanged(){this.initializeApi()}recurringPaymentsWatcher(s){this.recurringPayments="Yes"===(null==s?void 0:s.business_recurring_payments)}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get patchPayload(){return{additional_questions:new k(this.formController.values.getValue()).payload}}componentWillLoad(){this.initializeApi(),this.formController=new b(m(this.allowOptionalFields))}componentDidLoad(){this.getBusiness&&this.getData(),this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new d}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new d})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}render(){var t,e,i,r;const n=this.formController.getInitialValues();return this.isLoading?s(ss,null):s("form",null,s("fieldset",null,s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:S},"Additional Questions"),s("form-control-tooltip",{helpText:"This information helps us understand the business and identify and monitor trends to safeguard you and your customers."})),s("hr",{class:"mt-2"}),s("div",{class:"row gy-3"},s("div",{class:"col-12 col-md-6"},s("form-control-monetary-provisioning",{name:"business_revenue",label:"What is your business' estimated annual revenue from its primary business activities?",inputHandler:this.inputHandler,errorText:null===(t=this.errors)||void 0===t?void 0:t.business_revenue,defaultValue:null==n?void 0:n.business_revenue,maskOptions:x.WHOLE})),s("div",{class:"col-12 col-md-6"},s("form-control-text",{name:"business_payment_volume",label:"What is your business' annual credit card & ACH volume anticipated to process?",inputHandler:this.inputHandler,errorText:null===(e=this.errors)||void 0===e?void 0:e.business_payment_volume,defaultValue:null==n?void 0:n.business_payment_volume})),s("div",{class:"col-12"},s("form-control-select",{name:"business_when_service_received",label:"On average, how long after paying will your customers typically receive their goods or services?",inputHandler:this.inputHandler,errorText:null===(i=this.errors)||void 0===i?void 0:i.business_when_service_received,options:D,defaultValue:null==n?void 0:n.business_when_service_received})),s("div",{class:"col-12"},s("form-control-text",{name:"business_other_payment_details",label:"Is there anything else you would like us to know about how your customers pay the business? (optional)",inputHandler:this.inputHandler,errorText:null===(r=this.errors)||void 0===r?void 0:r.business_other_payment_details,defaultValue:null==n?void 0:n.business_other_payment_details})))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],additional_questions:["recurringPaymentsWatcher"]}}},es=(s,t)=>s.some((s=>s.document_type===t)),is=s=>s?{bank_name:Y.nullable(),nickname:U.nullable(),account_owner_name:M.nullable(),account_type:R.nullable(),account_number:q.nullable()}:{bank_name:Y.required("Enter bank name"),nickname:U.required("Enter nickname"),account_owner_name:M.required("Enter account owner name"),account_type:R.required("Select account type"),account_number:q.required("Enter account number")},rs=(s,t)=>{if(t)return{voided_check:g().nullable(),bank_statement:g().nullable()};const e=es(s,V.voidedCheck),i=es(s,V.bankStatement),r=e||i,n="Please upload either a voided check or a bank statement. Only one is required.";return{voided_check:g().when("bank_statement",{is:s=>!s&&!r,then:s=>s.required(n),otherwise:s=>s.notRequired()}),bank_statement:g().when("voided_check",{is:s=>!s&&!r,then:s=>s.required(n),otherwise:s=>s.notRequired()})}},ns={[_.USA]:(s,t=[])=>((s,t)=>{const e=Object.assign(Object.assign(Object.assign({},is(t)),(s=>s?{routing_number:X.nullable()}:{routing_number:X.required("Enter routing number")})(t)),rs(s,t));return v().shape(e,[["voided_check","bank_statement"]])})(t,s),[_.CAN]:(s,t=[])=>((s,t)=>{const e=Object.assign(Object.assign(Object.assign({},is(t)),(s=>{const t=y().length(3,"Institution number must be 3 digits").matches(z,"Enter valid institution number"),e=y().length(5,"Transit number must be 5 digits").matches(z,"Enter valid transit number");return s?{institution_number:t.nullable(),transit_number:e.nullable()}:{institution_number:t.required("Enter institution number"),transit_number:e.required("Enter transit number")}})(t)),rs(s,t));return v().shape(e,[["voided_check","bank_statement"]])})(t,s)},os=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event"),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.bankAccount={},this.existingDocuments=[],this.documentData=new F,this.isLoading=!1,this.isAddingNewBankAccount=!0,this.getSchema=()=>(0,ns[this.country])(this.allowOptionalFields,this.existingDocuments),this.initializeFormController=()=>{this.formController=new b(this.getSchema()),this.formController.setInitialValues(this.isAddingNewBankAccount?{business_id:this.businessId}:Object.assign({},this.bankAccount)),this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.storeFiles=s=>{const t=Array.from(s.detail.fileList),e=s.detail.document_type,i=t.map((s=>new W({file:s,document_type:e},this.businessId)));this.documentData[e]=i},this.getData=()=>{this.isLoading=!0,this.getBusiness({onSuccess:s=>{if(s.data.bank_accounts.length>0){const t=s.data.bank_accounts;this.bankAccount=new $(t[t.length-1]),this.isAddingNewBankAccount=!1}else this.bankAccount=new $({}),this.bankAccount.business_id=this.businessId;this.existingDocuments=s.data.documents},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.initializeFormController(),this.isLoading=!1}})},this.handleChangeBankAccount=()=>{this.isAddingNewBankAccount=!0,this.documentData=new F,this.initializeFormController()},this.handleCancel=()=>{this.isAddingNewBankAccount=!1,this.documentData=new F,this.initializeFormController()},this.handleSaveBankAccount=async()=>{this.formController.validateAndSubmit((()=>{this.sendData((()=>{}))}))},this.postDocumentRecordData=async s=>{this.isLoading=!0;const t=s.record_data;return new Promise((e=>{this.postDocumentRecord({payload:t,onSuccess:t=>{e(this.handleDocRecordResponse(s,t))},onError:({error:s,code:t,severity:i})=>{this.errorEvent.emit({message:s,errorCode:t,severity:i}),e(!1)}})}))},this.handleDocRecordResponse=(s,t)=>t.error?(this.errorEvent.emit({errorCode:n.POST_ERROR,message:t.error.message,severity:r.ERROR,data:t.error}),!1):(s.setPresignedUrl(t.data.presigned_url),!0),this.uploadDocument=async s=>{if(!s.presigned_url)throw new Error("Presigned URL is not set");const t=await s.getFileData(),e=await fetch(s.presigned_url,{method:"PUT",body:t});return this.handleUploadResponse(e)},this.handleUploadResponse=s=>!s.error||(this.errorEvent.emit({errorCode:n.POST_ERROR,message:s.error.message,severity:r.ERROR,data:s.error}),!1)}propChanged(){this.initializeApi()}watchHandler(s){this.formLoading.emit(s)}async validateAndSubmit({onSuccess:s}){this.existingBankAccount&&!this.isAddingNewBankAccount?this.sendData(s):this.formController.validateAndSubmit((()=>this.sendData(s)))}componentWillLoad(){this.initializeApi(),this.getBusiness&&this.getData(),this.formController=new b(this.getSchema())}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new d}),this.postBankAccount=h({authToken:this.authToken,service:new l}),this.postDocumentRecord=c({authToken:this.authToken,service:new u})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}get postPayload(){const s=this.formController.values.getValue();return new $(s).payload}get existingBankAccount(){var s;return!!(null===(s=this.bankAccount)||void 0===s?void 0:s.id)}get showReadOnlyView(){return this.existingBankAccount&&!this.isAddingNewBankAccount}async sendData(s){try{if(this.isAddingNewBankAccount&&!await this.postBankAccountData())return;if(!await this.postBusinessDocuments())return;this.isAddingNewBankAccount&&(this.isAddingNewBankAccount=!1,await this.refreshBankAccountData()),s()}catch(s){this.errorEvent.emit({message:s,errorCode:n.POST_ERROR,severity:r.ERROR})}}async postBankAccountData(){let s;return this.isLoading=!0,new Promise((t=>{let e=!1;this.postBankAccount({payload:this.postPayload,onSuccess:t=>{s=t,e=!0},onError:({error:s,code:t,severity:i})=>{e=!1,this.errorEvent.emit({message:s,errorCode:t,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:P.bankAccount}),this.isLoading=!1,t(e)}})}))}async refreshBankAccountData(){return new Promise((s=>{this.isLoading=!0,this.getBusiness({onSuccess:s=>{if(s.data.bank_accounts.length>0){const t=s.data.bank_accounts;this.bankAccount=new $(t[t.length-1])}this.existingDocuments=s.data.documents,this.initializeFormController()},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.isLoading=!1,s()}})}))}async postBusinessDocuments(){this.isLoading=!0;try{const s=Object.values(this.documentData).flat();return!s.length||!(await Promise.all(s.map((s=>this.postDocumentRecordData(s))))).includes(!1)&&!(await Promise.all(s.map((s=>this.uploadDocument(s))))).includes(!1)}finally{this.isLoading=!1}}render(){const t=this.formController.getInitialValues();return this.isLoading?s(ss,null):s("form",null,s("fieldset",{class:"mb-4"},s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:S},"Bank Account Info"),s("form-control-tooltip",{helpText:"This direct deposit account is the designated bank account where incoming funds will be deposited. The name of this account must match the registered business name exactly. We are not able to accept personal accounts unless your business is a registered sole proprietorship."})),s("hr",{class:"mt-2"}),s(this.country===_.CAN?"bank-account-form-inputs-canada":"bank-account-form-inputs",{defaultValue:t,errors:this.errors,inputHandler:this.inputHandler,formDisabled:this.showReadOnlyView}),this.showReadOnlyView&&s("div",{class:"mt-3"},s(N,{variant:"secondary",type:"button",onClick:this.handleChangeBankAccount,disabled:this.isLoading,part:A},"Change Bank Account")),(!this.existingBankAccount||this.isAddingNewBankAccount)&&s("div",{class:"mt-3 d-flex gap-2"},this.isAddingNewBankAccount&&s(N,{variant:"secondary",type:"button",onClick:this.handleCancel,disabled:this.isLoading,part:A},"Cancel"),s(N,{variant:"primary",type:"button",onClick:this.handleSaveBankAccount,disabled:this.isLoading,isLoading:this.isLoading},"Save Bank Account"))),s("fieldset",{class:"mt-4"},s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:S},"Document Uploads"),s("form-control-tooltip",{helpText:"One document (voided check or bank statement) is required for underwriting purposes. It needs to visibly show the name tied to the account and the account number. Various file formats such as PDF, DOC, DOCX, JPEG are accepted. Multiple files can be uploaded for each document category."})),s("hr",{class:"mt-2"}),s("business-documents-on-file",{documents:this.existingDocuments,isLoading:this.isLoading}),s("bank-account-document-form-inputs",{inputHandler:this.inputHandler,errors:this.errors,storeFiles:this.storeFiles})))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],isLoading:["watchHandler"]}}},as=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event"),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.coreInfo={},this.isLoading=!1,this.isEditingTaxId=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.coreInfo=new j(s.data),this.formController.setInitialValues(Object.assign({},this.coreInfo))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s(),this.isEditingTaxId=!1},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:P.businessInfo}),this.formLoading.emit(!1)}})},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))}}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get patchPayload(){return new j(this.formController.values.getValue()).payload}componentWillLoad(){this.initializeApi();const s=this.country===_.CAN?p(this.allowOptionalFields):f(this.allowOptionalFields);this.formController=new b(s),this.getData()}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new d}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new d})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}render(){var t,e;const i=this.formController.getInitialValues();return this.isLoading?s(ss,null):s("form",null,s("fieldset",null,s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:S},"Business Information")),s("hr",{class:"mt-2"}),s("div",{class:"row gy-3"},s("div",{class:"col-12"},s("form-control-text",{name:"legal_name",label:"Business Name",defaultValue:i.legal_name,errorText:this.errors.legal_name,inputHandler:this.inputHandler,helpText:"Enter this exactly as it appears on your tax records (don't use acronyms or abbreviations unless you registered that way)."})),s("div",{class:"col-12"},s("form-control-text",{name:"doing_business_as",label:"Doing Business As (DBA)",defaultValue:i.doing_business_as,errorText:this.errors.doing_business_as,inputHandler:this.inputHandler,helpText:"Enter this exactly as it appears on your tax records (leave blank if you don't have a registered DBA/trade name)"})),s("div",{class:"col-12 col-md-8"},s("form-control-select",{name:"classification",label:"Business Classification",options:E,defaultValue:i.classification,errorText:this.errors.classification,inputHandler:this.inputHandler})),s("div",{class:"col-12 col-md-4"},s("form-control-date",{name:"date_of_incorporation",label:"Date of Registration",defaultValue:i.date_of_incorporation,errorText:this.errors.date_of_incorporation,inputHandler:this.inputHandler})),s("div",{class:"col-12 col-md-6"},s("form-control-text",{name:"industry",label:"Industry",defaultValue:i.industry,errorText:this.errors.industry,inputHandler:this.inputHandler,helpText:"Describe what you sell"})),s("div",{class:"col-12 col-md-6"},!(null===(t=this.coreInfo)||void 0===t?void 0:t.tax_id_last4)||this.isEditingTaxId?s("form-control-number-masked",{name:"tax_id",label:G[this.country].taxIdLabel,defaultValue:this.isEditingTaxId?"":i.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,mask:"000000000",helpText:G[this.country].taxIdHelpText}):s("div",null,s("label",{class:"form-label",part:I},G[this.country].taxIdLabel),s("div",{class:"input-group mb-3"},s("input",{type:"text",class:"form-control",part:L,value:`****${null===(e=this.coreInfo)||void 0===e?void 0:e.tax_id_last4}`,disabled:!0}),s("button",{class:"btn btn-secondary",type:"button",part:A,onClick:()=>{this.isEditingTaxId=!0,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{tax_id:"",tax_id_last4:null}))}},"Change")))),s("div",{class:"col-12"},s("form-control-text",{name:"website_url",label:"Business Website URL",defaultValue:i.website_url,errorText:this.errors.website_url,inputHandler:this.inputHandler,helpText:"Don't have a live website? You can use your social media business page, app store link, or staging site URL."})),s("div",{class:"col-12 col-md-6"},s("form-control-text",{name:"email",label:"Business Email Address",defaultValue:i.email,errorText:this.errors.email,inputHandler:this.inputHandler})),s("div",{class:"col-12 col-md-6"},s("form-control-number-masked",{name:"phone",label:"Business Phone Number",defaultValue:i.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:O.US})))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},hs=class{constructor(s){t(this,s),this.clickEvent=e(this,"click-event"),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.ownersPayload=[],this.refs=[],this.isLoading=!1,this.matchRef=(s,t)=>{const e=this.refs.findIndex((s=>s===t));-1!==e&&(this.refs[e]=s)},this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{s.data.owners.length?this.ownersPayload=s.data.owners.map((s=>({id:s.id}))):this.addOwnerForm()},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1,this.manageRefs()}})},this.sendData=async s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:{owners:this.ownersPayload},onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:P.owners}),this.formLoading.emit(!1)}})},this.addOwnerForm=s=>{this.newFormOpen=!0,this.ownersPayload=[...this.ownersPayload,{id:""}],s&&this.clickEvent.emit({name:H.addOwnerForm})},this.removeOwnerForm=s=>{this.ownersPayload=this.ownersPayload.filter((t=>t.id!==s)),this.newFormOpen&&(this.newFormOpen=!1)}}propChanged(){this.initializeApi()}get showAddOwnerButton(){return this.ownersPayload.length<4&&!this.newFormOpen}manageRefs(){this.refs=this.ownersPayload.map((s=>s.id))}async validateAndSubmit({onSuccess:s}){const t=this.refs.map((s=>s.validate()));if(!(await Promise.all(t)).every((s=>s)))return;const e=this.refs.map((s=>s.submit()));(await Promise.all(e)).every((s=>s))&&this.sendData(s)}componentWillLoad(){this.initializeApi(),this.getBusiness&&this.getData()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new d}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new d})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}ownersWatcher(){this.manageRefs()}handleOwnerSubmit(s){const t=s.detail,e=this.ownersPayload.map((s=>s.id===t.id?t:s));e.includes(t)||(e[this.ownersPayload.findIndex((s=>!s.id))]=t,this.newFormOpen&&(this.newFormOpen=!1)),this.ownersPayload=e}render(){return s(i,null,this.isLoading?s(ss,null):s("div",null,s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:S},"Owners"),s("form-control-tooltip",{helpText:"For partnerships, LLCs or privately held corporations, the business is required to apply with all individuals with 25% or more ownership to the application. For charities and registered non-profits, the business is required to apply with 1 individual with substantial control over the entity, such as a board member or director."})),s("hr",{class:"mt-2"}),s("div",{class:"row gy-3"},this.ownersPayload.map((t=>s("justifi-owner-form",{key:t.id,authToken:this.authToken,businessId:this.businessId,ownerId:t.id,removeOwner:this.removeOwnerForm,newFormOpen:this.newFormOpen,ownersLength:this.ownersPayload.length,country:this.country,allowOptionalFields:this.allowOptionalFields,ref:s=>this.matchRef(s,t.id)})))),s("div",{class:"d-flex justify-content-start"},s("div",{class:"gap-2"},s(N,{variant:"primary",onClick:()=>this.addOwnerForm(!0),hidden:!this.showAddOwnerButton},"Add Owner")))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],ownersPayload:["ownersWatcher"]}}},cs=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event"),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.representative={},this.isLoading=!1,this.getData=()=>{this.getBusiness&&this.formController&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.representative=new C(s.data.representative||{}),this.representative.address.country=this.country,this.formController.setInitialValues(Object.assign({},this.representative))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:P.representative}),this.formLoading.emit(!1)}})}}propChanged(){this.initializeApi(),this.getData()}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}componentWillLoad(){this.initializeApi(),this.initializeForm()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new d}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new d})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}initializeForm(){const s=J[this.country];s?(this.formController=new b(s("representative",this.allowOptionalFields)),this.getData()):this.errorEvent.emit({message:"Missing schema for selected country",errorCode:n.MISSING_PROPS,severity:r.ERROR})}componentDidLoad(){this.formController&&this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}get patchPayload(){return{representative:new C(this.formController.values.getValue()).payload}}render(){return!this.formController||this.isLoading?s(ss,null):s("justifi-business-representative-form-inputs",{representativeDefaultValue:this.formController.getInitialValues(),errors:this.errors,formController:this.formController,country:this.country})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},ds=class{constructor(s){t(this,s),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.formCompleted=e(this,"formCompleted"),this.errors={},this.fetchData=async()=>{this.formLoading.emit(!0);try{const s=await this.api.get({endpoint:this.businessEndpoint,authToken:this.authToken});this.acceptedTermsBefore=s.data.terms_conditions_accepted}catch(s){this.errorEvent.emit({errorCode:n.FETCH_ERROR,message:s.message,severity:r.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.sendData=async s=>{this.formLoading.emit(!0);try{const t=this.termsPayload,e=await this.api.post({endpoint:this.termsConditionsEndpoint,body:t,authToken:this.authToken});this.handleResponse(e,s)}catch(s){this.errorEvent.emit({errorCode:n.POST_ERROR,message:s.message,severity:r.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.inputHandler=(s,t)=>{this.acceptedTerms=t,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))}}get businessEndpoint(){return`entities/business/${this.businessId}`}get termsConditionsEndpoint(){return"entities/terms_and_conditions"}get formHelperText(){return this.acceptedTermsBefore?"You have already accepted the terms and conditions.":null}get termsPayload(){return{business_id:this.businessId,accepted:this.formController.values.getValue().accepted,user_agent:window.navigator.userAgent}}async componentWillLoad(){this.api=K(),this.formController=new b((s=>{const t=v({accepted:w().oneOf([!0],"You must agree to the terms and conditions to continue").required("You must agree to the terms and conditions to continue")}),e=v({accepted:w().nullable()});return s?e:t})(this.allowOptionalFields)),this.businessId&&this.authToken&&this.fetchData()}handleResponse(s,t){s.error?this.errorEvent.emit({errorCode:n.POST_ERROR,message:s.error.message,severity:r.ERROR,data:s.error}):t(),this.stepCompleteEvent.emit({response:s,formStep:P.termsAndConditions}),this.formCompleted.emit()}async validateAndSubmit({onSuccess:s}){this.acceptedTermsBefore?(this.stepCompleteEvent.emit({response:null,formStep:P.termsAndConditions,metadata:"no data submitted"}),this.formCompleted.emit(),s()):this.formController.validateAndSubmit((()=>this.sendData(s)))}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}get merchantAgreementLink(){return s("a",{href:"https://justifi.tech/merchant-agreement/",target:"_blank",rel:"noopener noreferrer"},"merchant agreement")}render(){return s("form",{key:"721f3c171358f9450a8b460dafac3c9f7f27727b"},s("fieldset",{key:"e151086c528d5e359e4ecd2c33feb01c5571a6ca"},s("legend",{key:"ff4ba3bead3ec50cf9736d6a864740e542f42b2d",part:S},"Terms and Conditions"),s("hr",{key:"c076bfe230bafbe8db7280f5f708de893c970bf2"}),s("div",{key:"d2a1e0f4e15077d07fe7de2cb847252990b44bde"},s("p",{key:"559c4c6d6e27b5fb800984e87097fe080482462d"},"Please read and accept the ",this.merchantAgreementLink," to submit your provisioning request.")),s("br",{key:"014b3a7be231c81bd23c35ab212d7ac4e4c1d107"}),s("div",{key:"3ef38ecffd678c36c564836434f0a0da341116af",class:"row-gy-3"},s("div",{key:"e715723e19a212628d29fec46ca494b7080dac66",class:"col-12"},s("form-control-checkbox",{key:"6054f012fa3abacf6b9f6ffe7d7e88444d8a1066",name:"accepted",label:"I agree to the terms and conditions",inputHandler:this.inputHandler,errorText:this.errors.accepted,disabled:this.acceptedTermsBefore,helpText:this.formHelperText,checked:this.acceptedTerms})))))}},ls=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event"),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.legal_address={},this.isLoading=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{const t=new T((s.data||{}).legal_address||{});this.legal_address=Object.assign(Object.assign({},t),{country:this.country}),this.formController.setInitialValues(Object.assign({},this.legal_address))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:P.legalAddress}),this.formLoading.emit(!1)}})},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))}}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get patchPayload(){return{legal_address:new T(this.formController.values.getValue()).payload}}componentWillLoad(){this.initializeApi(),this.formController=new b((0,Z[this.country])(this.allowOptionalFields)),this.getData()}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new d}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new d})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}render(){var t;const e=null===(t=this.formController)||void 0===t?void 0:t.getInitialValues();return this.isLoading?s(ss,null):s("form",null,s("fieldset",null,s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:S},"Legal Address of your Business"),s("form-control-tooltip",{helpText:"No PO Boxes."})),s("hr",{class:"mt-2"}),s("justifi-form-address-fields",{country:this.country,errors:this.errors,defaultValues:e,inputHandler:this.inputHandler})))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},us=class{constructor(s){t(this,s)}get showPreviousStepButton(){return this.currentStep>0}get showNextStepButton(){return this.currentStep<this.totalSteps}get showSubmitButton(){return this.currentStep===this.totalSteps}render(){return s("div",{key:"e13d3613af061d0067d1dbd84b6c3aebfc782aad",class:"d-flex gap-2"},s(N,{key:"7b422ce77e13872f3dbd622574bce0e3e6e9c2ed",variant:"secondary",type:"button",onClick:()=>this.previousStepButtonOnClick(),disabled:this.formDisabled,hidden:!this.showPreviousStepButton},"Previous"),s(N,{key:"ea1242fdccb0b0af2438f4aaab91e3e17a607ef7",variant:"primary",type:"button",onClick:s=>this.nextStepButtonOnClick(s,H.nextStep),disabled:this.formDisabled,isLoading:this.formLoading,hidden:!this.showNextStepButton},"Next"),s(N,{key:"0c323f533ea84608dcdabb885f69d71a81ec684b",variant:"primary",type:"submit",onClick:s=>this.nextStepButtonOnClick(s,H.submit),disabled:this.formDisabled,isLoading:this.formLoading,hidden:!this.showSubmitButton},"Submit"))}},ms=class{constructor(e){t(this,e),this.allowOptionalFields=!1,this.country=_.USA,this.componentStepMapping={0:()=>s("justifi-business-core-info-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[0]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),1:()=>s("justifi-legal-address-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[1]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),2:()=>s("justifi-additional-questions-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[2]=s,allowOptionalFields:this.allowOptionalFields}),3:()=>s("justifi-business-representative-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[3]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),4:()=>s("justifi-business-owners-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[4]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),5:()=>s("justifi-business-bank-account-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[5]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),6:()=>s("justifi-business-terms-conditions-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[6]=s,onFormLoading:this.handleFormLoading,allowOptionalFields:this.allowOptionalFields})}}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}render(){return s("div",{key:"dcf3f283bae7de00311f35e41b8d803196f50d49",class:"col-12 mb-4"},this.currentStepComponent)}};export{ts as justifi_additional_questions_form_step,os as justifi_business_bank_account_form_step,as as justifi_business_core_info_form_step,hs as justifi_business_owners_form_step,cs as justifi_business_representative_form_step,ds as justifi_business_terms_conditions_form_step,ls as justifi_legal_address_form_step,us as justifi_payment_provisioning_form_buttons,ms as justifi_payment_provisioning_form_steps}
@@ -0,0 +1 @@
1
+ import{r as s,c as t,h as r}from"./p-DwYM91AU.js";import{P as i}from"./p-DGGjRqDa.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as o,a as e}from"./p-Cjcsf8ku.js";import{P as p}from"./p-BrRsgB8S.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as a,a as n}from"./p-D2muobcE.js";import{c as m,J as h}from"./p-DISrhs4v.js";import{S as c}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{d}from"./p-RTAZ4tdd.js";import"./p-yyedWKWX.js";import"./p-B09GVew-.js";import"./p-BYsgavgS.js";import"./p-DkoufM1t.js";import"./p-CsRppqXL.js";import"./p-W9WWoLzT.js";import"./p-U3nU15el.js";import"./p-sA8HBfkI.js";const f=class{constructor(r){s(this,r),this.errorEvent=t(this,"error-event"),this.errorMessage=null,this.columns=d,this.handleErrorEvent=s=>{this.errorMessage=s.detail.message,this.errorEvent.emit(s.detail)}}componentWillLoad(){m(),this.analytics=new h(this),this.initializeGetPayments()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}propChanged(){this.initializeGetPayments()}initializeGetPayments(){this.accountId&&this.authToken?this.getPayments=(({id:s,authToken:t,service:r})=>async({params:i,onSuccess:e,onError:m,final:h})=>{var c,d;try{const h=await r.fetchPayments(s,t,i);if(h.error)return m({error:n(h.error),code:a(null===(d=h.error)||void 0===d?void 0:d.code),severity:o.ERROR});{const s=Object.assign({},h.page_info);e({payments:(null===(c=h.data)||void 0===c?void 0:c.map((s=>new p(s))))||[],pagingInfo:s})}}catch(s){const t=a(null==s?void 0:s.code);return m({error:s.message||s,code:t,severity:o.ERROR})}finally{return h()}})({id:this.accountId,authToken:this.authToken,service:new i}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:e.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}render(){return r(c,{key:"171935cc29253ff76262498183fd0f3a0f4a7eef"},r("payments-list-core",{key:"71be865f5035b6db46f4b97a3a36f08391de4f58",getPayments:this.getPayments,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{f as justifi_payments_list}
@@ -0,0 +1 @@
1
+ import{r as e,c as t,h as s,H as i}from"./p-DwYM91AU.js";import{C as o}from"./p-ZpPDShvP.js";import{v as a}from"./p-sA8HBfkI.js";import"./p-HXpYMWUU.js";const r=class{constructor(s){e(this,s),this.paymentMethodOptionSelected=t(this,"paymentMethodOptionSelected"),this.onPaymentMethodOptionClick=e=>{e.preventDefault(),this.paymentMethodOptionSelected.emit(this.paymentMethodOption)}}async resolvePaymentMethod(e){var t;return e.isValid?{token:null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id}:{validationError:!0}}render(){var e,t,r;return s(i,{key:"feeb934714fe00e87f6c89ec3954dafebef81733",class:"payment-method"},s("div",{key:"62370e3c41538e5a5aed16dc0f2d9056bebc01c0",class:"radio-list-item p-3",part:a,onClick:this.onPaymentMethodOptionClick},s("form-control-radio",{key:"583aa5751277bb585b6b1686d229810d830c8686",name:"paymentMethodType",value:null===(e=this.paymentMethodOption)||void 0===e?void 0:e.id,checked:this.isSelected,label:`${o[null===(t=this.paymentMethodOption)||void 0===t?void 0:t.brand]||""} *${null===(r=this.paymentMethodOption)||void 0===r?void 0:r.acct_last_four}`})))}};export{r as justifi_saved_payment_method}
@@ -0,0 +1 @@
1
+ import{r as s,c as i,h as t}from"./p-DwYM91AU.js";import{E as r}from"./p-DUmUUj9r.js";import{B as o}from"./p-Dlrq1iZf.js";import{m as p}from"./p-sCHf--Vc.js";import{C as e,a as m}from"./p-Cjcsf8ku.js";import{c as h,J as n}from"./p-DISrhs4v.js";import"./p-sA8HBfkI.js";import"./p-yyedWKWX.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-B09GVew-.js";import"./p-HXpYMWUU.js";import"./p-BrRsgB8S.js";import"./p-BH0Xfn-F.js";import"./p-DkoufM1t.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-D2muobcE.js";import"./p-CsRppqXL.js";const a=class{constructor(t){s(this,t),this.errorEvent=i(this,"error-event"),this.errorMessage=null,this.handleErrorEvent=s=>{this.errorMessage=s.detail.message,this.errorEvent.emit(s.detail)}}componentWillLoad(){h(),this.analytics=new n(this),this.initializeGetBusiness()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeGetBusiness(){if(!this.businessId||!this.authToken)return this.errorMessage="Invalid business id or auth token",void this.errorEvent.emit({errorCode:m.MISSING_PROPS,message:this.errorMessage,severity:e.ERROR});this.getBusiness=p({id:this.businessId,authToken:this.authToken,service:new o})}render(){return this.errorMessage?r(this.errorMessage):t("business-details-core",{getBusiness:this.getBusiness,"onError-event":this.handleErrorEvent})}};export{a as justifi_business_details}
@@ -0,0 +1 @@
1
+ import{h as t,r as s,c as e}from"./p-DwYM91AU.js";import{c as r,a as i,F as o}from"./p-DiJD6Iqx.js";import{f as n}from"./p-B09GVew-.js";import"./p-tGDdRx0W.js";import{C as a,a as u}from"./p-Cjcsf8ku.js";import{R as l,l as h}from"./p-BrRsgB8S.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{B as m}from"./p-Ty7R7tsw.js";import{S as p}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{P as c}from"./p-DGGjRqDa.js";import{m as d}from"./p-DATDsXcA.js";import{c as f,J as v}from"./p-DISrhs4v.js";import{g as j,a as y}from"./p-D2muobcE.js";import{A as b}from"./p-yyedWKWX.js";import{S as w}from"./p-CsgUIrv8.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-BYsgavgS.js";import"./p-DkoufM1t.js";import"./p-sA8HBfkI.js";import"./p-CsRppqXL.js";const g=t=>{const s=+t;return i().required("Amount is required").test("max-amount",`Refund amount cannot be more than payment amount: ${n(s)}`,(function(t){return+t<=+s})).test("min-amount","Refund amount must be greater than 0",(function(t){return+t>0}))},R=t=>{if(t)return r({amount:g(t),description:i().optional(),reason:i().optional().oneOf([l.customerRequest,l.duplicate,l.fraudulent],"Select a reason")})},A=[{label:"Select a reason",value:""},{label:"Customer requested a refund",value:"customer_request"},{label:"Customer was double-charged",value:"duplicate"},{label:"Payment was reported as fraud",value:"fraudulent"}],x=b();class B{async postRefund(t,s,e,r){return x.post({endpoint:`payments/${t}/refunds`,headers:{"Sub-Account":s},body:r,authToken:e})}}const D=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(w,{width:"100%",height:"40px"}))),I=()=>t(p,null,t("div",{class:"row gap-5"},t(D,null),t(D,null),t(D,null))),T=class{constructor(t){s(this,t),this.errorEvent=e(this,"error-event"),this.submitEvent=e(this,"submit-event"),this.refundPayload={},this.displayAmount="",this.errors={},this.paymentLoading=!0,this.refundLoading=!1,this.hideSubmitButton=!1,this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}componentWillLoad(){f(),this.analytics=new v(this),this.initializeApi(),this.formController=new o(R())}handleError(t,s,e){this.errorEvent.emit({errorCode:t,message:s,severity:e})}checkAmount(t){return t>0}handleInvalidAmount(){this.submitDisabled=!0,this.handleError(u.INVALID_REFUND_AMOUNT,"Refund amount must be greater than 0",a.ERROR)}initializeFormController(){const t=this.refundPayload.amount,s=t?t.toString():"0";this.formController=new o(R(s)),this.formController.setInitialValues({amount:s}),this.formController.values.subscribe((t=>{this.refundPayload=Object.assign({},t)})),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.paymentId&&this.authToken?d({id:this.paymentId,authToken:this.authToken,service:new c})({onSuccess:({payment:t})=>{this.refundPayload=new h({amount:t.amount_refundable})},onError:({error:t,code:s,severity:e})=>{this.handleError(s,t,e)},final:()=>{this.checkAmount(this.refundPayload.amount)?this.initializeFormController():this.handleInvalidAmount(),this.paymentLoading=!1}}):this.handleError(u.MISSING_PROPS,"Payment ID and Auth Token are required",a.ERROR)}async refundPayment(t){if(t&&t.preventDefault(),!await this.formController.validate())return;const s=(({authToken:t,accountId:s,paymentId:e,service:r})=>async({refundBody:i,onSuccess:o,onError:n,final:u})=>{var l;try{const u=await r.postRefund(e,s,t,i);if(u.error)return n({error:y(u.error),code:j(null===(l=u.error)||void 0===l?void 0:l.code),severity:a.ERROR});o(u)}catch(t){const s=j(null==t?void 0:t.code);return n({error:t.message||t,code:s,severity:a.ERROR})}finally{return u()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new B}),e=this.formController.values.getValue();return this.refundLoading=!0,new Promise((t=>{let r;s({refundBody:e,onSuccess:t=>{r=t},onError:({error:t,code:s,severity:e})=>{r=t,this.handleError(t,s,e)},final:()=>{this.submitEvent.emit({response:r}),this.submitDisabled=!0,this.refundLoading=!1,t(r.data)}})}))}render(){if(this.paymentLoading)return t(I,null);const s=this.formController.getInitialValues(),e=this.refundPayload.amount;return t(p,null,t("form",null,t("fieldset",null,t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-monetary",{name:"amount",label:"Refund Amount",defaultValue:s.amount,inputHandler:this.inputHandler,errorText:this.errors.amount})),t("div",{class:"col-12"},t("form-control-select",{name:"reason",label:"Reason for refund (optional)",defaultValue:s.reason,inputHandler:this.inputHandler,options:A,errorText:this.errors.reason})),t("div",{class:"col-12"},t("form-control-textarea",{name:"description",label:"Note (optional)",defaultValue:s.description,inputHandler:this.inputHandler,maxLength:250,errorText:this.errors.description})),t("div",{class:"form-group d-flex flex-row-reverse"},t(m,{variant:"primary",type:"submit",onClick:this.refundPayment.bind(this),isLoading:this.paymentLoading||this.refundLoading,hidden:this.hideSubmitButton,disabled:this.submitDisabled},`Refund ${n(+e)}`))))))}};export{T as justifi_refund_payment}
@@ -0,0 +1 @@
1
+ import{r as e,c as t,h as i}from"./p-DwYM91AU.js";import{c as s,J as a}from"./p-DISrhs4v.js";import{c as d}from"./p-BrRsgB8S.js";import{d as c}from"./p-sA8HBfkI.js";import{S as o}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{P as h}from"./p-DkoufM1t.js";import"./p-CsRppqXL.js";import"./p-yyedWKWX.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-B09GVew-.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";const f=class{constructor(i){e(this,i),this.errorEvent=t(this,"error-event"),this.loadedEvent=t(this,"loaded"),this.submitEvent=t(this,"submit-event"),this.availablePaymentMethods=[],this.errorMessage="",this.insuranceToggled=!1,this.isSubmitting=!1,this.disableBankAccount=!1,this.disableBnpl=!1,this.disableCreditCard=!1,this.disablePaymentMethodGroup=!1,this.hideBankAccountBillingForm=!1,this.hideCardBillingForm=!1}propChanged(){this.updateStore()}connectedCallback(){this.authToken&&this.checkoutId&&this.updateStore()}componentWillLoad(){s(),this.analytics=new a(this)}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}checkoutComplete(e){this.isSubmitting=!1}checkoutError(e){console.error("[justifi-checkout] error-event received",null==e?void 0:e.detail),this.isSubmitting=!1}checkoutChanged(e){this.availablePaymentMethods=this.disableBnpl?e.detail.availablePaymentMethodTypes.filter((e=>e!==h.SEZZLE)):e.detail.availablePaymentMethodTypes}async fillBillingForm(e){var t;d.billingFormFields=e,null===(t=this.tokenizePaymentMethodRef)||void 0===t||t.fillBillingForm(e)}async validate(){var e;return{isValid:await(null===(e=this.modularCheckoutRef)||void 0===e?void 0:e.validate())}}updateStore(){d.checkoutId=this.checkoutId,d.authToken=this.authToken,d.disableCreditCard=this.disableCreditCard,d.disableBankAccount=this.disableBankAccount,d.disablePaymentMethodGroup=this.disablePaymentMethodGroup}async submit(e){var t;this.isSubmitting=!0,null===(t=this.modularCheckoutRef)||void 0===t||t.submitCheckout(d.billingFormFields)}get showPaymentTypeHeader(){return!this.disableCreditCard&&!this.disableBankAccount}render(){var e,t;return i(o,{key:"e9f527c5dd4dc564c4fb00d69b27e07c90e8b552"},i("justifi-modular-checkout",{key:"e80dd4c78282fc428f0e78d6d87f71f262577f01",ref:e=>{this.modularCheckoutRef=e},authToken:this.authToken,checkoutId:this.checkoutId,preCompleteHook:this.preCompleteHook},i("div",{key:"92f3821b2566f6ede351145cafe934bb1b14e970",class:"row gy-3 jfi-checkout-core"},i("div",{key:"ed96eb7b2620df4c8398b36b62e2eb5744de7545",class:"col-12",part:c},i("justifi-header",{key:"a23f3ea139874c80830b9bd62b44bedad2520d89",text:"Summary",level:"h2",class:"fs-5 fw-bold pb-3"}),i("section",{key:"45f903ebb6cee7d382414fd04656b605fb5f9e91"},i("justifi-checkout-summary",{key:"7a6ba74f821aed6aee12682626bd1f304a90cc4b"}))),i("div",{key:"3930d68c41aa3a1b99371bbea285b2de4d734766",class:"col-12 mt-4"},i("slot",{key:"8cb5f1ef64ae6ecd25edf861b555dc6f20abd0ec",name:"insurance"})),i("div",{key:"3f8b4dae6eb90999927070027a77bfa9a4b09442",class:"col-12 mt-4"},i("justifi-header",{key:"4335e04295005071b061391d27a5cc4677519e71",text:"Payment",level:"h2",class:"fs-5 fw-bold pb-3"}),this.showPaymentTypeHeader&&i("justifi-header",{key:"1ca763ef15405ee55bf763bd7760f36e2925bbe1",text:"Select payment type",level:"h3",class:"fs-6 fw-bold lh-lg"}),i("div",{key:"c52c81c4b84fde4168037f06c7d5b6f491d2bea9",class:"d-flex flex-column"},i("section",{key:"3d1981827d98b947e541599582dc1f15bfe3f542"},i("div",{key:"8ddeb4dae00fe55092fba788c9fb2b44ad1a1240"},this.availablePaymentMethods.includes(h.APPLE_PAY)&&i("div",{key:"496486644e4caa90379e20cfb80b20c2670eef0b",class:"mb-3"},i("justifi-apple-pay",{key:"9d360fed1e166d0adf4f97f8b1817fde6a7dc0ec"})),this.availablePaymentMethods.includes(h.GOOGLE_PAY)&&i("div",{key:"e4d440ac6bedf38eb2baab3717d0d1308aaa5b10",class:"mb-3"},i("justifi-google-pay",{key:"9eee94d588e48fc5550cd3965f45612de3aedccb",ref:e=>this.googlePayRef=e})),i("justifi-saved-payment-methods",{key:"244e8877a4ce83ab8c4fff6051957d0ec50deafa"}),this.availablePaymentMethods.includes(h.SEZZLE)&&i("justifi-radio-list-item",{key:"37904744a21eb6f1f96e13831e3b0029aa87d25f",name:"paymentMethodType",value:h.SEZZLE,checked:(null===(e=null==d?void 0:d.selectedPaymentMethod)||void 0===e?void 0:e.type)===h.SEZZLE,label:i("justifi-sezzle-payment-method",{ref:e=>this.sezzlePaymentMethodRef=e}),"onRadio-click":()=>{var e;null===(e=this.sezzlePaymentMethodRef)||void 0===e||e.handleSelectionClick()}}),this.availablePaymentMethods.includes(h.PLAID)&&!this.disableBnpl&&i("justifi-radio-list-item",{key:"d2fc7e88a17372967a64edf57a33ef0758568357",name:"paymentMethodType",value:h.PLAID,checked:(null===(t=null==d?void 0:d.selectedPaymentMethod)||void 0===t?void 0:t.type)===h.PLAID,label:i("justifi-plaid-payment-method",{ref:e=>this.plaidPaymentMethodRef=e}),"onRadio-click":()=>{var e;null===(e=this.plaidPaymentMethodRef)||void 0===e||e.handleSelectionClick()}}),i("internal-tokenize-payment-method",{key:"b2c2b5b2db0970ac8bfb70141f9b0fa4545dddce",ref:e=>this.tokenizePaymentMethodRef=e,authToken:this.authToken,accountId:d.accountId,disableCreditCard:this.disableCreditCard,disableBankAccount:this.disableBankAccount,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,hideSubmitButton:!0,paymentMethodGroupId:d.paymentMethodGroupId}))))),i("div",{key:"e8f3ba632562b2369e6acc8a135647cc74dc0c0d",class:"mt-4"},i("justifi-button",{key:"e34306fed36d84a03a4e6ad3ba92abc276423590",text:"Pay",type:"submit",variant:"primary",clickHandler:e=>this.submit(e),disabled:this.isSubmitting,isLoading:this.isSubmitting,customStyle:{width:"100%",textAlign:"center"}})))))}static get watchers(){return{authToken:["propChanged"],checkoutId:["propChanged"],disableCreditCard:["propChanged"],disableBankAccount:["propChanged"],disablePaymentMethodGroup:["propChanged"]}}};export{f as justifi_checkout}
@@ -0,0 +1 @@
1
+ import{h as t,r as e,c as a}from"./p-DwYM91AU.js";import{c as s}from"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as i,a as o}from"./p-Cjcsf8ku.js";import{i as r}from"./p-BrRsgB8S.js";import{p as c}from"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{c as n,J as p}from"./p-DISrhs4v.js";import{g as d,a as h}from"./p-D2muobcE.js";import{P as l}from"./p-DY_3dcgR.js";import{T as f,l as u,a as m,b as y,c as b,d as _,e as w,f as g,g as j,h as v,i as T,j as k,k as D}from"./p-BMJe4lzg.js";import{S as C}from"./p-BP2sTIQV.js";import{T as S}from"./p-CZfYo5-1.js";import{a as I}from"./p-B09GVew-.js";import{V as P,W as B}from"./p-sA8HBfkI.js";import"./p-BYsgavgS.js";import"./p-DkoufM1t.js";import"./p-CsRppqXL.js";import"./p-yyedWKWX.js";import"./p-CgiDds_u.js";const q={id:()=>t("th",{part:P,scope:"col",title:"The unique identifier of each transaction"},"ID"),account_id:()=>t("th",{part:P,scope:"col",title:"The unique identifier of the account associated with each transaction"},"Account ID"),payout_id:()=>t("th",{part:P,scope:"col",title:"The unique identifier of the payout associated with each transaction"},"Payout ID"),financial_transaction_id:()=>t("th",{part:P,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),amount:()=>t("th",{part:P,scope:"col",title:"The dollar amount of each transaction"},"Amount"),fee:()=>t("th",{part:P,scope:"col",title:"The fee associated with each transaction"},"Fee"),net:()=>t("th",{part:P,scope:"col",title:"The net amount of each transaction"},"Net"),currency:()=>t("th",{part:P,scope:"col",title:"The currency of each transaction"},"Currency"),description:()=>t("th",{part:P,scope:"col",title:"The description of each transaction"},"Description"),source_id:()=>t("th",{part:P,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),txn_type:()=>t("th",{part:P,scope:"col",title:"The type of each transaction"},"Type"),created_at:()=>t("th",{part:P,scope:"col",title:"The date and time each transaction was made"},"Processed On"),available_on:()=>t("th",{part:P,scope:"col",title:"The date and time each transaction will be available"},"Available On"),updated_at:()=>t("th",{part:P,scope:"col",title:"The date and time each transaction was last updated"},"Updated On")},A={fee:"Fee",payment:"Payment",payout:"Payout",seller_payment_refund:"Seller Payment Refund",dispute_amount_collected:"Dispute Amount Collected",dispute_fee_collected:"Dispute Fee Collected",seller_payment:"Seller Payment",transfer:"Transfer",partner_platform_proceeds_credit:"Partner Platform Proceeds Credit"},E={id:e=>t("td",{part:B(e.id)},e.id),account_id:e=>t("td",{part:B(e.account_id)},e.account_id),payout_id:e=>t("td",{part:B(e.payout_id)},e.payout_id),financial_transaction_id:e=>t("td",{part:B(e.financial_transaction_id)},e.financial_transaction_id),amount:e=>t("td",{part:B(e.amount)},e.formattedPaymentAmount(e.amount)),fee:e=>t("td",{part:B(e.fee)},e.formattedPaymentAmount(e.fee)),net:e=>t("td",{part:B(e.net)},e.formattedPaymentAmount(e.net)),currency:e=>t("td",{part:B(e.currency)},e.currency),description:e=>t("td",{part:B(e.description)},e.description),source_id:e=>t("td",{part:B(e.source_id)},e.source_id),txn_type:e=>t("td",{part:B(e.txn_type)},A[e.txn_type]),created_at:e=>t("td",{part:B(e.created_at)},t("div",{class:"fw-bold"},I(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},I(e.created_at,{showTime:!0}))),available_on:e=>t("td",{part:B(e.available_on)},t("div",{class:"fw-bold"},I(e.available_on,{showDisplayDate:!0})),t("div",{class:"fw-bold"},I(e.available_on,{showTime:!0}))),updated_at:e=>t("td",{part:B(e.updated_at)},t("div",{class:"fw-bold"},I(e.updated_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},I(e.updated_at,{showTime:!0})))},O=class{constructor(t){e(this,t),this.clickEvent=a(this,"click-event"),this.errorEvent=a(this,"error-event"),this.balanceTransactions=[],this.isLoading=!0,this.errorMessage=null,this.paging=c,this.pagingParams={},this.columns="created_at,txn_type,description,amount,fee,net",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:S.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:S.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const a=this.balanceTransactions.find((t=>t.id===e));this.clickEvent.emit({name:S.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,q,E),n(),this.analytics=new p(this),this.initializeApi()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeApi()}handleError(t,e,a){this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:e,severity:a})}initializeApi(){this.payoutId&&this.authToken?(({accountId:t,authToken:e,service:a})=>async({params:s,onSuccess:o,onError:c,final:n})=>{var p;try{const n=await a.fetchPayoutTransactions(t,e,s);n.error?c({error:h(n.error),code:d(null===(p=n.error)||void 0===p?void 0:p.code),severity:i.ERROR}):o({balanceTransactions:n.data.map((t=>new r(t))),pagingInfo:Object.assign({},n.page_info)})}catch(t){const e=d(null==t?void 0:t.code);c({error:h(t),code:e,severity:i.ERROR})}finally{n()}})({accountId:s.accountId,authToken:this.authToken,service:new l})({params:this.requestParams,onSuccess:({balanceTransactions:t,pagingInfo:e})=>{this.balanceTransactions=t,this.paging=e,this.transactionsTable.collectionData=this.balanceTransactions},onError:({error:t,code:e,severity:a})=>{this.errorMessage=t.message,this.handleError(t,e,a)},final:()=>{this.isLoading=!1}}):(this.errorMessage="payout-id and auth-token props are required",this.handleError(o.MISSING_PROPS,this.errorMessage,i.ERROR))}get entityId(){return this.balanceTransactions.map((t=>t.id))}get showEmptyState(){return!this.isLoading&&!this.errorMessage&&this.transactionsTable.rowData.length<1}get showErrorState(){return!this.isLoading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.isLoading}get requestParams(){return Object.assign({payout_id:this.payoutId,limit:"15"},this.pagingParams)}render(){return t(C,{key:"8c59c0783d3d77d1e4101ee52cf1df932f35c436"},t(u,{key:"c1c05be0dc6e1aff5874777f57c961e65d484463"},t(m,{key:"3ac2ed7f128d96443ba47a33628012c380ee3cc8"},t(y,{key:"01ad306c5c2336ef70b6de8df8afe11e4aaea853"},t(b,{key:"e7df4606ff90f549c6909ce62869be064cf65e44"},this.transactionsTable.columnData.map((t=>t)))),t(_,{key:"01e49a1b4a04028c133079aee90a1ab75c69debf"},t(w,{key:"73ff57f00ad0b36bc20ce25c191f2a59b9412984",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(g,{key:"43deaa2102856c17bdc990847e4246b5cba33aa4",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(j,{key:"c0096e0dd83a313e54df516a4959172edb2bf9a2",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(v,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(T,{key:"0c337d21c169b74123afe93432bb70059d7c20f4"},t(k,{key:"736325de92a1462dea67950c2a15a54906894bab"},t(D,{key:"d71681536976869a146417945d461da154d7364b",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"2f3d4d05a5522c0ac4314ee15f5083bc919e0164",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],payoutId:["propChanged"],authToken:["propChanged"]}}};export{O as justifi_payout_transactions_list}
@@ -0,0 +1 @@
1
+ import{r as e,h as a}from"./p-DwYM91AU.js";import{c as t,a as c,F as i}from"./p-DiJD6Iqx.js";import{ao as d}from"./p-sA8HBfkI.js";import"./p-BFTU3MAI.js";const s=t({additional_statement:c().nullable()});var o,l;!function(e){e.disputeReason="dispute_reason",e.productOrService="product_or_service",e.customerDetails="customer_details",e.cancellationPolicy="cancellation_policy",e.refundPolicy="refund_policy",e.duplicateCharge="duplicate_charge",e.electronicEvidence="electronic_evidence",e.shippingDetails="shipping_details",e.additionalStatement="additional_statement"}(o||(o={})),function(e){e.activity_log="activity_log",e.cancellationPolicy="cancellation_policy",e.customerCommunication="customer_communication",e.customerSignature="customer_signature",e.duplicateChargeDocumentation="duplicate_charge_documentation",e.receipt="receipt",e.refundPolicy="refund_policy",e.serviceDocumentation="service_documentation",e.shippingDocumentation="shipping_documentation",e.uncategorizedFile="uncategorized_file"}(l||(l={}));class n{set presignedUrl(e){this._presignedUrl=e}get presignedUrl(){return this._presignedUrl}async getFileString(){const e=new Promise(((e,a)=>{const t=new FileReader;t.onload=a=>{e(a.target.result)},t.onerror=()=>{a(new Error("Error reading file"))},t.readAsArrayBuffer(this._file)}));return await e}constructor(e,a){this._file=e,this.file_name=e.name,this.file_type=e.type,this.dispute_evidence_type=a}}const r=(e,a)=>{const t=e.target,c=t.name,i=t.files;a[c]=[];for(const e of i)a[c].push(new n(e,c))},f=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.acceptedTerms=!1,this.documents={uncategorized_file:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.additionalStatement)))}componentWillLoad(){this.form=new i(s)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"d943c5a732c4ece78a9d3894b1395bfe9fde13eb"},a("div",{key:"918d1e3ef1259396d177e41d10998cbd9d69c060",class:"row gy-3"},a("div",{key:"bfab1580c07005da4046884acd07858478ed9e29",class:"col-12"},a("h2",{key:"9d82008f712ce05f35a42bc169f581ec5e38d9ea",class:"h5",part:d},"Additional Evidence")),a("div",{key:"28b192ee15fc788ef9923e366b46e0d1458f5061",class:"col-12"},a("form-control-textarea",{key:"799b740724230fc5fd7ed7e19d8f7069416eed10",label:"Is there anything else you would like to say about this dispute?",name:"additional_statement",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.additional_statement,inputHandler:this.inputHandler,errorText:this.errors.additional_statement})),a("div",{key:"0e1f293bd196f45faaa495f310be6c72ce101e0e",class:"col-12"},a("form-control-file-v2",{key:"02ae90e06226350272bb49d1cb0d753f641c6801",label:"Additional files",name:"uncategorized_file",multiple:!0,helpText:"Upload any additional pieces of evidence that have not already been provided.",onChange:e=>r(e,this.documents),errorText:null===(t=this.documentErrors)||void 0===t?void 0:t.uncategorized_file}))))}},b=t({cancellation_policy_disclosure:c().nullable(),cancellation_rebuttal:c().nullable()}),h=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={cancellation_policy:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.cancellationPolicy)))}componentWillLoad(){this.form=new i(b)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,c;return a("div",{key:"24d9db9409e2bc6147e73b70b103c86d9c65580d"},a("div",{key:"a724a9f96b0cc7f6a38fab82b572962b72ffbf9b",class:"row gy-3"},a("div",{key:"ba734334efd7a7fbc7adcc2c8bcb73f80278a413",class:"col-12"},a("h2",{key:"f57de791ca5b8f6752ce06460ba813f89f8145f5",class:"h5",part:d},"Cancellation Policy")),a("div",{key:"86946aa4b4b2615864c3e6053e661564f4eb5658",class:"col-12"},a("form-control-textarea",{key:"0f996bfd0a1b64effef21418a7813a12f1ad5fcd",label:"Cancellation Policy Disclosure",name:"cancellation_policy_disclosure",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.cancellation_policy_disclosure,inputHandler:this.inputHandler,errorText:this.errors.cancellation_policy_disclosure})),a("div",{key:"d46ca79368e4bc1f13e406d0fece0be4b8e33950",class:"col-12"},a("form-control-textarea",{key:"0d7991cf878e645b80b8aa8b03533dc758d267a9",label:"Cancellation Rebuttal",name:"cancellation_rebuttal",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.cancellation_rebuttal,inputHandler:this.inputHandler,errorText:this.errors.cancellation_rebuttal})),a("div",{key:"aa89c58ba7263fe7419908fd4964874645b26c3e",class:"col-12"},a("form-control-file-v2",{key:"7e6020a57b0d804c20e0b2c092bf512912679eb9",label:"Upload Cancellation Policy",name:"cancellation_policy",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.cancellation_policy}))))}},u=t({customer_name:c().nullable(),customer_email_address:c().nullable(),customer_billing_address:c().nullable()}),v=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={customer_signature:[],customer_communication:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.customerDetails)))}componentWillLoad(){this.form=new i(u)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,c,i,s;return a("div",{key:"b348b17f0b320a540b0496f04572ba1360f4fd15"},a("div",{key:"376750fbcd6da41a602d6ad5b4a2130dbcce17dc",class:"row gy-3"},a("div",{key:"2f6134bbd055fdb8afa495e29370a3528b5d8701",class:"col-12"},a("h2",{key:"7e29aa97b070479bc6df91fe2bd4416a3a2210dd",class:"h5",part:d},"Customer Details")),a("div",{key:"7f44155fab6f6387fa768af1225c10a63fc3587b",class:"col-12"},a("form-control-text",{key:"6c38a71cdcf231729d9db144a3936130dc0e0b4d",label:"Full Name",name:"customer_name",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.customer_name,inputHandler:this.inputHandler,errorText:this.errors.customer_name})),a("div",{key:"06c883df8dfa58535c32bcb43e6649537ff0b91c",class:"col-12"},a("form-control-text",{key:"eb424a6d80d90d19e7be31323de3ad41ede47c09",label:"Email",name:"customer_email_address",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.customer_email_address,inputHandler:this.inputHandler,errorText:this.errors.customer_email_address})),a("div",{key:"a7ba05dfc72dabeeb690daff6e9f692488172d15",class:"col-12"},a("form-control-textarea",{key:"9b47c924dfdd8065d6e456210a2cdaac30376f9b",label:"Billing Address",name:"customer_billing_address",defaultValue:null===(c=this.disputeResponse)||void 0===c?void 0:c.customer_billing_address,inputHandler:this.inputHandler,errorText:this.errors.customer_billing_address})),a("div",{key:"37ba310fdd33ffb1fc41a168fb31c4f21a49b568",class:"col-12"},a("form-control-file-v2",{key:"e54b14ab429073482f68f8ba259e797be4c41a0f",label:"Customer Signature",name:"customer_signature",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.customer_signature})),a("div",{key:"9084a731a58784355bc543759d6bf50bd6001c52",class:"col-12"},a("form-control-file-v2",{key:"bfb40202ff50523583ad8bcc7dc96740495de312",label:"Customer Communication",name:"customer_communication",onChange:e=>r(e,this.documents),errorText:null===(s=this.documentErrors)||void 0===s?void 0:s.customer_communication}))))}},p=t({duplicate_charge_original_payment_id:c().nullable(),duplicate_charge_explanation:c().nullable()}),m=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={duplicate_charge_documentation:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.duplicateCharge)))}componentWillLoad(){this.form=new i(p)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,c;return a("div",{key:"e47e81701d243ca3d0cbd63752ac8edc02337cf8"},a("div",{key:"e8c380c186d957a09910887ffaa1476c55889ae2",class:"row gy-3"},a("div",{key:"6209bbe1f2b37a0fb7215d9eca5da546f7b07343",class:"col-12"},a("h2",{key:"4fcc49631c78e5f780b116f6741efbdc8526a81b",class:"h5",part:d},"Duplicate Charge")),a("div",{key:"8d0a2ebe2fc159af79392decb28775e39e18868a",class:"col-12"},a("form-control-text",{key:"45e3bfb01b42fdbfa366226bce57f59b33b682e5",label:"Original Payment ID",name:"duplicate_charge_original_payment_id",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.duplicate_charge_original_payment_id,inputHandler:this.inputHandler,errorText:this.errors.duplicate_charge_original_payment_id})),a("div",{key:"2e2d2c826a068d1ca22b527187b8850c5f92aa80",class:"col-12"},a("form-control-textarea",{key:"97437cc325d852b9ff4ad1080d7921caac392ad2",label:"Duplicate Charge Explanation",name:"duplicate_charge_explanation",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.duplicate_charge_explanation,inputHandler:this.inputHandler,errorText:this.errors.duplicate_charge_explanation})),a("div",{key:"bf0afc8eaf9eafd1cf08a1d1efeb1007e66ed1a0",class:"col-12"},a("form-control-file-v2",{key:"75d18cc087a7765798f51463d2f9e70197cc5374",label:"Duplicate Charge Documentation",name:"duplicate_charge_documentation",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.duplicate_charge_documentation}))))}},y=t({customer_purchase_ip_address:c().nullable()}),_=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={activity_log:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.electronicEvidence)))}componentWillLoad(){this.form=new i(y)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"6518aa80a07c58e19076a102cc9e319cc3c9ee39"},a("div",{key:"73444a9bf6008cbb1e6e66945ceca8ee23b996b1",class:"row gy-3"},a("div",{key:"b13b7db17bcf0e35a2fec5089bb5a282323587cb",class:"col-12"},a("h2",{key:"289f212f765d91b9565e2c2024b0adedece833c2",class:"h5",part:d},"Electronic Evidence")),a("div",{key:"7c4bb450be8746e3024b807ea8dc9f368cbb746c",class:"col-12"},a("form-control-text",{key:"b4938d9d1b0869af38d4d74eb61b8f5dda1761e2",label:"Purchase IP Address",name:"customer_purchase_ip_address",helpText:"The IP address used by the customer during the purchase.",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.customer_purchase_ip_address,inputHandler:this.inputHandler,errorText:this.errors.customer_purchase_ip_address})),a("div",{key:"88ce56f5e30a5dae990fcf3ee0816a3636dfe4f9",class:"col-12"},a("form-control-file-v2",{key:"4890efb2a4c67ec668c12caa53ce0978f6870925",label:"Activity Logs",name:"activity_log",helpText:"Any server or activity logs that provide evidence of the customer's access to or download of the purchased digital product. This information should encompass IP addresses, relevant timestamps, and any detailed records of activity.",onChange:e=>r(e,this.documents),errorText:null===(t=this.documentErrors)||void 0===t?void 0:t.activity_log}))))}},k=t({product_description:c().nullable(),service_date:c().nullable()}),g=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={service_documentation:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.productOrService)))}componentWillLoad(){this.form=new i(k)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,c;return a("div",{key:"cfa8c6c92bb2790dbaea1939e6acc7539fd848d7"},a("div",{key:"63d38a0c614f932ef018791fb1388b3dc49c7e5c",class:"row gy-3"},a("div",{key:"6140c07a8c354d9339509a00141fbc7a1de146f4",class:"col-12"},a("h2",{key:"40c755fe0938930e0283c391df12c417850eecb4",class:"h5",part:d},"Product & Service Details")),a("div",{key:"b213783cf90bcc17522ab0367e530a48a2474270",class:"col-12"},a("form-control-text",{key:"b7977ccef55a4f616f1d7cd20cedad5af5187741",label:"Product Description",name:"product_description",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.product_description,inputHandler:this.inputHandler,errorText:this.errors.product_description})),a("div",{key:"462085df8eedee334fbfa38d752803493515b39f",class:"col-12"},a("form-control-date",{key:"dca6d8369385607b2fa43882d864e42d4c0fec4c",label:"Service Date",name:"service_date",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.service_date,inputHandler:this.inputHandler,errorText:this.errors.service_date})),a("div",{key:"74aeb86e75d1496f88f7286cab4cf8fcbd737f60",class:"col-12"},a("form-control-file-v2",{key:"6872fb5a4a54ace55578dd0ba789ca7409799645",label:"Service Documentation",name:"service_documentation",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.service_documentation}))))}},x=t({refund_policy_disclosure:c().nullable(),refund_refusal_explanation:c().nullable()}),j=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={refund_policy:[],receipt:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.refundPolicy)))}componentWillLoad(){this.form=new i(x)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,c,i;return a("div",{key:"d9234b27998495091ed3a8f6a68e8bd0ca273351"},a("div",{key:"8456144a474b1cf7bfbcfd0bac0e24837376a0fd",class:"row gy-3"},a("div",{key:"f13612f184a140a4bd9b5ee18a31b0faad3da535",class:"col-12"},a("h2",{key:"dc5959ec45379faafa8dc973fcb652729c65a4ae",class:"h5",part:d},"Refund Policy and Receipt")),a("div",{key:"bcf9f262aa58d5a92d13477035bf8fea788c8738",class:"col-12"},a("form-control-textarea",{key:"6f8676d9a2427b7a3d6cd5a1ba6533f9c21b986f",label:"Refund Policy Disclosure",name:"refund_policy_disclosure",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.refund_policy_disclosure,inputHandler:this.inputHandler})),a("div",{key:"9d5707337a5955d63eaca24b885bbdbfbf3f84d8",class:"col-12"},a("form-control-textarea",{key:"4e7f13b79b895ddee0890519176b54ccaa092fa4",label:"Refund Refusal Explanation",name:"refund_refusal_explanation",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.refund_refusal_explanation,inputHandler:this.inputHandler})),a("div",{key:"c02521ff9575fd1d0f430c6b5171457c5205a12f",class:"col-12"},a("form-control-file-v2",{key:"d5223c87347af2a02cb0748be32fffe29ac18137",label:"Upload Refund Policy",name:"refund_policy",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.refund_policy})),a("div",{key:"341f0fa04c29e33533cc8ec16b4364367124ce53",class:"col-12"},a("form-control-file-v2",{key:"280dd38b7b4e5a29b6dd7f5fbc765f0e3b9cd765",label:"Upload Receipt",name:"receipt",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.receipt}))))}},O=t({shipping_carrier:c().nullable(),shipping_tracking_number:c().nullable(),shipping_date:c().nullable(),shipping_address:c().nullable()}),T=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={shipping_documentation:[]},this.documentList=[],this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.shippingDetails)))}componentWillLoad(){this.form=new i(O)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,c,i,s;return a("div",{key:"6b71aa457f7e3ac9fd050deea342c6ca14c1d62f"},a("div",{key:"c6a309a59de4b6cf6f5ca1e3bfee3da1cdca543c",class:"row gy-3"},a("div",{key:"1668c86989cec124c7d11d54b9dd6edf46c182d0",class:"col-12"},a("h2",{key:"e911f21be4aa8a369d427ae80989d8223693e3ba",class:"h5",part:d},"Shipping Details")),a("div",{key:"025beda9984cb47518eccb04971470a46ad3d73b",class:"col-12"},a("form-control-text",{key:"ea8db703b0d94e5c2d8148cfaa97e6eb2a824e06",label:"Shipping Carrier Name",name:"shipping_carrier",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.shipping_carrier,inputHandler:this.inputHandler,errorText:this.errors.shipping_carrier})),a("div",{key:"764cddd9b2b8156ab97d598fed23459f074006de",class:"col-12"},a("form-control-text",{key:"4ce85b6b5c4ca79c2edaafbe3169bf049153cbfa",label:"Tracking Number",name:"shipping_tracking_number",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.shipping_tracking_number,inputHandler:this.inputHandler,errorText:this.errors.shipping_tracking_number})),a("div",{key:"8e18b6159156b7d21dba344e2c1a22418b139e3e",class:"col-12"},a("form-control-date",{key:"d3a8ef184475150d07fea4f82e65800c5c259b47",label:"Date Shipped",name:"shipping_date",defaultValue:null===(c=this.disputeResponse)||void 0===c?void 0:c.shipping_date,inputHandler:this.inputHandler,errorText:this.errors.shipping_date})),a("div",{key:"ff23ee968b2b6f64eefd3453fcdb788034e166e0",class:"col-12"},a("form-control-textarea",{key:"75bad71ceae6bab8de6d47175fda3bd27491bde0",label:"Shipping Address",name:"shipping_address",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.shipping_address,inputHandler:this.inputHandler,errorText:this.errors.shipping_address})),a("div",{key:"c774e01b09f930e3656e4b194b386234a692fbbe",class:"col-12"},a("form-control-file-v2",{key:"928f2195a67e1aac483ea70ff97c3e65e8dcfbe9",label:"Shipping Documentation",name:"shipping_documentation",onChange:e=>r(e,this.documents),errorText:null===(s=this.documentErrors)||void 0===s?void 0:s.shipping_documentation}))))}};export{f as justifi_additional_statement,h as justifi_cancellation_policy,v as justifi_customer_details,m as justifi_duplicate_charge,_ as justifi_electronic_evidence,g as justifi_product_or_service,j as justifi_refund_policy,T as justifi_shipping_details}
@@ -1 +1 @@
1
- import{r as e,c as t,h as s,H as a}from"./p-DwYM91AU.js";import{I as i}from"./p-Ce_F4E0f.js";import{b as d,U as r,a as o,c as l,l as c}from"./p-QmGrQis7.js";import{F as n}from"./p-CpP3EZBK.js";import"./p-CZfYo5-1.js";import{C as h}from"./p-B5rtFhtR.js";import{n as f}from"./p-BnjCmwMr.js";import{b,c as u}from"./p-DfKxeSrC.js";const m=class{constructor(s){e(this,s),this.formControlInput=t(this,"formControlInput"),this.formControlBlur=t(this,"formControlBlur"),this.imask=null,this.isFocused=!1,this.initializeIMask=()=>{this.textInput&&(this.imask=i(this.textInput,{mask:this.mask}),this.imask.on("accept",(()=>{var e;const t=null===(e=this.imask)||void 0===e?void 0:e.unmaskedValue;void 0!==t&&this.inputHandler(this.name,t)})),this.textInput.addEventListener("blur",(()=>this.formControlBlur.emit())))},this.handleFormControlInput=e=>{var t;const s=e.target,a=s.getAttribute("name"),i=(null===(t=this.imask)||void 0===t?void 0:t.unmaskedValue)||s.value;this.formControlInput.emit({name:a,value:i})},this.updateInput=e=>{this.imask&&e&&(this.imask.value=String(e))}}handleDefaultValueChange(e){this.initializeIMask(),this.updateInput(e)}disconnectedCallback(){var e;null===(e=this.imask)||void 0===e||e.destroy()}componentDidLoad(){this.textInput&&(this.initializeIMask(),this.updateInput(this.defaultValue))}get part(){return this.errorText?d:this.disabled?r:this.isFocused?o:l}render(){return s(a,{key:"6c9814049ed9df9b56ece90a0cba99d567a45162"},s("div",{key:"17893086baabe9c346fa47e9f64c451635a99972",class:"form-group d-flex flex-column"},s("div",{key:"e627c915dcae3c1a6ad91e61da69c11381ed9a93",class:"d-flex align-items-start gap-2"},s("label",{key:"a74daebf653579f25c787064485227ee5ee7af08",part:c,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"fb5c48b9e75d8168131189081a55722d50408413",helpText:this.helpText})),s("input",{key:"10fd5ba8b26058ed7fbe3f4b789358a42933f83e",ref:e=>this.textInput=e,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled}),s(n,{key:"dd183a39d81748d9dd630f210126742df0b8a324",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}},p=class{constructor(t){e(this,t),this.country=h.USA}render(){var e,t,i,d,r,o,l,c,n,m;const p=u[this.country],v=b[this.country];return s(a,{key:"dde5469230a6067ab343e77b1e11e25d815caa5a"},s("div",{key:"a28ca49da90e4981e363ccc69fa59e930097cad2",class:"row gy-3"},s("div",{key:"dc6e201854c758cbbd493dd23c38a40e072cfaaf",class:"col-12"},s("form-control-text",{key:"a2e43eb37e7df69c89484f74adf7f297183818d7",name:"line1",label:"Street Address",inputHandler:this.inputHandler,defaultValue:null===(e=this.defaultValues)||void 0===e?void 0:e.line1,errorText:null===(t=this.errors)||void 0===t?void 0:t.line1,helpText:"No PO Boxes."})),s("div",{key:"e59a0af86c1146e1c5ac2b86f0e531bab76467cc",class:"col-12"},s("form-control-text",{key:"8ba59e74e6be2bc5980ff2c08126c9df77460ab2",name:"line2",label:"Address Line 2 (optional)",inputHandler:this.inputHandler,defaultValue:null===(i=this.defaultValues)||void 0===i?void 0:i.line2,errorText:null===(d=this.errors)||void 0===d?void 0:d.line2})),s("div",{key:"671a3098a6295c6702b670506a8a17190a4cf90a",class:"col-12"},s("form-control-text",{key:"cb1c90bd567e1ecb82a9be4c540eab7ca2bcfb99",name:"city",label:"City",inputHandler:this.inputHandler,defaultValue:null===(r=this.defaultValues)||void 0===r?void 0:r.city,errorText:null===(o=this.errors)||void 0===o?void 0:o.city})),s("div",{key:"554e28a4a0cdc81076f0342b31ccb1cad3c122f7",class:"col-12"},s("form-control-select",{key:"9fb1e73cf440173d9a4a94f23eca5dbf77310e76",name:"state",label:p.stateLabel,options:v.stateOptions,inputHandler:this.inputHandler,defaultValue:null===(l=this.defaultValues)||void 0===l?void 0:l.state,errorText:null===(c=this.errors)||void 0===c?void 0:c.state})),s("div",{key:"fbde65bfada699a7bcab4bb642b39cae3dc123b8",class:"col-12"},s("form-control-text",{key:"9218151756e93820985c88721bb549904e0f7212",name:"postal_code",label:p.postalLabel,inputHandler:this.inputHandler,defaultValue:null===(n=this.defaultValues)||void 0===n?void 0:n.postal_code,errorText:null===(m=this.errors)||void 0===m?void 0:m.postal_code,maxLength:this.country===h.USA?5:7,keyDownHandler:this.country===h.USA?f:void 0}))))}},v=class{constructor(t){e(this,t),this.address={},this.inputHandler=(e,t)=>{this.address[e]=t,this.address=Object.assign({},this.address)}}handleAddressChange(e){this.handleFormUpdate(e)}render(){return s(a,{key:"86c91933676745470d6b28cf6843624d092adc57"},s("justifi-form-address-fields",{key:"7cbee24003b6b0446fb1203c9863151b0d2f4f15",country:this.country,errors:this.errors,defaultValues:this.defaultValues,inputHandler:this.inputHandler}))}static get watchers(){return{address:["handleAddressChange"]}}};export{m as form_control_number_masked,p as justifi_form_address_fields,v as justifi_identity_address_form}
1
+ import{r as e,c as t,h as s,H as a}from"./p-DwYM91AU.js";import{I as i}from"./p-Ce_F4E0f.js";import{b as d,X as o,a as r,c as l,l as c}from"./p-sA8HBfkI.js";import{F as n}from"./p-CZ3F1ZAT.js";import"./p-CZfYo5-1.js";import{C as h}from"./p-B5rtFhtR.js";import{n as f}from"./p-BnjCmwMr.js";import{b,c as u}from"./p-DfKxeSrC.js";const m=class{constructor(s){e(this,s),this.formControlInput=t(this,"formControlInput"),this.formControlBlur=t(this,"formControlBlur"),this.imask=null,this.isFocused=!1,this.initializeIMask=()=>{this.textInput&&(this.imask=i(this.textInput,{mask:this.mask}),this.imask.on("accept",(()=>{var e;const t=null===(e=this.imask)||void 0===e?void 0:e.unmaskedValue;void 0!==t&&this.inputHandler(this.name,t)})),this.textInput.addEventListener("blur",(()=>this.formControlBlur.emit())))},this.handleFormControlInput=e=>{var t;const s=e.target,a=s.getAttribute("name"),i=(null===(t=this.imask)||void 0===t?void 0:t.unmaskedValue)||s.value;this.formControlInput.emit({name:a,value:i})},this.updateInput=e=>{this.imask&&e&&(this.imask.value=String(e))}}handleDefaultValueChange(e){this.initializeIMask(),this.updateInput(e)}disconnectedCallback(){var e;null===(e=this.imask)||void 0===e||e.destroy()}componentDidLoad(){this.textInput&&(this.initializeIMask(),this.updateInput(this.defaultValue))}get part(){return this.errorText?d:this.disabled?o:this.isFocused?r:l}render(){return s(a,{key:"19208aa7aae72ea0492dcb2d46651bb80b6ab133"},s("div",{key:"93aea8b9cede9bec9c4f5959dd3cb22065bd684f",class:"form-group d-flex flex-column"},s("div",{key:"8782f39a557f2f1fb14accea192d5677256c5752",class:"d-flex align-items-start gap-2"},s("label",{key:"0abdc2776f59ddb560e404b7ce05200cec8d1082",part:c,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"649166a60116190c3e06039825e1a87d1b01b100",helpText:this.helpText})),s("input",{key:"862ea2874c2f1f33c12b5e8afcb49e903731e3d9",ref:e=>this.textInput=e,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled}),s(n,{key:"01ecae80e5d67d45a2c954ededea51d1db41aafc",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}},v=class{constructor(t){e(this,t),this.country=h.USA}render(){var e,t,i,d,o,r,l,c,n,m;const v=u[this.country],p=b[this.country];return s(a,{key:"dde5469230a6067ab343e77b1e11e25d815caa5a"},s("div",{key:"a28ca49da90e4981e363ccc69fa59e930097cad2",class:"row gy-3"},s("div",{key:"dc6e201854c758cbbd493dd23c38a40e072cfaaf",class:"col-12"},s("form-control-text",{key:"a2e43eb37e7df69c89484f74adf7f297183818d7",name:"line1",label:"Street Address",inputHandler:this.inputHandler,defaultValue:null===(e=this.defaultValues)||void 0===e?void 0:e.line1,errorText:null===(t=this.errors)||void 0===t?void 0:t.line1,helpText:"No PO Boxes."})),s("div",{key:"e59a0af86c1146e1c5ac2b86f0e531bab76467cc",class:"col-12"},s("form-control-text",{key:"8ba59e74e6be2bc5980ff2c08126c9df77460ab2",name:"line2",label:"Address Line 2 (optional)",inputHandler:this.inputHandler,defaultValue:null===(i=this.defaultValues)||void 0===i?void 0:i.line2,errorText:null===(d=this.errors)||void 0===d?void 0:d.line2})),s("div",{key:"671a3098a6295c6702b670506a8a17190a4cf90a",class:"col-12"},s("form-control-text",{key:"cb1c90bd567e1ecb82a9be4c540eab7ca2bcfb99",name:"city",label:"City",inputHandler:this.inputHandler,defaultValue:null===(o=this.defaultValues)||void 0===o?void 0:o.city,errorText:null===(r=this.errors)||void 0===r?void 0:r.city})),s("div",{key:"554e28a4a0cdc81076f0342b31ccb1cad3c122f7",class:"col-12"},s("form-control-select",{key:"9fb1e73cf440173d9a4a94f23eca5dbf77310e76",name:"state",label:v.stateLabel,options:p.stateOptions,inputHandler:this.inputHandler,defaultValue:null===(l=this.defaultValues)||void 0===l?void 0:l.state,errorText:null===(c=this.errors)||void 0===c?void 0:c.state})),s("div",{key:"fbde65bfada699a7bcab4bb642b39cae3dc123b8",class:"col-12"},s("form-control-text",{key:"9218151756e93820985c88721bb549904e0f7212",name:"postal_code",label:v.postalLabel,inputHandler:this.inputHandler,defaultValue:null===(n=this.defaultValues)||void 0===n?void 0:n.postal_code,errorText:null===(m=this.errors)||void 0===m?void 0:m.postal_code,maxLength:this.country===h.USA?5:7,keyDownHandler:this.country===h.USA?f:void 0}))))}},p=class{constructor(t){e(this,t),this.address={},this.inputHandler=(e,t)=>{this.address[e]=t,this.address=Object.assign({},this.address)}}handleAddressChange(e){this.handleFormUpdate(e)}render(){return s(a,{key:"86c91933676745470d6b28cf6843624d092adc57"},s("justifi-form-address-fields",{key:"7cbee24003b6b0446fb1203c9863151b0d2f4f15",country:this.country,errors:this.errors,defaultValues:this.defaultValues,inputHandler:this.inputHandler}))}static get watchers(){return{address:["handleAddressChange"]}}};export{m as form_control_number_masked,v as justifi_form_address_fields,p as justifi_identity_address_form}
@@ -1 +1 @@
1
- import{r as t,h as i}from"./p-DwYM91AU.js";const e=class{constructor(i){t(this,i),this.submitButtonText="Submit"}async tokenizePaymentMethod(t){return this.tokenizePaymentMethodRef.tokenizePaymentMethod(t)}async fillBillingForm(t){return this.tokenizePaymentMethodRef.fillBillingForm(t)}async validate(){return this.tokenizePaymentMethodRef.validate()}render(){return i("internal-tokenize-payment-method",{key:"5f1718b411f39112cfcc2c0b744c49aa5140374d",ref:t=>this.tokenizePaymentMethodRef=t,authToken:this.authToken,accountId:this.accountId,disableCreditCard:this.disableCreditCard,disableBankAccount:this.disableBankAccount,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,hideSubmitButton:this.hideSubmitButton,paymentMethodGroupId:this.paymentMethodGroupId})}};export{e as justifi_tokenize_payment_method}
1
+ import{r as t,h as e}from"./p-DwYM91AU.js";const i=class{constructor(e){t(this,e),this.submitButtonText="Submit"}async tokenizePaymentMethod(t){return this.tokenizePaymentMethodRef.tokenizePaymentMethod(t)}async fillBillingForm(t){return this.tokenizePaymentMethodRef.fillBillingForm(t)}async validate(){return this.tokenizePaymentMethodRef.validate()}render(){return e("internal-tokenize-payment-method",{key:"ccbe4443b3e88f221eb828cae14450c5ea8dc172",ref:t=>this.tokenizePaymentMethodRef=t,authToken:this.authToken,accountId:this.accountId,disableCreditCard:this.disableCreditCard,disableBankAccount:this.disableBankAccount,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,hideSubmitButton:this.hideSubmitButton,paymentMethodGroupId:this.paymentMethodGroupId})}};export{i as justifi_tokenize_payment_method}
@@ -0,0 +1 @@
1
+ import{r as s,c as i,h as t}from"./p-DwYM91AU.js";import{c as o,J as r}from"./p-DISrhs4v.js";import{C as e,a as p}from"./p-Cjcsf8ku.js";import{m as n,a}from"./p-5aA7gjr5.js";import{B as h}from"./p-Dlrq1iZf.js";import{A as m}from"./p-yyedWKWX.js";import"./p-BrRsgB8S.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import"./p-CsRppqXL.js";import"./p-D2muobcE.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-B09GVew-.js";import"./p-HXpYMWUU.js";import"./p-DkoufM1t.js";const d=m();class u{async postProvisioning(s,i,t){return d.post({endpoint:"entities/provisioning",body:{business_id:i,product_category:t},authToken:s})}}const c=class{constructor(t){s(this,t),this.errorEvent=i(this,"error-event"),this.allowOptionalFields=!1,this.formTitle="Business Information"}propChanged(){this.initializeApi()}componentWillLoad(){o(),this.analytics=new r(this),this.initializeApi()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=n({authToken:this.authToken,businessId:this.businessId,service:new h}),this.postProvisioning=a({authToken:this.authToken,businessId:this.businessId,product:"payment",service:new u})):this.errorEvent.emit({message:"auth-token and business-id are required",errorCode:p.MISSING_PROPS,severity:e.ERROR})}render(){return t("justifi-payment-provisioning-core",{key:"80baf93d680fd610755fdfb6be030178140568da",businessId:this.businessId,authToken:this.authToken,allowOptionalFields:this.allowOptionalFields,formTitle:this.formTitle,getBusiness:this.getBusiness,postProvisioning:this.postProvisioning})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}};export{c as justifi_payment_provisioning}
@@ -0,0 +1 @@
1
+ import{h as s,r as i,c as t}from"./p-DwYM91AU.js";import{ao as e,am as r,ai as o,G as l}from"./p-sA8HBfkI.js";import{S as d}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{c as a,J as n}from"./p-DISrhs4v.js";import{C as h,a as c}from"./p-Cjcsf8ku.js";import{B as v}from"./p-Dlrq1iZf.js";import{B as u}from"./p-B5rtFhtR.js";import{m as p}from"./p-sCHf--Vc.js";import{S as m}from"./p-CsgUIrv8.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{k as f,j as w,b as g}from"./p-BrRsgB8S.js";import"./p-CLHwhyvu.js";import"./p-BH0Xfn-F.js";import{g as b,a as x}from"./p-D2muobcE.js";import{T as y}from"./p-CCxsFwC4.js";import{k as j}from"./p-B09GVew-.js";import"./p-CsRppqXL.js";import"./p-yyedWKWX.js";import"./p-BYsgavgS.js";import"./p-DkoufM1t.js";const k=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(m,{width:"25%"})),s("div",{class:"col-12"},s(m,{width:"100%"})),s("div",{class:"col-12 d-flex gap-3"},s(m,{width:"50%"}),s(m,{width:"50%"})),s("div",{class:"col-12 d-flex gap-3"},s(m,{width:"65%"}),s(m,{width:"35%"}))),S=()=>s("div",{class:"row gap-5"},s("div",{class:"col-12"},s(m,{width:"40%",height:"40px"})),s(k,null)),C=()=>s("div",{class:"terminal-selector-skeleton mt-4 rounded shadow-sm"},s("div",{class:"d-flex align-items-center gap-3"},s(m,{width:"125px",height:"125px",styles:{borderRadius:"8px"}}),s("div",{class:"flex-grow-1"},s("div",{class:"d-flex row flex-row"},s("div",{class:"col-6 flex-column"},s(m,null),s(m,{width:"60%"})),s("div",{class:"d-flex justify-content-end align-items-center gap-2 col-6"},s(m,{width:"32px",height:"32px",styles:{borderRadius:"50%"}}),s(m,{width:"80px",height:"32px"}),s(m,{width:"32px",height:"32px",styles:{borderRadius:"50%"}}))),s("div",{class:"mt-4"},s("div",{class:"d-flex flex-column gap-2"},s(m,null),s(m,null)))))),B=class{constructor(s){i(this,s),this.errorEvent=t(this,"error-event"),this.submitted=t(this,"submit-event"),this.shipping=!1,this.submitButtonText="Submit Order",this.loading={business:!0,terminals:!0},this.submitting=!1,this.error=null,this.totalQuantity=0}componentWillLoad(){this.order=new w({business_id:this.businessId,sub_account_id:this.accountId,order_type:this.shipping?g.boardingShipping:g.boardingOnly}),a(),this.analytics=new n(this),this.loadData()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}handleError(s,i,t){this.error={message:s,code:i,severity:t},this.errorEvent.emit({errorCode:i,message:s,severity:t})}loadData(){this.businessId&&this.authToken?(this.initializeGetBusiness(),this.initializeGetTerminalModels()):this.handleError("Invalid business id or auth token",c.MISSING_PROPS,h.ERROR)}initializeGetBusiness(){p({id:this.businessId,authToken:this.authToken,service:new v})({onSuccess:({business:s})=>{this.business=new u(s),this.loading.business=!1},onError:({error:s,code:i,severity:t})=>{this.handleError(s,i,t),this.loading.business=!1}})}initializeGetTerminalModels(){(({id:s,authToken:i,service:t})=>async({onSuccess:e,onError:r})=>{var o,l,d,a;try{const n=await t.fetchTerminalModels(s,i);if(n.error)return r({error:x(n.error),code:b(null===(a=n.error)||void 0===a?void 0:a.code),severity:h.ERROR});e({terminals:(null===(l=null===(o=n.data)||void 0===o?void 0:o.terminal_order_models)||void 0===l?void 0:l.map((s=>new f(s))))||[],orderLimit:null===(d=n.data)||void 0===d?void 0:d.order_limit})}catch(s){const i=b(null==s?void 0:s.code);return r({error:s.message||s,code:i,severity:h.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new y})({onSuccess:({terminals:s,orderLimit:i})=>{this.terminalModels=s,this.orderLimit=i,this.loading.terminals=!1},onError:({error:s,code:i,severity:t})=>{this.handleError(s,i,t),this.loading.terminals=!1}})}submitOrder(){const s=(({authToken:s,service:i,apiOrigin:t="https://wc-proxy.justifi.ai"})=>async({terminalOrder:e,onSuccess:r,onError:o})=>{var l;try{const d=await i.orderTerminals(s,e,t);if(d.error)return o({error:x(d.error),code:b(null===(l=d.error)||void 0===l?void 0:l.code),severity:h.ERROR});{const{data:s}=d;r({data:s})}}catch(s){const i=b(null==s?void 0:s.code);return o({error:s.message||s,code:i,severity:h.ERROR})}})({authToken:this.authToken,service:new y});this.submitting=!0,s({terminalOrder:this.order.payload,onSuccess:({data:s})=>{this.submitted.emit(s),this.submitting=!1},onError:({error:s,code:i,severity:t})=>{this.handleError(s,i,t),this.submitting=!1}})}onSelectedQuantityChange(s){this.order.updateTerminal(s.detail.modelName,s.detail.quantity),this.totalQuantity=this.order.totalQuantity}renderLoading(){return s("div",null,this.loading.business&&s(S,null),this.loading.terminals&&s("div",{class:"mt-5"},s(C,null),s(C,null),s(C,null)))}renderBusinessDetails(){var i,t,o,l,d,a,n,h;if(!this.loading.business&&this.business)return s("div",{class:"d-flex flex-column gap-4 mb-5 pt-5"},s("div",{class:"row"},s("div",{class:"col-12"},s("h2",{part:r},this.business.legal_name))),s("div",{class:"row"},s("div",{class:"col-6"},s("h5",{part:e},"Representative:"),s("div",null,s("div",null,null===(t=null===(i=this.business)||void 0===i?void 0:i.representative)||void 0===t?void 0:t.name),s("div",null,null===(l=null===(o=this.business)||void 0===o?void 0:o.representative)||void 0===l?void 0:l.title),s("div",null,null===(a=null===(d=this.business)||void 0===d?void 0:d.representative)||void 0===a?void 0:a.email),s("div",null,j(null===(h=null===(n=this.business)||void 0===n?void 0:n.representative)||void 0===h?void 0:h.phone)))),s("div",{class:"col-6"},s("h5",{part:e},this.shipping?"Shipping Address:":"Business Address:"),s("div",null,this.business.legal_address.line1,this.business.legal_address.line2?`, ${this.business.legal_address.line2}`:"",s("br",null),this.business.legal_address.city,", ",this.business.legal_address.state," ",this.business.legal_address.postal_code))))}renderTerminals(){if(!this.loading.terminals&&this.terminalModels)return s("div",{class:"d-flex flex-column gap-2 mt-5"},this.terminalModels.map((i=>s("terminal-quantity-selector",{modelName:i.model_name,description:i.description,imageUrl:i.image_url,helpUrl:i.help_url,limit:this.orderLimit-this.order.totalQuantity,onSelectedQuantityChange:this.onSelectedQuantityChange.bind(this)}))))}renderOrderSection(){return s("div",{class:"mt-3"},s("div",{class:"text-end"},"Order limit: ",this.orderLimit),s("div",{class:"d-flex justify-content-end mt-3"},s("button",{class:"btn btn-primary submit-btn",onClick:this.submitOrder.bind(this),disabled:0===this.order.totalQuantity||this.submitting,part:o},this.submitting?"Submitting...":this.submitButtonText)))}render(){return s(d,{key:"aa60b46b6f455a6e925a835f1b558c88966b2a90"},s("div",{key:"33361446b5b2848a0d7d4af36ff54a3be76a5779",part:l},this.renderLoading(),this.renderBusinessDetails(),this.renderTerminals(),this.renderOrderSection()))}};export{B as justifi_order_terminals}
@@ -1 +1 @@
1
- import{r as e,h as a,H as t}from"./p-DwYM91AU.js";import{aw as s,G as i,l,U as d,ae as c}from"./p-QmGrQis7.js";import{b as o,r,s as n,c as b}from"./p-CPpUGsw5.js";import{C as f,I as u,P as h}from"./p-CVaOFfrI.js";import{e as m,d as v}from"./p-B5rtFhtR.js";import{c as p}from"./p-DfKxeSrC.js";const y=class{constructor(a){e(this,a)}render(){return this.text?this.hideAlert?null:a("div",{class:"alert alert-danger d-flex align-items-center",role:"alert",part:s},a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",class:"bi bi-exclamation-triangle-fill flex-shrink-0 me-2",viewBox:"0 0 16 16",role:"img","aria-label":"Warning:"},a("path",{d:"M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"})),a("div",null,this.text)):null}},k=class{constructor(a){e(this,a),this.errors={},this.additional_questions={},this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e))),this.formController.values.subscribe((e=>this.additional_questions=Object.assign({},e.additional_questions)))}inputHandler(e,a){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{additional_questions:Object.assign(Object.assign({},this.formController.values.getValue().additional_questions),{[e]:a})}))}render(){var e,s,l,d,c,b,u,h,m,v,p,y,k,j;const x=this.formController.getInitialValues().additional_questions;return a(t,{key:"e3e354a7cf470f658e0f95d37186b1f45771b673"},a("fieldset",{key:"7fb001177a4f907d513eb5955063d446234ede0c"},a("legend",{key:"ee6b045a438be9f56345daad752e105640f1ca3d",part:i},"Additional Questions"),a("div",{key:"ed114675357f3b70c34a3eb941fdb30e6219cdc9",class:"row gy-3"},a("div",{key:"b85c27c827cf5e5d0d556c343315e5eec736f538",class:"col-12 col-md-6"},a("form-control-monetary-provisioning",{key:"4576f67fa74ba7c2ca9730468ddc52b055a3c496",name:"business_revenue",label:"What is the business' estimated annual revenue from its primary business activities?",inputHandler:this.inputHandler,errorText:null===(s=null===(e=this.errors)||void 0===e?void 0:e.additional_questions)||void 0===s?void 0:s.business_revenue,defaultValue:null==x?void 0:x.business_revenue,maskOptions:f.WHOLE})),a("div",{key:"0614c60cc7daaf890ccb4888d41b0260a26f9a0e",class:"col-12 col-md-6"},a("form-control-monetary-provisioning",{key:"2c435c1553714d75542e0e3bcf1d723f26b37da8",name:"business_payment_volume",label:"What is the business' annual credit card & ACH volume anticipated to process?",inputHandler:this.inputHandler,errorText:null===(d=null===(l=this.errors)||void 0===l?void 0:l.additional_questions)||void 0===d?void 0:d.business_payment_volume,defaultValue:null==x?void 0:x.business_payment_volume,maskOptions:f.WHOLE})),a("div",{key:"8d4a19eb0b6b5707f4a423543d86ae50f6492efc",class:"col-12"},a("form-control-select",{key:"2e49f907bae85cd4901e4aa4413284596fbed365",name:"business_when_service_received",label:"On average, how long after paying will your customers typically receive their goods or services?",inputHandler:this.inputHandler,errorText:null===(b=null===(c=this.errors)||void 0===c?void 0:c.additional_questions)||void 0===b?void 0:b.business_when_service_received,options:o,defaultValue:null==x?void 0:x.business_when_service_received})),a("div",{key:"11bc4e0bbe2122b977cf8bc29ac0601ef941881c",class:"col-12"},a("form-control-select",{key:"c511b728971250dc3272c1ef9ff96131a9ac6a2e",name:"business_recurring_payments",label:"Does your business offer recurring payments?",inputHandler:this.inputHandler,errorText:null===(h=null===(u=this.errors)||void 0===u?void 0:u.additional_questions)||void 0===h?void 0:h.business_recurring_payments,options:r,defaultValue:null==x?void 0:x.business_recurring_payments})),a("div",{key:"5a40dfe41a9fca815cdf0eb7455b41615d1e6c76",class:"col-12"},a("form-control-text",{key:"d8aaf0f6d7d44b1b15ec76af198a0117493f08c6",name:"business_recurring_payments_percentage",label:"What percent of revenue is generated from each recurring payment type offered?",inputHandler:this.inputHandler,errorText:null===(v=null===(m=this.errors)||void 0===m?void 0:m.additional_questions)||void 0===v?void 0:v.business_recurring_payments_percentage,defaultValue:null==x?void 0:x.business_recurring_payments_percentage})),a("div",{key:"b211bb865a60baf1ea00c81f76f000ff2a31d7bd",class:"col-12"},a("form-control-select",{key:"4b693e7425e690a59e2c70646cca2b886b8a8796",name:"business_seasonal",label:"Is this business seasonal?",inputHandler:this.inputHandler,errorText:null===(y=null===(p=this.errors)||void 0===p?void 0:p.additional_questions)||void 0===y?void 0:y.business_seasonal,options:n,defaultValue:null==x?void 0:x.business_seasonal})),a("div",{key:"e85b7fceb9cdc808afaf3559609b7519c9630266",class:"col-12"},a("form-control-text",{key:"ae4a6518c7499826f30376f1c902f694244059c7",name:"business_other_payment_details",label:"Is there anything else you would like us to know about how your customers pay the business?",inputHandler:this.inputHandler,errorText:null===(j=null===(k=this.errors)||void 0===k?void 0:k.additional_questions)||void 0===j?void 0:j.business_other_payment_details,defaultValue:null==x?void 0:x.business_other_payment_details})))))}},j=class{constructor(a){e(this,a),this.errors={},this.coreInfo={},this.isEditingTaxId=!1,this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.values.subscribe((e=>this.coreInfo=Object.assign({},new m(e)))),this.formController.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}inputHandler(e,a){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:a}))}render(){var e,s;const o=this.formController.getInitialValues();return a(t,{key:"0dba6443b063d02368f93f3a336a8051364b5fca"},a("fieldset",{key:"42eabe1f20623241291a8bc374c14b0727fae5cd"},a("legend",{key:"b74d116fa26b843eee56201c3997ecf916453a23",part:i},"General Info"),a("div",{key:"8370be848754f5730d1f5bffbfb51875cec01218",class:"row gy-3"},a("div",{key:"b891b5ce1820755b44a4d4d14240cd6f6f705114",class:"col-12"},a("form-control-text",{key:"712f62f8feb4c34eb90048f29158c03cf71b38db",name:"legal_name",label:"Legal Name",defaultValue:o.legal_name,errorText:this.errors.legal_name,inputHandler:this.inputHandler})),a("div",{key:"52cb8a48648bb036b04fba034dc27a4b286bf7ce",class:"col-12"},a("form-control-text",{key:"655edd4ae78b47fea221308ce9e582eb731454a7",name:"doing_business_as",label:"Doing Business As (DBA)",defaultValue:o.doing_business_as,errorText:this.errors.doing_business_as,inputHandler:this.inputHandler})),a("div",{key:"0cd13bcea3e7e1ef90e5d071ea40690f7a8ea022",class:"col-12 col-md-8"},a("form-control-select",{key:"00a2173bda66d059f9ef7534b3535a4f36dbbbc1",name:"classification",label:"Business Classification",options:b,defaultValue:o.classification,errorText:this.errors.classification,inputHandler:this.inputHandler})),a("div",{key:"4c157888deded84baa24ffdd5c5d74e90590c5f8",class:"col-12 col-md-4"},a("form-control-date",{key:"7af97d93cf2a9f7ff988621d53e528a8930932ed",name:"date_of_incorporation",label:"Date of Incorporation",defaultValue:o.date_of_incorporation,errorText:this.errors.date_of_incorporation,inputHandler:this.inputHandler})),a("div",{key:"b5d0493b01ad9a0853bea95b76220c939cd43828",class:"col-12 col-md-6"},a("form-control-text",{key:"5df583e04316c0afeaef771177dff20f6d266362",name:"industry",label:"Industry",defaultValue:o.industry,errorText:this.errors.industry,inputHandler:this.inputHandler})),a("div",{key:"0bd63d995778469190a97a21190e3da742a468fa",class:"col-12 col-md-6"},!(null===(e=this.coreInfo)||void 0===e?void 0:e.tax_id_last4)||this.isEditingTaxId?a("form-control-number-masked",{name:"tax_id",label:p[this.country].taxIdLabel,defaultValue:this.isEditingTaxId?"":o.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,mask:u[this.country],helpText:p[this.country].taxIdHelpText}):a("div",null,a("label",{class:"form-label",part:l},p[this.country].taxIdLabel),a("div",{class:"input-group mb-3"},a("input",{type:"text",class:"form-control",part:d,value:`****${null===(s=this.coreInfo)||void 0===s?void 0:s.tax_id_last4}`,disabled:!0}),a("button",{class:"btn btn-secondary",type:"button",part:c,onClick:()=>{this.isEditingTaxId=!0,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{tax_id:""}))}},"Change")))),a("div",{key:"3decd3a593098a1c36e4baf1aeb846603b4a6769",class:"col-12"},a("form-control-text",{key:"e3cb697846ad086ca6f4998d302574bb4de4c4a6",name:"website_url",label:"Website URL",defaultValue:o.website_url,errorText:this.errors.website_url,inputHandler:this.inputHandler})),a("div",{key:"69c357ad3d2b5464d0c333c8fdc82353044b7301",class:"col-12 col-md-6"},a("form-control-text",{key:"49857dc20c817d8c600dbeae9c8191452ec1898f",name:"email",label:"Email Address",defaultValue:o.email,errorText:this.errors.email,inputHandler:this.inputHandler})),a("div",{key:"1c9279a56b389fcd71ffeaad66df8a067a035334",class:"col-12 col-md-6"},a("form-control-number-masked",{key:"7c329ae3c7dcff34d88bce2a64d9ccaa09384055",name:"phone",label:"Phone Number",defaultValue:o.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:h.US})))))}},x=class{constructor(a){e(this,a),this.errors={},this.representative={},this.isEditingIdentification=!1,this.inputHandler=(e,a)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{[e]:a})}))},this.onAddressFormUpdate=e=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{address:Object.assign(Object.assign({},this.formController.values.getValue().representative.address),e)})}))},this.onDateOfBirthUpdate=e=>{const a=v(e.detail);this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{dob_day:a.dob_day,dob_month:a.dob_month,dob_year:a.dob_year})}))}}get identificationNumberLabel(){var e;return(null===(e=this.representative)||void 0===e?void 0:e.ssn_last4)?p[this.country].idNumberLabelOptional:p[this.country].idNumberLabel}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e.representative))),this.formController.values.subscribe((e=>this.representative=Object.assign({},e.representative)))}render(){var e,s;const o=this.formController.getInitialValues().representative;return a(t,{key:"2d8a5324bfea8bd297b5db5f1e5aaf5d9aa51cb4"},a("fieldset",{key:"c25884a7aaa0ffb19316002e8ce9e158a1f0b8e9"},a("legend",{key:"af36d94625e4b82c8418079b60cade953ac53e8e",part:i},"Representative"),a("div",{key:"c3ad5ca5e1c636db05fa3994c443975ecc363e62",class:"row gy-3"},a("div",{key:"8b27315feb79cf08d69c5a108426705cb6445c71",class:"col-12 col-md-8"},a("form-control-text",{key:"f6ffb2619c6537f99bed5a35602d3d7d68f821ad",name:"name",label:"Full Name",defaultValue:null==o?void 0:o.name,errorText:this.errors.name,inputHandler:this.inputHandler})),a("div",{key:"cde914c872fcfbe0395f358b570d9cefbf14872e",class:"col-12 col-md-4"},a("form-control-text",{key:"c70330625ed26d8d5e8d00af7df55571ef4ff32a",name:"title",label:"Title",defaultValue:null==o?void 0:o.title,errorText:this.errors.title,inputHandler:this.inputHandler})),a("div",{key:"64bba44c0facd07c8648fba1ce31385b33f94513",class:"col-12 col-md-6"},a("form-control-text",{key:"33c7c4a365f6d7ce43e6b98b9ca3646f2263abd1",name:"email",label:"Email Address",defaultValue:null==o?void 0:o.email,errorText:this.errors.email,inputHandler:this.inputHandler})),a("div",{key:"5b96d76754918f37fc4f226a5c6656529b77b63f",class:"col-12 col-md-6"},a("form-control-number-masked",{key:"c7cf814cf84a0c69e547c0b60f643b7fb78490af",name:"phone",label:"Phone Number",defaultValue:null==o?void 0:o.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:h.US})),a("div",{key:"e5c486242e9fb47c81a28831a9a648bee28e95d5",class:"col-12 col-md-4"},a("form-control-date",{key:"519cc94edb63b5f465d0ada9fe905e68aca54e1e",name:"dob_full",label:"Birth Date",defaultValue:null==o?void 0:o.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:this.onDateOfBirthUpdate})),a("div",{key:"b971e1320a57061d9d1eae7adb28eda19ce855a4",class:"col-12 col-md-8"},!(null===(e=this.representative)||void 0===e?void 0:e.ssn_last4)||this.isEditingIdentification?a("form-control-number-masked",{name:"identification_number",label:this.identificationNumberLabel,defaultValue:this.isEditingIdentification?"":null==o?void 0:o.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:u[this.country],helpText:p[this.country].identityHelpText}):a("div",null,a("label",{class:"form-label",part:l},this.identificationNumberLabel),a("div",{class:"input-group mb-3"},a("input",{type:"text",class:"form-control",part:d,value:`****${null===(s=this.representative)||void 0===s?void 0:s.ssn_last4}`,disabled:!0}),a("button",{class:"btn btn-secondary",type:"button",part:c,onClick:()=>{this.isEditingIdentification=!0,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{ssn_last4:null,identification_number:""})}))}},"Change")))),a("div",{key:"92b0c2109f98ac67a32ad57ca91c4f663d3de307",class:"col-12"},a("justifi-identity-address-form",{key:"187ac4670413b762f4f78dcde5a33ae2a73f203f",errors:this.errors.address,defaultValues:null==o?void 0:o.address,handleFormUpdate:this.onAddressFormUpdate,country:this.country})))))}},_=class{constructor(a){e(this,a),this.errors={},this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e))),this.formController.values.subscribe((e=>this.legal_address=Object.assign({},e.legal_address)))}inputHandler(e,a){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{legal_address:Object.assign(Object.assign({},this.formController.values.getValue().legal_address),{[e]:a})}))}render(){var e;const s=this.formController.getInitialValues().legal_address;return a(t,{key:"020c1a41ff7fa0881464463322b54754e7664957"},a("fieldset",{key:"cb1ae50abc99f8915cead7ef850de52f62bab304"},a("legend",{key:"74d2bba4a9557ff2ac5b9b34d0947e9a076ddb84",part:i},"Business Legal Address"),a("justifi-form-address-fields",{key:"86d9fc1d344ace729cdc75b1a9239b74865f306b",country:this.country,errors:null===(e=this.errors)||void 0===e?void 0:e.legal_address,defaultValues:s,inputHandler:this.inputHandler})))}};export{y as form_alert,k as justifi_additional_questions,j as justifi_business_core_info,x as justifi_business_representative,_ as justifi_legal_address_form}
1
+ import{r as e,h as a,H as t}from"./p-DwYM91AU.js";import{az as s,J as i,l,X as d,ah as c}from"./p-sA8HBfkI.js";import{b as o,r,s as n,c as b}from"./p-CPpUGsw5.js";import{C as f,I as u,P as h}from"./p-CVaOFfrI.js";import{e as m,d as v}from"./p-B5rtFhtR.js";import{c as p}from"./p-DfKxeSrC.js";const y=class{constructor(a){e(this,a)}render(){return this.text?this.hideAlert?null:a("div",{class:"alert alert-danger d-flex align-items-center",role:"alert",part:s},a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",class:"bi bi-exclamation-triangle-fill flex-shrink-0 me-2",viewBox:"0 0 16 16",role:"img","aria-label":"Warning:"},a("path",{d:"M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"})),a("div",null,this.text)):null}},k=class{constructor(a){e(this,a),this.errors={},this.additional_questions={},this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e))),this.formController.values.subscribe((e=>this.additional_questions=Object.assign({},e.additional_questions)))}inputHandler(e,a){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{additional_questions:Object.assign(Object.assign({},this.formController.values.getValue().additional_questions),{[e]:a})}))}render(){var e,s,l,d,c,b,u,h,m,v,p,y,k,j;const x=this.formController.getInitialValues().additional_questions;return a(t,{key:"e3e354a7cf470f658e0f95d37186b1f45771b673"},a("fieldset",{key:"7fb001177a4f907d513eb5955063d446234ede0c"},a("legend",{key:"ee6b045a438be9f56345daad752e105640f1ca3d",part:i},"Additional Questions"),a("div",{key:"ed114675357f3b70c34a3eb941fdb30e6219cdc9",class:"row gy-3"},a("div",{key:"b85c27c827cf5e5d0d556c343315e5eec736f538",class:"col-12 col-md-6"},a("form-control-monetary-provisioning",{key:"4576f67fa74ba7c2ca9730468ddc52b055a3c496",name:"business_revenue",label:"What is the business' estimated annual revenue from its primary business activities?",inputHandler:this.inputHandler,errorText:null===(s=null===(e=this.errors)||void 0===e?void 0:e.additional_questions)||void 0===s?void 0:s.business_revenue,defaultValue:null==x?void 0:x.business_revenue,maskOptions:f.WHOLE})),a("div",{key:"0614c60cc7daaf890ccb4888d41b0260a26f9a0e",class:"col-12 col-md-6"},a("form-control-monetary-provisioning",{key:"2c435c1553714d75542e0e3bcf1d723f26b37da8",name:"business_payment_volume",label:"What is the business' annual credit card & ACH volume anticipated to process?",inputHandler:this.inputHandler,errorText:null===(d=null===(l=this.errors)||void 0===l?void 0:l.additional_questions)||void 0===d?void 0:d.business_payment_volume,defaultValue:null==x?void 0:x.business_payment_volume,maskOptions:f.WHOLE})),a("div",{key:"8d4a19eb0b6b5707f4a423543d86ae50f6492efc",class:"col-12"},a("form-control-select",{key:"2e49f907bae85cd4901e4aa4413284596fbed365",name:"business_when_service_received",label:"On average, how long after paying will your customers typically receive their goods or services?",inputHandler:this.inputHandler,errorText:null===(b=null===(c=this.errors)||void 0===c?void 0:c.additional_questions)||void 0===b?void 0:b.business_when_service_received,options:o,defaultValue:null==x?void 0:x.business_when_service_received})),a("div",{key:"11bc4e0bbe2122b977cf8bc29ac0601ef941881c",class:"col-12"},a("form-control-select",{key:"c511b728971250dc3272c1ef9ff96131a9ac6a2e",name:"business_recurring_payments",label:"Does your business offer recurring payments?",inputHandler:this.inputHandler,errorText:null===(h=null===(u=this.errors)||void 0===u?void 0:u.additional_questions)||void 0===h?void 0:h.business_recurring_payments,options:r,defaultValue:null==x?void 0:x.business_recurring_payments})),a("div",{key:"5a40dfe41a9fca815cdf0eb7455b41615d1e6c76",class:"col-12"},a("form-control-text",{key:"d8aaf0f6d7d44b1b15ec76af198a0117493f08c6",name:"business_recurring_payments_percentage",label:"What percent of revenue is generated from each recurring payment type offered?",inputHandler:this.inputHandler,errorText:null===(v=null===(m=this.errors)||void 0===m?void 0:m.additional_questions)||void 0===v?void 0:v.business_recurring_payments_percentage,defaultValue:null==x?void 0:x.business_recurring_payments_percentage})),a("div",{key:"b211bb865a60baf1ea00c81f76f000ff2a31d7bd",class:"col-12"},a("form-control-select",{key:"4b693e7425e690a59e2c70646cca2b886b8a8796",name:"business_seasonal",label:"Is this business seasonal?",inputHandler:this.inputHandler,errorText:null===(y=null===(p=this.errors)||void 0===p?void 0:p.additional_questions)||void 0===y?void 0:y.business_seasonal,options:n,defaultValue:null==x?void 0:x.business_seasonal})),a("div",{key:"e85b7fceb9cdc808afaf3559609b7519c9630266",class:"col-12"},a("form-control-text",{key:"ae4a6518c7499826f30376f1c902f694244059c7",name:"business_other_payment_details",label:"Is there anything else you would like us to know about how your customers pay the business?",inputHandler:this.inputHandler,errorText:null===(j=null===(k=this.errors)||void 0===k?void 0:k.additional_questions)||void 0===j?void 0:j.business_other_payment_details,defaultValue:null==x?void 0:x.business_other_payment_details})))))}},j=class{constructor(a){e(this,a),this.errors={},this.coreInfo={},this.isEditingTaxId=!1,this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.values.subscribe((e=>this.coreInfo=Object.assign({},new m(e)))),this.formController.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}inputHandler(e,a){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:a}))}render(){var e,s;const o=this.formController.getInitialValues();return a(t,{key:"0dba6443b063d02368f93f3a336a8051364b5fca"},a("fieldset",{key:"42eabe1f20623241291a8bc374c14b0727fae5cd"},a("legend",{key:"b74d116fa26b843eee56201c3997ecf916453a23",part:i},"General Info"),a("div",{key:"8370be848754f5730d1f5bffbfb51875cec01218",class:"row gy-3"},a("div",{key:"b891b5ce1820755b44a4d4d14240cd6f6f705114",class:"col-12"},a("form-control-text",{key:"712f62f8feb4c34eb90048f29158c03cf71b38db",name:"legal_name",label:"Legal Name",defaultValue:o.legal_name,errorText:this.errors.legal_name,inputHandler:this.inputHandler})),a("div",{key:"52cb8a48648bb036b04fba034dc27a4b286bf7ce",class:"col-12"},a("form-control-text",{key:"655edd4ae78b47fea221308ce9e582eb731454a7",name:"doing_business_as",label:"Doing Business As (DBA)",defaultValue:o.doing_business_as,errorText:this.errors.doing_business_as,inputHandler:this.inputHandler})),a("div",{key:"0cd13bcea3e7e1ef90e5d071ea40690f7a8ea022",class:"col-12 col-md-8"},a("form-control-select",{key:"00a2173bda66d059f9ef7534b3535a4f36dbbbc1",name:"classification",label:"Business Classification",options:b,defaultValue:o.classification,errorText:this.errors.classification,inputHandler:this.inputHandler})),a("div",{key:"4c157888deded84baa24ffdd5c5d74e90590c5f8",class:"col-12 col-md-4"},a("form-control-date",{key:"7af97d93cf2a9f7ff988621d53e528a8930932ed",name:"date_of_incorporation",label:"Date of Incorporation",defaultValue:o.date_of_incorporation,errorText:this.errors.date_of_incorporation,inputHandler:this.inputHandler})),a("div",{key:"b5d0493b01ad9a0853bea95b76220c939cd43828",class:"col-12 col-md-6"},a("form-control-text",{key:"5df583e04316c0afeaef771177dff20f6d266362",name:"industry",label:"Industry",defaultValue:o.industry,errorText:this.errors.industry,inputHandler:this.inputHandler})),a("div",{key:"0bd63d995778469190a97a21190e3da742a468fa",class:"col-12 col-md-6"},!(null===(e=this.coreInfo)||void 0===e?void 0:e.tax_id_last4)||this.isEditingTaxId?a("form-control-number-masked",{name:"tax_id",label:p[this.country].taxIdLabel,defaultValue:this.isEditingTaxId?"":o.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,mask:u[this.country],helpText:p[this.country].taxIdHelpText}):a("div",null,a("label",{class:"form-label",part:l},p[this.country].taxIdLabel),a("div",{class:"input-group mb-3"},a("input",{type:"text",class:"form-control",part:d,value:`****${null===(s=this.coreInfo)||void 0===s?void 0:s.tax_id_last4}`,disabled:!0}),a("button",{class:"btn btn-secondary",type:"button",part:c,onClick:()=>{this.isEditingTaxId=!0,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{tax_id:""}))}},"Change")))),a("div",{key:"3decd3a593098a1c36e4baf1aeb846603b4a6769",class:"col-12"},a("form-control-text",{key:"e3cb697846ad086ca6f4998d302574bb4de4c4a6",name:"website_url",label:"Website URL",defaultValue:o.website_url,errorText:this.errors.website_url,inputHandler:this.inputHandler})),a("div",{key:"69c357ad3d2b5464d0c333c8fdc82353044b7301",class:"col-12 col-md-6"},a("form-control-text",{key:"49857dc20c817d8c600dbeae9c8191452ec1898f",name:"email",label:"Email Address",defaultValue:o.email,errorText:this.errors.email,inputHandler:this.inputHandler})),a("div",{key:"1c9279a56b389fcd71ffeaad66df8a067a035334",class:"col-12 col-md-6"},a("form-control-number-masked",{key:"7c329ae3c7dcff34d88bce2a64d9ccaa09384055",name:"phone",label:"Phone Number",defaultValue:o.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:h.US})))))}},x=class{constructor(a){e(this,a),this.errors={},this.representative={},this.isEditingIdentification=!1,this.inputHandler=(e,a)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{[e]:a})}))},this.onAddressFormUpdate=e=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{address:Object.assign(Object.assign({},this.formController.values.getValue().representative.address),e)})}))},this.onDateOfBirthUpdate=e=>{const a=v(e.detail);this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{dob_day:a.dob_day,dob_month:a.dob_month,dob_year:a.dob_year})}))}}get identificationNumberLabel(){var e;return(null===(e=this.representative)||void 0===e?void 0:e.ssn_last4)?p[this.country].idNumberLabelOptional:p[this.country].idNumberLabel}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e.representative))),this.formController.values.subscribe((e=>this.representative=Object.assign({},e.representative)))}render(){var e,s;const o=this.formController.getInitialValues().representative;return a(t,{key:"2d8a5324bfea8bd297b5db5f1e5aaf5d9aa51cb4"},a("fieldset",{key:"c25884a7aaa0ffb19316002e8ce9e158a1f0b8e9"},a("legend",{key:"af36d94625e4b82c8418079b60cade953ac53e8e",part:i},"Representative"),a("div",{key:"c3ad5ca5e1c636db05fa3994c443975ecc363e62",class:"row gy-3"},a("div",{key:"8b27315feb79cf08d69c5a108426705cb6445c71",class:"col-12 col-md-8"},a("form-control-text",{key:"f6ffb2619c6537f99bed5a35602d3d7d68f821ad",name:"name",label:"Full Name",defaultValue:null==o?void 0:o.name,errorText:this.errors.name,inputHandler:this.inputHandler})),a("div",{key:"cde914c872fcfbe0395f358b570d9cefbf14872e",class:"col-12 col-md-4"},a("form-control-text",{key:"c70330625ed26d8d5e8d00af7df55571ef4ff32a",name:"title",label:"Title",defaultValue:null==o?void 0:o.title,errorText:this.errors.title,inputHandler:this.inputHandler})),a("div",{key:"64bba44c0facd07c8648fba1ce31385b33f94513",class:"col-12 col-md-6"},a("form-control-text",{key:"33c7c4a365f6d7ce43e6b98b9ca3646f2263abd1",name:"email",label:"Email Address",defaultValue:null==o?void 0:o.email,errorText:this.errors.email,inputHandler:this.inputHandler})),a("div",{key:"5b96d76754918f37fc4f226a5c6656529b77b63f",class:"col-12 col-md-6"},a("form-control-number-masked",{key:"c7cf814cf84a0c69e547c0b60f643b7fb78490af",name:"phone",label:"Phone Number",defaultValue:null==o?void 0:o.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:h.US})),a("div",{key:"e5c486242e9fb47c81a28831a9a648bee28e95d5",class:"col-12 col-md-4"},a("form-control-date",{key:"519cc94edb63b5f465d0ada9fe905e68aca54e1e",name:"dob_full",label:"Birth Date",defaultValue:null==o?void 0:o.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:this.onDateOfBirthUpdate})),a("div",{key:"b971e1320a57061d9d1eae7adb28eda19ce855a4",class:"col-12 col-md-8"},!(null===(e=this.representative)||void 0===e?void 0:e.ssn_last4)||this.isEditingIdentification?a("form-control-number-masked",{name:"identification_number",label:this.identificationNumberLabel,defaultValue:this.isEditingIdentification?"":null==o?void 0:o.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:u[this.country],helpText:p[this.country].identityHelpText}):a("div",null,a("label",{class:"form-label",part:l},this.identificationNumberLabel),a("div",{class:"input-group mb-3"},a("input",{type:"text",class:"form-control",part:d,value:`****${null===(s=this.representative)||void 0===s?void 0:s.ssn_last4}`,disabled:!0}),a("button",{class:"btn btn-secondary",type:"button",part:c,onClick:()=>{this.isEditingIdentification=!0,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{ssn_last4:null,identification_number:""})}))}},"Change")))),a("div",{key:"92b0c2109f98ac67a32ad57ca91c4f663d3de307",class:"col-12"},a("justifi-identity-address-form",{key:"187ac4670413b762f4f78dcde5a33ae2a73f203f",errors:this.errors.address,defaultValues:null==o?void 0:o.address,handleFormUpdate:this.onAddressFormUpdate,country:this.country})))))}},_=class{constructor(a){e(this,a),this.errors={},this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e))),this.formController.values.subscribe((e=>this.legal_address=Object.assign({},e.legal_address)))}inputHandler(e,a){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{legal_address:Object.assign(Object.assign({},this.formController.values.getValue().legal_address),{[e]:a})}))}render(){var e;const s=this.formController.getInitialValues().legal_address;return a(t,{key:"020c1a41ff7fa0881464463322b54754e7664957"},a("fieldset",{key:"cb1ae50abc99f8915cead7ef850de52f62bab304"},a("legend",{key:"74d2bba4a9557ff2ac5b9b34d0947e9a076ddb84",part:i},"Business Legal Address"),a("justifi-form-address-fields",{key:"86d9fc1d344ace729cdc75b1a9239b74865f306b",country:this.country,errors:null===(e=this.errors)||void 0===e?void 0:e.legal_address,defaultValues:s,inputHandler:this.inputHandler})))}};export{y as form_alert,k as justifi_additional_questions,j as justifi_business_core_info,x as justifi_business_representative,_ as justifi_legal_address_form}
@@ -1 +1 @@
1
- import{h as s,F as i,r as t,c as e}from"./p-DwYM91AU.js";import{E as r}from"./p-CJ4viNrp.js";import{S as l}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{S as o}from"./p-CjxyejYl.js";import"./p-QmGrQis7.js";const n=()=>{const t=()=>s("div",{class:"mt-5"},s(o,{width:"40%",height:"1.5rem"}),s("hr",null),s("div",{class:"row g-3"},s("div",{class:"col-12 col-md-6"},s(o,null),s(o,null),s(o,null)),s("div",{class:"col-12 col-md-6"},s(o,null),s(o,null),s(o,null))));return s(i,null,s(t,null),s(t,null),s(t,null),s(t,null))};var a;!function(s){s.LOADING="loading",s.READY="ready",s.ERROR="error"}(a||(a={}));const d=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event"),this.renderState=a.LOADING}async componentWillLoad(){this.getBusiness&&this.fetchData()}fetchData(){this.renderState=a.LOADING,this.getBusiness({onSuccess:({business:s})=>{this.business=s,this.renderState=a.READY},onError:({error:s,code:i,severity:t})=>{this.errorMessage=s,this.renderState=a.ERROR,this.errorEvent.emit({errorCode:i,message:s,severity:t})}})}render(){return s(l,null,this.renderState===a.LOADING?s(n,null):this.renderState===a.ERROR?r(this.errorMessage):s("justifi-details",{"error-message":this.errorMessage},s("div",{slot:"detail-sections"},s("core-info-details",{business:this.business}),s("legal-address-details",{legalAddress:this.business.legal_address}),s("representative-details",{representative:this.business.representative}),s("owner-details",{owners:this.business.owners}),s("additional-questions-details",{additionalQuestions:this.business.additional_questions}))))}};export{d as business_details_core}
1
+ import{h as s,F as t,r as i,c as e}from"./p-DwYM91AU.js";import{E as r}from"./p-DUmUUj9r.js";import{S as l}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{S as o}from"./p-CsgUIrv8.js";import"./p-sA8HBfkI.js";const n=()=>{const i=()=>s("div",{class:"mt-5"},s(o,{width:"40%",height:"1.5rem"}),s("hr",null),s("div",{class:"row g-3"},s("div",{class:"col-12 col-md-6"},s(o,null),s(o,null),s(o,null)),s("div",{class:"col-12 col-md-6"},s(o,null),s(o,null),s(o,null))));return s(t,null,s(i,null),s(i,null),s(i,null),s(i,null))};var a;!function(s){s.LOADING="loading",s.READY="ready",s.ERROR="error"}(a||(a={}));const d=class{constructor(s){i(this,s),this.errorEvent=e(this,"error-event"),this.renderState=a.LOADING}async componentWillLoad(){this.getBusiness&&this.fetchData()}fetchData(){this.renderState=a.LOADING,this.getBusiness({onSuccess:({business:s})=>{this.business=s,this.renderState=a.READY},onError:({error:s,code:t,severity:i})=>{this.errorMessage=s,this.renderState=a.ERROR,this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}render(){return s(l,null,this.renderState===a.LOADING?s(n,null):this.renderState===a.ERROR?r(this.errorMessage):s("justifi-details",{"error-message":this.errorMessage},s("div",{slot:"detail-sections"},s("core-info-details",{business:this.business}),s("legal-address-details",{legalAddress:this.business.legal_address}),s("representative-details",{representative:this.business.representative}),s("owner-details",{owners:this.business.owners}),s("additional-questions-details",{additionalQuestions:this.business.additional_questions}))))}};export{d as business_details_core}
@@ -0,0 +1 @@
1
+ import{h as s,r as t,c as i}from"./p-DwYM91AU.js";import{A as e}from"./p-yyedWKWX.js";import{C as r,a as o}from"./p-Cjcsf8ku.js";import{c as a}from"./p-BrRsgB8S.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as n,a as c}from"./p-D2muobcE.js";import{c as h,J as l}from"./p-DISrhs4v.js";import{p as d,f as p,r as u,j as v}from"./p-B09GVew-.js";import{v as m,i as y,a as f,H as j}from"./p-BhqSAzpT.js";import{G as g,H as _}from"./p-sA8HBfkI.js";import{S as k}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{S as w}from"./p-CsgUIrv8.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-DkoufM1t.js";import"./p-CsRppqXL.js";import"./p-HXpYMWUU.js";const b=e();class C{async fetchQuote(s,t){return b.post({endpoint:"insurance/quotes",body:t,authToken:s})}async toggleCoverage(s,t,i){return b.post({endpoint:`insurance/quotes/${t}/toggle`,body:i,authToken:s})}}const T=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(w,{width:"35%",height:"30px"})),s("div",{class:"col-12"},s(w,{width:"70%"})),s("div",{class:"col-12"},s(w,{width:"40%"})),s("div",{class:"col-12"},s(w,{width:"40%"})),s("div",{class:"col-12"},s(w,{width:"100%"})),s("div",{class:"col-12"},s(w,{width:"80%"}))),H=class{constructor(s){t(this,s),this.insuranceUpdated=i(this,"insurance-updated"),this.errorEvent=i(this,"error-event"),this.isLoading=!0}async validate(){return m()}processHTMLContent(s){return d(s,[s=>u(s,"style"),s=>v(s,"a","part",g),s=>v(s,"p","part",g)])}componentWillLoad(){h(),this.analytics=new l(this),this.initializeServiceMethods(),this.getQuote&&this.fetchData()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeServiceMethods(){const s=this.authToken||a.authToken;if(!s)return void this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:"Missing authToken",severity:r.ERROR});const t={authToken:s,service:new C};this.getQuote=(({authToken:s,service:t})=>async({payload:i,onSuccess:e,onError:o})=>{var a;try{const h=await t.fetchQuote(s,i);if(h.error)return o({error:c(h.error),code:n(null===(a=h.error)||void 0===a?void 0:a.code),severity:r.ERROR});e({quote:h.data})}catch(s){const t=n(null==s?void 0:s.code);return o({error:s.message||s,code:t,severity:r.ERROR})}})(t),this.toggleCoverage=(({authToken:s,service:t})=>async({quoteId:i,payload:e,onSuccess:o,onError:a})=>{var h;try{const l=await t.toggleCoverage(s,i,e);if(l.error)return a({error:c(l.error),code:n(null===(h=l.error)||void 0===h?void 0:h.code),severity:r.ERROR});o({quote:l.data})}catch(s){const t=n(null==s?void 0:s.code);return a({error:s.message||s,code:t,severity:r.ERROR})}})(t)}fetchData(){this.isLoading=!0,this.getQuote({payload:{checkout_id:this.checkoutId||a.checkoutId,policy_type:"season_interruption",primary_identity:{state:this.primaryIdentityState,email:this.primaryIdentityEmailAddress,first_name:this.primaryIdentityFirstName,last_name:this.primaryIdentityLastName,postal_code:this.primaryIdentityPostalCode,country:this.primaryIdentityCountry},policy_attributes:{insurable_amount:this.policyAttributesInsurableAmount,start_date:this.policyAttributesStartDate,end_date:this.policyAttributesEndDate,covered_identity:{first_name:this.coveredIdentityFirstName,last_name:this.coveredIdentityLastName}}},onSuccess:({quote:s})=>{this.quote=s,this.quote.product.description=this.processHTMLContent(this.quote.product.description),this.quote.product.legal_disclaimer=this.processHTMLContent(this.quote.product.legal_disclaimer),y[s.policy_type]=s.accepted,this.isLoading=!1},onError:({error:s,code:t,severity:i})=>{this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}onChangeHandler(s,t){this.accepted=t,f[this.quote.policy_type]=!1,this.toggleCoverage({quoteId:this.quote.id,payload:{accepted:this.accepted},onSuccess:()=>{this.insuranceUpdated.emit(),y[this.quote.policy_type]=this.accepted},onError:({error:s,code:t,severity:i})=>{this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}get error(){var s;return f[null===(s=this.quote)||void 0===s?void 0:s.policy_type]}render(){var t,i,e,r;return a&&!1===a.insuranceEnabled?(console.warn("[justifi-season-interruption-insurance] Insurance is disabled for this checkout (payment_settings.insurance_payments=false)."),null):s(k,null,this.isLoading?s(T,null):s("div",null,s(j,{text:null===(t=this.quote)||void 0===t?void 0:t.product.title,class:"fs-5 fw-bold pb-3"}),s("small",{part:g,innerHTML:null===(i=this.quote)||void 0===i?void 0:i.product.description}),s("form-control-radio",{label:`Accept coverage for ${p(null===(e=this.quote)||void 0===e?void 0:e.total_cents)}`,name:"opt-in",value:"true",checked:"true"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("form-control-radio",{label:"Decline coverage",name:"opt-in",value:"false",checked:"false"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("div",{class:"invalid-feedback",style:{display:this.error?"block":"none"},part:_},"Please select an option"),s("small",{part:g,innerHTML:null===(r=this.quote)||void 0===r?void 0:r.product.legal_disclaimer})))}};export{H as justifi_season_interruption_insurance}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as i}from"./p-DwYM91AU.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as o,a as r}from"./p-Cjcsf8ku.js";import{C as e}from"./p-BrRsgB8S.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as a,a as p}from"./p-D2muobcE.js";import{c,J as n}from"./p-DISrhs4v.js";import{C as h}from"./p-VRubcA-q.js";import{m,S as u}from"./p-C9VmfRis.js";import{S as d}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{d as f}from"./p-CBbwdoSa.js";import"./p-BYsgavgS.js";import"./p-B09GVew-.js";import"./p-DkoufM1t.js";import"./p-CsRppqXL.js";import"./p-yyedWKWX.js";import"./p-U3nU15el.js";import"./p-sA8HBfkI.js";const j=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=f,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){c(),this.analytics=new n(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetCheckouts(),this.initializeGetSubAccounts()}initializeGetCheckouts(){this.accountId&&this.authToken?this.getCheckouts=(({accountId:t,authToken:s,service:i})=>async({params:r,onSuccess:c,onError:n})=>{var h,m;try{const u=await i.fetchCheckouts(t,s,r);if(u.error)return n({error:p(u.error),code:a(null===(m=u.error)||void 0===m?void 0:m.code),severity:o.ERROR});{const t=Object.assign({},u.page_info);c({checkouts:(null===(h=u.data)||void 0===h?void 0:h.map((t=>new e(t))))||[],pagingInfo:t})}}catch(t){const s=a(null==t?void 0:t.code);return n({error:t.message||t,code:s,severity:o.ERROR})}})({accountId:this.accountId,authToken:this.authToken,service:new h}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({accountId:this.accountId,authToken:this.authToken,service:new u}))}render(){return i(d,{key:"0e9e50e18983dad43cfab19f2271678d3f5e6abd"},i("checkouts-list-core",{key:"6f128cc756477ff64638625d9a9ff9a5b4533948",getCheckouts:this.getCheckouts,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{j as justifi_checkouts_list}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as i}from"./p-DwYM91AU.js";import{C as e,a as r}from"./p-Cjcsf8ku.js";import{c as o,J as p}from"./p-DISrhs4v.js";import{D as n}from"./p-BH0Xfn-F.js";import{g as a,a as h}from"./p-D2muobcE.js";import{D as c}from"./p-Dit3fZpU.js";import"./p-CsRppqXL.js";import"./p-yyedWKWX.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-B09GVew-.js";import"./p-HXpYMWUU.js";import"./p-BrRsgB8S.js";import"./p-DkoufM1t.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";const u=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){o(),this.analytics=new p(this),this.initializeGetDispute()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetDispute()}initializeGetDispute(){this.disputeId&&this.authToken?this.getDispute=(({id:t,authToken:s,service:i})=>async({onSuccess:r,onError:o})=>{var p;try{const c=await i.fetchDispute(t,s);if(c.error)return o({error:h(c.error),code:a(null===(p=c.error)||void 0===p?void 0:p.code),severity:e.ERROR});{const t=Object.assign({},c.page_info);r({dispute:new n(c.data),pagingInfo:t})}}catch(t){const s=a(null==t?void 0:t.code);return o({error:t.message||t,code:s,severity:e.ERROR})}})({id:this.disputeId,authToken:this.authToken,service:new c}):(this.errorMessage="Dispute ID and Auth Token are required",this.errorEvent.emit({message:this.errorMessage,errorCode:r.MISSING_PROPS,severity:e.ERROR}))}render(){return i("justifi-dispute-management-core",{key:"e19f33cd7106c3c44fb86faeef743c62ff9004b9",getDispute:this.getDispute,disputeId:this.disputeId,authToken:this.authToken,"onError-event":this.handleErrorEvent})}static get watchers(){return{disputeId:["propChanged"],authToken:["propChanged"]}}};export{u as justifi_dispute_management}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as e}from"./p-DwYM91AU.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as i,a}from"./p-Cjcsf8ku.js";import"./p-BrRsgB8S.js";import{p as r}from"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{T as o,a as h,b as c,c as n,d as p,e as b,f as d,g as u,h as m,i as f,j as g,k as y,l as j}from"./p-BMJe4lzg.js";import{T as l}from"./p-CZfYo5-1.js";import{p as k,a as C}from"./p-D6bKoyRc.js";import{o as S,g as v}from"./p-BOqOio4U.js";import"./p-BYsgavgS.js";import"./p-B09GVew-.js";import"./p-DkoufM1t.js";import"./p-sA8HBfkI.js";import"./p-CgiDds_u.js";import"./p-C2Senazf.js";import"./p-U3nU15el.js";const w=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event"),this.errorEvent=s(this,"error-event"),this.payouts=[],this.subAccounts=[],this.loading=!0,this.paging=r,this.pagingParams={},this.downloadCSV=t=>{this.getPayoutCSV({payoutId:t,onError:()=>{this.errorEvent.emit({errorCode:a.FETCH_ERROR,message:"Failed to download CSV",severity:i.ERROR})}})},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:l.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:l.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr"),e=s.dataset.rowEntityId;if(!e)return;if(s.querySelector("a")===t.target)return;const i=this.payouts.find((t=>t.id===e));this.clickEvent.emit({name:l.row,data:i})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.payoutsTable=new o(this.payouts,this.columns,k,C(this.downloadCSV)),this.getPayouts&&this.getSubAccounts&&this.fetchData(),S("set",(()=>{this.pagingParams={}})),S("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getPayouts({params:this.payoutParams,onSuccess:({payouts:t,pagingInfo:s})=>{this.payouts=t,this.paging=s,this.payoutsTable.collectionData=this.payouts,this.payoutsTable.columnKeys.includes("sub_account_name")?this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.payouts=this.payouts.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get payoutParams(){const t=v();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.payouts.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.payouts.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.payoutsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e(j,{key:"6a34e51911f4d507268a59e15a34f9c5d935989e"},e(h,{key:"3936b7e479f3d7a2f8fadbc7db2a36124141044c"},e(c,{key:"c537d591e4c03a7c5f5afa4bde930eb67093809e"},e(n,{key:"e3b2ea0a122d22893e657ebb13c198f6d1c7b47b"},this.payoutsTable.columnData.map((t=>t)))),e(p,{key:"3491e95b3c95e010635949ba07c5602eb7ae7d6c"},e(b,{key:"87bf5cfb79b9546f0b70c3f681671c8baccf1253",columnSpan:this.payoutsTable.columnKeys.length,isLoading:this.loading}),e(d,{key:"587ab70585ce504cb63d27652707fa1d28ec5ec1",isEmpty:this.showEmptyState,columnSpan:this.payoutsTable.columnKeys.length}),e(u,{key:"26cb66316044265b486390ae1d05a253f90911e1",columnSpan:this.payoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.payoutsTable.rowData.map(((t,s)=>e(m,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e(f,{key:"5120d2473b31550907e1bdc0b4fff3084c8d3aed"},e(g,{key:"81a989720c8eb9439a959c7100956f33487cbeee"},e(y,{key:"b3357b46b1f11e75b4c73c6de6d5c121b1c6710b",colSpan:this.payoutsTable.columnData.length},e("pagination-menu",{key:"73d8bedbb95826a43746b9ab08322c28e40a7f5d",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getPayouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"]}}};export{w as payouts_list_core}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as i,g as s,H as a}from"./p-DwYM91AU.js";import{S as r}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{c as n,J as d}from"./p-DISrhs4v.js";import{w as o,c}from"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{a as h,C as l}from"./p-Cjcsf8ku.js";import{c as u}from"./p-BrRsgB8S.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{P as f}from"./p-DkoufM1t.js";import{S as m}from"./p-CsgUIrv8.js";import{B as b}from"./p-Ty7R7tsw.js";import{v as p}from"./p-sA8HBfkI.js";import"./p-CsRppqXL.js";import"./p-yyedWKWX.js";import"./p-B09GVew-.js";import"./p-BYsgavgS.js";const y=class{constructor(i){t(this,i),this.radioClick=e(this,"radio-click"),this.checked=!1,this.hidden=!1,this.handleClick=()=>{this.radioClick.emit(this.value)}}render(){return i(r,{key:"1ae40f787970160e38b72f917bda96f480d2a890"},i("div",{key:"2130596c8294cc38365e6126806735da0f93ef4a",class:`radio-list-item p-3 ${this.class||""}`,part:p,onClick:this.handleClick,hidden:this.hidden},i("form-control-radio",{key:"7d5524f518430f2bfd1c9863f354318929353cfb",name:this.name,value:this.value,checked:this.checked,label:this.label,inputHandler:()=>null})))}},v={[f.NEW_BANK_ACCOUNT]:"New bank account",[f.NEW_CARD]:"New credit or debit card"},g="Payment form not ready",k="Validation error",w=class{constructor(i){t(this,i),this.errorEvent=e(this,"error-event"),this.submitEvent=e(this,"submit-event"),this.computedHideSubmitButton=!1,this.isLoading=!1,this.submitButtonText="Submit"}paymentMethodsChanged(){this.setDefaultSelectedPaymentMethod()}connectedCallback(){this.setDefaultSelectedPaymentMethod(),this.setComputedHideSubmitButton()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup(),this.unsubscribeFromStore&&this.unsubscribeFromStore()}componentWillLoad(){n(),this.analytics=new d(this)}handleRadioClick(t){this.selectedPaymentMethod=t.detail,u.selectedPaymentMethod={type:t.detail}}async fillBillingForm(t){var e;null===(e=this.billingFormRef)||void 0===e||e.fill(t)}async tokenizePaymentMethod(t){null==t||t.preventDefault(),this.validateRequiredProps(),this.isLoading=!0;try{if(!(await this.validate()).isValid)return this.errorEvent.emit({errorCode:h.TOKENIZE_ERROR,message:k}),void(this.isLoading=!1);const t=await this.resolvePaymentMethod({isValid:!0});return t.error&&this.emitError({errorCode:t.error.code,message:t.error.message}),this.submitEvent.emit({response:t}),t}catch(t){const e=this.createErrorResponse(h.TOKENIZE_ERROR,t.message);return this.emitError({errorCode:h.TOKENIZE_ERROR,message:t.message}),this.submitEvent.emit({response:e}),e}finally{this.isLoading=!1}}async validate(){if(!this.areFormsReady())return{isValid:!1,errors:{general:g}};const[t,e]=await Promise.all([this.billingFormRef.validate(),this.paymentMethodFormRef.validate()]);return{isValid:t.isValid&&e.isValid,errors:Object.assign(Object.assign({},t.errors),e.errors)}}async tokenize(){try{const t=await this.billingFormRef.getValues(),e={clientId:this.authToken||u.authToken,account:this.accountId||u.accountId,paymentMethodMetadata:this.buildPaymentMethodMetadata(t)};return await this.paymentMethodFormRef.tokenize(e)}catch(t){return t}}validateRequiredProps(){this.authToken||u.authToken||this.emitError({errorCode:h.TOKENIZE_ERROR,message:"Auth token is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"}),this.accountId||u.accountId||this.emitError({errorCode:h.TOKENIZE_ERROR,message:"Account ID is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"})}setDefaultSelectedPaymentMethod(){this.selectedPaymentMethod||(this.disableCreditCard?this.disableBankAccount||(this.selectedPaymentMethod=f.NEW_BANK_ACCOUNT,u.selectedPaymentMethod={type:f.NEW_BANK_ACCOUNT}):(this.selectedPaymentMethod=f.NEW_CARD,u.selectedPaymentMethod={type:f.NEW_CARD}))}setComputedHideSubmitButton(){if(void 0!==this.hideSubmitButton)return void(this.computedHideSubmitButton=this.hideSubmitButton);const t=this.isSlottedWithinModularCheckout();this.computedHideSubmitButton=t}isSlottedWithinModularCheckout(){var t;let e=null===(t=this.host)||void 0===t?void 0:t.parentElement;for(;e;){if("JUSTIFI-MODULAR-CHECKOUT"===e.tagName)return!0;e=e.parentElement}return!1}get availablePaymentMethods(){const t=[];return this.disableCreditCard||t.push(f.NEW_CARD),this.disableBankAccount||t.push(f.NEW_BANK_ACCOUNT),t}areFormsReady(){return!(!this.billingFormRef||!this.paymentMethodFormRef)}emitError(t){this.errorEvent.emit(Object.assign(Object.assign({},t),{severity:l.ERROR}))}createErrorResponse(t,e){return{error:{code:t,message:e,decline_code:void 0}}}async resolvePaymentMethod(t){if(!this.areFormsReady())return this.createErrorResponse("form_not_ready",g);try{const e=await this.validate();if(!e.isValid||!t.isValid){const t=Object.values(e.errors)[0]||k;return{validationError:!0,error:{code:"validation_error",message:String(t),decline_code:void 0}}}return await this.performTokenization()}catch(t){return{error:t}}}async performTokenization(){var t,e;const i=await this.tokenize();if(i.error)return{error:i.error};const s=i.data;return{token:(null===(t=s.card)||void 0===t?void 0:t.token)||(null===(e=s.bank_account)||void 0===e?void 0:e.token),data:s}}buildPaymentMethodMetadata(t){return this.shouldSavePaymentMethod?Object.assign(Object.assign({},t),{payment_method_group_id:this.paymentMethodGroupID}):Object.assign({},t)}get paymentMethodGroupID(){return this.paymentMethodGroupId||u.paymentMethodGroupId}get shouldSavePaymentMethod(){return!(!this.paymentMethodGroupId&&!u.savePaymentMethod)}get shouldHideRadioInput(){return this.disableCreditCard||this.disableBankAccount}renderPaymentMethodOption(t){const e=this.selectedPaymentMethod===t&&void 0===u.selectedPaymentMethod.id;return i("div",{class:"payment-method"},i("justifi-radio-list-item",{name:"paymentMethodType",value:t,checked:e,label:v[t],hidden:this.shouldHideRadioInput}),e&&this.renderSelectedPaymentMethodForm(t))}renderSelectedPaymentMethodForm(t){return i("div",{class:"mt-4 pb-4"},this.renderPaymentMethodForm(t),i("div",{class:"mt-4"},i("justifi-billing-form",{ref:t=>this.billingFormRef=t,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,paymentMethodType:t})),i("div",{class:"mt-4"},i("justifi-save-new-payment-method",{hidden:!this.paymentMethodGroupID,label:this.savePaymentMethodLabel})))}renderPaymentMethodForm(t){return i(t===f.NEW_CARD?"justifi-card-form":"justifi-bank-account-form",{ref:t=>this.paymentMethodFormRef=t})}render(){return i(r,{key:"8017b0fe2b0e3045a097e30aadf6a54ed2c32e62"},i("form",{key:"c7b0ac690a66cfb693d28e7d0eabc93817de4659"},i("fieldset",{key:"fb29e26a4100985595c420024d2a5ff48c79043b"},i("div",{key:"589f51297059afda2e385281dcfeafd67fbd2268",class:"row gy-3"},i("div",{key:"bf067015fb3ff24e08501899e370f92dda774c2e",class:"col-12"},this.availablePaymentMethods.map((t=>this.renderPaymentMethodOption(t)))),i("div",{key:"28872ca9239e2f85cb83ad8e6f27dc10f84da151",class:"col-12"},i("justifi-button",{key:"1be3f46e34b42e69d065384dd195d7fdc09a0560",text:this.submitButtonText,variant:"primary",type:"submit",clickHandler:t=>this.tokenizePaymentMethod(t),isLoading:this.isLoading,"data-testid":"submit-button",hidden:this.computedHideSubmitButton}))))))}get host(){return s(this)}static get watchers(){return{disableCreditCard:["paymentMethodsChanged"],disableBankAccount:["paymentMethodsChanged"]}}},j=t=>{const{isReady:e}=t;return e?null:i("div",{class:"container-fluid p-0"},i("div",{class:"row mb-3"},i("div",{class:"col-12 align-content-end"},i(m,{height:"18px",width:"120px"}),i(m,{height:"36px"}))),i("div",{class:"row"},i("div",{class:"col-12 align-content-end"},i(m,{height:"18px",width:"110px"}),i(m,{height:"36px"}))))},C=class{constructor(e){t(this,e),this.isReady=!1}async componentWillLoad(){await o(),this.iframeOrigin=c.iframeOrigin,n(),this.analytics=new d(this)}componentDidRender(){Promise.all([this.accountNumberIframeElement,this.routingNumberIframeElement].map((t=>new Promise((e=>{t.addEventListener("iframeLoaded",(()=>{e()}))}))))).then((()=>{this.isReady=!0}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}async validate(){const t=await this.accountNumberIframeElement.validate(),e=await this.routingNumberIframeElement.validate();return t&&e}async tokenize({clientId:t,paymentMethodMetadata:e,account:i}){return this.accountNumberIframeElement.tokenize(t,e,i)}render(){return i(r,{key:"0daa12da1ca699a05ca499425c4a37e4d913b2dd"},i(j,{key:"9d4ee0af94759d71d52130781401d322fcb5e397",isReady:this.isReady}),i("hidden-input",{key:"dc4ee0054cbc7acb214a1c410f8fd387677f92dc"}),i("div",{key:"b489311f205e0ffdaa4680621b706322bd3fc4ca",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"2d1b00b9705d1a94364f691d4ad705c339abbbce",class:"row mb-3"},i("iframe-input",{key:"21a66eb7d87b77c1ff1a1171a4cb84a4759853dd",inputId:"accountNumber",ref:t=>this.accountNumberIframeElement=t,label:"Account Number",iframeOrigin:`${this.iframeOrigin}/v2/accountNumber`})),i("div",{key:"1ff36d49f7304e203cdefea46010100ed750ed68",class:"row"},i("iframe-input",{key:"2211a638c875e504e7e25e0704788d7a437b5806",inputId:"routingNumber",ref:t=>this.routingNumberIframeElement=t,label:"Routing Number",iframeOrigin:`${this.iframeOrigin}/v2/routingNumber`}))))}},M=class{constructor(e){t(this,e)}get showSimpleCardBillingForm(){return this.paymentMethodType===f.NEW_CARD&&this.hideCardBillingForm}get showSimpleBankAccountBillingForm(){return this.paymentMethodType===f.NEW_BANK_ACCOUNT&&this.hideBankAccountBillingForm}async getValues(){var t;return null===(t=this.selectedFormRef)||void 0===t?void 0:t.getValues()}async fill(t){var e;null===(e=this.selectedFormRef)||void 0===e||e.fill(t)}async validate(){var t;return null===(t=this.selectedFormRef)||void 0===t?void 0:t.validate()}render(){return i(a,null,i(this.showSimpleBankAccountBillingForm?"justifi-bank-account-billing-form-simple":this.showSimpleCardBillingForm?"justifi-card-billing-form-simple":"justifi-billing-form-full",{legend:this.legend,ref:t=>this.selectedFormRef=t}))}},x=class{constructor(e){t(this,e),this.variant="primary",this.type="button"}render(){return i(r,{key:"7c8b76c4eaa412f2dc2ba59fd56cb7c28f46656c"},i(b,{key:"9440f90ebb380703b35b6c5d811e5d0780e80fd2",variant:this.variant,isLoading:this.isLoading,clickHandler:this.clickHandler,class:this.class,type:this.type,disabled:this.disabled,style:this.customStyle},this.text))}},_=t=>{const{isReady:e}=t;return e?null:i("div",{class:"container-fluid p-0"},i("div",{class:"mb-3"},i(m,{height:"18px",width:"100px"}),i(m,{height:"36px"})),i("div",{class:"row"},i("div",{class:"col-4 align-content-end"},i(m,{height:"18px",width:"80px"}),i(m,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(m,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(m,{height:"18px",width:"30px"}),i(m,{height:"36px"}))))},P=class{constructor(e){t(this,e),this.isReady=!1}async componentWillLoad(){await o(),this.iframeOrigin=c.iframeOrigin,n(),this.analytics=new d(this)}componentDidRender(){Promise.all([this.cardNumberIframeElement,this.expirationMonthIframeElement,this.expirationYearIframeElement,this.cvvIframeElement].map((t=>new Promise((e=>{t.addEventListener("iframeLoaded",(()=>{e()}))}))))).then((()=>{this.isReady=!0}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}async validate(){const t=await this.cardNumberIframeElement.validate(),e=await this.expirationMonthIframeElement.validate(),i=await this.expirationYearIframeElement.validate(),s=await this.cvvIframeElement.validate();return t&&e&&i&&s}async tokenize({clientId:t,paymentMethodMetadata:e,account:i}){return this.cardNumberIframeElement.tokenize(t,e,i)}render(){return i(r,{key:"b0b07a928be767102b59ec93ab0df6296b8418af"},i(_,{key:"03d37e42253a905ece1e6a9b1d654e84665470d6",isReady:this.isReady}),i("hidden-input",{key:"62f657a6c0a4d5b7a7bbf809abeb42eba0d22345"}),i("div",{key:"874cac5eac376c8c4e12d99f760cd3cd487a6521",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"dcada2d72eebe506fe4cab8ad6eb959c551e9e2d",class:"mb-3"},i("iframe-input",{key:"7e784726f8dd0c8b35832646bc99e0d2131c08f9",inputId:"cardNumber",ref:t=>this.cardNumberIframeElement=t,label:"Card Number",iframeOrigin:`${this.iframeOrigin}/v2/cardNumber`})),i("div",{key:"2384099f3aa18b7d6bbc346f47ba9ff06e5b7e86",class:"row"},i("div",{key:"5fb523cd3f398894e5c7ee3e8a58d34581492410",class:"col-4 align-content-end"},i("iframe-input",{key:"a3b4aa06a5c85162d24e25a5261a9a2cc64a6b82",inputId:"expirationMonth",ref:t=>this.expirationMonthIframeElement=t,label:"Expiration",iframeOrigin:`${this.iframeOrigin}/v2/expirationMonth`})),i("div",{key:"3ccd6a19fce1c393a8c58534113239c518d51a4f",class:"col-4 align-content-end"},i("iframe-input",{key:"6d064b868c73b4431b476194602843b0f28729e0",inputId:"expirationYear",ref:t=>this.expirationYearIframeElement=t,label:"",iframeOrigin:`${this.iframeOrigin}/v2/expirationYear`})),i("div",{key:"26cd762bec43890e96ab5c6903943b0f4cfa9672",class:"col-4 align-content-end"},i("iframe-input",{key:"826dfe08347461bc5a94296b181826b70a7d1f6f",inputId:"CVV",ref:t=>this.cvvIframeElement=t,label:"CVV",iframeOrigin:`${this.iframeOrigin}/v2/CVV`})))))}},B=class{constructor(i){t(this,i),this.checkboxChanged=e(this,"checkboxChanged"),this.label="Save New Payment Method",this.isChecked=!1,this.handleCheckboxChange=(t,e)=>{this.isChecked=e,u.savePaymentMethod=e,this.checkboxChanged.emit(this.isChecked)}}render(){return i(r,{key:"7cc086e518b2defcea924398cd5957b44a893d94"},i("form-control-checkbox",{key:"523dd82fe06f0c0a6d259a84f320c0a335261232",label:this.label||"Save New Payment Method",name:"saveNewPaymentMethod",checked:this.isChecked,inputHandler:this.handleCheckboxChange}))}};export{w as internal_tokenize_payment_method,C as justifi_bank_account_form,M as justifi_billing_form,x as justifi_button,P as justifi_card_form,y as justifi_radio_list_item,B as justifi_save_new_payment_method}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i}from"./p-DwYM91AU.js";import{D as e}from"./p-Bg2SZArf.js";import{D as r,a as h}from"./p-BH0Xfn-F.js";const o=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.isLoading=!0,this.showDisputeResponseForm=!1}disputeResponseHandler(t){t.detail.name===e.respondToDispute&&(this.showDisputeResponseForm=!0),t.detail.name===e.cancelDispute&&(this.showDisputeResponseForm=!1)}disputeSubmittedHandler(){this.fetchData()}componentWillLoad(){this.getDispute&&this.fetchData()}updateOnPropChange(){this.fetchData()}fetchData(){this.isLoading=!0,this.getDispute({onSuccess:({dispute:t})=>{this.dispute=new r(t),this.isLoading=!1,this.dispute.status!==h.needsResponse&&(this.showDisputeResponseForm=!1)},onError:({error:t,code:s,severity:i})=>{this.errorEvent.emit({errorCode:s,message:t,severity:i}),this.isLoading=!1}})}render(){return i("div",{key:"0775f22b07fe1456b64bc791aa1b6f12a1d692ba"},this.showDisputeResponseForm?i("justifi-dispute-response",{disputeId:this.disputeId,disputeResponse:this.dispute.dispute_response,authToken:this.authToken}):i("justifi-dispute-notification",{dispute:this.dispute,authToken:this.authToken,isLoading:this.isLoading}))}static get watchers(){return{getDispute:["updateOnPropChange"]}}};export{o as justifi_dispute_management_core}
1
+ import{r as t,c as s,h as e}from"./p-DwYM91AU.js";import{D as i}from"./p-Bg2SZArf.js";import{D as r,a as h}from"./p-BH0Xfn-F.js";const o=class{constructor(e){t(this,e),this.errorEvent=s(this,"error-event"),this.isLoading=!0,this.showDisputeResponseForm=!1}disputeResponseHandler(t){t.detail.name===i.respondToDispute&&(this.showDisputeResponseForm=!0),t.detail.name===i.cancelDispute&&(this.showDisputeResponseForm=!1)}disputeSubmittedHandler(){this.fetchData()}componentWillLoad(){this.getDispute&&this.fetchData()}updateOnPropChange(){this.fetchData()}fetchData(){this.isLoading=!0,this.getDispute({onSuccess:({dispute:t})=>{this.dispute=new r(t),this.isLoading=!1,this.dispute.status!==h.needsResponse&&(this.showDisputeResponseForm=!1)},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.isLoading=!1}})}render(){return e("div",{key:"6374c478bc8907019b48e1a53b0ecb2e171ab2e4"},this.showDisputeResponseForm?e("justifi-dispute-response",{disputeId:this.disputeId,disputeResponse:this.dispute.dispute_response,authToken:this.authToken}):e("justifi-dispute-notification",{dispute:this.dispute,authToken:this.authToken,isLoading:this.isLoading}))}static get watchers(){return{getDispute:["updateOnPropChange"]}}};export{o as justifi_dispute_management_core}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as a,H as e}from"./p-DwYM91AU.js";import{b as i,X as o,a as r,c as h,l as c,Y as n}from"./p-sA8HBfkI.js";import{F as f}from"./p-CK_XkZku.js";import{F as l}from"./p-CZ3F1ZAT.js";import"./p-CZfYo5-1.js";import{f as d}from"./p-B09GVew-.js";import"./p-HXpYMWUU.js";const p=class{constructor(a){t(this,a),this.formControlInput=s(this,"formControlInput"),this.formControlBlur=s(this,"formControlBlur"),this.isFocused=!1,this.defaultValue="0",this.formatRawValue=t=>t.replace(/\D/g,""),this.formatDisplayValue=t=>d(+t,void 0,!0),this.updateInput=t=>{const s=this.formControl.name,a=this.formatRawValue(t);this.formControl.value=this.formatDisplayValue(a),this.inputHandler(s,a),this.formControlInput.emit({name:s,value:a})}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get inputPart(){return this.errorText?i:this.disabled?o:this.isFocused?r:h}render(){return a(e,{key:"26420a8cfbf1b2e121a62971060603aa83cf3e70"},a("div",{key:"59c4042f4b6c7c0116af7b2cf3194924be87d8b5",class:"form-group d-flex flex-column"},a("label",{key:"37454ea79c867986b12aa1b0acb63041e10c47d9",part:c,class:"form-label",htmlFor:this.name},this.label),a(f,{key:"005a9bafecbcf6de1629f56562a6fb2588749ef5",name:this.name,helpText:this.helpText}),a("div",{key:"d1a12b4c4e444b788e8a96a23c1ca12c3b02f90e",class:"input-group"},a("span",{key:"e4100991c98e073d559a4378340288829bca8e63",class:"input-group-text",part:n},"$"),a("input",{key:"b14b182e5df0eb3cf7a5fd4abd7eda4969e9413c",ref:t=>this.formControl=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:t=>this.updateInput(t.target.value),onKeyDown:this.keyDownHandler,onPaste:this.keyDownHandler,maxLength:this.maxLength,part:this.inputPart,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled})),a(l,{key:"4fd052b178da46d734bdbd88f063dd1ed021d47e",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{p as form_control_monetary}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as a,H as i}from"./p-DwYM91AU.js";import{I as e}from"./p-Ce_F4E0f.js";import{C as r}from"./p-CVaOFfrI.js";import{a1 as h,l as o,Y as c,b as n,X as l,a as f}from"./p-sA8HBfkI.js";import{F as d}from"./p-CK_XkZku.js";import{F as p}from"./p-CZ3F1ZAT.js";import"./p-CZfYo5-1.js";const m=class{constructor(a){t(this,a),this.formControlInput=s(this,"formControlInput"),this.formControlBlur=s(this,"formControlBlur"),this.imask=null,this.isFocused=!1,this.maskOptions=r.DECIMAL,this.initializeIMask=()=>{this.textInput&&(this.imask=e(this.textInput,this.maskOptions),this.imask.on("accept",(()=>{const t=this.imask.unmaskedValue;this.inputHandler(this.name,t),this.formControlInput.emit({name:this.name,value:t})})),this.textInput.addEventListener("blur",(()=>this.formControlBlur.emit())))},this.handleFormControlInput=t=>{const s=t.target.getAttribute("name");this.formControlInput.emit({name:s,value:this.imask.unmaskedValue})},this.updateInput=t=>{this.imask&&(this.imask.value=String(t))}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.initializeIMask(),this.updateInput(this.defaultValue)}disconnectedCallback(){var t;null===(t=this.imask)||void 0===t||t.destroy()}get inputPart(){let t=h;return this.errorText&&(t=n),this.disabled&&(t=l),this.isFocused&&(t=f),t}render(){return a(i,{key:"5dc9ad5ec4f9af9bb4afec0d5265a35c52167721"},a("div",{key:"03efd5093d0176772bbcb070b8e580c1c027ed0e",class:"form-group d-flex flex-column"},a("label",{key:"153721fcb4f29fca302512ecc29b8bc30e5f6aa3",part:o,class:"form-label",htmlFor:this.name},this.label),a("div",{key:"16250c5429d1047febcdd056b55a38a09441fcbd",class:"input-group"},a("span",{key:"12d29ec8820f21bfa2ba7ae25217cb9bf3944cb8",class:"input-group-text",part:c},"$"),a("input",{key:"9eb4547dba64f8979b30e8d212b7e0576c3b4491",ref:t=>this.textInput=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.inputPart,class:this.errorText?"form-control monetary is-invalid":"form-control monetary",type:"text",disabled:this.disabled})),a(d,{key:"c6601c7cc606c915bf3c01535bd907d4990ea0ca",helpText:this.helpText,name:this.name}),a(p,{key:"89634f2156d5aae538e700f16554451120ec8a6d",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{m as form_control_monetary_provisioning}
@@ -0,0 +1 @@
1
+ import{r as s,c as t,h as r}from"./p-DwYM91AU.js";import{A as o}from"./p-yyedWKWX.js";import{C as i,a as e}from"./p-Cjcsf8ku.js";import"./p-BrRsgB8S.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as a,a as p}from"./p-D2muobcE.js";import{E as n}from"./p-DUmUUj9r.js";import{c as h,J as c}from"./p-DISrhs4v.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-B09GVew-.js";import"./p-HXpYMWUU.js";import"./p-DkoufM1t.js";import"./p-sA8HBfkI.js";import"./p-CsRppqXL.js";const m=o();class u{async fetchGrossVolumeChartData(s,t){return m.get({endpoint:`account/${s}/reports/gross_volume`,authToken:t})}}const d=class{constructor(r){s(this,r),this.errorEvent=t(this,"error-event"),this.errorMessage=null,this.handleErrorEvent=s=>{this.errorMessage=s.detail.message,this.errorEvent.emit(s.detail)}}componentWillLoad(){h(),this.analytics=new c(this),this.initializeGetGrossPayment()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}propChanged(){this.initializeGetGrossPayment()}initializeGetGrossPayment(){this.accountId&&this.authToken?this.getGrossPayment=(({id:s,authToken:t,service:r})=>async({onSuccess:o,onError:e})=>{var n;try{const h=await r.fetchGrossVolumeChartData(s,t);h.error?e({error:p(h.error),code:a(null===(n=h.error)||void 0===n?void 0:n.code),severity:i.ERROR}):o(h.data)}catch(s){const t=a(null==s?void 0:s.code);e({error:p(s),code:t,severity:i.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new u}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:e.MISSING_PROPS,message:this.errorMessage,severity:i.ERROR}))}render(){return this.errorMessage?n(this.errorMessage):r("gross-payment-chart-core",{getGrossPayment:this.getGrossPayment,"onError-event":this.handleErrorEvent})}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{d as justifi_gross_payment_chart}
@@ -0,0 +1 @@
1
+ import{r as e,h as a}from"./p-DwYM91AU.js";import{f as t,p as s,c as r}from"./p-BUsqF4-J.js";import{w as l,x as d,y as i,z as o,A as p}from"./p-sA8HBfkI.js";import{S as b}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import"./p-tGDdRx0W.js";import{c,a as f}from"./p-B09GVew-.js";import"./p-Cjcsf8ku.js";import{T as n,b as m}from"./p-BrRsgB8S.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import"./p-BYsgavgS.js";import"./p-HXpYMWUU.js";import"./p-DkoufM1t.js";const u=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{t[e]=a},this.handleDateInput=(e,a)=>{const t=c(a,{setExactTime:!0});this.setParamsOnChange(e,t)}}componentWillLoad(){Object.entries({order_status:this.orderStatus,order_type:this.orderType,created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([e,a])=>{a&&(s[e]=a)}))}get terminalOrderStatusOptions(){return[{label:"All",value:""},{label:"Created",value:n.created},{label:"Completed",value:n.completed},{label:"Submitted",value:n.submitted},{label:"In Progress",value:n.in_progress},{label:"On Hold",value:n.on_hold},{label:"Canceled",value:n.canceled}]}get terminalOrderTypeOptions(){return[{label:"All",value:""},{label:"Boarding Only",value:m.boardingOnly},{label:"Boarding Shipping",value:m.boardingShipping}]}render(){const e=Object.assign({},t);return a(b,{key:"70418a386030b340813ba6b4015cec977c7ed542"},a("table-filters-menu",{key:"7ba680b0cc5cccc8fd8de210e8e9bed4b99b8790",params:e,clearParams:r,part:l},a("div",{key:"2c4da0d02234051d3b48724d359f5c74c913bbf7",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"ad35b10dba39d2acf44eb078cf616d73815a258c",class:"p-2"},a("form-control-select",{key:"9674d6da3301cd66562effa5aa062b004db4715c",name:"order_status",label:"Order Status",options:this.terminalOrderStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.orderStatus||t.order_status||"",disabled:!!this.orderStatus,part:d})),a("div",{key:"f94a308a3af71a8982ce120f2a3a532431473dcb",class:"p-2"},a("form-control-select",{key:"295de18dd0af6229fff627cb3236dfdb1635b693",name:"order_type",label:"Order Type",options:this.terminalOrderTypeOptions,inputHandler:this.setParamsOnChange,defaultValue:this.orderType||t.order_type||"",disabled:!!this.orderType,part:i})),a("div",{key:"eb9b7a1fe7454722b38c9bb989b4f702bf7ae8af",class:"p-2"},a("form-control-date",{key:"9d616f29de5b6dfb32abba8249d21986ba7ba4e8",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:f(this.createdAfter,{showInputDateTime:!0})||f(t.created_after,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdAfter,part:o})),a("div",{key:"f1e6fbb2147d0ec7e446dcef704c2f347ed21efa",class:"p-2"},a("form-control-date",{key:"c49dc4cff66936c2a943771658f57200c825a168",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:f(this.createdBefore,{showInputDateTime:!0})||f(t.created_before,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdBefore,part:p})))))}};export{u as justifi_terminal_orders_list_filters}
@@ -0,0 +1 @@
1
+ import{r as e,c as t,h as s}from"./p-DwYM91AU.js";import{f as i}from"./p-B09GVew-.js";import{G as a,am as r}from"./p-sA8HBfkI.js";import{B as d}from"./p-Ty7R7tsw.js";import{S as o}from"./p-BP2sTIQV.js";import{S as c}from"./p-CsgUIrv8.js";import"./p-CZfYo5-1.js";import{C as n,a as h}from"./p-Cjcsf8ku.js";import{g as p,a as f}from"./p-D2muobcE.js";import{D as l}from"./p-Dit3fZpU.js";import{D as u}from"./p-Bg2SZArf.js";import{c as b,J as y}from"./p-DISrhs4v.js";import"./p-HXpYMWUU.js";import"./p-yyedWKWX.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-BrRsgB8S.js";import"./p-BH0Xfn-F.js";import"./p-DkoufM1t.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-CsRppqXL.js";const v=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var o;try{const d=await s.submitDisputeResponse(t,e,i);if(d.error){return r({error:f(d.error),code:p(null===(o=d.error)||void 0===o?void 0:o.code),severity:n.ERROR})}a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}},m=class{constructor(s){e(this,s),this.clickEvent=t(this,"click-event"),this.errorEvent=t(this,"error-event"),this.submitEvent=t(this,"submit-event")}acceptDispute(){v({disputeId:this.dispute.id,authToken:this.authToken,service:new l})({payload:{forfeit:!0},onSuccess:e=>{this.submitEvent.emit({response:e})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}})}initiateRespondToDispute(){this.clickEvent.emit({name:u.respondToDispute})}isDueDatePassed(){var e;if(!(null===(e=this.dispute)||void 0===e?void 0:e.due_date))return!1;const t=new Date(this.dispute.due_date.replace(/-/g,"/").replace(/T.+/,"")),s=new Date;return s.setHours(0,0,0,0),t.setHours(0,0,0,0),t<s}render(){var e,t,n,h,p,f,l,u,b;return s(o,{key:"366e2c66e1a31395f1b4a0c0e88173e06eb93313"},this.isLoading&&s("div",{key:"979832175e729da612028cff34fdf59dc280c677",style:{marginBottom:"8px"}},s(c,{key:"f7fc26c781f2a1f8aef343166eaaca261b72d32c",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(c,{key:"56e792538dd93b77964f7d21300ef45f8da4f7c1",height:"18px",styles:{marginBottom:"8px"}}),s(c,{key:"94ca86077eef5aebd5b6e402ac2fdd9a980ad4c5",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&this.isDueDatePassed()&&s("div",{key:"7482cc041236218c16ebf12c0799b2dc62266065",part:a},s("h1",{key:"a592932abcab4a1f3563cb044fbd37611c8dd20f",class:"h4",part:r},"The due date (",null===(t=this.dispute)||void 0===t?void 0:t.due_date,") for this dispute has passed"),s("p",{key:"65f41565018e74b20a224789f28a4b0c8c39eb76"},"You can no longer submit evidence to counter this dispute.")),(null===(n=this.dispute)||void 0===n?void 0:n.needsResponse)&&!this.isDueDatePassed()&&s("div",{key:"a135934182715a851d5d25d5d1485094454d0a4e",part:a},s("h1",{key:"61d6842599de3d87c833aa58b237490e4a686e4a",class:"h4",part:r},"This payment is disputed"),s("p",{key:"72c6f7e3639cbd19d25f1aa120d22b3ca56547e1"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"1565a02a4ff6c3e777f08c3c55f5adb52ead464b",class:"h5"},"Dispute details"),s("div",{key:"73e88ae55460c62a22609de5bc7144485741efd8",class:"d-table gap-2"},s("div",{key:"9ad5b6375dc161072b9a4a6ed02c845380fad0f9",class:"d-table-row gap-2"},s("span",{key:"50fc59fd8a3159990d97f4817c4ae4f0ff237a6f",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"2295ed0988667f0d9b4a5c7d1574549909e83512",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(h=this.dispute)||void 0===h?void 0:h.amount))),s("div",{key:"3019fb0949177ac697347e1e5156d980073b5fe6",class:"d-table-row gap-2"},s("span",{key:"6bb9bd0549246e1545244a1c1d6ba6a2763115e8",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"e21ffcb4db63cc336f8417a5f23a95ec9a22e07d",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(p=this.dispute)||void 0===p?void 0:p.reason)),s("div",{key:"8ea8d1734de9014d6eaa40698b7370f2579b1686",class:"d-table-row gap-2"},s("span",{key:"6f1c114ad77e46c67c661e8a7e0da9404a699afb",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Due Date"),s("span",{key:"f702aff5516a6fe4de66982214019aa23757e5dd",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(f=this.dispute)||void 0===f?void 0:f.due_date))),s("div",{key:"9b37b4ca1651c6f5654c284e154a8610491082eb",class:"d-flex gap-2 mt-4 justify-content-end"},s(d,{key:"7764276dee017b3802c8e5a099c7a14809a5a9e2",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(d,{key:"7d359a4379403683a1ace0a47eded0e6859e198a",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(l=this.dispute)||void 0===l?void 0:l.underReview)&&s("div",{key:"95357ab08560983952ef5dbbaecbd61a686d627e"},s("h1",{key:"dee2b2342d93f970ea42313a67bf7134c980c2c9",class:"h4"},"This payment is disputed and under review"),s("p",{key:"19c9ad659f69e844c06ca5a235f21265635e9d5b"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(u=this.dispute)||void 0===u?void 0:u.won)&&s("div",{key:"7149f82646d7e06bb5355cdb5fab79e1a1c6d67e"},s("h1",{key:"eb074d8a3bff90cbca27a836dc959ae115103896",class:"h4"},"This payment was disputed"),s("p",{key:"a7c8ca180bfa9c6421f05f9014d1e10f35b2fdf8"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(b=this.dispute)||void 0===b?void 0:b.lost)&&s("div",{key:"66a1b25a142f78e1d5b0e234232c32f7addbd203"},s("h1",{key:"7688608c03db8d4d2e1443b39e21ca39e48fdef2",class:"h4"},"This payment was disputed"),s("p",{key:"0ba1cc45f3b5cbf9c96456a05ba1e781efeb8e2e"},"The cardholder disputed this payment and the card issuer has settled it in their favor.")))}},k=class{constructor(s){e(this,s),this.errorEvent=t(this,"error-event"),this.errorMessage=null,this.apiOrigin="https://wc-proxy.justifi.ai",this.handleErrorEvent=e=>{this.errorMessage=e.detail.message,this.errorEvent.emit(e.detail)}}componentWillLoad(){b(),this.analytics=new y(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeDisputeServiceMethods()}initializeDisputeServiceMethods(){this.disputeId&&this.authToken?(this.updateDisputeResponse=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var o;try{const d=await s.updateDisputeResponse(t,e,i);if(d.error)return r({error:f(d.error),code:p(null===(o=d.error)||void 0===o?void 0:o.code),severity:n.ERROR});a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var o;try{const d=await s.createDisputeEvidence(t,e,i);if(d.error)return r({error:f(d.error),code:p(null===(o=d.error)||void 0===o?void 0:o.code),severity:n.ERROR});a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.submitDisputeResponse=v({disputeId:this.disputeId,authToken:this.authToken,service:new l})):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:h.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return s(o,{key:"c9a7035e6f28c32602fcb19b4026805d87aa54de"},s("justifi-dispute-response-core",{key:"9acfee140646d1ed8b46771b353b9d0d71af2c14","onError-event":this.handleErrorEvent,"dispute-id":this.disputeId,disputeResponse:this.disputeResponse,createDisputeEvidence:this.createDisputeEvidence,updateDisputeResponse:this.updateDisputeResponse,submitDisputeResponse:this.submitDisputeResponse}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}},w=class{constructor(i){e(this,i),this.clickEvent=t(this,"click-event"),this.errorEvent=t(this,"error-event"),this.stepCompleteEvent=t(this,"complete-form-step-event"),this.submitEvent=t(this,"submit-event"),this.disputeResponse={},this.isLoading=!1,this.documentList=[],this.documentErrors={},this.currentStep=0,this.componentStepMapping=[()=>s("justifi-product-or-service",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-customer-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-cancellation-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-refund-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-duplicate-charge",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-electronic-evidence",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-shipping-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-additional-statement",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors})],this.saveData=async(e,t)=>{if(Object.keys(e).length)return this.isLastStep?this.submitDisputeResponse({payload:e,onSuccess:e=>{this.submitEvent.emit({response:e}),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}}):this.updateDisputeResponse({payload:e,onSuccess:e=>{this.disputeResponse=Object.assign({},e.data),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}});this.stepCompleteEvent.emit({response:null,formStep:t})},this.initializeMakePresignedURLs=async()=>{const e=this.documentList.map((e=>this.getPresignedFileUrl(e)));return await Promise.all(e)},this.initializeFileUploads=async()=>{const e=this.documentList.map((e=>this.uploadDocument(e)));return Promise.all(e)},this.getPresignedFileUrl=async e=>this.createDisputeEvidence({payload:{file_name:e.file_name,file_type:e.file_type,dispute_evidence_type:e.dispute_evidence_type},onSuccess:t=>{e.presignedUrl=t.data.presigned_url},onError:({error:t,code:s,severity:i})=>{const a={[e.dispute_evidence_type]:t};this.documentErrors=Object.assign(Object.assign({},this.documentErrors),a),this.errorEvent.emit({errorCode:s,message:t,severity:i})}}),this.uploadDocument=async e=>{const t=await e.getFileString();if(!e.presignedUrl)throw new Error("Presigned URL is not set");return await fetch(e.presignedUrl,{method:"PUT",body:t})},this.handleSubmit=async(e,t,s)=>{if(this.isLoading=!0,t.length){if(this.documentErrors={},this.documentList=t,await this.initializeMakePresignedURLs(),Object.keys(this.documentErrors).length)throw this.isLoading=!1,new Error("Could not presign all documents");await this.initializeFileUploads()}await this.saveData(e,s),this.isLoading=!1},this.onCancel=()=>{this.clickEvent.emit({name:u.cancelDispute})},this.onBack=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.previousStep}),await this.handleSubmit(e,t,s),this.currentStep--}))},this.onNext=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.nextStep}),await this.handleSubmit(e,t,s),this.currentStep++}))},this.onSubmit=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.submit});const i=Object.assign(Object.assign({},e),{forfeit:!1});await this.handleSubmit(i,t,s)}))}}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}get isLastStep(){return this.currentStep===this.componentStepMapping.length-1}get isFirstStep(){return 0===this.currentStep}render(){return s("div",{key:"123cd5e2c03ac23f591c7c0b70c768acdd9e4932",class:"row gy-3"},s("div",{key:"22d3cf94fddc2bdc52a122d49c35efb6b94d3670",class:"col-12"},s("h1",{key:"16e6361626153b51b2d958203419752b65c211e3",class:"h4",part:r},"Counter dispute")),s("div",{key:"fef2a0e7d8baa24652d487dc11406fc1678d0beb",class:"col-12"},this.currentStepComponent),s("div",{key:"5c5fbe7839898450d12a08dc857bfda3471f8478",class:"col-12"},s("div",{key:"ee1eec3a34d161706418a2be5cbbf149b3a2cadc",class:"d-flex gap-2 mt-4 justify-content-end"},this.isFirstStep?s(d,{variant:"secondary",onClick:()=>this.onCancel(),disabled:this.isLoading,isLoading:this.isLoading},"Cancel"):s(d,{variant:"secondary",onClick:()=>this.onBack(),disabled:this.isLoading,isLoading:this.isLoading},"Back"),this.isLastStep?s(d,{variant:"primary",onClick:()=>this.onSubmit(),disabled:this.isLoading,isLoading:this.isLoading},"Submit Counter Dispute"):s(d,{variant:"primary",onClick:()=>this.onNext(),disabled:this.isLoading,isLoading:this.isLoading},"Next"))))}};export{m as justifi_dispute_notification,k as justifi_dispute_response,w as justifi_dispute_response_core}