@solvimon/solvimon-web 0.1.0-alpha.7 → 0.1.0-alpha.9

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 (217) hide show
  1. package/README.md +124 -0
  2. package/dist/ApiStatus-CyNDp_op.mjs +9 -0
  3. package/dist/ApiStatus-oqvUEWJx.js +1 -0
  4. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-CupcH8TZ.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-CX8vlY2Z.mjs} +6 -6
  5. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-DGisvmez.js +1 -0
  6. package/dist/ContentWithAsideLayout-B5B8Kwaw.js +1 -0
  7. package/dist/{ContentWithAsideLayout-Ct24RV-2.mjs → ContentWithAsideLayout-DhfUkZZg.mjs} +10 -16
  8. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DZJ0xukI.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Bus-5gC3.mjs} +21 -13
  9. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CkRsyMlJ.js +1 -0
  10. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DsrBsrtk.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Bc2hkpTb.mjs} +19 -9
  11. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D0vVUHuY.js +1 -0
  12. package/dist/PaymentHistoryBlock-BiiFJkpT.js +1 -0
  13. package/dist/PaymentHistoryBlock-D_B099M7.mjs +4 -0
  14. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BnKwmJ2s.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CaMDtHrL.mjs} +16 -13
  15. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DWTEfLrE.js +1 -0
  16. package/dist/PaymentIntegrationForm-D1oJA9mC.js +1 -0
  17. package/dist/PaymentIntegrationForm-DNkjhqMF.mjs +4 -0
  18. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BE1lWOk9.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D37gDtY7.mjs} +95 -199
  19. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D5bxFJ-p.js +1 -0
  20. package/dist/{PricingGroupContent.vue_vue_type_script_setup_true_lang-BbvDXvIS.mjs → PricingGroupContent.vue_vue_type_script_setup_true_lang-BChVMzCj.mjs} +5 -31
  21. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-Br3bEUlP.js +1 -0
  22. package/dist/{Skeleton.vue_vue_type_script_setup_true_lang-DXJcL7x6.mjs → Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs} +9 -6
  23. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js +1 -0
  24. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-AHw3iTfi.js +1 -0
  25. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DVhJy0t8.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BkzLj8n2.mjs} +28 -22
  26. package/dist/adyen-B_QrYdaC.mjs +4 -0
  27. package/dist/adyen-Bwewy3HC.mjs +172 -0
  28. package/dist/adyen-R6aSZ0Yf.js +1 -0
  29. package/dist/adyen-mQEEOjgl.js +1 -0
  30. package/dist/adyen.css +1 -0
  31. package/dist/component-BOqPDAVk.js +1 -0
  32. package/dist/component-Djrf1L-Z.mjs +889 -0
  33. package/dist/components/BillingInformation/BillingInformation.cjs.js +1 -1
  34. package/dist/components/BillingInformation/BillingInformation.es.js +8 -9
  35. package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +1 -1
  36. package/dist/components/BillingInformationForm/BillingInformationForm.es.js +14 -18
  37. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +1 -1
  38. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +10 -10
  39. package/dist/components/Invoice/Invoice.cjs.js +1 -1
  40. package/dist/components/Invoice/Invoice.es.js +70 -2673
  41. package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +1 -1
  42. package/dist/components/InvoiceDetails/InvoiceDetails.es.js +10 -10
  43. package/dist/components/InvoicesList/InvoicesList.cjs.js +1 -1
  44. package/dist/components/InvoicesList/InvoicesList.es.js +7 -8
  45. package/dist/components/PaymentHistory/PaymentHistory.cjs.js +1 -1
  46. package/dist/components/PaymentHistory/PaymentHistory.es.js +10 -10
  47. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +1 -1
  48. package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +16 -38
  49. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +1 -1
  50. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +17 -4826
  51. package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +1 -1
  52. package/dist/components/SubscriptionsList/SubscriptionsList.es.js +11 -11
  53. package/dist/components/WalletBalances/WalletBalances.cjs.js +1 -1
  54. package/dist/components/WalletBalances/WalletBalances.es.js +9 -9
  55. package/dist/core/index.cjs.js +1 -1
  56. package/dist/core/index.d.ts +1 -0
  57. package/dist/core/index.es.js +1 -1
  58. package/dist/core/types.d.ts +6 -2
  59. package/dist/{customer-CJrpbGX4.mjs → customer-B31QzznT.mjs} +1 -1
  60. package/dist/{customer-CcQR-JIm.js → customer-hDxW1Dbp.js} +1 -1
  61. package/dist/en-US-CgPY97Vq.js +1 -0
  62. package/dist/en-US-N3CUCsVy.mjs +179 -0
  63. package/dist/index-CzL1ZcGi.mjs +85 -0
  64. package/dist/index-DIFK3mcJ.js +6 -0
  65. package/dist/index-DRdBmZ2-.js +1 -0
  66. package/dist/index-DyvRdSR7.mjs +9673 -0
  67. package/dist/index.cjs.js +1 -1
  68. package/dist/index.d.ts +1 -0
  69. package/dist/index.es.js +4 -1
  70. package/dist/{invoices-CNK1Ushv.mjs → invoices-DIYPN2j_.mjs} +2 -15
  71. package/dist/invoices-DzkA1jDc.js +1 -0
  72. package/dist/nl-NL-B8U9b85I.mjs +197 -0
  73. package/dist/nl-NL-qMRaTRrM.js +1 -0
  74. package/dist/{paymentMethods-C-ApE-G4.mjs → paymentMethods-67b3UlTZ.mjs} +2 -2
  75. package/dist/paymentMethods-C_sdTkSF.js +1 -0
  76. package/dist/{payments-CLt0SExf.js → payments-DkHhTHto.js} +1 -1
  77. package/dist/{payments-CE9U7aKK.mjs → payments-Dq6R37Fz.mjs} +1 -1
  78. package/dist/registry-BkViv4tv.js +1 -0
  79. package/dist/{registry-B99ZnfEn.mjs → registry-Df_26rJy.mjs} +6 -4
  80. package/dist/screens/Checkout/Checkout.cjs.js +1 -1
  81. package/dist/screens/Checkout/Checkout.es.js +632 -2538
  82. package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +1 -1
  83. package/dist/screens/CustomerOverview/CustomerOverview.es.js +23 -17
  84. package/dist/screens/PayInvoice/PayInvoice.ce.d.ts +3 -0
  85. package/dist/screens/PayInvoice/PayInvoice.cjs.js +1 -0
  86. package/dist/screens/PayInvoice/PayInvoice.es.js +458 -0
  87. package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +1 -1
  88. package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +147 -99
  89. package/dist/solvimon-web.css +1 -1
  90. package/dist/{subscriptions-CoeCrY1I.mjs → subscriptions-ClGIr_aS.mjs} +2 -2
  91. package/dist/subscriptions-jelITJcX.js +1 -0
  92. package/dist/{useActionDispatchProvider-eO2qFPGv.mjs → useActionDispatchProvider-BC57-Ufn.mjs} +1 -1
  93. package/dist/{useActionDispatchProvider-CWVV_xsi.js → useActionDispatchProvider-rw9kWeE0.js} +1 -1
  94. package/dist/{useCustomer--jycAz--.mjs → useCustomer-Ba9WRtuT.mjs} +2 -2
  95. package/dist/{useCustomer-PthyTFLl.js → useCustomer-CUcaeQn_.js} +1 -1
  96. package/dist/{useIncrementalLoading-CcnL3flF.mjs → useIncrementalLoading-Cnzh2mAz.mjs} +3 -8
  97. package/dist/useIncrementalLoading-DoTTXM2Y.js +1 -0
  98. package/dist/{useInvoiceData-BiMMoVoW.mjs → useInvoiceData-BJwwDur7.mjs} +6 -12
  99. package/dist/useInvoiceData-D2jkdmlA.js +1 -0
  100. package/dist/{useInvoicesList-DFhF_gp7.mjs → useInvoicesList-CFzAxyae.mjs} +34 -267
  101. package/dist/useInvoicesList-CaBCGs4h.js +1 -0
  102. package/dist/{useLoadInitialData-Dm48tlSO.mjs → useLoadInitialData-5sgImpzc.mjs} +5 -0
  103. package/dist/useLoadInitialData-DjwRHcAH.js +1 -0
  104. package/dist/usePaymentMethodOptions-C2k4npCQ.mjs +26 -0
  105. package/dist/usePaymentMethodOptions-DYO6xr3-.js +1 -0
  106. package/dist/{usePaymentMethods-BX2RnHZN.mjs → usePaymentMethods-CRWbH48K.mjs} +2 -2
  107. package/dist/{usePaymentMethods-BRQ7-dUr.js → usePaymentMethods-ryN_YohI.js} +1 -1
  108. package/dist/usePayments-Cw5PPEJa.mjs +36 -0
  109. package/dist/usePayments-DWXPGFvp.js +1 -0
  110. package/dist/usePortal-CxX4nrE4.js +1 -0
  111. package/dist/usePortal-cmE08vYs.mjs +12 -0
  112. package/dist/useService-Bb9r_sOQ.js +1 -0
  113. package/dist/useService-BsSEI8DZ.mjs +53 -0
  114. package/dist/useViewport-Bu0cyeSi.mjs +38 -0
  115. package/dist/useViewport-CKRY1CKR.js +1 -0
  116. package/dist/useWalletBalanceItems-CkDqmk36.mjs +109 -0
  117. package/dist/useWalletBalanceItems-CpZ1NWPr.js +1 -0
  118. package/dist/useWatchDebounced-2ZLnfgvG.js +1 -0
  119. package/dist/useWatchDebounced-D1xuIX6_.mjs +12 -0
  120. package/dist/vendor-ui-5pJF5KBP.js +1 -0
  121. package/dist/vendor-ui-C0K3osvz.mjs +27645 -0
  122. package/package.json +20 -12
  123. package/dist/Alert.vue.es-DMPvSykx.js +0 -1
  124. package/dist/Alert.vue.es-DsJ1ckRU.mjs +0 -172
  125. package/dist/Amount.vue.es-C6JE5rL8.mjs +0 -23
  126. package/dist/Amount.vue.es-h8wulbBG.js +0 -1
  127. package/dist/Avatar.vue.es-Ba8ZGfm4.mjs +0 -93
  128. package/dist/Avatar.vue.es-BbyE0AjW.js +0 -1
  129. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-C4Ndo83E.js +0 -1
  130. package/dist/Button.vue.es-6sBk5tBL.mjs +0 -408
  131. package/dist/Button.vue.es-BC4_TItq.js +0 -1
  132. package/dist/CardContent.vue.es-ChEMrFCc.mjs +0 -115
  133. package/dist/CardContent.vue.es-i9ivuGKG.js +0 -1
  134. package/dist/Chip.vue.es-D0fkSe8a.js +0 -1
  135. package/dist/Chip.vue.es-DcW2CjUA.mjs +0 -1576
  136. package/dist/Comparators.vue.es-BdxDqU8o.js +0 -1
  137. package/dist/Comparators.vue.es-DdTKGB80.mjs +0 -406
  138. package/dist/ContentWithAsideLayout-UHovpjZu.js +0 -1
  139. package/dist/CustomerBillingInformation.vue.es-9rP7-RzN.js +0 -1
  140. package/dist/CustomerBillingInformation.vue.es-DBMl01Es.mjs +0 -175
  141. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CYTCcMgP.js +0 -1
  142. package/dist/Divider.vue.es-ClFG8QtG.js +0 -1
  143. package/dist/Divider.vue.es-wKkIVBgb.mjs +0 -24
  144. package/dist/DividerText.vue.es-B7oa5Xpn.mjs +0 -72
  145. package/dist/DividerText.vue.es-yiFdPQvo.js +0 -1
  146. package/dist/ErrorNotification.vue.es-Bgw0MIl8.mjs +0 -30
  147. package/dist/ErrorNotification.vue.es-FpRyg0De.js +0 -1
  148. package/dist/FormMessage.vue.es-DFQXxiSC.mjs +0 -46
  149. package/dist/FormMessage.vue.es-LeWoj774.js +0 -1
  150. package/dist/IconButton.vue.es-DNCwwH_j.mjs +0 -825
  151. package/dist/IconButton.vue.es-DiSiGPWO.js +0 -1
  152. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BDitcx8B.js +0 -1
  153. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-6yi47YWd.js +0 -1
  154. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CC3hm3nx.js +0 -1
  155. package/dist/PaymentMethod.vue.es-DYlnmZh7.js +0 -1
  156. package/dist/PaymentMethod.vue.es-nXZoQjG3.mjs +0 -1255
  157. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-CmQILA3q.js +0 -1
  158. package/dist/Section.vue.es-3-H1pUTB.mjs +0 -79
  159. package/dist/Section.vue.es-BuzTXRLP.js +0 -1
  160. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D1Xzfc70.js +0 -1
  161. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-Pq3d7DTb.js +0 -1
  162. package/dist/TooltipParagraph.vue.es-DVJLF9Kv.mjs +0 -136
  163. package/dist/TooltipParagraph.vue.es-kTbRGoPF.js +0 -1
  164. package/dist/TrialChip.vue.es-BHYbW8b6.mjs +0 -759
  165. package/dist/TrialChip.vue.es-C6Xg_5rR.js +0 -1
  166. package/dist/_Uint8Array-DHE03FZr.mjs +0 -507
  167. package/dist/_Uint8Array-DxISR7XF.js +0 -1
  168. package/dist/_flatRest.es-BHFPCqZh.mjs +0 -642
  169. package/dist/_flatRest.es-dFffnTpX.js +0 -1
  170. package/dist/adyen-51SvcyqV.mjs +0 -4
  171. package/dist/adyen-DZsyEXkw.js +0 -1
  172. package/dist/api.es-B4qAAJKr.js +0 -1
  173. package/dist/api.es-UkfpLiLL.mjs +0 -83
  174. package/dist/auto-DzZuCneB.mjs +0 -14387
  175. package/dist/auto-PpnAChnH.js +0 -6
  176. package/dist/cloneDeep-Hs8Pp07F.js +0 -1
  177. package/dist/cloneDeep-sm9cY-u2.mjs +0 -212
  178. package/dist/cn.es-C7xoIs3C.js +0 -1
  179. package/dist/cn.es-tfxVlz02.mjs +0 -3191
  180. package/dist/component-ZRZIt3ZW.js +0 -1
  181. package/dist/component-dpA83LIN.mjs +0 -6569
  182. package/dist/countryData.es--zJAd6LA.mjs +0 -252
  183. package/dist/countryData.es-D3MFzU92.js +0 -1
  184. package/dist/customer.es-D42Md24r.js +0 -1
  185. package/dist/customer.es-LIW2YmLL.mjs +0 -30
  186. package/dist/formatting.es-9hM8aHSg.js +0 -1
  187. package/dist/formatting.es-D5H_ySFv.mjs +0 -68
  188. package/dist/getCountryNameByCode.es-fP52nO_7.js +0 -1
  189. package/dist/getCountryNameByCode.es-ymC9R46j.mjs +0 -8
  190. package/dist/index-2jo9BSPM.js +0 -1
  191. package/dist/index-BFZ0dPh9.mjs +0 -179
  192. package/dist/index-CI71bVGE.mjs +0 -2521
  193. package/dist/index-CWSXne1Q.js +0 -1
  194. package/dist/index-D3v7hAtc.mjs +0 -253
  195. package/dist/index-WLSPwi90.js +0 -1
  196. package/dist/index.es-BBJF2O2l.js +0 -1
  197. package/dist/index.es-LCAKs4tH.mjs +0 -438
  198. package/dist/invoices-3kVHsAXr.js +0 -1
  199. package/dist/isEmpty.es-Bp1SbWFu.mjs +0 -131
  200. package/dist/isEmpty.es-Dycf-CD_.js +0 -1
  201. package/dist/paymentMethods-DZRf0WRl.js +0 -1
  202. package/dist/pick.es-BgDAfhAl.js +0 -1
  203. package/dist/pick.es-DdVOyp0Q.mjs +0 -45
  204. package/dist/registry-ClZ43bQn.js +0 -1
  205. package/dist/sprite.svg.es-CCc3Mz1x.js +0 -1
  206. package/dist/sprite.svg.es-DZD704h3.mjs +0 -4
  207. package/dist/subscriptions-CS8HTxzC.js +0 -1
  208. package/dist/typeGuards.es-C4nR5FkL.js +0 -1
  209. package/dist/typeGuards.es-fwUoeMCe.mjs +0 -12
  210. package/dist/useIncrementalLoading-CAdNW-Bf.js +0 -1
  211. package/dist/useInvoiceData-DvQO_nKz.js +0 -1
  212. package/dist/useInvoicesList-CHkwSNO9.js +0 -1
  213. package/dist/useLoadInitialData-BRg7IWqW.js +0 -1
  214. package/dist/useService-B67YWAcN.js +0 -1
  215. package/dist/useService-DG_zedHV.mjs +0 -282
  216. package/dist/useWalletBalanceItems-B5FMmoU2.mjs +0 -308
  217. package/dist/useWalletBalanceItems-BY3gq0fc.js +0 -1
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../Section.vue.es-BuzTXRLP.js"),n=require("../../Button.vue.es-BC4_TItq.js"),a=require("../../Divider.vue.es-ClFG8QtG.js"),i=require("../../ErrorNotification.vue.es-FpRyg0De.js"),r=require("../../component-ZRZIt3ZW.js"),o=require("../../formatting.es-9hM8aHSg.js"),l=require("../../PricingGroupContent.vue_vue_type_script_setup_true_lang-CmQILA3q.js"),c=require("../../PaymentMethod.vue.es-DYlnmZh7.js"),s=require("../../paymentMethods-DZRf0WRl.js"),d=require("../../ContentWithAsideLayout-UHovpjZu.js"),u=require("../../useActionDispatchProvider-CWVV_xsi.js"),p={id:"ppsu_hwDeeN0vhvcVCsAIdp1G",pricing_plan_schedule_infos:[{id:"ppsc_IwDeeN0vhvcVCIAQdq1a",pricing_plan_version_id:"ppve_MwDeeN0vhvcEuaADdd1f",start_at:"2026-04-05T22:00:00Z",pricing_plan_version:{pricing_categories:[{product_category:{id:"proc_iwDeeN0vhphn6VAtBD1w",name:"Add ons"},display_order:1,pricings:[{id:"pric_ywDeeN0vhvcPguAadr1V",name:"Integration setup",products:[{name:"Integration setup"}],items:[{id:"prii_NwDeeN0vhvcPguAxds12",product_items:[{name:"Rillet integration setup",model_type:"ONE_OFF"}],configs:[{on_demand:!0,bands:[{fixed_amount:{quantity:"5000.00",currency:"EUR"}}]}]},{id:"prii_IwDeeN0vhvcPgvAsdS1Q",product_items:[{name:"Attio integration setup",model_type:"ONE_OFF"}],configs:[{on_demand:!0,bands:[{amount:{quantity:"50000.00",currency:"EUR"}}]}]}]}],pricing_groups:[]}]}}]},m=e=>{var t,n;return((null==(t=e.configs)?void 0:t.some(e=>e.on_demand))??!1)&&((null==(n=e.product_items)?void 0:n.some(e=>"ONE_OFF"===e.model_type))??!1)},g=e=>{var t,n;return{id:e.id,name:null==(n=null==(t=e.product_items)?void 0:t[0])?void 0:n.name,items:[{id:e.id,configs:(e.configs??[]).map(e=>({bands:(e.bands??[]).map(e=>({fixed_amount:e.fixed_amount??e.amount}))}))}]}},_=e=>(e.items??[]).filter(m).map(g),f=e=>({display_order:e.display_order,product_category:e.product_category,pricings:(e.pricings??[]).flatMap(_),pricing_groups:(e.pricing_groups??[]).map(e=>({id:e.id,name:e.name,pricings:(e.pricings??[]).flatMap(_)})).filter(e=>e.pricings.length>0)}),y=Object.fromEntries(p.pricing_plan_schedule_infos.flatMap(e=>e.pricing_plan_version.pricing_categories).flatMap(e=>e.pricings).flatMap(e=>e.items).filter(m).map(e=>{var t,n,a,i,r;const o=null==(a=null==(n=null==(t=e.configs)?void 0:t[0])?void 0:n.bands)?void 0:a[0],l=(null==(i=null==o?void 0:o.fixed_amount)?void 0:i.quantity)??(null==(r=null==o?void 0:o.amount)?void 0:r.quantity)??"0";return[e.id,parseFloat(l)]})),v=e=>({quantity:e.toFixed(2),currency:"EUR"}),h={id:"paya_NwDeeN0vgXgeP1AyNx14",object_type:"PAYMENT_ACCEPTOR",status:"ACTIVE",reference:"mock-payment-acceptor",name:"Mock payment acceptor",type:"PAYMENT_GATEWAY"},b={id:"intg_zwDeeN0vgXgeM6APNW1g",object_type:"INTEGRATION",reference:"mock-payment-integration",name:"Mock payment integration",description:"Mock payment integration",status:"ACTIVE",type:"PAYMENT_GATEWAY"},k={class:"mb-3 flex flex-col gap-2"},x={class:"flex flex-col gap-1 border-t pt-3"},N={class:"flex items-center justify-between"},w={class:"flex items-center justify-between"},B={class:"flex items-center justify-between border-t pt-3"},V=e.defineComponent({__name:"UpgradeOrderSummary",props:{selectedPricings:{type:Array},invoice:{type:Object},isPending:{type:Boolean}},setup(n){const a=n,{$t:i}=r.useIntl(),l=e.computed(()=>0===a.selectedPricings.length),c=e=>{var t,n,a,i,r,o;return null==(o=null==(r=null==(i=null==(a=null==(n=null==(t=e.items)?void 0:t[0])?void 0:n.configs)?void 0:a[0])?void 0:i.bands)?void 0:r[0])?void 0:o.fixed_amount};return(a,s)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),null,{default:e.withCtx(()=>{var t;return[e.createVNode(e.unref(r._sfc_main),{variant:"heading-3",tag:"h2",class:"mb-3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Order summary",id:"upgrade_subscription.order_summary.title",description:"Title for the order summary section on the upgrade subscription page"})),1)]),_:1}),l.value?(e.openBlock(),e.createBlock(e.unref(r._sfc_main),{key:0,variant:"body-sm",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Select add-ons to see pricing.",id:"upgrade_subscription.order_summary.empty_state",description:"Placeholder shown when no add-ons are selected in the order summary"})),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.selectedPricings,t=>(e.openBlock(),e.createElementBlock("div",{key:t.id,class:"flex items-center justify-between"},[e.createElementVNode("div",null,[e.createVNode(e.unref(r._sfc_main),{variant:"body-sm"},{default:e.withCtx(()=>{var n,a;return[e.createTextVNode(e.toDisplayString(t.name??(null==(a=null==(n=t.products)?void 0:n[0])?void 0:a.name)),1)]}),_:2},1024),e.createVNode(e.unref(r._sfc_main),{variant:"body-xs",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"one-off",id:"upgrade_subscription.order_summary.one_off_label",description:"One-off payment label next to a line item in order summary"})),1)]),_:1})]),c(t)?(e.openBlock(),e.createBlock(e.unref(r._sfc_main),{key:0,variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o.formatAmount)(c(t))),1)]),_:2},1024)):e.createCommentVNode("",!0)]))),128))]),(null==(t=n.invoice)?void 0:t.tax_summary)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",x,[e.createElementVNode("div",N,[e.createVNode(e.unref(r._sfc_main),{variant:"body-sm",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Total excluding taxes",id:"upgrade_subscription.order_summary.subtotal_label",description:"Subtotal before tax label in order summary"})),1)]),_:1}),e.createVNode(e.unref(r._sfc_main),{variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o.formatAmount)(n.invoice.tax_summary.base_amount)),1)]),_:1})]),e.createElementVNode("div",w,[e.createVNode(e.unref(r._sfc_main),{variant:"body-sm",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Taxes",id:"upgrade_subscription.order_summary.taxes_label",description:"Tax amount label in order summary"})),1)]),_:1}),e.createVNode(e.unref(r._sfc_main),{variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o.formatAmount)(n.invoice.tax_summary.tax_amount)),1)]),_:1})])]),e.createElementVNode("div",B,[e.createVNode(e.unref(r._sfc_main),{variant:"body-sm",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Total due today",id:"upgrade_subscription.order_summary.total_label",description:"Total amount due today label in order summary"})),1)]),_:1}),e.createVNode(e.unref(r._sfc_main),{variant:"body-sm",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o.formatAmount)(n.invoice.tax_summary.total_amount)),1)]),_:1})])],64)):e.createCommentVNode("",!0)],64))]}),_:1}))}}),C=e.defineComponent({__name:"OnDemandPricingRow",props:{pricing:{type:Object},selected:{type:Boolean}},emits:["toggle"],setup(a,{emit:i}){const c=a,s=i,{$t:d}=r.useIntl(),u=e.computed(()=>{var e,t;return c.pricing.name??(null==(t=null==(e=c.pricing.products)?void 0:e[0])?void 0:t.name)??"—"}),p=e.computed(()=>{var e,t,n,a,i,r;return null==(r=null==(i=null==(a=null==(n=null==(t=null==(e=c.pricing.items)?void 0:e[0])?void 0:t.configs)?void 0:n[0])?void 0:a.bands)?void 0:i[0])?void 0:r.fixed_amount}),m=e.computed(()=>p.value?`${o.formatAmount(p.value)} ${d({defaultMessage:"one-off",id:"on_demand_pricing_row.one_off_label",description:"One-off label shown next to the price in an on-demand pricing row"})}`:"");return(i,r)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{"content-background":a.selected?"none":"gray",class:e.normalizeClass({"!bg-white":a.selected})},{default:e.withCtx(()=>[e.createVNode(l._sfc_main,{name:u.value,description:m.value},{default:e.withCtx(()=>[a.selected?(e.openBlock(),e.createBlock(e.unref(n._sfc_main),{key:0,color:"gray",variant:"outline",size:"sm","icon-prefix":"remove_shopping_cart",onClick:r[0]||(r[0]=e=>s("toggle",a.pricing.id))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({defaultMessage:"Remove",id:"on_demand_pricing_row.remove_button_label",description:"Label for the remove button in an on-demand pricing row"})),1)]),_:1})):(e.openBlock(),e.createBlock(e.unref(n._sfc_main),{key:1,color:"primary",size:"sm","icon-prefix":"add",onClick:r[1]||(r[1]=e=>s("toggle",a.pricing.id))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({defaultMessage:"Add to cart",id:"on_demand_pricing_row.add_to_cart_button_label",description:"Label for the add to cart button in an on-demand pricing row"})),1)]),_:1}))]),_:1},8,["name","description"])]),_:1},8,["content-background","class"]))}}),E={class:"grid grid-cols-1 gap-1"},S=e.defineComponent({__name:"OnDemandPricingList",props:{categories:{type:Array},selectedPricingIds:{type:Array}},emits:["toggle"],setup(t,{emit:n}){const a=t,i=n,o=e.computed(()=>[...a.categories].sort((e,t)=>(e.display_order??0)-(t.display_order??0)));return(n,a)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,n=>(e.openBlock(),e.createElementBlock("div",{key:n.id??n.display_order,class:"flex flex-col gap-2"},[e.createVNode(e.unref(r._sfc_main),{variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>{var t;return[e.createTextVNode(e.toDisplayString((null==(t=n.product_category)?void 0:t.name)??n.name),1)]}),_:2},1024),e.createElementVNode("div",E,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.pricings,n=>(e.openBlock(),e.createBlock(C,{key:n.id,pricing:n,selected:t.selectedPricingIds.includes(n.id),onToggle:a[0]||(a[0]=e=>i("toggle",e))},null,8,["pricing","selected"]))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.pricing_groups,n=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n.id},[e.createVNode(e.unref(r._sfc_main),{variant:"body-sm",weight:"semibold",class:"mt-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.name),1)]),_:2},1024),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.pricings,n=>(e.openBlock(),e.createBlock(C,{key:n.id,pricing:n,selected:t.selectedPricingIds.includes(n.id),onToggle:a[1]||(a[1]=e=>i("toggle",e))},null,8,["pricing","selected"]))),128))],64))),128))])]))),128))}}),T={class:"flex flex-col gap-4"},A={key:0,class:"flex flex-col gap-2"},D={class:"flex flex-col gap-1"},I={key:1,class:"flex flex-col gap-2"},M={class:"flex flex-col gap-1"},P={class:"flex items-center gap-3"},j={key:0,class:"flex h-9 w-9 shrink-0 items-center gap-0.5"},O=["src","alt"],L={key:1,class:"flex h-9 w-9 shrink-0 items-center justify-center overflow-clip rounded"},F=["src","alt"],q={key:2,class:"flex flex-col gap-1"},$=e.defineComponent({__name:"PaymentMethodPicker",props:{customerId:{type:String},subscriptionId:{type:String},selectedId:{type:String}},emits:["select"],setup(n,{emit:a}){const i=n,o=a,{$t:l}=r.useIntl(),{getPaymentMethods:d}=s.createPaymentMethodsService(),u=e.ref([]),p=e.ref([]),m=e.ref(!1),g=e.computed(()=>p.value.flatMap(e=>e.options??[])),_=e=>`https://checkoutshopper-live.adyen.com/checkoutshopper/images/logos/small/${e}.svg`,f=["visa","mc","amex","maestro"],y=e=>{if(!e)return[];return[...f.filter(t=>e.includes(t)),...e.filter(e=>!f.includes(e))].slice(0,4)};return e.onMounted(async()=>{m.value=!0;try{const e=await d({customerId:i.customerId,pagination:{page:1,pageSize:50}});u.value=e.data,p.value=[{payment_acceptor:h,integration:b,options:[{name:"iDeal",payment_method_variant:"ONLINE_BANKING",payment_gateway_variant:"ADYEN",adyen:{name:"iDEAL | Wero",type:"ideal"}},{name:"Cards",payment_method_variant:"CARD",payment_gateway_variant:"ADYEN",adyen:{name:"Cards",type:"scheme",brands:["maestro","accel","amex","cup","diners","hipercard","jcb","mc","nyce","pulse","star","visa"]}},{name:"PayPal",payment_method_variant:"DIGITAL_WALLET",payment_gateway_variant:"ADYEN",adyen:{name:"PayPal",type:"paypal",configuration:{intent:"capture"}}},{name:"Trustly",payment_method_variant:"ONLINE_BANKING",payment_gateway_variant:"ADYEN",adyen:{name:"Trustly - Instant Bank Payment",type:"trustly"}}]}]}finally{m.value=!1}}),(a,i)=>(e.openBlock(),e.createElementBlock("div",T,[u.value.length>0?(e.openBlock(),e.createElementBlock("div",A,[e.createVNode(e.unref(r._sfc_main),{variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Saved payment methods",id:"upgrade_subscription.payment_picker.saved_title",description:"Heading for the saved payment methods section in the upgrade subscription payment picker"})),1)]),_:1}),e.createElementVNode("div",D,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,a=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:a.id,"content-background":n.selectedId===a.id?"none":"gray",class:e.normalizeClass([{"!bg-white":n.selectedId===a.id},"cursor-pointer"]),onClick:e=>o("select",a.id)},{default:e.withCtx(()=>[e.createVNode(e.unref(c._sfc_main),{"payment-method":a},null,8,["payment-method"])]),_:2},1032,["content-background","class","onClick"]))),128))])])):e.createCommentVNode("",!0),g.value.length>0?(e.openBlock(),e.createElementBlock("div",I,[e.createVNode(e.unref(r._sfc_main),{variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"All payment methods",id:"upgrade_subscription.payment_picker.all_title",description:"Heading for the all payment methods section in the upgrade subscription payment picker"})),1)]),_:1}),e.createElementVNode("div",M,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,a=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:a.adyen.type,"content-background":n.selectedId===a.adyen.type?"none":"gray",class:e.normalizeClass([{"!bg-white":n.selectedId===a.adyen.type},"cursor-pointer"]),onClick:e=>o("select",a.adyen.type)},{default:e.withCtx(()=>{return[e.createElementVNode("div",P,["scheme"===a.adyen.type?(e.openBlock(),e.createElementBlock("div",j,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y(a.adyen.brands),t=>(e.openBlock(),e.createElementBlock("img",{key:t,src:_(t),alt:t,class:"h-5 w-auto rounded"},null,8,O))),128))])):(e.openBlock(),e.createElementBlock("div",L,[e.createElementVNode("img",{src:(t=a.adyen.type,`https://checkoutshopper-live.adyen.com/checkoutshopper/images/logos/${t}.svg`),alt:a.name,class:"h-9 w-9 object-contain"},null,8,F)])),e.createVNode(e.unref(r._sfc_main),{variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.name),1)]),_:2},1024)])];var t}),_:2},1032,["content-background","class","onClick"]))),128))])])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("div",q,[...i[0]||(i[0]=[e.createElementVNode("div",{class:"h-[52px] animate-pulse rounded-md bg-gray-100"},null,-1),e.createElementVNode("div",{class:"h-[52px] animate-pulse rounded-md bg-gray-100"},null,-1),e.createElementVNode("div",{class:"h-[52px] animate-pulse rounded-md bg-gray-100"},null,-1)])])):e.createCommentVNode("",!0)]))}});const z={key:0,class:"flex h-full items-center justify-center p-8"},R={class:"flex flex-col items-center py-10"},U=e.defineComponent({__name:"UpgradeSubscription",props:{configuration:{type:Object}},setup(o){const c=o,{$t:s}=r.useIntl(),{dispatchAction:m}=u.useActionDispatchProvider(),{chargeOnDemandPricingItems:g}=function(){const e=r.createRequestService(),t=r.useConfig();return{chargeOnDemandPricingItems:function({scheduleId:n,pricingPlanVersionId:a,pricingItemIds:i,startAt:r,finalizeImmediately:o=!0,paymentMethodId:l}){return e({url:`${t.apiUrls.config}/portal/pricing-plan-schedules/${n}/charge-on-demand-pricing-items`,options:{method:"POST"},data:{...a?{pricing_plan_version_id:a}:{},pricing_item_ids:i,...r?{start_at:r}:{},finalize_immediately:o,...l?{payment_method_id:l}:{}}})}}}(),_=d.usePortal(),h=e.computed(()=>_.value.customer_id),b=e.ref([]),k=e.ref(void 0),x=e.ref(!1),N=e.ref(!1),w=e.ref(void 0),B=e.ref(!1),C=e.computed(()=>(e=>{var t;const n=Date.now(),a=p.pricing_plan_schedule_infos,i=a.find(e=>{const t=Date.parse(e.start_at);return Number.isFinite(t)&&t<=n})??a[0],r=((null==(t=null==i?void 0:i.pricing_plan_version)?void 0:t.pricing_categories)??[]).map(f).filter(e=>{var t,n;return((null==(t=e.pricings)?void 0:t.length)??0)>0||((null==(n=e.pricing_groups)?void 0:n.length)??0)>0});return{pricing_plan_subscription_id:e||p.id,pricing_plan_schedule_id:(null==i?void 0:i.id)??"",pricing_plan_version_id:(null==i?void 0:i.pricing_plan_version_id)??"",billing_period:{type:"MONTH",value:1},billing_currency:"EUR",pricing_categories:r}})(c.configuration.subscriptionId)),E=e.computed(()=>C.value.pricing_categories),T=e.computed(()=>E.value.flatMap(e=>[...e.pricings??[],...(e.pricing_groups??[]).flatMap(e=>e.pricings??[])])),A=e.computed(()=>T.value.filter(e=>b.value.includes(e.id)));let D;e.watch(b,e=>{if(clearTimeout(D),0===e.length)return w.value=void 0,void(B.value=!1);B.value=!0,D=setTimeout(()=>{w.value=(e=>{const t=e.reduce((e,t)=>e+(y[t]??0),0),n=Math.round(.21*t*100)/100,a=t+n;return{invoice:{tax_summary:{base_amount:v(t),tax_amount:v(n),total_amount:v(a),country_code:"NL"}},first_invoice:{},invoice_infos:[]}})(e).invoice,B.value=!1},400)});const I=e=>{b.value.includes(e)?b.value=b.value.filter(t=>t!==e):b.value=[...b.value,e]},M=e.computed(()=>b.value.length>0&&!!k.value),P=e.ref(void 0),j=async()=>{if(M.value){x.value=!0,P.value=void 0;try{const e=A.value.map(e=>{var t,n;return null==(n=null==(t=e.items)?void 0:t[0])?void 0:n.id}).filter(e=>!!e),t=k.value&&k.value.startsWith("pmet_")?k.value:void 0,n=await g({scheduleId:C.value.pricing_plan_schedule_id,pricingPlanVersionId:C.value.pricing_plan_version_id,pricingItemIds:e,finalizeImmediately:!0,paymentMethodId:t});t?N.value=!0:m({action:"pay-invoice",data:{invoiceId:n.id}})}catch{P.value=s({defaultMessage:"Something went wrong. Please try again.",id:"upgrade_subscription.purchase_error",description:"Error message shown when the purchase call fails on the upgrade subscription page"})}finally{x.value=!1}}};return(c,u)=>N.value?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(e.unref(t._sfc_main),null,{default:e.withCtx(()=>[e.createElementVNode("div",R,[e.createVNode(e.unref(n._sfc_main$1),{icon:"check_circle",class:"text-green-400",size:"lg"}),e.createVNode(e.unref(r._sfc_main),{variant:"heading-3",tag:"span",class:"mt-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Payment successful",id:"upgrade_subscription.success.title",description:"Title shown after a successful add-on purchase"})),1)]),_:1}),e.createVNode(e.unref(r._sfc_main),{variant:"body-sm",shade:"lighter",tag:"span",class:"mt-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Your add-ons have been activated.",id:"upgrade_subscription.success.subtitle",description:"Subtitle shown after a successful add-on purchase"})),1)]),_:1})])]),_:1})])):(e.openBlock(),e.createBlock(e.unref(d.ContentWithAsideLayout),{key:1},{content:e.withCtx(()=>[E.value.length>0?(e.openBlock(),e.createBlock(S,{key:0,categories:E.value,"selected-pricing-ids":b.value,onToggle:I},null,8,["categories","selected-pricing-ids"])):(e.openBlock(),e.createBlock(e.unref(r._sfc_main),{key:1,variant:"body-sm",shade:"lighter",class:"p-4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"No on-demand add-ons are available for this subscription.",id:"upgrade_subscription.empty_state",description:"Shown when there are no on-demand add-ons available for the subscription"})),1)]),_:1})),e.createVNode(e.unref(a._sfc_main),{spacing:"sm"}),e.createVNode($,{"customer-id":h.value,"subscription-id":o.configuration.subscriptionId,"selected-id":k.value,onSelect:u[0]||(u[0]=e=>k.value=e)},null,8,["customer-id","subscription-id","selected-id"])]),aside:e.withCtx(()=>[e.createVNode(V,{"selected-pricings":A.value,invoice:w.value,"is-pending":B.value},null,8,["selected-pricings","invoice","is-pending"]),P.value?(e.openBlock(),e.createBlock(e.unref(i._sfc_main),{key:0,title:P.value},null,8,["title"])):e.createCommentVNode("",!0),e.createVNode(e.unref(n._sfc_main),{size:"lg",class:"full-width",type:"button",disabled:!M.value||x.value,loading:x.value,onClick:j},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Purchase",id:"upgrade_subscription.purchase_button.label",description:"Label for the purchase button on the upgrade subscription page"})),1)]),_:1},8,["disabled","loading"]),e.createVNode(e.unref(r._sfc_main),{tag:"div",variant:"body-sm",shade:"lighter",class:"flex grow justify-center"},{default:e.withCtx(()=>[e.createVNode(l._sfc_main$1,{icon:"lock",kpi:e.unref(s)({defaultMessage:"Secure and encrypted payments",id:"upgrade_subscription.kpi.encrypted_payments.label",description:"The encrypted payments KPI shown on the upgrade subscription page"})},null,8,["kpi"])]),_:1})]),_:1}))}}),Y=e.defineComponent({__name:"UpgradeSubscription.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},showTimezones:{type:Boolean},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},customElementName:{type:String},branding:{type:Object},configuration:{type:Object}},setup:t=>(n,a)=>{var i,o,l,c;return e.openBlock(),e.createBlock(r._sfc_main$1,{"custom-element-name":e.unref(W),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(o=null==(i=t.branding)?void 0:i.colors)?void 0:o.primary,"secondary-color":null==(c=null==(l=t.branding)?void 0:l.colors)?void 0:c.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,onError:a[0]||(a[0]=e=>n.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(U,{configuration:t.configuration},null,8,["configuration"])]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log"])}}),G=r.defineCustomElement(Y),W=r.getComponentName("upgrade-subscription");exports.COMPONENT_NAME=W,exports.SolvimonUpgradeSubscription=G,exports.defineSolvimonUpgradeSubscription=()=>{customElements.get(W)||customElements.define(W,G)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("../../vendor-ui-5pJF5KBP.js"),n=require("../../PricingGroupContent.vue_vue_type_script_setup_true_lang-Br3bEUlP.js"),a=require("../../paymentMethods-C_sdTkSF.js"),i=require("../../ContentWithAsideLayout-B5B8Kwaw.js"),r=require("../../component-BOqPDAVk.js"),o=require("../../useActionDispatchProvider-rw9kWeE0.js"),s=require("../../usePortal-CxX4nrE4.js"),c={id:"ppsu_hwDeeN0vhvcVCsAIdp1G",pricing_plan_schedule_infos:[{id:"ppsc_IwDeeN0vhvcVCIAQdq1a",pricing_plan_version_id:"ppve_MwDeeN0vhvcEuaADdd1f",start_at:"2026-04-05T22:00:00Z",pricing_plan_version:{pricing_categories:[{product_category:{id:"proc_iwDeeN0vhphn6VAtBD1w",name:"Add ons"},display_order:1,pricings:[{id:"pric_ywDeeN0vhvcPguAadr1V",name:"Integration setup",products:[{name:"Integration setup"}],items:[{id:"prii_NwDeeN0vhvcPguAxds12",product_items:[{name:"Rillet integration setup",model_type:"ONE_OFF"}],configs:[{on_demand:!0,bands:[{fixed_amount:{quantity:"5000.00",currency:"EUR"}}]}]},{id:"prii_IwDeeN0vhvcPgvAsdS1Q",product_items:[{name:"Attio integration setup",model_type:"ONE_OFF"}],configs:[{on_demand:!0,bands:[{amount:{quantity:"50000.00",currency:"EUR"}}]}]}]}],pricing_groups:[]}]}}]},l=e=>{var t,n;return((null==(t=e.configs)?void 0:t.some(e=>e.on_demand))??!1)&&((null==(n=e.product_items)?void 0:n.some(e=>"ONE_OFF"===e.model_type))??!1)},d=e=>{var t,n;return{id:e.id,name:null==(n=null==(t=e.product_items)?void 0:t[0])?void 0:n.name,items:[{id:e.id,configs:(e.configs??[]).map(e=>({bands:(e.bands??[]).map(e=>({fixed_amount:e.fixed_amount??e.amount}))}))}]}},p=e=>(e.items??[]).filter(l).map(d),u=e=>({display_order:e.display_order,product_category:e.product_category,pricings:(e.pricings??[]).flatMap(p),pricing_groups:(e.pricing_groups??[]).map(e=>({id:e.id,name:e.name,pricings:(e.pricings??[]).flatMap(p)})).filter(e=>e.pricings.length>0)}),m=Object.fromEntries(c.pricing_plan_schedule_infos.flatMap(e=>e.pricing_plan_version.pricing_categories).flatMap(e=>e.pricings).flatMap(e=>e.items).filter(l).map(e=>{var t,n,a,i,r;const o=null==(a=null==(n=null==(t=e.configs)?void 0:t[0])?void 0:n.bands)?void 0:a[0],s=(null==(i=null==o?void 0:o.fixed_amount)?void 0:i.quantity)??(null==(r=null==o?void 0:o.amount)?void 0:r.quantity)??"0";return[e.id,parseFloat(s)]})),_=e=>({quantity:e.toFixed(2),currency:"EUR"}),g={id:"paya_NwDeeN0vgXgeP1AyNx14",object_type:"PAYMENT_ACCEPTOR",status:"ACTIVE",reference:"mock-payment-acceptor",name:"Mock payment acceptor",type:"PAYMENT_GATEWAY"},v={id:"intg_zwDeeN0vgXgeM6APNW1g",object_type:"INTEGRATION",reference:"mock-payment-integration",name:"Mock payment integration",description:"Mock payment integration",status:"ACTIVE",type:"PAYMENT_GATEWAY"},y={class:"sv-order-summary__items mb-3 flex flex-col gap-2"},f={class:"sv-order-summary__tax flex flex-col gap-1 border-t pt-3"},h={class:"sv-order-summary__subtotal flex items-center justify-between"},b={class:"sv-order-summary__tax-row flex items-center justify-between"},k={class:"sv-order-summary__total flex items-center justify-between border-t pt-3"},x=e.defineComponent({__name:"UpgradeOrderSummary",props:{selectedPricings:{type:Array},invoice:{type:Object},isPending:{type:Boolean}},setup(n){const a=n,{$t:i}=t.useIntl(),r=e.computed(()=>0===a.selectedPricings.length),o=e=>{var t,n,a,i,r,o;return null==(o=null==(r=null==(i=null==(a=null==(n=null==(t=e.items)?void 0:t[0])?void 0:n.configs)?void 0:a[0])?void 0:i.bands)?void 0:r[0])?void 0:o.fixed_amount};return(a,s)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{class:"sv-order-summary sv-upgrade-subscription__order-summary"},{default:e.withCtx(()=>{var a;return[e.createVNode(e.unref(t._sfc_main),{variant:"heading-3",tag:"h2",class:"sv-order-summary__title mb-3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Order summary",id:"upgrade_subscription.order_summary.title",description:"Title for the order summary section on the upgrade subscription page"})),1)]),_:1}),r.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:0,variant:"body-sm",shade:"lighter",class:"sv-order-summary__empty"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Select add-ons to see pricing.",id:"upgrade_subscription.order_summary.empty_state",description:"Placeholder shown when no add-ons are selected in the order summary"})),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.selectedPricings,n=>(e.openBlock(),e.createElementBlock("div",{key:n.id,class:"sv-order-summary__item flex items-center justify-between"},[e.createElementVNode("div",null,[e.createVNode(e.unref(t._sfc_main),{variant:"body-sm",class:"sv-order-summary__item-name"},{default:e.withCtx(()=>{var t,a;return[e.createTextVNode(e.toDisplayString(n.name??(null==(a=null==(t=n.products)?void 0:t[0])?void 0:a.name)),1)]}),_:2},1024),e.createVNode(e.unref(t._sfc_main),{variant:"body-xs",shade:"lighter",class:"sv-order-summary__item-meta"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"one-off",id:"upgrade_subscription.order_summary.one_off_label",description:"One-off payment label next to a line item in order summary"})),1)]),_:1})]),o(n)?(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:0,variant:"body-sm",class:"sv-order-summary__item-price"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t.formatAmount)(o(n))),1)]),_:2},1024)):e.createCommentVNode("",!0)]))),128))]),(null==(a=n.invoice)?void 0:a.tax_summary)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",f,[e.createElementVNode("div",h,[e.createVNode(e.unref(t._sfc_main),{variant:"body-sm",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Total excluding taxes",id:"upgrade_subscription.order_summary.subtotal_label",description:"Subtotal before tax label in order summary"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main),{variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t.formatAmount)(n.invoice.tax_summary.base_amount)),1)]),_:1})]),e.createElementVNode("div",b,[e.createVNode(e.unref(t._sfc_main),{variant:"body-sm",shade:"lighter"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Taxes",id:"upgrade_subscription.order_summary.taxes_label",description:"Tax amount label in order summary"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main),{variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t.formatAmount)(n.invoice.tax_summary.tax_amount)),1)]),_:1})])]),e.createElementVNode("div",k,[e.createVNode(e.unref(t._sfc_main),{variant:"body-sm",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Total due today",id:"upgrade_subscription.order_summary.total_label",description:"Total amount due today label in order summary"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main),{variant:"body-sm",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t.formatAmount)(n.invoice.tax_summary.total_amount)),1)]),_:1})])],64)):e.createCommentVNode("",!0)],64))]}),_:1}))}}),N=e.defineComponent({__name:"OnDemandPricingRow",props:{pricing:{type:Object},selected:{type:Boolean}},emits:["toggle"],setup(a,{emit:i}){const r=a,o=i,{$t:s}=t.useIntl(),c=e.computed(()=>{var e,t;return r.pricing.name??(null==(t=null==(e=r.pricing.products)?void 0:e[0])?void 0:t.name)??"—"}),l=e.computed(()=>{var e,t,n,a,i,o;return null==(o=null==(i=null==(a=null==(n=null==(t=null==(e=r.pricing.items)?void 0:e[0])?void 0:t.configs)?void 0:n[0])?void 0:a.bands)?void 0:i[0])?void 0:o.fixed_amount}),d=e.computed(()=>l.value?`${t.formatAmount(l.value)} ${s({defaultMessage:"one-off",id:"on_demand_pricing_row.one_off_label",description:"One-off label shown next to the price in an on-demand pricing row"})}`:"");return(i,r)=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{"content-background":a.selected?"none":"gray",class:e.normalizeClass({"!bg-white":a.selected})},{default:e.withCtx(()=>[e.createVNode(n._sfc_main,{name:c.value,description:d.value},{default:e.withCtx(()=>[a.selected?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$3),{key:0,color:"gray",variant:"outline",size:"sm","icon-prefix":"remove_shopping_cart",onClick:r[0]||(r[0]=e=>o("toggle",a.pricing.id))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Remove",id:"on_demand_pricing_row.remove_button_label",description:"Label for the remove button in an on-demand pricing row"})),1)]),_:1})):(e.openBlock(),e.createBlock(e.unref(t._sfc_main$3),{key:1,color:"primary",size:"sm","icon-prefix":"add",onClick:r[1]||(r[1]=e=>o("toggle",a.pricing.id))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Add to cart",id:"on_demand_pricing_row.add_to_cart_button_label",description:"Label for the add to cart button in an on-demand pricing row"})),1)]),_:1}))]),_:1},8,["name","description"])]),_:1},8,["content-background","class"]))}}),w={class:"sv-pricing-list__items grid grid-cols-1 gap-1"},B=e.defineComponent({__name:"OnDemandPricingList",props:{categories:{type:Array},selectedPricingIds:{type:Array}},emits:["toggle"],setup(n,{emit:a}){const i=n,r=a,o=e.computed(()=>[...i.categories].sort((e,t)=>(e.display_order??0)-(t.display_order??0)));return(a,i)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,a=>(e.openBlock(),e.createElementBlock("div",{key:a.id??a.display_order,class:"sv-pricing-list__category flex flex-col gap-2"},[e.createVNode(e.unref(t._sfc_main),{variant:"heading-3",tag:"h2",class:"sv-pricing-list__category-title"},{default:e.withCtx(()=>{var t;return[e.createTextVNode(e.toDisplayString((null==(t=a.product_category)?void 0:t.name)??a.name),1)]}),_:2},1024),e.createElementVNode("div",w,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.pricings,t=>(e.openBlock(),e.createBlock(N,{key:t.id,class:"sv-pricing-list__row",pricing:t,selected:n.selectedPricingIds.includes(t.id),onToggle:i[0]||(i[0]=e=>r("toggle",e))},null,8,["pricing","selected"]))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.pricing_groups,a=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:a.id},[e.createVNode(e.unref(t._sfc_main),{variant:"body-sm",weight:"semibold",class:"sv-pricing-list__group-title mt-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.name),1)]),_:2},1024),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.pricings,t=>(e.openBlock(),e.createBlock(N,{key:t.id,class:"sv-pricing-list__row",pricing:t,selected:n.selectedPricingIds.includes(t.id),onToggle:i[1]||(i[1]=e=>r("toggle",e))},null,8,["pricing","selected"]))),128))],64))),128))])]))),128))}}),V={class:"sv-payment-method-picker flex flex-col gap-4"},C={key:0,class:"sv-payment-method-picker__saved flex flex-col gap-2"},E={class:"sv-payment-method-picker__options flex flex-col gap-1"},S={key:1,class:"sv-payment-method-picker__new flex flex-col gap-2"},T={class:"sv-payment-method-picker__options flex flex-col gap-1"},A={class:"sv-payment-method-picker__option-content flex items-center gap-3"},I={key:0,class:"sv-payment-method-picker__option-icon flex h-9 w-9 shrink-0 items-center gap-0.5"},D=["src","alt"],M={key:1,class:"sv-payment-method-picker__option-icon flex h-9 w-9 shrink-0 items-center justify-center overflow-clip rounded"},P=["src","alt"],O={key:2,class:"sv-payment-method-picker__loading flex flex-col gap-1"},j=e.defineComponent({__name:"PaymentMethodPicker",props:{customerId:{type:String},subscriptionId:{type:String},selectedId:{type:String}},emits:["select"],setup(n,{emit:i}){const r=n,o=i,{$t:s}=t.useIntl(),{getPaymentMethods:c}=a.createPaymentMethodsService(),l=e.ref([]),d=e.ref([]),p=e.ref(!1),u=e.computed(()=>d.value.flatMap(e=>e.options??[])),m=e=>`https://checkoutshopper-live.adyen.com/checkoutshopper/images/logos/small/${e}.svg`,_=["visa","mc","amex","maestro"],y=e=>{if(!e)return[];return[..._.filter(t=>e.includes(t)),...e.filter(e=>!_.includes(e))].slice(0,4)};return e.onMounted(async()=>{p.value=!0;try{const e=await c({customerId:r.customerId,pagination:{page:1,pageSize:50}});l.value=e.data,d.value=[{payment_acceptor:g,integration:v,options:[{name:"iDeal",payment_method_variant:"ONLINE_BANKING",payment_gateway_variant:"ADYEN",adyen:{name:"iDEAL | Wero",type:"ideal"}},{name:"Cards",payment_method_variant:"CARD",payment_gateway_variant:"ADYEN",adyen:{name:"Cards",type:"scheme",brands:["maestro","accel","amex","cup","diners","hipercard","jcb","mc","nyce","pulse","star","visa"]}},{name:"PayPal",payment_method_variant:"DIGITAL_WALLET",payment_gateway_variant:"ADYEN",adyen:{name:"PayPal",type:"paypal",configuration:{intent:"capture"}}},{name:"Trustly",payment_method_variant:"ONLINE_BANKING",payment_gateway_variant:"ADYEN",adyen:{name:"Trustly - Instant Bank Payment",type:"trustly"}}]}]}finally{p.value=!1}}),(a,i)=>(e.openBlock(),e.createElementBlock("div",V,[l.value.length>0?(e.openBlock(),e.createElementBlock("div",C,[e.createVNode(e.unref(t._sfc_main),{variant:"heading-3",tag:"h2",class:"sv-payment-method-picker__title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Saved payment methods",id:"upgrade_subscription.payment_picker.saved_title",description:"Heading for the saved payment methods section in the upgrade subscription payment picker"})),1)]),_:1}),e.createElementVNode("div",E,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,a=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:a.id,"content-background":n.selectedId===a.id?"none":"gray",class:e.normalizeClass([{"sv-payment-method-picker__option--selected !bg-white":n.selectedId===a.id},"sv-payment-method-picker__option cursor-pointer"]),onClick:e=>o("select",a.id)},{default:e.withCtx(()=>[e.createVNode(e.unref(t._sfc_main$5),{class:"sv-payment-method-picker__option-content","payment-method":a},null,8,["payment-method"])]),_:2},1032,["content-background","class","onClick"]))),128))])])):e.createCommentVNode("",!0),u.value.length>0?(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(e.unref(t._sfc_main),{variant:"heading-3",tag:"h2",class:"sv-payment-method-picker__title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"All payment methods",id:"upgrade_subscription.payment_picker.all_title",description:"Heading for the all payment methods section in the upgrade subscription payment picker"})),1)]),_:1}),e.createElementVNode("div",T,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,a=>(e.openBlock(),e.createBlock(e.unref(t._sfc_main$1),{key:a.adyen.type,"content-background":n.selectedId===a.adyen.type?"none":"gray",class:e.normalizeClass([{"sv-payment-method-picker__option--selected !bg-white":n.selectedId===a.adyen.type},"sv-payment-method-picker__option cursor-pointer"]),onClick:e=>o("select",a.adyen.type)},{default:e.withCtx(()=>{return[e.createElementVNode("div",A,["scheme"===a.adyen.type?(e.openBlock(),e.createElementBlock("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y(a.adyen.brands),t=>(e.openBlock(),e.createElementBlock("img",{key:t,src:m(t),alt:t,class:"h-5 w-auto rounded"},null,8,D))),128))])):(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("img",{src:(n=a.adyen.type,`https://checkoutshopper-live.adyen.com/checkoutshopper/images/logos/${n}.svg`),alt:a.name,class:"h-9 w-9 object-contain"},null,8,P)])),e.createVNode(e.unref(t._sfc_main),{variant:"body-sm",class:"sv-payment-method-picker__option-label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.name),1)]),_:2},1024)])];var n}),_:2},1032,["content-background","class","onClick"]))),128))])])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("div",O,[...i[0]||(i[0]=[e.createElementVNode("div",{class:"sv-skeleton h-[52px] animate-pulse rounded-md bg-gray-100"},null,-1),e.createElementVNode("div",{class:"sv-skeleton h-[52px] animate-pulse rounded-md bg-gray-100"},null,-1),e.createElementVNode("div",{class:"sv-skeleton h-[52px] animate-pulse rounded-md bg-gray-100"},null,-1)])])):e.createCommentVNode("",!0)]))}}),L={class:"flex gap-1"},F=e.defineComponent({__name:"Kpi",props:{icon:{type:null},kpi:{type:String}},setup:n=>(a,i)=>(e.openBlock(),e.createElementBlock("div",L,[e.createVNode(e.unref(t._sfc_main$6),{icon:n.icon,size:"xs"},null,8,["icon"]),e.createVNode(e.unref(t._sfc_main),{variant:"body-xs"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.kpi),1)]),_:1})]))});const $={key:0,class:"sv-upgrade-subscription sv-root sv-screen sv-upgrade-subscription--purchased flex h-full items-center justify-center p-8"},q={class:"sv-upgrade-subscription__success-body flex flex-col items-center py-10"},R=e.defineComponent({__name:"UpgradeSubscription",props:{configuration:{type:Object}},setup(n){const a=n,{$t:l}=t.useIntl(),{dispatchAction:d}=o.useActionDispatchProvider(),{chargeOnDemandPricingItems:p}=function(){const e=r.createRequestService(),t=r.useConfig();return{chargeOnDemandPricingItems:function({scheduleId:n,pricingPlanVersionId:a,pricingItemIds:i,startAt:r,finalizeImmediately:o=!0,paymentMethodId:s}){return e({url:`${t.apiUrls.config}/portal/pricing-plan-schedules/${n}/charge-on-demand-pricing-items`,options:{method:"POST"},data:{...a?{pricing_plan_version_id:a}:{},pricing_item_ids:i,...r?{start_at:r}:{},finalize_immediately:o,...s?{payment_method_id:s}:{}}})}}}(),g=s.usePortal(),v=r.useLogger(),y=e.computed(()=>g.value.customer_id),f=e.ref([]),h=e.ref(void 0),b=e.ref(!1),k=e.ref(!1),N=e.ref(void 0),w=e.ref(!1),V=e.computed(()=>(e=>{var t;const n=Date.now(),a=c.pricing_plan_schedule_infos,i=a.find(e=>{const t=Date.parse(e.start_at);return Number.isFinite(t)&&t<=n})??a[0],r=((null==(t=null==i?void 0:i.pricing_plan_version)?void 0:t.pricing_categories)??[]).map(u).filter(e=>{var t,n;return((null==(t=e.pricings)?void 0:t.length)??0)>0||((null==(n=e.pricing_groups)?void 0:n.length)??0)>0});return{pricing_plan_subscription_id:e||c.id,pricing_plan_schedule_id:(null==i?void 0:i.id)??"",pricing_plan_version_id:(null==i?void 0:i.pricing_plan_version_id)??"",billing_period:{type:"MONTH",value:1},billing_currency:"EUR",pricing_categories:r}})(a.configuration.subscriptionId)),C=e.computed(()=>V.value.pricing_categories),E=e.computed(()=>C.value.flatMap(e=>[...e.pricings??[],...(e.pricing_groups??[]).flatMap(e=>e.pricings??[])])),S=e.computed(()=>E.value.filter(e=>f.value.includes(e.id)));let T;e.watch(f,e=>{if(clearTimeout(T),0===e.length)return N.value=void 0,void(w.value=!1);w.value=!0,T=setTimeout(()=>{N.value=(e=>{const t=e.reduce((e,t)=>e+(m[t]??0),0),n=Math.round(.21*t*100)/100,a=t+n;return{invoice:{tax_summary:{base_amount:_(t),tax_amount:_(n),total_amount:_(a),country_code:"NL"}},first_invoice:{},invoice_infos:[]}})(e).invoice,w.value=!1},400)});const A=e=>{f.value.includes(e)?f.value=f.value.filter(t=>t!==e):f.value=[...f.value,e]},I=e.computed(()=>f.value.length>0&&!!h.value),D=e.ref(void 0),M=async()=>{if(I.value){b.value=!0,D.value=void 0;try{const e=S.value.map(e=>{var t,n;return null==(n=null==(t=e.items)?void 0:t[0])?void 0:n.id}).filter(e=>!!e),t=h.value&&h.value.startsWith("pmet_")?h.value:void 0,n=await p({scheduleId:V.value.pricing_plan_schedule_id,pricingPlanVersionId:V.value.pricing_plan_version_id,pricingItemIds:e,finalizeImmediately:!0,paymentMethodId:t});t?k.value=!0:d({action:"pay-invoice",data:{invoiceId:n.id}})}catch(e){v.error("PURCHASE_FAILED","Failed to complete upgrade subscription purchase",{},e),D.value=l({defaultMessage:"Something went wrong. Please try again.",id:"upgrade_subscription.purchase_error",description:"Error message shown when the purchase call fails on the upgrade subscription page"})}finally{b.value=!1}}};return(a,r)=>k.value?(e.openBlock(),e.createElementBlock("div",$,[e.createVNode(e.unref(t._sfc_main$1),{class:"sv-upgrade-subscription__success"},{default:e.withCtx(()=>[e.createElementVNode("div",q,[e.createVNode(e.unref(t._sfc_main$6),{icon:"check_circle",class:"sv-upgrade-subscription__success-icon text-green-400",size:"lg"}),e.createVNode(e.unref(t._sfc_main),{variant:"heading-3",tag:"span",class:"sv-upgrade-subscription__success-title mt-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Payment successful",id:"upgrade_subscription.success.title",description:"Title shown after a successful add-on purchase"})),1)]),_:1}),e.createVNode(e.unref(t._sfc_main),{variant:"body-sm",shade:"lighter",tag:"span",class:"sv-upgrade-subscription__success-message mt-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Your add-ons have been activated.",id:"upgrade_subscription.success.subtitle",description:"Subtitle shown after a successful add-on purchase"})),1)]),_:1})])]),_:1})])):(e.openBlock(),e.createBlock(e.unref(i.ContentWithAsideLayout),{key:1,class:"sv-upgrade-subscription sv-root sv-screen"},{content:e.withCtx(()=>[C.value.length>0?(e.openBlock(),e.createBlock(B,{key:0,class:"sv-upgrade-subscription__pricing-list",categories:C.value,"selected-pricing-ids":f.value,onToggle:A},null,8,["categories","selected-pricing-ids"])):(e.openBlock(),e.createBlock(e.unref(t._sfc_main),{key:1,variant:"body-sm",shade:"lighter",class:"sv-upgrade-subscription__empty-state p-4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"No on-demand add-ons are available for this subscription.",id:"upgrade_subscription.empty_state",description:"Shown when there are no on-demand add-ons available for the subscription"})),1)]),_:1})),e.createVNode(e.unref(t._sfc_main$24),{spacing:"sm"}),e.createVNode(j,{class:"sv-upgrade-subscription__payment-method-picker","customer-id":y.value,"subscription-id":n.configuration.subscriptionId,"selected-id":h.value,onSelect:r[0]||(r[0]=e=>h.value=e)},null,8,["customer-id","subscription-id","selected-id"])]),aside:e.withCtx(()=>[e.createVNode(x,{class:"sv-upgrade-subscription__order-summary","selected-pricings":S.value,invoice:N.value,"is-pending":w.value},null,8,["selected-pricings","invoice","is-pending"]),D.value?(e.openBlock(),e.createBlock(e.unref(t._sfc_main$15),{key:0,class:"sv-upgrade-subscription__error sv-error",title:D.value},null,8,["title"])):e.createCommentVNode("",!0),e.createVNode(e.unref(t._sfc_main$3),{size:"lg",class:"sv-action sv-action--primary sv-action--full-width sv-upgrade-subscription__purchase full-width",type:"button",disabled:!I.value||b.value,loading:b.value,onClick:M},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({defaultMessage:"Purchase",id:"upgrade_subscription.purchase_button.label",description:"Label for the purchase button on the upgrade subscription page"})),1)]),_:1},8,["disabled","loading"]),e.createVNode(e.unref(t._sfc_main),{tag:"div",variant:"body-sm",shade:"lighter",class:"sv-upgrade-subscription__trust-indicator flex grow justify-center"},{default:e.withCtx(()=>[e.createVNode(F,{icon:"lock",kpi:e.unref(l)({defaultMessage:"Secure and encrypted payments",id:"upgrade_subscription.kpi.encrypted_payments.label",description:"The encrypted payments KPI shown on the upgrade subscription page"})},null,8,["kpi"])]),_:1})]),_:1}))}}),z=e.defineComponent({__name:"UpgradeSubscription.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},setup:t=>(n,a)=>{var i,o,s,c;return e.openBlock(),e.createBlock(r._sfc_main,{"custom-element-name":e.unref(Y),environment:t.environment,locale:t.locale,"portal-object":t.portalObject,"allowed-portal-types":["CUSTOMER"],"primary-color":null==(o=null==(i=t.branding)?void 0:i.colors)?void 0:o.primary,"secondary-color":null==(c=null==(s=t.branding)?void 0:s.colors)?void 0:c.secondary,"experimental-features":t.experimentalFeatures,"log-level":t.logLevel,"on-log":t.onLog,"css-overrides":t.cssOverrides,onError:a[0]||(a[0]=e=>n.$emit("error",e))},{default:e.withCtx(()=>[e.createVNode(R,{configuration:t.configuration},null,8,["configuration"])]),_:1},8,["custom-element-name","environment","locale","portal-object","primary-color","secondary-color","experimental-features","log-level","on-log","css-overrides"])}}),U=r.defineCustomElement(z),Y=r.getComponentName("upgrade-subscription");exports.COMPONENT_NAME=Y,exports.SolvimonUpgradeSubscription=U,exports.defineSolvimonUpgradeSubscription=()=>{customElements.get(Y)||customElements.define(Y,U)};