@zonos/elements 1.3.232 → 1.3.234

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 (415) hide show
  1. package/dist/cjs/{cart-bc615014.js → cart-22ced7cc.js} +33 -29
  2. package/dist/cjs/{shouldRenderTaxIdInput-9b8a8de1.js → containsNonLatinChars-2be5129b.js} +0 -23
  3. package/dist/cjs/{hasInclusivePrice-84145546.js → hasInclusivePrice-ca85cabd.js} +1 -1
  4. package/dist/cjs/index.cjs.js +11 -7
  5. package/dist/cjs/invoice-8fd4242c.js +151 -0
  6. package/dist/cjs/{renderFallback-c2576fbe.js → isCollectMobileTablet-7962c57f.js} +2 -11
  7. package/dist/cjs/isInvoiceMobileTablet-dde41e4e.js +15 -0
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/{translationStore-08d3ff9c.js → localization-8ef6250a.js} +1059 -1
  10. package/dist/cjs/{paypal-1d6f1a71.js → paypal-4a086f84.js} +7 -8
  11. package/dist/cjs/placeTestOrder-f25d08ee.js +45 -0
  12. package/dist/cjs/{placeTestOrder-a5469e40.js → renderCheckoutCurrency-5494e45b.js} +2 -42
  13. package/dist/cjs/renderFallback-78b54537.js +12 -0
  14. package/dist/cjs/shouldRenderTaxIdInput-eda13ef8.js +25 -0
  15. package/dist/cjs/throttle-7dd64984.js +76 -0
  16. package/dist/cjs/{zonos-address_11.cjs.entry.js → zonos-address-display_9.cjs.entry.js} +62 -668
  17. package/dist/cjs/zonos-address_4.cjs.entry.js +715 -0
  18. package/dist/cjs/zonos-badge.cjs.entry.js +3 -3
  19. package/dist/cjs/{zonos-banner_2.cjs.entry.js → zonos-banner.cjs.entry.js} +0 -40
  20. package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
  21. package/dist/cjs/{zonos-empty-state-payment_4.cjs.entry.js → zonos-card_5.cjs.entry.js} +44 -6
  22. package/dist/cjs/{zonos-cart-items_13.cjs.entry.js → zonos-cart-items_12.cjs.entry.js} +81 -94
  23. package/dist/cjs/zonos-checkout.cjs.entry.js +20 -21
  24. package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
  25. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +5 -6
  26. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +66 -65
  27. package/dist/cjs/zonos-collect.cjs.entry.js +25 -25
  28. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  29. package/dist/cjs/zonos-controller.cjs.entry.js +39 -10
  30. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -2
  31. package/dist/cjs/zonos-country-select_4.cjs.entry.js +10 -11
  32. package/dist/cjs/zonos-elements.cjs.js +1 -1
  33. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +30 -31
  34. package/dist/cjs/zonos-hello.cjs.entry.js +7 -8
  35. package/dist/cjs/zonos-input.cjs.entry.js +4 -4
  36. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +94 -0
  37. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +686 -0
  38. package/dist/cjs/zonos-invoice.cjs.entry.js +466 -0
  39. package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -6
  40. package/dist/cjs/zonos-link.cjs.entry.js +24 -0
  41. package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
  42. package/dist/cjs/zonos-stripe-input.cjs.entry.js +5 -5
  43. package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
  44. package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
  45. package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
  46. package/dist/collection/collection-manifest.json +8 -0
  47. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +3 -1
  48. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +3 -1
  49. package/dist/collection/components/checkout/zonos-invoice/assets/ChevronDownIcon.svg +1 -0
  50. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/assets/empty-item.jpeg +0 -0
  51. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.css +72 -0
  52. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.js +87 -0
  53. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/assets/RemoveIcon.svg +1 -0
  54. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/assets/SuccessIcon.svg +1 -0
  55. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.css +90 -0
  56. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +405 -0
  57. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/chevronDownIcon.svg +1 -0
  58. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/globe.svg +3 -0
  59. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/zonosIconDark.svg +10 -0
  60. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/zonosIconLight.svg +10 -0
  61. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/zonosWordmark.svg +7 -0
  62. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.css +155 -0
  63. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.js +165 -0
  64. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/assets/ChevronDownIcon.svg +1 -0
  65. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/assets/ChevronUpIcon.svg +1 -0
  66. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/zonos-invoice-order-details.css +117 -0
  67. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/zonos-invoice-order-details.js +175 -0
  68. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/assets/CheckmarkLineIcon.svg +1 -0
  69. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/assets/RemoveLineIcon.svg +1 -0
  70. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.css +98 -0
  71. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.js +368 -0
  72. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.css +71 -0
  73. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.js +151 -0
  74. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.css +83 -0
  75. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.js +65 -0
  76. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice.css +350 -0
  77. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice.js +545 -0
  78. package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
  79. package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
  80. package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
  81. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
  82. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
  83. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  84. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
  85. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +3 -3
  86. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  87. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
  88. package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +2 -2
  89. package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
  90. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  91. package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
  92. package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +1 -1
  93. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  94. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
  95. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  96. package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +1 -1
  97. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +5 -5
  98. package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +5 -5
  99. package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +5 -5
  100. package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
  101. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  102. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  103. package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
  104. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  105. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  106. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
  107. package/dist/collection/components/main/zonos-controller.js +45 -4
  108. package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
  109. package/dist/collection/components/store/checkout/invoice.js +148 -0
  110. package/dist/collection/components/store/checkout/stripe.js +8 -3
  111. package/dist/collection/components/store/translationStore/strings.arabic.js +9 -0
  112. package/dist/collection/components/store/translationStore/strings.base.js +9 -0
  113. package/dist/collection/components/store/translationStore/strings.chinese.js +9 -0
  114. package/dist/collection/components/store/translationStore/strings.danish.js +9 -0
  115. package/dist/collection/components/store/translationStore/strings.dutch.js +9 -0
  116. package/dist/collection/components/store/translationStore/strings.french.js +9 -0
  117. package/dist/collection/components/store/translationStore/strings.german.js +9 -0
  118. package/dist/collection/components/store/translationStore/strings.hebrew.js +9 -0
  119. package/dist/collection/components/store/translationStore/strings.indonesian.js +9 -0
  120. package/dist/collection/components/store/translationStore/strings.italian.js +9 -0
  121. package/dist/collection/components/store/translationStore/strings.japanese.js +9 -0
  122. package/dist/collection/components/store/translationStore/strings.korean.js +9 -0
  123. package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -0
  124. package/dist/collection/components/store/translationStore/strings.polish.js +9 -0
  125. package/dist/collection/components/store/translationStore/strings.portuguese.js +9 -0
  126. package/dist/collection/components/store/translationStore/strings.russian.js +9 -0
  127. package/dist/collection/components/store/translationStore/strings.spanish.js +9 -0
  128. package/dist/collection/components/store/translationStore/strings.swedish.js +9 -0
  129. package/dist/collection/components/store/translationStore/strings.turkish.js +9 -0
  130. package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -0
  131. package/dist/collection/components/stripe/zonos-address/zonos-address.js +8 -5
  132. package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
  133. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
  134. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  135. package/dist/collection/components/utils/checkout/initInvoice.js +15 -0
  136. package/dist/collection/components/utils/checkout/isInvoiceMobileTablet.js +10 -0
  137. package/dist/collection/scripts/_zonosBase.js +4 -0
  138. package/dist/esm/{cart-14f305b3.js → cart-66aecbb3.js} +9 -5
  139. package/dist/esm/{shouldRenderTaxIdInput-8bc112bb.js → containsNonLatinChars-2d8810c3.js} +1 -23
  140. package/dist/esm/{hasInclusivePrice-0eda8ba9.js → hasInclusivePrice-2a1bf474.js} +1 -1
  141. package/dist/esm/index.js +11 -7
  142. package/dist/esm/invoice-c7452847.js +146 -0
  143. package/dist/esm/{renderFallback-dbf1e3ae.js → isCollectMobileTablet-921002b0.js} +3 -11
  144. package/dist/esm/isInvoiceMobileTablet-1f7b614e.js +12 -0
  145. package/dist/esm/loader.js +1 -1
  146. package/dist/esm/{translationStore-690c4e04.js → localization-04b05867.js} +1041 -2
  147. package/dist/esm/{paypal-fded8844.js → paypal-56564874.js} +2 -3
  148. package/dist/esm/placeTestOrder-6b9eda9e.js +43 -0
  149. package/dist/esm/{placeTestOrder-2250f719.js → renderCheckoutCurrency-cb808110.js} +3 -42
  150. package/dist/esm/renderFallback-3f010b48.js +10 -0
  151. package/dist/esm/shouldRenderTaxIdInput-d45ceeb4.js +23 -0
  152. package/dist/esm/throttle-ce2432ab.js +74 -0
  153. package/dist/esm/{zonos-address_11.entry.js → zonos-address-display_9.entry.js} +32 -636
  154. package/dist/esm/zonos-address_4.entry.js +708 -0
  155. package/dist/esm/zonos-badge.entry.js +3 -3
  156. package/dist/esm/{zonos-banner_2.entry.js → zonos-banner.entry.js} +1 -40
  157. package/dist/esm/zonos-button_3.entry.js +3 -3
  158. package/dist/esm/{zonos-empty-state-payment_4.entry.js → zonos-card_5.entry.js} +44 -7
  159. package/dist/esm/{zonos-cart-items_13.entry.js → zonos-cart-items_12.entry.js} +21 -33
  160. package/dist/esm/zonos-checkout.entry.js +3 -4
  161. package/dist/esm/zonos-collapse.entry.js +2 -2
  162. package/dist/esm/zonos-collect-cart-items_3.entry.js +5 -6
  163. package/dist/esm/zonos-collect-finish_6.entry.js +7 -6
  164. package/dist/esm/zonos-collect.entry.js +5 -5
  165. package/dist/esm/zonos-component.entry.js +1 -1
  166. package/dist/esm/zonos-controller.entry.js +39 -10
  167. package/dist/esm/zonos-country-flag.entry.js +1 -2
  168. package/dist/esm/zonos-country-select_4.entry.js +10 -11
  169. package/dist/esm/zonos-elements.js +1 -1
  170. package/dist/esm/zonos-hello-dialog.entry.js +6 -7
  171. package/dist/esm/zonos-hello.entry.js +1 -2
  172. package/dist/esm/zonos-input.entry.js +4 -4
  173. package/dist/esm/zonos-invoice-cart-items_2.entry.js +89 -0
  174. package/dist/esm/zonos-invoice-finish_5.entry.js +678 -0
  175. package/dist/esm/zonos-invoice.entry.js +462 -0
  176. package/dist/esm/zonos-language-select_2.entry.js +5 -6
  177. package/dist/esm/zonos-link.entry.js +20 -0
  178. package/dist/esm/zonos-logo.entry.js +2 -2
  179. package/dist/esm/zonos-stripe-input.entry.js +5 -5
  180. package/dist/esm/zonos-toggle.entry.js +2 -2
  181. package/dist/esm/zonos-tooltip.entry.js +2 -2
  182. package/dist/esm/zonos-v-stack.entry.js +2 -2
  183. package/dist/esm-es5/cart-66aecbb3.js +1 -0
  184. package/dist/esm-es5/containsNonLatinChars-2d8810c3.js +1 -0
  185. package/dist/esm-es5/{hasInclusivePrice-0eda8ba9.js → hasInclusivePrice-2a1bf474.js} +1 -1
  186. package/dist/esm-es5/index.js +1 -1
  187. package/dist/esm-es5/invoice-c7452847.js +1 -0
  188. package/dist/esm-es5/isCollectMobileTablet-921002b0.js +1 -0
  189. package/dist/esm-es5/isInvoiceMobileTablet-1f7b614e.js +1 -0
  190. package/dist/esm-es5/loader.js +1 -1
  191. package/dist/esm-es5/localization-04b05867.js +1 -0
  192. package/dist/esm-es5/{paypal-fded8844.js → paypal-56564874.js} +1 -1
  193. package/dist/esm-es5/placeTestOrder-6b9eda9e.js +1 -0
  194. package/dist/esm-es5/renderCheckoutCurrency-cb808110.js +1 -0
  195. package/dist/esm-es5/renderFallback-3f010b48.js +1 -0
  196. package/dist/esm-es5/shouldRenderTaxIdInput-d45ceeb4.js +1 -0
  197. package/dist/esm-es5/throttle-ce2432ab.js +1 -0
  198. package/dist/esm-es5/zonos-address-display_9.entry.js +1 -0
  199. package/dist/esm-es5/zonos-address_4.entry.js +1 -0
  200. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  201. package/dist/esm-es5/zonos-banner.entry.js +1 -0
  202. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  203. package/dist/esm-es5/zonos-card_5.entry.js +1 -0
  204. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -0
  205. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  206. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  207. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  208. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  209. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  210. package/dist/esm-es5/zonos-component.entry.js +1 -1
  211. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  212. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  213. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  214. package/dist/esm-es5/zonos-elements.js +1 -1
  215. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  216. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  217. package/dist/esm-es5/zonos-input.entry.js +1 -1
  218. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -0
  219. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -0
  220. package/dist/esm-es5/zonos-invoice.entry.js +1 -0
  221. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  222. package/dist/esm-es5/zonos-link.entry.js +1 -0
  223. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  224. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  225. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  226. package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
  227. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  228. package/dist/scripts/index.d.ts +356 -0
  229. package/dist/scripts/index.js +1 -1
  230. package/dist/scripts/loadZonos.js +1 -1
  231. package/dist/scripts/zonos.js +1 -1
  232. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.d.ts +10 -0
  233. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.d.ts +50 -0
  234. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.d.ts +25 -0
  235. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-order-details/zonos-invoice-order-details.d.ts +28 -0
  236. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.d.ts +62 -0
  237. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.d.ts +22 -0
  238. package/dist/types/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.d.ts +7 -0
  239. package/dist/types/components/checkout/zonos-invoice/zonos-invoice.d.ts +86 -0
  240. package/dist/types/components/main/zonos-controller.d.ts +4 -0
  241. package/dist/types/components/store/checkout/invoice.d.ts +19 -0
  242. package/dist/types/components/store/translationStore/strings.arabic.d.ts +9 -0
  243. package/dist/types/components/store/translationStore/strings.base.d.ts +9 -0
  244. package/dist/types/components/store/translationStore/strings.chinese.d.ts +9 -0
  245. package/dist/types/components/store/translationStore/strings.danish.d.ts +9 -0
  246. package/dist/types/components/store/translationStore/strings.dutch.d.ts +9 -0
  247. package/dist/types/components/store/translationStore/strings.french.d.ts +9 -0
  248. package/dist/types/components/store/translationStore/strings.german.d.ts +9 -0
  249. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +9 -0
  250. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +9 -0
  251. package/dist/types/components/store/translationStore/strings.italian.d.ts +9 -0
  252. package/dist/types/components/store/translationStore/strings.japanese.d.ts +9 -0
  253. package/dist/types/components/store/translationStore/strings.korean.d.ts +9 -0
  254. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +9 -0
  255. package/dist/types/components/store/translationStore/strings.polish.d.ts +9 -0
  256. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +9 -0
  257. package/dist/types/components/store/translationStore/strings.russian.d.ts +9 -0
  258. package/dist/types/components/store/translationStore/strings.spanish.d.ts +9 -0
  259. package/dist/types/components/store/translationStore/strings.swedish.d.ts +9 -0
  260. package/dist/types/components/store/translationStore/strings.turkish.d.ts +9 -0
  261. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +9 -0
  262. package/dist/types/components/utils/checkout/initInvoice.d.ts +1 -0
  263. package/dist/types/components/utils/checkout/isInvoiceMobileTablet.d.ts +4 -0
  264. package/dist/types/components.d.ts +351 -0
  265. package/dist/types/scripts/_zonosBase.d.ts +5 -0
  266. package/dist/types/types/checkout/api/CheckoutSession.d.ts +4 -0
  267. package/dist/types/types/checkout/api/PartyInfo.d.ts +21 -0
  268. package/dist/zonos-elements/index.esm.js +1 -1
  269. package/dist/zonos-elements/p-00719e49.entry.js +1 -0
  270. package/dist/zonos-elements/p-01b0a2e2.js +1 -0
  271. package/dist/zonos-elements/p-01dada4e.js +1 -0
  272. package/dist/zonos-elements/p-0c64dbbb.js +1 -0
  273. package/dist/zonos-elements/p-0cd5bcb3.entry.js +1 -0
  274. package/dist/zonos-elements/p-0e82fcea.entry.js +1 -0
  275. package/dist/zonos-elements/p-10316d4d.system.entry.js +1 -0
  276. package/dist/zonos-elements/{p-0a90dd80.system.entry.js → p-121c60c1.system.entry.js} +1 -1
  277. package/dist/zonos-elements/{p-bf9d889f.entry.js → p-14314ad3.entry.js} +1 -1
  278. package/dist/zonos-elements/p-170314a3.js +1 -0
  279. package/dist/zonos-elements/p-17a09191.entry.js +1 -0
  280. package/dist/zonos-elements/p-18bc6c7a.entry.js +1 -0
  281. package/dist/zonos-elements/{p-a25428eb.system.js → p-18d20206.system.js} +2 -2
  282. package/dist/zonos-elements/p-1a30fe18.system.entry.js +1 -0
  283. package/dist/zonos-elements/{p-c7b658cb.entry.js → p-1c4d12f0.entry.js} +1 -1
  284. package/dist/zonos-elements/p-1f3549c6.js +1 -0
  285. package/dist/zonos-elements/p-2250e585.entry.js +1 -0
  286. package/dist/zonos-elements/p-248dd596.system.entry.js +1 -0
  287. package/dist/zonos-elements/{p-5f398c28.entry.js → p-264690d7.entry.js} +1 -1
  288. package/dist/zonos-elements/p-2670438c.system.js +1 -0
  289. package/dist/zonos-elements/p-27f6930b.js +1 -0
  290. package/dist/zonos-elements/{p-eea0eb57.system.entry.js → p-2f869f2c.system.entry.js} +1 -1
  291. package/dist/zonos-elements/p-30c661b3.system.entry.js +1 -0
  292. package/dist/zonos-elements/p-34bf7bbe.system.js +1 -0
  293. package/dist/zonos-elements/p-38913b2f.entry.js +1 -0
  294. package/dist/zonos-elements/p-3bec13dd.system.js +1 -0
  295. package/dist/zonos-elements/{p-00ec22b2.entry.js → p-43a22d85.entry.js} +1 -1
  296. package/dist/zonos-elements/p-44b50260.entry.js +1 -0
  297. package/dist/zonos-elements/p-48dc96f9.system.entry.js +1 -0
  298. package/dist/zonos-elements/p-4aa86184.system.entry.js +1 -0
  299. package/dist/zonos-elements/p-4d594c8e.system.js +1 -0
  300. package/dist/zonos-elements/p-4ffbb0d6.system.js +1 -0
  301. package/dist/zonos-elements/{p-452fb638.system.entry.js → p-5062dcf3.system.entry.js} +1 -1
  302. package/dist/zonos-elements/{p-c5cb2364.system.entry.js → p-57cee1b5.system.entry.js} +1 -1
  303. package/dist/zonos-elements/p-59a76f73.entry.js +1 -0
  304. package/dist/zonos-elements/{p-d556c6d1.system.entry.js → p-5afb9260.system.entry.js} +1 -1
  305. package/dist/zonos-elements/p-5e9b45f7.entry.js +1 -0
  306. package/dist/zonos-elements/{p-88ea9f82.entry.js → p-6626d240.entry.js} +1 -1
  307. package/dist/zonos-elements/p-6688473e.entry.js +1 -0
  308. package/dist/zonos-elements/p-6f23a26a.system.js +1 -0
  309. package/dist/zonos-elements/{p-82739127.js → p-73c737aa.js} +2 -2
  310. package/dist/zonos-elements/p-757d4c62.system.entry.js +1 -0
  311. package/dist/zonos-elements/p-7aa50ef2.entry.js +1 -0
  312. package/dist/zonos-elements/p-7e17667d.js +1 -0
  313. package/dist/zonos-elements/p-7e469c5c.entry.js +1 -0
  314. package/dist/zonos-elements/p-7f91617c.system.entry.js +1 -0
  315. package/dist/zonos-elements/p-81e3eb5b.js +1 -0
  316. package/dist/zonos-elements/p-82febf70.system.js +1 -0
  317. package/dist/zonos-elements/{p-770852bf.system.entry.js → p-836db369.system.entry.js} +1 -1
  318. package/dist/zonos-elements/p-83b3f824.system.entry.js +1 -0
  319. package/dist/zonos-elements/p-851011aa.system.entry.js +1 -0
  320. package/dist/zonos-elements/{p-936b54c1.entry.js → p-865536f0.entry.js} +1 -1
  321. package/dist/zonos-elements/{p-b1fd1ec2.system.entry.js → p-8792fef2.system.entry.js} +1 -1
  322. package/dist/zonos-elements/p-890bfc42.system.entry.js +1 -0
  323. package/dist/zonos-elements/{p-c288c6da.system.entry.js → p-89a5e936.system.entry.js} +1 -1
  324. package/dist/zonos-elements/p-8af188f8.system.js +1 -0
  325. package/dist/zonos-elements/p-8d3a62fb.entry.js +1 -0
  326. package/dist/zonos-elements/{p-00ac999f.system.entry.js → p-8dc025c7.system.entry.js} +1 -1
  327. package/dist/zonos-elements/p-944d00da.entry.js +1 -0
  328. package/dist/zonos-elements/p-9479f155.system.js +1 -0
  329. package/dist/zonos-elements/p-95dc475b.system.js +1 -0
  330. package/dist/zonos-elements/p-976afc17.system.js +1 -0
  331. package/dist/zonos-elements/p-97d56c21.system.entry.js +1 -0
  332. package/dist/zonos-elements/p-9b9bfb6d.entry.js +1 -0
  333. package/dist/zonos-elements/{p-55e2e4ed.entry.js → p-9f1bd9b8.entry.js} +1 -1
  334. package/dist/zonos-elements/p-9fa32fdf.js +1 -0
  335. package/dist/zonos-elements/p-a2a0bf4e.js +1 -0
  336. package/dist/zonos-elements/p-a610c24e.system.entry.js +1 -0
  337. package/dist/zonos-elements/{p-9b8750f3.entry.js → p-aedd3911.entry.js} +1 -1
  338. package/dist/zonos-elements/{p-db628e49.system.entry.js → p-b5c31ca4.system.entry.js} +1 -1
  339. package/dist/zonos-elements/p-ba456282.system.entry.js +1 -0
  340. package/dist/zonos-elements/{p-31af91f0.entry.js → p-bd603c1a.entry.js} +1 -1
  341. package/dist/zonos-elements/p-c2442878.system.js +1 -1
  342. package/dist/zonos-elements/p-dc5fb21c.js +1 -0
  343. package/dist/zonos-elements/p-dc94d7eb.js +1 -0
  344. package/dist/zonos-elements/p-e5e64e16.system.js +1 -0
  345. package/dist/zonos-elements/{p-540cec7e.system.entry.js → p-e9e6bea7.system.entry.js} +1 -1
  346. package/dist/zonos-elements/p-eb9ee025.system.js +1 -0
  347. package/dist/zonos-elements/p-ed8ae947.system.entry.js +1 -0
  348. package/dist/zonos-elements/p-f1d9dd4e.entry.js +1 -0
  349. package/dist/zonos-elements/p-f3962950.system.entry.js +1 -0
  350. package/dist/zonos-elements/p-f4e976ae.entry.js +1 -0
  351. package/dist/zonos-elements/p-f513b231.entry.js +1 -0
  352. package/dist/zonos-elements/p-f64207fa.system.entry.js +1 -0
  353. package/dist/zonos-elements/{p-31975752.entry.js → p-fa322dc1.entry.js} +1 -1
  354. package/dist/zonos-elements/p-fb9fb873.system.entry.js +1 -0
  355. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  356. package/package.json +1 -1
  357. package/dist/cjs/localization-39516612.js +0 -884
  358. package/dist/cjs/zonos-confirm-dialog_2.cjs.entry.js +0 -168
  359. package/dist/esm/localization-c5029ffc.js +0 -863
  360. package/dist/esm/zonos-confirm-dialog_2.entry.js +0 -163
  361. package/dist/esm-es5/cart-14f305b3.js +0 -1
  362. package/dist/esm-es5/localization-c5029ffc.js +0 -1
  363. package/dist/esm-es5/placeTestOrder-2250f719.js +0 -1
  364. package/dist/esm-es5/renderFallback-dbf1e3ae.js +0 -1
  365. package/dist/esm-es5/shouldRenderTaxIdInput-8bc112bb.js +0 -1
  366. package/dist/esm-es5/translationStore-690c4e04.js +0 -1
  367. package/dist/esm-es5/zonos-address_11.entry.js +0 -1
  368. package/dist/esm-es5/zonos-banner_2.entry.js +0 -1
  369. package/dist/esm-es5/zonos-cart-items_13.entry.js +0 -1
  370. package/dist/esm-es5/zonos-confirm-dialog_2.entry.js +0 -1
  371. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +0 -1
  372. package/dist/zonos-elements/p-03ff7b01.system.entry.js +0 -1
  373. package/dist/zonos-elements/p-100f6a88.system.entry.js +0 -1
  374. package/dist/zonos-elements/p-143d706b.entry.js +0 -1
  375. package/dist/zonos-elements/p-14d7489d.js +0 -1
  376. package/dist/zonos-elements/p-1d5aa016.system.js +0 -1
  377. package/dist/zonos-elements/p-1eae4987.entry.js +0 -1
  378. package/dist/zonos-elements/p-23b45714.system.entry.js +0 -1
  379. package/dist/zonos-elements/p-2557b96b.js +0 -1
  380. package/dist/zonos-elements/p-2ca8b037.entry.js +0 -1
  381. package/dist/zonos-elements/p-2dbcecf4.entry.js +0 -1
  382. package/dist/zonos-elements/p-30e835a8.entry.js +0 -1
  383. package/dist/zonos-elements/p-316f9052.system.entry.js +0 -1
  384. package/dist/zonos-elements/p-3185968f.entry.js +0 -1
  385. package/dist/zonos-elements/p-4e41143a.system.entry.js +0 -1
  386. package/dist/zonos-elements/p-52b87408.system.entry.js +0 -1
  387. package/dist/zonos-elements/p-561be3a2.system.js +0 -1
  388. package/dist/zonos-elements/p-5c680f72.js +0 -1
  389. package/dist/zonos-elements/p-5f77d19e.js +0 -1
  390. package/dist/zonos-elements/p-60469388.system.entry.js +0 -1
  391. package/dist/zonos-elements/p-652e80f0.system.js +0 -1
  392. package/dist/zonos-elements/p-74ca7739.entry.js +0 -1
  393. package/dist/zonos-elements/p-767a31a8.system.js +0 -1
  394. package/dist/zonos-elements/p-78a6e775.system.js +0 -1
  395. package/dist/zonos-elements/p-7c705c76.system.js +0 -1
  396. package/dist/zonos-elements/p-81ba2820.system.entry.js +0 -1
  397. package/dist/zonos-elements/p-8a23bbf5.js +0 -1
  398. package/dist/zonos-elements/p-905d2490.entry.js +0 -1
  399. package/dist/zonos-elements/p-93f2e1ee.system.entry.js +0 -1
  400. package/dist/zonos-elements/p-a0a4e43d.system.entry.js +0 -1
  401. package/dist/zonos-elements/p-a2819807.system.entry.js +0 -1
  402. package/dist/zonos-elements/p-a6e74856.entry.js +0 -1
  403. package/dist/zonos-elements/p-ae940a99.js +0 -1
  404. package/dist/zonos-elements/p-b7ea5f4f.system.entry.js +0 -1
  405. package/dist/zonos-elements/p-c1ecab92.entry.js +0 -1
  406. package/dist/zonos-elements/p-c50cc926.entry.js +0 -1
  407. package/dist/zonos-elements/p-cf765af3.system.js +0 -1
  408. package/dist/zonos-elements/p-e03e1a62.entry.js +0 -1
  409. package/dist/zonos-elements/p-e7874318.system.entry.js +0 -1
  410. package/dist/zonos-elements/p-e8949e7e.entry.js +0 -1
  411. package/dist/zonos-elements/p-ea0b5d10.system.js +0 -1
  412. package/dist/zonos-elements/p-eae3462c.entry.js +0 -1
  413. package/dist/zonos-elements/p-eeb1081e.js +0 -1
  414. package/dist/zonos-elements/p-f892595d.system.entry.js +0 -1
  415. package/dist/zonos-elements/p-fd3b46ee.entry.js +0 -1
