@justifi/webcomponents 6.10.3 → 6.10.4
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/additional-questions-details_5.cjs.entry.js +2 -2
- package/dist/cjs/{badge-Cl6qJPK_.js → badge-Bd6H9TX2.js} +1 -1
- package/dist/cjs/bank-account-document-form-inputs_9.cjs.entry.js +7 -13
- package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
- package/dist/cjs/business-details-core.cjs.entry.js +3 -3
- package/dist/cjs/button-DAbSQPoU.js +43 -0
- package/dist/cjs/card-form.cjs.entry.js +2 -2
- package/dist/cjs/{check-pkg-version-DpY7PKYF.js → check-pkg-version-Mv0ez8Cf.js} +1 -1
- package/dist/cjs/checkouts-list-core.cjs.entry.js +5 -5
- package/dist/cjs/{checkouts-table-CXgizBib.js → checkouts-table-KuNixae0.js} +2 -2
- package/dist/cjs/custom-popper_2.cjs.entry.js +1 -1
- package/dist/cjs/form-alert_5.cjs.entry.js +1 -1
- package/dist/cjs/form-control-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/form-control-date.cjs.entry.js +2 -2
- package/dist/cjs/{form-control-error-text-6-HeM6bw.js → form-control-error-text-C4Wqr79O.js} +1 -1
- package/dist/cjs/form-control-file-v2_2.cjs.entry.js +2 -2
- package/dist/cjs/{form-control-help-text-D0LaZkGk.js → form-control-help-text-Bo9d_mCH.js} +1 -1
- package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +3 -3
- package/dist/cjs/form-control-monetary.cjs.entry.js +3 -3
- package/dist/cjs/form-control-number-masked_3.cjs.entry.js +2 -2
- package/dist/cjs/form-control-number_3.cjs.entry.js +4 -4
- package/dist/cjs/form-control-radio.cjs.entry.js +1 -1
- package/dist/cjs/form-control-select_2.cjs.entry.js +2 -2
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +3 -3
- package/dist/cjs/{header-1-BOijdmPN.js → header-1-DR-eAlp1.js} +1 -1
- package/dist/cjs/{header-3-FeTJjrR1.js → header-3-kgnQtxEu.js} +1 -1
- package/dist/cjs/hidden-input_2.cjs.entry.js +3 -3
- package/dist/cjs/{insurance-state-DIV_moDI.js → insurance-state-CRhLwPxQ.js} +1 -1
- package/dist/cjs/internal-tokenize-payment-method_7.cjs.entry.js +5 -5
- package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +73 -65
- package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +1 -1
- package/dist/cjs/justifi-apple-pay_8.cjs.entry.js +13 -11
- package/dist/cjs/justifi-bank-account-billing-form-simple_3.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-details.cjs.entry.js +4 -4
- package/dist/cjs/justifi-business-form.cjs.entry.js +6 -6
- package/dist/cjs/justifi-checkout.cjs.entry.js +3 -3
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +1 -1
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +5 -5
- package/dist/cjs/justifi-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +2 -2
- package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +5 -5
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +4 -4
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payment-details.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +5 -5
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +1 -1
- package/dist/cjs/justifi-payments-list.cjs.entry.js +6 -6
- package/dist/cjs/justifi-payout-details.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +5 -5
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +1 -1
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +6 -6
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +5 -5
- package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +1 -1
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +5 -5
- package/dist/cjs/justifi-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +5 -5
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +5 -5
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-C7-boC1U.js → package-OpgJzVo3.js} +1 -1
- package/dist/cjs/pagination-menu.cjs.entry.js +1 -1
- package/dist/cjs/{parts-C0AyF3nd.js → parts-WjOn_TIy.js} +16 -0
- package/dist/cjs/payment-details-core.cjs.entry.js +5 -5
- package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
- package/dist/cjs/{payment-provisioning-loading-CbcFPETB.js → payment-provisioning-loading-BHAFHTuI.js} +1 -1
- package/dist/cjs/payments-list-core.cjs.entry.js +6 -6
- package/dist/cjs/{payments-status-EZ95BQex.js → payments-status-BngaUiWA.js} +1 -1
- package/dist/cjs/{payments-table-D5Hw3JDe.js → payments-table-DFOF8yrM.js} +2 -2
- package/dist/cjs/payout-details-core.cjs.entry.js +9 -9
- package/dist/cjs/payouts-list-core.cjs.entry.js +6 -6
- package/dist/cjs/{payouts-status-D1IbE3-c.js → payouts-status-CP5T9uAc.js} +1 -1
- package/dist/cjs/{payouts-table-DmVthJLU.js → payouts-table-CHNRLZ3K.js} +2 -2
- package/dist/cjs/plaid.service-DvbLnuph.js +43 -0
- package/dist/cjs/{skeleton-C9Aio7v_.js → skeleton-BfN_sjaY.js} +1 -1
- package/dist/cjs/{spinner-oLSXKwxU.js → spinner-51BOfCoS.js} +1 -1
- package/dist/cjs/{table-CEW0_wq-.js → table-CimkSek7.js} +2 -2
- package/dist/cjs/table-filters-menu.cjs.entry.js +2 -2
- package/dist/cjs/terminal-orders-list-core.cjs.entry.js +5 -5
- package/dist/cjs/{terminal-orders-table-DPHz95-0.js → terminal-orders-table-DDLvv83x.js} +2 -2
- package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
- package/dist/cjs/terminals-list-core.cjs.entry.js +5 -5
- package/dist/cjs/{terminals-table-C6rm50Mk.js → terminals-table-BU73whCF.js} +2 -2
- package/dist/cjs/{utils-Vwo0VR7n.js → utils-CowQ4GdN.js} +1 -1
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +71 -64
- package/dist/collection/components/business-forms/payment-provisioning/plaid-verification/plaid-verification.js +1 -8
- package/dist/collection/components/payout-details/payout-details-core.js +3 -3
- package/dist/collection/styles/parts.js +7 -0
- package/dist/collection/ui-components/button.js +27 -3
- package/dist/docs.json +14 -14
- package/dist/esm/additional-questions-details_5.entry.js +2 -2
- package/dist/esm/{badge-AZ7Z3PKH.js → badge-BfWXAKIJ.js} +1 -1
- package/dist/esm/bank-account-document-form-inputs_9.entry.js +6 -12
- package/dist/esm/bank-account-form.entry.js +2 -2
- package/dist/esm/business-details-core.entry.js +3 -3
- package/dist/esm/button-DoF-zpiW.js +41 -0
- package/dist/esm/card-form.entry.js +2 -2
- package/dist/esm/{check-pkg-version-DKbeTbtv.js → check-pkg-version-QOngucT4.js} +1 -1
- package/dist/esm/checkouts-list-core.entry.js +5 -5
- package/dist/esm/{checkouts-table-C5aYyqpX.js → checkouts-table-XjFiAWCw.js} +2 -2
- package/dist/esm/custom-popper_2.entry.js +1 -1
- package/dist/esm/form-alert_5.entry.js +1 -1
- package/dist/esm/form-control-checkbox.entry.js +3 -3
- package/dist/esm/form-control-date.entry.js +2 -2
- package/dist/esm/{form-control-error-text-xEskXF-M.js → form-control-error-text-D5B0Wy4Q.js} +1 -1
- package/dist/esm/form-control-file-v2_2.entry.js +2 -2
- package/dist/esm/{form-control-help-text-Dgnv4IId.js → form-control-help-text-XuRclELV.js} +1 -1
- package/dist/esm/form-control-monetary-provisioning.entry.js +3 -3
- package/dist/esm/form-control-monetary.entry.js +3 -3
- package/dist/esm/form-control-number-masked_3.entry.js +2 -2
- package/dist/esm/form-control-number_3.entry.js +4 -4
- package/dist/esm/form-control-radio.entry.js +1 -1
- package/dist/esm/form-control-select_2.entry.js +2 -2
- package/dist/esm/gross-payment-chart-core.entry.js +3 -3
- package/dist/esm/{header-1-xlSavD5o.js → header-1-BIaO3iDb.js} +1 -1
- package/dist/esm/{header-3-egutsoDI.js → header-3-UswhFvUr.js} +1 -1
- package/dist/esm/hidden-input_2.entry.js +3 -3
- package/dist/esm/{insurance-state-jZTKdt60.js → insurance-state-MpA7uaXF.js} +1 -1
- package/dist/esm/internal-tokenize-payment-method_7.entry.js +5 -5
- package/dist/esm/justifi-additional-questions-form-step_9.entry.js +73 -65
- package/dist/esm/justifi-additional-statement_8.entry.js +1 -1
- package/dist/esm/justifi-apple-pay_8.entry.js +10 -8
- package/dist/esm/justifi-bank-account-billing-form-simple_3.entry.js +2 -2
- package/dist/esm/justifi-business-details.entry.js +4 -4
- package/dist/esm/justifi-business-form.entry.js +6 -6
- package/dist/esm/justifi-checkout.entry.js +3 -3
- package/dist/esm/justifi-checkouts-list-filters.entry.js +1 -1
- package/dist/esm/justifi-checkouts-list.entry.js +5 -5
- package/dist/esm/justifi-details.entry.js +2 -2
- package/dist/esm/justifi-dispute-management.entry.js +2 -2
- package/dist/esm/justifi-dispute-notification_3.entry.js +5 -5
- package/dist/esm/justifi-gross-payment-chart.entry.js +4 -4
- package/dist/esm/justifi-order-terminals.entry.js +4 -4
- package/dist/esm/justifi-payment-details.entry.js +4 -4
- package/dist/esm/justifi-payment-provisioning-core.entry.js +4 -4
- package/dist/esm/justifi-payment-provisioning.entry.js +2 -2
- package/dist/esm/justifi-payment-transactions-list.entry.js +5 -5
- package/dist/esm/justifi-payments-list-filters.entry.js +1 -1
- package/dist/esm/justifi-payments-list.entry.js +6 -6
- package/dist/esm/justifi-payout-details.entry.js +4 -4
- package/dist/esm/justifi-payout-transactions-list.entry.js +5 -5
- package/dist/esm/justifi-payouts-list-filters.entry.js +1 -1
- package/dist/esm/justifi-payouts-list.entry.js +6 -6
- package/dist/esm/justifi-refund-payment.entry.js +5 -5
- package/dist/esm/justifi-saved-payment-method.entry.js +1 -1
- package/dist/esm/justifi-season-interruption-insurance.entry.js +5 -5
- package/dist/esm/justifi-skeleton.entry.js +2 -2
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +1 -1
- package/dist/esm/justifi-terminal-orders-list.entry.js +5 -5
- package/dist/esm/justifi-terminals-list-filters.entry.js +1 -1
- package/dist/esm/justifi-terminals-list.entry.js +5 -5
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-C2WozQkF.js → package-Cc6518FT.js} +1 -1
- package/dist/esm/pagination-menu.entry.js +1 -1
- package/dist/esm/{parts-C4FLe2pT.js → parts-c8J1gsDg.js} +9 -1
- package/dist/esm/payment-details-core.entry.js +5 -5
- package/dist/esm/payment-method-option.entry.js +1 -1
- package/dist/esm/{payment-provisioning-loading-D_VKtlLm.js → payment-provisioning-loading-DRFgrvp1.js} +1 -1
- package/dist/esm/payments-list-core.entry.js +6 -6
- package/dist/esm/{payments-status-D4XkcfLU.js → payments-status-Dkt38hpB.js} +1 -1
- package/dist/esm/{payments-table-BDaiD836.js → payments-table-ghXGJ-N6.js} +2 -2
- package/dist/esm/payout-details-core.entry.js +9 -9
- package/dist/esm/payouts-list-core.entry.js +6 -6
- package/dist/esm/{payouts-status-BR1vd6-D.js → payouts-status-B4iry-1w.js} +1 -1
- package/dist/esm/{payouts-table-B4nuJlpC.js → payouts-table-CBsTdL9_.js} +2 -2
- package/dist/esm/plaid.service-C59iS7tB.js +41 -0
- package/dist/esm/{skeleton-C162KC3u.js → skeleton-DzBAY0bs.js} +1 -1
- package/dist/esm/{spinner-BfjGGaND.js → spinner-DQpyMqKv.js} +1 -1
- package/dist/esm/{table-hHARNoRM.js → table-BwxLvetJ.js} +2 -2
- package/dist/esm/table-filters-menu.entry.js +2 -2
- package/dist/esm/terminal-orders-list-core.entry.js +5 -5
- package/dist/esm/{terminal-orders-table-B-xs6ocO.js → terminal-orders-table-Cy0qV96Y.js} +2 -2
- package/dist/esm/terminal-quantity-selector.entry.js +1 -1
- package/dist/esm/terminals-list-core.entry.js +5 -5
- package/dist/esm/{terminals-table-CnKH-UOw.js → terminals-table-BQQs_JoR.js} +2 -2
- package/dist/esm/{utils-BSpK1eMX.js → utils-BGbtbDiV.js} +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/additional-statement.js +1 -1
- package/dist/module/business-bank-account-form-step.js +71 -64
- package/dist/module/button.js +27 -3
- package/dist/module/cancellation-policy.js +1 -1
- package/dist/module/checkout.store.js +1 -1
- package/dist/module/checkouts-list-core2.js +1 -1
- package/dist/module/customer-details.js +1 -1
- package/dist/module/duplicate-charge.js +1 -1
- package/dist/module/electronic-evidence.js +1 -1
- package/dist/module/justifi-checkout.js +1 -1
- package/dist/module/justifi-checkouts-list-filters.js +1 -1
- package/dist/module/justifi-order-terminals.js +1 -1
- package/dist/module/justifi-payment-transactions-list.js +1 -1
- package/dist/module/justifi-payments-list-filters.js +1 -1
- package/dist/module/justifi-payout-transactions-list.js +1 -1
- package/dist/module/justifi-payouts-list-filters.js +1 -1
- package/dist/module/justifi-terminal-orders-list-filters.js +1 -1
- package/dist/module/justifi-terminals-list-filters.js +1 -1
- package/dist/module/modular-checkout.js +1 -1
- package/dist/module/package.js +1 -1
- package/dist/module/parts.js +9 -1
- package/dist/module/payments-list-core2.js +1 -1
- package/dist/module/payout-details-core2.js +3 -3
- package/dist/module/payouts-list-core2.js +1 -1
- package/dist/module/plaid-payment-method.js +3 -2
- package/dist/module/plaid-verification2.js +1 -8
- package/dist/module/product-or-service.js +1 -1
- package/dist/module/refund-policy.js +1 -1
- package/dist/module/shipping-details.js +1 -1
- package/dist/module/table-filters-menu2.js +1 -1
- package/dist/module/table.js +1 -1
- package/dist/module/terminal-orders-list-core2.js +1 -1
- package/dist/module/terminals-list-core2.js +1 -1
- package/dist/types/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.d.ts +10 -3
- package/dist/types/styles/parts.d.ts +7 -0
- package/dist/types/ui-components/button.d.ts +2 -1
- package/dist/webcomponents/{p-52dc271f.entry.js → p-01a84bc8.entry.js} +1 -1
- package/dist/webcomponents/{p-88d6068d.entry.js → p-02cf51ab.entry.js} +1 -1
- package/dist/webcomponents/p-0559b9c1.entry.js +1 -0
- package/dist/webcomponents/{p-00ba4cf6.entry.js → p-06af9f9f.entry.js} +1 -1
- package/dist/webcomponents/{p-8e631781.entry.js → p-09401e56.entry.js} +1 -1
- package/dist/webcomponents/{p-05d11c40.entry.js → p-2531ee6c.entry.js} +1 -1
- package/dist/webcomponents/{p-8a42d4fe.entry.js → p-27518699.entry.js} +1 -1
- package/dist/webcomponents/{p-c9ea1b77.entry.js → p-277bc549.entry.js} +1 -1
- package/dist/webcomponents/{p-1b973781.entry.js → p-2b60c926.entry.js} +1 -1
- package/dist/webcomponents/{p-e3d03faf.entry.js → p-319ac08d.entry.js} +1 -1
- package/dist/webcomponents/p-32bf8202.entry.js +1 -0
- package/dist/webcomponents/p-3469a272.entry.js +1 -0
- package/dist/webcomponents/{p-19f1e643.entry.js → p-37407a7f.entry.js} +1 -1
- package/dist/webcomponents/{p-b54bf8da.entry.js → p-392c431d.entry.js} +1 -1
- package/dist/webcomponents/{p-11402020.entry.js → p-3cfc202a.entry.js} +1 -1
- package/dist/webcomponents/{p-DX6fcx_0.js → p-3kNggPyP.js} +1 -1
- package/dist/webcomponents/{p-d35b09bf.entry.js → p-43c70ddf.entry.js} +1 -1
- package/dist/webcomponents/{p-bcba5950.entry.js → p-4556535d.entry.js} +1 -1
- package/dist/webcomponents/{p-402ba9aa.entry.js → p-559ff95b.entry.js} +1 -1
- package/dist/webcomponents/p-56362fb6.entry.js +1 -0
- package/dist/webcomponents/{p-c7930f9a.entry.js → p-5895654d.entry.js} +1 -1
- package/dist/webcomponents/{p-154efb83.entry.js → p-5d4e607a.entry.js} +1 -1
- package/dist/webcomponents/{p-c72c5b99.entry.js → p-5d5e26f7.entry.js} +1 -1
- package/dist/webcomponents/{p-02dfdc6f.entry.js → p-64d78daf.entry.js} +1 -1
- package/dist/webcomponents/{p-69c2bbcf.entry.js → p-654573c2.entry.js} +1 -1
- package/dist/webcomponents/p-6986bd9d.entry.js +1 -0
- package/dist/webcomponents/{p-0f1c100d.entry.js → p-6b6195c9.entry.js} +1 -1
- package/dist/webcomponents/{p-a105de67.entry.js → p-6b6d8263.entry.js} +1 -1
- package/dist/webcomponents/p-71b6fdd9.entry.js +1 -0
- package/dist/webcomponents/p-77CuiIig.js +1 -0
- package/dist/webcomponents/{p-c6aee723.entry.js → p-79975b5d.entry.js} +1 -1
- package/dist/webcomponents/{p-808bf425.entry.js → p-79d76cd4.entry.js} +1 -1
- package/dist/webcomponents/{p-2d39358b.entry.js → p-81b3f90f.entry.js} +1 -1
- package/dist/webcomponents/{p-a959ca16.entry.js → p-91bf7445.entry.js} +1 -1
- package/dist/webcomponents/{p-c0592f5f.entry.js → p-91ee58e0.entry.js} +1 -1
- package/dist/webcomponents/{p-163055e3.entry.js → p-941eac67.entry.js} +1 -1
- package/dist/webcomponents/{p-e8cd3097.entry.js → p-9438f755.entry.js} +1 -1
- package/dist/webcomponents/{p-e817f8fc.entry.js → p-95b78da8.entry.js} +1 -1
- package/dist/webcomponents/{p-9a11f17b.entry.js → p-98a1b12a.entry.js} +1 -1
- package/dist/webcomponents/{p-5206cd09.entry.js → p-9eeaf2f9.entry.js} +1 -1
- package/dist/webcomponents/p-BBNT9yj5.js +1 -0
- package/dist/webcomponents/p-BMqYkvp1.js +1 -0
- package/dist/webcomponents/p-BnVuFEgH.js +1 -0
- package/dist/webcomponents/{p-DAZtHA62.js → p-BylxH1fV.js} +1 -1
- package/dist/webcomponents/{p-DyJ1zSHJ.js → p-C47u26qr.js} +1 -1
- package/dist/webcomponents/{p-CIh-k9yP.js → p-CMq8FpAG.js} +1 -1
- package/dist/webcomponents/{p-CGJ_mnry.js → p-CV5ZI_qC.js} +1 -1
- package/dist/webcomponents/{p-DsT0m0mo.js → p-CVa33GsE.js} +1 -1
- package/dist/webcomponents/p-CVkk7TvR.js +1 -0
- package/dist/webcomponents/p-Cc6518FT.js +1 -0
- package/dist/webcomponents/p-CmRrs0bo.js +1 -0
- package/dist/webcomponents/p-CmYy5XDp.js +1 -0
- package/dist/webcomponents/p-CncaMWc8.js +1 -0
- package/dist/webcomponents/{p-CJZ09QNH.js → p-CtxSp8dd.js} +1 -1
- package/dist/webcomponents/{p-5mt2ek0H.js → p-DL3PPUGZ.js} +1 -1
- package/dist/webcomponents/p-DmrpBh4P.js +1 -0
- package/dist/webcomponents/p-DrSNQm-e.js +1 -0
- package/dist/webcomponents/{p-HfLk4CG0.js → p-DvptzT44.js} +1 -1
- package/dist/webcomponents/{p-C3kbpEIZ.js → p-PtJwUDIK.js} +1 -1
- package/dist/webcomponents/p-a0134f5a.entry.js +1 -0
- package/dist/webcomponents/{p-cb9abd2c.entry.js → p-a6d56b36.entry.js} +1 -1
- package/dist/webcomponents/{p-c6a9410d.entry.js → p-a75bc18b.entry.js} +1 -1
- package/dist/webcomponents/{p-7bf586ca.entry.js → p-abc769fa.entry.js} +1 -1
- package/dist/webcomponents/{p-d246e573.entry.js → p-b3675b20.entry.js} +1 -1
- package/dist/webcomponents/{p-DYEXDs2k.js → p-b4MDVEve.js} +1 -1
- package/dist/webcomponents/{p-e71e4c49.entry.js → p-b9248f88.entry.js} +1 -1
- package/dist/webcomponents/{p-150a622a.entry.js → p-bafe9deb.entry.js} +1 -1
- package/dist/webcomponents/p-bb4da414.entry.js +1 -0
- package/dist/webcomponents/{p-6f2b0469.entry.js → p-c5540693.entry.js} +1 -1
- package/dist/webcomponents/p-c8J1gsDg.js +1 -0
- package/dist/webcomponents/{p-9d69ae9f.entry.js → p-d07748fa.entry.js} +4 -4
- package/dist/webcomponents/{p-5862236f.entry.js → p-d0abe57d.entry.js} +1 -1
- package/dist/webcomponents/p-d47909f1.entry.js +1 -0
- package/dist/webcomponents/p-d6bf1592.entry.js +1 -0
- package/dist/webcomponents/{p-fbfe6211.entry.js → p-dbf2ba9e.entry.js} +1 -1
- package/dist/webcomponents/{p-7e14f6ac.entry.js → p-df110446.entry.js} +1 -1
- package/dist/webcomponents/{p-540e2ef2.entry.js → p-e0cca91e.entry.js} +1 -1
- package/dist/webcomponents/{p-1cd7cdbf.entry.js → p-e4ef4a19.entry.js} +1 -1
- package/dist/webcomponents/{p-ff4d485f.entry.js → p-ec9f527d.entry.js} +1 -1
- package/dist/webcomponents/{p-7f3dcd42.entry.js → p-ee06f2fa.entry.js} +1 -1
- package/dist/webcomponents/{p-88c6713a.entry.js → p-f01cdb9f.entry.js} +1 -1
- package/dist/webcomponents/{p-39d11c59.entry.js → p-f2110cd2.entry.js} +1 -1
- package/dist/webcomponents/{p-9dedad17.entry.js → p-f9f0a5c8.entry.js} +1 -1
- package/dist/webcomponents/{p-e89d0f36.entry.js → p-fa876b02.entry.js} +1 -1
- package/dist/webcomponents/{p-7e3030c2.entry.js → p-fe0feef1.entry.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +4 -2
- package/dist/cjs/button-Cr3iHpyf.js +0 -19
- package/dist/cjs/plaid-icon-DiZrP1DM.js +0 -46
- package/dist/esm/button-DOkTCYSa.js +0 -17
- package/dist/esm/plaid-icon-B7a1QC7F.js +0 -43
- package/dist/module/plaid-icon.js +0 -3
- package/dist/webcomponents/p--Kvji7o2.js +0 -1
- package/dist/webcomponents/p-21b5240d.entry.js +0 -1
- package/dist/webcomponents/p-35d1be0f.entry.js +0 -1
- package/dist/webcomponents/p-62f9c008.entry.js +0 -1
- package/dist/webcomponents/p-6c503a00.entry.js +0 -1
- package/dist/webcomponents/p-6d565cd6.entry.js +0 -1
- package/dist/webcomponents/p-8c55dac0.entry.js +0 -1
- package/dist/webcomponents/p-BoO2BHR_.js +0 -1
- package/dist/webcomponents/p-BtFe5yQU.js +0 -1
- package/dist/webcomponents/p-C2WozQkF.js +0 -1
- package/dist/webcomponents/p-C4FLe2pT.js +0 -1
- package/dist/webcomponents/p-CI11WF1E.js +0 -1
- package/dist/webcomponents/p-DFiTyYE9.js +0 -1
- package/dist/webcomponents/p-DO4RBao8.js +0 -1
- package/dist/webcomponents/p-DqVU8ohH.js +0 -1
- package/dist/webcomponents/p-DyETkJs3.js +0 -1
- package/dist/webcomponents/p-EaBIgUj8.js +0 -1
- package/dist/webcomponents/p-Jz9qdPhR.js +0 -1
- package/dist/webcomponents/p-a2b016a7.entry.js +0 -1
- package/dist/webcomponents/p-b0e83a6e.entry.js +0 -1
- package/dist/webcomponents/p-eaa9cb8e.entry.js +0 -1
- package/dist/webcomponents/p-f55a6397.entry.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as t}from"./p-CV0Pyo1O.js";import{H as e}from"./p-C4FLe2pT.js";const o=o=>{const{helpText:r,name:m}=o;return r?t("small",{class:"form-text text-muted",id:`form-help-text-${m}`,part:e},r):null};export{o as F}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e={name:"@justifi/webcomponents",version:"6.10.3"};export{e as p}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a="font-family",t="background-color",e=`text color ${a}`,s=`text-danger ${e}`,i=`heading ${e}`,r=`heading-1 ${i}`,l=`heading-2 ${i}`,n=`heading-3 ${i}`,o=`heading-4 ${i}`,$=`heading-5 ${i}`,d=`link text ${a}`,p=`button ${e}`,m=`button-primary ${p}`,c=`button-secondary ${p}`,u=`button-link ${p}`,f="button-loading",b=`label ${e}`,g=`input ${e} ${t}`,h=`input-group ${g}`,y=`input-invalid ${g}`,k=`input-disabled ${g}`,x=`input-focused ${g}`,v=`input-invalid-and-focused ${g}`,w="input-radio",j=`input-radio-focused ${w}`,q=`input-radio-checked ${w}`,z=`input-radio-checked-focused ${w}`,A=`input-radio-invalid ${w}`,B="input-checkbox",C=`input-checkbox-invalid ${B}`,D=`input-checkbox-focused ${B}`,E=`input-checkbox-checked ${B}`,F=`input-checkbox-checked-focused ${B}`,G=`input-adornment ${e}`,H=`alert ${e}`,I=`alert-danger ${H}`,J=`tooltip ${e}`,K=`tooltip-icon ${e}`,L=`tooltip-inner ${e}`,M=`card ${e} ${t}`,N=`table ${e} ${t}`,O=`table-row ${e} ${t}`,P=`table-cell ${e} ${t}`,Q="table-head",R=`table-head-row ${e} ${t}`,S=`table-head-cell ${P}`,T="table-foot",U=`table-foot-row ${e} ${t}`,V=`table-foot-cell ${P}`,W=`table-cell-even ${P}`,X=`table-cell-odd ${P}`,Y=a=>a%2?W:X,Z=`table-empty ${e} ${t}`,_=`table-error ${e} ${t}`,aa=`pagination-button ${p}`,ta=`pagination-button-disabled button-disabled ${p}`,ea=`pagination-button-text ${e}`,sa=`pagination-button-icon ${e}`,ia=`pagination-button-icon-next ${sa}`,ra=`pagination-button-icon-previous ${sa}`,la="loading-spinner",na=`badge ${a}`,oa=`${na} badge-primary`,$a=`${na} badge-secondary`,da=`${na} badge-success`,pa=`${na} badge-danger`,ma=`${na} badge-warning`,ca=`${na} badge-info`,ua=`${na} badge-light`,fa=`${na} badge-dark`,ba=`dropdown-menu ${e}`,ga=`dropdown-menu-button ${m}`,ha=`radio-list-item ${e}`,ya="skeleton",ka="image",xa="billing-form",va="checkout-summary",wa="filter-menu",ja=`${wa} payments-list-filter-menu`,qa="payments-list-filter-param",za=`${qa} payment-id-payments-list-filter-param`,Aa=`${qa} terminal-id-payments-list-filter-param`,Ba=`${qa} payment-status-payments-list-filter-param`,Ca=`${qa} payment-mode-payments-list-filter-param`,Da=`${qa} checkout-id-payments-list-filter-param`,Ea=`${qa} account-holder-payments-list-filter-param`,Fa=`${qa} created-after-payments-list-filter-param`,Ga=`${qa} created-before-payments-list-filter-param`,Ha=`${wa} payouts-list-filter-menu`,Ia="payouts-list-filter-param",Ja=`${Ia} status-payouts-list-filter-param`,Ka=`${Ia} created-after-payouts-list-filter-param`,La=`${Ia} created-before-payouts-list-filter-param`,Ma=`${wa} checkouts-list-filter-menu`,Na="checkouts-list-filter-param",Oa=`${Na} checkout-status-checkouts-list-filter-param`,Pa=`${Na} payment-mode-checkouts-list-filter-param`,Qa=`${Na} checkout-id-checkouts-list-filter-param`,Ra=`${Na} created-after-checkouts-list-filter-param`,Sa=`${Na} created-before-checkouts-list-filter-param`,Ta=`${wa} terminals-list-filter-menu`,Ua="terminals-list-filter-param",Va=`${Ua} terminal-id-terminals-list-filter-param`,Wa=`${Ua} terminal-order-id-terminals-list-filter-param`,Xa=`${Ua} terminal-status-terminals-list-filter-param`,Ya=`${Ua} created-after-terminals-list-filter-param`,Za=`${Ua} created-before-terminals-list-filter-param`,_a=`${wa} terminal-orders-list-filter-menu`,at="terminal-orders-list-filter-param",tt=`${at} order-status-terminal-orders-list-filter-param`,et=`${at} order-type-terminal-orders-list-filter-param`,st=`${at} created-after-terminal-orders-list-filter-param`,it=`${at} created-before-terminal-orders-list-filter-param`;export{b as $,Ta as A,Va as B,Wa as C,Xa as D,Ya as E,Za as F,ya as G,e as H,r as I,l as J,d as K,fa as L,ua as M,ca as N,ma as O,pa as P,da as Q,$a as R,oa as S,na as T,la as U,S as V,Y as W,y as X,k as Y,x as Z,g as _,Ma as a,G as a0,s as a1,n as a2,ka as a3,u as a4,M as a5,h as a6,C as a7,F as a8,D as a9,U as aA,V as aB,Z as aC,_ as aD,P as aE,I as aF,H as aG,J as aH,L as aI,K as aJ,E as aa,B as ab,A as ac,z as ad,q as ae,j as af,w as ag,aa as ah,ta as ai,ra as aj,ea as ak,ia as al,c as am,m as an,f as ao,ga as ap,ba as aq,v as ar,o as as,xa as at,$ as au,N as av,Q as aw,R as ax,O as ay,T as az,Qa as b,va as c,Ra as d,Sa as e,ja as f,za as g,Ba as h,Ca as i,Da as j,Ea as k,Fa as l,Ga as m,Ha as n,Ja as o,Pa as p,Ka as q,La as r,Oa as s,Aa as t,ha as u,_a as v,tt as w,et as x,st as y,it as z}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as s}from"./p-CV0Pyo1O.js";import{J as t}from"./p-C4FLe2pT.js";import{c as a}from"./p-D8GTwl9v.js";const r=a=>s("h2",{class:`header-2 ${null==a?void 0:a.class}`,part:t},a.text),o=a({}),{state:e,on:n}=o,p=a({}),{state:i}=p,l={},c=()=>{let s=!0;return Object.keys(e).forEach((t=>{null===e[t]?(i[t]=!0,s=!1):i[t]=!1})),{isValid:s}},m=(s,t)=>{const a=l.hasOwnProperty(s),r=l[s];if(!a)return l[s]=t,!1;const o=r!==t;return o&&(l[s]=t),o};export{r as H,i as a,n as b,m as h,e as i,c as v}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as s}from"./p-CV0Pyo1O.js";import{am as a,an as r,ao as n}from"./p-C4FLe2pT.js";const o=(o,t)=>s("button",Object.assign({class:`btn btn-${o.variant}`,onClick:o.clickHandler,part:`${{primary:r,secondary:a}[o.variant]} ${o.isLoading?n:""}`},o),o.isLoading?s("div",{class:"spinner-border spinner-border-sm",role:"status",part:"button-spinner"},s("span",{class:"visually-hidden"},"Loading...")):t);export{o as B}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as a}from"./p-CV0Pyo1O.js";import{L as r,M as s,N as e,O as g,P as n,Q as d,R as i,S as t,T as b}from"./p-C4FLe2pT.js";var o;!function(a){a.PRIMARY="primary",a.SECONDARY="secondary",a.SUCCESS="success",a.DANGER="danger",a.WARNING="warning",a.INFO="info",a.LIGHT="light",a.DARK="dark"}(o||(o={}));const c=o=>{const{variant:c,text:p,title:f}=o,l={default:"badge",primary:"badge bg-primary",secondary:"badge bg-secondary",success:"badge bg-success",danger:"badge bg-danger",warning:"badge bg-warning",info:"badge bg-info",light:"badge bg-light",dark:"badge bg-dark"},y={default:b,primary:t,secondary:i,success:d,danger:n,warning:g,info:e,light:s,dark:r};return a("span",{class:l[c]||l.default,part:y[c]||y.default,title:f},p)};export{o as B,c as a}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as t}from"./p-CV0Pyo1O.js";import{G as e}from"./p-C4FLe2pT.js";const s=({component:s="div",height:o,width:r,className:i,styles:a={}})=>{const p=Object.assign(Object.assign({},a),{width:r,height:o});return t(s,{class:`${i} skeleton`,style:p,part:e,"aria-hidden":"true"})};export{s as S}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as s}from"./p-CV0Pyo1O.js";import{U as o}from"./p-C4FLe2pT.js";const r=()=>s("div",{class:"d-flex justify-content-center"},s("div",{class:"spinner-border",role:"status",part:o},s("span",{class:"visually-hidden"},"Loading...")));export{r as S}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as o}from"./p-CV0Pyo1O.js";import{a2 as p}from"./p-C4FLe2pT.js";const r=r=>o("h3",{class:`header-3 ${null==r?void 0:r.class}`,part:p},r.text);export{r as H}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as M}from"./p-55QcjheA.js";import"./p-Cjcsf8ku.js";import"./p-BiNakvsa.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";const j=M();class N{async getLinkToken(M,N,T,D){return j.post({endpoint:`plaid/${N}/link`,body:{checkout_id:T},authToken:M,signal:D})}async getLinkTokenForVerification(M,N,T){return j.post({endpoint:`entities/plaid/${N}/link_token`,body:{},authToken:M,signal:T})}async getBankAccountData(M,N,T){return j.get({endpoint:`entities/plaid/${N}/bank_account`,authToken:M,signal:T})}async postPlaidVerifiedBankAccountData(M,N,T,D){return j.post({endpoint:`entities/plaid/${N}/bank_account`,body:T,authToken:M,signal:D})}async tokenizeBankAccount(M,N,T,D,I,u){const y=`plaid/${N}/tokenize`,i={public_token:T};return D&&(i.link_token_id=D),I&&(i.payment_method_group_id=I),j.post({endpoint:y,body:i,authToken:M,signal:u})}}const T="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ4IiB2aWV3Qm94PSIwIDAgMjggMjkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgY2xhc3M9ImNzcy0xcmRhajhtIj48ZyBmaWxsPSIjMTExIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yNS43NjI5IDI2LjI2MjhMMjggMTcuNTMwOUwyNC45NjkxIDE0LjUwMDFMMjcuOTk5OSAxMS40NjkxTDI1Ljc2MjggMi43MzcwNkwxNy4wMzA5IDAuNUwxNC4wMDAxIDMuNTMxTDEwLjk2OSAwLjUwMDE0TDIuMjM3MDYgMi43MzczNEwwIDExLjQ2OTFMMy4wMzEyOCAxNC40OTk5TDAuMDAwMTQgMTcuNTMxTDIuMjM3MiAyNi4yNjI5TDEwLjk2OTEgMjguNUwxNC4wMDAxIDI1LjQ2OUwxNy4wMzEgMjguNDk5OUwyNS43NjI5IDI2LjI2MjhaTTE1LjczMjEgMjMuNzM3MUwxOC42MTg2IDIwLjg1MDVMMjIuMjkxMiAyNC41MjMzTDE3LjY5NTYgMjUuNzAwN0wxNS43MzIxIDIzLjczNzFaTTExLjExMzYgOS44ODE1NEwxNC4wMDAzIDYuOTk1MDJMMTYuODg2OCA5Ljg4MTRMMTQuMDAwMSAxMi43Njc5TDExLjExMzYgOS44ODE1NFpNMTIuMjY4MiAxNC41TDkuMzgxNTQgMTcuMzg2NUw2LjQ5NTAyIDE0LjVMOS4zODE1NCAxMS42MTM1TDEyLjI2ODIgMTQuNVpNMTguNjE4NyAxMS42MTMzTDIxLjUwNTMgMTQuNUwxOC42MTg2IDE3LjM4NjVMMTUuNzMyMSAxNC41TDE4LjYxODcgMTEuNjEzM1pNMTYuODg2NyAxOS4xMTg2TDE0LjAwMDEgMjIuMDA1MUwxMS4xMTM1IDE5LjExODVMMTQuMDAwMSAxNi4yMzE5TDE2Ljg4NjcgMTkuMTE4NlpNMTAuMzA0NCAyNS43MDA3TDUuNzA4NjQgMjQuNTIzM0w5LjM4MTU0IDIwLjg1MDRMMTIuMjY4MiAyMy43MzcxTDEwLjMwNDQgMjUuNzAwN1pNNC43NjMwOCAxNi4yMzE5TDcuNjQ5NiAxOS4xMTg1TDMuOTc2NyAyMi43OTE0TDIuNzk5MyAxOC4xOTU3TDQuNzYzMDggMTYuMjMxOVpNMy45NzY3IDYuMjA4MzZMNy42NDk3NCA5Ljg4MTRMNC43NjMwOCAxMi43NjgxTDIuNzk5MyAxMC44MDQxTDMuOTc2NyA2LjIwODM2Wk0xMi4yNjgzIDUuMjYyOTRMOS4zODE2OCA4LjE0OTZMNS43MDg5MiA0LjQ3NjdMMTAuMzA0NyAzLjI5OTNMMTIuMjY4MyA1LjI2Mjk0Wk0xNy42OTU5IDMuMjk5M0wyMi4yOTE1IDQuNDc2N0wxOC42MTg2IDguMTQ5NDZMMTUuNzMyMSA1LjI2Mjk0TDE3LjY5NTkgMy4yOTkzWk0yMy4yMzcyIDEyLjc2ODFMMjAuMzUwNSA5Ljg4MTRMMjQuMDIzMyA2LjIwODc4TDI1LjIwMDcgMTAuODA0NkwyMy4yMzcyIDEyLjc2ODFaTTI0LjAyMzMgMjIuNzkxNEwyMC4zNTA1IDE5LjExODZMMjMuMjM3MiAxNi4yMzIxTDI1LjIwMDcgMTguMTk1N0wyNC4wMjMzIDIyLjc5MTRaIj48L3BhdGg+PC9nPjwvc3ZnPgo=";export{N as P,T as p}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as t,r as e,c as i,H as s,g as n}from"./p-CV0Pyo1O.js";import{A as o}from"./p-55QcjheA.js";import{A as a,r,s as l,t as h,u as c,v as d,w as p,I as u,m as y,n as m,o as v}from"./p-BiNakvsa.js";import{S as f}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{S as b}from"./p-DqVU8ohH.js";import{c as g,o as k,g as P,a as w,b as C}from"./p-Daew0gTO.js";import{H as A,u as E}from"./p-C4FLe2pT.js";import{f as S}from"./p-MeSAYDNh.js";import{w as _,c as j}from"./p-DVJaoI_m.js";import{H as I}from"./p-BoO2BHR_.js";import{H as R,b as T,h as L,i as N}from"./p-CI11WF1E.js";import{H as M}from"./p-EaBIgUj8.js";import{J as O,c as x}from"./p-DX6fcx_0.js";import"./p-HXpYMWUU.js";import{C as z,a as D,b as B}from"./p-Cjcsf8ku.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as F,a as H}from"./p-D2muobcE.js";import{C as U}from"./p-BHA4oSi3.js";import{P as q,p as V}from"./p-Jz9qdPhR.js";import{P as G,a as Y,b as W}from"./p-DkoufM1t.js";import{C as J}from"./p-ZpPDShvP.js";import"./p-D8GTwl9v.js";import"./p-C2WozQkF.js";var Q;!function(t){t.UNAVAILABLE="UNAVAILABLE",t.SESSION_ERROR="SESSION_ERROR",t.MERCHANT_VALIDATION_ERROR="MERCHANT_VALIDATION_ERROR",t.PAYMENT_PROCESSING_ERROR="PAYMENT_PROCESSING_ERROR",t.USER_CANCELLED="USER_CANCELLED"}(Q||(Q={}));class X{constructor(){this.api=o()}initialize(t){if(this.applePayConfig=new a(t),!this.applePayConfig.isValid)throw new Error("Invalid Apple Pay configuration provided")}async validateMerchant(t,e){try{return await this.api.post({endpoint:"apple_pay/merchant_session",authToken:t,headers:{"Sub-Account":e},body:{domain:window.location.host,display_name:this.applePayConfig.displayName}})}catch(t){throw console.error("Backend validation failed:",t),new Error("Merchant validation failed")}}async processPayment(t,e,i){const s=await this.api.post({endpoint:"apple_pay/process_token",authToken:t,body:i,headers:{"Sub-Account":e}});return{success:s.id&&!!s.data.token,data:s}}isAvailable(){return r.isApplePaySupported()&&r.canMakePayments()}async canMakePaymentsWithActiveCard(){if(!this.applePayConfig)throw new Error("Apple Pay not initialized. Call initialize() first.");return await r.canMakePaymentsWithActiveCard(this.applePayConfig.merchantIdentifier)}async startPaymentSession(t,e,i){if(!this.applePayConfig)throw console.error("[ApplePayService] Missing applePayConfig. Did you call initialize()?"),new Error("Apple Pay not initialized. Call initialize() first.");const s=new l(t);if(!s.isValid){const t=[];throw s.countryCode||t.push("countryCode"),s.currencyCode||t.push("currencyCode"),s.merchantCapabilities&&0!==s.merchantCapabilities.length||t.push("merchantCapabilities"),s.supportedNetworks&&0!==s.supportedNetworks.length||t.push("supportedNetworks"),s.total&&s.total.label&&s.total.amount||t.push("total"),console.error("[ApplePayService] Payment request is invalid. Missing/invalid:",t),new Error("Invalid payment request provided")}return this.currentPaymentRequest=s,new Promise(((t,n)=>{try{if("undefined"==typeof window||!("ApplePaySession"in window))return console.error("[ApplePayService] ApplePaySession not available on window"),n({success:!1,error:{code:Q.UNAVAILABLE,message:"ApplePaySession API is not available in this environment"}});this.currentSession=new window.ApplePaySession(3,s),this.setupSessionEventHandlers(t,n,e,i),this.currentSession.begin()}catch(t){console.error("[ApplePayService] Exception while starting session:",t),n({success:!1,error:{code:Q.SESSION_ERROR,message:t instanceof Error?t.message:"Failed to start Apple Pay session"}})}}))}abortPaymentSession(){this.currentSession&&(this.currentSession.abort(),this.currentSession=void 0,this.currentPaymentRequest=void 0)}setupSessionEventHandlers(t,e,i,s){this.currentSession&&this.applePayConfig&&this.currentPaymentRequest?(this.currentSession.onvalidatemerchant=async()=>{try{if(!i)throw console.error("[ApplePayService] Missing authToken for merchant validation"),new Error("Authentication token not provided.");const t=await this.validateMerchant(i,s);try{this.currentSession.completeMerchantValidation(t)}catch(t){throw console.error("Error calling completeMerchantValidation:",t),t}}catch(t){console.error("=== MERCHANT VALIDATION ERROR ==="),console.error("Error during merchant validation:",t),t&&t.stack&&console.error("Error stack:",t.stack),this.currentSession.abort(),e({success:!1,error:{code:Q.MERCHANT_VALIDATION_ERROR,message:t instanceof Error?t.message:"Merchant validation failed"}})}},this.currentSession.onpaymentauthorized=async n=>{try{const o=n.payment,a=Object.assign(Object.assign({},o.token),{product_details:{name:this.currentPaymentRequest.total.label,price:r.parseAmount(this.currentPaymentRequest.total.amount),description:this.currentPaymentRequest.total.label}}),l=await this.processPayment(i,s,a);l.success?(this.currentSession.completePayment({status:h.STATUS_SUCCESS}),t({success:!0,token:o.token,paymentMethodId:l.data.id})):(console.error("PSP reported payment failure:",l.data),this.currentSession.completePayment({status:h.STATUS_FAILURE}),e({success:!1,error:{code:Q.PAYMENT_PROCESSING_ERROR,message:"Payment processing failed"}}))}catch(t){console.error("=== PAYMENT PROCESSING ERROR ==="),console.error("Error processing payment:",t),t&&t.stack&&console.error("Error stack:",t.stack),this.currentSession.completePayment({status:h.STATUS_FAILURE}),e({success:!1,error:{code:Q.PAYMENT_PROCESSING_ERROR,message:t instanceof Error?t.message:"Payment processing failed"}})}finally{this.currentSession=void 0,this.currentPaymentRequest=void 0}},this.currentSession.onpaymentmethodselected=()=>{const t={newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]};try{this.currentSession.completePaymentMethodSelection(t)}catch(t){console.error("Error completing payment method selection:",t),this.currentSession.abort()}},this.currentSession.onshippingmethodselected=()=>{this.currentSession.completeShippingMethodSelection({status:h.STATUS_SUCCESS,newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]})},this.currentSession.oncancel=t=>{if(t.sessionError)switch(console.error(t.sessionError),t.sessionError.code){case"unknown":console.error("Unknown error - likely merchant validation issue"),console.error("This usually means:"),console.error("1. Merchant certificate is invalid or expired"),console.error("2. Merchant identifier mismatch"),console.error("3. Backend validation endpoint issues");break;case"invalidMerchantSession":console.error("Invalid merchant session provided"),console.error("Check that the merchant session from backend is valid");break;case"userCancel":console.error("User cancelled the payment");break;default:console.error("Other error code:",t.sessionError.code)}this.currentSession=void 0,this.currentPaymentRequest=void 0,e({success:!1,error:{code:Q.USER_CANCELLED,message:"User cancelled the Apple Pay session"}})},"onerror"in this.currentSession&&(this.currentSession.onerror=t=>{console.error("=== APPLE PAY SESSION ERROR ==="),console.error("Session error:",t),this.currentSession=void 0,this.currentPaymentRequest=void 0,e({success:!1,error:{code:Q.SESSION_ERROR,message:"Apple Pay session error occurred"}})})):console.error("[ApplePayService] setupSessionEventHandlers called without required state",{hasSession:Boolean(this.currentSession),hasConfig:Boolean(this.applePayConfig),hasPaymentRequest:Boolean(this.currentPaymentRequest)})}static createPaymentRequest(t,e,i="US",s="USD"){return{countryCode:i,currencyCode:s,merchantCapabilities:r.getDefaultMerchantCapabilities(),supportedNetworks:r.getDefaultSupportedNetworks(),total:r.createLineItem(e,t)}}getApplePayConfig(){return this.applePayConfig}}const Z=e=>{const{isLoading:i}=e;return i?t("div",{class:"container-fluid p-0"},t("div",{class:"row mb-3"},t("div",{class:"col-12 align-content-center"},t(b,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null},$=e=>t("div",{class:"apple-pay-button-container"},t("button",Object.assign({class:(()=>{let t="apple-pay-button";switch(e.buttonStyle){case c.WHITE:t+=" apple-pay-button-white";break;case c.WHITE_OUTLINE:t+=" apple-pay-button-white-outline";break;default:t+=" apple-pay-button-black"}switch(e.buttonType){case d.BUY:t+=" apple-pay-button-type-buy";break;case d.DONATE:t+=" apple-pay-button-type-donate";break;default:t+=" apple-pay-button-type-plain"}return(e.disabled||e.isProcessing||!e.isAvailable)&&(t+=" disabled"),t})(),style:{width:e.width,height:e.height},onClick:()=>{!e.disabled&&!e.isProcessing&&e.isAvailable&&e.clickHandler&&e.clickHandler()},disabled:e.disabled||e.isProcessing||!e.isAvailable,"aria-label":"Pay with Apple Pay",type:"button"},e),e.isProcessing&&t("div",{class:"processing-overlay"},t("div",{class:"spinner"}),t("span",null,"Processing..."))),t("style",null,"\n .apple-pay-button-container {\n display: block;\n position: relative;\n width: 100%;\n }\n\n /* Apple Pay CSS classes - these are the official Apple Pay button styles */\n .apple-pay-button {\n display: inline-block;\n -webkit-appearance: -apple-pay-button;\n -apple-pay-button-type: plain; /* default */\n -apple-pay-button-style: black; /* default */\n border-radius: 8px;\n cursor: pointer;\n border: none;\n outline: none;\n transition: opacity 0.2s ease;\n position: relative;\n }\n\n /* Button styles */\n .apple-pay-button.apple-pay-button-black {\n -apple-pay-button-style: black;\n }\n\n .apple-pay-button.apple-pay-button-white {\n -apple-pay-button-style: white;\n }\n\n .apple-pay-button.apple-pay-button-white-outline {\n -apple-pay-button-style: white-outline;\n }\n\n /* Button types */\n .apple-pay-button.apple-pay-button-type-plain {\n -apple-pay-button-type: plain;\n }\n\n .apple-pay-button.apple-pay-button-type-buy {\n -apple-pay-button-type: buy;\n }\n\n .apple-pay-button.apple-pay-button-type-donate {\n -apple-pay-button-type: donate;\n }\n\n /* Hover and disabled states */\n .apple-pay-button:hover:not(.disabled) {\n opacity: 0.9;\n }\n\n .apple-pay-button.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n /* Processing overlay */\n .processing-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: rgba(0, 0, 0, 0.8);\n color: white;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n }\n\n .spinner {\n width: 16px;\n height: 16px;\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-top: 2px solid #fff;\n border-radius: 50%;\n animation: spin 1s linear infinite;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n\n /* Responsive design */\n @media (max-width: 480px) {\n .apple-pay-button {\n width: 100% !important;\n min-width: 200px;\n }\n }\n ")),K=class{constructor(t){e(this,t),this.applePayStarted=i(this,"applePayStarted",7),this.applePayCompleted=i(this,"applePayCompleted",7),this.applePayCancelled=i(this,"applePayCancelled",7),this.applePayError=i(this,"applePayError",7),this.countryCode="US",this.merchantIdentifier="merchant.com.staging-justifi.checkout-dev",this.merchantDisplayName="JustiFi Checkout",this.initiativeContext="dev-checkout.justifi-staging.com",this.buttonType=d.PLAIN,this.buttonStyle=c.BLACK,this.disabled=!1,this.showSkeleton=!0,this.width="100%",this.height="48px",this.isLoading=!0,this.isProcessing=!1,this.isAvailable=!1,this.canMakePayments=!1,this.isConfigValid=!0,this.error=null,this.handleApplePayClick=async()=>{var t,e,i;if(!this.isProcessing&&!this.disabled&&this.isAvailable)try{this.isProcessing=!0,this.error=null,this.applePayStarted.emit();const i={countryCode:this.countryCode,currencyCode:g.paymentCurrency,merchantCapabilities:[p.SUPPORTS_3DS,p.SUPPORTS_CREDIT,p.SUPPORTS_DEBIT],supportedNetworks:r.getDefaultSupportedNetworks(),total:r.createLineItem(g.paymentDescription,g.paymentAmount)},s=await this.applePayService.startPaymentSession(i,g.authToken,g.accountId);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===(t=s.error)||void 0===t?void 0:t.message)||"Payment failed",code:(null===(e=s.error)||void 0===e?void 0:e.code)||K.ErrorCode.PAYMENT_FAILED}))}catch(t){if((null===(i=null==t?void 0:t.error)||void 0===i?void 0:i.code)===Q.USER_CANCELLED)this.applePayCancelled.emit();else{const e=t instanceof Error?t.message:"Payment failed";this.error=e,this.applePayError.emit({error:e,code:K.ErrorCode.PAYMENT_FAILED}),this.applePayCompleted.emit({success:!1,error:e})}}finally{this.isProcessing=!1}}}async initializeApplePay(){try{if(this.isLoading=!0,this.error=null,this.isConfigValid=!0,!(Boolean(g.paymentAmount)&&Boolean(g.paymentCurrency)&&Boolean(g.authToken)))return this.error="Missing required Apple Pay configuration",this.isConfigValid=!1,console.error("Apple Pay config error: missing required values",{paymentAmount:g.paymentAmount,paymentCurrency:g.paymentCurrency,hasAuthToken:Boolean(g.authToken),accountId:g.accountId}),this.applePayError.emit({error:this.error,code:K.ErrorCode.CONFIG_ERROR}),void(this.isLoading=!1);if(this.isAvailable=r.isApplePaySupported(),this.canMakePayments=r.canMakePayments(),!this.isAvailable)return this.error="Apple Pay is not supported on this device",console.error(this.error),this.applePayError.emit({error:this.error,code:K.ErrorCode.NOT_SUPPORTED}),void(this.isLoading=!1);if(!this.canMakePayments)return this.error="Apple Pay is not available",console.error(this.error),this.applePayError.emit({error:this.error,code:K.ErrorCode.NOT_AVAILABLE}),void(this.isLoading=!1);const t={merchantIdentifier:this.merchantIdentifier,displayName:this.merchantDisplayName,initiative:"web",initiativeContext:this.initiativeContext,buttonType:this.buttonType,buttonStyle:this.buttonStyle};this.applePayService=new X,this.applePayService.initialize(t),await this.applePayService.canMakePaymentsWithActiveCard()||console.warn("No Apple Pay cards available, but continuing...")}catch(t){console.error("Apple Pay initialization error:",t),this.error=t instanceof Error?t.message:"Failed to initialize Apple Pay",this.applePayError.emit({error:this.error,code:K.ErrorCode.INITIALIZATION_ERROR})}finally{this.isLoading=!1}}async isSupported(){return this.isAvailable&&this.canMakePayments}async getPaymentMethods(){return this.isAvailable?r.getDefaultSupportedNetworks():[]}async abort(){this.applePayService.abortPaymentSession(),this.isProcessing=!1,this.applePayCancelled.emit()}render(){if(!g.applePayEnabled)return null;const e=!this.isLoading&&this.isAvailable&&this.canMakePayments&&this.isConfigValid;return t(f,null,g.checkoutLoaded&&t("script",{async:!0,src:"https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",onLoad:()=>{this.initializeApplePay()}}),t("div",{class:"apple-pay-container"},t(Z,{isLoading:this.isLoading}),e&&t($,{buttonType:this.buttonType,buttonStyle:this.buttonStyle,disabled:this.disabled,isProcessing:this.isProcessing,isAvailable:this.isAvailable,clickHandler:this.handleApplePayClick,width:this.width,height:this.height})),t("style",null,"\n .apple-pay-container {\n width: 100%;\n }\n "))}};K.ErrorCode={CONFIG_ERROR:"CONFIG_ERROR",NOT_SUPPORTED:"NOT_SUPPORTED",NOT_AVAILABLE:"NOT_AVAILABLE",INITIALIZATION_ERROR:"INITIALIZATION_ERROR",PAYMENT_FAILED:"PAYMENT_FAILED"};const tt=class{constructor(t){e(this,t)}render(){return t(f,{key:"13d4dd7fbc2335e2af7c24066800e0642df0cd77"},t("section",{key:"456cc598f5cf08e55b0c24ff23945b327df5fb66"},t("div",{key:"37143e2b5157cfb973189335e357f39e78fbb7a1"},t("div",{key:"f4d34254b589f631e5cf7f49cab4d37933a7b1a0",part:A},null==g?void 0:g.paymentDescription),t("div",{key:"7d4f4bad72a2c637eafd95ab7dc73f5881ed4906"},t("span",{key:"37b639cd520e87d73246f5d68a294fa2919376cd",part:A},"Total")," ",t("span",{key:"0ace5f0a3f53dd016d3d3167879364be20f407e4",part:A},S(+(null==g?void 0:g.totalAmount)))))))}},et=e=>{const{isLoading:i}=e;return i?t("div",{class:"container-fluid p-0"},t("div",{class:"row mb-3"},t("div",{class:"col-12 align-content-center"},t(b,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null};var it;!function(t){t.initialize="justifi.googlePay.initialize",t.ready="justifi.googlePay.ready",t.sdkLoaded="justifi.googlePay.sdkLoaded",t.initializeResult="justifi.googlePay.initializeResult",t.error="justifi.googlePay.error",t.buttonClicked="justifi.googlePay.buttonClicked",t.startPayment="justifi.googlePay.startPayment",t.paymentSuccess="justifi.googlePay.paymentSuccess",t.paymentCanceled="justifi.googlePay.paymentCanceled",t.paymentError="justifi.googlePay.paymentError"}(it||(it={}));const st=class{constructor(t){e(this,t),this.googlePayCompleted=i(this,"googlePayCompleted",7),this.googlePayCancelled=i(this,"googlePayCancelled",7),this.environment="TEST",this.iframeReady=!1,this.sdkLoaded=!1,this.isReadyToPay=!1,this.handleMessage=t=>{if(t.origin!==this.iframeOrigin)return;const{eventType:e,data:i}=t.data||{};switch(e){case it.ready:this.iframeReady=!0;break;case it.sdkLoaded:this.sdkLoaded=!0,this.sendInitialize();break;case it.initializeResult:this.isReadyToPay=i.isReadyToPay,i.error&&console.error("Init error:",i.error);break;case it.error:console.error("Google Pay error:",i);break;case it.buttonClicked:this.sendStartPayment();break;case it.paymentSuccess:this.googlePayCompleted.emit({success:!0,paymentMethodId:i.paymentMethodId,cardNetwork:i.cardNetwork,cardDetails:i.cardDetails});break;case it.paymentCanceled:this.googlePayCancelled.emit();break;case it.paymentError:this.googlePayCompleted.emit({success:!1,error:{code:i.code,message:i.message}})}}}async componentWillLoad(){await _(),this.iframeOrigin=j.iframeOrigin}componentDidLoad(){window.addEventListener("message",this.handleMessage)}disconnectedCallback(){window.removeEventListener("message",this.handleMessage)}sendInitialize(){var t;(null===(t=this.iframeElement)||void 0===t?void 0:t.contentWindow)&&this.iframeElement.contentWindow.postMessage({eventType:it.initialize,data:{environment:this.environment,gatewayMerchantId:g.accountId,merchantName:this.merchantName,authToken:g.authToken,accountId:g.accountId}},this.iframeOrigin)}sendStartPayment(){var t;if(!(null===(t=this.iframeElement)||void 0===t?void 0:t.contentWindow))return;const e={totalPrice:String(g.paymentAmount/100),totalPriceStatus:"FINAL",currencyCode:g.paymentCurrency||"USD"};this.iframeElement.contentWindow.postMessage({eventType:it.startPayment,data:e},this.iframeOrigin)}render(){return g.googlePayEnabled?t(s,null,t(et,{isLoading:!this.isReadyToPay}),t("iframe",{ref:t=>this.iframeElement=t,src:`${this.iframeOrigin}/v2/googlePay`,style:{border:"none",width:"100%",height:"48px",display:this.isReadyToPay?"block":"none"}})):(console.warn("Google Pay is not enabled for this checkout"),null)}},nt=class{constructor(t){e(this,t),this.levels={h1:I,h2:R,h3:M},this.level="h1"}render(){return t(f,{key:"1fc31aaf9d222d4f53e4ca546fd323389f4154c3"},t(this.levels[this.level],{key:"6bc979a358b5a93159d378db2452b57133ed3aaa",text:this.text,class:this.class}))}},ot=class{constructor(t){e(this,t),this.errorEvent=i(this,"error-event",7),this.submitEvent=i(this,"submit-event",7),this.checkoutChangedEvent=i(this,"checkout-changed",7),this.plaidService=new q,this.handleGooglePayCompleted=t=>{const{success:e,paymentMethodId:i,error:s}=t.detail||{};e&&i?(g.paymentToken=i,g.selectedPaymentMethod={type:G.GOOGLE_PAY},this.submitCheckout()):this.errorEvent.emit({message:s&&s.message||"Google Pay payment failed",errorCode:D.TOKENIZE_ERROR,severity:z.ERROR})},this.handleGooglePayCancelled=()=>{g.paymentToken=void 0,g.selectedPaymentMethod=void 0},this.handleApplePayCompleted=t=>{const{success:e,token:i,paymentMethodId:s,error:n}=t.detail;e&&i?(g.paymentToken=s,g.selectedPaymentMethod={type:G.APPLE_PAY},this.submitCheckout()):(console.error("Apple Pay completed but failed:",n),this.errorEvent.emit({message:(null==n?void 0:n.message)||"Apple Pay payment failed",errorCode:D.TOKENIZE_ERROR,severity:z.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:z.ERROR})},this.handleApplePayCancelled=()=>{g.paymentToken=void 0,g.selectedPaymentMethod=void 0}}connectedCallback(){this.observer=new MutationObserver((()=>{this.queryFormRefs(),this.setupApplePayListeners(),this.setupGooglePayListeners()})),this.observer.observe(this.hostEl,{childList:!0,subtree:!0}),g.checkoutId=this.checkoutId;const t={authToken:this.authToken,checkoutId:this.checkoutId,service:new U};this.getCheckout=(({authToken:t,checkoutId:e,service:i})=>async({onSuccess:s,onError:n})=>{var o;try{const a=await i.fetchCheckout(t,e);if(a.error)return n({error:H(a.error),code:F(null===(o=a.error)||void 0===o?void 0:o.code),severity:z.ERROR});s({checkout:a.data})}catch(t){const e=F(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:z.ERROR})}})(t),this.completeCheckout=(({authToken:t,checkoutId:e,service:i})=>async({payment:s,onSuccess:n,onError:o})=>{var a;try{const r=await i.complete(t,e,s);if(r.error)return o({error:H(r.error),code:F(null===(a=r.error)||void 0===a?void 0:a.code),severity:z.ERROR});n({checkout:r.data})}catch(t){const e=F(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:z.ERROR})}})(t),k((()=>{this.emitCheckoutChanged()}))}componentWillLoad(){this.analytics=new O(this),x(),g.authToken=this.authToken,this.fetchCheckout(),T("set",(t=>{const e=N[t];void 0!==e&&L(t,e)&&this.fetchCheckout()}))}componentDidLoad(){this.queryFormRefs(),this.setupApplePayListeners(),this.setupGooglePayListeners()}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect(),this.removeApplePayListeners(),this.removeGooglePayListeners()}fetchCheckout(){this.authToken&&this.checkoutId?this.getCheckout&&this.getCheckout({onSuccess:({checkout:t})=>{this.updateStore(t),t.status!==u.completed?t.status!==u.expired||this.errorEvent.emit({message:B.CHECKOUT_EXPIRED,errorCode:D.CHECKOUT_EXPIRED,severity:z.ERROR}):this.errorEvent.emit({message:B.CHECKOUT_ALREADY_COMPLETED,errorCode:D.CHECKOUT_ALREADY_COMPLETED,severity:z.ERROR})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:t.code,severity:t.severity})}}):this.errorEvent.emit({message:B.NOT_AUTHENTICATED,errorCode:D.NOT_AUTHENTICATED,severity:z.ERROR})}updateStore(t){var e,i,s,n,o,a,r;g.accountId=t.account_id,g.checkoutLoaded=!0,g.paymentMethods=t.payment_methods.map((t=>new Y(t))),g.paymentMethodGroupId=t.payment_method_group_id,g.paymentDescription=t.payment_description,g.totalAmount=t.total_amount,g.paymentAmount=t.payment_amount,g.bnplEnabled=t.payment_settings.bnpl_payments,g.insuranceEnabled=t.payment_settings.insurance_payments,g.bankAccountVerification=null===(e=t.payment_settings)||void 0===e?void 0:e.bank_account_verification,g.applePayEnabled=null===(i=t.payment_settings)||void 0===i?void 0:i.apple_payments,g.googlePayEnabled=null===(s=t.payment_settings)||void 0===s?void 0:s.google_payments,g.bnplProviderClientId=null===(n=null==t?void 0:t.bnpl)||void 0===n?void 0:n.provider_client_id,g.bnplProviderMode=null===(o=null==t?void 0:t.bnpl)||void 0===o?void 0:o.provider_mode,g.bnplProviderApiVersion=null===(a=null==t?void 0:t.bnpl)||void 0===a?void 0:a.provider_api_version,g.bnplProviderCheckoutUrl=null===(r=null==t?void 0:t.bnpl)||void 0===r?void 0:r.provider_checkout_url}emitCheckoutChanged(){const t={availablePaymentMethodTypes:P(),selectedPaymentMethod:g.selectedPaymentMethod,savedPaymentMethods:g.paymentMethods};this.checkoutChangedEvent.emit(t)}queryFormRefs(){this.billingFormRef=this.hostEl.querySelector("justifi-billing-form, justifi-bank-account-billing-form-simple, justifi-card-billing-form-simple, justifi-billing-form-full"),this.applePayRef=this.hostEl.querySelector("justifi-apple-pay"),this.googlePayRef=this.hostEl.querySelector("justifi-google-pay"),this.paymentMethodFormRef=this.hostEl.querySelector("justifi-card-form, justifi-bank-account-form, justifi-tokenize-payment-method"),this.insuranceFormRef=this.hostEl.querySelector("justifi-season-interruption-insurance")}setupApplePayListeners(){this.applePayRef&&(this.applePayRef.addEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.addEventListener("applePayError",this.handleApplePayError),this.applePayRef.addEventListener("applePayCancelled",this.handleApplePayCancelled))}removeApplePayListeners(){this.applePayRef&&(this.applePayRef.removeEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.removeEventListener("applePayError",this.handleApplePayError),this.applePayRef.removeEventListener("applePayCancelled",this.handleApplePayCancelled))}setupGooglePayListeners(){this.googlePayRef&&(this.googlePayRef.addEventListener("googlePayCompleted",this.handleGooglePayCompleted),this.googlePayRef.addEventListener("googlePayCancelled",this.handleGooglePayCancelled))}removeGooglePayListeners(){this.googlePayRef&&(this.googlePayRef.removeEventListener("googlePayCompleted",this.handleGooglePayCompleted),this.googlePayRef.removeEventListener("googlePayCancelled",this.handleGooglePayCancelled))}async tokenizePaymentMethod(t){var e,i,s;const n=null!==(i=await(null===(e=this.billingFormRef)||void 0===e?void 0:e.getValues()))&&void 0!==i?i:{},o=Object.assign(Object.assign({},t),n),a=Object.assign({accountId:g.accountId,payment_method_group_id:void 0},o);g.savePaymentMethod&&(a.payment_method_group_id=g.paymentMethodGroupId);const r=await(null===(s=this.paymentMethodFormRef)||void 0===s?void 0:s.tokenize({clientId:this.authToken,paymentMethodMetadata:a,account:g.accountId}));return r.error?r:(g.paymentToken=r.id,r.id)}async setSelectedPaymentMethod(t){g.selectedPaymentMethod=t,g.paymentToken=t.id||void 0}async validate(){var t,e;const i=[];g.insuranceEnabled&&this.insuranceFormRef&&i.push(this.insuranceFormRef.validate());const s=(null===(t=g.selectedPaymentMethod)||void 0===t?void 0:t.type)===G.NEW_CARD,n=(null===(e=g.selectedPaymentMethod)||void 0===e?void 0:e.type)===G.NEW_BANK_ACCOUNT;if((s||n)&&(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:D.VALIDATION_ERROR,severity:z.ERROR}),!1)}catch(t){return!1}}async submitCheckout(t){var e,i,s,n,o;const a=await this.validate();if(!g.selectedPaymentMethod)return void this.errorEvent.emit({message:"No payment method selected.",errorCode:D.VALIDATION_ERROR,severity:z.ERROR});const r=(null===(e=g.selectedPaymentMethod)||void 0===e?void 0:e.type)===G.NEW_CARD,l=(null===(i=g.selectedPaymentMethod)||void 0===i?void 0:i.type)===G.NEW_BANK_ACCOUNT,h=(null===(s=g.selectedPaymentMethod)||void 0===s?void 0:s.type)===G.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:D.TOKENIZE_ERROR,severity:z.ERROR})}if(h&&!g.paymentToken){const t=g.plaidPublicToken,e=g.plaidLinkTokenId;if(!t)return void this.errorEvent.emit({message:"Missing Plaid public token. Please connect your bank.",errorCode:D.TOKENIZE_ERROR,severity:z.ERROR});try{const i=await this.plaidService.tokenizeBankAccount(g.authToken,g.accountId,t,e||void 0,g.savePaymentMethod?g.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:D.TOKENIZE_ERROR,severity:z.ERROR});const s=null==i?void 0:i.data,o=(null===(n=null==s?void 0:s.bank_account)||void 0===n?void 0:n.token)||(null==s?void 0:s.token)||(null==s?void 0:s.id);g.paymentToken=o}catch(t){return void this.errorEvent.emit({message:(null==t?void 0:t.message)||"Plaid exchange error",errorCode:D.TOKENIZE_ERROR,severity:z.ERROR})}}if(!a)return void this.errorEvent.emit({message:"Please fill in all required fields.",errorCode:D.VALIDATION_ERROR,severity:z.ERROR});if(!g.paymentToken)return void this.errorEvent.emit({message:"Payment token not found.",errorCode:D.TOKENIZE_ERROR,severity:z.ERROR});let c;if(c={payment_mode:(t=>{switch(t){case G.NEW_CARD:case G.SAVED_CARD:case G.NEW_BANK_ACCOUNT:case G.SAVED_BANK_ACCOUNT:case G.PLAID:return W.ECOM;case G.SEZZLE:return W.BNPL;case G.APPLE_PAY:return W.APPLE_PAY;case G.GOOGLE_PAY:return W.GOOGLE_PAY;default:return}})(null===(o=g.selectedPaymentMethod)||void 0===o?void 0:o.type),payment_token:g.paymentToken},this.preCompleteHook){const t=w();try{await new Promise(((e,i)=>{this.preCompleteHook(t,(()=>e()),(()=>i()))}))}catch(t){return void console.log("Checkout cancelled by preCompleteHook",t)}}this.completeCheckout({payment:c,onSuccess:({checkout:t})=>{this.submitEvent.emit({checkout:t,message:"Checkout completed successfully"})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:D.COMPLETE_CHECKOUT_ERROR,severity:z.ERROR})}})}render(){return t(s,{key:"ee341d8d78767a80e2627ea5244ba46ca63cd8df"})}get hostEl(){return n(this)}},at=class{constructor(t){e(this,t),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected",7),this.plaidError=i(this,"plaidError",7),this.plaidErrorRecovered=i(this,"plaidErrorRecovered",7),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 q,this.maxRetries=3,this.retryDelay=2e3,this.timeoutId=null,this.abortController=null,this.hasLoggedDisabledWarning=!1,this.waitForStoreAndInitialize=()=>{g.authToken&&g.accountId&&g.checkoutId?this.initializePlaidLink():setTimeout((()=>{this.waitForStoreAndInitialize()}),100)},this.initializePlaidLink=async()=>{try{if(void 0===window.Plaid)return void this.handleError({code:v.PLAID_SDK_LOAD_FAILED,message:m[v.PLAID_SDK_LOAD_FAILED],severity:y[v.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"});if(await this.getLinkToken(),!this.linkToken)return void this.handleError({code:v.PLAID_LINK_TOKEN_FAILED,message:m[v.PLAID_LINK_TOKEN_FAILED],severity:y[v.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:v.PLAID_LINK_INIT_FAILED,message:m[v.PLAID_LINK_INIT_FAILED],severity:y[v.PLAID_LINK_INIT_FAILED],originalError:t,retryable:!0,userAction:"Click to try again"})}},this.getLinkToken=async()=>{var t,e,i,s,n;try{if(!g.authToken||!g.accountId)return void this.handleError({code:v.PLAID_LINK_TOKEN_FAILED,message:"Missing authentication. Please refresh the page and try again.",severity:z.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(g.authToken,g.accountId,g.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&&(g.plaidLinkTokenId=this.linkTokenId)}catch(t){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null);let o=v.PLAID_LINK_TOKEN_FAILED,a=m[o],r=!0;"AbortError"===t.name?(o=v.PLAID_TIMEOUT,a=m[o],r=!0):(null===(e=t.message)||void 0===e?void 0:e.includes("network"))||(null===(i=t.message)||void 0===i?void 0:i.includes("fetch"))?(o=v.PLAID_NETWORK_ERROR,a=m[o],r=!0):((null===(s=t.message)||void 0===s?void 0:s.includes("401"))||(null===(n=t.message)||void 0===n?void 0:n.includes("unauthorized")))&&(o=v.PLAID_INVALID_CREDENTIALS,a="Authentication failed. Please refresh the page and try again.",r=!1),this.handleError({code:o,message:a,severity:y[o],originalError:t,retryable:r,userAction:r?"Click to try again":"Refresh the page"})}},this.mapApiErrorToPlaidError=t=>{if("string"==typeof t){if(t.includes("rate_limit"))return v.PLAID_RATE_LIMITED;if(t.includes("maintenance"))return v.PLAID_MAINTENANCE;if(t.includes("not_authenticated"))return v.PLAID_INVALID_CREDENTIALS}if(null==t?void 0:t.code)switch(t.code){case"rate_limited":return v.PLAID_RATE_LIMITED;case"maintenance":return v.PLAID_MAINTENANCE;case"not_authenticated":return v.PLAID_INVALID_CREDENTIALS;default:return v.PLAID_LINK_TOKEN_FAILED}return v.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,g.selectedPaymentMethod={type:G.PLAID}),this.plaidErrorRecovered.emit({code:"plaid-success",message:"Bank account connected successfully",severity:z.INFO}),g.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=v.PLAID_AUTHENTICATION_FAILED,i=m[e],s=!0,n="Click to try again";if(t.error_code)switch(t.error_code){case"INVALID_CREDENTIALS":e=v.PLAID_INVALID_CREDENTIALS,i=m[e],s=!0;break;case"ITEM_LOGIN_REQUIRED":e=v.PLAID_INVALID_CREDENTIALS,i="Your bank requires re-authentication. Please try again.",s=!0;break;case"ITEM_LOCKED":e=v.PLAID_ACCOUNT_LOCKED,i=m[e],s=!1,n="Contact your bank";break;case"INSTITUTION_NOT_RESPONDING":e=v.PLAID_MAINTENANCE,i=m[e],s=!0;break;case"RATE_LIMIT_EXCEEDED":e=v.PLAID_RATE_LIMITED,i=m[e],s=!0;break;case"INVALID_REQUEST":e=v.PLAID_AUTHENTICATION_FAILED,i="Invalid request. Please try again.",s=!0;break;case"PLAID_ERROR":e=v.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 o=t.error_message.toLowerCase();o.includes("not supported")||o.includes("unsupported")?(e=v.PLAID_BANK_NOT_SUPPORTED,i=m[e],s=!1,n="Try a different payment method"):(o.includes("expired")||o.includes("timeout"))&&(e=v.PLAID_TOKEN_EXPIRED,i=m[e],s=!0)}this.handleError({code:e,message:i,severity:y[e],originalError:t,retryable:s,userAction:n}),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=g.selectedPaymentMethod)||void 0===t?void 0:t.type)===G.PLAID;this.isSelected!==e&&(this.isSelected=e)}}onSelectionChange(t){var e;t&&(null===(e=g.selectedPaymentMethod)||void 0===e?void 0:e.type)!==G.PLAID&&(g.selectedPaymentMethod={type:G.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:v.PLAID_SDK_LOAD_FAILED,message:m[v.PLAID_SDK_LOAD_FAILED],severity:y[v.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"})})}componentWillLoad(){var t;this.isSelected=(null===(t=g.selectedPaymentMethod)||void 0===t?void 0:t.type)===G.PLAID}async resolvePaymentMethod(){return this.publicToken?{token:this.publicToken,data:{type:"bank_account",plaid_public_token:this.publicToken}}:{validationError:!0}}async getPaymentToken(){return g.paymentToken}async handleSelectionClick(){if(this.isSelected=!0,g.selectedPaymentMethod={type:G.PLAID},this.error)return this.clearError(),void this.waitForStoreAndInitialize();!this.plaidLink||this.publicToken||this.isAuthenticating||this.openPlaidLink()}async setSelected(t){this.isSelected=t,t&&(g.selectedPaymentMethod={type:G.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=C("selectedPaymentMethod",this.syncWithStore);this.unsubscribeFromStore=t}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),this.timeoutId&&clearTimeout(this.timeoutId),this.abortController&&this.abortController.abort()}render(){if(!0!==g.bankAccountVerification)return this.hasLoggedDisabledWarning||(console.warn("[PlaidPaymentMethod] bank_account_verification is disabled. Component will not render."),this.hasLoggedDisabledWarning=!0),null;const e=t("img",{class:"plaid-logo-img",src:V,alt:"Plaid",title:"Plaid",style:{display:"inline",width:"20px",height:"20px",marginLeft:"5px",marginTop:"-2px"}});return t(f,{class:"payment-method"},t("script",{src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",async:!0,ref:t=>this.scriptRef=t}),t("div",{title:"Pay with Plaid"},t("div",{onClick:t=>{t.preventDefault(),this.handleSelectionClick()}},"Pay with Bank Account ",e," "),(()=>this.error?t("div",{class:(this.error.severity===z.ERROR?"text-danger":this.error.severity===z.WARNING?"text-warning":"text-info")+" mt-2"},t("small",null,this.error.message),t("br",null),t("small",{class:"text-muted"},this.error.userAction,this.error.retryable&&this.retryCount<this.maxRetries&&t("span",null," • Auto-retry in progress..."))):null)(),(()=>this.error?null:this.isAuthenticating?t("div",{class:"text-info mt-2"},t("small",null,"Connecting to your bank...")):this.publicToken?t("div",{class:"text-success mt-2"},t("small",null,"✓ Bank account connected successfully")):!this.isSelected||this.publicToken||this.error||this.isAuthenticating?null:t("div",{class:"text-muted mt-2"},t("small",null,"Click to connect your bank account")))()))}static get watchers(){return{isSelected:["onSelectionChange"]}}},rt=class{constructor(t){e(this,t),this.onPaymentMethodOptionClick=t=>e=>{e.preventDefault(),g.selectedPaymentMethod={id:t.id,type:t.type},g.paymentToken=t.id},this.isAllowedPaymentMethod=t=>!(t===G.SAVED_CARD&&g.disableCreditCard||t===G.SAVED_BANK_ACCOUNT&&g.disableBankAccount)}componentWillLoad(){g.paymentMethods.length||console.warn("No saved payment methods available."),g.disablePaymentMethodGroup&&console.warn("Payment method group is disabled.")}render(){return g.disablePaymentMethodGroup?null:t(f,null,t("div",{class:"saved-payment-methods"},g.paymentMethods.length?g.paymentMethods.filter((t=>this.isAllowedPaymentMethod(t.type))).map((e=>t("div",{class:"radio-list-item p-3",part:E,onClick:this.onPaymentMethodOptionClick(e)},t("form-control-radio",{name:"paymentMethodType",value:null==e?void 0:e.id,checked:g.paymentToken===(null==e?void 0:e.id),label:`${J[null==e?void 0:e.brand]||""} *${null==e?void 0:e.acct_last_four}`})))):null))}},lt=t("img",{class:"sezzle-smart-button-logo-img",src:"https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg",alt:"Sezzle",style:{display:"inline",width:"80px",marginLeft:"5px",marginTop:"-5px"}}),ht=class{constructor(t){e(this,t),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected",7),this.paymentMethodOptionId=G.SEZZLE,this.initializeSezzleCheckout=()=>{let t;this.sezzlePromise=new Promise((e=>{t=e}));const e=Number(g.paymentAmount),i=new(0,window.Checkout)({mode:"popup",publicKey:g.bnplProviderClientId,apiMode:g.bnplProviderMode,apiVersion:g.bnplProviderApiVersion});i.sezzleButtonElement=this.sezzleButtonRef,i.init({onClick:function(t){t.preventDefault(),i.startCheckout({checkout_url:g.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(){g.selectedPaymentMethod={type:G.SEZZLE},this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId)}render(){var e,i;return g.bnplEnabled?t(f,{class:"payment-method"},t("script",{src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:t=>this.scriptRef=t}),t("div",null,t("div",null,"Buy now, pay later with ",lt),this.installmentPlan&&t("small",null,t("span",null,null===(e=this.installmentPlan)||void 0===e?void 0:e.installments.length)," ",t("span",null,this.installmentPlan.schedule," payments of")," ",t("span",{class:"fw-bold"},S(null===(i=this.installmentPlan)||void 0===i?void 0:i.installments[0].amountInCents))))):(console.warn("justifi-sezzle-payment-method: BNPL is not enabled for this account."),null)}};export{K as justifi_apple_pay,tt as justifi_checkout_summary,st as justifi_google_pay,nt as justifi_header,ot as justifi_modular_checkout,at as justifi_plaid_payment_method,rt as justifi_saved_payment_methods,ht as justifi_sezzle_payment_method}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,g as s,H as a}from"./p-CV0Pyo1O.js";import{S as r}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{c as n,J as o}from"./p-DX6fcx_0.js";import{w as d,c}from"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{a as h,C as l}from"./p-Cjcsf8ku.js";import"./p-BiNakvsa.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{c as f}from"./p-Daew0gTO.js";import{P as u}from"./p-DkoufM1t.js";import{S as b}from"./p-DqVU8ohH.js";import{b as m}from"./p-MeSAYDNh.js";import{B as p}from"./p-DFiTyYE9.js";import{u as y}from"./p-C4FLe2pT.js";import"./p-C2WozQkF.js";import"./p-55QcjheA.js";import"./p-D8GTwl9v.js";const v=class{constructor(i){t(this,i),this.radioClick=e(this,"radio-click",7),this.checked=!1,this.hidden=!1,this.handleClick=()=>{this.radioClick.emit(this.value)}}render(){return i(r,{key:"1ae40f787970160e38b72f917bda96f480d2a890"},i("div",{key:"2130596c8294cc38365e6126806735da0f93ef4a",class:`radio-list-item p-3 ${this.class||""}`,part:y,onClick:this.handleClick,hidden:this.hidden},i("form-control-radio",{key:"7d5524f518430f2bfd1c9863f354318929353cfb",name:this.name,value:this.value,checked:this.checked,label:this.label,inputHandler:()=>null})))}},k={[u.NEW_BANK_ACCOUNT]:"New bank account",[u.NEW_CARD]:"New credit or debit card"},g="Payment form not ready",w="Validation error",j=class{constructor(i){t(this,i),this.errorEvent=e(this,"error-event",7),this.submitEvent=e(this,"submit-event",7),this.computedHideSubmitButton=!1,this.isLoading=!1,this.submitButtonText="Submit"}paymentMethodsChanged(){this.setDefaultSelectedPaymentMethod()}connectedCallback(){this.setDefaultSelectedPaymentMethod(),this.setComputedHideSubmitButton()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup(),this.unsubscribeFromStore&&this.unsubscribeFromStore()}componentWillLoad(){n(),this.analytics=new o(this)}handleRadioClick(t){this.selectedPaymentMethod=t.detail,f.selectedPaymentMethod={type:t.detail}}async fillBillingForm(t){var e;null===(e=this.billingFormRef)||void 0===e||e.fill(t)}async tokenizePaymentMethod(t){null==t||t.preventDefault(),this.validateRequiredProps(),this.isLoading=!0;try{if(!(await this.validate()).isValid)return this.errorEvent.emit({errorCode:h.TOKENIZE_ERROR,message: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(h.TOKENIZE_ERROR,t.message);return this.emitError({errorCode:h.TOKENIZE_ERROR,message:t.message}),this.submitEvent.emit({response:e}),e}finally{this.isLoading=!1}}async validate(){if(!this.areFormsReady())return{isValid:!1,errors:{general:g}};const[t,e]=await Promise.all([this.billingFormRef.validate(),this.paymentMethodFormRef.validate()]);return{isValid:t.isValid&&e.isValid,errors:Object.assign(Object.assign({},t.errors),e.errors)}}async tokenize(){try{const t=await this.billingFormRef.getValues(),e={clientId:this.authToken||f.authToken,account:this.accountId||f.accountId,paymentMethodMetadata:this.buildPaymentMethodMetadata(t)};return await this.paymentMethodFormRef.tokenize(e)}catch(t){return t}}validateRequiredProps(){this.authToken||f.authToken||this.emitError({errorCode:h.TOKENIZE_ERROR,message:"Auth token is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"}),this.accountId||f.accountId||this.emitError({errorCode:h.TOKENIZE_ERROR,message:"Account ID is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"})}setDefaultSelectedPaymentMethod(){this.selectedPaymentMethod||(this.disableCreditCard?this.disableBankAccount||(this.selectedPaymentMethod=u.NEW_BANK_ACCOUNT,f.selectedPaymentMethod={type:u.NEW_BANK_ACCOUNT}):(this.selectedPaymentMethod=u.NEW_CARD,f.selectedPaymentMethod={type:u.NEW_CARD}))}setComputedHideSubmitButton(){if(void 0!==this.hideSubmitButton)return void(this.computedHideSubmitButton=this.hideSubmitButton);const t=this.isSlottedWithinModularCheckout();this.computedHideSubmitButton=t}isSlottedWithinModularCheckout(){var t;let e=null===(t=this.host)||void 0===t?void 0:t.parentElement;for(;e;){if("JUSTIFI-MODULAR-CHECKOUT"===e.tagName)return!0;e=e.parentElement}return!1}get availablePaymentMethods(){const t=[];return this.disableCreditCard||t.push(u.NEW_CARD),this.disableBankAccount||t.push(u.NEW_BANK_ACCOUNT),t}areFormsReady(){return!(!this.billingFormRef||!this.paymentMethodFormRef)}emitError(t){this.errorEvent.emit(Object.assign(Object.assign({},t),{severity:l.ERROR}))}createErrorResponse(t,e){return{error:{code:t,message:e,decline_code:void 0}}}async resolvePaymentMethod(t){if(!this.areFormsReady())return this.createErrorResponse("form_not_ready",g);try{const e=await this.validate();if(!e.isValid||!t.isValid){const t=Object.values(e.errors)[0]||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||f.paymentMethodGroupId}get shouldSavePaymentMethod(){return!(!this.paymentMethodGroupId&&!f.savePaymentMethod)}get shouldHideRadioInput(){return this.disableCreditCard||this.disableBankAccount}renderPaymentMethodOption(t){const e=this.selectedPaymentMethod===t&&void 0===f.selectedPaymentMethod.id;return i("div",{class:"payment-method"},i("justifi-radio-list-item",{name:"paymentMethodType",value:t,checked:e,label:k[t],hidden:this.shouldHideRadioInput}),e&&this.renderSelectedPaymentMethodForm(t))}renderSelectedPaymentMethodForm(t){return i("div",{class:"mt-4 pb-4"},this.renderPaymentMethodForm(t),i("div",{class:"mt-4"},i("justifi-billing-form",{ref:t=>this.billingFormRef=t,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,paymentMethodType:t})),i("div",{class:"mt-4"},i("justifi-save-new-payment-method",{hidden:!this.paymentMethodGroupID,label:this.savePaymentMethodLabel})))}renderPaymentMethodForm(t){return i(t===u.NEW_CARD?"justifi-card-form":"justifi-bank-account-form",{ref:t=>this.paymentMethodFormRef=t})}render(){return i(r,{key:"bb6a2e0eec485c96a756c504a278670804be0634"},i("form",{key:"f12f65c8fbe45e86418be9d3c2ff1107e292c86d"},i("fieldset",{key:"becda77faf80fd8b1e6d967cc4ead3d4adc3b6e8"},i("div",{key:"0419c1843747f59e68800ae3e2c78096b32605b0",class:"row gy-3"},i("div",{key:"8724f40a13bc62808f6e99cced2f8d7419b22d53",class:"col-12"},this.availablePaymentMethods.map((t=>this.renderPaymentMethodOption(t)))),i("div",{key:"ec9c0e2f6a85976d68e3dc939cd2826bfbd840d8",class:"col-12"},i("justifi-button",{key:"1c4b6a83c8357e15eaba071ea2fb8ba82b4c978c",text:this.submitButtonText,variant:"primary",type:"submit",clickHandler:t=>this.tokenizePaymentMethod(t),isLoading:this.isLoading,"data-testid":"submit-button",hidden:this.computedHideSubmitButton}))))))}get host(){return s(this)}static get watchers(){return{disableCreditCard:["paymentMethodsChanged"],disableBankAccount:["paymentMethodsChanged"]}}},C=t=>{const{isReady:e}=t;return e?null:i("div",{class:"container-fluid p-0"},i("div",{class:"row mb-3"},i("div",{class:"col-12 align-content-end"},i(b,{height:"18px",width:"120px"}),i(b,{height:"36px"}))),i("div",{class:"row"},i("div",{class:"col-12 align-content-end"},i(b,{height:"18px",width:"110px"}),i(b,{height:"36px"}))))},M=class{constructor(e){t(this,e),this.isReady=!1}async componentWillLoad(){await d(),this.iframeOrigin=c.iframeOrigin,this.tabId=m(),n(),this.analytics=new o(this)}componentDidRender(){Promise.all([this.accountNumberIframeElement,this.routingNumberIframeElement].map((t=>new Promise((e=>{t.addEventListener("iframeLoaded",(()=>{e()}))}))))).then((()=>{this.isReady=!0}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}async validate(){const t=await this.accountNumberIframeElement.validate(),e=await this.routingNumberIframeElement.validate();return t&&e}async tokenize({clientId:t,paymentMethodMetadata:e,account:i}){return this.accountNumberIframeElement.tokenize(t,e,i)}render(){return i(r,{key:"6c1e183b7ba2c70b41e22386d74a9cf7430aa8d5"},i(C,{key:"2755f4d21f8d62919ef56909f2dc6b9211bf550d",isReady:this.isReady}),i("hidden-input",{key:"c35448285cd2b53973caa4a56c28a135e1ed7d74"}),i("div",{key:"9fae602596267bafc39b9e3e9946a289b38393b6",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"bfaee6ed0eaa2a68175f18146d56195cc1a23e91",class:"row mb-3"},i("iframe-input",{key:"7385c2582ad5b397eb2afcb9c87b789d4918542c",inputId:"accountNumber",ref:t=>this.accountNumberIframeElement=t,label:"Account Number",iframeOrigin:`${this.iframeOrigin}/v2/accountNumber?tabId=${this.tabId}`})),i("div",{key:"effe6b1f18d5fa531f4537accfe8279b81bc7b49",class:"row"},i("iframe-input",{key:"19cc7e46d8f7cb79c70ba21f2e9c15c7665eca47",inputId:"routingNumber",ref:t=>this.routingNumberIframeElement=t,label:"Routing Number",iframeOrigin:`${this.iframeOrigin}/v2/routingNumber?tabId=${this.tabId}`}))))}},_=class{constructor(e){t(this,e)}get showSimpleCardBillingForm(){return this.paymentMethodType===u.NEW_CARD&&this.hideCardBillingForm}get showSimpleBankAccountBillingForm(){return this.paymentMethodType===u.NEW_BANK_ACCOUNT&&this.hideBankAccountBillingForm}async getValues(){var t;return null===(t=this.selectedFormRef)||void 0===t?void 0:t.getValues()}async fill(t){var e;null===(e=this.selectedFormRef)||void 0===e||e.fill(t)}async validate(){var t;return null===(t=this.selectedFormRef)||void 0===t?void 0:t.validate()}render(){return i(a,null,i(this.showSimpleBankAccountBillingForm?"justifi-bank-account-billing-form-simple":this.showSimpleCardBillingForm?"justifi-card-billing-form-simple":"justifi-billing-form-full",{legend:this.legend,ref:t=>this.selectedFormRef=t}))}},x=class{constructor(e){t(this,e),this.variant="primary",this.type="button"}render(){return i(r,{key:"5f92a2a58c0828c78818f0055dc2692857730788"},i(p,{key:"541fe7cc24e137cf55fc470b16f3aa8c47eee0d3",variant:this.variant,isLoading:this.isLoading,clickHandler:this.clickHandler,class:this.class,type:this.type,disabled:this.disabled,style:this.customStyle},this.text))}},I=t=>{const{isReady:e}=t;return e?null:i("div",{class:"container-fluid p-0"},i("div",{class:"mb-3"},i(b,{height:"18px",width:"100px"}),i(b,{height:"36px"})),i("div",{class:"row"},i("div",{class:"col-4 align-content-end"},i(b,{height:"18px",width:"80px"}),i(b,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(b,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(b,{height:"18px",width:"30px"}),i(b,{height:"36px"}))))},P=class{constructor(e){t(this,e),this.isReady=!1}async componentWillLoad(){await d(),this.iframeOrigin=c.iframeOrigin,this.tabId=m(),n(),this.analytics=new o(this)}componentDidRender(){Promise.all([this.cardNumberIframeElement,this.expirationMonthIframeElement,this.expirationYearIframeElement,this.cvvIframeElement].map((t=>new Promise((e=>{t.addEventListener("iframeLoaded",(()=>{e()}))}))))).then((()=>{this.isReady=!0}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}async validate(){const t=await this.cardNumberIframeElement.validate(),e=await this.expirationMonthIframeElement.validate(),i=await this.expirationYearIframeElement.validate(),s=await this.cvvIframeElement.validate();return t&&e&&i&&s}async tokenize({clientId:t,paymentMethodMetadata:e,account:i}){return this.cardNumberIframeElement.tokenize(t,e,i)}render(){return i(r,{key:"e204cee1fc875392b8056baf58b7234a739fffce"},i(I,{key:"3accfb88d66661ceaef39f765bb3fddfd0f98393",isReady:this.isReady}),i("hidden-input",{key:"0416ddca8b444cf8702f3fff52065bf647bd4b61"}),i("div",{key:"37c1d5014e5a6658bfd28e08e361ffaa6488f6d7",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"e2956855dfbcab38a782c22e93bd49252196baa8",class:"mb-3"},i("iframe-input",{key:"55105f1eebab4b846e1b5c55448259368a412349",inputId:"cardNumber",ref:t=>this.cardNumberIframeElement=t,label:"Card Number",iframeOrigin:`${this.iframeOrigin}/v2/cardNumber?tabId=${this.tabId}`})),i("div",{key:"9464b1a500a84dcaa438a9ebdad756637d14cb24",class:"row"},i("div",{key:"adc51687629fb00d26c6627e95c0228f5a4dfd11",class:"col-4 align-content-end"},i("iframe-input",{key:"52a0e5e198b6bfac00515ec220370e289674b613",inputId:"expirationMonth",ref:t=>this.expirationMonthIframeElement=t,label:"Expiration",iframeOrigin:`${this.iframeOrigin}/v2/expirationMonth?tabId=${this.tabId}`})),i("div",{key:"1b09582711d838643db265b003ed18b18042713e",class:"col-4 align-content-end"},i("iframe-input",{key:"a1731a8dc02723398e1aae58b3812fccf62e6157",inputId:"expirationYear",ref:t=>this.expirationYearIframeElement=t,label:"",iframeOrigin:`${this.iframeOrigin}/v2/expirationYear?tabId=${this.tabId}`})),i("div",{key:"1e2c3205f2e0b28d036480d2c61934da5e7da620",class:"col-4 align-content-end"},i("iframe-input",{key:"b7b87360068434122f9b5a8935468240684b7a1d",inputId:"CVV",ref:t=>this.cvvIframeElement=t,label:"CVV",iframeOrigin:`${this.iframeOrigin}/v2/CVV?tabId=${this.tabId}`})))))}},O=class{constructor(i){t(this,i),this.checkboxChanged=e(this,"checkboxChanged",7),this.label="Save New Payment Method",this.isChecked=!1,this.handleCheckboxChange=(t,e)=>{this.isChecked=e,f.savePaymentMethod=e,this.checkboxChanged.emit(this.isChecked)}}render(){return i(r,{key:"981f6a84fc14a7b687e1b6567b30fb9f861b0aa2"},i("form-control-checkbox",{key:"566f6261d19f96b87b9382b26a86b71461a29d08",label:this.label||"Save New Payment Method",name:"saveNewPaymentMethod",checked:this.isChecked,inputHandler:this.handleCheckboxChange}))}};export{j as internal_tokenize_payment_method,M as justifi_bank_account_form,_ as justifi_billing_form,x as justifi_button,P as justifi_card_form,v as justifi_radio_list_item,O as justifi_save_new_payment_method}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as i,r as s,c as t}from"./p-CV0Pyo1O.js";import{au as e,as as r,an as o,H as l}from"./p-C4FLe2pT.js";import{S as d}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{c as a,J as n}from"./p-DX6fcx_0.js";import{C as h,a as c}from"./p-Cjcsf8ku.js";import{B as u}from"./p-DqtDbB8E.js";import{B as v}from"./p-BcNb9bVO.js";import{m as p}from"./p-CMqX6btO.js";import{S as m}from"./p-DqVU8ohH.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{k as f,j as b,c as w}from"./p-BiNakvsa.js";import"./p-CLHwhyvu.js";import"./p-BH0Xfn-F.js";import{g as x,a as j}from"./p-D2muobcE.js";import{T as y}from"./p-6V4e6Fb_.js";import{l as g}from"./p-MeSAYDNh.js";import"./p-C2WozQkF.js";import"./p-55QcjheA.js";import"./p-D8GTwl9v.js";const k=()=>i("div",{class:"row gap-3"},i("div",{class:"col-12"},i(m,{width:"25%"})),i("div",{class:"col-12"},i(m,{width:"100%"})),i("div",{class:"col-12 d-flex gap-3"},i(m,{width:"50%"}),i(m,{width:"50%"})),i("div",{class:"col-12 d-flex gap-3"},i(m,{width:"65%"}),i(m,{width:"35%"}))),C=()=>i("div",{class:"row gap-5"},i("div",{class:"col-12"},i(m,{width:"40%",height:"40px"})),i(k,null)),S=()=>i("div",{class:"terminal-selector-skeleton mt-4 rounded shadow-sm"},i("div",{class:"d-flex align-items-center gap-3"},i(m,{width:"125px",height:"125px",styles:{borderRadius:"8px"}}),i("div",{class:"flex-grow-1"},i("div",{class:"d-flex row flex-row"},i("div",{class:"col-6 flex-column"},i(m,null),i(m,{width:"60%"})),i("div",{class:"d-flex justify-content-end align-items-center gap-2 col-6"},i(m,{width:"32px",height:"32px",styles:{borderRadius:"50%"}}),i(m,{width:"80px",height:"32px"}),i(m,{width:"32px",height:"32px",styles:{borderRadius:"50%"}}))),i("div",{class:"mt-4"},i("div",{class:"d-flex flex-column gap-2"},i(m,null),i(m,null)))))),B=class{constructor(i){s(this,i),this.errorEvent=t(this,"error-event",7),this.submitted=t(this,"submit-event",7),this.shipping=!1,this.submitButtonText="Submit Order",this.loading={business:!0,terminals:!0},this.submitting=!1,this.error=null,this.totalQuantity=0}componentWillLoad(){this.order=new b({business_id:this.businessId,sub_account_id:this.accountId,order_type:this.shipping?w.boardingShipping:w.boardingOnly}),a(),this.analytics=new n(this),this.loadData()}disconnectedCallback(){var i;null===(i=this.analytics)||void 0===i||i.cleanup()}handleError(i,s,t){this.error={message:i,code:s,severity:t},this.errorEvent.emit({errorCode:s,message:i,severity:t})}loadData(){this.businessId&&this.authToken?(this.initializeGetBusiness(),this.initializeGetTerminalModels()):this.handleError("Invalid business id or auth token",c.MISSING_PROPS,h.ERROR)}initializeGetBusiness(){p({id:this.businessId,authToken:this.authToken,service:new u})({onSuccess:({business:i})=>{this.business=new v(i),this.loading.business=!1},onError:({error:i,code:s,severity:t})=>{this.handleError(i,s,t),this.loading.business=!1}})}initializeGetTerminalModels(){(({id:i,authToken:s,service:t})=>async({onSuccess:e,onError:r})=>{var o,l,d,a;try{const n=await t.fetchTerminalModels(i,s);if(n.error)return r({error:j(n.error),code:x(null===(a=n.error)||void 0===a?void 0:a.code),severity:h.ERROR});e({terminals:(null===(l=null===(o=n.data)||void 0===o?void 0:o.terminal_order_models)||void 0===l?void 0:l.map((i=>new f(i))))||[],orderLimit:null===(d=n.data)||void 0===d?void 0:d.order_limit})}catch(i){const s=x(null==i?void 0:i.code);return r({error:i.message||i,code:s,severity:h.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new y})({onSuccess:({terminals:i,orderLimit:s})=>{this.terminalModels=i,this.orderLimit=s,this.loading.terminals=!1},onError:({error:i,code:s,severity:t})=>{this.handleError(i,s,t),this.loading.terminals=!1}})}submitOrder(){const i=(({authToken:i,service:s,apiOrigin:t="https://wc-proxy.justifi.ai"})=>async({terminalOrder:e,onSuccess:r,onError:o})=>{var l;try{const d=await s.orderTerminals(i,e,t);if(d.error)return o({error:j(d.error),code:x(null===(l=d.error)||void 0===l?void 0:l.code),severity:h.ERROR});{const{data:i}=d;r({data:i})}}catch(i){const s=x(null==i?void 0:i.code);return o({error:i.message||i,code:s,severity:h.ERROR})}})({authToken:this.authToken,service:new y});this.submitting=!0,i({terminalOrder:this.order.payload,onSuccess:({data:i})=>{this.submitted.emit(i),this.submitting=!1},onError:({error:i,code:s,severity:t})=>{this.handleError(i,s,t),this.submitting=!1}})}onSelectedQuantityChange(i){this.order.updateTerminal(i.detail.modelName,i.detail.quantity),this.totalQuantity=this.order.totalQuantity}renderLoading(){return i("div",null,this.loading.business&&i(C,null),this.loading.terminals&&i("div",{class:"mt-5"},i(S,null),i(S,null),i(S,null)))}renderBusinessDetails(){var s,t,o,l,d,a,n,h;if(!this.loading.business&&this.business)return i("div",{class:"d-flex flex-column gap-4 mb-5 pt-5"},i("div",{class:"row"},i("div",{class:"col-12"},i("h2",{part:r},this.business.legal_name))),i("div",{class:"row"},i("div",{class:"col-6"},i("h5",{part:e},"Representative:"),i("div",null,i("div",null,null===(t=null===(s=this.business)||void 0===s?void 0:s.representative)||void 0===t?void 0:t.name),i("div",null,null===(l=null===(o=this.business)||void 0===o?void 0:o.representative)||void 0===l?void 0:l.title),i("div",null,null===(a=null===(d=this.business)||void 0===d?void 0:d.representative)||void 0===a?void 0:a.email),i("div",null,g(null===(h=null===(n=this.business)||void 0===n?void 0:n.representative)||void 0===h?void 0:h.phone)))),i("div",{class:"col-6"},i("h5",{part:e},this.shipping?"Shipping Address:":"Business Address:"),i("div",null,this.business.legal_address.line1,this.business.legal_address.line2?`, ${this.business.legal_address.line2}`:"",i("br",null),this.business.legal_address.city,", ",this.business.legal_address.state," ",this.business.legal_address.postal_code))))}renderTerminals(){if(!this.loading.terminals&&this.terminalModels)return i("div",{class:"d-flex flex-column gap-2 mt-5"},this.terminalModels.map((s=>i("terminal-quantity-selector",{modelName:s.model_name,description:s.description,imageUrl:s.image_url,helpUrl:s.help_url,limit:this.orderLimit-this.order.totalQuantity,onSelectedQuantityChange:this.onSelectedQuantityChange.bind(this)}))))}renderOrderSection(){return i("div",{class:"mt-3"},i("div",{class:"text-end"},"Order limit: ",this.orderLimit),i("div",{class:"d-flex justify-content-end mt-3"},i("button",{class:"btn btn-primary submit-btn",onClick:this.submitOrder.bind(this),disabled:0===this.order.totalQuantity||this.submitting,part:o},this.submitting?"Submitting...":this.submitButtonText)))}render(){return i(d,{key:"bb4aaf359b1511f493e10aeb574dfb33a5ca2834"},i("div",{key:"d09aef6864ba87fca3556f2e873dcf9ed2f988d4",part:l},this.renderLoading(),this.renderBusinessDetails(),this.renderTerminals(),this.renderOrderSection()))}};export{B as justifi_order_terminals}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e,r as t,c as a}from"./p-CV0Pyo1O.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{C as s,a as i}from"./p-Cjcsf8ku.js";import{h as r}from"./p-BiNakvsa.js";import{p as n}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{c as o,J as c}from"./p-DX6fcx_0.js";import{g as p,a as h}from"./p-D2muobcE.js";import{P as d}from"./p-B_KHnbK8.js";import{T as f,l,a as u,b as m,c as y,d as b,e as _,f as g,g as j,h as k,i as T,j as w,k as v}from"./p-5mt2ek0H.js";import{S as C}from"./p-BqNNwq6C.js";import{T as D}from"./p-CZfYo5-1.js";import{a as F}from"./p-MeSAYDNh.js";import{V as S,W as P}from"./p-C4FLe2pT.js";import"./p-D8GTwl9v.js";import"./p-C2WozQkF.js";import"./p-55QcjheA.js";import"./p-DyETkJs3.js";const R={created_at:()=>e("th",{part:S,scope:"col",title:"The date and time each transaction was made"},"Processed On"),type:()=>e("th",{part:S,scope:"col",title:"The type of each transaction"},"Type"),id:()=>e("th",{part:S,scope:"col",title:"The unique identifier of each transaction"},"ID"),amount:()=>e("th",{part:S,scope:"col",title:"The dollar amount of each transaction",class:"text-end"},"Amount"),balance:()=>e("th",{part:S,scope:"col",title:"The running total amount of this payment that belongs to you",class:"text-end"},"Balance"),currency:()=>e("th",{part:S,scope:"col",title:"The currency of each transaction"},"Currency"),financial_transaction_id:()=>e("th",{part:S,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),payment_id:()=>e("th",{part:S,scope:"col",title:"The unique identifier of the payment associated with the payment balance transaction"},"Payment ID"),payment_balance_txn_type:()=>e("th",{part:S,scope:"col",title:"The type of the payment balance transaction"},"Transaction Type"),source_id:()=>e("th",{part:S,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),source_type:()=>e("th",{part:S,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",platform_fee:"Platform Fee",platform_fee_return:"Platform Fee Return",processing_fee:"Processing Fee",processing_fee_return:"Processing Fee Return",refund:"Refund",fee_refund:"Fee Refund",application_fee_returned:"Application Fee Returned",refund_failure:"Refund Failure",void:"Void"},I={created_at:(t,a)=>e("td",{part:P(a)},e("div",{class:"fw-bold"},F(t.created_at,{showDisplayDate:!0})),e("div",{class:"fw-bold"},F(t.created_at,{showTime:!0}))),type:(t,a)=>e("td",{part:P(a)},x[t.payment_balance_txn_type]),id:(t,a)=>e("td",{part:P(a)},t.id),amount:(t,a)=>e("td",{part:P(a),class:"text-end"},t.formattedPaymentAmount(t.amount)),balance:(t,a)=>e("td",{part:P(a),class:"text-end"},t.formattedPaymentAmount(t.balance)),currency:(t,a)=>e("td",{part:P(a)},t.currency),financial_transaction_id:(t,a)=>e("td",{part:P(a)},t.financial_transaction_id),payment_id:(t,a)=>e("td",{part:P(a)},t.payment_id),payment_balance_txn_type:(t,a)=>e("td",{part:P(a)},t.payment_balance_txn_type),source_id:(t,a)=>e("td",{part:P(a)},t.source_id),source_type:(t,a)=>e("td",{part:P(a)},t.source_type)},E=class{constructor(e){t(this,e),this.clickEvent=a(this,"click-event",7),this.errorEvent=a(this,"error-event",7),this.balanceTransactions=[],this.isLoading=!0,this.errorMessage=null,this.paging=n,this.pagingParams={},this.columns="created_at,type,id,amount,balance",this.handleClickPrevious=e=>{this.pagingParams={before_cursor:e},this.clickEvent.emit({name:D.previous})},this.handleClickNext=e=>{this.pagingParams={after_cursor:e},this.clickEvent.emit({name:D.next})},this.rowClickHandler=e=>{const t=e.target.closest("tr").dataset.rowEntityId;if(!t)return;const a=this.balanceTransactions.find((e=>e.id===t));this.clickEvent.emit({name:D.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,R,I),o(),this.analytics=new c(this),this.initializeApi()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeApi()}handleError(e,t,a){this.isLoading=!1,this.errorEvent.emit({errorCode:e,message:t,severity:a})}initializeApi(){this.paymentId&&this.authToken?(({id:e,authToken:t,service:a})=>async({params:i,onSuccess:n,onError:o,final:c})=>{var d;try{const c=await a.fetchPaymentTransactions(e,t,i);c.error?o({error:h(c.error),code:p(null===(d=c.error)||void 0===d?void 0:d.code),severity:s.ERROR}):n({balanceTransactions:c.data.map((e=>new r(e))),pagingInfo:Object.assign({},c.page_info)})}catch(e){const t=p(null==e?void 0:e.code);o({error:h(e),code:t,severity:s.ERROR})}finally{c()}})({id:this.paymentId,authToken:this.authToken,service:new d})({params:this.pagingParams,onSuccess:({balanceTransactions:e,pagingInfo:t})=>{this.balanceTransactions=e,this.paging=t,this.transactionsTable.collectionData=this.balanceTransactions},onError:({error:e,code:t,severity:a})=>{this.errorMessage=e.message,this.handleError(e,t,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((e=>e.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 e(C,{key:"7aaa611cf9d23ff9244d8df54e57daa3ec08a635"},e(l,{key:"d3f5244cfe909030c6072c7fdc4a5740029a4c17"},e(u,{key:"b0dc2044e5ee11b5d6a8298ed219c33f2bc42a35"},e(m,{key:"6a91d2b6968a6e969be3861c85b829c1ca5f899e"},e(y,{key:"ae84fd9d80b84054bfa1012137affa5c83b2be39"},this.transactionsTable.columnData.map((e=>e)))),e(b,{key:"6a5cdec3190bb80ed3f78f295d07271838260fce"},e(_,{key:"9fef843fa67a8049d77432d75f89446a2abe5ccc",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),e(g,{key:"3be23e217a98d0b2727dabc783134996ef0f9084",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),e(j,{key:"791ff61e65fb2f4e6a83f7d5142565b4a89106b5",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((t,a)=>e(k,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},t)))),this.paging&&e(T,{key:"898e2236fbed139f8196452463e3f248c01608d4"},e(w,{key:"9b416e1f6122d095b7516816ed686fe116479512"},e(v,{key:"6a12ce5ee3c5f28058ee5796cb174ef9fa4505b5",colSpan:this.transactionsTable.columnData.length},e("pagination-menu",{key:"06984f04a928213ecbb6b3bf5acd3cb3a48e901f",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],paymentId:["propChanged"],authToken:["propChanged"]}}};export{E as justifi_payment_transactions_list}
|