@solvimon/solvimon-web 0.1.0-alpha.26 → 0.1.0-alpha.28
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 +138 -27
- package/dist/ApiStatus-CSFKl_ra.mjs +9 -0
- package/dist/{Avatar.vue.es-BqQHvLGA.mjs → Avatar.vue.es-Beg7umjO.mjs} +1 -1
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BFza7Nf9.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-DBGe1PvD.mjs} +17 -19
- package/dist/{Button.vue.es-C32_baQN.mjs → Button.vue.es-rh6mITmN.mjs} +1 -1
- package/dist/{ChargeOnDemandModal-CIiI74ls.mjs → ChargeOnDemandModal-CPjPa_uq.mjs} +233 -253
- package/dist/Checkbox.vue.es-DsyiJ-VY.mjs +50 -0
- package/dist/Checkout.entry.ce-BZ1rYQvt.mjs +5279 -0
- package/dist/{Chip.vue.es-CKCOY5T6.mjs → Chip.vue.es-Cn2R_0mE.mjs} +34 -20
- package/dist/Comparators.vue.es-DQBI3f7m.mjs +103 -0
- package/dist/{ContextMenu.vue.es-Da-lAmTl.mjs → ContextMenu.vue.es-DRxsa7bZ.mjs} +4 -4
- package/dist/{CustomerBillingInformation.vue.es-BxBQt4Q0.mjs → CustomerBillingInformation.vue.es-DQfL5RMR.mjs} +2 -2
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BcTZgshS.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Ct-eYaEN.mjs} +31 -36
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BzTSwo4i.mjs +2921 -0
- package/dist/{DividerText.vue.es-DKl3FnDJ.mjs → DividerText.vue.es-M0XqSz55.mjs} +1 -1
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-Bk4zwyWa.mjs +362 -0
- package/dist/{ErrorNotification.vue.es-rRKgmkzV.mjs → ErrorNotification.vue.es-CKlt4hr2.mjs} +1 -1
- package/dist/{IconButton.vue.es-UlqwNPAX.mjs → IconButton.vue.es-oe4MVBK1.mjs} +2 -2
- package/dist/{IconTitle.vue.es-CK9k69tV.mjs → IconTitle.vue.es-BO6KBS4v.mjs} +3 -3
- package/dist/Input.vue.es-DAlPmtE_.mjs +249 -0
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DUfJl07Y.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CCTl5GWa.mjs} +14 -13
- package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-DMGqj_Uk.mjs +56 -0
- package/dist/{InvoiceSummary.vue.es-DQ4KvTaw.mjs → InvoiceSummary.vue.es-DbNoGfYN.mjs} +9 -9
- package/dist/{Modal.vue.es-B9xMiyn3.mjs → Modal.vue.es-CTNACAst.mjs} +5 -5
- package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-BVzL2PGe.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-DLfAfB_m.mjs} +73 -75
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-nLTPnH4j.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CKm-XYuF.mjs} +3 -3
- package/dist/{PaymentHistoryBlock-DYa99P1M.mjs → PaymentHistoryBlock-BmA8jbMb.mjs} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-D0KnSy0y.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BDMse2lO.mjs} +24 -24
- package/dist/{PaymentIntegrationForm-UWoyZgsR.mjs → PaymentIntegrationForm-D1Xw-xIt.mjs} +1 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CCxw0PCv.mjs +182 -0
- package/dist/{PaymentIntegrationFormAdyen-D4qfNtZ_.mjs → PaymentIntegrationFormAdyen-CfT5aD4L.mjs} +395 -297
- package/dist/PaymentIntegrationFormStripe-DKXJ-mjd.mjs +743 -0
- package/dist/{PaymentMethod.vue.es-CKu5nApX.mjs → PaymentMethod.vue.es-Cauxx4Xr.mjs} +3 -3
- package/dist/{PaymentMethodForm-B05sHWcW.mjs → PaymentMethodForm-CypZOYUZ.mjs} +1 -1
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-D1yIYsb_.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-De8FgdYD.mjs} +65 -75
- package/dist/PaymentMethodSelector.vue_vue_type_script_setup_true_lang-Dw28tfpD.mjs +168 -0
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-DGpXRtp4.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-OtjVO7lR.mjs} +13 -8
- package/dist/PlanCustomizationEditor-Xtww2r9K.mjs +711 -0
- package/dist/PortalNotAvailable-B_59GUwN.mjs +25 -0
- package/dist/{PricingGroupRangeInput.vue.es-CJpvUP3-.mjs → PricingGroupRangeInput.vue.es-C9LJW3b8.mjs} +5 -5
- package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DJ81eUJX.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DdWxoB8q.mjs} +30 -30
- package/dist/{RadioGroupExtended.vue.es-BalV7gwp.mjs → RadioGroupExtended.vue.es-UtKsdmiv.mjs} +2 -2
- package/dist/{Section.vue.es-D7eiXUbk.mjs → Section.vue.es-iS8hVGWA.mjs} +1 -1
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DudMRVka.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Djc1SkEU.mjs} +13 -12
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D7MFjvrP.mjs +32 -0
- package/dist/{StepInput.vue.es-C3Zm6Wc9.mjs → StepInput.vue.es-Dpan1RQd.mjs} +5 -4
- package/dist/{SubscriptionDetails.entry.ce-WEimiOex.mjs → SubscriptionDetails.entry.ce-DufQX3uI.mjs} +451 -468
- package/dist/{SubscriptionSchedules-DrrEAPlx.mjs → SubscriptionSchedules-DAahcNoI.mjs} +1 -1
- package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DHp_KtbF.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DNr1CqVj.mjs} +750 -763
- package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-Wmjqy7RZ.mjs +203 -0
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DFU0IULg.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BeRLuEyR.mjs} +124 -90
- package/dist/{TooltipParagraph.vue.es-BXbOJmjr.mjs → TooltipParagraph.vue.es-BjCn2BF6.mjs} +1 -1
- package/dist/{TrialChip.vue.es-C_yRujip.mjs → TrialChip.vue.es-B-XBSHWE.mjs} +2 -2
- package/dist/addressFormats.data-dzBx49dw.mjs +278 -0
- package/dist/amount-CondixVt.mjs +36 -0
- package/dist/{cn.es-CGa6b2Lt.mjs → cn.es-2bVdkiFV.mjs} +87 -83
- package/dist/{comparators.es-D8WGL-c4.mjs → comparators.es-C8rHpb70.mjs} +17 -13
- package/dist/components/BillingInformation/BillingInformation.mjs +7 -8
- package/dist/components/BillingInformationForm/BillingInformationForm.mjs +394 -350
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +16 -17
- package/dist/components/Invoice/Invoice.mjs +206 -209
- package/dist/components/InvoiceDetails/InvoiceDetails.mjs +64 -63
- package/dist/components/InvoiceHeader/InvoiceHeader.mjs +40 -41
- package/dist/components/InvoicesList/InvoicesList.mjs +14 -14
- package/dist/components/PaymentHistory/PaymentHistory.mjs +70 -65
- package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +31 -31
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +47 -45
- package/dist/components/SubscriptionsList/SubscriptionsList.mjs +50 -36
- package/dist/components/WalletBalances/WalletBalances.mjs +9 -10
- package/dist/core/index.mjs +61 -95
- package/dist/customElements-Di3zwlEU.mjs +6447 -0
- package/dist/customer-CqddTiOr.mjs +31 -0
- package/dist/{de-DE-jkW2dJrX.mjs → de-DE-BNMj3boy.mjs} +16 -10
- package/dist/{de-DE-CLfzTbbX.mjs → de-DE-BW8dMvhW.mjs} +87 -19
- package/dist/formControl-CsITfsBk.mjs +749 -0
- package/dist/index.mjs +2 -2
- package/dist/invoiceState-BJVHaKs7.mjs +14 -0
- package/dist/{invoices-DJTwftJv.mjs → invoices-Cf1qDAv4.mjs} +40 -35
- package/dist/{it-IT-Cym1UvvK.mjs → it-IT-Byg06KWc.mjs} +87 -19
- package/dist/{it-IT-CaaFToGB.mjs → it-IT-DRvuxM1F.mjs} +9 -3
- package/dist/{nl-NL-D0MQKaql.mjs → nl-NL-DLUwWbMG.mjs} +12 -6
- package/dist/{nl-NL-D0c4x5C0.mjs → nl-NL-x3zQqzZ7.mjs} +93 -25
- package/dist/paymentMethods-BUuOmDq9.mjs +77 -0
- package/dist/paymentOutcome-D17VD4MV.mjs +67 -0
- package/dist/payments-Ci8bF4C6.mjs +45 -0
- package/dist/pricingItemConfigs.es-D3pX_9AJ.mjs +78 -0
- package/dist/pricingPlanScheduleOverrides-COr9F8DO.mjs +233 -0
- package/dist/pricingPlanSchedules-BK_o9p6h.mjs +38 -0
- package/dist/sanitization.es-C6dbuxUJ.mjs +4 -0
- package/dist/screens/Checkout/Checkout.mjs +2 -2
- package/dist/screens/CustomerOverview/CustomerOverview.mjs +98 -91
- package/dist/screens/PayInvoice/PayInvoice.mjs +181 -210
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +98 -86
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +2 -2
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +363 -334
- package/dist/sessionReference-B8Dbmx5t.mjs +38 -0
- package/dist/sorting.es-qtEN8J8T.mjs +77 -0
- package/dist/subscription-BhxoqwcT.mjs +83 -0
- package/dist/subscriptions-CwogJODR.mjs +54 -0
- package/dist/types/components/InvoiceTable/InvoiceTable.types.d.ts +2 -0
- package/dist/types/components/checkout/CheckoutTitle.types.d.ts +10 -0
- package/dist/types/components/checkout/PromotionCodeSection.types.d.ts +2 -0
- package/dist/types/components/customer/CheckoutForm/CheckoutAddressFields.types.d.ts +20 -0
- package/dist/types/components/customer/CheckoutForm/CheckoutForm.types.d.ts +15 -0
- package/dist/types/components/customer/CustomerPaymentMethodsBlock/CustomerPaymentMethodsBlock.types.d.ts +0 -2
- 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/payments/OnDemandPaymentModalShell/OnDemandPaymentModalShell.types.d.ts +0 -1
- package/dist/types/components/payments/PaymentCompletedCard/PaymentCompletedCard.types.d.ts +0 -2
- package/dist/types/components/payments/PaymentErrorCard/PaymentErrorCard.types.d.ts +9 -2
- package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +36 -4
- package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripeFrame.types.d.ts +7 -0
- package/dist/types/components/payments/PaymentMethodSelector/PaymentMethodSelector.types.d.ts +0 -4
- package/dist/types/components/providers/AuthProvider/AuthProvider.lib.d.ts +9 -4
- package/dist/types/components/providers/AuthProvider/composables/useAuth.d.ts +1 -3
- package/dist/types/components/providers/ConfigProvider/ConfigProvider.lib.d.ts +2 -4
- package/dist/types/components/providers/CssOverridesProvider/CssOverridesProvider.lib.d.ts +11 -0
- package/dist/types/components/providers/EntryProvider/EntryProvider.lib.d.ts +7 -0
- package/dist/types/components/providers/EntryProvider/EntryProvider.types.d.ts +2 -0
- package/dist/types/components/providers/EntryProvider/EntryProvider.vue.d.ts +3 -1
- package/dist/types/components/providers/ErrorBoundary/ErrorBoundary.vue.d.ts +5 -1
- package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.lib.d.ts +2 -2
- package/dist/types/components/providers/HostElementProvider/HostElementProvider.lib.d.ts +6 -1
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +2 -2
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.vue.d.ts +5 -1
- package/dist/types/components/providers/PortalProvider/PortalProvider.lib.d.ts +10 -7
- package/dist/types/components/providers/PortalProvider/PortalProvider.types.d.ts +1 -1
- package/dist/types/components/providers/PortalProvider/PortalProvider.vue.d.ts +3 -1
- package/dist/types/components/providers/PortalProvider/composables/usePortal.d.ts +2 -2
- package/dist/types/components/providers/Provider/Provider.types.d.ts +1 -1
- package/dist/types/components/providers/Provider/Provider.vue.d.ts +11 -4
- package/dist/types/components/providers/RequiredPropertiesGuard/RequiredPropertiesGuard.vue.d.ts +17 -0
- package/dist/types/components/providers/TranslationProvider/TranslationProvider.lib.d.ts +7 -2
- package/dist/types/components/providers/TranslationProvider/TranslationProvider.types.d.ts +1 -1
- package/dist/types/components/subscriptions/ChargeOnDemandModal/ChargeOnDemandModal.types.d.ts +1 -2
- package/dist/types/components/subscriptions/EnabledPricingsList/EnabledPricingsListItem.types.d.ts +2 -0
- package/dist/types/components/subscriptions/OrderSummary.types.d.ts +1 -10
- package/dist/types/components/subscriptions/SubscriptionCancellationModal/SubscriptionCancellationModal.types.d.ts +5 -1
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementForm.types.d.ts +8 -16
- package/dist/types/components/subscriptions/SubscriptionSummary.types.d.ts +1 -14
- package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsList.types.d.ts +4 -1
- package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsListItem.types.d.ts +1 -2
- package/dist/types/components/wallets/AutoTopUpConfig/AutoTopUpConfig.types.d.ts +0 -3
- package/dist/types/components/wallets/TopUpModal/TopUpModalForm.types.d.ts +3 -1
- package/dist/types/components/wallets/TopUpModal/TopUpModalSuccess.types.d.ts +1 -7
- package/dist/types/public/components/BillingInformation/BillingInformation.entry.ce.d.ts +1 -1
- package/dist/types/public/components/BillingInformation/BillingInformation.types.d.ts +0 -3
- package/dist/types/public/components/BillingInformationForm/BillingInformationForm.entry.ce.d.ts +1 -1
- package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.entry.ce.d.ts +1 -1
- package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.types.d.ts +0 -1
- package/dist/types/public/components/Invoice/Invoice.entry.ce.d.ts +1 -1
- package/dist/types/public/components/Invoice/Invoice.types.d.ts +0 -1
- package/dist/types/public/components/InvoiceDetails/InvoiceDetails.entry.ce.d.ts +1 -1
- package/dist/types/public/components/InvoiceDetails/InvoiceDetails.entry.types.d.ts +3 -2
- package/dist/types/public/components/InvoiceDetails/InvoiceDetails.types.d.ts +0 -2
- package/dist/types/public/components/InvoiceHeader/InvoiceHeader.entry.ce.d.ts +1 -1
- package/dist/types/public/components/InvoiceHeader/InvoiceHeader.types.d.ts +0 -1
- package/dist/types/public/components/InvoicesList/InvoicesList.entry.ce.d.ts +1 -1
- package/dist/types/public/components/InvoicesList/InvoicesList.types.d.ts +2 -0
- package/dist/types/public/components/PaymentHistory/PaymentHistory.entry.ce.d.ts +1 -1
- package/dist/types/public/components/PaymentHistory/PaymentHistory.entry.types.d.ts +3 -2
- package/dist/types/public/components/PaymentHistory/PaymentHistory.types.d.ts +0 -2
- package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.entry.ce.d.ts +1 -1
- package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.entry.ce.d.ts +1 -1
- package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.entry.types.d.ts +3 -2
- package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.types.d.ts +0 -2
- package/dist/types/public/components/SubscriptionsList/SubscriptionsList.entry.ce.d.ts +1 -1
- package/dist/types/public/components/SubscriptionsList/SubscriptionsList.types.d.ts +3 -0
- package/dist/types/public/components/WalletBalances/WalletBalances.entry.ce.d.ts +1 -1
- package/dist/types/public/components/WalletBalances/WalletBalances.entry.types.d.ts +1 -3
- package/dist/types/public/core/action-request.types.d.ts +5 -0
- package/dist/types/public/core/registry.ce.d.ts +3 -3
- package/dist/types/public/core/registry.d.ts +0 -3
- package/dist/types/public/screens/Checkout/Checkout.entry.ce.d.ts +1 -1
- package/dist/types/public/screens/Checkout/Checkout.entry.types.d.ts +0 -7
- package/dist/types/public/screens/Checkout/Checkout.types.d.ts +2 -2
- package/dist/types/public/screens/CustomerOverview/CustomerOverview.entry.ce.d.ts +1 -1
- package/dist/types/public/screens/PayInvoice/PayInvoice.entry.ce.d.ts +1 -1
- package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +2 -0
- package/dist/types/public/screens/PaymentMethodsManagement/PaymentMethodsManagement.entry.ce.d.ts +1 -1
- package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.entry.ce.d.ts +1 -1
- package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.types.d.ts +1 -2
- package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.entry.ce.d.ts +1 -1
- package/dist/types/services/paymentMethods.types.d.ts +2 -10
- package/dist/types/services/requests.types.d.ts +16 -6
- package/dist/types/types/errors.d.ts +3 -2
- package/dist/types/vendor/@adyen/adyen-web/index.d.ts +2 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Payment.d.ts +1 -1
- package/dist/types/vendor/@solvimon/solvimon-types/utils.d.ts +1 -1
- package/dist/types/vendor/@solvimon/solvimon-ui/components/providers/BrandProvider/BrandProvider.types.d.ts +16 -0
- package/dist/types/vendor/@solvimon/solvimon-ui/components/providers/IntlProvider/IntlProvider.types.d.ts +66 -0
- package/dist/types/vendor/@solvimon/solvimon-ui/index.d.ts +2 -0
- package/dist/useActionDispatchProvider-DC_fUykI.mjs +9 -0
- package/dist/{useCustomer-XZKWsolE.mjs → useCustomer-C3kTh7wn.mjs} +2 -2
- package/dist/useCustomerFormLabels-CK7K50nB.mjs +1369 -0
- package/dist/useIncrementalLoading-C_sHmW7d.mjs +60 -0
- package/dist/useInvoiceData-BIh8-h8b.mjs +21 -0
- package/dist/useInvoicesList-Y6p0Pqpy.mjs +674 -0
- package/dist/{useLoadInitialData-CR0kbYw8.mjs → useLoadInitialData-4k_Cyqef.mjs} +1 -1
- package/dist/usePaymentFormHold-FfNc578l.mjs +189 -0
- package/dist/{usePaymentMethodAvailability-ZH-m3B-A.mjs → usePaymentMethodAvailability-CnYTvG15.mjs} +17 -18
- package/dist/usePaymentMethodOptions-1QBcmgUf.mjs +40 -0
- package/dist/{usePaymentMethods-B-OKRyKd.mjs → usePaymentMethods-gvr-rmwE.mjs} +2 -2
- package/dist/{usePayments-CV85OV8V.mjs → usePayments-CykCZPG2.mjs} +7 -7
- package/dist/usePortal-CxzKGhbK.mjs +7 -0
- package/dist/useService-B0OQJmif.mjs +56 -0
- package/dist/{useTimePeriod.es-B22-fno3.mjs → useTimePeriod.es-JkXdHNWr.mjs} +1 -1
- package/dist/useViewport-psZejz_H.mjs +19 -0
- package/package.json +35 -59
- package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DcrLNA_x.mjs +0 -223
- package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DwbIiJBY.js +0 -1
- package/dist/Alert.vue.es-RyK53a2P.js +0 -1
- package/dist/Amount.vue.es-DExaYBqm.js +0 -1
- package/dist/Avatar.vue.es-Bm6MCMAL.js +0 -1
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-0JHnqIpC.js +0 -1
- package/dist/Button.vue.es-qGvnOKnK.js +0 -1
- package/dist/ChargeOnDemandModal-DIQaGnRs.js +0 -1
- package/dist/Checkout.entry.ce-8EcavNgT.js +0 -2
- package/dist/Checkout.entry.ce-BA5ljKj8.mjs +0 -3924
- package/dist/Chip.vue.es-D60gTbfe.js +0 -1
- package/dist/Comparators.vue.es-CwhX3rbx.mjs +0 -93
- package/dist/Comparators.vue.es-DmkxV0gb.js +0 -1
- package/dist/ContentWithAsideLayout-RSdKXqAf.js +0 -1
- package/dist/ContextMenu.vue.es-C7KI8Gz6.js +0 -1
- package/dist/CustomerBillingInformation.vue.es-bFUx81Ig.js +0 -1
- package/dist/CustomerPaymentMethods.lib-BKgQTCtc.js +0 -1
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C0lJ_ESU.js +0 -1
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DkbQ2MiR.mjs +0 -2701
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-hBo2Y2mJ.js +0 -1
- package/dist/Divider.vue.es-UwnWvUTl.js +0 -1
- package/dist/DividerText.vue.es-BF3gnr4e.js +0 -1
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C3QYra1x.mjs +0 -335
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-cSQeqr0A.js +0 -1
- package/dist/ErrorNotification.vue.es-BX9dHEc-.js +0 -1
- package/dist/Expand.vue.es-BtM0EZEr.js +0 -1
- package/dist/FormMessage.vue.es-dqATjC2N.js +0 -1
- package/dist/IconButton.vue.es-Bwdfu-jm.js +0 -1
- package/dist/IconTitle.vue.es-Cei98MBw.js +0 -1
- package/dist/Input.vue.es-B47l_feL.js +0 -1
- package/dist/Input.vue.es-D9IjIWc-.mjs +0 -235
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DKlPrxQS.js +0 -1
- package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-D9Rtgapa.mjs +0 -41
- package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-DlJ6lELc.js +0 -1
- package/dist/InvoiceSummary.vue.es-DBnR9Hs7.js +0 -1
- package/dist/Modal.vue.es-8LN4gBh0.js +0 -1
- package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-B1yGKkWN.js +0 -1
- package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DSGf6uFP.js +0 -1
- package/dist/PaymentHistoryBlock-Ds93gNvh.js +0 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CBZhXQfC.js +0 -1
- package/dist/PaymentIntegrationForm-B_Db4DG1.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-C0J37ZVe.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-J15IDbMc.mjs +0 -154
- package/dist/PaymentIntegrationFormAdyen-HeA9XIj-.js +0 -98
- package/dist/PaymentIntegrationFormStripe-BIiMCWlV.mjs +0 -587
- package/dist/PaymentIntegrationFormStripe-DUCJTIAq.js +0 -102
- package/dist/PaymentMethod.vue.es-CJcSZ9lN.js +0 -1
- package/dist/PaymentMethodForm-1d0YIGOu.js +0 -1
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-BDm8l_6N.js +0 -1
- package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-BE4S26JX.js +0 -1
- package/dist/PlanCustomizationEditor-CEMP_Dhz.js +0 -1
- package/dist/PlanCustomizationEditor-CpZeilm5.mjs +0 -694
- package/dist/PricingGroupRangeInput.vue.es-DZSJ5Mz0.js +0 -185
- package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-jrkraJMu.js +0 -1
- package/dist/RadioGroupExtended.vue.es-Dt6LH9Yh.js +0 -1
- package/dist/Section.vue.es-zVXBHAL6.js +0 -1
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BdjYFrVC.js +0 -1
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D4sbq9nA.js +0 -1
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D60YtA9z.mjs +0 -51
- package/dist/StepInput.vue.es-mAnuCuDQ.js +0 -1
- package/dist/SubscriptionDetails.entry.ce-D4CsSoR9.js +0 -1
- package/dist/SubscriptionSchedules-Cm5Dt-1H.js +0 -1
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-t2Awijf5.js +0 -1
- package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-3VYfm6Hm.mjs +0 -91
- package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-B41qZmcL.js +0 -1
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-Bu-_clEa.js +0 -1
- package/dist/TooltipParagraph.vue.es-Cph6zT31.js +0 -1
- package/dist/TrialChip.vue.es-C_wgHGuN.js +0 -1
- package/dist/accel.svg.es-DFJXdioD.js +0 -1
- package/dist/ach.svg.es-BYP873jU.js +0 -1
- package/dist/adyen-BJfC7N6f.js +0 -1
- package/dist/adyen-CvsH5fok.mjs +0 -117
- package/dist/adyen-Druit6gz.js +0 -1
- package/dist/adyenSdk-BP2XXzeJ.js +0 -1
- package/dist/amazon-pay.svg.es-CQWgtowB.js +0 -1
- package/dist/amex.svg.es-DKhW4Txt.js +0 -1
- package/dist/api.es-duCDtZD9.js +0 -1
- package/dist/apple-pay.svg.es-Dyojd0F-.js +0 -1
- package/dist/bacs.svg.es-GJpZs1sD.js +0 -1
- package/dist/bancontact.svg.es-BQh7nAup.js +0 -1
- package/dist/carnet.svg.es-DY04-F2L.js +0 -1
- package/dist/cartes-bancaires.svg.es-BleHMlkN.js +0 -1
- package/dist/cashapp.svg.es-MwXGYom6.js +0 -1
- package/dist/cn.es-D9YMDvG2.js +0 -1
- package/dist/comparators.es-OGt19O9U.js +0 -1
- package/dist/components/BillingInformation/BillingInformation.cjs +0 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs +0 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +0 -1
- package/dist/components/Invoice/Invoice.cjs +0 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs +0 -1
- package/dist/components/InvoiceHeader/InvoiceHeader.cjs +0 -1
- package/dist/components/InvoicesList/InvoicesList.cjs +0 -1
- package/dist/components/PaymentHistory/PaymentHistory.cjs +0 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +0 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +0 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs +0 -1
- package/dist/components/WalletBalances/WalletBalances.cjs +0 -1
- package/dist/configuration-akTS7Wiw.js +0 -1
- package/dist/core/index.cjs +0 -1
- package/dist/countryData.es-C4jHBzfo.js +0 -1
- package/dist/customElements-C963-LtW.js +0 -1215
- package/dist/customElements-D5DAoHRI.mjs +0 -6633
- package/dist/customer-DKa1B2vp.mjs +0 -31
- package/dist/customer-TE1FnGT0.js +0 -1
- package/dist/customer.es-BButyYo0.js +0 -1
- package/dist/dana.svg.es-BDtZLpwd.js +0 -1
- package/dist/dankort.svg.es-CksaipXF.js +0 -1
- package/dist/de-DE-B4TUdnUf.js +0 -1
- package/dist/de-DE-DaBBl-Ak.js +0 -1
- package/dist/diners.svg.es-D6Mu1pqP.js +0 -1
- package/dist/discover.svg.es-DgqWCMUM.js +0 -1
- package/dist/eftpos.svg.es-Dk2DOT8W.js +0 -1
- package/dist/elo.svg.es-C-BzjuRP.js +0 -1
- package/dist/en-US-BNevqm0M.js +0 -1
- package/dist/en-US-D6SGRAch.mjs +0 -325
- package/dist/en-US-J85TQRI8.js +0 -1
- package/dist/en-US-SDhjlY_v.mjs +0 -301
- package/dist/eps.svg.es-B_85bP-W.js +0 -1
- package/dist/error-BHVZJGwD.mjs +0 -13
- package/dist/error-CmduqgVq.js +0 -1
- package/dist/floating-ui.vue.es-Bly3DGWm.js +0 -1
- package/dist/formControl-ODrpUvcA.js +0 -1
- package/dist/formControl-dX7l8o3c.mjs +0 -845
- package/dist/formatting.es-C72Nsrmh.js +0 -1
- package/dist/gcash.svg.es-BKAdhWzv.js +0 -1
- package/dist/getComposedString.es-haS4bAj7.js +0 -1
- package/dist/getCountryNameByCode.es-Xxc0nZsH.js +0 -1
- package/dist/girocard.svg.es-HSOEvDif.js +0 -1
- package/dist/go-pay.svg.es-DQjtunZ_.js +0 -1
- package/dist/google-pay.svg.es-hzc_EgiJ.js +0 -1
- package/dist/hipercard.svg.es-CbCsRY2q.js +0 -1
- package/dist/icon-sprite.svg.es-Ds6lDf5p.js +0 -1
- package/dist/ideal.svg.es-Booz1IML.js +0 -1
- package/dist/index-BPZPnOQQ.js +0 -7
- package/dist/index.cjs +0 -1
- package/dist/index.es-BclokHQX.js +0 -1
- package/dist/invoices-ClqTWYF9.js +0 -1
- package/dist/it-IT-BkPbTueL.js +0 -1
- package/dist/it-IT-CSYvGmpT.js +0 -1
- package/dist/jcb.svg.es-B3WPB8c2.js +0 -1
- package/dist/kakao-pay.svg.es-Cs-lCW74.js +0 -1
- package/dist/klarna.svg.es-Cs6XaHD7.js +0 -1
- package/dist/maestro.svg.es-BvK4oPg4.js +0 -1
- package/dist/mastercard.svg.es-lp4AXyyV.js +0 -1
- package/dist/momo.svg.es-C5aLYf_R.js +0 -1
- package/dist/nl-NL-CpE4IgwO.js +0 -1
- package/dist/nl-NL-jIfAVGv0.js +0 -1
- package/dist/nyce.svg.es-ArAivAZW.js +0 -1
- package/dist/object.es-CdriXMPs.js +0 -1
- package/dist/open-banking.svg.es-Q3rRkCvP.js +0 -1
- package/dist/paymentFailure-Bh60UhxA.mjs +0 -47
- package/dist/paymentFailure-Cki8c5BX.js +0 -1
- package/dist/paymentMethods-AL2U_byg.js +0 -1
- package/dist/paymentMethods-CWzJhcWK.mjs +0 -77
- package/dist/payments-BmiHMlQt.js +0 -1
- package/dist/payments-aXyfylwk.mjs +0 -45
- package/dist/paypal.svg.es-Cjp5sNI3.js +0 -1
- package/dist/pricing-BVAld27Y.js +0 -1
- package/dist/pricing-DLOeiAIB.mjs +0 -16
- package/dist/pricing.es-C07bgEZx.js +0 -1
- package/dist/pricingItemConfigs.es-D4aYkYcf.js +0 -1
- package/dist/pricingItemConfigs.es-ORxsk_YS.mjs +0 -77
- package/dist/pricingPlanSchedule-BM8vsKkV.js +0 -1
- package/dist/pricingPlanSchedules-BD4GIP_F.mjs +0 -32
- package/dist/pricingPlanSchedules-BfsMSvN0.js +0 -1
- package/dist/pulse.svg.es-Dit33E8S.js +0 -1
- package/dist/screens/Checkout/Checkout.cjs +0 -1
- package/dist/screens/CustomerOverview/CustomerOverview.cjs +0 -1
- package/dist/screens/PayInvoice/PayInvoice.cjs +0 -1
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +0 -1
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +0 -1
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +0 -1
- package/dist/sepa.svg.es-0t4DKeA1.js +0 -1
- package/dist/sessionReference-3h-6FdrC.mjs +0 -43
- package/dist/sessionReference-m_6Rp4X1.js +0 -1
- package/dist/slots.es-T9ZJRGtG.js +0 -1
- package/dist/sorting.es-DCihKqD2.mjs +0 -77
- package/dist/sorting.es-DQsjKr8A.js +0 -1
- package/dist/star.svg.es-D2JncY7b.js +0 -1
- package/dist/subscription-D1yHKUNc.mjs +0 -69
- package/dist/subscription-ZA62t4E9.js +0 -1
- package/dist/subscriptions-Cm83ckfl.js +0 -1
- package/dist/subscriptions-cnR5fnf7.mjs +0 -55
- package/dist/trustly.svg.es-GJByiFAs.js +0 -1
- package/dist/twint.svg.es-BJ2f48og.js +0 -1
- package/dist/typeGuards.es-DS3vZaJn.js +0 -1
- package/dist/types/components/payments/AddPaymentMethodModal/AddPaymentMethodModal.types.d.ts +0 -14
- package/dist/types/components/payments/SubscriptionPaymentCompletedCard/SubscriptionPaymentCompletedCard.types.d.ts +0 -3
- package/dist/types/components/subscriptions/PlanCustomizationForm/AddonSingleEditor.types.d.ts +0 -5
- package/dist/types/services/portals.types.d.ts +0 -70
- package/dist/types/types/subscription.d.ts +0 -4
- package/dist/unionpay.svg.es-DjFZ5EMQ.js +0 -1
- package/dist/url-TNRgVI8A.mjs +0 -21
- package/dist/url-vloPOiXd.js +0 -1
- package/dist/useActionDispatchProvider-CHkVQMaE.js +0 -1
- package/dist/useActionDispatchProvider-DDYqIh3r.mjs +0 -11
- package/dist/useCustomer-DGYtowRy.js +0 -1
- package/dist/useCustomerFormLabels-CcnkJLcB.mjs +0 -968
- package/dist/useCustomerFormLabels-DAZziqYt.js +0 -1
- package/dist/useExperimentalFeature-COOU6IZd.js +0 -1
- package/dist/useExperimentalFeature-ierhOt9Q.mjs +0 -6
- package/dist/useIncrementalLoading-CaWOE8Xl.js +0 -1
- package/dist/useIncrementalLoading-Cgxw2GD7.mjs +0 -48
- package/dist/useInvoiceData-BEK-7msA.mjs +0 -38
- package/dist/useInvoiceData-CQRn8l9C.js +0 -1
- package/dist/useInvoicesList-BQkKyyXa.js +0 -1
- package/dist/useInvoicesList-C4I118KM.mjs +0 -500
- package/dist/useLoadInitialData-CrKnBZs_.js +0 -1
- package/dist/usePaymentMethodAvailability-Ci6LeYKt.js +0 -1
- package/dist/usePaymentMethodOptions-Ciifjo6c.mjs +0 -39
- package/dist/usePaymentMethodOptions-Cqe92ZBn.js +0 -1
- package/dist/usePaymentMethods-BKwrl82-.js +0 -1
- package/dist/usePayments-Bauj16B-.js +0 -1
- package/dist/usePortal-DSLImEfr.js +0 -1
- package/dist/usePortal-H8Tv2TnZ.mjs +0 -11
- package/dist/useService-Bh47bllz.mjs +0 -50
- package/dist/useService-H7BjLg8P.js +0 -1
- package/dist/useSubscription-BiYNJT2e.js +0 -1
- package/dist/useSubscription-DqnxWNKg.mjs +0 -210
- package/dist/useTimePeriod.es-D2aiyfd-.js +0 -1
- package/dist/useViewport-BgdA2PPt.mjs +0 -29
- package/dist/useViewport-hPRVDWCm.js +0 -1
- package/dist/useWatchDebounced-B8iX7ykx.js +0 -1
- package/dist/useWatchDebounced-BHlBPcXB.mjs +0 -20
- package/dist/visa.svg.es-NY3BHhda.js +0 -1
- package/dist/vpay.svg.es-VViQi42w.js +0 -1
- package/dist/wallets.es-CNIMW5ay.js +0 -1
- package/dist/zip.svg.es-C9S_F31W.js +0 -1
|
@@ -1,3924 +0,0 @@
|
|
|
1
|
-
import { unref as t, inject as ci, ref as Y, computed as _, onMounted as je, toRaw as ui, watch as Oe, defineComponent as se, openBlock as p, createBlock as O, withCtx as b, createElementVNode as w, createVNode as M, createTextVNode as K, toDisplayString as V, useModel as di, reactive as pi, createElementBlock as $, withModifiers as Fe, Fragment as me, createCommentVNode as U, createSlots as Ye, normalizeClass as Ie, mergeModels as At, renderSlot as tt, resolveComponent as mi, renderList as Rt, nextTick as qe, mergeProps as Pt, withDirectives as gi, withKeys as Dt, vShow as yi, defineAsyncComponent as Nt } from "vue";
|
|
2
|
-
import { I as vi, b as Ae, a as he, _ as le, d as fi, e as _i } from "./customElements-D5DAoHRI.mjs";
|
|
3
|
-
import { u as $t } from "./useTimePeriod.es-B22-fno3.mjs";
|
|
4
|
-
import { b as $e, f as De } from "./formatting.es-RclXHhKo.mjs";
|
|
5
|
-
import { _ as Ne, a as Be } from "./Button.vue.es-C32_baQN.mjs";
|
|
6
|
-
import { _ as hi } from "./ErrorNotification.vue.es-rRKgmkzV.mjs";
|
|
7
|
-
import { c as Mi } from "./countryData.es-BegoD-cZ.mjs";
|
|
8
|
-
import { c as bi } from "./subscriptions-cnR5fnf7.mjs";
|
|
9
|
-
import { A as Ce } from "./error-BHVZJGwD.mjs";
|
|
10
|
-
import { c as Ii, _ as Ai } from "./TrialChip.vue.es-C_yRujip.mjs";
|
|
11
|
-
import { a as Pi } from "./useService-Bh47bllz.mjs";
|
|
12
|
-
import { c as Di } from "./invoices-DJTwftJv.mjs";
|
|
13
|
-
import { g as xe, b as Bt, e as Ni } from "./pricingPlanSchedule-BPrS2WRd.mjs";
|
|
14
|
-
import { u as Ei, r as Et, e as Ci, d as Ue, f as Me, b as ge, _ as xi, a as Li } from "./formControl-dX7l8o3c.mjs";
|
|
15
|
-
import { o as Ti, u as wi, _ as Si, a as ki } from "./useCustomerFormLabels-CcnkJLcB.mjs";
|
|
16
|
-
import { u as Oi } from "./useWatchDebounced-BHlBPcXB.mjs";
|
|
17
|
-
import { u as zi } from "./usePaymentMethodOptions-Ciifjo6c.mjs";
|
|
18
|
-
import { b as nt, a as ji, d as Ri } from "./subscription-D1yHKUNc.mjs";
|
|
19
|
-
import { a as $i, b as Ut } from "./pricing-DLOeiAIB.mjs";
|
|
20
|
-
import { g as Se, a as Bi, s as Ui } from "./url-TNRgVI8A.mjs";
|
|
21
|
-
import { P as Vi, e as Fi, c as Ct, d as Gi } from "./adyen-CvsH5fok.mjs";
|
|
22
|
-
import { u as Yi } from "./usePortal-H8Tv2TnZ.mjs";
|
|
23
|
-
import { g as Ki } from "./getCountryNameByCode.es-BDHua7VM.mjs";
|
|
24
|
-
import { _ as xt } from "./Expand.vue.es-BleuAfDz.mjs";
|
|
25
|
-
import { _ as _e } from "./Input.vue.es-D9IjIWc-.mjs";
|
|
26
|
-
import { _ as ye } from "./Section.vue.es-D7eiXUbk.mjs";
|
|
27
|
-
import { _ as Hi } from "./Alert.vue.es-lIiAWf2S.mjs";
|
|
28
|
-
import { c as Qi } from "./customer-DKa1B2vp.mjs";
|
|
29
|
-
import { b as Zi, c as Xi, a as Wi, _ as Je } from "./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C3QYra1x.mjs";
|
|
30
|
-
import { _ as qi, T as Ji, a as en } from "./TooltipParagraph.vue.es-BXbOJmjr.mjs";
|
|
31
|
-
import { _ as tn } from "./PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-nLTPnH4j.mjs";
|
|
32
|
-
import { _ as Lt } from "./Chip.vue.es-CKCOY5T6.mjs";
|
|
33
|
-
import { _ as nn, a as on } from "./SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DudMRVka.mjs";
|
|
34
|
-
import { _ as an } from "./SubscriptionSummary.vue_vue_type_script_setup_true_lang-3VYfm6Hm.mjs";
|
|
35
|
-
import { u as Vt } from "./useViewport-BgdA2PPt.mjs";
|
|
36
|
-
import { _ as be } from "./Skeleton.vue_vue_type_script_setup_true_lang-D60YtA9z.mjs";
|
|
37
|
-
import { _ as rn } from "./DividerText.vue.es-DKl3FnDJ.mjs";
|
|
38
|
-
import { l as Ke } from "./adyenSdk-B01MB9Ia.mjs";
|
|
39
|
-
import { c as ln } from "./payments-aXyfylwk.mjs";
|
|
40
|
-
import { c as sn } from "./paymentFailure-Bh60UhxA.mjs";
|
|
41
|
-
import { C as cn } from "./ContentWithAsideLayout-BCM8tmZN.mjs";
|
|
42
|
-
import { u as un } from "./cn.es-CGa6b2Lt.mjs";
|
|
43
|
-
import { a as dn } from "./sessionReference-3h-6FdrC.mjs";
|
|
44
|
-
const pn = {
|
|
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 Ft(e) {
|
|
74
|
-
return Object.keys(pn).includes(e);
|
|
75
|
-
}
|
|
76
|
-
function Tt(e, i) {
|
|
77
|
-
var n = Object.keys(e);
|
|
78
|
-
if (Object.getOwnPropertySymbols) {
|
|
79
|
-
var a = Object.getOwnPropertySymbols(e);
|
|
80
|
-
i && (a = a.filter(function(o) {
|
|
81
|
-
return Object.getOwnPropertyDescriptor(e, o).enumerable;
|
|
82
|
-
})), n.push.apply(n, a);
|
|
83
|
-
}
|
|
84
|
-
return n;
|
|
85
|
-
}
|
|
86
|
-
function ze(e) {
|
|
87
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
88
|
-
var n = arguments[i] != null ? arguments[i] : {};
|
|
89
|
-
i % 2 ? Tt(Object(n), !0).forEach(function(a) {
|
|
90
|
-
mn(e, a, n[a]);
|
|
91
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Tt(Object(n)).forEach(function(a) {
|
|
92
|
-
Object.defineProperty(e, a, Object.getOwnPropertyDescriptor(n, a));
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
return e;
|
|
96
|
-
}
|
|
97
|
-
function mn(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 Ge(e) {
|
|
106
|
-
return typeof e == "function";
|
|
107
|
-
}
|
|
108
|
-
function it(e) {
|
|
109
|
-
return e !== null && typeof e == "object" && !Array.isArray(e);
|
|
110
|
-
}
|
|
111
|
-
function He(e) {
|
|
112
|
-
return Ge(e.$validator) ? ze({}, e) : {
|
|
113
|
-
$validator: e
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
function Gt(e) {
|
|
117
|
-
return typeof e == "object" ? e.$valid : e;
|
|
118
|
-
}
|
|
119
|
-
function Yt(e) {
|
|
120
|
-
return e.$validator || e;
|
|
121
|
-
}
|
|
122
|
-
function gn(e, i) {
|
|
123
|
-
if (!it(e)) throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof e}`);
|
|
124
|
-
if (!it(i) && !Ge(i)) throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");
|
|
125
|
-
const n = He(i);
|
|
126
|
-
return n.$params = ze(ze({}, n.$params || {}), e), n;
|
|
127
|
-
}
|
|
128
|
-
function yn(e, i) {
|
|
129
|
-
if (!Ge(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 (!it(i) && !Ge(i)) throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");
|
|
131
|
-
const n = He(i);
|
|
132
|
-
return n.$message = e, n;
|
|
133
|
-
}
|
|
134
|
-
function vn(e) {
|
|
135
|
-
let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
136
|
-
const n = He(e);
|
|
137
|
-
return ze(ze({}, n), {}, {
|
|
138
|
-
$async: !0,
|
|
139
|
-
$watchTargets: i
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
function fn(e) {
|
|
143
|
-
return {
|
|
144
|
-
$validator(i) {
|
|
145
|
-
for (var n = arguments.length, a = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++)
|
|
146
|
-
a[o - 1] = arguments[o];
|
|
147
|
-
return t(i).reduce((r, u, s) => {
|
|
148
|
-
const d = Object.entries(u).reduce((I, g) => {
|
|
149
|
-
let [h, C] = g;
|
|
150
|
-
const f = e[h] || {}, L = Object.entries(f).reduce((x, v) => {
|
|
151
|
-
let [H, z] = v;
|
|
152
|
-
const E = Yt(z).call(this, C, u, s, ...a), m = Gt(E);
|
|
153
|
-
if (x.$data[H] = E, x.$data.$invalid = !m || !!x.$data.$invalid, x.$data.$error = x.$data.$invalid, !m) {
|
|
154
|
-
let B = z.$message || "";
|
|
155
|
-
const S = z.$params || {};
|
|
156
|
-
typeof B == "function" && (B = B({
|
|
157
|
-
$pending: !1,
|
|
158
|
-
$invalid: !m,
|
|
159
|
-
$params: S,
|
|
160
|
-
$model: C,
|
|
161
|
-
$response: E
|
|
162
|
-
})), x.$errors.push({
|
|
163
|
-
$property: h,
|
|
164
|
-
$message: B,
|
|
165
|
-
$params: S,
|
|
166
|
-
$response: E,
|
|
167
|
-
$model: C,
|
|
168
|
-
$pending: !1,
|
|
169
|
-
$validator: H
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
return {
|
|
173
|
-
$valid: x.$valid && m,
|
|
174
|
-
$data: x.$data,
|
|
175
|
-
$errors: x.$errors
|
|
176
|
-
};
|
|
177
|
-
}, {
|
|
178
|
-
$valid: !0,
|
|
179
|
-
$data: {},
|
|
180
|
-
$errors: []
|
|
181
|
-
});
|
|
182
|
-
return I.$data[h] = L.$data, I.$errors[h] = L.$errors, {
|
|
183
|
-
$valid: I.$valid && L.$valid,
|
|
184
|
-
$data: I.$data,
|
|
185
|
-
$errors: I.$errors
|
|
186
|
-
};
|
|
187
|
-
}, {
|
|
188
|
-
$valid: !0,
|
|
189
|
-
$data: {},
|
|
190
|
-
$errors: {}
|
|
191
|
-
});
|
|
192
|
-
return {
|
|
193
|
-
$valid: r.$valid && d.$valid,
|
|
194
|
-
$data: r.$data.concat(d.$data),
|
|
195
|
-
$errors: r.$errors.concat(d.$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((a) => Object.values(a).map((o) => o.map((r) => r.$message)).reduce((o, r) => o.concat(r), [])) : [];
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
const Kt = (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
|
-
}, _n = (e) => (e = t(e), Array.isArray(e) ? e.length : typeof e == "object" ? Object.keys(e).length : String(e).length);
|
|
225
|
-
function Pe() {
|
|
226
|
-
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
227
|
-
i[n] = arguments[n];
|
|
228
|
-
return (a) => (a = t(a), !Kt(a) || i.every((o) => (o.lastIndex = 0, o.test(a))));
|
|
229
|
-
}
|
|
230
|
-
var hn = /* @__PURE__ */ Object.freeze({
|
|
231
|
-
__proto__: null,
|
|
232
|
-
forEach: fn,
|
|
233
|
-
len: _n,
|
|
234
|
-
normalizeValidatorObject: He,
|
|
235
|
-
regex: Pe,
|
|
236
|
-
req: Kt,
|
|
237
|
-
unwrap: t,
|
|
238
|
-
unwrapNormalizedValidator: Yt,
|
|
239
|
-
unwrapValidatorResponse: Gt,
|
|
240
|
-
withAsync: vn,
|
|
241
|
-
withMessage: yn,
|
|
242
|
-
withParams: gn
|
|
243
|
-
});
|
|
244
|
-
Pe(/^[a-zA-Z]*$/);
|
|
245
|
-
Pe(/^[a-zA-Z0-9]*$/);
|
|
246
|
-
Pe(/^\d*(\.\d+)?$/);
|
|
247
|
-
const Mn = /^(?:[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
|
-
Pe(Mn);
|
|
249
|
-
const bn = /^(?:(?:(?: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
|
-
Pe(bn);
|
|
251
|
-
Pe(/(^[0-9]*$)|(^-[0-9]+$)/);
|
|
252
|
-
Pe(/^[-]?\d*(\.\d+)?$/);
|
|
253
|
-
function Qe(e) {
|
|
254
|
-
return !!Mi.find((i) => i.key === e);
|
|
255
|
-
}
|
|
256
|
-
const Ht = {
|
|
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
|
-
}, In = (e) => !e || typeof e != "string" || e.trim() === "" ? !0 : Object.values(Ht).some((i) => i.regex.test(e)), An = ({ $model: e }) => {
|
|
428
|
-
if (!e || typeof e != "string" || e.trim() === "")
|
|
429
|
-
return "";
|
|
430
|
-
const i = ci(vi, null);
|
|
431
|
-
if (!i)
|
|
432
|
-
return "Invalid tax ID";
|
|
433
|
-
const { formatMessage: n } = i, a = Object.values(Ht).find(
|
|
434
|
-
(o) => e.toUpperCase().startsWith(o.prefix.toUpperCase())
|
|
435
|
-
);
|
|
436
|
-
return a ? 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: a.example }
|
|
443
|
-
) : n({
|
|
444
|
-
defaultMessage: "Invalid tax ID",
|
|
445
|
-
id: "taxId.invalid",
|
|
446
|
-
description: "Error message when tax ID is invalid"
|
|
447
|
-
});
|
|
448
|
-
}, ot = hn.withMessage(An, In), Pn = "preview", Dn = "NL", Qt = (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
|
-
}, Nn = (e) => {
|
|
455
|
-
const i = Qt(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) || Dn,
|
|
462
|
-
...(i == null ? void 0 : i.postal_code) && { postal_code: i.postal_code }
|
|
463
|
-
};
|
|
464
|
-
}, En = (e) => {
|
|
465
|
-
var a, o;
|
|
466
|
-
const i = Nn(e), n = e.type ?? "INDIVIDUAL";
|
|
467
|
-
if (n === "ORGANIZATION") {
|
|
468
|
-
const r = "organization" in e ? e.organization : void 0, u = (o = (a = r == null ? void 0 : r.tax_ids) == null ? void 0 : a[0]) == null ? void 0 : o.id;
|
|
469
|
-
return {
|
|
470
|
-
type: n,
|
|
471
|
-
organization: {
|
|
472
|
-
legal_name: (r == null ? void 0 : r.legal_name) || Pn,
|
|
473
|
-
registered_address: i,
|
|
474
|
-
...u && {
|
|
475
|
-
tax_id: ot.$validator(u, {}, {}) ? u : void 0
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
};
|
|
479
|
-
}
|
|
480
|
-
return {
|
|
481
|
-
type: n,
|
|
482
|
-
individual: {
|
|
483
|
-
residential_address: i
|
|
484
|
-
}
|
|
485
|
-
};
|
|
486
|
-
}, Cn = {
|
|
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
|
-
}, xn = (e) => {
|
|
735
|
-
if (e)
|
|
736
|
-
return Cn[e];
|
|
737
|
-
}, Zt = ({
|
|
738
|
-
country: e,
|
|
739
|
-
pricingCurrencySettings: i,
|
|
740
|
-
fallbackCurrency: n
|
|
741
|
-
}) => {
|
|
742
|
-
const a = xn(e), o = (i == null ? void 0 : i.pricing_currencies) ?? [];
|
|
743
|
-
return a && o.includes(a) ? a : (i == null ? void 0 : i.default_pricing_currency) ?? n ?? a;
|
|
744
|
-
}, Ln = () => {
|
|
745
|
-
const { getInvoicePreview: e } = Di(), i = Ae(), n = Y(), a = Y(), o = Y(), r = Y({}), u = Y(Ce.Initial), s = Y({}), d = Y(), I = (h) => `${h.type}:${h.value}`;
|
|
746
|
-
return {
|
|
747
|
-
loadInvoicePreview: async ({
|
|
748
|
-
subscription: h,
|
|
749
|
-
subscriptionStartAt: C,
|
|
750
|
-
customer: f = {},
|
|
751
|
-
seatsValues: L,
|
|
752
|
-
unitsValues: x,
|
|
753
|
-
enabledPricingIds: v,
|
|
754
|
-
promotionCode: H
|
|
755
|
-
}) => {
|
|
756
|
-
var c, y, D, T, R, Q;
|
|
757
|
-
const z = En(f);
|
|
758
|
-
u.value = Ce.Loading;
|
|
759
|
-
const A = xe({
|
|
760
|
-
pricingPlanScheduleInfos: h.pricing_plan_schedule_infos,
|
|
761
|
-
type: "DEFAULT"
|
|
762
|
-
}), E = (c = A == null ? void 0 : A.pricing_plan_version) == null ? void 0 : c.pricing_currency_settings, m = (((y = E == null ? void 0 : E.pricing_currencies) == null ? void 0 : y.length) ?? 0) > 1, B = ((T = (D = A == null ? void 0 : A.pricing_plan_version) == null ? void 0 : D.billing_period_settings) == null ? void 0 : T.billing_periods) ?? [], S = B.length > 1, X = B.length > 0 ? B.map(({ period: F }) => F) : h.billing_period ? [h.billing_period] : [], de = Zt({
|
|
763
|
-
country: (R = Qt(f)) == null ? void 0 : R.country,
|
|
764
|
-
pricingCurrencySettings: E,
|
|
765
|
-
fallbackCurrency: h.billing_currency
|
|
766
|
-
});
|
|
767
|
-
if (!X.length) {
|
|
768
|
-
i.warn("INVOICE_PREVIEW_SKIPPED", "No billing period to preview an invoice for", {
|
|
769
|
-
subscriptionId: h.id
|
|
770
|
-
}), u.value = Ce.Done;
|
|
771
|
-
return;
|
|
772
|
-
}
|
|
773
|
-
const l = h.billing_period ? I(h.billing_period) : I(X[0]), P = X.map(async (F) => {
|
|
774
|
-
var G;
|
|
775
|
-
const ne = I(F), ee = Bt({
|
|
776
|
-
enabledPricings: v == null ? void 0 : v.map((q) => ({
|
|
777
|
-
pricing_id: q
|
|
778
|
-
})),
|
|
779
|
-
seatsValues: L,
|
|
780
|
-
unitsValues: x,
|
|
781
|
-
pricingPlanScheduleInfos: h.pricing_plan_schedule_infos,
|
|
782
|
-
pricingCurrency: m ? de : void 0,
|
|
783
|
-
billingPeriod: S ? F : void 0
|
|
784
|
-
}) ?? [];
|
|
785
|
-
if (H) {
|
|
786
|
-
const q = (G = h.pricing_plan_schedule_infos.find(
|
|
787
|
-
({ pricing_plan_schedule: J }) => J.type === "DEFAULT"
|
|
788
|
-
)) == null ? void 0 : G.id;
|
|
789
|
-
if (q) {
|
|
790
|
-
const J = ee.find(
|
|
791
|
-
({ pricing_plan_schedule_id: ae }) => ae === q
|
|
792
|
-
);
|
|
793
|
-
J ? J.promotion_codes = [H] : ee.push({
|
|
794
|
-
pricing_plan_schedule_id: q,
|
|
795
|
-
promotion_codes: [H]
|
|
796
|
-
});
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
const te = {
|
|
800
|
-
pricingPlanSubscriptionId: h.id,
|
|
801
|
-
startAt: C,
|
|
802
|
-
customizations: ee,
|
|
803
|
-
customer: z
|
|
804
|
-
}, ie = s.value[ne];
|
|
805
|
-
if (ie && Pi(te, ie))
|
|
806
|
-
return { periodKey: ne, response: void 0 };
|
|
807
|
-
s.value = {
|
|
808
|
-
...s.value,
|
|
809
|
-
[ne]: te
|
|
810
|
-
};
|
|
811
|
-
const oe = await e(te);
|
|
812
|
-
return { periodKey: ne, response: oe };
|
|
813
|
-
});
|
|
814
|
-
try {
|
|
815
|
-
const F = {
|
|
816
|
-
...r.value
|
|
817
|
-
}, ne = await Promise.all(P), ee = h.pricing_plan_schedule_infos.find(
|
|
818
|
-
({ pricing_plan_schedule: ie }) => ie.type === "TRIAL"
|
|
819
|
-
), te = (Q = h.pricing_plan_schedule_infos.find(
|
|
820
|
-
({ pricing_plan_schedule: ie }) => ie.type === "DEFAULT"
|
|
821
|
-
)) == null ? void 0 : Q.id;
|
|
822
|
-
ne.forEach(({ periodKey: ie, response: oe }) => {
|
|
823
|
-
var J;
|
|
824
|
-
if (!oe) return;
|
|
825
|
-
d.value = (J = oe.invoice_infos.at(-1)) == null ? void 0 : J.pricing_plan_schedule_id, ee && (a.value = oe.first_invoice, ee.start_at && ee.end_at && (n.value = Ii(
|
|
826
|
-
new Date(ee.start_at),
|
|
827
|
-
new Date(ee.end_at)
|
|
828
|
-
)));
|
|
829
|
-
const G = oe.invoice_infos.find(
|
|
830
|
-
({ pricing_plan_schedule_id: ae }) => ae === te
|
|
831
|
-
), q = G == null ? void 0 : G.invoices[0];
|
|
832
|
-
q && (F[ie] = q);
|
|
833
|
-
}), r.value = F, o.value = F[l];
|
|
834
|
-
} catch (F) {
|
|
835
|
-
throw u.value = Ce.Failed, i.error(
|
|
836
|
-
"INVOICE_PREVIEW_FAILED",
|
|
837
|
-
"Failed to load the invoice preview",
|
|
838
|
-
{ preview: "CHECKOUT" },
|
|
839
|
-
F
|
|
840
|
-
), F;
|
|
841
|
-
} finally {
|
|
842
|
-
u.value = Ce.Done;
|
|
843
|
-
}
|
|
844
|
-
},
|
|
845
|
-
invoicePreview: o,
|
|
846
|
-
invoicePreviewByBillingPeriod: r,
|
|
847
|
-
trialInvoicePreview: a,
|
|
848
|
-
trialPeriod: n,
|
|
849
|
-
lastPreviewScheduleId: d,
|
|
850
|
-
isPending: _(() => u.value === Ce.Loading)
|
|
851
|
-
};
|
|
852
|
-
}, wt = ["email", "country"], Xt = "GENERIC_TAX_ID", St = {
|
|
853
|
-
US: ["addressLine1", "postalCode"],
|
|
854
|
-
CA: ["state"]
|
|
855
|
-
}, Tn = (e) => !e || !St[e] ? wt : [...St[e], ...wt], kt = (e) => {
|
|
856
|
-
const i = {
|
|
857
|
-
...e.addressLine1 && { line1: e.addressLine1 },
|
|
858
|
-
...e.addressLine2 && { line2: e.addressLine2 },
|
|
859
|
-
...e.city && { city: e.city },
|
|
860
|
-
...e.state && { state: e.state },
|
|
861
|
-
...e.postalCode && { postal_code: e.postalCode },
|
|
862
|
-
country: e.country ?? ""
|
|
863
|
-
};
|
|
864
|
-
return e.type === "ORGANIZATION" ? {
|
|
865
|
-
type: "ORGANIZATION",
|
|
866
|
-
organization: {
|
|
867
|
-
legal_name: e.companyLegalName ?? "",
|
|
868
|
-
registered_address: i,
|
|
869
|
-
...e.companyVatNumber && {
|
|
870
|
-
tax_ids: [{ id: e.companyVatNumber, type: Xt }]
|
|
871
|
-
}
|
|
872
|
-
}
|
|
873
|
-
} : {
|
|
874
|
-
type: "INDIVIDUAL",
|
|
875
|
-
individual: {
|
|
876
|
-
residential_address: i
|
|
877
|
-
}
|
|
878
|
-
};
|
|
879
|
-
};
|
|
880
|
-
function wn() {
|
|
881
|
-
return {
|
|
882
|
-
/**
|
|
883
|
-
* Get geolocation information from the user
|
|
884
|
-
*/
|
|
885
|
-
getGeoLocation() {
|
|
886
|
-
return fetch("https://api.country.is/").then((e) => e.json());
|
|
887
|
-
}
|
|
888
|
-
};
|
|
889
|
-
}
|
|
890
|
-
function Sn({
|
|
891
|
-
initialState: e,
|
|
892
|
-
onRequiredFieldChange: i
|
|
893
|
-
}) {
|
|
894
|
-
const n = Y(Ve(e)), a = Y(Ve(e)), o = (g) => {
|
|
895
|
-
const h = Ve({ ...ui(n.value), ...g });
|
|
896
|
-
n.value = h, a.value = structuredClone(h);
|
|
897
|
-
}, r = _(
|
|
898
|
-
() => Tn(n.value.country)
|
|
899
|
-
), u = (g) => r.value.includes(g), s = Ei(
|
|
900
|
-
{
|
|
901
|
-
email: { required: Et, email: Ci },
|
|
902
|
-
country: { required: Et },
|
|
903
|
-
state: { required: Ue(() => u("state")) },
|
|
904
|
-
addressLine1: { required: Ue(() => u("addressLine1")) },
|
|
905
|
-
postalCode: { required: Ue(() => u("postalCode")) },
|
|
906
|
-
companyLegalName: Ue(n.value.type === "ORGANIZATION"),
|
|
907
|
-
companyVatNumber: { taxId: ot }
|
|
908
|
-
},
|
|
909
|
-
n
|
|
910
|
-
), d = (g) => {
|
|
911
|
-
g || wn().getGeoLocation().then(({ country: h }) => {
|
|
912
|
-
n.value.country = h;
|
|
913
|
-
});
|
|
914
|
-
}, I = (g, h) => {
|
|
915
|
-
const C = Ti({ from: h, to: g }), f = Object.keys(C).find(kn);
|
|
916
|
-
if (f) {
|
|
917
|
-
if (["type", "companyVatNumber"].includes(f)) {
|
|
918
|
-
i(g);
|
|
919
|
-
return;
|
|
920
|
-
}
|
|
921
|
-
if (f === "seatsValues") {
|
|
922
|
-
i(g);
|
|
923
|
-
return;
|
|
924
|
-
}
|
|
925
|
-
if (f === "unitsValues") {
|
|
926
|
-
i(g);
|
|
927
|
-
return;
|
|
928
|
-
}
|
|
929
|
-
if (f === "enabledPricingIds") {
|
|
930
|
-
i(g);
|
|
931
|
-
return;
|
|
932
|
-
}
|
|
933
|
-
if (f !== "email" && u(f)) {
|
|
934
|
-
i(g);
|
|
935
|
-
return;
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
};
|
|
939
|
-
return je(async () => {
|
|
940
|
-
await d(e == null ? void 0 : e.country);
|
|
941
|
-
}), Oi(
|
|
942
|
-
() => JSON.parse(JSON.stringify(n.value)),
|
|
943
|
-
I,
|
|
944
|
-
{ debounce: 200 }
|
|
945
|
-
), {
|
|
946
|
-
form: n,
|
|
947
|
-
validation: s,
|
|
948
|
-
getIsFieldRequired: u,
|
|
949
|
-
updateInitialState: o,
|
|
950
|
-
initialState: a
|
|
951
|
-
};
|
|
952
|
-
}
|
|
953
|
-
const Ve = (e = {}) => ({
|
|
954
|
-
email: void 0,
|
|
955
|
-
country: void 0,
|
|
956
|
-
type: "INDIVIDUAL",
|
|
957
|
-
companyLegalName: void 0,
|
|
958
|
-
firstName: void 0,
|
|
959
|
-
infix: void 0,
|
|
960
|
-
lastName: void 0,
|
|
961
|
-
addressLine1: void 0,
|
|
962
|
-
addressLine2: void 0,
|
|
963
|
-
postalCode: void 0,
|
|
964
|
-
city: void 0,
|
|
965
|
-
state: void 0,
|
|
966
|
-
companyVatNumber: void 0,
|
|
967
|
-
seatsValues: void 0,
|
|
968
|
-
unitsValues: void 0,
|
|
969
|
-
enabledPricingIds: void 0,
|
|
970
|
-
...e
|
|
971
|
-
});
|
|
972
|
-
function kn(e) {
|
|
973
|
-
return e in Ve();
|
|
974
|
-
}
|
|
975
|
-
function On(e, i = void 0) {
|
|
976
|
-
const n = i ?? [], a = nt(e);
|
|
977
|
-
for (const o of a)
|
|
978
|
-
if (["EXACTLY_ONE", "AT_LEAST_ONE"].includes(o.selection_constraint)) {
|
|
979
|
-
const r = o.pricings.map((u) => u.id);
|
|
980
|
-
if (i != null && i.some((u) => r.includes(u)))
|
|
981
|
-
continue;
|
|
982
|
-
n.push(o.pricings[0].id);
|
|
983
|
-
}
|
|
984
|
-
return n;
|
|
985
|
-
}
|
|
986
|
-
function zn(e) {
|
|
987
|
-
return nt(e).some(
|
|
988
|
-
(n) => n.selection_constraint === "EXACTLY_ONE" || n.selection_constraint === "AT_LEAST_ONE"
|
|
989
|
-
);
|
|
990
|
-
}
|
|
991
|
-
function jn(e) {
|
|
992
|
-
const i = $i(e.pricing_plan_schedule_infos), n = nt(e);
|
|
993
|
-
return i.some((a) => a.product_type === "ADDON") || n.some((a) => a.object_type === "ADDON");
|
|
994
|
-
}
|
|
995
|
-
const Ot = (e) => (e ?? []).flatMap(
|
|
996
|
-
(i) => i.configs ?? []
|
|
997
|
-
), Wt = (e) => [
|
|
998
|
-
...e.configs ?? [],
|
|
999
|
-
...Ot(e.billing_period_configs),
|
|
1000
|
-
...(e.pricing_currency_configs ?? []).flatMap((i) => [
|
|
1001
|
-
...i.configs ?? [],
|
|
1002
|
-
...Ot(i.billing_period_configs)
|
|
1003
|
-
])
|
|
1004
|
-
];
|
|
1005
|
-
function ur({
|
|
1006
|
-
pricings: e,
|
|
1007
|
-
pricingItemConfigId: i
|
|
1008
|
-
}) {
|
|
1009
|
-
var r, u;
|
|
1010
|
-
const n = e.flatMap((s) => s.items ?? []).find((s) => {
|
|
1011
|
-
var d;
|
|
1012
|
-
return (d = s.configs) == null ? void 0 : d.some((I) => I.id === i);
|
|
1013
|
-
}), a = (r = n == null ? void 0 : n.configs) == null ? void 0 : r.find((s) => s.id === i), o = (u = n == null ? void 0 : n.product_items) == null ? void 0 : u[0];
|
|
1014
|
-
return {
|
|
1015
|
-
config: a,
|
|
1016
|
-
productItem: o
|
|
1017
|
-
};
|
|
1018
|
-
}
|
|
1019
|
-
const Rn = "1";
|
|
1020
|
-
function $n(e) {
|
|
1021
|
-
const i = Ut(e).flatMap((n) => n.items ?? []).flatMap(Wt);
|
|
1022
|
-
return new Map(
|
|
1023
|
-
i.flatMap(
|
|
1024
|
-
(n) => {
|
|
1025
|
-
var a;
|
|
1026
|
-
return (a = n.default_seats_value) != null && a.number ? [[n.id, n.default_seats_value.number]] : [];
|
|
1027
|
-
}
|
|
1028
|
-
)
|
|
1029
|
-
);
|
|
1030
|
-
}
|
|
1031
|
-
function Bn(e) {
|
|
1032
|
-
var a;
|
|
1033
|
-
const i = (a = e == null ? void 0 : e.pricing_plan_schedule) == null ? void 0 : a.seats_values;
|
|
1034
|
-
if (!e || !(i != null && i.length))
|
|
1035
|
-
return;
|
|
1036
|
-
const n = e.pricing_plan_version ? $n(e) : /* @__PURE__ */ new Map();
|
|
1037
|
-
return i.map(({ pricing_item_config_id: o, number: r }) => ({
|
|
1038
|
-
pricing_item_config_id: o,
|
|
1039
|
-
number: r || n.get(o) || Rn
|
|
1040
|
-
}));
|
|
1041
|
-
}
|
|
1042
|
-
const Un = "1";
|
|
1043
|
-
function Vn(e) {
|
|
1044
|
-
const i = Ut(e).flatMap((n) => n.items ?? []).flatMap(Wt);
|
|
1045
|
-
return new Map(
|
|
1046
|
-
i.flatMap(
|
|
1047
|
-
(n) => {
|
|
1048
|
-
var a;
|
|
1049
|
-
return (a = n.default_units) != null && a.number ? [[n.id, n.default_units.number]] : [];
|
|
1050
|
-
}
|
|
1051
|
-
)
|
|
1052
|
-
);
|
|
1053
|
-
}
|
|
1054
|
-
function Fn(e) {
|
|
1055
|
-
var a;
|
|
1056
|
-
const i = (a = e == null ? void 0 : e.pricing_plan_schedule) == null ? void 0 : a.units;
|
|
1057
|
-
if (!e || !(i != null && i.length))
|
|
1058
|
-
return;
|
|
1059
|
-
const n = e.pricing_plan_version ? Vn(e) : /* @__PURE__ */ new Map();
|
|
1060
|
-
return i.map(({ pricing_item_config_id: o, number: r }) => ({
|
|
1061
|
-
pricing_item_config_id: o,
|
|
1062
|
-
number: r || n.get(o) || Un
|
|
1063
|
-
}));
|
|
1064
|
-
}
|
|
1065
|
-
const et = "solvimon_checkout_redirect_state";
|
|
1066
|
-
function Gn({
|
|
1067
|
-
initialCountry: e,
|
|
1068
|
-
initialEmail: i,
|
|
1069
|
-
subscriptionId: n,
|
|
1070
|
-
enabledPricingIds: a
|
|
1071
|
-
}) {
|
|
1072
|
-
const o = Ae(), r = (() => {
|
|
1073
|
-
if (e) {
|
|
1074
|
-
if (Qe(e)) return e;
|
|
1075
|
-
o.error("INVALID_COUNTRY_CODE", `invalid country code provided: "${e}"`);
|
|
1076
|
-
}
|
|
1077
|
-
})(), u = (() => {
|
|
1078
|
-
if (i) {
|
|
1079
|
-
if (/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(i)) return i;
|
|
1080
|
-
o.error("INVALID_EMAIL", `invalid email provided: "${i}"`);
|
|
1081
|
-
}
|
|
1082
|
-
})(), s = Y(!1), d = Y(), { getSubscription: I } = bi(), g = Ln(), h = _(() => d.value && m.form.value.country && X.value), {
|
|
1083
|
-
paymentMethodOptions: C,
|
|
1084
|
-
get: f,
|
|
1085
|
-
isPending: L,
|
|
1086
|
-
error: x
|
|
1087
|
-
} = zi(), v = async (l, P) => {
|
|
1088
|
-
try {
|
|
1089
|
-
await f({
|
|
1090
|
-
subscriptionId: d.value.id,
|
|
1091
|
-
country: l,
|
|
1092
|
-
amount: P
|
|
1093
|
-
});
|
|
1094
|
-
} catch {
|
|
1095
|
-
o.error(
|
|
1096
|
-
"PAYMENT_METHOD_OPTIONS_LOAD_FAILED",
|
|
1097
|
-
"Failed to load the payment methods that can be offered",
|
|
1098
|
-
{ flow: "CHECKOUT" },
|
|
1099
|
-
x.value
|
|
1100
|
-
);
|
|
1101
|
-
}
|
|
1102
|
-
}, H = _(() => x.value !== null), z = () => {
|
|
1103
|
-
const { country: l } = m.form.value;
|
|
1104
|
-
!d.value || !l || !X.value || v(l, X.value);
|
|
1105
|
-
}, A = () => {
|
|
1106
|
-
const l = m.form.value;
|
|
1107
|
-
return g.loadInvoicePreview({
|
|
1108
|
-
subscription: d.value,
|
|
1109
|
-
customer: kt(l),
|
|
1110
|
-
seatsValues: l.seatsValues,
|
|
1111
|
-
unitsValues: l.unitsValues,
|
|
1112
|
-
enabledPricingIds: l.enabledPricingIds ?? a,
|
|
1113
|
-
promotionCode: l.promotionCode
|
|
1114
|
-
});
|
|
1115
|
-
}, E = async (l) => {
|
|
1116
|
-
const P = l.promotionCode ?? m.form.value.promotionCode, c = l.enabledPricingIds ?? m.form.value.enabledPricingIds, y = { ...m.form.value, ...l };
|
|
1117
|
-
return await g.loadInvoicePreview({
|
|
1118
|
-
subscription: d.value,
|
|
1119
|
-
customer: kt(y),
|
|
1120
|
-
seatsValues: y.seatsValues,
|
|
1121
|
-
unitsValues: y.unitsValues,
|
|
1122
|
-
enabledPricingIds: c,
|
|
1123
|
-
promotionCode: P
|
|
1124
|
-
}), {
|
|
1125
|
-
trialInvoicePreview: g.trialInvoicePreview.value,
|
|
1126
|
-
invoicePreview: g.invoicePreview.value
|
|
1127
|
-
};
|
|
1128
|
-
}, m = Sn({
|
|
1129
|
-
initialState: {
|
|
1130
|
-
country: r,
|
|
1131
|
-
email: u
|
|
1132
|
-
},
|
|
1133
|
-
onRequiredFieldChange: () => {
|
|
1134
|
-
d.value && A().catch(() => {
|
|
1135
|
-
});
|
|
1136
|
-
}
|
|
1137
|
-
}), B = async () => {
|
|
1138
|
-
var T, R, Q, F;
|
|
1139
|
-
const l = await I({
|
|
1140
|
-
id: n,
|
|
1141
|
-
expanded: !0
|
|
1142
|
-
}), P = xe({
|
|
1143
|
-
pricingPlanScheduleInfos: l.pricing_plan_schedule_infos,
|
|
1144
|
-
type: "DEFAULT"
|
|
1145
|
-
}), c = (F = (Q = (R = (T = P == null ? void 0 : P.pricing_plan_version) == null ? void 0 : T.billing_period_settings) == null ? void 0 : R.billing_periods) == null ? void 0 : Q[0]) == null ? void 0 : F.period;
|
|
1146
|
-
d.value = {
|
|
1147
|
-
...l,
|
|
1148
|
-
billing_period: c ?? l.billing_period
|
|
1149
|
-
};
|
|
1150
|
-
const y = Bn(P), D = Fn(P);
|
|
1151
|
-
m.updateInitialState({
|
|
1152
|
-
...m.form.value,
|
|
1153
|
-
enabledPricingIds: On(l, a),
|
|
1154
|
-
...y ? { seatsValues: y } : {},
|
|
1155
|
-
...D ? { unitsValues: D } : {}
|
|
1156
|
-
});
|
|
1157
|
-
}, S = _(() => {
|
|
1158
|
-
var ee, te, ie, oe, G, q, J, ae, ce;
|
|
1159
|
-
const l = m.form.value.firstName || m.form.value.infix || m.form.value.lastName ? {
|
|
1160
|
-
...m.form.value.firstName ? { first_name: m.form.value.firstName } : {},
|
|
1161
|
-
...m.form.value.infix ? { infix: m.form.value.infix } : {},
|
|
1162
|
-
...m.form.value.lastName ? { last_name: m.form.value.lastName } : {}
|
|
1163
|
-
} : {}, P = {
|
|
1164
|
-
...m.form.value.addressLine1 && {
|
|
1165
|
-
line1: m.form.value.addressLine1
|
|
1166
|
-
},
|
|
1167
|
-
...m.form.value.addressLine2 && {
|
|
1168
|
-
line2: m.form.value.addressLine2
|
|
1169
|
-
},
|
|
1170
|
-
...m.form.value.city && { city: m.form.value.city },
|
|
1171
|
-
...m.form.value.postalCode && {
|
|
1172
|
-
postal_code: m.form.value.postalCode
|
|
1173
|
-
},
|
|
1174
|
-
...m.form.value.state && { state: m.form.value.state },
|
|
1175
|
-
country: m.form.value.country ?? ""
|
|
1176
|
-
}, c = xe({
|
|
1177
|
-
pricingPlanScheduleInfos: ((ee = d.value) == null ? void 0 : ee.pricing_plan_schedule_infos) ?? [],
|
|
1178
|
-
type: "DEFAULT"
|
|
1179
|
-
}), y = (te = c == null ? void 0 : c.pricing_plan_version) == null ? void 0 : te.pricing_currency_settings, D = (((ie = y == null ? void 0 : y.pricing_currencies) == null ? void 0 : ie.length) ?? 0) > 1, R = (((G = (oe = c == null ? void 0 : c.pricing_plan_version) == null ? void 0 : oe.billing_period_settings) == null ? void 0 : G.billing_periods) ?? []).length > 1, Q = Bt({
|
|
1180
|
-
enabledPricings: (q = m.form.value.enabledPricingIds) == null ? void 0 : q.map((ue) => ({
|
|
1181
|
-
pricing_id: ue
|
|
1182
|
-
})),
|
|
1183
|
-
seatsValues: m.form.value.seatsValues,
|
|
1184
|
-
unitsValues: m.form.value.unitsValues,
|
|
1185
|
-
pricingPlanScheduleInfos: ((J = d.value) == null ? void 0 : J.pricing_plan_schedule_infos) ?? [],
|
|
1186
|
-
pricingCurrency: D ? (ae = d.value) == null ? void 0 : ae.billing_currency : void 0,
|
|
1187
|
-
billingPeriod: R ? (ce = d.value) == null ? void 0 : ce.billing_period : void 0
|
|
1188
|
-
}), F = m.form.value.promotionCode, ne = F && d.value ? (() => {
|
|
1189
|
-
var Le, Te, Re;
|
|
1190
|
-
const ue = Q ? [...Q] : [], ve = ((Le = ue[0]) == null ? void 0 : Le.pricing_plan_schedule_id) ?? ((Re = xe({
|
|
1191
|
-
pricingPlanScheduleInfos: ((Te = d.value) == null ? void 0 : Te.pricing_plan_schedule_infos) ?? [],
|
|
1192
|
-
type: "DEFAULT"
|
|
1193
|
-
})) == null ? void 0 : Re.id);
|
|
1194
|
-
if (!ve)
|
|
1195
|
-
return Q;
|
|
1196
|
-
const fe = ue.find(
|
|
1197
|
-
({ pricing_plan_schedule_id: re }) => re === ve
|
|
1198
|
-
);
|
|
1199
|
-
if (fe)
|
|
1200
|
-
fe.promotion_codes = [F];
|
|
1201
|
-
else {
|
|
1202
|
-
const re = Q == null ? void 0 : Q[0];
|
|
1203
|
-
ue.push({
|
|
1204
|
-
pricing_plan_schedule_id: ve,
|
|
1205
|
-
...(re == null ? void 0 : re.enabled_pricings) && {
|
|
1206
|
-
enabled_pricings: re.enabled_pricings
|
|
1207
|
-
},
|
|
1208
|
-
...(re == null ? void 0 : re.seats_values) && {
|
|
1209
|
-
seats_values: re.seats_values
|
|
1210
|
-
},
|
|
1211
|
-
...(re == null ? void 0 : re.units) && {
|
|
1212
|
-
units: re.units
|
|
1213
|
-
},
|
|
1214
|
-
promotion_codes: [F]
|
|
1215
|
-
});
|
|
1216
|
-
}
|
|
1217
|
-
return ue;
|
|
1218
|
-
})() : Q;
|
|
1219
|
-
return {
|
|
1220
|
-
type: "INIT_PRICING_PLAN_SUBSCRIPTION",
|
|
1221
|
-
init_pricing_plan_subscription: {
|
|
1222
|
-
template_pricing_plan_subscription_id: n,
|
|
1223
|
-
...ne && {
|
|
1224
|
-
pricing_plan_schedule_customizations: ne
|
|
1225
|
-
},
|
|
1226
|
-
customer_details: {
|
|
1227
|
-
email: m.form.value.email ?? "",
|
|
1228
|
-
type: m.form.value.type,
|
|
1229
|
-
...m.form.value.type === "INDIVIDUAL" ? {
|
|
1230
|
-
individual: {
|
|
1231
|
-
residential_address: P,
|
|
1232
|
-
...l ? { name: l } : {}
|
|
1233
|
-
}
|
|
1234
|
-
} : {
|
|
1235
|
-
organization: {
|
|
1236
|
-
registered_address: P,
|
|
1237
|
-
legal_name: m.form.value.companyLegalName ?? "",
|
|
1238
|
-
...m.form.value.companyVatNumber && ot.$validator(m.form.value.companyVatNumber, {}, {}) ? {
|
|
1239
|
-
tax_ids: [
|
|
1240
|
-
{
|
|
1241
|
-
id: m.form.value.companyVatNumber,
|
|
1242
|
-
type: Xt
|
|
1243
|
-
}
|
|
1244
|
-
]
|
|
1245
|
-
} : {}
|
|
1246
|
-
}
|
|
1247
|
-
}
|
|
1248
|
-
}
|
|
1249
|
-
}
|
|
1250
|
-
};
|
|
1251
|
-
}), X = _(() => {
|
|
1252
|
-
var l, P;
|
|
1253
|
-
return ((l = g.trialInvoicePreview.value) == null ? void 0 : l.invoice_amount_including_tax) ?? ((P = g.invoicePreview.value) == null ? void 0 : P.invoice_amount_including_tax);
|
|
1254
|
-
});
|
|
1255
|
-
Oe(
|
|
1256
|
-
[() => m.form.value.country, X],
|
|
1257
|
-
([l, P]) => {
|
|
1258
|
-
!d.value || !l || !P || v(l, P);
|
|
1259
|
-
}
|
|
1260
|
-
);
|
|
1261
|
-
function de() {
|
|
1262
|
-
sessionStorage.setItem(et, JSON.stringify(m.form.value));
|
|
1263
|
-
}
|
|
1264
|
-
return je(async () => {
|
|
1265
|
-
const l = Se("redirect_status"), P = !!Se(Vi), c = !!Se("payment_intent_client_secret") || !!Se("setup_intent_client_secret");
|
|
1266
|
-
l === "succeeded" && P && c && (s.value = !0);
|
|
1267
|
-
const D = sessionStorage.getItem(et);
|
|
1268
|
-
let T = null;
|
|
1269
|
-
if (D)
|
|
1270
|
-
try {
|
|
1271
|
-
T = JSON.parse(D);
|
|
1272
|
-
} catch {
|
|
1273
|
-
}
|
|
1274
|
-
T && m.updateInitialState(T);
|
|
1275
|
-
try {
|
|
1276
|
-
await B();
|
|
1277
|
-
} catch (R) {
|
|
1278
|
-
throw o.error(
|
|
1279
|
-
"SUBSCRIPTION_LOAD_FAILED",
|
|
1280
|
-
"Failed to load the subscription the checkout prices",
|
|
1281
|
-
{},
|
|
1282
|
-
R
|
|
1283
|
-
), R;
|
|
1284
|
-
}
|
|
1285
|
-
try {
|
|
1286
|
-
await A();
|
|
1287
|
-
} catch {
|
|
1288
|
-
}
|
|
1289
|
-
T && (m.updateInitialState(T), sessionStorage.removeItem(et));
|
|
1290
|
-
}), Oe(
|
|
1291
|
-
h,
|
|
1292
|
-
(l) => {
|
|
1293
|
-
l && z();
|
|
1294
|
-
},
|
|
1295
|
-
{ once: !0 }
|
|
1296
|
-
), {
|
|
1297
|
-
/** What the host configured, once anything unusable has been dropped and reported. */
|
|
1298
|
-
validatedEmail: u,
|
|
1299
|
-
validatedCountry: r,
|
|
1300
|
-
invoicePreview: g.invoicePreview,
|
|
1301
|
-
invoicePreviewByBillingPeriod: g.invoicePreviewByBillingPeriod,
|
|
1302
|
-
trialInvoicePreview: g.trialInvoicePreview,
|
|
1303
|
-
trialPeriod: g.trialPeriod,
|
|
1304
|
-
loadInvoicePreview: A,
|
|
1305
|
-
updateInvoicePreviewOnBillingInformationChange: E,
|
|
1306
|
-
lastPreviewScheduleId: g.lastPreviewScheduleId,
|
|
1307
|
-
paymentMethodOptions: C,
|
|
1308
|
-
hasPaymentMethodOptionsError: H,
|
|
1309
|
-
retryPaymentMethodOptions: z,
|
|
1310
|
-
isPaymentMethodsPending: L,
|
|
1311
|
-
isInvoicePreviewPending: g.isPending,
|
|
1312
|
-
subscription: d,
|
|
1313
|
-
checkoutForm: m,
|
|
1314
|
-
authorizationContext: S,
|
|
1315
|
-
isPaid: s,
|
|
1316
|
-
amount: X,
|
|
1317
|
-
saveFormStateForRedirect: de
|
|
1318
|
-
};
|
|
1319
|
-
}
|
|
1320
|
-
function Yn({
|
|
1321
|
-
checkoutForm: e,
|
|
1322
|
-
updateInvoicePreviewOnBillingInformationChange: i,
|
|
1323
|
-
formatErrorMessage: n,
|
|
1324
|
-
onInvalidPromotionCode: a,
|
|
1325
|
-
onApplyError: o
|
|
1326
|
-
}) {
|
|
1327
|
-
const r = Ae(), u = Y(!1), s = Y(null), d = (C, f) => {
|
|
1328
|
-
s.value = n ? n({ action: C, error: f }) : C === "apply" ? "Promotion code could not be applied. Please try again." : "Promotion code could not be removed. Please try again.";
|
|
1329
|
-
}, I = (C) => Kn(C) && C.field === "promotion_codes", g = async (C) => {
|
|
1330
|
-
const f = C == null ? void 0 : C.trim();
|
|
1331
|
-
if (f) {
|
|
1332
|
-
s.value = null, e.form.value.promotionCode = f, u.value = !0;
|
|
1333
|
-
try {
|
|
1334
|
-
await i({
|
|
1335
|
-
promotionCode: f
|
|
1336
|
-
});
|
|
1337
|
-
} catch (L) {
|
|
1338
|
-
r.capture(L, {
|
|
1339
|
-
code: "PROMOTION_CODE_APPLY_FAILED",
|
|
1340
|
-
message: "Failed to apply promotion code"
|
|
1341
|
-
}), d("apply", L), o == null || o(), I(L) && (a == null || a()), await h({ suppressError: !0, preserveErrorMessage: !0 });
|
|
1342
|
-
} finally {
|
|
1343
|
-
u.value = !1;
|
|
1344
|
-
}
|
|
1345
|
-
}
|
|
1346
|
-
}, h = async ({
|
|
1347
|
-
suppressError: C = !1,
|
|
1348
|
-
preserveErrorMessage: f = !1
|
|
1349
|
-
} = {}) => {
|
|
1350
|
-
f || (s.value = null), delete e.form.value.promotionCode, u.value = !0;
|
|
1351
|
-
try {
|
|
1352
|
-
await i({});
|
|
1353
|
-
} catch (L) {
|
|
1354
|
-
r.capture(L, {
|
|
1355
|
-
code: "PROMOTION_CODE_REMOVE_FAILED",
|
|
1356
|
-
message: "Failed to remove promotion code"
|
|
1357
|
-
}), C || d("remove", L);
|
|
1358
|
-
} finally {
|
|
1359
|
-
u.value = !1;
|
|
1360
|
-
}
|
|
1361
|
-
};
|
|
1362
|
-
return {
|
|
1363
|
-
applyPromotionCode: g,
|
|
1364
|
-
removePromotionCode: h,
|
|
1365
|
-
isPromotionCodePending: u,
|
|
1366
|
-
promotionCodeErrorMessage: s
|
|
1367
|
-
};
|
|
1368
|
-
}
|
|
1369
|
-
function Kn(e) {
|
|
1370
|
-
return typeof e == "object" && e !== null && "field" in e;
|
|
1371
|
-
}
|
|
1372
|
-
function Hn({
|
|
1373
|
-
subscription: e,
|
|
1374
|
-
promotionCode: i,
|
|
1375
|
-
appliedPromotionCode: n,
|
|
1376
|
-
applyPromotionCode: a
|
|
1377
|
-
}) {
|
|
1378
|
-
Oe(
|
|
1379
|
-
e,
|
|
1380
|
-
(o) => {
|
|
1381
|
-
o && i && (n.value = i, a(i));
|
|
1382
|
-
},
|
|
1383
|
-
{ once: !0 }
|
|
1384
|
-
);
|
|
1385
|
-
}
|
|
1386
|
-
const Qn = { class: "flex items-center gap-2" }, Zn = /* @__PURE__ */ se({
|
|
1387
|
-
__name: "TaxIDCheckNotice",
|
|
1388
|
-
props: {
|
|
1389
|
-
taxIdValidationResult: { type: Object }
|
|
1390
|
-
},
|
|
1391
|
-
setup(e) {
|
|
1392
|
-
const i = e, { formatMessage: n } = he(), a = _(() => i.taxIdValidationResult.valid === "VALID"), o = _(() => a.value ? n({
|
|
1393
|
-
defaultMessage: "VAT number is valid.",
|
|
1394
|
-
id: "tax_check.valid_vat_number",
|
|
1395
|
-
description: "The message shown when the VAT number is valid"
|
|
1396
|
-
}) : n({
|
|
1397
|
-
defaultMessage: "VAT number is invalid.",
|
|
1398
|
-
id: "tax_check.invalid_vat_number",
|
|
1399
|
-
description: "The message shown when the VAT number is invalid"
|
|
1400
|
-
}));
|
|
1401
|
-
return (r, u) => (p(), O(t(Hi), {
|
|
1402
|
-
type: a.value ? "success" : "danger",
|
|
1403
|
-
icon: !1
|
|
1404
|
-
}, {
|
|
1405
|
-
default: b(() => [
|
|
1406
|
-
w("div", Qn, [
|
|
1407
|
-
M(t(le), { variant: "body-xs" }, {
|
|
1408
|
-
default: b(() => [
|
|
1409
|
-
K(V(o.value), 1)
|
|
1410
|
-
]),
|
|
1411
|
-
_: 1
|
|
1412
|
-
})
|
|
1413
|
-
])
|
|
1414
|
-
]),
|
|
1415
|
-
_: 1
|
|
1416
|
-
}, 8, ["type"]));
|
|
1417
|
-
}
|
|
1418
|
-
});
|
|
1419
|
-
function Xn(e) {
|
|
1420
|
-
const { checkTaxID: i } = Qi(), n = Y(void 0), a = _(() => {
|
|
1421
|
-
var h;
|
|
1422
|
-
return ((h = e.value.companyVatNumber) == null ? void 0 : h.trim()) ?? "";
|
|
1423
|
-
}), o = _(() => e.value.companyLegalName ?? ""), r = _(() => e.value.country), u = Y(!1), s = _(() => Ft(r.value ?? "")), d = _(
|
|
1424
|
-
() => !!(a.value && o.value && r.value)
|
|
1425
|
-
), I = _(() => s.value && a.value);
|
|
1426
|
-
async function g() {
|
|
1427
|
-
var h;
|
|
1428
|
-
if (!(!d.value || !s.value || !r.value)) {
|
|
1429
|
-
u.value = !0;
|
|
1430
|
-
try {
|
|
1431
|
-
const C = await i({
|
|
1432
|
-
type: "ORGANIZATION",
|
|
1433
|
-
organization: {
|
|
1434
|
-
legal_name: o.value,
|
|
1435
|
-
tax_ids: [{ id: a.value, type: "GENERIC_TAX_ID" }],
|
|
1436
|
-
registered_address: {
|
|
1437
|
-
country: r.value
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
});
|
|
1441
|
-
(h = C == null ? void 0 : C.data) != null && h.length ? n.value = C.data[0] : n.value = void 0;
|
|
1442
|
-
} finally {
|
|
1443
|
-
u.value = !1;
|
|
1444
|
-
}
|
|
1445
|
-
}
|
|
1446
|
-
}
|
|
1447
|
-
return {
|
|
1448
|
-
runTaxIDCheck: g,
|
|
1449
|
-
taxIdValidationData: n,
|
|
1450
|
-
isTaxIDCheckPending: u,
|
|
1451
|
-
isTaxIDCheckEnabled: d,
|
|
1452
|
-
showViesCheckNotice: I,
|
|
1453
|
-
isSelectedCountryEU: s
|
|
1454
|
-
};
|
|
1455
|
-
}
|
|
1456
|
-
const Wn = { class: "grid grid-cols-1 gap-1" }, qn = { class: "grid grid-cols-1 gap-2" }, Jn = { key: 0 }, eo = { class: "mt-2 flex flex-col gap-3" }, to = { class: "grid grid-cols-3 gap-2" }, io = { key: 0 }, no = { class: "mt-4 grid grid-cols-1 gap-3" }, oo = "checkout-form", ao = /* @__PURE__ */ se({
|
|
1457
|
-
__name: "CheckoutForm",
|
|
1458
|
-
props: /* @__PURE__ */ At({
|
|
1459
|
-
validation: { type: null },
|
|
1460
|
-
initialState: { type: Object },
|
|
1461
|
-
readOnlyEmail: { type: String },
|
|
1462
|
-
showCustomerInfoOnTop: { type: Boolean },
|
|
1463
|
-
isBillingInformationMandatory: { type: Boolean },
|
|
1464
|
-
getIsFieldRequired: { type: Function },
|
|
1465
|
-
readOnly: { type: Boolean }
|
|
1466
|
-
}, {
|
|
1467
|
-
modelValue: { required: !0 },
|
|
1468
|
-
modelModifiers: {}
|
|
1469
|
-
}),
|
|
1470
|
-
emits: /* @__PURE__ */ At(["submit"], ["update:modelValue"]),
|
|
1471
|
-
setup(e) {
|
|
1472
|
-
const i = (z) => Qe(z), n = e, a = Y(!1), o = di(e, "modelValue"), r = _({
|
|
1473
|
-
get: () => o.value.type === "ORGANIZATION",
|
|
1474
|
-
set: (z) => {
|
|
1475
|
-
o.value.type = z ? "ORGANIZATION" : "INDIVIDUAL";
|
|
1476
|
-
}
|
|
1477
|
-
}), u = _(() => o.value.type === "ORGANIZATION"), s = pi({
|
|
1478
|
-
email: Me(o, "email", ge),
|
|
1479
|
-
addressLine1: Me(o, "addressLine1", ge),
|
|
1480
|
-
addressLine2: Me(o, "addressLine2", ge),
|
|
1481
|
-
postalCode: Me(o, "postalCode", ge),
|
|
1482
|
-
city: Me(o, "city", ge),
|
|
1483
|
-
state: Me(o, "state", ge),
|
|
1484
|
-
companyLegalName: Me(o, "companyLegalName", ge),
|
|
1485
|
-
companyVatNumber: Me(o, "companyVatNumber", ge)
|
|
1486
|
-
}), d = _({
|
|
1487
|
-
get: () => o.value.country,
|
|
1488
|
-
set: (z) => {
|
|
1489
|
-
const A = ge(z);
|
|
1490
|
-
o.value.country = A !== void 0 && i(A) ? A : void 0;
|
|
1491
|
-
}
|
|
1492
|
-
}), I = _(() => o.value.country !== "US"), { isTaxIDCheckEnabled: g, isTaxIDCheckPending: h, taxIdValidationData: C, runTaxIDCheck: f } = Xn(o), { $t: L } = he(), x = wi(), v = (z) => n.getIsFieldRequired(z) ? "" : " " + L({
|
|
1493
|
-
defaultMessage: "(optional)",
|
|
1494
|
-
id: "checkout.optional_suffix.label",
|
|
1495
|
-
description: "The suffix for optional fields in the checkout form"
|
|
1496
|
-
}), H = _(
|
|
1497
|
-
() => o.value.country ? Ki(o.value.country) : void 0
|
|
1498
|
-
);
|
|
1499
|
-
return (z, A) => (p(), $("form", {
|
|
1500
|
-
id: oo,
|
|
1501
|
-
onSubmit: A[12] || (A[12] = Fe((E) => z.$emit("submit", o.value), ["prevent"]))
|
|
1502
|
-
}, [
|
|
1503
|
-
w("div", Wn, [
|
|
1504
|
-
M(t(ye), {
|
|
1505
|
-
title: t(x).contactInformationTitle
|
|
1506
|
-
}, {
|
|
1507
|
-
default: b(() => [
|
|
1508
|
-
w("div", qn, [
|
|
1509
|
-
e.readOnly ? (p(), $(me, { key: 0 }, [
|
|
1510
|
-
M(t(le), {
|
|
1511
|
-
variant: "body",
|
|
1512
|
-
tag: "span",
|
|
1513
|
-
weight: "semibold",
|
|
1514
|
-
"no-spacing": ""
|
|
1515
|
-
}, {
|
|
1516
|
-
default: b(() => [
|
|
1517
|
-
K(V(o.value.email), 1)
|
|
1518
|
-
]),
|
|
1519
|
-
_: 1
|
|
1520
|
-
}),
|
|
1521
|
-
M(t(le), {
|
|
1522
|
-
variant: "body-sm",
|
|
1523
|
-
tag: "span",
|
|
1524
|
-
color: "subtle",
|
|
1525
|
-
"no-spacing": ""
|
|
1526
|
-
}, {
|
|
1527
|
-
default: b(() => [
|
|
1528
|
-
K(V(H.value), 1)
|
|
1529
|
-
]),
|
|
1530
|
-
_: 1
|
|
1531
|
-
})
|
|
1532
|
-
], 64)) : (p(), $(me, { key: 1 }, [
|
|
1533
|
-
M(t(_e), {
|
|
1534
|
-
modelValue: s.email,
|
|
1535
|
-
"onUpdate:modelValue": A[0] || (A[0] = (E) => s.email = E),
|
|
1536
|
-
required: "",
|
|
1537
|
-
type: "email",
|
|
1538
|
-
name: "email",
|
|
1539
|
-
disabled: !!e.readOnlyEmail,
|
|
1540
|
-
label: t(x).emailLabel,
|
|
1541
|
-
placeholder: t(x).emailPlaceholder + v("email"),
|
|
1542
|
-
error: e.validation.value.email.$errors
|
|
1543
|
-
}, null, 8, ["modelValue", "disabled", "label", "placeholder", "error"]),
|
|
1544
|
-
M(t(Si), {
|
|
1545
|
-
"single-model-value": d.value,
|
|
1546
|
-
"onUpdate:singleModelValue": A[3] || (A[3] = (E) => d.value = E),
|
|
1547
|
-
required: "",
|
|
1548
|
-
name: "country",
|
|
1549
|
-
label: t(x).countryLabel + v("country"),
|
|
1550
|
-
error: e.validation.value.country.$errors
|
|
1551
|
-
}, {
|
|
1552
|
-
"label-suffix": b(() => [
|
|
1553
|
-
!a.value && !e.isBillingInformationMandatory ? (p(), O(t(Ne), {
|
|
1554
|
-
key: 0,
|
|
1555
|
-
size: "xs",
|
|
1556
|
-
intent: "subtle",
|
|
1557
|
-
"icon-prefix": "add",
|
|
1558
|
-
class: "py-0.5",
|
|
1559
|
-
onClick: A[1] || (A[1] = (E) => a.value = !0)
|
|
1560
|
-
}, {
|
|
1561
|
-
default: b(() => [
|
|
1562
|
-
K(V(t(L)({
|
|
1563
|
-
defaultMessage: "More billing details",
|
|
1564
|
-
description: "Label of the button in the checkout that lets you fill out all billing details",
|
|
1565
|
-
id: "checkout.billing_details.add_billing_details_button.label"
|
|
1566
|
-
})), 1)
|
|
1567
|
-
]),
|
|
1568
|
-
_: 1
|
|
1569
|
-
})) : U("", !0),
|
|
1570
|
-
a.value && !e.isBillingInformationMandatory ? (p(), O(t(Ne), {
|
|
1571
|
-
key: 1,
|
|
1572
|
-
size: "sm",
|
|
1573
|
-
intent: "subtle",
|
|
1574
|
-
"icon-prefix": "close",
|
|
1575
|
-
class: "py-0.5",
|
|
1576
|
-
onClick: A[2] || (A[2] = (E) => a.value = !1)
|
|
1577
|
-
}, {
|
|
1578
|
-
default: b(() => [
|
|
1579
|
-
K(V(t(L)({
|
|
1580
|
-
defaultMessage: "Remove billing details",
|
|
1581
|
-
id: "checkout.billing_details.remove_billing_details_button.label",
|
|
1582
|
-
description: "Label of the button in the checkout that lets you remove the billing details"
|
|
1583
|
-
})), 1)
|
|
1584
|
-
]),
|
|
1585
|
-
_: 1
|
|
1586
|
-
})) : U("", !0)
|
|
1587
|
-
]),
|
|
1588
|
-
_: 1
|
|
1589
|
-
}, 8, ["single-model-value", "label", "error"])
|
|
1590
|
-
], 64))
|
|
1591
|
-
]),
|
|
1592
|
-
M(t(xt), {
|
|
1593
|
-
"is-open": a.value || !!e.isBillingInformationMandatory
|
|
1594
|
-
}, {
|
|
1595
|
-
default: b(() => [
|
|
1596
|
-
a.value || e.isBillingInformationMandatory ? (p(), $("div", Jn, [
|
|
1597
|
-
w("div", eo, [
|
|
1598
|
-
M(t(_e), {
|
|
1599
|
-
modelValue: s.addressLine1,
|
|
1600
|
-
"onUpdate:modelValue": A[4] || (A[4] = (E) => s.addressLine1 = E),
|
|
1601
|
-
name: "address_line_1",
|
|
1602
|
-
label: t(L)({
|
|
1603
|
-
defaultMessage: "Billing address",
|
|
1604
|
-
id: "checkout.address.title",
|
|
1605
|
-
description: "Address line 1 of the customer address in the checkout form"
|
|
1606
|
-
}),
|
|
1607
|
-
placeholder: t(L)({
|
|
1608
|
-
defaultMessage: "Address line 1...",
|
|
1609
|
-
id: "checkout.address.line1.placeholder",
|
|
1610
|
-
description: "Address line 1 of the customer address in the checkout form"
|
|
1611
|
-
}) + v("addressLine1"),
|
|
1612
|
-
required: "",
|
|
1613
|
-
error: e.validation.value.addressLine1.$errors
|
|
1614
|
-
}, null, 8, ["modelValue", "label", "placeholder", "error"]),
|
|
1615
|
-
M(t(_e), {
|
|
1616
|
-
modelValue: s.addressLine2,
|
|
1617
|
-
"onUpdate:modelValue": A[5] || (A[5] = (E) => s.addressLine2 = E),
|
|
1618
|
-
name: "address_line_2",
|
|
1619
|
-
placeholder: t(L)({
|
|
1620
|
-
defaultMessage: "Address line 2...",
|
|
1621
|
-
id: "checkout.address.line2.placeholder",
|
|
1622
|
-
description: "Address line 2 of the customer address in the checkout form"
|
|
1623
|
-
}) + v("addressLine2")
|
|
1624
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
1625
|
-
w("div", to, [
|
|
1626
|
-
M(t(_e), {
|
|
1627
|
-
modelValue: s.postalCode,
|
|
1628
|
-
"onUpdate:modelValue": A[6] || (A[6] = (E) => s.postalCode = E),
|
|
1629
|
-
name: "postal_code",
|
|
1630
|
-
placeholder: t(x).postalCodePlaceholder + v("postalCode"),
|
|
1631
|
-
error: e.validation.value.addressLine1.$errors
|
|
1632
|
-
}, null, 8, ["modelValue", "placeholder", "error"]),
|
|
1633
|
-
M(t(_e), {
|
|
1634
|
-
modelValue: s.city,
|
|
1635
|
-
"onUpdate:modelValue": A[7] || (A[7] = (E) => s.city = E),
|
|
1636
|
-
name: "city",
|
|
1637
|
-
placeholder: t(x).cityPlaceholder + v("city")
|
|
1638
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
1639
|
-
M(t(_e), {
|
|
1640
|
-
modelValue: s.state,
|
|
1641
|
-
"onUpdate:modelValue": A[8] || (A[8] = (E) => s.state = E),
|
|
1642
|
-
name: "state",
|
|
1643
|
-
placeholder: t(x).statePlaceholder + v("state"),
|
|
1644
|
-
error: e.validation.value.state.$errors
|
|
1645
|
-
}, null, 8, ["modelValue", "placeholder", "error"])
|
|
1646
|
-
])
|
|
1647
|
-
])
|
|
1648
|
-
])) : U("", !0)
|
|
1649
|
-
]),
|
|
1650
|
-
_: 1
|
|
1651
|
-
}, 8, ["is-open"])
|
|
1652
|
-
]),
|
|
1653
|
-
_: 1
|
|
1654
|
-
}, 8, ["title"]),
|
|
1655
|
-
e.readOnly ? U("", !0) : (p(), O(t(ye), { key: 0 }, {
|
|
1656
|
-
default: b(() => [
|
|
1657
|
-
M(ki, {
|
|
1658
|
-
modelValue: r.value,
|
|
1659
|
-
"onUpdate:modelValue": A[9] || (A[9] = (E) => r.value = E),
|
|
1660
|
-
"no-spacing": "",
|
|
1661
|
-
class: "!flex"
|
|
1662
|
-
}, null, 8, ["modelValue"]),
|
|
1663
|
-
M(t(xt), { "is-open": u.value }, {
|
|
1664
|
-
default: b(() => [
|
|
1665
|
-
u.value ? (p(), $("div", io, [
|
|
1666
|
-
w("div", no, [
|
|
1667
|
-
M(t(_e), {
|
|
1668
|
-
modelValue: s.companyLegalName,
|
|
1669
|
-
"onUpdate:modelValue": A[10] || (A[10] = (E) => s.companyLegalName = E),
|
|
1670
|
-
required: "",
|
|
1671
|
-
name: "legal_name",
|
|
1672
|
-
label: t(x).legalNameLabel,
|
|
1673
|
-
placeholder: t(x).legalNamePlaceholder
|
|
1674
|
-
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
1675
|
-
I.value ? (p(), O(t(_e), {
|
|
1676
|
-
key: 0,
|
|
1677
|
-
modelValue: s.companyVatNumber,
|
|
1678
|
-
"onUpdate:modelValue": A[11] || (A[11] = (E) => s.companyVatNumber = E),
|
|
1679
|
-
name: "vat_number",
|
|
1680
|
-
"input-class": "focus:outline-none focus:ring-0",
|
|
1681
|
-
label: t(x).vatNumberLabel,
|
|
1682
|
-
placeholder: t(x).vatNumberPlaceholder,
|
|
1683
|
-
error: e.validation.value.companyVatNumber.$errors,
|
|
1684
|
-
"suffix-class": "px-2 border-l-0"
|
|
1685
|
-
}, Ye({ _: 2 }, [
|
|
1686
|
-
t(Ft)(o.value.country ?? "") ? {
|
|
1687
|
-
name: "suffix",
|
|
1688
|
-
fn: b(() => [
|
|
1689
|
-
M(t(Ne), {
|
|
1690
|
-
type: "button",
|
|
1691
|
-
size: "sm",
|
|
1692
|
-
intent: "secondary",
|
|
1693
|
-
disabled: !t(g) || t(h) || e.validation.value.companyVatNumber.$invalid,
|
|
1694
|
-
onClick: t(f)
|
|
1695
|
-
}, {
|
|
1696
|
-
default: b(() => [
|
|
1697
|
-
K(V(t(L)({
|
|
1698
|
-
defaultMessage: "Check",
|
|
1699
|
-
id: "checkout.vat_number.check_button.label",
|
|
1700
|
-
description: "The label for the check button in the checkout form"
|
|
1701
|
-
})), 1)
|
|
1702
|
-
]),
|
|
1703
|
-
_: 1
|
|
1704
|
-
}, 8, ["disabled", "onClick"])
|
|
1705
|
-
]),
|
|
1706
|
-
key: "0"
|
|
1707
|
-
} : void 0
|
|
1708
|
-
]), 1032, ["modelValue", "label", "placeholder", "error"])) : U("", !0),
|
|
1709
|
-
t(C) ? (p(), $("div", {
|
|
1710
|
-
key: 1,
|
|
1711
|
-
class: Ie({ "opacity-75": t(h) })
|
|
1712
|
-
}, [
|
|
1713
|
-
M(Zn, { "tax-id-validation-result": t(C) }, null, 8, ["tax-id-validation-result"])
|
|
1714
|
-
], 2)) : U("", !0)
|
|
1715
|
-
])
|
|
1716
|
-
])) : U("", !0)
|
|
1717
|
-
]),
|
|
1718
|
-
_: 1
|
|
1719
|
-
}, 8, ["is-open"])
|
|
1720
|
-
]),
|
|
1721
|
-
_: 1
|
|
1722
|
-
}))
|
|
1723
|
-
])
|
|
1724
|
-
], 32));
|
|
1725
|
-
}
|
|
1726
|
-
}), ro = {
|
|
1727
|
-
key: 0,
|
|
1728
|
-
class: "flex items-center"
|
|
1729
|
-
}, lo = ["innerHTML"], so = ["innerHTML"], co = /* @__PURE__ */ se({
|
|
1730
|
-
__name: "CheckoutTitle",
|
|
1731
|
-
props: {
|
|
1732
|
-
trialPeriod: { type: Object },
|
|
1733
|
-
subscriptionName: { type: String },
|
|
1734
|
-
amount: { type: Object },
|
|
1735
|
-
billingPeriod: { type: Object },
|
|
1736
|
-
countryCode: { type: null },
|
|
1737
|
-
trialStartDate: { type: Date },
|
|
1738
|
-
subscriptionStartDate: { type: Date }
|
|
1739
|
-
},
|
|
1740
|
-
setup(e) {
|
|
1741
|
-
const { $t: i } = he();
|
|
1742
|
-
return (n, a) => (p(), $("div", null, [
|
|
1743
|
-
w("div", null, [
|
|
1744
|
-
M(t(le), {
|
|
1745
|
-
variant: "heading-1",
|
|
1746
|
-
class: "inline-block"
|
|
1747
|
-
}, {
|
|
1748
|
-
default: b(() => [
|
|
1749
|
-
K(V(e.trialStartDate ? e.subscriptionName : t(i)({
|
|
1750
|
-
defaultMessage: "Pay and subscribe",
|
|
1751
|
-
id: "checkout.page_title",
|
|
1752
|
-
description: "The title of the checkout page"
|
|
1753
|
-
})) + V(" "), 1),
|
|
1754
|
-
e.trialPeriod ? (p(), O(t(Ai), {
|
|
1755
|
-
key: 0,
|
|
1756
|
-
"trial-period": e.trialPeriod,
|
|
1757
|
-
size: "lg",
|
|
1758
|
-
class: "-translate-y-0.5"
|
|
1759
|
-
}, null, 8, ["trial-period"])) : U("", !0)
|
|
1760
|
-
]),
|
|
1761
|
-
_: 1
|
|
1762
|
-
})
|
|
1763
|
-
]),
|
|
1764
|
-
M(t(le), {
|
|
1765
|
-
variant: "body-sm",
|
|
1766
|
-
color: "subtle",
|
|
1767
|
-
"no-spacing": ""
|
|
1768
|
-
}, {
|
|
1769
|
-
default: b(() => [
|
|
1770
|
-
e.countryCode ? (p(), $("span", {
|
|
1771
|
-
key: 1,
|
|
1772
|
-
innerHTML: e.trialStartDate ? t(i)(
|
|
1773
|
-
{
|
|
1774
|
-
defaultMessage: "You will be billed <strong>{price}</strong> per {period_name}, starting {startDate, date, long}.",
|
|
1775
|
-
id: "checkout.trial_period_description",
|
|
1776
|
-
description: "The description of the trial period"
|
|
1777
|
-
},
|
|
1778
|
-
{
|
|
1779
|
-
price: t(De)(e.amount),
|
|
1780
|
-
// @ts-expect-error formatjs does not support this type yet
|
|
1781
|
-
startDate: e.subscriptionStartDate,
|
|
1782
|
-
period_name: t($e)(e.billingPeriod, {
|
|
1783
|
-
short: !0,
|
|
1784
|
-
hideValueForExactPeriods: !0
|
|
1785
|
-
}),
|
|
1786
|
-
// @ts-ignore
|
|
1787
|
-
strong: (o) => `<strong>${o}</strong>`
|
|
1788
|
-
}
|
|
1789
|
-
) : t(i)(
|
|
1790
|
-
{
|
|
1791
|
-
defaultMessage: "You will be billed <strong>{price}</strong> per {period_name}, starting today.",
|
|
1792
|
-
id: "checkout.subscription_description",
|
|
1793
|
-
description: "The description of the subscription"
|
|
1794
|
-
},
|
|
1795
|
-
{
|
|
1796
|
-
price: t(De)(e.amount),
|
|
1797
|
-
period_name: t($e)(e.billingPeriod, {
|
|
1798
|
-
short: !0,
|
|
1799
|
-
hideValueForExactPeriods: !0
|
|
1800
|
-
}),
|
|
1801
|
-
// @ts-ignore
|
|
1802
|
-
strong: (o) => `<strong>${o}</strong>`
|
|
1803
|
-
}
|
|
1804
|
-
)
|
|
1805
|
-
}, null, 8, so)) : (p(), $("span", ro, [
|
|
1806
|
-
M(t(qi), { "is-dark-mode": "" }, {
|
|
1807
|
-
tooltip: b(() => [
|
|
1808
|
-
M(t(Ji), null, {
|
|
1809
|
-
default: b(() => [
|
|
1810
|
-
M(t(en), null, {
|
|
1811
|
-
default: b(() => [
|
|
1812
|
-
K(V(t(i)({
|
|
1813
|
-
defaultMessage: "Will be determined by billing information",
|
|
1814
|
-
description: "Tooltip content for the invoice preview when taxes are not determined by billing information",
|
|
1815
|
-
id: "invoice_preview.taxes_not_determined_by_billing_information_tooltip"
|
|
1816
|
-
})), 1)
|
|
1817
|
-
]),
|
|
1818
|
-
_: 1
|
|
1819
|
-
})
|
|
1820
|
-
]),
|
|
1821
|
-
_: 1
|
|
1822
|
-
})
|
|
1823
|
-
]),
|
|
1824
|
-
default: b(() => [
|
|
1825
|
-
M(t(Zi), {
|
|
1826
|
-
"width-class": "w-10",
|
|
1827
|
-
"height-class": "h-4",
|
|
1828
|
-
shade: "darker",
|
|
1829
|
-
class: "mr-1.5 inline-block"
|
|
1830
|
-
})
|
|
1831
|
-
]),
|
|
1832
|
-
_: 1
|
|
1833
|
-
}),
|
|
1834
|
-
w("span", {
|
|
1835
|
-
innerHTML: e.trialStartDate ? t(i)(
|
|
1836
|
-
{
|
|
1837
|
-
defaultMessage: "per {period_name} starting, {startDate, date, long}",
|
|
1838
|
-
id: "checkout.trial_period_description_without_price",
|
|
1839
|
-
description: "The description of the trial period, while the price is still being determined"
|
|
1840
|
-
},
|
|
1841
|
-
{
|
|
1842
|
-
// @ts-expect-error formatjs does not support this type yet
|
|
1843
|
-
startDate: e.subscriptionStartDate,
|
|
1844
|
-
period_name: t($e)(e.billingPeriod, {
|
|
1845
|
-
short: !0,
|
|
1846
|
-
hideValueForExactPeriods: !0
|
|
1847
|
-
})
|
|
1848
|
-
}
|
|
1849
|
-
) : t(i)(
|
|
1850
|
-
{
|
|
1851
|
-
defaultMessage: "per {period_name}, starting today",
|
|
1852
|
-
id: "checkout.subscription_description_without_price",
|
|
1853
|
-
description: "The description of the subscription, while the price is still being determined"
|
|
1854
|
-
},
|
|
1855
|
-
{
|
|
1856
|
-
period_name: t($e)(e.billingPeriod, {
|
|
1857
|
-
short: !0,
|
|
1858
|
-
hideValueForExactPeriods: !0
|
|
1859
|
-
})
|
|
1860
|
-
}
|
|
1861
|
-
)
|
|
1862
|
-
}, null, 8, lo)
|
|
1863
|
-
]))
|
|
1864
|
-
]),
|
|
1865
|
-
_: 1
|
|
1866
|
-
})
|
|
1867
|
-
]));
|
|
1868
|
-
}
|
|
1869
|
-
}), uo = (e) => {
|
|
1870
|
-
var i;
|
|
1871
|
-
return ((i = e.periods) == null ? void 0 : i.some(
|
|
1872
|
-
(n) => n.groups.some(
|
|
1873
|
-
(a) => {
|
|
1874
|
-
var o;
|
|
1875
|
-
return (o = a.lines) == null ? void 0 : o.some(
|
|
1876
|
-
(r) => r.product_items.some(
|
|
1877
|
-
(u) => u.model_type === "USAGE_BASED"
|
|
1878
|
-
)
|
|
1879
|
-
);
|
|
1880
|
-
}
|
|
1881
|
-
)
|
|
1882
|
-
)) ?? !1;
|
|
1883
|
-
}, po = { class: "flex min-h-96 w-full items-center justify-center" }, mo = { class: "max-w-sm" }, go = /* @__PURE__ */ se({
|
|
1884
|
-
__name: "CheckoutNotAvailable",
|
|
1885
|
-
setup(e) {
|
|
1886
|
-
const { $t: i } = he(), n = () => {
|
|
1887
|
-
window.location.reload();
|
|
1888
|
-
};
|
|
1889
|
-
return (a, o) => (p(), $("div", po, [
|
|
1890
|
-
w("div", mo, [
|
|
1891
|
-
M(t(le), { variant: "heading-1" }, {
|
|
1892
|
-
default: b(() => [
|
|
1893
|
-
K(V(t(i)({
|
|
1894
|
-
defaultMessage: "Checkout not available",
|
|
1895
|
-
id: "checkout.not_available.title",
|
|
1896
|
-
description: "The title of the checkout not available page"
|
|
1897
|
-
})), 1)
|
|
1898
|
-
]),
|
|
1899
|
-
_: 1
|
|
1900
|
-
}),
|
|
1901
|
-
M(t(le), {
|
|
1902
|
-
variant: "body-sm",
|
|
1903
|
-
color: "subtle"
|
|
1904
|
-
}, {
|
|
1905
|
-
default: b(() => [
|
|
1906
|
-
K(V(t(i)({
|
|
1907
|
-
defaultMessage: "The checkout is currently not available.",
|
|
1908
|
-
id: "checkout.not_available.description",
|
|
1909
|
-
description: "The description of the checkout not available page"
|
|
1910
|
-
})) + " ", 1),
|
|
1911
|
-
w("a", {
|
|
1912
|
-
href: "#",
|
|
1913
|
-
class: "text-primary-900 hover:underline",
|
|
1914
|
-
onClick: Fe(n, ["prevent"])
|
|
1915
|
-
}, V(t(i)({
|
|
1916
|
-
defaultMessage: "Reload",
|
|
1917
|
-
id: "checkout.not_available.reload_button",
|
|
1918
|
-
description: "The label of the reload button"
|
|
1919
|
-
})), 1),
|
|
1920
|
-
K(" " + V(t(i)({
|
|
1921
|
-
defaultMessage: "this page to try again, or contact customer support.",
|
|
1922
|
-
id: "checkout.not_available.contact_support_message",
|
|
1923
|
-
description: "The message shown when the user wants to contact customer support"
|
|
1924
|
-
})), 1)
|
|
1925
|
-
]),
|
|
1926
|
-
_: 1
|
|
1927
|
-
})
|
|
1928
|
-
])
|
|
1929
|
-
]));
|
|
1930
|
-
}
|
|
1931
|
-
}), yo = /* @__PURE__ */ se({
|
|
1932
|
-
__name: "SubscriptionPaymentCompletedCard",
|
|
1933
|
-
emits: ["continue-to-merchant"],
|
|
1934
|
-
setup(e) {
|
|
1935
|
-
const { $t: i } = he();
|
|
1936
|
-
return (n, a) => (p(), O(tn, {
|
|
1937
|
-
status: "success",
|
|
1938
|
-
title: t(i)({
|
|
1939
|
-
defaultMessage: "Payment successful",
|
|
1940
|
-
id: "subscription_payment_completed_card.title",
|
|
1941
|
-
description: "The title for when a payment has been successful"
|
|
1942
|
-
})
|
|
1943
|
-
}, {
|
|
1944
|
-
default: b(() => [
|
|
1945
|
-
M(t(le), {
|
|
1946
|
-
variant: "body-xs",
|
|
1947
|
-
color: "subtle",
|
|
1948
|
-
tag: "span"
|
|
1949
|
-
}, {
|
|
1950
|
-
default: b(() => [
|
|
1951
|
-
K(V(t(i)({
|
|
1952
|
-
defaultMessage: "Thank you for subscribing.",
|
|
1953
|
-
id: "subscription_payment_completed_card.thank_you_for_subscribing",
|
|
1954
|
-
description: "The text shown after a successful message before a redirect"
|
|
1955
|
-
})), 1)
|
|
1956
|
-
]),
|
|
1957
|
-
_: 1
|
|
1958
|
-
})
|
|
1959
|
-
]),
|
|
1960
|
-
_: 1
|
|
1961
|
-
}, 8, ["title"]));
|
|
1962
|
-
}
|
|
1963
|
-
}), vo = { class: "flex items-start" }, fo = { class: "flex grow flex-col" }, _o = { class: "flex items-center gap-1" }, ho = { class: "ml-4 flex items-center self-center" }, Mo = /* @__PURE__ */ se({
|
|
1964
|
-
__name: "PricingGroupContent",
|
|
1965
|
-
props: {
|
|
1966
|
-
name: { type: String },
|
|
1967
|
-
description: { type: String }
|
|
1968
|
-
},
|
|
1969
|
-
setup(e) {
|
|
1970
|
-
return (i, n) => (p(), $("div", vo, [
|
|
1971
|
-
w("div", fo, [
|
|
1972
|
-
w("div", _o, [
|
|
1973
|
-
M(t(le), {
|
|
1974
|
-
tag: "span",
|
|
1975
|
-
variant: "body-sm",
|
|
1976
|
-
weight: "semibold"
|
|
1977
|
-
}, {
|
|
1978
|
-
default: b(() => [
|
|
1979
|
-
K(V(e.name), 1)
|
|
1980
|
-
]),
|
|
1981
|
-
_: 1
|
|
1982
|
-
}),
|
|
1983
|
-
tt(i.$slots, "badge")
|
|
1984
|
-
]),
|
|
1985
|
-
M(t(le), {
|
|
1986
|
-
tag: "span",
|
|
1987
|
-
variant: "body-xs",
|
|
1988
|
-
color: "subtle"
|
|
1989
|
-
}, {
|
|
1990
|
-
default: b(() => [
|
|
1991
|
-
K(V(e.description), 1)
|
|
1992
|
-
]),
|
|
1993
|
-
_: 1
|
|
1994
|
-
})
|
|
1995
|
-
]),
|
|
1996
|
-
w("div", ho, [
|
|
1997
|
-
tt(i.$slots, "default")
|
|
1998
|
-
])
|
|
1999
|
-
]));
|
|
2000
|
-
}
|
|
2001
|
-
}), bo = { class: "sv-order-summary__body grid grid-cols-1 gap-1" }, Io = { class: "px-3 py-2" }, Ao = { class: "sv-order-summary__billing-period flex flex-col gap-3" }, Po = { class: "px-3 py-2" }, Do = {
|
|
2002
|
-
key: 3,
|
|
2003
|
-
class: "sv-order-summary__items"
|
|
2004
|
-
}, zt = /* @__PURE__ */ se({
|
|
2005
|
-
__name: "OrderSummary",
|
|
2006
|
-
props: {
|
|
2007
|
-
subscription: { type: Object },
|
|
2008
|
-
invoice: { type: Object },
|
|
2009
|
-
invoicePreviewByBillingPeriod: { type: Object },
|
|
2010
|
-
trialInvoice: { type: Object },
|
|
2011
|
-
enabledPricingIds: { type: Array },
|
|
2012
|
-
trialPeriod: { type: Object },
|
|
2013
|
-
avatar: { type: String },
|
|
2014
|
-
isPaid: { type: Boolean },
|
|
2015
|
-
isUsageBased: { type: Boolean },
|
|
2016
|
-
isPreviewAndPaymentMethodsPending: { type: Boolean },
|
|
2017
|
-
collapsible: { type: String },
|
|
2018
|
-
noTitle: { type: Boolean },
|
|
2019
|
-
countryCode: { type: null },
|
|
2020
|
-
variant: { type: String }
|
|
2021
|
-
},
|
|
2022
|
-
emits: ["billing-period-change"],
|
|
2023
|
-
setup(e, { emit: i }) {
|
|
2024
|
-
const n = e, a = i, { $t: o } = he(), { map: r, formatTimePeriod: u } = $t(), { isMobileViewport: s } = Vt(), d = _(() => s.value ? "sm" : "xs"), I = (c) => `${c.type}:${c.value}`, g = ["DAY", "WEEK", "MONTH", "YEAR"], h = (c) => g.includes(c), C = (c) => {
|
|
2025
|
-
if (!c)
|
|
2026
|
-
return;
|
|
2027
|
-
const [y, D] = c.split(":"), T = Number(D);
|
|
2028
|
-
if (!(!T || !h(y)))
|
|
2029
|
-
return { type: y, value: T };
|
|
2030
|
-
}, f = _({
|
|
2031
|
-
get: () => {
|
|
2032
|
-
const c = n.subscription.billing_period;
|
|
2033
|
-
return c ? `${c.type}:${c.value}` : void 0;
|
|
2034
|
-
},
|
|
2035
|
-
set: (c) => {
|
|
2036
|
-
if (!c) return;
|
|
2037
|
-
const [y, D] = c.split(":"), T = Number(D);
|
|
2038
|
-
T && h(y) && a("billing-period-change", { type: y, value: T });
|
|
2039
|
-
}
|
|
2040
|
-
}), L = _({
|
|
2041
|
-
get: () => f.value,
|
|
2042
|
-
set: (c) => {
|
|
2043
|
-
f.value = ge(c);
|
|
2044
|
-
}
|
|
2045
|
-
}), x = (c) => {
|
|
2046
|
-
var T, R, Q, F;
|
|
2047
|
-
const y = (F = (Q = (R = (T = n.invoicePreviewByBillingPeriod) == null ? void 0 : T[I(c)]) == null ? void 0 : R.periods) == null ? void 0 : Q[0]) == null ? void 0 : F.amount_including_tax;
|
|
2048
|
-
if (!y)
|
|
2049
|
-
return;
|
|
2050
|
-
const D = c.type === "MONTH" && c.value === 3 ? o({
|
|
2051
|
-
defaultMessage: "/quarter",
|
|
2052
|
-
id: "checkout.order_summary_block.billing_period.per_quarter",
|
|
2053
|
-
description: "Period label for quarterly billing"
|
|
2054
|
-
}) : o(
|
|
2055
|
-
{
|
|
2056
|
-
defaultMessage: "/{period}",
|
|
2057
|
-
id: "checkout.order_summary_block.billing_period.per_label",
|
|
2058
|
-
description: "Period label for billing cycles"
|
|
2059
|
-
},
|
|
2060
|
-
{
|
|
2061
|
-
period: u(c, {
|
|
2062
|
-
prefix: !1,
|
|
2063
|
-
hideValueForExactPeriods: !0
|
|
2064
|
-
})
|
|
2065
|
-
}
|
|
2066
|
-
);
|
|
2067
|
-
return o(
|
|
2068
|
-
{
|
|
2069
|
-
defaultMessage: "{amount}{period}",
|
|
2070
|
-
id: "checkout.order_summary_block.billing_period.sub_label",
|
|
2071
|
-
description: "Billing period option sublabel showing price per period"
|
|
2072
|
-
},
|
|
2073
|
-
{
|
|
2074
|
-
amount: De(y),
|
|
2075
|
-
period: D
|
|
2076
|
-
}
|
|
2077
|
-
);
|
|
2078
|
-
}, v = (c) => {
|
|
2079
|
-
var y, D, T, R;
|
|
2080
|
-
return (R = (T = (D = (y = n.invoicePreviewByBillingPeriod) == null ? void 0 : y[I(c)]) == null ? void 0 : D.periods) == null ? void 0 : T[0]) == null ? void 0 : R.amount_including_tax;
|
|
2081
|
-
}, H = (c) => Number(c.quantity), z = (c, y) => {
|
|
2082
|
-
if (!y)
|
|
2083
|
-
return;
|
|
2084
|
-
const T = {
|
|
2085
|
-
DAY: 365,
|
|
2086
|
-
WEEK: 52,
|
|
2087
|
-
MONTH: 12,
|
|
2088
|
-
YEAR: 1
|
|
2089
|
-
}[c.type] / Math.max(c.value ?? 1, 1), R = H(y) * T;
|
|
2090
|
-
if (Number.isFinite(R))
|
|
2091
|
-
return {
|
|
2092
|
-
quantity: R.toFixed(2),
|
|
2093
|
-
currency: y.currency
|
|
2094
|
-
};
|
|
2095
|
-
}, A = (c, y) => {
|
|
2096
|
-
if (!c || !y)
|
|
2097
|
-
return;
|
|
2098
|
-
const D = H(c) - H(y);
|
|
2099
|
-
if (!(!Number.isFinite(D) || D <= 0))
|
|
2100
|
-
return {
|
|
2101
|
-
quantity: D.toFixed(2),
|
|
2102
|
-
currency: c.currency
|
|
2103
|
-
};
|
|
2104
|
-
}, E = (c) => {
|
|
2105
|
-
if (!c)
|
|
2106
|
-
return;
|
|
2107
|
-
const y = o(
|
|
2108
|
-
{
|
|
2109
|
-
defaultMessage: "Save {amount}",
|
|
2110
|
-
id: "checkout.order_summary_block.billing_period.save_badge.prefix",
|
|
2111
|
-
description: "First line for the savings badge label"
|
|
2112
|
-
},
|
|
2113
|
-
{ amount: De(c) }
|
|
2114
|
-
), D = o({
|
|
2115
|
-
defaultMessage: "/year",
|
|
2116
|
-
id: "checkout.order_summary_block.billing_period.save_badge.suffix",
|
|
2117
|
-
description: "Second line for the savings badge label"
|
|
2118
|
-
});
|
|
2119
|
-
return `${y}${D}`;
|
|
2120
|
-
}, m = _(() => {
|
|
2121
|
-
var te, ie, oe;
|
|
2122
|
-
const c = xe({
|
|
2123
|
-
pricingPlanScheduleInfos: n.subscription.pricing_plan_schedule_infos ?? [],
|
|
2124
|
-
type: "DEFAULT"
|
|
2125
|
-
}), y = ((ie = (te = c == null ? void 0 : c.pricing_plan_version) == null ? void 0 : te.billing_period_settings) == null ? void 0 : ie.billing_periods) ?? [], D = /* @__PURE__ */ new Map(), T = (G) => {
|
|
2126
|
-
G && D.set(I(G), G);
|
|
2127
|
-
}, R = (G) => {
|
|
2128
|
-
var q;
|
|
2129
|
-
(q = G == null ? void 0 : G.items) == null || q.forEach((J) => {
|
|
2130
|
-
var ae, ce;
|
|
2131
|
-
(ae = J.billing_period_configs) == null || ae.forEach(
|
|
2132
|
-
(ue) => T(ue.billing_period)
|
|
2133
|
-
), (ce = J.pricing_currency_configs) == null || ce.forEach((ue) => {
|
|
2134
|
-
var ve;
|
|
2135
|
-
(ve = ue.billing_period_configs) == null || ve.forEach(
|
|
2136
|
-
(fe) => T(fe.billing_period)
|
|
2137
|
-
);
|
|
2138
|
-
});
|
|
2139
|
-
});
|
|
2140
|
-
};
|
|
2141
|
-
if ((((oe = c == null ? void 0 : c.pricing_plan_version) == null ? void 0 : oe.pricing_categories) ?? []).forEach((G) => {
|
|
2142
|
-
var q, J;
|
|
2143
|
-
(q = G.pricings) == null || q.forEach((ae) => R(ae)), (J = G.pricing_groups) == null || J.forEach(
|
|
2144
|
-
(ae) => {
|
|
2145
|
-
var ce;
|
|
2146
|
-
return (ce = ae.pricings) == null ? void 0 : ce.forEach((ue) => R(ue));
|
|
2147
|
-
}
|
|
2148
|
-
);
|
|
2149
|
-
}), !D.size)
|
|
2150
|
-
return [];
|
|
2151
|
-
const F = y.map((G) => D.get(I(G.period))).filter((G) => !!G), ne = new Set(F.map(I)), ee = [...D.values()].filter(
|
|
2152
|
-
(G) => !ne.has(I(G))
|
|
2153
|
-
);
|
|
2154
|
-
return [...F, ...ee];
|
|
2155
|
-
}), B = _(() => {
|
|
2156
|
-
const c = m.value[m.value.length - 1], y = c ? z(c, v(c)) : void 0;
|
|
2157
|
-
return m.value.map((T) => {
|
|
2158
|
-
const R = T.type === "MONTH" && T.value === 3 ? o({
|
|
2159
|
-
defaultMessage: "Billed quarterly",
|
|
2160
|
-
id: "checkout.order_summary_block.billing_period.quarterly",
|
|
2161
|
-
description: "Billing period option label for quarterly billing"
|
|
2162
|
-
}) : o(
|
|
2163
|
-
{
|
|
2164
|
-
defaultMessage: "Billed {period}",
|
|
2165
|
-
id: "checkout.order_summary_block.billing_period.label",
|
|
2166
|
-
description: "Billing period option label for the selected period"
|
|
2167
|
-
},
|
|
2168
|
-
{ period: r.value[T.type].full }
|
|
2169
|
-
), Q = v(T), F = z(T, Q), ne = c && T.type === c.type && T.value === c.value ? void 0 : A(F, y), ee = E(ne);
|
|
2170
|
-
return {
|
|
2171
|
-
label: R,
|
|
2172
|
-
subLabel: x(T),
|
|
2173
|
-
labelSuffixComponent: ee ? {
|
|
2174
|
-
component: Lt,
|
|
2175
|
-
props: {
|
|
2176
|
-
color: "primary",
|
|
2177
|
-
content: ee,
|
|
2178
|
-
size: d.value,
|
|
2179
|
-
class: "whitespace-nowrap text-left leading-tight"
|
|
2180
|
-
}
|
|
2181
|
-
} : void 0,
|
|
2182
|
-
hidden: f.value === `${T.type}:${T.value}`,
|
|
2183
|
-
value: `${T.type}:${T.value}`
|
|
2184
|
-
};
|
|
2185
|
-
});
|
|
2186
|
-
}), S = _(() => {
|
|
2187
|
-
const c = B.value, y = c[0], D = c[c.length - 1];
|
|
2188
|
-
return {
|
|
2189
|
-
smallestPeriod: y == null ? void 0 : y.value,
|
|
2190
|
-
biggestPeriod: D == null ? void 0 : D.value
|
|
2191
|
-
};
|
|
2192
|
-
}), X = _(
|
|
2193
|
-
() => B.value.find((c) => c.value === S.value.biggestPeriod)
|
|
2194
|
-
), de = _(
|
|
2195
|
-
() => B.value.find((c) => c.value === f.value)
|
|
2196
|
-
), l = _(() => {
|
|
2197
|
-
var te, ie, oe, G, q, J, ae, ce;
|
|
2198
|
-
const c = B.value, y = c[c.length - 1], D = f.value;
|
|
2199
|
-
if (!y || !D || D === y.value)
|
|
2200
|
-
return "";
|
|
2201
|
-
const T = C(y.value);
|
|
2202
|
-
if (!T)
|
|
2203
|
-
return "";
|
|
2204
|
-
const R = (G = (oe = (ie = (te = n.invoicePreviewByBillingPeriod) == null ? void 0 : te[y.value]) == null ? void 0 : ie.periods) == null ? void 0 : oe[0]) == null ? void 0 : G.amount_including_tax, Q = C(D), F = (ce = (ae = (J = (q = n.invoicePreviewByBillingPeriod) == null ? void 0 : q[D]) == null ? void 0 : J.periods) == null ? void 0 : ae[0]) == null ? void 0 : ce.amount_including_tax;
|
|
2205
|
-
if (!Q || !F)
|
|
2206
|
-
return "";
|
|
2207
|
-
const ne = z(Q, F), ee = z(T, R);
|
|
2208
|
-
return E(A(ne, ee)) ?? "";
|
|
2209
|
-
}), P = (c) => {
|
|
2210
|
-
const { smallestPeriod: y, biggestPeriod: D } = S.value;
|
|
2211
|
-
f.value = c ? D : y;
|
|
2212
|
-
};
|
|
2213
|
-
return (c, y) => (p(), O(t(ye), {
|
|
2214
|
-
class: "sv-order-summary",
|
|
2215
|
-
"no-border": "",
|
|
2216
|
-
"no-spacing": "",
|
|
2217
|
-
"content-background": "none",
|
|
2218
|
-
title: e.noTitle ? void 0 : t(o)({
|
|
2219
|
-
defaultMessage: "Order summary",
|
|
2220
|
-
id: "checkout.order_summary_block.title",
|
|
2221
|
-
description: "The title of the order summary block that lists the subscription cost in the checkout"
|
|
2222
|
-
})
|
|
2223
|
-
}, {
|
|
2224
|
-
default: b(() => [
|
|
2225
|
-
w("div", bo, [
|
|
2226
|
-
M(t(ye), {
|
|
2227
|
-
"no-spacing": "",
|
|
2228
|
-
class: "sv-order-summary__subscription"
|
|
2229
|
-
}, {
|
|
2230
|
-
default: b(() => [
|
|
2231
|
-
e.subscription ? (p(), O(an, {
|
|
2232
|
-
key: 0,
|
|
2233
|
-
avatar: e.avatar,
|
|
2234
|
-
invoice: e.invoice,
|
|
2235
|
-
subscription: e.subscription,
|
|
2236
|
-
"enabled-pricing-ids": e.enabledPricingIds,
|
|
2237
|
-
loading: e.isPreviewAndPaymentMethodsPending,
|
|
2238
|
-
"trial-period": e.trialPeriod
|
|
2239
|
-
}, null, 8, ["avatar", "invoice", "subscription", "enabled-pricing-ids", "loading", "trial-period"])) : U("", !0)
|
|
2240
|
-
]),
|
|
2241
|
-
_: 1
|
|
2242
|
-
}),
|
|
2243
|
-
B.value.length === 2 ? (p(), O(t(ye), {
|
|
2244
|
-
key: 0,
|
|
2245
|
-
"no-spacing": "",
|
|
2246
|
-
"content-classes": f.value === S.value.biggestPeriod ? "border-primary-500" : void 0
|
|
2247
|
-
}, {
|
|
2248
|
-
default: b(() => {
|
|
2249
|
-
var D;
|
|
2250
|
-
return [
|
|
2251
|
-
w("div", Io, [
|
|
2252
|
-
w("div", Ao, [
|
|
2253
|
-
X.value ? (p(), O(Mo, {
|
|
2254
|
-
key: 0,
|
|
2255
|
-
name: X.value.label,
|
|
2256
|
-
description: ((D = de.value) == null ? void 0 : D.subLabel) ?? ""
|
|
2257
|
-
}, Ye({
|
|
2258
|
-
default: b(() => [
|
|
2259
|
-
M(t(xi), {
|
|
2260
|
-
"model-value": f.value === S.value.biggestPeriod,
|
|
2261
|
-
"onUpdate:modelValue": P
|
|
2262
|
-
}, null, 8, ["model-value"])
|
|
2263
|
-
]),
|
|
2264
|
-
_: 2
|
|
2265
|
-
}, [
|
|
2266
|
-
l.value ? {
|
|
2267
|
-
name: "badge",
|
|
2268
|
-
fn: b(() => [
|
|
2269
|
-
M(t(Lt), {
|
|
2270
|
-
intent: "brand",
|
|
2271
|
-
content: l.value,
|
|
2272
|
-
size: d.value,
|
|
2273
|
-
class: "whitespace-nowrap text-left leading-tight"
|
|
2274
|
-
}, null, 8, ["content", "size"])
|
|
2275
|
-
]),
|
|
2276
|
-
key: "0"
|
|
2277
|
-
} : void 0
|
|
2278
|
-
]), 1032, ["name", "description"])) : U("", !0)
|
|
2279
|
-
])
|
|
2280
|
-
])
|
|
2281
|
-
];
|
|
2282
|
-
}),
|
|
2283
|
-
_: 1
|
|
2284
|
-
}, 8, ["content-classes"])) : B.value.length > 2 ? (p(), O(t(nn), {
|
|
2285
|
-
key: 1,
|
|
2286
|
-
"single-model-value": L.value,
|
|
2287
|
-
"onUpdate:singleModelValue": y[0] || (y[0] = (D) => L.value = D),
|
|
2288
|
-
class: "sv-order-summary__billing-period",
|
|
2289
|
-
options: B.value,
|
|
2290
|
-
size: "xl",
|
|
2291
|
-
"has-large-dropdown": "",
|
|
2292
|
-
"show-sub-label-in-input": "",
|
|
2293
|
-
"show-suffix-in-closed-input": ""
|
|
2294
|
-
}, null, 8, ["single-model-value", "options"])) : U("", !0),
|
|
2295
|
-
e.isUsageBased ? (p(), O(t(ye), {
|
|
2296
|
-
key: 2,
|
|
2297
|
-
"no-spacing": "",
|
|
2298
|
-
class: "sv-order-summary__usage"
|
|
2299
|
-
}, {
|
|
2300
|
-
default: b(() => [
|
|
2301
|
-
w("div", Po, [
|
|
2302
|
-
M(t(le), {
|
|
2303
|
-
"no-spacing": "",
|
|
2304
|
-
variant: "body-sm",
|
|
2305
|
-
color: "subtle"
|
|
2306
|
-
}, {
|
|
2307
|
-
default: b(() => [
|
|
2308
|
-
K(V(t(o)({
|
|
2309
|
-
defaultMessage: "+ Usage",
|
|
2310
|
-
id: "checkout.invoice_preview.usage_based_message",
|
|
2311
|
-
description: "The message shown for the usage based invoice preview"
|
|
2312
|
-
})), 1)
|
|
2313
|
-
]),
|
|
2314
|
-
_: 1
|
|
2315
|
-
})
|
|
2316
|
-
])
|
|
2317
|
-
]),
|
|
2318
|
-
_: 1
|
|
2319
|
-
})) : U("", !0),
|
|
2320
|
-
e.invoice && e.variant !== "products-inline" ? (p(), $("div", Do, [
|
|
2321
|
-
M(t(Xi), {
|
|
2322
|
-
invoice: e.invoice,
|
|
2323
|
-
"wrapper-component": t(ye)
|
|
2324
|
-
}, null, 8, ["invoice", "wrapper-component"])
|
|
2325
|
-
])) : U("", !0),
|
|
2326
|
-
M(t(ye), { class: "sv-order-summary__totals" }, {
|
|
2327
|
-
default: b(() => [
|
|
2328
|
-
e.invoice ? (p(), O(t(Wi), {
|
|
2329
|
-
key: 0,
|
|
2330
|
-
class: "sv-order-summary__invoice-preview",
|
|
2331
|
-
variant: e.variant === "products-inline" ? "default" : "without-products",
|
|
2332
|
-
invoice: e.invoice,
|
|
2333
|
-
"trial-invoice": e.trialInvoice,
|
|
2334
|
-
"is-paid": e.isPaid,
|
|
2335
|
-
collapsible: e.collapsible,
|
|
2336
|
-
"is-preview-without-taxes": !e.countryCode,
|
|
2337
|
-
"is-customer-facing": ""
|
|
2338
|
-
}, null, 8, ["variant", "invoice", "trial-invoice", "is-paid", "collapsible", "is-preview-without-taxes"])) : (p(), O(t(le), {
|
|
2339
|
-
key: 1,
|
|
2340
|
-
variant: "body-sm",
|
|
2341
|
-
color: "subtle",
|
|
2342
|
-
class: "sv-order-summary__empty"
|
|
2343
|
-
}, {
|
|
2344
|
-
default: b(() => [
|
|
2345
|
-
K(V(t(o)({
|
|
2346
|
-
defaultMessage: "Please select a country first",
|
|
2347
|
-
description: "The message shown for the invoice preview when no country is set",
|
|
2348
|
-
id: "checkout.invoice_preview.no_country_selected_message"
|
|
2349
|
-
})), 1)
|
|
2350
|
-
]),
|
|
2351
|
-
_: 1
|
|
2352
|
-
}))
|
|
2353
|
-
]),
|
|
2354
|
-
_: 1
|
|
2355
|
-
})
|
|
2356
|
-
])
|
|
2357
|
-
]),
|
|
2358
|
-
_: 1
|
|
2359
|
-
}, 8, ["title"]));
|
|
2360
|
-
}
|
|
2361
|
-
}), No = { key: 1 }, Eo = { key: 2 }, Co = { key: 3 }, xo = { key: 4 }, Lo = ["href"], To = /* @__PURE__ */ se({
|
|
2362
|
-
__name: "MarkdownInline",
|
|
2363
|
-
props: {
|
|
2364
|
-
nodes: { type: Array }
|
|
2365
|
-
},
|
|
2366
|
-
setup(e) {
|
|
2367
|
-
return (i, n) => {
|
|
2368
|
-
const a = mi("MarkdownInline", !0);
|
|
2369
|
-
return p(!0), $(me, null, Rt(e.nodes, (o, r) => (p(), $(me, { key: r }, [
|
|
2370
|
-
o.type === "text" ? (p(), $(me, { key: 0 }, [
|
|
2371
|
-
K(V(o.value), 1)
|
|
2372
|
-
], 64)) : o.type === "break" ? (p(), $("br", No)) : o.type === "bold" ? (p(), $("strong", Eo, [
|
|
2373
|
-
M(a, {
|
|
2374
|
-
nodes: o.children
|
|
2375
|
-
}, null, 8, ["nodes"])
|
|
2376
|
-
])) : o.type === "italic" ? (p(), $("em", Co, [
|
|
2377
|
-
M(a, {
|
|
2378
|
-
nodes: o.children
|
|
2379
|
-
}, null, 8, ["nodes"])
|
|
2380
|
-
])) : o.type === "underline" ? (p(), $("u", xo, [
|
|
2381
|
-
M(a, {
|
|
2382
|
-
nodes: o.children
|
|
2383
|
-
}, null, 8, ["nodes"])
|
|
2384
|
-
])) : o.type === "link" ? (p(), $("a", {
|
|
2385
|
-
key: 5,
|
|
2386
|
-
href: o.href,
|
|
2387
|
-
target: "_blank",
|
|
2388
|
-
rel: "noopener noreferrer",
|
|
2389
|
-
class: "underline"
|
|
2390
|
-
}, [
|
|
2391
|
-
M(a, {
|
|
2392
|
-
nodes: o.children
|
|
2393
|
-
}, null, 8, ["nodes"])
|
|
2394
|
-
], 8, Lo)) : U("", !0)
|
|
2395
|
-
], 64))), 128);
|
|
2396
|
-
};
|
|
2397
|
-
}
|
|
2398
|
-
}), wo = /^<u>([\s\S]*?)<\/u>/i, So = /^\*\*([\s\S]+?)\*\*/, ko = /^\*([\s\S]+?)\*/, Oo = /^_([\s\S]+?)_/, zo = /^\[([^\]]*)\]\(\s*([^)\s]*)\s*\)/, jo = /^<([a-z][a-z0-9+.-]*:[^>\s]+)>/i, Ro = /\n[ \t]*\n/;
|
|
2399
|
-
function ke(e) {
|
|
2400
|
-
const i = [];
|
|
2401
|
-
let n = "";
|
|
2402
|
-
const a = () => {
|
|
2403
|
-
n && (i.push({ type: "text", value: n }), n = "");
|
|
2404
|
-
};
|
|
2405
|
-
let o = 0;
|
|
2406
|
-
for (; o < e.length; ) {
|
|
2407
|
-
const r = e.slice(o), u = So.exec(r);
|
|
2408
|
-
if (u) {
|
|
2409
|
-
a(), i.push({ type: "bold", children: ke(u[1]) }), o += u[0].length;
|
|
2410
|
-
continue;
|
|
2411
|
-
}
|
|
2412
|
-
const s = ko.exec(r) ?? Oo.exec(r);
|
|
2413
|
-
if (s) {
|
|
2414
|
-
a(), i.push({ type: "italic", children: ke(s[1]) }), o += s[0].length;
|
|
2415
|
-
continue;
|
|
2416
|
-
}
|
|
2417
|
-
const d = wo.exec(r);
|
|
2418
|
-
if (d) {
|
|
2419
|
-
a(), i.push({ type: "underline", children: ke(d[1]) }), o += d[0].length;
|
|
2420
|
-
continue;
|
|
2421
|
-
}
|
|
2422
|
-
const I = zo.exec(r);
|
|
2423
|
-
if (I) {
|
|
2424
|
-
a(), i.push(jt(I[2], ke(I[1]))), o += I[0].length;
|
|
2425
|
-
continue;
|
|
2426
|
-
}
|
|
2427
|
-
const g = jo.exec(r);
|
|
2428
|
-
if (g) {
|
|
2429
|
-
a(), i.push(jt(g[1], [{ type: "text", value: g[1] }])), o += g[0].length;
|
|
2430
|
-
continue;
|
|
2431
|
-
}
|
|
2432
|
-
if (e[o] === `
|
|
2433
|
-
`) {
|
|
2434
|
-
a(), i.push({ type: "break" }), o += 1;
|
|
2435
|
-
continue;
|
|
2436
|
-
}
|
|
2437
|
-
n += e[o], o += 1;
|
|
2438
|
-
}
|
|
2439
|
-
return a(), i;
|
|
2440
|
-
}
|
|
2441
|
-
function jt(e, i) {
|
|
2442
|
-
const n = Bi(e);
|
|
2443
|
-
return n ? { type: "link", href: n, children: i } : { type: "text", value: qt(i) };
|
|
2444
|
-
}
|
|
2445
|
-
function qt(e) {
|
|
2446
|
-
return e.map((i) => i.type === "text" ? i.value : i.type === "break" ? " " : qt(i.children)).join("");
|
|
2447
|
-
}
|
|
2448
|
-
function $o(e) {
|
|
2449
|
-
return e != null && e.trim() ? e.split(Ro).map((i) => i.trim()).filter(Boolean).map((i) => ({ type: "paragraph", children: ke(i) })) : [];
|
|
2450
|
-
}
|
|
2451
|
-
const Bo = { key: 0 }, Uo = /* @__PURE__ */ se({
|
|
2452
|
-
__name: "MarkdownText",
|
|
2453
|
-
props: {
|
|
2454
|
-
source: { type: [String, null] }
|
|
2455
|
-
},
|
|
2456
|
-
setup(e) {
|
|
2457
|
-
const i = e, n = _(() => $o(i.source));
|
|
2458
|
-
return (a, o) => n.value.length ? (p(), $("div", Bo, [
|
|
2459
|
-
(p(!0), $(me, null, Rt(n.value, (r, u) => (p(), $("p", {
|
|
2460
|
-
key: u,
|
|
2461
|
-
class: Ie({ "mt-2": u > 0 })
|
|
2462
|
-
}, [
|
|
2463
|
-
M(To, {
|
|
2464
|
-
nodes: r.children
|
|
2465
|
-
}, null, 8, ["nodes"])
|
|
2466
|
-
], 2))), 128))
|
|
2467
|
-
])) : U("", !0);
|
|
2468
|
-
}
|
|
2469
|
-
});
|
|
2470
|
-
async function Jt(e, i) {
|
|
2471
|
-
const { AdyenCheckout: n } = await Ke();
|
|
2472
|
-
return n(
|
|
2473
|
-
Fi({
|
|
2474
|
-
locale: e.locale,
|
|
2475
|
-
amount: e.amount,
|
|
2476
|
-
countryCode: e.countryCode,
|
|
2477
|
-
paymentMethodOptionResponse: e.paymentMethodOptionsResponse,
|
|
2478
|
-
logger: i
|
|
2479
|
-
})
|
|
2480
|
-
);
|
|
2481
|
-
}
|
|
2482
|
-
function ei({
|
|
2483
|
-
props: e,
|
|
2484
|
-
create: i,
|
|
2485
|
-
onMissingButton: n,
|
|
2486
|
-
onMountFailed: a,
|
|
2487
|
-
afterMount: o
|
|
2488
|
-
}) {
|
|
2489
|
-
const r = Y(), u = Ae(), s = async () => {
|
|
2490
|
-
const d = await Jt(e, u), I = await i(d);
|
|
2491
|
-
if (!r.value) {
|
|
2492
|
-
n();
|
|
2493
|
-
return;
|
|
2494
|
-
}
|
|
2495
|
-
try {
|
|
2496
|
-
await I.isAvailable(), I.mount(r.value), o == null || o();
|
|
2497
|
-
} catch (g) {
|
|
2498
|
-
a(g);
|
|
2499
|
-
}
|
|
2500
|
-
};
|
|
2501
|
-
return je(() => {
|
|
2502
|
-
s();
|
|
2503
|
-
}), { buttonRef: r };
|
|
2504
|
-
}
|
|
2505
|
-
const Vo = {
|
|
2506
|
-
key: 0,
|
|
2507
|
-
id: "svg-logo",
|
|
2508
|
-
viewBox: "0 0 35 15",
|
|
2509
|
-
class: "h-[44px]"
|
|
2510
|
-
}, Fo = {
|
|
2511
|
-
key: 1,
|
|
2512
|
-
src: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAxcHgiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAxMDEgMzIiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaW5ZTWluIG1lZXQiIHhtbG5zPSJodHRwOiYjeDJGOyYjeDJGO3d3dy53My5vcmcmI3gyRjsyMDAwJiN4MkY7c3ZnIj48cGF0aCBmaWxsPSIjMDAzMDg3IiBkPSJNIDEyLjIzNyAyLjggTCA0LjQzNyAyLjggQyAzLjkzNyAyLjggMy40MzcgMy4yIDMuMzM3IDMuNyBMIDAuMjM3IDIzLjcgQyAwLjEzNyAyNC4xIDAuNDM3IDI0LjQgMC44MzcgMjQuNCBMIDQuNTM3IDI0LjQgQyA1LjAzNyAyNC40IDUuNTM3IDI0IDUuNjM3IDIzLjUgTCA2LjQzNyAxOC4xIEMgNi41MzcgMTcuNiA2LjkzNyAxNy4yIDcuNTM3IDE3LjIgTCAxMC4wMzcgMTcuMiBDIDE1LjEzNyAxNy4yIDE4LjEzNyAxNC43IDE4LjkzNyA5LjggQyAxOS4yMzcgNy43IDE4LjkzNyA2IDE3LjkzNyA0LjggQyAxNi44MzcgMy41IDE0LjgzNyAyLjggMTIuMjM3IDIuOCBaIE0gMTMuMTM3IDEwLjEgQyAxMi43MzcgMTIuOSAxMC41MzcgMTIuOSA4LjUzNyAxMi45IEwgNy4zMzcgMTIuOSBMIDguMTM3IDcuNyBDIDguMTM3IDcuNCA4LjQzNyA3LjIgOC43MzcgNy4yIEwgOS4yMzcgNy4yIEMgMTAuNjM3IDcuMiAxMS45MzcgNy4yIDEyLjYzNyA4IEMgMTMuMTM3IDguNCAxMy4zMzcgOS4xIDEzLjEzNyAxMC4xIFoiPjwvcGF0aD48cGF0aCBmaWxsPSIjMDAzMDg3IiBkPSJNIDM1LjQzNyAxMCBMIDMxLjczNyAxMCBDIDMxLjQzNyAxMCAzMS4xMzcgMTAuMiAzMS4xMzcgMTAuNSBMIDMwLjkzNyAxMS41IEwgMzAuNjM3IDExLjEgQyAyOS44MzcgOS45IDI4LjAzNyA5LjUgMjYuMjM3IDkuNSBDIDIyLjEzNyA5LjUgMTguNjM3IDEyLjYgMTcuOTM3IDE3IEMgMTcuNTM3IDE5LjIgMTguMDM3IDIxLjMgMTkuMzM3IDIyLjcgQyAyMC40MzcgMjQgMjIuMTM3IDI0LjYgMjQuMDM3IDI0LjYgQyAyNy4zMzcgMjQuNiAyOS4yMzcgMjIuNSAyOS4yMzcgMjIuNSBMIDI5LjAzNyAyMy41IEMgMjguOTM3IDIzLjkgMjkuMjM3IDI0LjMgMjkuNjM3IDI0LjMgTCAzMy4wMzcgMjQuMyBDIDMzLjUzNyAyNC4zIDM0LjAzNyAyMy45IDM0LjEzNyAyMy40IEwgMzYuMTM3IDEwLjYgQyAzNi4yMzcgMTAuNCAzNS44MzcgMTAgMzUuNDM3IDEwIFogTSAzMC4zMzcgMTcuMiBDIDI5LjkzNyAxOS4zIDI4LjMzNyAyMC44IDI2LjEzNyAyMC44IEMgMjUuMDM3IDIwLjggMjQuMjM3IDIwLjUgMjMuNjM3IDE5LjggQyAyMy4wMzcgMTkuMSAyMi44MzcgMTguMiAyMy4wMzcgMTcuMiBDIDIzLjMzNyAxNS4xIDI1LjEzNyAxMy42IDI3LjIzNyAxMy42IEMgMjguMzM3IDEzLjYgMjkuMTM3IDE0IDI5LjczNyAxNC42IEMgMzAuMjM3IDE1LjMgMzAuNDM3IDE2LjIgMzAuMzM3IDE3LjIgWiI+PC9wYXRoPjxwYXRoIGZpbGw9IiMwMDMwODciIGQ9Ik0gNTUuMzM3IDEwIEwgNTEuNjM3IDEwIEMgNTEuMjM3IDEwIDUwLjkzNyAxMC4yIDUwLjczNyAxMC41IEwgNDUuNTM3IDE4LjEgTCA0My4zMzcgMTAuOCBDIDQzLjIzNyAxMC4zIDQyLjczNyAxMCA0Mi4zMzcgMTAgTCAzOC42MzcgMTAgQyAzOC4yMzcgMTAgMzcuODM3IDEwLjQgMzguMDM3IDEwLjkgTCA0Mi4xMzcgMjMgTCAzOC4yMzcgMjguNCBDIDM3LjkzNyAyOC44IDM4LjIzNyAyOS40IDM4LjczNyAyOS40IEwgNDIuNDM3IDI5LjQgQyA0Mi44MzcgMjkuNCA0My4xMzcgMjkuMiA0My4zMzcgMjguOSBMIDU1LjgzNyAxMC45IEMgNTYuMTM3IDEwLjYgNTUuODM3IDEwIDU1LjMzNyAxMCBaIj48L3BhdGg+PHBhdGggZmlsbD0iIzAwOWNkZSIgZD0iTSA2Ny43MzcgMi44IEwgNTkuOTM3IDIuOCBDIDU5LjQzNyAyLjggNTguOTM3IDMuMiA1OC44MzcgMy43IEwgNTUuNzM3IDIzLjYgQyA1NS42MzcgMjQgNTUuOTM3IDI0LjMgNTYuMzM3IDI0LjMgTCA2MC4zMzcgMjQuMyBDIDYwLjczNyAyNC4zIDYxLjAzNyAyNCA2MS4wMzcgMjMuNyBMIDYxLjkzNyAxOCBDIDYyLjAzNyAxNy41IDYyLjQzNyAxNy4xIDYzLjAzNyAxNy4xIEwgNjUuNTM3IDE3LjEgQyA3MC42MzcgMTcuMSA3My42MzcgMTQuNiA3NC40MzcgOS43IEMgNzQuNzM3IDcuNiA3NC40MzcgNS45IDczLjQzNyA0LjcgQyA3Mi4yMzcgMy41IDcwLjMzNyAyLjggNjcuNzM3IDIuOCBaIE0gNjguNjM3IDEwLjEgQyA2OC4yMzcgMTIuOSA2Ni4wMzcgMTIuOSA2NC4wMzcgMTIuOSBMIDYyLjgzNyAxMi45IEwgNjMuNjM3IDcuNyBDIDYzLjYzNyA3LjQgNjMuOTM3IDcuMiA2NC4yMzcgNy4yIEwgNjQuNzM3IDcuMiBDIDY2LjEzNyA3LjIgNjcuNDM3IDcuMiA2OC4xMzcgOCBDIDY4LjYzNyA4LjQgNjguNzM3IDkuMSA2OC42MzcgMTAuMSBaIj48L3BhdGg+PHBhdGggZmlsbD0iIzAwOWNkZSIgZD0iTSA5MC45MzcgMTAgTCA4Ny4yMzcgMTAgQyA4Ni45MzcgMTAgODYuNjM3IDEwLjIgODYuNjM3IDEwLjUgTCA4Ni40MzcgMTEuNSBMIDg2LjEzNyAxMS4xIEMgODUuMzM3IDkuOSA4My41MzcgOS41IDgxLjczNyA5LjUgQyA3Ny42MzcgOS41IDc0LjEzNyAxMi42IDczLjQzNyAxNyBDIDczLjAzNyAxOS4yIDczLjUzNyAyMS4zIDc0LjgzNyAyMi43IEMgNzUuOTM3IDI0IDc3LjYzNyAyNC42IDc5LjUzNyAyNC42IEMgODIuODM3IDI0LjYgODQuNzM3IDIyLjUgODQuNzM3IDIyLjUgTCA4NC41MzcgMjMuNSBDIDg0LjQzNyAyMy45IDg0LjczNyAyNC4zIDg1LjEzNyAyNC4zIEwgODguNTM3IDI0LjMgQyA4OS4wMzcgMjQuMyA4OS41MzcgMjMuOSA4OS42MzcgMjMuNCBMIDkxLjYzNyAxMC42IEMgOTEuNjM3IDEwLjQgOTEuMzM3IDEwIDkwLjkzNyAxMCBaIE0gODUuNzM3IDE3LjIgQyA4NS4zMzcgMTkuMyA4My43MzcgMjAuOCA4MS41MzcgMjAuOCBDIDgwLjQzNyAyMC44IDc5LjYzNyAyMC41IDc5LjAzNyAxOS44IEMgNzguNDM3IDE5LjEgNzguMjM3IDE4LjIgNzguNDM3IDE3LjIgQyA3OC43MzcgMTUuMSA4MC41MzcgMTMuNiA4Mi42MzcgMTMuNiBDIDgzLjczNyAxMy42IDg0LjUzNyAxNCA4NS4xMzcgMTQuNiBDIDg1LjczNyAxNS4zIDg1LjkzNyAxNi4yIDg1LjczNyAxNy4yIFoiPjwvcGF0aD48cGF0aCBmaWxsPSIjMDA5Y2RlIiBkPSJNIDk1LjMzNyAzLjMgTCA5Mi4xMzcgMjMuNiBDIDkyLjAzNyAyNCA5Mi4zMzcgMjQuMyA5Mi43MzcgMjQuMyBMIDk1LjkzNyAyNC4zIEMgOTYuNDM3IDI0LjMgOTYuOTM3IDIzLjkgOTcuMDM3IDIzLjQgTCAxMDAuMjM3IDMuNSBDIDEwMC4zMzcgMy4xIDEwMC4wMzcgMi44IDk5LjYzNyAyLjggTCA5Ni4wMzcgMi44IEMgOTUuNjM3IDIuOCA5NS40MzcgMyA5NS4zMzcgMy4zIFoiPjwvcGF0aD48L3N2Zz4",
|
|
2513
|
-
role: "presentation",
|
|
2514
|
-
class: "h-[22px]"
|
|
2515
|
-
}, at = /* @__PURE__ */ se({
|
|
2516
|
-
__name: "ExpressPaymentMethodButton",
|
|
2517
|
-
props: {
|
|
2518
|
-
type: { type: String }
|
|
2519
|
-
},
|
|
2520
|
-
emits: ["click"],
|
|
2521
|
-
setup(e, { emit: i }) {
|
|
2522
|
-
const n = e, a = i, o = _(() => {
|
|
2523
|
-
switch (n.type) {
|
|
2524
|
-
case "applepay":
|
|
2525
|
-
return "Apple Pay";
|
|
2526
|
-
case "googlepay":
|
|
2527
|
-
return "Google Pay";
|
|
2528
|
-
case "paypal":
|
|
2529
|
-
return "PayPal";
|
|
2530
|
-
default:
|
|
2531
|
-
return;
|
|
2532
|
-
}
|
|
2533
|
-
}), r = _(() => {
|
|
2534
|
-
switch (n.type) {
|
|
2535
|
-
case "applepay":
|
|
2536
|
-
return "!bg-black !py-0";
|
|
2537
|
-
case "googlepay":
|
|
2538
|
-
return "!bg-black bg-[url(https://www.gstatic.com/instantbuy/svg/dark_gpay.svg)] bg-[length:auto_42.5%]";
|
|
2539
|
-
case "paypal":
|
|
2540
|
-
return "!bg-[#ffc439]";
|
|
2541
|
-
default:
|
|
2542
|
-
return;
|
|
2543
|
-
}
|
|
2544
|
-
});
|
|
2545
|
-
function u() {
|
|
2546
|
-
a("click");
|
|
2547
|
-
}
|
|
2548
|
-
return (s, d) => (p(), O(t(Ne), {
|
|
2549
|
-
size: "lg",
|
|
2550
|
-
"aria-label": o.value,
|
|
2551
|
-
class: Ie([r.value, "!block h-11 w-full bg-center bg-no-repeat"]),
|
|
2552
|
-
onClick: u
|
|
2553
|
-
}, {
|
|
2554
|
-
default: b(() => [
|
|
2555
|
-
n.type === "applepay" ? (p(), $("svg", Vo, [...d[0] || (d[0] = [
|
|
2556
|
-
w("svg", {
|
|
2557
|
-
id: "svg-logo",
|
|
2558
|
-
x: "0",
|
|
2559
|
-
y: "3.85",
|
|
2560
|
-
height: "7.3",
|
|
2561
|
-
width: "35",
|
|
2562
|
-
class: "logo",
|
|
2563
|
-
viewBox: "0 0 105 43",
|
|
2564
|
-
version: "1.1",
|
|
2565
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
2566
|
-
}, [
|
|
2567
|
-
w("title", null, "Apple Logo"),
|
|
2568
|
-
w("g", {
|
|
2569
|
-
stroke: "none",
|
|
2570
|
-
"stroke-width": "1",
|
|
2571
|
-
fill: "none",
|
|
2572
|
-
"fill-rule": "evenodd"
|
|
2573
|
-
}, [
|
|
2574
|
-
w("g", { fill: "#FFF" }, [
|
|
2575
|
-
w("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" }),
|
|
2576
|
-
w("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" }),
|
|
2577
|
-
w("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" }),
|
|
2578
|
-
w("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" }),
|
|
2579
|
-
w("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" })
|
|
2580
|
-
])
|
|
2581
|
-
])
|
|
2582
|
-
], -1)
|
|
2583
|
-
])])) : n.type === "paypal" ? (p(), $("img", Fo)) : U("", !0)
|
|
2584
|
-
]),
|
|
2585
|
-
_: 1
|
|
2586
|
-
}, 8, ["aria-label", "class"]));
|
|
2587
|
-
}
|
|
2588
|
-
}), Go = { class: "absolute h-[1px] w-[1px] overflow-hidden opacity-0" }, Yo = "ADYEN", Ko = /* @__PURE__ */ se({
|
|
2589
|
-
__name: "ExpressPaymentMethodApplePay",
|
|
2590
|
-
props: {
|
|
2591
|
-
onBillingInformationChange: { type: Function },
|
|
2592
|
-
amount: { type: Object },
|
|
2593
|
-
countryCode: { type: String },
|
|
2594
|
-
locale: { type: String },
|
|
2595
|
-
isVisible: { type: Boolean },
|
|
2596
|
-
paymentMethodOptionsResponse: { type: Object },
|
|
2597
|
-
billingInformation: { type: Object }
|
|
2598
|
-
},
|
|
2599
|
-
emits: ["ready", "update-billing-information"],
|
|
2600
|
-
setup(e, { emit: i }) {
|
|
2601
|
-
const n = e, a = i, o = Y(), r = Ae(), { authorizePayment: u } = ln(), s = n.paymentMethodOptionsResponse.payment_acceptor.id;
|
|
2602
|
-
function d(v) {
|
|
2603
|
-
return sn({
|
|
2604
|
-
gateway: "ADYEN",
|
|
2605
|
-
paymentAcceptorId: s,
|
|
2606
|
-
paymentMethodType: "applepay",
|
|
2607
|
-
...v
|
|
2608
|
-
});
|
|
2609
|
-
}
|
|
2610
|
-
const I = async () => {
|
|
2611
|
-
const { ApplePay: v } = await Ke(), H = await Jt(n, r), z = new v(H, {
|
|
2612
|
-
isExpress: !0,
|
|
2613
|
-
recurringPaymentRequest: {
|
|
2614
|
-
paymentDescription: n.billingInformation.description,
|
|
2615
|
-
billingAgreement: n.billingInformation.agreement,
|
|
2616
|
-
managementURL: "https://www.google.com",
|
|
2617
|
-
// Trial
|
|
2618
|
-
...n.billingInformation.trial && {
|
|
2619
|
-
trialBilling: {
|
|
2620
|
-
label: n.billingInformation.trial.label,
|
|
2621
|
-
amount: n.billingInformation.trial.amount.quantity.toString(),
|
|
2622
|
-
type: "final",
|
|
2623
|
-
paymentTiming: "recurring",
|
|
2624
|
-
recurringPaymentStartDate: n.billingInformation.trial.startDate,
|
|
2625
|
-
recurringPaymentEndDate: n.billingInformation.trial.endDate
|
|
2626
|
-
}
|
|
2627
|
-
},
|
|
2628
|
-
// Regular
|
|
2629
|
-
...n.billingInformation.regular && {
|
|
2630
|
-
regularBilling: {
|
|
2631
|
-
label: n.billingInformation.regular.label,
|
|
2632
|
-
amount: n.billingInformation.regular.amount.quantity.toString(),
|
|
2633
|
-
type: "final",
|
|
2634
|
-
paymentTiming: "recurring",
|
|
2635
|
-
recurringPaymentStartDate: n.billingInformation.regular.startDate,
|
|
2636
|
-
...g(
|
|
2637
|
-
n.billingInformation.regular.interval ?? { type: "MONTH", value: 1 }
|
|
2638
|
-
)
|
|
2639
|
-
}
|
|
2640
|
-
}
|
|
2641
|
-
},
|
|
2642
|
-
requiredBillingContactFields: ["postalAddress"],
|
|
2643
|
-
requiredShippingContactFields: ["email"],
|
|
2644
|
-
onPaymentMethodSelected: async (A, E, m) => {
|
|
2645
|
-
var de, l, P, c, y, D, T;
|
|
2646
|
-
const { invoicePreview: B, trialInvoicePreview: S } = await n.onBillingInformationChange({
|
|
2647
|
-
...((de = m.paymentMethod.billingContact) == null ? void 0 : de.postalCode) && {
|
|
2648
|
-
postal_code: m.paymentMethod.billingContact.postalCode
|
|
2649
|
-
},
|
|
2650
|
-
...((l = m.paymentMethod.billingContact) == null ? void 0 : l.locality) && {
|
|
2651
|
-
city: m.paymentMethod.billingContact.locality
|
|
2652
|
-
},
|
|
2653
|
-
...f((P = m.paymentMethod.billingContact) == null ? void 0 : P.countryCode) && {
|
|
2654
|
-
country: f((c = m.paymentMethod.billingContact) == null ? void 0 : c.countryCode)
|
|
2655
|
-
}
|
|
2656
|
-
}), X = S ? S.invoice_amount_including_tax.quantity.toString() : B.invoice_amount_including_tax.quantity.toString();
|
|
2657
|
-
a("update-billing-information", {
|
|
2658
|
-
postal_code: (y = m.paymentMethod.billingContact) == null ? void 0 : y.postalCode,
|
|
2659
|
-
city: (D = m.paymentMethod.billingContact) == null ? void 0 : D.locality,
|
|
2660
|
-
country: (T = m.paymentMethod.billingContact) == null ? void 0 : T.countryCode
|
|
2661
|
-
}), A({
|
|
2662
|
-
newTotal: {
|
|
2663
|
-
label: n.billingInformation.regular.label,
|
|
2664
|
-
amount: X,
|
|
2665
|
-
type: "final"
|
|
2666
|
-
}
|
|
2667
|
-
});
|
|
2668
|
-
},
|
|
2669
|
-
onError: (A) => {
|
|
2670
|
-
r.error(
|
|
2671
|
-
"APPLE_PAY_ERROR",
|
|
2672
|
-
"Apple Pay error",
|
|
2673
|
-
d({ reason: "APPLE_PAY_ERROR", cause: A }),
|
|
2674
|
-
A
|
|
2675
|
-
);
|
|
2676
|
-
},
|
|
2677
|
-
onAuthorized: async (A, E) => {
|
|
2678
|
-
var m;
|
|
2679
|
-
try {
|
|
2680
|
-
const B = A.authorizedEvent;
|
|
2681
|
-
r.info("APPLE_PAY_AUTHORIZED", "Apple Pay authorized", {
|
|
2682
|
-
paymentAcceptorId: s,
|
|
2683
|
-
hasPaymentMethod: !!B.payment.token.paymentMethod,
|
|
2684
|
-
hasPaymentData: !!B.payment.token.paymentData,
|
|
2685
|
-
hasBillingContact: !!B.payment.billingContact
|
|
2686
|
-
});
|
|
2687
|
-
const S = B.payment.billingContact, X = A.billingAddress;
|
|
2688
|
-
S ? a(
|
|
2689
|
-
"update-billing-information",
|
|
2690
|
-
h(S)
|
|
2691
|
-
) : X && a(
|
|
2692
|
-
"update-billing-information",
|
|
2693
|
-
C(X)
|
|
2694
|
-
);
|
|
2695
|
-
const de = {
|
|
2696
|
-
payment_method: Ct(
|
|
2697
|
-
B.payment.token.paymentMethod
|
|
2698
|
-
),
|
|
2699
|
-
browser_info: Ct(
|
|
2700
|
-
B.payment.token.paymentData
|
|
2701
|
-
)
|
|
2702
|
-
}, l = Gi({
|
|
2703
|
-
paymentAcceptorId: s,
|
|
2704
|
-
redirectUrl: window.location.href
|
|
2705
|
-
}), P = await u({
|
|
2706
|
-
payment_acceptor_id: s,
|
|
2707
|
-
payment_gateway_variant: Yo,
|
|
2708
|
-
adyen: {
|
|
2709
|
-
...de,
|
|
2710
|
-
store_payment_method: !0
|
|
2711
|
-
// Required for recurring payments
|
|
2712
|
-
},
|
|
2713
|
-
amount: n.amount,
|
|
2714
|
-
return_url: l
|
|
2715
|
-
});
|
|
2716
|
-
if (r.info("APPLE_PAY_API_RESPONSE", "Payment API response received", {
|
|
2717
|
-
paymentAcceptorId: s,
|
|
2718
|
-
status: P.status
|
|
2719
|
-
}), P.status === "FAILURE") {
|
|
2720
|
-
r.error(
|
|
2721
|
-
"APPLE_PAY_AUTHORIZATION_FAILED",
|
|
2722
|
-
"Payment authorization failed",
|
|
2723
|
-
d({
|
|
2724
|
-
reason: "APPLE_PAY_AUTHORIZATION_REJECTED",
|
|
2725
|
-
extra: { paymentStatus: P.status }
|
|
2726
|
-
})
|
|
2727
|
-
), E.reject();
|
|
2728
|
-
return;
|
|
2729
|
-
}
|
|
2730
|
-
if (P.status === "ACTION_REQUIRED") {
|
|
2731
|
-
r.warn(
|
|
2732
|
-
"APPLE_PAY_ACTION_REQUIRED",
|
|
2733
|
-
"Payment requires additional action",
|
|
2734
|
-
d({
|
|
2735
|
-
reason: "APPLE_PAY_ACTION_REQUIRED",
|
|
2736
|
-
extra: { actionType: (m = P.action) == null ? void 0 : m.method }
|
|
2737
|
-
})
|
|
2738
|
-
), E.reject();
|
|
2739
|
-
return;
|
|
2740
|
-
}
|
|
2741
|
-
r.info("APPLE_PAY_SUCCESS", "Apple Pay payment successful, resolving"), E.resolve();
|
|
2742
|
-
} catch (B) {
|
|
2743
|
-
r.error(
|
|
2744
|
-
"APPLE_PAY_AUTHORIZATION_FAILED",
|
|
2745
|
-
"Apple Pay authorization failed",
|
|
2746
|
-
d({ reason: "APPLE_PAY_AUTHORIZATION_FAILED", cause: B }),
|
|
2747
|
-
B
|
|
2748
|
-
), E.reject();
|
|
2749
|
-
}
|
|
2750
|
-
}
|
|
2751
|
-
});
|
|
2752
|
-
if (!o.value) {
|
|
2753
|
-
r.error("APPLE_PAY_ERROR", "Apple Pay button ref not found");
|
|
2754
|
-
return;
|
|
2755
|
-
}
|
|
2756
|
-
try {
|
|
2757
|
-
await z.isAvailable(), z.mount(o.value), a("ready");
|
|
2758
|
-
} catch (A) {
|
|
2759
|
-
r.error("APPLE_PAY_ERROR", "Apple Pay not available on this device", {}, A);
|
|
2760
|
-
}
|
|
2761
|
-
}, g = (v) => {
|
|
2762
|
-
if (!v.value)
|
|
2763
|
-
return;
|
|
2764
|
-
let H = v.value ?? 1, z = v.type.toLowerCase();
|
|
2765
|
-
if (v.type === "WEEK" && (z = "day", H = v.value * 7), z === "day" || z === "month" || z === "year" || z === "hour" || z === "minute")
|
|
2766
|
-
return {
|
|
2767
|
-
recurringPaymentIntervalUnit: z,
|
|
2768
|
-
recurringPaymentIntervalCount: H
|
|
2769
|
-
};
|
|
2770
|
-
}, h = (v) => ({
|
|
2771
|
-
postal_code: v.postalCode,
|
|
2772
|
-
city: v.locality,
|
|
2773
|
-
country: v.countryCode
|
|
2774
|
-
}), C = (v) => ({
|
|
2775
|
-
postal_code: v.postalCode,
|
|
2776
|
-
city: v.city,
|
|
2777
|
-
country: v.country
|
|
2778
|
-
}), f = (v) => v && L(v) ? v : void 0, L = (v) => Qe(v), x = () => {
|
|
2779
|
-
var H;
|
|
2780
|
-
const v = (H = o.value) == null ? void 0 : H.querySelector("apple-pay-button");
|
|
2781
|
-
if (v) {
|
|
2782
|
-
const z = new MouseEvent("click", {
|
|
2783
|
-
bubbles: !0,
|
|
2784
|
-
cancelable: !0,
|
|
2785
|
-
view: window
|
|
2786
|
-
});
|
|
2787
|
-
v.dispatchEvent(z);
|
|
2788
|
-
}
|
|
2789
|
-
};
|
|
2790
|
-
return je(() => {
|
|
2791
|
-
I();
|
|
2792
|
-
}), (v, H) => (p(), $(me, null, [
|
|
2793
|
-
e.isVisible ? (p(), O(at, {
|
|
2794
|
-
key: 0,
|
|
2795
|
-
type: "applepay",
|
|
2796
|
-
onClick: x
|
|
2797
|
-
})) : U("", !0),
|
|
2798
|
-
w("div", Go, [
|
|
2799
|
-
w("div", {
|
|
2800
|
-
ref_key: "applePayButtonRef",
|
|
2801
|
-
ref: o
|
|
2802
|
-
}, null, 512)
|
|
2803
|
-
])
|
|
2804
|
-
], 64));
|
|
2805
|
-
}
|
|
2806
|
-
}), Ho = { class: "relative overflow-hidden" }, Qo = /* @__PURE__ */ se({
|
|
2807
|
-
__name: "ExpressPaymentMethodPaypal",
|
|
2808
|
-
props: {
|
|
2809
|
-
amount: { type: Object },
|
|
2810
|
-
countryCode: { type: String },
|
|
2811
|
-
locale: { type: String },
|
|
2812
|
-
isVisible: { type: Boolean },
|
|
2813
|
-
paymentMethodOptionsResponse: { type: Object },
|
|
2814
|
-
billingInformation: { type: Object }
|
|
2815
|
-
},
|
|
2816
|
-
emits: ["ready", "update-billing-information"],
|
|
2817
|
-
setup(e, { emit: i }) {
|
|
2818
|
-
const n = e, a = i, o = Ae(), { buttonRef: r } = ei({
|
|
2819
|
-
props: n,
|
|
2820
|
-
onMissingButton: () => o.error(
|
|
2821
|
-
"EXPRESS_CHECKOUT_PAYPAL_ERROR",
|
|
2822
|
-
"The PayPal button reference is not found and cannot be mounted"
|
|
2823
|
-
),
|
|
2824
|
-
onMountFailed: (u) => o.error("EXPRESS_CHECKOUT_PAYPAL_ERROR", "Failed mounting PayPal express button", {
|
|
2825
|
-
error: u
|
|
2826
|
-
}),
|
|
2827
|
-
create: async (u) => {
|
|
2828
|
-
const { PayPal: s } = await Ke();
|
|
2829
|
-
return new s(u, {
|
|
2830
|
-
isExpress: !0,
|
|
2831
|
-
blockPayPalPayLaterButton: !0,
|
|
2832
|
-
blockPayPalCreditButton: !0,
|
|
2833
|
-
blockPayPalVenmoButton: !0,
|
|
2834
|
-
style: {
|
|
2835
|
-
height: 55
|
|
2836
|
-
},
|
|
2837
|
-
onInit: () => {
|
|
2838
|
-
a("ready");
|
|
2839
|
-
}
|
|
2840
|
-
});
|
|
2841
|
-
}
|
|
2842
|
-
});
|
|
2843
|
-
return (u, s) => (p(), $("div", Ho, [
|
|
2844
|
-
e.isVisible ? (p(), O(at, {
|
|
2845
|
-
key: 0,
|
|
2846
|
-
type: "paypal",
|
|
2847
|
-
class: "w-full"
|
|
2848
|
-
})) : U("", !0),
|
|
2849
|
-
w("div", {
|
|
2850
|
-
ref_key: "paypalButtonRef",
|
|
2851
|
-
ref: r,
|
|
2852
|
-
class: "absolute inset-0 opacity-[0.0001]"
|
|
2853
|
-
}, null, 512)
|
|
2854
|
-
]));
|
|
2855
|
-
}
|
|
2856
|
-
}), Zo = { class: "absolute h-[1px] w-[1px] overflow-hidden opacity-0" }, Xo = /* @__PURE__ */ se({
|
|
2857
|
-
__name: "ExpressPaymentMethodGooglePay",
|
|
2858
|
-
props: {
|
|
2859
|
-
amount: { type: Object },
|
|
2860
|
-
countryCode: { type: String },
|
|
2861
|
-
locale: { type: String },
|
|
2862
|
-
isVisible: { type: Boolean },
|
|
2863
|
-
paymentMethodOptionsResponse: { type: Object },
|
|
2864
|
-
billingInformation: { type: Object }
|
|
2865
|
-
},
|
|
2866
|
-
emits: ["ready", "update-billing-information"],
|
|
2867
|
-
setup(e, { emit: i }) {
|
|
2868
|
-
const n = e, a = i, o = Ae(), { buttonRef: r } = ei({
|
|
2869
|
-
props: n,
|
|
2870
|
-
onMissingButton: () => o.error(
|
|
2871
|
-
"EXPRESS_CHECKOUT_GOOGLE_PAY_ERROR",
|
|
2872
|
-
"The Google Pay button reference is not found and cannot be mounted"
|
|
2873
|
-
),
|
|
2874
|
-
onMountFailed: (s) => o.error(
|
|
2875
|
-
"EXPRESS_CHECKOUT_GOOGLE_PAY_ERROR",
|
|
2876
|
-
"Failed mounting Google Pay express button",
|
|
2877
|
-
{},
|
|
2878
|
-
s
|
|
2879
|
-
),
|
|
2880
|
-
create: async (s) => {
|
|
2881
|
-
const { GooglePay: d } = await Ke();
|
|
2882
|
-
return new d(s, { isExpress: !0 });
|
|
2883
|
-
},
|
|
2884
|
-
afterMount: () => a("ready")
|
|
2885
|
-
}), u = () => {
|
|
2886
|
-
var d;
|
|
2887
|
-
const s = (d = r.value) == null ? void 0 : d.querySelector("#gpay-button-online-api-id");
|
|
2888
|
-
if (s) {
|
|
2889
|
-
const I = new MouseEvent("click", {
|
|
2890
|
-
bubbles: !0,
|
|
2891
|
-
cancelable: !0,
|
|
2892
|
-
view: window
|
|
2893
|
-
});
|
|
2894
|
-
s.dispatchEvent(I);
|
|
2895
|
-
}
|
|
2896
|
-
};
|
|
2897
|
-
return (s, d) => (p(), $(me, null, [
|
|
2898
|
-
e.isVisible ? (p(), O(at, {
|
|
2899
|
-
key: 0,
|
|
2900
|
-
type: "googlepay",
|
|
2901
|
-
onClick: u
|
|
2902
|
-
})) : U("", !0),
|
|
2903
|
-
w("div", Zo, [
|
|
2904
|
-
w("div", {
|
|
2905
|
-
ref_key: "googlePayButtonRef",
|
|
2906
|
-
ref: r
|
|
2907
|
-
}, null, 512)
|
|
2908
|
-
])
|
|
2909
|
-
], 64));
|
|
2910
|
-
}
|
|
2911
|
-
}), Wo = {
|
|
2912
|
-
key: 0,
|
|
2913
|
-
class: "mt-4n"
|
|
2914
|
-
}, qo = { class: "mb-2" }, Jo = { class: "grid grid-cols-6 gap-1 md:gap-2" }, ea = { class: "mt-4 h-4" }, ta = 2, ia = /* @__PURE__ */ se({
|
|
2915
|
-
__name: "ExpressPaymentMethods",
|
|
2916
|
-
props: {
|
|
2917
|
-
amount: { type: Object },
|
|
2918
|
-
countryCode: { type: String },
|
|
2919
|
-
locale: { type: String },
|
|
2920
|
-
paymentMethodsOptionsResponse: { type: null },
|
|
2921
|
-
billingInformation: { type: Object },
|
|
2922
|
-
onBillingInformationChange: { type: Function }
|
|
2923
|
-
},
|
|
2924
|
-
emits: ["update-billing-information"],
|
|
2925
|
-
setup(e) {
|
|
2926
|
-
const i = ["applepay"], n = e, { $t: a } = he(), o = Y(!1), r = Y(!1), u = Y(!1), s = _(() => {
|
|
2927
|
-
var f;
|
|
2928
|
-
if (i.includes("applepay"))
|
|
2929
|
-
return (f = n.paymentMethodsOptionsResponse) == null ? void 0 : f.find(
|
|
2930
|
-
(L) => {
|
|
2931
|
-
var x;
|
|
2932
|
-
return (x = L.options) == null ? void 0 : x.some(
|
|
2933
|
-
(v) => v.name.toLowerCase() === "apple pay" && v.payment_gateway_variant === "ADYEN"
|
|
2934
|
-
);
|
|
2935
|
-
}
|
|
2936
|
-
);
|
|
2937
|
-
}), d = _(() => {
|
|
2938
|
-
var f;
|
|
2939
|
-
if (i.includes("paypal"))
|
|
2940
|
-
return (f = n.paymentMethodsOptionsResponse) == null ? void 0 : f.find(
|
|
2941
|
-
(L) => {
|
|
2942
|
-
var x;
|
|
2943
|
-
return (x = L.options) == null ? void 0 : x.some(
|
|
2944
|
-
(v) => v.name.toLowerCase() === "paypal" && v.payment_gateway_variant === "ADYEN"
|
|
2945
|
-
);
|
|
2946
|
-
}
|
|
2947
|
-
);
|
|
2948
|
-
}), I = _(() => {
|
|
2949
|
-
var f;
|
|
2950
|
-
if (i.includes("googlepay"))
|
|
2951
|
-
return (f = n.paymentMethodsOptionsResponse) == null ? void 0 : f.find(
|
|
2952
|
-
(L) => {
|
|
2953
|
-
var x;
|
|
2954
|
-
return (x = L.options) == null ? void 0 : x.some(
|
|
2955
|
-
(v) => v.name.toLowerCase() === "google pay" && v.payment_gateway_variant === "ADYEN"
|
|
2956
|
-
);
|
|
2957
|
-
}
|
|
2958
|
-
);
|
|
2959
|
-
}), g = _(() => !!(s.value || I.value || d.value)), h = _(() => {
|
|
2960
|
-
var v;
|
|
2961
|
-
if (((v = n.paymentMethodsOptionsResponse) == null ? void 0 : v.length) === 0)
|
|
2962
|
-
return !1;
|
|
2963
|
-
const f = !s.value || o.value, L = !I.value || r.value, x = !d.value || u.value;
|
|
2964
|
-
return f && L && x;
|
|
2965
|
-
}), C = _(() => h.value ? (s.value ? 1 : 0) + (I.value ? 1 : 0) + (d.value ? 1 : 0) : ta);
|
|
2966
|
-
return (f, L) => g.value ? (p(), $("div", Wo, [
|
|
2967
|
-
w("div", qo, [
|
|
2968
|
-
h.value ? (p(), O(t(le), {
|
|
2969
|
-
key: 1,
|
|
2970
|
-
variant: "heading-3",
|
|
2971
|
-
tag: "h2"
|
|
2972
|
-
}, {
|
|
2973
|
-
default: b(() => [
|
|
2974
|
-
K(V(t(a)({
|
|
2975
|
-
defaultMessage: "Subscribe instantly with",
|
|
2976
|
-
id: "checkout.express_payment_methods.title",
|
|
2977
|
-
description: "The title of the express payment methods block in the checkout form"
|
|
2978
|
-
})), 1)
|
|
2979
|
-
]),
|
|
2980
|
-
_: 1
|
|
2981
|
-
})) : (p(), O(be, {
|
|
2982
|
-
key: 0,
|
|
2983
|
-
variant: "title"
|
|
2984
|
-
}))
|
|
2985
|
-
]),
|
|
2986
|
-
w("div", Jo, [
|
|
2987
|
-
h.value ? U("", !0) : (p(), $(me, { key: 0 }, [
|
|
2988
|
-
M(be, { class: "col-span-3 h-11" }),
|
|
2989
|
-
M(be, { class: "col-span-3 h-11" })
|
|
2990
|
-
], 64)),
|
|
2991
|
-
w("div", {
|
|
2992
|
-
class: Ie(["col-span-3 md:col-span-2", {
|
|
2993
|
-
hidden: !s.value,
|
|
2994
|
-
"!col-span-6": C.value === 1,
|
|
2995
|
-
"md:!col-span-3": C.value === 2,
|
|
2996
|
-
"!col-span-6 md:!col-span-2": C.value === 3
|
|
2997
|
-
}])
|
|
2998
|
-
}, [
|
|
2999
|
-
s.value ? (p(), O(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": s.value,
|
|
3007
|
-
"on-billing-information-change": e.onBillingInformationChange,
|
|
3008
|
-
onReady: L[0] || (L[0] = (x) => o.value = !0),
|
|
3009
|
-
onUpdateBillingInformation: L[1] || (L[1] = (x) => f.$emit("update-billing-information", x))
|
|
3010
|
-
}, null, 8, ["amount", "billing-information", "country-code", "locale", "is-visible", "payment-method-options-response", "on-billing-information-change"])) : U("", !0)
|
|
3011
|
-
], 2),
|
|
3012
|
-
w("div", {
|
|
3013
|
-
class: Ie(["col-span-3 md:col-span-2", {
|
|
3014
|
-
hidden: !I.value,
|
|
3015
|
-
"col-span-6 md:col-span-6": C.value === 1,
|
|
3016
|
-
"md:!col-span-3": C.value === 2
|
|
3017
|
-
}])
|
|
3018
|
-
}, [
|
|
3019
|
-
I.value ? (p(), O(Xo, {
|
|
3020
|
-
key: 0,
|
|
3021
|
-
amount: e.amount,
|
|
3022
|
-
"billing-information": e.billingInformation,
|
|
3023
|
-
"country-code": e.countryCode,
|
|
3024
|
-
locale: e.locale,
|
|
3025
|
-
"is-visible": h.value,
|
|
3026
|
-
"payment-method-options-response": I.value,
|
|
3027
|
-
onReady: L[2] || (L[2] = (x) => r.value = !0)
|
|
3028
|
-
}, null, 8, ["amount", "billing-information", "country-code", "locale", "is-visible", "payment-method-options-response"])) : U("", !0)
|
|
3029
|
-
], 2),
|
|
3030
|
-
w("div", {
|
|
3031
|
-
class: Ie(["col-span-3 md:col-span-2", {
|
|
3032
|
-
hidden: !d.value,
|
|
3033
|
-
"col-span-6 md:col-span-6": C.value === 1,
|
|
3034
|
-
"md:!col-span-3": C.value === 2
|
|
3035
|
-
}])
|
|
3036
|
-
}, [
|
|
3037
|
-
d.value ? (p(), O(Qo, {
|
|
3038
|
-
key: 0,
|
|
3039
|
-
amount: e.amount,
|
|
3040
|
-
"billing-information": e.billingInformation,
|
|
3041
|
-
"country-code": e.countryCode,
|
|
3042
|
-
locale: e.locale,
|
|
3043
|
-
"is-visible": h.value,
|
|
3044
|
-
"payment-method-options-response": d.value,
|
|
3045
|
-
onReady: L[3] || (L[3] = (x) => u.value = !0)
|
|
3046
|
-
}, null, 8, ["amount", "billing-information", "country-code", "locale", "is-visible", "payment-method-options-response"])) : U("", !0)
|
|
3047
|
-
], 2)
|
|
3048
|
-
]),
|
|
3049
|
-
w("div", ea, [
|
|
3050
|
-
h.value ? (p(), O(t(rn), {
|
|
3051
|
-
key: 1,
|
|
3052
|
-
text: t(a)({
|
|
3053
|
-
defaultMessage: "Or",
|
|
3054
|
-
id: "checkout.express_payment_methods.divider_text",
|
|
3055
|
-
description: "The text of the divider text in the express payment methods block in the checkout form"
|
|
3056
|
-
}),
|
|
3057
|
-
"text-position": "center"
|
|
3058
|
-
}, null, 8, ["text"])) : (p(), O(be, {
|
|
3059
|
-
key: 0,
|
|
3060
|
-
variant: "divider-text"
|
|
3061
|
-
}))
|
|
3062
|
-
])
|
|
3063
|
-
])) : U("", !0);
|
|
3064
|
-
}
|
|
3065
|
-
}), na = ["aria-expanded", "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 = ["onKeydown"], la = ["aria-label"], sa = { class: "flex w-full cursor-pointer flex-row items-center justify-between gap-3 px-3 py-2" }, ca = { class: "flex flex-row items-center gap-2" }, ua = {
|
|
3066
|
-
class: "sr-only",
|
|
3067
|
-
"aria-live": "polite"
|
|
3068
|
-
}, da = /* @__PURE__ */ se({
|
|
3069
|
-
inheritAttrs: !1,
|
|
3070
|
-
__name: "PromotionCodeSection",
|
|
3071
|
-
props: {
|
|
3072
|
-
promotionCode: { default: null, type: [String, null] }
|
|
3073
|
-
},
|
|
3074
|
-
emits: ["update:appliedCode", "apply", "remove"],
|
|
3075
|
-
setup(e, { emit: i }) {
|
|
3076
|
-
const { $t: n } = he(), a = e, o = i, r = Y(!1), u = Y(""), s = Y(""), d = Y(null), I = Y(null), g = un("promotion-code-"), h = `${g}-label`, C = `${g}-panel`, f = _({
|
|
3077
|
-
get: () => u.value,
|
|
3078
|
-
set: (l) => u.value = Li(l)
|
|
3079
|
-
}), L = _(() => a.promotionCode !== null && a.promotionCode !== ""), x = _(() => u.value.trim().length > 0), v = _(
|
|
3080
|
-
() => a.promotionCode ?? n({
|
|
3081
|
-
defaultMessage: "Promotion applied",
|
|
3082
|
-
id: "checkout.promotion_code.applied_label",
|
|
3083
|
-
description: "Fallback label for an applied promotion code in checkout"
|
|
3084
|
-
})
|
|
3085
|
-
), H = _(
|
|
3086
|
-
() => r.value ? n({
|
|
3087
|
-
defaultMessage: "Collapse promotion code input",
|
|
3088
|
-
id: "checkout.promotion_code.collapse_aria_label",
|
|
3089
|
-
description: "Aria label for the promotion code toggle button in checkout, while the input is open"
|
|
3090
|
-
}) : n({
|
|
3091
|
-
defaultMessage: "Expand promotion code input",
|
|
3092
|
-
id: "checkout.promotion_code.expand_aria_label",
|
|
3093
|
-
description: "Aria label for the promotion code toggle button in checkout, while the input is closed"
|
|
3094
|
-
})
|
|
3095
|
-
), z = _(
|
|
3096
|
-
() => n({
|
|
3097
|
-
defaultMessage: "Apply promotion code",
|
|
3098
|
-
id: "checkout.promotion_code.apply_aria_label",
|
|
3099
|
-
description: "Aria label for the promotion code apply button in checkout"
|
|
3100
|
-
})
|
|
3101
|
-
), A = _(
|
|
3102
|
-
() => n({
|
|
3103
|
-
defaultMessage: "Remove promotion code",
|
|
3104
|
-
id: "checkout.promotion_code.remove_aria_label",
|
|
3105
|
-
description: "Aria label for the promotion code remove button in checkout"
|
|
3106
|
-
})
|
|
3107
|
-
), E = () => {
|
|
3108
|
-
u.value = "";
|
|
3109
|
-
}, m = () => {
|
|
3110
|
-
var P;
|
|
3111
|
-
const l = (P = I.value) == null ? void 0 : P.querySelector("input");
|
|
3112
|
-
l instanceof HTMLInputElement && l.focus();
|
|
3113
|
-
}, B = () => {
|
|
3114
|
-
r.value && (r.value = !1);
|
|
3115
|
-
}, S = () => {
|
|
3116
|
-
L.value || (r.value = !r.value);
|
|
3117
|
-
}, X = () => {
|
|
3118
|
-
if (!x.value)
|
|
3119
|
-
return;
|
|
3120
|
-
const l = u.value.trim();
|
|
3121
|
-
o("update:appliedCode", l), o("apply", l), s.value = n({
|
|
3122
|
-
defaultMessage: "Promotion code applied",
|
|
3123
|
-
id: "checkout.promotion_code.applied_status",
|
|
3124
|
-
description: "Aria live message when a promotion code is applied in checkout"
|
|
3125
|
-
}), r.value = !1;
|
|
3126
|
-
}, de = () => {
|
|
3127
|
-
o("update:appliedCode", null), o("remove"), s.value = n({
|
|
3128
|
-
defaultMessage: "Promotion code removed",
|
|
3129
|
-
id: "checkout.promotion_code.removed_status",
|
|
3130
|
-
description: "Aria live message when a promotion code is removed in checkout"
|
|
3131
|
-
}), E(), qe(() => {
|
|
3132
|
-
var l;
|
|
3133
|
-
(l = d.value) == null || l.focus();
|
|
3134
|
-
});
|
|
3135
|
-
};
|
|
3136
|
-
return Oe(r, (l) => {
|
|
3137
|
-
if (!l) {
|
|
3138
|
-
E(), qe(() => {
|
|
3139
|
-
var P;
|
|
3140
|
-
(P = d.value) == null || P.focus();
|
|
3141
|
-
});
|
|
3142
|
-
return;
|
|
3143
|
-
}
|
|
3144
|
-
qe(() => {
|
|
3145
|
-
m();
|
|
3146
|
-
});
|
|
3147
|
-
}), Oe(
|
|
3148
|
-
() => a.promotionCode,
|
|
3149
|
-
(l) => {
|
|
3150
|
-
l || E();
|
|
3151
|
-
}
|
|
3152
|
-
), (l, P) => (p(), $(me, null, [
|
|
3153
|
-
L.value ? (p(), O(t(ye), Pt({ key: 1 }, l.$attrs, {
|
|
3154
|
-
"no-border": "",
|
|
3155
|
-
"no-spacing": "",
|
|
3156
|
-
"content-background": "none",
|
|
3157
|
-
class: "relative w-full"
|
|
3158
|
-
}), {
|
|
3159
|
-
default: b(() => [
|
|
3160
|
-
w("button", {
|
|
3161
|
-
type: "button",
|
|
3162
|
-
class: "w-full rounded border border-primary-900 bg-white",
|
|
3163
|
-
"aria-label": A.value,
|
|
3164
|
-
onClick: de
|
|
3165
|
-
}, [
|
|
3166
|
-
w("div", sa, [
|
|
3167
|
-
w("div", ca, [
|
|
3168
|
-
M(t(Be), { icon: "local_activity" }),
|
|
3169
|
-
M(t(le), {
|
|
3170
|
-
variant: "body-sm",
|
|
3171
|
-
class: "font-semibold"
|
|
3172
|
-
}, {
|
|
3173
|
-
default: b(() => [
|
|
3174
|
-
K(V(v.value), 1)
|
|
3175
|
-
]),
|
|
3176
|
-
_: 1
|
|
3177
|
-
})
|
|
3178
|
-
]),
|
|
3179
|
-
M(t(Be), { icon: "close" })
|
|
3180
|
-
])
|
|
3181
|
-
], 8, la)
|
|
3182
|
-
]),
|
|
3183
|
-
_: 1
|
|
3184
|
-
}, 16)) : (p(), O(t(ye), Pt({ key: 0 }, l.$attrs, {
|
|
3185
|
-
"no-spacing": "",
|
|
3186
|
-
class: "relative w-full"
|
|
3187
|
-
}), {
|
|
3188
|
-
default: b(() => [
|
|
3189
|
-
w("button", {
|
|
3190
|
-
ref_key: "toggleRef",
|
|
3191
|
-
ref: d,
|
|
3192
|
-
type: "button",
|
|
3193
|
-
class: "w-full",
|
|
3194
|
-
"aria-expanded": r.value,
|
|
3195
|
-
"aria-controls": C,
|
|
3196
|
-
"aria-label": H.value,
|
|
3197
|
-
onClick: S
|
|
3198
|
-
}, [
|
|
3199
|
-
w("div", oa, [
|
|
3200
|
-
w("div", aa, [
|
|
3201
|
-
M(t(Be), { icon: "local_activity" }),
|
|
3202
|
-
M(t(le), {
|
|
3203
|
-
id: h,
|
|
3204
|
-
variant: "body-sm"
|
|
3205
|
-
}, {
|
|
3206
|
-
default: b(() => [
|
|
3207
|
-
K(V(t(n)({
|
|
3208
|
-
defaultMessage: "Add promotion code",
|
|
3209
|
-
id: "checkout.promotion_code.add_label",
|
|
3210
|
-
description: "Label for adding a promotion code in checkout"
|
|
3211
|
-
})), 1)
|
|
3212
|
-
]),
|
|
3213
|
-
_: 1
|
|
3214
|
-
})
|
|
3215
|
-
]),
|
|
3216
|
-
M(t(Be), {
|
|
3217
|
-
icon: r.value ? "remove" : "add"
|
|
3218
|
-
}, null, 8, ["icon"])
|
|
3219
|
-
])
|
|
3220
|
-
], 8, na),
|
|
3221
|
-
gi(w("div", {
|
|
3222
|
-
id: C,
|
|
3223
|
-
ref_key: "panelRef",
|
|
3224
|
-
ref: I,
|
|
3225
|
-
role: "region",
|
|
3226
|
-
"aria-labelledby": h,
|
|
3227
|
-
class: "flex w-full flex-row items-center gap-2 overflow-hidden border-t px-3 py-2",
|
|
3228
|
-
onKeydown: Dt(Fe(B, ["prevent"]), ["esc"])
|
|
3229
|
-
}, [
|
|
3230
|
-
M(t(_e), {
|
|
3231
|
-
modelValue: f.value,
|
|
3232
|
-
"onUpdate:modelValue": P[0] || (P[0] = (c) => f.value = c),
|
|
3233
|
-
placeholder: t(n)({
|
|
3234
|
-
defaultMessage: "Promotion code",
|
|
3235
|
-
id: "checkout.promotion_code.placeholder",
|
|
3236
|
-
description: "Placeholder for promotion code input in checkout"
|
|
3237
|
-
}),
|
|
3238
|
-
"aria-label": t(n)({
|
|
3239
|
-
defaultMessage: "Promotion code",
|
|
3240
|
-
id: "checkout.promotion_code.input_aria_label",
|
|
3241
|
-
description: "Aria label for promotion code input in checkout"
|
|
3242
|
-
}),
|
|
3243
|
-
class: "w-full",
|
|
3244
|
-
onKeydown: Dt(Fe(X, ["prevent"]), ["enter"])
|
|
3245
|
-
}, null, 8, ["modelValue", "placeholder", "aria-label", "onKeydown"]),
|
|
3246
|
-
M(t(Ne), {
|
|
3247
|
-
type: "button",
|
|
3248
|
-
disabled: !x.value,
|
|
3249
|
-
"aria-label": z.value,
|
|
3250
|
-
"aria-disabled": !x.value,
|
|
3251
|
-
onClick: X
|
|
3252
|
-
}, {
|
|
3253
|
-
default: b(() => [
|
|
3254
|
-
K(V(t(n)({
|
|
3255
|
-
defaultMessage: "Apply",
|
|
3256
|
-
id: "checkout.promotion_code.apply_button",
|
|
3257
|
-
description: "Button label for applying a promotion code in checkout"
|
|
3258
|
-
})), 1)
|
|
3259
|
-
]),
|
|
3260
|
-
_: 1
|
|
3261
|
-
}, 8, ["disabled", "aria-label", "aria-disabled"])
|
|
3262
|
-
], 40, ra), [
|
|
3263
|
-
[yi, r.value]
|
|
3264
|
-
])
|
|
3265
|
-
]),
|
|
3266
|
-
_: 1
|
|
3267
|
-
}, 16)),
|
|
3268
|
-
w("span", ua, V(s.value), 1)
|
|
3269
|
-
], 64));
|
|
3270
|
-
}
|
|
3271
|
-
}), pa = { class: "sv-checkout__header" }, ma = { class: "sv-checkout__payment-methods" }, ga = {
|
|
3272
|
-
key: 0,
|
|
3273
|
-
class: "sv-checkout__payment-methods-body"
|
|
3274
|
-
}, ya = {
|
|
3275
|
-
key: 3,
|
|
3276
|
-
class: "sv-checkout__payment-form"
|
|
3277
|
-
}, va = { class: "sv-checkout__order-summary" }, fa = { class: "flex flex-col gap-2" }, _a = /* @__PURE__ */ se({
|
|
3278
|
-
__name: "Checkout",
|
|
3279
|
-
props: {
|
|
3280
|
-
configuration: { type: Object }
|
|
3281
|
-
},
|
|
3282
|
-
emits: ["error", "ready"],
|
|
3283
|
-
setup(e, { emit: i }) {
|
|
3284
|
-
var ut, dt, pt, mt, gt, yt, vt, ft, _t, ht, Mt, bt;
|
|
3285
|
-
const n = Nt(
|
|
3286
|
-
() => import("./PaymentIntegrationForm-UWoyZgsR.mjs")
|
|
3287
|
-
), a = Nt(
|
|
3288
|
-
() => import("./PlanCustomizationEditor-CpZeilm5.mjs")
|
|
3289
|
-
), o = e, r = i, u = _(() => o.configuration), s = Y(), d = Y(), I = Ae(), { $t: g, locale: h } = he(), { formatTimePeriod: C } = $t(), f = Yi(), { isMobileViewport: L } = Vt();
|
|
3290
|
-
if (I.info("COMPONENT_INITIALIZED", "Checkout component initialized"), ((ut = f.value) == null ? void 0 : ut.type) !== "INIT_PRICING_PLAN_SUBSCRIPTION")
|
|
3291
|
-
throw I.error("INVALID_TOKEN", "Invalid token"), Error("Invalid token");
|
|
3292
|
-
f.value.status === "REVOKED" && (s.value = {
|
|
3293
|
-
code: "RESOURCE_REVOKED",
|
|
3294
|
-
message: `Portal url with resource id "${f.value.id}" is revoked`
|
|
3295
|
-
}, I.error("RESOURCE_REVOKED", `Portal url with resource id "${f.value.id}" is revoked`));
|
|
3296
|
-
const x = (pt = (dt = f.value) == null ? void 0 : dt.init_pricing_plan_subscription) == null ? void 0 : pt.pricing_plan_subscription_id, v = (gt = (mt = f.value) == null ? void 0 : mt.init_pricing_plan_subscription) == null ? void 0 : gt.success_url, H = ((ft = (vt = (yt = f.value) == null ? void 0 : yt.init_pricing_plan_subscription) == null ? void 0 : vt.note) == null ? void 0 : ft.trim()) || void 0, {
|
|
3297
|
-
validatedEmail: z,
|
|
3298
|
-
validatedCountry: A,
|
|
3299
|
-
paymentMethodOptions: E,
|
|
3300
|
-
hasPaymentMethodOptionsError: m,
|
|
3301
|
-
retryPaymentMethodOptions: B,
|
|
3302
|
-
subscription: S,
|
|
3303
|
-
isPaymentMethodsPending: X,
|
|
3304
|
-
isInvoicePreviewPending: de,
|
|
3305
|
-
checkoutForm: l,
|
|
3306
|
-
invoicePreview: P,
|
|
3307
|
-
invoicePreviewByBillingPeriod: c,
|
|
3308
|
-
trialInvoicePreview: y,
|
|
3309
|
-
trialPeriod: D,
|
|
3310
|
-
authorizationContext: T,
|
|
3311
|
-
isPaid: R,
|
|
3312
|
-
amount: Q,
|
|
3313
|
-
loadInvoicePreview: F,
|
|
3314
|
-
updateInvoicePreviewOnBillingInformationChange: ne,
|
|
3315
|
-
saveFormStateForRedirect: ee
|
|
3316
|
-
} = Gn({
|
|
3317
|
-
initialCountry: (_t = o.configuration) == null ? void 0 : _t.countryCode,
|
|
3318
|
-
initialEmail: (ht = o.configuration) == null ? void 0 : ht.email,
|
|
3319
|
-
subscriptionId: x,
|
|
3320
|
-
enabledPricingIds: (Mt = o.configuration) == null ? void 0 : Mt.enabledPricingIds
|
|
3321
|
-
}), te = Y(!1), ie = async () => {
|
|
3322
|
-
var N;
|
|
3323
|
-
await l.validation.value.$validate(), !l.validation.value.$invalid && (te.value = !0, ee(), (N = d.value) == null || N.submit());
|
|
3324
|
-
}, oe = () => {
|
|
3325
|
-
te.value = !1;
|
|
3326
|
-
}, G = async () => (await l.validation.value.$validate(), !l.validation.value.$invalid), q = _(() => !!y.value), J = _(
|
|
3327
|
-
() => P.value ? uo(P.value) : !1
|
|
3328
|
-
), ae = _(
|
|
3329
|
-
() => l.form.value.country && ["US", "CA"].includes(l.form.value.country) || !1
|
|
3330
|
-
), ce = _({
|
|
3331
|
-
get: () => l.form.value.enabledPricingIds ?? [],
|
|
3332
|
-
set: (N) => {
|
|
3333
|
-
l.form.value.enabledPricingIds = N;
|
|
3334
|
-
}
|
|
3335
|
-
}), ue = _(
|
|
3336
|
-
() => S.value ? xe({
|
|
3337
|
-
pricingPlanScheduleInfos: S.value.pricing_plan_schedule_infos,
|
|
3338
|
-
type: "DEFAULT"
|
|
3339
|
-
}) : void 0
|
|
3340
|
-
), ve = _(() => {
|
|
3341
|
-
var k, j;
|
|
3342
|
-
if (!S.value)
|
|
3343
|
-
return;
|
|
3344
|
-
const N = (j = (k = ue.value) == null ? void 0 : k.pricing_plan_version) == null ? void 0 : j.pricing_currency_settings;
|
|
3345
|
-
return Zt({
|
|
3346
|
-
country: l.form.value.country,
|
|
3347
|
-
pricingCurrencySettings: N,
|
|
3348
|
-
fallbackCurrency: S.value.billing_currency
|
|
3349
|
-
});
|
|
3350
|
-
}), fe = _(() => {
|
|
3351
|
-
if (!ue.value || !S.value)
|
|
3352
|
-
return /* @__PURE__ */ new Set();
|
|
3353
|
-
const N = Ni({
|
|
3354
|
-
pricingPlanScheduleInfo: ue.value
|
|
3355
|
-
}), k = ve.value, j = S.value.billing_period, W = /* @__PURE__ */ new Set();
|
|
3356
|
-
return N.forEach((Z, pe) => {
|
|
3357
|
-
k && Z.currency !== k || j && Z.billingPeriod && (Z.billingPeriod.type !== j.type || Z.billingPeriod.value !== j.value) || W.add(pe);
|
|
3358
|
-
}), W;
|
|
3359
|
-
}), Le = _({
|
|
3360
|
-
get: () => {
|
|
3361
|
-
const N = l.form.value.seatsValues ?? [], k = fe.value;
|
|
3362
|
-
return k.size ? N.filter(({ pricing_item_config_id: j }) => k.has(j)) : N;
|
|
3363
|
-
},
|
|
3364
|
-
set: (N) => {
|
|
3365
|
-
const k = l.form.value.seatsValues ?? [], j = fe.value;
|
|
3366
|
-
if (!j.size) {
|
|
3367
|
-
l.form.value.seatsValues = N;
|
|
3368
|
-
return;
|
|
3369
|
-
}
|
|
3370
|
-
const W = k.filter(
|
|
3371
|
-
({ pricing_item_config_id: Z }) => !j.has(Z)
|
|
3372
|
-
);
|
|
3373
|
-
l.form.value.seatsValues = W.concat(N);
|
|
3374
|
-
}
|
|
3375
|
-
}), Te = _({
|
|
3376
|
-
get: () => {
|
|
3377
|
-
const N = l.form.value.unitsValues ?? [], k = fe.value;
|
|
3378
|
-
return k.size ? N.filter(({ pricing_item_config_id: j }) => k.has(j)) : N;
|
|
3379
|
-
},
|
|
3380
|
-
set: (N) => {
|
|
3381
|
-
const k = l.form.value.unitsValues ?? [], j = fe.value;
|
|
3382
|
-
if (!j.size) {
|
|
3383
|
-
l.form.value.unitsValues = N;
|
|
3384
|
-
return;
|
|
3385
|
-
}
|
|
3386
|
-
const W = k.filter(
|
|
3387
|
-
({ pricing_item_config_id: Z }) => !j.has(Z)
|
|
3388
|
-
);
|
|
3389
|
-
l.form.value.unitsValues = W.concat(N);
|
|
3390
|
-
}
|
|
3391
|
-
}), Re = _(() => {
|
|
3392
|
-
var N, k, j, W, Z;
|
|
3393
|
-
return y.value ? g(
|
|
3394
|
-
{
|
|
3395
|
-
defaultMessage: "{discounted_amount} for {trial_period}, then {subscription_amount}/{billing_period} until canceled, starting {start_date, date, ::MMMMd}.",
|
|
3396
|
-
id: "checkout.agreement.trial",
|
|
3397
|
-
description: "The agreement for the trial period"
|
|
3398
|
-
},
|
|
3399
|
-
{
|
|
3400
|
-
discounted_amount: y.value.tax_summary.total_amount.quantity === "0.00" ? g({
|
|
3401
|
-
defaultMessage: "Free",
|
|
3402
|
-
id: "checkout.agreement.trial.free",
|
|
3403
|
-
description: "The free amount for the trial period"
|
|
3404
|
-
}) : De(y.value.tax_summary.total_amount),
|
|
3405
|
-
trial_period: C(D.value, { short: !0 }),
|
|
3406
|
-
subscription_amount: De(
|
|
3407
|
-
((N = P.value) == null ? void 0 : N.tax_summary.total_amount) ?? {
|
|
3408
|
-
quantity: "0.00",
|
|
3409
|
-
currency: "EUR"
|
|
3410
|
-
}
|
|
3411
|
-
),
|
|
3412
|
-
billing_period: C(
|
|
3413
|
-
((k = P.value) == null ? void 0 : k.billing_period) ?? { type: "MONTH", value: 1 },
|
|
3414
|
-
{ short: !0, singular: !0, hideValueForExactPeriods: !0 }
|
|
3415
|
-
),
|
|
3416
|
-
// @ts-expect-error formatjs does not support this type yet
|
|
3417
|
-
start_date: new Date(Ee.value)
|
|
3418
|
-
}
|
|
3419
|
-
) : g(
|
|
3420
|
-
{
|
|
3421
|
-
defaultMessage: "{subscription_amount}/{billing_period} until canceled, starting {start_date, date, long}.",
|
|
3422
|
-
id: "checkout.agreement.subscription",
|
|
3423
|
-
description: "The agreement for the subscription"
|
|
3424
|
-
},
|
|
3425
|
-
{
|
|
3426
|
-
subscription_amount: (j = P.value) != null && j.tax_summary.total_amount ? De((W = P.value) == null ? void 0 : W.tax_summary.total_amount) : "",
|
|
3427
|
-
billing_period: C(
|
|
3428
|
-
((Z = P.value) == null ? void 0 : Z.billing_period) ?? { type: "MONTH", value: 1 },
|
|
3429
|
-
{ short: !0, singular: !0, hideValueForExactPeriods: !0 }
|
|
3430
|
-
),
|
|
3431
|
-
// @ts-expect-error formatjs does not support this type yet
|
|
3432
|
-
start_date: new Date(Ee.value)
|
|
3433
|
-
}
|
|
3434
|
-
);
|
|
3435
|
-
}), re = _(() => {
|
|
3436
|
-
var k;
|
|
3437
|
-
if (!P.value)
|
|
3438
|
-
return;
|
|
3439
|
-
const N = ji({
|
|
3440
|
-
subscription: S.value,
|
|
3441
|
-
fallback: g({
|
|
3442
|
-
defaultMessage: "Subscription",
|
|
3443
|
-
description: "The fallback name for when no subscription name can be determined",
|
|
3444
|
-
id: "customer_overview.subscriptions_block.fallback_subscription_name"
|
|
3445
|
-
})
|
|
3446
|
-
});
|
|
3447
|
-
return {
|
|
3448
|
-
description: N,
|
|
3449
|
-
managementURL: "https://www.solvimon.com/account/billing",
|
|
3450
|
-
agreement: Re.value,
|
|
3451
|
-
...y.value && D.value && {
|
|
3452
|
-
trial: {
|
|
3453
|
-
label: g({
|
|
3454
|
-
defaultMessage: "Trial",
|
|
3455
|
-
id: "checkout.trial.label",
|
|
3456
|
-
description: "The label of the trial"
|
|
3457
|
-
}),
|
|
3458
|
-
amount: y.value.tax_summary.total_amount,
|
|
3459
|
-
startDate: Ze.value ? new Date(Ze.value) : void 0,
|
|
3460
|
-
endDate: rt.value ? new Date(rt.value) : void 0
|
|
3461
|
-
}
|
|
3462
|
-
},
|
|
3463
|
-
regular: {
|
|
3464
|
-
label: N,
|
|
3465
|
-
amount: P.value.tax_summary.total_amount,
|
|
3466
|
-
startDate: Ee.value ? new Date(Ee.value) : void 0,
|
|
3467
|
-
interval: ((k = S.value) == null ? void 0 : k.billing_period) ?? { type: "MONTH", value: 1 }
|
|
3468
|
-
}
|
|
3469
|
-
};
|
|
3470
|
-
}), ti = (N) => Qe(N), ii = (N) => {
|
|
3471
|
-
const { country: k, ...j } = N;
|
|
3472
|
-
l.updateInitialState({
|
|
3473
|
-
...j,
|
|
3474
|
-
...k && ti(k) ? { country: k } : {}
|
|
3475
|
-
});
|
|
3476
|
-
}, ni = _(() => !(z && A)), Ze = _(() => {
|
|
3477
|
-
var j, W, Z;
|
|
3478
|
-
const N = (W = (j = y.value) == null ? void 0 : j.periods) == null ? void 0 : W[0], k = (Z = Xe.value) == null ? void 0 : Z.trialStartDate;
|
|
3479
|
-
return N != null && N.start_at ? new Date(N.start_at) : k;
|
|
3480
|
-
}), Xe = _(() => Ri(S.value)), rt = _(() => {
|
|
3481
|
-
var j, W, Z;
|
|
3482
|
-
const N = (W = (j = y.value) == null ? void 0 : j.periods) == null ? void 0 : W[0], k = (Z = Xe.value) == null ? void 0 : Z.trialEndDate;
|
|
3483
|
-
return N != null && N.end_at ? new Date(N.end_at) : k;
|
|
3484
|
-
}), Ee = _(() => {
|
|
3485
|
-
var j, W, Z;
|
|
3486
|
-
const N = (W = (j = P.value) == null ? void 0 : j.periods) == null ? void 0 : W[0], k = (Z = Xe.value) == null ? void 0 : Z.subscriptionStartDate;
|
|
3487
|
-
return N != null && N.start_at ? new Date(N.start_at) : k;
|
|
3488
|
-
}), oi = _(() => !!(l.form.value.seatsValues && l.form.value.seatsValues.length > 0 || l.form.value.unitsValues && l.form.value.unitsValues.length > 0 || S.value && zn(S.value) || S.value && jn(S.value))), we = Y(null), {
|
|
3489
|
-
applyPromotionCode: lt,
|
|
3490
|
-
removePromotionCode: ai,
|
|
3491
|
-
isPromotionCodePending: ri,
|
|
3492
|
-
promotionCodeErrorMessage: We
|
|
3493
|
-
} = Yn({
|
|
3494
|
-
checkoutForm: l,
|
|
3495
|
-
updateInvoicePreviewOnBillingInformationChange: ne,
|
|
3496
|
-
formatErrorMessage: ({ action: N }) => g(N === "apply" ? {
|
|
3497
|
-
defaultMessage: "Promotion code could not be applied. Please try again.",
|
|
3498
|
-
id: "checkout.promotion_code.apply_failed",
|
|
3499
|
-
description: "Error message when applying a promotion code in checkout failed"
|
|
3500
|
-
} : {
|
|
3501
|
-
defaultMessage: "Promotion code could not be removed. Please try again.",
|
|
3502
|
-
id: "checkout.promotion_code.remove_failed",
|
|
3503
|
-
description: "Error message when removing a promotion code in checkout failed"
|
|
3504
|
-
}),
|
|
3505
|
-
onInvalidPromotionCode: () => {
|
|
3506
|
-
we.value = null;
|
|
3507
|
-
},
|
|
3508
|
-
onApplyError: () => {
|
|
3509
|
-
we.value = null;
|
|
3510
|
-
}
|
|
3511
|
-
});
|
|
3512
|
-
Hn({
|
|
3513
|
-
subscription: S,
|
|
3514
|
-
promotionCode: (bt = o.configuration) == null ? void 0 : bt.couponCode,
|
|
3515
|
-
appliedPromotionCode: we,
|
|
3516
|
-
applyPromotionCode: lt
|
|
3517
|
-
});
|
|
3518
|
-
const st = () => {
|
|
3519
|
-
v && Ui(v);
|
|
3520
|
-
}, li = _(
|
|
3521
|
-
() => {
|
|
3522
|
-
var N;
|
|
3523
|
-
return !((N = o.configuration) != null && N.onPaymentSuccess) && !!v;
|
|
3524
|
-
}
|
|
3525
|
-
), si = () => {
|
|
3526
|
-
var N;
|
|
3527
|
-
if (R.value = !0, We.value = null, (N = o.configuration) != null && N.onPaymentSuccess) {
|
|
3528
|
-
o.configuration.onPaymentSuccess();
|
|
3529
|
-
return;
|
|
3530
|
-
}
|
|
3531
|
-
if (v) {
|
|
3532
|
-
st();
|
|
3533
|
-
return;
|
|
3534
|
-
}
|
|
3535
|
-
}, ct = (N) => {
|
|
3536
|
-
S.value && (S.value = {
|
|
3537
|
-
...S.value,
|
|
3538
|
-
billing_period: N
|
|
3539
|
-
}, F());
|
|
3540
|
-
};
|
|
3541
|
-
return je(() => {
|
|
3542
|
-
r("ready");
|
|
3543
|
-
}), (N, k) => s.value ? (p(), O(go, {
|
|
3544
|
-
key: 0,
|
|
3545
|
-
class: "sv-checkout sv-root sv-screen sv-checkout--error"
|
|
3546
|
-
})) : (p(), O(t(cn), {
|
|
3547
|
-
key: 1,
|
|
3548
|
-
class: Ie(["sv-checkout sv-root sv-screen", { "sv-checkout--paid": t(R) }])
|
|
3549
|
-
}, Ye({
|
|
3550
|
-
header: b(() => [
|
|
3551
|
-
w("div", pa, [
|
|
3552
|
-
M(be, { class: "min-h-[52px] w-96" }, {
|
|
3553
|
-
default: b(() => {
|
|
3554
|
-
var j, W, Z;
|
|
3555
|
-
return [
|
|
3556
|
-
t(P) && t(S) && Ee.value ? (p(), O(co, {
|
|
3557
|
-
key: 0,
|
|
3558
|
-
class: "sv-checkout__title",
|
|
3559
|
-
"trial-start-date": Ze.value,
|
|
3560
|
-
"trial-period": t(D),
|
|
3561
|
-
"subscription-start-date": Ee.value,
|
|
3562
|
-
"subscription-name": ((j = t(S)) == null ? void 0 : j.name) ?? "",
|
|
3563
|
-
amount: (W = t(P)) == null ? void 0 : W.invoice_amount_including_tax,
|
|
3564
|
-
"billing-period": (Z = t(S)) == null ? void 0 : Z.billing_period,
|
|
3565
|
-
"country-code": t(l).form.value.country
|
|
3566
|
-
}, null, 8, ["trial-start-date", "trial-period", "subscription-start-date", "subscription-name", "amount", "billing-period", "country-code"])) : U("", !0)
|
|
3567
|
-
];
|
|
3568
|
-
}),
|
|
3569
|
-
_: 1
|
|
3570
|
-
})
|
|
3571
|
-
])
|
|
3572
|
-
]),
|
|
3573
|
-
content: b(() => {
|
|
3574
|
-
var j, W, Z;
|
|
3575
|
-
return [
|
|
3576
|
-
t(R) ? (p(), O(yo, {
|
|
3577
|
-
key: 0,
|
|
3578
|
-
class: "sv-checkout__completed-payment",
|
|
3579
|
-
onContinueToMerchant: st
|
|
3580
|
-
})) : (p(), $(me, { key: 1 }, [
|
|
3581
|
-
t(S) && t(L) ? (p(), O(zt, {
|
|
3582
|
-
key: 0,
|
|
3583
|
-
class: "sv-checkout__mobile-order-summary",
|
|
3584
|
-
subscription: t(S),
|
|
3585
|
-
invoice: t(P),
|
|
3586
|
-
"invoice-preview-by-billing-period": t(c),
|
|
3587
|
-
"trial-invoice": t(y),
|
|
3588
|
-
"enabled-pricing-ids": ce.value,
|
|
3589
|
-
"trial-period": t(D),
|
|
3590
|
-
avatar: (j = u.value) == null ? void 0 : j.avatar,
|
|
3591
|
-
"is-paid": t(R),
|
|
3592
|
-
"is-usage-based": J.value,
|
|
3593
|
-
"is-preview-and-payment-methods-pending": t(X) || t(de),
|
|
3594
|
-
"country-code": t(l).form.value.country,
|
|
3595
|
-
collapsible: "collapsed",
|
|
3596
|
-
variant: "products-inline",
|
|
3597
|
-
onBillingPeriodChange: ct
|
|
3598
|
-
}, 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"])) : U("", !0),
|
|
3599
|
-
oi.value && t(S) ? (p(), O(t(a), {
|
|
3600
|
-
key: 1,
|
|
3601
|
-
"seats-values": Le.value,
|
|
3602
|
-
"onUpdate:seatsValues": k[0] || (k[0] = (pe) => Le.value = pe),
|
|
3603
|
-
"units-values": Te.value,
|
|
3604
|
-
"onUpdate:unitsValues": k[1] || (k[1] = (pe) => Te.value = pe),
|
|
3605
|
-
"enabled-pricing-ids": ce.value,
|
|
3606
|
-
"onUpdate:enabledPricingIds": k[2] || (k[2] = (pe) => ce.value = pe),
|
|
3607
|
-
class: "sv-checkout__plan-customization",
|
|
3608
|
-
subscription: t(S),
|
|
3609
|
-
"initial-seats-values": (W = t(l).initialState) == null ? void 0 : W.value.seatsValues,
|
|
3610
|
-
"initial-units-values": (Z = t(l).initialState) == null ? void 0 : Z.value.unitsValues,
|
|
3611
|
-
"billing-period": t(S).billing_period,
|
|
3612
|
-
currency: ve.value
|
|
3613
|
-
}, null, 8, ["seats-values", "units-values", "enabled-pricing-ids", "subscription", "initial-seats-values", "initial-units-values", "billing-period", "currency"])) : U("", !0),
|
|
3614
|
-
t(l).form.value.country && t(Q) && re.value ? (p(), O(ia, {
|
|
3615
|
-
key: 2,
|
|
3616
|
-
class: "sv-checkout__express-payment-methods",
|
|
3617
|
-
amount: t(Q),
|
|
3618
|
-
"country-code": t(l).form.value.country,
|
|
3619
|
-
locale: t(h),
|
|
3620
|
-
"payment-methods-options-response": t(E) ?? [],
|
|
3621
|
-
"billing-information": re.value,
|
|
3622
|
-
"on-billing-information-change": t(ne),
|
|
3623
|
-
onUpdateBillingInformation: ii
|
|
3624
|
-
}, null, 8, ["amount", "country-code", "locale", "payment-methods-options-response", "billing-information", "on-billing-information-change"])) : U("", !0),
|
|
3625
|
-
M(ao, {
|
|
3626
|
-
modelValue: t(l).form.value,
|
|
3627
|
-
"onUpdate:modelValue": k[3] || (k[3] = (pe) => t(l).form.value = pe),
|
|
3628
|
-
class: "sv-checkout__customer-form",
|
|
3629
|
-
validation: t(l).validation,
|
|
3630
|
-
"read-only-email": t(z),
|
|
3631
|
-
"show-customer-info-on-top": ni.value || t(R),
|
|
3632
|
-
"is-billing-information-mandatory": ae.value,
|
|
3633
|
-
"get-is-field-required": t(l).getIsFieldRequired,
|
|
3634
|
-
"read-only": t(R)
|
|
3635
|
-
}, null, 8, ["modelValue", "validation", "read-only-email", "show-customer-info-on-top", "is-billing-information-mandatory", "get-is-field-required", "read-only"]),
|
|
3636
|
-
w("div", ma, [
|
|
3637
|
-
M(be, {
|
|
3638
|
-
variant: "section",
|
|
3639
|
-
class: "min-h-[130px]"
|
|
3640
|
-
}, {
|
|
3641
|
-
default: b(() => {
|
|
3642
|
-
var pe, It;
|
|
3643
|
-
return [
|
|
3644
|
-
!t(X) || t(X) && t(E).length > 0 ? (p(), $("div", ga, [
|
|
3645
|
-
M(t(le), {
|
|
3646
|
-
variant: "heading-3",
|
|
3647
|
-
tag: "h2",
|
|
3648
|
-
class: "sv-checkout__payment-methods-title mb-2"
|
|
3649
|
-
}, {
|
|
3650
|
-
default: b(() => [
|
|
3651
|
-
K(V(t(g)({
|
|
3652
|
-
defaultMessage: "Payment method",
|
|
3653
|
-
id: "checkout.payment_method_block.title",
|
|
3654
|
-
description: "The title of the payment method block in the checkout form"
|
|
3655
|
-
})), 1)
|
|
3656
|
-
]),
|
|
3657
|
-
_: 1
|
|
3658
|
-
}),
|
|
3659
|
-
t(l).form.value.country ? t(m) ? (p(), O(Je, {
|
|
3660
|
-
key: 1,
|
|
3661
|
-
class: "sv-checkout__payment-methods-error",
|
|
3662
|
-
icon: "error"
|
|
3663
|
-
}, {
|
|
3664
|
-
title: b(() => [
|
|
3665
|
-
K(V(t(g)({
|
|
3666
|
-
defaultMessage: "Could not load payment methods",
|
|
3667
|
-
id: "checkout.payment_method_block.load_failed_title",
|
|
3668
|
-
description: "The title shown when the payment methods failed to load"
|
|
3669
|
-
})), 1)
|
|
3670
|
-
]),
|
|
3671
|
-
message: b(() => [
|
|
3672
|
-
K(V(t(g)({
|
|
3673
|
-
defaultMessage: "Check your connection and try again.",
|
|
3674
|
-
id: "checkout.payment_method_block.load_failed_message",
|
|
3675
|
-
description: "The message shown when the payment methods failed to load"
|
|
3676
|
-
})), 1)
|
|
3677
|
-
]),
|
|
3678
|
-
action: b(() => [
|
|
3679
|
-
M(t(Ne), {
|
|
3680
|
-
type: "button",
|
|
3681
|
-
intent: "secondary",
|
|
3682
|
-
size: "sm",
|
|
3683
|
-
class: "sv-action sv-action--secondary sv-checkout__payment-methods-retry",
|
|
3684
|
-
onClick: t(B)
|
|
3685
|
-
}, {
|
|
3686
|
-
default: b(() => [
|
|
3687
|
-
K(V(t(g)({
|
|
3688
|
-
defaultMessage: "Try again",
|
|
3689
|
-
id: "checkout.payment_method_block.load_failed_retry_button.label",
|
|
3690
|
-
description: "The label of the button that loads the payment methods again"
|
|
3691
|
-
})), 1)
|
|
3692
|
-
]),
|
|
3693
|
-
_: 1
|
|
3694
|
-
}, 8, ["onClick"])
|
|
3695
|
-
]),
|
|
3696
|
-
_: 1
|
|
3697
|
-
})) : t(E).length === 0 ? (p(), O(Je, {
|
|
3698
|
-
key: 2,
|
|
3699
|
-
class: "sv-checkout__payment-methods-empty",
|
|
3700
|
-
icon: "credit_card_off"
|
|
3701
|
-
}, {
|
|
3702
|
-
title: b(() => [
|
|
3703
|
-
K(V(t(g)({
|
|
3704
|
-
defaultMessage: "No payment methods available",
|
|
3705
|
-
id: "checkout.payment_method_block.no_payment_methods_available_title",
|
|
3706
|
-
description: "The title shown when there are no available payment methods"
|
|
3707
|
-
})), 1)
|
|
3708
|
-
]),
|
|
3709
|
-
_: 1
|
|
3710
|
-
})) : t(Q) && t(l).form.value.country ? (p(), $("div", ya, [
|
|
3711
|
-
w("div", {
|
|
3712
|
-
class: Ie({ "pointer-events-none opacity-60": te.value })
|
|
3713
|
-
}, [
|
|
3714
|
-
M(t(n), {
|
|
3715
|
-
ref_key: "paymentIntegrationFormRef",
|
|
3716
|
-
ref: d,
|
|
3717
|
-
"country-code": t(l).form.value.country,
|
|
3718
|
-
context: t(T),
|
|
3719
|
-
amount: t(Q),
|
|
3720
|
-
email: t(l).form.value.email,
|
|
3721
|
-
variant: "AUTHORIZE",
|
|
3722
|
-
"payment-method-options": t(E) ?? [],
|
|
3723
|
-
"validate-on-submit": G,
|
|
3724
|
-
"redirects-on-success": li.value,
|
|
3725
|
-
"force-store-payment-method": "",
|
|
3726
|
-
"billing-entity-name": (It = (pe = t(S)) == null ? void 0 : pe.billing_entity) == null ? void 0 : It.legal_name,
|
|
3727
|
-
onPaymentSuccess: si,
|
|
3728
|
-
onPaymentFailed: oe,
|
|
3729
|
-
onInvalid: oe,
|
|
3730
|
-
onReady: k[4] || (k[4] = (Ma) => r("ready"))
|
|
3731
|
-
}, null, 8, ["country-code", "context", "amount", "email", "payment-method-options", "redirects-on-success", "billing-entity-name"])
|
|
3732
|
-
], 2)
|
|
3733
|
-
])) : U("", !0) : (p(), O(Je, {
|
|
3734
|
-
key: 0,
|
|
3735
|
-
class: "sv-checkout__payment-methods-empty",
|
|
3736
|
-
icon: "captive_portal"
|
|
3737
|
-
}, {
|
|
3738
|
-
title: b(() => [
|
|
3739
|
-
K(V(t(g)({
|
|
3740
|
-
defaultMessage: "Select your billing country",
|
|
3741
|
-
id: "checkout.payment_method_block.no_country_selected_title",
|
|
3742
|
-
description: "The title shown when no country is selected"
|
|
3743
|
-
})), 1)
|
|
3744
|
-
]),
|
|
3745
|
-
message: b(() => [
|
|
3746
|
-
K(V(t(g)({
|
|
3747
|
-
defaultMessage: "Payment methods will be shown after you select the billing country.",
|
|
3748
|
-
id: "checkout.payment_method_block.no_country_selected_message",
|
|
3749
|
-
description: "The message shown when no country is selected"
|
|
3750
|
-
})), 1)
|
|
3751
|
-
]),
|
|
3752
|
-
_: 1
|
|
3753
|
-
}))
|
|
3754
|
-
])) : U("", !0)
|
|
3755
|
-
];
|
|
3756
|
-
}),
|
|
3757
|
-
_: 1
|
|
3758
|
-
})
|
|
3759
|
-
])
|
|
3760
|
-
], 64))
|
|
3761
|
-
];
|
|
3762
|
-
}),
|
|
3763
|
-
aside: b(() => [
|
|
3764
|
-
w("div", va, [
|
|
3765
|
-
M(be, {
|
|
3766
|
-
variant: "section",
|
|
3767
|
-
class: "min-h-[220px]"
|
|
3768
|
-
}, {
|
|
3769
|
-
default: b(() => {
|
|
3770
|
-
var j;
|
|
3771
|
-
return [
|
|
3772
|
-
t(S) && t(P) ? (p(), O(zt, {
|
|
3773
|
-
key: 0,
|
|
3774
|
-
subscription: t(S),
|
|
3775
|
-
invoice: t(P),
|
|
3776
|
-
"invoice-preview-by-billing-period": t(c),
|
|
3777
|
-
"trial-invoice": t(y),
|
|
3778
|
-
"enabled-pricing-ids": ce.value,
|
|
3779
|
-
"trial-period": t(D),
|
|
3780
|
-
"country-code": t(l).form.value.country,
|
|
3781
|
-
avatar: (j = u.value) == null ? void 0 : j.avatar,
|
|
3782
|
-
"is-paid": t(R),
|
|
3783
|
-
"is-usage-based": J.value,
|
|
3784
|
-
"is-preview-and-payment-methods-pending": t(X) || t(de),
|
|
3785
|
-
onBillingPeriodChange: ct
|
|
3786
|
-
}, 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"])) : U("", !0)
|
|
3787
|
-
];
|
|
3788
|
-
}),
|
|
3789
|
-
_: 1
|
|
3790
|
-
})
|
|
3791
|
-
]),
|
|
3792
|
-
t(R) ? U("", !0) : (p(), $(me, { key: 0 }, [
|
|
3793
|
-
M(da, {
|
|
3794
|
-
class: "sv-checkout__promotion-code",
|
|
3795
|
-
"promotion-code": we.value,
|
|
3796
|
-
"onUpdate:appliedCode": k[5] || (k[5] = (j) => we.value = j),
|
|
3797
|
-
onRemove: t(ai),
|
|
3798
|
-
onApply: t(lt)
|
|
3799
|
-
}, null, 8, ["promotion-code", "onRemove", "onApply"]),
|
|
3800
|
-
t(We) ? (p(), O(t(hi), {
|
|
3801
|
-
key: 0,
|
|
3802
|
-
class: "sv-checkout__promotion-error mt-2",
|
|
3803
|
-
title: t(We)
|
|
3804
|
-
}, null, 8, ["title"])) : U("", !0),
|
|
3805
|
-
w("div", fa, [
|
|
3806
|
-
M(be, { class: "sv-checkout__submit-skeleton min-h-[44px]" }, {
|
|
3807
|
-
default: b(() => [
|
|
3808
|
-
t(P) ? (p(), O(t(Ne), {
|
|
3809
|
-
key: 0,
|
|
3810
|
-
type: "button",
|
|
3811
|
-
size: "lg",
|
|
3812
|
-
class: "sv-action sv-action--primary sv-action--full-width sv-checkout__submit w-full",
|
|
3813
|
-
disabled: t(ri) || t(E).length === 0 || te.value,
|
|
3814
|
-
loading: te.value,
|
|
3815
|
-
onClick: ie
|
|
3816
|
-
}, {
|
|
3817
|
-
default: b(() => [
|
|
3818
|
-
K(V(q.value ? t(g)({
|
|
3819
|
-
defaultMessage: "Start trial",
|
|
3820
|
-
id: "checkout.pay_and_subscribe_button_trial.label",
|
|
3821
|
-
description: "The label of the start trial button in the checkout form"
|
|
3822
|
-
}) : t(g)({
|
|
3823
|
-
defaultMessage: "Pay and subscribe",
|
|
3824
|
-
id: "checkout.pay_and_subscribe_button.label",
|
|
3825
|
-
description: "The label of the pay and subscribe button in the checkout form"
|
|
3826
|
-
})), 1)
|
|
3827
|
-
]),
|
|
3828
|
-
_: 1
|
|
3829
|
-
}, 8, ["disabled", "loading"])) : U("", !0)
|
|
3830
|
-
]),
|
|
3831
|
-
_: 1
|
|
3832
|
-
}),
|
|
3833
|
-
M(on, { "payment-method-options": t(E) }, null, 8, ["payment-method-options"])
|
|
3834
|
-
])
|
|
3835
|
-
], 64))
|
|
3836
|
-
]),
|
|
3837
|
-
_: 2
|
|
3838
|
-
}, [
|
|
3839
|
-
t(H) && !t(R) ? {
|
|
3840
|
-
name: "footer",
|
|
3841
|
-
fn: b(() => [
|
|
3842
|
-
M(t(le), {
|
|
3843
|
-
tag: "div",
|
|
3844
|
-
variant: "body-xs",
|
|
3845
|
-
color: "subtle",
|
|
3846
|
-
class: "sv-checkout__terms",
|
|
3847
|
-
"data-testid": "checkout-terms"
|
|
3848
|
-
}, {
|
|
3849
|
-
default: b(() => [
|
|
3850
|
-
M(Uo, { source: t(H) }, null, 8, ["source"])
|
|
3851
|
-
]),
|
|
3852
|
-
_: 1
|
|
3853
|
-
})
|
|
3854
|
-
]),
|
|
3855
|
-
key: "0"
|
|
3856
|
-
} : void 0
|
|
3857
|
-
]), 1032, ["class"]));
|
|
3858
|
-
}
|
|
3859
|
-
}), ha = /* @__PURE__ */ se({
|
|
3860
|
-
__name: "Checkout.entry",
|
|
3861
|
-
props: {
|
|
3862
|
-
environment: { type: String },
|
|
3863
|
-
locale: { type: String },
|
|
3864
|
-
dateLocale: { type: String },
|
|
3865
|
-
messages: { type: Object },
|
|
3866
|
-
primaryColor: { type: String },
|
|
3867
|
-
secondaryColor: { type: String },
|
|
3868
|
-
isShadowRoot: { type: Boolean },
|
|
3869
|
-
experimentalFeatures: { type: Array },
|
|
3870
|
-
logLevel: { type: String },
|
|
3871
|
-
onLog: { type: Function },
|
|
3872
|
-
allowedPortalTypes: { type: Array },
|
|
3873
|
-
portalObject: { type: Object },
|
|
3874
|
-
cssOverrides: { type: [String, Array] },
|
|
3875
|
-
branding: { type: Object },
|
|
3876
|
-
configuration: { type: Object }
|
|
3877
|
-
},
|
|
3878
|
-
emits: ["error", "ready"],
|
|
3879
|
-
setup(e, { emit: i }) {
|
|
3880
|
-
var u;
|
|
3881
|
-
const n = dn("checkout"), a = e, o = i, r = ((u = a.configuration) == null ? void 0 : u.couponCode) ?? Se("coupon_code") ?? void 0;
|
|
3882
|
-
return (s, d) => (p(), O(t(fi), {
|
|
3883
|
-
entry: s.$props,
|
|
3884
|
-
"component-name": t(n),
|
|
3885
|
-
"allowed-portal-types": ["INIT_PRICING_PLAN_SUBSCRIPTION"],
|
|
3886
|
-
onError: d[1] || (d[1] = (I) => s.$emit("error", I))
|
|
3887
|
-
}, {
|
|
3888
|
-
default: b(() => {
|
|
3889
|
-
var I, g, h, C, f;
|
|
3890
|
-
return [
|
|
3891
|
-
M(_a, {
|
|
3892
|
-
configuration: {
|
|
3893
|
-
avatar: (g = (I = e.branding) == null ? void 0 : I.emblem) == null ? void 0 : g.public_url,
|
|
3894
|
-
email: (h = e.configuration) == null ? void 0 : h.email,
|
|
3895
|
-
countryCode: (C = e.configuration) == null ? void 0 : C.countryCode,
|
|
3896
|
-
enabledPricingIds: (f = e.configuration) == null ? void 0 : f.enabledPricingIds,
|
|
3897
|
-
couponCode: t(r)
|
|
3898
|
-
},
|
|
3899
|
-
onReady: d[0] || (d[0] = (L) => o("ready"))
|
|
3900
|
-
}, Ye({ _: 2 }, [
|
|
3901
|
-
s.$slots["terms-and-conditions"] ? {
|
|
3902
|
-
name: "terms-and-conditions",
|
|
3903
|
-
fn: b(() => [
|
|
3904
|
-
tt(s.$slots, "terms-and-conditions")
|
|
3905
|
-
]),
|
|
3906
|
-
key: "0"
|
|
3907
|
-
} : void 0
|
|
3908
|
-
]), 1032, ["configuration"])
|
|
3909
|
-
];
|
|
3910
|
-
}),
|
|
3911
|
-
_: 3
|
|
3912
|
-
}, 8, ["entry", "component-name"]));
|
|
3913
|
-
}
|
|
3914
|
-
}), { define: dr } = _i(
|
|
3915
|
-
ha,
|
|
3916
|
-
"checkout"
|
|
3917
|
-
);
|
|
3918
|
-
export {
|
|
3919
|
-
Rn as F,
|
|
3920
|
-
Mo as _,
|
|
3921
|
-
Un as a,
|
|
3922
|
-
dr as d,
|
|
3923
|
-
ur as g
|
|
3924
|
-
};
|