@solvimon/solvimon-web 0.1.0-alpha.21 → 0.1.0-alpha.23

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 (239) hide show
  1. package/README.md +3 -0
  2. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DJCMa2Lz.mjs → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-B70SyWOB.mjs} +6 -6
  3. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-B9WTpz0k.js → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-jXClPW91.js} +1 -1
  4. package/dist/Alert.vue.es-RyK53a2P.js +1 -0
  5. package/dist/Alert.vue.es-lIiAWf2S.mjs +146 -0
  6. package/dist/{Avatar.vue.es-ChcLSNaN.mjs → Avatar.vue.es-2E3laNRb.mjs} +1 -1
  7. package/dist/{Avatar.vue.es-CJw5z7Uu.js → Avatar.vue.es-DdJreyr_.js} +1 -1
  8. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-CTQ5RMtx.js → BillingInformation.vue_vue_type_script_setup_true_lang-ConpyC8n.js} +1 -1
  9. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DApMAncl.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-D5EoBLhj.mjs} +4 -4
  10. package/dist/{Button.vue.es-VQCd3V3C.mjs → Button.vue.es-BJEy-e9C.mjs} +1 -1
  11. package/dist/{Button.vue.es-BWl37nzm.js → Button.vue.es-CJNxYacb.js} +1 -1
  12. package/dist/Checkout.entry.ce-BfLlnQyb.js +1 -0
  13. package/dist/{Checkout.entry.ce-DRHqEFd7.mjs → Checkout.entry.ce-CQkrWscC.mjs} +1397 -1302
  14. package/dist/{Chip.vue.es-CXG8o1Qf.mjs → Chip.vue.es-DGbc4L_D.mjs} +2 -2
  15. package/dist/{Chip.vue.es-DUgjuRWm.js → Chip.vue.es-DLQ4QEPo.js} +1 -1
  16. package/dist/{ContextMenu.vue.es-BllxeDTt.js → ContextMenu.vue.es-Bd2kmeVq.js} +1 -1
  17. package/dist/{ContextMenu.vue.es-C6TKlSXs.mjs → ContextMenu.vue.es-DL1M7pcr.mjs} +4 -4
  18. package/dist/{CustomerBillingInformation.vue.es-CKQH_ds0.mjs → CustomerBillingInformation.vue.es-CE94ASC3.mjs} +2 -2
  19. package/dist/{CustomerBillingInformation.vue.es-CMCZ-lIM.js → CustomerBillingInformation.vue.es-hiFzB43w.js} +1 -1
  20. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-n097Xf1H.js → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BE21tqgW.js} +1 -1
  21. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BxwllXwU.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Bhih7rPR.mjs} +5 -5
  22. package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-CtaoLbrM.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-C5zc9n64.mjs} +486 -502
  23. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-D018AmFA.js +1 -0
  24. package/dist/{DividerText.vue.es-Bomiy4if.mjs → DividerText.vue.es-CFZUQ62L.mjs} +1 -1
  25. package/dist/{DividerText.vue.es-BBdydUy_.js → DividerText.vue.es-CvCgHHXN.js} +1 -1
  26. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C9elbdbF.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-YcaBJDzx.mjs} +4 -4
  27. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DXO9xpFT.js → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-jTJGN4jb.js} +1 -1
  28. package/dist/{ErrorNotification.vue.es-C6ngWAVU.mjs → ErrorNotification.vue.es-B3mvv79S.mjs} +2 -2
  29. package/dist/ErrorNotification.vue.es-DI2B7WiR.js +1 -0
  30. package/dist/IconButton.vue.es-Dp8h4YOx.js +1 -0
  31. package/dist/IconButton.vue.es-GLcGhoHC.mjs +56 -0
  32. package/dist/{IconTitle.vue.es-Bbusc4wK.mjs → IconTitle.vue.es-CzuPQtOX.mjs} +3 -3
  33. package/dist/{IconTitle.vue.es-D-q6w2E-.js → IconTitle.vue.es-DN9r6nfK.js} +1 -1
  34. package/dist/{Input.vue.es-AY1c0Rui.mjs → Input.vue.es-5Cq8a7oH.mjs} +2 -2
  35. package/dist/{Input.vue.es-BN95nPBw.js → Input.vue.es-DM81HeVv.js} +1 -1
  36. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-1WjSbPEP.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D75LSIL8.mjs} +2 -2
  37. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-qiBCPY8l.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-w8w52LcV.js} +1 -1
  38. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-DB5h39LA.js +1 -0
  39. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-D99nuBRE.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-dRLsZPNh.mjs} +3 -3
  40. package/dist/{InvoiceSummary.vue.es-Bs5c2Ovx.mjs → InvoiceSummary.vue.es-DbtqsTuP.mjs} +692 -705
  41. package/dist/InvoiceSummary.vue.es-Qy99kLZs.js +1 -0
  42. package/dist/{Modal.vue.es-Chi6_MH_.js → Modal.vue.es-DgLl6XBV.js} +1 -1
  43. package/dist/{Modal.vue.es-DSkC4eMv.mjs → Modal.vue.es-Z2DWAN2u.mjs} +5 -5
  44. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-DBm51C7c.js +1 -0
  45. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-DYuFPIqs.mjs +294 -0
  46. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-Db6jAkqD.js → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BNZ9-GW1.js} +1 -1
  47. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DVif_ME8.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CcdhYTB1.mjs} +3 -3
  48. package/dist/{PaymentHistoryBlock-budeR7ep.mjs → PaymentHistoryBlock-CjP_514k.mjs} +1 -1
  49. package/dist/{PaymentHistoryBlock-DGJ_PiVq.js → PaymentHistoryBlock-DS1j-8m-.js} +1 -1
  50. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Dv-3suBX.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CSTfMB8U.js} +1 -1
  51. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C28ofG7N.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Dr2jtJhK.mjs} +4 -4
  52. package/dist/{PaymentIntegrationForm-DqqGcEP1.js → PaymentIntegrationForm-80b19Lkq.js} +1 -1
  53. package/dist/{PaymentIntegrationForm-Crrhar96.mjs → PaymentIntegrationForm-CpOZUf-W.mjs} +1 -1
  54. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-C4bk0m8g.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BgztoQH5.mjs} +3 -3
  55. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CcEEdHQJ.js → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DKXhthkA.js} +1 -1
  56. package/dist/{PaymentIntegrationFormAdyen-DM-xMcm0.mjs → PaymentIntegrationFormAdyen-BQcgDcik.mjs} +281 -204
  57. package/dist/PaymentIntegrationFormAdyen-DElXsJ96.js +98 -0
  58. package/dist/PaymentIntegrationFormStripe-CMwLqOe6.js +102 -0
  59. package/dist/{PaymentIntegrationFormStripe-yBm4KnpV.mjs → PaymentIntegrationFormStripe-Dx1H3fZ2.mjs} +249 -178
  60. package/dist/{PaymentMethod.vue.es-BdMcKq8_.mjs → PaymentMethod.vue.es-EhRCfeax.mjs} +3 -3
  61. package/dist/{PaymentMethod.vue.es-Ctw9Es1g.js → PaymentMethod.vue.es-pLCCzVxN.js} +1 -1
  62. package/dist/{PaymentMethodForm-BQ5TVHlS.js → PaymentMethodForm-Bw2e1tXo.js} +1 -1
  63. package/dist/{PaymentMethodForm-C1bIGX10.mjs → PaymentMethodForm-D3OY8zK5.mjs} +1 -1
  64. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-V88bCeDt.js → PaymentMethodForm.vue_vue_type_script_setup_true_lang-DHXw6qD0.js} +1 -1
  65. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-5KKkuVt5.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-vGprVPpn.mjs} +5 -5
  66. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-B_207kq5.js → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CdT1YyeU.js} +1 -1
  67. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-CnmZ9dvP.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-D7b0HhDc.mjs} +6 -6
  68. package/dist/PlanCustomizationEditor-BQqkgmzL.mjs +877 -0
  69. package/dist/PlanCustomizationEditor-RC8kj2rC.js +1 -0
  70. package/dist/{PricingGroupRangeInput.vue.es-D82XvoC_.js → PricingGroupRangeInput.vue.es-ClkE98ML.js} +2 -2
  71. package/dist/{PricingGroupRangeInput.vue.es-Bnb-ARie.mjs → PricingGroupRangeInput.vue.es-DNsiUZyT.mjs} +4 -4
  72. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CxMkCmti.js → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-BJfQLRcS.js} +1 -1
  73. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-skQMgHEL.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CURXAgMT.mjs} +5 -5
  74. package/dist/RadioGroupExtended.vue.es-Dk9xdj76.js +1 -0
  75. package/dist/{RadioGroupExtended.vue.es-WDbo_yj1.mjs → RadioGroupExtended.vue.es-vUqn2ZUP.mjs} +3 -3
  76. package/dist/{Section.vue.es-By1JltGi.mjs → Section.vue.es-C2_topx4.mjs} +1 -1
  77. package/dist/{Section.vue.es-DuK52y67.js → Section.vue.es-Cybk1Nb8.js} +1 -1
  78. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-CS3KIkPL.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-C9q_qwjt.mjs} +6 -6
  79. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Ct3ZNq-j.js → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DIgVzXLg.js} +1 -1
  80. package/dist/{SubscriptionSchedules-DDCjVEbG.mjs → SubscriptionSchedules-BlCU_xc5.mjs} +1 -1
  81. package/dist/{SubscriptionSchedules-DEjIERyF.js → SubscriptionSchedules-CNTg_oRy.js} +1 -1
  82. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-6LbR_Vni.js +1 -0
  83. package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-JAedXFzq.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Cf3Dy8Yn.mjs} +1655 -1620
  84. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-D-Fa54M6.js → SubscriptionSummary.vue_vue_type_script_setup_true_lang-BijBAdqp.js} +1 -1
  85. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-DVMS4gJQ.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-CjzjchsS.mjs} +3 -3
  86. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BckZJtOc.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-CxdrAanb.mjs} +7 -7
  87. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DiXmEjUD.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-Dz4s3CH_.js} +1 -1
  88. package/dist/{TooltipParagraph.vue.es-DYu2ReL7.mjs → TooltipParagraph.vue.es-Fu9Od3Vr.mjs} +1 -1
  89. package/dist/{TooltipParagraph.vue.es-sTgWAgcd.js → TooltipParagraph.vue.es-OX6bAWP9.js} +1 -1
  90. package/dist/{TrialChip.vue.es-Cl-9_pdr.js → TrialChip.vue.es-CbjdkR4i.js} +1 -1
  91. package/dist/{TrialChip.vue.es-DX53r0ku.mjs → TrialChip.vue.es-c7tZOIW3.mjs} +2 -2
  92. package/dist/{cn.es-DjnGlmqV.mjs → cn.es-C8Ogac5T.mjs} +2 -2
  93. package/dist/{cn.es-CNvIP217.js → cn.es-lC4_Xd0R.js} +1 -1
  94. package/dist/components/BillingInformation/BillingInformation.cjs +1 -1
  95. package/dist/components/BillingInformation/BillingInformation.mjs +5 -5
  96. package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -1
  97. package/dist/components/BillingInformationForm/BillingInformationForm.mjs +7 -7
  98. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -1
  99. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +5 -5
  100. package/dist/components/Invoice/Invoice.cjs +1 -1
  101. package/dist/components/Invoice/Invoice.mjs +10 -10
  102. package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -1
  103. package/dist/components/InvoiceDetails/InvoiceDetails.mjs +4 -4
  104. package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -1
  105. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +8 -8
  106. package/dist/components/InvoicesList/InvoicesList.cjs +1 -1
  107. package/dist/components/InvoicesList/InvoicesList.mjs +4 -4
  108. package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -1
  109. package/dist/components/PaymentHistory/PaymentHistory.mjs +9 -9
  110. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -1
  111. package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +6 -6
  112. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -1
  113. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +5 -5
  114. package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -1
  115. package/dist/components/SubscriptionsList/SubscriptionsList.mjs +6 -6
  116. package/dist/components/WalletBalances/WalletBalances.cjs +1 -1
  117. package/dist/components/WalletBalances/WalletBalances.mjs +4 -4
  118. package/dist/core/index.cjs +1 -1
  119. package/dist/core/index.mjs +26 -23
  120. package/dist/{customElements-Bt8PbjIn.js → customElements-BYIdPSzQ.js} +43 -19
  121. package/dist/{customElements-Com2NiGU.mjs → customElements-Df6dGrN-.mjs} +603 -572
  122. package/dist/{customer-CKgMJEgv.mjs → customer-DmsKYpVi.mjs} +1 -1
  123. package/dist/{customer-Q4JGfVfq.js → customer-DoLHZuMG.js} +1 -1
  124. package/dist/{de-DE-DqLD4IX2.js → de-DE-BSlbAnPE.js} +1 -1
  125. package/dist/{de-DE-CVCmzlNH.mjs → de-DE-Bgm9bnmp.mjs} +21 -0
  126. package/dist/{de-DE-Ds_yJLS3.js → de-DE-CAL9Mji2.js} +1 -1
  127. package/dist/{de-DE-DBO5f-Eu.mjs → de-DE-DXsG-vXA.mjs} +13 -8
  128. package/dist/{en-US-CvFmmI_O.js → en-US-9xdcz3T5.js} +1 -1
  129. package/dist/{en-US-3UmnS23B.mjs → en-US-C939IZ5i.mjs} +13 -8
  130. package/dist/{en-US-DVR9O7b_.mjs → en-US-E86eRIxh.mjs} +21 -0
  131. package/dist/{en-US-C51ILrVv.js → en-US-_xe5H4TQ.js} +1 -1
  132. package/dist/index.cjs +1 -1
  133. package/dist/index.mjs +1 -1
  134. package/dist/{invoices-CV9iAUHf.mjs → invoices-CrO6p4Ms.mjs} +8 -5
  135. package/dist/invoices-mw87cNTS.js +1 -0
  136. package/dist/{it-IT-CxBRisRm.mjs → it-IT-BxpwB3oJ.mjs} +8 -3
  137. package/dist/it-IT-DT3rfjOY.js +1 -0
  138. package/dist/{it-IT-Dxw59eR_.js → it-IT-QFQ1Ajbb.js} +1 -1
  139. package/dist/{it-IT-CDMnnFKZ.mjs → it-IT-co1BfV5s.mjs} +23 -2
  140. package/dist/{nl-NL-Btbfd9p2.js → nl-NL-CJXJC1bx.js} +1 -1
  141. package/dist/nl-NL-DfkhOJKc.js +1 -0
  142. package/dist/{nl-NL-o3UvtSNg.mjs → nl-NL-Drv2E66B.mjs} +21 -0
  143. package/dist/{nl-NL-BWGkVweu.mjs → nl-NL-na2I4aiP.mjs} +8 -3
  144. package/dist/paymentFailure-Bh60UhxA.mjs +47 -0
  145. package/dist/paymentFailure-Cki8c5BX.js +1 -0
  146. package/dist/{paymentMethods-BuwoJ1y9.mjs → paymentMethods-BNQbW_f1.mjs} +1 -1
  147. package/dist/{paymentMethods-ChWAwDSF.js → paymentMethods-CQdhZwq4.js} +1 -1
  148. package/dist/{payments-DGckugN0.js → payments-KTjVHqOa.js} +1 -1
  149. package/dist/{payments-C_cMXQzE.mjs → payments-VS_N2xpJ.mjs} +1 -1
  150. package/dist/pricingItemConfigs.es-D4aYkYcf.js +1 -0
  151. package/dist/{pricingItemConfigs.es-DMf1e6y7.mjs → pricingItemConfigs.es-ORxsk_YS.mjs} +23 -22
  152. package/dist/pricingPlanSchedule-BM8vsKkV.js +1 -0
  153. package/dist/pricingPlanSchedule-BPrS2WRd.mjs +132 -0
  154. package/dist/screens/Checkout/Checkout.cjs +1 -1
  155. package/dist/screens/Checkout/Checkout.mjs +2 -2
  156. package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -1
  157. package/dist/screens/CustomerOverview/CustomerOverview.mjs +21 -21
  158. package/dist/screens/PayInvoice/PayInvoice.cjs +1 -1
  159. package/dist/screens/PayInvoice/PayInvoice.mjs +14 -14
  160. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -1
  161. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +10 -10
  162. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -1
  163. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +21 -21
  164. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -1
  165. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +20 -20
  166. package/dist/sessionReference-3h-6FdrC.mjs +43 -0
  167. package/dist/sessionReference-m_6Rp4X1.js +1 -0
  168. package/dist/{subscription-CvfAEJeP.mjs → subscription-CrVOr5MF.mjs} +1 -1
  169. package/dist/{subscription-9GORG-Gt.js → subscription-ZA62t4E9.js} +1 -1
  170. package/dist/subscriptions-Dugd-oZ1.js +1 -0
  171. package/dist/{subscriptions-B5VqRayX.mjs → subscriptions-U4xg2CO1.mjs} +2 -2
  172. package/dist/types/components/customer/CheckoutForm/CheckoutForm.types.d.ts +1 -0
  173. package/dist/types/components/providers/LoggerProvider/LoggerProvider.lib.d.ts +2 -0
  174. package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +10 -1
  175. package/dist/types/components/subscriptions/PlanCustomizationForm/PlanCustomizationEditor.types.d.ts +1 -0
  176. package/dist/types/components/subscriptions/PlanCustomizationForm/UnitsEditor.types.d.ts +6 -0
  177. package/dist/types/components/subscriptions/PlanCustomizationForm/UnitsEditorItem.types.d.ts +6 -0
  178. package/dist/types/composables/useInvoicePreview.types.d.ts +1 -0
  179. package/dist/types/public/components/Invoice/Invoice.types.d.ts +1 -1
  180. package/dist/types/public/components/InvoiceHeader/InvoiceHeader.types.d.ts +1 -1
  181. package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +1 -1
  182. package/dist/types/types/errors.d.ts +5 -0
  183. package/dist/{useActionDispatchProvider-B54GYEY7.js → useActionDispatchProvider-CTyDGRX8.js} +1 -1
  184. package/dist/{useActionDispatchProvider-e2lQXTid.mjs → useActionDispatchProvider-DyQbRCxR.mjs} +1 -1
  185. package/dist/{useCustomer-BJwJ9BkJ.js → useCustomer-BXI5Vmit.js} +1 -1
  186. package/dist/{useCustomer-CC9zxV6c.mjs → useCustomer-dcmU1539.mjs} +1 -1
  187. package/dist/useCustomerFormLabels-BC1WfqWo.mjs +968 -0
  188. package/dist/useCustomerFormLabels-Ct6vD_b8.js +1 -0
  189. package/dist/{useExperimentalFeature-B0IFn3Uw.mjs → useExperimentalFeature-4Y-ppDr7.mjs} +1 -1
  190. package/dist/{useExperimentalFeature-8Mzpj5wc.js → useExperimentalFeature-9-p9_nP6.js} +1 -1
  191. package/dist/{useInvoiceData-6mHUZC9a.mjs → useInvoiceData-B2Z9aD2w.mjs} +2 -2
  192. package/dist/{useInvoiceData-Bblwdl0f.js → useInvoiceData-CGvtl7Ai.js} +1 -1
  193. package/dist/{useInvoicesList-_U1-tn9_.js → useInvoicesList-Ba0GO8p-.js} +1 -1
  194. package/dist/{useInvoicesList-B5H5JfvY.mjs → useInvoicesList-DJPznhig.mjs} +7 -7
  195. package/dist/{useLoadInitialData-CezlvhBV.js → useLoadInitialData-BO9ZsSsF.js} +1 -1
  196. package/dist/{useLoadInitialData-ux_wpNiR.mjs → useLoadInitialData-CWyI3_RR.mjs} +1 -1
  197. package/dist/{usePaymentMethodAvailability-CkR4TwoV.mjs → usePaymentMethodAvailability-DqIvkjLF.mjs} +4 -4
  198. package/dist/{usePaymentMethodAvailability-DRwrBdto.js → usePaymentMethodAvailability-bkmDrPXY.js} +1 -1
  199. package/dist/{usePaymentMethodOptions-B6GIM9q4.js → usePaymentMethodOptions-BPBVGNDg.js} +1 -1
  200. package/dist/{usePaymentMethodOptions-BfnLBZOo.mjs → usePaymentMethodOptions-MSEp39xQ.mjs} +1 -1
  201. package/dist/{usePaymentMethods-GFmQRp0X.js → usePaymentMethods-BAOtOJZD.js} +1 -1
  202. package/dist/{usePaymentMethods-C3QfLSrP.mjs → usePaymentMethods-U7gnZ0F5.mjs} +1 -1
  203. package/dist/{usePayments-BkwGyZT0.mjs → usePayments-Dq2V6bTV.mjs} +6 -6
  204. package/dist/{usePayments-SQF_V7oL.js → usePayments-G-HpKpK8.js} +1 -1
  205. package/dist/{usePortal-BdM7hDge.js → usePortal-BplmMkBG.js} +1 -1
  206. package/dist/{usePortal-DDG9b6FI.mjs → usePortal-CMHV-ShD.mjs} +1 -1
  207. package/dist/{useSubscription-Q4C2DPhw.js → useSubscription-CvB8ROBt.js} +1 -1
  208. package/dist/{useSubscription-BJJYHYgr.mjs → useSubscription-V53WsZwQ.mjs} +1 -1
  209. package/dist/{useTimePeriod.es-pepm2TpV.js → useTimePeriod.es-CtCTu9cz.js} +1 -1
  210. package/dist/{useTimePeriod.es-9tZvAhyb.mjs → useTimePeriod.es-D31Zl1MJ.mjs} +1 -1
  211. package/dist/wallets.es-CNIMW5ay.js +1 -0
  212. package/dist/wallets.es-eH2C2ygn.mjs +102 -0
  213. package/package.json +2 -1
  214. package/dist/Checkout.entry.ce-BTVuGyNq.js +0 -1
  215. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-C_yKvYtG.js +0 -1
  216. package/dist/ErrorNotification.vue.es-0ZC_DozN.js +0 -1
  217. package/dist/IconButton.vue.es-DAR7e8NA.mjs +0 -198
  218. package/dist/IconButton.vue.es-DGLIdHkR.js +0 -1
  219. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-BXTInmf9.js +0 -1
  220. package/dist/InvoiceSummary.vue.es-B0MPR0oI.js +0 -1
  221. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-Draz_8Ts.js +0 -1
  222. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-vD88j_U7.mjs +0 -144
  223. package/dist/PaymentIntegrationFormAdyen-DronjwO3.js +0 -98
  224. package/dist/PaymentIntegrationFormStripe-ybM6wirp.js +0 -102
  225. package/dist/PlanCustomizationEditor-CCOTD6Qu.mjs +0 -769
  226. package/dist/PlanCustomizationEditor-CiZnVCM6.js +0 -1
  227. package/dist/RadioGroupExtended.vue.es-B1YtLNKG.js +0 -1
  228. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BlX0W6lw.js +0 -1
  229. package/dist/component-5wqcK7yz.mjs +0 -8
  230. package/dist/component-B7ZDyqBp.js +0 -1
  231. package/dist/invoices-CvpL4rv5.js +0 -1
  232. package/dist/it-IT-CFEfSpPH.js +0 -1
  233. package/dist/nl-NL-jtVgF3jx.js +0 -1
  234. package/dist/pricingItemConfigs.es-DlybwIh1.js +0 -1
  235. package/dist/pricingPlanSchedule-COfmWv_o.js +0 -1
  236. package/dist/pricingPlanSchedule-J1nb9pCu.mjs +0 -129
  237. package/dist/subscriptions-X0Ciw8z3.js +0 -1
  238. package/dist/useCustomerFormLabels-72Pxw8X5.js +0 -1
  239. package/dist/useCustomerFormLabels-V2YuYMLU.mjs +0 -930
