@zonos/elements 1.3.259 → 1.3.261

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 (260) hide show
  1. package/dist/cjs/{cart-c618fd5b.js → cart-d08c87e2.js} +1 -1
  2. package/dist/cjs/{hasInclusivePrice-58a9f15d.js → hasInclusivePrice-c781c336.js} +1 -1
  3. package/dist/cjs/index.cjs.js +7 -7
  4. package/dist/cjs/{invoice-c9cb6683.js → invoice-e64f97c6.js} +2 -2
  5. package/dist/cjs/{isCollectMobileTablet-93a5194a.js → isCollectMobileTablet-9675485f.js} +2 -2
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/{localization-5994d4de.js → localization-a7fac4b4.js} +3 -0
  8. package/dist/cjs/{paypal-091e089e.js → paypal-73a542cb.js} +2 -2
  9. package/dist/cjs/{placeTestOrder-b07f8edb.js → placeTestOrder-aefd31e8.js} +2 -2
  10. package/dist/cjs/{renderCheckoutCurrency-7876a1d4.js → renderCheckoutCurrency-a374741a.js} +2 -2
  11. package/dist/cjs/zonos-address-display_8.cjs.entry.js +19 -19
  12. package/dist/cjs/zonos-address_4.cjs.entry.js +8 -8
  13. package/dist/cjs/zonos-badge.cjs.entry.js +3 -3
  14. package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
  15. package/dist/cjs/zonos-card_5.cjs.entry.js +9 -9
  16. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +86 -20
  17. package/dist/cjs/zonos-checkbox_2.cjs.entry.js +5 -5
  18. package/dist/cjs/zonos-checkout.cjs.entry.js +16 -6
  19. package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
  20. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +6 -6
  21. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +19 -19
  22. package/dist/cjs/zonos-collect.cjs.entry.js +4 -4
  23. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  24. package/dist/cjs/zonos-controller.cjs.entry.js +3 -3
  25. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  26. package/dist/cjs/zonos-country-select_4.cjs.entry.js +10 -10
  27. package/dist/cjs/zonos-elements.cjs.js +1 -1
  28. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +6 -6
  29. package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
  30. package/dist/cjs/zonos-input.cjs.entry.js +4 -4
  31. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +8 -8
  32. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +14 -14
  33. package/dist/cjs/zonos-invoice.cjs.entry.js +4 -4
  34. package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -5
  35. package/dist/cjs/zonos-link.cjs.entry.js +1 -1
  36. package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
  37. package/dist/cjs/zonos-store-credit.cjs.entry.js +3 -3
  38. package/dist/cjs/zonos-stripe-input.cjs.entry.js +4 -4
  39. package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
  40. package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
  41. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +74 -7
  42. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +2 -2
  43. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +13 -3
  44. package/dist/collection/components/checkout/zonos-collect/zonos-collect-cart-items/zonos-collect-cart-items.js +1 -1
  45. package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +2 -2
  46. package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.js +3 -3
  47. package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.js +3 -3
  48. package/dist/collection/components/checkout/zonos-collect/zonos-collect-subtotal/zonos-collect-subtotal.js +5 -5
  49. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.js +2 -2
  50. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +2 -2
  51. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.js +3 -3
  52. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.js +3 -3
  53. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.js +2 -2
  54. package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
  55. package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
  56. package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
  57. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
  58. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
  59. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  60. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
  61. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +3 -3
  62. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  63. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
  64. package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +2 -2
  65. package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
  66. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  67. package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
  68. package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +1 -1
  69. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  70. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
  71. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  72. package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +1 -1
  73. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +4 -4
  74. package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +5 -5
  75. package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +5 -5
  76. package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
  77. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  78. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  79. package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
  80. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  81. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  82. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
  83. package/dist/collection/components/main/zonos-controller.js +1 -1
  84. package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
  85. package/dist/collection/components/store/hello/localization.js +3 -0
  86. package/dist/collection/components/stripe/zonos-address/zonos-address.js +2 -2
  87. package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
  88. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
  89. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  90. package/dist/esm/{cart-76fb528f.js → cart-c490d252.js} +1 -1
  91. package/dist/esm/{hasInclusivePrice-275b1048.js → hasInclusivePrice-7a0ce66a.js} +1 -1
  92. package/dist/esm/index.js +7 -7
  93. package/dist/esm/{invoice-9efcb941.js → invoice-3ea5715b.js} +2 -2
  94. package/dist/esm/{isCollectMobileTablet-a7e5b909.js → isCollectMobileTablet-0dcbd45a.js} +2 -2
  95. package/dist/esm/loader.js +1 -1
  96. package/dist/esm/{localization-76ce3e29.js → localization-542dbe20.js} +3 -0
  97. package/dist/esm/{paypal-75c5c66d.js → paypal-38ca5d21.js} +2 -2
  98. package/dist/esm/{placeTestOrder-22633bf2.js → placeTestOrder-d7001709.js} +2 -2
  99. package/dist/esm/{renderCheckoutCurrency-d27b0082.js → renderCheckoutCurrency-75f1bba3.js} +2 -2
  100. package/dist/esm/zonos-address-display_8.entry.js +19 -19
  101. package/dist/esm/zonos-address_4.entry.js +8 -8
  102. package/dist/esm/zonos-badge.entry.js +3 -3
  103. package/dist/esm/zonos-button_3.entry.js +3 -3
  104. package/dist/esm/zonos-card_5.entry.js +9 -9
  105. package/dist/esm/zonos-cart-items_12.entry.js +86 -20
  106. package/dist/esm/zonos-checkbox_2.entry.js +5 -5
  107. package/dist/esm/zonos-checkout.entry.js +16 -6
  108. package/dist/esm/zonos-collapse.entry.js +2 -2
  109. package/dist/esm/zonos-collect-cart-items_3.entry.js +6 -6
  110. package/dist/esm/zonos-collect-finish_6.entry.js +19 -19
  111. package/dist/esm/zonos-collect.entry.js +4 -4
  112. package/dist/esm/zonos-component.entry.js +1 -1
  113. package/dist/esm/zonos-controller.entry.js +3 -3
  114. package/dist/esm/zonos-country-flag.entry.js +1 -1
  115. package/dist/esm/zonos-country-select_4.entry.js +10 -10
  116. package/dist/esm/zonos-elements.js +1 -1
  117. package/dist/esm/zonos-hello-dialog.entry.js +6 -6
  118. package/dist/esm/zonos-hello.entry.js +1 -1
  119. package/dist/esm/zonos-input.entry.js +4 -4
  120. package/dist/esm/zonos-invoice-cart-items_2.entry.js +8 -8
  121. package/dist/esm/zonos-invoice-finish_5.entry.js +14 -14
  122. package/dist/esm/zonos-invoice.entry.js +4 -4
  123. package/dist/esm/zonos-language-select_2.entry.js +5 -5
  124. package/dist/esm/zonos-link.entry.js +1 -1
  125. package/dist/esm/zonos-logo.entry.js +2 -2
  126. package/dist/esm/zonos-store-credit.entry.js +3 -3
  127. package/dist/esm/zonos-stripe-input.entry.js +4 -4
  128. package/dist/esm/zonos-tooltip.entry.js +2 -2
  129. package/dist/esm/zonos-v-stack.entry.js +2 -2
  130. package/dist/esm-es5/{cart-76fb528f.js → cart-c490d252.js} +1 -1
  131. package/dist/esm-es5/{hasInclusivePrice-275b1048.js → hasInclusivePrice-7a0ce66a.js} +1 -1
  132. package/dist/esm-es5/index.js +1 -1
  133. package/dist/esm-es5/{invoice-9efcb941.js → invoice-3ea5715b.js} +1 -1
  134. package/dist/esm-es5/{isCollectMobileTablet-a7e5b909.js → isCollectMobileTablet-0dcbd45a.js} +1 -1
  135. package/dist/esm-es5/loader.js +1 -1
  136. package/dist/esm-es5/{localization-76ce3e29.js → localization-542dbe20.js} +1 -1
  137. package/dist/esm-es5/{paypal-75c5c66d.js → paypal-38ca5d21.js} +2 -2
  138. package/dist/esm-es5/{placeTestOrder-22633bf2.js → placeTestOrder-d7001709.js} +1 -1
  139. package/dist/esm-es5/{renderCheckoutCurrency-d27b0082.js → renderCheckoutCurrency-75f1bba3.js} +1 -1
  140. package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
  141. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  142. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  143. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  144. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  145. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  146. package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -1
  147. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  148. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  149. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  150. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  151. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  152. package/dist/esm-es5/zonos-component.entry.js +1 -1
  153. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  154. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  155. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  156. package/dist/esm-es5/zonos-elements.js +1 -1
  157. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  158. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  159. package/dist/esm-es5/zonos-input.entry.js +1 -1
  160. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  161. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  162. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  163. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  164. package/dist/esm-es5/zonos-link.entry.js +1 -1
  165. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  166. package/dist/esm-es5/zonos-store-credit.entry.js +1 -1
  167. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  168. package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
  169. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  170. package/dist/scripts/index.d.ts +7 -0
  171. package/dist/scripts/index.js +1 -1
  172. package/dist/scripts/loadZonos.js +1 -1
  173. package/dist/scripts/zonos.js +1 -1
  174. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +15 -0
  175. package/dist/types/types/checkout/CheckoutConfig.d.ts +7 -0
  176. package/dist/zonos-elements/index.esm.js +1 -1
  177. package/dist/zonos-elements/{p-bb6e7e9e.entry.js → p-00bd7e5d.entry.js} +1 -1
  178. package/dist/zonos-elements/p-03e53ef5.entry.js +1 -0
  179. package/dist/zonos-elements/{p-6d36b307.system.js → p-0699931c.system.js} +1 -1
  180. package/dist/zonos-elements/{p-f4e54f09.system.entry.js → p-072c5e07.system.entry.js} +1 -1
  181. package/dist/zonos-elements/{p-e6168c82.system.js → p-0ec4e307.system.js} +1 -1
  182. package/dist/zonos-elements/{p-f7ddd288.system.entry.js → p-14f156c6.system.entry.js} +1 -1
  183. package/dist/zonos-elements/{p-66d72216.entry.js → p-155b4425.entry.js} +1 -1
  184. package/dist/zonos-elements/{p-9161f10d.system.entry.js → p-17476a30.system.entry.js} +1 -1
  185. package/dist/zonos-elements/{p-9cbac993.entry.js → p-1916c2b0.entry.js} +1 -1
  186. package/dist/zonos-elements/{p-1e9e284e.system.entry.js → p-1917202e.system.entry.js} +1 -1
  187. package/dist/zonos-elements/{p-2ec799e4.system.js → p-196423ad.system.js} +1 -1
  188. package/dist/zonos-elements/{p-567abb43.system.js → p-20263609.system.js} +1 -1
  189. package/dist/zonos-elements/{p-bdb3f7a2.js → p-24407504.js} +2 -2
  190. package/dist/zonos-elements/{p-1523f6a8.system.js → p-248bdea2.system.js} +1 -1
  191. package/dist/zonos-elements/{p-bba9af4c.entry.js → p-27f01d76.entry.js} +1 -1
  192. package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
  193. package/dist/zonos-elements/{p-5fa3d1c8.system.entry.js → p-2c9714e8.system.entry.js} +1 -1
  194. package/dist/zonos-elements/{p-cc645667.system.js → p-31bd3851.system.js} +1 -1
  195. package/dist/zonos-elements/{p-425f747b.entry.js → p-34fc45e5.entry.js} +1 -1
  196. package/dist/zonos-elements/{p-b34f1336.system.entry.js → p-3c3139d2.system.entry.js} +1 -1
  197. package/dist/zonos-elements/{p-e8a68ce7.system.js → p-47bde0ba.system.js} +1 -1
  198. package/dist/zonos-elements/{p-1368dce7.system.entry.js → p-4a227683.system.entry.js} +1 -1
  199. package/dist/zonos-elements/{p-bcbbe867.entry.js → p-4cee62fb.entry.js} +1 -1
  200. package/dist/zonos-elements/{p-c1ab70d2.entry.js → p-4d776228.entry.js} +1 -1
  201. package/dist/zonos-elements/{p-bdaf94a4.system.entry.js → p-50a15e3d.system.entry.js} +1 -1
  202. package/dist/zonos-elements/{p-d30e8c3a.entry.js → p-55742c52.entry.js} +1 -1
  203. package/dist/zonos-elements/{p-788c6839.entry.js → p-5a79e1f4.entry.js} +1 -1
  204. package/dist/zonos-elements/{p-8585c761.system.entry.js → p-5db00bfa.system.entry.js} +1 -1
  205. package/dist/zonos-elements/p-5dff9d51.system.entry.js +1 -0
  206. package/dist/zonos-elements/{p-5262f6e8.entry.js → p-6726fee0.entry.js} +1 -1
  207. package/dist/zonos-elements/p-6b7beb44.system.js +1 -0
  208. package/dist/zonos-elements/{p-3ee8496e.js → p-7158a18b.js} +1 -1
  209. package/dist/zonos-elements/p-721fadd5.js +1 -0
  210. package/dist/zonos-elements/{p-24f41959.js → p-72adb40d.js} +1 -1
  211. package/dist/zonos-elements/{p-99d92a84.entry.js → p-7793d334.entry.js} +1 -1
  212. package/dist/zonos-elements/p-7c5c5318.js +1 -0
  213. package/dist/zonos-elements/{p-6f19845a.system.entry.js → p-7dbac3ae.system.entry.js} +1 -1
  214. package/dist/zonos-elements/{p-afdb4445.entry.js → p-80e7cab5.entry.js} +1 -1
  215. package/dist/zonos-elements/{p-6cf8fe49.system.entry.js → p-8d0bca3a.system.entry.js} +1 -1
  216. package/dist/zonos-elements/{p-6e50f6f5.entry.js → p-8df3c6a0.entry.js} +1 -1
  217. package/dist/zonos-elements/{p-dfb4360d.system.entry.js → p-9262a57c.system.entry.js} +1 -1
  218. package/dist/zonos-elements/p-9cfd1dc3.entry.js +1 -0
  219. package/dist/zonos-elements/{p-bb785f33.entry.js → p-9e761130.entry.js} +1 -1
  220. package/dist/zonos-elements/{p-c908a7a3.entry.js → p-a1142a95.entry.js} +1 -1
  221. package/dist/zonos-elements/{p-2d854a75.entry.js → p-a3020bc9.entry.js} +1 -1
  222. package/dist/zonos-elements/{p-9a9c9441.system.entry.js → p-a661dd45.system.entry.js} +1 -1
  223. package/dist/zonos-elements/{p-a18adf27.js → p-a75b8ad7.js} +1 -1
  224. package/dist/zonos-elements/{p-bd938f80.js → p-a8bb461c.js} +1 -1
  225. package/dist/zonos-elements/{p-edb0306c.system.entry.js → p-aa74b61a.system.entry.js} +1 -1
  226. package/dist/zonos-elements/{p-2fa41e93.entry.js → p-ade15fd2.entry.js} +1 -1
  227. package/dist/zonos-elements/{p-87d89870.system.entry.js → p-b1c76c38.system.entry.js} +1 -1
  228. package/dist/zonos-elements/{p-2b2b1c8c.system.entry.js → p-b21cf539.system.entry.js} +1 -1
  229. package/dist/zonos-elements/{p-770d414a.system.entry.js → p-b2cd18b4.system.entry.js} +1 -1
  230. package/dist/zonos-elements/{p-4b138a6e.system.entry.js → p-b47fcd8c.system.entry.js} +1 -1
  231. package/dist/zonos-elements/{p-1ebb59a3.js → p-b5223840.js} +1 -1
  232. package/dist/zonos-elements/{p-afca19b0.system.entry.js → p-be1032ab.system.entry.js} +1 -1
  233. package/dist/zonos-elements/{p-10da499b.system.entry.js → p-bf4d2299.system.entry.js} +1 -1
  234. package/dist/zonos-elements/{p-1661f938.entry.js → p-c263f95f.entry.js} +1 -1
  235. package/dist/zonos-elements/{p-9460919d.entry.js → p-cdf99051.entry.js} +1 -1
  236. package/dist/zonos-elements/{p-055c8d6c.system.entry.js → p-d2ef0416.system.entry.js} +1 -1
  237. package/dist/zonos-elements/{p-a4b6865d.system.entry.js → p-d50fef06.system.entry.js} +1 -1
  238. package/dist/zonos-elements/{p-3600280d.system.js → p-d7a9be55.system.js} +1 -1
  239. package/dist/zonos-elements/{p-7a379538.entry.js → p-d983d472.entry.js} +1 -1
  240. package/dist/zonos-elements/{p-14d35979.system.entry.js → p-dc4e867e.system.entry.js} +1 -1
  241. package/dist/zonos-elements/{p-439dc620.system.entry.js → p-e14f421d.system.entry.js} +1 -1
  242. package/dist/zonos-elements/{p-9cff66a7.entry.js → p-e684e68f.entry.js} +1 -1
  243. package/dist/zonos-elements/{p-d004565d.system.entry.js → p-e76dc266.system.entry.js} +1 -1
  244. package/dist/zonos-elements/{p-a89096d6.system.entry.js → p-eca03303.system.entry.js} +1 -1
  245. package/dist/zonos-elements/{p-3576d900.entry.js → p-ed827ca3.entry.js} +1 -1
  246. package/dist/zonos-elements/{p-a0f6910c.entry.js → p-eeff2b04.entry.js} +1 -1
  247. package/dist/zonos-elements/{p-791e13e7.entry.js → p-ef12af4b.entry.js} +1 -1
  248. package/dist/zonos-elements/{p-7157a5a3.entry.js → p-f0046c48.entry.js} +1 -1
  249. package/dist/zonos-elements/{p-62dbc5f8.system.entry.js → p-f00a56be.system.entry.js} +1 -1
  250. package/dist/zonos-elements/{p-29d16ad0.entry.js → p-f4030586.entry.js} +1 -1
  251. package/dist/zonos-elements/{p-fbc274a8.system.entry.js → p-f7d24382.system.entry.js} +1 -1
  252. package/dist/zonos-elements/{p-12459b59.entry.js → p-fb87172c.entry.js} +1 -1
  253. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  254. package/package.json +1 -1
  255. package/dist/zonos-elements/p-0a9741f7.entry.js +0 -1
  256. package/dist/zonos-elements/p-868a8667.js +0 -1
  257. package/dist/zonos-elements/p-c85e988d.system.js +0 -1
  258. package/dist/zonos-elements/p-d13120f6.entry.js +0 -1
  259. package/dist/zonos-elements/p-e5f48239.system.entry.js +0 -1
  260. package/dist/zonos-elements/p-ed03b7fd.js +0 -1
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(o,e,t,n){function s(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,a){function l(o){try{r(n.next(o))}catch(o){a(o)}}function i(o){try{r(n["throw"](o))}catch(o){a(o)}}function r(o){o.done?t(o.value):s(o.value).then(l,i)}r((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,s,a,l;return l={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function i(o){return function(e){return r([o,e])}}function r(i){if(n)throw new TypeError("Generator is already executing.");while(l&&(l=0,i[0]&&(t=0)),t)try{if(n=1,s&&(a=i[0]&2?s["return"]:i[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,i[1])).done)return a;if(s=0,a)i=[i[0]&2,a.value];switch(i[0]){case 0:case 1:a=i;break;case 4:t.label++;return{value:i[1],done:false};case 5:t.label++;s=i[1];i=[0];continue;case 7:i=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(i[0]===6||i[0]===2)){t=0;continue}if(i[0]===3&&(!a||i[1]>a[0]&&i[1]<a[3])){t.label=i[1];break}if(i[0]===6&&t.label<a[1]){t.label=a[1];a=i;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(i);break}if(a[2])t.ops.pop();t.trys.pop();continue}i=e.call(o,t)}catch(o){i=[6,o];s=0}finally{n=a=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(o,e,t){if(t||arguments.length===2)for(var n=0,s=e.length,a;n<s;n++){if(a||!(n in e)){if(!a)a=Array.prototype.slice.call(e,0,n);a[n]=e[n]}}return o.concat(a||Array.prototype.slice.call(e))};System.register(["./p-7261e245.system.js","./p-2ec799e4.system.js","./p-e8a68ce7.system.js","./p-1523f6a8.system.js","./p-15ef7644.system.js","./p-01174496.system.js","./p-bf37ccc7.system.js","./p-8bce79f4.system.js","./p-d938f42f.system.js","./p-17a8a514.system.js","./p-567abb43.system.js","./p-23e7c655.system.js","./p-c9e433c0.system.js","./p-3600280d.system.js","./p-6d36b307.system.js","./p-45bd8072.system.js","./p-61be7d98.system.js","./p-43a6e469.system.js"],(function(o){"use strict";var e,t,n,s,a,l,i,r,c,d,f,u,h,p,m,b,z,y,g,v,x,w,k,C,_,L,S,j,I,H,M,Z,P,B,D,F,V,O,U,T,W;return{setters:[function(o){e=o.r;t=o.d;n=o.h;s=o.F;a=o.a;l=o.g},function(o){i=o.b;r=o.c;c=o.t;d=o.L;f=o.C;u=o.M;h=o.d;p=o.r;m=o.D},function(o){b=o.c;z=o.a;y=o.b},function(o){g=o.t;v=o.s;x=o.l;w=o.p},function(o){k=o.z},function(o){C=o.h;_=o.s;L=o.g;S=o.i;j=o.a},function(o){I=o.c},function(o){H=o.g},function(o){M=o.l;Z=o.b},function(o){P=o.s},function(o){B=o.i;D=o.a;F=o.e},function(o){V=o.c},function(o){O=o.l},function(o){U=o.r},function(o){T=o.p},function(o){W=o.r},function(){},function(){}],execute:function(){var R='<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var N='<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-100)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M15.707 9.293a1 1 0 0 1 0 1.414l-3.646 3.647a1.5 1.5 0 0 1-2.122 0l-1.646-1.647a1 1 0 1 1 1.414-1.414L11 12.586l3.293-3.293a1 1 0 0 1 1.414 0Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var A=":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-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin-bottom:24px;border-radius:var(--zonos--border-radius, 10px);gap:24px;margin-top:24px;background-color:var(--zonos-elements-gray-50);padding:48px}:host .zonos--finish-details{max-width:640px;min-width:300px;line-height:24px;width:0 auto;margin:auto}:host zonos-button{width:100%}:host .loading-wrapper{min-height:300px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .zonos--finish-button-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto;margin-top:48px;max-width:300px}:host .zonos--button-container{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto}:host .zonos--subtitle{text-align:center}:host .zonos--order-number{background-color:var(--zonos-elements-gray-0);border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800);border-radius:var(--zonos-elements-radius-6);padding:4px 8px}";var E=A;var Y=30;var q=o("zonos_collect_finish",function(){function o(o){var n=this;e(this,o);this.closeClick=t(this,"closeClick",7);this.borderRadius="ROUNDED";this.confirmationId=null;this.isLoading=true;this.notificationType="success";this.notificationTitle="";this.notificationMessages=[];this.notificationActionText=g("Keep shopping");this.order=null;this.isWaitingToRedirect=true;this.pullOrder=function(){return __awaiter(n,void 0,void 0,(function(){var o,e,t,n,s,a,l,i;return __generator(this,(function(r){switch(r.label){case 0:t=v.checkoutSessionId;n=new URLSearchParams;n.set("checkoutSessionId",t||"");return[4,C("/api/zonos-elements/get-order?".concat(n.toString()))];case 1:s=r.sent(),a=s.baseUrl,l=s.errors,i=s.json;if(l.length||!(i===null||i===void 0?void 0:i.id)){return[2,{baseUrl:a,order:null}]}return[4,(e=(o=k.checkoutSettings).onOrderSuccess)===null||e===void 0?void 0:e.call(o,{zonosApiRoute:a,zonosOrder:i})];case 2:r.sent();return[2,{baseUrl:a,order:i}]}}))}))};this.handleSuccessBehavior=function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:this.isLoading=false;return[4,this.getPullOrder()];case 1:o.sent();return[2]}}))}))};this.getPullOrder=function(){var o=[];for(var e=0;e<arguments.length;e++){o[e]=arguments[e]}return __awaiter(n,__spreadArray([],o,true),void 0,(function(o){var e,t,n,s,a,l,i,r;if(o===void 0){o=0}return __generator(this,(function(c){switch(c.label){case 0:if(o===0){M("=== Start to poll for order info","info")}return[4,this.pullOrder()];case 1:n=c.sent(),s=n.baseUrl,a=n.order;l=!!((t=(e=a===null||a===void 0?void 0:a.references)===null||e===void 0?void 0:e.find((function(o){return(o===null||o===void 0?void 0:o.key)==="zonosOrderNumber"})))===null||t===void 0?void 0:t.value);i=v.checkoutSessionId;r=parseFloat(new URLSearchParams(window.location.search).get("maxPollingRetries")||"0")||Y;M("=== Polling order (".concat(o," attemps)"),"info");if(!a)return[3,2];M("=== CollectOrder info found","info");if(o>10){void _({endpoint:"".concat(s,"/api/zonos-elements/get-order?checkoutSessionId=").concat(i,"&orderId=").concat(a.id),errors:["Collect order found after ".concat(o," attempts")],metadata:{allLogs:Z,checkoutSessionId:v.checkoutSessionId||"",orderId:a.id,storeId:k.storeId}})}this.order=a;return[3,6];case 2:if(!((!a||!l)&&o<r))return[3,5];return[4,new Promise((function(o){return setTimeout(o,1e3)}))];case 3:c.sent();return[4,this.getPullOrder(o+1)];case 4:c.sent();return[3,6];case 5:void _({endpoint:"".concat(s,"/api/zonos-elements/get-order?checkoutSessionId=").concat(i),errors:["Collect order not found after ".concat(r," attempts")],metadata:{allLogs:Z,checkoutSessionId:v.checkoutSessionId||"",storeId:k.storeId}});c.label=6;case 6:return[2]}}))}))};this.checkStripePaymentStatus=function(){return __awaiter(n,void 0,void 0,(function(){var o,e,t,n,s,a,l,u,h;return __generator(this,(function(p){switch(p.label){case 0:o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||i.clientSecret;if(!(o||this.storybookForceStatus))return[3,4];return[4,r({clientSecret:o,storybookForceStatus:this.storybookForceStatus})];case 1:e=p.sent(),t=e.error,n=e.messages,s=e.status;a=s==="requires_action"||t;this.notificationType=a?"error":"success";this.notificationMessages=n||[];this.notificationTitle=a?g("Payment failed"):g("You're all set!");M("=== Payment intent retrieve status","info",{clientSecret:o,error:t,messages:n,status:s});l=new URL(window.location.href);l.searchParams.delete("payment_intent_client_secret");l.searchParams.delete("payment_intent");l.searchParams.delete("redirect_status");l.searchParams.delete("zonosCheckoutSessionId");window.history.replaceState({},"",l.toString());if(!(t&&(n===null||n===void 0?void 0:n.length)))return[3,2];P({event:"zonos-checkout-payment-fail"});void _({endpoint:"Stripe payment failed",errors:['Payment intent "'.concat(o.split("_secret_")[0]||o,'" status: ').concat(s," - checkout session: ").concat(v.checkoutSessionId)],metadata:{allLogs:Z,credentialToken:window.Zonos.zonosApiKey}});return[3,4];case 2:P({event:"zonos-checkout-success"});u=v.checkoutSessionId;void c({checkoutSessionId:u,eventName:"checkout_orderCompleted"});h=I("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(h);return[4,this.handleSuccessBehavior()];case 3:p.sent();p.label=4;case 4:this.isLoading=false;d();f();v.checkoutSessionId=null;return[2]}}))}))};this.checkStagingOrderStatus=function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:this.notificationType="success";this.notificationTitle=g("You're all set!");this.notificationMessages=u("succeeded").messages;return[4,this.handleSuccessBehavior()];case 1:o.sent();d();f();b();v.checkoutSessionId=null;return[2]}}))}))};this.checkPaypalPaymentStatus=function(){return __awaiter(n,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:if(z.paypalErrorMessage){this.notificationType="error";this.notificationTitle=g("Payment failed");this.notificationMessages=[z.paypalErrorMessage];this.isLoading=false;return[2]}this.isLoading=false;if(!z.orderIdCreated)return[3,2];P({event:"zonos-checkout-success"});o=v.checkoutSessionId;void c({checkoutSessionId:o,eventName:"checkout_orderCompleted"});this.notificationType="success";this.notificationTitle=g("You're all set!");this.notificationMessages=u("succeeded").messages;return[4,this.handleSuccessBehavior()];case 1:e.sent();e.label=2;case 2:d();f();b();v.checkoutSessionId=null;return[2]}}))}))};this.getReceiptUrl=function(o){var e=o.cartId;var t=new URL("".concat(window.location.origin,"/receipt"));t.searchParams.set("referenceId",e);var n=L();if(n){t.searchParams.set("zonosTestMode","1")}var s=new URLSearchParams(window.location.search).get("zonosQaUrl");if(s){t.searchParams.set("zonosQaUrl",s)}return t.toString()}}o.prototype.componentDidLoad=function(){if(this.overrideNotification){this.notificationType=this.overrideNotification.type;this.notificationTitle=this.overrideNotification.title;this.notificationMessages=this.overrideNotification.messages;this.isLoading=false;return}if(h.isStagingMode){void this.checkStagingOrderStatus()}else if(z.orderIdCreated){void this.checkPaypalPaymentStatus()}else{void this.checkStripePaymentStatus()}};o.prototype.render=function(){var o=this;var e=window.Zonos.cartId;return n(a,{key:"c085862ecf1f50752634fb44f99b5cb5d82a9e24",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":H({overrideBorderStyle:this.borderRadius})}},!this.isLoading&&n("div",{key:"9b30b12c817c3422b355a2f544bbf2908f736c80",class:"zonos--finish-details"},n("div",{key:"697fff3258a6e74d99500ec25f5d3923f8c7cfc2",class:"zonos--group"},this.notificationType==="success"?n("zonos-icon",{"aria-label":"Order success",content:N,iconColor:"blue-800",size:50}):n("zonos-icon",{"aria-label":"Order failed",content:R,iconColor:"red-800",size:50}),n("zonos-text",{key:"8457c0c9b22c2fb6374b60e492099981026d2690",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),this.confirmationId&&n("zonos-badge",{key:"21ab18878abb37a2c37d873c494d71aee3d4ed71",badgeColor:"gray"},this.confirmationId),n("zonos-text",{key:"389918dd57e6ce5744b7192baa3c06c6db3f70cd",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((function(o){return n(s,null,o,n("br",null))}))),this.order&&e&&n("div",{key:"cca6b625a6bea62b788cf8dd6bb9e03e6505d81c",class:"zonos--button-container"},n("zonos-button",{key:"0f45987515ae99045e5b449b5b1aaae11d70d9fb",onClick:function(){window.open(o.getReceiptUrl({cartId:e}),"_blank")},size:"lg",variant:"primary"},g("View receipt"))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());q.style=E;var Q='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM11.4709 5.80634C11.7686 5.53723 11.9541 5.5 12 5.5C12.0459 5.5 12.2314 5.53723 12.5291 5.80634C12.8115 6.06164 13.1289 6.46913 13.4271 7.03651C13.9505 8.03191 14.3838 9.46098 14.48 11.25H9.51996C9.61624 9.46098 10.0495 8.03191 10.5729 7.03651C10.8711 6.46913 11.1885 6.06164 11.4709 5.80634ZM8.01802 11.25C8.11591 9.23031 8.60319 7.55958 9.24516 6.33849C9.29983 6.23451 9.35585 6.13335 9.41312 6.03514C7.32916 6.94017 5.81218 8.90533 5.5428 11.25H8.01802ZM5.5428 12.75H8.01802C8.11591 14.7697 8.60319 16.4404 9.24516 17.6615C9.29983 17.7655 9.35585 17.8666 9.41312 17.9649C7.32916 17.0598 5.81218 15.0947 5.5428 12.75ZM9.51996 12.75H14.48C14.3838 14.539 13.9505 15.9681 13.4271 16.9635C13.1289 17.5309 12.8115 17.9384 12.5291 18.1937C12.2314 18.4628 12.0459 18.5 12 18.5C11.9541 18.5 11.7686 18.4628 11.4709 18.1937C11.1885 17.9384 10.8711 17.5309 10.5729 16.9635C10.0495 15.9681 9.61624 14.539 9.51996 12.75ZM15.982 12.75C15.8841 14.7697 15.3968 16.4404 14.7548 17.6615C14.7002 17.7655 14.6441 17.8666 14.5869 17.9649C16.6708 17.0598 18.1878 15.0947 18.4572 12.75H15.982ZM18.4572 11.25C18.1878 8.90533 16.6708 6.94017 14.5869 6.03514C14.6441 6.13335 14.7002 6.23451 14.7548 6.33849C15.3968 7.55958 15.8841 9.23031 15.982 11.25H18.4572Z" fill="currentColor"/>\n</svg>\n';var G='<svg width="43" height="10" viewBox="0 0 43 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.35896 0.0640869H0.30768C0.166068 0.0640869 0.0512695 0.178886 0.0512695 0.320497V1.85896C0.0512695 2.00057 0.166068 2.11537 0.30768 2.11537H4.44439C4.54964 2.11537 4.61005 2.2352 4.54745 2.31982L0.151823 8.2615C0.0865163 8.34978 0.0512695 8.45669 0.0512695 8.56649V9.67947C0.0512695 9.82108 0.166068 9.93588 0.30768 9.93588H7.35896C7.50057 9.93588 7.61537 9.82108 7.61537 9.67947V8.14101C7.61537 7.9994 7.50057 7.8846 7.35896 7.8846H3.22226C3.117 7.8846 3.05659 7.76477 3.11919 7.68015L7.51482 1.73847C7.58013 1.65019 7.61537 1.54328 7.61537 1.43348V0.320497C7.61537 0.178886 7.50057 0.0640869 7.35896 0.0640869Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M11.718 0C10.1602 0 8.89746 1.26279 8.89746 2.82051V7.17949C8.89746 8.73721 10.1602 10 11.718 10H13.6411C15.1988 10 16.4616 8.73721 16.4616 7.17949V2.82051C16.4616 1.26279 15.1988 0 13.6411 0H11.718ZM11.718 2.05128C11.2931 2.05128 10.9487 2.39568 10.9487 2.82051V7.17949C10.9487 7.60432 11.2931 7.94872 11.718 7.94872H13.6411C14.0659 7.94872 14.4103 7.60432 14.4103 7.17949V5V2.82051C14.4103 2.39568 14.0659 2.05128 13.6411 2.05128H11.718Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M17.7437 0.436316V9.71132C17.7437 9.85293 17.8585 9.96773 18.0001 9.96773H19.5385C19.6801 9.96773 19.7949 9.85293 19.7949 9.71132V3.74801C19.7949 3.44829 19.969 3.17587 20.241 3.04996L22.1641 2.15964C22.6739 1.92363 23.2565 2.29592 23.2565 2.85769V9.71132C23.2565 9.85293 23.3713 9.96773 23.5129 9.96773H25.0513C25.193 9.96773 25.3078 9.85293 25.3078 9.71132V2.85595C25.3078 0.79631 23.1718 -0.568775 21.3027 0.296257L19.9742 0.911055C19.8685 0.959946 19.7432 0.931536 19.669 0.84187L19.2748 0.365697C19.1773 0.248019 19.0325 0.179905 18.8797 0.179905H18.0001C17.8585 0.179905 17.7437 0.294704 17.7437 0.436316Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M29.4104 0C27.8526 0 26.5898 1.26279 26.5898 2.82051V7.17949C26.5898 8.73721 27.8526 10 29.4104 10H31.3334C32.8912 10 34.1539 8.73721 34.1539 7.17949V2.82051C34.1539 1.26279 32.8912 0 31.3334 0H29.4104ZM29.4104 2.05128C28.9855 2.05128 28.6411 2.39568 28.6411 2.82051V7.17949C28.6411 7.60432 28.9855 7.94872 29.4104 7.94872H31.3334C31.7583 7.94872 32.1027 7.60432 32.1027 7.17949V2.82051C32.1027 2.39568 31.7583 2.05128 31.3334 2.05128H29.4104Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M38.2085 0.0640869H40.3889C41.8309 0.0640869 42.9999 1.23306 42.9999 2.67506C42.9999 2.79477 42.9108 2.89574 42.792 2.91059L41.1732 3.11293C41.054 3.12784 40.9486 3.03485 40.9486 2.91466C40.9486 2.47322 40.5908 2.11537 40.1493 2.11537H38.3397C37.8688 2.11537 37.4871 2.49712 37.4871 2.96803C37.4871 3.3685 37.7658 3.71501 38.1569 3.80087L40.7916 4.37922C42.0811 4.66229 42.9999 5.80462 42.9999 7.12486C42.9999 8.67735 41.7414 9.93588 40.1889 9.93588H38.0468C36.6048 9.93588 35.4358 8.76691 35.4358 7.32491C35.4358 7.2052 35.5249 7.10423 35.6437 7.08938L37.2625 6.88703C37.3817 6.87213 37.4871 6.96512 37.4871 7.08531C37.4871 7.52675 37.8449 7.8846 38.2864 7.8846H40.1176C40.5765 7.8846 40.9486 7.51252 40.9486 7.05354C40.9486 6.67478 40.6925 6.34394 40.3258 6.24901L37.5136 5.52093C36.2902 5.20422 35.4358 4.10042 35.4358 2.83676C35.4358 1.30545 36.6772 0.0640869 38.2085 0.0640869Z" fill="var(--zonos-elements-gray-700)"/>\n</svg>\n';var K=":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{position:absolute;bottom:0;left:32px;right:32px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--collect-footer{gap:16px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px;padding-left:0;-ms-flex-align:center;align-items:center;width:100%}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper .zonos--collect-footer-logo{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper .zonos--collect-footer-logo a{line-height:0}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper a{text-decoration:none}:host .zonos--collect-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--collect-footer .zonos--collect-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;position:relative}@media (max-width: 400px){:host .zonos--collect-footer .zonos--collect-locale-wrapper{gap:4px}}:host .zonos--collect-footer .zonos--collect-language-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);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);width:360px;max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;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}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar{width:10px}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--collect-footer .zonos--collect-language-dialog.zonos--collect-language-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .dot{display:-ms-inline-flexbox;display:inline-flex;background:var(--zonos-elements-gray-400);width:6px;height:6px;border-radius:50%}:host(.mobile),:host(.tablet){background-color:var(--zonos-elements-gray-0);width:100%;position:-webkit-sticky;position:sticky;bottom:0}:host(.tablet) .zonos--collect-footer{width:100%;max-width:800px;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex}:host(.mobile) .zonos--collect-locale-wrapper{display:none}:host(.mobile) .zonos--collect-footer{-ms-flex-pack:center;justify-content:center}";var J=K;var X=o("zonos_collect_footer",function(){function o(o){e(this,o);this.mobile=false;this.tablet=false;this.showLanguageDialog=false;this.isMobile=false;this.isTablet=false}o.prototype.handleGlobalClick=function(o){if(!this.el.contains(o.target)&&this.showLanguageDialog){this.showLanguageDialog=false}};o.prototype.toggleLanguageDialog=function(){this.showLanguageDialog=!this.showLanguageDialog};o.prototype.handleMobileChange=function(){this.isMobile=B(this.mobile)};o.prototype.handleTabletChange=function(){this.isTablet=D(this.tablet)};o.prototype.componentWillLoad=function(){this.isMobile=B(this.mobile);this.isTablet=D(this.tablet)};o.prototype.render=function(){var o=this;var e;var t=(e=O.find((function(o){return o.code===x.selectedLocale})))===null||e===void 0?void 0:e.label;var s="gray-1000";return n(a,{key:"9509e7325ad0153d2f5c9ba3b5689fdb3ad6313e",class:V(["zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},n("div",{key:"250716798bf30901678b16e1ac159810f1d7a6ad",class:"zonos--collect-footer"},n("div",{key:"ab61803d4b5348b8978e7dfcb16a5733cca5dd29",class:"zonos--collect-locale-wrapper"},n("zonos-button",{key:"6c5dcd25d5ef73b2098269d840e291343d30cb81",buttonColor:s,class:"zonos--collect-footer-language-button",icon:n("zonos-icon",{"aria-label":"Language select",content:Q,iconColor:s}),onClick:function(){return o.toggleLanguageDialog()},variant:"subtle"},t),n("div",{key:"d1a367cd19b36f1a0f49ccfe78e750218b50a03e",class:V(["zonos--collect-language-dialog",this.showLanguageDialog&&"zonos--collect-language-dialog-open"])},n("zonos-language-select",{key:"02f446b8f4e3dc875f78d5ac2f0b9aa6dd071f1c",handleOnClose:function(){return o.toggleLanguageDialog()}}))),n("div",{key:"b713a78cbd3d3f131c6c473bb1d979899d40b13b",class:"zonos--collect-footer-icon-wrapper"},n("div",{key:"97eab5909d556f13fa2acc0628d583d49f13d3a2",class:"zonos--collect-footer-logo"},n("zonos-text",{key:"a6488e084f153305eed8d6f65341d7ab00297adb",textColor:s},"Powered by"),n("a",{key:"c63a6e1064dbd733add1cc3b1df1456484e2f103",href:"https://zonos.com",target:"_blank",title:"Zonos website"},n("zonos-icon",{key:"081cae2c34e58478a8c20f0f9a9f20dc0b47c9b7",autoHeight:true,content:G,size:42}))),n("div",{key:"0862a11838e62f425d38066230b01f445999d751",class:"dot"}),n("a",{key:"b13f3af014b5d970e45f88cbb0ef669a0f9aa2ac",href:"https://zonos.com/docs/legal/zonos-privacy-policy",target:"_blank"},n("zonos-text",{key:"a675218a36da83427c2ce517a15b1ed5ea5910d6",textColor:s},"Privacy policy")))))};Object.defineProperty(o.prototype,"el",{get:function(){return l(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{mobile:["handleMobileChange"],tablet:["handleTabletChange"]}},enumerable:false,configurable:true});return o}());X.style=J;var $='<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>';var oo='<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="M17.707 14.707a1 1 0 0 1-1.414 0L12 10.414l-4.293 4.293a1 1 0 0 1-1.414-1.414l4.93-4.93a1.1 1.1 0 0 1 1.555 0l4.93 4.93a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var eo=":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{height:100%}:host *{-ms-scroll-chaining:none;overscroll-behavior:contain}:host *::-webkit-scrollbar{width:10px}:host *::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host *::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host *::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--wrapper{overflow:auto;background-color:var(--zonos-elements-gray-50);border-radius:16px;height:100%;min-height:56px}:host .zonos--order-details-header{position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--zonos-elements-gray-50);border:none;display:-ms-flexbox;display:flex;padding:16px 16px 0 16px;width:100%;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}:host .zonos--order-details-header:focus-visible{outline:none}:host .zonos--order-details-wrapper{position:relative;padding:0 16px 16px 16px}:host .zonos--collect-order-details-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:28px}:host .zonos--collect-order-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}:host .zonos--collect-order-info .zonos--collect-order-details-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px}:host .zonos--collect-order-info .zonos--collect-order-details-row>*{-ms-flex:1 1 150px;flex:1 1 150px}:host .zonos--collect-order-info .zonos--collect-order-details-column{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--collect-order-info .zonos--collect-order-shipping-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:0}";var to=eo;var no=o("zonos_collect_order_details",function(){function o(o){e(this,o);this.collapseClicked=t(this,"collapseClicked",7);this.mobile=true;this.landedCostId="";this.isMobile=false;this.collapseState=this.collapsed}o.prototype.handleCollapseChangeFromProp=function(o){this.collapseState=o};o.prototype.handleCollapseChange=function(o){this.collapseClicked.emit(o)};o.prototype.handleWindowResize=function(){this.isMobile=S(this.mobile)};o.prototype.componentWillLoad=function(){this.handleWindowResize()};o.prototype.renderShippingAddress=function(){if(F.isFetchingShippingInfo){return n("div",{class:"zonos--collect-order-details-column"},n("zonos-text",{type:"smallHeader"},n("zonos-skeleton",{skeletonWidth:"99px"})),n("div",{class:"zonos--collect-order-shipping-info"},n("zonos-skeleton",{skeletonWidth:"152px"}),n("zonos-h-stack",{spacing:8},n("zonos-skeleton",{skeletonWidth:"75px"}),n("zonos-skeleton",{skeletonWidth:"75px"})),n("zonos-skeleton",{skeletonWidth:"50px"})))}var o=F.shippingAddress;if(!o){return null}return n("div",{class:"zonos--collect-order-details-column"},n("zonos-text",{type:"smallHeader"},g("Shipping address")),n("div",{class:"zonos--collect-order-shipping-info"},[[o.location.line1,o.location.line2].filter(Boolean).join(" "),[o.location.locality,o.location.administrativeAreaCode,o.location.postalCode].filter(Boolean).join(", "),o.location.countryCode].map((function(o){return n("zonos-text",null,o)}))))};o.prototype.render=function(){var o=this;var e=function(){if(o.collapseState){return n("zonos-icon",{"aria-label":"Collapse expanded section",content:$,iconColor:"gray-1200"})}return n("zonos-icon",{"aria-label":"Expand collapsed section",content:oo,iconColor:"gray-1200"})};return n(a,{class:V(["zonos--collect-order-details zonos--elements",this.isMobile&&"mobile"])},n("div",{class:"zonos--wrapper"},n("button",{class:"zonos--order-details-header",onClick:function(){o.collapseState=!o.collapseState},type:"button"},n("zonos-text",{type:"semiBoldLabel"},g("Order details")),e()),n("div",{class:"zonos--order-details-wrapper"},n("zonos-collapse",{collapsed:this.collapseState},n("div",{class:"zonos--collect-order-details-content"},n("zonos-collect-cart-items",null),n("div",{class:"zonos--collect-order-info"},n("div",{class:"zonos--collect-order-details-row"},F.amountTotalPaid!==null&&n("div",{class:"zonos--collect-order-details-column"},n("zonos-text",{type:"smallHeader"},g("Total paid")),n("zonos-text",null,U({amount:F.amountTotalPaid||0,isForeign:true}))),F.originCompanyName&&n("div",{class:"zonos--collect-order-details-column"},n("zonos-text",{type:"smallHeader"},g("Ordered from")),n("zonos-text",null,F.originCompanyName||""))),this.renderShippingAddress()))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{collapsed:["handleCollapseChangeFromProp"],collapseState:["handleCollapseChange"]}},enumerable:false,configurable:true});return o}());no.style=to;var so='<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>';var ao='<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>';var lo=".sc-zonos-collect-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-collect-payment-h *.sc-zonos-collect-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-collect-payment-h img.sc-zonos-collect-payment{max-width:100%}.sc-zonos-collect-payment-h dl.sc-zonos-collect-payment,.sc-zonos-collect-payment-h dd.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h1.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h2.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h3.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h4.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h5.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h6.sc-zonos-collect-payment,.sc-zonos-collect-payment-h hr.sc-zonos-collect-payment,.sc-zonos-collect-payment-h figure.sc-zonos-collect-payment,.sc-zonos-collect-payment-h p.sc-zonos-collect-payment,.sc-zonos-collect-payment-h pre.sc-zonos-collect-payment{margin:0}.sc-zonos-collect-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-collect-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-collect-payment-h .zonos--title.sc-zonos-collect-payment{margin-bottom:24px}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar{width:10px}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-collect-payment-h .zonos--payment-error-banner.sc-zonos-collect-payment{margin-bottom:8px}.sc-zonos-collect-payment-h .zonos--error-banner.sc-zonos-collect-payment{margin-bottom:16px}.sc-zonos-collect-payment-h zonos-button.sc-zonos-collect-payment{-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-collect-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-collect-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:12px;bottom:-4px;padding-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment zonos-text.sc-zonos-collect-payment{text-align:center}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment zonos-button.sc-zonos-collect-payment{width:100%}.sc-zonos-collect-payment-h .zonos--test-cards.sc-zonos-collect-payment{margin-top:auto;padding-top:16px}";var io=lo;var ro=o("zonos_collect_payment",function(){function o(o){var n=this;e(this,o);this.continueClicked=t(this,"continueClicked",7);this.paypalSessionFailed=t(this,"paypalSessionFailed",7);this.paypalSessionDone=t(this,"paypalSessionDone",7);this.storeUnsubscribeList=[];this.continueLoading=false;this.showErrorBanner=false;this.hasStripePaymentError=false;this.stagingOrderCreateErrorMessage="";this.internalContinueLoading=this.continueLoading;this.handleValidate=function(){var o;return!!((o=i.stripePaymentEventData)===null||o===void 0?void 0:o.complete)};this.continueClickHandler=function(o){return __awaiter(n,[o],void 0,(function(o){var e,t;var n=this;var s=o.currencyCode;return __generator(this,(function(o){if(!this.handleValidate()){void((e=i.stripeBillingAddressElement)===null||e===void 0?void 0:e.getValue());this.showErrorBanner=true;void((t=i.stripeElements)===null||t===void 0?void 0:t.submit());setTimeout((function(){var o;(o=n.ele.querySelector("zonos-banner"))===null||o===void 0?void 0:o.scrollIntoView({behavior:"smooth"})}),10);return[2]}i.checkoutSettlementCurrency=s;P({event:"zonos-checkout-payment-info"});this.continueClicked.emit();return[2]}))}))};this.copyCardToClipboard=function(o){return __awaiter(n,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,navigator.clipboard.writeText(o)];case 1:n.sent();return[3,3];case 2:e=n.sent();t=document.createElement("textarea");t.style.position="fixed";t.style.left="-1000px";t.style.top="-1000px";t.style.width="1px";t.style.height="1px";t.value=o;t.id="zonos-copy-card-number";document.body.appendChild(t);t.select();document.execCommand("copy");document.body.removeChild(t);return[3,3];case 3:window.Zonos.showNotification({message:g("Card number copied to clipboard"),timeout:4e3,type:"success"});return[2]}}))}))};this.placeTestOrder=function(){return __awaiter(n,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:this.internalContinueLoading=true;return[4,T()];case 1:o=e.sent().errors;if(o.length){this.stagingOrderCreateErrorMessage=o[0]||"Failed to create staging order. Please try again.";this.internalContinueLoading=false;return[2]}this.internalContinueLoading=false;p();return[2]}}))}))}}o.prototype.continueLoadingWatcher=function(){this.internalContinueLoading=this.continueLoading};o.prototype.stripePaymentErrorWatcher=function(){var o=this;if(this.hasStripePaymentError){setTimeout((function(){var e;(e=o.ele.querySelector("zonos-banner"))===null||e===void 0?void 0:e.scrollIntoView({behavior:"smooth"})}),50)}};o.prototype.componentWillLoad=function(){this.storeUnsubscribeList=[m("currency",(function(){void y({currency:h.currency})}))];void y({currency:h.currency})};o.prototype.disconnectedCallback=function(){this.storeUnsubscribeList.forEach((function(o){return o()}))};o.prototype.render=function(){var o=this;var e;this.hasStripePaymentError=i.hasPaymentError;if(!i.stripeElements){return null}if(!i.clientSecret){return null}if(this.showErrorBanner){this.showErrorBanner=!this.handleValidate()}var t=L();var l=h.isStagingMode||j();var r=((e=i.stripePaymentEventData)===null||e===void 0?void 0:e.value.type)==="external_paypal";var c=function(){if(l){var e=k.appearance.theme;return n(s,null,o.stagingOrderCreateErrorMessage&&n("zonos-banner",{class:"zonos--error-banner",intent:"error"},o.stagingOrderCreateErrorMessage),n("zonos-empty-state-payment",{emptyStateText:g("No payment method needed for staging"),theme:e}),n("div",{class:"zonos--group-btn"},n("zonos-button",{backgroundColor:o.submitBtnColor,loading:o.internalContinueLoading,onClick:function(){void o.placeTestOrder()},size:"lg",variant:o.submitBtnType},g("Place test order"))))}if(i.isFetchingSession||F.isFetchingShippingInfo){return null}return n(s,null,o.showErrorBanner&&n("zonos-banner",{class:"zonos--error-banner",intent:"error"},g("Missing required fields. Make sure all fields are completed.")),o.hasStripePaymentError&&n("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},i.customErrorMessage||g("We couldn't complete your payment. Please verify the payment details and try again.")),z.paypalErrorMessage&&n("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},z.paypalErrorMessage),n("zonos-payment",null),n("div",{class:"zonos--group-btn"},!r&&n(s,null,n("zonos-button",{backgroundColor:o.submitBtnColor,bold:true,isDisabled:o.continueLoading&&i.checkoutSettlementCurrency==="USD",loading:o.continueLoading&&i.checkoutSettlementCurrency!=="USD",onClick:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!h.checkoutSession){M("Checkout session is not found");return[2]}return[4,this.continueClickHandler({currencyCode:h.checkoutSession.subtotals.presentmentCurrencyCode})];case 1:o.sent();return[2]}}))}))},size:"lg",variant:o.submitBtnType},g("Pay [orderTotal]",{orderTotal:U({amount:F.amountDutyTaxFeeTotal||0,isForeign:true})})),i.shouldRenderPayInUsdButton&&n("zonos-button",{class:"zonos--pay-in-base-currency-btn",isDisabled:o.continueLoading&&i.checkoutSettlementCurrency!=="USD",loading:o.continueLoading&&i.checkoutSettlementCurrency==="USD",onClick:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.continueClickHandler({currencyCode:"USD"})];case 1:o.sent();return[2]}}))}))},size:"lg",variant:"subtle"},g("Click to pay in USD"))),n("zonos-paypal-payment",{onPaypalSessionDone:function(e){var t=e.detail.orderId;o.paypalSessionDone.emit(t)},onPaypalSessionFail:function(){return o.paypalSessionFailed.emit()},style:{display:r?"block":"none"}})),t&&n("zonos-card",{backgroundColor:"gray-100",borderRadius:12,class:"zonos--test-cards"},n("zonos-v-stack",{spacing:16},n("div",null,n("zonos-text",{type:"semiBoldLabel"},g("Test cards")),n("zonos-text",{textColor:"gray-700"},g("Click to copy the card number. Use any future expiration date and three number CVC."))),n("zonos-button",{icon:n("zonos-icon",{content:so}),justifyContent:"flex-start",onClick:function(){return o.copyCardToClipboard("4242424242424242")}},g("Success")," (****4242)"),n("zonos-button",{icon:n("zonos-icon",{content:ao}),justifyContent:"flex-start",onClick:function(){return o.copyCardToClipboard("4000000000000002")}},g("Failure")," (****0002)")),n("zonos-notification",null)))};return n(a,{class:"zonos--checkout-payment zonos--elements"},n("div",{class:"zonos--group"},n("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},g("Payment method")),c()))};Object.defineProperty(o.prototype,"ele",{get:function(){return l(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{continueLoading:["continueLoadingWatcher"],hasStripePaymentError:["stripePaymentErrorWatcher"]}},enumerable:false,configurable:true});return o}());ro.style=io;var co=':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{position:-webkit-sticky;position:sticky;top:0;background-color:var(--zonos-elements-gray-0);z-index:1}:host .zonos--total-pay{margin:8px 0 24px;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;gap:48px}:host .zonos--total-pay zonos-text{-ms-flex-negative:0;flex-shrink:0}:host .zonos--total-pay::after{content:"";position:relative;height:1px;width:100%;background:var(--zonos-elements-gray-200)}:host(.mobile),:host(.tablet){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px;padding:4px 0;background-color:transparent;position:relative}:host(.mobile) .zonos--total-pay,:host(.tablet) .zonos--total-pay{margin:0}';var fo=co;var uo=o("zonos_collect_review",function(){function o(o){e(this,o);this.mobile=false;this.tablet=false;this.collapsed=false;this.isMobile=false;this.isTablet=false;this.isLoading=true}o.prototype.handleWindowResize=function(){this.isMobile=B(this.mobile);this.isTablet=D(this.tablet)};o.prototype.componentWillLoad=function(){var o=this;this.handleWindowResize();setTimeout((function(){o.isLoading=false}),1e3)};o.prototype.render=function(){var o=this.isMobile?"gray-1000":"gray-800";return n(a,{key:"6432c5dd5afd628e33ba26385ecfecb470f1757e",class:V(["zonos--collect-review zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},n("div",{key:"e4d113ff1268c36119e1f80164b6cfd702c67f75",class:"zonos--title"},n("zonos-text",{key:"aad9ad9b526ac65d97a88df516e8e7b34fc3d2b1",textColor:o,type:"semiBoldLabel"},g("Pay [organizationName]",{organizationName:k.organizationName}))),n("div",{key:"fcdaebc734a270742fbe21ff932550994e522ea6",class:"zonos--total-pay"},W({content:n("zonos-text",{type:"secondaryPageHeader"},U({amount:F.amountDutyTaxFeeTotal||0,isForeign:true})),isLoading:F.isFetchingShippingInfo,skeletonHeight:"36px",skeletonWidth:"150px"})))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());uo.style=fo;var ho=":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{position:-webkit-sticky;position:sticky;bottom:60px}:host .zonos--collect-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--collect-table .zonos--column{padding:8px 8px;vertical-align:top}:host .zonos--collect-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--collect-table .zonos--column:first-child{width:60px;max-width:100px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--collect-subtotal-price{text-align:right}:host .zonos--collect-subtotal-price zonos-text{white-space:nowrap}:host .zonos--collect-total .zonos--column{padding:16px 0}:host .zonos--collect-total-subtotal .zonos--collect-subtotal-title,:host .zonos--collect-total-subtotal .zonos--collect-subtotal-price{border-bottom:1px solid var(--zonos-elements-gray-200)}:host .zonos--collect-subtotal-price zonos-text,:host .zonos--collect-pay-total zonos-text{white-space:nowrap}";var po=ho;var mo=o("zonos_collect_subtotal",function(){function o(o){var t=this;e(this,o);this.storeUnsubscribeList=[];this.subtotals={};this.initSubtotalData=function(){var o;var e;var n=(e=h.checkoutSession)===null||e===void 0?void 0:e.subtotals;if(!n){return}var s=g("Duties");var a=g("Taxes");var l=g("Fees");var i=(o={},o[s]=0,o[l]=0,o[a]=0,o);var r=n.duties;var c=n.taxes;var d=n.fees;if(r!==undefined){i[s]||(i[s]=0);i[s]+=r}if(c!==undefined){i[a]||(i[a]=0);i[a]+=c}if(d!==undefined){i[l]||(i[l]=0);i[l]+=d}t.subtotals=i}}o.prototype.disconnectedCallback=function(){this.storeUnsubscribeList.forEach((function(o){return o()}))};o.prototype.componentWillLoad=function(){this.storeUnsubscribeList=[m("checkoutSession",this.initSubtotalData),w("translatedChunks",this.initSubtotalData)]};o.prototype.render=function(){this.initSubtotalData();return n(a,{key:"ab687a6e1ec67f6609081036a75e9905ff34c6b1",class:"zonos--collect-subtotal zonos--elements"},n("table",{key:"303b8c49983e9f7aea4d31400fed53d858eb078d",class:"zonos--collect-table"},!!this.subtotals[g("Duties")]&&n("tr",{key:"a60fa4f1f1afacef0144b86c054f44572576f7af",class:"zonos--row zonos--collect-duty"},n("td",{key:"aeaf798e26bbd482196d7208eb05657a1d15dad8",class:"zonos--column zonos--collect-subtotal-title"},n("zonos-text",{key:"835d817709ae3b7e2d888d618e0856fb2e637e4d",type:"semiBoldLabel"},g("Duties"))),n("td",{key:"5bb47a115ea61fa897a3f48bbd10c5f78af3703e",class:"zonos--column"}),n("td",{key:"32632c4beb855ca687c615f5e6c63c82e2e05c80",class:"zonos--column zonos--collect-subtotal-price"},W({content:n("zonos-text",{type:"label"},U({amount:this.subtotals[g("Duties")]||0,isForeign:true})),isLoading:F.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),!!this.subtotals[g("Taxes")]&&n("tr",{key:"055bb237dafaea8de18b127641c8fd7e1ece563b",class:"zonos--row zonos--collect-tax"},n("td",{key:"1e73b140c2c9090ccfb91ce4efca483e8fb56e9e",class:"zonos--column zonos--collect-subtotal-title"},n("zonos-text",{key:"a3375ecd77460c78c7c5f59bf7b9b8612cd53e41",type:"semiBoldLabel"},g("Taxes"))),n("td",{key:"20685646be29873967c2f335c775046068248ad3",class:"zonos--column"}),n("td",{key:"2e2c6af2c1a7840df03351178ddf3107fcc36494",class:"zonos--column zonos--collect-subtotal-price"},W({content:n("zonos-text",{type:"label"},U({amount:this.subtotals[g("Taxes")]||0,isForeign:true})),isLoading:F.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),!!this.subtotals[g("Fees")]&&n("tr",{key:"8157aba5c6a23680b0bc681adc127747f01a2973",class:"zonos--row zonos--collect-fee"},n("td",{key:"8266654f9e65003f297222bb935013a8b9b3b430",class:"zonos--column zonos--collect-subtotal-title"},n("zonos-text",{key:"8399000a5f61e4737764b68b89799b409dce6034",type:"semiBoldLabel"},g("Fees"))),n("td",{key:"2a9763f2401967ea1bdfa2c17514d18e2a4e0db6",class:"zonos--column"}),n("td",{key:"ac2f275312c2ba69888e6e57dde8b4b451839b86",class:"zonos--column zonos--collect-subtotal-price"},W({content:n("zonos-text",{type:"label"},U({amount:this.subtotals[g("Fees")]||0,isForeign:true})),isLoading:F.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),n("tr",{key:"a293d1b9342251f7326c1ac68e2bab83eae2ed80",class:"zonos--row zonos--collect-spacing"},n("td",{key:"c136b1b807f32dc21c131326d70500d2e2c64efe",class:"zonos--column",colSpan:3})),n("tr",{key:"59747101f1a9ef7c8fad60e90ea5b8c31015438c",class:"zonos--row zonos--collect-total zonos--collect-total-subtotal"},n("td",{key:"96d201ba6f3e571adac265127229c94cdc96be2a",class:"zonos--column"}),n("td",{key:"f2f4cb751e35fc0ebaa803659f26a2314d8bf639",class:"zonos--column zonos--collect-subtotal-title"},n("zonos-text",{key:"b4f89ea1e523af8a5aead4ef007a6f0dc7e7f441",type:"label"},g("Subtotal"))),n("td",{key:"28b6aea6363b2bef1d072ad77f409ae77976305c",class:"zonos--column zonos--collect-subtotal-price"},W({content:n("zonos-text",{type:"label"},U({amount:F.amountDutyTaxFeeTotal||0,isForeign:true})),isLoading:F.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),n("tr",{key:"f0072cdd200e8483421265af39a90fb655fb2ef0",class:"zonos--row zonos--collect-total"},n("td",{key:"88a007048d33c919a6c5f87cf7cd071f83e7448b",class:"zonos--column"}),n("td",{key:"24bba9e9b81ff443dd5ca4832c3169e3605a93b8",class:"zonos--column zonos--collect-subtotal-title"},n("zonos-text",{key:"594d4e96bec3a2153f6622c6842970ebee5bb463",type:"semiBoldLabel"},g("Customs fees total"))),n("td",{key:"b3ffd6dcae747dd2ed68ae16fb60d9655f7669dc",class:"zonos--column zonos--collect-subtotal-price"},W({content:n("zonos-text",{type:"semiBoldLabel"},U({amount:F.amountDutyTaxFeeTotal||0,isForeign:true})),isLoading:F.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());mo.style=po}}}));
1
+ var __awaiter=this&&this.__awaiter||function(o,e,t,n){function s(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,a){function l(o){try{r(n.next(o))}catch(o){a(o)}}function i(o){try{r(n["throw"](o))}catch(o){a(o)}}function r(o){o.done?t(o.value):s(o.value).then(l,i)}r((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,s,a,l;return l={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function i(o){return function(e){return r([o,e])}}function r(i){if(n)throw new TypeError("Generator is already executing.");while(l&&(l=0,i[0]&&(t=0)),t)try{if(n=1,s&&(a=i[0]&2?s["return"]:i[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,i[1])).done)return a;if(s=0,a)i=[i[0]&2,a.value];switch(i[0]){case 0:case 1:a=i;break;case 4:t.label++;return{value:i[1],done:false};case 5:t.label++;s=i[1];i=[0];continue;case 7:i=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(i[0]===6||i[0]===2)){t=0;continue}if(i[0]===3&&(!a||i[1]>a[0]&&i[1]<a[3])){t.label=i[1];break}if(i[0]===6&&t.label<a[1]){t.label=a[1];a=i;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(i);break}if(a[2])t.ops.pop();t.trys.pop();continue}i=e.call(o,t)}catch(o){i=[6,o];s=0}finally{n=a=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(o,e,t){if(t||arguments.length===2)for(var n=0,s=e.length,a;n<s;n++){if(a||!(n in e)){if(!a)a=Array.prototype.slice.call(e,0,n);a[n]=e[n]}}return o.concat(a||Array.prototype.slice.call(e))};System.register(["./p-7261e245.system.js","./p-196423ad.system.js","./p-47bde0ba.system.js","./p-248bdea2.system.js","./p-15ef7644.system.js","./p-01174496.system.js","./p-bf37ccc7.system.js","./p-8bce79f4.system.js","./p-d938f42f.system.js","./p-17a8a514.system.js","./p-20263609.system.js","./p-23e7c655.system.js","./p-c9e433c0.system.js","./p-d7a9be55.system.js","./p-0699931c.system.js","./p-45bd8072.system.js","./p-61be7d98.system.js","./p-43a6e469.system.js"],(function(o){"use strict";var e,t,n,s,a,l,i,r,c,d,u,h,f,p,m,b,z,y,g,v,x,w,k,C,_,L,S,j,I,H,M,Z,P,B,D,F,V,O,U,T,W;return{setters:[function(o){e=o.r;t=o.d;n=o.h;s=o.F;a=o.a;l=o.g},function(o){i=o.b;r=o.c;c=o.t;d=o.L;u=o.C;h=o.M;f=o.d;p=o.r;m=o.D},function(o){b=o.c;z=o.a;y=o.b},function(o){g=o.t;v=o.s;x=o.l;w=o.p},function(o){k=o.z},function(o){C=o.h;_=o.s;L=o.g;S=o.i;j=o.a},function(o){I=o.c},function(o){H=o.g},function(o){M=o.l;Z=o.b},function(o){P=o.s},function(o){B=o.i;D=o.a;F=o.e},function(o){V=o.c},function(o){O=o.l},function(o){U=o.r},function(o){T=o.p},function(o){W=o.r},function(){},function(){}],execute:function(){var R='<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var N='<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-100)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M15.707 9.293a1 1 0 0 1 0 1.414l-3.646 3.647a1.5 1.5 0 0 1-2.122 0l-1.646-1.647a1 1 0 1 1 1.414-1.414L11 12.586l3.293-3.293a1 1 0 0 1 1.414 0Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var A=":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-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin-bottom:24px;border-radius:var(--zonos--border-radius, 10px);gap:24px;margin-top:24px;background-color:var(--zonos-elements-gray-50);padding:48px}:host .zonos--finish-details{max-width:640px;min-width:300px;line-height:24px;width:0 auto;margin:auto}:host zonos-button{width:100%}:host .loading-wrapper{min-height:300px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .zonos--finish-button-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto;margin-top:48px;max-width:300px}:host .zonos--button-container{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto}:host .zonos--subtitle{text-align:center}:host .zonos--order-number{background-color:var(--zonos-elements-gray-0);border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800);border-radius:var(--zonos-elements-radius-6);padding:4px 8px}";var E=A;var Y=30;var q=o("zonos_collect_finish",function(){function o(o){var n=this;e(this,o);this.closeClick=t(this,"closeClick",7);this.borderRadius="ROUNDED";this.confirmationId=null;this.isLoading=true;this.notificationType="success";this.notificationTitle="";this.notificationMessages=[];this.notificationActionText=g("Keep shopping");this.order=null;this.isWaitingToRedirect=true;this.pullOrder=function(){return __awaiter(n,void 0,void 0,(function(){var o,e,t,n,s,a,l,i;return __generator(this,(function(r){switch(r.label){case 0:t=v.checkoutSessionId;n=new URLSearchParams;n.set("checkoutSessionId",t||"");return[4,C("/api/zonos-elements/get-order?".concat(n.toString()))];case 1:s=r.sent(),a=s.baseUrl,l=s.errors,i=s.json;if(l.length||!(i===null||i===void 0?void 0:i.id)){return[2,{baseUrl:a,order:null}]}return[4,(e=(o=k.checkoutSettings).onOrderSuccess)===null||e===void 0?void 0:e.call(o,{zonosApiRoute:a,zonosOrder:i})];case 2:r.sent();return[2,{baseUrl:a,order:i}]}}))}))};this.handleSuccessBehavior=function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:this.isLoading=false;return[4,this.getPullOrder()];case 1:o.sent();return[2]}}))}))};this.getPullOrder=function(){var o=[];for(var e=0;e<arguments.length;e++){o[e]=arguments[e]}return __awaiter(n,__spreadArray([],o,true),void 0,(function(o){var e,t,n,s,a,l,i,r;if(o===void 0){o=0}return __generator(this,(function(c){switch(c.label){case 0:if(o===0){M("=== Start to poll for order info","info")}return[4,this.pullOrder()];case 1:n=c.sent(),s=n.baseUrl,a=n.order;l=!!((t=(e=a===null||a===void 0?void 0:a.references)===null||e===void 0?void 0:e.find((function(o){return(o===null||o===void 0?void 0:o.key)==="zonosOrderNumber"})))===null||t===void 0?void 0:t.value);i=v.checkoutSessionId;r=parseFloat(new URLSearchParams(window.location.search).get("maxPollingRetries")||"0")||Y;M("=== Polling order (".concat(o," attemps)"),"info");if(!a)return[3,2];M("=== CollectOrder info found","info");if(o>10){void _({endpoint:"".concat(s,"/api/zonos-elements/get-order?checkoutSessionId=").concat(i,"&orderId=").concat(a.id),errors:["Collect order found after ".concat(o," attempts")],metadata:{allLogs:Z,checkoutSessionId:v.checkoutSessionId||"",orderId:a.id,storeId:k.storeId}})}this.order=a;return[3,6];case 2:if(!((!a||!l)&&o<r))return[3,5];return[4,new Promise((function(o){return setTimeout(o,1e3)}))];case 3:c.sent();return[4,this.getPullOrder(o+1)];case 4:c.sent();return[3,6];case 5:void _({endpoint:"".concat(s,"/api/zonos-elements/get-order?checkoutSessionId=").concat(i),errors:["Collect order not found after ".concat(r," attempts")],metadata:{allLogs:Z,checkoutSessionId:v.checkoutSessionId||"",storeId:k.storeId}});c.label=6;case 6:return[2]}}))}))};this.checkStripePaymentStatus=function(){return __awaiter(n,void 0,void 0,(function(){var o,e,t,n,s,a,l,h,f;return __generator(this,(function(p){switch(p.label){case 0:o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||i.clientSecret;if(!(o||this.storybookForceStatus))return[3,4];return[4,r({clientSecret:o,storybookForceStatus:this.storybookForceStatus})];case 1:e=p.sent(),t=e.error,n=e.messages,s=e.status;a=s==="requires_action"||t;this.notificationType=a?"error":"success";this.notificationMessages=n||[];this.notificationTitle=a?g("Payment failed"):g("You're all set!");M("=== Payment intent retrieve status","info",{clientSecret:o,error:t,messages:n,status:s});l=new URL(window.location.href);l.searchParams.delete("payment_intent_client_secret");l.searchParams.delete("payment_intent");l.searchParams.delete("redirect_status");l.searchParams.delete("zonosCheckoutSessionId");window.history.replaceState({},"",l.toString());if(!(t&&(n===null||n===void 0?void 0:n.length)))return[3,2];P({event:"zonos-checkout-payment-fail"});void _({endpoint:"Stripe payment failed",errors:['Payment intent "'.concat(o.split("_secret_")[0]||o,'" status: ').concat(s," - checkout session: ").concat(v.checkoutSessionId)],metadata:{allLogs:Z,credentialToken:window.Zonos.zonosApiKey}});return[3,4];case 2:P({event:"zonos-checkout-success"});h=v.checkoutSessionId;void c({checkoutSessionId:h,eventName:"checkout_orderCompleted"});f=I("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(f);return[4,this.handleSuccessBehavior()];case 3:p.sent();p.label=4;case 4:this.isLoading=false;d();u();v.checkoutSessionId=null;return[2]}}))}))};this.checkStagingOrderStatus=function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:this.notificationType="success";this.notificationTitle=g("You're all set!");this.notificationMessages=h("succeeded").messages;return[4,this.handleSuccessBehavior()];case 1:o.sent();d();u();b();v.checkoutSessionId=null;return[2]}}))}))};this.checkPaypalPaymentStatus=function(){return __awaiter(n,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:if(z.paypalErrorMessage){this.notificationType="error";this.notificationTitle=g("Payment failed");this.notificationMessages=[z.paypalErrorMessage];this.isLoading=false;return[2]}this.isLoading=false;if(!z.orderIdCreated)return[3,2];P({event:"zonos-checkout-success"});o=v.checkoutSessionId;void c({checkoutSessionId:o,eventName:"checkout_orderCompleted"});this.notificationType="success";this.notificationTitle=g("You're all set!");this.notificationMessages=h("succeeded").messages;return[4,this.handleSuccessBehavior()];case 1:e.sent();e.label=2;case 2:d();u();b();v.checkoutSessionId=null;return[2]}}))}))};this.getReceiptUrl=function(o){var e=o.cartId;var t=new URL("".concat(window.location.origin,"/receipt"));t.searchParams.set("referenceId",e);var n=L();if(n){t.searchParams.set("zonosTestMode","1")}var s=new URLSearchParams(window.location.search).get("zonosQaUrl");if(s){t.searchParams.set("zonosQaUrl",s)}return t.toString()}}o.prototype.componentDidLoad=function(){if(this.overrideNotification){this.notificationType=this.overrideNotification.type;this.notificationTitle=this.overrideNotification.title;this.notificationMessages=this.overrideNotification.messages;this.isLoading=false;return}if(f.isStagingMode){void this.checkStagingOrderStatus()}else if(z.orderIdCreated){void this.checkPaypalPaymentStatus()}else{void this.checkStripePaymentStatus()}};o.prototype.render=function(){var o=this;var e=window.Zonos.cartId;return n(a,{key:"ece5aa1dae1e8e7bb99c0904adeaf6541fbf3ea6",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":H({overrideBorderStyle:this.borderRadius})}},!this.isLoading&&n("div",{key:"d48c2384fb55b7b318143f933775c35e29abbe38",class:"zonos--finish-details"},n("div",{key:"85e03a288ee29bc1f664d03b9c99a164acc51b92",class:"zonos--group"},this.notificationType==="success"?n("zonos-icon",{"aria-label":"Order success",content:N,iconColor:"blue-800",size:50}):n("zonos-icon",{"aria-label":"Order failed",content:R,iconColor:"red-800",size:50}),n("zonos-text",{key:"7fcd228d5144d4f523d15870cdf18491278f0ee6",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),this.confirmationId&&n("zonos-badge",{key:"219365d86b8aef904adffb1fab5e045db174a724",badgeColor:"gray"},this.confirmationId),n("zonos-text",{key:"4b2b41bdf35eb2d79b32fa5f7538798e3fd028f5",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((function(o){return n(s,null,o,n("br",null))}))),this.order&&e&&n("div",{key:"52431496f81706a720406843309646b4fd9b2413",class:"zonos--button-container"},n("zonos-button",{key:"4ccdbba8da9591c6207a472df29515fec8c0c56f",onClick:function(){window.open(o.getReceiptUrl({cartId:e}),"_blank")},size:"lg",variant:"primary"},g("View receipt"))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());q.style=E;var Q='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM11.4709 5.80634C11.7686 5.53723 11.9541 5.5 12 5.5C12.0459 5.5 12.2314 5.53723 12.5291 5.80634C12.8115 6.06164 13.1289 6.46913 13.4271 7.03651C13.9505 8.03191 14.3838 9.46098 14.48 11.25H9.51996C9.61624 9.46098 10.0495 8.03191 10.5729 7.03651C10.8711 6.46913 11.1885 6.06164 11.4709 5.80634ZM8.01802 11.25C8.11591 9.23031 8.60319 7.55958 9.24516 6.33849C9.29983 6.23451 9.35585 6.13335 9.41312 6.03514C7.32916 6.94017 5.81218 8.90533 5.5428 11.25H8.01802ZM5.5428 12.75H8.01802C8.11591 14.7697 8.60319 16.4404 9.24516 17.6615C9.29983 17.7655 9.35585 17.8666 9.41312 17.9649C7.32916 17.0598 5.81218 15.0947 5.5428 12.75ZM9.51996 12.75H14.48C14.3838 14.539 13.9505 15.9681 13.4271 16.9635C13.1289 17.5309 12.8115 17.9384 12.5291 18.1937C12.2314 18.4628 12.0459 18.5 12 18.5C11.9541 18.5 11.7686 18.4628 11.4709 18.1937C11.1885 17.9384 10.8711 17.5309 10.5729 16.9635C10.0495 15.9681 9.61624 14.539 9.51996 12.75ZM15.982 12.75C15.8841 14.7697 15.3968 16.4404 14.7548 17.6615C14.7002 17.7655 14.6441 17.8666 14.5869 17.9649C16.6708 17.0598 18.1878 15.0947 18.4572 12.75H15.982ZM18.4572 11.25C18.1878 8.90533 16.6708 6.94017 14.5869 6.03514C14.6441 6.13335 14.7002 6.23451 14.7548 6.33849C15.3968 7.55958 15.8841 9.23031 15.982 11.25H18.4572Z" fill="currentColor"/>\n</svg>\n';var G='<svg width="43" height="10" viewBox="0 0 43 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.35896 0.0640869H0.30768C0.166068 0.0640869 0.0512695 0.178886 0.0512695 0.320497V1.85896C0.0512695 2.00057 0.166068 2.11537 0.30768 2.11537H4.44439C4.54964 2.11537 4.61005 2.2352 4.54745 2.31982L0.151823 8.2615C0.0865163 8.34978 0.0512695 8.45669 0.0512695 8.56649V9.67947C0.0512695 9.82108 0.166068 9.93588 0.30768 9.93588H7.35896C7.50057 9.93588 7.61537 9.82108 7.61537 9.67947V8.14101C7.61537 7.9994 7.50057 7.8846 7.35896 7.8846H3.22226C3.117 7.8846 3.05659 7.76477 3.11919 7.68015L7.51482 1.73847C7.58013 1.65019 7.61537 1.54328 7.61537 1.43348V0.320497C7.61537 0.178886 7.50057 0.0640869 7.35896 0.0640869Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M11.718 0C10.1602 0 8.89746 1.26279 8.89746 2.82051V7.17949C8.89746 8.73721 10.1602 10 11.718 10H13.6411C15.1988 10 16.4616 8.73721 16.4616 7.17949V2.82051C16.4616 1.26279 15.1988 0 13.6411 0H11.718ZM11.718 2.05128C11.2931 2.05128 10.9487 2.39568 10.9487 2.82051V7.17949C10.9487 7.60432 11.2931 7.94872 11.718 7.94872H13.6411C14.0659 7.94872 14.4103 7.60432 14.4103 7.17949V5V2.82051C14.4103 2.39568 14.0659 2.05128 13.6411 2.05128H11.718Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M17.7437 0.436316V9.71132C17.7437 9.85293 17.8585 9.96773 18.0001 9.96773H19.5385C19.6801 9.96773 19.7949 9.85293 19.7949 9.71132V3.74801C19.7949 3.44829 19.969 3.17587 20.241 3.04996L22.1641 2.15964C22.6739 1.92363 23.2565 2.29592 23.2565 2.85769V9.71132C23.2565 9.85293 23.3713 9.96773 23.5129 9.96773H25.0513C25.193 9.96773 25.3078 9.85293 25.3078 9.71132V2.85595C25.3078 0.79631 23.1718 -0.568775 21.3027 0.296257L19.9742 0.911055C19.8685 0.959946 19.7432 0.931536 19.669 0.84187L19.2748 0.365697C19.1773 0.248019 19.0325 0.179905 18.8797 0.179905H18.0001C17.8585 0.179905 17.7437 0.294704 17.7437 0.436316Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M29.4104 0C27.8526 0 26.5898 1.26279 26.5898 2.82051V7.17949C26.5898 8.73721 27.8526 10 29.4104 10H31.3334C32.8912 10 34.1539 8.73721 34.1539 7.17949V2.82051C34.1539 1.26279 32.8912 0 31.3334 0H29.4104ZM29.4104 2.05128C28.9855 2.05128 28.6411 2.39568 28.6411 2.82051V7.17949C28.6411 7.60432 28.9855 7.94872 29.4104 7.94872H31.3334C31.7583 7.94872 32.1027 7.60432 32.1027 7.17949V2.82051C32.1027 2.39568 31.7583 2.05128 31.3334 2.05128H29.4104Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M38.2085 0.0640869H40.3889C41.8309 0.0640869 42.9999 1.23306 42.9999 2.67506C42.9999 2.79477 42.9108 2.89574 42.792 2.91059L41.1732 3.11293C41.054 3.12784 40.9486 3.03485 40.9486 2.91466C40.9486 2.47322 40.5908 2.11537 40.1493 2.11537H38.3397C37.8688 2.11537 37.4871 2.49712 37.4871 2.96803C37.4871 3.3685 37.7658 3.71501 38.1569 3.80087L40.7916 4.37922C42.0811 4.66229 42.9999 5.80462 42.9999 7.12486C42.9999 8.67735 41.7414 9.93588 40.1889 9.93588H38.0468C36.6048 9.93588 35.4358 8.76691 35.4358 7.32491C35.4358 7.2052 35.5249 7.10423 35.6437 7.08938L37.2625 6.88703C37.3817 6.87213 37.4871 6.96512 37.4871 7.08531C37.4871 7.52675 37.8449 7.8846 38.2864 7.8846H40.1176C40.5765 7.8846 40.9486 7.51252 40.9486 7.05354C40.9486 6.67478 40.6925 6.34394 40.3258 6.24901L37.5136 5.52093C36.2902 5.20422 35.4358 4.10042 35.4358 2.83676C35.4358 1.30545 36.6772 0.0640869 38.2085 0.0640869Z" fill="var(--zonos-elements-gray-700)"/>\n</svg>\n';var K=":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{position:absolute;bottom:0;left:32px;right:32px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--collect-footer{gap:16px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px;padding-left:0;-ms-flex-align:center;align-items:center;width:100%}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper .zonos--collect-footer-logo{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper .zonos--collect-footer-logo a{line-height:0}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper a{text-decoration:none}:host .zonos--collect-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--collect-footer .zonos--collect-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;position:relative}@media (max-width: 400px){:host .zonos--collect-footer .zonos--collect-locale-wrapper{gap:4px}}:host .zonos--collect-footer .zonos--collect-language-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);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);width:360px;max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;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}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar{width:10px}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--collect-footer .zonos--collect-language-dialog.zonos--collect-language-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .dot{display:-ms-inline-flexbox;display:inline-flex;background:var(--zonos-elements-gray-400);width:6px;height:6px;border-radius:50%}:host(.mobile),:host(.tablet){background-color:var(--zonos-elements-gray-0);width:100%;position:-webkit-sticky;position:sticky;bottom:0}:host(.tablet) .zonos--collect-footer{width:100%;max-width:800px;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex}:host(.mobile) .zonos--collect-locale-wrapper{display:none}:host(.mobile) .zonos--collect-footer{-ms-flex-pack:center;justify-content:center}";var J=K;var X=o("zonos_collect_footer",function(){function o(o){e(this,o);this.mobile=false;this.tablet=false;this.showLanguageDialog=false;this.isMobile=false;this.isTablet=false}o.prototype.handleGlobalClick=function(o){if(!this.el.contains(o.target)&&this.showLanguageDialog){this.showLanguageDialog=false}};o.prototype.toggleLanguageDialog=function(){this.showLanguageDialog=!this.showLanguageDialog};o.prototype.handleMobileChange=function(){this.isMobile=B(this.mobile)};o.prototype.handleTabletChange=function(){this.isTablet=D(this.tablet)};o.prototype.componentWillLoad=function(){this.isMobile=B(this.mobile);this.isTablet=D(this.tablet)};o.prototype.render=function(){var o=this;var e;var t=(e=O.find((function(o){return o.code===x.selectedLocale})))===null||e===void 0?void 0:e.label;var s="gray-1000";return n(a,{key:"ca7bd600af1d83937719aa6d83324d61f60b4c79",class:V(["zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},n("div",{key:"a69e9229e009f9c754e2ad9cf068654d683036fa",class:"zonos--collect-footer"},n("div",{key:"72e62b7191dd32f0ead5970cb62edcd469ef40ce",class:"zonos--collect-locale-wrapper"},n("zonos-button",{key:"2f76f5c3009175bb1dd4cd90d91628e79a97770e",buttonColor:s,class:"zonos--collect-footer-language-button",icon:n("zonos-icon",{"aria-label":"Language select",content:Q,iconColor:s}),onClick:function(){return o.toggleLanguageDialog()},variant:"subtle"},t),n("div",{key:"53f2b59da147de3637487cdc4b1cd6d440838b81",class:V(["zonos--collect-language-dialog",this.showLanguageDialog&&"zonos--collect-language-dialog-open"])},n("zonos-language-select",{key:"bd0a83b6f180e5d4d0a368240599eb7934b8d06f",handleOnClose:function(){return o.toggleLanguageDialog()}}))),n("div",{key:"52620a619a47e52129207880adbfd8e6a88372c6",class:"zonos--collect-footer-icon-wrapper"},n("div",{key:"38c863a4b26b3e6768ed8acb57a32e398ba064ea",class:"zonos--collect-footer-logo"},n("zonos-text",{key:"27402251e8d46578e3d9f1eb7a54afb5c553ea33",textColor:s},"Powered by"),n("a",{key:"350ed904d6d3787a38229a4178c0ee82a2c87cac",href:"https://zonos.com",target:"_blank",title:"Zonos website"},n("zonos-icon",{key:"3c65492b88a601459d0487e4c615208c8dcaa810",autoHeight:true,content:G,size:42}))),n("div",{key:"dc8f6479806466c45ac1c1ed8e32587190f14175",class:"dot"}),n("a",{key:"bc4a48af6ea629273cdf9bd1cdca4981306a8eb9",href:"https://zonos.com/docs/legal/zonos-privacy-policy",target:"_blank"},n("zonos-text",{key:"2e923eef08f6b6a9dd53190a1aa221666cab4210",textColor:s},"Privacy policy")))))};Object.defineProperty(o.prototype,"el",{get:function(){return l(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{mobile:["handleMobileChange"],tablet:["handleTabletChange"]}},enumerable:false,configurable:true});return o}());X.style=J;var $='<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>';var oo='<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="M17.707 14.707a1 1 0 0 1-1.414 0L12 10.414l-4.293 4.293a1 1 0 0 1-1.414-1.414l4.93-4.93a1.1 1.1 0 0 1 1.555 0l4.93 4.93a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var eo=":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{height:100%}:host *{-ms-scroll-chaining:none;overscroll-behavior:contain}:host *::-webkit-scrollbar{width:10px}:host *::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host *::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host *::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--wrapper{overflow:auto;background-color:var(--zonos-elements-gray-50);border-radius:16px;height:100%;min-height:56px}:host .zonos--order-details-header{position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--zonos-elements-gray-50);border:none;display:-ms-flexbox;display:flex;padding:16px 16px 0 16px;width:100%;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}:host .zonos--order-details-header:focus-visible{outline:none}:host .zonos--order-details-wrapper{position:relative;padding:0 16px 16px 16px}:host .zonos--collect-order-details-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:28px}:host .zonos--collect-order-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}:host .zonos--collect-order-info .zonos--collect-order-details-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px}:host .zonos--collect-order-info .zonos--collect-order-details-row>*{-ms-flex:1 1 150px;flex:1 1 150px}:host .zonos--collect-order-info .zonos--collect-order-details-column{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--collect-order-info .zonos--collect-order-shipping-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:0}";var to=eo;var no=o("zonos_collect_order_details",function(){function o(o){e(this,o);this.collapseClicked=t(this,"collapseClicked",7);this.mobile=true;this.landedCostId="";this.isMobile=false;this.collapseState=this.collapsed}o.prototype.handleCollapseChangeFromProp=function(o){this.collapseState=o};o.prototype.handleCollapseChange=function(o){this.collapseClicked.emit(o)};o.prototype.handleWindowResize=function(){this.isMobile=S(this.mobile)};o.prototype.componentWillLoad=function(){this.handleWindowResize()};o.prototype.renderShippingAddress=function(){if(F.isFetchingShippingInfo){return n("div",{class:"zonos--collect-order-details-column"},n("zonos-text",{type:"smallHeader"},n("zonos-skeleton",{skeletonWidth:"99px"})),n("div",{class:"zonos--collect-order-shipping-info"},n("zonos-skeleton",{skeletonWidth:"152px"}),n("zonos-h-stack",{spacing:8},n("zonos-skeleton",{skeletonWidth:"75px"}),n("zonos-skeleton",{skeletonWidth:"75px"})),n("zonos-skeleton",{skeletonWidth:"50px"})))}var o=F.shippingAddress;if(!o){return null}return n("div",{class:"zonos--collect-order-details-column"},n("zonos-text",{type:"smallHeader"},g("Shipping address")),n("div",{class:"zonos--collect-order-shipping-info"},[[o.location.line1,o.location.line2].filter(Boolean).join(" "),[o.location.locality,o.location.administrativeAreaCode,o.location.postalCode].filter(Boolean).join(", "),o.location.countryCode].map((function(o){return n("zonos-text",null,o)}))))};o.prototype.render=function(){var o=this;var e=function(){if(o.collapseState){return n("zonos-icon",{"aria-label":"Collapse expanded section",content:$,iconColor:"gray-1200"})}return n("zonos-icon",{"aria-label":"Expand collapsed section",content:oo,iconColor:"gray-1200"})};return n(a,{class:V(["zonos--collect-order-details zonos--elements",this.isMobile&&"mobile"])},n("div",{class:"zonos--wrapper"},n("button",{class:"zonos--order-details-header",onClick:function(){o.collapseState=!o.collapseState},type:"button"},n("zonos-text",{type:"semiBoldLabel"},g("Order details")),e()),n("div",{class:"zonos--order-details-wrapper"},n("zonos-collapse",{collapsed:this.collapseState},n("div",{class:"zonos--collect-order-details-content"},n("zonos-collect-cart-items",null),n("div",{class:"zonos--collect-order-info"},n("div",{class:"zonos--collect-order-details-row"},F.amountTotalPaid!==null&&n("div",{class:"zonos--collect-order-details-column"},n("zonos-text",{type:"smallHeader"},g("Total paid")),n("zonos-text",null,U({amount:F.amountTotalPaid||0,isForeign:true}))),F.originCompanyName&&n("div",{class:"zonos--collect-order-details-column"},n("zonos-text",{type:"smallHeader"},g("Ordered from")),n("zonos-text",null,F.originCompanyName||""))),this.renderShippingAddress()))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{collapsed:["handleCollapseChangeFromProp"],collapseState:["handleCollapseChange"]}},enumerable:false,configurable:true});return o}());no.style=to;var so='<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>';var ao='<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>';var lo=".sc-zonos-collect-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-collect-payment-h *.sc-zonos-collect-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-collect-payment-h img.sc-zonos-collect-payment{max-width:100%}.sc-zonos-collect-payment-h dl.sc-zonos-collect-payment,.sc-zonos-collect-payment-h dd.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h1.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h2.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h3.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h4.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h5.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h6.sc-zonos-collect-payment,.sc-zonos-collect-payment-h hr.sc-zonos-collect-payment,.sc-zonos-collect-payment-h figure.sc-zonos-collect-payment,.sc-zonos-collect-payment-h p.sc-zonos-collect-payment,.sc-zonos-collect-payment-h pre.sc-zonos-collect-payment{margin:0}.sc-zonos-collect-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-collect-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-collect-payment-h .zonos--title.sc-zonos-collect-payment{margin-bottom:24px}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar{width:10px}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-collect-payment-h .zonos--payment-error-banner.sc-zonos-collect-payment{margin-bottom:8px}.sc-zonos-collect-payment-h .zonos--error-banner.sc-zonos-collect-payment{margin-bottom:16px}.sc-zonos-collect-payment-h zonos-button.sc-zonos-collect-payment{-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-collect-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-collect-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:12px;bottom:-4px;padding-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment zonos-text.sc-zonos-collect-payment{text-align:center}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment zonos-button.sc-zonos-collect-payment{width:100%}.sc-zonos-collect-payment-h .zonos--test-cards.sc-zonos-collect-payment{margin-top:auto;padding-top:16px}";var io=lo;var ro=o("zonos_collect_payment",function(){function o(o){var n=this;e(this,o);this.continueClicked=t(this,"continueClicked",7);this.paypalSessionFailed=t(this,"paypalSessionFailed",7);this.paypalSessionDone=t(this,"paypalSessionDone",7);this.storeUnsubscribeList=[];this.continueLoading=false;this.showErrorBanner=false;this.hasStripePaymentError=false;this.stagingOrderCreateErrorMessage="";this.internalContinueLoading=this.continueLoading;this.handleValidate=function(){var o;return!!((o=i.stripePaymentEventData)===null||o===void 0?void 0:o.complete)};this.continueClickHandler=function(o){return __awaiter(n,[o],void 0,(function(o){var e,t;var n=this;var s=o.currencyCode;return __generator(this,(function(o){if(!this.handleValidate()){void((e=i.stripeBillingAddressElement)===null||e===void 0?void 0:e.getValue());this.showErrorBanner=true;void((t=i.stripeElements)===null||t===void 0?void 0:t.submit());setTimeout((function(){var o;(o=n.ele.querySelector("zonos-banner"))===null||o===void 0?void 0:o.scrollIntoView({behavior:"smooth"})}),10);return[2]}i.checkoutSettlementCurrency=s;P({event:"zonos-checkout-payment-info"});this.continueClicked.emit();return[2]}))}))};this.copyCardToClipboard=function(o){return __awaiter(n,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,navigator.clipboard.writeText(o)];case 1:n.sent();return[3,3];case 2:e=n.sent();t=document.createElement("textarea");t.style.position="fixed";t.style.left="-1000px";t.style.top="-1000px";t.style.width="1px";t.style.height="1px";t.value=o;t.id="zonos-copy-card-number";document.body.appendChild(t);t.select();document.execCommand("copy");document.body.removeChild(t);return[3,3];case 3:window.Zonos.showNotification({message:g("Card number copied to clipboard"),timeout:4e3,type:"success"});return[2]}}))}))};this.placeTestOrder=function(){return __awaiter(n,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:this.internalContinueLoading=true;return[4,T()];case 1:o=e.sent().errors;if(o.length){this.stagingOrderCreateErrorMessage=o[0]||"Failed to create staging order. Please try again.";this.internalContinueLoading=false;return[2]}this.internalContinueLoading=false;p();return[2]}}))}))}}o.prototype.continueLoadingWatcher=function(){this.internalContinueLoading=this.continueLoading};o.prototype.stripePaymentErrorWatcher=function(){var o=this;if(this.hasStripePaymentError){setTimeout((function(){var e;(e=o.ele.querySelector("zonos-banner"))===null||e===void 0?void 0:e.scrollIntoView({behavior:"smooth"})}),50)}};o.prototype.componentWillLoad=function(){this.storeUnsubscribeList=[m("currency",(function(){void y({currency:f.currency})}))];void y({currency:f.currency})};o.prototype.disconnectedCallback=function(){this.storeUnsubscribeList.forEach((function(o){return o()}))};o.prototype.render=function(){var o=this;var e;this.hasStripePaymentError=i.hasPaymentError;if(!i.stripeElements){return null}if(!i.clientSecret){return null}if(this.showErrorBanner){this.showErrorBanner=!this.handleValidate()}var t=L();var l=f.isStagingMode||j();var r=((e=i.stripePaymentEventData)===null||e===void 0?void 0:e.value.type)==="external_paypal";var c=function(){if(l){var e=k.appearance.theme;return n(s,null,o.stagingOrderCreateErrorMessage&&n("zonos-banner",{class:"zonos--error-banner",intent:"error"},o.stagingOrderCreateErrorMessage),n("zonos-empty-state-payment",{emptyStateText:g("No payment method needed for staging"),theme:e}),n("div",{class:"zonos--group-btn"},n("zonos-button",{backgroundColor:o.submitBtnColor,loading:o.internalContinueLoading,onClick:function(){void o.placeTestOrder()},size:"lg",variant:o.submitBtnType},g("Place test order"))))}if(i.isFetchingSession||F.isFetchingShippingInfo){return null}return n(s,null,o.showErrorBanner&&n("zonos-banner",{class:"zonos--error-banner",intent:"error"},g("Missing required fields. Make sure all fields are completed.")),o.hasStripePaymentError&&n("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},i.customErrorMessage||g("We couldn't complete your payment. Please verify the payment details and try again.")),z.paypalErrorMessage&&n("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},z.paypalErrorMessage),n("zonos-payment",null),n("div",{class:"zonos--group-btn"},!r&&n(s,null,n("zonos-button",{backgroundColor:o.submitBtnColor,bold:true,isDisabled:o.continueLoading&&i.checkoutSettlementCurrency==="USD",loading:o.continueLoading&&i.checkoutSettlementCurrency!=="USD",onClick:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!f.checkoutSession){M("Checkout session is not found");return[2]}return[4,this.continueClickHandler({currencyCode:f.checkoutSession.subtotals.presentmentCurrencyCode})];case 1:o.sent();return[2]}}))}))},size:"lg",variant:o.submitBtnType},g("Pay [orderTotal]",{orderTotal:U({amount:F.amountDutyTaxFeeTotal||0,isForeign:true})})),i.shouldRenderPayInUsdButton&&n("zonos-button",{class:"zonos--pay-in-base-currency-btn",isDisabled:o.continueLoading&&i.checkoutSettlementCurrency!=="USD",loading:o.continueLoading&&i.checkoutSettlementCurrency==="USD",onClick:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.continueClickHandler({currencyCode:"USD"})];case 1:o.sent();return[2]}}))}))},size:"lg",variant:"subtle"},g("Click to pay in USD"))),n("zonos-paypal-payment",{onPaypalSessionDone:function(e){var t=e.detail.orderId;o.paypalSessionDone.emit(t)},onPaypalSessionFail:function(){return o.paypalSessionFailed.emit()},style:{display:r?"block":"none"}})),t&&n("zonos-card",{backgroundColor:"gray-100",borderRadius:12,class:"zonos--test-cards"},n("zonos-v-stack",{spacing:16},n("div",null,n("zonos-text",{type:"semiBoldLabel"},g("Test cards")),n("zonos-text",{textColor:"gray-700"},g("Click to copy the card number. Use any future expiration date and three number CVC."))),n("zonos-button",{icon:n("zonos-icon",{content:so}),justifyContent:"flex-start",onClick:function(){return o.copyCardToClipboard("4242424242424242")}},g("Success")," (****4242)"),n("zonos-button",{icon:n("zonos-icon",{content:ao}),justifyContent:"flex-start",onClick:function(){return o.copyCardToClipboard("4000000000000002")}},g("Failure")," (****0002)")),n("zonos-notification",null)))};return n(a,{class:"zonos--checkout-payment zonos--elements"},n("div",{class:"zonos--group"},n("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},g("Payment method")),c()))};Object.defineProperty(o.prototype,"ele",{get:function(){return l(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{continueLoading:["continueLoadingWatcher"],hasStripePaymentError:["stripePaymentErrorWatcher"]}},enumerable:false,configurable:true});return o}());ro.style=io;var co=':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{position:-webkit-sticky;position:sticky;top:0;background-color:var(--zonos-elements-gray-0);z-index:1}:host .zonos--total-pay{margin:8px 0 24px;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;gap:48px}:host .zonos--total-pay zonos-text{-ms-flex-negative:0;flex-shrink:0}:host .zonos--total-pay::after{content:"";position:relative;height:1px;width:100%;background:var(--zonos-elements-gray-200)}:host(.mobile),:host(.tablet){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px;padding:4px 0;background-color:transparent;position:relative}:host(.mobile) .zonos--total-pay,:host(.tablet) .zonos--total-pay{margin:0}';var uo=co;var ho=o("zonos_collect_review",function(){function o(o){e(this,o);this.mobile=false;this.tablet=false;this.collapsed=false;this.isMobile=false;this.isTablet=false;this.isLoading=true}o.prototype.handleWindowResize=function(){this.isMobile=B(this.mobile);this.isTablet=D(this.tablet)};o.prototype.componentWillLoad=function(){var o=this;this.handleWindowResize();setTimeout((function(){o.isLoading=false}),1e3)};o.prototype.render=function(){var o=this.isMobile?"gray-1000":"gray-800";return n(a,{key:"c8445ba13733af60fb88372eb2ae07fdc435364c",class:V(["zonos--collect-review zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},n("div",{key:"5589e61c35cbcdd885dc33cdb07999e55f5c4715",class:"zonos--title"},n("zonos-text",{key:"783d38dcf9aabd64d94ab3356935aa5d6ffcdec0",textColor:o,type:"semiBoldLabel"},g("Pay [organizationName]",{organizationName:k.organizationName}))),n("div",{key:"4ce3c3391b6e2a47518cce212019137970dd99f7",class:"zonos--total-pay"},W({content:n("zonos-text",{type:"secondaryPageHeader"},U({amount:F.amountDutyTaxFeeTotal||0,isForeign:true})),isLoading:F.isFetchingShippingInfo,skeletonHeight:"36px",skeletonWidth:"150px"})))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());ho.style=uo;var fo=":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{position:-webkit-sticky;position:sticky;bottom:60px}:host .zonos--collect-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--collect-table .zonos--column{padding:8px 8px;vertical-align:top}:host .zonos--collect-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--collect-table .zonos--column:first-child{width:60px;max-width:100px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--collect-subtotal-price{text-align:right}:host .zonos--collect-subtotal-price zonos-text{white-space:nowrap}:host .zonos--collect-total .zonos--column{padding:16px 0}:host .zonos--collect-total-subtotal .zonos--collect-subtotal-title,:host .zonos--collect-total-subtotal .zonos--collect-subtotal-price{border-bottom:1px solid var(--zonos-elements-gray-200)}:host .zonos--collect-subtotal-price zonos-text,:host .zonos--collect-pay-total zonos-text{white-space:nowrap}";var po=fo;var mo=o("zonos_collect_subtotal",function(){function o(o){var t=this;e(this,o);this.storeUnsubscribeList=[];this.subtotals={};this.initSubtotalData=function(){var o;var e;var n=(e=f.checkoutSession)===null||e===void 0?void 0:e.subtotals;if(!n){return}var s=g("Duties");var a=g("Taxes");var l=g("Fees");var i=(o={},o[s]=0,o[l]=0,o[a]=0,o);var r=n.duties;var c=n.taxes;var d=n.fees;if(r!==undefined){i[s]||(i[s]=0);i[s]+=r}if(c!==undefined){i[a]||(i[a]=0);i[a]+=c}if(d!==undefined){i[l]||(i[l]=0);i[l]+=d}t.subtotals=i}}o.prototype.disconnectedCallback=function(){this.storeUnsubscribeList.forEach((function(o){return o()}))};o.prototype.componentWillLoad=function(){this.storeUnsubscribeList=[m("checkoutSession",this.initSubtotalData),w("translatedChunks",this.initSubtotalData)]};o.prototype.render=function(){this.initSubtotalData();return n(a,{key:"ebd46815f83307682f5cbb8430bb64e66b9eadd1",class:"zonos--collect-subtotal zonos--elements"},n("table",{key:"7a878d4bb5dce069060888f4d7e1fde0ef0e23cd",class:"zonos--collect-table"},!!this.subtotals[g("Duties")]&&n("tr",{key:"496a81ab73739fe285636aad504232b1faa2f8e1",class:"zonos--row zonos--collect-duty"},n("td",{key:"85334ee7319578f110a75f512f9d2e28f3eca79a",class:"zonos--column zonos--collect-subtotal-title"},n("zonos-text",{key:"f877f57ad0d6853f7c49237e4da649b1bfc5206b",type:"semiBoldLabel"},g("Duties"))),n("td",{key:"97588563d5bd85fd1692e1882fcace85b3036b8c",class:"zonos--column"}),n("td",{key:"2acb01b0b6d38861eb23b5910c20a57a52172a33",class:"zonos--column zonos--collect-subtotal-price"},W({content:n("zonos-text",{type:"label"},U({amount:this.subtotals[g("Duties")]||0,isForeign:true})),isLoading:F.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),!!this.subtotals[g("Taxes")]&&n("tr",{key:"36b004cc298b1d9c757b3090ce4610c6ea36b209",class:"zonos--row zonos--collect-tax"},n("td",{key:"ceb1e460218ba71eb9c8db33a9cfe0e4affa00eb",class:"zonos--column zonos--collect-subtotal-title"},n("zonos-text",{key:"147687aafbe073169862789a9ac0ac6da544e1ce",type:"semiBoldLabel"},g("Taxes"))),n("td",{key:"642c5ff03b7dea8e4f2bd378e3ca482d81169f46",class:"zonos--column"}),n("td",{key:"31776ea8d128ad9ce6c9e523ca8fa297baf4763d",class:"zonos--column zonos--collect-subtotal-price"},W({content:n("zonos-text",{type:"label"},U({amount:this.subtotals[g("Taxes")]||0,isForeign:true})),isLoading:F.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),!!this.subtotals[g("Fees")]&&n("tr",{key:"ee18eaf3af00321a0741b07565d8474bc692b2fa",class:"zonos--row zonos--collect-fee"},n("td",{key:"0abdde651b432368fcd374ecb1c9119981dc2531",class:"zonos--column zonos--collect-subtotal-title"},n("zonos-text",{key:"385973cd0c11a161cba2a8737f6dfba4c4749d77",type:"semiBoldLabel"},g("Fees"))),n("td",{key:"4ae0c1da68e5ac48ce0be09ec1826867905f9e74",class:"zonos--column"}),n("td",{key:"80f232ffdb0a66f88753c2a07290ed6273b66747",class:"zonos--column zonos--collect-subtotal-price"},W({content:n("zonos-text",{type:"label"},U({amount:this.subtotals[g("Fees")]||0,isForeign:true})),isLoading:F.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),n("tr",{key:"71677498d7c575e4227f45620b62f5ddadf06858",class:"zonos--row zonos--collect-spacing"},n("td",{key:"5fc92ef7b46c8e5eb8ebb391015682f376785a26",class:"zonos--column",colSpan:3})),n("tr",{key:"253c6735bd30ef66c2fa1f82a44cebff3dacc189",class:"zonos--row zonos--collect-total zonos--collect-total-subtotal"},n("td",{key:"0755b1c175973640e925520e747141e96446eea8",class:"zonos--column"}),n("td",{key:"19646da57bd222dbb2ada0c450eabf508833c069",class:"zonos--column zonos--collect-subtotal-title"},n("zonos-text",{key:"57b3ff6e47ab14ab955abda316deb635fe70d3e9",type:"label"},g("Subtotal"))),n("td",{key:"c3ce8d85aa7a4d554ee271b0bc9ed248d97315b0",class:"zonos--column zonos--collect-subtotal-price"},W({content:n("zonos-text",{type:"label"},U({amount:F.amountDutyTaxFeeTotal||0,isForeign:true})),isLoading:F.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),n("tr",{key:"e21e986f76bb932645c54e75698db4c06024335e",class:"zonos--row zonos--collect-total"},n("td",{key:"b4cc8e32cd69c0b1ed000c582c058a1215c4e365",class:"zonos--column"}),n("td",{key:"1b55f78e8161cd9da263d3b58c053b9b04cca999",class:"zonos--column zonos--collect-subtotal-title"},n("zonos-text",{key:"97de8710348f0a039375d02b075c1e91ef6ae621",type:"semiBoldLabel"},g("Customs fees total"))),n("td",{key:"58bf548786e07bb780c73433ae7a8582f2c2b059",class:"zonos--column zonos--collect-subtotal-price"},W({content:n("zonos-text",{type:"semiBoldLabel"},U({amount:F.amountDutyTaxFeeTotal||0,isForeign:true})),isLoading:F.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());mo.style=po}}}));
@@ -1 +1 @@
1
- System.register(["./p-7261e245.system.js","./p-1523f6a8.system.js","./p-15ef7644.system.js","./p-23e7c655.system.js","./p-01174496.system.js","./p-d938f42f.system.js"],(function(t){"use strict";var s,o,n,e,i,a,h;return{setters:[function(t){s=t.r;o=t.h;n=t.a;e=t.g},function(t){i=t.l},function(t){a=t.f},function(t){h=t.c},function(){},function(){}],execute:function(){var r=":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}";var f=r;var l="https://zonos-store-assets.s3.amazonaws.com/images/elements-flags";var c=t("zonos_country_flag",function(){function t(t){s(this,t);this.countryCode=i.selectedCountryCode}t.prototype.render=function(){if(!this.el.shadowRoot||!this.countryCode){return null}var t="".concat(l,"/").concat(this.countryCode,".svg");var s=a();return o(n,{class:"zonos--elements",style:this.size?{"--zonos--font-family":s,height:"".concat(this.size,"px"),width:"".concat(this.size,"px")}:{"--zonos--font-family":s}},o("div",{class:h(["flag-container"])},o("div",{class:"flag-icon",style:{backgroundImage:"url(".concat(t,")")}})))};Object.defineProperty(t.prototype,"el",{get:function(){return e(this)},enumerable:false,configurable:true});return t}());c.style=f}}}));
1
+ System.register(["./p-7261e245.system.js","./p-248bdea2.system.js","./p-15ef7644.system.js","./p-23e7c655.system.js","./p-01174496.system.js","./p-d938f42f.system.js"],(function(t){"use strict";var s,o,n,e,i,a,h;return{setters:[function(t){s=t.r;o=t.h;n=t.a;e=t.g},function(t){i=t.l},function(t){a=t.f},function(t){h=t.c},function(){},function(){}],execute:function(){var r=":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}";var f=r;var l="https://zonos-store-assets.s3.amazonaws.com/images/elements-flags";var c=t("zonos_country_flag",function(){function t(t){s(this,t);this.countryCode=i.selectedCountryCode}t.prototype.render=function(){if(!this.el.shadowRoot||!this.countryCode){return null}var t="".concat(l,"/").concat(this.countryCode,".svg");var s=a();return o(n,{class:"zonos--elements",style:this.size?{"--zonos--font-family":s,height:"".concat(this.size,"px"),width:"".concat(this.size,"px")}:{"--zonos--font-family":s}},o("div",{class:h(["flag-container"])},o("div",{class:"flag-icon",style:{backgroundImage:"url(".concat(t,")")}})))};Object.defineProperty(t.prototype,"el",{get:function(){return e(this)},enumerable:false,configurable:true});return t}());c.style=f}}}));
@@ -1 +1 @@
1
- import{r as o,h as t,a as s}from"./p-ce75b047.js";import{d as e}from"./p-bd938f80.js";import{t as n}from"./p-a18adf27.js";import{r as i}from"./p-868a8667.js";import{c as a}from"./p-b4b7f705.js";import{c as l}from"./p-24f41959.js";import{r as c}from"./p-1b8771bb.js";import"./p-ed9385f4.js";import"./p-0a377722.js";import"./p-41dd1cb8.js";import"./p-f6922df5.js";import"./p-5beab541.js";const r=class{constructor(t){o(this,t),this.isMobile=!1,this.errorImages=[],this.locale=null}componentWillLoad(){const o=navigator.language;this.locale=o}render(){const o=e.items.filter((o=>!o.isRestricted));return t(s,{key:"33a10486833e881dd8405984cfc59611b064bef5",class:a(["zonos--invoice-cart-items zonos--elements",this.isMobile&&"mobile"])},t("table",{key:"c6c3a6017050cc385bc5944e83ca8db1f2564884",class:"zonos--cart-table"},t("tbody",{key:"6a232dbdf2e6e6c58b65d6360c9190d720c7dc1f"},o.map((o=>{var s,e,a,l;const c=null===(e=null===(s=o.attributes)||void 0===s?void 0:s.find((o=>"invoiceId"===o.key||"INVOICE_ID"===o.key)))||void 0===e?void 0:e.value,r=null===(l=null===(a=o.attributes)||void 0===a?void 0:a.find((o=>"invoiceCreatedAt"===o.key)))||void 0===l?void 0:l.value,h=r&&this.locale?new Date(r).toLocaleDateString(this.locale,{day:"numeric",month:"long",year:"numeric"}):null,d=c?`https://dashboard.zonos.com/billing/invoices/${c}`:null;return t("tr",{class:"zonos--invoice-cart-item"},t("td",{class:"zonos--column zonos--cart-item-title"},t("zonos-text",{type:"semiBoldLabel"},n("Invoice:"))),t("td",{class:"zonos--column zonos--cart-item-link"},d&&c&&t("zonos-link",{href:d},c),this.isMobile&&t("zonos-text",{type:"caption"},h)),t("td",{class:"zonos--column zonos--cart-item-created-at"},!this.isMobile&&t("zonos-text",{type:"label"},h)),t("td",{class:"zonos--column zonos--cart-item-price"},t("zonos-text",{type:"label"},i({amount:o.amount,isForeign:!1}))))})))))}static get assetsDirs(){return["assets"]}};r.style=":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 .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;padding-left:0;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--cart-table .zonos--column:first-child{padding-left:0;width:50px}:host .zonos--cart-table .zonos--cart-item-link{text-align:left}:host .zonos--cart-table .zonos--cart-item-created-at{text-align:right}:host .zonos--cart-table td{vertical-align:middle}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host(.mobile) table{margin-top:16px}:host(.mobile) table td{vertical-align:top}";const h=class{constructor(t){o(this,t),this.isMobile=!1}render(){return t(s,{key:"99eaf74026ee26cc11ab78adf57f1b7eb55309d3",class:a(["zonos--invoice-subtotal zonos--elements",this.isMobile&&"mobile"])},t("table",{key:"a3f9a029a979fd4afeaee02c55a49c4e6547e483",class:"zonos--invoice-table"},t("tr",{key:"bf8594623c4eb7492899647fbe3bc4fa0a8b1973",class:"zonos--row zonos--invoice-total"},t("td",{key:"b967b527461161244479ff8ac5ae40bdbd7f2b38",class:"zonos--column"}),t("td",{key:"4af6f40176c19c0aad1109a8be722a2b41fc66e9",class:"zonos--column zonos--invoice-subtotal-title"},t("zonos-text",{key:"0b01c51ddabd61c0abaf8214e05db2fe6a650941",type:"semiBoldLabel"},n("Payment total"))),t("td",{key:"00109c0948f0110c478643461a0a70a7cc2441ba",class:"zonos--column zonos--invoice-subtotal-price"},c({content:t("zonos-text",{type:"semiBoldLabel"},i({amount:l.amountTotalDue||0,isForeign:!0})),isLoading:l.isFetchingPayorInfo,skeletonHeight:"14px",skeletonWidth:"150px"})))))}static get assetsDirs(){return["assets"]}};h.style=":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{position:-webkit-sticky;position:sticky;bottom:60px}:host .zonos--invoice-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--invoice-table .zonos--column{padding:8px 8px;vertical-align:top}:host .zonos--invoice-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--invoice-table .zonos--column:first-child{width:60px;max-width:100px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--invoice-subtotal-price{text-align:right}:host .zonos--invoice-subtotal-price zonos-text{white-space:nowrap}:host .zonos--invoice-total .zonos--column{padding:16px 0}:host .zonos--invoice-total .zonos--invoice-subtotal-title,:host .zonos--invoice-total .zonos--invoice-subtotal-price{border-top:1px solid var(--zonos-elements-gray-200)}:host .zonos--invoice-subtotal-price zonos-text,:host .zonos--invoice-pay-total zonos-text{white-space:nowrap}:host(.mobile){position:relative;bottom:0}";export{r as zonos_invoice_cart_items,h as zonos_invoice_subtotal}
1
+ import{r as o,h as t,a as s}from"./p-ce75b047.js";import{d as e}from"./p-a8bb461c.js";import{t as n}from"./p-a75b8ad7.js";import{r as i}from"./p-721fadd5.js";import{c as a}from"./p-b4b7f705.js";import{c as l}from"./p-72adb40d.js";import{r as c}from"./p-1b8771bb.js";import"./p-ed9385f4.js";import"./p-0a377722.js";import"./p-41dd1cb8.js";import"./p-f6922df5.js";import"./p-5beab541.js";const r=class{constructor(t){o(this,t),this.isMobile=!1,this.errorImages=[],this.locale=null}componentWillLoad(){const o=navigator.language;this.locale=o}render(){const o=e.items.filter((o=>!o.isRestricted));return t(s,{key:"421e05194d1b310d585764ebcbad662e55fa5f76",class:a(["zonos--invoice-cart-items zonos--elements",this.isMobile&&"mobile"])},t("table",{key:"bf2c3ddcf823d4aebf3f0c8a96b74c2d1c6978af",class:"zonos--cart-table"},t("tbody",{key:"dbe7aab9d195e7ca9a50f4c29c7acffc69dd9cce"},o.map((o=>{var s,e,a,l;const c=null===(e=null===(s=o.attributes)||void 0===s?void 0:s.find((o=>"invoiceId"===o.key||"INVOICE_ID"===o.key)))||void 0===e?void 0:e.value,r=null===(l=null===(a=o.attributes)||void 0===a?void 0:a.find((o=>"invoiceCreatedAt"===o.key)))||void 0===l?void 0:l.value,h=r&&this.locale?new Date(r).toLocaleDateString(this.locale,{day:"numeric",month:"long",year:"numeric"}):null,d=c?`https://dashboard.zonos.com/billing/invoices/${c}`:null;return t("tr",{class:"zonos--invoice-cart-item"},t("td",{class:"zonos--column zonos--cart-item-title"},t("zonos-text",{type:"semiBoldLabel"},n("Invoice:"))),t("td",{class:"zonos--column zonos--cart-item-link"},d&&c&&t("zonos-link",{href:d},c),this.isMobile&&t("zonos-text",{type:"caption"},h)),t("td",{class:"zonos--column zonos--cart-item-created-at"},!this.isMobile&&t("zonos-text",{type:"label"},h)),t("td",{class:"zonos--column zonos--cart-item-price"},t("zonos-text",{type:"label"},i({amount:o.amount,isForeign:!1}))))})))))}static get assetsDirs(){return["assets"]}};r.style=":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 .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;padding-left:0;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--cart-table .zonos--column:first-child{padding-left:0;width:50px}:host .zonos--cart-table .zonos--cart-item-link{text-align:left}:host .zonos--cart-table .zonos--cart-item-created-at{text-align:right}:host .zonos--cart-table td{vertical-align:middle}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host(.mobile) table{margin-top:16px}:host(.mobile) table td{vertical-align:top}";const h=class{constructor(t){o(this,t),this.isMobile=!1}render(){return t(s,{key:"1c1ba16d9549f0ff1478984176d6b999d5aa1753",class:a(["zonos--invoice-subtotal zonos--elements",this.isMobile&&"mobile"])},t("table",{key:"d1b72fcae100c896cf7d6e6a289d8165d2c75233",class:"zonos--invoice-table"},t("tr",{key:"c9ff3b5ff7385c60717d213dfe1e5059f1bf09e0",class:"zonos--row zonos--invoice-total"},t("td",{key:"cf14352c2f3cffacdfb78343c7fbf512222c79d4",class:"zonos--column"}),t("td",{key:"403d772e36bc819fac28487b779e3a9ae4858f73",class:"zonos--column zonos--invoice-subtotal-title"},t("zonos-text",{key:"bf8ced53263ba7e8a6093712bb97fd7a2e35c634",type:"semiBoldLabel"},n("Payment total"))),t("td",{key:"e3832e0ccad66787e1023a073de9b8e9b732cb4e",class:"zonos--column zonos--invoice-subtotal-price"},c({content:t("zonos-text",{type:"semiBoldLabel"},i({amount:l.amountTotalDue||0,isForeign:!0})),isLoading:l.isFetchingPayorInfo,skeletonHeight:"14px",skeletonWidth:"150px"})))))}static get assetsDirs(){return["assets"]}};h.style=":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{position:-webkit-sticky;position:sticky;bottom:60px}:host .zonos--invoice-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--invoice-table .zonos--column{padding:8px 8px;vertical-align:top}:host .zonos--invoice-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--invoice-table .zonos--column:first-child{width:60px;max-width:100px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--invoice-subtotal-price{text-align:right}:host .zonos--invoice-subtotal-price zonos-text{white-space:nowrap}:host .zonos--invoice-total .zonos--column{padding:16px 0}:host .zonos--invoice-total .zonos--invoice-subtotal-title,:host .zonos--invoice-total .zonos--invoice-subtotal-price{border-top:1px solid var(--zonos-elements-gray-200)}:host .zonos--invoice-subtotal-price zonos-text,:host .zonos--invoice-pay-total zonos-text{white-space:nowrap}:host(.mobile){position:relative;bottom:0}";export{r as zonos_invoice_cart_items,h as zonos_invoice_subtotal}
@@ -1 +1 @@
1
- import{r as o,h as e,a as t,g as s}from"./p-ce75b047.js";import{d as i}from"./p-2f924331.js";import{l,i as n,t as r,g as h,j as a,k as d,m as c,n as m,d as p}from"./p-a18adf27.js";import{z as g,g as w,m as f}from"./p-ed9385f4.js";import{c as z}from"./p-b4b7f705.js";import{h as u,l as b}from"./p-41dd1cb8.js";import{g as v}from"./p-5883217a.js";import{l as x}from"./p-0a377722.js";const y=o=>{const e=null==o?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)},k=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:i,restrictionBehavior:l}=g.helloSettings;i&&s||x("Hello could not check item restrictions - must provide title and description selectors.");const r=i&&n(i)&&document.querySelectorAll(i)||[],h=s&&n(s)&&document.querySelectorAll(s)||[];if(r.length!==h.length)return x("Hello could not check item restrictions - Title and description selectors do not match"),[];const a="RESTRICT_AND_BLOCK"===l,d=a&&t&&n(t)&&document.querySelectorAll(t)||[];a&&d.length!==h.length&&x('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const c=[];for(let t=0;t<r.length;t++){const s=r[t],i=h[t];if(s&&i){const l={cartButtonNode:d[t]||null,description:(null===(o=i.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};c.push(l)}}return c},L=class{constructor(e){o(this,e),this.showPeekMessage=!1,this.zonosStoreHelloSettings=g.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[],this.isHelloWidgetRendered=!1,this.isMobile=!1,this.getHelloPeekMessage=o=>{if(("productDetail"===g.currentHelloPage||"productList"===g.currentHelloPage)&&this.allRestrictedItems.length){const o=r("click to learn more");return`${r("productDetail"===g.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(g.currentHelloPage){case"cart":return r("Prepay duties and taxes at checkout");case"productList":case"productDetail":return r("See duty and tax thresholds");default:return r("Welcome to [storeName]",{storeName:o})}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==g.currentHelloPage&&"productList"!==g.currentHelloPage||"DISABLED"===g.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=l;if(!e)return b("Hello could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const i={items:o,shipFrom:e,shipTo:t},{errors:l,json:n}=await u("/api/zonos-elements/check-item-restrictions",{body:i,method:"POST"});return l.length||!n?(b(`Error fetching item restrictions: ${null===(s=l.find(Boolean))||void 0===s?void 0:s.message}`),[]):n.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(g.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=g.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=k();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage()},this.handleProductCountChange=i((()=>{const{productTitleElementSelector:o}=g.helloSettings;if(o){const o=k();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{var o;const e=new MutationObserver(this.handleProductCountChange);e.observe(document.body,{childList:!0,subtree:!0}),null===(o=this.observerWatcher)||void 0===o||o.push(e)},this.watchPriceChange=()=>{var o;const e=new MutationObserver((()=>{this.displayCurrency()}));e.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),null===(o=this.observerWatcher)||void 0===o||o.push(e)},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&h(o.searchParams))!==l.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,g.currentHelloPage=(()=>{const{cartUrlPattern:o,homepageUrlPattern:e,productDetailUrlPattern:t,productListUrlPattern:s}=g.helloSettings;return y(o)?"cart":y(t)?"productDetail":y(s)?"productList":y(e)?"home":""})();const e=new URL(window.location.href);if(!h(e.searchParams))return void a(l.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return v(this.helloRef)},this.shouldRenderHello=(o=!0)=>{var e,t;if(!l.localizationLoaded)return!1;const{countryDisplayRules:s,showForCountries:i}=g.helloSettings,n=null==s?void 0:s.widgetVisibility,r=l.selectedCountryCode,h=Array.isArray(i)||null!=i?i:null==n?void 0:n.behavior;if(o&&!l.isShippableCountry&&x(`Hello: not shippable country - Show for countries: ${h}`),Array.isArray(h))return!!r&&h.includes(r);let a;return a="ALL"===h||l.isShippableCountry,!a&&r&&(null===(e=null==n?void 0:n.includedCountries)||void 0===e?void 0:e.includes(r))&&(a=!0),a&&r&&(null===(t=null==n?void 0:n.excludedCountries)||void 0===t?void 0:t.includes(r))&&(a=!1),a}}showDialogHandler(o){var e;if(o){const o=null===(e=this.helloElement)||void 0===e?void 0:e.parentElement;o&&o.parentElement===document.body&&(o.style.zIndex="2147483647",document.body.appendChild(o))}}async getCountryList(){return l.helloCountryList}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&g.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}disconnectedCallback(){var o;null===(o=this.observerWatcher)||void 0===o||o.forEach((o=>o.disconnect()))}async displayCurrency(){"DISABLED"!==g.helloSettings.currencyBehavior&&(l.exchangeRate?d():x("Could not display currency. Exchange rate and format data is not available.","warn"))}async convertAndFormat(o){return c(o)}async convert(o){return m(o)}async format(o){return p({amount:o})}async openHelloDialog(o){this.changeShowDialog(o)}handleResize(){this.isMobile=window.innerWidth<=768}handleHelloWidgetInitializedState({countryCode:o,currencyCode:e}){var t,s;this.isHelloWidgetRendered||l.selectedCountryCode&&"function"==typeof g.helloSettings.onInitSuccess&&(this.isHelloWidgetRendered=!0,null===(s=(t=g.helloSettings).onInitSuccess)||void 0===s||s.call(t,{countryCode:o,currencyCode:e}))}getHelloLocation(){const o=this.mobileLocationOverride||g.helloSettings.mobileLocation,e=g.helloSettings.desktopLocation,t=this.isMobile;if(!0===t)return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==o?void 0:o.includes("LEFT")),isOnTop:null==o?void 0:o.includes("TOP"),shouldFloat:!!o};{const o=!g.helloSettings.anchorElementSelector&&!!e;return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==e?void 0:e.includes("LEFT"))||this.shouldAnimateLeftDesktop(),isOnTop:null==e?void 0:e.includes("TOP"),shouldFloat:o}}}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=w(this.appearanceSettingsOverride.theme))}componentDidLoad(){this.isMobile=window.innerWidth<=768}render(){var o,s;if(null===(o=g.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>o&&new RegExp(o).test(window.location.href))))return x("Hello is excluded on this url","warn"),null;const{selectedCountryCode:i,targetCurrency:n}=l,{isOnLeft:r,isOnTop:h,shouldFloat:a}=this.getHelloLocation(),d=f(g.appearance,this.appearanceSettingsOverride||null),{theme:c}=d,m=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(g.organizationName);const p=this.shouldRenderHello()&&!!i;return p&&!this.isHelloWidgetRendered&&this.handleHelloWidgetInitializedState({countryCode:i,currencyCode:n}),e(t,{class:"zonos--hello zonos--elements","data-theme":c},p&&e("div",{class:z(["zonos--hello-wrapper",a&&"zonos--hello-widget-float"])},e("button",{class:z(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",r&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",a&&"zonos--hello-widget-float"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o),type:"button"},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),e("div",{class:z(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",r&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",a&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:d,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:m,setIsOpen:this.changeShowDialog}))))}get helloElement(){return s(this)}static get watchers(){return{showDialog:["showDialogHandler"],appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}}};L.style=":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 .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}@media screen and (min-width: 769px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px;width:auto;height:auto;z-index:1001}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:16px;border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";export{L as zonos_hello}
1
+ import{r as o,h as e,a as t,g as s}from"./p-ce75b047.js";import{d as i}from"./p-2f924331.js";import{l,i as n,t as r,g as h,j as a,k as d,m as c,n as m,d as p}from"./p-a75b8ad7.js";import{z as g,g as w,m as f}from"./p-ed9385f4.js";import{c as z}from"./p-b4b7f705.js";import{h as u,l as b}from"./p-41dd1cb8.js";import{g as v}from"./p-5883217a.js";import{l as x}from"./p-0a377722.js";const y=o=>{const e=null==o?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)},k=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:i,restrictionBehavior:l}=g.helloSettings;i&&s||x("Hello could not check item restrictions - must provide title and description selectors.");const r=i&&n(i)&&document.querySelectorAll(i)||[],h=s&&n(s)&&document.querySelectorAll(s)||[];if(r.length!==h.length)return x("Hello could not check item restrictions - Title and description selectors do not match"),[];const a="RESTRICT_AND_BLOCK"===l,d=a&&t&&n(t)&&document.querySelectorAll(t)||[];a&&d.length!==h.length&&x('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const c=[];for(let t=0;t<r.length;t++){const s=r[t],i=h[t];if(s&&i){const l={cartButtonNode:d[t]||null,description:(null===(o=i.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};c.push(l)}}return c},L=class{constructor(e){o(this,e),this.showPeekMessage=!1,this.zonosStoreHelloSettings=g.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[],this.isHelloWidgetRendered=!1,this.isMobile=!1,this.getHelloPeekMessage=o=>{if(("productDetail"===g.currentHelloPage||"productList"===g.currentHelloPage)&&this.allRestrictedItems.length){const o=r("click to learn more");return`${r("productDetail"===g.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(g.currentHelloPage){case"cart":return r("Prepay duties and taxes at checkout");case"productList":case"productDetail":return r("See duty and tax thresholds");default:return r("Welcome to [storeName]",{storeName:o})}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==g.currentHelloPage&&"productList"!==g.currentHelloPage||"DISABLED"===g.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=l;if(!e)return b("Hello could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const i={items:o,shipFrom:e,shipTo:t},{errors:l,json:n}=await u("/api/zonos-elements/check-item-restrictions",{body:i,method:"POST"});return l.length||!n?(b(`Error fetching item restrictions: ${null===(s=l.find(Boolean))||void 0===s?void 0:s.message}`),[]):n.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(g.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=g.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=k();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage()},this.handleProductCountChange=i((()=>{const{productTitleElementSelector:o}=g.helloSettings;if(o){const o=k();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{var o;const e=new MutationObserver(this.handleProductCountChange);e.observe(document.body,{childList:!0,subtree:!0}),null===(o=this.observerWatcher)||void 0===o||o.push(e)},this.watchPriceChange=()=>{var o;const e=new MutationObserver((()=>{this.displayCurrency()}));e.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),null===(o=this.observerWatcher)||void 0===o||o.push(e)},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&h(o.searchParams))!==l.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,g.currentHelloPage=(()=>{const{cartUrlPattern:o,homepageUrlPattern:e,productDetailUrlPattern:t,productListUrlPattern:s}=g.helloSettings;return y(o)?"cart":y(t)?"productDetail":y(s)?"productList":y(e)?"home":""})();const e=new URL(window.location.href);if(!h(e.searchParams))return void a(l.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return v(this.helloRef)},this.shouldRenderHello=(o=!0)=>{var e,t;if(!l.localizationLoaded)return!1;const{countryDisplayRules:s,showForCountries:i}=g.helloSettings,n=null==s?void 0:s.widgetVisibility,r=l.selectedCountryCode,h=Array.isArray(i)||null!=i?i:null==n?void 0:n.behavior;if(o&&!l.isShippableCountry&&x(`Hello: not shippable country - Show for countries: ${h}`),Array.isArray(h))return!!r&&h.includes(r);let a;return a="ALL"===h||l.isShippableCountry,!a&&r&&(null===(e=null==n?void 0:n.includedCountries)||void 0===e?void 0:e.includes(r))&&(a=!0),a&&r&&(null===(t=null==n?void 0:n.excludedCountries)||void 0===t?void 0:t.includes(r))&&(a=!1),a}}showDialogHandler(o){var e;if(o){const o=null===(e=this.helloElement)||void 0===e?void 0:e.parentElement;o&&o.parentElement===document.body&&(o.style.zIndex="2147483647",document.body.appendChild(o))}}async getCountryList(){return l.helloCountryList}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&g.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}disconnectedCallback(){var o;null===(o=this.observerWatcher)||void 0===o||o.forEach((o=>o.disconnect()))}async displayCurrency(){"DISABLED"!==g.helloSettings.currencyBehavior&&(l.exchangeRate?d():x("Could not display currency. Exchange rate and format data is not available.","warn"))}async convertAndFormat(o){return c(o)}async convert(o){return m(o)}async format(o){return p({amount:o})}async openHelloDialog(o){this.changeShowDialog(o)}handleResize(){this.isMobile=window.innerWidth<=768}handleHelloWidgetInitializedState({countryCode:o,currencyCode:e}){var t,s;this.isHelloWidgetRendered||l.selectedCountryCode&&"function"==typeof g.helloSettings.onInitSuccess&&(this.isHelloWidgetRendered=!0,null===(s=(t=g.helloSettings).onInitSuccess)||void 0===s||s.call(t,{countryCode:o,currencyCode:e}))}getHelloLocation(){const o=this.mobileLocationOverride||g.helloSettings.mobileLocation,e=g.helloSettings.desktopLocation,t=this.isMobile;if(!0===t)return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==o?void 0:o.includes("LEFT")),isOnTop:null==o?void 0:o.includes("TOP"),shouldFloat:!!o};{const o=!g.helloSettings.anchorElementSelector&&!!e;return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==e?void 0:e.includes("LEFT"))||this.shouldAnimateLeftDesktop(),isOnTop:null==e?void 0:e.includes("TOP"),shouldFloat:o}}}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=w(this.appearanceSettingsOverride.theme))}componentDidLoad(){this.isMobile=window.innerWidth<=768}render(){var o,s;if(null===(o=g.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>o&&new RegExp(o).test(window.location.href))))return x("Hello is excluded on this url","warn"),null;const{selectedCountryCode:i,targetCurrency:n}=l,{isOnLeft:r,isOnTop:h,shouldFloat:a}=this.getHelloLocation(),d=f(g.appearance,this.appearanceSettingsOverride||null),{theme:c}=d,m=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(g.organizationName);const p=this.shouldRenderHello()&&!!i;return p&&!this.isHelloWidgetRendered&&this.handleHelloWidgetInitializedState({countryCode:i,currencyCode:n}),e(t,{class:"zonos--hello zonos--elements","data-theme":c},p&&e("div",{class:z(["zonos--hello-wrapper",a&&"zonos--hello-widget-float"])},e("button",{class:z(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",r&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",a&&"zonos--hello-widget-float"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o),type:"button"},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),e("div",{class:z(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",r&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",a&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:d,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:m,setIsOpen:this.changeShowDialog}))))}get helloElement(){return s(this)}static get watchers(){return{showDialog:["showDialogHandler"],appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}}};L.style=":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 .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}@media screen and (min-width: 769px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px;width:auto;height:auto;z-index:1001}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:16px;border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";export{L as zonos_hello}
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(o,e,t,s){function c(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,n){function l(o){try{r(s.next(o))}catch(o){n(o)}}function i(o){try{r(s["throw"](o))}catch(o){n(o)}}function r(o){o.done?t(o.value):c(o.value).then(l,i)}r((s=s.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},s,c,n,l;return l={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function i(o){return function(e){return r([o,e])}}function r(i){if(s)throw new TypeError("Generator is already executing.");while(l&&(l=0,i[0]&&(t=0)),t)try{if(s=1,c&&(n=i[0]&2?c["return"]:i[0]?c["throw"]||((n=c["return"])&&n.call(c),0):c.next)&&!(n=n.call(c,i[1])).done)return n;if(c=0,n)i=[i[0]&2,n.value];switch(i[0]){case 0:case 1:n=i;break;case 4:t.label++;return{value:i[1],done:false};case 5:t.label++;c=i[1];i=[0];continue;case 7:i=t.ops.pop();t.trys.pop();continue;default:if(!(n=t.trys,n=n.length>0&&n[n.length-1])&&(i[0]===6||i[0]===2)){t=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]<n[3])){t.label=i[1];break}if(i[0]===6&&t.label<n[1]){t.label=n[1];n=i;break}if(n&&t.label<n[2]){t.label=n[2];t.ops.push(i);break}if(n[2])t.ops.pop();t.trys.pop();continue}i=e.call(o,t)}catch(o){i=[6,o];c=0}finally{s=n=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-7261e245.system.js","./p-2ec799e4.system.js","./p-567abb43.system.js","./p-e8a68ce7.system.js","./p-1523f6a8.system.js","./p-15ef7644.system.js","./p-398d9022.system.js","./p-01174496.system.js","./p-23e7c655.system.js","./p-d938f42f.system.js","./p-45bd8072.system.js","./p-c9e433c0.system.js","./p-61be7d98.system.js","./p-8bce79f4.system.js","./p-43a6e469.system.js","./p-17a8a514.system.js"],(function(o){"use strict";var e,t,s,c,n,l,i,r,a,z,d,h,u,f,m,p,g,b,v,w,x,y,k,_,C,S,j,I,O,T,L,E,U,P,N,A,D,B,R,F;return{setters:[function(o){e=o.r;t=o.h;s=o.a;c=o.F},function(o){n=o.b;l=o.i;i=o.c;r=o.d;a=o.n;z=o.e;d=o.j;h=o.k;u=o.u;f=o.A;m=o.E;p=o.C;g=o.f},function(o){b=o.i;v=o.a;w=o.c;x=o.b;y=o.d;k=o.e},function(o){_=o.p;C=o.a},function(o){S=o.s;j=o.t;I=o.c;O=o.d;T=o.l},function(o){L=o.z},function(o){E=o.b},function(o){U=o.h;P=o.s;N=o.l;A=o.g},function(o){D=o.c},function(o){B=o.l},function(o){R=o.r},function(o){F=o.l},function(){},function(){},function(){},function(){}],execute:function(){var H='<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>';var K=".sc-zonos-collect-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-collect-h *.sc-zonos-collect{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-collect-h img.sc-zonos-collect{max-width:100%}.sc-zonos-collect-h dl.sc-zonos-collect,.sc-zonos-collect-h dd.sc-zonos-collect,.sc-zonos-collect-h h1.sc-zonos-collect,.sc-zonos-collect-h h2.sc-zonos-collect,.sc-zonos-collect-h h3.sc-zonos-collect,.sc-zonos-collect-h h4.sc-zonos-collect,.sc-zonos-collect-h h5.sc-zonos-collect,.sc-zonos-collect-h h6.sc-zonos-collect,.sc-zonos-collect-h hr.sc-zonos-collect,.sc-zonos-collect-h figure.sc-zonos-collect,.sc-zonos-collect-h p.sc-zonos-collect,.sc-zonos-collect-h pre.sc-zonos-collect{margin:0}.sc-zonos-collect-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-collect-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-collect-h *.sc-zonos-collect{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar{width:10px}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-collect-h .zonos--content.sc-zonos-collect{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;width:100%;-ms-flex-pack:center;justify-content:center}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{-ms-flex:1;flex:1;padding:56px 80px 60px;max-width:800px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect{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-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{background-color:var(--zonos-elements-gray-0)}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect{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-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect .zonos--header.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect .zonos--logo.sc-zonos-collect{margin-bottom:0}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect zonos-checkout-finish.sc-zonos-collect{-ms-flex:1;flex:1}.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{max-width:800px}.sc-zonos-collect-h .zonos--left.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-collect-h .zonos--left.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{padding:0 8px 8px}.sc-zonos-collect-h .zonos--left.sc-zonos-collect .zonos--payment-error-banner.sc-zonos-collect{margin-top:24px}.sc-zonos-collect-h .zonos--right.sc-zonos-collect{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-collect-h .zonos--right.sc-zonos-collect .zonos--order-details-container.sc-zonos-collect{overflow:hidden}.sc-zonos-collect-h .zonos--wrapper.sc-zonos-collect{overflow:auto;max-height:100%;position:relative}.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%;margin-top:32px}.sc-zonos-collect-h .zonos--logo-wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}.sc-zonos-collect-h .zonos--logo-wrapper.sc-zonos-collect>*.sc-zonos-collect{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-collect-h .zonos--header-right.sc-zonos-collect{display:none}.sc-zonos-collect-h .zonos--logo.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-collect-h .zonos--logo.sc-zonos-collect img.sc-zonos-collect{max-height:70px;-o-object-position:left center;object-position:left center;-o-object-fit:contain;object-fit:contain}.sc-zonos-collect-h .zonos--collect-container.sc-zonos-collect{overflow:visible}.mobile.sc-zonos-collect-h,.tablet.sc-zonos-collect-h{min-width:auto}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect{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-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{padding-bottom:0}}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{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-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--review.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--review.sc-zonos-collect{margin-bottom:0}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--cart-items.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--cart-items.sc-zonos-collect{margin-top:8px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect zonos-checkout-footer.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect zonos-checkout-footer.sc-zonos-collect{-ms-flex-order:3;order:3}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{max-height:100%}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--footer.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--footer.sc-zonos-collect{-ms-flex-order:3;order:3}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect{width:auto}.mobile.sc-zonos-collect-h .zonos--cart-subtotal.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--cart-subtotal.sc-zonos-collect{margin:0}.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{position:-webkit-sticky;position:sticky;top:0;width:100%;padding:16px;background-color:var(--zonos-elements-gray-0);z-index:3}.mobile.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{max-width:800px;padding:0 16px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect{overflow:auto;-ms-flex-pack:unset;justify-content:unset;-ms-flex-align:center;align-items:center;gap:24px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{overflow:visible;width:100%}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{gap:32px}.mobile.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect{margin-top:0}.mobile.sc-zonos-collect-h zonos-collect-footer.sc-zonos-collect,.tablet.sc-zonos-collect-h zonos-collect-footer.sc-zonos-collect{-ms-flex-order:3;order:3;left:0}.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{padding-top:56px;top:-56px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--header-right.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{padding-top:28px;top:-28px}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect{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-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar{width:10px}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.zonos--collect-language-dialog-open.sc-zonos-collect{opacity:1;-webkit-transform:scale(1);transform:scale(1)}.iframed.sc-zonos-collect-h .zonos--content.sc-zonos-collect{-ms-scroll-chaining:chained;overscroll-behavior:auto}";var V=K;var W=o("zonos_collect",function(){function o(o){var t=this;e(this,o);this.storeUnsubscribeList=[];this.onChangeLocaleListener=function(){};this.mobile=false;this.tablet=false;this.stripe=window.Zonos.stripe;this.showLanguageDialogMobile=false;this.submitLoading=false;this.collapseReview=true;this.isMobile=false;this.isTablet=false;this.isOverlayLoading=true;this.isCartCollected=false;this.isCartExpired=false;this.payInUsdConfirmDialogOpen=false;this.inventoryCheckErrorMessage=null;this.confirmationId=null;this.clientSecret=n.clientSecret;this.stripeCustomerSessionClientSecret=n.stripeCustomerSessionClientSecret;this.getBaseCurrencySettlementInfo=function(){var o=r.selectedLandedCost;if(!o){return null}var e=o.landedCost.amountSubtotals;if(!e){return null}var t=(e.discounts||0)+e.items+e.landedCostTotal+e.shipping;return{settlementAmount:t}};this.applyStripeTheme=function(){return __awaiter(t,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:o=L.appearance.theme;return[4,l({overrideTheme:this.isMobile?o:undefined,paypalEnabled:_()})];case 1:e.sent();return[2]}}))}))};this.fetchCheckoutSession=function(o){return __awaiter(t,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,U("/api/zonos-elements/collect/get-checkout-session",{body:{checkoutSessionId:o},method:"POST"})];case 1:e=t.sent().json;return[2,e]}}))}))};this.checkStripePaymentIntentStatus=function(){return __awaiter(t,void 0,void 0,(function(){var o,e,t,s,c,l,r,a,z,d;return __generator(this,(function(h){switch(h.label){case 0:e=!!window.Zonos.cartData;t=new URL(window.location.href).searchParams;s=t.get("payment_intent_client_secret");c=t.get("zonosCheckoutSessionId");B("Payment intent exist, checking stripe payment intent status");if(!s){B("No stripe client secret found in the URL, proceed to order if cart data is available");return[2,{shouldAllowOrder:e}]}return[4,i({clientSecret:s})];case 1:l=h.sent(),r=l.error,a=l.status;z=new URLSearchParams(window.location.search).get("redirect_status");if(!(z&&c))return[3,3];if(!r){B("Payment intent is succeeded or in a good state to move forward, show success screen")}else{B("Payment intent failed, show status from error")}return[4,this.fetchCheckoutSession(c)];case 2:d=h.sent();this.confirmationId=((o=d===null||d===void 0?void 0:d.checkoutSession.landedCost)===null||o===void 0?void 0:o.shortId)||null;S.checkoutSessionId=c;n.clientSecret=s;void this.setToFinishStep(a);return[2,{shouldAllowOrder:false}];case 3:if(!e){B("Cart data is not available, only check payment intent status, skip order.");return[2,{shouldAllowOrder:false}]}B("Payment intent is not succeeded, proceed to order");return[2,{shouldAllowOrder:true}]}}))}))}}o.prototype.resizeListener=function(){this.isMobile=b(this.mobile);this.isTablet=v(this.tablet)};o.prototype.setToFinishStep=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){n.stripe=window.Zonos.stripe;r.step="finish";this.storybookPaymentStatusOverride=o;this.isOverlayLoading=false;return[2]}))}))};o.prototype.initCollectCart=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,s,c,n,l,u,f,m,p,g,b,v,y,k,_,C,I,O,T,U,A;return __generator(this,(function(D){switch(D.label){case 0:if(!window.Zonos.cartData){return[2]}g=(e=(o=window.Zonos.cartData)===null||o===void 0?void 0:o.items[0])===null||e===void 0?void 0:e.currencyCode;if(g){r.currency=g}b=(s=(t=window.Zonos.cartData)===null||t===void 0?void 0:t.references)===null||s===void 0?void 0:s.checkoutSessionId;v=(n=(c=window.Zonos.cartData)===null||c===void 0?void 0:c.references)===null||n===void 0?void 0:n.landedCostId;if(!v){a({messages:[j("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:L.organizationName})],title:j("Invalid session")});return[2]}if(b){B("Setting checkout session id from cart reference","info",b);S.checkoutSessionId=b}else{B("Clear checkout session id from storage so we start from a fresh session for the collect cart");S.checkoutSessionId=null}return[4,this.checkStripePaymentIntentStatus()];case 1:y=D.sent().shouldAllowOrder;if(!y){return[2]}D.label=2;case 2:D.trys.push([2,11,,12]);k=E(window.Zonos.cartData),_=k.adjustments,C=k.cartItems;return[4,z({adjustments:_,cartItems:C,landedCostId:v,shouldInitSessionOnFailure:false})];case 3:D.sent();if(!(!S.checkoutSessionId&&!b))return[3,5];return[4,d()];case 4:I=D.sent();B("stripeStoreInitCheckoutSession: ".concat(I));if(!I){throw new Error("Failed to initialize checkout session! The cart might be created with LIVE Collect quote but being used with sandbox credential")}D.label=5;case 5:if(!((!r.checkoutSession||((l=r.checkoutSession)===null||l===void 0?void 0:l.completedAt))&&b))return[3,9];return[4,this.fetchCheckoutSession(b)];case 6:O=D.sent();this.confirmationId=((u=O===null||O===void 0?void 0:O.checkoutSession.landedCost)===null||u===void 0?void 0:u.shortId)||null;if(!!(O===null||O===void 0?void 0:O.checkoutSession.completedAt)){void this.setToFinishStep("succeeded");return[2]}if(!(O===null||O===void 0?void 0:O.checkoutSession.clientSecret))return[3,8];return[4,i({clientSecret:O.checkoutSession.clientSecret})];case 7:T=D.sent().status;if(T==="processing"||T==="succeeded"){void this.setToFinishStep(T);return[2]}D.label=8;case 8:void P({endpoint:"INVALID_COLLECT_CHECKOUT_SESSION",errors:["Invalid checkout session, can not retrieve the checkout session after failing to update it"],metadata:{cartCheckoutSessionId:b,cartId:(f=window.Zonos.cartData)===null||f===void 0?void 0:f.id,cartLandedCostId:v}});throw new Error("Invalid checkout session, can not retrieve the checkout session after failing to update it");case 9:if(!r.checkoutSession){void P({endpoint:"FAIL_TO_UPDATE_CREATE_CHECKOUT_SESSION",errors:["Could not update/create checkout session for this collect cart"],metadata:{cartCheckoutSessionId:b||"N/A",cartId:(m=window.Zonos.cartData)===null||m===void 0?void 0:m.id,cartLandedCostId:v||"N/A"}});throw new Error("Could not update/create checkout session for this collect cart")}void h();U=(p=r.checkoutSession)===null||p===void 0?void 0:p.landedCost;if(!U){throw new Error("Landed cost could not be found in checkout session after creating/updating them")}return[4,w(Object.assign(Object.assign({},r.checkoutSession),{id:S.checkoutSessionId||""}))];case 10:D.sent();void x({landedCostId:U.id});void this.applyStripeTheme();return[3,12];case 11:A=D.sent();N(A);a({messages:[j("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:L.organizationName})],title:j("Invalid session")});return[3,12];case 12:this.isOverlayLoading=false;return[2]}}))}))};o.prototype.toggleLanguageDialog=function(){this.showLanguageDialogMobile=!this.showLanguageDialogMobile};o.prototype.handleStripePaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,s,c,l,i,a,z;return __generator(this,(function(d){switch(d.label){case 0:void((o=n.stripeBillingAddressElement)===null||o===void 0?void 0:o.getValue());if(!((e=n.stripeLinkEventData)===null||e===void 0?void 0:e.complete)){c=document.querySelector("zonos-link-authentication");c===null||c===void 0?void 0:c.scrollIntoView({behavior:"smooth"});return[2]}if(!((t=n.stripeBillingAddressEventData)===null||t===void 0?void 0:t.complete)){l=document.querySelector(".zonos--billing-address");l===null||l===void 0?void 0:l.scrollIntoView({behavior:"smooth"});return[2]}i=n.checkoutSettlementCurrency==="USD";if(i&&n.shouldRenderPayInUsdButton&&!this.payInUsdConfirmDialogOpen){this.payInUsdConfirmDialogOpen=true;return[2]}this.payInUsdConfirmDialogOpen=false;C.paypalErrorMessage=null;n.hasPaymentError=false;this.submitLoading=true;r.inventoryCheckErrorMessage=null;return[4,u()];case 1:a=d.sent();if(!a){n.hasPaymentError=true;n.customErrorMessage=j("Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.",{currency:n.checkoutSettlementCurrency});this.submitLoading=false;return[2]}return[4,y()];case 2:d.sent();d.label=3;case 3:d.trys.push([3,5,,6]);return[4,f({noLandedCostCheck:true})];case 4:d.sent();r.step="finish";this.confirmationId=k.landedCostShortId||((s=r.selectedLandedCost)===null||s===void 0?void 0:s.landedCostId)||null;return[2];case 5:z=d.sent();N(z);n.hasPaymentError=true;return[3,6];case 6:this.submitLoading=false;return[2]}}))}))};o.prototype.componentWillLoad=function(){var o=this;n.stripe=window.Zonos.stripe;r.step="payment";void this.initCollectCart();this.resizeListener();this.storeUnsubscribeList=[m("clientSecret",(function(){void o.applyStripeTheme()})),I("selectedLocale",(function(){void o.applyStripeTheme()}))];B("mobile: ".concat(this.isMobile))};o.prototype.disconnectedCallback=function(){p();g();this.onChangeLocaleListener();this.storeUnsubscribeList.forEach((function(o){return o()}))};o.prototype.render=function(){var o=this;this.clientSecret=n.clientSecret;if(n.stripeCustomerSessionClientSecret){this.stripeCustomerSessionClientSecret=n.stripeCustomerSessionClientSecret}var e=this.getBaseCurrencySettlementInfo();var l=L.appearance,i=l.logoUrl,a=l.theme;var z=function(){var o="".concat(i,"?timestamp=").concat(Date.now());return t("div",{class:"zonos--logo"},o&&t("img",{alt:"".concat(L.organizationName," logo"),src:o}))};var d=A();var h=function(){var e;var s=new URLSearchParams(window.location.search);var n=s.get("zonosQaUrl");var l=s.get("zonosDebug");var i=(e=F.find((function(o){return o.code===T.selectedLocale})))===null||e===void 0?void 0:e.label;return t(c,null,t("zonos-h-stack",{class:"zonos--header-wrapper",spacing:16},t("div",{class:"zonos--logo-wrapper"},z(),d&&t("zonos-badge",{badgeColor:"orange",size:"small"},j("Test mode")),l==="1"&&t("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),n&&t("zonos-badge",{badgeColor:"purple",size:"small"},n)),t("div",{class:"zonos--header-right"},t("zonos-button",{backgroundColor:"gray-0",class:"zonos--header-right-button",onClick:function(){return o.toggleLanguageDialog()},variant:"outline"},i,t("zonos-icon",{"aria-label":"Language select",content:H,iconColor:"gray-1200"})),t("div",{class:D(["zonos--collect-language-dialog",o.showLanguageDialogMobile&&"zonos--collect-language-dialog-open"])},t("zonos-language-select",{handleOnClose:function(){return o.toggleLanguageDialog()}})))),R({content:t("zonos-text",{class:"zonos--header-title",type:"header"},k.originCompanyName?j("Customs charges for your recent purchase from [companyName] are available for payment",{companyName:k.originCompanyName}):j("Customs charges from your recent purchase are available for payment")),isLoading:k.isFetchingShippingInfo,skeletonHeight:"34px",skeletonWidth:"600px"}))};var u=function(){if(o.isOverlayLoading||n.isFetchingSession){return null}return t("div",{class:"zonos--content"},r.step!=="finish"&&r.step!=="error"&&t(c,null,(o.isMobile||o.isTablet)&&h(),t("div",{class:"zonos--left","data-theme":a},!o.isMobile&&!o.isTablet&&h(),t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},j("Billing info")),t("zonos-v-stack",{spacing:16},t("zonos-link-authentication",{titleText:""}),t("zonos-address",{titleText:"",type:"billing"})),t("zonos-collect-payment",{class:D(["zonos--collect-container"]),continueLoading:o.submitLoading,onContinueClicked:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.handleStripePaymentContinue()];case 1:o.sent();return[2]}}))}))}})),t("div",{class:"zonos--right","data-theme":a},t("zonos-collect-review",{mobile:o.isMobile,tablet:o.isTablet}),t("div",{class:"zonos--order-details-container"},t("zonos-collect-order-details",{collapsed:o.collapseReview,mobile:o.isMobile,onCollapseClicked:function(){o.collapseReview=!o.collapseReview}})),t("div",{class:"flex--wrapper"},t("zonos-v-stack",{spacing:16},t("zonos-collect-subtotal",null)),!o.isMobile&&!o.isTablet&&t("zonos-collect-footer",{"data-theme":a,mobile:o.isMobile,tablet:o.isTablet})))),(r.step==="finish"||r.step==="error")&&t("div",{class:"zonos--done","data-theme":a},t("div",{class:"zonos--header"},z()),t("zonos-collect-finish",{confirmationId:o.confirmationId,overrideNotification:r.step==="error"&&!!r.error?Object.assign(Object.assign({},r.error),{type:"error"}):undefined,storybookForceStatus:o.storybookPaymentStatusOverride})),(o.isMobile||o.isTablet||r.step==="finish"||r.step==="error")&&t("zonos-collect-footer",{"data-theme":a,mobile:o.isMobile,tablet:o.isTablet}))};return t(s,{class:D(["zonos--collect zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"]),"data-theme":a},u(),e&&t("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:j("Cancel"),dialogConfirmBtnText:j("Pay [orderTotal]",{orderTotal:O({amount:e.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:j("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:j("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:function(){o.payInUsdConfirmDialogOpen=false},onConfirmClicked:function(){return o.handleStripePaymentContinue()}}),t("zonos-loading-overlay",{open:this.isOverlayLoading}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());W.style=V}}}));
1
+ var __awaiter=this&&this.__awaiter||function(o,e,t,s){function c(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,n){function l(o){try{r(s.next(o))}catch(o){n(o)}}function i(o){try{r(s["throw"](o))}catch(o){n(o)}}function r(o){o.done?t(o.value):c(o.value).then(l,i)}r((s=s.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},s,c,n,l;return l={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function i(o){return function(e){return r([o,e])}}function r(i){if(s)throw new TypeError("Generator is already executing.");while(l&&(l=0,i[0]&&(t=0)),t)try{if(s=1,c&&(n=i[0]&2?c["return"]:i[0]?c["throw"]||((n=c["return"])&&n.call(c),0):c.next)&&!(n=n.call(c,i[1])).done)return n;if(c=0,n)i=[i[0]&2,n.value];switch(i[0]){case 0:case 1:n=i;break;case 4:t.label++;return{value:i[1],done:false};case 5:t.label++;c=i[1];i=[0];continue;case 7:i=t.ops.pop();t.trys.pop();continue;default:if(!(n=t.trys,n=n.length>0&&n[n.length-1])&&(i[0]===6||i[0]===2)){t=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]<n[3])){t.label=i[1];break}if(i[0]===6&&t.label<n[1]){t.label=n[1];n=i;break}if(n&&t.label<n[2]){t.label=n[2];t.ops.push(i);break}if(n[2])t.ops.pop();t.trys.pop();continue}i=e.call(o,t)}catch(o){i=[6,o];c=0}finally{s=n=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-7261e245.system.js","./p-196423ad.system.js","./p-20263609.system.js","./p-47bde0ba.system.js","./p-248bdea2.system.js","./p-15ef7644.system.js","./p-398d9022.system.js","./p-01174496.system.js","./p-23e7c655.system.js","./p-d938f42f.system.js","./p-45bd8072.system.js","./p-c9e433c0.system.js","./p-61be7d98.system.js","./p-8bce79f4.system.js","./p-43a6e469.system.js","./p-17a8a514.system.js"],(function(o){"use strict";var e,t,s,c,n,l,i,r,a,z,d,h,u,f,m,p,g,b,v,w,x,y,k,_,C,S,j,I,O,T,L,E,U,P,N,A,D,B,R,F;return{setters:[function(o){e=o.r;t=o.h;s=o.a;c=o.F},function(o){n=o.b;l=o.i;i=o.c;r=o.d;a=o.n;z=o.e;d=o.j;h=o.k;u=o.u;f=o.A;m=o.E;p=o.C;g=o.f},function(o){b=o.i;v=o.a;w=o.c;x=o.b;y=o.d;k=o.e},function(o){_=o.p;C=o.a},function(o){S=o.s;j=o.t;I=o.c;O=o.d;T=o.l},function(o){L=o.z},function(o){E=o.b},function(o){U=o.h;P=o.s;N=o.l;A=o.g},function(o){D=o.c},function(o){B=o.l},function(o){R=o.r},function(o){F=o.l},function(){},function(){},function(){},function(){}],execute:function(){var H='<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>';var K=".sc-zonos-collect-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-collect-h *.sc-zonos-collect{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-collect-h img.sc-zonos-collect{max-width:100%}.sc-zonos-collect-h dl.sc-zonos-collect,.sc-zonos-collect-h dd.sc-zonos-collect,.sc-zonos-collect-h h1.sc-zonos-collect,.sc-zonos-collect-h h2.sc-zonos-collect,.sc-zonos-collect-h h3.sc-zonos-collect,.sc-zonos-collect-h h4.sc-zonos-collect,.sc-zonos-collect-h h5.sc-zonos-collect,.sc-zonos-collect-h h6.sc-zonos-collect,.sc-zonos-collect-h hr.sc-zonos-collect,.sc-zonos-collect-h figure.sc-zonos-collect,.sc-zonos-collect-h p.sc-zonos-collect,.sc-zonos-collect-h pre.sc-zonos-collect{margin:0}.sc-zonos-collect-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-collect-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-collect-h *.sc-zonos-collect{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar{width:10px}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-collect-h .zonos--content.sc-zonos-collect{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;width:100%;-ms-flex-pack:center;justify-content:center}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{-ms-flex:1;flex:1;padding:56px 80px 60px;max-width:800px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect{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-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{background-color:var(--zonos-elements-gray-0)}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect{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-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect .zonos--header.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect .zonos--logo.sc-zonos-collect{margin-bottom:0}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect zonos-checkout-finish.sc-zonos-collect{-ms-flex:1;flex:1}.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{max-width:800px}.sc-zonos-collect-h .zonos--left.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-collect-h .zonos--left.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{padding:0 8px 8px}.sc-zonos-collect-h .zonos--left.sc-zonos-collect .zonos--payment-error-banner.sc-zonos-collect{margin-top:24px}.sc-zonos-collect-h .zonos--right.sc-zonos-collect{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-collect-h .zonos--right.sc-zonos-collect .zonos--order-details-container.sc-zonos-collect{overflow:hidden}.sc-zonos-collect-h .zonos--wrapper.sc-zonos-collect{overflow:auto;max-height:100%;position:relative}.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%;margin-top:32px}.sc-zonos-collect-h .zonos--logo-wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}.sc-zonos-collect-h .zonos--logo-wrapper.sc-zonos-collect>*.sc-zonos-collect{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-collect-h .zonos--header-right.sc-zonos-collect{display:none}.sc-zonos-collect-h .zonos--logo.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-collect-h .zonos--logo.sc-zonos-collect img.sc-zonos-collect{max-height:70px;-o-object-position:left center;object-position:left center;-o-object-fit:contain;object-fit:contain}.sc-zonos-collect-h .zonos--collect-container.sc-zonos-collect{overflow:visible}.mobile.sc-zonos-collect-h,.tablet.sc-zonos-collect-h{min-width:auto}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect{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-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{padding-bottom:0}}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{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-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--review.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--review.sc-zonos-collect{margin-bottom:0}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--cart-items.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--cart-items.sc-zonos-collect{margin-top:8px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect zonos-checkout-footer.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect zonos-checkout-footer.sc-zonos-collect{-ms-flex-order:3;order:3}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{max-height:100%}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--footer.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--footer.sc-zonos-collect{-ms-flex-order:3;order:3}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect{width:auto}.mobile.sc-zonos-collect-h .zonos--cart-subtotal.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--cart-subtotal.sc-zonos-collect{margin:0}.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{position:-webkit-sticky;position:sticky;top:0;width:100%;padding:16px;background-color:var(--zonos-elements-gray-0);z-index:3}.mobile.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{max-width:800px;padding:0 16px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect{overflow:auto;-ms-flex-pack:unset;justify-content:unset;-ms-flex-align:center;align-items:center;gap:24px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{overflow:visible;width:100%}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{gap:32px}.mobile.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect{margin-top:0}.mobile.sc-zonos-collect-h zonos-collect-footer.sc-zonos-collect,.tablet.sc-zonos-collect-h zonos-collect-footer.sc-zonos-collect{-ms-flex-order:3;order:3;left:0}.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{padding-top:56px;top:-56px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--header-right.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{padding-top:28px;top:-28px}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect{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-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar{width:10px}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.zonos--collect-language-dialog-open.sc-zonos-collect{opacity:1;-webkit-transform:scale(1);transform:scale(1)}.iframed.sc-zonos-collect-h .zonos--content.sc-zonos-collect{-ms-scroll-chaining:chained;overscroll-behavior:auto}";var V=K;var W=o("zonos_collect",function(){function o(o){var t=this;e(this,o);this.storeUnsubscribeList=[];this.onChangeLocaleListener=function(){};this.mobile=false;this.tablet=false;this.stripe=window.Zonos.stripe;this.showLanguageDialogMobile=false;this.submitLoading=false;this.collapseReview=true;this.isMobile=false;this.isTablet=false;this.isOverlayLoading=true;this.isCartCollected=false;this.isCartExpired=false;this.payInUsdConfirmDialogOpen=false;this.inventoryCheckErrorMessage=null;this.confirmationId=null;this.clientSecret=n.clientSecret;this.stripeCustomerSessionClientSecret=n.stripeCustomerSessionClientSecret;this.getBaseCurrencySettlementInfo=function(){var o=r.selectedLandedCost;if(!o){return null}var e=o.landedCost.amountSubtotals;if(!e){return null}var t=(e.discounts||0)+e.items+e.landedCostTotal+e.shipping;return{settlementAmount:t}};this.applyStripeTheme=function(){return __awaiter(t,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:o=L.appearance.theme;return[4,l({overrideTheme:this.isMobile?o:undefined,paypalEnabled:_()})];case 1:e.sent();return[2]}}))}))};this.fetchCheckoutSession=function(o){return __awaiter(t,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,U("/api/zonos-elements/collect/get-checkout-session",{body:{checkoutSessionId:o},method:"POST"})];case 1:e=t.sent().json;return[2,e]}}))}))};this.checkStripePaymentIntentStatus=function(){return __awaiter(t,void 0,void 0,(function(){var o,e,t,s,c,l,r,a,z,d;return __generator(this,(function(h){switch(h.label){case 0:e=!!window.Zonos.cartData;t=new URL(window.location.href).searchParams;s=t.get("payment_intent_client_secret");c=t.get("zonosCheckoutSessionId");B("Payment intent exist, checking stripe payment intent status");if(!s){B("No stripe client secret found in the URL, proceed to order if cart data is available");return[2,{shouldAllowOrder:e}]}return[4,i({clientSecret:s})];case 1:l=h.sent(),r=l.error,a=l.status;z=new URLSearchParams(window.location.search).get("redirect_status");if(!(z&&c))return[3,3];if(!r){B("Payment intent is succeeded or in a good state to move forward, show success screen")}else{B("Payment intent failed, show status from error")}return[4,this.fetchCheckoutSession(c)];case 2:d=h.sent();this.confirmationId=((o=d===null||d===void 0?void 0:d.checkoutSession.landedCost)===null||o===void 0?void 0:o.shortId)||null;S.checkoutSessionId=c;n.clientSecret=s;void this.setToFinishStep(a);return[2,{shouldAllowOrder:false}];case 3:if(!e){B("Cart data is not available, only check payment intent status, skip order.");return[2,{shouldAllowOrder:false}]}B("Payment intent is not succeeded, proceed to order");return[2,{shouldAllowOrder:true}]}}))}))}}o.prototype.resizeListener=function(){this.isMobile=b(this.mobile);this.isTablet=v(this.tablet)};o.prototype.setToFinishStep=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){n.stripe=window.Zonos.stripe;r.step="finish";this.storybookPaymentStatusOverride=o;this.isOverlayLoading=false;return[2]}))}))};o.prototype.initCollectCart=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,s,c,n,l,u,f,m,p,g,b,v,y,k,_,C,I,O,T,U,A;return __generator(this,(function(D){switch(D.label){case 0:if(!window.Zonos.cartData){return[2]}g=(e=(o=window.Zonos.cartData)===null||o===void 0?void 0:o.items[0])===null||e===void 0?void 0:e.currencyCode;if(g){r.currency=g}b=(s=(t=window.Zonos.cartData)===null||t===void 0?void 0:t.references)===null||s===void 0?void 0:s.checkoutSessionId;v=(n=(c=window.Zonos.cartData)===null||c===void 0?void 0:c.references)===null||n===void 0?void 0:n.landedCostId;if(!v){a({messages:[j("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:L.organizationName})],title:j("Invalid session")});return[2]}if(b){B("Setting checkout session id from cart reference","info",b);S.checkoutSessionId=b}else{B("Clear checkout session id from storage so we start from a fresh session for the collect cart");S.checkoutSessionId=null}return[4,this.checkStripePaymentIntentStatus()];case 1:y=D.sent().shouldAllowOrder;if(!y){return[2]}D.label=2;case 2:D.trys.push([2,11,,12]);k=E(window.Zonos.cartData),_=k.adjustments,C=k.cartItems;return[4,z({adjustments:_,cartItems:C,landedCostId:v,shouldInitSessionOnFailure:false})];case 3:D.sent();if(!(!S.checkoutSessionId&&!b))return[3,5];return[4,d()];case 4:I=D.sent();B("stripeStoreInitCheckoutSession: ".concat(I));if(!I){throw new Error("Failed to initialize checkout session! The cart might be created with LIVE Collect quote but being used with sandbox credential")}D.label=5;case 5:if(!((!r.checkoutSession||((l=r.checkoutSession)===null||l===void 0?void 0:l.completedAt))&&b))return[3,9];return[4,this.fetchCheckoutSession(b)];case 6:O=D.sent();this.confirmationId=((u=O===null||O===void 0?void 0:O.checkoutSession.landedCost)===null||u===void 0?void 0:u.shortId)||null;if(!!(O===null||O===void 0?void 0:O.checkoutSession.completedAt)){void this.setToFinishStep("succeeded");return[2]}if(!(O===null||O===void 0?void 0:O.checkoutSession.clientSecret))return[3,8];return[4,i({clientSecret:O.checkoutSession.clientSecret})];case 7:T=D.sent().status;if(T==="processing"||T==="succeeded"){void this.setToFinishStep(T);return[2]}D.label=8;case 8:void P({endpoint:"INVALID_COLLECT_CHECKOUT_SESSION",errors:["Invalid checkout session, can not retrieve the checkout session after failing to update it"],metadata:{cartCheckoutSessionId:b,cartId:(f=window.Zonos.cartData)===null||f===void 0?void 0:f.id,cartLandedCostId:v}});throw new Error("Invalid checkout session, can not retrieve the checkout session after failing to update it");case 9:if(!r.checkoutSession){void P({endpoint:"FAIL_TO_UPDATE_CREATE_CHECKOUT_SESSION",errors:["Could not update/create checkout session for this collect cart"],metadata:{cartCheckoutSessionId:b||"N/A",cartId:(m=window.Zonos.cartData)===null||m===void 0?void 0:m.id,cartLandedCostId:v||"N/A"}});throw new Error("Could not update/create checkout session for this collect cart")}void h();U=(p=r.checkoutSession)===null||p===void 0?void 0:p.landedCost;if(!U){throw new Error("Landed cost could not be found in checkout session after creating/updating them")}return[4,w(Object.assign(Object.assign({},r.checkoutSession),{id:S.checkoutSessionId||""}))];case 10:D.sent();void x({landedCostId:U.id});void this.applyStripeTheme();return[3,12];case 11:A=D.sent();N(A);a({messages:[j("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:L.organizationName})],title:j("Invalid session")});return[3,12];case 12:this.isOverlayLoading=false;return[2]}}))}))};o.prototype.toggleLanguageDialog=function(){this.showLanguageDialogMobile=!this.showLanguageDialogMobile};o.prototype.handleStripePaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,s,c,l,i,a,z;return __generator(this,(function(d){switch(d.label){case 0:void((o=n.stripeBillingAddressElement)===null||o===void 0?void 0:o.getValue());if(!((e=n.stripeLinkEventData)===null||e===void 0?void 0:e.complete)){c=document.querySelector("zonos-link-authentication");c===null||c===void 0?void 0:c.scrollIntoView({behavior:"smooth"});return[2]}if(!((t=n.stripeBillingAddressEventData)===null||t===void 0?void 0:t.complete)){l=document.querySelector(".zonos--billing-address");l===null||l===void 0?void 0:l.scrollIntoView({behavior:"smooth"});return[2]}i=n.checkoutSettlementCurrency==="USD";if(i&&n.shouldRenderPayInUsdButton&&!this.payInUsdConfirmDialogOpen){this.payInUsdConfirmDialogOpen=true;return[2]}this.payInUsdConfirmDialogOpen=false;C.paypalErrorMessage=null;n.hasPaymentError=false;this.submitLoading=true;r.inventoryCheckErrorMessage=null;return[4,u()];case 1:a=d.sent();if(!a){n.hasPaymentError=true;n.customErrorMessage=j("Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.",{currency:n.checkoutSettlementCurrency});this.submitLoading=false;return[2]}return[4,y()];case 2:d.sent();d.label=3;case 3:d.trys.push([3,5,,6]);return[4,f({noLandedCostCheck:true})];case 4:d.sent();r.step="finish";this.confirmationId=k.landedCostShortId||((s=r.selectedLandedCost)===null||s===void 0?void 0:s.landedCostId)||null;return[2];case 5:z=d.sent();N(z);n.hasPaymentError=true;return[3,6];case 6:this.submitLoading=false;return[2]}}))}))};o.prototype.componentWillLoad=function(){var o=this;n.stripe=window.Zonos.stripe;r.step="payment";void this.initCollectCart();this.resizeListener();this.storeUnsubscribeList=[m("clientSecret",(function(){void o.applyStripeTheme()})),I("selectedLocale",(function(){void o.applyStripeTheme()}))];B("mobile: ".concat(this.isMobile))};o.prototype.disconnectedCallback=function(){p();g();this.onChangeLocaleListener();this.storeUnsubscribeList.forEach((function(o){return o()}))};o.prototype.render=function(){var o=this;this.clientSecret=n.clientSecret;if(n.stripeCustomerSessionClientSecret){this.stripeCustomerSessionClientSecret=n.stripeCustomerSessionClientSecret}var e=this.getBaseCurrencySettlementInfo();var l=L.appearance,i=l.logoUrl,a=l.theme;var z=function(){var o="".concat(i,"?timestamp=").concat(Date.now());return t("div",{class:"zonos--logo"},o&&t("img",{alt:"".concat(L.organizationName," logo"),src:o}))};var d=A();var h=function(){var e;var s=new URLSearchParams(window.location.search);var n=s.get("zonosQaUrl");var l=s.get("zonosDebug");var i=(e=F.find((function(o){return o.code===T.selectedLocale})))===null||e===void 0?void 0:e.label;return t(c,null,t("zonos-h-stack",{class:"zonos--header-wrapper",spacing:16},t("div",{class:"zonos--logo-wrapper"},z(),d&&t("zonos-badge",{badgeColor:"orange",size:"small"},j("Test mode")),l==="1"&&t("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),n&&t("zonos-badge",{badgeColor:"purple",size:"small"},n)),t("div",{class:"zonos--header-right"},t("zonos-button",{backgroundColor:"gray-0",class:"zonos--header-right-button",onClick:function(){return o.toggleLanguageDialog()},variant:"outline"},i,t("zonos-icon",{"aria-label":"Language select",content:H,iconColor:"gray-1200"})),t("div",{class:D(["zonos--collect-language-dialog",o.showLanguageDialogMobile&&"zonos--collect-language-dialog-open"])},t("zonos-language-select",{handleOnClose:function(){return o.toggleLanguageDialog()}})))),R({content:t("zonos-text",{class:"zonos--header-title",type:"header"},k.originCompanyName?j("Customs charges for your recent purchase from [companyName] are available for payment",{companyName:k.originCompanyName}):j("Customs charges from your recent purchase are available for payment")),isLoading:k.isFetchingShippingInfo,skeletonHeight:"34px",skeletonWidth:"600px"}))};var u=function(){if(o.isOverlayLoading||n.isFetchingSession){return null}return t("div",{class:"zonos--content"},r.step!=="finish"&&r.step!=="error"&&t(c,null,(o.isMobile||o.isTablet)&&h(),t("div",{class:"zonos--left","data-theme":a},!o.isMobile&&!o.isTablet&&h(),t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},j("Billing info")),t("zonos-v-stack",{spacing:16},t("zonos-link-authentication",{titleText:""}),t("zonos-address",{titleText:"",type:"billing"})),t("zonos-collect-payment",{class:D(["zonos--collect-container"]),continueLoading:o.submitLoading,onContinueClicked:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.handleStripePaymentContinue()];case 1:o.sent();return[2]}}))}))}})),t("div",{class:"zonos--right","data-theme":a},t("zonos-collect-review",{mobile:o.isMobile,tablet:o.isTablet}),t("div",{class:"zonos--order-details-container"},t("zonos-collect-order-details",{collapsed:o.collapseReview,mobile:o.isMobile,onCollapseClicked:function(){o.collapseReview=!o.collapseReview}})),t("div",{class:"flex--wrapper"},t("zonos-v-stack",{spacing:16},t("zonos-collect-subtotal",null)),!o.isMobile&&!o.isTablet&&t("zonos-collect-footer",{"data-theme":a,mobile:o.isMobile,tablet:o.isTablet})))),(r.step==="finish"||r.step==="error")&&t("div",{class:"zonos--done","data-theme":a},t("div",{class:"zonos--header"},z()),t("zonos-collect-finish",{confirmationId:o.confirmationId,overrideNotification:r.step==="error"&&!!r.error?Object.assign(Object.assign({},r.error),{type:"error"}):undefined,storybookForceStatus:o.storybookPaymentStatusOverride})),(o.isMobile||o.isTablet||r.step==="finish"||r.step==="error")&&t("zonos-collect-footer",{"data-theme":a,mobile:o.isMobile,tablet:o.isTablet}))};return t(s,{class:D(["zonos--collect zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"]),"data-theme":a},u(),e&&t("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:j("Cancel"),dialogConfirmBtnText:j("Pay [orderTotal]",{orderTotal:O({amount:e.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:j("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:j("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:function(){o.payInUsdConfirmDialogOpen=false},onConfirmClicked:function(){return o.handleStripePaymentContinue()}}),t("zonos-loading-overlay",{open:this.isOverlayLoading}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());W.style=V}}}));