@solvimon/solvimon-web 0.1.0-alpha.25 → 0.1.0-alpha.26

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.
Files changed (286) hide show
  1. package/README.md +14 -11
  2. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Dh_a0NRB.mjs → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DcrLNA_x.mjs} +6 -6
  3. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-BM1_31Tl.js → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DwbIiJBY.js} +1 -1
  4. package/dist/{Avatar.vue.es-CvxRdCes.js → Avatar.vue.es-Bm6MCMAL.js} +1 -1
  5. package/dist/{Avatar.vue.es-C9Jkfuvp.mjs → Avatar.vue.es-BqQHvLGA.mjs} +1 -1
  6. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-7wQAw6Lv.js → BillingInformation.vue_vue_type_script_setup_true_lang-0JHnqIpC.js} +1 -1
  7. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BRSUpMPU.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-BFza7Nf9.mjs} +8 -8
  8. package/dist/{Button.vue.es-BbSN0uOk.mjs → Button.vue.es-C32_baQN.mjs} +1 -1
  9. package/dist/{Button.vue.es-CeUTAc2n.js → Button.vue.es-qGvnOKnK.js} +1 -1
  10. package/dist/ChargeOnDemandModal-CIiI74ls.mjs +983 -0
  11. package/dist/ChargeOnDemandModal-DIQaGnRs.js +1 -0
  12. package/dist/Checkout.entry.ce-8EcavNgT.js +2 -0
  13. package/dist/{Checkout.entry.ce-BMzK8nQg.mjs → Checkout.entry.ce-BA5ljKj8.mjs} +1562 -1538
  14. package/dist/{Chip.vue.es-T22Q7AF9.mjs → Chip.vue.es-CKCOY5T6.mjs} +2 -2
  15. package/dist/{Chip.vue.es-BN83K3Tk.js → Chip.vue.es-D60gTbfe.js} +1 -1
  16. package/dist/{ContextMenu.vue.es-DXKR7WFg.js → ContextMenu.vue.es-C7KI8Gz6.js} +1 -1
  17. package/dist/{ContextMenu.vue.es-0PRmCAzL.mjs → ContextMenu.vue.es-Da-lAmTl.mjs} +10 -10
  18. package/dist/{CustomerBillingInformation.vue.es-C2j40TYP.mjs → CustomerBillingInformation.vue.es-BxBQt4Q0.mjs} +2 -2
  19. package/dist/{CustomerBillingInformation.vue.es-yrLGc7oL.js → CustomerBillingInformation.vue.es-bFUx81Ig.js} +1 -1
  20. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BZwGWhaL.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BcTZgshS.mjs} +6 -6
  21. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C8diNL5x.js → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C0lJ_ESU.js} +1 -1
  22. package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-xqMsbuU6.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DkbQ2MiR.mjs} +908 -891
  23. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-hBo2Y2mJ.js +1 -0
  24. package/dist/{DividerText.vue.es-DsYRZzuE.js → DividerText.vue.es-BF3gnr4e.js} +1 -1
  25. package/dist/{DividerText.vue.es-CV1XK_Vz.mjs → DividerText.vue.es-DKl3FnDJ.mjs} +1 -1
  26. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-kpjrC-4q.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C3QYra1x.mjs} +4 -4
  27. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-srXOpUb0.js → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-cSQeqr0A.js} +1 -1
  28. package/dist/{ErrorNotification.vue.es-QfRoDhkn.js → ErrorNotification.vue.es-BX9dHEc-.js} +1 -1
  29. package/dist/{ErrorNotification.vue.es-CiUJva6S.mjs → ErrorNotification.vue.es-rRKgmkzV.mjs} +1 -1
  30. package/dist/{IconButton.vue.es-CytBZUkZ.js → IconButton.vue.es-Bwdfu-jm.js} +1 -1
  31. package/dist/{IconButton.vue.es-ChvsCZQG.mjs → IconButton.vue.es-UlqwNPAX.mjs} +2 -2
  32. package/dist/{IconTitle.vue.es-DPruIJ6l.mjs → IconTitle.vue.es-CK9k69tV.mjs} +3 -3
  33. package/dist/{IconTitle.vue.es-DtnpBObk.js → IconTitle.vue.es-Cei98MBw.js} +1 -1
  34. package/dist/{Input.vue.es-BkzQDkrz.js → Input.vue.es-B47l_feL.js} +1 -1
  35. package/dist/{Input.vue.es-DJQqJrsb.mjs → Input.vue.es-D9IjIWc-.mjs} +2 -2
  36. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Do0dDtkA.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DKlPrxQS.js} +1 -1
  37. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BC-zyUqe.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DUfJl07Y.mjs} +2 -2
  38. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-CFhhhwId.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-D9Rtgapa.mjs} +2 -2
  39. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-DQFS7SfE.js → InvoiceEntryView.vue_vue_type_script_setup_true_lang-DlJ6lELc.js} +1 -1
  40. package/dist/InvoiceSummary.vue.es-DBnR9Hs7.js +1 -0
  41. package/dist/{InvoiceSummary.vue.es-6qpbyymg.mjs → InvoiceSummary.vue.es-DQ4KvTaw.mjs} +576 -565
  42. package/dist/{Modal.vue.es-JpE0eh_Q.js → Modal.vue.es-8LN4gBh0.js} +1 -1
  43. package/dist/{Modal.vue.es-BuRlbyZw.mjs → Modal.vue.es-B9xMiyn3.mjs} +5 -5
  44. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-nAuhIopc.js → PaymentErrorCard.vue_vue_type_script_setup_true_lang-B1yGKkWN.js} +1 -1
  45. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-UmKgVvdj.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-BVzL2PGe.mjs} +4 -4
  46. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-YpcWHm24.js → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DSGf6uFP.js} +1 -1
  47. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DggCusgC.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-nLTPnH4j.mjs} +3 -3
  48. package/dist/{PaymentHistoryBlock-DnmParhQ.mjs → PaymentHistoryBlock-DYa99P1M.mjs} +1 -1
  49. package/dist/{PaymentHistoryBlock-uWuWjr8I.js → PaymentHistoryBlock-Ds93gNvh.js} +1 -1
  50. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BS8N4yt9.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CBZhXQfC.js} +1 -1
  51. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BziIf86i.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-D0KnSy0y.mjs} +4 -4
  52. package/dist/{PaymentIntegrationForm-DTXm56QQ.js → PaymentIntegrationForm-B_Db4DG1.js} +1 -1
  53. package/dist/{PaymentIntegrationForm-DL55i0HD.mjs → PaymentIntegrationForm-UWoyZgsR.mjs} +1 -1
  54. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-C0J37ZVe.js +1 -0
  55. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-J15IDbMc.mjs +154 -0
  56. package/dist/{PaymentIntegrationFormAdyen-Cqsy82To.mjs → PaymentIntegrationFormAdyen-D4qfNtZ_.mjs} +197 -183
  57. package/dist/PaymentIntegrationFormAdyen-HeA9XIj-.js +98 -0
  58. package/dist/{PaymentIntegrationFormStripe-DIU1rnwH.mjs → PaymentIntegrationFormStripe-BIiMCWlV.mjs} +247 -220
  59. package/dist/PaymentIntegrationFormStripe-DUCJTIAq.js +102 -0
  60. package/dist/PaymentMethod.vue.es-CJcSZ9lN.js +1 -0
  61. package/dist/{PaymentMethod.vue.es-m1NasGqw.mjs → PaymentMethod.vue.es-CKu5nApX.mjs} +168 -148
  62. package/dist/{PaymentMethodForm-BEVdWCrH.js → PaymentMethodForm-1d0YIGOu.js} +1 -1
  63. package/dist/{PaymentMethodForm-BYzt1PVP.mjs → PaymentMethodForm-B05sHWcW.mjs} +1 -1
  64. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-BDm8l_6N.js +1 -0
  65. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-fdRTp7sc.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-D1yIYsb_.mjs} +45 -41
  66. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-FhMBZqtI.js → PaymentMethodsList.vue_vue_type_script_setup_true_lang-BE4S26JX.js} +1 -1
  67. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-FChyZp2v.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-DGpXRtp4.mjs} +6 -6
  68. package/dist/PlanCustomizationEditor-CEMP_Dhz.js +1 -0
  69. package/dist/PlanCustomizationEditor-CpZeilm5.mjs +694 -0
  70. package/dist/{PricingGroupRangeInput.vue.es-B4ZbKxUw.mjs → PricingGroupRangeInput.vue.es-CJpvUP3-.mjs} +4 -4
  71. package/dist/{PricingGroupRangeInput.vue.es-Ba3v0J_R.js → PricingGroupRangeInput.vue.es-DZSJ5Mz0.js} +1 -1
  72. package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DJ81eUJX.mjs +141 -0
  73. package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-jrkraJMu.js +1 -0
  74. package/dist/{RadioGroupExtended.vue.es-CkhBp9kI.mjs → RadioGroupExtended.vue.es-BalV7gwp.mjs} +2 -2
  75. package/dist/{RadioGroupExtended.vue.es-CHrcqSRq.js → RadioGroupExtended.vue.es-Dt6LH9Yh.js} +1 -1
  76. package/dist/{Section.vue.es-D5svcVS_.mjs → Section.vue.es-D7eiXUbk.mjs} +1 -1
  77. package/dist/{Section.vue.es-CSrVPlUK.js → Section.vue.es-zVXBHAL6.js} +1 -1
  78. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BqOSBdFQ.js → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BdjYFrVC.js} +1 -1
  79. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BM9Y4Cy3.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DudMRVka.mjs} +6 -6
  80. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D4sbq9nA.js +1 -0
  81. package/dist/{Skeleton.vue_vue_type_script_setup_true_lang-DRLoYWGY.mjs → Skeleton.vue_vue_type_script_setup_true_lang-D60YtA9z.mjs} +5 -5
  82. package/dist/StepInput.vue.es-C3Zm6Wc9.mjs +199 -0
  83. package/dist/StepInput.vue.es-mAnuCuDQ.js +1 -0
  84. package/dist/SubscriptionDetails.entry.ce-D4CsSoR9.js +1 -0
  85. package/dist/SubscriptionDetails.entry.ce-WEimiOex.mjs +1057 -0
  86. package/dist/{SubscriptionSchedules-CMVoB2bw.js → SubscriptionSchedules-Cm5Dt-1H.js} +1 -1
  87. package/dist/{SubscriptionSchedules-yDcsD1hd.mjs → SubscriptionSchedules-DrrEAPlx.mjs} +1 -1
  88. package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DZHsQImd.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DHp_KtbF.mjs} +2284 -2341
  89. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-t2Awijf5.js +1 -0
  90. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-BmNl5u8R.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-3VYfm6Hm.mjs} +3 -3
  91. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-BgXZMihr.js → SubscriptionSummary.vue_vue_type_script_setup_true_lang-B41qZmcL.js} +1 -1
  92. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DOJ0t_fo.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-Bu-_clEa.js} +1 -1
  93. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BUzdZHah.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DFU0IULg.mjs} +8 -8
  94. package/dist/{TooltipParagraph.vue.es-CxdL8-B7.mjs → TooltipParagraph.vue.es-BXbOJmjr.mjs} +3 -3
  95. package/dist/TooltipParagraph.vue.es-Cph6zT31.js +1 -0
  96. package/dist/{TrialChip.vue.es-BCc8q5j0.js → TrialChip.vue.es-C_wgHGuN.js} +1 -1
  97. package/dist/{TrialChip.vue.es-BK7m7e7q.mjs → TrialChip.vue.es-C_yRujip.mjs} +2 -2
  98. package/dist/{cn.es-ZXNzpauQ.mjs → cn.es-CGa6b2Lt.mjs} +2 -2
  99. package/dist/{cn.es-71nFUose.js → cn.es-D9YMDvG2.js} +1 -1
  100. package/dist/components/BillingInformation/BillingInformation.cjs +1 -1
  101. package/dist/components/BillingInformation/BillingInformation.mjs +4 -4
  102. package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -1
  103. package/dist/components/BillingInformationForm/BillingInformationForm.mjs +246 -230
  104. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -1
  105. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +4 -4
  106. package/dist/components/Invoice/Invoice.cjs +1 -1
  107. package/dist/components/Invoice/Invoice.mjs +201 -212
  108. package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -1
  109. package/dist/components/InvoiceDetails/InvoiceDetails.mjs +4 -4
  110. package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -1
  111. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +2 -2
  112. package/dist/components/InvoicesList/InvoicesList.cjs +1 -1
  113. package/dist/components/InvoicesList/InvoicesList.mjs +3 -3
  114. package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -1
  115. package/dist/components/PaymentHistory/PaymentHistory.mjs +4 -4
  116. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -1
  117. package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +5 -5
  118. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -1
  119. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +4 -4
  120. package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -1
  121. package/dist/components/SubscriptionsList/SubscriptionsList.mjs +5 -5
  122. package/dist/components/WalletBalances/WalletBalances.cjs +1 -1
  123. package/dist/components/WalletBalances/WalletBalances.mjs +3 -3
  124. package/dist/{customElements-hH6pju3X.js → customElements-C963-LtW.js} +36 -32
  125. package/dist/{customElements-q_i9y0Ph.mjs → customElements-D5DAoHRI.mjs} +231 -196
  126. package/dist/{customer-BDoOIAFr.mjs → customer-DKa1B2vp.mjs} +4 -4
  127. package/dist/{customer-C9q6ti8s.js → customer-TE1FnGT0.js} +1 -1
  128. package/dist/{de-DE-BSlbAnPE.js → de-DE-B4TUdnUf.js} +1 -1
  129. package/dist/{de-DE-B_ik9VNt.mjs → de-DE-CLfzTbbX.mjs} +38 -6
  130. package/dist/de-DE-DaBBl-Ak.js +1 -0
  131. package/dist/{de-DE-DXsG-vXA.mjs → de-DE-jkW2dJrX.mjs} +28 -14
  132. package/dist/en-US-BNevqm0M.js +1 -0
  133. package/dist/{en-US-DkCltadt.mjs → en-US-D6SGRAch.mjs} +38 -6
  134. package/dist/en-US-J85TQRI8.js +1 -0
  135. package/dist/{en-US-C939IZ5i.mjs → en-US-SDhjlY_v.mjs} +20 -5
  136. package/dist/formControl-ODrpUvcA.js +1 -0
  137. package/dist/{index-BPU8tIml.mjs → formControl-dX7l8o3c.mjs} +160 -143
  138. package/dist/icon-sprite.svg.es-BZIz7-0d.mjs +4 -0
  139. package/dist/icon-sprite.svg.es-Ds6lDf5p.js +1 -0
  140. package/dist/index.cjs +1 -1
  141. package/dist/index.mjs +4 -4
  142. package/dist/{invoices-CHp75zZI.js → invoices-ClqTWYF9.js} +1 -1
  143. package/dist/{invoices-DIzkXntV.mjs → invoices-DJTwftJv.mjs} +1 -1
  144. package/dist/it-IT-BkPbTueL.js +1 -0
  145. package/dist/{it-IT-DT3rfjOY.js → it-IT-CSYvGmpT.js} +1 -1
  146. package/dist/{it-IT-BxpwB3oJ.mjs → it-IT-CaaFToGB.mjs} +20 -6
  147. package/dist/{it-IT-CHj2McbF.mjs → it-IT-Cym1UvvK.mjs} +38 -6
  148. package/dist/{nl-NL-DfkhOJKc.js → nl-NL-CpE4IgwO.js} +1 -1
  149. package/dist/{nl-NL-na2I4aiP.mjs → nl-NL-D0MQKaql.mjs} +34 -20
  150. package/dist/{nl-NL-Cdvd_XMN.mjs → nl-NL-D0c4x5C0.mjs} +38 -6
  151. package/dist/nl-NL-jIfAVGv0.js +1 -0
  152. package/dist/paymentMethods-AL2U_byg.js +1 -0
  153. package/dist/{paymentMethods-DEKp_4QM.mjs → paymentMethods-CWzJhcWK.mjs} +16 -14
  154. package/dist/{payments-DBvregE8.js → payments-BmiHMlQt.js} +1 -1
  155. package/dist/{payments-C0-Hq2a4.mjs → payments-aXyfylwk.mjs} +6 -6
  156. package/dist/pricing.es-C07bgEZx.js +1 -0
  157. package/dist/pricing.es-QYWrKMUJ.mjs +30 -0
  158. package/dist/pricingPlanSchedules-BD4GIP_F.mjs +32 -0
  159. package/dist/pricingPlanSchedules-BfsMSvN0.js +1 -0
  160. package/dist/screens/Checkout/Checkout.cjs +1 -1
  161. package/dist/screens/Checkout/Checkout.mjs +2 -2
  162. package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -1
  163. package/dist/screens/CustomerOverview/CustomerOverview.mjs +10 -10
  164. package/dist/screens/PayInvoice/PayInvoice.cjs +1 -1
  165. package/dist/screens/PayInvoice/PayInvoice.mjs +57 -55
  166. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -1
  167. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +9 -9
  168. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -1
  169. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +3 -769
  170. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -1
  171. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +243 -270
  172. package/dist/{subscription-CrVOr5MF.mjs → subscription-D1yHKUNc.mjs} +2 -2
  173. package/dist/{subscriptions-BArXBCFr.js → subscriptions-Cm83ckfl.js} +1 -1
  174. package/dist/{subscriptions--9MaTXMb.mjs → subscriptions-cnR5fnf7.mjs} +1 -1
  175. package/dist/types/components/{wallets/WalletModalShell.types.d.ts → payments/OnDemandPaymentModalShell/OnDemandPaymentModalShell.types.d.ts} +3 -3
  176. package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +5 -0
  177. package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripeFrame.types.d.ts +5 -9
  178. package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.vue.d.ts +7 -11
  179. package/dist/types/components/providers/AuthProvider/AuthProvider.vue.d.ts +7 -11
  180. package/dist/types/components/providers/ConfigProvider/ConfigProvider.vue.d.ts +7 -11
  181. package/dist/types/components/providers/CssOverridesProvider/CssOverridesProvider.vue.d.ts +7 -11
  182. package/dist/types/components/providers/EntryProvider/EntryProvider.vue.d.ts +7 -11
  183. package/dist/types/components/providers/ErrorBoundary/ErrorBoundary.vue.d.ts +7 -11
  184. package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.vue.d.ts +7 -11
  185. package/dist/types/components/providers/HostElementProvider/HostElementProvider.vue.d.ts +7 -11
  186. package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +2 -2
  187. package/dist/types/components/providers/LoggerProvider/LoggerProvider.vue.d.ts +7 -11
  188. package/dist/types/components/providers/PortalProvider/PortalProvider.vue.d.ts +7 -11
  189. package/dist/types/components/providers/Provider/Provider.vue.d.ts +7 -11
  190. package/dist/types/components/providers/TeleportProvider/TeleportProvider.vue.d.ts +7 -11
  191. package/dist/types/components/providers/TranslationProvider/TranslationOverride.vue.d.ts +7 -11
  192. package/dist/types/components/providers/TranslationProvider/TranslationProvider.vue.d.ts +7 -11
  193. package/dist/types/components/subscriptions/ChargeOnDemandModal/ChargeOnDemandModal.types.d.ts +21 -0
  194. package/dist/types/components/subscriptions/OnDemandItemsCard/OnDemandItemsCard.types.d.ts +7 -0
  195. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.configuration.types.d.ts +27 -0
  196. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.entry.types.d.ts +1 -1
  197. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.types.d.ts +6 -5
  198. package/dist/types/services/paymentMethods.types.d.ts +4 -2
  199. package/dist/types/services/requests.types.d.ts +5 -0
  200. package/dist/types/vendor/@solvimon/solvimon-types/index.d.ts +5 -0
  201. package/dist/types/vendor/@solvimon/solvimon-types/types/AgentContext.d.ts +3 -0
  202. package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalPolicies.d.ts +6 -1
  203. package/dist/types/vendor/@solvimon/solvimon-types/types/ChargeOnDemandPricingItems.d.ts +23 -0
  204. package/dist/types/vendor/@solvimon/solvimon-types/types/CustomFields.d.ts +16 -4
  205. package/dist/types/vendor/@solvimon/solvimon-types/types/Embeddable.d.ts +8 -0
  206. package/dist/types/vendor/@solvimon/solvimon-types/types/Invoice.d.ts +21 -6
  207. package/dist/types/vendor/@solvimon/solvimon-types/types/OAuth.d.ts +28 -0
  208. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAcceptor.d.ts +2 -1
  209. package/dist/types/vendor/@solvimon/solvimon-types/types/Permission.d.ts +1 -1
  210. package/dist/types/vendor/@solvimon/solvimon-types/types/Platform.d.ts +6 -1
  211. package/dist/types/vendor/@solvimon/solvimon-types/types/Portal.d.ts +5 -0
  212. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingItemConfig.d.ts +5 -0
  213. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanGroups.d.ts +31 -0
  214. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSchedule.d.ts +9 -1
  215. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanScheduleInfo.d.ts +1 -1
  216. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscription.d.ts +3 -3
  217. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlans.d.ts +3 -0
  218. package/dist/types/vendor/@solvimon/solvimon-types/types/Product.d.ts +2 -0
  219. package/dist/types/vendor/@solvimon/solvimon-types/types/ProductItem.d.ts +2 -0
  220. package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteTemplates.d.ts +2 -0
  221. package/dist/types/vendor/@solvimon/solvimon-types/types/ResourceStatus.d.ts +1 -1
  222. package/dist/types/vendor/@solvimon/solvimon-types/types/SeatAssignment.d.ts +22 -0
  223. package/dist/types/vendor/@solvimon/solvimon-types/types/Wallet.d.ts +6 -0
  224. package/dist/types/vendor/@solvimon/solvimon-types/types/Workflows.d.ts +128 -1
  225. package/dist/{useActionDispatchProvider-CKzeqXzY.js → useActionDispatchProvider-CHkVQMaE.js} +1 -1
  226. package/dist/{useActionDispatchProvider-BdciAX8T.mjs → useActionDispatchProvider-DDYqIh3r.mjs} +1 -1
  227. package/dist/{useCustomer-DSYr0F58.js → useCustomer-DGYtowRy.js} +1 -1
  228. package/dist/{useCustomer-D8ixhuuj.mjs → useCustomer-XZKWsolE.mjs} +1 -1
  229. package/dist/{useCustomerFormLabels-htMZ0xqB.mjs → useCustomerFormLabels-CcnkJLcB.mjs} +6 -6
  230. package/dist/useCustomerFormLabels-DAZziqYt.js +1 -0
  231. package/dist/{useExperimentalFeature-D29-TO3R.js → useExperimentalFeature-COOU6IZd.js} +1 -1
  232. package/dist/{useExperimentalFeature-JK_kAUQQ.mjs → useExperimentalFeature-ierhOt9Q.mjs} +1 -1
  233. package/dist/{useInvoiceData-Bpbog3zW.mjs → useInvoiceData-BEK-7msA.mjs} +3 -3
  234. package/dist/{useInvoiceData-DhrItfv7.js → useInvoiceData-CQRn8l9C.js} +1 -1
  235. package/dist/{useInvoicesList-duu_b5GW.js → useInvoicesList-BQkKyyXa.js} +1 -1
  236. package/dist/{useInvoicesList-BGwcJn4I.mjs → useInvoicesList-C4I118KM.mjs} +7 -7
  237. package/dist/{useLoadInitialData-BDmmpcfb.mjs → useLoadInitialData-CR0kbYw8.mjs} +1 -1
  238. package/dist/{useLoadInitialData-U2WvBmXT.js → useLoadInitialData-CrKnBZs_.js} +1 -1
  239. package/dist/{usePaymentMethodAvailability-DwtT5Czz.js → usePaymentMethodAvailability-Ci6LeYKt.js} +1 -1
  240. package/dist/{usePaymentMethodAvailability-adqRujTA.mjs → usePaymentMethodAvailability-ZH-m3B-A.mjs} +12 -12
  241. package/dist/{usePaymentMethodOptions-DlZtTQNQ.mjs → usePaymentMethodOptions-Ciifjo6c.mjs} +15 -13
  242. package/dist/usePaymentMethodOptions-Cqe92ZBn.js +1 -0
  243. package/dist/{usePaymentMethods-BnmSo_rr.mjs → usePaymentMethods-B-OKRyKd.mjs} +1 -1
  244. package/dist/{usePaymentMethods-DZ1a0mnr.js → usePaymentMethods-BKwrl82-.js} +1 -1
  245. package/dist/usePayments-Bauj16B-.js +1 -0
  246. package/dist/{usePayments-s-Z1di8d.mjs → usePayments-CV85OV8V.mjs} +46 -41
  247. package/dist/{usePortal-Hm7wvtgQ.js → usePortal-DSLImEfr.js} +1 -1
  248. package/dist/{usePortal-C4rR5Rhu.mjs → usePortal-H8Tv2TnZ.mjs} +1 -1
  249. package/dist/{useSubscription-DMAEJves.js → useSubscription-BiYNJT2e.js} +1 -1
  250. package/dist/{useSubscription-DSsXVO0h.mjs → useSubscription-DqnxWNKg.mjs} +1 -1
  251. package/dist/{useTimePeriod.es-CW8ycmpT.mjs → useTimePeriod.es-B22-fno3.mjs} +1 -1
  252. package/dist/{useTimePeriod.es-anHB63am.js → useTimePeriod.es-D2aiyfd-.js} +1 -1
  253. package/dist/useWatchDebounced-B8iX7ykx.js +1 -0
  254. package/dist/useWatchDebounced-BHlBPcXB.mjs +20 -0
  255. package/package.json +11 -8
  256. package/dist/Checkout.entry.ce-DgA0ckyl.js +0 -2
  257. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DzbPUvHN.js +0 -1
  258. package/dist/InvoiceSummary.vue.es-v1TkOUhA.js +0 -1
  259. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-4RmdLbzY.js +0 -1
  260. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CvpFnl9V.mjs +0 -141
  261. package/dist/PaymentIntegrationFormAdyen-C9KoiqMh.js +0 -98
  262. package/dist/PaymentIntegrationFormStripe-DTLgGutU.js +0 -102
  263. package/dist/PaymentMethod.vue.es-ZWda5GqF.js +0 -1
  264. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-CzUwtVEI.js +0 -1
  265. package/dist/PlanCustomizationEditor-CunwwXTw.js +0 -1
  266. package/dist/PlanCustomizationEditor-NLVkEYFF.mjs +0 -877
  267. package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-Dvuj-fos.mjs +0 -131
  268. package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-iE4dLawA.js +0 -1
  269. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DypW8aNJ.js +0 -1
  270. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DH7IZrNT.js +0 -1
  271. package/dist/TooltipParagraph.vue.es-DS_69pl1.js +0 -1
  272. package/dist/de-DE-npBTLtKL.js +0 -1
  273. package/dist/en-US-9xdcz3T5.js +0 -1
  274. package/dist/en-US-kGduGoka.js +0 -1
  275. package/dist/icon-sprite.svg.es-Bt21fMEt.mjs +0 -4
  276. package/dist/icon-sprite.svg.es-Dauis9LS.js +0 -1
  277. package/dist/index-DwueOtPi.js +0 -1
  278. package/dist/it-IT-BayNIAy7.js +0 -1
  279. package/dist/nl-NL-0rV4nFLw.js +0 -1
  280. package/dist/paymentMethods-CZGP6_4W.js +0 -1
  281. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagement.types.d.ts +0 -47
  282. package/dist/useCustomerFormLabels-CRumh405.js +0 -1
  283. package/dist/usePaymentMethodOptions-CXdFKFqZ.js +0 -1
  284. package/dist/usePayments-DL4agK2i.js +0 -1
  285. package/dist/useWatchDebounced-CAU1WI1P.js +0 -1
  286. package/dist/useWatchDebounced-DT5IicPp.mjs +0 -14
