@justifi/webcomponents 6.13.2 → 6.13.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{Analytics-F9eGV4SU.js → Analytics-Bnqim3De.js} +2 -2
- package/dist/cjs/{Api-BioDE5he.js → Api-DiVnyVMc.js} +19 -3
- package/dist/cjs/additional-questions-form-step_15.cjs.entry.js +6 -6
- package/dist/cjs/bank-account-billing-form-simple_4.cjs.entry.js +1 -1
- package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
- package/dist/cjs/{business-identity-schema-BA385xf-.js → business-identity-schema-Da3PJrGG.js} +1 -1
- package/dist/cjs/{business.service-DOGeb2O6.js → business.service-xyk3nSbS.js} +1 -1
- package/dist/cjs/card-form.cjs.entry.js +2 -2
- package/dist/cjs/{check-pkg-version--A_rGEJu.js → check-pkg-version-DdEYSubN.js} +1 -1
- package/dist/cjs/{checkout.service-Bdr5qUHj.js → checkout.service-BvQmucoL.js} +1 -1
- package/dist/cjs/dispute-notification_2.cjs.entry.js +5 -5
- package/dist/cjs/{event-types-DWDQKDv4.js → event-types-Dzra0qB3.js} +1 -1
- package/dist/cjs/{get-subaccounts-Dgl7ECtg.js → get-subaccounts-h69ubhBi.js} +1 -1
- package/dist/cjs/hidden-input_2.cjs.entry.js +1 -1
- package/dist/cjs/justifi-apple-pay_11.cjs.entry.js +6 -6
- package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +4 -4
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +4 -4
- package/dist/cjs/justifi-business-details.cjs.entry.js +5 -5
- package/dist/cjs/justifi-business-form.cjs.entry.js +8 -8
- package/dist/cjs/justifi-card-form.cjs.entry.js +4 -4
- package/dist/cjs/justifi-checkout-qr-code.cjs.entry.js +4 -4
- package/dist/cjs/justifi-checkout.cjs.entry.js +4 -4
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +6 -6
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +5 -5
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +4 -4
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +6 -6
- package/dist/cjs/justifi-payment-details.cjs.entry.js +5 -5
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +15 -6
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +5 -5
- package/dist/cjs/justifi-payments-list.cjs.entry.js +5 -5
- package/dist/cjs/justifi-payout-details.cjs.entry.js +5 -5
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +5 -5
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +6 -6
- package/dist/cjs/justifi-qr-terminal.cjs.entry.js +5 -5
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +5 -5
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +4 -4
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +4 -4
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +6 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-Cuwhrp-b.js → package-CuQyxWw2.js} +1 -1
- package/dist/cjs/{payment-provisioning-actions-B4x7lnyF.js → payment-provisioning-actions-DwgI9weK.js} +5 -4
- package/dist/cjs/{payment.service-a5EL3s2d.js → payment.service-BdK_wsu2.js} +1 -1
- package/dist/cjs/{payout.service-BJtGBHsQ.js → payout.service-CVSqMmCW.js} +1 -1
- package/dist/cjs/{plaid.service-DpiLY-5D.js → plaid.service-Dj-AZOjk.js} +1 -1
- package/dist/cjs/{schema-validations-C2XsZnqK.js → schema-validations-Cs0mSKR7.js} +2 -1
- package/dist/cjs/{terminal.service-DN2A-bNx.js → terminal.service-Dzukw0o7.js} +1 -1
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/api/Api.js +19 -3
- package/dist/collection/components/business-forms/payment-provisioning/justifi-payment-provisioning.js +7 -0
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-actions.js +5 -4
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-submission-failed.js +6 -0
- package/dist/collection/components/business-forms/schemas/schema-validations.js +2 -1
- package/dist/docs.json +1 -1
- package/dist/esm/{Analytics-CQwgYl2v.js → Analytics-CkhiYS1_.js} +3 -3
- package/dist/esm/{Api-DjAL73GZ.js → Api-CTkszAxp.js} +20 -4
- package/dist/esm/{Plaid-C8qoMZLV.js → Plaid-XJ1Wi_Qy.js} +1 -1
- package/dist/esm/additional-questions-details_5.entry.js +1 -1
- package/dist/esm/additional-questions-form-step_15.entry.js +9 -9
- package/dist/esm/bank-account-billing-form-simple_4.entry.js +1 -1
- package/dist/esm/bank-account-document-form-inputs.entry.js +2 -2
- package/dist/esm/bank-account-form.entry.js +3 -3
- package/dist/esm/{business-identity-schema-Csou60ZC.js → business-identity-schema-C1ot9Zas.js} +1 -1
- package/dist/esm/{business.service-BGXqAyxu.js → business.service-CJrHGJHW.js} +2 -2
- package/dist/esm/card-form.entry.js +3 -3
- package/dist/esm/{check-pkg-version-2VZtm0yL.js → check-pkg-version-CoKEouKg.js} +1 -1
- package/dist/esm/{checkout-actions-D8JS2l5e.js → checkout-actions-CheVrS18.js} +2 -2
- package/dist/esm/{checkout.service-sHKaW-M0.js → checkout.service-fPRUtr9H.js} +2 -2
- package/dist/esm/dispute-notification_2.entry.js +8 -8
- package/dist/esm/{event-types-ynZLear3.js → event-types-BtWMbtaC.js} +2 -2
- package/dist/esm/form-control-monetary.entry.js +1 -1
- package/dist/esm/{get-business-DAv_b3vf.js → get-business-DTNQJoh_.js} +2 -2
- package/dist/esm/{get-payment-details-Bipad3jX.js → get-payment-details-CSX5fwOG.js} +2 -2
- package/dist/esm/{get-subaccounts-FqCT2s3S.js → get-subaccounts-Cy2mYsaE.js} +3 -3
- package/dist/esm/hidden-input_2.entry.js +1 -1
- package/dist/esm/justifi-apple-pay_11.entry.js +10 -10
- package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +6 -6
- package/dist/esm/justifi-bank-account-form.entry.js +6 -6
- package/dist/esm/justifi-business-details.entry.js +9 -9
- package/dist/esm/justifi-business-form.entry.js +11 -11
- package/dist/esm/justifi-card-form.entry.js +6 -6
- package/dist/esm/justifi-checkout-qr-code.entry.js +6 -6
- package/dist/esm/justifi-checkout.entry.js +6 -6
- package/dist/esm/justifi-checkouts-list-filters.entry.js +2 -2
- package/dist/esm/justifi-checkouts-list.entry.js +9 -9
- package/dist/esm/justifi-dispute-management.entry.js +8 -8
- package/dist/esm/justifi-gross-payment-chart.entry.js +7 -7
- package/dist/esm/justifi-order-terminals.entry.js +10 -10
- package/dist/esm/justifi-payment-details.entry.js +9 -9
- package/dist/esm/justifi-payment-provisioning.entry.js +18 -9
- package/dist/esm/justifi-payment-transactions-list.entry.js +8 -8
- package/dist/esm/justifi-payments-list-filters.entry.js +1 -1
- package/dist/esm/justifi-payments-list.entry.js +8 -8
- package/dist/esm/justifi-payout-details.entry.js +9 -9
- package/dist/esm/justifi-payout-transactions-list.entry.js +8 -8
- package/dist/esm/justifi-payouts-list-filters.entry.js +2 -2
- package/dist/esm/justifi-payouts-list.entry.js +10 -10
- package/dist/esm/justifi-qr-terminal.entry.js +9 -9
- package/dist/esm/justifi-refund-payment.entry.js +9 -9
- package/dist/esm/justifi-season-interruption-insurance.entry.js +7 -7
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +2 -2
- package/dist/esm/justifi-terminal-orders-list.entry.js +7 -7
- package/dist/esm/justifi-terminals-list-filters.entry.js +2 -2
- package/dist/esm/justifi-terminals-list.entry.js +9 -9
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-BtzgeLyZ.js → package-BP7jEC_K.js} +1 -1
- package/dist/esm/{payment-provisioning-actions-DI3QUsjh.js → payment-provisioning-actions-DjjVhIsC.js} +7 -6
- package/dist/esm/{payment.service-wSNYSRyl.js → payment.service-DqqhXGIA.js} +2 -2
- package/dist/esm/{payout.service-CTAksNmD.js → payout.service-pXbxWGPO.js} +2 -2
- package/dist/esm/{payouts-status-CeZoirpf.js → payouts-status-Ch05ZKVP.js} +2 -2
- package/dist/esm/{plaid.service-5EpJEdwX.js → plaid.service-Bb_mVHR9.js} +2 -2
- package/dist/esm/{schema-validations-CySYE883.js → schema-validations-CHxw3FkH.js} +2 -1
- package/dist/esm/{terminal.service-xjfU0mJT.js → terminal.service-AK9uBpcb.js} +2 -2
- package/dist/esm/{utils-myniydlM.js → utils-ByihSvdD.js} +1 -1
- package/dist/esm/{utils-CcA8Y5hs.js → utils-UkIEdf2x.js} +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/Api.js +19 -3
- package/dist/module/justifi-order-terminals.js +1 -1
- package/dist/module/justifi-payment-provisioning.js +11 -1
- package/dist/module/justifi-season-interruption-insurance.js +1 -1
- package/dist/module/justifi-terminals-list.js +1 -1
- package/dist/module/package.js +1 -1
- package/dist/module/payment-provisioning-actions.js +5 -4
- package/dist/module/schema-validations.js +2 -1
- package/dist/module/utils2.js +1 -1
- package/dist/types/components/business-forms/payment-provisioning/justifi-payment-provisioning.d.ts +1 -0
- package/dist/types/components/business-forms/payment-provisioning/payment-provisioning-submission-failed.d.ts +1 -0
- package/dist/webcomponents/p-0ef51b2d.entry.js +1 -0
- package/dist/webcomponents/p-1f88e411.entry.js +1 -0
- package/dist/webcomponents/p-28f92f1f.entry.js +1 -0
- package/dist/webcomponents/{p-d93d9d58.entry.js → p-2cd01fae.entry.js} +1 -1
- package/dist/webcomponents/{p-10f3b8df.entry.js → p-2dee737f.entry.js} +1 -1
- package/dist/webcomponents/p-36638161.entry.js +1 -0
- package/dist/webcomponents/{p-7b6cf400.entry.js → p-36b16db2.entry.js} +1 -1
- package/dist/webcomponents/{p-d5197891.entry.js → p-37e7429c.entry.js} +1 -1
- package/dist/webcomponents/{p-49d9c0a4.entry.js → p-46a06ce6.entry.js} +1 -1
- package/dist/webcomponents/{p-a404b995.entry.js → p-483dc944.entry.js} +1 -1
- package/dist/webcomponents/{p-f0961751.entry.js → p-529c5c9f.entry.js} +1 -1
- package/dist/webcomponents/{p-d9fd1c50.entry.js → p-625830fe.entry.js} +1 -1
- package/dist/webcomponents/{p-ee97795a.entry.js → p-64d72b86.entry.js} +1 -1
- package/dist/webcomponents/{p-c8bcc54f.entry.js → p-67da2742.entry.js} +1 -1
- package/dist/webcomponents/{p-87427a4f.entry.js → p-68034a17.entry.js} +1 -1
- package/dist/webcomponents/{p-4fab9314.entry.js → p-6d52cdd4.entry.js} +1 -1
- package/dist/webcomponents/{p-64840a3d.entry.js → p-727e9ddd.entry.js} +1 -1
- package/dist/webcomponents/{p-1ac357f9.entry.js → p-76709384.entry.js} +1 -1
- package/dist/webcomponents/{p-4a30693b.entry.js → p-7776b52e.entry.js} +1 -1
- package/dist/webcomponents/{p-ebf178d2.entry.js → p-880e3388.entry.js} +1 -1
- package/dist/webcomponents/{p-a125318a.entry.js → p-90fdadf7.entry.js} +1 -1
- package/dist/webcomponents/{p-bd882260.entry.js → p-938e41c9.entry.js} +1 -1
- package/dist/webcomponents/{p-C7hX61pS.js → p-B7wfdVBf.js} +1 -1
- package/dist/webcomponents/{p-BSs-2JKu.js → p-BM88Upl5.js} +1 -1
- package/dist/webcomponents/p-BP7jEC_K.js +1 -0
- package/dist/webcomponents/p-BaZTheg9.js +1 -0
- package/dist/webcomponents/{p-DYL3RR2S.js → p-Bo36V7ni.js} +1 -1
- package/dist/webcomponents/p-BxpXvXn-.js +1 -0
- package/dist/webcomponents/p-CI-XifDo.js +1 -0
- package/dist/webcomponents/p-CP0Y19co.js +1 -0
- package/dist/webcomponents/p-CWook735.js +1 -0
- package/dist/webcomponents/{p-DXTa04jn.js → p-Cl5FLD11.js} +1 -1
- package/dist/webcomponents/{p-C_SQBHCI.js → p-CxNdigHC.js} +1 -1
- package/dist/webcomponents/{p-zZn1OXja.js → p-CykiDks3.js} +1 -1
- package/dist/webcomponents/p-DGsgQXco.js +1 -0
- package/dist/webcomponents/{p-CO8ZGkfN.js → p-DItiYtAy.js} +1 -1
- package/dist/webcomponents/{p-C1gr32IS.js → p-DK_bjvk1.js} +1 -1
- package/dist/webcomponents/p-DWdj6UhE.js +1 -0
- package/dist/webcomponents/{p-CxBrydeX.js → p-D_MQLfzf.js} +1 -1
- package/dist/webcomponents/{p-R_0S69Pr.js → p-D_ULdupf.js} +1 -1
- package/dist/webcomponents/{p-CdwzNfP1.js → p-IFhZFB4v.js} +1 -1
- package/dist/webcomponents/p-UEdJ7AYc.js +1 -0
- package/dist/webcomponents/{p-f4de4ac0.entry.js → p-a30af70b.entry.js} +1 -1
- package/dist/webcomponents/{p-65908b5f.entry.js → p-a5443425.entry.js} +1 -1
- package/dist/webcomponents/{p-fa21fe56.entry.js → p-b6c15db5.entry.js} +1 -1
- package/dist/webcomponents/{p-e3f8541c.entry.js → p-b73bbc07.entry.js} +1 -1
- package/dist/webcomponents/{p-4bb9d772.entry.js → p-bfd73ef0.entry.js} +1 -1
- package/dist/webcomponents/{p-d1cbeb65.entry.js → p-c9be0d54.entry.js} +1 -1
- package/dist/webcomponents/{p-9c1a0efc.entry.js → p-cc0cfbed.entry.js} +1 -1
- package/dist/webcomponents/{p-54e343d3.entry.js → p-ce7c1141.entry.js} +1 -1
- package/dist/webcomponents/{p-5e59e283.entry.js → p-df340d99.entry.js} +1 -1
- package/dist/webcomponents/{p-67364f1d.entry.js → p-e033ced2.entry.js} +1 -1
- package/dist/webcomponents/{p-5111a9f5.entry.js → p-e47d21e5.entry.js} +1 -1
- package/dist/webcomponents/p-ee900ccf.entry.js +1 -0
- package/dist/webcomponents/{p-c2de24fe.entry.js → p-f266fafb.entry.js} +1 -1
- package/dist/webcomponents/{p-9c0760b9.entry.js → p-f805c9ac.entry.js} +1 -1
- package/dist/webcomponents/{p-b08c76da.entry.js → p-fb86e6f0.entry.js} +1 -1
- package/dist/webcomponents/{p-4821c092.entry.js → p-fb8c8999.entry.js} +1 -1
- package/dist/webcomponents/{p-Cn7z5L7J.js → p-ph646MSj.js} +1 -1
- package/dist/webcomponents/{p-B62JX_Dh.js → p-rhS9V7qg.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/webcomponents/p-648c6cb1.entry.js +0 -1
- package/dist/webcomponents/p-7d04803e.entry.js +0 -1
- package/dist/webcomponents/p-85b155b0.entry.js +0 -1
- package/dist/webcomponents/p-9c7bce35.entry.js +0 -1
- package/dist/webcomponents/p-BB8Ce9rp.js +0 -1
- package/dist/webcomponents/p-BUHsyQpA.js +0 -1
- package/dist/webcomponents/p-BtzgeLyZ.js +0 -1
- package/dist/webcomponents/p-CPJC6tlj.js +0 -1
- package/dist/webcomponents/p-DP9ysr2K.js +0 -1
- package/dist/webcomponents/p-Da3fPDxu.js +0 -1
- package/dist/webcomponents/p-De4Pig-y.js +0 -1
- package/dist/webcomponents/p-NzPaWKbY.js +0 -1
- package/dist/webcomponents/p-e4bc8c7c.entry.js +0 -1
- package/dist/webcomponents/p-z3RFjy9B.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={name:"@justifi/webcomponents",version:"6.13.4"};export{e as p}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as n}from"./p-CP0Y19co.js";import"./p-Cl5FLD11.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";const t=n();class i{async getLinkToken(n,i,o,e){return t.post({endpoint:`plaid/${i}/link`,body:{checkout_id:o},authToken:n,signal:e})}async getLinkTokenForVerification(n,i,o){return t.post({endpoint:`entities/plaid/${i}/link_token`,body:{},authToken:n,signal:o})}async getBankAccountData(n,i,o){return t.get({endpoint:`entities/plaid/${i}/bank_account`,authToken:n,signal:o})}async postPlaidVerifiedBankAccountData(n,i,o,e){return t.post({endpoint:`entities/plaid/${i}/bank_account`,body:o,authToken:n,signal:e})}async tokenizeBankAccount(n,i,o,e,a,c){const s=`plaid/${i}/tokenize`,k={public_token:o};return e&&(k.link_token_id=e),a&&(k.payment_method_group_id=a),t.post({endpoint:s,body:k,authToken:n,signal:c})}}export{i as P}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t}from"./p-
|
|
1
|
+
import{p as t}from"./p-BP7jEC_K.js";import{A as s}from"./p-CP0Y19co.js";import"./p-Cl5FLD11.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";const i=s();class e{async record(t){return i.post({endpoint:"analytics",body:t})}}class n{constructor(t){this.eventListeners=new Map,this.handleCustomEvent=async t=>{await this.service.record(t)},window.location.origin.includes("localhost")||window.location.origin.includes("docs.justifi.tech")||(this.service=new e,this.componentInstance=t,this.setUpBasicData(),this.setupLifecycleTracking(),this.trackCustomEvents())}get resourceId(){return this.componentInstance.accountId||this.componentInstance.businessId||this.componentInstance.paymentId||this.componentInstance.payoutId||this.componentInstance.checkoutId}setUpBasicData(){this.basicData={component_name:this.componentInstance.tagName,component_version:t.version,client_user_agent:navigator.userAgent,client_platform:navigator.userAgent,client_origin:window.location.origin,resource_id:this.resourceId}}trackCustomEvents(){this.eventEmitters=["submit-event","error-event"],this.eventEmitters.forEach((t=>{if("function"==typeof this.componentInstance.addEventListener){const s=s=>this.handleCustomEvent({event_type:t,data:Object.assign(Object.assign({},this.basicData),"error-event"===t&&{error:s.detail})});this.eventListeners.set(t,s),this.componentInstance.addEventListener(t,s)}}))}setupLifecycleTracking(){const t=this.componentInstance.componentDidLoad;this.componentInstance.componentDidLoad=()=>{if(this.service.record({event_type:"init",data:this.basicData}),t)return t.apply(this.componentInstance)}}cleanup(){this.eventListeners.forEach(((t,s)=>{this.componentInstance.removeEventListener(s,t)})),this.eventListeners.clear()}}export{n as J}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./p-D9sqTVmd.js";import{P as a,a as t}from"./p-DPA5TKvQ.js";import{S as s,C as r}from"./p-BcNb9bVO.js";import{a as n,c as i}from"./p-BBSnDYJw.js";const d=[{label:"Choose state / province",value:""},...s.filter((e=>""!==e.value)),...a.filter((e=>""!==e.value))],l=e=>""===e?null:e,c=/^\d+$/,m=/P\.?\s?O\.?\s?Box|Postal\sBox/i,o=e().email("Enter valid email").transform(l),u=e().matches(/^\d{10}$/,"Enter valid phone number").transform(l),b=e().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").transform(l),v=e().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").transform(l),h=e().matches(/^(?:http(s)?:\/\/)?(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)$/,"Enter valid website url").transform(l),N=e().transform(l),E=e().min(2,"Industry must be at least 2 characters").max(50,"Industry must be less than 50 characters").transform(l),p=e().matches(c,"Enter valid tax id, SSN, or EIN").test("not-repeat","Enter valid tax id, SSN, or EIN",(e=>!/^(\d)\1+$/.test(e))).test("not-seq","Enter valid tax id, SSN, or EIN",(e=>"123456789"!==e)).transform(l),S=a=>e().matches(t[a].postalRegex,"Enter valid postal code").transform(l),B=a=>a===r.CAN?e().matches(c,"Enter valid SIN").length(t[a].identityDigits,"Enter valid SIN").test("not-repeat","Enter valid SIN",(e=>!/^(\d)\1+$/.test(e))).test("not-seq","Enter valid SIN",(e=>"123456789"!==e)).transform(l):y,A=a=>a===r.CAN?e().matches(c,"Enter valid Business Number (BN)").length(t[a].taxIdDigits,"Enter valid Business Number (BN)").test("not-repeat","Enter valid Business Number (BN)",(e=>!e||!/^(\d)\1+$/.test(e))).test("not-seq","Enter valid Business Number (BN)",(e=>!e||"123456789"!==e)).transform(l):p,g=e().test("past-date","Date of registration must be in the past",(e=>{const a=new Date(e);return a.setDate(a.getDate()+1),a<=new Date})).transform(l),w=e().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").transform(l),x=e().min(2,"Title must be at least 2 characters").max(50,"Title must be less than 50 characters").transform(l),$=a=>e().test("min","Enter a valid date",(e=>new Date(e)>=new Date("1902-01-01"))).test("age",`${a} must be at least 18 years old`,(e=>{const a=new Date(e),t=new Date;return t.setFullYear(t.getFullYear()-18),a<=t})).transform(l),y=e().matches(/^(?!000|666|9\d{2})\d{3}(?!00)\d{2}(?!0000)\d{4}$/,"Enter valid SSN").when("ssn_last4",{is:e=>!e||0===e.length,then:e=>e.required("Enter SSN"),otherwise:e=>e.nullable()}).test("not-repeat","Enter valid SSN",(e=>!/^(\d)\1+$/.test(e))).test("not-seq","Enter valid SSN",(e=>"123456789"!==e)).transform(l),D=e().matches(c,"Enter valid percentage").test("min","Percentage must be at least 0",(e=>!e||parseFloat(e)>=0)).test("max","Percentage must be at most 100",(e=>!e||parseFloat(e)<=100)).transform(l),I=e().min(5,"Address must be at least 5 characters").max(100,"Address must be less than 100 characters").test("not-po-box","A PO Box is not a valid address entry",(e=>!m.test(e))).transform(l),P=e().max(100,"Address must be less than 100 characters").test("not-po-box","A PO Box is not a valid address entry",(e=>!m.test(e))).transform(l),f=e().min(2,"City must be at least 2 characters").max(50,"City must be less than 50 characters").transform(l),q=e().oneOf(d.map((e=>e.value)),"Select a valid state or province").transform(l),j=e().matches(/^((\d{5}-\d{4})|(\d{5})|([A-Z]\d[A-Z]\s\d[A-Z]\d))$/,"Enter valid postal code").transform(l),C=e().matches(c,"Enter valid revenue").transform(l),Z=e().matches(c,"Enter valid payment volume").transform(l),z=e().oneOf(n.map((e=>e.value)),"Select when service is received").transform(l),O=e().transform(l),T=e().min(2,"Name must be at least 2 characters").max(50,"Name must be less than 50 characters").transform(l),F=e().min(2,"Name must be at least 2 characters").max(50,"Name must be less than 50 characters").transform(l),_=e().oneOf(i.map((e=>e.value)),"Select account type").transform(l),V=e().min(4,"Account number must be at least 4 digits").max(17,"Account number must be less than 17 digits").matches(c,"Enter valid account number").test("not-repeat","Enter valid account number",(e=>!/^(\d)\1+$/.test(e))).transform(l),k=e().length(9,"Routing number must be 9 digits").matches(c,"Enter valid routing number").test("not-repeat","Enter valid routing number",(e=>!e||!/^(\d)\1+$/.test(e))).test("valid","Enter valid routing number",(e=>!e||(e=>{if(!e)return!1;const a=Array.from(String(e),Number);return 9===a.length&&0==(3*(a[0]+a[3]+a[6])+7*(a[1]+a[4]+a[7])+(a[2]+a[5]+a[8]))%10})(e))).transform(l);export{d as A,V as B,_ as C,F as D,T as E,c as F,k as G,v as a,N as b,b as c,g as d,o as e,z as f,Z as g,f as h,E as i,I as j,S as k,P as l,A as m,D as n,O as o,u as p,$ as q,C as r,y as s,p as t,x as u,w as v,h as w,B as x,j as y,q as z}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as r}from"./p-BcNb9bVO.js";import{C as o}from"./p-Cl5FLD11.js";import{g as s,a as e}from"./p-IFhZFB4v.js";const i=({id:i,authToken:n,service:t})=>async({onSuccess:a,onError:c,final:l})=>{var v;try{const l=await t.fetchBusiness(i,n);if(l.error){return c({error:e(l.error),code:s(null===(v=l.error)||void 0===v?void 0:v.code),severity:o.ERROR})}a({business:new r(l.data)})}catch(r){const e=s(null==r?void 0:r.code);return c({error:r.message||r,code:e,severity:o.ERROR})}finally{l()}};export{i as m}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as n,c as o}from"./p-DVJaoI_m.js";import{g as t}from"./p-BM88Upl5.js";const a=()=>{async function a(a){var e,s;const{authToken:i,endpoint:r,method:d,params:p,body:u,signal:c,headers:l}=a;await n();const h=`${o.apiOrigin}/v1/${r}`,m=p?`${h}?${new URLSearchParams(p)}`:h,y=await async function(n){return n?{Authorization:`Bearer ${n}`,"Idempotency-Key":t(),"Content-Type":"application/json"}:{"Content-Type":"application/json"}}(i),f=Object.assign(Object.assign({},y),l),T=await fetch(m,{method:d,headers:f,body:u,signal:c});if(!T)return void function(n){console.error(`Error fetching from ${n}`)}(m);if(204===T.status)return{};const g=await T.json().catch((()=>({})));if(!T.ok){const n=new Error((null===(e=null==g?void 0:g.error)||void 0===e?void 0:e.message)||("string"==typeof(null==g?void 0:g.error)?g.error:null)||(null==g?void 0:g.message)||`Request failed: ${T.status}`);throw n.code=null===(s=null==g?void 0:g.error)||void 0===s?void 0:s.code,n.status=T.status,n.body=g,n}return g}return{get:async function(n){const{authToken:o,endpoint:t,params:e,signal:s,headers:i}=n;return a({authToken:o,endpoint:t,method:"GET",params:e,signal:s,headers:i})},post:async function(n){const{authToken:o,endpoint:t,body:e,params:s,signal:i,headers:r}=n;return a({authToken:o,endpoint:t,method:"POST",params:s,body:JSON.stringify(e),signal:i,headers:r})},put:async function(n){const{authToken:o,endpoint:t,body:e,params:s,signal:i}=n;return a({authToken:o,endpoint:t,method:"PUT",params:s,body:JSON.stringify(e),signal:i})},patch:async function(n){const{authToken:o,endpoint:t,body:e,params:s,signal:i}=n;return a({authToken:o,endpoint:t,method:"PATCH",params:s,body:JSON.stringify(e),signal:i})},destroy:async function(n){const{authToken:o,endpoint:t,params:e,signal:s}=n;return a({authToken:o,endpoint:t,method:"DELETE",params:e,signal:s})}}};export{a as A}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{e as o,C as r}from"./p-Cl5FLD11.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import{g as s,a as e}from"./p-IFhZFB4v.js";const i=({id:i,authToken:t,service:a})=>async({onSuccess:p,onError:n,final:c})=>{var m;try{const c=await a.fetchPayment(i,t);if(c.error){n({error:e(c.error),code:s(null===(m=c.error)||void 0===m?void 0:m.code),severity:r.ERROR})}else p({payment:new o(c.data)})}catch(o){const i=s(null==o?void 0:o.code);n({error:e(o),code:i,severity:r.ERROR})}finally{c()}};export{i as m}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as t}from"./p-BSs-2JKu.js";var i,s,e,n,a,r,h,o,c,d,u,l,p,f,m,_,y,v,g,k,w,b,P,A,S,C,x,U,D,T,B,E,z;!function(t){t.MISSING_PROPS="missing-props",t.FETCH_ERROR="fetch-error",t.PATCH_ERROR="patch-error",t.POST_ERROR="post-error",t.UNKNOWN_ERROR="unknown-error",t.TOKENIZE_ERROR="tokenize-error",t.COMPLETE_CHECKOUT_ERROR="complete-checkout-error",t.CHECKOUT_ALREADY_COMPLETED="checkout-already-completed",t.CHECKOUT_EXPIRED="checkout-expired",t.NOT_AUTHENTICATED="not-authenticated",t.INVALID_PARAMETER="invalid-parameter",t.PROVISIONING_REQUESTED="provisioning-already-requested",t.INVALID_REFUND_AMOUNT="invalid-refund-amount",t.VALIDATION_ERROR="validation-error"}(i||(i={})),function(t){t.INFO="info",t.WARNING="warning",t.ERROR="error"}(s||(s={})),function(t){t.NOT_AUTHENTICATED="Not authenticated. Please provide a valid auth token, checkout id, and account id.",t.CHECKOUT_ALREADY_COMPLETED="Checkout already completed. Please create a new checkout.",t.CHECKOUT_EXPIRED="Checkout expired. Please create a new checkout."}(e||(e={}));class F{constructor(t){this.payment_mode=n[t.payment_mode],this.payment_token=t.payment_token,this.payment_status=t.payment_status,this.payment_response=t.payment_response,this.payment_error_code=t.payment_error_code,this.payment_error_description=t.payment_error_description,this.checkout_id=t.checkout_id,this.additional_transactions=t.additional_transactions,this.payment_id=t.payment_id,this.payment_method_id=t.payment_method_id,this.status=t.status,this.created_at=t.created_at,this.updated_at=t.updated_at}}class I{constructor(t){var i;this.id=t.id,this.description=t.description,this.payment_intent_id=t.payment_intent_id,this.account_id=t.account_id,this.platform_account_id=t.platform_account_id,this.payment_amount=t.payment_amount,this.payment_client_id=t.payment_client_id,this.payment_description=t.payment_description,this.payment_methods=t.payment_methods,this.payment_method_group_id=t.payment_method_group_id,this.payment_settings=t.payment_settings,this.bnpl=t.bnpl,this.total_amount=t.total_amount,this.insurance_amount=t.insurance_amount,this.status=r[t.status],this.payment_currency=t.payment_currency,this.mode=t.mode,this.statement_descriptor=t.statement_descriptor,this.application_fees=t.application_fees,this.successful_payment_id=t.successful_payment_id,this.created_at=t.created_at,this.updated_at=t.updated_at,this.completions=null===(i=t.completions)||void 0===i?void 0:i.map((t=>new F(t)))}get payment_mode(){var t,i,s,e,a,r;let h;if(!this.completions||0===this.completions.length)return n.unknown;const o=this.completions.sort(((t,i)=>new Date(i.updated_at).getTime()-new Date(t.updated_at).getTime()))[0];return o.payment_mode?h=o.payment_mode:(null===(s=null===(i=null===(t=o.payment_response)||void 0===t?void 0:t.data)||void 0===i?void 0:i.payment_method)||void 0===s?void 0:s.card)?h=n.card:(null===(r=null===(a=null===(e=o.payment_response)||void 0===e?void 0:e.data)||void 0===a?void 0:a.payment_method)||void 0===r?void 0:r.bank_account)&&(h=n.bank_account),h}formattedPaymentAmount(i){return t(i,this.payment_currency)}}!function(t){t.bnpl="Buy Now Pay Later",t.ecom="E-commerce",t.card="Card",t.bank_account="Bank Account",t.card_present="Card Present",t.apple_pay="Apple Pay",t.unknown=""}(n||(n={})),function(t){t.bnpl="bnpl",t.ecom="ecom",t.apple_pay="apple_pay"}(a||(a={})),function(t){t.created="created",t.completed="completed",t.attempted="attempted",t.expired="expired"}(r||(r={})),function(t){t.failed="failed",t.succeeded="succeeded"}(h||(h={})),function(t){t.won="won",t.lost="lost",t.underReview="under_review",t.needsResponse="needs_response"}(o||(o={}));class M{get needsResponse(){return this.status==o.needsResponse}get underReview(){return this.status==o.underReview}get won(){return this.status==o.won}get lost(){return this.status==o.lost}constructor(t){this.id=t.id,this.amount=t.amount,this.currency=t.currency,this.payment_id=t.payment_id,this.reason=t.reason,this.due_date=t.due_date,this.status=t.status,this.metadata=t.metadata,this.created_at=t.created_at,this.updated_at=t.updated_at,this.dispute_response=t.dispute_response?new N(t.dispute_response):void 0}}class N{constructor(t){this.additional_statement=t.additional_statement,this.cancellation_policy_disclosure=t.cancellation_policy_disclosure,this.cancellation_rebuttal=t.cancellation_rebuttal,this.customer_billing_address=t.customer_billing_address,this.customer_email_address=t.customer_email_address,this.customer_name=t.customer_name,this.customer_purchase_ip_address=t.customer_purchase_ip_address,this.duplicate_charge_explanation=t.duplicate_charge_explanation,this.product_description=t.product_description,this.refund_policy_disclosure=t.refund_policy_disclosure,this.refund_refusal_explanation=t.refund_refusal_explanation,this.service_date=t.service_date,this.shipping_address=t.shipping_address,this.shipping_carrier=t.shipping_carrier,this.shipping_date=t.shipping_date,this.shipping_tracking_number=t.shipping_tracking_number,this.duplicate_charge_original_payment_id=t.duplicate_charge_original_payment_id}}!function(t){t.automatic="automatic",t.manual="manual"}(c||(c={})),function(t){t.card="card",t.bankAccount="bankAccount",t.sezzle="sezzle",t.plaid="plaid",t.applePay="applePay"}(d||(d={})),function(t){t.card="Card",t.bankAccount="ACH",t.unknown="Unknown"}(u||(u={})),function(t){t.pending="pending",t.automatic="automatic",t.authorized="authorized",t.succeeded="succeeded",t.failed="failed",t.canceled="canceled",t.disputed="disputed",t.fully_refunded="fully_refunded",t.partially_refunded="partially_refunded"}(l||(l={})),function(t){t.usd="usd",t.cad="cad"}(p||(p={}));class R{constructor(t){this.card=t.card?new j(t.card):void 0,this.bank_account=t.bank_account?new q(t.bank_account):void 0}get payersName(){return this.card?this.card.name:this.bank_account?this.bank_account.name:null}get lastFourDigits(){return this.card?`**** ${this.card.acct_last_four}`:this.bank_account?`**** ${this.bank_account.acct_last_four}`:null}}class q{constructor(t){this.id=t.id,this.acct_last_four=t.acct_last_four,this.name=t.name,this.brand=t.brand,this.token=t.token,this.created_at=t.created_at,this.updated_at=t.updated_at}}class j{constructor(t){this.id=t.id||"",this.acct_last_four=t.acct_last_four,this.name=t.name,this.brand=t.brand,this.token=t.token,this.created_at=t.created_at,this.updated_at=t.updated_at}}class L{constructor(t){this.id=t.id,this.account_id=t.account_id,this.currency=t.currency,this.amount=t.amount,this.amount_disputed=t.amount_disputed,this.amount_refundable=t.amount_refundable,this.amount_refunded=t.amount_refunded,this.balance=t.balance,this.captured=t.captured,this.capture_strategy=t.capture_strategy,this.description=t.description,this.disputed=t.disputed,this.disputes=t.disputes,this.error_code=t.error_code,this.error_description=t.error_description,this.expedited=t.expedited,this.fee_amount=t.fee_amount,this.is_test=t.is_test,this.metadata=t.metadata,this.payment_method=new R(t.payment_method),this.payment_intent_id=t.payment_intent_id,this.refunded=t.refunded,this.status=t.status,this.created_at=t.created_at,this.updated_at=t.updated_at}get disputedStatus(){const t=this.disputes.some((t=>t.status===o.lost));return this.disputed?t?o.lost:"open":null}get payment_type(){return this.payment_method?this.payment_method.card?u.card:u.bankAccount:u.unknown}get payers_name(){return this.payment_method.payersName}get last_four_digits(){return this.payment_method.lastFourDigits}formattedPaymentAmount(i){return t(i,this.currency)}}!function(t){t.payment="payment",t.paymentFee="payment_fee",t.payout="payout",t.refund="refund",t.feeRefund="fee_refund",t.dispute="dispute",t.disputeFee="dispute_fee",t.disputeFeeRefund="dispute_fee_refund",t.disputeRefund="dispute_refund",t.applicationFeeReturned="application_fee_returned"}(f||(f={}));class V{constructor(t){this.id=t.id,this.amount=t.amount,this.balance=t.balance,this.currency=t.currency,this.financial_transaction_id=t.financial_transaction_id,this.payment_id=t.payment_id,this.payment_balance_txn_type=t.payment_balance_txn_type,this.source_id=t.source_id,this.source_type=t.source_type,this.created_at=t.created_at,this.updated_at=t.updated_at}get displayTransactionId(){return this.payment_balance_txn_type===f.paymentFee||this.payment_balance_txn_type===f.applicationFeeReturned?"--":this.source_id}formattedPaymentAmount(i){return t(i,this.currency)}}!function(t){t.paid="paid",t.failed="failed",t.forwarded="forwarded",t.scheduled="scheduled",t.in_transit="in_transit",t.canceled="canceled"}(m||(m={})),function(t){t.paid="Paid",t.failed="Failed",t.forwarded="Forwarded",t.scheduled="Scheduled",t.in_transit="In Transit",t.canceled="Canceled"}(_||(_={}));class Y{constructor(t){this.id=t.id,this.account_id=t.account_id,this.currency=t.currency,this.amount=t.amount,this.bank_account=t.bank_account,this.delivery_method=t.delivery_method||"standard",this.description=t.description,this.deposits_at=t.deposits_at,this.fees_total=t.fees_total,this.refunds_count=t.refunds_count,this.refunds_total=t.refunds_total,this.payments_count=t.payments_count,this.payments_total=t.payments_total,this.payout_type=t.payout_type,this.other_total=t.other_total,this.status=t.status,this.metadata=t.metadata,this.created_at=t.created_at,this.updated_at=t.updated_at,this.settlement_priority=t.settlement_priority||"standard"}formattedPaymentAmount(i){return t(i,this.currency)}}!function(t){t.fee="fee",t.payment="payment",t.payout="payout",t.sellerPaymentRefund="seller_payment_refund",t.disputeAmountCollected="dispute_amount_collected",t.disputeFeeCollected="dispute_fee_collected",t.sellerPayment="seller_payment",t.transfer="transfer",t.partnerPlatformProceedsCredit="partner_platform_proceeds_credit"}(y||(y={}));class ${constructor(t){this.id=t.id,this.account_id=t.account_id,this.payout_id=t.payout_id,this.financial_transaction_id=t.financial_transaction_id,this.amount=t.amount,this.fee=t.fee,this.net=t.net,this.currency=t.currency,this.source_id=t.source_id,this.description=t.description,this.txn_type=t.txn_type,this.created_at=t.created_at,this.available_on=t.available_on,this.updated_at=t.updated_at}formattedPaymentAmount(i){return t(i,this.currency)}}!function(t){t.connected="connected",t.disconnected="disconnected",t.unknown="unknown",t.pending_configuration="pending_configuration",t.archived="archived"}(v||(v={})),function(t){t.verifone="verifone"}(g||(g={}));class H{constructor(t){this.id=t.id||"",this.status=t.status,this.account_id=t.account_id||"",this.platform_account_id=t.platform_account_id||"",this.provider=t.provider||null,this.provider_id=t.provider_id||"",this.provider_serial_number=t.provider_serial_number||"",this.created_at=t.created_at||"",this.updated_at=t.updated_at||"",this.verified_at=t.verified_at||"",this.nickname=t.nickname||"",this.model_name=t.model_name||null}}!function(t){t.boardingOnly="boarding_only",t.boardingShipping="boarding_shipping"}(k||(k={})),function(t){t.created="created",t.submitted="submitted",t.completed="completed",t.in_progress="in_progress",t.on_hold="on_hold",t.canceled="canceled"}(w||(w={}));class J{constructor(t){this.id=t.id,this.business_id=t.business_id,this.company_name=t.company_name,this.sub_account_id=t.sub_account_id,this.provider=t.provider||g.verifone,this.order_items=[],this.order_type=t.order_type,this.order_status=t.order_status,this.terminals=t.terminals,this.created_at=t.created_at,this.updated_at=t.updated_at}get payload(){return{business_id:this.business_id,sub_account_id:this.sub_account_id,order_type:this.order_type,order_items:this.order_items}}get totalQuantity(){return this.order_items.reduce(((t,i)=>t+i.quantity),0)}updateTerminal(t,i){if(0===i)return void(this.order_items=this.order_items.filter((i=>i.model_name!==t)));const s=this.order_items.find((i=>i.model_name===t));s?s.quantity=i:this.order_items.push({model_name:t,quantity:i})}}!function(t){t.v400="v400",t.p400="p400+",t.e285="e285"}(b||(b={}));class K{constructor(t){this.id=t.id,this.model_name=t.model_name,this.description=t.description,this.image_url=t.image_url,this.help_url=t.help_url}}!function(t){t.test="test",t.live="live"}(P||(P={})),function(t){t.created="created",t.submitted="submitted",t.information_needed="information_needed",t.rejected="rejected",t.enabled="enabled",t.disabled="disabled",t.archived="archived"}(A||(A={}));class Q{constructor(t){this.id=t.id,this.name=t.name,this.account_type=t.account_type,this.status=t.status,this.currency=t.currency,this.platform_account_id=t.platform_account_id,this.payout_account_id=t.payout_account_id,this.business_id=t.business_id,this.application_fee_rates=t.application_fee_rates,this.processing_ready=t.processing_ready,this.payout_ready=t.payout_ready,this.related_accounts=t.related_accounts,this.created_at=t.created_at,this.updated_at=t.updated_at}}!function(t){t.voidedCheck="voided_check",t.balanceSheet="balance_sheet",t.bankStatement="bank_statement",t.governmentId="government_id",t.profitAndLossStatement="profit_and_loss_statement",t.taxReturn="tax_return",t.other="other",t.articlesOfIncorporation="articles_of_incorporation",t.businessRegistration="business_registration",t.passport="passport",t.driverLicense="driver_license",t.residentCard="resident_card",t.statusCard="status_card",t.nexusCard="nexus_card",t.citizenshipCard="citizenship_card",t.foreignPassport="foreign_passport",t.birthCertificate="birth_certificate",t.sinCard="sin_card",t.ssnCard="ssn_card"}(S||(S={})),function(t){t.pending="pending",t.uploaded="uploaded",t.canceled="canceled",t.needed="needed"}(C||(C={}));class W{constructor(t,i){this.fileData=null,this.file=t.file,this.document_type=t.document_type,this.presigned_url=null,this.record_data={business_id:i,document_type:this.document_type,file_name:this.file.name,file_type:this.file.type}}async getFileData(){if(this.fileData)return this.fileData;const t=new Promise(((t,i)=>{const s=new FileReader;s.onload=i=>{this.fileData=i.target.result,t(this.fileData)},s.onerror=()=>{i(new Error("Error reading file"))},s.readAsArrayBuffer(this.file)}));return await t}setPresignedUrl(t){this.presigned_url=t}}!function(t){t.succeeded="succeeded",t.failed="failed"}(x||(x={})),function(t){t.customerRequest="customer_request",t.duplicate="duplicate",t.fraudulent="fraudulent"}(U||(U={}));class G{constructor(t){this.amount=t.amount,this.reason=t.reason,this.description=t.description,this.metadata=t.metadata}}!function(t){t.STATUS_SUCCESS="STATUS_SUCCESS",t.STATUS_FAILURE="STATUS_FAILURE"}(D||(D={})),function(t){t.PLAIN="plain",t.BUY="buy",t.SET_UP="set-up",t.DONATE="donate",t.CHECK_OUT="check-out",t.BOOK="book",t.SUBSCRIBE="subscribe"}(T||(T={})),function(t){t.BLACK="black",t.WHITE="white",t.WHITE_OUTLINE="white-outline"}(B||(B={})),function(t){t.SUPPORTS_3DS="supports3DS",t.SUPPORTS_EMV="supportsEMV",t.SUPPORTS_CREDIT="supportsCredit",t.SUPPORTS_DEBIT="supportsDebit"}(E||(E={}));class O{constructor(t){this.merchantIdentifier=t.merchantIdentifier,this.displayName=t.displayName,this.initiative=t.initiative,this.initiativeContext=t.initiativeContext,this.buttonType=t.buttonType||T.PLAIN,this.buttonStyle=t.buttonStyle||B.BLACK,this.buttonLocale=t.buttonLocale||"en-US"}get isValid(){return!!(this.merchantIdentifier&&this.displayName&&this.initiative&&this.initiativeContext)}}class X{constructor(t){this.countryCode=t.countryCode,this.currencyCode=t.currencyCode,this.merchantCapabilities=t.merchantCapabilities,this.supportedNetworks=t.supportedNetworks,this.total=t.total,this.lineItems=t.lineItems,this.shippingMethods=t.shippingMethods,this.applicationData=t.applicationData,this.supportedCountries=t.supportedCountries}get isValid(){var t,i,s,e;return!!(this.countryCode&&this.currencyCode&&(null===(t=this.merchantCapabilities)||void 0===t?void 0:t.length)&&(null===(i=this.supportedNetworks)||void 0===i?void 0:i.length)&&(null===(s=this.total)||void 0===s?void 0:s.label)&&(null===(e=this.total)||void 0===e?void 0:e.amount))}}class Z{static isApplePaySupported(){var t;return"undefined"!=typeof window&&"ApplePaySession"in window&&(null===(t=window.ApplePaySession)||void 0===t?void 0:t.supportsVersion(3))}static canMakePayments(){var t;return this.isApplePaySupported()&&(null===(t=window.ApplePaySession)||void 0===t?void 0:t.canMakePayments())||!1}static async canMakePaymentsWithActiveCard(t){var i;if(!this.isApplePaySupported())return!1;try{return await(null===(i=window.ApplePaySession)||void 0===i?void 0:i.canMakePaymentsWithActiveCard(t))||!1}catch(t){return console.error("Error checking Apple Pay active card:",t),!1}}static formatAmount(t){return(t/100).toFixed(2)}static parseAmount(t){return Math.round(100*parseFloat(t))}static createLineItem(t,i,s="final"){return{label:t,amount:this.formatAmount(i),type:s}}static getDefaultSupportedNetworks(){return["amex","discover","masterCard","visa"]}static getDefaultMerchantCapabilities(){return[E.SUPPORTS_3DS,E.SUPPORTS_EMV,E.SUPPORTS_CREDIT,E.SUPPORTS_DEBIT]}}!function(t){t.PLAID_SDK_LOAD_FAILED="plaid-sdk-load-failed",t.PLAID_LINK_INIT_FAILED="plaid-link-init-failed",t.PLAID_LINK_TOKEN_FAILED="plaid-link-token-failed",t.PLAID_AUTHENTICATION_FAILED="plaid-authentication-failed",t.PLAID_BANK_NOT_SUPPORTED="plaid-bank-not-supported",t.PLAID_TOKEN_EXPIRED="plaid-token-expired",t.PLAID_NETWORK_ERROR="plaid-network-error",t.PLAID_USER_CANCELLED="plaid-user-cancelled",t.PLAID_TIMEOUT="plaid-timeout",t.PLAID_INVALID_CREDENTIALS="plaid-invalid-credentials",t.PLAID_ACCOUNT_LOCKED="plaid-account-locked",t.PLAID_MAINTENANCE="plaid-maintenance",t.PLAID_RATE_LIMITED="plaid-rate-limited"}(z||(z={}));const tt={[z.PLAID_SDK_LOAD_FAILED]:"Unable to load Plaid. Please refresh the page and try again.",[z.PLAID_LINK_INIT_FAILED]:"Unable to initialize bank connection. Please try again.",[z.PLAID_LINK_TOKEN_FAILED]:"Unable to connect to bank service. Please try again.",[z.PLAID_AUTHENTICATION_FAILED]:"Bank authentication failed. Please try again.",[z.PLAID_BANK_NOT_SUPPORTED]:"Your bank is not currently supported. Please try a different payment method.",[z.PLAID_TOKEN_EXPIRED]:"Your bank session has expired. Please reconnect your account.",[z.PLAID_NETWORK_ERROR]:"Network connection issue. Please check your internet connection and try again.",[z.PLAID_USER_CANCELLED]:"Bank connection was cancelled. Click to try again.",[z.PLAID_TIMEOUT]:"Bank connection timed out. Please try again.",[z.PLAID_INVALID_CREDENTIALS]:"Invalid bank credentials. Please check your username and password.",[z.PLAID_ACCOUNT_LOCKED]:"Your bank account is temporarily locked. Please contact your bank.",[z.PLAID_MAINTENANCE]:"Bank service is temporarily unavailable. Please try again later.",[z.PLAID_RATE_LIMITED]:"Too many connection attempts. Please wait a moment and try again."},it={[z.PLAID_SDK_LOAD_FAILED]:s.ERROR,[z.PLAID_LINK_INIT_FAILED]:s.ERROR,[z.PLAID_LINK_TOKEN_FAILED]:s.ERROR,[z.PLAID_AUTHENTICATION_FAILED]:s.ERROR,[z.PLAID_BANK_NOT_SUPPORTED]:s.WARNING,[z.PLAID_TOKEN_EXPIRED]:s.WARNING,[z.PLAID_NETWORK_ERROR]:s.WARNING,[z.PLAID_USER_CANCELLED]:s.INFO,[z.PLAID_TIMEOUT]:s.WARNING,[z.PLAID_INVALID_CREDENTIALS]:s.ERROR,[z.PLAID_ACCOUNT_LOCKED]:s.ERROR,[z.PLAID_MAINTENANCE]:s.WARNING,[z.PLAID_RATE_LIMITED]:s.WARNING};export{O as A,W as B,s as C,M as D,S as E,r as I,_ as P,U as R,Q as S,w as T,a,i as b,e as c,h as d,L as e,k as f,v as g,o as h,l as i,V as j,Y as k,$ as l,I as m,H as n,K as o,J as p,G as q,Z as r,X as s,D as t,B as u,T as v,E as w,it as x,tt as y,z}
|
|
1
|
+
import{f as t}from"./p-BM88Upl5.js";var i,s,e,n,a,r,h,o,c,d,u,l,p,f,m,_,y,v,g,k,w,b,P,A,C,S,U,x,D,T,B,E,z;!function(t){t.MISSING_PROPS="missing-props",t.FETCH_ERROR="fetch-error",t.PATCH_ERROR="patch-error",t.POST_ERROR="post-error",t.UNKNOWN_ERROR="unknown-error",t.TOKENIZE_ERROR="tokenize-error",t.COMPLETE_CHECKOUT_ERROR="complete-checkout-error",t.CHECKOUT_ALREADY_COMPLETED="checkout-already-completed",t.CHECKOUT_EXPIRED="checkout-expired",t.NOT_AUTHENTICATED="not-authenticated",t.INVALID_PARAMETER="invalid-parameter",t.PROVISIONING_REQUESTED="provisioning-already-requested",t.INVALID_REFUND_AMOUNT="invalid-refund-amount",t.VALIDATION_ERROR="validation-error"}(i||(i={})),function(t){t.INFO="info",t.WARNING="warning",t.ERROR="error"}(s||(s={})),function(t){t.NOT_AUTHENTICATED="Not authenticated. Please provide a valid auth token, checkout id, and account id.",t.CHECKOUT_ALREADY_COMPLETED="Checkout already completed. Please create a new checkout.",t.CHECKOUT_EXPIRED="Checkout expired. Please create a new checkout."}(e||(e={}));class F{constructor(t){this.payment_mode=n[t.payment_mode],this.payment_token=t.payment_token,this.payment_status=t.payment_status,this.payment_response=t.payment_response,this.payment_error_code=t.payment_error_code,this.payment_error_description=t.payment_error_description,this.checkout_id=t.checkout_id,this.additional_transactions=t.additional_transactions,this.payment_id=t.payment_id,this.payment_method_id=t.payment_method_id,this.status=t.status,this.created_at=t.created_at,this.updated_at=t.updated_at}}class I{constructor(t){var i;this.id=t.id,this.description=t.description,this.payment_intent_id=t.payment_intent_id,this.account_id=t.account_id,this.platform_account_id=t.platform_account_id,this.payment_amount=t.payment_amount,this.payment_client_id=t.payment_client_id,this.payment_description=t.payment_description,this.payment_methods=t.payment_methods,this.payment_method_group_id=t.payment_method_group_id,this.payment_settings=t.payment_settings,this.bnpl=t.bnpl,this.total_amount=t.total_amount,this.insurance_amount=t.insurance_amount,this.status=r[t.status],this.payment_currency=t.payment_currency,this.mode=t.mode,this.statement_descriptor=t.statement_descriptor,this.application_fees=t.application_fees,this.successful_payment_id=t.successful_payment_id,this.created_at=t.created_at,this.updated_at=t.updated_at,this.completions=null===(i=t.completions)||void 0===i?void 0:i.map((t=>new F(t)))}get payment_mode(){var t,i,s,e,a,r;let h;if(!this.completions||0===this.completions.length)return n.unknown;const o=this.completions.sort(((t,i)=>new Date(i.updated_at).getTime()-new Date(t.updated_at).getTime()))[0];return o.payment_mode?h=o.payment_mode:(null===(s=null===(i=null===(t=o.payment_response)||void 0===t?void 0:t.data)||void 0===i?void 0:i.payment_method)||void 0===s?void 0:s.card)?h=n.card:(null===(r=null===(a=null===(e=o.payment_response)||void 0===e?void 0:e.data)||void 0===a?void 0:a.payment_method)||void 0===r?void 0:r.bank_account)&&(h=n.bank_account),h}formattedPaymentAmount(i){return t(i,this.payment_currency)}}!function(t){t.bnpl="Buy Now Pay Later",t.ecom="E-commerce",t.card="Card",t.bank_account="Bank Account",t.card_present="Card Present",t.apple_pay="Apple Pay",t.unknown=""}(n||(n={})),function(t){t.bnpl="bnpl",t.ecom="ecom",t.apple_pay="apple_pay"}(a||(a={})),function(t){t.created="created",t.completed="completed",t.attempted="attempted",t.expired="expired"}(r||(r={})),function(t){t.failed="failed",t.succeeded="succeeded"}(h||(h={})),function(t){t.won="won",t.lost="lost",t.underReview="under_review",t.needsResponse="needs_response"}(o||(o={}));class M{get needsResponse(){return this.status==o.needsResponse}get underReview(){return this.status==o.underReview}get won(){return this.status==o.won}get lost(){return this.status==o.lost}constructor(t){this.id=t.id,this.amount=t.amount,this.currency=t.currency,this.payment_id=t.payment_id,this.reason=t.reason,this.due_date=t.due_date,this.status=t.status,this.metadata=t.metadata,this.created_at=t.created_at,this.updated_at=t.updated_at,this.dispute_response=t.dispute_response?new N(t.dispute_response):void 0}}class N{constructor(t){this.additional_statement=t.additional_statement,this.cancellation_policy_disclosure=t.cancellation_policy_disclosure,this.cancellation_rebuttal=t.cancellation_rebuttal,this.customer_billing_address=t.customer_billing_address,this.customer_email_address=t.customer_email_address,this.customer_name=t.customer_name,this.customer_purchase_ip_address=t.customer_purchase_ip_address,this.duplicate_charge_explanation=t.duplicate_charge_explanation,this.product_description=t.product_description,this.refund_policy_disclosure=t.refund_policy_disclosure,this.refund_refusal_explanation=t.refund_refusal_explanation,this.service_date=t.service_date,this.shipping_address=t.shipping_address,this.shipping_carrier=t.shipping_carrier,this.shipping_date=t.shipping_date,this.shipping_tracking_number=t.shipping_tracking_number,this.duplicate_charge_original_payment_id=t.duplicate_charge_original_payment_id}}!function(t){t.automatic="automatic",t.manual="manual"}(c||(c={})),function(t){t.card="card",t.bankAccount="bankAccount",t.sezzle="sezzle",t.plaid="plaid",t.applePay="applePay"}(d||(d={})),function(t){t.card="Card",t.bankAccount="ACH",t.unknown="Unknown"}(u||(u={})),function(t){t.pending="pending",t.automatic="automatic",t.authorized="authorized",t.succeeded="succeeded",t.failed="failed",t.canceled="canceled",t.disputed="disputed",t.fully_refunded="fully_refunded",t.partially_refunded="partially_refunded"}(l||(l={})),function(t){t.usd="usd",t.cad="cad"}(p||(p={}));class R{constructor(t){this.card=t.card?new j(t.card):void 0,this.bank_account=t.bank_account?new q(t.bank_account):void 0}get payersName(){return this.card?this.card.name:this.bank_account?this.bank_account.name:null}get lastFourDigits(){return this.card?`**** ${this.card.acct_last_four}`:this.bank_account?`**** ${this.bank_account.acct_last_four}`:null}}class q{constructor(t){this.id=t.id,this.acct_last_four=t.acct_last_four,this.name=t.name,this.brand=t.brand,this.token=t.token,this.created_at=t.created_at,this.updated_at=t.updated_at}}class j{constructor(t){this.id=t.id||"",this.acct_last_four=t.acct_last_four,this.name=t.name,this.brand=t.brand,this.token=t.token,this.created_at=t.created_at,this.updated_at=t.updated_at}}class L{constructor(t){this.id=t.id,this.account_id=t.account_id,this.currency=t.currency,this.amount=t.amount,this.amount_disputed=t.amount_disputed,this.amount_refundable=t.amount_refundable,this.amount_refunded=t.amount_refunded,this.balance=t.balance,this.captured=t.captured,this.capture_strategy=t.capture_strategy,this.description=t.description,this.disputed=t.disputed,this.disputes=t.disputes,this.error_code=t.error_code,this.error_description=t.error_description,this.expedited=t.expedited,this.fee_amount=t.fee_amount,this.is_test=t.is_test,this.metadata=t.metadata,this.payment_method=new R(t.payment_method),this.payment_intent_id=t.payment_intent_id,this.refunded=t.refunded,this.status=t.status,this.created_at=t.created_at,this.updated_at=t.updated_at}get disputedStatus(){const t=this.disputes.some((t=>t.status===o.lost));return this.disputed?t?o.lost:"open":null}get payment_type(){return this.payment_method?this.payment_method.card?u.card:u.bankAccount:u.unknown}get payers_name(){return this.payment_method.payersName}get last_four_digits(){return this.payment_method.lastFourDigits}formattedPaymentAmount(i){return t(i,this.currency)}}!function(t){t.payment="payment",t.paymentFee="payment_fee",t.payout="payout",t.refund="refund",t.feeRefund="fee_refund",t.dispute="dispute",t.disputeFee="dispute_fee",t.disputeFeeRefund="dispute_fee_refund",t.disputeRefund="dispute_refund",t.applicationFeeReturned="application_fee_returned"}(f||(f={}));class V{constructor(t){this.id=t.id,this.amount=t.amount,this.balance=t.balance,this.currency=t.currency,this.financial_transaction_id=t.financial_transaction_id,this.payment_id=t.payment_id,this.payment_balance_txn_type=t.payment_balance_txn_type,this.source_id=t.source_id,this.source_type=t.source_type,this.created_at=t.created_at,this.updated_at=t.updated_at}get displayTransactionId(){return this.payment_balance_txn_type===f.paymentFee||this.payment_balance_txn_type===f.applicationFeeReturned?"--":this.source_id}formattedPaymentAmount(i){return t(i,this.currency)}}!function(t){t.paid="paid",t.failed="failed",t.forwarded="forwarded",t.scheduled="scheduled",t.in_transit="in_transit",t.canceled="canceled"}(m||(m={})),function(t){t.paid="Paid",t.failed="Failed",t.forwarded="Forwarded",t.scheduled="Scheduled",t.in_transit="In Transit",t.canceled="Canceled"}(_||(_={}));class Y{constructor(t){this.id=t.id,this.account_id=t.account_id,this.currency=t.currency,this.amount=t.amount,this.bank_account=t.bank_account,this.delivery_method=t.delivery_method||"standard",this.description=t.description,this.deposits_at=t.deposits_at,this.fees_total=t.fees_total,this.refunds_count=t.refunds_count,this.refunds_total=t.refunds_total,this.payments_count=t.payments_count,this.payments_total=t.payments_total,this.payout_type=t.payout_type,this.other_total=t.other_total,this.status=t.status,this.metadata=t.metadata,this.created_at=t.created_at,this.updated_at=t.updated_at,this.settlement_priority=t.settlement_priority||"standard"}formattedPaymentAmount(i){return t(i,this.currency)}}!function(t){t.fee="fee",t.payment="payment",t.payout="payout",t.sellerPaymentRefund="seller_payment_refund",t.disputeAmountCollected="dispute_amount_collected",t.disputeFeeCollected="dispute_fee_collected",t.sellerPayment="seller_payment",t.transfer="transfer",t.partnerPlatformProceedsCredit="partner_platform_proceeds_credit"}(y||(y={}));class ${constructor(t){this.id=t.id,this.account_id=t.account_id,this.payout_id=t.payout_id,this.financial_transaction_id=t.financial_transaction_id,this.amount=t.amount,this.fee=t.fee,this.net=t.net,this.currency=t.currency,this.source_id=t.source_id,this.description=t.description,this.txn_type=t.txn_type,this.created_at=t.created_at,this.available_on=t.available_on,this.updated_at=t.updated_at}formattedPaymentAmount(i){return t(i,this.currency)}}!function(t){t.connected="connected",t.disconnected="disconnected",t.unknown="unknown",t.pending_configuration="pending_configuration",t.archived="archived"}(v||(v={})),function(t){t.verifone="verifone"}(g||(g={}));class H{constructor(t){this.id=t.id||"",this.status=t.status,this.account_id=t.account_id||"",this.platform_account_id=t.platform_account_id||"",this.provider=t.provider||null,this.provider_id=t.provider_id||"",this.provider_serial_number=t.provider_serial_number||"",this.created_at=t.created_at||"",this.updated_at=t.updated_at||"",this.verified_at=t.verified_at||"",this.nickname=t.nickname||"",this.model_name=t.model_name||null}}!function(t){t.boardingOnly="boarding_only",t.boardingShipping="boarding_shipping"}(k||(k={})),function(t){t.created="created",t.submitted="submitted",t.completed="completed",t.in_progress="in_progress",t.on_hold="on_hold",t.canceled="canceled"}(w||(w={}));class Q{constructor(t){this.id=t.id,this.business_id=t.business_id,this.company_name=t.company_name,this.sub_account_id=t.sub_account_id,this.provider=t.provider||g.verifone,this.order_items=[],this.order_type=t.order_type,this.order_status=t.order_status,this.terminals=t.terminals,this.created_at=t.created_at,this.updated_at=t.updated_at}get payload(){return{business_id:this.business_id,sub_account_id:this.sub_account_id,order_type:this.order_type,order_items:this.order_items}}get totalQuantity(){return this.order_items.reduce(((t,i)=>t+i.quantity),0)}updateTerminal(t,i){if(0===i)return void(this.order_items=this.order_items.filter((i=>i.model_name!==t)));const s=this.order_items.find((i=>i.model_name===t));s?s.quantity=i:this.order_items.push({model_name:t,quantity:i})}}!function(t){t.v400="v400",t.p400="p400+",t.e285="e285"}(b||(b={}));class W{constructor(t){this.id=t.id,this.model_name=t.model_name,this.description=t.description,this.image_url=t.image_url,this.help_url=t.help_url}}!function(t){t.test="test",t.live="live"}(P||(P={})),function(t){t.created="created",t.submitted="submitted",t.information_needed="information_needed",t.rejected="rejected",t.enabled="enabled",t.disabled="disabled",t.archived="archived"}(A||(A={}));class G{constructor(t){this.id=t.id,this.name=t.name,this.account_type=t.account_type,this.status=t.status,this.currency=t.currency,this.platform_account_id=t.platform_account_id,this.payout_account_id=t.payout_account_id,this.business_id=t.business_id,this.application_fee_rates=t.application_fee_rates,this.processing_ready=t.processing_ready,this.payout_ready=t.payout_ready,this.related_accounts=t.related_accounts,this.created_at=t.created_at,this.updated_at=t.updated_at}}!function(t){t.voidedCheck="voided_check",t.balanceSheet="balance_sheet",t.bankStatement="bank_statement",t.governmentId="government_id",t.profitAndLossStatement="profit_and_loss_statement",t.taxReturn="tax_return",t.other="other",t.articlesOfIncorporation="articles_of_incorporation",t.businessRegistration="business_registration",t.passport="passport",t.driverLicense="driver_license",t.residentCard="resident_card",t.statusCard="status_card",t.nexusCard="nexus_card",t.citizenshipCard="citizenship_card",t.foreignPassport="foreign_passport",t.birthCertificate="birth_certificate",t.sinCard="sin_card",t.ssnCard="ssn_card"}(C||(C={})),function(t){t.pending="pending",t.uploaded="uploaded",t.canceled="canceled",t.needed="needed"}(S||(S={}));class J{constructor(t,i){this.fileData=null,this.file=t.file,this.document_type=t.document_type,this.presigned_url=null,this.record_data={business_id:i,document_type:this.document_type,file_name:this.file.name,file_type:this.file.type}}async getFileData(){if(this.fileData)return this.fileData;const t=new Promise(((t,i)=>{const s=new FileReader;s.onload=i=>{this.fileData=i.target.result,t(this.fileData)},s.onerror=()=>{i(new Error("Error reading file"))},s.readAsArrayBuffer(this.file)}));return await t}setPresignedUrl(t){this.presigned_url=t}}!function(t){t.succeeded="succeeded",t.failed="failed"}(U||(U={})),function(t){t.customerRequest="customer_request",t.duplicate="duplicate",t.fraudulent="fraudulent"}(x||(x={}));class K{constructor(t){this.amount=t.amount,this.reason=t.reason,this.description=t.description,this.metadata=t.metadata}}!function(t){t.STATUS_SUCCESS="STATUS_SUCCESS",t.STATUS_FAILURE="STATUS_FAILURE"}(D||(D={})),function(t){t.PLAIN="plain",t.BUY="buy",t.SET_UP="set-up",t.DONATE="donate",t.CHECK_OUT="check-out",t.BOOK="book",t.SUBSCRIBE="subscribe"}(T||(T={})),function(t){t.BLACK="black",t.WHITE="white",t.WHITE_OUTLINE="white-outline"}(B||(B={})),function(t){t.SUPPORTS_3DS="supports3DS",t.SUPPORTS_EMV="supportsEMV",t.SUPPORTS_CREDIT="supportsCredit",t.SUPPORTS_DEBIT="supportsDebit"}(E||(E={}));class O{constructor(t){this.merchantIdentifier=t.merchantIdentifier,this.displayName=t.displayName,this.initiative=t.initiative,this.initiativeContext=t.initiativeContext,this.buttonType=t.buttonType||T.PLAIN,this.buttonStyle=t.buttonStyle||B.BLACK,this.buttonLocale=t.buttonLocale||"en-US"}get isValid(){return!!(this.merchantIdentifier&&this.displayName&&this.initiative&&this.initiativeContext)}}class X{constructor(t){this.countryCode=t.countryCode,this.currencyCode=t.currencyCode,this.merchantCapabilities=t.merchantCapabilities,this.supportedNetworks=t.supportedNetworks,this.total=t.total,this.lineItems=t.lineItems,this.shippingMethods=t.shippingMethods,this.applicationData=t.applicationData,this.supportedCountries=t.supportedCountries}get isValid(){var t,i,s,e;return!!(this.countryCode&&this.currencyCode&&(null===(t=this.merchantCapabilities)||void 0===t?void 0:t.length)&&(null===(i=this.supportedNetworks)||void 0===i?void 0:i.length)&&(null===(s=this.total)||void 0===s?void 0:s.label)&&(null===(e=this.total)||void 0===e?void 0:e.amount))}}class Z{static isApplePaySupported(){var t;return"undefined"!=typeof window&&"ApplePaySession"in window&&(null===(t=window.ApplePaySession)||void 0===t?void 0:t.supportsVersion(3))}static canMakePayments(){var t;return this.isApplePaySupported()&&(null===(t=window.ApplePaySession)||void 0===t?void 0:t.canMakePayments())||!1}static async canMakePaymentsWithActiveCard(t){var i;if(!this.isApplePaySupported())return!1;try{return await(null===(i=window.ApplePaySession)||void 0===i?void 0:i.canMakePaymentsWithActiveCard(t))||!1}catch(t){return console.error("Error checking Apple Pay active card:",t),!1}}static formatAmount(t){return(t/100).toFixed(2)}static parseAmount(t){return Math.round(100*parseFloat(t))}static createLineItem(t,i,s="final"){return{label:t,amount:this.formatAmount(i),type:s}}static getDefaultSupportedNetworks(){return["amex","discover","masterCard","visa"]}static getDefaultMerchantCapabilities(){return[E.SUPPORTS_3DS,E.SUPPORTS_EMV,E.SUPPORTS_CREDIT,E.SUPPORTS_DEBIT]}}!function(t){t.PLAID_SDK_LOAD_FAILED="plaid-sdk-load-failed",t.PLAID_LINK_INIT_FAILED="plaid-link-init-failed",t.PLAID_LINK_TOKEN_FAILED="plaid-link-token-failed",t.PLAID_AUTHENTICATION_FAILED="plaid-authentication-failed",t.PLAID_BANK_NOT_SUPPORTED="plaid-bank-not-supported",t.PLAID_TOKEN_EXPIRED="plaid-token-expired",t.PLAID_NETWORK_ERROR="plaid-network-error",t.PLAID_USER_CANCELLED="plaid-user-cancelled",t.PLAID_TIMEOUT="plaid-timeout",t.PLAID_INVALID_CREDENTIALS="plaid-invalid-credentials",t.PLAID_ACCOUNT_LOCKED="plaid-account-locked",t.PLAID_MAINTENANCE="plaid-maintenance",t.PLAID_RATE_LIMITED="plaid-rate-limited"}(z||(z={}));const tt={[z.PLAID_SDK_LOAD_FAILED]:"Unable to load Plaid. Please refresh the page and try again.",[z.PLAID_LINK_INIT_FAILED]:"Unable to initialize bank connection. Please try again.",[z.PLAID_LINK_TOKEN_FAILED]:"Unable to connect to bank service. Please try again.",[z.PLAID_AUTHENTICATION_FAILED]:"Bank authentication failed. Please try again.",[z.PLAID_BANK_NOT_SUPPORTED]:"Your bank is not currently supported. Please try a different payment method.",[z.PLAID_TOKEN_EXPIRED]:"Your bank session has expired. Please reconnect your account.",[z.PLAID_NETWORK_ERROR]:"Network connection issue. Please check your internet connection and try again.",[z.PLAID_USER_CANCELLED]:"Bank connection was cancelled. Click to try again.",[z.PLAID_TIMEOUT]:"Bank connection timed out. Please try again.",[z.PLAID_INVALID_CREDENTIALS]:"Invalid bank credentials. Please check your username and password.",[z.PLAID_ACCOUNT_LOCKED]:"Your bank account is temporarily locked. Please contact your bank.",[z.PLAID_MAINTENANCE]:"Bank service is temporarily unavailable. Please try again later.",[z.PLAID_RATE_LIMITED]:"Too many connection attempts. Please wait a moment and try again."},it={[z.PLAID_SDK_LOAD_FAILED]:s.ERROR,[z.PLAID_LINK_INIT_FAILED]:s.ERROR,[z.PLAID_LINK_TOKEN_FAILED]:s.ERROR,[z.PLAID_AUTHENTICATION_FAILED]:s.ERROR,[z.PLAID_BANK_NOT_SUPPORTED]:s.WARNING,[z.PLAID_TOKEN_EXPIRED]:s.WARNING,[z.PLAID_NETWORK_ERROR]:s.WARNING,[z.PLAID_USER_CANCELLED]:s.INFO,[z.PLAID_TIMEOUT]:s.WARNING,[z.PLAID_INVALID_CREDENTIALS]:s.ERROR,[z.PLAID_ACCOUNT_LOCKED]:s.ERROR,[z.PLAID_MAINTENANCE]:s.WARNING,[z.PLAID_RATE_LIMITED]:s.WARNING};export{O as A,J as B,s as C,M as D,C as E,r as I,_ as P,x as R,G as S,w as T,a,i as b,e as c,h as d,L as e,k as f,v as g,o as h,l as i,V as j,Y as k,$ as l,I as m,H as n,W as o,Q as p,K as q,Z as r,X as s,D as t,B as u,T as v,E as w,it as x,tt as y,z}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e}from"./p-
|
|
1
|
+
import{p as e}from"./p-BP7jEC_K.js";const s="__JUSTIFI_WC_VERSION__",o=async()=>{var o,t;if((()=>{if("undefined"==typeof globalThis)return;const o=e.version,t=globalThis[s];t&&t!==o?console.error(`@justifi/webcomponents: Multiple versions detected. Version ${t} was loaded first and registered all components. Version ${o} is also present but its components will NOT be used. To fix this, add to your package.json:\n"pnpm": { "overrides": { "@justifi/webcomponents": "${o}" } }`):globalThis[s]=o})(),"undefined"!=typeof process&&("test"===(null===(o=process.env)||void 0===o?void 0:o.NODE_ENV)||(null===(t=process.env)||void 0===t?void 0:t.JEST_WORKER_ID)))return;const i=e.version,n=e.name,a=await(async e=>{const s=await fetch("https://registry.npmjs.org/"+e+"/latest");return(await s.json()).version})(n),r=a.replace(/-rc.*/,""),l=i.split("."),p=a.split(".");l[0]!==p[0]&&console.warn(`The package ${n} is out of date. The latest version is ${r}. Please update.`)};export{o as c}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as t}from"./p-
|
|
1
|
+
import{C as t}from"./p-Cl5FLD11.js";import{g as a,a as e}from"./p-IFhZFB4v.js";import{h as r}from"./p-CV0Pyo1O.js";import{B as n,a as i}from"./p-CHw7tICr.js";const o=({authToken:r,service:n})=>async({payoutId:i,onError:o})=>{try{const{data:t}=await n.fetchCSV(i,r),a=document.createElement("a");a.href=t.csv_url,a.click()}catch(r){o({error:e(r),code:a(null==r?void 0:r.code),severity:t.ERROR})}},d=t=>r(i,Object.assign({},{canceled:{variant:n.DANGER,title:"Transfer to your bank account failed",text:"Canceled"},failed:{variant:n.DANGER,title:"Transfer to your bank account failed",text:"Failed"},forwarded:{variant:n.SECONDARY,title:"This payout initially failed; the funds have been forwarded to your next successful payout",text:"Forwarded"},in_transit:{variant:n.PRIMARY,title:"Transfer to your bank account has been initiated",text:"In Transit"},paid:{variant:n.SUCCESS,title:"Successfully deposited into your bank account",text:"Paid"},pending:{variant:n.PRIMARY,title:"Batched and scheduled to be transferred",text:"Pending"},scheduled:{variant:n.PRIMARY,title:"Batched and scheduled to be transferred",text:"Scheduled"},withdrawn:{variant:n.SUCCESS,title:"Negative payout balance successfully withdrawn from your bank account",text:"Withdrawn"}}[t]));export{d as M,o as m}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as r}from"./p-Cl5FLD11.js";import{g as o,a as e}from"./p-IFhZFB4v.js";const n=({authToken:n,businessId:i,service:t})=>async({onSuccess:s,onError:a,final:c=()=>{}})=>{var l;try{const c=await t.fetchBusiness(i,n);if(c.error){return a({error:e(c.error),code:o(null===(l=c.error)||void 0===l?void 0:l.code),severity:r.ERROR})}s(c)}catch(e){const n=o(null==e?void 0:e.code);return a({error:e.message||e,code:n,severity:r.ERROR})}finally{c()}},i=({authToken:n,businessId:i,service:t})=>async({payload:s,onSuccess:a,onError:c,final:l=()=>{}})=>{var v;try{const l=await t.patchBusiness(n,i,s);if(l.error){return c({error:e(l.error),code:o(null===(v=l.error)||void 0===v?void 0:v.code),severity:r.ERROR,rawError:l.error})}a(l)}catch(e){const n=o(null==e?void 0:e.code);return c({error:e.message||e,code:n,severity:r.ERROR,rawError:e})}finally{l()}},t=({authToken:n,businessId:i,product:t,service:s})=>async({onSuccess:a,onError:c})=>{var l,v,d,u;try{const y=await s.postProvisioning(n,i,t);if(!(null==y?void 0:y.data)||y.error){const n=null!==(d=null!==(l=null==y?void 0:y.error)&&void 0!==l?l:null===(v=null==y?void 0:y.errors)||void 0===v?void 0:v[0])&&void 0!==d?d:"Provisioning request failed";return c({error:e(n),code:o(null===(u=null==y?void 0:y.error)||void 0===u?void 0:u.code),severity:r.ERROR})}a(y)}catch(e){const n=o(null==e?void 0:e.code);return c({error:e.message||e,code:n,severity:r.ERROR})}},s=({authToken:n,identityId:i,service:t})=>async({onSuccess:s,onError:a,final:c=()=>{}})=>{var l;try{const c=await t.fetchIdentity(i,n);if(c.error){return a({error:e(c.error),code:o(null===(l=c.error)||void 0===l?void 0:l.code),severity:r.ERROR})}s(c)}catch(e){const n=o(null==e?void 0:e.code);return a({error:e.message||e,code:n,severity:r.ERROR})}finally{c()}},a=({authToken:n,identityId:i,service:t})=>async({payload:s,onSuccess:a,onError:c,final:l=()=>{}})=>{var v;try{const l=await t.patchIdentity(n,i,s);if(l.error){return c({error:e(l.error),code:o(null===(v=l.error)||void 0===v?void 0:v.code),severity:r.ERROR})}a(l)}catch(e){const n=o(null==e?void 0:e.code);return c({error:e.message||e,code:n,severity:r.ERROR})}finally{l()}},c=({authToken:n,service:i})=>async({payload:t,onSuccess:s,onError:a,final:c=()=>{}})=>{var l;try{const c=await i.postIdentity(n,t);if(c.error){return a({error:e(c.error),code:o(null===(l=c.error)||void 0===l?void 0:l.code),severity:r.ERROR})}s(c)}catch(e){const n=o(null==e?void 0:e.code);return a({error:e.message||e,code:n,severity:r.ERROR})}finally{c()}},l=({authToken:n,service:i})=>async({payload:t,onSuccess:s,onError:a,final:c=()=>{}})=>{var l;try{const c=await i.postBankAccount(n,t);if(c.error){return a({error:e(c.error),code:o(null===(l=c.error)||void 0===l?void 0:l.code),severity:r.ERROR})}s(c)}catch(e){const n=o(null==e?void 0:e.code);return a({error:e.message||e,code:n,severity:r.ERROR})}finally{c()}},v=({authToken:n,service:i})=>async({payload:t,onSuccess:s,onError:a,final:c=()=>{}})=>{var l;try{const c=await i.postDocumentRecord(n,t);if(c.error){return a({error:e(c.error),code:o(null===(l=c.error)||void 0===l?void 0:l.code),severity:r.ERROR})}s(c)}catch(e){const n=o(null==e?void 0:e.code);return a({error:e.message||e,code:n,severity:r.ERROR})}finally{c()}};export{i as a,t as b,l as c,v as d,s as e,a as f,c as g,n as m}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as t}from"./p-
|
|
1
|
+
import{A as t}from"./p-CP0Y19co.js";import"./p-Cl5FLD11.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";const a=t();class n{async fetchPayouts(t,n,o){return a.get({authToken:n,endpoint:`account/${t}/payouts`,params:o})}async fetchPayout(t,n){return a.get({authToken:n,endpoint:`payouts/${t}`})}async fetchCSV(t,n){return a.get({authToken:n,endpoint:`reports/payouts/${t}`})}async fetchPayoutTransactions(t,n,o){return a.get({authToken:n,endpoint:"balance_transactions",params:o,headers:{"sub-account":t}})}}export{n as P}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e,a as s}from"./p-D9sqTVmd.js";import{m as t,d as n,i as a,b as i,a as r,p as o,e as l,w as _,c,t as d,o as u,f as m,r as p,g as b,h as E,l as h,j as f,k as v,n as g,s as w,q as y,u as $,v as x,x as
|
|
1
|
+
import{c as e,a as s}from"./p-D9sqTVmd.js";import{m as t,d as n,i as a,b as i,a as r,p as o,e as l,w as _,c,t as d,o as u,f as m,r as p,g as b,h as E,l as h,j as f,k as v,n as g,s as w,q as y,u as $,v as x,x as S}from"./p-BxpXvXn-.js";import{C as j}from"./p-BcNb9bVO.js";import{c as q}from"./p-DPA5TKvQ.js";const B=s=>{const t=e({legal_name:c.required("Enter legal name"),website_url:_.required("Enter business website url"),email:l.required("Enter business email"),phone:o.required("Enter phone number"),doing_business_as:r.nullable(),classification:i.required("Select business classification"),industry:a.required("Enter a business industry"),date_of_incorporation:n.required("Enter date of registration")}),u=e({legal_name:c.required("Enter legal name"),website_url:_.nullable(),email:l.nullable(),phone:o.nullable(),doing_business_as:r.nullable(),classification:i.nullable(),industry:a.nullable(),tax_id:d.nullable(),date_of_incorporation:n.nullable()});return s?u:t},D=n=>B(n).concat(e({classification:s().required("Select business classification"),tax_id:t(j.USA).when("tax_id_last4",{is:e=>!e,then:e=>e.required(`Enter valid ${q.USA.taxIdLabel} without dashes`),otherwise:e=>e.nullable()})})),T=n=>B(n).concat(e({classification:s().required("Select business classification"),tax_id:t(j.CAN).when("tax_id_last4",{is:e=>!e,then:e=>e.notRequired().nullable(),otherwise:e=>e.nullable()})})),V=s=>{const t=e({business_revenue:p.required("Enter business revenue"),business_payment_volume:b.required("Enter business payment volume"),business_average_transaction_amount:p.required("Enter average transaction amount"),business_when_service_received:m.required("Select when service is received"),business_other_payment_details:u.nullable()}),n=e({business_revenue:p.nullable(),business_payment_volume:b.nullable(),business_average_transaction_amount:p.nullable(),business_when_service_received:m.nullable(),business_other_payment_details:u.nullable()});return s?n:t},X=t=>e(t?{line1:f.nullable(),line2:h.nullable(),city:E.nullable(),state:s().nullable(),postal_code:s().nullable()}:{line1:f.required("Enter street address"),line2:h.nullable(),city:E.required("Enter city"),state:s().required("Select state"),postal_code:v(j.USA).required("Enter postal code")}),k=t=>e(t?{line1:f.nullable(),line2:h.nullable(),city:E.nullable(),state:s().nullable(),postal_code:s().nullable()}:{line1:f.required("Enter street address"),line2:h.nullable(),city:E.required("Enter city"),state:s().required("Select province or state"),postal_code:v(j.CAN).required("Enter postal code")}),A={[j.USA]:X,[j.CAN]:k},C=(t,n)=>n?(t=>e({name:x.required(`Enter ${t} name`),title:$.nullable(),email:l.nullable(),phone:o.nullable(),dob_full:y(t).nullable(),ssn_last4:s().nullable(),identification_number:w.nullable(),ownership_percentage:g.nullable(),address:X(!0)}))(t):(t=>e({name:x.required(`Enter ${t} name`),title:$.required(`Enter ${t} title`),email:l.required(`Enter ${t} email`),phone:o.required("Enter phone number"),dob_full:y(t).required("Enter date of birth"),ssn_last4:s().nullable(),identification_number:w,ownership_percentage:"owner"===t?g.required("Enter ownership percentage"):g.nullable(),address:X(!1)}))(t),K=(t,n)=>n?(t=>e({name:x.required(`Enter ${t} name`),title:$.nullable(),email:l.nullable(),phone:o.nullable(),dob_full:y(t).nullable(),ssn_last4:s().nullable(),identification_number:S(j.CAN).nullable(),ownership_percentage:g.nullable(),address:k(!0)}))(t):(t=>e({name:x.required(`Enter ${t} name`),title:$.required(`Enter ${t} title`),email:l.required(`Enter ${t} email`),phone:o.required("Enter phone number"),dob_full:y(t).required("Enter date of birth"),ssn_last4:s().nullable(),identification_number:S(j.CAN).nullable(),ownership_percentage:"owner"===t?g.required("Enter ownership percentage"):g.nullable(),address:k(!1)}))(t),N={[j.USA]:C,[j.CAN]:K};export{V as a,D as b,X as c,T as d,K as e,k as f,N as g,A as h,C as i}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as n}from"./p-CP0Y19co.js";import"./p-Cl5FLD11.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";const t=n();class a{async fetchPayments(n,a,s){return t.get({endpoint:`account/${n}/payments`,params:s,authToken:a})}async fetchPayment(n,a){return t.get({endpoint:`payments/${n}`,authToken:a})}async fetchPaymentTransactions(n,a,s){return t.get({endpoint:`payments/${n}/payment_balance_transactions`,params:s,authToken:a})}}export{a as P}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e}from"./p-
|
|
1
|
+
import{A as e}from"./p-CP0Y19co.js";import"./p-Cl5FLD11.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";const n=e();class r{async fetchTerminals(e,r,s){return n.get({endpoint:"terminals",params:s,headers:{Account:e},authToken:r})}async fetchTerminal(e,r){return n.get({endpoint:`terminals/${e}`,authToken:r})}async fetchTerminalModels(e,r){return n.get({endpoint:"terminals/order_models",headers:{"sub-account":e},authToken:r})}async orderTerminals(e,r){return n.post({endpoint:"terminals/orders",body:r,headers:{"sub-account":r.sub_account_id},authToken:e})}}export{r as T}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as t}from"./p-
|
|
1
|
+
import{A as t}from"./p-CP0Y19co.js";import"./p-Cl5FLD11.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";const n=t();class e{async fetchBusiness(t,e){return n.get({endpoint:`entities/business/${t}`,authToken:e})}async patchBusiness(t,e,s){return n.patch({endpoint:`entities/business/${e}`,body:s,authToken:t})}}class s{async fetchIdentity(t,e){return n.get({endpoint:`entities/identity/${t}`,authToken:e})}async patchIdentity(t,e,s){return n.patch({endpoint:`entities/identity/${e}`,body:s,authToken:t})}async postIdentity(t,e){return n.post({endpoint:"entities/identity",body:e,authToken:t})}}class i{async postBankAccount(t,e){return n.post({endpoint:"entities/bank_accounts",body:e,authToken:t})}}class o{async postDocumentRecord(t,e){return n.post({endpoint:"entities/document",body:e,authToken:t})}}export{e as B,o as D,s as I,i as a}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as t}from"./p-
|
|
1
|
+
import{b as t}from"./p-Cl5FLD11.js";const a=t=>"string"==typeof t?t:t.message,e=a=>{switch(a){case"not_authenticated":return t.NOT_AUTHENTICATED;case"invalid_parameter":return t.INVALID_PARAMETER;default:return t.FETCH_ERROR}};export{a,e as g}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as o}from"./p-CP0Y19co.js";import{S as r,C as s}from"./p-Cl5FLD11.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{g as t,a as c}from"./p-IFhZFB4v.js";const n=o();class a{async fetchSubAccounts(o,r,s){return n.get({authToken:r,endpoint:"sub_accounts",params:s,headers:{Account:o}})}}const e=({primaryAccountId:o,authToken:n,service:a})=>async({params:e,onSuccess:p,onError:i})=>{var u,m;try{const v=await a.fetchSubAccounts(o,n,e);if(v.error){return i({error:c(v.error),code:t(null===(m=v.error)||void 0===m?void 0:m.code),severity:s.ERROR})}{const o=Object.assign({},v.page_info);p({subAccounts:(null===(u=v.data)||void 0===u?void 0:u.map((o=>new r(o))))||[],pagingInfo:o})}}catch(o){const r=t(null==o?void 0:o.code);return i({error:o.message||o,code:r,severity:s.ERROR})}};export{a as S,e as m}
|