@@ -1,198 +0,0 @@
1
- import { computed as d, defineComponent as h, toRefs as z, ref as $, openBlock as n, createElementBlock as i, normalizeClass as s, unref as u, createElementVNode as l, createCommentVNode as c, toDisplayString as L, renderSlot as C, useAttrs as A, createBlock as k, withCtx as m, createVNode as y, mergeProps as B, createTextVNode as T } from "vue";
2
- import { o as j } from "./object.es-8aLDIncs.mjs";
3
- import { _ as D, T as M, a as N } from "./TooltipParagraph.vue.es-DYu2ReL7.mjs";
4
- import { _ as p } from "./Button.vue.es-VQCd3V3C.mjs";
5
- const V = "py-2 px-4 text-sm", q = {
6
- danger: "text-feedback-danger",
7
- neutral: "text-secondary",
8
- info: "text-feedback-info",
9
- success: "text-feedback-success",
10
- warning: "text-feedback-warning"
11
- }, P = {
12
- danger: "bg-feedback-danger",
13
- neutral: "bg-feedback-neutral",
14
- info: "bg-feedback-info",
15
- success: "bg-feedback-success",
16
- warning: "bg-feedback-warning"
17
- }, S = {
18
- danger: "rounded-sm border border-red-200",
19
- neutral: "rounded-sm border border-gray-200",
20
- info: "rounded-sm border border-blue-200",
21
- success: "rounded-sm border border-green-200",
22
- warning: "rounded-sm border border-yellow-200"
23
- }, E = "ml-auto -mx-1.5 -my-1.5 rounded focus:ring-2 p-1.5 inline-flex h-8 w-8", H = {
24
- danger: "hover:bg-red-200 focus:ring-red-400 bg-red-100 text-red-500",
25
- neutral: "hover:bg-gray-200 focus:ring-gray-400 bg-feedback-neutral text-gray-500",
26
- info: "hover:bg-blue-200 focus:ring-blue-400 bg-blue-100 text-blue-500",
27
- success: "bg-green-100 text-green-500 focus:ring-green-400 hover:bg-green-200",
28
- warning: "focus:ring-yellow-400 hover:bg-yellow-200 bg-yellow-100 text-yellow-500"
29
- };
30
- function I(e) {
31
- const f = d(
32
- () => [
33
- V,
34
- P[e.type.value],
35
- o.value,
36
- S[e.type.value],
37
- e.inline.value ? "flex items-center" : ""
38
- ].filter((t) => !!t).join(" ")
39
- ), o = d(() => q[e.type.value] ?? ""), a = d(
40
- () => [E, H[e.type.value] ?? ""].filter((t) => !!t).join(" ")
41
- ), g = d(() => e.inline.value ? !e.icon.value && !e.title.value ? "" : e.title.value ? "grow ml-1" : "grow ml-2" : "my-2"), b = d(() => !e.icon.value || !e.inline.value ? ["font-medium", e.inline.value ? "" : "text-lg ml-2"].filter((t) => !!t).join(" ") : ["font-medium ml-2", e.inline.value ? "" : "text-lg"].filter((t) => !!t).join(" "));
42
- return {
43
- alertClasses: f,
44
- textClasses: o,
45
- closeClasses: a,
46
- contentClasses: g,
47
- titleClasses: b
48
- };
49
- }
50
- const R = {
51
- key: 0,
52
- class: "ml-auto inline-flex items-center"
53
- }, Q = /* @__PURE__ */ h({
54
- __name: "Alert",
55
- props: {
56
- type: { default: "info" },
57
- title: { default: "" },
58
- closable: { type: Boolean, default: !1 },
59
- icon: { type: Boolean, default: !0 },
60
- inline: { type: Boolean, default: !0 }
61
- },
62
- setup(e) {
63
- const f = e, { alertClasses: o, textClasses: a, closeClasses: g, contentClasses: b, titleClasses: t } = I(
64
- z(f)
65
- ), x = $(!0), w = () => {
66
- x.value = !1;
67
- };
68
- return (v, r) => x.value ? (n(), i("div", {
69
- key: 0,
70
- class: s(u(o)),
71
- role: "alert"
72
- }, [
73
- l("div", {
74
- class: s(e.inline ? "flex" : "flex items-center")
75
- }, [
76
- e.icon ? (n(), i("svg", {
77
- key: 0,
78
- class: s(["flex-shrink-0", "w-5", "h-5", u(a)]),
79
- fill: "currentColor",
80
- viewBox: "0 0 20 20",
81
- xmlns: "http://www.w3.org/2000/svg"
82
- }, [...r[0] || (r[0] = [
83
- l("path", {
84
- "fill-rule": "evenodd",
85
- d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",
86
- "clip-rule": "evenodd"
87
- }, null, -1)
88
- ])], 2)) : c("", !0),
89
- e.title ? (n(), i("span", {
90
- key: 1,
91
- class: s(u(t))
92
- }, L(e.title), 3)) : c("", !0),
93
- !e.inline && e.closable ? (n(), i("button", {
94
- key: 2,
95
- type: "button",
96
- class: s(u(g)),
97
- "aria-label": "Close",
98
- onClick: w
99
- }, [...r[1] || (r[1] = [
100
- l("span", { class: "sr-only" }, "Dismiss", -1),
101
- l("svg", {
102
- class: "h-5 w-5",
103
- fill: "currentColor",
104
- viewBox: "0 0 20 20",
105
- xmlns: "http://www.w3.org/2000/svg"
106
- }, [
107
- l("path", {
108
- "fill-rule": "evenodd",
109
- d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
110
- "clip-rule": "evenodd"
111
- })
112
- ], -1)
113
- ])], 2)) : c("", !0)
114
- ], 2),
115
- l("div", {
116
- class: s(u(b))
117
- }, [
118
- C(v.$slots, "default")
119
- ], 2),
120
- v.$slots.actions ? (n(), i("div", R, [
121
- C(v.$slots, "actions")
122
- ])) : c("", !0),
123
- e.inline && e.closable ? (n(), i("button", {
124
- key: 1,
125
- type: "button",
126
- class: s(u(g)),
127
- "aria-label": "Close",
128
- onClick: w
129
- }, [...r[2] || (r[2] = [
130
- l("span", { class: "sr-only" }, "Dismiss", -1),
131
- l("svg", {
132
- class: "h-5 w-5",
133
- fill: "currentColor",
134
- viewBox: "0 0 20 20",
135
- xmlns: "http://www.w3.org/2000/svg"
136
- }, [
137
- l("path", {
138
- "fill-rule": "evenodd",
139
- d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
140
- "clip-rule": "evenodd"
141
- })
142
- ], -1)
143
- ])], 2)) : c("", !0)
144
- ], 2)) : c("", !0);
145
- }
146
- }), F = {
147
- inheritAttrs: !1
148
- }, U = /* @__PURE__ */ h({
149
- ...F,
150
- __name: "IconButton",
151
- props: {
152
- tooltip: {},
153
- icon: {},
154
- type: {},
155
- intent: {},
156
- size: {},
157
- pill: { type: Boolean },
158
- square: { type: Boolean },
159
- loading: { type: Boolean },
160
- disabled: { type: Boolean },
161
- iconPrefix: {},
162
- iconSuffix: {},
163
- tag: {},
164
- preventDoubleClick: { type: Boolean }
165
- },
166
- setup(e) {
167
- const f = e, o = A(), a = d(() => j({ ...f, ...o }, "icon", "tooltip"));
168
- return (g, b) => e.tooltip ? (n(), k(D, { key: 0 }, {
169
- tooltip: m(() => [
170
- y(M, null, {
171
- default: m(() => [
172
- y(N, null, {
173
- default: m(() => [
174
- T(L(e.tooltip), 1)
175
- ]),
176
- _: 1
177
- })
178
- ]),
179
- _: 1
180
- })
181
- ]),
182
- default: m(() => [
183
- y(p, B(a.value, {
184
- "icon-prefix": e.icon,
185
- square: ""
186
- }), null, 16, ["icon-prefix"])
187
- ]),
188
- _: 1
189
- })) : (n(), k(p, B({ key: 1 }, a.value, {
190
- square: "",
191
- "icon-prefix": e.icon
192
- }), null, 16, ["icon-prefix"]));
193
- }
194
- });
195
- export {
196
- Q as _,
197
- U as a
198
- };
@@ -1 +0,0 @@
1
- const e=require("vue"),g=require("./object.es-CdriXMPs.js"),u=require("./TooltipParagraph.vue.es-sTgWAgcd.js"),m=require("./Button.vue.es-BWl37nzm.js"),b="py-2 px-4 text-sm",v={danger:"text-feedback-danger",neutral:"text-secondary",info:"text-feedback-info",success:"text-feedback-success",warning:"text-feedback-warning"},C={danger:"bg-feedback-danger",neutral:"bg-feedback-neutral",info:"bg-feedback-info",success:"bg-feedback-success",warning:"bg-feedback-warning"},y={danger:"rounded-sm border border-red-200",neutral:"rounded-sm border border-gray-200",info:"rounded-sm border border-blue-200",success:"rounded-sm border border-green-200",warning:"rounded-sm border border-yellow-200"},x="ml-auto -mx-1.5 -my-1.5 rounded focus:ring-2 p-1.5 inline-flex h-8 w-8",k={danger:"hover:bg-red-200 focus:ring-red-400 bg-red-100 text-red-500",neutral:"hover:bg-gray-200 focus:ring-gray-400 bg-feedback-neutral text-gray-500",info:"hover:bg-blue-200 focus:ring-blue-400 bg-blue-100 text-blue-500",success:"bg-green-100 text-green-500 focus:ring-green-400 hover:bg-green-200",warning:"focus:ring-yellow-400 hover:bg-yellow-200 bg-yellow-100 text-yellow-500"};function w(t){const s=e.computed(()=>[b,C[t.type.value],n.value,y[t.type.value],t.inline.value?"flex items-center":""].filter(l=>!!l).join(" ")),n=e.computed(()=>v[t.type.value]??""),o=e.computed(()=>[x,k[t.type.value]??""].filter(l=>!!l).join(" ")),r=e.computed(()=>t.inline.value?!t.icon.value&&!t.title.value?"":t.title.value?"grow ml-1":"grow ml-2":"my-2"),i=e.computed(()=>!t.icon.value||!t.inline.value?["font-medium",t.inline.value?"":"text-lg ml-2"].filter(l=>!!l).join(" "):["font-medium ml-2",t.inline.value?"":"text-lg"].filter(l=>!!l).join(" "));return{alertClasses:s,textClasses:n,closeClasses:o,contentClasses:r,titleClasses:i}}const B={key:0,class:"ml-auto inline-flex items-center"},p=e.defineComponent({__name:"Alert",props:{type:{default:"info"},title:{default:""},closable:{type:Boolean,default:!1},icon:{type:Boolean,default:!0},inline:{type:Boolean,default:!0}},setup(t){const s=t,{alertClasses:n,textClasses:o,closeClasses:r,contentClasses:i,titleClasses:l}=w(e.toRefs(s)),d=e.ref(!0),f=()=>{d.value=!1};return(c,a)=>d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n)),role:"alert"},[e.createElementVNode("div",{class:e.normalizeClass(t.inline?"flex":"flex items-center")},[t.icon?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(["flex-shrink-0","w-5","h-5",e.unref(o)]),fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[...a[0]||(a[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z","clip-rule":"evenodd"},null,-1)])],2)):e.createCommentVNode("",!0),t.title?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(l))},e.toDisplayString(t.title),3)):e.createCommentVNode("",!0),!t.inline&&t.closable?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:e.normalizeClass(e.unref(r)),"aria-label":"Close",onClick:f},[...a[1]||(a[1]=[e.createElementVNode("span",{class:"sr-only"},"Dismiss",-1),e.createElementVNode("svg",{class:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)])],2)):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(i))},[e.renderSlot(c.$slots,"default")],2),c.$slots.actions?(e.openBlock(),e.createElementBlock("div",B,[e.renderSlot(c.$slots,"actions")])):e.createCommentVNode("",!0),t.inline&&t.closable?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:e.normalizeClass(e.unref(r)),"aria-label":"Close",onClick:f},[...a[2]||(a[2]=[e.createElementVNode("span",{class:"sr-only"},"Dismiss",-1),e.createElementVNode("svg",{class:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)])],2)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)}}),h={inheritAttrs:!1},N=e.defineComponent({...h,__name:"IconButton",props:{tooltip:{},icon:{},type:{},intent:{},size:{},pill:{type:Boolean},square:{type:Boolean},loading:{type:Boolean},disabled:{type:Boolean},iconPrefix:{},iconSuffix:{},tag:{},preventDoubleClick:{type:Boolean}},setup(t){const s=t,n=e.useAttrs(),o=e.computed(()=>g.omit({...s,...n},"icon","tooltip"));return(r,i)=>t.tooltip?(e.openBlock(),e.createBlock(u._sfc_main,{key:0},{tooltip:e.withCtx(()=>[e.createVNode(u.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(u._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.tooltip),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(m._sfc_main,e.mergeProps(o.value,{"icon-prefix":t.icon,square:""}),null,16,["icon-prefix"])]),_:1})):(e.openBlock(),e.createBlock(m._sfc_main,e.mergeProps({key:1},o.value,{square:"","icon-prefix":t.icon}),null,16,["icon-prefix"]))}});exports._sfc_main=p;exports._sfc_main$1=N;
@@ -1 +0,0 @@
1
- const e=require("vue"),t=require("./usePayments-SQF_V7oL.js"),r=require("./useLoadInitialData-CezlvhBV.js"),d=e.defineComponent({__name:"InvoiceHeader",props:{isLoading:{type:Boolean},invoice:{type:Object},payments:{type:Array},invoiceDownloadService:{type:Function},configuration:{type:Object}},setup(n){return(i,o)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{class:"sv-invoice-header sv-root sv-component","payment-attempts":n.payments??[],invoice:n.invoice,"download-service":()=>n.invoiceDownloadService(n.invoice.id),"show-download-button":n.configuration.enableDownloadButton,variant:"external"},null,8,["payment-attempts","invoice","download-service","show-download-button"]))}}),v=e.defineComponent({__name:"InvoiceEntryView",props:{invoiceId:{type:String}},setup(n){const i=n,o=t.useInvoice({invoiceId:i.invoiceId}),c=t.usePayments(),{isLoading:a}=r.useLoadInitialData(o.get(),c.get(i.invoiceId));return(s,u)=>e.renderSlot(s.$slots,"default",{invoice:e.unref(o).invoice.value,invoiceDownloadService:e.unref(o).downloadInvoicePdf,payments:e.unref(c),isLoading:e.unref(a)})}});exports._sfc_main=v;exports._sfc_main$1=d;
@@ -1 +0,0 @@
1
- const e=require("vue"),C=require("./customElements-Bt8PbjIn.js"),v=require("./Amount.vue.es-DExaYBqm.js"),le=require("./useService-H7BjLg8P.js"),O=require("./Button.vue.es-BWl37nzm.js"),ce=require("./floating-ui.vue.es-Bly3DGWm.js"),oe=require("./customer.es-BButyYo0.js"),X=require("./formatting.es-C72Nsrmh.js"),q=require("./Comparators.vue.es-DmkxV0gb.js"),de=require("./Chip.vue.es-DUgjuRWm.js"),j=require("./getComposedString.es-haS4bAj7.js"),P=require("./TooltipParagraph.vue.es-sTgWAgcd.js"),se=require("./index.es-BclokHQX.js"),ue=require("./DividerText.vue.es-BBdydUy_.js"),me=require("./IconTitle.vue.es-D-q6w2E-.js"),fe=require("./ContextMenu.vue.es-BllxeDTt.js"),Q=(t=[])=>{const n=e.ref(t);return[n,c=>{typeof n.value.find(a=>a===c)=="number"?n.value=n.value.filter(a=>a!==c):n.value=[...n.value,c]}]},ge={},pe={class:"w-full table-fixed"};function ve(t,n){return e.openBlock(),e.createElementBlock("table",pe,[e.renderSlot(t.$slots,"default")])}const $=ce._export_sfc(ge,[["render",ve]]),m=e.defineComponent({__name:"InvoiceTableData",props:{number:{type:Boolean,default:!1},hasPadding:{type:Boolean,default:!0}},setup(t){return(n,l)=>(e.openBlock(),e.createElementBlock("td",{class:e.normalizeClass({"text-right tabular-nums":t.number,"py-2":t.hasPadding})},[e.renderSlot(n.$slots,"default")],2))}}),x=e.defineComponent({__name:"InvoiceTableHeader",props:{left:{type:Boolean,default:!1},right:{type:Boolean,default:!1}},setup(t){return(n,l)=>(e.openBlock(),e.createElementBlock("th",{class:e.normalizeClass(["border-b py-1.5 text-xs font-bold uppercase text-subtle",{"text-left":t.left,"text-right":t.right}])},[e.renderSlot(n.$slots,"default")],2))}}),xe="INVOICE_PERIOD",ye="INVOICE_PERIOD_SUBTOTAL",R="INVOICE_PERIOD_TOTAL",K="SUMMARY_LINE_AMOUNT",ke="SUMMARY_TOTAL_TAX",he="SUMMARY_TOTAL_INCLUDING_TAX",be="SUMMARY_TOTAL_EXCLUDING_TAX",_e="SUMMARY_TOTAL_DISCOUNT",Be="SUMMARY_AMOUNT_DUE",Ne="DEDUCTION",Ce="HAS_SUBLINES",Te={class:"flex items-center"},Ve={key:0,class:"text-xs text-secondary"},Ee={class:"flex items-center"},Y=e.defineComponent({__name:"InvoiceSubLineRow",props:{subLines:{},isOpen:{type:Boolean},lineOrder:{},periodOrder:{},groupOrder:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean},showTaxPerLineItem:{type:Boolean,default:!0}},setup(t){const{formatMessage:n,formatNumber:l}=C.useIntl(),c=t,d=r=>{var i;const o=(i=c.processingOnlyCustomers)==null?void 0:i.find(u=>u.id===r);return o?oe.getCustomerName(o):n({id:"generic.not_available",defaultMessage:"N/A",description:"Used in scenarios where no data is available to be displayed"})},a=r=>{var i;return((i=r.usage_based_conversion)==null?void 0:i.conditions)??r.conditions},s=r=>{var i,o;const u=(o=(i=r.details.conversion)==null?void 0:i.credits)==null?void 0:o.quantity;return u===void 0?n({id:"generic.not_available",defaultMessage:"N/A",description:"Used in scenarios where no data is available to be displayed"}):l(+u,{maximumFractionDigits:X.MAX_FRACTION_DIGITS})};return(r,i)=>t.subLines&&t.isOpen?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.subLines,(o,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u},[o.processing_only_customer_resource_id?t.displayInvoiceSubLinesPerProcessingOnlyCustomer&&t.processingOnlyCustomers?(e.openBlock(),e.createElementBlock("tr",{key:1,class:e.normalizeClass(["group",{"border-t":u>0}])},[e.createVNode(m,{class:"pl-4"},{default:e.withCtx(()=>[e.createElementVNode("div",Ee,[e.createElementVNode("div",null,e.toDisplayString(d(o.processing_only_customer_resource_id)),1)])]),_:2},1024),e.renderSlot(r.$slots,"subline-content",{details:o.details,hideTaxDetails:!0})],2)):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("tr",{key:0,class:e.normalizeClass(u>0?"border-t":"")},[e.createVNode(m,null,{default:e.withCtx(()=>{var g,p,h,b,B,y;return[e.createElementVNode("div",Te,[e.renderSlot(r.$slots,"invoice-line-prefix",{lineOrder:t.lineOrder,periodOrder:t.periodOrder,groupOrder:t.groupOrder}),e.createElementVNode("div",null,[e.createElementVNode("div",null,[o.description?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(o.description),1)],64)):o.details.description?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(o.details.description),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(" N/A ")],64))]),(g=a(o))!=null&&g.name||(p=a(o))!=null&&p.meter_properties?(e.openBlock(),e.createElementBlock("div",Ve,[(h=a(o))!=null&&h.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString((b=a(o))==null?void 0:b.name),1)],64)):(B=a(o))!=null&&B.meter_properties?(e.openBlock(),e.createBlock(e.unref(q._sfc_main),{key:1,comparators:(y=a(o))==null?void 0:y.meter_properties},null,8,["comparators"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])]}),_:2},1024),e.createVNode(m,{number:"",class:"text-right tabular-nums"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s(o)),1)]),_:2},1024),e.createVNode(m,{class:"text-right tabular-nums"},{default:e.withCtx(()=>{var g,p;return[(g=o.details.band)!=null&&g.amount?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:o.details.band.amount},null,8,["value"])):(p=o.details.band)!=null&&p.percentage?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(o.details.band.percentage)+"% ",1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(" N/A ")],64))]}),_:2},1024),t.showTaxPerLineItem?(e.openBlock(),e.createBlock(m,{key:0},{default:e.withCtx(()=>[...i[0]||(i[0]=[e.createTextVNode(" ",-1)])]),_:1})):e.createCommentVNode("",!0),o.details.amount?(e.openBlock(),e.createBlock(m,{key:1,class:"text-right tabular-nums"},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:o.details.amount,"data-testid":e.unref(ye)},null,8,["value","data-testid"])]),_:2},1024)):e.createCommentVNode("",!0)],2))],64))),128)):e.createCommentVNode("",!0)}}),we={class:"flex gap-4"},Oe={class:"flex items-center gap-2"},G=e.defineComponent({__name:"PricingClauseChip",props:{iconName:{}},setup(t){return(n,l)=>(e.openBlock(),e.createElementBlock("div",we,[e.createVNode(de._sfc_main,null,{default:e.withCtx(()=>[e.createElementVNode("div",Oe,[e.createVNode(O._sfc_main$1,{icon:t.iconName,size:"xs"},null,8,["icon"]),e.createElementVNode("span",null,[e.renderSlot(n.$slots,"chip-content")])])]),_:3}),e.renderSlot(n.$slots,"chip-postfix")]))}}),Ie={class:"flex flex-col gap-2"},ae=e.defineComponent({__name:"InvoicePricingClauseChip",props:{clauseType:{},priceDetailsBand:{},invoiceLineDescription:{}},setup(t){const n=C.useIntl();return(l,c)=>(e.openBlock(),e.createElementBlock("div",Ie,[e.createElementVNode("span",null,e.toDisplayString(t.invoiceLineDescription),1),t.clauseType==="DISCOUNT"&&t.priceDetailsBand?(e.openBlock(),e.createBlock(e.unref(G),{key:0,"icon-name":"south_east"},e.createSlots({_:2},[t.priceDetailsBand.amount?{name:"chip-content",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.amount_discount",defaultMessage:"{amount} discount",description:"Represents a certain amount of discount, where {amount} is replaced with the amount"},{amount:e.unref(X.formatAmount)(t.priceDetailsBand.amount)}).toUpperCase()),1)]),key:"0"}:t.priceDetailsBand.percentage?{name:"chip-content",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.percentage_discount",defaultMessage:"{percentage}% discount",description:"Represents a certain percentage of discount, where {percentage} is replaced with the percentage (number only)"},{percentage:t.priceDetailsBand.percentage??"0"}).toUpperCase()),1)]),key:"1"}:void 0]),1024)):t.clauseType==="ADJUSTMENT"?(e.openBlock(),e.createBlock(e.unref(G),{key:1,"icon-name":"info"},{"chip-content":e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.adjustment_chip_body",defaultMessage:"Adjustment",description:"Used on invoice lines to mark as adjusted"}).toUpperCase()),1)]),_:1})):t.clauseType==="MARKUP"?(e.openBlock(),e.createBlock(e.unref(G),{key:2,"icon-name":"north_east"},{"chip-content":e.withCtx(()=>{var d;return[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.markup_percentage",defaultMessage:"{percentage}% markup",description:"Markup percentage, where {percentage} is replaced with the percentage (number only)"},{percentage:((d=t.priceDetailsBand)==null?void 0:d.percentage)??"0"}).toUpperCase()),1)]}),_:1})):t.clauseType==="COMMITMENT"?(e.openBlock(),e.createBlock(e.unref(G),{key:3,"icon-name":"sell"},{"chip-content":e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.commitment",defaultMessage:"commitment",description:"Used on invoice lines to mark as commitment"}).toUpperCase()),1)]),_:1})):e.createCommentVNode("",!0)]))}}),Se=["tabindex","onClick"],$e={class:"flex items-center"},Me=e.defineComponent({__name:"InvoiceCommitment",props:{commitments:{},groupOrder:{},invoicePeriodOrder:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean}},setup(t){const n=C.useIntl(),{getIsOpen:l,toggle:c}=q.useToggleList(),d=(r,i)=>{c(a(r,i))},a=(r,i)=>`${r}-line-${i}`,s=r=>{var i;return r.description??((i=r.details)==null?void 0:i.description)??n.$t({id:"generic.not_available",defaultMessage:"N/A",description:"Used in scenarios where no data is available to be displayed"})};return(r,i)=>(e.openBlock(),e.createBlock($,null,{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(x,{left:"",colspan:"5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.unit",defaultMessage:"Unit",description:"Table header for the column containing the number of units of invoice groups"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-60"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.sub_total",defaultMessage:"Subtotal",description:"Table header for the column containing the subtotal for invoices"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.commitments,(o,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u},[e.createElementVNode("tr",{class:e.normalizeClass(["border-t",{"cursor-pointer":o.sub_lines}]),tabindex:o.sub_lines?0:void 0,onClick:g=>d(t.groupOrder,o.line_order)},[e.createVNode(m,{colspan:"2"},{default:e.withCtx(()=>{var g;return[o.sub_lines?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!e.unref(l)(a(t.groupOrder,o.line_order))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createElementVNode("div",$e,[e.renderSlot(r.$slots,"invoice-line-prefix",{lineOrder:o.line_order,periodOrder:t.invoicePeriodOrder,groupOrder:t.groupOrder}),e.createVNode(ae,{"clause-type":"COMMITMENT","invoice-line-description":s(o),"price-details-band":(g=o.details)==null?void 0:g.band},null,8,["invoice-line-description","price-details-band"])])]}),_:2},1024),e.createVNode(m,{colspan:"3"},{default:e.withCtx(()=>[...i[0]||(i[0]=[e.createTextVNode(" ",-1)])]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>{var g,p;return[(g=o.details)!=null&&g.amount?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:(p=o.details)==null?void 0:p.amount,"data-testid":e.unref(K)},null,8,["value","data-testid"])):e.createCommentVNode("",!0)]}),_:2},1024)],10,Se),e.createVNode(Y,{ref_for:!0,ref:a(t.groupOrder,o.line_order),"sub-lines":o.sub_lines??[],"line-order":o.line_order,"period-order":t.invoicePeriodOrder,"group-order":t.groupOrder,"is-open":e.unref(l)(a(t.groupOrder,o.line_order)),"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer},null,8,["sub-lines","line-order","period-order","group-order","is-open","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer"])],64))),128))]),_:3}))}}),De=["tabindex","onClick"],Pe={class:"flex items-center"},Ae=e.defineComponent({__name:"InvoiceDiscountMarkup",props:{lines:{},type:{},handleToggleItems:{type:Function},formatIndex:{type:Function},expandedItems:{},isExpandable:{type:Boolean},invoicePeriodOrder:{},groupOrder:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean}},setup(t){const n=C.useIntl(),{getIsOpen:l,toggle:c}=q.useToggleList(),d=(s,r)=>{c(a(s,r))},a=(s,r)=>`${s}-line-${r}`;return(s,r)=>(e.openBlock(),e.createBlock($,null,{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(x,{left:"",class:"w-3/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.quantity",defaultMessage:"Quantity",description:"Table header for quantity column"})),1)]),_:1}),e.createVNode(x,{colspan:"2"},{default:e.withCtx(()=>[...r[0]||(r[0]=[e.createTextVNode(" ",-1)])]),_:1}),e.createVNode(x,{left:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.type==="DISCOUNT"?e.unref(n).$t({id:"invoice.table_header.discount",defaultMessage:"Discount",description:"Table header for discount column"}):e.unref(n).$t({id:"invoice.table_header.markup",defaultMessage:"Markup",description:"Table header for markup column"})),1)]),_:1}),e.createVNode(x,{left:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.type==="DISCOUNT"?e.unref(n).$t({id:"invoice.table_header.total",defaultMessage:"Total",description:"Table header for total column"}):" "),1)]),_:1}),e.createVNode(x,{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.sub_total",defaultMessage:"Subtotal",description:"Table header for the column containing the subtotal for invoices"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lines,(i,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:o},[e.createElementVNode("tr",{class:e.normalizeClass(["border-t",{"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:u=>d(t.groupOrder,i.line_order)},[e.createVNode(m,{class:"w-3/5"},{default:e.withCtx(()=>{var u,g;return[i.sub_lines?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!e.unref(l)(a(t.groupOrder,i.line_order))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createElementVNode("div",Pe,[e.renderSlot(s.$slots,"invoice-line-prefix",{lineOrder:i.line_order,periodOrder:t.invoicePeriodOrder,groupOrder:t.groupOrder}),i.description?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(i.description),1)],64)):(u=i.details)!=null&&u.description?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((g=i.details)==null?void 0:g.description),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode("N/A")],64))])]}),_:2},1024),e.createVNode(m,{colspan:"2"},{default:e.withCtx(()=>[...r[1]||(r[1]=[e.createTextVNode(" ",-1)])]),_:1}),e.createVNode(m,{class:"w-1/5 tabular-nums"},{default:e.withCtx(()=>{var u,g,p;return[e.createTextVNode(e.toDisplayString((g=(u=i.details)==null?void 0:u.band)!=null&&g.percentage?`${(p=i.details)==null?void 0:p.band.percentage}%`:" "),1)]}),_:2},1024),e.createVNode(m,{class:"w-1/5"},{default:e.withCtx(()=>[...r[2]||(r[2]=[e.createTextVNode(" ",-1)])]),_:1}),e.createVNode(m,{number:"",class:"w-1/5"},{default:e.withCtx(()=>{var u;return[(u=i.details)!=null&&u.amount?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:i.details.amount,"data-testid":e.unref(K)},null,8,["value","data-testid"])):e.createCommentVNode("",!0)]}),_:2},1024)],10,De),e.createVNode(Y,{ref_for:!0,ref:a(t.groupOrder,i.line_order),"sub-lines":i.sub_lines??[],"line-order":i.line_order,"is-open":e.unref(l)(a(t.groupOrder,i.line_order)),"period-order":t.invoicePeriodOrder,"group-order":t.groupOrder,"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer},null,8,["sub-lines","line-order","is-open","period-order","group-order","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer"])],64))),128))]),_:3}))}}),z=t=>{var n;return(n=t.lines)!=null&&n.some(l=>!!l.sub_lines)?Ce:void 0},Fe=["tabindex"],Le={key:0},Ue={colspan:"2",class:"p-0"},Re={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},ze=e.defineComponent({__name:"InvoiceGroupCommitment",props:{group:{},expandedItems:{},handleToggleItems:{type:Function},formatIndex:{type:Function},invoicePeriodOrder:{},groupOrder:{},isExpandable:{type:Boolean},forceExpanded:{type:Boolean},amountType:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean},showTaxPerLineItem:{type:Boolean}},setup(t){const n=C.useIntl();return(l,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("tr",{class:e.normalizeClass(["border-t break-inside-avoid",{"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:c[0]||(c[0]=d=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))),onKeyup:[c[1]||(c[1]=e.withKeys(d=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["enter"])),c[2]||(c[2]=e.withKeys(d=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["space"]))]},[e.createVNode(m,{class:"p-0"},{default:e.withCtx(()=>[t.isExpandable?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(e.unref(n).$t({id:"invoice.commitment_heading",defaultMessage:"Commitment",description:"Heading used for commitment in invoice tables"})),1)]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[t.amountType==="INCLUDING_TAX"?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:t.group.amount_including_tax,"data-testid":e.unref(R),"data-type":e.unref(z)(t.group)},null,8,["value","data-testid","data-type"])):(e.openBlock(),e.createBlock(v._sfc_main,{key:1,value:t.group.amount_excluding_tax,"data-testid":e.unref(R),"data-type":e.unref(z)(t.group)},null,8,["value","data-testid","data-type"]))]),_:1})],42,Fe),(t.forceExpanded||t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)))&&t.group.lines?(e.openBlock(),e.createElementBlock("tr",Le,[e.createElementVNode("td",Ue,[e.createElementVNode("div",Re,[e.createVNode(Me,{commitments:t.group.lines,"format-index":t.formatIndex,"handle-toggle-items":t.handleToggleItems,"expanded-items":t.expandedItems,"is-expandable":t.isExpandable,"invoice-period-order":t.invoicePeriodOrder,"group-order":t.groupOrder,"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer},{"invoice-line-prefix":e.withCtx(d=>[e.renderSlot(l.$slots,"invoice-line-prefix",e.normalizeProps(e.guardReactiveProps(d)))]),_:3},8,["commitments","format-index","handle-toggle-items","expanded-items","is-expandable","invoice-period-order","group-order","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer"])])])])):e.createCommentVNode("",!0)],64))}}),qe=["tabindex"],He={key:0},Ge={colspan:"2",class:"p-0"},Ke={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},Xe=e.defineComponent({__name:"InvoiceGroupDiscountMarkup",props:{heading:{},group:{},expandedItems:{},handleToggleItems:{type:Function},formatIndex:{type:Function},invoicePeriodOrder:{},groupOrder:{},isExpandable:{type:Boolean},forceExpanded:{type:Boolean},amountType:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean},showTaxPerLineItem:{type:Boolean}},setup(t){return(n,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("tr",{class:e.normalizeClass(["border-t break-inside-avoid",{"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:l[0]||(l[0]=c=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))),onKeyup:[l[1]||(l[1]=e.withKeys(c=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["enter"])),l[2]||(l[2]=e.withKeys(c=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["space"]))]},[e.createVNode(m,{class:"p-0"},{default:e.withCtx(()=>[t.isExpandable?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.heading),1)]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[t.amountType==="INCLUDING_TAX"?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:t.group.amount_including_tax,"data-testid":e.unref(R),"data-type":e.unref(z)(t.group)},null,8,["value","data-testid","data-type"])):(e.openBlock(),e.createBlock(v._sfc_main,{key:1,value:t.group.amount_excluding_tax,"data-testid":e.unref(R),"data-type":e.unref(z)(t.group)},null,8,["value","data-testid","data-type"]))]),_:1})],42,qe),(t.forceExpanded||t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)))&&t.group.lines?(e.openBlock(),e.createElementBlock("tr",He,[e.createElementVNode("td",Ge,[e.createElementVNode("div",Ke,[e.createVNode(Ae,{type:t.group.type,lines:t.group.lines,"format-index":t.formatIndex,"handle-toggle-items":t.handleToggleItems,"expanded-items":t.expandedItems,"is-expandable":t.isExpandable,"invoice-period-order":t.invoicePeriodOrder,"group-order":t.groupOrder,"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer},{"invoice-line-prefix":e.withCtx(c=>[e.renderSlot(n.$slots,"invoice-line-prefix",e.normalizeProps(e.guardReactiveProps(c)))]),_:3},8,["type","lines","format-index","handle-toggle-items","expanded-items","is-expandable","invoice-period-order","group-order","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer"])])])])):e.createCommentVNode("",!0)],64))}}),We=(t,n)=>{if(n)return t.forwarded_from_customer_id},je=t=>{let n={kind:"default"},l={kind:"default"};if(t.tier_lower_bound&&"number"in t.tier_lower_bound)n={kind:"number",value:+t.tier_lower_bound.number};else if(t.tier_lower_bound&&"amount"in t.tier_lower_bound){const{quantity:c,currency:d}=t.tier_lower_bound.amount;n={kind:"amount",currency:d,quantity:c??0}}if(t.tier_top_bound&&"number"in t.tier_top_bound)l={kind:"number",value:+t.tier_top_bound.number};else if(t.tier_top_bound&&"amount"in t.tier_top_bound){const{quantity:c,currency:d}=t.tier_top_bound.amount;l={kind:"amount",currency:d,quantity:c}}return{lowerBound:n,topBound:l}},Ye=t=>{var n,l,c,d;switch(t==null?void 0:t.price_bound){case"BELOW_MINIMUM_AMOUNT":return{kind:"band_minimum_amount",amount:(n=t.band)==null?void 0:n.minimum_amount};case"NOT_HIT":return{kind:"price_bound_within_bounds"};case"ABOVE_MAXIMUM_AMOUNT":return{kind:"price_bound_maximum_amount",amount:(l=t.band)==null?void 0:l.maximum_amount};case"BELOW_MINIMUM_NUMBER":return{kind:"band_minimum_number",value:(c=t.band)==null?void 0:c.minimum_number};case"ABOVE_MAXIMUM_NUMBER":return{kind:"band_maximum_number",value:(d=t.band)==null?void 0:d.maximum_number};default:return{kind:"none"}}},Qe={class:"items-left flex flex-col gap-1 leading-none"},Je={class:"flex items-center"},Ze={key:0,class:"ml-1 text-xs text-secondary"},et={key:0},tt={key:1,class:"text-xs text-secondary"},nt={key:2,class:"text-xs text-secondary"},ot={class:"text-[9pt] text-secondary"},at=e.defineComponent({__name:"InvoiceLineRow",props:{data:{},isLast:{type:Boolean},periodOrder:{},groupOrder:{},groupType:{},isExpanded:{type:Boolean}},setup(t){const{$t:n,formatNumber:l}=C.useIntl(),c=t,d=o=>{if(o.kind!=="default")return o.kind==="number"?l(o.value):`${o.currency} ${o.quantity}`},a=o=>{if(!o)return"";const{lowerBound:u,topBound:g}=je(o),p=d(g);return(d(u)??"0")+(p?` - ${p}`:"+")},s=e.computed(()=>{var o;return(o=c.data.details)==null?void 0:o.included_volume_details}),r=e.computed(()=>Ye(c.data.details)),i=e.computed(()=>{var o,u;return(o=c.data)!=null&&o.product_items?j.getComposedString(c.data.product_items.map(g=>g.name)):((u=c.data)==null?void 0:u.description)??"N/A"});return(o,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(m,{class:"align-top"},{default:e.withCtx(()=>{var g,p,h,b,B,y,V,k,E;return[e.createElementVNode("div",Qe,[e.createElementVNode("div",null,[t.data.sub_lines?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 -translate-y-2 text-slate-400",{"-rotate-90":!t.isExpanded}])},null,8,["class"])):e.createCommentVNode("",!0),e.createElementVNode("div",Je,[e.renderSlot(o.$slots,"invoice-line-prefix",{lineOrder:t.data.line_order,periodOrder:t.periodOrder,groupOrder:t.groupOrder}),["PRICING","REVENUE","ONE_OFF"].includes(t.data.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(i.value)+" ",1),t.data.type==="ONE_OFF"&&t.groupType!=="ONE_OFF"?(e.openBlock(),e.createElementBlock("div",Ze,e.toDisplayString(e.unref(X.formatEnum)(t.data.type)),1)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(ae,{key:1,"invoice-line-description":i.value,"clause-type":t.data.type,"price-details-band":(g=t.data.details)==null?void 0:g.band},null,8,["invoice-line-description","clause-type","price-details-band"]))])]),["TIERED","STAIR_STEP","TOP_TIERED"].includes(t.data.pricing_type)&&!s.value&&((p=t.data.details)!=null&&p.band)?(e.openBlock(),e.createElementBlock("div",et,e.toDisplayString(a((h=t.data.details)==null?void 0:h.band)),1)):e.createCommentVNode("",!0),(B=(b=t.data.details)==null?void 0:b.split_pricing)!=null&&B.meter_properties?(e.openBlock(),e.createElementBlock("span",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((V=(y=t.data.details)==null?void 0:y.split_pricing)==null?void 0:V.meter_properties,(I,S)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createTextVNode(e.toDisplayString(I.meter_property.name)+": "+e.toDisplayString(I.value),1),S<t.data.details.split_pricing.meter_properties.length-1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(", "))],64)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),(k=t.data.conditions)!=null&&k.name||(E=t.data.conditions)!=null&&E.meter_properties?(e.openBlock(),e.createElementBlock("div",nt,[t.data.conditions.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.data.conditions.name),1)],64)):t.data.conditions.meter_properties?(e.openBlock(),e.createBlock(e.unref(q._sfc_main),{key:1,comparators:t.data.conditions.meter_properties},null,8,["comparators"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("span",ot,[r.value.kind==="band_minimum_amount"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(n)({id:"invoice.line.band_minimum_amount",defaultMessage:"Band minimum amount",description:"Minimum amount specified in a band"}))+" ",1),r.value.amount?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:r.value.amount},null,8,["value"])):e.createCommentVNode("",!0)],64)):r.value.kind==="price_bound_within_bounds"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(n)({id:"invoice.line.price_bound_within_bounds",defaultMessage:"Within bounds",description:"Label used when min and max bounds are specified but reached"})),1)],64)):r.value.kind==="price_bound_maximum_amount"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(e.unref(n)({id:"invoice.line.price_bound_maximum_amount",defaultMessage:"Maximum amount",description:"Maximum amount specified in a band"}))+" ",1),r.value.amount?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:r.value.amount},null,8,["value"])):e.createCommentVNode("",!0)],64)):r.value.kind==="band_minimum_number"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createTextVNode(e.toDisplayString(e.unref(n)({id:"invoice.line.band_minimum_number",defaultMessage:"Minimum number",description:"Minimum number of units specified in a band"}))+" "+e.toDisplayString(r.value.value),1)],64)):r.value.kind==="band_maximum_number"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createTextVNode(e.toDisplayString(e.unref(n)({id:"invoice.line.band_maximum_number",defaultMessage:"Maximum number",description:"Maximum number of units specified in a band"}))+" "+e.toDisplayString(r.value.value),1)],64)):e.createCommentVNode("",!0)])]}),_:3}),e.renderSlot(o.$slots,"line-content",{details:t.data.details})],64))}}),it=(t,n,l)=>{var c,d;if(t==="PASS_THROUGH")return{kind:"hidden"};if(l&&((d=(c=n==null?void 0:n.conversion)==null?void 0:c.credits)!=null&&d.quantity))return{kind:"conversion-credits",value:n.conversion.credits.quantity};if(n!=null&&n.price_bound){const{price_bound:a,meter_value:s,band:r}=n;return a==="BELOW_MINIMUM_AMOUNT"||a==="ABOVE_MAXIMUM_AMOUNT"?{kind:"raw",value:s.count}:a==="NOT_HIT"&&"amount"in s&&s.amount?{kind:"amount",amount:s.amount}:a==="NOT_HIT"&&"number"in s&&s.number?{kind:"raw",value:s.number}:a==="RATIO"&&s.number?{kind:"number",value:+s.number}:a==="BELOW_MINIMUM_NUMBER"&&(r!=null&&r.minimum_number)?{kind:"number",value:+r.minimum_number}:a==="ABOVE_MAXIMUM_NUMBER"&&(r!=null&&r.maximum_number)?{kind:"number",value:+r.maximum_number}:{kind:"hidden"}}return n!=null&&n.meter_value&&"number"in n.meter_value?{kind:"number",value:+n.meter_value.number}:n!=null&&n.meter_value&&"amount"in n.meter_value?{kind:"amount",amount:n.meter_value.amount}:{kind:"one"}},rt=["NOT_HIT","BELOW_MINIMUM_NUMBER","ABOVE_MAXIMUM_NUMBER"],lt=(t,n,l)=>{if(t==="PASS_THROUGH")return{kind:"pass-through"};if(n!=null&&n.price_bound){const{price_bound:a,band:s,amount:r}=n;if(a==="BELOW_MINIMUM_AMOUNT"&&(s!=null&&s.minimum_amount))return{kind:"amount",amount:s.minimum_amount};if(a==="ABOVE_MAXIMUM_AMOUNT"&&(s!=null&&s.maximum_amount))return{kind:"amount",amount:s.maximum_amount};if(a==="RATIO")return{kind:"amount",amount:(l==="PER_SEAT"?s==null?void 0:s.amount:void 0)??r,suffix:{kind:"tier-top-bound"}};if(rt.includes(a)){if(s&&s.amount)return{kind:"amount",amount:s.amount};if(s&&"percentage"in s)return{kind:"percentage",value:s.percentage};if(s&&r)return{kind:"amount",amount:r,suffix:{kind:"fixed-amount"}}}return{kind:"hidden"}}const c=n==null?void 0:n.band,d=n==null?void 0:n.amount;return c&&c.amount?{kind:"amount",amount:c.amount,suffix:{kind:"block-size-or-per-unit"}}:c&&"percentage"in c?{kind:"percentage",value:c.percentage}:c&&d?t==="STAIR_STEP"||t==="STAIR_STEP_TOP_UP"?{kind:"amount",amount:d,suffix:{kind:"fixed-amount"}}:t==="TOP_TIERED"?{kind:"amount",amount:d,suffix:{kind:"per-unit"}}:t==="FLAT"?{kind:"amount",amount:d,suffix:{kind:"flat-fee"}}:{kind:"amount",amount:d}:{kind:"hidden"}},ct={key:5,class:"text-xs text-secondary"},dt={key:1,class:"tabular-nums"},st={key:0,class:"text-2xs text-secondary"},ut={key:1,class:"text-2xs text-secondary"},mt={key:0,class:"text-2xs text-secondary"},ft={key:1,class:"text-2xs text-secondary"},gt={key:2,class:"text-2xs text-secondary"},pt={key:3,class:"text-2xs text-secondary"},vt={key:4,class:"text-2xs text-secondary"},xt={class:"text-2xs text-secondary"},yt={key:0,class:"flex justify-end"},kt={class:"flex items-center justify-end gap-1"},ht={key:0,class:"text-2xs tabular-nums text-secondary"},bt={key:1,class:"inline-block"},_t={class:"flex items-center justify-end gap-1"},J=e.defineComponent({__name:"InvoiceRowContent",props:{pricingType:{},details:{},taxCategories:{},amountType:{},hideTaxDetails:{type:Boolean},modelType:{},showTaxPerLineItem:{type:Boolean,default:!0},preferConversionCredits:{type:Boolean}},setup(t){const n=t,l=e.computed(()=>{var y;return(y=n.details)==null?void 0:y.included_volume_details}),c=e.computed(()=>{var y;return(y=l.value)==null?void 0:y.available_included_volume}),d=e.computed(()=>it(n.pricingType,n.details,n.preferConversionCredits)),a=e.computed(()=>lt(n.pricingType,n.details,n.modelType)),{$t:s,formatNumber:r}=C.useIntl(),i=e.computed(()=>s({id:"invoice.line.fixed_amount",defaultMessage:"Fixed amount",description:"Label shown when a price band charges a fixed amount regardless of usage"})),o=e.computed(()=>s({id:"invoice.line.flat_fee",defaultMessage:"Flat fee",description:"Label shown for a flat, usage-independent fee"})),u=e.computed(()=>{var y,V;const k=(V=(y=n.details)==null?void 0:y.band)==null?void 0:V.tier_top_bound;return k&&"number"in k?k.number:void 0}),g=e.computed(()=>{if(u.value!==void 0)return s({id:"invoice.line.per_units_tier_top_bound",defaultMessage:"per {count, plural, one {unit} other {{formattedCount} units}}",description:"Number of units a tiered price band applies per. Singular form omits the count."},{count:+u.value,formattedCount:u.value})}),p=e.computed(()=>{var y,V;return n.modelType==="PER_SEAT"?(V=(y=n.details)==null?void 0:y.band)==null?void 0:V.amount:void 0}),h=e.computed(()=>n.modelType==="PER_SEAT"?s({id:"invoice.line.per_seat",defaultMessage:"Per seat",description:"Label shown when a price band applies per single seat"}):s({id:"invoice.line.per_unit",defaultMessage:"Per unit",description:"Label shown when a price band applies per single unit"})),b=e.computed(()=>{var y,V;const k=(V=(y=n.details)==null?void 0:y.band)==null?void 0:V.block_size;return k&&"number"in k?k.number:void 0}),B=e.computed(()=>{if(b.value!==void 0)return s({id:"invoice.line.per_units_block_size",defaultMessage:"Per {count, plural, one {unit} other {{formattedCount} units}}",description:"Number of units a price band block applies per. Singular form omits the count."},{count:+b.value,formattedCount:r(+b.value)})});return(y,V)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(m,{number:"",class:"align-top"},{default:e.withCtx(()=>{var k;return[d.value.kind==="raw"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(d.value.value),1)],64)):d.value.kind==="amount"?(e.openBlock(),e.createBlock(v._sfc_main,{key:1,value:d.value.amount},null,8,["value"])):d.value.kind==="number"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(e.unref(r)(d.value.value)),1)],64)):d.value.kind==="conversion-credits"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createTextVNode(e.toDisplayString(e.unref(r)(+d.value.value,{maximumFractionDigits:e.unref(X.MAX_FRACTION_DIGITS)})),1)],64)):d.value.kind==="one"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createTextVNode("1")],64)):e.createCommentVNode("",!0),d.value.kind!=="conversion-credits"&&d.value.kind!=="hidden"&&!((k=t.details)!=null&&k.price_bound)&&c.value?(e.openBlock(),e.createElementBlock("div",ct,[c.value.type==="AMOUNT"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(v._sfc_main,{value:c.value.amount},null,8,["value"]),e.createTextVNode(" "+e.toDisplayString(e.unref(s)({id:"invoice.line.included",defaultMessage:"included",description:"Used to specify an included amount. Should be lowercase."})),1)],64)):c.value.type==="NUMBER"?(e.openBlock(),e.createElementBlock("span",dt,e.toDisplayString(c.value.number)+" "+e.toDisplayString(e.unref(s)({id:"invoice.line.units_included",defaultMessage:"units included",description:"Used to specify an included units. Should be lowercase."})),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]}),_:1}),a.value.kind==="pass-through"?(e.openBlock(),e.createBlock(m,{key:0,class:"text-right align-top"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({id:"invoice.line.pass_through",defaultMessage:"Pass through",description:"Name of the pass through pricing type"})),1)]),_:1})):(e.openBlock(),e.createBlock(m,{key:1,number:"",class:"align-top"},{default:e.withCtx(()=>{var k,E,I,S,A;return[a.value.kind==="amount"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(v._sfc_main,{value:a.value.amount},null,8,["value"]),((k=a.value.suffix)==null?void 0:k.kind)==="tier-top-bound"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g.value?(e.openBlock(),e.createElementBlock("div",st,e.toDisplayString(g.value),1)):p.value?(e.openBlock(),e.createElementBlock("div",ut,e.toDisplayString(h.value),1)):e.createCommentVNode("",!0)],64)):((E=a.value.suffix)==null?void 0:E.kind)==="block-size-or-per-unit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[B.value?(e.openBlock(),e.createElementBlock("div",mt,e.toDisplayString(B.value),1)):t.modelType!=="RECURRING"?(e.openBlock(),e.createElementBlock("div",ft,e.toDisplayString(h.value),1)):e.createCommentVNode("",!0)],64)):((I=a.value.suffix)==null?void 0:I.kind)==="per-unit"?(e.openBlock(),e.createElementBlock("div",gt,e.toDisplayString(h.value),1)):((S=a.value.suffix)==null?void 0:S.kind)==="fixed-amount"?(e.openBlock(),e.createElementBlock("div",pt,e.toDisplayString(i.value),1)):((A=a.value.suffix)==null?void 0:A.kind)==="flat-fee"?(e.openBlock(),e.createElementBlock("div",vt,e.toDisplayString(o.value),1)):e.createCommentVNode("",!0)],64)):a.value.kind==="percentage"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(a.value.value)+"% ",1)],64)):e.createCommentVNode("",!0)]}),_:1})),t.showTaxPerLineItem?(e.openBlock(),e.createBlock(m,{key:2,number:"",class:"align-top"},{default:e.withCtx(()=>[t.hideTaxDetails?e.createCommentVNode("",!0):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.taxCategories,(k,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:"tabular-nums"},[e.createElementVNode("div",null,e.toDisplayString(k.percentage)+"%",1),e.createElementVNode("div",xt,[e.createVNode(v._sfc_main,{value:k.tax_amount},null,8,["value"])])]))),128))]),_:1})):e.createCommentVNode("",!0),e.createVNode(m,{number:"",class:"align-top"},{default:e.withCtx(()=>{var k,E,I,S,A;return[(E=(k=t.details)==null?void 0:k.amount)!=null&&E.currency&&((S=(I=t.details)==null?void 0:I.amount)!=null&&S.quantity)?(e.openBlock(),e.createElementBlock("div",yt,[t.showTaxPerLineItem?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.taxCategories,(H,f)=>{var N;return e.openBlock(),e.createElementBlock("div",{key:f,class:"inline-block"},[e.createElementVNode("div",kt,[e.createVNode(v._sfc_main,{value:t.details.amount,"data-testid":e.unref(K)},null,8,["value","data-testid"]),((N=t.details)==null?void 0:N.pricing_amount.quantity)!==t.details.amount.quantity?(e.openBlock(),e.createBlock(P._sfc_main,{key:0,placement:"top-end"},{tooltip:e.withCtx(()=>[e.createVNode(P.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(P._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({id:"invoice.line.original_currency",defaultMessage:"Original currency",description:"Original currency"}))+" ",1),e.createVNode(v._sfc_main,{value:t.details.pricing_amount,class:"font-semibold"},null,8,["value"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(O._sfc_main$1,{icon:"info",size:"2xs"})]),_:1})):e.createCommentVNode("",!0)]),t.hideTaxDetails?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ht,[t.amountType==="INCLUDING_TAX"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(s)({id:"invoice.line.excl.tax",defaultMessage:"Excl. tax",description:"Value excludes tax"}))+" ",1),e.createVNode(v._sfc_main,{value:H.base_amount},null,8,["value"])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(s)({id:"invoice.line.incl.tax",defaultMessage:"Incl. tax",description:"Value includes tax"}))+" ",1),e.createVNode(v._sfc_main,{value:H.total_amount},null,8,["value"])],64))]))])}),128)):(e.openBlock(),e.createElementBlock("div",bt,[e.createElementVNode("div",_t,[e.createVNode(v._sfc_main,{value:t.details.amount,"data-testid":e.unref(K)},null,8,["value","data-testid"]),((A=t.details)==null?void 0:A.pricing_amount.quantity)!==t.details.amount.quantity?(e.openBlock(),e.createBlock(P._sfc_main,{key:0,placement:"top-end"},{tooltip:e.withCtx(()=>[e.createVNode(P.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(P._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({id:"invoice.line.original_currency",defaultMessage:"Original currency",description:"Original currency"}))+" ",1),e.createVNode(v._sfc_main,{value:t.details.pricing_amount,class:"font-semibold"},null,8,["value"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(O._sfc_main$1,{icon:"info",size:"2xs"})]),_:1})):e.createCommentVNode("",!0)])])),e.renderSlot(y.$slots,"one-off-line-context-menu")])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode("-")],64))]}),_:3})],64))}}),Bt=["tabindex","onClick"],ie=e.defineComponent({__name:"InvoiceLineGroup",props:{group:{},startDate:{},endDate:{},total:{},amountType:{},invoicePeriodOrder:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean},showTaxPerLineItem:{type:Boolean,default:!0},isExpandable:{type:Boolean,default:!0}},setup(t){const n=t,l=e.computed(()=>{var i;return(i=[...n.group.lines??[]])==null?void 0:i.sort((o,u)=>o.line_order-u.line_order)}),c=C.useIntl(),{getIsOpen:d,toggle:a}=q.useToggleList(),s=(i,o)=>{a(r(i,o))},r=(i,o)=>`${i}-line-${o}`;return(i,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode($,null,{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(x,{left:"",class:"w-1/5 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c).$t({id:"invoice.table_header.unit",defaultMessage:"Unit",description:"Table header for the column containing the number of units of invoice groups"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-1/5 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c).$t({id:"invoice.table_header.quantity",defaultMessage:"Quantity",description:"Table header for quantity column"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-1/5 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c).$t({id:"invoice.table_header.price",defaultMessage:"Price",description:"Table header for the column containing the number of units of invoice groups"})),1)]),_:1}),t.showTaxPerLineItem?(e.openBlock(),e.createBlock(x,{key:0,right:"",class:"w-1/5 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c).$t({id:"invoice.table_header.tax_rate",defaultMessage:"Tax rate",description:"Table header for the column containing the tax percentage of invoice groups"})),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(x,{right:"",class:"w-1/5 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c).$t({id:"invoice.table_header.sub_total",defaultMessage:"Subtotal",description:"Table header for the column containing the subtotal for invoices"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(u,g)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:g},[e.createElementVNode("tr",{tabindex:t.isExpandable&&u.sub_lines?0:void 0,class:e.normalizeClass(["group",{"cursor-pointer":t.isExpandable&&u.sub_lines,"border-t":g!==0}]),onClick:p=>s(t.group.group_order,u.line_order)},[(e.openBlock(),e.createBlock(at,{key:g,data:u,"period-order":t.invoicePeriodOrder,"group-order":t.group.group_order,"is-last":g===l.value.length-1,"group-type":t.group.type,"is-expanded":e.unref(d)(r(t.group.group_order,u.line_order))},{"invoice-line-prefix":e.withCtx(p=>[e.renderSlot(i.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},p))]),"line-content":e.withCtx(p=>{var h,b;return[e.createVNode(J,{details:p.details,"pricing-type":u.pricing_type,"tax-categories":u.tax_categories,"amount-type":t.amountType,"model-type":(b=(h=u.product_items)==null?void 0:h[0])==null?void 0:b.model_type,"show-tax-per-line-item":t.showTaxPerLineItem},e.createSlots({_:2},[u.type==="ONE_OFF"?{name:"one-off-line-context-menu",fn:e.withCtx(B=>[e.renderSlot(i.$slots,"one-off-line-context-menu",e.mergeProps({ref_for:!0},B,{lineOrder:u.line_order}))]),key:"0"}:void 0]),1032,["details","pricing-type","tax-categories","amount-type","model-type","show-tax-per-line-item"])]}),_:2},1032,["data","period-order","group-order","is-last","group-type","is-expanded"]))],10,Bt),e.createVNode(Y,{ref_for:!0,ref:r(t.group.group_order,u.line_order),"sub-lines":u.sub_lines??[],"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer,"line-order":u.line_order,"is-open":e.unref(d)(r(t.group.group_order,u.line_order)),"period-order":t.invoicePeriodOrder,"group-order":t.group.group_order,"show-tax-per-line-item":t.showTaxPerLineItem},{"invoice-line-prefix":e.withCtx(p=>[e.renderSlot(i.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},p))]),"subline-content":e.withCtx(p=>{var h,b;return[e.createVNode(J,{details:p.details,"hide-tax-details":p.hideTaxDetails,"prefer-conversion-credits":"","pricing-type":u.pricing_type,"tax-categories":u.tax_categories,"amount-type":t.amountType,"model-type":(b=(h=u.product_items)==null?void 0:h[0])==null?void 0:b.model_type,"show-tax-per-line-item":t.showTaxPerLineItem},null,8,["details","hide-tax-details","pricing-type","tax-categories","amount-type","model-type","show-tax-per-line-item"])]}),_:2},1032,["sub-lines","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer","line-order","is-open","period-order","group-order","show-tax-per-line-item"])],64))),128))]),_:3})]))}}),Nt={class:"flex items-center"},Ct={key:2,class:"ml-1 inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-full bg-primary-100 text-2xs font-bold text-primary-600"},W=e.defineComponent({__name:"InvoiceTableRowLabel",props:{label:{},count:{}},setup(t){const n=e.ref(),l=e.ref(!1);return se.useResizeObserver(n,([c])=>{l.value=c.target.clientWidth<c.target.scrollWidth}),(c,d)=>(e.openBlock(),e.createElementBlock("div",Nt,[l.value?(e.openBlock(),e.createBlock(P._sfc_main,{key:0,placement:"bottom-start",class:"min-w-0 leading-normal"},{tooltip:e.withCtx(()=>[e.createVNode(P.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(P._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"labelElement",ref:n,class:"block truncate"},e.toDisplayString(t.label),513)]),_:1})):(e.openBlock(),e.createElementBlock("span",{key:1,ref_key:"labelElement",ref:n,class:e.normalizeClass(["block",{truncate:t.count!==void 0}])},e.toDisplayString(t.label),3)),t.count!==void 0?(e.openBlock(),e.createElementBlock("span",Ct,e.toDisplayString(t.count),1)):e.createCommentVNode("",!0)]))}}),Tt=["tabindex"],Vt={key:0},Et={colspan:"2",class:"p-0"},wt={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},Ot=e.defineComponent({__name:"InvoiceGroupRevenue",props:{forwardedFromCustomers:{},showOriginalCustomerInvoiceLine:{},group:{},expandedItems:{},handleToggleItems:{},formatIndex:{},invoicePeriodOrder:{},groupOrder:{},isExpandable:{type:Boolean},forceExpanded:{type:Boolean},amountType:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean},showTaxPerLineItem:{type:Boolean,default:!0}},setup(t){const n=t,l=e.computed(()=>{var c,d,a;const s=[(c=n.group.pricing)==null?void 0:c.name,j.getComposedString(((d=n.group.products)==null?void 0:d.map(o=>o.name))??[])].filter(Boolean).join(" - "),r=We(n.group,!!n.showOriginalCustomerInvoiceLine);if(!r)return s;const i=(a=n.forwardedFromCustomers)==null?void 0:a.find(o=>o.id===r);return[i&&oe.getCustomerName(i),s].filter(Boolean).join(" - ")});return(c,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("tr",{class:e.normalizeClass(["border-t break-inside-avoid",{"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:d[0]||(d[0]=a=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))),onKeyup:[d[1]||(d[1]=e.withKeys(a=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["enter"])),d[2]||(d[2]=e.withKeys(a=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["space"]))]},[e.createVNode(m,{class:"p-0"},{default:e.withCtx(()=>{var a;return[t.isExpandable?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createVNode(W,{label:l.value,count:t.isExpandable?((a=t.group.lines)==null?void 0:a.length)??0:void 0},null,8,["label","count"])]}),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[t.amountType==="INCLUDING_TAX"?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:t.group.amount_including_tax,"data-testid":e.unref(R),"data-type":e.unref(z)(t.group)},null,8,["value","data-testid","data-type"])):(e.openBlock(),e.createBlock(v._sfc_main,{key:1,value:t.group.amount_excluding_tax,"data-testid":e.unref(R),"data-type":e.unref(z)(t.group)},null,8,["value","data-testid","data-type"]))]),_:1})],42,Tt),t.forceExpanded||t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))?(e.openBlock(),e.createElementBlock("tr",Vt,[e.createElementVNode("td",Et,[e.createElementVNode("div",wt,[e.createVNode(ie,{"invoice-period-order":t.invoicePeriodOrder,"start-date":t.group.start_at,"end-date":t.group.end_at,total:t.group.amount_excluding_tax,group:t.group,"amount-type":t.amountType,"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer,"show-tax-per-line-item":t.showTaxPerLineItem,"is-expandable":t.isExpandable},{"invoice-line-prefix":e.withCtx(a=>[e.renderSlot(c.$slots,"invoice-line-prefix",e.normalizeProps(e.guardReactiveProps(a)))]),"one-off-line-context-menu":e.withCtx(a=>[e.renderSlot(c.$slots,"one-off-line-context-menu",e.mergeProps(a,{groupOrder:t.groupOrder}))]),_:3},8,["invoice-period-order","start-date","end-date","total","group","amount-type","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer","show-tax-per-line-item","is-expandable"])])])])):e.createCommentVNode("",!0)],64))}}),Z=e.defineComponent({__name:"InvoiceGroupWalletBalance",props:{lines:{},creditTypes:{}},setup(t){const n=t,{$t:l}=C.useIntl(),c=e.computed(()=>l({defaultMessage:"Credits",description:"Generic fallback label for a wallet balance row with no known credit type",id:"invoiceGroupWalletBalance.creditsLabel"})),d=e.computed(()=>(n.creditTypes??[]).reduce((r,i)=>(r[i.id]=i.name,r),{})),a=r=>r!=null&&r.credit_type_id?d.value[r.credit_type_id]??r.credit_type_id:c.value,s=e.computed(()=>{const r=new Set;return(n.lines??[]).map(i=>{var o;return(o=i.details)==null?void 0:o.wallet_balance_details}).filter(i=>!!i).map((i,o)=>{var u,g,p;const h=[i.used_wallet_credits,i.left_wallet_credits,i.available_wallet_credits].find(b=>!!(b!=null&&b.credit_type_id));return{key:`${(h==null?void 0:h.credit_type_id)??"credits"}-${o}`,label:a(h),available:((u=i.available_wallet_credits)==null?void 0:u.quantity)??"-",used:((g=i.used_wallet_credits)==null?void 0:g.quantity)??"-",left:((p=i.left_wallet_credits)==null?void 0:p.quantity)??"-"}}).filter(i=>{const o=`${i.label}-${i.available}-${i.used}-${i.left}`;return r.has(o)?!1:(r.add(o),!0)})});return(r,i)=>s.value.length?(e.openBlock(),e.createBlock($,{key:0},{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(x,{left:"",class:"w-2/5 text-gray-400"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Credit breakdown",description:"Table heading for the credit-type column in the wallet balance table",id:"invoiceGroupWalletBalance.creditBreakdownHeading"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-1/5 text-gray-400"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Available",description:"Table heading for the available-credits column in the wallet balance table",id:"invoiceGroupWalletBalance.availableHeading"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-1/5 text-gray-400"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Used",description:"Table heading for the used-credits column in the wallet balance table",id:"invoiceGroupWalletBalance.usedHeading"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-1/5 text-gray-400"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Left",description:"Table heading for the remaining-credits column in the wallet balance table",id:"invoiceGroupWalletBalance.leftHeading"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,o=>(e.openBlock(),e.createElementBlock("tr",{key:o.key},[e.createVNode(m,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.available),1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.used),1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.left),1)]),_:2},1024)]))),128))]),_:1})):e.createCommentVNode("",!0)}});function ee(t){return typeof t=="function"?t():e.unref(t)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function It(t=!1,n={}){const{truthyValue:l=!0,falsyValue:c=!1}=n,d=e.isRef(t),a=e.ref(t);function s(r){if(arguments.length)return a.value=r,a.value;{const i=ee(l);return a.value=a.value===i?ee(c):i,a.value}}return d?s:[a,s]}const St={key:0,totals:"",class:"border-t break-inside-avoid"},te=e.defineComponent({__name:"InvoiceSummaryTotalExcludingTax",props:{baseAmount:{}},setup(t){const n=C.useIntl();return(l,c)=>t.baseAmount?(e.openBlock(),e.createElementBlock("tr",St,[e.createVNode(m,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.total_excluding_taxes",defaultMessage:"Total excluding taxes",description:"Table row header for the total excluding taxes column in the invoice table"})),1)]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:t.baseAmount,"data-testid":e.unref(be)},null,8,["value","data-testid"])]),_:1})])):e.createCommentVNode("",!0)}}),$t={key:0,class:"border-t font-bold break-inside-avoid"},ne=e.defineComponent({__name:"InvoiceSummaryTotalIncludingTax",props:{totalAmount:{},isCustomerFacing:{type:Boolean}},setup(t){const n=C.useIntl();return(l,c)=>t.totalAmount?(e.openBlock(),e.createElementBlock("tr",$t,[e.createVNode(m,{class:"font-bold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.isCustomerFacing?e.unref(n).$t({id:"invoice.table_header.total_including_taxes_customer_facing",defaultMessage:"Total due today",description:"Table row header for the total including taxes column in the invoice table for a customer facing component"}):e.unref(n).$t({id:"invoice.table_header.total_including_taxes",defaultMessage:"Total including taxes",description:"Table row header for the total including taxes column in the invoice table"})),1)]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:t.totalAmount,"data-testid":e.unref(he)},null,8,["value","data-testid"])]),_:1})])):e.createCommentVNode("",!0)}}),Mt={key:0,colspan:"4",class:"p-0"},Dt=e.defineComponent({__name:"InvoiceTaxes",props:{taxCategories:{}},setup(t){const n=C.useIntl();return(l,c)=>(e.openBlock(),e.createBlock($,{class:"table-fixed"},{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(x,{left:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.tax type",defaultMessage:"Tax type",description:"Table header for the column containing the tax type"})),1)]),_:1}),e.createVNode(x,{right:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.base amount",defaultMessage:"Base amount",description:"Table header for the column containing the base amount"})),1)]),_:1}),e.createVNode(x,{right:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.tax_percentage",defaultMessage:"Percentage",description:"Table header for the column containing the tax percentage"})),1)]),_:1}),e.createVNode(x,{right:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.tax amount",defaultMessage:"Tax amount",description:"Table header for the column containing the tax amount"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.taxCategories,(d,a)=>(e.openBlock(),e.createElementBlock("tr",{key:a},[d.rates?(e.openBlock(),e.createElementBlock("td",Mt,[e.createVNode($,{class:"table-fixed"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.rates,(s,r)=>(e.openBlock(),e.createElementBlock("tr",{key:r},[e.createVNode(m,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.name)+" ("+e.toDisplayString(d.category)+") ",1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:d.base_amount},null,8,["value"])]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.percentage)+"%",1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:s.tax_amount},null,8,["value"])]),_:2},1024)]))),128))]),_:2},1024)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(m,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.name)+" ("+e.toDisplayString(d.category)+") ",1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:d.base_amount},null,8,["value"])]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.percentage)+"%",1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:d.tax_amount},null,8,["value"])]),_:2},1024)],64))]))),128))]),_:1}))}}),Pt={class:"flex items-start justify-between"},At={key:0,class:"max-h-9"},Ft={class:"flex flex-col gap-2"},Lt={key:0},Ut={key:3},Rt={colspan:"2",class:"p-0"},zt=["tabindex"],qt={key:1},Ht={colspan:"2",class:"p-0"},Gt={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},Kt=["tabindex","onClick","onKeyup"],Xt={key:0},Wt={colspan:"2",class:"p-0"},jt={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},Yt={key:1},Qt={colspan:"2",class:"p-0"},Jt={key:0,class:"break-inside-avoid border-t font-bold"},Zt=e.defineComponent({__name:"InvoiceSummary",props:{invoice:{},isExpandable:{type:Boolean,default:!1},forceExpanded:{type:Boolean,default:!1},heading:{default:"details"},isInvoiceLineCreatable:{type:Boolean,default:!1},isNoteCreatable:{type:Boolean,default:!1},showRenderedServicesHeader:{type:Boolean,default:!0},isCustomerFacing:{type:Boolean},showTotals:{type:Boolean,default:!0},hideOneOffCreditBreakdown:{type:Boolean,default:!1},showWalletBalance:{type:Boolean,default:!0}},emits:["add-invoice-line","add-note"],setup(t,{emit:n}){const l=C.useIntl(),{formatMessage:c}=l,d=n,a=t,[s,r]=Q(),[i,o]=Q(),[u,g]=It(),p=(...f)=>{a.isExpandable&&r(...f)},h=f=>{a.isExpandable&&o(f)},b=()=>{!a.invoice.tax_categories||!a.isExpandable||g()},B=(f,N)=>+`${f}${N}`,y=f=>l.$t({id:"invoice.service_period_heading",defaultMessage:"Service period - {start_at} - {end_at}",description:"Heading for rendered services where {start_at} is replaced for the start date and {end_at} for the end date in invoice summary"},{start_at:l.formatDate({date:f.start_at,format:"date",timezone:C.formatTimezone(a.invoice.customer.timezone),offsetType:"offsetted"}),end_at:l.formatDate({date:f.end_at,format:"date",timezone:C.formatTimezone(a.invoice.customer.timezone),offsetType:"offsetted"})}),V=f=>{switch(f){case"PRICING":case"REVENUE":return l.$t({id:"invoice.table_heading.products",defaultMessage:"Products",description:"Table heading for the column containing the products of the invoice"});case"COMMITMENT":return l.$t({id:"invoice.table_heading.commitments",defaultMessage:"Commitments",description:"Table heading for the column containing the commitments of the invoice"});case"DISCOUNT":return l.$t({id:"invoice.table_heading.discounts",defaultMessage:"Discounts",description:"Table heading for the column containing the discounts of the invoice"});case"MARKUP":return l.$t({id:"invoice.table_heading.markups",defaultMessage:"Markups",description:"Table heading for the column containing the markups of the invoice"});case"ONE_OFF":return l.$t({id:"invoice.table_heading.one_offs",defaultMessage:"One-off's",description:"Table heading for the column containing the one-offs of the invoice"})}},k=f=>{var N,T;return(N=f.products)!=null&&N.length?[(T=f.pricing)==null?void 0:T.name,j.getComposedString(f.products.map(w=>w.name))].filter(Boolean).join(" - "):f.description??""},E=f=>a.showWalletBalance&&!(a.hideOneOffCreditBreakdown&&f.type==="ONE_OFF")&&(f.lines??[]).some(N=>{var T;return!!((T=N.details)!=null&&T.wallet_balance_details)}),I=f=>f.groups.reduce((N,T)=>T.type in N?{...N,[T.type]:[...N[T.type],T]}:{...N,[T.type]:[T]},{}),S=e.computed(()=>{const f=[];return["ONE_OFF","STANDARD","ONE_OFF_CREDIT"].includes(a.invoice.type)&&["DRAFT","OPEN"].includes(a.invoice.status)&&a.isInvoiceLineCreatable&&f.push({label:c({defaultMessage:"Invoice line",id:"JlhdD2",description:"Label for adding an invoice line"}),onClick:()=>d("add-invoice-line")}),a.isNoteCreatable&&f.push({label:c({defaultMessage:"Note",id:"jB8+k/",description:"Label for adding a note to an invoice"}),onClick:()=>d("add-note")}),f}),A=e.computed(()=>a.invoice.show_tax_per_line_item!==!1),H=e.computed(()=>{if(a.heading==="summary")return l.$t({id:"invoice.summaryTitle",defaultMessage:"Invoice summary",description:"Title for the compact, always-shown invoice summary section"});switch(a.invoice.type){case"CREDIT":return l.$t({id:"invoice.creditDetailsTitle",defaultMessage:"Credit details",description:"Title for the invoice summary of a credit-note invoice"});case"ONE_OFF":return l.$t({id:"invoice.oneOffDetailsTitle",defaultMessage:"One-off details",description:"Title for the invoice summary of a one-off invoice"});case"ONE_OFF_CREDIT":return l.$t({id:"invoice.oneOffCreditDetailsTitle",defaultMessage:"One-off credit details",description:"Title for the invoice summary of a one-off credit-note invoice"});default:return l.$t({id:"invoice.title",defaultMessage:"Details",description:"Title for the invoice summary"})}});return(f,N)=>{var T;return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Pt,[f.$slots.logo?(e.openBlock(),e.createElementBlock("div",At,[e.renderSlot(f.$slots,"logo")])):(e.openBlock(),e.createBlock(me._sfc_main,{key:1,title:H.value,variant:"neutral",icon:"draft","icon-class":"print:hidden","title-class":"print:text-sm"},null,8,["title"])),f.$slots.intro?e.renderSlot(f.$slots,"intro",{},void 0,void 0,2):e.createCommentVNode("",!0),e.createElementVNode("div",Ft,[(T=S.value)!=null&&T.length?(e.openBlock(),e.createBlock(fe._sfc_main$1,{key:0,items:S.value,width:"auto"},{trigger:e.withCtx(()=>[e.createVNode(O._sfc_main,{"icon-prefix":"add",size:"sm",intent:"secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)({defaultMessage:"Add",id:"YnK/yF",description:"Label for adding an item to an invoice"})),1)]),_:1})]),_:1},8,["items"])):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"child-customers-selector")])]),f.$slots.total?e.renderSlot(f.$slots,"total",{},void 0,void 0,0):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"notes"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.invoice.periods,(w,M)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:M},[t.showRenderedServicesHeader?(e.openBlock(),e.createBlock(ue._sfc_main,{key:0,class:"mt-6"},{default:e.withCtx(()=>[e.createVNode(C._sfc_main,{tag:"h2",variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y(w)),1)]),_:2},1024)]),_:2},1024)):e.createCommentVNode("",!0),w.groups?(e.openBlock(),e.createBlock($,{key:1,class:e.normalizeClass(["text-sm",{"mt-3":t.showRenderedServicesHeader}]),"data-testid":e.unref(xe)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.entries(I(w)),([_,F],D)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:_},[D>0?(e.openBlock(),e.createElementBlock("tr",Lt,[...N[0]||(N[0]=[e.createElementVNode("td",null,[e.createElementVNode("div",{class:"h-4"})],-1)])])):e.createCommentVNode("",!0),e.createElementVNode("tr",null,[e.createVNode(x,{left:"",class:"text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V(_)),1)]),_:2},1024),e.createVNode(x,{right:"",class:"w-28 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l).$t({id:"invoice.amount_table_heading",defaultMessage:"Amount",description:"Table heading for the amount column in the invoice table"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F,(L,re)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:re},[_==="REVENUE"||_==="PRICING"||_==="ONE_OFF"?(e.openBlock(),e.createBlock(Ot,{key:0,group:L,"expanded-items":e.unref(s),"handle-toggle-items":p,"is-expandable":t.isExpandable,"force-expanded":t.forceExpanded,"format-index":B,"invoice-period-order":w.period_order,"group-order":L.group_order,"amount-type":t.invoice.pricing_amount_type,"processing-only-customers":t.invoice.processing_only_customers,"display-invoice-sub-lines-per-processing-only-customer":t.invoice.display_invoice_sub_lines_per_processing_only_customer,"show-tax-per-line-item":A.value,"forwarded-from-customers":t.invoice.forwarded_from_customers,"show-original-customer-invoice-line":t.invoice.show_original_customer_invoice_line},{"invoice-line-prefix":e.withCtx(U=>[e.renderSlot(f.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},U))]),"one-off-line-context-menu":e.withCtx(U=>[e.renderSlot(f.$slots,"one-off-line-context-menu",e.mergeProps({ref_for:!0},U,{periodOrder:w.period_order}))]),_:2},1032,["group","expanded-items","is-expandable","force-expanded","invoice-period-order","group-order","amount-type","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer","show-tax-per-line-item","forwarded-from-customers","show-original-customer-invoice-line"])):_==="DISCOUNT"||_==="MARKUP"?(e.openBlock(),e.createBlock(Xe,{key:1,group:L,"expanded-items":e.unref(s),"handle-toggle-items":p,"is-expandable":t.isExpandable,"force-expanded":t.forceExpanded,"format-index":B,"invoice-period-order":w.period_order,"group-order":L.group_order,"amount-type":t.invoice.pricing_amount_type,heading:_==="DISCOUNT"?e.unref(l).$t({id:"invoice.discounts_table_heading",defaultMessage:"Discounts",description:"Heading for discounts in the invoice table"}):e.unref(l).$t({id:"invoice.markups_table_heading",defaultMessage:"Markups",description:"Heading for markups in the invoice table"})},{"invoice-line-prefix":e.withCtx(U=>[e.renderSlot(f.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},U))]),_:3},8,["group","expanded-items","is-expandable","force-expanded","invoice-period-order","group-order","amount-type","heading"])):_==="COMMITMENT"?(e.openBlock(),e.createBlock(ze,{key:2,group:L,"expanded-items":e.unref(s),"handle-toggle-items":p,"is-expandable":t.isExpandable,"force-expanded":t.forceExpanded,"format-index":B,"invoice-period-order":w.period_order,"group-order":L.group_order,"amount-type":t.invoice.pricing_amount_type},{"invoice-line-prefix":e.withCtx(U=>[e.renderSlot(f.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},U))]),_:3},8,["group","expanded-items","is-expandable","force-expanded","invoice-period-order","group-order","amount-type"])):e.createCommentVNode("",!0),E(L)?(e.openBlock(),e.createElementBlock("tr",Ut,[e.createElementVNode("td",Rt,[e.createVNode(Z,{lines:L.lines,"credit-types":t.invoice.credit_types},null,8,["lines","credit-types"])])])):e.createCommentVNode("",!0)],64))),128))],64))),128))]),_:2},1032,["class","data-testid"])):e.createCommentVNode("",!0)],64))),128)),t.invoice.tax_summary&&(t.showTotals||(t.forceExpanded||e.unref(u))&&t.invoice.tax_categories)?(e.openBlock(),e.createBlock($,{key:1,class:"mt-6 text-sm print:ml-auto print:w-2/3"},{default:e.withCtx(()=>[t.showTotals?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("tr",null,[e.createVNode(x,{left:"",class:"text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l).$t({id:"invoice.totals_table_heading",defaultMessage:"Totals",description:"Table heading for the totals column in the invoice table"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-28 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l).$t({id:"invoice.amount_table_heading",defaultMessage:"Amount",description:"Table heading for the amount column in the invoice table"})),1)]),_:1})]),t.invoice.pricing_amount_type==="INCLUDING_TAX"?(e.openBlock(),e.createBlock(ne,{key:0,"total-amount":t.invoice.tax_summary.total_amount,"is-customer-facing":t.isCustomerFacing},null,8,["total-amount","is-customer-facing"])):(e.openBlock(),e.createBlock(te,{key:1,"base-amount":t.invoice.tax_summary.base_amount},null,8,["base-amount"])),t.invoice.tax_summary.tax_amount?(e.openBlock(),e.createElementBlock("tr",{key:2,class:e.normalizeClass([{"cursor-pointer":t.invoice.tax_categories&&t.isExpandable},"break-inside-avoid border-t"]),tabindex:t.isExpandable?0:void 0,onClick:b,onKeyup:[e.withKeys(b,["enter"]),e.withKeys(b,["space"])]},[e.createVNode(m,null,{default:e.withCtx(()=>[t.isExpandable&&t.invoice.tax_categories&&t.invoice.tax_categories.length?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!e.unref(u)}])},null,8,["class"])):e.createCommentVNode("",!0),e.createVNode(W,{label:e.unref(l).$t({id:"invoice.taxes_table_heading",defaultMessage:"Taxes",description:"Table heading for the taxes column in the invoice table"}),count:t.isExpandable&&t.invoice.tax_categories?t.invoice.tax_categories.length:void 0},null,8,["label","count"])]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:t.invoice.tax_summary.tax_amount,"data-testid":e.unref(ke)},null,8,["value","data-testid"])]),_:1})],42,zt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(t.forceExpanded||e.unref(u))&&t.invoice.tax_categories?(e.openBlock(),e.createElementBlock("tr",qt,[e.createElementVNode("td",Ht,[e.createElementVNode("div",Gt,[e.createVNode(Dt,{"tax-categories":t.invoice.tax_categories},null,8,["tax-categories"])])])])):e.createCommentVNode("",!0),t.showTotals?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.invoice.pricing_amount_type==="INCLUDING_TAX"?(e.openBlock(),e.createBlock(te,{key:0,"base-amount":t.invoice.tax_summary.base_amount},null,8,["base-amount"])):(e.openBlock(),e.createBlock(ne,{key:1,"total-amount":t.invoice.tax_summary.total_amount},null,8,["total-amount"]))],64)):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),e.unref(le.isEmpty)(t.invoice.closed_periods)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($,{key:2,class:"mt-6 text-sm"},{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(x,{left:"",class:"text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l).$t({id:"invoice.already_deducted_table_heading",defaultMessage:"Already deducted",description:"Table heading for the already deducted rows in the invoice table"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.invoice.closed_periods,(w,M)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:M},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.groups,(_,F)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:F},[e.createElementVNode("tr",{class:e.normalizeClass(["break-inside-avoid border-t",{"pt-6":M===0,"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:D=>h(B(M,F)),onKeyup:[e.withKeys(D=>h(B(M,F)),["enter"]),e.withKeys(D=>h(B(M,F)),["space"])]},[e.createVNode(m,{class:"p-0"},{default:e.withCtx(()=>{var D;return[t.isExpandable?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!e.unref(i).includes(B(M,F))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createVNode(W,{label:k(_),count:t.isExpandable?((D=_.lines)==null?void 0:D.length)??0:void 0},null,8,["label","count"])]}),_:2},1024),e.createVNode(m,{number:"",class:"w-28"},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:_.amount_excluding_tax,"data-testid":e.unref(_e),"data-type":e.unref(Ne)},null,8,["value","data-testid","data-type"])]),_:2},1024)],42,Kt),t.forceExpanded||e.unref(i).includes(B(M,F))?(e.openBlock(),e.createElementBlock("tr",Xt,[e.createElementVNode("td",Wt,[e.createElementVNode("div",jt,[e.createVNode(ie,{"start-date":_.start_at,"end-date":_.end_at,total:_.amount_excluding_tax,group:_,"amount-type":t.invoice.pricing_amount_type,"show-tax-per-line-item":A.value,"processing-only-customers":t.invoice.processing_only_customers,"display-invoice-sub-lines-per-processing-only-customer":t.invoice.display_invoice_sub_lines_per_processing_only_customer},{"one-off-line-context-menu":e.withCtx(D=>[e.renderSlot(f.$slots,"one-off-line-context-menu",e.mergeProps({ref_for:!0},D,{groupOrder:_.group_order,periodOrder:w.period_order}))]),_:2},1032,["start-date","end-date","total","group","amount-type","show-tax-per-line-item","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer"])])])])):e.createCommentVNode("",!0),E(_)?(e.openBlock(),e.createElementBlock("tr",Yt,[e.createElementVNode("td",Qt,[e.createVNode(Z,{lines:_.lines,"credit-types":t.invoice.credit_types},null,8,["lines","credit-types"])])])):e.createCommentVNode("",!0)],64))),128))],64))),128)),t.invoice.open_invoice_amount&&!t.invoice.paid&&t.showTotals?(e.openBlock(),e.createElementBlock("tr",Jt,[e.createVNode(m,{class:"font-bold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l).$t({id:"invoice.amount_due_table_heading",defaultMessage:"Amount due",description:"Table heading for the amount due row in the invoice table"})),1)]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:t.invoice.open_invoice_amount,"data-testid":e.unref(Be)},null,8,["value","data-testid"])]),_:1})])):e.createCommentVNode("",!0)]),_:3}))])}}});exports.InvoiceTable=$;exports._sfc_main=Zt;exports._sfc_main$1=x;exports._sfc_main$2=m;
@@ -1 +0,0 @@
1
- const e=require("vue"),d=require("./formatting.es-C72Nsrmh.js"),i=require("./Button.vue.es-BWl37nzm.js"),o=require("./customElements-Bt8PbjIn.js"),c=require("./PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-Db6jAkqD.js"),u=e.defineComponent({__name:"PaymentCompletedCard",props:{amount:{type:Object},variant:{type:String},redirecting:{type:Boolean}},setup(t){const r=t,{$t:a}=o.useIntl(),n=e.computed(()=>r.variant==="AUTHORIZE"?a({defaultMessage:"Payment successful",description:"The title for when a payment has been successful",id:"payment_completed_card.title.authorize"}):a({defaultMessage:"Your payment method is added",description:"The title for when a payment method was successfully added",id:"payment_completed_card.title.tokenize"}));return(s,l)=>(e.openBlock(),e.createBlock(c._sfc_main,{status:"success",title:n.value},{default:e.withCtx(()=>[t.amount?(e.openBlock(),e.createBlock(e.unref(o._sfc_main),{key:0,variant:"body-sm",class:"mt-1"},{default:e.withCtx(()=>[e.createVNode(e.unref(i._sfc_main$1),{icon:"check"}),e.createTextVNode(e.toDisplayString(e.unref(d.formatAmount)(t.amount)),1)]),_:1})):e.createCommentVNode("",!0),t.redirecting?(e.openBlock(),e.createBlock(e.unref(o._sfc_main),{key:1,variant:"body-xs",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"You are being redirected...",description:"The text shown after a successful message before a redirect",id:"payment_completed_card.redirect_message"})),1)]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["title"]))}}),m={UNKNOWN_ERROR:{title:"Something went wrong",message:"An unknown error has occurred",isReloadButtonVisible:!0},AUTHORIZATION_FAILED:{title:"Payment failed",message:"The payment failed"},PAYMENT_DETAILS_CALL_FAILED:{title:"Payment details call failed",message:"There was a problem getting the payment details"},PAYMENT_METHOD_STORAGE_FAILED:{title:"Failed storing payment method",message:"Something went wrong with storing the payment method"},REDIRECT_RESULT_PAYMENT_ACCEPTOR_MISSING:{title:"Missing payment acceptor",message:"A redirect result is set, but a payment acceptor is missing in the url"},TOKENIZE_FAILED:{title:"Tokenization failed",message:"The tokenization of the payment method has failed"},PAYMENT_INTEGRATION_INITIALIZATION_FAILED:{title:"Failed loading payment methods",message:"Failed loading payment integration",isReloadButtonVisible:!0},RESOURCE_REVOKED:{title:"Resource revoked",message:"The resource has been revoked",isReloadButtonVisible:!0}},_={class:"flex flex-col items-center gap-6"},p=e.defineComponent({__name:"PaymentErrorCard",props:{error:{type:Object}},setup(t){const r=t,{$t:a}=o.useIntl(),n=e.computed(()=>m[r.error.code]),s=()=>{window.location.reload()};return(l,f)=>(e.openBlock(),e.createBlock(c._sfc_main,{status:"error",title:n.value.title},{default:e.withCtx(()=>[e.createElementVNode("div",_,[e.createVNode(e.unref(o._sfc_main),{variant:"body-xs",color:"subtle",class:"mt-3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value.message),1)]),_:1}),n.value.isReloadButtonVisible?(e.openBlock(),e.createBlock(e.unref(i._sfc_main),{key:0,type:"button",intent:"secondary",onClick:s},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Try again",description:"Retry button text when an error has happened during a payment",id:"payments.retry_button.label"})),1)]),_:1})):e.createCommentVNode("",!0)])]),_:1},8,["title"]))}});exports._sfc_main=u;exports._sfc_main$1=p;
@@ -1,144 +0,0 @@
1
- import { defineComponent as p, computed as _, openBlock as n, createBlock as r, withCtx as a, unref as e, createVNode as f, createTextVNode as i, toDisplayString as l, createCommentVNode as c, createElementVNode as E } from "vue";
2
- import { f as T } from "./formatting.es-RclXHhKo.mjs";
3
- import { a as A, _ as b } from "./Button.vue.es-VQCd3V3C.mjs";
4
- import { u as y, _ as m } from "./customElements-Com2NiGU.mjs";
5
- import { _ as g } from "./PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DVif_ME8.mjs";
6
- const M = /* @__PURE__ */ p({
7
- __name: "PaymentCompletedCard",
8
- props: {
9
- amount: { type: Object },
10
- variant: { type: String },
11
- redirecting: { type: Boolean }
12
- },
13
- setup(t) {
14
- const d = t, { $t: s } = y(), o = _(
15
- () => d.variant === "AUTHORIZE" ? s({
16
- defaultMessage: "Payment successful",
17
- description: "The title for when a payment has been successful",
18
- id: "payment_completed_card.title.authorize"
19
- }) : s({
20
- defaultMessage: "Your payment method is added",
21
- description: "The title for when a payment method was successfully added",
22
- id: "payment_completed_card.title.tokenize"
23
- })
24
- );
25
- return (u, h) => (n(), r(g, {
26
- status: "success",
27
- title: o.value
28
- }, {
29
- default: a(() => [
30
- t.amount ? (n(), r(e(m), {
31
- key: 0,
32
- variant: "body-sm",
33
- class: "mt-1"
34
- }, {
35
- default: a(() => [
36
- f(e(A), { icon: "check" }),
37
- i(l(e(T)(t.amount)), 1)
38
- ]),
39
- _: 1
40
- })) : c("", !0),
41
- t.redirecting ? (n(), r(e(m), {
42
- key: 1,
43
- variant: "body-xs",
44
- color: "subtle"
45
- }, {
46
- default: a(() => [
47
- i(l(e(s)({
48
- defaultMessage: "You are being redirected...",
49
- description: "The text shown after a successful message before a redirect",
50
- id: "payment_completed_card.redirect_message"
51
- })), 1)
52
- ]),
53
- _: 1
54
- })) : c("", !0)
55
- ]),
56
- _: 1
57
- }, 8, ["title"]));
58
- }
59
- }), I = {
60
- UNKNOWN_ERROR: {
61
- title: "Something went wrong",
62
- message: "An unknown error has occurred",
63
- isReloadButtonVisible: !0
64
- },
65
- AUTHORIZATION_FAILED: {
66
- title: "Payment failed",
67
- message: "The payment failed"
68
- },
69
- PAYMENT_DETAILS_CALL_FAILED: {
70
- title: "Payment details call failed",
71
- message: "There was a problem getting the payment details"
72
- },
73
- PAYMENT_METHOD_STORAGE_FAILED: {
74
- title: "Failed storing payment method",
75
- message: "Something went wrong with storing the payment method"
76
- },
77
- REDIRECT_RESULT_PAYMENT_ACCEPTOR_MISSING: {
78
- title: "Missing payment acceptor",
79
- message: "A redirect result is set, but a payment acceptor is missing in the url"
80
- },
81
- TOKENIZE_FAILED: {
82
- title: "Tokenization failed",
83
- message: "The tokenization of the payment method has failed"
84
- },
85
- PAYMENT_INTEGRATION_INITIALIZATION_FAILED: {
86
- title: "Failed loading payment methods",
87
- message: "Failed loading payment integration",
88
- isReloadButtonVisible: !0
89
- },
90
- RESOURCE_REVOKED: {
91
- title: "Resource revoked",
92
- message: "The resource has been revoked",
93
- isReloadButtonVisible: !0
94
- }
95
- }, R = { class: "flex flex-col items-center gap-6" }, x = /* @__PURE__ */ p({
96
- __name: "PaymentErrorCard",
97
- props: {
98
- error: { type: Object }
99
- },
100
- setup(t) {
101
- const d = t, { $t: s } = y(), o = _(() => I[d.error.code]), u = () => {
102
- window.location.reload();
103
- };
104
- return (h, N) => (n(), r(g, {
105
- status: "error",
106
- title: o.value.title
107
- }, {
108
- default: a(() => [
109
- E("div", R, [
110
- f(e(m), {
111
- variant: "body-xs",
112
- color: "subtle",
113
- class: "mt-3"
114
- }, {
115
- default: a(() => [
116
- i(l(o.value.message), 1)
117
- ]),
118
- _: 1
119
- }),
120
- o.value.isReloadButtonVisible ? (n(), r(e(b), {
121
- key: 0,
122
- type: "button",
123
- intent: "secondary",
124
- onClick: u
125
- }, {
126
- default: a(() => [
127
- i(l(e(s)({
128
- defaultMessage: "Try again",
129
- description: "Retry button text when an error has happened during a payment",
130
- id: "payments.retry_button.label"
131
- })), 1)
132
- ]),
133
- _: 1
134
- })) : c("", !0)
135
- ])
136
- ]),
137
- _: 1
138
- }, 8, ["title"]));
139
- }
140
- });
141
- export {
142
- M as _,
143
- x as a
144
- };