@solvimon/solvimon-web 0.1.0-alpha.3 → 0.1.0-alpha.30

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 (636) hide show
  1. package/README.md +440 -52
  2. package/dist/Alert.vue.es-ZPG49yR_.mjs +158 -0
  3. package/dist/Amount.vue.es-DPqHB8Xd.mjs +22 -0
  4. package/dist/ApiStatus-CSFKl_ra.mjs +9 -0
  5. package/dist/AuthProvider.handle-SRR_04XS.mjs +50 -0
  6. package/dist/Avatar.vue.es-geDQsZwu.mjs +81 -0
  7. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-nqKbgY7G.mjs +58 -0
  8. package/dist/Button.vue.es-j7iYlqtJ.mjs +368 -0
  9. package/dist/ChargeOnDemandModal-CR01PkP_.mjs +964 -0
  10. package/dist/Checkout.entry.ce-CopWuLJC.mjs +4169 -0
  11. package/dist/CheckoutAddressFields.vue_vue_type_script_setup_true_lang-CEnM1uxK.mjs +828 -0
  12. package/dist/Chip.vue.es-Dxx_0dte.mjs +128 -0
  13. package/dist/Comparators.vue.es-DQBI3f7m.mjs +103 -0
  14. package/dist/ContentWithAsideLayout-Bnbsq8_5.mjs +32 -0
  15. package/dist/ContextMenu.vue.es-BJO4U47Q.mjs +572 -0
  16. package/dist/CustomerBillingInformation.vue.es-CmNpqcBw.mjs +153 -0
  17. package/dist/CustomerPaymentMethods.lib-B_753rau.mjs +4 -0
  18. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Jyb5ZN3s.mjs +136 -0
  19. package/dist/CustomerShippingAddresses-BRPukhRI.mjs +397 -0
  20. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DJnr5D56.mjs +2936 -0
  21. package/dist/Divider.vue.es-DnP_HqLz.mjs +22 -0
  22. package/dist/DividerText.vue.es-BusbyeAI.mjs +56 -0
  23. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-wPma8Os-.mjs +55 -0
  24. package/dist/ErrorNotification.vue.es-F068p7PY.mjs +31 -0
  25. package/dist/Expand.vue.es-BleuAfDz.mjs +32 -0
  26. package/dist/FormMessage.vue.es-CwMQpIAW.mjs +39 -0
  27. package/dist/IconButton.vue.es-D8DtBW9i.mjs +56 -0
  28. package/dist/IconTitle.vue.es-6VJtjJX2.mjs +103 -0
  29. package/dist/Input.vue.es-BLyHcmu4.mjs +250 -0
  30. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Dl1vTzQD.mjs +93 -0
  31. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-DYskT3r7.mjs +56 -0
  32. package/dist/InvoicePreview.vue.es-Cpf66_xV.mjs +286 -0
  33. package/dist/InvoicePricingClauseChip.vue.es-CDrAE901.mjs +124 -0
  34. package/dist/Label.vue.es-es7ZUBSP.mjs +113 -0
  35. package/dist/Modal.vue.es-eeR9FmvQ.mjs +393 -0
  36. package/dist/OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-B_FpibLA.mjs +441 -0
  37. package/dist/PaymentCompletedCard.vue_vue_type_script_setup_true_lang-CrjVPks0.mjs +48 -0
  38. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-DyjzaTK1.mjs +250 -0
  39. package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BHQrWy6r.mjs +51 -0
  40. package/dist/PaymentHistoryBlock-CN42ewCn.mjs +4 -0
  41. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C3Y5fHvA.mjs +93 -0
  42. package/dist/PaymentIntegrationForm-D3Ye7LZ5.mjs +4 -0
  43. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D07SEP8a.mjs +181 -0
  44. package/dist/PaymentIntegrationFormAdyen-Fm-diCCO.mjs +926 -0
  45. package/dist/PaymentIntegrationFormStripe-BANBL6za.mjs +758 -0
  46. package/dist/PaymentMethod.vue.es-t3-VyoE8.mjs +643 -0
  47. package/dist/PaymentMethodForm-CqP3GoNj.mjs +4 -0
  48. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-CMRMbL3d.mjs +161 -0
  49. package/dist/PaymentMethodSelector.vue_vue_type_script_setup_true_lang-D5wmRuCf.mjs +169 -0
  50. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-DhkkiJaQ.mjs +174 -0
  51. package/dist/PlanCustomizationEditor-B76UNEMm.mjs +791 -0
  52. package/dist/PortalLinkUnverified-Cp60_kRJ.mjs +52 -0
  53. package/dist/PortalNotAvailable-DzSQnfzw.mjs +25 -0
  54. package/dist/PricingGroupRangeInput.vue.es-Srq_3cga.mjs +578 -0
  55. package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-oRijnVnZ.mjs +177 -0
  56. package/dist/RadioGroupExtended.vue.es-BbBMDf6l.mjs +176 -0
  57. package/dist/Section.vue.es-Oqn1wGPZ.mjs +72 -0
  58. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-OM19NPBh.mjs +60 -0
  59. package/dist/ShippingAddressesModal-c7nqf4Ny.mjs +418 -0
  60. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D7MFjvrP.mjs +32 -0
  61. package/dist/StepInput.vue.es-ieh4EuJ7.mjs +213 -0
  62. package/dist/SubscriptionDetails.entry.ce-uYv45FGH.mjs +1044 -0
  63. package/dist/SubscriptionSchedules-DMxX3GpK.mjs +4 -0
  64. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DXro_64f.mjs +5200 -0
  65. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-BZNsqN4G.mjs +203 -0
  66. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-CHlXP_2x.mjs +319 -0
  67. package/dist/TooltipParagraph.vue.es-BES3zsYN.mjs +132 -0
  68. package/dist/TranslationOverride.vue_vue_type_script_setup_true_lang-BJmlNrXT.mjs +31 -0
  69. package/dist/TrialChip.vue.es-C51z1ZiA.mjs +35 -0
  70. package/dist/accel.svg.es-C0hqmmEY.mjs +4 -0
  71. package/dist/ach.svg.es-DduMiYM2.mjs +4 -0
  72. package/dist/addonQuantity-CCVaA3e-.mjs +758 -0
  73. package/dist/addressFormats.data-dzBx49dw.mjs +278 -0
  74. package/dist/adyen-Bugab0JE.mjs +4 -0
  75. package/dist/adyenSdk-B01MB9Ia.mjs +58 -0
  76. package/dist/amazon-pay.svg.es-BACIX6C7.mjs +4 -0
  77. package/dist/amex.svg.es-DjTEMRVg.mjs +4 -0
  78. package/dist/amount-CondixVt.mjs +36 -0
  79. package/dist/api.es-qgvzNMU-.mjs +43 -0
  80. package/dist/apple-pay.svg.es-B3tkA54p.mjs +4 -0
  81. package/dist/bacs.svg.es-CZIjZIE8.mjs +4 -0
  82. package/dist/bancontact.svg.es-B26-JwdE.mjs +4 -0
  83. package/dist/carnet.svg.es-BtO3AmNu.mjs +4 -0
  84. package/dist/cartes-bancaires.svg.es-DEPpdLvi.mjs +4 -0
  85. package/dist/cashapp.svg.es-DOGwRjXp.mjs +4 -0
  86. package/dist/cn.es-B8acFrov.mjs +2936 -0
  87. package/dist/comparators.es-C8rHpb70.mjs +157 -0
  88. package/dist/components/BillingInformation/BillingInformation.ce.d.ts +1 -3
  89. package/dist/components/BillingInformation/BillingInformation.mjs +82 -0
  90. package/dist/components/BillingInformationForm/BillingInformationForm.ce.d.ts +1 -3
  91. package/dist/components/BillingInformationForm/BillingInformationForm.mjs +510 -0
  92. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.ce.d.ts +1 -3
  93. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +87 -0
  94. package/dist/components/Invoice/Invoice.ce.d.ts +1 -3
  95. package/dist/components/Invoice/Invoice.mjs +2930 -0
  96. package/dist/components/InvoiceDetails/InvoiceDetails.ce.d.ts +1 -3
  97. package/dist/components/InvoiceDetails/InvoiceDetails.mjs +110 -0
  98. package/dist/components/InvoiceHeader/InvoiceHeader.ce.d.ts +1 -0
  99. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +68 -0
  100. package/dist/components/InvoicesList/InvoicesList.ce.d.ts +1 -3
  101. package/dist/components/InvoicesList/InvoicesList.mjs +88 -0
  102. package/dist/components/PaymentHistory/PaymentHistory.ce.d.ts +1 -3
  103. package/dist/components/PaymentHistory/PaymentHistory.mjs +118 -0
  104. package/dist/components/PaymentMethodForm/PaymentMethodForm.ce.d.ts +1 -3
  105. package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +98 -0
  106. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.ce.d.ts +1 -3
  107. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +88 -0
  108. package/dist/components/SubscriptionsList/SubscriptionsList.ce.d.ts +1 -3
  109. package/dist/components/SubscriptionsList/SubscriptionsList.mjs +108 -0
  110. package/dist/components/WalletBalances/WalletBalances.ce.d.ts +1 -3
  111. package/dist/components/WalletBalances/WalletBalances.mjs +114 -0
  112. package/dist/configuration-BytDBAWs.mjs +14 -0
  113. package/dist/core/action-request.types.d.ts +1 -58
  114. package/dist/core/configuration.d.ts +1 -3
  115. package/dist/core/index.d.ts +1 -10
  116. package/dist/core/index.mjs +151 -0
  117. package/dist/core/registry.ce.d.ts +1 -2
  118. package/dist/core/registry.d.ts +1 -6
  119. package/dist/core/types.d.ts +1 -111
  120. package/dist/countryData.es-BegoD-cZ.mjs +252 -0
  121. package/dist/customElements-DK4GKNJG.mjs +5072 -0
  122. package/dist/customer-lf6S5DBR.mjs +31 -0
  123. package/dist/customer.es-DQKl6wFt.mjs +24 -0
  124. package/dist/dana.svg.es-Cy8Q6DZi.mjs +4 -0
  125. package/dist/dankort.svg.es-B7VqJdWq.mjs +4 -0
  126. package/dist/de-DE-Cyj_NtiI.mjs +435 -0
  127. package/dist/de-DE-UJ6X6jXu.mjs +306 -0
  128. package/dist/diners.svg.es-BP9enCow.mjs +4 -0
  129. package/dist/discover.svg.es-DEsEJBYh.mjs +4 -0
  130. package/dist/eftpos.svg.es--js6-yfk.mjs +4 -0
  131. package/dist/elo.svg.es-CMZPAxcn.mjs +4 -0
  132. package/dist/eps.svg.es-CzIPBSb9.mjs +4 -0
  133. package/dist/floating-ui.vue.es-BvAf8-si.mjs +1003 -0
  134. package/dist/formControl-BZQLHnOO.mjs +749 -0
  135. package/dist/formatting.es-RclXHhKo.mjs +61 -0
  136. package/dist/fr-FR-CRFoWQ7J.mjs +435 -0
  137. package/dist/fr-FR-Cvvbkwlj.mjs +307 -0
  138. package/dist/gcash.svg.es-BpDtvraq.mjs +4 -0
  139. package/dist/getComposedString.es-C__uhJpd.mjs +10 -0
  140. package/dist/getCountryNameByCode.es-BDHua7VM.mjs +8 -0
  141. package/dist/girocard.svg.es-Riswtk8Z.mjs +4 -0
  142. package/dist/go-pay.svg.es-CiIyLELZ.mjs +4 -0
  143. package/dist/google-pay.svg.es-Dgj_N6nz.mjs +4 -0
  144. package/dist/hipercard.svg.es-B80bu8Vd.mjs +4 -0
  145. package/dist/icon-sprite.svg.es-BWBB8SGw.mjs +4 -0
  146. package/dist/ideal.svg.es-DaqTS2Ax.mjs +4 -0
  147. package/dist/index-CTwLxoOS.mjs +7250 -0
  148. package/dist/index.d.ts +1 -15
  149. package/dist/index.es-BrVTOW5D.mjs +345 -0
  150. package/dist/index.mjs +42 -0
  151. package/dist/invoiceState-BJVHaKs7.mjs +14 -0
  152. package/dist/invoices-DdREPDXV.mjs +123 -0
  153. package/dist/it-IT-DObZEc-U.mjs +435 -0
  154. package/dist/it-IT-DnJP5URH.mjs +306 -0
  155. package/dist/jcb.svg.es-Couw-2p9.mjs +4 -0
  156. package/dist/kakao-pay.svg.es-CIFT8fob.mjs +4 -0
  157. package/dist/klarna.svg.es-WKt8_NZa.mjs +4 -0
  158. package/dist/maestro.svg.es-DbdxwYUE.mjs +4 -0
  159. package/dist/mastercard.svg.es-B7T3PS12.mjs +4 -0
  160. package/dist/momo.svg.es-X5XB25fM.mjs +4 -0
  161. package/dist/nl-NL-C02xHilF.mjs +435 -0
  162. package/dist/nl-NL-q9xfTZF0.mjs +321 -0
  163. package/dist/nyce.svg.es-DcPsO_sh.mjs +4 -0
  164. package/dist/object.es-8aLDIncs.mjs +12 -0
  165. package/dist/open-banking.svg.es-C4mPhwsn.mjs +4 -0
  166. package/dist/paymentFailure-QZdZHBhf.mjs +47 -0
  167. package/dist/paymentMethods-8w-ccfY_.mjs +77 -0
  168. package/dist/paymentMethods-Goa25rTs.mjs +61 -0
  169. package/dist/paymentOutcome-B6sW1eCV.mjs +22 -0
  170. package/dist/payments-CKpU1K3t.mjs +68 -0
  171. package/dist/paypal.svg.es-BC2AP20j.mjs +4 -0
  172. package/dist/pricing-CEaZGgKe.mjs +29 -0
  173. package/dist/pricing.es-QYWrKMUJ.mjs +30 -0
  174. package/dist/pricingItem.es-bCPArbTa.mjs +55 -0
  175. package/dist/pricingItemConfigs.es-D3pX_9AJ.mjs +78 -0
  176. package/dist/pricingPlanScheduleOverrides-BBp-DmpV.mjs +233 -0
  177. package/dist/pricingPlanSchedules-DSMptcAh.mjs +38 -0
  178. package/dist/pulse.svg.es-Rmoz-9Ej.mjs +4 -0
  179. package/dist/sanitization.es-C6dbuxUJ.mjs +4 -0
  180. package/dist/screens/Checkout/Checkout.ce.d.ts +1 -3
  181. package/dist/screens/Checkout/Checkout.mjs +5 -0
  182. package/dist/screens/CustomerOverview/CustomerOverview.ce.d.ts +1 -3
  183. package/dist/screens/CustomerOverview/CustomerOverview.mjs +201 -0
  184. package/dist/screens/PayInvoice/PayInvoice.ce.d.ts +1 -0
  185. package/dist/screens/PayInvoice/PayInvoice.mjs +865 -0
  186. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.ce.d.ts +1 -0
  187. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +224 -0
  188. package/dist/screens/SubscriptionDetails/SubscriptionDetails.ce.d.ts +1 -0
  189. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +5 -0
  190. package/dist/screens/SubscriptionManagement/SubscriptionManagement.ce.d.ts +1 -0
  191. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +624 -0
  192. package/dist/sepa.svg.es-DIO_K345.mjs +4 -0
  193. package/dist/sessionReference-B8Dbmx5t.mjs +38 -0
  194. package/dist/slots.es-BA4MyEAa.mjs +5 -0
  195. package/dist/sorting.es-C0pdMgX0.mjs +77 -0
  196. package/dist/star.svg.es-BUZNUnYq.mjs +4 -0
  197. package/dist/subscription-BwzkagDI.mjs +212 -0
  198. package/dist/subscriptions-B5bH8hsI.mjs +66 -0
  199. package/dist/taxId.es-e6NEvprh.mjs +243 -0
  200. package/dist/trustly.svg.es-AM7Ha-3Y.mjs +4 -0
  201. package/dist/twint.svg.es-DZogAQG6.mjs +4 -0
  202. package/dist/typeGuards.es-B4XMtlkM.mjs +8 -0
  203. package/dist/types/components/InvoiceTable/InvoiceTable.types.d.ts +21 -0
  204. package/dist/types/components/checkout/CheckoutTitle.types.d.ts +20 -0
  205. package/dist/types/components/checkout/EmptyStatePlaceholder.types.d.ts +4 -0
  206. package/dist/types/components/checkout/PromotionCodeSection.types.d.ts +10 -0
  207. package/dist/types/components/customer/BillingInformationForm/BillingInformationForm.types.d.ts +24 -0
  208. package/dist/types/components/customer/CheckoutForm/CheckoutAddressFields.types.d.ts +22 -0
  209. package/dist/types/components/customer/CheckoutForm/CheckoutForm.types.d.ts +48 -0
  210. package/dist/types/components/customer/CustomerPaymentMethodsBlock/CustomerPaymentMethodsBlock.types.d.ts +10 -0
  211. package/dist/types/components/customer/ShippingAddressForm/ShippingAddressForm.types.d.ts +9 -0
  212. package/dist/types/components/customer/ShippingAddresses/ShippingAddressCard.types.d.ts +11 -0
  213. package/dist/types/components/customer/ShippingAddresses/ShippingAddressList.types.d.ts +9 -0
  214. package/dist/types/components/customer/ShippingAddresses/ShippingAddressesModal.types.d.ts +26 -0
  215. package/dist/types/components/invoices/InvoiceOrderSummary/InvoiceOrderSummary.types.d.ts +5 -0
  216. package/dist/types/components/payments/AddPaymentMethodPane/AddPaymentMethodPane.types.d.ts +19 -0
  217. package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethod.types.d.ts +78 -0
  218. package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethodApplePay.types.d.ts +11 -0
  219. package/dist/types/components/payments/ExpressPaymentMethodButton/ExpressPaymentMethodButton.types.d.ts +3 -0
  220. package/dist/types/components/payments/ExpressPaymentMethods/ExpressPaymentMethods.types.d.ts +25 -0
  221. package/dist/types/components/payments/OnDemandPaymentModalShell/OnDemandPaymentModalShell.types.d.ts +23 -0
  222. package/dist/types/components/payments/PayButton/PayButton.types.d.ts +12 -0
  223. package/dist/types/components/payments/PaymentCompletedCard/PaymentCompletedCard.types.d.ts +9 -0
  224. package/dist/types/components/payments/PaymentErrorCard/PaymentErrorCard.types.d.ts +11 -0
  225. package/dist/types/components/payments/PaymentFeedbackCard/PaymentFeedbackCard.types.d.ts +4 -0
  226. package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +137 -0
  227. package/dist/types/components/payments/PaymentIntegrationFormAdyen/PaymentIntegrationFormAdyen.types.d.ts +6 -0
  228. package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripe.types.d.ts +7 -0
  229. package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripeFrame.types.d.ts +68 -0
  230. package/dist/types/components/payments/PaymentMethodSelector/PaymentMethodSelector.types.d.ts +49 -0
  231. package/dist/types/components/payments/PaymentMethodsList/PaymentMethodsList.types.d.ts +8 -0
  232. package/dist/types/components/payments/PaymentMethodsUnavailableCard/PaymentMethodsUnavailableCard.types.d.ts +8 -0
  233. package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.lib.d.ts +4 -0
  234. package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.lib.types.d.ts +3 -0
  235. package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.vue.d.ts +13 -0
  236. package/dist/types/components/providers/ActionDispatchProvider/composables/useActionDispatchProvider.d.ts +3 -0
  237. package/dist/types/components/providers/AuthProvider/AuthProvider.handle.d.ts +17 -0
  238. package/dist/types/components/providers/AuthProvider/AuthProvider.lib.d.ts +32 -0
  239. package/dist/types/components/providers/AuthProvider/AuthProvider.types.d.ts +20 -0
  240. package/dist/types/components/providers/AuthProvider/AuthProvider.vue.d.ts +16 -0
  241. package/dist/types/components/providers/AuthProvider/composables/useAuth.d.ts +1 -0
  242. package/dist/types/components/providers/AuthProvider/index.d.ts +3 -0
  243. package/dist/types/components/providers/ConfigProvider/ConfigProvider.lib.d.ts +3 -0
  244. package/dist/types/components/providers/ConfigProvider/ConfigProvider.types.d.ts +9 -0
  245. package/dist/types/components/providers/ConfigProvider/ConfigProvider.vue.d.ts +14 -0
  246. package/dist/types/components/providers/ConfigProvider/composables/useConfig.d.ts +3 -0
  247. package/dist/types/components/providers/CssOverridesProvider/CssOverridesProvider.lib.d.ts +11 -0
  248. package/dist/types/components/providers/CssOverridesProvider/CssOverridesProvider.types.d.ts +3 -0
  249. package/dist/types/components/providers/CssOverridesProvider/CssOverridesProvider.vue.d.ts +14 -0
  250. package/dist/types/components/providers/EntryProvider/EntryProvider.lib.d.ts +7 -0
  251. package/dist/types/components/providers/EntryProvider/EntryProvider.types.d.ts +12 -0
  252. package/dist/types/components/providers/EntryProvider/EntryProvider.vue.d.ts +20 -0
  253. package/dist/types/components/providers/ErrorBoundary/ErrorBoundary.vue.d.ts +17 -0
  254. package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.lib.d.ts +5 -0
  255. package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.types.d.ts +4 -0
  256. package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.vue.d.ts +14 -0
  257. package/dist/types/components/providers/ExperimentalFeatureProvider/composables/useExperimentalFeature.d.ts +1 -0
  258. package/dist/types/components/providers/HostElementProvider/HostElementProvider.lib.d.ts +17 -0
  259. package/dist/types/components/providers/HostElementProvider/HostElementProvider.types.d.ts +3 -0
  260. package/dist/types/components/providers/HostElementProvider/HostElementProvider.vue.d.ts +14 -0
  261. package/dist/types/components/providers/HostElementProvider/composables/useHostElementProvider.d.ts +1 -0
  262. package/dist/types/components/providers/LoggerProvider/LoggerProvider.lib.d.ts +34 -0
  263. package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +81 -0
  264. package/dist/types/components/providers/LoggerProvider/LoggerProvider.vue.d.ts +20 -0
  265. package/dist/types/components/providers/LoggerProvider/composables/useLogger.d.ts +6 -0
  266. package/dist/types/components/providers/PortalProvider/PortalProvider.lib.d.ts +10 -0
  267. package/dist/types/components/providers/PortalProvider/PortalProvider.types.d.ts +11 -0
  268. package/dist/types/components/providers/PortalProvider/PortalProvider.vue.d.ts +16 -0
  269. package/dist/types/components/providers/PortalProvider/composables/usePortal.d.ts +3 -0
  270. package/dist/types/components/providers/Provider/Provider.types.d.ts +15 -0
  271. package/dist/types/components/providers/Provider/Provider.vue.d.ts +26 -0
  272. package/dist/types/components/providers/RequiredPropertiesGuard/RequiredPropertiesGuard.vue.d.ts +17 -0
  273. package/dist/types/components/providers/TeleportProvider/TeleportProvider.vue.d.ts +13 -0
  274. package/dist/types/components/providers/TranslationProvider/TranslationOverride.vue.d.ts +14 -0
  275. package/dist/types/components/providers/TranslationProvider/TranslationProvider.lib.d.ts +14 -0
  276. package/dist/types/components/providers/TranslationProvider/TranslationProvider.types.d.ts +22 -0
  277. package/dist/types/components/providers/TranslationProvider/TranslationProvider.vue.d.ts +14 -0
  278. package/dist/types/components/providers/index.d.ts +9 -0
  279. package/dist/types/components/shared/ScreenTitle/ScreenTitle.types.d.ts +4 -0
  280. package/dist/types/components/shared/Section/Section.types.d.ts +21 -0
  281. package/dist/types/components/shared/Skeleton.types.d.ts +5 -0
  282. package/dist/types/components/shared/SlidingPanes/SlidingPanes.types.d.ts +12 -0
  283. package/dist/types/components/subscriptions/ChargeOnDemandModal/ChargeOnDemandModal.types.d.ts +20 -0
  284. package/dist/types/components/subscriptions/EnabledPricingsList/EnabledPricingsList.types.d.ts +15 -0
  285. package/dist/types/components/subscriptions/EnabledPricingsList/EnabledPricingsListItem.types.d.ts +9 -0
  286. package/dist/types/components/subscriptions/OnDemandItemsCard/OnDemandItemsCard.types.d.ts +7 -0
  287. package/dist/types/components/subscriptions/OrderSummary.types.d.ts +56 -0
  288. package/dist/types/components/subscriptions/OrderSummaryInvoice.types.d.ts +16 -0
  289. package/dist/types/components/subscriptions/PlanCustomizationForm/PlanCustomizationEditor.types.d.ts +9 -0
  290. package/dist/types/components/subscriptions/PlanCustomizationForm/PricingGroupContent.types.d.ts +4 -0
  291. package/dist/types/components/subscriptions/PlanCustomizationForm/PricingGroupEditorBase.types.d.ts +8 -0
  292. package/dist/types/components/subscriptions/PlanCustomizationForm/SeatsEditor.types.d.ts +6 -0
  293. package/dist/types/components/subscriptions/PlanCustomizationForm/SeatsEditorItem.types.d.ts +6 -0
  294. package/dist/types/components/subscriptions/PlanCustomizationForm/TieredTable.types.d.ts +5 -0
  295. package/dist/types/components/subscriptions/PlanCustomizationForm/TieredTableRow.types.d.ts +7 -0
  296. package/dist/types/components/subscriptions/PlanCustomizationForm/UnitsEditor.types.d.ts +6 -0
  297. package/dist/types/components/subscriptions/PlanCustomizationForm/UnitsEditorItem.types.d.ts +6 -0
  298. package/dist/types/components/subscriptions/SubscriptionCancellationModal/SubscriptionCancellationModal.types.d.ts +16 -0
  299. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementForm.types.d.ts +22 -0
  300. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementSuccess.types.d.ts +7 -0
  301. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementSummary.types.d.ts +7 -0
  302. package/dist/types/components/subscriptions/SubscriptionSummary.types.d.ts +20 -0
  303. package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsList.types.d.ts +19 -0
  304. package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsListItem.types.d.ts +12 -0
  305. package/dist/types/components/wallets/AutoTopUpCancellationModal/AutoTopUpCancellationModal.types.d.ts +9 -0
  306. package/dist/types/components/wallets/AutoTopUpConfig/AutoTopUpConfig.types.d.ts +53 -0
  307. package/dist/types/components/wallets/AutoTopUpModal/AutoTopUpModal.types.d.ts +16 -0
  308. package/dist/types/components/wallets/ConvertedAmountInput/ConvertedAmountInput.types.d.ts +32 -0
  309. package/dist/types/components/wallets/TopUpModal/TopUpInvoicePreview.types.d.ts +11 -0
  310. package/dist/types/components/wallets/TopUpModal/TopUpModal.types.d.ts +31 -0
  311. package/dist/types/components/wallets/TopUpModal/TopUpModalForm.types.d.ts +25 -0
  312. package/dist/types/components/wallets/TopUpModal/TopUpModalSuccess.types.d.ts +5 -0
  313. package/dist/types/composables/useInvoicePreview.types.d.ts +10 -0
  314. package/dist/types/config/config.beta.d.ts +2 -0
  315. package/dist/types/config/config.dev.d.ts +2 -0
  316. package/dist/types/config/config.live.d.ts +2 -0
  317. package/dist/types/config/internalEnvironments.d.ts +11 -0
  318. package/dist/types/config/internalEnvironments.published.d.ts +7 -0
  319. package/dist/types/config/lib.d.ts +6 -0
  320. package/dist/types/config/types.d.ts +13 -0
  321. package/dist/types/index.d.ts +23 -0
  322. package/dist/types/public/components/BillingInformation/BillingInformation.entry.ce.d.ts +1 -0
  323. package/dist/types/public/components/BillingInformation/BillingInformation.entry.types.d.ts +4 -0
  324. package/dist/types/public/components/BillingInformation/BillingInformation.types.d.ts +9 -0
  325. package/dist/types/public/components/BillingInformationForm/BillingInformationForm.entry.ce.d.ts +1 -0
  326. package/dist/types/public/components/BillingInformationForm/BillingInformationForm.entry.types.d.ts +4 -0
  327. package/dist/types/public/components/BillingInformationForm/BillingInformationForm.types.d.ts +10 -0
  328. package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.entry.ce.d.ts +1 -0
  329. package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.entry.types.d.ts +6 -0
  330. package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.types.d.ts +21 -0
  331. package/dist/types/public/components/CustomerShippingAddresses/CustomerShippingAddresses.types.d.ts +12 -0
  332. package/dist/types/public/components/CustomerWalletBalances/CustomerWalletBalances.types.d.ts +22 -0
  333. package/dist/types/public/components/Invoice/Invoice.entry.ce.d.ts +1 -0
  334. package/dist/types/public/components/Invoice/Invoice.entry.types.d.ts +5 -0
  335. package/dist/types/public/components/Invoice/Invoice.types.d.ts +25 -0
  336. package/dist/types/public/components/InvoiceDetails/InvoiceDetails.entry.ce.d.ts +1 -0
  337. package/dist/types/public/components/InvoiceDetails/InvoiceDetails.entry.types.d.ts +6 -0
  338. package/dist/types/public/components/InvoiceDetails/InvoiceDetails.types.d.ts +7 -0
  339. package/dist/types/public/components/InvoiceHeader/InvoiceHeader.entry.ce.d.ts +1 -0
  340. package/dist/types/public/components/InvoiceHeader/InvoiceHeader.entry.types.d.ts +5 -0
  341. package/dist/types/public/components/InvoiceHeader/InvoiceHeader.types.d.ts +15 -0
  342. package/dist/types/public/components/InvoicesList/InvoicesList.entry.ce.d.ts +1 -0
  343. package/dist/types/public/components/InvoicesList/InvoicesList.entry.types.d.ts +5 -0
  344. package/dist/types/public/components/InvoicesList/InvoicesList.types.d.ts +39 -0
  345. package/dist/types/public/components/PaymentHistory/PaymentHistory.entry.ce.d.ts +1 -0
  346. package/dist/types/public/components/PaymentHistory/PaymentHistory.entry.types.d.ts +6 -0
  347. package/dist/types/public/components/PaymentHistory/PaymentHistory.types.d.ts +8 -0
  348. package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.entry.ce.d.ts +1 -0
  349. package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.entry.types.d.ts +5 -0
  350. package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.types.d.ts +45 -0
  351. package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.entry.ce.d.ts +1 -0
  352. package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.entry.types.d.ts +6 -0
  353. package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.types.d.ts +7 -0
  354. package/dist/types/public/components/SubscriptionsList/SubscriptionsList.entry.ce.d.ts +1 -0
  355. package/dist/types/public/components/SubscriptionsList/SubscriptionsList.entry.types.d.ts +5 -0
  356. package/dist/types/public/components/SubscriptionsList/SubscriptionsList.types.d.ts +19 -0
  357. package/dist/types/public/components/WalletBalances/WalletBalances.entry.ce.d.ts +1 -0
  358. package/dist/types/public/components/WalletBalances/WalletBalances.entry.types.d.ts +3 -0
  359. package/dist/types/public/components/WalletBalances/WalletBalances.types.d.ts +3 -0
  360. package/dist/types/public/core/action-request.types.d.ts +60 -0
  361. package/dist/types/public/core/configuration.d.ts +2 -0
  362. package/dist/types/public/core/index.d.ts +14 -0
  363. package/dist/types/public/core/registry.ce.d.ts +8 -0
  364. package/dist/types/public/core/registry.d.ts +3 -0
  365. package/dist/types/public/core/types.d.ts +130 -0
  366. package/dist/types/public/screens/Checkout/Checkout.entry.ce.d.ts +1 -0
  367. package/dist/types/public/screens/Checkout/Checkout.entry.types.d.ts +11 -0
  368. package/dist/types/public/screens/Checkout/Checkout.types.d.ts +46 -0
  369. package/dist/types/public/screens/CustomerOverview/CustomerOverview.entry.ce.d.ts +1 -0
  370. package/dist/types/public/screens/CustomerOverview/CustomerOverview.entry.types.d.ts +5 -0
  371. package/dist/types/public/screens/CustomerOverview/CustomerOverview.types.d.ts +2 -0
  372. package/dist/types/public/screens/PayInvoice/PayInvoice.entry.ce.d.ts +1 -0
  373. package/dist/types/public/screens/PayInvoice/PayInvoice.entry.types.d.ts +4 -0
  374. package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +27 -0
  375. package/dist/types/public/screens/PaymentMethodsManagement/PaymentMethodsManagement.entry.ce.d.ts +1 -0
  376. package/dist/types/public/screens/PaymentMethodsManagement/PaymentMethodsManagement.entry.types.d.ts +3 -0
  377. package/dist/types/public/screens/PaymentMethodsManagement/PaymentMethodsManagement.types.d.ts +7 -0
  378. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.configuration.types.d.ts +27 -0
  379. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.entry.ce.d.ts +1 -0
  380. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.entry.types.d.ts +6 -0
  381. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.types.d.ts +23 -0
  382. package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.entry.ce.d.ts +1 -0
  383. package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.entry.types.d.ts +5 -0
  384. package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.types.d.ts +13 -0
  385. package/dist/types/public/screens/types.d.ts +4 -0
  386. package/dist/types/public/types/index.d.ts +23 -0
  387. package/dist/types/services/invoices.types.d.ts +26 -0
  388. package/dist/types/services/paymentMethods.types.d.ts +25 -0
  389. package/dist/types/services/requests.types.d.ts +41 -0
  390. package/dist/types/translations/supported.d.ts +1 -0
  391. package/dist/types/types/EntryBaseProps.d.ts +10 -0
  392. package/dist/types/types/errors.d.ts +13 -0
  393. package/dist/types/types/portalAuthentication.d.ts +2 -0
  394. package/dist/types/types/portalToken.d.ts +9 -0
  395. package/dist/types/types/shippingAddress.d.ts +9 -0
  396. package/dist/types/vendor/@adyen/adyen-web/index.d.ts +2 -0
  397. package/dist/types/vendor/@solvimon/solvimon-types/index.d.ts +118 -0
  398. package/dist/types/vendor/@solvimon/solvimon-types/types/Address.d.ts +17 -0
  399. package/dist/types/vendor/@solvimon/solvimon-types/types/AgentContext.d.ts +3 -0
  400. package/dist/types/vendor/@solvimon/solvimon-types/types/Alerts.d.ts +72 -0
  401. package/dist/types/vendor/@solvimon/solvimon-types/types/Amount.d.ts +4 -0
  402. package/dist/types/vendor/@solvimon/solvimon-types/types/Api.d.ts +50 -0
  403. package/dist/types/vendor/@solvimon/solvimon-types/types/ApiError.d.ts +7 -0
  404. package/dist/types/vendor/@solvimon/solvimon-types/types/ApiKey.d.ts +21 -0
  405. package/dist/types/vendor/@solvimon/solvimon-types/types/ApiStatus.d.ts +7 -0
  406. package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalPolicies.d.ts +82 -0
  407. package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalRequests.d.ts +43 -0
  408. package/dist/types/vendor/@solvimon/solvimon-types/types/Attachment.d.ts +14 -0
  409. package/dist/types/vendor/@solvimon/solvimon-types/types/Band.d.ts +30 -0
  410. package/dist/types/vendor/@solvimon/solvimon-types/types/BaseResourceStatus.d.ts +3 -0
  411. package/dist/types/vendor/@solvimon/solvimon-types/types/BillingEntity.d.ts +45 -0
  412. package/dist/types/vendor/@solvimon/solvimon-types/types/BillingPeriod.d.ts +5 -0
  413. package/dist/types/vendor/@solvimon/solvimon-types/types/BillingTime.d.ts +1 -0
  414. package/dist/types/vendor/@solvimon/solvimon-types/types/ChargeOnDemandPricingItems.d.ts +47 -0
  415. package/dist/types/vendor/@solvimon/solvimon-types/types/Commitment.d.ts +9 -0
  416. package/dist/types/vendor/@solvimon/solvimon-types/types/CommitmentItem.d.ts +17 -0
  417. package/dist/types/vendor/@solvimon/solvimon-types/types/Comparator.d.ts +1 -0
  418. package/dist/types/vendor/@solvimon/solvimon-types/types/ConfigMeterProperties.d.ts +15 -0
  419. package/dist/types/vendor/@solvimon/solvimon-types/types/ConfiguredMeterValue.d.ts +9 -0
  420. package/dist/types/vendor/@solvimon/solvimon-types/types/Country.d.ts +1 -0
  421. package/dist/types/vendor/@solvimon/solvimon-types/types/CreateMeterData.d.ts +5 -0
  422. package/dist/types/vendor/@solvimon/solvimon-types/types/CreatePricingPlanVersion.d.ts +3 -0
  423. package/dist/types/vendor/@solvimon/solvimon-types/types/CreditType.d.ts +16 -0
  424. package/dist/types/vendor/@solvimon/solvimon-types/types/Currency.d.ts +8 -0
  425. package/dist/types/vendor/@solvimon/solvimon-types/types/CustomFields.d.ts +51 -0
  426. package/dist/types/vendor/@solvimon/solvimon-types/types/CustomerContact.d.ts +12 -0
  427. package/dist/types/vendor/@solvimon/solvimon-types/types/Customers.d.ts +75 -0
  428. package/dist/types/vendor/@solvimon/solvimon-types/types/Discount.d.ts +12 -0
  429. package/dist/types/vendor/@solvimon/solvimon-types/types/DiscountItem.d.ts +24 -0
  430. package/dist/types/vendor/@solvimon/solvimon-types/types/Document.d.ts +22 -0
  431. package/dist/types/vendor/@solvimon/solvimon-types/types/DueDateConfiguration.d.ts +8 -0
  432. package/dist/types/vendor/@solvimon/solvimon-types/types/Embeddable.d.ts +8 -0
  433. package/dist/types/vendor/@solvimon/solvimon-types/types/Entitlement.d.ts +22 -0
  434. package/dist/types/vendor/@solvimon/solvimon-types/types/Environment.d.ts +1 -0
  435. package/dist/types/vendor/@solvimon/solvimon-types/types/EventTrace.d.ts +23 -0
  436. package/dist/types/vendor/@solvimon/solvimon-types/types/EventTraceExtended.d.ts +22 -0
  437. package/dist/types/vendor/@solvimon/solvimon-types/types/EventTraceLink.d.ts +14 -0
  438. package/dist/types/vendor/@solvimon/solvimon-types/types/EventTraceLinkExtended.d.ts +15 -0
  439. package/dist/types/vendor/@solvimon/solvimon-types/types/Features.d.ts +25 -0
  440. package/dist/types/vendor/@solvimon/solvimon-types/types/IdentityProvider.d.ts +40 -0
  441. package/dist/types/vendor/@solvimon/solvimon-types/types/IndexingSettings.d.ts +24 -0
  442. package/dist/types/vendor/@solvimon/solvimon-types/types/Integrations.d.ts +375 -0
  443. package/dist/types/vendor/@solvimon/solvimon-types/types/Invoice.d.ts +379 -0
  444. package/dist/types/vendor/@solvimon/solvimon-types/types/JWT.d.ts +32 -0
  445. package/dist/types/vendor/@solvimon/solvimon-types/types/Markup.d.ts +8 -0
  446. package/dist/types/vendor/@solvimon/solvimon-types/types/MarkupItem.d.ts +11 -0
  447. package/dist/types/vendor/@solvimon/solvimon-types/types/Meter.d.ts +32 -0
  448. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterConditions.d.ts +26 -0
  449. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterData.d.ts +25 -0
  450. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterDataExpanded.d.ts +5 -0
  451. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterProperty.d.ts +34 -0
  452. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterPropertyValue.d.ts +5 -0
  453. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterPropertyVariable.d.ts +16 -0
  454. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterValue.d.ts +16 -0
  455. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterValueCalculation.d.ts +20 -0
  456. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterValueValue.d.ts +7 -0
  457. package/dist/types/vendor/@solvimon/solvimon-types/types/ModelType.d.ts +1 -0
  458. package/dist/types/vendor/@solvimon/solvimon-types/types/Name.d.ts +5 -0
  459. package/dist/types/vendor/@solvimon/solvimon-types/types/NotificationPreferences.d.ts +9 -0
  460. package/dist/types/vendor/@solvimon/solvimon-types/types/OAuth.d.ts +28 -0
  461. package/dist/types/vendor/@solvimon/solvimon-types/types/Payment.d.ts +124 -0
  462. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAcceptor.d.ts +127 -0
  463. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAction.d.ts +74 -0
  464. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentMethod.d.ts +173 -0
  465. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentMethodOptions.d.ts +45 -0
  466. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentSchedules.d.ts +142 -0
  467. package/dist/types/vendor/@solvimon/solvimon-types/types/Permission.d.ts +1 -0
  468. package/dist/types/vendor/@solvimon/solvimon-types/types/Platform.d.ts +132 -0
  469. package/dist/types/vendor/@solvimon/solvimon-types/types/Portal.d.ts +134 -0
  470. package/dist/types/vendor/@solvimon/solvimon-types/types/Pricing.d.ts +41 -0
  471. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingCategory.d.ts +18 -0
  472. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingCategoryExtended.d.ts +9 -0
  473. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingExtended.d.ts +9 -0
  474. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingGroup.d.ts +29 -0
  475. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingItem.d.ts +40 -0
  476. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingItemConfig.d.ts +135 -0
  477. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanGroups.d.ts +31 -0
  478. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSchedule.d.ts +111 -0
  479. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanScheduleInfo.d.ts +7 -0
  480. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanScheduleWithPlanData.d.ts +9 -0
  481. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscription.d.ts +94 -0
  482. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscriptionGroup.d.ts +10 -0
  483. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanVersion.d.ts +71 -0
  484. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanVersionExtended.d.ts +7 -0
  485. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlans.d.ts +47 -0
  486. package/dist/types/vendor/@solvimon/solvimon-types/types/Product.d.ts +24 -0
  487. package/dist/types/vendor/@solvimon/solvimon-types/types/ProductCategory.d.ts +10 -0
  488. package/dist/types/vendor/@solvimon/solvimon-types/types/ProductItem.d.ts +62 -0
  489. package/dist/types/vendor/@solvimon/solvimon-types/types/PromotionCodes.d.ts +14 -0
  490. package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteTemplates.d.ts +46 -0
  491. package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteVersions.d.ts +128 -0
  492. package/dist/types/vendor/@solvimon/solvimon-types/types/Quotes.d.ts +81 -0
  493. package/dist/types/vendor/@solvimon/solvimon-types/types/ReprocessLog.d.ts +31 -0
  494. package/dist/types/vendor/@solvimon/solvimon-types/types/Resource.d.ts +5 -0
  495. package/dist/types/vendor/@solvimon/solvimon-types/types/ResourceStatus.d.ts +2 -0
  496. package/dist/types/vendor/@solvimon/solvimon-types/types/Role.d.ts +19 -0
  497. package/dist/types/vendor/@solvimon/solvimon-types/types/SeatAssignment.d.ts +22 -0
  498. package/dist/types/vendor/@solvimon/solvimon-types/types/ShippingAddress.d.ts +54 -0
  499. package/dist/types/vendor/@solvimon/solvimon-types/types/SignatureRequest.d.ts +27 -0
  500. package/dist/types/vendor/@solvimon/solvimon-types/types/TaxCategory.d.ts +1 -0
  501. package/dist/types/vendor/@solvimon/solvimon-types/types/TaxIdentifier.d.ts +17 -0
  502. package/dist/types/vendor/@solvimon/solvimon-types/types/TaxSummary.d.ts +21 -0
  503. package/dist/types/vendor/@solvimon/solvimon-types/types/TimePeriod.d.ts +5 -0
  504. package/dist/types/vendor/@solvimon/solvimon-types/types/Timestamp.d.ts +4 -0
  505. package/dist/types/vendor/@solvimon/solvimon-types/types/Token.d.ts +6 -0
  506. package/dist/types/vendor/@solvimon/solvimon-types/types/User.d.ts +106 -0
  507. package/dist/types/vendor/@solvimon/solvimon-types/types/ValueType.d.ts +1 -0
  508. package/dist/types/vendor/@solvimon/solvimon-types/types/Wallet.d.ts +50 -0
  509. package/dist/types/vendor/@solvimon/solvimon-types/types/WalletAutoTopUpConfigs.d.ts +28 -0
  510. package/dist/types/vendor/@solvimon/solvimon-types/types/WalletType.d.ts +54 -0
  511. package/dist/types/vendor/@solvimon/solvimon-types/types/Webhook.d.ts +48 -0
  512. package/dist/types/vendor/@solvimon/solvimon-types/types/WebhookEvent.d.ts +18 -0
  513. package/dist/types/vendor/@solvimon/solvimon-types/types/Workflows.d.ts +222 -0
  514. package/dist/types/vendor/@solvimon/solvimon-types/types/forms.d.ts +1 -0
  515. package/dist/types/vendor/@solvimon/solvimon-types/utils.d.ts +17 -0
  516. package/dist/types/vendor/@solvimon/solvimon-ui/components/providers/BrandProvider/BrandProvider.types.d.ts +16 -0
  517. package/dist/types/vendor/@solvimon/solvimon-ui/components/providers/IntlProvider/IntlProvider.types.d.ts +66 -0
  518. package/dist/types/vendor/@solvimon/solvimon-ui/index.d.ts +2 -0
  519. package/dist/unionpay.svg.es-me7q-nTI.mjs +4 -0
  520. package/dist/useActionDispatchProvider-ChAHdwR8.mjs +9 -0
  521. package/dist/useCustomer-CTMhg1nd.mjs +20 -0
  522. package/dist/useCustomerFormLabels-D4oDnfxA.mjs +1173 -0
  523. package/dist/useIncrementalLoading-CBVutPH8.mjs +60 -0
  524. package/dist/useInvoiceData-qUGbBAQK.mjs +21 -0
  525. package/dist/useInvoicesList-wJvZAJpW.mjs +674 -0
  526. package/dist/useLazyFloating.es-CycqRyeb.mjs +68 -0
  527. package/dist/useLoadInitialData-UvfYXgbi.mjs +15 -0
  528. package/dist/usePaymentFormHold-Cwdr-vyc.mjs +181 -0
  529. package/dist/usePaymentMethodAvailability-35l4pWdH.mjs +117 -0
  530. package/dist/usePaymentMethods-De7hlLHo.mjs +21 -0
  531. package/dist/usePayments-hWS7fnOx.mjs +323 -0
  532. package/dist/usePortal-DUfD6hrA.mjs +7 -0
  533. package/dist/useService-BwzIBIRp.mjs +56 -0
  534. package/dist/useTimePeriod.es-BUorDLVK.mjs +93 -0
  535. package/dist/useViewport-psZejz_H.mjs +19 -0
  536. package/dist/visa.svg.es-B0T5Su99.mjs +4 -0
  537. package/dist/vpay.svg.es-Zt3rrmCy.mjs +4 -0
  538. package/dist/wallets.es-eH2C2ygn.mjs +102 -0
  539. package/dist/zip.svg.es-QC6dxzC7.mjs +4 -0
  540. package/package.json +105 -74
  541. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-BD3CrJzj.js +0 -1
  542. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-DQAp1xwu.mjs +0 -56
  543. package/dist/ContentWithAsideLayout-CRsFr9TH.mjs +0 -42
  544. package/dist/ContentWithAsideLayout-DczcgSrt.js +0 -1
  545. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BE3I7Oe1.js +0 -1
  546. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D0ie9Krt.mjs +0 -85
  547. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DVDOsMnT.mjs +0 -90
  548. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-sNdlKgdU.js +0 -1
  549. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DJEZEEwZ.mjs +0 -6568
  550. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Sn1Jq19s.js +0 -1
  551. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-Bifo4jTH.js +0 -1
  552. package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-DWp42_G4.mjs +0 -75
  553. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-C-taYlG4.mjs +0 -63
  554. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-C_BwMlBE.js +0 -1
  555. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-Bp5RvQVS.mjs +0 -373
  556. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-yyhwzYSM.js +0 -1
  557. package/dist/_Uint8Array-DHE03FZr.mjs +0 -507
  558. package/dist/_Uint8Array-DxISR7XF.js +0 -1
  559. package/dist/auto-DzZuCneB.mjs +0 -14387
  560. package/dist/auto-PpnAChnH.js +0 -6
  561. package/dist/cloneDeep-DranHQkY.js +0 -1
  562. package/dist/cloneDeep-sm9cY-u2.mjs +0 -212
  563. package/dist/component-DEo_ndpK.mjs +0 -58668
  564. package/dist/component-XHQYFLA_.js +0 -1
  565. package/dist/components/BillingInformation/BillingInformation.cjs.js +0 -1
  566. package/dist/components/BillingInformation/BillingInformation.es.js +0 -98
  567. package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +0 -1
  568. package/dist/components/BillingInformationForm/BillingInformationForm.es.js +0 -584
  569. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +0 -1
  570. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +0 -134
  571. package/dist/components/Invoice/Invoice.cjs.js +0 -1
  572. package/dist/components/Invoice/Invoice.es.js +0 -582
  573. package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +0 -1
  574. package/dist/components/InvoiceDetails/InvoiceDetails.es.js +0 -129
  575. package/dist/components/InvoicesList/InvoicesList.cjs.js +0 -1
  576. package/dist/components/InvoicesList/InvoicesList.es.js +0 -104
  577. package/dist/components/PaymentHistory/PaymentHistory.cjs.js +0 -1
  578. package/dist/components/PaymentHistory/PaymentHistory.es.js +0 -133
  579. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +0 -1
  580. package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +0 -238
  581. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +0 -1
  582. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +0 -152
  583. package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +0 -1
  584. package/dist/components/SubscriptionsList/SubscriptionsList.es.js +0 -134
  585. package/dist/components/WalletBalances/WalletBalances.cjs.js +0 -1
  586. package/dist/components/WalletBalances/WalletBalances.es.js +0 -120
  587. package/dist/core/index.cjs.js +0 -1
  588. package/dist/core/index.es.js +0 -6
  589. package/dist/index-2jo9BSPM.js +0 -1
  590. package/dist/index-BFZ0dPh9.mjs +0 -179
  591. package/dist/index-CWSXne1Q.js +0 -1
  592. package/dist/index-CzL1ZcGi.mjs +0 -85
  593. package/dist/index-D3v7hAtc.mjs +0 -253
  594. package/dist/index-DRdBmZ2-.js +0 -1
  595. package/dist/index.cjs.js +0 -1
  596. package/dist/index.es.js +0 -45
  597. package/dist/invoices-BW1notiX.js +0 -1
  598. package/dist/invoices-M5oYVch6.mjs +0 -84
  599. package/dist/paymentMethods-BX80t2zk.js +0 -1
  600. package/dist/paymentMethods-CqKUfc3w.mjs +0 -65
  601. package/dist/payments-BHv4hCeJ.js +0 -1
  602. package/dist/payments-CosaPZwo.mjs +0 -47
  603. package/dist/registry-BwKEYOf7.js +0 -1
  604. package/dist/registry-Cag1Jj7P.mjs +0 -143
  605. package/dist/screens/Checkout/Checkout.cjs.js +0 -1
  606. package/dist/screens/Checkout/Checkout.es.js +0 -5142
  607. package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +0 -1
  608. package/dist/screens/CustomerOverview/CustomerOverview.es.js +0 -136
  609. package/dist/screens/UpgradeSubscription/UpgradeSubscription.ce.d.ts +0 -3
  610. package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +0 -1
  611. package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +0 -1012
  612. package/dist/solvimon-web.css +0 -1
  613. package/dist/sprite-i5T7eZnk-C55G-dBo.js +0 -1
  614. package/dist/sprite-i5T7eZnk-i5T7eZnk.mjs +0 -4
  615. package/dist/subscriptions-Bs4DIE8f.mjs +0 -74
  616. package/dist/subscriptions-CnxvsBXd.js +0 -1
  617. package/dist/useActionDispatchProvider-CgRcOqv3.mjs +0 -12
  618. package/dist/useActionDispatchProvider-Cru69mAl.js +0 -1
  619. package/dist/useCustomer-B0NK96dA.js +0 -1
  620. package/dist/useCustomer-DlcjY3fP.mjs +0 -45
  621. package/dist/useCustomerPaymentMethodOptions-BzEquyUV.mjs +0 -169
  622. package/dist/useCustomerPaymentMethodOptions-C-8BLzqb.js +0 -1
  623. package/dist/useIncrementalLoading-C7ToTmZK.mjs +0 -71
  624. package/dist/useIncrementalLoading-D60Vttil.js +0 -1
  625. package/dist/useInvoiceData-CcueV3We.mjs +0 -51
  626. package/dist/useInvoiceData-DstXfI7t.js +0 -1
  627. package/dist/useInvoicesList-CXng3aUm.mjs +0 -294
  628. package/dist/useInvoicesList-DmzjgMlW.js +0 -1
  629. package/dist/useLoadInitialData-BRg7IWqW.js +0 -1
  630. package/dist/useLoadInitialData-Dm48tlSO.mjs +0 -13
  631. package/dist/usePaymentMethods-DCGVRXA4.js +0 -1
  632. package/dist/usePaymentMethods-Db-1R6rI.mjs +0 -16
  633. package/dist/useService-B4qv5N2D.mjs +0 -281
  634. package/dist/useService-D-CUtlp3.js +0 -1
  635. package/dist/useWalletBalanceItems-BZyiAhcV.js +0 -1
  636. package/dist/useWalletBalanceItems-CHkLaccm.mjs +0 -105
