@justifi/webcomponents 6.12.5 → 6.12.6-rc.1
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/{Analytics-CITnMj7H.js → Analytics-CexlbLRl.js} +2 -2
- package/dist/cjs/{Plaid-BRSyOOuw.js → Plaid-KasiL5mp.js} +14 -19
- package/dist/cjs/{additional-questions-form-step_14.cjs.entry.js → additional-questions-form-step_15.cjs.entry.js} +378 -169
- package/dist/cjs/additional-questions_5.cjs.entry.js +7 -7
- package/dist/cjs/additional-statement_8.cjs.entry.js +1 -1
- package/dist/cjs/bank-account-billing-form-simple_4.cjs.entry.js +4 -4
- package/dist/cjs/bank-account-document-form-inputs.cjs.entry.js +21 -0
- package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
- package/dist/cjs/{business-form-options-D_nM7NDk.js → business-form-options-CnlrfbQ6.js} +51 -0
- package/dist/cjs/{business-identity-schema-DuFGX6_i.js → business-identity-schema-CC1wOwXd.js} +11 -7
- package/dist/cjs/{business.service-Z9OACEQL.js → business.service-BBovho58.js} +1 -1
- package/dist/cjs/card-form.cjs.entry.js +2 -2
- package/dist/cjs/{check-pkg-version-CZMgXZID.js → check-pkg-version-jeIQGJ8A.js} +1 -1
- package/dist/cjs/{checkout.service-BZOyqXgW.js → checkout.service-C0M9hmsL.js} +1 -1
- package/dist/cjs/{country-config-aJp8ScEs.js → country-config-Ck-eEeZZ.js} +2 -0
- package/dist/cjs/dispute-notification_2.cjs.entry.js +6 -6
- package/dist/cjs/{event-types-AU1B76Vm.js → event-types-DDNVjmfR.js} +1 -1
- package/dist/cjs/form-address-fields_3.cjs.entry.js +1 -1
- package/dist/cjs/form-control-number_2.cjs.entry.js +5 -4
- package/dist/cjs/{get-business-aR-C83KX.js → get-business-Ggw-UjXj.js} +2 -2
- package/dist/cjs/{get-payment-details-dwhA02Zl.js → get-payment-details-BVKRwME1.js} +2 -2
- package/dist/cjs/{get-subaccounts-B1jmSa2d.js → get-subaccounts-RRmcS9xU.js} +2 -2
- package/dist/cjs/hidden-input_2.cjs.entry.js +1 -1
- package/dist/cjs/{index.esm-C1ZPG85l.js → index.esm-BNETBIV_.js} +0 -18
- package/dist/cjs/justifi-apple-pay_11.cjs.entry.js +8 -8
- package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +5 -5
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +5 -5
- package/dist/cjs/justifi-billing-form-full.cjs.entry.js +1 -1
- package/dist/cjs/justifi-billing-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-business-details.cjs.entry.js +8 -8
- package/dist/cjs/justifi-business-form.cjs.entry.js +13 -13
- package/dist/cjs/justifi-card-billing-form-simple.cjs.entry.js +1 -1
- package/dist/cjs/justifi-card-form.cjs.entry.js +5 -5
- package/dist/cjs/justifi-checkout.cjs.entry.js +5 -5
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +8 -8
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +7 -7
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +6 -6
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +9 -9
- package/dist/cjs/justifi-payment-details.cjs.entry.js +8 -8
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +9 -9
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +1 -1
- package/dist/cjs/justifi-payments-list.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payout-details.cjs.entry.js +8 -8
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +9 -9
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +9 -9
- package/dist/cjs/justifi-save-new-payment-method.cjs.entry.js +1 -1
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +6 -6
- package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +6 -6
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +8 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-DOiqjXmm.js → package-CDegPd7E.js} +1 -1
- package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
- package/dist/cjs/{payment-provisioning-actions-BiSpysjW.js → payment-provisioning-actions-Cn8bgHKu.js} +2 -2
- package/dist/cjs/payment-provisioning-form-buttons_2.cjs.entry.js +3 -2
- package/dist/cjs/{payment.service-ByrgA_QZ.js → payment.service-CbIxt30x.js} +1 -1
- package/dist/cjs/{payout.service-CnQm_BpU.js → payout.service-DVMvsdAf.js} +1 -1
- package/dist/cjs/{payouts-status-AuS3Mp0V.js → payouts-status-CzS2CLGW.js} +2 -2
- package/dist/cjs/{plaid.service-Dlb8EUR8.js → plaid.service-DNT_DX6z.js} +1 -1
- package/dist/cjs/{schema-validations-DNPcvDh5.js → schema-validations-DackMxv7.js} +11 -8
- package/dist/cjs/styled-host-Ch0-dxF-.js +11 -0
- package/dist/cjs/{terminal.service-BdwHQ3Vv.js → terminal.service-BBHixg-d.js} +1 -1
- package/dist/cjs/{utils-FVGp6se3.js → utils-kDsk4nqH.js} +1 -1
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/api/Document.js +14 -7
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +2 -2
- package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +5 -3
- package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +4 -2
- package/dist/collection/components/business-forms/owner-form/owner-form.js +46 -1
- package/dist/collection/components/business-forms/payment-provisioning/additional-questions/additional-questions-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +6 -114
- package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.js +8 -0
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.js +4 -2
- package/dist/collection/components/business-forms/payment-provisioning/document-upload/document-upload-form-step.js +435 -0
- package/dist/collection/components/business-forms/payment-provisioning/document-upload/document-upload-list.js +52 -0
- package/dist/collection/components/business-forms/payment-provisioning/document-upload/document-upload-options.js +72 -0
- package/dist/collection/components/business-forms/payment-provisioning/justifi-payment-provisioning.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-steps.js +3 -2
- package/dist/collection/components/business-forms/schemas/business-bank-account-schema.js +10 -38
- package/dist/collection/components/business-forms/schemas/business-core-info-schema.js +1 -1
- package/dist/collection/components/business-forms/schemas/business-identity-schema.js +7 -3
- package/dist/collection/components/business-forms/schemas/schema-validations.js +8 -5
- package/dist/collection/components/business-forms/utils/business-form-options.js +50 -0
- package/dist/collection/components/business-forms/utils/country-config.js +2 -0
- package/dist/collection/ui-components/form/form-control-file.js +1 -1
- package/dist/docs.json +496 -64
- package/dist/esm/{Analytics-Cg17Xhj_.js → Analytics-5J6H0ALl.js} +2 -2
- package/dist/esm/{Plaid-l6nNIjab.js → Plaid-BM3JUIG5.js} +15 -19
- package/dist/esm/{additional-questions-form-step_14.entry.js → additional-questions-form-step_15.entry.js} +377 -169
- package/dist/esm/additional-questions_5.entry.js +8 -8
- package/dist/esm/additional-statement_8.entry.js +1 -1
- package/dist/esm/bank-account-billing-form-simple_4.entry.js +4 -4
- package/dist/esm/bank-account-document-form-inputs.entry.js +19 -0
- package/dist/esm/bank-account-form.entry.js +2 -2
- package/dist/esm/{business-form-options-DRalxlqN.js → business-form-options-DXjZp4Rl.js} +51 -1
- package/dist/esm/{business-identity-schema-0Q3kck3C.js → business-identity-schema-D8L_UfWl.js} +11 -7
- package/dist/esm/{business.service-C31wbMVs.js → business.service-C4BD3pf7.js} +1 -1
- package/dist/esm/card-form.entry.js +2 -2
- package/dist/esm/{check-pkg-version-D-rHqtUI.js → check-pkg-version-C7cHTIM0.js} +1 -1
- package/dist/esm/{checkout.service-cVdOGDuI.js → checkout.service-DmWeKNQs.js} +1 -1
- package/dist/esm/{country-config-CdvhLcnT.js → country-config-BW2dUoTJ.js} +2 -0
- package/dist/esm/dispute-notification_2.entry.js +6 -6
- package/dist/esm/{event-types-DalU_6SB.js → event-types-eIqsrwmW.js} +1 -1
- package/dist/esm/form-address-fields_3.entry.js +1 -1
- package/dist/esm/form-control-number_2.entry.js +5 -4
- package/dist/esm/{get-business-Gg6qn5on.js → get-business-DtFHdc37.js} +2 -2
- package/dist/esm/{get-payment-details-BiWgSJau.js → get-payment-details-26GxiYgv.js} +2 -2
- package/dist/esm/{get-subaccounts-CkjZeR9U.js → get-subaccounts-xkGMPstt.js} +2 -2
- package/dist/esm/hidden-input_2.entry.js +1 -1
- package/dist/esm/{index.esm-BHdVU4hV.js → index.esm-KCSohgHx.js} +1 -18
- package/dist/esm/justifi-apple-pay_11.entry.js +8 -8
- package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +5 -5
- package/dist/esm/justifi-bank-account-form.entry.js +5 -5
- package/dist/esm/justifi-billing-form-full.entry.js +1 -1
- package/dist/esm/justifi-billing-form.entry.js +1 -1
- package/dist/esm/justifi-business-details.entry.js +8 -8
- package/dist/esm/justifi-business-form.entry.js +13 -13
- package/dist/esm/justifi-card-billing-form-simple.entry.js +1 -1
- package/dist/esm/justifi-card-form.entry.js +5 -5
- package/dist/esm/justifi-checkout.entry.js +5 -5
- package/dist/esm/justifi-checkouts-list-filters.entry.js +2 -2
- package/dist/esm/justifi-checkouts-list.entry.js +8 -8
- package/dist/esm/justifi-dispute-management.entry.js +7 -7
- package/dist/esm/justifi-gross-payment-chart.entry.js +6 -6
- package/dist/esm/justifi-order-terminals.entry.js +9 -9
- package/dist/esm/justifi-payment-details.entry.js +8 -8
- package/dist/esm/justifi-payment-provisioning.entry.js +9 -9
- package/dist/esm/justifi-payment-transactions-list.entry.js +7 -7
- package/dist/esm/justifi-payments-list-filters.entry.js +1 -1
- package/dist/esm/justifi-payments-list.entry.js +7 -7
- package/dist/esm/justifi-payout-details.entry.js +8 -8
- package/dist/esm/justifi-payout-transactions-list.entry.js +7 -7
- package/dist/esm/justifi-payouts-list-filters.entry.js +2 -2
- package/dist/esm/justifi-payouts-list.entry.js +9 -9
- package/dist/esm/justifi-refund-payment.entry.js +9 -9
- package/dist/esm/justifi-save-new-payment-method.entry.js +1 -1
- package/dist/esm/justifi-season-interruption-insurance.entry.js +6 -6
- package/dist/esm/justifi-skeleton.entry.js +1 -1
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +2 -2
- package/dist/esm/justifi-terminal-orders-list.entry.js +6 -6
- package/dist/esm/justifi-terminals-list-filters.entry.js +2 -2
- package/dist/esm/justifi-terminals-list.entry.js +8 -8
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-B6YPrwyC.js → package-8R9xLun-.js} +1 -1
- package/dist/esm/payment-method-option.entry.js +1 -1
- package/dist/esm/{payment-provisioning-actions-cl5xIYnF.js → payment-provisioning-actions-fWdNDUdq.js} +2 -2
- package/dist/esm/payment-provisioning-form-buttons_2.entry.js +3 -2
- package/dist/esm/{payment.service-5_u-UzTY.js → payment.service-CWR7jF-K.js} +1 -1
- package/dist/esm/{payout.service-D2zS5y8N.js → payout.service-CFU362cH.js} +1 -1
- package/dist/esm/{payouts-status-DCjCGTaa.js → payouts-status-D2G7FKu1.js} +2 -2
- package/dist/esm/{plaid.service-BiJ65YG8.js → plaid.service-0hd1i5Ga.js} +1 -1
- package/dist/esm/{schema-validations-A1o1biOB.js → schema-validations-CjqWFLKt.js} +11 -8
- package/dist/esm/styled-host-D84RBv1W.js +9 -0
- package/dist/esm/{terminal.service-CIxDfM7V.js → terminal.service-Dr6dERcJ.js} +1 -1
- package/dist/esm/{utils-C1B2hVAB.js → utils-q7KOrlSX.js} +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/Plaid.js +15 -19
- package/dist/module/additional-questions-form-step2.js +11 -5
- package/dist/module/bank-account-document-form-inputs.js +55 -1
- package/dist/module/business-bank-account-form-step2.js +24 -177
- package/dist/module/business-core-info-form-step2.js +2 -2
- package/dist/module/business-core-info-schema.js +1 -1
- package/dist/module/business-core-info2.js +3 -3
- package/dist/module/business-documents-on-file2.js +1 -1
- package/dist/module/business-form-options.js +51 -1
- package/dist/module/business-identity-schema.js +7 -3
- package/dist/module/business-owners-form-step2.js +8 -0
- package/dist/module/business-representative-form-inputs2.js +5 -3
- package/dist/module/business-representative2.js +6 -5
- package/dist/module/button.js +1 -1
- package/dist/module/country-config.js +2 -0
- package/dist/module/document-upload-form-step.d.ts +11 -0
- package/dist/module/document-upload-form-step.js +6 -0
- package/dist/module/document-upload-form-step2.js +397 -0
- package/dist/module/document-upload-list.d.ts +11 -0
- package/dist/module/document-upload-list.js +6 -0
- package/dist/module/document-upload-list2.js +46 -0
- package/dist/module/form-control-number2.js +1 -1
- package/dist/module/form-control-textarea2.js +1 -1
- package/dist/module/form.js +1 -18
- package/dist/module/hidden-input2.js +1 -1
- package/dist/module/iframe-input2.js +1 -1
- package/dist/module/justifi-checkouts-list-filters.js +1 -1
- package/dist/module/justifi-checkouts-list.js +2 -2
- package/dist/module/justifi-dispute-management.js +1 -1
- package/dist/module/justifi-modular-checkout2.js +1 -1
- package/dist/module/justifi-order-terminals.js +2 -2
- package/dist/module/justifi-payment-details.js +1 -1
- package/dist/module/justifi-payment-provisioning.js +33 -27
- package/dist/module/justifi-payment-transactions-list.js +2 -2
- package/dist/module/justifi-payments-list.js +1 -1
- package/dist/module/justifi-payout-details.js +1 -1
- package/dist/module/justifi-payout-transactions-list.js +2 -2
- package/dist/module/justifi-payouts-list-filters.js +1 -1
- package/dist/module/justifi-payouts-list.js +2 -2
- package/dist/module/justifi-refund-payment.js +1 -1
- package/dist/module/justifi-terminal-orders-list-filters.js +1 -1
- package/dist/module/justifi-terminal-orders-list.js +2 -2
- package/dist/module/justifi-terminals-list-filters.js +1 -1
- package/dist/module/justifi-terminals-list.js +2 -2
- package/dist/module/owner-form-inputs2.js +5 -3
- package/dist/module/owner-form2.js +10 -1
- package/dist/module/package.js +1 -1
- package/dist/module/parts.js +1 -1
- package/dist/module/payment-provisioning-actions.js +1 -1
- package/dist/module/payment-provisioning-form-steps2.js +35 -28
- package/dist/module/plaid-verification2.js +1 -1
- package/dist/module/schema-validations.js +8 -5
- package/dist/module/skeleton.js +1 -1
- package/dist/module/styled-host.js +1 -1
- package/dist/module/table.js +1 -1
- package/dist/module/terminal-quantity-selector2.js +1 -1
- package/dist/types/api/Document.d.ts +15 -2
- package/dist/types/components/business-forms/owner-form/owner-form.d.ts +2 -0
- package/dist/types/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.d.ts +1 -12
- package/dist/types/components/business-forms/payment-provisioning/document-upload/document-upload-form-step.d.ts +44 -0
- package/dist/types/components/business-forms/payment-provisioning/document-upload/document-upload-list.d.ts +6 -0
- package/dist/types/components/business-forms/payment-provisioning/document-upload/document-upload-options.d.ts +44 -0
- package/dist/types/components/business-forms/payment-provisioning/payment-provisioning-form-steps.d.ts +1 -0
- package/dist/types/components/business-forms/schemas/business-bank-account-schema.d.ts +4 -4
- package/dist/types/components/business-forms/utils/business-form-options.d.ts +1 -0
- package/dist/types/components.d.ts +67 -0
- package/dist/webcomponents/{p-oTtn8xDw.js → p--RbNhyet.js} +1 -1
- package/dist/webcomponents/{p-d5e7291a.entry.js → p-04d6d725.entry.js} +1 -1
- package/dist/webcomponents/{p-8e821593.entry.js → p-086f7eea.entry.js} +1 -1
- package/dist/webcomponents/{p-ca87c609.entry.js → p-0a4fcb15.entry.js} +1 -1
- package/dist/webcomponents/{p-b0b6083f.entry.js → p-0b169fac.entry.js} +1 -1
- package/dist/webcomponents/{p-f1b9cbf0.entry.js → p-0e4cda77.entry.js} +1 -1
- package/dist/webcomponents/{p-b62ff001.entry.js → p-1e34c488.entry.js} +1 -1
- package/dist/webcomponents/{p-c4415366.entry.js → p-29b82954.entry.js} +1 -1
- package/dist/webcomponents/{p-89844a98.entry.js → p-2e063c5d.entry.js} +1 -1
- package/dist/webcomponents/p-37676092.entry.js +1 -0
- package/dist/webcomponents/p-3960e6b7.entry.js +1 -0
- package/dist/webcomponents/{p-e322dcba.entry.js → p-3bcac405.entry.js} +1 -1
- package/dist/webcomponents/{p-c4767c7b.entry.js → p-3e10a0de.entry.js} +1 -1
- package/dist/webcomponents/{p-8964f4ca.entry.js → p-48a866ae.entry.js} +1 -1
- package/dist/webcomponents/{p-3cefb032.entry.js → p-4b14b7e7.entry.js} +1 -1
- package/dist/webcomponents/p-54ee2a30.entry.js +1 -0
- package/dist/webcomponents/{p-397b28ba.entry.js → p-562447ad.entry.js} +4 -4
- package/dist/webcomponents/p-58adef16.entry.js +1 -0
- package/dist/webcomponents/{p-afe714cb.entry.js → p-5f071ee0.entry.js} +1 -1
- package/dist/webcomponents/{p-d1eabad2.entry.js → p-6b21947c.entry.js} +1 -1
- package/dist/webcomponents/{p-1f34b2f7.entry.js → p-80fdd013.entry.js} +1 -1
- package/dist/webcomponents/{p-7ff9ce05.entry.js → p-85c0abdb.entry.js} +1 -1
- package/dist/webcomponents/{p-0708cb76.entry.js → p-86eb32d8.entry.js} +1 -1
- package/dist/webcomponents/p-8R9xLun-.js +1 -0
- package/dist/webcomponents/{p-60c65da4.entry.js → p-8db8d7e7.entry.js} +1 -1
- package/dist/webcomponents/{p-65281b33.entry.js → p-8ed1bc07.entry.js} +1 -1
- package/dist/webcomponents/p-92d8a14b.entry.js +1 -0
- package/dist/webcomponents/{p-63e88b48.entry.js → p-92e7ce54.entry.js} +1 -1
- package/dist/webcomponents/{p-9153c121.entry.js → p-947950cc.entry.js} +1 -1
- package/dist/webcomponents/{p-c108cd71.entry.js → p-9ce2a98a.entry.js} +1 -1
- package/dist/webcomponents/p-B1yVkh15.js +1 -0
- package/dist/webcomponents/{p-Bt4GjEWL.js → p-BBSnDYJw.js} +1 -1
- package/dist/webcomponents/{p-av6jyzyC.js → p-BSyTbuZy.js} +1 -1
- package/dist/webcomponents/{p-APOabprT.js → p-BrFax4_P.js} +1 -1
- package/dist/webcomponents/p-BzXQDB0t.js +1 -0
- package/dist/webcomponents/{p-BxKbnILQ.js → p-C-zuQNNP.js} +1 -1
- package/dist/webcomponents/{p-Cm9f5fyh.js → p-CDu7TeCZ.js} +1 -1
- package/dist/webcomponents/{p-BJu1-9kE.js → p-CL8LyqRI.js} +1 -1
- package/dist/webcomponents/{p-DO9lqnbB.js → p-CeW0EPHy.js} +1 -1
- package/dist/webcomponents/{p-fE5A37L5.js → p-Cz0yhyYu.js} +1 -1
- package/dist/webcomponents/p-D9ZHVy-j.js +1 -0
- package/dist/webcomponents/{p-CKiAlBsU.js → p-D9sqTVmd.js} +1 -1
- package/dist/webcomponents/p-DV4n8kZd.js +1 -0
- package/dist/webcomponents/{p-Dk26hk5T.js → p-DdeBubpX.js} +1 -1
- package/dist/webcomponents/{p-DjjAx7PF.js → p-DvnFba1A.js} +1 -1
- package/dist/webcomponents/p-DzEdYT8R.js +1 -0
- package/dist/webcomponents/{p-NZS8uCtH.js → p-Dzv0P2Ly.js} +1 -1
- package/dist/webcomponents/p-a2ed63df.entry.js +1 -0
- package/dist/webcomponents/{p-a7a1b168.entry.js → p-a3b48ba3.entry.js} +1 -1
- package/dist/webcomponents/{p-1f7f2436.entry.js → p-a4520dba.entry.js} +1 -1
- package/dist/webcomponents/{p-7ebed752.entry.js → p-a5ad9183.entry.js} +1 -1
- package/dist/webcomponents/{p-95317547.entry.js → p-a7e0ab9b.entry.js} +1 -1
- package/dist/webcomponents/p-a9976353.entry.js +1 -0
- package/dist/webcomponents/{p-d79c5ee4.entry.js → p-b17ce21d.entry.js} +1 -1
- package/dist/webcomponents/{p-45668f01.entry.js → p-ba2ab989.entry.js} +1 -1
- package/dist/webcomponents/{p-bde7fe69.entry.js → p-c1b48216.entry.js} +1 -1
- package/dist/webcomponents/{p-1d294e34.entry.js → p-c2e09203.entry.js} +1 -1
- package/dist/webcomponents/{p-90f2f71d.entry.js → p-c3cc4ad6.entry.js} +1 -1
- package/dist/webcomponents/p-c9599fc7.entry.js +1 -0
- package/dist/webcomponents/{p-58b5e08e.entry.js → p-ca1c2048.entry.js} +1 -1
- package/dist/webcomponents/p-cab840bd.entry.js +1 -0
- package/dist/webcomponents/{p-e17b92ec.entry.js → p-cc558e25.entry.js} +1 -1
- package/dist/webcomponents/{p-BXyADlAH.js → p-czJ2qSU1.js} +1 -1
- package/dist/webcomponents/{p-91940d05.entry.js → p-de1ccbea.entry.js} +1 -1
- package/dist/webcomponents/{p-0ce6c1b1.entry.js → p-e0e6c2df.entry.js} +1 -1
- package/dist/webcomponents/p-n_pmf4AT.js +1 -0
- package/dist/webcomponents/p-vUN_uvAi.js +1 -0
- package/dist/webcomponents/{p-Ba8jdOkX.js → p-xWuaNtJy.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +14 -14
- package/LICENSE +0 -21
- package/dist/cjs/styled-host-DAi5SuFa.js +0 -11
- package/dist/esm/styled-host-D6byRazK.js +0 -9
- package/dist/module/bank-account-document-form-inputs2.js +0 -57
- package/dist/webcomponents/p-137a36a4.entry.js +0 -1
- package/dist/webcomponents/p-2aac2ab6.entry.js +0 -1
- package/dist/webcomponents/p-5G1OMxZz.js +0 -1
- package/dist/webcomponents/p-8d6856e7.entry.js +0 -1
- package/dist/webcomponents/p-Aacb4jqT.js +0 -1
- package/dist/webcomponents/p-B6YPrwyC.js +0 -1
- package/dist/webcomponents/p-BqNNwq6C.js +0 -1
- package/dist/webcomponents/p-D8ytux5N.js +0 -1
- package/dist/webcomponents/p-DrMJliVY.js +0 -1
- package/dist/webcomponents/p-XIWgia4J.js +0 -1
- package/dist/webcomponents/p-b192f251.entry.js +0 -1
- package/dist/webcomponents/p-b436a7d2.entry.js +0 -1
- package/dist/webcomponents/p-c8bc235f.entry.js +0 -1
- package/dist/webcomponents/p-e6ec9e6d.entry.js +0 -1
- package/dist/webcomponents/p-ff8cf16c.entry.js +0 -1
- package/dist/webcomponents/p-nb_LhbJq.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as e,c as s}from"./p-CV0Pyo1O.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{k as a,C as i,e as o}from"./p-
|
|
1
|
+
import{h as t,r as e,c as s}from"./p-CV0Pyo1O.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{k as a,C as i,e as o}from"./p-Dzv0P2Ly.js";import{p as r}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import{g as c,a as h}from"./p-CDu7TeCZ.js";import{c as n}from"./p-DvnFba1A.js";import{J as p}from"./p-CeW0EPHy.js";import{C as d}from"./p-Cz0yhyYu.js";import{m as u,S as m}from"./p-C-zuQNNP.js";import{S as f}from"./p-DzEdYT8R.js";import{T as b,a as l,b as y,c as k,d as g,e as C,f as v,g as j,h as _,i as w,j as T,k as S,l as P}from"./p-BICxxa69.js";import{T as x}from"./p-CZfYo5-1.js";import{d as A,b as I}from"./p-BRnBHsdq.js";import{B as D,a as O}from"./p-CHw7tICr.js";import{a6 as E,a7 as z}from"./p-CPKMvyV_.js";import{o as H,g as L}from"./p-CpGEMRkH.js";import"./p-D8GTwl9v.js";import"./p-8R9xLun-.js";import"./p-CYQvLgSs.js";import"./p-CqiVXthx.js";const B={created_at:()=>t("th",{part:E,scope:"col",title:"The date each checkout occurred"},"Processed On"),payment_amount:()=>t("th",{part:E,scope:"col",title:"The dollar amount of each checkout"},"Payment Amount"),payment_description:()=>t("th",{part:E,scope:"col",title:"The description of each checkout"},"Payment Description"),sub_account_name:()=>t("th",{part:E,scope:"col",title:"The sub account associated with the checkout"},"Sub Account"),payment_mode:()=>t("th",{part:E,scope:"col",title:"The payment mode of each checkout"},"Payment Mode"),status:()=>t("th",{part:E,scope:"col",title:"The current status of each checkout"},"Status")},G={created_at:(e,s)=>t("td",{part:z(s)},t("div",{class:"fw-bold"},I(e.created_at)),t("div",{class:"fw-bold"},A(e.created_at))),payment_amount:(e,s)=>t("td",{part:z(s)},e.formattedPaymentAmount(e.payment_amount)),payment_description:(e,s)=>t("td",{part:z(s)},e.payment_description),sub_account_name:(e,s)=>t("td",{part:z(s)},e.sub_account_name),payment_mode:(e,s)=>t("td",{part:z(s)},e.payment_mode),status:(e,s)=>t("td",{part:z(s)},t(O,Object.assign({},{created:{variant:D.PRIMARY,title:"The checkout has been created",text:"Created"},completed:{variant:D.SUCCESS,title:"The checkout has been completed",text:"Completed"},attempted:{variant:D.SECONDARY,title:"The checkout has been attempted",text:"Attempted"},expired:{variant:D.DANGER,title:"The checkout has expired",text:"Expired"}}[e.status])))},M=class{constructor(t){e(this,t),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.columns="created_at,payment_amount,payment_description,payment_mode,status",this.checkouts=[],this.subAccounts=[],this.loading=!0,this.paging=r,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:x.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:x.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const s=this.checkouts.find((t=>t.id===e));this.clickEvent.emit({name:x.row,data:s})}}componentWillLoad(){n(),this.analytics=new p(this),this.checkoutsTable=new b(this.checkouts,this.columns,B,G),this.initializeGetData(),this.getCheckouts&&this.fetchData(),H("set",(()=>{this.pagingParams={}})),H("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}authPropChanged(){this.initializeGetData(),this.getCheckouts&&this.fetchData()}pagingOrColumnsChanged(){this.getCheckouts&&this.fetchData()}initializeGetData(){this.initializeGetCheckouts(),this.initializeGetSubAccounts()}initializeGetCheckouts(){const t=this.subAccountId||this.accountId;t&&this.authToken?this.getCheckouts=(({accountId:t,authToken:e,service:s})=>async({params:o,onSuccess:r,onError:n})=>{var p,d;try{const u=await s.fetchCheckouts(t,e,o);if(u.error)return n({error:h(u.error),code:c(null===(d=u.error)||void 0===d?void 0:d.code),severity:i.ERROR});{const t=Object.assign({},u.page_info);r({checkouts:(null===(p=u.data)||void 0===p?void 0:p.map((t=>new a(t))))||[],pagingInfo:t})}}catch(t){const e=c(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:i.ERROR})}})({accountId:t,authToken:this.authToken,service:new d}):(this.errorMessage="Account ID/Sub Account ID and Auth Token are required",this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:this.errorMessage,severity:i.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=u({primaryAccountId:this.accountId,authToken:this.authToken,service:new m}))}fetchData(){this.getCheckouts&&(this.loading=!0,this.getCheckouts({params:this.checkoutParams,onSuccess:async({checkouts:t,pagingInfo:e})=>{this.checkouts=t,this.paging=e,this.checkoutsTable.collectionData=this.checkouts,this.checkoutsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:e,severity:s})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:s}),this.loading=!1}}))}async fetchSubAccounts(){this.getSubAccounts?this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.checkouts=this.checkouts.map((t=>{var e;return t.sub_account_name=null===(e=this.subAccounts.find((e=>e.id===t.account_id)))||void 0===e?void 0:e.name,t})),this.loading=!1},onError:({error:t,code:e,severity:s})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:s}),this.loading=!1}}):this.loading=!1}get checkoutParams(){const t=L();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){const t=this.checkouts.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.checkouts.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.checkoutsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return t(f,{key:"2f9efac8723333029415ef131516946912bb313c"},t(l,{key:"024c7a532533721acda9740a0888b1c15fa624fe"},t(y,{key:"06bf1c6db731eb5857b08615222ca47a85ffc4a8"},t(k,{key:"0754f9cd87a3b32a5368e7fb7538071cf6be0505"},t(g,{key:"5db4c5beea0e6e9afc29e16b5789a32ad94509dd"},this.checkoutsTable.columnData.map((t=>t)))),t(C,{key:"9140294035b04b549578d74374271f8a9fd78162"},t(v,{key:"bf495d00b9bc4ee28b67c8f1b3258306f9202142",columnSpan:this.checkoutsTable.columnKeys.length,isLoading:this.loading}),t(j,{key:"92f8a1245cc022fa3b254bb1fe8d659f75c62923",isEmpty:this.showEmptyState,columnSpan:this.checkoutsTable.columnKeys.length}),t(_,{key:"2e6ab100026afb29f199dd33e52de5ae77e6576c",columnSpan:this.checkoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.checkoutsTable.rowData.map(((e,s)=>t(w,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},e)))),this.paging&&t(T,{key:"3a1b55572eb0fc2ffcef1a39f6bfae5693056752"},t(S,{key:"f61a3cc86fda3ec95075381403916f5fb1c46ca6"},t(P,{key:"7d937a0d228062f42f49dca5bdb436d54354563e",colSpan:this.checkoutsTable.columnData.length},t("pagination-menu",{key:"05454876b7faeeb73fb8f896a2425e5f9db12ee3",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["authPropChanged"],authToken:["authPropChanged"],subAccountId:["authPropChanged"],pagingParams:["pagingOrColumnsChanged"],columns:["pagingOrColumnsChanged"]}}};export{M as justifi_checkouts_list}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as a,H as t}from"./p-CV0Pyo1O.js";import{a as s,r as i,s as l,d,b as c}from"./p-BBSnDYJw.js";import{C as o,I as r,P as n}from"./p-CVaOFfrI.js";import{b,x as f,u,a0 as h,ak as m}from"./p-CPKMvyV_.js";import{e as v,d as p,C as y}from"./p-BcNb9bVO.js";import{c as k}from"./p-BzXQDB0t.js";const j=class{constructor(a){e(this,a),this.errors={},this.additional_questions={},this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e))),this.formController.values.subscribe((e=>this.additional_questions=Object.assign({},e.additional_questions)))}inputHandler(e,a){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{additional_questions:Object.assign(Object.assign({},this.formController.values.getValue().additional_questions),{[e]:a})}))}render(){var e,d,c,r,n,f,u,h,m,v,p,y,k,j;const x=this.formController.getInitialValues().additional_questions;return a(t,{key:"05b69febfcd1e3901109c2cf64d812ff766b81cc"},a("fieldset",{key:"84f06779dff94622fc7d14fdca53efb84f11e8cd"},a("legend",{key:"3079e5d172c833d8172660f2f66b4d9637bfdb21",part:b},"Additional Questions"),a("div",{key:"cf5155033143279316822237a84a0ad5e292a6cd",class:"row gy-3"},a("div",{key:"e28450dacb0d7040d62a4820c0252d95792d7e87",class:"col-12 col-md-6"},a("form-control-monetary-provisioning",{key:"e2ac8f211ffd9848fab123bc7826fd9f18e109a8",name:"business_revenue",label:"What is the business' estimated annual revenue from its primary business activities?",inputHandler:this.inputHandler,errorText:null===(d=null===(e=this.errors)||void 0===e?void 0:e.additional_questions)||void 0===d?void 0:d.business_revenue,defaultValue:null==x?void 0:x.business_revenue,maskOptions:o.WHOLE})),a("div",{key:"c5de85cd5e7b1501a0667a49d8d4826971e93052",class:"col-12 col-md-6"},a("form-control-monetary-provisioning",{key:"3da3805e4ddbc633f060d36487b46e76e4f6eb04",name:"business_payment_volume",label:"What is the business' annual credit card & ACH volume anticipated to process?",inputHandler:this.inputHandler,errorText:null===(r=null===(c=this.errors)||void 0===c?void 0:c.additional_questions)||void 0===r?void 0:r.business_payment_volume,defaultValue:null==x?void 0:x.business_payment_volume,maskOptions:o.WHOLE})),a("div",{key:"ad62fecba837464fddba48273635bc8ae3a7d7ed",class:"col-12"},a("form-control-select",{key:"9f09093b45c1c8eeb63065402f4b15e31c166d51",name:"business_when_service_received",label:"On average, how long after paying will your customers typically receive their goods or services?",inputHandler:this.inputHandler,errorText:null===(f=null===(n=this.errors)||void 0===n?void 0:n.additional_questions)||void 0===f?void 0:f.business_when_service_received,options:s,defaultValue:null==x?void 0:x.business_when_service_received})),a("div",{key:"e2a05cbb74138a554033817e3bb1372933e64b99",class:"col-12"},a("form-control-select",{key:"8a95d74c02f2cf662f6cf0658faeae1a1a8f6a11",name:"business_recurring_payments",label:"Does your business offer recurring payments?",inputHandler:this.inputHandler,errorText:null===(h=null===(u=this.errors)||void 0===u?void 0:u.additional_questions)||void 0===h?void 0:h.business_recurring_payments,options:i,defaultValue:null==x?void 0:x.business_recurring_payments})),a("div",{key:"8d94059b0966237c980b1c1622e1ed3fd5bd8a58",class:"col-12"},a("form-control-text",{key:"320fa784aef300393ddfcca4f2ef4798d207bf30",name:"business_recurring_payments_percentage",label:"What percent of revenue is generated from each recurring payment type offered?",inputHandler:this.inputHandler,errorText:null===(v=null===(m=this.errors)||void 0===m?void 0:m.additional_questions)||void 0===v?void 0:v.business_recurring_payments_percentage,defaultValue:null==x?void 0:x.business_recurring_payments_percentage})),a("div",{key:"8525c21ec91e652737455e7b093ff280800d97c2",class:"col-12"},a("form-control-select",{key:"c2cba23606b03f758ba704c074a65a212e111998",name:"business_seasonal",label:"Is this business seasonal?",inputHandler:this.inputHandler,errorText:null===(y=null===(p=this.errors)||void 0===p?void 0:p.additional_questions)||void 0===y?void 0:y.business_seasonal,options:l,defaultValue:null==x?void 0:x.business_seasonal})),a("div",{key:"c047c43284fbe92952c487544bc8206c98433edc",class:"col-12"},a("form-control-text",{key:"27348b1899f8b8f7f18a0618aa4dcb812a3bef04",name:"business_other_payment_details",label:"Is there anything else you would like us to know about how your customers pay the business?",inputHandler:this.inputHandler,errorText:null===(j=null===(k=this.errors)||void 0===k?void 0:k.additional_questions)||void 0===j?void 0:j.business_other_payment_details,defaultValue:null==x?void 0:x.business_other_payment_details})))))}},x=class{constructor(a){e(this,a),this.errors={},this.coreInfo={},this.isEditingTaxId=!1,this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.values.subscribe((e=>this.coreInfo=Object.assign({},new v(e)))),this.formController.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}inputHandler(e,a){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:a}))}render(){var e,s;const i=this.formController.getInitialValues();return a(t,{key:"9c73706505c1fa0a56d7eb68fc1c4c0a6fffd1dc"},a("fieldset",{key:"d30bae9bab7ffd0e385ce276e7797cfd606e5a42"},a("legend",{key:"5792db95cbbc080f3c990b4b9cea84484f374ec3",part:b},"General Info"),a("div",{key:"ae7fa3c788d625d60cfc83b270312946dce97f0b",class:"row gy-3"},a("div",{key:"f7e5ab1ec57a8ce8de5ef8591ecad8b2fbd2f030",class:"col-12"},a("form-control-text",{key:"fa96501ceca053263029489a74bddd31222b1462",name:"legal_name",label:"Legal Name",defaultValue:i.legal_name,errorText:this.errors.legal_name,inputHandler:this.inputHandler})),a("div",{key:"21e14d0c13017376d7e74e84169f30fe05fa13af",class:"col-12"},a("form-control-text",{key:"266187ec2209299a4b0ebc4c7d600c670de3b21f",name:"doing_business_as",label:"Doing Business As (DBA)",defaultValue:i.doing_business_as,errorText:this.errors.doing_business_as,inputHandler:this.inputHandler})),a("div",{key:"d9bbb19b4ec15a18a0467444e964512114e74031",class:"col-12 col-md-8"},a("form-control-select",{key:"fe490b4abb4a1e07392db9ad4e4c15b02d928f4c",name:"classification",label:"Business Classification",options:d,defaultValue:i.classification,errorText:this.errors.classification,inputHandler:this.inputHandler})),a("div",{key:"fc5dafdace199fd34d22f22d629d87fc8ff7cc3e",class:"col-12 col-md-4"},a("form-control-date",{key:"0263cdef27d1b36c22bde16dbdb3777ad9ef62e3",name:"date_of_incorporation",label:"Date of Incorporation",defaultValue:i.date_of_incorporation,errorText:this.errors.date_of_incorporation,inputHandler:this.inputHandler})),a("div",{key:"2ae2b710d615e5314d4b836b9a498fc9140b749a",class:"col-12 col-md-6"},a("form-control-text",{key:"f6e738254ff7ead5680b895b6df77dc58efbc393",name:"industry",label:"Industry",defaultValue:i.industry,errorText:this.errors.industry,inputHandler:this.inputHandler})),a("div",{key:"8a01de0514d495b103aa43070d268070f57af62a",class:"col-12 col-md-6"},!(null===(e=this.coreInfo)||void 0===e?void 0:e.tax_id_last4)||this.isEditingTaxId?a("form-control-number-masked",{name:"tax_id",label:k[this.country].taxIdLabelOptional||k[this.country].taxIdLabel,defaultValue:this.isEditingTaxId?"":i.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,mask:r[this.country],helpText:k[this.country].taxIdHelpText}):a("div",null,a("label",{class:"form-label",part:f},k[this.country].taxIdLabel),a("div",{class:"input-group mb-3"},a("input",{type:"text",class:"form-control",part:u,value:`****${null===(s=this.coreInfo)||void 0===s?void 0:s.tax_id_last4}`,disabled:!0}),a("button",{class:"btn btn-secondary",type:"button",part:h,onClick:()=>{this.isEditingTaxId=!0,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{tax_id:""}))}},"Change")))),a("div",{key:"a82eb6e652eb36fd57cd4a6c413e896aebfefce6",class:"col-12"},a("form-control-text",{key:"930f882235d7c4902ae6daf54d644a0cd9d23daf",name:"website_url",label:"Website URL",defaultValue:i.website_url,errorText:this.errors.website_url,inputHandler:this.inputHandler})),a("div",{key:"b2e819e6dfd97229e81e1860e1debe3ab95e3dc0",class:"col-12 col-md-6"},a("form-control-text",{key:"7a4a158a1c64adfe90b825ff54c9f1f607c25bb7",name:"email",label:"Email Address",defaultValue:i.email,errorText:this.errors.email,inputHandler:this.inputHandler})),a("div",{key:"948c4f98a4a7a8b898058adb0957b7251d8c9fe4",class:"col-12 col-md-6"},a("form-control-number-masked",{key:"dc5804f3c9254c859f5e6a78487dae423c9689f1",name:"phone",label:"Phone Number",defaultValue:i.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:n.US})))))}},O=class{constructor(a){e(this,a),this.errors={},this.representative={},this.isEditingIdentification=!1,this.inputHandler=(e,a)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{[e]:a})}))},this.onAddressFormUpdate=e=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{address:Object.assign(Object.assign({},this.formController.values.getValue().representative.address),e)})}))},this.onDateOfBirthUpdate=e=>{const a=p(e.detail);this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{dob_day:a.dob_day,dob_month:a.dob_month,dob_year:a.dob_year})}))}}get identificationNumberLabel(){var e;return(null===(e=this.representative)||void 0===e?void 0:e.ssn_last4)||this.country===y.CAN?k[this.country].idNumberLabelOptional:k[this.country].idNumberLabel}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e.representative))),this.formController.values.subscribe((e=>this.representative=Object.assign({},e.representative)))}render(){var e,s;const i=this.formController.getInitialValues().representative;return a(t,{key:"9045242989e4d43d1e7b0770d0c5421005db78fa"},a("fieldset",{key:"6643f8bd8e81bbc64ae8a0e9bcf317e16f91bab9"},a("legend",{key:"20b897584a059ad98c109a37a3ea74c8be4b407c",part:b},"Representative"),a("div",{key:"37da5bfb73a7606c6180c151761aaf13dcc819c4",class:"row gy-3"},a("div",{key:"8d76accd442d9fda35ae4d3e1c47b65e17f098a0",class:"col-12 col-md-8"},a("form-control-text",{key:"2eadd087eac463e851192d8ee1c30390a29ee8b2",name:"name",label:"Full Name",defaultValue:null==i?void 0:i.name,errorText:this.errors.name,inputHandler:this.inputHandler})),a("div",{key:"f495a8cb3c6a0e9b4a00aac3e8c77f66da84b9e2",class:"col-12 col-md-4"},a("form-control-select",{key:"4b7669b96b7df9a387cf3c4f9638ea9ada9f37ee",name:"title",label:"Title",options:c,defaultValue:null==i?void 0:i.title,errorText:this.errors.title,inputHandler:this.inputHandler})),a("div",{key:"3e10f464a7e26a9518b4ce6d37c6f4a968514f98",class:"col-12 col-md-6"},a("form-control-text",{key:"a0d51c6999295428bfdcb43ef4b0ec15194eb077",name:"email",label:"Email Address",defaultValue:null==i?void 0:i.email,errorText:this.errors.email,inputHandler:this.inputHandler})),a("div",{key:"a8e1a4c8e4fa5a50d436c18e41a5b77f23bc53cf",class:"col-12 col-md-6"},a("form-control-number-masked",{key:"a72115bf51fc97a25add717c208e820c7e9e5495",name:"phone",label:"Phone Number",defaultValue:null==i?void 0:i.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:n.US})),a("div",{key:"db04f552f1757b6ac4e10539e4a148f399a75192",class:"col-12 col-md-4"},a("form-control-date",{key:"cb07a2cc4e6fc242d643f9caea01db380a9ff366",name:"dob_full",label:"Birth Date",defaultValue:null==i?void 0:i.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:this.onDateOfBirthUpdate})),a("div",{key:"95348511ba3b1582053f754249b15efe4d707252",class:"col-12 col-md-8"},!(null===(e=this.representative)||void 0===e?void 0:e.ssn_last4)||this.isEditingIdentification?a("form-control-number-masked",{name:"identification_number",label:this.identificationNumberLabel,defaultValue:this.isEditingIdentification?"":null==i?void 0:i.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:r[this.country],helpText:k[this.country].identityHelpText}):a("div",null,a("label",{class:"form-label",part:f},this.identificationNumberLabel),a("div",{class:"input-group mb-3"},a("input",{type:"text",class:"form-control",part:u,value:`****${null===(s=this.representative)||void 0===s?void 0:s.ssn_last4}`,disabled:!0}),a("button",{class:"btn btn-secondary",type:"button",part:h,onClick:()=>{this.isEditingIdentification=!0,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{ssn_last4:null,identification_number:""})}))}},"Change")))),a("div",{key:"57dcdaad0ec89f94d82236bfc8e093b68b7ec478",class:"col-12"},a("identity-address-form",{key:"0ea02562077d352c5d3a1d0903dee1e8b69fa6f1",errors:this.errors.address,defaultValues:null==i?void 0:i.address,handleFormUpdate:this.onAddressFormUpdate,country:this.country})))))}},g=class{constructor(a){e(this,a)}render(){return this.text?this.hideAlert?null:a("div",{class:"alert alert-danger d-flex align-items-center",role:"alert",part:m},a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",class:"bi bi-exclamation-triangle-fill flex-shrink-0 me-2",viewBox:"0 0 16 16",role:"img","aria-label":"Warning:"},a("path",{d:"M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"})),a("div",null,this.text)):null}},_=class{constructor(a){e(this,a),this.errors={},this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e))),this.formController.values.subscribe((e=>this.legal_address=Object.assign({},e.legal_address)))}inputHandler(e,a){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{legal_address:Object.assign(Object.assign({},this.formController.values.getValue().legal_address),{[e]:a})}))}render(){var e;const s=this.formController.getInitialValues().legal_address;return a(t,{key:"856cd25caef521b651b9dd8a40dc6f9f0c727706"},a("fieldset",{key:"150ad1f56747aae80ae8d2610fa08fcabee27c87"},a("legend",{key:"565a46bd0977680e400663ef0590d65e977135be",part:b},"Business Legal Address"),a("form-address-fields",{key:"c2ce05c006ec80c5319b30b40387e400ec52ab86",country:this.country,errors:null===(e=this.errors)||void 0===e?void 0:e.legal_address,defaultValues:s,inputHandler:this.inputHandler})))}};export{j as additional_questions,x as business_core_info,O as business_representative,g as form_alert,_ as legal_address_form}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as t,r as e,c as a}from"./p-CV0Pyo1O.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{h as s,C as i,e as r}from"./p-Dzv0P2Ly.js";import{p as n}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import{J as o}from"./p-CeW0EPHy.js";import{c}from"./p-DvnFba1A.js";import{g as p,a as d}from"./p-CDu7TeCZ.js";import{P as h}from"./p-n_pmf4AT.js";import{T as f,a as l,b as u,c as m,d as y,e as b,f as _,g,h as T,i as j,j as v,k,l as w}from"./p-BICxxa69.js";import{S as C}from"./p-DzEdYT8R.js";import{T as D}from"./p-CZfYo5-1.js";import{a as P}from"./p-BRnBHsdq.js";import{a6 as R,a7 as F}from"./p-CPKMvyV_.js";import"./p-D8GTwl9v.js";import"./p-8R9xLun-.js";import"./p-CYQvLgSs.js";import"./p-CqiVXthx.js";const x={created_at:()=>t("th",{part:R,scope:"col",title:"The date and time each transaction was made"},"Processed On"),type:()=>t("th",{part:R,scope:"col",title:"The type of each transaction"},"Type"),id:()=>t("th",{part:R,scope:"col",title:"The unique identifier of each transaction"},"ID"),amount:()=>t("th",{part:R,scope:"col",title:"The dollar amount of each transaction",class:"text-end"},"Amount"),balance:()=>t("th",{part:R,scope:"col",title:"The running total amount of this payment that belongs to you",class:"text-end"},"Balance"),currency:()=>t("th",{part:R,scope:"col",title:"The currency of each transaction"},"Currency"),financial_transaction_id:()=>t("th",{part:R,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),payment_id:()=>t("th",{part:R,scope:"col",title:"The unique identifier of the payment associated with the payment balance transaction"},"Payment ID"),payment_balance_txn_type:()=>t("th",{part:R,scope:"col",title:"The type of the payment balance transaction"},"Transaction Type"),source_id:()=>t("th",{part:R,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),source_type:()=>t("th",{part:R,scope:"col",title:"The type of the source object associated with the payment balance transaction"},"Source Type")},S={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:(e,a)=>t("td",{part:F(a)},t("div",{class:"fw-bold"},P(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},P(e.created_at,{showTime:!0}))),type:(e,a)=>t("td",{part:F(a)},S[e.payment_balance_txn_type]),id:(e,a)=>t("td",{part:F(a)},e.id),amount:(e,a)=>t("td",{part:F(a),class:"text-end"},e.formattedPaymentAmount(e.amount)),balance:(e,a)=>t("td",{part:F(a),class:"text-end"},e.formattedPaymentAmount(e.balance)),currency:(e,a)=>t("td",{part:F(a)},e.currency),financial_transaction_id:(e,a)=>t("td",{part:F(a)},e.financial_transaction_id),payment_id:(e,a)=>t("td",{part:F(a)},e.payment_id),payment_balance_txn_type:(e,a)=>t("td",{part:F(a)},e.payment_balance_txn_type),source_id:(e,a)=>t("td",{part:F(a)},e.source_id),source_type:(e,a)=>t("td",{part:F(a)},e.source_type)},E=class{constructor(t){e(this,t),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=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:D.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:D.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const a=this.balanceTransactions.find((t=>t.id===e));this.clickEvent.emit({name:D.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,x,I),c(),this.analytics=new o(this),this.initializeApi()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeApi()}handleError(t,e,a){this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:e,severity:a})}initializeApi(){this.paymentId&&this.authToken?(({id:t,authToken:e,service:a})=>async({params:r,onSuccess:n,onError:o,final:c})=>{var h;try{const c=await a.fetchPaymentTransactions(t,e,r);c.error?o({error:d(c.error),code:p(null===(h=c.error)||void 0===h?void 0:h.code),severity:i.ERROR}):n({balanceTransactions:c.data.map((t=>new s(t))),pagingInfo:Object.assign({},c.page_info)})}catch(t){const e=p(null==t?void 0:t.code);o({error:d(t),code:e,severity:i.ERROR})}finally{c()}})({id:this.paymentId,authToken:this.authToken,service:new h})({params:this.pagingParams,onSuccess:({balanceTransactions:t,pagingInfo:e})=>{this.balanceTransactions=t,this.paging=e,this.transactionsTable.collectionData=this.balanceTransactions},onError:({error:t,code:e,severity:a})=>{this.errorMessage=t.message,this.handleError(t,e,a)},final:()=>{this.isLoading=!1}}):(this.errorMessage="payment-id and auth-token props are required",this.handleError(r.MISSING_PROPS,this.errorMessage,i.ERROR))}get entityId(){return this.balanceTransactions.map((t=>t.id))}get showEmptyState(){return!this.isLoading&&!this.errorMessage&&this.transactionsTable.rowData.length<1}get showErrorState(){return!this.isLoading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.isLoading}render(){return t(C,{key:"a458269a6f875672be4d480411fc209c870fcc05"},t(l,{key:"6d072c9f1f3def61bfe10173220188da0b2c381f"},t(u,{key:"41b8cabf14b498e4035db4d36ef9d4dcd4d10867"},t(m,{key:"e77f2d5cd1347c2771584dadf619a1f21f7bdd5c"},t(y,{key:"053904f66c5d4ebcb33cb5b1d2ca3cdf5fd1c290"},this.transactionsTable.columnData.map((t=>t)))),t(b,{key:"5db67b01c7defdf97d2d2b305422254f9440564c"},t(_,{key:"24a110c7377f2f9e9b98302237221d168756593d",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(g,{key:"195b3cdf57087d986ee1db13b0bb5b65a417f380",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(T,{key:"4e747cbbac4ffe88a9fe8bca59738feb8a0876bc",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(j,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(v,{key:"052862a5252fef6f4a466c667d4444778d4b84b0"},t(k,{key:"61d2a980ba3dd3c05955829741023ba814581f6c"},t(w,{key:"1e40eb28e0bb75ae6e044c4730c76fbd5054c654",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"e066808fae97d39fd1f81924d5de32767f1a5c97",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}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,r as i}from"./p-CV0Pyo1O.js";import{S as t}from"./p-uZ5KAseb.js";import{w as a,c as s}from"./p-DVJaoI_m.js";import{e as c}from"./p-BRnBHsdq.js";import{c as
|
|
1
|
+
import{h as e,r as i}from"./p-CV0Pyo1O.js";import{S as t}from"./p-uZ5KAseb.js";import{w as a,c as s}from"./p-DVJaoI_m.js";import{e as c}from"./p-BRnBHsdq.js";import{c as d}from"./p-DvnFba1A.js";import"./p-CPKMvyV_.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";import"./p-8R9xLun-.js";const r=i=>{const{isReady:a}=i;return a?null:e("div",{class:"container-fluid p-0"},e("div",{class:"row mb-3"},e("div",{class:"col-12 align-content-end"},e(t,{height:"18px",width:"120px"}),e(t,{height:"36px"}))),e("div",{class:"row"},e("div",{class:"col-12 align-content-end"},e(t,{height:"18px",width:"110px"}),e(t,{height:"36px"}))))},n=class{constructor(e){i(this,e),this.isReady=!1}async componentWillLoad(){await a(),this.iframeOrigin=s.iframeOrigin,this.tabId=c(),d()}componentDidRender(){Promise.all([this.accountNumberIframeElement,this.routingNumberIframeElement].map((e=>new Promise((i=>{e.addEventListener("iframeLoaded",(()=>{i()}))}))))).then((()=>{this.isReady=!0}))}async validate(){const e=await this.accountNumberIframeElement.validate(),i=await this.routingNumberIframeElement.validate();return e&&i}async tokenize({clientId:e,paymentMethodMetadata:i,account:t}){return await this.accountNumberIframeElement.tokenize(e,i,t)}render(){return e("div",{key:"85e116539bb4721484d9877706ff93de1a68ec59"},e(r,{key:"b12a13d02b004e2957a55eb00fb38178dc283a92",isReady:this.isReady}),e("hidden-input",{key:"657ed7946158788e9291906ec0966eb3bd3c544c"}),e("div",{key:"321fddef9af616686d525af94dc4a65b5a4c18e6",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},e("div",{key:"cee2dcc5bf8032ca95dc6b46e6a2bb47b371986b",class:"row mb-3"},e("iframe-input",{key:"50dfad1fc1eb41a87f2964e80d39036da1fc89ce",inputId:"accountNumber",ref:e=>this.accountNumberIframeElement=e,label:"Account Number",iframeOrigin:`${this.iframeOrigin}/v2/accountNumber?tabId=${this.tabId}`})),e("div",{key:"bd47ac6ff7c687ce9eb7e6ea2a66628392f73cdc",class:"row"},e("iframe-input",{key:"bbe98adda61bc72925e77714139b604d2959e156",inputId:"routingNumber",ref:e=>this.routingNumberIframeElement=e,label:"Routing Number",iframeOrigin:`${this.iframeOrigin}/v2/routingNumber?tabId=${this.tabId}`}))))}};export{n as bank_account_form}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as a}from"./p-CV0Pyo1O.js";import{S as s}from"./p-
|
|
1
|
+
import{r as e,c as t,h as a}from"./p-CV0Pyo1O.js";import{S as s}from"./p-DzEdYT8R.js";import"./p-CZfYo5-1.js";const o=class{constructor(a){e(this,a),this.checkboxChanged=t(this,"checkboxChanged",7),this.label="Save New Payment Method"}render(){return a(s,{key:"b3a21f76759593ab02d71ed9a708982bdad5f0c3"},a("save-new-payment-method",{key:"ce0aa2bb711293144c835e9779b39a122017b544",label:this.label,hidden:this.hidden,onCheckboxChanged:e=>this.checkboxChanged.emit(e.detail)}))}};export{o as justifi_save_new_payment_method}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as a}from"./p-CV0Pyo1O.js";import{l as t}from"./p-C_ifLmT1.js";import"./p-DVJaoI_m.js";import{c as s,a as l}from"./p-BRnBHsdq.js";import{I as c,a as i}from"./p-
|
|
1
|
+
import{r as e,h as a}from"./p-CV0Pyo1O.js";import{l as t}from"./p-C_ifLmT1.js";import"./p-DVJaoI_m.js";import{c as s,a as l}from"./p-BRnBHsdq.js";import{I as c,a as i}from"./p-Dzv0P2Ly.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import{f as d,p as o,c as r}from"./p-CpGEMRkH.js";import{f as p,a as b}from"./p-CPKMvyV_.js";import{S as f}from"./p-DzEdYT8R.js";import"./p-CZfYo5-1.js";import"./p-BFTU3MAI.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";const m=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{d[e]=a},this.handleDateInput=(e,a)=>{const t=s(a,{setExactTime:!0});this.setParamsOnChange(e,t)}}componentWillLoad(){this.debouncedSetParamsOnChange=t.debounce(this.setParamsOnChange,300),Object.entries({status:this.checkoutStatus,payment_mode:this.paymentMode,checkout_id:this.checkoutId,successful_payment_id:this.successfulPaymentId,created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([e,a])=>{a&&(o[e]=a)}))}get checkoutStatusOptions(){return[{label:"All",value:""},{label:"Created",value:c.created},{label:"Completed",value:c.completed},{label:"Attempted",value:c.attempted},{label:"Expired",value:c.expired}]}get checkoutPaymentModeOptions(){return[{label:"All",value:""},{label:"E-commerce",value:i.ecom},{label:"BNPL",value:i.bnpl},{label:"Apple Pay",value:i.apple_pay}]}render(){const e=Object.assign({},d);return a(f,{key:"1bb72de3ffad74d0e287f6f988f2737a94190709"},a("table-filters-menu",{key:"e7e1c2d657b5af5dfcf6e13b262dbd3787583206",params:e,clearParams:r,part:p},a("div",{key:"df26c6a8c7ec477103995c07c079c01a4bea0729",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"6fd0f286cb30997439879d1c9b69b8ab39651a99",class:"p-2"},a("form-control-text",{key:"b6a070c40b1da5ea9f59c8c6f47f517181948230",name:"checkout_id",label:"Checkout ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.checkoutId||d.checkout_id,disabled:!!this.checkoutId,part:b})),a("div",{key:"f6ae07ac4b9afcb307fa6ce5ff6a0b6610169a69",class:"p-2"},a("form-control-text",{key:"c27c86b9a14d806bcd6d2d2a070812e31ae558ee",name:"successful_payment_id",label:"Successful Payment ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.successfulPaymentId||d.successful_payment_id,disabled:!!this.successfulPaymentId,part:b})),a("div",{key:"54b26c583902c853db8709b311870c94d5332bd2",class:"p-2"},a("form-control-select",{key:"3747bd2c6f2196a56059f36febc30057b8dc13de",name:"status",label:"Status",options:this.checkoutStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.checkoutStatus||d.status||"",disabled:!!this.checkoutStatus,part:b})),a("div",{key:"5a875750872d5446c42db9a840c3670425c46ebb",class:"p-2"},a("form-control-select",{key:"58eff7fbca6653532540506c7cef66df0f54af38",name:"payment_mode",label:"Payment Mode",options:this.checkoutPaymentModeOptions,inputHandler:this.setParamsOnChange,defaultValue:this.paymentMode||d.payment_mode||"",disabled:!!this.paymentMode,part:b})),a("div",{key:"dca10b3b14055c6c2351f4fa8f11b609625f1a26",class:"p-2"},a("form-control-date",{key:"bfb85e61a9ee01a1cb3c2907ad06b6d37bbdc081",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:l(this.createdAfter,{showInputDateTime:!0})||l(d.created_after,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdAfter,part:b})),a("div",{key:"1772c182c957b053e77599935e3d61c1a66186a6",class:"p-2"},a("form-control-date",{key:"f7965bd4b2689359e76d3cec250bfd7eb5ba7870",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:l(this.createdBefore,{showInputDateTime:!0})||l(d.created_before,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdBefore,part:b})))))}};export{m as justifi_checkouts_list_filters}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as t,H as s,c as a}from"./p-CV0Pyo1O.js";import{C as i}from"./p-BcNb9bVO.js";import{n as d}from"./p-BnjCmwMr.js";import{b as o,c as l}from"./p-
|
|
1
|
+
import{r as e,h as t,H as s,c as a}from"./p-CV0Pyo1O.js";import{C as i}from"./p-BcNb9bVO.js";import{n as d}from"./p-BnjCmwMr.js";import{b as o,c as l}from"./p-BzXQDB0t.js";import{I as r}from"./p-Ce_F4E0f.js";import{q as c,u as h,v as n,w as f,x as b}from"./p-CPKMvyV_.js";import{F as u}from"./p-Ce_W43gc.js";import"./p-CZfYo5-1.js";const m=class{constructor(t){e(this,t),this.country=i.USA}render(){var e,a,r,c,h,n,f,b,u,m;const v=l[this.country],p=o[this.country];return t(s,{key:"9b18ac26cce34bd3008146f106a260d9cb99de12"},t("div",{key:"c234c03bc4a3dbe74a0946af78aaed5992c3406c",class:"row gy-3"},t("div",{key:"0ce04acdf48726866bd6beecc25d0008b754984f",class:"col-12"},t("form-control-text",{key:"4d4b5098ebc39e52d0f17c677c4e92980793f46b",name:"line1",label:"Street Address",inputHandler:this.inputHandler,defaultValue:null===(e=this.defaultValues)||void 0===e?void 0:e.line1,errorText:null===(a=this.errors)||void 0===a?void 0:a.line1,helpText:"No PO Boxes."})),t("div",{key:"4133b38343c52135f2457bd7a9ad91b094422fb5",class:"col-12"},t("form-control-text",{key:"7e60be69dad198d488030ece4296326bb6368f2c",name:"line2",label:"Address Line 2 (optional)",inputHandler:this.inputHandler,defaultValue:null===(r=this.defaultValues)||void 0===r?void 0:r.line2,errorText:null===(c=this.errors)||void 0===c?void 0:c.line2})),t("div",{key:"a34a4e57cbd168bbbe065329bcfb393473b0def1",class:"col-12"},t("form-control-text",{key:"46e3005ef99ec988726ffcc37ec73756f002880d",name:"city",label:"City",inputHandler:this.inputHandler,defaultValue:null===(h=this.defaultValues)||void 0===h?void 0:h.city,errorText:null===(n=this.errors)||void 0===n?void 0:n.city})),t("div",{key:"2bf3389786351f2338cde13cbf87d28260444174",class:"col-12 col-md-6"},t("form-control-select",{key:"18a2a403d20af45965877601fa8d44a5aea48894",name:"state",label:v.stateLabel,options:p.stateOptions,inputHandler:this.inputHandler,defaultValue:null===(f=this.defaultValues)||void 0===f?void 0:f.state,errorText:null===(b=this.errors)||void 0===b?void 0:b.state})),t("div",{key:"1548ad58c0bd3b96067055601a006fc137ca31a3",class:"col-12 col-md-6"},t("form-control-text",{key:"8e8193efa81f1f5d8c626f76d75d15aba60ac921",name:"postal_code",label:v.postalLabel,inputHandler:this.inputHandler,defaultValue:null===(u=this.defaultValues)||void 0===u?void 0:u.postal_code,errorText:null===(m=this.errors)||void 0===m?void 0:m.postal_code,maxLength:this.country===i.USA?5:7,keyDownHandler:this.country===i.USA?d:void 0}))))}},v=class{constructor(t){e(this,t),this.formControlInput=a(this,"formControlInput",7),this.formControlBlur=a(this,"formControlBlur",7),this.imask=null,this.isFocused=!1,this.inputHandler=()=>{},this.disabled=!1,this.initializeIMask=()=>{this.textInput&&(this.imask=r(this.textInput,{mask:this.mask}),this.imask.on("accept",(()=>{var e;const t=null===(e=this.imask)||void 0===e?void 0:e.unmaskedValue;void 0!==t&&this.inputHandler(this.name,t)})),this.textInput.addEventListener("blur",(()=>this.formControlBlur.emit())))},this.handleFormControlInput=e=>{var t;const s=e.target,a=s.getAttribute("name"),i=(null===(t=this.imask)||void 0===t?void 0:t.unmaskedValue)||s.value;this.formControlInput.emit({name:a,value:i})},this.updateInput=e=>{this.imask&&e&&(this.imask.value=String(e))}}handleDefaultValueChange(e){this.initializeIMask(),this.updateInput(e)}disconnectedCallback(){var e;null===(e=this.imask)||void 0===e||e.destroy()}componentDidLoad(){this.textInput&&(this.initializeIMask(),this.updateInput(this.defaultValue))}get part(){return this.errorText?c:this.disabled?h:this.isFocused?n:f}render(){return t(s,{key:"c70d3fcce4d3e1e120008b03a708bb3d1038777b"},t("div",{key:"fc3c3cf5637121a7c6f662649a1b3910ec503afa",class:"form-group d-flex flex-column"},t("div",{key:"c06e87a0d72942e421c37ab406b7f71d4e7f2c54",class:"d-flex align-items-start gap-2"},t("label",{key:"eedeec0161e3085cd65ea08b3fb4517ff62c6ffc",part:b,class:"form-label",htmlFor:this.name},this.label),t("form-control-tooltip",{key:"9fb05bd91836ca51750f30a714a7940493bfad8b",helpText:this.helpText})),t("input",{key:"ef12caf83b42b0de0c33ece690bdd927b9b9a02c",ref:e=>this.textInput=e,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled}),t(u,{key:"8791f48bed5d6508b7cccad7bba8da7d65f96ffc",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}},p=class{constructor(t){e(this,t),this.address={},this.inputHandler=(e,t)=>{this.address[e]=t,this.address=Object.assign({},this.address)}}handleAddressChange(e){this.handleFormUpdate(e)}render(){return t(s,{key:"71100bc3742c3efaa9c3a948bf3ac5c69281c559"},t("form-address-fields",{key:"e5e5399686aa272a9cbe45d6914ebeda6a1966f4",country:this.country,errors:this.errors,defaultValues:this.defaultValues,inputHandler:this.inputHandler}))}static get watchers(){return{address:["handleAddressChange"]}}};export{m as form_address_fields,v as form_control_number_masked,p as identity_address_form}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as s,H as i}from"./p-CV0Pyo1O.js";import{C as a,e as r,z as n,w as o,x as l,y as h}from"./p-Dzv0P2Ly.js";import{m as c,a as d,c as u,d as m,e as b,f as p,g as f}from"./p-BrFax4_P.js";import{B as v,a as y,D as g,I as k}from"./p-CL8LyqRI.js";import{a as w,d as _,b as T,g as C,h as L}from"./p-B1yVkh15.js";import{F as x,c as S,a as O,b as j}from"./p-D9sqTVmd.js";import{A,C as D,e as E,R as I,f as V,O as H}from"./p-BcNb9bVO.js";import{C as P,P as B,I as N}from"./p-CVaOFfrI.js";import{b as M,a0 as R,C as F,x as W,u as q,D as z,aa as U,a6 as Z,aj as Y,am as $,A as G,a1 as Q}from"./p-CPKMvyV_.js";import{P as X}from"./p-DSclFZ32.js";import{a as K,c as J,d as tt,b as et}from"./p-BBSnDYJw.js";import{a as st,B as it}from"./p-XYgDHrVL.js";import{n as at}from"./p-BnjCmwMr.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import"./p-CLHwhyvu.js";import{B as rt,C as nt,v as ot,D as lt,E as ht,F as ct,G as dt}from"./p-DV4n8kZd.js";import{B as ut}from"./p-CHo7TfsM.js";import"./p-CZfYo5-1.js";import{c as mt}from"./p-BzXQDB0t.js";import{s as bt,b as pt,d as ft}from"./p-BRnBHsdq.js";import{S as vt}from"./p-uZ5KAseb.js";import{u as yt,a as gt,b as kt}from"./p-C6o0liMT.js";import{A as wt}from"./p-CYQvLgSs.js";import{S as _t}from"./p-DzEdYT8R.js";import{P as Tt}from"./p-BSyTbuZy.js";import"./p-CDu7TeCZ.js";import"./p-BFTU3MAI.js";import"./p-D8GTwl9v.js";class Ct{constructor(t){this.id=t.id,this.account_owner_name=t.account_owner_name,this.full_name=t.full_name,this.account_type=t.account_type,this.account_number=t.account_number,this.acct_last_four=t.acct_last_four,this.account_number_last4=t.account_number_last4,this.routing_number=t.routing_number,this.institution_number=t.institution_number,this.transit_number=t.transit_number,this.bank_name=t.bank_name,this.country=t.country,this.currency=t.currency,this.nickname=t.nickname,this.metadata=t.metadata,this.business_id=t.business_id,this.platform_account_id=t.platform_account_id,this.created_at=t.created_at,this.updated_at=t.updated_at}get payload(){return{account_owner_name:this.account_owner_name||"",account_type:this.account_type||"",account_number:this.account_number||"",routing_number:this.routing_number||"",institution_number:this.institution_number||"",transit_number:this.transit_number||"",bank_name:this.bank_name||"",nickname:this.nickname||"",business_id:this.business_id||""}}}const Lt=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.formLoading=e(this,"formLoading",7),this.errors={},this.additional_questions={},this.recurringPayments=!1,this.isLoading=!1,this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.additional_questions=new A(t.data.additional_questions||{}),this.formController.setInitialValues(Object.assign({},this.additional_questions))},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=t=>{let e;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:s=>{e=s,t()},onError:({error:t,code:s,severity:i})=>{e=t,this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:e,formStep:st.additionalQuestions}),this.formLoading.emit(!1)}})},this.inputHandler=(t,e)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e})),this.additional_questions=new A(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}propChanged(){this.initializeApi()}recurringPaymentsWatcher(t){this.recurringPayments="Yes"===(null==t?void 0:t.business_recurring_payments)}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return{additional_questions:new A(this.formController.values.getValue()).payload}}componentWillLoad(){this.initializeApi(),this.formController=new x(w(this.allowOptionalFields))}componentDidLoad(){this.getBusiness&&this.getData(),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=c({authToken:this.authToken,businessId:this.businessId,service:new v}),this.patchBusiness=d({authToken:this.authToken,businessId:this.businessId,service:new v})):this.errorEvent.emit({message:"Missing required props",errorCode:r.MISSING_PROPS,severity:a.ERROR})}render(){var t,e,i,a,r;const n=this.formController.getInitialValues();return this.isLoading?s(X,null):s("form",null,s("fieldset",null,s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:M},"Additional Questions"),s("form-control-tooltip",{helpText:"This information helps us understand the business and identify and monitor trends to safeguard you and your customers."})),s("hr",{class:"mt-2"}),s("div",{class:"row gy-3"},s("div",{class:"col-12 col-md-6"},s("form-control-monetary-provisioning",{name:"business_revenue",label:"What is your business' estimated annual revenue from its primary business activities?",inputHandler:this.inputHandler,errorText:null===(t=this.errors)||void 0===t?void 0:t.business_revenue,defaultValue:null==n?void 0:n.business_revenue,maskOptions:P.WHOLE})),s("div",{class:"col-12 col-md-6"},s("form-control-monetary-provisioning",{name:"business_payment_volume",label:"What is your business' annual credit card & ACH volume anticipated to process?",inputHandler:this.inputHandler,errorText:null===(e=this.errors)||void 0===e?void 0:e.business_payment_volume,defaultValue:null==n?void 0:n.business_payment_volume,maskOptions:P.WHOLE})),s("div",{class:"col-12"},s("form-control-number",{name:"business_average_transaction_amount",label:"What is your average transaction size?",inputHandler:this.inputHandler,errorText:null===(i=this.errors)||void 0===i?void 0:i.business_average_transaction_amount,defaultValue:null==n?void 0:n.business_average_transaction_amount})),s("div",{class:"col-12"},s("form-control-select",{name:"business_when_service_received",label:"On average, how long after paying will your customers typically receive their goods or services?",inputHandler:this.inputHandler,errorText:null===(a=this.errors)||void 0===a?void 0:a.business_when_service_received,options:K,defaultValue:null==n?void 0:n.business_when_service_received})),s("div",{class:"col-12"},s("form-control-text",{name:"business_other_payment_details",label:"Is there anything else you would like us to know about how your customers pay the business? (optional)",inputHandler:this.inputHandler,errorText:null===(r=this.errors)||void 0===r?void 0:r.business_other_payment_details,defaultValue:null==n?void 0:n.business_other_payment_details})))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],additional_questions:["recurringPaymentsWatcher"]}}},xt=class{constructor(e){t(this,e)}render(){var t,e,i,a,r,n;return s("div",{key:"d3445ce89732e19baea2e8f224c42011d5a03998",class:"row gy-3"},s("div",{key:"966e1d8ba6043b4f9b57ae0061ae94c177c12b48",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Bank Name",value:null===(t=this.defaultValue)||void 0===t?void 0:t.bank_name}):s("form-control-text",{name:"bank_name",label:"Bank Name",defaultValue:this.defaultValue.bank_name,errorText:this.errors.bank_name,inputHandler:this.inputHandler})),s("div",{key:"314a4f7e181b978b2ff1fdbfdfc8d9484089829a",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Nickname",value:null===(e=this.defaultValue)||void 0===e?void 0:e.nickname}):s("form-control-text",{name:"nickname",label:"Nickname",defaultValue:this.defaultValue.nickname,errorText:this.errors.nickname,inputHandler:this.inputHandler})),s("div",{key:"45ac55707ce44b208adaf72e944ea3056810183a",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Account Owner Name",value:null===(i=this.defaultValue)||void 0===i?void 0:i.account_owner_name}):s("form-control-text",{name:"account_owner_name",label:"Account Owner Name",defaultValue:this.defaultValue.account_owner_name,errorText:this.errors.account_owner_name,inputHandler:this.inputHandler})),s("div",{key:"74ce58b36eb3a425d900d7bb0858bda18b2e341c",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Account Type",value:null===(a=this.defaultValue)||void 0===a?void 0:a.account_type}):s("form-control-select",{name:"account_type",label:"Account Type",options:J,defaultValue:this.defaultValue.account_type,errorText:this.errors.account_type,inputHandler:this.inputHandler})),s("div",{key:"2562105aaaae00d9c46eb61d931a43927d96a8ce",class:"col-6"},this.formDisabled?s("bank-account-read-only-value",{label:"Account Number",value:(null===(r=this.defaultValue)||void 0===r?void 0:r.account_number_last4)?`**** ${this.defaultValue.account_number_last4}`:""}):s("form-control-text",{name:"account_number",label:"Account Number",defaultValue:this.defaultValue.account_number,maxLength:17,errorText:this.errors.account_number,inputHandler:this.inputHandler,keyDownHandler:at,helpText:"Please copy the account number as shown on your statement/check. Do not include spaces or dashes."})),s("div",{key:"4c7e6cba0ee1e2567dc5b608559b13ebd3fddd07",class:"col-6"},this.formDisabled?s("bank-account-read-only-value",{label:"Routing Number",value:(null===(n=this.defaultValue)||void 0===n?void 0:n.routing_number)||""}):s("form-control-text",{name:"routing_number",label:"Routing Number",defaultValue:this.defaultValue.routing_number,maxLength:9,errorText:this.errors.routing_number,inputHandler:this.inputHandler,keyDownHandler:at,helpText:"A valid routing number is nine digits. Please include any leading or trailing zeroes."})))}},St=class{constructor(e){t(this,e)}render(){var t,e,i,a,r,n,o;return s("div",{key:"8de8f05777f72ecb1112328544e75be7cd929e8d",class:"row gy-3"},s("div",{key:"513fb78b434ba3aebe51b636f7494b54e437c65f",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Bank Name",value:null===(t=this.defaultValue)||void 0===t?void 0:t.bank_name}):s("form-control-text",{name:"bank_name",label:"Bank Name",defaultValue:this.defaultValue.bank_name,errorText:this.errors.bank_name,inputHandler:this.inputHandler})),s("div",{key:"37a1ef4ac58fbe1633a93020e786d546cd832867",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Nickname",value:null===(e=this.defaultValue)||void 0===e?void 0:e.nickname}):s("form-control-text",{name:"nickname",label:"Nickname",defaultValue:this.defaultValue.nickname,errorText:this.errors.nickname,inputHandler:this.inputHandler})),s("div",{key:"fc8820e264d14ac3c5a1c6fd171b381c2b6d99e1",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Account Owner Name",value:null===(i=this.defaultValue)||void 0===i?void 0:i.account_owner_name}):s("form-control-text",{name:"account_owner_name",label:"Account Owner Name",defaultValue:this.defaultValue.account_owner_name,errorText:this.errors.account_owner_name,inputHandler:this.inputHandler})),s("div",{key:"f183b1c5f6a8b0f905c916cd1715448f3e02d26f",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Account Type",value:null===(a=this.defaultValue)||void 0===a?void 0:a.account_type}):s("form-control-select",{name:"account_type",label:"Account Type",options:J,defaultValue:this.defaultValue.account_type,errorText:this.errors.account_type,inputHandler:this.inputHandler})),s("div",{key:"8366ebde2f319f6d910a34917f57ad43b3ee234f",class:"col-3"},this.formDisabled?s("bank-account-read-only-value",{label:"Transit Number",value:(null===(r=this.defaultValue)||void 0===r?void 0:r.transit_number)||""}):s("form-control-text",{name:"transit_number",label:"Transit Number",defaultValue:this.defaultValue.transit_number,maxLength:5,errorText:this.errors.transit_number,inputHandler:this.inputHandler,keyDownHandler:at,helpText:"5 digits"})),s("div",{key:"c91166337c2984048466014634f5d4e59ce2b40a",class:"col-3"},this.formDisabled?s("bank-account-read-only-value",{label:"Institution Number",value:(null===(n=this.defaultValue)||void 0===n?void 0:n.institution_number)||""}):s("form-control-text",{name:"institution_number",label:"Institution Number",defaultValue:this.defaultValue.institution_number,maxLength:3,errorText:this.errors.institution_number,inputHandler:this.inputHandler,keyDownHandler:at,helpText:"3 digits"})),s("div",{key:"ebce2f50ec265ed2fef7a0b3dae84d33036ad145",class:"col-6"},this.formDisabled?s("bank-account-read-only-value",{label:"Account Number",value:(null===(o=this.defaultValue)||void 0===o?void 0:o.account_number_last4)?`**** ${this.defaultValue.account_number_last4}`:""}):s("form-control-text",{name:"account_number",label:"Account Number",defaultValue:this.defaultValue.account_number,maxLength:17,errorText:this.errors.account_number,inputHandler:this.inputHandler,keyDownHandler:at,helpText:"Please copy the account number as shown on your statement. Do not include spaces or dashes."})))}},Ot=t=>t?{bank_name:ht.nullable(),nickname:lt.nullable(),account_owner_name:ot.nullable(),account_type:nt.nullable(),account_number:rt.nullable()}:{bank_name:ht.required("Enter bank name"),nickname:lt.required("Enter nickname"),account_owner_name:ot.required("Enter account owner name"),account_type:nt.required("Select account type"),account_number:rt.required("Enter account number")},jt={[D.USA]:t=>(t=>{const e=Object.assign(Object.assign({},Ot(t)),(t=>t?{routing_number:dt.nullable()}:{routing_number:dt.required("Enter routing number")})(t));return S().shape(e)})(t),[D.CAN]:t=>(t=>{const e=Object.assign(Object.assign({},Ot(t)),(t=>{const e=O().length(3,"Institution number must be 3 digits").matches(ct,"Enter valid institution number"),s=O().length(5,"Transit number must be 5 digits").matches(ct,"Enter valid transit number");return t?{institution_number:e.nullable(),transit_number:s.nullable()}:{institution_number:e.required("Enter institution number"),transit_number:s.required("Enter transit number")}})(t));return S().shape(e)})(t)},At=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.formLoading=e(this,"formLoading",7),this.errors={},this.bankAccount={},this.isLoading=!1,this.viewMode="manual",this.bankAccountVerification=!1,this.platformAccountId=null,this.getSchema=()=>(0,jt[this.country])(this.allowOptionalFields),this.initializeFormController=()=>{this.formController=new x(this.getSchema()),this.formController.setInitialValues("readonly"===this.viewMode?Object.assign({},this.bankAccount):{business_id:this.businessId}),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))},this.inputHandler=(t,e)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))},this.getData=()=>{this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.processBusinessResponse(t.data),this.determineViewMode()},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.initializeFormController(),this.isLoading=!1}})},this.handleChangeBankAccount=()=>{this.viewMode=this.plaidAvailable?"plaid":"manual",this.initializeFormController()},this.handleCancel=()=>{this.viewMode=this.existingBankAccount?"readonly":"plaid",this.initializeFormController()},this.handleToggleToManualEntry=()=>{this.viewMode="manual"},this.handleToggleToPlaidVerification=()=>{this.viewMode="plaid"},this.handleSaveBankAccount=async()=>{this.formController.validateAndSubmit((()=>{this.sendData((()=>{}))}))}}propChanged(){this.initializeApi()}watchHandler(t){this.formLoading.emit(t)}async validateAndSubmit({onSuccess:t}){"readonly"===this.viewMode?this.sendData(t):this.formController.validateAndSubmit((()=>this.sendData(t)))}componentWillLoad(){this.initializeApi(),this.getBusiness&&this.getData(),this.formController=new x(this.getSchema())}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=c({authToken:this.authToken,businessId:this.businessId,service:new v}),this.postBankAccount=u({authToken:this.authToken,service:new y})):this.errorEvent.emit({message:"Missing required props",errorCode:r.MISSING_PROPS,severity:a.ERROR})}get postPayload(){const t=this.formController.values.getValue();return new Ct(t).payload}get existingBankAccount(){var t;return!!(null===(t=this.bankAccount)||void 0===t?void 0:t.id)}get plaidAvailable(){return this.bankAccountVerification&&!!this.platformAccountId}get showCancel(){return this.bankAccountVerification||this.existingBankAccount}processBusinessResponse(t){const{bank_accounts:e,settings:s,platform_account_id:i}=t;e.length>0?this.bankAccount=new Ct(e[e.length-1]):(this.bankAccount=new Ct({}),this.bankAccount.business_id=this.businessId),this.bankAccountVerification=!0===s.bank_account_verification,this.platformAccountId=i}determineViewMode(){this.viewMode=this.existingBankAccount?"readonly":this.plaidAvailable?"plaid":"manual"}async sendData(t){try{if("manual"===this.viewMode){if(!await this.postBankAccountData())return;this.viewMode="readonly",await this.refreshBankAccountData()}t()}catch(t){this.errorEvent.emit({message:t,errorCode:r.POST_ERROR,severity:a.ERROR})}}async postBankAccountData(){let t;return this.isLoading=!0,new Promise((e=>{let s=!1;this.postBankAccount({payload:this.postPayload,onSuccess:e=>{t=e,s=!0},onError:({error:t,code:e,severity:i})=>{s=!1,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:st.bankAccount}),this.isLoading=!1,e(s)}})}))}async refreshBankAccountData(){return new Promise((t=>{this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.processBusinessResponse(t.data),this.determineViewMode(),this.initializeFormController()},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.isLoading=!1,t()}})}))}renderBankAccountInputs(t){const e=this.formController.getInitialValues();return s(this.country===D.CAN?"bank-account-form-inputs-canada":"bank-account-form-inputs",{defaultValue:e,errors:this.errors,inputHandler:this.inputHandler,formDisabled:t})}renderReadonlyView(){return s("div",null,this.renderBankAccountInputs(!0),s("div",{class:"mt-3"},s(ut,{variant:"secondary",type:"button",onClick:this.handleChangeBankAccount,disabled:this.isLoading,part:R},"Change Bank Account")))}renderPlaidView(){return s("div",{class:"mt-3"},s("plaid-verification",{authToken:this.authToken,accountId:this.platformAccountId,businessId:this.businessId,onPlaidVerificationSuccess:()=>{this.viewMode="readonly",this.refreshBankAccountData()}}),s("div",{class:"mt-3"},s(ut,{type:"button",variant:"link",className:"p-0",onClick:this.handleToggleToManualEntry,disabled:this.isLoading,part:F},"Enter bank details manually (document upload required)")))}renderManualEntryView(){return s("div",null,this.plaidAvailable&&s("div",{class:"mb-3"},s(ut,{type:"button",variant:"secondary",onClick:this.handleToggleToPlaidVerification,disabled:this.isLoading,part:R},"Link bank account with Plaid instead")),this.renderBankAccountInputs(!1),s("div",{class:"mt-3 d-flex gap-2"},this.showCancel&&s(ut,{variant:"secondary",type:"button",onClick:this.handleCancel,disabled:this.isLoading,part:R},"Cancel"),s(ut,{variant:"primary",type:"button",onClick:this.handleSaveBankAccount,disabled:this.isLoading,isLoading:this.isLoading},"Save Bank Account")))}render(){return this.isLoading?s(X,null):s("form",null,s("fieldset",{class:"mb-4"},s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:M},"Bank Account Info"),s("form-control-tooltip",{helpText:"This direct deposit account is the designated bank account where incoming funds will be deposited. The name of this account must match the registered business name exactly. We are not able to accept personal accounts unless your business is a registered sole proprietorship."})),s("hr",{class:"mt-2"}),"readonly"===this.viewMode&&this.renderReadonlyView(),"plaid"===this.viewMode&&this.renderPlaidView(),"manual"===this.viewMode&&this.renderManualEntryView()))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],isLoading:["watchHandler"]}}},Dt=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.formLoading=e(this,"formLoading",7),this.errors={},this.coreInfo={},this.isLoading=!1,this.isEditingTaxId=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.coreInfo=new E(t.data),this.formController.setInitialValues(Object.assign({},this.coreInfo))},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=t=>{let e;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:s=>{e=s,t(),this.isEditingTaxId=!1},onError:({error:t,code:s,severity:i,rawError:a})=>{e=t,a&&"object"==typeof a&&a.param&&this.formController.setFieldError(a.param,a.message),this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:e,formStep:st.businessInfo}),this.formLoading.emit(!1)}})},this.inputHandler=(t,e)=>{this.errors[t]&&this.formController.clearFieldError(t),this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return new E(this.formController.values.getValue()).payload}componentWillLoad(){this.initializeApi();const t=this.country===D.CAN?_(this.allowOptionalFields):T(this.allowOptionalFields);this.formController=new x(t),this.getData()}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=c({authToken:this.authToken,businessId:this.businessId,service:new v}),this.patchBusiness=d({authToken:this.authToken,businessId:this.businessId,service:new v})):this.errorEvent.emit({message:"Missing required props",errorCode:r.MISSING_PROPS,severity:a.ERROR})}render(){var t,e;const i=this.formController.getInitialValues();return this.isLoading?s(X,null):s("form",null,s("fieldset",null,s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:M},"Business Information")),s("hr",{class:"mt-2"}),s("div",{class:"row gy-3"},s("div",{class:"col-12 col-md-6"},s("form-control-text",{name:"legal_name",label:"Business Name",defaultValue:i.legal_name,errorText:this.errors.legal_name,inputHandler:this.inputHandler,helpText:"Enter this exactly as it appears on your tax records (don't use acronyms or abbreviations unless you registered that way)."})),s("div",{class:"col-12 col-md-6"},s("form-control-text",{name:"doing_business_as",label:"Doing Business As (DBA)",defaultValue:i.doing_business_as,errorText:this.errors.doing_business_as,inputHandler:this.inputHandler,helpText:"Enter this exactly as it appears on your tax records (leave blank if you don't have a registered DBA/trade name)"})),s("div",{class:"col-12 col-md-8"},s("form-control-select",{name:"classification",label:"Business Classification",options:tt,defaultValue:i.classification,errorText:this.errors.classification,inputHandler:this.inputHandler})),s("div",{class:"col-12 col-md-4"},s("form-control-date",{name:"date_of_incorporation",label:"Date of Registration",defaultValue:i.date_of_incorporation,errorText:this.errors.date_of_incorporation,inputHandler:this.inputHandler})),s("div",{class:"col-12 col-md-6"},s("form-control-text",{name:"industry",label:"Industry",defaultValue:i.industry,errorText:this.errors.industry,inputHandler:this.inputHandler,helpText:"Describe what you sell"})),s("div",{class:"col-12 col-md-6"},!(null===(t=this.coreInfo)||void 0===t?void 0:t.tax_id_last4)||this.isEditingTaxId?s("form-control-number-masked",{name:"tax_id",label:mt[this.country].taxIdLabelOptional||mt[this.country].taxIdLabel,defaultValue:this.isEditingTaxId?"":i.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,mask:"000000000",helpText:mt[this.country].taxIdHelpText}):s("div",null,s("label",{class:"form-label",part:W},mt[this.country].taxIdLabel),s("div",{class:"input-group mb-3"},s("input",{type:"text",class:"form-control",part:q,value:`****${null===(e=this.coreInfo)||void 0===e?void 0:e.tax_id_last4}`,disabled:!0}),s("button",{class:"btn btn-secondary",type:"button",part:R,onClick:()=>{this.isEditingTaxId=!0,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{tax_id:"",tax_id_last4:null}))}},"Change")))),s("div",{class:"col-12"},s("form-control-text",{name:"website_url",label:"Business Website URL",defaultValue:i.website_url,errorText:this.errors.website_url,inputHandler:this.inputHandler,helpText:"Don't have a live website? You can use your social media business page, app store link, or staging site URL."})),s("div",{class:"col-12 col-md-6"},s("form-control-text",{name:"email",label:"Business Email Address",defaultValue:i.email,errorText:this.errors.email,inputHandler:this.inputHandler})),s("div",{class:"col-12 col-md-6"},s("form-control-number-masked",{name:"phone",label:"Business Phone Number",defaultValue:i.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:B.US})))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},Et=class{constructor(e){t(this,e),this.documents=[],this.isLoading=!1}render(){return this.isLoading?s(vt,{height:"50px"}):this.documents.length?s(i,null,s("div",{class:"card",part:z},s("div",{class:"card-body"},s("h5",{class:"card-title",part:M},"Documents Already on File"),s("div",{class:"table-responsive"},s("table",{class:"table table-sm table-borderless",part:U},s("thead",null,s("tr",null,s("th",{style:{width:"25%"},part:Z,scope:"col"},"File Name"),s("th",{style:{width:"25%"},part:Z,scope:"col"},"File Type"),s("th",{style:{width:"25%"},part:Z,scope:"col"},"Document Type"),s("th",{style:{width:"25%"},part:Z,scope:"col"},"Date Uploaded"))),s("tbody",null,this.documents.sort(((t,e)=>t.document_type.localeCompare(e.document_type))).map(((t,e)=>s("tr",{class:0===e?"border-bottom border-top":"border-bottom"},s("td",{part:Y},t.file_name),s("td",{part:Y},t.file_type),s("td",{part:Y},bt(t.document_type)),s("td",{part:Y},`${pt(t.created_at)} - ${ft(t.created_at)}`))))))))),s("hr",null)):null}},It=class{constructor(s){t(this,s),this.clickEvent=e(this,"click-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.errorEvent=e(this,"error-event",7),this.formLoading=e(this,"formLoading",7),this.ownersPayload=[],this.refs=[],this.isLoading=!1,this.representativeIsOwner=null,this.matchRef=(t,e)=>{if(null===t)return;const s=this.ownersPayload.findIndex((t=>t.id===e));-1!==s&&(this.refs.length!==this.ownersPayload.length&&this.manageRefs(),this.refs[s]=t)},this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.representative=new I(t.data.representative||{}),t.data.owners.length?this.ownersPayload=t.data.owners.map((t=>({id:t.id}))):this.addOwnerForm()},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1,this.manageRefs()}})},this.sendData=async t=>{let e;this.formLoading.emit(!0),this.patchBusiness({payload:{owners:this.ownersPayload},onSuccess:s=>{e=s,t()},onError:({error:t,code:s,severity:i})=>{e=t,this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:e,formStep:st.owners}),this.formLoading.emit(!1)}})},this.addOwnerForm=t=>{this.newFormOpen=!0,this.ownersPayload=[...this.ownersPayload,{id:""}],t&&this.clickEvent.emit({name:it.addOwnerForm})},this.removeOwnerForm=t=>{this.ownersPayload=this.ownersPayload.filter((e=>e.id!==t)),this.newFormOpen&&(this.newFormOpen=!1)},this.handleRepresentativeIsOwnerChange=t=>{this.representativeIsOwner=t,this.representativeIsOwner&&(this.formLoading.emit(!0),this.isLoading=!0,this.ownersPayload=this.ownersPayload.filter((t=>""!==t.id)),this.patchBusiness({payload:{representative:{is_owner:!0},owners:[{id:this.representative.id},...this.ownersPayload]},onSuccess:()=>{this.getData(),this.newFormOpen=!1},finally:()=>{this.isLoading=!1,this.formLoading.emit(!1)}}))}}propChanged(){this.initializeApi()}get showAddOwnerButton(){return this.ownersPayload.length<4&&!this.newFormOpen}manageRefs(){this.refs=this.ownersPayload.map((t=>t.id))}async validateAndSubmit({onSuccess:t}){const e=this.refs.map((t=>t.validate()));if(!(await Promise.all(e)).every((t=>t)))return;if(!this.allowOptionalFields&&100!==(await Promise.all(this.refs.map((t=>t.getOwnershipPercentage())))).reduce(((t,e)=>t+(parseFloat(e)||0)),0))return void await Promise.all(this.refs.map((t=>t.setOwnershipPercentageError("Ownership percentages must total 100%"))));const s=this.refs.map((t=>t.submit()));(await Promise.all(s)).every((t=>t))&&this.sendData(t)}componentWillLoad(){this.initializeApi(),this.getBusiness&&this.getData()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=c({authToken:this.authToken,businessId:this.businessId,service:new v}),this.patchBusiness=d({authToken:this.authToken,businessId:this.businessId,service:new v})):this.errorEvent.emit({message:"Missing required props",errorCode:r.MISSING_PROPS,severity:a.ERROR})}ownersWatcher(){this.manageRefs()}handleOwnerSubmit(t){const e=t.detail,s=this.ownersPayload.map((t=>t.id===e.id?e:t));s.includes(e)||(s[this.ownersPayload.findIndex((t=>!t.id))]=e,this.newFormOpen&&(this.newFormOpen=!1)),this.ownersPayload=s}render(){if(this.isLoading)return s(i,null,s(X,null));const t=this.ownersPayload.some((t=>t.id===this.representative.id)),e=null===this.representativeIsOwner&&!t;return s(i,null,s("div",null,s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:M},"Owners"),s("form-control-tooltip",{helpText:"For partnerships, LLCs or privately held corporations, the business is required to apply with all individuals with 25% or more ownership to the application. For charities and registered non-profits, the business is required to apply with 1 individual with substantial control over the entity, such as a board member or director."})),s("hr",{class:"mt-2"}),e&&s("div",{class:"alert alert-warning mb-3",part:$},s("div",{class:"card-body"},s("div",{class:"d-flex align-items-center mb-3"},s("strong",null,"Is the representative of this business also an owner?")),s("div",{class:"d-flex gap-2"},s(ut,{variant:"primary",onClick:()=>this.handleRepresentativeIsOwnerChange(!0)},"Yes"),s(ut,{variant:"secondary",onClick:()=>this.handleRepresentativeIsOwnerChange(!1)},"No")))),s("div",{class:"row gy-3"},this.ownersPayload.map((t=>s("owner-form",{key:t.id,authToken:this.authToken,businessId:this.businessId,ownerId:t.id,removeOwner:this.removeOwnerForm,newFormOpen:this.newFormOpen,ownersLength:this.ownersPayload.length,country:this.country,allowOptionalFields:this.allowOptionalFields,ref:e=>this.matchRef(e,t.id)})))),s("div",{class:"d-flex justify-content-start"},s("div",{class:"gap-2"},s(ut,{variant:"primary",onClick:()=>this.addOwnerForm(!0),hidden:!this.showAddOwnerButton},"Add Owner")))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],ownersPayload:["ownersWatcher"]}}},Vt=class{constructor(e){t(this,e),this.isEditingIdentification=!1,this.inputHandler=(t,e)=>{yt(this.formController,{[t]:e})},this.onAddressFormUpdate=t=>{gt(this.formController,Object.assign(Object.assign({},this.formController.values.getValue().address),t))}}render(){var t,e,i,a,r,n,o,l,h;return s("form",{key:"2346f250e4e2982b5b5b2624d039f551b5b5ed4e"},s("fieldset",{key:"7b496e6157e5eec02ef0d263c68fbd1e001c75ac"},s("div",{key:"b86d993c7fbee2269e48c7d4ea51826f199fecd4",class:"d-flex align-items-center gap-2"},s("legend",{key:"2b013e6068bbbca54a0852093ab4a2fae4ce64d2",class:"mb-0",part:M},"Representative"),s("form-control-tooltip",{key:"01e0f1d6ba2d5ee852593f7015a3ba7e0d980df9",helpText:"The representative for your business needs to be someone who has significant control over managing your business's finance. You will have an opportunity to add owners later in the form."})),s("hr",{key:"4bec34756ec7081e01809175bc3d2b6af0532537",class:"mt-2"}),s("div",{key:"6965720fabb1f12c6bb3c5a81f74ae12f44037b2",class:"row gy-3"},s("div",{key:"efbb768ba1e66d5ef47f792c39a17921b40e0eba",class:"col-12 col-md-8"},s("form-control-text",{key:"28477d3798ba7d14aee9201e84b276d8e85a21df",name:"name",label:"Full Name",defaultValue:null===(t=this.representativeDefaultValue)||void 0===t?void 0:t.name,errorText:this.errors.name,inputHandler:this.inputHandler})),s("div",{key:"28f17ccbe4da476256acd9c5a4e78a6a641ba6e9",class:"col-12 col-md-4"},s("form-control-select",{key:"dae6a93a0bc057abb97024277be0f10de01514e2",name:"title",label:"Title",options:et,defaultValue:null===(e=this.representativeDefaultValue)||void 0===e?void 0:e.title,errorText:this.errors.title,inputHandler:this.inputHandler})),s("div",{key:"2f9a45774adaa0040df2da1a8000d1ee61e16bf5",class:"col-12 col-md-6"},s("form-control-text",{key:"66a2a1ea8b54c03c012d76a74654ee19a9f958a7",name:"email",label:"Email Address",defaultValue:null===(i=this.representativeDefaultValue)||void 0===i?void 0:i.email,errorText:this.errors.email,inputHandler:this.inputHandler})),s("div",{key:"3b34f0cb11d358db2220c01aac90e8b7ba3cc01b",class:"col-12 col-md-6"},s("form-control-number-masked",{key:"52c62ec653fb917a248a302f7cb5ad46dc7bcc23",name:"phone",label:"Phone Number",defaultValue:null===(a=this.representativeDefaultValue)||void 0===a?void 0:a.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:B.US})),s("div",{key:"d287ec225af1541cca227d3b8bc54466cbb86b07",class:"col-12 col-md-4"},s("form-control-date",{key:"7e1ff6cc40b01dc7f6ad0ad84d73c0e59eea0d6f",name:"dob_full",label:"Birth Date",defaultValue:null===(r=this.representativeDefaultValue)||void 0===r?void 0:r.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:t=>kt(t,this.formController),helpText:"Must be 18 or older."})),s("div",{key:"283b09c845f1a12f4974f82a26fffbf7c5f608ba",class:"col-12 col-md-8"},!(null===(n=this.representativeDefaultValue)||void 0===n?void 0:n.ssn_last4)||this.isEditingIdentification?s("form-control-number-masked",{name:"identification_number",label:this.country===D.CAN?mt[this.country].idNumberLabelOptional:mt[this.country].idNumberLabel,defaultValue:this.isEditingIdentification?"":null===(o=this.representativeDefaultValue)||void 0===o?void 0:o.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:N[this.country],helpText:mt[this.country].identityHelpText}):s("div",null,s("label",{class:"form-label",part:W},this.country===D.CAN?mt[this.country].idNumberLabelOptional:mt[this.country].idNumberLabel),s("div",{class:"input-group mb-3"},s("input",{type:"text",class:"form-control",part:q,value:`****${null===(l=this.representativeDefaultValue)||void 0===l?void 0:l.ssn_last4}`,disabled:!0}),s("button",{class:"btn btn-secondary",type:"button",part:R,onClick:()=>{this.isEditingIdentification=!0,yt(this.formController,{identification_number:"",ssn_last4:null})}},"Change")))),s("div",{key:"0a40679570df7b85faa7530797ebc21ca8794263",class:"col-12"},s("identity-address-form",{key:"5a1590251365260413ab63ce9a417d3d71c71e84",errors:this.errors.address,defaultValues:null===(h=this.representativeDefaultValue)||void 0===h?void 0:h.address,handleFormUpdate:this.onAddressFormUpdate,country:this.country})))))}},Ht=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.formLoading=e(this,"formLoading",7),this.errors={},this.representative={},this.isLoading=!1,this.getData=()=>{this.getBusiness&&this.formController&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.representative=new I(t.data.representative||{}),this.representative.address.country=this.country,this.formController.setInitialValues(Object.assign({},this.representative))},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=t=>{let e;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:s=>{e=s,t()},onError:({error:t,code:s,severity:i})=>{e=t,this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:e,formStep:st.representative}),this.formLoading.emit(!1)}})}}propChanged(){this.initializeApi(),this.getData()}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}componentWillLoad(){this.initializeApi(),this.initializeForm()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=c({authToken:this.authToken,businessId:this.businessId,service:new v}),this.patchBusiness=d({authToken:this.authToken,businessId:this.businessId,service:new v})):this.errorEvent.emit({message:"Missing required props",errorCode:r.MISSING_PROPS,severity:a.ERROR})}initializeForm(){const t=C[this.country];t?(this.formController=new x(t("representative",this.allowOptionalFields)),this.getData()):this.errorEvent.emit({message:"Missing schema for selected country",errorCode:r.MISSING_PROPS,severity:a.ERROR})}componentDidLoad(){this.formController&&this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}get patchPayload(){return{representative:new I(this.formController.values.getValue()).payload}}render(){return!this.formController||this.isLoading?s(X,null):s("business-representative-form-inputs",{representativeDefaultValue:this.formController.getInitialValues(),errors:this.errors,formController:this.formController,country:this.country})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},Pt=class{constructor(s){t(this,s),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.errorEvent=e(this,"error-event",7),this.formLoading=e(this,"formLoading",7),this.formCompleted=e(this,"formCompleted",7),this.errors={},this.fetchData=async()=>{this.formLoading.emit(!0);try{const t=await this.api.get({endpoint:this.businessEndpoint,authToken:this.authToken});this.acceptedTermsBefore=t.data.terms_conditions_accepted}catch(t){this.errorEvent.emit({errorCode:r.FETCH_ERROR,message:t.message,severity:a.ERROR,data:t})}finally{this.formLoading.emit(!1)}},this.sendData=async t=>{this.formLoading.emit(!0);try{const e=this.termsPayload,s=await this.api.post({endpoint:this.termsConditionsEndpoint,body:e,authToken:this.authToken});this.handleResponse(s,t)}catch(t){this.errorEvent.emit({errorCode:r.POST_ERROR,message:t.message,severity:a.ERROR,data:t})}finally{this.formLoading.emit(!1)}},this.inputHandler=(t,e)=>{this.acceptedTerms=e,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}get businessEndpoint(){return`entities/business/${this.businessId}`}get termsConditionsEndpoint(){return"entities/terms_and_conditions"}get formHelperText(){return this.acceptedTermsBefore?"You have already accepted the terms and conditions.":null}get termsPayload(){return{business_id:this.businessId,accepted:this.formController.values.getValue().accepted,user_agent:window.navigator.userAgent}}async componentWillLoad(){this.api=wt(),this.formController=new x((t=>{const e=S({accepted:j().oneOf([!0],"You must agree to the terms and conditions to continue").required("You must agree to the terms and conditions to continue")}),s=S({accepted:j().nullable()});return t?s:e})(this.allowOptionalFields)),this.businessId&&this.authToken&&this.fetchData()}handleResponse(t,e){t.error?this.errorEvent.emit({errorCode:r.POST_ERROR,message:t.error.message,severity:a.ERROR,data:t.error}):e(),this.stepCompleteEvent.emit({response:t,formStep:st.termsAndConditions}),this.formCompleted.emit()}async validateAndSubmit({onSuccess:t}){this.acceptedTermsBefore?(this.stepCompleteEvent.emit({response:null,formStep:st.termsAndConditions,metadata:"no data submitted"}),this.formCompleted.emit(),t()):this.formController.validateAndSubmit((()=>this.sendData(t)))}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}get merchantAgreementLink(){return s("a",{href:"https://justifi.tech/merchant-agreement/",target:"_blank",rel:"noopener noreferrer"},"merchant agreement")}render(){return s("form",{key:"24b0a8ff0187894cf5e0f56e9e4b28c378e720cb"},s("fieldset",{key:"26fa9159dd6d61edd28b9443a10eeb981f150308"},s("legend",{key:"103bdecbc51f2cccd9105e2f9b271b60760618ec",part:M},"Terms and Conditions"),s("hr",{key:"dfd29fbe609a57d8160df7980ed0e63e75934a86"}),s("div",{key:"61e06597ec652c1d7c6e7e2bd8c9b653d061d076"},s("p",{key:"cd4def71580cd14d6edb5887221ebf6aa80cc2ea"},"Please read and accept the ",this.merchantAgreementLink," to submit your provisioning request.")),s("br",{key:"e3c64733f11a4f702e686e6c5ae7acd7e6bd1c34"}),s("div",{key:"71bd74de3aee69805a2aa1297356ff8b8db3c76c",class:"row-gy-3"},s("div",{key:"94a28c13e3bbc1c89cd1b5ebde2e1732b48f99ea",class:"col-12"},s("form-control-checkbox",{key:"fee95fa42192fee1bbfd544307b4e1c11c0d97f4",name:"accepted",label:"I agree to the terms and conditions",inputHandler:this.inputHandler,errorText:this.errors.accepted,disabled:this.acceptedTermsBefore,helpText:this.formHelperText,checked:this.acceptedTerms})))))}},Bt=[{label:"Select a document type",value:""},{label:"Voided Check",value:"voided_check"},{label:"Bank Statement",value:"bank_statement"}],Nt=[{label:"Select a document type",value:""},{label:"Canadian Passport",value:"passport"},{label:"Canadian Driver's License",value:"driver_license"},{label:"Canadian Government Issued ID Card",value:"government_id"},{label:"Permanent Resident Card",value:"resident_card"},{label:"Certificate of Indian Status",value:"status_card"},{label:"US State Issued Driver's License",value:"driver_license"}],Mt=[{label:"Select a document type",value:""},{label:"Nexus Card (Photo ID)",value:"nexus_card"},{label:"Canadian Citizenship/Naturalization Card or Certificate",value:"citizenship_card"},{label:"Foreign Passport",value:"foreign_passport"},{label:"Canadian Birth Certificate",value:"birth_certificate"},{label:"Social Insurance Number (SIN) Card",value:"sin_card"},{label:"Social Security Number (SSN) Card",value:"ssn_card"}],Rt=[{label:"Business Document",value:"business_document",docTypeOptions:[{label:"Select a document type",value:""},{label:"Articles of Incorporation",value:"articles_of_incorporation"},{label:"Business Registration",value:"business_registration"}]},{label:"Financial Document",value:"financial_document",docTypeOptions:Bt}];function Ft(t){const e=Nt.filter((t=>""!==t.value)),s=Mt.filter((t=>""!==t.value));return t.map((t=>({label:`${t.name} - Identity Document`,value:`personal_${t.id}`,identityId:t.id,docTypeOptions:[{label:"Select a document type",value:""},{label:"── Group 1 ──",value:"_group1_header"},...e,{label:"── Group 2 ──",value:"_group2_header"},...s]})))}const Wt=[{label:"Financial Document",value:"financial_document",docTypeOptions:Bt}],qt=new Set(Nt.filter((t=>t.value)).map((t=>t.value))),zt=new Set(Mt.filter((t=>t.value)).map((t=>t.value))),Ut=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.formLoading=e(this,"formLoading",7),this.owners=[],this.existingDocuments=[],this.selectedCategory="",this.selectedDocType="",this.uploadQueue=[],this.isLoading=!1,this.errors={},this.fileInputKey=0,this.categories=[],this.getData=()=>{this.isLoading=!0,this.getBusiness({onSuccess:t=>{const{owners:e,documents:s}=t.data;this.owners=e||[],this.existingDocuments=s||[],this.categories=function(t,e){return e===D.USA?Wt:[...Rt,...Ft(t)]}(this.owners,this.country)},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.isLoading=!1}})},this.handleCategoryChange=(t,e)=>{this.selectedCategory=e,this.selectedDocType=""},this.handleDocTypeChange=(t,e)=>{e.startsWith("_")&&e.endsWith("_header")||(this.selectedDocType=e)},this.handleFileSelected=async t=>{const e=Array.from(t.detail.fileList),s=this.categories.find((t=>t.value===this.selectedCategory));if(!s)return;const i=s.docTypeOptions.find((t=>t.value===this.selectedDocType)),a=(null==i?void 0:i.label)||this.selectedDocType,r=e.map((t=>({categoryLabel:s.label,categoryValue:s.value,docTypeLabel:a,docTypeValue:this.selectedDocType,fileName:t.name,file:t,identityId:s.identityId,status:"uploading"}))),o=this.uploadQueue.length;this.uploadQueue=[...this.uploadQueue,...r],this.selectedCategory="",this.selectedDocType="",this.fileInputKey++,await Promise.all(r.map((async(t,e)=>{const s=o+e;try{const e=new n({file:t.file,document_type:t.docTypeValue},this.businessId,t.identityId);if(!await this.postDocumentRecordData(e))return void(this.uploadQueue=this.uploadQueue.map(((t,e)=>e===s?Object.assign(Object.assign({},t),{status:"error"}):t)));const i=await this.uploadDocument(e);this.uploadQueue=this.uploadQueue.map(((t,e)=>e===s?Object.assign(Object.assign({},t),{status:i?"uploaded":"error"}):t))}catch(t){this.uploadQueue=this.uploadQueue.map(((t,e)=>e===s?Object.assign(Object.assign({},t),{status:"error"}):t))}})))},this.postDocumentRecordData=async t=>{const e=t.record_data;return new Promise((s=>{this.postDocumentRecord({payload:e,onSuccess:e=>{s(this.handleDocRecordResponse(t,e))},onError:({error:t,code:e,severity:i})=>{this.errorEvent.emit({message:t,errorCode:e,severity:i}),s(!1)}})}))},this.handleDocRecordResponse=(t,e)=>e.error?(this.errorEvent.emit({errorCode:r.POST_ERROR,message:e.error.message,severity:a.ERROR,data:e.error}),!1):(t.setPresignedUrl(e.data.presigned_url),!0),this.uploadDocument=async t=>{if(!t.presigned_url)throw new Error("Presigned URL is not set");const e=await t.getFileData();return!!(await fetch(t.presigned_url,{method:"PUT",body:e})).ok||(this.errorEvent.emit({errorCode:r.POST_ERROR,message:"Failed to upload document",severity:a.ERROR}),!1)}}propChanged(){this.initializeApi()}watchHandler(t){this.formLoading.emit(t)}async validateAndSubmit({onSuccess:t}){const e=this.validate();Object.keys(e).length>0?this.errors=e:(this.errors={},this.stepCompleteEvent.emit({response:null,formStep:st.documentUpload}),t())}componentWillLoad(){this.initializeApi(),this.getBusiness&&this.getData()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=c({authToken:this.authToken,businessId:this.businessId,service:new v}),this.postDocumentRecord=m({authToken:this.authToken,service:new g})):this.errorEvent.emit({message:"Missing required props",errorCode:r.MISSING_PROPS,severity:a.ERROR})}get categoryOptions(){return[{label:"Select a category",value:""},...this.categories.map((t=>({label:t.label,value:t.value})))]}get docTypeOptions(){if(!this.selectedCategory)return[{label:"Select a category first",value:""}];const t=this.categories.find((t=>t.value===this.selectedCategory));return(null==t?void 0:t.docTypeOptions)||[{label:"Select a category first",value:""}]}validate(){if(this.allowOptionalFields)return{};const t={},e=t=>this.existingDocuments.some((e=>t.includes(e.document_type))),s=t=>this.uploadQueue.some((e=>e.categoryValue===t&&"uploaded"===e.status));if(s("financial_document")||e(["voided_check","bank_statement"])||(t.financial_document="Please upload a financial document"),this.country===D.CAN){const i=["articles_of_incorporation","business_registration"];s("business_document")||e(i)||(t.business_document="Please upload a business document");for(const e of this.owners){const s=`personal_${e.id}`,i=this.uploadQueue.filter((t=>t.categoryValue===s&&"uploaded"===t.status)),a=i.some((t=>qt.has(t.docTypeValue))),r=i.some((t=>zt.has(t.docTypeValue)));a||(t[`personal_group1_${e.id}`]=`Please upload a Group 1 identity document for ${e.name}`),r||(t[`personal_group2_${e.id}`]=`Please upload a Group 2 identity document for ${e.name}`)}}return t}render(){return this.isLoading?s(X,null):s("form",null,s("fieldset",null,s("legend",{class:"mb-0",part:M},"Document Uploads"),s("hr",{class:"mt-2"}),s("business-documents-on-file",{documents:this.existingDocuments,isLoading:this.isLoading})),s("fieldset",{class:"mt-4"},s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:M},"Add Document"),s("form-control-tooltip",{helpText:"Upload documents one at a time. Select the category and type, then choose a file. For identity documents, two documents from different groups are required per owner."})),s("hr",{class:"mt-2"}),s("div",{class:"row gy-3"},s("div",{class:"col-12 col-md-6"},s("form-control-select",{name:"document_category",label:"Document Category",options:this.categoryOptions,defaultValue:this.selectedCategory,inputHandler:this.handleCategoryChange})),s("div",{class:"col-12 col-md-6"},s("form-control-select",{name:"document_type",label:"Document Type",options:this.docTypeOptions,defaultValue:this.selectedDocType,inputHandler:this.handleDocTypeChange,disabled:!this.selectedCategory})),s("div",{class:"col-12"},s("form-control-file",{key:this.fileInputKey,name:"document_file",label:"Upload Document",documentType:this.selectedDocType,onFileSelected:this.handleFileSelected,disabled:!this.selectedDocType,multiple:!1})))),s("document-upload-list",{documents:this.uploadQueue}),Object.keys(this.errors).length>0&&s("div",{class:"alert alert-danger mt-3"},s("ul",{class:"mb-0"},Object.values(this.errors).map((t=>s("li",null,t))))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],isLoading:["watchHandler"]}}},Zt=class{constructor(e){t(this,e),this.documents=[]}renderStatus(t){switch(t){case"uploading":return s("span",{class:"badge bg-info"},"Uploading...");case"uploaded":return s("span",{class:"badge bg-success"},"Uploaded");case"error":return s("span",{class:"badge bg-danger"},"Error")}}render(){return this.documents.length?s("div",{class:"mt-4"},s("div",{class:"card",part:z},s("div",{class:"card-body"},s("h5",{class:"card-title",part:M},"Uploaded Documents"),s("div",{class:"table-responsive"},s("table",{class:"table table-sm table-borderless",part:U},s("thead",null,s("tr",null,s("th",{style:{width:"25%"},part:Z,scope:"col"},"Category"),s("th",{style:{width:"25%"},part:Z,scope:"col"},"Document Type"),s("th",{style:{width:"30%"},part:Z,scope:"col"},"File Name"),s("th",{style:{width:"20%"},part:Z,scope:"col"},"Status"))),s("tbody",null,this.documents.map(((t,e)=>s("tr",{class:0===e?"border-bottom border-top":"border-bottom"},s("td",{part:Y},t.categoryLabel),s("td",{part:Y},t.docTypeLabel),s("td",{part:Y},t.fileName),s("td",{part:Y},this.renderStatus(t.status))))))))))):null}},Yt=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.formLoading=e(this,"formLoading",7),this.errors={},this.legal_address={},this.isLoading=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{const e=new V((t.data||{}).legal_address||{});this.legal_address=Object.assign(Object.assign({},e),{country:this.country}),this.formController.setInitialValues(Object.assign({},this.legal_address))},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=t=>{let e;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:s=>{e=s,t()},onError:({error:t,code:s,severity:i})=>{e=t,this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:e,formStep:st.legalAddress}),this.formLoading.emit(!1)}})},this.inputHandler=(t,e)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return{legal_address:new V(this.formController.values.getValue()).payload}}componentWillLoad(){this.initializeApi(),this.formController=new x((0,L[this.country])(this.allowOptionalFields)),this.getData()}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=c({authToken:this.authToken,businessId:this.businessId,service:new v}),this.patchBusiness=d({authToken:this.authToken,businessId:this.businessId,service:new v})):this.errorEvent.emit({message:"Missing required props",errorCode:r.MISSING_PROPS,severity:a.ERROR})}render(){var t;const e=null===(t=this.formController)||void 0===t?void 0:t.getInitialValues();return this.isLoading?s(X,null):s("form",null,s("fieldset",null,s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:M},"Legal Address of your Business"),s("form-control-tooltip",{helpText:"No PO Boxes."})),s("hr",{class:"mt-2"}),s("form-address-fields",{country:this.country,errors:this.errors,defaultValues:e,inputHandler:this.inputHandler})))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},$t=class{loadingWatcher(){this.formLoading.emit(this.isLoading)}constructor(s){t(this,s),this.clickEvent=e(this,"click-event",7),this.errorEvent=e(this,"error-event",7),this.formLoading=e(this,"formLoading",7),this.ownerSubmitted=e(this,"ownerSubmitted",7),this.isLoading=!1,this.errors={},this.owner={},this.getData=()=>{this.getOwner&&(this.isLoading=!0,this.getOwner({onSuccess:t=>{this.instantiateOwner(t.data)},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>this.isLoading=!1}))},this.sendData=()=>(this.isLoading=!0,new Promise((t=>{this.ownerId?this.patchOwner({payload:this.payload,onSuccess:e=>{this.ownerSubmitted.emit({id:e.data.id}),this.instantiateOwner(e.data),t(!0)},onError:({error:e,code:s,severity:i})=>{this.errorEvent.emit({message:e,errorCode:s,severity:i}),t(!1)},final:()=>this.isLoading=!1}):this.postOwner({payload:this.payload,onSuccess:e=>{this.ownerSubmitted.emit({id:e.data.id}),this.instantiateOwner(e.data),t(!0)},onError:({error:e,code:s,severity:i})=>{this.errorEvent.emit({message:e,errorCode:s,severity:i}),t(!1)},final:()=>this.isLoading=!1})}))),this.instantiateOwner=async t=>{this.owner=Object.assign({},new H(t)),await this.formController.setInitialValues(this.owner)},this.handleAddOwner=()=>{this.clickEvent.emit({name:this.ownerId?it.updateOwner:it.addOwner})},this.handleRemoveOwner=()=>{this.removeOwner(this.ownerId),this.clickEvent.emit({name:it.removeOwner})},this.validate=this.validate.bind(this),this.submit=this.submit.bind(this),this.validateAndSubmit=this.validateAndSubmit.bind(this)}async returnOwnerData(){return this.ownerId}async getOwnershipPercentage(){var t;return(null===(t=this.formController.values.getValue())||void 0===t?void 0:t.ownership_percentage)||null}async setOwnershipPercentageError(t){this.formController.setFieldError("ownership_percentage",t)}async validate(){return this.formController.validate()}async submit(){if(await this.validate())return this.sendData()}async validateAndSubmit(t){t.preventDefault(),await this.validate()&&this.submit()}get payload(){const t=new H(this.formController.values.getValue()).payload;return this.ownerId?t:Object.assign(Object.assign({},t),{business_id:this.businessId})}get formTitle(){return this.ownerId?"Edit Business Owner":"Add Business Owner"}get submitButtonText(){return this.ownerId?"Update":"Add"}get showRemoveButton(){return!(this.ownersLength<=1)&&(!(this.ownerId||!this.newFormOpen)||!(!this.ownerId||this.newFormOpen)||void 0)}componentWillLoad(){this.formController=new x((0,C[this.country])("owner",this.allowOptionalFields)),this.initializeApi(),this.ownerId&&this.getOwner?this.getData():this.instantiateOwner({})}componentDidLoad(){this.formController.errors.subscribe((t=>this.errors=Object.assign({},t)))}initializeApi(){this.authToken&&(this.getOwner=b({authToken:this.authToken,identityId:this.ownerId,service:new k}),this.patchOwner=p({authToken:this.authToken,identityId:this.ownerId,service:new k}),this.postOwner=f({authToken:this.authToken,service:new k}))}render(){return s(i,{key:"b168e9f5a52416984e6a04ab5f0771b63ee28b2e",style:{display:"block"}},s("form",{key:"d22a6aae3f5debd30d87b3bd37c67390a46c4590",onSubmit:this.validateAndSubmit},s("fieldset",{key:"30597bc1f4983bddbdc0ed45e6be7e715d0b9b8e"},s("legend",{key:"508f2a777bd0422572002053f6c167242252850d",class:"fw-semibold fs-5",part:G},this.formTitle),s("br",{key:"2dd17c21e931a2a9c15489828c7d1d0542ff4de4"}),s("div",{key:"e9d7d7a10546e5e1bdabb0a994d994c47cd77bd6",class:"row gy-3"},s("owner-form-inputs",{key:"e556391c25a05d3f89601f1e0ac3834a5c26becd",ownerDefaultValue:this.formController.getInitialValues(),errors:this.errors,formController:this.formController,country:this.country}),s("div",{key:"48eb9390459f2ca619914e54726c9a0ae1290e31",class:"d-flex gap-2 justify-content-start"},s(ut,{key:"f9ccd8732981cdec9675332cc8f5c14d4938cbad",variant:"secondary",type:"button",onClick:this.handleRemoveOwner,hidden:!this.showRemoveButton},"Remove"),s(ut,{key:"607a54ce6c4c0af42f3f8c7cbe1374a69752eca3",variant:"primary",type:"submit",onClick:this.handleAddOwner,disabled:this.isLoading},this.submitButtonText))),s("hr",{key:"9ec1f815d8c3335daf2a4f98c2679930e22956e3"}))))}static get watchers(){return{isLoading:["loadingWatcher"]}}},Gt=class{constructor(s){t(this,s),this.plaidVerificationSuccess=e(this,"plaidVerificationSuccess",7),this.plaidVerificationError=e(this,"plaidVerificationError",7),this.linkToken=null,this.linkTokenId=null,this.plaidLink=null,this.isAuthenticating=!1,this.isSuccess=!1,this.error=null,this.isLoading=!1,this.plaidService=new Tt,this.abortController=null,this.timeoutId=null,this.initializePlaidLink=async()=>{try{if(void 0===window.Plaid)return void this.handleError({code:h.PLAID_SDK_LOAD_FAILED,message:l[h.PLAID_SDK_LOAD_FAILED],severity:o[h.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"});if(await this.getLinkToken(),!this.linkToken)return void this.handleError({code:h.PLAID_LINK_TOKEN_FAILED,message:l[h.PLAID_LINK_TOKEN_FAILED],severity:o[h.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:h.PLAID_LINK_INIT_FAILED,message:l[h.PLAID_LINK_INIT_FAILED],severity:o[h.PLAID_LINK_INIT_FAILED],originalError:t,retryable:!0,userAction:"Click to try again"})}},this.getLinkToken=async()=>{var t,e,s,i;try{if(!this.authToken||!this.accountId)return void this.handleError({code:h.PLAID_LINK_TOKEN_FAILED,message:"Missing authentication. Please provide authToken and accountId.",severity:a.ERROR,retryable:!1,userAction:"Provide required props"});this.abortController=new AbortController,this.timeoutId=setTimeout((()=>{var t;null===(t=this.abortController)||void 0===t||t.abort()}),3e4);const t=await this.plaidService.getLinkTokenForVerification(this.authToken,this.businessId,this.abortController.signal);if(this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),t.error)throw new Error("string"==typeof t.error?t.error:t.error.message||"Failed to get link token");this.linkToken=t.data.link_token,this.linkTokenId=t.data.id}catch(a){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null);let r=h.PLAID_LINK_TOKEN_FAILED,n=l[r],c=!0;"AbortError"===a.name?(r=h.PLAID_TIMEOUT,n=l[r],c=!0):(null===(t=a.message)||void 0===t?void 0:t.includes("network"))||(null===(e=a.message)||void 0===e?void 0:e.includes("fetch"))?(r=h.PLAID_NETWORK_ERROR,n=l[r],c=!0):((null===(s=a.message)||void 0===s?void 0:s.includes("401"))||(null===(i=a.message)||void 0===i?void 0:i.includes("unauthorized")))&&(r=h.PLAID_INVALID_CREDENTIALS,n="Authentication failed. Please check your credentials.",c=!1),this.handleError({code:r,message:n,severity:o[r],originalError:a,retryable:c,userAction:c?"Click to try again":"Check your credentials"})}},this.openPlaidLink=()=>{this.plaidLink&&this.linkToken&&(this.isAuthenticating=!0,this.clearError(),this.plaidLink.open())},this.handlePlaidSuccess=async t=>{var e;this.isAuthenticating=!1,this.isLoading=!0,this.clearError();try{const s=await this.plaidService.postPlaidVerifiedBankAccountData(this.authToken,this.businessId,{public_token:t,link_token_id:this.linkTokenId},null===(e=this.abortController)||void 0===e?void 0:e.signal);if(s.error)throw new Error("string"==typeof s.error?s.error:s.error.message||"Failed to verify bank account");this.isSuccess=!0,this.isLoading=!1,this.plaidVerificationSuccess.emit({publicToken:t,bankAccount:s.data})}catch(t){this.isLoading=!1,this.handleError({code:h.PLAID_AUTHENTICATION_FAILED,message:(null==t?void 0:t.message)||"Failed to verify bank account",severity:o[h.PLAID_AUTHENTICATION_FAILED],originalError:t,retryable:!0,userAction:"Click to try again"})}},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=h.PLAID_AUTHENTICATION_FAILED,s=l[e],i=!0,a="Click to try again";if(t.error_code)switch(t.error_code){case"INVALID_CREDENTIALS":e=h.PLAID_INVALID_CREDENTIALS,s=l[e],i=!0;break;case"ITEM_LOGIN_REQUIRED":e=h.PLAID_INVALID_CREDENTIALS,s="Your bank requires re-authentication. Please try again.",i=!0;break;case"ITEM_LOCKED":e=h.PLAID_ACCOUNT_LOCKED,s=l[e],i=!1,a="Contact your bank";break;case"INSTITUTION_NOT_RESPONDING":e=h.PLAID_MAINTENANCE,s=l[e],i=!0;break;case"RATE_LIMIT_EXCEEDED":e=h.PLAID_RATE_LIMITED,s=l[e],i=!0;break;default:t.error_message&&(s=t.error_message)}this.handleError({code:e,message:s,severity:o[e],originalError:t,retryable:i,userAction:a}),this.isAuthenticating=!1},this.handleError=t=>{this.error=t,this.isLoading=!1,this.plaidVerificationError.emit(t),console.error("Plaid verification error:",t)},this.clearError=()=>{this.error&&(this.error=null)}}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.initializePlaidLink()},this.scriptRef.onerror=()=>{this.handleError({code:h.PLAID_SDK_LOAD_FAILED,message:l[h.PLAID_SDK_LOAD_FAILED],severity:o[h.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"})})}disconnectedCallback(){this.timeoutId&&clearTimeout(this.timeoutId),this.abortController&&this.abortController.abort()}render(){const t=s("svg",{class:"plaid-logo-img",height:"20",width:"20",viewBox:"0 0 28 29",xmlns:"http://www.w3.org/2000/svg",style:{display:"inline",marginLeft:"5px",marginRight:"5px",marginTop:"-2px"}},s("g",{fill:"#fff","fill-rule":"evenodd"},s("path",{d:"M25.7629 26.2628L28 17.5309L24.9691 14.5001L27.9999 11.4691L25.7628 2.73706L17.0309 0.5L14.0001 3.531L10.969 0.50014L2.23706 2.73734L0 11.4691L3.03128 14.4999L0.00014 17.531L2.2372 26.2629L10.9691 28.5L14.0001 25.469L17.031 28.4999L25.7629 26.2628ZM15.7321 23.7371L18.6186 20.8505L22.2912 24.5233L17.6956 25.7007L15.7321 23.7371ZM11.1136 9.88154L14.0003 6.99502L16.8868 9.8814L14.0001 12.7679L11.1136 9.88154ZM12.2682 14.5L9.38154 17.3865L6.49502 14.5L9.38154 11.6135L12.2682 14.5ZM18.6187 11.6133L21.5053 14.5L18.6186 17.3865L15.7321 14.5L18.6187 11.6133ZM16.8867 19.1186L14.0001 22.0051L11.1135 19.1185L14.0001 16.2319L16.8867 19.1186ZM10.3044 25.7007L5.70864 24.5233L9.38154 20.8504L12.2682 23.7371L10.3044 25.7007ZM4.76308 16.2319L7.6496 19.1185L3.9767 22.7914L2.7993 18.1957L4.76308 16.2319ZM3.9767 6.20836L7.64974 9.8814L4.76308 12.7681L2.7993 10.8041L3.9767 6.20836ZM12.2683 5.26294L9.38168 8.1496L5.70892 4.4767L10.3047 3.2993L12.2683 5.26294ZM17.6959 3.2993L22.2915 4.4767L18.6186 8.14946L15.7321 5.26294L17.6959 3.2993ZM23.2372 12.7681L20.3505 9.8814L24.0233 6.20878L25.2007 10.8046L23.2372 12.7681ZM24.0233 22.7914L20.3505 19.1186L23.2372 16.2321L25.2007 18.1957L24.0233 22.7914Z"})));return s(_t,null,s("script",{src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",async:!0,ref:t=>this.scriptRef=t}),s("div",null,s("div",{class:"mb-3"},s(ut,{variant:"primary",type:"button",onClick:t=>{t.preventDefault(),this.openPlaidLink()},disabled:this.isLoading,part:Q},"Connect with Plaid ",t," (instant verification)")),(()=>this.error?s("div",{class:(this.error.severity===a.ERROR?"text-danger":this.error.severity===a.WARNING?"text-warning":"text-info")+" mt-2"},s("small",null,this.error.message),s("br",null),this.error.userAction&&s("small",{class:"text-muted"},this.error.userAction)):null)(),(()=>this.error?null:this.isLoading?s("div",{class:"text-info mt-2"},s("small",null,"Verifying bank account...")):this.isSuccess?s("div",{class:"text-success mt-2"},s("small",null,"✓ Bank account verified successfully")):this.isAuthenticating?s("div",{class:"text-info mt-2"},s("small",null,"Connecting to your bank...")):null)()))}};export{Lt as additional_questions_form_step,xt as bank_account_form_inputs,St as bank_account_form_inputs_canada,At as business_bank_account_form_step,Dt as business_core_info_form_step,Et as business_documents_on_file,It as business_owners_form_step,Vt as business_representative_form_inputs,Ht as business_representative_form_step,Pt as business_terms_conditions_form_step,Ut as document_upload_form_step,Zt as document_upload_list,Yt as legal_address_form_step,$t as owner_form,Gt as plaid_verification}
|