@zonos/elements 1.3.142 → 1.3.144

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 (348) hide show
  1. package/dist/cjs/{CheckoutConfig-eaaf62a1.js → CheckoutConfig-d25d548d.js} +13 -3
  2. package/dist/cjs/TaxId-4632639d.js +29 -0
  3. package/dist/cjs/{cart-199b0751.js → cart-2398abd4.js} +547 -42
  4. package/dist/cjs/{createCustomEvent-3e982e57.js → createCustomEvent-7b6fad95.js} +0 -3
  5. package/dist/cjs/{getBorderRadius-f97c99ad.js → getBorderRadius-7d0772bf.js} +1 -1
  6. package/dist/cjs/{handleFetch-864d3c53.js → handleFetch-3673a0c2.js} +30 -1
  7. package/dist/cjs/{index-b678ce0c.js → index-2f90486e.js} +209 -157
  8. package/dist/cjs/index.cjs.js +15 -11
  9. package/dist/cjs/{isDarkColor-434d71dd.js → isDarkColor-2acf30d1.js} +1 -1
  10. package/dist/cjs/loader.cjs.js +2 -2
  11. package/dist/cjs/{paypal-4f1ee604.js → paypal-7ed9dfb7.js} +4 -4
  12. package/dist/cjs/{zonos-address_7.cjs.entry.js → zonos-address_8.cjs.entry.js} +143 -10
  13. package/dist/cjs/zonos-badge.cjs.entry.js +2 -2
  14. package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
  15. package/dist/cjs/zonos-button_3.cjs.entry.js +4 -4
  16. package/dist/cjs/zonos-card.cjs.entry.js +3 -3
  17. package/dist/cjs/zonos-cart-items_13.cjs.entry.js +151 -32
  18. package/dist/cjs/zonos-checkout.cjs.entry.js +36 -16
  19. package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
  20. package/dist/cjs/zonos-component.cjs.entry.js +2 -2
  21. package/dist/cjs/zonos-controller.cjs.entry.js +8 -8
  22. package/dist/cjs/zonos-country-flag.cjs.entry.js +6 -6
  23. package/dist/cjs/zonos-country-select_4.cjs.entry.js +10 -10
  24. package/dist/cjs/zonos-elements.cjs.js +3 -3
  25. package/dist/cjs/{zonos-notification_3.cjs.entry.js → zonos-empty-state-payment_4.cjs.entry.js} +87 -9
  26. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +10 -10
  27. package/dist/cjs/zonos-hello.cjs.entry.js +6 -6
  28. package/dist/cjs/zonos-input.cjs.entry.js +3 -3
  29. package/dist/cjs/zonos-language-select_2.cjs.entry.js +6 -6
  30. package/dist/cjs/zonos-link.cjs.entry.js +1 -1
  31. package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
  32. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
  33. package/dist/cjs/zonos-text.cjs.entry.js +2 -2
  34. package/dist/cjs/zonos-toggle.cjs.entry.js +4 -4
  35. package/dist/cjs/zonos-tooltip.cjs.entry.js +3 -3
  36. package/dist/cjs/zonos-v-stack.cjs.entry.js +4 -4
  37. package/dist/cjs/{zonosStore-8971eb65.js → zonosStore-46809186.js} +1 -1
  38. package/dist/collection/collection-manifest.json +3 -1
  39. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.js +5 -1
  40. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +8 -2
  41. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.js +24 -4
  42. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/zonos-cart-restricted-items.js +2 -0
  43. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +4 -0
  44. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +34 -6
  45. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +4 -0
  46. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +109 -18
  47. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/assets/PaymentEmptyStateDarkIcon.svg +22 -0
  48. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/assets/PaymentEmptyStateLightIcon.svg +22 -0
  49. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.css +51 -0
  50. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.js +90 -0
  51. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +62 -7
  52. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +3 -0
  53. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +32 -1
  54. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +4 -0
  55. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +6 -0
  56. package/dist/collection/components/common/zonos-badge/zonos-badge.js +18 -2
  57. package/dist/collection/components/common/zonos-banner/zonos-banner.js +4 -0
  58. package/dist/collection/components/common/zonos-button/zonos-button.js +30 -0
  59. package/dist/collection/components/common/zonos-card/zonos-card.js +20 -4
  60. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +14 -0
  61. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +4 -0
  62. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +4 -0
  63. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +22 -0
  64. package/dist/collection/components/common/zonos-country-flag/zonos-country-flag.js +4 -0
  65. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -0
  66. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +4 -0
  67. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +26 -0
  68. package/dist/collection/components/common/zonos-icon/zonos-icon.js +8 -0
  69. package/dist/collection/components/common/zonos-input/zonos-input.js +12 -0
  70. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -0
  71. package/dist/collection/components/common/zonos-link/zonos-link.js +8 -0
  72. package/dist/collection/components/common/zonos-logo/zonos-logo.js +4 -0
  73. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +6 -0
  74. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +4 -0
  75. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +11 -1
  76. package/dist/collection/components/common/zonos-spinner/zonos-spinner.js +4 -0
  77. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.css +162 -0
  78. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +264 -0
  79. package/dist/collection/components/common/zonos-text/zonos-text.js +8 -0
  80. package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +6 -2
  81. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +6 -2
  82. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +4 -2
  83. package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +12 -4
  84. package/dist/collection/components/component-template/zonos-component/zonos-component.js +7 -1
  85. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +7 -1
  86. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +9 -3
  87. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +17 -5
  88. package/dist/collection/components/main/zonos-controller.js +7 -3
  89. package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
  90. package/dist/collection/components/store/checkout/cart.js +3 -0
  91. package/dist/collection/components/store/checkout/stripe.js +121 -40
  92. package/dist/collection/components/store/translationStore/strings.arabic.js +21 -0
  93. package/dist/collection/components/store/translationStore/strings.base.js +21 -0
  94. package/dist/collection/components/store/translationStore/strings.chinese.js +21 -0
  95. package/dist/collection/components/store/translationStore/strings.danish.js +21 -0
  96. package/dist/collection/components/store/translationStore/strings.dutch.js +21 -0
  97. package/dist/collection/components/store/translationStore/strings.french.js +21 -0
  98. package/dist/collection/components/store/translationStore/strings.german.js +21 -0
  99. package/dist/collection/components/store/translationStore/strings.hebrew.js +21 -0
  100. package/dist/collection/components/store/translationStore/strings.indonesian.js +21 -0
  101. package/dist/collection/components/store/translationStore/strings.italian.js +21 -0
  102. package/dist/collection/components/store/translationStore/strings.japanese.js +21 -0
  103. package/dist/collection/components/store/translationStore/strings.korean.js +21 -0
  104. package/dist/collection/components/store/translationStore/strings.norwegian.js +21 -0
  105. package/dist/collection/components/store/translationStore/strings.polish.js +21 -0
  106. package/dist/collection/components/store/translationStore/strings.portuguese.js +21 -0
  107. package/dist/collection/components/store/translationStore/strings.russian.js +21 -0
  108. package/dist/collection/components/store/translationStore/strings.spanish.js +21 -0
  109. package/dist/collection/components/store/translationStore/strings.swedish.js +21 -0
  110. package/dist/collection/components/store/translationStore/strings.turkish.js +21 -0
  111. package/dist/collection/components/store/translationStore/strings.vietnamese.js +21 -0
  112. package/dist/collection/components/stripe/zonos-address/zonos-address.js +7 -1
  113. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +84 -3
  114. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +3 -1
  115. package/dist/collection/components/utils/api/getCheckoutSession.js +1 -1
  116. package/dist/collection/components/utils/api/placeTestOrder.js +40 -0
  117. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +2 -0
  118. package/dist/collection/components/utils/checkout/getIsStagingMode.js +1 -0
  119. package/dist/collection/components/utils/checkout/getIsTestMode.js +5 -1
  120. package/dist/collection/components/utils/handleFetch.js +22 -1
  121. package/dist/collection/components/utils/validateEmailValue.js +4 -0
  122. package/dist/collection/scripts/_getTempCartById.js +2 -2
  123. package/dist/collection/scripts/_getWithTestPublicCredential.js +5 -2
  124. package/dist/collection/scripts/cart/_getIsValidCartId.js +11 -0
  125. package/dist/collection/types/checkout/TaxId.js +24 -0
  126. package/dist/collection/types/checkout/api/PlaceTestOrder.js +1 -0
  127. package/dist/collection/types/generated/graphql.internal.types.js +64 -0
  128. package/dist/collection/types/index.js +2 -0
  129. package/dist/esm/{CheckoutConfig-262008fe.js → CheckoutConfig-573bd959.js} +13 -3
  130. package/dist/esm/TaxId-915ef042.js +26 -0
  131. package/dist/esm/{cart-cf87ec6f.js → cart-3427ee25.js} +547 -42
  132. package/dist/esm/{createCustomEvent-31a792d3.js → createCustomEvent-58159025.js} +1 -3
  133. package/dist/esm/{getBorderRadius-4aca63d4.js → getBorderRadius-b32d4218.js} +1 -1
  134. package/dist/esm/{handleFetch-badf4543.js → handleFetch-b4633675.js} +29 -2
  135. package/dist/esm/{index-986b5ff2.js → index-d82f06f2.js} +209 -157
  136. package/dist/esm/index.js +14 -12
  137. package/dist/esm/{isDarkColor-4915739f.js → isDarkColor-10f38df6.js} +1 -1
  138. package/dist/esm/loader.js +3 -3
  139. package/dist/esm/{paypal-b7124cc4.js → paypal-4e2f9753.js} +4 -4
  140. package/dist/esm/{zonos-address_7.entry.js → zonos-address_8.entry.js} +143 -11
  141. package/dist/esm/zonos-badge.entry.js +2 -2
  142. package/dist/esm/zonos-banner.entry.js +2 -2
  143. package/dist/esm/zonos-button_3.entry.js +4 -4
  144. package/dist/esm/zonos-card.entry.js +3 -3
  145. package/dist/esm/zonos-cart-items_13.entry.js +149 -30
  146. package/dist/esm/zonos-checkout.entry.js +34 -14
  147. package/dist/esm/zonos-collapse.entry.js +2 -2
  148. package/dist/esm/zonos-component.entry.js +2 -2
  149. package/dist/esm/zonos-controller.entry.js +8 -8
  150. package/dist/esm/zonos-country-flag.entry.js +6 -6
  151. package/dist/esm/zonos-country-select_4.entry.js +10 -10
  152. package/dist/esm/zonos-elements.js +4 -4
  153. package/dist/esm/{zonos-notification_3.entry.js → zonos-empty-state-payment_4.entry.js} +87 -10
  154. package/dist/esm/zonos-hello-dialog.entry.js +10 -10
  155. package/dist/esm/zonos-hello.entry.js +6 -6
  156. package/dist/esm/zonos-input.entry.js +3 -3
  157. package/dist/esm/zonos-language-select_2.entry.js +6 -6
  158. package/dist/esm/zonos-link.entry.js +1 -1
  159. package/dist/esm/zonos-logo.entry.js +2 -2
  160. package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
  161. package/dist/esm/zonos-text.entry.js +2 -2
  162. package/dist/esm/zonos-toggle.entry.js +4 -4
  163. package/dist/esm/zonos-tooltip.entry.js +3 -3
  164. package/dist/esm/zonos-v-stack.entry.js +4 -4
  165. package/dist/esm/{zonosStore-708637e7.js → zonosStore-44efd080.js} +1 -1
  166. package/dist/esm-es5/CheckoutConfig-573bd959.js +1 -0
  167. package/dist/esm-es5/TaxId-915ef042.js +1 -0
  168. package/dist/esm-es5/cart-3427ee25.js +1 -0
  169. package/dist/esm-es5/createCustomEvent-58159025.js +1 -0
  170. package/dist/esm-es5/{getBorderRadius-4aca63d4.js → getBorderRadius-b32d4218.js} +1 -1
  171. package/dist/esm-es5/handleFetch-b4633675.js +1 -0
  172. package/dist/esm-es5/index-d82f06f2.js +2 -0
  173. package/dist/esm-es5/index.js +1 -1
  174. package/dist/esm-es5/{isDarkColor-4915739f.js → isDarkColor-10f38df6.js} +1 -1
  175. package/dist/esm-es5/loader.js +1 -1
  176. package/dist/esm-es5/{paypal-b7124cc4.js → paypal-4e2f9753.js} +1 -1
  177. package/dist/esm-es5/zonos-address_8.entry.js +1 -0
  178. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  179. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  180. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  181. package/dist/esm-es5/zonos-card.entry.js +1 -1
  182. package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
  183. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  184. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  185. package/dist/esm-es5/zonos-component.entry.js +1 -1
  186. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  187. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  188. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  189. package/dist/esm-es5/zonos-elements.js +1 -1
  190. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -0
  191. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  192. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  193. package/dist/esm-es5/zonos-input.entry.js +1 -1
  194. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  195. package/dist/esm-es5/zonos-link.entry.js +1 -1
  196. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  197. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  198. package/dist/esm-es5/zonos-text.entry.js +1 -1
  199. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  200. package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
  201. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  202. package/dist/esm-es5/{zonosStore-708637e7.js → zonosStore-44efd080.js} +1 -1
  203. package/dist/scripts/index.d.ts +170 -0
  204. package/dist/scripts/index.js +1 -1
  205. package/dist/scripts/loadZonos.js +1 -1
  206. package/dist/scripts/zonos.js +1 -1
  207. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +1 -0
  208. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.d.ts +18 -0
  209. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.d.ts +13 -0
  210. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +10 -0
  211. package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +5 -0
  212. package/dist/types/components/common/zonos-stripe-input/zonos-stripe-input.d.ts +46 -0
  213. package/dist/types/components/store/checkout/cart.d.ts +5 -0
  214. package/dist/types/components/store/checkout/stripe.d.ts +16 -2
  215. package/dist/types/components/store/translationStore/strings.arabic.d.ts +21 -0
  216. package/dist/types/components/store/translationStore/strings.base.d.ts +21 -0
  217. package/dist/types/components/store/translationStore/strings.chinese.d.ts +21 -0
  218. package/dist/types/components/store/translationStore/strings.danish.d.ts +21 -0
  219. package/dist/types/components/store/translationStore/strings.dutch.d.ts +21 -0
  220. package/dist/types/components/store/translationStore/strings.french.d.ts +21 -0
  221. package/dist/types/components/store/translationStore/strings.german.d.ts +21 -0
  222. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +21 -0
  223. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +21 -0
  224. package/dist/types/components/store/translationStore/strings.italian.d.ts +21 -0
  225. package/dist/types/components/store/translationStore/strings.japanese.d.ts +21 -0
  226. package/dist/types/components/store/translationStore/strings.korean.d.ts +21 -0
  227. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +21 -0
  228. package/dist/types/components/store/translationStore/strings.polish.d.ts +21 -0
  229. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +21 -0
  230. package/dist/types/components/store/translationStore/strings.russian.d.ts +21 -0
  231. package/dist/types/components/store/translationStore/strings.spanish.d.ts +21 -0
  232. package/dist/types/components/store/translationStore/strings.swedish.d.ts +21 -0
  233. package/dist/types/components/store/translationStore/strings.turkish.d.ts +21 -0
  234. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +21 -0
  235. package/dist/types/components/stripe/zonos-link-authentication/zonos-link-authentication.d.ts +6 -0
  236. package/dist/types/components/utils/api/placeTestOrder.d.ts +7 -0
  237. package/dist/types/components/utils/checkout/getIsStagingMode.d.ts +1 -0
  238. package/dist/types/components/utils/checkout/getIsTestMode.d.ts +1 -1
  239. package/dist/types/components/utils/validateEmailValue.d.ts +1 -0
  240. package/dist/types/components.d.ts +161 -0
  241. package/dist/types/types/checkout/TaxId.d.ts +20 -0
  242. package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +8 -0
  243. package/dist/types/types/checkout/api/CheckoutSession.d.ts +8 -2
  244. package/dist/types/types/checkout/api/PlaceTestOrder.d.ts +7 -0
  245. package/dist/types/types/generated/graphql.internal.types.d.ts +144 -109
  246. package/dist/types/types/generated/graphql.internal.types.ts +180 -99
  247. package/dist/types/types/index.d.ts +2 -0
  248. package/dist/zonos-elements/index.esm.js +1 -1
  249. package/dist/zonos-elements/{p-68d79b58.entry.js → p-00136c20.entry.js} +1 -1
  250. package/dist/zonos-elements/{p-d381288e.entry.js → p-0028d158.entry.js} +1 -1
  251. package/dist/zonos-elements/{p-72256333.entry.js → p-05013308.entry.js} +1 -1
  252. package/dist/zonos-elements/{p-c1b098de.system.js → p-0e6a3cd2.system.js} +1 -1
  253. package/dist/zonos-elements/{p-c0164a3c.system.js → p-12546668.system.js} +1 -1
  254. package/dist/zonos-elements/p-12a6b7bd.system.js +1 -0
  255. package/dist/zonos-elements/p-1423ebbe.js +1 -0
  256. package/dist/zonos-elements/p-18e5b741.system.js +1 -0
  257. package/dist/zonos-elements/p-2deae669.entry.js +1 -0
  258. package/dist/zonos-elements/{p-36dfc7ac.system.js → p-32912caf.system.js} +1 -1
  259. package/dist/zonos-elements/{p-fc4658a6.entry.js → p-36f97fd9.entry.js} +1 -1
  260. package/dist/zonos-elements/{p-983f23a1.system.entry.js → p-3a213429.system.entry.js} +1 -1
  261. package/dist/zonos-elements/{p-e6554a6f.system.entry.js → p-3aa4841a.system.entry.js} +1 -1
  262. package/dist/zonos-elements/{p-a13d5957.system.entry.js → p-3d221556.system.entry.js} +1 -1
  263. package/dist/zonos-elements/{p-381874b0.system.entry.js → p-41e26cc4.system.entry.js} +1 -1
  264. package/dist/zonos-elements/{p-2d514c1d.system.entry.js → p-463e44b6.system.entry.js} +1 -1
  265. package/dist/zonos-elements/p-46f6e5e9.system.js +1 -0
  266. package/dist/zonos-elements/{p-6271e108.js → p-485d89a4.js} +1 -1
  267. package/dist/zonos-elements/p-48bca3d4.system.entry.js +1 -0
  268. package/dist/zonos-elements/p-4caffd96.system.js +2 -0
  269. package/dist/zonos-elements/{p-0920500d.entry.js → p-50896f89.entry.js} +1 -1
  270. package/dist/zonos-elements/{p-2e152517.system.entry.js → p-515e3606.system.entry.js} +1 -1
  271. package/dist/zonos-elements/p-5834c218.system.js +1 -0
  272. package/dist/zonos-elements/p-595f5dd2.js +1 -0
  273. package/dist/zonos-elements/p-5bd927f2.js +1 -0
  274. package/dist/zonos-elements/{p-2761ad55.system.entry.js → p-619c07c6.system.entry.js} +1 -1
  275. package/dist/zonos-elements/{p-2b8cddb7.entry.js → p-69f84611.entry.js} +1 -1
  276. package/dist/zonos-elements/{p-766dd01f.js → p-6c578d26.js} +1 -1
  277. package/dist/zonos-elements/{p-28295342.entry.js → p-709c7e9e.entry.js} +1 -1
  278. package/dist/zonos-elements/{p-0197a9bf.system.entry.js → p-7140439f.system.entry.js} +1 -1
  279. package/dist/zonos-elements/p-7302a081.system.entry.js +1 -0
  280. package/dist/zonos-elements/p-7e47f6cf.entry.js +1 -0
  281. package/dist/zonos-elements/{p-44dd4269.entry.js → p-7f288336.entry.js} +1 -1
  282. package/dist/zonos-elements/{p-0e54432c.system.entry.js → p-81084be5.system.entry.js} +1 -1
  283. package/dist/zonos-elements/p-81a5dd5c.js +1 -0
  284. package/dist/zonos-elements/p-84e5fc0b.entry.js +1 -0
  285. package/dist/zonos-elements/{p-33e1d25e.system.entry.js → p-86e825f0.system.entry.js} +1 -1
  286. package/dist/zonos-elements/{p-0b5f4ca7.system.entry.js → p-91fc6c24.system.entry.js} +1 -1
  287. package/dist/zonos-elements/p-9951462e.entry.js +1 -0
  288. package/dist/zonos-elements/{p-a2bce31d.system.entry.js → p-9cf018c8.system.entry.js} +1 -1
  289. package/dist/zonos-elements/{p-232963d3.system.entry.js → p-9e05e259.system.entry.js} +1 -1
  290. package/dist/zonos-elements/{p-6b490b0a.system.entry.js → p-a8cf3542.system.entry.js} +1 -1
  291. package/dist/zonos-elements/p-ab68ad11.js +2 -0
  292. package/dist/zonos-elements/{p-4b685549.js → p-b0616716.js} +1 -1
  293. package/dist/zonos-elements/{p-1e3ea4ae.entry.js → p-b12fbc07.entry.js} +1 -1
  294. package/dist/zonos-elements/{p-d198421b.system.entry.js → p-b2292b70.system.entry.js} +1 -1
  295. package/dist/zonos-elements/{p-58a09715.entry.js → p-b262b93e.entry.js} +1 -1
  296. package/dist/zonos-elements/{p-545c05ce.entry.js → p-b288c2ed.entry.js} +1 -1
  297. package/dist/zonos-elements/p-b3882a73.system.js +1 -0
  298. package/dist/zonos-elements/{p-9306a835.entry.js → p-b5c360af.entry.js} +1 -1
  299. package/dist/zonos-elements/{p-2cfc00b8.system.entry.js → p-b6bbdb59.system.entry.js} +1 -1
  300. package/dist/zonos-elements/{p-f295030e.system.entry.js → p-bb92882d.system.entry.js} +1 -1
  301. package/dist/zonos-elements/p-bf37ccc7.system.js +1 -0
  302. package/dist/zonos-elements/{p-21b538ea.system.js → p-c015be06.system.js} +1 -1
  303. package/dist/zonos-elements/p-c8b0bc02.system.entry.js +1 -0
  304. package/dist/zonos-elements/{p-39cac2c1.entry.js → p-cbd5d932.entry.js} +1 -1
  305. package/dist/zonos-elements/{p-7c5c0a85.entry.js → p-cdfca133.entry.js} +1 -1
  306. package/dist/zonos-elements/{p-675f60b4.entry.js → p-d2f2c685.entry.js} +1 -1
  307. package/dist/zonos-elements/{p-2c19f5e2.entry.js → p-d6061c79.entry.js} +1 -1
  308. package/dist/zonos-elements/p-da6a29e4.system.entry.js +1 -0
  309. package/dist/zonos-elements/{p-65069140.entry.js → p-db3f381d.entry.js} +1 -1
  310. package/dist/zonos-elements/{p-9dec2b74.entry.js → p-de221545.entry.js} +1 -1
  311. package/dist/zonos-elements/{p-2949faf3.entry.js → p-e01ccb27.entry.js} +1 -1
  312. package/dist/zonos-elements/{p-b0174a8f.js → p-e02fd9ae.js} +1 -1
  313. package/dist/zonos-elements/{p-3cf30d83.entry.js → p-e2f1fa53.entry.js} +1 -1
  314. package/dist/zonos-elements/{p-ebdd9b64.system.entry.js → p-e8c70c7d.system.entry.js} +1 -1
  315. package/dist/zonos-elements/{p-a8bd492d.system.entry.js → p-ea35b237.system.entry.js} +1 -1
  316. package/dist/zonos-elements/p-f0c8150e.js +1 -0
  317. package/dist/zonos-elements/p-f3b0a097.system.js +1 -0
  318. package/dist/zonos-elements/{p-d5a3851d.system.entry.js → p-fc4ebe6b.system.entry.js} +1 -1
  319. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  320. package/dist/zonos-elements/zonos-elements.js +1 -1
  321. package/package.json +9 -8
  322. package/dist/esm-es5/CheckoutConfig-262008fe.js +0 -1
  323. package/dist/esm-es5/cart-cf87ec6f.js +0 -1
  324. package/dist/esm-es5/createCustomEvent-31a792d3.js +0 -1
  325. package/dist/esm-es5/handleFetch-badf4543.js +0 -1
  326. package/dist/esm-es5/index-986b5ff2.js +0 -2
  327. package/dist/esm-es5/zonos-address_7.entry.js +0 -1
  328. package/dist/esm-es5/zonos-notification_3.entry.js +0 -1
  329. package/dist/zonos-elements/p-076388d3.entry.js +0 -1
  330. package/dist/zonos-elements/p-0cda2818.system.js +0 -1
  331. package/dist/zonos-elements/p-0d2cf216.entry.js +0 -1
  332. package/dist/zonos-elements/p-1460f917.js +0 -1
  333. package/dist/zonos-elements/p-272052bd.system.entry.js +0 -1
  334. package/dist/zonos-elements/p-3cb4468f.system.entry.js +0 -1
  335. package/dist/zonos-elements/p-3d82e70e.js +0 -1
  336. package/dist/zonos-elements/p-64372f93.system.js +0 -1
  337. package/dist/zonos-elements/p-673b4402.system.entry.js +0 -1
  338. package/dist/zonos-elements/p-680d3694.js +0 -2
  339. package/dist/zonos-elements/p-7b999a40.js +0 -1
  340. package/dist/zonos-elements/p-7c643376.system.js +0 -1
  341. package/dist/zonos-elements/p-866bb93e.system.js +0 -1
  342. package/dist/zonos-elements/p-8c487480.entry.js +0 -1
  343. package/dist/zonos-elements/p-9b720cf4.entry.js +0 -1
  344. package/dist/zonos-elements/p-a5b294d7.js +0 -1
  345. package/dist/zonos-elements/p-b50667b6.system.js +0 -2
  346. package/dist/zonos-elements/p-bfcfd29b.system.js +0 -1
  347. package/dist/zonos-elements/p-ded984d9.system.entry.js +0 -1
  348. package/dist/zonos-elements/p-e9964a5a.system.js +0 -1
