@solvimon/solvimon-web 0.1.0-alpha.21 → 0.1.0-alpha.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-B9WTpz0k.js → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Co3XAxaY.js} +1 -1
- package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DJCMa2Lz.mjs → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DFv-awxb.mjs} +6 -6
- package/dist/{Avatar.vue.es-CJw5z7Uu.js → Avatar.vue.es-D42J_izE.js} +1 -1
- package/dist/{Avatar.vue.es-ChcLSNaN.mjs → Avatar.vue.es-DNJ-jexx.mjs} +1 -1
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-CTQ5RMtx.js → BillingInformation.vue_vue_type_script_setup_true_lang-BEVkWJXT.js} +1 -1
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DApMAncl.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-D1uVidXk.mjs} +4 -4
- package/dist/{Button.vue.es-VQCd3V3C.mjs → Button.vue.es-Dz-2L8dJ.mjs} +1 -1
- package/dist/{Button.vue.es-BWl37nzm.js → Button.vue.es-M_jXZda4.js} +1 -1
- package/dist/{Checkout.entry.ce-DRHqEFd7.mjs → Checkout.entry.ce-B5-0AM67.mjs} +1298 -1225
- package/dist/Checkout.entry.ce-C52gkrNZ.js +1 -0
- package/dist/{Chip.vue.es-CXG8o1Qf.mjs → Chip.vue.es-DMK9C78d.mjs} +2 -2
- package/dist/{Chip.vue.es-DUgjuRWm.js → Chip.vue.es-G8doKsZb.js} +1 -1
- package/dist/{ContextMenu.vue.es-BllxeDTt.js → ContextMenu.vue.es-B3Rz6Ojk.js} +1 -1
- package/dist/{ContextMenu.vue.es-C6TKlSXs.mjs → ContextMenu.vue.es-CzkkNoJG.mjs} +4 -4
- package/dist/{CustomerBillingInformation.vue.es-CMCZ-lIM.js → CustomerBillingInformation.vue.es-BmtU9Pk0.js} +1 -1
- package/dist/{CustomerBillingInformation.vue.es-CKQH_ds0.mjs → CustomerBillingInformation.vue.es-Db6bN2RZ.mjs} +2 -2
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-n097Xf1H.js → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BGHaTx1A.js} +1 -1
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BxwllXwU.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-fESZVyPe.mjs} +5 -5
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-Cnlbp0om.js +1 -0
- package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-CtaoLbrM.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DdMHG1_Y.mjs} +485 -501
- package/dist/{DividerText.vue.es-BBdydUy_.js → DividerText.vue.es-D-QxT2OD.js} +1 -1
- package/dist/{DividerText.vue.es-Bomiy4if.mjs → DividerText.vue.es-IK2fns6f.mjs} +1 -1
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DXO9xpFT.js → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CM_8Asmw.js} +1 -1
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C9elbdbF.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-lhJnqrrh.mjs} +4 -4
- package/dist/{ErrorNotification.vue.es-C6ngWAVU.mjs → ErrorNotification.vue.es-BGckEwHf.mjs} +2 -2
- package/dist/{ErrorNotification.vue.es-0ZC_DozN.js → ErrorNotification.vue.es-Cd2UKPAz.js} +1 -1
- package/dist/{IconButton.vue.es-DGLIdHkR.js → IconButton.vue.es-BTAkuFsm.js} +1 -1
- package/dist/{IconButton.vue.es-DAR7e8NA.mjs → IconButton.vue.es-C4dQEQAc.mjs} +2 -2
- package/dist/{IconTitle.vue.es-Bbusc4wK.mjs → IconTitle.vue.es-BmX68uJx.mjs} +3 -3
- package/dist/{IconTitle.vue.es-D-q6w2E-.js → IconTitle.vue.es-CmR2xoeu.js} +1 -1
- package/dist/{Input.vue.es-AY1c0Rui.mjs → Input.vue.es-BGPELaZU.mjs} +2 -2
- package/dist/{Input.vue.es-BN95nPBw.js → Input.vue.es-CTOrmrcB.js} +1 -1
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-1WjSbPEP.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CMEOOuSU.mjs} +2 -2
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-qiBCPY8l.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-bheNAKzK.js} +1 -1
- package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-Xo9BR6AD.js +1 -0
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-D99nuBRE.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-avhwysNq.mjs} +3 -3
- package/dist/{InvoiceSummary.vue.es-Bs5c2Ovx.mjs → InvoiceSummary.vue.es-BWLiwlNs.mjs} +692 -705
- package/dist/InvoiceSummary.vue.es-hpG8Tq1D.js +1 -0
- package/dist/{Modal.vue.es-Chi6_MH_.js → Modal.vue.es-BD4vUaOQ.js} +1 -1
- package/dist/{Modal.vue.es-DSkC4eMv.mjs → Modal.vue.es-B_G8NQS2.mjs} +5 -5
- package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-vD88j_U7.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-BnilyGBO.mjs} +3 -3
- package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-Draz_8Ts.js → PaymentErrorCard.vue_vue_type_script_setup_true_lang-CSv-Luvz.js} +1 -1
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-Db6jAkqD.js → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DIJbzWMV.js} +1 -1
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DVif_ME8.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DuorCFo9.mjs} +3 -3
- package/dist/{PaymentHistoryBlock-budeR7ep.mjs → PaymentHistoryBlock-ComJzB3H.mjs} +1 -1
- package/dist/{PaymentHistoryBlock-DGJ_PiVq.js → PaymentHistoryBlock-DSHW_eW1.js} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Dv-3suBX.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DUN0Hf2v.js} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C28ofG7N.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-hjtksV2D.mjs} +4 -4
- package/dist/{PaymentIntegrationForm-Crrhar96.mjs → PaymentIntegrationForm-CH5B6BY5.mjs} +1 -1
- package/dist/{PaymentIntegrationForm-DqqGcEP1.js → PaymentIntegrationForm-CwfCLnKt.js} +1 -1
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-C4bk0m8g.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BqYk4_T9.mjs} +3 -3
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CcEEdHQJ.js → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DzSQC951.js} +1 -1
- package/dist/{PaymentIntegrationFormAdyen-DM-xMcm0.mjs → PaymentIntegrationFormAdyen-DfN7cPYZ.mjs} +5 -5
- package/dist/{PaymentIntegrationFormAdyen-DronjwO3.js → PaymentIntegrationFormAdyen-Q48aDXR7.js} +1 -1
- package/dist/{PaymentIntegrationFormStripe-ybM6wirp.js → PaymentIntegrationFormStripe-BSEqarl7.js} +1 -1
- package/dist/{PaymentIntegrationFormStripe-yBm4KnpV.mjs → PaymentIntegrationFormStripe-CBsXDuhy.mjs} +4 -4
- package/dist/{PaymentMethod.vue.es-Ctw9Es1g.js → PaymentMethod.vue.es-D18g-QB4.js} +1 -1
- package/dist/{PaymentMethod.vue.es-BdMcKq8_.mjs → PaymentMethod.vue.es-DkQdPXfk.mjs} +3 -3
- package/dist/{PaymentMethodForm-C1bIGX10.mjs → PaymentMethodForm-CpIZKfPH.mjs} +1 -1
- package/dist/{PaymentMethodForm-BQ5TVHlS.js → PaymentMethodForm-DK8ntFA0.js} +1 -1
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-5KKkuVt5.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-C1tGJsay.mjs} +5 -5
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-V88bCeDt.js → PaymentMethodForm.vue_vue_type_script_setup_true_lang-D7fDguwa.js} +1 -1
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-CnmZ9dvP.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-C6BcIkEV.mjs} +6 -6
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-B_207kq5.js → PaymentMethodsList.vue_vue_type_script_setup_true_lang-H3vrPllf.js} +1 -1
- package/dist/PlanCustomizationEditor-0zCXN-cv.mjs +877 -0
- package/dist/PlanCustomizationEditor-XpofGULc.js +1 -0
- package/dist/{PricingGroupRangeInput.vue.es-Bnb-ARie.mjs → PricingGroupRangeInput.vue.es-8_5nfZDI.mjs} +4 -4
- package/dist/{PricingGroupRangeInput.vue.es-D82XvoC_.js → PricingGroupRangeInput.vue.es-QnpfHxaY.js} +1 -1
- package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CxMkCmti.js → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CGJhKKNL.js} +1 -1
- package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-skQMgHEL.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-t6h1j6WD.mjs} +5 -5
- package/dist/{RadioGroupExtended.vue.es-WDbo_yj1.mjs → RadioGroupExtended.vue.es-C92xlCFQ.mjs} +3 -3
- package/dist/{RadioGroupExtended.vue.es-B1YtLNKG.js → RadioGroupExtended.vue.es-Cb1iD73r.js} +1 -1
- package/dist/{Section.vue.es-DuK52y67.js → Section.vue.es-Btff-cLY.js} +1 -1
- package/dist/{Section.vue.es-By1JltGi.mjs → Section.vue.es-DQ5H7mqW.mjs} +1 -1
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Ct3ZNq-j.js → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BfvX14E3.js} +1 -1
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-CS3KIkPL.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DKsunuGT.mjs} +6 -6
- package/dist/{SubscriptionSchedules-DDCjVEbG.mjs → SubscriptionSchedules-Dc0rUnnf.mjs} +1 -1
- package/dist/{SubscriptionSchedules-DEjIERyF.js → SubscriptionSchedules-pzNsego6.js} +1 -1
- package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-JAedXFzq.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Brs9qDs5.mjs} +1655 -1620
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-nmVRb6hj.js +1 -0
- package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-DVMS4gJQ.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-C1mkIPMr.mjs} +3 -3
- package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-D-Fa54M6.js → SubscriptionSummary.vue_vue_type_script_setup_true_lang-s5_uhyuB.js} +1 -1
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DiXmEjUD.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-CFmCJK8M.js} +1 -1
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BckZJtOc.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DSoNs7Xx.mjs} +7 -7
- package/dist/{TooltipParagraph.vue.es-sTgWAgcd.js → TooltipParagraph.vue.es-BaqCDjl8.js} +1 -1
- package/dist/{TooltipParagraph.vue.es-DYu2ReL7.mjs → TooltipParagraph.vue.es-CIedcXGT.mjs} +1 -1
- package/dist/{TrialChip.vue.es-Cl-9_pdr.js → TrialChip.vue.es-BzNI94k0.js} +1 -1
- package/dist/{TrialChip.vue.es-DX53r0ku.mjs → TrialChip.vue.es-DkBuMNr_.mjs} +2 -2
- package/dist/{cn.es-DjnGlmqV.mjs → cn.es-BGqYNPM3.mjs} +2 -2
- package/dist/{cn.es-CNvIP217.js → cn.es-CvmLj7KH.js} +1 -1
- 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 +3 -3
- 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 +3 -3
- 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-Com2NiGU.mjs → customElements-CSE7dwUr.mjs} +312 -282
- package/dist/{customElements-Bt8PbjIn.js → customElements-Vox1PB6G.js} +42 -18
- package/dist/{customer-CKgMJEgv.mjs → customer-5krPxZ8i.mjs} +1 -1
- package/dist/{customer-Q4JGfVfq.js → customer-Dsq-Moea.js} +1 -1
- package/dist/{de-DE-DqLD4IX2.js → de-DE-BSlbAnPE.js} +1 -1
- package/dist/{de-DE-Ds_yJLS3.js → de-DE-C3DzP1nj.js} +1 -1
- package/dist/{de-DE-DBO5f-Eu.mjs → de-DE-DXsG-vXA.mjs} +13 -8
- package/dist/{de-DE-CVCmzlNH.mjs → de-DE-DsFtpLsx.mjs} +2 -0
- package/dist/{en-US-CvFmmI_O.js → en-US-9xdcz3T5.js} +1 -1
- package/dist/{en-US-3UmnS23B.mjs → en-US-C939IZ5i.mjs} +13 -8
- package/dist/{en-US-DVR9O7b_.mjs → en-US-DvkvbV0p.mjs} +2 -0
- package/dist/{en-US-C51ILrVv.js → en-US-X_pSFsNm.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{invoices-CV9iAUHf.mjs → invoices-DRgfpkJ6.mjs} +8 -5
- package/dist/invoices-xOV2YaEV.js +1 -0
- package/dist/{it-IT-CxBRisRm.mjs → it-IT-BxpwB3oJ.mjs} +8 -3
- package/dist/it-IT-DT3rfjOY.js +1 -0
- package/dist/{it-IT-CDMnnFKZ.mjs → it-IT-TE7oqvXa.mjs} +2 -0
- package/dist/{it-IT-Dxw59eR_.js → it-IT-YBtHAao1.js} +1 -1
- package/dist/{nl-NL-Btbfd9p2.js → nl-NL-C8wnyKju.js} +1 -1
- package/dist/nl-NL-DfkhOJKc.js +1 -0
- package/dist/{nl-NL-o3UvtSNg.mjs → nl-NL-Di3-JArV.mjs} +2 -0
- package/dist/{nl-NL-BWGkVweu.mjs → nl-NL-na2I4aiP.mjs} +8 -3
- package/dist/{paymentMethods-ChWAwDSF.js → paymentMethods-CRDIw9lz.js} +1 -1
- package/dist/{paymentMethods-BuwoJ1y9.mjs → paymentMethods-PmkHYomw.mjs} +1 -1
- package/dist/{payments-C_cMXQzE.mjs → payments-Dvqh6CGW.mjs} +1 -1
- package/dist/{payments-DGckugN0.js → payments-jAgXhdp_.js} +1 -1
- package/dist/pricingItemConfigs.es-D4aYkYcf.js +1 -0
- package/dist/{pricingItemConfigs.es-DMf1e6y7.mjs → pricingItemConfigs.es-ORxsk_YS.mjs} +23 -22
- package/dist/pricingPlanSchedule-BM8vsKkV.js +1 -0
- package/dist/pricingPlanSchedule-BPrS2WRd.mjs +132 -0
- package/dist/screens/Checkout/Checkout.cjs +1 -1
- package/dist/screens/Checkout/Checkout.mjs +2 -2
- package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.mjs +11 -11
- package/dist/screens/PayInvoice/PayInvoice.cjs +1 -1
- package/dist/screens/PayInvoice/PayInvoice.mjs +13 -13
- 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 +20 -20
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -1
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +19 -19
- package/dist/{subscription-CvfAEJeP.mjs → subscription-CrVOr5MF.mjs} +1 -1
- package/dist/{subscription-9GORG-Gt.js → subscription-ZA62t4E9.js} +1 -1
- package/dist/{subscriptions-B5VqRayX.mjs → subscriptions-XDyI2Cqm.mjs} +1 -1
- package/dist/{subscriptions-X0Ciw8z3.js → subscriptions-fJcj88X9.js} +1 -1
- package/dist/types/components/customer/CheckoutForm/CheckoutForm.types.d.ts +1 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/PlanCustomizationEditor.types.d.ts +1 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/UnitsEditor.types.d.ts +6 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/UnitsEditorItem.types.d.ts +6 -0
- package/dist/types/composables/useInvoicePreview.types.d.ts +1 -0
- package/dist/types/public/components/Invoice/Invoice.types.d.ts +1 -1
- package/dist/types/public/components/InvoiceHeader/InvoiceHeader.types.d.ts +1 -1
- package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +1 -1
- package/dist/{useActionDispatchProvider-e2lQXTid.mjs → useActionDispatchProvider-B8-oycQk.mjs} +1 -1
- package/dist/{useActionDispatchProvider-B54GYEY7.js → useActionDispatchProvider-CNAuaHdm.js} +1 -1
- package/dist/{useCustomer-CC9zxV6c.mjs → useCustomer-CP8eWUZV.mjs} +1 -1
- package/dist/{useCustomer-BJwJ9BkJ.js → useCustomer-DSx-wN-6.js} +1 -1
- package/dist/useCustomerFormLabels-DW6jnDYH.mjs +968 -0
- package/dist/useCustomerFormLabels-TVTgy0MT.js +1 -0
- package/dist/{useExperimentalFeature-B0IFn3Uw.mjs → useExperimentalFeature-BvE_EOX-.mjs} +1 -1
- package/dist/{useExperimentalFeature-8Mzpj5wc.js → useExperimentalFeature-CC-DrIcL.js} +1 -1
- package/dist/{useInvoiceData-Bblwdl0f.js → useInvoiceData-CRRPdXc6.js} +1 -1
- package/dist/{useInvoiceData-6mHUZC9a.mjs → useInvoiceData-D8ds05CX.mjs} +2 -2
- package/dist/{useInvoicesList-_U1-tn9_.js → useInvoicesList-DIfQcvER.js} +1 -1
- package/dist/{useInvoicesList-B5H5JfvY.mjs → useInvoicesList-SJU5YWBQ.mjs} +7 -7
- package/dist/{useLoadInitialData-CezlvhBV.js → useLoadInitialData-DsabgMLZ.js} +1 -1
- package/dist/{useLoadInitialData-ux_wpNiR.mjs → useLoadInitialData-MUljS38K.mjs} +1 -1
- package/dist/{usePaymentMethodAvailability-DRwrBdto.js → usePaymentMethodAvailability-Bt7P9InI.js} +1 -1
- package/dist/{usePaymentMethodAvailability-CkR4TwoV.mjs → usePaymentMethodAvailability-D0NUanyF.mjs} +4 -4
- package/dist/{usePaymentMethodOptions-BfnLBZOo.mjs → usePaymentMethodOptions-B7JYkGsw.mjs} +1 -1
- package/dist/{usePaymentMethodOptions-B6GIM9q4.js → usePaymentMethodOptions-cT1o-BA1.js} +1 -1
- package/dist/{usePaymentMethods-C3QfLSrP.mjs → usePaymentMethods-CpzqXQUT.mjs} +1 -1
- package/dist/{usePaymentMethods-GFmQRp0X.js → usePaymentMethods-DNVw2eVg.js} +1 -1
- package/dist/{usePayments-SQF_V7oL.js → usePayments-D9Eo-uBk.js} +1 -1
- package/dist/{usePayments-BkwGyZT0.mjs → usePayments-Gx9kBvNB.mjs} +6 -6
- package/dist/{usePortal-DDG9b6FI.mjs → usePortal-3VCZwSUE.mjs} +1 -1
- package/dist/{usePortal-BdM7hDge.js → usePortal-DsebXdhx.js} +1 -1
- package/dist/{useSubscription-BJJYHYgr.mjs → useSubscription-DnL1wVh1.mjs} +1 -1
- package/dist/{useSubscription-Q4C2DPhw.js → useSubscription-K_gP9TeX.js} +1 -1
- package/dist/{useTimePeriod.es-pepm2TpV.js → useTimePeriod.es-CmltiTE-.js} +1 -1
- package/dist/{useTimePeriod.es-9tZvAhyb.mjs → useTimePeriod.es-DMtKzcoB.mjs} +1 -1
- package/dist/wallets.es-CNIMW5ay.js +1 -0
- package/dist/wallets.es-eH2C2ygn.mjs +102 -0
- package/package.json +1 -1
- package/dist/Checkout.entry.ce-BTVuGyNq.js +0 -1
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-C_yKvYtG.js +0 -1
- package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-BXTInmf9.js +0 -1
- package/dist/InvoiceSummary.vue.es-B0MPR0oI.js +0 -1
- package/dist/PlanCustomizationEditor-CCOTD6Qu.mjs +0 -769
- package/dist/PlanCustomizationEditor-CiZnVCM6.js +0 -1
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BlX0W6lw.js +0 -1
- package/dist/invoices-CvpL4rv5.js +0 -1
- package/dist/it-IT-CFEfSpPH.js +0 -1
- package/dist/nl-NL-jtVgF3jx.js +0 -1
- package/dist/pricingItemConfigs.es-DlybwIh1.js +0 -1
- package/dist/pricingPlanSchedule-COfmWv_o.js +0 -1
- package/dist/pricingPlanSchedule-J1nb9pCu.mjs +0 -129
- package/dist/useCustomerFormLabels-72Pxw8X5.js +0 -1
- package/dist/useCustomerFormLabels-V2YuYMLU.mjs +0 -930
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("vue"),Mt=require("./Section.vue.es-Btff-cLY.js"),Q=require("./formatting.es-C72Nsrmh.js"),yt=require("./comparators.es-OGt19O9U.js"),Z=require("./Chip.vue.es-G8doKsZb.js"),ne=require("./Expand.vue.es-BtM0EZEr.js"),oe=require("./cn.es-CvmLj7KH.js"),E=require("./customElements-Vox1PB6G.js"),G=require("./floating-ui.vue.es-Bly3DGWm.js"),bt=require("./IconTitle.vue.es-CmR2xoeu.js"),L=require("./Button.vue.es-M_jXZda4.js"),pe=require("./index.es-BclokHQX.js"),ge=require("./IconButton.vue.es-BTAkuFsm.js"),Rt=require("./getComposedString.es-haS4bAj7.js"),A=require("./useService-H7BjLg8P.js"),ue=require("./DividerText.vue.es-D-QxT2OD.js"),z=require("./Amount.vue.es-DExaYBqm.js"),ce=require("./Comparators.vue.es-DmkxV0gb.js"),I=require("./TooltipParagraph.vue.es-BaqCDjl8.js"),T=require("./pricingItemConfigs.es-D4aYkYcf.js"),fe=require("./slots.es-T9ZJRGtG.js"),H=require("./typeGuards.es-DS3vZaJn.js"),at=require("./PricingGroupRangeInput.vue.es-QnpfHxaY.js"),At=require("./Avatar.vue.es-D42J_izE.js"),rt=require("./TrialChip.vue.es-BzNI94k0.js"),me=require("./object.es-CdriXMPs.js"),Ft=1122.515625;function Zt(t,n,i,o){const s=n.getBoundingClientRect().top+window.scrollY,r=Math.floor(s/o),f=[...t.querySelectorAll(i)];for(let l=f.length-1;l>=0;l--){const v=f[l],c=v.getBoundingClientRect().top+window.scrollY,d=Math.floor(c/o);if(c<s&&d===r)return v;if(c<s&&d<r)break}return null}function Ut(t,n){if(!(n!=null&&n.length))return 0;const i=new Set;return n.reduce((o,s)=>{const r=t.querySelector(s);return!r||i.has(r)?o:(i.add(r),o+r.getBoundingClientRect().height)},0)}function Ht(t,n,i={enabled:!1}){const o=i.pageHeight??Ft,s=i.pushThreshold??.6,r=i.smallOverflowRatio??.1,f=[],l=b=>{var m;if((m=i.expandSelectors)!=null&&m.length)for(const p of i.expandSelectors)b.querySelectorAll(p).forEach(g=>{getComputedStyle(g).display==="none"&&(g.style.display="block",f.push(g))})},v=()=>{f.forEach(b=>b.style.display="none"),f.length=0},c=()=>{const b=t.value;if(!b)return;l(b);const p=((b.getBoundingClientRect().top+window.scrollY)%o+o)%o;[...b.querySelectorAll(n)].forEach(C=>{C.style.marginTop="";const _=C.getBoundingClientRect().top+window.scrollY,N=C.getBoundingClientRect().height,h=((_-p)%o+o)%o,a=o-h,y=Ut(C,i.protectedTopSelectors);if(N<=a)return;const u=(k,S)=>{const w=i.companionSelector?Zt(b,k,i.companionSelector,o):null;if(w){const D=((w.getBoundingClientRect().top+window.scrollY-p)%o+o)%o,$=o-D;D>o*.5?w.style.marginTop=`${$}px`:k.style.marginTop=`${S}px`}else k.style.marginTop=`${S}px`};if(y>0&&a<y){u(C,a);return}if(N>o){h>o*.5&&u(C,a);return}const x=(N-a)/o<r,B=a/N<s;(x||B)&&u(C,a)})},d=()=>{const b=t.value;b&&(v(),b.querySelectorAll(n).forEach(m=>{m.style.marginTop=""}),i.companionSelector&&b.querySelectorAll(i.companionSelector).forEach(m=>{m.style.marginTop=""}))};return e.onMounted(()=>{i.enabled&&(window.addEventListener("beforeprint",c),window.addEventListener("afterprint",d))}),e.onUnmounted(()=>{i.enabled&&(window.removeEventListener("beforeprint",c),window.removeEventListener("afterprint",d))}),{adjust:c,reset:d}}const Gt=(t,n={})=>{const{estimatedHeight:i,mountMargin:o="200px 0px",unmountMargin:s="600px 0px",keepMountedOnce:r=!1}=n,f=()=>e.unref(n.disabled)??!1,l=e.ref(f()),v=e.ref(null),c=async()=>{l.value=!0,await e.nextTick();const p=e.unref(t);p&&p.offsetHeight>0&&(v.value=p.offsetHeight)},d=pe.useIntersectionObserver(t,([p])=>{f()||!(p!=null&&p.isIntersecting)||(c(),r&&(d.stop(),b.stop()))},{rootMargin:o,threshold:0}),b=pe.useIntersectionObserver(t,([p])=>{f()||r||p!=null&&p.isIntersecting||(l.value=!1)},{rootMargin:s,threshold:0});d.isSupported.value||(l.value=!0),e.watch(f,p=>{p&&c()}),e.onBeforeUnmount(()=>{d.stop(),b.stop()});const m=e.computed(()=>{if(l.value)return;const p=v.value??i;return p===void 0?void 0:{minHeight:`${p}px`}});return{shouldRender:l,placeholderStyle:m}},_t=Symbol("expandedConfigs"),jt=(t={})=>{const n=e.ref(!t.defaultCollapsed),i=e.reactive(new Set),o=f=>i.has(f)?!n.value:n.value,s=(f,l)=>{l===n.value?i.delete(f):i.add(f)},r=f=>Array.isArray(f)?f:[f];return{isExpanded:o,toggle:f=>s(f,!o(f)),expand:f=>r(f).forEach(l=>s(l,!0)),collapse:f=>r(f).forEach(l=>s(l,!1)),expandAll:()=>{n.value=!0,i.clear()},collapseAll:()=>{n.value=!1,i.clear()}}},kt=(t={})=>{const n=jt(t);return e.provide(_t,n),n},qt=(t={})=>{const n=e.inject(_t,null);return n||kt(t)},Wt=Symbol("viewportGating"),Yt=()=>e.inject(Wt,!1),Kt=(t,n=!0)=>{const i=Rt.getComposedString((t.products??[]).map(o=>o.name??""));return t.name?n?`${t.name} - ${i}`:t.name:i},Jt=(t,n)=>{var i,o;return!!((i=t.enabled_pricings)!=null&&i.some(({pricing_id:s})=>s===n.id)||(o=t.override_pricings)!=null&&o.some(s=>"id"in s&&s.id===n.id||s.original_pricing_id===n.id))},ct=t=>{var n,i;return[...((n=t.enabled_pricings)==null?void 0:n.map(({pricing_id:o})=>o))??[],...((i=t.override_pricings)==null?void 0:i.map(o=>"id"in o?o.id:o.original_pricing_id))??[]]},Xt=({schedule:t,pricingItemConfigIds:n})=>{var i;const o=new Set(n);return(i=t.units)==null?void 0:i.find(s=>o.has(s.pricing_item_config_id))},Ct=({schedule:t,pricingItemConfigIds:n})=>{var i,o;const s=new Date,r=new Set(n),f=(i=t.seats_values)==null?void 0:i.map((l,v)=>({seatsValue:l,index:v})).filter(({seatsValue:l})=>{if(!r.has(l.pricing_item_config_id))return!1;const v=l.set_start_at_to_now||!l.start_at||new Date(l.start_at)<=s,c=!l.end_at||new Date(l.end_at)>s;return v&&c});return(o=f==null?void 0:f.sort((l,v)=>{const c=l.seatsValue.set_start_at_to_now?s.getTime():l.seatsValue.start_at?new Date(l.seatsValue.start_at).getTime():0,d=v.seatsValue.set_start_at_to_now?s.getTime():v.seatsValue.start_at?new Date(v.seatsValue.start_at).getTime():0;return d!==c?d-c:v.index-l.index})[0])==null?void 0:o.seatsValue},st=(t,n)=>{var i;const o=l=>l==null?void 0:l.map(v=>{var c;return{...v,configs:(c=v.configs)==null?void 0:c.map(r)}}),s=l=>l==null?void 0:l.map(v=>{var c;return{...v,configs:(c=v.configs)==null?void 0:c.map(r),billing_period_configs:o(v.billing_period_configs)}}),r=l=>{var v,c,d;const b=(v=n.included_volumes)==null?void 0:v.find(g=>g.pricing_item_config_id===l.id),m=Ct({schedule:n,pricingItemConfigIds:[l.id]})??((c=n.seats_values)==null?void 0:c.find(g=>g.pricing_item_config_id===l.id)),p=Xt({schedule:n,pricingItemConfigIds:[l.id]});return{...l,...!A.isEmpty(b)&&{default_included_volume:me.pick(b,["amount","number","reset_type"])},...!A.isEmpty(m)&&{default_seats_value:me.pick(m,"number")},...!A.isEmpty(p)&&{default_units:me.pick(p,"number")},conditions:l.conditions?{...l.conditions,configs:(d=l.conditions.configs)==null?void 0:d.map(r)}:void 0}};return{...t,entitlements:(l=>{var v,c,d;const b=g=>{var C;return(C=l.products)==null?void 0:C.some(_=>{var N;return(N=_.features)==null?void 0:N.some(h=>h.id===g.feature_id)})},m=((c=(v=n.entitlements)==null?void 0:v.filter(g=>b(g)))==null?void 0:c.reduce((g,C)=>{var _,N;const h=(N=(_=l.entitlements)==null?void 0:_.find(a=>a.feature_id===C.feature_id))==null?void 0:N.feature;return h?[...g,{...C,feature:h}]:g},[]))??[];return A.isEmpty(m)?l.entitlements:[...((d=l.entitlements)==null?void 0:d.filter(g=>b(g)&&!(m!=null&&m.some(C=>C.feature_id===g.feature_id))))??[],...m]})(t),items:(i=t.items)==null?void 0:i.map(l=>({...l,...l.configs&&{configs:l.configs.map(r)},...l.billing_period_configs&&{billing_period_configs:o(l.billing_period_configs)},...l.pricing_currency_configs&&{pricing_currency_configs:s(l.pricing_currency_configs)}}))}},dt=(t,n,i={displayDisabledAddonPricings:!1})=>{var o,s;const r=f=>i.displayDisabledAddonPricings||f.product_type!=="ADDON"||Jt(n,f);return{...t,pricing_categories:(s=(o=t.pricing_categories)==null?void 0:o.map(f=>{var l,v,c,d;return{...f,pricing_groups:(v=(l=f.pricing_groups)==null?void 0:l.map(b=>{var m,p;return{...b,pricings:(p=(m=b.pricings)==null?void 0:m.filter(r))==null?void 0:p.map(g=>st(g,n))}}))==null?void 0:v.filter(b=>!A.isEmpty(b.pricings)),pricings:(d=(c=f.pricings)==null?void 0:c.filter(r))==null?void 0:d.map(b=>st(b,n))}}))==null?void 0:s.filter(f=>i.displayDisabledAddonPricings||!(A.isEmpty(f.pricing_groups)&&A.isEmpty(f.pricings)))}},Qt=t=>t.type==="REVENUE",en=t=>t.type==="DEDUCTION",tn=t=>!!(t!=null&&t.every(Qt)),nn=t=>!!t&&t.length>0&&(t==null?void 0:t.every(en)),on=t=>["AT_MOST_ONE","EXACTLY_ONE"].includes(t.selection_constraint),ln=t=>n=>{if(!n)return 0;if(n.tier_top_bound&&H.isBandNumber(n.tier_top_bound))return t.formatNumber(+n.tier_top_bound.number);if(H.isBandCount(n.tier_top_bound))return t.formatNumber(+n.tier_top_bound.count);if(H.isBandAmount(n.tier_top_bound))return Q.formatAmount(n.tier_top_bound.amount)},an=t=>(n,i,o)=>{if(o===i.length-1)return t.infinite;if(n.tier_top_bound&&"number"in n.tier_top_bound&&H.isBandNumber(n.tier_top_bound))return t.formatNumber(+n.tier_top_bound.number);if(n.tier_top_bound&&"count"in n.tier_top_bound&&H.isBandCount(n.tier_top_bound))return t.formatNumber(+n.tier_top_bound.count);if(n.tier_top_bound&&"amount"in n.tier_top_bound&&H.isBandAmount(n.tier_top_bound))return Q.formatAmount(n.tier_top_bound.amount)},rn=(t,n)=>{var i,o;return(o=(i=t.markup)==null?void 0:i.pricing_item_configs)==null?void 0:o.find(({ids:s})=>s==null?void 0:s.includes(n.id))},cn=(t,n)=>t.type===n.type&&t.value===n.value,ut=(t,n)=>t!=null&&t.length?n?t.filter(({billing_period:i})=>cn(i,n)):t:[],xt=(t,n)=>{var i;if(!((i=t.pricing_currency_configs)!=null&&i.length)||!n)return;const o=t.pricing_currency_configs.find(s=>s.currency===n)??t.pricing_currency_configs[0];if(o)return o.fallback_currency?{config:t.pricing_currency_configs.find(r=>r.currency===o.fallback_currency),additionalFields:{use_fallback_currency:!0,fallback_currency:o.fallback_currency}}:{config:o,additionalFields:void 0}},sn=(t,n)=>{var i,o,s,r;if(!((i=t.pricing_currency_configs)!=null&&i.length))return(((o=t.billing_period_configs)==null?void 0:o.length)??0)>0;const f=xt(t,n);return(((r=(s=f==null?void 0:f.config)==null?void 0:s.billing_period_configs)==null?void 0:r.length)??0)>0},dn=(t,n,i)=>{var o,s,r,f;const{configs:l,billing_period_configs:v,...c}=t;if(!((o=t.pricing_currency_configs)!=null&&o.length)&&((s=t.billing_period_configs)!=null&&s.length)){const b=ut(t.billing_period_configs,i).flatMap(m=>(m.configs??[]).map(p=>{var g;return{...p,details:{...p.details,pricing_period:((g=p.details)==null?void 0:g.pricing_period)??m.billing_period}}}));return{...c,configs:b}}if(!((r=t.pricing_currency_configs)!=null&&r.length)||!n)return t;const d=xt(t,n);if(!(d!=null&&d.config))return t;if((f=d.config.billing_period_configs)!=null&&f.length){const b=ut(d.config.billing_period_configs,i).flatMap(m=>(m.configs??[]).map(p=>{var g;return{...p,...d.additionalFields,details:{...p.details,pricing_period:((g=p.details)==null?void 0:g.pricing_period)??m.billing_period}}}));return{...c,configs:b}}return{...c,configs:(d.config.configs??[]).map(b=>({...b,...d.additionalFields}))}},mt=(t,n,i)=>{var o;return(o=t.items)!=null&&o.length?t.items.map(s=>dn(s,n,i)):t.items},un=(t,n,i)=>{var o;return{...t,pricing_categories:(o=t.pricing_categories)==null?void 0:o.map(s=>{var r,f;return{...s,pricings:(r=s.pricings)==null?void 0:r.map(l=>({...l,items:mt(l,n,i)})),pricing_groups:(f=s.pricing_groups)==null?void 0:f.map(l=>{var v;return{...l,pricings:(v=l.pricings)==null?void 0:v.map(c=>({...c,items:mt(c,n,i)}))}})}})}},mn=(t,n)=>{const i=[],o=s=>{for(const r of s??[]){const f=(r.items??[]).filter(l=>sn(l,n)).map(l=>l.id);i.push([r.id,f])}};for(const s of t.pricing_categories??[]){o(s.pricings);for(const r of s.pricing_groups??[])o(r.pricings)}return Object.fromEntries(i)},pn=t=>{var n;for(const i of(t==null?void 0:t.pricing_categories)??[]){for(const o of i.pricing_groups??[])if(o.pricings[0])return o.pricings[0].id;if((n=i.pricings)!=null&&n[0])return i.pricings[0].id}},gn=(t,n)=>{if(t.length>0)return t;const i=pn(n);return i?[i]:[]},fn=t=>"object_type"in t,ye=t=>(t.pricing_categories??[]).filter(fn),vn=t=>ye(t).flatMap(n=>n.pricings??[]),hn=t=>ye(t).flatMap(n=>n.pricing_groups??[]),yn=t=>vn(t).length>0||hn(t).length>0,bn=t=>({object_type:"PRICING_PLAN",id:t.pricing_plan_id??`direct_${t.id}`,reference:`direct_${t.id}`,name:"",type:"CUSTOM",variant:"DEFAULT"}),pt=t=>{const{entitlements:n,...i}=t;return i},_n=t=>{const{pricings:n,pricing_groups:i,...o}=t;return{...o,pricings:n==null?void 0:n.map(pt),pricing_groups:i==null?void 0:i.map(s=>({...s,pricings:(s.pricings??[]).map(pt)}))}},kn=(t,n)=>{if(!yn(t))return;const i=(n==null?void 0:n.pricingPlan)??bn(t);return{object_type:"PRICING_PLAN_VERSION",id:`direct_${t.id}`,pricing_plan_id:i.id,pricing_plan:i,version:1,status:"ACTIVE",pricing_categories:ye(t).map(_n)}},be=e.defineComponent({__name:"CardContent",props:{spacing:{default:"md"}},setup(t){return(n,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"p-2":t.spacing==="xs","px-4 py-3":t.spacing==="sm","p-4":t.spacing==="md","px-8 py-6":t.spacing==="lg"})},[e.renderSlot(n.$slots,"default")],2))}}),ve="w-6",Cn=e.defineComponent({__name:"CollapsibleList",props:{type:{default:"ordered"},hasAddButton:{type:Boolean},i18n:{}},emits:["add"],setup(t){const n=t,i=e.computed(()=>n.type==="ordered"?"ol":"ul");return(o,s)=>{var r;return e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value),null,{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3})),e.createElementVNode("div",{class:e.normalizeClass(["flex flex-col items-center justify-center",e.unref(ve)])},[t.hasAddButton?(e.openBlock(),e.createBlock(e.unref(L._sfc_main),{key:0,square:"","aria-label":((r=t.i18n)==null?void 0:r.addButtonLabel)??"Add item",intent:"secondary",size:"sm","icon-prefix":"add",onClick:s[0]||(s[0]=f=>o.$emit("add"))},null,8,["aria-label"])):e.createCommentVNode("",!0)],2)])}}}),xn=e.defineComponent({__name:"CombinedVolumeChip",props:{i18n:{},placement:{}},setup(t){return(n,i)=>(e.openBlock(),e.createBlock(I._sfc_main,{offset:4,placement:t.placement},{default:e.withCtx(()=>[e.createVNode(Z._sfc_main,{intent:"neutral"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.i18n.combinedVolume),1)]),_:1})]),tooltip:e.withCtx(()=>[e.createVNode(I.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(I._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.i18n.description),1)]),_:1})]),_:1})]),_:1},8,["placement"]))}}),Bn=["aria-label","aria-expanded","disabled"],Bt=e.defineComponent({__name:"ExpandController",props:{isCollapsible:{type:Boolean,default:!0},isExpanded:{type:Boolean,default:!1},iconPosition:{default:"before"},collapsedIcon:{default:"unfold_more"},expandedIcon:{default:"unfold_less"},iconSize:{default:"xs"},rootClass:{},ariaLabel:{},disabled:{type:Boolean,default:!1}},emits:["toggle"],setup(t,{emit:n}){const i=t,o=n,s=e.computed(()=>i.isExpanded?i.expandedIcon:i.collapsedIcon);return(r,f)=>t.isCollapsible?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["flex cursor-pointer items-center disabled:cursor-not-allowed",t.rootClass]),"aria-label":t.ariaLabel,"aria-expanded":t.isExpanded,disabled:t.disabled,onClick:f[0]||(f[0]=l=>o("toggle"))},[t.iconPosition==="before"?(e.openBlock(),e.createBlock(L._sfc_main$1,{key:0,icon:s.value,size:t.iconSize},null,8,["icon","size"])):e.createCommentVNode("",!0),e.renderSlot(r.$slots,"default"),t.iconPosition==="after"?(e.openBlock(),e.createBlock(L._sfc_main$1,{key:1,icon:s.value,size:t.iconSize},null,8,["icon","size"])):e.createCommentVNode("",!0)],10,Bn)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(t.rootClass)},[e.renderSlot(r.$slots,"default")],2))}}),_e=e.defineComponent({__name:"ExpandWithHeader",props:{isCollapsible:{type:Boolean,default:!0},isExpanded:{type:Boolean,default:!1},headerClass:{},unmountOnClose:{type:Boolean}},emits:["toggle"],setup(t){const n=e.useSlots(),i=e.computed(()=>!!n.default&&!fe.isVnodeEmpty(n.default()));return(o,s)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(Bt,{"is-collapsible":t.isCollapsible,"is-expanded":t.isExpanded,"root-class":"w-full",onToggle:s[0]||(s[0]=r=>o.$emit("toggle"))},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["w-full",t.headerClass])},[e.renderSlot(o.$slots,"header")],2)]),_:3},8,["is-collapsible","is-expanded"]),i.value?(e.openBlock(),e.createBlock(ne._sfc_main,{key:0,"is-open":!t.isCollapsible||t.isExpanded,lazy:"","unmount-on-close":t.unmountOnClose},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["is-open","unmount-on-close"])):e.createCommentVNode("",!0)]))}}),Nn=e.defineComponent({__name:"Card",props:{borderStyle:{default:"solid"},spacing:{default:"md"},cappedWidth:{type:Boolean,default:!1},variant:{default:"default"},shadowSize:{default:"sm"},borderRadius:{default:"base"},title:{},rootClass:{},wrapperClass:{},printBehavior:{}},setup(t){return(n,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col",e.unref(oe.cn)(t.variant==="grouped"?"border border-dashed border-opacity-50":"gap-1",t.borderRadius==="md"?"rounded-md":"",t.borderRadius==="lg"?"rounded-lg":"",t.borderRadius==="base"?"rounded":"",t.variant==="grouped"?t.rootClass:"",t.wrapperClass,t.printBehavior==="avoid"?"card-print-avoid":"")])},[t.title||n.$slots.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(oe.cn)("flex items-center justify-between",t.spacing==="sm"?"p-1.5":"",t.spacing==="md"?"p-3":"",t.spacing==="lg"?"p-6":""))},[e.renderSlot(n.$slots,"title",{},()=>[e.createVNode(e.unref(E._sfc_main),{tag:"span",variant:t.variant==="grouped"?"caps-heading":"body-sm",weight:"semibold","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1},8,["variant"])],!0),e.renderSlot(n.$slots,"right",{},void 0,!0)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([e.unref(oe.cn)(t.spacing==="sm"?"p-1.5":"",t.spacing==="md"?"p-3":"",t.spacing==="lg"?"p-6":"",t.borderStyle==="solid"&&t.shadowSize==="sm"?"shadow-sm":"",t.borderStyle==="solid"&&t.shadowSize==="md"?"shadow-md":"",t.borderStyle==="solid"&&t.shadowSize==="lg"?"shadow-lg":"",t.borderStyle==="dashed"?"border-dashed border-opacity-50":"",t.shadowSize==="none"&&t.variant==="default"?"border-gray-100":"",t.variant==="error"?"border-red-600":"",t.variant==="warning"?"border-yellow-400":"",t.variant==="primary"?"border-primary-400":"",t.cappedWidth?"max-w-220":"",t.borderRadius==="base"?"rounded":"",t.borderRadius==="md"?"rounded-md":"",t.borderRadius==="lg"?"rounded-lg":"",t.variant==="grouped"?"border-b-0 border-l-0 border-r-0":"",t.variant==="grouped"?"rounded-t-none":"",t.variant==="primary"?"bg-primary-50/50":"",t.variant==="default"?"bg-white":"",t.rootClass?`${t.rootClass}`:""),"card-surface border"]),"data-testid":"card"},[e.renderSlot(n.$slots,"default",{},void 0,!0)],2)],2))}}),se=G._export_sfc(Nn,[["__scopeId","data-v-561cca98"]]),Vn={topUp:"Top up",defaultTooltip:"Top up allows moving unused volume over to the next billing cycle",tieredTooltip:{blockSize:"Includes prior volume to determine the tier and unused volume will move over",nonBlockSize:"Includes prior volume to determine the tier"},rollover:{title:"Rollover",tooltip:"Top up is applied to the next following schedule's billing cycles"}},En={combinedVolume:"Combined volume",description:"Total volume sets the tier, applied proportionally to the selected rules."},ke={defaultPricing:"Pricing",combinedVolume:En,topUpChip:Vn,splitBy:"Split by"},Sn={class:"inline-flex items-center"},wn=e.defineComponent({__name:"TopUpChip",props:{i18n:{},placement:{},hasTooltip:{type:Boolean},pricingItemConfig:{}},setup(t){const n=t,i=e.computed(()=>{var l,v;return!!((v=(l=n.pricingItemConfig)==null?void 0:l.top_up)!=null&&v.rollover)}),o=e.computed(()=>({intent:"neutral",hasChipAfter:i.value})),s={intent:"neutral",hasChipBefore:!0},r=e.computed(()=>{var l,v,c;return(c=(v=(l=n.pricingItemConfig)==null?void 0:l.details)==null?void 0:v.bands)==null?void 0:c.some(d=>d.block_size)}),f=e.computed(()=>T.isTieredPricing(n.pricingItemConfig)&&r.value?n.i18n.tieredTooltip.blockSize:T.isTieredPricing(n.pricingItemConfig)&&!r.value?n.i18n.tieredTooltip.nonBlockSize:n.i18n.defaultTooltip);return(l,v)=>(e.openBlock(),e.createElementBlock("span",Sn,[t.hasTooltip?(e.openBlock(),e.createBlock(I._sfc_main,{key:0,offset:4,placement:t.placement},{default:e.withCtx(()=>[e.createVNode(Z._sfc_main,e.normalizeProps(e.guardReactiveProps(o.value)),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.i18n.topUp),1)]),_:1},16)]),tooltip:e.withCtx(()=>[e.createVNode(I.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(I._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.value),1)]),_:1})]),_:1})]),_:1},8,["placement"])):(e.openBlock(),e.createBlock(Z._sfc_main,e.normalizeProps(e.mergeProps({key:1},o.value)),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.i18n.topUp),1)]),_:1},16)),i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.hasTooltip?(e.openBlock(),e.createBlock(I._sfc_main,{key:0,offset:4,placement:t.placement},{default:e.withCtx(()=>[e.createVNode(Z._sfc_main,e.normalizeProps(e.guardReactiveProps(s)),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.i18n.rollover.title),1)]),_:1},16)]),tooltip:e.withCtx(()=>[e.createVNode(I.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(I._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.i18n.rollover.tooltip),1)]),_:1})]),_:1})]),_:1},8,["placement"])):(e.openBlock(),e.createBlock(Z._sfc_main,e.normalizeProps(e.mergeProps({key:1},s)),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.i18n.rollover.title),1)]),_:1},16))],64)):e.createCommentVNode("",!0)]))}}),Pn={class:"flex items-center gap-2"},$n={class:"flex items-center gap-2"},In={key:0},Ce=e.defineComponent({__name:"PricingItemConfigHeader",props:{config:{},i18n:{},hasTooltip:{type:Boolean,default:!0},isCombinedPricing:{type:Boolean},hideDefaultLabel:{type:Boolean}},setup(t){const n=t,i=e.computed(()=>n.i18n??ke),o=e.computed(()=>{var s,r;return!A.isEmpty((r=(s=n.config)==null?void 0:s.conditions)==null?void 0:r.meter_properties)});return(s,r)=>(e.openBlock(),e.createElementBlock("div",Pn,[e.createElementVNode("div",$n,[e.createVNode(E._sfc_main,{class:"line-clamp-1","no-spacing":"",color:"secondary",variant:"body-sm",weight:"semibold"},{default:e.withCtx(()=>{var f,l,v,c,d,b;return[(f=t.config.conditions)!=null&&f.name||o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(l=t.config.conditions)!=null&&l.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString((v=t.config.conditions)==null?void 0:v.name),1)],64)):e.createCommentVNode("",!0),o.value&&((d=(c=t.config)==null?void 0:c.conditions)!=null&&d.meter_properties)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.hasTooltip&&((b=t.config.conditions)!=null&&b.name)?(e.openBlock(),e.createBlock(I._sfc_main,{key:0,variant:"outline",class:"ml-1"},{default:e.withCtx(()=>[e.createVNode(L._sfc_main$1,{icon:"help",size:"2xs",class:"rounded drop-shadow-sm hover:cursor-default hover:bg-gray-50"})]),tooltip:e.withCtx(()=>[e.createVNode(I.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(E._sfc_main,{variant:"body-sm","no-spacing":"",color:"secondary"},{default:e.withCtx(()=>{var m,p;return[e.createVNode(ce._sfc_main,{comparators:(p=(m=t.config)==null?void 0:m.conditions)==null?void 0:p.meter_properties},null,8,["comparators"])]}),_:1})]),_:1})]),_:1})):(e.openBlock(),e.createBlock(E._sfc_main,{key:1,variant:"body-sm",weight:"normal",color:"secondary",tag:"span"},{default:e.withCtx(()=>{var m,p,g;return[(m=t.config.conditions)!=null&&m.name?(e.openBlock(),e.createElementBlock("span",In," - ")):e.createCommentVNode("",!0),e.createVNode(ce._sfc_main,{comparators:(g=(p=t.config)==null?void 0:p.conditions)==null?void 0:g.meter_properties,display:"inline"},null,8,["comparators"])]}),_:1}))],64)):e.createCommentVNode("",!0)],64)):t.hideDefaultLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(i.value.defaultPricing),1)],64))]}),_:1}),t.config.volume_group_reference?(e.openBlock(),e.createBlock(xn,{key:0,i18n:i.value.combinedVolume},null,8,["i18n"])):e.createCommentVNode("",!0),e.unref(T.isTopUpPricing)(t.config)?(e.openBlock(),e.createBlock(wn,{key:1,i18n:i.value.topUpChip,"pricing-item-config":t.config},null,8,["i18n","pricing-item-config"])):e.createCommentVNode("",!0)]),e.renderSlot(s.$slots,"override-tooltip")]))}}),xe={...yt.comparatorI18nDefaults,and:"and"},de={...xe,or:"or",unsupported:"unsupported",product:"product",revenueItem:"revenue item",commitmentBody:(t,n,i)=>`Commitment on ${t} <strong>${n}</strong> ${i}`,startOfSchedule:"Start of schedule",endOfSchedule:"End of schedule",unknown:"unknown",products:t=>t===1?"product":"products",pluralRevenueItems:t=>t===1?"revenue item":"revenue items",pricingRule:"price rule",invoice:"invoice",units:t=>`${t} units`,commitmentOnInvoice:t=>`Commitment on <strong>Invoice</strong> ${t}`,basedOnMeterValue:"based on meter value"},Tn=(t,n=de,i)=>{const{formatDate:o}=E.useIntl(),s=e.computed(()=>{var m,p;return((p=(m=t.value)==null?void 0:m.pricing_categories)==null?void 0:p.flatMap(g=>{var C;return[...((C=g.pricing_groups)==null?void 0:C.flatMap(_=>_.pricings))??[],...g.pricings??[]]}))??[]}),r=e.computed(()=>s.value.map(m=>{var p;return{pricing:m,product:(p=m.products)==null?void 0:p[0],pricingId:m.id}})),f=e.computed(()=>{var m;return((m=s.value)==null?void 0:m.flatMap(p=>{var g;return((g=p.items)==null?void 0:g.map(C=>{var _;return{productItem:(_=C.product_items)==null?void 0:_[0],pricingItemId:C.id}}))??[]}))??[]}),l=m=>n.commitmentBody(d(m),v(m)??"",b(m)),v=m=>{var p,g,C,_,N;switch(m.commitmentLevel){case"PRODUCTS":{const h=(p=m.ids)==null?void 0:p.map(a=>r.value.find(y=>y.pricingId===a));return c((h==null?void 0:h.map(a=>{var y;return(a==null?void 0:a.pricing.name)??(((y=a==null?void 0:a.product)==null?void 0:y.name)||"")}))??[])}case"REVENUE_ITEMS":{const h=(g=m.ids)==null?void 0:g.map(a=>{var y;return(y=f.value.find(u=>u.pricingItemId===a))==null?void 0:y.productItem});return c((h==null?void 0:h.map(a=>(a==null?void 0:a.name)||""))??[])}case"PRICING_RULE":{const h=S=>{var w;return S.id===((w=m.ids)==null?void 0:w[0])},a=S=>{var w,P;return h(S)||!!((P=(w=S.conditions)==null?void 0:w.configs)!=null&&P.some(a))},y=S=>{var w;return(w=S.configs)==null?void 0:w.some(a)},u=S=>{var w;return(w=S.items)==null?void 0:w.some(y)},V=(C=s.value)==null?void 0:C.find(u),x=(_=V==null?void 0:V.items)==null?void 0:_.find(y),B=(N=x==null?void 0:x.configs)==null?void 0:N.flatMap(T.getFlatConfigs),k=B==null?void 0:B.find(h);return`<strong>${T.getConfigName(n)({pricing:V,item:x,config:k})}</strong>`}}},c=m=>m.reduce((p,g,C)=>{const _=`<strong>${g}</strong>`;return C===0?_:C===m.length-1?[p,_].join(" and "):[p,_].join(", ")},""),d=m=>{var p,g;switch(m.commitmentLevel){case"PRODUCTS":return n.products(((p=m.ids)==null?void 0:p.length)??0);case"REVENUE_ITEMS":return n.pluralRevenueItems(((g=m.ids)==null?void 0:g.length)??0);case"PRICING_RULE":return n.pricingRule;case"INVOICE":return n.invoice}},b=m=>{if(!m.start_at&&!m.end_at)return"";let p,g;return m.start_at||(p=n.startOfSchedule),m.end_at||(g=n.endOfSchedule),m.start_at&&(p=o(i?{date:m.start_at,format:"date",offsetType:"offsetted",timezone:i}:{date:m.start_at,format:"date",offsetType:"local",showTimezone:!1})),m.end_at&&(g=o(i?{date:m.end_at,format:"date",offsetType:"offsetted",timezone:i}:{date:m.end_at,format:"date",offsetType:"local",showTimezone:!1})),`(${p} - ${g})`};return{getCommitmentBody:l,getFormattedDuration:b}},Dn=t=>{const n=Object.entries(t||{});if(n.length===0)return;const[i,o]=n[0],[s,r,f]=i.split(".");return{commitmentLevel:s,index:parseInt(r,10),fieldName:f,message:o}},On={class:"flex items-center justify-between"},zn={class:"flex items-center gap-2"},Ln={key:0,class:"ml-3 flex gap-3"},Be=e.defineComponent({__name:"CommitmentDiscountItem",props:{icon:{},iconColor:{},isEditable:{type:Boolean},isRemovable:{type:Boolean},error:{}},emits:["edit","delete"],setup(t){return(n,i)=>(e.openBlock(),e.createBlock(se,{spacing:"none","root-class":"p-2 pr-3"},{default:e.withCtx(()=>[e.createElementVNode("div",On,[e.createElementVNode("div",zn,[e.createVNode(L._sfc_main$1,{icon:t.icon,size:"sm",variant:"contained",class:e.normalizeClass(["p-1",{"bg-orange-50 text-orange-700":t.iconColor==="orange","bg-yellow-50 text-yellow-700":t.iconColor==="yellow"}])},null,8,["icon","class"]),e.createVNode(E._sfc_main,{variant:"body-sm","no-spacing":""},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"body")]),_:3})]),t.isEditable||t.isRemovable?(e.openBlock(),e.createElementBlock("div",Ln,[t.isEditable?(e.openBlock(),e.createBlock(L._sfc_main,{key:0,intent:"subtle",square:"","icon-prefix":"edit",onClick:i[0]||(i[0]=o=>n.$emit("edit"))})):e.createCommentVNode("",!0),t.isRemovable?(e.openBlock(),e.createBlock(L._sfc_main,{key:1,intent:"dangerSecondary",square:"","icon-prefix":"delete",onClick:i[1]||(i[1]=o=>n.$emit("delete"))})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createVNode(ne._sfc_main,{"is-open":!!t.error},{default:e.withCtx(()=>[t.error?(e.openBlock(),e.createBlock(ge._sfc_main,{key:0,type:"danger",class:"-mb-2 -ml-2 -mr-3 mt-2 rounded-bl-md rounded-br-md rounded-tl-none rounded-tr-none"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(Q.capitalize)(t.error)),1)]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["is-open"])]),_:3}))}}),Mn={class:"font-semibold"},Rn={key:2,class:"font-semibold text-primary-600"},An=["innerHTML"],Fn=["innerHTML"],Zn={key:2},Un=e.defineComponent({__name:"SubscriptionCommitmentItem",props:{commitment:{},pricingPlanVersion:{},isEditable:{type:Boolean},isRemovable:{type:Boolean},error:{},i18n:{},timezone:{}},emits:["edit","delete"],setup(t){const n=t,i=e.computed(()=>n.i18n??de),{getCommitmentBody:o,getFormattedDuration:s}=Tn(e.computed(()=>n.pricingPlanVersion),i.value,n.timezone);return(r,f)=>(e.openBlock(),e.createBlock(Be,{icon:"handshake","icon-color":"orange","is-editable":t.isEditable,"is-removable":t.isRemovable,error:t.error,onEdit:f[0]||(f[0]=l=>r.$emit("edit")),onDelete:f[1]||(f[1]=l=>r.$emit("delete"))},{body:e.withCtx(()=>{var l;return[e.createElementVNode("span",Mn,[t.commitment.amount?(e.openBlock(),e.createBlock(z._sfc_main,{key:0,value:t.commitment.amount,highlighted:""},null,8,["value"])):"meter_value_calculation"in t.commitment&&((l=t.commitment.meter_value_calculation)!=null&&l.amount)?(e.openBlock(),e.createBlock(z._sfc_main,{key:1,value:t.commitment.meter_value_calculation.amount,highlighted:""},null,8,["value"])):"meter_value_calculation"in t.commitment&&t.commitment.meter_value_calculation&&"number"in t.commitment.meter_value_calculation?(e.openBlock(),e.createElementBlock("span",Rn,e.toDisplayString(t.commitment.meter_value_calculation.number&&i.value.units(t.commitment.meter_value_calculation.number)),1)):e.createCommentVNode("",!0)]),f[2]||(f[2]=e.createTextVNode(" ",-1)),t.commitment.commitmentLevel==="INVOICE"?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:i.value.commitmentOnInvoice(e.unref(s)(t.commitment))},null,8,An)):(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:e.unref(o)(t.commitment)},null,8,Fn)),"meter_value_calculation"in t.commitment&&t.commitment.meter_value_calculation&&"amount"in t.commitment.meter_value_calculation?(e.openBlock(),e.createElementBlock("span",Zn,e.toDisplayString(" ")+"("+e.toDisplayString(i.value.basedOnMeterValue)+")",1)):e.createCommentVNode("",!0)]}),_:1},8,["is-editable","is-removable","error"]))}}),te={...de,title:"Commitments",orderOfApplicationExplanation:"Commitments are applied after discounts on invoices",description:"Setup a minimum usage per an agreed-upon time period.",selectPricingPlanHint:"Please select a pricing plan to add commitments",addItemLabel:"Add commitment",notEditableExplanation:"Commitments can't be edited for active schedules"},Ne=({isEditable:t,isRemovable:n})=>({isEditableFlag:e.computed(()=>typeof t=="function"?!0:!!t),isItemEditable:r=>typeof t=="function"?t(r):!!t,isItemRemovable:r=>typeof n=="function"?n(r):typeof n=="boolean"?n:!0}),Hn={class:"flex items-center justify-between gap-4"},Gn={class:"flex items-center gap-4"},jn={class:"flex items-center gap-1"},qn={class:"mt-1 text-xs text-secondary"},Wn={class:"flex items-center justify-between gap-4"},Yn={class:"flex items-center gap-1"},Kn={class:"text-xs font-bold uppercase text-secondary"},Jn={class:"mt-1 flex flex-col gap-2"},Ve=e.defineComponent({__name:"CommitmentDiscountsSection",props:{title:{},orderOfApplicationExplanation:{},description:{},selectPricingPlanHint:{},addItemLabel:{},notEditableExplanation:{},hasItems:{type:Boolean},pricingPlanVersionIsSelected:{type:Boolean},isEditable:{type:Boolean},isCreatable:{type:Boolean}},emits:["add"],setup(t){return(n,i)=>(e.openBlock(),e.createElementBlock("section",null,[t.hasItems?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("header",Wn,[e.createElementVNode("div",Yn,[e.createElementVNode("h2",Kn,e.toDisplayString(t.title),1),e.createVNode(I._sfc_main,{variant:"outline",placement:"bottom-start"},{default:e.withCtx(()=>[e.createVNode(L._sfc_main$1,{icon:"help",class:"drop-shadow-sm hover:cursor-default hover:bg-gray-50",size:"xs"})]),tooltip:e.withCtx(()=>[e.createVNode(I.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(I._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.orderOfApplicationExplanation),1)]),_:1})]),_:1})]),_:1})])]),e.createElementVNode("ul",Jn,[e.renderSlot(n.$slots,"list-items")])],64)):(e.openBlock(),e.createBlock(se,{key:0},{default:e.withCtx(()=>[e.createElementVNode("div",Hn,[e.createElementVNode("div",Gn,[e.renderSlot(n.$slots,"icon"),e.createElementVNode("div",null,[e.createElementVNode("div",jn,[e.createVNode(E._sfc_main,{tag:"h2",variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1}),e.createVNode(I._sfc_main,{variant:"outline",placement:"bottom-start"},{default:e.withCtx(()=>[e.createVNode(L._sfc_main$1,{icon:"help",class:"drop-shadow-sm hover:cursor-default hover:bg-gray-50",size:"xs"})]),tooltip:e.withCtx(()=>[e.createVNode(I.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(I._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.orderOfApplicationExplanation),1)]),_:1})]),_:1})]),_:1})]),e.createElementVNode("p",qn,e.toDisplayString(t.description),1)])]),t.isEditable?(e.openBlock(),e.createBlock(I._sfc_main,{key:0,variant:"outline"},{tooltip:e.withCtx(()=>[e.createVNode(I.TooltipContent,null,{default:e.withCtx(()=>[t.pricingPlanVersionIsSelected?t.isEditable?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(E._sfc_main,{key:1,color:"secondary",variant:"body-sm","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.notEditableExplanation),1)]),_:1})):(e.openBlock(),e.createBlock(E._sfc_main,{key:0,color:"secondary",variant:"body-sm","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.selectPricingPlanHint),1)]),_:1}))]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),_:3}))]))}}),Xn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='44'%20height='44'%20fill='none'%3e%3cmask%20id='a'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='44'%20height='44'%3e%3cpath%20fill='%23D9D9D9'%20d='M0%200h44v44H0z'/%3e%3c/mask%3e%3cg%20mask='url(%23a)'%3e%3cmask%20id='e'%20fill='%23fff'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.922%2015.593A6%206%200%200%200%208.03%208.816c-.072-.516.251-1.035.767-1.108l21.957-3.086c.516-.072.97.338%201.043.854a6%206%200%200%200%206.776%205.106c.589-.082%201.19.281%201.273.87L42.06%2027.22c.083.589-.395%201.104-.984%201.186a6%206%200%200%200-5.106%206.777c.074.525-.255%201.055-.78%201.13l-21.925%203.08c-.526.074-.988-.344-1.062-.87a6%206%200%200%200-6.776-5.107c-.452.064-.901-.223-.965-.674L2.182%2016.507c-.064-.451.29-.85.74-.914Z'/%3e%3c/mask%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.922%2015.593A6%206%200%200%200%208.03%208.816c-.072-.516.251-1.035.767-1.108l21.957-3.086c.516-.072.97.338%201.043.854a6%206%200%200%200%206.776%205.106c.589-.082%201.19.281%201.273.87L42.06%2027.22c.083.589-.395%201.104-.984%201.186a6%206%200%200%200-5.106%206.777c.074.525-.255%201.055-.78%201.13l-21.925%203.08c-.526.074-.988-.344-1.062-.87a6%206%200%200%200-6.776-5.107c-.452.064-.901-.223-.965-.674L2.182%2016.507c-.064-.451.29-.85.74-.914Z'%20fill='%23D9D9D9'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.922%2015.593A6%206%200%200%200%208.03%208.816c-.072-.516.251-1.035.767-1.108l21.957-3.086c.516-.072.97.338%201.043.854a6%206%200%200%200%206.776%205.106c.589-.082%201.19.281%201.273.87L42.06%2027.22c.083.589-.395%201.104-.984%201.186a6%206%200%200%200-5.106%206.777c.074.525-.255%201.055-.78%201.13l-21.925%203.08c-.526.074-.988-.344-1.062-.87a6%206%200%200%200-6.776-5.107c-.452.064-.901-.223-.965-.674L2.182%2016.507c-.064-.451.29-.85.74-.914Z'%20fill='%23BFEAFB'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.922%2015.593A6%206%200%200%200%208.03%208.816c-.072-.516.251-1.035.767-1.108l21.957-3.086c.516-.072.97.338%201.043.854a6%206%200%200%200%206.776%205.106c.589-.082%201.19.281%201.273.87L42.06%2027.22c.083.589-.395%201.104-.984%201.186a6%206%200%200%200-5.106%206.777c.074.525-.255%201.055-.78%201.13l-21.925%203.08c-.526.074-.988-.344-1.062-.87a6%206%200%200%200-6.776-5.107c-.452.064-.901-.223-.965-.674L2.182%2016.507c-.064-.451.29-.85.74-.914Z'%20fill='url(%23b)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.922%2015.593A6%206%200%200%200%208.03%208.816c-.072-.516.251-1.035.767-1.108l21.957-3.086c.516-.072.97.338%201.043.854a6%206%200%200%200%206.776%205.106c.589-.082%201.19.281%201.273.87L42.06%2027.22c.083.589-.395%201.104-.984%201.186a6%206%200%200%200-5.106%206.777c.074.525-.255%201.055-.78%201.13l-21.925%203.08c-.526.074-.988-.344-1.062-.87a6%206%200%200%200-6.776-5.107c-.452.064-.901-.223-.965-.674L2.182%2016.507c-.064-.451.29-.85.74-.914Z'%20fill='url(%23c)'/%3e%3cpath%20d='m39.845%2011.452-1.09.153%201.09-.153Zm-9.092-6.83.153%201.09-.153-1.09Zm11.308%2022.599%201.09-.153-1.09.153ZM8.796%207.708%208.643%206.62l.153%201.09ZM6.94%208.97a4.9%204.9%200%200%201-4.17%205.534l.306%202.179a7.1%207.1%200%200%200%206.042-8.019l-2.178.306ZM30.6%203.533%208.643%206.62l.306%202.179%2021.957-3.086-.306-2.179Zm7.819%205.96a4.9%204.9%200%200%201-5.534-4.17l-2.179.306a7.1%207.1%200%200%200%208.02%206.043l-.307-2.179Zm4.731%2017.575-2.216-15.77-2.179.307%202.217%2015.769%202.178-.306Zm-6.09%207.963a4.9%204.9%200%200%201%204.17-5.534l-.306-2.179a7.1%207.1%200%200%200-6.043%208.019l2.179-.306Zm-23.641%205.453%2021.924-3.081-.306-2.179-21.924%203.081.306%202.179ZM5.58%2034.507a4.9%204.9%200%200%201%205.534%204.17l2.178-.306a7.1%207.1%200%200%200-8.018-6.043l.306%202.179ZM1.092%2016.66l2.282%2016.236%202.179-.306L3.27%2016.354l-2.179.306Zm2.179-.306a.333.333%200%200%201-.066.254.202.202%200%200%201-.13.074l-.306-2.179c-.95.134-1.838%201.008-1.677%202.157l2.179-.306Zm9.841%2021.951a.244.244%200%200%201%20.105.009c.031.01.05.023.06.03.014.013.016.02.017.027l-2.179.306c.142%201.008%201.064%201.981%202.304%201.807l-.306-2.179Zm21.77-2.968c-.002-.006-.002-.014.009-.03a.168.168%200%200%201%20.048-.046.244.244%200%200%201%20.098-.037l.306%202.179c1.24-.175%201.859-1.365%201.717-2.372l-2.179.306Zm3.843-23.665a.117.117%200%200%201%20.069.012c.003.002-.005-.002-.015-.017a.153.153%200%200%201-.024-.062l2.179-.306c-.185-1.317-1.46-1.954-2.515-1.806l.306%202.179ZM5.275%2032.328a.202.202%200%200%201%20.144.036.332.332%200%200%201%20.134.226l-2.179.306c.162%201.15%201.255%201.745%202.207%201.61l-.306-2.178ZM30.906%205.712a.258.258%200%200%201-.11-.01.186.186%200%200%201-.065-.033c-.019-.016-.023-.028-.025-.04l2.179-.306c-.14-1-1.057-1.963-2.285-1.79l.306%202.179Zm10.066%2021.662a.153.153%200%200%201%20.005-.066c.006-.018.012-.024.01-.02a.115.115%200%200%201-.062.03l.305%202.179c1.056-.149%202.105-1.112%201.92-2.43l-2.178.307ZM9.118%208.663c.002.012.001.025-.012.045a.186.186%200%200%201-.053.05.258.258%200%200%201-.104.04l-.306-2.179c-1.229.173-1.844%201.35-1.703%202.35l2.178-.306Z'%20fill='url(%23d)'%20fill-opacity='.1'%20mask='url(%23e)'/%3e%3cg%20opacity='.5'%3e%3cmask%20id='f'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='10'%20y='10'%20width='24'%20height='24'%3e%3cpath%20transform='rotate(-8%2010.706%2013.489)'%20fill='%23D9D9D9'%20d='M10.706%2013.489h20v20h-20z'/%3e%3c/mask%3e%3cg%20mask='url(%23f)'%3e%3cpath%20d='M22.825%2028.616a.486.486%200%200%200%20.271-.164l5.816-7.718a1.54%201.54%200%200%200%20.283-.608%201.804%201.804%200%200%200-.176-1.248%201.375%201.375%200%200%200-.435-.475l-4-3.014a1.376%201.376%200%200%200-.577-.288%201.775%201.775%200%200%200-1.248.176%201.54%201.54%200%200%200-.506.44l-.195.258%201.744%201.333c.233.163.416.362.547.596.13.234.215.489.254.764.081.577-.047%201.09-.383%201.537-.337.447-.795.711-1.372.792a2.245%202.245%200%200%201-.815-.033%201.895%201.895%200%200%201-.731-.339l-1.762-1.309-3.103%204.118a.393.393%200%200%200-.083.306c.015.11.07.204.166.282a.386.386%200%200%200%20.307.094.484.484%200%200%200%20.271-.164l2.412-3.201%201.318.993-2.391%203.197a.394.394%200%200%200-.083.306.4.4%200%200%200%20.164.272.4.4%200%200%200%20.306.083.486.486%200%200%200%20.271-.164l2.415-3.18%201.318.993-2.39%203.197a.25.25%200%200%200-.076.137.472.472%200%200%200-.008.17.4.4%200%200%200%20.164.27.4.4%200%200%200%20.578-.08l2.414-3.18%201.318.993-2.412%203.2a.394.394%200%200%200-.083.306c.016.11.074.2.175.27.101.07.207.098.317.082Zm.21%201.654a2.033%202.033%200%200%201-1.422-.316%201.99%201.99%200%200%201-.869-1.172%202.054%202.054%200%200%201-1.257-.412%202.054%202.054%200%200%201-.743-1.095%201.979%201.979%200%200%201-1.248-.424%202.12%202.12%200%200%201-.731-1.086%201.982%201.982%200%200%201-1.375-.5%202.046%202.046%200%200%201-.687-1.293%202.119%202.119%200%200%201%20.043-.816c.068-.269.184-.513.35-.733l4.116-5.438%203.083%202.323a.25.25%200%200%200%20.137.075.47.47%200%200%200%20.169.008.445.445%200%200%200%20.294-.157.39.39%200%200%200%20.081-.317.473.473%200%200%200-.054-.16.25.25%200%200%200-.11-.111l-3.365-2.536a1.377%201.377%200%200%200-.577-.287%201.778%201.778%200%200%200-1.248.176%201.538%201.538%200%200%200-.506.44l-2.497%203.337c-.107.142-.19.3-.249.477-.06.177-.091.35-.095.518a1.57%201.57%200%200%200%20.304.968l-1.029%201.364a3.313%203.313%200%200%201-.662-.969%203.273%203.273%200%200%201-.154-2.293c.114-.387.295-.746.543-1.075l2.5-3.318c.286-.363.62-.655%201.003-.877a3.316%203.316%200%200%201%203.68.219l.26.195.195-.259c.285-.363.62-.655%201.002-.877a3.316%203.316%200%200%201%203.68.219l3.977%202.996a3.393%203.393%200%200%201%201.3%202.216c.06.426.036.854-.072%201.283a3.282%203.282%200%200%201-.57%201.185l-5.818%207.697c-.166.22-.368.402-.607.548a2.002%202.002%200%200%201-.771.277Z'%20fill='%23222B35'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='b'%20x1='1.097'%20y1='10.89'%20x2='36.001'%20y2='44.744'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF6200'/%3e%3cstop%20offset='1'%20stop-color='%23FF6200'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient%20id='c'%20x1='40.312'%20y1='5.379'%20x2='16.092'%20y2='47.542'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23fff'/%3e%3cstop%20offset='1'%20stop-color='%23fff'%20stop-opacity='.4'/%3e%3c/linearGradient%3e%3clinearGradient%20id='d'%20x1='24.991'%20y1='38.635'%20x2='20.304'%20y2='5.283'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%230C0E41'/%3e%3cstop%20offset='1'%20stop-color='%230C0E41'%20stop-opacity='.5'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",Qn=["src"],ei=e.defineComponent({__name:"SubscriptionCommitments",props:{pricingPlanVersion:{},commitment:{},i18n:{},isCreatable:{type:Boolean},isEditable:{type:[Boolean,Function]},isRemovable:{type:[Boolean,Function]},error:{},timezone:{}},setup(t){const n=t,i=e.computed(()=>n.i18n??te),{isEditableFlag:o,isItemEditable:s,isItemRemovable:r}=Ne({isEditable:n.isEditable,isRemovable:n.isRemovable}),f=e.computed(()=>{if("error"in n)return Dn(n.error)}),l=e.computed(()=>{var v,c,d,b,m,p,g,C;return[...((c=(v=n.commitment)==null?void 0:v.pricing_item_configs)==null?void 0:c.map((_,N)=>{var h,a;return{item:{commitmentLevel:"PRICING_RULE",..._},error:N===((h=f.value)==null?void 0:h.index)&&((a=f.value)==null?void 0:a.commitmentLevel)==="pricing_item_configs"?f.value.message:void 0}}))||[],...((b=(d=n.commitment)==null?void 0:d.pricing_items)==null?void 0:b.map((_,N)=>{var h,a;return{item:{commitmentLevel:"REVENUE_ITEMS",..._},error:N===((h=f.value)==null?void 0:h.index)&&((a=f.value)==null?void 0:a.commitmentLevel)==="pricing_items"?f.value.message:void 0}}))||[],...((p=(m=n.commitment)==null?void 0:m.pricings)==null?void 0:p.map((_,N)=>{var h,a;return{item:{commitmentLevel:"PRODUCTS",..._},error:N===((h=f.value)==null?void 0:h.index)&&((a=f.value)==null?void 0:a.commitmentLevel)==="pricings"?f.value.message:void 0}}))||[],...((C=(g=n.commitment)==null?void 0:g.totals)==null?void 0:C.map((_,N)=>{var h,a;return{item:{commitmentLevel:"INVOICE",..._},error:N===((h=f.value)==null?void 0:h.index)&&((a=f.value)==null?void 0:a.commitmentLevel)==="totals"?f.value.message:void 0}}))||[]]});return(v,c)=>(e.openBlock(),e.createBlock(Ve,{title:i.value.title,"order-of-application-explanation":i.value.orderOfApplicationExplanation,description:i.value.description,"pricing-plan-version-is-selected":!!t.pricingPlanVersion,"select-pricing-plan-hint":i.value.selectPricingPlanHint,"add-item-label":i.value.addItemLabel,"not-editable-explanation":i.value.notEditableExplanation,"is-creatable":!!t.isCreatable,"is-editable":e.unref(o),"has-items":l.value.length>0,onAdd:c[0]||(c[0]=d=>v.$emit("add"))},{icon:e.withCtx(()=>[e.createElementVNode("img",{src:e.unref(Xn),alt:""},null,8,Qn)]),"list-items":e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,({item:d,error:b})=>(e.openBlock(),e.createElementBlock("li",{key:JSON.stringify(d)},[e.createVNode(Un,{timezone:t.timezone,commitment:d,error:b,"is-editable":e.unref(s)(d),"is-removable":e.unref(r)(d),"pricing-plan-version":t.pricingPlanVersion,i18n:i.value,onEdit:m=>v.$emit("edit",d),onDelete:m=>v.$emit("delete",d)},null,8,["timezone","commitment","error","is-editable","is-removable","pricing-plan-version","i18n","onEdit","onDelete"])]))),128))]),_:1},8,["title","order-of-application-explanation","description","pricing-plan-version-is-selected","select-pricing-plan-hint","add-item-label","not-editable-explanation","is-creatable","is-editable","has-items"]))}}),ti=(t,n)=>!t||!n?!t==!n:t.operator===n.operator&&t.operands.length===n.operands.length&&t.operands.every((i,o)=>{var s,r,f,l,v;const c=(s=n.operands[o])==null?void 0:s.meter_property;return((r=i.meter_property)==null?void 0:r.id)===(c==null?void 0:c.id)&&((f=i.meter_property)==null?void 0:f.comparator)===(c==null?void 0:c.comparator)&&((l=i.meter_property)==null?void 0:l.value)===(c==null?void 0:c.value)&&JSON.stringify((v=i.meter_property)==null?void 0:v.values)===JSON.stringify(c==null?void 0:c.values)}),ni=(t,n,i)=>{const{formatDate:o}=E.useIntl(),s=e.computed(()=>{var c,d;return(d=(c=t.value)==null?void 0:c.pricing_categories)==null?void 0:d.flatMap(b=>{var m;return[...((m=b.pricing_groups)==null?void 0:m.flatMap(p=>p.pricings))??[],...b.pricings??[]]})}),r=c=>{var d,b,m,p,g,C,_,N,h,a;let y,u;switch(c.discountLevel){case"PRODUCT":{y=(d=s.value)==null?void 0:d.find(V=>{var x,B;return V.id===((x=c.ids)==null?void 0:x[0])||((B=V.products)==null?void 0:B.some(k=>{var S;return k.id===((S=c.ids)==null?void 0:S[0])}))});break}case"REVENUE_ITEM":{const V=x=>{var B,k;return x.id===((B=c.ids)==null?void 0:B[0])||"product_items"in x&&((k=x.product_items)==null?void 0:k.some(S=>{var w;return S.id===((w=c.ids)==null?void 0:w[0])}))};y=(b=s.value)==null?void 0:b.find(x=>{var B;return(B=x.items)==null?void 0:B.some(V)}),u=(m=y==null?void 0:y.items)==null?void 0:m.find(V);break}case"PRICING_RULE":{const V=$=>{var O;return c.meter_property_condition_expression?ti(T.buildMeterConditionExpression($),c.meter_property_condition_expression):$.id===((O=c.ids)==null?void 0:O[0])},x=$=>{var O,U;return V($)||!!((U=(O=$.conditions)==null?void 0:O.configs)!=null&&U.some(x))},B=$=>{var O,U,R;return c.meter_property_condition_expression?((O=$.product_items)==null?void 0:O.some(F=>{var M;return F.id===((M=c.ids)==null?void 0:M[0])}))&&((U=$.configs)==null?void 0:U.some(x)):(R=$.configs)==null?void 0:R.some(x)},k=$=>{var O;return(O=$.items)==null?void 0:O.some(B)},S=(p=s.value)==null?void 0:p.find(k),w=(g=S==null?void 0:S.items)==null?void 0:g.find(B),P=(C=w==null?void 0:w.configs)==null?void 0:C.flatMap(T.getFlatConfigs),D=P==null?void 0:P.find(V);return`<strong>${T.getConfigName(n)({pricing:S,item:w,config:D})}</strong>`}}return[(y==null?void 0:y.name)??((N=(_=y==null?void 0:y.products)==null?void 0:_[0])==null?void 0:N.name),(a=(h=u==null?void 0:u.product_items)==null?void 0:h[0])==null?void 0:a.name].filter(Boolean).join(" - ")},f=c=>{let d;switch(c.discountLevel){case"PRODUCT":{d=n.product;break}case"REVENUE_ITEM":{d=n.revenueItem;break}case"PRICING_RULE":{d=n.pricingRule;break}}return n.discountBody(d??"",r(c)??"",v(c))},l=c=>{var d,b;const m=c.condition;if(!((b=(d=m==null?void 0:m.value)==null?void 0:d.amount)!=null&&b.quantity))return"";const p=yt.getFormattedComparator(n)({propertyName:n.conditionResource,comparator:m.comparator,value:Q.formatAmount(m.value.amount)},{hasFormatting:!0});return n.discountCondition(p)},v=c=>{if(!c.start_at&&!c.end_at)return"";let d,b;return c.start_at||(d=n.startOfSchedule),c.end_at||(b=n.endOfSchedule),c.start_at&&(d=o(i?{date:c.start_at,format:"date",offsetType:"offsetted",timezone:i}:{date:c.start_at,format:"date",offsetType:"local",showTimezone:!1})),c.end_at&&(b=o(i?{date:c.end_at,format:"date",offsetType:"offsetted",timezone:i}:{date:c.end_at,format:"date",offsetType:"local",showTimezone:!1})),`(${d} - ${b})`};return{getDiscountBody:f,getConditionBody:l,getFormattedDuration:v}},ii=t=>{const n=Object.entries(t||{});if(n.length===0)return;const[i,o]=n[0],[s,r,f]=i.split(".");return{discountLevel:s,index:parseInt(r,10),fieldName:f,message:o}},Nt={...xe,product:"product",revenueItem:"revenue item",pricingRule:"price rule",discountBody:(t,n,i)=>`Discount on ${t} <strong>${n}</strong> ${i}`,conditionResource:"invoice amount",discountCondition:t=>`when ${t}`,startOfSchedule:"Start of schedule",endOfSchedule:"End of schedule",or:"or",unsupported:"unsupported",unknown:"unknown"},oi={class:"inline-block"},li={key:0,class:"inline-flex flex-wrap items-center gap-1"},ai=["innerHTML"],ri=["innerHTML"],ci=e.defineComponent({__name:"SubscriptionDiscountItem",props:{discount:{},pricingPlanVersion:{},isEditable:{type:Boolean},isRemovable:{type:Boolean},i18n:{},error:{},timezone:{}},emits:["edit","delete"],setup(t,{emit:n}){const i=t,o=n,{$t:s}=E.useIntl(),r=e.computed(()=>i.i18n??Nt),{getDiscountBody:f,getConditionBody:l,getFormattedDuration:v}=ni(e.toRef(()=>i.pricingPlanVersion),r.value,i.timezone);return(c,d)=>{var b,m;return e.openBlock(),e.createBlock(Be,{icon:"south_east","icon-color":"yellow","is-editable":t.discount.discountLevel==="INVOICE"&&((b=t.discount.ids)!=null&&b[0])?!1:t.isEditable,"is-removable":t.discount.discountLevel==="INVOICE"&&((m=t.discount.ids)!=null&&m[0])?!1:t.isRemovable,error:t.error,onEdit:d[0]||(d[0]=p=>o("edit")),onDelete:d[1]||(d[1]=p=>o("delete"))},{body:e.withCtx(()=>{var p;return[e.createElementVNode("div",oi,[e.createVNode(E._sfc_main,{tag:"span",weight:"semibold"},{default:e.withCtx(()=>{var g;return[(g=t.discount.amount)!=null&&g.quantity?(e.openBlock(),e.createBlock(z._sfc_main,{key:0,value:t.discount.amount,highlighted:""},null,8,["value"])):t.discount.percentage?(e.openBlock(),e.createBlock(E._sfc_main,{key:1,color:"inherit",tag:"span",class:"text-primary-600"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.discount.percentage)+"%",1)]),_:1})):e.createCommentVNode("",!0)]}),_:1}),d[3]||(d[3]=e.createTextVNode(" ",-1)),t.discount.discountLevel==="INVOICE"?(e.openBlock(),e.createElementBlock("span",li,[e.createVNode(E._sfc_main,{tag:"span"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Discount on",description:"Discount on",id:"SubscriptionDiscountItem.discountOn"})),1)]),_:1}),e.createVNode(E._sfc_main,{tag:"span",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Invoice",description:"invoice indicator",id:"SubscriptionDiscountItem.invoice"})),1)]),_:1}),(p=t.discount.ids)!=null&&p[0]?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(E._sfc_main,{tag:"span"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"applied by",description:"Subscription discount applied by",id:"SubscriptionDiscountItem.coupon.applied_by"})),1)]),_:1}),e.createVNode(E._sfc_main,{tag:"span",weight:"semibold"},{default:e.withCtx(()=>{var g;return[e.createTextVNode(e.toDisplayString(t.discount.coupon_name??((g=t.discount.ids)==null?void 0:g[0])),1)]}),_:1})],64)):e.createCommentVNode("",!0),e.unref(v)(t.discount)?(e.openBlock(),e.createBlock(E._sfc_main,{key:1,tag:"span"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(v)(t.discount)),1)]),_:1})):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:e.unref(f)(t.discount)},null,8,ai)),t.discount.condition?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[d[2]||(d[2]=e.createTextVNode(" ",-1)),e.createElementVNode("span",{innerHTML:e.unref(l)(t.discount)},null,8,ri)],64)):e.createCommentVNode("",!0)])]}),_:1},8,["is-editable","is-removable","error"])}}}),ae={...Nt,title:"Discounts",orderOfApplicationExplanation:"Discounts are applied before commitments on invoices",description:"Add price reductions for a defined period or specific terms.",selectPricingPlanHint:"Please select a pricing plan to add discounts",addItemLabel:"Add",notEditableExplanation:"Discounts can't be edited for active schedules"},si="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='a'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='44'%20height='44'%3e%3cpath%20fill='%23D9D9D9'%20d='M0%200h44v44H0z'/%3e%3c/mask%3e%3cg%20mask='url(%23a)'%3e%3cmask%20id='e'%20fill='%23fff'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='m18.55%2039.32%203.45%203.4%203.46-3.41%204.48%201.85%201.86-4.5h4.87v-4.84l4.47-1.9-1.82-4.47%203.4-3.45-3.41-3.46%201.85-4.48-4.5-1.86V7.33h-4.84l-1.9-4.47-4.47%201.82L22%201.28%2018.54%204.7l-4.48-1.85-1.86%204.5H7.33v4.84l-4.47%201.9%201.82%204.47L1.28%2022l3.41%203.46-1.85%204.48%204.5%201.86v4.87h4.84l1.9%204.47%204.47-1.82Z'/%3e%3c/mask%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='m18.55%2039.32%203.45%203.4%203.46-3.41%204.48%201.85%201.86-4.5h4.87v-4.84l4.47-1.9-1.82-4.47%203.4-3.45-3.41-3.46%201.85-4.48-4.5-1.86V7.33h-4.84l-1.9-4.47-4.47%201.82L22%201.28%2018.54%204.7l-4.48-1.85-1.86%204.5H7.33v4.84l-4.47%201.9%201.82%204.47L1.28%2022l3.41%203.46-1.85%204.48%204.5%201.86v4.87h4.84l1.9%204.47%204.47-1.82Z'%20fill='%23BFEAFB'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='m18.55%2039.32%203.45%203.4%203.46-3.41%204.48%201.85%201.86-4.5h4.87v-4.84l4.47-1.9-1.82-4.47%203.4-3.45-3.41-3.46%201.85-4.48-4.5-1.86V7.33h-4.84l-1.9-4.47-4.47%201.82L22%201.28%2018.54%204.7l-4.48-1.85-1.86%204.5H7.33v4.84l-4.47%201.9%201.82%204.47L1.28%2022l3.41%203.46-1.85%204.48%204.5%201.86v4.87h4.84l1.9%204.47%204.47-1.82Z'%20fill='url(%23b)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='m18.55%2039.32%203.45%203.4%203.46-3.41%204.48%201.85%201.86-4.5h4.87v-4.84l4.47-1.9-1.82-4.47%203.4-3.45-3.41-3.46%201.85-4.48-4.5-1.86V7.33h-4.84l-1.9-4.47-4.47%201.82L22%201.28%2018.54%204.7l-4.48-1.85-1.86%204.5H7.33v4.84l-4.47%201.9%201.82%204.47L1.28%2022l3.41%203.46-1.85%204.48%204.5%201.86v4.87h4.84l1.9%204.47%204.47-1.82Z'%20fill='url(%23c)'/%3e%3cpath%20d='m22%2042.72-.7.7.7.7.7-.7-.7-.7Zm-3.45-3.4.7-.71-.46-.46-.61.25.37.92Zm6.91-.01.38-.93-.6-.25-.48.47.7.7Zm4.48%201.85-.38.93.92.38.38-.92-.92-.39Zm1.86-4.5v-1h-.67l-.25.62.92.39Zm4.87%200v1h1v-1h-1Zm0-4.84-.4-.92-.6.26v.66h1Zm4.47-1.9.39.93.9-.39-.36-.9-.93.37Zm-1.82-4.47-.7-.7-.47.46.25.61.92-.37Zm3.4-3.45.7.7.7-.7-.7-.7-.7.7Zm-3.41-3.46-.93-.38-.25.61.47.47.7-.7Zm1.85-4.48.93.39.38-.93-.92-.38-.39.92Zm-4.5-1.86h-1v.67l.62.25.39-.92Zm0-4.87h1v-1h-1v1Zm-4.84%200-.92.4.26.6h.66v-1Zm-1.9-4.47.93-.39-.38-.9-.92.36.38.93Zm-4.47%201.82-.7.71.46.46.61-.25-.37-.92ZM22%201.28l.7-.7-.7-.7-.7.7.7.7ZM18.54%204.7l-.38.93.61.25.47-.47-.7-.7Zm-4.48-1.85.39-.93-.93-.38-.38.92.92.39Zm-1.86%204.5v1h.67l.25-.62-.92-.39Zm-4.87%200v-1h-1v1h1Zm0%204.84.4.92.6-.26v-.66h-1Zm-4.47%201.9-.39-.93-.9.38.36.92.93-.38Zm1.82%204.47.71.7.46-.46-.25-.61-.92.37ZM1.28%2022l-.7-.7-.7.7.7.7.7-.7Zm3.41%203.46.93.38.25-.61-.47-.47-.7.7Zm-1.85%204.48-.93-.39-.38.93.92.38.39-.92Zm4.5%201.86h1v-.67l-.62-.25-.39.92Zm0%204.87h-1v1h1v-1Zm4.84%200%20.92-.4-.26-.6h-.66v1Zm1.9%204.47-.93.39.39.9.9-.36-.37-.93Zm8.62.86-3.44-3.39-1.4%201.42%203.44%203.4L22.7%2042Zm2.06-3.4L21.3%2042l1.4%201.43%203.46-3.41-1.4-1.42Zm5.56%201.64-4.48-1.86-.76%201.85%204.48%201.86.76-1.85Zm.56-3.96L29%2040.78l1.85.77%201.86-4.5-1.84-.77Zm5.79-.61H31.8v2h4.87v-2Zm-1-3.85v4.85h2v-4.85h-2Zm5.08-2.81-4.47%201.89.78%201.84%204.47-1.9-.78-1.83Zm-2.35-3.19%201.81%204.48%201.86-.75-1.82-4.48-1.85.75ZM42%2021.3l-3.39%203.44%201.43%201.4%203.39-3.44L42%2021.3Zm-3.4-2.06L42%2022.7l1.43-1.4-3.4-3.46-1.43%201.4Zm1.64-5.56-1.86%204.48%201.85.76%201.86-4.47-1.85-.77Zm-3.96-.56%204.5%201.87.77-1.85-4.5-1.86-.77%201.84Zm-.61-5.79v4.87h2V7.33h-2Zm-3.85%201h4.85v-2h-4.85v2Zm-2.81-5.08%201.89%204.47%201.84-.78-1.9-4.47-1.83.78ZM25.82%205.6%2030.3%203.8l-.75-1.86-4.48%201.82.75%201.85ZM21.3%202l3.44%203.39%201.4-1.42L22.7.57%2021.3%202Zm-2.06%203.4L22.7%202%2021.3.57l-3.46%203.4%201.4%201.43Zm-5.56-1.64%204.48%201.86.76-1.85-4.47-1.86-.77%201.85Zm-.56%203.96L15%203.22l-1.85-.77-1.86%204.5%201.84.77Zm-5.79.61h4.87v-2H7.33v2Zm1%203.85V7.33h-2v4.85h2Zm-5.08%202.81%204.47-1.89-.78-1.84-4.47%201.9.78%201.83Zm2.35%203.19L3.8%2013.7l-1.86.75%201.82%204.48%201.85-.75ZM2%2022.7l3.39-3.44-1.42-1.4-3.4%203.44L2%2022.7Zm3.4%202.06L2%2021.3.57%2022.7l3.41%203.46%201.42-1.4Zm-1.64%205.56%201.86-4.48-1.85-.76-1.86%204.47%201.85.77Zm3.96.56L3.22%2029l-.77%201.85%204.5%201.86.77-1.84Zm.61%205.79V31.8h-2v4.87h2Zm3.85-1H7.33v2h4.85v-2Zm2.81%205.08-1.89-4.47-1.84.78%201.9%204.47%201.83-.78Zm3.19-2.35L13.7%2040.2l.75%201.86%204.48-1.82-.75-1.85Z'%20fill='url(%23d)'%20fill-opacity='.1'%20mask='url(%23e)'/%3e%3cg%20opacity='.5'%3e%3cmask%20id='f'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='12'%20y='12'%20width='20'%20height='20'%3e%3cpath%20fill='%23D9D9D9'%20d='M12%2012h20v20H12z'/%3e%3c/mask%3e%3cg%20mask='url(%23f)'%3e%3cpath%20d='M19.5%2027.83v-1.66H25l-9.67-9.67%201.17-1.17L26.17%2025v-5.5h1.66v8.33H19.5Z'%20fill='%23222B35'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='b'%20x1='1.28'%20y1='1.28'%20x2='42.72'%20y2='42.72'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23F6D449'/%3e%3cstop%20offset='1'%20stop-color='%23F6D449'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient%20id='c'%20x1='42.72'%20y1='1.28'%20x2='1.28'%20y2='42.72'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23fff'/%3e%3cstop%20offset='1'%20stop-color='%23fff'%20stop-opacity='.4'/%3e%3c/linearGradient%3e%3clinearGradient%20id='d'%20x1='22'%20y1='42.72'%20x2='22'%20y2='-2.59'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%230C0E41'/%3e%3cstop%20offset='1'%20stop-color='%230C0E41'%20stop-opacity='.5'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",di=["src"],ui=e.defineComponent({__name:"SubscriptionDiscounts",props:{i18n:{},discount:{},pricingPlanVersion:{},isEditable:{type:[Boolean,Function]},isCreatable:{type:Boolean},isRemovable:{type:[Boolean,Function]},scheduleStart:{},billingPeriod:{},billingTime:{},isDraftSubscription:{type:Boolean,default:!1},error:{},timezone:{}},emits:["add","edit","delete"],setup(t){const n=t,i=e.computed(()=>n.i18n??ae),o=e.computed(()=>{if("error"in n)return ii(n.error)}),{isEditableFlag:s,isItemEditable:r,isItemRemovable:f}=Ne({isEditable:n.isEditable,isRemovable:n.isRemovable}),l=e.computed(()=>{var v,c,d,b,m,p,g,C,_,N,h,a,y,u;return[...((c=(v=n.discount)==null?void 0:v.pricing_item_configs)==null?void 0:c.map((V,x)=>{var B,k;return{item:{...V,discountLevel:"PRICING_RULE"},error:x===((B=o.value)==null?void 0:B.index)&&((k=o.value)==null?void 0:k.discountLevel)==="pricing_item_configs"?o.value.message:void 0}}))||[],...((b=(d=n.discount)==null?void 0:d.product_items)==null?void 0:b.map((V,x)=>{var B,k;return{item:{...V,discountLevel:"REVENUE_ITEM"},error:x===((B=o.value)==null?void 0:B.index)&&((k=o.value)==null?void 0:k.discountLevel)==="product_items"?o.value.message:void 0}}))||[],...((p=(m=n.discount)==null?void 0:m.product_item_meter_property_conditions)==null?void 0:p.map((V,x)=>{var B,k;return{item:{...V,discountLevel:"PRICING_RULE"},error:x===((B=o.value)==null?void 0:B.index)&&((k=o.value)==null?void 0:k.discountLevel)==="product_item_meter_property_conditions"?o.value.message:void 0}}))||[],...((C=(g=n.discount)==null?void 0:g.pricing_items)==null?void 0:C.map((V,x)=>{var B,k;return{item:{...V,discountLevel:"REVENUE_ITEM"},error:x===((B=o.value)==null?void 0:B.index)&&((k=o.value)==null?void 0:k.discountLevel)==="pricing_items"?o.value.message:void 0}}))||[],...((N=(_=n.discount)==null?void 0:_.pricings)==null?void 0:N.map((V,x)=>{var B,k;return{item:{...V,discountLevel:"PRODUCT"},error:x===((B=o.value)==null?void 0:B.index)&&((k=o.value)==null?void 0:k.discountLevel)==="pricings"?o.value.message:void 0}}))||[],...((a=(h=n.discount)==null?void 0:h.products)==null?void 0:a.map((V,x)=>{var B,k;return{item:{...V,discountLevel:"PRODUCT"},error:x===((B=o.value)==null?void 0:B.index)&&((k=o.value)==null?void 0:k.discountLevel)==="products"?o.value.message:void 0}}))||[],...((u=(y=n.discount)==null?void 0:y.totals)==null?void 0:u.map((V,x)=>{var B,k;return{item:{...V,discountLevel:"INVOICE"},error:x===((B=o.value)==null?void 0:B.index)&&((k=o.value)==null?void 0:k.discountLevel)==="totals"?o.value.message:void 0}}))||[]]});return(v,c)=>(e.openBlock(),e.createBlock(Ve,e.mergeProps(v.$attrs,{title:i.value.title,"order-of-application-explanation":i.value.orderOfApplicationExplanation,description:i.value.description,"pricing-plan-version-is-selected":!!t.pricingPlanVersion,"select-pricing-plan-hint":i.value.selectPricingPlanHint,"add-item-label":i.value.addItemLabel,"is-editable":e.unref(s),"is-creatable":!!t.isCreatable,"not-editable-explanation":i.value.notEditableExplanation,"has-items":l.value.length>0,onAdd:c[0]||(c[0]=d=>v.$emit("add"))}),{icon:e.withCtx(()=>[e.createElementVNode("img",{src:e.unref(si),alt:""},null,8,di)]),"list-items":e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,({item:d,error:b})=>(e.openBlock(),e.createElementBlock("li",{key:JSON.stringify(d)},[e.createVNode(ci,{discount:d,error:b,"is-editable":e.unref(r)(d),"is-removable":e.unref(f)(d),"pricing-plan-version":t.pricingPlanVersion,i18n:i.value,timezone:t.timezone,onEdit:m=>v.$emit("edit",d),onDelete:m=>v.$emit("delete",d)},null,8,["discount","error","is-editable","is-removable","pricing-plan-version","i18n","timezone","onEdit","onDelete"])]))),128))]),_:1},16,["title","order-of-application-explanation","description","pricing-plan-version-is-selected","select-pricing-plan-hint","add-item-label","is-editable","is-creatable","not-editable-explanation","has-items"]))}}),Ee={...de,...xe,markupBody:(t,n,i)=>`Markup on ${t} <strong>${n}</strong> ${i}`},mi=(t,n=Ee,i)=>{const{formatDate:o}=E.useIntl(),s=e.computed(()=>{var v,c;return((c=(v=t.value)==null?void 0:v.pricing_categories)==null?void 0:c.flatMap(d=>{var b;return[...((b=d.pricing_groups)==null?void 0:b.flatMap(m=>m.pricings))??[],...d.pricings??[]]}))??[]}),r=v=>n.markupBody(n.pricingRule,f(v)??"",l(v)),f=v=>{var c,d;const b=a=>{var y;return a.id===((y=v.ids)==null?void 0:y[0])},m=a=>{var y,u;return b(a)||!!((u=(y=a.conditions)==null?void 0:y.configs)!=null&&u.some(b))},p=a=>{var y;return(y=a.configs)==null?void 0:y.some(m)},g=a=>{var y;return(y=a.items)==null?void 0:y.some(p)},C=(c=s.value)==null?void 0:c.find(g),_=(d=C==null?void 0:C.items)==null?void 0:d.find(p),N=(_==null?void 0:_.configs)&&(_==null?void 0:_.configs.flatMap(T.getFlatConfigs)),h=N==null?void 0:N.find(b);return`<strong>${T.getConfigName(n)({pricing:C,item:_,config:h})}</strong>`},l=v=>{if(!v.start_at&&!v.end_at)return"";let c,d;return v.start_at||(c=n.startOfSchedule),v.end_at||(d=n.endOfSchedule),v.start_at&&(c=o(i?{date:v.start_at,format:"date",offsetType:"offsetted",timezone:i}:{date:v.start_at,format:"date",offsetType:"local",showTimezone:!1})),v.end_at&&(d=o(i?{date:v.end_at,format:"date",offsetType:"offsetted",timezone:i}:{date:v.end_at,format:"date",offsetType:"local",showTimezone:!1})),`(${c} - ${d})`};return{getMarkupBody:r,getFormattedDuration:l}},pi=t=>{const n=Object.entries(t||{});if(n.length===0)return;const[i,o]=n[0],[s,r,f]=i.split(".");return{markupLevel:s,index:parseInt(r,10),fieldName:f,message:o}},gi={class:"font-semibold text-primary-600"},fi=["innerHTML"],vi=e.defineComponent({__name:"SubscriptionMarkupItem",props:{markup:{},pricingPlanVersion:{},isEditable:{type:Boolean},isRemovable:{type:Boolean},i18n:{},error:{},timezone:{}},emits:["edit","delete"],setup(t,{emit:n}){const i=t,o=n,s=e.computed(()=>i.i18n??Ee),{getMarkupBody:r}=mi(e.toRef(()=>i.pricingPlanVersion),s.value,i.timezone);return(f,l)=>(e.openBlock(),e.createBlock(Be,{icon:"north_east","icon-color":"teal","is-editable":t.isEditable,"is-removable":t.isRemovable,error:t.error,onEdit:l[0]||(l[0]=v=>o("edit")),onDelete:l[1]||(l[1]=v=>o("delete"))},{body:e.withCtx(()=>[e.createElementVNode("span",gi,e.toDisplayString(t.markup.percentage)+"%"+e.toDisplayString(" "),1),e.createElementVNode("span",{innerHTML:e.unref(r)(t.markup)},null,8,fi)]),_:1},8,["is-editable","is-removable","error"]))}}),re={...Ee,title:"Markups",orderOfApplicationExplanation:"Markups are applied before commitments on invoices",description:"Add price markups for a defined period or specific terms.",selectPricingPlanHint:"Please select a pricing plan to add markups",addItemLabel:"Add",notEditableExplanation:"Markups can't be edited for active schedules"},hi="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='a'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='44'%20height='44'%3e%3cpath%20fill='%23D9D9D9'%20d='M0%200h44v44H0z'/%3e%3c/mask%3e%3cg%20mask='url(%23a)'%3e%3cmask%20id='e'%20fill='%23fff'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16.76%2040.05a2.94%202.94%200%200%201%203.17.63%202.96%202.96%200%200%200%204.15%200%202.93%202.93%200%200%201%203.17-.63c1.48.61%203.19-.1%203.8-1.58a2.92%202.92%200%200%201%202.7-1.8c1.61%200%202.92-1.3%202.92-2.92%200-1.17.7-2.23%201.78-2.69a2.96%202.96%200%200%200%201.6-3.82%202.94%202.94%200%200%201%20.63-3.17%202.96%202.96%200%200%200%200-4.15%202.93%202.93%200%200%201-.63-3.16c.61-1.5-.1-3.2-1.58-3.81a2.92%202.92%200%200%201-1.8-2.7c0-1.61-1.3-2.92-2.92-2.92a2.93%202.93%200%200%201-2.69-1.78%202.96%202.96%200%200%200-3.82-1.6c-1.09.44-2.34.2-3.17-.63a2.96%202.96%200%200%200-4.15%200%202.93%202.93%200%200%201-3.16.63c-1.5-.61-3.2.1-3.81%201.58a2.92%202.92%200%200%201-2.7%201.8%202.92%202.92%200%200%200-2.92%202.92c0%201.17-.7%202.23-1.78%202.69a2.96%202.96%200%200%200-1.6%203.82c.44%201.09.2%202.34-.63%203.17a2.96%202.96%200%200%200%20.01%204.15c.82.83%201.07%202.08.62%203.16-.61%201.5.1%203.2%201.58%203.81a2.92%202.92%200%200%201%201.8%202.7c0%201.61%201.3%202.92%202.92%202.92%201.17%200%202.23.7%202.69%201.78a2.96%202.96%200%200%200%203.82%201.6Z'/%3e%3c/mask%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16.76%2040.05a2.94%202.94%200%200%201%203.17.63%202.96%202.96%200%200%200%204.15%200%202.93%202.93%200%200%201%203.17-.63c1.48.61%203.19-.1%203.8-1.58a2.92%202.92%200%200%201%202.7-1.8c1.61%200%202.92-1.3%202.92-2.92%200-1.17.7-2.23%201.78-2.69a2.96%202.96%200%200%200%201.6-3.82%202.94%202.94%200%200%201%20.63-3.17%202.96%202.96%200%200%200%200-4.15%202.93%202.93%200%200%201-.63-3.16c.61-1.5-.1-3.2-1.58-3.81a2.92%202.92%200%200%201-1.8-2.7c0-1.61-1.3-2.92-2.92-2.92a2.93%202.93%200%200%201-2.69-1.78%202.96%202.96%200%200%200-3.82-1.6c-1.09.44-2.34.2-3.17-.63a2.96%202.96%200%200%200-4.15%200%202.93%202.93%200%200%201-3.16.63c-1.5-.61-3.2.1-3.81%201.58a2.92%202.92%200%200%201-2.7%201.8%202.92%202.92%200%200%200-2.92%202.92c0%201.17-.7%202.23-1.78%202.69a2.96%202.96%200%200%200-1.6%203.82c.44%201.09.2%202.34-.63%203.17a2.96%202.96%200%200%200%20.01%204.15c.82.83%201.07%202.08.62%203.16-.61%201.5.1%203.2%201.58%203.81a2.92%202.92%200%200%201%201.8%202.7c0%201.61%201.3%202.92%202.92%202.92%201.17%200%202.23.7%202.69%201.78a2.96%202.96%200%200%200%203.82%201.6Z'%20fill='%23BFEAFB'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16.76%2040.05a2.94%202.94%200%200%201%203.17.63%202.96%202.96%200%200%200%204.15%200%202.93%202.93%200%200%201%203.17-.63c1.48.61%203.19-.1%203.8-1.58a2.92%202.92%200%200%201%202.7-1.8c1.61%200%202.92-1.3%202.92-2.92%200-1.17.7-2.23%201.78-2.69a2.96%202.96%200%200%200%201.6-3.82%202.94%202.94%200%200%201%20.63-3.17%202.96%202.96%200%200%200%200-4.15%202.93%202.93%200%200%201-.63-3.16c.61-1.5-.1-3.2-1.58-3.81a2.92%202.92%200%200%201-1.8-2.7c0-1.61-1.3-2.92-2.92-2.92a2.93%202.93%200%200%201-2.69-1.78%202.96%202.96%200%200%200-3.82-1.6c-1.09.44-2.34.2-3.17-.63a2.96%202.96%200%200%200-4.15%200%202.93%202.93%200%200%201-3.16.63c-1.5-.61-3.2.1-3.81%201.58a2.92%202.92%200%200%201-2.7%201.8%202.92%202.92%200%200%200-2.92%202.92c0%201.17-.7%202.23-1.78%202.69a2.96%202.96%200%200%200-1.6%203.82c.44%201.09.2%202.34-.63%203.17a2.96%202.96%200%200%200%20.01%204.15c.82.83%201.07%202.08.62%203.16-.61%201.5.1%203.2%201.58%203.81a2.92%202.92%200%200%201%201.8%202.7c0%201.61%201.3%202.92%202.92%202.92%201.17%200%202.23.7%202.69%201.78a2.96%202.96%200%200%200%203.82%201.6Z'%20fill='url(%23b)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16.76%2040.05a2.94%202.94%200%200%201%203.17.63%202.96%202.96%200%200%200%204.15%200%202.93%202.93%200%200%201%203.17-.63c1.48.61%203.19-.1%203.8-1.58a2.92%202.92%200%200%201%202.7-1.8c1.61%200%202.92-1.3%202.92-2.92%200-1.17.7-2.23%201.78-2.69a2.96%202.96%200%200%200%201.6-3.82%202.94%202.94%200%200%201%20.63-3.17%202.96%202.96%200%200%200%200-4.15%202.93%202.93%200%200%201-.63-3.16c.61-1.5-.1-3.2-1.58-3.81a2.92%202.92%200%200%201-1.8-2.7c0-1.61-1.3-2.92-2.92-2.92a2.93%202.93%200%200%201-2.69-1.78%202.96%202.96%200%200%200-3.82-1.6c-1.09.44-2.34.2-3.17-.63a2.96%202.96%200%200%200-4.15%200%202.93%202.93%200%200%201-3.16.63c-1.5-.61-3.2.1-3.81%201.58a2.92%202.92%200%200%201-2.7%201.8%202.92%202.92%200%200%200-2.92%202.92c0%201.17-.7%202.23-1.78%202.69a2.96%202.96%200%200%200-1.6%203.82c.44%201.09.2%202.34-.63%203.17a2.96%202.96%200%200%200%20.01%204.15c.82.83%201.07%202.08.62%203.16-.61%201.5.1%203.2%201.58%203.81a2.92%202.92%200%200%201%201.8%202.7c0%201.61%201.3%202.92%202.92%202.92%201.17%200%202.23.7%202.69%201.78a2.96%202.96%200%200%200%203.82%201.6Z'%20fill='url(%23c)'/%3e%3cpath%20d='M12.02%2038.84a3.96%203.96%200%200%200%205.12%202.14l-.75-1.86c-.98.4-2.12-.07-2.53-1.05l-1.84.77Zm-1.77-1.17c.76%200%201.46.46%201.77%201.17l1.84-.78a3.93%203.93%200%200%200-3.61-2.4v2Zm-3.92-3.92a3.92%203.92%200%200%200%203.92%203.92v-2a1.92%201.92%200%200%201-1.92-1.92h-2Zm-1.18-1.77c.72.3%201.18%201%201.18%201.77h2c0-1.58-.95-3.01-2.42-3.62l-.76%201.85Zm-2.12-5.12c-.83%202%20.12%204.29%202.12%205.12l.76-1.85a1.92%201.92%200%200%201-1.03-2.5l-1.85-.77Zm-.41-2.08c.54.55.7%201.37.4%202.08l1.86.77c.6-1.46.26-3.14-.84-4.25l-1.42%201.4Zm-.01-5.55a3.96%203.96%200%200%200%200%205.55l1.43-1.4a1.96%201.96%200%200%201%200-2.75l-1.43-1.4Zm.41-2.1c.3.73.13%201.55-.41%202.1l1.42%201.4a3.94%203.94%200%200%200%20.85-4.25l-1.86.76Zm2.14-5.11a3.96%203.96%200%200%200-2.14%205.12l1.86-.76c-.4-.97.07-2.1%201.06-2.52l-.78-1.84Zm1.17-1.77c0%20.76-.46%201.46-1.17%201.77l.78%201.84a3.93%203.93%200%200%200%202.4-3.61h-2Zm3.92-3.92a3.92%203.92%200%200%200-3.92%203.92h2c0-1.06.86-1.92%201.92-1.92v-2Zm1.77-1.18c-.3.72-1%201.18-1.77%201.18v2c1.58%200%203.01-.95%203.62-2.42l-1.85-.76Zm5.12-2.12c-2-.83-4.29.12-5.12%202.12l1.85.76a1.92%201.92%200%200%201%202.5-1.03l.77-1.85Zm2.08-.41c-.55.54-1.37.7-2.08.4l-.77%201.86c1.46.6%203.14.26%204.26-.84l-1.4-1.42Zm5.55-.01a3.96%203.96%200%200%200-5.55%200l1.4%201.43a1.96%201.96%200%200%201%202.75%200l1.4-1.43Zm2.1.41c-.72.3-1.55.13-2.1-.41l-1.4%201.42a3.94%203.94%200%200%200%204.25.85l-.76-1.86Zm5.12%202.14a3.96%203.96%200%200%200-5.13-2.14l.76%201.86c.97-.4%202.1.07%202.52%201.05L32%205.16Zm1.76%201.17c-.76%200-1.46-.46-1.76-1.17l-1.85.77a3.93%203.93%200%200%200%203.61%202.4v-2Zm3.92%203.92a3.92%203.92%200%200%200-3.92-3.92v2c1.06%200%201.92.86%201.92%201.92h2Zm1.18%201.77c-.71-.3-1.18-1-1.18-1.77h-2c0%201.58.95%203.01%202.42%203.62l.76-1.85Zm2.12%205.12c.83-2-.12-4.29-2.12-5.12l-.76%201.85c.97.4%201.44%201.53%201.03%202.5l1.85.77Zm.41%202.08a1.93%201.93%200%200%201-.4-2.08l-1.86-.77a3.93%203.93%200%200%200%20.84%204.25l1.42-1.4Zm.01%205.55a3.96%203.96%200%200%200%200-5.55l-1.43%201.4c.75.77.75%202%200%202.74l1.43%201.4Zm-.41%202.1c-.3-.73-.13-1.55.41-2.1l-1.42-1.4a3.94%203.94%200%200%200-.85%204.25l1.86-.76Zm-2.14%205.11a3.96%203.96%200%200%200%202.14-5.12l-1.86.76c.4.97-.07%202.1-1.05%202.52l.77%201.84Zm-1.17%201.77c0-.76.46-1.46%201.17-1.77l-.77-1.84a3.93%203.93%200%200%200-2.4%203.61h2Zm-3.92%203.92a3.92%203.92%200%200%200%203.92-3.92h-2c0%201.06-.86%201.92-1.92%201.92v2Zm-1.77%201.18c.3-.72%201-1.18%201.77-1.18v-2c-1.58%200-3.01.95-3.62%202.42l1.85.76Zm-5.12%202.12c2%20.83%204.3-.12%205.12-2.12l-1.85-.76a1.92%201.92%200%200%201-2.5%201.03l-.77%201.85Zm-2.08.41c.55-.54%201.38-.7%202.08-.4l.77-1.86a3.93%203.93%200%200%200-4.25.84l1.4%201.42Zm-4.14-1.41a3.94%203.94%200%200%200-4.25-.85l.75%201.86c.72-.3%201.54-.13%202.1.41l1.4-1.42Zm-1.4%201.42a3.96%203.96%200%200%200%205.54%200l-1.4-1.43c-.77.75-2%20.75-2.74%200l-1.4%201.43Z'%20fill='url(%23d)'%20fill-opacity='.1'%20mask='url(%23e)'/%3e%3cg%20opacity='.5'%3e%3cmask%20id='f'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='12'%20y='12'%20width='20'%20height='20'%3e%3cpath%20fill='%23D9D9D9'%20d='M12%2012h20v20H12z'/%3e%3c/mask%3e%3cg%20mask='url(%23f)'%3e%3cpath%20d='m16.5%2028.67-1.17-1.17L25%2017.83h-5.5v-1.66h8.33v8.33h-1.66V19l-9.67%209.67Z'%20fill='%23222B35'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='b'%20x1='1.28'%20y1='1.28'%20x2='42.72'%20y2='42.72'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23395E6D'/%3e%3cstop%20offset='1'%20stop-color='%23395E6D'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient%20id='c'%20x1='42.72'%20y1='1.28'%20x2='1.28'%20y2='42.72'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23fff'/%3e%3cstop%20offset='1'%20stop-color='%23fff'%20stop-opacity='.4'/%3e%3c/linearGradient%3e%3clinearGradient%20id='d'%20x1='22'%20y1='42.72'%20x2='22'%20y2='-2.59'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%230C0E41'/%3e%3cstop%20offset='1'%20stop-color='%230C0E41'%20stop-opacity='.5'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",yi=["src"],bi=e.defineComponent({__name:"SubscriptionMarkups",props:{i18n:{},markup:{},pricingPlanVersion:{},isCreatable:{type:Boolean},isEditable:{type:[Boolean,Function]},isRemovable:{type:[Boolean,Function]},error:{},timezone:{}},emits:["add","edit","delete"],setup(t){const n=t,i=e.computed(()=>n.i18n??re),{isEditableFlag:o,isItemEditable:s,isItemRemovable:r}=Ne({isEditable:n.isEditable,isRemovable:n.isRemovable}),f=e.computed(()=>{if("error"in n)return pi(n.error)}),l=e.computed(()=>{var v,c;return((c=(v=n.markup)==null?void 0:v.pricing_item_configs)==null?void 0:c.map((d,b)=>{var m,p;return{item:d,error:b===((m=f.value)==null?void 0:m.index)&&((p=f.value)==null?void 0:p.markupLevel)==="pricing_item_configs"?f.value.message:void 0}}))??[]});return(v,c)=>(e.openBlock(),e.createBlock(Ve,e.mergeProps(v.$attrs,{title:i.value.title,"order-of-application-explanation":i.value.orderOfApplicationExplanation,description:i.value.description,"pricing-plan-version-is-selected":!!t.pricingPlanVersion,"select-pricing-plan-hint":i.value.selectPricingPlanHint,"add-item-label":i.value.addItemLabel,"is-editable":e.unref(o),"is-creatable":!!t.isCreatable,"not-editable-explanation":i.value.notEditableExplanation,"has-items":l.value.length>0,onAdd:c[0]||(c[0]=d=>v.$emit("add"))}),{icon:e.withCtx(()=>[e.createElementVNode("img",{src:e.unref(hi),alt:""},null,8,yi)]),"list-items":e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,({item:d,error:b})=>(e.openBlock(),e.createElementBlock("li",{key:JSON.stringify(d)},[e.createVNode(vi,{markup:d,error:b,"is-editable":e.unref(s)(d),"is-removable":e.unref(r)(d),"pricing-plan-version":t.pricingPlanVersion,i18n:i.value,timezone:t.timezone,onEdit:m=>v.$emit("edit",d),onDelete:m=>v.$emit("delete",d)},null,8,["markup","error","is-editable","is-removable","pricing-plan-version","i18n","timezone","onEdit","onDelete"])]))),128))]),_:1},16,["title","order-of-application-explanation","description","pricing-plan-version-is-selected","select-pricing-plan-hint","add-item-label","is-editable","is-creatable","not-editable-explanation","has-items"]))}}),Vt={startOfSchedule:te.startOfSchedule,endOfSchedule:te.endOfSchedule,markupPercentage:t=>`${t}% markup`},_i={class:"flex items-center gap-2"},ki=e.defineComponent({__name:"SubscriptionScheduleConfigMarkup",props:{markup:{},i18n:{}},setup(t){const n=t,i=e.computed(()=>n.i18n??Vt),{formatDate:o}=E.useIntl();return(s,r)=>(e.openBlock(),e.createBlock(Z._sfc_main,{intent:"neutral"},{default:e.withCtx(()=>[e.createElementVNode("div",_i,[e.createVNode(L._sfc_main$1,{icon:"north_east",size:"xs"}),e.createElementVNode("span",null,[t.markup.percentage?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(i.value.markupPercentage(t.markup.percentage)),1)],64)):e.createCommentVNode("",!0),t.markup.start_at||t.markup.end_at?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(" ")+"("+e.toDisplayString(t.markup.start_at?e.unref(o)({date:t.markup.start_at,format:"date",offsetType:"local",showTimezone:!1}):i.value.startOfSchedule)+" - "+e.toDisplayString(t.markup.end_at?e.unref(o)({date:t.markup.end_at,format:"date",offsetType:"local",showTimezone:!1}):i.value.endOfSchedule)+") ",1)],64)):e.createCommentVNode("",!0)])])]),_:1}))}}),Et=e.defineComponent({__name:"TopUpDescription",props:{i18n:{},pricingItemConfig:{}},setup(t){const n=t,i=e.computed(()=>{var r;return!!((r=n.pricingItemConfig.top_up)!=null&&r.rollover)}),o=e.computed(()=>{var r,f;return(f=(r=n.pricingItemConfig.details)==null?void 0:r.bands)==null?void 0:f.some(l=>!!l.block_size)}),s=e.computed(()=>T.isTieredPricing(n.pricingItemConfig)&&o.value?i.value?n.i18n.tiered.blockSize.rolloverDescription:n.i18n.tiered.blockSize.nonRolloverDescription:T.isTieredPricing(n.pricingItemConfig)&&!o.value?i.value?n.i18n.tiered.nonBlockSize.rolloverDescription:n.i18n.tiered.nonBlockSize.nonRolloverDescription:i.value?n.i18n.rolloverDescription:n.i18n.nonRolloverDescription);return(r,f)=>(e.openBlock(),e.createBlock(E._sfc_main,{variant:"body-xs",color:"secondary",class:"italic"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value),1)]),_:1}))}}),Ci={class:"min-w-0 grow"},xi={class:"shrink-0"},Bi=e.defineComponent({__name:"CardHeader",props:{icon:{},iconVariant:{default:"neutral"},title:{},subTitle:{},spacing:{default:"md"},size:{default:"sm"},variant:{default:"default"},uppercase:{type:Boolean,default:!0},cardVariant:{default:"default"}},setup(t){const n=t,i=e.computed(()=>{switch(n.cardVariant){case"error":return"border-red-100";case"dark":return"border-gray-600";default:return"border-gray-100"}});return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["card-header-print-root flex items-center justify-between gap-3",{"px-2 pt-2":t.spacing==="xs","px-4 pt-2":t.spacing==="sm","pb-2":["xs","sm"].includes(t.spacing)&&t.variant==="bordered","px-4 pt-4":t.spacing==="md","pb-4":t.spacing==="md"&&t.variant==="bordered","px-8 pt-6":t.spacing==="lg","pb-6":t.spacing==="lg"&&t.variant==="bordered","border-b":t.variant==="bordered",[i.value]:t.variant==="bordered"}])},[e.createElementVNode("div",Ci,[e.createVNode(e.unref(bt._sfc_main),{icon:t.icon,title:t.title,"sub-title":t.subTitle,variant:t.iconVariant,size:t.size,uppercase:t.uppercase},{prefix:e.withCtx(()=>[e.renderSlot(o.$slots,"prefix",{},void 0,!0)]),default:e.withCtx(()=>[e.renderSlot(o.$slots,"default",{},void 0,!0)]),subTitle:e.withCtx(()=>[e.renderSlot(o.$slots,"subTitle",{},void 0,!0)]),suffix:e.withCtx(()=>[e.renderSlot(o.$slots,"title-suffix",{},void 0,!0)]),_:3},8,["icon","title","sub-title","variant","size","uppercase"])]),e.createElementVNode("div",xi,[e.renderSlot(o.$slots,"right",{},void 0,!0)])],2))}}),St=G._export_sfc(Bi,[["__scopeId","data-v-fd2a04c5"]]),Ni={class:"min-w-0 grow"},Vi={class:"flex items-center justify-center gap-2"},Ei={class:"collapsible-card-print-content"},Si=e.defineComponent({__name:"CollapsibleCard",props:{isOpen:{type:Boolean,default:!1},isControlled:{type:Boolean},title:{},icon:{},iconVariant:{},spacing:{default:"md"},borderStyle:{},isExpandContentHidden:{type:Boolean,default:!1},printBehavior:{},withLeftAccent:{type:Boolean,default:!1},headerSize:{default:"sm"},uppercase:{type:Boolean,default:!0},cappedWidth:{type:Boolean},variant:{default:"default"},shadowSize:{},borderRadius:{},rootClass:{},wrapperClass:{}},emits:["toggle","toggled"],setup(t,{emit:n}){const i=t,o=n,[s,r]=pe.useToggle(!i.isOpen),f=()=>{i.isControlled?o("toggle"):r()};e.watch(()=>s.value,d=>{o("toggled",d)}),e.watch(()=>i.isOpen,d=>{i.isControlled&&r(!d)});const l=e.computed(()=>{switch(i.variant){case"error":return"border-red-50 bg-red-50";case"dark":return"bg-gray-800 text-gray-300";default:return""}}),v=e.computed(()=>{switch(i.variant){case"error":return"bg-red-200";default:return""}}),c=e.computed(()=>["ease-in-out duration-200 hover:shadow-md",l.value].join(" "));return(d,b)=>(e.openBlock(),e.createBlock(se,{spacing:"none","wrapper-class":"collapsible-card-print-wrapper","root-class":e.unref(oe.cn)("collapsible-card-print-root",c.value),"border-style":t.borderStyle,"print-behavior":t.printBehavior},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(e.unref(oe.cn)(t.withLeftAccent?"flex p-1":""))},[t.withLeftAccent?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["mr-2 w-1 rounded-md",v.value])},null,2)):e.createCommentVNode("",!0),e.createElementVNode("div",Ni,[e.renderSlot(d.$slots,"pre-header",{},void 0,!0),e.createVNode(St,{"data-testid":"card-header",title:t.title,icon:t.icon,"icon-variant":t.iconVariant,spacing:t.spacing,size:t.headerSize,uppercase:t.uppercase,class:e.normalizeClass(["cursor-pointer",{"pb-4":t.spacing==="md","pb-6":t.spacing==="lg"}]),variant:"bordered",tabindex:"0","card-variant":t.variant,onClick:e.withModifiers(f,["stop"]),onKeyup:e.withKeys(f,["enter"])},e.createSlots({prefix:e.withCtx(()=>[e.renderSlot(d.$slots,"title-prefix",{},void 0,!0)]),default:e.withCtx(()=>[e.renderSlot(d.$slots,"title",{},void 0,!0)]),"title-suffix":e.withCtx(()=>[e.renderSlot(d.$slots,"title-suffix",{},void 0,!0)]),_:2},[t.isExpandContentHidden?void 0:{name:"right",fn:e.withCtx(()=>[e.createElementVNode("div",Vi,[d.$slots.right?(e.openBlock(),e.createElementBlock("div",{key:0,class:"flex justify-center",onClick:b[0]||(b[0]=e.withModifiers(()=>{},["stop"])),onKeyup:b[1]||(b[1]=e.withKeys(e.withModifiers(()=>{},["stop"]),["enter"]))},[e.renderSlot(d.$slots,"right",{},void 0,!0)],32)):e.createCommentVNode("",!0),e.createVNode(L._sfc_main$1,{icon:e.unref(s)?"unfold_more":"unfold_less",size:t.headerSize,class:e.normalizeClass({"text-white":t.variant==="dark","print:hidden":!0})},null,8,["icon","size","class"])])]),key:"0"}]),1032,["title","icon","icon-variant","spacing","size","uppercase","class","card-variant"]),t.isExpandContentHidden?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ne._sfc_main,{key:0,"is-open":!e.unref(s),lazy:""},{default:e.withCtx(()=>[e.createElementVNode("div",Ei,[e.createVNode(be,{spacing:t.spacing},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"default",{},void 0,!0)]),_:3},8,["spacing"])])]),_:3},8,["is-open"]))])],2)]),_:3},8,["root-class","border-style","print-behavior"]))}}),wi=G._export_sfc(Si,[["__scopeId","data-v-31d142b4"]]),Pi={tooltipCollapse:"Close",tooltipExpand:"Open"},$i={class:"flex flex-col"},Ii=["aria-label"],Ti={class:"flex grow select-none items-center justify-between"},Di={class:"text-left"},Oi={class:"flex items-center gap-2"},zi={key:0},Li={class:"flex gap-6 print:block"},Mi={class:"grow pt-5"},Ri={class:"collapsible-list-item-content pb-6"},Ai=e.defineComponent({__name:"CollapsibleListItem",props:{hasContinuedPreline:{type:Boolean,default:!0},itemNumber:{default:1},i18n:{default:()=>Pi},isOpen:{type:Boolean,default:!1},hideCollapseIcon:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1}},emits:["toggle"],setup(t){const n=t,i=e.computed(()=>n.isOpen?"unfold_less":"unfold_more");return(o,s)=>(e.openBlock(),e.createElementBlock("li",$i,[e.createElementVNode("button",{type:"button",class:"flex items-center gap-6","aria-label":t.isOpen?t.i18n.tooltipCollapse:t.i18n.tooltipExpand,onClick:s[0]||(s[0]=e.withModifiers(r=>o.$emit("toggle"),["stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["flex h-6 select-none items-center justify-center rounded border bg-white shadow-sm print:hidden",e.unref(ve)])},[e.renderSlot(o.$slots,"icon",{},()=>[e.createVNode(E._sfc_main,{tag:"span",variant:"body-xs",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.itemNumber),1)]),_:1})],!0)],2),e.createElementVNode("div",Ti,[e.createElementVNode("div",Di,[e.renderSlot(o.$slots,"left",{},void 0,!0)]),e.createElementVNode("div",Oi,[o.$slots.right?(e.openBlock(),e.createElementBlock("div",zi,[e.renderSlot(o.$slots,"right",{},void 0,!0)])):e.createCommentVNode("",!0),t.hideCollapseIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(L._sfc_main$1,{key:1,icon:i.value,size:"sm",class:"h-6 print:hidden"},null,8,["icon"]))])])],8,Ii),e.createElementVNode("div",Li,[e.createElementVNode("div",{class:e.normalizeClass(["relative flex shrink-0 justify-center",e.unref(ve)])},[e.createElementVNode("div",{class:e.normalizeClass(["pointer-events-none h-full w-0.5",[t.hasContinuedPreline?"bg-gray-100":"bg-gradient-to-b from-gray-100 to-transparent"]])},null,2)],2),e.createElementVNode("div",Mi,[e.createVNode(ne._sfc_main,{"is-open":t.isOpen,lazy:t.lazy},{default:e.withCtx(()=>[e.createElementVNode("div",Ri,[e.renderSlot(o.$slots,"default",{},void 0,!0)])]),_:3},8,["is-open","lazy"])])])]))}}),gt=G._export_sfc(Ai,[["__scopeId","data-v-333bc619"]]),Fi={class:"flex flex-col gap-1"},Zi={class:"text-base"},Ui=e.defineComponent({__name:"PricingItemHeader",props:{item:{},creditTypesById:{}},setup(t){return(n,i)=>(e.openBlock(),e.createElementBlock("div",Fi,[e.createElementVNode("h4",Zi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.product_items,o=>(e.openBlock(),e.createBlock(E._sfc_main,{key:o.id,tag:"span",class:"flex flex-wrap items-center gap-3",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.name),1)]),_:2},1024))),128))])]))}}),wt={tiered:{nonBlockSize:{rolloverDescription:"Includes prior volume to determine the tier, including volume from prior schedule's billing cycles",nonRolloverDescription:"Prior volume is included to determine the tier"},blockSize:{rolloverDescription:"Includes prior volume to determine the tier and unused volume will move over, including volume from adjacent schedule's billing cycles",nonRolloverDescription:"Includes prior volume to determine the tier and unused volume will move over to the following billing cycles"}},nonRolloverDescription:"Unused volume will be moved over to the next billing cycle",rolloverDescription:"Unused volume will be moved over to the next billing cycle, including the next schedule's billing cycle"},Pt={...ke,formatBillingPeriod:Q.formatBillingPeriod,formatAmount:Q.formatAmount,formatNumber:t=>new Intl.NumberFormat("en-US").format(t),billedEvery:"Billed every",every:"every",from:"From",upTo:"Up to",feeFloor:"Fee floor",feeCap:"Fee cap",price:"Price",pricePerStep:()=>"Price / Step",pricePerUnit:()=>"Price / Unit",percentage:"Percentage",per:"Per",infinite:"infinite",topUpDescription:wt,fixedAmount:"Fixed amount",tieringConditions:"Tiering conditions"},$t={...ke,topUpDescription:wt,notBilled:"Not billed",passThrough:"Pass through",perNumberOfUnits:(t,n)=>`per ${Number(t)>1?`${t} ${(n==null?void 0:n.plural)??"units"}`:`${(n==null?void 0:n.singular)??"unit"}`}`,withDefault:"with default",ofAmount:()=>"of amount",with:"with",aMinimumOf:"a minimum of",and:"and",aMaximumOf:"a maximum of",perSeat:"per seat",billedInAdvance:"billed in advance",billedEvery:"billed every",oneOff:"one-off",formatBillingPeriod:Q.formatBillingPeriod,perUnit:"per unit"},It={...$t,...Pt,includedVolumeAmountPerSchedule:t=>`with <strong class="font-semibold text-primary-600">${new Intl.NumberFormat("en-US",{style:"currency",currencyDisplay:"symbol",currency:t.currency,maximumFractionDigits:10}).format(Number(t.quantity))}</strong> free amount per schedule included`,includedVolumeAmountPerBillingPeriod:t=>`with <strong class="font-semibold text-primary-600">${new Intl.NumberFormat("en-US",{style:"currency",currencyDisplay:"symbol",currency:t.currency,maximumFractionDigits:10}).format(Number(t.quantity))}</strong> free amount per billing period included`,includedVolumeUnitsPerSchedule:t=>`with <strong class="font-semibold text-primary-600">${t} unit${t==="1"?"":"s"}</strong> per schedule included`,includedVolumeUnitsPerBillingPeriod:t=>`with <strong class="font-semibold text-primary-600">${t} unit${t==="1"?"":"s"}</strong> per billing period included`,includedSeats:t=>`with default <strong class="font-semibold text-primary-600">${t}</strong> seat${t==="1"?"":"s"}`},Hi={key:0,class:"flex flex-col gap-1"},Gi={class:"flex items-center gap-2"},ji={key:0,class:"flex justify-center gap-2"},qi={key:0,class:"ml-auto text-secondary"},Wi={key:1,class:"ml-auto text-secondary"},Yi={key:0,class:"ml-4 flex shrink-0 flex-col empty:hidden"},Ki={class:"flex items-center justify-end"},Ji={"data-testid":"flat-fixed-none-amount"},Xi={"data-testid":"flat-fixed-none-per-units",class:"pl-1"},Qi={key:0,class:"pl-1"},eo={"data-testid":"flat-fixed-none-amount"},to={key:0,class:"pl-1"},no={"data-testid":"flat-fixed-none-credits-label",class:"font-semibold text-primary-600"},io={"data-testid":"flat-fixed-none-per-units",class:"pl-1"},oo={key:0,class:"pl-1"},lo={class:"font-semibold text-primary-600"},ao={class:"pl-1"},ro={key:0,class:"pl-1"},co={key:1,class:"mr-1"},so={key:3,class:"mr-1"},uo={key:0,class:"flex shrink-0 flex-col"},mo={key:2,class:"pl-1"},po={key:3,class:"pl-1"},go={key:4,class:"shrink-9 pl-1 italic"},fo={class:"font-semibold text-primary-600"},vo={key:1,class:"flex shrink-0 flex-col"},ho={class:"pl-1"},yo={key:0},bo={key:1,class:"italic"},_o={class:"font-semibold text-primary-600"},ko={key:2,class:"flex shrink-0 flex-col"},Co={class:"pl-1"},xo={key:1,class:"pl-1"},Bo={key:2,class:"pl-1 italic"},No={class:"font-semibold text-primary-600"},Vo=e.defineComponent({__name:"FlatFixedNonePricingRule",props:{config:{},item:{},areNonBillableItemsVisible:{type:Boolean},i18n:{},isCombinedPricing:{type:Boolean},showConfigHeader:{type:Boolean,default:!0},showDefaultValues:{type:Boolean,default:!0},creditTypesById:{},isCollapsible:{type:Boolean},isExpanded:{type:Boolean}},emits:["expand-toggled"],setup(t){const n=t,{formatMessage:i}=E.useIntl(),o=e.computed(()=>n.i18n??$t),s=e.computed(()=>T.isTopUpPricing(n.config)),r=i({defaultMessage:"unit",id:"lWOCGz",description:"Fallback singular unit label for pricing rule display"}),f=i({defaultMessage:"units",id:"Vl9vDx",description:"Fallback plural unit label for pricing rule display"}),l=e.computed(()=>n.item.product_items&&n.item.product_items[0]),v=e.computed(()=>{var h,a,y,u,V,x,B,k;if(((h=l.value)==null?void 0:h.model_type)==="CREDITS"){const S=(a=l.value.credits)==null?void 0:a.credit_type_id,w=S?(u=(y=n.creditTypesById)==null?void 0:y[S])==null?void 0:u.unit_name:void 0;return{singular:(w==null?void 0:w.singular)||r,plural:(w==null?void 0:w.plural)||f}}return{singular:((x=(V=l.value)==null?void 0:V.unit_name)==null?void 0:x.singular)||r,plural:((k=(B=l.value)==null?void 0:B.unit_name)==null?void 0:k.plural)||f}}),c=e.computed(()=>{var h,a,y,u;return{singular:((a=(h=l.value)==null?void 0:h.unit_name)==null?void 0:a.singular)||r,plural:((u=(y=l.value)==null?void 0:y.unit_name)==null?void 0:u.plural)||f}}),d=e.computed(()=>{var h,a,y,u;return(u=(y=(a=(h=n.config.split_pricing)==null?void 0:h.meter_properties)==null?void 0:a.map(V=>{var x;return(x=V.meter_property)==null?void 0:x.name}))==null?void 0:y.filter(V=>!!V))==null?void 0:u.join(",")}),b=e.computed(()=>n.showConfigHeader||n.config.split_pricing),m=e.computed(()=>!!n.config.use_fallback_currency&&!!n.config.fallback_currency),p=e.computed(()=>`Based on fallback currency – ${n.config.fallback_currency}`),g=e.computed(()=>{var h,a,y;return(y=(a=(h=n.config.details)==null?void 0:h.bands)==null?void 0:a[0])==null?void 0:y.credits}),C=e.computed(()=>{var h,a,y,u,V,x;const B=(h=g.value)==null?void 0:h.credit_type_id,k=(a=g.value)==null?void 0:a.quantity;if(!k)return"";const S=B?(y=n.creditTypesById)==null?void 0:y[B]:void 0;if(!S)return k;const w=Number(k)===1?((u=S.unit_name)==null?void 0:u.singular)??S.name:((V=S.unit_name)==null?void 0:V.plural)??((x=S.unit_name)==null?void 0:x.singular)??S.name;return w?`${k} ${w}`:k}),_=e.computed(()=>{var h;return((h=n.config.details)==null?void 0:h.pricing_type)==="NONE"}),N=e.computed(()=>{var h,a,y;return((h=l.value)==null?void 0:h.model_type)==="ONE_OFF"&&((a=n.config.details)==null?void 0:a.pricing_type)==="FLAT"?T.resolveDefaultUnitsNumber((y=n.config.default_units)==null?void 0:y.number):null});return(h,a)=>(e.openBlock(),e.createBlock(_e,{class:e.normalizeClass({"print:hidden":_.value}),"is-collapsible":t.isCollapsible,"is-expanded":t.isExpanded,"header-class":"flex items-start justify-between",onToggle:a[0]||(a[0]=y=>h.$emit("expand-toggled"))},{header:e.withCtx(()=>{var y,u,V,x,B,k,S,w,P,D,$,O,U,R,F,M,j,Se,we,Pe,$e,Ie,Te,De,Oe,ze,Le,Me,Re,Ae,Fe,Ze,Ue,He,Ge,je,qe,We,Ye,Ke,Je,Xe,Qe,et,tt,nt,it;return[b.value?(e.openBlock(),e.createElementBlock("div",Hi,[e.createElementVNode("div",Gi,[t.showConfigHeader?(e.openBlock(),e.createBlock(Ce,{key:0,config:t.config,i18n:o.value},{"override-tooltip":e.withCtx(()=>[e.renderSlot(h.$slots,"override-tooltip")]),_:3},8,["config","i18n"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(I._sfc_main,{key:1,variant:"outline",placement:"top"},{tooltip:e.withCtx(()=>[e.createVNode(I.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(I._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(L._sfc_main$1,{icon:"change_circle",class:"text-gray-500"})]),_:1})):e.createCommentVNode("",!0)]),t.config.split_pricing?(e.openBlock(),e.createElementBlock("div",ji,[e.createVNode(E._sfc_main,{variant:"label",tag:"span"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value.splitBy),1)]),_:1}),e.createVNode(E._sfc_main,{tag:"span",variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.value),1)]),_:1})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),((y=t.config.details)==null?void 0:y.pricing_type)==="NONE"||((u=t.config.details)==null?void 0:u.pricing_type)==="PASS_THROUGH"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[((V=t.config.details)==null?void 0:V.pricing_type)==="NONE"?(e.openBlock(),e.createElementBlock("div",qi,e.toDisplayString(o.value.notBilled),1)):e.createCommentVNode("",!0),((x=t.config.details)==null?void 0:x.pricing_type)==="PASS_THROUGH"?(e.openBlock(),e.createElementBlock("div",Wi,e.toDisplayString(o.value.passThrough),1)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.value.model_type==="USAGE_BASED"||l.value.model_type==="CREDITS"?(e.openBlock(),e.createElementBlock("div",Yi,[e.createElementVNode("div",null,[e.createElementVNode("div",Ki,[(B=t.config.details)!=null&&B.bands&&((k=t.config.details)!=null&&k.bands[0].amount)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("span",Ji,[e.createVNode(z._sfc_main,{value:(S=t.config.details)==null?void 0:S.bands[0].amount,highlighted:""},null,8,["value"])]),e.createElementVNode("span",Xi,e.toDisplayString(o.value.perNumberOfUnits((P=(w=t.config.details)==null?void 0:w.bands[0])!=null&&P.block_size&&e.unref(H.isBandNumber)((D=t.config.details)==null?void 0:D.bands[0].block_size)?($=t.config.details)==null?void 0:$.bands[0].block_size.number:"1",v.value)),1),(O=t.config.details)!=null&&O.pricing_period?(e.openBlock(),e.createElementBlock("span",Qi,e.toDisplayString(o.value.formatBillingPeriod((U=t.config.details)==null?void 0:U.pricing_period)),1)):e.createCommentVNode("",!0)],64)):(R=t.config.details)!=null&&R.bands&&((F=t.config.details)!=null&&F.bands[0].fixed_amount)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("span",eo,[e.createVNode(z._sfc_main,{value:(M=t.config.details)==null?void 0:M.bands[0].fixed_amount,highlighted:""},null,8,["value"])]),(j=t.config.details)!=null&&j.pricing_period?(e.openBlock(),e.createElementBlock("span",to,e.toDisplayString(o.value.formatBillingPeriod((Se=t.config.details)==null?void 0:Se.pricing_period)),1)):e.createCommentVNode("",!0)],64)):(we=t.config.details)!=null&&we.bands&&(($e=(Pe=t.config.details)==null?void 0:Pe.bands[0].credits)!=null&&$e.quantity)&&((Te=(Ie=t.config.details)==null?void 0:Ie.bands[0].credits)!=null&&Te.credit_type_id)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("span",no,e.toDisplayString(C.value),1),e.createElementVNode("span",io,e.toDisplayString(o.value.perNumberOfUnits((Oe=(De=t.config.details)==null?void 0:De.bands[0])!=null&&Oe.block_size&&e.unref(H.isBandNumber)((ze=t.config.details)==null?void 0:ze.bands[0].block_size)?(Le=t.config.details)==null?void 0:Le.bands[0].block_size.number:"1",c.value)),1),(Me=t.config.details)!=null&&Me.pricing_period?(e.openBlock(),e.createElementBlock("span",oo,e.toDisplayString(o.value.formatBillingPeriod((Re=t.config.details)==null?void 0:Re.pricing_period)),1)):e.createCommentVNode("",!0)],64)):(Ae=t.config.details)!=null&&Ae.bands&&typeof((Fe=t.config.details)==null?void 0:Fe.bands[0].percentage)=="string"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("span",lo,e.toDisplayString((Ze=t.config.details)==null?void 0:Ze.bands[0].percentage)+"% ",1),e.createElementVNode("span",ao,e.toDisplayString(o.value.ofAmount((Ue=l.value.unit_name)==null?void 0:Ue.singular)),1),(He=t.config.details)!=null&&He.pricing_period?(e.openBlock(),e.createElementBlock("span",ro,e.toDisplayString(o.value.formatBillingPeriod((Ge=t.config.details)==null?void 0:Ge.pricing_period)),1)):e.createCommentVNode("",!0),(je=t.config.details)!=null&&je.bands[0].minimum_amount||(qe=t.config.details)!=null&&qe.bands[0].maximum_amount?(e.openBlock(),e.createElementBlock("span",co," , "+e.toDisplayString(o.value.with),1)):e.createCommentVNode("",!0),(We=t.config.details)!=null&&We.bands[0].minimum_amount?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(o.value.aMinimumOf)+" ",1),e.createVNode(z._sfc_main,{value:(Ye=t.config.details)==null?void 0:Ye.bands[0].minimum_amount,highlighted:"",class:"mx-1"},null,8,["value"])],64)):e.createCommentVNode("",!0),(Ke=t.config.details)!=null&&Ke.bands[0].minimum_amount&&((Je=t.config.details)!=null&&Je.bands[0].maximum_amount)?(e.openBlock(),e.createElementBlock("span",so,e.toDisplayString(o.value.and),1)):e.createCommentVNode("",!0),(Xe=t.config.details)!=null&&Xe.bands[0].maximum_amount?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createTextVNode(e.toDisplayString(o.value.aMaximumOf)+" ",1),e.createVNode(z._sfc_main,{value:(Qe=t.config.details)==null?void 0:Qe.bands[0].maximum_amount,highlighted:"",class:"ml-1"},null,8,["value"])],64)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",null,[e.renderSlot(h.$slots,"included")])])):e.createCommentVNode("",!0),t.isCombinedPricing?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[l.value.model_type==="RECURRING"?(e.openBlock(),e.createElementBlock("div",uo,[e.createElementVNode("div",null,[e.createVNode(E._sfc_main,{tag:"div",variant:"body-sm",class:"flex items-center"},{default:e.withCtx(()=>{var q,W,Y,K,J,X,ie,ot,lt;return[(q=t.config.details)!=null&&q.bands&&((W=t.config.details)!=null&&W.bands[0].amount)?(e.openBlock(),e.createBlock(z._sfc_main,{key:0,value:(Y=t.config.details)==null?void 0:Y.bands[0].amount,highlighted:""},null,8,["value"])):(K=t.config.details)!=null&&K.bands&&((J=t.config.details)!=null&&J.bands[0].fixed_amount)?(e.openBlock(),e.createBlock(z._sfc_main,{key:1,value:(X=t.config.details)==null?void 0:X.bands[0].fixed_amount,highlighted:""},null,8,["value"])):e.createCommentVNode("",!0),(ot=(ie=t.config.details)==null?void 0:ie.pricing_period)!=null&&ot.type?(e.openBlock(),e.createElementBlock("div",mo,e.toDisplayString(o.value.formatBillingPeriod((lt=t.config.details)==null?void 0:lt.pricing_period)),1)):(e.openBlock(),e.createElementBlock("div",po,"per billing period")),t.config.billing_in_advance?(e.openBlock(),e.createElementBlock("span",go," ("+e.toDisplayString(o.value.billedInAdvance)+") ",1)):e.createCommentVNode("",!0)]}),_:1}),(tt=(et=t.config.details)==null?void 0:et.billing_period)!=null&&tt.type?(e.openBlock(),e.createBlock(E._sfc_main,{key:0,tag:"div",variant:"body-sm",class:"text-right"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value.billedEvery)+" ",1),e.createElementVNode("span",fo,e.toDisplayString(o.value.formatBillingPeriod(t.config.details.billing_period,{prefix:!1})),1)]),_:1})):e.createCommentVNode("",!0)]),e.renderSlot(h.$slots,"included")])):e.createCommentVNode("",!0),l.value.model_type==="ONE_OFF"?(e.openBlock(),e.createElementBlock("div",vo,[e.createElementVNode("div",null,[e.createVNode(E._sfc_main,{tag:"div",variant:"body-sm",class:"flex items-center"},{default:e.withCtx(()=>{var q,W,Y,K,J,X,ie;return[(q=t.config.details)!=null&&q.bands&&((W=t.config.details)!=null&&W.bands[0].amount)?(e.openBlock(),e.createBlock(z._sfc_main,{key:0,value:(Y=t.config.details)==null?void 0:Y.bands[0].amount,highlighted:""},null,8,["value"])):(K=t.config.details)!=null&&K.bands&&((J=t.config.details)!=null&&J.bands[0].fixed_amount)?(e.openBlock(),e.createBlock(z._sfc_main,{key:1,value:(X=t.config.details)==null?void 0:X.bands[0].fixed_amount,highlighted:""},null,8,["value"])):e.createCommentVNode("",!0),e.createElementVNode("div",ho,[e.createTextVNode(e.toDisplayString(o.value.oneOff)+" ",1),((ie=t.config.details)==null?void 0:ie.pricing_type)==="FLAT"?(e.openBlock(),e.createElementBlock("span",yo,e.toDisplayString(o.value.perUnit),1)):e.createCommentVNode("",!0),t.config.billing_in_advance?(e.openBlock(),e.createElementBlock("span",bo," ("+e.toDisplayString(o.value.billedInAdvance)+") ",1)):e.createCommentVNode("",!0)])]}),_:1}),t.showDefaultValues&&N.value!==null?(e.openBlock(),e.createBlock(E._sfc_main,{key:0,tag:"div",variant:"body-sm",color:"subtle",class:"text-right"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value.withDefault)+" ",1),e.createElementVNode("span",_o,e.toDisplayString(N.value),1),e.createTextVNode(" "+e.toDisplayString(N.value===1?v.value.singular:v.value.plural),1)]),_:1})):e.createCommentVNode("",!0)]),e.renderSlot(h.$slots,"included")])):e.createCommentVNode("",!0),l.value.model_type==="PER_SEAT"?(e.openBlock(),e.createElementBlock("div",ko,[e.createElementVNode("div",null,[e.createVNode(E._sfc_main,{tag:"div",variant:"body-sm",class:"flex items-center"},{default:e.withCtx(()=>{var q,W,Y,K,J,X;return[(q=t.config.details)!=null&&q.bands&&((W=t.config.details)!=null&&W.bands[0].amount)?(e.openBlock(),e.createBlock(z._sfc_main,{key:0,value:(Y=t.config.details)==null?void 0:Y.bands[0].amount,highlighted:""},null,8,["value"])):e.createCommentVNode("",!0),e.createElementVNode("span",Co,e.toDisplayString(o.value.perSeat),1),(J=(K=t.config.details)==null?void 0:K.pricing_period)!=null&&J.type?(e.openBlock(),e.createElementBlock("div",xo,e.toDisplayString(o.value.formatBillingPeriod((X=t.config.details)==null?void 0:X.pricing_period)),1)):e.createCommentVNode("",!0),t.config.billing_in_advance?(e.openBlock(),e.createElementBlock("span",Bo," ("+e.toDisplayString(o.value.billedInAdvance)+") ",1)):e.createCommentVNode("",!0)]}),_:1}),(it=(nt=t.config.details)==null?void 0:nt.billing_period)!=null&&it.type?(e.openBlock(),e.createBlock(E._sfc_main,{key:0,tag:"div",variant:"body-sm",class:"text-right"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value.billedEvery)+" ",1),e.createElementVNode("span",No,e.toDisplayString(o.value.formatBillingPeriod(t.config.details.billing_period,{prefix:!1})),1)]),_:1})):e.createCommentVNode("",!0)]),e.renderSlot(h.$slots,"included")])):e.createCommentVNode("",!0)],64))],64)):e.createCommentVNode("",!0)],64))]}),default:e.withCtx(()=>[s.value?(e.openBlock(),e.createBlock(Et,{key:0,i18n:o.value.topUpDescription,class:"mt-1","pricing-item-config":t.config},null,8,["i18n","pricing-item-config"])):e.createCommentVNode("",!0)]),_:3},8,["class","is-collapsible","is-expanded"]))}}),Eo={key:0,class:"flex items-center gap-2"},So={key:1,class:"ml-4 flex shrink-0 flex-wrap items-center justify-end gap-1"},wo=e.defineComponent({__name:"FlexiblePricingRule",props:{config:{},showConfigHeader:{type:Boolean,default:!0},isCollapsible:{type:Boolean},isExpanded:{type:Boolean}},emits:["expand-toggled"],setup(t){const n=t,{formatMessage:i}=E.useIntl(),o=e.computed(()=>{var l,v;return(v=(l=n.config.details)==null?void 0:l.bands)==null?void 0:v[0]}),s=i({defaultMessage:"Flexible pricing",id:"wYqODC",description:"Read-only label for a flexible (choose-your-amount) pricing rule"}),r=i({defaultMessage:"minimum amount",id:"Bbc4Nn",description:"Suffix after the minimum amount of a flexible pricing rule"}),f=i({defaultMessage:"maximum amount",id:"V6mQFd",description:"Suffix after the maximum amount of a flexible pricing rule"});return(l,v)=>(e.openBlock(),e.createBlock(_e,{"is-collapsible":t.isCollapsible,"is-expanded":t.isExpanded,"header-class":"flex items-start justify-between",onToggle:v[0]||(v[0]=c=>l.$emit("expand-toggled"))},{header:e.withCtx(()=>{var c,d,b,m,p;return[t.showConfigHeader?(e.openBlock(),e.createElementBlock("div",Eo,[e.createVNode(E._sfc_main,{"no-spacing":"",color:"secondary",variant:"body",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)),1)]),_:1}),e.renderSlot(l.$slots,"override-tooltip")])):e.createCommentVNode("",!0),(c=o.value)!=null&&c.minimum_amount||(d=o.value)!=null&&d.maximum_amount?(e.openBlock(),e.createElementBlock("div",So,[(b=o.value)!=null&&b.minimum_amount?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(z._sfc_main,{value:o.value.minimum_amount,highlighted:""},null,8,["value"]),e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString(e.unref(r)),1),(m=o.value)!=null&&m.maximum_amount?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(",")],64)):e.createCommentVNode("",!0)])],64)):e.createCommentVNode("",!0),(p=o.value)!=null&&p.maximum_amount?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(z._sfc_main,{value:o.value.maximum_amount,highlighted:""},null,8,["value"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(f)),1)],64)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]}),_:3},8,["is-collapsible","is-expanded"]))}}),Po={key:0,"data-testid":"tiering-conditions",class:"flex flex-col gap-1"},$o={class:"text-xs"},Io=e.defineComponent({__name:"TieringConditions",props:{expression:{},i18n:{}},setup(t){return(n,i)=>t.expression?(e.openBlock(),e.createElementBlock("div",Po,[e.createVNode(E._sfc_main,{variant:"body-xs",weight:"semibold",color:"secondary","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.i18n.tieringConditions),1)]),_:1}),e.createElementVNode("div",$o,[e.createVNode(ce._sfc_main,{"expression-comparators":t.expression,"root-class":"bg-teal-400/25"},null,8,["expression-comparators"])])])):e.createCommentVNode("",!0)}}),To={key:0,class:"flex gap-2"},Do={key:1,class:"flex justify-center gap-2"},Oo={class:"tiered-table-print-wrapper mt-3 overflow-clip rounded border"},zo={class:"tiered-table-print w-full table-auto"},Lo=["colspan"],Mo={class:"border-t"},Ro={class:"px-2 py-1 text-left"},Ao={class:"px-2 py-1 text-left"},Fo={key:0,class:"px-2 py-1 text-right"},Zo={key:1,class:"px-2 py-1 text-right"},Uo={key:2,class:"px-2 py-1 text-right"},Ho={class:"px-2 py-1 text-left"},Go={class:"px-2 py-1 text-left"},jo={key:4,class:"pr-2 text-right"},qo={class:"px-2 py-1"},Wo={class:"px-2 py-1"},Yo={key:0,class:"px-2 py-1 text-right"},Ko={class:"font-semibold text-primary-600"},Jo={key:1,class:"px-2 py-1 text-right"},Xo={class:"font-semibold text-primary-600"},Qo={key:2,class:"px-2 py-1 text-right"},el={class:"px-2 py-1"},tl={class:"px-2 py-1"},nl={key:4,class:"px-2 py-1 text-right"},il={key:2,class:"mt-2 flex items-center"},ol={key:0},ll={class:"font-semibold text-primary-600"},al=e.defineComponent({__name:"TieredSteppedPricingRule",props:{config:{},itemIndex:{},configIndex:{},item:{},i18n:{},isCombinedPricing:{type:Boolean},showConfigHeader:{type:Boolean,default:!0},creditTypesById:{},isCollapsible:{type:Boolean},isExpanded:{type:Boolean}},emits:["expand-toggled"],setup(t){const n=t,i=e.computed(()=>n.i18n??Pt),o=e.computed(()=>({tieringConditions:i.value.tieringConditions})),s=e.computed(()=>{var h,a,y,u,V,x,B;return((u=(y=(a=(h=n.config.details)==null?void 0:h.bands)==null?void 0:a.find(k=>{var S;return(S=k.credits)==null?void 0:S.credit_type_id}))==null?void 0:y.credits)==null?void 0:u.credit_type_id)??((B=(x=(V=n.item.product_items)==null?void 0:V[0])==null?void 0:x.credits)==null?void 0:B.credit_type_id)}),r=e.computed(()=>{var h,a,y,u,V;if(s.value){const x=(h=n.creditTypesById)==null?void 0:h[s.value];if(x)return((a=x.unit_name)==null?void 0:a.singular)||"unit"}return((V=(u=(y=n.item.product_items)==null?void 0:y[0])==null?void 0:u.unit_name)==null?void 0:V.singular)||"unit"}),f=e.computed(()=>{var h,a;const y=(h=n.config.details)==null?void 0:h.pricing_type;if(y&&["TIERED","TOP_TIERED"].includes(y)&&((a=n.config.details)!=null&&a.bands)){for(const u of n.config.details.bands)if(u.minimum_amount||u.maximum_amount)return!0}return!1}),l=e.computed(()=>{var h;return T.isTieredPricing(n.config)?"TIERED":T.isStairStepPricing(n.config)?"STAIR_STEP":(h=n.config.details)==null?void 0:h.pricing_type}),v=e.computed(()=>T.isTopUpPricing(n.config)),c=e.computed(()=>{var h,a;return(a=(h=n.config.details)==null?void 0:h.bands)==null?void 0:a.some(y=>y.block_size)}),d=e.computed(()=>{var h;return(h=n.config.details.bands)==null?void 0:h.some(a=>a.fixed_amount)}),b=e.computed(()=>{var h;return(h=n.config.details.bands)==null?void 0:h.some(a=>a.amount)}),m=e.computed(()=>{var h;return(h=n.config.details.bands)==null?void 0:h.some(a=>a.percentage)}),p=e.computed(()=>{var h,a,y,u;return(u=(y=(a=(h=n.config.split_pricing)==null?void 0:h.meter_properties)==null?void 0:a.map(V=>{var x;return(x=V.meter_property)==null?void 0:x.name}))==null?void 0:y.filter(V=>!!V))==null?void 0:u.join(", ")}),g=e.computed(()=>n.showConfigHeader||n.config.split_pricing),C=e.computed(()=>!!n.config.use_fallback_currency&&!!n.config.fallback_currency),_=e.computed(()=>`Based on fallback currency – ${n.config.fallback_currency}`),N=e.computed(()=>2+(d.value?1:0)+(b.value?1:0)+(m.value?1:0)+(f.value?2:0)+(c.value?1:0));return(h,a)=>(e.openBlock(),e.createBlock(_e,{"is-collapsible":t.isCollapsible,"is-expanded":t.isExpanded,"header-class":"tiered-rule-header flex items-start justify-between","unmount-on-close":"",onToggle:a[0]||(a[0]=y=>h.$emit("expand-toggled"))},{header:e.withCtx(()=>[g.value?(e.openBlock(),e.createElementBlock("div",To,[e.createVNode(Ce,{config:t.config,i18n:i.value},{"override-tooltip":e.withCtx(()=>[e.renderSlot(h.$slots,"override-tooltip",{},void 0,!0)]),_:3},8,["config","i18n"]),C.value?(e.openBlock(),e.createBlock(I._sfc_main,{key:0,variant:"outline",placement:"top"},{tooltip:e.withCtx(()=>[e.createVNode(I.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(I._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.value),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(L._sfc_main$1,{icon:"change_circle",class:"text-gray-500"})]),_:1})):e.createCommentVNode("",!0),t.config.split_pricing?(e.openBlock(),e.createElementBlock("div",Do,[e.createVNode(E._sfc_main,{variant:"label",tag:"span"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.splitBy),1)]),_:1}),e.createVNode(E._sfc_main,{tag:"span",variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value),1)]),_:1})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>{var y,u,V,x;return[v.value?(e.openBlock(),e.createBlock(e.unref(Et),{key:0,class:"mb-3 mt-1",i18n:i.value.topUpDescription,"pricing-item-config":t.config},null,8,["i18n","pricing-item-config"])):e.createCommentVNode("",!0),e.createElementVNode("div",Oo,[e.createElementVNode("table",zo,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",{colspan:N.value,class:"bg-gray-50 px-2 text-left"},[e.createVNode(E._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(Q.formatEnum)(l.value)),1)]),_:1})],8,Lo)]),e.createElementVNode("tr",Mo,[e.createElementVNode("th",Ro,[e.createVNode(E._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.from),1)]),_:1})]),e.createElementVNode("th",Ao,[e.createVNode(E._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.upTo),1)]),_:1})]),d.value?(e.openBlock(),e.createElementBlock("th",Fo,[e.createVNode(E._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.fixedAmount),1)]),_:1})])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("th",Zo,[l.value==="STAIR_STEP"?(e.openBlock(),e.createBlock(E._sfc_main,{key:0,variant:"caps-heading"},{default:e.withCtx(()=>{var B,k,S;return[e.createTextVNode(e.toDisplayString(i.value.pricePerStep((S=(k=(B=t.item.product_items)==null?void 0:B[0])==null?void 0:k.unit_name)==null?void 0:S.plural)),1)]}),_:1})):c.value?(e.openBlock(),e.createBlock(E._sfc_main,{key:1,variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.price),1)]),_:1})):t.config.details.bands&&t.config.details.bands[0].amount||t.config.details.bands&&t.config.details.bands[0].fixed_amount?(e.openBlock(),e.createBlock(E._sfc_main,{key:2,variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.pricePerUnit(r.value)),1)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("th",Uo,[e.createVNode(E._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.percentage),1)]),_:1})])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("th",Ho,[e.createVNode(E._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.feeFloor),1)]),_:1})]),e.createElementVNode("th",Go,[e.createVNode(E._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.feeCap),1)]),_:1})])],64)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("th",jo,[e.createVNode(E._sfc_main,{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.per),1)]),_:1})])):e.createCommentVNode("",!0)])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.config.details.bands,(B,k)=>{var S,w,P,D,$,O;return e.openBlock(),e.createElementBlock("tr",{key:k,class:"border-t"},[e.createElementVNode("td",qo,[(S=t.config.details)!=null&&S.bands?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(ln)(i.value)((w=t.config.details)==null?void 0:w.bands[k-1])),1)],64)):e.createCommentVNode("",!0)]),e.createElementVNode("td",Wo,[(P=t.config.details)!=null&&P.bands?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(an)(i.value)(B,(D=t.config.details)==null?void 0:D.bands,k)),1)],64)):e.createCommentVNode("",!0)]),d.value?(e.openBlock(),e.createElementBlock("td",Yo,[B.fixed_amount?(e.openBlock(),e.createBlock(z._sfc_main,{key:0,value:B.fixed_amount,highlighted:""},null,8,["value"])):e.createCommentVNode("",!0),B.fixed_amount&&(($=t.config.details)!=null&&$.pricing_period)?(e.openBlock(),e.createBlock(E._sfc_main,{key:1,tag:"span",class:"pl-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.every)+" ",1),e.createElementVNode("span",Ko,e.toDisplayString(i.value.formatBillingPeriod(t.config.details.pricing_period,{prefix:!1})),1)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("td",Jo,[B.amount?(e.openBlock(),e.createBlock(z._sfc_main,{key:0,value:B.amount,highlighted:""},null,8,["value"])):e.createCommentVNode("",!0),B.amount&&((O=t.config.details)!=null&&O.pricing_period)?(e.openBlock(),e.createBlock(E._sfc_main,{key:1,tag:"span",class:"pl-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.every)+" ",1),e.createElementVNode("span",Xo,e.toDisplayString(i.value.formatBillingPeriod(t.config.details.pricing_period,{prefix:!1})),1)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("td",Qo,[B.percentage?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(B.percentage)+"% ",1)],64)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("td",el,[B.minimum_amount?(e.openBlock(),e.createBlock(z._sfc_main,{key:0,value:B.minimum_amount},null,8,["value"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" ")],64))]),e.createElementVNode("td",tl,[B.maximum_amount?(e.openBlock(),e.createBlock(z._sfc_main,{key:0,value:B.maximum_amount},null,8,["value"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" ")],64))])],64)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("td",nl,[e.unref(H.isBandAmount)(B.block_size)?(e.openBlock(),e.createBlock(z._sfc_main,{key:0,value:B.block_size.amount},null,8,["value"])):e.unref(H.isBandNumber)(B.block_size)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(i.value.formatNumber(+B.block_size.number)),1)],64)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])}),128))])])]),t.config.tiering_conditions?(e.openBlock(),e.createBlock(Io,{key:1,class:"mt-2",i18n:o.value,expression:t.config.tiering_conditions.expression},null,8,["i18n","expression"])):e.createCommentVNode("",!0),h.$slots.included||(u=(y=t.config.details)==null?void 0:y.billing_period)!=null&&u.type?(e.openBlock(),e.createElementBlock("div",il,[h.$slots.included?(e.openBlock(),e.createElementBlock("div",ol,[e.renderSlot(h.$slots,"included",{},void 0,!0)])):e.createCommentVNode("",!0),(x=(V=t.config.details)==null?void 0:V.billing_period)!=null&&x.type?(e.openBlock(),e.createBlock(E._sfc_main,{key:1,tag:"div",variant:"body-sm",color:"secondary",class:"ml-auto"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.billedEvery)+" ",1),e.createElementVNode("span",ll,e.toDisplayString(i.value.formatBillingPeriod(t.config.details.billing_period,{prefix:!1})),1)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]}),_:3},8,["is-collapsible","is-expanded"]))}}),rl=G._export_sfc(al,[["__scopeId","data-v-04f973b1"]]),cl={key:0,class:"conditions-root"},sl=["innerHTML"],dl=["innerHTML"],ul=["innerHTML"],ml=["innerHTML"],pl=["innerHTML"],gl=["innerHTML"],fl={key:3,class:"mt-3"},vl={key:0,class:"context-menu-wrapper absolute -top-2 right-2"},hl=e.defineComponent({__name:"PricingItemConfig",props:{areNonBillableItemsVisible:{type:Boolean},rootConfig:{},config:{},configIndex:{},item:{},itemIndex:{},pricing:{},i18n:{},rootClass:{},showConfigHeader:{type:Boolean,default:!0},showDefaultValues:{type:Boolean,default:!0},schedule:{},creditTypesById:{},canCollapseNestedConditions:{type:Boolean,default:!1},mountInViewOnly:{type:Boolean}},setup(t){const n=t,i=Yt(),o=e.computed(()=>n.mountInViewOnly??i),s=e.ref(null),{shouldRender:r,placeholderStyle:f}=Gt(s,{estimatedHeight:T.estimatePricingItemConfigBodyHeight(n.config),disabled:e.computed(()=>!o.value)}),l=qt({defaultCollapsed:n.canCollapseNestedConditions}),v=e.computed(()=>l.isExpanded(n.config.id)),c=e.computed(()=>{var k;return(k=n.config.conditions)==null?void 0:k.configs}),d=e.computed(()=>!!n.canCollapseNestedConditions&&!A.isEmpty(c.value)),b=()=>{v.value?l.collapse(n.config.id):l.expand(T.getConfigIds(n.config))},m=()=>{if(!d.value){l.expand(n.config.id);return}b()},p=e.computed(()=>n.i18n??It),g=e.useSlots(),C=k=>{var S,w,P;return T.isFlatPricing(k)||((S=k.details)==null?void 0:S.pricing_type)==="FIXED"||((w=k.details)==null?void 0:w.pricing_type)==="PASS_THROUGH"||((P=k.details)==null?void 0:P.pricing_type)==="NONE"&&n.areNonBillableItemsVisible},_=k=>T.hasOneOfPricingTypes(k,["TIERED","TIERED_TOP_UP","TOP_TIERED"])||T.isStairStepPricing(k),N=k=>T.isFlexiblePricing(k),h=k=>{var S,w,P,D,$;return(($=(D=(P=(w=(S=k.product_items)==null?void 0:S[0])==null?void 0:w.usage_based)==null?void 0:P.meter_value_calculation)==null?void 0:D.meter_value)==null?void 0:$.type)==="AMOUNT"},a=k=>{var S,w,P,D,$;return(($=(D=(P=(w=(S=k.product_items)==null?void 0:S[0])==null?void 0:w.usage_based)==null?void 0:P.meter_value_calculation)==null?void 0:D.meter_value)==null?void 0:$.type)==="NUMBER"},y=(k,S)=>{var w,P,D;return((P=(w=k.product_items)==null?void 0:w[0])==null?void 0:P.model_type)==="PER_SEAT"&&((D=S.details)==null?void 0:D.pricing_type)!=="NONE"},u=e.computed(()=>n.rootConfig??n.config),V=e.computed(()=>({pricing:n.pricing,item:n.item,config:n.config})),x=e.computed(()=>!!g["pricing-item-config-settings"]&&!fe.isVnodeEmpty(g["pricing-item-config-settings"](V.value))),B=e.computed(()=>{var k,S,w;const P=n.config.original_pricing_item_config_id;return n.schedule?((k=Ct({schedule:n.schedule,pricingItemConfigIds:[n.config.id,...P?[P]:[]]}))==null?void 0:k.number)??((S=n.config.default_seats_value)==null?void 0:S.number):(w=n.config.default_seats_value)==null?void 0:w.number});return(k,S)=>{var w,P,D,$,O;const U=e.resolveComponent("PricingItemConfig",!0);return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative",{[`${t.rootClass}`]:t.rootClass,"mb-4 last:mb-0":C(t.config)&&(((w=t.config.conditions)==null?void 0:w.meter_properties)||t.configIndex===0&&t.item.configs&&t.item.configs.length>0),"mb-6 last:mb-0":_(t.config)}])},[e.createElementVNode("div",{ref_key:"bodyEl",ref:s,style:e.normalizeStyle(e.unref(f))},[e.unref(r)?(e.openBlock(),e.createElementBlock("div",cl,[e.createElementVNode("div",{class:e.normalizeClass({"conditions-with-context-menu":x.value})},[(P=t.config.details)!=null&&P.bands||(D=t.config.details)!=null&&D.pricing_type?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[C(t.config)?(e.openBlock(),e.createBlock(e.unref(Vo),{key:0,"is-combined-pricing":t.pricing.products&&t.pricing.products.length>1,"are-non-billable-items-visible":t.areNonBillableItemsVisible,config:t.config,item:t.item,class:e.normalizeClass({"mt-3":!t.rootClass}),i18n:p.value,"show-config-header":t.showConfigHeader,"show-default-values":t.showDefaultValues,"credit-types-by-id":t.creditTypesById,"is-collapsible":d.value,"is-expanded":v.value,onExpandToggled:b},{"override-tooltip":e.withCtx(()=>[e.renderSlot(k.$slots,"override-tooltip",e.normalizeProps(e.guardReactiveProps(n)),void 0,!0)]),included:e.withCtx(()=>{var R,F,M,j;return[h(t.item)&&((R=t.config.default_included_volume)!=null&&R.amount)?(e.openBlock(),e.createElementBlock("span",{key:0,class:"mt-1 text-right text-subtle",innerHTML:t.config.default_included_volume.reset_type==="BILLING_PERIOD"?p.value.includedVolumeAmountPerBillingPeriod(t.config.default_included_volume.amount):p.value.includedVolumeAmountPerSchedule(t.config.default_included_volume.amount)},null,8,sl)):e.createCommentVNode("",!0),a(t.item)&&((F=t.config.default_included_volume)!=null&&F.number)?(e.openBlock(),e.createElementBlock("span",{key:1,class:"mt-1 text-right text-subtle",innerHTML:t.config.default_included_volume.reset_type==="BILLING_PERIOD"?p.value.includedVolumeUnitsPerBillingPeriod(t.config.default_included_volume.number,(M=t.item.product_items)==null?void 0:M[0].unit_name):p.value.includedVolumeUnitsPerSchedule(t.config.default_included_volume.number,(j=t.item.product_items)==null?void 0:j[0].unit_name)},null,8,dl)):e.createCommentVNode("",!0),t.showDefaultValues&&y(t.item,t.config)&&B.value?(e.openBlock(),e.createElementBlock("span",{key:2,class:"mt-1 text-right text-subtle",innerHTML:p.value.includedSeats(B.value)},null,8,ul)):e.createCommentVNode("",!0)]}),_:3},8,["is-combined-pricing","are-non-billable-items-visible","config","item","class","i18n","show-config-header","show-default-values","credit-types-by-id","is-collapsible","is-expanded"])):_(t.config)?(e.openBlock(),e.createBlock(e.unref(rl),{key:1,"is-combined-pricing":t.pricing.products&&t.pricing.products.length>1,config:t.config,"item-index":t.itemIndex,"config-index":t.configIndex,item:t.item,"credit-types-by-id":t.creditTypesById,class:"mt-3",i18n:p.value,"show-config-header":t.showConfigHeader,"is-collapsible":d.value,"is-expanded":v.value,onExpandToggled:b},{"override-tooltip":e.withCtx(()=>[e.renderSlot(k.$slots,"override-tooltip",e.normalizeProps(e.guardReactiveProps(n)),void 0,!0)]),included:e.withCtx(()=>{var R,F,M,j;return[h(t.item)&&((R=t.config.default_included_volume)!=null&&R.amount)?(e.openBlock(),e.createElementBlock("span",{key:0,class:"mt-1 text-right text-subtle",innerHTML:t.config.default_included_volume.reset_type==="BILLING_PERIOD"?p.value.includedVolumeAmountPerBillingPeriod(t.config.default_included_volume.amount):p.value.includedVolumeAmountPerSchedule(t.config.default_included_volume.amount)},null,8,ml)):e.createCommentVNode("",!0),a(t.item)&&((F=t.config.default_included_volume)!=null&&F.number)?(e.openBlock(),e.createElementBlock("span",{key:1,class:"mt-1 text-right text-subtle",innerHTML:t.config.default_included_volume.reset_type==="BILLING_PERIOD"?p.value.includedVolumeUnitsPerBillingPeriod(t.config.default_included_volume.number,(M=t.item.product_items)==null?void 0:M[0].unit_name):p.value.includedVolumeUnitsPerSchedule(t.config.default_included_volume.number,(j=t.item.product_items)==null?void 0:j[0].unit_name)},null,8,pl)):e.createCommentVNode("",!0),t.showDefaultValues&&y(t.item,t.config)&&B.value?(e.openBlock(),e.createElementBlock("span",{key:2,class:"mt-1 text-right text-subtle",innerHTML:p.value.includedSeats(B.value)},null,8,gl)):e.createCommentVNode("",!0)]}),_:3},8,["is-combined-pricing","config","item-index","config-index","item","credit-types-by-id","i18n","show-config-header","is-collapsible","is-expanded"])):N(t.config)?(e.openBlock(),e.createBlock(e.unref(wo),{key:2,config:t.config,class:"mt-3","show-config-header":t.showConfigHeader,"is-collapsible":d.value,"is-expanded":v.value,onExpandToggled:b},{"override-tooltip":e.withCtx(()=>[e.renderSlot(k.$slots,"override-tooltip",e.normalizeProps(e.guardReactiveProps(n)),void 0,!0)]),_:3},8,["config","show-config-header","is-collapsible","is-expanded"])):e.createCommentVNode("",!0),k.$slots["pricing-item-config-additions"]&&!e.unref(fe.isVnodeEmpty)((O=($=k.$slots)["pricing-item-config-additions"])==null?void 0:O.call($,V.value))?(e.openBlock(),e.createElementBlock("div",fl,[e.renderSlot(k.$slots,"pricing-item-config-additions",e.normalizeProps(e.guardReactiveProps(V.value)),void 0,!0)])):e.createCommentVNode("",!0)],64)):t.showConfigHeader?(e.openBlock(),e.createBlock(Bt,{key:1,"is-collapsible":d.value,"is-expanded":v.value,class:"mb-1 mt-2 print:hidden",onClick:m},{default:e.withCtx(()=>[e.createVNode(Ce,{"is-combined-pricing":t.pricing.products&&t.pricing.products.length>1,config:t.config,i18n:p.value},{"override-tooltip":e.withCtx(()=>[e.renderSlot(k.$slots,"override-tooltip",e.normalizeProps(e.guardReactiveProps(n)),void 0,!0)]),_:3},8,["is-combined-pricing","config","i18n"])]),_:3},8,["is-collapsible","is-expanded"])):e.createCommentVNode("",!0)],2),x.value?(e.openBlock(),e.createElementBlock("div",vl,[e.renderSlot(k.$slots,"pricing-item-config-settings",e.mergeProps(V.value,{rootConfig:u.value}),void 0,!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],4),c.value&&!e.unref(A.isEmpty)(c.value)?(e.openBlock(),e.createBlock(ne._sfc_main,{key:0,"is-open":v.value,lazy:"","unmount-on-close":"",class:"nesting-line relative mb-4 w-full pl-4 before:bottom-3 before:left-1.5"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList([...c.value].sort((R,F)=>F.order-R.order),(R,F)=>(e.openBlock(),e.createElementBlock("div",{key:R.id,class:"print:mb-4 print:last:mb-0"},[e.createVNode(U,{pricing:t.pricing,item:t.item,"item-index":t.itemIndex,config:R,"config-index":F,"are-non-billable-items-visible":t.areNonBillableItemsVisible,i18n:p.value,"root-class":t.rootClass,"root-config":u.value,"credit-types-by-id":t.creditTypesById,"can-collapse-nested-conditions":t.canCollapseNestedConditions,"mount-in-view-only":o.value},{"pricing-item-config-settings":e.withCtx(M=>[e.renderSlot(k.$slots,"pricing-item-config-settings",e.mergeProps({ref_for:!0},M),void 0,!0)]),"override-tooltip":e.withCtx(M=>[e.renderSlot(k.$slots,"pricing-item-config-override-tooltip",e.mergeProps({ref_for:!0},M),void 0,!0)]),"pricing-item-config-additions":e.withCtx(M=>[e.renderSlot(k.$slots,"pricing-item-config-additions",e.mergeProps({ref_for:!0},M),void 0,!0)]),_:3},8,["pricing","item","item-index","config","config-index","are-non-billable-items-visible","i18n","root-class","root-config","credit-types-by-id","can-collapse-nested-conditions","mount-in-view-only"])]))),128))]),_:3},8,["is-open"])):e.createCommentVNode("",!0)],2)}}}),ft=G._export_sfc(hl,[["__scopeId","data-v-eb141324"]]),yl=["onClick"],bl={class:"text-subtle"},_l={class:"px-4 pb-3"},kl=e.defineComponent({__name:"PricingDetail",props:{itemClass:{},rootClass:{},titleWithIcon:{type:Boolean},pricing:{},groupedPricingItemIds:{},areNonBillableItemsVisible:{type:Boolean},i18n:{},schedule:{},creditTypesById:{},canCollapseNestedConditions:{type:Boolean}},setup(t){const n=E.useIntl(),i=t,o=e.ref({}),s=g=>g?`${g.type}:${g.value}`:"none",r=g=>{o.value={...o.value,[g]:!o.value[g]}},f=g=>!o.value[g],l=(g,C)=>{if(!C)return null;const _=new Map;return g.forEach(N=>{var h,a,y;const u=((h=N.details)==null?void 0:h.billing_period)??((a=N.details)==null?void 0:a.pricing_period);if(!u)return;const V=s(u);_.has(V)||_.set(V,{billingPeriod:u,configs:[]}),(y=_.get(V))==null||y.configs.push(N)}),Array.from(_.entries()).map(([N,h])=>({key:N,...h}))},v=g=>[...g].sort((C,_)=>_.order-C.order),c=g=>{var C,_;return(C=g.configs)!=null&&C.length?g.configs:((_=g.billing_period_configs)==null?void 0:_.flatMap(N=>(N.configs??[]).map(h=>({...h}))))??[]},d=g=>{var C;return b(g)?(C=g.billing_period_configs)!=null&&C.length?g.billing_period_configs.map(_=>({key:s(_.billing_period),billingPeriod:_.billing_period,configs:_.configs??[]})):l(c(g),!0):l(c(g),!1)},b=g=>{var C,_;return(((C=g.billing_period_configs)==null?void 0:C.length)??0)>0||(((_=i.groupedPricingItemIds)==null?void 0:_.includes(g.id))??!1)},m=e.computed(()=>{var g;return((g=i.pricing.items)==null?void 0:g.map(C=>({id:C.id,groups:d(C)})))??[]}),p=g=>{const C=c(g),_=C.some(h=>{var a;return((a=h.details)==null?void 0:a.pricing_type)!=="NONE"}),N=C.some(h=>{var a;return((a=h.details)==null?void 0:a.pricing_type)==="NONE"});return _||N&&!!i.areNonBillableItemsVisible};return(g,C)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pricing.items,(_,N)=>{var h;return e.openBlock(),e.createElementBlock(e.Fragment,{key:N},[p(_)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["pricing-item-block pb-5 last:pb-3",{[`${t.itemClass}`]:t.itemClass}])},[e.createVNode(bt._sfc_main,{icon:t.titleWithIcon?"inventory_2":void 0,variant:"neutral",size:"sm",class:"pricing-item-heading"},{default:e.withCtx(()=>[e.renderSlot(g.$slots,"pricing-item-header",{item:_},()=>[e.createVNode(Ui,{item:_,"credit-types-by-id":t.creditTypesById},null,8,["item","credit-types-by-id"])],!0)]),_:2},1032,["icon"]),(h=m.value[N])!=null&&h.groups?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(m.value[N].groups,a=>{var y,u,V;return e.openBlock(),e.createElementBlock("div",{key:a.key,class:"mt-3 rounded border border-gray-100"},[e.createElementVNode("button",{type:"button",class:"flex w-full items-center justify-between px-4 py-2 text-left text-sm font-semibold text-secondary",onClick:x=>r(a.key)},[e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString((y=t.i18n)!=null&&y.formatBillingPeriod?e.unref(n).$t({defaultMessage:"Billing period",id:"pricing_detail.billing_period",description:"The billing period in the pricing detail card"}):"Billing period")+" ",1),e.createElementVNode("span",bl,e.toDisplayString((V=(u=t.i18n)==null?void 0:u.formatBillingPeriod)==null?void 0:V.call(u,a.billingPeriod)),1)]),e.createVNode(L._sfc_main$1,{icon:f(a.key)?"unfold_less":"unfold_more",size:"sm",class:"print:hidden"},null,8,["icon"])],8,yl),e.createVNode(ne._sfc_main,{"is-open":f(a.key),lazy:""},{default:e.withCtx(()=>[e.createElementVNode("div",_l,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v(a.configs),(x,B)=>(e.openBlock(),e.createBlock(ft,{key:x.id,pricing:t.pricing,item:_,"item-index":N,config:x,"config-index":B,"are-non-billable-items-visible":t.areNonBillableItemsVisible,i18n:t.i18n,"root-class":t.rootClass,schedule:t.schedule,"credit-types-by-id":t.creditTypesById,"can-collapse-nested-conditions":t.canCollapseNestedConditions},{"pricing-item-config-settings":e.withCtx(k=>[e.renderSlot(g.$slots,"pricing-item-config-settings",e.mergeProps({ref_for:!0},k),void 0,!0)]),"override-tooltip":e.withCtx(k=>[e.renderSlot(g.$slots,"pricing-item-config-override-tooltip",e.mergeProps({ref_for:!0},k),void 0,!0)]),"pricing-item-config-additions":e.withCtx(k=>[e.renderSlot(g.$slots,"pricing-item-config-additions",e.mergeProps({ref_for:!0},k),void 0,!0)]),_:3},8,["pricing","item","item-index","config","config-index","are-non-billable-items-visible","i18n","root-class","schedule","credit-types-by-id","can-collapse-nested-conditions"]))),128))])]),_:2},1032,["is-open"])])}),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(v(c(_)??[]),(a,y)=>(e.openBlock(),e.createBlock(ft,{key:a.id,pricing:t.pricing,item:_,"item-index":N,config:a,"config-index":y,"are-non-billable-items-visible":t.areNonBillableItemsVisible,i18n:t.i18n,"root-class":t.rootClass,schedule:t.schedule,"credit-types-by-id":t.creditTypesById,"can-collapse-nested-conditions":t.canCollapseNestedConditions},{"pricing-item-config-settings":e.withCtx(u=>[e.renderSlot(g.$slots,"pricing-item-config-settings",e.mergeProps({ref_for:!0},u),void 0,!0)]),"override-tooltip":e.withCtx(u=>[e.renderSlot(g.$slots,"pricing-item-config-override-tooltip",e.mergeProps({ref_for:!0},u),void 0,!0)]),"pricing-item-config-additions":e.withCtx(u=>[e.renderSlot(g.$slots,"pricing-item-config-additions",e.mergeProps({ref_for:!0},u),void 0,!0)]),_:3},8,["pricing","item","item-index","config","config-index","are-non-billable-items-visible","i18n","root-class","schedule","credit-types-by-id","can-collapse-nested-conditions"]))),128))],2)):e.createCommentVNode("",!0)],64)}),128))]))}}),vt=G._export_sfc(kl,[["__scopeId","data-v-f8f96c95"]]);var ee=(t=>(t.ENUM="ENUM",t.SWITCH="SWITCH",t.NUMBER="NUMBER",t.AMOUNT="AMOUNT",t.STRING="STRING",t))(ee||{});const Cl={...It},Tt={...Cl,revenueItems:"Revenue items",billedItems:"Billed Items",deductionItems:"Deduction items",features:"Features"},xl={class:"text-xs font-semibold uppercase text-subtle"},Bl={class:"print:hidden"},Nl={class:"hidden print:inline"},Vl={class:"text-xs font-semibold uppercase text-subtle"},El={key:2,class:"mt-2"},Sl={class:"text-xs font-semibold uppercase text-subtle"},wl={key:0,class:"absolute right-0 top-1/2 z-10 -translate-y-1/2 bg-white"},Pl={class:"pl-4"},$l={class:"mt-2"},Il={class:"font-bold print:font-normal"},Tl={key:1,class:"font-bold text-primary-600"},Dl={key:2,class:"font-bold text-primary-600"},Ol={key:4,class:"font-bold text-primary-600"},zl=e.defineComponent({__name:"PricingInfo",props:{pricing:{},groupedPricingItemIds:{},areNonBillableItemsVisible:{type:Boolean},i18n:{},schedule:{},creditTypesById:{},canCollapseNestedConditions:{type:Boolean}},setup(t){const n=t;e.provide("pricingId",n.pricing.id);const i=e.computed(()=>n.i18n??Tt),o=e.computed(()=>{var r;return(r=n.pricing.items)==null?void 0:r.filter(f=>tn(f.product_items))}),s=e.computed(()=>{var r;return(r=n.pricing.items)==null?void 0:r.filter(f=>nn(f.product_items))});return(r,f)=>(e.openBlock(),e.createElementBlock("div",null,[e.renderSlot(r.$slots,"pricing-item-warning",{},void 0,!0),e.unref(A.isEmpty)(o.value)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.unref(A.isEmpty)(t.pricing.items)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue._sfc_main,{key:0,class:"section-label my-3"},{default:e.withCtx(()=>[e.createElementVNode("h3",xl,[e.createElementVNode("span",Bl,e.toDisplayString(i.value.revenueItems),1),e.createElementVNode("span",Nl,e.toDisplayString(i.value.billedItems),1)])]),_:1})),e.createVNode(vt,{pricing:{...t.pricing,items:o.value},"grouped-pricing-item-ids":t.groupedPricingItemIds,i18n:i.value,"are-non-billable-items-visible":t.areNonBillableItemsVisible,schedule:t.schedule,"credit-types-by-id":t.creditTypesById,"can-collapse-nested-conditions":t.canCollapseNestedConditions},{"pricing-item-header":e.withCtx(({item:l})=>[e.renderSlot(r.$slots,"pricing-item-header",{item:l},void 0,!0)]),"pricing-item-config-settings":e.withCtx(l=>[e.renderSlot(r.$slots,"pricing-item-config-settings",e.normalizeProps(e.guardReactiveProps(l)),void 0,!0)]),"pricing-item-config-override-tooltip":e.withCtx(l=>[e.renderSlot(r.$slots,"pricing-item-config-override-tooltip",e.normalizeProps(e.guardReactiveProps(l)),void 0,!0)]),"pricing-item-config-additions":e.withCtx(l=>[e.renderSlot(r.$slots,"pricing-item-config-additions",e.normalizeProps(e.guardReactiveProps(l)),void 0,!0)]),_:3},8,["pricing","grouped-pricing-item-ids","i18n","are-non-billable-items-visible","schedule","credit-types-by-id","can-collapse-nested-conditions"])],64)),e.unref(A.isEmpty)(s.value)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.pricing.items&&t.pricing.items.length>0?(e.openBlock(),e.createBlock(ue._sfc_main,{key:0,class:"section-label mb-3 mt-6"},{default:e.withCtx(()=>[e.createElementVNode("h3",Vl,e.toDisplayString(i.value.deductionItems),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(vt,{pricing:{...t.pricing,items:s.value},"grouped-pricing-item-ids":t.groupedPricingItemIds,i18n:i.value,"are-non-billable-items-visible":t.areNonBillableItemsVisible,"credit-types-by-id":t.creditTypesById,"can-collapse-nested-conditions":t.canCollapseNestedConditions},{"pricing-item-header":e.withCtx(({item:l})=>[e.renderSlot(r.$slots,"pricing-item-header",{item:l},void 0,!0)]),"pricing-item-config-settings":e.withCtx(l=>[e.renderSlot(r.$slots,"pricing-item-config-settings",e.normalizeProps(e.guardReactiveProps(l)),void 0,!0)]),"pricing-item-config-override-tooltip":e.withCtx(l=>[e.renderSlot(r.$slots,"pricing-item-config-override-tooltip",e.normalizeProps(e.guardReactiveProps(l)),void 0,!0)]),"pricing-item-config-additions":e.withCtx(l=>[e.renderSlot(r.$slots,"pricing-item-config-additions",e.normalizeProps(e.guardReactiveProps(l)),void 0,!0)]),_:3},8,["pricing","grouped-pricing-item-ids","i18n","are-non-billable-items-visible","credit-types-by-id","can-collapse-nested-conditions"])],64)),e.unref(A.isEmpty)(t.pricing.entitlements)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",El,[e.createVNode(ue._sfc_main,{class:"section-label relative"},{default:e.withCtx(()=>[e.createElementVNode("h3",Sl,e.toDisplayString(i.value.features),1),r.$slots["pricing-entitlements-settings"]?(e.openBlock(),e.createElementBlock("div",wl,[e.createElementVNode("div",Pl,[e.renderSlot(r.$slots,"pricing-entitlements-settings",{pricing:t.pricing},void 0,!0)])])):e.createCommentVNode("",!0)]),_:3}),e.createElementVNode("ul",$l,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pricing.entitlements,l=>(e.openBlock(),e.createElementBlock("li",{key:l.feature_id,class:"flex items-center justify-between py-2"},[e.createElementVNode("span",Il,e.toDisplayString(l.feature.name),1),l.feature.type===e.unref(ee).AMOUNT&&l.amount?(e.openBlock(),e.createBlock(z._sfc_main,{key:0,value:l.amount,highlighted:""},null,8,["value"])):e.createCommentVNode("",!0),l.feature.type===e.unref(ee).NUMBER&&l.number?(e.openBlock(),e.createElementBlock("span",Tl,e.toDisplayString(l.number),1)):e.createCommentVNode("",!0),l.feature.type===e.unref(ee).STRING&&l.string?(e.openBlock(),e.createElementBlock("span",Dl,e.toDisplayString(l.string),1)):e.createCommentVNode("",!0),l.feature.type===e.unref(ee).SWITCH&&"switch"in l?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["inline-block rounded-full leading-[0.5] text-white",l.switch?"bg-primary-600":"bg-red-500"])},[e.createVNode(L._sfc_main$1,{icon:l.switch?"check":"close",size:"xs"},null,8,["icon"])],2)):e.createCommentVNode("",!0),l.feature.type===e.unref(ee).ENUM&&l.enum?(e.openBlock(),e.createElementBlock("span",Ol,e.toDisplayString(l.enum),1)):e.createCommentVNode("",!0)]))),128))])]))]))}}),Ll=G._export_sfc(zl,[["__scopeId","data-v-8ad8d93e"]]),Ml=t=>"cancellationDate"in t,le=t=>"schedule"in t,Dt={...Tt,volumePooling:"Volume pooling",addon:"Addon",someItemsDeprecatedWarning:"Some of the product items are deprecated. They cannot be used for pricing and needs to be deleted",allItemsDeprecatedWarning:"All product items are deprecated, this pricing needs to be deleted",expandAllConditions:"Expand all",collapseAllConditions:"Collapse all"},Ot={addon:"Addon",singleSelect:"Single select",multiSelect:"Multi select"},zt={...Ot,...Dt,productsCount:t=>t===0?"no products":t===1?"1 product":`${t} products`},Rl={...ae,...te,...re,...zt,...Vt,commitmentsTitle:te.title,discountsTitle:ae.title,markupsTitle:re.title,commitmentsOrderOfApplicationExplanation:te.orderOfApplicationExplanation,discountsOrderOfApplicationExplanation:ae.orderOfApplicationExplanation,markupsOrderOfApplicationExplanation:re.orderOfApplicationExplanation,scheduleNumber:t=>`Schedule ${t}`,versionNumber:t=>`Version ${t}`,subscriptionCancelled:t=>`Subscription cancelled from ${t}`,directPricingTitle:"Pricing defined on this schedule"},Al={class:"ml-2 inline-block"},Fl={class:"flex items-center gap-2"},Zl={key:0,class:"mb-2"},he=e.defineComponent({__name:"PricingCard",props:{pricing:{},groupedPricingItemIds:{},pricingPlanId:{},pricingPlanVersionId:{},isCustomizedPlan:{type:Boolean},subscriptionId:{},showNonBillable:{type:Boolean},defaultExpanded:{type:Boolean},i18n:{},showAddonChip:{type:Boolean,default:!0},isEnabled:{type:Boolean,default:!0},schedule:{},creditTypesById:{},canCollapseNestedConditions:{type:Boolean}},emits:["pricing-toggled","pricing-toggle"],setup(t,{emit:n}){const i=t,o=n,s=e.computed(()=>i.i18n??Dt);e.provide("pricingId",i.pricing.id);const r=kt({defaultCollapsed:i.canCollapseNestedConditions}),f=a=>[...a.configs??[],...(a.billing_period_configs??[]).flatMap(y=>y.configs??[]),...(a.pricing_currency_configs??[]).flatMap(y=>[...y.configs??[],...(y.billing_period_configs??[]).flatMap(u=>u.configs??[])])],l=e.computed(()=>(i.pricing.items??[]).flatMap(f).flatMap(a=>T.getFlatConfigs(a)).filter(a=>{var y;return!A.isEmpty((y=a.conditions)==null?void 0:y.configs)}).map(a=>a.id)),v=e.computed(()=>l.value.length>0),c=e.computed(()=>l.value.every(a=>r.isExpanded(a))),d=e.ref(!!i.defaultExpanded);e.watch(()=>i.defaultExpanded,a=>{d.value=!!a});const b=a=>{d.value!==a&&(d.value=a,o("pricing-toggle",i.pricing.id))},m=e.computed(()=>!!i.canCollapseNestedConditions&&v.value),p=e.computed(()=>d.value&&c.value),g=e.computed(()=>p.value?s.value.collapseAllConditions??"Collapse all":s.value.expandAllConditions??"Expand all"),C=()=>{if(p.value){r.collapseAll(),b(!1);return}b(!0),r.expandAll()},_=a=>a.status==="DEPRECATED",N=e.computed(()=>(i.pricing.items||[]).flatMap(a=>a.product_items||[]).some(_)),h=e.computed(()=>(i.pricing.items||[]).flatMap(a=>a.product_items||[]).every(_));return(a,y)=>(e.openBlock(),e.createBlock(wi,{class:"flex flex-col justify-between","capped-width":"","is-controlled":"","is-open":d.value,"data-testid":`pricing-${t.pricing.id}`,spacing:"sm",onToggle:y[0]||(y[0]=u=>b(!d.value)),onToggled:y[1]||(y[1]=u=>a.$emit("pricing-toggled",u))},{"pre-header":e.withCtx(()=>[e.renderSlot(a.$slots,"pre-header")]),"title-prefix":e.withCtx(()=>[e.renderSlot(a.$slots,"title-prefix")]),title:e.withCtx(()=>[e.createVNode(E._sfc_main,{weight:"semibold",tag:"span",variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(Kt)(t.pricing,!(t.pricing.products&&t.pricing.products.length>1))),1)]),_:1})]),"title-suffix":e.withCtx(()=>[t.pricing.products&&t.pricing.products.length>1?(e.openBlock(),e.createBlock(Z._sfc_main,{key:0,intent:"info",class:"ml-2 align-middle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.volumePooling),1)]),_:1})):e.createCommentVNode("",!0),t.showAddonChip&&t.pricing.product_type&&t.pricing.product_type==="ADDON"?(e.openBlock(),e.createBlock(Z._sfc_main,{key:1,intent:"info",class:"ml-2 align-middle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.addon),1)]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("span",Al,[e.renderSlot(a.$slots,"id")])]),right:e.withCtx(()=>[e.createElementVNode("div",Fl,[e.renderSlot(a.$slots,"right"),m.value?(e.openBlock(),e.createBlock(e.unref(L._sfc_main),{key:0,intent:"secondary",size:"xs","aria-expanded":p.value,onClick:C},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.value),1)]),_:1},8,["aria-expanded"])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createVNode(be,{spacing:"none"},{default:e.withCtx(()=>[a.$slots["pricing-note"]?(e.openBlock(),e.createElementBlock("div",Zl,[e.renderSlot(a.$slots,"pricing-note")])):e.createCommentVNode("",!0),e.createVNode(Ll,{pricing:t.pricing,"grouped-pricing-item-ids":t.groupedPricingItemIds,i18n:s.value,"are-non-billable-items-visible":t.showNonBillable,schedule:t.schedule,"credit-types-by-id":t.creditTypesById,"can-collapse-nested-conditions":t.canCollapseNestedConditions},{"pricing-item-header":e.withCtx(({item:u})=>[e.renderSlot(a.$slots,"pricing-item-header",{item:u})]),"pricing-item-warning":e.withCtx(()=>[h.value?(e.openBlock(),e.createBlock(ge._sfc_main,{key:0,type:"warning"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.allItemsDeprecatedWarning),1)]),_:1})):N.value?(e.openBlock(),e.createBlock(ge._sfc_main,{key:1,type:"warning"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.someItemsDeprecatedWarning),1)]),_:1})):e.createCommentVNode("",!0)]),"pricing-item-config-settings":e.withCtx(u=>[e.renderSlot(a.$slots,"pricing-item-config-settings",e.normalizeProps(e.guardReactiveProps(u)))]),"pricing-entitlements-settings":e.withCtx(u=>[e.renderSlot(a.$slots,"pricing-entitlements-settings",e.normalizeProps(e.guardReactiveProps(u)))]),"pricing-item-config-override-tooltip":e.withCtx(u=>[e.renderSlot(a.$slots,"pricing-item-config-override-tooltip",e.normalizeProps(e.guardReactiveProps(u)))]),"pricing-item-config-additions":e.withCtx(u=>[e.renderSlot(a.$slots,"pricing-item-config-additions",e.normalizeProps(e.guardReactiveProps(u)))]),_:3},8,["pricing","grouped-pricing-item-ids","i18n","are-non-billable-items-visible","schedule","credit-types-by-id","can-collapse-nested-conditions"])]),_:3})]),_:3},8,["is-open","data-testid"]))}}),Ul={class:"inline-block"},Lt=e.defineComponent({__name:"PricingGroupCard",props:{pricingGroup:{},i18n:{default:()=>Ot},isEnabled:{type:Boolean}},setup(t){return(n,i)=>(e.openBlock(),e.createBlock(se,{spacing:t.isEnabled?"sm":"none","border-style":t.isEnabled?"solid":"dashed"},{default:e.withCtx(()=>[e.createVNode(St,{spacing:"none",title:t.pricingGroup.name},{"title-suffix":e.withCtx(()=>[t.pricingGroup.product_type&&t.pricingGroup.product_type==="ADDON"?(e.openBlock(),e.createBlock(Z._sfc_main,{key:0,intent:"info",class:"ml-2 align-middle print:hidden"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.i18n.addon),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(Z._sfc_main,{intent:"neutral",class:"mx-2 align-middle print:hidden"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(on)(t.pricingGroup)?t.i18n.singleSelect:t.i18n.multiSelect),1)]),_:1}),e.createElementVNode("span",Ul,[e.renderSlot(n.$slots,"id")])]),right:e.withCtx(()=>[e.renderSlot(n.$slots,"settings")]),_:3},8,["title"]),e.createVNode(be,{spacing:"none",class:"mt-2"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"pricings")]),_:3})]),_:3},8,["spacing","border-style"]))}}),Hl=e.defineComponent({__name:"PricingGroupSingleSelectCard",props:{pricingGroup:{},pricingPlanVersion:{},schedule:{},showNonBillable:{type:Boolean},isEnabled:{type:Boolean}},emits:["update-enabled-pricing"],setup(t,{emit:n}){const i=t,o=n,s=e.computed(()=>{var m,p,g;return(g=(p=(m=i.schedule)==null?void 0:m.enabled_pricings)==null?void 0:p.find(C=>i.pricingGroup.pricings.some(_=>_.id===C.pricing_id)))==null?void 0:g.pricing_id}),r=m=>{o("update-enabled-pricing",s.value,m??"")},f=e.computed(()=>i.pricingGroup.pricings.map(m=>({value:m.id}))),{renderPricingForPricingItem:l}=at.usePricingItem(),v=e.computed(()=>i.pricingGroup.pricings.find(m=>m.id===s.value)),c=e.computed(()=>v.value??i.pricingGroup.pricings[0]),d=e.computed(()=>{var m,p,g,C;return(p=(m=v.value)==null?void 0:m.items)!=null&&p[0]?l({pricingItem:(C=(g=v.value)==null?void 0:g.items)==null?void 0:C[0]}):""}),b=e.computed(()=>Object.fromEntries((i.pricingPlanVersion.credit_types??[]).map(m=>[m.id,m])));return e.onMounted(()=>{s.value||r(c.value.id)}),(m,p)=>(e.openBlock(),e.createBlock(e.unref(Lt),{"pricing-group":t.pricingGroup,"is-enabled":t.isEnabled},{id:e.withCtx(()=>[e.renderSlot(m.$slots,"id",{id:t.pricingGroup.id})]),settings:e.withCtx(()=>[e.renderSlot(m.$slots,"pricing-group-settings",{pricingGroup:t.pricingGroup})]),pricings:e.withCtx(()=>[c.value?(e.openBlock(),e.createBlock(e.unref(he),{key:0,"default-expanded":!0,pricing:c.value,"pricing-plan-version-id":t.pricingPlanVersion.id,"pricing-plan-id":t.pricingPlanVersion.pricing_plan_id,"show-non-billable":t.showNonBillable,"is-customized-plan":!!t.pricingPlanVersion.copied_from_pricing_plan_version_id,class:"flex flex-col","show-addon-chip":!1,"is-enabled":t.isEnabled,schedule:t.schedule,"credit-types-by-id":b.value},{"pre-header":e.withCtx(()=>[e.createVNode(at._sfc_main,{"model-value":s.value,options:f.value,name:"pricing-group-single-select",variant:"stepped-ghost",size:"lg",class:"border-b","onUpdate:modelValue":r},null,8,["model-value","options"])]),"pricing-note":e.withCtx(()=>[e.renderSlot(m.$slots,"pricing-note",e.normalizeProps(e.guardReactiveProps({pricing:v.value})))]),"title-prefix":e.withCtx(()=>[e.renderSlot(m.$slots,"pricing-group-pricing-title-prefix",{pricingGroup:t.pricingGroup,pricing:v.value})]),id:e.withCtx(()=>[e.renderSlot(m.$slots,"pricing-title-suffix",{id:c.value.id})]),right:e.withCtx(()=>[d.value?(e.openBlock(),e.createBlock(E._sfc_main,{key:0,variant:"body-xs",color:"secondary",class:"mr-4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.value),1)]),_:1})):e.createCommentVNode("",!0),e.renderSlot(m.$slots,"pricing-group-pricing-settings",{pricing:v.value,pricingGroup:t.pricingGroup})]),"pricing-item-header":e.withCtx(({item:g})=>[e.renderSlot(m.$slots,"pricing-item-header",{item:g})]),"pricing-entitlements-settings":e.withCtx(g=>[e.renderSlot(m.$slots,"pricing-entitlements-settings",e.normalizeProps(e.guardReactiveProps(g)))]),"pricing-item-config-settings":e.withCtx(g=>[e.renderSlot(m.$slots,"pricing-item-config-settings",e.mergeProps(g,{pricingGroup:t.pricingGroup}))]),"pricing-item-config-override-tooltip":e.withCtx(g=>[e.renderSlot(m.$slots,"pricing-item-config-override-tooltip",e.normalizeProps(e.guardReactiveProps(g)))]),"pricing-item-config-additions":e.withCtx(g=>[e.renderSlot(m.$slots,"pricing-item-config-additions",e.normalizeProps(e.guardReactiveProps(g)))]),_:3},8,["pricing","pricing-plan-version-id","pricing-plan-id","show-non-billable","is-customized-plan","is-enabled","schedule","credit-types-by-id"])):e.createCommentVNode("",!0)]),_:3},8,["pricing-group","is-enabled"]))}}),Gl={key:0,class:"category-heading mb-2 flex items-center gap-2 text-sm print:hidden"},jl={class:"font-bold"},ql={class:"flex flex-col gap-2"},Wl={class:"flex flex-col gap-1"},Yl=7,Kl=e.defineComponent({__name:"PricingPlanVersionContent",props:{pricingPlanVersion:{},groupedPricingItemIdsByPricing:{},defaultExpanded:{type:Boolean},showNonBillable:{type:Boolean},expandedPricings:{},enabledPricings:{},i18n:{},schedule:{},enablePricingGroupSelection:{type:Boolean,default:!1},canCollapseNestedConditions:{type:Boolean,default:!1}},emits:["pricing-toggle","pricing-toggled","delete-pricing","update-enabled-pricing"],setup(t){const n=t,i=e.computed(()=>n.i18n??zt),o=e.computed(()=>n.enabledPricings??[]),s=e.computed(()=>{var l;return Object.fromEntries((((l=n.pricingPlanVersion)==null?void 0:l.credit_types)??[]).map(v=>[v.id,v]))}),r=l=>l.product_type==="DEFAULT"||l.pricings.some(v=>o.value.includes(v.id)),f=l=>l.product_type==="DEFAULT"||o.value.includes(l.id);return(l,v)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(l.$slots,"header",{},void 0,!0),t.pricingPlanVersion&&(!t.pricingPlanVersion.pricing_categories||t.pricingPlanVersion.pricing_categories.length===0)?e.renderSlot(l.$slots,"empty-state",{},void 0,!0,0):t.pricingPlanVersion?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.pricingPlanVersion.pricing_categories??[],(c,d)=>{var b,m;return e.openBlock(),e.createElementBlock("div",{key:c.product_category_id,class:e.normalizeClass({"mt-6":d>0})},[(b=c.product_category)!=null&&b.name?(e.openBlock(),e.createElementBlock("h2",Gl,[e.createElementVNode("span",jl,e.toDisplayString((m=c.product_category)==null?void 0:m.name),1),e.createElementVNode("div",null,[e.createVNode(Z._sfc_main,{size:"sm",intent:"neutral",class:"rounded-2xl font-semibold uppercase"},{default:e.withCtx(()=>{var p,g;return[e.createTextVNode(e.toDisplayString(i.value.productsCount((((p=c.pricing_groups)==null?void 0:p.length)??0)+(((g=c.pricings)==null?void 0:g.length)??0))),1)]}),_:2},1024)])])):e.createCommentVNode("",!0),e.createElementVNode("div",ql,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.pricing_groups,p=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:p.id},[t.enablePricingGroupSelection&&p.selection_constraint==="EXACTLY_ONE"&&p.pricings.length>=Yl?(e.openBlock(),e.createBlock(Hl,{key:0,"pricing-group":p,"pricing-plan-version":t.pricingPlanVersion,"is-enabled":r(p),i18n:i.value,schedule:t.schedule,"show-non-billable":t.showNonBillable,onUpdateEnabledPricing:v[0]||(v[0]=(g,C)=>l.$emit("update-enabled-pricing",g,C))},{id:e.withCtx(()=>[e.renderSlot(l.$slots,"id",{id:p.id},void 0,!0)]),"pricing-group-settings":e.withCtx(()=>[e.renderSlot(l.$slots,"pricing-group-settings",{pricingGroup:p},void 0,!0)]),_:2},1032,["pricing-group","pricing-plan-version","is-enabled","i18n","schedule","show-non-billable"])):(e.openBlock(),e.createBlock(e.unref(Lt),{key:1,"pricing-group":p,"is-enabled":r(p),i18n:i.value},{id:e.withCtx(()=>[e.renderSlot(l.$slots,"id",{id:p.id},void 0,!0)]),settings:e.withCtx(()=>[e.renderSlot(l.$slots,"pricing-group-settings",{pricingGroup:p},void 0,!0)]),pricings:e.withCtx(()=>[e.createElementVNode("div",Wl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.pricings,g=>{var C,_;return e.openBlock(),e.createBlock(e.unref(he),{key:g.id,"default-expanded":t.defaultExpanded===!0||((C=t.expandedPricings)==null?void 0:C.includes(g.id)),pricing:g,"pricing-plan-version-id":t.pricingPlanVersion.id,"pricing-plan-id":t.pricingPlanVersion.pricing_plan_id,"show-non-billable":t.showNonBillable,"is-customized-plan":!!t.pricingPlanVersion.copied_from_pricing_plan_version_id,"grouped-pricing-item-ids":(_=t.groupedPricingItemIdsByPricing)==null?void 0:_[g.id],class:"flex flex-col",i18n:i.value,"show-addon-chip":!1,"is-enabled":f(g),"credit-types-by-id":s.value,"can-collapse-nested-conditions":t.canCollapseNestedConditions,onPricingToggled:N=>l.$emit("pricing-toggled",g.id,N),onPricingToggle:v[1]||(v[1]=N=>l.$emit("pricing-toggle",N))},{"pricing-note":e.withCtx(()=>[e.renderSlot(l.$slots,"pricing-note",e.mergeProps({ref_for:!0},{pricing:g}),void 0,!0)]),"title-prefix":e.withCtx(()=>[e.renderSlot(l.$slots,"pricing-group-pricing-title-prefix",{pricingGroup:p,pricing:g},void 0,!0)]),id:e.withCtx(()=>[e.renderSlot(l.$slots,"pricing-title-suffix",{id:g.id},void 0,!0)]),right:e.withCtx(()=>[e.renderSlot(l.$slots,"pricing-group-pricing-settings",{pricing:g,pricingGroup:p},void 0,!0)]),"pricing-item-header":e.withCtx(({item:N})=>[e.renderSlot(l.$slots,"pricing-item-header",{item:N},void 0,!0)]),"pricing-entitlements-settings":e.withCtx(N=>[e.renderSlot(l.$slots,"pricing-entitlements-settings",e.mergeProps({ref_for:!0},N),void 0,!0)]),"pricing-item-config-settings":e.withCtx(N=>[e.renderSlot(l.$slots,"pricing-item-config-settings",e.mergeProps({ref_for:!0},N,{pricingGroup:p}),void 0,!0)]),"pricing-item-config-override-tooltip":e.withCtx(N=>[e.renderSlot(l.$slots,"pricing-item-config-override-tooltip",e.mergeProps({ref_for:!0},N),void 0,!0)]),"pricing-item-config-additions":e.withCtx(N=>[e.renderSlot(l.$slots,"pricing-item-config-additions",e.mergeProps({ref_for:!0},N),void 0,!0)]),_:2},1032,["default-expanded","pricing","pricing-plan-version-id","pricing-plan-id","show-non-billable","is-customized-plan","grouped-pricing-item-ids","i18n","is-enabled","credit-types-by-id","can-collapse-nested-conditions","onPricingToggled"])}),128))])]),_:2},1032,["pricing-group","is-enabled","i18n"]))],64))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.pricings,p=>{var g,C;return e.openBlock(),e.createBlock(e.unref(he),{key:p.id,"default-expanded":t.defaultExpanded===!0||((g=t.expandedPricings)==null?void 0:g.includes(p.id)),pricing:p,"pricing-plan-version-id":t.pricingPlanVersion.id,"pricing-plan-id":t.pricingPlanVersion.pricing_plan_id,"grouped-pricing-item-ids":(C=t.groupedPricingItemIdsByPricing)==null?void 0:C[p.id],"show-non-billable":t.showNonBillable,"is-customized-plan":!!t.pricingPlanVersion.copied_from_pricing_plan_version_id,class:"flex flex-col",i18n:i.value,"is-enabled":f(p),"credit-types-by-id":s.value,schedule:t.schedule,"can-collapse-nested-conditions":t.canCollapseNestedConditions,onPricingToggled:_=>l.$emit("pricing-toggled",p.id,_),onPricingToggle:v[2]||(v[2]=_=>l.$emit("pricing-toggle",_))},{id:e.withCtx(()=>[e.renderSlot(l.$slots,"pricing-title-suffix",{id:p.id},void 0,!0)]),right:e.withCtx(()=>[e.renderSlot(l.$slots,"pricing-settings",{pricing:p},void 0,!0)]),"pricing-note":e.withCtx(()=>[e.renderSlot(l.$slots,"pricing-note",e.mergeProps({ref_for:!0},{pricing:p}),void 0,!0)]),"pricing-item-header":e.withCtx(({item:_})=>[e.renderSlot(l.$slots,"pricing-item-header",{item:_},void 0,!0)]),"pricing-entitlements-settings":e.withCtx(_=>[e.renderSlot(l.$slots,"pricing-entitlements-settings",e.mergeProps({ref_for:!0},_),void 0,!0)]),"pricing-item-config-settings":e.withCtx(_=>[e.renderSlot(l.$slots,"pricing-item-config-settings",e.mergeProps({ref_for:!0},_,{pricingGroup:void 0}),void 0,!0)]),"pricing-item-config-override-tooltip":e.withCtx(_=>[e.renderSlot(l.$slots,"pricing-item-config-override-tooltip",e.mergeProps({ref_for:!0},_),void 0,!0)]),"pricing-item-config-additions":e.withCtx(_=>[e.renderSlot(l.$slots,"pricing-item-config-additions",e.mergeProps({ref_for:!0},_),void 0,!0)]),_:2},1032,["default-expanded","pricing","pricing-plan-version-id","pricing-plan-id","grouped-pricing-item-ids","show-non-billable","is-customized-plan","i18n","is-enabled","credit-types-by-id","schedule","can-collapse-nested-conditions","onPricingToggled"])}),128))])],2)}),128)):e.createCommentVNode("",!0)],64))}}),ht=G._export_sfc(Kl,[["__scopeId","data-v-a9312230"]]),Jl={class:"flex items-center gap-2"},Xl={key:0,class:"mb-8 flex items-center gap-2 print:hidden"},Ql={class:"text-base font-semibold"},ea={key:1,class:"transition-opacity-300"},ta={key:2,class:"transition-opacity-300"},na=e.defineComponent({__name:"PricingPlanSchedules",props:{schedules:{},isEditable:{type:Boolean},openScheduleId:{},i18n:{},displayDisabledAddonPricings:{type:Boolean,default:!1},isExpandedByDefault:{type:Boolean},timezone:{},cancellationDate:{},cancellationReason:{},enablePricingGroupSelection:{type:Boolean,default:!1},forPrint:{type:Boolean,default:!1}},emits:["add-schedule","toggle-schedule"],setup(t,{emit:n}){var i;const o=t,s=n,r=e.computed(()=>o.i18n??Rl),{formatDate:f}=E.useIntl(),{getIsOpen:l,toggle:v}=ce.useToggleList({closeOthers:!0,initialToggledItems:[(i=o.schedules[0])==null?void 0:i.schedule.id]}),c=e.ref(null);Ht(c,".collapsible-card-print-wrapper",{companionSelector:".category-heading",expandSelectors:[".collapsible-list-item-content",".collapsible-card-print-content"],protectedTopSelectors:[".card-header-print-root",".section-label",".pricing-item-block"],enabled:o.forPrint});const d=e.computed(()=>o.schedules.map((a,y)=>({...a,inferredPricingPlanVersion:a.selectedPricingPlanVersion&&dt(a.selectedPricingPlanVersion,a.schedule,{displayDisabledAddonPricings:o.displayDisabledAddonPricings}),scheduleNumber:y+1,cancelled:!1}))),b=e.computed(()=>{let a=[...d.value.map((y,u)=>({...y,inferredPricingPlanVersion:y.selectedPricingPlanVersion&&dt(y.selectedPricingPlanVersion,y.schedule,{displayDisabledAddonPricings:o.displayDisabledAddonPricings}),scheduleNumber:u+1}))];if(o.cancellationDate){let y=0;const u={cancellationDate:o.cancellationDate,cancellationReason:o.cancellationReason},V=a.findLastIndex(x=>le(x)&&(x.schedule.start_at??"")<(o.cancellationDate??""));if(V===-1)a=[u,...a];else{const x=a[V];y=le(x)&&(x.schedule.end_at??"")>=(o.cancellationDate??"")?V:V+1,y===o.schedules.length+1?a=[...a,u]:a.splice(y,0,u)}return a.map((x,B)=>le(x)?{...x,cancelled:B>y}:x)}return a}),m=a=>{if(a.inferredPricingPlanVersion)return un(a.inferredPricingPlanVersion,a.schedule.pricing_currency,a.schedule.billing_period)},p=a=>a.inferredPricingPlanVersion?mn(a.inferredPricingPlanVersion,a.schedule.pricing_currency):{},g=a=>kn(a.schedule),C=a=>{if(o.isExpandedByDefault)return;const y=m(a)??a.inferredPricingPlanVersion;return gn([],y)},_=e.computed(()=>o.openScheduleId===void 0),N=a=>_.value?l(a.id):o.openScheduleId===a.id,h=a=>{_.value?v(a.id):s("toggle-schedule",a.id)};return(a,y)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:c},[e.createVNode(Cn,e.mergeProps(a.$attrs,{"has-add-button":t.isEditable,onAdd:y[0]||(y[0]=u=>a.$emit("add-schedule"))}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(u,V)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:V},[e.unref(Ml)(u)?(e.openBlock(),e.createBlock(gt,{key:0,"hide-collapse-icon":""},{icon:e.withCtx(()=>[e.createVNode(L._sfc_main$1,{icon:"cancel",class:"text-red-600"})]),left:e.withCtx(()=>[e.createVNode(E._sfc_main,{variant:"body-sm",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.subscriptionCancelled(t.timezone?e.unref(f)({date:u.cancellationDate,format:"date",offsetType:"offsetted",timezone:t.timezone}):e.unref(f)({date:u.cancellationDate,format:"dateTime",offsetType:"local"}))),1)]),_:2},1024),u.cancellationReason?(e.openBlock(),e.createBlock(E._sfc_main,{key:0,variant:"body-xs",color:"secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.cancellationReason),1)]),_:2},1024)):e.createCommentVNode("",!0)]),_:2},1024)):e.createCommentVNode("",!0),e.unref(le)(u)?(e.openBlock(),e.createBlock(gt,{key:1,"item-number":u.scheduleNumber,"is-open":N(u.schedule),"has-continued-preline":t.isEditable?!0:u.scheduleNumber-1!==d.value.length-1,class:e.normalizeClass({"opacity-60":u.cancelled}),lazy:!t.forPrint,onToggle:x=>h(u.schedule)},{left:e.withCtx(()=>[e.createElementVNode("div",Jl,[e.createVNode(E._sfc_main,{tag:"h3",weight:"semibold",class:"print:text-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.scheduleNumber(u.scheduleNumber)),1)]),_:2},1024),u.schedule.type==="TRIAL"&&u.schedule.start_at&&u.schedule.end_at?(e.openBlock(),e.createBlock(rt._sfc_main,{key:0,"trial-period":e.unref(rt.convertDateRangeToTimePeriod)(new Date(u.schedule.start_at),new Date(u.schedule.end_at))},null,8,["trial-period"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"id",{id:u.schedule.id},void 0,!0)])]),right:e.withCtx(()=>[e.renderSlot(a.$slots,"schedule-right",{item:u,itemIndex:u.scheduleNumber-1},()=>[t.timezone?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(E._sfc_main,{variant:"body-xs",class:"print:hidden"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.schedule.start_at?e.unref(f)({date:u.schedule.start_at,format:"dateTime",offsetType:"offsetted",timezone:t.timezone}):r.value.startOfSchedule)+" - "+e.toDisplayString(u.schedule.end_at?e.unref(f)({date:u.schedule.end_at,format:"dateTime",offsetType:"offsetted",timezone:t.timezone}):r.value.endOfSchedule),1)]),_:2},1024),e.createVNode(E._sfc_main,{variant:"body-xs",class:"hidden print:block"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.schedule.start_at?e.unref(f)({date:u.schedule.start_at,format:"date",offsetType:"offsetted",timezone:t.timezone}):r.value.startOfSchedule)+" - "+e.toDisplayString(u.schedule.end_at?e.unref(f)({date:u.schedule.end_at,format:"date",offsetType:"offsetted",timezone:t.timezone}):r.value.endOfSchedule),1)]),_:2},1024)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(E._sfc_main,{variant:"body-xs",class:"print:hidden"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.schedule.start_at?e.unref(f)({date:u.schedule.start_at,format:"dateTime",offsetType:"local"}):r.value.startOfSchedule)+" - "+e.toDisplayString(u.schedule.end_at?e.unref(f)({date:u.schedule.end_at,format:"dateTime",offsetType:"local"}):r.value.endOfSchedule),1)]),_:2},1024),e.createVNode(E._sfc_main,{variant:"body-xs",class:"hidden print:block"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.schedule.start_at?e.unref(f)({date:u.schedule.start_at,format:"date",offsetType:"local"}):r.value.startOfSchedule)+" - "+e.toDisplayString(u.schedule.end_at?e.unref(f)({date:u.schedule.end_at,format:"date",offsetType:"local"}):r.value.endOfSchedule),1)]),_:2},1024)],64))],!0)]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"schedule",{item:u,previousItem:d.value.find(x=>x.scheduleNumber===u.scheduleNumber-1),nextItem:d.value.find(x=>x.scheduleNumber===u.scheduleNumber+1),timezone:t.timezone},()=>[u.selectedPricingPlan?(e.openBlock(),e.createElementBlock("div",Xl,[e.createVNode(At._sfc_main,{initials:u.selectedPricingPlan.name[0],"color-hash":u.selectedPricingPlan.id,size:"lg",class:"print:hidden"},null,8,["initials","color-hash"]),e.createElementVNode("h2",Ql,e.toDisplayString(u.selectedPricingPlan.name),1),e.createVNode(Z._sfc_main,{intent:"neutral"},{default:e.withCtx(()=>{var x;return[e.createTextVNode(e.toDisplayString(r.value.versionNumber(((x=u.inferredPricingPlanVersion)==null?void 0:x.version)??1)),1)]}),_:2},1024)])):e.createCommentVNode("",!0),u.inferredPricingPlanVersion?(e.openBlock(),e.createElementBlock("div",ea,[e.createVNode(ht,{"pricing-plan-version":m(u)??u.inferredPricingPlanVersion,"grouped-pricing-item-ids-by-pricing":p(u),"enabled-pricings":e.unref(ct)(u.schedule),"default-expanded":t.isExpandedByDefault,"expanded-pricings":C(u),i18n:r.value,"enable-pricing-group-selection":t.enablePricingGroupSelection,"show-non-billable":""},{"pricing-item-config-additions":e.withCtx(({config:x})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList([e.unref(rn)(u.schedule,x)],(B,k)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[B?(e.openBlock(),e.createBlock(ki,{key:k,markup:B,i18n:r.value},null,8,["markup","i18n"])):e.createCommentVNode("",!0)],64))),256)),e.renderSlot(a.$slots,"pricing-item-config-additions",{config:x,item:u,pricingPlanVersion:u.inferredPricingPlanVersion},void 0,!0)]),_:2},1032,["pricing-plan-version","grouped-pricing-item-ids-by-pricing","enabled-pricings","default-expanded","expanded-pricings","i18n","enable-pricing-group-selection"])])):e.createCommentVNode("",!0),g(u)?(e.openBlock(),e.createElementBlock("div",ta,[e.createVNode(E._sfc_main,{variant:"label",tag:"h3",class:"mb-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.directPricingTitle),1)]),_:1}),e.createVNode(ht,{"pricing-plan-version":g(u),"enabled-pricings":e.unref(ct)(u.schedule),"default-expanded":t.isExpandedByDefault,i18n:r.value,"show-non-billable":""},null,8,["pricing-plan-version","enabled-pricings","default-expanded","i18n"])])):e.createCommentVNode("",!0),u.schedule.discount?(e.openBlock(),e.createBlock(ui,{key:3,discount:u.schedule.discount,"read-only":"","pricing-plan-version":u.inferredPricingPlanVersion,timezone:t.timezone,i18n:{...r.value,title:r.value.discountsTitle,orderOfApplicationExplanation:r.value.discountsOrderOfApplicationExplanation}},null,8,["discount","pricing-plan-version","timezone","i18n"])):e.createCommentVNode("",!0),u.schedule.markup?(e.openBlock(),e.createBlock(bi,{key:4,markup:u.schedule.markup,"pricing-plan-version":u.inferredPricingPlanVersion,timezone:t.timezone,i18n:{...r.value,title:r.value.markupsTitle,orderOfApplicationExplanation:r.value.markupsOrderOfApplicationExplanation}},null,8,["markup","pricing-plan-version","timezone","i18n"])):e.createCommentVNode("",!0),u.schedule&&u.schedule.commitment?(e.openBlock(),e.createBlock(ei,{key:5,class:"mt-2",commitment:u.schedule.commitment,"read-only":"","pricing-plan-version":u.inferredPricingPlanVersion,timezone:t.timezone,i18n:{...r.value,title:r.value.commitmentsTitle,orderOfApplicationExplanation:r.value.commitmentsOrderOfApplicationExplanation}},null,8,["commitment","pricing-plan-version","timezone","i18n"])):e.createCommentVNode("",!0)],!0)]),_:2},1032,["item-number","is-open","has-continued-preline","class","lazy","onToggle"])):e.createCommentVNode("",!0)],64))),128))]),_:3},16,["has-add-button"])],512))}}),ia=G._export_sfc(na,[["__scopeId","data-v-2c847a86"]]),oa=e.defineComponent({__name:"SubscriptionSchedules",props:{schedulesData:{type:Array},configuration:{type:Object},isLoading:{type:Boolean}},setup(t){const{$t:n}=E.useIntl();return(i,o)=>(e.openBlock(),e.createBlock(e.unref(Mt._sfc_main),{class:"sv-subscription-schedules sv-root sv-component","no-border":"","no-spacing":"","content-background":"none",title:e.unref(n)({defaultMessage:"Schedules",description:"Subscription schedules list title",id:"subscription_schedules.title"})},{default:e.withCtx(()=>[e.createVNode(e.unref(ia),{class:"sv-subscription-schedules__list",schedules:t.schedulesData},null,8,["schedules"])]),_:1},8,["title"]))}});exports._sfc_main=oa;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as x, computed as i, openBlock as n, createElementBlock as v, normalizeClass as S, createBlock as l, unref as s, createCommentVNode as o, createElementVNode as h, createVNode as w, withCtx as u, createTextVNode as r, toDisplayString as p, Fragment as B } from "vue";
|
|
2
|
-
import { _ as I } from "./Avatar.vue.es-
|
|
3
|
-
import { u as N, _ as m } from "./customElements-
|
|
4
|
-
import { g as j, a as C, f as V } from "./subscription-
|
|
2
|
+
import { _ as I } from "./Avatar.vue.es-DNJ-jexx.mjs";
|
|
3
|
+
import { u as N, _ as m } from "./customElements-CSE7dwUr.mjs";
|
|
4
|
+
import { g as j, a as C, f as V } from "./subscription-CrVOr5MF.mjs";
|
|
5
5
|
const O = { class: "grow" }, R = /* @__PURE__ */ x({
|
|
6
6
|
__name: "SubscriptionSummary",
|
|
7
7
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("vue"),g=require("./Avatar.vue.es-
|
|
1
|
+
const e=require("vue"),g=require("./Avatar.vue.es-D42J_izE.js"),c=require("./customElements-Vox1PB6G.js"),i=require("./subscription-ZA62t4E9.js"),f={class:"grow"},v=e.defineComponent({__name:"SubscriptionSummary",props:{subscription:{type:Object},invoice:{type:Object},loading:{type:Boolean},enabledPricingIds:{type:Array},avatar:{type:String},noSpacing:{type:Boolean},trialPeriod:{type:Object}},setup(o){const t=o,{$t:d}=c.useIntl(),m=e.computed(()=>i.getMostRecentPricingPlan(t.subscription)),p=e.computed(()=>i.getSubscriptionName({subscription:t.subscription,fallback:d({defaultMessage:"Subscription",description:"The fallback name for when no subscription name can be determined",id:"customer_overview.subscriptions_block.fallback_subscription_name"})})),s=e.computed(()=>{var n;return t.subscription.description||((n=m.value)==null?void 0:n.description)}),a=e.computed(()=>{if(!t.subscription||!t.enabledPricingIds)return;const n=i.findPricingsByIds(t.subscription,t.enabledPricingIds);return n==null?void 0:n.map(r=>{var l,u;return r.name??((u=(l=r.products)==null?void 0:l[0])==null?void 0:u.name)}).join(" - ")});return(n,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-row gap-3",o.noSpacing?void 0:"px-3 py-2"])},[o.avatar?(e.openBlock(),e.createBlock(e.unref(g._sfc_main),{key:0,"image-src":o.avatar,size:"lg",class:"my-1"},null,8,["image-src"])):e.createCommentVNode("",!0),e.createElementVNode("div",f,[e.createVNode(e.unref(c._sfc_main),{variant:"body",weight:"semibold","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value),1)]),_:1}),a.value?(e.openBlock(),e.createBlock(e.unref(c._sfc_main),{key:0,variant:"body-xs",color:"subtle","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value),1)]),_:1})):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createBlock(e.unref(c._sfc_main),{key:1,variant:"body-xs",color:"subtle","no-spacing":""},{default:e.withCtx(()=>[a.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" • ")],64)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(s.value),1)]),_:1})):e.createCommentVNode("",!0)])],2))}});exports._sfc_main=v;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const v=require("./useIncrementalLoading-CaWOE8Xl.js"),f=require("./subscriptions-
|
|
1
|
+
const v=require("./useIncrementalLoading-CaWOE8Xl.js"),f=require("./subscriptions-fJcj88X9.js"),e=require("vue"),b=require("./Button.vue.es-M_jXZda4.js"),p=require("./Section.vue.es-Btff-cLY.js"),r=require("./customElements-Vox1PB6G.js"),_=require("./PaymentMethod.vue.es-D18g-QB4.js"),m=require("./subscription-ZA62t4E9.js"),h=require("./Skeleton.vue_vue_type_script_setup_true_lang-DypW8aNJ.js"),y=require("./useActionDispatchProvider-CNAuaHdm.js");function w({customerId:t,batchSize:s=15}){const i=f.createSubscriptionsService(),o=async a=>i.getActiveSubscriptions({customerId:t,pagination:{page:a,pageSize:s}});return v.useIncrementalLoading({service:o})}const g={class:"sv-subscriptions-list__item-body flex flex-col gap-4 md:flex-row"},k={class:"sv-subscriptions-list__item-content grow"},x={class:"sv-subscriptions-list__item-meta mt-4 flex items-center gap-6"},B={key:1,class:"sv-subscriptions-list__item-next-invoice flex gap-1"},V={class:"sv-subscriptions-list__item-actions flex flex-col items-center gap-2 md:flex-row"},S=e.defineComponent({__name:"SubscriptionsListItem",props:{subscription:{type:Object},paymentMethod:{type:Object},customer:{type:Object},showViewSubscriptionDetailsButton:{type:Boolean,default:!0}},emits:["view-subscription-details"],setup(t){const s=t,{$t:i}=r.useIntl(),{formatDate:o}=r.useIntl(),a=e.computed(()=>m.getMostRecentPricingPlan(s.subscription)),l=e.computed(()=>m.getSubscriptionName({subscription:s.subscription,fallback:i({defaultMessage:"Subscription",description:"The fallback name for when no subscription name can be determined",id:"customer_overview.subscriptions_block.fallback_subscription_name"})})),n=e.computed(()=>{var c;return(c=a.value)==null?void 0:c.description}),u=e.computed(()=>s.showViewSubscriptionDetailsButton);return(c,d)=>(e.openBlock(),e.createBlock(e.unref(p._sfc_main),{class:"sv-subscriptions-list__item"},{default:e.withCtx(()=>[e.createElementVNode("div",g,[e.createElementVNode("div",k,[e.createVNode(e.unref(r._sfc_main),{tag:"h3",variant:"heading-2",class:"sv-subscriptions-list__item-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value),1)]),_:1}),n.value?(e.openBlock(),e.createBlock(e.unref(r._sfc_main),{key:0,variant:"body-sm",tag:"span",color:"subtle",class:"sv-subscriptions-list__item-description"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value),1)]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",x,[t.paymentMethod?(e.openBlock(),e.createBlock(e.unref(_._sfc_main),{key:0,variant:"condensed",class:"sv-payment-methods__item","payment-method":t.paymentMethod},null,8,["payment-method"])):e.createCommentVNode("",!0),t.subscription.next_invoice?(e.openBlock(),e.createElementBlock("div",B,[e.createVNode(e.unref(r._sfc_main),{tag:"span",variant:"body-xs",color:"secondary",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Next billing date",description:"The label for the next billing date",id:"customer.subscriptions_block.next_billing_date"})),1)]),_:1}),e.createVNode(e.unref(r._sfc_main),{tag:"span",variant:"body-xs",color:"secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({date:t.subscription.next_invoice.invoice_date,format:"date",offsetType:"offsetted",timezone:t.customer.timezone})),1)]),_:1})])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",V,[u.value?(e.openBlock(),e.createBlock(e.unref(b._sfc_main),{key:0,intent:"primary",class:"sv-action sv-action--primary sv-subscriptions-list__item-details w-full md:w-auto",type:"button",onClick:d[0]||(d[0]=M=>c.$emit("view-subscription-details",{subscriptionId:t.subscription.id}))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Subscription details",description:"The label for the subscription details button in the subscriptions block",id:"customer.subscriptions_block.show_details_button_label"})),1)]),_:1})):e.createCommentVNode("",!0)])])]),_:1}))}}),N={key:1,class:"sv-subscriptions-list__items grid grid-cols-1 gap-4"},C=e.defineComponent({__name:"SubscriptionsList",props:{customer:{type:Object},subscriptions:{type:Array},paymentMethods:{default:()=>[],type:Array},isLoading:{type:Boolean},showViewAllButton:{type:Boolean,default:!0},showViewDetailsButton:{type:Boolean,default:!0}},emits:["view-subscription-details","view-all-subscriptions","load-more"],setup(t){const s=t,{$t:i}=r.useIntl(),o=e.computed(()=>s.subscriptions.length>0),a=n=>{if(n)return s.paymentMethods.find(({id:u})=>u===n)},l=e.computed(()=>s.showViewAllButton);return(n,u)=>(e.openBlock(),e.createBlock(e.unref(p._sfc_main),{class:"sv-subscriptions-list","no-spacing":"","no-border":"",title:e.unref(i)({defaultMessage:"{count, plural, one {My subscription} other {My subscriptions}}",description:"Title for the subscriptions block on the customer overview page",id:"customer_overview.subscriptions_block.title"},{count:String(t.subscriptions.length)})},e.createSlots({default:e.withCtx(()=>[o.value?(e.openBlock(),e.createElementBlock("div",N,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.subscriptions,c=>(e.openBlock(),e.createBlock(S,{key:c.id,subscription:c,"payment-method":a(c.payment_method_id),customer:t.customer,"show-view-subscription-details-button":t.showViewDetailsButton,onViewSubscriptionDetails:u[1]||(u[1]=d=>n.$emit("view-subscription-details",d))},null,8,["subscription","payment-method","customer","show-view-subscription-details-button"]))),128))])):(e.openBlock(),e.createBlock(e.unref(p._sfc_main),{key:0,class:"sv-empty-state sv-subscriptions-list__empty"},{default:e.withCtx(()=>[e.createVNode(e.unref(r._sfc_main),{tag:"h3",variant:"heading-3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"No subscriptions",description:"Title for the my subscriptions block on the customer overview page",id:"customer_overview.subscriptions_block.no_active_subscription_title"})),1)]),_:1}),e.createVNode(e.unref(r._sfc_main),{variant:"body-xs",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"There’s no active subscription to display.",description:"Text that is being displayed when there is no active subscription in the subscriptions block",id:"customer_overview.subscriptions_block.no_active_subscription_content"})),1)]),_:1})]),_:1}))]),_:2},[l.value?{name:"right",fn:e.withCtx(()=>[e.createVNode(e.unref(b._sfc_main),{size:"sm",intent:"subtle","icon-suffix":"arrow_right_alt",class:"sv-action sv-action--ghost sv-subscriptions-list__view-all",type:"button",onClick:u[0]||(u[0]=c=>n.$emit("view-all-subscriptions"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"View all",description:"The text for the view all subscriptions button",id:"customer_overview.subscriptions_block.view_all_button_label"})),1)]),_:1})]),key:"0"}:void 0]),1032,["title"]))}}),D=e.defineComponent({__name:"SubscriptionsList",props:{customer:{type:null},subscriptions:{type:Array},paymentMethods:{type:Array},isLoading:{type:Boolean},configuration:{type:Object}},emits:["load-more"],setup(t){const{dispatchAction:s}=y.useActionDispatchProvider();return(i,o)=>{var a,l;return t.isLoading?(e.openBlock(),e.createBlock(h._sfc_main,{key:0,variant:"section",class:"sv-subscriptions-list sv-root sv-component sv-loading min-h-[100px]","data-testid":"subscriptions-list-skeleton"})):t.customer?(e.openBlock(),e.createBlock(C,{key:1,class:"sv-subscriptions-list sv-root sv-component",customer:t.customer,subscriptions:t.subscriptions,"payment-methods":t.paymentMethods,"is-loading":t.isLoading,"show-view-all-button":(a=t.configuration)==null?void 0:a.showViewAllButton,"show-view-details-button":(l=t.configuration)==null?void 0:l.showViewDetailsButton,onViewSubscriptionDetails:o[0]||(o[0]=n=>e.unref(s)({action:"view-subscription-details",data:{subscriptionId:n.subscriptionId}})),onViewAllSubscriptions:o[1]||(o[1]=n=>e.unref(s)({action:"view-all-subscriptions"})),onLoadMore:o[2]||(o[2]=n=>i.$emit("load-more"))},null,8,["customer","subscriptions","payment-methods","is-loading","show-view-all-button","show-view-details-button"])):e.createCommentVNode("",!0)}}});exports._sfc_main=D;exports.useSubscriptionsList=w;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { u as B } from "./useIncrementalLoading-Cgxw2GD7.mjs";
|
|
2
|
-
import { c as M } from "./subscriptions-
|
|
2
|
+
import { c as M } from "./subscriptions-XDyI2Cqm.mjs";
|
|
3
3
|
import { defineComponent as S, computed as v, openBlock as a, createBlock as l, unref as s, withCtx as n, createElementVNode as w, createVNode as _, createTextVNode as d, toDisplayString as b, createCommentVNode as y, createElementBlock as g, createSlots as $, Fragment as A, renderList as D } from "vue";
|
|
4
|
-
import { _ as V } from "./Button.vue.es-
|
|
5
|
-
import { _ as k } from "./Section.vue.es-
|
|
6
|
-
import { u as x, _ as f } from "./customElements-
|
|
7
|
-
import { _ as L } from "./PaymentMethod.vue.es-
|
|
8
|
-
import { g as T, a as N } from "./subscription-
|
|
4
|
+
import { _ as V } from "./Button.vue.es-Dz-2L8dJ.mjs";
|
|
5
|
+
import { _ as k } from "./Section.vue.es-DQ5H7mqW.mjs";
|
|
6
|
+
import { u as x, _ as f } from "./customElements-CSE7dwUr.mjs";
|
|
7
|
+
import { _ as L } from "./PaymentMethod.vue.es-DkQdPXfk.mjs";
|
|
8
|
+
import { g as T, a as N } from "./subscription-CrVOr5MF.mjs";
|
|
9
9
|
import { _ as P } from "./Skeleton.vue_vue_type_script_setup_true_lang-DRLoYWGY.mjs";
|
|
10
|
-
import { u as j } from "./useActionDispatchProvider-
|
|
10
|
+
import { u as j } from "./useActionDispatchProvider-B8-oycQk.mjs";
|
|
11
11
|
function st({
|
|
12
12
|
customerId: t,
|
|
13
13
|
batchSize: i = 15
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("vue"),r=require("./floating-ui.vue.es-Bly3DGWm.js"),s=require("./customElements-
|
|
1
|
+
const e=require("vue"),r=require("./floating-ui.vue.es-Bly3DGWm.js"),s=require("./customElements-Vox1PB6G.js"),v={key:0,class:"mb-1 px-3"},k=e.defineComponent({__name:"Tooltip",props:{variant:{default:"default"},placement:{default:"bottom-end"},offset:{default:4},maxWidth:{default:"xs"},rootClass:{},title:{},isDarkMode:{type:Boolean}},setup(t){const a=t,i=e.ref(),d=e.ref(null),l=e.ref(!1),u=e.inject(s.TOOLTIP_PORTAL_NAME),{floatingStyles:f,placement:m}=r.useFloating(i,d,{whileElementsMounted:r.autoUpdate,placement:a.placement,middleware:[r.offset(a.offset),r.flip()]}),g=e.computed(()=>{const n=m.value.split("-")[0],o=`-${a.offset}px`;return{top:n==="top"?o:"0",right:n==="right"?o:"0",bottom:n==="bottom"?o:"0",left:n==="left"?o:"0"}});return e.provide(s.TOOLTIP_DARK_MODE_INJECT_KEY,a.isDarkMode),(n,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("span",e.mergeProps(n.$attrs,{ref_key:"triggerRef",ref:i,class:"relative leading-none",onMouseenter:o[0]||(o[0]=c=>l.value=!0),onMouseleave:o[1]||(o[1]=c=>l.value=!1)}),[l.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:"absolute",style:e.normalizeStyle(g.value)},null,4)):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default")],16),e.unref(u)?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:e.unref(u)},[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"tooltipRef",ref:d,style:e.normalizeStyle(e.unref(f)),class:e.normalizeClass(["z-70 border shadow-md",[t.rootClass,`max-w-${t.maxWidth}`,{"rounded border-gray-200 bg-white":!t.isDarkMode,"rounded border-gray-700 bg-gray-700":t.isDarkMode}]]),onMouseenter:o[2]||(o[2]=c=>l.value=!0),onMouseleave:o[3]||(o[3]=c=>l.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["rounded",{"border-gray-50 bg-gray-50":t.variant==="outline"&&!t.isDarkMode,"border-gray-600 bg-gray-600":t.variant==="outline"&&t.isDarkMode,"border-4":t.variant==="outline"&&!t.title,"border-2":t.variant==="outline"&&t.title,"pt-0":!!t.title}])},[t.title?(e.openBlock(),e.createElementBlock("div",v,[e.createVNode(s._sfc_main,{variant:"caps-heading",color:"secondary",class:e.normalizeClass({"!text-gray-100":t.isDarkMode}),"no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1},8,["class"])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["rounded py-2",{"bg-white":t.variant==="outline"&&!t.isDarkMode,"bg-gray-700":t.variant==="outline"&&t.isDarkMode}])},[e.renderSlot(n.$slots,"tooltip")],2)],2)],38)):e.createCommentVNode("",!0)],8,["to"])):e.createCommentVNode("",!0)],64))}}),y={},b={class:"px-3"};function C(t,a){return e.openBlock(),e.createElementBlock("div",b,[e.renderSlot(t.$slots,"default")])}const M=r._export_sfc(y,[["render",C]]),E=e.defineComponent({__name:"TooltipParagraph",setup(t){const a=e.inject(s.TOOLTIP_DARK_MODE_INJECT_KEY);return(i,d)=>(e.openBlock(),e.createBlock(e.unref(s._sfc_main),{tag:"p",variant:"body-xs",color:"secondary",class:e.normalizeClass({"!text-gray-200":e.unref(a)})},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3},8,["class"]))}});exports.TooltipContent=M;exports._sfc_main=k;exports._sfc_main$1=E;
|