@solvimon/solvimon-web 0.1.0-alpha.25 → 0.1.0-alpha.27
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/README.md +16 -11
- package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-BM1_31Tl.js → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-081H9T3X.js} +1 -1
- package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Dh_a0NRB.mjs → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DNepCMRp.mjs} +6 -6
- package/dist/{Avatar.vue.es-CvxRdCes.js → Avatar.vue.es-BJxSCU76.js} +1 -1
- package/dist/{Avatar.vue.es-C9Jkfuvp.mjs → Avatar.vue.es-sfMZiX7A.mjs} +1 -1
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-BV5iEOxn.js +1 -0
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BRSUpMPU.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-DmY3a-Wi.mjs} +15 -16
- package/dist/{Button.vue.es-CeUTAc2n.js → Button.vue.es-BzkuglKw.js} +1 -1
- package/dist/{Button.vue.es-BbSN0uOk.mjs → Button.vue.es-Cmjfm4jw.mjs} +1 -1
- package/dist/ChargeOnDemandModal-CB4mrvkU.mjs +975 -0
- package/dist/ChargeOnDemandModal-b17YswWA.js +1 -0
- package/dist/Checkout.entry.ce-HlUrJ1kh.js +2 -0
- package/dist/Checkout.entry.ce-X2zGo6hG.mjs +4381 -0
- package/dist/{Chip.vue.es-BN83K3Tk.js → Chip.vue.es-B2jjzIOc.js} +1 -1
- package/dist/{Chip.vue.es-T22Q7AF9.mjs → Chip.vue.es-DksjbJO8.mjs} +2 -2
- package/dist/{ContextMenu.vue.es-DXKR7WFg.js → ContextMenu.vue.es-DUU43tCy.js} +1 -1
- package/dist/{ContextMenu.vue.es-0PRmCAzL.mjs → ContextMenu.vue.es-zRvoEJlV.mjs} +10 -10
- package/dist/{CustomerBillingInformation.vue.es-yrLGc7oL.js → CustomerBillingInformation.vue.es-BfPEB42w.js} +1 -1
- package/dist/{CustomerBillingInformation.vue.es-C2j40TYP.mjs → CustomerBillingInformation.vue.es-DhFbpZPK.mjs} +2 -2
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BZwGWhaL.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-B41la-T7.mjs} +14 -15
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C8diNL5x.js → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BISD6n8X.js} +1 -1
- package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-xqMsbuU6.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DssxYPSA.mjs} +895 -891
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-XufY6bdV.js +1 -0
- package/dist/{DividerText.vue.es-DsYRZzuE.js → DividerText.vue.es-CoyDk9eH.js} +1 -1
- package/dist/{DividerText.vue.es-CV1XK_Vz.mjs → DividerText.vue.es-nAo1eRMV.mjs} +1 -1
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-srXOpUb0.js → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CQ0KrXHJ.js} +1 -1
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-kpjrC-4q.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-QW9NdxyZ.mjs} +4 -4
- package/dist/{ErrorNotification.vue.es-CiUJva6S.mjs → ErrorNotification.vue.es-h-D37rfG.mjs} +1 -1
- package/dist/{ErrorNotification.vue.es-QfRoDhkn.js → ErrorNotification.vue.es-tS9vySUZ.js} +1 -1
- package/dist/{IconButton.vue.es-CytBZUkZ.js → IconButton.vue.es-DgQN18Am.js} +1 -1
- package/dist/{IconButton.vue.es-ChvsCZQG.mjs → IconButton.vue.es-DvfErUOq.mjs} +2 -2
- package/dist/{IconTitle.vue.es-DPruIJ6l.mjs → IconTitle.vue.es-B_8bS0tn.mjs} +3 -3
- package/dist/{IconTitle.vue.es-DtnpBObk.js → IconTitle.vue.es-Dn2xcPHj.js} +1 -1
- package/dist/{Input.vue.es-BkzQDkrz.js → Input.vue.es-B60eK8Ds.js} +1 -1
- package/dist/{Input.vue.es-DJQqJrsb.mjs → Input.vue.es-CU9u5yKH.mjs} +2 -2
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Do0dDtkA.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Dqdezse7.js} +1 -1
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BC-zyUqe.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-gpMtYNzn.mjs} +2 -2
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-DQFS7SfE.js → InvoiceEntryView.vue_vue_type_script_setup_true_lang-Cl6HU243.js} +1 -1
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-CFhhhwId.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-DNqawlYV.mjs} +2 -2
- package/dist/InvoiceSummary.vue.es-CAmA8g0t.js +1 -0
- package/dist/{InvoiceSummary.vue.es-6qpbyymg.mjs → InvoiceSummary.vue.es-CRiFJ5x-.mjs} +576 -565
- package/dist/{Modal.vue.es-BuRlbyZw.mjs → Modal.vue.es-BeI5C9-9.mjs} +5 -5
- package/dist/{Modal.vue.es-JpE0eh_Q.js → Modal.vue.es-DvLB3uCG.js} +1 -1
- package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-nAuhIopc.js → PaymentErrorCard.vue_vue_type_script_setup_true_lang-Dg4rn1cm.js} +1 -1
- package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-UmKgVvdj.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-DqHcOnZp.mjs} +5 -6
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-YpcWHm24.js → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-B9R5JRJv.js} +1 -1
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DggCusgC.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DlqoWKQq.mjs} +3 -3
- package/dist/{PaymentHistoryBlock-uWuWjr8I.js → PaymentHistoryBlock-Uw8xeKUk.js} +1 -1
- package/dist/{PaymentHistoryBlock-DnmParhQ.mjs → PaymentHistoryBlock-mCqdFjnL.mjs} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BS8N4yt9.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-ALI5f0py.js} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BziIf86i.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DxaY3eFN.mjs} +4 -4
- package/dist/{PaymentIntegrationForm-DTXm56QQ.js → PaymentIntegrationForm-Cx0zCf_C.js} +1 -1
- package/dist/{PaymentIntegrationForm-DL55i0HD.mjs → PaymentIntegrationForm-DVx4DEtD.mjs} +1 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-B-viSd_i.js +1 -0
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CCKCXXZX.mjs +154 -0
- package/dist/PaymentIntegrationFormAdyen-B-v-4nlj.js +98 -0
- package/dist/{PaymentIntegrationFormAdyen-Cqsy82To.mjs → PaymentIntegrationFormAdyen-Yr8p5Fly.mjs} +202 -192
- package/dist/PaymentIntegrationFormStripe-CoLmAzas.js +102 -0
- package/dist/{PaymentIntegrationFormStripe-DIU1rnwH.mjs → PaymentIntegrationFormStripe-Ds0BXt89.mjs} +247 -220
- package/dist/{PaymentMethod.vue.es-m1NasGqw.mjs → PaymentMethod.vue.es-4YRmQZHX.mjs} +168 -148
- package/dist/PaymentMethod.vue.es-D0D9jW8s.js +1 -0
- package/dist/{PaymentMethodForm-BEVdWCrH.js → PaymentMethodForm-CMP5FLRO.js} +1 -1
- package/dist/{PaymentMethodForm-BYzt1PVP.mjs → PaymentMethodForm-Dnj_7mJU.mjs} +1 -1
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-fdRTp7sc.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-DsD3UjkC.mjs} +60 -58
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-nxnGyJmE.js +1 -0
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-FhMBZqtI.js → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CIrrQUS6.js} +1 -1
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-FChyZp2v.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CjECKNi_.mjs} +6 -6
- package/dist/PlanCustomizationEditor-DS1r2vBO.js +1 -0
- package/dist/PlanCustomizationEditor-DlVSCKGN.mjs +722 -0
- package/dist/{PricingGroupRangeInput.vue.es-B4ZbKxUw.mjs → PricingGroupRangeInput.vue.es-BhNcjD7z.mjs} +4 -4
- package/dist/{PricingGroupRangeInput.vue.es-Ba3v0J_R.js → PricingGroupRangeInput.vue.es-VoOTnHjk.js} +1 -1
- package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CmJITenR.mjs +141 -0
- package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-hS6A-KcP.js +1 -0
- package/dist/{RadioGroupExtended.vue.es-CkhBp9kI.mjs → RadioGroupExtended.vue.es-9YzXzZF0.mjs} +2 -2
- package/dist/{RadioGroupExtended.vue.es-CHrcqSRq.js → RadioGroupExtended.vue.es-DlbURHQN.js} +1 -1
- package/dist/{Section.vue.es-CSrVPlUK.js → Section.vue.es-Bbt0RITt.js} +1 -1
- package/dist/{Section.vue.es-D5svcVS_.mjs → Section.vue.es-DVEpre9O.mjs} +1 -1
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BqOSBdFQ.js → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Dl7MbMlk.js} +1 -1
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BM9Y4Cy3.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-xzjqB-v-.mjs} +6 -6
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-CJWE7wVi.mjs +41 -0
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-otI7Hz2w.js +1 -0
- package/dist/StepInput.vue.es-H-3R4jJq.js +1 -0
- package/dist/StepInput.vue.es-o-3Lg4Ai.mjs +199 -0
- package/dist/SubscriptionDetails.entry.ce-CGl6Z5ql.mjs +1057 -0
- package/dist/SubscriptionDetails.entry.ce-CQUO_uXH.js +1 -0
- package/dist/{SubscriptionSchedules-yDcsD1hd.mjs → SubscriptionSchedules-DuWZmnD2.mjs} +1 -1
- package/dist/{SubscriptionSchedules-CMVoB2bw.js → SubscriptionSchedules-Dy0fUgx5.js} +1 -1
- package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DZHsQImd.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-C1kTiW-H.mjs} +2284 -2341
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Dd_Rr6qn.js +1 -0
- package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-BgXZMihr.js → SubscriptionSummary.vue_vue_type_script_setup_true_lang-CYyP4ra9.js} +1 -1
- package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-BmNl5u8R.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-CsekphtV.mjs} +3 -3
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DOJ0t_fo.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-B4j8Clbj.js} +1 -1
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BUzdZHah.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BsdevoeT.mjs} +9 -10
- package/dist/{TooltipParagraph.vue.es-CxdL8-B7.mjs → TooltipParagraph.vue.es-B9A17aG7.mjs} +3 -3
- package/dist/TooltipParagraph.vue.es-DvC5Wjaz.js +1 -0
- package/dist/{TrialChip.vue.es-BCc8q5j0.js → TrialChip.vue.es-CLQZ5F0n.js} +1 -1
- package/dist/{TrialChip.vue.es-BK7m7e7q.mjs → TrialChip.vue.es-Dmv3lPiQ.mjs} +2 -2
- package/dist/{cn.es-71nFUose.js → cn.es-C9Yqq4tg.js} +1 -1
- package/dist/{cn.es-ZXNzpauQ.mjs → cn.es-Cvt6TIwv.mjs} +2 -2
- package/dist/components/BillingInformation/BillingInformation.cjs +1 -1
- package/dist/components/BillingInformation/BillingInformation.mjs +4 -4
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.mjs +246 -230
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +4 -4
- package/dist/components/Invoice/Invoice.cjs +1 -1
- package/dist/components/Invoice/Invoice.mjs +201 -212
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.mjs +15 -16
- package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -1
- package/dist/components/InvoiceHeader/InvoiceHeader.mjs +2 -2
- package/dist/components/InvoicesList/InvoicesList.cjs +1 -1
- package/dist/components/InvoicesList/InvoicesList.mjs +3 -3
- package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.mjs +14 -15
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +5 -5
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +4 -4
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.mjs +5 -5
- package/dist/components/WalletBalances/WalletBalances.cjs +1 -1
- package/dist/components/WalletBalances/WalletBalances.mjs +3 -3
- package/dist/{customElements-q_i9y0Ph.mjs → customElements-B58FcXIN.mjs} +231 -196
- package/dist/{customElements-hH6pju3X.js → customElements-DUMRMFQ5.js} +36 -32
- package/dist/{customer-BDoOIAFr.mjs → customer-B3LPAhaD.mjs} +4 -4
- package/dist/{customer-C9q6ti8s.js → customer-CisTPaXj.js} +1 -1
- package/dist/{de-DE-BSlbAnPE.js → de-DE-B4TUdnUf.js} +1 -1
- package/dist/{de-DE-B_ik9VNt.mjs → de-DE-DKp5LCu0.mjs} +53 -7
- package/dist/de-DE-DL74pMLb.js +1 -0
- package/dist/{de-DE-DXsG-vXA.mjs → de-DE-jkW2dJrX.mjs} +28 -14
- package/dist/en-US-B2XFj-_p.js +1 -0
- package/dist/{en-US-DkCltadt.mjs → en-US-DQ5vlv9Z.mjs} +53 -7
- package/dist/en-US-J85TQRI8.js +1 -0
- package/dist/{en-US-C939IZ5i.mjs → en-US-SDhjlY_v.mjs} +20 -5
- package/dist/formControl-ODrpUvcA.js +1 -0
- package/dist/{index-BPU8tIml.mjs → formControl-dX7l8o3c.mjs} +160 -143
- package/dist/icon-sprite.svg.es-BZIz7-0d.mjs +4 -0
- package/dist/icon-sprite.svg.es-Ds6lDf5p.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +4 -4
- package/dist/{invoices-DIzkXntV.mjs → invoices-3520M5AN.mjs} +1 -1
- package/dist/{invoices-CHp75zZI.js → invoices-CKQBLar2.js} +1 -1
- package/dist/{it-IT-CHj2McbF.mjs → it-IT-BgFVsO5S.mjs} +53 -7
- package/dist/{it-IT-DT3rfjOY.js → it-IT-CSYvGmpT.js} +1 -1
- package/dist/{it-IT-BxpwB3oJ.mjs → it-IT-CaaFToGB.mjs} +20 -6
- package/dist/it-IT-CqNK62qe.js +1 -0
- package/dist/{nl-NL-DfkhOJKc.js → nl-NL-CpE4IgwO.js} +1 -1
- package/dist/{nl-NL-na2I4aiP.mjs → nl-NL-D0MQKaql.mjs} +34 -20
- package/dist/nl-NL-Dx-TNXQ1.js +1 -0
- package/dist/{nl-NL-Cdvd_XMN.mjs → nl-NL-UiRWbO9S.mjs} +53 -7
- package/dist/{paymentMethods-DEKp_4QM.mjs → paymentMethods-CWlvwK5V.mjs} +16 -14
- package/dist/paymentMethods-Cw-i95mM.js +1 -0
- package/dist/{payments-C0-Hq2a4.mjs → payments-2qeQdpiW.mjs} +6 -6
- package/dist/{payments-DBvregE8.js → payments-CS7_YcOW.js} +1 -1
- package/dist/pricing-BIMpDI_p.mjs +29 -0
- package/dist/pricing-BOqG21f9.js +1 -0
- package/dist/pricing.es-C07bgEZx.js +1 -0
- package/dist/pricing.es-QYWrKMUJ.mjs +30 -0
- package/dist/pricingPlanSchedules-B_sTAIgU.js +1 -0
- package/dist/pricingPlanSchedules-ChQCbMfe.mjs +32 -0
- package/dist/screens/Checkout/Checkout.cjs +1 -1
- package/dist/screens/Checkout/Checkout.mjs +2 -2
- package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.mjs +10 -10
- package/dist/screens/PayInvoice/PayInvoice.cjs +1 -1
- package/dist/screens/PayInvoice/PayInvoice.mjs +57 -55
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -1
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +9 -9
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -1
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +3 -769
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -1
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +243 -270
- package/dist/{subscription-CrVOr5MF.mjs → subscription-D1yHKUNc.mjs} +2 -2
- package/dist/{subscriptions--9MaTXMb.mjs → subscriptions-DcfcBYAq.mjs} +1 -1
- package/dist/{subscriptions-BArXBCFr.js → subscriptions-DwVsf4Ev.js} +1 -1
- package/dist/types/components/checkout/CheckoutTitle.types.d.ts +10 -0
- package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethod.types.d.ts +9 -5
- package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethodApplePay.types.d.ts +3 -1
- package/dist/types/components/payments/ExpressPaymentMethods/ExpressPaymentMethods.types.d.ts +5 -1
- package/dist/types/components/{wallets/WalletModalShell.types.d.ts → payments/OnDemandPaymentModalShell/OnDemandPaymentModalShell.types.d.ts} +3 -3
- package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +5 -0
- package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripeFrame.types.d.ts +5 -9
- package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/AuthProvider/AuthProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/ConfigProvider/ConfigProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/CssOverridesProvider/CssOverridesProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/EntryProvider/EntryProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/ErrorBoundary/ErrorBoundary.vue.d.ts +7 -11
- package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/HostElementProvider/HostElementProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +2 -2
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/PortalProvider/PortalProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/Provider/Provider.vue.d.ts +7 -11
- package/dist/types/components/providers/TeleportProvider/TeleportProvider.vue.d.ts +7 -11
- package/dist/types/components/providers/TranslationProvider/TranslationOverride.vue.d.ts +7 -11
- package/dist/types/components/providers/TranslationProvider/TranslationProvider.vue.d.ts +7 -11
- package/dist/types/components/subscriptions/ChargeOnDemandModal/ChargeOnDemandModal.types.d.ts +21 -0
- package/dist/types/components/subscriptions/OnDemandItemsCard/OnDemandItemsCard.types.d.ts +7 -0
- package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.configuration.types.d.ts +27 -0
- package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.entry.types.d.ts +1 -1
- package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.types.d.ts +6 -5
- package/dist/types/services/paymentMethods.types.d.ts +4 -2
- package/dist/types/services/requests.types.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/index.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/AgentContext.d.ts +3 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalPolicies.d.ts +6 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/ChargeOnDemandPricingItems.d.ts +23 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/CustomFields.d.ts +16 -4
- package/dist/types/vendor/@solvimon/solvimon-types/types/Embeddable.d.ts +8 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Invoice.d.ts +21 -6
- package/dist/types/vendor/@solvimon/solvimon-types/types/OAuth.d.ts +28 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAcceptor.d.ts +2 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/Permission.d.ts +1 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/Platform.d.ts +6 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/Portal.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingItemConfig.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanGroups.d.ts +31 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSchedule.d.ts +9 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanScheduleInfo.d.ts +1 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscription.d.ts +3 -3
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlans.d.ts +3 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Product.d.ts +2 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ProductItem.d.ts +2 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteTemplates.d.ts +2 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ResourceStatus.d.ts +1 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/SeatAssignment.d.ts +22 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Wallet.d.ts +6 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Workflows.d.ts +128 -1
- package/dist/{useActionDispatchProvider-BdciAX8T.mjs → useActionDispatchProvider-B3AvkLL2.mjs} +1 -1
- package/dist/{useActionDispatchProvider-CKzeqXzY.js → useActionDispatchProvider-DFhppdve.js} +1 -1
- package/dist/{useCustomer-D8ixhuuj.mjs → useCustomer-B-jyJIVy.mjs} +1 -1
- package/dist/{useCustomer-DSYr0F58.js → useCustomer-BwZKd9i5.js} +1 -1
- package/dist/{useCustomerFormLabels-htMZ0xqB.mjs → useCustomerFormLabels-BQk3d9PZ.mjs} +6 -6
- package/dist/useCustomerFormLabels-DV9QiMYh.js +1 -0
- package/dist/useExperimentalFeature-BciA3Ok9.mjs +135 -0
- package/dist/useExperimentalFeature-CGIkgFR4.js +1 -0
- package/dist/{useInvoiceData-Bpbog3zW.mjs → useInvoiceData-BocKdeg7.mjs} +3 -3
- package/dist/{useInvoiceData-DhrItfv7.js → useInvoiceData-CNV_FMV8.js} +1 -1
- package/dist/{useInvoicesList-BGwcJn4I.mjs → useInvoicesList-C8nsXMJ6.mjs} +7 -7
- package/dist/{useInvoicesList-duu_b5GW.js → useInvoicesList-S0IbQcrD.js} +1 -1
- package/dist/{useLoadInitialData-BDmmpcfb.mjs → useLoadInitialData-D9GkzY8t.mjs} +1 -1
- package/dist/{useLoadInitialData-U2WvBmXT.js → useLoadInitialData-D_R6Jy1s.js} +1 -1
- package/dist/usePaymentMethodAvailability-BO_guwAw.js +1 -0
- package/dist/{usePaymentMethodAvailability-adqRujTA.mjs → usePaymentMethodAvailability-DAcsKGeh.mjs} +5 -6
- package/dist/{usePaymentMethodOptions-DlZtTQNQ.mjs → usePaymentMethodOptions-1vRAo6Ib.mjs} +15 -13
- package/dist/usePaymentMethodOptions-CuzOoi2k.js +1 -0
- package/dist/{usePaymentMethods-BnmSo_rr.mjs → usePaymentMethods-CbwnGONc.mjs} +1 -1
- package/dist/{usePaymentMethods-DZ1a0mnr.js → usePaymentMethods-DDaTZQZp.js} +1 -1
- package/dist/{usePayments-s-Z1di8d.mjs → usePayments-Cr6NlGaW.mjs} +46 -41
- package/dist/usePayments-DDSjo0rH.js +1 -0
- package/dist/{usePortal-Hm7wvtgQ.js → usePortal-C27omjhz.js} +1 -1
- package/dist/{usePortal-C4rR5Rhu.mjs → usePortal-C5AsegpS.mjs} +1 -1
- package/dist/{useSubscription-DSsXVO0h.mjs → useSubscription-BZJL0VOA.mjs} +1 -1
- package/dist/{useSubscription-DMAEJves.js → useSubscription-D787IXY-.js} +1 -1
- package/dist/{useTimePeriod.es-CW8ycmpT.mjs → useTimePeriod.es-DWLsLFqs.mjs} +1 -1
- package/dist/{useTimePeriod.es-anHB63am.js → useTimePeriod.es-rzxqUCTu.js} +1 -1
- package/dist/useWatchDebounced-B8iX7ykx.js +1 -0
- package/dist/useWatchDebounced-BHlBPcXB.mjs +20 -0
- package/package.json +20 -14
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-7wQAw6Lv.js +0 -1
- package/dist/Checkout.entry.ce-BMzK8nQg.mjs +0 -3900
- package/dist/Checkout.entry.ce-DgA0ckyl.js +0 -2
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DzbPUvHN.js +0 -1
- package/dist/InvoiceSummary.vue.es-v1TkOUhA.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-4RmdLbzY.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CvpFnl9V.mjs +0 -141
- package/dist/PaymentIntegrationFormAdyen-C9KoiqMh.js +0 -98
- package/dist/PaymentIntegrationFormStripe-DTLgGutU.js +0 -102
- package/dist/PaymentMethod.vue.es-ZWda5GqF.js +0 -1
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-CzUwtVEI.js +0 -1
- package/dist/PlanCustomizationEditor-CunwwXTw.js +0 -1
- package/dist/PlanCustomizationEditor-NLVkEYFF.mjs +0 -877
- package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-Dvuj-fos.mjs +0 -131
- package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-iE4dLawA.js +0 -1
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DRLoYWGY.mjs +0 -51
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DypW8aNJ.js +0 -1
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DH7IZrNT.js +0 -1
- package/dist/TooltipParagraph.vue.es-DS_69pl1.js +0 -1
- package/dist/adyen-CvsH5fok.mjs +0 -117
- package/dist/adyen-Druit6gz.js +0 -1
- package/dist/de-DE-npBTLtKL.js +0 -1
- package/dist/en-US-9xdcz3T5.js +0 -1
- package/dist/en-US-kGduGoka.js +0 -1
- package/dist/icon-sprite.svg.es-Bt21fMEt.mjs +0 -4
- package/dist/icon-sprite.svg.es-Dauis9LS.js +0 -1
- package/dist/index-DwueOtPi.js +0 -1
- package/dist/it-IT-BayNIAy7.js +0 -1
- package/dist/nl-NL-0rV4nFLw.js +0 -1
- package/dist/paymentMethods-CZGP6_4W.js +0 -1
- package/dist/pricing-BVAld27Y.js +0 -1
- package/dist/pricing-DLOeiAIB.mjs +0 -16
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagement.types.d.ts +0 -47
- package/dist/useCustomerFormLabels-CRumh405.js +0 -1
- package/dist/useExperimentalFeature-D29-TO3R.js +0 -1
- package/dist/useExperimentalFeature-JK_kAUQQ.mjs +0 -6
- package/dist/usePaymentMethodAvailability-DwtT5Czz.js +0 -1
- package/dist/usePaymentMethodOptions-CXdFKFqZ.js +0 -1
- package/dist/usePayments-DL4agK2i.js +0 -1
- package/dist/useWatchDebounced-CAU1WI1P.js +0 -1
- package/dist/useWatchDebounced-DT5IicPp.mjs +0 -14
|
@@ -1,3900 +0,0 @@
|
|
|
1
|
-
import { unref as t, inject as li, ref as Y, computed as M, onMounted as Oe, toRaw as si, watch as Se, defineComponent as ce, openBlock as d, createBlock as S, withCtx as b, createElementVNode as L, createVNode as _, createTextVNode as Q, toDisplayString as $, useModel as ci, createElementBlock as z, withModifiers as Ue, Fragment as me, createCommentVNode as j, createSlots as Fe, normalizeClass as he, mergeModels as bt, renderSlot as Je, resolveComponent as ui, renderList as zt, nextTick as Xe, mergeProps as It, withDirectives as di, withKeys as At, vShow as pi, defineAsyncComponent as Pt } from "vue";
|
|
2
|
-
import { I as mi, b as Me, u as ve, _ as se, d as gi, e as yi } from "./customElements-q_i9y0Ph.mjs";
|
|
3
|
-
import { u as jt } from "./useTimePeriod.es-CW8ycmpT.mjs";
|
|
4
|
-
import { b as je, f as Ae } from "./formatting.es-RclXHhKo.mjs";
|
|
5
|
-
import { _ as Pe, a as Re } from "./Button.vue.es-BbSN0uOk.mjs";
|
|
6
|
-
import { _ as vi } from "./ErrorNotification.vue.es-CiUJva6S.mjs";
|
|
7
|
-
import { c as fi } from "./countryData.es-BegoD-cZ.mjs";
|
|
8
|
-
import { c as _i } from "./subscriptions--9MaTXMb.mjs";
|
|
9
|
-
import { A as Ne } from "./error-BHVZJGwD.mjs";
|
|
10
|
-
import { c as hi, _ as Mi } from "./TrialChip.vue.es-BK7m7e7q.mjs";
|
|
11
|
-
import { a as bi } from "./useService-Bh47bllz.mjs";
|
|
12
|
-
import { c as Ii } from "./invoices-DIzkXntV.mjs";
|
|
13
|
-
import { g as Ee, b as Rt, e as Ai } from "./pricingPlanSchedule-BPrS2WRd.mjs";
|
|
14
|
-
import { u as Pi, r as Dt, e as Di, a as $e, _ as Ni } from "./index-BPU8tIml.mjs";
|
|
15
|
-
import { o as Ei, u as Ci, _ as xi, a as Li } from "./useCustomerFormLabels-htMZ0xqB.mjs";
|
|
16
|
-
import { u as Ti } from "./useWatchDebounced-DT5IicPp.mjs";
|
|
17
|
-
import { u as wi } from "./usePaymentMethodOptions-DlZtTQNQ.mjs";
|
|
18
|
-
import { c as tt, a as Si, d as ki } from "./subscription-CrVOr5MF.mjs";
|
|
19
|
-
import { a as Oi, b as $t } from "./pricing-DLOeiAIB.mjs";
|
|
20
|
-
import { g as Te, a as zi, s as ji } from "./url-TNRgVI8A.mjs";
|
|
21
|
-
import { P as Ri, e as $i, c as Nt, d as Bi } from "./adyen-CvsH5fok.mjs";
|
|
22
|
-
import { u as Ui } from "./usePortal-C4rR5Rhu.mjs";
|
|
23
|
-
import { g as Vi } from "./getCountryNameByCode.es-BDHua7VM.mjs";
|
|
24
|
-
import { _ as Et } from "./Expand.vue.es-BleuAfDz.mjs";
|
|
25
|
-
import { _ as ye } from "./Input.vue.es-DJQqJrsb.mjs";
|
|
26
|
-
import { _ as ge } from "./Section.vue.es-D5svcVS_.mjs";
|
|
27
|
-
import { _ as Fi } from "./Alert.vue.es-lIiAWf2S.mjs";
|
|
28
|
-
import { c as Gi } from "./customer-BDoOIAFr.mjs";
|
|
29
|
-
import { b as Yi, c as Ki, a as Hi, _ as We } from "./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-kpjrC-4q.mjs";
|
|
30
|
-
import { _ as Qi, T as Zi, a as Xi } from "./TooltipParagraph.vue.es-CxdL8-B7.mjs";
|
|
31
|
-
import { _ as Wi } from "./PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DggCusgC.mjs";
|
|
32
|
-
import { _ as Ct } from "./Chip.vue.es-T22Q7AF9.mjs";
|
|
33
|
-
import { _ as qi, a as Ji } from "./SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BM9Y4Cy3.mjs";
|
|
34
|
-
import { _ as en } from "./SubscriptionSummary.vue_vue_type_script_setup_true_lang-BmNl5u8R.mjs";
|
|
35
|
-
import { u as Bt } from "./useViewport-BgdA2PPt.mjs";
|
|
36
|
-
import { _ as _e } from "./Skeleton.vue_vue_type_script_setup_true_lang-DRLoYWGY.mjs";
|
|
37
|
-
import { _ as tn } from "./DividerText.vue.es-CV1XK_Vz.mjs";
|
|
38
|
-
import { l as Ge } from "./adyenSdk-B01MB9Ia.mjs";
|
|
39
|
-
import { c as nn } from "./payments-C0-Hq2a4.mjs";
|
|
40
|
-
import { c as on } from "./paymentFailure-Bh60UhxA.mjs";
|
|
41
|
-
import { C as an } from "./ContentWithAsideLayout-BCM8tmZN.mjs";
|
|
42
|
-
import { u as rn } from "./cn.es-ZXNzpauQ.mjs";
|
|
43
|
-
import { a as ln } from "./sessionReference-3h-6FdrC.mjs";
|
|
44
|
-
const sn = {
|
|
45
|
-
AT: "Austria",
|
|
46
|
-
BE: "Belgium",
|
|
47
|
-
BG: "Bulgaria",
|
|
48
|
-
CY: "Cyprus",
|
|
49
|
-
CZ: "Czech Republic",
|
|
50
|
-
DE: "Germany",
|
|
51
|
-
DK: "Denmark",
|
|
52
|
-
EE: "Estonia",
|
|
53
|
-
ES: "Spain",
|
|
54
|
-
FI: "Finland",
|
|
55
|
-
FR: "France",
|
|
56
|
-
GR: "Greece",
|
|
57
|
-
HR: "Croatia",
|
|
58
|
-
HU: "Hungary",
|
|
59
|
-
IE: "Ireland",
|
|
60
|
-
IT: "Italy",
|
|
61
|
-
LT: "Lithuania",
|
|
62
|
-
LU: "Luxembourg",
|
|
63
|
-
LV: "Latvia",
|
|
64
|
-
MT: "Malta",
|
|
65
|
-
NL: "Netherlands",
|
|
66
|
-
PL: "Poland",
|
|
67
|
-
PT: "Portugal",
|
|
68
|
-
RO: "Romania",
|
|
69
|
-
SE: "Sweden",
|
|
70
|
-
SI: "Slovenia",
|
|
71
|
-
SK: "Slovakia"
|
|
72
|
-
};
|
|
73
|
-
function Ut(e) {
|
|
74
|
-
return Object.keys(sn).includes(e);
|
|
75
|
-
}
|
|
76
|
-
function xt(e, i) {
|
|
77
|
-
var n = Object.keys(e);
|
|
78
|
-
if (Object.getOwnPropertySymbols) {
|
|
79
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
80
|
-
i && (o = o.filter(function(a) {
|
|
81
|
-
return Object.getOwnPropertyDescriptor(e, a).enumerable;
|
|
82
|
-
})), n.push.apply(n, o);
|
|
83
|
-
}
|
|
84
|
-
return n;
|
|
85
|
-
}
|
|
86
|
-
function ke(e) {
|
|
87
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
88
|
-
var n = arguments[i] != null ? arguments[i] : {};
|
|
89
|
-
i % 2 ? xt(Object(n), !0).forEach(function(o) {
|
|
90
|
-
cn(e, o, n[o]);
|
|
91
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : xt(Object(n)).forEach(function(o) {
|
|
92
|
-
Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(n, o));
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
return e;
|
|
96
|
-
}
|
|
97
|
-
function cn(e, i, n) {
|
|
98
|
-
return i in e ? Object.defineProperty(e, i, {
|
|
99
|
-
value: n,
|
|
100
|
-
enumerable: !0,
|
|
101
|
-
configurable: !0,
|
|
102
|
-
writable: !0
|
|
103
|
-
}) : e[i] = n, e;
|
|
104
|
-
}
|
|
105
|
-
function Ve(e) {
|
|
106
|
-
return typeof e == "function";
|
|
107
|
-
}
|
|
108
|
-
function et(e) {
|
|
109
|
-
return e !== null && typeof e == "object" && !Array.isArray(e);
|
|
110
|
-
}
|
|
111
|
-
function Ye(e) {
|
|
112
|
-
return Ve(e.$validator) ? ke({}, e) : {
|
|
113
|
-
$validator: e
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
function Vt(e) {
|
|
117
|
-
return typeof e == "object" ? e.$valid : e;
|
|
118
|
-
}
|
|
119
|
-
function Ft(e) {
|
|
120
|
-
return e.$validator || e;
|
|
121
|
-
}
|
|
122
|
-
function un(e, i) {
|
|
123
|
-
if (!et(e)) throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof e}`);
|
|
124
|
-
if (!et(i) && !Ve(i)) throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");
|
|
125
|
-
const n = Ye(i);
|
|
126
|
-
return n.$params = ke(ke({}, n.$params || {}), e), n;
|
|
127
|
-
}
|
|
128
|
-
function dn(e, i) {
|
|
129
|
-
if (!Ve(e) && typeof t(e) != "string") throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof e}`);
|
|
130
|
-
if (!et(i) && !Ve(i)) throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");
|
|
131
|
-
const n = Ye(i);
|
|
132
|
-
return n.$message = e, n;
|
|
133
|
-
}
|
|
134
|
-
function pn(e) {
|
|
135
|
-
let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
136
|
-
const n = Ye(e);
|
|
137
|
-
return ke(ke({}, n), {}, {
|
|
138
|
-
$async: !0,
|
|
139
|
-
$watchTargets: i
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
function mn(e) {
|
|
143
|
-
return {
|
|
144
|
-
$validator(i) {
|
|
145
|
-
for (var n = arguments.length, o = new Array(n > 1 ? n - 1 : 0), a = 1; a < n; a++)
|
|
146
|
-
o[a - 1] = arguments[a];
|
|
147
|
-
return t(i).reduce((l, c, g) => {
|
|
148
|
-
const u = Object.entries(c).reduce((I, y) => {
|
|
149
|
-
let [h, P] = y;
|
|
150
|
-
const m = e[h] || {}, x = Object.entries(m).reduce((k, v) => {
|
|
151
|
-
let [N, E] = v;
|
|
152
|
-
const F = Ft(E).call(this, P, c, g, ...o), p = Vt(F);
|
|
153
|
-
if (k.$data[N] = F, k.$data.$invalid = !p || !!k.$data.$invalid, k.$data.$error = k.$data.$invalid, !p) {
|
|
154
|
-
let B = E.$message || "";
|
|
155
|
-
const T = E.$params || {};
|
|
156
|
-
typeof B == "function" && (B = B({
|
|
157
|
-
$pending: !1,
|
|
158
|
-
$invalid: !p,
|
|
159
|
-
$params: T,
|
|
160
|
-
$model: P,
|
|
161
|
-
$response: F
|
|
162
|
-
})), k.$errors.push({
|
|
163
|
-
$property: h,
|
|
164
|
-
$message: B,
|
|
165
|
-
$params: T,
|
|
166
|
-
$response: F,
|
|
167
|
-
$model: P,
|
|
168
|
-
$pending: !1,
|
|
169
|
-
$validator: N
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
return {
|
|
173
|
-
$valid: k.$valid && p,
|
|
174
|
-
$data: k.$data,
|
|
175
|
-
$errors: k.$errors
|
|
176
|
-
};
|
|
177
|
-
}, {
|
|
178
|
-
$valid: !0,
|
|
179
|
-
$data: {},
|
|
180
|
-
$errors: []
|
|
181
|
-
});
|
|
182
|
-
return I.$data[h] = x.$data, I.$errors[h] = x.$errors, {
|
|
183
|
-
$valid: I.$valid && x.$valid,
|
|
184
|
-
$data: I.$data,
|
|
185
|
-
$errors: I.$errors
|
|
186
|
-
};
|
|
187
|
-
}, {
|
|
188
|
-
$valid: !0,
|
|
189
|
-
$data: {},
|
|
190
|
-
$errors: {}
|
|
191
|
-
});
|
|
192
|
-
return {
|
|
193
|
-
$valid: l.$valid && u.$valid,
|
|
194
|
-
$data: l.$data.concat(u.$data),
|
|
195
|
-
$errors: l.$errors.concat(u.$errors)
|
|
196
|
-
};
|
|
197
|
-
}, {
|
|
198
|
-
$valid: !0,
|
|
199
|
-
$data: [],
|
|
200
|
-
$errors: []
|
|
201
|
-
});
|
|
202
|
-
},
|
|
203
|
-
$message: (i) => {
|
|
204
|
-
let {
|
|
205
|
-
$response: n
|
|
206
|
-
} = i;
|
|
207
|
-
return n ? n.$errors.map((o) => Object.values(o).map((a) => a.map((l) => l.$message)).reduce((a, l) => a.concat(l), [])) : [];
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
const Gt = (e) => {
|
|
212
|
-
if (e = t(e), Array.isArray(e)) return !!e.length;
|
|
213
|
-
if (e == null)
|
|
214
|
-
return !1;
|
|
215
|
-
if (e === !1)
|
|
216
|
-
return !0;
|
|
217
|
-
if (e instanceof Date)
|
|
218
|
-
return !isNaN(e.getTime());
|
|
219
|
-
if (typeof e == "object") {
|
|
220
|
-
for (let i in e) return !0;
|
|
221
|
-
return !1;
|
|
222
|
-
}
|
|
223
|
-
return !!String(e).length;
|
|
224
|
-
}, gn = (e) => (e = t(e), Array.isArray(e) ? e.length : typeof e == "object" ? Object.keys(e).length : String(e).length);
|
|
225
|
-
function be() {
|
|
226
|
-
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
227
|
-
i[n] = arguments[n];
|
|
228
|
-
return (o) => (o = t(o), !Gt(o) || i.every((a) => (a.lastIndex = 0, a.test(o))));
|
|
229
|
-
}
|
|
230
|
-
var yn = /* @__PURE__ */ Object.freeze({
|
|
231
|
-
__proto__: null,
|
|
232
|
-
forEach: mn,
|
|
233
|
-
len: gn,
|
|
234
|
-
normalizeValidatorObject: Ye,
|
|
235
|
-
regex: be,
|
|
236
|
-
req: Gt,
|
|
237
|
-
unwrap: t,
|
|
238
|
-
unwrapNormalizedValidator: Ft,
|
|
239
|
-
unwrapValidatorResponse: Vt,
|
|
240
|
-
withAsync: pn,
|
|
241
|
-
withMessage: dn,
|
|
242
|
-
withParams: un
|
|
243
|
-
});
|
|
244
|
-
be(/^[a-zA-Z]*$/);
|
|
245
|
-
be(/^[a-zA-Z0-9]*$/);
|
|
246
|
-
be(/^\d*(\.\d+)?$/);
|
|
247
|
-
const vn = /^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;
|
|
248
|
-
be(vn);
|
|
249
|
-
const fn = /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;
|
|
250
|
-
be(fn);
|
|
251
|
-
be(/(^[0-9]*$)|(^-[0-9]+$)/);
|
|
252
|
-
be(/^[-]?\d*(\.\d+)?$/);
|
|
253
|
-
function Ke(e) {
|
|
254
|
-
return !!fi.find((i) => i.key === e);
|
|
255
|
-
}
|
|
256
|
-
const Yt = {
|
|
257
|
-
AT: {
|
|
258
|
-
regex: /^ATU\d{8}$/,
|
|
259
|
-
prefix: "AT",
|
|
260
|
-
example: "ATU12345678"
|
|
261
|
-
},
|
|
262
|
-
BE: {
|
|
263
|
-
regex: /^BE0?\d{9}$/,
|
|
264
|
-
prefix: "BE",
|
|
265
|
-
example: "BE0123456789"
|
|
266
|
-
},
|
|
267
|
-
BG: {
|
|
268
|
-
regex: /^BG\d{9,10}$/,
|
|
269
|
-
prefix: "BG",
|
|
270
|
-
example: "BG123456789"
|
|
271
|
-
},
|
|
272
|
-
HR: {
|
|
273
|
-
regex: /^HR\d{11}$/,
|
|
274
|
-
prefix: "HR",
|
|
275
|
-
example: "HR12345678901"
|
|
276
|
-
},
|
|
277
|
-
CY: {
|
|
278
|
-
regex: /^CY\d{8}[A-Z]$/,
|
|
279
|
-
prefix: "CY",
|
|
280
|
-
example: "CY12345678X"
|
|
281
|
-
},
|
|
282
|
-
CZ: {
|
|
283
|
-
regex: /^CZ\d{8,10}$/,
|
|
284
|
-
prefix: "CZ",
|
|
285
|
-
example: "CZ12345678"
|
|
286
|
-
},
|
|
287
|
-
DE: {
|
|
288
|
-
regex: /^DE\d{9}$/,
|
|
289
|
-
prefix: "DE",
|
|
290
|
-
example: "DE123456789"
|
|
291
|
-
},
|
|
292
|
-
DK: {
|
|
293
|
-
regex: /^DK\d{8}$/,
|
|
294
|
-
prefix: "DK",
|
|
295
|
-
example: "DK12345678"
|
|
296
|
-
},
|
|
297
|
-
EE: {
|
|
298
|
-
regex: /^EE\d{9}$/,
|
|
299
|
-
prefix: "EE",
|
|
300
|
-
example: "EE123456789"
|
|
301
|
-
},
|
|
302
|
-
GR: {
|
|
303
|
-
regex: /^(EL|GR)\d{9}$/,
|
|
304
|
-
prefix: "GR",
|
|
305
|
-
example: "GR123456789"
|
|
306
|
-
},
|
|
307
|
-
ES: {
|
|
308
|
-
regex: /^ES[A-Z0-9]\d{7}[A-Z0-9]$/,
|
|
309
|
-
prefix: "ES",
|
|
310
|
-
example: "ESX1234567X"
|
|
311
|
-
},
|
|
312
|
-
FI: {
|
|
313
|
-
regex: /^FI\d{8}$/,
|
|
314
|
-
prefix: "FI",
|
|
315
|
-
example: "FI12345678"
|
|
316
|
-
},
|
|
317
|
-
FR: {
|
|
318
|
-
regex: /^FR[0-9A-Z]{2}\d{9}$/,
|
|
319
|
-
prefix: "FR",
|
|
320
|
-
example: "FRXX123456789"
|
|
321
|
-
},
|
|
322
|
-
HU: {
|
|
323
|
-
regex: /^HU\d{8}$/,
|
|
324
|
-
prefix: "HU",
|
|
325
|
-
example: "HU12345678"
|
|
326
|
-
},
|
|
327
|
-
IE: {
|
|
328
|
-
regex: /^IE[0-9A-Z]{8,9}$/,
|
|
329
|
-
prefix: "IE",
|
|
330
|
-
example: "IE1234567A"
|
|
331
|
-
},
|
|
332
|
-
IS: {
|
|
333
|
-
regex: /^IS\d{5}$/,
|
|
334
|
-
prefix: "IS",
|
|
335
|
-
example: "IS12345"
|
|
336
|
-
},
|
|
337
|
-
IT: {
|
|
338
|
-
regex: /^IT\d{11}$/,
|
|
339
|
-
prefix: "IT",
|
|
340
|
-
example: "IT12345678901"
|
|
341
|
-
},
|
|
342
|
-
LT: {
|
|
343
|
-
regex: /^LT(\d{9}|\d{12})$/,
|
|
344
|
-
prefix: "LT",
|
|
345
|
-
example: "LT123456789 or LT123456789012"
|
|
346
|
-
},
|
|
347
|
-
LU: {
|
|
348
|
-
regex: /^LU\d{8}$/,
|
|
349
|
-
prefix: "LU",
|
|
350
|
-
example: "LU12345678"
|
|
351
|
-
},
|
|
352
|
-
LV: {
|
|
353
|
-
regex: /^LV\d{11}$/,
|
|
354
|
-
prefix: "LV",
|
|
355
|
-
example: "LV12345678901"
|
|
356
|
-
},
|
|
357
|
-
ME: {
|
|
358
|
-
regex: /^ME\d{9}$/,
|
|
359
|
-
prefix: "ME",
|
|
360
|
-
example: "ME123456789"
|
|
361
|
-
},
|
|
362
|
-
MT: {
|
|
363
|
-
regex: /^MT\d{8}$/,
|
|
364
|
-
prefix: "MT",
|
|
365
|
-
example: "MT12345678"
|
|
366
|
-
},
|
|
367
|
-
NL: {
|
|
368
|
-
regex: /^NL\d{9}B\d{2}$/,
|
|
369
|
-
prefix: "NL",
|
|
370
|
-
example: "NL123456789B01"
|
|
371
|
-
},
|
|
372
|
-
PL: {
|
|
373
|
-
regex: /^PL\d{10}$/,
|
|
374
|
-
prefix: "PL",
|
|
375
|
-
example: "PL1234567890"
|
|
376
|
-
},
|
|
377
|
-
PT: {
|
|
378
|
-
regex: /^PT\d{9}$/,
|
|
379
|
-
prefix: "PT",
|
|
380
|
-
example: "PT123456789"
|
|
381
|
-
},
|
|
382
|
-
RO: {
|
|
383
|
-
regex: /^RO\d{2,10}$/,
|
|
384
|
-
prefix: "RO",
|
|
385
|
-
example: "RO1234567890"
|
|
386
|
-
},
|
|
387
|
-
RU: {
|
|
388
|
-
regex: /^RU(\d{9}|\d{10}|\d{12})$/,
|
|
389
|
-
prefix: "RU",
|
|
390
|
-
example: "RU123456789 or RU1234567890 or RU123456789012"
|
|
391
|
-
},
|
|
392
|
-
SE: {
|
|
393
|
-
regex: /^SE\d{10}01$/,
|
|
394
|
-
prefix: "SE",
|
|
395
|
-
example: "SE123456789001"
|
|
396
|
-
},
|
|
397
|
-
SI: {
|
|
398
|
-
regex: /^SI\d{8}$/,
|
|
399
|
-
prefix: "SI",
|
|
400
|
-
example: "SI12345678"
|
|
401
|
-
},
|
|
402
|
-
SK: {
|
|
403
|
-
regex: /^SK\d{10}$/,
|
|
404
|
-
prefix: "SK",
|
|
405
|
-
example: "SK1234567890"
|
|
406
|
-
},
|
|
407
|
-
CH: {
|
|
408
|
-
regex: /^CHE\d{9}(MWST|TVA|IVA)?$/,
|
|
409
|
-
prefix: "CHE",
|
|
410
|
-
example: "CHE123456789MWST"
|
|
411
|
-
},
|
|
412
|
-
NO: {
|
|
413
|
-
regex: /^NO\d{9}MVA$/,
|
|
414
|
-
prefix: "NO",
|
|
415
|
-
example: "NO123456789MVA"
|
|
416
|
-
},
|
|
417
|
-
GB: {
|
|
418
|
-
regex: /^GB(\d{9}|\d{12}|GD\d{3}|HA\d{3})$/,
|
|
419
|
-
prefix: "GB",
|
|
420
|
-
example: "GB123456789"
|
|
421
|
-
},
|
|
422
|
-
XI: {
|
|
423
|
-
regex: /^XI(\d{9}|\d{12})$/,
|
|
424
|
-
prefix: "XI",
|
|
425
|
-
example: "XI123456789"
|
|
426
|
-
}
|
|
427
|
-
}, _n = (e) => !e || typeof e != "string" || e.trim() === "" ? !0 : Object.values(Yt).some((i) => i.regex.test(e)), hn = ({ $model: e }) => {
|
|
428
|
-
if (!e || typeof e != "string" || e.trim() === "")
|
|
429
|
-
return "";
|
|
430
|
-
const i = li(mi, null);
|
|
431
|
-
if (!i)
|
|
432
|
-
return "Invalid tax ID";
|
|
433
|
-
const { formatMessage: n } = i, o = Object.values(Yt).find(
|
|
434
|
-
(a) => e.toUpperCase().startsWith(a.prefix.toUpperCase())
|
|
435
|
-
);
|
|
436
|
-
return o ? n(
|
|
437
|
-
{
|
|
438
|
-
defaultMessage: "Invalid tax ID format. Example: {example}",
|
|
439
|
-
id: "form_validation.tax_id.invalid_format",
|
|
440
|
-
description: "Error message when tax ID format is invalid but prefix matches"
|
|
441
|
-
},
|
|
442
|
-
{ example: o.example }
|
|
443
|
-
) : n({
|
|
444
|
-
defaultMessage: "Invalid tax ID",
|
|
445
|
-
id: "taxId.invalid",
|
|
446
|
-
description: "Error message when tax ID is invalid"
|
|
447
|
-
});
|
|
448
|
-
}, it = yn.withMessage(hn, _n), Mn = "preview", bn = "NL", Kt = (e) => {
|
|
449
|
-
var i, n;
|
|
450
|
-
if ("organization" in e)
|
|
451
|
-
return (i = e.organization) == null ? void 0 : i.registered_address;
|
|
452
|
-
if ("individual" in e)
|
|
453
|
-
return (n = e.individual) == null ? void 0 : n.residential_address;
|
|
454
|
-
}, In = (e) => {
|
|
455
|
-
const i = Kt(e);
|
|
456
|
-
return {
|
|
457
|
-
...(i == null ? void 0 : i.line1) && { line1: i.line1 },
|
|
458
|
-
...(i == null ? void 0 : i.line2) && { line2: i.line2 },
|
|
459
|
-
...(i == null ? void 0 : i.city) && { city: i.city },
|
|
460
|
-
...(i == null ? void 0 : i.state) && { state: i.state },
|
|
461
|
-
country: (i == null ? void 0 : i.country) || bn,
|
|
462
|
-
...(i == null ? void 0 : i.postal_code) && { postal_code: i.postal_code }
|
|
463
|
-
};
|
|
464
|
-
}, An = (e) => {
|
|
465
|
-
var o, a;
|
|
466
|
-
const i = In(e), n = e.type ?? "INDIVIDUAL";
|
|
467
|
-
if (n === "ORGANIZATION") {
|
|
468
|
-
const l = "organization" in e ? e.organization : void 0, c = (a = (o = l == null ? void 0 : l.tax_ids) == null ? void 0 : o[0]) == null ? void 0 : a.id;
|
|
469
|
-
return {
|
|
470
|
-
type: n,
|
|
471
|
-
organization: {
|
|
472
|
-
legal_name: (l == null ? void 0 : l.legal_name) || Mn,
|
|
473
|
-
registered_address: i,
|
|
474
|
-
...c && {
|
|
475
|
-
tax_id: it.$validator(c, {}, {}) ? c : void 0
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
};
|
|
479
|
-
}
|
|
480
|
-
return {
|
|
481
|
-
type: n,
|
|
482
|
-
individual: {
|
|
483
|
-
residential_address: i
|
|
484
|
-
}
|
|
485
|
-
};
|
|
486
|
-
}, Pn = {
|
|
487
|
-
AD: "EUR",
|
|
488
|
-
AE: "AED",
|
|
489
|
-
AF: "AFN",
|
|
490
|
-
AG: "XCD",
|
|
491
|
-
AI: "XCD",
|
|
492
|
-
AL: "ALL",
|
|
493
|
-
AM: "AMD",
|
|
494
|
-
AO: "AOA",
|
|
495
|
-
AR: "ARS",
|
|
496
|
-
AS: "USD",
|
|
497
|
-
AT: "EUR",
|
|
498
|
-
AU: "AUD",
|
|
499
|
-
AW: "AWG",
|
|
500
|
-
AX: "EUR",
|
|
501
|
-
AZ: "AZN",
|
|
502
|
-
BA: "BAM",
|
|
503
|
-
BB: "BBD",
|
|
504
|
-
BD: "BDT",
|
|
505
|
-
BE: "EUR",
|
|
506
|
-
BF: "XOF",
|
|
507
|
-
BG: "BGN",
|
|
508
|
-
BH: "BHD",
|
|
509
|
-
BI: "BIF",
|
|
510
|
-
BJ: "XOF",
|
|
511
|
-
BL: "EUR",
|
|
512
|
-
BM: "BMD",
|
|
513
|
-
BN: "BND",
|
|
514
|
-
BO: "BOB",
|
|
515
|
-
BQ: "USD",
|
|
516
|
-
BR: "BRL",
|
|
517
|
-
BS: "BSD",
|
|
518
|
-
BT: "BTN",
|
|
519
|
-
BV: "NOK",
|
|
520
|
-
BW: "BWP",
|
|
521
|
-
BY: "BYN",
|
|
522
|
-
BZ: "BZD",
|
|
523
|
-
CA: "CAD",
|
|
524
|
-
CC: "AUD",
|
|
525
|
-
CD: "CDF",
|
|
526
|
-
CF: "XAF",
|
|
527
|
-
CG: "XAF",
|
|
528
|
-
CH: "CHF",
|
|
529
|
-
CI: "XOF",
|
|
530
|
-
CK: "NZD",
|
|
531
|
-
CL: "CLP",
|
|
532
|
-
CM: "XAF",
|
|
533
|
-
CN: "CNY",
|
|
534
|
-
CO: "COP",
|
|
535
|
-
CR: "CRC",
|
|
536
|
-
CU: "CUP",
|
|
537
|
-
CV: "CVE",
|
|
538
|
-
CW: "ANG",
|
|
539
|
-
CX: "AUD",
|
|
540
|
-
CY: "EUR",
|
|
541
|
-
CZ: "CZK",
|
|
542
|
-
DE: "EUR",
|
|
543
|
-
DJ: "DJF",
|
|
544
|
-
DK: "DKK",
|
|
545
|
-
DM: "XCD",
|
|
546
|
-
DO: "DOP",
|
|
547
|
-
DZ: "DZD",
|
|
548
|
-
EC: "USD",
|
|
549
|
-
EE: "EUR",
|
|
550
|
-
EG: "EGP",
|
|
551
|
-
EH: "MAD",
|
|
552
|
-
ER: "ERN",
|
|
553
|
-
ES: "EUR",
|
|
554
|
-
ET: "ETB",
|
|
555
|
-
FI: "EUR",
|
|
556
|
-
FJ: "FJD",
|
|
557
|
-
FK: "FKP",
|
|
558
|
-
FM: "USD",
|
|
559
|
-
FO: "DKK",
|
|
560
|
-
FR: "EUR",
|
|
561
|
-
GA: "XAF",
|
|
562
|
-
GB: "GBP",
|
|
563
|
-
GD: "XCD",
|
|
564
|
-
GE: "GEL",
|
|
565
|
-
GF: "EUR",
|
|
566
|
-
GG: "GBP",
|
|
567
|
-
GH: "GHS",
|
|
568
|
-
GI: "GIP",
|
|
569
|
-
GL: "DKK",
|
|
570
|
-
GM: "GMD",
|
|
571
|
-
GN: "GNF",
|
|
572
|
-
GP: "EUR",
|
|
573
|
-
GQ: "XAF",
|
|
574
|
-
GR: "EUR",
|
|
575
|
-
GS: "GBP",
|
|
576
|
-
GT: "GTQ",
|
|
577
|
-
GU: "USD",
|
|
578
|
-
GW: "XOF",
|
|
579
|
-
GY: "GYD",
|
|
580
|
-
HK: "HKD",
|
|
581
|
-
HM: "AUD",
|
|
582
|
-
HN: "HNL",
|
|
583
|
-
HR: "EUR",
|
|
584
|
-
HT: "HTG",
|
|
585
|
-
HU: "HUF",
|
|
586
|
-
ID: "IDR",
|
|
587
|
-
IE: "EUR",
|
|
588
|
-
IL: "ILS",
|
|
589
|
-
IM: "GBP",
|
|
590
|
-
IN: "INR",
|
|
591
|
-
IO: "USD",
|
|
592
|
-
IQ: "IQD",
|
|
593
|
-
IR: "IRR",
|
|
594
|
-
IS: "ISK",
|
|
595
|
-
IT: "EUR",
|
|
596
|
-
JE: "GBP",
|
|
597
|
-
JM: "JMD",
|
|
598
|
-
JO: "JOD",
|
|
599
|
-
JP: "JPY",
|
|
600
|
-
KE: "KES",
|
|
601
|
-
KG: "KGS",
|
|
602
|
-
KH: "KHR",
|
|
603
|
-
KI: "AUD",
|
|
604
|
-
KM: "KMF",
|
|
605
|
-
KN: "XCD",
|
|
606
|
-
KP: "KPW",
|
|
607
|
-
KR: "KRW",
|
|
608
|
-
KW: "KWD",
|
|
609
|
-
KY: "KYD",
|
|
610
|
-
KZ: "KZT",
|
|
611
|
-
LA: "LAK",
|
|
612
|
-
LB: "LBP",
|
|
613
|
-
LC: "XCD",
|
|
614
|
-
LI: "CHF",
|
|
615
|
-
LK: "LKR",
|
|
616
|
-
LR: "LRD",
|
|
617
|
-
LS: "LSL",
|
|
618
|
-
LT: "EUR",
|
|
619
|
-
LU: "EUR",
|
|
620
|
-
LV: "EUR",
|
|
621
|
-
LY: "LYD",
|
|
622
|
-
MA: "MAD",
|
|
623
|
-
MC: "EUR",
|
|
624
|
-
MD: "MDL",
|
|
625
|
-
ME: "EUR",
|
|
626
|
-
MF: "EUR",
|
|
627
|
-
MG: "MGA",
|
|
628
|
-
MH: "USD",
|
|
629
|
-
MK: "MKD",
|
|
630
|
-
ML: "XOF",
|
|
631
|
-
MM: "MMK",
|
|
632
|
-
MN: "MNT",
|
|
633
|
-
MO: "MOP",
|
|
634
|
-
MP: "USD",
|
|
635
|
-
MQ: "EUR",
|
|
636
|
-
MR: "MRU",
|
|
637
|
-
MS: "XCD",
|
|
638
|
-
MT: "EUR",
|
|
639
|
-
MU: "MUR",
|
|
640
|
-
MV: "MVR",
|
|
641
|
-
MW: "MWK",
|
|
642
|
-
MX: "MXN",
|
|
643
|
-
MY: "MYR",
|
|
644
|
-
MZ: "MZN",
|
|
645
|
-
NA: "NAD",
|
|
646
|
-
NC: "XPF",
|
|
647
|
-
NE: "XOF",
|
|
648
|
-
NF: "AUD",
|
|
649
|
-
NG: "NGN",
|
|
650
|
-
NI: "NIO",
|
|
651
|
-
NL: "EUR",
|
|
652
|
-
NO: "NOK",
|
|
653
|
-
NP: "NPR",
|
|
654
|
-
NR: "AUD",
|
|
655
|
-
NU: "NZD",
|
|
656
|
-
NZ: "NZD",
|
|
657
|
-
OM: "OMR",
|
|
658
|
-
PA: "PAB",
|
|
659
|
-
PE: "PEN",
|
|
660
|
-
PF: "XPF",
|
|
661
|
-
PG: "PGK",
|
|
662
|
-
PH: "PHP",
|
|
663
|
-
PK: "PKR",
|
|
664
|
-
PL: "PLN",
|
|
665
|
-
PM: "EUR",
|
|
666
|
-
PN: "NZD",
|
|
667
|
-
PR: "USD",
|
|
668
|
-
PS: "ILS",
|
|
669
|
-
PT: "EUR",
|
|
670
|
-
PW: "USD",
|
|
671
|
-
PY: "PYG",
|
|
672
|
-
QA: "QAR",
|
|
673
|
-
RE: "EUR",
|
|
674
|
-
RO: "RON",
|
|
675
|
-
RS: "RSD",
|
|
676
|
-
RU: "RUB",
|
|
677
|
-
RW: "RWF",
|
|
678
|
-
SA: "SAR",
|
|
679
|
-
SB: "SBD",
|
|
680
|
-
SC: "SCR",
|
|
681
|
-
SD: "SDG",
|
|
682
|
-
SE: "SEK",
|
|
683
|
-
SG: "SGD",
|
|
684
|
-
SH: "SHP",
|
|
685
|
-
SI: "EUR",
|
|
686
|
-
SJ: "NOK",
|
|
687
|
-
SK: "EUR",
|
|
688
|
-
SL: "SLE",
|
|
689
|
-
SM: "EUR",
|
|
690
|
-
SN: "XOF",
|
|
691
|
-
SO: "SOS",
|
|
692
|
-
SR: "SRD",
|
|
693
|
-
SS: "SSP",
|
|
694
|
-
ST: "STN",
|
|
695
|
-
SV: "USD",
|
|
696
|
-
SX: "ANG",
|
|
697
|
-
SY: "SYP",
|
|
698
|
-
SZ: "SZL",
|
|
699
|
-
TC: "USD",
|
|
700
|
-
TD: "XAF",
|
|
701
|
-
TF: "EUR",
|
|
702
|
-
TG: "XOF",
|
|
703
|
-
TH: "THB",
|
|
704
|
-
TJ: "TJS",
|
|
705
|
-
TK: "NZD",
|
|
706
|
-
TL: "USD",
|
|
707
|
-
TM: "TMT",
|
|
708
|
-
TN: "TND",
|
|
709
|
-
TO: "TOP",
|
|
710
|
-
TR: "TRY",
|
|
711
|
-
TT: "TTD",
|
|
712
|
-
TV: "AUD",
|
|
713
|
-
TW: "TWD",
|
|
714
|
-
TZ: "TZS",
|
|
715
|
-
UA: "UAH",
|
|
716
|
-
UG: "UGX",
|
|
717
|
-
US: "USD",
|
|
718
|
-
UY: "UYU",
|
|
719
|
-
UZ: "UZS",
|
|
720
|
-
VA: "EUR",
|
|
721
|
-
VC: "XCD",
|
|
722
|
-
VE: "VES",
|
|
723
|
-
VG: "USD",
|
|
724
|
-
VI: "USD",
|
|
725
|
-
VN: "VND",
|
|
726
|
-
VU: "VUV",
|
|
727
|
-
WF: "XPF",
|
|
728
|
-
WS: "WST",
|
|
729
|
-
YE: "YER",
|
|
730
|
-
YT: "EUR",
|
|
731
|
-
ZA: "ZAR",
|
|
732
|
-
ZM: "ZMW",
|
|
733
|
-
ZW: "ZWL"
|
|
734
|
-
}, Dn = (e) => {
|
|
735
|
-
if (e)
|
|
736
|
-
return Pn[e];
|
|
737
|
-
}, Ht = ({
|
|
738
|
-
country: e,
|
|
739
|
-
pricingCurrencySettings: i,
|
|
740
|
-
fallbackCurrency: n
|
|
741
|
-
}) => {
|
|
742
|
-
const o = Dn(e), a = (i == null ? void 0 : i.pricing_currencies) ?? [];
|
|
743
|
-
return o && a.includes(o) ? o : (i == null ? void 0 : i.default_pricing_currency) ?? n ?? o;
|
|
744
|
-
}, Nn = () => {
|
|
745
|
-
const { getInvoicePreview: e } = Ii(), i = Me(), n = Y(), o = Y(), a = Y(), l = Y({}), c = Y(Ne.Initial), g = Y({}), u = Y(), I = (h) => `${h.type}:${h.value}`;
|
|
746
|
-
return {
|
|
747
|
-
loadInvoicePreview: async ({
|
|
748
|
-
subscription: h,
|
|
749
|
-
subscriptionStartAt: P,
|
|
750
|
-
customer: m = {},
|
|
751
|
-
seatsValues: x,
|
|
752
|
-
unitsValues: k,
|
|
753
|
-
enabledPricingIds: v,
|
|
754
|
-
promotionCode: N
|
|
755
|
-
}) => {
|
|
756
|
-
var A, f, C, R, K, H;
|
|
757
|
-
const E = An(m);
|
|
758
|
-
c.value = Ne.Loading;
|
|
759
|
-
const V = Ee({
|
|
760
|
-
pricingPlanScheduleInfos: h.pricing_plan_schedule_infos,
|
|
761
|
-
type: "DEFAULT"
|
|
762
|
-
}), F = (A = V == null ? void 0 : V.pricing_plan_version) == null ? void 0 : A.pricing_currency_settings, p = (((f = F == null ? void 0 : F.pricing_currencies) == null ? void 0 : f.length) ?? 0) > 1, B = ((R = (C = V == null ? void 0 : V.pricing_plan_version) == null ? void 0 : C.billing_period_settings) == null ? void 0 : R.billing_periods) ?? [], T = B.length > 1, q = B.length > 0 ? B.map(({ period: Z }) => Z) : h.billing_period ? [h.billing_period] : [], G = Ht({
|
|
763
|
-
country: (K = Kt(m)) == null ? void 0 : K.country,
|
|
764
|
-
pricingCurrencySettings: F,
|
|
765
|
-
fallbackCurrency: h.billing_currency
|
|
766
|
-
});
|
|
767
|
-
if (!q.length) {
|
|
768
|
-
i.warn("INVOICE_PREVIEW_SKIPPED", "No billing period to preview an invoice for", {
|
|
769
|
-
subscriptionId: h.id
|
|
770
|
-
}), c.value = Ne.Done;
|
|
771
|
-
return;
|
|
772
|
-
}
|
|
773
|
-
const s = h.billing_period ? I(h.billing_period) : I(q[0]), r = q.map(async (Z) => {
|
|
774
|
-
var ne;
|
|
775
|
-
const oe = I(Z), te = Rt({
|
|
776
|
-
enabledPricings: v == null ? void 0 : v.map((ee) => ({
|
|
777
|
-
pricing_id: ee
|
|
778
|
-
})),
|
|
779
|
-
seatsValues: x,
|
|
780
|
-
unitsValues: k,
|
|
781
|
-
pricingPlanScheduleInfos: h.pricing_plan_schedule_infos,
|
|
782
|
-
pricingCurrency: p ? G : void 0,
|
|
783
|
-
billingPeriod: T ? Z : void 0
|
|
784
|
-
}) ?? [];
|
|
785
|
-
if (N) {
|
|
786
|
-
const ee = (ne = h.pricing_plan_schedule_infos.find(
|
|
787
|
-
({ pricing_plan_schedule: J }) => J.type === "DEFAULT"
|
|
788
|
-
)) == null ? void 0 : ne.id;
|
|
789
|
-
if (ee) {
|
|
790
|
-
const J = te.find(
|
|
791
|
-
({ pricing_plan_schedule_id: re }) => re === ee
|
|
792
|
-
);
|
|
793
|
-
J ? J.promotion_codes = [N] : te.push({
|
|
794
|
-
pricing_plan_schedule_id: ee,
|
|
795
|
-
promotion_codes: [N]
|
|
796
|
-
});
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
const ie = {
|
|
800
|
-
pricingPlanSubscriptionId: h.id,
|
|
801
|
-
startAt: P,
|
|
802
|
-
customizations: te,
|
|
803
|
-
customer: E
|
|
804
|
-
}, ae = g.value[oe];
|
|
805
|
-
if (ae && bi(ie, ae))
|
|
806
|
-
return { periodKey: oe, response: void 0 };
|
|
807
|
-
g.value = {
|
|
808
|
-
...g.value,
|
|
809
|
-
[oe]: ie
|
|
810
|
-
};
|
|
811
|
-
const U = await e(ie);
|
|
812
|
-
return { periodKey: oe, response: U };
|
|
813
|
-
});
|
|
814
|
-
try {
|
|
815
|
-
const Z = {
|
|
816
|
-
...l.value
|
|
817
|
-
}, oe = await Promise.all(r), te = h.pricing_plan_schedule_infos.find(
|
|
818
|
-
({ pricing_plan_schedule: ae }) => ae.type === "TRIAL"
|
|
819
|
-
), ie = (H = h.pricing_plan_schedule_infos.find(
|
|
820
|
-
({ pricing_plan_schedule: ae }) => ae.type === "DEFAULT"
|
|
821
|
-
)) == null ? void 0 : H.id;
|
|
822
|
-
oe.forEach(({ periodKey: ae, response: U }) => {
|
|
823
|
-
var J;
|
|
824
|
-
if (!U) return;
|
|
825
|
-
u.value = (J = U.invoice_infos.at(-1)) == null ? void 0 : J.pricing_plan_schedule_id, te && (o.value = U.first_invoice, te.start_at && te.end_at && (n.value = hi(
|
|
826
|
-
new Date(te.start_at),
|
|
827
|
-
new Date(te.end_at)
|
|
828
|
-
)));
|
|
829
|
-
const ne = U.invoice_infos.find(
|
|
830
|
-
({ pricing_plan_schedule_id: re }) => re === ie
|
|
831
|
-
), ee = ne == null ? void 0 : ne.invoices[0];
|
|
832
|
-
ee && (Z[ae] = ee);
|
|
833
|
-
}), l.value = Z, a.value = Z[s];
|
|
834
|
-
} catch (Z) {
|
|
835
|
-
throw c.value = Ne.Failed, i.error("INVOICE_PREVIEW_FAILED", "Failed to load invoice preview", {}, Z), Z;
|
|
836
|
-
} finally {
|
|
837
|
-
c.value = Ne.Done;
|
|
838
|
-
}
|
|
839
|
-
},
|
|
840
|
-
invoicePreview: a,
|
|
841
|
-
invoicePreviewByBillingPeriod: l,
|
|
842
|
-
trialInvoicePreview: o,
|
|
843
|
-
trialPeriod: n,
|
|
844
|
-
lastPreviewScheduleId: u,
|
|
845
|
-
isPending: M(() => c.value === Ne.Loading)
|
|
846
|
-
};
|
|
847
|
-
}, Lt = ["email", "country"], Qt = "GENERIC_TAX_ID", Tt = {
|
|
848
|
-
US: ["addressLine1", "postalCode"],
|
|
849
|
-
CA: ["state"]
|
|
850
|
-
}, En = (e) => !e || !Tt[e] ? Lt : [...Tt[e], ...Lt], wt = (e) => {
|
|
851
|
-
const i = {
|
|
852
|
-
...e.addressLine1 && { line1: e.addressLine1 },
|
|
853
|
-
...e.addressLine2 && { line2: e.addressLine2 },
|
|
854
|
-
...e.city && { city: e.city },
|
|
855
|
-
...e.state && { state: e.state },
|
|
856
|
-
...e.postalCode && { postal_code: e.postalCode },
|
|
857
|
-
country: e.country ?? ""
|
|
858
|
-
};
|
|
859
|
-
return e.type === "ORGANIZATION" ? {
|
|
860
|
-
type: "ORGANIZATION",
|
|
861
|
-
organization: {
|
|
862
|
-
legal_name: e.companyLegalName ?? "",
|
|
863
|
-
registered_address: i,
|
|
864
|
-
...e.companyVatNumber && {
|
|
865
|
-
tax_ids: [{ id: e.companyVatNumber, type: Qt }]
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
} : {
|
|
869
|
-
type: "INDIVIDUAL",
|
|
870
|
-
individual: {
|
|
871
|
-
residential_address: i
|
|
872
|
-
}
|
|
873
|
-
};
|
|
874
|
-
};
|
|
875
|
-
function Cn() {
|
|
876
|
-
return {
|
|
877
|
-
/**
|
|
878
|
-
* Get geolocation information from the user
|
|
879
|
-
*/
|
|
880
|
-
getGeoLocation() {
|
|
881
|
-
return fetch("https://api.country.is/").then((e) => e.json());
|
|
882
|
-
}
|
|
883
|
-
};
|
|
884
|
-
}
|
|
885
|
-
function xn({
|
|
886
|
-
initialState: e,
|
|
887
|
-
onRequiredFieldChange: i
|
|
888
|
-
}) {
|
|
889
|
-
const n = Y(Be(e)), o = Y(Be(e)), a = (y) => {
|
|
890
|
-
const h = Be({ ...si(n.value), ...y });
|
|
891
|
-
n.value = h, o.value = structuredClone(h);
|
|
892
|
-
}, l = M(
|
|
893
|
-
() => En(n.value.country)
|
|
894
|
-
), c = (y) => l.value.includes(y), g = Pi(
|
|
895
|
-
{
|
|
896
|
-
email: { required: Dt, email: Di },
|
|
897
|
-
country: { required: Dt },
|
|
898
|
-
state: { required: $e(() => c("state")) },
|
|
899
|
-
addressLine1: { required: $e(() => c("addressLine1")) },
|
|
900
|
-
postalCode: { required: $e(() => c("postalCode")) },
|
|
901
|
-
companyLegalName: $e(n.value.type === "ORGANIZATION"),
|
|
902
|
-
companyVatNumber: { taxId: it }
|
|
903
|
-
},
|
|
904
|
-
n
|
|
905
|
-
), u = (y) => {
|
|
906
|
-
y || Cn().getGeoLocation().then(({ country: h }) => {
|
|
907
|
-
n.value.country = h;
|
|
908
|
-
});
|
|
909
|
-
}, I = (y, h) => {
|
|
910
|
-
const P = Ei({ from: h, to: y }), m = Object.keys(P).find(Ln);
|
|
911
|
-
if (m) {
|
|
912
|
-
if (["type", "companyVatNumber"].includes(m)) {
|
|
913
|
-
i(y);
|
|
914
|
-
return;
|
|
915
|
-
}
|
|
916
|
-
if (m === "seatsValues") {
|
|
917
|
-
i(y);
|
|
918
|
-
return;
|
|
919
|
-
}
|
|
920
|
-
if (m === "unitsValues") {
|
|
921
|
-
i(y);
|
|
922
|
-
return;
|
|
923
|
-
}
|
|
924
|
-
if (m === "enabledPricingIds") {
|
|
925
|
-
i(y);
|
|
926
|
-
return;
|
|
927
|
-
}
|
|
928
|
-
if (m !== "email" && c(m)) {
|
|
929
|
-
i(y);
|
|
930
|
-
return;
|
|
931
|
-
}
|
|
932
|
-
}
|
|
933
|
-
};
|
|
934
|
-
return Oe(async () => {
|
|
935
|
-
await u(e == null ? void 0 : e.country);
|
|
936
|
-
}), Ti(
|
|
937
|
-
() => JSON.parse(JSON.stringify(n.value)),
|
|
938
|
-
I,
|
|
939
|
-
{ debounce: 200 }
|
|
940
|
-
), {
|
|
941
|
-
form: n,
|
|
942
|
-
validation: g,
|
|
943
|
-
getIsFieldRequired: c,
|
|
944
|
-
updateInitialState: a,
|
|
945
|
-
initialState: o
|
|
946
|
-
};
|
|
947
|
-
}
|
|
948
|
-
const Be = (e = {}) => ({
|
|
949
|
-
email: void 0,
|
|
950
|
-
country: void 0,
|
|
951
|
-
type: "INDIVIDUAL",
|
|
952
|
-
companyLegalName: void 0,
|
|
953
|
-
firstName: void 0,
|
|
954
|
-
infix: void 0,
|
|
955
|
-
lastName: void 0,
|
|
956
|
-
addressLine1: void 0,
|
|
957
|
-
addressLine2: void 0,
|
|
958
|
-
postalCode: void 0,
|
|
959
|
-
city: void 0,
|
|
960
|
-
state: void 0,
|
|
961
|
-
companyVatNumber: void 0,
|
|
962
|
-
seatsValues: void 0,
|
|
963
|
-
unitsValues: void 0,
|
|
964
|
-
enabledPricingIds: void 0,
|
|
965
|
-
...e
|
|
966
|
-
});
|
|
967
|
-
function Ln(e) {
|
|
968
|
-
return e in Be();
|
|
969
|
-
}
|
|
970
|
-
function Tn(e, i = void 0) {
|
|
971
|
-
const n = i ?? [], o = tt(e);
|
|
972
|
-
for (const a of o)
|
|
973
|
-
if (["EXACTLY_ONE", "AT_LEAST_ONE"].includes(a.selection_constraint)) {
|
|
974
|
-
const l = a.pricings.map((c) => c.id);
|
|
975
|
-
if (i != null && i.some((c) => l.includes(c)))
|
|
976
|
-
continue;
|
|
977
|
-
n.push(a.pricings[0].id);
|
|
978
|
-
}
|
|
979
|
-
return n;
|
|
980
|
-
}
|
|
981
|
-
function wn(e) {
|
|
982
|
-
return tt(e).some(
|
|
983
|
-
(n) => n.selection_constraint === "EXACTLY_ONE" || n.selection_constraint === "AT_LEAST_ONE"
|
|
984
|
-
);
|
|
985
|
-
}
|
|
986
|
-
function Sn(e) {
|
|
987
|
-
const i = Oi(e.pricing_plan_schedule_infos), n = tt(e);
|
|
988
|
-
return i.some((o) => o.product_type === "ADDON") || n.some((o) => o.object_type === "ADDON");
|
|
989
|
-
}
|
|
990
|
-
const St = (e) => (e ?? []).flatMap(
|
|
991
|
-
(i) => i.configs ?? []
|
|
992
|
-
), Zt = (e) => [
|
|
993
|
-
...e.configs ?? [],
|
|
994
|
-
...St(e.billing_period_configs),
|
|
995
|
-
...(e.pricing_currency_configs ?? []).flatMap((i) => [
|
|
996
|
-
...i.configs ?? [],
|
|
997
|
-
...St(i.billing_period_configs)
|
|
998
|
-
])
|
|
999
|
-
];
|
|
1000
|
-
function rr({
|
|
1001
|
-
pricings: e,
|
|
1002
|
-
pricingItemConfigId: i
|
|
1003
|
-
}) {
|
|
1004
|
-
var l, c;
|
|
1005
|
-
const n = e.flatMap((g) => g.items ?? []).find((g) => {
|
|
1006
|
-
var u;
|
|
1007
|
-
return (u = g.configs) == null ? void 0 : u.some((I) => I.id === i);
|
|
1008
|
-
}), o = (l = n == null ? void 0 : n.configs) == null ? void 0 : l.find((g) => g.id === i), a = (c = n == null ? void 0 : n.product_items) == null ? void 0 : c[0];
|
|
1009
|
-
return {
|
|
1010
|
-
config: o,
|
|
1011
|
-
productItem: a
|
|
1012
|
-
};
|
|
1013
|
-
}
|
|
1014
|
-
const kn = "1";
|
|
1015
|
-
function On(e) {
|
|
1016
|
-
const i = $t(e).flatMap((n) => n.items ?? []).flatMap(Zt);
|
|
1017
|
-
return new Map(
|
|
1018
|
-
i.flatMap(
|
|
1019
|
-
(n) => {
|
|
1020
|
-
var o;
|
|
1021
|
-
return (o = n.default_seats_value) != null && o.number ? [[n.id, n.default_seats_value.number]] : [];
|
|
1022
|
-
}
|
|
1023
|
-
)
|
|
1024
|
-
);
|
|
1025
|
-
}
|
|
1026
|
-
function zn(e) {
|
|
1027
|
-
var o;
|
|
1028
|
-
const i = (o = e == null ? void 0 : e.pricing_plan_schedule) == null ? void 0 : o.seats_values;
|
|
1029
|
-
if (!e || !(i != null && i.length))
|
|
1030
|
-
return;
|
|
1031
|
-
const n = e.pricing_plan_version ? On(e) : /* @__PURE__ */ new Map();
|
|
1032
|
-
return i.map(({ pricing_item_config_id: a, number: l }) => ({
|
|
1033
|
-
pricing_item_config_id: a,
|
|
1034
|
-
number: l || n.get(a) || kn
|
|
1035
|
-
}));
|
|
1036
|
-
}
|
|
1037
|
-
const jn = "1";
|
|
1038
|
-
function Rn(e) {
|
|
1039
|
-
const i = $t(e).flatMap((n) => n.items ?? []).flatMap(Zt);
|
|
1040
|
-
return new Map(
|
|
1041
|
-
i.flatMap(
|
|
1042
|
-
(n) => {
|
|
1043
|
-
var o;
|
|
1044
|
-
return (o = n.default_units) != null && o.number ? [[n.id, n.default_units.number]] : [];
|
|
1045
|
-
}
|
|
1046
|
-
)
|
|
1047
|
-
);
|
|
1048
|
-
}
|
|
1049
|
-
function $n(e) {
|
|
1050
|
-
var o;
|
|
1051
|
-
const i = (o = e == null ? void 0 : e.pricing_plan_schedule) == null ? void 0 : o.units;
|
|
1052
|
-
if (!e || !(i != null && i.length))
|
|
1053
|
-
return;
|
|
1054
|
-
const n = e.pricing_plan_version ? Rn(e) : /* @__PURE__ */ new Map();
|
|
1055
|
-
return i.map(({ pricing_item_config_id: a, number: l }) => ({
|
|
1056
|
-
pricing_item_config_id: a,
|
|
1057
|
-
number: l || n.get(a) || jn
|
|
1058
|
-
}));
|
|
1059
|
-
}
|
|
1060
|
-
const qe = "solvimon_checkout_redirect_state";
|
|
1061
|
-
function Bn({
|
|
1062
|
-
initialCountry: e,
|
|
1063
|
-
initialEmail: i,
|
|
1064
|
-
subscriptionId: n,
|
|
1065
|
-
enabledPricingIds: o
|
|
1066
|
-
}) {
|
|
1067
|
-
const a = Me(), l = (() => {
|
|
1068
|
-
if (e) {
|
|
1069
|
-
if (Ke(e)) return e;
|
|
1070
|
-
a.error("INVALID_COUNTRY_CODE", `invalid country code provided: "${e}"`);
|
|
1071
|
-
}
|
|
1072
|
-
})(), c = (() => {
|
|
1073
|
-
if (i) {
|
|
1074
|
-
if (/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(i)) return i;
|
|
1075
|
-
a.error("INVALID_EMAIL", `invalid email provided: "${i}"`);
|
|
1076
|
-
}
|
|
1077
|
-
})(), g = Y(!1), u = Y(), { getSubscription: I } = _i(), y = Nn(), h = M(() => u.value && p.form.value.country && q.value), {
|
|
1078
|
-
paymentMethodOptions: P,
|
|
1079
|
-
get: m,
|
|
1080
|
-
isPending: x,
|
|
1081
|
-
error: k
|
|
1082
|
-
} = wi(), v = async (s, r) => {
|
|
1083
|
-
try {
|
|
1084
|
-
await m({
|
|
1085
|
-
subscriptionId: u.value.id,
|
|
1086
|
-
country: s,
|
|
1087
|
-
amount: r
|
|
1088
|
-
});
|
|
1089
|
-
} catch {
|
|
1090
|
-
a.error(
|
|
1091
|
-
"PAYMENT_METHOD_OPTIONS_LOAD_FAILED",
|
|
1092
|
-
"Failed to load the payment methods the checkout can offer",
|
|
1093
|
-
{},
|
|
1094
|
-
k.value
|
|
1095
|
-
);
|
|
1096
|
-
}
|
|
1097
|
-
}, N = M(() => k.value !== null), E = () => {
|
|
1098
|
-
const { country: s } = p.form.value;
|
|
1099
|
-
!u.value || !s || !q.value || v(s, q.value);
|
|
1100
|
-
}, V = () => {
|
|
1101
|
-
const s = p.form.value;
|
|
1102
|
-
return y.loadInvoicePreview({
|
|
1103
|
-
subscription: u.value,
|
|
1104
|
-
customer: wt(s),
|
|
1105
|
-
seatsValues: s.seatsValues,
|
|
1106
|
-
unitsValues: s.unitsValues,
|
|
1107
|
-
enabledPricingIds: s.enabledPricingIds ?? o,
|
|
1108
|
-
promotionCode: s.promotionCode
|
|
1109
|
-
});
|
|
1110
|
-
}, F = async (s) => {
|
|
1111
|
-
const r = s.promotionCode ?? p.form.value.promotionCode, A = s.enabledPricingIds ?? p.form.value.enabledPricingIds, f = { ...p.form.value, ...s };
|
|
1112
|
-
return await y.loadInvoicePreview({
|
|
1113
|
-
subscription: u.value,
|
|
1114
|
-
customer: wt(f),
|
|
1115
|
-
seatsValues: f.seatsValues,
|
|
1116
|
-
unitsValues: f.unitsValues,
|
|
1117
|
-
enabledPricingIds: A,
|
|
1118
|
-
promotionCode: r
|
|
1119
|
-
}), {
|
|
1120
|
-
trialInvoicePreview: y.trialInvoicePreview.value,
|
|
1121
|
-
invoicePreview: y.invoicePreview.value
|
|
1122
|
-
};
|
|
1123
|
-
}, p = xn({
|
|
1124
|
-
initialState: {
|
|
1125
|
-
country: l,
|
|
1126
|
-
email: c
|
|
1127
|
-
},
|
|
1128
|
-
onRequiredFieldChange: () => {
|
|
1129
|
-
u.value && V().catch(() => {
|
|
1130
|
-
});
|
|
1131
|
-
}
|
|
1132
|
-
}), B = async () => {
|
|
1133
|
-
var R, K, H, Z;
|
|
1134
|
-
const s = await I({
|
|
1135
|
-
id: n,
|
|
1136
|
-
expanded: !0
|
|
1137
|
-
}), r = Ee({
|
|
1138
|
-
pricingPlanScheduleInfos: s.pricing_plan_schedule_infos,
|
|
1139
|
-
type: "DEFAULT"
|
|
1140
|
-
}), A = (Z = (H = (K = (R = r == null ? void 0 : r.pricing_plan_version) == null ? void 0 : R.billing_period_settings) == null ? void 0 : K.billing_periods) == null ? void 0 : H[0]) == null ? void 0 : Z.period;
|
|
1141
|
-
u.value = {
|
|
1142
|
-
...s,
|
|
1143
|
-
billing_period: A ?? s.billing_period
|
|
1144
|
-
};
|
|
1145
|
-
const f = zn(r), C = $n(r);
|
|
1146
|
-
p.updateInitialState({
|
|
1147
|
-
...p.form.value,
|
|
1148
|
-
enabledPricingIds: Tn(s, o),
|
|
1149
|
-
...f ? { seatsValues: f } : {},
|
|
1150
|
-
...C ? { unitsValues: C } : {}
|
|
1151
|
-
});
|
|
1152
|
-
}, T = M(() => {
|
|
1153
|
-
var te, ie, ae, U, ne, ee, J, re, ue;
|
|
1154
|
-
const s = p.form.value.firstName || p.form.value.infix || p.form.value.lastName ? {
|
|
1155
|
-
...p.form.value.firstName ? { first_name: p.form.value.firstName } : {},
|
|
1156
|
-
...p.form.value.infix ? { infix: p.form.value.infix } : {},
|
|
1157
|
-
...p.form.value.lastName ? { last_name: p.form.value.lastName } : {}
|
|
1158
|
-
} : {}, r = {
|
|
1159
|
-
...p.form.value.addressLine1 && {
|
|
1160
|
-
line1: p.form.value.addressLine1
|
|
1161
|
-
},
|
|
1162
|
-
...p.form.value.addressLine2 && {
|
|
1163
|
-
line2: p.form.value.addressLine2
|
|
1164
|
-
},
|
|
1165
|
-
...p.form.value.city && { city: p.form.value.city },
|
|
1166
|
-
...p.form.value.postalCode && {
|
|
1167
|
-
postal_code: p.form.value.postalCode
|
|
1168
|
-
},
|
|
1169
|
-
...p.form.value.state && { state: p.form.value.state },
|
|
1170
|
-
country: p.form.value.country ?? ""
|
|
1171
|
-
}, A = Ee({
|
|
1172
|
-
pricingPlanScheduleInfos: ((te = u.value) == null ? void 0 : te.pricing_plan_schedule_infos) ?? [],
|
|
1173
|
-
type: "DEFAULT"
|
|
1174
|
-
}), f = (ie = A == null ? void 0 : A.pricing_plan_version) == null ? void 0 : ie.pricing_currency_settings, C = (((ae = f == null ? void 0 : f.pricing_currencies) == null ? void 0 : ae.length) ?? 0) > 1, K = (((ne = (U = A == null ? void 0 : A.pricing_plan_version) == null ? void 0 : U.billing_period_settings) == null ? void 0 : ne.billing_periods) ?? []).length > 1, H = Rt({
|
|
1175
|
-
enabledPricings: (ee = p.form.value.enabledPricingIds) == null ? void 0 : ee.map((de) => ({
|
|
1176
|
-
pricing_id: de
|
|
1177
|
-
})),
|
|
1178
|
-
seatsValues: p.form.value.seatsValues,
|
|
1179
|
-
unitsValues: p.form.value.unitsValues,
|
|
1180
|
-
pricingPlanScheduleInfos: ((J = u.value) == null ? void 0 : J.pricing_plan_schedule_infos) ?? [],
|
|
1181
|
-
pricingCurrency: C ? (re = u.value) == null ? void 0 : re.billing_currency : void 0,
|
|
1182
|
-
billingPeriod: K ? (ue = u.value) == null ? void 0 : ue.billing_period : void 0
|
|
1183
|
-
}), Z = p.form.value.promotionCode, oe = Z && u.value ? (() => {
|
|
1184
|
-
var Ce, xe, ze;
|
|
1185
|
-
const de = H ? [...H] : [], fe = ((Ce = de[0]) == null ? void 0 : Ce.pricing_plan_schedule_id) ?? ((ze = Ee({
|
|
1186
|
-
pricingPlanScheduleInfos: ((xe = u.value) == null ? void 0 : xe.pricing_plan_schedule_infos) ?? [],
|
|
1187
|
-
type: "DEFAULT"
|
|
1188
|
-
})) == null ? void 0 : ze.id);
|
|
1189
|
-
if (!fe)
|
|
1190
|
-
return H;
|
|
1191
|
-
const Ie = de.find(
|
|
1192
|
-
({ pricing_plan_schedule_id: le }) => le === fe
|
|
1193
|
-
);
|
|
1194
|
-
if (Ie)
|
|
1195
|
-
Ie.promotion_codes = [Z];
|
|
1196
|
-
else {
|
|
1197
|
-
const le = H == null ? void 0 : H[0];
|
|
1198
|
-
de.push({
|
|
1199
|
-
pricing_plan_schedule_id: fe,
|
|
1200
|
-
...(le == null ? void 0 : le.enabled_pricings) && {
|
|
1201
|
-
enabled_pricings: le.enabled_pricings
|
|
1202
|
-
},
|
|
1203
|
-
...(le == null ? void 0 : le.seats_values) && {
|
|
1204
|
-
seats_values: le.seats_values
|
|
1205
|
-
},
|
|
1206
|
-
...(le == null ? void 0 : le.units) && {
|
|
1207
|
-
units: le.units
|
|
1208
|
-
},
|
|
1209
|
-
promotion_codes: [Z]
|
|
1210
|
-
});
|
|
1211
|
-
}
|
|
1212
|
-
return de;
|
|
1213
|
-
})() : H;
|
|
1214
|
-
return {
|
|
1215
|
-
type: "INIT_PRICING_PLAN_SUBSCRIPTION",
|
|
1216
|
-
init_pricing_plan_subscription: {
|
|
1217
|
-
template_pricing_plan_subscription_id: n,
|
|
1218
|
-
...oe && {
|
|
1219
|
-
pricing_plan_schedule_customizations: oe
|
|
1220
|
-
},
|
|
1221
|
-
customer_details: {
|
|
1222
|
-
email: p.form.value.email ?? "",
|
|
1223
|
-
type: p.form.value.type,
|
|
1224
|
-
...p.form.value.type === "INDIVIDUAL" ? {
|
|
1225
|
-
individual: {
|
|
1226
|
-
residential_address: r,
|
|
1227
|
-
...s ? { name: s } : {}
|
|
1228
|
-
}
|
|
1229
|
-
} : {
|
|
1230
|
-
organization: {
|
|
1231
|
-
registered_address: r,
|
|
1232
|
-
legal_name: p.form.value.companyLegalName ?? "",
|
|
1233
|
-
...p.form.value.companyVatNumber && it.$validator(p.form.value.companyVatNumber, {}, {}) ? {
|
|
1234
|
-
tax_ids: [
|
|
1235
|
-
{
|
|
1236
|
-
id: p.form.value.companyVatNumber,
|
|
1237
|
-
type: Qt
|
|
1238
|
-
}
|
|
1239
|
-
]
|
|
1240
|
-
} : {}
|
|
1241
|
-
}
|
|
1242
|
-
}
|
|
1243
|
-
}
|
|
1244
|
-
}
|
|
1245
|
-
};
|
|
1246
|
-
}), q = M(() => {
|
|
1247
|
-
var s, r;
|
|
1248
|
-
return ((s = y.trialInvoicePreview.value) == null ? void 0 : s.invoice_amount_including_tax) ?? ((r = y.invoicePreview.value) == null ? void 0 : r.invoice_amount_including_tax);
|
|
1249
|
-
});
|
|
1250
|
-
Se(
|
|
1251
|
-
[() => p.form.value.country, q],
|
|
1252
|
-
([s, r]) => {
|
|
1253
|
-
!u.value || !s || !r || v(s, r);
|
|
1254
|
-
}
|
|
1255
|
-
);
|
|
1256
|
-
function G() {
|
|
1257
|
-
sessionStorage.setItem(qe, JSON.stringify(p.form.value));
|
|
1258
|
-
}
|
|
1259
|
-
return Oe(async () => {
|
|
1260
|
-
const s = Te("redirect_status"), r = !!Te(Ri), A = !!Te("payment_intent_client_secret") || !!Te("setup_intent_client_secret");
|
|
1261
|
-
s === "succeeded" && r && A && (g.value = !0);
|
|
1262
|
-
const C = sessionStorage.getItem(qe);
|
|
1263
|
-
let R = null;
|
|
1264
|
-
if (C)
|
|
1265
|
-
try {
|
|
1266
|
-
R = JSON.parse(C);
|
|
1267
|
-
} catch {
|
|
1268
|
-
}
|
|
1269
|
-
R && p.updateInitialState(R);
|
|
1270
|
-
try {
|
|
1271
|
-
await B();
|
|
1272
|
-
} catch (K) {
|
|
1273
|
-
throw a.error(
|
|
1274
|
-
"SUBSCRIPTION_LOAD_FAILED",
|
|
1275
|
-
"Failed to load the subscription the checkout prices",
|
|
1276
|
-
{},
|
|
1277
|
-
K
|
|
1278
|
-
), K;
|
|
1279
|
-
}
|
|
1280
|
-
try {
|
|
1281
|
-
await V();
|
|
1282
|
-
} catch {
|
|
1283
|
-
}
|
|
1284
|
-
R && (p.updateInitialState(R), sessionStorage.removeItem(qe));
|
|
1285
|
-
}), Se(
|
|
1286
|
-
h,
|
|
1287
|
-
(s) => {
|
|
1288
|
-
s && E();
|
|
1289
|
-
},
|
|
1290
|
-
{ once: !0 }
|
|
1291
|
-
), {
|
|
1292
|
-
/** What the host configured, once anything unusable has been dropped and reported. */
|
|
1293
|
-
validatedEmail: c,
|
|
1294
|
-
validatedCountry: l,
|
|
1295
|
-
invoicePreview: y.invoicePreview,
|
|
1296
|
-
invoicePreviewByBillingPeriod: y.invoicePreviewByBillingPeriod,
|
|
1297
|
-
trialInvoicePreview: y.trialInvoicePreview,
|
|
1298
|
-
trialPeriod: y.trialPeriod,
|
|
1299
|
-
loadInvoicePreview: V,
|
|
1300
|
-
updateInvoicePreviewOnBillingInformationChange: F,
|
|
1301
|
-
lastPreviewScheduleId: y.lastPreviewScheduleId,
|
|
1302
|
-
paymentMethodOptions: P,
|
|
1303
|
-
hasPaymentMethodOptionsError: N,
|
|
1304
|
-
retryPaymentMethodOptions: E,
|
|
1305
|
-
isPaymentMethodsPending: x,
|
|
1306
|
-
isInvoicePreviewPending: y.isPending,
|
|
1307
|
-
subscription: u,
|
|
1308
|
-
checkoutForm: p,
|
|
1309
|
-
authorizationContext: T,
|
|
1310
|
-
isPaid: g,
|
|
1311
|
-
amount: q,
|
|
1312
|
-
saveFormStateForRedirect: G
|
|
1313
|
-
};
|
|
1314
|
-
}
|
|
1315
|
-
function Un({
|
|
1316
|
-
checkoutForm: e,
|
|
1317
|
-
updateInvoicePreviewOnBillingInformationChange: i,
|
|
1318
|
-
formatErrorMessage: n,
|
|
1319
|
-
onInvalidPromotionCode: o,
|
|
1320
|
-
onApplyError: a
|
|
1321
|
-
}) {
|
|
1322
|
-
const l = Me(), c = Y(!1), g = Y(null), u = (P, m) => {
|
|
1323
|
-
g.value = n ? n({ action: P, error: m }) : P === "apply" ? "Promotion code could not be applied. Please try again." : "Promotion code could not be removed. Please try again.";
|
|
1324
|
-
}, I = (P) => Vn(P) && P.field === "promotion_codes", y = async (P) => {
|
|
1325
|
-
const m = P == null ? void 0 : P.trim();
|
|
1326
|
-
if (m) {
|
|
1327
|
-
g.value = null, e.form.value.promotionCode = m, c.value = !0;
|
|
1328
|
-
try {
|
|
1329
|
-
await i({
|
|
1330
|
-
promotionCode: m
|
|
1331
|
-
});
|
|
1332
|
-
} catch (x) {
|
|
1333
|
-
l.capture(x, {
|
|
1334
|
-
code: "PROMOTION_CODE_APPLY_FAILED",
|
|
1335
|
-
message: "Failed to apply promotion code"
|
|
1336
|
-
}), u("apply", x), a == null || a(), I(x) && (o == null || o()), await h({ suppressError: !0, preserveErrorMessage: !0 });
|
|
1337
|
-
} finally {
|
|
1338
|
-
c.value = !1;
|
|
1339
|
-
}
|
|
1340
|
-
}
|
|
1341
|
-
}, h = async ({
|
|
1342
|
-
suppressError: P = !1,
|
|
1343
|
-
preserveErrorMessage: m = !1
|
|
1344
|
-
} = {}) => {
|
|
1345
|
-
m || (g.value = null), delete e.form.value.promotionCode, c.value = !0;
|
|
1346
|
-
try {
|
|
1347
|
-
await i({});
|
|
1348
|
-
} catch (x) {
|
|
1349
|
-
l.capture(x, {
|
|
1350
|
-
code: "PROMOTION_CODE_REMOVE_FAILED",
|
|
1351
|
-
message: "Failed to remove promotion code"
|
|
1352
|
-
}), P || u("remove", x);
|
|
1353
|
-
} finally {
|
|
1354
|
-
c.value = !1;
|
|
1355
|
-
}
|
|
1356
|
-
};
|
|
1357
|
-
return {
|
|
1358
|
-
applyPromotionCode: y,
|
|
1359
|
-
removePromotionCode: h,
|
|
1360
|
-
isPromotionCodePending: c,
|
|
1361
|
-
promotionCodeErrorMessage: g
|
|
1362
|
-
};
|
|
1363
|
-
}
|
|
1364
|
-
function Vn(e) {
|
|
1365
|
-
return typeof e == "object" && e !== null && "field" in e;
|
|
1366
|
-
}
|
|
1367
|
-
function Fn({
|
|
1368
|
-
subscription: e,
|
|
1369
|
-
promotionCode: i,
|
|
1370
|
-
appliedPromotionCode: n,
|
|
1371
|
-
applyPromotionCode: o
|
|
1372
|
-
}) {
|
|
1373
|
-
Se(
|
|
1374
|
-
e,
|
|
1375
|
-
(a) => {
|
|
1376
|
-
a && i && (n.value = i, o(i));
|
|
1377
|
-
},
|
|
1378
|
-
{ once: !0 }
|
|
1379
|
-
);
|
|
1380
|
-
}
|
|
1381
|
-
const Gn = { class: "flex items-center gap-2" }, Yn = /* @__PURE__ */ ce({
|
|
1382
|
-
__name: "TaxIDCheckNotice",
|
|
1383
|
-
props: {
|
|
1384
|
-
taxIdValidationResult: { type: Object }
|
|
1385
|
-
},
|
|
1386
|
-
setup(e) {
|
|
1387
|
-
const i = e, { formatMessage: n } = ve(), o = M(() => i.taxIdValidationResult.valid === "VALID"), a = M(() => o.value ? n({
|
|
1388
|
-
defaultMessage: "VAT number is valid.",
|
|
1389
|
-
id: "tax_check.valid_vat_number",
|
|
1390
|
-
description: "The message shown when the VAT number is valid"
|
|
1391
|
-
}) : n({
|
|
1392
|
-
defaultMessage: "VAT number is invalid.",
|
|
1393
|
-
id: "tax_check.invalid_vat_number",
|
|
1394
|
-
description: "The message shown when the VAT number is invalid"
|
|
1395
|
-
}));
|
|
1396
|
-
return (l, c) => (d(), S(t(Fi), {
|
|
1397
|
-
type: o.value ? "success" : "danger",
|
|
1398
|
-
icon: !1
|
|
1399
|
-
}, {
|
|
1400
|
-
default: b(() => [
|
|
1401
|
-
L("div", Gn, [
|
|
1402
|
-
_(t(se), { variant: "body-xs" }, {
|
|
1403
|
-
default: b(() => [
|
|
1404
|
-
Q($(a.value), 1)
|
|
1405
|
-
]),
|
|
1406
|
-
_: 1
|
|
1407
|
-
})
|
|
1408
|
-
])
|
|
1409
|
-
]),
|
|
1410
|
-
_: 1
|
|
1411
|
-
}, 8, ["type"]));
|
|
1412
|
-
}
|
|
1413
|
-
});
|
|
1414
|
-
function Kn(e) {
|
|
1415
|
-
const { checkTaxID: i } = Gi(), n = Y(void 0), o = M(() => {
|
|
1416
|
-
var h;
|
|
1417
|
-
return ((h = e.value.companyVatNumber) == null ? void 0 : h.trim()) ?? "";
|
|
1418
|
-
}), a = M(() => e.value.companyLegalName ?? ""), l = M(() => e.value.country), c = Y(!1), g = M(() => Ut(l.value ?? "")), u = M(
|
|
1419
|
-
() => !!(o.value && a.value && l.value)
|
|
1420
|
-
), I = M(() => g.value && o.value);
|
|
1421
|
-
async function y() {
|
|
1422
|
-
var h;
|
|
1423
|
-
if (!(!u.value || !g.value || !l.value)) {
|
|
1424
|
-
c.value = !0;
|
|
1425
|
-
try {
|
|
1426
|
-
const P = await i({
|
|
1427
|
-
type: "ORGANIZATION",
|
|
1428
|
-
organization: {
|
|
1429
|
-
legal_name: a.value,
|
|
1430
|
-
tax_ids: [{ id: o.value, type: "GENERIC_TAX_ID" }],
|
|
1431
|
-
registered_address: {
|
|
1432
|
-
country: l.value
|
|
1433
|
-
}
|
|
1434
|
-
}
|
|
1435
|
-
});
|
|
1436
|
-
(h = P == null ? void 0 : P.data) != null && h.length ? n.value = P.data[0] : n.value = void 0;
|
|
1437
|
-
} finally {
|
|
1438
|
-
c.value = !1;
|
|
1439
|
-
}
|
|
1440
|
-
}
|
|
1441
|
-
}
|
|
1442
|
-
return {
|
|
1443
|
-
runTaxIDCheck: y,
|
|
1444
|
-
taxIdValidationData: n,
|
|
1445
|
-
isTaxIDCheckPending: c,
|
|
1446
|
-
isTaxIDCheckEnabled: u,
|
|
1447
|
-
showViesCheckNotice: I,
|
|
1448
|
-
isSelectedCountryEU: g
|
|
1449
|
-
};
|
|
1450
|
-
}
|
|
1451
|
-
const Hn = { class: "grid grid-cols-1 gap-1" }, Qn = { class: "grid grid-cols-1 gap-2" }, Zn = { key: 0 }, Xn = { class: "mt-2 flex flex-col gap-3" }, Wn = { class: "grid grid-cols-3 gap-2" }, qn = { key: 0 }, Jn = { class: "mt-4 grid grid-cols-1 gap-3" }, eo = "checkout-form", to = /* @__PURE__ */ ce({
|
|
1452
|
-
__name: "CheckoutForm",
|
|
1453
|
-
props: /* @__PURE__ */ bt({
|
|
1454
|
-
validation: { type: null },
|
|
1455
|
-
initialState: { type: Object },
|
|
1456
|
-
readOnlyEmail: { type: String },
|
|
1457
|
-
showCustomerInfoOnTop: { type: Boolean },
|
|
1458
|
-
isBillingInformationMandatory: { type: Boolean },
|
|
1459
|
-
getIsFieldRequired: { type: Function },
|
|
1460
|
-
readOnly: { type: Boolean }
|
|
1461
|
-
}, {
|
|
1462
|
-
modelValue: { required: !0 },
|
|
1463
|
-
modelModifiers: {}
|
|
1464
|
-
}),
|
|
1465
|
-
emits: /* @__PURE__ */ bt(["submit"], ["update:modelValue"]),
|
|
1466
|
-
setup(e) {
|
|
1467
|
-
const i = e, n = Y(!1), o = ci(e, "modelValue"), a = M({
|
|
1468
|
-
get: () => o.value.type === "ORGANIZATION",
|
|
1469
|
-
set: (v) => {
|
|
1470
|
-
o.value.type = v ? "ORGANIZATION" : "INDIVIDUAL";
|
|
1471
|
-
}
|
|
1472
|
-
}), l = M(() => o.value.type === "ORGANIZATION"), c = M({
|
|
1473
|
-
get: () => o.value.country,
|
|
1474
|
-
set: (v) => {
|
|
1475
|
-
o.value.country = v && Ke(v) ? v : void 0;
|
|
1476
|
-
}
|
|
1477
|
-
}), g = M(() => o.value.country !== "US"), { isTaxIDCheckEnabled: u, isTaxIDCheckPending: I, taxIdValidationData: y, runTaxIDCheck: h } = Kn(o), { $t: P } = ve(), m = Ci(), x = (v) => i.getIsFieldRequired(v) ? "" : " " + P({
|
|
1478
|
-
defaultMessage: "(optional)",
|
|
1479
|
-
id: "checkout.optional_suffix.label",
|
|
1480
|
-
description: "The suffix for optional fields in the checkout form"
|
|
1481
|
-
}), k = M(
|
|
1482
|
-
() => o.value.country ? Vi(o.value.country) : void 0
|
|
1483
|
-
);
|
|
1484
|
-
return (v, N) => (d(), z("form", {
|
|
1485
|
-
id: eo,
|
|
1486
|
-
onSubmit: N[12] || (N[12] = Ue((E) => v.$emit("submit", o.value), ["prevent"]))
|
|
1487
|
-
}, [
|
|
1488
|
-
L("div", Hn, [
|
|
1489
|
-
_(t(ge), {
|
|
1490
|
-
title: t(m).contactInformationTitle
|
|
1491
|
-
}, {
|
|
1492
|
-
default: b(() => [
|
|
1493
|
-
L("div", Qn, [
|
|
1494
|
-
e.readOnly ? (d(), z(me, { key: 0 }, [
|
|
1495
|
-
_(t(se), {
|
|
1496
|
-
variant: "body",
|
|
1497
|
-
tag: "span",
|
|
1498
|
-
weight: "semibold",
|
|
1499
|
-
"no-spacing": ""
|
|
1500
|
-
}, {
|
|
1501
|
-
default: b(() => [
|
|
1502
|
-
Q($(o.value.email), 1)
|
|
1503
|
-
]),
|
|
1504
|
-
_: 1
|
|
1505
|
-
}),
|
|
1506
|
-
_(t(se), {
|
|
1507
|
-
variant: "body-sm",
|
|
1508
|
-
tag: "span",
|
|
1509
|
-
color: "subtle",
|
|
1510
|
-
"no-spacing": ""
|
|
1511
|
-
}, {
|
|
1512
|
-
default: b(() => [
|
|
1513
|
-
Q($(k.value), 1)
|
|
1514
|
-
]),
|
|
1515
|
-
_: 1
|
|
1516
|
-
})
|
|
1517
|
-
], 64)) : (d(), z(me, { key: 1 }, [
|
|
1518
|
-
_(t(ye), {
|
|
1519
|
-
modelValue: o.value.email,
|
|
1520
|
-
"onUpdate:modelValue": N[0] || (N[0] = (E) => o.value.email = E),
|
|
1521
|
-
required: "",
|
|
1522
|
-
type: "email",
|
|
1523
|
-
name: "email",
|
|
1524
|
-
disabled: !!e.readOnlyEmail,
|
|
1525
|
-
label: t(m).emailLabel,
|
|
1526
|
-
placeholder: t(m).emailPlaceholder + x("email"),
|
|
1527
|
-
error: e.validation.value.email.$errors
|
|
1528
|
-
}, null, 8, ["modelValue", "disabled", "label", "placeholder", "error"]),
|
|
1529
|
-
_(t(xi), {
|
|
1530
|
-
"single-model-value": c.value,
|
|
1531
|
-
"onUpdate:singleModelValue": N[3] || (N[3] = (E) => c.value = E),
|
|
1532
|
-
required: "",
|
|
1533
|
-
name: "country",
|
|
1534
|
-
label: t(m).countryLabel + x("country"),
|
|
1535
|
-
error: e.validation.value.country.$errors
|
|
1536
|
-
}, {
|
|
1537
|
-
"label-suffix": b(() => [
|
|
1538
|
-
!n.value && !e.isBillingInformationMandatory ? (d(), S(t(Pe), {
|
|
1539
|
-
key: 0,
|
|
1540
|
-
size: "xs",
|
|
1541
|
-
intent: "subtle",
|
|
1542
|
-
"icon-prefix": "add",
|
|
1543
|
-
class: "py-0.5",
|
|
1544
|
-
onClick: N[1] || (N[1] = (E) => n.value = !0)
|
|
1545
|
-
}, {
|
|
1546
|
-
default: b(() => [
|
|
1547
|
-
Q($(t(P)({
|
|
1548
|
-
defaultMessage: "More billing details",
|
|
1549
|
-
description: "Label of the button in the checkout that lets you fill out all billing details",
|
|
1550
|
-
id: "checkout.billing_details.add_billing_details_button.label"
|
|
1551
|
-
})), 1)
|
|
1552
|
-
]),
|
|
1553
|
-
_: 1
|
|
1554
|
-
})) : j("", !0),
|
|
1555
|
-
n.value && !e.isBillingInformationMandatory ? (d(), S(t(Pe), {
|
|
1556
|
-
key: 1,
|
|
1557
|
-
size: "sm",
|
|
1558
|
-
intent: "subtle",
|
|
1559
|
-
"icon-prefix": "close",
|
|
1560
|
-
class: "py-0.5",
|
|
1561
|
-
onClick: N[2] || (N[2] = (E) => n.value = !1)
|
|
1562
|
-
}, {
|
|
1563
|
-
default: b(() => [
|
|
1564
|
-
Q($(t(P)({
|
|
1565
|
-
defaultMessage: "Remove billing details",
|
|
1566
|
-
id: "checkout.billing_details.remove_billing_details_button.label",
|
|
1567
|
-
description: "Label of the button in the checkout that lets you remove the billing details"
|
|
1568
|
-
})), 1)
|
|
1569
|
-
]),
|
|
1570
|
-
_: 1
|
|
1571
|
-
})) : j("", !0)
|
|
1572
|
-
]),
|
|
1573
|
-
_: 1
|
|
1574
|
-
}, 8, ["single-model-value", "label", "error"])
|
|
1575
|
-
], 64))
|
|
1576
|
-
]),
|
|
1577
|
-
_(t(Et), {
|
|
1578
|
-
"is-open": n.value || !!e.isBillingInformationMandatory
|
|
1579
|
-
}, {
|
|
1580
|
-
default: b(() => [
|
|
1581
|
-
n.value || e.isBillingInformationMandatory ? (d(), z("div", Zn, [
|
|
1582
|
-
L("div", Xn, [
|
|
1583
|
-
_(t(ye), {
|
|
1584
|
-
modelValue: o.value.addressLine1,
|
|
1585
|
-
"onUpdate:modelValue": N[4] || (N[4] = (E) => o.value.addressLine1 = E),
|
|
1586
|
-
name: "address_line_1",
|
|
1587
|
-
label: t(P)({
|
|
1588
|
-
defaultMessage: "Billing address",
|
|
1589
|
-
id: "checkout.address.title",
|
|
1590
|
-
description: "Address line 1 of the customer address in the checkout form"
|
|
1591
|
-
}),
|
|
1592
|
-
placeholder: t(P)({
|
|
1593
|
-
defaultMessage: "Address line 1...",
|
|
1594
|
-
id: "checkout.address.line1.placeholder",
|
|
1595
|
-
description: "Address line 1 of the customer address in the checkout form"
|
|
1596
|
-
}) + x("addressLine1"),
|
|
1597
|
-
required: "",
|
|
1598
|
-
error: e.validation.value.addressLine1.$errors
|
|
1599
|
-
}, null, 8, ["modelValue", "label", "placeholder", "error"]),
|
|
1600
|
-
_(t(ye), {
|
|
1601
|
-
modelValue: o.value.addressLine2,
|
|
1602
|
-
"onUpdate:modelValue": N[5] || (N[5] = (E) => o.value.addressLine2 = E),
|
|
1603
|
-
name: "address_line_2",
|
|
1604
|
-
placeholder: t(P)({
|
|
1605
|
-
defaultMessage: "Address line 2...",
|
|
1606
|
-
id: "checkout.address.line2.placeholder",
|
|
1607
|
-
description: "Address line 2 of the customer address in the checkout form"
|
|
1608
|
-
}) + x("addressLine2")
|
|
1609
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
1610
|
-
L("div", Wn, [
|
|
1611
|
-
_(t(ye), {
|
|
1612
|
-
modelValue: o.value.postalCode,
|
|
1613
|
-
"onUpdate:modelValue": N[6] || (N[6] = (E) => o.value.postalCode = E),
|
|
1614
|
-
name: "postal_code",
|
|
1615
|
-
placeholder: t(m).postalCodePlaceholder + x("postalCode"),
|
|
1616
|
-
error: e.validation.value.addressLine1.$errors
|
|
1617
|
-
}, null, 8, ["modelValue", "placeholder", "error"]),
|
|
1618
|
-
_(t(ye), {
|
|
1619
|
-
modelValue: o.value.city,
|
|
1620
|
-
"onUpdate:modelValue": N[7] || (N[7] = (E) => o.value.city = E),
|
|
1621
|
-
name: "city",
|
|
1622
|
-
placeholder: t(m).cityPlaceholder + x("city")
|
|
1623
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
1624
|
-
_(t(ye), {
|
|
1625
|
-
modelValue: o.value.state,
|
|
1626
|
-
"onUpdate:modelValue": N[8] || (N[8] = (E) => o.value.state = E),
|
|
1627
|
-
name: "state",
|
|
1628
|
-
placeholder: t(m).statePlaceholder + x("state"),
|
|
1629
|
-
error: e.validation.value.state.$errors
|
|
1630
|
-
}, null, 8, ["modelValue", "placeholder", "error"])
|
|
1631
|
-
])
|
|
1632
|
-
])
|
|
1633
|
-
])) : j("", !0)
|
|
1634
|
-
]),
|
|
1635
|
-
_: 1
|
|
1636
|
-
}, 8, ["is-open"])
|
|
1637
|
-
]),
|
|
1638
|
-
_: 1
|
|
1639
|
-
}, 8, ["title"]),
|
|
1640
|
-
e.readOnly ? j("", !0) : (d(), S(t(ge), { key: 0 }, {
|
|
1641
|
-
default: b(() => [
|
|
1642
|
-
_(Li, {
|
|
1643
|
-
modelValue: a.value,
|
|
1644
|
-
"onUpdate:modelValue": N[9] || (N[9] = (E) => a.value = E),
|
|
1645
|
-
"no-spacing": "",
|
|
1646
|
-
class: "!flex"
|
|
1647
|
-
}, null, 8, ["modelValue"]),
|
|
1648
|
-
_(t(Et), { "is-open": l.value }, {
|
|
1649
|
-
default: b(() => [
|
|
1650
|
-
l.value ? (d(), z("div", qn, [
|
|
1651
|
-
L("div", Jn, [
|
|
1652
|
-
_(t(ye), {
|
|
1653
|
-
modelValue: o.value.companyLegalName,
|
|
1654
|
-
"onUpdate:modelValue": N[10] || (N[10] = (E) => o.value.companyLegalName = E),
|
|
1655
|
-
required: "",
|
|
1656
|
-
name: "legal_name",
|
|
1657
|
-
label: t(m).legalNameLabel,
|
|
1658
|
-
placeholder: t(m).legalNamePlaceholder
|
|
1659
|
-
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
1660
|
-
g.value ? (d(), S(t(ye), {
|
|
1661
|
-
key: 0,
|
|
1662
|
-
modelValue: o.value.companyVatNumber,
|
|
1663
|
-
"onUpdate:modelValue": N[11] || (N[11] = (E) => o.value.companyVatNumber = E),
|
|
1664
|
-
name: "vat_number",
|
|
1665
|
-
"input-class": "focus:outline-none focus:ring-0",
|
|
1666
|
-
label: t(m).vatNumberLabel,
|
|
1667
|
-
placeholder: t(m).vatNumberPlaceholder,
|
|
1668
|
-
error: e.validation.value.companyVatNumber.$errors,
|
|
1669
|
-
"suffix-class": "px-2 border-l-0"
|
|
1670
|
-
}, Fe({ _: 2 }, [
|
|
1671
|
-
t(Ut)(o.value.country ?? "") ? {
|
|
1672
|
-
name: "suffix",
|
|
1673
|
-
fn: b(() => [
|
|
1674
|
-
_(t(Pe), {
|
|
1675
|
-
type: "button",
|
|
1676
|
-
size: "sm",
|
|
1677
|
-
intent: "secondary",
|
|
1678
|
-
disabled: !t(u) || t(I) || e.validation.value.companyVatNumber.$invalid,
|
|
1679
|
-
onClick: t(h)
|
|
1680
|
-
}, {
|
|
1681
|
-
default: b(() => [
|
|
1682
|
-
Q($(t(P)({
|
|
1683
|
-
defaultMessage: "Check",
|
|
1684
|
-
id: "checkout.vat_number.check_button.label",
|
|
1685
|
-
description: "The label for the check button in the checkout form"
|
|
1686
|
-
})), 1)
|
|
1687
|
-
]),
|
|
1688
|
-
_: 1
|
|
1689
|
-
}, 8, ["disabled", "onClick"])
|
|
1690
|
-
]),
|
|
1691
|
-
key: "0"
|
|
1692
|
-
} : void 0
|
|
1693
|
-
]), 1032, ["modelValue", "label", "placeholder", "error"])) : j("", !0),
|
|
1694
|
-
t(y) ? (d(), z("div", {
|
|
1695
|
-
key: 1,
|
|
1696
|
-
class: he({ "opacity-75": t(I) })
|
|
1697
|
-
}, [
|
|
1698
|
-
_(Yn, { "tax-id-validation-result": t(y) }, null, 8, ["tax-id-validation-result"])
|
|
1699
|
-
], 2)) : j("", !0)
|
|
1700
|
-
])
|
|
1701
|
-
])) : j("", !0)
|
|
1702
|
-
]),
|
|
1703
|
-
_: 1
|
|
1704
|
-
}, 8, ["is-open"])
|
|
1705
|
-
]),
|
|
1706
|
-
_: 1
|
|
1707
|
-
}))
|
|
1708
|
-
])
|
|
1709
|
-
], 32));
|
|
1710
|
-
}
|
|
1711
|
-
}), io = {
|
|
1712
|
-
key: 0,
|
|
1713
|
-
class: "flex items-center"
|
|
1714
|
-
}, no = ["innerHTML"], oo = ["innerHTML"], ao = /* @__PURE__ */ ce({
|
|
1715
|
-
__name: "CheckoutTitle",
|
|
1716
|
-
props: {
|
|
1717
|
-
trialPeriod: { type: Object },
|
|
1718
|
-
subscriptionName: { type: String },
|
|
1719
|
-
amount: { type: Object },
|
|
1720
|
-
billingPeriod: { type: Object },
|
|
1721
|
-
countryCode: { type: null },
|
|
1722
|
-
trialStartDate: { type: Date },
|
|
1723
|
-
subscriptionStartDate: { type: Date }
|
|
1724
|
-
},
|
|
1725
|
-
setup(e) {
|
|
1726
|
-
const { $t: i } = ve();
|
|
1727
|
-
return (n, o) => (d(), z("div", null, [
|
|
1728
|
-
L("div", null, [
|
|
1729
|
-
_(t(se), {
|
|
1730
|
-
variant: "heading-1",
|
|
1731
|
-
class: "inline-block"
|
|
1732
|
-
}, {
|
|
1733
|
-
default: b(() => [
|
|
1734
|
-
Q($(e.trialStartDate ? e.subscriptionName : t(i)({
|
|
1735
|
-
defaultMessage: "Pay and subscribe",
|
|
1736
|
-
id: "checkout.page_title",
|
|
1737
|
-
description: "The title of the checkout page"
|
|
1738
|
-
})) + $(" "), 1),
|
|
1739
|
-
e.trialPeriod ? (d(), S(t(Mi), {
|
|
1740
|
-
key: 0,
|
|
1741
|
-
"trial-period": e.trialPeriod,
|
|
1742
|
-
size: "lg",
|
|
1743
|
-
class: "-translate-y-0.5"
|
|
1744
|
-
}, null, 8, ["trial-period"])) : j("", !0)
|
|
1745
|
-
]),
|
|
1746
|
-
_: 1
|
|
1747
|
-
})
|
|
1748
|
-
]),
|
|
1749
|
-
_(t(se), {
|
|
1750
|
-
variant: "body-sm",
|
|
1751
|
-
color: "subtle",
|
|
1752
|
-
"no-spacing": ""
|
|
1753
|
-
}, {
|
|
1754
|
-
default: b(() => [
|
|
1755
|
-
e.countryCode ? (d(), z("span", {
|
|
1756
|
-
key: 1,
|
|
1757
|
-
innerHTML: e.trialStartDate ? t(i)(
|
|
1758
|
-
{
|
|
1759
|
-
defaultMessage: "You will be billed <strong>{price}</strong> per {period_name}, starting {startDate, date, long}.",
|
|
1760
|
-
id: "checkout.trial_period_description",
|
|
1761
|
-
description: "The description of the trial period"
|
|
1762
|
-
},
|
|
1763
|
-
{
|
|
1764
|
-
price: t(Ae)(e.amount),
|
|
1765
|
-
// @ts-expect-error formatjs does not support this type yet
|
|
1766
|
-
startDate: e.subscriptionStartDate,
|
|
1767
|
-
period_name: t(je)(e.billingPeriod, {
|
|
1768
|
-
short: !0,
|
|
1769
|
-
hideValueForExactPeriods: !0
|
|
1770
|
-
}),
|
|
1771
|
-
// @ts-ignore
|
|
1772
|
-
strong: (a) => `<strong>${a}</strong>`
|
|
1773
|
-
}
|
|
1774
|
-
) : t(i)(
|
|
1775
|
-
{
|
|
1776
|
-
defaultMessage: "You will be billed <strong>{price}</strong> per {period_name}, starting today.",
|
|
1777
|
-
id: "checkout.subscription_description",
|
|
1778
|
-
description: "The description of the subscription"
|
|
1779
|
-
},
|
|
1780
|
-
{
|
|
1781
|
-
price: t(Ae)(e.amount),
|
|
1782
|
-
period_name: t(je)(e.billingPeriod, {
|
|
1783
|
-
short: !0,
|
|
1784
|
-
hideValueForExactPeriods: !0
|
|
1785
|
-
}),
|
|
1786
|
-
// @ts-ignore
|
|
1787
|
-
strong: (a) => `<strong>${a}</strong>`
|
|
1788
|
-
}
|
|
1789
|
-
)
|
|
1790
|
-
}, null, 8, oo)) : (d(), z("span", io, [
|
|
1791
|
-
_(t(Qi), { "is-dark-mode": "" }, {
|
|
1792
|
-
tooltip: b(() => [
|
|
1793
|
-
_(t(Zi), null, {
|
|
1794
|
-
default: b(() => [
|
|
1795
|
-
_(t(Xi), null, {
|
|
1796
|
-
default: b(() => [
|
|
1797
|
-
Q($(t(i)({
|
|
1798
|
-
defaultMessage: "Will be determined by billing information",
|
|
1799
|
-
description: "Tooltip content for the invoice preview when taxes are not determined by billing information",
|
|
1800
|
-
id: "invoice_preview.taxes_not_determined_by_billing_information_tooltip"
|
|
1801
|
-
})), 1)
|
|
1802
|
-
]),
|
|
1803
|
-
_: 1
|
|
1804
|
-
})
|
|
1805
|
-
]),
|
|
1806
|
-
_: 1
|
|
1807
|
-
})
|
|
1808
|
-
]),
|
|
1809
|
-
default: b(() => [
|
|
1810
|
-
_(t(Yi), {
|
|
1811
|
-
"width-class": "w-10",
|
|
1812
|
-
"height-class": "h-4",
|
|
1813
|
-
shade: "darker",
|
|
1814
|
-
class: "mr-1.5 inline-block"
|
|
1815
|
-
})
|
|
1816
|
-
]),
|
|
1817
|
-
_: 1
|
|
1818
|
-
}),
|
|
1819
|
-
L("span", {
|
|
1820
|
-
innerHTML: e.trialStartDate ? t(i)(
|
|
1821
|
-
{
|
|
1822
|
-
defaultMessage: "per {period_name} starting, {startDate, date, long}",
|
|
1823
|
-
id: "checkout.trial_period_description_without_price",
|
|
1824
|
-
description: "The description of the trial period, while the price is still being determined"
|
|
1825
|
-
},
|
|
1826
|
-
{
|
|
1827
|
-
// @ts-expect-error formatjs does not support this type yet
|
|
1828
|
-
startDate: e.subscriptionStartDate,
|
|
1829
|
-
period_name: t(je)(e.billingPeriod, {
|
|
1830
|
-
short: !0,
|
|
1831
|
-
hideValueForExactPeriods: !0
|
|
1832
|
-
})
|
|
1833
|
-
}
|
|
1834
|
-
) : t(i)(
|
|
1835
|
-
{
|
|
1836
|
-
defaultMessage: "per {period_name}, starting today",
|
|
1837
|
-
id: "checkout.subscription_description_without_price",
|
|
1838
|
-
description: "The description of the subscription, while the price is still being determined"
|
|
1839
|
-
},
|
|
1840
|
-
{
|
|
1841
|
-
period_name: t(je)(e.billingPeriod, {
|
|
1842
|
-
short: !0,
|
|
1843
|
-
hideValueForExactPeriods: !0
|
|
1844
|
-
})
|
|
1845
|
-
}
|
|
1846
|
-
)
|
|
1847
|
-
}, null, 8, no)
|
|
1848
|
-
]))
|
|
1849
|
-
]),
|
|
1850
|
-
_: 1
|
|
1851
|
-
})
|
|
1852
|
-
]));
|
|
1853
|
-
}
|
|
1854
|
-
}), ro = (e) => {
|
|
1855
|
-
var i;
|
|
1856
|
-
return ((i = e.periods) == null ? void 0 : i.some(
|
|
1857
|
-
(n) => n.groups.some(
|
|
1858
|
-
(o) => {
|
|
1859
|
-
var a;
|
|
1860
|
-
return (a = o.lines) == null ? void 0 : a.some(
|
|
1861
|
-
(l) => l.product_items.some(
|
|
1862
|
-
(c) => c.model_type === "USAGE_BASED"
|
|
1863
|
-
)
|
|
1864
|
-
);
|
|
1865
|
-
}
|
|
1866
|
-
)
|
|
1867
|
-
)) ?? !1;
|
|
1868
|
-
}, lo = { class: "flex min-h-96 w-full items-center justify-center" }, so = { class: "max-w-sm" }, co = /* @__PURE__ */ ce({
|
|
1869
|
-
__name: "CheckoutNotAvailable",
|
|
1870
|
-
setup(e) {
|
|
1871
|
-
const { $t: i } = ve(), n = () => {
|
|
1872
|
-
window.location.reload();
|
|
1873
|
-
};
|
|
1874
|
-
return (o, a) => (d(), z("div", lo, [
|
|
1875
|
-
L("div", so, [
|
|
1876
|
-
_(t(se), { variant: "heading-1" }, {
|
|
1877
|
-
default: b(() => [
|
|
1878
|
-
Q($(t(i)({
|
|
1879
|
-
defaultMessage: "Checkout not available",
|
|
1880
|
-
id: "checkout.not_available.title",
|
|
1881
|
-
description: "The title of the checkout not available page"
|
|
1882
|
-
})), 1)
|
|
1883
|
-
]),
|
|
1884
|
-
_: 1
|
|
1885
|
-
}),
|
|
1886
|
-
_(t(se), {
|
|
1887
|
-
variant: "body-sm",
|
|
1888
|
-
color: "subtle"
|
|
1889
|
-
}, {
|
|
1890
|
-
default: b(() => [
|
|
1891
|
-
Q($(t(i)({
|
|
1892
|
-
defaultMessage: "The checkout is currently not available.",
|
|
1893
|
-
id: "checkout.not_available.description",
|
|
1894
|
-
description: "The description of the checkout not available page"
|
|
1895
|
-
})) + " ", 1),
|
|
1896
|
-
L("a", {
|
|
1897
|
-
href: "#",
|
|
1898
|
-
class: "text-primary-900 hover:underline",
|
|
1899
|
-
onClick: Ue(n, ["prevent"])
|
|
1900
|
-
}, $(t(i)({
|
|
1901
|
-
defaultMessage: "Reload",
|
|
1902
|
-
id: "checkout.not_available.reload_button",
|
|
1903
|
-
description: "The label of the reload button"
|
|
1904
|
-
})), 1),
|
|
1905
|
-
Q(" " + $(t(i)({
|
|
1906
|
-
defaultMessage: "this page to try again, or contact customer support.",
|
|
1907
|
-
id: "checkout.not_available.contact_support_message",
|
|
1908
|
-
description: "The message shown when the user wants to contact customer support"
|
|
1909
|
-
})), 1)
|
|
1910
|
-
]),
|
|
1911
|
-
_: 1
|
|
1912
|
-
})
|
|
1913
|
-
])
|
|
1914
|
-
]));
|
|
1915
|
-
}
|
|
1916
|
-
}), uo = /* @__PURE__ */ ce({
|
|
1917
|
-
__name: "SubscriptionPaymentCompletedCard",
|
|
1918
|
-
emits: ["continue-to-merchant"],
|
|
1919
|
-
setup(e) {
|
|
1920
|
-
const { $t: i } = ve();
|
|
1921
|
-
return (n, o) => (d(), S(Wi, {
|
|
1922
|
-
status: "success",
|
|
1923
|
-
title: t(i)({
|
|
1924
|
-
defaultMessage: "Payment successful",
|
|
1925
|
-
id: "subscription_payment_completed_card.title",
|
|
1926
|
-
description: "The title for when a payment has been successful"
|
|
1927
|
-
})
|
|
1928
|
-
}, {
|
|
1929
|
-
default: b(() => [
|
|
1930
|
-
_(t(se), {
|
|
1931
|
-
variant: "body-xs",
|
|
1932
|
-
color: "subtle",
|
|
1933
|
-
tag: "span"
|
|
1934
|
-
}, {
|
|
1935
|
-
default: b(() => [
|
|
1936
|
-
Q($(t(i)({
|
|
1937
|
-
defaultMessage: "Thank you for subscribing.",
|
|
1938
|
-
id: "subscription_payment_completed_card.thank_you_for_subscribing",
|
|
1939
|
-
description: "The text shown after a successful message before a redirect"
|
|
1940
|
-
})), 1)
|
|
1941
|
-
]),
|
|
1942
|
-
_: 1
|
|
1943
|
-
})
|
|
1944
|
-
]),
|
|
1945
|
-
_: 1
|
|
1946
|
-
}, 8, ["title"]));
|
|
1947
|
-
}
|
|
1948
|
-
}), po = { class: "flex items-start" }, mo = { class: "flex grow flex-col" }, go = { class: "flex items-center gap-1" }, yo = { class: "ml-4 flex items-center self-center" }, vo = /* @__PURE__ */ ce({
|
|
1949
|
-
__name: "PricingGroupContent",
|
|
1950
|
-
props: {
|
|
1951
|
-
name: { type: String },
|
|
1952
|
-
description: { type: String }
|
|
1953
|
-
},
|
|
1954
|
-
setup(e) {
|
|
1955
|
-
return (i, n) => (d(), z("div", po, [
|
|
1956
|
-
L("div", mo, [
|
|
1957
|
-
L("div", go, [
|
|
1958
|
-
_(t(se), {
|
|
1959
|
-
tag: "span",
|
|
1960
|
-
variant: "body-sm",
|
|
1961
|
-
weight: "semibold"
|
|
1962
|
-
}, {
|
|
1963
|
-
default: b(() => [
|
|
1964
|
-
Q($(e.name), 1)
|
|
1965
|
-
]),
|
|
1966
|
-
_: 1
|
|
1967
|
-
}),
|
|
1968
|
-
Je(i.$slots, "badge")
|
|
1969
|
-
]),
|
|
1970
|
-
_(t(se), {
|
|
1971
|
-
tag: "span",
|
|
1972
|
-
variant: "body-xs",
|
|
1973
|
-
color: "subtle"
|
|
1974
|
-
}, {
|
|
1975
|
-
default: b(() => [
|
|
1976
|
-
Q($(e.description), 1)
|
|
1977
|
-
]),
|
|
1978
|
-
_: 1
|
|
1979
|
-
})
|
|
1980
|
-
]),
|
|
1981
|
-
L("div", yo, [
|
|
1982
|
-
Je(i.$slots, "default")
|
|
1983
|
-
])
|
|
1984
|
-
]));
|
|
1985
|
-
}
|
|
1986
|
-
}), fo = { class: "sv-order-summary__body grid grid-cols-1 gap-1" }, _o = { class: "px-3 py-2" }, ho = { class: "sv-order-summary__billing-period flex flex-col gap-3" }, Mo = { class: "px-3 py-2" }, bo = {
|
|
1987
|
-
key: 3,
|
|
1988
|
-
class: "sv-order-summary__items"
|
|
1989
|
-
}, kt = /* @__PURE__ */ ce({
|
|
1990
|
-
__name: "OrderSummary",
|
|
1991
|
-
props: {
|
|
1992
|
-
subscription: { type: Object },
|
|
1993
|
-
invoice: { type: Object },
|
|
1994
|
-
invoicePreviewByBillingPeriod: { type: Object },
|
|
1995
|
-
trialInvoice: { type: Object },
|
|
1996
|
-
enabledPricingIds: { type: Array },
|
|
1997
|
-
trialPeriod: { type: Object },
|
|
1998
|
-
avatar: { type: String },
|
|
1999
|
-
isPaid: { type: Boolean },
|
|
2000
|
-
isUsageBased: { type: Boolean },
|
|
2001
|
-
isPreviewAndPaymentMethodsPending: { type: Boolean },
|
|
2002
|
-
collapsible: { type: String },
|
|
2003
|
-
noTitle: { type: Boolean },
|
|
2004
|
-
countryCode: { type: null },
|
|
2005
|
-
variant: { type: String }
|
|
2006
|
-
},
|
|
2007
|
-
emits: ["billing-period-change"],
|
|
2008
|
-
setup(e, { emit: i }) {
|
|
2009
|
-
const n = e, o = i, { $t: a } = ve(), { map: l, formatTimePeriod: c } = jt(), { isMobileViewport: g } = Bt(), u = M(() => g.value ? "sm" : "xs"), I = (r) => `${r.type}:${r.value}`, y = ["DAY", "WEEK", "MONTH", "YEAR"], h = (r) => y.includes(r), P = (r) => {
|
|
2010
|
-
if (!r)
|
|
2011
|
-
return;
|
|
2012
|
-
const [A, f] = r.split(":"), C = Number(f);
|
|
2013
|
-
if (!(!C || !h(A)))
|
|
2014
|
-
return { type: A, value: C };
|
|
2015
|
-
}, m = M({
|
|
2016
|
-
get: () => {
|
|
2017
|
-
const r = n.subscription.billing_period;
|
|
2018
|
-
return r ? `${r.type}:${r.value}` : void 0;
|
|
2019
|
-
},
|
|
2020
|
-
set: (r) => {
|
|
2021
|
-
if (!r) return;
|
|
2022
|
-
const [A, f] = r.split(":"), C = Number(f);
|
|
2023
|
-
C && h(A) && o("billing-period-change", { type: A, value: C });
|
|
2024
|
-
}
|
|
2025
|
-
}), x = (r) => {
|
|
2026
|
-
var C, R, K, H;
|
|
2027
|
-
const A = (H = (K = (R = (C = n.invoicePreviewByBillingPeriod) == null ? void 0 : C[I(r)]) == null ? void 0 : R.periods) == null ? void 0 : K[0]) == null ? void 0 : H.amount_including_tax;
|
|
2028
|
-
if (!A)
|
|
2029
|
-
return;
|
|
2030
|
-
const f = r.type === "MONTH" && r.value === 3 ? a({
|
|
2031
|
-
defaultMessage: "/quarter",
|
|
2032
|
-
id: "checkout.order_summary_block.billing_period.per_quarter",
|
|
2033
|
-
description: "Period label for quarterly billing"
|
|
2034
|
-
}) : a(
|
|
2035
|
-
{
|
|
2036
|
-
defaultMessage: "/{period}",
|
|
2037
|
-
id: "checkout.order_summary_block.billing_period.per_label",
|
|
2038
|
-
description: "Period label for billing cycles"
|
|
2039
|
-
},
|
|
2040
|
-
{
|
|
2041
|
-
period: c(r, {
|
|
2042
|
-
prefix: !1,
|
|
2043
|
-
hideValueForExactPeriods: !0
|
|
2044
|
-
})
|
|
2045
|
-
}
|
|
2046
|
-
);
|
|
2047
|
-
return a(
|
|
2048
|
-
{
|
|
2049
|
-
defaultMessage: "{amount}{period}",
|
|
2050
|
-
id: "checkout.order_summary_block.billing_period.sub_label",
|
|
2051
|
-
description: "Billing period option sublabel showing price per period"
|
|
2052
|
-
},
|
|
2053
|
-
{
|
|
2054
|
-
amount: Ae(A),
|
|
2055
|
-
period: f
|
|
2056
|
-
}
|
|
2057
|
-
);
|
|
2058
|
-
}, k = (r) => {
|
|
2059
|
-
var A, f, C, R;
|
|
2060
|
-
return (R = (C = (f = (A = n.invoicePreviewByBillingPeriod) == null ? void 0 : A[I(r)]) == null ? void 0 : f.periods) == null ? void 0 : C[0]) == null ? void 0 : R.amount_including_tax;
|
|
2061
|
-
}, v = (r) => Number(r.quantity), N = (r, A) => {
|
|
2062
|
-
if (!A)
|
|
2063
|
-
return;
|
|
2064
|
-
const C = {
|
|
2065
|
-
DAY: 365,
|
|
2066
|
-
WEEK: 52,
|
|
2067
|
-
MONTH: 12,
|
|
2068
|
-
YEAR: 1
|
|
2069
|
-
}[r.type] / Math.max(r.value ?? 1, 1), R = v(A) * C;
|
|
2070
|
-
if (Number.isFinite(R))
|
|
2071
|
-
return {
|
|
2072
|
-
quantity: R.toFixed(2),
|
|
2073
|
-
currency: A.currency
|
|
2074
|
-
};
|
|
2075
|
-
}, E = (r, A) => {
|
|
2076
|
-
if (!r || !A)
|
|
2077
|
-
return;
|
|
2078
|
-
const f = v(r) - v(A);
|
|
2079
|
-
if (!(!Number.isFinite(f) || f <= 0))
|
|
2080
|
-
return {
|
|
2081
|
-
quantity: f.toFixed(2),
|
|
2082
|
-
currency: r.currency
|
|
2083
|
-
};
|
|
2084
|
-
}, V = (r) => {
|
|
2085
|
-
if (!r)
|
|
2086
|
-
return;
|
|
2087
|
-
const A = a(
|
|
2088
|
-
{
|
|
2089
|
-
defaultMessage: "Save {amount}",
|
|
2090
|
-
id: "checkout.order_summary_block.billing_period.save_badge.prefix",
|
|
2091
|
-
description: "First line for the savings badge label"
|
|
2092
|
-
},
|
|
2093
|
-
{ amount: Ae(r) }
|
|
2094
|
-
), f = a({
|
|
2095
|
-
defaultMessage: "/year",
|
|
2096
|
-
id: "checkout.order_summary_block.billing_period.save_badge.suffix",
|
|
2097
|
-
description: "Second line for the savings badge label"
|
|
2098
|
-
});
|
|
2099
|
-
return `${A}${f}`;
|
|
2100
|
-
}, F = M(() => {
|
|
2101
|
-
var te, ie, ae;
|
|
2102
|
-
const r = Ee({
|
|
2103
|
-
pricingPlanScheduleInfos: n.subscription.pricing_plan_schedule_infos ?? [],
|
|
2104
|
-
type: "DEFAULT"
|
|
2105
|
-
}), A = ((ie = (te = r == null ? void 0 : r.pricing_plan_version) == null ? void 0 : te.billing_period_settings) == null ? void 0 : ie.billing_periods) ?? [], f = /* @__PURE__ */ new Map(), C = (U) => {
|
|
2106
|
-
U && f.set(I(U), U);
|
|
2107
|
-
}, R = (U) => {
|
|
2108
|
-
var ne;
|
|
2109
|
-
(ne = U == null ? void 0 : U.items) == null || ne.forEach((ee) => {
|
|
2110
|
-
var J, re;
|
|
2111
|
-
(J = ee.billing_period_configs) == null || J.forEach(
|
|
2112
|
-
(ue) => C(ue.billing_period)
|
|
2113
|
-
), (re = ee.pricing_currency_configs) == null || re.forEach((ue) => {
|
|
2114
|
-
var de;
|
|
2115
|
-
(de = ue.billing_period_configs) == null || de.forEach(
|
|
2116
|
-
(fe) => C(fe.billing_period)
|
|
2117
|
-
);
|
|
2118
|
-
});
|
|
2119
|
-
});
|
|
2120
|
-
};
|
|
2121
|
-
if ((((ae = r == null ? void 0 : r.pricing_plan_version) == null ? void 0 : ae.pricing_categories) ?? []).forEach((U) => {
|
|
2122
|
-
var ne, ee;
|
|
2123
|
-
(ne = U.pricings) == null || ne.forEach((J) => R(J)), (ee = U.pricing_groups) == null || ee.forEach(
|
|
2124
|
-
(J) => {
|
|
2125
|
-
var re;
|
|
2126
|
-
return (re = J.pricings) == null ? void 0 : re.forEach((ue) => R(ue));
|
|
2127
|
-
}
|
|
2128
|
-
);
|
|
2129
|
-
}), !f.size)
|
|
2130
|
-
return [];
|
|
2131
|
-
const H = A.map((U) => f.get(I(U.period))).filter((U) => !!U), Z = new Set(H.map(I)), oe = [...f.values()].filter(
|
|
2132
|
-
(U) => !Z.has(I(U))
|
|
2133
|
-
);
|
|
2134
|
-
return [...H, ...oe];
|
|
2135
|
-
}), p = M(() => {
|
|
2136
|
-
const r = F.value[F.value.length - 1], A = r ? N(r, k(r)) : void 0;
|
|
2137
|
-
return F.value.map((C) => {
|
|
2138
|
-
const R = C.type === "MONTH" && C.value === 3 ? a({
|
|
2139
|
-
defaultMessage: "Billed quarterly",
|
|
2140
|
-
id: "checkout.order_summary_block.billing_period.quarterly",
|
|
2141
|
-
description: "Billing period option label for quarterly billing"
|
|
2142
|
-
}) : a(
|
|
2143
|
-
{
|
|
2144
|
-
defaultMessage: "Billed {period}",
|
|
2145
|
-
id: "checkout.order_summary_block.billing_period.label",
|
|
2146
|
-
description: "Billing period option label for the selected period"
|
|
2147
|
-
},
|
|
2148
|
-
{ period: l.value[C.type].full }
|
|
2149
|
-
), K = k(C), H = N(C, K), Z = r && C.type === r.type && C.value === r.value ? void 0 : E(H, A), oe = V(Z);
|
|
2150
|
-
return {
|
|
2151
|
-
label: R,
|
|
2152
|
-
subLabel: x(C),
|
|
2153
|
-
labelSuffixComponent: oe ? {
|
|
2154
|
-
component: Ct,
|
|
2155
|
-
props: {
|
|
2156
|
-
color: "primary",
|
|
2157
|
-
content: oe,
|
|
2158
|
-
size: u.value,
|
|
2159
|
-
class: "whitespace-nowrap text-left leading-tight"
|
|
2160
|
-
}
|
|
2161
|
-
} : void 0,
|
|
2162
|
-
hidden: m.value === `${C.type}:${C.value}`,
|
|
2163
|
-
value: `${C.type}:${C.value}`
|
|
2164
|
-
};
|
|
2165
|
-
});
|
|
2166
|
-
}), B = M(() => {
|
|
2167
|
-
const r = p.value, A = r[0], f = r[r.length - 1];
|
|
2168
|
-
return {
|
|
2169
|
-
smallestPeriod: A == null ? void 0 : A.value,
|
|
2170
|
-
biggestPeriod: f == null ? void 0 : f.value
|
|
2171
|
-
};
|
|
2172
|
-
}), T = M(
|
|
2173
|
-
() => p.value.find((r) => r.value === B.value.biggestPeriod)
|
|
2174
|
-
), q = M(
|
|
2175
|
-
() => p.value.find((r) => r.value === m.value)
|
|
2176
|
-
), G = M(() => {
|
|
2177
|
-
var te, ie, ae, U, ne, ee, J, re;
|
|
2178
|
-
const r = p.value, A = r[r.length - 1], f = m.value;
|
|
2179
|
-
if (!A || !f || f === A.value)
|
|
2180
|
-
return "";
|
|
2181
|
-
const C = P(A.value);
|
|
2182
|
-
if (!C)
|
|
2183
|
-
return "";
|
|
2184
|
-
const R = (U = (ae = (ie = (te = n.invoicePreviewByBillingPeriod) == null ? void 0 : te[A.value]) == null ? void 0 : ie.periods) == null ? void 0 : ae[0]) == null ? void 0 : U.amount_including_tax, K = P(f), H = (re = (J = (ee = (ne = n.invoicePreviewByBillingPeriod) == null ? void 0 : ne[f]) == null ? void 0 : ee.periods) == null ? void 0 : J[0]) == null ? void 0 : re.amount_including_tax;
|
|
2185
|
-
if (!K || !H)
|
|
2186
|
-
return "";
|
|
2187
|
-
const Z = N(K, H), oe = N(C, R);
|
|
2188
|
-
return V(E(Z, oe)) ?? "";
|
|
2189
|
-
}), s = (r) => {
|
|
2190
|
-
const { smallestPeriod: A, biggestPeriod: f } = B.value;
|
|
2191
|
-
m.value = r ? f : A;
|
|
2192
|
-
};
|
|
2193
|
-
return (r, A) => (d(), S(t(ge), {
|
|
2194
|
-
class: "sv-order-summary",
|
|
2195
|
-
"no-border": "",
|
|
2196
|
-
"no-spacing": "",
|
|
2197
|
-
"content-background": "none",
|
|
2198
|
-
title: e.noTitle ? void 0 : t(a)({
|
|
2199
|
-
defaultMessage: "Order summary",
|
|
2200
|
-
id: "checkout.order_summary_block.title",
|
|
2201
|
-
description: "The title of the order summary block that lists the subscription cost in the checkout"
|
|
2202
|
-
})
|
|
2203
|
-
}, {
|
|
2204
|
-
default: b(() => [
|
|
2205
|
-
L("div", fo, [
|
|
2206
|
-
_(t(ge), {
|
|
2207
|
-
"no-spacing": "",
|
|
2208
|
-
class: "sv-order-summary__subscription"
|
|
2209
|
-
}, {
|
|
2210
|
-
default: b(() => [
|
|
2211
|
-
e.subscription ? (d(), S(en, {
|
|
2212
|
-
key: 0,
|
|
2213
|
-
avatar: e.avatar,
|
|
2214
|
-
invoice: e.invoice,
|
|
2215
|
-
subscription: e.subscription,
|
|
2216
|
-
"enabled-pricing-ids": e.enabledPricingIds,
|
|
2217
|
-
loading: e.isPreviewAndPaymentMethodsPending,
|
|
2218
|
-
"trial-period": e.trialPeriod
|
|
2219
|
-
}, null, 8, ["avatar", "invoice", "subscription", "enabled-pricing-ids", "loading", "trial-period"])) : j("", !0)
|
|
2220
|
-
]),
|
|
2221
|
-
_: 1
|
|
2222
|
-
}),
|
|
2223
|
-
p.value.length === 2 ? (d(), S(t(ge), {
|
|
2224
|
-
key: 0,
|
|
2225
|
-
"no-spacing": "",
|
|
2226
|
-
"content-classes": m.value === B.value.biggestPeriod ? "border-primary-500" : void 0
|
|
2227
|
-
}, {
|
|
2228
|
-
default: b(() => {
|
|
2229
|
-
var f;
|
|
2230
|
-
return [
|
|
2231
|
-
L("div", _o, [
|
|
2232
|
-
L("div", ho, [
|
|
2233
|
-
T.value ? (d(), S(vo, {
|
|
2234
|
-
key: 0,
|
|
2235
|
-
name: T.value.label,
|
|
2236
|
-
description: ((f = q.value) == null ? void 0 : f.subLabel) ?? ""
|
|
2237
|
-
}, Fe({
|
|
2238
|
-
default: b(() => [
|
|
2239
|
-
_(t(Ni), {
|
|
2240
|
-
"model-value": m.value === B.value.biggestPeriod,
|
|
2241
|
-
"onUpdate:modelValue": s
|
|
2242
|
-
}, null, 8, ["model-value"])
|
|
2243
|
-
]),
|
|
2244
|
-
_: 2
|
|
2245
|
-
}, [
|
|
2246
|
-
G.value ? {
|
|
2247
|
-
name: "badge",
|
|
2248
|
-
fn: b(() => [
|
|
2249
|
-
_(t(Ct), {
|
|
2250
|
-
intent: "brand",
|
|
2251
|
-
content: G.value,
|
|
2252
|
-
size: u.value,
|
|
2253
|
-
class: "whitespace-nowrap text-left leading-tight"
|
|
2254
|
-
}, null, 8, ["content", "size"])
|
|
2255
|
-
]),
|
|
2256
|
-
key: "0"
|
|
2257
|
-
} : void 0
|
|
2258
|
-
]), 1032, ["name", "description"])) : j("", !0)
|
|
2259
|
-
])
|
|
2260
|
-
])
|
|
2261
|
-
];
|
|
2262
|
-
}),
|
|
2263
|
-
_: 1
|
|
2264
|
-
}, 8, ["content-classes"])) : p.value.length > 2 ? (d(), S(t(qi), {
|
|
2265
|
-
key: 1,
|
|
2266
|
-
"single-model-value": m.value,
|
|
2267
|
-
"onUpdate:singleModelValue": A[0] || (A[0] = (f) => m.value = f),
|
|
2268
|
-
class: "sv-order-summary__billing-period",
|
|
2269
|
-
options: p.value,
|
|
2270
|
-
size: "xl",
|
|
2271
|
-
"has-large-dropdown": "",
|
|
2272
|
-
"show-sub-label-in-input": "",
|
|
2273
|
-
"show-suffix-in-closed-input": ""
|
|
2274
|
-
}, null, 8, ["single-model-value", "options"])) : j("", !0),
|
|
2275
|
-
e.isUsageBased ? (d(), S(t(ge), {
|
|
2276
|
-
key: 2,
|
|
2277
|
-
"no-spacing": "",
|
|
2278
|
-
class: "sv-order-summary__usage"
|
|
2279
|
-
}, {
|
|
2280
|
-
default: b(() => [
|
|
2281
|
-
L("div", Mo, [
|
|
2282
|
-
_(t(se), {
|
|
2283
|
-
"no-spacing": "",
|
|
2284
|
-
variant: "body-sm",
|
|
2285
|
-
color: "subtle"
|
|
2286
|
-
}, {
|
|
2287
|
-
default: b(() => [
|
|
2288
|
-
Q($(t(a)({
|
|
2289
|
-
defaultMessage: "+ Usage",
|
|
2290
|
-
id: "checkout.invoice_preview.usage_based_message",
|
|
2291
|
-
description: "The message shown for the usage based invoice preview"
|
|
2292
|
-
})), 1)
|
|
2293
|
-
]),
|
|
2294
|
-
_: 1
|
|
2295
|
-
})
|
|
2296
|
-
])
|
|
2297
|
-
]),
|
|
2298
|
-
_: 1
|
|
2299
|
-
})) : j("", !0),
|
|
2300
|
-
e.invoice && e.variant !== "products-inline" ? (d(), z("div", bo, [
|
|
2301
|
-
_(t(Ki), {
|
|
2302
|
-
invoice: e.invoice,
|
|
2303
|
-
"wrapper-component": t(ge)
|
|
2304
|
-
}, null, 8, ["invoice", "wrapper-component"])
|
|
2305
|
-
])) : j("", !0),
|
|
2306
|
-
_(t(ge), { class: "sv-order-summary__totals" }, {
|
|
2307
|
-
default: b(() => [
|
|
2308
|
-
e.invoice ? (d(), S(t(Hi), {
|
|
2309
|
-
key: 0,
|
|
2310
|
-
class: "sv-order-summary__invoice-preview",
|
|
2311
|
-
variant: e.variant === "products-inline" ? "default" : "without-products",
|
|
2312
|
-
invoice: e.invoice,
|
|
2313
|
-
"trial-invoice": e.trialInvoice,
|
|
2314
|
-
"is-paid": e.isPaid,
|
|
2315
|
-
collapsible: e.collapsible,
|
|
2316
|
-
"is-preview-without-taxes": !e.countryCode,
|
|
2317
|
-
"is-customer-facing": ""
|
|
2318
|
-
}, null, 8, ["variant", "invoice", "trial-invoice", "is-paid", "collapsible", "is-preview-without-taxes"])) : (d(), S(t(se), {
|
|
2319
|
-
key: 1,
|
|
2320
|
-
variant: "body-sm",
|
|
2321
|
-
color: "subtle",
|
|
2322
|
-
class: "sv-order-summary__empty"
|
|
2323
|
-
}, {
|
|
2324
|
-
default: b(() => [
|
|
2325
|
-
Q($(t(a)({
|
|
2326
|
-
defaultMessage: "Please select a country first",
|
|
2327
|
-
description: "The message shown for the invoice preview when no country is set",
|
|
2328
|
-
id: "checkout.invoice_preview.no_country_selected_message"
|
|
2329
|
-
})), 1)
|
|
2330
|
-
]),
|
|
2331
|
-
_: 1
|
|
2332
|
-
}))
|
|
2333
|
-
]),
|
|
2334
|
-
_: 1
|
|
2335
|
-
})
|
|
2336
|
-
])
|
|
2337
|
-
]),
|
|
2338
|
-
_: 1
|
|
2339
|
-
}, 8, ["title"]));
|
|
2340
|
-
}
|
|
2341
|
-
}), Io = { key: 1 }, Ao = { key: 2 }, Po = { key: 3 }, Do = { key: 4 }, No = ["href"], Eo = /* @__PURE__ */ ce({
|
|
2342
|
-
__name: "MarkdownInline",
|
|
2343
|
-
props: {
|
|
2344
|
-
nodes: { type: Array }
|
|
2345
|
-
},
|
|
2346
|
-
setup(e) {
|
|
2347
|
-
return (i, n) => {
|
|
2348
|
-
const o = ui("MarkdownInline", !0);
|
|
2349
|
-
return d(!0), z(me, null, zt(e.nodes, (a, l) => (d(), z(me, { key: l }, [
|
|
2350
|
-
a.type === "text" ? (d(), z(me, { key: 0 }, [
|
|
2351
|
-
Q($(a.value), 1)
|
|
2352
|
-
], 64)) : a.type === "break" ? (d(), z("br", Io)) : a.type === "bold" ? (d(), z("strong", Ao, [
|
|
2353
|
-
_(o, {
|
|
2354
|
-
nodes: a.children
|
|
2355
|
-
}, null, 8, ["nodes"])
|
|
2356
|
-
])) : a.type === "italic" ? (d(), z("em", Po, [
|
|
2357
|
-
_(o, {
|
|
2358
|
-
nodes: a.children
|
|
2359
|
-
}, null, 8, ["nodes"])
|
|
2360
|
-
])) : a.type === "underline" ? (d(), z("u", Do, [
|
|
2361
|
-
_(o, {
|
|
2362
|
-
nodes: a.children
|
|
2363
|
-
}, null, 8, ["nodes"])
|
|
2364
|
-
])) : a.type === "link" ? (d(), z("a", {
|
|
2365
|
-
key: 5,
|
|
2366
|
-
href: a.href,
|
|
2367
|
-
target: "_blank",
|
|
2368
|
-
rel: "noopener noreferrer",
|
|
2369
|
-
class: "underline"
|
|
2370
|
-
}, [
|
|
2371
|
-
_(o, {
|
|
2372
|
-
nodes: a.children
|
|
2373
|
-
}, null, 8, ["nodes"])
|
|
2374
|
-
], 8, No)) : j("", !0)
|
|
2375
|
-
], 64))), 128);
|
|
2376
|
-
};
|
|
2377
|
-
}
|
|
2378
|
-
}), Co = /^<u>([\s\S]*?)<\/u>/i, xo = /^\*\*([\s\S]+?)\*\*/, Lo = /^\*([\s\S]+?)\*/, To = /^_([\s\S]+?)_/, wo = /^\[([^\]]*)\]\(\s*([^)\s]*)\s*\)/, So = /^<([a-z][a-z0-9+.-]*:[^>\s]+)>/i, ko = /\n[ \t]*\n/;
|
|
2379
|
-
function we(e) {
|
|
2380
|
-
const i = [];
|
|
2381
|
-
let n = "";
|
|
2382
|
-
const o = () => {
|
|
2383
|
-
n && (i.push({ type: "text", value: n }), n = "");
|
|
2384
|
-
};
|
|
2385
|
-
let a = 0;
|
|
2386
|
-
for (; a < e.length; ) {
|
|
2387
|
-
const l = e.slice(a), c = xo.exec(l);
|
|
2388
|
-
if (c) {
|
|
2389
|
-
o(), i.push({ type: "bold", children: we(c[1]) }), a += c[0].length;
|
|
2390
|
-
continue;
|
|
2391
|
-
}
|
|
2392
|
-
const g = Lo.exec(l) ?? To.exec(l);
|
|
2393
|
-
if (g) {
|
|
2394
|
-
o(), i.push({ type: "italic", children: we(g[1]) }), a += g[0].length;
|
|
2395
|
-
continue;
|
|
2396
|
-
}
|
|
2397
|
-
const u = Co.exec(l);
|
|
2398
|
-
if (u) {
|
|
2399
|
-
o(), i.push({ type: "underline", children: we(u[1]) }), a += u[0].length;
|
|
2400
|
-
continue;
|
|
2401
|
-
}
|
|
2402
|
-
const I = wo.exec(l);
|
|
2403
|
-
if (I) {
|
|
2404
|
-
o(), i.push(Ot(I[2], we(I[1]))), a += I[0].length;
|
|
2405
|
-
continue;
|
|
2406
|
-
}
|
|
2407
|
-
const y = So.exec(l);
|
|
2408
|
-
if (y) {
|
|
2409
|
-
o(), i.push(Ot(y[1], [{ type: "text", value: y[1] }])), a += y[0].length;
|
|
2410
|
-
continue;
|
|
2411
|
-
}
|
|
2412
|
-
if (e[a] === `
|
|
2413
|
-
`) {
|
|
2414
|
-
o(), i.push({ type: "break" }), a += 1;
|
|
2415
|
-
continue;
|
|
2416
|
-
}
|
|
2417
|
-
n += e[a], a += 1;
|
|
2418
|
-
}
|
|
2419
|
-
return o(), i;
|
|
2420
|
-
}
|
|
2421
|
-
function Ot(e, i) {
|
|
2422
|
-
const n = zi(e);
|
|
2423
|
-
return n ? { type: "link", href: n, children: i } : { type: "text", value: Xt(i) };
|
|
2424
|
-
}
|
|
2425
|
-
function Xt(e) {
|
|
2426
|
-
return e.map((i) => i.type === "text" ? i.value : i.type === "break" ? " " : Xt(i.children)).join("");
|
|
2427
|
-
}
|
|
2428
|
-
function Oo(e) {
|
|
2429
|
-
return e != null && e.trim() ? e.split(ko).map((i) => i.trim()).filter(Boolean).map((i) => ({ type: "paragraph", children: we(i) })) : [];
|
|
2430
|
-
}
|
|
2431
|
-
const zo = { key: 0 }, jo = /* @__PURE__ */ ce({
|
|
2432
|
-
__name: "MarkdownText",
|
|
2433
|
-
props: {
|
|
2434
|
-
source: { type: [String, null] }
|
|
2435
|
-
},
|
|
2436
|
-
setup(e) {
|
|
2437
|
-
const i = e, n = M(() => Oo(i.source));
|
|
2438
|
-
return (o, a) => n.value.length ? (d(), z("div", zo, [
|
|
2439
|
-
(d(!0), z(me, null, zt(n.value, (l, c) => (d(), z("p", {
|
|
2440
|
-
key: c,
|
|
2441
|
-
class: he({ "mt-2": c > 0 })
|
|
2442
|
-
}, [
|
|
2443
|
-
_(Eo, {
|
|
2444
|
-
nodes: l.children
|
|
2445
|
-
}, null, 8, ["nodes"])
|
|
2446
|
-
], 2))), 128))
|
|
2447
|
-
])) : j("", !0);
|
|
2448
|
-
}
|
|
2449
|
-
});
|
|
2450
|
-
async function Wt(e, i) {
|
|
2451
|
-
const { AdyenCheckout: n } = await Ge();
|
|
2452
|
-
return n(
|
|
2453
|
-
$i({
|
|
2454
|
-
locale: e.locale,
|
|
2455
|
-
amount: e.amount,
|
|
2456
|
-
countryCode: e.countryCode,
|
|
2457
|
-
paymentMethodOptionResponse: e.paymentMethodOptionsResponse,
|
|
2458
|
-
logger: i
|
|
2459
|
-
})
|
|
2460
|
-
);
|
|
2461
|
-
}
|
|
2462
|
-
function qt({
|
|
2463
|
-
props: e,
|
|
2464
|
-
create: i,
|
|
2465
|
-
onMissingButton: n,
|
|
2466
|
-
onMountFailed: o,
|
|
2467
|
-
afterMount: a
|
|
2468
|
-
}) {
|
|
2469
|
-
const l = Y(), c = Me(), g = async () => {
|
|
2470
|
-
const u = await Wt(e, c), I = await i(u);
|
|
2471
|
-
if (!l.value) {
|
|
2472
|
-
n();
|
|
2473
|
-
return;
|
|
2474
|
-
}
|
|
2475
|
-
try {
|
|
2476
|
-
await I.isAvailable(), I.mount(l.value), a == null || a();
|
|
2477
|
-
} catch (y) {
|
|
2478
|
-
o(y);
|
|
2479
|
-
}
|
|
2480
|
-
};
|
|
2481
|
-
return Oe(() => {
|
|
2482
|
-
g();
|
|
2483
|
-
}), { buttonRef: l };
|
|
2484
|
-
}
|
|
2485
|
-
const Ro = {
|
|
2486
|
-
key: 0,
|
|
2487
|
-
id: "svg-logo",
|
|
2488
|
-
viewBox: "0 0 35 15",
|
|
2489
|
-
class: "h-[44px]"
|
|
2490
|
-
}, $o = {
|
|
2491
|
-
key: 1,
|
|
2492
|
-
src: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAxcHgiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAxMDEgMzIiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaW5ZTWluIG1lZXQiIHhtbG5zPSJodHRwOiYjeDJGOyYjeDJGO3d3dy53My5vcmcmI3gyRjsyMDAwJiN4MkY7c3ZnIj48cGF0aCBmaWxsPSIjMDAzMDg3IiBkPSJNIDEyLjIzNyAyLjggTCA0LjQzNyAyLjggQyAzLjkzNyAyLjggMy40MzcgMy4yIDMuMzM3IDMuNyBMIDAuMjM3IDIzLjcgQyAwLjEzNyAyNC4xIDAuNDM3IDI0LjQgMC44MzcgMjQuNCBMIDQuNTM3IDI0LjQgQyA1LjAzNyAyNC40IDUuNTM3IDI0IDUuNjM3IDIzLjUgTCA2LjQzNyAxOC4xIEMgNi41MzcgMTcuNiA2LjkzNyAxNy4yIDcuNTM3IDE3LjIgTCAxMC4wMzcgMTcuMiBDIDE1LjEzNyAxNy4yIDE4LjEzNyAxNC43IDE4LjkzNyA5LjggQyAxOS4yMzcgNy43IDE4LjkzNyA2IDE3LjkzNyA0LjggQyAxNi44MzcgMy41IDE0LjgzNyAyLjggMTIuMjM3IDIuOCBaIE0gMTMuMTM3IDEwLjEgQyAxMi43MzcgMTIuOSAxMC41MzcgMTIuOSA4LjUzNyAxMi45IEwgNy4zMzcgMTIuOSBMIDguMTM3IDcuNyBDIDguMTM3IDcuNCA4LjQzNyA3LjIgOC43MzcgNy4yIEwgOS4yMzcgNy4yIEMgMTAuNjM3IDcuMiAxMS45MzcgNy4yIDEyLjYzNyA4IEMgMTMuMTM3IDguNCAxMy4zMzcgOS4xIDEzLjEzNyAxMC4xIFoiPjwvcGF0aD48cGF0aCBmaWxsPSIjMDAzMDg3IiBkPSJNIDM1LjQzNyAxMCBMIDMxLjczNyAxMCBDIDMxLjQzNyAxMCAzMS4xMzcgMTAuMiAzMS4xMzcgMTAuNSBMIDMwLjkzNyAxMS41IEwgMzAuNjM3IDExLjEgQyAyOS44MzcgOS45IDI4LjAzNyA5LjUgMjYuMjM3IDkuNSBDIDIyLjEzNyA5LjUgMTguNjM3IDEyLjYgMTcuOTM3IDE3IEMgMTcuNTM3IDE5LjIgMTguMDM3IDIxLjMgMTkuMzM3IDIyLjcgQyAyMC40MzcgMjQgMjIuMTM3IDI0LjYgMjQuMDM3IDI0LjYgQyAyNy4zMzcgMjQuNiAyOS4yMzcgMjIuNSAyOS4yMzcgMjIuNSBMIDI5LjAzNyAyMy41IEMgMjguOTM3IDIzLjkgMjkuMjM3IDI0LjMgMjkuNjM3IDI0LjMgTCAzMy4wMzcgMjQuMyBDIDMzLjUzNyAyNC4zIDM0LjAzNyAyMy45IDM0LjEzNyAyMy40IEwgMzYuMTM3IDEwLjYgQyAzNi4yMzcgMTAuNCAzNS44MzcgMTAgMzUuNDM3IDEwIFogTSAzMC4zMzcgMTcuMiBDIDI5LjkzNyAxOS4zIDI4LjMzNyAyMC44IDI2LjEzNyAyMC44IEMgMjUuMDM3IDIwLjggMjQuMjM3IDIwLjUgMjMuNjM3IDE5LjggQyAyMy4wMzcgMTkuMSAyMi44MzcgMTguMiAyMy4wMzcgMTcuMiBDIDIzLjMzNyAxNS4xIDI1LjEzNyAxMy42IDI3LjIzNyAxMy42IEMgMjguMzM3IDEzLjYgMjkuMTM3IDE0IDI5LjczNyAxNC42IEMgMzAuMjM3IDE1LjMgMzAuNDM3IDE2LjIgMzAuMzM3IDE3LjIgWiI+PC9wYXRoPjxwYXRoIGZpbGw9IiMwMDMwODciIGQ9Ik0gNTUuMzM3IDEwIEwgNTEuNjM3IDEwIEMgNTEuMjM3IDEwIDUwLjkzNyAxMC4yIDUwLjczNyAxMC41IEwgNDUuNTM3IDE4LjEgTCA0My4zMzcgMTAuOCBDIDQzLjIzNyAxMC4zIDQyLjczNyAxMCA0Mi4zMzcgMTAgTCAzOC42MzcgMTAgQyAzOC4yMzcgMTAgMzcuODM3IDEwLjQgMzguMDM3IDEwLjkgTCA0Mi4xMzcgMjMgTCAzOC4yMzcgMjguNCBDIDM3LjkzNyAyOC44IDM4LjIzNyAyOS40IDM4LjczNyAyOS40IEwgNDIuNDM3IDI5LjQgQyA0Mi44MzcgMjkuNCA0My4xMzcgMjkuMiA0My4zMzcgMjguOSBMIDU1LjgzNyAxMC45IEMgNTYuMTM3IDEwLjYgNTUuODM3IDEwIDU1LjMzNyAxMCBaIj48L3BhdGg+PHBhdGggZmlsbD0iIzAwOWNkZSIgZD0iTSA2Ny43MzcgMi44IEwgNTkuOTM3IDIuOCBDIDU5LjQzNyAyLjggNTguOTM3IDMuMiA1OC44MzcgMy43IEwgNTUuNzM3IDIzLjYgQyA1NS42MzcgMjQgNTUuOTM3IDI0LjMgNTYuMzM3IDI0LjMgTCA2MC4zMzcgMjQuMyBDIDYwLjczNyAyNC4zIDYxLjAzNyAyNCA2MS4wMzcgMjMuNyBMIDYxLjkzNyAxOCBDIDYyLjAzNyAxNy41IDYyLjQzNyAxNy4xIDYzLjAzNyAxNy4xIEwgNjUuNTM3IDE3LjEgQyA3MC42MzcgMTcuMSA3My42MzcgMTQuNiA3NC40MzcgOS43IEMgNzQuNzM3IDcuNiA3NC40MzcgNS45IDczLjQzNyA0LjcgQyA3Mi4yMzcgMy41IDcwLjMzNyAyLjggNjcuNzM3IDIuOCBaIE0gNjguNjM3IDEwLjEgQyA2OC4yMzcgMTIuOSA2Ni4wMzcgMTIuOSA2NC4wMzcgMTIuOSBMIDYyLjgzNyAxMi45IEwgNjMuNjM3IDcuNyBDIDYzLjYzNyA3LjQgNjMuOTM3IDcuMiA2NC4yMzcgNy4yIEwgNjQuNzM3IDcuMiBDIDY2LjEzNyA3LjIgNjcuNDM3IDcuMiA2OC4xMzcgOCBDIDY4LjYzNyA4LjQgNjguNzM3IDkuMSA2OC42MzcgMTAuMSBaIj48L3BhdGg+PHBhdGggZmlsbD0iIzAwOWNkZSIgZD0iTSA5MC45MzcgMTAgTCA4Ny4yMzcgMTAgQyA4Ni45MzcgMTAgODYuNjM3IDEwLjIgODYuNjM3IDEwLjUgTCA4Ni40MzcgMTEuNSBMIDg2LjEzNyAxMS4xIEMgODUuMzM3IDkuOSA4My41MzcgOS41IDgxLjczNyA5LjUgQyA3Ny42MzcgOS41IDc0LjEzNyAxMi42IDczLjQzNyAxNyBDIDczLjAzNyAxOS4yIDczLjUzNyAyMS4zIDc0LjgzNyAyMi43IEMgNzUuOTM3IDI0IDc3LjYzNyAyNC42IDc5LjUzNyAyNC42IEMgODIuODM3IDI0LjYgODQuNzM3IDIyLjUgODQuNzM3IDIyLjUgTCA4NC41MzcgMjMuNSBDIDg0LjQzNyAyMy45IDg0LjczNyAyNC4zIDg1LjEzNyAyNC4zIEwgODguNTM3IDI0LjMgQyA4OS4wMzcgMjQuMyA4OS41MzcgMjMuOSA4OS42MzcgMjMuNCBMIDkxLjYzNyAxMC42IEMgOTEuNjM3IDEwLjQgOTEuMzM3IDEwIDkwLjkzNyAxMCBaIE0gODUuNzM3IDE3LjIgQyA4NS4zMzcgMTkuMyA4My43MzcgMjAuOCA4MS41MzcgMjAuOCBDIDgwLjQzNyAyMC44IDc5LjYzNyAyMC41IDc5LjAzNyAxOS44IEMgNzguNDM3IDE5LjEgNzguMjM3IDE4LjIgNzguNDM3IDE3LjIgQyA3OC43MzcgMTUuMSA4MC41MzcgMTMuNiA4Mi42MzcgMTMuNiBDIDgzLjczNyAxMy42IDg0LjUzNyAxNCA4NS4xMzcgMTQuNiBDIDg1LjczNyAxNS4zIDg1LjkzNyAxNi4yIDg1LjczNyAxNy4yIFoiPjwvcGF0aD48cGF0aCBmaWxsPSIjMDA5Y2RlIiBkPSJNIDk1LjMzNyAzLjMgTCA5Mi4xMzcgMjMuNiBDIDkyLjAzNyAyNCA5Mi4zMzcgMjQuMyA5Mi43MzcgMjQuMyBMIDk1LjkzNyAyNC4zIEMgOTYuNDM3IDI0LjMgOTYuOTM3IDIzLjkgOTcuMDM3IDIzLjQgTCAxMDAuMjM3IDMuNSBDIDEwMC4zMzcgMy4xIDEwMC4wMzcgMi44IDk5LjYzNyAyLjggTCA5Ni4wMzcgMi44IEMgOTUuNjM3IDIuOCA5NS40MzcgMyA5NS4zMzcgMy4zIFoiPjwvcGF0aD48L3N2Zz4",
|
|
2493
|
-
role: "presentation",
|
|
2494
|
-
class: "h-[22px]"
|
|
2495
|
-
}, nt = /* @__PURE__ */ ce({
|
|
2496
|
-
__name: "ExpressPaymentMethodButton",
|
|
2497
|
-
props: {
|
|
2498
|
-
type: { type: String }
|
|
2499
|
-
},
|
|
2500
|
-
emits: ["click"],
|
|
2501
|
-
setup(e, { emit: i }) {
|
|
2502
|
-
const n = e, o = i, a = M(() => {
|
|
2503
|
-
switch (n.type) {
|
|
2504
|
-
case "applepay":
|
|
2505
|
-
return "Apple Pay";
|
|
2506
|
-
case "googlepay":
|
|
2507
|
-
return "Google Pay";
|
|
2508
|
-
case "paypal":
|
|
2509
|
-
return "PayPal";
|
|
2510
|
-
default:
|
|
2511
|
-
return;
|
|
2512
|
-
}
|
|
2513
|
-
}), l = M(() => {
|
|
2514
|
-
switch (n.type) {
|
|
2515
|
-
case "applepay":
|
|
2516
|
-
return "!bg-black !py-0";
|
|
2517
|
-
case "googlepay":
|
|
2518
|
-
return "!bg-black bg-[url(https://www.gstatic.com/instantbuy/svg/dark_gpay.svg)] bg-[length:auto_42.5%]";
|
|
2519
|
-
case "paypal":
|
|
2520
|
-
return "!bg-[#ffc439]";
|
|
2521
|
-
default:
|
|
2522
|
-
return;
|
|
2523
|
-
}
|
|
2524
|
-
});
|
|
2525
|
-
function c() {
|
|
2526
|
-
o("click");
|
|
2527
|
-
}
|
|
2528
|
-
return (g, u) => (d(), S(t(Pe), {
|
|
2529
|
-
size: "lg",
|
|
2530
|
-
"aria-label": a.value,
|
|
2531
|
-
class: he([l.value, "!block h-11 w-full bg-center bg-no-repeat"]),
|
|
2532
|
-
onClick: c
|
|
2533
|
-
}, {
|
|
2534
|
-
default: b(() => [
|
|
2535
|
-
n.type === "applepay" ? (d(), z("svg", Ro, [...u[0] || (u[0] = [
|
|
2536
|
-
L("svg", {
|
|
2537
|
-
id: "svg-logo",
|
|
2538
|
-
x: "0",
|
|
2539
|
-
y: "3.85",
|
|
2540
|
-
height: "7.3",
|
|
2541
|
-
width: "35",
|
|
2542
|
-
class: "logo",
|
|
2543
|
-
viewBox: "0 0 105 43",
|
|
2544
|
-
version: "1.1",
|
|
2545
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
2546
|
-
}, [
|
|
2547
|
-
L("title", null, "Apple Logo"),
|
|
2548
|
-
L("g", {
|
|
2549
|
-
stroke: "none",
|
|
2550
|
-
"stroke-width": "1",
|
|
2551
|
-
fill: "none",
|
|
2552
|
-
"fill-rule": "evenodd"
|
|
2553
|
-
}, [
|
|
2554
|
-
L("g", { fill: "#FFF" }, [
|
|
2555
|
-
L("path", { d: "M19.4028,5.5674 C20.6008,4.0684 21.4138,2.0564 21.1998,0.0004 C19.4458,0.0874 17.3058,1.1574 16.0668,2.6564 C14.9538,3.9414 13.9688,6.0374 14.2258,8.0074 C16.1948,8.1784 18.1618,7.0244 19.4028,5.5674" }),
|
|
2556
|
-
L("path", { d: "M21.1772,8.3926 C18.3182,8.2226 15.8872,10.0156 14.5212,10.0156 C13.1552,10.0156 11.0642,8.4786 8.8022,8.5196 C5.8592,8.5626 3.1282,10.2276 1.6342,12.8746 C-1.4378,18.1696 0.8232,26.0246 3.8112,30.3376 C5.2622,32.4716 7.0102,34.8206 9.3142,34.7366 C11.4912,34.6506 12.3442,33.3266 14.9902,33.3266 C17.6352,33.3266 18.4042,34.7366 20.7082,34.6936 C23.0972,34.6506 24.5922,32.5586 26.0422,30.4226 C27.7072,27.9906 28.3882,25.6426 28.4312,25.5126 C28.3882,25.4706 23.8232,23.7186 23.7812,18.4676 C23.7382,14.0706 27.3652,11.9786 27.5362,11.8496 C25.4882,8.8196 22.2872,8.4786 21.1772,8.3926" }),
|
|
2557
|
-
L("path", { d: "M85.5508,43.0381 L85.5508,39.1991 C85.8628,39.2421 86.6158,39.2871 87.0158,39.2871 C89.2138,39.2871 90.4558,38.3551 91.2108,35.9581 L91.6548,34.5371 L83.2428,11.2321 L88.4368,11.2321 L94.2958,30.1421 L94.4068,30.1421 L100.2668,11.2321 L105.3278,11.2321 L96.6048,35.7141 C94.6078,41.3291 92.3208,43.1721 87.4828,43.1721 C87.1048,43.1721 85.8838,43.1271 85.5508,43.0381" }),
|
|
2558
|
-
L("path", { d: "M42.6499,19.3555 L48.3549,19.3555 C52.6829,19.3555 55.1469,17.0255 55.1469,12.9855 C55.1469,8.9455 52.6829,6.6375 48.3769,6.6375 L42.6499,6.6375 L42.6499,19.3555 Z M49.6869,2.4425 C55.9009,2.4425 60.2289,6.7265 60.2289,12.9625 C60.2289,19.2225 55.8129,23.5285 49.5309,23.5285 L42.6499,23.5285 L42.6499,34.4705 L37.6779,34.4705 L37.6779,2.4425 L49.6869,2.4425 Z" }),
|
|
2559
|
-
L("path", { d: "M76.5547,25.7705 L76.5547,23.9715 L71.0287,24.3275 C67.9207,24.5275 66.3007,25.6815 66.3007,27.7015 C66.3007,29.6545 67.9887,30.9195 70.6287,30.9195 C74.0027,30.9195 76.5547,28.7665 76.5547,25.7705 M61.4617,27.8345 C61.4617,23.7285 64.5917,21.3755 70.3627,21.0205 L76.5547,20.6425 L76.5547,18.8675 C76.5547,16.2705 74.8457,14.8495 71.8057,14.8495 C69.2967,14.8495 67.4777,16.1375 67.0997,18.1125 L62.6167,18.1125 C62.7497,13.9615 66.6567,10.9435 71.9387,10.9435 C77.6207,10.9435 81.3267,13.9175 81.3267,18.5345 L81.3267,34.4705 L76.7327,34.4705 L76.7327,30.6305 L76.6217,30.6305 C75.3127,33.1395 72.4267,34.7145 69.2967,34.7145 C64.6807,34.7145 61.4617,31.9625 61.4617,27.8345" })
|
|
2560
|
-
])
|
|
2561
|
-
])
|
|
2562
|
-
], -1)
|
|
2563
|
-
])])) : n.type === "paypal" ? (d(), z("img", $o)) : j("", !0)
|
|
2564
|
-
]),
|
|
2565
|
-
_: 1
|
|
2566
|
-
}, 8, ["aria-label", "class"]));
|
|
2567
|
-
}
|
|
2568
|
-
}), Bo = { class: "absolute h-[1px] w-[1px] overflow-hidden opacity-0" }, Uo = "ADYEN", Vo = /* @__PURE__ */ ce({
|
|
2569
|
-
__name: "ExpressPaymentMethodApplePay",
|
|
2570
|
-
props: {
|
|
2571
|
-
onBillingInformationChange: { type: Function },
|
|
2572
|
-
amount: { type: Object },
|
|
2573
|
-
countryCode: { type: String },
|
|
2574
|
-
locale: { type: String },
|
|
2575
|
-
isVisible: { type: Boolean },
|
|
2576
|
-
paymentMethodOptionsResponse: { type: Object },
|
|
2577
|
-
billingInformation: { type: Object }
|
|
2578
|
-
},
|
|
2579
|
-
emits: ["ready", "update-billing-information"],
|
|
2580
|
-
setup(e, { emit: i }) {
|
|
2581
|
-
const n = e, o = i, a = Y(), l = Me(), { authorizePayment: c } = nn(), g = n.paymentMethodOptionsResponse.payment_acceptor.id;
|
|
2582
|
-
function u(v) {
|
|
2583
|
-
return on({
|
|
2584
|
-
gateway: "ADYEN",
|
|
2585
|
-
paymentAcceptorId: g,
|
|
2586
|
-
paymentMethodType: "applepay",
|
|
2587
|
-
...v
|
|
2588
|
-
});
|
|
2589
|
-
}
|
|
2590
|
-
const I = async () => {
|
|
2591
|
-
const { ApplePay: v } = await Ge(), N = await Wt(n, l), E = new v(N, {
|
|
2592
|
-
isExpress: !0,
|
|
2593
|
-
recurringPaymentRequest: {
|
|
2594
|
-
paymentDescription: n.billingInformation.description,
|
|
2595
|
-
billingAgreement: n.billingInformation.agreement,
|
|
2596
|
-
managementURL: "https://www.google.com",
|
|
2597
|
-
// Trial
|
|
2598
|
-
...n.billingInformation.trial && {
|
|
2599
|
-
trialBilling: {
|
|
2600
|
-
label: n.billingInformation.trial.label,
|
|
2601
|
-
amount: n.billingInformation.trial.amount.quantity.toString(),
|
|
2602
|
-
type: "final",
|
|
2603
|
-
paymentTiming: "recurring",
|
|
2604
|
-
recurringPaymentStartDate: n.billingInformation.trial.startDate,
|
|
2605
|
-
recurringPaymentEndDate: n.billingInformation.trial.endDate
|
|
2606
|
-
}
|
|
2607
|
-
},
|
|
2608
|
-
// Regular
|
|
2609
|
-
...n.billingInformation.regular && {
|
|
2610
|
-
regularBilling: {
|
|
2611
|
-
label: n.billingInformation.regular.label,
|
|
2612
|
-
amount: n.billingInformation.regular.amount.quantity.toString(),
|
|
2613
|
-
type: "final",
|
|
2614
|
-
paymentTiming: "recurring",
|
|
2615
|
-
recurringPaymentStartDate: n.billingInformation.regular.startDate,
|
|
2616
|
-
...y(
|
|
2617
|
-
n.billingInformation.regular.interval ?? { type: "MONTH", value: 1 }
|
|
2618
|
-
)
|
|
2619
|
-
}
|
|
2620
|
-
}
|
|
2621
|
-
},
|
|
2622
|
-
requiredBillingContactFields: ["postalAddress"],
|
|
2623
|
-
requiredShippingContactFields: ["email"],
|
|
2624
|
-
onPaymentMethodSelected: async (V, F, p) => {
|
|
2625
|
-
var G, s, r, A, f, C, R;
|
|
2626
|
-
const { invoicePreview: B, trialInvoicePreview: T } = await n.onBillingInformationChange({
|
|
2627
|
-
...((G = p.paymentMethod.billingContact) == null ? void 0 : G.postalCode) && {
|
|
2628
|
-
postal_code: p.paymentMethod.billingContact.postalCode
|
|
2629
|
-
},
|
|
2630
|
-
...((s = p.paymentMethod.billingContact) == null ? void 0 : s.locality) && {
|
|
2631
|
-
city: p.paymentMethod.billingContact.locality
|
|
2632
|
-
},
|
|
2633
|
-
...m((r = p.paymentMethod.billingContact) == null ? void 0 : r.countryCode) && {
|
|
2634
|
-
country: m((A = p.paymentMethod.billingContact) == null ? void 0 : A.countryCode)
|
|
2635
|
-
}
|
|
2636
|
-
}), q = T ? T.invoice_amount_including_tax.quantity.toString() : B.invoice_amount_including_tax.quantity.toString();
|
|
2637
|
-
o("update-billing-information", {
|
|
2638
|
-
postal_code: (f = p.paymentMethod.billingContact) == null ? void 0 : f.postalCode,
|
|
2639
|
-
city: (C = p.paymentMethod.billingContact) == null ? void 0 : C.locality,
|
|
2640
|
-
country: (R = p.paymentMethod.billingContact) == null ? void 0 : R.countryCode
|
|
2641
|
-
}), V({
|
|
2642
|
-
newTotal: {
|
|
2643
|
-
label: n.billingInformation.regular.label,
|
|
2644
|
-
amount: q,
|
|
2645
|
-
type: "final"
|
|
2646
|
-
}
|
|
2647
|
-
});
|
|
2648
|
-
},
|
|
2649
|
-
onError: (V) => {
|
|
2650
|
-
l.error(
|
|
2651
|
-
"APPLE_PAY_ERROR",
|
|
2652
|
-
"Apple Pay error",
|
|
2653
|
-
u({ reason: "APPLE_PAY_ERROR", cause: V }),
|
|
2654
|
-
V
|
|
2655
|
-
);
|
|
2656
|
-
},
|
|
2657
|
-
onAuthorized: async (V, F) => {
|
|
2658
|
-
var p;
|
|
2659
|
-
try {
|
|
2660
|
-
const B = V.authorizedEvent;
|
|
2661
|
-
l.info("APPLE_PAY_AUTHORIZED", "Apple Pay authorized", {
|
|
2662
|
-
paymentAcceptorId: g,
|
|
2663
|
-
hasPaymentMethod: !!B.payment.token.paymentMethod,
|
|
2664
|
-
hasPaymentData: !!B.payment.token.paymentData,
|
|
2665
|
-
hasBillingContact: !!B.payment.billingContact
|
|
2666
|
-
});
|
|
2667
|
-
const T = B.payment.billingContact, q = V.billingAddress;
|
|
2668
|
-
T ? o(
|
|
2669
|
-
"update-billing-information",
|
|
2670
|
-
h(T)
|
|
2671
|
-
) : q && o(
|
|
2672
|
-
"update-billing-information",
|
|
2673
|
-
P(q)
|
|
2674
|
-
);
|
|
2675
|
-
const G = {
|
|
2676
|
-
payment_method: Nt(
|
|
2677
|
-
B.payment.token.paymentMethod
|
|
2678
|
-
),
|
|
2679
|
-
browser_info: Nt(
|
|
2680
|
-
B.payment.token.paymentData
|
|
2681
|
-
)
|
|
2682
|
-
}, s = Bi({
|
|
2683
|
-
paymentAcceptorId: g,
|
|
2684
|
-
redirectUrl: window.location.href
|
|
2685
|
-
}), r = await c({
|
|
2686
|
-
payment_acceptor_id: g,
|
|
2687
|
-
payment_gateway_variant: Uo,
|
|
2688
|
-
adyen: {
|
|
2689
|
-
...G,
|
|
2690
|
-
store_payment_method: !0
|
|
2691
|
-
// Required for recurring payments
|
|
2692
|
-
},
|
|
2693
|
-
amount: n.amount,
|
|
2694
|
-
return_url: s
|
|
2695
|
-
});
|
|
2696
|
-
if (l.info("APPLE_PAY_API_RESPONSE", "Payment API response received", {
|
|
2697
|
-
paymentAcceptorId: g,
|
|
2698
|
-
status: r.status
|
|
2699
|
-
}), r.status === "FAILURE") {
|
|
2700
|
-
l.error(
|
|
2701
|
-
"APPLE_PAY_AUTHORIZATION_FAILED",
|
|
2702
|
-
"Payment authorization failed",
|
|
2703
|
-
u({
|
|
2704
|
-
reason: "APPLE_PAY_AUTHORIZATION_REJECTED",
|
|
2705
|
-
extra: { paymentStatus: r.status }
|
|
2706
|
-
})
|
|
2707
|
-
), F.reject();
|
|
2708
|
-
return;
|
|
2709
|
-
}
|
|
2710
|
-
if (r.status === "ACTION_REQUIRED") {
|
|
2711
|
-
l.warn(
|
|
2712
|
-
"APPLE_PAY_ACTION_REQUIRED",
|
|
2713
|
-
"Payment requires additional action",
|
|
2714
|
-
u({
|
|
2715
|
-
reason: "APPLE_PAY_ACTION_REQUIRED",
|
|
2716
|
-
extra: { actionType: (p = r.action) == null ? void 0 : p.method }
|
|
2717
|
-
})
|
|
2718
|
-
), F.reject();
|
|
2719
|
-
return;
|
|
2720
|
-
}
|
|
2721
|
-
l.info("APPLE_PAY_SUCCESS", "Apple Pay payment successful, resolving"), F.resolve();
|
|
2722
|
-
} catch (B) {
|
|
2723
|
-
l.error(
|
|
2724
|
-
"APPLE_PAY_AUTHORIZATION_FAILED",
|
|
2725
|
-
"Apple Pay authorization failed",
|
|
2726
|
-
u({ reason: "APPLE_PAY_AUTHORIZATION_FAILED", cause: B }),
|
|
2727
|
-
B
|
|
2728
|
-
), F.reject();
|
|
2729
|
-
}
|
|
2730
|
-
}
|
|
2731
|
-
});
|
|
2732
|
-
if (!a.value) {
|
|
2733
|
-
l.error("APPLE_PAY_ERROR", "Apple Pay button ref not found");
|
|
2734
|
-
return;
|
|
2735
|
-
}
|
|
2736
|
-
try {
|
|
2737
|
-
await E.isAvailable(), E.mount(a.value), o("ready");
|
|
2738
|
-
} catch (V) {
|
|
2739
|
-
l.error("APPLE_PAY_ERROR", "Apple Pay not available on this device", {}, V);
|
|
2740
|
-
}
|
|
2741
|
-
}, y = (v) => {
|
|
2742
|
-
if (!v.value)
|
|
2743
|
-
return;
|
|
2744
|
-
let N = v.value ?? 1, E = v.type.toLowerCase();
|
|
2745
|
-
if (v.type === "WEEK" && (E = "day", N = v.value * 7), E === "day" || E === "month" || E === "year" || E === "hour" || E === "minute")
|
|
2746
|
-
return {
|
|
2747
|
-
recurringPaymentIntervalUnit: E,
|
|
2748
|
-
recurringPaymentIntervalCount: N
|
|
2749
|
-
};
|
|
2750
|
-
}, h = (v) => ({
|
|
2751
|
-
postal_code: v.postalCode,
|
|
2752
|
-
city: v.locality,
|
|
2753
|
-
country: v.countryCode
|
|
2754
|
-
}), P = (v) => ({
|
|
2755
|
-
postal_code: v.postalCode,
|
|
2756
|
-
city: v.city,
|
|
2757
|
-
country: v.country
|
|
2758
|
-
}), m = (v) => v && x(v) ? v : void 0, x = (v) => Ke(v), k = () => {
|
|
2759
|
-
var N;
|
|
2760
|
-
const v = (N = a.value) == null ? void 0 : N.querySelector("apple-pay-button");
|
|
2761
|
-
if (v) {
|
|
2762
|
-
const E = new MouseEvent("click", {
|
|
2763
|
-
bubbles: !0,
|
|
2764
|
-
cancelable: !0,
|
|
2765
|
-
view: window
|
|
2766
|
-
});
|
|
2767
|
-
v.dispatchEvent(E);
|
|
2768
|
-
}
|
|
2769
|
-
};
|
|
2770
|
-
return Oe(() => {
|
|
2771
|
-
I();
|
|
2772
|
-
}), (v, N) => (d(), z(me, null, [
|
|
2773
|
-
e.isVisible ? (d(), S(nt, {
|
|
2774
|
-
key: 0,
|
|
2775
|
-
type: "applepay",
|
|
2776
|
-
onClick: k
|
|
2777
|
-
})) : j("", !0),
|
|
2778
|
-
L("div", Bo, [
|
|
2779
|
-
L("div", {
|
|
2780
|
-
ref_key: "applePayButtonRef",
|
|
2781
|
-
ref: a
|
|
2782
|
-
}, null, 512)
|
|
2783
|
-
])
|
|
2784
|
-
], 64));
|
|
2785
|
-
}
|
|
2786
|
-
}), Fo = { class: "relative overflow-hidden" }, Go = /* @__PURE__ */ ce({
|
|
2787
|
-
__name: "ExpressPaymentMethodPaypal",
|
|
2788
|
-
props: {
|
|
2789
|
-
amount: { type: Object },
|
|
2790
|
-
countryCode: { type: String },
|
|
2791
|
-
locale: { type: String },
|
|
2792
|
-
isVisible: { type: Boolean },
|
|
2793
|
-
paymentMethodOptionsResponse: { type: Object },
|
|
2794
|
-
billingInformation: { type: Object }
|
|
2795
|
-
},
|
|
2796
|
-
emits: ["ready", "update-billing-information"],
|
|
2797
|
-
setup(e, { emit: i }) {
|
|
2798
|
-
const n = e, o = i, a = Me(), { buttonRef: l } = qt({
|
|
2799
|
-
props: n,
|
|
2800
|
-
onMissingButton: () => a.error(
|
|
2801
|
-
"EXPRESS_CHECKOUT_PAYPAL_ERROR",
|
|
2802
|
-
"The PayPal button reference is not found and cannot be mounted"
|
|
2803
|
-
),
|
|
2804
|
-
onMountFailed: (c) => a.error("EXPRESS_CHECKOUT_PAYPAL_ERROR", "Failed mounting PayPal express button", {
|
|
2805
|
-
error: c
|
|
2806
|
-
}),
|
|
2807
|
-
create: async (c) => {
|
|
2808
|
-
const { PayPal: g } = await Ge();
|
|
2809
|
-
return new g(c, {
|
|
2810
|
-
isExpress: !0,
|
|
2811
|
-
blockPayPalPayLaterButton: !0,
|
|
2812
|
-
blockPayPalCreditButton: !0,
|
|
2813
|
-
blockPayPalVenmoButton: !0,
|
|
2814
|
-
style: {
|
|
2815
|
-
height: 55
|
|
2816
|
-
},
|
|
2817
|
-
onInit: () => {
|
|
2818
|
-
o("ready");
|
|
2819
|
-
}
|
|
2820
|
-
});
|
|
2821
|
-
}
|
|
2822
|
-
});
|
|
2823
|
-
return (c, g) => (d(), z("div", Fo, [
|
|
2824
|
-
e.isVisible ? (d(), S(nt, {
|
|
2825
|
-
key: 0,
|
|
2826
|
-
type: "paypal",
|
|
2827
|
-
class: "w-full"
|
|
2828
|
-
})) : j("", !0),
|
|
2829
|
-
L("div", {
|
|
2830
|
-
ref_key: "paypalButtonRef",
|
|
2831
|
-
ref: l,
|
|
2832
|
-
class: "absolute inset-0 opacity-[0.0001]"
|
|
2833
|
-
}, null, 512)
|
|
2834
|
-
]));
|
|
2835
|
-
}
|
|
2836
|
-
}), Yo = { class: "absolute h-[1px] w-[1px] overflow-hidden opacity-0" }, Ko = /* @__PURE__ */ ce({
|
|
2837
|
-
__name: "ExpressPaymentMethodGooglePay",
|
|
2838
|
-
props: {
|
|
2839
|
-
amount: { type: Object },
|
|
2840
|
-
countryCode: { type: String },
|
|
2841
|
-
locale: { type: String },
|
|
2842
|
-
isVisible: { type: Boolean },
|
|
2843
|
-
paymentMethodOptionsResponse: { type: Object },
|
|
2844
|
-
billingInformation: { type: Object }
|
|
2845
|
-
},
|
|
2846
|
-
emits: ["ready", "update-billing-information"],
|
|
2847
|
-
setup(e, { emit: i }) {
|
|
2848
|
-
const n = e, o = i, a = Me(), { buttonRef: l } = qt({
|
|
2849
|
-
props: n,
|
|
2850
|
-
onMissingButton: () => a.error(
|
|
2851
|
-
"EXPRESS_CHECKOUT_GOOGLE_PAY_ERROR",
|
|
2852
|
-
"The Google Pay button reference is not found and cannot be mounted"
|
|
2853
|
-
),
|
|
2854
|
-
onMountFailed: (g) => a.error(
|
|
2855
|
-
"EXPRESS_CHECKOUT_GOOGLE_PAY_ERROR",
|
|
2856
|
-
"Failed mounting Google Pay express button",
|
|
2857
|
-
{},
|
|
2858
|
-
g
|
|
2859
|
-
),
|
|
2860
|
-
create: async (g) => {
|
|
2861
|
-
const { GooglePay: u } = await Ge();
|
|
2862
|
-
return new u(g, { isExpress: !0 });
|
|
2863
|
-
},
|
|
2864
|
-
afterMount: () => o("ready")
|
|
2865
|
-
}), c = () => {
|
|
2866
|
-
var u;
|
|
2867
|
-
const g = (u = l.value) == null ? void 0 : u.querySelector("#gpay-button-online-api-id");
|
|
2868
|
-
if (g) {
|
|
2869
|
-
const I = new MouseEvent("click", {
|
|
2870
|
-
bubbles: !0,
|
|
2871
|
-
cancelable: !0,
|
|
2872
|
-
view: window
|
|
2873
|
-
});
|
|
2874
|
-
g.dispatchEvent(I);
|
|
2875
|
-
}
|
|
2876
|
-
};
|
|
2877
|
-
return (g, u) => (d(), z(me, null, [
|
|
2878
|
-
e.isVisible ? (d(), S(nt, {
|
|
2879
|
-
key: 0,
|
|
2880
|
-
type: "googlepay",
|
|
2881
|
-
onClick: c
|
|
2882
|
-
})) : j("", !0),
|
|
2883
|
-
L("div", Yo, [
|
|
2884
|
-
L("div", {
|
|
2885
|
-
ref_key: "googlePayButtonRef",
|
|
2886
|
-
ref: l
|
|
2887
|
-
}, null, 512)
|
|
2888
|
-
])
|
|
2889
|
-
], 64));
|
|
2890
|
-
}
|
|
2891
|
-
}), Ho = {
|
|
2892
|
-
key: 0,
|
|
2893
|
-
class: "mt-4n"
|
|
2894
|
-
}, Qo = { class: "mb-2" }, Zo = { class: "grid grid-cols-6 gap-1 md:gap-2" }, Xo = { class: "mt-4 h-4" }, Wo = 2, qo = /* @__PURE__ */ ce({
|
|
2895
|
-
__name: "ExpressPaymentMethods",
|
|
2896
|
-
props: {
|
|
2897
|
-
amount: { type: Object },
|
|
2898
|
-
countryCode: { type: String },
|
|
2899
|
-
locale: { type: String },
|
|
2900
|
-
paymentMethodsOptionsResponse: { type: null },
|
|
2901
|
-
billingInformation: { type: Object },
|
|
2902
|
-
onBillingInformationChange: { type: Function }
|
|
2903
|
-
},
|
|
2904
|
-
emits: ["update-billing-information"],
|
|
2905
|
-
setup(e) {
|
|
2906
|
-
const i = ["applepay"], n = e, { $t: o } = ve(), a = Y(!1), l = Y(!1), c = Y(!1), g = M(() => {
|
|
2907
|
-
var m;
|
|
2908
|
-
if (i.includes("applepay"))
|
|
2909
|
-
return (m = n.paymentMethodsOptionsResponse) == null ? void 0 : m.find(
|
|
2910
|
-
(x) => {
|
|
2911
|
-
var k;
|
|
2912
|
-
return (k = x.options) == null ? void 0 : k.some(
|
|
2913
|
-
(v) => v.name.toLowerCase() === "apple pay" && v.payment_gateway_variant === "ADYEN"
|
|
2914
|
-
);
|
|
2915
|
-
}
|
|
2916
|
-
);
|
|
2917
|
-
}), u = M(() => {
|
|
2918
|
-
var m;
|
|
2919
|
-
if (i.includes("paypal"))
|
|
2920
|
-
return (m = n.paymentMethodsOptionsResponse) == null ? void 0 : m.find(
|
|
2921
|
-
(x) => {
|
|
2922
|
-
var k;
|
|
2923
|
-
return (k = x.options) == null ? void 0 : k.some(
|
|
2924
|
-
(v) => v.name.toLowerCase() === "paypal" && v.payment_gateway_variant === "ADYEN"
|
|
2925
|
-
);
|
|
2926
|
-
}
|
|
2927
|
-
);
|
|
2928
|
-
}), I = M(() => {
|
|
2929
|
-
var m;
|
|
2930
|
-
if (i.includes("googlepay"))
|
|
2931
|
-
return (m = n.paymentMethodsOptionsResponse) == null ? void 0 : m.find(
|
|
2932
|
-
(x) => {
|
|
2933
|
-
var k;
|
|
2934
|
-
return (k = x.options) == null ? void 0 : k.some(
|
|
2935
|
-
(v) => v.name.toLowerCase() === "google pay" && v.payment_gateway_variant === "ADYEN"
|
|
2936
|
-
);
|
|
2937
|
-
}
|
|
2938
|
-
);
|
|
2939
|
-
}), y = M(() => !!(g.value || I.value || u.value)), h = M(() => {
|
|
2940
|
-
var v;
|
|
2941
|
-
if (((v = n.paymentMethodsOptionsResponse) == null ? void 0 : v.length) === 0)
|
|
2942
|
-
return !1;
|
|
2943
|
-
const m = !g.value || a.value, x = !I.value || l.value, k = !u.value || c.value;
|
|
2944
|
-
return m && x && k;
|
|
2945
|
-
}), P = M(() => h.value ? (g.value ? 1 : 0) + (I.value ? 1 : 0) + (u.value ? 1 : 0) : Wo);
|
|
2946
|
-
return (m, x) => y.value ? (d(), z("div", Ho, [
|
|
2947
|
-
L("div", Qo, [
|
|
2948
|
-
h.value ? (d(), S(t(se), {
|
|
2949
|
-
key: 1,
|
|
2950
|
-
variant: "heading-3",
|
|
2951
|
-
tag: "h2"
|
|
2952
|
-
}, {
|
|
2953
|
-
default: b(() => [
|
|
2954
|
-
Q($(t(o)({
|
|
2955
|
-
defaultMessage: "Subscribe instantly with",
|
|
2956
|
-
id: "checkout.express_payment_methods.title",
|
|
2957
|
-
description: "The title of the express payment methods block in the checkout form"
|
|
2958
|
-
})), 1)
|
|
2959
|
-
]),
|
|
2960
|
-
_: 1
|
|
2961
|
-
})) : (d(), S(_e, {
|
|
2962
|
-
key: 0,
|
|
2963
|
-
variant: "title"
|
|
2964
|
-
}))
|
|
2965
|
-
]),
|
|
2966
|
-
L("div", Zo, [
|
|
2967
|
-
h.value ? j("", !0) : (d(), z(me, { key: 0 }, [
|
|
2968
|
-
_(_e, { class: "col-span-3 h-11" }),
|
|
2969
|
-
_(_e, { class: "col-span-3 h-11" })
|
|
2970
|
-
], 64)),
|
|
2971
|
-
L("div", {
|
|
2972
|
-
class: he(["col-span-3 md:col-span-2", {
|
|
2973
|
-
hidden: !g.value,
|
|
2974
|
-
"!col-span-6": P.value === 1,
|
|
2975
|
-
"md:!col-span-3": P.value === 2,
|
|
2976
|
-
"!col-span-6 md:!col-span-2": P.value === 3
|
|
2977
|
-
}])
|
|
2978
|
-
}, [
|
|
2979
|
-
g.value ? (d(), S(Vo, {
|
|
2980
|
-
key: 0,
|
|
2981
|
-
amount: e.amount,
|
|
2982
|
-
"billing-information": e.billingInformation,
|
|
2983
|
-
"country-code": e.countryCode,
|
|
2984
|
-
locale: e.locale,
|
|
2985
|
-
"is-visible": h.value,
|
|
2986
|
-
"payment-method-options-response": g.value,
|
|
2987
|
-
"on-billing-information-change": e.onBillingInformationChange,
|
|
2988
|
-
onReady: x[0] || (x[0] = (k) => a.value = !0),
|
|
2989
|
-
onUpdateBillingInformation: x[1] || (x[1] = (k) => m.$emit("update-billing-information", k))
|
|
2990
|
-
}, null, 8, ["amount", "billing-information", "country-code", "locale", "is-visible", "payment-method-options-response", "on-billing-information-change"])) : j("", !0)
|
|
2991
|
-
], 2),
|
|
2992
|
-
L("div", {
|
|
2993
|
-
class: he(["col-span-3 md:col-span-2", {
|
|
2994
|
-
hidden: !I.value,
|
|
2995
|
-
"col-span-6 md:col-span-6": P.value === 1,
|
|
2996
|
-
"md:!col-span-3": P.value === 2
|
|
2997
|
-
}])
|
|
2998
|
-
}, [
|
|
2999
|
-
I.value ? (d(), S(Ko, {
|
|
3000
|
-
key: 0,
|
|
3001
|
-
amount: e.amount,
|
|
3002
|
-
"billing-information": e.billingInformation,
|
|
3003
|
-
"country-code": e.countryCode,
|
|
3004
|
-
locale: e.locale,
|
|
3005
|
-
"is-visible": h.value,
|
|
3006
|
-
"payment-method-options-response": I.value,
|
|
3007
|
-
onReady: x[2] || (x[2] = (k) => l.value = !0)
|
|
3008
|
-
}, null, 8, ["amount", "billing-information", "country-code", "locale", "is-visible", "payment-method-options-response"])) : j("", !0)
|
|
3009
|
-
], 2),
|
|
3010
|
-
L("div", {
|
|
3011
|
-
class: he(["col-span-3 md:col-span-2", {
|
|
3012
|
-
hidden: !u.value,
|
|
3013
|
-
"col-span-6 md:col-span-6": P.value === 1,
|
|
3014
|
-
"md:!col-span-3": P.value === 2
|
|
3015
|
-
}])
|
|
3016
|
-
}, [
|
|
3017
|
-
u.value ? (d(), S(Go, {
|
|
3018
|
-
key: 0,
|
|
3019
|
-
amount: e.amount,
|
|
3020
|
-
"billing-information": e.billingInformation,
|
|
3021
|
-
"country-code": e.countryCode,
|
|
3022
|
-
locale: e.locale,
|
|
3023
|
-
"is-visible": h.value,
|
|
3024
|
-
"payment-method-options-response": u.value,
|
|
3025
|
-
onReady: x[3] || (x[3] = (k) => c.value = !0)
|
|
3026
|
-
}, null, 8, ["amount", "billing-information", "country-code", "locale", "is-visible", "payment-method-options-response"])) : j("", !0)
|
|
3027
|
-
], 2)
|
|
3028
|
-
]),
|
|
3029
|
-
L("div", Xo, [
|
|
3030
|
-
h.value ? (d(), S(t(tn), {
|
|
3031
|
-
key: 1,
|
|
3032
|
-
text: t(o)({
|
|
3033
|
-
defaultMessage: "Or",
|
|
3034
|
-
id: "checkout.express_payment_methods.divider_text",
|
|
3035
|
-
description: "The text of the divider text in the express payment methods block in the checkout form"
|
|
3036
|
-
}),
|
|
3037
|
-
"text-position": "center"
|
|
3038
|
-
}, null, 8, ["text"])) : (d(), S(_e, {
|
|
3039
|
-
key: 0,
|
|
3040
|
-
variant: "divider-text"
|
|
3041
|
-
}))
|
|
3042
|
-
])
|
|
3043
|
-
])) : j("", !0);
|
|
3044
|
-
}
|
|
3045
|
-
}), Jo = ["aria-expanded", "aria-label"], ea = { class: "flex w-full cursor-pointer flex-row items-center justify-between gap-3 px-3 py-2" }, ta = { class: "flex flex-row items-center gap-2" }, ia = ["onKeydown"], na = ["aria-label"], oa = { class: "flex w-full cursor-pointer flex-row items-center justify-between gap-3 px-3 py-2" }, aa = { class: "flex flex-row items-center gap-2" }, ra = {
|
|
3046
|
-
class: "sr-only",
|
|
3047
|
-
"aria-live": "polite"
|
|
3048
|
-
}, la = /* @__PURE__ */ ce({
|
|
3049
|
-
inheritAttrs: !1,
|
|
3050
|
-
__name: "PromotionCodeSection",
|
|
3051
|
-
props: {
|
|
3052
|
-
promotionCode: { default: null, type: [String, null] }
|
|
3053
|
-
},
|
|
3054
|
-
emits: ["update:appliedCode", "apply", "remove"],
|
|
3055
|
-
setup(e, { emit: i }) {
|
|
3056
|
-
const { $t: n } = ve(), o = e, a = i, l = Y(!1), c = Y(""), g = Y(""), u = Y(null), I = Y(null), y = rn("promotion-code-"), h = `${y}-label`, P = `${y}-panel`, m = M(() => o.promotionCode !== null && o.promotionCode !== ""), x = M(() => c.value.trim().length > 0), k = M(
|
|
3057
|
-
() => o.promotionCode ?? n({
|
|
3058
|
-
defaultMessage: "Promotion applied",
|
|
3059
|
-
id: "checkout.promotion_code.applied_label",
|
|
3060
|
-
description: "Fallback label for an applied promotion code in checkout"
|
|
3061
|
-
})
|
|
3062
|
-
), v = M(
|
|
3063
|
-
() => l.value ? n({
|
|
3064
|
-
defaultMessage: "Collapse promotion code input",
|
|
3065
|
-
id: "checkout.promotion_code.collapse_aria_label",
|
|
3066
|
-
description: "Aria label for the promotion code toggle button in checkout, while the input is open"
|
|
3067
|
-
}) : n({
|
|
3068
|
-
defaultMessage: "Expand promotion code input",
|
|
3069
|
-
id: "checkout.promotion_code.expand_aria_label",
|
|
3070
|
-
description: "Aria label for the promotion code toggle button in checkout, while the input is closed"
|
|
3071
|
-
})
|
|
3072
|
-
), N = M(
|
|
3073
|
-
() => n({
|
|
3074
|
-
defaultMessage: "Apply promotion code",
|
|
3075
|
-
id: "checkout.promotion_code.apply_aria_label",
|
|
3076
|
-
description: "Aria label for the promotion code apply button in checkout"
|
|
3077
|
-
})
|
|
3078
|
-
), E = M(
|
|
3079
|
-
() => n({
|
|
3080
|
-
defaultMessage: "Remove promotion code",
|
|
3081
|
-
id: "checkout.promotion_code.remove_aria_label",
|
|
3082
|
-
description: "Aria label for the promotion code remove button in checkout"
|
|
3083
|
-
})
|
|
3084
|
-
), V = () => {
|
|
3085
|
-
c.value = "";
|
|
3086
|
-
}, F = () => {
|
|
3087
|
-
var s;
|
|
3088
|
-
const G = (s = I.value) == null ? void 0 : s.querySelector("input");
|
|
3089
|
-
G instanceof HTMLInputElement && G.focus();
|
|
3090
|
-
}, p = () => {
|
|
3091
|
-
l.value && (l.value = !1);
|
|
3092
|
-
}, B = () => {
|
|
3093
|
-
m.value || (l.value = !l.value);
|
|
3094
|
-
}, T = () => {
|
|
3095
|
-
if (!x.value)
|
|
3096
|
-
return;
|
|
3097
|
-
const G = c.value.trim();
|
|
3098
|
-
a("update:appliedCode", G), a("apply", G), g.value = n({
|
|
3099
|
-
defaultMessage: "Promotion code applied",
|
|
3100
|
-
id: "checkout.promotion_code.applied_status",
|
|
3101
|
-
description: "Aria live message when a promotion code is applied in checkout"
|
|
3102
|
-
}), l.value = !1;
|
|
3103
|
-
}, q = () => {
|
|
3104
|
-
a("update:appliedCode", null), a("remove"), g.value = n({
|
|
3105
|
-
defaultMessage: "Promotion code removed",
|
|
3106
|
-
id: "checkout.promotion_code.removed_status",
|
|
3107
|
-
description: "Aria live message when a promotion code is removed in checkout"
|
|
3108
|
-
}), V(), Xe(() => {
|
|
3109
|
-
var G;
|
|
3110
|
-
(G = u.value) == null || G.focus();
|
|
3111
|
-
});
|
|
3112
|
-
};
|
|
3113
|
-
return Se(l, (G) => {
|
|
3114
|
-
if (!G) {
|
|
3115
|
-
V(), Xe(() => {
|
|
3116
|
-
var s;
|
|
3117
|
-
(s = u.value) == null || s.focus();
|
|
3118
|
-
});
|
|
3119
|
-
return;
|
|
3120
|
-
}
|
|
3121
|
-
Xe(() => {
|
|
3122
|
-
F();
|
|
3123
|
-
});
|
|
3124
|
-
}), Se(
|
|
3125
|
-
() => o.promotionCode,
|
|
3126
|
-
(G) => {
|
|
3127
|
-
G || V();
|
|
3128
|
-
}
|
|
3129
|
-
), (G, s) => (d(), z(me, null, [
|
|
3130
|
-
m.value ? (d(), S(t(ge), It({ key: 1 }, G.$attrs, {
|
|
3131
|
-
"no-border": "",
|
|
3132
|
-
"no-spacing": "",
|
|
3133
|
-
"content-background": "none",
|
|
3134
|
-
class: "relative w-full"
|
|
3135
|
-
}), {
|
|
3136
|
-
default: b(() => [
|
|
3137
|
-
L("button", {
|
|
3138
|
-
type: "button",
|
|
3139
|
-
class: "w-full rounded border border-primary-900 bg-white",
|
|
3140
|
-
"aria-label": E.value,
|
|
3141
|
-
onClick: q
|
|
3142
|
-
}, [
|
|
3143
|
-
L("div", oa, [
|
|
3144
|
-
L("div", aa, [
|
|
3145
|
-
_(t(Re), { icon: "local_activity" }),
|
|
3146
|
-
_(t(se), {
|
|
3147
|
-
variant: "body-sm",
|
|
3148
|
-
class: "font-semibold"
|
|
3149
|
-
}, {
|
|
3150
|
-
default: b(() => [
|
|
3151
|
-
Q($(k.value), 1)
|
|
3152
|
-
]),
|
|
3153
|
-
_: 1
|
|
3154
|
-
})
|
|
3155
|
-
]),
|
|
3156
|
-
_(t(Re), { icon: "close" })
|
|
3157
|
-
])
|
|
3158
|
-
], 8, na)
|
|
3159
|
-
]),
|
|
3160
|
-
_: 1
|
|
3161
|
-
}, 16)) : (d(), S(t(ge), It({ key: 0 }, G.$attrs, {
|
|
3162
|
-
"no-spacing": "",
|
|
3163
|
-
class: "relative w-full"
|
|
3164
|
-
}), {
|
|
3165
|
-
default: b(() => [
|
|
3166
|
-
L("button", {
|
|
3167
|
-
ref_key: "toggleRef",
|
|
3168
|
-
ref: u,
|
|
3169
|
-
type: "button",
|
|
3170
|
-
class: "w-full",
|
|
3171
|
-
"aria-expanded": l.value,
|
|
3172
|
-
"aria-controls": P,
|
|
3173
|
-
"aria-label": v.value,
|
|
3174
|
-
onClick: B
|
|
3175
|
-
}, [
|
|
3176
|
-
L("div", ea, [
|
|
3177
|
-
L("div", ta, [
|
|
3178
|
-
_(t(Re), { icon: "local_activity" }),
|
|
3179
|
-
_(t(se), {
|
|
3180
|
-
id: h,
|
|
3181
|
-
variant: "body-sm"
|
|
3182
|
-
}, {
|
|
3183
|
-
default: b(() => [
|
|
3184
|
-
Q($(t(n)({
|
|
3185
|
-
defaultMessage: "Add promotion code",
|
|
3186
|
-
id: "checkout.promotion_code.add_label",
|
|
3187
|
-
description: "Label for adding a promotion code in checkout"
|
|
3188
|
-
})), 1)
|
|
3189
|
-
]),
|
|
3190
|
-
_: 1
|
|
3191
|
-
})
|
|
3192
|
-
]),
|
|
3193
|
-
_(t(Re), {
|
|
3194
|
-
icon: l.value ? "remove" : "add"
|
|
3195
|
-
}, null, 8, ["icon"])
|
|
3196
|
-
])
|
|
3197
|
-
], 8, Jo),
|
|
3198
|
-
di(L("div", {
|
|
3199
|
-
id: P,
|
|
3200
|
-
ref_key: "panelRef",
|
|
3201
|
-
ref: I,
|
|
3202
|
-
role: "region",
|
|
3203
|
-
"aria-labelledby": h,
|
|
3204
|
-
class: "flex w-full flex-row items-center gap-2 overflow-hidden border-t px-3 py-2",
|
|
3205
|
-
onKeydown: At(Ue(p, ["prevent"]), ["esc"])
|
|
3206
|
-
}, [
|
|
3207
|
-
_(t(ye), {
|
|
3208
|
-
modelValue: c.value,
|
|
3209
|
-
"onUpdate:modelValue": s[0] || (s[0] = (r) => c.value = r),
|
|
3210
|
-
placeholder: t(n)({
|
|
3211
|
-
defaultMessage: "Promotion code",
|
|
3212
|
-
id: "checkout.promotion_code.placeholder",
|
|
3213
|
-
description: "Placeholder for promotion code input in checkout"
|
|
3214
|
-
}),
|
|
3215
|
-
"aria-label": t(n)({
|
|
3216
|
-
defaultMessage: "Promotion code",
|
|
3217
|
-
id: "checkout.promotion_code.input_aria_label",
|
|
3218
|
-
description: "Aria label for promotion code input in checkout"
|
|
3219
|
-
}),
|
|
3220
|
-
class: "w-full",
|
|
3221
|
-
onKeydown: At(Ue(T, ["prevent"]), ["enter"])
|
|
3222
|
-
}, null, 8, ["modelValue", "placeholder", "aria-label", "onKeydown"]),
|
|
3223
|
-
_(t(Pe), {
|
|
3224
|
-
type: "button",
|
|
3225
|
-
disabled: !x.value,
|
|
3226
|
-
"aria-label": N.value,
|
|
3227
|
-
"aria-disabled": !x.value,
|
|
3228
|
-
onClick: T
|
|
3229
|
-
}, {
|
|
3230
|
-
default: b(() => [
|
|
3231
|
-
Q($(t(n)({
|
|
3232
|
-
defaultMessage: "Apply",
|
|
3233
|
-
id: "checkout.promotion_code.apply_button",
|
|
3234
|
-
description: "Button label for applying a promotion code in checkout"
|
|
3235
|
-
})), 1)
|
|
3236
|
-
]),
|
|
3237
|
-
_: 1
|
|
3238
|
-
}, 8, ["disabled", "aria-label", "aria-disabled"])
|
|
3239
|
-
], 40, ia), [
|
|
3240
|
-
[pi, l.value]
|
|
3241
|
-
])
|
|
3242
|
-
]),
|
|
3243
|
-
_: 1
|
|
3244
|
-
}, 16)),
|
|
3245
|
-
L("span", ra, $(g.value), 1)
|
|
3246
|
-
], 64));
|
|
3247
|
-
}
|
|
3248
|
-
}), sa = { class: "sv-checkout__header" }, ca = { class: "sv-checkout__payment-methods" }, ua = {
|
|
3249
|
-
key: 0,
|
|
3250
|
-
class: "sv-checkout__payment-methods-body"
|
|
3251
|
-
}, da = {
|
|
3252
|
-
key: 3,
|
|
3253
|
-
class: "sv-checkout__payment-form"
|
|
3254
|
-
}, pa = { class: "sv-checkout__order-summary" }, ma = { class: "flex flex-col gap-2" }, ga = /* @__PURE__ */ ce({
|
|
3255
|
-
__name: "Checkout",
|
|
3256
|
-
props: {
|
|
3257
|
-
configuration: { type: Object }
|
|
3258
|
-
},
|
|
3259
|
-
emits: ["error", "ready"],
|
|
3260
|
-
setup(e, { emit: i }) {
|
|
3261
|
-
var st, ct, ut, dt, pt, mt, gt, yt, vt, ft, _t, ht;
|
|
3262
|
-
const n = Pt(
|
|
3263
|
-
() => import("./PaymentIntegrationForm-DL55i0HD.mjs")
|
|
3264
|
-
), o = Pt(
|
|
3265
|
-
() => import("./PlanCustomizationEditor-NLVkEYFF.mjs")
|
|
3266
|
-
), a = e, l = i, c = M(() => a.configuration), g = Y(), u = Y(), I = Me(), { $t: y, locale: h } = ve(), { formatTimePeriod: P } = jt(), m = Ui(), { isMobileViewport: x } = Bt();
|
|
3267
|
-
if (I.info("COMPONENT_INITIALIZED", "Checkout component initialized"), ((st = m.value) == null ? void 0 : st.type) !== "INIT_PRICING_PLAN_SUBSCRIPTION")
|
|
3268
|
-
throw I.error("INVALID_TOKEN", "Invalid token"), Error("Invalid token");
|
|
3269
|
-
m.value.status === "REVOKED" && (g.value = {
|
|
3270
|
-
code: "RESOURCE_REVOKED",
|
|
3271
|
-
message: `Portal url with resource id "${m.value.id}" is revoked`
|
|
3272
|
-
}, I.error("RESOURCE_REVOKED", `Portal url with resource id "${m.value.id}" is revoked`));
|
|
3273
|
-
const k = (ut = (ct = m.value) == null ? void 0 : ct.init_pricing_plan_subscription) == null ? void 0 : ut.pricing_plan_subscription_id, v = (pt = (dt = m.value) == null ? void 0 : dt.init_pricing_plan_subscription) == null ? void 0 : pt.success_url, N = ((yt = (gt = (mt = m.value) == null ? void 0 : mt.init_pricing_plan_subscription) == null ? void 0 : gt.note) == null ? void 0 : yt.trim()) || void 0, {
|
|
3274
|
-
validatedEmail: E,
|
|
3275
|
-
validatedCountry: V,
|
|
3276
|
-
paymentMethodOptions: F,
|
|
3277
|
-
hasPaymentMethodOptionsError: p,
|
|
3278
|
-
retryPaymentMethodOptions: B,
|
|
3279
|
-
subscription: T,
|
|
3280
|
-
isPaymentMethodsPending: q,
|
|
3281
|
-
isInvoicePreviewPending: G,
|
|
3282
|
-
checkoutForm: s,
|
|
3283
|
-
invoicePreview: r,
|
|
3284
|
-
invoicePreviewByBillingPeriod: A,
|
|
3285
|
-
trialInvoicePreview: f,
|
|
3286
|
-
trialPeriod: C,
|
|
3287
|
-
authorizationContext: R,
|
|
3288
|
-
isPaid: K,
|
|
3289
|
-
amount: H,
|
|
3290
|
-
loadInvoicePreview: Z,
|
|
3291
|
-
updateInvoicePreviewOnBillingInformationChange: oe,
|
|
3292
|
-
saveFormStateForRedirect: te
|
|
3293
|
-
} = Bn({
|
|
3294
|
-
initialCountry: (vt = a.configuration) == null ? void 0 : vt.countryCode,
|
|
3295
|
-
initialEmail: (ft = a.configuration) == null ? void 0 : ft.email,
|
|
3296
|
-
subscriptionId: k,
|
|
3297
|
-
enabledPricingIds: (_t = a.configuration) == null ? void 0 : _t.enabledPricingIds
|
|
3298
|
-
}), ie = Y(!1), ae = async () => {
|
|
3299
|
-
var D;
|
|
3300
|
-
await s.validation.value.$validate(), !s.validation.value.$invalid && (ie.value = !0, te(), (D = u.value) == null || D.submit());
|
|
3301
|
-
}, U = () => {
|
|
3302
|
-
ie.value = !1;
|
|
3303
|
-
}, ne = async () => (await s.validation.value.$validate(), !s.validation.value.$invalid), ee = M(() => !!f.value), J = M(
|
|
3304
|
-
() => r.value ? ro(r.value) : !1
|
|
3305
|
-
), re = M(
|
|
3306
|
-
() => s.form.value.country && ["US", "CA"].includes(s.form.value.country) || !1
|
|
3307
|
-
), ue = M({
|
|
3308
|
-
get: () => s.form.value.enabledPricingIds ?? [],
|
|
3309
|
-
set: (D) => {
|
|
3310
|
-
s.form.value.enabledPricingIds = D;
|
|
3311
|
-
}
|
|
3312
|
-
}), de = M(
|
|
3313
|
-
() => T.value ? Ee({
|
|
3314
|
-
pricingPlanScheduleInfos: T.value.pricing_plan_schedule_infos,
|
|
3315
|
-
type: "DEFAULT"
|
|
3316
|
-
}) : void 0
|
|
3317
|
-
), fe = M(() => {
|
|
3318
|
-
var w, O;
|
|
3319
|
-
if (!T.value)
|
|
3320
|
-
return;
|
|
3321
|
-
const D = (O = (w = de.value) == null ? void 0 : w.pricing_plan_version) == null ? void 0 : O.pricing_currency_settings;
|
|
3322
|
-
return Ht({
|
|
3323
|
-
country: s.form.value.country,
|
|
3324
|
-
pricingCurrencySettings: D,
|
|
3325
|
-
fallbackCurrency: T.value.billing_currency
|
|
3326
|
-
});
|
|
3327
|
-
}), Ie = M(() => {
|
|
3328
|
-
if (!de.value || !T.value)
|
|
3329
|
-
return /* @__PURE__ */ new Set();
|
|
3330
|
-
const D = Ai({
|
|
3331
|
-
pricingPlanScheduleInfo: de.value
|
|
3332
|
-
}), w = fe.value, O = T.value.billing_period, W = /* @__PURE__ */ new Set();
|
|
3333
|
-
return D.forEach((X, pe) => {
|
|
3334
|
-
w && X.currency !== w || O && X.billingPeriod && (X.billingPeriod.type !== O.type || X.billingPeriod.value !== O.value) || W.add(pe);
|
|
3335
|
-
}), W;
|
|
3336
|
-
}), Ce = M({
|
|
3337
|
-
get: () => {
|
|
3338
|
-
const D = s.form.value.seatsValues ?? [], w = Ie.value;
|
|
3339
|
-
return w.size ? D.filter(({ pricing_item_config_id: O }) => w.has(O)) : D;
|
|
3340
|
-
},
|
|
3341
|
-
set: (D) => {
|
|
3342
|
-
const w = s.form.value.seatsValues ?? [], O = Ie.value;
|
|
3343
|
-
if (!O.size) {
|
|
3344
|
-
s.form.value.seatsValues = D;
|
|
3345
|
-
return;
|
|
3346
|
-
}
|
|
3347
|
-
const W = w.filter(
|
|
3348
|
-
({ pricing_item_config_id: X }) => !O.has(X)
|
|
3349
|
-
);
|
|
3350
|
-
s.form.value.seatsValues = W.concat(D);
|
|
3351
|
-
}
|
|
3352
|
-
}), xe = M({
|
|
3353
|
-
get: () => {
|
|
3354
|
-
const D = s.form.value.unitsValues ?? [], w = Ie.value;
|
|
3355
|
-
return w.size ? D.filter(({ pricing_item_config_id: O }) => w.has(O)) : D;
|
|
3356
|
-
},
|
|
3357
|
-
set: (D) => {
|
|
3358
|
-
const w = s.form.value.unitsValues ?? [], O = Ie.value;
|
|
3359
|
-
if (!O.size) {
|
|
3360
|
-
s.form.value.unitsValues = D;
|
|
3361
|
-
return;
|
|
3362
|
-
}
|
|
3363
|
-
const W = w.filter(
|
|
3364
|
-
({ pricing_item_config_id: X }) => !O.has(X)
|
|
3365
|
-
);
|
|
3366
|
-
s.form.value.unitsValues = W.concat(D);
|
|
3367
|
-
}
|
|
3368
|
-
}), ze = M(() => {
|
|
3369
|
-
var D, w, O, W, X;
|
|
3370
|
-
return f.value ? y(
|
|
3371
|
-
{
|
|
3372
|
-
defaultMessage: "{discounted_amount} for {trial_period}, then {subscription_amount}/{billing_period} until canceled, starting {start_date, date, ::MMMMd}.",
|
|
3373
|
-
id: "checkout.agreement.trial",
|
|
3374
|
-
description: "The agreement for the trial period"
|
|
3375
|
-
},
|
|
3376
|
-
{
|
|
3377
|
-
discounted_amount: f.value.tax_summary.total_amount.quantity === "0.00" ? y({
|
|
3378
|
-
defaultMessage: "Free",
|
|
3379
|
-
id: "checkout.agreement.trial.free",
|
|
3380
|
-
description: "The free amount for the trial period"
|
|
3381
|
-
}) : Ae(f.value.tax_summary.total_amount),
|
|
3382
|
-
trial_period: P(C.value, { short: !0 }),
|
|
3383
|
-
subscription_amount: Ae(
|
|
3384
|
-
((D = r.value) == null ? void 0 : D.tax_summary.total_amount) ?? {
|
|
3385
|
-
quantity: "0.00",
|
|
3386
|
-
currency: "EUR"
|
|
3387
|
-
}
|
|
3388
|
-
),
|
|
3389
|
-
billing_period: P(
|
|
3390
|
-
((w = r.value) == null ? void 0 : w.billing_period) ?? { type: "MONTH", value: 1 },
|
|
3391
|
-
{ short: !0, singular: !0, hideValueForExactPeriods: !0 }
|
|
3392
|
-
),
|
|
3393
|
-
// @ts-expect-error formatjs does not support this type yet
|
|
3394
|
-
start_date: new Date(De.value)
|
|
3395
|
-
}
|
|
3396
|
-
) : y(
|
|
3397
|
-
{
|
|
3398
|
-
defaultMessage: "{subscription_amount}/{billing_period} until canceled, starting {start_date, date, long}.",
|
|
3399
|
-
id: "checkout.agreement.subscription",
|
|
3400
|
-
description: "The agreement for the subscription"
|
|
3401
|
-
},
|
|
3402
|
-
{
|
|
3403
|
-
subscription_amount: (O = r.value) != null && O.tax_summary.total_amount ? Ae((W = r.value) == null ? void 0 : W.tax_summary.total_amount) : "",
|
|
3404
|
-
billing_period: P(
|
|
3405
|
-
((X = r.value) == null ? void 0 : X.billing_period) ?? { type: "MONTH", value: 1 },
|
|
3406
|
-
{ short: !0, singular: !0, hideValueForExactPeriods: !0 }
|
|
3407
|
-
),
|
|
3408
|
-
// @ts-expect-error formatjs does not support this type yet
|
|
3409
|
-
start_date: new Date(De.value)
|
|
3410
|
-
}
|
|
3411
|
-
);
|
|
3412
|
-
}), le = M(() => {
|
|
3413
|
-
var w;
|
|
3414
|
-
if (!r.value)
|
|
3415
|
-
return;
|
|
3416
|
-
const D = Si({
|
|
3417
|
-
subscription: T.value,
|
|
3418
|
-
fallback: y({
|
|
3419
|
-
defaultMessage: "Subscription",
|
|
3420
|
-
description: "The fallback name for when no subscription name can be determined",
|
|
3421
|
-
id: "customer_overview.subscriptions_block.fallback_subscription_name"
|
|
3422
|
-
})
|
|
3423
|
-
});
|
|
3424
|
-
return {
|
|
3425
|
-
description: D,
|
|
3426
|
-
managementURL: "https://www.solvimon.com/account/billing",
|
|
3427
|
-
agreement: ze.value,
|
|
3428
|
-
...f.value && C.value && {
|
|
3429
|
-
trial: {
|
|
3430
|
-
label: y({
|
|
3431
|
-
defaultMessage: "Trial",
|
|
3432
|
-
id: "checkout.trial.label",
|
|
3433
|
-
description: "The label of the trial"
|
|
3434
|
-
}),
|
|
3435
|
-
amount: f.value.tax_summary.total_amount,
|
|
3436
|
-
startDate: He.value ? new Date(He.value) : void 0,
|
|
3437
|
-
endDate: ot.value ? new Date(ot.value) : void 0
|
|
3438
|
-
}
|
|
3439
|
-
},
|
|
3440
|
-
regular: {
|
|
3441
|
-
label: D,
|
|
3442
|
-
amount: r.value.tax_summary.total_amount,
|
|
3443
|
-
startDate: De.value ? new Date(De.value) : void 0,
|
|
3444
|
-
interval: ((w = T.value) == null ? void 0 : w.billing_period) ?? { type: "MONTH", value: 1 }
|
|
3445
|
-
}
|
|
3446
|
-
};
|
|
3447
|
-
}), Jt = (D) => Ke(D), ei = (D) => {
|
|
3448
|
-
const { country: w, ...O } = D;
|
|
3449
|
-
s.updateInitialState({
|
|
3450
|
-
...O,
|
|
3451
|
-
...w && Jt(w) ? { country: w } : {}
|
|
3452
|
-
});
|
|
3453
|
-
}, ti = M(() => !(E && V)), He = M(() => {
|
|
3454
|
-
var O, W, X;
|
|
3455
|
-
const D = (W = (O = f.value) == null ? void 0 : O.periods) == null ? void 0 : W[0], w = (X = Qe.value) == null ? void 0 : X.trialStartDate;
|
|
3456
|
-
return D != null && D.start_at ? new Date(D.start_at) : w;
|
|
3457
|
-
}), Qe = M(() => ki(T.value)), ot = M(() => {
|
|
3458
|
-
var O, W, X;
|
|
3459
|
-
const D = (W = (O = f.value) == null ? void 0 : O.periods) == null ? void 0 : W[0], w = (X = Qe.value) == null ? void 0 : X.trialEndDate;
|
|
3460
|
-
return D != null && D.end_at ? new Date(D.end_at) : w;
|
|
3461
|
-
}), De = M(() => {
|
|
3462
|
-
var O, W, X;
|
|
3463
|
-
const D = (W = (O = r.value) == null ? void 0 : O.periods) == null ? void 0 : W[0], w = (X = Qe.value) == null ? void 0 : X.subscriptionStartDate;
|
|
3464
|
-
return D != null && D.start_at ? new Date(D.start_at) : w;
|
|
3465
|
-
}), ii = M(() => !!(s.form.value.seatsValues && s.form.value.seatsValues.length > 0 || s.form.value.unitsValues && s.form.value.unitsValues.length > 0 || T.value && wn(T.value) || T.value && Sn(T.value))), Le = Y(null), {
|
|
3466
|
-
applyPromotionCode: at,
|
|
3467
|
-
removePromotionCode: ni,
|
|
3468
|
-
isPromotionCodePending: oi,
|
|
3469
|
-
promotionCodeErrorMessage: Ze
|
|
3470
|
-
} = Un({
|
|
3471
|
-
checkoutForm: s,
|
|
3472
|
-
updateInvoicePreviewOnBillingInformationChange: oe,
|
|
3473
|
-
formatErrorMessage: ({ action: D }) => y(D === "apply" ? {
|
|
3474
|
-
defaultMessage: "Promotion code could not be applied. Please try again.",
|
|
3475
|
-
id: "checkout.promotion_code.apply_failed",
|
|
3476
|
-
description: "Error message when applying a promotion code in checkout failed"
|
|
3477
|
-
} : {
|
|
3478
|
-
defaultMessage: "Promotion code could not be removed. Please try again.",
|
|
3479
|
-
id: "checkout.promotion_code.remove_failed",
|
|
3480
|
-
description: "Error message when removing a promotion code in checkout failed"
|
|
3481
|
-
}),
|
|
3482
|
-
onInvalidPromotionCode: () => {
|
|
3483
|
-
Le.value = null;
|
|
3484
|
-
},
|
|
3485
|
-
onApplyError: () => {
|
|
3486
|
-
Le.value = null;
|
|
3487
|
-
}
|
|
3488
|
-
});
|
|
3489
|
-
Fn({
|
|
3490
|
-
subscription: T,
|
|
3491
|
-
promotionCode: (ht = a.configuration) == null ? void 0 : ht.couponCode,
|
|
3492
|
-
appliedPromotionCode: Le,
|
|
3493
|
-
applyPromotionCode: at
|
|
3494
|
-
});
|
|
3495
|
-
const rt = () => {
|
|
3496
|
-
v && ji(v);
|
|
3497
|
-
}, ai = M(
|
|
3498
|
-
() => {
|
|
3499
|
-
var D;
|
|
3500
|
-
return !((D = a.configuration) != null && D.onPaymentSuccess) && !!v;
|
|
3501
|
-
}
|
|
3502
|
-
), ri = () => {
|
|
3503
|
-
var D;
|
|
3504
|
-
if (K.value = !0, Ze.value = null, (D = a.configuration) != null && D.onPaymentSuccess) {
|
|
3505
|
-
a.configuration.onPaymentSuccess();
|
|
3506
|
-
return;
|
|
3507
|
-
}
|
|
3508
|
-
if (v) {
|
|
3509
|
-
rt();
|
|
3510
|
-
return;
|
|
3511
|
-
}
|
|
3512
|
-
}, lt = (D) => {
|
|
3513
|
-
T.value && (T.value = {
|
|
3514
|
-
...T.value,
|
|
3515
|
-
billing_period: D
|
|
3516
|
-
}, Z());
|
|
3517
|
-
};
|
|
3518
|
-
return Oe(() => {
|
|
3519
|
-
l("ready");
|
|
3520
|
-
}), (D, w) => g.value ? (d(), S(co, {
|
|
3521
|
-
key: 0,
|
|
3522
|
-
class: "sv-checkout sv-root sv-screen sv-checkout--error"
|
|
3523
|
-
})) : (d(), S(t(an), {
|
|
3524
|
-
key: 1,
|
|
3525
|
-
class: he(["sv-checkout sv-root sv-screen", { "sv-checkout--paid": t(K) }])
|
|
3526
|
-
}, Fe({
|
|
3527
|
-
header: b(() => [
|
|
3528
|
-
L("div", sa, [
|
|
3529
|
-
_(_e, { class: "min-h-[52px] w-96" }, {
|
|
3530
|
-
default: b(() => {
|
|
3531
|
-
var O, W, X;
|
|
3532
|
-
return [
|
|
3533
|
-
t(r) && t(T) && De.value ? (d(), S(ao, {
|
|
3534
|
-
key: 0,
|
|
3535
|
-
class: "sv-checkout__title",
|
|
3536
|
-
"trial-start-date": He.value,
|
|
3537
|
-
"trial-period": t(C),
|
|
3538
|
-
"subscription-start-date": De.value,
|
|
3539
|
-
"subscription-name": ((O = t(T)) == null ? void 0 : O.name) ?? "",
|
|
3540
|
-
amount: (W = t(r)) == null ? void 0 : W.invoice_amount_including_tax,
|
|
3541
|
-
"billing-period": (X = t(T)) == null ? void 0 : X.billing_period,
|
|
3542
|
-
"country-code": t(s).form.value.country
|
|
3543
|
-
}, null, 8, ["trial-start-date", "trial-period", "subscription-start-date", "subscription-name", "amount", "billing-period", "country-code"])) : j("", !0)
|
|
3544
|
-
];
|
|
3545
|
-
}),
|
|
3546
|
-
_: 1
|
|
3547
|
-
})
|
|
3548
|
-
])
|
|
3549
|
-
]),
|
|
3550
|
-
content: b(() => {
|
|
3551
|
-
var O, W, X;
|
|
3552
|
-
return [
|
|
3553
|
-
t(K) ? (d(), S(uo, {
|
|
3554
|
-
key: 0,
|
|
3555
|
-
class: "sv-checkout__completed-payment",
|
|
3556
|
-
onContinueToMerchant: rt
|
|
3557
|
-
})) : (d(), z(me, { key: 1 }, [
|
|
3558
|
-
t(T) && t(x) ? (d(), S(kt, {
|
|
3559
|
-
key: 0,
|
|
3560
|
-
class: "sv-checkout__mobile-order-summary",
|
|
3561
|
-
subscription: t(T),
|
|
3562
|
-
invoice: t(r),
|
|
3563
|
-
"invoice-preview-by-billing-period": t(A),
|
|
3564
|
-
"trial-invoice": t(f),
|
|
3565
|
-
"enabled-pricing-ids": ue.value,
|
|
3566
|
-
"trial-period": t(C),
|
|
3567
|
-
avatar: (O = c.value) == null ? void 0 : O.avatar,
|
|
3568
|
-
"is-paid": t(K),
|
|
3569
|
-
"is-usage-based": J.value,
|
|
3570
|
-
"is-preview-and-payment-methods-pending": t(q) || t(G),
|
|
3571
|
-
"country-code": t(s).form.value.country,
|
|
3572
|
-
collapsible: "collapsed",
|
|
3573
|
-
variant: "products-inline",
|
|
3574
|
-
onBillingPeriodChange: lt
|
|
3575
|
-
}, null, 8, ["subscription", "invoice", "invoice-preview-by-billing-period", "trial-invoice", "enabled-pricing-ids", "trial-period", "avatar", "is-paid", "is-usage-based", "is-preview-and-payment-methods-pending", "country-code"])) : j("", !0),
|
|
3576
|
-
ii.value && t(T) ? (d(), S(t(o), {
|
|
3577
|
-
key: 1,
|
|
3578
|
-
"seats-values": Ce.value,
|
|
3579
|
-
"onUpdate:seatsValues": w[0] || (w[0] = (pe) => Ce.value = pe),
|
|
3580
|
-
"units-values": xe.value,
|
|
3581
|
-
"onUpdate:unitsValues": w[1] || (w[1] = (pe) => xe.value = pe),
|
|
3582
|
-
"enabled-pricing-ids": ue.value,
|
|
3583
|
-
"onUpdate:enabledPricingIds": w[2] || (w[2] = (pe) => ue.value = pe),
|
|
3584
|
-
class: "sv-checkout__plan-customization",
|
|
3585
|
-
subscription: t(T),
|
|
3586
|
-
"initial-seats-values": (W = t(s).initialState) == null ? void 0 : W.value.seatsValues,
|
|
3587
|
-
"initial-units-values": (X = t(s).initialState) == null ? void 0 : X.value.unitsValues,
|
|
3588
|
-
"billing-period": t(T).billing_period,
|
|
3589
|
-
currency: fe.value
|
|
3590
|
-
}, null, 8, ["seats-values", "units-values", "enabled-pricing-ids", "subscription", "initial-seats-values", "initial-units-values", "billing-period", "currency"])) : j("", !0),
|
|
3591
|
-
t(s).form.value.country && t(H) && le.value ? (d(), S(qo, {
|
|
3592
|
-
key: 2,
|
|
3593
|
-
class: "sv-checkout__express-payment-methods",
|
|
3594
|
-
amount: t(H),
|
|
3595
|
-
"country-code": t(s).form.value.country,
|
|
3596
|
-
locale: t(h),
|
|
3597
|
-
"payment-methods-options-response": t(F) ?? [],
|
|
3598
|
-
"billing-information": le.value,
|
|
3599
|
-
"on-billing-information-change": t(oe),
|
|
3600
|
-
onUpdateBillingInformation: ei
|
|
3601
|
-
}, null, 8, ["amount", "country-code", "locale", "payment-methods-options-response", "billing-information", "on-billing-information-change"])) : j("", !0),
|
|
3602
|
-
_(to, {
|
|
3603
|
-
modelValue: t(s).form.value,
|
|
3604
|
-
"onUpdate:modelValue": w[3] || (w[3] = (pe) => t(s).form.value = pe),
|
|
3605
|
-
class: "sv-checkout__customer-form",
|
|
3606
|
-
validation: t(s).validation,
|
|
3607
|
-
"read-only-email": t(E),
|
|
3608
|
-
"show-customer-info-on-top": ti.value || t(K),
|
|
3609
|
-
"is-billing-information-mandatory": re.value,
|
|
3610
|
-
"get-is-field-required": t(s).getIsFieldRequired,
|
|
3611
|
-
"read-only": t(K)
|
|
3612
|
-
}, null, 8, ["modelValue", "validation", "read-only-email", "show-customer-info-on-top", "is-billing-information-mandatory", "get-is-field-required", "read-only"]),
|
|
3613
|
-
L("div", ca, [
|
|
3614
|
-
_(_e, {
|
|
3615
|
-
variant: "section",
|
|
3616
|
-
class: "min-h-[130px]"
|
|
3617
|
-
}, {
|
|
3618
|
-
default: b(() => {
|
|
3619
|
-
var pe, Mt;
|
|
3620
|
-
return [
|
|
3621
|
-
!t(q) || t(q) && t(F).length > 0 ? (d(), z("div", ua, [
|
|
3622
|
-
_(t(se), {
|
|
3623
|
-
variant: "heading-3",
|
|
3624
|
-
tag: "h2",
|
|
3625
|
-
class: "sv-checkout__payment-methods-title mb-2"
|
|
3626
|
-
}, {
|
|
3627
|
-
default: b(() => [
|
|
3628
|
-
Q($(t(y)({
|
|
3629
|
-
defaultMessage: "Payment method",
|
|
3630
|
-
id: "checkout.payment_method_block.title",
|
|
3631
|
-
description: "The title of the payment method block in the checkout form"
|
|
3632
|
-
})), 1)
|
|
3633
|
-
]),
|
|
3634
|
-
_: 1
|
|
3635
|
-
}),
|
|
3636
|
-
t(s).form.value.country ? t(p) ? (d(), S(We, {
|
|
3637
|
-
key: 1,
|
|
3638
|
-
class: "sv-checkout__payment-methods-error",
|
|
3639
|
-
icon: "error"
|
|
3640
|
-
}, {
|
|
3641
|
-
title: b(() => [
|
|
3642
|
-
Q($(t(y)({
|
|
3643
|
-
defaultMessage: "Could not load payment methods",
|
|
3644
|
-
id: "checkout.payment_method_block.load_failed_title",
|
|
3645
|
-
description: "The title shown when the payment methods failed to load"
|
|
3646
|
-
})), 1)
|
|
3647
|
-
]),
|
|
3648
|
-
message: b(() => [
|
|
3649
|
-
Q($(t(y)({
|
|
3650
|
-
defaultMessage: "Check your connection and try again.",
|
|
3651
|
-
id: "checkout.payment_method_block.load_failed_message",
|
|
3652
|
-
description: "The message shown when the payment methods failed to load"
|
|
3653
|
-
})), 1)
|
|
3654
|
-
]),
|
|
3655
|
-
action: b(() => [
|
|
3656
|
-
_(t(Pe), {
|
|
3657
|
-
type: "button",
|
|
3658
|
-
intent: "secondary",
|
|
3659
|
-
size: "sm",
|
|
3660
|
-
class: "sv-action sv-action--secondary sv-checkout__payment-methods-retry",
|
|
3661
|
-
onClick: t(B)
|
|
3662
|
-
}, {
|
|
3663
|
-
default: b(() => [
|
|
3664
|
-
Q($(t(y)({
|
|
3665
|
-
defaultMessage: "Try again",
|
|
3666
|
-
id: "checkout.payment_method_block.load_failed_retry_button.label",
|
|
3667
|
-
description: "The label of the button that loads the payment methods again"
|
|
3668
|
-
})), 1)
|
|
3669
|
-
]),
|
|
3670
|
-
_: 1
|
|
3671
|
-
}, 8, ["onClick"])
|
|
3672
|
-
]),
|
|
3673
|
-
_: 1
|
|
3674
|
-
})) : t(F).length === 0 ? (d(), S(We, {
|
|
3675
|
-
key: 2,
|
|
3676
|
-
class: "sv-checkout__payment-methods-empty",
|
|
3677
|
-
icon: "credit_card_off"
|
|
3678
|
-
}, {
|
|
3679
|
-
title: b(() => [
|
|
3680
|
-
Q($(t(y)({
|
|
3681
|
-
defaultMessage: "No payment methods available",
|
|
3682
|
-
id: "checkout.payment_method_block.no_payment_methods_available_title",
|
|
3683
|
-
description: "The title shown when there are no available payment methods"
|
|
3684
|
-
})), 1)
|
|
3685
|
-
]),
|
|
3686
|
-
_: 1
|
|
3687
|
-
})) : t(H) && t(s).form.value.country ? (d(), z("div", da, [
|
|
3688
|
-
L("div", {
|
|
3689
|
-
class: he({ "pointer-events-none opacity-60": ie.value })
|
|
3690
|
-
}, [
|
|
3691
|
-
_(t(n), {
|
|
3692
|
-
ref_key: "paymentIntegrationFormRef",
|
|
3693
|
-
ref: u,
|
|
3694
|
-
"country-code": t(s).form.value.country,
|
|
3695
|
-
context: t(R),
|
|
3696
|
-
amount: t(H),
|
|
3697
|
-
email: t(s).form.value.email,
|
|
3698
|
-
variant: "AUTHORIZE",
|
|
3699
|
-
"payment-method-options": t(F) ?? [],
|
|
3700
|
-
"validate-on-submit": ne,
|
|
3701
|
-
"redirects-on-success": ai.value,
|
|
3702
|
-
"force-store-payment-method": "",
|
|
3703
|
-
"billing-entity-name": (Mt = (pe = t(T)) == null ? void 0 : pe.billing_entity) == null ? void 0 : Mt.legal_name,
|
|
3704
|
-
onPaymentSuccess: ri,
|
|
3705
|
-
onPaymentFailed: U,
|
|
3706
|
-
onReady: w[4] || (w[4] = (va) => l("ready"))
|
|
3707
|
-
}, null, 8, ["country-code", "context", "amount", "email", "payment-method-options", "redirects-on-success", "billing-entity-name"])
|
|
3708
|
-
], 2)
|
|
3709
|
-
])) : j("", !0) : (d(), S(We, {
|
|
3710
|
-
key: 0,
|
|
3711
|
-
class: "sv-checkout__payment-methods-empty",
|
|
3712
|
-
icon: "captive_portal"
|
|
3713
|
-
}, {
|
|
3714
|
-
title: b(() => [
|
|
3715
|
-
Q($(t(y)({
|
|
3716
|
-
defaultMessage: "Select your billing country",
|
|
3717
|
-
id: "checkout.payment_method_block.no_country_selected_title",
|
|
3718
|
-
description: "The title shown when no country is selected"
|
|
3719
|
-
})), 1)
|
|
3720
|
-
]),
|
|
3721
|
-
message: b(() => [
|
|
3722
|
-
Q($(t(y)({
|
|
3723
|
-
defaultMessage: "Payment methods will be shown after you select the billing country.",
|
|
3724
|
-
id: "checkout.payment_method_block.no_country_selected_message",
|
|
3725
|
-
description: "The message shown when no country is selected"
|
|
3726
|
-
})), 1)
|
|
3727
|
-
]),
|
|
3728
|
-
_: 1
|
|
3729
|
-
}))
|
|
3730
|
-
])) : j("", !0)
|
|
3731
|
-
];
|
|
3732
|
-
}),
|
|
3733
|
-
_: 1
|
|
3734
|
-
})
|
|
3735
|
-
])
|
|
3736
|
-
], 64))
|
|
3737
|
-
];
|
|
3738
|
-
}),
|
|
3739
|
-
aside: b(() => [
|
|
3740
|
-
L("div", pa, [
|
|
3741
|
-
_(_e, {
|
|
3742
|
-
variant: "section",
|
|
3743
|
-
class: "min-h-[220px]"
|
|
3744
|
-
}, {
|
|
3745
|
-
default: b(() => {
|
|
3746
|
-
var O;
|
|
3747
|
-
return [
|
|
3748
|
-
t(T) && t(r) ? (d(), S(kt, {
|
|
3749
|
-
key: 0,
|
|
3750
|
-
subscription: t(T),
|
|
3751
|
-
invoice: t(r),
|
|
3752
|
-
"invoice-preview-by-billing-period": t(A),
|
|
3753
|
-
"trial-invoice": t(f),
|
|
3754
|
-
"enabled-pricing-ids": ue.value,
|
|
3755
|
-
"trial-period": t(C),
|
|
3756
|
-
"country-code": t(s).form.value.country,
|
|
3757
|
-
avatar: (O = c.value) == null ? void 0 : O.avatar,
|
|
3758
|
-
"is-paid": t(K),
|
|
3759
|
-
"is-usage-based": J.value,
|
|
3760
|
-
"is-preview-and-payment-methods-pending": t(q) || t(G),
|
|
3761
|
-
onBillingPeriodChange: lt
|
|
3762
|
-
}, null, 8, ["subscription", "invoice", "invoice-preview-by-billing-period", "trial-invoice", "enabled-pricing-ids", "trial-period", "country-code", "avatar", "is-paid", "is-usage-based", "is-preview-and-payment-methods-pending"])) : j("", !0)
|
|
3763
|
-
];
|
|
3764
|
-
}),
|
|
3765
|
-
_: 1
|
|
3766
|
-
})
|
|
3767
|
-
]),
|
|
3768
|
-
t(K) ? j("", !0) : (d(), z(me, { key: 0 }, [
|
|
3769
|
-
_(la, {
|
|
3770
|
-
class: "sv-checkout__promotion-code",
|
|
3771
|
-
"promotion-code": Le.value,
|
|
3772
|
-
"onUpdate:appliedCode": w[5] || (w[5] = (O) => Le.value = O),
|
|
3773
|
-
onRemove: t(ni),
|
|
3774
|
-
onApply: t(at)
|
|
3775
|
-
}, null, 8, ["promotion-code", "onRemove", "onApply"]),
|
|
3776
|
-
t(Ze) ? (d(), S(t(vi), {
|
|
3777
|
-
key: 0,
|
|
3778
|
-
class: "sv-checkout__promotion-error mt-2",
|
|
3779
|
-
title: t(Ze)
|
|
3780
|
-
}, null, 8, ["title"])) : j("", !0),
|
|
3781
|
-
L("div", ma, [
|
|
3782
|
-
_(_e, { class: "sv-checkout__submit-skeleton min-h-[44px]" }, {
|
|
3783
|
-
default: b(() => [
|
|
3784
|
-
t(r) ? (d(), S(t(Pe), {
|
|
3785
|
-
key: 0,
|
|
3786
|
-
type: "button",
|
|
3787
|
-
size: "lg",
|
|
3788
|
-
class: "sv-action sv-action--primary sv-action--full-width sv-checkout__submit w-full",
|
|
3789
|
-
disabled: t(oi) || t(F).length === 0 || ie.value,
|
|
3790
|
-
loading: ie.value,
|
|
3791
|
-
onClick: ae
|
|
3792
|
-
}, {
|
|
3793
|
-
default: b(() => [
|
|
3794
|
-
Q($(ee.value ? t(y)({
|
|
3795
|
-
defaultMessage: "Start trial",
|
|
3796
|
-
id: "checkout.pay_and_subscribe_button_trial.label",
|
|
3797
|
-
description: "The label of the start trial button in the checkout form"
|
|
3798
|
-
}) : t(y)({
|
|
3799
|
-
defaultMessage: "Pay and subscribe",
|
|
3800
|
-
id: "checkout.pay_and_subscribe_button.label",
|
|
3801
|
-
description: "The label of the pay and subscribe button in the checkout form"
|
|
3802
|
-
})), 1)
|
|
3803
|
-
]),
|
|
3804
|
-
_: 1
|
|
3805
|
-
}, 8, ["disabled", "loading"])) : j("", !0)
|
|
3806
|
-
]),
|
|
3807
|
-
_: 1
|
|
3808
|
-
}),
|
|
3809
|
-
_(Ji, { "payment-method-options": t(F) }, null, 8, ["payment-method-options"])
|
|
3810
|
-
])
|
|
3811
|
-
], 64))
|
|
3812
|
-
]),
|
|
3813
|
-
_: 2
|
|
3814
|
-
}, [
|
|
3815
|
-
t(N) && !t(K) ? {
|
|
3816
|
-
name: "footer",
|
|
3817
|
-
fn: b(() => [
|
|
3818
|
-
_(t(se), {
|
|
3819
|
-
tag: "div",
|
|
3820
|
-
variant: "body-xs",
|
|
3821
|
-
color: "subtle",
|
|
3822
|
-
class: "sv-checkout__terms",
|
|
3823
|
-
"data-testid": "checkout-terms"
|
|
3824
|
-
}, {
|
|
3825
|
-
default: b(() => [
|
|
3826
|
-
_(jo, { source: t(N) }, null, 8, ["source"])
|
|
3827
|
-
]),
|
|
3828
|
-
_: 1
|
|
3829
|
-
})
|
|
3830
|
-
]),
|
|
3831
|
-
key: "0"
|
|
3832
|
-
} : void 0
|
|
3833
|
-
]), 1032, ["class"]));
|
|
3834
|
-
}
|
|
3835
|
-
}), ya = /* @__PURE__ */ ce({
|
|
3836
|
-
__name: "Checkout.entry",
|
|
3837
|
-
props: {
|
|
3838
|
-
environment: { type: String },
|
|
3839
|
-
locale: { type: String },
|
|
3840
|
-
dateLocale: { type: String },
|
|
3841
|
-
messages: { type: Object },
|
|
3842
|
-
primaryColor: { type: String },
|
|
3843
|
-
secondaryColor: { type: String },
|
|
3844
|
-
isShadowRoot: { type: Boolean },
|
|
3845
|
-
experimentalFeatures: { type: Array },
|
|
3846
|
-
logLevel: { type: String },
|
|
3847
|
-
onLog: { type: Function },
|
|
3848
|
-
allowedPortalTypes: { type: Array },
|
|
3849
|
-
portalObject: { type: Object },
|
|
3850
|
-
cssOverrides: { type: [String, Array] },
|
|
3851
|
-
branding: { type: Object },
|
|
3852
|
-
configuration: { type: Object }
|
|
3853
|
-
},
|
|
3854
|
-
emits: ["error", "ready"],
|
|
3855
|
-
setup(e, { emit: i }) {
|
|
3856
|
-
var c;
|
|
3857
|
-
const n = ln("checkout"), o = e, a = i, l = ((c = o.configuration) == null ? void 0 : c.couponCode) ?? Te("coupon_code") ?? void 0;
|
|
3858
|
-
return (g, u) => (d(), S(t(gi), {
|
|
3859
|
-
entry: g.$props,
|
|
3860
|
-
"component-name": t(n),
|
|
3861
|
-
"allowed-portal-types": ["INIT_PRICING_PLAN_SUBSCRIPTION"],
|
|
3862
|
-
onError: u[1] || (u[1] = (I) => g.$emit("error", I))
|
|
3863
|
-
}, {
|
|
3864
|
-
default: b(() => {
|
|
3865
|
-
var I, y, h, P, m;
|
|
3866
|
-
return [
|
|
3867
|
-
_(ga, {
|
|
3868
|
-
configuration: {
|
|
3869
|
-
avatar: (y = (I = e.branding) == null ? void 0 : I.emblem) == null ? void 0 : y.public_url,
|
|
3870
|
-
email: (h = e.configuration) == null ? void 0 : h.email,
|
|
3871
|
-
countryCode: (P = e.configuration) == null ? void 0 : P.countryCode,
|
|
3872
|
-
enabledPricingIds: (m = e.configuration) == null ? void 0 : m.enabledPricingIds,
|
|
3873
|
-
couponCode: t(l)
|
|
3874
|
-
},
|
|
3875
|
-
onReady: u[0] || (u[0] = (x) => a("ready"))
|
|
3876
|
-
}, Fe({ _: 2 }, [
|
|
3877
|
-
g.$slots["terms-and-conditions"] ? {
|
|
3878
|
-
name: "terms-and-conditions",
|
|
3879
|
-
fn: b(() => [
|
|
3880
|
-
Je(g.$slots, "terms-and-conditions")
|
|
3881
|
-
]),
|
|
3882
|
-
key: "0"
|
|
3883
|
-
} : void 0
|
|
3884
|
-
]), 1032, ["configuration"])
|
|
3885
|
-
];
|
|
3886
|
-
}),
|
|
3887
|
-
_: 3
|
|
3888
|
-
}, 8, ["entry", "component-name"]));
|
|
3889
|
-
}
|
|
3890
|
-
}), { define: lr } = yi(
|
|
3891
|
-
ya,
|
|
3892
|
-
"checkout"
|
|
3893
|
-
);
|
|
3894
|
-
export {
|
|
3895
|
-
kn as F,
|
|
3896
|
-
vo as _,
|
|
3897
|
-
jn as a,
|
|
3898
|
-
lr as d,
|
|
3899
|
-
rr as g
|
|
3900
|
-
};
|