@@ -2,19 +2,20 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-b678ce0c.js');
6
- const cart = require('./cart-199b0751.js');
5
+ const index = require('./index-2f90486e.js');
6
+ const cart = require('./cart-2398abd4.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
- const paypal = require('./paypal-4f1ee604.js');
9
- const zonosStore = require('./zonosStore-8971eb65.js');
10
- const createCustomEvent = require('./createCustomEvent-3e982e57.js');
11
- const getBorderRadius = require('./getBorderRadius-f97c99ad.js');
12
- const handleFetch = require('./handleFetch-864d3c53.js');
8
+ const paypal = require('./paypal-7ed9dfb7.js');
9
+ const zonosStore = require('./zonosStore-46809186.js');
10
+ const handleFetch = require('./handleFetch-3673a0c2.js');
11
+ const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
12
+ const getBorderRadius = require('./getBorderRadius-7d0772bf.js');
13
13
  const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
14
14
  const ILanguage = require('./ILanguage-98b04442.js');
15
- const isDarkColor = require('./isDarkColor-434d71dd.js');
15
+ const isDarkColor = require('./isDarkColor-2acf30d1.js');
16
16
  const isColorVariable = require('./isColorVariable-525dbfa7.js');
17
17
  const containsNonLatinChars = require('./containsNonLatinChars-2be5129b.js');
18
+ const TaxId = require('./TaxId-4632639d.js');
18
19
 
19
20
  const getDisplayCurrency = () => {
20
21
  var _a, _b;
@@ -1528,6 +1529,20 @@ const ZonosCheckoutFinish = class {
1528
1529
  cart.stripeStoreReset();
1529
1530
  cart.cartStore.checkoutSessionId = null;
1530
1531
  };
1532
+ this.checkStagingOrderStatus = async () => {
1533
+ this.notificationType = 'success';
1534
+ this.notificationTitle = cart.translate("You're all set!");
1535
+ this.notificationMessages =
1536
+ cart.stripeStoreMessageBasedOnStatus('succeeded').messages;
1537
+ // override title if notification type is success
1538
+ this.useOverrideSuccessNotification();
1539
+ await this.handleSuccessBehavior();
1540
+ // reset promo when checkout is finished
1541
+ cart.stripeStoreResetPromoCode();
1542
+ cart.stripeStoreReset();
1543
+ paypal.paypalStoreReset();
1544
+ cart.cartStore.checkoutSessionId = null;
1545
+ };
1531
1546
  this.checkPaypalPaymentStatus = async () => {
1532
1547
  // render error message if there's an error
1533
1548
  if (paypal.paypalStore.paypalErrorMessage) {
@@ -1594,7 +1609,10 @@ const ZonosCheckoutFinish = class {
1594
1609
  this.isLoading = false;
1595
1610
  return;
1596
1611
  }
1597
- if (paypal.paypalStore.orderIdCreated) {
1612
+ if (cart.cartStore.isStagingMode) {
1613
+ void this.checkStagingOrderStatus();
1614
+ }
1615
+ else if (paypal.paypalStore.orderIdCreated) {
1598
1616
  void this.checkPaypalPaymentStatus();
1599
1617
  }
1600
1618
  else {
@@ -1602,18 +1620,23 @@ const ZonosCheckoutFinish = class {
1602
1620
  }
1603
1621
  }
1604
1622
  render() {
1605
- const isTestMode = createCustomEvent.getIsTestMode();
1606
- return (index.h(index.Host, { key: '7e1b8c53a085ae60d8189aef087a9c458c3dccd0', class: "zonos--checkout-finish zonos--elements", style: {
1623
+ const isTestMode = handleFetch.getIsTestMode();
1624
+ return (index.h(index.Host, { key: '6ad050e91df2b56c55e142cc69d0b582c0c8469a', class: "zonos--checkout-finish zonos--elements", style: {
1607
1625
  '--zonos--border-radius': getBorderRadius.getBorderRadius({
1608
1626
  overrideBorderStyle: this.borderRadius,
1609
1627
  }),
1610
- } }, !this.isLoading && (index.h("div", { key: 'b31bed34ca67255cdc6ef6b546f5d6a880e4b309', class: "zonos--finish-details" }, index.h("div", { key: 'e3cb21607b8f1256b3096fe4f21a806a74174f66', class: "zonos--group" }, this.notificationType === 'success' ? (index.h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (index.h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), index.h("zonos-text", { key: 'fac1d2134f1c032cefeb9d36c5c4677767ed0972', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), index.h("zonos-text", { key: '94b8da1ca6a391295c22d285e65530f5dfe97a41', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (index.h(index.Fragment, null, message, index.h("br", null))))), this.shouldRenderCloseButtonForRedirectBehavior() && (index.h("zonos-button", { key: '4ebf2bb81ceb0d27b4fd582400606b238a3dfbae',
1628
+ } }, !this.isLoading && (index.h("div", { key: '8e47016dc83cbe1af79f384285c606fcb737e475', class: "zonos--finish-details" }, index.h("div", { key: 'd1c14e8db7aa70d04b77b10bb0d8b1e3de5529e3', class: "zonos--group" }, this.notificationType === 'success' ? (index.h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (index.h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), index.h("zonos-text", { key: 'd26717fe5d844f2fe6a87b05a566ef0da2d740f7', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), index.h("zonos-text", { key: '7845c4ff7872884d8e5b8b275eb8a76efa855e52', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (index.h(index.Fragment, null, message, index.h("br", null))))), this.shouldRenderCloseButtonForRedirectBehavior() && (index.h("zonos-button", { key: '891901ad2c4fb7c2025ad47417425cd239e36cf1',
1611
1629
  // Only show loading spinner if it's not an error notification
1612
1630
  loading: this.isWaitingToRedirect &&
1613
1631
  this.notificationType !== 'error', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, cart.translate('Close'))), !window.Zonos.isLegacyCheckout &&
1614
- this.shouldRenderKeepShoppingButton() && (index.h("zonos-button", { key: '6548724f163ad59fc3cb502c24d82ae7585c6b7f', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText))), isTestMode &&
1632
+ this.shouldRenderKeepShoppingButton() && (index.h("zonos-button", { key: '550bd94f93b842d71c23bd158362b711797dd4a1', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText))), isTestMode &&
1615
1633
  cart.cartStore.step === 'finish' &&
1616
- this.notificationType === 'success' && (index.h("div", { key: 'f9aeb5d59dc4b0f163868e5a2358a69a0884bb56', class: "zonos--finish-button-wrapper" }, index.h("zonos-button", { key: '98ae907d33624e54f84f88519abacd1ea178554c', backgroundColor: "gray-0", buttonColor: "gray-1000", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), index.h("zonos-button", { key: '506eeb9eabe16fed59b98b9eef49552542272233', onClick: () => this.redirectToUrl(`/orders/all`), size: "lg", variant: "primary" }, "View order in Dashboard")))))));
1634
+ this.notificationType === 'success' && (index.h("div", { key: '8fdaa205f4517e0a9a6c5482e80d6dbccba6a585', class: "zonos--finish-button-wrapper" }, index.h("zonos-button", { key: '41b524fc8dea752a6f4745191970ac665e7b9fa8', backgroundColor: "gray-0", buttonColor: "gray-1000", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), index.h("zonos-button", { key: '70297a07cc8d3c11545776d600d8a1a2a3c2a744', onClick: () => {
1635
+ const isZonosDashboard = window.location.hostname.includes('dashboard.zonos.com');
1636
+ this.redirectToUrl(isZonosDashboard
1637
+ ? '/orders/all'
1638
+ : 'https://dashboard.zonos.com/orders/all');
1639
+ }, size: "lg", variant: "primary" }, "View order in Dashboard")))))));
1617
1640
  }
1618
1641
  static get assetsDirs() { return ["assets"]; }
1619
1642
  };
@@ -1673,6 +1696,44 @@ const ZonosCheckoutFooter = class {
1673
1696
  };
1674
1697
  ZonosCheckoutFooter.style = ZonosCheckoutFooterStyle0;
1675
1698
 
1699
+ const placeTestOrder = async () => {
1700
+ var _a, _b;
1701
+ const shipToPartyId = (_a = cart.cartStore.partiesData.find(party => party.type === 'DESTINATION')) === null || _a === void 0 ? void 0 : _a.id;
1702
+ const billToPartyId = (_b = cart.cartStore.partiesData.find(party => party.type === 'PAYOR')) === null || _b === void 0 ? void 0 : _b.id;
1703
+ const checkoutSessionId = cart.cartStore.checkoutSessionId;
1704
+ if (!checkoutSessionId || !billToPartyId || !shipToPartyId) {
1705
+ handleFetch.logError('Missing required data', {
1706
+ billToPartyId,
1707
+ checkoutSessionId,
1708
+ shipToPartyId,
1709
+ });
1710
+ return {
1711
+ errors: ['Missing required data'],
1712
+ json: null,
1713
+ };
1714
+ }
1715
+ const payload = {
1716
+ billToPartyId,
1717
+ checkoutSessionId,
1718
+ shipToPartyId,
1719
+ };
1720
+ const { errors, json } = await handleFetch.handleFetch('/api/zonos-elements/place-test-order', {
1721
+ body: payload,
1722
+ method: 'POST',
1723
+ });
1724
+ if (errors.length || !json) {
1725
+ handleFetch.logError('Error occurs when placing test order', errors);
1726
+ return {
1727
+ errors: errors.map(error => error.message),
1728
+ json: null,
1729
+ };
1730
+ }
1731
+ return {
1732
+ errors: [],
1733
+ json,
1734
+ };
1735
+ };
1736
+
1676
1737
  const CheckmarkLineIcon = `<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M15.342 10.21a.75.75 0 0 0-1.184-.92l-2.978 3.829-1.4-1.4a.75.75 0 1 0-1.06 1.061l1.8 1.8a1 1 0 0 0 1.496-.093l3.326-4.277Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>`;
1677
1738
 
1678
1739
  const RemoveLineIcon = `<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>`;
@@ -1710,11 +1771,31 @@ const ZonosCheckoutPayment = class {
1710
1771
  type: 'success',
1711
1772
  });
1712
1773
  };
1774
+ this.placeTestOrder = async () => {
1775
+ this.internalContinueLoading = true;
1776
+ const { errors } = await placeTestOrder();
1777
+ if (errors.length) {
1778
+ this.stagingOrderCreateErrorMessage =
1779
+ errors[0] || 'Failed to create staging order. Please try again.';
1780
+ this.internalContinueLoading = false;
1781
+ return;
1782
+ }
1783
+ this.internalContinueLoading = false;
1784
+ // continue to the next step
1785
+ cart.cartStoreNextStep();
1786
+ };
1713
1787
  this.submitBtnType = undefined;
1714
1788
  this.continueLoading = false;
1715
1789
  this.submitBtnColor = undefined;
1790
+ this.isMobile = false;
1791
+ this.overridePrimaryColor = undefined;
1716
1792
  this.showErrorBanner = false;
1717
1793
  this.hasStripePaymentError = false;
1794
+ this.stagingOrderCreateErrorMessage = '';
1795
+ this.internalContinueLoading = this.continueLoading;
1796
+ }
1797
+ continueLoadingWatcher() {
1798
+ this.internalContinueLoading = this.continueLoading;
1718
1799
  }
1719
1800
  stripePaymentErrorWatcher() {
1720
1801
  if (this.hasStripePaymentError) {
@@ -1737,26 +1818,44 @@ const ZonosCheckoutPayment = class {
1737
1818
  if (this.showErrorBanner) {
1738
1819
  this.showErrorBanner = !this.handleValidate();
1739
1820
  }
1740
- const isTestMode = createCustomEvent.getIsTestMode();
1821
+ const isTestMode = handleFetch.getIsTestMode();
1822
+ const isStagingMode = cart.cartStore.isStagingMode || handleFetch.getIsStagingMode();
1741
1823
  const isPaypalTabSelected = ((_a = cart.stripeStore.stripePaymentEventData) === null || _a === void 0 ? void 0 : _a.value.type) === 'external_paypal';
1742
- return (index.h(index.Host, { class: "zonos--checkout-payment zonos--elements" }, index.h("div", { class: "zonos--group" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, cart.translate('Payment method')), this.showErrorBanner && (index.h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, cart.translate('Missing required fields. Make sure all fields are completed.'))), this.hasStripePaymentError && (index.h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, cart.stripeStore.customErrorMessage ||
1743
- cart.translate("We couldn't complete your payment. Please verify the payment details and try again."))), paypal.paypalStore.paypalErrorMessage && (index.h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, paypal.paypalStore.paypalErrorMessage)), index.h("zonos-payment", null), index.h("div", { class: "zonos--group-btn" }, !isPaypalTabSelected && (index.h("zonos-button", { backgroundColor: this.submitBtnColor, loading: this.continueLoading, onClick: () => {
1744
- this.continueClickHandler();
1745
- }, size: "lg",
1746
- // use primary type when on mobile mode
1747
- variant: this.submitBtnType }, cart.translate('Pay [orderTotal]', {
1748
- orderTotal: renderCheckoutCurrency({
1749
- amount: cart.cartStore.total,
1750
- isForeign: true,
1751
- }),
1752
- }))), index.h("zonos-paypal-payment", { onPaypalSessionDone: ({ detail: { orderId } }) => {
1753
- this.paypalSessionDone.emit(orderId);
1754
- }, onPaypalSessionFail: () => this.paypalSessionFailed.emit(), style: {
1755
- display: isPaypalTabSelected ? 'block' : 'none',
1756
- } })), isTestMode && (index.h("zonos-card", { backgroundColor: "gray-100", borderRadius: 12, class: "zonos--test-cards" }, index.h("zonos-v-stack", { spacing: 16 }, index.h("div", null, index.h("zonos-text", { type: "semiBoldLabel" }, cart.translate('Test cards')), index.h("zonos-text", { textColor: "gray-700" }, cart.translate('Click to copy the card number. Use any future expiration date and three number CVC.'))), index.h("zonos-button", { icon: index.h("zonos-icon", { content: CheckmarkLineIcon }), justifyContent: "flex-start", onClick: () => this.copyCardToClipboard('4242424242424242') }, cart.translate('Success'), " (****4242)"), index.h("zonos-button", { icon: index.h("zonos-icon", { content: RemoveLineIcon }), justifyContent: "flex-start", onClick: () => this.copyCardToClipboard('4000000000000002') }, cart.translate('Failure'), " (****0002)")), index.h("zonos-notification", null))))));
1824
+ const renderPayment = () => {
1825
+ if (isStagingMode) {
1826
+ const { colorPrimary } = zonosStore.zonosStore.appearance;
1827
+ const themeBasedColor = colorPrimary && isDarkColor.isDarkColor(colorPrimary) ? 'DARK' : 'LIGHT';
1828
+ // If in mobile, use the theme from the store since the UI is solely by theme
1829
+ const theme = this.isMobile
1830
+ ? zonosStore.zonosStore.appearance.theme
1831
+ : themeBasedColor;
1832
+ return (index.h(index.Fragment, null, this.stagingOrderCreateErrorMessage && (index.h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, this.stagingOrderCreateErrorMessage)), index.h("zonos-empty-state-payment", { emptyStateText: cart.translate('No payment method needed for staging'), theme: theme }), index.h("div", { class: "zonos--group-btn" }, index.h("zonos-button", { backgroundColor: this.submitBtnColor, loading: this.internalContinueLoading, onClick: () => {
1833
+ void this.placeTestOrder();
1834
+ }, size: "lg",
1835
+ // use primary type when on mobile mode
1836
+ variant: this.submitBtnType }, cart.translate('Place test order')))));
1837
+ }
1838
+ return (index.h(index.Fragment, null, this.showErrorBanner && (index.h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, cart.translate('Missing required fields. Make sure all fields are completed.'))), this.hasStripePaymentError && (index.h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, cart.stripeStore.customErrorMessage ||
1839
+ cart.translate("We couldn't complete your payment. Please verify the payment details and try again."))), paypal.paypalStore.paypalErrorMessage && (index.h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, paypal.paypalStore.paypalErrorMessage)), index.h("zonos-payment", null), index.h("div", { class: "zonos--group-btn" }, !isPaypalTabSelected && (index.h("zonos-button", { backgroundColor: this.submitBtnColor, loading: this.continueLoading, onClick: () => {
1840
+ this.continueClickHandler();
1841
+ }, size: "lg",
1842
+ // use primary type when on mobile mode
1843
+ variant: this.submitBtnType }, cart.translate('Pay [orderTotal]', {
1844
+ orderTotal: renderCheckoutCurrency({
1845
+ amount: cart.cartStore.total,
1846
+ isForeign: true,
1847
+ }),
1848
+ }))), index.h("zonos-paypal-payment", { onPaypalSessionDone: ({ detail: { orderId } }) => {
1849
+ this.paypalSessionDone.emit(orderId);
1850
+ }, onPaypalSessionFail: () => this.paypalSessionFailed.emit(), style: {
1851
+ display: isPaypalTabSelected ? 'block' : 'none',
1852
+ } })), isTestMode && (index.h("zonos-card", { backgroundColor: "gray-100", borderRadius: 12, class: "zonos--test-cards" }, index.h("zonos-v-stack", { spacing: 16 }, index.h("div", null, index.h("zonos-text", { type: "semiBoldLabel" }, cart.translate('Test cards')), index.h("zonos-text", { textColor: "gray-700" }, cart.translate('Click to copy the card number. Use any future expiration date and three number CVC.'))), index.h("zonos-button", { icon: index.h("zonos-icon", { content: CheckmarkLineIcon }), justifyContent: "flex-start", onClick: () => this.copyCardToClipboard('4242424242424242') }, cart.translate('Success'), " (****4242)"), index.h("zonos-button", { icon: index.h("zonos-icon", { content: RemoveLineIcon }), justifyContent: "flex-start", onClick: () => this.copyCardToClipboard('4000000000000002') }, cart.translate('Failure'), " (****0002)")), index.h("zonos-notification", null)))));
1853
+ };
1854
+ return (index.h(index.Host, { class: "zonos--checkout-payment zonos--elements" }, index.h("div", { class: "zonos--group" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, cart.translate('Payment method')), renderPayment())));
1757
1855
  }
1758
1856
  get ele() { return index.getElement(this); }
1759
1857
  static get watchers() { return {
1858
+ "continueLoading": ["continueLoadingWatcher"],
1760
1859
  "hasStripePaymentError": ["stripePaymentErrorWatcher"]
1761
1860
  }; }
1762
1861
  };
@@ -2034,7 +2133,7 @@ const ZonosCurrencyToggle = class {
2034
2133
  static get assetsDirs() { return ["assets"]; }
2035
2134
  };
2036
2135
 
2037
- const zonosCustomerInfoCss = ".sc-zonos-customer-info-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:20px}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:32px}.sc-zonos-customer-info-h .zonos--address.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info+.zonos--address.sc-zonos-customer-info{margin-bottom:0}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:20px;overflow:auto;padding:5px;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:-5px;padding-top:8px;margin-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:100%}";
2136
+ const zonosCustomerInfoCss = ".sc-zonos-customer-info-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:20px}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:32px}.sc-zonos-customer-info-h .zonos--address.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info+.zonos--address.sc-zonos-customer-info{margin-bottom:0}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--tax-id-input.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:20px;overflow:auto;padding:5px;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:-5px;padding-top:8px;margin-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:100%}";
2038
2137
  const ZonosCustomerInfoStyle0 = zonosCustomerInfoCss;
2039
2138
 
2040
2139
  const ZonosCustomerInfo = class {
@@ -2200,6 +2299,26 @@ const ZonosCustomerInfo = class {
2200
2299
  }
2201
2300
  return invalidList;
2202
2301
  }
2302
+ isInTaxIdCountry(countryCode) {
2303
+ return TaxId.countryRequireTaxId.includes(countryCode);
2304
+ }
2305
+ /**
2306
+ * Render tax id input based on ship to country code
2307
+ */
2308
+ renderTaxIdInput(countryCode) {
2309
+ // Don't render tax id input if the country is not provided
2310
+ if (!countryCode) {
2311
+ return null;
2312
+ }
2313
+ const isCountryRequireTaxId = this.isInTaxIdCountry(countryCode);
2314
+ if (!isCountryRequireTaxId) {
2315
+ return null;
2316
+ }
2317
+ const taxIdInputInfo = TaxId.shipToTaxIdLabels[countryCode];
2318
+ return (index.h("div", { class: "zonos--tax-id-input" }, index.h("zonos-stripe-input", { inputLabel: cart.translate(taxIdInputInfo.friendlyName), inputPlaceholder: taxIdInputInfo.placeholder, inputValue: cart.stripeStore.taxId || '', onInputChange: (event) => {
2319
+ cart.stripeStore.taxId = event.detail;
2320
+ } })));
2321
+ }
2203
2322
  render() {
2204
2323
  var _a, _b;
2205
2324
  if (!cart.stripeStore.stripeElements) {
@@ -2224,7 +2343,7 @@ const ZonosCustomerInfo = class {
2224
2343
  if (this.showErrorBanner) {
2225
2344
  this.showErrorBanner = !this.handleValidate();
2226
2345
  }
2227
- return (index.h(index.Host, { class: "zonos--customer-info zonos--elements" }, index.h("div", { class: "zonos--group" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, cart.translate('Customer information')), this.showErrorBanner && (index.h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, cart.translate('Missing required fields. Make sure all fields are completed.'))), index.h("zonos-link-authentication", { defaultEmail: (_b = this.defaultAddress) === null || _b === void 0 ? void 0 : _b.email, isEmailError: this.isEmailError, onLinkAuthenticationChange: this.handleEmailValidation, titleText: cart.translate('Contact') }), index.h("zonos-address", { defaultAddress: this.defaultAddress, titleText: cart.translate('Address'), type: "shipping" }), index.h("zonos-checkbox", { class: "zonos--shipping-same-as-billing-cbx", isChecked: cart.stripeStore.stripeShippingSameAsBilling, label: cart.translate('Shipping address same as billing'), onCheckboxSelected: e => {
2346
+ return (index.h(index.Host, { class: "zonos--customer-info zonos--elements" }, index.h("div", { class: "zonos--group" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, cart.translate('Customer information')), this.showErrorBanner && (index.h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, cart.translate('Missing required fields. Make sure all fields are completed.'))), index.h("zonos-link-authentication", { defaultEmail: (_b = this.defaultAddress) === null || _b === void 0 ? void 0 : _b.email, isEmailError: this.isEmailError, onLinkAuthenticationChange: this.handleEmailValidation, titleText: cart.translate('Contact') }), index.h("zonos-address", { defaultAddress: this.defaultAddress, titleText: cart.translate('Address'), type: "shipping" }), this.renderTaxIdInput(this.shippingCountry), index.h("zonos-checkbox", { class: "zonos--shipping-same-as-billing-cbx", isChecked: cart.stripeStore.stripeShippingSameAsBilling, label: cart.translate('Shipping address same as billing'), onCheckboxSelected: e => {
2228
2347
  cart.stripeStore.stripeShippingSameAsBilling = e.detail;
2229
2348
  } }), index.h("zonos-collapse", { collapsed: !showBilling }, index.h("zonos-address", { defaultAddress: this.defaultAddress, titleText: cart.translate('Billing address'), type: "billing" })), index.h("div", { class: "zonos--group-btn" }, index.h("zonos-button", { backgroundColor: this.submitBtnColor, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
2230
2349
  // use primary type when on mobile mode
@@ -2,18 +2,18 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-b678ce0c.js');
6
- const cart = require('./cart-199b0751.js');
7
- const paypal = require('./paypal-4f1ee604.js');
8
- const zonosStore = require('./zonosStore-8971eb65.js');
9
- const handleFetch = require('./handleFetch-864d3c53.js');
10
- const createCustomEvent = require('./createCustomEvent-3e982e57.js');
5
+ const index = require('./index-2f90486e.js');
6
+ const cart = require('./cart-2398abd4.js');
7
+ const paypal = require('./paypal-7ed9dfb7.js');
8
+ const zonosStore = require('./zonosStore-46809186.js');
9
+ const handleFetch = require('./handleFetch-3673a0c2.js');
11
10
  const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
12
11
  const classes = require('./classes-b7918f56.js');
13
- const getBorderRadius = require('./getBorderRadius-f97c99ad.js');
14
- const isDarkColor = require('./isDarkColor-434d71dd.js');
12
+ const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
13
+ const getBorderRadius = require('./getBorderRadius-7d0772bf.js');
14
+ const isDarkColor = require('./isDarkColor-2acf30d1.js');
15
15
  const styles = require('./styles-d1e64fb9.js');
16
- const CheckoutConfig = require('./CheckoutConfig-eaaf62a1.js');
16
+ const CheckoutConfig = require('./CheckoutConfig-d25d548d.js');
17
17
  const RemoveIcon = require('./RemoveIcon-081ac073.js');
18
18
 
19
19
  /**
@@ -274,7 +274,7 @@ const ZonosCheckout = class {
274
274
  this.handleCartExpiredCheck = () => {
275
275
  var _a;
276
276
  // don't check for cart expiration if the cart is in test mode
277
- if (createCustomEvent.getIsTestMode()) {
277
+ if (handleFetch.getIsTestMode()) {
278
278
  handleFetch.log('Not checking for cart expiration in test mode');
279
279
  return false;
280
280
  }
@@ -373,6 +373,7 @@ const ZonosCheckout = class {
373
373
  this.appearanceSettingsOverride = undefined;
374
374
  this.preview = false;
375
375
  this.mobile = false;
376
+ this.overrideStagingMode = undefined;
376
377
  this.defaultAddress = null;
377
378
  this.forceDialogOpen = false;
378
379
  this.defaultAddressParams = null;
@@ -390,6 +391,7 @@ const ZonosCheckout = class {
390
391
  this.isCartExpired = false;
391
392
  this.inventoryCheckErrorMessage = null;
392
393
  this.placedOrderInfo = null;
394
+ this.clientSecret = cart.stripeStore.clientSecret;
393
395
  }
394
396
  /**
395
397
  * Init cart info handler event
@@ -446,7 +448,7 @@ const ZonosCheckout = class {
446
448
  const isExpired = this.handleCartExpiredCheck();
447
449
  if (isExpired) {
448
450
  // Do not proceed if the cart is expired
449
- return;
451
+ return false;
450
452
  }
451
453
  const { adjustments, cartItems } = buildCartItemsByTempCart(window.Zonos.cartData);
452
454
  await cart.cartStoreUpdateItems({ adjustments, cartItems });
@@ -460,13 +462,13 @@ const ZonosCheckout = class {
460
462
  const cartData = cartResult === null || cartResult === void 0 ? void 0 : cartResult.cartData;
461
463
  if (!cartData) {
462
464
  handleFetch.logError('Failed to build cart, please try again.');
463
- return;
465
+ return false;
464
466
  }
465
467
  window.Zonos.cartData = cartData;
466
468
  const isExpired = this.handleCartExpiredCheck();
467
469
  if (isExpired) {
468
470
  // Do not proceed if the cart is expired
469
- return;
471
+ return false;
470
472
  }
471
473
  const { adjustments, cartItems } = buildCartItemsByTempCart(cartData);
472
474
  await cart.cartStoreUpdateItems({ adjustments, cartItems });
@@ -758,12 +760,21 @@ const ZonosCheckout = class {
758
760
  phone,
759
761
  };
760
762
  }
763
+ overrideStagingModeChanged() {
764
+ cart.cartStore.isStagingMode = !!this.overrideStagingMode;
765
+ }
761
766
  /**
762
767
  * Setup all of the event listeners for the component on first load
763
768
  */
764
769
  async init() {
765
770
  cart.stripeStore.stripe = window.Zonos.stripe;
766
771
  this.stripe = window.Zonos.stripe;
772
+ // Set staging mode on init
773
+ cart.cartStore.isStagingMode = handleFetch.getIsStagingMode();
774
+ // Override staging mode if it's provided
775
+ if (typeof this.overrideStagingMode !== 'undefined') {
776
+ cart.cartStore.isStagingMode = this.overrideStagingMode;
777
+ }
767
778
  // check if bigcommerce, if user enters the shipping address that's in the shipping zone at bigcommerce checkout
768
779
  watchBigcommerceDomesticCheckout({
769
780
  domesticRedirectedBtnSelector: CheckoutConfig.domesticRedirectedBtnSelector,
@@ -1002,6 +1013,10 @@ const ZonosCheckout = class {
1002
1013
  handleAddressChange() {
1003
1014
  cart.stripeStoreReset();
1004
1015
  }
1016
+ handleClientSecretChange() {
1017
+ // apply theme to stripe elements
1018
+ void this.applyStripeTheme();
1019
+ }
1005
1020
  handleOpenChange() {
1006
1021
  const overflowAttrKey = 'data-zonos-overflow-origin';
1007
1022
  const body = document.body;
@@ -1066,6 +1081,8 @@ const ZonosCheckout = class {
1066
1081
  }
1067
1082
  render() {
1068
1083
  var _a, _b, _c, _d;
1084
+ // Set client secret so that we can add this to @Watch listener
1085
+ this.clientSecret = cart.stripeStore.clientSecret;
1069
1086
  const dialogLoading =
1070
1087
  // if it's last step, don't need to check stripe elements
1071
1088
  (cart.cartStore.step !== 'finish' &&
@@ -1093,13 +1110,14 @@ const ZonosCheckout = class {
1093
1110
  : logoUrl;
1094
1111
  return (index.h("div", { class: "zonos--logo" }, logo && (index.h("img", { alt: `${zonosStore.zonosStore.organizationName} logo`, src: logo }))));
1095
1112
  };
1096
- const isTestMode = createCustomEvent.getIsTestMode();
1113
+ const isTestMode = handleFetch.getIsTestMode();
1097
1114
  const renderTopHeader = () => {
1098
1115
  const urlParams = new URLSearchParams(window.location.search);
1099
1116
  const zonosQaUrl = urlParams.get('zonosQaUrl');
1100
1117
  const zonosDebug = urlParams.get('zonosDebug');
1101
1118
  const zonosE2ETest = urlParams.get('zonosE2ETest');
1102
- return (index.h("zonos-v-stack", null, index.h("div", { class: "zonos--logo-wrapper" }, renderLogo(), isTestMode && (index.h("zonos-badge", { badgeColor: "orange", size: "small" }, cart.translate('Test mode'))), zonosDebug === '1' && (index.h("zonos-badge", { badgeColor: "cyan", size: "small" }, "debug")), zonosQaUrl && (index.h("zonos-badge", { badgeColor: "purple", size: "small" }, zonosQaUrl)), zonosE2ETest && (index.h("zonos-badge", { badgeColor: "gray", size: "small" }, "E2E Test"))), index.h("zonos-checkout-progress-tabs", { backgroundColor:
1119
+ const zonosStagingMode = this.overrideStagingMode || handleFetch.getIsStagingMode();
1120
+ return (index.h("zonos-v-stack", null, index.h("div", { class: "zonos--logo-wrapper" }, renderLogo(), isTestMode && (index.h("zonos-badge", { badgeColor: "orange", size: "small" }, cart.translate('Test mode'))), zonosStagingMode && (index.h("zonos-badge", { badgeColor: "red", size: "small" }, cart.translate('Staging mode'))), zonosDebug === '1' && (index.h("zonos-badge", { badgeColor: "cyan", size: "small" }, "debug")), zonosQaUrl && (index.h("zonos-badge", { badgeColor: "purple", size: "small" }, zonosQaUrl)), zonosE2ETest && (index.h("zonos-badge", { badgeColor: "gray", size: "small" }, "E2E Test"))), index.h("zonos-checkout-progress-tabs", { backgroundColor:
1103
1121
  // only use different contrast color when the secondary color is too off with the background in mobile
1104
1122
  this.isMobile ? '--zonos-elements-gray-0' : null }), filteredMessages.map(x => (index.h("zonos-custom-message", { icon: MessageIcon, message: x.message })))));
1105
1123
  };
@@ -1115,7 +1133,7 @@ const ZonosCheckout = class {
1115
1133
  '--zonos--primary-color': !this.isMobile
1116
1134
  ? colorPrimary
1117
1135
  : undefined,
1118
- }) }, !this.isMobile && renderTopHeader(), cart.cartStore.step === 'customer-info' && (index.h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.defaultAddress || this.defaultAddressParams, isMobile: this.isMobile, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor })), cart.cartStore.step === 'shipping' && (index.h("zonos-shipping", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor })), cart.cartStore.step === 'payment' && (index.h("zonos-checkout-payment", { continueLoading: this.submitLoading, onContinueClicked: async () => {
1136
+ }) }, !this.isMobile && renderTopHeader(), cart.cartStore.step === 'customer-info' && (index.h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.defaultAddress || this.defaultAddressParams, isMobile: this.isMobile, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor })), cart.cartStore.step === 'shipping' && (index.h("zonos-shipping", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor })), cart.cartStore.step === 'payment' && (index.h("zonos-checkout-payment", { continueLoading: this.submitLoading, isMobile: this.isMobile, onContinueClicked: async () => {
1119
1137
  await this.handleStripePaymentContinue();
1120
1138
  }, submitBtnColor: submitButtonColor }))), index.h("div", { class: "zonos--right", "data-theme": rightSideTheme }, this.isMobile && renderTopHeader(), index.h("div", { class: "zonos--right-actions" }, window.Zonos.showBaseForeign && (index.h("zonos-currency-toggle", null)), !this.isLegacyCheckout && (index.h("zonos-button", { class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon.RemoveIcon }), noBackground: true, onClick: () => this.closeDialogHandler() }))), index.h("div", { class: "flex--wrapper" }, index.h("div", { class: "zonos--wrapper" }, index.h("zonos-review", { collapsed: this.collapseReviewMobile, mobile: this.isMobile, onClick: () => {
1121
1139
  // do nothing if it's not mobile
@@ -1182,8 +1200,10 @@ const ZonosCheckout = class {
1182
1200
  static get assetsDirs() { return ["assets"]; }
1183
1201
  static get watchers() { return {
1184
1202
  "appearanceSettingsOverride": ["appearanceSettingsOverrideChanged", "handleAppearanceSettingsOverrideChange"],
1203
+ "overrideStagingMode": ["overrideStagingModeChanged"],
1185
1204
  "mobile": ["handleMobileChange"],
1186
1205
  "defaultAddress": ["handleAddressChange"],
1206
+ "clientSecret": ["handleClientSecretChange"],
1187
1207
  "open": ["handleOpenChange"]
1188
1208
  }; }
1189
1209
  };
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-b678ce0c.js');
6
- const zonosStore = require('./zonosStore-8971eb65.js');
5
+ const index = require('./index-2f90486e.js');
6
+ const zonosStore = require('./zonosStore-46809186.js');
7
7
 
8
8
  const zonosCollapseCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";
9
9
  const ZonosCollapseStyle0 = zonosCollapseCss;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-b678ce0c.js');
5
+ const index = require('./index-2f90486e.js');
6
6
 
7
7
  function format(first, middle, last) {
8
8
  return ((first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : ''));
@@ -22,7 +22,7 @@ const ZonosComponent = class {
22
22
  return format(this.first, this.middle, this.last);
23
23
  }
24
24
  render() {
25
- return index.h("div", { key: '564c34a7a93a16b8e619a0e140f8d99fabc91c34' }, "Hello, World! I'm ", this.getText());
25
+ return index.h("div", { key: '63b0c771133fd495f36e2c67601d64d6e56f5f2b' }, "Hello, World! I'm ", this.getText());
26
26
  }
27
27
  };
28
28
  ZonosComponent.style = ZonosComponentStyle0;
@@ -2,12 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-b678ce0c.js');
6
- const cart = require('./cart-199b0751.js');
7
- const zonosStore = require('./zonosStore-8971eb65.js');
8
- const handleFetch = require('./handleFetch-864d3c53.js');
9
- require('./isDarkColor-434d71dd.js');
10
- require('./getBorderRadius-f97c99ad.js');
5
+ const index = require('./index-2f90486e.js');
6
+ const cart = require('./cart-2398abd4.js');
7
+ const zonosStore = require('./zonosStore-46809186.js');
8
+ const handleFetch = require('./handleFetch-3673a0c2.js');
9
+ require('./isDarkColor-2acf30d1.js');
10
+ require('./getBorderRadius-7d0772bf.js');
11
11
 
12
12
  const getZonosSettings = async () => {
13
13
  const { errors, json, zonosMode } = await handleFetch.handleFetch('/api/zonos-elements/zonos-settings');
@@ -325,7 +325,7 @@ const ZonosController = class {
325
325
  */
326
326
  async reset() {
327
327
  cart.cartStore.checkoutSessionId = null;
328
- cart.stripeStore.clientSecret = null;
328
+ cart.stripeStore.clientSecret = '';
329
329
  }
330
330
  /**
331
331
  * Override the setting
@@ -357,7 +357,7 @@ const ZonosController = class {
357
357
  zonosStore.zonosStore.organizationName = organizationName;
358
358
  }
359
359
  render() {
360
- return index.h(index.Host, { key: '7cdde4733b47d96c6539a6bd9c78f150de8a6eb4', class: "zonos--elements" });
360
+ return index.h(index.Host, { key: 'ab190aefdb7b90e03ec8f4f2da73a05c3416c776', class: "zonos--elements" });
361
361
  }
362
362
  };
363
363
  ZonosController.style = ZonosControllerStyle0;
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-b678ce0c.js');
6
- const cart = require('./cart-199b0751.js');
7
- const zonosStore = require('./zonosStore-8971eb65.js');
5
+ const index = require('./index-2f90486e.js');
6
+ const cart = require('./cart-2398abd4.js');
7
+ const zonosStore = require('./zonosStore-46809186.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
- require('./handleFetch-864d3c53.js');
10
- require('./isDarkColor-434d71dd.js');
11
- require('./getBorderRadius-f97c99ad.js');
9
+ require('./handleFetch-3673a0c2.js');
10
+ require('./isDarkColor-2acf30d1.js');
11
+ require('./getBorderRadius-7d0772bf.js');
12
12
 
13
13
  const zonosCountryFlagCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .flag-container{position:relative;overflow:hidden;width:100%;height:100%}:host .flag-icon{position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:cover}";
14
14
  const ZonosCountryFlagStyle0 = zonosCountryFlagCss;
@@ -2,14 +2,14 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-b678ce0c.js');
6
- const cart = require('./cart-199b0751.js');
7
- const zonosStore = require('./zonosStore-8971eb65.js');
5
+ const index = require('./index-2f90486e.js');
6
+ const cart = require('./cart-2398abd4.js');
7
+ const zonosStore = require('./zonosStore-46809186.js');
8
8
  const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
9
- const isDarkColor = require('./isDarkColor-434d71dd.js');
9
+ const isDarkColor = require('./isDarkColor-2acf30d1.js');
10
10
  const ILanguage = require('./ILanguage-98b04442.js');
11
- require('./handleFetch-864d3c53.js');
12
- require('./getBorderRadius-f97c99ad.js');
11
+ require('./handleFetch-3673a0c2.js');
12
+ require('./getBorderRadius-7d0772bf.js');
13
13
 
14
14
  /**
15
15
  * Fuse.js v7.0.0 - Lightweight fuzzy-search (http://fusejs.io)
@@ -1897,9 +1897,9 @@ const ZonosHelloDialogFooter = class {
1897
1897
  const language = (_b = ILanguage.languages.find(x => x.code === cart.localizationStore.selectedLocale)) === null || _b === void 0 ? void 0 : _b.translatedLabel;
1898
1898
  // Only use gray-0 (white) when the background color is dark (apply inverted color if the element is using dark theme variable)
1899
1899
  const mainColor = primaryColor && isDarkColor.isDarkColor(primaryColor) ? 'white' : 'black';
1900
- return (index.h(index.Host, { key: '458b65efb2fc1e6cf5f7c5588601add4af010de6', class: "zonos--elements" }, index.h("div", { key: 'ee8eb8cf4a3e0a5583f5fb15842a86adb443e421', class: "zonos--hello-dialog-footer", style: {
1900
+ return (index.h(index.Host, { key: 'f84d021e99271bd6a00da32edd35fdc5e0520c5a', class: "zonos--elements" }, index.h("div", { key: 'db35a5022b1ef1a70e3cace021fcc14d6e8ea987', class: "zonos--hello-dialog-footer", style: {
1901
1901
  '--zonos--primary-color': primaryColor,
1902
- } }, index.h("a", { key: 'fa6ab85dae56620a30275dd25c10011bf129545e', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, index.h("zonos-icon", { key: '413b1d69091e5bf4ba639ea66e4930acc0636074', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: mainColor, size: 108 })), index.h("div", { key: 'be2881c022690d5a6bcb9c38a50287a427f4fc32', class: "zonos--hello-locale-wrapper" }, index.h("zonos-button", { key: '79480397f8c59a435b1f9a4604441500991741a3', buttonColor: mainColor, icon: index.h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: mainColor }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, language), index.h("zonos-button", { key: 'c23ae8fa589d754ca93680006d6a45af2b440db6', buttonColor: mainColor, icon: index.h("zonos-country-flag", { "aria-label": "Open country select", class: "zonos--footer-country-flag", countryCode: cart.localizationStore.selectedCountryCode }), onClick: () => this.setShowCountrySelect(true), variant: "subtle" }, cart.localizationStore.selectedCountryCode)))));
1902
+ } }, index.h("a", { key: 'bbbc50bf395e2658239e2a1a0342122b04e43a5f', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, index.h("zonos-icon", { key: '3c80a7ba8dd9509d45bde7de20e7689f632aedc8', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: mainColor, size: 108 })), index.h("div", { key: 'add64f376e48cc71f6b5672aafe7b1ef62ab2354', class: "zonos--hello-locale-wrapper" }, index.h("zonos-button", { key: 'a0a5059ad4a48b2cc3ea05696aa79ffce33b4bf2', buttonColor: mainColor, icon: index.h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: mainColor }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, language), index.h("zonos-button", { key: '2608dba553f846c5016e8395dbce079beda0aa5a', buttonColor: mainColor, icon: index.h("zonos-country-flag", { "aria-label": "Open country select", class: "zonos--footer-country-flag", countryCode: cart.localizationStore.selectedCountryCode }), onClick: () => this.setShowCountrySelect(true), variant: "subtle" }, cart.localizationStore.selectedCountryCode)))));
1903
1903
  }
1904
1904
  get ele() { return index.getElement(this); }
1905
1905
  };
@@ -1961,12 +1961,12 @@ const ZonosVirtualScroll = class {
1961
1961
  } }, this.renderItem(i)));
1962
1962
  accHeight += itemHeight;
1963
1963
  }
1964
- return (index.h(index.Host, { key: 'c09f341c0436d53ad245f0dc4ed54d5ead9a0e39' }, index.h("div", { key: 'e7f9cbb0dd33d0fab1bffd01672e9f5a3bc11f04',
1964
+ return (index.h(index.Host, { key: '0f132a5b60586fb22d1d5536aa7abef6199e0748' }, index.h("div", { key: 'a947229cd3d53b79312855cf8ddf8c9985035e1e',
1965
1965
  // to capture scroll action
1966
1966
  class: "scroller", style: {
1967
1967
  height: `${this.totalHeight}px`,
1968
1968
  width: `${W}px`,
1969
- } }), index.h("div", { key: '93071acbc731dda4e9a1f453aa76526cd1639191',
1969
+ } }), index.h("div", { key: '63013fe7bc53d76152fda74e7b6ef054e7c3a9ef',
1970
1970
  // to display items
1971
1971
  class: "item-container", ref: el => (this.container = el), style: {
1972
1972
  height: `${this.totalHeight}px`,