@@ -0,0 +1,1057 @@
1
+ import { computed as m, ref as U, defineComponent as T, openBlock as u, createBlock as f, unref as a, withCtx as p, createElementVNode as j, createVNode as _, createTextVNode as w, toDisplayString as S, createCommentVNode as y, createElementBlock as F, Fragment as Z, renderList as J, shallowRef as ae, watch as W, defineAsyncComponent as G, toRef as ie, renderSlot as se, normalizeProps as oe, guardReactiveProps as re } from "vue";
2
+ import { _ as ce } from "./Alert.vue.es-lIiAWf2S.mjs";
3
+ import { _ as Y } from "./Button.vue.es-C32_baQN.mjs";
4
+ import { _ as K } from "./ErrorNotification.vue.es-rRKgmkzV.mjs";
5
+ import { a as B, _ as $, b as Q, d as le, e as de } from "./customElements-D5DAoHRI.mjs";
6
+ import { C as ue } from "./ContentWithAsideLayout-BCM8tmZN.mjs";
7
+ import { u as ee } from "./useActionDispatchProvider-DDYqIh3r.mjs";
8
+ import { c as te, a as pe } from "./subscription-D1yHKUNc.mjs";
9
+ import { _ as me, u as ge } from "./CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DkbQ2MiR.mjs";
10
+ import { _ as be } from "./CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BcTZgshS.mjs";
11
+ import { _ as fe } from "./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C3QYra1x.mjs";
12
+ import { _ as he } from "./Skeleton.vue_vue_type_script_setup_true_lang-D60YtA9z.mjs";
13
+ import { _ as R } from "./Section.vue.es-D7eiXUbk.mjs";
14
+ import { g as ve } from "./pricing-DLOeiAIB.mjs";
15
+ import { f as X, b as _e } from "./formatting.es-RclXHhKo.mjs";
16
+ import { _ as ye } from "./PaymentMethod.vue.es-CKu5nApX.mjs";
17
+ import { M as we } from "./Modal.vue.es-B9xMiyn3.mjs";
18
+ import { c as Se } from "./subscriptions-cnR5fnf7.mjs";
19
+ import { _ as Ce } from "./SubscriptionSummary.vue_vue_type_script_setup_true_lang-3VYfm6Hm.mjs";
20
+ import { g as Me } from "./api.es-QaC926Xu.mjs";
21
+ import { i as Ie } from "./useIncrementalLoading-Cgxw2GD7.mjs";
22
+ import { c as Pe } from "./paymentMethods-CWzJhcWK.mjs";
23
+ import { A as Ae } from "./error-BHVZJGwD.mjs";
24
+ import { u as $e } from "./useSubscription-DqnxWNKg.mjs";
25
+ import { u as De } from "./useCustomer-XZKWsolE.mjs";
26
+ import { u as Ee } from "./usePaymentMethods-B-OKRyKd.mjs";
27
+ import { u as xe } from "./useLoadInitialData-CR0kbYw8.mjs";
28
+ import { c as Le } from "./pricingPlanSchedules-BD4GIP_F.mjs";
29
+ import { u as ke } from "./useService-Bh47bllz.mjs";
30
+ import { c as Oe } from "./pricingPlanSchedule-BPrS2WRd.mjs";
31
+ import { g as q } from "./getComposedString.es-C__uhJpd.mjs";
32
+ import { g as ne } from "./pricing.es-QYWrKMUJ.mjs";
33
+ import { h as Te } from "./pricingItemConfigs.es-ORxsk_YS.mjs";
34
+ import { a as Be } from "./sessionReference-3h-6FdrC.mjs";
35
+ const Ne = () => {
36
+ const { $t: e } = B();
37
+ return { getPriceLabel: (t) => {
38
+ if (!t.price)
39
+ return;
40
+ const n = X(t.price);
41
+ return t.priceType === "FIXED" ? n : e(
42
+ {
43
+ defaultMessage: "{price} per unit",
44
+ description: "The listed price of an on-demand item charged per unit",
45
+ id: "charge_on_demand.item.price_per_unit"
46
+ },
47
+ { price: n }
48
+ );
49
+ } };
50
+ };
51
+ function Ue({
52
+ subscription: e
53
+ }) {
54
+ const { dispatchAction: i } = ee(), t = m(() => {
55
+ if (!e.value) return !1;
56
+ const l = e.value.inactive_periods;
57
+ return !l || l.length === 0;
58
+ }), n = m(() => {
59
+ var v;
60
+ const l = (v = e.value) == null ? void 0 : v.inactive_periods;
61
+ return Array.isArray(l) && l.length > 0;
62
+ }), s = U();
63
+ return { isCancellable: t, isRenewable: n, pendingVariant: s, cancel: () => {
64
+ e.value && (s.value = "CANCEL");
65
+ }, renew: () => {
66
+ e.value && (s.value = "RENEW");
67
+ }, dismiss: () => {
68
+ s.value = void 0;
69
+ }, manage: () => {
70
+ e.value && i({
71
+ action: "manage-subscription",
72
+ data: { subscriptionId: e.value.id }
73
+ });
74
+ } };
75
+ }
76
+ function Fe(e) {
77
+ var n, s, o, c, r, h, l;
78
+ const i = (o = (s = (n = e.items) == null ? void 0 : n[0]) == null ? void 0 : s.configs) == null ? void 0 : o[0], t = (r = (c = i == null ? void 0 : i.details) == null ? void 0 : c.bands) == null ? void 0 : r[0];
79
+ return {
80
+ amount: (t == null ? void 0 : t.amount) ?? (t == null ? void 0 : t.fixed_amount),
81
+ billingPeriod: ((h = i == null ? void 0 : i.details) == null ? void 0 : h.pricing_period) ?? ((l = i == null ? void 0 : i.details) == null ? void 0 : l.billing_period)
82
+ };
83
+ }
84
+ function Re(e) {
85
+ var n, s, o;
86
+ const i = new Set(
87
+ (((n = e.pricing_plan_schedule) == null ? void 0 : n.enabled_pricings) ?? []).map(
88
+ ({ pricing_id: c }) => c
89
+ )
90
+ );
91
+ return i.size === 0 ? [] : (((o = (s = e.pricing_plan_version) == null ? void 0 : s.pricing_categories) == null ? void 0 : o.flatMap(
92
+ (c) => c.pricing_groups ?? []
93
+ )) ?? []).flatMap(
94
+ (c) => (c.pricings ?? []).filter((r) => i.has(r.id)).map((r) => ({
95
+ pricingId: r.id,
96
+ pricingGroupId: c.id,
97
+ groupName: c.name,
98
+ // A pricing without a name of its own is only identifiable by the choice it belongs to.
99
+ name: ve(r) || c.name,
100
+ ...Fe(r)
101
+ }))
102
+ );
103
+ }
104
+ const je = { class: "sv-enabled-pricings-list__item-body flex items-center gap-4" }, Ve = { class: "sv-enabled-pricings-list__item-content grow" }, We = /* @__PURE__ */ T({
105
+ __name: "EnabledPricingsListItem",
106
+ props: {
107
+ entry: { type: Object }
108
+ },
109
+ emits: ["upgrade"],
110
+ setup(e) {
111
+ const i = e, { $t: t } = B(), n = m(() => {
112
+ const { amount: s, billingPeriod: o } = i.entry;
113
+ if (s)
114
+ return o ? t(
115
+ {
116
+ defaultMessage: "{amount} per {period}",
117
+ id: "enabled_pricings_list.item.price",
118
+ description: 'The recurring price of an enabled pricing, e.g. "€ 100,00 per month"'
119
+ },
120
+ {
121
+ amount: X(s),
122
+ period: _e(o, {
123
+ short: !0,
124
+ hideValueForExactPeriods: !0
125
+ })
126
+ }
127
+ ) : X(s);
128
+ });
129
+ return (s, o) => (u(), f(a(R), { class: "sv-enabled-pricings-list__item" }, {
130
+ default: p(() => [
131
+ j("div", je, [
132
+ j("div", Ve, [
133
+ _(a($), {
134
+ tag: "span",
135
+ variant: "body-xs",
136
+ color: "subtle",
137
+ class: "sv-enabled-pricings-list__item-group"
138
+ }, {
139
+ default: p(() => [
140
+ w(S(e.entry.groupName), 1)
141
+ ]),
142
+ _: 1
143
+ }),
144
+ _(a($), {
145
+ tag: "h3",
146
+ variant: "heading-3",
147
+ "no-spacing": "",
148
+ class: "sv-enabled-pricings-list__item-name"
149
+ }, {
150
+ default: p(() => [
151
+ w(S(e.entry.name), 1)
152
+ ]),
153
+ _: 1
154
+ }),
155
+ n.value ? (u(), f(a($), {
156
+ key: 0,
157
+ tag: "span",
158
+ variant: "body-sm",
159
+ color: "subtle",
160
+ class: "sv-enabled-pricings-list__item-price"
161
+ }, {
162
+ default: p(() => [
163
+ w(S(n.value), 1)
164
+ ]),
165
+ _: 1
166
+ })) : y("", !0)
167
+ ]),
168
+ _(a(Y), {
169
+ intent: "secondary",
170
+ class: "sv-action sv-action--secondary sv-enabled-pricings-list__item-upgrade shrink-0",
171
+ type: "button",
172
+ size: "xs",
173
+ onClick: o[0] || (o[0] = (c) => s.$emit("upgrade", e.entry))
174
+ }, {
175
+ default: p(() => [
176
+ w(S(a(t)({
177
+ defaultMessage: "Upgrade",
178
+ id: "enabled_pricings_list.item.upgrade_button.label",
179
+ description: "Label for the button that changes which pricing is enabled for a group"
180
+ })), 1)
181
+ ]),
182
+ _: 1
183
+ })
184
+ ])
185
+ ]),
186
+ _: 1
187
+ }));
188
+ }
189
+ }), Ye = { class: "sv-enabled-pricings-list__items grid grid-cols-1 gap-2" }, ze = /* @__PURE__ */ T({
190
+ __name: "EnabledPricingsList",
191
+ props: {
192
+ pricingPlanSchedule: { type: Object }
193
+ },
194
+ emits: ["upgrade"],
195
+ setup(e) {
196
+ const i = e, { $t: t } = B(), n = m(() => Re(i.pricingPlanSchedule));
197
+ return (s, o) => n.value.length > 0 ? (u(), f(a(R), {
198
+ key: 0,
199
+ class: "sv-enabled-pricings-list",
200
+ "content-background": "none",
201
+ "no-border": "",
202
+ "no-spacing": "",
203
+ title: a(t)({
204
+ defaultMessage: "Upgrades",
205
+ id: "enabled_pricings_list.title",
206
+ description: "Title for the block listing the pricings enabled on a subscription"
207
+ })
208
+ }, {
209
+ default: p(() => [
210
+ j("div", Ye, [
211
+ (u(!0), F(Z, null, J(n.value, (c) => (u(), f(We, {
212
+ key: c.pricingId,
213
+ entry: c,
214
+ onUpgrade: o[0] || (o[0] = (r) => s.$emit("upgrade", r))
215
+ }, null, 8, ["entry"]))), 128))
216
+ ])
217
+ ]),
218
+ _: 1
219
+ }, 8, ["title"])) : y("", !0);
220
+ }
221
+ }), Xe = { class: "sv-on-demand-items-card__items grid grid-cols-1 gap-1" }, Ge = {
222
+ key: 0,
223
+ class: "sv-on-demand-items-card__more"
224
+ }, H = 2, qe = /* @__PURE__ */ T({
225
+ __name: "OnDemandItemsCard",
226
+ props: {
227
+ items: { type: Array }
228
+ },
229
+ emits: ["order"],
230
+ setup(e) {
231
+ const i = e, { $t: t } = B(), { getPriceLabel: n } = Ne(), s = m(
232
+ () => i.items.slice(0, H).map((c) => ({
233
+ item: c,
234
+ priceLabel: n(c)
235
+ }))
236
+ ), o = m(() => Math.max(i.items.length - H, 0));
237
+ return (c, r) => (u(), f(a(R), {
238
+ class: "sv-on-demand-items-card",
239
+ "content-background": "none",
240
+ "no-border": "",
241
+ "no-spacing": "",
242
+ title: a(t)({
243
+ defaultMessage: "Available on demand items",
244
+ id: "on_demand_items_card.title",
245
+ description: "Title for the block that offers the on-demand items of a subscription"
246
+ })
247
+ }, {
248
+ right: p(() => [
249
+ _(a(Y), {
250
+ class: "sv-action sv-action--secondary sv-on-demand-items-card__order",
251
+ type: "button",
252
+ size: "sm",
253
+ intent: "secondary",
254
+ onClick: r[0] || (r[0] = (h) => c.$emit("order"))
255
+ }, {
256
+ default: p(() => [
257
+ w(S(a(t)({
258
+ defaultMessage: "Purchase",
259
+ id: "on_demand_items_card.order_button.label",
260
+ description: "Label for the button that opens the on-demand order form"
261
+ })), 1)
262
+ ]),
263
+ _: 1
264
+ })
265
+ ]),
266
+ default: p(() => [
267
+ j("ul", Xe, [
268
+ (u(!0), F(Z, null, J(s.value, ({ item: h, priceLabel: l }) => (u(), F("li", {
269
+ key: h.pricingItemId,
270
+ class: "sv-on-demand-items-card__item"
271
+ }, [
272
+ _(a(R), {
273
+ "no-spacing": "",
274
+ "content-classes": "flex flex-col px-4 py-3"
275
+ }, {
276
+ default: p(() => [
277
+ _(a($), {
278
+ tag: "span",
279
+ weight: "semibold",
280
+ "no-spacing": "",
281
+ class: "sv-on-demand-items-card__item-name break-words"
282
+ }, {
283
+ default: p(() => [
284
+ w(S(h.name), 1)
285
+ ]),
286
+ _: 2
287
+ }, 1024),
288
+ l ? (u(), f(a($), {
289
+ key: 0,
290
+ tag: "span",
291
+ variant: "body-sm",
292
+ color: "subtle",
293
+ "no-spacing": "",
294
+ class: "sv-on-demand-items-card__item-price"
295
+ }, {
296
+ default: p(() => [
297
+ w(S(l), 1)
298
+ ]),
299
+ _: 2
300
+ }, 1024)) : y("", !0)
301
+ ]),
302
+ _: 2
303
+ }, 1024)
304
+ ]))), 128)),
305
+ o.value > 0 ? (u(), F("li", Ge, [
306
+ _(a(R), {
307
+ "no-spacing": "",
308
+ "content-classes": "px-4 py-3 text-center"
309
+ }, {
310
+ default: p(() => [
311
+ _(a($), {
312
+ tag: "span",
313
+ weight: "semibold",
314
+ color: "secondary",
315
+ "no-spacing": ""
316
+ }, {
317
+ default: p(() => [
318
+ w(S(a(t)(
319
+ {
320
+ defaultMessage: "+ {count} available",
321
+ id: "on_demand_items_card.more_available",
322
+ description: "Shown below the first on-demand items with the number of items not listed"
323
+ },
324
+ { count: String(o.value) }
325
+ )), 1)
326
+ ]),
327
+ _: 1
328
+ })
329
+ ]),
330
+ _: 1
331
+ })
332
+ ])) : y("", !0)
333
+ ])
334
+ ]),
335
+ _: 1
336
+ }, 8, ["title"]));
337
+ }
338
+ });
339
+ function He({
340
+ variant: e,
341
+ renewableUntil: i,
342
+ billingPeriodEndsAt: t
343
+ }) {
344
+ const { $t: n } = B(), s = m(() => e.value === "RENEW"), o = m(
345
+ () => s.value ? n({
346
+ defaultMessage: "Renew subscription",
347
+ description: "Title of the renew subscription confirmation modal",
348
+ id: "subscription_cancellation_modal.renew.title"
349
+ }) : n({
350
+ defaultMessage: "Cancel subscription",
351
+ description: "Title of the cancel subscription confirmation modal",
352
+ id: "subscription_cancellation_modal.cancel.title"
353
+ })
354
+ ), c = m(() => s.value ? i.value ? n(
355
+ {
356
+ defaultMessage: "You can renew your subscription until {date}. After this period you can only create a new subscription.",
357
+ description: "Explanation of the deadline for undoing a cancellation, shown in the renew subscription modal",
358
+ id: "subscription_cancellation_modal.renew.explanation_with_date"
359
+ },
360
+ { date: i.value }
361
+ ) : n({
362
+ defaultMessage: "Your subscription will continue as before, and billing will resume on its usual schedule.",
363
+ description: "Explanation of what happens when a cancellation is undone, shown in the renew subscription modal when no end date is known",
364
+ id: "subscription_cancellation_modal.renew.explanation"
365
+ }) : t.value ? n(
366
+ {
367
+ defaultMessage: "Your subscription will be canceled, but you’ll continue to have access until {date}.",
368
+ description: "Explanation of what happens when a running subscription is cancelled, naming the date access ends, shown in the cancel subscription modal",
369
+ id: "subscription_cancellation_modal.cancel.explanation_with_date"
370
+ },
371
+ { date: t.value }
372
+ ) : n({
373
+ defaultMessage: "Your subscription will be canceled, but you’ll continue to have access until the end of the billing period.",
374
+ description: "Explanation of what happens when a running subscription is cancelled, shown in the cancel subscription modal",
375
+ id: "subscription_cancellation_modal.cancel.explanation"
376
+ })), r = m(
377
+ () => s.value ? n({
378
+ defaultMessage: "Renew subscription",
379
+ description: "Label of the confirm button in the renew subscription modal",
380
+ id: "subscription_cancellation_modal.renew.confirm_button.label"
381
+ }) : n({
382
+ defaultMessage: "Cancel subscription",
383
+ description: "Label of the confirm button in the cancel subscription modal",
384
+ id: "subscription_cancellation_modal.cancel.confirm_button.label"
385
+ })
386
+ ), h = m(
387
+ () => n({
388
+ defaultMessage: "Cancel",
389
+ description: "Label of the button that dismisses the cancellation modal",
390
+ id: "subscription_cancellation_modal.cancel_button.label"
391
+ })
392
+ ), l = m(
393
+ () => s.value ? n({
394
+ defaultMessage: "We could not renew your subscription. Please try again.",
395
+ description: "Error shown when undoing a cancellation fails",
396
+ id: "subscription_cancellation_modal.renew.error"
397
+ }) : n({
398
+ defaultMessage: "We could not cancel your subscription. Please try again.",
399
+ description: "Error shown when cancelling a subscription fails",
400
+ id: "subscription_cancellation_modal.cancel.error"
401
+ })
402
+ );
403
+ return { title: o, explanation: c, confirmButtonText: r, cancelButtonText: h, errorMessage: l };
404
+ }
405
+ const Ze = 50;
406
+ function Je() {
407
+ const { getPaymentMethods: e } = Pe(), i = ae();
408
+ return { paymentMethod: i, get: async ({
409
+ customerId: n,
410
+ paymentMethodId: s
411
+ }) => {
412
+ const o = await Me(async (c) => {
413
+ const r = await e({
414
+ customerId: n,
415
+ pagination: { page: c, pageSize: Ze }
416
+ });
417
+ if (!Ie(r))
418
+ throw new Error("Could not load the customer’s payment methods.");
419
+ return r;
420
+ });
421
+ return i.value = o.data.find(({ id: c }) => c === s), i.value;
422
+ } };
423
+ }
424
+ const Ke = { class: "sv-subscription-cancellation-modal sv-subscription-cancellation-modal__body flex flex-col gap-3" }, Qe = {
425
+ key: 0,
426
+ class: "sv-subscription-cancellation-modal__meta flex flex-wrap items-center gap-x-6 gap-y-2 px-3 pb-2"
427
+ }, et = {
428
+ key: 0,
429
+ class: "sv-subscription-cancellation-modal__renews flex gap-1"
430
+ }, tt = /* @__PURE__ */ T({
431
+ __name: "SubscriptionCancellationModal",
432
+ props: {
433
+ showModal: { type: Boolean },
434
+ variant: { type: null },
435
+ subscription: { type: Object },
436
+ avatar: { type: String }
437
+ },
438
+ emits: ["confirmed", "close"],
439
+ setup(e, { emit: i }) {
440
+ const t = e, n = i, { $t: s, formatDate: o } = B(), c = Q(), { setSubscriptionCancellation: r } = Se(), h = m(() => t.variant), l = m(() => {
441
+ var d;
442
+ const b = ((d = t.subscription) == null ? void 0 : d.inactive_periods) ?? [], g = b.find(({ type: M }) => M === "CANCEL") ?? b[0];
443
+ if (g)
444
+ return o({
445
+ date: g.start_at,
446
+ format: "date",
447
+ offsetType: "local"
448
+ });
449
+ }), v = m(() => {
450
+ var g, d;
451
+ const b = (d = (g = t.subscription) == null ? void 0 : g.next_invoice) == null ? void 0 : d.invoice_date;
452
+ if (b)
453
+ return o({
454
+ date: b,
455
+ format: "date",
456
+ offsetType: "local"
457
+ });
458
+ }), P = v, L = m(
459
+ () => {
460
+ var b, g;
461
+ return (((g = (b = te(t.subscription)) == null ? void 0 : b.pricing_plan_schedule) == null ? void 0 : g.enabled_pricings) ?? []).map(({ pricing_id: d }) => d).filter((d) => !!d);
462
+ }
463
+ ), { title: E, explanation: k, confirmButtonText: I, cancelButtonText: O, errorMessage: x } = He({ variant: h, renewableUntil: l, billingPeriodEndsAt: v }), { paymentMethod: A, get: N } = Je();
464
+ W(
465
+ [
466
+ () => t.showModal,
467
+ () => {
468
+ var b;
469
+ return (b = t.subscription) == null ? void 0 : b.payment_method_id;
470
+ },
471
+ () => {
472
+ var b;
473
+ return (b = t.subscription) == null ? void 0 : b.customer_id;
474
+ }
475
+ ],
476
+ ([b, g, d]) => {
477
+ var M;
478
+ !b || !g || !d || g !== ((M = A.value) == null ? void 0 : M.id) && N({ customerId: d, paymentMethodId: g }).catch(() => {
479
+ });
480
+ },
481
+ { immediate: !0 }
482
+ );
483
+ const C = U(!1), D = U(!1);
484
+ W(
485
+ () => t.showModal,
486
+ (b) => {
487
+ b && (D.value = !1);
488
+ }
489
+ );
490
+ const V = async () => {
491
+ if (!(!t.subscription || !t.variant || C.value)) {
492
+ C.value = !0, D.value = !1;
493
+ try {
494
+ await r({
495
+ id: t.subscription.id,
496
+ variant: t.variant
497
+ }), n("confirmed"), n("close");
498
+ } catch (b) {
499
+ c.error(
500
+ "SUBSCRIPTION_CANCELLATION_FAILED",
501
+ "Failed to change the cancellation state of a subscription",
502
+ { variant: t.variant },
503
+ b
504
+ ), D.value = !0;
505
+ } finally {
506
+ C.value = !1;
507
+ }
508
+ }
509
+ }, z = () => {
510
+ C.value || n("close");
511
+ };
512
+ return (b, g) => (u(), f(a(we), {
513
+ size: "md",
514
+ "show-modal": e.showModal,
515
+ title: a(E),
516
+ "confirm-button-text": a(I),
517
+ "cancel-button-text": a(O),
518
+ "is-loading": C.value,
519
+ "no-click-away": C.value,
520
+ "no-backdrop-close": C.value,
521
+ onConfirm: V,
522
+ onClose: z
523
+ }, {
524
+ body: p(() => [
525
+ j("div", Ke, [
526
+ _(a($), {
527
+ variant: "body-sm",
528
+ color: "subtle",
529
+ tag: "p",
530
+ class: "sv-subscription-cancellation-modal__explanation"
531
+ }, {
532
+ default: p(() => [
533
+ w(S(a(k)), 1)
534
+ ]),
535
+ _: 1
536
+ }),
537
+ e.subscription ? (u(), f(a(R), {
538
+ key: 0,
539
+ "no-spacing": "",
540
+ class: "sv-subscription-cancellation-modal__subscription"
541
+ }, {
542
+ default: p(() => [
543
+ _(Ce, {
544
+ subscription: e.subscription,
545
+ avatar: e.avatar,
546
+ "enabled-pricing-ids": L.value
547
+ }, null, 8, ["subscription", "avatar", "enabled-pricing-ids"]),
548
+ a(P) || a(A) ? (u(), F("div", Qe, [
549
+ a(P) ? (u(), F("div", et, [
550
+ _(a($), {
551
+ tag: "span",
552
+ variant: "body-xs",
553
+ color: "secondary",
554
+ weight: "semibold"
555
+ }, {
556
+ default: p(() => [
557
+ w(S(a(s)({
558
+ defaultMessage: "Renews",
559
+ description: "Label before the date the subscription renews, shown in the cancel subscription modal",
560
+ id: "subscription_cancellation_modal.renews_label"
561
+ })), 1)
562
+ ]),
563
+ _: 1
564
+ }),
565
+ _(a($), {
566
+ tag: "span",
567
+ variant: "body-xs",
568
+ color: "secondary"
569
+ }, {
570
+ default: p(() => [
571
+ w(S(a(P)), 1)
572
+ ]),
573
+ _: 1
574
+ })
575
+ ])) : y("", !0),
576
+ a(A) ? (u(), f(a(ye), {
577
+ key: 1,
578
+ variant: "condensed",
579
+ class: "sv-subscription-cancellation-modal__payment-method",
580
+ "payment-method": a(A)
581
+ }, null, 8, ["payment-method"])) : y("", !0)
582
+ ])) : y("", !0)
583
+ ]),
584
+ _: 1
585
+ })) : y("", !0),
586
+ D.value ? (u(), f(a(K), {
587
+ key: 1,
588
+ class: "sv-subscription-cancellation-modal__error sv-error",
589
+ title: a(x)
590
+ }, null, 8, ["title"])) : y("", !0)
591
+ ])
592
+ ]),
593
+ _: 1
594
+ }, 8, ["show-modal", "title", "confirm-button-text", "cancel-button-text", "is-loading", "no-click-away", "no-backdrop-close"]));
595
+ }
596
+ }), nt = { class: "sv-subscription-details__header flex flex-col gap-2 md:flex-row md:items-center" }, at = /* @__PURE__ */ T({
597
+ __name: "SubscriptionDetails",
598
+ props: {
599
+ subscription: { type: Object },
600
+ schedulesData: { type: Array },
601
+ customer: { type: Object },
602
+ paymentMethods: { type: Array },
603
+ walletBalances: { default: () => [], type: Array },
604
+ onDemandItems: { default: () => [], type: Array },
605
+ onDemandScheduleId: { type: String },
606
+ hasWalletBalancesError: { type: Boolean },
607
+ avatar: { type: String },
608
+ canViewCreatedInvoice: { type: Boolean },
609
+ isLoading: { type: Boolean },
610
+ error: { type: null }
611
+ },
612
+ emits: ["top-up-charged", "auto-top-up-saved", "auto-top-up-cancelled", "payment-method-stored", "subscription-changed", "invoice-created"],
613
+ setup(e, { emit: i }) {
614
+ const t = G(
615
+ () => import("./SubscriptionSchedules-DrrEAPlx.mjs")
616
+ ), n = G(
617
+ () => import("./ChargeOnDemandModal-CIiI74ls.mjs")
618
+ ), s = e, o = i, { dispatchAction: c } = ee(), { $t: r } = B(), {
619
+ isCancellable: h,
620
+ isRenewable: l,
621
+ pendingVariant: v,
622
+ cancel: P,
623
+ renew: L,
624
+ dismiss: E,
625
+ manage: k
626
+ } = Ue({ subscription: ie(s, "subscription") }), I = U();
627
+ W(v, (g) => {
628
+ g && (I.value = void 0);
629
+ });
630
+ const O = () => {
631
+ I.value = v.value, o("subscription-changed");
632
+ }, x = m(() => {
633
+ if (I.value)
634
+ return I.value === "RENEW" ? r({
635
+ defaultMessage: "Your subscription has been renewed.",
636
+ id: "subscription_details.renew_success",
637
+ description: "Confirmation shown after a cancellation has been undone"
638
+ }) : r({
639
+ defaultMessage: "Your subscription has been cancelled. You keep access until the end of the billing period.",
640
+ id: "subscription_details.cancel_success",
641
+ description: "Confirmation shown after a subscription has been cancelled"
642
+ });
643
+ }), A = m(() => te(s.subscription)), N = m(
644
+ () => (s.paymentMethods ?? []).find(({ id: g }) => {
645
+ var d;
646
+ return g === ((d = s.subscription) == null ? void 0 : d.payment_method_id);
647
+ })
648
+ ), C = m(() => s.subscription ? [s.subscription] : []), D = U(!1), V = U(!1), z = () => {
649
+ V.value = !0, D.value = !0;
650
+ }, b = m(
651
+ () => pe({
652
+ subscription: s.subscription,
653
+ fallback: r({
654
+ defaultMessage: "Subscription details",
655
+ id: "subscription_details.title",
656
+ description: "Title for the subscription details page"
657
+ })
658
+ })
659
+ );
660
+ return (g, d) => (u(), f(a(ue), { class: "sv-subscription-details sv-root sv-screen" }, {
661
+ header: p(() => [
662
+ j("div", nt, [
663
+ _(a($), {
664
+ variant: "heading-2",
665
+ tag: "h1",
666
+ class: "sv-subscription-details__title grow"
667
+ }, {
668
+ default: p(() => [
669
+ w(S(b.value), 1)
670
+ ]),
671
+ _: 1
672
+ }),
673
+ a(l) ? (u(), f(a(Y), {
674
+ key: 0,
675
+ intent: "secondary",
676
+ class: "sv-action sv-action--secondary sv-subscription-details__renew w-full md:w-auto",
677
+ type: "button",
678
+ onClick: a(L)
679
+ }, {
680
+ default: p(() => [
681
+ w(S(a(r)({
682
+ defaultMessage: "Renew subscription",
683
+ id: "subscription_details.renew_button.label",
684
+ description: "Label for the renew subscription button on the subscription details page"
685
+ })), 1)
686
+ ]),
687
+ _: 1
688
+ }, 8, ["onClick"])) : y("", !0),
689
+ a(h) ? (u(), f(a(Y), {
690
+ key: 1,
691
+ intent: "secondary",
692
+ class: "sv-action sv-action--secondary sv-subscription-details__cancel w-full md:w-auto",
693
+ type: "button",
694
+ onClick: a(P)
695
+ }, {
696
+ default: p(() => [
697
+ w(S(a(r)({
698
+ defaultMessage: "Cancel subscription",
699
+ id: "subscription_details.cancel_button.label",
700
+ description: "Label for the cancel subscription button on the subscription details page"
701
+ })), 1)
702
+ ]),
703
+ _: 1
704
+ }, 8, ["onClick"])) : y("", !0)
705
+ ])
706
+ ]),
707
+ content: p(() => [
708
+ x.value ? (u(), f(a(ce), {
709
+ key: 0,
710
+ class: "sv-subscription-details__cancellation-success",
711
+ type: "success",
712
+ title: x.value
713
+ }, null, 8, ["title"])) : y("", !0),
714
+ e.error ? (u(), f(a(K), {
715
+ key: 1,
716
+ class: "sv-subscription-details__error sv-error",
717
+ title: a(r)({
718
+ defaultMessage: "Unable to load this subscription. Please try again later.",
719
+ id: "subscription_details.load_error",
720
+ description: "Error message shown when the subscription cannot be loaded on the subscription details page"
721
+ })
722
+ }, null, 8, ["title"])) : e.isLoading ? (u(), f(he, {
723
+ key: 2,
724
+ variant: "section",
725
+ class: "min-h-[220px]"
726
+ })) : e.subscription ? (u(), f(a(t), {
727
+ key: 3,
728
+ class: "sv-subscription-details__schedules",
729
+ "schedules-data": e.schedulesData ?? [],
730
+ configuration: { subscriptionId: e.subscription.id },
731
+ "is-loading": e.isLoading
732
+ }, null, 8, ["schedules-data", "configuration", "is-loading"])) : (u(), f(fe, {
733
+ key: 4,
734
+ class: "sv-subscription-details__empty-state",
735
+ icon: "receipt_long"
736
+ }, {
737
+ title: p(() => [
738
+ w(S(a(r)({
739
+ defaultMessage: "Subscription not found",
740
+ id: "subscription_details.empty_state.title",
741
+ description: "Title shown when the requested subscription does not exist"
742
+ })), 1)
743
+ ]),
744
+ message: p(() => [
745
+ w(S(a(r)({
746
+ defaultMessage: "This subscription is no longer available.",
747
+ id: "subscription_details.empty_state.message",
748
+ description: "Message shown when the requested subscription does not exist"
749
+ })), 1)
750
+ ]),
751
+ _: 1
752
+ }))
753
+ ]),
754
+ aside: p(() => [
755
+ _(me, {
756
+ class: "sv-subscription-details__wallet-balances",
757
+ "has-error": !!e.hasWalletBalancesError,
758
+ "is-loading": e.isLoading,
759
+ "wallet-balances": e.walletBalances,
760
+ "show-top-up-button": "",
761
+ customer: e.customer,
762
+ "payment-methods": e.paymentMethods,
763
+ subscriptions: C.value,
764
+ onTopUpCharged: d[0] || (d[0] = (M) => g.$emit("top-up-charged")),
765
+ onAutoTopUpSaved: d[1] || (d[1] = (M) => g.$emit("auto-top-up-saved")),
766
+ onAutoTopUpCancelled: d[2] || (d[2] = (M) => g.$emit("auto-top-up-cancelled")),
767
+ onPaymentMethodStored: d[3] || (d[3] = (M) => g.$emit("payment-method-stored"))
768
+ }, null, 8, ["has-error", "is-loading", "wallet-balances", "customer", "payment-methods", "subscriptions"]),
769
+ !e.isLoading && e.onDemandItems.length > 0 ? (u(), f(qe, {
770
+ key: 0,
771
+ items: e.onDemandItems,
772
+ class: "sv-subscription-details__on-demand-items",
773
+ onOrder: z
774
+ }, null, 8, ["items"])) : y("", !0),
775
+ A.value ? (u(), f(ze, {
776
+ key: 1,
777
+ class: "sv-subscription-details__upgrades",
778
+ "pricing-plan-schedule": A.value,
779
+ onUpgrade: a(k)
780
+ }, null, 8, ["pricing-plan-schedule", "onUpgrade"])) : y("", !0),
781
+ N.value ? (u(), f(be, {
782
+ key: 2,
783
+ class: "sv-subscription-details__payment-method",
784
+ "is-loading": e.isLoading,
785
+ "payment-methods": [N.value],
786
+ configuration: { showViewAllButton: !1, showAddButton: !1 }
787
+ }, null, 8, ["is-loading", "payment-methods"])) : y("", !0),
788
+ V.value && e.subscription && e.onDemandScheduleId ? (u(), f(a(n), {
789
+ key: 3,
790
+ "show-modal": D.value,
791
+ subscription: e.subscription,
792
+ "schedule-id": e.onDemandScheduleId,
793
+ items: e.onDemandItems,
794
+ customer: e.customer,
795
+ "payment-methods": e.paymentMethods,
796
+ "can-view-created-invoice": e.canViewCreatedInvoice,
797
+ onClose: d[4] || (d[4] = (M) => D.value = !1),
798
+ onPaymentMethodStored: d[5] || (d[5] = (M) => g.$emit("payment-method-stored")),
799
+ onInvoiceCreated: d[6] || (d[6] = (M) => g.$emit("invoice-created", M)),
800
+ onViewInvoice: d[7] || (d[7] = (M) => a(c)({ action: "view-invoice", data: { invoiceId: M } }))
801
+ }, null, 8, ["show-modal", "subscription", "schedule-id", "items", "customer", "payment-methods", "can-view-created-invoice"])) : y("", !0),
802
+ _(tt, {
803
+ "show-modal": !!a(v),
804
+ variant: a(v),
805
+ subscription: e.subscription,
806
+ avatar: e.avatar,
807
+ onConfirmed: O,
808
+ onClose: a(E)
809
+ }, null, 8, ["show-modal", "variant", "subscription", "avatar", "onClose"])
810
+ ]),
811
+ _: 1
812
+ }));
813
+ }
814
+ }), it = ["FIXED", "FLAT"], st = (e, i) => {
815
+ var n;
816
+ const t = (n = e.details.bands) == null ? void 0 : n[0];
817
+ return i === "FIXED" ? t == null ? void 0 : t.fixed_amount : t == null ? void 0 : t.amount;
818
+ }, ot = (e) => typeof e == "number" && Number.isInteger(e) && e >= 1, rt = (e) => {
819
+ var t;
820
+ const i = Number((t = e.default_units) == null ? void 0 : t.number);
821
+ return ot(i) ? i : 1;
822
+ }, ct = (e) => {
823
+ const i = e.flatMap(ne);
824
+ return {
825
+ productItems: new Map(
826
+ i.flatMap((t) => t.items ?? []).flatMap((t) => t.product_items ?? []).map(({ id: t, name: n }) => [t, n])
827
+ ),
828
+ products: new Map(
829
+ i.flatMap((t) => t.products ?? []).map(({ id: t, name: n }) => [t, n])
830
+ )
831
+ };
832
+ }, lt = (e, i, t) => q(i.product_item_ids.map((n) => t.productItems.get(n))) || e.name || q(e.product_ids.map((n) => t.products.get(n))) || "", dt = (e, i, t) => {
833
+ var o, c;
834
+ const n = (o = i.configs) == null ? void 0 : o.find((r) => r.on_demand);
835
+ if (!n || (c = n.wallet_grants) != null && c.length || !Te(n, it))
836
+ return;
837
+ const s = n.details.pricing_type === "FIXED" ? "FIXED" : "FLAT";
838
+ return {
839
+ pricingItemId: i.id,
840
+ pricingItemConfigId: n.id,
841
+ name: lt(e, i, t),
842
+ priceType: s,
843
+ price: st(n, s),
844
+ defaultUnits: rt(n)
845
+ };
846
+ }, ut = (e, {
847
+ pricingPlanVersions: i = []
848
+ } = {}) => {
849
+ const t = ct(i);
850
+ return ne(e).flatMap(
851
+ (n) => (n.items ?? []).flatMap(
852
+ (s) => dt(n, s, t) ?? []
853
+ )
854
+ );
855
+ }, Zt = (e, i) => {
856
+ const t = new Set(
857
+ (i.payment_acceptors ?? []).flatMap(
858
+ (n) => {
859
+ var s;
860
+ return ((s = n.payment_gateway) == null ? void 0 : s.integration_id) ?? [];
861
+ }
862
+ )
863
+ );
864
+ return e.filter(
865
+ (n) => n.status === "ACTIVE" && !!n.integration_id && t.has(n.integration_id)
866
+ ).sort(
867
+ (n, s) => +(s.id === i.payment_method_id) - +(n.id === i.payment_method_id)
868
+ );
869
+ }, Jt = (e, i) => e.flatMap(({ pricingItemId: t, units: n }) => {
870
+ const s = i.find((o) => o.pricingItemId === t);
871
+ return s ? s.priceType === "FLAT" && n !== void 0 ? [{ pricing_item_id: t, units: { number: String(n) } }] : [{ pricing_item_id: t }] : [];
872
+ });
873
+ function pt({
874
+ subscription: e
875
+ }) {
876
+ const { getOnDemandPricingItems: i } = Le(), t = Q(), { data: n, execute: s, error: o } = ke({ service: i }), c = m(
877
+ () => {
878
+ var l;
879
+ return ((l = e.value) == null ? void 0 : l.variant) === "DEFAULT" ? Oe(e.value.pricing_plan_schedule_infos) : void 0;
880
+ }
881
+ ), r = m(() => {
882
+ var l;
883
+ return (l = c.value) == null ? void 0 : l.id;
884
+ });
885
+ return W(
886
+ r,
887
+ (l) => {
888
+ l && s({ scheduleId: l }).catch(
889
+ () => t.error(
890
+ "ON_DEMAND_ITEMS_LOAD_FAILED",
891
+ "Failed to load the on-demand items of the subscription",
892
+ { scheduleId: l },
893
+ o.value
894
+ )
895
+ );
896
+ },
897
+ { immediate: !0 }
898
+ ), { items: m(
899
+ () => {
900
+ var l, v;
901
+ return r.value && ((l = n.value) == null ? void 0 : l.pricing_plan_schedule_id) === r.value ? ut(n.value, {
902
+ pricingPlanVersions: (v = e.value) == null ? void 0 : v.pricing_plan_schedule_infos.map(
903
+ (P) => P.pricing_plan_version
904
+ )
905
+ }) : [];
906
+ }
907
+ ), scheduleId: r };
908
+ }
909
+ const mt = /* @__PURE__ */ T({
910
+ __name: "SubscriptionDetails.entry.view",
911
+ props: {
912
+ configuration: { type: Object },
913
+ environment: { type: String },
914
+ locale: { type: String },
915
+ dateLocale: { type: String },
916
+ messages: { type: Object },
917
+ primaryColor: { type: String },
918
+ secondaryColor: { type: String },
919
+ isShadowRoot: { type: Boolean },
920
+ experimentalFeatures: { type: Array },
921
+ logLevel: { type: String },
922
+ onLog: { type: Function },
923
+ allowedPortalTypes: { type: Array },
924
+ portalObject: { type: Object },
925
+ cssOverrides: { type: [String, Array] },
926
+ branding: { type: Object }
927
+ },
928
+ setup(e) {
929
+ const i = e, t = i.portalObject.customer_id, {
930
+ subscription: n,
931
+ withPlanData: s,
932
+ get: o,
933
+ error: c
934
+ } = $e({ subscriptionId: i.configuration.subscriptionId }), { customer: r, get: h } = De({ customerId: t }), { items: l, fetchAll: v } = Ee({ customerId: t }), {
935
+ walletBalances: P,
936
+ apiStatus: L,
937
+ fetch: E
938
+ } = ge({ customerId: t }), { isLoading: k } = xe(
939
+ o(),
940
+ h.execute(),
941
+ v(),
942
+ E()
943
+ ), { items: I, scheduleId: O } = pt({
944
+ subscription: n
945
+ }), x = m(() => n.value ? s(n.value) : []), A = m(() => {
946
+ var C;
947
+ return ((C = P.value) == null ? void 0 : C.wallet_balances) ?? [];
948
+ }), N = m(() => L.value === Ae.Failed);
949
+ return (C, D) => se(C.$slots, "default", {
950
+ subscription: a(n),
951
+ schedulesData: x.value,
952
+ customer: a(r),
953
+ paymentMethods: a(l),
954
+ walletBalances: A.value,
955
+ onDemandItems: a(I),
956
+ onDemandScheduleId: a(O),
957
+ hasWalletBalancesError: N.value,
958
+ isLoading: a(k),
959
+ error: a(c),
960
+ refreshWalletBalances: a(E),
961
+ refreshPaymentMethods: a(v),
962
+ refreshSubscription: a(o)
963
+ });
964
+ }
965
+ });
966
+ function gt({
967
+ invoice: e,
968
+ configuration: i
969
+ }) {
970
+ var t;
971
+ (t = i.onInvoiceCreated) == null || t.call(i, {
972
+ invoiceId: e.id,
973
+ paymentStatus: e.payment_status
974
+ });
975
+ }
976
+ const bt = /* @__PURE__ */ T({
977
+ __name: "SubscriptionDetails.entry",
978
+ props: {
979
+ configuration: { type: Object },
980
+ environment: { type: String },
981
+ locale: { type: String },
982
+ dateLocale: { type: String },
983
+ messages: { type: Object },
984
+ primaryColor: { type: String },
985
+ secondaryColor: { type: String },
986
+ isShadowRoot: { type: Boolean },
987
+ experimentalFeatures: { type: Array },
988
+ logLevel: { type: String },
989
+ onLog: { type: Function },
990
+ allowedPortalTypes: { type: Array },
991
+ portalObject: { type: Object },
992
+ cssOverrides: { type: [String, Array] },
993
+ branding: { type: Object }
994
+ },
995
+ setup(e) {
996
+ const i = Be("subscription-details"), t = e;
997
+ return (n, s) => (u(), f(a(le), {
998
+ entry: n.$props,
999
+ "component-name": a(i),
1000
+ "allowed-portal-types": ["CUSTOMER"],
1001
+ onError: s[1] || (s[1] = (o) => n.$emit("error", o))
1002
+ }, {
1003
+ default: p(() => [
1004
+ _(mt, oe(re(n.$props)), {
1005
+ default: p(({
1006
+ subscription: o,
1007
+ schedulesData: c,
1008
+ customer: r,
1009
+ paymentMethods: h,
1010
+ walletBalances: l,
1011
+ onDemandItems: v,
1012
+ onDemandScheduleId: P,
1013
+ hasWalletBalancesError: L,
1014
+ isLoading: E,
1015
+ error: k,
1016
+ refreshWalletBalances: I,
1017
+ refreshPaymentMethods: O,
1018
+ refreshSubscription: x
1019
+ }) => [
1020
+ _(at, {
1021
+ subscription: o,
1022
+ "schedules-data": c,
1023
+ customer: r,
1024
+ avatar: e.configuration.avatar,
1025
+ "can-view-created-invoice": e.configuration.canViewCreatedInvoice,
1026
+ "payment-methods": h,
1027
+ "wallet-balances": l,
1028
+ "on-demand-items": v,
1029
+ "on-demand-schedule-id": P,
1030
+ "has-wallet-balances-error": L,
1031
+ "is-loading": E,
1032
+ error: k,
1033
+ onTopUpCharged: I,
1034
+ onAutoTopUpSaved: I,
1035
+ onAutoTopUpCancelled: I,
1036
+ onPaymentMethodStored: O,
1037
+ onSubscriptionChanged: x,
1038
+ onInvoiceCreated: s[0] || (s[0] = (A) => a(gt)({ invoice: A, configuration: t.configuration }))
1039
+ }, null, 8, ["subscription", "schedules-data", "customer", "avatar", "can-view-created-invoice", "payment-methods", "wallet-balances", "on-demand-items", "on-demand-schedule-id", "has-wallet-balances-error", "is-loading", "error", "onTopUpCharged", "onAutoTopUpSaved", "onAutoTopUpCancelled", "onPaymentMethodStored", "onSubscriptionChanged"])
1040
+ ]),
1041
+ _: 1
1042
+ }, 16)
1043
+ ]),
1044
+ _: 1
1045
+ }, 8, ["entry", "component-name"]));
1046
+ }
1047
+ }), { define: Kt } = de(
1048
+ bt,
1049
+ "subscription-details"
1050
+ );
1051
+ export {
1052
+ Kt as d,
1053
+ Zt as g,
1054
+ ot as i,
1055
+ Jt as t,
1056
+ Ne as u
1057
+ };