@solvimon/solvimon-web 0.1.0-alpha.27 → 0.1.0-alpha.28

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 (432) hide show
  1. package/README.md +126 -17
  2. package/dist/ApiStatus-CSFKl_ra.mjs +9 -0
  3. package/dist/{Avatar.vue.es-sfMZiX7A.mjs → Avatar.vue.es-Beg7umjO.mjs} +1 -1
  4. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DmY3a-Wi.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-DBGe1PvD.mjs} +15 -16
  5. package/dist/{Button.vue.es-Cmjfm4jw.mjs → Button.vue.es-rh6mITmN.mjs} +1 -1
  6. package/dist/{ChargeOnDemandModal-CB4mrvkU.mjs → ChargeOnDemandModal-CPjPa_uq.mjs} +235 -247
  7. package/dist/Checkbox.vue.es-DsyiJ-VY.mjs +50 -0
  8. package/dist/Checkout.entry.ce-BZ1rYQvt.mjs +5279 -0
  9. package/dist/{Chip.vue.es-DksjbJO8.mjs → Chip.vue.es-Cn2R_0mE.mjs} +34 -20
  10. package/dist/Comparators.vue.es-DQBI3f7m.mjs +103 -0
  11. package/dist/{ContextMenu.vue.es-zRvoEJlV.mjs → ContextMenu.vue.es-DRxsa7bZ.mjs} +4 -4
  12. package/dist/{CustomerBillingInformation.vue.es-DhFbpZPK.mjs → CustomerBillingInformation.vue.es-DQfL5RMR.mjs} +2 -2
  13. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-B41la-T7.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Ct-eYaEN.mjs} +33 -37
  14. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BzTSwo4i.mjs +2921 -0
  15. package/dist/{DividerText.vue.es-nAo1eRMV.mjs → DividerText.vue.es-M0XqSz55.mjs} +1 -1
  16. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-Bk4zwyWa.mjs +362 -0
  17. package/dist/{ErrorNotification.vue.es-h-D37rfG.mjs → ErrorNotification.vue.es-CKlt4hr2.mjs} +1 -1
  18. package/dist/{IconButton.vue.es-DvfErUOq.mjs → IconButton.vue.es-oe4MVBK1.mjs} +2 -2
  19. package/dist/{IconTitle.vue.es-B_8bS0tn.mjs → IconTitle.vue.es-BO6KBS4v.mjs} +3 -3
  20. package/dist/Input.vue.es-DAlPmtE_.mjs +249 -0
  21. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-gpMtYNzn.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CCTl5GWa.mjs} +14 -13
  22. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-DMGqj_Uk.mjs +56 -0
  23. package/dist/{InvoiceSummary.vue.es-CRiFJ5x-.mjs → InvoiceSummary.vue.es-DbNoGfYN.mjs} +9 -9
  24. package/dist/{Modal.vue.es-BeI5C9-9.mjs → Modal.vue.es-CTNACAst.mjs} +5 -5
  25. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-DqHcOnZp.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-DLfAfB_m.mjs} +72 -73
  26. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DlqoWKQq.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CKm-XYuF.mjs} +3 -3
  27. package/dist/{PaymentHistoryBlock-mCqdFjnL.mjs → PaymentHistoryBlock-BmA8jbMb.mjs} +1 -1
  28. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DxaY3eFN.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BDMse2lO.mjs} +24 -24
  29. package/dist/{PaymentIntegrationForm-DVx4DEtD.mjs → PaymentIntegrationForm-D1Xw-xIt.mjs} +1 -1
  30. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CCxw0PCv.mjs +182 -0
  31. package/dist/{PaymentIntegrationFormAdyen-Yr8p5Fly.mjs → PaymentIntegrationFormAdyen-CfT5aD4L.mjs} +395 -293
  32. package/dist/PaymentIntegrationFormStripe-DKXJ-mjd.mjs +743 -0
  33. package/dist/{PaymentMethod.vue.es-4YRmQZHX.mjs → PaymentMethod.vue.es-Cauxx4Xr.mjs} +3 -3
  34. package/dist/{PaymentMethodForm-Dnj_7mJU.mjs → PaymentMethodForm-CypZOYUZ.mjs} +1 -1
  35. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-DsD3UjkC.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-De8FgdYD.mjs} +57 -65
  36. package/dist/PaymentMethodSelector.vue_vue_type_script_setup_true_lang-Dw28tfpD.mjs +168 -0
  37. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-CjECKNi_.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-OtjVO7lR.mjs} +13 -8
  38. package/dist/PlanCustomizationEditor-Xtww2r9K.mjs +711 -0
  39. package/dist/PortalNotAvailable-B_59GUwN.mjs +25 -0
  40. package/dist/{PricingGroupRangeInput.vue.es-BhNcjD7z.mjs → PricingGroupRangeInput.vue.es-C9LJW3b8.mjs} +5 -5
  41. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CmJITenR.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DdWxoB8q.mjs} +30 -30
  42. package/dist/{RadioGroupExtended.vue.es-9YzXzZF0.mjs → RadioGroupExtended.vue.es-UtKsdmiv.mjs} +2 -2
  43. package/dist/{Section.vue.es-DVEpre9O.mjs → Section.vue.es-iS8hVGWA.mjs} +1 -1
  44. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-xzjqB-v-.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Djc1SkEU.mjs} +13 -12
  45. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D7MFjvrP.mjs +32 -0
  46. package/dist/{StepInput.vue.es-o-3Lg4Ai.mjs → StepInput.vue.es-Dpan1RQd.mjs} +5 -4
  47. package/dist/{SubscriptionDetails.entry.ce-CGl6Z5ql.mjs → SubscriptionDetails.entry.ce-DufQX3uI.mjs} +451 -468
  48. package/dist/{SubscriptionSchedules-DuWZmnD2.mjs → SubscriptionSchedules-DAahcNoI.mjs} +1 -1
  49. package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-C1kTiW-H.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DNr1CqVj.mjs} +750 -763
  50. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-Wmjqy7RZ.mjs +203 -0
  51. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BsdevoeT.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BeRLuEyR.mjs} +123 -88
  52. package/dist/{TooltipParagraph.vue.es-B9A17aG7.mjs → TooltipParagraph.vue.es-BjCn2BF6.mjs} +1 -1
  53. package/dist/{TrialChip.vue.es-Dmv3lPiQ.mjs → TrialChip.vue.es-B-XBSHWE.mjs} +2 -2
  54. package/dist/addressFormats.data-dzBx49dw.mjs +278 -0
  55. package/dist/amount-CondixVt.mjs +36 -0
  56. package/dist/{cn.es-Cvt6TIwv.mjs → cn.es-2bVdkiFV.mjs} +87 -83
  57. package/dist/{comparators.es-D8WGL-c4.mjs → comparators.es-C8rHpb70.mjs} +17 -13
  58. package/dist/components/BillingInformation/BillingInformation.mjs +7 -8
  59. package/dist/components/BillingInformationForm/BillingInformationForm.mjs +394 -350
  60. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +16 -17
  61. package/dist/components/Invoice/Invoice.mjs +206 -209
  62. package/dist/components/InvoiceDetails/InvoiceDetails.mjs +64 -62
  63. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +40 -41
  64. package/dist/components/InvoicesList/InvoicesList.mjs +14 -14
  65. package/dist/components/PaymentHistory/PaymentHistory.mjs +70 -64
  66. package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +31 -31
  67. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +47 -45
  68. package/dist/components/SubscriptionsList/SubscriptionsList.mjs +50 -36
  69. package/dist/components/WalletBalances/WalletBalances.mjs +9 -10
  70. package/dist/core/index.mjs +61 -95
  71. package/dist/customElements-Di3zwlEU.mjs +6447 -0
  72. package/dist/customer-CqddTiOr.mjs +31 -0
  73. package/dist/{de-DE-jkW2dJrX.mjs → de-DE-BNMj3boy.mjs} +16 -10
  74. package/dist/{de-DE-DKp5LCu0.mjs → de-DE-BW8dMvhW.mjs} +72 -18
  75. package/dist/formControl-CsITfsBk.mjs +749 -0
  76. package/dist/index.mjs +2 -2
  77. package/dist/invoiceState-BJVHaKs7.mjs +14 -0
  78. package/dist/{invoices-3520M5AN.mjs → invoices-Cf1qDAv4.mjs} +40 -35
  79. package/dist/{it-IT-BgFVsO5S.mjs → it-IT-Byg06KWc.mjs} +72 -18
  80. package/dist/{it-IT-CaaFToGB.mjs → it-IT-DRvuxM1F.mjs} +9 -3
  81. package/dist/{nl-NL-D0MQKaql.mjs → nl-NL-DLUwWbMG.mjs} +12 -6
  82. package/dist/{nl-NL-UiRWbO9S.mjs → nl-NL-x3zQqzZ7.mjs} +78 -24
  83. package/dist/paymentMethods-BUuOmDq9.mjs +77 -0
  84. package/dist/paymentOutcome-D17VD4MV.mjs +67 -0
  85. package/dist/payments-Ci8bF4C6.mjs +45 -0
  86. package/dist/pricingItemConfigs.es-D3pX_9AJ.mjs +78 -0
  87. package/dist/pricingPlanScheduleOverrides-COr9F8DO.mjs +233 -0
  88. package/dist/pricingPlanSchedules-BK_o9p6h.mjs +38 -0
  89. package/dist/sanitization.es-C6dbuxUJ.mjs +4 -0
  90. package/dist/screens/Checkout/Checkout.mjs +2 -2
  91. package/dist/screens/CustomerOverview/CustomerOverview.mjs +98 -91
  92. package/dist/screens/PayInvoice/PayInvoice.mjs +181 -210
  93. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +98 -86
  94. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +2 -2
  95. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +363 -334
  96. package/dist/sessionReference-B8Dbmx5t.mjs +38 -0
  97. package/dist/sorting.es-qtEN8J8T.mjs +77 -0
  98. package/dist/subscription-BhxoqwcT.mjs +83 -0
  99. package/dist/subscriptions-CwogJODR.mjs +54 -0
  100. package/dist/types/components/InvoiceTable/InvoiceTable.types.d.ts +2 -0
  101. package/dist/types/components/checkout/PromotionCodeSection.types.d.ts +2 -0
  102. package/dist/types/components/customer/CheckoutForm/CheckoutAddressFields.types.d.ts +20 -0
  103. package/dist/types/components/customer/CheckoutForm/CheckoutForm.types.d.ts +15 -0
  104. package/dist/types/components/customer/CustomerPaymentMethodsBlock/CustomerPaymentMethodsBlock.types.d.ts +0 -2
  105. package/dist/types/components/payments/OnDemandPaymentModalShell/OnDemandPaymentModalShell.types.d.ts +0 -1
  106. package/dist/types/components/payments/PaymentCompletedCard/PaymentCompletedCard.types.d.ts +0 -2
  107. package/dist/types/components/payments/PaymentErrorCard/PaymentErrorCard.types.d.ts +9 -2
  108. package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +36 -4
  109. package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripeFrame.types.d.ts +7 -0
  110. package/dist/types/components/payments/PaymentMethodSelector/PaymentMethodSelector.types.d.ts +0 -4
  111. package/dist/types/components/providers/AuthProvider/AuthProvider.lib.d.ts +9 -4
  112. package/dist/types/components/providers/AuthProvider/composables/useAuth.d.ts +1 -3
  113. package/dist/types/components/providers/ConfigProvider/ConfigProvider.lib.d.ts +2 -4
  114. package/dist/types/components/providers/CssOverridesProvider/CssOverridesProvider.lib.d.ts +11 -0
  115. package/dist/types/components/providers/EntryProvider/EntryProvider.lib.d.ts +7 -0
  116. package/dist/types/components/providers/EntryProvider/EntryProvider.types.d.ts +2 -0
  117. package/dist/types/components/providers/EntryProvider/EntryProvider.vue.d.ts +3 -1
  118. package/dist/types/components/providers/ErrorBoundary/ErrorBoundary.vue.d.ts +5 -1
  119. package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.lib.d.ts +2 -2
  120. package/dist/types/components/providers/HostElementProvider/HostElementProvider.lib.d.ts +6 -1
  121. package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +2 -2
  122. package/dist/types/components/providers/LoggerProvider/LoggerProvider.vue.d.ts +5 -1
  123. package/dist/types/components/providers/PortalProvider/PortalProvider.lib.d.ts +10 -7
  124. package/dist/types/components/providers/PortalProvider/PortalProvider.types.d.ts +1 -1
  125. package/dist/types/components/providers/PortalProvider/PortalProvider.vue.d.ts +3 -1
  126. package/dist/types/components/providers/PortalProvider/composables/usePortal.d.ts +2 -2
  127. package/dist/types/components/providers/Provider/Provider.types.d.ts +1 -1
  128. package/dist/types/components/providers/Provider/Provider.vue.d.ts +11 -4
  129. package/dist/types/components/providers/RequiredPropertiesGuard/RequiredPropertiesGuard.vue.d.ts +17 -0
  130. package/dist/types/components/providers/TranslationProvider/TranslationProvider.lib.d.ts +7 -2
  131. package/dist/types/components/providers/TranslationProvider/TranslationProvider.types.d.ts +1 -1
  132. package/dist/types/components/subscriptions/ChargeOnDemandModal/ChargeOnDemandModal.types.d.ts +1 -2
  133. package/dist/types/components/subscriptions/EnabledPricingsList/EnabledPricingsListItem.types.d.ts +2 -0
  134. package/dist/types/components/subscriptions/OrderSummary.types.d.ts +1 -10
  135. package/dist/types/components/subscriptions/SubscriptionCancellationModal/SubscriptionCancellationModal.types.d.ts +5 -1
  136. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementForm.types.d.ts +8 -16
  137. package/dist/types/components/subscriptions/SubscriptionSummary.types.d.ts +1 -14
  138. package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsList.types.d.ts +4 -1
  139. package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsListItem.types.d.ts +1 -2
  140. package/dist/types/components/wallets/AutoTopUpConfig/AutoTopUpConfig.types.d.ts +0 -3
  141. package/dist/types/components/wallets/TopUpModal/TopUpModalForm.types.d.ts +3 -1
  142. package/dist/types/components/wallets/TopUpModal/TopUpModalSuccess.types.d.ts +1 -7
  143. package/dist/types/public/components/BillingInformation/BillingInformation.entry.ce.d.ts +1 -1
  144. package/dist/types/public/components/BillingInformation/BillingInformation.types.d.ts +0 -3
  145. package/dist/types/public/components/BillingInformationForm/BillingInformationForm.entry.ce.d.ts +1 -1
  146. package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.entry.ce.d.ts +1 -1
  147. package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.types.d.ts +0 -1
  148. package/dist/types/public/components/Invoice/Invoice.entry.ce.d.ts +1 -1
  149. package/dist/types/public/components/Invoice/Invoice.types.d.ts +0 -1
  150. package/dist/types/public/components/InvoiceDetails/InvoiceDetails.entry.ce.d.ts +1 -1
  151. package/dist/types/public/components/InvoiceDetails/InvoiceDetails.entry.types.d.ts +3 -2
  152. package/dist/types/public/components/InvoiceDetails/InvoiceDetails.types.d.ts +0 -2
  153. package/dist/types/public/components/InvoiceHeader/InvoiceHeader.entry.ce.d.ts +1 -1
  154. package/dist/types/public/components/InvoiceHeader/InvoiceHeader.types.d.ts +0 -1
  155. package/dist/types/public/components/InvoicesList/InvoicesList.entry.ce.d.ts +1 -1
  156. package/dist/types/public/components/InvoicesList/InvoicesList.types.d.ts +2 -0
  157. package/dist/types/public/components/PaymentHistory/PaymentHistory.entry.ce.d.ts +1 -1
  158. package/dist/types/public/components/PaymentHistory/PaymentHistory.entry.types.d.ts +3 -2
  159. package/dist/types/public/components/PaymentHistory/PaymentHistory.types.d.ts +0 -2
  160. package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.entry.ce.d.ts +1 -1
  161. package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.entry.ce.d.ts +1 -1
  162. package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.entry.types.d.ts +3 -2
  163. package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.types.d.ts +0 -2
  164. package/dist/types/public/components/SubscriptionsList/SubscriptionsList.entry.ce.d.ts +1 -1
  165. package/dist/types/public/components/SubscriptionsList/SubscriptionsList.types.d.ts +3 -0
  166. package/dist/types/public/components/WalletBalances/WalletBalances.entry.ce.d.ts +1 -1
  167. package/dist/types/public/components/WalletBalances/WalletBalances.entry.types.d.ts +1 -3
  168. package/dist/types/public/core/action-request.types.d.ts +5 -0
  169. package/dist/types/public/core/registry.ce.d.ts +3 -3
  170. package/dist/types/public/core/registry.d.ts +0 -3
  171. package/dist/types/public/screens/Checkout/Checkout.entry.ce.d.ts +1 -1
  172. package/dist/types/public/screens/Checkout/Checkout.entry.types.d.ts +0 -7
  173. package/dist/types/public/screens/Checkout/Checkout.types.d.ts +2 -2
  174. package/dist/types/public/screens/CustomerOverview/CustomerOverview.entry.ce.d.ts +1 -1
  175. package/dist/types/public/screens/PayInvoice/PayInvoice.entry.ce.d.ts +1 -1
  176. package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +2 -0
  177. package/dist/types/public/screens/PaymentMethodsManagement/PaymentMethodsManagement.entry.ce.d.ts +1 -1
  178. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.entry.ce.d.ts +1 -1
  179. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.types.d.ts +1 -2
  180. package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.entry.ce.d.ts +1 -1
  181. package/dist/types/services/paymentMethods.types.d.ts +2 -10
  182. package/dist/types/services/requests.types.d.ts +16 -6
  183. package/dist/types/types/errors.d.ts +3 -2
  184. package/dist/types/vendor/@adyen/adyen-web/index.d.ts +2 -0
  185. package/dist/types/vendor/@solvimon/solvimon-types/types/Payment.d.ts +1 -1
  186. package/dist/types/vendor/@solvimon/solvimon-types/utils.d.ts +1 -1
  187. package/dist/types/vendor/@solvimon/solvimon-ui/components/providers/BrandProvider/BrandProvider.types.d.ts +16 -0
  188. package/dist/types/vendor/@solvimon/solvimon-ui/components/providers/IntlProvider/IntlProvider.types.d.ts +66 -0
  189. package/dist/types/vendor/@solvimon/solvimon-ui/index.d.ts +2 -0
  190. package/dist/useActionDispatchProvider-DC_fUykI.mjs +9 -0
  191. package/dist/{useCustomer-B-jyJIVy.mjs → useCustomer-C3kTh7wn.mjs} +2 -2
  192. package/dist/useCustomerFormLabels-CK7K50nB.mjs +1369 -0
  193. package/dist/useIncrementalLoading-C_sHmW7d.mjs +60 -0
  194. package/dist/useInvoiceData-BIh8-h8b.mjs +21 -0
  195. package/dist/useInvoicesList-Y6p0Pqpy.mjs +674 -0
  196. package/dist/{useLoadInitialData-D9GkzY8t.mjs → useLoadInitialData-4k_Cyqef.mjs} +1 -1
  197. package/dist/usePaymentFormHold-FfNc578l.mjs +189 -0
  198. package/dist/{usePaymentMethodAvailability-DAcsKGeh.mjs → usePaymentMethodAvailability-CnYTvG15.mjs} +8 -8
  199. package/dist/usePaymentMethodOptions-1QBcmgUf.mjs +40 -0
  200. package/dist/{usePaymentMethods-CbwnGONc.mjs → usePaymentMethods-gvr-rmwE.mjs} +2 -2
  201. package/dist/{usePayments-Cr6NlGaW.mjs → usePayments-CykCZPG2.mjs} +7 -7
  202. package/dist/usePortal-CxzKGhbK.mjs +7 -0
  203. package/dist/useService-B0OQJmif.mjs +56 -0
  204. package/dist/{useTimePeriod.es-DWLsLFqs.mjs → useTimePeriod.es-JkXdHNWr.mjs} +1 -1
  205. package/dist/useViewport-psZejz_H.mjs +19 -0
  206. package/package.json +28 -55
  207. package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-081H9T3X.js +0 -1
  208. package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DNepCMRp.mjs +0 -223
  209. package/dist/Alert.vue.es-RyK53a2P.js +0 -1
  210. package/dist/Amount.vue.es-DExaYBqm.js +0 -1
  211. package/dist/Avatar.vue.es-BJxSCU76.js +0 -1
  212. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-BV5iEOxn.js +0 -1
  213. package/dist/Button.vue.es-BzkuglKw.js +0 -1
  214. package/dist/ChargeOnDemandModal-b17YswWA.js +0 -1
  215. package/dist/Checkout.entry.ce-HlUrJ1kh.js +0 -2
  216. package/dist/Checkout.entry.ce-X2zGo6hG.mjs +0 -4381
  217. package/dist/Chip.vue.es-B2jjzIOc.js +0 -1
  218. package/dist/Comparators.vue.es-CwhX3rbx.mjs +0 -93
  219. package/dist/Comparators.vue.es-DmkxV0gb.js +0 -1
  220. package/dist/ContentWithAsideLayout-RSdKXqAf.js +0 -1
  221. package/dist/ContextMenu.vue.es-DUU43tCy.js +0 -1
  222. package/dist/CustomerBillingInformation.vue.es-BfPEB42w.js +0 -1
  223. package/dist/CustomerPaymentMethods.lib-BKgQTCtc.js +0 -1
  224. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BISD6n8X.js +0 -1
  225. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DssxYPSA.mjs +0 -2688
  226. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-XufY6bdV.js +0 -1
  227. package/dist/Divider.vue.es-UwnWvUTl.js +0 -1
  228. package/dist/DividerText.vue.es-CoyDk9eH.js +0 -1
  229. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CQ0KrXHJ.js +0 -1
  230. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-QW9NdxyZ.mjs +0 -335
  231. package/dist/ErrorNotification.vue.es-tS9vySUZ.js +0 -1
  232. package/dist/Expand.vue.es-BtM0EZEr.js +0 -1
  233. package/dist/FormMessage.vue.es-dqATjC2N.js +0 -1
  234. package/dist/IconButton.vue.es-DgQN18Am.js +0 -1
  235. package/dist/IconTitle.vue.es-Dn2xcPHj.js +0 -1
  236. package/dist/Input.vue.es-B60eK8Ds.js +0 -1
  237. package/dist/Input.vue.es-CU9u5yKH.mjs +0 -235
  238. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Dqdezse7.js +0 -1
  239. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-Cl6HU243.js +0 -1
  240. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-DNqawlYV.mjs +0 -41
  241. package/dist/InvoiceSummary.vue.es-CAmA8g0t.js +0 -1
  242. package/dist/Modal.vue.es-DvLB3uCG.js +0 -1
  243. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-Dg4rn1cm.js +0 -1
  244. package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-B9R5JRJv.js +0 -1
  245. package/dist/PaymentHistoryBlock-Uw8xeKUk.js +0 -1
  246. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-ALI5f0py.js +0 -1
  247. package/dist/PaymentIntegrationForm-Cx0zCf_C.js +0 -1
  248. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-B-viSd_i.js +0 -1
  249. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CCKCXXZX.mjs +0 -154
  250. package/dist/PaymentIntegrationFormAdyen-B-v-4nlj.js +0 -98
  251. package/dist/PaymentIntegrationFormStripe-CoLmAzas.js +0 -102
  252. package/dist/PaymentIntegrationFormStripe-Ds0BXt89.mjs +0 -587
  253. package/dist/PaymentMethod.vue.es-D0D9jW8s.js +0 -1
  254. package/dist/PaymentMethodForm-CMP5FLRO.js +0 -1
  255. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-nxnGyJmE.js +0 -1
  256. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-CIrrQUS6.js +0 -1
  257. package/dist/PlanCustomizationEditor-DS1r2vBO.js +0 -1
  258. package/dist/PlanCustomizationEditor-DlVSCKGN.mjs +0 -722
  259. package/dist/PricingGroupRangeInput.vue.es-VoOTnHjk.js +0 -185
  260. package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-hS6A-KcP.js +0 -1
  261. package/dist/RadioGroupExtended.vue.es-DlbURHQN.js +0 -1
  262. package/dist/Section.vue.es-Bbt0RITt.js +0 -1
  263. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Dl7MbMlk.js +0 -1
  264. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-CJWE7wVi.mjs +0 -41
  265. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-otI7Hz2w.js +0 -1
  266. package/dist/StepInput.vue.es-H-3R4jJq.js +0 -1
  267. package/dist/SubscriptionDetails.entry.ce-CQUO_uXH.js +0 -1
  268. package/dist/SubscriptionSchedules-Dy0fUgx5.js +0 -1
  269. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Dd_Rr6qn.js +0 -1
  270. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-CYyP4ra9.js +0 -1
  271. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-CsekphtV.mjs +0 -91
  272. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-B4j8Clbj.js +0 -1
  273. package/dist/TooltipParagraph.vue.es-DvC5Wjaz.js +0 -1
  274. package/dist/TrialChip.vue.es-CLQZ5F0n.js +0 -1
  275. package/dist/accel.svg.es-DFJXdioD.js +0 -1
  276. package/dist/ach.svg.es-BYP873jU.js +0 -1
  277. package/dist/adyen-BJfC7N6f.js +0 -1
  278. package/dist/adyenSdk-BP2XXzeJ.js +0 -1
  279. package/dist/amazon-pay.svg.es-CQWgtowB.js +0 -1
  280. package/dist/amex.svg.es-DKhW4Txt.js +0 -1
  281. package/dist/api.es-duCDtZD9.js +0 -1
  282. package/dist/apple-pay.svg.es-Dyojd0F-.js +0 -1
  283. package/dist/bacs.svg.es-GJpZs1sD.js +0 -1
  284. package/dist/bancontact.svg.es-BQh7nAup.js +0 -1
  285. package/dist/carnet.svg.es-DY04-F2L.js +0 -1
  286. package/dist/cartes-bancaires.svg.es-BleHMlkN.js +0 -1
  287. package/dist/cashapp.svg.es-MwXGYom6.js +0 -1
  288. package/dist/cn.es-C9Yqq4tg.js +0 -1
  289. package/dist/comparators.es-OGt19O9U.js +0 -1
  290. package/dist/components/BillingInformation/BillingInformation.cjs +0 -1
  291. package/dist/components/BillingInformationForm/BillingInformationForm.cjs +0 -1
  292. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +0 -1
  293. package/dist/components/Invoice/Invoice.cjs +0 -1
  294. package/dist/components/InvoiceDetails/InvoiceDetails.cjs +0 -1
  295. package/dist/components/InvoiceHeader/InvoiceHeader.cjs +0 -1
  296. package/dist/components/InvoicesList/InvoicesList.cjs +0 -1
  297. package/dist/components/PaymentHistory/PaymentHistory.cjs +0 -1
  298. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +0 -1
  299. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +0 -1
  300. package/dist/components/SubscriptionsList/SubscriptionsList.cjs +0 -1
  301. package/dist/components/WalletBalances/WalletBalances.cjs +0 -1
  302. package/dist/configuration-akTS7Wiw.js +0 -1
  303. package/dist/core/index.cjs +0 -1
  304. package/dist/countryData.es-C4jHBzfo.js +0 -1
  305. package/dist/customElements-B58FcXIN.mjs +0 -6633
  306. package/dist/customElements-DUMRMFQ5.js +0 -1215
  307. package/dist/customer-B3LPAhaD.mjs +0 -31
  308. package/dist/customer-CisTPaXj.js +0 -1
  309. package/dist/customer.es-BButyYo0.js +0 -1
  310. package/dist/dana.svg.es-BDtZLpwd.js +0 -1
  311. package/dist/dankort.svg.es-CksaipXF.js +0 -1
  312. package/dist/de-DE-B4TUdnUf.js +0 -1
  313. package/dist/de-DE-DL74pMLb.js +0 -1
  314. package/dist/diners.svg.es-D6Mu1pqP.js +0 -1
  315. package/dist/discover.svg.es-DgqWCMUM.js +0 -1
  316. package/dist/eftpos.svg.es-Dk2DOT8W.js +0 -1
  317. package/dist/elo.svg.es-C-BzjuRP.js +0 -1
  318. package/dist/en-US-B2XFj-_p.js +0 -1
  319. package/dist/en-US-DQ5vlv9Z.mjs +0 -339
  320. package/dist/en-US-J85TQRI8.js +0 -1
  321. package/dist/en-US-SDhjlY_v.mjs +0 -301
  322. package/dist/eps.svg.es-B_85bP-W.js +0 -1
  323. package/dist/error-BHVZJGwD.mjs +0 -13
  324. package/dist/error-CmduqgVq.js +0 -1
  325. package/dist/floating-ui.vue.es-Bly3DGWm.js +0 -1
  326. package/dist/formControl-ODrpUvcA.js +0 -1
  327. package/dist/formControl-dX7l8o3c.mjs +0 -845
  328. package/dist/formatting.es-C72Nsrmh.js +0 -1
  329. package/dist/gcash.svg.es-BKAdhWzv.js +0 -1
  330. package/dist/getComposedString.es-haS4bAj7.js +0 -1
  331. package/dist/getCountryNameByCode.es-Xxc0nZsH.js +0 -1
  332. package/dist/girocard.svg.es-HSOEvDif.js +0 -1
  333. package/dist/go-pay.svg.es-DQjtunZ_.js +0 -1
  334. package/dist/google-pay.svg.es-hzc_EgiJ.js +0 -1
  335. package/dist/hipercard.svg.es-CbCsRY2q.js +0 -1
  336. package/dist/icon-sprite.svg.es-Ds6lDf5p.js +0 -1
  337. package/dist/ideal.svg.es-Booz1IML.js +0 -1
  338. package/dist/index-BPZPnOQQ.js +0 -7
  339. package/dist/index.cjs +0 -1
  340. package/dist/index.es-BclokHQX.js +0 -1
  341. package/dist/invoices-CKQBLar2.js +0 -1
  342. package/dist/it-IT-CSYvGmpT.js +0 -1
  343. package/dist/it-IT-CqNK62qe.js +0 -1
  344. package/dist/jcb.svg.es-B3WPB8c2.js +0 -1
  345. package/dist/kakao-pay.svg.es-Cs-lCW74.js +0 -1
  346. package/dist/klarna.svg.es-Cs6XaHD7.js +0 -1
  347. package/dist/maestro.svg.es-BvK4oPg4.js +0 -1
  348. package/dist/mastercard.svg.es-lp4AXyyV.js +0 -1
  349. package/dist/momo.svg.es-C5aLYf_R.js +0 -1
  350. package/dist/nl-NL-CpE4IgwO.js +0 -1
  351. package/dist/nl-NL-Dx-TNXQ1.js +0 -1
  352. package/dist/nyce.svg.es-ArAivAZW.js +0 -1
  353. package/dist/object.es-CdriXMPs.js +0 -1
  354. package/dist/open-banking.svg.es-Q3rRkCvP.js +0 -1
  355. package/dist/paymentFailure-Bh60UhxA.mjs +0 -47
  356. package/dist/paymentFailure-Cki8c5BX.js +0 -1
  357. package/dist/paymentMethods-CWlvwK5V.mjs +0 -77
  358. package/dist/paymentMethods-Cw-i95mM.js +0 -1
  359. package/dist/payments-2qeQdpiW.mjs +0 -45
  360. package/dist/payments-CS7_YcOW.js +0 -1
  361. package/dist/paypal.svg.es-Cjp5sNI3.js +0 -1
  362. package/dist/pricing-BIMpDI_p.mjs +0 -29
  363. package/dist/pricing-BOqG21f9.js +0 -1
  364. package/dist/pricing.es-C07bgEZx.js +0 -1
  365. package/dist/pricingItemConfigs.es-D4aYkYcf.js +0 -1
  366. package/dist/pricingItemConfigs.es-ORxsk_YS.mjs +0 -77
  367. package/dist/pricingPlanSchedule-BM8vsKkV.js +0 -1
  368. package/dist/pricingPlanSchedules-B_sTAIgU.js +0 -1
  369. package/dist/pricingPlanSchedules-ChQCbMfe.mjs +0 -32
  370. package/dist/pulse.svg.es-Dit33E8S.js +0 -1
  371. package/dist/screens/Checkout/Checkout.cjs +0 -1
  372. package/dist/screens/CustomerOverview/CustomerOverview.cjs +0 -1
  373. package/dist/screens/PayInvoice/PayInvoice.cjs +0 -1
  374. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +0 -1
  375. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +0 -1
  376. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +0 -1
  377. package/dist/sepa.svg.es-0t4DKeA1.js +0 -1
  378. package/dist/sessionReference-3h-6FdrC.mjs +0 -43
  379. package/dist/sessionReference-m_6Rp4X1.js +0 -1
  380. package/dist/slots.es-T9ZJRGtG.js +0 -1
  381. package/dist/sorting.es-DCihKqD2.mjs +0 -77
  382. package/dist/sorting.es-DQsjKr8A.js +0 -1
  383. package/dist/star.svg.es-D2JncY7b.js +0 -1
  384. package/dist/subscription-D1yHKUNc.mjs +0 -69
  385. package/dist/subscription-ZA62t4E9.js +0 -1
  386. package/dist/subscriptions-DcfcBYAq.mjs +0 -55
  387. package/dist/subscriptions-DwVsf4Ev.js +0 -1
  388. package/dist/trustly.svg.es-GJByiFAs.js +0 -1
  389. package/dist/twint.svg.es-BJ2f48og.js +0 -1
  390. package/dist/typeGuards.es-DS3vZaJn.js +0 -1
  391. package/dist/types/components/payments/AddPaymentMethodModal/AddPaymentMethodModal.types.d.ts +0 -14
  392. package/dist/types/components/payments/SubscriptionPaymentCompletedCard/SubscriptionPaymentCompletedCard.types.d.ts +0 -3
  393. package/dist/types/components/subscriptions/PlanCustomizationForm/AddonSingleEditor.types.d.ts +0 -5
  394. package/dist/types/services/portals.types.d.ts +0 -70
  395. package/dist/types/types/subscription.d.ts +0 -4
  396. package/dist/unionpay.svg.es-DjFZ5EMQ.js +0 -1
  397. package/dist/url-TNRgVI8A.mjs +0 -21
  398. package/dist/url-vloPOiXd.js +0 -1
  399. package/dist/useActionDispatchProvider-B3AvkLL2.mjs +0 -11
  400. package/dist/useActionDispatchProvider-DFhppdve.js +0 -1
  401. package/dist/useCustomer-BwZKd9i5.js +0 -1
  402. package/dist/useCustomerFormLabels-BQk3d9PZ.mjs +0 -968
  403. package/dist/useCustomerFormLabels-DV9QiMYh.js +0 -1
  404. package/dist/useExperimentalFeature-BciA3Ok9.mjs +0 -135
  405. package/dist/useExperimentalFeature-CGIkgFR4.js +0 -1
  406. package/dist/useIncrementalLoading-CaWOE8Xl.js +0 -1
  407. package/dist/useIncrementalLoading-Cgxw2GD7.mjs +0 -48
  408. package/dist/useInvoiceData-BocKdeg7.mjs +0 -38
  409. package/dist/useInvoiceData-CNV_FMV8.js +0 -1
  410. package/dist/useInvoicesList-C8nsXMJ6.mjs +0 -500
  411. package/dist/useInvoicesList-S0IbQcrD.js +0 -1
  412. package/dist/useLoadInitialData-D_R6Jy1s.js +0 -1
  413. package/dist/usePaymentMethodAvailability-BO_guwAw.js +0 -1
  414. package/dist/usePaymentMethodOptions-1vRAo6Ib.mjs +0 -39
  415. package/dist/usePaymentMethodOptions-CuzOoi2k.js +0 -1
  416. package/dist/usePaymentMethods-DDaTZQZp.js +0 -1
  417. package/dist/usePayments-DDSjo0rH.js +0 -1
  418. package/dist/usePortal-C27omjhz.js +0 -1
  419. package/dist/usePortal-C5AsegpS.mjs +0 -11
  420. package/dist/useService-Bh47bllz.mjs +0 -50
  421. package/dist/useService-H7BjLg8P.js +0 -1
  422. package/dist/useSubscription-BZJL0VOA.mjs +0 -210
  423. package/dist/useSubscription-D787IXY-.js +0 -1
  424. package/dist/useTimePeriod.es-rzxqUCTu.js +0 -1
  425. package/dist/useViewport-BgdA2PPt.mjs +0 -29
  426. package/dist/useViewport-hPRVDWCm.js +0 -1
  427. package/dist/useWatchDebounced-B8iX7ykx.js +0 -1
  428. package/dist/useWatchDebounced-BHlBPcXB.mjs +0 -20
  429. package/dist/visa.svg.es-NY3BHhda.js +0 -1
  430. package/dist/vpay.svg.es-VViQi42w.js +0 -1
  431. package/dist/wallets.es-CNIMW5ay.js +0 -1
  432. package/dist/zip.svg.es-C9S_F31W.js +0 -1
