@solvimon/solvimon-web 0.1.0-alpha.26 → 0.1.0-alpha.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -10
- package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DwbIiJBY.js → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-081H9T3X.js} +1 -1
- package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DcrLNA_x.mjs → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DNepCMRp.mjs} +6 -6
- package/dist/{Avatar.vue.es-Bm6MCMAL.js → Avatar.vue.es-BJxSCU76.js} +1 -1
- package/dist/{Avatar.vue.es-BqQHvLGA.mjs → Avatar.vue.es-sfMZiX7A.mjs} +1 -1
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-BV5iEOxn.js +1 -0
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BFza7Nf9.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-DmY3a-Wi.mjs} +14 -15
- package/dist/{Button.vue.es-qGvnOKnK.js → Button.vue.es-BzkuglKw.js} +1 -1
- package/dist/{Button.vue.es-C32_baQN.mjs → Button.vue.es-Cmjfm4jw.mjs} +1 -1
- package/dist/{ChargeOnDemandModal-CIiI74ls.mjs → ChargeOnDemandModal-CB4mrvkU.mjs} +145 -153
- package/dist/{ChargeOnDemandModal-DIQaGnRs.js → ChargeOnDemandModal-b17YswWA.js} +1 -1
- package/dist/Checkout.entry.ce-HlUrJ1kh.js +2 -0
- package/dist/Checkout.entry.ce-X2zGo6hG.mjs +4381 -0
- package/dist/{Chip.vue.es-D60gTbfe.js → Chip.vue.es-B2jjzIOc.js} +1 -1
- package/dist/{Chip.vue.es-CKCOY5T6.mjs → Chip.vue.es-DksjbJO8.mjs} +2 -2
- package/dist/{ContextMenu.vue.es-C7KI8Gz6.js → ContextMenu.vue.es-DUU43tCy.js} +1 -1
- package/dist/{ContextMenu.vue.es-Da-lAmTl.mjs → ContextMenu.vue.es-zRvoEJlV.mjs} +4 -4
- package/dist/{CustomerBillingInformation.vue.es-bFUx81Ig.js → CustomerBillingInformation.vue.es-BfPEB42w.js} +1 -1
- package/dist/{CustomerBillingInformation.vue.es-BxBQt4Q0.mjs → CustomerBillingInformation.vue.es-DhFbpZPK.mjs} +2 -2
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BcTZgshS.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-B41la-T7.mjs} +14 -15
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C0lJ_ESU.js → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BISD6n8X.js} +1 -1
- package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DkbQ2MiR.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DssxYPSA.mjs} +110 -123
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-XufY6bdV.js +1 -0
- package/dist/{DividerText.vue.es-BF3gnr4e.js → DividerText.vue.es-CoyDk9eH.js} +1 -1
- package/dist/{DividerText.vue.es-DKl3FnDJ.mjs → DividerText.vue.es-nAo1eRMV.mjs} +1 -1
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-cSQeqr0A.js → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CQ0KrXHJ.js} +1 -1
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C3QYra1x.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-QW9NdxyZ.mjs} +4 -4
- package/dist/{ErrorNotification.vue.es-rRKgmkzV.mjs → ErrorNotification.vue.es-h-D37rfG.mjs} +1 -1
- package/dist/{ErrorNotification.vue.es-BX9dHEc-.js → ErrorNotification.vue.es-tS9vySUZ.js} +1 -1
- package/dist/{IconButton.vue.es-Bwdfu-jm.js → IconButton.vue.es-DgQN18Am.js} +1 -1
- package/dist/{IconButton.vue.es-UlqwNPAX.mjs → IconButton.vue.es-DvfErUOq.mjs} +2 -2
- package/dist/{IconTitle.vue.es-CK9k69tV.mjs → IconTitle.vue.es-B_8bS0tn.mjs} +3 -3
- package/dist/{IconTitle.vue.es-Cei98MBw.js → IconTitle.vue.es-Dn2xcPHj.js} +1 -1
- package/dist/{Input.vue.es-B47l_feL.js → Input.vue.es-B60eK8Ds.js} +1 -1
- package/dist/{Input.vue.es-D9IjIWc-.mjs → Input.vue.es-CU9u5yKH.mjs} +2 -2
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DKlPrxQS.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Dqdezse7.js} +1 -1
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DUfJl07Y.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-gpMtYNzn.mjs} +2 -2
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-DlJ6lELc.js → InvoiceEntryView.vue_vue_type_script_setup_true_lang-Cl6HU243.js} +1 -1
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-D9Rtgapa.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-DNqawlYV.mjs} +2 -2
- package/dist/{InvoiceSummary.vue.es-DBnR9Hs7.js → InvoiceSummary.vue.es-CAmA8g0t.js} +1 -1
- package/dist/{InvoiceSummary.vue.es-DQ4KvTaw.mjs → InvoiceSummary.vue.es-CRiFJ5x-.mjs} +7 -7
- package/dist/{Modal.vue.es-B9xMiyn3.mjs → Modal.vue.es-BeI5C9-9.mjs} +5 -5
- package/dist/{Modal.vue.es-8LN4gBh0.js → Modal.vue.es-DvLB3uCG.js} +1 -1
- package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-B1yGKkWN.js → PaymentErrorCard.vue_vue_type_script_setup_true_lang-Dg4rn1cm.js} +1 -1
- package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-BVzL2PGe.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-DqHcOnZp.mjs} +5 -6
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DSGf6uFP.js → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-B9R5JRJv.js} +1 -1
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-nLTPnH4j.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DlqoWKQq.mjs} +3 -3
- package/dist/{PaymentHistoryBlock-Ds93gNvh.js → PaymentHistoryBlock-Uw8xeKUk.js} +1 -1
- package/dist/{PaymentHistoryBlock-DYa99P1M.mjs → PaymentHistoryBlock-mCqdFjnL.mjs} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CBZhXQfC.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-ALI5f0py.js} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-D0KnSy0y.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DxaY3eFN.mjs} +4 -4
- package/dist/{PaymentIntegrationForm-B_Db4DG1.js → PaymentIntegrationForm-Cx0zCf_C.js} +1 -1
- package/dist/{PaymentIntegrationForm-UWoyZgsR.mjs → PaymentIntegrationForm-DVx4DEtD.mjs} +1 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-B-viSd_i.js +1 -0
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-J15IDbMc.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CCKCXXZX.mjs} +4 -4
- package/dist/PaymentIntegrationFormAdyen-B-v-4nlj.js +98 -0
- package/dist/{PaymentIntegrationFormAdyen-D4qfNtZ_.mjs → PaymentIntegrationFormAdyen-Yr8p5Fly.mjs} +16 -20
- package/dist/{PaymentIntegrationFormStripe-DUCJTIAq.js → PaymentIntegrationFormStripe-CoLmAzas.js} +3 -3
- package/dist/{PaymentIntegrationFormStripe-BIiMCWlV.mjs → PaymentIntegrationFormStripe-Ds0BXt89.mjs} +5 -5
- package/dist/{PaymentMethod.vue.es-CKu5nApX.mjs → PaymentMethod.vue.es-4YRmQZHX.mjs} +3 -3
- package/dist/{PaymentMethod.vue.es-CJcSZ9lN.js → PaymentMethod.vue.es-D0D9jW8s.js} +1 -1
- package/dist/{PaymentMethodForm-1d0YIGOu.js → PaymentMethodForm-CMP5FLRO.js} +1 -1
- package/dist/{PaymentMethodForm-B05sHWcW.mjs → PaymentMethodForm-Dnj_7mJU.mjs} +1 -1
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-D1yIYsb_.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-DsD3UjkC.mjs} +33 -35
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-BDm8l_6N.js → PaymentMethodForm.vue_vue_type_script_setup_true_lang-nxnGyJmE.js} +1 -1
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-BE4S26JX.js → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CIrrQUS6.js} +1 -1
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-DGpXRtp4.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CjECKNi_.mjs} +6 -6
- package/dist/PlanCustomizationEditor-DS1r2vBO.js +1 -0
- package/dist/{PlanCustomizationEditor-CpZeilm5.mjs → PlanCustomizationEditor-DlVSCKGN.mjs} +234 -206
- package/dist/{PricingGroupRangeInput.vue.es-CJpvUP3-.mjs → PricingGroupRangeInput.vue.es-BhNcjD7z.mjs} +4 -4
- package/dist/{PricingGroupRangeInput.vue.es-DZSJ5Mz0.js → PricingGroupRangeInput.vue.es-VoOTnHjk.js} +1 -1
- package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DJ81eUJX.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CmJITenR.mjs} +6 -6
- package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-jrkraJMu.js → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-hS6A-KcP.js} +1 -1
- package/dist/{RadioGroupExtended.vue.es-BalV7gwp.mjs → RadioGroupExtended.vue.es-9YzXzZF0.mjs} +2 -2
- package/dist/{RadioGroupExtended.vue.es-Dt6LH9Yh.js → RadioGroupExtended.vue.es-DlbURHQN.js} +1 -1
- package/dist/{Section.vue.es-zVXBHAL6.js → Section.vue.es-Bbt0RITt.js} +1 -1
- package/dist/{Section.vue.es-D7eiXUbk.mjs → Section.vue.es-DVEpre9O.mjs} +1 -1
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BdjYFrVC.js → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Dl7MbMlk.js} +1 -1
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DudMRVka.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-xzjqB-v-.mjs} +6 -6
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-CJWE7wVi.mjs +41 -0
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-otI7Hz2w.js +1 -0
- package/dist/{StepInput.vue.es-mAnuCuDQ.js → StepInput.vue.es-H-3R4jJq.js} +1 -1
- package/dist/{StepInput.vue.es-C3Zm6Wc9.mjs → StepInput.vue.es-o-3Lg4Ai.mjs} +4 -4
- package/dist/{SubscriptionDetails.entry.ce-WEimiOex.mjs → SubscriptionDetails.entry.ce-CGl6Z5ql.mjs} +22 -22
- package/dist/{SubscriptionDetails.entry.ce-D4CsSoR9.js → SubscriptionDetails.entry.ce-CQUO_uXH.js} +1 -1
- package/dist/{SubscriptionSchedules-DrrEAPlx.mjs → SubscriptionSchedules-DuWZmnD2.mjs} +1 -1
- package/dist/{SubscriptionSchedules-Cm5Dt-1H.js → SubscriptionSchedules-Dy0fUgx5.js} +1 -1
- package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DHp_KtbF.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-C1kTiW-H.mjs} +11 -11
- package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-t2Awijf5.js → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Dd_Rr6qn.js} +1 -1
- package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-B41qZmcL.js → SubscriptionSummary.vue_vue_type_script_setup_true_lang-CYyP4ra9.js} +1 -1
- package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-3VYfm6Hm.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-CsekphtV.mjs} +2 -2
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-Bu-_clEa.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-B4j8Clbj.js} +1 -1
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DFU0IULg.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BsdevoeT.mjs} +8 -9
- package/dist/{TooltipParagraph.vue.es-BXbOJmjr.mjs → TooltipParagraph.vue.es-B9A17aG7.mjs} +1 -1
- package/dist/{TooltipParagraph.vue.es-Cph6zT31.js → TooltipParagraph.vue.es-DvC5Wjaz.js} +1 -1
- package/dist/{TrialChip.vue.es-C_wgHGuN.js → TrialChip.vue.es-CLQZ5F0n.js} +1 -1
- package/dist/{TrialChip.vue.es-C_yRujip.mjs → TrialChip.vue.es-Dmv3lPiQ.mjs} +2 -2
- package/dist/{cn.es-D9YMDvG2.js → cn.es-C9Yqq4tg.js} +1 -1
- package/dist/{cn.es-CGa6b2Lt.mjs → cn.es-Cvt6TIwv.mjs} +2 -2
- package/dist/components/BillingInformation/BillingInformation.cjs +1 -1
- package/dist/components/BillingInformation/BillingInformation.mjs +4 -4
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.mjs +6 -6
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +4 -4
- package/dist/components/Invoice/Invoice.cjs +1 -1
- package/dist/components/Invoice/Invoice.mjs +9 -9
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.mjs +15 -16
- package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -1
- package/dist/components/InvoiceHeader/InvoiceHeader.mjs +2 -2
- package/dist/components/InvoicesList/InvoicesList.cjs +1 -1
- package/dist/components/InvoicesList/InvoicesList.mjs +3 -3
- package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.mjs +14 -15
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +5 -5
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +4 -4
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.mjs +5 -5
- package/dist/components/WalletBalances/WalletBalances.cjs +1 -1
- package/dist/components/WalletBalances/WalletBalances.mjs +3 -3
- package/dist/{customElements-D5DAoHRI.mjs → customElements-B58FcXIN.mjs} +5 -5
- package/dist/{customElements-C963-LtW.js → customElements-DUMRMFQ5.js} +2 -2
- package/dist/{customer-DKa1B2vp.mjs → customer-B3LPAhaD.mjs} +1 -1
- package/dist/{customer-TE1FnGT0.js → customer-CisTPaXj.js} +1 -1
- package/dist/{de-DE-CLfzTbbX.mjs → de-DE-DKp5LCu0.mjs} +15 -1
- package/dist/de-DE-DL74pMLb.js +1 -0
- package/dist/en-US-B2XFj-_p.js +1 -0
- package/dist/{en-US-D6SGRAch.mjs → en-US-DQ5vlv9Z.mjs} +15 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{invoices-DJTwftJv.mjs → invoices-3520M5AN.mjs} +1 -1
- package/dist/{invoices-ClqTWYF9.js → invoices-CKQBLar2.js} +1 -1
- package/dist/{it-IT-Cym1UvvK.mjs → it-IT-BgFVsO5S.mjs} +15 -1
- package/dist/it-IT-CqNK62qe.js +1 -0
- package/dist/nl-NL-Dx-TNXQ1.js +1 -0
- package/dist/{nl-NL-D0c4x5C0.mjs → nl-NL-UiRWbO9S.mjs} +15 -1
- package/dist/{paymentMethods-CWzJhcWK.mjs → paymentMethods-CWlvwK5V.mjs} +1 -1
- package/dist/{paymentMethods-AL2U_byg.js → paymentMethods-Cw-i95mM.js} +1 -1
- package/dist/{payments-aXyfylwk.mjs → payments-2qeQdpiW.mjs} +1 -1
- package/dist/{payments-BmiHMlQt.js → payments-CS7_YcOW.js} +1 -1
- package/dist/pricing-BIMpDI_p.mjs +29 -0
- package/dist/pricing-BOqG21f9.js +1 -0
- package/dist/{pricingPlanSchedules-BfsMSvN0.js → pricingPlanSchedules-B_sTAIgU.js} +1 -1
- package/dist/{pricingPlanSchedules-BD4GIP_F.mjs → pricingPlanSchedules-ChQCbMfe.mjs} +1 -1
- package/dist/screens/Checkout/Checkout.cjs +1 -1
- package/dist/screens/Checkout/Checkout.mjs +2 -2
- package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.mjs +10 -10
- package/dist/screens/PayInvoice/PayInvoice.cjs +1 -1
- package/dist/screens/PayInvoice/PayInvoice.mjs +12 -12
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -1
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +9 -9
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -1
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +2 -2
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -1
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +20 -20
- package/dist/{subscriptions-cnR5fnf7.mjs → subscriptions-DcfcBYAq.mjs} +1 -1
- package/dist/{subscriptions-Cm83ckfl.js → subscriptions-DwVsf4Ev.js} +1 -1
- package/dist/types/components/checkout/CheckoutTitle.types.d.ts +10 -0
- package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethod.types.d.ts +9 -5
- package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethodApplePay.types.d.ts +3 -1
- package/dist/types/components/payments/ExpressPaymentMethods/ExpressPaymentMethods.types.d.ts +5 -1
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +1 -1
- package/dist/{useActionDispatchProvider-DDYqIh3r.mjs → useActionDispatchProvider-B3AvkLL2.mjs} +1 -1
- package/dist/{useActionDispatchProvider-CHkVQMaE.js → useActionDispatchProvider-DFhppdve.js} +1 -1
- package/dist/{useCustomer-XZKWsolE.mjs → useCustomer-B-jyJIVy.mjs} +1 -1
- package/dist/{useCustomer-DGYtowRy.js → useCustomer-BwZKd9i5.js} +1 -1
- package/dist/{useCustomerFormLabels-CcnkJLcB.mjs → useCustomerFormLabels-BQk3d9PZ.mjs} +5 -5
- package/dist/{useCustomerFormLabels-DAZziqYt.js → useCustomerFormLabels-DV9QiMYh.js} +1 -1
- package/dist/useExperimentalFeature-BciA3Ok9.mjs +135 -0
- package/dist/useExperimentalFeature-CGIkgFR4.js +1 -0
- package/dist/{useInvoiceData-BEK-7msA.mjs → useInvoiceData-BocKdeg7.mjs} +2 -2
- package/dist/{useInvoiceData-CQRn8l9C.js → useInvoiceData-CNV_FMV8.js} +1 -1
- package/dist/{useInvoicesList-C4I118KM.mjs → useInvoicesList-C8nsXMJ6.mjs} +7 -7
- package/dist/{useInvoicesList-BQkKyyXa.js → useInvoicesList-S0IbQcrD.js} +1 -1
- package/dist/{useLoadInitialData-CR0kbYw8.mjs → useLoadInitialData-D9GkzY8t.mjs} +1 -1
- package/dist/{useLoadInitialData-CrKnBZs_.js → useLoadInitialData-D_R6Jy1s.js} +1 -1
- package/dist/usePaymentMethodAvailability-BO_guwAw.js +1 -0
- package/dist/{usePaymentMethodAvailability-ZH-m3B-A.mjs → usePaymentMethodAvailability-DAcsKGeh.mjs} +13 -14
- package/dist/{usePaymentMethodOptions-Ciifjo6c.mjs → usePaymentMethodOptions-1vRAo6Ib.mjs} +1 -1
- package/dist/{usePaymentMethodOptions-Cqe92ZBn.js → usePaymentMethodOptions-CuzOoi2k.js} +1 -1
- package/dist/{usePaymentMethods-B-OKRyKd.mjs → usePaymentMethods-CbwnGONc.mjs} +1 -1
- package/dist/{usePaymentMethods-BKwrl82-.js → usePaymentMethods-DDaTZQZp.js} +1 -1
- package/dist/{usePayments-CV85OV8V.mjs → usePayments-Cr6NlGaW.mjs} +6 -6
- package/dist/{usePayments-Bauj16B-.js → usePayments-DDSjo0rH.js} +1 -1
- package/dist/{usePortal-DSLImEfr.js → usePortal-C27omjhz.js} +1 -1
- package/dist/{usePortal-H8Tv2TnZ.mjs → usePortal-C5AsegpS.mjs} +1 -1
- package/dist/{useSubscription-DqnxWNKg.mjs → useSubscription-BZJL0VOA.mjs} +1 -1
- package/dist/{useSubscription-BiYNJT2e.js → useSubscription-D787IXY-.js} +1 -1
- package/dist/{useTimePeriod.es-B22-fno3.mjs → useTimePeriod.es-DWLsLFqs.mjs} +1 -1
- package/dist/{useTimePeriod.es-D2aiyfd-.js → useTimePeriod.es-rzxqUCTu.js} +1 -1
- package/package.json +10 -7
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-0JHnqIpC.js +0 -1
- package/dist/Checkout.entry.ce-8EcavNgT.js +0 -2
- package/dist/Checkout.entry.ce-BA5ljKj8.mjs +0 -3924
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-hBo2Y2mJ.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-C0J37ZVe.js +0 -1
- package/dist/PaymentIntegrationFormAdyen-HeA9XIj-.js +0 -98
- package/dist/PlanCustomizationEditor-CEMP_Dhz.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/adyen-CvsH5fok.mjs +0 -117
- package/dist/adyen-Druit6gz.js +0 -1
- package/dist/de-DE-DaBBl-Ak.js +0 -1
- package/dist/en-US-BNevqm0M.js +0 -1
- package/dist/it-IT-BkPbTueL.js +0 -1
- package/dist/nl-NL-jIfAVGv0.js +0 -1
- package/dist/pricing-BVAld27Y.js +0 -1
- package/dist/pricing-DLOeiAIB.mjs +0 -16
- package/dist/useExperimentalFeature-COOU6IZd.js +0 -1
- package/dist/useExperimentalFeature-ierhOt9Q.mjs +0 -6
- package/dist/usePaymentMethodAvailability-Ci6LeYKt.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Q=require("./formControl-ODrpUvcA.js"),Ae=require("./formatting.es-C72Nsrmh.js"),y=require("./Button.vue.es-qGvnOKnK.js"),q=require("./SubscriptionDetails.entry.ce-D4CsSoR9.js"),ee=require("./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-cSQeqr0A.js"),Te=require("./PaymentMethod.vue.es-CJcSZ9lN.js"),p=require("./customElements-C963-LtW.js"),Pe=require("./ErrorNotification.vue.es-BX9dHEc-.js"),pe=require("./FormMessage.vue.es-dqATjC2N.js"),Be=require("./RadioGroupExtended.vue.es-Dt6LH9Yh.js"),xe=require("./StepInput.vue.es-mAnuCuDQ.js"),Se=require("./IconButton.vue.es-Bwdfu-jm.js"),Ve=require("./floating-ui.vue.es-Bly3DGWm.js"),Oe=require("./Section.vue.es-zVXBHAL6.js"),Le=require("./invoices-ClqTWYF9.js"),F=require("./CustomerWalletBalances.vue_vue_type_script_setup_true_lang-hBo2Y2mJ.js"),P=t=>t.replaceAll("_"," ").toLowerCase().replace(/^./,m=>m.toUpperCase()),Re=t=>{var m,o,h,a,_,i;const c=[];switch(t.type){case"CARD":c.push(t.card.brand&&P(t.card.brand),t.card.last_four_digits);break;case"ONLINE_BANKING":c.push(((m=t.online_banking)==null?void 0:m.variant)&&P(t.online_banking.variant),(o=t.online_banking)==null?void 0:o.owner_name);break;case"DIRECT_DEBIT":c.push(((h=t.direct_debit)==null?void 0:h.variant)&&P(t.direct_debit.variant),(a=t.direct_debit)==null?void 0:a.owner_name);break;case"BUY_NOW_PAY_LATER":c.push(((_=t.buy_now_pay_later)==null?void 0:_.variant)&&P(t.buy_now_pay_later.variant));break;case"DIGITAL_WALLET":c.push(((i=t.digital_wallet)==null?void 0:i.variant)&&P(t.digital_wallet.variant));break}return c.filter(Boolean).join(" ")||P(t.type)},Fe=e.defineComponent({__name:"Placeholder",props:{loading:{type:Boolean},shade:{default:"default"}},setup(t){return(m,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rounded",{"bg-gray-300":t.shade==="default","bg-gray-200":t.shade==="light"}])},[t.loading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["absolute inset-0",{"animated-gradient":t.loading}])},null,2)):e.createCommentVNode("",!0)],2))}}),Z=Ve._export_sfc(Fe,[["__scopeId","data-v-11677ac2"]]),qe={class:"flex flex-col gap-6"},$e={class:"flex flex-col gap-3","aria-labelledby":"charge-on-demand-items-heading"},Ye={class:"flex flex-col gap-2"},Ue={class:"flex min-w-0 grow flex-col"},ze={key:0,class:"flex shrink-0 items-center gap-1"},He={class:"w-32"},Ge={class:"flex flex-col gap-3","aria-labelledby":"charge-on-demand-preview-heading"},We={key:1,class:"flex flex-col gap-3","aria-busy":"true","data-testid":"charge-on-demand-preview-loading"},je={class:"flex flex-col gap-3","aria-labelledby":"charge-on-demand-payment-heading"},Ke={key:1,"data-testid":"charge-on-demand-no-payment-methods"},Xe=e.defineComponent({__name:"ChargeOnDemandEditor",props:e.mergeModels({items:{},preview:{default:void 0},isPreviewLoading:{type:Boolean,default:!1},paymentMethods:{},canAddPaymentMethod:{type:Boolean,default:!1},errors:{default:void 0},disabled:{type:Boolean,default:!1}},{selection:{required:!0},selectionModifiers:{},paymentMethodId:{},paymentMethodIdModifiers:{}}),emits:e.mergeModels(["add-payment-method"],["update:selection","update:paymentMethodId"]),setup(t){const m=t,o=e.useModel(t,"selection"),h=e.useModel(t,"paymentMethodId"),{$t:a}=p.useIntl(),_=n=>{o.value=[...o.value,n.priceType==="FLAT"?{pricingItemId:n.pricingItemId,units:n.defaultUnits}:{pricingItemId:n.pricingItemId}]},i=n=>{o.value=o.value.filter(({pricingItemId:u})=>u!==n.pricingItemId)},c=(n,u)=>{!Number.isInteger(u)||u<1||(o.value=o.value.map(g=>g.pricingItemId===n.pricingItemId?{...g,units:u}:g))},{getPriceLabel:v}=q.useChargeOnDemandPriceLabel(),I=e.computed(()=>new Map(o.value.map(n=>[n.pricingItemId,n]))),k=e.computed(()=>m.items.map(n=>{var u,g;return{item:n,selected:I.value.get(n.pricingItemId),error:(g=(u=m.errors)==null?void 0:u.items)==null?void 0:g[n.pricingItemId],priceLabel:v(n)}})),l=e.computed(()=>new Map(m.paymentMethods.map(n=>[n.id,n]))),w=e.computed(()=>m.paymentMethods.map(n=>({label:Re(n),value:n.id})));return(n,u)=>{var g,M,S;return e.openBlock(),e.createElementBlock("div",qe,[(g=t.errors)!=null&&g.form?(e.openBlock(),e.createBlock(Pe._sfc_main,{key:0,description:t.errors.form},null,8,["description"])):e.createCommentVNode("",!0),e.createElementVNode("section",$e,[e.createVNode(p._sfc_main,{id:"charge-on-demand-items-heading",tag:"h3",variant:"label","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Items",description:"Heading of the list of on-demand items that can be ordered",id:"charge_on_demand.items.heading"})),1)]),_:1}),e.createElementVNode("ul",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,({item:s,selected:b,error:C,priceLabel:V})=>(e.openBlock(),e.createElementBlock("li",{key:s.pricingItemId,class:"flex flex-col gap-1","data-testid":"charge-on-demand-item"},[e.createElementVNode("div",{class:e.normalizeClass(["flex items-center gap-4 rounded-lg border px-4 py-3",{"border-red-600":C,"border-primary-600":!C&&b,"border-gray-300":!C&&!b}])},[e.createElementVNode("div",Ue,[e.createVNode(p._sfc_main,{tag:"span",weight:"semibold","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.name),1)]),_:2},1024),V?(e.openBlock(),e.createBlock(p._sfc_main,{key:0,tag:"span",variant:"body-sm",color:"secondary","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V),1)]),_:2},1024)):e.createCommentVNode("",!0)]),s.priceType==="FLAT"&&b?(e.openBlock(),e.createElementBlock("div",ze,[e.createElementVNode("div",He,[e.createVNode(xe._sfc_main,{"model-value":b.units??s.defaultUnits,"initial-value":s.defaultUnits,min:1,name:`charge-on-demand-units-${s.pricingItemId}`,disabled:t.disabled,size:"sm","onUpdate:modelValue":N=>c(s,N)},null,8,["model-value","initial-value","name","disabled","onUpdate:modelValue"])]),e.createVNode(Se._sfc_main,{type:"button",icon:"close",intent:"subtle",size:"sm",disabled:t.disabled,tooltip:e.unref(a)({defaultMessage:"Remove",description:"Removes an on-demand item from the order",id:"charge_on_demand.item.remove"}),onClick:N=>i(s)},null,8,["disabled","tooltip","onClick"])])):b?(e.openBlock(),e.createBlock(y._sfc_main,{key:1,type:"button",intent:"secondary",size:"sm","icon-prefix":"check","aria-pressed":!0,disabled:t.disabled,onClick:N=>i(s)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Added",description:"Label of an on-demand item that is in the order; clicking it removes the item",id:"charge_on_demand.item.added"})),1)]),_:1},8,["disabled","onClick"])):(e.openBlock(),e.createBlock(y._sfc_main,{key:2,type:"button",intent:"secondary",size:"sm","icon-prefix":"add","aria-pressed":s.priceType==="FIXED"?!1:void 0,disabled:t.disabled,onClick:N=>_(s)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Add",description:"Adds an on-demand item to the order",id:"charge_on_demand.item.add"})),1)]),_:1},8,["aria-pressed","disabled","onClick"]))],2),C?(e.openBlock(),e.createBlock(pe._sfc_main,{key:0,message:C},null,8,["message"])):e.createCommentVNode("",!0)]))),128))])]),e.createElementVNode("section",Ge,[e.createVNode(p._sfc_main,{id:"charge-on-demand-preview-heading",tag:"h3",variant:"label","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"You will pay",description:"Heading of the invoice preview of the on-demand order",id:"charge_on_demand.preview.heading"})),1)]),_:1}),o.value.length===0?(e.openBlock(),e.createBlock(p._sfc_main,{key:0,variant:"body-sm",tag:"p",color:"subtle","no-spacing":"","data-testid":"charge-on-demand-preview-empty"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Add an item to see what you'll pay.",description:"Shown instead of the invoice preview while no item is added",id:"charge_on_demand.preview.empty"})),1)]),_:1})):t.isPreviewLoading&&!t.preview?(e.openBlock(),e.createElementBlock("div",We,[e.createVNode(Z,{loading:"",class:"relative h-4 w-2/3 overflow-hidden"}),e.createVNode(Z,{loading:"",class:"relative h-4 w-1/2 overflow-hidden"}),e.createVNode(Z,{loading:"",class:"relative h-5 w-1/3 overflow-hidden"})])):t.preview?(e.openBlock(),e.createBlock(ee._sfc_main$1,{key:2,invoice:t.preview,"is-customer-facing":""},null,8,["invoice"])):e.createCommentVNode("",!0)]),e.createElementVNode("section",je,[e.createVNode(p._sfc_main,{id:"charge-on-demand-payment-heading",tag:"h3",variant:"label","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Payment method",description:"Heading of the payment method picker of the on-demand order",id:"charge_on_demand.payment_method.heading"})),1)]),_:1}),t.paymentMethods.length>0?(e.openBlock(),e.createBlock(Be._sfc_main,{key:0,modelValue:h.value,"onUpdate:modelValue":u[0]||(u[0]=s=>h.value=s),name:"charge-on-demand-payment-method",options:w.value,"show-radio":!1,error:(M=t.errors)==null?void 0:M.paymentMethod,disabled:t.disabled,direction:"column"},{label:e.withCtx(({optionValue:s})=>[l.value.get(s)?(e.openBlock(),e.createBlock(Te._sfc_main,{key:0,"payment-method":l.value.get(s)},null,8,["payment-method"])):e.createCommentVNode("",!0)]),description:e.withCtx(()=>[...u[2]||(u[2]=[])]),_:1},8,["modelValue","options","error","disabled"])):(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(n.$slots,"payment-methods-empty",{},()=>[e.createVNode(p._sfc_main,{tag:"p",color:"subtle",variant:"body-sm","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"There is no saved payment method that can pay for this order.",description:"Shown when no saved payment method can pay the on-demand order",id:"charge_on_demand.payment_method.empty"})),1)]),_:1})]),(S=t.errors)!=null&&S.paymentMethod?(e.openBlock(),e.createBlock(pe._sfc_main,{key:0,message:t.errors.paymentMethod},null,8,["message"])):e.createCommentVNode("",!0)])),t.canAddPaymentMethod?(e.openBlock(),e.createBlock(y._sfc_main,{key:2,type:"button",intent:"secondary","icon-prefix":"add",disabled:t.disabled,"data-testid":"charge-on-demand-add-payment-method",onClick:u[1]||(u[1]=s=>n.$emit("add-payment-method"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Add payment method",description:"Opens the form to add a payment method for the on-demand order",id:"charge_on_demand.payment_method.add"})),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0)])])}}}),Je=["ORDER","ADD_PAYMENT_METHOD","PLACED","PAYMENT_FAILED","FAILED"];function Qe(t){return t.payment_status==="PAID"||t.payment_status==="OVERPAID"}function Ze(t){var m;return p.isApiError(t)?t.statusCode===422?t.resourceType==="PAYMENT"?"PAYMENT_FAILED":"FAILED":t.statusCode!==400?"FAILED":t.field==="payment_method_id"?"PAYMENT_METHOD":t.field==="pricing_plan_subscription_id"?"SUBSCRIPTION_INACTIVE":t.field==="pricing_items"||(m=t.field)!=null&&m.startsWith("pricing_items.")?"PRICING_ITEMS":"FAILED":"FAILED"}function et(t){return t==="PAYMENT_METHOD"||t==="PRICING_ITEMS"||t==="SUBSCRIPTION_INACTIVE"}function tt({pricingPlanScheduleId:t}){const{chargeOnDemandPricingItems:m}=Le.createInvoicesService(),o=p.useLogger(),h=e.ref(!1),a=e.ref(),_=e.ref(),i=e.ref();return{isCharging:h,chargedInvoice:a,chargeError:_,unpaidInvoiceId:i,charge:async({pricingItems:I,paymentMethodId:k})=>{h.value=!0,_.value=void 0,i.value=void 0;try{const l=await m({pricing_plan_schedule_id:t.value,pricing_items:I,payment_method_id:k,finalize_immediately:!0});return a.value=l,{invoice:l}}catch(l){const w=Ze(l);_.value=w,i.value=w==="PAYMENT_FAILED"&&p.isApiError(l)?l.resourceId:void 0;const n={scheduleId:t.value,outcome:w,...p.isApiError(l)?{statusCode:l.statusCode,field:l.field,requestId:l.requestId}:{}};return w==="FAILED"?o.error("ON_DEMAND_CHARGE_FAILED","Failed to charge the on-demand order",n,l):o.warn("ON_DEMAND_CHARGE_REFUSED","The on-demand order was refused or its payment did not go through",n,l),{error:w,unpaidInvoiceId:i.value}}finally{h.value=!1}},reset:()=>{a.value=void 0,_.value=void 0,i.value=void 0}}}const at={key:0,class:"flex flex-col gap-2"},nt={key:1,class:"flex flex-col gap-2"},ot={key:2,class:"flex flex-col gap-2"},dt=e.defineComponent({__name:"ChargeOnDemandModal",props:{showModal:{type:Boolean},subscription:{type:Object},scheduleId:{type:String},items:{type:Array},customer:{type:Object},paymentMethods:{type:Array},canViewCreatedInvoice:{type:Boolean}},emits:["close","invoice-created","view-invoice","payment-method-stored","payment-failed"],setup(t,{emit:m}){const o=t,h=m,{$t:a}=p.useIntl(),_=p.useLogger(),i=e.ref("ORDER"),c=e.ref([]),v=e.ref(),I=e.computed(()=>(o.subscription.payment_acceptor_ids??[]).length>0),k=e.computed(()=>q.getPayablePaymentMethods(o.paymentMethods??[],o.subscription)),l=e.ref();e.watch(k,d=>{var A;const r=l.value;l.value=void 0;const f=r?d.find(({id:T})=>!r.has(T)):void 0;if(f){v.value=f.id;return}d.some(({id:T})=>T===v.value)||(v.value=(A=d[0])==null?void 0:A.id)},{immediate:!0});const{paneRef:w,isActive:n,isSaving:u,open:g,leave:M,submit:S}=F.useAddPaymentMethodStep({step:i,name:"ADD_PAYMENT_METHOD",returnTo:"ORDER"}),s=e.ref(!1),b=e.ref(),C=d=>{s.value=!0,_.error("PAYMENT_METHOD_OPTIONS_LOAD_FAILED","Failed to load the payment methods that can be offered",{flow:"ON_DEMAND_ORDER",subscriptionId:o.subscription.id},d),n.value&&(M(),b.value=a({defaultMessage:"We couldn't load the ways to add a payment method. Please try again.",description:"Shown on the on-demand order when the payment methods that can be added failed to load",id:"charge_on_demand_modal.payment_method_options_error"}))},{settledOptions:V,isPending:N,load:ve}=F.useCustomerPaymentMethodOptions({isOpen:e.computed(()=>o.showModal&&I.value),customer:e.computed(()=>o.customer),subscriptionId:e.computed(()=>o.subscription.id),onError:C}),fe=e.computed(()=>{var d;return(d=V.value)==null?void 0:d.filter(({payment_acceptor:r})=>(o.subscription.payment_acceptor_ids??[]).includes(r.id))}),_e=()=>{b.value=void 0,s.value&&(s.value=!1,ve()),g()},ge=()=>{l.value=new Set(k.value.map(({id:d})=>d)),M(),h("payment-method-stored")},te=e.reactive({lines:e.computed(()=>c.value.map(({pricingItemId:d,units:r})=>{var f;return{pricingItemId:d,priceType:(f=o.items.find(A=>A.pricingItemId===d))==null?void 0:f.priceType,units:r}}))}),ae=Q.useValidation({lines:{$each:Q.common.forEach({units:{orderable:Q.common.withMessage(()=>a({defaultMessage:"Enter a whole number of 1 or more.",description:"Shown under the quantity of an on-demand order item that is not a whole number of 1 or more",id:"charge_on_demand_modal.units_error"}),(d,r)=>r.priceType!=="FLAT"||q.isOrderableUnits(d))}})}},te),$=e.computed(()=>ae.value.lines.$invalid),ne=e.computed(()=>{const{$errors:d=[]}=ae.value.lines.$each.$response??{},r=te.lines.flatMap(({pricingItemId:f},A)=>{var ue,me,he;const T=(he=(me=(ue=d[A])==null?void 0:ue.units)==null?void 0:me[0])==null?void 0:he.$message;return T?[[f,String(T)]]:[]});return r.length>0?Object.fromEntries(r):void 0}),oe=e.computed(()=>c.value.length>0&&!$.value?q.toChargePricingItems(c.value,o.items):void 0),{invoicePreview:de,isPreviewPending:O,hasPreviewFailed:ie,loadPreview:ye}=F.useChargeOnDemandInvoicePreview({pricingPlanScheduleId:e.computed(()=>o.scheduleId),pricingItems:oe}),Y=e.computed(()=>{var d;return(d=de.value)==null?void 0:d.invoice_amount_including_tax}),{isCharging:E,chargedInvoice:B,chargeError:D,unpaidInvoiceId:U,charge:be,reset:we}=tt({pricingPlanScheduleId:e.computed(()=>o.scheduleId)}),Ie=e.computed(()=>{switch(D.value){case"PAYMENT_METHOD":return a({defaultMessage:"This payment method can't pay for this order. Choose another one.",description:"Shown on the on-demand order when the chosen payment method cannot pay for it",id:"charge_on_demand_modal.charge_error.payment_method"});case"PRICING_ITEMS":return a({defaultMessage:"Some items in your order can't be ordered as entered. Check your order and try again.",description:"Shown on the on-demand order when an item, its quantity or its amount was not accepted",id:"charge_on_demand_modal.charge_error.pricing_items"});case"SUBSCRIPTION_INACTIVE":return a({defaultMessage:"This subscription can't take orders right now.",description:"Shown on the on-demand order when the subscription is not active, so nothing can be ordered on it",id:"charge_on_demand_modal.charge_error.subscription_inactive"});default:return}}),ke=e.computed(()=>D.value==="SUBSCRIPTION_INACTIVE");e.watch(v,()=>{D.value==="PAYMENT_METHOD"&&(D.value=void 0)}),e.watch(c,()=>{D.value==="PRICING_ITEMS"&&(D.value=void 0)},{deep:!0});const Ce=e.computed(()=>ie.value?a({defaultMessage:"We couldn't calculate the total. Please try again.",description:"Shown on the on-demand order when its total failed to load",id:"charge_on_demand_modal.preview_error"}):void 0),z=e.computed(()=>ie.value&&!O.value&&!E.value),re=e.computed(()=>Ie.value??Ce.value??b.value),Ee=e.computed(()=>re.value||ne.value?{form:re.value,items:ne.value}:void 0),L=e.computed(()=>i.value==="PLACED"),R=e.computed(()=>!!B.value&&Qe(B.value)),se=e.computed(()=>i.value==="PAYMENT_FAILED"||i.value==="FAILED"),le=e.computed(()=>!E.value&&I.value&&!ke.value&&c.value.length>0&&!$.value&&!!v.value&&!!Y.value&&!O.value),Me=e.computed(()=>i.value==="PLACED"?a({defaultMessage:"Order placed",description:"Title of the on-demand order modal once the order is placed, paid or not",id:"charge_on_demand_modal.placed.title"}):i.value==="PAYMENT_FAILED"?a({defaultMessage:"Payment not completed",description:"Title of the on-demand order modal when the payment for the order could not be made",id:"charge_on_demand_modal.payment_failed.title"}):i.value==="FAILED"?a({defaultMessage:"Something went wrong",description:"Title of the on-demand order modal when the order failed and it is unknown whether it went through",id:"charge_on_demand_modal.failed.title"}):n.value?a({defaultMessage:"Add payment method",description:"Title of the on-demand order modal while the customer is adding a payment method",id:"charge_on_demand_modal.add_payment_method.title"}):a({defaultMessage:"Order on-demand items",description:"Title of the modal for ordering the on-demand items of a subscription",id:"charge_on_demand_modal.title"})),Ne=e.computed(()=>i.value==="PLACED"?R.value?a({defaultMessage:"Your order is paid. The invoice is in your invoice list.",description:"Subtitle of the on-demand order modal once the order has been paid",id:"charge_on_demand_modal.success.subtitle"}):a({defaultMessage:"Your invoice was created, but it isn't paid yet. You'll find it in your invoice list.",description:"Subtitle of the on-demand order modal when the order was placed but its invoice is not paid",id:"charge_on_demand_modal.placed.unpaid.subtitle"}):i.value==="PAYMENT_FAILED"&&U.value?a({defaultMessage:"We couldn't take the payment for this order. Its invoice is in your invoice list, waiting to be paid.",description:"Subtitle of the on-demand order modal when the order was placed but the payment for its invoice was refused",id:"charge_on_demand_modal.payment_failed.unpaid_invoice.subtitle"}):i.value==="PAYMENT_FAILED"?a({defaultMessage:"We couldn't take the payment for this order. If an invoice was created, you'll find it in your invoice list.",description:"Subtitle of the on-demand order modal when the payment for the order could not be made",id:"charge_on_demand_modal.payment_failed.subtitle"}):i.value==="FAILED"?a({defaultMessage:"We couldn't complete your order. Check your invoice list before trying again.",description:"Subtitle of the on-demand order modal when the order failed and it is unknown whether it went through",id:"charge_on_demand_modal.failed.subtitle"}):n.value?a({defaultMessage:"Add a payment method to pay for this order.",description:"Subtitle of the on-demand order modal while the customer is adding a payment method",id:"charge_on_demand_modal.add_payment_method.subtitle"}):void 0),ce=e.computed(()=>n.value?a({defaultMessage:"Back",description:"Leaves the add payment method step of the on-demand order modal for the order",id:"charge_on_demand_modal.back_button.label"}):a({defaultMessage:"Cancel",description:"Closes the modal for ordering on-demand items",id:"charge_on_demand_modal.cancel_button.label"})),x=e.computed(()=>L.value?a({defaultMessage:"Done",description:"Closes the on-demand order modal once the order is placed",id:"charge_on_demand_modal.done_button.label"}):se.value?a({defaultMessage:"Close",description:"Closes the on-demand order modal when the order did not go through",id:"charge_on_demand_modal.close_button.label"}):n.value?a({defaultMessage:"Save payment method",description:"Confirm button of the on-demand order modal while the customer is adding a payment method",id:"charge_on_demand_modal.save_payment_method.label"}):c.value.length===0?a({defaultMessage:"Add an item to continue",description:"Disabled pay button of the on-demand order while no item is added",id:"charge_on_demand_modal.confirm_button.no_items"}):$.value?a({defaultMessage:"Check the quantities to continue",description:"Disabled pay button of the on-demand order while an item has a quantity that cannot be ordered",id:"charge_on_demand_modal.confirm_button.invalid_units"}):z.value?a({defaultMessage:"Calculate total again",description:"Pay button of the on-demand order when its total failed to load",id:"charge_on_demand_modal.confirm_button.retry_preview"}):!Y.value||O.value?a({defaultMessage:"Updating total…",description:"Disabled pay button of the on-demand order while its total is calculated",id:"charge_on_demand_modal.confirm_button.updating"}):a({defaultMessage:"Pay {total}",description:"Pay button of the on-demand order, with the total it charges",id:"charge_on_demand_modal.confirm_button.pay"},{total:Ae.formatAmount(Y.value)})),De=async()=>{const d=oe.value;if(!le.value||!d||!v.value)return;const r=await be({pricingItems:d,paymentMethodId:v.value});"invoice"in r?(h("invoice-created",r.invoice),i.value="PLACED"):et(r.error)||(i.value=r.error)},H=()=>{if(n.value){S();return}if(z.value){ye();return}De()},G=()=>{h("close")},W=e.computed(()=>L.value&&!R.value&&o.canViewCreatedInvoice),j=e.computed(()=>i.value==="PAYMENT_FAILED"&&!!U.value&&o.canViewCreatedInvoice),K=e.computed(()=>a({defaultMessage:"Go to invoice",description:"Opens the invoice of the on-demand order the customer just placed",id:"charge_on_demand_modal.view_invoice_button.label"})),X=()=>{var r;const d=((r=B.value)==null?void 0:r.id)??U.value;G(),d&&h("view-invoice",d)},J=()=>{if(!(u.value||E.value)){if(L.value){G();return}if(n.value){M();return}h("close")}};return e.watch(()=>o.showModal,d=>{d&&(i.value="ORDER",c.value=[],l.value=void 0,we(),b.value=void 0)}),(d,r)=>(e.openBlock(),e.createBlock(F._sfc_main$1,{ref_key:"addPaymentMethodRef",ref:w,class:"sv-charge-on-demand-modal","show-modal":t.showModal,title:Me.value,"sub-title":Ne.value,"cancel-button-text":ce.value,"confirm-button-text":x.value,"is-pending":e.unref(u)||e.unref(E),panes:e.unref(Je),step:i.value,"add-payment-method-pane":"ADD_PAYMENT_METHOD",customer:t.customer,"payment-method-options":fe.value,"is-payment-method-options-pending":e.unref(N),"is-adding-payment-method":e.unref(n),onConfirm:H,onCancel:J,onPaymentSuccess:ge,onPaymentFailed:r[2]||(r[2]=f=>d.$emit("payment-failed",f))},{ORDER:e.withCtx(()=>[I.value?(e.openBlock(),e.createBlock(e.unref(Xe),{key:0,selection:c.value,"onUpdate:selection":r[0]||(r[0]=f=>c.value=f),"payment-method-id":v.value,"onUpdate:paymentMethodId":r[1]||(r[1]=f=>v.value=f),class:"sv-charge-on-demand-modal__form",items:t.items,preview:e.unref(de),"is-preview-loading":e.unref(O),"payment-methods":k.value,errors:Ee.value,disabled:e.unref(E),"can-add-payment-method":"",onAddPaymentMethod:_e},null,8,["selection","payment-method-id","items","preview","is-preview-loading","payment-methods","errors","disabled"])):(e.openBlock(),e.createBlock(ee._sfc_main,{key:1,class:"sv-charge-on-demand-modal__unavailable",icon:"credit_card_off"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Ordering isn't available",description:"Title shown instead of the on-demand order form when the subscription cannot take payments",id:"charge_on_demand_modal.unavailable.title"})),1)]),message:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"This subscription can't take payments here. Contact us to order these items.",description:"Message shown instead of the on-demand order form when the subscription cannot take payments",id:"charge_on_demand_modal.unavailable.message"})),1)]),_:1}))]),PLACED:e.withCtx(()=>[e.unref(B)?(e.openBlock(),e.createBlock(e.unref(Oe._sfc_main),{key:0,class:"sv-charge-on-demand-modal__receipt","content-background":"none"},{default:e.withCtx(()=>[e.createVNode(e.unref(ee._sfc_main$1),{invoice:e.unref(B),"is-customer-facing":"","is-paid":R.value},null,8,["invoice","is-paid"])]),_:1})):e.createCommentVNode("",!0)]),footer:e.withCtx(()=>[L.value?(e.openBlock(),e.createElementBlock("div",at,[W.value?(e.openBlock(),e.createBlock(e.unref(y._sfc_main),{key:0,size:"lg",class:"sv-action sv-action--primary","data-testid":"charge-on-demand-view-invoice",onClick:X},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(K.value),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(y._sfc_main),{size:"lg",intent:W.value?"subtle":"primary",class:e.normalizeClass(["sv-action",W.value?"sv-action--secondary":"sv-action--primary"]),"data-testid":"charge-on-demand-done",onClick:G},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.value),1)]),_:1},8,["intent","class"]),R.value&&t.canViewCreatedInvoice?(e.openBlock(),e.createBlock(e.unref(y._sfc_main),{key:1,size:"lg",intent:"subtle",class:"sv-action sv-action--secondary","data-testid":"charge-on-demand-view-invoice",onClick:X},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(K.value),1)]),_:1})):e.createCommentVNode("",!0)])):se.value?(e.openBlock(),e.createElementBlock("div",nt,[j.value?(e.openBlock(),e.createBlock(e.unref(y._sfc_main),{key:0,size:"lg",class:"sv-action sv-action--primary","data-testid":"charge-on-demand-view-invoice",onClick:X},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(K.value),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(y._sfc_main),{size:"lg",intent:j.value?"subtle":"primary",class:e.normalizeClass(["sv-action",j.value?"sv-action--secondary":"sv-action--primary"]),"data-testid":"charge-on-demand-close",onClick:J},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.value),1)]),_:1},8,["intent","class"])])):(e.openBlock(),e.createElementBlock("div",ot,[e.unref(n)?(e.openBlock(),e.createBlock(e.unref(y._sfc_main),{key:0,size:"lg",class:"sv-action sv-action--primary","data-testid":"charge-on-demand-save-payment-method",loading:e.unref(u),onClick:H},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.value),1)]),_:1},8,["loading"])):I.value?(e.openBlock(),e.createBlock(e.unref(y._sfc_main),{key:1,size:"lg",class:"sv-action sv-action--primary","data-testid":"charge-on-demand-confirm",disabled:!le.value&&!z.value,loading:e.unref(E),onClick:H},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.value),1)]),_:1},8,["disabled","loading"])):e.createCommentVNode("",!0),e.createVNode(e.unref(y._sfc_main),{size:"lg",intent:"subtle",class:"sv-action sv-action--secondary","data-testid":"charge-on-demand-cancel",disabled:e.unref(E),onClick:J},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(ce.value),1)]),_:1},8,["disabled"])]))]),_:1},8,["show-modal","title","sub-title","cancel-button-text","confirm-button-text","is-pending","panes","step","customer","payment-method-options","is-payment-method-options-pending","is-adding-payment-method"]))}});exports.default=dt;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Q=require("./formControl-ODrpUvcA.js"),Ae=require("./formatting.es-C72Nsrmh.js"),y=require("./Button.vue.es-BzkuglKw.js"),q=require("./SubscriptionDetails.entry.ce-CQUO_uXH.js"),ee=require("./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CQ0KrXHJ.js"),Te=require("./PaymentMethod.vue.es-D0D9jW8s.js"),h=require("./customElements-DUMRMFQ5.js"),Pe=require("./ErrorNotification.vue.es-tS9vySUZ.js"),he=require("./FormMessage.vue.es-dqATjC2N.js"),Be=require("./RadioGroupExtended.vue.es-DlbURHQN.js"),xe=require("./StepInput.vue.es-H-3R4jJq.js"),Se=require("./IconButton.vue.es-DgQN18Am.js"),Ve=require("./floating-ui.vue.es-Bly3DGWm.js"),Oe=require("./Section.vue.es-Bbt0RITt.js"),Le=require("./invoices-CKQBLar2.js"),F=require("./CustomerWalletBalances.vue_vue_type_script_setup_true_lang-XufY6bdV.js"),P=t=>t.replaceAll("_"," ").toLowerCase().replace(/^./,m=>m.toUpperCase()),Re=t=>{var m,o,p,a,_,i;const c=[];switch(t.type){case"CARD":c.push(t.card.brand&&P(t.card.brand),t.card.last_four_digits);break;case"ONLINE_BANKING":c.push(((m=t.online_banking)==null?void 0:m.variant)&&P(t.online_banking.variant),(o=t.online_banking)==null?void 0:o.owner_name);break;case"DIRECT_DEBIT":c.push(((p=t.direct_debit)==null?void 0:p.variant)&&P(t.direct_debit.variant),(a=t.direct_debit)==null?void 0:a.owner_name);break;case"BUY_NOW_PAY_LATER":c.push(((_=t.buy_now_pay_later)==null?void 0:_.variant)&&P(t.buy_now_pay_later.variant));break;case"DIGITAL_WALLET":c.push(((i=t.digital_wallet)==null?void 0:i.variant)&&P(t.digital_wallet.variant));break}return c.filter(Boolean).join(" ")||P(t.type)},Fe=e.defineComponent({__name:"Placeholder",props:{loading:{type:Boolean},shade:{default:"default"}},setup(t){return(m,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rounded",{"bg-gray-300":t.shade==="default","bg-gray-200":t.shade==="light"}])},[t.loading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["absolute inset-0",{"animated-gradient":t.loading}])},null,2)):e.createCommentVNode("",!0)],2))}}),Z=Ve._export_sfc(Fe,[["__scopeId","data-v-11677ac2"]]),qe={class:"flex flex-col gap-6"},$e={class:"flex flex-col gap-3","aria-labelledby":"charge-on-demand-items-heading"},Ye={class:"flex flex-col gap-2"},Ue={class:"flex min-w-0 grow flex-col"},ze={key:0,class:"flex shrink-0 items-center gap-1"},He={class:"w-32"},Ge={class:"flex flex-col gap-3","aria-labelledby":"charge-on-demand-preview-heading"},We={key:1,class:"flex flex-col gap-3","aria-busy":"true","data-testid":"charge-on-demand-preview-loading"},je={class:"flex flex-col gap-3","aria-labelledby":"charge-on-demand-payment-heading"},Ke={key:1,"data-testid":"charge-on-demand-no-payment-methods"},Xe=e.defineComponent({__name:"ChargeOnDemandEditor",props:e.mergeModels({items:{},preview:{default:void 0},isPreviewLoading:{type:Boolean,default:!1},paymentMethods:{},canAddPaymentMethod:{type:Boolean,default:!1},errors:{default:void 0},disabled:{type:Boolean,default:!1}},{selection:{required:!0},selectionModifiers:{},paymentMethodId:{},paymentMethodIdModifiers:{}}),emits:e.mergeModels(["add-payment-method"],["update:selection","update:paymentMethodId"]),setup(t){const m=t,o=e.useModel(t,"selection"),p=e.useModel(t,"paymentMethodId"),{$t:a}=h.useIntl(),_=n=>{o.value=[...o.value,n.priceType==="FLAT"?{pricingItemId:n.pricingItemId,units:n.defaultUnits}:{pricingItemId:n.pricingItemId}]},i=n=>{o.value=o.value.filter(({pricingItemId:u})=>u!==n.pricingItemId)},c=(n,u)=>{!Number.isInteger(u)||u<1||(o.value=o.value.map(g=>g.pricingItemId===n.pricingItemId?{...g,units:u}:g))},{getPriceLabel:v}=q.useChargeOnDemandPriceLabel(),I=e.computed(()=>new Map(o.value.map(n=>[n.pricingItemId,n]))),k=e.computed(()=>m.items.map(n=>{var u,g;return{item:n,selected:I.value.get(n.pricingItemId),error:(g=(u=m.errors)==null?void 0:u.items)==null?void 0:g[n.pricingItemId],priceLabel:v(n)}})),l=e.computed(()=>new Map(m.paymentMethods.map(n=>[n.id,n]))),w=e.computed(()=>m.paymentMethods.map(n=>({label:Re(n),value:n.id})));return(n,u)=>{var g,M,S;return e.openBlock(),e.createElementBlock("div",qe,[(g=t.errors)!=null&&g.form?(e.openBlock(),e.createBlock(Pe._sfc_main,{key:0,description:t.errors.form},null,8,["description"])):e.createCommentVNode("",!0),e.createElementVNode("section",$e,[e.createVNode(h._sfc_main,{id:"charge-on-demand-items-heading",tag:"h3",variant:"label","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Items",description:"Heading of the list of on-demand items that can be ordered",id:"charge_on_demand.items.heading"})),1)]),_:1}),e.createElementVNode("ul",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,({item:s,selected:b,error:C,priceLabel:V})=>(e.openBlock(),e.createElementBlock("li",{key:s.pricingItemId,class:"flex flex-col gap-1","data-testid":"charge-on-demand-item"},[e.createElementVNode("div",{class:e.normalizeClass(["flex items-center gap-4 rounded-lg border px-4 py-3",{"border-red-600":C,"border-primary-600":!C&&b,"border-gray-300":!C&&!b}])},[e.createElementVNode("div",Ue,[e.createVNode(h._sfc_main,{tag:"span",weight:"semibold","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.name),1)]),_:2},1024),V?(e.openBlock(),e.createBlock(h._sfc_main,{key:0,tag:"span",variant:"body-sm",color:"secondary","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V),1)]),_:2},1024)):e.createCommentVNode("",!0)]),s.priceType==="FLAT"&&b?(e.openBlock(),e.createElementBlock("div",ze,[e.createElementVNode("div",He,[e.createVNode(xe._sfc_main,{"model-value":b.units??s.defaultUnits,"initial-value":s.defaultUnits,min:1,name:`charge-on-demand-units-${s.pricingItemId}`,disabled:t.disabled,size:"sm","onUpdate:modelValue":N=>c(s,N)},null,8,["model-value","initial-value","name","disabled","onUpdate:modelValue"])]),e.createVNode(Se._sfc_main,{type:"button",icon:"close",intent:"subtle",size:"sm",disabled:t.disabled,tooltip:e.unref(a)({defaultMessage:"Remove",description:"Removes an on-demand item from the order",id:"charge_on_demand.item.remove"}),onClick:N=>i(s)},null,8,["disabled","tooltip","onClick"])])):b?(e.openBlock(),e.createBlock(y._sfc_main,{key:1,type:"button",intent:"secondary",size:"sm","icon-prefix":"check","aria-pressed":!0,disabled:t.disabled,onClick:N=>i(s)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Added",description:"Label of an on-demand item that is in the order; clicking it removes the item",id:"charge_on_demand.item.added"})),1)]),_:1},8,["disabled","onClick"])):(e.openBlock(),e.createBlock(y._sfc_main,{key:2,type:"button",intent:"secondary",size:"sm","icon-prefix":"add","aria-pressed":s.priceType==="FIXED"?!1:void 0,disabled:t.disabled,onClick:N=>_(s)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Add",description:"Adds an on-demand item to the order",id:"charge_on_demand.item.add"})),1)]),_:1},8,["aria-pressed","disabled","onClick"]))],2),C?(e.openBlock(),e.createBlock(he._sfc_main,{key:0,message:C},null,8,["message"])):e.createCommentVNode("",!0)]))),128))])]),e.createElementVNode("section",Ge,[e.createVNode(h._sfc_main,{id:"charge-on-demand-preview-heading",tag:"h3",variant:"label","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"You will pay",description:"Heading of the invoice preview of the on-demand order",id:"charge_on_demand.preview.heading"})),1)]),_:1}),o.value.length===0?(e.openBlock(),e.createBlock(h._sfc_main,{key:0,variant:"body-sm",tag:"p",color:"subtle","no-spacing":"","data-testid":"charge-on-demand-preview-empty"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Add an item to see what you'll pay.",description:"Shown instead of the invoice preview while no item is added",id:"charge_on_demand.preview.empty"})),1)]),_:1})):t.isPreviewLoading&&!t.preview?(e.openBlock(),e.createElementBlock("div",We,[e.createVNode(Z,{loading:"",class:"relative h-4 w-2/3 overflow-hidden"}),e.createVNode(Z,{loading:"",class:"relative h-4 w-1/2 overflow-hidden"}),e.createVNode(Z,{loading:"",class:"relative h-5 w-1/3 overflow-hidden"})])):t.preview?(e.openBlock(),e.createBlock(ee._sfc_main$1,{key:2,invoice:t.preview,"is-customer-facing":""},null,8,["invoice"])):e.createCommentVNode("",!0)]),e.createElementVNode("section",je,[e.createVNode(h._sfc_main,{id:"charge-on-demand-payment-heading",tag:"h3",variant:"label","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Payment method",description:"Heading of the payment method picker of the on-demand order",id:"charge_on_demand.payment_method.heading"})),1)]),_:1}),t.paymentMethods.length>0?(e.openBlock(),e.createBlock(Be._sfc_main,{key:0,modelValue:p.value,"onUpdate:modelValue":u[0]||(u[0]=s=>p.value=s),name:"charge-on-demand-payment-method",options:w.value,"show-radio":!1,error:(M=t.errors)==null?void 0:M.paymentMethod,disabled:t.disabled,direction:"column"},{label:e.withCtx(({optionValue:s})=>[l.value.get(s)?(e.openBlock(),e.createBlock(Te._sfc_main,{key:0,"payment-method":l.value.get(s)},null,8,["payment-method"])):e.createCommentVNode("",!0)]),description:e.withCtx(()=>[...u[2]||(u[2]=[])]),_:1},8,["modelValue","options","error","disabled"])):(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(n.$slots,"payment-methods-empty",{},()=>[e.createVNode(h._sfc_main,{tag:"p",color:"subtle",variant:"body-sm","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"There is no saved payment method that can pay for this order.",description:"Shown when no saved payment method can pay the on-demand order",id:"charge_on_demand.payment_method.empty"})),1)]),_:1})]),(S=t.errors)!=null&&S.paymentMethod?(e.openBlock(),e.createBlock(he._sfc_main,{key:0,message:t.errors.paymentMethod},null,8,["message"])):e.createCommentVNode("",!0)])),t.canAddPaymentMethod?(e.openBlock(),e.createBlock(y._sfc_main,{key:2,type:"button",intent:"secondary","icon-prefix":"add",disabled:t.disabled,"data-testid":"charge-on-demand-add-payment-method",onClick:u[1]||(u[1]=s=>n.$emit("add-payment-method"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Add payment method",description:"Opens the form to add a payment method for the on-demand order",id:"charge_on_demand.payment_method.add"})),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0)])])}}}),Je=["ORDER","ADD_PAYMENT_METHOD","PLACED","PAYMENT_FAILED","FAILED"];function Qe(t){return t.payment_status==="PAID"||t.payment_status==="OVERPAID"}function Ze(t){var m;return h.isApiError(t)?t.statusCode===422?t.resourceType==="PAYMENT"?"PAYMENT_FAILED":"FAILED":t.statusCode!==400?"FAILED":t.field==="payment_method_id"?"PAYMENT_METHOD":t.field==="pricing_plan_subscription_id"?"SUBSCRIPTION_INACTIVE":t.field==="pricing_items"||(m=t.field)!=null&&m.startsWith("pricing_items.")?"PRICING_ITEMS":"FAILED":"FAILED"}function et(t){return t==="PAYMENT_METHOD"||t==="PRICING_ITEMS"||t==="SUBSCRIPTION_INACTIVE"}function tt({pricingPlanScheduleId:t}){const{chargeOnDemandPricingItems:m}=Le.createInvoicesService(),o=h.useLogger(),p=e.ref(!1),a=e.ref(),_=e.ref(),i=e.ref();return{isCharging:p,chargedInvoice:a,chargeError:_,unpaidInvoiceId:i,charge:async({pricingItems:I,paymentMethodId:k})=>{p.value=!0,_.value=void 0,i.value=void 0;try{const l=await m({pricing_plan_schedule_id:t.value,pricing_items:I,payment_method_id:k,finalize_immediately:!0});return a.value=l,{invoice:l}}catch(l){const w=Ze(l);_.value=w,i.value=w==="PAYMENT_FAILED"&&h.isApiError(l)?l.resourceId:void 0;const n={scheduleId:t.value,outcome:w,...h.isApiError(l)?{statusCode:l.statusCode,field:l.field,requestId:l.requestId}:{}};return w==="FAILED"?o.error("ON_DEMAND_CHARGE_FAILED","Failed to charge the on-demand order",n,l):o.warn("ON_DEMAND_CHARGE_REFUSED","The on-demand order was refused or its payment did not go through",n,l),{error:w,unpaidInvoiceId:i.value}}finally{p.value=!1}},reset:()=>{a.value=void 0,_.value=void 0,i.value=void 0}}}const at={key:0,class:"flex flex-col gap-2"},nt={key:1,class:"flex flex-col gap-2"},ot={key:2,class:"flex flex-col gap-2"},dt=e.defineComponent({__name:"ChargeOnDemandModal",props:{showModal:{type:Boolean},subscription:{type:Object},scheduleId:{type:String},items:{type:Array},customer:{type:Object},paymentMethods:{type:Array},canViewCreatedInvoice:{type:Boolean}},emits:["close","invoice-created","view-invoice","payment-method-stored","payment-failed"],setup(t,{emit:m}){const o=t,p=m,{$t:a}=h.useIntl(),_=h.useLogger(),i=e.ref("ORDER"),c=e.ref([]),v=e.ref(),I=e.computed(()=>(o.subscription.payment_acceptor_ids??[]).length>0),k=e.computed(()=>q.getPayablePaymentMethods(o.paymentMethods??[],o.subscription)),l=e.ref();e.watch(k,d=>{var A;const r=l.value;l.value=void 0;const f=r?d.find(({id:T})=>!r.has(T)):void 0;if(f){v.value=f.id;return}d.some(({id:T})=>T===v.value)||(v.value=(A=d[0])==null?void 0:A.id)},{immediate:!0});const{paneRef:w,isActive:n,isSaving:u,open:g,leave:M,submit:S}=F.useAddPaymentMethodStep({step:i,name:"ADD_PAYMENT_METHOD",returnTo:"ORDER"}),s=e.ref(!1),b=e.ref(),C=d=>{s.value=!0,_.error("PAYMENT_METHOD_OPTIONS_LOAD_FAILED","Failed to load the payment methods that can be offered",{flow:"ON_DEMAND_ORDER",subscriptionId:o.subscription.id},d),n.value&&(M(),b.value=a({defaultMessage:"We couldn't load the ways to add a payment method. Please try again.",description:"Shown on the on-demand order when the payment methods that can be added failed to load",id:"charge_on_demand_modal.payment_method_options_error"}))},{settledOptions:V,isPending:N,load:ve}=F.useCustomerPaymentMethodOptions({isOpen:e.computed(()=>o.showModal&&I.value),customer:e.computed(()=>o.customer),subscriptionId:e.computed(()=>o.subscription.id),onError:C}),fe=e.computed(()=>{var d;return(d=V.value)==null?void 0:d.filter(({payment_acceptor:r})=>(o.subscription.payment_acceptor_ids??[]).includes(r.id))}),_e=()=>{b.value=void 0,s.value&&(s.value=!1,ve()),g()},ge=()=>{l.value=new Set(k.value.map(({id:d})=>d)),M(),p("payment-method-stored")},te=e.reactive({lines:e.computed(()=>c.value.map(({pricingItemId:d,units:r})=>{var f;return{pricingItemId:d,priceType:(f=o.items.find(A=>A.pricingItemId===d))==null?void 0:f.priceType,units:r}}))}),ae=Q.useValidation({lines:{$each:Q.common.forEach({units:{orderable:Q.common.withMessage(()=>a({defaultMessage:"Enter a whole number of 1 or more.",description:"Shown under the quantity of an on-demand order item that is not a whole number of 1 or more",id:"charge_on_demand_modal.units_error"}),(d,r)=>r.priceType!=="FLAT"||q.isOrderableUnits(d))}})}},te),$=e.computed(()=>ae.value.lines.$invalid),ne=e.computed(()=>{const{$errors:d=[]}=ae.value.lines.$each.$response??{},r=te.lines.flatMap(({pricingItemId:f},A)=>{var ue,me,pe;const T=(pe=(me=(ue=d[A])==null?void 0:ue.units)==null?void 0:me[0])==null?void 0:pe.$message;return T?[[f,String(T)]]:[]});return r.length>0?Object.fromEntries(r):void 0}),oe=e.computed(()=>c.value.length>0&&!$.value?q.toChargePricingItems(c.value,o.items):void 0),{invoicePreview:de,isPreviewPending:O,hasPreviewFailed:ie,loadPreview:ye}=F.useChargeOnDemandInvoicePreview({pricingPlanScheduleId:e.computed(()=>o.scheduleId),pricingItems:oe}),Y=e.computed(()=>{var d;return(d=de.value)==null?void 0:d.invoice_amount_including_tax}),{isCharging:E,chargedInvoice:B,chargeError:D,unpaidInvoiceId:U,charge:be,reset:we}=tt({pricingPlanScheduleId:e.computed(()=>o.scheduleId)}),Ie=e.computed(()=>{switch(D.value){case"PAYMENT_METHOD":return a({defaultMessage:"This payment method can't pay for this order. Choose another one.",description:"Shown on the on-demand order when the chosen payment method cannot pay for it",id:"charge_on_demand_modal.charge_error.payment_method"});case"PRICING_ITEMS":return a({defaultMessage:"Some items in your order can't be ordered as entered. Check your order and try again.",description:"Shown on the on-demand order when an item, its quantity or its amount was not accepted",id:"charge_on_demand_modal.charge_error.pricing_items"});case"SUBSCRIPTION_INACTIVE":return a({defaultMessage:"This subscription can't take orders right now.",description:"Shown on the on-demand order when the subscription is not active, so nothing can be ordered on it",id:"charge_on_demand_modal.charge_error.subscription_inactive"});default:return}}),ke=e.computed(()=>D.value==="SUBSCRIPTION_INACTIVE");e.watch(v,()=>{D.value==="PAYMENT_METHOD"&&(D.value=void 0)}),e.watch(c,()=>{D.value==="PRICING_ITEMS"&&(D.value=void 0)},{deep:!0});const Ce=e.computed(()=>ie.value?a({defaultMessage:"We couldn't calculate the total. Please try again.",description:"Shown on the on-demand order when its total failed to load",id:"charge_on_demand_modal.preview_error"}):void 0),z=e.computed(()=>ie.value&&!O.value&&!E.value),re=e.computed(()=>Ie.value??Ce.value??b.value),Ee=e.computed(()=>re.value||ne.value?{form:re.value,items:ne.value}:void 0),L=e.computed(()=>i.value==="PLACED"),R=e.computed(()=>!!B.value&&Qe(B.value)),se=e.computed(()=>i.value==="PAYMENT_FAILED"||i.value==="FAILED"),le=e.computed(()=>!E.value&&I.value&&!ke.value&&c.value.length>0&&!$.value&&!!v.value&&!!Y.value&&!O.value),Me=e.computed(()=>i.value==="PLACED"?a({defaultMessage:"Order placed",description:"Title of the on-demand order modal once the order is placed, paid or not",id:"charge_on_demand_modal.placed.title"}):i.value==="PAYMENT_FAILED"?a({defaultMessage:"Payment not completed",description:"Title of the on-demand order modal when the payment for the order could not be made",id:"charge_on_demand_modal.payment_failed.title"}):i.value==="FAILED"?a({defaultMessage:"Something went wrong",description:"Title of the on-demand order modal when the order failed and it is unknown whether it went through",id:"charge_on_demand_modal.failed.title"}):n.value?a({defaultMessage:"Add payment method",description:"Title of the on-demand order modal while the customer is adding a payment method",id:"charge_on_demand_modal.add_payment_method.title"}):a({defaultMessage:"Order on-demand items",description:"Title of the modal for ordering the on-demand items of a subscription",id:"charge_on_demand_modal.title"})),Ne=e.computed(()=>i.value==="PLACED"?R.value?a({defaultMessage:"Your order is paid. The invoice is in your invoice list.",description:"Subtitle of the on-demand order modal once the order has been paid",id:"charge_on_demand_modal.success.subtitle"}):a({defaultMessage:"Your invoice was created, but it isn't paid yet. You'll find it in your invoice list.",description:"Subtitle of the on-demand order modal when the order was placed but its invoice is not paid",id:"charge_on_demand_modal.placed.unpaid.subtitle"}):i.value==="PAYMENT_FAILED"&&U.value?a({defaultMessage:"We couldn't take the payment for this order. Its invoice is in your invoice list, waiting to be paid.",description:"Subtitle of the on-demand order modal when the order was placed but the payment for its invoice was refused",id:"charge_on_demand_modal.payment_failed.unpaid_invoice.subtitle"}):i.value==="PAYMENT_FAILED"?a({defaultMessage:"We couldn't take the payment for this order. If an invoice was created, you'll find it in your invoice list.",description:"Subtitle of the on-demand order modal when the payment for the order could not be made",id:"charge_on_demand_modal.payment_failed.subtitle"}):i.value==="FAILED"?a({defaultMessage:"We couldn't complete your order. Check your invoice list before trying again.",description:"Subtitle of the on-demand order modal when the order failed and it is unknown whether it went through",id:"charge_on_demand_modal.failed.subtitle"}):n.value?a({defaultMessage:"Add a payment method to pay for this order.",description:"Subtitle of the on-demand order modal while the customer is adding a payment method",id:"charge_on_demand_modal.add_payment_method.subtitle"}):void 0),ce=e.computed(()=>n.value?a({defaultMessage:"Back",description:"Leaves the add payment method step of the on-demand order modal for the order",id:"charge_on_demand_modal.back_button.label"}):a({defaultMessage:"Cancel",description:"Closes the modal for ordering on-demand items",id:"charge_on_demand_modal.cancel_button.label"})),x=e.computed(()=>L.value?a({defaultMessage:"Done",description:"Closes the on-demand order modal once the order is placed",id:"charge_on_demand_modal.done_button.label"}):se.value?a({defaultMessage:"Close",description:"Closes the on-demand order modal when the order did not go through",id:"charge_on_demand_modal.close_button.label"}):n.value?a({defaultMessage:"Save payment method",description:"Confirm button of the on-demand order modal while the customer is adding a payment method",id:"charge_on_demand_modal.save_payment_method.label"}):c.value.length===0?a({defaultMessage:"Add an item to continue",description:"Disabled pay button of the on-demand order while no item is added",id:"charge_on_demand_modal.confirm_button.no_items"}):$.value?a({defaultMessage:"Check the quantities to continue",description:"Disabled pay button of the on-demand order while an item has a quantity that cannot be ordered",id:"charge_on_demand_modal.confirm_button.invalid_units"}):z.value?a({defaultMessage:"Calculate total again",description:"Pay button of the on-demand order when its total failed to load",id:"charge_on_demand_modal.confirm_button.retry_preview"}):!Y.value||O.value?a({defaultMessage:"Updating total…",description:"Disabled pay button of the on-demand order while its total is calculated",id:"charge_on_demand_modal.confirm_button.updating"}):a({defaultMessage:"Pay {total}",description:"Pay button of the on-demand order, with the total it charges",id:"charge_on_demand_modal.confirm_button.pay"},{total:Ae.formatAmount(Y.value)})),De=async()=>{const d=oe.value;if(!le.value||!d||!v.value)return;const r=await be({pricingItems:d,paymentMethodId:v.value});"invoice"in r?(p("invoice-created",r.invoice),i.value="PLACED"):et(r.error)||(i.value=r.error)},H=()=>{if(n.value){S();return}if(z.value){ye();return}De()},G=()=>{p("close")},W=e.computed(()=>L.value&&!R.value&&o.canViewCreatedInvoice),j=e.computed(()=>i.value==="PAYMENT_FAILED"&&!!U.value&&o.canViewCreatedInvoice),K=e.computed(()=>a({defaultMessage:"Go to invoice",description:"Opens the invoice of the on-demand order the customer just placed",id:"charge_on_demand_modal.view_invoice_button.label"})),X=()=>{var r;const d=((r=B.value)==null?void 0:r.id)??U.value;G(),d&&p("view-invoice",d)},J=()=>{if(!(u.value||E.value)){if(L.value){G();return}if(n.value){M();return}p("close")}};return e.watch(()=>o.showModal,d=>{d&&(i.value="ORDER",c.value=[],l.value=void 0,we(),b.value=void 0)}),(d,r)=>(e.openBlock(),e.createBlock(F._sfc_main$1,{ref_key:"addPaymentMethodRef",ref:w,class:"sv-charge-on-demand-modal","show-modal":t.showModal,title:Me.value,"sub-title":Ne.value,"cancel-button-text":ce.value,"confirm-button-text":x.value,"is-pending":e.unref(u)||e.unref(E),panes:e.unref(Je),step:i.value,"add-payment-method-pane":"ADD_PAYMENT_METHOD",customer:t.customer,"payment-method-options":fe.value,"is-payment-method-options-pending":e.unref(N),"is-adding-payment-method":e.unref(n),onConfirm:H,onCancel:J,onPaymentSuccess:ge,onPaymentFailed:r[2]||(r[2]=f=>d.$emit("payment-failed",f))},{ORDER:e.withCtx(()=>[I.value?(e.openBlock(),e.createBlock(e.unref(Xe),{key:0,selection:c.value,"onUpdate:selection":r[0]||(r[0]=f=>c.value=f),"payment-method-id":v.value,"onUpdate:paymentMethodId":r[1]||(r[1]=f=>v.value=f),class:"sv-charge-on-demand-modal__form",items:t.items,preview:e.unref(de),"is-preview-loading":e.unref(O),"payment-methods":k.value,errors:Ee.value,disabled:e.unref(E),"can-add-payment-method":"",onAddPaymentMethod:_e},null,8,["selection","payment-method-id","items","preview","is-preview-loading","payment-methods","errors","disabled"])):(e.openBlock(),e.createBlock(ee._sfc_main,{key:1,class:"sv-charge-on-demand-modal__unavailable",icon:"credit_card_off"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Ordering isn't available",description:"Title shown instead of the on-demand order form when the subscription cannot take payments",id:"charge_on_demand_modal.unavailable.title"})),1)]),message:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"This subscription can't take payments here. Contact us to order these items.",description:"Message shown instead of the on-demand order form when the subscription cannot take payments",id:"charge_on_demand_modal.unavailable.message"})),1)]),_:1}))]),PLACED:e.withCtx(()=>[e.unref(B)?(e.openBlock(),e.createBlock(e.unref(Oe._sfc_main),{key:0,class:"sv-charge-on-demand-modal__receipt","content-background":"none"},{default:e.withCtx(()=>[e.createVNode(e.unref(ee._sfc_main$1),{invoice:e.unref(B),"is-customer-facing":"","is-paid":R.value},null,8,["invoice","is-paid"])]),_:1})):e.createCommentVNode("",!0)]),footer:e.withCtx(()=>[L.value?(e.openBlock(),e.createElementBlock("div",at,[W.value?(e.openBlock(),e.createBlock(e.unref(y._sfc_main),{key:0,size:"lg",class:"sv-action sv-action--primary",onClick:X},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(K.value),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(y._sfc_main),{size:"lg",intent:W.value?"subtle":"primary",class:e.normalizeClass(["sv-action",W.value?"sv-action--secondary":"sv-action--primary"]),onClick:G},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.value),1)]),_:1},8,["intent","class"]),R.value&&t.canViewCreatedInvoice?(e.openBlock(),e.createBlock(e.unref(y._sfc_main),{key:1,size:"lg",intent:"subtle",class:"sv-action sv-action--secondary",onClick:X},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(K.value),1)]),_:1})):e.createCommentVNode("",!0)])):se.value?(e.openBlock(),e.createElementBlock("div",nt,[j.value?(e.openBlock(),e.createBlock(e.unref(y._sfc_main),{key:0,size:"lg",class:"sv-action sv-action--primary",onClick:X},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(K.value),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(y._sfc_main),{size:"lg",intent:j.value?"subtle":"primary",class:e.normalizeClass(["sv-action",j.value?"sv-action--secondary":"sv-action--primary"]),onClick:J},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.value),1)]),_:1},8,["intent","class"])])):(e.openBlock(),e.createElementBlock("div",ot,[e.unref(n)?(e.openBlock(),e.createBlock(e.unref(y._sfc_main),{key:0,size:"lg",class:"sv-action sv-action--primary",loading:e.unref(u),onClick:H},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.value),1)]),_:1},8,["loading"])):I.value?(e.openBlock(),e.createBlock(e.unref(y._sfc_main),{key:1,size:"lg",class:"sv-action sv-action--primary",disabled:!le.value&&!z.value,loading:e.unref(E),onClick:H},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.value),1)]),_:1},8,["disabled","loading"])):e.createCommentVNode("",!0),e.createVNode(e.unref(y._sfc_main),{size:"lg",intent:"subtle",class:"sv-action sv-action--secondary",disabled:e.unref(E),onClick:J},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(ce.value),1)]),_:1},8,["disabled"])]))]),_:1},8,["show-modal","title","sub-title","cancel-button-text","confirm-button-text","is-pending","panes","step","customer","payment-method-options","is-payment-method-options-pending","is-adding-payment-method"]))}});exports.default=dt;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("vue"),w=require("./customElements-DUMRMFQ5.js"),Pt=require("./useTimePeriod.es-rzxqUCTu.js"),oe=require("./formatting.es-C72Nsrmh.js"),ie=require("./Button.vue.es-BzkuglKw.js"),yt=require("./ErrorNotification.vue.es-tS9vySUZ.js"),sn=require("./countryData.es-C4jHBzfo.js"),cn=require("./subscriptions-DwVsf4Ev.js"),be=require("./error-CmduqgVq.js"),Dt=require("./TrialChip.vue.es-CLQZ5F0n.js"),Tt=require("./useService-H7BjLg8P.js"),un=require("./invoices-CKQBLar2.js"),ue=require("./pricingPlanSchedule-BM8vsKkV.js"),F=require("./formControl-ODrpUvcA.js"),Te=require("./useCustomerFormLabels-DV9QiMYh.js"),dn=require("./useWatchDebounced-B8iX7ykx.js"),pn=require("./usePaymentMethodOptions-CuzOoi2k.js"),Ee=require("./subscription-ZA62t4E9.js"),Be=require("./pricing-BOqG21f9.js"),de=require("./useExperimentalFeature-CGIkgFR4.js"),ye=require("./url-vloPOiXd.js"),mn=require("./usePortal-C27omjhz.js"),gn=require("./getCountryNameByCode.es-Xxc0nZsH.js"),vt=require("./Expand.vue.es-BtM0EZEr.js"),ce=require("./Input.vue.es-B60eK8Ds.js"),ne=require("./Section.vue.es-Bbt0RITt.js"),fn=require("./Alert.vue.es-RyK53a2P.js"),yn=require("./customer-CisTPaXj.js"),Me=require("./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CQ0KrXHJ.js"),$e=require("./TooltipParagraph.vue.es-DvC5Wjaz.js"),vn=require("./PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-B9R5JRJv.js"),Fe=require("./Amount.vue.es-DExaYBqm.js"),_t=require("./Chip.vue.es-B2jjzIOc.js"),_n=require("./Divider.vue.es-UwnWvUTl.js"),wt=require("./SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Dl7MbMlk.js"),hn=require("./SubscriptionSummary.vue_vue_type_script_setup_true_lang-CYyP4ra9.js"),bn=require("./getComposedString.es-haS4bAj7.js"),St=require("./useViewport-hPRVDWCm.js"),pe=require("./Skeleton.vue_vue_type_script_setup_true_lang-otI7Hz2w.js"),Mn=require("./DividerText.vue.es-CoyDk9eH.js"),Le=require("./adyenSdk-BP2XXzeJ.js"),Nn=require("./payments-CS7_YcOW.js"),In=require("./paymentFailure-Cki8c5BX.js"),Cn=require("./ContentWithAsideLayout-RSdKXqAf.js"),En=require("./cn.es-C9Yqq4tg.js"),xn=require("./sessionReference-m_6Rp4X1.js"),An={AT:"Austria",BE:"Belgium",BG:"Bulgaria",CY:"Cyprus",CZ:"Czech Republic",DE:"Germany",DK:"Denmark",EE:"Estonia",ES:"Spain",FI:"Finland",FR:"France",GR:"Greece",HR:"Croatia",HU:"Hungary",IE:"Ireland",IT:"Italy",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",MT:"Malta",NL:"Netherlands",PL:"Poland",PT:"Portugal",RO:"Romania",SE:"Sweden",SI:"Slovenia",SK:"Slovakia"};function Bt(t){return Object.keys(An).includes(t)}function ht(t,n){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),o.push.apply(o,i)}return o}function xe(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?arguments[n]:{};n%2?ht(Object(o),!0).forEach(function(i){kn(t,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ht(Object(o)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(o,i))})}return t}function kn(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}function Se(t){return typeof t=="function"}function Ye(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function Oe(t){return Se(t.$validator)?xe({},t):{$validator:t}}function Lt(t){return typeof t=="object"?t.$valid:t}function Ot(t){return t.$validator||t}function Pn(t,n){if(!Ye(t))throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof t}`);if(!Ye(n)&&!Se(n))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const o=Oe(n);return o.$params=xe(xe({},o.$params||{}),t),o}function Dn(t,n){if(!Se(t)&&typeof e.unref(t)!="string")throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof t}`);if(!Ye(n)&&!Se(n))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const o=Oe(n);return o.$message=t,o}function Tn(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const o=Oe(t);return xe(xe({},o),{},{$async:!0,$watchTargets:n})}function wn(t){return{$validator(n){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return e.unref(n).reduce((r,u,l)=>{const d=Object.entries(u).reduce((p,s)=>{let[f,E]=s;const b=t[f]||{},D=Object.entries(b).reduce((C,A)=>{let[V,T]=A;const k=Ot(T).call(this,E,u,l,...i),h=Lt(k);if(C.$data[V]=k,C.$data.$invalid=!h||!!C.$data.$invalid,C.$data.$error=C.$data.$invalid,!h){let v=T.$message||"";const M=T.$params||{};typeof v=="function"&&(v=v({$pending:!1,$invalid:!h,$params:M,$model:E,$response:k})),C.$errors.push({$property:f,$message:v,$params:M,$response:k,$model:E,$pending:!1,$validator:V})}return{$valid:C.$valid&&h,$data:C.$data,$errors:C.$errors}},{$valid:!0,$data:{},$errors:[]});return p.$data[f]=D.$data,p.$errors[f]=D.$errors,{$valid:p.$valid&&D.$valid,$data:p.$data,$errors:p.$errors}},{$valid:!0,$data:{},$errors:{}});return{$valid:r.$valid&&d.$valid,$data:r.$data.concat(d.$data),$errors:r.$errors.concat(d.$errors)}},{$valid:!0,$data:[],$errors:[]})},$message:n=>{let{$response:o}=n;return o?o.$errors.map(i=>Object.values(i).map(a=>a.map(r=>r.$message)).reduce((a,r)=>a.concat(r),[])):[]}}}const Vt=t=>{if(t=e.unref(t),Array.isArray(t))return!!t.length;if(t==null)return!1;if(t===!1)return!0;if(t instanceof Date)return!isNaN(t.getTime());if(typeof t=="object"){for(let n in t)return!0;return!1}return!!String(t).length},Sn=t=>(t=e.unref(t),Array.isArray(t)?t.length:typeof t=="object"?Object.keys(t).length:String(t).length);function me(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return i=>(i=e.unref(i),!Vt(i)||n.every(a=>(a.lastIndex=0,a.test(i))))}var Bn=Object.freeze({__proto__:null,forEach:wn,len:Sn,normalizeValidatorObject:Oe,regex:me,req:Vt,unwrap:e.unref,unwrapNormalizedValidator:Ot,unwrapValidatorResponse:Lt,withAsync:Tn,withMessage:Dn,withParams:Pn});me(/^[a-zA-Z]*$/);me(/^[a-zA-Z0-9]*$/);me(/^\d*(\.\d+)?$/);const Ln=/^(?:[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;me(Ln);const On=/^(?:(?:(?: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;me(On);me(/(^[0-9]*$)|(^-[0-9]+$)/);me(/^[-]?\d*(\.\d+)?$/);function Ve(t){return!!sn.countryData.find(n=>n.key===t)}const Rt={AT:{regex:/^ATU\d{8}$/,prefix:"AT",example:"ATU12345678"},BE:{regex:/^BE0?\d{9}$/,prefix:"BE",example:"BE0123456789"},BG:{regex:/^BG\d{9,10}$/,prefix:"BG",example:"BG123456789"},HR:{regex:/^HR\d{11}$/,prefix:"HR",example:"HR12345678901"},CY:{regex:/^CY\d{8}[A-Z]$/,prefix:"CY",example:"CY12345678X"},CZ:{regex:/^CZ\d{8,10}$/,prefix:"CZ",example:"CZ12345678"},DE:{regex:/^DE\d{9}$/,prefix:"DE",example:"DE123456789"},DK:{regex:/^DK\d{8}$/,prefix:"DK",example:"DK12345678"},EE:{regex:/^EE\d{9}$/,prefix:"EE",example:"EE123456789"},GR:{regex:/^(EL|GR)\d{9}$/,prefix:"GR",example:"GR123456789"},ES:{regex:/^ES[A-Z0-9]\d{7}[A-Z0-9]$/,prefix:"ES",example:"ESX1234567X"},FI:{regex:/^FI\d{8}$/,prefix:"FI",example:"FI12345678"},FR:{regex:/^FR[0-9A-Z]{2}\d{9}$/,prefix:"FR",example:"FRXX123456789"},HU:{regex:/^HU\d{8}$/,prefix:"HU",example:"HU12345678"},IE:{regex:/^IE[0-9A-Z]{8,9}$/,prefix:"IE",example:"IE1234567A"},IS:{regex:/^IS\d{5}$/,prefix:"IS",example:"IS12345"},IT:{regex:/^IT\d{11}$/,prefix:"IT",example:"IT12345678901"},LT:{regex:/^LT(\d{9}|\d{12})$/,prefix:"LT",example:"LT123456789 or LT123456789012"},LU:{regex:/^LU\d{8}$/,prefix:"LU",example:"LU12345678"},LV:{regex:/^LV\d{11}$/,prefix:"LV",example:"LV12345678901"},ME:{regex:/^ME\d{9}$/,prefix:"ME",example:"ME123456789"},MT:{regex:/^MT\d{8}$/,prefix:"MT",example:"MT12345678"},NL:{regex:/^NL\d{9}B\d{2}$/,prefix:"NL",example:"NL123456789B01"},PL:{regex:/^PL\d{10}$/,prefix:"PL",example:"PL1234567890"},PT:{regex:/^PT\d{9}$/,prefix:"PT",example:"PT123456789"},RO:{regex:/^RO\d{2,10}$/,prefix:"RO",example:"RO1234567890"},RU:{regex:/^RU(\d{9}|\d{10}|\d{12})$/,prefix:"RU",example:"RU123456789 or RU1234567890 or RU123456789012"},SE:{regex:/^SE\d{10}01$/,prefix:"SE",example:"SE123456789001"},SI:{regex:/^SI\d{8}$/,prefix:"SI",example:"SI12345678"},SK:{regex:/^SK\d{10}$/,prefix:"SK",example:"SK1234567890"},CH:{regex:/^CHE\d{9}(MWST|TVA|IVA)?$/,prefix:"CHE",example:"CHE123456789MWST"},NO:{regex:/^NO\d{9}MVA$/,prefix:"NO",example:"NO123456789MVA"},GB:{regex:/^GB(\d{9}|\d{12}|GD\d{3}|HA\d{3})$/,prefix:"GB",example:"GB123456789"},XI:{regex:/^XI(\d{9}|\d{12})$/,prefix:"XI",example:"XI123456789"}},Vn=t=>!t||typeof t!="string"||t.trim()===""?!0:Object.values(Rt).some(n=>n.regex.test(t)),Rn=({$model:t})=>{if(!t||typeof t!="string"||t.trim()==="")return"";const n=e.inject(w.I18N_INJECTION_KEY,null);if(!n)return"Invalid tax ID";const{formatMessage:o}=n,i=Object.values(Rt).find(a=>t.toUpperCase().startsWith(a.prefix.toUpperCase()));return i?o({defaultMessage:"Invalid tax ID format. Example: {example}",id:"form_validation.tax_id.invalid_format",description:"Error message when tax ID format is invalid but prefix matches"},{example:i.example}):o({defaultMessage:"Invalid tax ID",id:"taxId.invalid",description:"Error message when tax ID is invalid"})},qe=Bn.withMessage(Rn,Vn),zn="preview",jn="NL",zt=t=>{var n,o;if("organization"in t)return(n=t.organization)==null?void 0:n.registered_address;if("individual"in t)return(o=t.individual)==null?void 0:o.residential_address},Un=t=>{const n=zt(t);return{...(n==null?void 0:n.line1)&&{line1:n.line1},...(n==null?void 0:n.line2)&&{line2:n.line2},...(n==null?void 0:n.city)&&{city:n.city},...(n==null?void 0:n.state)&&{state:n.state},country:(n==null?void 0:n.country)||jn,...(n==null?void 0:n.postal_code)&&{postal_code:n.postal_code}}},$n=t=>{var i,a;const n=Un(t),o=t.type??"INDIVIDUAL";if(o==="ORGANIZATION"){const r="organization"in t?t.organization:void 0,u=(a=(i=r==null?void 0:r.tax_ids)==null?void 0:i[0])==null?void 0:a.id;return{type:o,organization:{legal_name:(r==null?void 0:r.legal_name)||zn,registered_address:n,...u&&{tax_id:qe.$validator(u,{},{})?u:void 0}}}}return{type:o,individual:{residential_address:n}}},Fn={AD:"EUR",AE:"AED",AF:"AFN",AG:"XCD",AI:"XCD",AL:"ALL",AM:"AMD",AO:"AOA",AR:"ARS",AS:"USD",AT:"EUR",AU:"AUD",AW:"AWG",AX:"EUR",AZ:"AZN",BA:"BAM",BB:"BBD",BD:"BDT",BE:"EUR",BF:"XOF",BG:"BGN",BH:"BHD",BI:"BIF",BJ:"XOF",BL:"EUR",BM:"BMD",BN:"BND",BO:"BOB",BQ:"USD",BR:"BRL",BS:"BSD",BT:"BTN",BV:"NOK",BW:"BWP",BY:"BYN",BZ:"BZD",CA:"CAD",CC:"AUD",CD:"CDF",CF:"XAF",CG:"XAF",CH:"CHF",CI:"XOF",CK:"NZD",CL:"CLP",CM:"XAF",CN:"CNY",CO:"COP",CR:"CRC",CU:"CUP",CV:"CVE",CW:"ANG",CX:"AUD",CY:"EUR",CZ:"CZK",DE:"EUR",DJ:"DJF",DK:"DKK",DM:"XCD",DO:"DOP",DZ:"DZD",EC:"USD",EE:"EUR",EG:"EGP",EH:"MAD",ER:"ERN",ES:"EUR",ET:"ETB",FI:"EUR",FJ:"FJD",FK:"FKP",FM:"USD",FO:"DKK",FR:"EUR",GA:"XAF",GB:"GBP",GD:"XCD",GE:"GEL",GF:"EUR",GG:"GBP",GH:"GHS",GI:"GIP",GL:"DKK",GM:"GMD",GN:"GNF",GP:"EUR",GQ:"XAF",GR:"EUR",GS:"GBP",GT:"GTQ",GU:"USD",GW:"XOF",GY:"GYD",HK:"HKD",HM:"AUD",HN:"HNL",HR:"EUR",HT:"HTG",HU:"HUF",ID:"IDR",IE:"EUR",IL:"ILS",IM:"GBP",IN:"INR",IO:"USD",IQ:"IQD",IR:"IRR",IS:"ISK",IT:"EUR",JE:"GBP",JM:"JMD",JO:"JOD",JP:"JPY",KE:"KES",KG:"KGS",KH:"KHR",KI:"AUD",KM:"KMF",KN:"XCD",KP:"KPW",KR:"KRW",KW:"KWD",KY:"KYD",KZ:"KZT",LA:"LAK",LB:"LBP",LC:"XCD",LI:"CHF",LK:"LKR",LR:"LRD",LS:"LSL",LT:"EUR",LU:"EUR",LV:"EUR",LY:"LYD",MA:"MAD",MC:"EUR",MD:"MDL",ME:"EUR",MF:"EUR",MG:"MGA",MH:"USD",MK:"MKD",ML:"XOF",MM:"MMK",MN:"MNT",MO:"MOP",MP:"USD",MQ:"EUR",MR:"MRU",MS:"XCD",MT:"EUR",MU:"MUR",MV:"MVR",MW:"MWK",MX:"MXN",MY:"MYR",MZ:"MZN",NA:"NAD",NC:"XPF",NE:"XOF",NF:"AUD",NG:"NGN",NI:"NIO",NL:"EUR",NO:"NOK",NP:"NPR",NR:"AUD",NU:"NZD",NZ:"NZD",OM:"OMR",PA:"PAB",PE:"PEN",PF:"XPF",PG:"PGK",PH:"PHP",PK:"PKR",PL:"PLN",PM:"EUR",PN:"NZD",PR:"USD",PS:"ILS",PT:"EUR",PW:"USD",PY:"PYG",QA:"QAR",RE:"EUR",RO:"RON",RS:"RSD",RU:"RUB",RW:"RWF",SA:"SAR",SB:"SBD",SC:"SCR",SD:"SDG",SE:"SEK",SG:"SGD",SH:"SHP",SI:"EUR",SJ:"NOK",SK:"EUR",SL:"SLE",SM:"EUR",SN:"XOF",SO:"SOS",SR:"SRD",SS:"SSP",ST:"STN",SV:"USD",SX:"ANG",SY:"SYP",SZ:"SZL",TC:"USD",TD:"XAF",TF:"EUR",TG:"XOF",TH:"THB",TJ:"TJS",TK:"NZD",TL:"USD",TM:"TMT",TN:"TND",TO:"TOP",TR:"TRY",TT:"TTD",TV:"AUD",TW:"TWD",TZ:"TZS",UA:"UAH",UG:"UGX",US:"USD",UY:"UYU",UZ:"UZS",VA:"EUR",VC:"XCD",VE:"VES",VG:"USD",VI:"USD",VN:"VND",VU:"VUV",WF:"XPF",WS:"WST",YE:"YER",YT:"EUR",ZA:"ZAR",ZM:"ZMW",ZW:"ZWL"},Gn=t=>{if(t)return Fn[t]},jt=({country:t,pricingCurrencySettings:n,fallbackCurrency:o})=>{const i=Gn(t),a=(n==null?void 0:n.pricing_currencies)??[];return i&&a.includes(i)?i:(n==null?void 0:n.default_pricing_currency)??o??i},Yn=()=>{const{getInvoicePreview:t}=un.createInvoicesService(),n=w.useLogger(),o=e.ref(),i=e.ref(),a=e.ref(),r=e.ref({}),u=e.ref(be.ApiStatus.Initial),l=e.ref({}),d=e.ref(),p=f=>`${f.type}:${f.value}`;return{loadInvoicePreview:async({subscription:f,subscriptionStartAt:E,customer:b={},seatsValues:D,unitsValues:C,enabledPricingIds:A,promotionCode:V})=>{var Z,m,c,I,y,N;const T=$n(b);u.value=be.ApiStatus.Loading;const x=ue.getFirstPricingPlanScheduleOfType({pricingPlanScheduleInfos:f.pricing_plan_schedule_infos,type:"DEFAULT"}),k=(Z=x==null?void 0:x.pricing_plan_version)==null?void 0:Z.pricing_currency_settings,h=(((m=k==null?void 0:k.pricing_currencies)==null?void 0:m.length)??0)>1,v=((I=(c=x==null?void 0:x.pricing_plan_version)==null?void 0:c.billing_period_settings)==null?void 0:I.billing_periods)??[],M=v.length>1,S=v.length>0?v.map(({period:B})=>B):f.billing_period?[f.billing_period]:[],$=jt({country:(y=zt(b))==null?void 0:y.country,pricingCurrencySettings:k,fallbackCurrency:f.billing_currency});if(!S.length){n.warn("INVOICE_PREVIEW_SKIPPED","No billing period to preview an invoice for",{subscriptionId:f.id}),u.value=be.ApiStatus.Done;return}const _=f.billing_period?p(f.billing_period):p(S[0]),P=S.map(async B=>{var W;const z=p(B),R=ue.getScheduleCustomizations({enabledPricings:A==null?void 0:A.map(H=>({pricing_id:H})),seatsValues:D,unitsValues:C,pricingPlanScheduleInfos:f.pricing_plan_schedule_infos,pricingCurrency:h?$:void 0,billingPeriod:M?B:void 0})??[];if(V){const H=(W=f.pricing_plan_schedule_infos.find(({pricing_plan_schedule:j})=>j.type==="DEFAULT"))==null?void 0:W.id;if(H){const j=R.find(({pricing_plan_schedule_id:X})=>X===H);j?j.promotion_codes=[V]:R.push({pricing_plan_schedule_id:H,promotion_codes:[V]})}}const Y={pricingPlanSubscriptionId:f.id,startAt:E,customizations:R,customer:T},K=l.value[z];if(K&&Tt.isEqual(Y,K))return{periodKey:z,response:void 0};l.value={...l.value,[z]:Y};const Q=await t(Y);return{periodKey:z,response:Q}});try{const B={...r.value},z=await Promise.all(P),R=f.pricing_plan_schedule_infos.find(({pricing_plan_schedule:K})=>K.type==="TRIAL"),Y=(N=f.pricing_plan_schedule_infos.find(({pricing_plan_schedule:K})=>K.type==="DEFAULT"))==null?void 0:N.id;z.forEach(({periodKey:K,response:Q})=>{var j;if(!Q)return;d.value=(j=Q.invoice_infos.at(-1))==null?void 0:j.pricing_plan_schedule_id,R&&(i.value=Q.first_invoice,R.start_at&&R.end_at&&(o.value=Dt.convertDateRangeToTimePeriod(new Date(R.start_at),new Date(R.end_at))));const W=Q.invoice_infos.find(({pricing_plan_schedule_id:X})=>X===Y),H=W==null?void 0:W.invoices[0];H&&(B[K]=H)}),r.value=B,a.value=B[_]}catch(B){throw u.value=be.ApiStatus.Failed,n.error("INVOICE_PREVIEW_FAILED","Failed to load the invoice preview",{preview:"CHECKOUT"},B),B}finally{u.value=be.ApiStatus.Done}},invoicePreview:a,invoicePreviewByBillingPeriod:r,trialInvoicePreview:i,trialPeriod:o,lastPreviewScheduleId:d,isPending:e.computed(()=>u.value===be.ApiStatus.Loading)}},bt=["email","country"],Ut="GENERIC_TAX_ID",Mt={US:["addressLine1","postalCode"],CA:["state"]},Kn=t=>!t||!Mt[t]?bt:[...Mt[t],...bt],Nt=t=>{const n={...t.addressLine1&&{line1:t.addressLine1},...t.addressLine2&&{line2:t.addressLine2},...t.city&&{city:t.city},...t.state&&{state:t.state},...t.postalCode&&{postal_code:t.postalCode},country:t.country??""};return t.type==="ORGANIZATION"?{type:"ORGANIZATION",organization:{legal_name:t.companyLegalName??"",registered_address:n,...t.companyVatNumber&&{tax_ids:[{id:t.companyVatNumber,type:Ut}]}}}:{type:"INDIVIDUAL",individual:{residential_address:n}}};function qn(){return{getGeoLocation(){return fetch("https://api.country.is/").then(t=>t.json())}}}function Hn({initialState:t,onRequiredFieldChange:n}){const o=e.ref(we(t)),i=e.ref(we(t)),a=s=>{const f=we({...e.toRaw(o.value),...s});o.value=f,i.value=structuredClone(f)},r=e.computed(()=>Kn(o.value.country)),u=s=>r.value.includes(s),l=F.useValidation({email:{required:F.required,email:F.email},country:{required:F.required},state:{required:F.requiredIf(()=>u("state"))},addressLine1:{required:F.requiredIf(()=>u("addressLine1"))},postalCode:{required:F.requiredIf(()=>u("postalCode"))},companyLegalName:F.requiredIf(o.value.type==="ORGANIZATION"),companyVatNumber:{taxId:qe}},o),d=s=>{s||qn().getGeoLocation().then(({country:f})=>{o.value.country=f})},p=(s,f)=>{const E=Te.objectDiff({from:f,to:s}),b=Object.keys(E).find(Qn);if(b){if(["type","companyVatNumber"].includes(b)){n(s);return}if(b==="seatsValues"){n(s);return}if(b==="unitsValues"){n(s);return}if(b==="enabledPricingIds"){n(s);return}if(b!=="email"&&u(b)){n(s);return}}};return e.onMounted(async()=>{await d(t==null?void 0:t.country)}),dn.useWatchDebounced(()=>JSON.parse(JSON.stringify(o.value)),p,{debounce:200}),{form:o,validation:l,getIsFieldRequired:u,updateInitialState:a,initialState:i}}const we=(t={})=>({email:void 0,country:void 0,type:"INDIVIDUAL",companyLegalName:void 0,firstName:void 0,infix:void 0,lastName:void 0,addressLine1:void 0,addressLine2:void 0,postalCode:void 0,city:void 0,state:void 0,companyVatNumber:void 0,seatsValues:void 0,unitsValues:void 0,enabledPricingIds:void 0,...t});function Qn(t){return t in we()}function Zn(t,n=void 0){const o=n??[],i=Ee.getPricingGroupsFromExtendedPricingPlanSubscription(t);for(const a of i)if(["EXACTLY_ONE","AT_LEAST_ONE"].includes(a.selection_constraint)){const r=a.pricings.map(u=>u.id);if(n!=null&&n.some(u=>r.includes(u)))continue;o.push(a.pricings[0].id)}return o}function Xn(t){return Ee.getPricingGroupsFromExtendedPricingPlanSubscription(t).some(o=>o.selection_constraint==="EXACTLY_ONE"||o.selection_constraint==="AT_LEAST_ONE")}function Wn(t){const n=Be.getAllPricingsFromScheduleInfos(t.pricing_plan_schedule_infos),o=Ee.getPricingGroupsFromExtendedPricingPlanSubscription(t);return n.some(i=>i.product_type==="ADDON")||o.some(i=>i.object_type==="ADDON")}const Jn=t=>{var n;return((n=t.periods)==null?void 0:n.some(o=>{var i;return(i=o.groups)==null?void 0:i.some(a=>{var r;return(r=a.lines)==null?void 0:r.some(u=>u.product_items.some(l=>l.model_type==="USAGE_BASED"))})}))??!1},$t={PRICING:"RECURRING",REVENUE:"RECURRING",COMMITMENT:"RECURRING",ONE_OFF:"ONE_OFF",DISCOUNT:"UNATTRIBUTED",MARKUP:"UNATTRIBUTED",DEDUCTION:"UNATTRIBUTED"},Ft=t=>{var o;if(t.type==="ONE_OFF")return"ONE_OFF";const n=((o=t.product_items)==null?void 0:o.map(({model_type:i})=>i))??[];if(n.length)return n.every(i=>i==="ONE_OFF")?"ONE_OFF":"RECURRING"};function eo(t){var o;const n={RECURRING:[],ONE_OFF:[],UNATTRIBUTED:[]};return(o=t.periods)==null||o.forEach(i=>{var a;(a=i.groups)==null||a.forEach(r=>{var d;const u=$t[r.type]??"UNATTRIBUTED",l=new Set(u==="RECURRING"&&((d=r.lines)!=null&&d.length)?r.lines.map(p=>Ft(p)??"RECURRING"):[u]);n[l.size===1?[...l][0]:"UNATTRIBUTED"].push(r)})}),{recurring:n.RECURRING,oneOff:n.ONE_OFF,other:n.UNATTRIBUTED}}function Gt(t){var d;const n=t.billing_currency,o={RECURRING:{excludingTax:[],includingTax:[]},ONE_OFF:{excludingTax:[],includingTax:[]},UNATTRIBUTED:{excludingTax:[],includingTax:[]}},i=(p,s)=>{const f=o[p];s.amount_excluding_tax&&f.excludingTax.push(s.amount_excluding_tax),s.amount_including_tax&&f.includingTax.push(s.amount_including_tax)};(d=t.periods)==null||d.forEach(p=>{var s;(s=p.groups)==null||s.forEach(f=>{var b;const E=$t[f.type]??"UNATTRIBUTED";if(!((b=f.lines)!=null&&b.length)){i(E,f);return}f.lines.forEach(D=>i(E==="RECURRING"?Ft(D)??E:E,D))})});const a=p=>({excludingTax:de.sumAmounts(o[p].excludingTax,n),includingTax:de.sumAmounts(o[p].includingTax,n)}),r=p=>Number(p.excludingTax.quantity)===0&&Number(p.includingTax.quantity)===0,u=a("ONE_OFF"),l=a("UNATTRIBUTED");return{recurring:a("RECURRING"),oneOff:u,unattributed:l,hasOneOff:!r(u),hasUnattributed:!r(l)}}const It=t=>(t??[]).flatMap(n=>n.configs??[]),Yt=t=>[...t.configs??[],...It(t.billing_period_configs),...(t.pricing_currency_configs??[]).flatMap(n=>[...n.configs??[],...It(n.billing_period_configs)])];function to({pricings:t,pricingItemConfigId:n}){var r,u;const o=t.flatMap(l=>l.items??[]).find(l=>{var d;return(d=l.configs)==null?void 0:d.some(p=>p.id===n)}),i=(r=o==null?void 0:o.configs)==null?void 0:r.find(l=>l.id===n),a=(u=o==null?void 0:o.product_items)==null?void 0:u[0];return{config:i,productItem:a}}const Kt="1";function no(t){const n=Be.getPricingsFromScheduleInfo(t).flatMap(o=>o.items??[]).flatMap(Yt);return new Map(n.flatMap(o=>{var i;return(i=o.default_seats_value)!=null&&i.number?[[o.id,o.default_seats_value.number]]:[]}))}function oo(t){var i;const n=(i=t==null?void 0:t.pricing_plan_schedule)==null?void 0:i.seats_values;if(!t||!(n!=null&&n.length))return;const o=t.pricing_plan_version?no(t):new Map;return n.map(({pricing_item_config_id:a,number:r})=>({pricing_item_config_id:a,number:r||o.get(a)||Kt}))}const qt="1";function ao(t){const n=Be.getPricingsFromScheduleInfo(t).flatMap(o=>o.items??[]).flatMap(Yt);return new Map(n.flatMap(o=>{var i;return(i=o.default_units)!=null&&i.number?[[o.id,o.default_units.number]]:[]}))}function io(t){var i;const n=(i=t==null?void 0:t.pricing_plan_schedule)==null?void 0:i.units;if(!t||!(n!=null&&n.length))return;const o=t.pricing_plan_version?ao(t):new Map;return n.map(({pricing_item_config_id:a,number:r})=>({pricing_item_config_id:a,number:r||o.get(a)||qt}))}const Ge="solvimon_checkout_redirect_state";function ro({initialCountry:t,initialEmail:n,subscriptionId:o,enabledPricingIds:i}){const a=w.useLogger(),r=(()=>{if(t){if(Ve(t))return t;a.error("INVALID_COUNTRY_CODE",`invalid country code provided: "${t}"`)}})(),u=(()=>{if(n){if(/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n))return n;a.error("INVALID_EMAIL",`invalid email provided: "${n}"`)}})(),l=e.ref(!1),d=e.ref(),{getSubscription:p}=cn.createSubscriptionsService(),s=Yn(),f=e.computed(()=>d.value&&h.form.value.country&&S.value),{paymentMethodOptions:E,get:b,isPending:D,error:C}=pn.usePaymentMethodOptions(),A=async(m,c)=>{try{await b({subscriptionId:d.value.id,country:m,amount:c})}catch{a.error("PAYMENT_METHOD_OPTIONS_LOAD_FAILED","Failed to load the payment methods that can be offered",{flow:"CHECKOUT"},C.value)}},V=e.computed(()=>C.value!==null),T=()=>{const{country:m}=h.form.value;!d.value||!m||!S.value||A(m,S.value)},x=()=>{const m=h.form.value;return s.loadInvoicePreview({subscription:d.value,customer:Nt(m),seatsValues:m.seatsValues,unitsValues:m.unitsValues,enabledPricingIds:m.enabledPricingIds??i,promotionCode:m.promotionCode})},k=async m=>{const c=m.promotionCode??h.form.value.promotionCode,I=m.enabledPricingIds??h.form.value.enabledPricingIds,y={...h.form.value,...m};return await s.loadInvoicePreview({subscription:d.value,customer:Nt(y),seatsValues:y.seatsValues,unitsValues:y.unitsValues,enabledPricingIds:I,promotionCode:c}),{trialInvoicePreview:s.trialInvoicePreview.value,invoicePreview:s.invoicePreview.value}},h=Hn({initialState:{country:r,email:u},onRequiredFieldChange:()=>{d.value&&x().catch(()=>{})}}),v=async()=>{var B,z,R,Y;const m=await p({id:o,expanded:!0}),c=ue.getFirstPricingPlanScheduleOfType({pricingPlanScheduleInfos:m.pricing_plan_schedule_infos,type:"DEFAULT"}),I=(Y=(R=(z=(B=c==null?void 0:c.pricing_plan_version)==null?void 0:B.billing_period_settings)==null?void 0:z.billing_periods)==null?void 0:R[0])==null?void 0:Y.period;d.value={...m,billing_period:I??m.billing_period};const y=oo(c),N=io(c);h.updateInitialState({...h.form.value,enabledPricingIds:Zn(m,i),...y?{seatsValues:y}:{},...N?{unitsValues:N}:{}})},M=e.computed(()=>{var Q,W,H,j,X,re,ee,ae,le;const m=h.form.value.firstName||h.form.value.infix||h.form.value.lastName?{...h.form.value.firstName?{first_name:h.form.value.firstName}:{},...h.form.value.infix?{infix:h.form.value.infix}:{},...h.form.value.lastName?{last_name:h.form.value.lastName}:{}}:{},c={...h.form.value.addressLine1&&{line1:h.form.value.addressLine1},...h.form.value.addressLine2&&{line2:h.form.value.addressLine2},...h.form.value.city&&{city:h.form.value.city},...h.form.value.postalCode&&{postal_code:h.form.value.postalCode},...h.form.value.state&&{state:h.form.value.state},country:h.form.value.country??""},I=ue.getFirstPricingPlanScheduleOfType({pricingPlanScheduleInfos:((Q=d.value)==null?void 0:Q.pricing_plan_schedule_infos)??[],type:"DEFAULT"}),y=(W=I==null?void 0:I.pricing_plan_version)==null?void 0:W.pricing_currency_settings,N=(((H=y==null?void 0:y.pricing_currencies)==null?void 0:H.length)??0)>1,z=(((X=(j=I==null?void 0:I.pricing_plan_version)==null?void 0:j.billing_period_settings)==null?void 0:X.billing_periods)??[]).length>1,R=ue.getScheduleCustomizations({enabledPricings:(re=h.form.value.enabledPricingIds)==null?void 0:re.map(te=>({pricing_id:te})),seatsValues:h.form.value.seatsValues,unitsValues:h.form.value.unitsValues,pricingPlanScheduleInfos:((ee=d.value)==null?void 0:ee.pricing_plan_schedule_infos)??[],pricingCurrency:N?(ae=d.value)==null?void 0:ae.billing_currency:void 0,billingPeriod:z?(le=d.value)==null?void 0:le.billing_period:void 0}),Y=h.form.value.promotionCode,K=Y&&d.value?(()=>{var Ne,se,_e;const te=R?[...R]:[],ge=((Ne=te[0])==null?void 0:Ne.pricing_plan_schedule_id)??((_e=ue.getFirstPricingPlanScheduleOfType({pricingPlanScheduleInfos:((se=d.value)==null?void 0:se.pricing_plan_schedule_infos)??[],type:"DEFAULT"}))==null?void 0:_e.id);if(!ge)return R;const ve=te.find(({pricing_plan_schedule_id:J})=>J===ge);if(ve)ve.promotion_codes=[Y];else{const J=R==null?void 0:R[0];te.push({pricing_plan_schedule_id:ge,...(J==null?void 0:J.enabled_pricings)&&{enabled_pricings:J.enabled_pricings},...(J==null?void 0:J.seats_values)&&{seats_values:J.seats_values},...(J==null?void 0:J.units)&&{units:J.units},promotion_codes:[Y]})}return te})():R;return{type:"INIT_PRICING_PLAN_SUBSCRIPTION",init_pricing_plan_subscription:{template_pricing_plan_subscription_id:o,...K&&{pricing_plan_schedule_customizations:K},customer_details:{email:h.form.value.email??"",type:h.form.value.type,...h.form.value.type==="INDIVIDUAL"?{individual:{residential_address:c,...m?{name:m}:{}}}:{organization:{registered_address:c,legal_name:h.form.value.companyLegalName??"",...h.form.value.companyVatNumber&&qe.$validator(h.form.value.companyVatNumber,{},{})?{tax_ids:[{id:h.form.value.companyVatNumber,type:Ut}]}:{}}}}}}}),S=e.computed(()=>{var m,c;return((m=s.trialInvoicePreview.value)==null?void 0:m.invoice_amount_including_tax)??((c=s.invoicePreview.value)==null?void 0:c.invoice_amount_including_tax)}),$=e.computed(()=>s.invoicePreview.value?Gt(s.invoicePreview.value):void 0),_=e.computed(()=>{var m;return((m=$.value)==null?void 0:m.hasOneOff)??!1}),P=e.computed(()=>{var c;const m=$.value;if(m)return m.hasOneOff?m.hasUnattributed?void 0:m.recurring.includingTax:(c=s.invoicePreview.value)==null?void 0:c.invoice_amount_including_tax});e.watch([()=>h.form.value.country,S],([m,c])=>{!d.value||!m||!c||A(m,c)});function Z(){sessionStorage.setItem(Ge,JSON.stringify(h.form.value))}return e.onMounted(async()=>{const m=ye.getQueryParam("redirect_status"),c=!!ye.getQueryParam(de.PAYMENT_ACCEPTOR_ID_QUERY_STRING),I=!!ye.getQueryParam("payment_intent_client_secret")||!!ye.getQueryParam("setup_intent_client_secret");m==="succeeded"&&c&&I&&(l.value=!0);const N=sessionStorage.getItem(Ge);let B=null;if(N)try{B=JSON.parse(N)}catch{}B&&h.updateInitialState(B);try{await v()}catch(z){throw a.error("SUBSCRIPTION_LOAD_FAILED","Failed to load the subscription the checkout prices",{},z),z}try{await x()}catch{}B&&(h.updateInitialState(B),sessionStorage.removeItem(Ge))}),e.watch(f,m=>{m&&T()},{once:!0}),{validatedEmail:u,validatedCountry:r,invoicePreview:s.invoicePreview,invoicePreviewByBillingPeriod:s.invoicePreviewByBillingPeriod,trialInvoicePreview:s.trialInvoicePreview,trialPeriod:s.trialPeriod,loadInvoicePreview:x,updateInvoicePreviewOnBillingInformationChange:k,lastPreviewScheduleId:s.lastPreviewScheduleId,paymentMethodOptions:E,hasPaymentMethodOptionsError:V,retryPaymentMethodOptions:T,isPaymentMethodsPending:D,isInvoicePreviewPending:s.isPending,subscription:d,checkoutForm:h,authorizationContext:M,isPaid:l,amount:S,recurringAmount:P,hasOneOffCharges:_,saveFormStateForRedirect:Z}}function lo({checkoutForm:t,updateInvoicePreviewOnBillingInformationChange:n,formatErrorMessage:o,onInvalidPromotionCode:i,onApplyError:a}){const r=w.useLogger(),u=e.ref(!1),l=e.ref(null),d=(E,b)=>{l.value=o?o({action:E,error:b}):E==="apply"?"Promotion code could not be applied. Please try again.":"Promotion code could not be removed. Please try again."},p=E=>so(E)&&E.field==="promotion_codes",s=async E=>{const b=E==null?void 0:E.trim();if(b){l.value=null,t.form.value.promotionCode=b,u.value=!0;try{await n({promotionCode:b})}catch(D){r.capture(D,{code:"PROMOTION_CODE_APPLY_FAILED",message:"Failed to apply promotion code"}),d("apply",D),a==null||a(),p(D)&&(i==null||i()),await f({suppressError:!0,preserveErrorMessage:!0})}finally{u.value=!1}}},f=async({suppressError:E=!1,preserveErrorMessage:b=!1}={})=>{b||(l.value=null),delete t.form.value.promotionCode,u.value=!0;try{await n({})}catch(D){r.capture(D,{code:"PROMOTION_CODE_REMOVE_FAILED",message:"Failed to remove promotion code"}),E||d("remove",D)}finally{u.value=!1}};return{applyPromotionCode:s,removePromotionCode:f,isPromotionCodePending:u,promotionCodeErrorMessage:l}}function so(t){return typeof t=="object"&&t!==null&&"field"in t}function co({subscription:t,promotionCode:n,appliedPromotionCode:o,applyPromotionCode:i}){e.watch(t,a=>{a&&n&&(o.value=n,i(n))},{once:!0})}const uo={class:"flex items-center gap-2"},po=e.defineComponent({__name:"TaxIDCheckNotice",props:{taxIdValidationResult:{type:Object}},setup(t){const n=t,{formatMessage:o}=w.useIntl(),i=e.computed(()=>n.taxIdValidationResult.valid==="VALID"),a=e.computed(()=>i.value?o({defaultMessage:"VAT number is valid.",id:"tax_check.valid_vat_number",description:"The message shown when the VAT number is valid"}):o({defaultMessage:"VAT number is invalid.",id:"tax_check.invalid_vat_number",description:"The message shown when the VAT number is invalid"}));return(r,u)=>(e.openBlock(),e.createBlock(e.unref(fn._sfc_main),{type:i.value?"success":"danger",icon:!1},{default:e.withCtx(()=>[e.createElementVNode("div",uo,[e.createVNode(e.unref(w._sfc_main),{variant:"body-xs"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value),1)]),_:1})])]),_:1},8,["type"]))}});function mo(t){const{checkTaxID:n}=yn.createCustomerService(),o=e.ref(void 0),i=e.computed(()=>{var f;return((f=t.value.companyVatNumber)==null?void 0:f.trim())??""}),a=e.computed(()=>t.value.companyLegalName??""),r=e.computed(()=>t.value.country),u=e.ref(!1),l=e.computed(()=>Bt(r.value??"")),d=e.computed(()=>!!(i.value&&a.value&&r.value)),p=e.computed(()=>l.value&&i.value);async function s(){var f;if(!(!d.value||!l.value||!r.value)){u.value=!0;try{const E=await n({type:"ORGANIZATION",organization:{legal_name:a.value,tax_ids:[{id:i.value,type:"GENERIC_TAX_ID"}],registered_address:{country:r.value}}});(f=E==null?void 0:E.data)!=null&&f.length?o.value=E.data[0]:o.value=void 0}finally{u.value=!1}}}return{runTaxIDCheck:s,taxIdValidationData:o,isTaxIDCheckPending:u,isTaxIDCheckEnabled:d,showViesCheckNotice:p,isSelectedCountryEU:l}}const go={class:"grid grid-cols-1 gap-1"},fo={class:"grid grid-cols-1 gap-2"},yo={key:0},vo={class:"mt-2 flex flex-col gap-3"},_o={class:"grid grid-cols-3 gap-2"},ho={key:0},bo={class:"mt-4 grid grid-cols-1 gap-3"},Mo="checkout-form",No=e.defineComponent({__name:"CheckoutForm",props:e.mergeModels({validation:{type:null},initialState:{type:Object},readOnlyEmail:{type:String},showCustomerInfoOnTop:{type:Boolean},isBillingInformationMandatory:{type:Boolean},getIsFieldRequired:{type:Function},readOnly:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:e.mergeModels(["submit"],["update:modelValue"]),setup(t){const n=T=>Ve(T),o=t,i=e.ref(!1),a=e.useModel(t,"modelValue"),r=e.computed({get:()=>a.value.type==="ORGANIZATION",set:T=>{a.value.type=T?"ORGANIZATION":"INDIVIDUAL"}}),u=e.computed(()=>a.value.type==="ORGANIZATION"),l=e.reactive({email:F.formControlModel(a,"email",F.asOptionalText),addressLine1:F.formControlModel(a,"addressLine1",F.asOptionalText),addressLine2:F.formControlModel(a,"addressLine2",F.asOptionalText),postalCode:F.formControlModel(a,"postalCode",F.asOptionalText),city:F.formControlModel(a,"city",F.asOptionalText),state:F.formControlModel(a,"state",F.asOptionalText),companyLegalName:F.formControlModel(a,"companyLegalName",F.asOptionalText),companyVatNumber:F.formControlModel(a,"companyVatNumber",F.asOptionalText)}),d=e.computed({get:()=>a.value.country,set:T=>{const x=F.asOptionalText(T);a.value.country=x!==void 0&&n(x)?x:void 0}}),p=e.computed(()=>a.value.country!=="US"),{isTaxIDCheckEnabled:s,isTaxIDCheckPending:f,taxIdValidationData:E,runTaxIDCheck:b}=mo(a),{$t:D}=w.useIntl(),C=Te.useCustomerFormLabels(),A=T=>o.getIsFieldRequired(T)?"":" "+D({defaultMessage:"(optional)",id:"checkout.optional_suffix.label",description:"The suffix for optional fields in the checkout form"}),V=e.computed(()=>a.value.country?gn.getCountryNameByCode(a.value.country):void 0);return(T,x)=>(e.openBlock(),e.createElementBlock("form",{id:Mo,onSubmit:x[12]||(x[12]=e.withModifiers(k=>T.$emit("submit",a.value),["prevent"]))},[e.createElementVNode("div",go,[e.createVNode(e.unref(ne._sfc_main),{title:e.unref(C).contactInformationTitle},{default:e.withCtx(()=>[e.createElementVNode("div",fo,[t.readOnly?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.unref(w._sfc_main),{variant:"body",tag:"span",weight:"semibold","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value.email),1)]),_:1}),e.createVNode(e.unref(w._sfc_main),{variant:"body-sm",tag:"span",color:"subtle","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V.value),1)]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(ce._sfc_main),{modelValue:l.email,"onUpdate:modelValue":x[0]||(x[0]=k=>l.email=k),required:"",type:"email",name:"email",disabled:!!t.readOnlyEmail,label:e.unref(C).emailLabel,placeholder:e.unref(C).emailPlaceholder+A("email"),error:t.validation.value.email.$errors},null,8,["modelValue","disabled","label","placeholder","error"]),e.createVNode(e.unref(Te._sfc_main),{"single-model-value":d.value,"onUpdate:singleModelValue":x[3]||(x[3]=k=>d.value=k),required:"",name:"country",label:e.unref(C).countryLabel+A("country"),error:t.validation.value.country.$errors},{"label-suffix":e.withCtx(()=>[!i.value&&!t.isBillingInformationMandatory?(e.openBlock(),e.createBlock(e.unref(ie._sfc_main),{key:0,size:"xs",intent:"subtle","icon-prefix":"add",class:"py-0.5",onClick:x[1]||(x[1]=k=>i.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(D)({defaultMessage:"More billing details",description:"Label of the button in the checkout that lets you fill out all billing details",id:"checkout.billing_details.add_billing_details_button.label"})),1)]),_:1})):e.createCommentVNode("",!0),i.value&&!t.isBillingInformationMandatory?(e.openBlock(),e.createBlock(e.unref(ie._sfc_main),{key:1,size:"sm",intent:"subtle","icon-prefix":"close",class:"py-0.5",onClick:x[2]||(x[2]=k=>i.value=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(D)({defaultMessage:"Remove billing details",id:"checkout.billing_details.remove_billing_details_button.label",description:"Label of the button in the checkout that lets you remove the billing details"})),1)]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["single-model-value","label","error"])],64))]),e.createVNode(e.unref(vt._sfc_main),{"is-open":i.value||!!t.isBillingInformationMandatory},{default:e.withCtx(()=>[i.value||t.isBillingInformationMandatory?(e.openBlock(),e.createElementBlock("div",yo,[e.createElementVNode("div",vo,[e.createVNode(e.unref(ce._sfc_main),{modelValue:l.addressLine1,"onUpdate:modelValue":x[4]||(x[4]=k=>l.addressLine1=k),name:"address_line_1",label:e.unref(D)({defaultMessage:"Billing address",id:"checkout.address.title",description:"Address line 1 of the customer address in the checkout form"}),placeholder:e.unref(D)({defaultMessage:"Address line 1...",id:"checkout.address.line1.placeholder",description:"Address line 1 of the customer address in the checkout form"})+A("addressLine1"),required:"",error:t.validation.value.addressLine1.$errors},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(ce._sfc_main),{modelValue:l.addressLine2,"onUpdate:modelValue":x[5]||(x[5]=k=>l.addressLine2=k),name:"address_line_2",placeholder:e.unref(D)({defaultMessage:"Address line 2...",id:"checkout.address.line2.placeholder",description:"Address line 2 of the customer address in the checkout form"})+A("addressLine2")},null,8,["modelValue","placeholder"]),e.createElementVNode("div",_o,[e.createVNode(e.unref(ce._sfc_main),{modelValue:l.postalCode,"onUpdate:modelValue":x[6]||(x[6]=k=>l.postalCode=k),name:"postal_code",placeholder:e.unref(C).postalCodePlaceholder+A("postalCode"),error:t.validation.value.addressLine1.$errors},null,8,["modelValue","placeholder","error"]),e.createVNode(e.unref(ce._sfc_main),{modelValue:l.city,"onUpdate:modelValue":x[7]||(x[7]=k=>l.city=k),name:"city",placeholder:e.unref(C).cityPlaceholder+A("city")},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(ce._sfc_main),{modelValue:l.state,"onUpdate:modelValue":x[8]||(x[8]=k=>l.state=k),name:"state",placeholder:e.unref(C).statePlaceholder+A("state"),error:t.validation.value.state.$errors},null,8,["modelValue","placeholder","error"])])])])):e.createCommentVNode("",!0)]),_:1},8,["is-open"])]),_:1},8,["title"]),t.readOnly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(ne._sfc_main),{key:0},{default:e.withCtx(()=>[e.createVNode(Te._sfc_main$1,{modelValue:r.value,"onUpdate:modelValue":x[9]||(x[9]=k=>r.value=k),"no-spacing":"",class:"!flex"},null,8,["modelValue"]),e.createVNode(e.unref(vt._sfc_main),{"is-open":u.value},{default:e.withCtx(()=>[u.value?(e.openBlock(),e.createElementBlock("div",ho,[e.createElementVNode("div",bo,[e.createVNode(e.unref(ce._sfc_main),{modelValue:l.companyLegalName,"onUpdate:modelValue":x[10]||(x[10]=k=>l.companyLegalName=k),required:"",name:"legal_name",label:e.unref(C).legalNameLabel,placeholder:e.unref(C).legalNamePlaceholder},null,8,["modelValue","label","placeholder"]),p.value?(e.openBlock(),e.createBlock(e.unref(ce._sfc_main),{key:0,modelValue:l.companyVatNumber,"onUpdate:modelValue":x[11]||(x[11]=k=>l.companyVatNumber=k),name:"vat_number","input-class":"focus:outline-none focus:ring-0",label:e.unref(C).vatNumberLabel,placeholder:e.unref(C).vatNumberPlaceholder,error:t.validation.value.companyVatNumber.$errors,"suffix-class":"px-2 border-l-0"},e.createSlots({_:2},[e.unref(Bt)(a.value.country??"")?{name:"suffix",fn:e.withCtx(()=>[e.createVNode(e.unref(ie._sfc_main),{type:"button",size:"sm",intent:"secondary",disabled:!e.unref(s)||e.unref(f)||t.validation.value.companyVatNumber.$invalid,onClick:e.unref(b)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(D)({defaultMessage:"Check",id:"checkout.vat_number.check_button.label",description:"The label for the check button in the checkout form"})),1)]),_:1},8,["disabled","onClick"])]),key:"0"}:void 0]),1032,["modelValue","label","placeholder","error"])):e.createCommentVNode("",!0),e.unref(E)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass({"opacity-75":e.unref(f)})},[e.createVNode(po,{"tax-id-validation-result":e.unref(E)},null,8,["tax-id-validation-result"])],2)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),_:1},8,["is-open"])]),_:1}))])],32))}}),Io={key:0,class:"flex items-center"},Co=["innerHTML"],Eo=["innerHTML"],xo=e.defineComponent({__name:"CheckoutTitle",props:{trialPeriod:{type:Object},subscriptionName:{type:String},amount:{type:Object},dueTodayAmount:{type:Object},recurringAmount:{type:Object},hasOneOffCharges:{type:Boolean},hasRecurringCharge:{type:Boolean},hasUsageCharges:{type:Boolean},billingPeriod:{type:Object},countryCode:{type:null},trialStartDate:{type:Date},subscriptionStartDate:{type:Date}},setup(t){const n=t,{$t:o}=w.useIntl(),i=e.computed(()=>oe.formatBillingPeriod(n.billingPeriod,{short:!0,hideValueForExactPeriods:!0})),a=l=>`<strong>${l}</strong>`,r=e.computed(()=>{const l=oe.formatAmount(n.dueTodayAmount),d=()=>o({defaultMessage:"You will be billed <strong>{due_today}</strong> today.",id:"checkout.one_off_description",description:"The description of an order that is charged once and does not renew"},{due_today:l,strong:a});if(n.recurringAmount){if(Number(n.recurringAmount.quantity)===0){if(n.hasUsageCharges)return o({defaultMessage:"You will be billed <strong>{due_today}</strong> today. Usage is billed every {period_name}.",id:"checkout.usage_with_one_off_description",description:"The description of a usage-based subscription whose first invoice also charges something only once"},{due_today:l,period_name:i.value,strong:a});if(!n.hasRecurringCharge)return d()}const s=oe.formatAmount(n.recurringAmount);return n.trialStartDate?o({defaultMessage:"You will be billed <strong>{due_today}</strong> today, then <strong>{price}</strong> per {period_name}, starting {startDate, date, long}.",id:"checkout.trial_period_description_with_one_off",description:"The description of a trial whose first invoice also charges something only once"},{due_today:l,price:s,period_name:i.value,startDate:n.subscriptionStartDate,strong:a}):o({defaultMessage:"You will be billed <strong>{due_today}</strong> today, then <strong>{price}</strong> per {period_name}.",id:"checkout.subscription_description_with_one_off",description:"The description of a subscription whose first invoice also charges something only once"},{due_today:l,price:s,period_name:i.value,strong:a})}if(n.hasOneOffCharges)return d();const p=oe.formatAmount(n.amount);return n.trialStartDate?o({defaultMessage:"You will be billed <strong>{price}</strong> per {period_name}, starting {startDate, date, long}.",id:"checkout.trial_period_description",description:"The description of the trial period"},{price:p,startDate:n.subscriptionStartDate,period_name:i.value,strong:a}):o({defaultMessage:"You will be billed <strong>{price}</strong> per {period_name}, starting today.",id:"checkout.subscription_description",description:"The description of the subscription"},{price:p,period_name:i.value,strong:a})}),u=e.computed(()=>n.trialStartDate?o({defaultMessage:"per {period_name} starting, {startDate, date, long}",id:"checkout.trial_period_description_without_price",description:"The description of the trial period, while the price is still being determined"},{startDate:n.subscriptionStartDate,period_name:i.value}):o({defaultMessage:"per {period_name}, starting today",id:"checkout.subscription_description_without_price",description:"The description of the subscription, while the price is still being determined"},{period_name:i.value}));return(l,d)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",null,[e.createVNode(e.unref(w._sfc_main),{variant:"heading-1",class:"inline-block"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.trialStartDate?t.subscriptionName:e.unref(o)({defaultMessage:"Pay and subscribe",id:"checkout.page_title",description:"The title of the checkout page"}))+e.toDisplayString(" "),1),t.trialPeriod?(e.openBlock(),e.createBlock(e.unref(Dt._sfc_main),{key:0,"trial-period":t.trialPeriod,size:"lg",class:"-translate-y-0.5"},null,8,["trial-period"])):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(e.unref(w._sfc_main),{variant:"body-sm",color:"subtle","no-spacing":""},{default:e.withCtx(()=>[t.countryCode?(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:r.value},null,8,Eo)):(e.openBlock(),e.createElementBlock("span",Io,[e.createVNode(e.unref($e._sfc_main),{"is-dark-mode":""},{tooltip:e.withCtx(()=>[e.createVNode(e.unref($e.TooltipContent),null,{default:e.withCtx(()=>[e.createVNode(e.unref($e._sfc_main$1),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Will be determined by billing information",description:"Tooltip content for the invoice preview when taxes are not determined by billing information",id:"invoice_preview.taxes_not_determined_by_billing_information_tooltip"})),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(Me._sfc_main$2),{"width-class":"w-10","height-class":"h-4",shade:"darker",class:"mr-1.5 inline-block"})]),_:1}),e.createElementVNode("span",{innerHTML:u.value},null,8,Co)]))]),_:1})]))}}),Ao={class:"flex min-h-96 w-full items-center justify-center"},ko={class:"max-w-sm"},Po=e.defineComponent({__name:"CheckoutNotAvailable",setup(t){const{$t:n}=w.useIntl(),o=()=>{window.location.reload()};return(i,a)=>(e.openBlock(),e.createElementBlock("div",Ao,[e.createElementVNode("div",ko,[e.createVNode(e.unref(w._sfc_main),{variant:"heading-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Checkout not available",id:"checkout.not_available.title",description:"The title of the checkout not available page"})),1)]),_:1}),e.createVNode(e.unref(w._sfc_main),{variant:"body-sm",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"The checkout is currently not available.",id:"checkout.not_available.description",description:"The description of the checkout not available page"}))+" ",1),e.createElementVNode("a",{href:"#",class:"text-primary-900 hover:underline",onClick:e.withModifiers(o,["prevent"])},e.toDisplayString(e.unref(n)({defaultMessage:"Reload",id:"checkout.not_available.reload_button",description:"The label of the reload button"})),1),e.createTextVNode(" "+e.toDisplayString(e.unref(n)({defaultMessage:"this page to try again, or contact customer support.",id:"checkout.not_available.contact_support_message",description:"The message shown when the user wants to contact customer support"})),1)]),_:1})])]))}}),Do=e.defineComponent({__name:"SubscriptionPaymentCompletedCard",emits:["continue-to-merchant"],setup(t){const{$t:n}=w.useIntl();return(o,i)=>(e.openBlock(),e.createBlock(vn._sfc_main,{status:"success",title:e.unref(n)({defaultMessage:"Payment successful",id:"subscription_payment_completed_card.title",description:"The title for when a payment has been successful"})},{default:e.withCtx(()=>[e.createVNode(e.unref(w._sfc_main),{variant:"body-xs",color:"subtle",tag:"span"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Thank you for subscribing.",id:"subscription_payment_completed_card.thank_you_for_subscribing",description:"The text shown after a successful message before a redirect"})),1)]),_:1})]),_:1},8,["title"]))}}),Ke=t=>Number(t.quantity),Ct=t=>{var i;const n=(i=t==null?void 0:t.periods)==null?void 0:i[0];if(!t||!n)return;const o=Gt({...t,periods:[n]});return o.hasOneOff?o.hasUnattributed?void 0:o.recurring.includingTax:n.amount_including_tax},De=(t,n)=>{if(!n)return;const i={DAY:365,WEEK:52,MONTH:12,YEAR:1}[t.type]/Math.max(t.value??1,1),a=Ke(n)*i;if(Number.isFinite(a))return{quantity:a.toFixed(2),currency:n.currency}},Et=(t,n)=>{if(!t||!n)return;const o=Ke(t)-Ke(n);if(!(!Number.isFinite(o)||o<=0))return{quantity:o.toFixed(2),currency:t.currency}},xt=t=>{var n,o;return(n=t.pricing)!=null&&n.name&&!Tt.isEmpty(t.pricing.name)?t.pricing.name:bn.getComposedString(((o=t.products)==null?void 0:o.map(({name:i})=>i))??[])??""},To=(t,n)=>de.sumAmounts(t.map(({amount_excluding_tax:o})=>o),n),wo={class:"flex items-start"},So={class:"flex grow flex-col"},Bo={class:"flex items-center gap-1"},Lo={class:"ml-4 flex items-center self-center"},Ht=e.defineComponent({__name:"PricingGroupContent",props:{name:{type:String},description:{type:String}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",wo,[e.createElementVNode("div",So,[e.createElementVNode("div",Bo,[e.createVNode(e.unref(w._sfc_main),{tag:"span",variant:"body-sm",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.name),1)]),_:1}),e.renderSlot(n.$slots,"badge")]),e.createVNode(e.unref(w._sfc_main),{tag:"span",variant:"body-xs",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.description),1)]),_:1})]),e.createElementVNode("div",Lo,[e.renderSlot(n.$slots,"default")])]))}}),Oo={class:"sv-order-summary__body grid grid-cols-1 gap-1"},Vo={class:"px-3 py-2"},Ro={class:"sv-order-summary__billing-period flex flex-col gap-3"},zo={class:"px-3 py-2"},jo={key:3,class:"sv-order-summary__items"},Uo={class:"flex flex-row gap-2 py-1.5"},$o={key:2,class:"sv-order-summary__renewal flex flex-row gap-2 pt-1.5"},At=e.defineComponent({__name:"OrderSummary",props:{subscription:{type:Object},invoice:{type:Object},invoicePreviewByBillingPeriod:{type:Object},trialInvoice:{type:Object},enabledPricingIds:{type:Array},trialPeriod:{type:Object},avatar:{type:String},isPaid:{type:Boolean},isUsageBased:{type:Boolean},isPreviewAndPaymentMethodsPending:{type:Boolean},collapsible:{type:String},noTitle:{type:Boolean},countryCode:{type:null},variant:{type:String}},emits:["billing-period-change"],setup(t,{emit:n}){const o=t,i=n,{$t:a}=w.useIntl(),{map:r,formatTimePeriod:u}=Pt.useTimePeriod(),{isMobileViewport:l}=St.useViewport(),d=e.computed(()=>l.value?"sm":"xs"),p=c=>`${c.type}:${c.value}`,s=["DAY","WEEK","MONTH","YEAR"],f=c=>s.includes(c),E=c=>{if(!c)return;const[I,y]=c.split(":"),N=Number(y);if(!(!N||!f(I)))return{type:I,value:N}},b=e.computed({get:()=>{const c=o.subscription.billing_period;return c?`${c.type}:${c.value}`:void 0},set:c=>{if(!c)return;const[I,y]=c.split(":"),N=Number(y);N&&f(I)&&i("billing-period-change",{type:I,value:N})}}),D=e.computed({get:()=>b.value,set:c=>{b.value=F.asOptionalText(c)}}),C=c=>{var I;return Ct((I=o.invoicePreviewByBillingPeriod)==null?void 0:I[c])},A=c=>{const I=C(p(c));if(!I)return;const y=c.type==="MONTH"&&c.value===3?a({defaultMessage:"/quarter",id:"checkout.order_summary_block.billing_period.per_quarter",description:"Period label for quarterly billing"}):a({defaultMessage:"/{period}",id:"checkout.order_summary_block.billing_period.per_label",description:"Period label for billing cycles"},{period:u(c,{prefix:!1,hideValueForExactPeriods:!0})});return a({defaultMessage:"{amount}{period}",id:"checkout.order_summary_block.billing_period.sub_label",description:"Billing period option sublabel showing price per period"},{amount:oe.formatAmount(I),period:y})},V=c=>{if(!c)return;const I=a({defaultMessage:"Save {amount}",id:"checkout.order_summary_block.billing_period.save_badge.prefix",description:"First line for the savings badge label"},{amount:oe.formatAmount(c)}),y=a({defaultMessage:"/year",id:"checkout.order_summary_block.billing_period.save_badge.suffix",description:"Second line for the savings badge label"});return`${I}${y}`},T=e.computed(()=>o.invoice?eo(o.invoice):{recurring:[],oneOff:[],other:[]}),x=e.computed(()=>T.value.recurring.length>0&&T.value.oneOff.length>0),k=c=>c.length>1&&o.invoice?To(c,o.invoice.billing_currency):void 0,h=e.computed(()=>x.value?Ct(o.invoice):void 0),v=e.computed(()=>h.value&&Number(h.value.quantity)!==0?h.value:void 0),M=e.computed(()=>{var Q,W,H;const c=ue.getFirstPricingPlanScheduleOfType({pricingPlanScheduleInfos:o.subscription.pricing_plan_schedule_infos??[],type:"DEFAULT"}),I=((W=(Q=c==null?void 0:c.pricing_plan_version)==null?void 0:Q.billing_period_settings)==null?void 0:W.billing_periods)??[],y=new Map,N=j=>{j&&y.set(p(j),j)},B=j=>{var X;(X=j==null?void 0:j.items)==null||X.forEach(re=>{var ee,ae;(ee=re.billing_period_configs)==null||ee.forEach(le=>N(le.billing_period)),(ae=re.pricing_currency_configs)==null||ae.forEach(le=>{var te;(te=le.billing_period_configs)==null||te.forEach(ge=>N(ge.billing_period))})})};if((((H=c==null?void 0:c.pricing_plan_version)==null?void 0:H.pricing_categories)??[]).forEach(j=>{var X,re;(X=j.pricings)==null||X.forEach(ee=>B(ee)),(re=j.pricing_groups)==null||re.forEach(ee=>{var ae;return(ae=ee.pricings)==null?void 0:ae.forEach(le=>B(le))})}),!y.size)return[];const R=I.map(j=>y.get(p(j.period))).filter(j=>!!j),Y=new Set(R.map(p)),K=[...y.values()].filter(j=>!Y.has(p(j)));return[...R,...K]}),S=e.computed(()=>{const c=M.value[M.value.length-1],I=c?De(c,C(p(c))):void 0;return M.value.map(N=>{const B=N.type==="MONTH"&&N.value===3?a({defaultMessage:"Billed quarterly",id:"checkout.order_summary_block.billing_period.quarterly",description:"Billing period option label for quarterly billing"}):a({defaultMessage:"Billed {period}",id:"checkout.order_summary_block.billing_period.label",description:"Billing period option label for the selected period"},{period:r.value[N.type].full}),z=C(p(N)),R=De(N,z),Y=c&&N.type===c.type&&N.value===c.value?void 0:Et(R,I),K=V(Y);return{label:B,subLabel:A(N),labelSuffixComponent:K?{component:_t._sfc_main,props:{color:"primary",content:K,size:d.value,class:"whitespace-nowrap text-left leading-tight"}}:void 0,hidden:b.value===`${N.type}:${N.value}`,value:`${N.type}:${N.value}`}})}),$=e.computed(()=>{const c=S.value,I=c[0],y=c[c.length-1];return{smallestPeriod:I==null?void 0:I.value,biggestPeriod:y==null?void 0:y.value}}),_=e.computed(()=>S.value.find(c=>c.value===$.value.biggestPeriod)),P=e.computed(()=>S.value.find(c=>c.value===b.value)),Z=e.computed(()=>{const c=S.value,I=c[c.length-1],y=b.value;if(!I||!y||y===I.value)return"";const N=E(I.value);if(!N)return"";const B=C(I.value),z=E(y),R=C(y);if(!z||!R)return"";const Y=De(z,R),K=De(N,B);return V(Et(Y,K))??""}),m=c=>{const{smallestPeriod:I,biggestPeriod:y}=$.value;b.value=c?y:I};return(c,I)=>(e.openBlock(),e.createBlock(e.unref(ne._sfc_main),{class:"sv-order-summary","no-border":"","no-spacing":"","content-background":"none",title:t.noTitle?void 0:e.unref(a)({defaultMessage:"Order summary",id:"checkout.order_summary_block.title",description:"The title of the order summary block that lists the subscription cost in the checkout"})},{default:e.withCtx(()=>[e.createElementVNode("div",Oo,[e.createVNode(e.unref(ne._sfc_main),{"no-spacing":"",class:"sv-order-summary__subscription"},{default:e.withCtx(()=>[t.subscription?(e.openBlock(),e.createBlock(hn._sfc_main,{key:0,avatar:t.avatar,invoice:t.invoice,subscription:t.subscription,"enabled-pricing-ids":t.enabledPricingIds,loading:t.isPreviewAndPaymentMethodsPending,"trial-period":t.trialPeriod},null,8,["avatar","invoice","subscription","enabled-pricing-ids","loading","trial-period"])):e.createCommentVNode("",!0)]),_:1}),S.value.length===2?(e.openBlock(),e.createBlock(e.unref(ne._sfc_main),{key:0,"no-spacing":"","content-classes":b.value===$.value.biggestPeriod?"border-primary-500":void 0},{default:e.withCtx(()=>{var y;return[e.createElementVNode("div",Vo,[e.createElementVNode("div",Ro,[_.value?(e.openBlock(),e.createBlock(Ht,{key:0,name:_.value.label,description:((y=P.value)==null?void 0:y.subLabel)??""},e.createSlots({default:e.withCtx(()=>[e.createVNode(e.unref(F._sfc_main),{"model-value":b.value===$.value.biggestPeriod,"onUpdate:modelValue":m},null,8,["model-value"])]),_:2},[Z.value?{name:"badge",fn:e.withCtx(()=>[e.createVNode(e.unref(_t._sfc_main),{intent:"brand",content:Z.value,size:d.value,class:"whitespace-nowrap text-left leading-tight"},null,8,["content","size"])]),key:"0"}:void 0]),1032,["name","description"])):e.createCommentVNode("",!0)])])]}),_:1},8,["content-classes"])):S.value.length>2?(e.openBlock(),e.createBlock(e.unref(wt._sfc_main),{key:1,"single-model-value":D.value,"onUpdate:singleModelValue":I[0]||(I[0]=y=>D.value=y),class:"sv-order-summary__billing-period",options:S.value,size:"xl","has-large-dropdown":"","show-sub-label-in-input":"","show-suffix-in-closed-input":""},null,8,["single-model-value","options"])):e.createCommentVNode("",!0),t.isUsageBased?(e.openBlock(),e.createBlock(e.unref(ne._sfc_main),{key:2,"no-spacing":"",class:"sv-order-summary__usage"},{default:e.withCtx(()=>[e.createElementVNode("div",zo,[e.createVNode(e.unref(w._sfc_main),{"no-spacing":"",variant:"body-sm",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"+ Usage",id:"checkout.invoice_preview.usage_based_message",description:"The message shown for the usage based invoice preview"})),1)]),_:1})])]),_:1})):e.createCommentVNode("",!0),t.invoice&&t.variant!=="products-inline"?(e.openBlock(),e.createElementBlock("div",jo,[x.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList([{key:"recurring",groups:T.value.recurring,heading:e.unref(a)({defaultMessage:"Subscription",id:"checkout.order_summary_block.recurring_heading",description:"The heading above the charges that are made every billing period"})},{key:"one-off",groups:T.value.oneOff,heading:e.unref(a)({defaultMessage:"One-time charges",id:"checkout.order_summary_block.one_off_heading",description:"The heading above the charges that are made once and not again"})}],y=>(e.openBlock(),e.createElementBlock("div",{key:y.key,class:e.normalizeClass(`sv-order-summary__items-${y.key}`)},[e.createVNode(e.unref(w._sfc_main),{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.heading),1)]),_:2},1024),e.createVNode(e.unref(ne._sfc_main),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.groups,(N,B)=>(e.openBlock(),e.createElementBlock("div",{key:B,class:"flex flex-row gap-2 py-1.5"},[e.createVNode(e.unref(w._sfc_main),{tag:"span",variant:"body-xs",class:"grow"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(xt)(N)),1)]),_:2},1024),e.createVNode(e.unref(w._sfc_main),{tag:"span",variant:"body-xs"},{default:e.withCtx(()=>[e.createVNode(e.unref(Fe._sfc_main),{value:N.amount_excluding_tax},null,8,["value"])]),_:2},1024)]))),128)),k(y.groups)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.unref(_n._sfc_main),{spacing:"xxs"}),e.createElementVNode("div",Uo,[e.createVNode(e.unref(w._sfc_main),{tag:"span",variant:"body-xs",weight:"semibold",class:"grow"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Subtotal",id:"checkout.order_summary_block.subtotal",description:"The label of a section total in the order summary"})),1)]),_:1}),e.createVNode(e.unref(w._sfc_main),{tag:"span",variant:"body-xs",weight:"semibold"},{default:e.withCtx(()=>[e.createVNode(e.unref(Fe._sfc_main),{value:k(y.groups)},null,8,["value"])]),_:2},1024)])],64)):e.createCommentVNode("",!0)]),_:2},1024)],2))),128)):e.createCommentVNode("",!0),x.value&&T.value.other.length?(e.openBlock(),e.createBlock(e.unref(ne._sfc_main),{key:1},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value.other,(y,N)=>(e.openBlock(),e.createElementBlock("div",{key:N,class:"flex flex-row gap-2 py-1.5"},[e.createVNode(e.unref(w._sfc_main),{tag:"span",variant:"body-xs",class:"grow"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(xt)(y)),1)]),_:2},1024),e.createVNode(e.unref(w._sfc_main),{tag:"span",variant:"body-xs"},{default:e.withCtx(()=>[e.createVNode(e.unref(Fe._sfc_main),{value:y.amount_excluding_tax},null,8,["value"])]),_:2},1024)]))),128))]),_:1})):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(Me._sfc_main$3),{key:2,invoice:t.invoice,"wrapper-component":e.unref(ne._sfc_main)},null,8,["invoice","wrapper-component"]))])):e.createCommentVNode("",!0),e.createVNode(e.unref(ne._sfc_main),{class:"sv-order-summary__totals"},{default:e.withCtx(()=>[t.invoice?(e.openBlock(),e.createBlock(e.unref(Me._sfc_main$1),{key:0,class:"sv-order-summary__invoice-preview",variant:t.variant==="products-inline"?"default":"without-products",invoice:t.invoice,"trial-invoice":t.trialInvoice,"is-paid":t.isPaid,collapsible:t.collapsible,"is-preview-without-taxes":!t.countryCode,"is-customer-facing":""},null,8,["variant","invoice","trial-invoice","is-paid","collapsible","is-preview-without-taxes"])):(e.openBlock(),e.createBlock(e.unref(w._sfc_main),{key:1,variant:"body-sm",color:"subtle",class:"sv-order-summary__empty"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Please select a country first",description:"The message shown for the invoice preview when no country is set",id:"checkout.invoice_preview.no_country_selected_message"})),1)]),_:1})),t.invoice&&v.value?(e.openBlock(),e.createElementBlock("div",$o,[e.createVNode(e.unref(w._sfc_main),{tag:"span",variant:"body-xs",color:"subtle",class:"grow"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Then {amount} per {period}",id:"checkout.order_summary_block.renews_at",description:"The amount the subscription is charged every period after the first invoice"},{amount:e.unref(oe.formatAmount)(v.value),period:e.unref(u)(t.subscription.billing_period,{prefix:!1,singular:!0,hideValueForExactPeriods:!0})})),1)]),_:1})])):e.createCommentVNode("",!0)]),_:1})])]),_:1},8,["title"]))}}),Fo={key:1},Go={key:2},Yo={key:3},Ko={key:4},qo=["href"],Ho=e.defineComponent({__name:"MarkdownInline",props:{nodes:{type:Array}},setup(t){return(n,o)=>{const i=e.resolveComponent("MarkdownInline",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.nodes,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r},[a.type==="text"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(a.value),1)],64)):a.type==="break"?(e.openBlock(),e.createElementBlock("br",Fo)):a.type==="bold"?(e.openBlock(),e.createElementBlock("strong",Go,[e.createVNode(i,{nodes:a.children},null,8,["nodes"])])):a.type==="italic"?(e.openBlock(),e.createElementBlock("em",Yo,[e.createVNode(i,{nodes:a.children},null,8,["nodes"])])):a.type==="underline"?(e.openBlock(),e.createElementBlock("u",Ko,[e.createVNode(i,{nodes:a.children},null,8,["nodes"])])):a.type==="link"?(e.openBlock(),e.createElementBlock("a",{key:5,href:a.href,target:"_blank",rel:"noopener noreferrer",class:"underline"},[e.createVNode(i,{nodes:a.children},null,8,["nodes"])],8,qo)):e.createCommentVNode("",!0)],64))),128)}}}),Qo=/^<u>([\s\S]*?)<\/u>/i,Zo=/^\*\*([\s\S]+?)\*\*/,Xo=/^\*([\s\S]+?)\*/,Wo=/^_([\s\S]+?)_/,Jo=/^\[([^\]]*)\]\(\s*([^)\s]*)\s*\)/,ea=/^<([a-z][a-z0-9+.-]*:[^>\s]+)>/i,ta=/\n[ \t]*\n/;function Ce(t){const n=[];let o="";const i=()=>{o&&(n.push({type:"text",value:o}),o="")};let a=0;for(;a<t.length;){const r=t.slice(a),u=Zo.exec(r);if(u){i(),n.push({type:"bold",children:Ce(u[1])}),a+=u[0].length;continue}const l=Xo.exec(r)??Wo.exec(r);if(l){i(),n.push({type:"italic",children:Ce(l[1])}),a+=l[0].length;continue}const d=Qo.exec(r);if(d){i(),n.push({type:"underline",children:Ce(d[1])}),a+=d[0].length;continue}const p=Jo.exec(r);if(p){i(),n.push(kt(p[2],Ce(p[1]))),a+=p[0].length;continue}const s=ea.exec(r);if(s){i(),n.push(kt(s[1],[{type:"text",value:s[1]}])),a+=s[0].length;continue}if(t[a]===`
|
|
2
|
+
`){i(),n.push({type:"break"}),a+=1;continue}o+=t[a],a+=1}return i(),n}function kt(t,n){const o=ye.sanitizeUrl(t);return o?{type:"link",href:o,children:n}:{type:"text",value:Qt(n)}}function Qt(t){return t.map(n=>n.type==="text"?n.value:n.type==="break"?" ":Qt(n.children)).join("")}function na(t){return t!=null&&t.trim()?t.split(ta).map(n=>n.trim()).filter(Boolean).map(n=>({type:"paragraph",children:Ce(n)})):[]}const oa={key:0},aa=e.defineComponent({__name:"MarkdownText",props:{source:{type:[String,null]}},setup(t){const n=t,o=e.computed(()=>na(n.source));return(i,a)=>o.value.length?(e.openBlock(),e.createElementBlock("div",oa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(r,u)=>(e.openBlock(),e.createElementBlock("p",{key:u,class:e.normalizeClass({"mt-2":u>0})},[e.createVNode(Ho,{nodes:r.children},null,8,["nodes"])],2))),128))])):e.createCommentVNode("",!0)}});async function Zt(t,n,{onSubmit:o}={}){const{AdyenCheckout:i}=await Le.loadAdyenSdk();return i(de.getAdyenExpressCheckoutConfiguration({locale:t.locale,amount:t.amount,countryCode:t.countryCode,paymentMethodOptionResponse:t.paymentMethodOptionsResponse,logger:n,onSubmit:o}))}function Xt({props:t,create:n,onMissingButton:o,onMountFailed:i,afterMount:a}){const r=e.ref(),u=w.useLogger(),l=async()=>{const d=await Zt(t,u),p=await n(d);if(!r.value){o();return}try{await p.isAvailable(),p.mount(r.value),a==null||a()}catch(s){i(s)}};return e.onMounted(()=>{l()}),{buttonRef:r}}const ia={key:0,id:"svg-logo",viewBox:"0 0 35 15",class:"h-[44px]"},ra={key:1,src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAxcHgiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAxMDEgMzIiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaW5ZTWluIG1lZXQiIHhtbG5zPSJodHRwOiYjeDJGOyYjeDJGO3d3dy53My5vcmcmI3gyRjsyMDAwJiN4MkY7c3ZnIj48cGF0aCBmaWxsPSIjMDAzMDg3IiBkPSJNIDEyLjIzNyAyLjggTCA0LjQzNyAyLjggQyAzLjkzNyAyLjggMy40MzcgMy4yIDMuMzM3IDMuNyBMIDAuMjM3IDIzLjcgQyAwLjEzNyAyNC4xIDAuNDM3IDI0LjQgMC44MzcgMjQuNCBMIDQuNTM3IDI0LjQgQyA1LjAzNyAyNC40IDUuNTM3IDI0IDUuNjM3IDIzLjUgTCA2LjQzNyAxOC4xIEMgNi41MzcgMTcuNiA2LjkzNyAxNy4yIDcuNTM3IDE3LjIgTCAxMC4wMzcgMTcuMiBDIDE1LjEzNyAxNy4yIDE4LjEzNyAxNC43IDE4LjkzNyA5LjggQyAxOS4yMzcgNy43IDE4LjkzNyA2IDE3LjkzNyA0LjggQyAxNi44MzcgMy41IDE0LjgzNyAyLjggMTIuMjM3IDIuOCBaIE0gMTMuMTM3IDEwLjEgQyAxMi43MzcgMTIuOSAxMC41MzcgMTIuOSA4LjUzNyAxMi45IEwgNy4zMzcgMTIuOSBMIDguMTM3IDcuNyBDIDguMTM3IDcuNCA4LjQzNyA3LjIgOC43MzcgNy4yIEwgOS4yMzcgNy4yIEMgMTAuNjM3IDcuMiAxMS45MzcgNy4yIDEyLjYzNyA4IEMgMTMuMTM3IDguNCAxMy4zMzcgOS4xIDEzLjEzNyAxMC4xIFoiPjwvcGF0aD48cGF0aCBmaWxsPSIjMDAzMDg3IiBkPSJNIDM1LjQzNyAxMCBMIDMxLjczNyAxMCBDIDMxLjQzNyAxMCAzMS4xMzcgMTAuMiAzMS4xMzcgMTAuNSBMIDMwLjkzNyAxMS41IEwgMzAuNjM3IDExLjEgQyAyOS44MzcgOS45IDI4LjAzNyA5LjUgMjYuMjM3IDkuNSBDIDIyLjEzNyA5LjUgMTguNjM3IDEyLjYgMTcuOTM3IDE3IEMgMTcuNTM3IDE5LjIgMTguMDM3IDIxLjMgMTkuMzM3IDIyLjcgQyAyMC40MzcgMjQgMjIuMTM3IDI0LjYgMjQuMDM3IDI0LjYgQyAyNy4zMzcgMjQuNiAyOS4yMzcgMjIuNSAyOS4yMzcgMjIuNSBMIDI5LjAzNyAyMy41IEMgMjguOTM3IDIzLjkgMjkuMjM3IDI0LjMgMjkuNjM3IDI0LjMgTCAzMy4wMzcgMjQuMyBDIDMzLjUzNyAyNC4zIDM0LjAzNyAyMy45IDM0LjEzNyAyMy40IEwgMzYuMTM3IDEwLjYgQyAzNi4yMzcgMTAuNCAzNS44MzcgMTAgMzUuNDM3IDEwIFogTSAzMC4zMzcgMTcuMiBDIDI5LjkzNyAxOS4zIDI4LjMzNyAyMC44IDI2LjEzNyAyMC44IEMgMjUuMDM3IDIwLjggMjQuMjM3IDIwLjUgMjMuNjM3IDE5LjggQyAyMy4wMzcgMTkuMSAyMi44MzcgMTguMiAyMy4wMzcgMTcuMiBDIDIzLjMzNyAxNS4xIDI1LjEzNyAxMy42IDI3LjIzNyAxMy42IEMgMjguMzM3IDEzLjYgMjkuMTM3IDE0IDI5LjczNyAxNC42IEMgMzAuMjM3IDE1LjMgMzAuNDM3IDE2LjIgMzAuMzM3IDE3LjIgWiI+PC9wYXRoPjxwYXRoIGZpbGw9IiMwMDMwODciIGQ9Ik0gNTUuMzM3IDEwIEwgNTEuNjM3IDEwIEMgNTEuMjM3IDEwIDUwLjkzNyAxMC4yIDUwLjczNyAxMC41IEwgNDUuNTM3IDE4LjEgTCA0My4zMzcgMTAuOCBDIDQzLjIzNyAxMC4zIDQyLjczNyAxMCA0Mi4zMzcgMTAgTCAzOC42MzcgMTAgQyAzOC4yMzcgMTAgMzcuODM3IDEwLjQgMzguMDM3IDEwLjkgTCA0Mi4xMzcgMjMgTCAzOC4yMzcgMjguNCBDIDM3LjkzNyAyOC44IDM4LjIzNyAyOS40IDM4LjczNyAyOS40IEwgNDIuNDM3IDI5LjQgQyA0Mi44MzcgMjkuNCA0My4xMzcgMjkuMiA0My4zMzcgMjguOSBMIDU1LjgzNyAxMC45IEMgNTYuMTM3IDEwLjYgNTUuODM3IDEwIDU1LjMzNyAxMCBaIj48L3BhdGg+PHBhdGggZmlsbD0iIzAwOWNkZSIgZD0iTSA2Ny43MzcgMi44IEwgNTkuOTM3IDIuOCBDIDU5LjQzNyAyLjggNTguOTM3IDMuMiA1OC44MzcgMy43IEwgNTUuNzM3IDIzLjYgQyA1NS42MzcgMjQgNTUuOTM3IDI0LjMgNTYuMzM3IDI0LjMgTCA2MC4zMzcgMjQuMyBDIDYwLjczNyAyNC4zIDYxLjAzNyAyNCA2MS4wMzcgMjMuNyBMIDYxLjkzNyAxOCBDIDYyLjAzNyAxNy41IDYyLjQzNyAxNy4xIDYzLjAzNyAxNy4xIEwgNjUuNTM3IDE3LjEgQyA3MC42MzcgMTcuMSA3My42MzcgMTQuNiA3NC40MzcgOS43IEMgNzQuNzM3IDcuNiA3NC40MzcgNS45IDczLjQzNyA0LjcgQyA3Mi4yMzcgMy41IDcwLjMzNyAyLjggNjcuNzM3IDIuOCBaIE0gNjguNjM3IDEwLjEgQyA2OC4yMzcgMTIuOSA2Ni4wMzcgMTIuOSA2NC4wMzcgMTIuOSBMIDYyLjgzNyAxMi45IEwgNjMuNjM3IDcuNyBDIDYzLjYzNyA3LjQgNjMuOTM3IDcuMiA2NC4yMzcgNy4yIEwgNjQuNzM3IDcuMiBDIDY2LjEzNyA3LjIgNjcuNDM3IDcuMiA2OC4xMzcgOCBDIDY4LjYzNyA4LjQgNjguNzM3IDkuMSA2OC42MzcgMTAuMSBaIj48L3BhdGg+PHBhdGggZmlsbD0iIzAwOWNkZSIgZD0iTSA5MC45MzcgMTAgTCA4Ny4yMzcgMTAgQyA4Ni45MzcgMTAgODYuNjM3IDEwLjIgODYuNjM3IDEwLjUgTCA4Ni40MzcgMTEuNSBMIDg2LjEzNyAxMS4xIEMgODUuMzM3IDkuOSA4My41MzcgOS41IDgxLjczNyA5LjUgQyA3Ny42MzcgOS41IDc0LjEzNyAxMi42IDczLjQzNyAxNyBDIDczLjAzNyAxOS4yIDczLjUzNyAyMS4zIDc0LjgzNyAyMi43IEMgNzUuOTM3IDI0IDc3LjYzNyAyNC42IDc5LjUzNyAyNC42IEMgODIuODM3IDI0LjYgODQuNzM3IDIyLjUgODQuNzM3IDIyLjUgTCA4NC41MzcgMjMuNSBDIDg0LjQzNyAyMy45IDg0LjczNyAyNC4zIDg1LjEzNyAyNC4zIEwgODguNTM3IDI0LjMgQyA4OS4wMzcgMjQuMyA4OS41MzcgMjMuOSA4OS42MzcgMjMuNCBMIDkxLjYzNyAxMC42IEMgOTEuNjM3IDEwLjQgOTEuMzM3IDEwIDkwLjkzNyAxMCBaIE0gODUuNzM3IDE3LjIgQyA4NS4zMzcgMTkuMyA4My43MzcgMjAuOCA4MS41MzcgMjAuOCBDIDgwLjQzNyAyMC44IDc5LjYzNyAyMC41IDc5LjAzNyAxOS44IEMgNzguNDM3IDE5LjEgNzguMjM3IDE4LjIgNzguNDM3IDE3LjIgQyA3OC43MzcgMTUuMSA4MC41MzcgMTMuNiA4Mi42MzcgMTMuNiBDIDgzLjczNyAxMy42IDg0LjUzNyAxNCA4NS4xMzcgMTQuNiBDIDg1LjczNyAxNS4zIDg1LjkzNyAxNi4yIDg1LjczNyAxNy4yIFoiPjwvcGF0aD48cGF0aCBmaWxsPSIjMDA5Y2RlIiBkPSJNIDk1LjMzNyAzLjMgTCA5Mi4xMzcgMjMuNiBDIDkyLjAzNyAyNCA5Mi4zMzcgMjQuMyA5Mi43MzcgMjQuMyBMIDk1LjkzNyAyNC4zIEMgOTYuNDM3IDI0LjMgOTYuOTM3IDIzLjkgOTcuMDM3IDIzLjQgTCAxMDAuMjM3IDMuNSBDIDEwMC4zMzcgMy4xIDEwMC4wMzcgMi44IDk5LjYzNyAyLjggTCA5Ni4wMzcgMi44IEMgOTUuNjM3IDIuOCA5NS40MzcgMyA5NS4zMzcgMy4zIFoiPjwvcGF0aD48L3N2Zz4",role:"presentation",class:"h-[22px]"},He=e.defineComponent({__name:"ExpressPaymentMethodButton",props:{type:{type:String}},emits:["click"],setup(t,{emit:n}){const o=t,i=n,a=e.computed(()=>{switch(o.type){case"applepay":return"Apple Pay";case"googlepay":return"Google Pay";case"paypal":return"PayPal";default:return}}),r=e.computed(()=>{switch(o.type){case"applepay":return"!bg-black !py-0";case"googlepay":return"!bg-black bg-[url(https://www.gstatic.com/instantbuy/svg/dark_gpay.svg)] bg-[length:auto_42.5%]";case"paypal":return"!bg-[#ffc439]";default:return}});function u(){i("click")}return(l,d)=>(e.openBlock(),e.createBlock(e.unref(ie._sfc_main),{size:"lg","aria-label":a.value,class:e.normalizeClass([r.value,"!block h-11 w-full bg-center bg-no-repeat"]),onClick:u},{default:e.withCtx(()=>[o.type==="applepay"?(e.openBlock(),e.createElementBlock("svg",ia,[...d[0]||(d[0]=[e.createElementVNode("svg",{id:"svg-logo",x:"0",y:"3.85",height:"7.3",width:"35",class:"logo",viewBox:"0 0 105 43",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("title",null,"Apple Logo"),e.createElementVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createElementVNode("g",{fill:"#FFF"},[e.createElementVNode("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"}),e.createElementVNode("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"}),e.createElementVNode("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"}),e.createElementVNode("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"}),e.createElementVNode("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"})])])],-1)])])):o.type==="paypal"?(e.openBlock(),e.createElementBlock("img",ra)):e.createCommentVNode("",!0)]),_:1},8,["aria-label","class"]))}}),la={class:"absolute h-[1px] w-[1px] overflow-hidden opacity-0"},sa="ADYEN",ca=e.defineComponent({__name:"ExpressPaymentMethodApplePay",props:{onBillingInformationChange:{type:Function},context:{type:Object},validateOnSubmit:{type:Function},amount:{type:Object},countryCode:{type:String},locale:{type:String},isVisible:{type:Boolean},paymentMethodOptionsResponse:{type:Object},billingInformation:{type:Object}},emits:["ready","unavailable","update-billing-information","payment-success","payment-failed"],setup(t,{emit:n}){const o=t,i=n,a=e.ref();let r,u=0;const l=w.useLogger(),{authorizePayment:d}=Nn.createPaymentsService(),p=o.paymentMethodOptionsResponse.payment_acceptor.id;function s(v){return In.createPaymentFailureContext({gateway:"ADYEN",paymentAcceptorId:p,paymentMethodType:"applepay",...v})}const f=v=>{var M;return v.status==="SUCCESS"&&((M=v.payment)==null?void 0:M.result)==="AUTHORIZED"},E=async(v,M)=>{const S=$=>{M.reject(),i("payment-failed",$)};try{const $=await d({payment_acceptor_id:p,payment_gateway_variant:sa,adyen:{payment_method:de.transformObjectToAdyenObject(v.data.paymentMethod),...v.data.riskData&&{risk_data:de.transformObjectToAdyenObject(v.data.riskData)},store_payment_method:!0},amount:o.amount,...o.context?{context:o.context}:{},return_url:de.createReturnUrl({paymentAcceptorId:p,redirectUrl:window.location.href})});if(f($)){M.resolve({resultCode:"Authorised"}),i("payment-success");return}l.error("APPLE_PAY_AUTHORIZATION_FAILED","Payment authorization failed",s({reason:"APPLE_PAY_AUTHORIZATION_REJECTED",extra:{paymentStatus:$.status}})),S(new Error(`Apple Pay payment was not authorized (${$.status})`))}catch($){l.error("APPLE_PAY_AUTHORIZATION_FAILED","Apple Pay authorization failed",s({reason:"APPLE_PAY_AUTHORIZATION_FAILED",cause:$}),$),S($ instanceof Error?$:new Error("Apple Pay authorization failed"))}},b=async()=>{const v=u,{ApplePay:M}=await Le.loadAdyenSdk(),S=await Zt(o,l,{onSubmit:(P,Z,m)=>void E(P,m)}),$=o.billingInformation.regular?{paymentDescription:o.billingInformation.description,billingAgreement:o.billingInformation.agreement,managementURL:o.billingInformation.managementURL,...o.billingInformation.trial&&{trialBilling:{label:o.billingInformation.trial.label,amount:o.billingInformation.trial.amount.quantity.toString(),type:"final",paymentTiming:"recurring",recurringPaymentStartDate:o.billingInformation.trial.startDate,recurringPaymentEndDate:o.billingInformation.trial.endDate}},regularBilling:{label:o.billingInformation.regular.label,amount:o.billingInformation.regular.amount.quantity.toString(),type:"final",paymentTiming:"recurring",recurringPaymentStartDate:o.billingInformation.regular.startDate,...C(o.billingInformation.regular.interval??{type:"MONTH",value:1})}}:void 0,_=new M(S,{isExpress:!0,...$&&{recurringPaymentRequest:$},requiredBillingContactFields:["postalAddress"],requiredShippingContactFields:["email"],onPaymentMethodSelected:async(P,Z,m)=>{var N,B,z,R,Y,K,Q,W;const{invoicePreview:c,trialInvoicePreview:I}=await o.onBillingInformationChange({...((N=m.paymentMethod.billingContact)==null?void 0:N.postalCode)&&{postalCode:m.paymentMethod.billingContact.postalCode},...((B=m.paymentMethod.billingContact)==null?void 0:B.locality)&&{city:m.paymentMethod.billingContact.locality},...T((z=m.paymentMethod.billingContact)==null?void 0:z.countryCode)&&{country:T((R=m.paymentMethod.billingContact)==null?void 0:R.countryCode)}}),y=I?I.invoice_amount_including_tax.quantity.toString():c.invoice_amount_including_tax.quantity.toString();i("update-billing-information",{postal_code:(Y=m.paymentMethod.billingContact)==null?void 0:Y.postalCode,city:(K=m.paymentMethod.billingContact)==null?void 0:K.locality,country:(Q=m.paymentMethod.billingContact)==null?void 0:Q.countryCode}),P({newTotal:{label:((W=o.billingInformation.regular)==null?void 0:W.label)??o.billingInformation.description,amount:y,type:"final"}})},onError:P=>{l.error("APPLE_PAY_ERROR","Apple Pay error",s({reason:"APPLE_PAY_ERROR",cause:P}),P)},onAuthorized:async(P,Z)=>{var m,c,I,y;try{const N=(m=P.authorizedEvent.payment)==null?void 0:m.billingContact,B=N?A(N):P.billingAddress?V(P.billingAddress):void 0,z=(I=(c=P.authorizedEvent.payment)==null?void 0:c.shippingContact)==null?void 0:I.emailAddress;if((B||z)&&(i("update-billing-information",{...B,...z&&{email:z}}),await e.nextTick()),!(await((y=o.validateOnSubmit)==null?void 0:y.call(o))??!0)){l.warn("APPLE_PAY_FORM_INCOMPLETE","Apple Pay authorization stopped: the checkout form is incomplete",s({reason:"APPLE_PAY_FORM_INVALID"})),Z.reject(),i("payment-failed",new Error("The checkout form is incomplete"));return}Z.resolve()}catch(N){l.error("APPLE_PAY_AUTHORIZATION_FAILED","Apple Pay authorization failed",s({reason:"APPLE_PAY_AUTHORIZATION_FAILED",cause:N}),N),Z.reject(),i("payment-failed",N instanceof Error?N:new Error("Apple Pay authorization failed"))}}});if(!a.value){l.error("APPLE_PAY_ERROR","Apple Pay button ref not found");return}try{if(await _.isAvailable(),v!==u)return;_.mount(a.value),r=_,i("ready")}catch(P){l.error("APPLE_PAY_ERROR","Apple Pay not available on this device",{},P),v===u&&i("unavailable")}},D=()=>{u+=1,r==null||r.unmount(),r=void 0},C=v=>{if(!v.value)return;let M=v.value??1,S=v.type.toLowerCase();if(v.type==="WEEK"&&(S="day",M=v.value*7),S==="day"||S==="month"||S==="year"||S==="hour"||S==="minute")return{recurringPaymentIntervalUnit:S,recurringPaymentIntervalCount:M}},A=v=>{var M,S;return{...((M=v.addressLines)==null?void 0:M[0])&&{line1:v.addressLines[0]},...((S=v.addressLines)==null?void 0:S[1])&&{line2:v.addressLines[1]},...v.administrativeArea&&{state:v.administrativeArea},postal_code:v.postalCode,city:v.locality,country:v.countryCode}},V=v=>({...v.street&&{line1:v.street},...v.houseNumberOrName&&{line2:v.houseNumberOrName},...v.stateOrProvince&&{state:v.stateOrProvince},postal_code:v.postalCode,city:v.city,country:v.country}),T=v=>v&&x(v)?v:void 0,x=v=>Ve(v),k=()=>{var M;const v=(M=a.value)==null?void 0:M.querySelector("apple-pay-button");if(v){const S=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});v.dispatchEvent(S)}},h=async()=>{try{await b()}catch(v){l.error("APPLE_PAY_ERROR","Apple Pay could not be set up",s({reason:"APPLE_PAY_SETUP_FAILED",cause:v}),v)}};return e.onMounted(()=>{h()}),e.watch(()=>[o.amount.quantity,o.amount.currency,o.billingInformation.agreement].join("|"),()=>{D(),h()}),e.onBeforeUnmount(D),(v,M)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.isVisible?(e.openBlock(),e.createBlock(He,{key:0,type:"applepay",onClick:k})):e.createCommentVNode("",!0),e.createElementVNode("div",la,[e.createElementVNode("div",{ref_key:"applePayButtonRef",ref:a},null,512)])],64))}}),ua={class:"relative overflow-hidden"},da=e.defineComponent({__name:"ExpressPaymentMethodPaypal",props:{amount:{type:Object},countryCode:{type:String},locale:{type:String},isVisible:{type:Boolean},paymentMethodOptionsResponse:{type:Object},billingInformation:{type:Object}},emits:["ready","unavailable","update-billing-information","payment-success","payment-failed"],setup(t,{emit:n}){const o=t,i=n,a=w.useLogger(),{buttonRef:r}=Xt({props:o,onMissingButton:()=>a.error("EXPRESS_CHECKOUT_PAYPAL_ERROR","The PayPal button reference is not found and cannot be mounted"),onMountFailed:u=>a.error("EXPRESS_CHECKOUT_PAYPAL_ERROR","Failed mounting PayPal express button",{error:u}),create:async u=>{const{PayPal:l}=await Le.loadAdyenSdk();return new l(u,{isExpress:!0,blockPayPalPayLaterButton:!0,blockPayPalCreditButton:!0,blockPayPalVenmoButton:!0,style:{height:55},onInit:()=>{i("ready")}})}});return(u,l)=>(e.openBlock(),e.createElementBlock("div",ua,[t.isVisible?(e.openBlock(),e.createBlock(He,{key:0,type:"paypal",class:"w-full"})):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"paypalButtonRef",ref:r,class:"absolute inset-0 opacity-[0.0001]"},null,512)]))}}),pa={class:"absolute h-[1px] w-[1px] overflow-hidden opacity-0"},ma=e.defineComponent({__name:"ExpressPaymentMethodGooglePay",props:{amount:{type:Object},countryCode:{type:String},locale:{type:String},isVisible:{type:Boolean},paymentMethodOptionsResponse:{type:Object},billingInformation:{type:Object}},emits:["ready","unavailable","update-billing-information","payment-success","payment-failed"],setup(t,{emit:n}){const o=t,i=n,a=w.useLogger(),{buttonRef:r}=Xt({props:o,onMissingButton:()=>a.error("EXPRESS_CHECKOUT_GOOGLE_PAY_ERROR","The Google Pay button reference is not found and cannot be mounted"),onMountFailed:l=>a.error("EXPRESS_CHECKOUT_GOOGLE_PAY_ERROR","Failed mounting Google Pay express button",{},l),create:async l=>{const{GooglePay:d}=await Le.loadAdyenSdk();return new d(l,{isExpress:!0})},afterMount:()=>i("ready")}),u=()=>{var d;const l=(d=r.value)==null?void 0:d.querySelector("#gpay-button-online-api-id");if(l){const p=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});l.dispatchEvent(p)}};return(l,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.isVisible?(e.openBlock(),e.createBlock(He,{key:0,type:"googlepay",onClick:u})):e.createCommentVNode("",!0),e.createElementVNode("div",pa,[e.createElementVNode("div",{ref_key:"googlePayButtonRef",ref:r},null,512)])],64))}}),ga={key:0,class:"mt-4n"},fa={class:"mb-2"},ya={class:"grid grid-cols-6 gap-1 md:gap-2"},va={class:"mt-4 h-4"},_a=2,ha=e.defineComponent({__name:"ExpressPaymentMethods",props:{amount:{type:Object},countryCode:{type:String},locale:{type:String},paymentMethodsOptionsResponse:{type:null},billingInformation:{type:Object},onBillingInformationChange:{type:Function},context:{type:Object},validateOnSubmit:{type:Function}},emits:["update-billing-information","payment-success","payment-failed"],setup(t){const n=["applepay"],o=t,{$t:i}=w.useIntl(),a=e.ref(!1),r=e.ref(!1),u=e.ref(!1),l=e.ref(!1),d=e.computed(()=>{var C;if(n.includes("applepay"))return(C=o.paymentMethodsOptionsResponse)==null?void 0:C.find(A=>{var V;return(V=A.options)==null?void 0:V.some(T=>T.name.toLowerCase()==="apple pay"&&T.payment_gateway_variant==="ADYEN")})}),p=e.computed(()=>r.value?void 0:d.value),s=e.computed(()=>{var C;if(n.includes("paypal"))return(C=o.paymentMethodsOptionsResponse)==null?void 0:C.find(A=>{var V;return(V=A.options)==null?void 0:V.some(T=>T.name.toLowerCase()==="paypal"&&T.payment_gateway_variant==="ADYEN")})}),f=e.computed(()=>{var C;if(n.includes("googlepay"))return(C=o.paymentMethodsOptionsResponse)==null?void 0:C.find(A=>{var V;return(V=A.options)==null?void 0:V.some(T=>T.name.toLowerCase()==="google pay"&&T.payment_gateway_variant==="ADYEN")})}),E=e.computed(()=>!!(p.value||f.value||s.value)),b=e.computed(()=>{var T;if(((T=o.paymentMethodsOptionsResponse)==null?void 0:T.length)===0)return!1;const C=!p.value||a.value,A=!f.value||u.value,V=!s.value||l.value;return C&&A&&V}),D=e.computed(()=>b.value?(p.value?1:0)+(f.value?1:0)+(s.value?1:0):_a);return(C,A)=>E.value?(e.openBlock(),e.createElementBlock("div",ga,[e.createElementVNode("div",fa,[b.value?(e.openBlock(),e.createBlock(e.unref(w._sfc_main),{key:1,variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Subscribe instantly with",id:"checkout.express_payment_methods.title",description:"The title of the express payment methods block in the checkout form"})),1)]),_:1})):(e.openBlock(),e.createBlock(pe._sfc_main,{key:0,variant:"title"}))]),e.createElementVNode("div",ya,[b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(pe._sfc_main,{class:"col-span-3 h-11"}),e.createVNode(pe._sfc_main,{class:"col-span-3 h-11"})],64)),e.createElementVNode("div",{class:e.normalizeClass(["col-span-3 md:col-span-2",{hidden:!p.value,"!col-span-6":D.value===1,"md:!col-span-3":D.value===2,"!col-span-6 md:!col-span-2":D.value===3}])},[p.value?(e.openBlock(),e.createBlock(ca,{key:0,amount:t.amount,"billing-information":t.billingInformation,"country-code":t.countryCode,locale:t.locale,"is-visible":b.value,"payment-method-options-response":p.value,"on-billing-information-change":t.onBillingInformationChange,context:t.context,"validate-on-submit":t.validateOnSubmit,onReady:A[0]||(A[0]=V=>a.value=!0),onUnavailable:A[1]||(A[1]=V=>r.value=!0),onUpdateBillingInformation:A[2]||(A[2]=V=>C.$emit("update-billing-information",V)),onPaymentSuccess:A[3]||(A[3]=V=>C.$emit("payment-success")),onPaymentFailed:A[4]||(A[4]=V=>C.$emit("payment-failed",V))},null,8,["amount","billing-information","country-code","locale","is-visible","payment-method-options-response","on-billing-information-change","context","validate-on-submit"])):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(["col-span-3 md:col-span-2",{hidden:!f.value,"col-span-6 md:col-span-6":D.value===1,"md:!col-span-3":D.value===2}])},[f.value?(e.openBlock(),e.createBlock(ma,{key:0,amount:t.amount,"billing-information":t.billingInformation,"country-code":t.countryCode,locale:t.locale,"is-visible":b.value,"payment-method-options-response":f.value,onReady:A[5]||(A[5]=V=>u.value=!0)},null,8,["amount","billing-information","country-code","locale","is-visible","payment-method-options-response"])):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(["col-span-3 md:col-span-2",{hidden:!s.value,"col-span-6 md:col-span-6":D.value===1,"md:!col-span-3":D.value===2}])},[s.value?(e.openBlock(),e.createBlock(da,{key:0,amount:t.amount,"billing-information":t.billingInformation,"country-code":t.countryCode,locale:t.locale,"is-visible":b.value,"payment-method-options-response":s.value,onReady:A[6]||(A[6]=V=>l.value=!0)},null,8,["amount","billing-information","country-code","locale","is-visible","payment-method-options-response"])):e.createCommentVNode("",!0)],2)]),e.createElementVNode("div",va,[b.value?(e.openBlock(),e.createBlock(e.unref(Mn._sfc_main),{key:1,text:e.unref(i)({defaultMessage:"Or",id:"checkout.express_payment_methods.divider_text",description:"The text of the divider text in the express payment methods block in the checkout form"}),"text-position":"center"},null,8,["text"])):(e.openBlock(),e.createBlock(pe._sfc_main,{key:0,variant:"divider-text"}))])])):e.createCommentVNode("",!0)}}),ba=["aria-expanded","aria-label"],Ma={class:"flex w-full cursor-pointer flex-row items-center justify-between gap-3 px-3 py-2"},Na={class:"flex flex-row items-center gap-2"},Ia=["onKeydown"],Ca=["aria-label"],Ea={class:"flex w-full cursor-pointer flex-row items-center justify-between gap-3 px-3 py-2"},xa={class:"flex flex-row items-center gap-2"},Aa={class:"sr-only","aria-live":"polite"},ka=e.defineComponent({inheritAttrs:!1,__name:"PromotionCodeSection",props:{promotionCode:{default:null,type:[String,null]}},emits:["update:appliedCode","apply","remove"],setup(t,{emit:n}){const{$t:o}=w.useIntl(),i=t,a=n,r=e.ref(!1),u=e.ref(""),l=e.ref(""),d=e.ref(null),p=e.ref(null),s=En.uniqueId("promotion-code-"),f=`${s}-label`,E=`${s}-panel`,b=e.computed({get:()=>u.value,set:_=>u.value=F.asText(_)}),D=e.computed(()=>i.promotionCode!==null&&i.promotionCode!==""),C=e.computed(()=>u.value.trim().length>0),A=e.computed(()=>i.promotionCode??o({defaultMessage:"Promotion applied",id:"checkout.promotion_code.applied_label",description:"Fallback label for an applied promotion code in checkout"})),V=e.computed(()=>r.value?o({defaultMessage:"Collapse promotion code input",id:"checkout.promotion_code.collapse_aria_label",description:"Aria label for the promotion code toggle button in checkout, while the input is open"}):o({defaultMessage:"Expand promotion code input",id:"checkout.promotion_code.expand_aria_label",description:"Aria label for the promotion code toggle button in checkout, while the input is closed"})),T=e.computed(()=>o({defaultMessage:"Apply promotion code",id:"checkout.promotion_code.apply_aria_label",description:"Aria label for the promotion code apply button in checkout"})),x=e.computed(()=>o({defaultMessage:"Remove promotion code",id:"checkout.promotion_code.remove_aria_label",description:"Aria label for the promotion code remove button in checkout"})),k=()=>{u.value=""},h=()=>{var P;const _=(P=p.value)==null?void 0:P.querySelector("input");_ instanceof HTMLInputElement&&_.focus()},v=()=>{r.value&&(r.value=!1)},M=()=>{D.value||(r.value=!r.value)},S=()=>{if(!C.value)return;const _=u.value.trim();a("update:appliedCode",_),a("apply",_),l.value=o({defaultMessage:"Promotion code applied",id:"checkout.promotion_code.applied_status",description:"Aria live message when a promotion code is applied in checkout"}),r.value=!1},$=()=>{a("update:appliedCode",null),a("remove"),l.value=o({defaultMessage:"Promotion code removed",id:"checkout.promotion_code.removed_status",description:"Aria live message when a promotion code is removed in checkout"}),k(),e.nextTick(()=>{var _;(_=d.value)==null||_.focus()})};return e.watch(r,_=>{if(!_){k(),e.nextTick(()=>{var P;(P=d.value)==null||P.focus()});return}e.nextTick(()=>{h()})}),e.watch(()=>i.promotionCode,_=>{_||k()}),(_,P)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[D.value?(e.openBlock(),e.createBlock(e.unref(ne._sfc_main),e.mergeProps({key:1},_.$attrs,{"no-border":"","no-spacing":"","content-background":"none",class:"relative w-full"}),{default:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"w-full rounded border border-primary-900 bg-white","aria-label":x.value,onClick:$},[e.createElementVNode("div",Ea,[e.createElementVNode("div",xa,[e.createVNode(e.unref(ie._sfc_main$1),{icon:"local_activity"}),e.createVNode(e.unref(w._sfc_main),{variant:"body-sm",class:"font-semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.value),1)]),_:1})]),e.createVNode(e.unref(ie._sfc_main$1),{icon:"close"})])],8,Ca)]),_:1},16)):(e.openBlock(),e.createBlock(e.unref(ne._sfc_main),e.mergeProps({key:0},_.$attrs,{"no-spacing":"",class:"relative w-full"}),{default:e.withCtx(()=>[e.createElementVNode("button",{ref_key:"toggleRef",ref:d,type:"button",class:"w-full","aria-expanded":r.value,"aria-controls":E,"aria-label":V.value,onClick:M},[e.createElementVNode("div",Ma,[e.createElementVNode("div",Na,[e.createVNode(e.unref(ie._sfc_main$1),{icon:"local_activity"}),e.createVNode(e.unref(w._sfc_main),{id:f,variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Add promotion code",id:"checkout.promotion_code.add_label",description:"Label for adding a promotion code in checkout"})),1)]),_:1})]),e.createVNode(e.unref(ie._sfc_main$1),{icon:r.value?"remove":"add"},null,8,["icon"])])],8,ba),e.withDirectives(e.createElementVNode("div",{id:E,ref_key:"panelRef",ref:p,role:"region","aria-labelledby":f,class:"flex w-full flex-row items-center gap-2 overflow-hidden border-t px-3 py-2",onKeydown:e.withKeys(e.withModifiers(v,["prevent"]),["esc"])},[e.createVNode(e.unref(ce._sfc_main),{modelValue:b.value,"onUpdate:modelValue":P[0]||(P[0]=Z=>b.value=Z),placeholder:e.unref(o)({defaultMessage:"Promotion code",id:"checkout.promotion_code.placeholder",description:"Placeholder for promotion code input in checkout"}),"aria-label":e.unref(o)({defaultMessage:"Promotion code",id:"checkout.promotion_code.input_aria_label",description:"Aria label for promotion code input in checkout"}),class:"w-full",onKeydown:e.withKeys(e.withModifiers(S,["prevent"]),["enter"])},null,8,["modelValue","placeholder","aria-label","onKeydown"]),e.createVNode(e.unref(ie._sfc_main),{type:"button",disabled:!C.value,"aria-label":T.value,"aria-disabled":!C.value,onClick:S},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Apply",id:"checkout.promotion_code.apply_button",description:"Button label for applying a promotion code in checkout"})),1)]),_:1},8,["disabled","aria-label","aria-disabled"])],40,Ia),[[e.vShow,r.value]])]),_:1},16)),e.createElementVNode("span",Aa,e.toDisplayString(l.value),1)],64))}}),Pa={class:"sv-checkout__header"},Da={class:"sv-checkout__payment-methods"},Ta={key:0,class:"sv-checkout__payment-methods-body"},wa={key:3,class:"sv-checkout__payment-form"},Sa={class:"sv-checkout__order-summary"},Ba={class:"flex flex-col gap-2"},La=e.defineComponent({__name:"Checkout",props:{configuration:{type:Object}},emits:["error","ready"],setup(t,{emit:n}){var at,it,rt,lt,st,ct,ut,dt,pt,mt,gt,ft;const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./PaymentIntegrationForm-Cx0zCf_C.js"))),i=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./PlanCustomizationEditor-DS1r2vBO.js"))),a=t,r=n,u=e.computed(()=>a.configuration),l=e.ref(),d=e.ref(),p=w.useLogger(),{$t:s,locale:f}=w.useIntl(),{formatTimePeriod:E}=Pt.useTimePeriod(),b=mn.usePortal(),{isMobileViewport:D}=St.useViewport();if(p.info("COMPONENT_INITIALIZED","Checkout component initialized"),((at=b.value)==null?void 0:at.type)!=="INIT_PRICING_PLAN_SUBSCRIPTION")throw p.error("INVALID_TOKEN","Invalid token"),Error("Invalid token");b.value.status==="REVOKED"&&(l.value={code:"RESOURCE_REVOKED",message:`Portal url with resource id "${b.value.id}" is revoked`},p.error("RESOURCE_REVOKED",`Portal url with resource id "${b.value.id}" is revoked`));const C=(rt=(it=b.value)==null?void 0:it.init_pricing_plan_subscription)==null?void 0:rt.pricing_plan_subscription_id,A=(st=(lt=b.value)==null?void 0:lt.init_pricing_plan_subscription)==null?void 0:st.success_url,V=((dt=(ut=(ct=b.value)==null?void 0:ct.init_pricing_plan_subscription)==null?void 0:ut.note)==null?void 0:dt.trim())||void 0,{validatedEmail:T,validatedCountry:x,paymentMethodOptions:k,hasPaymentMethodOptionsError:h,retryPaymentMethodOptions:v,subscription:M,isPaymentMethodsPending:S,isInvoicePreviewPending:$,checkoutForm:_,invoicePreview:P,invoicePreviewByBillingPeriod:Z,trialInvoicePreview:m,trialPeriod:c,authorizationContext:I,isPaid:y,amount:N,recurringAmount:B,hasOneOffCharges:z,loadInvoicePreview:R,updateInvoicePreviewOnBillingInformationChange:Y,saveFormStateForRedirect:K}=ro({initialCountry:(pt=a.configuration)==null?void 0:pt.countryCode,initialEmail:(mt=a.configuration)==null?void 0:mt.email,subscriptionId:C,enabledPricingIds:(gt=a.configuration)==null?void 0:gt.enabledPricingIds}),Q=de.useExperimentalFeature(),W=e.computed(()=>{var g;return!!((g=Q==null?void 0:Q.value)!=null&&g["express-checkout"])}),H=e.ref(!1),j=async()=>{var g;await _.validation.value.$validate(),!_.validation.value.$invalid&&(H.value=!0,X.value=null,K(),(g=d.value)==null||g.submit())},X=e.ref(null),re=()=>{H.value=!1},ee=g=>{H.value=!1,X.value=(g==null?void 0:g.message)??s({defaultMessage:"The payment did not go through. Please try again.",id:"checkout.payment_failed",description:"Error shown when a payment the customer started did not complete"})},ae=async()=>(await _.validation.value.$validate(),!_.validation.value.$invalid),le=e.computed(()=>!!m.value),te=e.computed(()=>Be.getModelTypesFromScheduleInfo(ke.value,{enabledPricingIds:_.form.value.enabledPricingIds})),ge=e.computed(()=>[...te.value].some(g=>g!=="ONE_OFF")),ve=e.computed(()=>te.value.has("USAGE_BASED")),Ne=e.computed(()=>ve.value||(P.value?Jn(P.value):!1)),se=e.computed(()=>{var g;return B.value??((g=P.value)==null?void 0:g.tax_summary.total_amount)});e.watch(()=>z.value&&!B.value&&!!P.value,g=>{g&&p.warn("RECURRING_AMOUNT_UNRESOLVED","Could not tell the recurring part of the invoice from the one-off part; the mandate states the invoice total",{flow:"CHECKOUT"})});const _e=e.computed(()=>ge.value||!!se.value&&Number(se.value.quantity)!==0),J=e.computed(()=>z.value?B.value:void 0),Wt=e.computed(()=>_.form.value.country&&["US","CA"].includes(_.form.value.country)||!1),Ae=e.computed({get:()=>_.form.value.enabledPricingIds??[],set:g=>{_.form.value.enabledPricingIds=g}}),ke=e.computed(()=>M.value?ue.getFirstPricingPlanScheduleOfType({pricingPlanScheduleInfos:M.value.pricing_plan_schedule_infos,type:"DEFAULT"}):void 0),Qe=e.computed(()=>{var L,O;if(!M.value)return;const g=(O=(L=ke.value)==null?void 0:L.pricing_plan_version)==null?void 0:O.pricing_currency_settings;return jt({country:_.form.value.country,pricingCurrencySettings:g,fallbackCurrency:M.value.billing_currency})}),Pe=e.computed(()=>{if(!ke.value||!M.value)return new Set;const g=ue.getPricingItemConfigMetaById({pricingPlanScheduleInfo:ke.value}),L=Qe.value,O=M.value.billing_period,G=new Set;return g.forEach((U,q)=>{L&&U.currency!==L||O&&U.billingPeriod&&(U.billingPeriod.type!==O.type||U.billingPeriod.value!==O.value)||G.add(q)}),G}),Ze=e.computed({get:()=>{const g=_.form.value.seatsValues??[],L=Pe.value;return L.size?g.filter(({pricing_item_config_id:O})=>L.has(O)):g},set:g=>{const L=_.form.value.seatsValues??[],O=Pe.value;if(!O.size){_.form.value.seatsValues=g;return}const G=L.filter(({pricing_item_config_id:U})=>!O.has(U));_.form.value.seatsValues=G.concat(g)}}),Xe=e.computed({get:()=>{const g=_.form.value.unitsValues??[],L=Pe.value;return L.size?g.filter(({pricing_item_config_id:O})=>L.has(O)):g},set:g=>{const L=_.form.value.unitsValues??[],O=Pe.value;if(!O.size){_.form.value.unitsValues=g;return}const G=L.filter(({pricing_item_config_id:U})=>!O.has(U));_.form.value.unitsValues=G.concat(g)}}),Jt=e.computed(()=>{var g,L,O,G,U;if(m.value)return s({defaultMessage:"{discounted_amount} for {trial_period}, then {subscription_amount}/{billing_period} until canceled, starting {start_date, date, ::MMMMd}.",id:"checkout.agreement.trial",description:"The agreement for the trial period"},{discounted_amount:m.value.tax_summary.total_amount.quantity==="0.00"?s({defaultMessage:"Free",id:"checkout.agreement.trial.free",description:"The free amount for the trial period"}):oe.formatAmount(m.value.tax_summary.total_amount),trial_period:E(c.value,{short:!0}),subscription_amount:oe.formatAmount(se.value??{quantity:"0.00",currency:"EUR"}),billing_period:E(((g=P.value)==null?void 0:g.billing_period)??{type:"MONTH",value:1},{short:!0,singular:!0,hideValueForExactPeriods:!0}),start_date:new Date(fe.value)});if(z.value&&B.value){const q=oe.formatAmount(((L=P.value)==null?void 0:L.tax_summary.total_amount)??{quantity:"0.00",currency:"EUR"});return _e.value?ve.value&&Number(B.value.quantity)===0?s({defaultMessage:"{due_today} today, then usage billed every {billing_period} until canceled.",id:"checkout.agreement.usage_with_one_off",description:"The agreement for a usage-based subscription whose first invoice also charges something only once"},{due_today:q,billing_period:E(((O=P.value)==null?void 0:O.billing_period)??{type:"MONTH",value:1},{short:!0,singular:!0,hideValueForExactPeriods:!0})}):s({defaultMessage:"{due_today} today, then {subscription_amount}/{billing_period} until canceled, starting {start_date, date, long}.",id:"checkout.agreement.subscription_with_one_off",description:"The agreement for a subscription whose first invoice also charges something only once"},{due_today:q,subscription_amount:oe.formatAmount(B.value),billing_period:E(((G=P.value)==null?void 0:G.billing_period)??{type:"MONTH",value:1},{short:!0,singular:!0,hideValueForExactPeriods:!0}),start_date:new Date(fe.value)}):s({defaultMessage:"{due_today} today. One-time purchase.",id:"checkout.agreement.one_off",description:"The agreement for an order that is charged once and does not renew"},{due_today:q})}return s({defaultMessage:"{subscription_amount}/{billing_period} until canceled, starting {start_date, date, long}.",id:"checkout.agreement.subscription",description:"The agreement for the subscription"},{subscription_amount:se.value?oe.formatAmount(se.value):"",billing_period:E(((U=P.value)==null?void 0:U.billing_period)??{type:"MONTH",value:1},{short:!0,singular:!0,hideValueForExactPeriods:!0}),start_date:new Date(fe.value)})}),We=e.computed(()=>{var L;if(!P.value)return;const g=Ee.getSubscriptionName({subscription:M.value,fallback:s({defaultMessage:"Subscription",description:"The fallback name for when no subscription name can be determined",id:"customer_overview.subscriptions_block.fallback_subscription_name"})});return{description:g,managementURL:"https://www.solvimon.com/account/billing",agreement:Jt.value,...m.value&&c.value&&{trial:{label:s({defaultMessage:"Trial",id:"checkout.trial.label",description:"The label of the trial"}),amount:m.value.tax_summary.total_amount,startDate:Re.value?new Date(Re.value):void 0,endDate:Je.value?new Date(Je.value):void 0}},..._e.value&&se.value&&{regular:{label:g,amount:se.value,startDate:fe.value?new Date(fe.value):void 0,interval:((L=M.value)==null?void 0:L.billing_period)??{type:"MONTH",value:1}}}}}),en=g=>Ve(g),tn=g=>{const{line1:L,line2:O,postal_code:G,city:U,state:q,country:he,email:Ue}=g;_.updateInitialState({...L&&{addressLine1:L},...O&&{addressLine2:O},...G&&{postalCode:G},...U&&{city:U},...q&&{state:q},...Ue&&{email:Ue},...he&&en(he)?{country:he}:{}})},nn=e.computed(()=>!(T&&x)),Re=e.computed(()=>{var O,G,U;const g=(G=(O=m.value)==null?void 0:O.periods)==null?void 0:G[0],L=(U=ze.value)==null?void 0:U.trialStartDate;return g!=null&&g.start_at?new Date(g.start_at):L}),ze=e.computed(()=>Ee.getFallbackTrialAndSubscriptionStartAndEndDates(M.value)),Je=e.computed(()=>{var O,G,U;const g=(G=(O=m.value)==null?void 0:O.periods)==null?void 0:G[0],L=(U=ze.value)==null?void 0:U.trialEndDate;return g!=null&&g.end_at?new Date(g.end_at):L}),fe=e.computed(()=>{var O,G,U;const g=(G=(O=P.value)==null?void 0:O.periods)==null?void 0:G[0],L=(U=ze.value)==null?void 0:U.subscriptionStartDate;return g!=null&&g.start_at?new Date(g.start_at):L}),on=e.computed(()=>!!(_.form.value.seatsValues&&_.form.value.seatsValues.length>0||_.form.value.unitsValues&&_.form.value.unitsValues.length>0||M.value&&Xn(M.value)||M.value&&Wn(M.value))),Ie=e.ref(null),{applyPromotionCode:et,removePromotionCode:an,isPromotionCodePending:rn,promotionCodeErrorMessage:je}=lo({checkoutForm:_,updateInvoicePreviewOnBillingInformationChange:Y,formatErrorMessage:({action:g})=>s(g==="apply"?{defaultMessage:"Promotion code could not be applied. Please try again.",id:"checkout.promotion_code.apply_failed",description:"Error message when applying a promotion code in checkout failed"}:{defaultMessage:"Promotion code could not be removed. Please try again.",id:"checkout.promotion_code.remove_failed",description:"Error message when removing a promotion code in checkout failed"}),onInvalidPromotionCode:()=>{Ie.value=null},onApplyError:()=>{Ie.value=null}});co({subscription:M,promotionCode:(ft=a.configuration)==null?void 0:ft.couponCode,appliedPromotionCode:Ie,applyPromotionCode:et});const tt=()=>{A&&ye.safeUrlRedirect(A)},ln=e.computed(()=>{var g;return!((g=a.configuration)!=null&&g.onPaymentSuccess)&&!!A}),nt=()=>{var g;if(y.value=!0,je.value=null,X.value=null,(g=a.configuration)!=null&&g.onPaymentSuccess){a.configuration.onPaymentSuccess();return}if(A){tt();return}},ot=g=>{M.value&&(M.value={...M.value,billing_period:g},R())};return e.onMounted(()=>{r("ready")}),(g,L)=>l.value?(e.openBlock(),e.createBlock(Po,{key:0,class:"sv-checkout sv-root sv-screen sv-checkout--error"})):(e.openBlock(),e.createBlock(e.unref(Cn.ContentWithAsideLayout),{key:1,class:e.normalizeClass(["sv-checkout sv-root sv-screen",{"sv-checkout--paid":e.unref(y)}])},e.createSlots({header:e.withCtx(()=>[e.createElementVNode("div",Pa,[e.createVNode(pe._sfc_main,{class:"min-h-[52px] w-96"},{default:e.withCtx(()=>{var O,G,U,q;return[e.unref(P)&&e.unref(M)&&fe.value?(e.openBlock(),e.createBlock(xo,{key:0,class:"sv-checkout__title","trial-start-date":Re.value,"trial-period":e.unref(c),"subscription-start-date":fe.value,"subscription-name":((O=e.unref(M))==null?void 0:O.name)??"",amount:(G=e.unref(P))==null?void 0:G.invoice_amount_including_tax,"due-today-amount":e.unref(N)??((U=e.unref(P))==null?void 0:U.invoice_amount_including_tax),"recurring-amount":J.value,"has-one-off-charges":e.unref(z),"has-recurring-charge":_e.value,"has-usage-charges":ve.value,"billing-period":(q=e.unref(M))==null?void 0:q.billing_period,"country-code":e.unref(_).form.value.country},null,8,["trial-start-date","trial-period","subscription-start-date","subscription-name","amount","due-today-amount","recurring-amount","has-one-off-charges","has-recurring-charge","has-usage-charges","billing-period","country-code"])):e.createCommentVNode("",!0)]}),_:1})])]),content:e.withCtx(()=>{var O,G,U;return[e.unref(y)?(e.openBlock(),e.createBlock(Do,{key:0,class:"sv-checkout__completed-payment",onContinueToMerchant:tt})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.unref(M)&&e.unref(D)?(e.openBlock(),e.createBlock(At,{key:0,class:"sv-checkout__mobile-order-summary",subscription:e.unref(M),invoice:e.unref(P),"invoice-preview-by-billing-period":e.unref(Z),"trial-invoice":e.unref(m),"enabled-pricing-ids":Ae.value,"trial-period":e.unref(c),avatar:(O=u.value)==null?void 0:O.avatar,"is-paid":e.unref(y),"is-usage-based":Ne.value,"is-preview-and-payment-methods-pending":e.unref(S)||e.unref($),"country-code":e.unref(_).form.value.country,collapsible:"collapsed",variant:"products-inline",onBillingPeriodChange:ot},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"])):e.createCommentVNode("",!0),on.value&&e.unref(M)?(e.openBlock(),e.createBlock(e.unref(i),{key:1,"seats-values":Ze.value,"onUpdate:seatsValues":L[0]||(L[0]=q=>Ze.value=q),"units-values":Xe.value,"onUpdate:unitsValues":L[1]||(L[1]=q=>Xe.value=q),"enabled-pricing-ids":Ae.value,"onUpdate:enabledPricingIds":L[2]||(L[2]=q=>Ae.value=q),class:"sv-checkout__plan-customization",subscription:e.unref(M),"initial-seats-values":(G=e.unref(_).initialState)==null?void 0:G.value.seatsValues,"initial-units-values":(U=e.unref(_).initialState)==null?void 0:U.value.unitsValues,"billing-period":e.unref(M).billing_period,currency:Qe.value},null,8,["seats-values","units-values","enabled-pricing-ids","subscription","initial-seats-values","initial-units-values","billing-period","currency"])):e.createCommentVNode("",!0),W.value&&e.unref(_).form.value.country&&e.unref(N)&&We.value?(e.openBlock(),e.createBlock(ha,{key:2,class:"sv-checkout__express-payment-methods",amount:e.unref(N),"country-code":e.unref(_).form.value.country,locale:e.unref(f),"payment-methods-options-response":e.unref(k)??[],"billing-information":We.value,"on-billing-information-change":e.unref(Y),context:e.unref(I),"validate-on-submit":ae,onUpdateBillingInformation:tn,onPaymentSuccess:nt,onPaymentFailed:ee},null,8,["amount","country-code","locale","payment-methods-options-response","billing-information","on-billing-information-change","context"])):e.createCommentVNode("",!0),e.createVNode(No,{modelValue:e.unref(_).form.value,"onUpdate:modelValue":L[3]||(L[3]=q=>e.unref(_).form.value=q),class:"sv-checkout__customer-form",validation:e.unref(_).validation,"read-only-email":e.unref(T),"show-customer-info-on-top":nn.value||e.unref(y),"is-billing-information-mandatory":Wt.value,"get-is-field-required":e.unref(_).getIsFieldRequired,"read-only":e.unref(y)},null,8,["modelValue","validation","read-only-email","show-customer-info-on-top","is-billing-information-mandatory","get-is-field-required","read-only"]),e.createElementVNode("div",Da,[e.createVNode(pe._sfc_main,{variant:"section",class:"min-h-[130px]"},{default:e.withCtx(()=>{var q,he;return[!e.unref(S)||e.unref(S)&&e.unref(k).length>0?(e.openBlock(),e.createElementBlock("div",Ta,[e.createVNode(e.unref(w._sfc_main),{variant:"heading-3",tag:"h2",class:"sv-checkout__payment-methods-title mb-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Payment method",id:"checkout.payment_method_block.title",description:"The title of the payment method block in the checkout form"})),1)]),_:1}),e.unref(_).form.value.country?e.unref(h)?(e.openBlock(),e.createBlock(Me._sfc_main,{key:1,class:"sv-checkout__payment-methods-error",icon:"error"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Could not load payment methods",id:"checkout.payment_method_block.load_failed_title",description:"The title shown when the payment methods failed to load"})),1)]),message:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Check your connection and try again.",id:"checkout.payment_method_block.load_failed_message",description:"The message shown when the payment methods failed to load"})),1)]),action:e.withCtx(()=>[e.createVNode(e.unref(ie._sfc_main),{type:"button",intent:"secondary",size:"sm",class:"sv-action sv-action--secondary sv-checkout__payment-methods-retry",onClick:e.unref(v)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Try again",id:"checkout.payment_method_block.load_failed_retry_button.label",description:"The label of the button that loads the payment methods again"})),1)]),_:1},8,["onClick"])]),_:1})):e.unref(k).length===0?(e.openBlock(),e.createBlock(Me._sfc_main,{key:2,class:"sv-checkout__payment-methods-empty",icon:"credit_card_off"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"No payment methods available",id:"checkout.payment_method_block.no_payment_methods_available_title",description:"The title shown when there are no available payment methods"})),1)]),_:1})):e.unref(N)&&e.unref(_).form.value.country?(e.openBlock(),e.createElementBlock("div",wa,[e.createElementVNode("div",{class:e.normalizeClass({"pointer-events-none opacity-60":H.value})},[e.createVNode(e.unref(o),{ref_key:"paymentIntegrationFormRef",ref:d,"country-code":e.unref(_).form.value.country,context:e.unref(I),amount:e.unref(N),email:e.unref(_).form.value.email,variant:"AUTHORIZE","payment-method-options":e.unref(k)??[],"validate-on-submit":ae,"redirects-on-success":ln.value,"force-store-payment-method":"","billing-entity-name":(he=(q=e.unref(M))==null?void 0:q.billing_entity)==null?void 0:he.legal_name,onPaymentSuccess:nt,onPaymentFailed:ee,onInvalid:re,onReady:L[4]||(L[4]=Ue=>r("ready"))},null,8,["country-code","context","amount","email","payment-method-options","redirects-on-success","billing-entity-name"])],2)])):e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Me._sfc_main,{key:0,class:"sv-checkout__payment-methods-empty",icon:"captive_portal"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Select your billing country",id:"checkout.payment_method_block.no_country_selected_title",description:"The title shown when no country is selected"})),1)]),message:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Payment methods will be shown after you select the billing country.",id:"checkout.payment_method_block.no_country_selected_message",description:"The message shown when no country is selected"})),1)]),_:1}))])):e.createCommentVNode("",!0)]}),_:1})])],64))]}),aside:e.withCtx(()=>[e.createElementVNode("div",Sa,[e.createVNode(pe._sfc_main,{variant:"section",class:"min-h-[220px]"},{default:e.withCtx(()=>{var O;return[e.unref(M)&&e.unref(P)?(e.openBlock(),e.createBlock(At,{key:0,subscription:e.unref(M),invoice:e.unref(P),"invoice-preview-by-billing-period":e.unref(Z),"trial-invoice":e.unref(m),"enabled-pricing-ids":Ae.value,"trial-period":e.unref(c),"country-code":e.unref(_).form.value.country,avatar:(O=u.value)==null?void 0:O.avatar,"is-paid":e.unref(y),"is-usage-based":Ne.value,"is-preview-and-payment-methods-pending":e.unref(S)||e.unref($),onBillingPeriodChange:ot},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"])):e.createCommentVNode("",!0)]}),_:1})]),e.unref(y)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(ka,{class:"sv-checkout__promotion-code","promotion-code":Ie.value,"onUpdate:appliedCode":L[5]||(L[5]=O=>Ie.value=O),onRemove:e.unref(an),onApply:e.unref(et)},null,8,["promotion-code","onRemove","onApply"]),e.unref(je)?(e.openBlock(),e.createBlock(e.unref(yt._sfc_main),{key:0,class:"sv-checkout__promotion-error mt-2",title:e.unref(je)},null,8,["title"])):e.createCommentVNode("",!0),X.value?(e.openBlock(),e.createBlock(e.unref(yt._sfc_main),{key:1,class:"sv-checkout__payment-error mt-2",title:X.value},null,8,["title"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ba,[e.createVNode(pe._sfc_main,{class:"sv-checkout__submit-skeleton min-h-[44px]"},{default:e.withCtx(()=>[e.unref(P)?(e.openBlock(),e.createBlock(e.unref(ie._sfc_main),{key:0,type:"button",size:"lg",class:"sv-action sv-action--primary sv-action--full-width sv-checkout__submit w-full",disabled:e.unref(rn)||e.unref(k).length===0||H.value,loading:H.value,onClick:j},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(le.value?e.unref(s)({defaultMessage:"Start trial",id:"checkout.pay_and_subscribe_button_trial.label",description:"The label of the start trial button in the checkout form"}):e.unref(s)({defaultMessage:"Pay and subscribe",id:"checkout.pay_and_subscribe_button.label",description:"The label of the pay and subscribe button in the checkout form"})),1)]),_:1},8,["disabled","loading"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(wt._sfc_main$1,{"payment-method-options":e.unref(k)},null,8,["payment-method-options"])])],64))]),_:2},[e.unref(V)&&!e.unref(y)?{name:"footer",fn:e.withCtx(()=>[e.createVNode(e.unref(w._sfc_main),{tag:"div",variant:"body-xs",color:"subtle",class:"sv-checkout__terms"},{default:e.withCtx(()=>[e.createVNode(aa,{source:e.unref(V)},null,8,["source"])]),_:1})]),key:"0"}:void 0]),1032,["class"]))}}),Oa=e.defineComponent({__name:"Checkout.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},emits:["error","ready"],setup(t,{emit:n}){var u;const o=xn.getComponentName("checkout"),i=t,a=n,r=((u=i.configuration)==null?void 0:u.couponCode)??ye.getQueryParam("coupon_code")??void 0;return(l,d)=>(e.openBlock(),e.createBlock(e.unref(w._sfc_main$1),{entry:l.$props,"component-name":e.unref(o),"allowed-portal-types":["INIT_PRICING_PLAN_SUBSCRIPTION"],onError:d[1]||(d[1]=p=>l.$emit("error",p))},{default:e.withCtx(()=>{var p,s,f,E,b;return[e.createVNode(La,{configuration:{avatar:(s=(p=t.branding)==null?void 0:p.emblem)==null?void 0:s.public_url,email:(f=t.configuration)==null?void 0:f.email,countryCode:(E=t.configuration)==null?void 0:E.countryCode,enabledPricingIds:(b=t.configuration)==null?void 0:b.enabledPricingIds,couponCode:e.unref(r)},onReady:d[0]||(d[0]=D=>a("ready"))},e.createSlots({_:2},[l.$slots["terms-and-conditions"]?{name:"terms-and-conditions",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"terms-and-conditions")]),key:"0"}:void 0]),1032,["configuration"])]}),_:3},8,["entry","component-name"]))}}),{define:Va}=w.createSolvimonElement(Oa,"checkout");exports.FALLBACK_SEATS_NUMBER=Kt;exports.FALLBACK_UNITS_NUMBER=qt;exports._sfc_main=Ht;exports.defineSolvimonCheckout=Va;exports.getPricingItemByPricingConfigId=to;
|