@justifi/webcomponents 6.5.0 → 6.5.1-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (545) hide show
  1. package/dist/cjs/{Refund-Blquw3jZ.js → GooglePay-HXBAmTgL.js} +415 -0
  2. package/dist/cjs/bank-account-document-form-inputs_6.cjs.entry.js +8 -7
  3. package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
  4. package/dist/cjs/{business.service-DrBmfEbR.js → business.service-DMzf08nC.js} +1 -1
  5. package/dist/cjs/card-form.cjs.entry.js +2 -2
  6. package/dist/cjs/{check-pkg-version-D06Nzj0h.js → check-pkg-version-Bw6Rz_E3.js} +2 -2
  7. package/dist/cjs/{checkout.service-BEU6CI0t.js → checkout.service-CHNHEsrp.js} +1 -1
  8. package/dist/cjs/checkouts-list-core.cjs.entry.js +3 -2
  9. package/dist/cjs/custom-popper.cjs.entry.js +2 -2
  10. package/dist/cjs/{dispute.service-c0CZxPpe.js → dispute.service-B63kcFkU.js} +1 -1
  11. package/dist/cjs/form-alert_5.cjs.entry.js +6 -6
  12. package/dist/cjs/form-control-checkbox.cjs.entry.js +2 -2
  13. package/dist/cjs/form-control-date.cjs.entry.js +2 -2
  14. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +3 -3
  15. package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +2 -2
  16. package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
  17. package/dist/cjs/form-control-number-masked_3.cjs.entry.js +4 -4
  18. package/dist/cjs/form-control-number.cjs.entry.js +2 -2
  19. package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
  20. package/dist/cjs/form-control-select_3.cjs.entry.js +4 -4
  21. package/dist/cjs/{get-payment-details-D8UQRtX1.js → get-payment-details-BN139jp0.js} +2 -2
  22. package/dist/cjs/{get-subaccounts-fKcKqvrx.js → get-subaccounts-IgHJX5J4.js} +2 -2
  23. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +1 -1
  24. package/dist/cjs/hidden-input_2.cjs.entry.js +5 -5
  25. package/dist/cjs/{index-C2ITzalN.js → index-CajjbB9t.js} +1 -0
  26. package/dist/cjs/index.cjs.js +1 -1
  27. package/dist/cjs/internal-tokenize-payment-method_7.cjs.entry.js +23 -24
  28. package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +6 -5
  29. package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +12 -11
  30. package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +8 -8
  31. package/dist/cjs/{justifi-apple-pay_7.cjs.entry.js → justifi-apple-pay_8.cjs.entry.js} +899 -253
  32. package/dist/cjs/justifi-bank-account-billing-form-simple_3.cjs.entry.js +2 -2
  33. package/dist/cjs/justifi-business-details.cjs.entry.js +5 -4
  34. package/dist/cjs/justifi-business-form.cjs.entry.js +5 -4
  35. package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +2 -2
  36. package/dist/cjs/justifi-checkout.cjs.entry.js +14 -15
  37. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +10 -9
  38. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +8 -7
  39. package/dist/cjs/justifi-details.cjs.entry.js +1 -1
  40. package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +1 -1
  41. package/dist/cjs/justifi-dispute-management.cjs.entry.js +6 -5
  42. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +9 -8
  43. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +4 -3
  44. package/dist/cjs/justifi-order-terminals.cjs.entry.js +10 -9
  45. package/dist/cjs/justifi-owner-form_3.cjs.entry.js +7 -6
  46. package/dist/cjs/justifi-payment-details.cjs.entry.js +6 -5
  47. package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +1 -1
  48. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +6 -5
  49. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +7 -6
  50. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
  51. package/dist/cjs/justifi-payments-list.cjs.entry.js +7 -6
  52. package/dist/cjs/justifi-payout-details.cjs.entry.js +6 -5
  53. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +7 -6
  54. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +2 -2
  55. package/dist/cjs/justifi-payouts-list.cjs.entry.js +8 -7
  56. package/dist/cjs/justifi-refund-payment.cjs.entry.js +10 -9
  57. package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +1 -1
  58. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +7 -8
  59. package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
  60. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +12 -11
  61. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +7 -6
  62. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +8 -7
  63. package/dist/cjs/justifi-terminals-list.cjs.entry.js +8 -7
  64. package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +1 -1
  65. package/dist/cjs/loader.cjs.js +1 -1
  66. package/dist/cjs/{package-gCv25hzn.js → package--UMqvxMQ.js} +1 -1
  67. package/dist/cjs/pagination-menu.cjs.entry.js +3 -3
  68. package/dist/cjs/payment-details-core.cjs.entry.js +11 -10
  69. package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
  70. package/dist/cjs/{payment.service-DXbR13Kq.js → payment.service-eOZc1Qay.js} +1 -1
  71. package/dist/cjs/payments-list-core.cjs.entry.js +3 -2
  72. package/dist/cjs/payout-details-core.cjs.entry.js +3 -3
  73. package/dist/cjs/{payout.service-D0U6kzXJ.js → payout.service-QVl5N-UV.js} +1 -1
  74. package/dist/cjs/payouts-list-core.cjs.entry.js +3 -2
  75. package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
  76. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +4 -3
  77. package/dist/cjs/{terminal-orders-table-BByfBAEK.js → terminal-orders-table-g2fwrh2P.js} +3 -3
  78. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
  79. package/dist/cjs/{terminal.service-BqXeiERV.js → terminal.service-BuSFyt0j.js} +1 -1
  80. package/dist/cjs/terminals-list-core.cjs.entry.js +3 -2
  81. package/dist/cjs/webcomponents.cjs.js +1 -1
  82. package/dist/collection/api/GooglePay.js +181 -0
  83. package/dist/collection/api/index.js +2 -0
  84. package/dist/collection/api/services/google-pay.service.js +240 -0
  85. package/dist/collection/collection-manifest.json +2 -1
  86. package/dist/collection/components/business-forms/business-form/additional-questions/additional-questions.js +7 -6
  87. package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +2 -2
  88. package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +8 -7
  89. package/dist/collection/components/business-forms/business-form/legal-address-form/legal-address-form.js +7 -6
  90. package/dist/collection/components/business-forms/owner-form/identity-address/identity-address-form.js +1 -1
  91. package/dist/collection/components/business-forms/owner-form/owner-form-core.js +1 -1
  92. package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +8 -7
  93. package/dist/collection/components/business-forms/owner-form/owner-form.js +1 -1
  94. package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.js +1 -1
  95. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-document-inputs.js +1 -1
  96. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs-canada.js +1 -1
  97. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs.js +1 -1
  98. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-read-only-value.js +1 -1
  99. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +1 -1
  100. package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +1 -1
  101. package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.js +1 -1
  102. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.js +2 -2
  103. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.js +1 -1
  104. package/dist/collection/components/business-forms/payment-provisioning/form-address-fields/form-address-fields.js +1 -1
  105. package/dist/collection/components/business-forms/payment-provisioning/form-control-monetary-provisioning.js +2 -2
  106. package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.js +1 -1
  107. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-core.js +1 -1
  108. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-buttons.js +1 -1
  109. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-steps.js +1 -1
  110. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning.js +1 -1
  111. package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +1 -1
  112. package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +2 -2
  113. package/dist/collection/components/checkout/card-form/card-form.js +2 -2
  114. package/dist/collection/components/checkout/checkout.js +2 -2
  115. package/dist/collection/components/checkout/save-new-payment-method.js +1 -1
  116. package/dist/collection/components/checkout/saved-payment-method.js +1 -1
  117. package/dist/collection/components/checkouts-list/checkouts-list-core.js +1 -1
  118. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +1 -1
  119. package/dist/collection/components/checkouts-list/checkouts-list.js +1 -1
  120. package/dist/collection/components/dispute-management/dispute-management-core.js +1 -1
  121. package/dist/collection/components/dispute-management/dispute-management.js +1 -1
  122. package/dist/collection/components/dispute-management/dispute-notification.js +2 -2
  123. package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +1 -1
  124. package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +1 -1
  125. package/dist/collection/components/dispute-management/dispute-response/customer-details.js +1 -1
  126. package/dist/collection/components/dispute-management/dispute-response/dispute-response-core.js +1 -1
  127. package/dist/collection/components/dispute-management/dispute-response/dispute-response.js +1 -1
  128. package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +1 -1
  129. package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +1 -1
  130. package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +1 -1
  131. package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +1 -1
  132. package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +1 -1
  133. package/dist/collection/components/filters/table-filters-menu.js +1 -1
  134. package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +1 -1
  135. package/dist/collection/components/modular-checkout/ModularCheckout.js +1 -0
  136. package/dist/collection/components/modular-checkout/modular-checkout.js +46 -9
  137. package/dist/collection/components/modular-checkout/sub-components/bank-account-billing-form-simple.js +1 -1
  138. package/dist/collection/components/modular-checkout/sub-components/bank-account.js +2 -2
  139. package/dist/collection/components/modular-checkout/sub-components/card-billing-form-simple.js +1 -1
  140. package/dist/collection/components/modular-checkout/sub-components/card-form.js +2 -2
  141. package/dist/collection/components/modular-checkout/sub-components/google-pay-skeleton.js +10 -0
  142. package/dist/collection/components/modular-checkout/sub-components/google-pay.js +609 -0
  143. package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
  144. package/dist/collection/components/modular-checkout/sub-components/summary.js +1 -1
  145. package/dist/collection/components/order-terminals/order-terminals.js +1 -1
  146. package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
  147. package/dist/collection/components/payment-details/payment-details-core.js +8 -8
  148. package/dist/collection/components/payment-transactions-list/payment-transactions-list.js +1 -1
  149. package/dist/collection/components/payments-list/payments-list-core.js +1 -1
  150. package/dist/collection/components/payments-list/payments-list-filters.js +2 -2
  151. package/dist/collection/components/payments-list/payments-list.js +1 -1
  152. package/dist/collection/components/payout-details/payout-details-core.js +3 -3
  153. package/dist/collection/components/payout-transactions-list/payout-transactions-list.js +1 -1
  154. package/dist/collection/components/payouts-list/payouts-list-core.js +1 -1
  155. package/dist/collection/components/payouts-list/payouts-list-filters.js +2 -2
  156. package/dist/collection/components/payouts-list/payouts-list.js +1 -1
  157. package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +1 -1
  158. package/dist/collection/components/terminal-orders-list/terminal-orders-list-filters.js +2 -2
  159. package/dist/collection/components/terminal-orders-list/terminal-orders-list.js +1 -1
  160. package/dist/collection/components/terminals-list/terminals-list-core.js +1 -1
  161. package/dist/collection/components/terminals-list/terminals-list-filters.js +1 -1
  162. package/dist/collection/components/terminals-list/terminals-list.js +1 -1
  163. package/dist/collection/components/tokenize-payment-method/internal-tokenize-payment-method.js +3 -4
  164. package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +5 -10
  165. package/dist/collection/store/checkout.store.js +4 -0
  166. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  167. package/dist/collection/ui-components/details/details.js +1 -1
  168. package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
  169. package/dist/collection/ui-components/form/form-control-date.js +2 -2
  170. package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
  171. package/dist/collection/ui-components/form/form-control-file.js +2 -2
  172. package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
  173. package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
  174. package/dist/collection/ui-components/form/form-control-number.js +2 -2
  175. package/dist/collection/ui-components/form/form-control-radio.js +2 -2
  176. package/dist/collection/ui-components/form/form-control-select.js +2 -2
  177. package/dist/collection/ui-components/form/form-control-text.js +2 -2
  178. package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
  179. package/dist/collection/ui-components/form/hidden-input.js +1 -1
  180. package/dist/collection/ui-components/form/iframe-input.js +3 -3
  181. package/dist/collection/ui-components/google-pay-button.js +251 -0
  182. package/dist/collection/ui-components/pagination-menu/pagination-menu.js +3 -3
  183. package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
  184. package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
  185. package/dist/collection/ui-components/shadow-dom-components/justifi-radio-list-item.js +1 -1
  186. package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
  187. package/dist/docs.json +567 -119
  188. package/dist/esm/{Refund-BugCdfRo.js → GooglePay-9bPcqGZ9.js} +405 -1
  189. package/dist/esm/bank-account-document-form-inputs_6.entry.js +8 -7
  190. package/dist/esm/bank-account-form.entry.js +2 -2
  191. package/dist/esm/{business.service-pWcc3kfX.js → business.service-2j91Emgq.js} +1 -1
  192. package/dist/esm/card-form.entry.js +2 -2
  193. package/dist/esm/{check-pkg-version-AQP98jzk.js → check-pkg-version-2BU_KPHv.js} +2 -2
  194. package/dist/esm/{checkout.service-B4xSV2-X.js → checkout.service-D-dEMyXF.js} +1 -1
  195. package/dist/esm/checkouts-list-core.entry.js +3 -2
  196. package/dist/esm/custom-popper.entry.js +2 -2
  197. package/dist/esm/{dispute.service-3Kbbh1J9.js → dispute.service-DPumDIuV.js} +1 -1
  198. package/dist/esm/form-alert_5.entry.js +6 -6
  199. package/dist/esm/form-control-checkbox.entry.js +2 -2
  200. package/dist/esm/form-control-date.entry.js +2 -2
  201. package/dist/esm/form-control-file-v2_2.entry.js +3 -3
  202. package/dist/esm/form-control-monetary-provisioning.entry.js +2 -2
  203. package/dist/esm/form-control-monetary.entry.js +2 -2
  204. package/dist/esm/form-control-number-masked_3.entry.js +4 -4
  205. package/dist/esm/form-control-number.entry.js +2 -2
  206. package/dist/esm/form-control-radio.entry.js +2 -2
  207. package/dist/esm/form-control-select_3.entry.js +4 -4
  208. package/dist/esm/{get-payment-details-CakzKvOr.js → get-payment-details-CD_K6FQ3.js} +1 -1
  209. package/dist/esm/{get-subaccounts-Cw1Adtmo.js → get-subaccounts-D1eF6c0B.js} +1 -1
  210. package/dist/esm/gross-payment-chart-core.entry.js +1 -1
  211. package/dist/esm/hidden-input_2.entry.js +5 -5
  212. package/dist/esm/{index-DCIW8z1f.js → index-DkoufM1t.js} +1 -0
  213. package/dist/esm/index.js +1 -1
  214. package/dist/esm/internal-tokenize-payment-method_7.entry.js +12 -13
  215. package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +2 -1
  216. package/dist/esm/justifi-additional-questions-form-step_9.entry.js +12 -11
  217. package/dist/esm/justifi-additional-statement_8.entry.js +8 -8
  218. package/dist/esm/{justifi-apple-pay_7.entry.js → justifi-apple-pay_8.entry.js} +782 -137
  219. package/dist/esm/justifi-bank-account-billing-form-simple_3.entry.js +2 -2
  220. package/dist/esm/justifi-business-details.entry.js +5 -4
  221. package/dist/esm/justifi-business-form.entry.js +5 -4
  222. package/dist/esm/justifi-business-representative-form-inputs.entry.js +2 -2
  223. package/dist/esm/justifi-checkout.entry.js +7 -8
  224. package/dist/esm/justifi-checkouts-list-filters.entry.js +3 -2
  225. package/dist/esm/justifi-checkouts-list.entry.js +7 -6
  226. package/dist/esm/justifi-details.entry.js +1 -1
  227. package/dist/esm/justifi-dispute-management-core.entry.js +1 -1
  228. package/dist/esm/justifi-dispute-management.entry.js +6 -5
  229. package/dist/esm/justifi-dispute-notification_3.entry.js +9 -8
  230. package/dist/esm/justifi-gross-payment-chart.entry.js +4 -3
  231. package/dist/esm/justifi-order-terminals.entry.js +7 -6
  232. package/dist/esm/justifi-owner-form_3.entry.js +7 -6
  233. package/dist/esm/justifi-payment-details.entry.js +6 -5
  234. package/dist/esm/justifi-payment-provisioning-core.entry.js +1 -1
  235. package/dist/esm/justifi-payment-provisioning.entry.js +6 -5
  236. package/dist/esm/justifi-payment-transactions-list.entry.js +6 -5
  237. package/dist/esm/justifi-payments-list-filters.entry.js +2 -2
  238. package/dist/esm/justifi-payments-list.entry.js +6 -5
  239. package/dist/esm/justifi-payout-details.entry.js +5 -4
  240. package/dist/esm/justifi-payout-transactions-list.entry.js +6 -5
  241. package/dist/esm/justifi-payouts-list-filters.entry.js +2 -2
  242. package/dist/esm/justifi-payouts-list.entry.js +7 -6
  243. package/dist/esm/justifi-refund-payment.entry.js +6 -5
  244. package/dist/esm/justifi-saved-payment-method.entry.js +1 -1
  245. package/dist/esm/justifi-season-interruption-insurance.entry.js +4 -5
  246. package/dist/esm/justifi-skeleton.entry.js +1 -1
  247. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +4 -3
  248. package/dist/esm/justifi-terminal-orders-list.entry.js +6 -5
  249. package/dist/esm/justifi-terminals-list-filters.entry.js +3 -2
  250. package/dist/esm/justifi-terminals-list.entry.js +7 -6
  251. package/dist/esm/justifi-tokenize-payment-method.entry.js +1 -1
  252. package/dist/esm/loader.js +1 -1
  253. package/dist/esm/{package-DQf0KCJj.js → package-Bx3wyDU2.js} +1 -1
  254. package/dist/esm/pagination-menu.entry.js +3 -3
  255. package/dist/esm/payment-details-core.entry.js +10 -9
  256. package/dist/esm/payment-method-option.entry.js +1 -1
  257. package/dist/esm/{payment.service-nExZY_sU.js → payment.service-BreQSu6J.js} +1 -1
  258. package/dist/esm/payments-list-core.entry.js +3 -2
  259. package/dist/esm/payout-details-core.entry.js +3 -3
  260. package/dist/esm/{payout.service-B9-JQqU6.js → payout.service-DuqRe6oq.js} +1 -1
  261. package/dist/esm/payouts-list-core.entry.js +3 -2
  262. package/dist/esm/table-filters-menu.entry.js +1 -1
  263. package/dist/esm/terminal-orders-list-core.entry.js +4 -3
  264. package/dist/esm/{terminal-orders-table-DsrpmD9F.js → terminal-orders-table-DSo5x2D7.js} +1 -1
  265. package/dist/esm/terminal-quantity-selector.entry.js +1 -1
  266. package/dist/esm/{terminal.service-DvFiKAKV.js → terminal.service-CkzrYIA_.js} +1 -1
  267. package/dist/esm/terminals-list-core.entry.js +3 -2
  268. package/dist/esm/webcomponents.js +1 -1
  269. package/dist/module/Analytics.js +2 -0
  270. package/dist/module/ApplePay.js +121 -0
  271. package/dist/module/GooglePay.js +184 -0
  272. package/dist/module/ModularCheckout.js +1 -0
  273. package/dist/module/additional-questions.js +2 -2
  274. package/dist/module/additional-statement.js +1 -1
  275. package/dist/module/apple-pay.js +1 -120
  276. package/dist/module/bank-account-billing-form-simple.js +1 -1
  277. package/dist/module/bank-account-document-inputs.js +3 -1
  278. package/dist/module/bank-account-form-inputs-canada2.js +1 -1
  279. package/dist/module/bank-account-form-inputs2.js +1 -1
  280. package/dist/module/bank-account-form.js +2 -2
  281. package/dist/module/bank-account-read-only-value2.js +1 -1
  282. package/dist/module/bank-account.js +2 -2
  283. package/dist/module/business-additional-questions-form-step.js +1 -1
  284. package/dist/module/business-bank-account-form-step-core.js +2 -0
  285. package/dist/module/business-bank-account-form-step.js +3 -1
  286. package/dist/module/business-core-info-form-step.js +1 -1
  287. package/dist/module/business-core-info.js +2 -2
  288. package/dist/module/business-owners-form-step.js +1 -1
  289. package/dist/module/business-representative-form-inputs.js +2 -2
  290. package/dist/module/business-representative-form-step.js +1 -1
  291. package/dist/module/business-representative.js +3 -3
  292. package/dist/module/business-terms-conditions-form-step.js +3 -1
  293. package/dist/module/business.service.js +2 -0
  294. package/dist/module/cancellation-policy.js +1 -1
  295. package/dist/module/card-billing-form-simple.js +1 -1
  296. package/dist/module/card-form.js +2 -2
  297. package/dist/module/card-form2.js +2 -2
  298. package/dist/module/checkout.service.js +2 -0
  299. package/dist/module/checkout.store.js +4 -0
  300. package/dist/module/checkouts-list-core2.js +3 -1
  301. package/dist/module/custom-popper2.js +2 -2
  302. package/dist/module/customer-details.js +1 -1
  303. package/dist/module/details.js +1 -1
  304. package/dist/module/dispute-management-core.js +1 -1
  305. package/dist/module/dispute-notification.js +2 -2
  306. package/dist/module/dispute-response-actions.js +2 -0
  307. package/dist/module/dispute-response-core.js +1 -1
  308. package/dist/module/dispute-response.js +1 -1
  309. package/dist/module/duplicate-charge.js +1 -1
  310. package/dist/module/electronic-evidence.js +1 -1
  311. package/dist/module/form-address-fields.js +1 -1
  312. package/dist/module/form-control-checkbox2.js +2 -2
  313. package/dist/module/form-control-date2.js +2 -2
  314. package/dist/module/form-control-file-v22.js +1 -1
  315. package/dist/module/form-control-file2.js +2 -2
  316. package/dist/module/form-control-monetary-provisioning2.js +2 -2
  317. package/dist/module/form-control-monetary2.js +2 -2
  318. package/dist/module/form-control-number-masked2.js +2 -2
  319. package/dist/module/form-control-number.js +2 -2
  320. package/dist/module/form-control-radio2.js +2 -2
  321. package/dist/module/form-control-select2.js +2 -2
  322. package/dist/module/form-control-text2.js +2 -2
  323. package/dist/module/form-control-textarea2.js +2 -2
  324. package/dist/module/get-payment-details.js +2 -0
  325. package/dist/module/get-subaccounts.js +2 -0
  326. package/dist/module/google-pay.js +781 -0
  327. package/dist/module/gross-payment-chart-core2.js +1 -1
  328. package/dist/module/hidden-input2.js +1 -1
  329. package/dist/module/identity-address-form.js +1 -1
  330. package/dist/module/iframe-input2.js +3 -3
  331. package/dist/module/internal-tokenize-payment-method2.js +3 -1
  332. package/dist/module/justifi-business-form.js +2 -0
  333. package/dist/module/justifi-button2.js +1 -1
  334. package/dist/module/justifi-checkout.js +46 -40
  335. package/dist/module/justifi-checkouts-list-filters.js +3 -1
  336. package/dist/module/justifi-checkouts-list.js +3 -1
  337. package/dist/module/justifi-dispute-management.js +1 -1
  338. package/dist/module/justifi-google-pay.d.ts +11 -0
  339. package/dist/module/justifi-google-pay.js +6 -0
  340. package/dist/module/justifi-gross-payment-chart.js +2 -0
  341. package/dist/module/justifi-header2.js +1 -1
  342. package/dist/module/justifi-order-terminals.js +3 -1
  343. package/dist/module/justifi-payment-provisioning.js +3 -1
  344. package/dist/module/justifi-payment-transactions-list.js +3 -1
  345. package/dist/module/justifi-payments-list-filters.js +2 -2
  346. package/dist/module/justifi-payments-list.js +3 -1
  347. package/dist/module/justifi-payout-details.js +2 -0
  348. package/dist/module/justifi-payout-transactions-list.js +3 -1
  349. package/dist/module/justifi-payouts-list-filters.js +2 -2
  350. package/dist/module/justifi-payouts-list.js +3 -1
  351. package/dist/module/justifi-radio-list-item2.js +1 -1
  352. package/dist/module/justifi-refund-payment.js +2 -0
  353. package/dist/module/justifi-saved-payment-method.js +1 -1
  354. package/dist/module/justifi-season-interruption-insurance.js +2 -0
  355. package/dist/module/justifi-skeleton.js +1 -1
  356. package/dist/module/justifi-terminal-orders-list-filters.js +4 -2
  357. package/dist/module/justifi-terminal-orders-list.js +3 -1
  358. package/dist/module/justifi-terminals-list-filters.js +3 -1
  359. package/dist/module/justifi-terminals-list.js +3 -1
  360. package/dist/module/justifi-tokenize-payment-method.js +1 -1
  361. package/dist/module/legal-address-form-step.js +1 -1
  362. package/dist/module/legal-address-form.js +2 -2
  363. package/dist/module/modular-checkout.js +46 -6
  364. package/dist/module/owner-form-core2.js +1 -1
  365. package/dist/module/owner-form-inputs2.js +3 -3
  366. package/dist/module/owner-form.js +1 -1
  367. package/dist/module/package.js +1 -1
  368. package/dist/module/pagination-menu2.js +3 -3
  369. package/dist/module/payment-details-core2.js +10 -8
  370. package/dist/module/payment-method-option.js +1 -1
  371. package/dist/module/payment-provisioning-core.js +1 -1
  372. package/dist/module/payment-provisioning-form-buttons.js +1 -1
  373. package/dist/module/payment-provisioning-form-steps.js +1 -1
  374. package/dist/module/payment.service.js +2 -0
  375. package/dist/module/payments-list-core2.js +3 -1
  376. package/dist/module/payout-details-core2.js +3 -3
  377. package/dist/module/payout.service.js +2 -0
  378. package/dist/module/payouts-list-core2.js +3 -1
  379. package/dist/module/plaid.service.js +2 -0
  380. package/dist/module/product-or-service.js +1 -1
  381. package/dist/module/refund-policy.js +1 -1
  382. package/dist/module/save-new-payment-method.js +1 -1
  383. package/dist/module/shipping-details.js +1 -1
  384. package/dist/module/summary.js +1 -1
  385. package/dist/module/table-filters-menu2.js +1 -1
  386. package/dist/module/terminal-orders-list-core2.js +3 -1
  387. package/dist/module/terminal-quantity-selector2.js +1 -1
  388. package/dist/module/terminal.service.js +2 -0
  389. package/dist/module/terminals-list-core2.js +3 -1
  390. package/dist/types/api/Checkout.d.ts +2 -0
  391. package/dist/types/api/GooglePay.d.ts +271 -0
  392. package/dist/types/api/index.d.ts +2 -0
  393. package/dist/types/api/services/google-pay.service.d.ts +60 -0
  394. package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +3 -3
  395. package/dist/types/components/checkout/checkout.d.ts +1 -0
  396. package/dist/types/components/modular-checkout/ModularCheckout.d.ts +2 -1
  397. package/dist/types/components/modular-checkout/modular-checkout.d.ts +5 -0
  398. package/dist/types/components/modular-checkout/sub-components/google-pay-skeleton.d.ts +6 -0
  399. package/dist/types/components/modular-checkout/sub-components/google-pay.d.ts +59 -0
  400. package/dist/types/components/tokenize-payment-method/tokenize-payment-method.d.ts +1 -1
  401. package/dist/types/components.d.ts +160 -22
  402. package/dist/types/store/checkout.store.d.ts +1 -0
  403. package/dist/types/ui-components/google-pay-button.d.ts +18 -0
  404. package/dist/webcomponents/index.esm.js +1 -1
  405. package/dist/webcomponents/p-03930216.entry.js +1 -0
  406. package/dist/webcomponents/{p-aec9185f.entry.js → p-03c8c754.entry.js} +1 -1
  407. package/dist/webcomponents/p-0412f491.entry.js +1 -0
  408. package/dist/webcomponents/p-04154136.entry.js +1 -0
  409. package/dist/webcomponents/p-06ce1202.entry.js +1 -0
  410. package/dist/webcomponents/p-0772719b.entry.js +1 -0
  411. package/dist/webcomponents/p-0cd1c683.entry.js +1 -0
  412. package/dist/webcomponents/p-136b29e3.entry.js +1 -0
  413. package/dist/webcomponents/p-13bdb5ed.entry.js +1 -0
  414. package/dist/webcomponents/p-16812327.entry.js +1 -0
  415. package/dist/webcomponents/{p-1193a1ac.entry.js → p-19dabeab.entry.js} +1 -1
  416. package/dist/webcomponents/p-1d04bd7a.entry.js +1 -0
  417. package/dist/webcomponents/p-1f196690.entry.js +1 -0
  418. package/dist/webcomponents/{p-800660f2.entry.js → p-270bf699.entry.js} +1 -1
  419. package/dist/webcomponents/p-2da4e6ca.entry.js +1 -0
  420. package/dist/webcomponents/p-2eb123a3.entry.js +1 -0
  421. package/dist/webcomponents/p-38e1ef4b.entry.js +1 -0
  422. package/dist/webcomponents/p-3ae12b98.entry.js +1 -0
  423. package/dist/webcomponents/{p-58ae4f9e.entry.js → p-3bacf834.entry.js} +1 -1
  424. package/dist/webcomponents/p-3c006a15.entry.js +1 -0
  425. package/dist/webcomponents/p-404b3f02.entry.js +1 -0
  426. package/dist/webcomponents/p-42658888.entry.js +1 -0
  427. package/dist/webcomponents/p-43390a7f.entry.js +1 -0
  428. package/dist/webcomponents/p-47f6d271.entry.js +1 -0
  429. package/dist/webcomponents/{p-e2e6c201.entry.js → p-48d1bc83.entry.js} +1 -1
  430. package/dist/webcomponents/{p-af48a6bb.entry.js → p-4e71de94.entry.js} +1 -1
  431. package/dist/webcomponents/p-4f102cfd.entry.js +1 -0
  432. package/dist/webcomponents/p-5cba8448.entry.js +1 -0
  433. package/dist/webcomponents/p-7b610d9e.entry.js +1 -0
  434. package/dist/webcomponents/p-7bf6ded7.entry.js +1 -0
  435. package/dist/webcomponents/p-7dbd0618.entry.js +1 -0
  436. package/dist/webcomponents/{p-1edec396.entry.js → p-86111a0a.entry.js} +1 -1
  437. package/dist/webcomponents/p-88f58abe.entry.js +1 -0
  438. package/dist/webcomponents/p-8b6b7e20.entry.js +1 -0
  439. package/dist/webcomponents/p-8f4adcfd.entry.js +1 -0
  440. package/dist/webcomponents/p-8fcd277c.entry.js +1 -0
  441. package/dist/webcomponents/p-9065d67e.entry.js +1 -0
  442. package/dist/webcomponents/p-914b590d.entry.js +1 -0
  443. package/dist/webcomponents/p-9370cf0d.entry.js +1 -0
  444. package/dist/webcomponents/p-9a795f44.entry.js +1 -0
  445. package/dist/webcomponents/{p-CPtsjcdm.js → p-BKM7YeAB.js} +1 -1
  446. package/dist/webcomponents/p-BN1PYSFf.js +1 -0
  447. package/dist/webcomponents/p-BRbk6oSh.js +1 -0
  448. package/dist/webcomponents/{p-CFevTCAJ.js → p-BVwVhXcQ.js} +1 -1
  449. package/dist/webcomponents/p-Bx3wyDU2.js +1 -0
  450. package/dist/webcomponents/p-BxtmTjqW.js +1 -0
  451. package/dist/webcomponents/{p-LeyS3YJV.js → p-C01zp4xw.js} +1 -1
  452. package/dist/webcomponents/p-CQrwlULd.js +1 -0
  453. package/dist/webcomponents/{p-B4ZUYyNh.js → p-CVhnuewz.js} +1 -1
  454. package/dist/webcomponents/{p-D_IJC4HG.js → p-Cmb6PRFh.js} +1 -1
  455. package/dist/webcomponents/p-DkoufM1t.js +1 -0
  456. package/dist/webcomponents/{p-BCPutgAi.js → p-Dy5btfGV.js} +1 -1
  457. package/dist/webcomponents/p-a020c889.entry.js +1 -0
  458. package/dist/webcomponents/p-a0c9f0bd.entry.js +1 -0
  459. package/dist/webcomponents/{p-0082f428.entry.js → p-a22d1078.entry.js} +1 -1
  460. package/dist/webcomponents/p-a6e816f6.entry.js +1 -0
  461. package/dist/webcomponents/p-a87187c3.entry.js +1 -0
  462. package/dist/webcomponents/p-a9f75a9e.entry.js +1 -0
  463. package/dist/webcomponents/{p-8681f258.entry.js → p-aaed4997.entry.js} +1 -1
  464. package/dist/webcomponents/p-ad9307c1.entry.js +1 -0
  465. package/dist/webcomponents/p-b3f8d5d4.entry.js +1 -0
  466. package/dist/webcomponents/{p-f6ea74db.entry.js → p-b8426810.entry.js} +1 -1
  467. package/dist/webcomponents/p-ba0762f9.entry.js +1 -0
  468. package/dist/webcomponents/p-c41191e7.entry.js +1 -0
  469. package/dist/webcomponents/p-c621e7af.entry.js +1 -0
  470. package/dist/webcomponents/p-c63b0271.entry.js +1 -0
  471. package/dist/webcomponents/p-c88babbe.entry.js +1 -0
  472. package/dist/webcomponents/p-d2935214.entry.js +1 -0
  473. package/dist/webcomponents/p-d88d228f.entry.js +1 -0
  474. package/dist/webcomponents/{p-2769f945.entry.js → p-e6507b93.entry.js} +1 -1
  475. package/dist/webcomponents/{p-ed55d333.entry.js → p-e7e5fee9.entry.js} +1 -1
  476. package/dist/webcomponents/p-e9d13cca.entry.js +1 -0
  477. package/dist/webcomponents/p-ee122560.entry.js +1 -0
  478. package/dist/webcomponents/{p-4e23116c.entry.js → p-f2650bfc.entry.js} +1 -1
  479. package/dist/webcomponents/p-f4cb581f.entry.js +1 -0
  480. package/dist/webcomponents/p-f528da70.entry.js +1 -0
  481. package/dist/webcomponents/{p-9f70ce93.entry.js → p-fe862786.entry.js} +1 -1
  482. package/dist/webcomponents/{p-C8QOezo8.js → p-t8p0WAW4.js} +1 -1
  483. package/dist/webcomponents/webcomponents.esm.js +1 -1
  484. package/package.json +13 -13
  485. package/LICENSE +0 -21
  486. package/dist/cjs/checkout.store-BA6h-dp2.js +0 -107
  487. package/dist/esm/checkout.store-CaS_htQd.js +0 -101
  488. package/dist/webcomponents/p-159d8ae7.entry.js +0 -1
  489. package/dist/webcomponents/p-20a8b0c0.entry.js +0 -1
  490. package/dist/webcomponents/p-22f74666.entry.js +0 -1
  491. package/dist/webcomponents/p-25b382b8.entry.js +0 -1
  492. package/dist/webcomponents/p-30f61f44.entry.js +0 -1
  493. package/dist/webcomponents/p-3437ce38.entry.js +0 -1
  494. package/dist/webcomponents/p-34aa9298.entry.js +0 -1
  495. package/dist/webcomponents/p-36720116.entry.js +0 -1
  496. package/dist/webcomponents/p-39706e38.entry.js +0 -1
  497. package/dist/webcomponents/p-3c38cec5.entry.js +0 -1
  498. package/dist/webcomponents/p-42d756b8.entry.js +0 -1
  499. package/dist/webcomponents/p-44a94dac.entry.js +0 -1
  500. package/dist/webcomponents/p-45936490.entry.js +0 -1
  501. package/dist/webcomponents/p-4761e0aa.entry.js +0 -1
  502. package/dist/webcomponents/p-4baabba0.entry.js +0 -1
  503. package/dist/webcomponents/p-4dcbc0af.entry.js +0 -1
  504. package/dist/webcomponents/p-54ff9b59.entry.js +0 -1
  505. package/dist/webcomponents/p-5c8c88c6.entry.js +0 -1
  506. package/dist/webcomponents/p-66688508.entry.js +0 -1
  507. package/dist/webcomponents/p-7218c312.entry.js +0 -1
  508. package/dist/webcomponents/p-77b76007.entry.js +0 -1
  509. package/dist/webcomponents/p-77bd4fb0.entry.js +0 -1
  510. package/dist/webcomponents/p-79d77eb9.entry.js +0 -1
  511. package/dist/webcomponents/p-7ee0bae1.entry.js +0 -1
  512. package/dist/webcomponents/p-80f5b2c8.entry.js +0 -1
  513. package/dist/webcomponents/p-84e2bd93.entry.js +0 -1
  514. package/dist/webcomponents/p-89518b26.entry.js +0 -1
  515. package/dist/webcomponents/p-8b944d09.entry.js +0 -1
  516. package/dist/webcomponents/p-942c8949.entry.js +0 -1
  517. package/dist/webcomponents/p-98b8028e.entry.js +0 -1
  518. package/dist/webcomponents/p-9e1f4231.entry.js +0 -1
  519. package/dist/webcomponents/p-BojLBYsY.js +0 -1
  520. package/dist/webcomponents/p-BpaE8q5f.js +0 -1
  521. package/dist/webcomponents/p-Ch9cTPyq.js +0 -1
  522. package/dist/webcomponents/p-DCIW8z1f.js +0 -1
  523. package/dist/webcomponents/p-DQf0KCJj.js +0 -1
  524. package/dist/webcomponents/p-DU8dqq9U.js +0 -1
  525. package/dist/webcomponents/p-MQxr_LMC.js +0 -1
  526. package/dist/webcomponents/p-a4540205.entry.js +0 -1
  527. package/dist/webcomponents/p-a655b996.entry.js +0 -1
  528. package/dist/webcomponents/p-ad5e488a.entry.js +0 -1
  529. package/dist/webcomponents/p-af236d05.entry.js +0 -1
  530. package/dist/webcomponents/p-af4e501d.entry.js +0 -1
  531. package/dist/webcomponents/p-b0e80802.entry.js +0 -1
  532. package/dist/webcomponents/p-b4d8a3f6.entry.js +0 -1
  533. package/dist/webcomponents/p-bf8cf72d.entry.js +0 -1
  534. package/dist/webcomponents/p-c3b71a1f.entry.js +0 -1
  535. package/dist/webcomponents/p-d2d69454.entry.js +0 -1
  536. package/dist/webcomponents/p-da26e869.entry.js +0 -1
  537. package/dist/webcomponents/p-daa534f1.entry.js +0 -1
  538. package/dist/webcomponents/p-dc0d3484.entry.js +0 -1
  539. package/dist/webcomponents/p-e91af879.entry.js +0 -1
  540. package/dist/webcomponents/p-eb56ba9b.entry.js +0 -1
  541. package/dist/webcomponents/p-ed006dd6.entry.js +0 -1
  542. package/dist/webcomponents/p-edcb84bf.entry.js +0 -1
  543. package/dist/webcomponents/p-efb2a58a.entry.js +0 -1
  544. package/dist/webcomponents/p-f91b79fb.entry.js +0 -1
  545. package/dist/webcomponents/p-fab28b02.entry.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as e,c as t,h as s}from"./p-DwYM91AU.js";import{f as i}from"./p-BS7OgSQe.js";import{D as a,am as d}from"./p-wtuY7MT2.js";import{B as r}from"./p-Bqlcv3ZV.js";import{S as c}from"./p-BP2sTIQV.js";import{S as o}from"./p-c7MCfTgE.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-Cmb6PRFh.js";import{D as u}from"./p-Bg2SZArf.js";import{c as b,J as y}from"./p-C01zp4xw.js";import"./p-HXpYMWUU.js";import"./p-C8yN3uBj.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-CQrwlULd.js";import"./p-BH0Xfn-F.js";import"./p-DkoufM1t.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-Bx3wyDU2.js";const v=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:d,final:r=()=>{}})=>{var c;try{const r=await s.submitDisputeResponse(t,e,i);if(r.error){return d({error:f(r.error),code:p(null===(c=r.error)||void 0===c?void 0:c.code),severity:n.ERROR})}a(r)}catch(e){const t=p(null==e?void 0:e.code);return d({error:e.message||e,code:t,severity:n.ERROR})}finally{return r()}},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(c,{key:"59f2110c100006eaa4b8cb00819982f2234f9b4e"},this.isLoading&&s("div",{key:"d2340b512c798a2b1c9d24b9887873d2c640e73f",style:{marginBottom:"8px"}},s(o,{key:"12cd0d90fc08940f19ec0922d859c2c63c7ebd0d",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(o,{key:"377c23749691554b0e5ff3b275becc38687fc11c",height:"18px",styles:{marginBottom:"8px"}}),s(o,{key:"b9f349ab2bc0ee015537627e2ae95651462aa6e6",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&this.isDueDatePassed()&&s("div",{key:"d50fd4fac045b77079348b12eb395c06eb41ccf8",part:a},s("h1",{key:"acfc3c98f6676239bb09f2ebbdca302da941d99d",class:"h4",part:d},"The due date (",null===(t=this.dispute)||void 0===t?void 0:t.due_date,") for this dispute has passed"),s("p",{key:"35da0ea7629aaa83570921487556beb7b523afbe"},"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:"5fa76dfed68838b296029dd6c8ca15f4c5eec5cf",part:a},s("h1",{key:"957a70d01b207ec66d46ba453b4c4b72babb1511",class:"h4",part:d},"This payment is disputed"),s("p",{key:"402d796260f8bb49e1bcc96b80f19175b5dc71f7"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"b1ac381d59b6cd22950c59d14d43c64dfa5e92d3",class:"h5"},"Dispute details"),s("div",{key:"66e654bb296df3edd26d0d4c3c299bdb1b776e04",class:"d-table gap-2"},s("div",{key:"197ce7da42c6219c674302bc4a8f2d8151ddd824",class:"d-table-row gap-2"},s("span",{key:"ae1e3157f25342daa87d6e239e55225fffbde449",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"b784d60ab3bf41f4ef0d0f2be5ae83cd42eda746",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:"4d5849d52d3e3104f0fadb5e290b2fad13ca8193",class:"d-table-row gap-2"},s("span",{key:"61ef72ba96945c2b48718037d26dc4637444cb31",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"7264a1e2aa6cfd6ff491d5e7776bb9ad3e7538d6",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:"977e3301b2c5cb63b8951a624823d61b0aa1c4bd",class:"d-table-row gap-2"},s("span",{key:"c43b4aceb77c569ad78d747291fd59cbb2857f94",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Due Date"),s("span",{key:"f914fcd579b5bf40cd05511eb49614f7caa550d6",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:"3f72c711fae987100e3ec7f66e5027523ee496e9",class:"d-flex gap-2 mt-4 justify-content-end"},s(r,{key:"5c18abac556deec576dc76f97be6b6d0341c37fc",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(r,{key:"48365ab66eacf0f9cdcf8d9dc86e141da3149e4c",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(l=this.dispute)||void 0===l?void 0:l.underReview)&&s("div",{key:"a438576b552dd40ea5b7ed779b682a46e1d93b7b"},s("h1",{key:"c1e6f4d8609bced805cb55fbcda9429e3eeda46d",class:"h4"},"This payment is disputed and under review"),s("p",{key:"dd612da3955221b741e73efc969ad33618dde9ca"},"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:"3a6f3f2fb5cf6135d6c8599ac301fda4652aca0b"},s("h1",{key:"f50a3aa4829a8ad799cfe97c543295e4578e974a",class:"h4"},"This payment was disputed"),s("p",{key:"7fd76cfa07b4357c292daa06cfe575f4c442f44e"},"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:"97e042fc078f65be7c695317360119ae812a647b"},s("h1",{key:"d34c6c71cc23b818592a3422b342efbce240b74d",class:"h4"},"This payment was disputed"),s("p",{key:"083592041839632dcf8ea2d28f81e507c54142f7"},"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:d,final:r=()=>{}})=>{var c;try{const r=await s.updateDisputeResponse(t,e,i);if(r.error)return d({error:f(r.error),code:p(null===(c=r.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(r)}catch(e){const t=p(null==e?void 0:e.code);return d({error:e.message||e,code:t,severity:n.ERROR})}finally{return r()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:d,final:r=()=>{}})=>{var c;try{const r=await s.createDisputeEvidence(t,e,i);if(r.error)return d({error:f(r.error),code:p(null===(c=r.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(r)}catch(e){const t=p(null==e?void 0:e.code);return d({error:e.message||e,code:t,severity:n.ERROR})}finally{return r()}})({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(c,{key:"6f1fd8e2109c806c82c63cfd046739e18cc2b3b7"},s("justifi-dispute-response-core",{key:"56cba360a731ed4054c89c11250f115a7e3b9e63","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:"452cfcf106f40c27f34df05ae2923c0909de9245",class:"row gy-3"},s("div",{key:"d9b608a8d880310b96e98cd4a00cabfcca77dc79",class:"col-12"},s("h1",{key:"050aef1fa636d09880edc7d738d56eab2cf62e52",class:"h4",part:d},"Counter dispute")),s("div",{key:"4e6094f9240d4db3d4bc03c59754ab3d04fed5bc",class:"col-12"},this.currentStepComponent),s("div",{key:"9c1739bc4ed1a9104fd04531a11e02cbbb4f11cc",class:"col-12"},s("div",{key:"d37cda5a7689d8bf9263283eb24e1074ee3d97a0",class:"d-flex gap-2 mt-4 justify-content-end"},this.isFirstStep?s(r,{variant:"secondary",onClick:()=>this.onCancel(),disabled:this.isLoading,isLoading:this.isLoading},"Cancel"):s(r,{variant:"secondary",onClick:()=>this.onBack(),disabled:this.isLoading,isLoading:this.isLoading},"Back"),this.isLastStep?s(r,{variant:"primary",onClick:()=>this.onSubmit(),disabled:this.isLoading,isLoading:this.isLoading},"Submit Counter Dispute"):s(r,{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}
@@ -0,0 +1 @@
1
+ import{h as i,r as a,H as e}from"./p-DwYM91AU.js";import{S as t}from"./p-c7MCfTgE.js";import{w as s,c as d}from"./p-tGDdRx0W.js";import{b as c}from"./p-BS7OgSQe.js";import"./p-wtuY7MT2.js";import"./p-BYsgavgS.js";import"./p-HXpYMWUU.js";const r=a=>{const{isReady:e}=a;return e?null:i("div",{class:"container-fluid p-0"},i("div",{class:"mb-3"},i(t,{height:"18px",width:"100px"}),i(t,{height:"36px"})),i("div",{class:"row"},i("div",{class:"col-4 align-content-end"},i(t,{height:"18px",width:"80px"}),i(t,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(t,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(t,{height:"18px",width:"30px"}),i(t,{height:"36px"}))))},f=class{constructor(i){a(this,i),this.isReady=!1}async componentWillLoad(){await s(),this.iframeOrigin=d.iframeOrigin,this.tabId=c()}componentDidRender(){Promise.all([this.cardNumberIframeElement,this.expirationMonthIframeElement,this.expirationYearIframeElement,this.cvvIframeElement].map((i=>new Promise((a=>{i.addEventListener("iframeLoaded",(()=>{a()}))}))))).then((()=>{this.isReady=!0}))}async validate(){const i=await this.cardNumberIframeElement.validate(),a=await this.expirationMonthIframeElement.validate(),e=await this.expirationYearIframeElement.validate(),t=await this.cvvIframeElement.validate();return i&&a&&e&&t}async tokenize(i,a,e){return this.cardNumberIframeElement.tokenize(i,a,e)}render(){return i(e,{key:"c97d78cffe3d8452c22218775c1d5ba299df44b8"},i(r,{key:"0d19e9e137044ddc2d65700b2ab1697ad14f9add",isReady:this.isReady}),i("div",{key:"12ba94f7996b035bfa5ccbc9266f240bc465bf29",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"334b186b9b458b90a3f6abe0a6e020f281abef66",class:"mb-3"},i("iframe-input",{key:"f73429270e31b16b4f94f533ea4ccf65fe726c2b",inputId:"cardNumber",ref:i=>this.cardNumberIframeElement=i,label:"Card Number",iframeOrigin:`${this.iframeOrigin}/v2/cardNumber?tabId=${this.tabId}`})),i("div",{key:"bc98478795277a4381ef16ace36b4b07b58045e6",class:"d-flex align-items-start"},i("div",{key:"eba7882dd19743a2a8c28546b739b809ca908982",class:"flex-fill me-3"},i("iframe-input",{key:"d352fc8ac9e5d4100c57396eb514f8835d8eff14",inputId:"expirationMonth",ref:i=>this.expirationMonthIframeElement=i,label:"Exp. Month",iframeOrigin:`${this.iframeOrigin}/v2/expirationMonth?tabId=${this.tabId}`})),i("div",{key:"bfb3ea5395251c49d42319fb6ad8b5dc13a437aa",class:"flex-fill me-3"},i("iframe-input",{key:"b90d7f2d8bdb847ac368fe3cff3a88426c7b7cc1",inputId:"expirationYear",ref:i=>this.expirationYearIframeElement=i,label:"Exp. Year",iframeOrigin:`${this.iframeOrigin}/v2/expirationYear?tabId=${this.tabId}`})),i("div",{key:"a390b51062dc84b5621fc88dc20f1ce2d8a48767",class:"flex-fill"},i("iframe-input",{key:"821a97f9496ae1f95c8e5de50b1196e55d7606ca",inputId:"CVV",ref:i=>this.cvvIframeElement=i,label:"CVV",iframeOrigin:`${this.iframeOrigin}/v2/CVV?tabId=${this.tabId}`})))))}};export{f as card_form}
@@ -1 +1 @@
1
- import{r as t,c as e,h as a,H as i}from"./p-DwYM91AU.js";import{C as o}from"./p-ZpPDShvP.js";import{r as s}from"./p-wtuY7MT2.js";import"./p-HXpYMWUU.js";const d=class{constructor(a){t(this,a),this.paymentMethodOptionSelected=e(this,"paymentMethodOptionSelected"),this.onPaymentMethodOptionClick=t=>{t.preventDefault(),this.paymentMethodOptionSelected.emit(this.paymentMethodOption)}}async resolvePaymentMethod(t){var e;return t.isValid?{token:null===(e=this.paymentMethodOption)||void 0===e?void 0:e.id}:{validationError:!0}}render(){var t,e,d;return a(i,{key:"7374fc6d31ec0ebdb34cdd2b789fb931cb93216f",class:"payment-method"},a("div",{key:"b29b47faffcb10d90a811a255a707dfda8597317",class:"radio-list-item p-3",part:s,onClick:this.onPaymentMethodOptionClick},a("form-control-radio",{key:"82c2ebcb9d9b47c8a0a6a3a3e35d7e59a4b66ee7",name:"paymentMethodType",value:null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id,checked:this.isSelected,label:`${o[null===(e=this.paymentMethodOption)||void 0===e?void 0:e.brand]||""} *${null===(d=this.paymentMethodOption)||void 0===d?void 0:d.acct_last_four}`})))}};export{d as justifi_saved_payment_method}
1
+ import{r as t,c as e,h as a,H as i}from"./p-DwYM91AU.js";import{C as o}from"./p-ZpPDShvP.js";import{r as s}from"./p-wtuY7MT2.js";import"./p-HXpYMWUU.js";const d=class{constructor(a){t(this,a),this.paymentMethodOptionSelected=e(this,"paymentMethodOptionSelected"),this.onPaymentMethodOptionClick=t=>{t.preventDefault(),this.paymentMethodOptionSelected.emit(this.paymentMethodOption)}}async resolvePaymentMethod(t){var e;return t.isValid?{token:null===(e=this.paymentMethodOption)||void 0===e?void 0:e.id}:{validationError:!0}}render(){var t,e,d;return a(i,{key:"8d398bf00673a123a94b870d2c40767d8e04d8c5",class:"payment-method"},a("div",{key:"677fb2c2ca1304aeeca4628d6221e1b626d3da0b",class:"radio-list-item p-3",part:s,onClick:this.onPaymentMethodOptionClick},a("form-control-radio",{key:"0f26331b58472ec3d7b0093cae4aa60fa63010dc",name:"paymentMethodType",value:null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id,checked:this.isSelected,label:`${o[null===(e=this.paymentMethodOption)||void 0===e?void 0:e.brand]||""} *${null===(d=this.paymentMethodOption)||void 0===d?void 0:d.acct_last_four}`})))}};export{d as justifi_saved_payment_method}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as e,H as a}from"./p-DwYM91AU.js";import{a5 as i,a6 as h,a7 as r,a8 as c,a9 as o,l}from"./p-wtuY7MT2.js";const n=class{constructor(e){t(this,e),this.formControlInput=s(this,"formControlInput"),this.formControlBlur=s(this,"formControlBlur"),this.isFocused=!1,this.handleFormControlInput=t=>{const s=t.target.getAttribute("name");this.inputHandler(s,this.value),this.formControlInput.emit({name:s,value:this.value})}}get part(){return this.errorText?i:this.isFocused&&this.checked?h:this.checked?r:this.isFocused?c:o}render(){return e(a,{key:"444e9e4c42466bab91d72f6da7b48c6ad59072a8",class:"form-group d-flex flex-column"},e("div",{key:"1833b9b305aced695eb2c42c30a5b41b3008a309",class:"form-check"},e("input",{key:"97e093575b649eea82dca07c0143e8ce722c799f",ref:t=>this.radioElement=t,type:"radio",id:`${this.name}-${this.value}`,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onChange:this.handleFormControlInput,part:this.part,class:this.errorText?"form-check-input is-invalid":"form-check-input",disabled:this.disabled,value:this.value,checked:this.checked}),e("label",{key:"0daa3e06d66c182c41b8c28cb7938d24168ecf17",class:"form-check-label",htmlFor:`${this.name}-${this.value}`,part:l},this.label)),e("form-control-help-text",{key:"4601db2bed3f67eee325a5132d6288ea5d55c240",helpText:this.helpText,name:this.name}),e("form-control-error-text",{key:"2b20dbb4481969e937c498fabec4b708d0eda4e5",errorText:this.errorText,name:this.name}))}};export{n as form_control_radio}
@@ -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,U as o,a as r,c as h,l as c,V as n}from"./p-wtuY7MT2.js";import{F as f}from"./p-Bli6WznP.js";import{F as d}from"./p-BuCKkdLM.js";import"./p-CZfYo5-1.js";import{f as l}from"./p-BS7OgSQe.js";import"./p-HXpYMWUU.js";const b=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=>l(+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:"c8f67091e23f41d7cff3ae8e7d484682546c7b46"},a("div",{key:"5a957dc0aec90bdf3220b8b736353d158d23d5e2",class:"form-group d-flex flex-column"},a("label",{key:"a71b52991e5ec8a46aa01d0d3017aaf6de15a682",part:c,class:"form-label",htmlFor:this.name},this.label),a(f,{key:"85b306a5a8445187ac103d15926ef9d6d161db3c",name:this.name,helpText:this.helpText}),a("div",{key:"2a9cf50fc362e436d6c2b3c592fea5ddfbc95710",class:"input-group"},a("span",{key:"99829c1fb6bec3bb86fa7c13bf3182f04b41a5bc",class:"input-group-text",part:n},"$"),a("input",{key:"8adbcae5bb6aa9d110b5c47b29edd6021a90b3fc",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(d,{key:"c390bb0b610a367b9ca08ff3a737250b97b685fb",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{b as form_control_monetary}
@@ -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-CQrwlULd.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 f,h as m,i as u,j as g,k as y,l as j}from"./p-BTzt8N0l.js";import{T as l}from"./p-CZfYo5-1.js";import{p as k,a as C}from"./p-KPmnq8xf.js";import{o as S,g as w}from"./p-BOqOio4U.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-DkoufM1t.js";import"./p-wtuY7MT2.js";import"./p-B-0a8Xqm.js";import"./p-bolTb61p.js";import"./p-DOLBAxYf.js";const v=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=w();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:"bee53acd5042f8b59fa09d397d5589c88745ba9b"},e(h,{key:"92d12baf31b5b952ba1f864eb4dc5cbcb09c41a7"},e(c,{key:"22e1e7429846d8e77d4bf71ef79240ab5afb6750"},e(n,{key:"8a70165e7c8f5b9051d3199e1d92f38837903bc4"},this.payoutsTable.columnData.map((t=>t)))),e(p,{key:"e04e9aaa5057edeefd7c6417bf2ded048f04fb4f"},e(b,{key:"067e6ab1b3c0ce0d2f034b652843fb0cf7ea5a51",columnSpan:this.payoutsTable.columnKeys.length,isLoading:this.loading}),e(d,{key:"360a80957cba2429ebbe713894e732c435c6b788",isEmpty:this.showEmptyState,columnSpan:this.payoutsTable.columnKeys.length}),e(f,{key:"fe7e5d8a2632e766b38b13cc8c965fad053c97ca",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(u,{key:"4efca907721c3df270b096f60d4acdda118d887e"},e(g,{key:"2b2c440c6c7cc7c31e45dfe213a28373a49b912b"},e(y,{key:"b527603bf4741a36fd1326570b4c49fea6e1bb37",colSpan:this.payoutsTable.columnData.length},e("pagination-menu",{key:"5e2d2f225bb01f37281eb00bda7f03f77a4f11ea",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getPayouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"]}}};export{v as payouts_list_core}
@@ -0,0 +1 @@
1
+ import{r as e,c as t,h as a}from"./p-DwYM91AU.js";import{X as s,Y as i,Z as c}from"./p-wtuY7MT2.js";const d=class{constructor(a){e(this,a),this.selectedQuantityChange=t(this,"selectedQuantityChange"),this.limit=1/0,this.selectedQuantity=0,this.removeUnit=()=>{this.selectedQuantity>0&&(this.selectedQuantity--,this.selectedQuantityChange.emit({modelName:this.modelName,quantity:this.selectedQuantity}))},this.addUnit=()=>{this.limit>0&&(this.selectedQuantity++,this.selectedQuantityChange.emit({modelName:this.modelName,quantity:this.selectedQuantity}))}}render(){return a("div",{key:"92efdff96f60d512cb55ab42bf58c147ad401048",class:"rounded shadow-sm card p-2",part:c},a("div",{key:"c8e0f4b183edbad94d156ab0f5d6541410a3c0e7",class:"d-flex gap-3"},a("div",{key:"1dd62bb5e2fbb3569fbd946a328468354530d103",class:"d-flex align-items-center"},a("img",{key:"0f59bb5d35a7f00f216732a2e72e895b6fa53285",src:this.imageUrl,alt:this.modelName,height:75,width:75,part:s})),a("div",{key:"83ae22d90dfa5153210021ce2bd755ab645a9ea1",class:"d-flex flex-column flex-grow-1 gap-3 p-4 justify-content-center"},a("div",{key:"bc28e1f2d18378e6d21a7f3101e62acda6a1265f",class:"row"},a("div",{key:"f6700b615935ec7331a9672267e11a876780f255",class:"col-6 d-flex gap-2"},this.modelName,a("form-control-tooltip",{key:"deb77216bb14a69cefbec0365ab6828229566b69",helpText:this.description})),a("div",{key:"5a7ee6f8e67673d5c8062fdfcb5db99fb3389e6c",class:"col-6 d-flex justify-content-end align-items-center"},a("button",{key:"4ce40da430bff61ab70970c06b987a336494e26c",class:"p-0 minus btn",onClick:this.removeUnit,part:i},"-"),a("div",{key:"8e75894d5b0df2b283758841a68b65402403aebf",class:"w-25 text-center"},this.selectedQuantity),a("button",{key:"acaf3f3688e37ffaf41eb31d1fec7e01c3bc319f",class:"p-0 plus btn",onClick:this.addUnit,part:i},"+"))))))}};export{d as terminal_quantity_selector}
@@ -1 +1 @@
1
- import{r as e,h as a}from"./p-DwYM91AU.js";import{c as t,a as i,F as c}from"./p-DiJD6Iqx.js";import{ao as d}from"./p-wtuY7MT2.js";import"./p-BFTU3MAI.js";const s=t({additional_statement:i().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,i=t.name,c=t.files;a[i]=[];for(const e of c)a[i].push(new n(e,i))},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 c(s)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"c3458b13a7a265c9538725f706febf90251beb0e"},a("div",{key:"f8df4f3ae70640acf11f5c803ae1f77f1f501b48",class:"row gy-3"},a("div",{key:"4d92037e9cb588c137bac7a505d35764de1fc83e",class:"col-12"},a("h2",{key:"6cbf7f95a025011299aa0612e9c28c87f4fb6553",class:"h5",part:d},"Additional Evidence")),a("div",{key:"36d990b686e17568dffe11529582638cb5e1e812",class:"col-12"},a("form-control-textarea",{key:"c75f3f622ecfcf142d003e1af09f81794d4f6a1d",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:"d6da0f0922e5c1ba99dbef034b9a8d8817739899",class:"col-12"},a("form-control-file-v2",{key:"0e333a243b510fbe96bf874fa523ea9e4d7bfa6f",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:i().nullable(),cancellation_rebuttal:i().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 c(b)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"bd78bece625aec456d3433cc20bff08c16ae147a"},a("div",{key:"80b32adabf3205beb07609c2758ba8609f22cf87",class:"row gy-3"},a("div",{key:"baa7766e30f6d9a9be7d2194d07e2fd53e859642",class:"col-12"},a("h2",{key:"bb1bb5a301dfaa5f4ce3cdcef84ff987088f2933",class:"h5",part:d},"Cancellation Policy")),a("div",{key:"47fd127e97420bcc5aca04e6cdf2067edd7d9a97",class:"col-12"},a("form-control-textarea",{key:"c85dd2dc03c872e96c052e347bb698c9c8f17b3b",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:"e070c23f89b84d414992b842107531136b2541a6",class:"col-12"},a("form-control-textarea",{key:"0c3acec921d25929feb496f810a1745debc440fb",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:"d40087a09150c9e801b6499604b71b48019a33b7",class:"col-12"},a("form-control-file-v2",{key:"75c6d00c7a29c60bd81ab2f187f901d6fbe522d1",label:"Upload Cancellation Policy",name:"cancellation_policy",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.cancellation_policy}))))}},u=t({customer_name:i().nullable(),customer_email_address:i().nullable(),customer_billing_address:i().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 c(u)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c,s;return a("div",{key:"4f66d1737416342483855947c8d0bc84633efd1a"},a("div",{key:"0a7be5af6e92d56bf58ceb5e1a5269163f8a5eef",class:"row gy-3"},a("div",{key:"0ae8574e9228b7cee09f33595f901a216fad571c",class:"col-12"},a("h2",{key:"9a025c901262dc362e048a72f3f5d17eaa8bc7a4",class:"h5",part:d},"Customer Details")),a("div",{key:"8d651d6a4f9f3ebc519e3fd8b6cd03da452f7a5e",class:"col-12"},a("form-control-text",{key:"00b3d5ffef1d253b75cdba11c26c05fc4b3d3e7d",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:"3494745d7843208abe678662359cf1612b035d2d",class:"col-12"},a("form-control-text",{key:"b6822a0f33dab183f717e58b68cd1c95445a62c8",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:"86f9e759614375d50238fa26756ceac0ebd3d55c",class:"col-12"},a("form-control-textarea",{key:"e86f3fcc5a5f31cf46b67d53ee282b16232c0016",label:"Billing Address",name:"customer_billing_address",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.customer_billing_address,inputHandler:this.inputHandler,errorText:this.errors.customer_billing_address})),a("div",{key:"bda34fee75daeaf9ac91758a096febabe98ddf14",class:"col-12"},a("form-control-file-v2",{key:"49c40325d8478296a6da2f124114a7a06d29b4c6",label:"Customer Signature",name:"customer_signature",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.customer_signature})),a("div",{key:"8f1b66a41596a3606b5c2f2a0c94844f11aa4b27",class:"col-12"},a("form-control-file-v2",{key:"c5c539c9f9cf799a1043330e657a6064510e59ba",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:i().nullable(),duplicate_charge_explanation:i().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 c(p)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"68152308257c9331e3e3e1b8141922634390c91d"},a("div",{key:"0ff743d3d260272e98f9d9c9219e1465de1c7516",class:"row gy-3"},a("div",{key:"c02a18a34320cc8b4574b65f378b8a54207eb01c",class:"col-12"},a("h2",{key:"254ae07ed42f2c61fed3b0be8cd02f928ac64f92",class:"h5",part:d},"Duplicate Charge")),a("div",{key:"dfd97f7c5817bcd14458e4d390736b79651c29db",class:"col-12"},a("form-control-text",{key:"76c551ab0641c3ebb78c40cdb78bb184911033c9",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:"1edd78dcefbe32156f27e924e5b032a016dbffc5",class:"col-12"},a("form-control-textarea",{key:"556829c59b797a79b8bd31d3add791819a2ef84a",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:"183a68bf83924559e0032af6a43308466944fdcb",class:"col-12"},a("form-control-file-v2",{key:"fa3817f0e2e8ff17d5cdd142ccabc0e539a48d38",label:"Duplicate Charge Documentation",name:"duplicate_charge_documentation",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.duplicate_charge_documentation}))))}},y=t({customer_purchase_ip_address:i().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 c(y)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"677a04d0eb6000066063a68bfe85d286c5c207fa"},a("div",{key:"b231437fc879fa2c24474c498eba17edd34128a3",class:"row gy-3"},a("div",{key:"d0cf03d9f5e2de19f63e47fd42f0bec710d44bd1",class:"col-12"},a("h2",{key:"5343dcbeffdaa14e4605944eef18c5ebf1418a20",class:"h5",part:d},"Electronic Evidence")),a("div",{key:"a4b816038465b14e4078b13d46543280b212c676",class:"col-12"},a("form-control-text",{key:"8cebdd64857d99b8058013df9a10ac007869b998",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:"637f3221604b415b8ea5c04af800a72dbfa40c4b",class:"col-12"},a("form-control-file-v2",{key:"89b3db82c57b8673124369e915efa4f0ec3927a8",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:i().nullable(),service_date:i().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 c(k)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"ae1fdf1a29d12408c3be84b02dcd058cb4c7849b"},a("div",{key:"499977f5ad1d9bcbddb749b556539cd1b641d3e8",class:"row gy-3"},a("div",{key:"1318ffbe476b9b0cb662b85f3bc670c66e97f8f5",class:"col-12"},a("h2",{key:"58bf1ca5a29f3a4942b249f7d35f60f4f9976b62",class:"h5",part:d},"Product & Service Details")),a("div",{key:"957203535d86a521d5d702d0d85eb09201deab3a",class:"col-12"},a("form-control-text",{key:"b02101dd7b3e22b06feea75f451fca6ac1496851",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:"5eddaf6586b22c516f5fd48943cfd6f4a7bb83ce",class:"col-12"},a("form-control-date",{key:"bbc3a6d58d6f7e123d08802ca933135603476cca",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:"4d810ce7ffdd4aec9fb8d1ce81aa8cc23aacb8f7",class:"col-12"},a("form-control-file-v2",{key:"c3d029eb2da6364df611604b6956a285dcde63ca",label:"Service Documentation",name:"service_documentation",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.service_documentation}))))}},x=t({refund_policy_disclosure:i().nullable(),refund_refusal_explanation:i().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 c(x)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c;return a("div",{key:"d5afb26778b8e72bb914c964ab03490887149ef7"},a("div",{key:"58c0472396b62c36304fc5b05400ea1e92106d48",class:"row gy-3"},a("div",{key:"0178337b922c635efd5967da10ffb9a4fcf974e3",class:"col-12"},a("h2",{key:"754263a51e6d0dd4a0b42205855446194a01fbde",class:"h5",part:d},"Refund Policy and Receipt")),a("div",{key:"3d618f3d5c73ac55275d189b16b8d0ee2eaf56b4",class:"col-12"},a("form-control-textarea",{key:"42d90a550814a48fdd3bcb5fc8a18dfa3739512d",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:"108c2376a1680468000d83a31753cd2e1a2143f4",class:"col-12"},a("form-control-textarea",{key:"7b1db2802760357080a7cd004bc322cc644c1741",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:"f1c140d81063c530b5f2c9df8a78cd7edad56482",class:"col-12"},a("form-control-file-v2",{key:"6d7fc6f84f8a3af171e344d1a05d465d144bd6b5",label:"Upload Refund Policy",name:"refund_policy",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.refund_policy})),a("div",{key:"aefdff678a562ea84dd20f2855045ad1e2be2e65",class:"col-12"},a("form-control-file-v2",{key:"c745a8ca84affd92d6590d4c2ccc0ca11ba71bd6",label:"Upload Receipt",name:"receipt",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.receipt}))))}},O=t({shipping_carrier:i().nullable(),shipping_tracking_number:i().nullable(),shipping_date:i().nullable(),shipping_address:i().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 c(O)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c,s;return a("div",{key:"12761f4d70524d91bfc9ad614d2235a1f7ff9fb2"},a("div",{key:"f09f1107bd01120198dd8b5fac777494720be56e",class:"row gy-3"},a("div",{key:"2533b4452bada515f9b4d116521122989ca010b8",class:"col-12"},a("h2",{key:"56d3d7c5361dbdc23e98608ca2296532d1d9b9f9",class:"h5",part:d},"Shipping Details")),a("div",{key:"fd93a97d9829d7aa5999b8c90e769da63f1e5e75",class:"col-12"},a("form-control-text",{key:"0121bfaedb5a3ad33cb71ff4af667099b0fed28c",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:"17def8633c36b773387bf770f203584c01d78d56",class:"col-12"},a("form-control-text",{key:"23a511ccca24f322f56876f31f1c70699808106f",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:"18e25d53629ec3d0096f9ed53a3a6c92e0e746b9",class:"col-12"},a("form-control-date",{key:"fcdb6e192c8dda9e31e97fd1b6d0e9c74e86712f",label:"Date Shipped",name:"shipping_date",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.shipping_date,inputHandler:this.inputHandler,errorText:this.errors.shipping_date})),a("div",{key:"dd2c4332df4a13bab91e26770845c2ad62b4e5ab",class:"col-12"},a("form-control-textarea",{key:"855a2b47ea8363befc57b5a8533d5aac1f18e00e",label:"Shipping Address",name:"shipping_address",defaultValue:null===(c=this.disputeResponse)||void 0===c?void 0:c.shipping_address,inputHandler:this.inputHandler,errorText:this.errors.shipping_address})),a("div",{key:"880ed83f7ef2e3c4aba497c8906c9b39d0f3b922",class:"col-12"},a("form-control-file-v2",{key:"78815509ec89c00074326d5752f77797c4b47746",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
+ import{r as e,h as a}from"./p-DwYM91AU.js";import{c as t,a as i,F as c}from"./p-DiJD6Iqx.js";import{ao as d}from"./p-wtuY7MT2.js";import"./p-BFTU3MAI.js";const s=t({additional_statement:i().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,i=t.name,c=t.files;a[i]=[];for(const e of c)a[i].push(new n(e,i))},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 c(s)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"5e572a30ed53b4fbcf3808ba545ce2fdf5b988aa"},a("div",{key:"90870dc58e0eab72e64ae03bdaa25bb1749d8e23",class:"row gy-3"},a("div",{key:"cc3b6f19687d02e047744e8a53d22a2f91a8b968",class:"col-12"},a("h2",{key:"230c20dc3f75e48afa4008369374fd8c175cb7ea",class:"h5",part:d},"Additional Evidence")),a("div",{key:"7b49c8012cfc07c44399969f8505db786389b38b",class:"col-12"},a("form-control-textarea",{key:"349a8a2ebda338e170c90266801ae93b6f9482ea",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:"01cd368a2278c5de462f0998a50ba4ca5889be26",class:"col-12"},a("form-control-file-v2",{key:"f95d0b78704f9a1fd154003edbbffb062659ae27",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:i().nullable(),cancellation_rebuttal:i().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 c(b)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"6dc5100426e8e4124d19a375250f85f8e15b28d4"},a("div",{key:"fb950108be5fd4096a7717c88943938261787f99",class:"row gy-3"},a("div",{key:"08f85a06288e19939a16d3fa52ef3b3199c56f36",class:"col-12"},a("h2",{key:"a585b93921814b1ffbb95c6f9c1de37d4104049b",class:"h5",part:d},"Cancellation Policy")),a("div",{key:"3b7c620518006738d2e36863b62a72142f167733",class:"col-12"},a("form-control-textarea",{key:"70a76160b0d29648a9e0598dd5b867a382935e03",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:"e06d4c794bad47e366ca702e764307fdab5e33a8",class:"col-12"},a("form-control-textarea",{key:"1b783920c5a5b94bff60d4b061cc7cc6666cc184",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:"3cb3371c1d3727e55140ea60a0cff96bc0f42702",class:"col-12"},a("form-control-file-v2",{key:"738a456bf4653240180963fa7e5ab20a7a4add7c",label:"Upload Cancellation Policy",name:"cancellation_policy",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.cancellation_policy}))))}},u=t({customer_name:i().nullable(),customer_email_address:i().nullable(),customer_billing_address:i().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 c(u)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c,s;return a("div",{key:"70e29d650d5304522f927c15b4eb5e62e203c5e0"},a("div",{key:"f50422b29cb2a4f3bca911ced94dc681adb3fc41",class:"row gy-3"},a("div",{key:"f29816d9281ea4c4db5018d3b7edb1600569357a",class:"col-12"},a("h2",{key:"a2889c95c293bf0bbf97c16e4486e307ca87729c",class:"h5",part:d},"Customer Details")),a("div",{key:"9cd45719434a1740f67b73c13fd08e0fe562168e",class:"col-12"},a("form-control-text",{key:"5a30a3aef7fbe2d3013c46e43a437724dae41213",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:"9812e1f9f6df949b9f15b2c3f28857db7dcf5cb7",class:"col-12"},a("form-control-text",{key:"10b146053a399039e8dbd42c3cab53b4b55c0ec3",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:"2742a0922a223bd60d6e3d08a55190742ecf5112",class:"col-12"},a("form-control-textarea",{key:"41491e238c75716520d747cbf9f1bcc329a2d686",label:"Billing Address",name:"customer_billing_address",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.customer_billing_address,inputHandler:this.inputHandler,errorText:this.errors.customer_billing_address})),a("div",{key:"71074f31e565c24107b91b04d9aa16da77ba618c",class:"col-12"},a("form-control-file-v2",{key:"17f70cf96927b01e65430e13c2d21209e9170603",label:"Customer Signature",name:"customer_signature",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.customer_signature})),a("div",{key:"ec696695191e68c7ceb0cc41f99f9e53f2d59da1",class:"col-12"},a("form-control-file-v2",{key:"562ff8b3819f536d491f2e2e55a85a55fcda0e1c",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:i().nullable(),duplicate_charge_explanation:i().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 c(p)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"0b0d73b396b32f29fa389d3981d48c3f30f96fd7"},a("div",{key:"2fd16a4cf964c863a59789a2be60d94b27a95de8",class:"row gy-3"},a("div",{key:"48c15f7db3285caa9164d815615b82a84283fbfe",class:"col-12"},a("h2",{key:"397b3026311bf57588b172146fc9822f99ede63e",class:"h5",part:d},"Duplicate Charge")),a("div",{key:"c825b6efd428bee298b9b0ddf2265378cf999de9",class:"col-12"},a("form-control-text",{key:"b43283087a10826bf8e582a1e863ed4982b5c000",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:"66d5cefa16c341f5c523eaa46de5c11f5b16e619",class:"col-12"},a("form-control-textarea",{key:"f83573136fc2ce108f186f9434f46a3f157bd102",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:"cc47dc1d9dbac962d27494b5ff3fef572c98c7b4",class:"col-12"},a("form-control-file-v2",{key:"3cf06b6d61edd6ac96d02b12639d040f698b2526",label:"Duplicate Charge Documentation",name:"duplicate_charge_documentation",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.duplicate_charge_documentation}))))}},y=t({customer_purchase_ip_address:i().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 c(y)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"1a4a1d78529c48b8f32029a3efa05b4430c6d271"},a("div",{key:"593d167f4e6b610ac3cdb8a04b4eee30a1cb4f91",class:"row gy-3"},a("div",{key:"39440c3a2802b823c85f251c4393ba76bad287c0",class:"col-12"},a("h2",{key:"f5ec8cce1bbadb772ac6dbe668cf54187d2690d7",class:"h5",part:d},"Electronic Evidence")),a("div",{key:"b9020a773c45a8f59a31ffef44b32253fdb4a551",class:"col-12"},a("form-control-text",{key:"56122eafb7f138f4472a5818cddd32cb0e17fc7e",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:"0737f585271838dd60ab9ee1e6ac83d0c6362b96",class:"col-12"},a("form-control-file-v2",{key:"63590d574ee151cbf82638002dfe513cea471035",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:i().nullable(),service_date:i().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 c(k)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"0e2648d399af18f7959bed2e0fff56fd63b541df"},a("div",{key:"4322c227617147721ab7cf33a5e75a09bc370a0c",class:"row gy-3"},a("div",{key:"e2bc9f0642356a864e7fa323262ead13d4825fdc",class:"col-12"},a("h2",{key:"88af660c9add83da7edc7758d4645db796c80fdf",class:"h5",part:d},"Product & Service Details")),a("div",{key:"dcfb0f64e1b611eb8d53f97950d5922f7358a64c",class:"col-12"},a("form-control-text",{key:"42959d4b7c03d14fdef29a656a5f18d0d89d3b2e",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:"1f4173e79f10a6ac32b860ecbd62fe5c612cc5b2",class:"col-12"},a("form-control-date",{key:"6e8bab228b3a23655cbf71fe6dc72a850b38947c",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:"2e32f65cc5388302d067fb1a8db34e3e529435c2",class:"col-12"},a("form-control-file-v2",{key:"f9fb2ac0c6a2f37a7584eeda2460702b1e0d6cc0",label:"Service Documentation",name:"service_documentation",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.service_documentation}))))}},x=t({refund_policy_disclosure:i().nullable(),refund_refusal_explanation:i().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 c(x)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c;return a("div",{key:"882eb01880bcfdde30abe10465fecd7390654ed6"},a("div",{key:"de2f238310e4b80976888d147e90047688ad5ada",class:"row gy-3"},a("div",{key:"305af62aa762ae6abff0678998132e8f56707550",class:"col-12"},a("h2",{key:"6e224996b82639c426d129bfd28633f3d3839f6f",class:"h5",part:d},"Refund Policy and Receipt")),a("div",{key:"b2b8d444c594bf92d04fed6640230745c5fb49ba",class:"col-12"},a("form-control-textarea",{key:"f75c6c360c485ac5253164be5d4941d859deb902",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:"1788d1e6ba1ddbe82795ce1a41b901a81c055f6d",class:"col-12"},a("form-control-textarea",{key:"f47fac9b8e0d6b9766311b13c760129bb6335ddd",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:"d96552fee8b4cdddf31148b2d3783a4e1dfb031b",class:"col-12"},a("form-control-file-v2",{key:"3c6c06201ef3a730aed41ab6b8cb62d5ee8d8128",label:"Upload Refund Policy",name:"refund_policy",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.refund_policy})),a("div",{key:"ec2271dd9646596df3106f56c6e96f618196046a",class:"col-12"},a("form-control-file-v2",{key:"48f956f2580187fc7baecc5426d5ed0a1050150b",label:"Upload Receipt",name:"receipt",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.receipt}))))}},O=t({shipping_carrier:i().nullable(),shipping_tracking_number:i().nullable(),shipping_date:i().nullable(),shipping_address:i().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 c(O)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c,s;return a("div",{key:"90641cea619de697d7a90e6e397790f79ceb9376"},a("div",{key:"52d939e26bd26e99240d100897a530b89553e727",class:"row gy-3"},a("div",{key:"01755fbca3430bd3066377e9481038370c49b2d8",class:"col-12"},a("h2",{key:"d273fbe6ff8b7815ba5c2369748a3a20548b0a4d",class:"h5",part:d},"Shipping Details")),a("div",{key:"595f4e63dff85591713a4c895acb6628c8ef8214",class:"col-12"},a("form-control-text",{key:"958169d07544237a72facdc016d4d12ac64a4c48",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:"1d3020a30f95c5ced652871a635aba0152bbc4e3",class:"col-12"},a("form-control-text",{key:"088af20353ec2efcb65a4e597a1fb4aec23cfcbb",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:"536ee74c42d326d7f7f698274c846bfebf0d34dd",class:"col-12"},a("form-control-date",{key:"71ef44bd4c810a567162b7fe92199eceff9be470",label:"Date Shipped",name:"shipping_date",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.shipping_date,inputHandler:this.inputHandler,errorText:this.errors.shipping_date})),a("div",{key:"8887e0daf44be31486563e85cd989eef1da5f5ce",class:"col-12"},a("form-control-textarea",{key:"c34093bc4ee65f4fb092c377a98e01cd69bdbc7c",label:"Shipping Address",name:"shipping_address",defaultValue:null===(c=this.disputeResponse)||void 0===c?void 0:c.shipping_address,inputHandler:this.inputHandler,errorText:this.errors.shipping_address})),a("div",{key:"469a5d8c7e28fa2ad430f104f08f387448f70048",class:"col-12"},a("form-control-file-v2",{key:"a2b6c6c0c1cf32430582b97efe6bcc1d4c47147d",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}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as s}from"./p-DwYM91AU.js";import{c as i,d as r,e as a}from"./p-5aA7gjr5.js";import{I as o}from"./p-Dy5btfGV.js";import{F as h}from"./p-DiJD6Iqx.js";import{O as c}from"./p-B5rtFhtR.js";import{d as n}from"./p-D1WQG4I7.js";import{B as d}from"./p-Bqlcv3ZV.js";import{W as l,l as f,U as m,_ as b}from"./p-wtuY7MT2.js";import"./p-CZfYo5-1.js";import{B as u}from"./p-XYgDHrVL.js";import{I as p,P as y}from"./p-CVaOFfrI.js";import{u as v,a as j,b as w}from"./p-C77ElQ41.js";import{c as k}from"./p-DfKxeSrC.js";import"./p-Cjcsf8ku.js";import"./p-D2muobcE.js";import"./p-C8yN3uBj.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-HXpYMWUU.js";import"./p-CQrwlULd.js";import"./p-BH0Xfn-F.js";import"./p-DkoufM1t.js";import"./p-CLHwhyvu.js";import"./p-BFTU3MAI.js";import"./p-avgjSJ1d.js";import"./p-CPpUGsw5.js";const g=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event")}async validate(){return this.coreComponent.validate()}async submit(){return this.coreComponent.submit()}async validateAndSubmit({onSuccess:t}){this.coreComponent.validateAndSubmit({onSuccess:t})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&(this.getOwner=i({authToken:this.authToken,identityId:this.ownerId,service:new o}),this.patchOwner=r({authToken:this.authToken,identityId:this.ownerId,service:new o}),this.postOwner=a({authToken:this.authToken,service:new o}))}render(){return s("owner-form-core",{key:"84af0e74910def3f34aa4a6ce9d1f501faf6f5c5",ownerId:this.ownerId,businessId:this.businessId,getOwner:this.getOwner,patchOwner:this.patchOwner,postOwner:this.postOwner,allowOptionalFields:this.allowOptionalFields,removeOwner:this.removeOwner,newFormOpen:this.newFormOpen,ownersLength:this.ownersLength,country:this.country,ref:t=>this.coreComponent=t})}},x=class{loadingWatcher(){this.formLoading.emit(this.isLoading)}constructor(s){t(this,s),this.clickEvent=e(this,"click-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.ownerSubmitted=e(this,"ownerSubmitted"),this.isLoading=!1,this.errors={},this.owner={},this.getData=()=>{this.isLoading=!0,this.getOwner({onSuccess:t=>{this.instantiateOwner(t.data)},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>this.isLoading=!1})},this.sendData=()=>(this.isLoading=!0,new Promise((t=>{this.ownerId?this.patchOwner({payload:this.payload,onSuccess:e=>{this.ownerSubmitted.emit({id:e.data.id}),this.instantiateOwner(e.data),t(!0)},onError:({error:e,code:s,severity:i})=>{this.errorEvent.emit({message:e,errorCode:s,severity:i}),t(!1)},final:()=>this.isLoading=!1}):this.postOwner({payload:this.payload,onSuccess:e=>{this.ownerSubmitted.emit({id:e.data.id}),this.instantiateOwner(e.data),t(!0)},onError:({error:e,code:s,severity:i})=>{this.errorEvent.emit({message:e,errorCode:s,severity:i}),t(!1)},final:()=>this.isLoading=!1})}))),this.instantiateOwner=async t=>{this.owner=Object.assign({},new c(t)),await this.formController.setInitialValues(this.owner)},this.handleAddOwner=()=>{this.clickEvent.emit({name:this.ownerId?u.updateOwner:u.addOwner})},this.handleRemoveOwner=()=>{this.removeOwner(this.ownerId),this.clickEvent.emit({name:u.removeOwner})},this.validate=this.validate.bind(this),this.submit=this.submit.bind(this),this.validateAndSubmit=this.validateAndSubmit.bind(this)}async returnOwnerData(){return this.ownerId}async validate(){return this.formController.validate()}async submit(){if(await this.validate())return this.sendData()}async validateAndSubmit(t){t.preventDefault(),await this.validate()&&this.submit()}get payload(){let t=new c(this.formController.values.getValue()).payload;return this.ownerId?t:Object.assign(Object.assign({},t),{business_id:this.businessId})}get formTitle(){return this.ownerId?"Edit Business Owner":"Add Business Owner"}get submitButtonText(){return this.ownerId?"Update":"Add"}get showRemoveButton(){return!(this.ownersLength<=1)&&(!(this.ownerId||!this.newFormOpen)||!(!this.ownerId||this.newFormOpen)||void 0)}componentWillLoad(){this.formController=new h((0,n[this.country])("owner",this.allowOptionalFields)),this.ownerId?this.getData():this.instantiateOwner({})}componentDidLoad(){this.formController.errors.subscribe((t=>this.errors=Object.assign({},t)))}render(){return s("form",{key:"8374d88e5a1d99f58ac2c93680fb000410a67ec8",onSubmit:this.validateAndSubmit},s("fieldset",{key:"82d2f80aaff654362852e4e8c5c9775d82a5080c"},s("legend",{key:"d74d4c8bdfc91086b14e41b27934dddf14695e49",class:"fw-semibold fs-5",part:l},this.formTitle),s("br",{key:"8f6fe8d7d6b66ca2b0fd8e4b0797ee681c11f7eb"}),s("div",{key:"ef546418d4192bc1d1fef02faf47f965127f45ef",class:"row gy-3"},s("owner-form-inputs",{key:"2f961ee901838a5dd82b20484fe149b393c7c609",ownerDefaultValue:this.formController.getInitialValues(),errors:this.errors,formController:this.formController,country:this.country}),s("div",{key:"8ed50b5de9839353b25d54d7b51546c1d2afaeb5",class:"d-flex gap-2 justify-content-start"},s(d,{key:"a9c94571902b2a6fc68459662ee7be35874ebb66",variant:"secondary",type:"button",onClick:this.handleRemoveOwner,hidden:!this.showRemoveButton},"Remove"),s(d,{key:"dc6072e019ebedc91d99917023b561f7048e7a08",variant:"primary",type:"submit",onClick:this.handleAddOwner,disabled:this.isLoading},this.submitButtonText))),s("hr",{key:"d46ee611300752429d1c9b50dfce99e8b6fc10fa"})))}static get watchers(){return{isLoading:["loadingWatcher"]}}},C=class{constructor(e){t(this,e),this.isEditingIdentification=!1,this.inputHandler=(t,e)=>{v(this.formController,{[t]:e})},this.onAddressFormUpdate=t=>{j(this.formController,Object.assign(Object.assign({},this.formController.values.getValue().address),t))}}render(){var t,e;return s("div",{key:"81c659f924f51a559e3e958b5d608f7c68022093",class:"row gy-3"},s("div",{key:"9c89bc8e39cb584bf81852784a335599308681ff",class:"col-12 col-md-8"},s("form-control-text",{key:"a02d86ccbbcda1219a2e4e2885d0ffb54bcc3942",name:"name",label:"Full Name",defaultValue:this.ownerDefaultValue.name,errorText:this.errors.name,inputHandler:this.inputHandler})),s("div",{key:"7281855c61b30b689809aa9fd3d4fce3927fcb8f",class:"col-12 col-md-4"},s("form-control-text",{key:"c91163386bd23653e3eaca4cf66c9690c28ed6f7",name:"title",label:"Title",defaultValue:this.ownerDefaultValue.title,errorText:this.errors.title,inputHandler:this.inputHandler,helpText:"Role at your business, e.g. President, CEO, Treasurer."})),s("div",{key:"c998576d6f8442f255685a31a4bb0463175163f5",class:"col-12 col-md-6"},s("form-control-text",{key:"345003706db0198c9de5e4234f3fe3efbacc51c7",name:"email",label:"Email Address",defaultValue:this.ownerDefaultValue.email,errorText:this.errors.email,inputHandler:this.inputHandler})),s("div",{key:"8bccc4ebd45c92924e921f7fffa7f5214406c9e2",class:"col-12 col-md-6"},s("form-control-number-masked",{key:"adaf6251217a5396c36ee7e9c0963cf2c948d9cd",name:"phone",label:"Phone Number",defaultValue:this.ownerDefaultValue.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:y.US})),s("div",{key:"d87f294ba9bf27df562f3e9b0ea4e286c1c6a725",class:"col-12 col-md-4"},s("form-control-date",{key:"0681a51f830eb1b358c525deb46baa06f7bc9977",name:"dob_full",label:"Birth Date",defaultValue:this.ownerDefaultValue.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:t=>w(t,this.formController),helpText:"Must be 18 or older."})),s("div",{key:"090785d6d86ec3122c3884ec8ba46df43f71d08e",class:"col-12 col-md-8"},!(null===(t=this.ownerDefaultValue)||void 0===t?void 0:t.ssn_last4)||this.isEditingIdentification?s("form-control-number-masked",{name:"identification_number",label:k[this.country].idNumberLabel,defaultValue:this.isEditingIdentification?"":this.ownerDefaultValue.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:p[this.country],helpText:k[this.country].identityHelpText}):s("div",null,s("label",{class:"form-label",part:f},k[this.country].idNumberLabel),s("div",{class:"input-group mb-3"},s("input",{type:"text",class:"form-control",part:m,value:`****${null===(e=this.ownerDefaultValue)||void 0===e?void 0:e.ssn_last4}`,disabled:!0}),s("button",{class:"btn btn-secondary",type:"button",part:b,onClick:()=>{this.isEditingIdentification=!0,v(this.formController,{ssn_last4:null,identification_number:""})}},"Change")))),s("div",{key:"3d5eabefcd198d1a27bfe158c92e3c18a0a14e69",class:"col-12"},s("justifi-identity-address-form",{key:"10158bd6a40fa0ca00d7e9feb04d7c22e51d5829",errors:this.errors.address,defaultValues:this.ownerDefaultValue.address,handleFormUpdate:this.onAddressFormUpdate,country:this.country})))}};export{g as justifi_owner_form,x as owner_form_core,C as owner_form_inputs}
@@ -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"./p-Cjcsf8ku.js";import"./p-CQrwlULd.js";import{p as i}from"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{T as a,a as r,b as h,c as o,d as c,e as n,f as p,g as d,h as u,i as b,j as m,k as f,l as g}from"./p-BTzt8N0l.js";import{T as j}from"./p-CZfYo5-1.js";import{c as k,a as y}from"./p-CkN7DFFn.js";import{o as l,g as C}from"./p-DKGn-ILd.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-DkoufM1t.js";import"./p-wtuY7MT2.js";import"./p-B-0a8Xqm.js";import"./p-DOLBAxYf.js";const w=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event"),this.errorEvent=s(this,"error-event"),this.checkouts=[],this.subAccounts=[],this.loading=!0,this.paging=i,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:j.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:j.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const e=this.checkouts.find((t=>t.id===s));this.clickEvent.emit({name:j.row,data:e})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.checkoutsTable=new a(this.checkouts,this.columns,k,y),this.getCheckouts&&this.getSubAccounts&&this.fetchData(),l("set",(()=>{this.pagingParams={}})),l("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getCheckouts({params:this.checkoutParams,onSuccess:async({checkouts:t,pagingInfo:s})=>{this.checkouts=t,this.paging=s,this.checkoutsTable.collectionData=this.checkouts,this.checkoutsTable.columnKeys.includes("sub_account_name")?await 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.checkouts=this.checkouts.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 checkoutParams(){const t=C();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.checkouts.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.checkouts.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.checkoutsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e(g,{key:"ea74cbb0bce1e96b597344ee226eebc5dc369b1b"},e(r,{key:"37ca3a5b8c1d53604edb487d1e31f0d829a0a4a8"},e(h,{key:"d61415d71f636ce288036867c70e22fa459e1cf6"},e(o,{key:"75db78b57011fc3d14eea8ecd353ea117b4d951e"},this.checkoutsTable.columnData.map((t=>t)))),e(c,{key:"71631afc11d6a096f71275bd6231a1e5f0a66e72"},e(n,{key:"ea6c8eb8f602d1924b278c374ad02d218758e65c",columnSpan:this.checkoutsTable.columnKeys.length,isLoading:this.loading}),e(p,{key:"f581dad5d925bcd85aea7b9292d719050eea5431",isEmpty:this.showEmptyState,columnSpan:this.checkoutsTable.columnKeys.length}),e(d,{key:"f6ecafe13119e285ab27396bade1992b31663e52",columnSpan:this.checkoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.checkoutsTable.rowData.map(((t,s)=>e(u,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e(b,{key:"846c7a9976a4738f64d0a067bb8e48840e04b3ab"},e(m,{key:"ce2c52b71c891a3621c54bfd3e9c75088d685818"},e(f,{key:"ea253462403bb909e8423776027bbdadf41ab746",colSpan:this.checkoutsTable.columnData.length},e("pagination-menu",{key:"4d6d2f7a5559d2f20f86c8fc138a402e7b985503",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getCheckouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{w as checkouts_list_core}
@@ -0,0 +1 @@
1
+ import{h as t,r as e,c as i,H as n,g as s}from"./p-DwYM91AU.js";import{A as o}from"./p-C8yN3uBj.js";import{A as a,o as r,p as l,q as c,r as h,s as d,c as p,t as u,G as y,u as g,v as b,w as m,x as f,y as v,z as M,B as w,D as k,I as P,F as x,H as E}from"./p-CQrwlULd.js";import{S as j}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{S as A}from"./p-c7MCfTgE.js";import{D as T,r as N}from"./p-wtuY7MT2.js";import{f as C}from"./p-BS7OgSQe.js";import{P as I,a as D,b as S}from"./p-DkoufM1t.js";import{H as L}from"./p-zNSPsvs3.js";import{H as z,b as O,h as R,i as _}from"./p-nrZ9yHcl.js";import{H as U}from"./p-C-2kW6Al.js";import{J as B,c as Y}from"./p-C01zp4xw.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as G,a as F,b as Q}from"./p-Cjcsf8ku.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as V,a as H}from"./p-D2muobcE.js";import{C as Z}from"./p-CVhnuewz.js";import{C as q}from"./p-ZpPDShvP.js";import"./p-BYsgavgS.js";import"./p-Bx3wyDU2.js";var W;!function(t){t.UNAVAILABLE="UNAVAILABLE",t.SESSION_ERROR="SESSION_ERROR",t.MERCHANT_VALIDATION_ERROR="MERCHANT_VALIDATION_ERROR",t.PAYMENT_PROCESSING_ERROR="PAYMENT_PROCESSING_ERROR",t.USER_CANCELLED="USER_CANCELLED"}(W||(W={}));class J{constructor(){this.api=o()}initialize(t){if(this.applePayConfig=new a(t),!this.applePayConfig.isValid)throw new Error("Invalid Apple Pay configuration provided")}async validateMerchant(t,e){try{return await this.api.post({endpoint:"apple_pay/merchant_session",authToken:t,headers:{"Sub-Account":e},body:{domain:window.location.host,display_name:this.applePayConfig.displayName}})}catch(t){throw console.error("Backend validation failed:",t),new Error("Merchant validation failed")}}async processPayment(t,e,i){const n=await this.api.post({endpoint:"apple_pay/process_token",authToken:t,body:i,headers:{"Sub-Account":e}});return{success:n.id&&!!n.data.token,data:n}}isAvailable(){return r.isApplePaySupported()&&r.canMakePayments()}async canMakePaymentsWithActiveCard(){if(!this.applePayConfig)throw new Error("Apple Pay not initialized. Call initialize() first.");return await r.canMakePaymentsWithActiveCard(this.applePayConfig.merchantIdentifier)}async startPaymentSession(t,e,i){if(!this.applePayConfig)throw console.error("[ApplePayService] Missing applePayConfig. Did you call initialize()?"),new Error("Apple Pay not initialized. Call initialize() first.");const n=new l(t);if(!n.isValid){const t=[];throw n.countryCode||t.push("countryCode"),n.currencyCode||t.push("currencyCode"),n.merchantCapabilities&&0!==n.merchantCapabilities.length||t.push("merchantCapabilities"),n.supportedNetworks&&0!==n.supportedNetworks.length||t.push("supportedNetworks"),n.total&&n.total.label&&n.total.amount||t.push("total"),console.error("[ApplePayService] Payment request is invalid. Missing/invalid:",t),new Error("Invalid payment request provided")}return this.currentPaymentRequest=n,new Promise(((t,s)=>{try{if("undefined"==typeof window||!("ApplePaySession"in window))return console.error("[ApplePayService] ApplePaySession not available on window"),s({success:!1,error:{code:W.UNAVAILABLE,message:"ApplePaySession API is not available in this environment"}});this.currentSession=new window.ApplePaySession(3,n),this.setupSessionEventHandlers(t,s,e,i),this.currentSession.begin()}catch(t){console.error("[ApplePayService] Exception while starting session:",t),s({success:!1,error:{code:W.SESSION_ERROR,message:t instanceof Error?t.message:"Failed to start Apple Pay session"}})}}))}abortPaymentSession(){this.currentSession&&(this.currentSession.abort(),this.currentSession=void 0,this.currentPaymentRequest=void 0)}setupSessionEventHandlers(t,e,i,n){this.currentSession&&this.applePayConfig&&this.currentPaymentRequest?(this.currentSession.onvalidatemerchant=async()=>{try{if(!i)throw console.error("[ApplePayService] Missing authToken for merchant validation"),new Error("Authentication token not provided.");const t=await this.validateMerchant(i,n);try{this.currentSession.completeMerchantValidation(t)}catch(t){throw console.error("Error calling completeMerchantValidation:",t),t}}catch(t){console.error("=== MERCHANT VALIDATION ERROR ==="),console.error("Error during merchant validation:",t),t&&t.stack&&console.error("Error stack:",t.stack),this.currentSession.abort(),e({success:!1,error:{code:W.MERCHANT_VALIDATION_ERROR,message:t instanceof Error?t.message:"Merchant validation failed"}})}},this.currentSession.onpaymentauthorized=async s=>{try{const o=s.payment,a=Object.assign(Object.assign({},o.token),{product_details:{name:this.currentPaymentRequest.total.label,price:r.parseAmount(this.currentPaymentRequest.total.amount),description:this.currentPaymentRequest.total.label}}),l=await this.processPayment(i,n,a);l.success?(this.currentSession.completePayment({status:c.STATUS_SUCCESS}),t({success:!0,token:o.token,paymentMethodId:l.data.id})):(console.error("PSP reported payment failure:",l.data),this.currentSession.completePayment({status:c.STATUS_FAILURE}),e({success:!1,error:{code:W.PAYMENT_PROCESSING_ERROR,message:"Payment processing failed"}}))}catch(t){console.error("=== PAYMENT PROCESSING ERROR ==="),console.error("Error processing payment:",t),t&&t.stack&&console.error("Error stack:",t.stack),this.currentSession.completePayment({status:c.STATUS_FAILURE}),e({success:!1,error:{code:W.PAYMENT_PROCESSING_ERROR,message:t instanceof Error?t.message:"Payment processing failed"}})}finally{this.currentSession=void 0,this.currentPaymentRequest=void 0}},this.currentSession.onpaymentmethodselected=()=>{const t={newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]};try{this.currentSession.completePaymentMethodSelection(t)}catch(t){console.error("Error completing payment method selection:",t),this.currentSession.abort()}},this.currentSession.onshippingmethodselected=()=>{this.currentSession.completeShippingMethodSelection({status:c.STATUS_SUCCESS,newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]})},this.currentSession.oncancel=t=>{if(t.sessionError)switch(console.error(t.sessionError),t.sessionError.code){case"unknown":console.error("Unknown error - likely merchant validation issue"),console.error("This usually means:"),console.error("1. Merchant certificate is invalid or expired"),console.error("2. Merchant identifier mismatch"),console.error("3. Backend validation endpoint issues");break;case"invalidMerchantSession":console.error("Invalid merchant session provided"),console.error("Check that the merchant session from backend is valid");break;case"userCancel":console.error("User cancelled the payment");break;default:console.error("Other error code:",t.sessionError.code)}this.currentSession=void 0,this.currentPaymentRequest=void 0,e({success:!1,error:{code:W.USER_CANCELLED,message:"User cancelled the Apple Pay session"}})},"onerror"in this.currentSession&&(this.currentSession.onerror=t=>{console.error("=== APPLE PAY SESSION ERROR ==="),console.error("Session error:",t),this.currentSession=void 0,this.currentPaymentRequest=void 0,e({success:!1,error:{code:W.SESSION_ERROR,message:"Apple Pay session error occurred"}})})):console.error("[ApplePayService] setupSessionEventHandlers called without required state",{hasSession:Boolean(this.currentSession),hasConfig:Boolean(this.applePayConfig),hasPaymentRequest:Boolean(this.currentPaymentRequest)})}static createPaymentRequest(t,e,i="US",n="USD"){return{countryCode:i,currencyCode:n,merchantCapabilities:r.getDefaultMerchantCapabilities(),supportedNetworks:r.getDefaultSupportedNetworks(),total:r.createLineItem(e,t)}}getApplePayConfig(){return this.applePayConfig}}const X=e=>{const{isLoading:i}=e;return i?t("div",{class:"container-fluid p-0"},t("div",{class:"row mb-3"},t("div",{class:"col-12 align-content-center"},t(A,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null},$=e=>t("div",{class:"apple-pay-button-container"},t("button",Object.assign({class:(()=>{let t="apple-pay-button";switch(e.buttonStyle){case h.WHITE:t+=" apple-pay-button-white";break;case h.WHITE_OUTLINE:t+=" apple-pay-button-white-outline";break;default:t+=" apple-pay-button-black"}switch(e.buttonType){case d.BUY:t+=" apple-pay-button-type-buy";break;case d.DONATE:t+=" apple-pay-button-type-donate";break;default:t+=" apple-pay-button-type-plain"}return(e.disabled||e.isProcessing||!e.isAvailable)&&(t+=" disabled"),t})(),style:{width:e.width,height:e.height},onClick:()=>{!e.disabled&&!e.isProcessing&&e.isAvailable&&e.clickHandler&&e.clickHandler()},disabled:e.disabled||e.isProcessing||!e.isAvailable,"aria-label":"Pay with Apple Pay",type:"button"},e),e.isProcessing&&t("div",{class:"processing-overlay"},t("div",{class:"spinner"}),t("span",null,"Processing..."))),t("style",null,"\n .apple-pay-button-container {\n display: block;\n position: relative;\n width: 100%;\n }\n\n /* Apple Pay CSS classes - these are the official Apple Pay button styles */\n .apple-pay-button {\n display: inline-block;\n -webkit-appearance: -apple-pay-button;\n -apple-pay-button-type: plain; /* default */\n -apple-pay-button-style: black; /* default */\n border-radius: 8px;\n cursor: pointer;\n border: none;\n outline: none;\n transition: opacity 0.2s ease;\n position: relative;\n }\n\n /* Button styles */\n .apple-pay-button.apple-pay-button-black {\n -apple-pay-button-style: black;\n }\n\n .apple-pay-button.apple-pay-button-white {\n -apple-pay-button-style: white;\n }\n\n .apple-pay-button.apple-pay-button-white-outline {\n -apple-pay-button-style: white-outline;\n }\n\n /* Button types */\n .apple-pay-button.apple-pay-button-type-plain {\n -apple-pay-button-type: plain;\n }\n\n .apple-pay-button.apple-pay-button-type-buy {\n -apple-pay-button-type: buy;\n }\n\n .apple-pay-button.apple-pay-button-type-donate {\n -apple-pay-button-type: donate;\n }\n\n /* Hover and disabled states */\n .apple-pay-button:hover:not(.disabled) {\n opacity: 0.9;\n }\n\n .apple-pay-button.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n /* Processing overlay */\n .processing-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: rgba(0, 0, 0, 0.8);\n color: white;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n }\n\n .spinner {\n width: 16px;\n height: 16px;\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-top: 2px solid #fff;\n border-radius: 50%;\n animation: spin 1s linear infinite;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n\n /* Responsive design */\n @media (max-width: 480px) {\n .apple-pay-button {\n width: 100% !important;\n min-width: 200px;\n }\n }\n ")),K=class{constructor(t){e(this,t),this.applePayStarted=i(this,"applePayStarted"),this.applePayCompleted=i(this,"applePayCompleted"),this.applePayCancelled=i(this,"applePayCancelled"),this.applePayError=i(this,"applePayError"),this.countryCode="US",this.merchantIdentifier="merchant.com.staging-justifi.checkout-dev",this.merchantDisplayName="JustiFi Checkout",this.initiativeContext="dev-checkout.justifi-staging.com",this.buttonType=d.PLAIN,this.buttonStyle=h.BLACK,this.disabled=!1,this.showSkeleton=!0,this.width="100%",this.height="48px",this.isLoading=!0,this.isProcessing=!1,this.isAvailable=!1,this.canMakePayments=!1,this.isConfigValid=!0,this.error=null,this.handleApplePayClick=async()=>{var t,e;if(!this.isProcessing&&!this.disabled&&this.isAvailable)try{this.isProcessing=!0,this.error=null,this.applePayStarted.emit();const i={countryCode:this.countryCode,currencyCode:p.paymentCurrency,merchantCapabilities:[u.SUPPORTS_3DS,u.SUPPORTS_CREDIT,u.SUPPORTS_DEBIT],supportedNetworks:r.getDefaultSupportedNetworks(),total:r.createLineItem(p.paymentDescription,p.paymentAmount)},n=await this.applePayService.startPaymentSession(i,p.authToken,p.accountId);n.success?this.applePayCompleted.emit({success:!0,token:n.token,paymentMethodId:n.paymentMethodId}):(this.applePayCompleted.emit({success:!1,error:n.error}),this.applePayError.emit({error:(null===(t=n.error)||void 0===t?void 0:t.message)||"Payment failed",code:(null===(e=n.error)||void 0===e?void 0:e.code)||K.ErrorCode.PAYMENT_FAILED}))}catch(t){const e=t instanceof Error?t.message:"Payment failed";this.error=e,this.applePayError.emit({error:e,code:K.ErrorCode.PAYMENT_FAILED}),this.applePayCompleted.emit({success:!1,error:e})}finally{this.isProcessing=!1}}}async initializeApplePay(){try{if(this.isLoading=!0,this.error=null,this.isConfigValid=!0,!(Boolean(p.paymentAmount)&&Boolean(p.paymentCurrency)&&Boolean(p.authToken)))return this.error="Missing required Apple Pay configuration",this.isConfigValid=!1,console.error("Apple Pay config error: missing required values",{paymentAmount:p.paymentAmount,paymentCurrency:p.paymentCurrency,hasAuthToken:Boolean(p.authToken),accountId:p.accountId}),this.applePayError.emit({error:this.error,code:K.ErrorCode.CONFIG_ERROR}),void(this.isLoading=!1);if(this.isAvailable=r.isApplePaySupported(),this.canMakePayments=r.canMakePayments(),!this.isAvailable)return this.error="Apple Pay is not supported on this device",console.error(this.error),this.applePayError.emit({error:this.error,code:K.ErrorCode.NOT_SUPPORTED}),void(this.isLoading=!1);if(!this.canMakePayments)return this.error="Apple Pay is not available",console.error(this.error),this.applePayError.emit({error:this.error,code:K.ErrorCode.NOT_AVAILABLE}),void(this.isLoading=!1);const t={merchantIdentifier:this.merchantIdentifier,displayName:this.merchantDisplayName,initiative:"web",initiativeContext:this.initiativeContext,buttonType:this.buttonType,buttonStyle:this.buttonStyle};this.applePayService=new J,this.applePayService.initialize(t),await this.applePayService.canMakePaymentsWithActiveCard()||console.warn("No Apple Pay cards available, but continuing...")}catch(t){console.error("Apple Pay initialization error:",t),this.error=t instanceof Error?t.message:"Failed to initialize Apple Pay",this.applePayError.emit({error:this.error,code:K.ErrorCode.INITIALIZATION_ERROR})}finally{this.isLoading=!1}}async isSupported(){return this.isAvailable&&this.canMakePayments}async getPaymentMethods(){return this.isAvailable?r.getDefaultSupportedNetworks():[]}async abort(){this.applePayService.abortPaymentSession(),this.isProcessing=!1,this.applePayCancelled.emit()}render(){if(!p.applePayEnabled)return null;const e=!this.isLoading&&this.isAvailable&&this.canMakePayments&&this.isConfigValid;return t(j,null,p.checkoutLoaded&&t("script",{async:!0,src:"https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",onLoad:()=>{this.initializeApplePay()}}),t("div",{class:"apple-pay-container"},t(X,{isLoading:this.isLoading}),e&&t($,{buttonType:this.buttonType,buttonStyle:this.buttonStyle,disabled:this.disabled,isProcessing:this.isProcessing,isAvailable:this.isAvailable,clickHandler:this.handleApplePayClick,width:this.width,height:this.height})),t("style",null,"\n .apple-pay-container {\n width: 100%;\n }\n "))}};K.ErrorCode={CONFIG_ERROR:"CONFIG_ERROR",NOT_SUPPORTED:"NOT_SUPPORTED",NOT_AVAILABLE:"NOT_AVAILABLE",INITIALIZATION_ERROR:"INITIALIZATION_ERROR",PAYMENT_FAILED:"PAYMENT_FAILED"};const tt=class{constructor(t){e(this,t)}render(){return t(j,{key:"3ebaf90f9085614d44043d9b5ba7de3f926bf6f1"},t("section",{key:"888ea6f17ece8e78b7ddf9302be5b1b355cd54c6"},t("div",{key:"bb7db155a31ceb9e824c5290b8fb8d8713622bdd"},t("div",{key:"dc954f18e824dabfb09fc727aeb87685020e2d1e",part:T},null==p?void 0:p.paymentDescription),t("div",{key:"e7f6b12c142655fc967bd6a37e00193b9f743f84"},t("span",{key:"25996f66626d428385422d72f5e2bba1a8301628",part:T},"Total")," ",t("span",{key:"958bd1242ac23e13e66b73563d2c6f73499d2574",part:T},C(+(null==p?void 0:p.totalAmount)))))))}};class et{constructor(){this.api=o()}initialize(t){if(this.googlePayConfig=new y(t),!this.googlePayConfig.isValid)throw new Error("Invalid Google Pay configuration provided");if(this.googlePayClient=g.createGooglePayClient(this.googlePayConfig.environment),!this.googlePayClient)throw new Error("Failed to create Google Pay client")}async processPayment(t,e,i){try{const n=await this.api.post({endpoint:"google_pay/process_token",authToken:t,body:i,headers:{"sub-account":e}});return{success:n.id&&!!n.data.token,data:n}}catch(t){throw new Error("Google Pay payment processing failed")}}isAvailable(){return g.isGooglePaySupported()&&!!this.googlePayClient}async canMakePayments(){if(!this.googlePayClient||!this.googlePayConfig)return!1;try{const t=g.createBasePaymentDataRequest();return(await this.googlePayClient.isReadyToPay(t)).result}catch(t){return!1}}async startPaymentSession(t,e,i){var n;if(!this.googlePayConfig||!this.googlePayClient)throw new Error("Google Pay not initialized. Call initialize() first.");if(!this.isAvailable())throw new Error("Google Pay is not available on this device/browser");const s=new b(t);if(!s.isValid)throw new Error("Invalid payment data request provided");try{const t=await this.googlePayClient.loadPaymentData(s),o=null===(n=null==t?void 0:t.paymentMethodData)||void 0===n?void 0:n.tokenizationData,a=(()=>{if((null==o?void 0:o.token)&&"string"==typeof o.token)try{return JSON.parse(o.token)}catch(t){return o}return o})(),r={protocolVersion:null==a?void 0:a.protocolVersion,signature:null==a?void 0:a.signature,intermediateSigningKey:(null==a?void 0:a.intermediateSigningKey)?{signedKey:a.intermediateSigningKey.signedKey,signatures:a.intermediateSigningKey.signatures}:void 0,signedMessage:null==a?void 0:a.signedMessage},l=await this.processPayment(e,i,r);return l.success?{success:!0,paymentData:t,paymentMethodId:l.data.id}:{success:!1,error:{code:"PAYMENT_PROCESSING_ERROR",message:"Payment processing failed"}}}catch(t){if(t&&"object"==typeof t&&"statusCode"in t){const e=t;switch(e.statusCode){case"CANCELED":return{success:!1,error:{code:"USER_CANCELLED",message:"User cancelled the Google Pay session"}};case"DEVELOPER_ERROR":return{success:!1,error:{code:"DEVELOPER_ERROR",message:"Google Pay configuration error"}};default:return{success:!1,error:{code:"PAYMENT_ERROR",message:e.statusMessage||"Google Pay payment failed"}}}}return{success:!1,error:{code:"PAYMENT_ERROR",message:t instanceof Error?t.message:"Google Pay payment failed"}}}}createButton(t){if(!this.googlePayClient||!this.googlePayConfig)return null;try{return this.googlePayClient.createButton({onClick:t.onClick,buttonType:t.buttonType,buttonSizeMode:t.buttonSizeMode,buttonColor:t.buttonColor,buttonLocale:t.buttonLocale})}catch(t){return null}}prefetchPaymentData(t){if(!this.googlePayClient)return;const e=new b(t);if(e.isValid)try{this.googlePayClient.prefetchPaymentData(e)}catch(t){}}static createPaymentDataRequest(t,e,i="US",n="USD",s){return{apiVersion:2,apiVersionMinor:0,allowedPaymentMethods:[g.createPaymentMethodData()],transactionInfo:{countryCode:i,currencyCode:n,totalPriceStatus:"FINAL",totalPrice:g.formatAmount(t),totalPriceLabel:e},merchantInfo:{merchantName:s}}}getGooglePayConfig(){return this.googlePayConfig}getGooglePayClient(){return this.googlePayClient}}const it=e=>{const{isLoading:i}=e;return i?t("div",{class:"container-fluid p-0"},t("div",{class:"row mb-3"},t("div",{class:"col-12 align-content-center"},t(A,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null},nt=e=>t("div",{class:"google-pay-button-container"},t("button",Object.assign({class:(()=>{let t="google-pay-button";switch(t+=e.buttonStyle===f.WHITE?" google-pay-button-white":" google-pay-button-black",e.buttonType){case v.BUY:t+=" google-pay-button-type-buy";break;case v.BOOK:t+=" google-pay-button-type-book";break;case v.CHECKOUT:t+=" google-pay-button-type-checkout";break;case v.DONATE:t+=" google-pay-button-type-donate";break;case v.ORDER:t+=" google-pay-button-type-order";break;case v.PAY:t+=" google-pay-button-type-pay";break;case v.SUBSCRIBE:t+=" google-pay-button-type-subscribe";break;default:t+=" google-pay-button-type-plain"}return t+=e.buttonSizeMode===m.FILL?" google-pay-button-fill":" google-pay-button-static",(e.disabled||e.isProcessing||!e.isAvailable)&&(t+=" disabled"),t})(),style:(()=>{const t={};return e.buttonSizeMode===m.FILL?(t.width="100%",t.minWidth="200px"):t.width=e.width||"200px",t.height=e.height||"48px",t})(),onClick:()=>{!e.disabled&&!e.isProcessing&&e.isAvailable&&e.clickHandler&&e.clickHandler()},disabled:e.disabled||e.isProcessing||!e.isAvailable,"aria-label":"Google Pay",type:"button"},e),e.isProcessing&&t("div",{class:"processing-overlay"},t("div",{class:"spinner"}),t("span",null,"Processing...")),t("div",{class:"google-pay-button-content"},t("svg",{width:"41",height:"17",xmlns:"http://www.w3.org/2000/svg"},t("g",{fill:"none","fill-rule":"evenodd"},t("path",{d:"M19.526 2.635v4.083h2.518c.6 0 1.096-.202 1.488-.605.403-.402.605-.882.605-1.437 0-.544-.202-1.018-.605-1.422-.392-.413-.888-.62-1.488-.62h-2.518zm0 5.52v4.736h-1.504V1.198h3.99c1.013 0 1.873.337 2.582 1.012.72.675 1.08 1.497 1.08 2.466 0 .991-.36 1.819-1.08 2.482-.697.665-1.559.996-2.583.996h-2.485v.001zm7.668 2.287c0 .392.166.718.499.98.332.26.722.391 1.168.391.633 0 1.196-.234 1.692-.701.497-.469.744-1.019.744-1.65-.469-.37-1.123-.555-1.962-.555-.61 0-1.12.148-1.528.442-.409.294-.613.657-.613 1.093m1.946-5.815c1.112 0 1.989.297 2.633.89.642.594.964 1.408.964 2.442v4.932h-1.439v-1.11h-.065c-.622.914-1.45 1.372-2.486 1.372-.882 0-1.621-.262-2.215-.784-.594-.523-.891-1.176-.891-1.96 0-.828.313-1.486.94-1.976s1.463-.735 2.51-.735c.892 0 1.629.163 2.206.49v-.344c0-.522-.207-.966-.621-1.33a2.132 2.132 0 0 0-1.455-.547c-.84 0-1.504.353-1.995 1.062l-1.324-.834c.73-1.045 1.81-1.568 3.238-1.568m11.853.262l-5.02 11.53H34.42l1.864-4.034-3.302-7.496h1.635l2.387 5.749h.032l2.322-5.75z",fill:"#FFF"}),t("path",{d:"M13.448 7.134c0-.473-.04-.93-.116-1.366H6.988v2.588h3.634a3.11 3.11 0 0 1-1.344 2.042v1.68h2.169c1.27-1.17 2.001-2.9 2.001-4.944",fill:"#4285F4"}),t("path",{d:"M6.988 13.7c1.816 0 3.344-.595 4.459-1.621l-2.169-1.681c-.603.406-1.38.643-2.29.643-1.754 0-3.244-1.182-3.776-2.774H.978v1.731a6.728 6.728 0 0 0 6.01 3.703",fill:"#34A853"}),t("path",{d:"M3.212 8.267a4.034 4.034 0 0 1 0-2.572V3.964H.978A6.678 6.678 0 0 0 .261 6.98c0 1.085.26 2.11.717 3.017l2.234-1.731z",fill:"#FABB05"}),t("path",{d:"M6.988 2.921c.992 0 1.88.34 2.58 1.008v.001l1.92-1.918C10.324.928 8.804.262 6.989.262a6.728 6.728 0 0 0-6.01 3.702l2.234 1.731c.532-1.592 2.022-2.774 3.776-2.774",fill:"#E94235"}))))),t("style",null,"\n .google-pay-button-container {\n display: block;\n position: relative;\n }\n\n .google-pay-button {\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-size: 14px;\n font-weight: 500;\n letter-spacing: 0.25px;\n line-height: 16px;\n outline: none;\n padding: 0 20px;\n position: relative;\n min-width: 140px;\n min-height: 48px;\n }\n\n /* Button styles */\n .google-pay-button.google-pay-button-black {\n background-color: #000;\n color: #fff;\n }\n\n .google-pay-button.google-pay-button-white {\n background-color: #fff;\n color: #3c4043;\n }\n\n /* Button content */\n .google-pay-button-content {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n white-space: nowrap;\n }\n\n .google-g-logo {\n width: 20px;\n height: 20px;\n flex-shrink: 0;\n }\n\n .pay-text {\n font-family: 'Google Sans', arial, sans-serif;\n font-size: 14px;\n font-weight: 500;\n margin-left: 8px;\n }\n\n /* Button types - text content handled by ::before pseudo-element */\n .google-pay-button-type-buy .google-pay-button-content::before {\n content: 'Buy with';\n margin-right: 8px;\n }\n\n .google-pay-button-type-book .google-pay-button-content::before {\n content: 'Book with';\n margin-right: 8px;\n }\n\n .google-pay-button-type-checkout .google-pay-button-content::before {\n content: 'Checkout with';\n margin-right: 8px;\n }\n\n .google-pay-button-type-donate .google-pay-button-content::before {\n content: 'Donate with';\n margin-right: 8px;\n }\n\n .google-pay-button-type-order .google-pay-button-content::before {\n content: 'Order with';\n margin-right: 8px;\n }\n\n .google-pay-button-type-pay .google-pay-button-content::before {\n content: 'Pay with';\n margin-right: 8px;\n }\n\n .google-pay-button-type-subscribe .google-pay-button-content::before {\n content: 'Subscribe with';\n margin-right: 8px;\n }\n\n /* Size modes */\n .google-pay-button.google-pay-button-fill {\n width: 100%;\n min-width: 200px;\n }\n\n .google-pay-button.google-pay-button-static {\n width: auto;\n }\n\n /* Hover and focus states */\n .google-pay-button:hover:not(.disabled) {\n box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.15), 0 1px 3px 1px rgba(0, 0, 0, 0.30);\n }\n\n .google-pay-button:focus:not(.disabled) {\n box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.15), 0 1px 3px 1px rgba(0, 0, 0, 0.30);\n }\n\n .google-pay-button:active:not(.disabled) {\n box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.15), 0 1px 3px 1px rgba(0, 0, 0, 0.30);\n transform: translateY(1px);\n }\n\n /* Disabled state */\n .google-pay-button.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n box-shadow: none;\n }\n\n .google-pay-button.disabled:hover,\n .google-pay-button.disabled:focus,\n .google-pay-button.disabled:active {\n box-shadow: none;\n transform: none;\n }\n\n /* Processing overlay */\n .processing-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: rgba(0, 0, 0, 0.8);\n color: white;\n border-radius: 4px;\n font-size: 14px;\n font-weight: 500;\n }\n\n .spinner {\n width: 16px;\n height: 16px;\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-top: 2px solid #fff;\n border-radius: 50%;\n animation: spin 1s linear infinite;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n\n /* Responsive design */\n @media (max-width: 480px) {\n .google-pay-button {\n width: 100% !important;\n min-width: 200px;\n }\n }\n ")),st=class{constructor(t){e(this,t),this.googlePayCancelled=i(this,"googlePayCancelled"),this.googlePayCompleted=i(this,"googlePayCompleted"),this.googlePayStarted=i(this,"googlePayStarted"),this.unsubscribes=[],this.canMakePayments=!1,this.error=null,this.isAvailable=!1,this.isLoading=!0,this.isProcessing=!1,this.buttonSizeMode=m.FILL,this.buttonStyle=f.BLACK,this.buttonType=v.PLAIN,this.countryCode="US",this.disabled=!1,this.environment=M.PRODUCTION,this.merchantId="gateway:justifi",this.merchantName="justifi",this.showSkeleton=!0,this.handleGooglePayClick=async()=>{var t;if(!this.isProcessing&&!this.disabled&&this.isAvailable&&this.canMakePayments)try{this.isProcessing=!0,this.error=null,this.googlePayStarted.emit();const e=this.createPaymentDataRequest(),i=await this.googlePayService.startPaymentSession(e,p.authToken,p.accountId);i.success?this.googlePayCompleted.emit({success:!0,paymentData:i.paymentData,paymentMethodId:i.paymentMethodId}):(this.googlePayCompleted.emit({success:!1,error:i.error}),"USER_CANCELLED"===(null===(t=i.error)||void 0===t?void 0:t.code)&&this.googlePayCancelled.emit())}catch(t){const e=t instanceof Error?t.message:"Payment failed";this.error=e,this.googlePayCompleted.emit({success:!1,error:e})}finally{this.isProcessing=!1}}}watchConfigChange(){this.initializeGooglePay()}componentWillLoad(){this.googlePayService=new et}componentDidLoad(){const t=w("paymentAmount",(()=>{this.prefetchPaymentData()}));"function"==typeof t&&this.unsubscribes.push(t);const e=w("paymentCurrency",(()=>{this.prefetchPaymentData()}));"function"==typeof e&&this.unsubscribes.push(e);const i=w("paymentDescription",(()=>{this.prefetchPaymentData()}));"function"==typeof i&&this.unsubscribes.push(i)}disconnectedCallback(){this.unsubscribes.forEach((t=>{try{t()}catch(t){}})),this.unsubscribes=[]}async getSupportedAuthMethods(){return this.isAvailable?g.getDefaultAuthMethods():[]}async getSupportedNetworks(){return this.isAvailable?g.getDefaultSupportedNetworks():[]}async handleSelectionClick(){p.selectedPaymentMethod={type:I.GOOGLE_PAY}}async isSupported(){return this.isAvailable&&this.canMakePayments}async prefetchPaymentData(){if(!this.isAvailable||!this.canMakePayments)return;const t=this.createPaymentDataRequest();this.googlePayService.prefetchPaymentData(t)}async initializeGooglePay(){try{if(this.isLoading=!0,this.error=null,!p.paymentAmount)return this.error="Missing required Google Pay configuration",void(this.isLoading=!1);if(this.googlePayService.initialize({environment:this.environment,merchantId:this.merchantId,merchantName:this.merchantName,buttonType:this.buttonType,buttonStyle:this.buttonStyle,buttonSizeMode:this.buttonSizeMode}),this.isAvailable=this.googlePayService.isAvailable(),!this.isAvailable)return this.error="Google Pay is not supported on this device",void(this.isLoading=!1);if(this.canMakePayments=await this.googlePayService.canMakePayments(),!this.canMakePayments)return this.error="Google Pay is not available for payments",void(this.isLoading=!1);const t=this.createPaymentDataRequest();this.googlePayService.prefetchPaymentData(t)}catch(t){this.error=t instanceof Error?t.message:"Failed to initialize Google Pay"}finally{this.isLoading=!1}}createPaymentDataRequest(){return et.createPaymentDataRequest(p.paymentAmount,p.paymentDescription,this.countryCode,p.paymentCurrency,this.merchantName)}render(){const e=!this.isLoading&&!!this.error,i=!this.isLoading&&!this.error&&!this.isAvailable,n=!this.isLoading&&!this.error&&this.isAvailable&&!this.canMakePayments,s=!this.isLoading&&!this.error&&this.isAvailable&&this.canMakePayments;return t(j,{key:"d85684b123cdba175d68a2e216f9150780ac7cf9"},p.checkoutLoaded&&t("script",{key:"b78bb8980d670e5b66cb907f89cee6ff2238205c",async:!0,src:"https://pay.google.com/gp/p/js/pay.js",onLoad:()=>{this.initializeGooglePay()}}),t("div",{key:"e405efb3a164be9e1d9db5beeb3c01471b647aaf",class:"google-pay-container"},t(it,{key:"c17dbb3e305678a1da10e3741ff0b610c549be6e",isLoading:this.isLoading}),e&&t("div",{key:"726895b7c76f3edbbbb1930a317d826b8f8f11fd",class:"google-pay-error",role:"alert","data-testid":"gp-error"},t("span",{key:"23342ca70b6b5bf28f846ca519cc4fbfb065fc67",class:"error-icon"},"⚠️"),t("span",{key:"008315696bc7b7f78f69cfc80160dacabf1205b5",class:"error-message"},this.error)),i&&t("div",{key:"2e87b4a9e5d0c0201333b79b9c190ca14932391b",class:"google-pay-unavailable","data-testid":"gp-device-unavailable"},t("span",{key:"6db13fc44661500a964422d18550cb31e275f076",class:"unavailable-message"},"Google Pay is not available on this device")),n&&t("div",{key:"c2ca09e36652800092cc6bcbe4a351b0d604bae2",class:"google-pay-unavailable","data-testid":"gp-payments-unavailable"},t("span",{key:"a5e75ccbb269249327192b927a0df879d90aefe5",class:"unavailable-message"},"Google Pay is not available for payments")),s&&t(nt,{key:"a2af46b3970620491e5c005e2b57f7a6d6f06e2c","data-testid":"gp-button",buttonType:this.buttonType,buttonStyle:this.buttonStyle,buttonSizeMode:this.buttonSizeMode,disabled:this.disabled,isProcessing:this.isProcessing,isAvailable:this.isAvailable,clickHandler:this.handleGooglePayClick})),t("style",{key:"9890ac44c4f047484396e0b4ae0d04a31489e61f"},"\n .google-pay-container {\n width: 100%;\n }\n\n .google-pay-error {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px;\n background: #fef2f2;\n border: 1px solid #fecaca;\n border-radius: 8px;\n color: #dc2626;\n font-size: 14px;\n }\n\n .google-pay-unavailable {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 12px;\n background: #f9fafb;\n border: 1px solid #e5e7eb;\n border-radius: 8px;\n color: #6b7280;\n font-size: 14px;\n }\n\n .error-icon {\n font-size: 16px;\n }\n \n "))}static get watchers(){return{merchantId:["watchConfigChange"],environment:["watchConfigChange"]}}},ot=class{constructor(t){e(this,t),this.levels={h1:L,h2:z,h3:U},this.level="h1"}render(){return t(j,{key:"73104ea086f8a9948e69f86451adf19e0f39fb32"},t(this.levels[this.level],{key:"a8582109634299a24e2a9b3c7181c6bba511fde7",text:this.text,class:this.class}))}},at=o();class rt{async getLinkToken(t,e,i,n){return at.post({endpoint:`plaid/${e}/link`,body:{checkout_id:i},authToken:t,signal:n})}async tokenizeBankAccount(t,e,i,n,s,o){const a=`plaid/${e}/tokenize`,r={public_token:i};return n&&(r.link_token_id=n),s&&(r.payment_method_group_id=s),at.post({endpoint:a,body:r,authToken:t,signal:o})}}const lt=class{constructor(t){e(this,t),this.errorEvent=i(this,"error-event"),this.submitEvent=i(this,"submit-event"),this.checkoutChangedEvent=i(this,"checkout-changed"),this.plaidService=new rt,this.handleGooglePayCompleted=t=>{const{success:e,paymentMethodId:i,error:n}=t.detail||{};e&&i?(p.paymentToken=i,p.selectedPaymentMethod={type:I.GOOGLE_PAY},this.submitCheckout()):this.errorEvent.emit({message:n&&n.message||"Google Pay payment failed",errorCode:F.TOKENIZE_ERROR,severity:G.ERROR})},this.handleGooglePayCancelled=()=>{p.paymentToken=void 0,p.selectedPaymentMethod=void 0},this.handleApplePayCompleted=t=>{const{success:e,token:i,paymentMethodId:n,error:s}=t.detail;e&&i?(p.paymentToken=n,p.selectedPaymentMethod={type:I.APPLE_PAY},this.submitCheckout()):(console.error("Apple Pay completed but failed:",s),this.errorEvent.emit({message:(null==s?void 0:s.message)||"Apple Pay payment failed",errorCode:F.TOKENIZE_ERROR,severity:G.ERROR}))},this.handleApplePayError=t=>{const{error:e,code:i}=t.detail;console.error("Apple Pay error:",e),this.errorEvent.emit({message:e||"Apple Pay error occurred",errorCode:`APPLE_PAY_${i}`,severity:G.ERROR})},this.handleApplePayCancelled=()=>{p.paymentToken=void 0,p.selectedPaymentMethod=void 0}}connectedCallback(){this.observer=new MutationObserver((()=>{this.queryFormRefs(),this.setupApplePayListeners(),this.setupGooglePayListeners()})),this.observer.observe(this.hostEl,{childList:!0,subtree:!0}),p.checkoutId=this.checkoutId;const t={authToken:this.authToken,checkoutId:this.checkoutId,service:new Z};this.getCheckout=(({authToken:t,checkoutId:e,service:i})=>async({onSuccess:n,onError:s})=>{var o;try{const a=await i.fetchCheckout(t,e);if(a.error)return s({error:H(a.error),code:V(null===(o=a.error)||void 0===o?void 0:o.code),severity:G.ERROR});n({checkout:a.data})}catch(t){const e=V(null==t?void 0:t.code);return s({error:t.message||t,code:e,severity:G.ERROR})}})(t),this.completeCheckout=(({authToken:t,checkoutId:e,service:i})=>async({payment:n,onSuccess:s,onError:o})=>{var a;try{const r=await i.complete(t,e,n);if(r.error)return o({error:H(r.error),code:V(null===(a=r.error)||void 0===a?void 0:a.code),severity:G.ERROR});s({checkout:r.data})}catch(t){const e=V(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:G.ERROR})}})(t),k((()=>{this.emitCheckoutChanged()}))}componentWillLoad(){this.analytics=new B(this),Y(),p.authToken=this.authToken,this.fetchCheckout(),O("set",(t=>{const e=_[t];void 0!==e&&R(t,e)&&this.fetchCheckout()}))}componentDidLoad(){this.queryFormRefs(),this.setupApplePayListeners(),this.setupGooglePayListeners()}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect(),this.removeApplePayListeners(),this.removeGooglePayListeners()}fetchCheckout(){this.authToken&&this.checkoutId?this.getCheckout&&this.getCheckout({onSuccess:({checkout:t})=>{this.updateStore(t),t.status!==P.completed?t.status!==P.expired||this.errorEvent.emit({message:Q.CHECKOUT_EXPIRED,errorCode:F.CHECKOUT_EXPIRED,severity:G.ERROR}):this.errorEvent.emit({message:Q.CHECKOUT_ALREADY_COMPLETED,errorCode:F.CHECKOUT_ALREADY_COMPLETED,severity:G.ERROR})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:t.code,severity:t.severity})}}):this.errorEvent.emit({message:Q.NOT_AUTHENTICATED,errorCode:F.NOT_AUTHENTICATED,severity:G.ERROR})}updateStore(t){var e,i,n,s,o,a,r;p.accountId=t.account_id,p.checkoutLoaded=!0,p.paymentMethods=t.payment_methods.map((t=>new D(t))),p.paymentMethodGroupId=t.payment_method_group_id,p.paymentDescription=t.payment_description,p.totalAmount=t.total_amount,p.paymentAmount=t.payment_amount,p.bnplEnabled=t.payment_settings.bnpl_payments,p.insuranceEnabled=t.payment_settings.insurance_payments,p.bankAccountVerification=null===(e=t.payment_settings)||void 0===e?void 0:e.bank_account_verification,p.applePayEnabled=null===(i=t.payment_settings)||void 0===i?void 0:i.apple_payments,p.googlePayEnabled=null===(n=t.payment_settings)||void 0===n?void 0:n.google_payments,p.bnplProviderClientId=null===(s=null==t?void 0:t.bnpl)||void 0===s?void 0:s.provider_client_id,p.bnplProviderMode=null===(o=null==t?void 0:t.bnpl)||void 0===o?void 0:o.provider_mode,p.bnplProviderApiVersion=null===(a=null==t?void 0:t.bnpl)||void 0===a?void 0:a.provider_api_version,p.bnplProviderCheckoutUrl=null===(r=null==t?void 0:t.bnpl)||void 0===r?void 0:r.provider_checkout_url}emitCheckoutChanged(){const t={availablePaymentMethodTypes:x(),selectedPaymentMethod:p.selectedPaymentMethod,savedPaymentMethods:p.paymentMethods};this.checkoutChangedEvent.emit(t)}queryFormRefs(){this.billingFormRef=this.hostEl.querySelector("justifi-billing-form, justifi-bank-account-billing-form-simple, justifi-card-billing-form-simple, justifi-billing-form-full"),this.applePayRef=this.hostEl.querySelector("justifi-apple-pay"),this.googlePayRef=this.hostEl.querySelector("justifi-google-pay"),this.paymentMethodFormRef=this.hostEl.querySelector("justifi-card-form, justifi-bank-account-form, justifi-tokenize-payment-method"),this.insuranceFormRef=this.hostEl.querySelector("justifi-season-interruption-insurance")}setupApplePayListeners(){this.applePayRef&&(this.applePayRef.addEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.addEventListener("applePayError",this.handleApplePayError),this.applePayRef.addEventListener("applePayCancelled",this.handleApplePayCancelled))}removeApplePayListeners(){this.applePayRef&&(this.applePayRef.removeEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.removeEventListener("applePayError",this.handleApplePayError),this.applePayRef.removeEventListener("applePayCancelled",this.handleApplePayCancelled))}setupGooglePayListeners(){this.googlePayRef&&(this.googlePayRef.addEventListener("googlePayCompleted",this.handleGooglePayCompleted),this.googlePayRef.addEventListener("googlePayCancelled",this.handleGooglePayCancelled))}removeGooglePayListeners(){this.googlePayRef&&(this.googlePayRef.removeEventListener("googlePayCompleted",this.handleGooglePayCompleted),this.googlePayRef.removeEventListener("googlePayCancelled",this.handleGooglePayCancelled))}async tokenizePaymentMethod(t){var e,i,n;const s=null!==(i=await(null===(e=this.billingFormRef)||void 0===e?void 0:e.getValues()))&&void 0!==i?i:{},o=Object.assign(Object.assign({},t),s),a=Object.assign({accountId:p.accountId,payment_method_group_id:void 0},o);p.savePaymentMethod&&(a.payment_method_group_id=p.paymentMethodGroupId);const r=await(null===(n=this.paymentMethodFormRef)||void 0===n?void 0:n.tokenize({clientId:this.authToken,paymentMethodMetadata:a,account:p.accountId}));return r.error?r:(p.paymentToken=r.id,r.id)}async setSelectedPaymentMethod(t){p.selectedPaymentMethod=t,p.paymentToken=t.id||void 0}async validate(){var t,e;const i=[];p.insuranceEnabled&&this.insuranceFormRef&&i.push(this.insuranceFormRef.validate());const n=(null===(t=p.selectedPaymentMethod)||void 0===t?void 0:t.type)===I.NEW_CARD,s=(null===(e=p.selectedPaymentMethod)||void 0===e?void 0:e.type)===I.NEW_BANK_ACCOUNT;if((n||s)&&(this.paymentMethodFormRef&&i.push(this.paymentMethodFormRef.validate()),this.billingFormRef&&i.push(this.billingFormRef.validate())),0===i.length)return!0;try{return!!(await Promise.all(i)).every((t=>"boolean"==typeof t?t:!1!==(null==t?void 0:t.isValid)))||(this.errorEvent.emit({message:"Validation error",errorCode:F.VALIDATION_ERROR,severity:G.ERROR}),!1)}catch(t){return!1}}async submitCheckout(t){var e,i,n,s,o;const a=await this.validate();if(!p.selectedPaymentMethod)return void this.errorEvent.emit({message:"No payment method selected.",errorCode:F.VALIDATION_ERROR,severity:G.ERROR});const r=(null===(e=p.selectedPaymentMethod)||void 0===e?void 0:e.type)===I.NEW_CARD,l=(null===(i=p.selectedPaymentMethod)||void 0===i?void 0:i.type)===I.NEW_BANK_ACCOUNT,c=(null===(n=p.selectedPaymentMethod)||void 0===n?void 0:n.type)===I.PLAID;if(r||l){const e=await this.tokenizePaymentMethod(t);if(null==e?void 0:e.error)return void this.errorEvent.emit({message:e.error.message,errorCode:F.TOKENIZE_ERROR,severity:G.ERROR})}if(c&&!p.paymentToken){const t=p.plaidPublicToken,e=p.plaidLinkTokenId;if(!t)return void this.errorEvent.emit({message:"Missing Plaid public token. Please connect your bank.",errorCode:F.TOKENIZE_ERROR,severity:G.ERROR});try{const i=await this.plaidService.tokenizeBankAccount(p.authToken,p.accountId,t,e||void 0,p.savePaymentMethod?p.paymentMethodGroupId:void 0);if(null==i?void 0:i.error)return void this.errorEvent.emit({message:"string"==typeof i.error?i.error:i.error.message||"Failed to tokenize bank account",errorCode:F.TOKENIZE_ERROR,severity:G.ERROR});const n=null==i?void 0:i.data,o=(null===(s=null==n?void 0:n.bank_account)||void 0===s?void 0:s.token)||(null==n?void 0:n.token)||(null==n?void 0:n.id);p.paymentToken=o}catch(t){return void this.errorEvent.emit({message:(null==t?void 0:t.message)||"Plaid exchange error",errorCode:F.TOKENIZE_ERROR,severity:G.ERROR})}}if(!a)return void this.errorEvent.emit({message:"Please fill in all required fields.",errorCode:F.VALIDATION_ERROR,severity:G.ERROR});if(!p.paymentToken)return void this.errorEvent.emit({message:"Payment token not found.",errorCode:F.TOKENIZE_ERROR,severity:G.ERROR});let h;if(h={payment_mode:(t=>{switch(t){case I.NEW_CARD:case I.SAVED_CARD:case I.NEW_BANK_ACCOUNT:case I.SAVED_BANK_ACCOUNT:case I.PLAID:return S.ECOM;case I.SEZZLE:return S.BNPL;case I.APPLE_PAY:return S.APPLE_PAY;case I.GOOGLE_PAY:return S.GOOGLE_PAY;default:return}})(null===(o=p.selectedPaymentMethod)||void 0===o?void 0:o.type),payment_token:p.paymentToken},this.preCompleteHook){const t=E();try{await new Promise(((e,i)=>{this.preCompleteHook(t,(()=>e()),(()=>i()))}))}catch(t){return}}this.completeCheckout({payment:h,onSuccess:({checkout:t})=>{this.submitEvent.emit({checkout:t,message:"Checkout completed successfully"})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:F.COMPLETE_CHECKOUT_ERROR,severity:G.ERROR})}})}render(){return t(n,{key:"43f4be87e218b23251f2ccac90e0c980bf157d68"})}get hostEl(){return s(this)}};var ct;!function(t){t.PLAID_SDK_LOAD_FAILED="plaid-sdk-load-failed",t.PLAID_LINK_INIT_FAILED="plaid-link-init-failed",t.PLAID_LINK_TOKEN_FAILED="plaid-link-token-failed",t.PLAID_AUTHENTICATION_FAILED="plaid-authentication-failed",t.PLAID_BANK_NOT_SUPPORTED="plaid-bank-not-supported",t.PLAID_TOKEN_EXPIRED="plaid-token-expired",t.PLAID_NETWORK_ERROR="plaid-network-error",t.PLAID_USER_CANCELLED="plaid-user-cancelled",t.PLAID_TIMEOUT="plaid-timeout",t.PLAID_INVALID_CREDENTIALS="plaid-invalid-credentials",t.PLAID_ACCOUNT_LOCKED="plaid-account-locked",t.PLAID_MAINTENANCE="plaid-maintenance",t.PLAID_RATE_LIMITED="plaid-rate-limited"}(ct||(ct={}));const ht={[ct.PLAID_SDK_LOAD_FAILED]:"Unable to load Plaid. Please refresh the page and try again.",[ct.PLAID_LINK_INIT_FAILED]:"Unable to initialize bank connection. Please try again.",[ct.PLAID_LINK_TOKEN_FAILED]:"Unable to connect to bank service. Please try again.",[ct.PLAID_AUTHENTICATION_FAILED]:"Bank authentication failed. Please try again.",[ct.PLAID_BANK_NOT_SUPPORTED]:"Your bank is not currently supported. Please try a different payment method.",[ct.PLAID_TOKEN_EXPIRED]:"Your bank session has expired. Please reconnect your account.",[ct.PLAID_NETWORK_ERROR]:"Network connection issue. Please check your internet connection and try again.",[ct.PLAID_USER_CANCELLED]:"Bank connection was cancelled. Click to try again.",[ct.PLAID_TIMEOUT]:"Bank connection timed out. Please try again.",[ct.PLAID_INVALID_CREDENTIALS]:"Invalid bank credentials. Please check your username and password.",[ct.PLAID_ACCOUNT_LOCKED]:"Your bank account is temporarily locked. Please contact your bank.",[ct.PLAID_MAINTENANCE]:"Bank service is temporarily unavailable. Please try again later.",[ct.PLAID_RATE_LIMITED]:"Too many connection attempts. Please wait a moment and try again."},dt={[ct.PLAID_SDK_LOAD_FAILED]:G.ERROR,[ct.PLAID_LINK_INIT_FAILED]:G.ERROR,[ct.PLAID_LINK_TOKEN_FAILED]:G.ERROR,[ct.PLAID_AUTHENTICATION_FAILED]:G.ERROR,[ct.PLAID_BANK_NOT_SUPPORTED]:G.WARNING,[ct.PLAID_TOKEN_EXPIRED]:G.WARNING,[ct.PLAID_NETWORK_ERROR]:G.WARNING,[ct.PLAID_USER_CANCELLED]:G.INFO,[ct.PLAID_TIMEOUT]:G.WARNING,[ct.PLAID_INVALID_CREDENTIALS]:G.ERROR,[ct.PLAID_ACCOUNT_LOCKED]:G.ERROR,[ct.PLAID_MAINTENANCE]:G.WARNING,[ct.PLAID_RATE_LIMITED]:G.WARNING},pt=class{constructor(t){e(this,t),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected"),this.plaidError=i(this,"plaidError"),this.plaidErrorRecovered=i(this,"plaidErrorRecovered"),this.isAuthenticating=!1,this.publicToken=null,this.linkToken=null,this.linkTokenId=null,this.error=null,this.plaidLink=null,this.isSelected=!1,this.retryCount=0,this.isRetrying=!1,this.plaidService=new rt,this.maxRetries=3,this.retryDelay=2e3,this.timeoutId=null,this.abortController=null,this.hasLoggedDisabledWarning=!1,this.waitForStoreAndInitialize=()=>{p.authToken&&p.accountId&&p.checkoutId?this.initializePlaidLink():setTimeout((()=>{this.waitForStoreAndInitialize()}),100)},this.initializePlaidLink=async()=>{try{if(void 0===window.Plaid)return void this.handleError({code:ct.PLAID_SDK_LOAD_FAILED,message:ht[ct.PLAID_SDK_LOAD_FAILED],severity:dt[ct.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"});if(await this.getLinkToken(),!this.linkToken)return void this.handleError({code:ct.PLAID_LINK_TOKEN_FAILED,message:ht[ct.PLAID_LINK_TOKEN_FAILED],severity:dt[ct.PLAID_LINK_TOKEN_FAILED],retryable:!0,userAction:"Click to try again"});const t=window.Plaid;this.plaidLink=t.create({token:this.linkToken,onSuccess:this.handlePlaidSuccess,onExit:this.handlePlaidExit,onEvent:this.handlePlaidEvent,onLoad:this.handlePlaidLoad})}catch(t){this.handleError({code:ct.PLAID_LINK_INIT_FAILED,message:ht[ct.PLAID_LINK_INIT_FAILED],severity:dt[ct.PLAID_LINK_INIT_FAILED],originalError:t,retryable:!0,userAction:"Click to try again"})}},this.getLinkToken=async()=>{var t,e,i,n,s;try{if(!p.authToken||!p.accountId)return void this.handleError({code:ct.PLAID_LINK_TOKEN_FAILED,message:"Missing authentication. Please refresh the page and try again.",severity:G.ERROR,retryable:!1,userAction:"Refresh the page"});this.abortController=new AbortController,this.timeoutId=setTimeout((()=>{var t;null===(t=this.abortController)||void 0===t||t.abort()}),3e4);const e=await this.plaidService.getLinkToken(p.authToken,p.accountId,p.checkoutId,this.abortController.signal);if(this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),e.error)throw new Error("string"==typeof e.error?e.error:e.error.message||"Failed to get link token");this.linkToken=e.data.link_token,this.linkTokenId=(null==e?void 0:e.id)||(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)||null,this.linkTokenId&&(p.plaidLinkTokenId=this.linkTokenId)}catch(t){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null);let o=ct.PLAID_LINK_TOKEN_FAILED,a=ht[o],r=!0;"AbortError"===t.name?(o=ct.PLAID_TIMEOUT,a=ht[o],r=!0):(null===(e=t.message)||void 0===e?void 0:e.includes("network"))||(null===(i=t.message)||void 0===i?void 0:i.includes("fetch"))?(o=ct.PLAID_NETWORK_ERROR,a=ht[o],r=!0):((null===(n=t.message)||void 0===n?void 0:n.includes("401"))||(null===(s=t.message)||void 0===s?void 0:s.includes("unauthorized")))&&(o=ct.PLAID_INVALID_CREDENTIALS,a="Authentication failed. Please refresh the page and try again.",r=!1),this.handleError({code:o,message:a,severity:dt[o],originalError:t,retryable:r,userAction:r?"Click to try again":"Refresh the page"})}},this.mapApiErrorToPlaidError=t=>{if("string"==typeof t){if(t.includes("rate_limit"))return ct.PLAID_RATE_LIMITED;if(t.includes("maintenance"))return ct.PLAID_MAINTENANCE;if(t.includes("not_authenticated"))return ct.PLAID_INVALID_CREDENTIALS}if(null==t?void 0:t.code)switch(t.code){case"rate_limited":return ct.PLAID_RATE_LIMITED;case"maintenance":return ct.PLAID_MAINTENANCE;case"not_authenticated":return ct.PLAID_INVALID_CREDENTIALS;default:return ct.PLAID_LINK_TOKEN_FAILED}return ct.PLAID_LINK_TOKEN_FAILED},this.openPlaidLink=()=>{this.plaidLink&&this.linkToken&&(this.isAuthenticating=!0,this.clearError(),this.plaidLink.open())},this.handlePlaidSuccess=t=>{this.publicToken=t,this.isAuthenticating=!1,this.clearError(),this.retryCount=0,this.isSelected||(this.isSelected=!0,p.selectedPaymentMethod={type:I.PLAID}),this.plaidErrorRecovered.emit({code:"plaid-success",message:"Bank account connected successfully",severity:G.INFO}),p.plaidPublicToken=t},this.handlePlaidExit=t=>{this.isAuthenticating=!1,t&&this.handlePlaidError(t)},this.handlePlaidEvent=(t,e)=>{switch(t){case"OPEN":this.isAuthenticating=!0;break;case"CLOSE":this.isAuthenticating=!1;break;case"ERROR":this.handlePlaidError(e)}},this.handlePlaidLoad=()=>{},this.handlePlaidError=t=>{let e=ct.PLAID_AUTHENTICATION_FAILED,i=ht[e],n=!0,s="Click to try again";if(t.error_code)switch(t.error_code){case"INVALID_CREDENTIALS":e=ct.PLAID_INVALID_CREDENTIALS,i=ht[e],n=!0;break;case"ITEM_LOGIN_REQUIRED":e=ct.PLAID_INVALID_CREDENTIALS,i="Your bank requires re-authentication. Please try again.",n=!0;break;case"ITEM_LOCKED":e=ct.PLAID_ACCOUNT_LOCKED,i=ht[e],n=!1,s="Contact your bank";break;case"INSTITUTION_NOT_RESPONDING":e=ct.PLAID_MAINTENANCE,i=ht[e],n=!0;break;case"RATE_LIMIT_EXCEEDED":e=ct.PLAID_RATE_LIMITED,i=ht[e],n=!0;break;case"INVALID_REQUEST":e=ct.PLAID_AUTHENTICATION_FAILED,i="Invalid request. Please try again.",n=!0;break;case"PLAID_ERROR":e=ct.PLAID_AUTHENTICATION_FAILED,i=t.error_message||"Bank authentication failed. Please try again.",n=!0;break;default:t.error_message&&(i=t.error_message)}if(t.error_message){const o=t.error_message.toLowerCase();o.includes("not supported")||o.includes("unsupported")?(e=ct.PLAID_BANK_NOT_SUPPORTED,i=ht[e],n=!1,s="Try a different payment method"):(o.includes("expired")||o.includes("timeout"))&&(e=ct.PLAID_TOKEN_EXPIRED,i=ht[e],n=!0)}this.handleError({code:e,message:i,severity:dt[e],originalError:t,retryable:n,userAction:s}),this.isAuthenticating=!1},this.handleError=t=>{this.error=t,this.plaidError.emit({code:t.code,message:t.message,severity:t.severity,data:{originalError:t.originalError,retryable:t.retryable,userAction:t.userAction,retryCount:this.retryCount}}),console.error("Plaid error:",t),t.retryable&&this.retryCount<this.maxRetries&&this.scheduleRetry()},this.scheduleRetry=()=>{this.isRetrying||(this.isRetrying=!0,this.retryCount++,setTimeout((()=>{this.isRetrying=!1,this.clearError(),this.waitForStoreAndInitialize()}),this.retryDelay*this.retryCount))},this.clearError=()=>{this.error&&(this.error=null,this.retryCount=0)},this.syncWithStore=()=>{var t;const e=(null===(t=p.selectedPaymentMethod)||void 0===t?void 0:t.type)===I.PLAID;this.isSelected!==e&&(this.isSelected=e)}}onSelectionChange(t){var e;t&&(null===(e=p.selectedPaymentMethod)||void 0===e?void 0:e.type)!==I.PLAID&&(p.selectedPaymentMethod={type:I.PLAID}),!t||!this.plaidLink||this.publicToken||this.isAuthenticating||this.error||this.openPlaidLink()}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.waitForStoreAndInitialize()},this.scriptRef.onerror=()=>{this.handleError({code:ct.PLAID_SDK_LOAD_FAILED,message:ht[ct.PLAID_SDK_LOAD_FAILED],severity:dt[ct.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"})})}componentWillLoad(){var t;this.isSelected=(null===(t=p.selectedPaymentMethod)||void 0===t?void 0:t.type)===I.PLAID}async resolvePaymentMethod(){return this.publicToken?{token:this.publicToken,data:{type:"bank_account",plaid_public_token:this.publicToken}}:{validationError:!0}}async getPaymentToken(){return p.paymentToken}async handleSelectionClick(){if(this.isSelected=!0,p.selectedPaymentMethod={type:I.PLAID},this.error)return this.clearError(),void this.waitForStoreAndInitialize();!this.plaidLink||this.publicToken||this.isAuthenticating||this.openPlaidLink()}async setSelected(t){this.isSelected=t,t&&(p.selectedPaymentMethod={type:I.PLAID})}async isCurrentlySelected(){return this.isSelected}async deselect(){this.isSelected=!1}async reset(){this.publicToken=null,this.clearError(),this.isAuthenticating=!1,this.linkToken=null,this.plaidLink=null,this.retryCount=0,this.isRetrying=!1,this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.abortController&&(this.abortController.abort(),this.abortController=null)}async isReadyForAuthentication(){return!(!this.plaidLink||!this.linkToken||this.isAuthenticating)}async retry(){this.error&&this.error.retryable&&(this.clearError(),this.waitForStoreAndInitialize())}async getErrorInfo(){return this.error}componentDidLoad(){const t=w("selectedPaymentMethod",this.syncWithStore);this.unsubscribeFromStore=t}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),this.timeoutId&&clearTimeout(this.timeoutId),this.abortController&&this.abortController.abort()}render(){if(!0!==p.bankAccountVerification)return this.hasLoggedDisabledWarning||(console.warn("[PlaidPaymentMethod] bank_account_verification is disabled. Component will not render."),this.hasLoggedDisabledWarning=!0),null;const e=t("img",{class:"plaid-logo-img",src:"data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ4IiB2aWV3Qm94PSIwIDAgMjggMjkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgY2xhc3M9ImNzcy0xcmRhajhtIj48ZyBmaWxsPSIjMTExIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yNS43NjI5IDI2LjI2MjhMMjggMTcuNTMwOUwyNC45NjkxIDE0LjUwMDFMMjcuOTk5OSAxMS40NjkxTDI1Ljc2MjggMi43MzcwNkwxNy4wMzA5IDAuNUwxNC4wMDAxIDMuNTMxTDEwLjk2OSAwLjUwMDE0TDIuMjM3MDYgMi43MzczNEwwIDExLjQ2OTFMMy4wMzEyOCAxNC40OTk5TDAuMDAwMTQgMTcuNTMxTDIuMjM3MiAyNi4yNjI5TDEwLjk2OTEgMjguNUwxNC4wMDAxIDI1LjQ2OUwxNy4wMzEgMjguNDk5OUwyNS43NjI5IDI2LjI2MjhaTTE1LjczMjEgMjMuNzM3MUwxOC42MTg2IDIwLjg1MDVMMjIuMjkxMiAyNC41MjMzTDE3LjY5NTYgMjUuNzAwN0wxNS43MzIxIDIzLjczNzFaTTExLjExMzYgOS44ODE1NEwxNC4wMDAzIDYuOTk1MDJMMTYuODg2OCA5Ljg4MTRMMTQuMDAwMSAxMi43Njc5TDExLjExMzYgOS44ODE1NFpNMTIuMjY4MiAxNC41TDkuMzgxNTQgMTcuMzg2NUw2LjQ5NTAyIDE0LjVMOS4zODE1NCAxMS42MTM1TDEyLjI2ODIgMTQuNVpNMTguNjE4NyAxMS42MTMzTDIxLjUwNTMgMTQuNUwxOC42MTg2IDE3LjM4NjVMMTUuNzMyMSAxNC41TDE4LjYxODcgMTEuNjEzM1pNMTYuODg2NyAxOS4xMTg2TDE0LjAwMDEgMjIuMDA1MUwxMS4xMTM1IDE5LjExODVMMTQuMDAwMSAxNi4yMzE5TDE2Ljg4NjcgMTkuMTE4NlpNMTAuMzA0NCAyNS43MDA3TDUuNzA4NjQgMjQuNTIzM0w5LjM4MTU0IDIwLjg1MDRMMTIuMjY4MiAyMy43MzcxTDEwLjMwNDQgMjUuNzAwN1pNNC43NjMwOCAxNi4yMzE5TDcuNjQ5NiAxOS4xMTg1TDMuOTc2NyAyMi43OTE0TDIuNzk5MyAxOC4xOTU3TDQuNzYzMDggMTYuMjMxOVpNMy45NzY3IDYuMjA4MzZMNy42NDk3NCA5Ljg4MTRMNC43NjMwOCAxMi43NjgxTDIuNzk5MyAxMC44MDQxTDMuOTc2NyA2LjIwODM2Wk0xMi4yNjgzIDUuMjYyOTRMOS4zODE2OCA4LjE0OTZMNS43MDg5MiA0LjQ3NjdMMTAuMzA0NyAzLjI5OTNMMTIuMjY4MyA1LjI2Mjk0Wk0xNy42OTU5IDMuMjk5M0wyMi4yOTE1IDQuNDc2N0wxOC42MTg2IDguMTQ5NDZMMTUuNzMyMSA1LjI2Mjk0TDE3LjY5NTkgMy4yOTkzWk0yMy4yMzcyIDEyLjc2ODFMMjAuMzUwNSA5Ljg4MTRMMjQuMDIzMyA2LjIwODc4TDI1LjIwMDcgMTAuODA0NkwyMy4yMzcyIDEyLjc2ODFaTTI0LjAyMzMgMjIuNzkxNEwyMC4zNTA1IDE5LjExODZMMjMuMjM3MiAxNi4yMzIxTDI1LjIwMDcgMTguMTk1N0wyNC4wMjMzIDIyLjc5MTRaIj48L3BhdGg+PC9nPjwvc3ZnPgo=",alt:"Plaid",title:"Plaid",style:{display:"inline",width:"20px",height:"20px",marginLeft:"5px",marginTop:"-2px"}});return t(j,{class:"payment-method"},t("script",{src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",async:!0,ref:t=>this.scriptRef=t}),t("div",{title:"Pay with Plaid"},t("div",{onClick:t=>{t.preventDefault(),this.handleSelectionClick()}},"Pay with Bank Account ",e," "),(()=>this.error?t("div",{class:(this.error.severity===G.ERROR?"text-danger":this.error.severity===G.WARNING?"text-warning":"text-info")+" mt-2"},t("small",null,this.error.message),t("br",null),t("small",{class:"text-muted"},this.error.userAction,this.error.retryable&&this.retryCount<this.maxRetries&&t("span",null," • Auto-retry in progress..."))):null)(),(()=>this.error?null:this.isAuthenticating?t("div",{class:"text-info mt-2"},t("small",null,"Connecting to your bank...")):this.publicToken?t("div",{class:"text-success mt-2"},t("small",null,"✓ Bank account connected successfully")):!this.isSelected||this.publicToken||this.error||this.isAuthenticating?null:t("div",{class:"text-muted mt-2"},t("small",null,"Click to connect your bank account")))()))}static get watchers(){return{isSelected:["onSelectionChange"]}}},ut=class{constructor(t){e(this,t),this.onPaymentMethodOptionClick=t=>e=>{e.preventDefault(),p.selectedPaymentMethod={id:t.id,type:t.type},p.paymentToken=t.id},this.isAllowedPaymentMethod=t=>!(t===I.SAVED_CARD&&p.disableCreditCard||t===I.SAVED_BANK_ACCOUNT&&p.disableBankAccount)}componentWillLoad(){p.paymentMethods.length||console.warn("No saved payment methods available."),p.disablePaymentMethodGroup&&console.warn("Payment method group is disabled.")}render(){return p.disablePaymentMethodGroup?null:t(j,null,t("div",{class:"saved-payment-methods"},p.paymentMethods.length?p.paymentMethods.filter((t=>this.isAllowedPaymentMethod(t.type))).map((e=>t("div",{class:"radio-list-item p-3",part:N,onClick:this.onPaymentMethodOptionClick(e)},t("form-control-radio",{name:"paymentMethodType",value:null==e?void 0:e.id,checked:p.paymentToken===(null==e?void 0:e.id),label:`${q[null==e?void 0:e.brand]||""} *${null==e?void 0:e.acct_last_four}`})))):null))}},yt=t("img",{class:"sezzle-smart-button-logo-img",src:"https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg",alt:"Sezzle",style:{display:"inline",width:"80px",marginLeft:"5px",marginTop:"-5px"}}),gt=class{constructor(t){e(this,t),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected"),this.paymentMethodOptionId=I.SEZZLE,this.initializeSezzleCheckout=()=>{let t;this.sezzlePromise=new Promise((e=>{t=e}));const e=Number(p.paymentAmount),i=new(0,window.Checkout)({mode:"popup",publicKey:p.bnplProviderClientId,apiMode:p.bnplProviderMode,apiVersion:p.bnplProviderApiVersion});i.sezzleButtonElement=this.sezzleButtonRef,i.init({onClick:function(t){t.preventDefault(),i.startCheckout({checkout_url:p.bnplProviderCheckoutUrl})},onComplete:e=>t({bnpl:e.data}),onCancel:e=>t({bnpl:e.data}),onFailure:e=>t({bnpl:e.data})}),this.sezzleCheckout=i,this.installmentPlan=this.sezzleCheckout.getInstallmentPlan(e)}}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.sezzleButtonRef=document.createElement("button"),this.initializeSezzleCheckout()})}async resolvePaymentMethod(t){return t.isValid?(this.sezzleButtonRef.click(),this.sezzlePromise):{validationError:!0}}async handleSelectionClick(){p.selectedPaymentMethod={type:I.SEZZLE},this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId)}render(){var e,i;return p.bnplEnabled?t(j,{class:"payment-method"},t("script",{src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:t=>this.scriptRef=t}),t("div",null,t("div",null,"Buy now, pay later with ",yt),this.installmentPlan&&t("small",null,t("span",null,null===(e=this.installmentPlan)||void 0===e?void 0:e.installments.length)," ",t("span",null,this.installmentPlan.schedule," payments of")," ",t("span",{class:"fw-bold"},C(null===(i=this.installmentPlan)||void 0===i?void 0:i.installments[0].amountInCents))))):(console.warn("justifi-sezzle-payment-method: BNPL is not enabled for this account."),null)}};export{K as justifi_apple_pay,tt as justifi_checkout_summary,st as justifi_google_pay,ot as justifi_header,lt as justifi_modular_checkout,pt as justifi_plaid_payment_method,ut as justifi_saved_payment_methods,gt as justifi_sezzle_payment_method}
@@ -0,0 +1 @@
1
+ import{h as s,r as t,c as i}from"./p-DwYM91AU.js";import{c as r,F as e}from"./p-DiJD6Iqx.js";import{b as o,a,c as h}from"./p-dgG_o6wN.js";import{i as p,a as n,b as l,c as m}from"./p-D1WQG4I7.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as c,a as d}from"./p-Cjcsf8ku.js";import"./p-CQrwlULd.js";import"./p-CLHwhyvu.js";import{C as j,B as u,b as f}from"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{c as v,J as b}from"./p-C01zp4xw.js";import{B as w}from"./p-Bqlcv3ZV.js";import{S as g}from"./p-BP2sTIQV.js";import{H as C}from"./p-zNSPsvs3.js";import"./p-CZfYo5-1.js";import{S as y}from"./p-c7MCfTgE.js";import{B}from"./p-XYgDHrVL.js";import{m as x,b as S}from"./p-5aA7gjr5.js";import{B as D}from"./p-Dy5btfGV.js";import"./p-BFTU3MAI.js";import"./p-avgjSJ1d.js";import"./p-DfKxeSrC.js";import"./p-CPpUGsw5.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-DkoufM1t.js";import"./p-Bx3wyDU2.js";import"./p-C8yN3uBj.js";import"./p-wtuY7MT2.js";import"./p-D2muobcE.js";const k=r(Object.assign(Object.assign({},o().fields),{legal_address:n(),additional_questions:a(),representative:p("representative")}));r(Object.assign(Object.assign({},h().fields),{legal_address:m(),additional_questions:a(),representative:l("representative")}));const O=k,I=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(y,{width:"25%"})),s("div",{class:"col-12"},s(y,{width:"100%"})),s("div",{class:"col-12 d-flex gap-3"},s(y,{width:"50%"}),s(y,{width:"50%"})),s("div",{class:"col-12 d-flex gap-3"},s(y,{width:"65%"}),s(y,{width:"35%"}))),U=()=>s("div",{class:"row gap-5"},s("div",{class:"col-12"},s(y,{width:"40%",height:"40px"})),s(I,null),s(I,null),s(I,null)),_=class{constructor(s){t(this,s),this.submitEvent=i(this,"submit-event"),this.clickEvent=i(this,"click-event"),this.errorEvent=i(this,"error-event"),this.isLoading=!1,this.isSaving=!1,this.country=j.USA,this.hideErrors=!1,this.formTitle="Business Information",this.removeTitle=!1,this.instantiateBusiness=s=>{const t=new u(s);this.country=t.country_of_establishment,this.formController.setInitialValues(Object.assign({},t))},this.sendData=async()=>{this.isSaving=!0;const s=this.formController.values.getValue(),t=this.formController.getInitialValues(),i=new u(Object.assign(Object.assign({},t),s)).payload;this.patchBusiness({payload:i,onSuccess:s=>{this.handleReponse(s)},onError:({error:s,code:t,severity:i})=>{this.errorMessage=s.message,this.errorEvent.emit({errorCode:t,message:s.message,severity:i})},final:()=>{this.isSaving=!1}})},this.validateAndSubmit=s=>{s.preventDefault(),this.formController.validateAndSubmit(this.sendData)}}componentWillLoad(){v(),this.analytics=new b(this),this.formController=new e(O),this.initializeApi()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}get title(){return this.removeTitle?"":this.formTitle}get disabledState(){return this.isSaving}get businessEndpoint(){return`entities/business/${this.businessId}`}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=x({authToken:this.authToken,businessId:this.businessId,service:new D}),this.patchBusiness=S({authToken:this.authToken,businessId:this.businessId,service:new D}),this.getBusiness({onSuccess:s=>{this.instantiateBusiness(s.data)},onError:({error:s,code:t,severity:i})=>{this.errorMessage=s.message,this.errorEvent.emit({errorCode:t,message:s.message,severity:i})},final:()=>{this.isLoading=!1}})):this.errorEvent.emit({message:"auth-token and business-id are required",errorCode:d.MISSING_PROPS,severity:c.ERROR})}handleReponse(s){s.error&&(this.errorMessage=f.patchData),this.submitEvent.emit({response:s}),this.instantiateBusiness(s.data)}render(){return s(g,null,this.isLoading?s(U,null):s("form",{onSubmit:this.validateAndSubmit},s("div",{class:"row gap-3"},s(C,{text:this.title}),s("form-alert",{text:this.errorMessage,hideAlert:this.hideErrors}),s("div",{class:"col-12 mb-4"},s("justifi-business-core-info",{formController:this.formController,country:this.country})),s("div",{class:"col-12 mb-4"},s("justifi-legal-address-form",{formController:this.formController,country:this.country})),s("div",{class:"col-12 mb-4"},s("justifi-additional-questions",{formController:this.formController})),s("div",{class:"col-12 mb-4"},s("justifi-business-representative",{formController:this.formController,country:this.country})),s("div",{class:"col-12 d-flex flex-row-reverse"},s(w,{type:"submit",disabled:this.disabledState,variant:"primary",onClick:()=>this.clickEvent.emit({name:B.submit}),isLoading:this.isSaving},"Submit")))))}};export{_ as justifi_business_form}
@@ -0,0 +1 @@
1
+ import{h as t,r as e,c as a}from"./p-DwYM91AU.js";import{c as i}from"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as s,a as o}from"./p-Cjcsf8ku.js";import{i as r}from"./p-CQrwlULd.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-C01zp4xw.js";import{g as d,a as h}from"./p-D2muobcE.js";import{P as l}from"./p-BKM7YeAB.js";import{T as f,l as u,a as m,b,c as y,d as w,e as _,f as T,g as j,h as g,i as v,j as k,k as C}from"./p-BTzt8N0l.js";import{S as D}from"./p-BP2sTIQV.js";import{T as S}from"./p-CZfYo5-1.js";import{a as P}from"./p-BS7OgSQe.js";import{S as I,T as B}from"./p-wtuY7MT2.js";import"./p-BYsgavgS.js";import"./p-DkoufM1t.js";import"./p-Bx3wyDU2.js";import"./p-C8yN3uBj.js";import"./p-B-0a8Xqm.js";const q={id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of each transaction"},"ID"),account_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the account associated with each transaction"},"Account ID"),payout_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the payout associated with each transaction"},"Payout ID"),financial_transaction_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),amount:()=>t("th",{part:I,scope:"col",title:"The dollar amount of each transaction"},"Amount"),fee:()=>t("th",{part:I,scope:"col",title:"The fee associated with each transaction"},"Fee"),net:()=>t("th",{part:I,scope:"col",title:"The net amount of each transaction"},"Net"),currency:()=>t("th",{part:I,scope:"col",title:"The currency of each transaction"},"Currency"),description:()=>t("th",{part:I,scope:"col",title:"The description of each transaction"},"Description"),source_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),txn_type:()=>t("th",{part:I,scope:"col",title:"The type of each transaction"},"Type"),created_at:()=>t("th",{part:I,scope:"col",title:"The date and time each transaction was made"},"Processed On"),available_on:()=>t("th",{part:I,scope:"col",title:"The date and time each transaction will be available"},"Available On"),updated_at:()=>t("th",{part:I,scope:"col",title:"The date and time each transaction was last updated"},"Updated On")},x={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"},O={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)},x[e.txn_type]),created_at:e=>t("td",{part:B(e.created_at)},t("div",{class:"fw-bold"},P(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},P(e.created_at,{showTime:!0}))),available_on:e=>t("td",{part:B(e.available_on)},t("div",{class:"fw-bold"},P(e.available_on,{showDisplayDate:!0})),t("div",{class:"fw-bold"},P(e.available_on,{showTime:!0}))),updated_at:e=>t("td",{part:B(e.updated_at)},t("div",{class:"fw-bold"},P(e.updated_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},P(e.updated_at,{showTime:!0})))},A=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,O),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:i,onSuccess:o,onError:c,final:n})=>{var p;try{const n=await a.fetchPayoutTransactions(t,e,i);n.error?c({error:h(n.error),code:d(null===(p=n.error)||void 0===p?void 0:p.code),severity:s.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:s.ERROR})}finally{n()}})({accountId:i.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,s.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(D,{key:"9d34174c78f860f915141a2b78fe09f5b1e35ab8"},t(u,{key:"c8e1ee03298bce29dabdad92cc7579905e7a4257"},t(m,{key:"cecf982b4fa569819f5512dc433c274976285f1c"},t(b,{key:"5c2e0670b996008483a98a5ff1f63d58214d93af"},t(y,{key:"8d609b97cf28b499edf3c63cdfbb37a6c7ef01f1"},this.transactionsTable.columnData.map((t=>t)))),t(w,{key:"f2bede3aaefda8d56e15fc97606d665fc4f5c581"},t(_,{key:"e2316bf5827ac9b07ad601315bcb176f9cd72df0",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(T,{key:"17f8dcca75c1090fa622b5addd941397d00159c4",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(j,{key:"29a4ef787dbcd87f52d32c6fb486509fe1b82520",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(g,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(v,{key:"8e5177f727babae229bce44f45c35356bb79c25e"},t(k,{key:"39a59ab0ebbe1af53fead55d1d68980ceca37313"},t(C,{key:"72bb73b8064b8110635caf5d9a92e9aae352612e",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"5b7ea31cd08c9a33cf017ca3da3681151896b0cb",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],payoutId:["propChanged"],authToken:["propChanged"]}}};export{A as justifi_payout_transactions_list}
@@ -1 +1 @@
1
- import{r as e,h as a}from"./p-DwYM91AU.js";import{u as t,a as s,b as l}from"./p-C77ElQ41.js";import{P as i,I as d}from"./p-CVaOFfrI.js";import{G as o,l as r,U as c,_ as n}from"./p-wtuY7MT2.js";import{c as f}from"./p-DfKxeSrC.js";import"./p-B5rtFhtR.js";const b=class{constructor(a){e(this,a),this.isEditingIdentification=!1,this.inputHandler=(e,a)=>{t(this.formController,{[e]:a})},this.onAddressFormUpdate=e=>{s(this.formController,Object.assign(Object.assign({},this.formController.values.getValue().address),e))}}render(){var e,s,b,u,m,h,p,v,y;return a("form",{key:"1a83fb932d4faad4def91d0f23860a761d819b4b"},a("fieldset",{key:"986e6cedd20f712a10d2de0e51cae2258107106e"},a("div",{key:"3367b1c686a63a1e17cc4bccf23f65031369d11b",class:"d-flex align-items-center gap-2"},a("legend",{key:"2d63acb9c5aabe4e63495f0760cb016991fd15c6",class:"mb-0",part:o},"Representative"),a("form-control-tooltip",{key:"193602ac61e012271ef25d18ec80a8b718856472",helpText:"The representative for your business needs to be someone who has significant control over managing your business’s finance. You will have an opportunity to add owners later in the form."})),a("hr",{key:"25527499226c33721bc0fdb418b495367b269b65",class:"mt-2"}),a("div",{key:"f160423cfeaad499329d536a158f6365153bf7f0",class:"row gy-3"},a("div",{key:"39a70eca42b7e7a23cf8247fb5911125465da6dd",class:"col-12 col-md-8"},a("form-control-text",{key:"2124c8121470e5ceefca7a024752af788a2e17a6",name:"name",label:"Full Name",defaultValue:null===(e=this.representativeDefaultValue)||void 0===e?void 0:e.name,errorText:this.errors.name,inputHandler:this.inputHandler})),a("div",{key:"6c8ac5169e22796f52b9959552600d1a8074f089",class:"col-12 col-md-4"},a("form-control-text",{key:"1b19885ec772c8288fe8c25ed2f2d60a0aaabd54",name:"title",label:"Title",defaultValue:null===(s=this.representativeDefaultValue)||void 0===s?void 0:s.title,errorText:this.errors.title,inputHandler:this.inputHandler,helpText:"Role at your business, e.g. President, CEO, Treasurer."})),a("div",{key:"450957573c4d8721cdaf9caa0bbc8fde9ce576d7",class:"col-12 col-md-6"},a("form-control-text",{key:"9e470fdfbc757e0ccf25cccd498e7db638d1f735",name:"email",label:"Email Address",defaultValue:null===(b=this.representativeDefaultValue)||void 0===b?void 0:b.email,errorText:this.errors.email,inputHandler:this.inputHandler})),a("div",{key:"1776f5a919e9d015938ce4adbd1dcc721e54171f",class:"col-12 col-md-6"},a("form-control-number-masked",{key:"dfccc56e5c4e522900db3c66335b91355a8ea9e7",name:"phone",label:"Phone Number",defaultValue:null===(u=this.representativeDefaultValue)||void 0===u?void 0:u.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:i.US})),a("div",{key:"a21afbd6fe25a1fd21d402ac55bc5c46c34ce7ca",class:"col-12 col-md-4"},a("form-control-date",{key:"3f449ef87db9487b2e314993ad12946f4317aef2",name:"dob_full",label:"Birth Date",defaultValue:null===(m=this.representativeDefaultValue)||void 0===m?void 0:m.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:e=>l(e,this.formController),helpText:"Must be 18 or older."})),a("div",{key:"ac114c5bac016be5b7440993b48b8b16bb93a06a",class:"col-12 col-md-8"},!(null===(h=this.representativeDefaultValue)||void 0===h?void 0:h.ssn_last4)||this.isEditingIdentification?a("form-control-number-masked",{name:"identification_number",label:f[this.country].idNumberLabel,defaultValue:this.isEditingIdentification?"":null===(p=this.representativeDefaultValue)||void 0===p?void 0:p.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:d[this.country],helpText:f[this.country].identityHelpText}):a("div",null,a("label",{class:"form-label",part:r},f[this.country].idNumberLabel),a("div",{class:"input-group mb-3"},a("input",{type:"text",class:"form-control",part:c,value:`****${null===(v=this.representativeDefaultValue)||void 0===v?void 0:v.ssn_last4}`,disabled:!0}),a("button",{class:"btn btn-secondary",type:"button",part:n,onClick:()=>{this.isEditingIdentification=!0,t(this.formController,{identification_number:"",ssn_last4:null})}},"Change")))),a("div",{key:"955bb98fdafe93be1ad56e1ed76b19abb5160ec5",class:"col-12"},a("justifi-identity-address-form",{key:"c32b6ffd80e9261567b3adcc4ac35ae8bf2e4d2f",errors:this.errors.address,defaultValues:null===(y=this.representativeDefaultValue)||void 0===y?void 0:y.address,handleFormUpdate:this.onAddressFormUpdate,country:this.country})))))}};export{b as justifi_business_representative_form_inputs}
1
+ import{r as e,h as a}from"./p-DwYM91AU.js";import{u as t,a as s,b as l}from"./p-C77ElQ41.js";import{P as i,I as o}from"./p-CVaOFfrI.js";import{G as d,l as r,U as c,_ as n}from"./p-wtuY7MT2.js";import{c as f}from"./p-DfKxeSrC.js";import"./p-B5rtFhtR.js";const b=class{constructor(a){e(this,a),this.isEditingIdentification=!1,this.inputHandler=(e,a)=>{t(this.formController,{[e]:a})},this.onAddressFormUpdate=e=>{s(this.formController,Object.assign(Object.assign({},this.formController.values.getValue().address),e))}}render(){var e,s,b,u,m,h,p,v,y;return a("form",{key:"7f2a20427197ce4f402c1b4b859839d506613769"},a("fieldset",{key:"fe71959a012c1961b6f91d98862ca4ea9411bf6d"},a("div",{key:"801fb53d33eeff75f82552da84210abfb1daa55d",class:"d-flex align-items-center gap-2"},a("legend",{key:"63486b252a7c4f71e944712a833a2edc762c1692",class:"mb-0",part:d},"Representative"),a("form-control-tooltip",{key:"9a22a232bb856c05ca8c75a0255ea8a2b33b8a80",helpText:"The representative for your business needs to be someone who has significant control over managing your business’s finance. You will have an opportunity to add owners later in the form."})),a("hr",{key:"b29a6dcd41991b2874cb64fc3cd058f3bcf10a48",class:"mt-2"}),a("div",{key:"52e2b29c6f915f50e1f33c19363657e657355b85",class:"row gy-3"},a("div",{key:"9531872c804ef3713c0778c6bff1d3ca589bb3d5",class:"col-12 col-md-8"},a("form-control-text",{key:"d1eedf80da0790767a6c294f084c4b9d4112b9cf",name:"name",label:"Full Name",defaultValue:null===(e=this.representativeDefaultValue)||void 0===e?void 0:e.name,errorText:this.errors.name,inputHandler:this.inputHandler})),a("div",{key:"b5effb996c7b97cd5a8815781474ea32e5bc37b6",class:"col-12 col-md-4"},a("form-control-text",{key:"554a6fe90a0c68a32ae7e6b0401e43a8a2d6c7fe",name:"title",label:"Title",defaultValue:null===(s=this.representativeDefaultValue)||void 0===s?void 0:s.title,errorText:this.errors.title,inputHandler:this.inputHandler,helpText:"Role at your business, e.g. President, CEO, Treasurer."})),a("div",{key:"6025d1b2b67120a9e9e25d0a6e3e352651759c62",class:"col-12 col-md-6"},a("form-control-text",{key:"ed758eafa726ee6801c16535fbba7d05886c21d5",name:"email",label:"Email Address",defaultValue:null===(b=this.representativeDefaultValue)||void 0===b?void 0:b.email,errorText:this.errors.email,inputHandler:this.inputHandler})),a("div",{key:"933650753a5fdc6f75db658baf536ce4033e0e6c",class:"col-12 col-md-6"},a("form-control-number-masked",{key:"81ba9debb6c8fd8225c67a0c0a6b8612e87fc3f0",name:"phone",label:"Phone Number",defaultValue:null===(u=this.representativeDefaultValue)||void 0===u?void 0:u.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:i.US})),a("div",{key:"913c766d6eb5fe5f132eafecba91145a6c418dae",class:"col-12 col-md-4"},a("form-control-date",{key:"c50e5ad2022906d753b783e7892be8322d80661c",name:"dob_full",label:"Birth Date",defaultValue:null===(m=this.representativeDefaultValue)||void 0===m?void 0:m.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:e=>l(e,this.formController),helpText:"Must be 18 or older."})),a("div",{key:"74492ad88a4962c2abfd04319880edb757d78796",class:"col-12 col-md-8"},!(null===(h=this.representativeDefaultValue)||void 0===h?void 0:h.ssn_last4)||this.isEditingIdentification?a("form-control-number-masked",{name:"identification_number",label:f[this.country].idNumberLabel,defaultValue:this.isEditingIdentification?"":null===(p=this.representativeDefaultValue)||void 0===p?void 0:p.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:o[this.country],helpText:f[this.country].identityHelpText}):a("div",null,a("label",{class:"form-label",part:r},f[this.country].idNumberLabel),a("div",{class:"input-group mb-3"},a("input",{type:"text",class:"form-control",part:c,value:`****${null===(v=this.representativeDefaultValue)||void 0===v?void 0:v.ssn_last4}`,disabled:!0}),a("button",{class:"btn btn-secondary",type:"button",part:n,onClick:()=>{this.isEditingIdentification=!0,t(this.formController,{identification_number:"",ssn_last4:null})}},"Change")))),a("div",{key:"dd27d90284c7eac1ec619622bf3e25b28360fe4c",class:"col-12"},a("justifi-identity-address-form",{key:"fa011614b624b6ad395f304552ff334d64d2c048",errors:this.errors.address,defaultValues:null===(y=this.representativeDefaultValue)||void 0===y?void 0:y.address,handleFormUpdate:this.onAddressFormUpdate,country:this.country})))))}};export{b as justifi_business_representative_form_inputs}
@@ -1 +1 @@
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:"d931098227eb3c8d2a1eb4dd10fd8ce93101f424"},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}
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:"b5a802e8c418b3b7f3235f43260186084a6ee079"},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,h as a}from"./p-DwYM91AU.js";import{r as s}from"./p-wtuY7MT2.js";import{S as e}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";const o=class{constructor(a){t(this,a)}render(){return a(e,{key:"14d6ac8af5445b9ac19b860d124a607fba0bc962",class:"payment-method"},a("div",{key:"5d046e75298cf90ad4a9377f1796b192b26cac28",class:"radio-list-item p-3",part:s,onClick:this.clickHandler,hidden:this.radioButtonHidden},a("form-control-radio",{key:"c70540030eb38833b854ca55b3b2f9c42fa2cb05",name:"paymentMethodType",value:this.paymentMethodOptionId,checked:this.isSelected,label:this.label})))}};export{o as payment_method_option}
@@ -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-C01zp4xw.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 f}from"./p-CQrwlULd.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{P as u}from"./p-DkoufM1t.js";import{S as m}from"./p-c7MCfTgE.js";import{B as b}from"./p-Bqlcv3ZV.js";import{r as p}from"./p-wtuY7MT2.js";import"./p-Bx3wyDU2.js";import"./p-C8yN3uBj.js";import"./p-BS7OgSQe.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:"b0501b66bcfdd697d88c01835b8f97fb2c0861ab"},i("div",{key:"ada4dda7868086b1ea4cadd6c8824f87d3cb2301",class:`radio-list-item p-3 ${this.class||""}`,part:p,onClick:this.handleClick,hidden:this.hidden},i("form-control-radio",{key:"72c6d07dd2a664ca6bd2be9b446584d7344bc2b0",name:this.name,value:this.value,checked:this.checked,label:this.label,inputHandler:()=>null})))}},v={[u.NEW_BANK_ACCOUNT]:"New bank account",[u.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,f.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||f.authToken,account:this.accountId||f.accountId,paymentMethodMetadata:this.buildPaymentMethodMetadata(t)};return await this.paymentMethodFormRef.tokenize(e)}catch(t){return t}}validateRequiredProps(){this.authToken||f.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||f.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=u.NEW_BANK_ACCOUNT,f.selectedPaymentMethod={type:u.NEW_BANK_ACCOUNT}):(this.selectedPaymentMethod=u.NEW_CARD,f.selectedPaymentMethod={type:u.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(u.NEW_CARD),this.disableBankAccount||t.push(u.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||f.paymentMethodGroupId}get shouldSavePaymentMethod(){return!(!this.paymentMethodGroupId&&!f.savePaymentMethod)}get shouldHideRadioInput(){return this.disableCreditCard||this.disableBankAccount}renderPaymentMethodOption(t){const e=this.selectedPaymentMethod===t&&void 0===f.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===u.NEW_CARD?"justifi-card-form":"justifi-bank-account-form",{ref:t=>this.paymentMethodFormRef=t})}render(){return i(r,{key:"6cf2d727360142a1342256c020bf3dc9af8da29c"},i("form",{key:"d57740b68749410cda92bd87edb8697ff379715c"},i("fieldset",{key:"8df769d00d6f9c5499e7b7dce8e9c5472898d3fa"},i("div",{key:"8501055a25d62fd9f6c9608a9813ec8cfbd79c84",class:"row gy-3"},i("div",{key:"125cafaeea5cb3bd5631526f0f96c1f24dcf3235",class:"col-12"},this.availablePaymentMethods.map((t=>this.renderPaymentMethodOption(t)))),i("div",{key:"80f3d481aa89d3f7ee8fa127535f9511022cdf1a",class:"col-12"},i("justifi-button",{key:"aa6c7db5425e799f12949affce288b1d5feb8abb",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:"ed1021efed0ba7072c556e67f52d1c3ef47dbdda"},i(j,{key:"0c6f202f65dbdce9636fba8b3e8b68f895755bd7",isReady:this.isReady}),i("hidden-input",{key:"4340be8fb913a5198564bad3d65b099b69c51725"}),i("div",{key:"60dfe45a5f1f9bfc21815083e80b22d353ab19fb",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"8d4c2ef23151dce1efe79513fd2b0c7f738c0993",class:"row mb-3"},i("iframe-input",{key:"61054e0b53954f10bd006273d9cdaa9aadb3f696",inputId:"accountNumber",ref:t=>this.accountNumberIframeElement=t,label:"Account Number",iframeOrigin:`${this.iframeOrigin}/v2/accountNumber`})),i("div",{key:"212a7b4085fc0aad4f0580faf93288d1f32afa75",class:"row"},i("iframe-input",{key:"264bf390219b0e75a34b827629d5506c71c1eabe",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===u.NEW_CARD&&this.hideCardBillingForm}get showSimpleBankAccountBillingForm(){return this.paymentMethodType===u.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:"0cc61730e0afccbf438382a3d709397ebe327a9a"},i(b,{key:"c82eb8f914aa50df8b3e51d271a9e4c29602369e",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:"bfd3a4edceeb6ec2b0c3cb0b3b5f6028d605e6f3"},i(_,{key:"ff332972823a15933b191f4de8be94183dff2aae",isReady:this.isReady}),i("hidden-input",{key:"0e72eb09a7963080857cec955446bc11b283f593"}),i("div",{key:"7718e6f53a8534366c416f956a6e9d7ef4ced572",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"36652ef83af5dbcb5908e767f3c5d9ecddf5d789",class:"mb-3"},i("iframe-input",{key:"5291593fd97294c7bae5efbe1a86306fee6b494d",inputId:"cardNumber",ref:t=>this.cardNumberIframeElement=t,label:"Card Number",iframeOrigin:`${this.iframeOrigin}/v2/cardNumber`})),i("div",{key:"d3e26306377981509633a53d90e5f1db30fe0094",class:"row"},i("div",{key:"2d3f520e496abe8da065ecf6f4232fc5cddcb5b0",class:"col-4 align-content-end"},i("iframe-input",{key:"8e4c4a19a5bc14f96922fcd975fe295919a61a94",inputId:"expirationMonth",ref:t=>this.expirationMonthIframeElement=t,label:"Expiration",iframeOrigin:`${this.iframeOrigin}/v2/expirationMonth`})),i("div",{key:"a10578be32e8e81edf3101964dfcffb3788e4cd4",class:"col-4 align-content-end"},i("iframe-input",{key:"9c1bfc9485f069b649fd6bafdcda6945722cb972",inputId:"expirationYear",ref:t=>this.expirationYearIframeElement=t,label:"",iframeOrigin:`${this.iframeOrigin}/v2/expirationYear`})),i("div",{key:"97119f4cd6677091d78dd5cd65e49c5af78c4d19",class:"col-4 align-content-end"},i("iframe-input",{key:"226c41001bd76a3c11e536aa71455fe45531275e",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,f.savePaymentMethod=e,this.checkboxChanged.emit(this.isChecked)}}render(){return i(r,{key:"e9b32bca13108d83ee6ff3b23b16973ccad25faa"},i("form-control-checkbox",{key:"ab07bc95d88dc5e97ca8abc646ab3d286edacff8",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}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as r}from"./p-DwYM91AU.js";import{P as i}from"./p-t8p0WAW4.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-CQrwlULd.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,J as m}from"./p-C01zp4xw.js";import{S as h}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{d}from"./p-BitGlMSc.js";import"./p-C8yN3uBj.js";import"./p-BS7OgSQe.js";import"./p-BYsgavgS.js";import"./p-DkoufM1t.js";import"./p-Bx3wyDU2.js";import"./p-BydKIJVC.js";import"./p-DOLBAxYf.js";import"./p-wtuY7MT2.js";const u=class{constructor(r){t(this,r),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=d,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){c(),this.analytics=new m(this),this.initializeGetPayments()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetPayments()}initializeGetPayments(){this.accountId&&this.authToken?this.getPayments=(({id:t,authToken:s,service:r})=>async({params:i,onSuccess:e,onError:c,final:m})=>{var h,d;try{const m=await r.fetchPayments(t,s,i);if(m.error)return c({error:n(m.error),code:a(null===(d=m.error)||void 0===d?void 0:d.code),severity:o.ERROR});{const t=Object.assign({},m.page_info);e({payments:(null===(h=m.data)||void 0===h?void 0:h.map((t=>new p(t))))||[],pagingInfo:t})}}catch(t){const s=a(null==t?void 0:t.code);return c({error:t.message||t,code:s,severity:o.ERROR})}finally{return m()}})({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(h,{key:"699046d8f63936aca75b81d527778fb9f7c773f5"},r("payments-list-core",{key:"ecf55216d55d9e1b34b8c8afb47c4ca63e8cc5a0",getPayments:this.getPayments,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{u as justifi_payments_list}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as i}from"./p-DwYM91AU.js";import{C as r,a as e}from"./p-Cjcsf8ku.js";import{c as o,J as p}from"./p-C01zp4xw.js";import{D as a}from"./p-BH0Xfn-F.js";import{g as n,a as h}from"./p-D2muobcE.js";import{D as u}from"./p-Cmb6PRFh.js";import"./p-Bx3wyDU2.js";import"./p-C8yN3uBj.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-HXpYMWUU.js";import"./p-CQrwlULd.js";import"./p-DkoufM1t.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";const m=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:e,onError:o})=>{var p;try{const u=await i.fetchDispute(t,s);if(u.error)return o({error:h(u.error),code:n(null===(p=u.error)||void 0===p?void 0:p.code),severity:r.ERROR});{const t=Object.assign({},u.page_info);e({dispute:new a(u.data),pagingInfo:t})}}catch(t){const s=n(null==t?void 0:t.code);return o({error:t.message||t,code:s,severity:r.ERROR})}})({id:this.disputeId,authToken:this.authToken,service:new u}):(this.errorMessage="Dispute ID and Auth Token are required",this.errorEvent.emit({message:this.errorMessage,errorCode:e.MISSING_PROPS,severity:r.ERROR}))}render(){return i("justifi-dispute-management-core",{key:"8c800827aaa9d549a734ea05698763685e160a98",getDispute:this.getDispute,disputeId:this.disputeId,authToken:this.authToken,"onError-event":this.handleErrorEvent})}static get watchers(){return{disputeId:["propChanged"],authToken:["propChanged"]}}};export{m 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"./p-Cjcsf8ku.js";import"./p-CQrwlULd.js";import{p as i}from"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{T as a,a as r,b as h,c as o,d as c,e as n,f as p,g as d,h as f,i as m,j as b,k as u,l as g}from"./p-BTzt8N0l.js";import{T as l}from"./p-CZfYo5-1.js";import{t as j,a as y}from"./p-DkOiS6Zr.js";import{o as k,g as S}from"./p-Uqevvbqm.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-DkoufM1t.js";import"./p-wtuY7MT2.js";import"./p-B-0a8Xqm.js";import"./p-DOLBAxYf.js";const v=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event"),this.errorEvent=s(this,"error-event"),this.terminals=[],this.subAccounts=[],this.loading=!0,this.paging=i,this.pagingParams={},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").dataset.rowEntityId;if(!s)return;const e=this.terminals.find((t=>t.id===s));this.clickEvent.emit({name:l.row,data:e})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.terminalsTable=new a(this.terminals,this.columns,j,y),this.getTerminals&&this.getSubAccounts&&this.fetchData(),k("set",(()=>{this.pagingParams={}})),k("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getTerminals({params:this.terminalParams,onSuccess:async({terminals:t,pagingInfo:s})=>{this.terminals=t,this.paging=s,this.terminalsTable.collectionData=this.terminals,this.terminalsTable.columnKeys.includes("sub_account_name")?await 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.terminals=this.terminals.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 terminalParams(){const t=S();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.terminals.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.terminals.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e(g,{key:"c5141c3ebcbbb8598116b9977305043ca1f63324"},e(r,{key:"fc4c3d9e1b0429bb96e9ce944f22a31ba8fdbc53"},e(h,{key:"a97290876f8eacb6a0645efbf95ffe10be4e49d9"},e(o,{key:"4870bbd9fc764d37631143369e8c2c2d5d3b4049"},this.terminalsTable.columnData.map((t=>t)))),e(c,{key:"cd872991d6a0df1ef19b5a591eb6ced2406eee84"},e(n,{key:"ae2b94dccfd300db6fdcb4641fa6428b3a933c22",columnSpan:this.terminalsTable.columnKeys.length,isLoading:this.loading}),e(p,{key:"ae90c4c8d3fadd40464f2c753c08cb54fe2e804c",isEmpty:this.showEmptyState,columnSpan:this.terminalsTable.columnKeys.length}),e(d,{key:"3884e116fd694639542d2afed7fbc3b8a5866e1d",columnSpan:this.terminalsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalsTable.rowData.map(((t,s)=>e(f,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e(m,{key:"20631ff15eca22634c3282e51aaaf075dfdd953c"},e(b,{key:"67d32304559fb9fa5a48a5b02d251c6363b7d5ba"},e(u,{key:"b755e8711195a00762ffe96d5ef2563e96b87969",colSpan:this.terminalsTable.columnData.length},e("pagination-menu",{key:"3cb9c0e66098065669b644cac3ac5aa26228be9f",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getTerminals:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{v as terminals_list_core}
@@ -1 +1 @@
1
- import{r as t,c as s,h as e,H as a,g as i}from"./p-DwYM91AU.js";import{i as r,a as o,b as h,c as n,l as d}from"./p-wtuY7MT2.js";import{F as l}from"./p-Bli6WznP.js";import{F as f}from"./p-BuCKkdLM.js";import"./p-CZfYo5-1.js";const c=class{constructor(e){t(this,e),this.formControlInput=s(this,"formControlInput"),this.formControlBlur=s(this,"formControlBlur"),this.isFocused=!1,this.handleFormControlInput=t=>{const s=t.target,e=s.getAttribute("name");this.inputHandler(e,s.value),this.formControlInput.emit({name:e,value:s.value})},this.updateInput=t=>{const s=this.el.querySelector("input");s&&(s.value=t||"")}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get part(){return this.isFocused&&this.errorText?r:this.isFocused?o:this.errorText?h:n}render(){return e(a,{key:"4272ba30cf80097abd67fd184b927f4d41b3091b"},e("div",{key:"567b2b04d354e5c3352dd42431c92bd84fdb4d9d",class:"form-group d-flex flex-column"},e("label",{key:"0d3ee096554d638896e03002ed908f7379e406fd",part:d,class:"form-label",htmlFor:this.name},this.label),e("input",{key:"59ffd3ffe0beba8af97de7dd7ee12a2589c0d722",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:"number",disabled:this.disabled}),e(l,{key:"891b76120f5985007ad9101379a818e9e095cb46",helpText:this.helpText,name:this.name}),e(f,{key:"974fb8971bd4a369fb3dc838a2af03ca11d1f650",errorText:this.errorText,name:this.name})))}get el(){return i(this)}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{c as form_control_number}
1
+ import{r as t,c as s,h as e,H as a,g as i}from"./p-DwYM91AU.js";import{i as r,a as o,b as h,c as n,l as c}from"./p-wtuY7MT2.js";import{F as f}from"./p-Bli6WznP.js";import{F as l}from"./p-BuCKkdLM.js";import"./p-CZfYo5-1.js";const b=class{constructor(e){t(this,e),this.formControlInput=s(this,"formControlInput"),this.formControlBlur=s(this,"formControlBlur"),this.isFocused=!1,this.handleFormControlInput=t=>{const s=t.target,e=s.getAttribute("name");this.inputHandler(e,s.value),this.formControlInput.emit({name:e,value:s.value})},this.updateInput=t=>{const s=this.el.querySelector("input");s&&(s.value=t||"")}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get part(){return this.isFocused&&this.errorText?r:this.isFocused?o:this.errorText?h:n}render(){return e(a,{key:"53d8829b903659510dcac88b1d9656bf820b0c0b"},e("div",{key:"795d0f1b6033e039a081fb10f93908cffddb493f",class:"form-group d-flex flex-column"},e("label",{key:"dd5bfb80db6bd7b0332976034705c58c0421638c",part:c,class:"form-label",htmlFor:this.name},this.label),e("input",{key:"e8f794181b53447d9f352e3b00405c24bcbdc0f8",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:"number",disabled:this.disabled}),e(f,{key:"04c4a1f7f9e991190462cae647f569bfbef9ba48",helpText:this.helpText,name:this.name}),e(l,{key:"ab947bca804ceb6ec9f1c3d603a2b550266aa20f",errorText:this.errorText,name:this.name})))}get el(){return i(this)}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{b as form_control_number}