@@ -1,2 +0,0 @@
1
- const e=require("vue"),w=require("./customElements-DUMRMFQ5.js"),Pt=require("./useTimePeriod.es-rzxqUCTu.js"),oe=require("./formatting.es-C72Nsrmh.js"),ie=require("./Button.vue.es-BzkuglKw.js"),yt=require("./ErrorNotification.vue.es-tS9vySUZ.js"),sn=require("./countryData.es-C4jHBzfo.js"),cn=require("./subscriptions-DwVsf4Ev.js"),be=require("./error-CmduqgVq.js"),Dt=require("./TrialChip.vue.es-CLQZ5F0n.js"),Tt=require("./useService-H7BjLg8P.js"),un=require("./invoices-CKQBLar2.js"),ue=require("./pricingPlanSchedule-BM8vsKkV.js"),F=require("./formControl-ODrpUvcA.js"),Te=require("./useCustomerFormLabels-DV9QiMYh.js"),dn=require("./useWatchDebounced-B8iX7ykx.js"),pn=require("./usePaymentMethodOptions-CuzOoi2k.js"),Ee=require("./subscription-ZA62t4E9.js"),Be=require("./pricing-BOqG21f9.js"),de=require("./useExperimentalFeature-CGIkgFR4.js"),ye=require("./url-vloPOiXd.js"),mn=require("./usePortal-C27omjhz.js"),gn=require("./getCountryNameByCode.es-Xxc0nZsH.js"),vt=require("./Expand.vue.es-BtM0EZEr.js"),ce=require("./Input.vue.es-B60eK8Ds.js"),ne=require("./Section.vue.es-Bbt0RITt.js"),fn=require("./Alert.vue.es-RyK53a2P.js"),yn=require("./customer-CisTPaXj.js"),Me=require("./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CQ0KrXHJ.js"),$e=require("./TooltipParagraph.vue.es-DvC5Wjaz.js"),vn=require("./PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-B9R5JRJv.js"),Fe=require("./Amount.vue.es-DExaYBqm.js"),_t=require("./Chip.vue.es-B2jjzIOc.js"),_n=require("./Divider.vue.es-UwnWvUTl.js"),wt=require("./SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Dl7MbMlk.js"),hn=require("./SubscriptionSummary.vue_vue_type_script_setup_true_lang-CYyP4ra9.js"),bn=require("./getComposedString.es-haS4bAj7.js"),St=require("./useViewport-hPRVDWCm.js"),pe=require("./Skeleton.vue_vue_type_script_setup_true_lang-otI7Hz2w.js"),Mn=require("./DividerText.vue.es-CoyDk9eH.js"),Le=require("./adyenSdk-BP2XXzeJ.js"),Nn=require("./payments-CS7_YcOW.js"),In=require("./paymentFailure-Cki8c5BX.js"),Cn=require("./ContentWithAsideLayout-RSdKXqAf.js"),En=require("./cn.es-C9Yqq4tg.js"),xn=require("./sessionReference-m_6Rp4X1.js"),An={AT:"Austria",BE:"Belgium",BG:"Bulgaria",CY:"Cyprus",CZ:"Czech Republic",DE:"Germany",DK:"Denmark",EE:"Estonia",ES:"Spain",FI:"Finland",FR:"France",GR:"Greece",HR:"Croatia",HU:"Hungary",IE:"Ireland",IT:"Italy",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",MT:"Malta",NL:"Netherlands",PL:"Poland",PT:"Portugal",RO:"Romania",SE:"Sweden",SI:"Slovenia",SK:"Slovakia"};function Bt(t){return Object.keys(An).includes(t)}function ht(t,n){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),o.push.apply(o,i)}return o}function xe(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?arguments[n]:{};n%2?ht(Object(o),!0).forEach(function(i){kn(t,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ht(Object(o)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(o,i))})}return t}function kn(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}function Se(t){return typeof t=="function"}function Ye(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function Oe(t){return Se(t.$validator)?xe({},t):{$validator:t}}function Lt(t){return typeof t=="object"?t.$valid:t}function Ot(t){return t.$validator||t}function Pn(t,n){if(!Ye(t))throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof t}`);if(!Ye(n)&&!Se(n))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const o=Oe(n);return o.$params=xe(xe({},o.$params||{}),t),o}function Dn(t,n){if(!Se(t)&&typeof e.unref(t)!="string")throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof t}`);if(!Ye(n)&&!Se(n))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const o=Oe(n);return o.$message=t,o}function Tn(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const o=Oe(t);return xe(xe({},o),{},{$async:!0,$watchTargets:n})}function wn(t){return{$validator(n){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return e.unref(n).reduce((r,u,l)=>{const d=Object.entries(u).reduce((p,s)=>{let[f,E]=s;const b=t[f]||{},D=Object.entries(b).reduce((C,A)=>{let[V,T]=A;const k=Ot(T).call(this,E,u,l,...i),h=Lt(k);if(C.$data[V]=k,C.$data.$invalid=!h||!!C.$data.$invalid,C.$data.$error=C.$data.$invalid,!h){let v=T.$message||"";const M=T.$params||{};typeof v=="function"&&(v=v({$pending:!1,$invalid:!h,$params:M,$model:E,$response:k})),C.$errors.push({$property:f,$message:v,$params:M,$response:k,$model:E,$pending:!1,$validator:V})}return{$valid:C.$valid&&h,$data:C.$data,$errors:C.$errors}},{$valid:!0,$data:{},$errors:[]});return p.$data[f]=D.$data,p.$errors[f]=D.$errors,{$valid:p.$valid&&D.$valid,$data:p.$data,$errors:p.$errors}},{$valid:!0,$data:{},$errors:{}});return{$valid:r.$valid&&d.$valid,$data:r.$data.concat(d.$data),$errors:r.$errors.concat(d.$errors)}},{$valid:!0,$data:[],$errors:[]})},$message:n=>{let{$response:o}=n;return o?o.$errors.map(i=>Object.values(i).map(a=>a.map(r=>r.$message)).reduce((a,r)=>a.concat(r),[])):[]}}}const Vt=t=>{if(t=e.unref(t),Array.isArray(t))return!!t.length;if(t==null)return!1;if(t===!1)return!0;if(t instanceof Date)return!isNaN(t.getTime());if(typeof t=="object"){for(let n in t)return!0;return!1}return!!String(t).length},Sn=t=>(t=e.unref(t),Array.isArray(t)?t.length:typeof t=="object"?Object.keys(t).length:String(t).length);function me(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return i=>(i=e.unref(i),!Vt(i)||n.every(a=>(a.lastIndex=0,a.test(i))))}var Bn=Object.freeze({__proto__:null,forEach:wn,len:Sn,normalizeValidatorObject:Oe,regex:me,req:Vt,unwrap:e.unref,unwrapNormalizedValidator:Ot,unwrapValidatorResponse:Lt,withAsync:Tn,withMessage:Dn,withParams:Pn});me(/^[a-zA-Z]*$/);me(/^[a-zA-Z0-9]*$/);me(/^\d*(\.\d+)?$/);const Ln=/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;me(Ln);const On=/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;me(On);me(/(^[0-9]*$)|(^-[0-9]+$)/);me(/^[-]?\d*(\.\d+)?$/);function Ve(t){return!!sn.countryData.find(n=>n.key===t)}const Rt={AT:{regex:/^ATU\d{8}$/,prefix:"AT",example:"ATU12345678"},BE:{regex:/^BE0?\d{9}$/,prefix:"BE",example:"BE0123456789"},BG:{regex:/^BG\d{9,10}$/,prefix:"BG",example:"BG123456789"},HR:{regex:/^HR\d{11}$/,prefix:"HR",example:"HR12345678901"},CY:{regex:/^CY\d{8}[A-Z]$/,prefix:"CY",example:"CY12345678X"},CZ:{regex:/^CZ\d{8,10}$/,prefix:"CZ",example:"CZ12345678"},DE:{regex:/^DE\d{9}$/,prefix:"DE",example:"DE123456789"},DK:{regex:/^DK\d{8}$/,prefix:"DK",example:"DK12345678"},EE:{regex:/^EE\d{9}$/,prefix:"EE",example:"EE123456789"},GR:{regex:/^(EL|GR)\d{9}$/,prefix:"GR",example:"GR123456789"},ES:{regex:/^ES[A-Z0-9]\d{7}[A-Z0-9]$/,prefix:"ES",example:"ESX1234567X"},FI:{regex:/^FI\d{8}$/,prefix:"FI",example:"FI12345678"},FR:{regex:/^FR[0-9A-Z]{2}\d{9}$/,prefix:"FR",example:"FRXX123456789"},HU:{regex:/^HU\d{8}$/,prefix:"HU",example:"HU12345678"},IE:{regex:/^IE[0-9A-Z]{8,9}$/,prefix:"IE",example:"IE1234567A"},IS:{regex:/^IS\d{5}$/,prefix:"IS",example:"IS12345"},IT:{regex:/^IT\d{11}$/,prefix:"IT",example:"IT12345678901"},LT:{regex:/^LT(\d{9}|\d{12})$/,prefix:"LT",example:"LT123456789 or LT123456789012"},LU:{regex:/^LU\d{8}$/,prefix:"LU",example:"LU12345678"},LV:{regex:/^LV\d{11}$/,prefix:"LV",example:"LV12345678901"},ME:{regex:/^ME\d{9}$/,prefix:"ME",example:"ME123456789"},MT:{regex:/^MT\d{8}$/,prefix:"MT",example:"MT12345678"},NL:{regex:/^NL\d{9}B\d{2}$/,prefix:"NL",example:"NL123456789B01"},PL:{regex:/^PL\d{10}$/,prefix:"PL",example:"PL1234567890"},PT:{regex:/^PT\d{9}$/,prefix:"PT",example:"PT123456789"},RO:{regex:/^RO\d{2,10}$/,prefix:"RO",example:"RO1234567890"},RU:{regex:/^RU(\d{9}|\d{10}|\d{12})$/,prefix:"RU",example:"RU123456789 or RU1234567890 or RU123456789012"},SE:{regex:/^SE\d{10}01$/,prefix:"SE",example:"SE123456789001"},SI:{regex:/^SI\d{8}$/,prefix:"SI",example:"SI12345678"},SK:{regex:/^SK\d{10}$/,prefix:"SK",example:"SK1234567890"},CH:{regex:/^CHE\d{9}(MWST|TVA|IVA)?$/,prefix:"CHE",example:"CHE123456789MWST"},NO:{regex:/^NO\d{9}MVA$/,prefix:"NO",example:"NO123456789MVA"},GB:{regex:/^GB(\d{9}|\d{12}|GD\d{3}|HA\d{3})$/,prefix:"GB",example:"GB123456789"},XI:{regex:/^XI(\d{9}|\d{12})$/,prefix:"XI",example:"XI123456789"}},Vn=t=>!t||typeof t!="string"||t.trim()===""?!0:Object.values(Rt).some(n=>n.regex.test(t)),Rn=({$model:t})=>{if(!t||typeof t!="string"||t.trim()==="")return"";const n=e.inject(w.I18N_INJECTION_KEY,null);if(!n)return"Invalid tax ID";const{formatMessage:o}=n,i=Object.values(Rt).find(a=>t.toUpperCase().startsWith(a.prefix.toUpperCase()));return i?o({defaultMessage:"Invalid tax ID format. Example: {example}",id:"form_validation.tax_id.invalid_format",description:"Error message when tax ID format is invalid but prefix matches"},{example:i.example}):o({defaultMessage:"Invalid tax ID",id:"taxId.invalid",description:"Error message when tax ID is invalid"})},qe=Bn.withMessage(Rn,Vn),zn="preview",jn="NL",zt=t=>{var n,o;if("organization"in t)return(n=t.organization)==null?void 0:n.registered_address;if("individual"in t)return(o=t.individual)==null?void 0:o.residential_address},Un=t=>{const n=zt(t);return{...(n==null?void 0:n.line1)&&{line1:n.line1},...(n==null?void 0:n.line2)&&{line2:n.line2},...(n==null?void 0:n.city)&&{city:n.city},...(n==null?void 0:n.state)&&{state:n.state},country:(n==null?void 0:n.country)||jn,...(n==null?void 0:n.postal_code)&&{postal_code:n.postal_code}}},$n=t=>{var i,a;const n=Un(t),o=t.type??"INDIVIDUAL";if(o==="ORGANIZATION"){const r="organization"in t?t.organization:void 0,u=(a=(i=r==null?void 0:r.tax_ids)==null?void 0:i[0])==null?void 0:a.id;return{type:o,organization:{legal_name:(r==null?void 0:r.legal_name)||zn,registered_address:n,...u&&{tax_id:qe.$validator(u,{},{})?u:void 0}}}}return{type:o,individual:{residential_address:n}}},Fn={AD:"EUR",AE:"AED",AF:"AFN",AG:"XCD",AI:"XCD",AL:"ALL",AM:"AMD",AO:"AOA",AR:"ARS",AS:"USD",AT:"EUR",AU:"AUD",AW:"AWG",AX:"EUR",AZ:"AZN",BA:"BAM",BB:"BBD",BD:"BDT",BE:"EUR",BF:"XOF",BG:"BGN",BH:"BHD",BI:"BIF",BJ:"XOF",BL:"EUR",BM:"BMD",BN:"BND",BO:"BOB",BQ:"USD",BR:"BRL",BS:"BSD",BT:"BTN",BV:"NOK",BW:"BWP",BY:"BYN",BZ:"BZD",CA:"CAD",CC:"AUD",CD:"CDF",CF:"XAF",CG:"XAF",CH:"CHF",CI:"XOF",CK:"NZD",CL:"CLP",CM:"XAF",CN:"CNY",CO:"COP",CR:"CRC",CU:"CUP",CV:"CVE",CW:"ANG",CX:"AUD",CY:"EUR",CZ:"CZK",DE:"EUR",DJ:"DJF",DK:"DKK",DM:"XCD",DO:"DOP",DZ:"DZD",EC:"USD",EE:"EUR",EG:"EGP",EH:"MAD",ER:"ERN",ES:"EUR",ET:"ETB",FI:"EUR",FJ:"FJD",FK:"FKP",FM:"USD",FO:"DKK",FR:"EUR",GA:"XAF",GB:"GBP",GD:"XCD",GE:"GEL",GF:"EUR",GG:"GBP",GH:"GHS",GI:"GIP",GL:"DKK",GM:"GMD",GN:"GNF",GP:"EUR",GQ:"XAF",GR:"EUR",GS:"GBP",GT:"GTQ",GU:"USD",GW:"XOF",GY:"GYD",HK:"HKD",HM:"AUD",HN:"HNL",HR:"EUR",HT:"HTG",HU:"HUF",ID:"IDR",IE:"EUR",IL:"ILS",IM:"GBP",IN:"INR",IO:"USD",IQ:"IQD",IR:"IRR",IS:"ISK",IT:"EUR",JE:"GBP",JM:"JMD",JO:"JOD",JP:"JPY",KE:"KES",KG:"KGS",KH:"KHR",KI:"AUD",KM:"KMF",KN:"XCD",KP:"KPW",KR:"KRW",KW:"KWD",KY:"KYD",KZ:"KZT",LA:"LAK",LB:"LBP",LC:"XCD",LI:"CHF",LK:"LKR",LR:"LRD",LS:"LSL",LT:"EUR",LU:"EUR",LV:"EUR",LY:"LYD",MA:"MAD",MC:"EUR",MD:"MDL",ME:"EUR",MF:"EUR",MG:"MGA",MH:"USD",MK:"MKD",ML:"XOF",MM:"MMK",MN:"MNT",MO:"MOP",MP:"USD",MQ:"EUR",MR:"MRU",MS:"XCD",MT:"EUR",MU:"MUR",MV:"MVR",MW:"MWK",MX:"MXN",MY:"MYR",MZ:"MZN",NA:"NAD",NC:"XPF",NE:"XOF",NF:"AUD",NG:"NGN",NI:"NIO",NL:"EUR",NO:"NOK",NP:"NPR",NR:"AUD",NU:"NZD",NZ:"NZD",OM:"OMR",PA:"PAB",PE:"PEN",PF:"XPF",PG:"PGK",PH:"PHP",PK:"PKR",PL:"PLN",PM:"EUR",PN:"NZD",PR:"USD",PS:"ILS",PT:"EUR",PW:"USD",PY:"PYG",QA:"QAR",RE:"EUR",RO:"RON",RS:"RSD",RU:"RUB",RW:"RWF",SA:"SAR",SB:"SBD",SC:"SCR",SD:"SDG",SE:"SEK",SG:"SGD",SH:"SHP",SI:"EUR",SJ:"NOK",SK:"EUR",SL:"SLE",SM:"EUR",SN:"XOF",SO:"SOS",SR:"SRD",SS:"SSP",ST:"STN",SV:"USD",SX:"ANG",SY:"SYP",SZ:"SZL",TC:"USD",TD:"XAF",TF:"EUR",TG:"XOF",TH:"THB",TJ:"TJS",TK:"NZD",TL:"USD",TM:"TMT",TN:"TND",TO:"TOP",TR:"TRY",TT:"TTD",TV:"AUD",TW:"TWD",TZ:"TZS",UA:"UAH",UG:"UGX",US:"USD",UY:"UYU",UZ:"UZS",VA:"EUR",VC:"XCD",VE:"VES",VG:"USD",VI:"USD",VN:"VND",VU:"VUV",WF:"XPF",WS:"WST",YE:"YER",YT:"EUR",ZA:"ZAR",ZM:"ZMW",ZW:"ZWL"},Gn=t=>{if(t)return Fn[t]},jt=({country:t,pricingCurrencySettings:n,fallbackCurrency:o})=>{const i=Gn(t),a=(n==null?void 0:n.pricing_currencies)??[];return i&&a.includes(i)?i:(n==null?void 0:n.default_pricing_currency)??o??i},Yn=()=>{const{getInvoicePreview:t}=un.createInvoicesService(),n=w.useLogger(),o=e.ref(),i=e.ref(),a=e.ref(),r=e.ref({}),u=e.ref(be.ApiStatus.Initial),l=e.ref({}),d=e.ref(),p=f=>`${f.type}:${f.value}`;return{loadInvoicePreview:async({subscription:f,subscriptionStartAt:E,customer:b={},seatsValues:D,unitsValues:C,enabledPricingIds:A,promotionCode:V})=>{var Z,m,c,I,y,N;const T=$n(b);u.value=be.ApiStatus.Loading;const x=ue.getFirstPricingPlanScheduleOfType({pricingPlanScheduleInfos:f.pricing_plan_schedule_infos,type:"DEFAULT"}),k=(Z=x==null?void 0:x.pricing_plan_version)==null?void 0:Z.pricing_currency_settings,h=(((m=k==null?void 0:k.pricing_currencies)==null?void 0:m.length)??0)>1,v=((I=(c=x==null?void 0:x.pricing_plan_version)==null?void 0:c.billing_period_settings)==null?void 0:I.billing_periods)??[],M=v.length>1,S=v.length>0?v.map(({period:B})=>B):f.billing_period?[f.billing_period]:[],$=jt({country:(y=zt(b))==null?void 0:y.country,pricingCurrencySettings:k,fallbackCurrency:f.billing_currency});if(!S.length){n.warn("INVOICE_PREVIEW_SKIPPED","No billing period to preview an invoice for",{subscriptionId:f.id}),u.value=be.ApiStatus.Done;return}const _=f.billing_period?p(f.billing_period):p(S[0]),P=S.map(async B=>{var W;const z=p(B),R=ue.getScheduleCustomizations({enabledPricings:A==null?void 0:A.map(H=>({pricing_id:H})),seatsValues:D,unitsValues:C,pricingPlanScheduleInfos:f.pricing_plan_schedule_infos,pricingCurrency:h?$:void 0,billingPeriod:M?B:void 0})??[];if(V){const H=(W=f.pricing_plan_schedule_infos.find(({pricing_plan_schedule:j})=>j.type==="DEFAULT"))==null?void 0:W.id;if(H){const j=R.find(({pricing_plan_schedule_id:X})=>X===H);j?j.promotion_codes=[V]:R.push({pricing_plan_schedule_id:H,promotion_codes:[V]})}}const Y={pricingPlanSubscriptionId:f.id,startAt:E,customizations:R,customer:T},K=l.value[z];if(K&&Tt.isEqual(Y,K))return{periodKey:z,response:void 0};l.value={...l.value,[z]:Y};const Q=await t(Y);return{periodKey:z,response:Q}});try{const B={...r.value},z=await Promise.all(P),R=f.pricing_plan_schedule_infos.find(({pricing_plan_schedule:K})=>K.type==="TRIAL"),Y=(N=f.pricing_plan_schedule_infos.find(({pricing_plan_schedule:K})=>K.type==="DEFAULT"))==null?void 0:N.id;z.forEach(({periodKey:K,response:Q})=>{var j;if(!Q)return;d.value=(j=Q.invoice_infos.at(-1))==null?void 0:j.pricing_plan_schedule_id,R&&(i.value=Q.first_invoice,R.start_at&&R.end_at&&(o.value=Dt.convertDateRangeToTimePeriod(new Date(R.start_at),new Date(R.end_at))));const W=Q.invoice_infos.find(({pricing_plan_schedule_id:X})=>X===Y),H=W==null?void 0:W.invoices[0];H&&(B[K]=H)}),r.value=B,a.value=B[_]}catch(B){throw u.value=be.ApiStatus.Failed,n.error("INVOICE_PREVIEW_FAILED","Failed to load the invoice preview",{preview:"CHECKOUT"},B),B}finally{u.value=be.ApiStatus.Done}},invoicePreview:a,invoicePreviewByBillingPeriod:r,trialInvoicePreview:i,trialPeriod:o,lastPreviewScheduleId:d,isPending:e.computed(()=>u.value===be.ApiStatus.Loading)}},bt=["email","country"],Ut="GENERIC_TAX_ID",Mt={US:["addressLine1","postalCode"],CA:["state"]},Kn=t=>!t||!Mt[t]?bt:[...Mt[t],...bt],Nt=t=>{const n={...t.addressLine1&&{line1:t.addressLine1},...t.addressLine2&&{line2:t.addressLine2},...t.city&&{city:t.city},...t.state&&{state:t.state},...t.postalCode&&{postal_code:t.postalCode},country:t.country??""};return t.type==="ORGANIZATION"?{type:"ORGANIZATION",organization:{legal_name:t.companyLegalName??"",registered_address:n,...t.companyVatNumber&&{tax_ids:[{id:t.companyVatNumber,type:Ut}]}}}:{type:"INDIVIDUAL",individual:{residential_address:n}}};function qn(){return{getGeoLocation(){return fetch("https://api.country.is/").then(t=>t.json())}}}function Hn({initialState:t,onRequiredFieldChange:n}){const o=e.ref(we(t)),i=e.ref(we(t)),a=s=>{const f=we({...e.toRaw(o.value),...s});o.value=f,i.value=structuredClone(f)},r=e.computed(()=>Kn(o.value.country)),u=s=>r.value.includes(s),l=F.useValidation({email:{required:F.required,email:F.email},country:{required:F.required},state:{required:F.requiredIf(()=>u("state"))},addressLine1:{required:F.requiredIf(()=>u("addressLine1"))},postalCode:{required:F.requiredIf(()=>u("postalCode"))},companyLegalName:F.requiredIf(o.value.type==="ORGANIZATION"),companyVatNumber:{taxId:qe}},o),d=s=>{s||qn().getGeoLocation().then(({country:f})=>{o.value.country=f})},p=(s,f)=>{const E=Te.objectDiff({from:f,to:s}),b=Object.keys(E).find(Qn);if(b){if(["type","companyVatNumber"].includes(b)){n(s);return}if(b==="seatsValues"){n(s);return}if(b==="unitsValues"){n(s);return}if(b==="enabledPricingIds"){n(s);return}if(b!=="email"&&u(b)){n(s);return}}};return e.onMounted(async()=>{await d(t==null?void 0:t.country)}),dn.useWatchDebounced(()=>JSON.parse(JSON.stringify(o.value)),p,{debounce:200}),{form:o,validation:l,getIsFieldRequired:u,updateInitialState:a,initialState:i}}const we=(t={})=>({email:void 0,country:void 0,type:"INDIVIDUAL",companyLegalName:void 0,firstName:void 0,infix:void 0,lastName:void 0,addressLine1:void 0,addressLine2:void 0,postalCode:void 0,city:void 0,state:void 0,companyVatNumber:void 0,seatsValues:void 0,unitsValues:void 0,enabledPricingIds:void 0,...t});function Qn(t){return t in we()}function Zn(t,n=void 0){const o=n??[],i=Ee.getPricingGroupsFromExtendedPricingPlanSubscription(t);for(const a of i)if(["EXACTLY_ONE","AT_LEAST_ONE"].includes(a.selection_constraint)){const r=a.pricings.map(u=>u.id);if(n!=null&&n.some(u=>r.includes(u)))continue;o.push(a.pricings[0].id)}return o}function Xn(t){return Ee.getPricingGroupsFromExtendedPricingPlanSubscription(t).some(o=>o.selection_constraint==="EXACTLY_ONE"||o.selection_constraint==="AT_LEAST_ONE")}function Wn(t){const n=Be.getAllPricingsFromScheduleInfos(t.pricing_plan_schedule_infos),o=Ee.getPricingGroupsFromExtendedPricingPlanSubscription(t);return n.some(i=>i.product_type==="ADDON")||o.some(i=>i.object_type==="ADDON")}const Jn=t=>{var n;return((n=t.periods)==null?void 0:n.some(o=>{var i;return(i=o.groups)==null?void 0:i.some(a=>{var r;return(r=a.lines)==null?void 0:r.some(u=>u.product_items.some(l=>l.model_type==="USAGE_BASED"))})}))??!1},$t={PRICING:"RECURRING",REVENUE:"RECURRING",COMMITMENT:"RECURRING",ONE_OFF:"ONE_OFF",DISCOUNT:"UNATTRIBUTED",MARKUP:"UNATTRIBUTED",DEDUCTION:"UNATTRIBUTED"},Ft=t=>{var o;if(t.type==="ONE_OFF")return"ONE_OFF";const n=((o=t.product_items)==null?void 0:o.map(({model_type:i})=>i))??[];if(n.length)return n.every(i=>i==="ONE_OFF")?"ONE_OFF":"RECURRING"};function eo(t){var o;const n={RECURRING:[],ONE_OFF:[],UNATTRIBUTED:[]};return(o=t.periods)==null||o.forEach(i=>{var a;(a=i.groups)==null||a.forEach(r=>{var d;const u=$t[r.type]??"UNATTRIBUTED",l=new Set(u==="RECURRING"&&((d=r.lines)!=null&&d.length)?r.lines.map(p=>Ft(p)??"RECURRING"):[u]);n[l.size===1?[...l][0]:"UNATTRIBUTED"].push(r)})}),{recurring:n.RECURRING,oneOff:n.ONE_OFF,other:n.UNATTRIBUTED}}function Gt(t){var d;const n=t.billing_currency,o={RECURRING:{excludingTax:[],includingTax:[]},ONE_OFF:{excludingTax:[],includingTax:[]},UNATTRIBUTED:{excludingTax:[],includingTax:[]}},i=(p,s)=>{const f=o[p];s.amount_excluding_tax&&f.excludingTax.push(s.amount_excluding_tax),s.amount_including_tax&&f.includingTax.push(s.amount_including_tax)};(d=t.periods)==null||d.forEach(p=>{var s;(s=p.groups)==null||s.forEach(f=>{var b;const E=$t[f.type]??"UNATTRIBUTED";if(!((b=f.lines)!=null&&b.length)){i(E,f);return}f.lines.forEach(D=>i(E==="RECURRING"?Ft(D)??E:E,D))})});const a=p=>({excludingTax:de.sumAmounts(o[p].excludingTax,n),includingTax:de.sumAmounts(o[p].includingTax,n)}),r=p=>Number(p.excludingTax.quantity)===0&&Number(p.includingTax.quantity)===0,u=a("ONE_OFF"),l=a("UNATTRIBUTED");return{recurring:a("RECURRING"),oneOff:u,unattributed:l,hasOneOff:!r(u),hasUnattributed:!r(l)}}const It=t=>(t??[]).flatMap(n=>n.configs??[]),Yt=t=>[...t.configs??[],...It(t.billing_period_configs),...(t.pricing_currency_configs??[]).flatMap(n=>[...n.configs??[],...It(n.billing_period_configs)])];function to({pricings:t,pricingItemConfigId:n}){var r,u;const o=t.flatMap(l=>l.items??[]).find(l=>{var d;return(d=l.configs)==null?void 0:d.some(p=>p.id===n)}),i=(r=o==null?void 0:o.configs)==null?void 0:r.find(l=>l.id===n),a=(u=o==null?void 0:o.product_items)==null?void 0:u[0];return{config:i,productItem:a}}const Kt="1";function no(t){const n=Be.getPricingsFromScheduleInfo(t).flatMap(o=>o.items??[]).flatMap(Yt);return new Map(n.flatMap(o=>{var i;return(i=o.default_seats_value)!=null&&i.number?[[o.id,o.default_seats_value.number]]:[]}))}function oo(t){var i;const n=(i=t==null?void 0:t.pricing_plan_schedule)==null?void 0:i.seats_values;if(!t||!(n!=null&&n.length))return;const o=t.pricing_plan_version?no(t):new Map;return n.map(({pricing_item_config_id:a,number:r})=>({pricing_item_config_id:a,number:r||o.get(a)||Kt}))}const qt="1";function ao(t){const n=Be.getPricingsFromScheduleInfo(t).flatMap(o=>o.items??[]).flatMap(Yt);return new Map(n.flatMap(o=>{var i;return(i=o.default_units)!=null&&i.number?[[o.id,o.default_units.number]]:[]}))}function io(t){var i;const n=(i=t==null?void 0:t.pricing_plan_schedule)==null?void 0:i.units;if(!t||!(n!=null&&n.length))return;const o=t.pricing_plan_version?ao(t):new Map;return n.map(({pricing_item_config_id:a,number:r})=>({pricing_item_config_id:a,number:r||o.get(a)||qt}))}const Ge="solvimon_checkout_redirect_state";function ro({initialCountry:t,initialEmail:n,subscriptionId:o,enabledPricingIds:i}){const a=w.useLogger(),r=(()=>{if(t){if(Ve(t))return t;a.error("INVALID_COUNTRY_CODE",`invalid country code provided: "${t}"`)}})(),u=(()=>{if(n){if(/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n))return n;a.error("INVALID_EMAIL",`invalid email provided: "${n}"`)}})(),l=e.ref(!1),d=e.ref(),{getSubscription:p}=cn.createSubscriptionsService(),s=Yn(),f=e.computed(()=>d.value&&h.form.value.country&&S.value),{paymentMethodOptions:E,get:b,isPending:D,error:C}=pn.usePaymentMethodOptions(),A=async(m,c)=>{try{await b({subscriptionId:d.value.id,country:m,amount:c})}catch{a.error("PAYMENT_METHOD_OPTIONS_LOAD_FAILED","Failed to load the payment methods that can be offered",{flow:"CHECKOUT"},C.value)}},V=e.computed(()=>C.value!==null),T=()=>{const{country:m}=h.form.value;!d.value||!m||!S.value||A(m,S.value)},x=()=>{const m=h.form.value;return s.loadInvoicePreview({subscription:d.value,customer:Nt(m),seatsValues:m.seatsValues,unitsValues:m.unitsValues,enabledPricingIds:m.enabledPricingIds??i,promotionCode:m.promotionCode})},k=async m=>{const c=m.promotionCode??h.form.value.promotionCode,I=m.enabledPricingIds??h.form.value.enabledPricingIds,y={...h.form.value,...m};return await s.loadInvoicePreview({subscription:d.value,customer:Nt(y),seatsValues:y.seatsValues,unitsValues:y.unitsValues,enabledPricingIds:I,promotionCode:c}),{trialInvoicePreview:s.trialInvoicePreview.value,invoicePreview:s.invoicePreview.value}},h=Hn({initialState:{country:r,email:u},onRequiredFieldChange:()=>{d.value&&x().catch(()=>{})}}),v=async()=>{var B,z,R,Y;const m=await p({id:o,expanded:!0}),c=ue.getFirstPricingPlanScheduleOfType({pricingPlanScheduleInfos:m.pricing_plan_schedule_infos,type:"DEFAULT"}),I=(Y=(R=(z=(B=c==null?void 0:c.pricing_plan_version)==null?void 0:B.billing_period_settings)==null?void 0:z.billing_periods)==null?void 0:R[0])==null?void 0:Y.period;d.value={...m,billing_period:I??m.billing_period};const y=oo(c),N=io(c);h.updateInitialState({...h.form.value,enabledPricingIds:Zn(m,i),...y?{seatsValues:y}:{},...N?{unitsValues:N}:{}})},M=e.computed(()=>{var Q,W,H,j,X,re,ee,ae,le;const m=h.form.value.firstName||h.form.value.infix||h.form.value.lastName?{...h.form.value.firstName?{first_name:h.form.value.firstName}:{},...h.form.value.infix?{infix:h.form.value.infix}:{},...h.form.value.lastName?{last_name:h.form.value.lastName}:{}}:{},c={...h.form.value.addressLine1&&{line1:h.form.value.addressLine1},...h.form.value.addressLine2&&{line2:h.form.value.addressLine2},...h.form.value.city&&{city:h.form.value.city},...h.form.value.postalCode&&{postal_code:h.form.value.postalCode},...h.form.value.state&&{state:h.form.value.state},country:h.form.value.country??""},I=ue.getFirstPricingPlanScheduleOfType({pricingPlanScheduleInfos:((Q=d.value)==null?void 0:Q.pricing_plan_schedule_infos)??[],type:"DEFAULT"}),y=(W=I==null?void 0:I.pricing_plan_version)==null?void 0:W.pricing_currency_settings,N=(((H=y==null?void 0:y.pricing_currencies)==null?void 0:H.length)??0)>1,z=(((X=(j=I==null?void 0:I.pricing_plan_version)==null?void 0:j.billing_period_settings)==null?void 0:X.billing_periods)??[]).length>1,R=ue.getScheduleCustomizations({enabledPricings:(re=h.form.value.enabledPricingIds)==null?void 0:re.map(te=>({pricing_id:te})),seatsValues:h.form.value.seatsValues,unitsValues:h.form.value.unitsValues,pricingPlanScheduleInfos:((ee=d.value)==null?void 0:ee.pricing_plan_schedule_infos)??[],pricingCurrency:N?(ae=d.value)==null?void 0:ae.billing_currency:void 0,billingPeriod:z?(le=d.value)==null?void 0:le.billing_period:void 0}),Y=h.form.value.promotionCode,K=Y&&d.value?(()=>{var Ne,se,_e;const te=R?[...R]:[],ge=((Ne=te[0])==null?void 0:Ne.pricing_plan_schedule_id)??((_e=ue.getFirstPricingPlanScheduleOfType({pricingPlanScheduleInfos:((se=d.value)==null?void 0:se.pricing_plan_schedule_infos)??[],type:"DEFAULT"}))==null?void 0:_e.id);if(!ge)return R;const ve=te.find(({pricing_plan_schedule_id:J})=>J===ge);if(ve)ve.promotion_codes=[Y];else{const J=R==null?void 0:R[0];te.push({pricing_plan_schedule_id:ge,...(J==null?void 0:J.enabled_pricings)&&{enabled_pricings:J.enabled_pricings},...(J==null?void 0:J.seats_values)&&{seats_values:J.seats_values},...(J==null?void 0:J.units)&&{units:J.units},promotion_codes:[Y]})}return te})():R;return{type:"INIT_PRICING_PLAN_SUBSCRIPTION",init_pricing_plan_subscription:{template_pricing_plan_subscription_id:o,...K&&{pricing_plan_schedule_customizations:K},customer_details:{email:h.form.value.email??"",type:h.form.value.type,...h.form.value.type==="INDIVIDUAL"?{individual:{residential_address:c,...m?{name:m}:{}}}:{organization:{registered_address:c,legal_name:h.form.value.companyLegalName??"",...h.form.value.companyVatNumber&&qe.$validator(h.form.value.companyVatNumber,{},{})?{tax_ids:[{id:h.form.value.companyVatNumber,type:Ut}]}:{}}}}}}}),S=e.computed(()=>{var m,c;return((m=s.trialInvoicePreview.value)==null?void 0:m.invoice_amount_including_tax)??((c=s.invoicePreview.value)==null?void 0:c.invoice_amount_including_tax)}),$=e.computed(()=>s.invoicePreview.value?Gt(s.invoicePreview.value):void 0),_=e.computed(()=>{var m;return((m=$.value)==null?void 0:m.hasOneOff)??!1}),P=e.computed(()=>{var c;const m=$.value;if(m)return m.hasOneOff?m.hasUnattributed?void 0:m.recurring.includingTax:(c=s.invoicePreview.value)==null?void 0:c.invoice_amount_including_tax});e.watch([()=>h.form.value.country,S],([m,c])=>{!d.value||!m||!c||A(m,c)});function Z(){sessionStorage.setItem(Ge,JSON.stringify(h.form.value))}return e.onMounted(async()=>{const m=ye.getQueryParam("redirect_status"),c=!!ye.getQueryParam(de.PAYMENT_ACCEPTOR_ID_QUERY_STRING),I=!!ye.getQueryParam("payment_intent_client_secret")||!!ye.getQueryParam("setup_intent_client_secret");m==="succeeded"&&c&&I&&(l.value=!0);const N=sessionStorage.getItem(Ge);let B=null;if(N)try{B=JSON.parse(N)}catch{}B&&h.updateInitialState(B);try{await v()}catch(z){throw a.error("SUBSCRIPTION_LOAD_FAILED","Failed to load the subscription the checkout prices",{},z),z}try{await x()}catch{}B&&(h.updateInitialState(B),sessionStorage.removeItem(Ge))}),e.watch(f,m=>{m&&T()},{once:!0}),{validatedEmail:u,validatedCountry:r,invoicePreview:s.invoicePreview,invoicePreviewByBillingPeriod:s.invoicePreviewByBillingPeriod,trialInvoicePreview:s.trialInvoicePreview,trialPeriod:s.trialPeriod,loadInvoicePreview:x,updateInvoicePreviewOnBillingInformationChange:k,lastPreviewScheduleId:s.lastPreviewScheduleId,paymentMethodOptions:E,hasPaymentMethodOptionsError:V,retryPaymentMethodOptions:T,isPaymentMethodsPending:D,isInvoicePreviewPending:s.isPending,subscription:d,checkoutForm:h,authorizationContext:M,isPaid:l,amount:S,recurringAmount:P,hasOneOffCharges:_,saveFormStateForRedirect:Z}}function lo({checkoutForm:t,updateInvoicePreviewOnBillingInformationChange:n,formatErrorMessage:o,onInvalidPromotionCode:i,onApplyError:a}){const r=w.useLogger(),u=e.ref(!1),l=e.ref(null),d=(E,b)=>{l.value=o?o({action:E,error:b}):E==="apply"?"Promotion code could not be applied. Please try again.":"Promotion code could not be removed. Please try again."},p=E=>so(E)&&E.field==="promotion_codes",s=async E=>{const b=E==null?void 0:E.trim();if(b){l.value=null,t.form.value.promotionCode=b,u.value=!0;try{await n({promotionCode:b})}catch(D){r.capture(D,{code:"PROMOTION_CODE_APPLY_FAILED",message:"Failed to apply promotion code"}),d("apply",D),a==null||a(),p(D)&&(i==null||i()),await f({suppressError:!0,preserveErrorMessage:!0})}finally{u.value=!1}}},f=async({suppressError:E=!1,preserveErrorMessage:b=!1}={})=>{b||(l.value=null),delete t.form.value.promotionCode,u.value=!0;try{await n({})}catch(D){r.capture(D,{code:"PROMOTION_CODE_REMOVE_FAILED",message:"Failed to remove promotion code"}),E||d("remove",D)}finally{u.value=!1}};return{applyPromotionCode:s,removePromotionCode:f,isPromotionCodePending:u,promotionCodeErrorMessage:l}}function so(t){return typeof t=="object"&&t!==null&&"field"in t}function co({subscription:t,promotionCode:n,appliedPromotionCode:o,applyPromotionCode:i}){e.watch(t,a=>{a&&n&&(o.value=n,i(n))},{once:!0})}const uo={class:"flex items-center gap-2"},po=e.defineComponent({__name:"TaxIDCheckNotice",props:{taxIdValidationResult:{type:Object}},setup(t){const n=t,{formatMessage:o}=w.useIntl(),i=e.computed(()=>n.taxIdValidationResult.valid==="VALID"),a=e.computed(()=>i.value?o({defaultMessage:"VAT number is valid.",id:"tax_check.valid_vat_number",description:"The message shown when the VAT number is valid"}):o({defaultMessage:"VAT number is invalid.",id:"tax_check.invalid_vat_number",description:"The message shown when the VAT number is invalid"}));return(r,u)=>(e.openBlock(),e.createBlock(e.unref(fn._sfc_main),{type:i.value?"success":"danger",icon:!1},{default:e.withCtx(()=>[e.createElementVNode("div",uo,[e.createVNode(e.unref(w._sfc_main),{variant:"body-xs"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value),1)]),_:1})])]),_:1},8,["type"]))}});function mo(t){const{checkTaxID:n}=yn.createCustomerService(),o=e.ref(void 0),i=e.computed(()=>{var f;return((f=t.value.companyVatNumber)==null?void 0:f.trim())??""}),a=e.computed(()=>t.value.companyLegalName??""),r=e.computed(()=>t.value.country),u=e.ref(!1),l=e.computed(()=>Bt(r.value??"")),d=e.computed(()=>!!(i.value&&a.value&&r.value)),p=e.computed(()=>l.value&&i.value);async function s(){var f;if(!(!d.value||!l.value||!r.value)){u.value=!0;try{const E=await n({type:"ORGANIZATION",organization:{legal_name:a.value,tax_ids:[{id:i.value,type:"GENERIC_TAX_ID"}],registered_address:{country:r.value}}});(f=E==null?void 0:E.data)!=null&&f.length?o.value=E.data[0]:o.value=void 0}finally{u.value=!1}}}return{runTaxIDCheck:s,taxIdValidationData:o,isTaxIDCheckPending:u,isTaxIDCheckEnabled:d,showViesCheckNotice:p,isSelectedCountryEU:l}}const go={class:"grid grid-cols-1 gap-1"},fo={class:"grid grid-cols-1 gap-2"},yo={key:0},vo={class:"mt-2 flex flex-col gap-3"},_o={class:"grid grid-cols-3 gap-2"},ho={key:0},bo={class:"mt-4 grid grid-cols-1 gap-3"},Mo="checkout-form",No=e.defineComponent({__name:"CheckoutForm",props:e.mergeModels({validation:{type:null},initialState:{type:Object},readOnlyEmail:{type:String},showCustomerInfoOnTop:{type:Boolean},isBillingInformationMandatory:{type:Boolean},getIsFieldRequired:{type:Function},readOnly:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:e.mergeModels(["submit"],["update:modelValue"]),setup(t){const n=T=>Ve(T),o=t,i=e.ref(!1),a=e.useModel(t,"modelValue"),r=e.computed({get:()=>a.value.type==="ORGANIZATION",set:T=>{a.value.type=T?"ORGANIZATION":"INDIVIDUAL"}}),u=e.computed(()=>a.value.type==="ORGANIZATION"),l=e.reactive({email:F.formControlModel(a,"email",F.asOptionalText),addressLine1:F.formControlModel(a,"addressLine1",F.asOptionalText),addressLine2:F.formControlModel(a,"addressLine2",F.asOptionalText),postalCode:F.formControlModel(a,"postalCode",F.asOptionalText),city:F.formControlModel(a,"city",F.asOptionalText),state:F.formControlModel(a,"state",F.asOptionalText),companyLegalName:F.formControlModel(a,"companyLegalName",F.asOptionalText),companyVatNumber:F.formControlModel(a,"companyVatNumber",F.asOptionalText)}),d=e.computed({get:()=>a.value.country,set:T=>{const x=F.asOptionalText(T);a.value.country=x!==void 0&&n(x)?x:void 0}}),p=e.computed(()=>a.value.country!=="US"),{isTaxIDCheckEnabled:s,isTaxIDCheckPending:f,taxIdValidationData:E,runTaxIDCheck:b}=mo(a),{$t:D}=w.useIntl(),C=Te.useCustomerFormLabels(),A=T=>o.getIsFieldRequired(T)?"":" "+D({defaultMessage:"(optional)",id:"checkout.optional_suffix.label",description:"The suffix for optional fields in the checkout form"}),V=e.computed(()=>a.value.country?gn.getCountryNameByCode(a.value.country):void 0);return(T,x)=>(e.openBlock(),e.createElementBlock("form",{id:Mo,onSubmit:x[12]||(x[12]=e.withModifiers(k=>T.$emit("submit",a.value),["prevent"]))},[e.createElementVNode("div",go,[e.createVNode(e.unref(ne._sfc_main),{title:e.unref(C).contactInformationTitle},{default:e.withCtx(()=>[e.createElementVNode("div",fo,[t.readOnly?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.unref(w._sfc_main),{variant:"body",tag:"span",weight:"semibold","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value.email),1)]),_:1}),e.createVNode(e.unref(w._sfc_main),{variant:"body-sm",tag:"span",color:"subtle","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V.value),1)]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(ce._sfc_main),{modelValue:l.email,"onUpdate:modelValue":x[0]||(x[0]=k=>l.email=k),required:"",type:"email",name:"email",disabled:!!t.readOnlyEmail,label:e.unref(C).emailLabel,placeholder:e.unref(C).emailPlaceholder+A("email"),error:t.validation.value.email.$errors},null,8,["modelValue","disabled","label","placeholder","error"]),e.createVNode(e.unref(Te._sfc_main),{"single-model-value":d.value,"onUpdate:singleModelValue":x[3]||(x[3]=k=>d.value=k),required:"",name:"country",label:e.unref(C).countryLabel+A("country"),error:t.validation.value.country.$errors},{"label-suffix":e.withCtx(()=>[!i.value&&!t.isBillingInformationMandatory?(e.openBlock(),e.createBlock(e.unref(ie._sfc_main),{key:0,size:"xs",intent:"subtle","icon-prefix":"add",class:"py-0.5",onClick:x[1]||(x[1]=k=>i.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(D)({defaultMessage:"More billing details",description:"Label of the button in the checkout that lets you fill out all billing details",id:"checkout.billing_details.add_billing_details_button.label"})),1)]),_:1})):e.createCommentVNode("",!0),i.value&&!t.isBillingInformationMandatory?(e.openBlock(),e.createBlock(e.unref(ie._sfc_main),{key:1,size:"sm",intent:"subtle","icon-prefix":"close",class:"py-0.5",onClick:x[2]||(x[2]=k=>i.value=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(D)({defaultMessage:"Remove billing details",id:"checkout.billing_details.remove_billing_details_button.label",description:"Label of the button in the checkout that lets you remove the billing details"})),1)]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["single-model-value","label","error"])],64))]),e.createVNode(e.unref(vt._sfc_main),{"is-open":i.value||!!t.isBillingInformationMandatory},{default:e.withCtx(()=>[i.value||t.isBillingInformationMandatory?(e.openBlock(),e.createElementBlock("div",yo,[e.createElementVNode("div",vo,[e.createVNode(e.unref(ce._sfc_main),{modelValue:l.addressLine1,"onUpdate:modelValue":x[4]||(x[4]=k=>l.addressLine1=k),name:"address_line_1",label:e.unref(D)({defaultMessage:"Billing address",id:"checkout.address.title",description:"Address line 1 of the customer address in the checkout form"}),placeholder:e.unref(D)({defaultMessage:"Address line 1...",id:"checkout.address.line1.placeholder",description:"Address line 1 of the customer address in the checkout form"})+A("addressLine1"),required:"",error:t.validation.value.addressLine1.$errors},null,8,["modelValue","label","placeholder","error"]),e.createVNode(e.unref(ce._sfc_main),{modelValue:l.addressLine2,"onUpdate:modelValue":x[5]||(x[5]=k=>l.addressLine2=k),name:"address_line_2",placeholder:e.unref(D)({defaultMessage:"Address line 2...",id:"checkout.address.line2.placeholder",description:"Address line 2 of the customer address in the checkout form"})+A("addressLine2")},null,8,["modelValue","placeholder"]),e.createElementVNode("div",_o,[e.createVNode(e.unref(ce._sfc_main),{modelValue:l.postalCode,"onUpdate:modelValue":x[6]||(x[6]=k=>l.postalCode=k),name:"postal_code",placeholder:e.unref(C).postalCodePlaceholder+A("postalCode"),error:t.validation.value.addressLine1.$errors},null,8,["modelValue","placeholder","error"]),e.createVNode(e.unref(ce._sfc_main),{modelValue:l.city,"onUpdate:modelValue":x[7]||(x[7]=k=>l.city=k),name:"city",placeholder:e.unref(C).cityPlaceholder+A("city")},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(ce._sfc_main),{modelValue:l.state,"onUpdate:modelValue":x[8]||(x[8]=k=>l.state=k),name:"state",placeholder:e.unref(C).statePlaceholder+A("state"),error:t.validation.value.state.$errors},null,8,["modelValue","placeholder","error"])])])])):e.createCommentVNode("",!0)]),_:1},8,["is-open"])]),_:1},8,["title"]),t.readOnly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(ne._sfc_main),{key:0},{default:e.withCtx(()=>[e.createVNode(Te._sfc_main$1,{modelValue:r.value,"onUpdate:modelValue":x[9]||(x[9]=k=>r.value=k),"no-spacing":"",class:"!flex"},null,8,["modelValue"]),e.createVNode(e.unref(vt._sfc_main),{"is-open":u.value},{default:e.withCtx(()=>[u.value?(e.openBlock(),e.createElementBlock("div",ho,[e.createElementVNode("div",bo,[e.createVNode(e.unref(ce._sfc_main),{modelValue:l.companyLegalName,"onUpdate:modelValue":x[10]||(x[10]=k=>l.companyLegalName=k),required:"",name:"legal_name",label:e.unref(C).legalNameLabel,placeholder:e.unref(C).legalNamePlaceholder},null,8,["modelValue","label","placeholder"]),p.value?(e.openBlock(),e.createBlock(e.unref(ce._sfc_main),{key:0,modelValue:l.companyVatNumber,"onUpdate:modelValue":x[11]||(x[11]=k=>l.companyVatNumber=k),name:"vat_number","input-class":"focus:outline-none focus:ring-0",label:e.unref(C).vatNumberLabel,placeholder:e.unref(C).vatNumberPlaceholder,error:t.validation.value.companyVatNumber.$errors,"suffix-class":"px-2 border-l-0"},e.createSlots({_:2},[e.unref(Bt)(a.value.country??"")?{name:"suffix",fn:e.withCtx(()=>[e.createVNode(e.unref(ie._sfc_main),{type:"button",size:"sm",intent:"secondary",disabled:!e.unref(s)||e.unref(f)||t.validation.value.companyVatNumber.$invalid,onClick:e.unref(b)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(D)({defaultMessage:"Check",id:"checkout.vat_number.check_button.label",description:"The label for the check button in the checkout form"})),1)]),_:1},8,["disabled","onClick"])]),key:"0"}:void 0]),1032,["modelValue","label","placeholder","error"])):e.createCommentVNode("",!0),e.unref(E)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass({"opacity-75":e.unref(f)})},[e.createVNode(po,{"tax-id-validation-result":e.unref(E)},null,8,["tax-id-validation-result"])],2)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),_:1},8,["is-open"])]),_:1}))])],32))}}),Io={key:0,class:"flex items-center"},Co=["innerHTML"],Eo=["innerHTML"],xo=e.defineComponent({__name:"CheckoutTitle",props:{trialPeriod:{type:Object},subscriptionName:{type:String},amount:{type:Object},dueTodayAmount:{type:Object},recurringAmount:{type:Object},hasOneOffCharges:{type:Boolean},hasRecurringCharge:{type:Boolean},hasUsageCharges:{type:Boolean},billingPeriod:{type:Object},countryCode:{type:null},trialStartDate:{type:Date},subscriptionStartDate:{type:Date}},setup(t){const n=t,{$t:o}=w.useIntl(),i=e.computed(()=>oe.formatBillingPeriod(n.billingPeriod,{short:!0,hideValueForExactPeriods:!0})),a=l=>`<strong>${l}</strong>`,r=e.computed(()=>{const l=oe.formatAmount(n.dueTodayAmount),d=()=>o({defaultMessage:"You will be billed <strong>{due_today}</strong> today.",id:"checkout.one_off_description",description:"The description of an order that is charged once and does not renew"},{due_today:l,strong:a});if(n.recurringAmount){if(Number(n.recurringAmount.quantity)===0){if(n.hasUsageCharges)return o({defaultMessage:"You will be billed <strong>{due_today}</strong> today. Usage is billed every {period_name}.",id:"checkout.usage_with_one_off_description",description:"The description of a usage-based subscription whose first invoice also charges something only once"},{due_today:l,period_name:i.value,strong:a});if(!n.hasRecurringCharge)return d()}const s=oe.formatAmount(n.recurringAmount);return n.trialStartDate?o({defaultMessage:"You will be billed <strong>{due_today}</strong> today, then <strong>{price}</strong> per {period_name}, starting {startDate, date, long}.",id:"checkout.trial_period_description_with_one_off",description:"The description of a trial whose first invoice also charges something only once"},{due_today:l,price:s,period_name:i.value,startDate:n.subscriptionStartDate,strong:a}):o({defaultMessage:"You will be billed <strong>{due_today}</strong> today, then <strong>{price}</strong> per {period_name}.",id:"checkout.subscription_description_with_one_off",description:"The description of a subscription whose first invoice also charges something only once"},{due_today:l,price:s,period_name:i.value,strong:a})}if(n.hasOneOffCharges)return d();const p=oe.formatAmount(n.amount);return n.trialStartDate?o({defaultMessage:"You will be billed <strong>{price}</strong> per {period_name}, starting {startDate, date, long}.",id:"checkout.trial_period_description",description:"The description of the trial period"},{price:p,startDate:n.subscriptionStartDate,period_name:i.value,strong:a}):o({defaultMessage:"You will be billed <strong>{price}</strong> per {period_name}, starting today.",id:"checkout.subscription_description",description:"The description of the subscription"},{price:p,period_name:i.value,strong:a})}),u=e.computed(()=>n.trialStartDate?o({defaultMessage:"per {period_name} starting, {startDate, date, long}",id:"checkout.trial_period_description_without_price",description:"The description of the trial period, while the price is still being determined"},{startDate:n.subscriptionStartDate,period_name:i.value}):o({defaultMessage:"per {period_name}, starting today",id:"checkout.subscription_description_without_price",description:"The description of the subscription, while the price is still being determined"},{period_name:i.value}));return(l,d)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",null,[e.createVNode(e.unref(w._sfc_main),{variant:"heading-1",class:"inline-block"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.trialStartDate?t.subscriptionName:e.unref(o)({defaultMessage:"Pay and subscribe",id:"checkout.page_title",description:"The title of the checkout page"}))+e.toDisplayString(" "),1),t.trialPeriod?(e.openBlock(),e.createBlock(e.unref(Dt._sfc_main),{key:0,"trial-period":t.trialPeriod,size:"lg",class:"-translate-y-0.5"},null,8,["trial-period"])):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(e.unref(w._sfc_main),{variant:"body-sm",color:"subtle","no-spacing":""},{default:e.withCtx(()=>[t.countryCode?(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:r.value},null,8,Eo)):(e.openBlock(),e.createElementBlock("span",Io,[e.createVNode(e.unref($e._sfc_main),{"is-dark-mode":""},{tooltip:e.withCtx(()=>[e.createVNode(e.unref($e.TooltipContent),null,{default:e.withCtx(()=>[e.createVNode(e.unref($e._sfc_main$1),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Will be determined by billing information",description:"Tooltip content for the invoice preview when taxes are not determined by billing information",id:"invoice_preview.taxes_not_determined_by_billing_information_tooltip"})),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(Me._sfc_main$2),{"width-class":"w-10","height-class":"h-4",shade:"darker",class:"mr-1.5 inline-block"})]),_:1}),e.createElementVNode("span",{innerHTML:u.value},null,8,Co)]))]),_:1})]))}}),Ao={class:"flex min-h-96 w-full items-center justify-center"},ko={class:"max-w-sm"},Po=e.defineComponent({__name:"CheckoutNotAvailable",setup(t){const{$t:n}=w.useIntl(),o=()=>{window.location.reload()};return(i,a)=>(e.openBlock(),e.createElementBlock("div",Ao,[e.createElementVNode("div",ko,[e.createVNode(e.unref(w._sfc_main),{variant:"heading-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Checkout not available",id:"checkout.not_available.title",description:"The title of the checkout not available page"})),1)]),_:1}),e.createVNode(e.unref(w._sfc_main),{variant:"body-sm",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"The checkout is currently not available.",id:"checkout.not_available.description",description:"The description of the checkout not available page"}))+" ",1),e.createElementVNode("a",{href:"#",class:"text-primary-900 hover:underline",onClick:e.withModifiers(o,["prevent"])},e.toDisplayString(e.unref(n)({defaultMessage:"Reload",id:"checkout.not_available.reload_button",description:"The label of the reload button"})),1),e.createTextVNode(" "+e.toDisplayString(e.unref(n)({defaultMessage:"this page to try again, or contact customer support.",id:"checkout.not_available.contact_support_message",description:"The message shown when the user wants to contact customer support"})),1)]),_:1})])]))}}),Do=e.defineComponent({__name:"SubscriptionPaymentCompletedCard",emits:["continue-to-merchant"],setup(t){const{$t:n}=w.useIntl();return(o,i)=>(e.openBlock(),e.createBlock(vn._sfc_main,{status:"success",title:e.unref(n)({defaultMessage:"Payment successful",id:"subscription_payment_completed_card.title",description:"The title for when a payment has been successful"})},{default:e.withCtx(()=>[e.createVNode(e.unref(w._sfc_main),{variant:"body-xs",color:"subtle",tag:"span"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Thank you for subscribing.",id:"subscription_payment_completed_card.thank_you_for_subscribing",description:"The text shown after a successful message before a redirect"})),1)]),_:1})]),_:1},8,["title"]))}}),Ke=t=>Number(t.quantity),Ct=t=>{var i;const n=(i=t==null?void 0:t.periods)==null?void 0:i[0];if(!t||!n)return;const o=Gt({...t,periods:[n]});return o.hasOneOff?o.hasUnattributed?void 0:o.recurring.includingTax:n.amount_including_tax},De=(t,n)=>{if(!n)return;const i={DAY:365,WEEK:52,MONTH:12,YEAR:1}[t.type]/Math.max(t.value??1,1),a=Ke(n)*i;if(Number.isFinite(a))return{quantity:a.toFixed(2),currency:n.currency}},Et=(t,n)=>{if(!t||!n)return;const o=Ke(t)-Ke(n);if(!(!Number.isFinite(o)||o<=0))return{quantity:o.toFixed(2),currency:t.currency}},xt=t=>{var n,o;return(n=t.pricing)!=null&&n.name&&!Tt.isEmpty(t.pricing.name)?t.pricing.name:bn.getComposedString(((o=t.products)==null?void 0:o.map(({name:i})=>i))??[])??""},To=(t,n)=>de.sumAmounts(t.map(({amount_excluding_tax:o})=>o),n),wo={class:"flex items-start"},So={class:"flex grow flex-col"},Bo={class:"flex items-center gap-1"},Lo={class:"ml-4 flex items-center self-center"},Ht=e.defineComponent({__name:"PricingGroupContent",props:{name:{type:String},description:{type:String}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",wo,[e.createElementVNode("div",So,[e.createElementVNode("div",Bo,[e.createVNode(e.unref(w._sfc_main),{tag:"span",variant:"body-sm",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.name),1)]),_:1}),e.renderSlot(n.$slots,"badge")]),e.createVNode(e.unref(w._sfc_main),{tag:"span",variant:"body-xs",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.description),1)]),_:1})]),e.createElementVNode("div",Lo,[e.renderSlot(n.$slots,"default")])]))}}),Oo={class:"sv-order-summary__body grid grid-cols-1 gap-1"},Vo={class:"px-3 py-2"},Ro={class:"sv-order-summary__billing-period flex flex-col gap-3"},zo={class:"px-3 py-2"},jo={key:3,class:"sv-order-summary__items"},Uo={class:"flex flex-row gap-2 py-1.5"},$o={key:2,class:"sv-order-summary__renewal flex flex-row gap-2 pt-1.5"},At=e.defineComponent({__name:"OrderSummary",props:{subscription:{type:Object},invoice:{type:Object},invoicePreviewByBillingPeriod:{type:Object},trialInvoice:{type:Object},enabledPricingIds:{type:Array},trialPeriod:{type:Object},avatar:{type:String},isPaid:{type:Boolean},isUsageBased:{type:Boolean},isPreviewAndPaymentMethodsPending:{type:Boolean},collapsible:{type:String},noTitle:{type:Boolean},countryCode:{type:null},variant:{type:String}},emits:["billing-period-change"],setup(t,{emit:n}){const o=t,i=n,{$t:a}=w.useIntl(),{map:r,formatTimePeriod:u}=Pt.useTimePeriod(),{isMobileViewport:l}=St.useViewport(),d=e.computed(()=>l.value?"sm":"xs"),p=c=>`${c.type}:${c.value}`,s=["DAY","WEEK","MONTH","YEAR"],f=c=>s.includes(c),E=c=>{if(!c)return;const[I,y]=c.split(":"),N=Number(y);if(!(!N||!f(I)))return{type:I,value:N}},b=e.computed({get:()=>{const c=o.subscription.billing_period;return c?`${c.type}:${c.value}`:void 0},set:c=>{if(!c)return;const[I,y]=c.split(":"),N=Number(y);N&&f(I)&&i("billing-period-change",{type:I,value:N})}}),D=e.computed({get:()=>b.value,set:c=>{b.value=F.asOptionalText(c)}}),C=c=>{var I;return Ct((I=o.invoicePreviewByBillingPeriod)==null?void 0:I[c])},A=c=>{const I=C(p(c));if(!I)return;const y=c.type==="MONTH"&&c.value===3?a({defaultMessage:"/quarter",id:"checkout.order_summary_block.billing_period.per_quarter",description:"Period label for quarterly billing"}):a({defaultMessage:"/{period}",id:"checkout.order_summary_block.billing_period.per_label",description:"Period label for billing cycles"},{period:u(c,{prefix:!1,hideValueForExactPeriods:!0})});return a({defaultMessage:"{amount}{period}",id:"checkout.order_summary_block.billing_period.sub_label",description:"Billing period option sublabel showing price per period"},{amount:oe.formatAmount(I),period:y})},V=c=>{if(!c)return;const I=a({defaultMessage:"Save {amount}",id:"checkout.order_summary_block.billing_period.save_badge.prefix",description:"First line for the savings badge label"},{amount:oe.formatAmount(c)}),y=a({defaultMessage:"/year",id:"checkout.order_summary_block.billing_period.save_badge.suffix",description:"Second line for the savings badge label"});return`${I}${y}`},T=e.computed(()=>o.invoice?eo(o.invoice):{recurring:[],oneOff:[],other:[]}),x=e.computed(()=>T.value.recurring.length>0&&T.value.oneOff.length>0),k=c=>c.length>1&&o.invoice?To(c,o.invoice.billing_currency):void 0,h=e.computed(()=>x.value?Ct(o.invoice):void 0),v=e.computed(()=>h.value&&Number(h.value.quantity)!==0?h.value:void 0),M=e.computed(()=>{var Q,W,H;const c=ue.getFirstPricingPlanScheduleOfType({pricingPlanScheduleInfos:o.subscription.pricing_plan_schedule_infos??[],type:"DEFAULT"}),I=((W=(Q=c==null?void 0:c.pricing_plan_version)==null?void 0:Q.billing_period_settings)==null?void 0:W.billing_periods)??[],y=new Map,N=j=>{j&&y.set(p(j),j)},B=j=>{var X;(X=j==null?void 0:j.items)==null||X.forEach(re=>{var ee,ae;(ee=re.billing_period_configs)==null||ee.forEach(le=>N(le.billing_period)),(ae=re.pricing_currency_configs)==null||ae.forEach(le=>{var te;(te=le.billing_period_configs)==null||te.forEach(ge=>N(ge.billing_period))})})};if((((H=c==null?void 0:c.pricing_plan_version)==null?void 0:H.pricing_categories)??[]).forEach(j=>{var X,re;(X=j.pricings)==null||X.forEach(ee=>B(ee)),(re=j.pricing_groups)==null||re.forEach(ee=>{var ae;return(ae=ee.pricings)==null?void 0:ae.forEach(le=>B(le))})}),!y.size)return[];const R=I.map(j=>y.get(p(j.period))).filter(j=>!!j),Y=new Set(R.map(p)),K=[...y.values()].filter(j=>!Y.has(p(j)));return[...R,...K]}),S=e.computed(()=>{const c=M.value[M.value.length-1],I=c?De(c,C(p(c))):void 0;return M.value.map(N=>{const B=N.type==="MONTH"&&N.value===3?a({defaultMessage:"Billed quarterly",id:"checkout.order_summary_block.billing_period.quarterly",description:"Billing period option label for quarterly billing"}):a({defaultMessage:"Billed {period}",id:"checkout.order_summary_block.billing_period.label",description:"Billing period option label for the selected period"},{period:r.value[N.type].full}),z=C(p(N)),R=De(N,z),Y=c&&N.type===c.type&&N.value===c.value?void 0:Et(R,I),K=V(Y);return{label:B,subLabel:A(N),labelSuffixComponent:K?{component:_t._sfc_main,props:{color:"primary",content:K,size:d.value,class:"whitespace-nowrap text-left leading-tight"}}:void 0,hidden:b.value===`${N.type}:${N.value}`,value:`${N.type}:${N.value}`}})}),$=e.computed(()=>{const c=S.value,I=c[0],y=c[c.length-1];return{smallestPeriod:I==null?void 0:I.value,biggestPeriod:y==null?void 0:y.value}}),_=e.computed(()=>S.value.find(c=>c.value===$.value.biggestPeriod)),P=e.computed(()=>S.value.find(c=>c.value===b.value)),Z=e.computed(()=>{const c=S.value,I=c[c.length-1],y=b.value;if(!I||!y||y===I.value)return"";const N=E(I.value);if(!N)return"";const B=C(I.value),z=E(y),R=C(y);if(!z||!R)return"";const Y=De(z,R),K=De(N,B);return V(Et(Y,K))??""}),m=c=>{const{smallestPeriod:I,biggestPeriod:y}=$.value;b.value=c?y:I};return(c,I)=>(e.openBlock(),e.createBlock(e.unref(ne._sfc_main),{class:"sv-order-summary","no-border":"","no-spacing":"","content-background":"none",title:t.noTitle?void 0:e.unref(a)({defaultMessage:"Order summary",id:"checkout.order_summary_block.title",description:"The title of the order summary block that lists the subscription cost in the checkout"})},{default:e.withCtx(()=>[e.createElementVNode("div",Oo,[e.createVNode(e.unref(ne._sfc_main),{"no-spacing":"",class:"sv-order-summary__subscription"},{default:e.withCtx(()=>[t.subscription?(e.openBlock(),e.createBlock(hn._sfc_main,{key:0,avatar:t.avatar,invoice:t.invoice,subscription:t.subscription,"enabled-pricing-ids":t.enabledPricingIds,loading:t.isPreviewAndPaymentMethodsPending,"trial-period":t.trialPeriod},null,8,["avatar","invoice","subscription","enabled-pricing-ids","loading","trial-period"])):e.createCommentVNode("",!0)]),_:1}),S.value.length===2?(e.openBlock(),e.createBlock(e.unref(ne._sfc_main),{key:0,"no-spacing":"","content-classes":b.value===$.value.biggestPeriod?"border-primary-500":void 0},{default:e.withCtx(()=>{var y;return[e.createElementVNode("div",Vo,[e.createElementVNode("div",Ro,[_.value?(e.openBlock(),e.createBlock(Ht,{key:0,name:_.value.label,description:((y=P.value)==null?void 0:y.subLabel)??""},e.createSlots({default:e.withCtx(()=>[e.createVNode(e.unref(F._sfc_main),{"model-value":b.value===$.value.biggestPeriod,"onUpdate:modelValue":m},null,8,["model-value"])]),_:2},[Z.value?{name:"badge",fn:e.withCtx(()=>[e.createVNode(e.unref(_t._sfc_main),{intent:"brand",content:Z.value,size:d.value,class:"whitespace-nowrap text-left leading-tight"},null,8,["content","size"])]),key:"0"}:void 0]),1032,["name","description"])):e.createCommentVNode("",!0)])])]}),_:1},8,["content-classes"])):S.value.length>2?(e.openBlock(),e.createBlock(e.unref(wt._sfc_main),{key:1,"single-model-value":D.value,"onUpdate:singleModelValue":I[0]||(I[0]=y=>D.value=y),class:"sv-order-summary__billing-period",options:S.value,size:"xl","has-large-dropdown":"","show-sub-label-in-input":"","show-suffix-in-closed-input":""},null,8,["single-model-value","options"])):e.createCommentVNode("",!0),t.isUsageBased?(e.openBlock(),e.createBlock(e.unref(ne._sfc_main),{key:2,"no-spacing":"",class:"sv-order-summary__usage"},{default:e.withCtx(()=>[e.createElementVNode("div",zo,[e.createVNode(e.unref(w._sfc_main),{"no-spacing":"",variant:"body-sm",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"+ Usage",id:"checkout.invoice_preview.usage_based_message",description:"The message shown for the usage based invoice preview"})),1)]),_:1})])]),_:1})):e.createCommentVNode("",!0),t.invoice&&t.variant!=="products-inline"?(e.openBlock(),e.createElementBlock("div",jo,[x.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList([{key:"recurring",groups:T.value.recurring,heading:e.unref(a)({defaultMessage:"Subscription",id:"checkout.order_summary_block.recurring_heading",description:"The heading above the charges that are made every billing period"})},{key:"one-off",groups:T.value.oneOff,heading:e.unref(a)({defaultMessage:"One-time charges",id:"checkout.order_summary_block.one_off_heading",description:"The heading above the charges that are made once and not again"})}],y=>(e.openBlock(),e.createElementBlock("div",{key:y.key,class:e.normalizeClass(`sv-order-summary__items-${y.key}`)},[e.createVNode(e.unref(w._sfc_main),{variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.heading),1)]),_:2},1024),e.createVNode(e.unref(ne._sfc_main),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.groups,(N,B)=>(e.openBlock(),e.createElementBlock("div",{key:B,class:"flex flex-row gap-2 py-1.5"},[e.createVNode(e.unref(w._sfc_main),{tag:"span",variant:"body-xs",class:"grow"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(xt)(N)),1)]),_:2},1024),e.createVNode(e.unref(w._sfc_main),{tag:"span",variant:"body-xs"},{default:e.withCtx(()=>[e.createVNode(e.unref(Fe._sfc_main),{value:N.amount_excluding_tax},null,8,["value"])]),_:2},1024)]))),128)),k(y.groups)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.unref(_n._sfc_main),{spacing:"xxs"}),e.createElementVNode("div",Uo,[e.createVNode(e.unref(w._sfc_main),{tag:"span",variant:"body-xs",weight:"semibold",class:"grow"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Subtotal",id:"checkout.order_summary_block.subtotal",description:"The label of a section total in the order summary"})),1)]),_:1}),e.createVNode(e.unref(w._sfc_main),{tag:"span",variant:"body-xs",weight:"semibold"},{default:e.withCtx(()=>[e.createVNode(e.unref(Fe._sfc_main),{value:k(y.groups)},null,8,["value"])]),_:2},1024)])],64)):e.createCommentVNode("",!0)]),_:2},1024)],2))),128)):e.createCommentVNode("",!0),x.value&&T.value.other.length?(e.openBlock(),e.createBlock(e.unref(ne._sfc_main),{key:1},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value.other,(y,N)=>(e.openBlock(),e.createElementBlock("div",{key:N,class:"flex flex-row gap-2 py-1.5"},[e.createVNode(e.unref(w._sfc_main),{tag:"span",variant:"body-xs",class:"grow"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(xt)(y)),1)]),_:2},1024),e.createVNode(e.unref(w._sfc_main),{tag:"span",variant:"body-xs"},{default:e.withCtx(()=>[e.createVNode(e.unref(Fe._sfc_main),{value:y.amount_excluding_tax},null,8,["value"])]),_:2},1024)]))),128))]),_:1})):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(Me._sfc_main$3),{key:2,invoice:t.invoice,"wrapper-component":e.unref(ne._sfc_main)},null,8,["invoice","wrapper-component"]))])):e.createCommentVNode("",!0),e.createVNode(e.unref(ne._sfc_main),{class:"sv-order-summary__totals"},{default:e.withCtx(()=>[t.invoice?(e.openBlock(),e.createBlock(e.unref(Me._sfc_main$1),{key:0,class:"sv-order-summary__invoice-preview",variant:t.variant==="products-inline"?"default":"without-products",invoice:t.invoice,"trial-invoice":t.trialInvoice,"is-paid":t.isPaid,collapsible:t.collapsible,"is-preview-without-taxes":!t.countryCode,"is-customer-facing":""},null,8,["variant","invoice","trial-invoice","is-paid","collapsible","is-preview-without-taxes"])):(e.openBlock(),e.createBlock(e.unref(w._sfc_main),{key:1,variant:"body-sm",color:"subtle",class:"sv-order-summary__empty"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Please select a country first",description:"The message shown for the invoice preview when no country is set",id:"checkout.invoice_preview.no_country_selected_message"})),1)]),_:1})),t.invoice&&v.value?(e.openBlock(),e.createElementBlock("div",$o,[e.createVNode(e.unref(w._sfc_main),{tag:"span",variant:"body-xs",color:"subtle",class:"grow"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Then {amount} per {period}",id:"checkout.order_summary_block.renews_at",description:"The amount the subscription is charged every period after the first invoice"},{amount:e.unref(oe.formatAmount)(v.value),period:e.unref(u)(t.subscription.billing_period,{prefix:!1,singular:!0,hideValueForExactPeriods:!0})})),1)]),_:1})])):e.createCommentVNode("",!0)]),_:1})])]),_:1},8,["title"]))}}),Fo={key:1},Go={key:2},Yo={key:3},Ko={key:4},qo=["href"],Ho=e.defineComponent({__name:"MarkdownInline",props:{nodes:{type:Array}},setup(t){return(n,o)=>{const i=e.resolveComponent("MarkdownInline",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.nodes,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r},[a.type==="text"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(a.value),1)],64)):a.type==="break"?(e.openBlock(),e.createElementBlock("br",Fo)):a.type==="bold"?(e.openBlock(),e.createElementBlock("strong",Go,[e.createVNode(i,{nodes:a.children},null,8,["nodes"])])):a.type==="italic"?(e.openBlock(),e.createElementBlock("em",Yo,[e.createVNode(i,{nodes:a.children},null,8,["nodes"])])):a.type==="underline"?(e.openBlock(),e.createElementBlock("u",Ko,[e.createVNode(i,{nodes:a.children},null,8,["nodes"])])):a.type==="link"?(e.openBlock(),e.createElementBlock("a",{key:5,href:a.href,target:"_blank",rel:"noopener noreferrer",class:"underline"},[e.createVNode(i,{nodes:a.children},null,8,["nodes"])],8,qo)):e.createCommentVNode("",!0)],64))),128)}}}),Qo=/^<u>([\s\S]*?)<\/u>/i,Zo=/^\*\*([\s\S]+?)\*\*/,Xo=/^\*([\s\S]+?)\*/,Wo=/^_([\s\S]+?)_/,Jo=/^\[([^\]]*)\]\(\s*([^)\s]*)\s*\)/,ea=/^<([a-z][a-z0-9+.-]*:[^>\s]+)>/i,ta=/\n[ \t]*\n/;function Ce(t){const n=[];let o="";const i=()=>{o&&(n.push({type:"text",value:o}),o="")};let a=0;for(;a<t.length;){const r=t.slice(a),u=Zo.exec(r);if(u){i(),n.push({type:"bold",children:Ce(u[1])}),a+=u[0].length;continue}const l=Xo.exec(r)??Wo.exec(r);if(l){i(),n.push({type:"italic",children:Ce(l[1])}),a+=l[0].length;continue}const d=Qo.exec(r);if(d){i(),n.push({type:"underline",children:Ce(d[1])}),a+=d[0].length;continue}const p=Jo.exec(r);if(p){i(),n.push(kt(p[2],Ce(p[1]))),a+=p[0].length;continue}const s=ea.exec(r);if(s){i(),n.push(kt(s[1],[{type:"text",value:s[1]}])),a+=s[0].length;continue}if(t[a]===`
2
- `){i(),n.push({type:"break"}),a+=1;continue}o+=t[a],a+=1}return i(),n}function kt(t,n){const o=ye.sanitizeUrl(t);return o?{type:"link",href:o,children:n}:{type:"text",value:Qt(n)}}function Qt(t){return t.map(n=>n.type==="text"?n.value:n.type==="break"?" ":Qt(n.children)).join("")}function na(t){return t!=null&&t.trim()?t.split(ta).map(n=>n.trim()).filter(Boolean).map(n=>({type:"paragraph",children:Ce(n)})):[]}const oa={key:0},aa=e.defineComponent({__name:"MarkdownText",props:{source:{type:[String,null]}},setup(t){const n=t,o=e.computed(()=>na(n.source));return(i,a)=>o.value.length?(e.openBlock(),e.createElementBlock("div",oa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(r,u)=>(e.openBlock(),e.createElementBlock("p",{key:u,class:e.normalizeClass({"mt-2":u>0})},[e.createVNode(Ho,{nodes:r.children},null,8,["nodes"])],2))),128))])):e.createCommentVNode("",!0)}});async function Zt(t,n,{onSubmit:o}={}){const{AdyenCheckout:i}=await Le.loadAdyenSdk();return i(de.getAdyenExpressCheckoutConfiguration({locale:t.locale,amount:t.amount,countryCode:t.countryCode,paymentMethodOptionResponse:t.paymentMethodOptionsResponse,logger:n,onSubmit:o}))}function Xt({props:t,create:n,onMissingButton:o,onMountFailed:i,afterMount:a}){const r=e.ref(),u=w.useLogger(),l=async()=>{const d=await Zt(t,u),p=await n(d);if(!r.value){o();return}try{await p.isAvailable(),p.mount(r.value),a==null||a()}catch(s){i(s)}};return e.onMounted(()=>{l()}),{buttonRef:r}}const ia={key:0,id:"svg-logo",viewBox:"0 0 35 15",class:"h-[44px]"},ra={key:1,src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAxcHgiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAxMDEgMzIiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaW5ZTWluIG1lZXQiIHhtbG5zPSJodHRwOiYjeDJGOyYjeDJGO3d3dy53My5vcmcmI3gyRjsyMDAwJiN4MkY7c3ZnIj48cGF0aCBmaWxsPSIjMDAzMDg3IiBkPSJNIDEyLjIzNyAyLjggTCA0LjQzNyAyLjggQyAzLjkzNyAyLjggMy40MzcgMy4yIDMuMzM3IDMuNyBMIDAuMjM3IDIzLjcgQyAwLjEzNyAyNC4xIDAuNDM3IDI0LjQgMC44MzcgMjQuNCBMIDQuNTM3IDI0LjQgQyA1LjAzNyAyNC40IDUuNTM3IDI0IDUuNjM3IDIzLjUgTCA2LjQzNyAxOC4xIEMgNi41MzcgMTcuNiA2LjkzNyAxNy4yIDcuNTM3IDE3LjIgTCAxMC4wMzcgMTcuMiBDIDE1LjEzNyAxNy4yIDE4LjEzNyAxNC43IDE4LjkzNyA5LjggQyAxOS4yMzcgNy43IDE4LjkzNyA2IDE3LjkzNyA0LjggQyAxNi44MzcgMy41IDE0LjgzNyAyLjggMTIuMjM3IDIuOCBaIE0gMTMuMTM3IDEwLjEgQyAxMi43MzcgMTIuOSAxMC41MzcgMTIuOSA4LjUzNyAxMi45IEwgNy4zMzcgMTIuOSBMIDguMTM3IDcuNyBDIDguMTM3IDcuNCA4LjQzNyA3LjIgOC43MzcgNy4yIEwgOS4yMzcgNy4yIEMgMTAuNjM3IDcuMiAxMS45MzcgNy4yIDEyLjYzNyA4IEMgMTMuMTM3IDguNCAxMy4zMzcgOS4xIDEzLjEzNyAxMC4xIFoiPjwvcGF0aD48cGF0aCBmaWxsPSIjMDAzMDg3IiBkPSJNIDM1LjQzNyAxMCBMIDMxLjczNyAxMCBDIDMxLjQzNyAxMCAzMS4xMzcgMTAuMiAzMS4xMzcgMTAuNSBMIDMwLjkzNyAxMS41IEwgMzAuNjM3IDExLjEgQyAyOS44MzcgOS45IDI4LjAzNyA5LjUgMjYuMjM3IDkuNSBDIDIyLjEzNyA5LjUgMTguNjM3IDEyLjYgMTcuOTM3IDE3IEMgMTcuNTM3IDE5LjIgMTguMDM3IDIxLjMgMTkuMzM3IDIyLjcgQyAyMC40MzcgMjQgMjIuMTM3IDI0LjYgMjQuMDM3IDI0LjYgQyAyNy4zMzcgMjQuNiAyOS4yMzcgMjIuNSAyOS4yMzcgMjIuNSBMIDI5LjAzNyAyMy41IEMgMjguOTM3IDIzLjkgMjkuMjM3IDI0LjMgMjkuNjM3IDI0LjMgTCAzMy4wMzcgMjQuMyBDIDMzLjUzNyAyNC4zIDM0LjAzNyAyMy45IDM0LjEzNyAyMy40IEwgMzYuMTM3IDEwLjYgQyAzNi4yMzcgMTAuNCAzNS44MzcgMTAgMzUuNDM3IDEwIFogTSAzMC4zMzcgMTcuMiBDIDI5LjkzNyAxOS4zIDI4LjMzNyAyMC44IDI2LjEzNyAyMC44IEMgMjUuMDM3IDIwLjggMjQuMjM3IDIwLjUgMjMuNjM3IDE5LjggQyAyMy4wMzcgMTkuMSAyMi44MzcgMTguMiAyMy4wMzcgMTcuMiBDIDIzLjMzNyAxNS4xIDI1LjEzNyAxMy42IDI3LjIzNyAxMy42IEMgMjguMzM3IDEzLjYgMjkuMTM3IDE0IDI5LjczNyAxNC42IEMgMzAuMjM3IDE1LjMgMzAuNDM3IDE2LjIgMzAuMzM3IDE3LjIgWiI+PC9wYXRoPjxwYXRoIGZpbGw9IiMwMDMwODciIGQ9Ik0gNTUuMzM3IDEwIEwgNTEuNjM3IDEwIEMgNTEuMjM3IDEwIDUwLjkzNyAxMC4yIDUwLjczNyAxMC41IEwgNDUuNTM3IDE4LjEgTCA0My4zMzcgMTAuOCBDIDQzLjIzNyAxMC4zIDQyLjczNyAxMCA0Mi4zMzcgMTAgTCAzOC42MzcgMTAgQyAzOC4yMzcgMTAgMzcuODM3IDEwLjQgMzguMDM3IDEwLjkgTCA0Mi4xMzcgMjMgTCAzOC4yMzcgMjguNCBDIDM3LjkzNyAyOC44IDM4LjIzNyAyOS40IDM4LjczNyAyOS40IEwgNDIuNDM3IDI5LjQgQyA0Mi44MzcgMjkuNCA0My4xMzcgMjkuMiA0My4zMzcgMjguOSBMIDU1LjgzNyAxMC45IEMgNTYuMTM3IDEwLjYgNTUuODM3IDEwIDU1LjMzNyAxMCBaIj48L3BhdGg+PHBhdGggZmlsbD0iIzAwOWNkZSIgZD0iTSA2Ny43MzcgMi44IEwgNTkuOTM3IDIuOCBDIDU5LjQzNyAyLjggNTguOTM3IDMuMiA1OC44MzcgMy43IEwgNTUuNzM3IDIzLjYgQyA1NS42MzcgMjQgNTUuOTM3IDI0LjMgNTYuMzM3IDI0LjMgTCA2MC4zMzcgMjQuMyBDIDYwLjczNyAyNC4zIDYxLjAzNyAyNCA2MS4wMzcgMjMuNyBMIDYxLjkzNyAxOCBDIDYyLjAzNyAxNy41IDYyLjQzNyAxNy4xIDYzLjAzNyAxNy4xIEwgNjUuNTM3IDE3LjEgQyA3MC42MzcgMTcuMSA3My42MzcgMTQuNiA3NC40MzcgOS43IEMgNzQuNzM3IDcuNiA3NC40MzcgNS45IDczLjQzNyA0LjcgQyA3Mi4yMzcgMy41IDcwLjMzNyAyLjggNjcuNzM3IDIuOCBaIE0gNjguNjM3IDEwLjEgQyA2OC4yMzcgMTIuOSA2Ni4wMzcgMTIuOSA2NC4wMzcgMTIuOSBMIDYyLjgzNyAxMi45IEwgNjMuNjM3IDcuNyBDIDYzLjYzNyA3LjQgNjMuOTM3IDcuMiA2NC4yMzcgNy4yIEwgNjQuNzM3IDcuMiBDIDY2LjEzNyA3LjIgNjcuNDM3IDcuMiA2OC4xMzcgOCBDIDY4LjYzNyA4LjQgNjguNzM3IDkuMSA2OC42MzcgMTAuMSBaIj48L3BhdGg+PHBhdGggZmlsbD0iIzAwOWNkZSIgZD0iTSA5MC45MzcgMTAgTCA4Ny4yMzcgMTAgQyA4Ni45MzcgMTAgODYuNjM3IDEwLjIgODYuNjM3IDEwLjUgTCA4Ni40MzcgMTEuNSBMIDg2LjEzNyAxMS4xIEMgODUuMzM3IDkuOSA4My41MzcgOS41IDgxLjczNyA5LjUgQyA3Ny42MzcgOS41IDc0LjEzNyAxMi42IDczLjQzNyAxNyBDIDczLjAzNyAxOS4yIDczLjUzNyAyMS4zIDc0LjgzNyAyMi43IEMgNzUuOTM3IDI0IDc3LjYzNyAyNC42IDc5LjUzNyAyNC42IEMgODIuODM3IDI0LjYgODQuNzM3IDIyLjUgODQuNzM3IDIyLjUgTCA4NC41MzcgMjMuNSBDIDg0LjQzNyAyMy45IDg0LjczNyAyNC4zIDg1LjEzNyAyNC4zIEwgODguNTM3IDI0LjMgQyA4OS4wMzcgMjQuMyA4OS41MzcgMjMuOSA4OS42MzcgMjMuNCBMIDkxLjYzNyAxMC42IEMgOTEuNjM3IDEwLjQgOTEuMzM3IDEwIDkwLjkzNyAxMCBaIE0gODUuNzM3IDE3LjIgQyA4NS4zMzcgMTkuMyA4My43MzcgMjAuOCA4MS41MzcgMjAuOCBDIDgwLjQzNyAyMC44IDc5LjYzNyAyMC41IDc5LjAzNyAxOS44IEMgNzguNDM3IDE5LjEgNzguMjM3IDE4LjIgNzguNDM3IDE3LjIgQyA3OC43MzcgMTUuMSA4MC41MzcgMTMuNiA4Mi42MzcgMTMuNiBDIDgzLjczNyAxMy42IDg0LjUzNyAxNCA4NS4xMzcgMTQuNiBDIDg1LjczNyAxNS4zIDg1LjkzNyAxNi4yIDg1LjczNyAxNy4yIFoiPjwvcGF0aD48cGF0aCBmaWxsPSIjMDA5Y2RlIiBkPSJNIDk1LjMzNyAzLjMgTCA5Mi4xMzcgMjMuNiBDIDkyLjAzNyAyNCA5Mi4zMzcgMjQuMyA5Mi43MzcgMjQuMyBMIDk1LjkzNyAyNC4zIEMgOTYuNDM3IDI0LjMgOTYuOTM3IDIzLjkgOTcuMDM3IDIzLjQgTCAxMDAuMjM3IDMuNSBDIDEwMC4zMzcgMy4xIDEwMC4wMzcgMi44IDk5LjYzNyAyLjggTCA5Ni4wMzcgMi44IEMgOTUuNjM3IDIuOCA5NS40MzcgMyA5NS4zMzcgMy4zIFoiPjwvcGF0aD48L3N2Zz4",role:"presentation",class:"h-[22px]"},He=e.defineComponent({__name:"ExpressPaymentMethodButton",props:{type:{type:String}},emits:["click"],setup(t,{emit:n}){const o=t,i=n,a=e.computed(()=>{switch(o.type){case"applepay":return"Apple Pay";case"googlepay":return"Google Pay";case"paypal":return"PayPal";default:return}}),r=e.computed(()=>{switch(o.type){case"applepay":return"!bg-black !py-0";case"googlepay":return"!bg-black bg-[url(https://www.gstatic.com/instantbuy/svg/dark_gpay.svg)] bg-[length:auto_42.5%]";case"paypal":return"!bg-[#ffc439]";default:return}});function u(){i("click")}return(l,d)=>(e.openBlock(),e.createBlock(e.unref(ie._sfc_main),{size:"lg","aria-label":a.value,class:e.normalizeClass([r.value,"!block h-11 w-full bg-center bg-no-repeat"]),onClick:u},{default:e.withCtx(()=>[o.type==="applepay"?(e.openBlock(),e.createElementBlock("svg",ia,[...d[0]||(d[0]=[e.createElementVNode("svg",{id:"svg-logo",x:"0",y:"3.85",height:"7.3",width:"35",class:"logo",viewBox:"0 0 105 43",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("title",null,"Apple Logo"),e.createElementVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createElementVNode("g",{fill:"#FFF"},[e.createElementVNode("path",{d:"M19.4028,5.5674 C20.6008,4.0684 21.4138,2.0564 21.1998,0.0004 C19.4458,0.0874 17.3058,1.1574 16.0668,2.6564 C14.9538,3.9414 13.9688,6.0374 14.2258,8.0074 C16.1948,8.1784 18.1618,7.0244 19.4028,5.5674"}),e.createElementVNode("path",{d:"M21.1772,8.3926 C18.3182,8.2226 15.8872,10.0156 14.5212,10.0156 C13.1552,10.0156 11.0642,8.4786 8.8022,8.5196 C5.8592,8.5626 3.1282,10.2276 1.6342,12.8746 C-1.4378,18.1696 0.8232,26.0246 3.8112,30.3376 C5.2622,32.4716 7.0102,34.8206 9.3142,34.7366 C11.4912,34.6506 12.3442,33.3266 14.9902,33.3266 C17.6352,33.3266 18.4042,34.7366 20.7082,34.6936 C23.0972,34.6506 24.5922,32.5586 26.0422,30.4226 C27.7072,27.9906 28.3882,25.6426 28.4312,25.5126 C28.3882,25.4706 23.8232,23.7186 23.7812,18.4676 C23.7382,14.0706 27.3652,11.9786 27.5362,11.8496 C25.4882,8.8196 22.2872,8.4786 21.1772,8.3926"}),e.createElementVNode("path",{d:"M85.5508,43.0381 L85.5508,39.1991 C85.8628,39.2421 86.6158,39.2871 87.0158,39.2871 C89.2138,39.2871 90.4558,38.3551 91.2108,35.9581 L91.6548,34.5371 L83.2428,11.2321 L88.4368,11.2321 L94.2958,30.1421 L94.4068,30.1421 L100.2668,11.2321 L105.3278,11.2321 L96.6048,35.7141 C94.6078,41.3291 92.3208,43.1721 87.4828,43.1721 C87.1048,43.1721 85.8838,43.1271 85.5508,43.0381"}),e.createElementVNode("path",{d:"M42.6499,19.3555 L48.3549,19.3555 C52.6829,19.3555 55.1469,17.0255 55.1469,12.9855 C55.1469,8.9455 52.6829,6.6375 48.3769,6.6375 L42.6499,6.6375 L42.6499,19.3555 Z M49.6869,2.4425 C55.9009,2.4425 60.2289,6.7265 60.2289,12.9625 C60.2289,19.2225 55.8129,23.5285 49.5309,23.5285 L42.6499,23.5285 L42.6499,34.4705 L37.6779,34.4705 L37.6779,2.4425 L49.6869,2.4425 Z"}),e.createElementVNode("path",{d:"M76.5547,25.7705 L76.5547,23.9715 L71.0287,24.3275 C67.9207,24.5275 66.3007,25.6815 66.3007,27.7015 C66.3007,29.6545 67.9887,30.9195 70.6287,30.9195 C74.0027,30.9195 76.5547,28.7665 76.5547,25.7705 M61.4617,27.8345 C61.4617,23.7285 64.5917,21.3755 70.3627,21.0205 L76.5547,20.6425 L76.5547,18.8675 C76.5547,16.2705 74.8457,14.8495 71.8057,14.8495 C69.2967,14.8495 67.4777,16.1375 67.0997,18.1125 L62.6167,18.1125 C62.7497,13.9615 66.6567,10.9435 71.9387,10.9435 C77.6207,10.9435 81.3267,13.9175 81.3267,18.5345 L81.3267,34.4705 L76.7327,34.4705 L76.7327,30.6305 L76.6217,30.6305 C75.3127,33.1395 72.4267,34.7145 69.2967,34.7145 C64.6807,34.7145 61.4617,31.9625 61.4617,27.8345"})])])],-1)])])):o.type==="paypal"?(e.openBlock(),e.createElementBlock("img",ra)):e.createCommentVNode("",!0)]),_:1},8,["aria-label","class"]))}}),la={class:"absolute h-[1px] w-[1px] overflow-hidden opacity-0"},sa="ADYEN",ca=e.defineComponent({__name:"ExpressPaymentMethodApplePay",props:{onBillingInformationChange:{type:Function},context:{type:Object},validateOnSubmit:{type:Function},amount:{type:Object},countryCode:{type:String},locale:{type:String},isVisible:{type:Boolean},paymentMethodOptionsResponse:{type:Object},billingInformation:{type:Object}},emits:["ready","unavailable","update-billing-information","payment-success","payment-failed"],setup(t,{emit:n}){const o=t,i=n,a=e.ref();let r,u=0;const l=w.useLogger(),{authorizePayment:d}=Nn.createPaymentsService(),p=o.paymentMethodOptionsResponse.payment_acceptor.id;function s(v){return In.createPaymentFailureContext({gateway:"ADYEN",paymentAcceptorId:p,paymentMethodType:"applepay",...v})}const f=v=>{var M;return v.status==="SUCCESS"&&((M=v.payment)==null?void 0:M.result)==="AUTHORIZED"},E=async(v,M)=>{const S=$=>{M.reject(),i("payment-failed",$)};try{const $=await d({payment_acceptor_id:p,payment_gateway_variant:sa,adyen:{payment_method:de.transformObjectToAdyenObject(v.data.paymentMethod),...v.data.riskData&&{risk_data:de.transformObjectToAdyenObject(v.data.riskData)},store_payment_method:!0},amount:o.amount,...o.context?{context:o.context}:{},return_url:de.createReturnUrl({paymentAcceptorId:p,redirectUrl:window.location.href})});if(f($)){M.resolve({resultCode:"Authorised"}),i("payment-success");return}l.error("APPLE_PAY_AUTHORIZATION_FAILED","Payment authorization failed",s({reason:"APPLE_PAY_AUTHORIZATION_REJECTED",extra:{paymentStatus:$.status}})),S(new Error(`Apple Pay payment was not authorized (${$.status})`))}catch($){l.error("APPLE_PAY_AUTHORIZATION_FAILED","Apple Pay authorization failed",s({reason:"APPLE_PAY_AUTHORIZATION_FAILED",cause:$}),$),S($ instanceof Error?$:new Error("Apple Pay authorization failed"))}},b=async()=>{const v=u,{ApplePay:M}=await Le.loadAdyenSdk(),S=await Zt(o,l,{onSubmit:(P,Z,m)=>void E(P,m)}),$=o.billingInformation.regular?{paymentDescription:o.billingInformation.description,billingAgreement:o.billingInformation.agreement,managementURL:o.billingInformation.managementURL,...o.billingInformation.trial&&{trialBilling:{label:o.billingInformation.trial.label,amount:o.billingInformation.trial.amount.quantity.toString(),type:"final",paymentTiming:"recurring",recurringPaymentStartDate:o.billingInformation.trial.startDate,recurringPaymentEndDate:o.billingInformation.trial.endDate}},regularBilling:{label:o.billingInformation.regular.label,amount:o.billingInformation.regular.amount.quantity.toString(),type:"final",paymentTiming:"recurring",recurringPaymentStartDate:o.billingInformation.regular.startDate,...C(o.billingInformation.regular.interval??{type:"MONTH",value:1})}}:void 0,_=new M(S,{isExpress:!0,...$&&{recurringPaymentRequest:$},requiredBillingContactFields:["postalAddress"],requiredShippingContactFields:["email"],onPaymentMethodSelected:async(P,Z,m)=>{var N,B,z,R,Y,K,Q,W;const{invoicePreview:c,trialInvoicePreview:I}=await o.onBillingInformationChange({...((N=m.paymentMethod.billingContact)==null?void 0:N.postalCode)&&{postalCode:m.paymentMethod.billingContact.postalCode},...((B=m.paymentMethod.billingContact)==null?void 0:B.locality)&&{city:m.paymentMethod.billingContact.locality},...T((z=m.paymentMethod.billingContact)==null?void 0:z.countryCode)&&{country:T((R=m.paymentMethod.billingContact)==null?void 0:R.countryCode)}}),y=I?I.invoice_amount_including_tax.quantity.toString():c.invoice_amount_including_tax.quantity.toString();i("update-billing-information",{postal_code:(Y=m.paymentMethod.billingContact)==null?void 0:Y.postalCode,city:(K=m.paymentMethod.billingContact)==null?void 0:K.locality,country:(Q=m.paymentMethod.billingContact)==null?void 0:Q.countryCode}),P({newTotal:{label:((W=o.billingInformation.regular)==null?void 0:W.label)??o.billingInformation.description,amount:y,type:"final"}})},onError:P=>{l.error("APPLE_PAY_ERROR","Apple Pay error",s({reason:"APPLE_PAY_ERROR",cause:P}),P)},onAuthorized:async(P,Z)=>{var m,c,I,y;try{const N=(m=P.authorizedEvent.payment)==null?void 0:m.billingContact,B=N?A(N):P.billingAddress?V(P.billingAddress):void 0,z=(I=(c=P.authorizedEvent.payment)==null?void 0:c.shippingContact)==null?void 0:I.emailAddress;if((B||z)&&(i("update-billing-information",{...B,...z&&{email:z}}),await e.nextTick()),!(await((y=o.validateOnSubmit)==null?void 0:y.call(o))??!0)){l.warn("APPLE_PAY_FORM_INCOMPLETE","Apple Pay authorization stopped: the checkout form is incomplete",s({reason:"APPLE_PAY_FORM_INVALID"})),Z.reject(),i("payment-failed",new Error("The checkout form is incomplete"));return}Z.resolve()}catch(N){l.error("APPLE_PAY_AUTHORIZATION_FAILED","Apple Pay authorization failed",s({reason:"APPLE_PAY_AUTHORIZATION_FAILED",cause:N}),N),Z.reject(),i("payment-failed",N instanceof Error?N:new Error("Apple Pay authorization failed"))}}});if(!a.value){l.error("APPLE_PAY_ERROR","Apple Pay button ref not found");return}try{if(await _.isAvailable(),v!==u)return;_.mount(a.value),r=_,i("ready")}catch(P){l.error("APPLE_PAY_ERROR","Apple Pay not available on this device",{},P),v===u&&i("unavailable")}},D=()=>{u+=1,r==null||r.unmount(),r=void 0},C=v=>{if(!v.value)return;let M=v.value??1,S=v.type.toLowerCase();if(v.type==="WEEK"&&(S="day",M=v.value*7),S==="day"||S==="month"||S==="year"||S==="hour"||S==="minute")return{recurringPaymentIntervalUnit:S,recurringPaymentIntervalCount:M}},A=v=>{var M,S;return{...((M=v.addressLines)==null?void 0:M[0])&&{line1:v.addressLines[0]},...((S=v.addressLines)==null?void 0:S[1])&&{line2:v.addressLines[1]},...v.administrativeArea&&{state:v.administrativeArea},postal_code:v.postalCode,city:v.locality,country:v.countryCode}},V=v=>({...v.street&&{line1:v.street},...v.houseNumberOrName&&{line2:v.houseNumberOrName},...v.stateOrProvince&&{state:v.stateOrProvince},postal_code:v.postalCode,city:v.city,country:v.country}),T=v=>v&&x(v)?v:void 0,x=v=>Ve(v),k=()=>{var M;const v=(M=a.value)==null?void 0:M.querySelector("apple-pay-button");if(v){const S=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});v.dispatchEvent(S)}},h=async()=>{try{await b()}catch(v){l.error("APPLE_PAY_ERROR","Apple Pay could not be set up",s({reason:"APPLE_PAY_SETUP_FAILED",cause:v}),v)}};return e.onMounted(()=>{h()}),e.watch(()=>[o.amount.quantity,o.amount.currency,o.billingInformation.agreement].join("|"),()=>{D(),h()}),e.onBeforeUnmount(D),(v,M)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.isVisible?(e.openBlock(),e.createBlock(He,{key:0,type:"applepay",onClick:k})):e.createCommentVNode("",!0),e.createElementVNode("div",la,[e.createElementVNode("div",{ref_key:"applePayButtonRef",ref:a},null,512)])],64))}}),ua={class:"relative overflow-hidden"},da=e.defineComponent({__name:"ExpressPaymentMethodPaypal",props:{amount:{type:Object},countryCode:{type:String},locale:{type:String},isVisible:{type:Boolean},paymentMethodOptionsResponse:{type:Object},billingInformation:{type:Object}},emits:["ready","unavailable","update-billing-information","payment-success","payment-failed"],setup(t,{emit:n}){const o=t,i=n,a=w.useLogger(),{buttonRef:r}=Xt({props:o,onMissingButton:()=>a.error("EXPRESS_CHECKOUT_PAYPAL_ERROR","The PayPal button reference is not found and cannot be mounted"),onMountFailed:u=>a.error("EXPRESS_CHECKOUT_PAYPAL_ERROR","Failed mounting PayPal express button",{error:u}),create:async u=>{const{PayPal:l}=await Le.loadAdyenSdk();return new l(u,{isExpress:!0,blockPayPalPayLaterButton:!0,blockPayPalCreditButton:!0,blockPayPalVenmoButton:!0,style:{height:55},onInit:()=>{i("ready")}})}});return(u,l)=>(e.openBlock(),e.createElementBlock("div",ua,[t.isVisible?(e.openBlock(),e.createBlock(He,{key:0,type:"paypal",class:"w-full"})):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"paypalButtonRef",ref:r,class:"absolute inset-0 opacity-[0.0001]"},null,512)]))}}),pa={class:"absolute h-[1px] w-[1px] overflow-hidden opacity-0"},ma=e.defineComponent({__name:"ExpressPaymentMethodGooglePay",props:{amount:{type:Object},countryCode:{type:String},locale:{type:String},isVisible:{type:Boolean},paymentMethodOptionsResponse:{type:Object},billingInformation:{type:Object}},emits:["ready","unavailable","update-billing-information","payment-success","payment-failed"],setup(t,{emit:n}){const o=t,i=n,a=w.useLogger(),{buttonRef:r}=Xt({props:o,onMissingButton:()=>a.error("EXPRESS_CHECKOUT_GOOGLE_PAY_ERROR","The Google Pay button reference is not found and cannot be mounted"),onMountFailed:l=>a.error("EXPRESS_CHECKOUT_GOOGLE_PAY_ERROR","Failed mounting Google Pay express button",{},l),create:async l=>{const{GooglePay:d}=await Le.loadAdyenSdk();return new d(l,{isExpress:!0})},afterMount:()=>i("ready")}),u=()=>{var d;const l=(d=r.value)==null?void 0:d.querySelector("#gpay-button-online-api-id");if(l){const p=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});l.dispatchEvent(p)}};return(l,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.isVisible?(e.openBlock(),e.createBlock(He,{key:0,type:"googlepay",onClick:u})):e.createCommentVNode("",!0),e.createElementVNode("div",pa,[e.createElementVNode("div",{ref_key:"googlePayButtonRef",ref:r},null,512)])],64))}}),ga={key:0,class:"mt-4n"},fa={class:"mb-2"},ya={class:"grid grid-cols-6 gap-1 md:gap-2"},va={class:"mt-4 h-4"},_a=2,ha=e.defineComponent({__name:"ExpressPaymentMethods",props:{amount:{type:Object},countryCode:{type:String},locale:{type:String},paymentMethodsOptionsResponse:{type:null},billingInformation:{type:Object},onBillingInformationChange:{type:Function},context:{type:Object},validateOnSubmit:{type:Function}},emits:["update-billing-information","payment-success","payment-failed"],setup(t){const n=["applepay"],o=t,{$t:i}=w.useIntl(),a=e.ref(!1),r=e.ref(!1),u=e.ref(!1),l=e.ref(!1),d=e.computed(()=>{var C;if(n.includes("applepay"))return(C=o.paymentMethodsOptionsResponse)==null?void 0:C.find(A=>{var V;return(V=A.options)==null?void 0:V.some(T=>T.name.toLowerCase()==="apple pay"&&T.payment_gateway_variant==="ADYEN")})}),p=e.computed(()=>r.value?void 0:d.value),s=e.computed(()=>{var C;if(n.includes("paypal"))return(C=o.paymentMethodsOptionsResponse)==null?void 0:C.find(A=>{var V;return(V=A.options)==null?void 0:V.some(T=>T.name.toLowerCase()==="paypal"&&T.payment_gateway_variant==="ADYEN")})}),f=e.computed(()=>{var C;if(n.includes("googlepay"))return(C=o.paymentMethodsOptionsResponse)==null?void 0:C.find(A=>{var V;return(V=A.options)==null?void 0:V.some(T=>T.name.toLowerCase()==="google pay"&&T.payment_gateway_variant==="ADYEN")})}),E=e.computed(()=>!!(p.value||f.value||s.value)),b=e.computed(()=>{var T;if(((T=o.paymentMethodsOptionsResponse)==null?void 0:T.length)===0)return!1;const C=!p.value||a.value,A=!f.value||u.value,V=!s.value||l.value;return C&&A&&V}),D=e.computed(()=>b.value?(p.value?1:0)+(f.value?1:0)+(s.value?1:0):_a);return(C,A)=>E.value?(e.openBlock(),e.createElementBlock("div",ga,[e.createElementVNode("div",fa,[b.value?(e.openBlock(),e.createBlock(e.unref(w._sfc_main),{key:1,variant:"heading-3",tag:"h2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Subscribe instantly with",id:"checkout.express_payment_methods.title",description:"The title of the express payment methods block in the checkout form"})),1)]),_:1})):(e.openBlock(),e.createBlock(pe._sfc_main,{key:0,variant:"title"}))]),e.createElementVNode("div",ya,[b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(pe._sfc_main,{class:"col-span-3 h-11"}),e.createVNode(pe._sfc_main,{class:"col-span-3 h-11"})],64)),e.createElementVNode("div",{class:e.normalizeClass(["col-span-3 md:col-span-2",{hidden:!p.value,"!col-span-6":D.value===1,"md:!col-span-3":D.value===2,"!col-span-6 md:!col-span-2":D.value===3}])},[p.value?(e.openBlock(),e.createBlock(ca,{key:0,amount:t.amount,"billing-information":t.billingInformation,"country-code":t.countryCode,locale:t.locale,"is-visible":b.value,"payment-method-options-response":p.value,"on-billing-information-change":t.onBillingInformationChange,context:t.context,"validate-on-submit":t.validateOnSubmit,onReady:A[0]||(A[0]=V=>a.value=!0),onUnavailable:A[1]||(A[1]=V=>r.value=!0),onUpdateBillingInformation:A[2]||(A[2]=V=>C.$emit("update-billing-information",V)),onPaymentSuccess:A[3]||(A[3]=V=>C.$emit("payment-success")),onPaymentFailed:A[4]||(A[4]=V=>C.$emit("payment-failed",V))},null,8,["amount","billing-information","country-code","locale","is-visible","payment-method-options-response","on-billing-information-change","context","validate-on-submit"])):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(["col-span-3 md:col-span-2",{hidden:!f.value,"col-span-6 md:col-span-6":D.value===1,"md:!col-span-3":D.value===2}])},[f.value?(e.openBlock(),e.createBlock(ma,{key:0,amount:t.amount,"billing-information":t.billingInformation,"country-code":t.countryCode,locale:t.locale,"is-visible":b.value,"payment-method-options-response":f.value,onReady:A[5]||(A[5]=V=>u.value=!0)},null,8,["amount","billing-information","country-code","locale","is-visible","payment-method-options-response"])):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(["col-span-3 md:col-span-2",{hidden:!s.value,"col-span-6 md:col-span-6":D.value===1,"md:!col-span-3":D.value===2}])},[s.value?(e.openBlock(),e.createBlock(da,{key:0,amount:t.amount,"billing-information":t.billingInformation,"country-code":t.countryCode,locale:t.locale,"is-visible":b.value,"payment-method-options-response":s.value,onReady:A[6]||(A[6]=V=>l.value=!0)},null,8,["amount","billing-information","country-code","locale","is-visible","payment-method-options-response"])):e.createCommentVNode("",!0)],2)]),e.createElementVNode("div",va,[b.value?(e.openBlock(),e.createBlock(e.unref(Mn._sfc_main),{key:1,text:e.unref(i)({defaultMessage:"Or",id:"checkout.express_payment_methods.divider_text",description:"The text of the divider text in the express payment methods block in the checkout form"}),"text-position":"center"},null,8,["text"])):(e.openBlock(),e.createBlock(pe._sfc_main,{key:0,variant:"divider-text"}))])])):e.createCommentVNode("",!0)}}),ba=["aria-expanded","aria-label"],Ma={class:"flex w-full cursor-pointer flex-row items-center justify-between gap-3 px-3 py-2"},Na={class:"flex flex-row items-center gap-2"},Ia=["onKeydown"],Ca=["aria-label"],Ea={class:"flex w-full cursor-pointer flex-row items-center justify-between gap-3 px-3 py-2"},xa={class:"flex flex-row items-center gap-2"},Aa={class:"sr-only","aria-live":"polite"},ka=e.defineComponent({inheritAttrs:!1,__name:"PromotionCodeSection",props:{promotionCode:{default:null,type:[String,null]}},emits:["update:appliedCode","apply","remove"],setup(t,{emit:n}){const{$t:o}=w.useIntl(),i=t,a=n,r=e.ref(!1),u=e.ref(""),l=e.ref(""),d=e.ref(null),p=e.ref(null),s=En.uniqueId("promotion-code-"),f=`${s}-label`,E=`${s}-panel`,b=e.computed({get:()=>u.value,set:_=>u.value=F.asText(_)}),D=e.computed(()=>i.promotionCode!==null&&i.promotionCode!==""),C=e.computed(()=>u.value.trim().length>0),A=e.computed(()=>i.promotionCode??o({defaultMessage:"Promotion applied",id:"checkout.promotion_code.applied_label",description:"Fallback label for an applied promotion code in checkout"})),V=e.computed(()=>r.value?o({defaultMessage:"Collapse promotion code input",id:"checkout.promotion_code.collapse_aria_label",description:"Aria label for the promotion code toggle button in checkout, while the input is open"}):o({defaultMessage:"Expand promotion code input",id:"checkout.promotion_code.expand_aria_label",description:"Aria label for the promotion code toggle button in checkout, while the input is closed"})),T=e.computed(()=>o({defaultMessage:"Apply promotion code",id:"checkout.promotion_code.apply_aria_label",description:"Aria label for the promotion code apply button in checkout"})),x=e.computed(()=>o({defaultMessage:"Remove promotion code",id:"checkout.promotion_code.remove_aria_label",description:"Aria label for the promotion code remove button in checkout"})),k=()=>{u.value=""},h=()=>{var P;const _=(P=p.value)==null?void 0:P.querySelector("input");_ instanceof HTMLInputElement&&_.focus()},v=()=>{r.value&&(r.value=!1)},M=()=>{D.value||(r.value=!r.value)},S=()=>{if(!C.value)return;const _=u.value.trim();a("update:appliedCode",_),a("apply",_),l.value=o({defaultMessage:"Promotion code applied",id:"checkout.promotion_code.applied_status",description:"Aria live message when a promotion code is applied in checkout"}),r.value=!1},$=()=>{a("update:appliedCode",null),a("remove"),l.value=o({defaultMessage:"Promotion code removed",id:"checkout.promotion_code.removed_status",description:"Aria live message when a promotion code is removed in checkout"}),k(),e.nextTick(()=>{var _;(_=d.value)==null||_.focus()})};return e.watch(r,_=>{if(!_){k(),e.nextTick(()=>{var P;(P=d.value)==null||P.focus()});return}e.nextTick(()=>{h()})}),e.watch(()=>i.promotionCode,_=>{_||k()}),(_,P)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[D.value?(e.openBlock(),e.createBlock(e.unref(ne._sfc_main),e.mergeProps({key:1},_.$attrs,{"no-border":"","no-spacing":"","content-background":"none",class:"relative w-full"}),{default:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"w-full rounded border border-primary-900 bg-white","aria-label":x.value,onClick:$},[e.createElementVNode("div",Ea,[e.createElementVNode("div",xa,[e.createVNode(e.unref(ie._sfc_main$1),{icon:"local_activity"}),e.createVNode(e.unref(w._sfc_main),{variant:"body-sm",class:"font-semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.value),1)]),_:1})]),e.createVNode(e.unref(ie._sfc_main$1),{icon:"close"})])],8,Ca)]),_:1},16)):(e.openBlock(),e.createBlock(e.unref(ne._sfc_main),e.mergeProps({key:0},_.$attrs,{"no-spacing":"",class:"relative w-full"}),{default:e.withCtx(()=>[e.createElementVNode("button",{ref_key:"toggleRef",ref:d,type:"button",class:"w-full","aria-expanded":r.value,"aria-controls":E,"aria-label":V.value,onClick:M},[e.createElementVNode("div",Ma,[e.createElementVNode("div",Na,[e.createVNode(e.unref(ie._sfc_main$1),{icon:"local_activity"}),e.createVNode(e.unref(w._sfc_main),{id:f,variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Add promotion code",id:"checkout.promotion_code.add_label",description:"Label for adding a promotion code in checkout"})),1)]),_:1})]),e.createVNode(e.unref(ie._sfc_main$1),{icon:r.value?"remove":"add"},null,8,["icon"])])],8,ba),e.withDirectives(e.createElementVNode("div",{id:E,ref_key:"panelRef",ref:p,role:"region","aria-labelledby":f,class:"flex w-full flex-row items-center gap-2 overflow-hidden border-t px-3 py-2",onKeydown:e.withKeys(e.withModifiers(v,["prevent"]),["esc"])},[e.createVNode(e.unref(ce._sfc_main),{modelValue:b.value,"onUpdate:modelValue":P[0]||(P[0]=Z=>b.value=Z),placeholder:e.unref(o)({defaultMessage:"Promotion code",id:"checkout.promotion_code.placeholder",description:"Placeholder for promotion code input in checkout"}),"aria-label":e.unref(o)({defaultMessage:"Promotion code",id:"checkout.promotion_code.input_aria_label",description:"Aria label for promotion code input in checkout"}),class:"w-full",onKeydown:e.withKeys(e.withModifiers(S,["prevent"]),["enter"])},null,8,["modelValue","placeholder","aria-label","onKeydown"]),e.createVNode(e.unref(ie._sfc_main),{type:"button",disabled:!C.value,"aria-label":T.value,"aria-disabled":!C.value,onClick:S},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Apply",id:"checkout.promotion_code.apply_button",description:"Button label for applying a promotion code in checkout"})),1)]),_:1},8,["disabled","aria-label","aria-disabled"])],40,Ia),[[e.vShow,r.value]])]),_:1},16)),e.createElementVNode("span",Aa,e.toDisplayString(l.value),1)],64))}}),Pa={class:"sv-checkout__header"},Da={class:"sv-checkout__payment-methods"},Ta={key:0,class:"sv-checkout__payment-methods-body"},wa={key:3,class:"sv-checkout__payment-form"},Sa={class:"sv-checkout__order-summary"},Ba={class:"flex flex-col gap-2"},La=e.defineComponent({__name:"Checkout",props:{configuration:{type:Object}},emits:["error","ready"],setup(t,{emit:n}){var at,it,rt,lt,st,ct,ut,dt,pt,mt,gt,ft;const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./PaymentIntegrationForm-Cx0zCf_C.js"))),i=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./PlanCustomizationEditor-DS1r2vBO.js"))),a=t,r=n,u=e.computed(()=>a.configuration),l=e.ref(),d=e.ref(),p=w.useLogger(),{$t:s,locale:f}=w.useIntl(),{formatTimePeriod:E}=Pt.useTimePeriod(),b=mn.usePortal(),{isMobileViewport:D}=St.useViewport();if(p.info("COMPONENT_INITIALIZED","Checkout component initialized"),((at=b.value)==null?void 0:at.type)!=="INIT_PRICING_PLAN_SUBSCRIPTION")throw p.error("INVALID_TOKEN","Invalid token"),Error("Invalid token");b.value.status==="REVOKED"&&(l.value={code:"RESOURCE_REVOKED",message:`Portal url with resource id "${b.value.id}" is revoked`},p.error("RESOURCE_REVOKED",`Portal url with resource id "${b.value.id}" is revoked`));const C=(rt=(it=b.value)==null?void 0:it.init_pricing_plan_subscription)==null?void 0:rt.pricing_plan_subscription_id,A=(st=(lt=b.value)==null?void 0:lt.init_pricing_plan_subscription)==null?void 0:st.success_url,V=((dt=(ut=(ct=b.value)==null?void 0:ct.init_pricing_plan_subscription)==null?void 0:ut.note)==null?void 0:dt.trim())||void 0,{validatedEmail:T,validatedCountry:x,paymentMethodOptions:k,hasPaymentMethodOptionsError:h,retryPaymentMethodOptions:v,subscription:M,isPaymentMethodsPending:S,isInvoicePreviewPending:$,checkoutForm:_,invoicePreview:P,invoicePreviewByBillingPeriod:Z,trialInvoicePreview:m,trialPeriod:c,authorizationContext:I,isPaid:y,amount:N,recurringAmount:B,hasOneOffCharges:z,loadInvoicePreview:R,updateInvoicePreviewOnBillingInformationChange:Y,saveFormStateForRedirect:K}=ro({initialCountry:(pt=a.configuration)==null?void 0:pt.countryCode,initialEmail:(mt=a.configuration)==null?void 0:mt.email,subscriptionId:C,enabledPricingIds:(gt=a.configuration)==null?void 0:gt.enabledPricingIds}),Q=de.useExperimentalFeature(),W=e.computed(()=>{var g;return!!((g=Q==null?void 0:Q.value)!=null&&g["express-checkout"])}),H=e.ref(!1),j=async()=>{var g;await _.validation.value.$validate(),!_.validation.value.$invalid&&(H.value=!0,X.value=null,K(),(g=d.value)==null||g.submit())},X=e.ref(null),re=()=>{H.value=!1},ee=g=>{H.value=!1,X.value=(g==null?void 0:g.message)??s({defaultMessage:"The payment did not go through. Please try again.",id:"checkout.payment_failed",description:"Error shown when a payment the customer started did not complete"})},ae=async()=>(await _.validation.value.$validate(),!_.validation.value.$invalid),le=e.computed(()=>!!m.value),te=e.computed(()=>Be.getModelTypesFromScheduleInfo(ke.value,{enabledPricingIds:_.form.value.enabledPricingIds})),ge=e.computed(()=>[...te.value].some(g=>g!=="ONE_OFF")),ve=e.computed(()=>te.value.has("USAGE_BASED")),Ne=e.computed(()=>ve.value||(P.value?Jn(P.value):!1)),se=e.computed(()=>{var g;return B.value??((g=P.value)==null?void 0:g.tax_summary.total_amount)});e.watch(()=>z.value&&!B.value&&!!P.value,g=>{g&&p.warn("RECURRING_AMOUNT_UNRESOLVED","Could not tell the recurring part of the invoice from the one-off part; the mandate states the invoice total",{flow:"CHECKOUT"})});const _e=e.computed(()=>ge.value||!!se.value&&Number(se.value.quantity)!==0),J=e.computed(()=>z.value?B.value:void 0),Wt=e.computed(()=>_.form.value.country&&["US","CA"].includes(_.form.value.country)||!1),Ae=e.computed({get:()=>_.form.value.enabledPricingIds??[],set:g=>{_.form.value.enabledPricingIds=g}}),ke=e.computed(()=>M.value?ue.getFirstPricingPlanScheduleOfType({pricingPlanScheduleInfos:M.value.pricing_plan_schedule_infos,type:"DEFAULT"}):void 0),Qe=e.computed(()=>{var L,O;if(!M.value)return;const g=(O=(L=ke.value)==null?void 0:L.pricing_plan_version)==null?void 0:O.pricing_currency_settings;return jt({country:_.form.value.country,pricingCurrencySettings:g,fallbackCurrency:M.value.billing_currency})}),Pe=e.computed(()=>{if(!ke.value||!M.value)return new Set;const g=ue.getPricingItemConfigMetaById({pricingPlanScheduleInfo:ke.value}),L=Qe.value,O=M.value.billing_period,G=new Set;return g.forEach((U,q)=>{L&&U.currency!==L||O&&U.billingPeriod&&(U.billingPeriod.type!==O.type||U.billingPeriod.value!==O.value)||G.add(q)}),G}),Ze=e.computed({get:()=>{const g=_.form.value.seatsValues??[],L=Pe.value;return L.size?g.filter(({pricing_item_config_id:O})=>L.has(O)):g},set:g=>{const L=_.form.value.seatsValues??[],O=Pe.value;if(!O.size){_.form.value.seatsValues=g;return}const G=L.filter(({pricing_item_config_id:U})=>!O.has(U));_.form.value.seatsValues=G.concat(g)}}),Xe=e.computed({get:()=>{const g=_.form.value.unitsValues??[],L=Pe.value;return L.size?g.filter(({pricing_item_config_id:O})=>L.has(O)):g},set:g=>{const L=_.form.value.unitsValues??[],O=Pe.value;if(!O.size){_.form.value.unitsValues=g;return}const G=L.filter(({pricing_item_config_id:U})=>!O.has(U));_.form.value.unitsValues=G.concat(g)}}),Jt=e.computed(()=>{var g,L,O,G,U;if(m.value)return s({defaultMessage:"{discounted_amount} for {trial_period}, then {subscription_amount}/{billing_period} until canceled, starting {start_date, date, ::MMMMd}.",id:"checkout.agreement.trial",description:"The agreement for the trial period"},{discounted_amount:m.value.tax_summary.total_amount.quantity==="0.00"?s({defaultMessage:"Free",id:"checkout.agreement.trial.free",description:"The free amount for the trial period"}):oe.formatAmount(m.value.tax_summary.total_amount),trial_period:E(c.value,{short:!0}),subscription_amount:oe.formatAmount(se.value??{quantity:"0.00",currency:"EUR"}),billing_period:E(((g=P.value)==null?void 0:g.billing_period)??{type:"MONTH",value:1},{short:!0,singular:!0,hideValueForExactPeriods:!0}),start_date:new Date(fe.value)});if(z.value&&B.value){const q=oe.formatAmount(((L=P.value)==null?void 0:L.tax_summary.total_amount)??{quantity:"0.00",currency:"EUR"});return _e.value?ve.value&&Number(B.value.quantity)===0?s({defaultMessage:"{due_today} today, then usage billed every {billing_period} until canceled.",id:"checkout.agreement.usage_with_one_off",description:"The agreement for a usage-based subscription whose first invoice also charges something only once"},{due_today:q,billing_period:E(((O=P.value)==null?void 0:O.billing_period)??{type:"MONTH",value:1},{short:!0,singular:!0,hideValueForExactPeriods:!0})}):s({defaultMessage:"{due_today} today, then {subscription_amount}/{billing_period} until canceled, starting {start_date, date, long}.",id:"checkout.agreement.subscription_with_one_off",description:"The agreement for a subscription whose first invoice also charges something only once"},{due_today:q,subscription_amount:oe.formatAmount(B.value),billing_period:E(((G=P.value)==null?void 0:G.billing_period)??{type:"MONTH",value:1},{short:!0,singular:!0,hideValueForExactPeriods:!0}),start_date:new Date(fe.value)}):s({defaultMessage:"{due_today} today. One-time purchase.",id:"checkout.agreement.one_off",description:"The agreement for an order that is charged once and does not renew"},{due_today:q})}return s({defaultMessage:"{subscription_amount}/{billing_period} until canceled, starting {start_date, date, long}.",id:"checkout.agreement.subscription",description:"The agreement for the subscription"},{subscription_amount:se.value?oe.formatAmount(se.value):"",billing_period:E(((U=P.value)==null?void 0:U.billing_period)??{type:"MONTH",value:1},{short:!0,singular:!0,hideValueForExactPeriods:!0}),start_date:new Date(fe.value)})}),We=e.computed(()=>{var L;if(!P.value)return;const g=Ee.getSubscriptionName({subscription:M.value,fallback:s({defaultMessage:"Subscription",description:"The fallback name for when no subscription name can be determined",id:"customer_overview.subscriptions_block.fallback_subscription_name"})});return{description:g,managementURL:"https://www.solvimon.com/account/billing",agreement:Jt.value,...m.value&&c.value&&{trial:{label:s({defaultMessage:"Trial",id:"checkout.trial.label",description:"The label of the trial"}),amount:m.value.tax_summary.total_amount,startDate:Re.value?new Date(Re.value):void 0,endDate:Je.value?new Date(Je.value):void 0}},..._e.value&&se.value&&{regular:{label:g,amount:se.value,startDate:fe.value?new Date(fe.value):void 0,interval:((L=M.value)==null?void 0:L.billing_period)??{type:"MONTH",value:1}}}}}),en=g=>Ve(g),tn=g=>{const{line1:L,line2:O,postal_code:G,city:U,state:q,country:he,email:Ue}=g;_.updateInitialState({...L&&{addressLine1:L},...O&&{addressLine2:O},...G&&{postalCode:G},...U&&{city:U},...q&&{state:q},...Ue&&{email:Ue},...he&&en(he)?{country:he}:{}})},nn=e.computed(()=>!(T&&x)),Re=e.computed(()=>{var O,G,U;const g=(G=(O=m.value)==null?void 0:O.periods)==null?void 0:G[0],L=(U=ze.value)==null?void 0:U.trialStartDate;return g!=null&&g.start_at?new Date(g.start_at):L}),ze=e.computed(()=>Ee.getFallbackTrialAndSubscriptionStartAndEndDates(M.value)),Je=e.computed(()=>{var O,G,U;const g=(G=(O=m.value)==null?void 0:O.periods)==null?void 0:G[0],L=(U=ze.value)==null?void 0:U.trialEndDate;return g!=null&&g.end_at?new Date(g.end_at):L}),fe=e.computed(()=>{var O,G,U;const g=(G=(O=P.value)==null?void 0:O.periods)==null?void 0:G[0],L=(U=ze.value)==null?void 0:U.subscriptionStartDate;return g!=null&&g.start_at?new Date(g.start_at):L}),on=e.computed(()=>!!(_.form.value.seatsValues&&_.form.value.seatsValues.length>0||_.form.value.unitsValues&&_.form.value.unitsValues.length>0||M.value&&Xn(M.value)||M.value&&Wn(M.value))),Ie=e.ref(null),{applyPromotionCode:et,removePromotionCode:an,isPromotionCodePending:rn,promotionCodeErrorMessage:je}=lo({checkoutForm:_,updateInvoicePreviewOnBillingInformationChange:Y,formatErrorMessage:({action:g})=>s(g==="apply"?{defaultMessage:"Promotion code could not be applied. Please try again.",id:"checkout.promotion_code.apply_failed",description:"Error message when applying a promotion code in checkout failed"}:{defaultMessage:"Promotion code could not be removed. Please try again.",id:"checkout.promotion_code.remove_failed",description:"Error message when removing a promotion code in checkout failed"}),onInvalidPromotionCode:()=>{Ie.value=null},onApplyError:()=>{Ie.value=null}});co({subscription:M,promotionCode:(ft=a.configuration)==null?void 0:ft.couponCode,appliedPromotionCode:Ie,applyPromotionCode:et});const tt=()=>{A&&ye.safeUrlRedirect(A)},ln=e.computed(()=>{var g;return!((g=a.configuration)!=null&&g.onPaymentSuccess)&&!!A}),nt=()=>{var g;if(y.value=!0,je.value=null,X.value=null,(g=a.configuration)!=null&&g.onPaymentSuccess){a.configuration.onPaymentSuccess();return}if(A){tt();return}},ot=g=>{M.value&&(M.value={...M.value,billing_period:g},R())};return e.onMounted(()=>{r("ready")}),(g,L)=>l.value?(e.openBlock(),e.createBlock(Po,{key:0,class:"sv-checkout sv-root sv-screen sv-checkout--error"})):(e.openBlock(),e.createBlock(e.unref(Cn.ContentWithAsideLayout),{key:1,class:e.normalizeClass(["sv-checkout sv-root sv-screen",{"sv-checkout--paid":e.unref(y)}])},e.createSlots({header:e.withCtx(()=>[e.createElementVNode("div",Pa,[e.createVNode(pe._sfc_main,{class:"min-h-[52px] w-96"},{default:e.withCtx(()=>{var O,G,U,q;return[e.unref(P)&&e.unref(M)&&fe.value?(e.openBlock(),e.createBlock(xo,{key:0,class:"sv-checkout__title","trial-start-date":Re.value,"trial-period":e.unref(c),"subscription-start-date":fe.value,"subscription-name":((O=e.unref(M))==null?void 0:O.name)??"",amount:(G=e.unref(P))==null?void 0:G.invoice_amount_including_tax,"due-today-amount":e.unref(N)??((U=e.unref(P))==null?void 0:U.invoice_amount_including_tax),"recurring-amount":J.value,"has-one-off-charges":e.unref(z),"has-recurring-charge":_e.value,"has-usage-charges":ve.value,"billing-period":(q=e.unref(M))==null?void 0:q.billing_period,"country-code":e.unref(_).form.value.country},null,8,["trial-start-date","trial-period","subscription-start-date","subscription-name","amount","due-today-amount","recurring-amount","has-one-off-charges","has-recurring-charge","has-usage-charges","billing-period","country-code"])):e.createCommentVNode("",!0)]}),_:1})])]),content:e.withCtx(()=>{var O,G,U;return[e.unref(y)?(e.openBlock(),e.createBlock(Do,{key:0,class:"sv-checkout__completed-payment",onContinueToMerchant:tt})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.unref(M)&&e.unref(D)?(e.openBlock(),e.createBlock(At,{key:0,class:"sv-checkout__mobile-order-summary",subscription:e.unref(M),invoice:e.unref(P),"invoice-preview-by-billing-period":e.unref(Z),"trial-invoice":e.unref(m),"enabled-pricing-ids":Ae.value,"trial-period":e.unref(c),avatar:(O=u.value)==null?void 0:O.avatar,"is-paid":e.unref(y),"is-usage-based":Ne.value,"is-preview-and-payment-methods-pending":e.unref(S)||e.unref($),"country-code":e.unref(_).form.value.country,collapsible:"collapsed",variant:"products-inline",onBillingPeriodChange:ot},null,8,["subscription","invoice","invoice-preview-by-billing-period","trial-invoice","enabled-pricing-ids","trial-period","avatar","is-paid","is-usage-based","is-preview-and-payment-methods-pending","country-code"])):e.createCommentVNode("",!0),on.value&&e.unref(M)?(e.openBlock(),e.createBlock(e.unref(i),{key:1,"seats-values":Ze.value,"onUpdate:seatsValues":L[0]||(L[0]=q=>Ze.value=q),"units-values":Xe.value,"onUpdate:unitsValues":L[1]||(L[1]=q=>Xe.value=q),"enabled-pricing-ids":Ae.value,"onUpdate:enabledPricingIds":L[2]||(L[2]=q=>Ae.value=q),class:"sv-checkout__plan-customization",subscription:e.unref(M),"initial-seats-values":(G=e.unref(_).initialState)==null?void 0:G.value.seatsValues,"initial-units-values":(U=e.unref(_).initialState)==null?void 0:U.value.unitsValues,"billing-period":e.unref(M).billing_period,currency:Qe.value},null,8,["seats-values","units-values","enabled-pricing-ids","subscription","initial-seats-values","initial-units-values","billing-period","currency"])):e.createCommentVNode("",!0),W.value&&e.unref(_).form.value.country&&e.unref(N)&&We.value?(e.openBlock(),e.createBlock(ha,{key:2,class:"sv-checkout__express-payment-methods",amount:e.unref(N),"country-code":e.unref(_).form.value.country,locale:e.unref(f),"payment-methods-options-response":e.unref(k)??[],"billing-information":We.value,"on-billing-information-change":e.unref(Y),context:e.unref(I),"validate-on-submit":ae,onUpdateBillingInformation:tn,onPaymentSuccess:nt,onPaymentFailed:ee},null,8,["amount","country-code","locale","payment-methods-options-response","billing-information","on-billing-information-change","context"])):e.createCommentVNode("",!0),e.createVNode(No,{modelValue:e.unref(_).form.value,"onUpdate:modelValue":L[3]||(L[3]=q=>e.unref(_).form.value=q),class:"sv-checkout__customer-form",validation:e.unref(_).validation,"read-only-email":e.unref(T),"show-customer-info-on-top":nn.value||e.unref(y),"is-billing-information-mandatory":Wt.value,"get-is-field-required":e.unref(_).getIsFieldRequired,"read-only":e.unref(y)},null,8,["modelValue","validation","read-only-email","show-customer-info-on-top","is-billing-information-mandatory","get-is-field-required","read-only"]),e.createElementVNode("div",Da,[e.createVNode(pe._sfc_main,{variant:"section",class:"min-h-[130px]"},{default:e.withCtx(()=>{var q,he;return[!e.unref(S)||e.unref(S)&&e.unref(k).length>0?(e.openBlock(),e.createElementBlock("div",Ta,[e.createVNode(e.unref(w._sfc_main),{variant:"heading-3",tag:"h2",class:"sv-checkout__payment-methods-title mb-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Payment method",id:"checkout.payment_method_block.title",description:"The title of the payment method block in the checkout form"})),1)]),_:1}),e.unref(_).form.value.country?e.unref(h)?(e.openBlock(),e.createBlock(Me._sfc_main,{key:1,class:"sv-checkout__payment-methods-error",icon:"error"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Could not load payment methods",id:"checkout.payment_method_block.load_failed_title",description:"The title shown when the payment methods failed to load"})),1)]),message:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Check your connection and try again.",id:"checkout.payment_method_block.load_failed_message",description:"The message shown when the payment methods failed to load"})),1)]),action:e.withCtx(()=>[e.createVNode(e.unref(ie._sfc_main),{type:"button",intent:"secondary",size:"sm",class:"sv-action sv-action--secondary sv-checkout__payment-methods-retry",onClick:e.unref(v)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Try again",id:"checkout.payment_method_block.load_failed_retry_button.label",description:"The label of the button that loads the payment methods again"})),1)]),_:1},8,["onClick"])]),_:1})):e.unref(k).length===0?(e.openBlock(),e.createBlock(Me._sfc_main,{key:2,class:"sv-checkout__payment-methods-empty",icon:"credit_card_off"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"No payment methods available",id:"checkout.payment_method_block.no_payment_methods_available_title",description:"The title shown when there are no available payment methods"})),1)]),_:1})):e.unref(N)&&e.unref(_).form.value.country?(e.openBlock(),e.createElementBlock("div",wa,[e.createElementVNode("div",{class:e.normalizeClass({"pointer-events-none opacity-60":H.value})},[e.createVNode(e.unref(o),{ref_key:"paymentIntegrationFormRef",ref:d,"country-code":e.unref(_).form.value.country,context:e.unref(I),amount:e.unref(N),email:e.unref(_).form.value.email,variant:"AUTHORIZE","payment-method-options":e.unref(k)??[],"validate-on-submit":ae,"redirects-on-success":ln.value,"force-store-payment-method":"","billing-entity-name":(he=(q=e.unref(M))==null?void 0:q.billing_entity)==null?void 0:he.legal_name,onPaymentSuccess:nt,onPaymentFailed:ee,onInvalid:re,onReady:L[4]||(L[4]=Ue=>r("ready"))},null,8,["country-code","context","amount","email","payment-method-options","redirects-on-success","billing-entity-name"])],2)])):e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Me._sfc_main,{key:0,class:"sv-checkout__payment-methods-empty",icon:"captive_portal"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Select your billing country",id:"checkout.payment_method_block.no_country_selected_title",description:"The title shown when no country is selected"})),1)]),message:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Payment methods will be shown after you select the billing country.",id:"checkout.payment_method_block.no_country_selected_message",description:"The message shown when no country is selected"})),1)]),_:1}))])):e.createCommentVNode("",!0)]}),_:1})])],64))]}),aside:e.withCtx(()=>[e.createElementVNode("div",Sa,[e.createVNode(pe._sfc_main,{variant:"section",class:"min-h-[220px]"},{default:e.withCtx(()=>{var O;return[e.unref(M)&&e.unref(P)?(e.openBlock(),e.createBlock(At,{key:0,subscription:e.unref(M),invoice:e.unref(P),"invoice-preview-by-billing-period":e.unref(Z),"trial-invoice":e.unref(m),"enabled-pricing-ids":Ae.value,"trial-period":e.unref(c),"country-code":e.unref(_).form.value.country,avatar:(O=u.value)==null?void 0:O.avatar,"is-paid":e.unref(y),"is-usage-based":Ne.value,"is-preview-and-payment-methods-pending":e.unref(S)||e.unref($),onBillingPeriodChange:ot},null,8,["subscription","invoice","invoice-preview-by-billing-period","trial-invoice","enabled-pricing-ids","trial-period","country-code","avatar","is-paid","is-usage-based","is-preview-and-payment-methods-pending"])):e.createCommentVNode("",!0)]}),_:1})]),e.unref(y)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(ka,{class:"sv-checkout__promotion-code","promotion-code":Ie.value,"onUpdate:appliedCode":L[5]||(L[5]=O=>Ie.value=O),onRemove:e.unref(an),onApply:e.unref(et)},null,8,["promotion-code","onRemove","onApply"]),e.unref(je)?(e.openBlock(),e.createBlock(e.unref(yt._sfc_main),{key:0,class:"sv-checkout__promotion-error mt-2",title:e.unref(je)},null,8,["title"])):e.createCommentVNode("",!0),X.value?(e.openBlock(),e.createBlock(e.unref(yt._sfc_main),{key:1,class:"sv-checkout__payment-error mt-2",title:X.value},null,8,["title"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ba,[e.createVNode(pe._sfc_main,{class:"sv-checkout__submit-skeleton min-h-[44px]"},{default:e.withCtx(()=>[e.unref(P)?(e.openBlock(),e.createBlock(e.unref(ie._sfc_main),{key:0,type:"button",size:"lg",class:"sv-action sv-action--primary sv-action--full-width sv-checkout__submit w-full",disabled:e.unref(rn)||e.unref(k).length===0||H.value,loading:H.value,onClick:j},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(le.value?e.unref(s)({defaultMessage:"Start trial",id:"checkout.pay_and_subscribe_button_trial.label",description:"The label of the start trial button in the checkout form"}):e.unref(s)({defaultMessage:"Pay and subscribe",id:"checkout.pay_and_subscribe_button.label",description:"The label of the pay and subscribe button in the checkout form"})),1)]),_:1},8,["disabled","loading"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(wt._sfc_main$1,{"payment-method-options":e.unref(k)},null,8,["payment-method-options"])])],64))]),_:2},[e.unref(V)&&!e.unref(y)?{name:"footer",fn:e.withCtx(()=>[e.createVNode(e.unref(w._sfc_main),{tag:"div",variant:"body-xs",color:"subtle",class:"sv-checkout__terms"},{default:e.withCtx(()=>[e.createVNode(aa,{source:e.unref(V)},null,8,["source"])]),_:1})]),key:"0"}:void 0]),1032,["class"]))}}),Oa=e.defineComponent({__name:"Checkout.entry",props:{environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object},configuration:{type:Object}},emits:["error","ready"],setup(t,{emit:n}){var u;const o=xn.getComponentName("checkout"),i=t,a=n,r=((u=i.configuration)==null?void 0:u.couponCode)??ye.getQueryParam("coupon_code")??void 0;return(l,d)=>(e.openBlock(),e.createBlock(e.unref(w._sfc_main$1),{entry:l.$props,"component-name":e.unref(o),"allowed-portal-types":["INIT_PRICING_PLAN_SUBSCRIPTION"],onError:d[1]||(d[1]=p=>l.$emit("error",p))},{default:e.withCtx(()=>{var p,s,f,E,b;return[e.createVNode(La,{configuration:{avatar:(s=(p=t.branding)==null?void 0:p.emblem)==null?void 0:s.public_url,email:(f=t.configuration)==null?void 0:f.email,countryCode:(E=t.configuration)==null?void 0:E.countryCode,enabledPricingIds:(b=t.configuration)==null?void 0:b.enabledPricingIds,couponCode:e.unref(r)},onReady:d[0]||(d[0]=D=>a("ready"))},e.createSlots({_:2},[l.$slots["terms-and-conditions"]?{name:"terms-and-conditions",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"terms-and-conditions")]),key:"0"}:void 0]),1032,["configuration"])]}),_:3},8,["entry","component-name"]))}}),{define:Va}=w.createSolvimonElement(Oa,"checkout");exports.FALLBACK_SEATS_NUMBER=Kt;exports.FALLBACK_UNITS_NUMBER=qt;exports._sfc_main=Ht;exports.defineSolvimonCheckout=Va;exports.getPricingItemByPricingConfigId=to;