@justifi/webcomponents 6.12.6 → 6.12.7-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-CuYtRPw5.js → Analytics-GZGMuFW6.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-CPWLIT6P.js → check-pkg-version-FPtenLmp.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-Dxjq_cJI.js → package-C7Z9XAuc.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-CwckfiSK.js → Analytics-D-apOWeY.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-Dy2NK3Nn.js → check-pkg-version-Bn8HCDRp.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-DAZd_gFd.js → package-D6Pw5qJ5.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-4b39a470.entry.js → p-01ed8fb5.entry.js} +1 -1
- package/dist/webcomponents/{p-07eaee91.entry.js → p-0290ca0f.entry.js} +1 -1
- package/dist/webcomponents/{p-e02d7751.entry.js → p-0a2be2e2.entry.js} +4 -4
- 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-9d676f54.entry.js → p-1006ab39.entry.js} +1 -1
- package/dist/webcomponents/{p-d5edbea3.entry.js → p-164a4e64.entry.js} +1 -1
- package/dist/webcomponents/{p-bc2dddf3.entry.js → p-1841ee76.entry.js} +1 -1
- package/dist/webcomponents/{p-d01a1076.entry.js → p-188a7ebd.entry.js} +1 -1
- package/dist/webcomponents/{p-b62ff001.entry.js → p-1e34c488.entry.js} +1 -1
- package/dist/webcomponents/{p-a56e43a1.entry.js → p-1e5c96f3.entry.js} +1 -1
- package/dist/webcomponents/{p-b21010cb.entry.js → p-233fef57.entry.js} +1 -1
- package/dist/webcomponents/p-2e5ec91e.entry.js +1 -0
- package/dist/webcomponents/{p-41637e4a.entry.js → p-374ce853.entry.js} +1 -1
- package/dist/webcomponents/p-37676092.entry.js +1 -0
- package/dist/webcomponents/{p-78c4668b.entry.js → p-3c3fbcca.entry.js} +1 -1
- package/dist/webcomponents/{p-c4767c7b.entry.js → p-3e10a0de.entry.js} +1 -1
- package/dist/webcomponents/{p-e07506b7.entry.js → p-4673d7d3.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-38209a25.entry.js → p-5ceeaa73.entry.js} +1 -1
- package/dist/webcomponents/{p-a9e82502.entry.js → p-6089f91c.entry.js} +1 -1
- package/dist/webcomponents/{p-b8351983.entry.js → p-60a0bf1e.entry.js} +1 -1
- package/dist/webcomponents/{p-cf3e3394.entry.js → p-63a35210.entry.js} +1 -1
- package/dist/webcomponents/{p-08ab97ce.entry.js → p-641c9bdb.entry.js} +1 -1
- package/dist/webcomponents/{p-8e56430a.entry.js → p-74aeb76a.entry.js} +1 -1
- package/dist/webcomponents/{p-1f34b2f7.entry.js → p-80fdd013.entry.js} +1 -1
- package/dist/webcomponents/{p-3ef07f42.entry.js → p-84aaf298.entry.js} +1 -1
- package/dist/webcomponents/{p-4ee55e7d.entry.js → p-8a5f0d71.entry.js} +1 -1
- package/dist/webcomponents/{p-9153c121.entry.js → p-947950cc.entry.js} +1 -1
- package/dist/webcomponents/p-98476956.entry.js +1 -0
- package/dist/webcomponents/{p-a2c25cc4.entry.js → p-99792da6.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-fE5A37L5.js → p-Cz0yhyYu.js} +1 -1
- package/dist/webcomponents/p-D6Pw5qJ5.js +1 -0
- package/dist/webcomponents/p-D9ZHVy-j.js +1 -0
- package/dist/webcomponents/{p-BdpSLMs7.js → p-D9rCHoO4.js} +1 -1
- 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-DzEdYT8R.js +1 -0
- package/dist/webcomponents/{p-NZS8uCtH.js → p-Dzv0P2Ly.js} +1 -1
- package/dist/webcomponents/{p-Axa3cgnH.js → p-H0ILKMD2.js} +1 -1
- package/dist/webcomponents/{p-a7a1b168.entry.js → p-a3b48ba3.entry.js} +1 -1
- package/dist/webcomponents/{p-ebb7b693.entry.js → p-a3fe126f.entry.js} +1 -1
- package/dist/webcomponents/p-a9976353.entry.js +1 -0
- package/dist/webcomponents/{p-7377f7d1.entry.js → p-ab89cb46.entry.js} +1 -1
- package/dist/webcomponents/{p-d79c5ee4.entry.js → p-b17ce21d.entry.js} +1 -1
- package/dist/webcomponents/{p-2a5ee558.entry.js → p-b5aa3937.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-d7ec0b54.entry.js +1 -0
- package/dist/webcomponents/{p-6904c62c.entry.js → p-e737077f.entry.js} +1 -1
- package/dist/webcomponents/p-eb1b4ead.entry.js +1 -0
- package/dist/webcomponents/{p-279c17ac.entry.js → p-f6be288f.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-034fa691.entry.js +0 -1
- package/dist/webcomponents/p-2aac2ab6.entry.js +0 -1
- package/dist/webcomponents/p-37254105.entry.js +0 -1
- package/dist/webcomponents/p-5G1OMxZz.js +0 -1
- package/dist/webcomponents/p-9b5ca32c.entry.js +0 -1
- package/dist/webcomponents/p-Aacb4jqT.js +0 -1
- package/dist/webcomponents/p-BqNNwq6C.js +0 -1
- package/dist/webcomponents/p-D8ytux5N.js +0 -1
- package/dist/webcomponents/p-DAZd_gFd.js +0 -1
- package/dist/webcomponents/p-DrMJliVY.js +0 -1
- package/dist/webcomponents/p-XIWgia4J.js +0 -1
- package/dist/webcomponents/p-c8bc235f.entry.js +0 -1
- package/dist/webcomponents/p-ea254f14.entry.js +0 -1
- package/dist/webcomponents/p-ff8cf16c.entry.js +0 -1
- package/dist/webcomponents/p-nb_LhbJq.js +0 -1
|
@@ -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}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as e,c as a}from"./p-CV0Pyo1O.js";import{P as s}from"./p-
|
|
1
|
+
import{h as t,r as e,c as a}from"./p-CV0Pyo1O.js";import{P as s}from"./p-n_pmf4AT.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{b as i,C as r,e as o}from"./p-Dzv0P2Ly.js";import{p as n}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import{g as p,a as c}from"./p-CDu7TeCZ.js";import{J as h}from"./p-H0ILKMD2.js";import{c as d}from"./p-D9rCHoO4.js";import{S as m}from"./p-DzEdYT8R.js";import{T as f,a as l,b as u,c as y,d as b,e as g,f as v,g as j,h as C,i as _,j as k,k as w,l as T}from"./p-BICxxa69.js";import{T as D}from"./p-CZfYo5-1.js";import{M as P}from"./p-D1_eip6x.js";import{a as O}from"./p-BRnBHsdq.js";import{a6 as S,a7 as I}from"./p-CPKMvyV_.js";import{o as x,g as A}from"./p-Dm07nLGs.js";import"./p-CYQvLgSs.js";import"./p-D8GTwl9v.js";import"./p-D6Pw5qJ5.js";import"./p-CqiVXthx.js";import"./p-CHw7tICr.js";const E={created_at:()=>t("th",{part:S,scope:"col",title:"The date and time each payment was made"},"Date"),amount:()=>t("th",{part:S,scope:"col",title:"The dollar amount of each payment"},"Amount"),status:()=>t("th",{part:S,scope:"col",title:"The current status of each payment"},"Status"),payment_type:()=>t("th",{part:S,scope:"col",title:"The type of each payment"},"Type"),description:()=>t("th",{part:S,scope:"col",title:"The payment description, if you provided one"},"Description"),payers_name:()=>t("th",{part:S,scope:"col",title:"The name associated with the payment method"},"Account Holder"),last_four_digits:()=>t("th",{part:S,scope:"col",title:"The brand and last 4 digits of the payment method"},"Payment Method"),card_brand:()=>t("th",{part:S,scope:"col",title:"The brand of the payment method"},"Card Brand")},H={created_at:(e,a)=>t("td",{part:I(a)},t("div",{class:"fw-bold"},O(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},O(e.created_at,{showTime:!0}))),amount:(e,a)=>t("td",{part:I(a)},e.formattedPaymentAmount(e.amount)),status:(e,a)=>t("td",{part:I(a)},P(e.status)),payment_type:(e,a)=>t("td",{part:I(a)},e.payment_type),description:(e,a)=>t("td",{part:I(a)},e.description),payers_name:(e,a)=>t("td",{part:I(a)},e.payers_name),last_four_digits:(e,a)=>t("td",{part:I(a)},e.last_four_digits),card_brand:(e,a)=>{var s,i,r;return t("td",{part:I(a)},(r=(null===(s=e.payment_method.card)||void 0===s?void 0:s.brand)||(null===(i=e.payment_method.bank_account)||void 0===i?void 0:i.brand))?{visa:"VISA",mastercard:"Mastercard",american_express:"American Express",discover:"Discover",diners_club:"Diners Club",jcb:"JCB",china_unionpay:"China UnionPay",unknown:"Unknown"}[r.toLowerCase()]||r:"N/A")}},L=class{constructor(t){e(this,t),this.errorEvent=a(this,"error-event",7),this.clickEvent=a(this,"click-event",7),this.errorMessage=null,this.payments=[],this.loading=!0,this.paging=n,this.pagingParams={},this.columns="created_at,amount,status,payment_type,description,payers_name,last_four_digits,card_brand",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.payments.find((t=>t.id===e));this.clickEvent.emit({name:D.row,data:a})}}componentWillLoad(){d(),this.analytics=new h(this),this.paymentsTable=new f(this.payments,this.columns,E,H),this.initializeGetPayments(),x("set",(()=>{this.pagingParams={},this.errorMessage=""})),x("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetPayments()}updateOnPropChange(){this.fetchData()}initializeGetPayments(){this.accountId&&this.authToken?this.getPayments=(({id:t,authToken:e,service:a})=>async({params:s,onSuccess:o,onError:n,final:h})=>{var d,m;try{const h=await a.fetchPayments(t,e,s);if(h.error)return n({error:c(h.error),code:p(null===(m=h.error)||void 0===m?void 0:m.code),severity:r.ERROR});{const t=Object.assign({},h.page_info);o({payments:(null===(d=h.data)||void 0===d?void 0:d.map((t=>new i(t))))||[],pagingInfo:t})}}catch(t){const e=p(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:r.ERROR})}finally{return h()}})({id:this.accountId,authToken:this.authToken,service:new s}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:this.errorMessage,severity:r.ERROR}))}fetchData(){this.getPayments&&(this.loading=!0,this.getPayments({params:this.paymentParams,onSuccess:({payments:t,pagingInfo:e})=>{this.payments=t,this.paging=e,this.paymentsTable.collectionData=this.payments},onError:({error:t,code:e,severity:a})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:a})},final:()=>{this.loading=!1}}))}get paymentParams(){const t=A();return Object.assign(Object.assign({},t),this.pagingParams)}get entityId(){return this.payments.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.paymentsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return t(m,{key:"66f641cbde94ea4332bef30308047ecc98cf6476"},t(l,{key:"5d5d4190722ddf09e31de6d680b3df248b41325c"},t(u,{key:"b5ab4878004d4911129941cd48a85564cada1f87"},t(y,{key:"14aeb8df18cdde57c028d741f11a011060c0b1b4"},t(b,{key:"ba5a4643b5fff9c0f9975ae5d350f9db8cc5d7b2"},this.paymentsTable.columnData.map((t=>t)))),t(g,{key:"0b26316eb9193cab9001a31a7f268cd5156d13e3"},t(v,{key:"37c3545775d6e1586af72baf195f6a861fba0081",columnSpan:this.paymentsTable.columnData.length,isLoading:this.loading}),t(j,{key:"e3cde204ba86bab4813d6a06f948532c30271bb9",isEmpty:this.showEmptyState,columnSpan:this.paymentsTable.columnData.length}),t(C,{key:"202602af08813968a81743c8966ecb17e3a67043",columnSpan:this.paymentsTable.columnData.length,errorMessage:this.errorMessage}),this.showRowData&&this.paymentsTable.rowData.map(((e,a)=>t(_,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(k,{key:"b59fa3315491975cf7e5dd0ec26a4b1e0574438c"},t(w,{key:"e974cf1d3ec92fa89139982030791d69e6d02b10"},t(T,{key:"74405261ad2cae3dc6267aab06ec1dd81f4d4ba8",colSpan:this.paymentsTable.columnData.length},t("pagination-menu",{key:"cdcca8506afafb661d0c90ffe9a09f41f94a0862",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"],pagingParams:["updateOnPropChange"],getPayments:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{L as justifi_payments_list}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as s,c as e}from"./p-CV0Pyo1O.js";import{i as a,C as i,e as o}from"./p-
|
|
1
|
+
import{h as t,r as s,c as e}from"./p-CV0Pyo1O.js";import{i as a,C as i,e as o}from"./p-Dzv0P2Ly.js";import{J as r}from"./p-H0ILKMD2.js";import{c as h}from"./p-D9rCHoO4.js";import{P as c}from"./p-DdeBubpX.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{p as n}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import{g as p,a as d}from"./p-CDu7TeCZ.js";import{M as u,m}from"./p-czJ2qSU1.js";import{m as l,S as f}from"./p-C-zuQNNP.js";import{S as y}from"./p-DzEdYT8R.js";import{T as b,a as v,b as g,c as C,d as j,e as _,f as w,g as k,h as S,i as T,j as P,k as D,l as O}from"./p-BICxxa69.js";import{T as A}from"./p-CZfYo5-1.js";import{a as I}from"./p-BRnBHsdq.js";import{a6 as E,a7 as V}from"./p-CPKMvyV_.js";import{o as z,g as x}from"./p-AMVhBsGv.js";import"./p-D6Pw5qJ5.js";import"./p-CYQvLgSs.js";import"./p-D8GTwl9v.js";import"./p-CHw7tICr.js";import"./p-CqiVXthx.js";const B={created_at:()=>t("th",{part:E,scope:"col",title:"The date the payout was deposited"},"Created"),sub_account_name:()=>t("th",{part:E,scope:"col",title:"The sub account associated with the payout"},"Sub Account"),payments_total:()=>t("th",{part:E,scope:"col",title:"The total payments amount associated with the payout"},"Payments"),refunds_total:()=>t("th",{part:E,scope:"col",title:"The total refunds amount associated with the payout"},"Refunds"),fees_total:()=>t("th",{part:E,scope:"col",title:"The total fees amount associated with the payout"},"Fees"),other_total:()=>t("th",{part:E,scope:"col",title:"The total other amount"},"Other"),amount:()=>t("th",{part:E,scope:"col",title:"The total amount of the payout"},"Amount"),status:()=>t("th",{part:E,scope:"col",title:"The real-time status of each payout"},"Status"),csv:()=>t("th",{part:E,scope:"col",title:"Export CSV"})},H=class{constructor(t){s(this,t),this.errorEvent=e(this,"error-event",7),this.clickEvent=e(this,"click-event",7),this.errorMessage=null,this.payouts=[],this.subAccounts=[],this.loading=!0,this.paging=n,this.pagingParams={},this.columns="created_at,amount,status,payments_total,refunds_total,fees_total,other_total,csv",this.downloadCSV=t=>{this.getPayoutCSV({payoutId:t,onError:()=>{this.errorEvent.emit({errorCode:o.FETCH_ERROR,message:"Failed to download CSV",severity:i.ERROR})}})},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:A.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:A.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr"),e=s.dataset.rowEntityId;if(!e)return;if(s.querySelector("a")===t.target)return;const a=this.payouts.find((t=>t.id===e));this.clickEvent.emit({name:A.row,data:a})}}componentWillLoad(){var s;h(),this.analytics=new r(this),this.initializeGetData(),this.payoutsTable=new b(this.payouts,this.columns,B,(s=this.downloadCSV,{created_at:(s,e)=>t("td",{part:V(e)},t("div",{class:"fw-bold"},I(s.created_at,{showDisplayDate:!0}))),sub_account_name:(s,e)=>t("td",{part:V(e)},s.sub_account_name),payments_total:(s,e)=>t("td",{part:V(e)},s.formattedPaymentAmount(s.payments_total)),refunds_total:(s,e)=>t("td",{part:V(e)},s.formattedPaymentAmount(s.refunds_total)),fees_total:(s,e)=>t("td",{part:V(e)},s.formattedPaymentAmount(s.fees_total)),other_total:(s,e)=>t("td",{part:V(e)},s.formattedPaymentAmount(s.other_total)),amount:(s,e)=>t("td",{part:V(e)},s.formattedPaymentAmount(s.amount)),status:(s,e)=>t("td",{part:V(e)},u(s.status)),csv:(e,a)=>t("td",{part:V(a)},t("a",{href:"#",onClick:t=>{t.preventDefault(),s(e.id)}},"CSV"))})),this.getPayouts&&this.getSubAccounts&&this.fetchData(),z("set",(()=>{this.pagingParams={}})),z("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}updateOnPropChange(){this.fetchData()}initializeGetData(){this.initializePayoutsServices(),this.initializeGetSubAccounts()}initializePayoutsServices(){if(this.accountId&&this.authToken){const t={id:this.accountId,authToken:this.authToken,service:new c};this.getPayouts=(({id:t,authToken:s,service:e})=>async({params:o,onSuccess:r,onError:h})=>{var c,n;try{const u=await e.fetchPayouts(t,s,o);if(u.error)return h({error:d(u.error),code:p(null===(n=u.error)||void 0===n?void 0:n.code),severity:i.ERROR});{const t=Object.assign({},u.page_info);r({payouts:(null===(c=u.data)||void 0===c?void 0:c.map((t=>new a(t))))||[],pagingInfo:t})}}catch(t){const s=p(null==t?void 0:t.code);return h({error:t.message||t,code:s,severity:i.ERROR})}})(t),this.getPayoutCSV=m(t)}else this.errorMessage="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=l({primaryAccountId:this.accountId,authToken:this.authToken,service:new f}))}fetchData(){this.loading=!0,this.getPayouts({params:this.payoutParams,onSuccess:({payouts:t,pagingInfo:s})=>{this.payouts=t,this.paging=s,this.payoutsTable.collectionData=this.payouts,this.payoutsTable.columnKeys.includes("sub_account_name")?this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.payouts=this.payouts.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get payoutParams(){const t=x();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.payouts.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.payouts.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.payoutsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return t(y,{key:"679d6c6e77a02a30223a98d2acc5904866d19f80"},t(v,{key:"9e26d69955fd836451c6468946d7fa512ad84fde"},t(g,{key:"a73a478f2c40d1b95c5a8bc7039496a2caa4bd40"},t(C,{key:"369b1f0a4827fed6ff8f0c6f030bbe54843e1356"},t(j,{key:"c4be14ee6c9401e8a5e6e3318c7e2754f2457151"},this.payoutsTable.columnData.map((t=>t)))),t(_,{key:"5401abd534d1035ffc5177bb091cb63628e250de"},t(w,{key:"386a988c540a87dea5f6574f0e073ed26607c528",columnSpan:this.payoutsTable.columnKeys.length,isLoading:this.loading}),t(k,{key:"6855b88d7ca2e75f39aee058de13f56fd81f1811",isEmpty:this.showEmptyState,columnSpan:this.payoutsTable.columnKeys.length}),t(S,{key:"186e8f3a48b5362a07b88192617d88d466ae11c2",columnSpan:this.payoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.payoutsTable.rowData.map(((s,e)=>t(T,{"data-test-id":"table-row","data-row-entity-id":this.entityId[e],onClick:this.rowClickHandler},s)))),this.paging&&t(P,{key:"ad5e63f894c990d5b87a5d39e4164d4248bc7b1a"},t(D,{key:"57cab389b166b282bbf6506d08a368f0cc4c750b"},t(O,{key:"8f8893d6f3ffe796ebe77fb33e1e0f6a3f364408",colSpan:this.payoutsTable.columnData.length},t("pagination-menu",{key:"640555ff74d52f27b06d3588f411e235b23436ad",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"],pagingParams:["updateOnPropChange"],getPayouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"]}}};export{H as justifi_payouts_list}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as e,c as s}from"./p-CV0Pyo1O.js";import{c as r,a as i,F as n}from"./p-
|
|
1
|
+
import{h as t,r as e,c as s}from"./p-CV0Pyo1O.js";import{c as r,a as i,F as n}from"./p-D9sqTVmd.js";import{f as o}from"./p-BRnBHsdq.js";import"./p-DVJaoI_m.js";import{R as a,C as u,e as h,o as l}from"./p-Dzv0P2Ly.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import{B as c}from"./p-CHo7TfsM.js";import{S as m}from"./p-DzEdYT8R.js";import"./p-CZfYo5-1.js";import{P as d}from"./p-n_pmf4AT.js";import{m as p}from"./p-vUN_uvAi.js";import{J as f}from"./p-H0ILKMD2.js";import{c as v}from"./p-D9rCHoO4.js";import{g as y,a as j}from"./p-CDu7TeCZ.js";import{A as b}from"./p-CYQvLgSs.js";import{S as w}from"./p-uZ5KAseb.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-D8GTwl9v.js";import"./p-CPKMvyV_.js";import"./p-D6Pw5qJ5.js";const T=t=>{const e=+t;return i().required("Amount is required").test("max-amount",`Refund amount cannot be more than payment amount: ${o(e)}`,(function(t){return+t<=+e})).test("min-amount","Refund amount must be greater than 0",(function(t){return+t>0}))},C=t=>{if(t)return r({amount:T(t),description:i().optional(),reason:i().optional().oneOf([a.customerRequest,a.duplicate,a.fraudulent],"Select a reason")})},g=[{label:"Select a reason",value:""},{label:"Customer requested a refund",value:"customer_request"},{label:"Customer was double-charged",value:"duplicate"},{label:"Payment was reported as fraud",value:"fraudulent"}],A=b();class I{async postRefund(t,e,s,r){return A.post({endpoint:`payments/${t}/refunds`,headers:{"Sub-Account":e},body:r,authToken:s})}}const D=b();class P{async postVoid(t,e,s){return D.post({endpoint:`payments/${t}/void`,headers:{"Sub-Account":e},authToken:s})}}const S=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(w,{width:"100%",height:"40px"}))),R=()=>t(m,null,t("div",{class:"row gap-5"},t(S,null),t(S,null),t(S,null))),k=class{constructor(t){e(this,t),this.errorEvent=s(this,"error-event",7),this.submitEvent=s(this,"submit-event",7),this.refundPayload={},this.displayAmount="",this.errors={},this.paymentLoading=!0,this.refundLoading=!1,this.hideSubmitButton=!1,this.inputHandler=(t,e)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}componentWillLoad(){v(),this.analytics=new f(this),this.initializeApi(),this.formController=new n(C())}handleError(t,e,s){this.errorEvent.emit({errorCode:t,message:e,severity:s})}checkAmount(t){return t>0}handleInvalidAmount(){this.submitDisabled=!0,this.handleError(h.INVALID_REFUND_AMOUNT,"Refund amount must be greater than 0",u.ERROR)}isPaymentCreatedWithin25Minutes(){var t;if(!this.payment||!(null===(t=this.payment)||void 0===t?void 0:t.created_at))return!1;const e=new Date(this.payment.created_at);return((new Date).getTime()-e.getTime())/6e4<=25}initializeFormController(){const t=this.refundPayload.amount,e=t?t.toString():"0";this.formController=new n(C(e)),this.formController.setInitialValues({amount:e}),this.formController.values.subscribe((t=>{this.refundPayload=Object.assign({},t)})),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.paymentId&&this.authToken?p({id:this.paymentId,authToken:this.authToken,service:new d})({onSuccess:({payment:t})=>{this.payment=t,this.refundPayload=new l({amount:t.amount_refundable})},onError:({error:t,code:e,severity:s})=>{this.handleError(e,t,s)},final:()=>{this.checkAmount(this.refundPayload.amount)?this.initializeFormController():this.handleInvalidAmount(),this.paymentLoading=!1}}):this.handleError(h.MISSING_PROPS,"Payment ID and Auth Token are required",u.ERROR)}async refundPayment(t){if(t&&t.preventDefault(),!await this.formController.validate())return;const e=this.formController.values.getValue();return this.refundLoading=!0,this.isPaymentCreatedWithin25Minutes()?this.tryVoidPayment():this.processRefund(e)}async tryVoidPayment(){const t=(({authToken:t,accountId:e,paymentId:s,service:r})=>async({onSuccess:i,onError:n,final:o})=>{var a;try{const o=await r.postVoid(s,e,t);if(o.error)return n({error:j(o.error),code:y(null===(a=o.error)||void 0===a?void 0:a.code),severity:u.ERROR});i(o)}catch(t){const e=y(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:u.ERROR})}finally{return o()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new P});return new Promise((e=>{let s,r=!1;const i=this.formController.values.getValue();t({onSuccess:t=>{s=t,r=!0},onError:({error:t,code:s,severity:n})=>{r=!0,this.handleError(t,s,n),this.processRefund(i).then(e)},final:()=>{s&&!s.error&&r&&(this.submitEvent.emit({response:s}),this.submitDisabled=!0,this.refundLoading=!1,e(s.data))}})}))}async processRefund(t){const e=(({authToken:t,accountId:e,paymentId:s,service:r})=>async({refundBody:i,onSuccess:n,onError:o,final:a})=>{var h;try{const a=await r.postRefund(s,e,t,i);if(a.error)return o({error:j(a.error),code:y(null===(h=a.error)||void 0===h?void 0:h.code),severity:u.ERROR});n(a)}catch(t){const e=y(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:u.ERROR})}finally{return a()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new I});return new Promise((s=>{let r;e({refundBody:t,onSuccess:t=>{r=t},onError:({error:t,code:e,severity:s})=>{r=t,this.handleError(t,e,s)},final:()=>{this.submitEvent.emit({response:r}),this.submitDisabled=!0,this.refundLoading=!1,s(r.data)}})}))}render(){if(this.paymentLoading)return t(R,null);const e=this.formController.getInitialValues(),s=this.refundPayload.amount;return t(m,null,t("form",null,t("fieldset",null,t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-monetary",{name:"amount",label:"Refund Amount",defaultValue:e.amount,inputHandler:this.inputHandler,errorText:this.errors.amount})),t("div",{class:"col-12"},t("form-control-select",{name:"reason",label:"Reason for refund (optional)",defaultValue:e.reason,inputHandler:this.inputHandler,options:g,errorText:this.errors.reason})),t("div",{class:"col-12"},t("form-control-textarea",{name:"description",label:"Note (optional)",defaultValue:e.description,inputHandler:this.inputHandler,maxLength:250,errorText:this.errors.description})),t("div",{class:"form-group d-flex flex-row-reverse"},t(c,{variant:"primary",type:"submit",onClick:this.refundPayment.bind(this),isLoading:this.paymentLoading||this.refundLoading,hidden:this.hideSubmitButton,disabled:this.submitDisabled},`Refund ${o(+s)}`))))))}};export{k as justifi_refund_payment}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as s}from"./p-CV0Pyo1O.js";import{f as i}from"./p-BRnBHsdq.js";import{t as a,a8 as r}from"./p-CPKMvyV_.js";import{B as d}from"./p-CHo7TfsM.js";import{S as c}from"./p-uZ5KAseb.js";import"./p-CZfYo5-1.js";import{C as o,e as n}from"./p-NZS8uCtH.js";import{g as h,a as p}from"./p-Cm9f5fyh.js";import{D as l,a as f}from"./p-oTtn8xDw.js";import{c as u}from"./p-BdpSLMs7.js";import{J as b}from"./p-Axa3cgnH.js";import"./p-HXpYMWUU.js";import"./p-CYQvLgSs.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-DAZd_gFd.js";const y=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.submitDisputeResponse(t,e,i);if(d.error){return r({error:p(d.error),code:h(null===(c=d.error)||void 0===c?void 0:c.code),severity:o.ERROR})}a(d)}catch(e){const t=h(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:o.ERROR})}finally{return d()}},v=class{constructor(s){e(this,s),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.submitEvent=t(this,"submit-event",7)}acceptDispute(){y({disputeId:this.dispute.id,authToken:this.authToken,service:new f})({payload:{forfeit:!0},onSuccess:e=>{this.submitEvent.emit({response:e})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}})}initiateRespondToDispute(){this.clickEvent.emit({name:l.respondToDispute})}isDueDatePassed(){var e;if(!(null===(e=this.dispute)||void 0===e?void 0:e.due_date))return!1;const t=new Date(this.dispute.due_date.replace(/-/g,"/").replace(/T.+/,"")),s=new Date;return s.setHours(0,0,0,0),t.setHours(0,0,0,0),t<s}render(){var e,t,o,n,h,p,l,f,u;return s("div",{key:"c5963c0823e635ee0c2e88979b174c89c96af134",class:"dispute-notification-root"},this.isLoading&&s("div",{key:"4de146d999a16e1b4ad3e393285a843d86febdda",style:{marginBottom:"8px"}},s(c,{key:"ccbf1fe76ac5582cb2536548901c12768096e867",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(c,{key:"06ede07362fe88dfd4ec6b38c80bf619b9c7a134",height:"18px",styles:{marginBottom:"8px"}}),s(c,{key:"768613c5b20ef403c468b12d5dacbea4b211ebef",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&this.isDueDatePassed()&&s("div",{key:"a22e18df2764ddb6bee0db7e4da388bd9aec0d99",part:a},s("h1",{key:"b602464b54aacc6c0776975921dbe3fceeda1f04",class:"h4",part:r},"The due date (",null===(t=this.dispute)||void 0===t?void 0:t.due_date,") for this dispute has passed"),s("p",{key:"e4b8615f75914e7aa613f6120172bc2cc0f6dd31"},"You can no longer submit evidence to counter this dispute.")),(null===(o=this.dispute)||void 0===o?void 0:o.needsResponse)&&!this.isDueDatePassed()&&s("div",{key:"2b09cc88b63ca582e2ef8cb83ef4455d4af493cc",part:a},s("h1",{key:"74ac700bc104aac085712a30da0b968a1bec41fe",class:"h4",part:r},"This payment is disputed"),s("p",{key:"2d133967991c3ee44f022ac925c873c198b71315"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"376936590aaeb5903f430eedb84984704966563d",class:"h5"},"Dispute details"),s("div",{key:"8afea9772ee48495c8b731ba8602c48e00061f8c",class:"d-table gap-2"},s("div",{key:"14630372fff051e1baadb7239ced63ae56edaf7e",class:"d-table-row gap-2"},s("span",{key:"4ec3fc5233e87b07021eeb78ac7d4e09666502c7",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"fe19ae497136c8ef5511a0197952c6d3cd889b84",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(n=this.dispute)||void 0===n?void 0:n.amount))),s("div",{key:"0f955e0707a9b8126868a34dafa39320e00d7706",class:"d-table-row gap-2"},s("span",{key:"63dc2ebf125f6ec52a155ced1324a02b0735c78b",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"5a6e543559e873811348fa0b68d21fe0f1dac781",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(h=this.dispute)||void 0===h?void 0:h.reason)),s("div",{key:"7656de07c60c137dd7005f96370a71442dcdb526",class:"d-table-row gap-2"},s("span",{key:"817a89c84f605cbfac346f0d39790b35a73d51a4",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Due Date"),s("span",{key:"e0e7c74f85934f6a1d2e02bc24d5563e1a37222e",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(p=this.dispute)||void 0===p?void 0:p.due_date))),s("div",{key:"2ef721cebd617709242a0b4b9713ff264f73eac0",class:"d-flex gap-2 mt-4 justify-content-end"},s(d,{key:"530f16709538e4146e542b88177145e4b2c9808a",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(d,{key:"a498af8eb2d5a41e75a8fb044b981463b8e3bbd4",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(l=this.dispute)||void 0===l?void 0:l.underReview)&&s("div",{key:"f01a89cda469402b5543b64b02ddfc9ec66cc62b",part:a},s("h1",{key:"15f0173bdfc20dea6fb16b030479f8554e40b716",class:"h4",part:r},"This payment is disputed and under review"),s("p",{key:"a444d77fad985cddf37a0386db7ee65f321fa11c"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(f=this.dispute)||void 0===f?void 0:f.won)&&s("div",{key:"08bf0f31e5fe43dbf1058709f500d0b592827dcb",part:a},s("h1",{key:"e9925566140ac26b9fb42026258f3ca2bebc002f",class:"h4",part:r},"This payment was disputed"),s("p",{key:"b0dd7cec8cad943d46d7e2d7d919f15b29d08fbd"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(u=this.dispute)||void 0===u?void 0:u.lost)&&s("div",{key:"4b037a462c3e9b3c7b7296e15b443c94a4310f46",part:a},s("h1",{key:"b614282d90adb69e9c638ed7a6f80566033c69ed",class:"h4",part:r},"This payment was disputed"),s("p",{key:"3808b99fb69241784c6f3e09bbd6b13636cb26a3"},"The cardholder disputed this payment and the card issuer has settled it in their favor.")))}},m=class{constructor(i){e(this,i),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.submitEvent=t(this,"submit-event",7),this.errorMessage=null,this.disputeResponse={},this.apiOrigin="https://wc-proxy.justifi.ai",this.isLoading=!1,this.documentList=[],this.documentErrors={},this.currentStep=0,this.componentStepMapping=[()=>s("product-or-service",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("customer-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("cancellation-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("refund-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("duplicate-charge",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("electronic-evidence",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("shipping-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("additional-statement",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors})],this.saveData=async(e,t)=>{if(Object.keys(e).length)return this.isLastStep?this.submitDisputeResponse({payload:e,onSuccess:e=>{this.submitEvent.emit({response:e}),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}}):this.updateDisputeResponse({payload:e,onSuccess:e=>{this.disputeResponse=Object.assign({},e.data),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}});this.stepCompleteEvent.emit({response:null,formStep:t})},this.initializeMakePresignedURLs=async()=>{const e=this.documentList.map((e=>this.getPresignedFileUrl(e)));return await Promise.all(e)},this.initializeFileUploads=async()=>{const e=this.documentList.map((e=>this.uploadDocument(e)));return Promise.all(e)},this.getPresignedFileUrl=async e=>this.createDisputeEvidence({payload:{file_name:e.file_name,file_type:e.file_type,dispute_evidence_type:e.dispute_evidence_type},onSuccess:t=>{e.presignedUrl=t.data.presigned_url},onError:({error:t,code:s,severity:i})=>{const a={[e.dispute_evidence_type]:t};this.documentErrors=Object.assign(Object.assign({},this.documentErrors),a),this.errorEvent.emit({errorCode:s,message:t,severity:i})}}),this.uploadDocument=async e=>{const t=await e.getFileString();if(!e.presignedUrl)throw new Error("Presigned URL is not set");return await fetch(e.presignedUrl,{method:"PUT",body:t})},this.handleSubmit=async(e,t,s)=>{if(this.isLoading=!0,t.length){if(this.documentErrors={},this.documentList=t,await this.initializeMakePresignedURLs(),Object.keys(this.documentErrors).length)throw this.isLoading=!1,new Error("Could not presign all documents");await this.initializeFileUploads()}await this.saveData(e,s),this.isLoading=!1},this.onCancel=()=>{this.clickEvent.emit({name:l.cancelDispute})},this.onBack=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.previousStep}),await this.handleSubmit(e,t,s),this.currentStep--}))},this.onNext=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.nextStep}),await this.handleSubmit(e,t,s),this.currentStep++}))},this.onSubmit=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.submit});const i=Object.assign(Object.assign({},e),{forfeit:!1});await this.handleSubmit(i,t,s)}))}}componentWillLoad(){u(),this.analytics=new b(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeDisputeServiceMethods()}initializeDisputeServiceMethods(){this.disputeId&&this.authToken?(this.updateDisputeResponse=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.updateDisputeResponse(t,e,i);if(d.error)return r({error:p(d.error),code:h(null===(c=d.error)||void 0===c?void 0:c.code),severity:o.ERROR});a(d)}catch(e){const t=h(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:o.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new f}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.createDisputeEvidence(t,e,i);if(d.error)return r({error:p(d.error),code:h(null===(c=d.error)||void 0===c?void 0:c.code),severity:o.ERROR});a(d)}catch(e){const t=h(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:o.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new f}),this.submitDisputeResponse=y({disputeId:this.disputeId,authToken:this.authToken,service:new f})):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:n.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}get isLastStep(){return this.currentStep===this.componentStepMapping.length-1}get isFirstStep(){return 0===this.currentStep}render(){return s("div",{key:"50f6bf79c7590ef3591e2163dbcd89241ca17b62",class:"dispute-response-root"},s("div",{key:"5345d5a3c5e7ff2d4c56f438fe623578e3d2029e",class:"row gy-3"},s("div",{key:"8925276a290105b2fde5cd6bfdf0390c3a0c95f9",class:"col-12"},s("h1",{key:"b8eb14deedc748b3612f11fad9d94fa38020a7f8",class:"h4",part:r},"Counter dispute")),s("div",{key:"50afe487bdb21d3ea2dc149c662a284f5ebb4d9b",class:"col-12"},this.currentStepComponent),s("div",{key:"cde242630fdc12e82ee5a77a199c4f6a7858371e",class:"col-12"},s("div",{key:"ce548b753ec56df34e23eb33649a27449d49b712",class:"d-flex gap-2 mt-4 justify-content-end"},this.isFirstStep?s(d,{variant:"secondary",onClick:()=>this.onCancel(),disabled:this.isLoading,isLoading:this.isLoading},"Cancel"):s(d,{variant:"secondary",onClick:()=>this.onBack(),disabled:this.isLoading,isLoading:this.isLoading},"Back"),this.isLastStep?s(d,{variant:"primary",onClick:()=>this.onSubmit(),disabled:this.isLoading,isLoading:this.isLoading},"Submit Counter Dispute"):s(d,{variant:"primary",onClick:()=>this.onNext(),disabled:this.isLoading,isLoading:this.isLoading},"Next")))))}static get watchers(){return{disputeId:["propChanged"],authToken:["propChanged"]}}};export{v as dispute_notification,m as dispute_response}
|
|
1
|
+
import{r as e,c as t,h as s}from"./p-CV0Pyo1O.js";import{f as i}from"./p-BRnBHsdq.js";import{t as a,a8 as r}from"./p-CPKMvyV_.js";import{B as d}from"./p-CHo7TfsM.js";import{S as c}from"./p-uZ5KAseb.js";import"./p-CZfYo5-1.js";import{C as o,e as n}from"./p-Dzv0P2Ly.js";import{g as h,a as p}from"./p-CDu7TeCZ.js";import{D as l,a as f}from"./p--RbNhyet.js";import{c as u}from"./p-D9rCHoO4.js";import{J as b}from"./p-H0ILKMD2.js";import"./p-HXpYMWUU.js";import"./p-CYQvLgSs.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-D6Pw5qJ5.js";const y=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.submitDisputeResponse(t,e,i);if(d.error){return r({error:p(d.error),code:h(null===(c=d.error)||void 0===c?void 0:c.code),severity:o.ERROR})}a(d)}catch(e){const t=h(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:o.ERROR})}finally{return d()}},v=class{constructor(s){e(this,s),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.submitEvent=t(this,"submit-event",7)}acceptDispute(){y({disputeId:this.dispute.id,authToken:this.authToken,service:new f})({payload:{forfeit:!0},onSuccess:e=>{this.submitEvent.emit({response:e})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}})}initiateRespondToDispute(){this.clickEvent.emit({name:l.respondToDispute})}isDueDatePassed(){var e;if(!(null===(e=this.dispute)||void 0===e?void 0:e.due_date))return!1;const t=new Date(this.dispute.due_date.replace(/-/g,"/").replace(/T.+/,"")),s=new Date;return s.setHours(0,0,0,0),t.setHours(0,0,0,0),t<s}render(){var e,t,o,n,h,p,l,f,u;return s("div",{key:"c5963c0823e635ee0c2e88979b174c89c96af134",class:"dispute-notification-root"},this.isLoading&&s("div",{key:"4de146d999a16e1b4ad3e393285a843d86febdda",style:{marginBottom:"8px"}},s(c,{key:"ccbf1fe76ac5582cb2536548901c12768096e867",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(c,{key:"06ede07362fe88dfd4ec6b38c80bf619b9c7a134",height:"18px",styles:{marginBottom:"8px"}}),s(c,{key:"768613c5b20ef403c468b12d5dacbea4b211ebef",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&this.isDueDatePassed()&&s("div",{key:"a22e18df2764ddb6bee0db7e4da388bd9aec0d99",part:a},s("h1",{key:"b602464b54aacc6c0776975921dbe3fceeda1f04",class:"h4",part:r},"The due date (",null===(t=this.dispute)||void 0===t?void 0:t.due_date,") for this dispute has passed"),s("p",{key:"e4b8615f75914e7aa613f6120172bc2cc0f6dd31"},"You can no longer submit evidence to counter this dispute.")),(null===(o=this.dispute)||void 0===o?void 0:o.needsResponse)&&!this.isDueDatePassed()&&s("div",{key:"2b09cc88b63ca582e2ef8cb83ef4455d4af493cc",part:a},s("h1",{key:"74ac700bc104aac085712a30da0b968a1bec41fe",class:"h4",part:r},"This payment is disputed"),s("p",{key:"2d133967991c3ee44f022ac925c873c198b71315"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"376936590aaeb5903f430eedb84984704966563d",class:"h5"},"Dispute details"),s("div",{key:"8afea9772ee48495c8b731ba8602c48e00061f8c",class:"d-table gap-2"},s("div",{key:"14630372fff051e1baadb7239ced63ae56edaf7e",class:"d-table-row gap-2"},s("span",{key:"4ec3fc5233e87b07021eeb78ac7d4e09666502c7",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"fe19ae497136c8ef5511a0197952c6d3cd889b84",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(n=this.dispute)||void 0===n?void 0:n.amount))),s("div",{key:"0f955e0707a9b8126868a34dafa39320e00d7706",class:"d-table-row gap-2"},s("span",{key:"63dc2ebf125f6ec52a155ced1324a02b0735c78b",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"5a6e543559e873811348fa0b68d21fe0f1dac781",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(h=this.dispute)||void 0===h?void 0:h.reason)),s("div",{key:"7656de07c60c137dd7005f96370a71442dcdb526",class:"d-table-row gap-2"},s("span",{key:"817a89c84f605cbfac346f0d39790b35a73d51a4",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Due Date"),s("span",{key:"e0e7c74f85934f6a1d2e02bc24d5563e1a37222e",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(p=this.dispute)||void 0===p?void 0:p.due_date))),s("div",{key:"2ef721cebd617709242a0b4b9713ff264f73eac0",class:"d-flex gap-2 mt-4 justify-content-end"},s(d,{key:"530f16709538e4146e542b88177145e4b2c9808a",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(d,{key:"a498af8eb2d5a41e75a8fb044b981463b8e3bbd4",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(l=this.dispute)||void 0===l?void 0:l.underReview)&&s("div",{key:"f01a89cda469402b5543b64b02ddfc9ec66cc62b",part:a},s("h1",{key:"15f0173bdfc20dea6fb16b030479f8554e40b716",class:"h4",part:r},"This payment is disputed and under review"),s("p",{key:"a444d77fad985cddf37a0386db7ee65f321fa11c"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(f=this.dispute)||void 0===f?void 0:f.won)&&s("div",{key:"08bf0f31e5fe43dbf1058709f500d0b592827dcb",part:a},s("h1",{key:"e9925566140ac26b9fb42026258f3ca2bebc002f",class:"h4",part:r},"This payment was disputed"),s("p",{key:"b0dd7cec8cad943d46d7e2d7d919f15b29d08fbd"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(u=this.dispute)||void 0===u?void 0:u.lost)&&s("div",{key:"4b037a462c3e9b3c7b7296e15b443c94a4310f46",part:a},s("h1",{key:"b614282d90adb69e9c638ed7a6f80566033c69ed",class:"h4",part:r},"This payment was disputed"),s("p",{key:"3808b99fb69241784c6f3e09bbd6b13636cb26a3"},"The cardholder disputed this payment and the card issuer has settled it in their favor.")))}},m=class{constructor(i){e(this,i),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.submitEvent=t(this,"submit-event",7),this.errorMessage=null,this.disputeResponse={},this.apiOrigin="https://wc-proxy.justifi.ai",this.isLoading=!1,this.documentList=[],this.documentErrors={},this.currentStep=0,this.componentStepMapping=[()=>s("product-or-service",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("customer-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("cancellation-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("refund-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("duplicate-charge",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("electronic-evidence",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("shipping-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("additional-statement",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors})],this.saveData=async(e,t)=>{if(Object.keys(e).length)return this.isLastStep?this.submitDisputeResponse({payload:e,onSuccess:e=>{this.submitEvent.emit({response:e}),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}}):this.updateDisputeResponse({payload:e,onSuccess:e=>{this.disputeResponse=Object.assign({},e.data),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}});this.stepCompleteEvent.emit({response:null,formStep:t})},this.initializeMakePresignedURLs=async()=>{const e=this.documentList.map((e=>this.getPresignedFileUrl(e)));return await Promise.all(e)},this.initializeFileUploads=async()=>{const e=this.documentList.map((e=>this.uploadDocument(e)));return Promise.all(e)},this.getPresignedFileUrl=async e=>this.createDisputeEvidence({payload:{file_name:e.file_name,file_type:e.file_type,dispute_evidence_type:e.dispute_evidence_type},onSuccess:t=>{e.presignedUrl=t.data.presigned_url},onError:({error:t,code:s,severity:i})=>{const a={[e.dispute_evidence_type]:t};this.documentErrors=Object.assign(Object.assign({},this.documentErrors),a),this.errorEvent.emit({errorCode:s,message:t,severity:i})}}),this.uploadDocument=async e=>{const t=await e.getFileString();if(!e.presignedUrl)throw new Error("Presigned URL is not set");return await fetch(e.presignedUrl,{method:"PUT",body:t})},this.handleSubmit=async(e,t,s)=>{if(this.isLoading=!0,t.length){if(this.documentErrors={},this.documentList=t,await this.initializeMakePresignedURLs(),Object.keys(this.documentErrors).length)throw this.isLoading=!1,new Error("Could not presign all documents");await this.initializeFileUploads()}await this.saveData(e,s),this.isLoading=!1},this.onCancel=()=>{this.clickEvent.emit({name:l.cancelDispute})},this.onBack=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.previousStep}),await this.handleSubmit(e,t,s),this.currentStep--}))},this.onNext=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.nextStep}),await this.handleSubmit(e,t,s),this.currentStep++}))},this.onSubmit=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.submit});const i=Object.assign(Object.assign({},e),{forfeit:!1});await this.handleSubmit(i,t,s)}))}}componentWillLoad(){u(),this.analytics=new b(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeDisputeServiceMethods()}initializeDisputeServiceMethods(){this.disputeId&&this.authToken?(this.updateDisputeResponse=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.updateDisputeResponse(t,e,i);if(d.error)return r({error:p(d.error),code:h(null===(c=d.error)||void 0===c?void 0:c.code),severity:o.ERROR});a(d)}catch(e){const t=h(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:o.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new f}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.createDisputeEvidence(t,e,i);if(d.error)return r({error:p(d.error),code:h(null===(c=d.error)||void 0===c?void 0:c.code),severity:o.ERROR});a(d)}catch(e){const t=h(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:o.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new f}),this.submitDisputeResponse=y({disputeId:this.disputeId,authToken:this.authToken,service:new f})):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:n.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}get isLastStep(){return this.currentStep===this.componentStepMapping.length-1}get isFirstStep(){return 0===this.currentStep}render(){return s("div",{key:"50f6bf79c7590ef3591e2163dbcd89241ca17b62",class:"dispute-response-root"},s("div",{key:"5345d5a3c5e7ff2d4c56f438fe623578e3d2029e",class:"row gy-3"},s("div",{key:"8925276a290105b2fde5cd6bfdf0390c3a0c95f9",class:"col-12"},s("h1",{key:"b8eb14deedc748b3612f11fad9d94fa38020a7f8",class:"h4",part:r},"Counter dispute")),s("div",{key:"50afe487bdb21d3ea2dc149c662a284f5ebb4d9b",class:"col-12"},this.currentStepComponent),s("div",{key:"cde242630fdc12e82ee5a77a199c4f6a7858371e",class:"col-12"},s("div",{key:"ce548b753ec56df34e23eb33649a27449d49b712",class:"d-flex gap-2 mt-4 justify-content-end"},this.isFirstStep?s(d,{variant:"secondary",onClick:()=>this.onCancel(),disabled:this.isLoading,isLoading:this.isLoading},"Cancel"):s(d,{variant:"secondary",onClick:()=>this.onBack(),disabled:this.isLoading,isLoading:this.isLoading},"Back"),this.isLastStep?s(d,{variant:"primary",onClick:()=>this.onSubmit(),disabled:this.isLoading,isLoading:this.isLoading},"Submit Counter Dispute"):s(d,{variant:"primary",onClick:()=>this.onNext(),disabled:this.isLoading,isLoading:this.isLoading},"Next")))))}static get watchers(){return{disputeId:["propChanged"],authToken:["propChanged"]}}};export{v as dispute_notification,m as dispute_response}
|
|
@@ -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-D9rCHoO4.js";import{J as p}from"./p-H0ILKMD2.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 D}from"./p-CZfYo5-1.js";import{d as I,b as O}from"./p-BRnBHsdq.js";import{B as x,a as A}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-D6Pw5qJ5.js";import"./p-CYQvLgSs.js";import"./p-CqiVXthx.js";const M={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")},B={created_at:(e,s)=>t("td",{part:z(s)},t("div",{class:"fw-bold"},O(e.created_at)),t("div",{class:"fw-bold"},I(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(A,Object.assign({},{created:{variant:x.PRIMARY,title:"The checkout has been created",text:"Created"},completed:{variant:x.SUCCESS,title:"The checkout has been completed",text:"Completed"},attempted:{variant:x.SECONDARY,title:"The checkout has been attempted",text:"Attempted"},expired:{variant:x.DANGER,title:"The checkout has expired",text:"Expired"}}[e.status])))},G=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: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 s=this.checkouts.find((t=>t.id===e));this.clickEvent.emit({name:D.row,data:s})}}componentWillLoad(){n(),this.analytics=new p(this),this.checkoutsTable=new b(this.checkouts,this.columns,M,B),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{G as justifi_checkouts_list}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as e,c as s}from"./p-CV0Pyo1O.js";import{S as a}from"./p-
|
|
1
|
+
import{h as t,r as e,c as s}from"./p-CV0Pyo1O.js";import{S as a}from"./p-DzEdYT8R.js";import{T as r,a as i,b as o,c as d,d as h,e as n,f as c,g as p,h as l,i as m,j as u,k as f,l as b}from"./p-BICxxa69.js";import{T as y}from"./p-CZfYo5-1.js";import{c as g}from"./p-D9rCHoO4.js";import{a6 as v,a7 as C}from"./p-CPKMvyV_.js";import{a as w}from"./p-BRnBHsdq.js";import"./p-DVJaoI_m.js";import{c as j,n as T,C as k,e as _}from"./p-Dzv0P2Ly.js";import{p as O}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import{B as D,a as P}from"./p-CHw7tICr.js";import"./p-HXpYMWUU.js";import{g as S,a as I}from"./p-CDu7TeCZ.js";import{A as x}from"./p-CYQvLgSs.js";import{J as B}from"./p-H0ILKMD2.js";import{o as q,g as E}from"./p-BPTtWj7E.js";import"./p-CqiVXthx.js";import"./p-D6Pw5qJ5.js";import"./p-D8GTwl9v.js";const H={created_at:()=>t("th",{part:v,scope:"col",title:"The date and time the order was created"},"Created At"),updated_at:()=>t("th",{part:v,scope:"col",title:"The date and time the order was last updated"},"Updated At"),order_status:()=>t("th",{part:v,scope:"col",title:"The current status of the order"},"Order Status"),business_id:()=>t("th",{part:v,scope:"col",title:"The business ID associated with the order"},"Business ID"),company_name:()=>t("th",{part:v,scope:"col",title:"The business name associated with the order"},"Business Name"),provider:()=>t("th",{part:v,scope:"col",title:"The provider associated with the order"},"Provider"),order_type:()=>t("th",{part:v,scope:"col",title:"The type of order"},"Order Type"),quantity:()=>t("th",{part:v,scope:"col",title:"The number of terminals associated with the order"},"Order Quantity")},L={created_at:(e,s)=>t("td",{part:C(s)},t("div",{class:"fw-bold"},w(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},w(e.created_at,{showTime:!0}))),updated_at:(e,s)=>t("td",{part:C(s)},t("div",{class:"fw-bold"},w(e.updated_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},w(e.updated_at,{showTime:!0}))),order_status:(e,s)=>t("td",{part:C(s)},t(P,Object.assign({},{submitted:{variant:D.PRIMARY,title:"This order is submitted",text:"Submitted"},completed:{variant:D.SUCCESS,title:"This order has been completed",text:"Completed"},created:{variant:D.SECONDARY,title:"This order is created",text:"Created"},in_progress:{variant:D.PRIMARY,title:"This order is in progress",text:"In Progress"},on_hold:{variant:D.WARNING,title:"This order is on hold",text:"On Hold"},canceled:{variant:D.DANGER,title:"This order is canceled",text:"Canceled"}}[e.order_status]))),business_id:(e,s)=>t("td",{part:C(s)},e.business_id),company_name:(e,s)=>t("td",{part:C(s)},e.company_name),provider:(e,s)=>t("td",{part:C(s)},e.provider),order_type:(e,s)=>{let a;return e.order_type===j.boardingOnly?a="Boarding Only":e.order_type===j.boardingShipping&&(a="Boarding & Shipping"),t("td",{part:C(s)},a)},quantity:(e,s)=>t("td",{part:C(s)},e.terminals.length)},A=x();class V{async fetchTerminalOrders(t,e,s){return A.get({endpoint:"terminals/orders",params:s,headers:{account:t},authToken:e})}}const 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,updated_at,order_status,quantity",this.terminalOrders=[],this.loading=!0,this.paging=O,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:y.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:y.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const s=this.terminalOrders.find((t=>t.id===e));this.clickEvent.emit({name:y.row,data:s})}}componentWillLoad(){g(),this.analytics=new B(this),this.terminalOrdersTable=new r(this.terminalOrders,this.columns,H,L),this.initializeGetData(),this.getTerminalOrders&&this.fetchData(),q("set",(()=>{this.pagingParams={}})),q("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}authPropChanged(){this.initializeGetData(),this.getTerminalOrders&&this.fetchData()}pagingOrColumnsChanged(){this.getTerminalOrders&&this.fetchData()}initializeGetData(){this.accountId&&this.authToken?this.getTerminalOrders=(({id:t,authToken:e,service:s})=>async({params:a,onSuccess:r,onError:i,final:o})=>{var d,h;try{const o=await s.fetchTerminalOrders(t,e,a);if(o.error)return i({error:I(o.error),code:S(null===(h=o.error)||void 0===h?void 0:h.code),severity:k.ERROR});{const t=Object.assign({},o.page_info);r({terminalOrders:(null===(d=o.data)||void 0===d?void 0:d.map((t=>new T(t))))||[],pagingInfo:t})}}catch(t){const e=S(null==t?void 0:t.code);return i({error:t.message||t,code:e,severity:k.ERROR})}finally{return o()}})({id:this.accountId,authToken:this.authToken,service:new V}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:_.MISSING_PROPS,message:this.errorMessage,severity:k.ERROR}))}fetchData(){this.getTerminalOrders&&(this.loading=!0,this.getTerminalOrders({params:this.terminalOrderParams,onSuccess:async({terminalOrders:t,pagingInfo:e})=>{this.terminalOrders=t,this.paging=e,this.terminalOrdersTable.collectionData=this.terminalOrders},onError:({error:t,code:e,severity:s})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:s})},final:()=>{this.loading=!1}}))}get terminalOrderParams(){const t=E();return Object.assign(Object.assign({},t),this.pagingParams)}get entityId(){return this.terminalOrders.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalOrdersTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return t(a,{key:"e544fa99091ff8e0601388c4663f536304caef7c"},t(i,{key:"df2a311d1052b284d458f29a87ea5a78db145406"},t(o,{key:"9d3d6997f5fa8581fafa34e13a9981e75075ccc3"},t(d,{key:"30ee9315492e30913de3ef73db7c4e13e6a0d5bc"},t(h,{key:"f8fd993e7f19e3ac6b41e8eaff849a7ab66b2d41"},this.terminalOrdersTable.columnData.map((t=>t)))),t(n,{key:"75ddd58ba3a713b8f38a6e40de06d26ed06d63a7"},t(c,{key:"4509782ba93ff9d5d9057a23daa9720da4ec0f0e",columnSpan:this.terminalOrdersTable.columnKeys.length,isLoading:this.loading}),t(p,{key:"8aed10b38ac78e9ce3e5c8f96c2eb143412f3661",isEmpty:this.showEmptyState,columnSpan:this.terminalOrdersTable.columnKeys.length}),t(l,{key:"94f11381660568de3181fe7c70335e7c264c9e44",columnSpan:this.terminalOrdersTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalOrdersTable.rowData.map(((e,s)=>t(m,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},e)))),this.paging&&t(u,{key:"c980e0fc6b236973e6bdf4ab0a5beece872ed4e6"},t(f,{key:"c6431bfb8e38839d48b2d7fb8d85a8c64981f057"},t(b,{key:"6c7fc01e316acfcee6e33b583b97b040ce88efaf",colSpan:this.terminalOrdersTable.columnData.length},t("pagination-menu",{key:"2ac492d001dc88663b575258a8828964b20d6d68",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["authPropChanged"],authToken:["authPropChanged"],pagingParams:["pagingOrColumnsChanged"],columns:["pagingOrColumnsChanged"]}}};export{M as justifi_terminal_orders_list}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as a}from"./p-CV0Pyo1O.js";import{c as t,a as i,F as c}from"./p-CKiAlBsU.js";import{a9 as d}from"./p-CPKMvyV_.js";import"./p-BFTU3MAI.js";const s=t({additional_statement:i().nullable()});var o,l;!function(e){e.disputeReason="dispute_reason",e.productOrService="product_or_service",e.customerDetails="customer_details",e.cancellationPolicy="cancellation_policy",e.refundPolicy="refund_policy",e.duplicateCharge="duplicate_charge",e.electronicEvidence="electronic_evidence",e.shippingDetails="shipping_details",e.additionalStatement="additional_statement"}(o||(o={})),function(e){e.activity_log="activity_log",e.cancellationPolicy="cancellation_policy",e.customerCommunication="customer_communication",e.customerSignature="customer_signature",e.duplicateChargeDocumentation="duplicate_charge_documentation",e.receipt="receipt",e.refundPolicy="refund_policy",e.serviceDocumentation="service_documentation",e.shippingDocumentation="shipping_documentation",e.uncategorizedFile="uncategorized_file"}(l||(l={}));class n{set presignedUrl(e){this._presignedUrl=e}get presignedUrl(){return this._presignedUrl}async getFileString(){const e=new Promise(((e,a)=>{const t=new FileReader;t.onload=a=>{e(a.target.result)},t.onerror=()=>{a(new Error("Error reading file"))},t.readAsArrayBuffer(this._file)}));return await e}constructor(e,a){this._file=e,this.file_name=e.name,this.file_type=e.type,this.dispute_evidence_type=a}}const r=(e,a)=>{const t=e.target,i=t.name,c=t.files;a[i]=[];for(const e of c)a[i].push(new n(e,i))},f=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.acceptedTerms=!1,this.documents={uncategorized_file:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.additionalStatement)))}componentWillLoad(){this.form=new c(s)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"6981b81dee8ead47d8e86c501b82d61aa4c337b9"},a("div",{key:"0bf8ad743eaf5fe2e8c68d79947a4c2303e782f1",class:"row gy-3"},a("div",{key:"bdd3e46477ed7667a73a81d98c62e1121660b820",class:"col-12"},a("h2",{key:"b0b8e093b3c7204526b19fc54f80ea8c681ff22e",class:"h5",part:d},"Additional Evidence")),a("div",{key:"15570a6b33fab873a7fc9faa544c8fb234515f38",class:"col-12"},a("form-control-textarea",{key:"68e08b8e96dbb74c35f1fabbb769aa95a3e0ada9",label:"Is there anything else you would like to say about this dispute?",name:"additional_statement",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.additional_statement,inputHandler:this.inputHandler,errorText:this.errors.additional_statement})),a("div",{key:"f684ffc7e55aac7d0667326c99480b796f2a9cfc",class:"col-12"},a("form-control-file-v2",{key:"8ea248120f9f2ed5fb689a1a25855266dbe561a0",label:"Additional files",name:"uncategorized_file",multiple:!0,helpText:"Upload any additional pieces of evidence that have not already been provided.",onChange:e=>r(e,this.documents),errorText:null===(t=this.documentErrors)||void 0===t?void 0:t.uncategorized_file}))))}},b=t({cancellation_policy_disclosure:i().nullable(),cancellation_rebuttal:i().nullable()}),h=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={cancellation_policy:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.cancellationPolicy)))}componentWillLoad(){this.form=new c(b)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"debb9fe05382d0806038547b61fe3201845db2a1"},a("div",{key:"030d5be9a41dff1954049c6ac33a79024741c43c",class:"row gy-3"},a("div",{key:"d5da527af347d6c29c30f5ed5b5295b9ef693e7f",class:"col-12"},a("h2",{key:"3f8d2da0485bd28220ae9f66db87fab49e86a734",class:"h5",part:d},"Cancellation Policy")),a("div",{key:"d7fa3aacd80ad375ba58d1c86d8cf9d00c4cce6e",class:"col-12"},a("form-control-textarea",{key:"ca14e78ef0dcbad3b2a76cb230c2eb4a7c56f877",label:"Cancellation Policy Disclosure",name:"cancellation_policy_disclosure",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.cancellation_policy_disclosure,inputHandler:this.inputHandler,errorText:this.errors.cancellation_policy_disclosure})),a("div",{key:"e8f10ab0e5e3e9c7a0f90aa13e8680607bb64a3e",class:"col-12"},a("form-control-textarea",{key:"5ca2d11d67301b512756cbc4355939b9433be033",label:"Cancellation Rebuttal",name:"cancellation_rebuttal",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.cancellation_rebuttal,inputHandler:this.inputHandler,errorText:this.errors.cancellation_rebuttal})),a("div",{key:"36b8ef8f62721f220a05b1571bb347641b433b56",class:"col-12"},a("form-control-file-v2",{key:"c04f383cf55abd36b753718c2170d64f97935e7f",label:"Upload Cancellation Policy",name:"cancellation_policy",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.cancellation_policy}))))}},u=t({customer_name:i().nullable(),customer_email_address:i().nullable(),customer_billing_address:i().nullable()}),v=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={customer_signature:[],customer_communication:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.customerDetails)))}componentWillLoad(){this.form=new c(u)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c,s;return a("div",{key:"91e26b2e75fdd29814c58122e5aeae0d4d696032"},a("div",{key:"029a3828b8682fdd10af400dccceff109f866509",class:"row gy-3"},a("div",{key:"71fa3ded5566c5c18c682b8cfdfdcc5ebba2db44",class:"col-12"},a("h2",{key:"95eb1ed9da9cd955fa9c4c7a83368ac3c3378d5b",class:"h5",part:d},"Customer Details")),a("div",{key:"9450f8bd033efc7d48d62ce343b8b43833887f63",class:"col-12"},a("form-control-text",{key:"5690f7d9a46e2d58bdc24af0aab3798664f21745",label:"Full Name",name:"customer_name",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.customer_name,inputHandler:this.inputHandler,errorText:this.errors.customer_name})),a("div",{key:"a12aa4cb464e5df7f045302b08801adca70005f6",class:"col-12"},a("form-control-text",{key:"39cdb0b558b87a7eae0528ea40b9ca4175b4cf7c",label:"Email",name:"customer_email_address",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.customer_email_address,inputHandler:this.inputHandler,errorText:this.errors.customer_email_address})),a("div",{key:"13604ae63374c6fa1805d8c4be0ba55fc166a924",class:"col-12"},a("form-control-textarea",{key:"60a110f277175418c2ec0938600ad4b04f885ee3",label:"Billing Address",name:"customer_billing_address",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.customer_billing_address,inputHandler:this.inputHandler,errorText:this.errors.customer_billing_address})),a("div",{key:"abaa8888fff9952b3433c49e82a7150d6cd971dd",class:"col-12"},a("form-control-file-v2",{key:"e2e79edd8eaafd93cfdb91fd6a3b77645c1d28f2",label:"Customer Signature",name:"customer_signature",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.customer_signature})),a("div",{key:"04bfc4bf3e735cccf70fb83d2e0882662b389727",class:"col-12"},a("form-control-file-v2",{key:"476d3df1f072afdf95a6ad83e8b94b5946d66186",label:"Customer Communication",name:"customer_communication",onChange:e=>r(e,this.documents),errorText:null===(s=this.documentErrors)||void 0===s?void 0:s.customer_communication}))))}},p=t({duplicate_charge_original_payment_id:i().nullable(),duplicate_charge_explanation:i().nullable()}),m=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={duplicate_charge_documentation:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.duplicateCharge)))}componentWillLoad(){this.form=new c(p)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"4bd4aad3fbdaac994ee97aa1421a6f380657cfee"},a("div",{key:"53548ff2b4bb09c2b1d078b2657127802422558a",class:"row gy-3"},a("div",{key:"25658729932e2eb1d0706bd83106a92976e09b91",class:"col-12"},a("h2",{key:"885bf37ba0a013397d4fef68683b24e9e8e1bed6",class:"h5",part:d},"Duplicate Charge")),a("div",{key:"2f38e6451c2d982900729639994977b8ef8f8c04",class:"col-12"},a("form-control-text",{key:"8cf20ffcd748bee860c1c8a52326a265bbe32696",label:"Original Payment ID",name:"duplicate_charge_original_payment_id",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.duplicate_charge_original_payment_id,inputHandler:this.inputHandler,errorText:this.errors.duplicate_charge_original_payment_id})),a("div",{key:"e61d85188051830d2e674cfc39dab73ada597c66",class:"col-12"},a("form-control-textarea",{key:"762f300d71a99a31030ed052299129ae8457ad4c",label:"Duplicate Charge Explanation",name:"duplicate_charge_explanation",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.duplicate_charge_explanation,inputHandler:this.inputHandler,errorText:this.errors.duplicate_charge_explanation})),a("div",{key:"c5a1d7368132ba063d080ec7d071bd9131381ad2",class:"col-12"},a("form-control-file-v2",{key:"3bd9928e8a212e1665d446cb31ae9e02d6645437",label:"Duplicate Charge Documentation",name:"duplicate_charge_documentation",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.duplicate_charge_documentation}))))}},y=t({customer_purchase_ip_address:i().nullable()}),_=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={activity_log:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.electronicEvidence)))}componentWillLoad(){this.form=new c(y)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"00fa5deacbf19befd07d7d8764db8e3474377d5a"},a("div",{key:"be3d0b6775e78352bdaf4d0e739da61444fae572",class:"row gy-3"},a("div",{key:"e55a58628d1baad34be38d5d21598c6a372dd3c3",class:"col-12"},a("h2",{key:"463ec945a9cc0e46350b13c774b634ef25bde2e9",class:"h5",part:d},"Electronic Evidence")),a("div",{key:"5576a4d1b32a0c2d2d4341bf591721aed6fcf6a4",class:"col-12"},a("form-control-text",{key:"9f64b68724ba8b2bdf435b02077fd362f8fe1ab1",label:"Purchase IP Address",name:"customer_purchase_ip_address",helpText:"The IP address used by the customer during the purchase.",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.customer_purchase_ip_address,inputHandler:this.inputHandler,errorText:this.errors.customer_purchase_ip_address})),a("div",{key:"e5b2635ede15e41e9e686ab338448d3c2fdf8166",class:"col-12"},a("form-control-file-v2",{key:"5137a992c79a1ccfcb8f3a114d1a12823b597dd2",label:"Activity Logs",name:"activity_log",helpText:"Any server or activity logs that provide evidence of the customer's access to or download of the purchased digital product. This information should encompass IP addresses, relevant timestamps, and any detailed records of activity.",onChange:e=>r(e,this.documents),errorText:null===(t=this.documentErrors)||void 0===t?void 0:t.activity_log}))))}},k=t({product_description:i().nullable(),service_date:i().nullable()}),g=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={service_documentation:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.productOrService)))}componentWillLoad(){this.form=new c(k)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"d0b168de486d51cd6141f2d80441b7e5f4fac5cc"},a("div",{key:"bea13ed13614f43b801be60c46673fb98ff09cc8",class:"row gy-3"},a("div",{key:"1163ad6cff89e6fb29b16622e1aed6e55a5ee435",class:"col-12"},a("h2",{key:"6f4fc9439e0a95d6e5992d7655f1c6e8f1b2b7bd",class:"h5",part:d},"Product & Service Details")),a("div",{key:"3111413dc874eaa80e21ec6838d8c0896f38ce2e",class:"col-12"},a("form-control-text",{key:"3a18e08d653c67912f904337e37d786588e50217",label:"Product Description",name:"product_description",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.product_description,inputHandler:this.inputHandler,errorText:this.errors.product_description})),a("div",{key:"ea2202cf65741022ff7363cc325948944a18afb2",class:"col-12"},a("form-control-date",{key:"c8ceda1e61e9dbf7496173ec30e0c8f6d1b48f91",label:"Service Date",name:"service_date",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.service_date,inputHandler:this.inputHandler,errorText:this.errors.service_date})),a("div",{key:"fb3e555b7781977e80541d1b2d6e7bd10b4ec087",class:"col-12"},a("form-control-file-v2",{key:"2b459a198427db073a6d5e2a1ed5141cc6fc2d20",label:"Service Documentation",name:"service_documentation",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.service_documentation}))))}},x=t({refund_policy_disclosure:i().nullable(),refund_refusal_explanation:i().nullable()}),j=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={refund_policy:[],receipt:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.refundPolicy)))}componentWillLoad(){this.form=new c(x)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c;return a("div",{key:"f04cacfa7617a6430a0e4d264248dfa1606ef988"},a("div",{key:"aa3b2d3fcd2263e6d5033b68b9524250bb51d7fa",class:"row gy-3"},a("div",{key:"e2154a203be02f1f6ed60666799db30f6b2e10fe",class:"col-12"},a("h2",{key:"2856f16f60d6310c7dd64c86de1ebf7e01fac1fc",class:"h5",part:d},"Refund Policy and Receipt")),a("div",{key:"94187589fdeb685fcc99e5ea2c6868ceedfd5ed2",class:"col-12"},a("form-control-textarea",{key:"fbaa1a08ab910c4ac31a53bd1385a05abcff0bb5",label:"Refund Policy Disclosure",name:"refund_policy_disclosure",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.refund_policy_disclosure,inputHandler:this.inputHandler})),a("div",{key:"45e893fa517222ac88333b306ae28fc1eb09daa0",class:"col-12"},a("form-control-textarea",{key:"646a2b77b2e896523a5e3ec3da07e020c5a72c32",label:"Refund Refusal Explanation",name:"refund_refusal_explanation",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.refund_refusal_explanation,inputHandler:this.inputHandler})),a("div",{key:"3f4369cb2f2aac9ede8f386b338c9637ab4f5b8f",class:"col-12"},a("form-control-file-v2",{key:"867c6f97af1710b6119984bd1f87f3a5eb358dc6",label:"Upload Refund Policy",name:"refund_policy",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.refund_policy})),a("div",{key:"066f2d66a0dd5be5c47d44620c295b952a4755cd",class:"col-12"},a("form-control-file-v2",{key:"2036cbddd0ebf663401154120b5c1627fdc93df3",label:"Upload Receipt",name:"receipt",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.receipt}))))}},O=t({shipping_carrier:i().nullable(),shipping_tracking_number:i().nullable(),shipping_date:i().nullable(),shipping_address:i().nullable()}),T=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={shipping_documentation:[]},this.documentList=[],this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.shippingDetails)))}componentWillLoad(){this.form=new c(O)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c,s;return a("div",{key:"3b414c89e4d310b598685ef4e0595361edbe4783"},a("div",{key:"8f630c3bff6432da2184524865d8f322c53c3685",class:"row gy-3"},a("div",{key:"116988f4f62d30c4b5312604b3cc3d1df831a5bd",class:"col-12"},a("h2",{key:"f79794380f6b9ff7e964bea19a1898f9f190f0ff",class:"h5",part:d},"Shipping Details")),a("div",{key:"b7448564e27dd9237f61df0e7c690c5705f97941",class:"col-12"},a("form-control-text",{key:"d03af28966dec1ba0ba16f8adf34ee4aae7a077e",label:"Shipping Carrier Name",name:"shipping_carrier",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.shipping_carrier,inputHandler:this.inputHandler,errorText:this.errors.shipping_carrier})),a("div",{key:"5632f97cacae9d17864e14a41789ead3b39f2ca0",class:"col-12"},a("form-control-text",{key:"9f6ff174dfcedb7a7f74a9e75a46164fcebe6095",label:"Tracking Number",name:"shipping_tracking_number",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.shipping_tracking_number,inputHandler:this.inputHandler,errorText:this.errors.shipping_tracking_number})),a("div",{key:"e7fb2b0187e8e4ea8fb30fd316291465b41f4a9d",class:"col-12"},a("form-control-date",{key:"06f39b93c95cbe6b4897585dd9ab06ad636dd933",label:"Date Shipped",name:"shipping_date",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.shipping_date,inputHandler:this.inputHandler,errorText:this.errors.shipping_date})),a("div",{key:"1d0a48b701a12129ebfa39b7482145b32006d854",class:"col-12"},a("form-control-textarea",{key:"f98b3cc3ef9423c31e3dc195a4b9896fbc3da1c9",label:"Shipping Address",name:"shipping_address",defaultValue:null===(c=this.disputeResponse)||void 0===c?void 0:c.shipping_address,inputHandler:this.inputHandler,errorText:this.errors.shipping_address})),a("div",{key:"82379a765e791a5b373a3c01b8fec6fe05ffa2d5",class:"col-12"},a("form-control-file-v2",{key:"cff1198af3f29e837b48b46eed5f385da9994a66",label:"Shipping Documentation",name:"shipping_documentation",onChange:e=>r(e,this.documents),errorText:null===(s=this.documentErrors)||void 0===s?void 0:s.shipping_documentation}))))}};export{f as additional_statement,h as cancellation_policy,v as customer_details,m as duplicate_charge,_ as electronic_evidence,g as product_or_service,j as refund_policy,T as shipping_details}
|
|
1
|
+
import{r as e,h as a}from"./p-CV0Pyo1O.js";import{c as t,a as i,F as c}from"./p-D9sqTVmd.js";import{a9 as d}from"./p-CPKMvyV_.js";import"./p-BFTU3MAI.js";const s=t({additional_statement:i().nullable()});var o,l;!function(e){e.disputeReason="dispute_reason",e.productOrService="product_or_service",e.customerDetails="customer_details",e.cancellationPolicy="cancellation_policy",e.refundPolicy="refund_policy",e.duplicateCharge="duplicate_charge",e.electronicEvidence="electronic_evidence",e.shippingDetails="shipping_details",e.additionalStatement="additional_statement"}(o||(o={})),function(e){e.activity_log="activity_log",e.cancellationPolicy="cancellation_policy",e.customerCommunication="customer_communication",e.customerSignature="customer_signature",e.duplicateChargeDocumentation="duplicate_charge_documentation",e.receipt="receipt",e.refundPolicy="refund_policy",e.serviceDocumentation="service_documentation",e.shippingDocumentation="shipping_documentation",e.uncategorizedFile="uncategorized_file"}(l||(l={}));class n{set presignedUrl(e){this._presignedUrl=e}get presignedUrl(){return this._presignedUrl}async getFileString(){const e=new Promise(((e,a)=>{const t=new FileReader;t.onload=a=>{e(a.target.result)},t.onerror=()=>{a(new Error("Error reading file"))},t.readAsArrayBuffer(this._file)}));return await e}constructor(e,a){this._file=e,this.file_name=e.name,this.file_type=e.type,this.dispute_evidence_type=a}}const r=(e,a)=>{const t=e.target,i=t.name,c=t.files;a[i]=[];for(const e of c)a[i].push(new n(e,i))},f=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.acceptedTerms=!1,this.documents={uncategorized_file:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.additionalStatement)))}componentWillLoad(){this.form=new c(s)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"6981b81dee8ead47d8e86c501b82d61aa4c337b9"},a("div",{key:"0bf8ad743eaf5fe2e8c68d79947a4c2303e782f1",class:"row gy-3"},a("div",{key:"bdd3e46477ed7667a73a81d98c62e1121660b820",class:"col-12"},a("h2",{key:"b0b8e093b3c7204526b19fc54f80ea8c681ff22e",class:"h5",part:d},"Additional Evidence")),a("div",{key:"15570a6b33fab873a7fc9faa544c8fb234515f38",class:"col-12"},a("form-control-textarea",{key:"68e08b8e96dbb74c35f1fabbb769aa95a3e0ada9",label:"Is there anything else you would like to say about this dispute?",name:"additional_statement",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.additional_statement,inputHandler:this.inputHandler,errorText:this.errors.additional_statement})),a("div",{key:"f684ffc7e55aac7d0667326c99480b796f2a9cfc",class:"col-12"},a("form-control-file-v2",{key:"8ea248120f9f2ed5fb689a1a25855266dbe561a0",label:"Additional files",name:"uncategorized_file",multiple:!0,helpText:"Upload any additional pieces of evidence that have not already been provided.",onChange:e=>r(e,this.documents),errorText:null===(t=this.documentErrors)||void 0===t?void 0:t.uncategorized_file}))))}},b=t({cancellation_policy_disclosure:i().nullable(),cancellation_rebuttal:i().nullable()}),h=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={cancellation_policy:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.cancellationPolicy)))}componentWillLoad(){this.form=new c(b)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"debb9fe05382d0806038547b61fe3201845db2a1"},a("div",{key:"030d5be9a41dff1954049c6ac33a79024741c43c",class:"row gy-3"},a("div",{key:"d5da527af347d6c29c30f5ed5b5295b9ef693e7f",class:"col-12"},a("h2",{key:"3f8d2da0485bd28220ae9f66db87fab49e86a734",class:"h5",part:d},"Cancellation Policy")),a("div",{key:"d7fa3aacd80ad375ba58d1c86d8cf9d00c4cce6e",class:"col-12"},a("form-control-textarea",{key:"ca14e78ef0dcbad3b2a76cb230c2eb4a7c56f877",label:"Cancellation Policy Disclosure",name:"cancellation_policy_disclosure",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.cancellation_policy_disclosure,inputHandler:this.inputHandler,errorText:this.errors.cancellation_policy_disclosure})),a("div",{key:"e8f10ab0e5e3e9c7a0f90aa13e8680607bb64a3e",class:"col-12"},a("form-control-textarea",{key:"5ca2d11d67301b512756cbc4355939b9433be033",label:"Cancellation Rebuttal",name:"cancellation_rebuttal",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.cancellation_rebuttal,inputHandler:this.inputHandler,errorText:this.errors.cancellation_rebuttal})),a("div",{key:"36b8ef8f62721f220a05b1571bb347641b433b56",class:"col-12"},a("form-control-file-v2",{key:"c04f383cf55abd36b753718c2170d64f97935e7f",label:"Upload Cancellation Policy",name:"cancellation_policy",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.cancellation_policy}))))}},u=t({customer_name:i().nullable(),customer_email_address:i().nullable(),customer_billing_address:i().nullable()}),v=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={customer_signature:[],customer_communication:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.customerDetails)))}componentWillLoad(){this.form=new c(u)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c,s;return a("div",{key:"91e26b2e75fdd29814c58122e5aeae0d4d696032"},a("div",{key:"029a3828b8682fdd10af400dccceff109f866509",class:"row gy-3"},a("div",{key:"71fa3ded5566c5c18c682b8cfdfdcc5ebba2db44",class:"col-12"},a("h2",{key:"95eb1ed9da9cd955fa9c4c7a83368ac3c3378d5b",class:"h5",part:d},"Customer Details")),a("div",{key:"9450f8bd033efc7d48d62ce343b8b43833887f63",class:"col-12"},a("form-control-text",{key:"5690f7d9a46e2d58bdc24af0aab3798664f21745",label:"Full Name",name:"customer_name",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.customer_name,inputHandler:this.inputHandler,errorText:this.errors.customer_name})),a("div",{key:"a12aa4cb464e5df7f045302b08801adca70005f6",class:"col-12"},a("form-control-text",{key:"39cdb0b558b87a7eae0528ea40b9ca4175b4cf7c",label:"Email",name:"customer_email_address",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.customer_email_address,inputHandler:this.inputHandler,errorText:this.errors.customer_email_address})),a("div",{key:"13604ae63374c6fa1805d8c4be0ba55fc166a924",class:"col-12"},a("form-control-textarea",{key:"60a110f277175418c2ec0938600ad4b04f885ee3",label:"Billing Address",name:"customer_billing_address",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.customer_billing_address,inputHandler:this.inputHandler,errorText:this.errors.customer_billing_address})),a("div",{key:"abaa8888fff9952b3433c49e82a7150d6cd971dd",class:"col-12"},a("form-control-file-v2",{key:"e2e79edd8eaafd93cfdb91fd6a3b77645c1d28f2",label:"Customer Signature",name:"customer_signature",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.customer_signature})),a("div",{key:"04bfc4bf3e735cccf70fb83d2e0882662b389727",class:"col-12"},a("form-control-file-v2",{key:"476d3df1f072afdf95a6ad83e8b94b5946d66186",label:"Customer Communication",name:"customer_communication",onChange:e=>r(e,this.documents),errorText:null===(s=this.documentErrors)||void 0===s?void 0:s.customer_communication}))))}},p=t({duplicate_charge_original_payment_id:i().nullable(),duplicate_charge_explanation:i().nullable()}),m=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={duplicate_charge_documentation:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.duplicateCharge)))}componentWillLoad(){this.form=new c(p)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"4bd4aad3fbdaac994ee97aa1421a6f380657cfee"},a("div",{key:"53548ff2b4bb09c2b1d078b2657127802422558a",class:"row gy-3"},a("div",{key:"25658729932e2eb1d0706bd83106a92976e09b91",class:"col-12"},a("h2",{key:"885bf37ba0a013397d4fef68683b24e9e8e1bed6",class:"h5",part:d},"Duplicate Charge")),a("div",{key:"2f38e6451c2d982900729639994977b8ef8f8c04",class:"col-12"},a("form-control-text",{key:"8cf20ffcd748bee860c1c8a52326a265bbe32696",label:"Original Payment ID",name:"duplicate_charge_original_payment_id",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.duplicate_charge_original_payment_id,inputHandler:this.inputHandler,errorText:this.errors.duplicate_charge_original_payment_id})),a("div",{key:"e61d85188051830d2e674cfc39dab73ada597c66",class:"col-12"},a("form-control-textarea",{key:"762f300d71a99a31030ed052299129ae8457ad4c",label:"Duplicate Charge Explanation",name:"duplicate_charge_explanation",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.duplicate_charge_explanation,inputHandler:this.inputHandler,errorText:this.errors.duplicate_charge_explanation})),a("div",{key:"c5a1d7368132ba063d080ec7d071bd9131381ad2",class:"col-12"},a("form-control-file-v2",{key:"3bd9928e8a212e1665d446cb31ae9e02d6645437",label:"Duplicate Charge Documentation",name:"duplicate_charge_documentation",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.duplicate_charge_documentation}))))}},y=t({customer_purchase_ip_address:i().nullable()}),_=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={activity_log:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.electronicEvidence)))}componentWillLoad(){this.form=new c(y)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"00fa5deacbf19befd07d7d8764db8e3474377d5a"},a("div",{key:"be3d0b6775e78352bdaf4d0e739da61444fae572",class:"row gy-3"},a("div",{key:"e55a58628d1baad34be38d5d21598c6a372dd3c3",class:"col-12"},a("h2",{key:"463ec945a9cc0e46350b13c774b634ef25bde2e9",class:"h5",part:d},"Electronic Evidence")),a("div",{key:"5576a4d1b32a0c2d2d4341bf591721aed6fcf6a4",class:"col-12"},a("form-control-text",{key:"9f64b68724ba8b2bdf435b02077fd362f8fe1ab1",label:"Purchase IP Address",name:"customer_purchase_ip_address",helpText:"The IP address used by the customer during the purchase.",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.customer_purchase_ip_address,inputHandler:this.inputHandler,errorText:this.errors.customer_purchase_ip_address})),a("div",{key:"e5b2635ede15e41e9e686ab338448d3c2fdf8166",class:"col-12"},a("form-control-file-v2",{key:"5137a992c79a1ccfcb8f3a114d1a12823b597dd2",label:"Activity Logs",name:"activity_log",helpText:"Any server or activity logs that provide evidence of the customer's access to or download of the purchased digital product. This information should encompass IP addresses, relevant timestamps, and any detailed records of activity.",onChange:e=>r(e,this.documents),errorText:null===(t=this.documentErrors)||void 0===t?void 0:t.activity_log}))))}},k=t({product_description:i().nullable(),service_date:i().nullable()}),g=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={service_documentation:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.productOrService)))}componentWillLoad(){this.form=new c(k)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"d0b168de486d51cd6141f2d80441b7e5f4fac5cc"},a("div",{key:"bea13ed13614f43b801be60c46673fb98ff09cc8",class:"row gy-3"},a("div",{key:"1163ad6cff89e6fb29b16622e1aed6e55a5ee435",class:"col-12"},a("h2",{key:"6f4fc9439e0a95d6e5992d7655f1c6e8f1b2b7bd",class:"h5",part:d},"Product & Service Details")),a("div",{key:"3111413dc874eaa80e21ec6838d8c0896f38ce2e",class:"col-12"},a("form-control-text",{key:"3a18e08d653c67912f904337e37d786588e50217",label:"Product Description",name:"product_description",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.product_description,inputHandler:this.inputHandler,errorText:this.errors.product_description})),a("div",{key:"ea2202cf65741022ff7363cc325948944a18afb2",class:"col-12"},a("form-control-date",{key:"c8ceda1e61e9dbf7496173ec30e0c8f6d1b48f91",label:"Service Date",name:"service_date",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.service_date,inputHandler:this.inputHandler,errorText:this.errors.service_date})),a("div",{key:"fb3e555b7781977e80541d1b2d6e7bd10b4ec087",class:"col-12"},a("form-control-file-v2",{key:"2b459a198427db073a6d5e2a1ed5141cc6fc2d20",label:"Service Documentation",name:"service_documentation",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.service_documentation}))))}},x=t({refund_policy_disclosure:i().nullable(),refund_refusal_explanation:i().nullable()}),j=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={refund_policy:[],receipt:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.refundPolicy)))}componentWillLoad(){this.form=new c(x)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c;return a("div",{key:"f04cacfa7617a6430a0e4d264248dfa1606ef988"},a("div",{key:"aa3b2d3fcd2263e6d5033b68b9524250bb51d7fa",class:"row gy-3"},a("div",{key:"e2154a203be02f1f6ed60666799db30f6b2e10fe",class:"col-12"},a("h2",{key:"2856f16f60d6310c7dd64c86de1ebf7e01fac1fc",class:"h5",part:d},"Refund Policy and Receipt")),a("div",{key:"94187589fdeb685fcc99e5ea2c6868ceedfd5ed2",class:"col-12"},a("form-control-textarea",{key:"fbaa1a08ab910c4ac31a53bd1385a05abcff0bb5",label:"Refund Policy Disclosure",name:"refund_policy_disclosure",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.refund_policy_disclosure,inputHandler:this.inputHandler})),a("div",{key:"45e893fa517222ac88333b306ae28fc1eb09daa0",class:"col-12"},a("form-control-textarea",{key:"646a2b77b2e896523a5e3ec3da07e020c5a72c32",label:"Refund Refusal Explanation",name:"refund_refusal_explanation",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.refund_refusal_explanation,inputHandler:this.inputHandler})),a("div",{key:"3f4369cb2f2aac9ede8f386b338c9637ab4f5b8f",class:"col-12"},a("form-control-file-v2",{key:"867c6f97af1710b6119984bd1f87f3a5eb358dc6",label:"Upload Refund Policy",name:"refund_policy",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.refund_policy})),a("div",{key:"066f2d66a0dd5be5c47d44620c295b952a4755cd",class:"col-12"},a("form-control-file-v2",{key:"2036cbddd0ebf663401154120b5c1627fdc93df3",label:"Upload Receipt",name:"receipt",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.receipt}))))}},O=t({shipping_carrier:i().nullable(),shipping_tracking_number:i().nullable(),shipping_date:i().nullable(),shipping_address:i().nullable()}),T=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={shipping_documentation:[]},this.documentList=[],this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.shippingDetails)))}componentWillLoad(){this.form=new c(O)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c,s;return a("div",{key:"3b414c89e4d310b598685ef4e0595361edbe4783"},a("div",{key:"8f630c3bff6432da2184524865d8f322c53c3685",class:"row gy-3"},a("div",{key:"116988f4f62d30c4b5312604b3cc3d1df831a5bd",class:"col-12"},a("h2",{key:"f79794380f6b9ff7e964bea19a1898f9f190f0ff",class:"h5",part:d},"Shipping Details")),a("div",{key:"b7448564e27dd9237f61df0e7c690c5705f97941",class:"col-12"},a("form-control-text",{key:"d03af28966dec1ba0ba16f8adf34ee4aae7a077e",label:"Shipping Carrier Name",name:"shipping_carrier",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.shipping_carrier,inputHandler:this.inputHandler,errorText:this.errors.shipping_carrier})),a("div",{key:"5632f97cacae9d17864e14a41789ead3b39f2ca0",class:"col-12"},a("form-control-text",{key:"9f6ff174dfcedb7a7f74a9e75a46164fcebe6095",label:"Tracking Number",name:"shipping_tracking_number",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.shipping_tracking_number,inputHandler:this.inputHandler,errorText:this.errors.shipping_tracking_number})),a("div",{key:"e7fb2b0187e8e4ea8fb30fd316291465b41f4a9d",class:"col-12"},a("form-control-date",{key:"06f39b93c95cbe6b4897585dd9ab06ad636dd933",label:"Date Shipped",name:"shipping_date",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.shipping_date,inputHandler:this.inputHandler,errorText:this.errors.shipping_date})),a("div",{key:"1d0a48b701a12129ebfa39b7482145b32006d854",class:"col-12"},a("form-control-textarea",{key:"f98b3cc3ef9423c31e3dc195a4b9896fbc3da1c9",label:"Shipping Address",name:"shipping_address",defaultValue:null===(c=this.disputeResponse)||void 0===c?void 0:c.shipping_address,inputHandler:this.inputHandler,errorText:this.errors.shipping_address})),a("div",{key:"82379a765e791a5b373a3c01b8fec6fe05ffa2d5",class:"col-12"},a("form-control-file-v2",{key:"cff1198af3f29e837b48b46eed5f385da9994a66",label:"Shipping Documentation",name:"shipping_documentation",onChange:e=>r(e,this.documents),errorText:null===(s=this.documentErrors)||void 0===s?void 0:s.shipping_documentation}))))}};export{f as additional_statement,h as cancellation_policy,v as customer_details,m as duplicate_charge,_ as electronic_evidence,g as product_or_service,j as refund_policy,T as shipping_details}
|