@justifi/webcomponents 6.0.0-rc.9 → 6.0.1-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{Api-y2G49jOh.js → Api-CwTLkFY4.js} +2 -2
- package/dist/cjs/{Refund-BVZHsa6Z.js → Refund-BPSBtjQC.js} +3 -1
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +3 -3
- package/dist/cjs/{badge-CcJ9H85-.js → badge-BmOSt4gS.js} +1 -1
- package/dist/cjs/bank-account-document-form-inputs_4.cjs.entry.js +11 -11
- package/dist/cjs/bank-account-form.cjs.entry.js +10 -15
- package/dist/cjs/business-details-core.cjs.entry.js +6 -21
- package/dist/cjs/{business.service-D5IhSyRJ.js → business.service-Dkhqyggm.js} +2 -2
- package/dist/cjs/{button-DsHDMHaa.js → button-7c2RN2yp.js} +2 -3
- package/dist/cjs/card-form.cjs.entry.js +10 -19
- package/dist/cjs/{check-pkg-version-VnhfIX0p.js → check-pkg-version-B48ZmuJS.js} +3 -3
- package/dist/cjs/{checkout.service-4aS641tN.js → checkout.service-LwZVVgP5.js} +2 -2
- package/dist/cjs/checkout.store-C3f3E24L.js +84 -0
- package/dist/cjs/checkouts-list-core.cjs.entry.js +11 -11
- package/dist/cjs/{checkouts-list-params-state-Cewmin_p.js → checkouts-list-params-state-C4c8UZtP.js} +1 -1
- package/dist/cjs/{checkouts-table-B_gpjGhs.js → checkouts-table-BQUhZZd_.js} +4 -6
- package/dist/cjs/{config-state-BBOZIS8x.js → config-state-B_gyIchD.js} +1 -1
- package/dist/cjs/custom-popper_2.cjs.entry.js +3 -3
- package/dist/cjs/{dispute.service-64ciJH0r.js → dispute.service-927Gzb0N.js} +2 -2
- package/dist/cjs/form-alert_5.cjs.entry.js +5 -5
- package/dist/cjs/form-control-checkbox.cjs.entry.js +5 -5
- package/dist/cjs/form-control-date.cjs.entry.js +4 -4
- package/dist/cjs/{form-control-error-text-B-P5UDhm.js → form-control-error-text-DD0dHGu8.js} +1 -1
- package/dist/cjs/form-control-file-v2_2.cjs.entry.js +5 -5
- package/dist/cjs/{form-control-help-text-JoZjhb9m.js → form-control-help-text-2QwKi78M.js} +1 -1
- package/dist/cjs/form-control-help-text.cjs.entry.js +1 -1
- package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +5 -5
- package/dist/cjs/form-control-monetary.cjs.entry.js +6 -6
- package/dist/cjs/form-control-number-masked_2.cjs.entry.js +5 -5
- package/dist/cjs/form-control-number.cjs.entry.js +5 -5
- package/dist/cjs/form-control-radio.cjs.entry.js +3 -3
- package/dist/cjs/form-control-select_2.cjs.entry.js +6 -6
- package/dist/cjs/{get-payment-details-DE5xUUpt.js → get-payment-details-BSxp1HX0.js} +2 -2
- package/dist/cjs/{get-subaccounts-CH477rHs.js → get-subaccounts-B31f95PR.js} +3 -3
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +5 -5
- package/dist/cjs/{header-1-DRA3f4Jh.js → header-1-DMsp0XM7.js} +1 -1
- package/dist/cjs/{header-3-sOdOpfx3.js → header-3-BSvFq_IF.js} +1 -1
- package/dist/cjs/hidden-input_2.cjs.entry.js +8 -8
- package/dist/cjs/{checkout.store-MSwLBCby.js → index-C2ITzalN.js} +29 -41
- package/dist/cjs/{index-B32W0A3m.js → index-D1Ba20gi.js} +1 -1
- package/dist/cjs/{index-C9hBD-32.js → index-Dyzl8Hn6.js} +8 -2
- package/dist/cjs/index.cjs.js +8 -0
- package/dist/cjs/{insurance-state-d2thhXUX.js → insurance-state-uWOl6jJN.js} +2 -2
- package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +9 -24
- package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +17 -17
- package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +9 -9
- package/dist/cjs/justifi-apple-pay.cjs.entry.js +177 -86
- package/dist/cjs/justifi-bank-account-billing-form-simple_9.cjs.entry.js +26 -44
- package/dist/cjs/justifi-business-details.cjs.entry.js +10 -10
- package/dist/cjs/justifi-business-form.cjs.entry.js +15 -30
- package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +2 -2
- package/dist/cjs/justifi-checkout-summary_7.cjs.entry.js +200 -164
- package/dist/cjs/justifi-checkout.cjs.entry.js +19 -11
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +8 -8
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +14 -14
- package/dist/cjs/justifi-config-provider.cjs.entry.js +3 -3
- package/dist/cjs/justifi-details.cjs.entry.js +3 -3
- package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +2 -2
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +10 -10
- package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +15 -15
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +9 -9
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +16 -44
- package/dist/cjs/justifi-owner-form_3.cjs.entry.js +11 -11
- package/dist/cjs/justifi-payment-details.cjs.entry.js +11 -11
- package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +10 -10
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +14 -16
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payments-list.cjs.entry.js +14 -14
- package/dist/cjs/justifi-payout-details.cjs.entry.js +10 -10
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +16 -22
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +15 -15
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +15 -21
- package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +2 -2
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +14 -25
- package/dist/cjs/justifi-skeleton.cjs.entry.js +4 -4
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +9 -9
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +12 -12
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +8 -8
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +14 -14
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-BS0_inF6.js → package-C3FMDKcV.js} +1 -1
- package/dist/cjs/pagination-menu.cjs.entry.js +4 -4
- package/dist/cjs/payment-details-core.cjs.entry.js +16 -28
- package/dist/cjs/payment-method-option.cjs.entry.js +3 -3
- package/dist/cjs/{payment.service--kzMop3L.js → payment.service-DUq-W7tS.js} +2 -2
- package/dist/cjs/payments-list-core.cjs.entry.js +12 -12
- package/dist/cjs/{payments-list-params-state-Cewmin_p.js → payments-list-params-state-C4c8UZtP.js} +1 -1
- package/dist/cjs/{payments-status-DXRh_ekP.js → payments-status-3iIQkoov.js} +2 -2
- package/dist/cjs/{payments-table-DFRtk-T9.js → payments-table-BSHUQhM-.js} +4 -6
- package/dist/cjs/payout-details-core.cjs.entry.js +12 -24
- package/dist/cjs/{payout.service-D3omzNG_.js → payout.service-DoKMr8Xw.js} +2 -2
- package/dist/cjs/payouts-list-core.cjs.entry.js +12 -12
- package/dist/cjs/{payouts-list-params-state-Cewmin_p.js → payouts-list-params-state-C4c8UZtP.js} +1 -1
- package/dist/cjs/{payouts-status-DxTQZv3i.js → payouts-status-DoQbxIms.js} +2 -2
- package/dist/cjs/{payouts-table-DE3t0x93.js → payouts-table-BD_Fhz_j.js} +5 -7
- package/dist/cjs/{skeleton-C7DQRD6r.js → skeleton-CuIMC98G.js} +1 -1
- package/dist/cjs/spinner-CMZXdrPe.js +10 -0
- package/dist/cjs/{styled-host-BfVJlAsJ.js → styled-host-2KXbjOFw.js} +2 -4
- package/dist/cjs/{table-Ccdrt0v_.js → table-DlQCUVag.js} +5 -11
- package/dist/cjs/table-filters-menu.cjs.entry.js +3 -3
- package/dist/cjs/terminal-orders-list-core.cjs.entry.js +11 -11
- package/dist/cjs/{terminal-orders-list-params-state-Cewmin_p.js → terminal-orders-list-params-state-C4c8UZtP.js} +1 -1
- package/dist/cjs/{terminal-orders-table-B1LJitwE.js → terminal-orders-table-t6XxNy_K.js} +7 -11
- package/dist/cjs/terminal-quantity-selector.cjs.entry.js +2 -2
- package/dist/cjs/{terminal.service-BOvYfpQW.js → terminal.service-Iyje71vN.js} +2 -2
- package/dist/cjs/terminals-list-core.cjs.entry.js +11 -11
- package/dist/cjs/terminals-list-params-state-C4c8UZtP.js +22 -0
- package/dist/cjs/{terminals-table-DYt7exFQ.js → terminals-table-BTdKRiBN.js} +3 -3
- package/dist/cjs/{utils-BaGF9XIe.js → utils-ChCUZgUy.js} +6 -0
- package/dist/cjs/utils-FFP5ZHyE.js +18 -0
- package/dist/cjs/webcomponents.cjs.js +3 -3
- package/dist/collection/api/Payment.js +2 -0
- package/dist/collection/api/index.js +1 -2
- package/dist/collection/api/services/apple-pay.service.js +95 -8
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/business-forms/business-form/additional-questions/additional-questions.js +6 -6
- package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +1 -1
- package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +6 -6
- package/dist/collection/components/business-forms/business-form/legal-address-form/legal-address-form.js +6 -6
- package/dist/collection/components/business-forms/owner-form/identity-address/identity-address-form.js +1 -1
- package/dist/collection/components/business-forms/owner-form/owner-form-core.js +1 -1
- package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +6 -6
- package/dist/collection/components/business-forms/owner-form/owner-form.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-document-inputs.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/form-control-monetary-provisioning.js +2 -2
- package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-core.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-buttons.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-steps.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +1 -1
- package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +6 -3
- package/dist/collection/components/checkout/card-form/card-form.js +6 -3
- package/dist/collection/components/checkout/checkout.js +16 -1
- package/dist/collection/components/checkout/save-new-payment-method.js +26 -1
- package/dist/collection/components/checkout/saved-payment-method.js +1 -1
- package/dist/collection/components/checkouts-list/checkouts-list-core.js +1 -1
- package/dist/collection/components/checkouts-list/checkouts-list-filters.js +1 -1
- package/dist/collection/components/checkouts-list/checkouts-list.js +1 -1
- package/dist/collection/components/dispute-management/dispute-management-core.js +1 -1
- package/dist/collection/components/dispute-management/dispute-management.js +1 -1
- package/dist/collection/components/dispute-management/dispute-notification.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/customer-details.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/dispute-response-core.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/dispute-response.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +1 -1
- package/dist/collection/components/filters/table-filters-menu.js +1 -1
- package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +1 -1
- package/dist/collection/components/modular-checkout/ModularCheckout.js +27 -0
- package/dist/collection/components/modular-checkout/modular-checkout.js +113 -72
- package/dist/collection/components/modular-checkout/sub-components/apple-pay-skeleton.js +2 -2
- package/dist/collection/components/modular-checkout/sub-components/apple-pay.js +72 -70
- package/dist/collection/components/modular-checkout/sub-components/bank-account-billing-form-simple.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/bank-account.js +2 -2
- package/dist/collection/components/modular-checkout/sub-components/card-billing-form-simple.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/card-form.js +2 -2
- package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/plaid-payment-method.js +57 -65
- package/dist/collection/components/modular-checkout/sub-components/plaid-payment-method.test.js +8 -6
- package/dist/collection/components/modular-checkout/sub-components/saved-payment-methods.js +8 -10
- package/dist/collection/components/modular-checkout/sub-components/sezzle-payment-method.js +22 -7
- package/dist/collection/components/modular-checkout/sub-components/summary.js +1 -1
- package/dist/collection/components/order-terminals/order-terminals.js +1 -1
- package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
- package/dist/collection/components/payment-details/payment-details-core.js +8 -8
- package/dist/collection/components/payment-transactions-list/payment-transactions-list.js +1 -1
- package/dist/collection/components/payments-list/payments-list-core.js +1 -1
- package/dist/collection/components/payments-list/payments-list-filters.js +2 -2
- package/dist/collection/components/payments-list/payments-list.js +1 -1
- package/dist/collection/components/payout-details/payout-details-core.js +3 -3
- package/dist/collection/components/payout-transactions-list/payout-transactions-list.js +1 -1
- package/dist/collection/components/payouts-list/payouts-list-core.js +1 -1
- package/dist/collection/components/payouts-list/payouts-list-filters.js +2 -2
- package/dist/collection/components/payouts-list/payouts-list.js +1 -1
- package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +1 -1
- package/dist/collection/components/terminal-orders-list/terminal-orders-list-filters.js +2 -2
- package/dist/collection/components/terminal-orders-list/terminal-orders-list.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list-core.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list-filters.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list.js +1 -1
- package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +31 -13
- package/dist/collection/index.js +1 -0
- package/dist/collection/store/checkout.store.js +46 -3
- package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
- package/dist/collection/ui-components/details/details.js +1 -1
- package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
- package/dist/collection/ui-components/form/form-control-date.js +2 -2
- package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
- package/dist/collection/ui-components/form/form-control-file.js +2 -2
- package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
- package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
- package/dist/collection/ui-components/form/form-control-number.js +2 -2
- package/dist/collection/ui-components/form/form-control-radio.js +5 -5
- package/dist/collection/ui-components/form/form-control-select.js +2 -2
- package/dist/collection/ui-components/form/form-control-text.js +2 -2
- package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
- package/dist/collection/ui-components/form/hidden-input.js +1 -1
- package/dist/collection/ui-components/form/iframe-input.js +3 -3
- package/dist/collection/ui-components/pagination-menu/pagination-menu.js +3 -3
- package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-radio-list-item.js +4 -4
- package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
- package/dist/collection/utils/utils.js +5 -0
- package/dist/docs.json +167 -190
- package/dist/esm/{Api-C1I68Tfr.js → Api-D4tj-h4P.js} +2 -2
- package/dist/esm/{Refund-kKW8S1h6.js → Refund-Bc5By0lb.js} +3 -1
- package/dist/esm/additional-questions-details_5.entry.js +3 -3
- package/dist/esm/{badge-DSYSJcRy.js → badge-ChwzCNAF.js} +1 -1
- package/dist/esm/bank-account-document-form-inputs_4.entry.js +11 -11
- package/dist/esm/bank-account-form.entry.js +10 -15
- package/dist/esm/business-details-core.entry.js +6 -21
- package/dist/esm/{business.service-B3wlBl1x.js → business.service-CsbtEDNi.js} +2 -2
- package/dist/esm/{button-CpllL0At.js → button-SAIS_5os.js} +2 -3
- package/dist/esm/card-form.entry.js +10 -19
- package/dist/esm/{check-pkg-version-CGQdCjwh.js → check-pkg-version-DSO4z-Vx.js} +3 -3
- package/dist/esm/{checkout.service-KDp7tISm.js → checkout.service-BCkQ9pOA.js} +2 -2
- package/dist/esm/checkout.store-DBvS7cVB.js +79 -0
- package/dist/esm/checkouts-list-core.entry.js +11 -11
- package/dist/esm/{checkouts-list-params-state-D8tzsGR_.js → checkouts-list-params-state-C2_GlMKR.js} +1 -1
- package/dist/esm/{checkouts-table-QOdiLpak.js → checkouts-table-CItEo0DU.js} +4 -6
- package/dist/esm/{config-state-DZeVYerv.js → config-state-Blo0ywwc.js} +1 -1
- package/dist/esm/custom-popper_2.entry.js +3 -3
- package/dist/esm/{dispute.service-DEZEPwn-.js → dispute.service-CyLtJREK.js} +2 -2
- package/dist/esm/form-alert_5.entry.js +5 -5
- package/dist/esm/form-control-checkbox.entry.js +5 -5
- package/dist/esm/form-control-date.entry.js +4 -4
- package/dist/esm/{form-control-error-text-R7U07nTg.js → form-control-error-text-IXJJ4JpV.js} +1 -1
- package/dist/esm/form-control-file-v2_2.entry.js +5 -5
- package/dist/esm/{form-control-help-text-CRLH-2f7.js → form-control-help-text-CuhIsM3v.js} +1 -1
- package/dist/esm/form-control-help-text.entry.js +1 -1
- package/dist/esm/form-control-monetary-provisioning.entry.js +5 -5
- package/dist/esm/form-control-monetary.entry.js +6 -6
- package/dist/esm/form-control-number-masked_2.entry.js +5 -5
- package/dist/esm/form-control-number.entry.js +5 -5
- package/dist/esm/form-control-radio.entry.js +3 -3
- package/dist/esm/form-control-select_2.entry.js +6 -6
- package/dist/esm/{get-payment-details-CYASKLT7.js → get-payment-details-BuT0QNOo.js} +2 -2
- package/dist/esm/{get-subaccounts-E0PYy_pc.js → get-subaccounts-VjY6-x_9.js} +3 -3
- package/dist/esm/gross-payment-chart-core.entry.js +5 -5
- package/dist/esm/{header-1-3M9If0gM.js → header-1-zXsamUS3.js} +1 -1
- package/dist/esm/{header-3-CWa41YWq.js → header-3-DVtaUAlf.js} +1 -1
- package/dist/esm/hidden-input_2.entry.js +8 -8
- package/dist/esm/{checkout.store-UMe84fjY.js → index-DCIW8z1f.js} +27 -38
- package/dist/esm/{index-B_KxSZIF.js → index-ZfXl6Xrm.js} +1 -1
- package/dist/esm/{index-Bn7inNWG.js → index-qipqIMyC.js} +8 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/{insurance-state-CTalqbNa.js → insurance-state-Dh9f36Qh.js} +2 -2
- package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +9 -24
- package/dist/esm/justifi-additional-questions-form-step_9.entry.js +17 -17
- package/dist/esm/justifi-additional-statement_8.entry.js +9 -9
- package/dist/esm/justifi-apple-pay.entry.js +177 -86
- package/dist/esm/justifi-bank-account-billing-form-simple_9.entry.js +26 -44
- package/dist/esm/justifi-business-details.entry.js +10 -10
- package/dist/esm/justifi-business-form.entry.js +15 -30
- package/dist/esm/justifi-business-representative-form-inputs.entry.js +2 -2
- package/dist/esm/justifi-checkout-summary_7.entry.js +193 -157
- package/dist/esm/justifi-checkout.entry.js +19 -11
- package/dist/esm/justifi-checkouts-list-filters.entry.js +8 -8
- package/dist/esm/justifi-checkouts-list.entry.js +14 -14
- package/dist/esm/justifi-config-provider.entry.js +3 -3
- package/dist/esm/justifi-details.entry.js +3 -3
- package/dist/esm/justifi-dispute-management-core.entry.js +2 -2
- package/dist/esm/justifi-dispute-management.entry.js +10 -10
- package/dist/esm/justifi-dispute-notification_3.entry.js +15 -15
- package/dist/esm/justifi-gross-payment-chart.entry.js +9 -9
- package/dist/esm/justifi-order-terminals.entry.js +16 -44
- package/dist/esm/justifi-owner-form_3.entry.js +11 -11
- package/dist/esm/justifi-payment-details.entry.js +11 -11
- package/dist/esm/justifi-payment-provisioning-core.entry.js +4 -4
- package/dist/esm/justifi-payment-provisioning.entry.js +10 -10
- package/dist/esm/justifi-payment-transactions-list.entry.js +14 -16
- package/dist/esm/justifi-payments-list-filters.entry.js +7 -7
- package/dist/esm/justifi-payments-list.entry.js +14 -14
- package/dist/esm/justifi-payout-details.entry.js +10 -10
- package/dist/esm/justifi-payout-transactions-list.entry.js +16 -22
- package/dist/esm/justifi-payouts-list-filters.entry.js +7 -7
- package/dist/esm/justifi-payouts-list.entry.js +15 -15
- package/dist/esm/justifi-refund-payment.entry.js +15 -21
- package/dist/esm/justifi-saved-payment-method.entry.js +2 -2
- package/dist/esm/justifi-season-interruption-insurance.entry.js +14 -25
- package/dist/esm/justifi-skeleton.entry.js +4 -4
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +9 -9
- package/dist/esm/justifi-terminal-orders-list.entry.js +12 -12
- package/dist/esm/justifi-terminals-list-filters.entry.js +8 -8
- package/dist/esm/justifi-terminals-list.entry.js +14 -14
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{package-BiWRKUx3.js → package-tyhA5jkt.js} +1 -1
- package/dist/esm/pagination-menu.entry.js +4 -4
- package/dist/esm/payment-details-core.entry.js +16 -28
- package/dist/esm/payment-method-option.entry.js +3 -3
- package/dist/esm/{payment.service-uJpJaX2Z.js → payment.service-QJEmd6Nl.js} +2 -2
- package/dist/esm/payments-list-core.entry.js +12 -12
- package/dist/esm/{payments-list-params-state-D8tzsGR_.js → payments-list-params-state-C2_GlMKR.js} +1 -1
- package/dist/esm/{payments-status-5orNU2Rd.js → payments-status-DDafc8Yr.js} +2 -2
- package/dist/esm/{payments-table-B0uyodyJ.js → payments-table-De3Jb6rY.js} +4 -6
- package/dist/esm/payout-details-core.entry.js +12 -24
- package/dist/esm/{payout.service-ClUgtbbb.js → payout.service-XxyEr0rj.js} +2 -2
- package/dist/esm/payouts-list-core.entry.js +12 -12
- package/dist/esm/{payouts-list-params-state-D8tzsGR_.js → payouts-list-params-state-C2_GlMKR.js} +1 -1
- package/dist/esm/{payouts-status-CZPwa2AE.js → payouts-status-u1eSRz3Q.js} +2 -2
- package/dist/esm/{payouts-table-CaCSX_0q.js → payouts-table-BO-MCzXj.js} +5 -7
- package/dist/esm/{skeleton-qMb0_Cjy.js → skeleton-DtpkgjZ6.js} +1 -1
- package/dist/esm/spinner-CIXUVK4F.js +8 -0
- package/dist/esm/{styled-host-CTAGIN84.js → styled-host-CbizlfAU.js} +2 -4
- package/dist/esm/{table-Br3n9Xu-.js → table-DcRHK_sm.js} +5 -11
- package/dist/esm/table-filters-menu.entry.js +3 -3
- package/dist/esm/terminal-orders-list-core.entry.js +11 -11
- package/dist/esm/{terminal-orders-list-params-state-D8tzsGR_.js → terminal-orders-list-params-state-C2_GlMKR.js} +1 -1
- package/dist/esm/{terminal-orders-table-DPtof5Zb.js → terminal-orders-table-9nsnrAq8.js} +7 -11
- package/dist/esm/terminal-quantity-selector.entry.js +2 -2
- package/dist/esm/{terminal.service-ClNtE3e-.js → terminal.service-D2oETGnk.js} +2 -2
- package/dist/esm/terminals-list-core.entry.js +11 -11
- package/dist/esm/terminals-list-params-state-C2_GlMKR.js +16 -0
- package/dist/esm/{terminals-table-ClkR_jrC.js → terminals-table-C6NO2m-t.js} +3 -3
- package/dist/esm/{utils-lb8p1Exq.js → utils-BscIVFn8.js} +6 -1
- package/dist/esm/utils-_ckvHjSW.js +11 -0
- package/dist/esm/webcomponents.js +4 -4
- package/dist/module/ModularCheckout.js +57 -0
- package/dist/module/Refund.js +2 -0
- package/dist/module/additional-questions-details2.js +4 -2
- package/dist/module/additional-questions.js +6 -4
- package/dist/module/additional-statement.js +5 -3
- package/dist/module/bank-account-billing-form-simple.js +5 -3
- package/dist/module/bank-account-document-inputs.js +5 -3
- package/dist/module/bank-account-form-inputs2.js +5 -3
- package/dist/module/bank-account-form.js +10 -13
- package/dist/module/bank-account.js +7 -13
- package/dist/module/billing-form-full.js +4 -2
- package/dist/module/billing-form.js +4 -2
- package/dist/module/business-additional-questions-form-step-core.js +4 -2
- package/dist/module/business-additional-questions-form-step.js +5 -3
- package/dist/module/business-bank-account-form-step-core.js +4 -2
- package/dist/module/business-bank-account-form-step.js +5 -3
- package/dist/module/business-core-info-form-step-core.js +4 -2
- package/dist/module/business-core-info-form-step.js +5 -3
- package/dist/module/business-core-info.js +5 -3
- package/dist/module/business-details-core2.js +6 -19
- package/dist/module/business-documents-on-file2.js +4 -2
- package/dist/module/business-owners-form-step-core.js +4 -2
- package/dist/module/business-owners-form-step.js +5 -3
- package/dist/module/business-representative-form-inputs.js +5 -3
- package/dist/module/business-representative-form-step-core.js +4 -2
- package/dist/module/business-representative-form-step.js +5 -3
- package/dist/module/business-representative.js +6 -4
- package/dist/module/business-terms-conditions-form-step.js +5 -3
- package/dist/module/button.js +1 -2
- package/dist/module/cancellation-policy.js +5 -3
- package/dist/module/card-billing-form-simple.js +5 -3
- package/dist/module/card-form.js +10 -17
- package/dist/module/card-form2.js +7 -17
- package/dist/module/checkout.store.js +42 -31
- package/dist/module/checkouts-list-core2.js +6 -6
- package/dist/module/core-info-details2.js +4 -2
- package/dist/module/custom-popper2.js +6 -4
- package/dist/module/customer-details.js +5 -3
- package/dist/module/details.js +5 -3
- package/dist/module/dispute-management-core.js +5 -3
- package/dist/module/dispute-notification.js +5 -3
- package/dist/module/dispute-response-core.js +5 -3
- package/dist/module/dispute-response.js +5 -3
- package/dist/module/duplicate-charge.js +5 -3
- package/dist/module/electronic-evidence.js +5 -3
- package/dist/module/form-alert2.js +4 -2
- package/dist/module/form-control-checkbox2.js +6 -4
- package/dist/module/form-control-date2.js +6 -4
- package/dist/module/form-control-file-v22.js +5 -3
- package/dist/module/form-control-file2.js +6 -4
- package/dist/module/form-control-help-text2.js +4 -2
- package/dist/module/form-control-monetary-provisioning2.js +6 -4
- package/dist/module/form-control-monetary2.js +6 -4
- package/dist/module/form-control-number-masked2.js +6 -4
- package/dist/module/form-control-number.js +6 -4
- package/dist/module/form-control-radio2.js +7 -5
- package/dist/module/form-control-select2.js +6 -4
- package/dist/module/form-control-text2.js +6 -4
- package/dist/module/form-control-textarea2.js +6 -4
- package/dist/module/form-control-tooltip2.js +4 -2
- package/dist/module/gross-payment-chart-core2.js +6 -4
- package/dist/module/hidden-input2.js +5 -3
- package/dist/module/identity-address-form.js +5 -3
- package/dist/module/iframe-input2.js +7 -5
- package/dist/module/index.js +1 -0
- package/dist/module/justifi-apple-pay.js +174 -86
- package/dist/module/justifi-business-details.js +4 -2
- package/dist/module/justifi-business-form.js +6 -19
- package/dist/module/justifi-button2.js +5 -3
- package/dist/module/justifi-checkout.js +15 -4
- package/dist/module/justifi-checkouts-list-filters.js +5 -3
- package/dist/module/justifi-checkouts-list.js +5 -3
- package/dist/module/justifi-config-provider.js +4 -2
- package/dist/module/justifi-dispute-management.js +5 -3
- package/dist/module/justifi-gross-payment-chart.js +4 -2
- package/dist/module/justifi-header2.js +5 -3
- package/dist/module/justifi-order-terminals.js +9 -35
- package/dist/module/justifi-payment-details.js +4 -2
- package/dist/module/justifi-payment-provisioning.js +5 -3
- package/dist/module/justifi-payment-transactions-list.js +6 -6
- package/dist/module/justifi-payments-list-filters.js +6 -4
- package/dist/module/justifi-payments-list.js +5 -3
- package/dist/module/justifi-payout-details.js +4 -2
- package/dist/module/justifi-payout-transactions-list.js +8 -12
- package/dist/module/justifi-payouts-list-filters.js +6 -4
- package/dist/module/justifi-payouts-list.js +5 -3
- package/dist/module/justifi-radio-list-item2.js +6 -4
- package/dist/module/justifi-refund-payment.js +6 -10
- package/dist/module/justifi-saved-payment-method.js +5 -3
- package/dist/module/justifi-season-interruption-insurance.js +6 -16
- package/dist/module/justifi-skeleton.js +5 -3
- package/dist/module/justifi-terminal-orders-list-filters.js +6 -4
- package/dist/module/justifi-terminal-orders-list.js +5 -3
- package/dist/module/justifi-terminals-list-filters.js +5 -3
- package/dist/module/justifi-terminals-list.js +5 -3
- package/dist/module/legal-address-details2.js +4 -2
- package/dist/module/legal-address-form-step-core.js +4 -2
- package/dist/module/legal-address-form-step.js +5 -3
- package/dist/module/legal-address-form.js +6 -4
- package/dist/module/modular-checkout.js +102 -39
- package/dist/module/owner-details2.js +4 -2
- package/dist/module/owner-form-core2.js +5 -3
- package/dist/module/owner-form-inputs2.js +6 -4
- package/dist/module/owner-form.js +5 -3
- package/dist/module/package.js +1 -1
- package/dist/module/pagination-menu2.js +7 -5
- package/dist/module/payment-details-core2.js +13 -23
- package/dist/module/payment-method-option.js +5 -3
- package/dist/module/payment-provisioning-core.js +5 -3
- package/dist/module/payment-provisioning-form-buttons.js +5 -3
- package/dist/module/payment-provisioning-form-steps.js +5 -3
- package/dist/module/payment-provisioning-loading.js +2 -17
- package/dist/module/payments-list-core2.js +6 -6
- package/dist/module/payout-details-core2.js +8 -18
- package/dist/module/payouts-list-core2.js +7 -7
- package/dist/module/plaid-payment-method.js +49 -104
- package/dist/module/plaid.service.js +26 -0
- package/dist/module/product-or-service.js +5 -3
- package/dist/module/refund-policy.js +5 -3
- package/dist/module/representative-details2.js +4 -2
- package/dist/module/save-new-payment-method.js +7 -3
- package/dist/module/saved-payment-methods.js +13 -12
- package/dist/module/sezzle-payment-method.js +14 -24
- package/dist/module/shipping-details.js +5 -3
- package/dist/module/spinner.js +1 -3
- package/dist/module/styled-host.js +1 -3
- package/dist/module/summary.js +5 -3
- package/dist/module/table-filters-menu2.js +5 -3
- package/dist/module/table.js +3 -9
- package/dist/module/terminal-orders-list-core2.js +7 -9
- package/dist/module/terminal-quantity-selector2.js +5 -3
- package/dist/module/terminals-list-core2.js +6 -4
- package/dist/module/tokenize-payment-method.js +16 -12
- package/dist/module/utils.js +5 -16
- package/dist/module/utils2.js +6 -1
- package/dist/types/api/Checkout.d.ts +7 -15
- package/dist/types/api/Payment.d.ts +3 -1
- package/dist/types/api/index.d.ts +2 -2
- package/dist/types/api/services/apple-pay.service.d.ts +7 -0
- package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +1 -1
- package/dist/types/components/checkout/bank-account-form/bank-account-form.d.ts +1 -0
- package/dist/types/components/checkout/card-form/card-form.d.ts +1 -0
- package/dist/types/components/checkout/checkout.d.ts +5 -0
- package/dist/types/components/checkout/save-new-payment-method.d.ts +1 -0
- package/dist/types/components/modular-checkout/ModularCheckout.d.ts +41 -0
- package/dist/types/components/modular-checkout/modular-checkout.d.ts +5 -5
- package/dist/types/components/modular-checkout/sub-components/apple-pay-skeleton.d.ts +1 -1
- package/dist/types/components/modular-checkout/sub-components/apple-pay.d.ts +9 -3
- package/dist/types/components/modular-checkout/sub-components/plaid-payment-method.d.ts +1 -2
- package/dist/types/components/modular-checkout/sub-components/saved-payment-methods.d.ts +3 -3
- package/dist/types/components/modular-checkout/sub-components/sezzle-payment-method.d.ts +1 -1
- package/dist/types/components/tokenize-payment-method/tokenize-payment-method.d.ts +2 -1
- package/dist/types/components.d.ts +31 -29
- package/dist/types/index.d.ts +4 -0
- package/dist/types/stencil-public-runtime.d.ts +21 -0
- package/dist/types/store/checkout.store.d.ts +12 -5
- package/dist/types/ui-components/form/form-control-radio.d.ts +1 -1
- package/dist/types/ui-components/shadow-dom-components/justifi-radio-list-item.d.ts +1 -1
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/webcomponents/index.esm.js +1 -0
- package/dist/webcomponents/{p-497632ad.entry.js → p-037d7061.entry.js} +1 -1
- package/dist/webcomponents/{p-4e3bf98f.entry.js → p-070c29ce.entry.js} +1 -1
- package/dist/webcomponents/{p-54ca3070.entry.js → p-0801324e.entry.js} +1 -1
- package/dist/webcomponents/{p-6255c685.entry.js → p-10278c48.entry.js} +1 -1
- package/dist/webcomponents/p-19ccbeee.entry.js +1 -0
- package/dist/webcomponents/{p-15705e8a.entry.js → p-1b3b6956.entry.js} +1 -1
- package/dist/webcomponents/{p-9846b23d.entry.js → p-1b7926f6.entry.js} +1 -1
- package/dist/webcomponents/p-1c433962.entry.js +1 -0
- package/dist/webcomponents/{p-2f01dfd2.entry.js → p-1d7139d3.entry.js} +1 -1
- package/dist/webcomponents/p-214fa6e0.entry.js +1 -0
- package/dist/webcomponents/{p-f13ae573.entry.js → p-2246aa69.entry.js} +1 -1
- package/dist/webcomponents/p-246ef4ff.entry.js +1 -0
- package/dist/webcomponents/{p-4213d10e.entry.js → p-27fc3ef0.entry.js} +3 -3
- package/dist/webcomponents/p-2d818d44.entry.js +1 -0
- package/dist/webcomponents/p-30147031.entry.js +1 -0
- package/dist/webcomponents/p-3546a5aa.entry.js +1 -0
- package/dist/webcomponents/p-3621a429.entry.js +1 -0
- package/dist/webcomponents/{p-f1cba43c.entry.js → p-3d37045d.entry.js} +1 -1
- package/dist/webcomponents/p-406ba650.entry.js +1 -0
- package/dist/webcomponents/{p-36a71a36.entry.js → p-4215ea76.entry.js} +1 -1
- package/dist/webcomponents/p-44d1341c.entry.js +1 -0
- package/dist/webcomponents/{p-36d9d95a.entry.js → p-4b1abc3b.entry.js} +1 -1
- package/dist/webcomponents/p-4d5c71c4.entry.js +1 -0
- package/dist/webcomponents/p-4ea83bfd.entry.js +1 -0
- package/dist/webcomponents/p-558f7967.entry.js +1 -0
- package/dist/webcomponents/p-5c477f08.entry.js +1 -0
- package/dist/webcomponents/p-62a16ef9.entry.js +1 -0
- package/dist/webcomponents/p-65286b2b.entry.js +1 -0
- package/dist/webcomponents/p-68329f16.entry.js +1 -0
- package/dist/webcomponents/p-6af851c5.entry.js +1 -0
- package/dist/webcomponents/{p-aeeb0f68.entry.js → p-6d4ae6c7.entry.js} +1 -1
- package/dist/webcomponents/p-6fe79f16.entry.js +1 -0
- package/dist/webcomponents/p-7494c1b6.entry.js +1 -0
- package/dist/webcomponents/p-7aeb20d2.entry.js +1 -0
- package/dist/webcomponents/{p-28618e6f.entry.js → p-7c5cd118.entry.js} +1 -1
- package/dist/webcomponents/p-8018523d.entry.js +1 -0
- package/dist/webcomponents/{p-4178bdbe.entry.js → p-83fa6da1.entry.js} +1 -1
- package/dist/webcomponents/p-84043580.entry.js +1 -0
- package/dist/webcomponents/{p-48e87a26.entry.js → p-84ccc7bb.entry.js} +1 -1
- package/dist/webcomponents/p-8975bf93.entry.js +1 -0
- package/dist/webcomponents/{p-bc2da364.entry.js → p-9046afd6.entry.js} +1 -1
- package/dist/webcomponents/p-906fdf0c.entry.js +1 -0
- package/dist/webcomponents/{p-9a2c044f.entry.js → p-90e43440.entry.js} +1 -1
- package/dist/webcomponents/{p-70f51444.entry.js → p-914e168d.entry.js} +1 -1
- package/dist/webcomponents/p-91c1e2ac.entry.js +1 -0
- package/dist/webcomponents/p-95348ff6.entry.js +1 -0
- package/dist/webcomponents/p-9f04cac4.entry.js +1 -0
- package/dist/webcomponents/{p-0mMX1Zv4.js → p-B4idKqyn.js} +1 -1
- package/dist/webcomponents/{p-zdIeCUeh.js → p-BHf9IqGw.js} +1 -1
- package/dist/webcomponents/{p-DNo0OPOP.js → p-BIPdn2VU.js} +1 -1
- package/dist/webcomponents/{p-BPtcGAzB.js → p-BUa0YOaw.js} +1 -1
- package/dist/webcomponents/{p-B8iBcmNu.js → p-BY2p6Sxk.js} +1 -1
- package/dist/webcomponents/{p-CB0mCq1M.js → p-BZ7C9duj.js} +1 -1
- package/dist/webcomponents/{p-DGmp4ErD.js → p-BdLLGV9t.js} +1 -1
- package/dist/webcomponents/p-BguBT6Hn.js +1 -0
- package/dist/webcomponents/{p-DhGNCW2f.js → p-Bp_QFeog.js} +1 -1
- package/dist/webcomponents/{p-B71k50jz.js → p-Bvp7uul3.js} +1 -1
- package/dist/webcomponents/{p-CvG-itHC.js → p-C1xGBPma.js} +1 -1
- package/dist/webcomponents/p-C3n7-tlg.js +1 -0
- package/dist/webcomponents/{p-DxqCFDtF.js → p-CLQx9p9q.js} +1 -1
- package/dist/webcomponents/{p-b21ncS7l.js → p-CPVN4dXS.js} +1 -1
- package/dist/webcomponents/p-CQeex56P.js +1 -0
- package/dist/webcomponents/p-CU4XQ3fO.js +1 -0
- package/dist/webcomponents/{p-Bb-6bNcq.js → p-C_3N7nqh.js} +1 -1
- package/dist/webcomponents/{p-BRLwUSZk.js → p-CaxjN6Uo.js} +1 -1
- package/dist/webcomponents/p-CpKvg1ok.js +1 -0
- package/dist/webcomponents/p-CrQgyTRz.js +1 -0
- package/dist/webcomponents/{p-B_6n1dAh.js → p-CtA2NMVz.js} +1 -1
- package/dist/webcomponents/{p-Bu1jU017.js → p-CxzFvTgf.js} +1 -1
- package/dist/webcomponents/{p-DVBbk00Z.js → p-CzPUMw00.js} +1 -1
- package/dist/webcomponents/{p-DDUmOl3v.js → p-D--yCspA.js} +1 -1
- package/dist/webcomponents/{p-qWQmu-fb.js → p-D-JYHdJ7.js} +1 -1
- package/dist/webcomponents/p-D6XirF21.js +1 -0
- package/dist/webcomponents/p-DCIW8z1f.js +1 -0
- package/dist/webcomponents/{p-BfM6X7lF.js → p-DCMrHeJI.js} +1 -1
- package/dist/webcomponents/p-DbX0g1WF.js +1 -0
- package/dist/webcomponents/p-De8UloOS.js +1 -0
- package/dist/webcomponents/p-DsAwPf2y.js +1 -0
- package/dist/webcomponents/p-DvZcI6pC.js +1 -0
- package/dist/webcomponents/p-DyDHaG6n.js +1 -0
- package/dist/webcomponents/{p-D2_iJUrZ.js → p-DyOgQlh2.js} +1 -1
- package/dist/webcomponents/p-IG_KR8zP.js +1 -0
- package/dist/webcomponents/p-Xv8DuU3Y.js +1 -0
- package/dist/webcomponents/p-a0909318.entry.js +1 -0
- package/dist/webcomponents/p-a57c1400.entry.js +1 -0
- package/dist/webcomponents/{p-d46dbb83.entry.js → p-a71a5e64.entry.js} +1 -1
- package/dist/webcomponents/p-a85cf3e0.entry.js +1 -0
- package/dist/webcomponents/{p-72dda22b.entry.js → p-a90b8b93.entry.js} +1 -1
- package/dist/webcomponents/p-bb03a95a.entry.js +1 -0
- package/dist/webcomponents/p-c16c0cbc.entry.js +1 -0
- package/dist/webcomponents/p-c4Mh3ZZ_.js +1 -0
- package/dist/webcomponents/p-d2259dfd.entry.js +1 -0
- package/dist/webcomponents/p-d8e5d7b7.entry.js +1 -0
- package/dist/webcomponents/p-df385efe.entry.js +1 -0
- package/dist/webcomponents/{p-14ff3155.entry.js → p-df7f36aa.entry.js} +1 -1
- package/dist/webcomponents/p-e035a92e.entry.js +1 -0
- package/dist/webcomponents/{p-3e667b07.entry.js → p-e2a38ad0.entry.js} +1 -1
- package/dist/webcomponents/p-e628a0c8.entry.js +1 -0
- package/dist/webcomponents/p-e6516014.entry.js +1 -0
- package/dist/webcomponents/{p-97c0dde4.entry.js → p-e6e96be2.entry.js} +1 -1
- package/dist/webcomponents/p-e79338f9.entry.js +1 -0
- package/dist/webcomponents/p-e7edf4f4.entry.js +1 -0
- package/dist/webcomponents/p-eafd179b.entry.js +1 -0
- package/dist/webcomponents/p-f5c3f489.entry.js +1 -0
- package/dist/webcomponents/{p-C5id7s_l.js → p-fUtq2xDs.js} +1 -1
- package/dist/webcomponents/{p-7cf87637.entry.js → p-ffe01f1b.entry.js} +1 -1
- package/dist/webcomponents/{p-Dgflaz6J.js → p-oGKW57R8.js} +1 -1
- package/dist/webcomponents/p-qipqIMyC.js +2 -0
- package/dist/webcomponents/p-tyhA5jkt.js +1 -0
- package/dist/webcomponents/p-xY5RkFuA.js +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +14 -14
- package/LICENSE +0 -21
- package/dist/cjs/spinner-jmeA44Ee.js +0 -12
- package/dist/cjs/terminals-list-params-state-Cewmin_p.js +0 -22
- package/dist/cjs/utils-Bzyj4qWe.js +0 -29
- package/dist/esm/spinner-DUzyWLhj.js +0 -10
- package/dist/esm/terminals-list-params-state-D8tzsGR_.js +0 -16
- package/dist/esm/utils-Dg6gMUTv.js +0 -22
- package/dist/webcomponents/p-040e8524.entry.js +0 -1
- package/dist/webcomponents/p-0db9943e.entry.js +0 -1
- package/dist/webcomponents/p-1288fda5.entry.js +0 -1
- package/dist/webcomponents/p-3aecd2cd.entry.js +0 -1
- package/dist/webcomponents/p-3bf63d1e.entry.js +0 -1
- package/dist/webcomponents/p-41e17edd.entry.js +0 -1
- package/dist/webcomponents/p-43c5f490.entry.js +0 -1
- package/dist/webcomponents/p-44450a94.entry.js +0 -1
- package/dist/webcomponents/p-5580e6ca.entry.js +0 -1
- package/dist/webcomponents/p-57dde36e.entry.js +0 -1
- package/dist/webcomponents/p-5bc6f5ca.entry.js +0 -1
- package/dist/webcomponents/p-5f87add5.entry.js +0 -1
- package/dist/webcomponents/p-60206d9c.entry.js +0 -1
- package/dist/webcomponents/p-613421d4.entry.js +0 -1
- package/dist/webcomponents/p-6c9732b6.entry.js +0 -1
- package/dist/webcomponents/p-7089fb85.entry.js +0 -1
- package/dist/webcomponents/p-7500c5b7.entry.js +0 -1
- package/dist/webcomponents/p-79da5350.entry.js +0 -1
- package/dist/webcomponents/p-87884ca5.entry.js +0 -1
- package/dist/webcomponents/p-88905a54.entry.js +0 -1
- package/dist/webcomponents/p-8990707a.entry.js +0 -1
- package/dist/webcomponents/p-8b7cbdbf.entry.js +0 -1
- package/dist/webcomponents/p-8cca8903.entry.js +0 -1
- package/dist/webcomponents/p-8dc4eb6a.entry.js +0 -1
- package/dist/webcomponents/p-8ff839a4.entry.js +0 -1
- package/dist/webcomponents/p-95cbb655.entry.js +0 -1
- package/dist/webcomponents/p-98cffba9.entry.js +0 -1
- package/dist/webcomponents/p-9df86b97.entry.js +0 -1
- package/dist/webcomponents/p-9edfd38c.entry.js +0 -1
- package/dist/webcomponents/p-9f5c9e41.entry.js +0 -1
- package/dist/webcomponents/p-B5Rc83j1.js +0 -1
- package/dist/webcomponents/p-BEPUC3Po.js +0 -1
- package/dist/webcomponents/p-BP7op0vq.js +0 -1
- package/dist/webcomponents/p-BQ2TIFoY.js +0 -1
- package/dist/webcomponents/p-BSt6p1oq.js +0 -1
- package/dist/webcomponents/p-BY1mRAvj.js +0 -1
- package/dist/webcomponents/p-BbZwa5UI.js +0 -1
- package/dist/webcomponents/p-BiWRKUx3.js +0 -1
- package/dist/webcomponents/p-Bn7inNWG.js +0 -2
- package/dist/webcomponents/p-C6c6Q0E7.js +0 -1
- package/dist/webcomponents/p-CaAVuW6B.js +0 -1
- package/dist/webcomponents/p-CpaS1Lex.js +0 -1
- package/dist/webcomponents/p-DD0Mvpeu.js +0 -1
- package/dist/webcomponents/p-DIDloHpm.js +0 -1
- package/dist/webcomponents/p-Dc1CS9Mi.js +0 -1
- package/dist/webcomponents/p-DsZZxRXY.js +0 -1
- package/dist/webcomponents/p-a1d3bb81.entry.js +0 -1
- package/dist/webcomponents/p-a9957ca5.entry.js +0 -1
- package/dist/webcomponents/p-abbf14b5.entry.js +0 -1
- package/dist/webcomponents/p-b2dcef65.entry.js +0 -1
- package/dist/webcomponents/p-c44325f8.entry.js +0 -1
- package/dist/webcomponents/p-c874ca2b.entry.js +0 -1
- package/dist/webcomponents/p-caac63bf.entry.js +0 -1
- package/dist/webcomponents/p-d72e8541.entry.js +0 -1
- package/dist/webcomponents/p-da44dc6e.entry.js +0 -1
- package/dist/webcomponents/p-e0cb5de5.entry.js +0 -1
- package/dist/webcomponents/p-eP3fmhta.js +0 -1
- package/dist/webcomponents/p-ecce97b3.entry.js +0 -1
- package/dist/webcomponents/p-f680e617.entry.js +0 -1
- package/dist/webcomponents/p-fd4ffaa2.entry.js +0 -1
- package/dist/webcomponents/p-sw5RO19U.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as e,c as i,H as s,g as a}from"./p-qipqIMyC.js";import{z as n,r as o}from"./p-RvUQ__Pq.js";import{f as r}from"./p-BHf9IqGw.js";import{c as h,o as l,g as c,a as d}from"./p-CrQgyTRz.js";import{S as u}from"./p-CLQx9p9q.js";import"./p-CZfYo5-1.js";import{H as y}from"./p-CQeex56P.js";import{H as m,b as p,h as M,i as v}from"./p-Bvp7uul3.js";import{H as g}from"./p-BguBT6Hn.js";import{J as f,c as k}from"./p-CtA2NMVz.js";import"./p-Bp_QFeog.js";import"./p-HXpYMWUU.js";import{C as j,a as b,b as T}from"./p-Cjcsf8ku.js";import{I as w}from"./p-c4Mh3ZZ_.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as N,a as D}from"./p-D2muobcE.js";import{C as I}from"./p-BY2p6Sxk.js";import{A as C}from"./p-BUa0YOaw.js";import{P as A,a as E,b as P}from"./p-DCIW8z1f.js";import{C as x}from"./p-ZpPDShvP.js";import"./p-DsAwPf2y.js";import"./p-tyhA5jkt.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const z=class{constructor(e){t(this,e)}render(){return e(u,{key:"3161e6f6a196c79d684574cafbc90bcf741b2150"},e("section",{key:"594b4485ed4fd9d7c1ee7f4556f071139f92ef0c"},e("div",{key:"5c2d14677dda6fc7ddcb074d4887b839385dca3a"},e("div",{key:"fb850cd7e9c11741349710696dd4e6241c98e805",part:n},null==h?void 0:h.paymentDescription),e("div",{key:"959014d7fa2a9c97bae0c986313a604930c1e0f3"},e("span",{key:"14ab0932a083568419b1c36c95f9072c73962b11",part:n},"Total")," ",e("span",{key:"08a9e00332253070ae984b77eb2a9bab88eb3472",part:n},r(+(null==h?void 0:h.totalAmount)))))))}},L=class{constructor(e){t(this,e),this.levels={h1:y,h2:m,h3:g},this.level="h1"}render(){return e(u,{key:"eb3651b698897193d34a6c6456cd57dd0bd0bc43"},e(this.levels[this.level],{key:"39caee687f93d3d4d90e62d9fbcae318eaa8022e",text:this.text,class:this.class}))}},O=C();class _{async getLinkToken(t,e,i,s){return O.post({endpoint:`plaid/${e}/link`,body:{checkout_id:i},authToken:t,signal:s})}async tokenizeBankAccount(t,e,i,s,a,n){const o=`plaid/${e}/tokenize`,r={public_token:i};return s&&(r.link_token_id=s),a&&(r.payment_method_group_id=a),O.post({endpoint:o,body:r,authToken:t,signal:n})}}const S=class{constructor(e){t(this,e),this.errorEvent=i(this,"error-event"),this.submitEvent=i(this,"submit-event"),this.checkoutChangedEvent=i(this,"checkout-changed"),this.plaidService=new _,this.handleApplePayCompleted=t=>{const{success:e,token:i,paymentMethodId:s,error:a}=t.detail;e&&i?(h.paymentToken=s,h.selectedPaymentMethod={type:A.APPLE_PAY},this.submitCheckout()):(console.error("Apple Pay completed but failed:",a),this.errorEvent.emit({message:(null==a?void 0:a.message)||"Apple Pay payment failed",errorCode:b.TOKENIZE_ERROR,severity:j.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:j.ERROR})},this.handleApplePayCancelled=()=>{h.paymentToken=void 0,h.selectedPaymentMethod=void 0}}connectedCallback(){this.observer=new MutationObserver((()=>{this.queryFormRefs(),this.setupApplePayListeners()})),this.observer.observe(this.hostEl,{childList:!0,subtree:!0}),h.checkoutId=this.checkoutId;const t={authToken:this.authToken,checkoutId:this.checkoutId,service:new I};this.getCheckout=(({authToken:t,checkoutId:e,service:i})=>async({onSuccess:s,onError:a})=>{var n;try{const o=await i.fetchCheckout(t,e);if(o.error)return a({error:D(o.error),code:N(null===(n=o.error)||void 0===n?void 0:n.code),severity:j.ERROR});s({checkout:o.data})}catch(t){const e=N(null==t?void 0:t.code);return a({error:t.message||t,code:e,severity:j.ERROR})}})(t),this.completeCheckout=(({authToken:t,checkoutId:e,service:i})=>async({payment:s,onSuccess:a,onError:n})=>{var o;try{const r=await i.complete(t,e,s);if(r.error)return n({error:D(r.error),code:N(null===(o=r.error)||void 0===o?void 0:o.code),severity:j.ERROR});a({checkout:r.data})}catch(t){const e=N(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:j.ERROR})}})(t),l((()=>{this.emitCheckoutChanged()}))}componentWillLoad(){this.analytics=new f(this),k(),h.authToken=this.authToken,this.fetchCheckout(),p("set",(t=>{const e=v[t];void 0!==e&&M(t,e)&&this.fetchCheckout()}))}componentDidLoad(){this.queryFormRefs(),this.setupApplePayListeners()}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect(),this.removeApplePayListeners()}fetchCheckout(){this.authToken&&this.checkoutId?this.getCheckout&&this.getCheckout({onSuccess:({checkout:t})=>{this.updateStore(t),t.status!==w.completed?t.status!==w.expired||this.errorEvent.emit({message:T.CHECKOUT_EXPIRED,errorCode:b.CHECKOUT_EXPIRED,severity:j.ERROR}):this.errorEvent.emit({message:T.CHECKOUT_ALREADY_COMPLETED,errorCode:b.CHECKOUT_ALREADY_COMPLETED,severity:j.ERROR})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:t.code,severity:t.severity})}}):this.errorEvent.emit({message:T.NOT_AUTHENTICATED,errorCode:b.NOT_AUTHENTICATED,severity:j.ERROR})}updateStore(t){var e,i,s,a,n;h.accountId=t.account_id,h.checkoutLoaded=!0,h.paymentMethods=t.payment_methods.map((t=>new E(t))),h.paymentMethodGroupId=t.payment_method_group_id,h.paymentDescription=t.payment_description,h.totalAmount=t.total_amount,h.paymentAmount=t.payment_amount,h.bnplEnabled=t.payment_settings.bnpl_payments,h.insuranceEnabled=t.payment_settings.insurance_payments,h.bankAccountVerification=null===(e=t.payment_settings)||void 0===e?void 0:e.bank_account_verification,h.bnplProviderClientId=null===(i=null==t?void 0:t.bnpl)||void 0===i?void 0:i.provider_client_id,h.bnplProviderMode=null===(s=null==t?void 0:t.bnpl)||void 0===s?void 0:s.provider_mode,h.bnplProviderApiVersion=null===(a=null==t?void 0:t.bnpl)||void 0===a?void 0:a.provider_api_version,h.bnplProviderCheckoutUrl=null===(n=null==t?void 0:t.bnpl)||void 0===n?void 0:n.provider_checkout_url}emitCheckoutChanged(){const t={availablePaymentMethodTypes:c(),selectedPaymentMethod:h.selectedPaymentMethod,savedPaymentMethods:h.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.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))}async tokenizePaymentMethod(t){var e,i,s;const a=null!==(i=await(null===(e=this.billingFormRef)||void 0===e?void 0:e.getValues()))&&void 0!==i?i:{},n=Object.assign(Object.assign({},t),a),o=Object.assign({accountId:h.accountId,payment_method_group_id:void 0},n);h.savePaymentMethod&&(o.payment_method_group_id=h.paymentMethodGroupId);const r=await(null===(s=this.paymentMethodFormRef)||void 0===s?void 0:s.tokenize({clientId:this.authToken,paymentMethodMetadata:o,account:h.accountId}));return r.error?r:(h.paymentToken=r.id,r.id)}async setSelectedPaymentMethod(t){h.selectedPaymentMethod=t,h.paymentToken=t.id||void 0}async validate(){var t,e;const i=[];h.insuranceEnabled&&this.insuranceFormRef&&i.push(this.insuranceFormRef.validate());const s=(null===(t=h.selectedPaymentMethod)||void 0===t?void 0:t.type)===A.NEW_CARD,a=(null===(e=h.selectedPaymentMethod)||void 0===e?void 0:e.type)===A.NEW_BANK_ACCOUNT;if((s||a)&&(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:b.VALIDATION_ERROR,severity:j.ERROR}),!1)}catch(t){return!1}}async submitCheckout(t){var e,i,s,a,n;const o=await this.validate();if(!h.selectedPaymentMethod)return void this.errorEvent.emit({message:"No payment method selected.",errorCode:b.VALIDATION_ERROR,severity:j.ERROR});const r=(null===(e=h.selectedPaymentMethod)||void 0===e?void 0:e.type)===A.NEW_CARD,l=(null===(i=h.selectedPaymentMethod)||void 0===i?void 0:i.type)===A.NEW_BANK_ACCOUNT,c=(null===(s=h.selectedPaymentMethod)||void 0===s?void 0:s.type)===A.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:b.TOKENIZE_ERROR,severity:j.ERROR})}if(c&&!h.paymentToken){const t=h.plaidPublicToken,e=h.plaidLinkTokenId;if(!t)return void this.errorEvent.emit({message:"Missing Plaid public token. Please connect your bank.",errorCode:b.TOKENIZE_ERROR,severity:j.ERROR});try{const i=await this.plaidService.tokenizeBankAccount(h.authToken,h.accountId,t,e||void 0,h.savePaymentMethod?h.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:b.TOKENIZE_ERROR,severity:j.ERROR});const s=null==i?void 0:i.data,n=(null===(a=null==s?void 0:s.bank_account)||void 0===a?void 0:a.token)||(null==s?void 0:s.token)||(null==s?void 0:s.id);h.paymentToken=n}catch(t){return void this.errorEvent.emit({message:(null==t?void 0:t.message)||"Plaid exchange error",errorCode:b.TOKENIZE_ERROR,severity:j.ERROR})}}if(!o)return void this.errorEvent.emit({message:"Please fill in all required fields.",errorCode:b.VALIDATION_ERROR,severity:j.ERROR});if(!h.paymentToken)return void this.errorEvent.emit({message:"Payment token not found.",errorCode:b.TOKENIZE_ERROR,severity:j.ERROR});let d;d={payment_mode:(t=>{switch(t){case A.NEW_CARD:case A.SAVED_CARD:case A.NEW_BANK_ACCOUNT:case A.SAVED_BANK_ACCOUNT:case A.PLAID:return P.ECOM;case A.SEZZLE:return P.BNPL;case A.APPLE_PAY:return P.APPLE_PAY;default:return}})(null===(n=h.selectedPaymentMethod)||void 0===n?void 0:n.type),payment_token:h.paymentToken},this.completeCheckout({payment:d,onSuccess:({checkout:t})=>{this.submitEvent.emit({checkout:t,message:"Checkout completed successfully"})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:b.COMPLETE_CHECKOUT_ERROR,severity:j.ERROR})}})}render(){return e(s,{key:"dbe1fe78f8206fef2e3f4f51628d716786dea858"})}get hostEl(){return a(this)}};var R;!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"}(R||(R={}));const U={[R.PLAID_SDK_LOAD_FAILED]:"Unable to load Plaid. Please refresh the page and try again.",[R.PLAID_LINK_INIT_FAILED]:"Unable to initialize bank connection. Please try again.",[R.PLAID_LINK_TOKEN_FAILED]:"Unable to connect to bank service. Please try again.",[R.PLAID_AUTHENTICATION_FAILED]:"Bank authentication failed. Please try again.",[R.PLAID_BANK_NOT_SUPPORTED]:"Your bank is not currently supported. Please try a different payment method.",[R.PLAID_TOKEN_EXPIRED]:"Your bank session has expired. Please reconnect your account.",[R.PLAID_NETWORK_ERROR]:"Network connection issue. Please check your internet connection and try again.",[R.PLAID_USER_CANCELLED]:"Bank connection was cancelled. Click to try again.",[R.PLAID_TIMEOUT]:"Bank connection timed out. Please try again.",[R.PLAID_INVALID_CREDENTIALS]:"Invalid bank credentials. Please check your username and password.",[R.PLAID_ACCOUNT_LOCKED]:"Your bank account is temporarily locked. Please contact your bank.",[R.PLAID_MAINTENANCE]:"Bank service is temporarily unavailable. Please try again later.",[R.PLAID_RATE_LIMITED]:"Too many connection attempts. Please wait a moment and try again."},B={[R.PLAID_SDK_LOAD_FAILED]:j.ERROR,[R.PLAID_LINK_INIT_FAILED]:j.ERROR,[R.PLAID_LINK_TOKEN_FAILED]:j.ERROR,[R.PLAID_AUTHENTICATION_FAILED]:j.ERROR,[R.PLAID_BANK_NOT_SUPPORTED]:j.WARNING,[R.PLAID_TOKEN_EXPIRED]:j.WARNING,[R.PLAID_NETWORK_ERROR]:j.WARNING,[R.PLAID_USER_CANCELLED]:j.INFO,[R.PLAID_TIMEOUT]:j.WARNING,[R.PLAID_INVALID_CREDENTIALS]:j.ERROR,[R.PLAID_ACCOUNT_LOCKED]:j.ERROR,[R.PLAID_MAINTENANCE]:j.WARNING,[R.PLAID_RATE_LIMITED]:j.WARNING},Q=class{constructor(e){t(this,e),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 _,this.maxRetries=3,this.retryDelay=2e3,this.timeoutId=null,this.abortController=null,this.hasLoggedDisabledWarning=!1,this.waitForStoreAndInitialize=()=>{h.authToken&&h.accountId&&h.checkoutId?this.initializePlaidLink():setTimeout((()=>{this.waitForStoreAndInitialize()}),100)},this.initializePlaidLink=async()=>{try{if(void 0===window.Plaid)return void this.handleError({code:R.PLAID_SDK_LOAD_FAILED,message:U[R.PLAID_SDK_LOAD_FAILED],severity:B[R.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"});if(await this.getLinkToken(),!this.linkToken)return void this.handleError({code:R.PLAID_LINK_TOKEN_FAILED,message:U[R.PLAID_LINK_TOKEN_FAILED],severity:B[R.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:R.PLAID_LINK_INIT_FAILED,message:U[R.PLAID_LINK_INIT_FAILED],severity:B[R.PLAID_LINK_INIT_FAILED],originalError:t,retryable:!0,userAction:"Click to try again"})}},this.getLinkToken=async()=>{var t,e,i,s,a;try{if(!h.authToken||!h.accountId)return void this.handleError({code:R.PLAID_LINK_TOKEN_FAILED,message:"Missing authentication. Please refresh the page and try again.",severity:j.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(h.authToken,h.accountId,h.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&&(h.plaidLinkTokenId=this.linkTokenId)}catch(t){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null);let n=R.PLAID_LINK_TOKEN_FAILED,o=U[n],r=!0;"AbortError"===t.name?(n=R.PLAID_TIMEOUT,o=U[n],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"))?(n=R.PLAID_NETWORK_ERROR,o=U[n],r=!0):((null===(s=t.message)||void 0===s?void 0:s.includes("401"))||(null===(a=t.message)||void 0===a?void 0:a.includes("unauthorized")))&&(n=R.PLAID_INVALID_CREDENTIALS,o="Authentication failed. Please refresh the page and try again.",r=!1),this.handleError({code:n,message:o,severity:B[n],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 R.PLAID_RATE_LIMITED;if(t.includes("maintenance"))return R.PLAID_MAINTENANCE;if(t.includes("not_authenticated"))return R.PLAID_INVALID_CREDENTIALS}if(null==t?void 0:t.code)switch(t.code){case"rate_limited":return R.PLAID_RATE_LIMITED;case"maintenance":return R.PLAID_MAINTENANCE;case"not_authenticated":return R.PLAID_INVALID_CREDENTIALS;default:return R.PLAID_LINK_TOKEN_FAILED}return R.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,h.selectedPaymentMethod={type:A.PLAID}),this.plaidErrorRecovered.emit({code:"plaid-success",message:"Bank account connected successfully",severity:j.INFO}),h.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=R.PLAID_AUTHENTICATION_FAILED,i=U[e],s=!0,a="Click to try again";if(t.error_code)switch(t.error_code){case"INVALID_CREDENTIALS":e=R.PLAID_INVALID_CREDENTIALS,i=U[e],s=!0;break;case"ITEM_LOGIN_REQUIRED":e=R.PLAID_INVALID_CREDENTIALS,i="Your bank requires re-authentication. Please try again.",s=!0;break;case"ITEM_LOCKED":e=R.PLAID_ACCOUNT_LOCKED,i=U[e],s=!1,a="Contact your bank";break;case"INSTITUTION_NOT_RESPONDING":e=R.PLAID_MAINTENANCE,i=U[e],s=!0;break;case"RATE_LIMIT_EXCEEDED":e=R.PLAID_RATE_LIMITED,i=U[e],s=!0;break;case"INVALID_REQUEST":e=R.PLAID_AUTHENTICATION_FAILED,i="Invalid request. Please try again.",s=!0;break;case"PLAID_ERROR":e=R.PLAID_AUTHENTICATION_FAILED,i=t.error_message||"Bank authentication failed. Please try again.",s=!0;break;default:t.error_message&&(i=t.error_message)}if(t.error_message){const n=t.error_message.toLowerCase();n.includes("not supported")||n.includes("unsupported")?(e=R.PLAID_BANK_NOT_SUPPORTED,i=U[e],s=!1,a="Try a different payment method"):(n.includes("expired")||n.includes("timeout"))&&(e=R.PLAID_TOKEN_EXPIRED,i=U[e],s=!0)}this.handleError({code:e,message:i,severity:B[e],originalError:t,retryable:s,userAction:a}),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=h.selectedPaymentMethod)||void 0===t?void 0:t.type)===A.PLAID;this.isSelected!==e&&(this.isSelected=e)}}onSelectionChange(t){var e;t&&(null===(e=h.selectedPaymentMethod)||void 0===e?void 0:e.type)!==A.PLAID&&(h.selectedPaymentMethod={type:A.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:R.PLAID_SDK_LOAD_FAILED,message:U[R.PLAID_SDK_LOAD_FAILED],severity:B[R.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"})})}componentWillLoad(){var t;this.isSelected=(null===(t=h.selectedPaymentMethod)||void 0===t?void 0:t.type)===A.PLAID}async resolvePaymentMethod(){return this.publicToken?{token:this.publicToken,data:{type:"bank_account",plaid_public_token:this.publicToken}}:{validationError:!0}}async getPaymentToken(){return h.paymentToken}async handleSelectionClick(){if(this.isSelected=!0,h.selectedPaymentMethod={type:A.PLAID},this.error)return this.clearError(),void this.waitForStoreAndInitialize();!this.plaidLink||this.publicToken||this.isAuthenticating||this.openPlaidLink()}async setSelected(t){this.isSelected=t,t&&(h.selectedPaymentMethod={type:A.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=d("selectedPaymentMethod",this.syncWithStore);this.unsubscribeFromStore=t}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),this.timeoutId&&clearTimeout(this.timeoutId),this.abortController&&this.abortController.abort()}render(){if(!0!==h.bankAccountVerification)return this.hasLoggedDisabledWarning||(console.warn("[PlaidPaymentMethod] bank_account_verification is disabled. Component will not render."),this.hasLoggedDisabledWarning=!0),null;const t=e("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 e(u,{class:"payment-method"},e("script",{src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",async:!0,ref:t=>this.scriptRef=t}),e("div",{title:"Pay with Plaid"},e("div",{onClick:t=>{t.preventDefault(),this.handleSelectionClick()}},"Pay with Bank Account ",t," "),(()=>this.error?e("div",{class:(this.error.severity===j.ERROR?"text-danger":this.error.severity===j.WARNING?"text-warning":"text-info")+" mt-2"},e("small",null,this.error.message),e("br",null),e("small",{class:"text-muted"},this.error.userAction,this.error.retryable&&this.retryCount<this.maxRetries&&e("span",null," • Auto-retry in progress..."))):null)(),(()=>this.error?null:this.isAuthenticating?e("div",{class:"text-info mt-2"},e("small",null,"Connecting to your bank...")):this.publicToken?e("div",{class:"text-success mt-2"},e("small",null,"✓ Bank account connected successfully")):!this.isSelected||this.publicToken||this.error||this.isAuthenticating?null:e("div",{class:"text-muted mt-2"},e("small",null,"Click to connect your bank account")))()))}static get watchers(){return{isSelected:["onSelectionChange"]}}},Y=class{constructor(e){t(this,e),this.onPaymentMethodOptionClick=t=>e=>{e.preventDefault(),h.selectedPaymentMethod={id:t.id,type:t.type},h.paymentToken=t.id},this.isAllowedPaymentMethod=t=>!(t===A.SAVED_CARD&&h.disableCreditCard||t===A.SAVED_BANK_ACCOUNT&&h.disableBankAccount)}componentWillLoad(){h.paymentMethods.length||console.warn("No saved payment methods available."),h.disablePaymentMethodGroup&&console.warn("Payment method group is disabled.")}render(){return h.disablePaymentMethodGroup?null:e(u,null,e("div",{class:"saved-payment-methods"},h.paymentMethods.length?h.paymentMethods.filter((t=>this.isAllowedPaymentMethod(t.type))).map((t=>e("div",{class:"radio-list-item p-3",part:o,onClick:this.onPaymentMethodOptionClick(t)},e("form-control-radio",{name:"paymentMethodType",value:null==t?void 0:t.id,checked:h.paymentToken===(null==t?void 0:t.id),label:`${x[null==t?void 0:t.brand]||""} *${null==t?void 0:t.acct_last_four}`})))):null))}},F=e("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"}}),H=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected"),this.paymentMethodOptionId=A.SEZZLE,this.initializeSezzleCheckout=()=>{let t;this.sezzlePromise=new Promise((e=>{t=e}));const e=Number(h.paymentAmount),i=new(0,window.Checkout)({mode:"popup",publicKey:h.bnplProviderClientId,apiMode:h.bnplProviderMode,apiVersion:h.bnplProviderApiVersion});i.sezzleButtonElement=this.sezzleButtonRef,i.init({onClick:function(t){t.preventDefault(),i.startCheckout({checkout_url:h.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(){h.selectedPaymentMethod={type:A.SEZZLE},this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId)}render(){var t,i;return!h.bnplEnabled||h.disableBnpl?(console.warn("justifi-sezzle-payment-method: BNPL is not enabled for this account."),null):e(u,{class:"payment-method"},e("script",{src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:t=>this.scriptRef=t}),e("div",null,e("div",null,"Buy now, pay later with ",F),this.installmentPlan&&e("small",null,e("span",null,null===(t=this.installmentPlan)||void 0===t?void 0:t.installments.length)," ",e("span",null,this.installmentPlan.schedule," payments of")," ",e("span",{class:"fw-bold"},r(null===(i=this.installmentPlan)||void 0===i?void 0:i.installments[0].amountInCents)))))}},V={[A.NEW_BANK_ACCOUNT]:"New bank account",[A.NEW_CARD]:"New credit or debit card"},Z="Payment form not ready",W="Validation error",q=class{constructor(e){t(this,e),this.errorEvent=i(this,"error-event"),this.submitEvent=i(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(){k(),this.analytics=new f(this)}handleRadioClick(t){this.selectedPaymentMethod=t.detail,h.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:b.TOKENIZE_ERROR,message:W}),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(b.TOKENIZE_ERROR,t.message);return this.emitError({errorCode:b.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:Z}};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||h.authToken,account:this.accountId||h.accountId,paymentMethodMetadata:this.buildPaymentMethodMetadata(t)};return await this.paymentMethodFormRef.tokenize(e)}catch(t){return t}}validateRequiredProps(){this.authToken||h.authToken||this.emitError({errorCode:b.TOKENIZE_ERROR,message:"Auth token is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"}),this.accountId||h.accountId||this.emitError({errorCode:b.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=A.NEW_BANK_ACCOUNT,h.selectedPaymentMethod={type:A.NEW_BANK_ACCOUNT}):(this.selectedPaymentMethod=A.NEW_CARD,h.selectedPaymentMethod={type:A.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(A.NEW_CARD),this.disableBankAccount||t.push(A.NEW_BANK_ACCOUNT),t}areFormsReady(){return!(!this.billingFormRef||!this.paymentMethodFormRef)}emitError(t){this.errorEvent.emit(Object.assign(Object.assign({},t),{severity:j.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",Z);try{const e=await this.validate();if(!e.isValid||!t.isValid){const t=Object.values(e.errors)[0]||W;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||h.paymentMethodGroupId}get shouldSavePaymentMethod(){return!(!this.paymentMethodGroupId&&!h.savePaymentMethod)}get shouldHideRadioInput(){return this.disableCreditCard||this.disableBankAccount}renderPaymentMethodOption(t){const i=this.selectedPaymentMethod===t&&void 0===h.selectedPaymentMethod.id;return e("div",{class:"payment-method"},e("justifi-radio-list-item",{name:"paymentMethodType",value:t,checked:i,label:V[t],hidden:this.shouldHideRadioInput}),i&&this.renderSelectedPaymentMethodForm(t))}renderSelectedPaymentMethodForm(t){return e("div",{class:"mt-4 pb-4"},this.renderPaymentMethodForm(t),e("div",{class:"mt-4"},e("justifi-billing-form",{ref:t=>this.billingFormRef=t,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,paymentMethodType:t})),e("div",{class:"mt-4"},e("justifi-save-new-payment-method",{hidden:!this.paymentMethodGroupID,label:this.savePaymentMethodLabel})))}renderPaymentMethodForm(t){return e(t===A.NEW_CARD?"justifi-card-form":"justifi-bank-account-form",{ref:t=>this.paymentMethodFormRef=t})}render(){return e(u,{key:"5fc5dad15215fe24b421f4d6c13355fb849b8a76"},e("form",{key:"0e0330e5b11ee3ae0bef9e092fa2fb2a0a6af3e7"},e("fieldset",{key:"ee4c026ccda62a249e019a9e105e40ea465fc400"},e("div",{key:"15a8a86fa5be8a545745260d76a8c3b2569d6a0e",class:"row gy-3"},e("div",{key:"bbbeed6ee96311394a876b4beb206e8e335184c2",class:"col-12"},this.availablePaymentMethods.map((t=>this.renderPaymentMethodOption(t)))),e("div",{key:"da2a2009abe4348e25a5fc712557e81e9f6c4c1f",class:"col-12"},e("justifi-button",{key:"050939c757999383226f281ee0eff1ec178be203",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 a(this)}static get watchers(){return{disableCreditCard:["paymentMethodsChanged"],disableBankAccount:["paymentMethodsChanged"]}}};export{z as justifi_checkout_summary,L as justifi_header,S as justifi_modular_checkout,Q as justifi_plaid_payment_method,Y as justifi_saved_payment_methods,H as justifi_sezzle_payment_method,q as justifi_tokenize_payment_method}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as t,H as a,c as s,g as r}from"./p-qipqIMyC.js";import"./p-Bp_QFeog.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import{E as i}from"./p-c4Mh3ZZ_.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{c as o}from"./p-yH3TC3ZQ.js";import"./p-XYgDHrVL.js";import{n as c}from"./p-BnjCmwMr.js";import{s as l,e as d,j as n}from"./p-BHf9IqGw.js";import{Y as f,C as b,aj as h,N as p,ak as m,c as u,l as y,b as k,T as _,a as v}from"./p-RvUQ__Pq.js";import{S as x}from"./p-Xv8DuU3Y.js";import"./p-CZfYo5-1.js";import{F as j}from"./p-DCMrHeJI.js";import"./p-DsAwPf2y.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const g=class{constructor(t){e(this,t)}render(){return t("div",{key:"c62d858a070a4611bead814bacd350e7faa4b400",class:"row gy-3"},t("div",{key:"0044e508f449953f9da16907d1a141a0b4b42f1f",class:"col-12"},t("form-control-file",{key:"add74fc5424ffdb64dbae5b2e0dddde39544e5e3",name:"voided_check",label:"Voided Check",documentType:i.voidedCheck,inputHandler:this.inputHandler,onFileSelected:this.storeFiles,errorText:this.errors.voided_check,multiple:!0})),t("div",{key:"0d69209999cb8ded788a12ac3bd46360a73b1443",class:"col-12"},t("form-control-file",{key:"73cf74f2a2cd19db35ac9e5191cb59a99098806b",name:"bank_statement",label:"Bank Statement",documentType:i.bankStatement,inputHandler:this.inputHandler,onFileSelected:this.storeFiles,errorText:this.errors.bank_statement,multiple:!0})))}},T=class{constructor(t){e(this,t)}render(){return t("div",{key:"1628c5430b9235c9e03eff78ccdbf9af49c7f455",class:"row gy-3"},t("div",{key:"c4af1f6adcf00c67cfc1c3e962ba716c471f8176",class:"col-12"},t("form-control-text",{key:"3cb9addf2e55fb8d7f653621d3adccf17ff0bc3d",name:"bank_name",label:"Bank Name",defaultValue:this.defaultValue.bank_name,errorText:this.errors.bank_name,inputHandler:this.inputHandler,disabled:this.formDisabled})),t("div",{key:"1eb8b918e676b267caa0c8808a4dbde740ca46df",class:"col-12"},t("form-control-text",{key:"e540eeac2975e58fb5a28dc670441babdc62f857",name:"nickname",label:"Nickname",defaultValue:this.defaultValue.nickname,errorText:this.errors.nickname,inputHandler:this.inputHandler,disabled:this.formDisabled})),t("div",{key:"102078fb6d9bc409abe06d7ef4d3bbc11edc1f7a",class:"col-12"},t("form-control-text",{key:"51f7801dab1d69ea38891e5b31c3c23166d2bdc6",name:"account_owner_name",label:"Account Owner Name",defaultValue:this.defaultValue.account_owner_name,errorText:this.errors.account_owner_name,inputHandler:this.inputHandler,disabled:this.formDisabled})),t("div",{key:"66d068a5c05b643e03f45f6cdb0a4f76720d5832",class:"col-12"},t("form-control-select",{key:"5fa5b53dc35132b0d4948d8ca857563e726599bb",name:"account_type",label:"Account Type",options:o,defaultValue:this.defaultValue.account_type,errorText:this.errors.account_type,inputHandler:this.inputHandler,disabled:this.formDisabled})),t("div",{key:"522d348ea1460b7d645028a5174fce5bd6704adb",class:"col-12"},t("form-control-text",{key:"b2f3c8f097c5f0956252ada807f75d80f0c20225",name:"account_number",label:"Account Number",defaultValue:this.defaultValue.account_number,maxLength:17,errorText:this.errors.account_number,inputHandler:this.inputHandler,keyDownHandler:c,disabled:this.formDisabled,helpText:"Please copy the account number as shown on your statement/check. Do not include spaces or dashes."})),t("div",{key:"627bfec99086214dad9f938a7c6f6650bb1023b8",class:"col-12"},t("form-control-text",{key:"a21cff4dbcbfb85dc851f1905a0dbeb99df81325",name:"routing_number",label:"Routing Number",defaultValue:this.defaultValue.routing_number,maxLength:9,errorText:this.errors.routing_number,inputHandler:this.inputHandler,keyDownHandler:c,disabled:this.formDisabled,helpText:"A valid routing number is nine digits. Please include any leading or trailing zeroes."})))}},H=class{constructor(t){e(this,t),this.documents=[],this.isLoading=!1}render(){return this.isLoading?t(x,{height:"50px"}):this.documents.length?t(a,null,t("div",{class:"card",part:f},t("div",{class:"card-body"},t("h5",{class:"card-title",part:b},"Documents Already on File"),t("div",{class:"table-responsive"},t("table",{class:"table table-sm table-borderless",part:h},t("thead",null,t("tr",null,t("th",{style:{width:"25%"},part:p,scope:"col"},"File Name"),t("th",{style:{width:"25%"},part:p,scope:"col"},"File Type"),t("th",{style:{width:"25%"},part:p,scope:"col"},"Document Type"),t("th",{style:{width:"25%"},part:p,scope:"col"},"Date Uploaded"))),t("tbody",null,this.documents.sort(((e,t)=>e.document_type.localeCompare(t.document_type))).map(((e,a)=>t("tr",{class:0===a?"border-bottom border-top":"border-bottom"},t("td",{part:m},e.file_name),t("td",{part:m},e.file_type),t("td",{part:m},l(e.document_type)),t("td",{part:m},`${d(e.created_at)} - ${n(e.created_at)}`))))))))),t("hr",null)):null}},w=class{constructor(t){e(this,t),this.formControlInput=s(this,"formControlInput"),this.formControlBlur=s(this,"formControlBlur"),this.fileSelected=s(this,"fileSelected"),this.isFocused=!1,this.handleFormControlInput=e=>{const t=e.target,a=t.getAttribute("name");this.inputHandler(a,t.value),this.formControlInput.emit({name:a,value:t.value})},this.changeHandler=()=>{const e=this.fileInput.files;e&&this.fileSelected.emit({fileList:e,document_type:this.documentType})}}componentDidLoad(){this.fileInput=this.el.querySelector("input")}get part(){let e=u;return this.errorText&&(e=k),this.disabled&&(e=_),this.isFocused&&(e=v),e}render(){return t(a,{key:"3f6adbe90fc89972562f658958433d77ca9ad67c"},t("div",{key:"522ea5f78109a2717e8b016c16d29c9444ebf0c2",class:"form-group d-flex flex-column"},t("div",{key:"39647185cf2b6fbe4317aa5ae609a971161974a7",class:"d-flex align-items-start gap-2"},t("label",{key:"18d7f1e782c74bfd9a1aad52c70d451e2d7ebdd5",part:y,class:"form-label",htmlFor:this.name},this.label),t("form-control-tooltip",{key:"3eab40969bc7d68b195093f7671244a2c1a0f537",helpText:this.helpText})),t("input",{key:"0acb164fc09a23fd8a8937222f527052bb02248e",ref:e=>this.fileInput=e,type:"file",name:this.name,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",multiple:this.multiple,disabled:this.disabled,onChange:this.changeHandler,onInput:this.handleFormControlInput,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()}}),t(j,{key:"03689848a01a3844dcf4480d5f997a3a52338ea1",errorText:this.errorText,name:this.name})))}get el(){return r(this)}};export{g as bank_account_document_form_inputs,T as bank_account_form_inputs,H as business_documents_on_file,w as form_control_file}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as a}from"./p-qipqIMyC.js";import{f as t,p as s,c as r}from"./p-C3n7-tlg.js";import{q as l,u as i,v as o,w as d,x as p}from"./p-RvUQ__Pq.js";import{S as b}from"./p-CLQx9p9q.js";import"./p-CZfYo5-1.js";import"./p-Bp_QFeog.js";import{c as f,a as c}from"./p-BHf9IqGw.js";import"./p-Cjcsf8ku.js";import{T as n,b as m}from"./p-c4Mh3ZZ_.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import"./p-DsAwPf2y.js";import"./p-HXpYMWUU.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const u=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{t[e]=a},this.handleDateInput=(e,a)=>{const t=f(a,{setExactTime:!0});this.setParamsOnChange(e,t)}}componentWillLoad(){Object.entries({order_status:this.orderStatus,order_type:this.orderType,created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([e,a])=>{a&&(s[e]=a)}))}get terminalOrderStatusOptions(){return[{label:"All",value:""},{label:"Created",value:n.created},{label:"Completed",value:n.completed},{label:"Submitted",value:n.submitted},{label:"In Progress",value:n.in_progress},{label:"On Hold",value:n.on_hold},{label:"Canceled",value:n.canceled}]}get terminalOrderTypeOptions(){return[{label:"All",value:""},{label:"Boarding Only",value:m.boardingOnly},{label:"Boarding Shipping",value:m.boardingShipping}]}render(){const e=Object.assign({},t);return a(b,{key:"3042752f6f3bf4eb4f379aa256ff2a17d7fe8627"},a("table-filters-menu",{key:"9a2a446701c17e3aa1ecbc89fa383c3a3c16b3d1",params:e,clearParams:r,part:l},a("div",{key:"8c5533b280615974883fba9da4b87c066f7af5be",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"bbe71c8c5f2b49da9a38638ac4bda646cc4f7770",class:"p-2"},a("form-control-select",{key:"235922673a4ef8e7392b3e46b3c0bd326f7abe79",name:"order_status",label:"Order Status",options:this.terminalOrderStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.orderStatus||t.order_status,disabled:!!this.orderStatus,part:i})),a("div",{key:"d66c4305848a6f85867307d0448bfb2d7a80b698",class:"p-2"},a("form-control-select",{key:"480bd03e3ba6ea595c1602bbdf657f369f133adb",name:"order_type",label:"Order Type",options:this.terminalOrderTypeOptions,inputHandler:this.setParamsOnChange,defaultValue:this.orderType||t.order_type,disabled:!!this.orderType,part:o})),a("div",{key:"ffdbbbac93a6498fe52f21c91a70998ad1094596",class:"p-2"},a("form-control-date",{key:"60c95da005a50430e5a81d3b14f0b7a627480534",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:c(this.createdAfter,{showInputDateTime:!0})||c(t.created_after,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdAfter,part:d})),a("div",{key:"7e30fed8bbf9ba6db03d70d7b70a5f669d761ce9",class:"p-2"},a("form-control-date",{key:"ce490f4c346a3e455ae6f44e781b126ca46391d5",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:c(this.createdBefore,{showInputDateTime:!0})||c(t.created_before,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdBefore,part:p})))))}};export{u as justifi_terminal_orders_list_filters}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as a,H as i}from"./p-qipqIMyC.js";import{a3 as e,a4 as h,a5 as r,a6 as o,a7 as c,l as f}from"./p-RvUQ__Pq.js";const l=class{constructor(a){t(this,a),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?e:this.isFocused&&this.checked?h:this.checked?r:this.isFocused?o:c}render(){return a(i,{key:"15657fdcd58d4971b8a25d32b458ff652203af29",class:"form-group d-flex flex-column"},a("div",{key:"f50498d959e589a759fdf34a88ffdd2d423a3c7b",class:"form-check"},a("input",{key:"ac09f7a9de18b042302373d755565524170578aa",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}),a("label",{key:"a9a890749f5106772e6e849d3ffde7cad8c7b744",class:"form-check-label",htmlFor:`${this.name}-${this.value}`,part:f},this.label)),a("form-control-help-text",{key:"b85b9fa72868f1b70d7e2cf37e5b831762c2c448",helpText:this.helpText,name:this.name}),a("form-control-error-text",{key:"c2658161f4564fac4ec33acf48a23fd4cc656615",errorText:this.errorText,name:this.name}))}};export{l as form_control_radio}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as s,F as t,r as i,c as e}from"./p-
|
|
1
|
+
import{h as s,F as t,r as i,c as e}from"./p-qipqIMyC.js";import{E as l}from"./p-BIPdn2VU.js";import{S as r}from"./p-CLQx9p9q.js";import"./p-CZfYo5-1.js";import{S as o}from"./p-Xv8DuU3Y.js";import"./p-RvUQ__Pq.js";const n=()=>{const i=()=>s("div",{class:"mt-5"},s(o,{width:"40%",height:"1.5rem"}),s("hr",null),s("div",{class:"row g-3"},s("div",{class:"col-12 col-md-6"},s(o,null),s(o,null),s(o,null)),s("div",{class:"col-12 col-md-6"},s(o,null),s(o,null),s(o,null))));return s(t,null,s(i,null),s(i,null),s(i,null),s(i,null))};var a;!function(s){s.LOADING="loading",s.READY="ready",s.ERROR="error"}(a||(a={}));const d=class{constructor(s){i(this,s),this.errorEvent=e(this,"error-event"),this.renderState=a.LOADING}async componentWillLoad(){this.getBusiness&&this.fetchData()}fetchData(){this.renderState=a.LOADING,this.getBusiness({onSuccess:({business:s})=>{this.business=s,this.renderState=a.READY},onError:({error:s,code:t,severity:i})=>{this.errorMessage=s,this.renderState=a.ERROR,this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}render(){return s(r,null,this.renderState===a.LOADING?s(n,null):this.renderState===a.ERROR?l(this.errorMessage):s("justifi-details",{"error-message":this.errorMessage},s("div",{slot:"detail-sections"},s("core-info-details",{business:this.business}),s("legal-address-details",{legalAddress:this.business.legal_address}),s("representative-details",{representative:this.business.representative}),s("owner-details",{owners:this.business.owners}),s("additional-questions-details",{additionalQuestions:this.business.additional_questions}))))}};export{d as business_details_core}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as a,H as e,g as i}from"./p-qipqIMyC.js";import{i as r,a as o,b as h,c as n,l as c}from"./p-RvUQ__Pq.js";import{F as l}from"./p-oGKW57R8.js";import{F as f}from"./p-DCMrHeJI.js";import"./p-CZfYo5-1.js";const m=class{constructor(a){t(this,a),this.formControlInput=s(this,"formControlInput"),this.formControlBlur=s(this,"formControlBlur"),this.isFocused=!1,this.handleFormControlInput=t=>{const s=t.target,a=s.getAttribute("name");this.inputHandler(a,s.value),this.formControlInput.emit({name:a,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 a(e,{key:"7d3590c5616114610038d95cf45e3aa1f6fca08f"},a("div",{key:"231c16a61a76aa7501df035639a7c2de474a2578",class:"form-group d-flex flex-column"},a("label",{key:"c6736b7830e68c4ebfad4e954510fa7e6f839772",part:c,class:"form-label",htmlFor:this.name},this.label),a("input",{key:"739a6c3f50a684da033e5a2669bb661cd50836a9",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}),a(l,{key:"456c71cb54cf15bf17b2bcf95140d47db9002bce",helpText:this.helpText,name:this.name}),a(f,{key:"55aa4e9d84f0236e9a1b0e27b174f385de2b9537",errorText:this.errorText,name:this.name})))}get el(){return i(this)}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{m as form_control_number}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as s}from"./p-Bn7inNWG.js";import{f as i}from"./p-zdIeCUeh.js";import{z as a,ai as r}from"./p-RvUQ__Pq.js";import{B as d}from"./p-DD0Mvpeu.js";import{S as o}from"./p-DxqCFDtF.js";import{S as c}from"./p-CaAVuW6B.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-D2_iJUrZ.js";import{D as u}from"./p-Bg2SZArf.js";import{c as b,J as y}from"./p-B_6n1dAh.js";import"./p-HXpYMWUU.js";import"./p-BPtcGAzB.js";import"./p-DhGNCW2f.js";import"./p-CpaS1Lex.js";import"./p-BP7op0vq.js";import"./p-BH0Xfn-F.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-BiWRKUx3.js";const m=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var o;try{const d=await s.submitDisputeResponse(t,e,i);if(d.error){return r({error:f(d.error),code:p(null===(o=d.error)||void 0===o?void 0:o.code),severity:n.ERROR})}a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}},v=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(){m({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})}render(){var e,t,n,h,p,f,l;return s(o,{key:"90d2506d5bde2ea478fa3575fc162bb356b67fac"},this.isLoading&&s("div",{key:"4877ae22d3d8e312640b122c9107b6bdd8f924cb",style:{marginBottom:"8px"}},s(c,{key:"31fa0717949bbc6aa49db1c6ae0e324099ae1de2",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(c,{key:"ac5179232cb9ee33d3f3e16d9f93536ecfbf46a5",height:"18px",styles:{marginBottom:"8px"}}),s(c,{key:"c22a5e3b257d01f92de7f6188fa0758861abc747",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&s("div",{key:"be331b1a5e2fa0baf46bc593ef7ce4f5872abcff",part:a},s("h1",{key:"8094c16d3b375f28ffe314613f21ae25b63e59ef",class:"h4",part:r},"This payment is disputed"),s("p",{key:"d89ae665e1f9bd99c9338e2132c1dc56e5386696"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"2786733eac76628019993e13473d1f43c0c395ed",class:"h5"},"Dispute details"),s("div",{key:"663c28c46136bd56889b6ad0b9bfce9e5adbb590",class:"d-table gap-2"},s("div",{key:"dc688fad875d1591dcb7f31d423b61a3df2ff954",class:"d-table-row gap-2"},s("span",{key:"442db7a6e95524ca6b092794c7a4a4d987c9866e",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"0a31de8692c9b00f43fcf3c0508e4d00a221d096",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(t=this.dispute)||void 0===t?void 0:t.amount))),s("div",{key:"9fe0c1a3d3350c36fca190ae748dafe24d41b5fc",class:"d-table-row gap-2"},s("span",{key:"12165cb6671519130a5f2e0d8938aaa55e7e3ead",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"4a37ca8a7d64b97142997bb50ec11d737ac6a882",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(n=this.dispute)||void 0===n?void 0:n.reason)),s("div",{key:"4d9cf74a8ed26dd84e4ce7325d4b8703352362a4",class:"d-table-row gap-2"},s("span",{key:"8c0eaa24ebec7703eb18384b0b1f2eae8a684b55",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Dispute ID"),s("span",{key:"238813abf2ea0848e1fe817d5798b9b0d0b78ffc",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(h=this.dispute)||void 0===h?void 0:h.id))),s("div",{key:"d156a7e9bf0e7214ff2164fc09b12c0b8f1d2b36",class:"d-flex gap-2 mt-4 justify-content-end"},s(d,{key:"7822fd12dfc39bd2aced043956d012fd34cc1b01",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(d,{key:"05132b3a6d1fc3d136dc227008ea1999330cdb96",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(p=this.dispute)||void 0===p?void 0:p.underReview)&&s("div",{key:"b04dd0c34f608b75ea3997a9c28ce948fa9dba5c"},s("h1",{key:"ac2a13373315703e86247b6707097af7cf2e6757",class:"h4"},"This payment is disputed and under review"),s("p",{key:"203aed553e01bbaebe44bb370a1d088c149cda06"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(f=this.dispute)||void 0===f?void 0:f.won)&&s("div",{key:"6325264f8ad7b6678825878ed59f03f90eee421a"},s("h1",{key:"7b647ed77373884e0751de4fc39403211c249db6",class:"h4"},"This payment was disputed"),s("p",{key:"2a5c1560d341af9b743234a058a1187f245a2ae8"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(l=this.dispute)||void 0===l?void 0:l.lost)&&s("div",{key:"a89e7f4d7e8926ed052023c7dbbbaf076a03ed9c"},s("h1",{key:"534b560aa35dd43ba0eba668904ef70dc1a6954f",class:"h4"},"This payment was disputed"),s("p",{key:"2381f2f6418b47dce67c498c56d5f3789add57dc"},"The cardholder disputed this payment and the card issuer has settled it in their favor.")))}},k=class{constructor(s){e(this,s),this.errorEvent=t(this,"error-event"),this.errorMessage=null,this.apiOrigin="https://wc-proxy.justifi.ai",this.handleErrorEvent=e=>{this.errorMessage=e.detail.message,this.errorEvent.emit(e.detail)}}componentWillLoad(){b(),this.analytics=new y(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeDisputeServiceMethods()}initializeDisputeServiceMethods(){this.disputeId&&this.authToken?(this.updateDisputeResponse=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var o;try{const d=await s.updateDisputeResponse(t,e,i);if(d.error)return r({error:f(d.error),code:p(null===(o=d.error)||void 0===o?void 0:o.code),severity:n.ERROR});a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var o;try{const d=await s.createDisputeEvidence(t,e,i);if(d.error)return r({error:f(d.error),code:p(null===(o=d.error)||void 0===o?void 0:o.code),severity:n.ERROR});a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.submitDisputeResponse=m({disputeId:this.disputeId,authToken:this.authToken,service:new l})):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:h.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return s(o,{key:"b90f636418c3e11b046d36dee9accf345756b407"},s("justifi-dispute-response-core",{key:"ff6e510faad54506eda24b1d8dc94b67afc18014","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"]}}},j=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:"09b09843d54a2dbced9788d16e244b2e59a3a78f",class:"row gy-3"},s("div",{key:"6a3fe32d65ea1a74161d9ba9984543cf950e47ea",class:"col-12"},s("h1",{key:"bbb6f1334fd6b120e592117ba191d90b628e620f",class:"h4",part:r},"Counter dispute")),s("div",{key:"19cbc45842294e9344dbffb725f5f053bf370af7",class:"col-12"},this.currentStepComponent),s("div",{key:"fa875ca152ea77fc4c8363216d8ba16c7699b597",class:"col-12"},s("div",{key:"fa7b62fff0cbac81c19ebad919f5dd54c3679e84",class:"d-flex gap-2 mt-4 justify-content-end"},this.isFirstStep?s(d,{variant:"secondary",onClick:()=>this.onCancel(),disabled:this.isLoading,isLoading:this.isLoading},"Cancel"):s(d,{variant:"secondary",onClick:()=>this.onBack(),disabled:this.isLoading,isLoading:this.isLoading},"Back"),this.isLastStep?s(d,{variant:"primary",onClick:()=>this.onSubmit(),disabled:this.isLoading,isLoading:this.isLoading},"Submit Counter Dispute"):s(d,{variant:"primary",onClick:()=>this.onNext(),disabled:this.isLoading,isLoading:this.isLoading},"Next"))))}};export{v as justifi_dispute_notification,k as justifi_dispute_response,j as justifi_dispute_response_core}
|
|
1
|
+
import{r as e,c as t,h as s}from"./p-qipqIMyC.js";import{f as i}from"./p-BHf9IqGw.js";import{z as a,ai as r}from"./p-RvUQ__Pq.js";import{B as d}from"./p-D6XirF21.js";import{S as c}from"./p-CLQx9p9q.js";import{S as o}from"./p-Xv8DuU3Y.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-DyOgQlh2.js";import{D as u}from"./p-Bg2SZArf.js";import{c as y,J as b}from"./p-CtA2NMVz.js";import"./p-HXpYMWUU.js";import"./p-BUa0YOaw.js";import"./p-Bp_QFeog.js";import"./p-DsAwPf2y.js";import"./p-c4Mh3ZZ_.js";import"./p-BH0Xfn-F.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-tyhA5jkt.js";const m=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.submitDisputeResponse(t,e,i);if(d.error){return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR})}a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}},v=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(){m({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})}render(){var e,t,n,h,p,f,l;return s(c,{key:"0f1028825a7a96a06e7219518ffed54bc0db1b2b"},this.isLoading&&s("div",{key:"f4b704182a5a7085827854634d38c56423cc2e1b",style:{marginBottom:"8px"}},s(o,{key:"b2062d8b683ab110c26fc30f1600c4500f668d87",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(o,{key:"b5d2afe1fdd2e5ee0ec60048a48778bcfa6c78d3",height:"18px",styles:{marginBottom:"8px"}}),s(o,{key:"1e87c8936b3f2e26e680786927c5a4609aca0b83",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&s("div",{key:"49090493e3921353b7a830397795496bb234d112",part:a},s("h1",{key:"fd7b56a7cfeaa6820bf2cc121575314d075b5a83",class:"h4",part:r},"This payment is disputed"),s("p",{key:"72ba296695928baca8f7c5c3b1f858c596efedb2"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"cce733ff1bbca7a9530a442035cbae2995e018e7",class:"h5"},"Dispute details"),s("div",{key:"28b7f081e345112d99c52d05f205734995617253",class:"d-table gap-2"},s("div",{key:"d9476d8d0adfa3c6eccad229e94cd3824a720c7d",class:"d-table-row gap-2"},s("span",{key:"4d9e0714eee778c326ee1d70a32f79d90d3d4b09",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"b227edcf9b4b65b790d8aa98021d2662a12855bc",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(t=this.dispute)||void 0===t?void 0:t.amount))),s("div",{key:"b1b1cdaac5482f565a6f26af71c0b526b8c19f4e",class:"d-table-row gap-2"},s("span",{key:"0a479a9de96cce6e42bec90a17affe2c93ced44f",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"5d5020dda571f4465e2a358880ad5f20bc6171ea",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(n=this.dispute)||void 0===n?void 0:n.reason)),s("div",{key:"a5f42c3fcbb5d14f8479d0a576d31a50f8fc6441",class:"d-table-row gap-2"},s("span",{key:"280fca5a101eb0e823eb9ccc13c746ac7ed62069",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Dispute ID"),s("span",{key:"4dfc0b9a295ffc804b708d3590358256009e5376",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(h=this.dispute)||void 0===h?void 0:h.id))),s("div",{key:"654e7baccd08628bc90d050bad108011b49f9972",class:"d-flex gap-2 mt-4 justify-content-end"},s(d,{key:"d0817cdb23bf33086c6ce5122f4ed5388027d96c",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(d,{key:"5446bef44a0ca747692d59fd5490409d00a9e285",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(p=this.dispute)||void 0===p?void 0:p.underReview)&&s("div",{key:"17fbc5902badc4230c5485b326f480180c844768"},s("h1",{key:"fefa0234306588d9e7f56733872bf8c9793f51dd",class:"h4"},"This payment is disputed and under review"),s("p",{key:"eaad72aa8d9f65ca296379a2800180878ec8a7e5"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(f=this.dispute)||void 0===f?void 0:f.won)&&s("div",{key:"ec1b0d728a7518f913c2a69976fa1f5fc8f76c74"},s("h1",{key:"9d42fad15fbeee507e2f364c3a35f143ff7599e2",class:"h4"},"This payment was disputed"),s("p",{key:"3b728a5544fe17a6c58c12f7e8eef290022945b6"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(l=this.dispute)||void 0===l?void 0:l.lost)&&s("div",{key:"6d1813508a657265546fbef00bd1e8f46ffaf740"},s("h1",{key:"de981fc2e06e860f47146647975965a903a39b55",class:"h4"},"This payment was disputed"),s("p",{key:"4e57ab86518bd678a3a5402b712d40d573b3a970"},"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(){y(),this.analytics=new b(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeDisputeServiceMethods()}initializeDisputeServiceMethods(){this.disputeId&&this.authToken?(this.updateDisputeResponse=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.updateDisputeResponse(t,e,i);if(d.error)return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.createDisputeEvidence(t,e,i);if(d.error)return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.submitDisputeResponse=m({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:"dbdfd59a21c7e8ea4dfdaecb91f885f82540a27c"},s("justifi-dispute-response-core",{key:"3cff38e5995f0033c45c54fa195ffeebc27e189e","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"]}}},j=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:"20d075178a9d88cd73be32e52f8df6d3d360f8d7",class:"row gy-3"},s("div",{key:"6c1bc735f1a15709c596b5bea7cc3ce50e9a73f5",class:"col-12"},s("h1",{key:"27a0804924937ee7a8d01265bd0da2d9dd31d301",class:"h4",part:r},"Counter dispute")),s("div",{key:"b60822e91425c5c4af003169f47fd725daf9fb0f",class:"col-12"},this.currentStepComponent),s("div",{key:"d1be3f6be53de37836275067070cf4b5a2eb3e4a",class:"col-12"},s("div",{key:"48c8725d8de8b658e59ccfa851a6af6638e19ca5",class:"d-flex gap-2 mt-4 justify-content-end"},this.isFirstStep?s(d,{variant:"secondary",onClick:()=>this.onCancel(),disabled:this.isLoading,isLoading:this.isLoading},"Cancel"):s(d,{variant:"secondary",onClick:()=>this.onBack(),disabled:this.isLoading,isLoading:this.isLoading},"Back"),this.isLastStep?s(d,{variant:"primary",onClick:()=>this.onSubmit(),disabled:this.isLoading,isLoading:this.isLoading},"Submit Counter Dispute"):s(d,{variant:"primary",onClick:()=>this.onNext(),disabled:this.isLoading,isLoading:this.isLoading},"Next"))))}};export{v as justifi_dispute_notification,k as justifi_dispute_response,j as justifi_dispute_response_core}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as a}from"./p-qipqIMyC.js";import{f as t,p as s,c as r}from"./p-IG_KR8zP.js";import{m as d,n as c,o as f}from"./p-RvUQ__Pq.js";import{S as o}from"./p-CLQx9p9q.js";import"./p-CZfYo5-1.js";import{c as p,a as i}from"./p-BHf9IqGw.js";import"./p-DsAwPf2y.js";import"./p-HXpYMWUU.js";const l=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{t[e]=a},this.handleDateInput=(e,a)=>{const t=p(a,{setEndOfDay:!0});this.setParamsOnChange(e,t)}}componentWillLoad(){Object.entries({created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([e,a])=>{a&&(s[e]=a)}))}render(){const e=Object.assign({},t);return a(o,{key:"83debaafb73e9143b6e2e7804f69c4124845d01e"},a("table-filters-menu",{key:"162c3af697cef40e2a93c7e0245ec4d7d385f361",params:e,clearParams:r,part:d},a("div",{key:"7e118d535a6bed14a1ea6e7ed920fd682bbd3705",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"dfd557f8d5a3f834bbaa5164ef2c1e7d3c19adcc",class:"p-2"},a("form-control-date",{key:"01d9e16489abce36d4f770c4c06912923026860f",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:i(this.createdAfter,{showInputDate:!0})||i(t.created_after,{showInputDate:!0}),disabled:!!this.createdAfter,part:c})),a("div",{key:"9e7167618cc737911056c9217dc6a1ca77c1f41b",class:"p-2"},a("form-control-date",{key:"d80e6e2ebda1cd8f290daff21908f7dba1af2d7a",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:i(this.createdBefore,{showInputDate:!0})||i(t.created_before,{showInputDate:!0}),disabled:!!this.createdBefore,part:f})))))}};export{l as justifi_payouts_list_filters}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i}from"./p-
|
|
1
|
+
import{r as t,c as s,h as i}from"./p-qipqIMyC.js";import{C as o,a as r}from"./p-Cjcsf8ku.js";import{c as e,J as p}from"./p-CtA2NMVz.js";import{P as a}from"./p-De8UloOS.js";import"./p-Bp_QFeog.js";import"./p-HXpYMWUU.js";import{d as n}from"./p-c4Mh3ZZ_.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as c,a as h}from"./p-D2muobcE.js";import{m}from"./p-DYGIC0QH.js";import{m as u,S as j}from"./p-C1xGBPma.js";import{S as d}from"./p-CLQx9p9q.js";import"./p-CZfYo5-1.js";import{d as l}from"./p-D-JYHdJ7.js";import"./p-tyhA5jkt.js";import"./p-BUa0YOaw.js";import"./p-BHf9IqGw.js";import"./p-DsAwPf2y.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-fUtq2xDs.js";import"./p-D--yCspA.js";import"./p-RvUQ__Pq.js";const f=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=l,this.handleOnError=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){e(),this.analytics=new p(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializePayoutsServices(),this.initializeGetSubAccounts()}initializePayoutsServices(){if(this.accountId&&this.authToken){const t={id:this.accountId,authToken:this.authToken,service:new a};this.getPayouts=(({id:t,authToken:s,service:i})=>async({params:r,onSuccess:e,onError:p})=>{var a,m;try{const u=await i.fetchPayouts(t,s,r);if(u.error)return p({error:h(u.error),code:c(null===(m=u.error)||void 0===m?void 0:m.code),severity:o.ERROR});{const t=Object.assign({},u.page_info);e({payouts:(null===(a=u.data)||void 0===a?void 0:a.map((t=>new n(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return p({error:t.message||t,code:s,severity:o.ERROR})}})(t),this.getPayoutCSV=m(t)}else this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR})}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=u({accountId:this.accountId,authToken:this.authToken,service:new j}))}render(){return i(d,{key:"73ac65b309e80186e0f7799385d012e91ceb1b8b"},i("payouts-list-core",{key:"f7767376f3155521445cb2ee48b9a20c362c8137",getPayouts:this.getPayouts,getPayoutCSV:this.getPayoutCSV,getSubAccounts:this.getSubAccounts,"onError-event":this.handleOnError,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{f as justifi_payouts_list}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,h as t}from"./p-qipqIMyC.js";import{E as i}from"./p-BIPdn2VU.js";import"./p-RvUQ__Pq.js";const a=class{constructor(t){s(this,t)}render(){return t("div",{key:"026afe404e83a58245d2c0d68b188a5b227933b4"},this.errorMessage?i(this.errorMessage):t("main",{class:"p-2"},t("slot",{name:"head-info"}),t("slot",{name:"detail-sections"})))}};export{a as justifi_details}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as c}from"./p-qipqIMyC.js";import{W as s,X as a,Y as i}from"./p-RvUQ__Pq.js";const d=class{constructor(c){e(this,c),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 c("div",{key:"852621f3c36375e9c300201e4405c95501488c6d",class:"rounded shadow-sm card p-2",part:i},c("div",{key:"1695cd25eaf56619ef4cc39d81c11ca9b6a5cd45",class:"d-flex gap-3"},c("div",{key:"9930b0bd8881bc70bc5bdb2b31428980ec83a49b",class:"d-flex align-items-center"},c("img",{key:"ac71b5e64fd9081e8dc9c962cac1e747f2234fc4",src:this.imageUrl,alt:this.modelName,height:75,width:75,part:s})),c("div",{key:"0d575087df793cdeaf7bc04744d60647ea7d563f",class:"d-flex flex-column flex-grow-1 gap-3 p-4 justify-content-center"},c("div",{key:"35f18a705ee606a825c8ad7a6ebe449e6941e4e5",class:"row"},c("div",{key:"bf4f916904479fc7abf3167cacd9a655709a5048",class:"col-6 d-flex gap-2"},this.modelName,c("form-control-tooltip",{key:"1a96f19f6f9732c5f8d9dbb2405de2d3f24b142d",helpText:this.description})),c("div",{key:"af1ca75c5134c832d8f64b63833b7494c8c11ca5",class:"col-6 d-flex justify-content-end align-items-center"},c("button",{key:"0d400a00a808c508ba870dc8e37d597581dd86ae",class:"p-0 minus btn",onClick:this.removeUnit,part:a},"-"),c("div",{key:"4348aef4cf19c02c574242f82061087e74e82617",class:"w-25 text-center"},this.selectedQuantity),c("button",{key:"75791dfdb7861bb7c1e4a2dc5376bceb12a19009",class:"p-0 plus btn",onClick:this.addUnit,part:a},"+"))))))}};export{d as terminal_quantity_selector}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,r as a,c as t}from"./p-qipqIMyC.js";import{e as s,d,s as i}from"./p-BHf9IqGw.js";import{M as c}from"./p-C_3N7nqh.js";import{a as f,b as l,D as b,c as h,C as r,E as o}from"./p-BIPdn2VU.js";import{S as y}from"./p-CLQx9p9q.js";import"./p-CZfYo5-1.js";import{S as p}from"./p-Xv8DuU3Y.js";import{a as n,B as v}from"./p-D--yCspA.js";import"./p-HXpYMWUU.js";import"./p-RvUQ__Pq.js";const u=()=>e("div",{class:"row gap-3"},e("div",{class:"col-12"},e(p,{width:"35%",height:"30px"})),e("div",{class:"col-12"},e(p,{width:"70%"})),e("div",{class:"col-12"},e(p,{width:"40%"})),e("div",{class:"col-12"},e(p,{width:"40%"})),e("div",{class:"col-12"},e(p,{width:"100%"})),e("div",{class:"col-12"},e(p,{width:"80%"}))),k=class{constructor(e){a(this,e),this.errorEvent=t(this,"error-event"),this.loading=!0}componentWillLoad(){this.getPaymentDetails&&this.fetchData()}updateOnPropChange(){this.fetchData()}fetchData(){this.loading=!0,this.getPaymentDetails({onSuccess:({payment:e})=>{this.payment=e,this.errorMessage=null},onError:({error:e,code:a,severity:t})=>{this.errorMessage=e,this.errorEvent.emit({errorCode:a,message:e,severity:t})},final:()=>{this.loading=!1}})}render(){return e(y,{key:"a94fc292445a0d8d3d77b0702fe5f19efc432634"},this.loading&&e(u,{key:"d07e44b295fd5ce424a0a67d21e3c4ceec4634f4"}),!this.loading&&this.errorMessage&&o(this.errorMessage),!this.loading&&!this.errorMessage&&this.payment&&e("justifi-details",{key:"c6cd0c034c948b4b96415b5bde6a3808dc1686e2","error-message":this.errorMessage},e(f,{key:"cff0b6a11617d68a42f20d6e3631097bafc34971",slot:"head-info",badge:e("div",{class:"d-flex gap-1"},c(this.payment.status),this.payment.expedited?e(n,{variant:v.WARNING,title:"Expedited",text:"Expedited"}):null),title:this.payment.formattedPaymentAmount(this.payment.amount)},e(l,{key:"a143d34fd230aa855286b1252b8e032f94fbd9a9",classes:"border-1 border-end",title:"Updated At",value:`${s(this.payment.updated_at)} ${d(this.payment.updated_at)}`}),e(l,{key:"96e5af4a6c37667a4be5bf27cdfec6a5ea3978fd",classes:"border-1 border-end",title:"Created At",value:`${s(this.payment.created_at)} ${d(this.payment.created_at)}`}),e(l,{key:"76f2fd4b5569ad4f6463fb36984e3d4309235473",title:"ID",value:this.payment.id})),e("div",{key:"9d5b04c789c248b358ffecfebac6b62a1d8f0a27",slot:"detail-sections"},e(b,{key:"78f20430c4935b222c954fdc6eba89e715f668fc",sectionTitle:"Details"}),e("div",{key:"77d314983116b6dd2fc9989c1987d2371b5902b7",class:"d-table gap-2 w-100"},e(h,{key:"41c4eb6797577967d4ee6bc6a546faf62bca48c6",title:"Amount",value:this.payment.formattedPaymentAmount(this.payment.amount)}),e(h,{key:"51308e304e515290f1d4e96fda9ed0b7c9523055",title:"Fees",value:this.payment.formattedPaymentAmount(this.payment.fee_amount)}),e(h,{key:"e6d24cb563963c8a540969437dd70674f04c02fc",title:"Refunded",value:this.payment.formattedPaymentAmount(this.payment.amount_refunded)}),e(h,{key:"1640fe0c210efb6193cc791624fd274299516f4e",title:"Net",value:this.payment.formattedPaymentAmount(this.payment.balance)}),e(h,{key:"9f2f34ef1aa4e2ec522ceda4bcdf398ede745c65",title:"Status",value:c(this.payment.status)}),e(h,{key:"9f1cf33ce4a80dc55efc2d88882e9f52933e4aaa",title:"Payment ID",value:this.payment.id}),e(h,{key:"2ec3eca801e5187912dc8107644270da03679a79",title:"Processing Fees",value:this.payment.formattedPaymentAmount(this.payment.fee_amount)}),e(h,{key:"14065f819a71be0bee5a7980f66d88852a96a152",title:"Statement Descriptor",value:this.payment.statement_descriptor}),e(h,{key:"7c5f72aaf86eaf7ef035cd359822988573a42862",title:"Description",value:this.payment.description}),e(h,{key:"b1081bad614684d8205ca3377e16bd2377d6da88",title:"Expedited",value:this.payment.expedited?"Yes":"No"})),this.payment.payment_method.card&&[e(b,{key:"a3e655f58e6482800dc53e55c5dd17d9e41ad08d",sectionTitle:"Payment Method"}),e("div",{key:"225667fced83ad89e25cfc19c950b870a2558308",class:"d-table gap-2 w-100"},e(h,{key:"58c44b427b356a3576584c6a59301efcab0ed67f",title:"ID",value:this.payment.payment_method.card.id}),e(h,{key:"a2b60b522a6fbed58ad06f0df88e551070faf752",title:"Payment Type",value:"Card"}),e(h,{key:"6e094728a62fcdd01d0fdadab0bce26894dcd4b6",title:"Last 4 Numbers",value:this.payment.payment_method.lastFourDigits}),e(h,{key:"3d703d83c3c7a115c6e64227a417997b63cf8748",title:"Brand",value:i(this.payment.payment_method.card.brand)}),e(h,{key:"cf5dd3615ce5770f071aad7f1144862f00af760d",title:"Cardholder",value:this.payment.payment_method.payersName}))],this.payment.payment_method.bank_account&&[e(b,{key:"8b167fe0967859af1555245634e4f6cdaae77ccf",sectionTitle:"Payment Method"}),e("div",{key:"3b84740a7e8f792b4f3987a88bff3e85003ea549",class:"d-table gap-2 w-100"},e(h,{key:"1ef1e3781ea046145c58c721f1abfb2183e81db1",title:"ID",value:this.payment.payment_method.bank_account.id}),e(h,{key:"383f4756aac8901eef21786d9c9c6ff5ce097d7d",title:"Last 4 Numbers",value:this.payment.last_four_digits}),e(h,{key:"3cbb0f11eaf47b3b3923d3371f33df95ca022bd8",title:"Bank Name",value:this.payment.payment_method.bank_account.brand}),e(h,{key:"b122e28ddb446b03b0a70b6cf3ac23fe84fd945d",title:"Account Owner",value:this.payment.payment_method.payersName}))],this.payment.metadata&&[e(b,{key:"5b6d6c2ade6badd80f8b6c4a4c6427710ba9ac66",sectionTitle:"Metadata"}),e("div",{key:"a3d59ae07f2601b0895624c0a640693ef076b71e",class:"d-table gap-2 w-100"},e(r,{key:"b61349ed2f6536b2131b05ed0e8e337733309117",metadata:this.payment.metadata}))])))}static get watchers(){return{getPaymentDetails:["updateOnPropChange"]}}};export{k as payment_details_core}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as e}from"./p-qipqIMyC.js";import"./p-Bp_QFeog.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import"./p-c4Mh3ZZ_.js";import{p as i}from"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{T as a,a as r,b as h,c as o,d as p,e as n,f as c,g as f,h as m,i as d,j as b,k as j,l as u}from"./p-BZ7C9duj.js";import{T as y}from"./p-CZfYo5-1.js";import{p as g,a as k}from"./p-CPVN4dXS.js";import{o as l,g as C}from"./p-DbX0g1WF.js";import"./p-DsAwPf2y.js";import"./p-BHf9IqGw.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-RvUQ__Pq.js";import"./p-xY5RkFuA.js";import"./p-C_3N7nqh.js";import"./p-D--yCspA.js";const w=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event"),this.errorEvent=s(this,"error-event"),this.payments=[],this.loading=!0,this.paging=i,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:y.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:y.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const e=this.payments.find((t=>t.id===s));this.clickEvent.emit({name:y.row,data:e})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.paymentsTable=new a(this.payments,this.columns,g,k),this.getPayments&&this.fetchData(),l("set",(()=>{this.pagingParams={}})),l("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getPayments({params:this.paymentParams,onSuccess:({payments:t,pagingInfo:s})=>{this.payments=t,this.paging=s,this.paymentsTable.collectionData=this.payments},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e})},final:()=>{this.loading=!1}})}get paymentParams(){const t=C();return Object.assign(Object.assign({},t),this.pagingParams)}get entityId(){return this.payments.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.paymentsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e(u,{key:"0f667b8996650351ee636d548437217696ba8845"},e(r,{key:"ea49b5f4a53b03525a960954df711f39ee1ec41d"},e(h,{key:"7e06f612e6aa80267abba505c5b44506a907ae1a"},e(o,{key:"561827555ab274f70fe4e2e08442689b82f8b2c9"},this.paymentsTable.columnData.map((t=>t)))),e(p,{key:"a1f724d553ca43fbe20aeeb1bcbedf87e7d5b917"},e(n,{key:"27c9f9e459857cf208f9bcb1a5a81f02fcac0850",columnSpan:this.paymentsTable.columnData.length,isLoading:this.loading}),e(c,{key:"546e87c7198e6b7efaf1dde4dba0e2bc9dd9e4a7",isEmpty:this.showEmptyState,columnSpan:this.paymentsTable.columnData.length}),e(f,{key:"cbb35d379ac52943549b58128af24f682b53254f",columnSpan:this.paymentsTable.columnData.length,errorMessage:this.errorMessage}),this.showRowData&&this.paymentsTable.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(d,{key:"4b8de6a6841bd6f087f8819febd3136742e535eb"},e(b,{key:"cb2f446cd73c72e551378d73d5fb7089bcf9b8a0"},e(j,{key:"01098f6891794529ddfc1d7b1303706313694316",colSpan:this.paymentsTable.columnData.length},e("pagination-menu",{key:"a907422b1d6246570d14862478154465c4ad59c9",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getPayments:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{w as payments_list_core}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as r}from"./p-qipqIMyC.js";import{A as o}from"./p-BUa0YOaw.js";import{C as i,a as e}from"./p-Cjcsf8ku.js";import"./p-c4Mh3ZZ_.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as a,a as p}from"./p-D2muobcE.js";import{E as n}from"./p-BIPdn2VU.js";import{c as h,J as c}from"./p-CtA2NMVz.js";import"./p-Bp_QFeog.js";import"./p-DsAwPf2y.js";import"./p-BHf9IqGw.js";import"./p-HXpYMWUU.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-RvUQ__Pq.js";import"./p-tyhA5jkt.js";const m=o();class u{async fetchGrossVolumeChartData(t,s){return m.get({endpoint:`account/${t}/reports/gross_volume`,authToken:s})}}const d=class{constructor(r){t(this,r),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){h(),this.analytics=new c(this),this.initializeGetGrossPayment()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetGrossPayment()}initializeGetGrossPayment(){this.accountId&&this.authToken?this.getGrossPayment=(({id:t,authToken:s,service:r})=>async({onSuccess:o,onError:e})=>{var n;try{const h=await r.fetchGrossVolumeChartData(t,s);h.error?e({error:p(h.error),code:a(null===(n=h.error)||void 0===n?void 0:n.code),severity:i.ERROR}):o(h.data)}catch(t){const s=a(null==t?void 0:t.code);e({error:p(t),code:s,severity:i.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new u}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:e.MISSING_PROPS,message:this.errorMessage,severity:i.ERROR}))}render(){return this.errorMessage?n(this.errorMessage):r("gross-payment-chart-core",{getGrossPayment:this.getGrossPayment,"onError-event":this.handleErrorEvent})}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{d as justifi_gross_payment_chart}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as s,r as i,c as t}from"./p-qipqIMyC.js";import{c as r,F as e}from"./p-CR9D6mKt.js";import{b as o,a}from"./p-DSP8qjHL.js";import{i as p,a as h}from"./p-PgEzcvI6.js";import"./p-Bp_QFeog.js";import"./p-HXpYMWUU.js";import{C as n,a as l}from"./p-Cjcsf8ku.js";import"./p-c4Mh3ZZ_.js";import"./p-CLHwhyvu.js";import{B as m,b as c}from"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{c as d,J as j}from"./p-CtA2NMVz.js";import{B as u}from"./p-D6XirF21.js";import{S as f}from"./p-CLQx9p9q.js";import{H as v}from"./p-CQeex56P.js";import"./p-CZfYo5-1.js";import{S as b}from"./p-Xv8DuU3Y.js";import{B as w}from"./p-XYgDHrVL.js";import{m as C,b as g}from"./p-5aA7gjr5.js";import{B as y}from"./p-B4idKqyn.js";import"./p-BFTU3MAI.js";import"./p-CYBR4K2p.js";import"./p-BX8GieXu.js";import"./p-yH3TC3ZQ.js";import"./p-DsAwPf2y.js";import"./p-BHf9IqGw.js";import"./p-Dt-vy9Le.js";import"./p-tyhA5jkt.js";import"./p-BUa0YOaw.js";import"./p-RvUQ__Pq.js";import"./p-D2muobcE.js";const B=r(Object.assign(Object.assign({},o().fields),{legal_address:h(),additional_questions:a(),representative:p("representative")})),q=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(b,{width:"25%"})),s("div",{class:"col-12"},s(b,{width:"100%"})),s("div",{class:"col-12 d-flex gap-3"},s(b,{width:"50%"}),s(b,{width:"50%"})),s("div",{class:"col-12 d-flex gap-3"},s(b,{width:"65%"}),s(b,{width:"35%"}))),x=()=>s("div",{class:"row gap-5"},s("div",{class:"col-12"},s(b,{width:"40%",height:"40px"})),s(q,null),s(q,null),s(q,null)),k=class{constructor(s){i(this,s),this.submitEvent=t(this,"submit-event"),this.clickEvent=t(this,"click-event"),this.errorEvent=t(this,"error-event"),this.isLoading=!1,this.isSaving=!1,this.hideErrors=!1,this.formTitle="Business Information",this.removeTitle=!1,this.instantiateBusiness=s=>{const i=new m(s);this.formController.setInitialValues(Object.assign({},i))},this.sendData=async()=>{this.isSaving=!0;const s=this.formController.values.getValue(),i=this.formController.getInitialValues(),t=new m(Object.assign(Object.assign({},i),s)).payload;this.patchBusiness({payload:t,onSuccess:s=>{this.handleReponse(s)},onError:({error:s,code:i,severity:t})=>{this.errorMessage=s.message,this.errorEvent.emit({errorCode:i,message:s.message,severity:t})},final:()=>{this.isSaving=!1}})},this.validateAndSubmit=s=>{s.preventDefault(),this.formController.validateAndSubmit(this.sendData)}}componentWillLoad(){d(),this.analytics=new j(this),this.formController=new e(B),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=C({authToken:this.authToken,businessId:this.businessId,service:new y}),this.patchBusiness=g({authToken:this.authToken,businessId:this.businessId,service:new y}),this.getBusiness({onSuccess:s=>{this.instantiateBusiness(s.data)},onError:({error:s,code:i,severity:t})=>{this.errorMessage=s.message,this.errorEvent.emit({errorCode:i,message:s.message,severity:t})},final:()=>{this.isLoading=!1}})):this.errorEvent.emit({message:"auth-token and business-id are required",errorCode:l.MISSING_PROPS,severity:n.ERROR})}handleReponse(s){s.error&&(this.errorMessage=c.patchData),this.submitEvent.emit({response:s}),this.instantiateBusiness(s.data)}render(){return s(f,null,this.isLoading?s(x,null):s("form",{onSubmit:this.validateAndSubmit},s("div",{class:"row gap-3"},s(v,{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})),s("div",{class:"col-12 mb-4"},s("justifi-legal-address-form",{formController:this.formController})),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})),s("div",{class:"col-12 d-flex flex-row-reverse"},s(u,{type:"submit",disabled:this.disabledState,variant:"primary",onClick:()=>this.clickEvent.emit({name:w.submit}),isLoading:this.isSaving},"Submit")))))}};export{k as justifi_business_form}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,h as t}from"./p-qipqIMyC.js";import{S as e}from"./p-CLQx9p9q.js";import{S as i}from"./p-Xv8DuU3Y.js";import"./p-RvUQ__Pq.js";const r=class{constructor(t){s(this,t)}render(){return t(e,{key:"c995981caeae785829f1ef75454b2759243e8adb"},t(i,{key:"9c63cf385499820bb1acd3503e126363485684f6",component:this.component,height:this.height,width:this.width,className:this.class,styles:this.customStyle}))}};export{r as justifi_skeleton}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r,c as s,h as t}from"./p-qipqIMyC.js";import{S as i}from"./p-CLQx9p9q.js";import"./p-CZfYo5-1.js";import{c as o,J as e}from"./p-CtA2NMVz.js";import{d as a}from"./p-CaxjN6Uo.js";import"./p-Bp_QFeog.js";import"./p-HXpYMWUU.js";import{C as n,a as p}from"./p-Cjcsf8ku.js";import{h as c}from"./p-c4Mh3ZZ_.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as m,a as h}from"./p-D2muobcE.js";import{A as d}from"./p-BUa0YOaw.js";import"./p-tyhA5jkt.js";import"./p-RvUQ__Pq.js";import"./p-BHf9IqGw.js";import"./p-D--yCspA.js";import"./p-DsAwPf2y.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const l=d();class j{async fetchTerminalOrders(r,s,t){return l.get({endpoint:"terminals/orders",params:t,headers:{account:r},authToken:s})}}const f=class{constructor(t){r(this,t),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=a,this.handleErrorEvent=r=>{this.errorMessage=r.detail.message,this.errorEvent.emit(r.detail)}}componentWillLoad(){o(),this.analytics=new e(this),this.initializeGetData()}disconnectedCallback(){var r;null===(r=this.analytics)||void 0===r||r.cleanup()}initializeGetData(){this.accountId&&this.authToken?this.getTerminalOrders=(({id:r,authToken:s,service:t})=>async({params:i,onSuccess:o,onError:e,final:a})=>{var p,d;try{const a=await t.fetchTerminalOrders(r,s,i);if(a.error)return e({error:h(a.error),code:m(null===(d=a.error)||void 0===d?void 0:d.code),severity:n.ERROR});{const r=Object.assign({},a.page_info);o({terminalOrders:(null===(p=a.data)||void 0===p?void 0:p.map((r=>new c(r))))||[],pagingInfo:r})}}catch(r){const s=m(null==r?void 0:r.code);return e({error:r.message||r,code:s,severity:n.ERROR})}finally{return a()}})({id:this.accountId,authToken:this.authToken,service:new j}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:p.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return t(i,{key:"55f0bf858787e00c304972c941a477815712df9d"},t("terminal-orders-list-core",{key:"2d47e23bc2157d79254f34dfe0551fb32a9d88cc",getTerminalOrders:this.getTerminalOrders,"onError-event":this.handleErrorEvent,columns:this.columns}))}};export{f as justifi_terminal_orders_list}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as n,H as t,c as i,g as o}from"./p-Bn7inNWG.js";import{c as r}from"./p-CpaS1Lex.js";import{i as a,b as s,a as c,c as d,l as u}from"./p-RvUQ__Pq.js";import{g as f}from"./p-BFTU3MAI.js";import{F as l}from"./p-BfM6X7lF.js";import{p as h}from"./p-BiWRKUx3.js";const m=r({focused:{boxShadow:"",border:""},focusedAndInvalid:{boxShadow:"",border:""},fontStyles:{fontFamily:"",fontSize:"",fontWeight:"",lineHeight:"",margin:"",padding:""}}),{state:w,set:b}=m,g=class{constructor(n){e(this,n),this.isFocused=!1,this.errorText=""}async componentDidLoad(){const e=await this.getBaseFontStyles();b("fontStyles",e);const n=await this.getFocusedStyles();b("focused",n);const t=await this.getFocusedAndInvalidStyles();b("focusedAndInvalid",t)}async getBaseFontStyles(){return new Promise((e=>{setTimeout((()=>{const n=getComputedStyle(this.hiddenInput);e({fontFamily:n.fontFamily,fontSize:n.fontSize,fontWeight:n.fontWeight,lineHeight:n.lineHeight,margin:n.margin,padding:n.padding,color:n.color})}),500)}))}async getFocusedStyles(){return new Promise((e=>{this.hiddenInput.focus(),setTimeout((()=>{this.hiddenInput.blur();let n=getComputedStyle(this.hiddenInput);e({boxShadow:n.boxShadow,border:n.border})}),500)}))}async getFocusedAndInvalidStyles(){return new Promise((e=>{this.hiddenInput.focus(),this.errorText="Error",setTimeout((()=>{const n=getComputedStyle(this.hiddenInput),t={boxShadow:n.boxShadow,border:n.border};this.hiddenInput.blur(),e(t)}),500)}))}get part(){return this.isFocused&&this.errorText?a:this.errorText?s:this.isFocused?c:d}render(){return n(t,{key:"371bbf07abe040e607c3f2a548204193702b868c"},n("input",{key:"05ab53862e84dd10ec59b7b77df8480b4e16a41f",ref:e=>this.hiddenInput=e,type:"text",class:this.errorText?"form-control is-invalid":"form-control",onFocus:()=>this.isFocused=!0,onBlur:()=>this.isFocused=!1,part:this.part,tabindex:"-1",style:{height:"0",opacity:"0",pointerEvents:"none",animation:"none"}}))}};var p,y,v={exports:{}},k=f((p||(p=1,y=v,console.info("\nIFRAME-RESIZER\n\nIframe-Resizer 5 is now available via the following two packages:\n\n * @iframe-resizer/parent\n * @iframe-resizer/child\n\nAdditionally their are also new versions of iframe-resizer for React, Vue, and jQuery.\n\nVersion 5 of iframe-resizer has been extensively rewritten to use modern browser APIs, which has enabled significantly better performance and greater accuracy in the detection of content resizing events.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n"),function(e){if("undefined"!=typeof window){var n,t,i=0,o=!1,r=!1,a="[iFrameSizer]",s=null,c=window.requestAnimationFrame,d=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),u={},f=null,l=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,license:"1jqr0si6pnt",log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){k("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),h={};window.jQuery!==e&&((t=window.jQuery).fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(e){return this.filter("iframe").each((function(n,t){W(t,e)})).end()}):v("","Unable to bind to jQuery, it is not fully loaded.")),y.exports=P(),window.iFrameResize=window.iFrameResize||P()}function m(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function w(e,n,t){e.addEventListener(n,t,!1)}function b(e,n,t){e.removeEventListener(n,t,!1)}function g(e){return u[e]?u[e].log:o}function p(e,n){x("log",e,n,g(e))}function v(e,n){x("info",e,n,g(e))}function k(e,n){x("warn",e,n,!0)}function x(e,n,t,i){!0===i&&"object"==typeof window.console&&console[e](function(e){return a+"["+function(e){var n="Host page: "+e;return window.top!==window.self&&(n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),n}(e)+"]"}(n),t)}function F(e){function n(){t("Height"),t("Width"),C((function(){O(A),T(L),l("onResized",A)}),A,"init")}function t(e){var n=Number(u[L]["max"+e]),t=Number(u[L]["min"+e]),i=e.toLowerCase(),o=Number(A[i]);p(L,"Checking "+i+" is in range "+t+"-"+n),o<t&&(o=t,p(L,"Set "+i+" to min value")),o>n&&(o=n,p(L,"Set "+i+" to max value")),A[i]=""+o}function i(e){return W.slice(W.indexOf(":")+7+e)}function o(e,n){var t,i;t=function(){var t,i;N("Send Page Info","pageInfo:"+(t=document.body.getBoundingClientRect(),i=A.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(i.top-t.top,10),offsetLeft:parseInt(i.left-t.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,n)},h[i=n]||(h[i]=setTimeout((function(){h[i]=null,t()}),32))}function r(e){var n=e.getBoundingClientRect();return M(L),{x:Math.floor(Number(n.left)+Number(s.x)),y:Math.floor(Number(n.top)+Number(s.y))}}function c(e){var n=e?r(A.iframe):{x:0,y:0},t={x:Number(A.width)+n.x,y:Number(A.height)+n.y};p(L,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top===window.self?(s=t,d(),p(L,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](t.x,t.y):k(L,"Unable to scroll to requested position, window.parentIFrame not found")}function d(){!1===l("onScroll",s)?j():T(L)}function f(e){var n={};if(0===Number(A.width)&&0===Number(A.height)){var t=i(9).split(":");n={x:t[1],y:t[0]}}else n={x:A.width,y:A.height};l(e,{iframe:A.iframe,screenX:Number(n.x),screenY:Number(n.y),type:A.type})}function l(e,n){return I(L,e,n)}var m,g,y,x,F,z,W=e.data,A={},L=null;"[iFrameResizerChild]Ready"===W?function(){for(var e in u)N("iFrame requested init",E(e),u[e].iframe,e)}():a===(""+W).slice(0,13)&&W.slice(13).split(":")[0]in u?(x=(y=W.slice(13).split(":"))[1]?parseInt(y[1],10):0,F=u[y[0]]&&u[y[0]].iframe,z=getComputedStyle(F),A={iframe:F,id:y[0],height:x+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(z)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(z),width:y[2],type:y[3]},u[L=A.id]&&(u[L].loaded=!0),(g=A.type in{true:1,false:1,undefined:1})&&p(L,"Ignoring init message from meta parent page"),!g&&function(e){var n=!0;return u[e]||(n=!1,k(A.type+" No settings for "+e+". Message was: "+W)),n}(L)&&(p(L,"Received: "+W),m=!0,null===A.iframe&&(k(L,"IFrame ("+A.id+") not found"),m=!1),m&&function(){var n,t=e.origin,i=u[L]&&u[L].checkOrigin;if(i&&""+t!="null"&&!(i.constructor===Array?function(){var e=0,n=!1;for(p(L,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===t){n=!0;break}return n}():(p(L,"Checking connection is from: "+(n=u[L]&&u[L].remoteHost)),t===n)))throw new Error("Unexpected message received from: "+t+" for "+A.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(u[L]&&u[L].firstRun&&u[L]&&(u[L].firstRun=!1),A.type){case"close":S(A.iframe);break;case"message":m=i(6),p(L,"onMessage passed: {iframe: "+A.iframe.id+", message: "+m+"}"),l("onMessage",{iframe:A.iframe,message:JSON.parse(m)}),p(L,"--");break;case"mouseenter":f("onMouseEnter");break;case"mouseleave":f("onMouseLeave");break;case"autoResize":u[L].autoResize=JSON.parse(i(9));break;case"scrollTo":c(!1);break;case"scrollToOffset":c(!0);break;case"pageInfo":o(u[L]&&u[L].iframe,L),function(){function e(e,i){function r(){u[t]?o(u[t].iframe,t):n()}["scroll","resize"].forEach((function(n){p(t,e+n+" listener for sendPageInfo"),i(window,n,r)}))}function n(){e("Remove ",b)}var t=L;e("Add ",w),u[t]&&(u[t].stopPageInfo=n)}();break;case"pageInfoStop":u[L]&&u[L].stopPageInfo&&(u[L].stopPageInfo(),delete u[L].stopPageInfo);break;case"inPageLink":t=i(9).split("#")[1]||"",a=decodeURIComponent(t),(h=document.getElementById(a)||document.getElementsByName(a)[0])?(e=r(h),p(L,"Moving to in page link (#"+t+") at x: "+e.x+" y: "+e.y),s={x:e.x,y:e.y},d(),p(L,"--")):window.top===window.self?p(L,"In page link #"+t+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(t):p(L,"In page link #"+t+" not found and window.parentIFrame not found");break;case"reset":R(A);break;case"init":n(),l("onInit",A.iframe);break;default:0===Number(A.width)&&0===Number(A.height)?k("Unsupported message received ("+A.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):n()}var e,t,a,h,m}())):v(L,"Ignored: "+W)}function I(e,n,t){var i=null,o=null;if(u[e]){if("function"!=typeof(i=u[e][n]))throw new TypeError(n+" on iFrame["+e+"] is not a function");o=i(t)}return o}function z(e){delete u[e.id]}function S(e){var t=e.id;if(!1!==I(t,"onClose",t)){p(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){k(e)}I(t,"onClosed",t),p(t,"--"),z(e),n&&(n.disconnect(),n=null)}else p(t,"Close iframe cancelled by onClose event")}function M(n){null===s&&p(n,"Get page position: "+(s={x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset}).x+","+s.y)}function T(e){null!==s&&(window.scrollTo(s.x,s.y),p(e,"Set page position: "+s.x+","+s.y),j())}function j(){s=null}function R(e){p(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),M(e.id),C((function(){O(e),N("reset","reset",e.iframe,e.id)}),e,"reset")}function O(e){function n(n){r||"0"!==e[n]||(r=!0,p(i,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(u).forEach((function(e){!function(e){function n(n){return"0px"===(u[e]&&u[e].iframe.style[n])}u[e]&&null!==u[e].iframe.offsetParent&&(n("height")||n("width"))&&N("Visibility change","resize",u[e].iframe,e)}(e)}))}function n(n){p("window","Mutation observed: "+n[0].target+" "+n[0].type),A(e,16)}var t,i=m();i&&(t=document.querySelector("body"),new i(n).observe(t,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}())}function t(t){!function(n){e.id?(e.iframe.style[n]=e[n]+"px",p(e.id,"IFrame ("+i+") "+n+" set to "+e[n]+"px")):p("undefined","messageData id not set")}(t),n(t)}var i=e.iframe.id;u[i]&&(u[i].sizeHeight&&t("height"),u[i].sizeWidth&&t("width"))}function C(e,n,t){t!==n.type&&c&&!window.jasmine?(p(n.id,"Requesting animation frame"),c(e)):e()}function N(e,n,t,i,o){var r,s=!1;u[i=i||t.id]&&(t&&"contentWindow"in t&&null!==t.contentWindow?(p(i,"["+e+"] Sending msg to iframe["+i+"] ("+n+") targetOrigin: "+(r=u[i]&&u[i].targetOrigin)),t.contentWindow.postMessage(a+n,r)):k(i,"["+e+"] IFrame("+i+") not found"),o&&u[i]&&u[i].warningTimeout&&(u[i].msgTimeout=setTimeout((function(){!u[i]||u[i].loaded||s||(s=!0,k(i,"IFrame has not responded within "+u[i].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),u[i].warningTimeout)))}function E(e){return e+":"+u[e].bodyMarginV1+":"+u[e].sizeWidth+":"+u[e].log+":"+u[e].interval+":"+u[e].enablePublicMethods+":"+u[e].autoResize+":"+u[e].bodyMargin+":"+u[e].heightCalculationMethod+":"+u[e].bodyBackground+":"+u[e].bodyPadding+":"+u[e].tolerance+":"+u[e].inPageLinks+":"+u[e].resizeFrom+":"+u[e].widthCalculationMethod+":"+u[e].mouseEvents}function W(t,r){function a(e){var n=e.split("Callback");if(2===n.length){var t="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[t]=this[e],delete this[e],k(f,"Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version.")}}var s,c,f=function(e){if("string"!=typeof e)throw new TypeError("Invaild id for iFrame. Expected String");var n;return""===e&&(t.id=(n=r&&r.id||l.id+i++,null!==document.getElementById(n)&&(n+=i++),e=n),o=(r||{}).log,p(e,"Added missing iframe ID: "+e+" ("+t.src+")")),e}(t.id);f in u&&"iFrameResizer"in t?k(f,"Ignored iFrame, already setup."):(function(e){var n;e=e||{},u[f]=Object.create(null),u[f].iframe=t,u[f].firstRun=!0,u[f].remoteHost=t.src&&t.src.split("/").slice(0,3).join("/"),function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(e),Object.keys(e).forEach(a,e),function(e){for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(u[f][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:l[n])}(e),u[f]&&(u[f].targetOrigin=!0===u[f].checkOrigin?""===(n=u[f].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*")}(r),function(){switch(p(f,"IFrame scrolling "+(u[f]&&u[f].scrolling?"enabled":"disabled")+" for "+f),t.style.overflow=!1===(u[f]&&u[f].scrolling)?"hidden":"auto",u[f]&&u[f].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=u[f]?u[f].scrolling:"no"}}(),function(){function e(e){var n=u[f][e];1/0!==n&&0!==n&&(t.style[e]="number"==typeof n?n+"px":n,p(f,"Set "+e+" = "+t.style[e]))}function n(e){if(u[f]["min"+e]>u[f]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(u[f]&&u[f].bodyMargin)&&"0"!==(u[f]&&u[f].bodyMargin)||(u[f].bodyMarginV1=u[f].bodyMargin,u[f].bodyMargin=u[f].bodyMargin+"px"),s=E(f),(c=m())&&(n=function(e){if(!t.parentNode)return null;var n=new e((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===t&&S(t)}))}))}));return n.observe(t.parentNode,{childList:!0}),n}(c)),w(t,"load",(function(){N("iFrame.onload",s,t,e,!0),(!u[f]||!u[f].firstRun)&&u[f]&&u[f].heightCalculationMethod in d&&R({iframe:t,height:0,width:0,type:"init"})})),N("init",s,t,e,!0),u[f]&&(u[f].iframe.iFrameResizer={close:S.bind(null,u[f].iframe),removeListeners:z.bind(null,u[f].iframe),resize:N.bind(null,"Window resize","resize",u[f].iframe),moveToAnchor:function(e){N("Move to anchor","moveToAnchor:"+e,u[f].iframe,f)},sendMessage:function(e){N("Send Message","message:"+(e=JSON.stringify(e)),u[f].iframe,f)}}))}function A(e,n){null===f&&(f=setTimeout((function(){f=null,e()}),n))}function L(){"hidden"!==document.visibilityState&&(p("document","Trigger event: Visibility change"),A((function(){H("Tab Visible","resize")}),16))}function H(e,n){Object.keys(u).forEach((function(t){(function(e){return u[e]&&"parent"===u[e].resizeFrom&&u[e].autoResize&&!u[e].firstRun})(t)&&N(e,n,u[t].iframe,t)}))}function P(){function n(e,n){n&&(function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),W(n,e),t.push(n))}var t;return function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!c;e+=1)c=window[n[e]+"RequestAnimationFrame"];c?c=c.bind(window):p("setup","RequestAnimationFrame not supported")}(),w(window,"message",F),w(window,"resize",(function(){p("window","Trigger event: resize"),A((function(){H("Window resize","resize")}),16)})),w(document,"visibilitychange",L),w(document,"-webkit-visibilitychange",L),function(i,o){switch(t=[],function(e){e&&e.enablePublicMethods&&k("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(i),typeof o){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(o||"iframe"),n.bind(e,i));break;case"object":n(i,o);break;default:throw new TypeError("Unexpected data type ("+typeof o+")")}return t}}}()),v.exports));class x{constructor(e,n){this.iframe=e,this.iframeOrigin=n}postMessage(e,n){const t=Object.assign({eventType:e},n);this.iframe.contentWindow.postMessage(t,this.iframeOrigin)}addMessageListener(e){window.addEventListener("message",e)}removeMessageListener(e){window.removeEventListener("message",e)}postMessageWithResponseListener(e,n){return new Promise((t=>{const i=n=>{n.data.eventType===e&&(window.removeEventListener("message",i),t(n.data.data))};window.addEventListener("message",i),this.postMessage(e,n)}))}}const F=class{constructor(n){e(this,n),this.iframeLoaded=i(this,"iframeLoaded"),this.isFocused=!1,this.isValid=!0,this.dispatchMessageEvent=e=>{const{eventType:n,data:t}=e.data;(null==t?void 0:t.id)===this.inputId&&("focused"===n&&(this.isFocused=!0),"blurred"===n&&(this.isFocused=!1))}}disconnectedCallback(){this.frameService.removeMessageListener(this.dispatchMessageEvent)}async validate(){const e=await this.frameService.postMessageWithResponseListener("validate");return this.isValid=e.isValid,this.errorText=e.error.message,e}async tokenize(e,n,t){return this.frameService.postMessageWithResponseListener("tokenize",{clientId:e,paymentMethodMetadata:n,account:t,componentVersion:h.version})}initializeFrameCommunicationService(){var e;this.frameService=new x(this.iframeElement,this.iframeOrigin),null===(e=this.frameService)||void 0===e||e.addMessageListener(this.dispatchMessageEvent)}get part(){return this.isFocused&&!this.isValid?a:this.isValid?this.isFocused?c:d:s}get style(){return this.isFocused?this.isValid?w.focused:w.focusedAndInvalid:null}get urlParams(){const e=Object.fromEntries(Object.entries(w.fontStyles).map((([e,n])=>[e,btoa(String(n))])));return new URLSearchParams(e).toString()}render(){return n(t,{key:"d77a2d0b61928a0194ee7662fd6a16d47666c304",class:"form-group d-flex flex-column"},n("div",{key:"a34d32b6497924fadef2dba7beec4e99233645ed",style:{visibility:this.iframeLoaded?"visible":"hidden",height:this.iframeLoaded?"auto":"0"}},n("label",{key:"fe606e175435571ba5a5617abe36468e4627dcc0",class:"form-label",htmlFor:"",part:u},this.label||""),n("div",{key:"e3355a4ad2960fc6b3fc9ad46092e570ed7b4397",class:"p-0 d-flex form-control "+(this.isValid?"":"is-invalid"),part:this.part,style:Object.assign(Object.assign({},this.style),{overflow:"hidden"})},n("iframe",{key:"83d0ab3c20019a33dc7d72b0378ccf95eb77e95f",id:this.inputId,name:this.inputId,src:`${this.iframeOrigin}?${this.urlParams}`,ref:e=>{this.iframeElement=e,this.initializeFrameCommunicationService()},width:"100%",onLoad:()=>{k({log:!1,onResized:()=>{this.iframeLoaded.emit()}},this.iframeElement)}})),n(l,{key:"e8bf25dfe4ad6296e3a64132559c7ccce632b12a",errorText:this.errorText,name:this.inputId})))}get el(){return o(this)}};export{g as hidden_input,F as iframe_input}
|
|
1
|
+
import{r as e,h as n,H as t,c as i,g as o}from"./p-qipqIMyC.js";import{c as r}from"./p-DsAwPf2y.js";import{i as a,b as s,a as c,c as d,l as u}from"./p-RvUQ__Pq.js";import{g as f}from"./p-BFTU3MAI.js";import{F as l}from"./p-DCMrHeJI.js";import{p as h}from"./p-tyhA5jkt.js";const m=r({focused:{boxShadow:"",border:""},focusedAndInvalid:{boxShadow:"",border:""},fontStyles:{fontFamily:"",fontSize:"",fontWeight:"",lineHeight:"",margin:"",padding:""}}),{state:w,set:b}=m,g=class{constructor(n){e(this,n),this.isFocused=!1,this.errorText=""}async componentDidLoad(){const e=await this.getBaseFontStyles();b("fontStyles",e);const n=await this.getFocusedStyles();b("focused",n);const t=await this.getFocusedAndInvalidStyles();b("focusedAndInvalid",t)}async getBaseFontStyles(){return new Promise((e=>{setTimeout((()=>{const n=getComputedStyle(this.hiddenInput);e({fontFamily:n.fontFamily,fontSize:n.fontSize,fontWeight:n.fontWeight,lineHeight:n.lineHeight,margin:n.margin,padding:n.padding,color:n.color})}),500)}))}async getFocusedStyles(){return new Promise((e=>{this.hiddenInput.focus(),setTimeout((()=>{this.hiddenInput.blur();let n=getComputedStyle(this.hiddenInput);e({boxShadow:n.boxShadow,border:n.border})}),500)}))}async getFocusedAndInvalidStyles(){return new Promise((e=>{this.hiddenInput.focus(),this.errorText="Error",setTimeout((()=>{const n=getComputedStyle(this.hiddenInput),t={boxShadow:n.boxShadow,border:n.border};this.hiddenInput.blur(),e(t)}),500)}))}get part(){return this.isFocused&&this.errorText?a:this.errorText?s:this.isFocused?c:d}render(){return n(t,{key:"bf8fcd89cdc8fcd1bfd8b9af5a7211c877e482ba"},n("input",{key:"f202d9252b60195b193a8203f750730fcf2e271b",ref:e=>this.hiddenInput=e,type:"text",class:this.errorText?"form-control is-invalid":"form-control",onFocus:()=>this.isFocused=!0,onBlur:()=>this.isFocused=!1,part:this.part,tabindex:"-1",style:{height:"0",opacity:"0",pointerEvents:"none",animation:"none"}}))}};var p,y,v={exports:{}},k=f((p||(p=1,y=v,console.info("\nIFRAME-RESIZER\n\nIframe-Resizer 5 is now available via the following two packages:\n\n * @iframe-resizer/parent\n * @iframe-resizer/child\n\nAdditionally their are also new versions of iframe-resizer for React, Vue, and jQuery.\n\nVersion 5 of iframe-resizer has been extensively rewritten to use modern browser APIs, which has enabled significantly better performance and greater accuracy in the detection of content resizing events.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n"),function(e){if("undefined"!=typeof window){var n,t,i=0,o=!1,r=!1,a="[iFrameSizer]",s=null,c=window.requestAnimationFrame,d=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),u={},f=null,l=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,license:"1jqr0si6pnt",log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){k("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),h={};window.jQuery!==e&&((t=window.jQuery).fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(e){return this.filter("iframe").each((function(n,t){A(t,e)})).end()}):v("","Unable to bind to jQuery, it is not fully loaded.")),y.exports=L(),window.iFrameResize=window.iFrameResize||L()}function m(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function w(e,n,t){e.addEventListener(n,t,!1)}function b(e,n,t){e.removeEventListener(n,t,!1)}function g(e){return u[e]?u[e].log:o}function p(e,n){x("log",e,n,g(e))}function v(e,n){x("info",e,n,g(e))}function k(e,n){x("warn",e,n,!0)}function x(e,n,t,i){!0===i&&"object"==typeof window.console&&console[e](function(e){return a+"["+function(e){var n="Host page: "+e;return window.top!==window.self&&(n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),n}(e)+"]"}(n),t)}function I(e){function n(){t("Height"),t("Width"),C((function(){R(W),j(H),l("onResized",W)}),W,"init")}function t(e){var n=Number(u[H]["max"+e]),t=Number(u[H]["min"+e]),i=e.toLowerCase(),o=Number(W[i]);p(H,"Checking "+i+" is in range "+t+"-"+n),o<t&&(o=t,p(H,"Set "+i+" to min value")),o>n&&(o=n,p(H,"Set "+i+" to max value")),W[i]=""+o}function i(e){return A.slice(A.indexOf(":")+7+e)}function o(e,n){var t,i;t=function(){var t,i;E("Send Page Info","pageInfo:"+(t=document.body.getBoundingClientRect(),i=W.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(i.top-t.top,10),offsetLeft:parseInt(i.left-t.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,n)},h[i=n]||(h[i]=setTimeout((function(){h[i]=null,t()}),32))}function r(e){var n=e.getBoundingClientRect();return S(H),{x:Math.floor(Number(n.left)+Number(s.x)),y:Math.floor(Number(n.top)+Number(s.y))}}function c(e){var n=e?r(W.iframe):{x:0,y:0},t={x:Number(W.width)+n.x,y:Number(W.height)+n.y};p(H,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top===window.self?(s=t,d(),p(H,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](t.x,t.y):k(H,"Unable to scroll to requested position, window.parentIFrame not found")}function d(){!1===l("onScroll",s)?T():j(H)}function f(e){var n={};if(0===Number(W.width)&&0===Number(W.height)){var t=i(9).split(":");n={x:t[1],y:t[0]}}else n={x:W.width,y:W.height};l(e,{iframe:W.iframe,screenX:Number(n.x),screenY:Number(n.y),type:W.type})}function l(e,n){return z(H,e,n)}var m,g,y,x,I,F,A=e.data,W={},H=null;"[iFrameResizerChild]Ready"===A?function(){for(var e in u)E("iFrame requested init",N(e),u[e].iframe,e)}():a===(""+A).slice(0,13)&&A.slice(13).split(":")[0]in u?(x=(y=A.slice(13).split(":"))[1]?parseInt(y[1],10):0,I=u[y[0]]&&u[y[0]].iframe,F=getComputedStyle(I),W={iframe:I,id:y[0],height:x+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(F)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(F),width:y[2],type:y[3]},u[H=W.id]&&(u[H].loaded=!0),(g=W.type in{true:1,false:1,undefined:1})&&p(H,"Ignoring init message from meta parent page"),!g&&function(e){var n=!0;return u[e]||(n=!1,k(W.type+" No settings for "+e+". Message was: "+A)),n}(H)&&(p(H,"Received: "+A),m=!0,null===W.iframe&&(k(H,"IFrame ("+W.id+") not found"),m=!1),m&&function(){var n,t=e.origin,i=u[H]&&u[H].checkOrigin;if(i&&""+t!="null"&&!(i.constructor===Array?function(){var e=0,n=!1;for(p(H,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===t){n=!0;break}return n}():(p(H,"Checking connection is from: "+(n=u[H]&&u[H].remoteHost)),t===n)))throw new Error("Unexpected message received from: "+t+" for "+W.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(u[H]&&u[H].firstRun&&u[H]&&(u[H].firstRun=!1),W.type){case"close":M(W.iframe);break;case"message":m=i(6),p(H,"onMessage passed: {iframe: "+W.iframe.id+", message: "+m+"}"),l("onMessage",{iframe:W.iframe,message:JSON.parse(m)}),p(H,"--");break;case"mouseenter":f("onMouseEnter");break;case"mouseleave":f("onMouseLeave");break;case"autoResize":u[H].autoResize=JSON.parse(i(9));break;case"scrollTo":c(!1);break;case"scrollToOffset":c(!0);break;case"pageInfo":o(u[H]&&u[H].iframe,H),function(){function e(e,i){function r(){u[t]?o(u[t].iframe,t):n()}["scroll","resize"].forEach((function(n){p(t,e+n+" listener for sendPageInfo"),i(window,n,r)}))}function n(){e("Remove ",b)}var t=H;e("Add ",w),u[t]&&(u[t].stopPageInfo=n)}();break;case"pageInfoStop":u[H]&&u[H].stopPageInfo&&(u[H].stopPageInfo(),delete u[H].stopPageInfo);break;case"inPageLink":t=i(9).split("#")[1]||"",a=decodeURIComponent(t),(h=document.getElementById(a)||document.getElementsByName(a)[0])?(e=r(h),p(H,"Moving to in page link (#"+t+") at x: "+e.x+" y: "+e.y),s={x:e.x,y:e.y},d(),p(H,"--")):window.top===window.self?p(H,"In page link #"+t+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(t):p(H,"In page link #"+t+" not found and window.parentIFrame not found");break;case"reset":O(W);break;case"init":n(),l("onInit",W.iframe);break;default:0===Number(W.width)&&0===Number(W.height)?k("Unsupported message received ("+W.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):n()}var e,t,a,h,m}())):v(H,"Ignored: "+A)}function z(e,n,t){var i=null,o=null;if(u[e]){if("function"!=typeof(i=u[e][n]))throw new TypeError(n+" on iFrame["+e+"] is not a function");o=i(t)}return o}function F(e){delete u[e.id]}function M(e){var t=e.id;if(!1!==z(t,"onClose",t)){p(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){k(e)}z(t,"onClosed",t),p(t,"--"),F(e),n&&(n.disconnect(),n=null)}else p(t,"Close iframe cancelled by onClose event")}function S(n){null===s&&p(n,"Get page position: "+(s={x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset}).x+","+s.y)}function j(e){null!==s&&(window.scrollTo(s.x,s.y),p(e,"Set page position: "+s.x+","+s.y),T())}function T(){s=null}function O(e){p(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),S(e.id),C((function(){R(e),E("reset","reset",e.iframe,e.id)}),e,"reset")}function R(e){function n(n){r||"0"!==e[n]||(r=!0,p(i,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(u).forEach((function(e){!function(e){function n(n){return"0px"===(u[e]&&u[e].iframe.style[n])}u[e]&&null!==u[e].iframe.offsetParent&&(n("height")||n("width"))&&E("Visibility change","resize",u[e].iframe,e)}(e)}))}function n(n){p("window","Mutation observed: "+n[0].target+" "+n[0].type),W(e,16)}var t,i=m();i&&(t=document.querySelector("body"),new i(n).observe(t,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}())}function t(t){!function(n){e.id?(e.iframe.style[n]=e[n]+"px",p(e.id,"IFrame ("+i+") "+n+" set to "+e[n]+"px")):p("undefined","messageData id not set")}(t),n(t)}var i=e.iframe.id;u[i]&&(u[i].sizeHeight&&t("height"),u[i].sizeWidth&&t("width"))}function C(e,n,t){t!==n.type&&c&&!window.jasmine?(p(n.id,"Requesting animation frame"),c(e)):e()}function E(e,n,t,i,o){var r,s=!1;u[i=i||t.id]&&(t&&"contentWindow"in t&&null!==t.contentWindow?(p(i,"["+e+"] Sending msg to iframe["+i+"] ("+n+") targetOrigin: "+(r=u[i]&&u[i].targetOrigin)),t.contentWindow.postMessage(a+n,r)):k(i,"["+e+"] IFrame("+i+") not found"),o&&u[i]&&u[i].warningTimeout&&(u[i].msgTimeout=setTimeout((function(){!u[i]||u[i].loaded||s||(s=!0,k(i,"IFrame has not responded within "+u[i].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),u[i].warningTimeout)))}function N(e){return e+":"+u[e].bodyMarginV1+":"+u[e].sizeWidth+":"+u[e].log+":"+u[e].interval+":"+u[e].enablePublicMethods+":"+u[e].autoResize+":"+u[e].bodyMargin+":"+u[e].heightCalculationMethod+":"+u[e].bodyBackground+":"+u[e].bodyPadding+":"+u[e].tolerance+":"+u[e].inPageLinks+":"+u[e].resizeFrom+":"+u[e].widthCalculationMethod+":"+u[e].mouseEvents}function A(t,r){function a(e){var n=e.split("Callback");if(2===n.length){var t="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[t]=this[e],delete this[e],k(f,"Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version.")}}var s,c,f=function(e){if("string"!=typeof e)throw new TypeError("Invaild id for iFrame. Expected String");var n;return""===e&&(t.id=(n=r&&r.id||l.id+i++,null!==document.getElementById(n)&&(n+=i++),e=n),o=(r||{}).log,p(e,"Added missing iframe ID: "+e+" ("+t.src+")")),e}(t.id);f in u&&"iFrameResizer"in t?k(f,"Ignored iFrame, already setup."):(function(e){var n;e=e||{},u[f]=Object.create(null),u[f].iframe=t,u[f].firstRun=!0,u[f].remoteHost=t.src&&t.src.split("/").slice(0,3).join("/"),function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(e),Object.keys(e).forEach(a,e),function(e){for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(u[f][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:l[n])}(e),u[f]&&(u[f].targetOrigin=!0===u[f].checkOrigin?""===(n=u[f].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*")}(r),function(){switch(p(f,"IFrame scrolling "+(u[f]&&u[f].scrolling?"enabled":"disabled")+" for "+f),t.style.overflow=!1===(u[f]&&u[f].scrolling)?"hidden":"auto",u[f]&&u[f].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=u[f]?u[f].scrolling:"no"}}(),function(){function e(e){var n=u[f][e];1/0!==n&&0!==n&&(t.style[e]="number"==typeof n?n+"px":n,p(f,"Set "+e+" = "+t.style[e]))}function n(e){if(u[f]["min"+e]>u[f]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(u[f]&&u[f].bodyMargin)&&"0"!==(u[f]&&u[f].bodyMargin)||(u[f].bodyMarginV1=u[f].bodyMargin,u[f].bodyMargin=u[f].bodyMargin+"px"),s=N(f),(c=m())&&(n=function(e){if(!t.parentNode)return null;var n=new e((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===t&&M(t)}))}))}));return n.observe(t.parentNode,{childList:!0}),n}(c)),w(t,"load",(function(){E("iFrame.onload",s,t,e,!0),(!u[f]||!u[f].firstRun)&&u[f]&&u[f].heightCalculationMethod in d&&O({iframe:t,height:0,width:0,type:"init"})})),E("init",s,t,e,!0),u[f]&&(u[f].iframe.iFrameResizer={close:M.bind(null,u[f].iframe),removeListeners:F.bind(null,u[f].iframe),resize:E.bind(null,"Window resize","resize",u[f].iframe),moveToAnchor:function(e){E("Move to anchor","moveToAnchor:"+e,u[f].iframe,f)},sendMessage:function(e){E("Send Message","message:"+(e=JSON.stringify(e)),u[f].iframe,f)}}))}function W(e,n){null===f&&(f=setTimeout((function(){f=null,e()}),n))}function H(){"hidden"!==document.visibilityState&&(p("document","Trigger event: Visibility change"),W((function(){P("Tab Visible","resize")}),16))}function P(e,n){Object.keys(u).forEach((function(t){(function(e){return u[e]&&"parent"===u[e].resizeFrom&&u[e].autoResize&&!u[e].firstRun})(t)&&E(e,n,u[t].iframe,t)}))}function L(){function n(e,n){n&&(function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),A(n,e),t.push(n))}var t;return function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!c;e+=1)c=window[n[e]+"RequestAnimationFrame"];c?c=c.bind(window):p("setup","RequestAnimationFrame not supported")}(),w(window,"message",I),w(window,"resize",(function(){p("window","Trigger event: resize"),W((function(){P("Window resize","resize")}),16)})),w(document,"visibilitychange",H),w(document,"-webkit-visibilitychange",H),function(i,o){switch(t=[],function(e){e&&e.enablePublicMethods&&k("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(i),typeof o){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(o||"iframe"),n.bind(e,i));break;case"object":n(i,o);break;default:throw new TypeError("Unexpected data type ("+typeof o+")")}return t}}}()),v.exports));class x{constructor(e,n){this.iframe=e,this.iframeOrigin=n}postMessage(e,n){const t=Object.assign({eventType:e},n);this.iframe.contentWindow.postMessage(t,this.iframeOrigin)}addMessageListener(e){window.addEventListener("message",e)}removeMessageListener(e){window.removeEventListener("message",e)}postMessageWithResponseListener(e,n){return new Promise((t=>{const i=n=>{n.data.eventType===e&&(window.removeEventListener("message",i),t(n.data.data))};window.addEventListener("message",i),this.postMessage(e,n)}))}}const I=class{constructor(n){e(this,n),this.iframeLoaded=i(this,"iframeLoaded"),this.isFocused=!1,this.isValid=!0,this.dispatchMessageEvent=e=>{const{eventType:n,data:t}=e.data;(null==t?void 0:t.id)===this.inputId&&("focused"===n&&(this.isFocused=!0),"blurred"===n&&(this.isFocused=!1))}}disconnectedCallback(){this.frameService.removeMessageListener(this.dispatchMessageEvent)}async validate(){const e=await this.frameService.postMessageWithResponseListener("validate");return this.isValid=e.isValid,this.errorText=e.error.message,e}async tokenize(e,n,t){return this.frameService.postMessageWithResponseListener("tokenize",{clientId:e,paymentMethodMetadata:n,account:t,componentVersion:h.version})}initializeFrameCommunicationService(){var e;this.frameService=new x(this.iframeElement,this.iframeOrigin),null===(e=this.frameService)||void 0===e||e.addMessageListener(this.dispatchMessageEvent)}get part(){return this.isFocused&&!this.isValid?a:this.isValid?this.isFocused?c:d:s}get style(){return this.isFocused?this.isValid?w.focused:w.focusedAndInvalid:null}get urlParams(){const e=Object.fromEntries(Object.entries(w.fontStyles).map((([e,n])=>[e,btoa(String(n))])));return new URLSearchParams(e).toString()}render(){return n(t,{key:"c8a36a456afdfd883ae2ad8e05de98d307615b4c",class:"form-group d-flex flex-column"},n("div",{key:"580cdd90dd76289f78b688fcdb1486ecb7fe6c5a",style:{visibility:this.iframeLoaded?"visible":"hidden",height:this.iframeLoaded?"auto":"0"}},n("label",{key:"7df8c29c720b5edf85553e5667c14eeb0ad6e2b6",class:"form-label",htmlFor:"",part:u},this.label||""),n("div",{key:"3caeb47ddf3940e1b1a7fe08d8bd50b8123eb2c5",class:"p-0 d-flex form-control "+(this.isValid?"":"is-invalid"),part:this.part,style:Object.assign(Object.assign({},this.style),{overflow:"hidden"})},n("iframe",{key:"2fdff0682753d32292431a8d62d30a1647fa62ef",id:this.inputId,name:this.inputId,src:`${this.iframeOrigin}?${this.urlParams}`,ref:e=>{this.iframeElement=e,this.initializeFrameCommunicationService()},width:"100%",onLoad:()=>{k({log:!1,onResized:()=>{this.iframeLoaded.emit()}},this.iframeElement)}})),n(l,{key:"075ca2ca25623703280fda84ff119e4820f9a5cb",errorText:this.errorText,name:this.inputId})))}get el(){return o(this)}};export{g as hidden_input,I as iframe_input}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i}from"./p-qipqIMyC.js";import{s}from"./p-Bp_QFeog.js";import"./p-DsAwPf2y.js";const t=class{constructor(s){i(this,s),this.apiOrigin="https://wc-proxy.justifi.ai",this.iframeOrigin="https://components.justifi.ai",this.accountId=""}componentWillLoad(){s({apiOrigin:this.apiOrigin,iframeOrigin:this.iframeOrigin,accountId:this.accountId})}render(){return null}};export{t as justifi_config_provider}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as t,r as e,c as a}from"./p-qipqIMyC.js";import"./p-Bp_QFeog.js";import"./p-HXpYMWUU.js";import{C as s,a as i}from"./p-Cjcsf8ku.js";import{f as n}from"./p-c4Mh3ZZ_.js";import{p as r}from"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{c,J as o}from"./p-CtA2NMVz.js";import{g as p,a as h}from"./p-D2muobcE.js";import{P as d}from"./p-CpKvg1ok.js";import{T as f,l,a as u,b as m,c as y,d as b,e as _,f as j,g,h as k,i as w,j as T,k as v}from"./p-BZ7C9duj.js";import{S as C}from"./p-CLQx9p9q.js";import{T as D}from"./p-CZfYo5-1.js";import{a as F}from"./p-BHf9IqGw.js";import{N as R,O as S}from"./p-RvUQ__Pq.js";import"./p-DsAwPf2y.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-tyhA5jkt.js";import"./p-BUa0YOaw.js";import"./p-xY5RkFuA.js";const q={created_at:()=>t("th",{part:R,scope:"col",title:"The date and time each transaction was made"},"Processed On"),type:()=>t("th",{part:R,scope:"col",title:"The type of each transaction"},"Type"),id:()=>t("th",{part:R,scope:"col",title:"The unique identifier of each transaction"},"ID"),amount:()=>t("th",{part:R,scope:"col",title:"The dollar amount of each transaction",class:"text-end"},"Amount"),balance:()=>t("th",{part:R,scope:"col",title:"The running total amount of this payment that belongs to you",class:"text-end"},"Balance"),currency:()=>t("th",{part:R,scope:"col",title:"The currency of each transaction"},"Currency"),financial_transaction_id:()=>t("th",{part:R,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),payment_id:()=>t("th",{part:R,scope:"col",title:"The unique identifier of the payment associated with the payment balance transaction"},"Payment ID"),payment_balance_txn_type:()=>t("th",{part:R,scope:"col",title:"The type of the payment balance transaction"},"Transaction Type"),source_id:()=>t("th",{part:R,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),source_type:()=>t("th",{part:R,scope:"col",title:"The type of the source object associated with the payment balance transaction"},"Source Type")},x={ach_return:"ACH Return",ach_return_fee:"ACH Return Fee",dispute:"Dispute",dispute_fee:"Dispute Fee",dispute_fee_refund:"Dispute Fee Refund",dispute_refund:"Dispute Refund",payment:"Payment",payment_fee:"Fee",refund:"Refund",fee_refund:"Fee Refund",application_fee_returned:"Application Fee Returned",refund_failure:"Refund Failure",void:"Void"},A={created_at:(e,a)=>t("td",{part:S(a)},t("div",{class:"fw-bold"},F(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},F(e.created_at,{showTime:!0}))),type:(e,a)=>t("td",{part:S(a)},x[e.payment_balance_txn_type]),id:(e,a)=>t("td",{part:S(a)},e.id),amount:(e,a)=>t("td",{part:S(a),class:"text-end"},e.formattedPaymentAmount(e.amount)),balance:(e,a)=>t("td",{part:S(a),class:"text-end"},e.formattedPaymentAmount(e.balance)),currency:(e,a)=>t("td",{part:S(a)},e.currency),financial_transaction_id:(e,a)=>t("td",{part:S(a)},e.financial_transaction_id),payment_id:(e,a)=>t("td",{part:S(a)},e.payment_id),payment_balance_txn_type:(e,a)=>t("td",{part:S(a)},e.payment_balance_txn_type),source_id:(e,a)=>t("td",{part:S(a)},e.source_id),source_type:(e,a)=>t("td",{part:S(a)},e.source_type)},I=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=r,this.pagingParams={},this.columns="created_at,type,id,amount,balance",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:D.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:D.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:D.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,q,A),c(),this.analytics=new o(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.paymentId&&this.authToken?(({id:t,authToken:e,service:a})=>async({params:i,onSuccess:r,onError:c,final:o})=>{var d;try{const o=await a.fetchPaymentTransactions(t,e,i);o.error?c({error:h(o.error),code:p(null===(d=o.error)||void 0===d?void 0:d.code),severity:s.ERROR}):r({balanceTransactions:o.data.map((t=>new n(t))),pagingInfo:Object.assign({},o.page_info)})}catch(t){const e=p(null==t?void 0:t.code);c({error:h(t),code:e,severity:s.ERROR})}finally{o()}})({id:this.paymentId,authToken:this.authToken,service:new d})({params:this.pagingParams,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="payment-id and auth-token props are required",this.handleError(i.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}render(){return t(C,{key:"c73dfcd1d3038dbca6800b9bd0f4e6c5fba2b8bf"},t(l,{key:"66d8f92a96f2ace82c05d10a9f538d6ad22b588f"},t(u,{key:"cff0e6344efd035f264326ecc79615bddfe8d0ac"},t(m,{key:"702e53ae1d59ab674425f4753c1cf0b6415feacd"},t(y,{key:"7773de2d113af30b3a0d64405dce5d5e09a0bb8c"},this.transactionsTable.columnData.map((t=>t)))),t(b,{key:"7b86d982f52037349b5cc2f7ec5fa800e38ed519"},t(_,{key:"040c3dfb101c1ea127cfcf982e4415ae94661b2a",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(j,{key:"6d25f8a886cf9b15ea9c17c44dfe0bce6125c557",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(g,{key:"60bb435ecf7a595cdb028df4cd95c1361ce06c8d",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(k,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(w,{key:"accb2e3cb9dc8521c50db6a8ed306f91e5aa44c7"},t(T,{key:"a4408276ce552fe4c43c60f79e7a2a3602566b2c"},t(v,{key:"20b13cc71f8b62166e8b6e9fce5dea2d1b4c5ac0",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"90657ed6a805af46446bc8fb316a52252a9a2bf4",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],paymentId:["propChanged"],authToken:["propChanged"]}}};export{I as justifi_payment_transactions_list}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as s,H as a,g as i}from"./p-qipqIMyC.js";import{c as o,l as r,b as h,T as l,a as c}from"./p-RvUQ__Pq.js";import{F as f}from"./p-DCMrHeJI.js";import"./p-CZfYo5-1.js";const n=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput"),this.formControlBlur=e(this,"formControlBlur"),this.isFocused=!1,this.handleFormControlInput=t=>{const e=t.target,s=e.getAttribute("name");this.inputHandler(s,e.value),this.formControlInput.emit(e.value)},this.updateInput=t=>{this.selectElement.value=t}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get part(){let t=o;return this.errorText&&(t=h),this.disabled&&(t=l),this.isFocused&&(t=c),t}render(){var t;return s(a,{key:"a7428cd8a89414d877dafe9948f5652f28c36a5f"},s("div",{key:"c9d5d5d2f8a6292484d3606d883dbb9d168aa316",class:"form-group d-flex flex-column"},s("div",{key:"c1aba6560934b966de02e9afef77428c6060eefb",class:"d-flex align-items-start gap-2"},s("label",{key:"5fbbb09c3955ff3285b006f24c3873082394d39c",part:r,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"f756a05a8273ab6fd65205bb5c32cd34c30a9db3",helpText:this.helpText})),s("select",{key:"ffd0fa461d3c35da5595e705a7c4068066d8f971",ref:t=>this.selectElement=t,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-select is-invalid":"form-select",disabled:this.disabled},null===(t=this.options)||void 0===t?void 0:t.map((t=>s("option",{value:t.value},t.label)))),s(f,{key:"6ee60bb236ccf7cea7bc8ccf946a363d2cd26906",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}},d=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput"),this.formControlBlur=e(this,"formControlBlur"),this.isFocused=!1,this.handleFormControlInput=t=>{const e=t.target,s=e.getAttribute("name");this.inputHandler(s,e.value),this.formControlInput.emit({name:s,value:e.value})},this.updateInput=t=>{const e=this.el.querySelector("input");e&&(e.value=t||"")}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get part(){return this.errorText?h:this.disabled?l:this.isFocused?c:o}render(){return s(a,{key:"71473077484c65dce4e3311db05a194f642a37c8"},s("div",{key:"fbceee0b9fae4f05e1310a97c009fa5a97866ea4",class:"form-group d-flex flex-column"},s("div",{key:"c5b6cc944e8a1a7aafe136e67e5f37772f364cd6",class:"d-flex align-items-start gap-2"},s("label",{key:"029a560a612b7e00f4d67c7adc2b5bdffa85cb53",part:r,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"3d8b3a41a599dc2f59171befb532c0cd219adba5",helpText:this.helpText})),s("input",{key:"2510c95b50bb26d00fb2975e38fde9efb7a6986e",id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,onKeyDown:this.keyDownHandler,onPaste:this.keyDownHandler,maxLength:this.maxLength,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled}),s(f,{key:"feff4a3d104ea6f74a8d7049f79b8c2850b308a9",errorText:this.errorText,name:this.name})))}get el(){return i(this)}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{n as form_control_select,d as form_control_text}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,h as i,H as t}from"./p-
|
|
1
|
+
import{r as l,h as i,H as t}from"./p-qipqIMyC.js";import{c as e,D as s}from"./p-BIPdn2VU.js";import{m as d,s as v,n as o}from"./p-BHf9IqGw.js";import"./p-RvUQ__Pq.js";import"./p-HXpYMWUU.js";const a=class{constructor(i){l(this,i)}render(){return!this.additionalQuestions||d(this.additionalQuestions)?null:i("div",null,i(s,{sectionTitle:"Additional Questions"}),i("div",{class:"d-table gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Business Revenue",value:this.additionalQuestions.business_revenue}),i(e,{title:"Business Payment Volume",value:this.additionalQuestions.business_payment_volume})))))}},u=class{constructor(i){l(this,i)}render(){return this.business?i("div",null,i(s,{sectionTitle:"Business Core Info Details"}),i("div",{class:"d-table gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Legal Name",value:this.business.legal_name}),i(e,{title:"Doing Business As (DBA)",value:this.business.doing_business_as}),i(e,{title:"Business Classification",value:v(this.business.classification)}),i(e,{title:"Industry",value:this.business.industry})),i("div",{class:"col-12 col-md-6"},i(e,{title:"Tax ID",value:this.business.tax_id}),i(e,{title:"Website URL",value:this.business.website_url}),i(e,{title:"Email Address",value:this.business.email}),i(e,{title:"Phone Number",value:this.business.phone}))))):null}},n=class{constructor(i){l(this,i)}render(){var l,t,v,o,a,u,n;return!this.legalAddress||d(this.legalAddress)?null:i("div",null,i(s,{sectionTitle:"Business Legal Address Details"}),i("div",{class:"d-table gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Country",value:null===(l=this.legalAddress)||void 0===l?void 0:l.country}),i(e,{title:"Legal Address",value:null===(t=this.legalAddress)||void 0===t?void 0:t.line1}),i(e,{title:"Address Line 2",value:null===(v=this.legalAddress)||void 0===v?void 0:v.line2})),i("div",{class:"col-12 col-md-6"},i(e,{title:"City",value:null===(o=this.legalAddress)||void 0===o?void 0:o.city}),i(e,{title:"State",value:null===(a=this.legalAddress)||void 0===a?void 0:a.state}),i(e,{title:"Postal Code",value:null===(n=null===(u=this.legalAddress)||void 0===u?void 0:u.postal_code)||void 0===n?void 0:n.toString()})))))}},r=class{constructor(i){l(this,i)}render(){var l;return(null===(l=null==this?void 0:this.owners)||void 0===l?void 0:l.length)?i(t,null,!!(null==this?void 0:this.owners.length)&&this.owners.map((l=>{var t,d,v,a,u;return[i(s,{sectionTitle:`Owner ${null==l?void 0:l.name}'s Details`}),i("div",{class:"d-table gap-2 w-100 mt-3"},i(e,{title:"Name",value:null==l?void 0:l.name}),i(e,{title:"Title",value:null==l?void 0:l.title}),i(e,{title:"Email",value:null==l?void 0:l.email}),i(e,{title:"Phone",value:null==l?void 0:l.phone}),i(e,{title:"Date of Birth",value:o(new Date(Number(null==l?void 0:l.dob_day),Number(null==l?void 0:l.dob_month),Number(null==l?void 0:l.dob_year)))}),i(e,{title:"Identification Number",value:`********${null==l?void 0:l.ssn_last4}`}),i(e,{title:"Line 1",value:null===(t=null==l?void 0:l.address)||void 0===t?void 0:t.line1}),i(e,{title:"Line 2",value:null===(d=null==l?void 0:l.address)||void 0===d?void 0:d.line2}),i(e,{title:"City",value:null===(v=null==l?void 0:l.address)||void 0===v?void 0:v.city}),i(e,{title:"State",value:null===(a=null==l?void 0:l.address)||void 0===a?void 0:a.state}),i(e,{title:"Zip",value:null===(u=null==l?void 0:l.address)||void 0===u?void 0:u.postal_code}))]}))):null}},c=class{constructor(i){l(this,i)}render(){var l,t,v,a,u,n,r,c,h,m,p,w,b,g;return!this.representative||d(this.representative)?null:i("div",null,i(s,{sectionTitle:"Representative Details"}),i("div",{class:"d-table gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Name",value:null===(l=this.representative)||void 0===l?void 0:l.name}),i(e,{title:"ID",value:null===(t=this.representative)||void 0===t?void 0:t.id}),i(e,{title:"Address",value:null===(a=null===(v=this.representative)||void 0===v?void 0:v.address)||void 0===a?void 0:a.line1}),i(e,{title:"Created At",value:(null===(u=this.representative)||void 0===u?void 0:u.created_at)&&o(null===(n=this.representative)||void 0===n?void 0:n.created_at)})),i("div",{class:"col-12 col-md-6"},i(e,{title:"Title",value:null===(r=this.representative)||void 0===r?void 0:r.title}),i(e,{title:"Is Owner?",value:null===(c=this.representative)||void 0===c?void 0:c.is_owner.toString()}),i(e,{title:"Date Of Birth",value:this.representative&&o(new Date(Number(null===(h=this.representative)||void 0===h?void 0:h.dob_year),Number(null===(m=this.representative)||void 0===m?void 0:m.dob_month)-1,Number(null===(p=this.representative)||void 0===p?void 0:p.dob_day)))}),i(e,{title:"Email",value:null===(w=this.representative)||void 0===w?void 0:w.email}),i(e,{title:"Phone",value:null===(b=this.representative)||void 0===b?void 0:b.phone}),i(e,{title:"Updated At",value:this.representative&&o(null===(g=this.representative)||void 0===g?void 0:g.updated_at)})))))}};export{a as additional_questions_details,u as core_info_details,n as legal_address_details,r as owner_details,c as representative_details}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,r as t,c as n}from"./p-qipqIMyC.js";import{A as s}from"./p-BUa0YOaw.js";import{S as i}from"./p-CLQx9p9q.js";import"./p-CZfYo5-1.js";import{S as o}from"./p-Xv8DuU3Y.js";import{c as a}from"./p-CrQgyTRz.js";import"./p-Bp_QFeog.js";import"./p-DsAwPf2y.js";import"./p-BHf9IqGw.js";import"./p-HXpYMWUU.js";import"./p-RvUQ__Pq.js";import"./p-DCIW8z1f.js";var l,r,p,c,h;!function(e){e.STATUS_SUCCESS="STATUS_SUCCESS",e.STATUS_FAILURE="STATUS_FAILURE"}(l||(l={})),function(e){e.PLAIN="plain",e.BUY="buy",e.SET_UP="set-up",e.DONATE="donate",e.CHECK_OUT="check-out",e.BOOK="book",e.SUBSCRIBE="subscribe"}(r||(r={})),function(e){e.BLACK="black",e.WHITE="white",e.WHITE_OUTLINE="white-outline"}(p||(p={})),function(e){e.SUPPORTS_3DS="supports3DS",e.SUPPORTS_EMV="supportsEMV",e.SUPPORTS_CREDIT="supportsCredit",e.SUPPORTS_DEBIT="supportsDebit"}(c||(c={}));class d{constructor(e){this.merchantIdentifier=e.merchantIdentifier,this.displayName=e.displayName,this.initiative=e.initiative,this.initiativeContext=e.initiativeContext,this.buttonType=e.buttonType||r.PLAIN,this.buttonStyle=e.buttonStyle||p.BLACK,this.buttonLocale=e.buttonLocale||"en-US"}get isValid(){return!!(this.merchantIdentifier&&this.displayName&&this.initiative&&this.initiativeContext)}}class y{constructor(e){this.countryCode=e.countryCode,this.currencyCode=e.currencyCode,this.merchantCapabilities=e.merchantCapabilities,this.supportedNetworks=e.supportedNetworks,this.total=e.total,this.lineItems=e.lineItems,this.shippingMethods=e.shippingMethods,this.applicationData=e.applicationData,this.supportedCountries=e.supportedCountries}get isValid(){var e,t,n,s;return!!(this.countryCode&&this.currencyCode&&(null===(e=this.merchantCapabilities)||void 0===e?void 0:e.length)&&(null===(t=this.supportedNetworks)||void 0===t?void 0:t.length)&&(null===(n=this.total)||void 0===n?void 0:n.label)&&(null===(s=this.total)||void 0===s?void 0:s.amount))}}class u{static isApplePaySupported(){var e;return"undefined"!=typeof window&&"ApplePaySession"in window&&(null===(e=window.ApplePaySession)||void 0===e?void 0:e.supportsVersion(3))}static canMakePayments(){var e;return this.isApplePaySupported()&&(null===(e=window.ApplePaySession)||void 0===e?void 0:e.canMakePayments())||!1}static async canMakePaymentsWithActiveCard(e){var t;if(!this.isApplePaySupported())return!1;try{return await(null===(t=window.ApplePaySession)||void 0===t?void 0:t.canMakePaymentsWithActiveCard(e))||!1}catch(e){return console.error("Error checking Apple Pay active card:",e),!1}}static formatAmount(e){return(e/100).toFixed(2)}static parseAmount(e){return Math.round(100*parseFloat(e))}static createLineItem(e,t,n="final"){return{label:e,amount:this.formatAmount(t),type:n}}static getDefaultSupportedNetworks(){return["amex","discover","masterCard","visa"]}static getDefaultMerchantCapabilities(){return[c.SUPPORTS_3DS,c.SUPPORTS_EMV,c.SUPPORTS_CREDIT,c.SUPPORTS_DEBIT]}}!function(e){e.UNAVAILABLE="UNAVAILABLE",e.SESSION_ERROR="SESSION_ERROR",e.MERCHANT_VALIDATION_ERROR="MERCHANT_VALIDATION_ERROR",e.PAYMENT_PROCESSING_ERROR="PAYMENT_PROCESSING_ERROR",e.USER_CANCELLED="USER_CANCELLED"}(h||(h={}));class v{constructor(){this.api=s()}initialize(e){if(this.applePayConfig=new d(e),!this.applePayConfig.isValid)throw new Error("Invalid Apple Pay configuration provided")}async validateMerchant(e,t){try{return await this.api.post({endpoint:"apple_pay/merchant_session",authToken:e,headers:{"Sub-Account":t}})}catch(e){throw console.error("Backend validation failed:",e),new Error("Merchant validation failed")}}async processPayment(e,t,n){const s=await this.api.post({endpoint:"apple_pay/process_token",authToken:e,body:n,headers:{"Sub-Account":t}});return{success:s.id&&!!s.data.token,data:s}}isAvailable(){return u.isApplePaySupported()&&u.canMakePayments()}async canMakePaymentsWithActiveCard(){if(!this.applePayConfig)throw new Error("Apple Pay not initialized. Call initialize() first.");return await u.canMakePaymentsWithActiveCard(this.applePayConfig.merchantIdentifier)}async startPaymentSession(e,t,n){if(console.groupCollapsed("[ApplePayService] startPaymentSession called"),console.log("[ApplePayService] raw paymentRequest:",JSON.stringify(e,null,2)),console.log("[ApplePayService] has authToken:",Boolean(t)),console.log("[ApplePayService] accountId:",n),console.log("[ApplePayService] has config:",Boolean(this.applePayConfig)),!this.applePayConfig)throw console.error("[ApplePayService] Missing applePayConfig. Did you call initialize()?"),console.groupEnd(),new Error("Apple Pay not initialized. Call initialize() first.");const s=new y(e);if(console.log("[ApplePayService] created ApplePayPaymentRequest:",s),!s.isValid){const e=[];throw s.countryCode||e.push("countryCode"),s.currencyCode||e.push("currencyCode"),s.merchantCapabilities&&0!==s.merchantCapabilities.length||e.push("merchantCapabilities"),s.supportedNetworks&&0!==s.supportedNetworks.length||e.push("supportedNetworks"),s.total&&s.total.label&&s.total.amount||e.push("total"),console.error("[ApplePayService] Payment request is invalid. Missing/invalid:",e),console.groupEnd(),new Error("Invalid payment request provided")}return this.currentPaymentRequest=s,new Promise(((e,i)=>{try{if(console.log("[ApplePayService] About to instantiate ApplePaySession"),"undefined"==typeof window||!("ApplePaySession"in window))return console.error("[ApplePayService] ApplePaySession not available on window"),console.groupEnd(),i({success:!1,error:{code:h.UNAVAILABLE,message:"ApplePaySession API is not available in this environment"}});this.currentSession=new window.ApplePaySession(3,s),console.log("[ApplePayService] ApplePaySession instantiated:",this.currentSession),this.setupSessionEventHandlers(e,i,t,n),console.log("[ApplePayService] Event handlers set. Beginning session..."),this.currentSession.begin(),console.log("[ApplePayService] Session.begin() called"),console.groupEnd()}catch(e){console.error("[ApplePayService] Exception while starting session:",e),console.groupEnd(),i({success:!1,error:{code:h.SESSION_ERROR,message:e instanceof Error?e.message:"Failed to start Apple Pay session"}})}}))}abortPaymentSession(){this.currentSession&&(this.currentSession.abort(),this.currentSession=void 0,this.currentPaymentRequest=void 0)}setupSessionEventHandlers(e,t,n,s){this.currentSession&&this.applePayConfig&&this.currentPaymentRequest?(this.currentSession.onvalidatemerchant=async()=>{console.groupCollapsed("[ApplePayService] onvalidatemerchant");try{if(console.log("[ApplePayService] accountId:",s),!n)throw console.error("[ApplePayService] Missing authToken for merchant validation"),new Error("Authentication token not provided.");const e=await this.validateMerchant(n,s);console.log("[ApplePayService] merchantSession received");try{this.currentSession.completeMerchantValidation(e),console.log("[ApplePayService] completeMerchantValidation called")}catch(e){throw console.error("Error calling completeMerchantValidation:",e),e}}catch(e){console.error("=== MERCHANT VALIDATION ERROR ==="),console.error("Error during merchant validation:",e),e&&e.stack&&console.error("Error stack:",e.stack),this.currentSession.abort(),t({success:!1,error:{code:h.MERCHANT_VALIDATION_ERROR,message:e instanceof Error?e.message:"Merchant validation failed"}})}console.groupEnd()},this.currentSession.onpaymentauthorized=async i=>{var o;console.groupCollapsed("[ApplePayService] onpaymentauthorized");try{const a=i.payment;console.log("[ApplePayService] payment payload snapshot:",{hasToken:Boolean(null==a?void 0:a.token),tokenType:(null===(o=null==a?void 0:a.token)||void 0===o?void 0:o.paymentData)?"paymentData":"raw"});const r=Object.assign(Object.assign({},a.token),{product_details:{name:this.currentPaymentRequest.total.label,price:u.parseAmount(this.currentPaymentRequest.total.amount),description:this.currentPaymentRequest.total.label}});console.log("[ApplePayService] paymentPayload prepared");const p=await this.processPayment(n,s,r);console.log("[ApplePayService] processPayment result:",p),p.success?(this.currentSession.completePayment({status:l.STATUS_SUCCESS}),console.log("[ApplePayService] Payment success; resolving"),e({success:!0,token:a.token,paymentMethodId:p.data.id})):(console.error("PSP reported payment failure:",p.data),this.currentSession.completePayment({status:l.STATUS_FAILURE}),t({success:!1,error:{code:h.PAYMENT_PROCESSING_ERROR,message:"Payment processing failed"}}))}catch(e){console.error("=== PAYMENT PROCESSING ERROR ==="),console.error("Error processing payment:",e),e&&e.stack&&console.error("Error stack:",e.stack),this.currentSession.completePayment({status:l.STATUS_FAILURE}),t({success:!1,error:{code:h.PAYMENT_PROCESSING_ERROR,message:e instanceof Error?e.message:"Payment processing failed"}})}finally{console.log("[ApplePayService] Cleaning up session state"),this.currentSession=void 0,this.currentPaymentRequest=void 0}console.groupEnd()},this.currentSession.onpaymentmethodselected=()=>{console.groupCollapsed("[ApplePayService] onpaymentmethodselected");const e={newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]};try{this.currentSession.completePaymentMethodSelection(e),console.log("[ApplePayService] completePaymentMethodSelection called")}catch(e){console.error("Error completing payment method selection:",e),this.currentSession.abort()}console.groupEnd()},this.currentSession.onshippingmethodselected=()=>{console.groupCollapsed("[ApplePayService] onshippingmethodselected"),this.currentSession.completeShippingMethodSelection({status:l.STATUS_SUCCESS,newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]}),console.log("[ApplePayService] completeShippingMethodSelection called"),console.groupEnd()},this.currentSession.oncancel=e=>{if(console.groupCollapsed("[ApplePayService] oncancel"),e.sessionError)switch(console.error(e.sessionError),e.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:",e.sessionError.code)}this.currentSession=void 0,this.currentPaymentRequest=void 0,t({success:!1,error:{code:h.USER_CANCELLED,message:"User cancelled the Apple Pay session"}}),console.groupEnd()},"onerror"in this.currentSession&&(this.currentSession.onerror=e=>{console.groupCollapsed("[ApplePayService] onerror"),console.error("=== APPLE PAY SESSION ERROR ==="),console.error("Session error:",e),this.currentSession=void 0,this.currentPaymentRequest=void 0,t({success:!1,error:{code:h.SESSION_ERROR,message:"Apple Pay session error occurred"}}),console.groupEnd()})):console.error("[ApplePayService] setupSessionEventHandlers called without required state",{hasSession:Boolean(this.currentSession),hasConfig:Boolean(this.applePayConfig),hasPaymentRequest:Boolean(this.currentPaymentRequest)})}static createPaymentRequest(e,t,n="US",s="USD"){return{countryCode:n,currencyCode:s,merchantCapabilities:u.getDefaultMerchantCapabilities(),supportedNetworks:u.getDefaultSupportedNetworks(),total:u.createLineItem(t,e)}}getApplePayConfig(){return this.applePayConfig}}const m=t=>{const{isLoading:n}=t;return n?e("div",{class:"container-fluid p-0"},e("div",{class:"row mb-3"},e("div",{class:"col-12 align-content-center"},e(o,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null},b=t=>e("div",{class:"apple-pay-button-container"},e("button",Object.assign({class:(()=>{let e="apple-pay-button";switch(t.buttonStyle){case p.WHITE:e+=" apple-pay-button-white";break;case p.WHITE_OUTLINE:e+=" apple-pay-button-white-outline";break;default:e+=" apple-pay-button-black"}switch(t.buttonType){case r.BUY:e+=" apple-pay-button-type-buy";break;case r.DONATE:e+=" apple-pay-button-type-donate";break;default:e+=" apple-pay-button-type-plain"}return(t.disabled||t.isProcessing||!t.isAvailable)&&(e+=" disabled"),e})(),style:{width:t.width||"200px",height:t.height||"48px"},onClick:()=>{!t.disabled&&!t.isProcessing&&t.isAvailable&&t.clickHandler&&t.clickHandler()},disabled:t.disabled||t.isProcessing||!t.isAvailable,"aria-label":"Pay with Apple Pay",type:"button"},t),t.isProcessing&&e("div",{class:"processing-overlay"},e("div",{class:"spinner"}),e("span",null,"Processing..."))),e("style",null,"\n .apple-pay-button-container {\n display: inline-block;\n position: relative;\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 ")),P=class{constructor(e){t(this,e),this.applePayStarted=n(this,"applePayStarted"),this.applePayCompleted=n(this,"applePayCompleted"),this.applePayCancelled=n(this,"applePayCancelled"),this.applePayError=n(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=r.PLAIN,this.buttonStyle=p.BLACK,this.disabled=!1,this.showSkeleton=!0,this.isLoading=!0,this.isProcessing=!1,this.isAvailable=!1,this.canMakePayments=!1,this.isConfigValid=!0,this.error=null,this.handleApplePayClick=async()=>{var e,t;if(!this.isProcessing&&!this.disabled&&this.isAvailable)try{this.isProcessing=!0,this.error=null,this.applePayStarted.emit(),console.groupCollapsed("[ApplePay Component] handleApplePayClick"),console.log("[ApplePay Component] click context:",{isProcessing:this.isProcessing,disabled:this.disabled,isAvailable:this.isAvailable,canMakePayments:this.canMakePayments,hasService:Boolean(this.applePayService)});const n={countryCode:this.countryCode,currencyCode:a.paymentCurrency,merchantCapabilities:u.getDefaultMerchantCapabilities(),supportedNetworks:u.getDefaultSupportedNetworks(),total:u.createLineItem(a.paymentDescription,a.paymentAmount)};console.log("[ApplePay Component] paymentRequest",n),console.log("[ApplePay Component] identifiers snapshot:",{authTokenLength:a.authToken?String(a.authToken).length:0,accountId:a.accountId});const s=await this.applePayService.startPaymentSession(n,a.authToken,a.accountId);console.log("[ApplePay Component] startPaymentSession result",s),s.success?this.applePayCompleted.emit({success:!0,token:s.token,paymentMethodId:s.paymentMethodId}):(this.applePayCompleted.emit({success:!1,error:s.error}),this.applePayError.emit({error:(null===(e=s.error)||void 0===e?void 0:e.message)||"Payment failed",code:(null===(t=s.error)||void 0===t?void 0:t.code)||P.ErrorCode.PAYMENT_FAILED}))}catch(e){const t=e instanceof Error?e.message:"Payment failed";this.error=t,this.applePayError.emit({error:t,code:P.ErrorCode.PAYMENT_FAILED}),this.applePayCompleted.emit({success:!1,error:t})}finally{this.isProcessing=!1,console.groupEnd()}}}async initializeApplePay(){try{if(this.isLoading=!0,this.error=null,this.isConfigValid=!0,console.groupCollapsed("[ApplePay Component] initializeApplePay"),console.log("[ApplePay Component] checkout state snapshot:",{paymentAmount:a.paymentAmount,paymentCurrency:a.paymentCurrency,hasAuthToken:Boolean(a.authToken),accountId:a.accountId}),!(Boolean(a.paymentAmount)&&Boolean(a.paymentCurrency)&&Boolean(a.authToken)))return this.error="Missing required Apple Pay configuration",this.isConfigValid=!1,console.error("Apple Pay config error: missing required values",{paymentAmount:a.paymentAmount,paymentCurrency:a.paymentCurrency,hasAuthToken:Boolean(a.authToken),accountId:a.accountId}),this.applePayError.emit({error:this.error,code:P.ErrorCode.CONFIG_ERROR}),this.isLoading=!1,void console.groupEnd();if(this.isAvailable=u.isApplePaySupported(),this.canMakePayments=u.canMakePayments(),console.log("[ApplePay Component] support check:",{isAvailable:this.isAvailable,canMakePayments:this.canMakePayments,hasApplePaySessionOnWindow:"undefined"!=typeof window&&"ApplePaySession"in window}),!this.isAvailable)return this.error="Apple Pay is not supported on this device",console.error(this.error),this.applePayError.emit({error:this.error,code:P.ErrorCode.NOT_SUPPORTED}),this.isLoading=!1,void console.groupEnd();if(!this.canMakePayments)return this.error="Apple Pay is not available",console.error(this.error),this.applePayError.emit({error:this.error,code:P.ErrorCode.NOT_AVAILABLE}),this.isLoading=!1,void console.groupEnd();const e={merchantIdentifier:this.merchantIdentifier,displayName:this.merchantDisplayName,initiative:"web",initiativeContext:this.initiativeContext,buttonType:this.buttonType,buttonStyle:this.buttonStyle};console.log("[ApplePay Component] initializing service with config:",e),this.applePayService=new v,this.applePayService.initialize(e),await this.applePayService.canMakePaymentsWithActiveCard()||console.warn("No Apple Pay cards available, but continuing...")}catch(e){console.error("Apple Pay initialization error:",e),this.error=e instanceof Error?e.message:"Failed to initialize Apple Pay",this.applePayError.emit({error:this.error,code:P.ErrorCode.INITIALIZATION_ERROR})}finally{this.isLoading=!1,console.groupEnd()}}async isSupported(){return this.isAvailable&&this.canMakePayments}async getPaymentMethods(){return this.isAvailable?u.getDefaultSupportedNetworks():[]}async abort(){this.applePayService.abortPaymentSession(),this.isProcessing=!1,this.applePayCancelled.emit()}render(){const t=!this.isLoading&&this.isAvailable&&this.canMakePayments&&this.isConfigValid;return e(i,{key:"0610b810bc458f7382bb78ebe155e38cd39d7023"},a.checkoutLoaded&&e("script",{key:"036ba823079bb6daa62e72a8ee76cdc32dab60f0",async:!0,src:"https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",onLoad:()=>{console.log("[ApplePay Component] Apple Pay SDK script loaded"),this.initializeApplePay()}}),e("div",{key:"f5211ca2212306b7ee99dc1f6f06f56a9aa08643",class:"apple-pay-container"},e(m,{key:"bb4680ed4760d378237d36dd60e76d2db9cf0dd4",isLoading:this.isLoading}),t&&e(b,{key:"6c984f15b8ef2e629325253428c8243935328050",buttonType:this.buttonType,buttonStyle:this.buttonStyle,disabled:this.disabled,isProcessing:this.isProcessing,isAvailable:this.isAvailable,clickHandler:this.handleApplePayClick})),e("style",{key:"670fcfa28ea2405f772238add126525ecb14841b"},"\n .apple-pay-container {\n width: 100%;\n }\n "))}};P.ErrorCode={CONFIG_ERROR:"CONFIG_ERROR",NOT_SUPPORTED:"NOT_SUPPORTED",NOT_AVAILABLE:"NOT_AVAILABLE",INITIALIZATION_ERROR:"INITIALIZATION_ERROR",PAYMENT_FAILED:"PAYMENT_FAILED"};export{P as justifi_apple_pay}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i}from"./p-
|
|
1
|
+
import{r as t,c as s,h as i}from"./p-qipqIMyC.js";import{P as o}from"./p-De8UloOS.js";import"./p-Bp_QFeog.js";import"./p-HXpYMWUU.js";import{C as r,a as e}from"./p-Cjcsf8ku.js";import{d as p}from"./p-c4Mh3ZZ_.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as a,a as h}from"./p-D2muobcE.js";import{E as n}from"./p-BIPdn2VU.js";import{c as m,J as c}from"./p-CtA2NMVz.js";import{m as d}from"./p-DYGIC0QH.js";import"./p-BUa0YOaw.js";import"./p-BHf9IqGw.js";import"./p-DsAwPf2y.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-RvUQ__Pq.js";import"./p-tyhA5jkt.js";const u=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){m(),this.analytics=new c(this),this.initializeServices()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeServices()}initializeServices(){this.payoutId&&this.authToken?(this.getPayout=(({id:t,authToken:s,service:i})=>async({onSuccess:o,onError:e})=>{var n;try{const m=await i.fetchPayout(t,s);m.error?e({error:h(m.error),code:a(null===(n=m.error)||void 0===n?void 0:n.code),severity:r.ERROR}):o(new p(m.data))}catch(t){e({error:h(t),code:a(null==t?void 0:t.code),severity:r.ERROR})}})({id:this.payoutId,authToken:this.authToken,service:new o}),this.getPayoutCSV=d({authToken:this.authToken,service:new o})):(this.errorMessage="Failed to load payout details. payoutId or authToken is not provided.",this.errorEvent.emit({message:this.errorMessage,errorCode:e.MISSING_PROPS,severity:r.ERROR}))}render(){return this.errorMessage?n(this.errorMessage):i("payout-details-core",{getPayout:this.getPayout,getPayoutCSV:this.getPayoutCSV,"onError-event":this.handleErrorEvent})}static get watchers(){return{payoutId:["propChanged"],authToken:["propChanged"]}}};export{u as justifi_payout_details}
|