@@ -0,0 +1,462 @@
1
+ import { r as registerInstance, h, H as Host, F as Fragment } from './index-0bbe9693.js';
2
+ import { c as stripeStore, i as initStripeElements, d as stripeStoreRetrievePayment, e as cartStore, o as cartStoreUpdateToErrorState, f as cartStoreUpdateItems, k as stripeStoreInitCheckoutSession, l as stripeStoreGetPaymentIntent, u as stripeStoreUpdateCheckoutSessionBaseCurrency, w as stripeStoreConfirmPayment, B as stripeStoreOnChange, y as stripeStoreReset, g as cartStoreReset } from './cart-66aecbb3.js';
3
+ import { i as invoiceStoreUpdateSelectedShippingOption, a as invoiceStoreInitShippingInfo, b as invoiceStoreAsyncAddressUpdate, c as invoiceStore } from './invoice-c7452847.js';
4
+ import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-56564874.js';
5
+ import { s as storageStore, t as translate, c as localizationStoreOnChange, d as currencyFormat, l as localizationStore } from './localization-04b05867.js';
6
+ import { z as zonosStore } from './zonosStore-b434e436.js';
7
+ import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-a117f75d.js';
8
+ import { h as handleFetch, s as sendErrorLog, l as logError, g as getIsTestMode } from './handleFetch-a844cac1.js';
9
+ import { i as isInvoiceMobile, a as isInvoiceTablet } from './isInvoiceMobileTablet-1f7b614e.js';
10
+ import { c as classes } from './classes-0d95c529.js';
11
+ import { l as log } from './VarianceTest-572cecf5.js';
12
+ import { l as languages } from './ILanguage-cd6acb72.js';
13
+ import './isDarkColor-9ddd90cc.js';
14
+ import './getBorderRadius-877f6389.js';
15
+
16
+ const ChevronDownIcon = `<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
17
+
18
+ const zonosInvoiceCss = ".sc-zonos-invoice-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-invoice-h *.sc-zonos-invoice{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-invoice-h img.sc-zonos-invoice{max-width:100%}.sc-zonos-invoice-h dl.sc-zonos-invoice,.sc-zonos-invoice-h dd.sc-zonos-invoice,.sc-zonos-invoice-h h1.sc-zonos-invoice,.sc-zonos-invoice-h h2.sc-zonos-invoice,.sc-zonos-invoice-h h3.sc-zonos-invoice,.sc-zonos-invoice-h h4.sc-zonos-invoice,.sc-zonos-invoice-h h5.sc-zonos-invoice,.sc-zonos-invoice-h h6.sc-zonos-invoice,.sc-zonos-invoice-h hr.sc-zonos-invoice,.sc-zonos-invoice-h figure.sc-zonos-invoice,.sc-zonos-invoice-h p.sc-zonos-invoice,.sc-zonos-invoice-h pre.sc-zonos-invoice{margin:0}.sc-zonos-invoice-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-invoice-h{z-index:2147483647;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:0;width:100%;height:100%;-ms-flex-align:center;align-items:center;background-color:var(--zonos-elements-gray-0)}.sc-zonos-invoice-h *.sc-zonos-invoice{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar{width:10px}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;width:100%;-ms-flex-pack:center;justify-content:center}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{-ms-flex:1;flex:1;padding:56px 80px 60px;max-width:800px}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200);overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{background-color:var(--zonos-elements-gray-0)}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice{width:100%;max-width:1400px;max-height:100%;height:calc(100% - 100px);overflow:hidden;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice .zonos--header.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice .zonos--logo.sc-zonos-invoice{margin-bottom:0}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice zonos-checkout-finish.sc-zonos-invoice{-ms-flex:1;flex:1}.sc-zonos-invoice-h .zonos--header-title.sc-zonos-invoice,.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{max-width:800px}.sc-zonos-invoice-h .zonos--left.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-invoice-h .zonos--left.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice{padding:0 8px 8px}.sc-zonos-invoice-h .zonos--left.sc-zonos-invoice .zonos--payment-error-banner.sc-zonos-invoice{margin-top:24px}.sc-zonos-invoice-h .zonos--right.sc-zonos-invoice{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-invoice-h .zonos--right.sc-zonos-invoice .zonos--order-details-container.sc-zonos-invoice{overflow:hidden}.sc-zonos-invoice-h .zonos--wrapper.sc-zonos-invoice{overflow:auto;max-height:100%;position:relative}.sc-zonos-invoice-h .flex--wrapper.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-invoice-h .zonos--logo-wrapper.sc-zonos-invoice{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}.sc-zonos-invoice-h .zonos--logo-wrapper.sc-zonos-invoice>*.sc-zonos-invoice{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-invoice-h .zonos--header-right.sc-zonos-invoice{display:none}.sc-zonos-invoice-h .zonos--logo.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-invoice-h .zonos--logo.sc-zonos-invoice img.sc-zonos-invoice{max-height:70px;-o-object-position:left center;object-position:left center;-o-object-fit:contain;object-fit:contain}.sc-zonos-invoice-h .zonos--invoice-container.sc-zonos-invoice{overflow:visible}.mobile.sc-zonos-invoice-h,.tablet.sc-zonos-invoice-h{min-width:auto}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{padding-bottom:0}}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--review.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--review.sc-zonos-invoice{margin-bottom:0}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--cart-items.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--cart-items.sc-zonos-invoice{margin-top:8px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice zonos-checkout-footer.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice zonos-checkout-footer.sc-zonos-invoice{-ms-flex-order:3;order:3}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice{max-height:100%}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--footer.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--footer.sc-zonos-invoice{-ms-flex-order:3;order:3}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice{width:auto}.mobile.sc-zonos-invoice-h .zonos--cart-subtotal.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--cart-subtotal.sc-zonos-invoice{margin:0}.mobile.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{position:-webkit-sticky;position:sticky;top:0;width:100%;padding:16px;background-color:var(--zonos-elements-gray-0);z-index:3}.mobile.sc-zonos-invoice-h .zonos--header-title.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--header-title.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{max-width:800px;padding:0 16px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{overflow:auto;-ms-flex-pack:unset;justify-content:unset;-ms-flex-align:center;align-items:center;gap:24px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{overflow:visible;width:100%}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{gap:32px}.mobile.sc-zonos-invoice-h .flex--wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .flex--wrapper.sc-zonos-invoice{margin-top:0}.mobile.sc-zonos-invoice-h zonos-collect-footer.sc-zonos-invoice,.tablet.sc-zonos-invoice-h zonos-collect-footer.sc-zonos-invoice{-ms-flex-order:3;order:3;left:0}.tablet.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{padding-top:56px;top:-56px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--header-right.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.mobile.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{padding-top:28px;top:-28px}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw;background:var(--zonos-elements-surface-color);-webkit-box-shadow:var(--zonos-elements-v3-shadow-xl);box-shadow:var(--zonos-elements-v3-shadow-xl);border-radius:var(--zonos-elements-radius-12);max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;-ms-scroll-chaining:none;overscroll-behavior:contain}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar{width:10px}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.zonos--invoice-language-dialog-open.sc-zonos-invoice{opacity:1;-webkit-transform:scale(1);transform:scale(1)}.iframed.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{-ms-scroll-chaining:chained;overscroll-behavior:auto}";
19
+ const ZonosInvoiceStyle0 = zonosInvoiceCss;
20
+
21
+ const ZonosInvoice = class {
22
+ constructor(hostRef) {
23
+ registerInstance(this, hostRef);
24
+ this.storeUnsubscribeList = [];
25
+ /**
26
+ * Listener for locale change in localization store
27
+ */
28
+ this.onChangeLocaleListener = () => { };
29
+ /**
30
+ * Flag to determine if the checkout is on mobile
31
+ */
32
+ this.mobile = false;
33
+ /**
34
+ * Whether or not the component is being rendered with tablet styles
35
+ */
36
+ this.tablet = false;
37
+ /**
38
+ * The stripe instance
39
+ */
40
+ this.stripe = window.Zonos.stripe;
41
+ /**
42
+ * Whether or not the language dialog is open
43
+ */
44
+ this.showLanguageDialogMobile = false;
45
+ /**
46
+ * Whether or not the submit button is loading in `step` component
47
+ */
48
+ this.submitLoading = false;
49
+ // default to collapse the review
50
+ this.collapseReviewMobile = true;
51
+ this.isMobile = false;
52
+ this.isTablet = false;
53
+ // @State() isCollect = window.Zonos.isCollect;
54
+ this.isOverlayLoading = true;
55
+ /**
56
+ * Confirm dialog open state
57
+ */
58
+ this.isCartCollected = false;
59
+ /**
60
+ * Cart expired state to show the cart expired dialog
61
+ */
62
+ this.isCartExpired = false;
63
+ /**
64
+ * Pay in USD confirm dialog open state
65
+ */
66
+ this.payInUsdConfirmDialogOpen = false;
67
+ /**
68
+ * Error message from onInventoryCheck callback
69
+ */
70
+ this.inventoryCheckErrorMessage = null;
71
+ /**
72
+ * Confirmation id for invoice finish component
73
+ */
74
+ this.confirmationId = null;
75
+ /**
76
+ * Client secret value
77
+ */
78
+ this.clientSecret = stripeStore.clientSecret;
79
+ /**
80
+ * Client secret value of customer session (use to load saved payment method and render saved consent)
81
+ */
82
+ this.stripeCustomerSessionClientSecret = stripeStore.stripeCustomerSessionClientSecret;
83
+ this.getBaseCurrencySettlementInfo = () => {
84
+ const selectedLandedCost = cartStore.selectedLandedCost;
85
+ if (!selectedLandedCost) {
86
+ return null;
87
+ }
88
+ const { landedCost: { amountSubtotals }, } = selectedLandedCost;
89
+ if (!amountSubtotals) {
90
+ return null;
91
+ }
92
+ const total = (amountSubtotals.discounts || 0) +
93
+ amountSubtotals.items +
94
+ amountSubtotals.landedCostTotal +
95
+ amountSubtotals.shipping;
96
+ return {
97
+ settlementAmount: total,
98
+ };
99
+ };
100
+ this.applyStripeTheme = async () => {
101
+ const theme = zonosStore.appearance.theme;
102
+ await initStripeElements({
103
+ // only override theme or theme from appearance if it's mobile
104
+ overrideTheme: this.isMobile ? theme : undefined,
105
+ paypalEnabled: paypalStoreHasPaypalEnabled(),
106
+ });
107
+ };
108
+ this.fetchCheckoutSession = async (checkoutSessionId) => {
109
+ const { json } = await handleFetch(`/api/zonos-elements/collect/get-checkout-session`, {
110
+ body: {
111
+ checkoutSessionId,
112
+ },
113
+ method: 'POST',
114
+ });
115
+ return json;
116
+ };
117
+ /**
118
+ * Check if stripe payment intent is succeeded or in a good state to move forward
119
+ */
120
+ this.checkStripePaymentIntentStatus = async () => {
121
+ var _a;
122
+ const isCartDataAvailable = !!window.Zonos.cartData;
123
+ const searchParams = new URL(window.location.href).searchParams;
124
+ const stripeClientSecret = searchParams.get('payment_intent_client_secret');
125
+ const zonosCheckoutSessionId = searchParams.get('zonosCheckoutSessionId');
126
+ log('Payment intent exist, checking stripe payment intent status');
127
+ // Allow to proceed to order if there's no stripe client secret and cart data is available
128
+ if (!stripeClientSecret) {
129
+ log('No stripe client secret found in the URL, proceed to order if cart data is available');
130
+ return { shouldAllowOrder: isCartDataAvailable };
131
+ }
132
+ const { error, status } = await stripeStoreRetrievePayment({
133
+ clientSecret: stripeClientSecret,
134
+ });
135
+ // check if this is redirect after order
136
+ const isJustRedirected = new URLSearchParams(window.location.search).get('redirect_status');
137
+ // If just redirected from Payment provider, show the success screen or error screen based on the status
138
+ if (isJustRedirected && zonosCheckoutSessionId) {
139
+ if (!error) {
140
+ log('Payment intent is succeeded or in a good state to move forward, show success screen');
141
+ }
142
+ else {
143
+ log('Payment intent failed, show status from error');
144
+ }
145
+ // Attempt to retrieve the checkout session
146
+ const json = await this.fetchCheckoutSession(zonosCheckoutSessionId);
147
+ this.confirmationId = ((_a = json === null || json === void 0 ? void 0 : json.checkoutSession.landedCost) === null || _a === void 0 ? void 0 : _a.shortId) || null;
148
+ storageStore.checkoutSessionId = zonosCheckoutSessionId;
149
+ stripeStore.clientSecret = stripeClientSecret;
150
+ void this.setToFinishStep(status);
151
+ return { shouldAllowOrder: false };
152
+ }
153
+ if (!isCartDataAvailable) {
154
+ log('Cart data is not available, only check payment intent status, skip order.');
155
+ return { shouldAllowOrder: false };
156
+ }
157
+ log('Payment intent is not succeeded, proceed to order');
158
+ return { shouldAllowOrder: true };
159
+ };
160
+ }
161
+ /**
162
+ * Listen to resize event to update the isMobile state
163
+ */
164
+ resizeListener() {
165
+ this.isMobile = isInvoiceMobile(this.mobile);
166
+ this.isTablet = isInvoiceTablet(this.tablet);
167
+ }
168
+ /**
169
+ * For storybook to set to finish step, this is to trigger in the story for zonos-checkout-finish
170
+ */
171
+ async setToFinishStep(forcePaymentStatus) {
172
+ stripeStore.stripe = window.Zonos.stripe;
173
+ cartStore.step = 'finish';
174
+ this.storybookPaymentStatusOverride = forcePaymentStatus;
175
+ this.isOverlayLoading = false;
176
+ }
177
+ async initInvoiceCart() {
178
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
179
+ // Should not happen since we will throw error way earlier if cartData is not available
180
+ if (!window.Zonos.cartData) {
181
+ return;
182
+ }
183
+ // change currency to the currency of the cart
184
+ const cartCurrency = (_b = (_a = window.Zonos.cartData) === null || _a === void 0 ? void 0 : _a.items[0]) === null || _b === void 0 ? void 0 : _b.currencyCode;
185
+ if (cartCurrency) {
186
+ cartStore.currency = cartCurrency;
187
+ }
188
+ const cartCheckoutSessionId = (_d = (_c = window.Zonos.cartData) === null || _c === void 0 ? void 0 : _c.references) === null || _d === void 0 ? void 0 : _d.checkoutSessionId;
189
+ const cartLandedCostId = (_f = (_e = window.Zonos.cartData) === null || _e === void 0 ? void 0 : _e.references) === null || _f === void 0 ? void 0 : _f.landedCostId;
190
+ if (!cartLandedCostId) {
191
+ cartStoreUpdateToErrorState({
192
+ messages: [
193
+ translate('Session does not have valid landed cost. Please contact [organizationName] for assistance.', {
194
+ organizationName: zonosStore.organizationName,
195
+ }),
196
+ ],
197
+ title: translate('Invalid session'),
198
+ });
199
+ return;
200
+ }
201
+ // Override checkout session id for invoice if we found one in the cart reference
202
+ if (cartCheckoutSessionId) {
203
+ log('Setting checkout session id from cart reference', 'info', cartCheckoutSessionId);
204
+ storageStore.checkoutSessionId = cartCheckoutSessionId;
205
+ }
206
+ else {
207
+ log('Clear checkout session id from storage so we start from a fresh session for the invoice cart');
208
+ storageStore.checkoutSessionId = null;
209
+ }
210
+ const { shouldAllowOrder } = await this.checkStripePaymentIntentStatus();
211
+ if (!shouldAllowOrder) {
212
+ return;
213
+ }
214
+ try {
215
+ const { adjustments, cartItems } = buildCartItemsByTempCart(window.Zonos.cartData);
216
+ await cartStoreUpdateItems({
217
+ adjustments,
218
+ cartItems,
219
+ landedCostId: cartLandedCostId,
220
+ // No need to init session on failure since we will always create a new one if there is no checkout session id in the cart references
221
+ shouldInitSessionOnFailure: false,
222
+ });
223
+ // if checkoutSessionId is not available, request a new one, only if no checkout session id is found in cart references
224
+ if (!storageStore.checkoutSessionId && !cartCheckoutSessionId) {
225
+ const success = await stripeStoreInitCheckoutSession();
226
+ log(`stripeStoreInitCheckoutSession: ${success}`);
227
+ if (!success) {
228
+ throw new Error('Failed to initialize checkout session! The cart might be created with LIVE Invoice quote but being used with sandbox credential');
229
+ }
230
+ }
231
+ // If there is checkout session in collect cart references and we failed to retrieve it from `update-checkout-session`, it most likely means the cart is already completed / invalid landed cost
232
+ if ((!cartStore.checkoutSession ||
233
+ ((_g = cartStore.checkoutSession) === null || _g === void 0 ? void 0 : _g.completedAt)) &&
234
+ cartCheckoutSessionId) {
235
+ // Attempt to retrieve the checkout session
236
+ const json = await this.fetchCheckoutSession(cartCheckoutSessionId);
237
+ // Some merchants use landed cost id as the confirmation id
238
+ this.confirmationId = ((_h = json === null || json === void 0 ? void 0 : json.checkoutSession.landedCost) === null || _h === void 0 ? void 0 : _h.shortId) || null;
239
+ // If checkout session is already completed, set to finish step
240
+ if (!!(json === null || json === void 0 ? void 0 : json.checkoutSession.completedAt)) {
241
+ void this.setToFinishStep('succeeded');
242
+ return;
243
+ }
244
+ if (json === null || json === void 0 ? void 0 : json.checkoutSession.clientSecret) {
245
+ const { status } = await stripeStoreRetrievePayment({
246
+ clientSecret: json.checkoutSession.clientSecret,
247
+ });
248
+ // If payment intent is still processing or succeeded, set to finish step
249
+ if (status === 'processing' || status === 'succeeded') {
250
+ void this.setToFinishStep(status);
251
+ return;
252
+ }
253
+ }
254
+ void sendErrorLog({
255
+ endpoint: 'INVALID_INVOICE_CHECKOUT_SESSION',
256
+ errors: [
257
+ 'Invalid checkout session, can not retrieve the checkout session after failing to update it',
258
+ ],
259
+ metadata: {
260
+ cartCheckoutSessionId,
261
+ cartId: (_j = window.Zonos.cartData) === null || _j === void 0 ? void 0 : _j.id,
262
+ cartLandedCostId,
263
+ },
264
+ });
265
+ throw new Error('Invalid checkout session, can not retrieve the checkout session after failing to update it');
266
+ }
267
+ if (!cartStore.checkoutSession) {
268
+ void sendErrorLog({
269
+ endpoint: 'FAIL_TO_UPDATE_CREATE_INVOICE_CHECKOUT_SESSION',
270
+ errors: [
271
+ 'Could not update/create checkout session for this invoice cart',
272
+ ],
273
+ metadata: {
274
+ cartCheckoutSessionId: cartCheckoutSessionId || 'N/A',
275
+ cartId: (_k = window.Zonos.cartData) === null || _k === void 0 ? void 0 : _k.id,
276
+ cartLandedCostId: cartLandedCostId || 'N/A',
277
+ },
278
+ });
279
+ throw new Error('Could not update/create checkout session for this invoice cart');
280
+ }
281
+ // const checkoutSessionId = storageStore.checkoutSessionId;
282
+ void stripeStoreGetPaymentIntent();
283
+ const landedCost = (_l = cartStore.checkoutSession) === null || _l === void 0 ? void 0 : _l.landedCost;
284
+ if (!landedCost) {
285
+ throw new Error('Landed cost could not be found in checkout session after creating/updating them');
286
+ }
287
+ await invoiceStoreUpdateSelectedShippingOption(Object.assign(Object.assign({}, cartStore.checkoutSession), { id: storageStore.checkoutSessionId || '' }));
288
+ void invoiceStoreInitShippingInfo({
289
+ landedCostId: landedCost.id,
290
+ });
291
+ void this.applyStripeTheme();
292
+ }
293
+ catch (err) {
294
+ logError(err);
295
+ cartStoreUpdateToErrorState({
296
+ messages: [
297
+ translate('Session does not have valid landed cost. Please contact [organizationName] for assistance.', {
298
+ organizationName: zonosStore.organizationName,
299
+ }),
300
+ ],
301
+ title: translate('Invalid session'),
302
+ });
303
+ }
304
+ this.isOverlayLoading = false;
305
+ }
306
+ toggleLanguageDialog() {
307
+ this.showLanguageDialogMobile = !this.showLanguageDialogMobile;
308
+ }
309
+ async handleStripePaymentContinue() {
310
+ var _a, _b, _c, _d;
311
+ // Attempt to get the value of the billing address element to validate the form
312
+ void ((_a = stripeStore.stripeBillingAddressElement) === null || _a === void 0 ? void 0 : _a.getValue());
313
+ // If the email is not complete, scroll to the link authentication section
314
+ if (!((_b = stripeStore.stripeLinkEventData) === null || _b === void 0 ? void 0 : _b.complete)) {
315
+ // Scroll to the billing section
316
+ const linkAuthentication = document.querySelector('zonos-link-authentication');
317
+ linkAuthentication === null || linkAuthentication === void 0 ? void 0 : linkAuthentication.scrollIntoView({ behavior: 'smooth' });
318
+ return;
319
+ }
320
+ if (!((_c = stripeStore.stripeBillingAddressEventData) === null || _c === void 0 ? void 0 : _c.complete)) {
321
+ // Scroll to the billing section
322
+ const billingSection = document.querySelector('.zonos--billing-address');
323
+ billingSection === null || billingSection === void 0 ? void 0 : billingSection.scrollIntoView({ behavior: 'smooth' });
324
+ return;
325
+ }
326
+ const shouldConfirmPayInUsd = stripeStore.checkoutSettlementCurrency === 'USD';
327
+ // open the confirm dialog if the settlement currency is in USD, and if call this method again, proceed and confirm with Stripe.
328
+ if (shouldConfirmPayInUsd &&
329
+ stripeStore.shouldRenderPayInUsdButton &&
330
+ !this.payInUsdConfirmDialogOpen) {
331
+ this.payInUsdConfirmDialogOpen = true;
332
+ return;
333
+ }
334
+ // Close the dialog after the user confirms to proceed with the payment in USD
335
+ this.payInUsdConfirmDialogOpen = false;
336
+ // reset paypal error message
337
+ paypalStore.paypalErrorMessage = null;
338
+ // reset error state
339
+ stripeStore.hasPaymentError = false;
340
+ this.submitLoading = true;
341
+ // reset inventory check message
342
+ cartStore.inventoryCheckErrorMessage = null;
343
+ // Attempt to change settlement currency to USD
344
+ const baseCurrencyUpdateSuccess = await stripeStoreUpdateCheckoutSessionBaseCurrency();
345
+ // Should not proceed to confirm payment if base currency update failed
346
+ if (!baseCurrencyUpdateSuccess) {
347
+ stripeStore.hasPaymentError = true;
348
+ stripeStore.customErrorMessage = translate('Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.', {
349
+ currency: stripeStore.checkoutSettlementCurrency,
350
+ });
351
+ this.submitLoading = false;
352
+ return;
353
+ }
354
+ // Update the billing party id to the checkout session
355
+ await invoiceStoreAsyncAddressUpdate();
356
+ try {
357
+ await stripeStoreConfirmPayment({
358
+ noLandedCostCheck: true,
359
+ });
360
+ cartStore.step = 'finish';
361
+ // Some merchants use landed cost id as the confirmation id
362
+ this.confirmationId =
363
+ invoiceStore.landedCostShortId ||
364
+ ((_d = cartStore.selectedLandedCost) === null || _d === void 0 ? void 0 : _d.landedCostId) ||
365
+ null;
366
+ return;
367
+ }
368
+ catch (err) {
369
+ logError(err);
370
+ stripeStore.hasPaymentError = true;
371
+ }
372
+ this.submitLoading = false;
373
+ }
374
+ componentWillLoad() {
375
+ stripeStore.stripe = window.Zonos.stripe;
376
+ // Set the step to payment
377
+ cartStore.step = 'payment';
378
+ void this.initInvoiceCart();
379
+ this.resizeListener();
380
+ this.storeUnsubscribeList = [
381
+ stripeStoreOnChange('clientSecret', () => {
382
+ void this.applyStripeTheme();
383
+ }),
384
+ localizationStoreOnChange('selectedLocale', () => {
385
+ void this.applyStripeTheme();
386
+ }),
387
+ ];
388
+ log(`mobile: ${this.isMobile}`);
389
+ }
390
+ // do clean up when component is unmounted
391
+ disconnectedCallback() {
392
+ // reset stripe store
393
+ stripeStoreReset();
394
+ // reset cart store
395
+ cartStoreReset();
396
+ // cleanup onChange listener
397
+ this.onChangeLocaleListener();
398
+ this.storeUnsubscribeList.forEach(unsubscribe => unsubscribe());
399
+ }
400
+ render() {
401
+ // Set client secret so that we can add this to @Watch listener
402
+ this.clientSecret = stripeStore.clientSecret;
403
+ // Only set and update stripeCustomerSession state if it's available, since it would only be available at the time checkout session is created, afterward access checkout session the value would be `null`.
404
+ if (stripeStore.stripeCustomerSessionClientSecret) {
405
+ // Set stripe customer session client secret so that we can add this to @Watch listener
406
+ this.stripeCustomerSessionClientSecret =
407
+ stripeStore.stripeCustomerSessionClientSecret;
408
+ }
409
+ const baseCurrencySettlementInfo = this.getBaseCurrencySettlementInfo();
410
+ const { logoUrl, theme } = zonosStore.appearance;
411
+ const renderLogo = () => {
412
+ // add timestamp to logo url so browser won't cache it on the dashboard setting
413
+ const logo = `${logoUrl}?timestamp=${Date.now()}`;
414
+ return (h("div", { class: "zonos--logo" }, logo && (h("img", { alt: `${zonosStore.organizationName} logo`, src: logo }))));
415
+ };
416
+ const isTestMode = getIsTestMode();
417
+ const renderTopHeader = () => {
418
+ var _a;
419
+ const urlParams = new URLSearchParams(window.location.search);
420
+ const zonosQaUrl = urlParams.get('zonosQaUrl');
421
+ const zonosDebug = urlParams.get('zonosDebug');
422
+ const languageLabel = (_a = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _a === void 0 ? void 0 : _a.label;
423
+ return (h(Fragment, null, h("zonos-h-stack", { class: "zonos--header-wrapper", spacing: 16 }, h("div", { class: "zonos--logo-wrapper" }, renderLogo(), isTestMode && (h("zonos-badge", { badgeColor: "orange", size: "small" }, translate('Test mode'))), zonosDebug === '1' && (h("zonos-badge", { badgeColor: "cyan", size: "small" }, "debug")), zonosQaUrl && (h("zonos-badge", { badgeColor: "purple", size: "small" }, zonosQaUrl))), h("div", { class: "zonos--header-right" }, h("zonos-button", { backgroundColor: 'gray-0', class: "zonos--header-right-button", onClick: () => this.toggleLanguageDialog(), variant: "outline" }, languageLabel, h("zonos-icon", { "aria-label": "Language select", content: ChevronDownIcon, iconColor: "gray-1200" })), h("div", { class: classes([
424
+ 'zonos--invoice-language-dialog',
425
+ this.showLanguageDialogMobile &&
426
+ 'zonos--invoice-language-dialog-open',
427
+ ]) }, h("zonos-language-select", { handleOnClose: () => this.toggleLanguageDialog() }))))));
428
+ };
429
+ const renderContent = () => {
430
+ if (this.isOverlayLoading || stripeStore.isFetchingSession) {
431
+ return null;
432
+ }
433
+ return (h("div", { class: 'zonos--content' }, cartStore.step !== 'finish' && cartStore.step !== 'error' && (h(Fragment, null, (this.isMobile || this.isTablet) && renderTopHeader(), h("div", { class: "zonos--left", "data-theme": theme }, !this.isMobile && !this.isTablet && renderTopHeader(), h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Billing info')), h("zonos-v-stack", { spacing: 16 }, h("zonos-link-authentication", { titleText: "" }), h("zonos-address", { titleText: "", type: "billing" })), h("zonos-invoice-payment", { class: classes(['zonos--invoice-container']), continueLoading: this.submitLoading, onContinueClicked: async () => {
434
+ await this.handleStripePaymentContinue();
435
+ } })), h("div", { class: "zonos--right", "data-theme": theme }, !this.isMobile && (h("zonos-invoice-review", { mobile: this.isMobile, tablet: this.isTablet })), h("div", { class: "zonos--order-details-container" }, !this.isMobile && (h("zonos-invoice-cart-items", null)), this.isMobile && (h("zonos-invoice-order-details", { collapsed: this.collapseReviewMobile, mobile: this.isMobile, onCollapseClicked: () => {
436
+ this.collapseReviewMobile = !this.collapseReviewMobile;
437
+ } }))), h("div", { class: "flex--wrapper" }, !this.isMobile && (h("zonos-v-stack", { spacing: 16 }, h("zonos-invoice-subtotal", null))), !this.isMobile && !this.isTablet && (h("zonos-invoice-footer", { "data-theme": theme, mobile: this.isMobile, tablet: this.isTablet })))))), (cartStore.step === 'finish' || cartStore.step === 'error') && (h("div", { class: "zonos--done", "data-theme": theme }, h("div", { class: "zonos--header" }, renderLogo()), h("zonos-invoice-finish", { confirmationId: this.confirmationId, overrideNotification: cartStore.step === 'error' && !!cartStore.error
438
+ ? Object.assign(Object.assign({}, cartStore.error), { type: 'error' }) : undefined, storybookForceStatus: this.storybookPaymentStatusOverride }))), (this.isMobile ||
439
+ this.isTablet ||
440
+ cartStore.step === 'finish' ||
441
+ cartStore.step === 'error') && (h("zonos-invoice-footer", { "data-theme": theme, mobile: this.isMobile, tablet: this.isTablet }))));
442
+ };
443
+ return (h(Host, { class: classes([
444
+ 'zonos--invoice zonos--elements',
445
+ this.isMobile && 'mobile',
446
+ this.isTablet && 'tablet',
447
+ ]), "data-theme": theme }, renderContent(), baseCurrencySettlementInfo && (h("zonos-confirm-dialog", { class: "zonos--pay-in-usd-dialog", dialogCancelBtnText: translate('Cancel'), dialogConfirmBtnText: translate('Pay [orderTotal]', {
448
+ orderTotal: currencyFormat({
449
+ amount: baseCurrencySettlementInfo.settlementAmount,
450
+ currency: 'USD',
451
+ }),
452
+ }), dialogIntent: "warn", dialogOpen: this.payInUsdConfirmDialogOpen, dialogSubtitle: translate('By paying in USD, your card will be charged directly with no currency conversion. However, using a non-USD based card may result in additional currency conversion fees at the bank level.'), dialogTitle: translate('Pay in USD (United States Dollar)?'), dialogType: "confirm", dialogWidth: 480, onCancelClicked: () => {
453
+ this.payInUsdConfirmDialogOpen = false;
454
+ },
455
+ // Mark user selected confirm to continue with payment
456
+ onConfirmClicked: () => this.handleStripePaymentContinue() })), h("zonos-loading-overlay", { open: this.isOverlayLoading })));
457
+ }
458
+ static get assetsDirs() { return ["assets"]; }
459
+ };
460
+ ZonosInvoice.style = ZonosInvoiceStyle0;
461
+
462
+ export { ZonosInvoice as zonos_invoice };
@@ -1,6 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-0bbe9693.js';
2
- import { r as localizationStoreUpdateSelectedLocale, l as localizationStore } from './localization-c5029ffc.js';
3
- import { t as translate } from './translationStore-690c4e04.js';
2
+ import { u as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './localization-04b05867.js';
4
3
  import { f as zonosStoreFontFamily } from './zonosStore-b434e436.js';
5
4
  import { l as languages } from './ILanguage-cd6acb72.js';
6
5
  import './handleFetch-a844cac1.js';
@@ -31,9 +30,9 @@ const ZonosLanguageSelect = class {
31
30
  }
32
31
  render() {
33
32
  const { selectedLocale } = localizationStore;
34
- return (h(Host, { key: '232674c6f35113c6ad3f1094e6e6d4128b4d4c02', class: "zonos--elements", style: {
33
+ return (h(Host, { key: '04271d51489c89ffa0e4fda90ed28392ae725ebe', class: "zonos--elements", style: {
35
34
  '--zonos--font-family': zonosStoreFontFamily(),
36
- } }, h("div", { key: '014d1364e165e4ee4e9cf304791fc10fdfb6d87c', class: "zonos--language-select" }, h("zonos-select-dialog-header", { key: '65b454467b033cd061ab08693e857eed75c76511', handleOnClose: () => this.handleOnClose(), label: translate('Select a language') }), h("div", { key: '6ea8fca0b44ada24b9b2b84e22584ba1a7459dc4', class: "zonos--language-select-content" }, languages.map(language => (h("button", { class: "zonos--language-select-button", onClick: () => this.languageSelected(language.code) }, h("zonos-text", { textColor: "gray-800" }, language.translatedLabel), language.code === selectedLocale && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 16 })))))))));
35
+ } }, h("div", { key: 'cebffa5e46a4403f6aa4753648ee8097c7b4375d', class: "zonos--language-select" }, h("zonos-select-dialog-header", { key: '9aa75712883c069a0dc21f0cdd91484211f688d1', handleOnClose: () => this.handleOnClose(), label: translate('Select a language') }), h("div", { key: '637cff9d4a5ff4ebac0e42ef4db6b49006e4f77e', class: "zonos--language-select-content" }, languages.map(language => (h("button", { class: "zonos--language-select-button", onClick: () => this.languageSelected(language.code) }, h("zonos-text", { textColor: "gray-800" }, language.translatedLabel), language.code === selectedLocale && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 16 })))))))));
37
36
  }
38
37
  };
39
38
  ZonosLanguageSelect.style = ZonosLanguageSelectStyle0;
@@ -57,9 +56,9 @@ const ZonosSelectDialogHeader = class {
57
56
  this.label = '';
58
57
  }
59
58
  render() {
60
- return (h(Host, { key: 'cc65559ef7867bbd8e7990556b50434faa0a905c', class: "zonos--elements", style: {
59
+ return (h(Host, { key: 'f962d21f191040edf5b6e9fe2c4276bca67fde67', class: "zonos--elements", style: {
61
60
  '--zonos--font-family': zonosStoreFontFamily(),
62
- } }, h("zonos-v-stack", { key: '77c280b12744520b4a172193f88798aa53d33eb7', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, h("div", { key: 'eaba9d1e50f71f23e330e989521d2156a617b22d', class: "zonos--select-dialog-header" }, h("zonos-text", { key: 'ddddc6b5bca87cf44cbc7428d402f44c67422cb6', type: "boldLabel" }, this.label), h("zonos-button", { key: '313e3955ba8bafc9a1b36b4c1c8f99e975fb8dd3', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close select dialog", content: RemoveIcon, size: 20 }), noBackground: true, onClick: () => this.handleOnClose() })), h("slot", { key: '9af2821c22f3e37d52b6f03bf544fcaca1c0ed7b' }))));
61
+ } }, h("zonos-v-stack", { key: '1d55415843a60fe2dfccc5fe4c51cf3024f0de2c', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, h("div", { key: '0f9e6aad9194160e171b70e835e100ddcda264a5', class: "zonos--select-dialog-header" }, h("zonos-text", { key: '15680cb57b7f8fe3b0f8bb763f437c85ab100d1c', type: "boldLabel" }, this.label), h("zonos-button", { key: '8baa1075d7138c14306dc7a1c666f577bba2d128', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close select dialog", content: RemoveIcon, size: 20 }), noBackground: true, onClick: () => this.handleOnClose() })), h("slot", { key: '96384e5eb53e731e2061339fd24bcec4194b1274' }))));
63
62
  }
64
63
  };
65
64
  ZonosSelectDialogHeader.style = ZonosSelectDialogHeaderStyle0;
@@ -0,0 +1,20 @@
1
+ import { r as registerInstance, h, H as Host } from './index-0bbe9693.js';
2
+
3
+ const zonosLinkCss = ":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:inline-block}:host a{padding-bottom:2px;color:var(--zonos-elements-primary);-webkit-box-shadow:none;box-shadow:none;text-decoration:none;word-break:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow-wrap:break-word}:host a:link,:host a:visited{color:var(--zonos-elements-primary);-webkit-transition:all 150ms ease-in-out;transition:all 150ms ease-in-out}:host a:hover,:host a:active{color:var(--zonos-elements-primary);-webkit-box-shadow:0 1px 0 var(--zonos-elements-primary);box-shadow:0 1px 0 var(--zonos-elements-primary)}";
4
+ const ZonosLinkStyle0 = zonosLinkCss;
5
+
6
+ const ZonosLink = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ /**
10
+ * The href for the link
11
+ */
12
+ this.href = '';
13
+ }
14
+ render() {
15
+ return (h(Host, { key: '999242ee8fc2e78a52fac1251a2cd554ed2e20ea', class: "zonos--elements" }, h("a", { key: '9ebee9ad8262ebd42f511dda6afadb54a2e7c813', href: this.href, rel: this.rel, target: this.target, title: this.linkTitle }, h("slot", { key: '1c460154708dfc89d1b5132d3905c107ce333fd8' }))));
16
+ }
17
+ };
18
+ ZonosLink.style = ZonosLinkStyle0;
19
+
20
+ export { ZonosLink as zonos_link };
@@ -22,11 +22,11 @@ const ZonosLogo = class {
22
22
  const filterColor = this.theme === 'DARK'
23
23
  ? 'invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)'
24
24
  : 'whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)';
25
- return (h(Host, { key: '0f0fe90d3ef58b5a7b934361567e92b03630b46a', class: classes(['zonos--elements zonos--logo']), style: {
25
+ return (h(Host, { key: '2277b893624a5e87fcda0f86e96a50d0bc309bac', class: classes(['zonos--elements zonos--logo']), style: {
26
26
  '--zonos--filter-color': filterColor,
27
27
  '--zonos--font-family': zonosStoreFontFamily(),
28
28
  '--zonos--width': this.width,
29
- } }, h("img", { key: 'ec026a1a596d985aa50c18f8ebffc8683e62cc05', alt: "Zonos Logo", src: getAssetPath('./assets/ZonosLogo.png') })));
29
+ } }, h("img", { key: '3406330adec18a2faea63a91e0113d30d70deff5', alt: "Zonos Logo", src: getAssetPath('./assets/ZonosLogo.png') })));
30
30
  }
31
31
  static get assetsDirs() { return ["assets"]; }
32
32
  };
@@ -69,11 +69,11 @@ const ZonosStripeInput = class {
69
69
  const primaryColor = this.overridePrimaryColor || zonosStore.appearance.colorPrimary;
70
70
  const secondaryColor = this.overrideSecondaryColor || zonosStore.appearance.colorSecondary;
71
71
  // Always use theme from appearance settings if it's collect
72
- const isDark = window.Zonos.isCollect
72
+ const isDark = window.Zonos.isCollect || window.Zonos.isInvoice
73
73
  ? zonosStore.appearance.theme === 'DARK'
74
74
  : primaryColor && isDarkColor(primaryColor);
75
75
  const fontSize = zonosStore.appearance.fontSizeInputValue || 16;
76
- return (h(Host, { key: '0bed90e63595e6036b9342e15c999bb7e7971240', class: classes([
76
+ return (h(Host, { key: '8beb2c15857313a9b2709a7c51e82c25c1d1ba47', class: classes([
77
77
  'zonos--input zonos--elements',
78
78
  isDark && 'dark',
79
79
  (this.isError || !!this.error) && 'has-error',
@@ -82,10 +82,10 @@ const ZonosStripeInput = class {
82
82
  '--zonos--font-family': zonosStoreFontFamily(),
83
83
  '--zonos--font-size': `${fontSize}px`,
84
84
  '--zonos--primary-color': secondaryColor,
85
- } }, h("div", { key: '00e5c3a220aaeee221c5cc104d2463f5468067cf', class: classes([
85
+ } }, h("div", { key: '01ca3ae37198c97c33c7af3c9aca688c697d24ad', class: classes([
86
86
  'zonos--label-wrapper',
87
87
  this.isDisabled && 'disabled',
88
- ]) }, h("input", Object.assign({ key: '25459f6bc07647962676edd724630cd7726bb680' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: classes([
88
+ ]) }, h("input", Object.assign({ key: '2f5ec49912242a06372045abb157524d8e28b2bf' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: classes([
89
89
  'zonos--floated-input',
90
90
  !!this.inputLabel && 'has-label',
91
91
  this.internalValue && 'has-content',
@@ -95,7 +95,7 @@ const ZonosStripeInput = class {
95
95
  this.inputChange.emit(input.value);
96
96
  this.el.inputValue = input.value;
97
97
  this.el.dispatchEvent(new Event('change'));
98
- }, placeholder: this.inputPlaceholder || '', required: this.required, type: "text", value: this.internalValue })), h("div", { key: '145634dac24ef37cd206847537bea2f641f3b5a0', class: "zonos--floated-label" }, h("label", { key: '70eabcab7a30e851086a2b79107968f9a999c67e', htmlFor: this.inputId }, this.inputLabel))), this.error && (h("zonos-text", { key: '55ab6d14b5e6c98c665f41a1c4c1dd70523ee91f', textColor: "red-600", type: "caption" }, this.error))));
98
+ }, placeholder: this.inputPlaceholder || '', required: this.required, type: "text", value: this.internalValue })), h("div", { key: '2af905542b374f49eec85a9e626ee44f5818664f', class: "zonos--floated-label" }, h("label", { key: 'c8822e3610c25ec2135a28b9ce655cada68691dc', htmlFor: this.inputId }, this.inputLabel))), this.error && (h("zonos-text", { key: '4915281aa2ec9e3cb58fd159e647f1ee16fb16c6', textColor: "red-600", type: "caption" }, this.error))));
99
99
  }
100
100
  get el() { return getElement(this); }
101
101
  static get watchers() { return {
@@ -16,9 +16,9 @@ const ZonosToggle = class {
16
16
  this.options = [];
17
17
  }
18
18
  render() {
19
- return (h(Host, { key: '1b844d11272181b9c81c2bfb03a13a1ad412cb9f', class: classes(['zonos--elements zonos--toggle']), style: {
19
+ return (h(Host, { key: '12d0931ba2738021291cd7a00e7c12df502409cd', class: classes(['zonos--elements zonos--toggle']), style: {
20
20
  '--zonos--font-family': zonosStoreFontFamily(),
21
- } }, h("div", { key: 'f5991e19ea02a82ae1f6e7529bb3bb77e66b7165', class: "wrapper" }, this.options.map(option => {
21
+ } }, h("div", { key: '6455e748d3547273d3c8cb7517ee512912d31644', class: "wrapper" }, this.options.map(option => {
22
22
  const selected = option.value === this.value;
23
23
  return (h("button", { class: classes(['zonos--option', selected && 'selected']), key: option.value, onClick: () => {
24
24
  this.toggleChanged.emit(option.value);
@@ -18,10 +18,10 @@ const ZonosTooltip = class {
18
18
  this.showTooltip = false;
19
19
  }
20
20
  render() {
21
- return (h(Host, { key: 'd96671c8c9b426cbde335b3d8024a56f4e188281', class: "zonos--elements" }, h("div", { key: 'de75e111a65033501e9907992df0d9ae8cbf5df5', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, h("slot", { key: '3d8297ef44c97112e29a62a31b3acf47789726a9' }), h("div", { key: 'ee777f084991e28255a2957cf3585110f14c65d5', class: classes([
21
+ return (h(Host, { key: '17ef3ac476981f5b63e5c4f70ef0491220f4b489', class: "zonos--elements" }, h("div", { key: 'd5b1eba844f5bd69077d6f5ba5b01acd7420e8a3', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, h("slot", { key: '332d8fc00f4b949e93b4152e9f77c1c6eb273539' }), h("div", { key: '1248c9a6f49765b1f780daa8548dcc6a76e896d5', class: classes([
22
22
  this.showTooltip && 'zonos--show-tooltip',
23
23
  'zonos--tooltip-content',
24
- ]) }, h("zonos-text", { key: 'fb22b220feb39c31111d45a393024e7df4d3e314', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), h("zonos-text", { key: '6019665e4e0b8eb4390a70b5d90cdcc4f16c6ba3', size: "xs", textColor: "gray-0" }, this.subtitle)))));
24
+ ]) }, h("zonos-text", { key: '8f34324ee7d70e06813be72d58b198d50808e9b2', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), h("zonos-text", { key: 'ae1a3642318b7d562b58559573592e9aacc50e86', size: "xs", textColor: "gray-0" }, this.subtitle)))));
25
25
  }
26
26
  };
27
27
  ZonosTooltip.style = ZonosTooltipStyle0;