@@ -0,0 +1,4169 @@
1
+ import { defineComponent as pe, openBlock as p, createElementBlock as x, createElementVNode as k, createVNode as A, unref as t, withCtx as M, createTextVNode as F, toDisplayString as j, withModifiers as lt, ref as Y, computed as u, toValue as In, watch as he, onMounted as qe, toRaw as Gn, shallowRef as Yn, nextTick as Ve, createBlock as w, useModel as An, mergeModels as ht, reactive as Kn, Fragment as ye, renderList as rt, createCommentVNode as z, createSlots as bt, normalizeClass as ke, renderSlot as _t, resolveComponent as Hn, onBeforeUnmount as Qn, mergeProps as Oe, withDirectives as Zn, withKeys as Xt, vShow as qn, defineAsyncComponent as Wt, isRef as Jt } from "vue";
2
+ import { a as Pe, d as ce, e as Se, k as Xn, C as Wn, g as Jn, h as eo, j as to } from "./customElements-DK4GKNJG.mjs";
3
+ import { u as Mt } from "./useTimePeriod.es-BUorDLVK.mjs";
4
+ import { f as be } from "./formatting.es-RclXHhKo.mjs";
5
+ import { _ as xe, a as ot } from "./Button.vue.es-j7iYlqtJ.mjs";
6
+ import { _ as en } from "./ErrorNotification.vue.es-F068p7PY.mjs";
7
+ import { i as Ge, g as st, b as no, a as tn, f as It, h as oo, j as nn, r as io, D as ao, t as Pn, k as on, u as so, c as an, _ as it } from "./useCustomerFormLabels-D4oDnfxA.mjs";
8
+ import { t as At, o as lo } from "./taxId.es-e6NEvprh.mjs";
9
+ import { e as Pt, u as ro, b as sn, r as uo, f as Ee, a as _e, d as co } from "./formControl-BZQLHnOO.mjs";
10
+ import { c as po } from "./subscriptions-B5bH8hsI.mjs";
11
+ import { A as Te } from "./ApiStatus-CSFKl_ra.mjs";
12
+ import { c as mo, _ as go } from "./TrialChip.vue.es-C51z1ZiA.mjs";
13
+ import { a as yo, u as vo } from "./useService-BwzIBIRp.mjs";
14
+ import { c as fo } from "./invoices-DdREPDXV.mjs";
15
+ import { i as $e, c as Cn, h as Ct, m as ho, a as _o, n as bo } from "./subscription-BwzkagDI.mjs";
16
+ import { u as Mo, s as Io, a as ln, r as Ao, _ as rn } from "./CheckoutAddressFields.vue_vue_type_script_setup_true_lang-CEnM1uxK.mjs";
17
+ import { u as Po, _ as Nn, a as Co } from "./SubscriptionSummary.vue_vue_type_script_setup_true_lang-BZNsqN4G.mjs";
18
+ import { u as No } from "./paymentMethods-Goa25rTs.mjs";
19
+ import { b as Do, c as Eo } from "./pricing-CEaZGgKe.mjs";
20
+ import { e as Lo, d as ko, f as un, S as So } from "./addonQuantity-CCVaA3e-.mjs";
21
+ import { s as wo, a as To, g as Oo, b as cn, c as at, d as dn, _ as xo, i as Ro } from "./OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-B_FpibLA.mjs";
22
+ import { h as zo, i as jo, j as Uo, e as Bo, t as pn, a as Fo, u as Vo, s as $o, k as Go } from "./usePaymentFormHold-Cwdr-vyc.mjs";
23
+ import { u as Yo } from "./usePortal-DUfD6hrA.mjs";
24
+ import { g as mn } from "./getCountryNameByCode.es-BDHua7VM.mjs";
25
+ import { _ as gn } from "./Expand.vue.es-BleuAfDz.mjs";
26
+ import { _ as Qe } from "./Input.vue.es-BLyHcmu4.mjs";
27
+ import { _ as yn, u as Ko } from "./Label.vue.es-es7ZUBSP.mjs";
28
+ import { _ as Ae } from "./Section.vue.es-Oqn1wGPZ.mjs";
29
+ import { _ as Ho } from "./Alert.vue.es-ZPG49yR_.mjs";
30
+ import { c as Qo } from "./customer-lf6S5DBR.mjs";
31
+ import { a as Zo } from "./InvoicePreview.vue.es-Cpf66_xV.mjs";
32
+ import { _ as qo, T as Xo, a as Wo } from "./TooltipParagraph.vue.es-BES3zsYN.mjs";
33
+ import { _ as Jo } from "./PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BHQrWy6r.mjs";
34
+ import { _ as vn } from "./Chip.vue.es-Dxx_0dte.mjs";
35
+ import { u as Dn } from "./useViewport-psZejz_H.mjs";
36
+ import { _ as ft } from "./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-wPma8Os-.mjs";
37
+ import { _ as Le } from "./Skeleton.vue_vue_type_script_setup_true_lang-D7MFjvrP.mjs";
38
+ import { _ as ei } from "./DividerText.vue.es-BusbyeAI.mjs";
39
+ import { l as ut } from "./adyenSdk-B01MB9Ia.mjs";
40
+ import { c as ti } from "./payments-CKpU1K3t.mjs";
41
+ import { c as ni } from "./paymentFailure-QZdZHBhf.mjs";
42
+ import { a as oi, i as ii } from "./paymentOutcome-B6sW1eCV.mjs";
43
+ import { C as ai } from "./ContentWithAsideLayout-Bnbsq8_5.mjs";
44
+ import { _ as si } from "./SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-OM19NPBh.mjs";
45
+ const li = {
46
+ AT: "Austria",
47
+ BE: "Belgium",
48
+ BG: "Bulgaria",
49
+ CY: "Cyprus",
50
+ CZ: "Czech Republic",
51
+ DE: "Germany",
52
+ DK: "Denmark",
53
+ EE: "Estonia",
54
+ ES: "Spain",
55
+ FI: "Finland",
56
+ FR: "France",
57
+ GR: "Greece",
58
+ HR: "Croatia",
59
+ HU: "Hungary",
60
+ IE: "Ireland",
61
+ IT: "Italy",
62
+ LT: "Lithuania",
63
+ LU: "Luxembourg",
64
+ LV: "Latvia",
65
+ MT: "Malta",
66
+ NL: "Netherlands",
67
+ PL: "Poland",
68
+ PT: "Portugal",
69
+ RO: "Romania",
70
+ SE: "Sweden",
71
+ SI: "Slovenia",
72
+ SK: "Slovakia"
73
+ };
74
+ function En(e) {
75
+ return Object.keys(li).includes(e);
76
+ }
77
+ const ri = { class: "flex min-h-96 w-full items-center justify-center" }, ui = { class: "max-w-sm" }, ci = /* @__PURE__ */ pe({
78
+ __name: "CheckoutNotAvailable",
79
+ setup(e) {
80
+ const { $t: o } = Pe(), i = () => {
81
+ window.location.reload();
82
+ };
83
+ return (s, n) => (p(), x("div", ri, [
84
+ k("div", ui, [
85
+ A(t(ce), { variant: "heading-1" }, {
86
+ default: M(() => [
87
+ F(j(t(o)({
88
+ defaultMessage: "Checkout not available",
89
+ id: "checkout.not_available.title",
90
+ description: "The title of the checkout not available page"
91
+ })), 1)
92
+ ]),
93
+ _: 1
94
+ }),
95
+ A(t(ce), {
96
+ variant: "body-sm",
97
+ color: "subtle"
98
+ }, {
99
+ default: M(() => [
100
+ F(j(t(o)({
101
+ defaultMessage: "The checkout is currently not available.",
102
+ id: "checkout.not_available.description",
103
+ description: "The description of the checkout not available page"
104
+ })) + " ", 1),
105
+ k("a", {
106
+ href: "#",
107
+ class: "text-primary-900 hover:underline",
108
+ onClick: lt(i, ["prevent"])
109
+ }, j(t(o)({
110
+ defaultMessage: "Reload",
111
+ id: "checkout.not_available.reload_button",
112
+ description: "The label of the reload button"
113
+ })), 1),
114
+ F(" " + j(t(o)({
115
+ defaultMessage: "this page to try again, or contact customer support.",
116
+ id: "checkout.not_available.contact_support_message",
117
+ description: "The message shown when the user wants to contact customer support"
118
+ })), 1)
119
+ ]),
120
+ _: 1
121
+ })
122
+ ])
123
+ ]));
124
+ }
125
+ }), di = [
126
+ "companyLegalName",
127
+ "firstName",
128
+ "infix",
129
+ "lastName",
130
+ "addressLine1",
131
+ "addressLine2",
132
+ "postalCode",
133
+ "city",
134
+ "state",
135
+ "companyVatNumber",
136
+ "promotionCode",
137
+ "shippingAddressLine1",
138
+ "shippingAddressLine2",
139
+ "shippingPostalCode",
140
+ "shippingCity",
141
+ "shippingState",
142
+ "shippingPhoneNumber",
143
+ "shippingFirstName",
144
+ "shippingLastName",
145
+ "shippingAttentionName"
146
+ ], pi = /^\d{1,9}$/, fn = (e) => Ge(e), Ln = (e) => typeof e == "object" && e !== null && !Array.isArray(e);
147
+ function hn(e) {
148
+ if (!Array.isArray(e)) return;
149
+ const o = e.flatMap(
150
+ (i) => Ln(i) && typeof i.pricing_item_config_id == "string" && typeof i.number == "string" && pi.test(i.number) ? [{ pricing_item_config_id: i.pricing_item_config_id, number: i.number }] : []
151
+ );
152
+ return o.length === e.length ? o : void 0;
153
+ }
154
+ function mi(e) {
155
+ if (!Ln(e)) return {};
156
+ const o = {};
157
+ di.forEach((n) => {
158
+ const c = e[n];
159
+ typeof c == "string" && (o[n] = c);
160
+ }), typeof e.email == "string" && Pt.$validator(e.email, {}, {}) && (o.email = e.email), typeof e.country == "string" && fn(e.country) && (o.country = e.country), typeof e.shippingCountry == "string" && fn(e.shippingCountry) && (o.shippingCountry = e.shippingCountry), typeof e.billingAddressSameAsShipping == "boolean" && (o.billingAddressSameAsShipping = e.billingAddressSameAsShipping), (e.type === "INDIVIDUAL" || e.type === "ORGANIZATION") && (o.type = e.type);
161
+ const i = hn(e.seatsValues);
162
+ i && (o.seatsValues = i);
163
+ const s = hn(e.unitsValues);
164
+ return s && (o.unitsValues = s), Array.isArray(e.enabledPricingIds) && e.enabledPricingIds.every((n) => typeof n == "string") && (o.enabledPricingIds = e.enabledPricingIds), o;
165
+ }
166
+ const gi = "preview", yi = "NL", kn = (e) => {
167
+ var o, i;
168
+ if ("organization" in e)
169
+ return (o = e.organization) == null ? void 0 : o.registered_address;
170
+ if ("individual" in e)
171
+ return (i = e.individual) == null ? void 0 : i.residential_address;
172
+ }, vi = (e) => {
173
+ const o = kn(e);
174
+ return {
175
+ ...(o == null ? void 0 : o.line1) && { line1: o.line1 },
176
+ ...(o == null ? void 0 : o.line2) && { line2: o.line2 },
177
+ ...(o == null ? void 0 : o.city) && { city: o.city },
178
+ ...(o == null ? void 0 : o.state) && { state: o.state },
179
+ country: (o == null ? void 0 : o.country) || yi,
180
+ ...(o == null ? void 0 : o.postal_code) && { postal_code: o.postal_code }
181
+ };
182
+ }, fi = (e) => {
183
+ var s, n;
184
+ const o = vi(e), i = e.type ?? "INDIVIDUAL";
185
+ if (i === "ORGANIZATION") {
186
+ const c = "organization" in e ? e.organization : void 0, g = (n = (s = c == null ? void 0 : c.tax_ids) == null ? void 0 : s[0]) == null ? void 0 : n.id;
187
+ return {
188
+ type: i,
189
+ organization: {
190
+ legal_name: (c == null ? void 0 : c.legal_name) || gi,
191
+ registered_address: o,
192
+ ...g && {
193
+ tax_id: At.$validator(g, {}, {}) ? g : void 0
194
+ }
195
+ }
196
+ };
197
+ }
198
+ return {
199
+ type: i,
200
+ individual: {
201
+ residential_address: o
202
+ }
203
+ };
204
+ }, hi = {
205
+ AD: "EUR",
206
+ AE: "AED",
207
+ AF: "AFN",
208
+ AG: "XCD",
209
+ AI: "XCD",
210
+ AL: "ALL",
211
+ AM: "AMD",
212
+ AO: "AOA",
213
+ AR: "ARS",
214
+ AS: "USD",
215
+ AT: "EUR",
216
+ AU: "AUD",
217
+ AW: "AWG",
218
+ AX: "EUR",
219
+ AZ: "AZN",
220
+ BA: "BAM",
221
+ BB: "BBD",
222
+ BD: "BDT",
223
+ BE: "EUR",
224
+ BF: "XOF",
225
+ BG: "BGN",
226
+ BH: "BHD",
227
+ BI: "BIF",
228
+ BJ: "XOF",
229
+ BL: "EUR",
230
+ BM: "BMD",
231
+ BN: "BND",
232
+ BO: "BOB",
233
+ BQ: "USD",
234
+ BR: "BRL",
235
+ BS: "BSD",
236
+ BT: "BTN",
237
+ BV: "NOK",
238
+ BW: "BWP",
239
+ BY: "BYN",
240
+ BZ: "BZD",
241
+ CA: "CAD",
242
+ CC: "AUD",
243
+ CD: "CDF",
244
+ CF: "XAF",
245
+ CG: "XAF",
246
+ CH: "CHF",
247
+ CI: "XOF",
248
+ CK: "NZD",
249
+ CL: "CLP",
250
+ CM: "XAF",
251
+ CN: "CNY",
252
+ CO: "COP",
253
+ CR: "CRC",
254
+ CU: "CUP",
255
+ CV: "CVE",
256
+ CW: "ANG",
257
+ CX: "AUD",
258
+ CY: "EUR",
259
+ CZ: "CZK",
260
+ DE: "EUR",
261
+ DJ: "DJF",
262
+ DK: "DKK",
263
+ DM: "XCD",
264
+ DO: "DOP",
265
+ DZ: "DZD",
266
+ EC: "USD",
267
+ EE: "EUR",
268
+ EG: "EGP",
269
+ EH: "MAD",
270
+ ER: "ERN",
271
+ ES: "EUR",
272
+ ET: "ETB",
273
+ FI: "EUR",
274
+ FJ: "FJD",
275
+ FK: "FKP",
276
+ FM: "USD",
277
+ FO: "DKK",
278
+ FR: "EUR",
279
+ GA: "XAF",
280
+ GB: "GBP",
281
+ GD: "XCD",
282
+ GE: "GEL",
283
+ GF: "EUR",
284
+ GG: "GBP",
285
+ GH: "GHS",
286
+ GI: "GIP",
287
+ GL: "DKK",
288
+ GM: "GMD",
289
+ GN: "GNF",
290
+ GP: "EUR",
291
+ GQ: "XAF",
292
+ GR: "EUR",
293
+ GS: "GBP",
294
+ GT: "GTQ",
295
+ GU: "USD",
296
+ GW: "XOF",
297
+ GY: "GYD",
298
+ HK: "HKD",
299
+ HM: "AUD",
300
+ HN: "HNL",
301
+ HR: "EUR",
302
+ HT: "HTG",
303
+ HU: "HUF",
304
+ ID: "IDR",
305
+ IE: "EUR",
306
+ IL: "ILS",
307
+ IM: "GBP",
308
+ IN: "INR",
309
+ IO: "USD",
310
+ IQ: "IQD",
311
+ IR: "IRR",
312
+ IS: "ISK",
313
+ IT: "EUR",
314
+ JE: "GBP",
315
+ JM: "JMD",
316
+ JO: "JOD",
317
+ JP: "JPY",
318
+ KE: "KES",
319
+ KG: "KGS",
320
+ KH: "KHR",
321
+ KI: "AUD",
322
+ KM: "KMF",
323
+ KN: "XCD",
324
+ KP: "KPW",
325
+ KR: "KRW",
326
+ KW: "KWD",
327
+ KY: "KYD",
328
+ KZ: "KZT",
329
+ LA: "LAK",
330
+ LB: "LBP",
331
+ LC: "XCD",
332
+ LI: "CHF",
333
+ LK: "LKR",
334
+ LR: "LRD",
335
+ LS: "LSL",
336
+ LT: "EUR",
337
+ LU: "EUR",
338
+ LV: "EUR",
339
+ LY: "LYD",
340
+ MA: "MAD",
341
+ MC: "EUR",
342
+ MD: "MDL",
343
+ ME: "EUR",
344
+ MF: "EUR",
345
+ MG: "MGA",
346
+ MH: "USD",
347
+ MK: "MKD",
348
+ ML: "XOF",
349
+ MM: "MMK",
350
+ MN: "MNT",
351
+ MO: "MOP",
352
+ MP: "USD",
353
+ MQ: "EUR",
354
+ MR: "MRU",
355
+ MS: "XCD",
356
+ MT: "EUR",
357
+ MU: "MUR",
358
+ MV: "MVR",
359
+ MW: "MWK",
360
+ MX: "MXN",
361
+ MY: "MYR",
362
+ MZ: "MZN",
363
+ NA: "NAD",
364
+ NC: "XPF",
365
+ NE: "XOF",
366
+ NF: "AUD",
367
+ NG: "NGN",
368
+ NI: "NIO",
369
+ NL: "EUR",
370
+ NO: "NOK",
371
+ NP: "NPR",
372
+ NR: "AUD",
373
+ NU: "NZD",
374
+ NZ: "NZD",
375
+ OM: "OMR",
376
+ PA: "PAB",
377
+ PE: "PEN",
378
+ PF: "XPF",
379
+ PG: "PGK",
380
+ PH: "PHP",
381
+ PK: "PKR",
382
+ PL: "PLN",
383
+ PM: "EUR",
384
+ PN: "NZD",
385
+ PR: "USD",
386
+ PS: "ILS",
387
+ PT: "EUR",
388
+ PW: "USD",
389
+ PY: "PYG",
390
+ QA: "QAR",
391
+ RE: "EUR",
392
+ RO: "RON",
393
+ RS: "RSD",
394
+ RU: "RUB",
395
+ RW: "RWF",
396
+ SA: "SAR",
397
+ SB: "SBD",
398
+ SC: "SCR",
399
+ SD: "SDG",
400
+ SE: "SEK",
401
+ SG: "SGD",
402
+ SH: "SHP",
403
+ SI: "EUR",
404
+ SJ: "NOK",
405
+ SK: "EUR",
406
+ SL: "SLE",
407
+ SM: "EUR",
408
+ SN: "XOF",
409
+ SO: "SOS",
410
+ SR: "SRD",
411
+ SS: "SSP",
412
+ ST: "STN",
413
+ SV: "USD",
414
+ SX: "ANG",
415
+ SY: "SYP",
416
+ SZ: "SZL",
417
+ TC: "USD",
418
+ TD: "XAF",
419
+ TF: "EUR",
420
+ TG: "XOF",
421
+ TH: "THB",
422
+ TJ: "TJS",
423
+ TK: "NZD",
424
+ TL: "USD",
425
+ TM: "TMT",
426
+ TN: "TND",
427
+ TO: "TOP",
428
+ TR: "TRY",
429
+ TT: "TTD",
430
+ TV: "AUD",
431
+ TW: "TWD",
432
+ TZ: "TZS",
433
+ UA: "UAH",
434
+ UG: "UGX",
435
+ US: "USD",
436
+ UY: "UYU",
437
+ UZ: "UZS",
438
+ VA: "EUR",
439
+ VC: "XCD",
440
+ VE: "VES",
441
+ VG: "USD",
442
+ VI: "USD",
443
+ VN: "VND",
444
+ VU: "VUV",
445
+ WF: "XPF",
446
+ WS: "WST",
447
+ YE: "YER",
448
+ YT: "EUR",
449
+ ZA: "ZAR",
450
+ ZM: "ZMW",
451
+ ZW: "ZWL"
452
+ }, _i = (e) => {
453
+ if (e)
454
+ return hi[e];
455
+ }, Sn = ({
456
+ country: e,
457
+ pricingCurrencySettings: o,
458
+ fallbackCurrency: i
459
+ }) => {
460
+ const s = _i(e), n = (o == null ? void 0 : o.pricing_currencies) ?? [];
461
+ return s && n.includes(s) ? s : (o == null ? void 0 : o.default_pricing_currency) ?? i ?? s;
462
+ }, bi = () => {
463
+ const { getInvoicePreview: e } = fo(), o = Se(), i = Y(), s = Y(), n = Y(), c = Y({}), g = Y(Te.Initial), y = Y({}), D = Y(), a = (I) => `${I.type}:${I.value}`;
464
+ let E = 0, T = Promise.resolve(), O = () => {
465
+ }, C = new Promise((I) => O = I);
466
+ const G = (I) => {
467
+ const V = ++E;
468
+ return T = _(I, V), O(), C = new Promise((oe) => O = oe), T;
469
+ }, N = async () => {
470
+ for (; ; ) {
471
+ const I = T;
472
+ if (await Promise.race([
473
+ I.then(
474
+ () => !0,
475
+ (oe) => {
476
+ if (I === T) throw oe;
477
+ return !1;
478
+ }
479
+ ),
480
+ C.then(() => !1)
481
+ ]) && I === T) return;
482
+ }
483
+ }, _ = async ({
484
+ subscription: I,
485
+ subscriptionStartAt: V,
486
+ customer: oe = {},
487
+ seatsValues: X,
488
+ unitsValues: ie,
489
+ enabledPricingIds: se,
490
+ promotionCode: r
491
+ }, L) => {
492
+ var Z, le, W, ne, de, ge;
493
+ const l = fi(oe);
494
+ g.value = Te.Loading;
495
+ const f = $e({
496
+ pricingPlanScheduleInfos: I.pricing_plan_schedule_infos,
497
+ type: "DEFAULT"
498
+ }), m = (Z = f == null ? void 0 : f.pricing_plan_version) == null ? void 0 : Z.pricing_currency_settings, $ = (((le = m == null ? void 0 : m.pricing_currencies) == null ? void 0 : le.length) ?? 0) > 1, h = ((ne = (W = f == null ? void 0 : f.pricing_plan_version) == null ? void 0 : W.billing_period_settings) == null ? void 0 : ne.billing_periods) ?? [], d = h.length > 0 ? h.map(({ period: b }) => b) : I.billing_period ? [I.billing_period] : [], S = Sn({
499
+ country: (de = kn(oe)) == null ? void 0 : de.country,
500
+ pricingCurrencySettings: m,
501
+ fallbackCurrency: I.billing_currency
502
+ });
503
+ if (!d.length) {
504
+ o.warn("INVOICE_PREVIEW_SKIPPED", "No billing period to preview an invoice for", {
505
+ subscriptionId: I.id
506
+ }), g.value = Te.Done;
507
+ return;
508
+ }
509
+ const K = I.billing_period ? a(I.billing_period) : a(d[0]), q = d.map(async (b) => {
510
+ var ee;
511
+ const P = a(b), H = Cn({
512
+ enabledPricings: se == null ? void 0 : se.map((Q) => ({
513
+ pricing_id: Q
514
+ })),
515
+ seatsValues: X,
516
+ unitsValues: ie,
517
+ pricingPlanScheduleInfos: I.pricing_plan_schedule_infos,
518
+ pricingCurrency: $ ? S : void 0,
519
+ // Required by the API whenever the version has billing period settings.
520
+ billingPeriod: h.length > 0 ? b : void 0
521
+ }) ?? [];
522
+ if (r) {
523
+ const Q = (ee = I.pricing_plan_schedule_infos.find(
524
+ ({ pricing_plan_schedule: re }) => re.type === "DEFAULT"
525
+ )) == null ? void 0 : ee.id;
526
+ if (Q) {
527
+ const re = H.find(
528
+ ({ pricing_plan_schedule_id: Ce }) => Ce === Q
529
+ );
530
+ re ? re.promotion_codes = [r] : H.push({
531
+ pricing_plan_schedule_id: Q,
532
+ promotion_codes: [r]
533
+ });
534
+ }
535
+ }
536
+ const R = {
537
+ pricingPlanSubscriptionId: I.id,
538
+ startAt: V,
539
+ customizations: H,
540
+ customer: l
541
+ }, J = y.value[P];
542
+ if (J && yo(R, J))
543
+ return { periodKey: P, payload: R, response: void 0 };
544
+ const ae = await e(R);
545
+ return { periodKey: P, payload: R, response: ae };
546
+ });
547
+ try {
548
+ const b = await Promise.all(q);
549
+ if (L !== E) return T;
550
+ const P = {
551
+ ...c.value
552
+ }, H = { ...y.value }, R = I.pricing_plan_schedule_infos.find(
553
+ ({ pricing_plan_schedule: ae }) => ae.type === "TRIAL"
554
+ ), J = (ge = I.pricing_plan_schedule_infos.find(
555
+ ({ pricing_plan_schedule: ae }) => ae.type === "DEFAULT"
556
+ )) == null ? void 0 : ge.id;
557
+ b.forEach(({ periodKey: ae, payload: ee, response: Q }) => {
558
+ var De;
559
+ if (!Q) return;
560
+ H[ae] = ee, D.value = (De = Q.invoice_infos.at(-1)) == null ? void 0 : De.pricing_plan_schedule_id, R && (s.value = Q.first_invoice, R.start_at && R.end_at && (i.value = mo(
561
+ new Date(R.start_at),
562
+ new Date(R.end_at)
563
+ )));
564
+ const re = Q.invoice_infos.find(
565
+ ({ pricing_plan_schedule_id: ve }) => ve === J
566
+ ), Ce = re == null ? void 0 : re.invoices[0];
567
+ Ce && (P[ae] = Ce);
568
+ }), y.value = H, c.value = P, n.value = P[K], g.value = Te.Done;
569
+ } catch (b) {
570
+ if (o.error(
571
+ "INVOICE_PREVIEW_FAILED",
572
+ "Failed to load the invoice preview",
573
+ { preview: "CHECKOUT" },
574
+ b
575
+ ), L !== E) return T;
576
+ throw g.value = Te.Failed, b;
577
+ }
578
+ };
579
+ return {
580
+ loadInvoicePreview: G,
581
+ invoicePreview: n,
582
+ invoicePreviewByBillingPeriod: c,
583
+ trialInvoicePreview: s,
584
+ trialPeriod: i,
585
+ lastPreviewScheduleId: D,
586
+ isPending: u(() => g.value === Te.Loading),
587
+ isFailed: u(() => g.value === Te.Failed),
588
+ /** Settles as the preview asked for last does, however many take over meanwhile. */
589
+ whenLoaded: N
590
+ };
591
+ };
592
+ function Mi() {
593
+ return {
594
+ /**
595
+ * Get geolocation information from the user
596
+ */
597
+ getGeoLocation() {
598
+ return fetch("https://api.country.is/").then((e) => e.json());
599
+ }
600
+ };
601
+ }
602
+ function Ii({
603
+ initialState: e,
604
+ onRequiredFieldChange: o,
605
+ isShippingAddressRequired: i
606
+ }) {
607
+ const s = u(() => In(i) ?? !1), n = Y(st(e)), c = Y(st(e));
608
+ s.value && !n.value.shippingCountry && (n.value.shippingCountry = n.value.country, c.value.shippingCountry = n.value.country);
609
+ const g = (L) => {
610
+ const l = st({ ...Gn(n.value), ...L });
611
+ n.value = l, c.value = structuredClone(l);
612
+ }, { formatOf: y } = Mo({
613
+ isNeeded: () => s.value,
614
+ countries: [() => n.value.shippingCountry, () => n.value.country]
615
+ }), D = u(() => y(n.value.shippingCountry)), a = u(
616
+ () => s.value && !n.value.billingAddressSameAsShipping
617
+ ), E = u(
618
+ () => a.value ? y(n.value.country) : void 0
619
+ ), T = u(() => {
620
+ const L = n.value.type === "ORGANIZATION" ? [] : ["shippingLastName"];
621
+ return [
622
+ ...no(n.value.country),
623
+ ...s.value ? [
624
+ ...tn(
625
+ "SHIPPING",
626
+ n.value.shippingCountry,
627
+ D.value
628
+ ),
629
+ "shippingPhoneNumber",
630
+ ...L
631
+ ] : [],
632
+ ...a.value ? tn(
633
+ "BILLING",
634
+ n.value.country,
635
+ E.value
636
+ ) : []
637
+ ];
638
+ }), O = (L) => T.value.includes(L), C = ro(
639
+ u(() => ({
640
+ ...ln("BILLING", () => E.value, O),
641
+ ...ln("SHIPPING", () => D.value, O),
642
+ email: { required: sn, email: Pt },
643
+ country: { required: sn },
644
+ companyLegalName: {
645
+ required: uo(() => n.value.type === "ORGANIZATION")
646
+ },
647
+ companyVatNumber: It(n.value) ? { taxId: At } : {},
648
+ ...Io(O)
649
+ })),
650
+ n
651
+ ), G = Mi(), N = async () => {
652
+ try {
653
+ const { country: L } = await G.getGeoLocation();
654
+ if (typeof L != "string" || !Ge(L))
655
+ return;
656
+ n.value.country || (n.value.country = L), s.value && !n.value.shippingCountry && (n.value.shippingCountry = L);
657
+ } catch {
658
+ }
659
+ }, _ = [
660
+ "type",
661
+ "companyVatNumber",
662
+ "seatsValues",
663
+ "unitsValues",
664
+ "enabledPricingIds"
665
+ ], I = (L) => _.includes(L) || (s.value ? nn("SHIPPING", n.value.shippingCountry) : nn("BILLING", n.value.country)).includes(L), V = () => JSON.parse(JSON.stringify(n.value));
666
+ let oe = V();
667
+ const X = (L) => Object.keys(lo({ from: oe, to: L })).filter(Ai).some(I);
668
+ he(
669
+ () => [
670
+ s.value,
671
+ n.value.billingAddressSameAsShipping,
672
+ n.value.shippingAddressLine1,
673
+ n.value.shippingAddressLine2,
674
+ n.value.shippingPostalCode,
675
+ n.value.shippingCity,
676
+ n.value.shippingState,
677
+ n.value.shippingCountry,
678
+ D.value
679
+ ],
680
+ () => {
681
+ !s.value || !n.value.billingAddressSameAsShipping || Object.assign(
682
+ n.value,
683
+ oo(n.value, D.value)
684
+ );
685
+ },
686
+ { immediate: !0 }
687
+ );
688
+ const ie = Y(!1), se = (L) => {
689
+ const l = X(L);
690
+ oe = L, ie.value = !1, l && o(L);
691
+ };
692
+ he(
693
+ V,
694
+ (L) => {
695
+ ie.value = X(L);
696
+ },
697
+ { flush: "sync" }
698
+ );
699
+ const r = () => {
700
+ ie.value && se(V());
701
+ };
702
+ return qe(() => {
703
+ e != null && e.country || N();
704
+ }), Po(V, se, { debounce: 200 }), {
705
+ form: n,
706
+ validation: C,
707
+ getIsFieldRequired: O,
708
+ shippingAddressFormat: D,
709
+ updateInitialState: g,
710
+ initialState: c,
711
+ isPreviewStale: ie,
712
+ flushPreviewChange: r
713
+ };
714
+ }
715
+ function Ai(e) {
716
+ return e in st();
717
+ }
718
+ function Pi(e, o = void 0) {
719
+ const i = o ?? [], s = Ct(e);
720
+ for (const n of s)
721
+ if (["EXACTLY_ONE", "AT_LEAST_ONE"].includes(n.selection_constraint)) {
722
+ const c = n.pricings.map((g) => g.id);
723
+ if (o != null && o.some((g) => c.includes(g)))
724
+ continue;
725
+ i.push(n.pricings[0].id);
726
+ }
727
+ return i;
728
+ }
729
+ function Ci(e) {
730
+ return Ct(e).some(
731
+ (i) => i.selection_constraint === "EXACTLY_ONE" || i.selection_constraint === "AT_LEAST_ONE"
732
+ );
733
+ }
734
+ function Ni(e) {
735
+ const o = Do(e.pricing_plan_schedule_infos), i = Ct(e);
736
+ return o.some((s) => s.product_type === "ADDON") || i.some((s) => s.object_type === "ADDON");
737
+ }
738
+ const Di = "solvimon_checkout_redirect_state", Ei = "solvimon_checkout_redirect_state:", Li = 3600 * 1e3;
739
+ function ki(e) {
740
+ return typeof e == "object" && e !== null && "savedAt" in e && typeof e.savedAt == "number" && "form" in e;
741
+ }
742
+ function Si(e, o) {
743
+ if (!e || !o) return;
744
+ const i = new Map(
745
+ e.map(({ pricing_item_config_id: n, number: c }) => [n, c])
746
+ ), s = new Set(
747
+ o.map(({ pricing_item_config_id: n }) => n)
748
+ );
749
+ if (![...i.keys()].some((n) => !s.has(n)))
750
+ return o.map((n) => {
751
+ const c = Number(i.get(n.pricing_item_config_id)), g = Number(n.number);
752
+ return c > g ? { ...n, number: String(c) } : n;
753
+ });
754
+ }
755
+ function _n(e, o, i) {
756
+ const s = ({ pricing_item_config_id: g }) => i.has(g), n = (e == null ? void 0 : e.filter(s)) ?? [], c = Si(
757
+ e == null ? void 0 : e.filter((g) => !s(g)),
758
+ o
759
+ );
760
+ return n.length ? [...c ?? o ?? [], ...n] : c;
761
+ }
762
+ const wi = 1e4;
763
+ function Ti({
764
+ initialCountry: e,
765
+ initialEmail: o,
766
+ subscriptionId: i,
767
+ enabledPricingIds: s,
768
+ isShippingAddressRequired: n
769
+ }) {
770
+ const c = Se(), g = (() => {
771
+ if (e) {
772
+ if (Ge(e)) return e;
773
+ c.error("INVALID_COUNTRY_CODE", `invalid country code provided: "${e}"`);
774
+ }
775
+ })(), y = (() => {
776
+ if (o) {
777
+ if (Pt.$validator(o, {}, {}) === !0) return o;
778
+ c.error("INVALID_EMAIL", "invalid email provided");
779
+ }
780
+ })(), D = Y(!1), a = Y(), E = Yn({}), T = u(
781
+ () => a.value ? Lo(
782
+ ko(a.value, [
783
+ ...E.value.seatsValues ?? [],
784
+ ...E.value.unitsValues ?? []
785
+ ])
786
+ ) : /* @__PURE__ */ new Set()
787
+ ), { getSubscription: O } = po(), C = bi(), G = u(() => a.value && l.form.value.country && d.value), {
788
+ paymentMethodOptions: N,
789
+ get: _,
790
+ isPending: I,
791
+ error: V
792
+ } = No(), oe = async (b, P) => {
793
+ try {
794
+ await _({
795
+ subscriptionId: a.value.id,
796
+ country: b,
797
+ amount: P
798
+ });
799
+ } catch (H) {
800
+ c.error(
801
+ "PAYMENT_METHOD_OPTIONS_LOAD_FAILED",
802
+ "Failed to load the payment methods that can be offered",
803
+ { flow: "CHECKOUT" },
804
+ H
805
+ );
806
+ }
807
+ }, X = u(() => V.value !== null), ie = () => {
808
+ const { country: b } = l.form.value;
809
+ !a.value || !b || !d.value || oe(b, d.value);
810
+ }, se = () => ({
811
+ isShipped: !!n,
812
+ format: l.shippingAddressFormat.value
813
+ }), r = () => {
814
+ const b = l.form.value;
815
+ return C.loadInvoicePreview({
816
+ subscription: a.value,
817
+ customer: on(b, se()),
818
+ seatsValues: b.seatsValues,
819
+ unitsValues: b.unitsValues,
820
+ enabledPricingIds: b.enabledPricingIds ?? s,
821
+ promotionCode: b.promotionCode
822
+ });
823
+ }, L = async (b) => {
824
+ const P = b.promotionCode ?? l.form.value.promotionCode, H = b.enabledPricingIds ?? l.form.value.enabledPricingIds, R = { ...l.form.value, ...b };
825
+ return await C.loadInvoicePreview({
826
+ subscription: a.value,
827
+ customer: on(R, se()),
828
+ seatsValues: R.seatsValues,
829
+ unitsValues: R.unitsValues,
830
+ enabledPricingIds: H,
831
+ promotionCode: P
832
+ }), {
833
+ trialInvoicePreview: C.trialInvoicePreview.value,
834
+ invoicePreview: C.invoicePreview.value
835
+ };
836
+ }, l = Ii({
837
+ isShippingAddressRequired: n,
838
+ initialState: {
839
+ country: g,
840
+ email: y
841
+ },
842
+ onRequiredFieldChange: () => {
843
+ a.value && r().catch(() => {
844
+ });
845
+ }
846
+ }), f = async () => {
847
+ var ae, ee, Q, re;
848
+ const b = await O({
849
+ id: i,
850
+ expanded: !0
851
+ }), P = $e({
852
+ pricingPlanScheduleInfos: b.pricing_plan_schedule_infos,
853
+ type: "DEFAULT"
854
+ }), H = (re = (Q = (ee = (ae = P == null ? void 0 : P.pricing_plan_version) == null ? void 0 : ae.billing_period_settings) == null ? void 0 : ee.billing_periods) == null ? void 0 : Q[0]) == null ? void 0 : re.period;
855
+ a.value = {
856
+ ...b,
857
+ billing_period: H ?? b.billing_period
858
+ };
859
+ const R = un("seats", P), J = un("units", P);
860
+ E.value = { seatsValues: R, unitsValues: J }, l.updateInitialState({
861
+ ...l.form.value,
862
+ enabledPricingIds: Pi(b, s),
863
+ ...R ? { seatsValues: R } : {},
864
+ ...J ? { unitsValues: J } : {}
865
+ });
866
+ };
867
+ let m;
868
+ const $ = () => m ?? (m = Ao()), h = u(() => {
869
+ var De, ve, Xe, Re, Ye, We, fe, ze, Ke, Je;
870
+ const b = l.form.value.firstName || l.form.value.infix || l.form.value.lastName ? {
871
+ ...l.form.value.firstName ? { first_name: l.form.value.firstName } : {},
872
+ ...l.form.value.infix ? { infix: l.form.value.infix } : {},
873
+ ...l.form.value.lastName ? { last_name: l.form.value.lastName } : {}
874
+ } : {}, P = {
875
+ ...l.form.value.addressLine1 && {
876
+ line1: l.form.value.addressLine1
877
+ },
878
+ ...l.form.value.addressLine2 && {
879
+ line2: l.form.value.addressLine2
880
+ },
881
+ ...l.form.value.city && { city: l.form.value.city },
882
+ ...l.form.value.postalCode && {
883
+ postal_code: l.form.value.postalCode
884
+ },
885
+ ...l.form.value.state && { state: l.form.value.state },
886
+ country: l.form.value.country ?? ""
887
+ }, H = n ? io(l.form.value, "BILLING") : P, R = $e({
888
+ pricingPlanScheduleInfos: ((De = a.value) == null ? void 0 : De.pricing_plan_schedule_infos) ?? [],
889
+ type: "DEFAULT"
890
+ }), J = (ve = R == null ? void 0 : R.pricing_plan_version) == null ? void 0 : ve.pricing_currency_settings, ae = (((Xe = J == null ? void 0 : J.pricing_currencies) == null ? void 0 : Xe.length) ?? 0) > 1, ee = !!((We = (Ye = (Re = R == null ? void 0 : R.pricing_plan_version) == null ? void 0 : Re.billing_period_settings) == null ? void 0 : Ye.billing_periods) != null && We.length), Q = Cn({
891
+ enabledPricings: (fe = l.form.value.enabledPricingIds) == null ? void 0 : fe.map((Ne) => ({
892
+ pricing_id: Ne
893
+ })),
894
+ seatsValues: l.form.value.seatsValues,
895
+ unitsValues: l.form.value.unitsValues,
896
+ pricingPlanScheduleInfos: ((ze = a.value) == null ? void 0 : ze.pricing_plan_schedule_infos) ?? [],
897
+ pricingCurrency: ae ? (Ke = a.value) == null ? void 0 : Ke.billing_currency : void 0,
898
+ billingPeriod: ee ? (Je = a.value) == null ? void 0 : Je.billing_period : void 0
899
+ }), re = l.form.value.promotionCode, Ce = re && a.value ? (() => {
900
+ var et, Me, Ue;
901
+ const Ne = Q ? [...Q] : [], He = ((et = Ne[0]) == null ? void 0 : et.pricing_plan_schedule_id) ?? ((Ue = $e({
902
+ pricingPlanScheduleInfos: ((Me = a.value) == null ? void 0 : Me.pricing_plan_schedule_infos) ?? [],
903
+ type: "DEFAULT"
904
+ })) == null ? void 0 : Ue.id);
905
+ if (!He)
906
+ return Q;
907
+ const je = Ne.find(
908
+ ({ pricing_plan_schedule_id: me }) => me === He
909
+ );
910
+ if (je)
911
+ je.promotion_codes = [re];
912
+ else {
913
+ const me = Q == null ? void 0 : Q[0];
914
+ Ne.push({
915
+ pricing_plan_schedule_id: He,
916
+ ...(me == null ? void 0 : me.enabled_pricings) && {
917
+ enabled_pricings: me.enabled_pricings
918
+ },
919
+ ...(me == null ? void 0 : me.seats_values) && {
920
+ seats_values: me.seats_values
921
+ },
922
+ ...(me == null ? void 0 : me.units) && {
923
+ units: me.units
924
+ },
925
+ promotion_codes: [re]
926
+ });
927
+ }
928
+ return Ne;
929
+ })() : Q;
930
+ return {
931
+ type: "INIT_PRICING_PLAN_SUBSCRIPTION",
932
+ init_pricing_plan_subscription: {
933
+ template_pricing_plan_subscription_id: i,
934
+ ...Ce && {
935
+ pricing_plan_schedule_customizations: Ce
936
+ },
937
+ ...n && {
938
+ shipping_address_details: Pn(
939
+ l.form.value,
940
+ $(),
941
+ l.shippingAddressFormat.value
942
+ )
943
+ },
944
+ customer_details: {
945
+ email: l.form.value.email ?? "",
946
+ type: l.form.value.type,
947
+ ...l.form.value.type === "INDIVIDUAL" ? {
948
+ individual: {
949
+ residential_address: H,
950
+ ...b ? { name: b } : {}
951
+ }
952
+ } : {
953
+ organization: {
954
+ registered_address: H,
955
+ legal_name: l.form.value.companyLegalName ?? "",
956
+ ...l.form.value.companyVatNumber && It(l.form.value) && At.$validator(l.form.value.companyVatNumber, {}, {}) ? {
957
+ tax_ids: [
958
+ {
959
+ id: l.form.value.companyVatNumber,
960
+ type: ao
961
+ }
962
+ ]
963
+ } : {}
964
+ }
965
+ }
966
+ }
967
+ }
968
+ };
969
+ }), d = u(() => {
970
+ var b, P;
971
+ return ((b = C.trialInvoicePreview.value) == null ? void 0 : b.invoice_amount_including_tax) ?? ((P = C.invoicePreview.value) == null ? void 0 : P.invoice_amount_including_tax);
972
+ }), S = u(
973
+ () => C.invoicePreview.value ? wo(C.invoicePreview.value) : void 0
974
+ ), K = u(() => {
975
+ var b;
976
+ return ((b = S.value) == null ? void 0 : b.hasOneOff) ?? !1;
977
+ }), q = u(() => {
978
+ var P;
979
+ const b = S.value;
980
+ if (b)
981
+ return b.hasOneOff ? b.hasUnattributed ? void 0 : b.recurring.includingTax : (P = C.invoicePreview.value) == null ? void 0 : P.invoice_amount_including_tax;
982
+ });
983
+ he(
984
+ [() => l.form.value.country, d],
985
+ ([b, P]) => {
986
+ !a.value || !b || !P || oe(b, P);
987
+ }
988
+ );
989
+ const Z = `${Ei}${i}`, le = zo();
990
+ function W() {
991
+ const b = { savedAt: Date.now(), form: l.form.value };
992
+ try {
993
+ sessionStorage.setItem(Z, JSON.stringify(b));
994
+ } catch (P) {
995
+ c.warn(
996
+ "CHECKOUT_FORM_STATE_NOT_SAVED",
997
+ "Could not keep the checkout form for a redirect return",
998
+ {},
999
+ P
1000
+ );
1001
+ }
1002
+ }
1003
+ function ne() {
1004
+ try {
1005
+ sessionStorage.removeItem(Z), sessionStorage.removeItem(Di);
1006
+ } catch {
1007
+ }
1008
+ }
1009
+ function de() {
1010
+ let b = null;
1011
+ try {
1012
+ b = sessionStorage.getItem(Z);
1013
+ } catch {
1014
+ return;
1015
+ }
1016
+ if (ne(), !b || !le) return;
1017
+ let P;
1018
+ try {
1019
+ P = JSON.parse(b);
1020
+ } catch {
1021
+ return;
1022
+ }
1023
+ if (!ki(P)) return;
1024
+ const H = Date.now() - P.savedAt;
1025
+ if (H < 0 || H > Li) return;
1026
+ const R = mi(P.form);
1027
+ return y && delete R.email, Object.keys(R).length ? R : void 0;
1028
+ }
1029
+ qe(async () => {
1030
+ const b = de();
1031
+ b && l.updateInitialState(b);
1032
+ try {
1033
+ await f();
1034
+ } catch (P) {
1035
+ c.error(
1036
+ "SUBSCRIPTION_LOAD_FAILED",
1037
+ "Failed to load the subscription the checkout prices",
1038
+ {},
1039
+ P
1040
+ );
1041
+ return;
1042
+ }
1043
+ try {
1044
+ await r();
1045
+ } catch {
1046
+ }
1047
+ if (b) {
1048
+ const { seatsValues: P, unitsValues: H, ...R } = b, { seatsValues: J, unitsValues: ae } = E.value, ee = T.value, Q = _n(P, J, ee), re = _n(H, ae, ee);
1049
+ l.updateInitialState({
1050
+ ...R,
1051
+ ...Q ? { seatsValues: Q } : {},
1052
+ ...re ? { unitsValues: re } : {}
1053
+ });
1054
+ }
1055
+ });
1056
+ const ge = async () => {
1057
+ if (!a.value) return "FAILED";
1058
+ l.flushPreviewChange(), C.isFailed.value && r().catch(() => {
1059
+ });
1060
+ let b;
1061
+ const P = new Promise((H) => {
1062
+ b = setTimeout(() => H(!1), wi);
1063
+ });
1064
+ try {
1065
+ if (!await Promise.race([
1066
+ C.whenLoaded().then(() => !0),
1067
+ P
1068
+ ])) return "FAILED";
1069
+ } catch {
1070
+ return "FAILED";
1071
+ } finally {
1072
+ clearTimeout(b);
1073
+ }
1074
+ return await Ve(), l.isPreviewStale.value || C.isPending.value ? "CHANGED" : "SETTLED";
1075
+ };
1076
+ return he(
1077
+ G,
1078
+ (b) => {
1079
+ b && ie();
1080
+ },
1081
+ { once: !0 }
1082
+ ), {
1083
+ /** What the host configured, once anything unusable has been dropped and reported. */
1084
+ validatedEmail: y,
1085
+ validatedCountry: g,
1086
+ invoicePreview: C.invoicePreview,
1087
+ invoicePreviewByBillingPeriod: C.invoicePreviewByBillingPeriod,
1088
+ trialInvoicePreview: C.trialInvoicePreview,
1089
+ trialPeriod: C.trialPeriod,
1090
+ loadInvoicePreview: r,
1091
+ updateInvoicePreviewOnBillingInformationChange: L,
1092
+ lastPreviewScheduleId: C.lastPreviewScheduleId,
1093
+ paymentMethodOptions: N,
1094
+ hasPaymentMethodOptionsError: X,
1095
+ retryPaymentMethodOptions: ie,
1096
+ isPaymentMethodsPending: I,
1097
+ isInvoicePreviewPending: C.isPending,
1098
+ isInvoicePreviewStale: l.isPreviewStale,
1099
+ settleInvoicePreview: ge,
1100
+ subscription: a,
1101
+ orderMeterValues: E,
1102
+ quantityAddonConfigIds: T,
1103
+ checkoutForm: l,
1104
+ authorizationContext: h,
1105
+ isPaid: D,
1106
+ amount: d,
1107
+ recurringAmount: q,
1108
+ hasOneOffCharges: K,
1109
+ saveFormStateForRedirect: W,
1110
+ clearSavedFormState: ne
1111
+ };
1112
+ }
1113
+ function Oi({
1114
+ checkoutForm: e,
1115
+ updateInvoicePreviewOnBillingInformationChange: o,
1116
+ formatErrorMessage: i,
1117
+ onInvalidPromotionCode: s,
1118
+ onApplyError: n
1119
+ }) {
1120
+ const c = Se(), g = Y(!1), y = Y(null), D = (O, C) => {
1121
+ y.value = i ? i({ action: O, error: C }) : O === "apply" ? "Promotion code could not be applied. Please try again." : "Promotion code could not be removed. Please try again.";
1122
+ };
1123
+ let a = 0;
1124
+ const E = async (O) => {
1125
+ const C = O == null ? void 0 : O.trim();
1126
+ if (!C)
1127
+ return;
1128
+ const G = ++a;
1129
+ y.value = null, e.form.value.promotionCode = C, g.value = !0;
1130
+ try {
1131
+ await o({
1132
+ promotionCode: C
1133
+ });
1134
+ } catch (N) {
1135
+ if (G !== a) return;
1136
+ const _ = Xn(N);
1137
+ _ ? c.warn(
1138
+ "PROMOTION_CODE_REJECTED",
1139
+ "The promotion code was not accepted",
1140
+ {},
1141
+ N
1142
+ ) : c.capture(N, {
1143
+ code: "PROMOTION_CODE_APPLY_FAILED",
1144
+ message: "Failed to apply promotion code"
1145
+ }), D("apply", N), n == null || n(), _ && (s == null || s()), g.value = !1, T({ suppressError: !0, preserveErrorMessage: !0 });
1146
+ return;
1147
+ }
1148
+ G === a && (g.value = !1);
1149
+ }, T = async ({
1150
+ suppressError: O = !1,
1151
+ preserveErrorMessage: C = !1
1152
+ } = {}) => {
1153
+ const G = ++a;
1154
+ C || (y.value = null), delete e.form.value.promotionCode, g.value = !0;
1155
+ try {
1156
+ await o({});
1157
+ } catch (N) {
1158
+ if (G !== a) return;
1159
+ c.capture(N, {
1160
+ code: "PROMOTION_CODE_REMOVE_FAILED",
1161
+ message: "Failed to remove promotion code"
1162
+ }), O || D("remove", N);
1163
+ }
1164
+ G === a && (g.value = !1);
1165
+ };
1166
+ return {
1167
+ applyPromotionCode: E,
1168
+ removePromotionCode: T,
1169
+ isPromotionCodePending: g,
1170
+ promotionCodeErrorMessage: y
1171
+ };
1172
+ }
1173
+ function xi({
1174
+ subscription: e,
1175
+ promotionCode: o,
1176
+ appliedPromotionCode: i,
1177
+ applyPromotionCode: s
1178
+ }) {
1179
+ he(
1180
+ e,
1181
+ (n) => {
1182
+ const c = In(o);
1183
+ n && c && (i.value = c, s(c));
1184
+ },
1185
+ { once: !0 }
1186
+ );
1187
+ }
1188
+ const Ri = { class: "flex items-center gap-2" }, zi = /* @__PURE__ */ pe({
1189
+ __name: "TaxIDCheckNotice",
1190
+ props: {
1191
+ status: { type: String }
1192
+ },
1193
+ setup(e) {
1194
+ const o = e, { formatMessage: i } = Pe(), s = u(() => {
1195
+ switch (o.status) {
1196
+ case "VALID":
1197
+ return "success";
1198
+ case "NOT_VALID":
1199
+ return "danger";
1200
+ default:
1201
+ return "neutral";
1202
+ }
1203
+ }), n = u(() => {
1204
+ switch (o.status) {
1205
+ case "VALID":
1206
+ return i({
1207
+ defaultMessage: "VAT number is valid.",
1208
+ id: "tax_check.valid_vat_number",
1209
+ description: "The message shown when the VAT number is valid"
1210
+ });
1211
+ case "NOT_VALID":
1212
+ return i({
1213
+ defaultMessage: "VAT number is invalid.",
1214
+ id: "tax_check.invalid_vat_number",
1215
+ description: "The message shown when the VAT number is invalid"
1216
+ });
1217
+ default:
1218
+ return i({
1219
+ defaultMessage: "The VAT number could not be checked right now.",
1220
+ id: "tax_check.unknown_vat_number",
1221
+ description: "The message shown when the VAT number check could not give an answer, for instance because the EU VAT service is unavailable"
1222
+ });
1223
+ }
1224
+ });
1225
+ return (c, g) => (p(), w(t(Ho), {
1226
+ type: s.value,
1227
+ icon: !1
1228
+ }, {
1229
+ default: M(() => [
1230
+ k("div", Ri, [
1231
+ A(t(ce), { variant: "body-xs" }, {
1232
+ default: M(() => [
1233
+ F(j(n.value), 1)
1234
+ ]),
1235
+ _: 1
1236
+ })
1237
+ ])
1238
+ ]),
1239
+ _: 1
1240
+ }, 8, ["type"]));
1241
+ }
1242
+ }), ji = { class: "flex grow flex-col" }, Ui = /* @__PURE__ */ pe({
1243
+ __name: "CompanyPurchaseToggle",
1244
+ props: /* @__PURE__ */ ht({
1245
+ noSpacing: { type: Boolean }
1246
+ }, {
1247
+ modelValue: { type: Boolean, required: !0 },
1248
+ modelModifiers: {}
1249
+ }),
1250
+ emits: ["update:modelValue"],
1251
+ setup(e) {
1252
+ const o = An(e, "modelValue"), { $t: i } = Pe();
1253
+ return (s, n) => (p(), w(t(Nn), {
1254
+ modelValue: o.value,
1255
+ "onUpdate:modelValue": n[0] || (n[0] = (c) => o.value = c),
1256
+ "no-spacing": e.noSpacing,
1257
+ size: "sm",
1258
+ "label-position": "before"
1259
+ }, {
1260
+ "inline-label": M(() => [
1261
+ k("div", ji, [
1262
+ A(t(ce), { tag: "span" }, {
1263
+ default: M(() => [
1264
+ F(j(t(i)({
1265
+ defaultMessage: "Company purchase",
1266
+ id: "checkout.company_purchase_toggle.title",
1267
+ description: "The title of the company purchase toggle in the checkout"
1268
+ })), 1)
1269
+ ]),
1270
+ _: 1
1271
+ }),
1272
+ A(t(ce), {
1273
+ tag: "span",
1274
+ variant: "body-xs",
1275
+ color: "subtle"
1276
+ }, {
1277
+ default: M(() => [
1278
+ F(j(t(i)({
1279
+ defaultMessage: "I am purchasing on behalf of a company",
1280
+ id: "checkout.company_purchase_toggle.sub_title",
1281
+ description: "The subtitle of the company purchase toggle in the checkout"
1282
+ })), 1)
1283
+ ]),
1284
+ _: 1
1285
+ })
1286
+ ])
1287
+ ]),
1288
+ _: 1
1289
+ }, 8, ["modelValue", "no-spacing"]));
1290
+ }
1291
+ });
1292
+ function Bi(e) {
1293
+ const { checkTaxID: o } = Qo(), {
1294
+ data: i,
1295
+ error: s,
1296
+ execute: n,
1297
+ settle: c,
1298
+ isPending: g
1299
+ } = vo({ service: o, isCollection: !0 }), y = u(() => {
1300
+ var _;
1301
+ return (_ = i.value) == null ? void 0 : _[0];
1302
+ }), D = u(
1303
+ () => {
1304
+ var _;
1305
+ return s.value ? "UNKNOWN" : (_ = y.value) == null ? void 0 : _.valid;
1306
+ }
1307
+ ), a = u(() => {
1308
+ var _;
1309
+ return ((_ = e.value.companyVatNumber) == null ? void 0 : _.trim()) ?? "";
1310
+ }), E = u(() => e.value.companyLegalName ?? ""), T = u(() => e.value.country);
1311
+ he([a, E, T], () => c([]));
1312
+ const O = u(() => En(T.value ?? "")), C = u(
1313
+ () => !!(a.value && E.value && T.value)
1314
+ ), G = u(() => O.value && a.value);
1315
+ async function N() {
1316
+ if (!(!C.value || !O.value || !T.value))
1317
+ try {
1318
+ await n({
1319
+ type: "ORGANIZATION",
1320
+ organization: {
1321
+ legal_name: E.value,
1322
+ tax_ids: [{ id: a.value, type: "GENERIC_TAX_ID" }],
1323
+ registered_address: {
1324
+ country: T.value
1325
+ }
1326
+ }
1327
+ });
1328
+ } catch {
1329
+ }
1330
+ }
1331
+ return {
1332
+ runTaxIDCheck: N,
1333
+ taxIdValidationData: y,
1334
+ taxIdCheckStatus: D,
1335
+ isTaxIDCheckPending: g,
1336
+ isTaxIDCheckEnabled: C,
1337
+ showViesCheckNotice: G,
1338
+ isSelectedCountryEU: O
1339
+ };
1340
+ }
1341
+ const Fi = { class: "grid grid-cols-1 gap-4" }, Vi = {
1342
+ key: 0,
1343
+ class: "grid grid-cols-1 gap-2"
1344
+ }, $i = {
1345
+ key: 1,
1346
+ class: "flex flex-col gap-2"
1347
+ }, Gi = { key: 0 }, Yi = { class: "mt-2 flex flex-col gap-2" }, Ki = { class: "grid grid-cols-3 gap-2" }, Hi = {
1348
+ key: 3,
1349
+ class: "mt-2"
1350
+ }, Qi = { class: "flex flex-col gap-2" }, Zi = { class: "mt-2" }, qi = { key: 0 }, Xi = { class: "mt-2 flex flex-col gap-2" }, Wi = "checkout-form", Ji = /* @__PURE__ */ pe({
1351
+ __name: "CheckoutForm",
1352
+ props: /* @__PURE__ */ ht({
1353
+ validation: { type: null },
1354
+ initialState: { type: Object },
1355
+ readOnlyEmail: { type: String },
1356
+ showCustomerInfoOnTop: { type: Boolean },
1357
+ isBillingInformationMandatory: { type: Boolean },
1358
+ isShippingAddressRequired: { type: Boolean },
1359
+ getIsFieldRequired: { type: Function },
1360
+ shippingAddressFormat: { type: Object },
1361
+ readOnly: { type: Boolean }
1362
+ }, {
1363
+ modelValue: { required: !0 },
1364
+ modelModifiers: {}
1365
+ }),
1366
+ emits: /* @__PURE__ */ ht(["submit"], ["update:modelValue"]),
1367
+ setup(e) {
1368
+ const o = (l) => Ge(l), i = e, s = Y(!1), n = An(e, "modelValue"), c = u({
1369
+ get: () => n.value.type === "ORGANIZATION",
1370
+ set: (l) => {
1371
+ n.value.type = l ? "ORGANIZATION" : "INDIVIDUAL";
1372
+ }
1373
+ }), g = u(() => n.value.type === "ORGANIZATION"), y = Kn({
1374
+ email: Ee(n, "email", _e),
1375
+ addressLine1: Ee(n, "addressLine1", _e),
1376
+ addressLine2: Ee(n, "addressLine2", _e),
1377
+ postalCode: Ee(n, "postalCode", _e),
1378
+ city: Ee(n, "city", _e),
1379
+ state: Ee(n, "state", _e),
1380
+ companyLegalName: Ee(n, "companyLegalName", _e),
1381
+ companyVatNumber: Ee(n, "companyVatNumber", _e)
1382
+ }), D = u({
1383
+ get: () => n.value.country,
1384
+ set: (l) => {
1385
+ const f = _e(l);
1386
+ n.value.country = f !== void 0 && o(f) ? f : void 0;
1387
+ }
1388
+ }), a = u({
1389
+ get: () => n.value.shippingCountry,
1390
+ set: (l) => {
1391
+ const f = _e(l);
1392
+ n.value.shippingCountry = f !== void 0 && o(f) ? f : void 0;
1393
+ }
1394
+ }), E = u(() => It(n.value)), { isTaxIDCheckEnabled: T, isTaxIDCheckPending: O, taxIdCheckStatus: C, runTaxIDCheck: G } = Bi(n), { $t: N } = Pe(), _ = so(), I = (l) => i.getIsFieldRequired(l) ? "" : " " + N({
1395
+ defaultMessage: "(optional)",
1396
+ id: "checkout.optional_suffix.label",
1397
+ description: "The suffix for optional fields in the checkout form"
1398
+ }), V = u(
1399
+ () => n.value.country ? mn(n.value.country) : void 0
1400
+ ), oe = u(() => {
1401
+ var $, h;
1402
+ const { recipient: l, address: f } = Pn(
1403
+ n.value,
1404
+ "",
1405
+ i.shippingAddressFormat
1406
+ ), m = ($ = l.individual) == null ? void 0 : $.name;
1407
+ return [
1408
+ ((h = l.organization) == null ? void 0 : h.attention_name) ?? [m == null ? void 0 : m.first_name, m == null ? void 0 : m.last_name].filter(Boolean).join(" "),
1409
+ f.line1,
1410
+ f.line2,
1411
+ [f.postal_code, f.city].filter(Boolean).join(" "),
1412
+ f.state,
1413
+ f.country && mn(f.country)
1414
+ ].filter((d) => !!d);
1415
+ }), X = u({
1416
+ get: () => n.value.billingAddressSameAsShipping,
1417
+ set: (l) => {
1418
+ n.value.billingAddressSameAsShipping = l;
1419
+ }
1420
+ }), ie = u(
1421
+ () => i.isShippingAddressRequired ? N({
1422
+ defaultMessage: "Shipping information",
1423
+ id: "checkout.shipping_information_block.title",
1424
+ description: "The title of the shipping information block in the checkout form"
1425
+ }) : _.contactInformationTitle
1426
+ ), se = u(
1427
+ () => N({
1428
+ defaultMessage: "Shipping address",
1429
+ id: "checkout.shipping_address.title",
1430
+ description: "Label above the address an order is shipped to in the checkout form"
1431
+ })
1432
+ ), r = u(
1433
+ () => N({
1434
+ defaultMessage: "Shipping country",
1435
+ id: "checkout.shipping_country.label",
1436
+ description: "Label of the country an order is shipped to in the checkout form"
1437
+ })
1438
+ ), L = u(
1439
+ () => N({
1440
+ defaultMessage: "Shipping country",
1441
+ id: "checkout.shipping_country.placeholder",
1442
+ description: "Placeholder of the shipping country select while no country is chosen"
1443
+ })
1444
+ );
1445
+ return (l, f) => (p(), x("form", {
1446
+ id: Wi,
1447
+ onSubmit: f[16] || (f[16] = lt((m) => l.$emit("submit", n.value), ["prevent"]))
1448
+ }, [
1449
+ k("div", Fi, [
1450
+ A(t(Ae), { title: ie.value }, {
1451
+ default: M(() => [
1452
+ e.readOnly ? (p(), x("div", Vi, [
1453
+ A(t(ce), {
1454
+ variant: "body",
1455
+ tag: "span",
1456
+ weight: "semibold",
1457
+ "no-spacing": ""
1458
+ }, {
1459
+ default: M(() => [
1460
+ F(j(n.value.email), 1)
1461
+ ]),
1462
+ _: 1
1463
+ }),
1464
+ e.isShippingAddressRequired ? (p(!0), x(ye, { key: 0 }, rt(oe.value, (m, $) => (p(), w(t(ce), {
1465
+ key: $,
1466
+ variant: "body-sm",
1467
+ tag: "span",
1468
+ color: "subtle",
1469
+ "no-spacing": "",
1470
+ class: "sv-checkout__shipping-address-summary"
1471
+ }, {
1472
+ default: M(() => [
1473
+ F(j(m), 1)
1474
+ ]),
1475
+ _: 2
1476
+ }, 1024))), 128)) : (p(), w(t(ce), {
1477
+ key: 1,
1478
+ variant: "body-sm",
1479
+ tag: "span",
1480
+ color: "subtle",
1481
+ "no-spacing": ""
1482
+ }, {
1483
+ default: M(() => [
1484
+ F(j(V.value), 1)
1485
+ ]),
1486
+ _: 1
1487
+ }))
1488
+ ])) : (p(), x("div", $i, [
1489
+ A(t(Qe), {
1490
+ modelValue: y.email,
1491
+ "onUpdate:modelValue": f[0] || (f[0] = (m) => y.email = m),
1492
+ required: "",
1493
+ type: "email",
1494
+ name: "email",
1495
+ autocomplete: "email",
1496
+ disabled: !!e.readOnlyEmail,
1497
+ label: t(_).emailLabel,
1498
+ placeholder: t(_).emailPlaceholder + I("email"),
1499
+ error: e.validation.value.email.$errors
1500
+ }, null, 8, ["modelValue", "disabled", "label", "placeholder", "error"]),
1501
+ e.isShippingAddressRequired ? z("", !0) : (p(), w(t(an), {
1502
+ key: 0,
1503
+ "single-model-value": D.value,
1504
+ "onUpdate:singleModelValue": f[3] || (f[3] = (m) => D.value = m),
1505
+ i18n: { placeholderDefault: t(_).countryPlaceholder },
1506
+ required: "",
1507
+ name: "country",
1508
+ label: t(_).countryLabel + I("country"),
1509
+ error: e.validation.value.country.$errors
1510
+ }, {
1511
+ "label-suffix": M(() => [
1512
+ !s.value && !e.isBillingInformationMandatory ? (p(), w(t(xe), {
1513
+ key: 0,
1514
+ size: "xs",
1515
+ intent: "subtle",
1516
+ "icon-prefix": "add",
1517
+ class: "py-0.5",
1518
+ onClick: f[1] || (f[1] = (m) => s.value = !0)
1519
+ }, {
1520
+ default: M(() => [
1521
+ F(j(t(N)({
1522
+ defaultMessage: "More billing details",
1523
+ description: "Label of the button in the checkout that lets you fill out all billing details",
1524
+ id: "checkout.billing_details.add_billing_details_button.label"
1525
+ })), 1)
1526
+ ]),
1527
+ _: 1
1528
+ })) : z("", !0),
1529
+ s.value && !e.isBillingInformationMandatory ? (p(), w(t(xe), {
1530
+ key: 1,
1531
+ size: "sm",
1532
+ intent: "subtle",
1533
+ "icon-prefix": "close",
1534
+ class: "py-0.5",
1535
+ onClick: f[2] || (f[2] = (m) => s.value = !1)
1536
+ }, {
1537
+ default: M(() => [
1538
+ F(j(t(N)({
1539
+ defaultMessage: "Remove billing details",
1540
+ id: "checkout.billing_details.remove_billing_details_button.label",
1541
+ description: "Label of the button in the checkout that lets you remove the billing details"
1542
+ })), 1)
1543
+ ]),
1544
+ _: 1
1545
+ })) : z("", !0)
1546
+ ]),
1547
+ _: 1
1548
+ }, 8, ["single-model-value", "i18n", "label", "error"]))
1549
+ ])),
1550
+ e.isShippingAddressRequired ? z("", !0) : (p(), w(t(gn), {
1551
+ key: 2,
1552
+ "is-open": s.value || !!e.isBillingInformationMandatory
1553
+ }, {
1554
+ default: M(() => [
1555
+ s.value || e.isBillingInformationMandatory ? (p(), x("div", Gi, [
1556
+ k("div", Yi, [
1557
+ A(t(Qe), {
1558
+ modelValue: y.addressLine1,
1559
+ "onUpdate:modelValue": f[4] || (f[4] = (m) => y.addressLine1 = m),
1560
+ name: "address_line_1",
1561
+ autocomplete: "billing address-line1",
1562
+ label: t(N)({
1563
+ defaultMessage: "Billing address",
1564
+ id: "checkout.address.title",
1565
+ description: "Label of the billing address, above its first line, in the checkout and billing information forms"
1566
+ }),
1567
+ placeholder: t(N)({
1568
+ defaultMessage: "Address line 1",
1569
+ id: "checkout.address.line1.placeholder",
1570
+ description: "Address line 1 of the customer address in the checkout form"
1571
+ }) + I("addressLine1"),
1572
+ required: "",
1573
+ error: e.validation.value.addressLine1.$errors
1574
+ }, null, 8, ["modelValue", "label", "placeholder", "error"]),
1575
+ A(it, {
1576
+ modelValue: y.addressLine2,
1577
+ "onUpdate:modelValue": f[5] || (f[5] = (m) => y.addressLine2 = m),
1578
+ name: "address_line_2",
1579
+ autocomplete: "billing address-line2",
1580
+ label: t(_).addressLine2Label,
1581
+ placeholder: t(N)({
1582
+ defaultMessage: "Address line 2",
1583
+ id: "checkout.address.line2.placeholder",
1584
+ description: "Address line 2 of the customer address in the checkout form"
1585
+ }) + I("addressLine2")
1586
+ }, null, 8, ["modelValue", "label", "placeholder"]),
1587
+ k("div", Ki, [
1588
+ A(it, {
1589
+ modelValue: y.postalCode,
1590
+ "onUpdate:modelValue": f[6] || (f[6] = (m) => y.postalCode = m),
1591
+ name: "postal_code",
1592
+ autocomplete: "billing postal-code",
1593
+ label: t(_).postalCodeLabel,
1594
+ placeholder: t(_).postalCodePlaceholder + I("postalCode"),
1595
+ error: e.validation.value.postalCode.$errors
1596
+ }, null, 8, ["modelValue", "label", "placeholder", "error"]),
1597
+ A(it, {
1598
+ modelValue: y.city,
1599
+ "onUpdate:modelValue": f[7] || (f[7] = (m) => y.city = m),
1600
+ name: "city",
1601
+ autocomplete: "billing address-level2",
1602
+ label: t(_).cityLabel,
1603
+ placeholder: t(_).cityPlaceholder + I("city")
1604
+ }, null, 8, ["modelValue", "label", "placeholder"]),
1605
+ A(it, {
1606
+ modelValue: y.state,
1607
+ "onUpdate:modelValue": f[8] || (f[8] = (m) => y.state = m),
1608
+ name: "state",
1609
+ autocomplete: "billing address-level1",
1610
+ label: t(_).stateLabel,
1611
+ placeholder: t(_).statePlaceholder + I("state"),
1612
+ error: e.validation.value.state.$errors
1613
+ }, null, 8, ["modelValue", "label", "placeholder", "error"])
1614
+ ])
1615
+ ])
1616
+ ])) : z("", !0)
1617
+ ]),
1618
+ _: 1
1619
+ }, 8, ["is-open"])),
1620
+ e.isShippingAddressRequired && !e.readOnly ? (p(), x("fieldset", Hi, [
1621
+ k("legend", null, [
1622
+ A(t(yn), {
1623
+ tag: "span",
1624
+ required: ""
1625
+ }, {
1626
+ default: M(() => [
1627
+ F(j(se.value), 1)
1628
+ ]),
1629
+ _: 1
1630
+ })
1631
+ ]),
1632
+ k("div", Qi, [
1633
+ A(t(an), {
1634
+ "single-model-value": a.value,
1635
+ "onUpdate:singleModelValue": f[9] || (f[9] = (m) => a.value = m),
1636
+ i18n: { placeholderDefault: L.value },
1637
+ required: "",
1638
+ "label-screen-reader-only": "",
1639
+ name: "shipping_country",
1640
+ label: r.value,
1641
+ error: e.validation.value.shippingCountry.$errors
1642
+ }, null, 8, ["single-model-value", "i18n", "label", "error"]),
1643
+ A(rn, {
1644
+ modelValue: n.value,
1645
+ "onUpdate:modelValue": f[10] || (f[10] = (m) => n.value = m),
1646
+ variant: "SHIPPING",
1647
+ class: "sv-checkout__shipping-address",
1648
+ "get-optional-suffix": I,
1649
+ format: e.shippingAddressFormat,
1650
+ errors: {
1651
+ addressLine1: e.validation.value.shippingAddressLine1.$errors,
1652
+ postalCode: e.validation.value.shippingPostalCode.$errors,
1653
+ city: e.validation.value.shippingCity.$errors,
1654
+ state: e.validation.value.shippingState.$errors,
1655
+ phoneNumber: e.validation.value.shippingPhoneNumber.$errors,
1656
+ lastName: e.validation.value.shippingLastName.$errors
1657
+ }
1658
+ }, null, 8, ["modelValue", "format", "errors"])
1659
+ ]),
1660
+ k("div", Zi, [
1661
+ A(t(To), {
1662
+ modelValue: X.value,
1663
+ "onUpdate:modelValue": f[11] || (f[11] = (m) => X.value = m),
1664
+ name: "billing_address_same_as_shipping",
1665
+ class: "sv-checkout__billing-same-as-shipping",
1666
+ label: t(N)({
1667
+ defaultMessage: "Billing address is the same as shipping address",
1668
+ id: "checkout.billing_address_same_as_shipping.label",
1669
+ description: "Label of the checkbox that bills the order to the address it ships to"
1670
+ })
1671
+ }, null, 8, ["modelValue", "label"])
1672
+ ])
1673
+ ])) : z("", !0)
1674
+ ]),
1675
+ _: 1
1676
+ }, 8, ["title"]),
1677
+ e.isShippingAddressRequired && !e.readOnly ? (p(), x(ye, { key: 0 }, [
1678
+ X.value ? z("", !0) : (p(), w(t(Ae), {
1679
+ key: 0,
1680
+ class: "sv-checkout__billing-section"
1681
+ }, {
1682
+ default: M(() => [
1683
+ k("fieldset", null, [
1684
+ k("legend", null, [
1685
+ A(t(yn), {
1686
+ tag: "span",
1687
+ required: ""
1688
+ }, {
1689
+ default: M(() => [
1690
+ F(j(t(_).addressTitle), 1)
1691
+ ]),
1692
+ _: 1
1693
+ })
1694
+ ]),
1695
+ A(rn, {
1696
+ modelValue: n.value,
1697
+ "onUpdate:modelValue": f[12] || (f[12] = (m) => n.value = m),
1698
+ variant: "BILLING",
1699
+ class: "sv-checkout__billing-address",
1700
+ "with-country": "",
1701
+ "country-label": t(_).countryLabel,
1702
+ "get-optional-suffix": I,
1703
+ errors: {
1704
+ addressLine1: e.validation.value.addressLine1.$errors,
1705
+ postalCode: e.validation.value.postalCode.$errors,
1706
+ city: e.validation.value.city.$errors,
1707
+ state: e.validation.value.state.$errors,
1708
+ country: e.validation.value.country.$errors
1709
+ }
1710
+ }, null, 8, ["modelValue", "country-label", "errors"])
1711
+ ])
1712
+ ]),
1713
+ _: 1
1714
+ }))
1715
+ ], 64)) : z("", !0),
1716
+ e.readOnly ? z("", !0) : (p(), w(t(Ae), { key: 1 }, {
1717
+ default: M(() => [
1718
+ A(Ui, {
1719
+ modelValue: c.value,
1720
+ "onUpdate:modelValue": f[13] || (f[13] = (m) => c.value = m),
1721
+ "no-spacing": "",
1722
+ class: "!flex"
1723
+ }, null, 8, ["modelValue"]),
1724
+ A(t(gn), { "is-open": g.value }, {
1725
+ default: M(() => [
1726
+ g.value ? (p(), x("div", qi, [
1727
+ k("div", Xi, [
1728
+ A(t(Qe), {
1729
+ modelValue: y.companyLegalName,
1730
+ "onUpdate:modelValue": f[14] || (f[14] = (m) => y.companyLegalName = m),
1731
+ required: "",
1732
+ name: "legal_name",
1733
+ autocomplete: "billing organization",
1734
+ label: t(_).legalNameLabel,
1735
+ placeholder: t(_).legalNamePlaceholder,
1736
+ error: e.validation.value.companyLegalName.$errors
1737
+ }, null, 8, ["modelValue", "label", "placeholder", "error"]),
1738
+ E.value ? (p(), w(t(Qe), {
1739
+ key: 0,
1740
+ modelValue: y.companyVatNumber,
1741
+ "onUpdate:modelValue": f[15] || (f[15] = (m) => y.companyVatNumber = m),
1742
+ name: "vat_number",
1743
+ autocomplete: "off",
1744
+ "input-class": "focus:outline-none focus:ring-0",
1745
+ label: t(_).vatNumberLabel,
1746
+ placeholder: t(_).vatNumberPlaceholder,
1747
+ error: e.validation.value.companyVatNumber.$errors,
1748
+ "suffix-class": "px-2 border-l-0"
1749
+ }, bt({ _: 2 }, [
1750
+ t(En)(n.value.country ?? "") ? {
1751
+ name: "suffix",
1752
+ fn: M(() => [
1753
+ A(t(xe), {
1754
+ type: "button",
1755
+ size: "sm",
1756
+ intent: "secondary",
1757
+ disabled: !t(T) || t(O) || e.validation.value.companyVatNumber.$invalid,
1758
+ onClick: t(G)
1759
+ }, {
1760
+ default: M(() => [
1761
+ F(j(t(N)({
1762
+ defaultMessage: "Check",
1763
+ id: "checkout.vat_number.check_button.label",
1764
+ description: "The label for the check button in the checkout form"
1765
+ })), 1)
1766
+ ]),
1767
+ _: 1
1768
+ }, 8, ["disabled", "onClick"])
1769
+ ]),
1770
+ key: "0"
1771
+ } : void 0
1772
+ ]), 1032, ["modelValue", "label", "placeholder", "error"])) : z("", !0),
1773
+ t(C) ? (p(), x("div", {
1774
+ key: 1,
1775
+ class: ke({ "opacity-75": t(O) })
1776
+ }, [
1777
+ A(zi, { status: t(C) }, null, 8, ["status"])
1778
+ ], 2)) : z("", !0)
1779
+ ])
1780
+ ])) : z("", !0)
1781
+ ]),
1782
+ _: 1
1783
+ }, 8, ["is-open"])
1784
+ ]),
1785
+ _: 1
1786
+ }))
1787
+ ])
1788
+ ], 32));
1789
+ }
1790
+ }), ea = (e) => typeof e == "object" && e !== null && typeof Reflect.get(e, "strong") == "string", Fe = (e) => ({
1791
+ strong: e.filter((o) => typeof o == "string").join("")
1792
+ });
1793
+ function ta(e) {
1794
+ return (Array.isArray(e) ? e : [e]).flatMap((i) => typeof i == "string" ? i ? [{ text: i, strong: !1 }] : [] : ea(i) ? [{ text: i.strong, strong: !0 }] : []);
1795
+ }
1796
+ const na = {
1797
+ key: 0,
1798
+ class: "flex items-center"
1799
+ }, oa = { key: 1 }, ia = { key: 0 }, aa = /* @__PURE__ */ pe({
1800
+ __name: "CheckoutTitle",
1801
+ props: {
1802
+ trialPeriod: { type: Object },
1803
+ subscriptionName: { type: String },
1804
+ amount: { type: Object },
1805
+ dueTodayAmount: { type: Object },
1806
+ recurringAmount: { type: Object },
1807
+ hasOneOffCharges: { type: Boolean },
1808
+ hasRecurringCharge: { type: Boolean },
1809
+ hasUsageCharges: { type: Boolean },
1810
+ billingPeriod: { type: Object },
1811
+ countryCode: { type: null },
1812
+ trialStartDate: { type: Date },
1813
+ subscriptionStartDate: { type: Date }
1814
+ },
1815
+ setup(e) {
1816
+ const o = e, { $t: i } = Pe(), { formatTimePeriod: s } = Mt(), n = u(
1817
+ () => s(o.billingPeriod, { short: !0, hideValueForExactPeriods: !0 })
1818
+ ), c = u(() => {
1819
+ const D = be(o.dueTodayAmount), a = () => i(
1820
+ {
1821
+ defaultMessage: "You will be billed <strong>{due_today}</strong> today.",
1822
+ id: "checkout.one_off_description",
1823
+ description: "The description of an order that is charged once and does not renew"
1824
+ },
1825
+ // @ts-expect-error formatjs does not support this type yet
1826
+ { due_today: D, strong: Fe }
1827
+ );
1828
+ if (o.recurringAmount) {
1829
+ if (Number(o.recurringAmount.quantity) === 0) {
1830
+ if (o.hasUsageCharges)
1831
+ return i(
1832
+ {
1833
+ defaultMessage: "You will be billed <strong>{due_today}</strong> today. Usage is billed every {period_name}.",
1834
+ id: "checkout.usage_with_one_off_description",
1835
+ description: "The description of a usage-based subscription whose first invoice also charges something only once"
1836
+ },
1837
+ // @ts-expect-error formatjs does not support this type yet
1838
+ { due_today: D, period_name: n.value, strong: Fe }
1839
+ );
1840
+ if (!o.hasRecurringCharge)
1841
+ return a();
1842
+ }
1843
+ const T = be(o.recurringAmount);
1844
+ return o.trialStartDate ? i(
1845
+ {
1846
+ defaultMessage: "You will be billed <strong>{due_today}</strong> today, then <strong>{price}</strong> per {period_name}, starting {startDate, date, long}.",
1847
+ id: "checkout.trial_period_description_with_one_off",
1848
+ description: "The description of a trial whose first invoice also charges something only once"
1849
+ },
1850
+ {
1851
+ due_today: D,
1852
+ price: T,
1853
+ period_name: n.value,
1854
+ // @ts-expect-error formatjs does not support this type yet
1855
+ startDate: o.subscriptionStartDate,
1856
+ // @ts-expect-error formatjs does not support this type yet
1857
+ strong: Fe
1858
+ }
1859
+ ) : i(
1860
+ {
1861
+ defaultMessage: "You will be billed <strong>{due_today}</strong> today, then <strong>{price}</strong> per {period_name}.",
1862
+ id: "checkout.subscription_description_with_one_off",
1863
+ description: "The description of a subscription whose first invoice also charges something only once"
1864
+ },
1865
+ // @ts-expect-error formatjs does not support this type yet
1866
+ { due_today: D, price: T, period_name: n.value, strong: Fe }
1867
+ );
1868
+ }
1869
+ if (o.hasOneOffCharges)
1870
+ return a();
1871
+ const E = be(o.amount);
1872
+ return o.trialStartDate ? i(
1873
+ {
1874
+ defaultMessage: "You will be billed <strong>{price}</strong> per {period_name}, starting {startDate, date, long}.",
1875
+ id: "checkout.trial_period_description",
1876
+ description: "The description of the trial period"
1877
+ },
1878
+ {
1879
+ price: E,
1880
+ // @ts-expect-error formatjs does not support this type yet
1881
+ startDate: o.subscriptionStartDate,
1882
+ period_name: n.value,
1883
+ // @ts-expect-error formatjs does not support this type yet
1884
+ strong: Fe
1885
+ }
1886
+ ) : i(
1887
+ {
1888
+ defaultMessage: "You will be billed <strong>{price}</strong> per {period_name}, starting today.",
1889
+ id: "checkout.subscription_description",
1890
+ description: "The description of the subscription"
1891
+ },
1892
+ // @ts-expect-error formatjs does not support this type yet
1893
+ { price: E, period_name: n.value, strong: Fe }
1894
+ );
1895
+ }), g = u(() => ta(c.value)), y = u(
1896
+ () => o.trialStartDate ? i(
1897
+ {
1898
+ defaultMessage: "per {period_name} starting, {startDate, date, long}",
1899
+ id: "checkout.trial_period_description_without_price",
1900
+ description: "The description of the trial period, while the price is still being determined"
1901
+ },
1902
+ {
1903
+ // @ts-expect-error formatjs does not support this type yet
1904
+ startDate: o.subscriptionStartDate,
1905
+ period_name: n.value
1906
+ }
1907
+ ) : i(
1908
+ {
1909
+ defaultMessage: "per {period_name}, starting today",
1910
+ id: "checkout.subscription_description_without_price",
1911
+ description: "The description of the subscription, while the price is still being determined"
1912
+ },
1913
+ { period_name: n.value }
1914
+ )
1915
+ );
1916
+ return (D, a) => (p(), x("div", null, [
1917
+ k("div", null, [
1918
+ A(t(ce), {
1919
+ variant: "heading-1",
1920
+ class: "inline-block"
1921
+ }, {
1922
+ default: M(() => [
1923
+ F(j(e.trialStartDate ? e.subscriptionName : t(i)({
1924
+ defaultMessage: "Pay and subscribe",
1925
+ id: "checkout.page_title",
1926
+ description: "The title of the checkout page"
1927
+ })) + j(" "), 1),
1928
+ e.trialPeriod ? (p(), w(t(go), {
1929
+ key: 0,
1930
+ "trial-period": e.trialPeriod,
1931
+ size: "lg",
1932
+ class: "-translate-y-0.5"
1933
+ }, null, 8, ["trial-period"])) : z("", !0)
1934
+ ]),
1935
+ _: 1
1936
+ })
1937
+ ]),
1938
+ A(t(ce), {
1939
+ variant: "body-sm",
1940
+ color: "subtle",
1941
+ "no-spacing": ""
1942
+ }, {
1943
+ default: M(() => [
1944
+ e.countryCode ? (p(), x("span", oa, [
1945
+ (p(!0), x(ye, null, rt(g.value, (E, T) => (p(), x(ye, { key: T }, [
1946
+ E.strong ? (p(), x("strong", ia, j(E.text), 1)) : (p(), x(ye, { key: 1 }, [
1947
+ F(j(E.text), 1)
1948
+ ], 64))
1949
+ ], 64))), 128))
1950
+ ])) : (p(), x("span", na, [
1951
+ A(t(qo), { "is-dark-mode": "" }, {
1952
+ tooltip: M(() => [
1953
+ A(t(Xo), null, {
1954
+ default: M(() => [
1955
+ A(t(Wo), null, {
1956
+ default: M(() => [
1957
+ F(j(t(i)({
1958
+ defaultMessage: "Will be determined by billing information",
1959
+ description: "Tooltip content for the invoice preview when taxes are not determined by billing information",
1960
+ id: "invoice_preview.taxes_not_determined_by_billing_information_tooltip"
1961
+ })), 1)
1962
+ ]),
1963
+ _: 1
1964
+ })
1965
+ ]),
1966
+ _: 1
1967
+ })
1968
+ ]),
1969
+ default: M(() => [
1970
+ A(t(Zo), {
1971
+ "width-class": "w-10",
1972
+ "height-class": "h-4",
1973
+ shade: "darker",
1974
+ class: "mr-1.5 inline-block"
1975
+ })
1976
+ ]),
1977
+ _: 1
1978
+ }),
1979
+ k("span", null, j(y.value), 1)
1980
+ ]))
1981
+ ]),
1982
+ _: 1
1983
+ })
1984
+ ]));
1985
+ }
1986
+ }), sa = /* @__PURE__ */ pe({
1987
+ __name: "SubscriptionPaymentCompletedCard",
1988
+ setup(e) {
1989
+ const { $t: o } = Pe();
1990
+ return (i, s) => (p(), w(Jo, {
1991
+ status: "success",
1992
+ title: t(o)({
1993
+ defaultMessage: "Payment successful",
1994
+ id: "subscription_payment_completed_card.title",
1995
+ description: "The title for when a payment has been successful"
1996
+ })
1997
+ }, {
1998
+ default: M(() => [
1999
+ A(t(ce), {
2000
+ variant: "body-xs",
2001
+ color: "subtle",
2002
+ tag: "span"
2003
+ }, {
2004
+ default: M(() => [
2005
+ F(j(t(o)({
2006
+ defaultMessage: "Thank you for subscribing.",
2007
+ id: "subscription_payment_completed_card.thank_you_for_subscribing",
2008
+ description: "The text shown after a successful message before a redirect"
2009
+ })), 1)
2010
+ ]),
2011
+ _: 1
2012
+ })
2013
+ ]),
2014
+ _: 1
2015
+ }, 8, ["title"]));
2016
+ }
2017
+ }), la = { class: "flex items-start" }, ra = { class: "flex grow flex-col" }, ua = { class: "flex items-center gap-1" }, ca = { class: "ml-4 flex items-center self-center" }, da = /* @__PURE__ */ pe({
2018
+ __name: "PricingGroupContent",
2019
+ props: {
2020
+ name: { type: String },
2021
+ description: { type: String }
2022
+ },
2023
+ setup(e) {
2024
+ return (o, i) => (p(), x("div", la, [
2025
+ k("div", ra, [
2026
+ k("div", ua, [
2027
+ A(t(ce), {
2028
+ tag: "span",
2029
+ variant: "body-sm",
2030
+ weight: "semibold"
2031
+ }, {
2032
+ default: M(() => [
2033
+ F(j(e.name), 1)
2034
+ ]),
2035
+ _: 1
2036
+ }),
2037
+ _t(o.$slots, "badge")
2038
+ ]),
2039
+ A(t(ce), {
2040
+ tag: "span",
2041
+ variant: "body-xs",
2042
+ color: "subtle"
2043
+ }, {
2044
+ default: M(() => [
2045
+ F(j(e.description), 1)
2046
+ ]),
2047
+ _: 1
2048
+ })
2049
+ ]),
2050
+ k("div", ca, [
2051
+ _t(o.$slots, "default")
2052
+ ])
2053
+ ]));
2054
+ }
2055
+ }), pa = { class: "sv-order-summary__body grid grid-cols-1 gap-1" }, ma = { class: "px-3 py-2" }, ga = { class: "sv-order-summary__billing-period flex flex-col gap-3" }, ya = { class: "px-3 py-2" }, va = {
2056
+ key: 0,
2057
+ class: "sv-order-summary__renewal flex flex-row gap-2 pt-1.5"
2058
+ }, bn = /* @__PURE__ */ pe({
2059
+ __name: "OrderSummary",
2060
+ props: {
2061
+ subscription: { type: Object },
2062
+ invoice: { type: Object },
2063
+ invoicePreviewByBillingPeriod: { type: Object },
2064
+ trialInvoice: { type: Object },
2065
+ enabledPricingIds: { type: Array },
2066
+ avatar: { type: String },
2067
+ isPaid: { type: Boolean },
2068
+ isUsageBased: { type: Boolean },
2069
+ collapsible: { type: String },
2070
+ noTitle: { type: Boolean },
2071
+ countryCode: { type: null },
2072
+ variant: { type: String }
2073
+ },
2074
+ emits: ["billing-period-change"],
2075
+ setup(e, { emit: o }) {
2076
+ const i = e, s = o, { $t: n } = Pe(), { map: c, formatTimePeriod: g } = Mt(), { isMobileViewport: y } = Dn(), D = u(() => y.value ? "sm" : "xs"), a = (h) => `${h.type}:${h.value}`, E = ["DAY", "WEEK", "MONTH", "YEAR"], T = (h) => E.includes(h), O = (h) => {
2077
+ if (!h)
2078
+ return;
2079
+ const [d, S] = h.split(":"), K = Number(S);
2080
+ if (!(!K || !T(d)))
2081
+ return { type: d, value: K };
2082
+ }, C = u({
2083
+ get: () => {
2084
+ const h = i.subscription.billing_period;
2085
+ return h ? a(h) : void 0;
2086
+ },
2087
+ set: (h) => {
2088
+ const d = O(h);
2089
+ d && s("billing-period-change", d);
2090
+ }
2091
+ }), G = u({
2092
+ get: () => C.value,
2093
+ set: (h) => {
2094
+ C.value = _e(h);
2095
+ }
2096
+ }), N = (h) => {
2097
+ var d;
2098
+ return cn((d = i.invoicePreviewByBillingPeriod) == null ? void 0 : d[h]);
2099
+ }, _ = (h) => {
2100
+ const d = N(a(h));
2101
+ if (!d)
2102
+ return;
2103
+ const S = h.type === "MONTH" && h.value === 3 ? n({
2104
+ defaultMessage: "/quarter",
2105
+ id: "checkout.order_summary_block.billing_period.per_quarter",
2106
+ description: "Period label for quarterly billing"
2107
+ }) : n(
2108
+ {
2109
+ defaultMessage: "/{period}",
2110
+ id: "checkout.order_summary_block.billing_period.per_label",
2111
+ description: "Period label for billing cycles"
2112
+ },
2113
+ {
2114
+ period: g(h, {
2115
+ prefix: !1,
2116
+ hideValueForExactPeriods: !0
2117
+ })
2118
+ }
2119
+ );
2120
+ return n(
2121
+ {
2122
+ defaultMessage: "{amount}{period}",
2123
+ id: "checkout.order_summary_block.billing_period.sub_label",
2124
+ description: "Billing period option sublabel showing price per period"
2125
+ },
2126
+ {
2127
+ amount: be(d),
2128
+ period: S
2129
+ }
2130
+ );
2131
+ }, I = (h) => {
2132
+ if (!h)
2133
+ return;
2134
+ const d = n(
2135
+ {
2136
+ defaultMessage: "Save {amount}",
2137
+ id: "checkout.order_summary_block.billing_period.save_badge.prefix",
2138
+ description: "First line for the savings badge label"
2139
+ },
2140
+ { amount: be(h) }
2141
+ ), S = n({
2142
+ defaultMessage: "/year",
2143
+ id: "checkout.order_summary_block.billing_period.save_badge.suffix",
2144
+ description: "Second line for the savings badge label"
2145
+ });
2146
+ return `${d}${S}`;
2147
+ }, V = u(
2148
+ () => i.invoice ? Oo(i.invoice) : { recurring: [], oneOff: [], other: [] }
2149
+ ), oe = u(
2150
+ () => V.value.recurring.length > 0 && V.value.oneOff.length > 0
2151
+ ), X = u(
2152
+ () => oe.value ? cn(i.invoice) : void 0
2153
+ ), ie = u(
2154
+ () => X.value && Number(X.value.quantity) !== 0 ? X.value : void 0
2155
+ ), se = u(() => {
2156
+ var de, ge, b;
2157
+ const h = $e({
2158
+ pricingPlanScheduleInfos: i.subscription.pricing_plan_schedule_infos ?? [],
2159
+ type: "DEFAULT"
2160
+ }), d = ((ge = (de = h == null ? void 0 : h.pricing_plan_version) == null ? void 0 : de.billing_period_settings) == null ? void 0 : ge.billing_periods) ?? [], S = /* @__PURE__ */ new Map(), K = (P) => {
2161
+ P && S.set(a(P), P);
2162
+ }, q = (P) => {
2163
+ var H;
2164
+ (H = P == null ? void 0 : P.items) == null || H.forEach((R) => {
2165
+ var J, ae;
2166
+ (J = R.billing_period_configs) == null || J.forEach(
2167
+ (ee) => K(ee.billing_period)
2168
+ ), (ae = R.pricing_currency_configs) == null || ae.forEach((ee) => {
2169
+ var Q;
2170
+ (Q = ee.billing_period_configs) == null || Q.forEach(
2171
+ (re) => K(re.billing_period)
2172
+ );
2173
+ });
2174
+ });
2175
+ };
2176
+ if ((((b = h == null ? void 0 : h.pricing_plan_version) == null ? void 0 : b.pricing_categories) ?? []).forEach((P) => {
2177
+ var H, R;
2178
+ (H = P.pricings) == null || H.forEach((J) => q(J)), (R = P.pricing_groups) == null || R.forEach(
2179
+ (J) => {
2180
+ var ae;
2181
+ return (ae = J.pricings) == null ? void 0 : ae.forEach((ee) => q(ee));
2182
+ }
2183
+ );
2184
+ }), !S.size)
2185
+ return [];
2186
+ const le = d.map((P) => S.get(a(P.period))).filter((P) => !!P), W = new Set(le.map(a)), ne = [...S.values()].filter(
2187
+ (P) => !W.has(a(P))
2188
+ );
2189
+ return [...le, ...ne];
2190
+ }), r = u(() => {
2191
+ const h = se.value[se.value.length - 1], d = h ? at(
2192
+ h,
2193
+ N(a(h))
2194
+ ) : void 0;
2195
+ return se.value.map((K) => {
2196
+ const q = K.type === "MONTH" && K.value === 3 ? n({
2197
+ defaultMessage: "Billed quarterly",
2198
+ id: "checkout.order_summary_block.billing_period.quarterly",
2199
+ description: "Billing period option label for quarterly billing"
2200
+ }) : n(
2201
+ {
2202
+ defaultMessage: "Billed {period}",
2203
+ id: "checkout.order_summary_block.billing_period.label",
2204
+ description: "Billing period option label for the selected period"
2205
+ },
2206
+ { period: c.value[K.type].full }
2207
+ ), Z = N(a(K)), le = at(K, Z), W = h && K.type === h.type && K.value === h.value ? void 0 : dn(le, d), ne = I(W);
2208
+ return {
2209
+ label: q,
2210
+ subLabel: _(K),
2211
+ labelSuffixComponent: ne ? {
2212
+ component: vn,
2213
+ props: {
2214
+ color: "primary",
2215
+ content: ne,
2216
+ size: D.value,
2217
+ class: "whitespace-nowrap text-left leading-tight"
2218
+ }
2219
+ } : void 0,
2220
+ hidden: C.value === a(K),
2221
+ value: a(K)
2222
+ };
2223
+ });
2224
+ }), L = u(() => {
2225
+ const h = r.value, d = h[0], S = h[h.length - 1];
2226
+ return {
2227
+ smallestPeriod: d == null ? void 0 : d.value,
2228
+ biggestPeriod: S == null ? void 0 : S.value
2229
+ };
2230
+ }), l = u(
2231
+ () => r.value.find((h) => h.value === L.value.biggestPeriod)
2232
+ ), f = u(
2233
+ () => r.value.find((h) => h.value === C.value)
2234
+ ), m = u(() => {
2235
+ const h = r.value, d = h[h.length - 1], S = C.value;
2236
+ if (!d || !S || S === d.value)
2237
+ return "";
2238
+ const K = O(d.value);
2239
+ if (!K)
2240
+ return "";
2241
+ const q = N(d.value), Z = O(S), le = N(S);
2242
+ if (!Z || !le)
2243
+ return "";
2244
+ const W = at(Z, le), ne = at(K, q);
2245
+ return I(dn(W, ne)) ?? "";
2246
+ }), $ = (h) => {
2247
+ const { smallestPeriod: d, biggestPeriod: S } = L.value;
2248
+ C.value = h ? S : d;
2249
+ };
2250
+ return (h, d) => (p(), w(t(Ae), {
2251
+ class: "sv-order-summary",
2252
+ "no-border": "",
2253
+ "no-spacing": "",
2254
+ "content-background": "none",
2255
+ title: e.noTitle ? void 0 : t(n)({
2256
+ defaultMessage: "Order summary",
2257
+ id: "checkout.order_summary_block.title",
2258
+ description: "The title of the order summary block that lists the subscription cost in the checkout"
2259
+ })
2260
+ }, {
2261
+ default: M(() => [
2262
+ k("div", pa, [
2263
+ A(t(Ae), {
2264
+ "no-spacing": "",
2265
+ class: "sv-order-summary__subscription"
2266
+ }, {
2267
+ default: M(() => [
2268
+ e.subscription ? (p(), w(Co, {
2269
+ key: 0,
2270
+ avatar: e.avatar,
2271
+ subscription: e.subscription,
2272
+ "enabled-pricing-ids": e.enabledPricingIds
2273
+ }, null, 8, ["avatar", "subscription", "enabled-pricing-ids"])) : z("", !0)
2274
+ ]),
2275
+ _: 1
2276
+ }),
2277
+ r.value.length === 2 ? (p(), w(t(Ae), {
2278
+ key: 0,
2279
+ "no-spacing": "",
2280
+ "content-classes": C.value === L.value.biggestPeriod ? "border-primary-500" : void 0
2281
+ }, {
2282
+ default: M(() => {
2283
+ var S;
2284
+ return [
2285
+ k("div", ma, [
2286
+ k("div", ga, [
2287
+ l.value ? (p(), w(da, {
2288
+ key: 0,
2289
+ name: l.value.label,
2290
+ description: ((S = f.value) == null ? void 0 : S.subLabel) ?? ""
2291
+ }, bt({
2292
+ default: M(() => [
2293
+ A(t(Nn), {
2294
+ "model-value": C.value === L.value.biggestPeriod,
2295
+ size: "sm",
2296
+ "onUpdate:modelValue": $
2297
+ }, null, 8, ["model-value"])
2298
+ ]),
2299
+ _: 2
2300
+ }, [
2301
+ m.value ? {
2302
+ name: "badge",
2303
+ fn: M(() => [
2304
+ A(t(vn), {
2305
+ intent: "brand",
2306
+ content: m.value,
2307
+ size: D.value,
2308
+ class: "whitespace-nowrap text-left leading-tight"
2309
+ }, null, 8, ["content", "size"])
2310
+ ]),
2311
+ key: "0"
2312
+ } : void 0
2313
+ ]), 1032, ["name", "description"])) : z("", !0)
2314
+ ])
2315
+ ])
2316
+ ];
2317
+ }),
2318
+ _: 1
2319
+ }, 8, ["content-classes"])) : r.value.length > 2 ? (p(), w(t(So), {
2320
+ key: 1,
2321
+ "single-model-value": G.value,
2322
+ "onUpdate:singleModelValue": d[0] || (d[0] = (S) => G.value = S),
2323
+ class: "sv-order-summary__billing-period",
2324
+ options: r.value,
2325
+ size: "xl",
2326
+ "has-large-dropdown": "",
2327
+ "show-sub-label-in-input": "",
2328
+ "show-suffix-in-closed-input": ""
2329
+ }, null, 8, ["single-model-value", "options"])) : z("", !0),
2330
+ e.isUsageBased ? (p(), w(t(Ae), {
2331
+ key: 2,
2332
+ "no-spacing": "",
2333
+ class: "sv-order-summary__usage"
2334
+ }, {
2335
+ default: M(() => [
2336
+ k("div", ya, [
2337
+ A(t(ce), {
2338
+ "no-spacing": "",
2339
+ variant: "body-sm",
2340
+ color: "subtle"
2341
+ }, {
2342
+ default: M(() => [
2343
+ F(j(t(n)({
2344
+ defaultMessage: "+ Usage",
2345
+ id: "checkout.invoice_preview.usage_based_message",
2346
+ description: "The message shown for the usage based invoice preview"
2347
+ })), 1)
2348
+ ]),
2349
+ _: 1
2350
+ })
2351
+ ])
2352
+ ]),
2353
+ _: 1
2354
+ })) : z("", !0),
2355
+ e.invoice ? (p(), w(xo, {
2356
+ key: 3,
2357
+ invoice: e.invoice,
2358
+ "trial-invoice": e.trialInvoice,
2359
+ "is-paid": e.isPaid,
2360
+ collapsible: e.collapsible,
2361
+ "is-preview-without-taxes": !e.countryCode,
2362
+ variant: e.variant
2363
+ }, {
2364
+ default: M(() => [
2365
+ ie.value ? (p(), x("div", va, [
2366
+ A(t(ce), {
2367
+ tag: "span",
2368
+ variant: "body-xs",
2369
+ color: "subtle",
2370
+ class: "grow"
2371
+ }, {
2372
+ default: M(() => [
2373
+ F(j(t(n)(
2374
+ {
2375
+ defaultMessage: "Then {amount} per {period}",
2376
+ id: "checkout.order_summary_block.renews_at",
2377
+ description: "The amount the subscription is charged every period after the first invoice"
2378
+ },
2379
+ {
2380
+ amount: t(be)(ie.value),
2381
+ period: t(g)(e.subscription.billing_period, {
2382
+ prefix: !1,
2383
+ singular: !0,
2384
+ hideValueForExactPeriods: !0
2385
+ })
2386
+ }
2387
+ )), 1)
2388
+ ]),
2389
+ _: 1
2390
+ })
2391
+ ])) : z("", !0)
2392
+ ]),
2393
+ _: 1
2394
+ }, 8, ["invoice", "trial-invoice", "is-paid", "collapsible", "is-preview-without-taxes", "variant"])) : (p(), w(t(Ae), {
2395
+ key: 4,
2396
+ class: "sv-order-summary__totals"
2397
+ }, {
2398
+ default: M(() => [
2399
+ A(t(ce), {
2400
+ variant: "body-sm",
2401
+ color: "subtle",
2402
+ class: "sv-order-summary__empty"
2403
+ }, {
2404
+ default: M(() => [
2405
+ F(j(t(n)({
2406
+ defaultMessage: "Please select a country first",
2407
+ description: "The message shown for the invoice preview when no country is set",
2408
+ id: "checkout.invoice_preview.no_country_selected_message"
2409
+ })), 1)
2410
+ ]),
2411
+ _: 1
2412
+ })
2413
+ ]),
2414
+ _: 1
2415
+ }))
2416
+ ])
2417
+ ]),
2418
+ _: 1
2419
+ }, 8, ["title"]));
2420
+ }
2421
+ }), fa = { key: 1 }, ha = { key: 2 }, _a = { key: 3 }, ba = { key: 4 }, Ma = ["href"], Ia = /* @__PURE__ */ pe({
2422
+ __name: "MarkdownInline",
2423
+ props: {
2424
+ nodes: { type: Array }
2425
+ },
2426
+ setup(e) {
2427
+ return (o, i) => {
2428
+ const s = Hn("MarkdownInline", !0);
2429
+ return p(!0), x(ye, null, rt(e.nodes, (n, c) => (p(), x(ye, { key: c }, [
2430
+ n.type === "text" ? (p(), x(ye, { key: 0 }, [
2431
+ F(j(n.value), 1)
2432
+ ], 64)) : n.type === "break" ? (p(), x("br", fa)) : n.type === "bold" ? (p(), x("strong", ha, [
2433
+ A(s, {
2434
+ nodes: n.children
2435
+ }, null, 8, ["nodes"])
2436
+ ])) : n.type === "italic" ? (p(), x("em", _a, [
2437
+ A(s, {
2438
+ nodes: n.children
2439
+ }, null, 8, ["nodes"])
2440
+ ])) : n.type === "underline" ? (p(), x("u", ba, [
2441
+ A(s, {
2442
+ nodes: n.children
2443
+ }, null, 8, ["nodes"])
2444
+ ])) : n.type === "link" ? (p(), x("a", {
2445
+ key: 5,
2446
+ href: n.href,
2447
+ target: "_blank",
2448
+ rel: "noopener noreferrer",
2449
+ class: "underline"
2450
+ }, [
2451
+ A(s, {
2452
+ nodes: n.children
2453
+ }, null, 8, ["nodes"])
2454
+ ], 8, Ma)) : z("", !0)
2455
+ ], 64))), 128);
2456
+ };
2457
+ }
2458
+ }), Aa = /^<u>([\s\S]*?)<\/u>/i, Pa = /^\*\*([\s\S]+?)\*\*/, Ca = /^\*([\s\S]+?)\*/, Na = /^_([\s\S]+?)_(?![\p{L}\p{N}])/u, Da = /[\p{L}\p{N}]/u, Ea = /^\[([^\]]*)\]\(\s*([^)\s]*)\s*\)/, La = /^<([a-z][a-z0-9+.-]*:[^>\s]+)>/i, ka = /\n[ \t]*\n/;
2459
+ function Ze(e) {
2460
+ const o = [];
2461
+ let i = "";
2462
+ const s = () => {
2463
+ i && (o.push({ type: "text", value: i }), i = "");
2464
+ };
2465
+ let n = 0;
2466
+ for (; n < e.length; ) {
2467
+ const c = e.slice(n), g = Pa.exec(c);
2468
+ if (g) {
2469
+ s(), o.push({ type: "bold", children: Ze(g[1]) }), n += g[0].length;
2470
+ continue;
2471
+ }
2472
+ const y = Ca.exec(c) ?? (Sa(e, n) ? Na.exec(c) : null);
2473
+ if (y) {
2474
+ s(), o.push({ type: "italic", children: Ze(y[1]) }), n += y[0].length;
2475
+ continue;
2476
+ }
2477
+ const D = Aa.exec(c);
2478
+ if (D) {
2479
+ s(), o.push({ type: "underline", children: Ze(D[1]) }), n += D[0].length;
2480
+ continue;
2481
+ }
2482
+ const a = Ea.exec(c);
2483
+ if (a) {
2484
+ s(), o.push(Mn(a[2], Ze(a[1]))), n += a[0].length;
2485
+ continue;
2486
+ }
2487
+ const E = La.exec(c);
2488
+ if (E) {
2489
+ s(), o.push(Mn(E[1], [{ type: "text", value: E[1] }])), n += E[0].length;
2490
+ continue;
2491
+ }
2492
+ if (e[n] === `
2493
+ `) {
2494
+ s(), o.push({ type: "break" }), n += 1;
2495
+ continue;
2496
+ }
2497
+ i += e[n], n += 1;
2498
+ }
2499
+ return s(), o;
2500
+ }
2501
+ function Sa(e, o) {
2502
+ return o === 0 || !Da.test(e[o - 1]);
2503
+ }
2504
+ function Mn(e, o) {
2505
+ const i = jo(e);
2506
+ return i ? { type: "link", href: i, children: o } : { type: "text", value: wn(o) };
2507
+ }
2508
+ function wn(e) {
2509
+ return e.map((o) => o.type === "text" ? o.value : o.type === "break" ? " " : wn(o.children)).join("");
2510
+ }
2511
+ function wa(e) {
2512
+ return e != null && e.trim() ? e.split(ka).map((o) => o.trim()).filter(Boolean).map((o) => ({ type: "paragraph", children: Ze(o) })) : [];
2513
+ }
2514
+ const Ta = { key: 0 }, Oa = /* @__PURE__ */ pe({
2515
+ __name: "MarkdownText",
2516
+ props: {
2517
+ source: { type: [String, null] }
2518
+ },
2519
+ setup(e) {
2520
+ const o = e, i = u(() => wa(o.source));
2521
+ return (s, n) => i.value.length ? (p(), x("div", Ta, [
2522
+ (p(!0), x(ye, null, rt(i.value, (c, g) => (p(), x("p", {
2523
+ key: g,
2524
+ class: ke({ "mt-2": g > 0 })
2525
+ }, [
2526
+ A(Ia, {
2527
+ nodes: c.children
2528
+ }, null, 8, ["nodes"])
2529
+ ], 2))), 128))
2530
+ ])) : z("", !0);
2531
+ }
2532
+ });
2533
+ async function Tn(e, o, { onSubmit: i } = {}) {
2534
+ const { AdyenCheckout: s } = await ut();
2535
+ return s(
2536
+ Uo({
2537
+ locale: e.locale,
2538
+ amount: e.amount,
2539
+ countryCode: e.countryCode,
2540
+ paymentMethodOptionResponse: e.paymentMethodOptionsResponse,
2541
+ logger: o,
2542
+ onSubmit: i
2543
+ })
2544
+ );
2545
+ }
2546
+ function On({
2547
+ props: e,
2548
+ create: o,
2549
+ onMissingButton: i,
2550
+ onMountFailed: s,
2551
+ afterMount: n
2552
+ }) {
2553
+ const c = Y(), g = Se(), y = async () => {
2554
+ const D = await Tn(e, g), a = await o(D);
2555
+ if (!c.value) {
2556
+ i();
2557
+ return;
2558
+ }
2559
+ try {
2560
+ await a.isAvailable(), a.mount(c.value), n == null || n();
2561
+ } catch (E) {
2562
+ s(E);
2563
+ }
2564
+ };
2565
+ return qe(() => {
2566
+ y();
2567
+ }), { buttonRef: c };
2568
+ }
2569
+ const xa = {
2570
+ key: 0,
2571
+ id: "svg-logo",
2572
+ viewBox: "0 0 35 15",
2573
+ class: "h-[44px]"
2574
+ }, Ra = {
2575
+ key: 1,
2576
+ src: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAxcHgiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAxMDEgMzIiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaW5ZTWluIG1lZXQiIHhtbG5zPSJodHRwOiYjeDJGOyYjeDJGO3d3dy53My5vcmcmI3gyRjsyMDAwJiN4MkY7c3ZnIj48cGF0aCBmaWxsPSIjMDAzMDg3IiBkPSJNIDEyLjIzNyAyLjggTCA0LjQzNyAyLjggQyAzLjkzNyAyLjggMy40MzcgMy4yIDMuMzM3IDMuNyBMIDAuMjM3IDIzLjcgQyAwLjEzNyAyNC4xIDAuNDM3IDI0LjQgMC44MzcgMjQuNCBMIDQuNTM3IDI0LjQgQyA1LjAzNyAyNC40IDUuNTM3IDI0IDUuNjM3IDIzLjUgTCA2LjQzNyAxOC4xIEMgNi41MzcgMTcuNiA2LjkzNyAxNy4yIDcuNTM3IDE3LjIgTCAxMC4wMzcgMTcuMiBDIDE1LjEzNyAxNy4yIDE4LjEzNyAxNC43IDE4LjkzNyA5LjggQyAxOS4yMzcgNy43IDE4LjkzNyA2IDE3LjkzNyA0LjggQyAxNi44MzcgMy41IDE0LjgzNyAyLjggMTIuMjM3IDIuOCBaIE0gMTMuMTM3IDEwLjEgQyAxMi43MzcgMTIuOSAxMC41MzcgMTIuOSA4LjUzNyAxMi45IEwgNy4zMzcgMTIuOSBMIDguMTM3IDcuNyBDIDguMTM3IDcuNCA4LjQzNyA3LjIgOC43MzcgNy4yIEwgOS4yMzcgNy4yIEMgMTAuNjM3IDcuMiAxMS45MzcgNy4yIDEyLjYzNyA4IEMgMTMuMTM3IDguNCAxMy4zMzcgOS4xIDEzLjEzNyAxMC4xIFoiPjwvcGF0aD48cGF0aCBmaWxsPSIjMDAzMDg3IiBkPSJNIDM1LjQzNyAxMCBMIDMxLjczNyAxMCBDIDMxLjQzNyAxMCAzMS4xMzcgMTAuMiAzMS4xMzcgMTAuNSBMIDMwLjkzNyAxMS41IEwgMzAuNjM3IDExLjEgQyAyOS44MzcgOS45IDI4LjAzNyA5LjUgMjYuMjM3IDkuNSBDIDIyLjEzNyA5LjUgMTguNjM3IDEyLjYgMTcuOTM3IDE3IEMgMTcuNTM3IDE5LjIgMTguMDM3IDIxLjMgMTkuMzM3IDIyLjcgQyAyMC40MzcgMjQgMjIuMTM3IDI0LjYgMjQuMDM3IDI0LjYgQyAyNy4zMzcgMjQuNiAyOS4yMzcgMjIuNSAyOS4yMzcgMjIuNSBMIDI5LjAzNyAyMy41IEMgMjguOTM3IDIzLjkgMjkuMjM3IDI0LjMgMjkuNjM3IDI0LjMgTCAzMy4wMzcgMjQuMyBDIDMzLjUzNyAyNC4zIDM0LjAzNyAyMy45IDM0LjEzNyAyMy40IEwgMzYuMTM3IDEwLjYgQyAzNi4yMzcgMTAuNCAzNS44MzcgMTAgMzUuNDM3IDEwIFogTSAzMC4zMzcgMTcuMiBDIDI5LjkzNyAxOS4zIDI4LjMzNyAyMC44IDI2LjEzNyAyMC44IEMgMjUuMDM3IDIwLjggMjQuMjM3IDIwLjUgMjMuNjM3IDE5LjggQyAyMy4wMzcgMTkuMSAyMi44MzcgMTguMiAyMy4wMzcgMTcuMiBDIDIzLjMzNyAxNS4xIDI1LjEzNyAxMy42IDI3LjIzNyAxMy42IEMgMjguMzM3IDEzLjYgMjkuMTM3IDE0IDI5LjczNyAxNC42IEMgMzAuMjM3IDE1LjMgMzAuNDM3IDE2LjIgMzAuMzM3IDE3LjIgWiI+PC9wYXRoPjxwYXRoIGZpbGw9IiMwMDMwODciIGQ9Ik0gNTUuMzM3IDEwIEwgNTEuNjM3IDEwIEMgNTEuMjM3IDEwIDUwLjkzNyAxMC4yIDUwLjczNyAxMC41IEwgNDUuNTM3IDE4LjEgTCA0My4zMzcgMTAuOCBDIDQzLjIzNyAxMC4zIDQyLjczNyAxMCA0Mi4zMzcgMTAgTCAzOC42MzcgMTAgQyAzOC4yMzcgMTAgMzcuODM3IDEwLjQgMzguMDM3IDEwLjkgTCA0Mi4xMzcgMjMgTCAzOC4yMzcgMjguNCBDIDM3LjkzNyAyOC44IDM4LjIzNyAyOS40IDM4LjczNyAyOS40IEwgNDIuNDM3IDI5LjQgQyA0Mi44MzcgMjkuNCA0My4xMzcgMjkuMiA0My4zMzcgMjguOSBMIDU1LjgzNyAxMC45IEMgNTYuMTM3IDEwLjYgNTUuODM3IDEwIDU1LjMzNyAxMCBaIj48L3BhdGg+PHBhdGggZmlsbD0iIzAwOWNkZSIgZD0iTSA2Ny43MzcgMi44IEwgNTkuOTM3IDIuOCBDIDU5LjQzNyAyLjggNTguOTM3IDMuMiA1OC44MzcgMy43IEwgNTUuNzM3IDIzLjYgQyA1NS42MzcgMjQgNTUuOTM3IDI0LjMgNTYuMzM3IDI0LjMgTCA2MC4zMzcgMjQuMyBDIDYwLjczNyAyNC4zIDYxLjAzNyAyNCA2MS4wMzcgMjMuNyBMIDYxLjkzNyAxOCBDIDYyLjAzNyAxNy41IDYyLjQzNyAxNy4xIDYzLjAzNyAxNy4xIEwgNjUuNTM3IDE3LjEgQyA3MC42MzcgMTcuMSA3My42MzcgMTQuNiA3NC40MzcgOS43IEMgNzQuNzM3IDcuNiA3NC40MzcgNS45IDczLjQzNyA0LjcgQyA3Mi4yMzcgMy41IDcwLjMzNyAyLjggNjcuNzM3IDIuOCBaIE0gNjguNjM3IDEwLjEgQyA2OC4yMzcgMTIuOSA2Ni4wMzcgMTIuOSA2NC4wMzcgMTIuOSBMIDYyLjgzNyAxMi45IEwgNjMuNjM3IDcuNyBDIDYzLjYzNyA3LjQgNjMuOTM3IDcuMiA2NC4yMzcgNy4yIEwgNjQuNzM3IDcuMiBDIDY2LjEzNyA3LjIgNjcuNDM3IDcuMiA2OC4xMzcgOCBDIDY4LjYzNyA4LjQgNjguNzM3IDkuMSA2OC42MzcgMTAuMSBaIj48L3BhdGg+PHBhdGggZmlsbD0iIzAwOWNkZSIgZD0iTSA5MC45MzcgMTAgTCA4Ny4yMzcgMTAgQyA4Ni45MzcgMTAgODYuNjM3IDEwLjIgODYuNjM3IDEwLjUgTCA4Ni40MzcgMTEuNSBMIDg2LjEzNyAxMS4xIEMgODUuMzM3IDkuOSA4My41MzcgOS41IDgxLjczNyA5LjUgQyA3Ny42MzcgOS41IDc0LjEzNyAxMi42IDczLjQzNyAxNyBDIDczLjAzNyAxOS4yIDczLjUzNyAyMS4zIDc0LjgzNyAyMi43IEMgNzUuOTM3IDI0IDc3LjYzNyAyNC42IDc5LjUzNyAyNC42IEMgODIuODM3IDI0LjYgODQuNzM3IDIyLjUgODQuNzM3IDIyLjUgTCA4NC41MzcgMjMuNSBDIDg0LjQzNyAyMy45IDg0LjczNyAyNC4zIDg1LjEzNyAyNC4zIEwgODguNTM3IDI0LjMgQyA4OS4wMzcgMjQuMyA4OS41MzcgMjMuOSA4OS42MzcgMjMuNCBMIDkxLjYzNyAxMC42IEMgOTEuNjM3IDEwLjQgOTEuMzM3IDEwIDkwLjkzNyAxMCBaIE0gODUuNzM3IDE3LjIgQyA4NS4zMzcgMTkuMyA4My43MzcgMjAuOCA4MS41MzcgMjAuOCBDIDgwLjQzNyAyMC44IDc5LjYzNyAyMC41IDc5LjAzNyAxOS44IEMgNzguNDM3IDE5LjEgNzguMjM3IDE4LjIgNzguNDM3IDE3LjIgQyA3OC43MzcgMTUuMSA4MC41MzcgMTMuNiA4Mi42MzcgMTMuNiBDIDgzLjczNyAxMy42IDg0LjUzNyAxNCA4NS4xMzcgMTQuNiBDIDg1LjczNyAxNS4zIDg1LjkzNyAxNi4yIDg1LjczNyAxNy4yIFoiPjwvcGF0aD48cGF0aCBmaWxsPSIjMDA5Y2RlIiBkPSJNIDk1LjMzNyAzLjMgTCA5Mi4xMzcgMjMuNiBDIDkyLjAzNyAyNCA5Mi4zMzcgMjQuMyA5Mi43MzcgMjQuMyBMIDk1LjkzNyAyNC4zIEMgOTYuNDM3IDI0LjMgOTYuOTM3IDIzLjkgOTcuMDM3IDIzLjQgTCAxMDAuMjM3IDMuNSBDIDEwMC4zMzcgMy4xIDEwMC4wMzcgMi44IDk5LjYzNyAyLjggTCA5Ni4wMzcgMi44IEMgOTUuNjM3IDIuOCA5NS40MzcgMyA5NS4zMzcgMy4zIFoiPjwvcGF0aD48L3N2Zz4",
2577
+ role: "presentation",
2578
+ class: "h-[22px]"
2579
+ }, Nt = /* @__PURE__ */ pe({
2580
+ __name: "ExpressPaymentMethodButton",
2581
+ props: {
2582
+ type: { type: String }
2583
+ },
2584
+ emits: ["click"],
2585
+ setup(e, { emit: o }) {
2586
+ const i = e, s = o, n = u(() => {
2587
+ switch (i.type) {
2588
+ case "applepay":
2589
+ return "Apple Pay";
2590
+ case "googlepay":
2591
+ return "Google Pay";
2592
+ case "paypal":
2593
+ return "PayPal";
2594
+ default:
2595
+ return;
2596
+ }
2597
+ }), c = u(() => {
2598
+ switch (i.type) {
2599
+ case "applepay":
2600
+ return "!bg-black !py-0";
2601
+ case "googlepay":
2602
+ return "!bg-black bg-[url(https://www.gstatic.com/instantbuy/svg/dark_gpay.svg)] bg-[length:auto_42.5%]";
2603
+ case "paypal":
2604
+ return "!bg-[#ffc439]";
2605
+ default:
2606
+ return;
2607
+ }
2608
+ });
2609
+ function g() {
2610
+ s("click");
2611
+ }
2612
+ return (y, D) => (p(), w(t(xe), {
2613
+ size: "lg",
2614
+ "aria-label": n.value,
2615
+ class: ke([c.value, "!block h-11 w-full bg-center bg-no-repeat"]),
2616
+ onClick: g
2617
+ }, {
2618
+ default: M(() => [
2619
+ i.type === "applepay" ? (p(), x("svg", xa, [...D[0] || (D[0] = [
2620
+ k("svg", {
2621
+ id: "svg-logo",
2622
+ x: "0",
2623
+ y: "3.85",
2624
+ height: "7.3",
2625
+ width: "35",
2626
+ class: "logo",
2627
+ viewBox: "0 0 105 43",
2628
+ version: "1.1",
2629
+ xmlns: "http://www.w3.org/2000/svg"
2630
+ }, [
2631
+ k("title", null, "Apple Logo"),
2632
+ k("g", {
2633
+ stroke: "none",
2634
+ "stroke-width": "1",
2635
+ fill: "none",
2636
+ "fill-rule": "evenodd"
2637
+ }, [
2638
+ k("g", { fill: "#FFF" }, [
2639
+ k("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" }),
2640
+ k("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" }),
2641
+ k("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" }),
2642
+ k("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" }),
2643
+ k("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" })
2644
+ ])
2645
+ ])
2646
+ ], -1)
2647
+ ])])) : i.type === "paypal" ? (p(), x("img", Ra)) : z("", !0)
2648
+ ]),
2649
+ _: 1
2650
+ }, 8, ["aria-label", "class"]));
2651
+ }
2652
+ }), za = { class: "absolute h-[1px] w-[1px] overflow-hidden opacity-0" }, ja = "ADYEN", Ua = /* @__PURE__ */ pe({
2653
+ __name: "ExpressPaymentMethodApplePay",
2654
+ props: {
2655
+ onBillingInformationChange: { type: Function },
2656
+ context: { type: Object },
2657
+ validateOnSubmit: { type: Function },
2658
+ amount: { type: Object },
2659
+ countryCode: { type: String },
2660
+ locale: { type: String },
2661
+ isVisible: { type: Boolean },
2662
+ paymentMethodOptionsResponse: { type: Object },
2663
+ billingInformation: { type: Object }
2664
+ },
2665
+ emits: ["ready", "unavailable", "update-billing-information", "payment-success", "payment-failed"],
2666
+ setup(e, { emit: o }) {
2667
+ const i = e, s = o, n = Y();
2668
+ let c, g = 0;
2669
+ const y = Se(), { authorizePayment: D } = ti(), a = i.paymentMethodOptionsResponse.payment_acceptor.id;
2670
+ function E(r) {
2671
+ return ni({
2672
+ gateway: "ADYEN",
2673
+ paymentAcceptorId: a,
2674
+ paymentMethodType: "applepay",
2675
+ ...r
2676
+ });
2677
+ }
2678
+ const T = (r) => {
2679
+ var L;
2680
+ return r.status === "SUCCESS" && ((L = r.payment) == null ? void 0 : L.result) === "AUTHORIZED";
2681
+ }, O = () => Object.assign(new Error("Apple Pay payment could not be confirmed"), {
2682
+ code: "PAYMENT_OUTCOME_UNCONFIRMED"
2683
+ }), C = async (r, L) => {
2684
+ var f;
2685
+ const l = (m) => {
2686
+ L.reject(), s("payment-failed", m);
2687
+ };
2688
+ try {
2689
+ const m = await D({
2690
+ payment_acceptor_id: a,
2691
+ payment_gateway_variant: ja,
2692
+ adyen: {
2693
+ payment_method: pn(r.data.paymentMethod),
2694
+ ...r.data.riskData && {
2695
+ risk_data: pn(r.data.riskData)
2696
+ },
2697
+ store_payment_method: !0
2698
+ // Required for recurring payments
2699
+ },
2700
+ amount: i.amount,
2701
+ ...i.context ? { context: i.context } : {},
2702
+ return_url: Bo({ paymentAcceptorId: a, redirectUrl: window.location.href })
2703
+ });
2704
+ if (T(m)) {
2705
+ L.resolve({ resultCode: "Authorised" }), s("payment-success");
2706
+ return;
2707
+ }
2708
+ if (oi(m) === "UNCONFIRMED") {
2709
+ y.warn(
2710
+ "PAYMENT_OUTCOME_UNCONFIRMED",
2711
+ "The payment outcome could not be confirmed yet",
2712
+ E({
2713
+ reason: "PAYMENT_PENDING",
2714
+ extra: {
2715
+ paymentStatus: m.status,
2716
+ paymentResult: (f = m.payment) == null ? void 0 : f.result
2717
+ }
2718
+ })
2719
+ ), l(O());
2720
+ return;
2721
+ }
2722
+ y.error(
2723
+ "APPLE_PAY_AUTHORIZATION_FAILED",
2724
+ "Payment authorization failed",
2725
+ E({
2726
+ reason: "APPLE_PAY_AUTHORIZATION_REJECTED",
2727
+ extra: { paymentStatus: m.status }
2728
+ })
2729
+ ), l(new Error(`Apple Pay payment was not authorized (${m.status})`));
2730
+ } catch (m) {
2731
+ if (y.error(
2732
+ "APPLE_PAY_AUTHORIZATION_FAILED",
2733
+ "Apple Pay authorization failed",
2734
+ E({ reason: "APPLE_PAY_AUTHORIZATION_FAILED", cause: m }),
2735
+ m
2736
+ ), ii(m)) {
2737
+ l(O());
2738
+ return;
2739
+ }
2740
+ l(m instanceof Error ? m : new Error("Apple Pay authorization failed"));
2741
+ }
2742
+ }, G = async () => {
2743
+ const r = g, { ApplePay: L } = await ut(), l = await Tn(i, y, {
2744
+ onSubmit: ($, h, d) => void C($, d)
2745
+ }), f = i.billingInformation.regular ? {
2746
+ paymentDescription: i.billingInformation.description,
2747
+ billingAgreement: i.billingInformation.agreement,
2748
+ managementURL: i.billingInformation.managementURL,
2749
+ ...i.billingInformation.trial && {
2750
+ trialBilling: {
2751
+ label: i.billingInformation.trial.label,
2752
+ amount: i.billingInformation.trial.amount.quantity.toString(),
2753
+ type: "final",
2754
+ paymentTiming: "recurring",
2755
+ recurringPaymentStartDate: i.billingInformation.trial.startDate,
2756
+ recurringPaymentEndDate: i.billingInformation.trial.endDate
2757
+ }
2758
+ },
2759
+ regularBilling: {
2760
+ label: i.billingInformation.regular.label,
2761
+ amount: i.billingInformation.regular.amount.quantity.toString(),
2762
+ type: "final",
2763
+ paymentTiming: "recurring",
2764
+ recurringPaymentStartDate: i.billingInformation.regular.startDate,
2765
+ ..._(
2766
+ i.billingInformation.regular.interval ?? { type: "MONTH", value: 1 }
2767
+ )
2768
+ }
2769
+ } : void 0, m = new L(l, {
2770
+ isExpress: !0,
2771
+ ...f && { recurringPaymentRequest: f },
2772
+ requiredBillingContactFields: ["postalAddress"],
2773
+ requiredShippingContactFields: ["email"],
2774
+ onPaymentMethodSelected: async ($, h, d) => {
2775
+ var Z, le, W, ne, de, ge, b, P;
2776
+ const { invoicePreview: S, trialInvoicePreview: K } = await i.onBillingInformationChange({
2777
+ ...((Z = d.paymentMethod.billingContact) == null ? void 0 : Z.postalCode) && {
2778
+ postalCode: d.paymentMethod.billingContact.postalCode
2779
+ },
2780
+ ...((le = d.paymentMethod.billingContact) == null ? void 0 : le.locality) && {
2781
+ city: d.paymentMethod.billingContact.locality
2782
+ },
2783
+ ...oe((W = d.paymentMethod.billingContact) == null ? void 0 : W.countryCode) && {
2784
+ country: oe((ne = d.paymentMethod.billingContact) == null ? void 0 : ne.countryCode)
2785
+ }
2786
+ }), q = K ? K.invoice_amount_including_tax.quantity.toString() : S.invoice_amount_including_tax.quantity.toString();
2787
+ s("update-billing-information", {
2788
+ postal_code: (de = d.paymentMethod.billingContact) == null ? void 0 : de.postalCode,
2789
+ city: (ge = d.paymentMethod.billingContact) == null ? void 0 : ge.locality,
2790
+ country: (b = d.paymentMethod.billingContact) == null ? void 0 : b.countryCode
2791
+ }), $({
2792
+ newTotal: {
2793
+ label: ((P = i.billingInformation.regular) == null ? void 0 : P.label) ?? i.billingInformation.description,
2794
+ amount: q,
2795
+ type: "final"
2796
+ }
2797
+ });
2798
+ },
2799
+ onError: ($) => {
2800
+ y.error(
2801
+ "APPLE_PAY_ERROR",
2802
+ "Apple Pay error",
2803
+ E({ reason: "APPLE_PAY_ERROR", cause: $ }),
2804
+ $
2805
+ );
2806
+ },
2807
+ /**
2808
+ * Resolving here is what starts Adyen's payment flow, which calls `onSubmit` above. The
2809
+ * charge is not made from this callback — the form is checked here instead, because a
2810
+ * rejection shows the customer an error in the sheet rather than taking their money for a
2811
+ * subscription the checkout cannot create.
2812
+ */
2813
+ onAuthorized: async ($, h) => {
2814
+ var d, S, K, q;
2815
+ try {
2816
+ const Z = (d = $.authorizedEvent.payment) == null ? void 0 : d.billingContact, le = Z ? I(Z) : $.billingAddress ? V($.billingAddress) : void 0, W = (K = (S = $.authorizedEvent.payment) == null ? void 0 : S.shippingContact) == null ? void 0 : K.emailAddress;
2817
+ if ((le || W) && (s("update-billing-information", { ...le, ...W && { email: W } }), await Ve()), !(await ((q = i.validateOnSubmit) == null ? void 0 : q.call(i)) ?? !0)) {
2818
+ y.warn(
2819
+ "APPLE_PAY_FORM_INCOMPLETE",
2820
+ "Apple Pay authorization stopped: the checkout form is incomplete",
2821
+ E({ reason: "APPLE_PAY_FORM_INVALID" })
2822
+ ), h.reject(), s("payment-failed", new Error("The checkout form is incomplete"));
2823
+ return;
2824
+ }
2825
+ h.resolve();
2826
+ } catch (Z) {
2827
+ y.error(
2828
+ "APPLE_PAY_AUTHORIZATION_FAILED",
2829
+ "Apple Pay authorization failed",
2830
+ E({ reason: "APPLE_PAY_AUTHORIZATION_FAILED", cause: Z }),
2831
+ Z
2832
+ ), h.reject(), s(
2833
+ "payment-failed",
2834
+ Z instanceof Error ? Z : new Error("Apple Pay authorization failed")
2835
+ );
2836
+ }
2837
+ }
2838
+ });
2839
+ if (!n.value) {
2840
+ y.error("APPLE_PAY_ERROR", "Apple Pay button ref not found");
2841
+ return;
2842
+ }
2843
+ try {
2844
+ if (await m.isAvailable(), r !== g)
2845
+ return;
2846
+ m.mount(n.value), c = m, s("ready");
2847
+ } catch ($) {
2848
+ y.error("APPLE_PAY_ERROR", "Apple Pay not available on this device", {}, $), r === g && s("unavailable");
2849
+ }
2850
+ }, N = () => {
2851
+ g += 1, c == null || c.unmount(), c = void 0;
2852
+ }, _ = (r) => {
2853
+ if (!r.value)
2854
+ return;
2855
+ let L = r.value ?? 1, l = r.type.toLowerCase();
2856
+ if (r.type === "WEEK" && (l = "day", L = r.value * 7), l === "day" || l === "month" || l === "year" || l === "hour" || l === "minute")
2857
+ return {
2858
+ recurringPaymentIntervalUnit: l,
2859
+ recurringPaymentIntervalCount: L
2860
+ };
2861
+ }, I = (r) => {
2862
+ var L, l;
2863
+ return {
2864
+ ...((L = r.addressLines) == null ? void 0 : L[0]) && { line1: r.addressLines[0] },
2865
+ ...((l = r.addressLines) == null ? void 0 : l[1]) && { line2: r.addressLines[1] },
2866
+ ...r.administrativeArea && { state: r.administrativeArea },
2867
+ postal_code: r.postalCode,
2868
+ city: r.locality,
2869
+ country: r.countryCode
2870
+ };
2871
+ }, V = (r) => ({
2872
+ ...r.street && { line1: r.street },
2873
+ ...r.houseNumberOrName && { line2: r.houseNumberOrName },
2874
+ ...r.stateOrProvince && { state: r.stateOrProvince },
2875
+ postal_code: r.postalCode,
2876
+ city: r.city,
2877
+ country: r.country
2878
+ }), oe = (r) => r && X(r) ? r : void 0, X = (r) => Ge(r), ie = () => {
2879
+ var L;
2880
+ const r = (L = n.value) == null ? void 0 : L.querySelector("apple-pay-button");
2881
+ if (r) {
2882
+ const l = new MouseEvent("click", {
2883
+ bubbles: !0,
2884
+ cancelable: !0,
2885
+ view: window
2886
+ });
2887
+ r.dispatchEvent(l);
2888
+ }
2889
+ }, se = async () => {
2890
+ try {
2891
+ await G();
2892
+ } catch (r) {
2893
+ y.error(
2894
+ "APPLE_PAY_ERROR",
2895
+ "Apple Pay could not be set up",
2896
+ E({ reason: "APPLE_PAY_SETUP_FAILED", cause: r }),
2897
+ r
2898
+ );
2899
+ }
2900
+ };
2901
+ return qe(() => {
2902
+ se();
2903
+ }), he(
2904
+ // By value: `amount` is rebuilt by every invoice preview, and `onPaymentMethodSelected` asks
2905
+ // for one as the sheet opens — comparing objects would tear down the live session.
2906
+ () => [i.amount.quantity, i.amount.currency, i.billingInformation.agreement].join(
2907
+ "|"
2908
+ ),
2909
+ () => {
2910
+ N(), se();
2911
+ }
2912
+ ), Qn(N), (r, L) => (p(), x(ye, null, [
2913
+ e.isVisible ? (p(), w(Nt, {
2914
+ key: 0,
2915
+ type: "applepay",
2916
+ onClick: ie
2917
+ })) : z("", !0),
2918
+ k("div", za, [
2919
+ k("div", {
2920
+ ref_key: "applePayButtonRef",
2921
+ ref: n
2922
+ }, null, 512)
2923
+ ])
2924
+ ], 64));
2925
+ }
2926
+ }), Ba = { class: "relative overflow-hidden" }, Fa = /* @__PURE__ */ pe({
2927
+ __name: "ExpressPaymentMethodPaypal",
2928
+ props: {
2929
+ amount: { type: Object },
2930
+ countryCode: { type: String },
2931
+ locale: { type: String },
2932
+ isVisible: { type: Boolean },
2933
+ paymentMethodOptionsResponse: { type: Object },
2934
+ billingInformation: { type: Object }
2935
+ },
2936
+ emits: ["ready", "unavailable", "update-billing-information", "payment-success", "payment-failed"],
2937
+ setup(e, { emit: o }) {
2938
+ const i = e, s = o, n = Se(), { buttonRef: c } = On({
2939
+ props: i,
2940
+ onMissingButton: () => n.error(
2941
+ "EXPRESS_CHECKOUT_PAYPAL_ERROR",
2942
+ "The PayPal button reference is not found and cannot be mounted"
2943
+ ),
2944
+ onMountFailed: (g) => n.error("EXPRESS_CHECKOUT_PAYPAL_ERROR", "Failed mounting PayPal express button", {
2945
+ error: g
2946
+ }),
2947
+ create: async (g) => {
2948
+ const { PayPal: y } = await ut();
2949
+ return new y(g, {
2950
+ isExpress: !0,
2951
+ blockPayPalPayLaterButton: !0,
2952
+ blockPayPalCreditButton: !0,
2953
+ blockPayPalVenmoButton: !0,
2954
+ style: {
2955
+ height: 55
2956
+ },
2957
+ onInit: () => {
2958
+ s("ready");
2959
+ }
2960
+ });
2961
+ }
2962
+ });
2963
+ return (g, y) => (p(), x("div", Ba, [
2964
+ e.isVisible ? (p(), w(Nt, {
2965
+ key: 0,
2966
+ type: "paypal",
2967
+ class: "w-full"
2968
+ })) : z("", !0),
2969
+ k("div", {
2970
+ ref_key: "paypalButtonRef",
2971
+ ref: c,
2972
+ class: "absolute inset-0 opacity-[0.0001]"
2973
+ }, null, 512)
2974
+ ]));
2975
+ }
2976
+ }), Va = { class: "absolute h-[1px] w-[1px] overflow-hidden opacity-0" }, $a = /* @__PURE__ */ pe({
2977
+ __name: "ExpressPaymentMethodGooglePay",
2978
+ props: {
2979
+ amount: { type: Object },
2980
+ countryCode: { type: String },
2981
+ locale: { type: String },
2982
+ isVisible: { type: Boolean },
2983
+ paymentMethodOptionsResponse: { type: Object },
2984
+ billingInformation: { type: Object }
2985
+ },
2986
+ emits: ["ready", "unavailable", "update-billing-information", "payment-success", "payment-failed"],
2987
+ setup(e, { emit: o }) {
2988
+ const i = e, s = o, n = Se(), { buttonRef: c } = On({
2989
+ props: i,
2990
+ onMissingButton: () => n.error(
2991
+ "EXPRESS_CHECKOUT_GOOGLE_PAY_ERROR",
2992
+ "The Google Pay button reference is not found and cannot be mounted"
2993
+ ),
2994
+ onMountFailed: (y) => n.error(
2995
+ "EXPRESS_CHECKOUT_GOOGLE_PAY_ERROR",
2996
+ "Failed mounting Google Pay express button",
2997
+ {},
2998
+ y
2999
+ ),
3000
+ create: async (y) => {
3001
+ const { GooglePay: D } = await ut();
3002
+ return new D(y, { isExpress: !0 });
3003
+ },
3004
+ afterMount: () => s("ready")
3005
+ }), g = () => {
3006
+ var D;
3007
+ const y = (D = c.value) == null ? void 0 : D.querySelector("#gpay-button-online-api-id");
3008
+ if (y) {
3009
+ const a = new MouseEvent("click", {
3010
+ bubbles: !0,
3011
+ cancelable: !0,
3012
+ view: window
3013
+ });
3014
+ y.dispatchEvent(a);
3015
+ }
3016
+ };
3017
+ return (y, D) => (p(), x(ye, null, [
3018
+ e.isVisible ? (p(), w(Nt, {
3019
+ key: 0,
3020
+ type: "googlepay",
3021
+ onClick: g
3022
+ })) : z("", !0),
3023
+ k("div", Va, [
3024
+ k("div", {
3025
+ ref_key: "googlePayButtonRef",
3026
+ ref: c
3027
+ }, null, 512)
3028
+ ])
3029
+ ], 64));
3030
+ }
3031
+ }), Ga = {
3032
+ key: 0,
3033
+ class: "mt-4n"
3034
+ }, Ya = { class: "mb-2" }, Ka = { class: "grid grid-cols-6 gap-1 md:gap-2" }, Ha = { class: "mt-4 h-4" }, Qa = 2, Za = /* @__PURE__ */ pe({
3035
+ __name: "ExpressPaymentMethods",
3036
+ props: {
3037
+ amount: { type: Object },
3038
+ countryCode: { type: String },
3039
+ locale: { type: String },
3040
+ paymentMethodsOptionsResponse: { type: null },
3041
+ billingInformation: { type: Object },
3042
+ onBillingInformationChange: { type: Function },
3043
+ context: { type: Object },
3044
+ validateOnSubmit: { type: Function }
3045
+ },
3046
+ emits: ["update-billing-information", "payment-success", "payment-failed"],
3047
+ setup(e) {
3048
+ const o = ["applepay"], i = e, { $t: s } = Pe(), n = Y(!1), c = Y(!1), g = Y(!1), y = Y(!1), D = u(() => {
3049
+ var N;
3050
+ if (o.includes("applepay"))
3051
+ return (N = i.paymentMethodsOptionsResponse) == null ? void 0 : N.find(
3052
+ (_) => {
3053
+ var I;
3054
+ return (I = _.options) == null ? void 0 : I.some(
3055
+ (V) => V.name.toLowerCase() === "apple pay" && V.payment_gateway_variant === "ADYEN"
3056
+ );
3057
+ }
3058
+ );
3059
+ }), a = u(() => c.value ? void 0 : D.value), E = u(() => {
3060
+ var N;
3061
+ if (o.includes("paypal"))
3062
+ return (N = i.paymentMethodsOptionsResponse) == null ? void 0 : N.find(
3063
+ (_) => {
3064
+ var I;
3065
+ return (I = _.options) == null ? void 0 : I.some(
3066
+ (V) => V.name.toLowerCase() === "paypal" && V.payment_gateway_variant === "ADYEN"
3067
+ );
3068
+ }
3069
+ );
3070
+ }), T = u(() => {
3071
+ var N;
3072
+ if (o.includes("googlepay"))
3073
+ return (N = i.paymentMethodsOptionsResponse) == null ? void 0 : N.find(
3074
+ (_) => {
3075
+ var I;
3076
+ return (I = _.options) == null ? void 0 : I.some(
3077
+ (V) => V.name.toLowerCase() === "google pay" && V.payment_gateway_variant === "ADYEN"
3078
+ );
3079
+ }
3080
+ );
3081
+ }), O = u(() => !!(a.value || T.value || E.value)), C = u(() => {
3082
+ var V;
3083
+ if (((V = i.paymentMethodsOptionsResponse) == null ? void 0 : V.length) === 0)
3084
+ return !1;
3085
+ const N = !a.value || n.value, _ = !T.value || g.value, I = !E.value || y.value;
3086
+ return N && _ && I;
3087
+ }), G = u(() => C.value ? (a.value ? 1 : 0) + (T.value ? 1 : 0) + (E.value ? 1 : 0) : Qa);
3088
+ return (N, _) => O.value ? (p(), x("div", Ga, [
3089
+ k("div", Ya, [
3090
+ C.value ? (p(), w(t(ce), {
3091
+ key: 1,
3092
+ variant: "heading-3",
3093
+ tag: "h2"
3094
+ }, {
3095
+ default: M(() => [
3096
+ F(j(t(s)({
3097
+ defaultMessage: "Subscribe instantly with",
3098
+ id: "checkout.express_payment_methods.title",
3099
+ description: "The title of the express payment methods block in the checkout form"
3100
+ })), 1)
3101
+ ]),
3102
+ _: 1
3103
+ })) : (p(), w(Le, {
3104
+ key: 0,
3105
+ variant: "title"
3106
+ }))
3107
+ ]),
3108
+ k("div", Ka, [
3109
+ C.value ? z("", !0) : (p(), x(ye, { key: 0 }, [
3110
+ A(Le, { class: "col-span-3 h-11" }),
3111
+ A(Le, { class: "col-span-3 h-11" })
3112
+ ], 64)),
3113
+ k("div", {
3114
+ class: ke(["col-span-3 md:col-span-2", {
3115
+ hidden: !a.value,
3116
+ "!col-span-6": G.value === 1,
3117
+ "md:!col-span-3": G.value === 2,
3118
+ "!col-span-6 md:!col-span-2": G.value === 3
3119
+ }])
3120
+ }, [
3121
+ a.value ? (p(), w(Ua, {
3122
+ key: 0,
3123
+ amount: e.amount,
3124
+ "billing-information": e.billingInformation,
3125
+ "country-code": e.countryCode,
3126
+ locale: e.locale,
3127
+ "is-visible": C.value,
3128
+ "payment-method-options-response": a.value,
3129
+ "on-billing-information-change": e.onBillingInformationChange,
3130
+ context: e.context,
3131
+ "validate-on-submit": e.validateOnSubmit,
3132
+ onReady: _[0] || (_[0] = (I) => n.value = !0),
3133
+ onUnavailable: _[1] || (_[1] = (I) => c.value = !0),
3134
+ onUpdateBillingInformation: _[2] || (_[2] = (I) => N.$emit("update-billing-information", I)),
3135
+ onPaymentSuccess: _[3] || (_[3] = (I) => N.$emit("payment-success")),
3136
+ onPaymentFailed: _[4] || (_[4] = (I) => N.$emit("payment-failed", I))
3137
+ }, null, 8, ["amount", "billing-information", "country-code", "locale", "is-visible", "payment-method-options-response", "on-billing-information-change", "context", "validate-on-submit"])) : z("", !0)
3138
+ ], 2),
3139
+ k("div", {
3140
+ class: ke(["col-span-3 md:col-span-2", {
3141
+ hidden: !T.value,
3142
+ "col-span-6 md:col-span-6": G.value === 1,
3143
+ "md:!col-span-3": G.value === 2
3144
+ }])
3145
+ }, [
3146
+ T.value ? (p(), w($a, {
3147
+ key: 0,
3148
+ amount: e.amount,
3149
+ "billing-information": e.billingInformation,
3150
+ "country-code": e.countryCode,
3151
+ locale: e.locale,
3152
+ "is-visible": C.value,
3153
+ "payment-method-options-response": T.value,
3154
+ onReady: _[5] || (_[5] = (I) => g.value = !0)
3155
+ }, null, 8, ["amount", "billing-information", "country-code", "locale", "is-visible", "payment-method-options-response"])) : z("", !0)
3156
+ ], 2),
3157
+ k("div", {
3158
+ class: ke(["col-span-3 md:col-span-2", {
3159
+ hidden: !E.value,
3160
+ "col-span-6 md:col-span-6": G.value === 1,
3161
+ "md:!col-span-3": G.value === 2
3162
+ }])
3163
+ }, [
3164
+ E.value ? (p(), w(Fa, {
3165
+ key: 0,
3166
+ amount: e.amount,
3167
+ "billing-information": e.billingInformation,
3168
+ "country-code": e.countryCode,
3169
+ locale: e.locale,
3170
+ "is-visible": C.value,
3171
+ "payment-method-options-response": E.value,
3172
+ onReady: _[6] || (_[6] = (I) => y.value = !0)
3173
+ }, null, 8, ["amount", "billing-information", "country-code", "locale", "is-visible", "payment-method-options-response"])) : z("", !0)
3174
+ ], 2)
3175
+ ]),
3176
+ k("div", Ha, [
3177
+ C.value ? (p(), w(t(ei), {
3178
+ key: 1,
3179
+ text: t(s)({
3180
+ defaultMessage: "Or",
3181
+ id: "checkout.express_payment_methods.divider_text",
3182
+ description: "The text of the divider text in the express payment methods block in the checkout form"
3183
+ }),
3184
+ "text-position": "center"
3185
+ }, null, 8, ["text"])) : (p(), w(Le, {
3186
+ key: 0,
3187
+ variant: "divider-text"
3188
+ }))
3189
+ ])
3190
+ ])) : z("", !0);
3191
+ }
3192
+ }), qa = ["aria-expanded", "aria-label"], Xa = { class: "flex w-full cursor-pointer flex-row items-center justify-between gap-3 px-3 py-2" }, Wa = { class: "flex flex-row items-center gap-2" }, Ja = ["onKeydown"], es = ["aria-label"], ts = { class: "flex w-full cursor-pointer flex-row items-center justify-between gap-3 px-3 py-2" }, ns = { class: "flex flex-row items-center gap-2" }, os = {
3193
+ class: "sr-only",
3194
+ "aria-live": "polite"
3195
+ }, is = /* @__PURE__ */ pe({
3196
+ inheritAttrs: !1,
3197
+ __name: "PromotionCodeSection",
3198
+ props: {
3199
+ promotionCode: { default: null, type: [String, null] },
3200
+ isPending: { type: Boolean, default: !1 }
3201
+ },
3202
+ emits: ["update:appliedCode", "apply", "remove"],
3203
+ setup(e, { emit: o }) {
3204
+ const { $t: i } = Pe(), s = e, n = o, c = Y(!1), g = Y(""), y = Y(""), D = Y(!1), a = Y(null), E = Y(null), T = Ko("promotion-code-"), O = `${T}-label`, C = `${T}-panel`, G = u({
3205
+ get: () => g.value,
3206
+ set: (m) => g.value = co(m)
3207
+ }), N = u(() => s.promotionCode !== null && s.promotionCode !== ""), _ = u(() => g.value.trim().length > 0), I = u(
3208
+ () => s.promotionCode ?? i({
3209
+ defaultMessage: "Promotion applied",
3210
+ id: "checkout.promotion_code.applied_label",
3211
+ description: "Fallback label for an applied promotion code in checkout"
3212
+ })
3213
+ ), V = u(
3214
+ () => c.value ? i({
3215
+ defaultMessage: "Collapse promotion code input",
3216
+ id: "checkout.promotion_code.collapse_aria_label",
3217
+ description: "Aria label for the promotion code toggle button in checkout, while the input is open"
3218
+ }) : i({
3219
+ defaultMessage: "Expand promotion code input",
3220
+ id: "checkout.promotion_code.expand_aria_label",
3221
+ description: "Aria label for the promotion code toggle button in checkout, while the input is closed"
3222
+ })
3223
+ ), oe = u(
3224
+ () => i({
3225
+ defaultMessage: "Apply promotion code",
3226
+ id: "checkout.promotion_code.apply_aria_label",
3227
+ description: "Aria label for the promotion code apply button in checkout"
3228
+ })
3229
+ ), X = u(
3230
+ () => i({
3231
+ defaultMessage: "Remove promotion code",
3232
+ id: "checkout.promotion_code.remove_aria_label",
3233
+ description: "Aria label for the promotion code remove button in checkout"
3234
+ })
3235
+ ), ie = () => {
3236
+ g.value = "";
3237
+ }, se = () => {
3238
+ var $;
3239
+ const m = ($ = E.value) == null ? void 0 : $.querySelector("input");
3240
+ m instanceof HTMLInputElement && m.focus();
3241
+ }, r = () => {
3242
+ c.value && (c.value = !1);
3243
+ }, L = () => {
3244
+ N.value || (c.value = !c.value);
3245
+ }, l = () => {
3246
+ if (!_.value)
3247
+ return;
3248
+ const m = g.value.trim();
3249
+ y.value = "", D.value = !0, n("update:appliedCode", m), n("apply", m), c.value = !1;
3250
+ }, f = () => {
3251
+ D.value = !1, n("update:appliedCode", null), n("remove"), y.value = i({
3252
+ defaultMessage: "Promotion code removed",
3253
+ id: "checkout.promotion_code.removed_status",
3254
+ description: "Aria live message when a promotion code is removed in checkout"
3255
+ }), ie(), Ve(() => {
3256
+ var m;
3257
+ (m = a.value) == null || m.focus();
3258
+ });
3259
+ };
3260
+ return he(c, (m) => {
3261
+ if (!m) {
3262
+ ie(), Ve(() => {
3263
+ var $;
3264
+ ($ = a.value) == null || $.focus();
3265
+ });
3266
+ return;
3267
+ }
3268
+ Ve(() => {
3269
+ se();
3270
+ });
3271
+ }), he(
3272
+ () => s.promotionCode,
3273
+ (m) => {
3274
+ m || ie();
3275
+ }
3276
+ ), he(
3277
+ () => s.isPending,
3278
+ (m) => {
3279
+ m || !D.value || (D.value = !1, N.value && (y.value = i({
3280
+ defaultMessage: "Promotion code applied",
3281
+ id: "checkout.promotion_code.applied_status",
3282
+ description: "Aria live message when a promotion code is applied in checkout"
3283
+ })));
3284
+ }
3285
+ ), (m, $) => (p(), x(ye, null, [
3286
+ N.value ? (p(), w(t(Ae), Oe({ key: 1 }, m.$attrs, {
3287
+ "no-border": "",
3288
+ "no-spacing": "",
3289
+ "content-background": "none",
3290
+ class: "relative w-full"
3291
+ }), {
3292
+ default: M(() => [
3293
+ k("button", {
3294
+ type: "button",
3295
+ class: "w-full rounded border border-primary-900 bg-white",
3296
+ "aria-label": X.value,
3297
+ onClick: f
3298
+ }, [
3299
+ k("div", ts, [
3300
+ k("div", ns, [
3301
+ A(t(ot), { icon: "local_activity" }),
3302
+ A(t(ce), {
3303
+ variant: "body-sm",
3304
+ class: "font-semibold"
3305
+ }, {
3306
+ default: M(() => [
3307
+ F(j(I.value), 1)
3308
+ ]),
3309
+ _: 1
3310
+ })
3311
+ ]),
3312
+ A(t(ot), { icon: "close" })
3313
+ ])
3314
+ ], 8, es)
3315
+ ]),
3316
+ _: 1
3317
+ }, 16)) : (p(), w(t(Ae), Oe({ key: 0 }, m.$attrs, {
3318
+ "no-spacing": "",
3319
+ class: "relative w-full"
3320
+ }), {
3321
+ default: M(() => [
3322
+ k("button", {
3323
+ ref_key: "toggleRef",
3324
+ ref: a,
3325
+ type: "button",
3326
+ class: "w-full",
3327
+ "aria-expanded": c.value,
3328
+ "aria-controls": C,
3329
+ "aria-label": V.value,
3330
+ onClick: L
3331
+ }, [
3332
+ k("div", Xa, [
3333
+ k("div", Wa, [
3334
+ A(t(ot), { icon: "local_activity" }),
3335
+ A(t(ce), {
3336
+ id: O,
3337
+ variant: "body-sm"
3338
+ }, {
3339
+ default: M(() => [
3340
+ F(j(t(i)({
3341
+ defaultMessage: "Add promotion code",
3342
+ id: "checkout.promotion_code.add_label",
3343
+ description: "Label for adding a promotion code in checkout"
3344
+ })), 1)
3345
+ ]),
3346
+ _: 1
3347
+ })
3348
+ ]),
3349
+ A(t(ot), {
3350
+ icon: c.value ? "remove" : "add"
3351
+ }, null, 8, ["icon"])
3352
+ ])
3353
+ ], 8, qa),
3354
+ Zn(k("div", {
3355
+ id: C,
3356
+ ref_key: "panelRef",
3357
+ ref: E,
3358
+ role: "region",
3359
+ "aria-labelledby": O,
3360
+ class: "flex w-full flex-row items-center gap-2 overflow-hidden border-t px-3 py-2",
3361
+ onKeydown: Xt(lt(r, ["prevent"]), ["esc"])
3362
+ }, [
3363
+ A(t(Qe), {
3364
+ modelValue: G.value,
3365
+ "onUpdate:modelValue": $[0] || ($[0] = (h) => G.value = h),
3366
+ placeholder: t(i)({
3367
+ defaultMessage: "Promotion code",
3368
+ id: "checkout.promotion_code.placeholder",
3369
+ description: "Placeholder for promotion code input in checkout"
3370
+ }),
3371
+ "aria-label": t(i)({
3372
+ defaultMessage: "Promotion code",
3373
+ id: "checkout.promotion_code.input_aria_label",
3374
+ description: "Aria label for promotion code input in checkout"
3375
+ }),
3376
+ class: "w-full",
3377
+ onKeydown: Xt(lt(l, ["self", "prevent"]), ["enter"])
3378
+ }, null, 8, ["modelValue", "placeholder", "aria-label", "onKeydown"]),
3379
+ A(t(xe), {
3380
+ type: "button",
3381
+ disabled: !_.value,
3382
+ "aria-label": oe.value,
3383
+ "aria-disabled": !_.value,
3384
+ onClick: l
3385
+ }, {
3386
+ default: M(() => [
3387
+ F(j(t(i)({
3388
+ defaultMessage: "Apply",
3389
+ id: "checkout.promotion_code.apply_button",
3390
+ description: "Button label for applying a promotion code in checkout"
3391
+ })), 1)
3392
+ ]),
3393
+ _: 1
3394
+ }, 8, ["disabled", "aria-label", "aria-disabled"])
3395
+ ], 40, Ja), [
3396
+ [qn, c.value]
3397
+ ])
3398
+ ]),
3399
+ _: 1
3400
+ }, 16)),
3401
+ k("span", os, j(y.value), 1)
3402
+ ], 64));
3403
+ }
3404
+ }), as = { class: "sv-checkout__header" }, ss = { class: "sv-checkout__payment-methods" }, ls = {
3405
+ key: 0,
3406
+ class: "sv-checkout__payment-methods-body"
3407
+ }, rs = {
3408
+ key: 3,
3409
+ class: "sv-checkout__payment-form"
3410
+ }, us = { class: "sv-checkout__order-summary" }, cs = { class: "flex flex-col gap-4" }, ds = /* @__PURE__ */ pe({
3411
+ __name: "Checkout",
3412
+ props: {
3413
+ configuration: { type: Object }
3414
+ },
3415
+ emits: ["error", "ready"],
3416
+ setup(e, { emit: o }) {
3417
+ var zt, jt, Ut, Bt, Ft, Vt, $t, Gt, Yt, Kt, Ht, Qt, Zt;
3418
+ const i = Wt(
3419
+ () => import("./PaymentIntegrationForm-D3Ye7LZ5.mjs")
3420
+ ), s = Wt(
3421
+ () => import("./PlanCustomizationEditor-B76UNEMm.mjs")
3422
+ ), n = e, c = o, g = u(() => n.configuration), y = Y(), D = Se(), { $t: a, locale: E } = Pe(), { formatTimePeriod: T } = Mt(), O = Yo(), { isMobileViewport: C } = Dn();
3423
+ if (D.info("COMPONENT_INITIALIZED", "Checkout component initialized"), ((zt = O.value) == null ? void 0 : zt.type) !== "INIT_PRICING_PLAN_SUBSCRIPTION")
3424
+ throw new Wn("INVALID_TOKEN", "Invalid token");
3425
+ const G = (Ut = (jt = O.value) == null ? void 0 : jt.init_pricing_plan_subscription) == null ? void 0 : Ut.pricing_plan_subscription_id, N = (Ft = (Bt = O.value) == null ? void 0 : Bt.init_pricing_plan_subscription) == null ? void 0 : Ft.success_url, _ = ((Gt = ($t = (Vt = O.value) == null ? void 0 : Vt.init_pricing_plan_subscription) == null ? void 0 : $t.note) == null ? void 0 : Gt.trim()) || void 0, I = ((Kt = (Yt = O.value) == null ? void 0 : Yt.init_pricing_plan_subscription) == null ? void 0 : Kt.use_shipping_addresses) === !0, {
3426
+ validatedEmail: V,
3427
+ validatedCountry: oe,
3428
+ paymentMethodOptions: X,
3429
+ hasPaymentMethodOptionsError: ie,
3430
+ retryPaymentMethodOptions: se,
3431
+ subscription: r,
3432
+ orderMeterValues: L,
3433
+ quantityAddonConfigIds: l,
3434
+ isPaymentMethodsPending: f,
3435
+ isInvoicePreviewPending: m,
3436
+ isInvoicePreviewStale: $,
3437
+ settleInvoicePreview: h,
3438
+ checkoutForm: d,
3439
+ invoicePreview: S,
3440
+ invoicePreviewByBillingPeriod: K,
3441
+ trialInvoicePreview: q,
3442
+ trialPeriod: Z,
3443
+ authorizationContext: le,
3444
+ isPaid: W,
3445
+ amount: ne,
3446
+ recurringAmount: de,
3447
+ hasOneOffCharges: ge,
3448
+ loadInvoicePreview: b,
3449
+ updateInvoicePreviewOnBillingInformationChange: P,
3450
+ saveFormStateForRedirect: H,
3451
+ clearSavedFormState: R
3452
+ } = Ti({
3453
+ initialCountry: (Ht = n.configuration) == null ? void 0 : Ht.countryCode,
3454
+ initialEmail: (Qt = n.configuration) == null ? void 0 : Qt.email,
3455
+ subscriptionId: G,
3456
+ enabledPricingIds: (Zt = n.configuration) == null ? void 0 : Zt.enabledPricingIds,
3457
+ isShippingAddressRequired: I
3458
+ }), J = Fo(), ae = u(
3459
+ () => {
3460
+ var v;
3461
+ return !!((v = J == null ? void 0 : J.value) != null && v["express-checkout"]);
3462
+ }
3463
+ ), ee = Y(!1), { isFormHeld: Q, handleActionRequired: re } = Vo(ee), Ce = async () => {
3464
+ await d.validation.value.$validate(), !(d.validation.value.$invalid || !y.value) && (De(), y.value.submit());
3465
+ }, De = () => {
3466
+ ee.value = !0, ve.value = null, H();
3467
+ }, ve = Y(null), Xe = () => {
3468
+ ee.value = !1, fe.value = void 0, R();
3469
+ }, Re = Y(!1), Ye = (v) => {
3470
+ if (ee.value = !1, fe.value = void 0, R(), (v == null ? void 0 : v.code) === "PAYMENT_OUTCOME_UNCONFIRMED") {
3471
+ Re.value = !0;
3472
+ return;
3473
+ }
3474
+ ve.value = (v == null ? void 0 : v.message) ?? a({
3475
+ defaultMessage: "The payment did not go through. Please try again.",
3476
+ id: "checkout.payment_failed",
3477
+ description: "Error shown when a payment the customer started did not complete"
3478
+ });
3479
+ }, We = (v) => {
3480
+ Ye(v), (v == null ? void 0 : v.code) === "PAYMENT_OUTCOME_UNCONFIRMED" && (ve.value = a({
3481
+ defaultMessage: "Your payment could not be confirmed yet and may still go through, so please do not pay again.",
3482
+ id: "checkout.payment_unconfirmed",
3483
+ description: "Shown when it is not yet known whether an express payment the customer made went through"
3484
+ }));
3485
+ }, fe = Y(), ze = u(() => fe.value ? { inert: !0 } : {}), Ke = async () => {
3486
+ if (await d.validation.value.$validate(), d.validation.value.$invalid) return !1;
3487
+ const v = await h();
3488
+ return v === "CHANGED" ? (ve.value = a({
3489
+ defaultMessage: "The price changed with your last edit. Check it and pay again.",
3490
+ id: "checkout.price_changed",
3491
+ description: "Shown when a payment is held back because the customer changed the order while it waited for the price"
3492
+ }), !1) : v === "FAILED" ? (ve.value = a({
3493
+ defaultMessage: "The price could not be brought up to date. Please try again.",
3494
+ id: "checkout.price_not_settled",
3495
+ description: "Error shown when a payment is held back because the price of the latest changes could not be loaded"
3496
+ }), !1) : (ne.value && (fe.value = { amount: ne.value, context: le.value }, await Ve()), !0);
3497
+ }, Je = u(() => !!q.value), Ne = u(
3498
+ () => Eo(tt.value, {
3499
+ enabledPricingIds: d.form.value.enabledPricingIds
3500
+ })
3501
+ ), He = u(
3502
+ () => [...Ne.value].some((v) => v !== "ONE_OFF")
3503
+ ), je = u(() => Ne.value.has("USAGE_BASED")), et = u(
3504
+ () => je.value || (S.value ? Ro(S.value) : !1)
3505
+ ), Me = u(
3506
+ () => {
3507
+ var v;
3508
+ return de.value ?? ((v = S.value) == null ? void 0 : v.tax_summary.total_amount);
3509
+ }
3510
+ );
3511
+ he(
3512
+ () => ge.value && !de.value && !!S.value,
3513
+ (v) => {
3514
+ v && D.warn(
3515
+ "RECURRING_AMOUNT_UNRESOLVED",
3516
+ "Could not tell the recurring part of the invoice from the one-off part; the mandate states the invoice total",
3517
+ { flow: "CHECKOUT" }
3518
+ );
3519
+ }
3520
+ );
3521
+ const Ue = u(
3522
+ () => He.value || !!Me.value && Number(Me.value.quantity) !== 0
3523
+ ), me = u(
3524
+ () => ge.value ? de.value : void 0
3525
+ ), xn = u(
3526
+ () => d.form.value.country && ["US", "CA"].includes(d.form.value.country) || !1
3527
+ ), ct = u({
3528
+ get: () => d.form.value.enabledPricingIds ?? [],
3529
+ set: (v) => {
3530
+ d.form.value.enabledPricingIds = v;
3531
+ }
3532
+ }), tt = u(
3533
+ () => r.value ? $e({
3534
+ pricingPlanScheduleInfos: r.value.pricing_plan_schedule_infos,
3535
+ type: "DEFAULT"
3536
+ }) : void 0
3537
+ ), Dt = u(() => {
3538
+ var U, B;
3539
+ if (!r.value)
3540
+ return;
3541
+ const v = (B = (U = tt.value) == null ? void 0 : U.pricing_plan_version) == null ? void 0 : B.pricing_currency_settings;
3542
+ return Sn({
3543
+ country: d.form.value.country,
3544
+ pricingCurrencySettings: v,
3545
+ fallbackCurrency: r.value.billing_currency
3546
+ });
3547
+ }), Et = u(() => {
3548
+ if (!tt.value || !r.value)
3549
+ return /* @__PURE__ */ new Set();
3550
+ const v = ho({
3551
+ pricingPlanScheduleInfo: tt.value
3552
+ }), U = Dt.value, B = r.value.billing_period, te = /* @__PURE__ */ new Set();
3553
+ return v.forEach((ue, Ie) => {
3554
+ U && ue.currency !== U || B && ue.billingPeriod && (ue.billingPeriod.type !== B.type || ue.billingPeriod.value !== B.value) || te.add(Ie);
3555
+ }), te;
3556
+ }), Lt = (v) => u({
3557
+ get: () => {
3558
+ const U = d.form.value[v] ?? [], B = Et.value;
3559
+ return B.size ? U.filter(({ pricing_item_config_id: te }) => B.has(te)) : U;
3560
+ },
3561
+ set: (U) => {
3562
+ const B = d.form.value[v] ?? [], te = Et.value;
3563
+ if (!te.size) {
3564
+ d.form.value[v] = U;
3565
+ return;
3566
+ }
3567
+ const ue = B.filter(
3568
+ ({ pricing_item_config_id: Ie }) => !te.has(Ie) && !l.value.has(Ie)
3569
+ );
3570
+ d.form.value[v] = ue.concat(U);
3571
+ }
3572
+ }), dt = Lt("seatsValues"), pt = Lt("unitsValues"), nt = u(
3573
+ () => {
3574
+ var v;
3575
+ return T(((v = S.value) == null ? void 0 : v.billing_period) ?? { type: "MONTH", value: 1 }, {
3576
+ short: !0,
3577
+ singular: !0,
3578
+ hideValueForExactPeriods: !0
3579
+ });
3580
+ }
3581
+ ), Rn = u(() => {
3582
+ var v;
3583
+ if (q.value)
3584
+ return a(
3585
+ {
3586
+ defaultMessage: "{discounted_amount} for {trial_period}, then {subscription_amount}/{billing_period} until canceled, starting {start_date, date, ::MMMMd}.",
3587
+ id: "checkout.agreement.trial",
3588
+ description: "The agreement for the trial period"
3589
+ },
3590
+ {
3591
+ discounted_amount: Number(q.value.tax_summary.total_amount.quantity) === 0 ? a({
3592
+ defaultMessage: "Free",
3593
+ id: "checkout.agreement.trial.free",
3594
+ description: "The free amount for the trial period"
3595
+ }) : be(q.value.tax_summary.total_amount),
3596
+ trial_period: T(Z.value, { short: !0 }),
3597
+ subscription_amount: be(
3598
+ Me.value ?? {
3599
+ quantity: "0.00",
3600
+ currency: q.value.tax_summary.total_amount.currency
3601
+ }
3602
+ ),
3603
+ billing_period: nt.value,
3604
+ // @ts-expect-error formatjs does not support this type yet
3605
+ start_date: new Date(we.value)
3606
+ }
3607
+ );
3608
+ if (ge.value && de.value) {
3609
+ const U = be(
3610
+ ((v = S.value) == null ? void 0 : v.tax_summary.total_amount) ?? {
3611
+ quantity: "0.00",
3612
+ currency: de.value.currency
3613
+ }
3614
+ );
3615
+ return Ue.value ? je.value && Number(de.value.quantity) === 0 ? a(
3616
+ {
3617
+ defaultMessage: "{due_today} today, then usage billed every {billing_period} until canceled.",
3618
+ id: "checkout.agreement.usage_with_one_off",
3619
+ description: "The agreement for a usage-based subscription whose first invoice also charges something only once"
3620
+ },
3621
+ {
3622
+ due_today: U,
3623
+ billing_period: nt.value
3624
+ }
3625
+ ) : a(
3626
+ {
3627
+ defaultMessage: "{due_today} today, then {subscription_amount}/{billing_period} until canceled, starting {start_date, date, long}.",
3628
+ id: "checkout.agreement.subscription_with_one_off",
3629
+ description: "The agreement for a subscription whose first invoice also charges something only once"
3630
+ },
3631
+ {
3632
+ due_today: U,
3633
+ subscription_amount: be(de.value),
3634
+ billing_period: nt.value,
3635
+ // @ts-expect-error formatjs does not support this type yet
3636
+ start_date: new Date(we.value)
3637
+ }
3638
+ ) : a(
3639
+ {
3640
+ defaultMessage: "{due_today} today. One-time purchase.",
3641
+ id: "checkout.agreement.one_off",
3642
+ description: "The agreement for an order that is charged once and does not renew"
3643
+ },
3644
+ { due_today: U }
3645
+ );
3646
+ }
3647
+ return a(
3648
+ {
3649
+ defaultMessage: "{subscription_amount}/{billing_period} until canceled, starting {start_date, date, long}.",
3650
+ id: "checkout.agreement.subscription",
3651
+ description: "The agreement for the subscription"
3652
+ },
3653
+ {
3654
+ subscription_amount: Me.value ? be(Me.value) : "",
3655
+ billing_period: nt.value,
3656
+ // @ts-expect-error formatjs does not support this type yet
3657
+ start_date: new Date(we.value)
3658
+ }
3659
+ );
3660
+ }), kt = u(() => {
3661
+ var v;
3662
+ return {
3663
+ invoicePreviewByBillingPeriod: K.value,
3664
+ trialInvoice: q.value,
3665
+ enabledPricingIds: ct.value,
3666
+ countryCode: d.form.value.country,
3667
+ avatar: (v = g.value) == null ? void 0 : v.avatar,
3668
+ isPaid: W.value,
3669
+ isUsageBased: et.value
3670
+ };
3671
+ }), St = u(() => {
3672
+ var U;
3673
+ if (!S.value)
3674
+ return;
3675
+ const v = _o({
3676
+ subscription: r.value,
3677
+ fallback: a({
3678
+ defaultMessage: "Subscription",
3679
+ description: "The fallback name for when no subscription name can be determined",
3680
+ id: "customer_overview.subscriptions_block.fallback_subscription_name"
3681
+ })
3682
+ });
3683
+ return {
3684
+ description: v,
3685
+ managementURL: "https://www.solvimon.com/account/billing",
3686
+ agreement: Rn.value,
3687
+ ...q.value && Z.value && {
3688
+ trial: {
3689
+ label: a({
3690
+ defaultMessage: "Trial",
3691
+ id: "checkout.trial.label",
3692
+ description: "The label of the trial"
3693
+ }),
3694
+ amount: q.value.tax_summary.total_amount,
3695
+ startDate: mt.value ? new Date(mt.value) : void 0,
3696
+ endDate: wt.value ? new Date(wt.value) : void 0
3697
+ }
3698
+ },
3699
+ // Left off entirely, so the sheet mandates no charge that is never going to be made.
3700
+ ...Ue.value && Me.value && {
3701
+ regular: {
3702
+ label: v,
3703
+ amount: Me.value,
3704
+ startDate: we.value ? new Date(we.value) : void 0,
3705
+ interval: ((U = r.value) == null ? void 0 : U.billing_period) ?? { type: "MONTH", value: 1 }
3706
+ }
3707
+ }
3708
+ };
3709
+ }), zn = (v) => Ge(v), jn = (v) => {
3710
+ const { line1: U, line2: B, postal_code: te, city: ue, state: Ie, country: vt, email: qt } = v;
3711
+ d.updateInitialState({
3712
+ ...U && { addressLine1: U },
3713
+ ...B && { addressLine2: B },
3714
+ ...te && { postalCode: te },
3715
+ ...ue && { city: ue },
3716
+ ...Ie && { state: Ie },
3717
+ ...qt && { email: qt },
3718
+ ...vt && zn(vt) ? { country: vt } : {}
3719
+ });
3720
+ }, Un = u(() => !(V && oe)), mt = u(() => {
3721
+ var B, te, ue;
3722
+ const v = (te = (B = q.value) == null ? void 0 : B.periods) == null ? void 0 : te[0], U = (ue = gt.value) == null ? void 0 : ue.trialStartDate;
3723
+ return v != null && v.start_at ? new Date(v.start_at) : U;
3724
+ }), gt = u(() => bo(r.value)), wt = u(() => {
3725
+ var B, te, ue;
3726
+ const v = (te = (B = q.value) == null ? void 0 : B.periods) == null ? void 0 : te[0], U = (ue = gt.value) == null ? void 0 : ue.trialEndDate;
3727
+ return v != null && v.end_at ? new Date(v.end_at) : U;
3728
+ }), we = u(() => {
3729
+ var B, te, ue;
3730
+ const v = (te = (B = S.value) == null ? void 0 : B.periods) == null ? void 0 : te[0], U = (ue = gt.value) == null ? void 0 : ue.subscriptionStartDate;
3731
+ return v != null && v.start_at ? new Date(v.start_at) : U;
3732
+ }), Bn = u(() => !!(d.form.value.seatsValues && d.form.value.seatsValues.length > 0 || d.form.value.unitsValues && d.form.value.unitsValues.length > 0 || r.value && Ci(r.value) || r.value && Ni(r.value))), Be = Y(null);
3733
+ he(
3734
+ () => d.form.value.promotionCode,
3735
+ (v) => {
3736
+ Be.value = v ?? null;
3737
+ }
3738
+ );
3739
+ const {
3740
+ applyPromotionCode: Tt,
3741
+ removePromotionCode: Fn,
3742
+ isPromotionCodePending: Ot,
3743
+ promotionCodeErrorMessage: yt
3744
+ } = Oi({
3745
+ checkoutForm: d,
3746
+ updateInvoicePreviewOnBillingInformationChange: P,
3747
+ formatErrorMessage: ({ action: v }) => a(v === "apply" ? {
3748
+ defaultMessage: "Promotion code could not be applied. Please try again.",
3749
+ id: "checkout.promotion_code.apply_failed",
3750
+ description: "Error message when applying a promotion code in checkout failed"
3751
+ } : {
3752
+ defaultMessage: "Promotion code could not be removed. Please try again.",
3753
+ id: "checkout.promotion_code.remove_failed",
3754
+ description: "Error message when removing a promotion code in checkout failed"
3755
+ }),
3756
+ onInvalidPromotionCode: () => {
3757
+ Be.value = null;
3758
+ },
3759
+ onApplyError: () => {
3760
+ Be.value = null;
3761
+ }
3762
+ });
3763
+ xi({
3764
+ subscription: r,
3765
+ promotionCode: () => {
3766
+ var v;
3767
+ return (v = n.configuration) == null ? void 0 : v.couponCode;
3768
+ },
3769
+ appliedPromotionCode: Be,
3770
+ applyPromotionCode: Tt
3771
+ });
3772
+ const Vn = () => {
3773
+ N && $o(N);
3774
+ }, $n = u(
3775
+ () => {
3776
+ var v;
3777
+ return !((v = n.configuration) != null && v.onPaymentSuccess) && !!N;
3778
+ }
3779
+ ), xt = () => {
3780
+ var v;
3781
+ if (W.value = !0, fe.value = void 0, R(), yt.value = null, ve.value = null, (v = n.configuration) != null && v.onPaymentSuccess) {
3782
+ n.configuration.onPaymentSuccess();
3783
+ return;
3784
+ }
3785
+ if (N) {
3786
+ Vn();
3787
+ return;
3788
+ }
3789
+ }, Rt = (v) => {
3790
+ r.value && (r.value = {
3791
+ ...r.value,
3792
+ billing_period: v
3793
+ }, b().catch(() => {
3794
+ }));
3795
+ };
3796
+ return qe(() => {
3797
+ c("ready");
3798
+ }), (v, U) => (p(), w(t(ai), {
3799
+ class: ke(["sv-checkout sv-root sv-screen", { "sv-checkout--paid": t(W) }])
3800
+ }, {
3801
+ header: M(() => [
3802
+ k("div", as, [
3803
+ A(Le, { class: "min-h-[52px] w-96" }, {
3804
+ default: M(() => {
3805
+ var B, te, ue, Ie;
3806
+ return [
3807
+ t(S) && t(r) && we.value ? (p(), w(aa, {
3808
+ key: 0,
3809
+ class: "sv-checkout__title",
3810
+ "trial-start-date": mt.value,
3811
+ "trial-period": t(Z),
3812
+ "subscription-start-date": we.value,
3813
+ "subscription-name": ((B = t(r)) == null ? void 0 : B.name) ?? "",
3814
+ amount: (te = t(S)) == null ? void 0 : te.invoice_amount_including_tax,
3815
+ "due-today-amount": t(ne) ?? ((ue = t(S)) == null ? void 0 : ue.invoice_amount_including_tax),
3816
+ "recurring-amount": me.value,
3817
+ "has-one-off-charges": t(ge),
3818
+ "has-recurring-charge": Ue.value,
3819
+ "has-usage-charges": je.value,
3820
+ "billing-period": (Ie = t(r)) == null ? void 0 : Ie.billing_period,
3821
+ "country-code": t(d).form.value.country
3822
+ }, 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"])) : z("", !0)
3823
+ ];
3824
+ }),
3825
+ _: 1
3826
+ })
3827
+ ])
3828
+ ]),
3829
+ content: M(() => [
3830
+ t(W) ? (p(), w(sa, {
3831
+ key: 0,
3832
+ class: "sv-checkout__completed-payment"
3833
+ })) : (p(), x(ye, { key: 1 }, [
3834
+ t(r) && t(C) ? (p(), w(bn, Oe({
3835
+ key: 0,
3836
+ class: "sv-checkout__mobile-order-summary"
3837
+ }, kt.value, {
3838
+ subscription: t(r),
3839
+ invoice: t(S),
3840
+ collapsible: "collapsed",
3841
+ variant: "products-inline",
3842
+ onBillingPeriodChange: Rt
3843
+ }), null, 16, ["subscription", "invoice"])) : z("", !0),
3844
+ Bn.value && t(r) ? (p(), w(t(s), Oe({ key: 1 }, ze.value, {
3845
+ "seats-values": t(dt),
3846
+ "onUpdate:seatsValues": U[0] || (U[0] = (B) => Jt(dt) ? dt.value = B : null),
3847
+ "units-values": t(pt),
3848
+ "onUpdate:unitsValues": U[1] || (U[1] = (B) => Jt(pt) ? pt.value = B : null),
3849
+ "enabled-pricing-ids": ct.value,
3850
+ "onUpdate:enabledPricingIds": U[2] || (U[2] = (B) => ct.value = B),
3851
+ class: "sv-checkout__plan-customization",
3852
+ subscription: t(r),
3853
+ "initial-seats-values": t(L).seatsValues,
3854
+ "initial-units-values": t(L).unitsValues,
3855
+ "billing-period": t(r).billing_period,
3856
+ currency: Dt.value
3857
+ }), null, 16, ["seats-values", "units-values", "enabled-pricing-ids", "subscription", "initial-seats-values", "initial-units-values", "billing-period", "currency"])) : z("", !0),
3858
+ ae.value && !Re.value && t(d).form.value.country && t(ne) && St.value ? (p(), w(Za, {
3859
+ key: 2,
3860
+ class: "sv-checkout__express-payment-methods",
3861
+ amount: t(ne),
3862
+ "country-code": t(d).form.value.country,
3863
+ locale: t(E),
3864
+ "payment-methods-options-response": t(X) ?? [],
3865
+ "billing-information": St.value,
3866
+ "on-billing-information-change": t(P),
3867
+ context: t(le),
3868
+ "validate-on-submit": Ke,
3869
+ onUpdateBillingInformation: jn,
3870
+ onPaymentSuccess: xt,
3871
+ onPaymentFailed: We
3872
+ }, null, 8, ["amount", "country-code", "locale", "payment-methods-options-response", "billing-information", "on-billing-information-change", "context"])) : z("", !0),
3873
+ A(Ji, Oe({
3874
+ modelValue: t(d).form.value,
3875
+ "onUpdate:modelValue": U[3] || (U[3] = (B) => t(d).form.value = B),
3876
+ class: "sv-checkout__customer-form",
3877
+ validation: t(d).validation,
3878
+ "read-only-email": t(V),
3879
+ "show-customer-info-on-top": Un.value || t(W),
3880
+ "is-billing-information-mandatory": xn.value,
3881
+ "is-shipping-address-required": I,
3882
+ "get-is-field-required": t(d).getIsFieldRequired,
3883
+ "shipping-address-format": t(d).shippingAddressFormat.value,
3884
+ "read-only": t(W)
3885
+ }, ze.value), null, 16, ["modelValue", "validation", "read-only-email", "show-customer-info-on-top", "is-billing-information-mandatory", "get-is-field-required", "shipping-address-format", "read-only"]),
3886
+ k("div", ss, [
3887
+ A(Le, {
3888
+ variant: "section",
3889
+ class: "min-h-[130px]"
3890
+ }, {
3891
+ default: M(() => {
3892
+ var B, te;
3893
+ return [
3894
+ !t(f) || t(f) && t(X).length > 0 ? (p(), x("div", ls, [
3895
+ A(t(ce), {
3896
+ variant: "heading-3",
3897
+ tag: "h2",
3898
+ class: "sv-checkout__payment-methods-title mb-2"
3899
+ }, {
3900
+ default: M(() => [
3901
+ F(j(t(a)({
3902
+ defaultMessage: "Payment method",
3903
+ id: "checkout.payment_method_block.title",
3904
+ description: "The title of the payment method block in the checkout form"
3905
+ })), 1)
3906
+ ]),
3907
+ _: 1
3908
+ }),
3909
+ t(d).form.value.country ? t(ie) ? (p(), w(ft, {
3910
+ key: 1,
3911
+ class: "sv-checkout__payment-methods-error",
3912
+ icon: "error"
3913
+ }, {
3914
+ title: M(() => [
3915
+ F(j(t(a)({
3916
+ defaultMessage: "Could not load payment methods",
3917
+ id: "checkout.payment_method_block.load_failed_title",
3918
+ description: "The title shown when the payment methods failed to load"
3919
+ })), 1)
3920
+ ]),
3921
+ message: M(() => [
3922
+ F(j(t(a)({
3923
+ defaultMessage: "Check your connection and try again.",
3924
+ id: "checkout.payment_method_block.load_failed_message",
3925
+ description: "The message shown when the payment methods failed to load"
3926
+ })), 1)
3927
+ ]),
3928
+ action: M(() => [
3929
+ A(t(xe), {
3930
+ type: "button",
3931
+ intent: "secondary",
3932
+ size: "sm",
3933
+ class: "sv-action sv-action--secondary sv-checkout__payment-methods-retry",
3934
+ onClick: t(se)
3935
+ }, {
3936
+ default: M(() => [
3937
+ F(j(t(a)({
3938
+ defaultMessage: "Try again",
3939
+ id: "checkout.payment_method_block.load_failed_retry_button.label",
3940
+ description: "The label of the button that loads the payment methods again"
3941
+ })), 1)
3942
+ ]),
3943
+ _: 1
3944
+ }, 8, ["onClick"])
3945
+ ]),
3946
+ _: 1
3947
+ })) : t(X).length === 0 ? (p(), w(ft, {
3948
+ key: 2,
3949
+ class: "sv-checkout__payment-methods-empty",
3950
+ icon: "credit_card_off"
3951
+ }, {
3952
+ title: M(() => [
3953
+ F(j(t(a)({
3954
+ defaultMessage: "No payment methods available",
3955
+ id: "checkout.payment_method_block.no_payment_methods_available_title",
3956
+ description: "The title shown when there are no available payment methods"
3957
+ })), 1)
3958
+ ]),
3959
+ _: 1
3960
+ })) : t(ne) && t(d).form.value.country ? (p(), x("div", rs, [
3961
+ k("div", {
3962
+ class: ke({ "pointer-events-none opacity-60": t(Q) })
3963
+ }, [
3964
+ A(t(i), {
3965
+ ref_key: "paymentIntegrationFormRef",
3966
+ ref: y,
3967
+ "country-code": t(d).form.value.country,
3968
+ context: fe.value ? fe.value.context : t(le),
3969
+ amount: fe.value ? fe.value.amount : t(ne),
3970
+ email: t(d).form.value.email,
3971
+ variant: "AUTHORIZE",
3972
+ "payment-method-options": t(X) ?? [],
3973
+ "validate-on-submit": Ke,
3974
+ "redirects-on-success": $n.value,
3975
+ "force-store-payment-method": "",
3976
+ "billing-entity-name": (te = (B = t(r)) == null ? void 0 : B.billing_entity) == null ? void 0 : te.legal_name,
3977
+ onPaymentSuccess: xt,
3978
+ onPaymentFailed: Ye,
3979
+ onInvalid: Xe,
3980
+ onSubmitting: De,
3981
+ onActionRequired: t(re),
3982
+ onReady: U[4] || (U[4] = (ue) => c("ready"))
3983
+ }, null, 8, ["country-code", "context", "amount", "email", "payment-method-options", "redirects-on-success", "billing-entity-name", "onActionRequired"])
3984
+ ], 2)
3985
+ ])) : z("", !0) : (p(), w(ft, {
3986
+ key: 0,
3987
+ class: "sv-checkout__payment-methods-empty",
3988
+ icon: "captive_portal"
3989
+ }, {
3990
+ title: M(() => [
3991
+ F(j(t(a)({
3992
+ defaultMessage: "Select your billing country",
3993
+ id: "checkout.payment_method_block.no_country_selected_title",
3994
+ description: "The title shown when no country is selected"
3995
+ })), 1)
3996
+ ]),
3997
+ message: M(() => [
3998
+ F(j(t(a)({
3999
+ defaultMessage: "Payment methods will be shown after you select the billing country.",
4000
+ id: "checkout.payment_method_block.no_country_selected_message",
4001
+ description: "The message shown when no country is selected"
4002
+ })), 1)
4003
+ ]),
4004
+ _: 1
4005
+ }))
4006
+ ])) : z("", !0)
4007
+ ];
4008
+ }),
4009
+ _: 1
4010
+ })
4011
+ ])
4012
+ ], 64))
4013
+ ]),
4014
+ aside: M(() => [
4015
+ k("div", us, [
4016
+ A(Le, {
4017
+ variant: "section",
4018
+ class: "min-h-[220px]"
4019
+ }, {
4020
+ default: M(() => [
4021
+ t(r) && t(S) ? (p(), w(bn, Oe({ key: 0 }, kt.value, {
4022
+ subscription: t(r),
4023
+ invoice: t(S),
4024
+ onBillingPeriodChange: Rt
4025
+ }), null, 16, ["subscription", "invoice"])) : z("", !0)
4026
+ ]),
4027
+ _: 1
4028
+ })
4029
+ ]),
4030
+ t(W) ? z("", !0) : (p(), x(ye, { key: 0 }, [
4031
+ A(is, Oe({ class: "sv-checkout__promotion-code" }, ze.value, {
4032
+ "promotion-code": Be.value,
4033
+ "is-pending": t(Ot),
4034
+ "onUpdate:appliedCode": U[5] || (U[5] = (B) => Be.value = B),
4035
+ onRemove: t(Fn),
4036
+ onApply: t(Tt)
4037
+ }), null, 16, ["promotion-code", "is-pending", "onRemove", "onApply"]),
4038
+ t(yt) ? (p(), w(t(en), {
4039
+ key: 0,
4040
+ class: "sv-checkout__promotion-error mt-2",
4041
+ title: t(yt)
4042
+ }, null, 8, ["title"])) : z("", !0),
4043
+ ve.value ? (p(), w(t(en), {
4044
+ key: 1,
4045
+ class: "sv-checkout__payment-error mt-2",
4046
+ title: ve.value
4047
+ }, null, 8, ["title"])) : z("", !0),
4048
+ k("div", cs, [
4049
+ A(Le, { class: "sv-checkout__submit-skeleton min-h-10" }, {
4050
+ default: M(() => [
4051
+ t(S) ? (p(), w(t(xe), {
4052
+ key: 0,
4053
+ type: "button",
4054
+ size: "md",
4055
+ class: "sv-action sv-action--primary sv-action--full-width sv-checkout__submit w-full",
4056
+ disabled: t(Ot) || t(m) || t($) || t(ie) || t(X).length === 0 || ee.value || Re.value,
4057
+ loading: ee.value,
4058
+ onClick: Ce
4059
+ }, {
4060
+ default: M(() => [
4061
+ F(j(Je.value ? t(a)({
4062
+ defaultMessage: "Start trial",
4063
+ id: "checkout.pay_and_subscribe_button_trial.label",
4064
+ description: "The label of the start trial button in the checkout form"
4065
+ }) : t(a)({
4066
+ defaultMessage: "Pay and subscribe",
4067
+ id: "checkout.pay_and_subscribe_button.label",
4068
+ description: "The label of the pay and subscribe button in the checkout form"
4069
+ })), 1)
4070
+ ]),
4071
+ _: 1
4072
+ }, 8, ["disabled", "loading"])) : z("", !0)
4073
+ ]),
4074
+ _: 1
4075
+ }),
4076
+ A(si, { "payment-method-options": t(X) }, null, 8, ["payment-method-options"]),
4077
+ t(_) ? (p(), w(t(ce), {
4078
+ key: 0,
4079
+ tag: "div",
4080
+ variant: "body-xs",
4081
+ color: "subtle",
4082
+ class: "sv-checkout__terms px-4 text-center"
4083
+ }, {
4084
+ default: M(() => [
4085
+ A(Oa, { source: t(_) }, null, 8, ["source"])
4086
+ ]),
4087
+ _: 1
4088
+ })) : z("", !0)
4089
+ ])
4090
+ ], 64))
4091
+ ]),
4092
+ _: 1
4093
+ }, 8, ["class"]));
4094
+ }
4095
+ }), ps = 256, ms = /^[^\s\p{C}]+$/u;
4096
+ function gs(e) {
4097
+ const o = e == null ? void 0 : e.trim();
4098
+ if (!(!o || o.length > ps || !ms.test(o)))
4099
+ return o;
4100
+ }
4101
+ const ys = /* @__PURE__ */ pe({
4102
+ __name: "Checkout.entry",
4103
+ props: {
4104
+ portalToken: { type: Object },
4105
+ environment: { type: String },
4106
+ locale: { type: String },
4107
+ dateLocale: { type: String },
4108
+ messages: { type: Object },
4109
+ primaryColor: { type: String },
4110
+ secondaryColor: { type: String },
4111
+ isShadowRoot: { type: Boolean },
4112
+ experimentalFeatures: { type: Array },
4113
+ logLevel: { type: String },
4114
+ onLog: { type: Function },
4115
+ allowedPortalTypes: { type: Array },
4116
+ portalObject: { type: Object },
4117
+ cssOverrides: { type: [String, Array] },
4118
+ branding: { type: Object },
4119
+ configuration: { type: Object }
4120
+ },
4121
+ emits: ["ready", "error"],
4122
+ setup(e, { emit: o }) {
4123
+ const i = eo("checkout"), s = e, n = o, c = u(
4124
+ () => {
4125
+ var g;
4126
+ return ((g = s.configuration) == null ? void 0 : g.couponCode) ?? gs(Go("coupon_code"));
4127
+ }
4128
+ );
4129
+ return (g, y) => (p(), w(t(Jn), {
4130
+ entry: g.$props,
4131
+ "component-name": t(i),
4132
+ "allowed-portal-types": ["INIT_PRICING_PLAN_SUBSCRIPTION"],
4133
+ onError: y[1] || (y[1] = (D) => g.$emit("error", D))
4134
+ }, {
4135
+ "portal-unavailable": M(() => [
4136
+ A(ci, { class: "sv-checkout sv-root sv-screen sv-checkout--error" })
4137
+ ]),
4138
+ default: M(() => {
4139
+ var D, a, E;
4140
+ return [
4141
+ A(ds, {
4142
+ configuration: {
4143
+ ...e.configuration,
4144
+ avatar: ((D = e.configuration) == null ? void 0 : D.avatar) ?? ((E = (a = e.branding) == null ? void 0 : a.emblem) == null ? void 0 : E.public_url),
4145
+ couponCode: c.value
4146
+ },
4147
+ onReady: y[0] || (y[0] = (T) => n("ready"))
4148
+ }, bt({ _: 2 }, [
4149
+ g.$slots["terms-and-conditions"] ? {
4150
+ name: "terms-and-conditions",
4151
+ fn: M(() => [
4152
+ _t(g.$slots, "terms-and-conditions")
4153
+ ]),
4154
+ key: "0"
4155
+ } : void 0
4156
+ ]), 1032, ["configuration"])
4157
+ ];
4158
+ }),
4159
+ _: 3
4160
+ }, 8, ["entry", "component-name"]));
4161
+ }
4162
+ }), { define: sl } = to(
4163
+ ys,
4164
+ "checkout"
4165
+ );
4166
+ export {
4167
+ da as _,
4168
+ sl as d
4169
+ };